From 3a367408ccae460fc8547c31b4c1d2b9cce23c2a Mon Sep 17 00:00:00 2001 From: Michael Freno Date: Mon, 30 Mar 2026 16:32:11 -0400 Subject: [PATCH] fluff --- check-identity.js | 65 ----------------------------------------------- check-identity.py | 36 -------------------------- 2 files changed, 101 deletions(-) delete mode 100644 check-identity.js delete mode 100644 check-identity.py diff --git a/check-identity.js b/check-identity.js deleted file mode 100644 index e6cdf34..0000000 --- a/check-identity.js +++ /dev/null @@ -1,65 +0,0 @@ -const http = require('http'); - -const agentId = process.env.PAPERCLIP_AGENT_ID; -const apiKey = process.env.PAPERCLIP_API_KEY; -const apiUrl = process.env.PAPERCLIP_API_URL; -const runId = process.env.PAPERCLIP_RUN_ID; - -console.log('Agent ID:', agentId); -console.log('API URL:', apiUrl); -console.log('Run ID:', runId); - -if (!apiKey || !apiUrl) { - console.error('Missing environment variables'); - process.exit(1); -} - -function fetch(url, options = {}) { - return new Promise((resolve, reject) => { - const request = http.request({ - hostname: new URL(url).hostname, - port: new URL(url).port, - path: new URL(url).pathname, - method: options.method || 'GET', - headers: { - 'Authorization': `Bearer ${apiKey}`, - 'X-Paperclip-Run-Id': runId, - ...options.headers - } - }, (response) => { - let data = ''; - response.on('data', chunk => data += chunk); - response.on('end', () => { - try { - resolve(JSON.parse(data)); - } catch { - resolve(data); - } - }); - }); - request.on('error', reject); - request.end(); - }); -} - -async function main() { - console.log('\n=== FETCHING AGENT IDENTITY ===\n'); - - try { - const identity = await fetch(`${apiUrl}/api/agents/me`); - console.log(JSON.stringify(identity, null, 2)); - } catch (err) { - console.error('Error fetching identity:', err.message); - } - - console.log('\n=== FETCHING INBOX-LITE ===\n'); - - try { - const inbox = await fetch(`${apiUrl}/api/agents/${agentId}/inbox-lite`); - console.log(JSON.stringify(inbox, null, 2)); - } catch (err) { - console.error('Error fetching inbox:', err.message); - } -} - -main(); \ No newline at end of file diff --git a/check-identity.py b/check-identity.py deleted file mode 100644 index 4015c45..0000000 --- a/check-identity.py +++ /dev/null @@ -1,36 +0,0 @@ -import urllib.request -import json -import os - -agentId = os.environ.get('PAPERCLIP_AGENT_ID', 'unknown') -apiKey = os.environ.get('PAPERCLIP_API_KEY', '') -apiUrl = os.environ.get('PAPERCLIP_API_URL', '') -runId = os.environ.get('PAPERCLIP_RUN_ID', '') - -print(f'Agent ID: {agentId}') -print(f'API URL: {apiUrl}') -print(f'Run ID: {runId}') - -if not apiKey or not apiUrl: - print('Missing environment variables') - exit(1) - -def fetch(url, method='GET', headers=None): - req = urllib.request.Request(url, method=method) - if headers: - for k, v in headers.items(): - req.add_header(k, str(v)) - try: - with urllib.request.urlopen(req) as resp: - return json.loads(resp.read().decode()) - except Exception as e: - print(f'Error: {e}') - return None - -print('\n=== FETCHING AGENT IDENTITY ===\n') -identity = fetch(f'{apiUrl}/api/agents/me') -print(json.dumps(identity or {}, indent=2)) - -print('\n=== FETCHING INBOX-LITE ===\n') -inbox = fetch(f'{apiUrl}/api/agents/{agentId}/inbox-lite') -print(json.dumps(inbox or {}, indent=2)) \ No newline at end of file