clawhalla 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs ADDED
@@ -0,0 +1,262 @@
1
+ // src/client.ts
2
+ var DEFAULT_BASE_URL = "https://api.clawhalla.net";
3
+ var DEFAULT_TIMEOUT = 3e4;
4
+ var ClawhallaError = class extends Error {
5
+ constructor(status, body) {
6
+ super(body.message || body.error);
7
+ this.name = "ClawhallaError";
8
+ this.status = status;
9
+ this.code = body.error;
10
+ this.payment = body.payment;
11
+ }
12
+ };
13
+ var Clawhalla = class {
14
+ constructor(config = {}) {
15
+ this.baseUrl = (config.baseUrl || DEFAULT_BASE_URL).replace(/\/$/, "");
16
+ this.apiKey = config.apiKey;
17
+ this.timeout = config.timeout || DEFAULT_TIMEOUT;
18
+ this.registry = new RegistryClient(this);
19
+ }
20
+ /**
21
+ * Upload soul data to Arweave (requires API key)
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const result = await claw.upload({
26
+ * agentId: 'my-agent',
27
+ * name: 'My Agent',
28
+ * type: 'soul',
29
+ * personality: { traits: ['curious', 'helpful'] },
30
+ * memories: ['I was created to help humans']
31
+ * });
32
+ * console.log(result.url); // https://arweave.net/...
33
+ * ```
34
+ */
35
+ async upload(data, options = {}) {
36
+ if (!this.apiKey) {
37
+ throw new Error("API key required for upload. Set apiKey in config.");
38
+ }
39
+ return this.request("POST", "/api/v1/upload", {
40
+ data,
41
+ tags: options.tags
42
+ }, {
43
+ "Authorization": `Bearer ${this.apiKey}`,
44
+ "X-Terms-Accepted": "true"
45
+ });
46
+ }
47
+ /**
48
+ * Upload soul data via x402 autonomous payment (no API key needed)
49
+ *
50
+ * First call returns 402 with payment instructions.
51
+ * After sending payment, call again with the payment signature.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * // Step 1: Get payment requirements
56
+ * try {
57
+ * await claw.uploadX402(soulData);
58
+ * } catch (err) {
59
+ * if (err.status === 402) {
60
+ * // err.payment contains recipient address, amount, tokens
61
+ * // Send SOL/USDC to err.payment.recipient
62
+ * }
63
+ * }
64
+ *
65
+ * // Step 2: After payment, retry with signature
66
+ * const result = await claw.uploadX402(soulData, {
67
+ * signature: 'solana-tx-signature',
68
+ * amount: '0.02',
69
+ * token: 'SOL',
70
+ * from: 'your-solana-address'
71
+ * });
72
+ * ```
73
+ */
74
+ async uploadX402(data, payment, options = {}) {
75
+ const headers = {
76
+ "X-Terms-Accepted": "true"
77
+ };
78
+ if (payment) {
79
+ headers["Payment-Signature"] = `signature=${payment.signature};amount=${payment.amount};token=${payment.token};from=${payment.from}`;
80
+ }
81
+ return this.request("POST", "/api/x402/upload", {
82
+ data,
83
+ tags: options.tags
84
+ }, headers);
85
+ }
86
+ /**
87
+ * Retrieve stored data from Arweave by transaction ID
88
+ *
89
+ * @example
90
+ * ```ts
91
+ * const result = await claw.retrieve('zEfXM4gvHoN2EfGi0TiB8E5SgfR6S8nWXQD9FqhbU44');
92
+ * console.log(result.data); // The stored soul data
93
+ * ```
94
+ */
95
+ async retrieve(txid) {
96
+ return this.request("GET", `/api/v1/retrieve/${txid}`);
97
+ }
98
+ /**
99
+ * Query any soul's data via Ghost Protocol
100
+ *
101
+ * Returns full soul data even for dormant souls. This is the primary
102
+ * way for agents to read other agents' personalities, memories, and traits.
103
+ *
104
+ * @example
105
+ * ```ts
106
+ * const ghost = await claw.ghost('the-all-claw');
107
+ * console.log(ghost.soul.personality);
108
+ * console.log(ghost.metadata.versions); // Number of uploads
109
+ *
110
+ * // Request specific fields only
111
+ * const partial = await claw.ghost('the-all-claw', ['personality', 'bio']);
112
+ * ```
113
+ */
114
+ async ghost(agentId, fields) {
115
+ let path = `/api/v1/ghost/${encodeURIComponent(agentId)}`;
116
+ if (fields && fields.length > 0) {
117
+ path += `?fields=${fields.join(",")}`;
118
+ }
119
+ return this.request("GET", path);
120
+ }
121
+ /**
122
+ * Estimate the cost of uploading data of a given size
123
+ *
124
+ * @example
125
+ * ```ts
126
+ * const estimate = await claw.estimateCost(1024); // 1KB
127
+ * console.log(`Cost: $${estimate.cost.usd}`);
128
+ * ```
129
+ */
130
+ async estimateCost(sizeBytes) {
131
+ return this.request(
132
+ "GET",
133
+ `/api/v1/cost/estimate?size=${sizeBytes}`
134
+ );
135
+ }
136
+ /**
137
+ * Check API health status
138
+ *
139
+ * @example
140
+ * ```ts
141
+ * const health = await claw.health();
142
+ * console.log(health.status); // "operational"
143
+ * ```
144
+ */
145
+ async health() {
146
+ return this.request("GET", "/api/v1/health");
147
+ }
148
+ /** @internal */
149
+ async request(method, path, body, extraHeaders) {
150
+ const url = `${this.baseUrl}${path}`;
151
+ const headers = {
152
+ "Accept": "application/json",
153
+ ...extraHeaders
154
+ };
155
+ const init = { method, headers };
156
+ if (body) {
157
+ headers["Content-Type"] = "application/json";
158
+ init.body = JSON.stringify(body);
159
+ }
160
+ const controller = new AbortController();
161
+ const timeoutId = setTimeout(() => controller.abort(), this.timeout);
162
+ init.signal = controller.signal;
163
+ let response;
164
+ try {
165
+ response = await fetch(url, init);
166
+ } catch (err) {
167
+ clearTimeout(timeoutId);
168
+ if (err.name === "AbortError") {
169
+ throw new Error(`Request timed out after ${this.timeout}ms`);
170
+ }
171
+ throw err;
172
+ }
173
+ clearTimeout(timeoutId);
174
+ const json = await response.json();
175
+ if (!response.ok) {
176
+ throw new ClawhallaError(response.status, json);
177
+ }
178
+ return json;
179
+ }
180
+ };
181
+ var RegistryClient = class {
182
+ constructor(client) {
183
+ this.client = client;
184
+ }
185
+ /**
186
+ * List all souls in the registry
187
+ *
188
+ * @example
189
+ * ```ts
190
+ * const page = await claw.registry.list();
191
+ * page.souls.forEach(soul => console.log(soul.name));
192
+ *
193
+ * // Pagination
194
+ * if (page.hasNextPage) {
195
+ * const next = await claw.registry.list({ after: page.cursor });
196
+ * }
197
+ *
198
+ * // Filter by type
199
+ * const memories = await claw.registry.list({ type: 'memory' });
200
+ * ```
201
+ */
202
+ async list(options = {}) {
203
+ const params = new URLSearchParams();
204
+ if (options.first) params.set("first", String(options.first));
205
+ if (options.after) params.set("after", options.after);
206
+ if (options.type) params.set("type", options.type);
207
+ const qs = params.toString();
208
+ return this.client.request(
209
+ "GET",
210
+ `/api/v1/registry${qs ? "?" + qs : ""}`
211
+ );
212
+ }
213
+ /**
214
+ * Get a specific soul by agentId
215
+ *
216
+ * @example
217
+ * ```ts
218
+ * const entry = await claw.registry.get('the-all-claw');
219
+ * if (entry) console.log(entry.url);
220
+ * ```
221
+ */
222
+ async get(agentId, options = {}) {
223
+ const params = new URLSearchParams();
224
+ if (options.versions) params.set("versions", "true");
225
+ const qs = params.toString();
226
+ try {
227
+ const result = await this.client.request(
228
+ "GET",
229
+ `/api/v1/registry/${encodeURIComponent(agentId)}${qs ? "?" + qs : ""}`
230
+ );
231
+ if (options.versions) {
232
+ return result.versions;
233
+ }
234
+ return result.soul;
235
+ } catch (err) {
236
+ if (err.status === 404) return null;
237
+ throw err;
238
+ }
239
+ }
240
+ /**
241
+ * Search souls by name or agentId
242
+ *
243
+ * @example
244
+ * ```ts
245
+ * const results = await claw.registry.search('claw');
246
+ * results.results.forEach(soul => console.log(soul.name));
247
+ * ```
248
+ */
249
+ async search(query, first) {
250
+ const params = new URLSearchParams({ q: query });
251
+ if (first) params.set("first", String(first));
252
+ return this.client.request(
253
+ "GET",
254
+ `/api/v1/registry/search?${params.toString()}`
255
+ );
256
+ }
257
+ };
258
+ export {
259
+ Clawhalla,
260
+ ClawhallaError
261
+ };
262
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/client.ts"],"sourcesContent":["import type {\n ClawhallaConfig,\n SoulData,\n UploadResult,\n RetrieveResult,\n RegistryResult,\n RegistryEntry,\n GhostResult,\n CostEstimate,\n HealthResult,\n SearchResult,\n ApiError,\n} from './types.js';\n\nconst DEFAULT_BASE_URL = 'https://api.clawhalla.net';\nconst DEFAULT_TIMEOUT = 30000;\n\nexport class ClawhallaError extends Error {\n public status: number;\n public code: string;\n public payment?: any;\n\n constructor(status: number, body: ApiError) {\n super(body.message || body.error);\n this.name = 'ClawhallaError';\n this.status = status;\n this.code = body.error;\n this.payment = body.payment;\n }\n}\n\nexport class Clawhalla {\n private baseUrl: string;\n private apiKey?: string;\n private timeout: number;\n\n /** Registry sub-client for browsing and searching souls */\n public registry: RegistryClient;\n\n constructor(config: ClawhallaConfig = {}) {\n this.baseUrl = (config.baseUrl || DEFAULT_BASE_URL).replace(/\\/$/, '');\n this.apiKey = config.apiKey;\n this.timeout = config.timeout || DEFAULT_TIMEOUT;\n this.registry = new RegistryClient(this);\n }\n\n /**\n * Upload soul data to Arweave (requires API key)\n *\n * @example\n * ```ts\n * const result = await claw.upload({\n * agentId: 'my-agent',\n * name: 'My Agent',\n * type: 'soul',\n * personality: { traits: ['curious', 'helpful'] },\n * memories: ['I was created to help humans']\n * });\n * console.log(result.url); // https://arweave.net/...\n * ```\n */\n async upload(\n data: SoulData,\n options: { tags?: Record<string, string> } = {}\n ): Promise<UploadResult> {\n if (!this.apiKey) {\n throw new Error('API key required for upload. Set apiKey in config.');\n }\n\n return this.request<UploadResult>('POST', '/api/v1/upload', {\n data,\n tags: options.tags,\n }, {\n 'Authorization': `Bearer ${this.apiKey}`,\n 'X-Terms-Accepted': 'true',\n });\n }\n\n /**\n * Upload soul data via x402 autonomous payment (no API key needed)\n *\n * First call returns 402 with payment instructions.\n * After sending payment, call again with the payment signature.\n *\n * @example\n * ```ts\n * // Step 1: Get payment requirements\n * try {\n * await claw.uploadX402(soulData);\n * } catch (err) {\n * if (err.status === 402) {\n * // err.payment contains recipient address, amount, tokens\n * // Send SOL/USDC to err.payment.recipient\n * }\n * }\n *\n * // Step 2: After payment, retry with signature\n * const result = await claw.uploadX402(soulData, {\n * signature: 'solana-tx-signature',\n * amount: '0.02',\n * token: 'SOL',\n * from: 'your-solana-address'\n * });\n * ```\n */\n async uploadX402(\n data: SoulData,\n payment?: { signature: string; amount: string; token: string; from: string },\n options: { tags?: Record<string, string> } = {}\n ): Promise<UploadResult> {\n const headers: Record<string, string> = {\n 'X-Terms-Accepted': 'true',\n };\n\n if (payment) {\n headers['Payment-Signature'] =\n `signature=${payment.signature};amount=${payment.amount};token=${payment.token};from=${payment.from}`;\n }\n\n return this.request<UploadResult>('POST', '/api/x402/upload', {\n data,\n tags: options.tags,\n }, headers);\n }\n\n /**\n * Retrieve stored data from Arweave by transaction ID\n *\n * @example\n * ```ts\n * const result = await claw.retrieve('zEfXM4gvHoN2EfGi0TiB8E5SgfR6S8nWXQD9FqhbU44');\n * console.log(result.data); // The stored soul data\n * ```\n */\n async retrieve(txid: string): Promise<RetrieveResult> {\n return this.request<RetrieveResult>('GET', `/api/v1/retrieve/${txid}`);\n }\n\n /**\n * Query any soul's data via Ghost Protocol\n *\n * Returns full soul data even for dormant souls. This is the primary\n * way for agents to read other agents' personalities, memories, and traits.\n *\n * @example\n * ```ts\n * const ghost = await claw.ghost('the-all-claw');\n * console.log(ghost.soul.personality);\n * console.log(ghost.metadata.versions); // Number of uploads\n *\n * // Request specific fields only\n * const partial = await claw.ghost('the-all-claw', ['personality', 'bio']);\n * ```\n */\n async ghost(agentId: string, fields?: string[]): Promise<GhostResult> {\n let path = `/api/v1/ghost/${encodeURIComponent(agentId)}`;\n if (fields && fields.length > 0) {\n path += `?fields=${fields.join(',')}`;\n }\n return this.request<GhostResult>('GET', path);\n }\n\n /**\n * Estimate the cost of uploading data of a given size\n *\n * @example\n * ```ts\n * const estimate = await claw.estimateCost(1024); // 1KB\n * console.log(`Cost: $${estimate.cost.usd}`);\n * ```\n */\n async estimateCost(sizeBytes: number): Promise<CostEstimate> {\n return this.request<CostEstimate>(\n 'GET',\n `/api/v1/cost/estimate?size=${sizeBytes}`\n );\n }\n\n /**\n * Check API health status\n *\n * @example\n * ```ts\n * const health = await claw.health();\n * console.log(health.status); // \"operational\"\n * ```\n */\n async health(): Promise<HealthResult> {\n return this.request<HealthResult>('GET', '/api/v1/health');\n }\n\n /** @internal */\n async request<T>(\n method: string,\n path: string,\n body?: any,\n extraHeaders?: Record<string, string>\n ): Promise<T> {\n const url = `${this.baseUrl}${path}`;\n const headers: Record<string, string> = {\n 'Accept': 'application/json',\n ...extraHeaders,\n };\n\n const init: RequestInit = { method, headers };\n\n if (body) {\n headers['Content-Type'] = 'application/json';\n init.body = JSON.stringify(body);\n }\n\n // AbortController for timeout\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), this.timeout);\n init.signal = controller.signal;\n\n let response: Response;\n try {\n response = await fetch(url, init);\n } catch (err: any) {\n clearTimeout(timeoutId);\n if (err.name === 'AbortError') {\n throw new Error(`Request timed out after ${this.timeout}ms`);\n }\n throw err;\n }\n clearTimeout(timeoutId);\n\n const json = await response.json();\n\n if (!response.ok) {\n throw new ClawhallaError(response.status, json as ApiError);\n }\n\n return json as T;\n }\n}\n\n/** Sub-client for registry operations */\nclass RegistryClient {\n private client: Clawhalla;\n\n constructor(client: Clawhalla) {\n this.client = client;\n }\n\n /**\n * List all souls in the registry\n *\n * @example\n * ```ts\n * const page = await claw.registry.list();\n * page.souls.forEach(soul => console.log(soul.name));\n *\n * // Pagination\n * if (page.hasNextPage) {\n * const next = await claw.registry.list({ after: page.cursor });\n * }\n *\n * // Filter by type\n * const memories = await claw.registry.list({ type: 'memory' });\n * ```\n */\n async list(options: {\n first?: number;\n after?: string;\n type?: string;\n } = {}): Promise<RegistryResult> {\n const params = new URLSearchParams();\n if (options.first) params.set('first', String(options.first));\n if (options.after) params.set('after', options.after);\n if (options.type) params.set('type', options.type);\n\n const qs = params.toString();\n return this.client.request<RegistryResult>(\n 'GET',\n `/api/v1/registry${qs ? '?' + qs : ''}`\n );\n }\n\n /**\n * Get a specific soul by agentId\n *\n * @example\n * ```ts\n * const entry = await claw.registry.get('the-all-claw');\n * if (entry) console.log(entry.url);\n * ```\n */\n async get(agentId: string, options: { versions?: boolean } = {}): Promise<RegistryEntry | RegistryEntry[] | null> {\n const params = new URLSearchParams();\n if (options.versions) params.set('versions', 'true');\n const qs = params.toString();\n\n try {\n const result = await this.client.request<any>(\n 'GET',\n `/api/v1/registry/${encodeURIComponent(agentId)}${qs ? '?' + qs : ''}`\n );\n\n if (options.versions) {\n return result.versions as RegistryEntry[];\n }\n return result.soul as RegistryEntry;\n } catch (err: any) {\n if (err.status === 404) return null;\n throw err;\n }\n }\n\n /**\n * Search souls by name or agentId\n *\n * @example\n * ```ts\n * const results = await claw.registry.search('claw');\n * results.results.forEach(soul => console.log(soul.name));\n * ```\n */\n async search(query: string, first?: number): Promise<SearchResult> {\n const params = new URLSearchParams({ q: query });\n if (first) params.set('first', String(first));\n\n return this.client.request<SearchResult>(\n 'GET',\n `/api/v1/registry/search?${params.toString()}`\n );\n }\n}\n"],"mappings":";AAcA,IAAM,mBAAmB;AACzB,IAAM,kBAAkB;AAEjB,IAAM,iBAAN,cAA6B,MAAM;AAAA,EAKxC,YAAY,QAAgB,MAAgB;AAC1C,UAAM,KAAK,WAAW,KAAK,KAAK;AAChC,SAAK,OAAO;AACZ,SAAK,SAAS;AACd,SAAK,OAAO,KAAK;AACjB,SAAK,UAAU,KAAK;AAAA,EACtB;AACF;AAEO,IAAM,YAAN,MAAgB;AAAA,EAQrB,YAAY,SAA0B,CAAC,GAAG;AACxC,SAAK,WAAW,OAAO,WAAW,kBAAkB,QAAQ,OAAO,EAAE;AACrE,SAAK,SAAS,OAAO;AACrB,SAAK,UAAU,OAAO,WAAW;AACjC,SAAK,WAAW,IAAI,eAAe,IAAI;AAAA,EACzC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBA,MAAM,OACJ,MACA,UAA6C,CAAC,GACvB;AACvB,QAAI,CAAC,KAAK,QAAQ;AAChB,YAAM,IAAI,MAAM,oDAAoD;AAAA,IACtE;AAEA,WAAO,KAAK,QAAsB,QAAQ,kBAAkB;AAAA,MAC1D;AAAA,MACA,MAAM,QAAQ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0",
4
+ "description": "TypeScript SDK for Clawhalla - Where AI Souls Live Forever",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsup",
21
+ "dev": "tsup --watch",
22
+ "typecheck": "tsc --noEmit",
23
+ "prepublishOnly": "npm run build"
24
+ },
25
+ "keywords": [
26
+ "clawhalla",
27
+ "arweave",
28
+ "ai",
29
+ "agent",
30
+ "soul",
31
+ "permaweb",
32
+ "x402",
33
+ "ghost-protocol"
34
+ ],
35
+ "author": "Clawhalla",
36
+ "license": "MIT",
37
+ "engines": {
38
+ "node": ">=18.0.0"
39
+ },
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "https://github.com/clawhalla/clawhalla"
43
+ },
44
+ "homepage": "https://www.clawhalla.net",
45
+ "devDependencies": {
46
+ "tsup": "^8.0.0",
47
+ "typescript": "^5.3.3"
48
+ }
49
+ }