@hashgraphonline/standards-sdk 0.1.141-canary.8 → 0.1.141-canary.9

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