@hashgraphonline/standards-sdk 0.1.138 → 0.1.139-feat-pong-agent.canary.a1ed1f6.37

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.
Files changed (74) hide show
  1. package/dist/cjs/hcs-21/base-client.d.ts +11 -9
  2. package/dist/cjs/hcs-21/base-client.d.ts.map +1 -1
  3. package/dist/cjs/hcs-21/browser.d.ts +3 -3
  4. package/dist/cjs/hcs-21/sdk.d.ts +5 -5
  5. package/dist/cjs/hcs-21/sdk.d.ts.map +1 -1
  6. package/dist/cjs/hcs-21/tx.d.ts +2 -2
  7. package/dist/cjs/hcs-21/tx.d.ts.map +1 -1
  8. package/dist/cjs/hcs-21/types.d.ts +50 -33
  9. package/dist/cjs/hcs-21/types.d.ts.map +1 -1
  10. package/dist/cjs/services/registry-broker/client.d.ts +4 -1
  11. package/dist/cjs/services/registry-broker/client.d.ts.map +1 -1
  12. package/dist/cjs/services/registry-broker/schemas.d.ts +1107 -222
  13. package/dist/cjs/services/registry-broker/schemas.d.ts.map +1 -1
  14. package/dist/cjs/services/registry-broker/types.d.ts +2 -1
  15. package/dist/cjs/services/registry-broker/types.d.ts.map +1 -1
  16. package/dist/cjs/standards-sdk.cjs +1 -1
  17. package/dist/cjs/standards-sdk.cjs.map +1 -1
  18. package/dist/es/hcs-21/base-client.d.ts +11 -9
  19. package/dist/es/hcs-21/base-client.d.ts.map +1 -1
  20. package/dist/es/hcs-21/browser.d.ts +3 -3
  21. package/dist/es/hcs-21/sdk.d.ts +5 -5
  22. package/dist/es/hcs-21/sdk.d.ts.map +1 -1
  23. package/dist/es/hcs-21/tx.d.ts +2 -2
  24. package/dist/es/hcs-21/tx.d.ts.map +1 -1
  25. package/dist/es/hcs-21/types.d.ts +50 -33
  26. package/dist/es/hcs-21/types.d.ts.map +1 -1
  27. package/dist/es/services/registry-broker/client.d.ts +4 -1
  28. package/dist/es/services/registry-broker/client.d.ts.map +1 -1
  29. package/dist/es/services/registry-broker/schemas.d.ts +1107 -222
  30. package/dist/es/services/registry-broker/schemas.d.ts.map +1 -1
  31. package/dist/es/services/registry-broker/types.d.ts +2 -1
  32. package/dist/es/services/registry-broker/types.d.ts.map +1 -1
  33. package/dist/es/standards-sdk.es.js +3 -2
  34. package/dist/es/standards-sdk.es109.js +1 -1
  35. package/dist/es/standards-sdk.es124.js +1 -1
  36. package/dist/es/standards-sdk.es125.js +1 -1
  37. package/dist/es/standards-sdk.es127.js +102 -14
  38. package/dist/es/standards-sdk.es127.js.map +1 -1
  39. package/dist/es/standards-sdk.es137.js +732 -56
  40. package/dist/es/standards-sdk.es137.js.map +1 -1
  41. package/dist/es/standards-sdk.es138.js +12254 -44
  42. package/dist/es/standards-sdk.es138.js.map +1 -1
  43. package/dist/es/standards-sdk.es139.js +17 -694
  44. package/dist/es/standards-sdk.es139.js.map +1 -1
  45. package/dist/es/standards-sdk.es140.js +54 -15
  46. package/dist/es/standards-sdk.es140.js.map +1 -1
  47. package/dist/es/standards-sdk.es141.js +45 -12255
  48. package/dist/es/standards-sdk.es141.js.map +1 -1
  49. package/dist/es/standards-sdk.es17.js +1 -1
  50. package/dist/es/standards-sdk.es19.js +2 -2
  51. package/dist/es/standards-sdk.es20.js +2 -2
  52. package/dist/es/standards-sdk.es28.js +2 -2
  53. package/dist/es/standards-sdk.es31.js +1 -1
  54. package/dist/es/standards-sdk.es32.js +1 -1
  55. package/dist/es/standards-sdk.es36.js +2 -2
  56. package/dist/es/standards-sdk.es37.js +1 -1
  57. package/dist/es/standards-sdk.es38.js +1 -1
  58. package/dist/es/standards-sdk.es57.js +1 -1
  59. package/dist/es/standards-sdk.es59.js +1 -1
  60. package/dist/es/standards-sdk.es60.js +1 -1
  61. package/dist/es/standards-sdk.es61.js +1 -1
  62. package/dist/es/standards-sdk.es63.js +1 -1
  63. package/dist/es/standards-sdk.es65.js +1 -1
  64. package/dist/es/standards-sdk.es66.js +1 -1
  65. package/dist/es/standards-sdk.es78.js +1 -1
  66. package/dist/es/standards-sdk.es80.js +22 -6
  67. package/dist/es/standards-sdk.es80.js.map +1 -1
  68. package/dist/es/standards-sdk.es82.js.map +1 -1
  69. package/dist/es/standards-sdk.es83.js +8 -6
  70. package/dist/es/standards-sdk.es83.js.map +1 -1
  71. package/dist/es/standards-sdk.es84.js +2 -2
  72. package/dist/es/standards-sdk.es84.js.map +1 -1
  73. package/dist/es/standards-sdk.es85.js.map +1 -1
  74. package/package.json +63 -60
@@ -1,59 +1,735 @@
1
- const ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
2
- const BASE = 58;
3
- function base58Encode(bytes) {
4
- if (bytes.length === 0) return "";
5
- let zeros = 0;
6
- while (zeros < bytes.length && bytes[zeros] === 0) zeros++;
7
- if (zeros === bytes.length) return "1".repeat(zeros);
8
- const digits = [0];
9
- for (let i = zeros; i < bytes.length; i++) {
10
- let carry = bytes[i];
11
- for (let j = 0; j < digits.length; j++) {
12
- const val = (digits[j] << 8) + carry;
13
- digits[j] = val % BASE;
14
- carry = val / BASE | 0;
15
- }
16
- while (carry > 0) {
17
- digits.push(carry % BASE);
18
- carry = carry / BASE | 0;
19
- }
20
- }
21
- let result = "";
22
- for (let i = 0; i < zeros; i++) result += "1";
23
- for (let i = digits.length - 1; i >= 0; i--) result += ALPHABET[digits[i]];
24
- return result;
25
- }
26
- function base58Decode(text) {
27
- if (text.length === 0) return new Uint8Array(0);
28
- let zeros = 0;
29
- while (zeros < text.length && text[zeros] === "1") zeros++;
30
- const b256 = [];
31
- for (let i = zeros; i < text.length; i++) {
32
- const ch = text[i];
33
- const val = ALPHABET.indexOf(ch);
34
- if (val === -1) throw new Error("Invalid Base58 character");
35
- let carry = val;
36
- for (let j = 0; j < b256.length; j++) {
37
- const x = b256[j] * BASE + carry;
38
- b256[j] = x & 255;
39
- carry = x >> 8;
40
- }
41
- while (carry > 0) {
42
- b256.push(carry & 255);
43
- carry >>= 8;
44
- }
45
- }
46
- for (let i = 0; i < zeros; i++) b256.push(0);
47
- b256.reverse();
48
- return Uint8Array.from(b256);
49
- }
50
- function multibaseB58btcDecode(zText) {
51
- if (!zText.startsWith("z")) throw new Error("Invalid multibase base58btc");
52
- return base58Decode(zText.slice(1));
53
- }
1
+ import { z } from "zod";
2
+ import { AIAgentCapability, AIAgentType } from "./standards-sdk.es29.js";
3
+ const capabilitySchema = z.nativeEnum(AIAgentCapability);
4
+ const capabilityValueSchema = z.union([capabilitySchema, z.string()]);
5
+ const jsonPrimitiveSchema = z.union([
6
+ z.string(),
7
+ z.number(),
8
+ z.boolean(),
9
+ z.null()
10
+ ]);
11
+ const jsonValueSchema = z.lazy(
12
+ () => z.union([
13
+ jsonPrimitiveSchema,
14
+ z.array(jsonValueSchema),
15
+ z.record(jsonValueSchema)
16
+ ])
17
+ );
18
+ const agentProfileSchema = z.object({
19
+ version: z.string(),
20
+ type: z.number(),
21
+ display_name: z.string(),
22
+ alias: z.string().optional(),
23
+ bio: z.string().optional(),
24
+ socials: z.array(jsonValueSchema).optional(),
25
+ aiAgent: z.object({
26
+ type: z.nativeEnum(AIAgentType),
27
+ creator: z.string().optional(),
28
+ model: z.string().optional(),
29
+ capabilities: z.array(capabilitySchema).optional()
30
+ }).optional(),
31
+ uaid: z.string().optional()
32
+ }).catchall(jsonValueSchema);
33
+ const cipherEnvelopeRecipientSchema = z.object({
34
+ uaid: z.string().optional(),
35
+ ledgerAccountId: z.string().optional(),
36
+ userId: z.string().optional(),
37
+ email: z.string().optional(),
38
+ encryptedShare: z.string()
39
+ });
40
+ const cipherEnvelopeSchema = z.object({
41
+ algorithm: z.string(),
42
+ ciphertext: z.string(),
43
+ nonce: z.string(),
44
+ associatedData: z.string().optional(),
45
+ keyLocator: z.object({
46
+ sessionId: z.string().optional(),
47
+ revision: z.number().optional()
48
+ }).optional(),
49
+ recipients: z.array(cipherEnvelopeRecipientSchema)
50
+ });
51
+ const peerSummarySchema = z.object({
52
+ keyType: z.string(),
53
+ publicKey: z.string(),
54
+ uaid: z.string().optional(),
55
+ ledgerAccountId: z.string().optional(),
56
+ userId: z.string().optional(),
57
+ email: z.string().optional()
58
+ });
59
+ const handshakeParticipantSchema = z.object({
60
+ role: z.enum(["requester", "responder"]),
61
+ uaid: z.string().optional(),
62
+ userId: z.string().optional(),
63
+ ledgerAccountId: z.string().optional(),
64
+ keyType: z.string(),
65
+ longTermPublicKey: z.string().optional(),
66
+ ephemeralPublicKey: z.string(),
67
+ signature: z.string().optional(),
68
+ metadata: z.record(jsonValueSchema).optional(),
69
+ submittedAt: z.string()
70
+ });
71
+ const encryptionHandshakeRecordSchema = z.object({
72
+ sessionId: z.string(),
73
+ algorithm: z.string(),
74
+ createdAt: z.string(),
75
+ expiresAt: z.number(),
76
+ status: z.enum(["pending", "complete"]),
77
+ requester: handshakeParticipantSchema.optional(),
78
+ responder: handshakeParticipantSchema.optional()
79
+ });
80
+ const sessionEncryptionSummarySchema = z.object({
81
+ enabled: z.boolean(),
82
+ algorithm: z.string(),
83
+ requireCiphertext: z.boolean(),
84
+ requester: peerSummarySchema.nullable().optional(),
85
+ responder: peerSummarySchema.nullable().optional(),
86
+ handshake: encryptionHandshakeRecordSchema.nullable().optional()
87
+ });
88
+ const chatHistoryEntrySchema = z.object({
89
+ messageId: z.string(),
90
+ role: z.enum(["user", "agent"]),
91
+ content: z.string(),
92
+ timestamp: z.string(),
93
+ cipherEnvelope: cipherEnvelopeSchema.optional(),
94
+ metadata: z.record(jsonValueSchema).optional()
95
+ });
96
+ const metadataFacetSchema = z.record(z.array(jsonValueSchema)).optional();
97
+ const searchHitSchema = z.object({
98
+ id: z.string(),
99
+ uaid: z.string(),
100
+ registry: z.string(),
101
+ name: z.string(),
102
+ description: z.string().optional(),
103
+ capabilities: z.array(capabilityValueSchema),
104
+ endpoints: z.union([z.record(jsonValueSchema), z.array(z.string())]).optional(),
105
+ metadata: z.record(jsonValueSchema).optional(),
106
+ metadataFacet: metadataFacetSchema,
107
+ profile: agentProfileSchema.optional(),
108
+ protocols: z.array(z.string()).optional(),
109
+ adapter: z.string().optional(),
110
+ originalId: z.string().optional(),
111
+ communicationSupported: z.boolean().optional(),
112
+ routingSupported: z.boolean().optional(),
113
+ available: z.boolean().optional(),
114
+ availabilityStatus: z.string().optional(),
115
+ availabilityCheckedAt: z.string().optional(),
116
+ availabilitySource: z.string().optional(),
117
+ availabilityLatencyMs: z.number().optional(),
118
+ availabilityScore: z.number().optional(),
119
+ capabilityLabels: z.array(z.string()).optional(),
120
+ capabilityTokens: z.array(z.string()).optional(),
121
+ image: z.string().optional(),
122
+ createdAt: z.string().optional(),
123
+ updatedAt: z.string().optional(),
124
+ lastSeen: z.string().optional(),
125
+ lastIndexed: z.string().optional()
126
+ }).passthrough();
127
+ const searchResponseSchema = z.object({
128
+ hits: z.array(searchHitSchema),
129
+ total: z.number(),
130
+ page: z.number(),
131
+ limit: z.number()
132
+ });
133
+ const statsResponseSchema = z.object({
134
+ totalAgents: z.number(),
135
+ registries: z.record(z.number()),
136
+ capabilities: z.record(z.number()),
137
+ lastUpdate: z.string(),
138
+ status: z.string()
139
+ });
140
+ const registriesResponseSchema = z.object({
141
+ registries: z.array(z.string())
142
+ });
143
+ const popularResponseSchema = z.object({
144
+ searches: z.array(z.string())
145
+ });
146
+ const resolveResponseSchema = z.object({
147
+ agent: searchHitSchema
148
+ });
149
+ const createSessionResponseSchema = z.object({
150
+ sessionId: z.string(),
151
+ uaid: z.string().nullable().optional(),
152
+ agent: z.object({
153
+ name: z.string(),
154
+ description: z.string().optional(),
155
+ capabilities: z.record(jsonValueSchema).nullable().optional(),
156
+ skills: z.array(z.string()).optional()
157
+ }),
158
+ history: z.array(chatHistoryEntrySchema),
159
+ historyTtlSeconds: z.number().nullable().optional(),
160
+ encryption: sessionEncryptionSummarySchema.nullable().optional()
161
+ });
162
+ const sendMessageResponseSchema = z.object({
163
+ sessionId: z.string(),
164
+ uaid: z.string().nullable().optional(),
165
+ message: z.string(),
166
+ timestamp: z.string(),
167
+ rawResponse: jsonValueSchema.optional(),
168
+ content: z.string().optional(),
169
+ history: z.array(chatHistoryEntrySchema).optional(),
170
+ historyTtlSeconds: z.number().nullable().optional(),
171
+ encrypted: z.boolean().optional()
172
+ });
173
+ const chatHistorySnapshotResponseSchema = z.object({
174
+ sessionId: z.string(),
175
+ history: z.array(chatHistoryEntrySchema),
176
+ historyTtlSeconds: z.number()
177
+ });
178
+ z.object({
179
+ preserveEntries: z.number().int().min(0).optional()
180
+ }).strict();
181
+ const chatHistoryCompactionResponseSchema = z.object({
182
+ sessionId: z.string(),
183
+ history: z.array(chatHistoryEntrySchema),
184
+ summaryEntry: chatHistoryEntrySchema,
185
+ preservedEntries: z.array(chatHistoryEntrySchema),
186
+ historyTtlSeconds: z.number(),
187
+ creditsDebited: z.number(),
188
+ metadata: z.record(jsonValueSchema).optional()
189
+ });
190
+ const sessionEncryptionStatusResponseSchema = z.object({
191
+ sessionId: z.string(),
192
+ encryption: sessionEncryptionSummarySchema.nullable()
193
+ });
194
+ const encryptionHandshakeResponseSchema = z.object({
195
+ sessionId: z.string(),
196
+ handshake: encryptionHandshakeRecordSchema
197
+ });
198
+ const registerEncryptionKeyResponseSchema = z.object({
199
+ id: z.string(),
200
+ keyType: z.string(),
201
+ publicKey: z.string(),
202
+ uaid: z.string().nullable(),
203
+ ledgerAccountId: z.string().nullable(),
204
+ ledgerNetwork: z.string().nullable().optional(),
205
+ userId: z.string().nullable().optional(),
206
+ email: z.string().nullable().optional(),
207
+ createdAt: z.string(),
208
+ updatedAt: z.string()
209
+ });
210
+ const ledgerChallengeResponseSchema = z.object({
211
+ challengeId: z.string(),
212
+ message: z.string(),
213
+ expiresAt: z.string()
214
+ });
215
+ const ledgerApiKeySummarySchema = z.object({
216
+ id: z.string(),
217
+ label: z.string().optional(),
218
+ prefix: z.string(),
219
+ lastFour: z.string(),
220
+ createdAt: z.string(),
221
+ lastUsedAt: z.string().nullable().optional(),
222
+ ownerType: z.literal("ledger"),
223
+ ledgerAccountId: z.string().optional(),
224
+ ledgerNetwork: z.string().optional(),
225
+ ledgerNetworkCanonical: z.string().optional()
226
+ });
227
+ const ledgerVerifyResponseSchema = z.object({
228
+ key: z.string(),
229
+ apiKey: ledgerApiKeySummarySchema,
230
+ accountId: z.string(),
231
+ network: z.string(),
232
+ networkCanonical: z.string().optional()
233
+ });
234
+ const protocolsResponseSchema = z.object({
235
+ protocols: z.array(z.string())
236
+ });
237
+ const detectProtocolResponseSchema = z.object({
238
+ protocol: z.string().nullable()
239
+ });
240
+ const registrySearchByNamespaceSchema = z.object({
241
+ hits: z.array(searchHitSchema),
242
+ total: z.number(),
243
+ page: z.number().optional(),
244
+ limit: z.number().optional()
245
+ });
246
+ const capabilityFilterValueSchema = z.union([z.string(), z.number()]);
247
+ const vectorSearchFilterSchema = z.object({
248
+ capabilities: z.array(capabilityFilterValueSchema).optional(),
249
+ type: z.enum(["ai-agents", "mcp-servers"]).optional(),
250
+ registry: z.string().optional(),
251
+ protocols: z.array(z.string()).optional(),
252
+ adapter: z.array(z.string()).optional()
253
+ }).strict();
254
+ z.object({
255
+ query: z.string(),
256
+ filter: vectorSearchFilterSchema.optional(),
257
+ limit: z.number().int().min(1).max(100).optional(),
258
+ offset: z.number().int().min(0).optional()
259
+ }).strict();
260
+ const vectorSearchHitSchema = z.object({
261
+ agent: searchHitSchema,
262
+ score: z.number().optional(),
263
+ highlights: z.record(z.array(z.string())).optional()
264
+ });
265
+ const vectorSearchResponseSchema = z.object({
266
+ hits: z.array(vectorSearchHitSchema),
267
+ total: z.number(),
268
+ took: z.number(),
269
+ totalAvailable: z.number().optional(),
270
+ visible: z.number().optional(),
271
+ limited: z.boolean().optional(),
272
+ credits_used: z.number().optional()
273
+ });
274
+ const vectorStatusSchema = z.object({
275
+ enabled: z.boolean(),
276
+ healthy: z.boolean(),
277
+ mode: z.enum(["disabled", "initializing", "healthy", "degraded", "error"]),
278
+ lastUpdated: z.string(),
279
+ details: z.record(z.any()).optional(),
280
+ lastError: z.object({
281
+ message: z.string(),
282
+ stack: z.string().optional(),
283
+ timestamp: z.string().optional()
284
+ }).optional()
285
+ });
286
+ const searchStatusResponseSchema = z.object({
287
+ storageMode: z.string(),
288
+ vectorStatus: vectorStatusSchema
289
+ });
290
+ const websocketStatsResponseSchema = z.object({
291
+ clients: z.number(),
292
+ stats: z.object({
293
+ totalClients: z.number().optional(),
294
+ clientsByRegistry: z.record(z.number()).optional(),
295
+ clientsByEventType: z.record(z.number()).optional()
296
+ }).passthrough()
297
+ });
298
+ const durationStatsSchema = z.object({
299
+ p50: z.number(),
300
+ p90: z.number(),
301
+ p95: z.number(),
302
+ p99: z.number()
303
+ });
304
+ const metricsSummaryResponseSchema = z.object({
305
+ http: z.object({
306
+ requestsTotal: z.number(),
307
+ activeConnections: z.number(),
308
+ requestDuration: durationStatsSchema
309
+ }),
310
+ search: z.object({
311
+ queriesTotal: z.number(),
312
+ queryDuration: durationStatsSchema
313
+ }),
314
+ indexing: z.object({ agentsTotal: z.number(), crawlErrors: z.number() }),
315
+ registration: z.object({
316
+ total: z.number(),
317
+ failures: z.number(),
318
+ duration: durationStatsSchema
319
+ }),
320
+ cache: z.object({
321
+ hits: z.number(),
322
+ misses: z.number(),
323
+ hitRate: z.number()
324
+ }),
325
+ websocket: z.object({ connections: z.number() })
326
+ });
327
+ const uaidValidationResponseSchema = z.object({
328
+ uaid: z.string(),
329
+ valid: z.boolean(),
330
+ formats: z.array(z.string())
331
+ });
332
+ const adapterConnectionSchema = z.object({
333
+ id: z.string(),
334
+ agentId: z.string(),
335
+ protocol: z.string(),
336
+ endpoint: z.string(),
337
+ status: z.enum(["connected", "disconnected", "error"]),
338
+ metadata: z.record(jsonPrimitiveSchema).optional(),
339
+ createdAt: z.string()
340
+ });
341
+ const uaidConnectionStatusSchema = z.object({
342
+ connected: z.boolean(),
343
+ connection: adapterConnectionSchema.optional(),
344
+ adapter: z.string().optional(),
345
+ agentId: z.string().optional()
346
+ });
347
+ const dashboardStatsResponseSchema = z.object({
348
+ operatorId: z.string().optional(),
349
+ adapters: z.array(
350
+ z.object({
351
+ name: z.string(),
352
+ version: z.string(),
353
+ status: z.string(),
354
+ agentCount: z.number(),
355
+ lastDiscovery: z.string(),
356
+ registryType: z.string(),
357
+ health: z.string()
358
+ })
359
+ ).optional(),
360
+ totalAgents: z.number().optional(),
361
+ elasticsearchDocumentCount: z.number().optional(),
362
+ agentsByAdapter: z.record(z.number()).optional(),
363
+ agentsByRegistry: z.record(z.number()).optional(),
364
+ systemInfo: z.object({
365
+ uptime: z.number().optional(),
366
+ version: z.string().optional(),
367
+ network: z.string().optional()
368
+ }).optional()
369
+ });
370
+ const registrationAgentSchema = z.object({
371
+ id: z.string(),
372
+ name: z.string(),
373
+ type: z.string(),
374
+ endpoint: z.string().optional(),
375
+ capabilities: z.array(capabilityValueSchema),
376
+ registry: z.string().optional(),
377
+ protocol: z.string().optional(),
378
+ profile: agentProfileSchema.optional(),
379
+ nativeId: z.string().optional(),
380
+ metadata: z.record(jsonValueSchema).optional()
381
+ });
382
+ const registrationProfileInfoSchema = z.object({
383
+ tId: z.string().nullable(),
384
+ sizeBytes: z.number().optional()
385
+ });
386
+ const profileRegistrySchema = z.object({
387
+ topicId: z.string().optional(),
388
+ sequenceNumber: z.number().optional(),
389
+ profileReference: z.string().optional(),
390
+ profileTopicId: z.string().optional()
391
+ }).passthrough().nullable().optional();
392
+ const additionalRegistryResultSchema = z.object({
393
+ registry: z.string(),
394
+ status: z.enum([
395
+ "created",
396
+ "duplicate",
397
+ "skipped",
398
+ "error",
399
+ "updated",
400
+ "pending"
401
+ ]),
402
+ agentId: z.string().nullable().optional(),
403
+ agentUri: z.string().nullable().optional(),
404
+ error: z.string().optional(),
405
+ metadata: z.record(jsonValueSchema).optional(),
406
+ registryKey: z.string().optional(),
407
+ networkId: z.string().optional(),
408
+ networkName: z.string().optional(),
409
+ chainId: z.number().optional(),
410
+ estimatedCredits: z.number().nullable().optional(),
411
+ gasEstimateCredits: z.number().nullable().optional(),
412
+ gasEstimateUsd: z.number().nullable().optional(),
413
+ gasPriceGwei: z.number().nullable().optional(),
414
+ gasLimit: z.number().nullable().optional(),
415
+ creditMode: z.enum(["fixed", "gas"]).nullable().optional(),
416
+ minCredits: z.number().nullable().optional(),
417
+ consumedCredits: z.number().nullable().optional(),
418
+ cost: z.object({
419
+ credits: z.number(),
420
+ usd: z.number(),
421
+ eth: z.number(),
422
+ gasUsedWei: z.string(),
423
+ effectiveGasPriceWei: z.string().nullable().optional(),
424
+ transactions: z.array(
425
+ z.object({
426
+ hash: z.string(),
427
+ gasUsedWei: z.string(),
428
+ effectiveGasPriceWei: z.string().nullable().optional(),
429
+ costWei: z.string()
430
+ })
431
+ ).optional()
432
+ }).optional()
433
+ });
434
+ const registrationCreditsSchema = z.object({
435
+ base: z.number(),
436
+ additional: z.number(),
437
+ total: z.number()
438
+ });
439
+ const hcs10RegistrySchema = z.object({
440
+ status: z.string(),
441
+ uaid: z.string().optional(),
442
+ transactionId: z.string().optional(),
443
+ consensusTimestamp: z.string().optional(),
444
+ registryTopicId: z.string().optional(),
445
+ topicSequenceNumber: z.number().optional(),
446
+ payloadHash: z.string().optional(),
447
+ profileReference: z.string().optional(),
448
+ tId: z.string().optional(),
449
+ profileSizeBytes: z.number().optional(),
450
+ error: z.string().optional()
451
+ }).passthrough();
452
+ const additionalRegistryNetworkSchema = z.object({
453
+ key: z.string(),
454
+ registryId: z.string().optional(),
455
+ networkId: z.string().optional(),
456
+ name: z.string().optional(),
457
+ chainId: z.number().optional(),
458
+ label: z.string().optional(),
459
+ estimatedCredits: z.number().nullable().optional(),
460
+ baseCredits: z.number().nullable().optional(),
461
+ gasPortionCredits: z.number().nullable().optional(),
462
+ gasPortionUsd: z.number().nullable().optional(),
463
+ gasEstimateCredits: z.number().nullable().optional(),
464
+ gasEstimateUsd: z.number().nullable().optional(),
465
+ gasPriceGwei: z.number().nullable().optional(),
466
+ gasLimit: z.number().nullable().optional(),
467
+ minCredits: z.number().nullable().optional(),
468
+ creditMode: z.string().nullable().optional()
469
+ }).passthrough();
470
+ const additionalRegistryDescriptorSchema = z.object({
471
+ id: z.string(),
472
+ label: z.string(),
473
+ networks: z.array(additionalRegistryNetworkSchema)
474
+ });
475
+ const additionalRegistryCatalogResponseSchema = z.object({
476
+ registries: z.array(additionalRegistryDescriptorSchema)
477
+ });
478
+ const registerAgentSuccessResponse = z.object({
479
+ success: z.literal(true),
480
+ status: z.enum(["created", "duplicate", "updated"]).optional(),
481
+ uaid: z.string(),
482
+ agentId: z.string(),
483
+ message: z.string().optional(),
484
+ registry: z.string().optional(),
485
+ attemptId: z.string().nullable().optional(),
486
+ agent: registrationAgentSchema,
487
+ openConvAI: z.object({
488
+ compatible: z.boolean(),
489
+ hcs11Profile: agentProfileSchema.optional(),
490
+ bridgeEndpoint: z.string().optional()
491
+ }).optional(),
492
+ profile: registrationProfileInfoSchema.optional(),
493
+ profileRegistry: profileRegistrySchema.nullable().optional(),
494
+ hcs10Registry: hcs10RegistrySchema.nullable().optional(),
495
+ credits: registrationCreditsSchema.optional(),
496
+ additionalRegistries: z.array(additionalRegistryResultSchema).optional(),
497
+ additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
498
+ additionalRegistryCostPerRegistry: z.number().optional()
499
+ });
500
+ const registerAgentPendingResponse = z.object({
501
+ success: z.literal(true),
502
+ status: z.literal("pending"),
503
+ message: z.string(),
504
+ uaid: z.string(),
505
+ agentId: z.string(),
506
+ registry: z.string().optional(),
507
+ attemptId: z.string().nullable(),
508
+ agent: registrationAgentSchema,
509
+ openConvAI: z.object({
510
+ compatible: z.boolean(),
511
+ hcs11Profile: agentProfileSchema.optional(),
512
+ bridgeEndpoint: z.string().optional()
513
+ }).optional(),
514
+ profile: registrationProfileInfoSchema.optional(),
515
+ profileRegistry: profileRegistrySchema.nullable().optional(),
516
+ hcs10Registry: hcs10RegistrySchema.nullable().optional(),
517
+ credits: registrationCreditsSchema,
518
+ additionalRegistries: z.array(additionalRegistryResultSchema),
519
+ additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
520
+ additionalRegistryCostPerRegistry: z.number().optional()
521
+ });
522
+ const registerAgentPartialResponse = z.object({
523
+ success: z.literal(false),
524
+ status: z.literal("partial"),
525
+ message: z.string(),
526
+ uaid: z.string(),
527
+ agentId: z.string(),
528
+ registry: z.string().optional(),
529
+ attemptId: z.string().nullable().optional(),
530
+ agent: registrationAgentSchema,
531
+ openConvAI: z.object({
532
+ compatible: z.boolean(),
533
+ hcs11Profile: agentProfileSchema.optional(),
534
+ bridgeEndpoint: z.string().optional()
535
+ }).optional(),
536
+ profile: registrationProfileInfoSchema.optional(),
537
+ profileRegistry: profileRegistrySchema.nullable().optional(),
538
+ hcs10Registry: hcs10RegistrySchema.nullable().optional(),
539
+ credits: registrationCreditsSchema.optional(),
540
+ additionalRegistries: z.array(additionalRegistryResultSchema).optional(),
541
+ additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
542
+ additionalRegistryCostPerRegistry: z.number().optional(),
543
+ errors: z.array(
544
+ z.object({
545
+ registry: z.string(),
546
+ registryKey: z.string().nullable().optional(),
547
+ error: z.string()
548
+ })
549
+ ).min(1)
550
+ });
551
+ const registerAgentResponseSchema = z.union([
552
+ registerAgentSuccessResponse,
553
+ registerAgentPendingResponse,
554
+ registerAgentPartialResponse
555
+ ]);
556
+ const registrationProgressAdditionalEntry = z.object({
557
+ registryId: z.string(),
558
+ registryKey: z.string(),
559
+ networkId: z.string().optional(),
560
+ networkName: z.string().optional(),
561
+ chainId: z.number().optional(),
562
+ label: z.string().optional(),
563
+ status: z.enum(["pending", "in_progress", "completed", "failed"]),
564
+ error: z.string().optional(),
565
+ credits: z.number().nullable().optional(),
566
+ agentId: z.string().nullable().optional(),
567
+ agentUri: z.string().nullable().optional(),
568
+ metadata: z.record(jsonValueSchema).optional(),
569
+ lastUpdated: z.string()
570
+ });
571
+ const registrationProgressRecord = z.object({
572
+ attemptId: z.string(),
573
+ mode: z.enum(["register", "update"]),
574
+ status: z.enum(["pending", "partial", "completed", "failed"]),
575
+ uaid: z.string().optional(),
576
+ agentId: z.string().optional(),
577
+ registryNamespace: z.string(),
578
+ accountId: z.string().optional(),
579
+ startedAt: z.string(),
580
+ completedAt: z.string().optional(),
581
+ primary: z.object({
582
+ status: z.enum(["pending", "completed", "failed"]),
583
+ finishedAt: z.string().optional(),
584
+ error: z.string().optional()
585
+ }),
586
+ additionalRegistries: z.record(
587
+ z.string(),
588
+ registrationProgressAdditionalEntry
589
+ ),
590
+ errors: z.array(z.string()).optional()
591
+ });
592
+ const registrationProgressResponseSchema = z.object({
593
+ progress: registrationProgressRecord
594
+ });
595
+ const registrationQuoteResponseSchema = z.object({
596
+ accountId: z.string().nullable().optional(),
597
+ registry: z.string().optional(),
598
+ protocol: z.string().optional(),
599
+ requiredCredits: z.number(),
600
+ availableCredits: z.number().nullable().optional(),
601
+ shortfallCredits: z.number().nullable().optional(),
602
+ creditsPerHbar: z.number().nullable().optional(),
603
+ estimatedHbar: z.number().nullable().optional()
604
+ });
605
+ const creditPurchaseResponseSchema = z.object({
606
+ success: z.boolean().optional(),
607
+ purchaser: z.string(),
608
+ credits: z.number(),
609
+ hbarAmount: z.number(),
610
+ transactionId: z.string(),
611
+ consensusTimestamp: z.string().nullable().optional()
612
+ });
613
+ const x402SettlementSchema = z.object({
614
+ success: z.boolean().optional(),
615
+ transaction: z.string().optional(),
616
+ network: z.string().optional(),
617
+ payer: z.string().optional(),
618
+ errorReason: z.string().optional()
619
+ }).strict();
620
+ const x402CreditPurchaseResponseSchema = z.object({
621
+ success: z.boolean(),
622
+ accountId: z.string(),
623
+ creditedCredits: z.number(),
624
+ usdAmount: z.number(),
625
+ balance: z.number(),
626
+ payment: z.object({
627
+ payer: z.string().optional(),
628
+ requirement: z.record(jsonValueSchema).optional(),
629
+ settlement: x402SettlementSchema.optional()
630
+ }).optional()
631
+ });
632
+ const x402MinimumsResponseSchema = z.object({
633
+ minimums: z.record(
634
+ z.object({
635
+ network: z.string().optional(),
636
+ gasLimit: z.number().optional(),
637
+ gasPriceWei: z.string().optional(),
638
+ gasUsd: z.number().optional(),
639
+ minUsd: z.number().optional(),
640
+ ethUsd: z.number().optional(),
641
+ fetchedAt: z.string().optional(),
642
+ source: z.string().optional()
643
+ })
644
+ ).optional(),
645
+ creditUnitUsd: z.number().optional()
646
+ });
647
+ const adaptersResponseSchema = z.object({
648
+ adapters: z.array(z.string())
649
+ });
650
+ const adapterChatProfileSchema = z.object({
651
+ supportsChat: z.boolean(),
652
+ delivery: z.string().optional(),
653
+ transport: z.string().optional(),
654
+ streaming: z.boolean().optional(),
655
+ requiresAuth: z.array(z.string()).optional(),
656
+ notes: z.string().optional()
657
+ });
658
+ const adapterCapabilitiesSchema = z.object({
659
+ discovery: z.boolean(),
660
+ routing: z.boolean(),
661
+ communication: z.boolean(),
662
+ translation: z.boolean(),
663
+ protocols: z.array(z.string())
664
+ });
665
+ const adapterDescriptorSchema = z.object({
666
+ id: z.string(),
667
+ name: z.string(),
668
+ version: z.string(),
669
+ author: z.string(),
670
+ description: z.string(),
671
+ supportedProtocols: z.array(z.string()),
672
+ registryType: z.enum(["web2", "web3", "hybrid"]),
673
+ chatProfile: adapterChatProfileSchema.optional(),
674
+ capabilities: adapterCapabilitiesSchema,
675
+ enabled: z.boolean(),
676
+ priority: z.number(),
677
+ status: z.enum(["running", "stopped"])
678
+ });
679
+ const adapterDetailsResponseSchema = z.object({
680
+ adapters: z.array(adapterDescriptorSchema)
681
+ });
682
+ const metadataFacetOptionSchema = z.object({
683
+ value: z.union([z.string(), z.number(), z.boolean()]),
684
+ label: z.string()
685
+ });
686
+ const searchFacetSchema = z.object({
687
+ key: z.string(),
688
+ label: z.string(),
689
+ description: z.string().optional(),
690
+ type: z.enum(["string", "boolean", "number"]),
691
+ adapters: z.array(z.string()).optional(),
692
+ options: z.array(metadataFacetOptionSchema).optional()
693
+ });
694
+ const searchFacetsResponseSchema = z.object({
695
+ facets: z.array(searchFacetSchema)
696
+ });
54
697
  export {
55
- base58Decode,
56
- base58Encode,
57
- multibaseB58btcDecode
698
+ adapterChatProfileSchema,
699
+ adapterDescriptorSchema,
700
+ adapterDetailsResponseSchema,
701
+ adaptersResponseSchema,
702
+ additionalRegistryCatalogResponseSchema,
703
+ chatHistoryCompactionResponseSchema,
704
+ chatHistorySnapshotResponseSchema,
705
+ createSessionResponseSchema,
706
+ creditPurchaseResponseSchema,
707
+ dashboardStatsResponseSchema,
708
+ detectProtocolResponseSchema,
709
+ encryptionHandshakeResponseSchema,
710
+ ledgerChallengeResponseSchema,
711
+ ledgerVerifyResponseSchema,
712
+ metricsSummaryResponseSchema,
713
+ popularResponseSchema,
714
+ protocolsResponseSchema,
715
+ registerAgentResponseSchema,
716
+ registerEncryptionKeyResponseSchema,
717
+ registrationProgressResponseSchema,
718
+ registrationQuoteResponseSchema,
719
+ registriesResponseSchema,
720
+ registrySearchByNamespaceSchema,
721
+ resolveResponseSchema,
722
+ searchFacetsResponseSchema,
723
+ searchResponseSchema,
724
+ searchStatusResponseSchema,
725
+ sendMessageResponseSchema,
726
+ sessionEncryptionStatusResponseSchema,
727
+ statsResponseSchema,
728
+ uaidConnectionStatusSchema,
729
+ uaidValidationResponseSchema,
730
+ vectorSearchResponseSchema,
731
+ websocketStatsResponseSchema,
732
+ x402CreditPurchaseResponseSchema,
733
+ x402MinimumsResponseSchema
58
734
  };
59
735
  //# sourceMappingURL=standards-sdk.es137.js.map