@hashgraphonline/standards-sdk 0.1.143-feat-solana-register.canary.74520ad.73 → 0.1.143-feat-solana-register.canary.16fb796.75

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 (55) hide show
  1. package/dist/cjs/services/registry-broker/client/base-client.d.ts.map +1 -1
  2. package/dist/cjs/standards-sdk.cjs +2 -2
  3. package/dist/cjs/standards-sdk.cjs.map +1 -1
  4. package/dist/es/services/registry-broker/client/base-client.d.ts.map +1 -1
  5. package/dist/es/standards-sdk.es110.js +1 -0
  6. package/dist/es/standards-sdk.es110.js.map +1 -1
  7. package/dist/es/standards-sdk.es125.js +1 -1
  8. package/dist/es/standards-sdk.es126.js +1 -1
  9. package/dist/es/standards-sdk.es128.js +2 -2
  10. package/dist/es/standards-sdk.es129.js +1 -1
  11. package/dist/es/standards-sdk.es130.js +1 -1
  12. package/dist/es/standards-sdk.es131.js +2 -2
  13. package/dist/es/standards-sdk.es132.js +1 -1
  14. package/dist/es/standards-sdk.es133.js +1 -1
  15. package/dist/es/standards-sdk.es134.js +1 -1
  16. package/dist/es/standards-sdk.es135.js +1 -1
  17. package/dist/es/standards-sdk.es136.js +1 -1
  18. package/dist/es/standards-sdk.es137.js +55 -0
  19. package/dist/es/standards-sdk.es137.js.map +1 -1
  20. package/dist/es/standards-sdk.es139.js +1 -1
  21. package/dist/es/standards-sdk.es150.js +12 -12284
  22. package/dist/es/standards-sdk.es150.js.map +1 -1
  23. package/dist/es/standards-sdk.es151.js +923 -56
  24. package/dist/es/standards-sdk.es151.js.map +1 -1
  25. package/dist/es/standards-sdk.es152.js +12264 -57
  26. package/dist/es/standards-sdk.es152.js.map +1 -1
  27. package/dist/es/standards-sdk.es159.js +54 -15
  28. package/dist/es/standards-sdk.es159.js.map +1 -1
  29. package/dist/es/standards-sdk.es160.js +82 -923
  30. package/dist/es/standards-sdk.es160.js.map +1 -1
  31. package/dist/es/standards-sdk.es17.js +1 -0
  32. package/dist/es/standards-sdk.es17.js.map +1 -1
  33. package/dist/es/standards-sdk.es19.js +2 -1
  34. package/dist/es/standards-sdk.es19.js.map +1 -1
  35. package/dist/es/standards-sdk.es20.js +2 -1
  36. package/dist/es/standards-sdk.es20.js.map +1 -1
  37. package/dist/es/standards-sdk.es28.js +2 -1
  38. package/dist/es/standards-sdk.es28.js.map +1 -1
  39. package/dist/es/standards-sdk.es31.js +1 -1
  40. package/dist/es/standards-sdk.es32.js +1 -1
  41. package/dist/es/standards-sdk.es36.js +2 -1
  42. package/dist/es/standards-sdk.es36.js.map +1 -1
  43. package/dist/es/standards-sdk.es37.js +1 -1
  44. package/dist/es/standards-sdk.es38.js +1 -1
  45. package/dist/es/standards-sdk.es57.js +1 -1
  46. package/dist/es/standards-sdk.es59.js +1 -1
  47. package/dist/es/standards-sdk.es60.js +1 -1
  48. package/dist/es/standards-sdk.es61.js +1 -0
  49. package/dist/es/standards-sdk.es61.js.map +1 -1
  50. package/dist/es/standards-sdk.es63.js +1 -1
  51. package/dist/es/standards-sdk.es65.js +1 -1
  52. package/dist/es/standards-sdk.es66.js +1 -1
  53. package/dist/es/standards-sdk.es78.js +1 -0
  54. package/dist/es/standards-sdk.es78.js.map +1 -1
  55. package/package.json +1 -1
@@ -1,926 +1,85 @@
1
- import { z } from "zod";
2
- import { adapterDeclarationSchema } from "./standards-sdk.es80.js";
3
- var AIAgentType = /* @__PURE__ */ ((AIAgentType2) => {
4
- AIAgentType2[AIAgentType2["MANUAL"] = 0] = "MANUAL";
5
- AIAgentType2[AIAgentType2["AUTONOMOUS"] = 1] = "AUTONOMOUS";
6
- return AIAgentType2;
7
- })(AIAgentType || {});
8
- var AIAgentCapability = /* @__PURE__ */ ((AIAgentCapability2) => {
9
- AIAgentCapability2[AIAgentCapability2["TEXT_GENERATION"] = 0] = "TEXT_GENERATION";
10
- AIAgentCapability2[AIAgentCapability2["IMAGE_GENERATION"] = 1] = "IMAGE_GENERATION";
11
- AIAgentCapability2[AIAgentCapability2["AUDIO_GENERATION"] = 2] = "AUDIO_GENERATION";
12
- AIAgentCapability2[AIAgentCapability2["VIDEO_GENERATION"] = 3] = "VIDEO_GENERATION";
13
- AIAgentCapability2[AIAgentCapability2["CODE_GENERATION"] = 4] = "CODE_GENERATION";
14
- AIAgentCapability2[AIAgentCapability2["LANGUAGE_TRANSLATION"] = 5] = "LANGUAGE_TRANSLATION";
15
- AIAgentCapability2[AIAgentCapability2["SUMMARIZATION_EXTRACTION"] = 6] = "SUMMARIZATION_EXTRACTION";
16
- AIAgentCapability2[AIAgentCapability2["KNOWLEDGE_RETRIEVAL"] = 7] = "KNOWLEDGE_RETRIEVAL";
17
- AIAgentCapability2[AIAgentCapability2["DATA_INTEGRATION"] = 8] = "DATA_INTEGRATION";
18
- AIAgentCapability2[AIAgentCapability2["MARKET_INTELLIGENCE"] = 9] = "MARKET_INTELLIGENCE";
19
- AIAgentCapability2[AIAgentCapability2["TRANSACTION_ANALYTICS"] = 10] = "TRANSACTION_ANALYTICS";
20
- AIAgentCapability2[AIAgentCapability2["SMART_CONTRACT_AUDIT"] = 11] = "SMART_CONTRACT_AUDIT";
21
- AIAgentCapability2[AIAgentCapability2["GOVERNANCE_FACILITATION"] = 12] = "GOVERNANCE_FACILITATION";
22
- AIAgentCapability2[AIAgentCapability2["SECURITY_MONITORING"] = 13] = "SECURITY_MONITORING";
23
- AIAgentCapability2[AIAgentCapability2["COMPLIANCE_ANALYSIS"] = 14] = "COMPLIANCE_ANALYSIS";
24
- AIAgentCapability2[AIAgentCapability2["FRAUD_DETECTION"] = 15] = "FRAUD_DETECTION";
25
- AIAgentCapability2[AIAgentCapability2["MULTI_AGENT_COORDINATION"] = 16] = "MULTI_AGENT_COORDINATION";
26
- AIAgentCapability2[AIAgentCapability2["API_INTEGRATION"] = 17] = "API_INTEGRATION";
27
- AIAgentCapability2[AIAgentCapability2["WORKFLOW_AUTOMATION"] = 18] = "WORKFLOW_AUTOMATION";
28
- return AIAgentCapability2;
29
- })(AIAgentCapability || {});
30
- const capabilitySchema = z.nativeEnum(AIAgentCapability);
31
- const capabilityValueSchema = z.union([capabilitySchema, z.string()]);
32
- const jsonPrimitiveSchema = z.union([
33
- z.string(),
34
- z.number(),
35
- z.boolean(),
36
- z.null()
37
- ]);
38
- const jsonValueSchema = z.lazy(
39
- () => z.union([
40
- jsonPrimitiveSchema,
41
- z.array(jsonValueSchema),
42
- z.record(jsonValueSchema)
43
- ])
44
- );
45
- const agentProfileSchema = z.object({
46
- version: z.string(),
47
- type: z.number(),
48
- display_name: z.string(),
49
- alias: z.string().optional(),
50
- bio: z.string().optional(),
51
- socials: z.array(jsonValueSchema).optional(),
52
- aiAgent: z.object({
53
- type: z.nativeEnum(AIAgentType),
54
- creator: z.string().optional(),
55
- model: z.string().optional(),
56
- capabilities: z.array(capabilitySchema).optional()
57
- }).optional(),
58
- uaid: z.string().optional()
59
- }).catchall(jsonValueSchema);
60
- const cipherEnvelopeRecipientSchema = z.object({
61
- uaid: z.string().optional(),
62
- ledgerAccountId: z.string().optional(),
63
- userId: z.string().optional(),
64
- email: z.string().optional(),
65
- encryptedShare: z.string()
66
- });
67
- const cipherEnvelopeSchema = z.object({
68
- algorithm: z.string(),
69
- ciphertext: z.string(),
70
- nonce: z.string(),
71
- associatedData: z.string().optional(),
72
- keyLocator: z.object({
73
- sessionId: z.string().optional(),
74
- revision: z.number().optional()
75
- }).optional(),
76
- recipients: z.array(cipherEnvelopeRecipientSchema)
77
- });
78
- const peerSummarySchema = z.object({
79
- keyType: z.string(),
80
- publicKey: z.string(),
81
- uaid: z.string().optional(),
82
- ledgerAccountId: z.string().optional(),
83
- userId: z.string().optional(),
84
- email: z.string().optional()
85
- });
86
- const handshakeParticipantSchema = z.object({
87
- role: z.enum(["requester", "responder"]),
88
- uaid: z.string().optional(),
89
- userId: z.string().optional(),
90
- ledgerAccountId: z.string().optional(),
91
- keyType: z.string(),
92
- longTermPublicKey: z.string().optional(),
93
- ephemeralPublicKey: z.string(),
94
- signature: z.string().optional(),
95
- metadata: z.record(jsonValueSchema).optional(),
96
- submittedAt: z.string()
97
- });
98
- const encryptionHandshakeRecordSchema = z.object({
99
- sessionId: z.string(),
100
- algorithm: z.string(),
101
- createdAt: z.string(),
102
- expiresAt: z.number(),
103
- status: z.enum(["pending", "complete"]),
104
- requester: handshakeParticipantSchema.optional(),
105
- responder: handshakeParticipantSchema.optional()
106
- });
107
- const sessionEncryptionSummarySchema = z.object({
108
- enabled: z.boolean(),
109
- algorithm: z.string(),
110
- requireCiphertext: z.boolean(),
111
- requester: peerSummarySchema.nullable().optional(),
112
- responder: peerSummarySchema.nullable().optional(),
113
- handshake: encryptionHandshakeRecordSchema.nullable().optional()
114
- });
115
- const chatHistoryEntrySchema = z.object({
116
- messageId: z.string(),
117
- role: z.enum(["user", "agent"]),
118
- content: z.string(),
119
- timestamp: z.string(),
120
- cipherEnvelope: cipherEnvelopeSchema.optional(),
121
- metadata: z.record(jsonValueSchema).optional()
122
- });
123
- const metadataFacetSchema = z.record(
124
- z.union([
125
- z.array(jsonValueSchema),
126
- z.record(jsonValueSchema),
127
- jsonValueSchema
128
- ])
129
- ).optional();
130
- const searchHitSchema = z.object({
131
- id: z.string(),
132
- uaid: z.string(),
133
- registry: z.string(),
134
- name: z.string(),
135
- description: z.string().optional(),
136
- capabilities: z.array(capabilityValueSchema),
137
- endpoints: z.union([z.record(jsonValueSchema), z.array(z.string())]).optional(),
138
- metadata: z.record(jsonValueSchema).optional(),
139
- metadataFacet: metadataFacetSchema,
140
- profile: agentProfileSchema.optional(),
141
- protocols: z.array(z.string()).optional(),
142
- adapter: z.string().optional(),
143
- originalId: z.string().optional(),
144
- communicationSupported: z.boolean().optional(),
145
- routingSupported: z.boolean().optional(),
146
- available: z.boolean().optional(),
147
- availabilityStatus: z.string().optional(),
148
- availabilityCheckedAt: z.string().optional(),
149
- availabilitySource: z.string().optional(),
150
- availabilityLatencyMs: z.number().optional(),
151
- availabilityScore: z.number().optional(),
152
- capabilityLabels: z.array(z.string()).optional(),
153
- capabilityTokens: z.array(z.string()).optional(),
154
- image: z.string().optional(),
155
- createdAt: z.string().optional(),
156
- updatedAt: z.string().optional(),
157
- lastSeen: z.string().optional(),
158
- lastIndexed: z.string().optional()
159
- }).passthrough();
160
- const searchResponseSchema = z.object({
161
- hits: z.array(searchHitSchema),
162
- total: z.number(),
163
- page: z.number(),
164
- limit: z.number()
165
- });
166
- const statsResponseSchema = z.object({
167
- totalAgents: z.number(),
168
- registries: z.record(z.number()),
169
- capabilities: z.record(z.number()),
170
- lastUpdate: z.string(),
171
- status: z.string()
172
- });
173
- const registriesResponseSchema = z.object({
174
- registries: z.array(z.string())
175
- });
176
- const popularResponseSchema = z.object({
177
- searches: z.array(z.string())
178
- });
179
- const resolveResponseSchema = z.object({
180
- agent: searchHitSchema
181
- });
182
- const agentFeedbackSummarySchema = z.object({
183
- averageScore: z.number(),
184
- totalFeedbacks: z.number(),
185
- registry: z.string().optional(),
186
- network: z.string().optional(),
187
- updatedAt: z.string().optional()
188
- });
189
- const agentFeedbackEntrySchema = z.object({
190
- registry: z.string(),
191
- network: z.string().optional(),
192
- agentId: z.number(),
193
- client: z.string(),
194
- score: z.number(),
195
- tag1: z.string().nullable().optional(),
196
- tag2: z.string().nullable().optional(),
197
- revoked: z.boolean(),
198
- feedbackIndex: z.number().nullable().optional(),
199
- fileUri: z.string().nullable().optional(),
200
- fileHash: z.string().nullable().optional(),
201
- createdAt: z.string().nullable().optional()
202
- });
203
- const agentFeedbackResponseSchema = z.object({
204
- uaid: z.string(),
205
- summary: agentFeedbackSummarySchema,
206
- entries: z.array(agentFeedbackEntrySchema)
207
- });
208
- const agentFeedbackEligibilityResponseSchema = z.object({
209
- uaid: z.string(),
210
- sessionId: z.string(),
211
- eligible: z.boolean(),
212
- messageCount: z.number(),
213
- minimumMessages: z.number(),
214
- reason: z.string().optional()
215
- });
216
- const agentFeedbackSubmissionResponseSchema = z.object({
217
- uaid: z.string(),
218
- registry: z.string(),
219
- network: z.string().optional(),
220
- agentId: z.number(),
221
- score: z.number(),
222
- tag1: z.string().nullable().optional(),
223
- tag2: z.string().nullable().optional(),
224
- fileUri: z.string().nullable().optional(),
225
- fileHash: z.string().nullable().optional(),
226
- feedbackIndex: z.number().nullable().optional(),
227
- transactionHash: z.string().nullable().optional(),
228
- signature: z.string().nullable().optional(),
229
- submittedAt: z.string()
230
- });
231
- const createSessionResponseSchema = z.object({
232
- sessionId: z.string(),
233
- uaid: z.string().nullable().optional(),
234
- agent: z.object({
235
- name: z.string(),
236
- description: z.string().optional(),
237
- capabilities: z.record(jsonValueSchema).nullable().optional(),
238
- skills: z.array(z.string()).optional()
239
- }),
240
- history: z.array(chatHistoryEntrySchema).optional().default([]),
241
- historyTtlSeconds: z.number().nullable().optional(),
242
- encryption: sessionEncryptionSummarySchema.nullable().optional()
243
- });
244
- const sendMessageResponseSchema = z.object({
245
- sessionId: z.string(),
246
- uaid: z.string().nullable().optional(),
247
- message: z.string(),
248
- timestamp: z.string(),
249
- rawResponse: jsonValueSchema.optional(),
250
- content: z.string().optional(),
251
- history: z.array(chatHistoryEntrySchema).optional(),
252
- historyTtlSeconds: z.number().nullable().optional(),
253
- encrypted: z.boolean().optional()
254
- });
255
- const chatHistorySnapshotResponseSchema = z.object({
256
- sessionId: z.string(),
257
- history: z.array(chatHistoryEntrySchema),
258
- historyTtlSeconds: z.number()
259
- });
260
- z.object({
261
- preserveEntries: z.number().int().min(0).optional()
262
- }).strict();
263
- const chatHistoryCompactionResponseSchema = z.object({
264
- sessionId: z.string(),
265
- history: z.array(chatHistoryEntrySchema),
266
- summaryEntry: chatHistoryEntrySchema,
267
- preservedEntries: z.array(chatHistoryEntrySchema),
268
- historyTtlSeconds: z.number(),
269
- creditsDebited: z.number(),
270
- metadata: z.record(jsonValueSchema).optional()
271
- });
272
- const sessionEncryptionStatusResponseSchema = z.object({
273
- sessionId: z.string(),
274
- encryption: sessionEncryptionSummarySchema.nullable()
275
- });
276
- const encryptionHandshakeResponseSchema = z.object({
277
- sessionId: z.string(),
278
- handshake: encryptionHandshakeRecordSchema
279
- });
280
- const registerEncryptionKeyResponseSchema = z.object({
281
- id: z.string(),
282
- keyType: z.string(),
283
- publicKey: z.string(),
284
- uaid: z.string().nullable(),
285
- ledgerAccountId: z.string().nullable(),
286
- ledgerNetwork: z.string().nullable().optional(),
287
- userId: z.string().nullable().optional(),
288
- email: z.string().nullable().optional(),
289
- createdAt: z.string(),
290
- updatedAt: z.string()
291
- });
292
- const ledgerChallengeResponseSchema = z.object({
293
- challengeId: z.string(),
294
- message: z.string(),
295
- expiresAt: z.string()
296
- });
297
- const ledgerApiKeySummarySchema = z.object({
298
- id: z.string(),
299
- label: z.string().optional(),
300
- prefix: z.string(),
301
- lastFour: z.string(),
302
- createdAt: z.string(),
303
- lastUsedAt: z.string().nullable().optional(),
304
- ownerType: z.literal("ledger"),
305
- ledgerAccountId: z.string().optional(),
306
- ledgerNetwork: z.string().optional(),
307
- ledgerNetworkCanonical: z.string().optional()
308
- });
309
- const ledgerVerifyResponseSchema = z.object({
310
- key: z.string(),
311
- apiKey: ledgerApiKeySummarySchema,
312
- accountId: z.string(),
313
- network: z.string(),
314
- networkCanonical: z.string().optional()
315
- });
316
- const protocolsResponseSchema = z.object({
317
- protocols: z.array(z.string())
318
- });
319
- const detectProtocolResponseSchema = z.object({
320
- protocol: z.string().nullable()
321
- });
322
- const registrySearchByNamespaceSchema = z.object({
323
- hits: z.array(searchHitSchema),
324
- total: z.number(),
325
- page: z.number().optional(),
326
- limit: z.number().optional()
327
- });
328
- const capabilityFilterValueSchema = z.union([z.string(), z.number()]);
329
- const vectorSearchFilterSchema = z.object({
330
- capabilities: z.array(capabilityFilterValueSchema).optional(),
331
- type: z.enum(["ai-agents", "mcp-servers"]).optional(),
332
- registry: z.string().optional(),
333
- protocols: z.array(z.string()).optional(),
334
- adapter: z.array(z.string()).optional()
335
- }).strict();
336
- z.object({
337
- query: z.string(),
338
- filter: vectorSearchFilterSchema.optional(),
339
- limit: z.number().int().min(1).max(100).optional(),
340
- offset: z.number().int().min(0).optional()
341
- }).strict();
342
- const vectorSearchHitSchema = z.object({
343
- agent: searchHitSchema,
344
- score: z.number().optional(),
345
- highlights: z.record(z.array(z.string())).optional()
346
- });
347
- const vectorSearchResponseSchema = z.object({
348
- hits: z.array(vectorSearchHitSchema),
349
- total: z.number(),
350
- took: z.number(),
351
- totalAvailable: z.number().optional(),
352
- visible: z.number().optional(),
353
- limited: z.boolean().optional(),
354
- credits_used: z.number().optional()
355
- });
356
- const vectorStatusSchema = z.object({
357
- enabled: z.boolean(),
358
- healthy: z.boolean(),
359
- mode: z.enum(["disabled", "initializing", "healthy", "degraded", "error"]),
360
- lastUpdated: z.string(),
361
- details: z.record(z.any()).optional(),
362
- lastError: z.object({
363
- message: z.string(),
364
- stack: z.string().optional(),
365
- timestamp: z.string().optional()
366
- }).optional()
367
- });
368
- const searchStatusResponseSchema = z.object({
369
- storageMode: z.string(),
370
- vectorStatus: vectorStatusSchema
371
- });
372
- const websocketStatsResponseSchema = z.object({
373
- clients: z.number(),
374
- stats: z.object({
375
- totalClients: z.number().optional(),
376
- clientsByRegistry: z.record(z.number()).optional(),
377
- clientsByEventType: z.record(z.number()).optional()
378
- }).passthrough()
379
- });
380
- const durationStatsSchema = z.object({
381
- p50: z.number(),
382
- p90: z.number(),
383
- p95: z.number(),
384
- p99: z.number()
385
- });
386
- const metricsSummaryResponseSchema = z.object({
387
- http: z.object({
388
- requestsTotal: z.number(),
389
- activeConnections: z.number(),
390
- requestDuration: durationStatsSchema
391
- }),
392
- search: z.object({
393
- queriesTotal: z.number(),
394
- queryDuration: durationStatsSchema
395
- }),
396
- indexing: z.object({ agentsTotal: z.number(), crawlErrors: z.number() }),
397
- registration: z.object({
398
- total: z.number(),
399
- failures: z.number(),
400
- duration: durationStatsSchema
401
- }),
402
- cache: z.object({
403
- hits: z.number(),
404
- misses: z.number(),
405
- hitRate: z.number()
406
- }),
407
- websocket: z.object({ connections: z.number() })
408
- });
409
- const uaidValidationResponseSchema = z.object({
410
- uaid: z.string(),
411
- valid: z.boolean(),
412
- formats: z.array(z.string())
413
- });
414
- const adapterConnectionSchema = z.object({
415
- id: z.string(),
416
- agentId: z.string(),
417
- protocol: z.string(),
418
- endpoint: z.string(),
419
- status: z.enum(["connected", "disconnected", "error"]),
420
- metadata: z.record(jsonPrimitiveSchema).optional(),
421
- createdAt: z.string()
422
- });
423
- const uaidConnectionStatusSchema = z.object({
424
- connected: z.boolean(),
425
- connection: adapterConnectionSchema.optional(),
426
- adapter: z.string().optional(),
427
- agentId: z.string().optional()
428
- });
429
- const dashboardStatsResponseSchema = z.object({
430
- operatorId: z.string().optional(),
431
- adapters: z.array(
432
- z.object({
433
- name: z.string(),
434
- version: z.string(),
435
- status: z.string(),
436
- agentCount: z.number(),
437
- lastDiscovery: z.string(),
438
- registryType: z.string(),
439
- health: z.string()
440
- })
441
- ).optional(),
442
- totalAgents: z.number().optional(),
443
- elasticsearchDocumentCount: z.number().optional(),
444
- agentsByAdapter: z.record(z.number()).optional(),
445
- agentsByRegistry: z.record(z.number()).optional(),
446
- systemInfo: z.object({
447
- uptime: z.number().optional(),
448
- version: z.string().optional(),
449
- network: z.string().optional()
450
- }).optional()
451
- });
452
- const registrationAgentSchema = z.object({
453
- id: z.string(),
454
- name: z.string(),
455
- type: z.string(),
456
- endpoint: z.string().optional(),
457
- capabilities: z.array(capabilityValueSchema),
458
- registry: z.string().optional(),
459
- protocol: z.string().optional(),
460
- profile: agentProfileSchema.optional(),
461
- nativeId: z.string().optional(),
462
- metadata: z.record(jsonValueSchema).optional()
463
- });
464
- const registrationProfileInfoSchema = z.object({
465
- tId: z.string().nullable(),
466
- sizeBytes: z.number().optional()
467
- });
468
- const profileRegistrySchema = z.object({
469
- topicId: z.string().optional(),
470
- sequenceNumber: z.number().optional(),
471
- profileReference: z.string().optional(),
472
- profileTopicId: z.string().optional()
473
- }).passthrough().nullable().optional();
474
- const additionalRegistryResultSchema = z.object({
475
- registry: z.string(),
476
- status: z.enum([
477
- "created",
478
- "duplicate",
479
- "skipped",
480
- "error",
481
- "updated",
482
- "pending"
483
- ]),
484
- agentId: z.string().nullable().optional(),
485
- agentUri: z.string().nullable().optional(),
486
- error: z.string().optional(),
487
- metadata: z.record(jsonValueSchema).optional(),
488
- registryKey: z.string().optional(),
489
- networkId: z.string().optional(),
490
- networkName: z.string().optional(),
491
- chainId: z.number().optional(),
492
- estimatedCredits: z.number().nullable().optional(),
493
- gasEstimateCredits: z.number().nullable().optional(),
494
- gasEstimateUsd: z.number().nullable().optional(),
495
- gasPriceGwei: z.number().nullable().optional(),
496
- gasLimit: z.number().nullable().optional(),
497
- creditMode: z.enum(["fixed", "gas"]).nullable().optional(),
498
- minCredits: z.number().nullable().optional(),
499
- consumedCredits: z.number().nullable().optional(),
500
- cost: z.object({
501
- credits: z.number(),
502
- usd: z.number(),
503
- eth: z.number(),
504
- gasUsedWei: z.string(),
505
- effectiveGasPriceWei: z.string().nullable().optional(),
506
- transactions: z.array(
507
- z.object({
508
- hash: z.string(),
509
- gasUsedWei: z.string(),
510
- effectiveGasPriceWei: z.string().nullable().optional(),
511
- costWei: z.string()
512
- })
513
- ).optional()
514
- }).optional()
515
- });
516
- const registrationCreditsSchema = z.object({
517
- base: z.number(),
518
- additional: z.number(),
519
- total: z.number()
520
- });
521
- const hcs10RegistrySchema = z.object({
522
- status: z.string(),
523
- uaid: z.string().optional(),
524
- transactionId: z.string().optional(),
525
- consensusTimestamp: z.string().optional(),
526
- registryTopicId: z.string().optional(),
527
- topicSequenceNumber: z.number().optional(),
528
- payloadHash: z.string().optional(),
529
- profileReference: z.string().optional(),
530
- tId: z.string().optional(),
531
- profileSizeBytes: z.number().optional(),
532
- error: z.string().optional()
533
- }).passthrough();
534
- const additionalRegistryNetworkSchema = z.object({
535
- key: z.string(),
536
- registryId: z.string().optional(),
537
- networkId: z.string().optional(),
538
- name: z.string().optional(),
539
- chainId: z.number().optional(),
540
- label: z.string().optional(),
541
- estimatedCredits: z.number().nullable().optional(),
542
- baseCredits: z.number().nullable().optional(),
543
- gasPortionCredits: z.number().nullable().optional(),
544
- gasPortionUsd: z.number().nullable().optional(),
545
- gasEstimateCredits: z.number().nullable().optional(),
546
- gasEstimateUsd: z.number().nullable().optional(),
547
- gasPriceGwei: z.number().nullable().optional(),
548
- gasLimit: z.number().nullable().optional(),
549
- minCredits: z.number().nullable().optional(),
550
- creditMode: z.string().nullable().optional()
551
- }).passthrough();
552
- const additionalRegistryDescriptorSchema = z.object({
553
- id: z.string(),
554
- label: z.string(),
555
- networks: z.array(additionalRegistryNetworkSchema)
556
- });
557
- const additionalRegistryCatalogResponseSchema = z.object({
558
- registries: z.array(additionalRegistryDescriptorSchema)
559
- });
560
- const registerAgentSuccessResponse = z.object({
561
- success: z.literal(true),
562
- status: z.enum(["created", "duplicate", "updated"]).optional(),
563
- uaid: z.string(),
564
- agentId: z.string(),
565
- message: z.string().optional(),
566
- registry: z.string().optional(),
567
- attemptId: z.string().nullable().optional(),
568
- agent: registrationAgentSchema,
569
- openConvAI: z.object({
570
- compatible: z.boolean(),
571
- hcs11Profile: agentProfileSchema.optional(),
572
- bridgeEndpoint: z.string().optional()
573
- }).optional(),
574
- profile: registrationProfileInfoSchema.optional(),
575
- profileRegistry: profileRegistrySchema.nullable().optional(),
576
- hcs10Registry: hcs10RegistrySchema.nullable().optional(),
577
- credits: registrationCreditsSchema.optional(),
578
- additionalRegistries: z.array(additionalRegistryResultSchema).optional(),
579
- additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
580
- additionalRegistryCostPerRegistry: z.number().optional()
581
- });
582
- const registerAgentPendingResponse = z.object({
583
- success: z.literal(true),
584
- status: z.literal("pending"),
585
- message: z.string(),
586
- uaid: z.string(),
587
- agentId: z.string(),
588
- registry: z.string().optional(),
589
- attemptId: z.string().nullable(),
590
- agent: registrationAgentSchema,
591
- openConvAI: z.object({
592
- compatible: z.boolean(),
593
- hcs11Profile: agentProfileSchema.optional(),
594
- bridgeEndpoint: z.string().optional()
595
- }).optional(),
596
- profile: registrationProfileInfoSchema.optional(),
597
- profileRegistry: profileRegistrySchema.nullable().optional(),
598
- hcs10Registry: hcs10RegistrySchema.nullable().optional(),
599
- credits: registrationCreditsSchema,
600
- additionalRegistries: z.array(additionalRegistryResultSchema),
601
- additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
602
- additionalRegistryCostPerRegistry: z.number().optional()
603
- });
604
- const registerAgentPartialResponse = z.object({
605
- success: z.literal(false),
606
- status: z.literal("partial"),
607
- message: z.string(),
608
- uaid: z.string(),
609
- agentId: z.string(),
610
- registry: z.string().optional(),
611
- attemptId: z.string().nullable().optional(),
612
- agent: registrationAgentSchema,
613
- openConvAI: z.object({
614
- compatible: z.boolean(),
615
- hcs11Profile: agentProfileSchema.optional(),
616
- bridgeEndpoint: z.string().optional()
617
- }).optional(),
618
- profile: registrationProfileInfoSchema.optional(),
619
- profileRegistry: profileRegistrySchema.nullable().optional(),
620
- hcs10Registry: hcs10RegistrySchema.nullable().optional(),
621
- credits: registrationCreditsSchema.optional(),
622
- additionalRegistries: z.array(additionalRegistryResultSchema).optional(),
623
- additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
624
- additionalRegistryCostPerRegistry: z.number().optional(),
625
- errors: z.array(
626
- z.object({
627
- registry: z.string(),
628
- registryKey: z.string().nullable().optional(),
629
- error: z.string()
630
- })
631
- ).min(1)
632
- });
633
- const registerAgentResponseSchema = z.union([
634
- registerAgentSuccessResponse,
635
- registerAgentPendingResponse,
636
- registerAgentPartialResponse
637
- ]);
638
- const registrationProgressAdditionalEntry = z.object({
639
- registryId: z.string(),
640
- registryKey: z.string(),
641
- networkId: z.string().optional(),
642
- networkName: z.string().optional(),
643
- chainId: z.number().optional(),
644
- label: z.string().optional(),
645
- status: z.enum(["pending", "in_progress", "completed", "failed"]),
646
- error: z.string().optional(),
647
- credits: z.number().nullable().optional(),
648
- agentId: z.string().nullable().optional(),
649
- agentUri: z.string().nullable().optional(),
650
- metadata: z.record(jsonValueSchema).optional(),
651
- lastUpdated: z.string()
652
- });
653
- const registrationProgressRecord = z.object({
654
- attemptId: z.string(),
655
- mode: z.enum(["register", "update"]),
656
- status: z.enum(["pending", "partial", "completed", "failed"]),
657
- uaid: z.string().optional(),
658
- agentId: z.string().optional(),
659
- registryNamespace: z.string(),
660
- accountId: z.string().optional(),
661
- startedAt: z.string(),
662
- completedAt: z.string().optional(),
663
- primary: z.object({
664
- status: z.enum(["pending", "completed", "failed"]),
665
- finishedAt: z.string().optional(),
666
- error: z.string().optional()
667
- }),
668
- additionalRegistries: z.record(
669
- z.string(),
670
- registrationProgressAdditionalEntry
671
- ),
672
- errors: z.array(z.string()).optional()
673
- });
674
- const registrationProgressResponseSchema = z.object({
675
- progress: registrationProgressRecord
676
- });
677
- const registrationQuoteResponseSchema = z.object({
678
- accountId: z.string().nullable().optional(),
679
- registry: z.string().optional(),
680
- protocol: z.string().optional(),
681
- requiredCredits: z.number(),
682
- availableCredits: z.number().nullable().optional(),
683
- shortfallCredits: z.number().nullable().optional(),
684
- creditsPerHbar: z.number().nullable().optional(),
685
- estimatedHbar: z.number().nullable().optional()
686
- });
687
- const creditPurchaseResponseSchema = z.object({
688
- success: z.boolean().optional(),
689
- purchaser: z.string(),
690
- credits: z.number(),
691
- hbarAmount: z.number(),
692
- transactionId: z.string(),
693
- consensusTimestamp: z.string().nullable().optional()
694
- });
695
- const x402SettlementSchema = z.object({
696
- success: z.boolean().optional(),
697
- transaction: z.string().optional(),
698
- network: z.string().optional(),
699
- payer: z.string().optional(),
700
- errorReason: z.string().optional()
701
- }).strict();
702
- const x402CreditPurchaseResponseSchema = z.object({
703
- success: z.boolean(),
704
- accountId: z.string(),
705
- creditedCredits: z.number(),
706
- usdAmount: z.number(),
707
- balance: z.number(),
708
- payment: z.object({
709
- payer: z.string().optional(),
710
- requirement: z.record(jsonValueSchema).optional(),
711
- settlement: x402SettlementSchema.optional()
712
- }).optional()
713
- });
714
- const x402MinimumsResponseSchema = z.object({
715
- minimums: z.record(
716
- z.object({
717
- network: z.string().optional(),
718
- gasLimit: z.number().optional(),
719
- gasPriceWei: z.string().optional(),
720
- gasUsd: z.number().optional(),
721
- minUsd: z.number().optional(),
722
- ethUsd: z.number().optional(),
723
- fetchedAt: z.string().optional(),
724
- source: z.string().optional()
725
- })
726
- ).optional(),
727
- creditUnitUsd: z.number().optional()
728
- });
729
- const adaptersResponseSchema = z.object({
730
- adapters: z.array(z.string())
731
- });
732
- const adapterRegistryCategorySchema = z.object({
733
- id: z.number().int(),
734
- network: z.string(),
735
- type: z.string(),
736
- slug: z.string(),
737
- name: z.string(),
738
- description: z.string().nullable().optional(),
739
- topicId: z.string(),
740
- versionTopicId: z.string(),
741
- registryTransactionId: z.string().nullable().optional(),
742
- versionTransactionId: z.string().nullable().optional(),
743
- metadataPointer: z.string().nullable().optional(),
744
- metadataSequence: z.number().int().nullable().optional(),
745
- createdAt: z.string(),
746
- updatedAt: z.string(),
747
- metadata: jsonValueSchema.optional().nullable()
748
- });
749
- const adapterRegistryCategoriesResponseSchema = z.object({
750
- categories: z.array(adapterRegistryCategorySchema)
751
- });
752
- const adapterRegistryAdapterSchema = z.object({
753
- id: z.union([z.string(), z.number()]).optional(),
754
- network: z.string().optional(),
755
- categoryId: z.union([z.string(), z.number()]).nullable().optional(),
756
- operation: z.string().optional(),
757
- adapterId: z.string(),
758
- adapterName: z.string(),
759
- entity: z.string(),
760
- manifestPointer: z.string().nullable().optional(),
761
- manifestSequence: z.number().int().nullable().optional(),
762
- packageRegistry: z.string().nullable().optional(),
763
- packageName: z.string().nullable().optional(),
764
- packageVersion: z.string().nullable().optional(),
765
- packageIntegrity: z.string().nullable().optional(),
766
- stateModel: z.string().nullable().optional(),
767
- config: jsonValueSchema.nullable().optional(),
768
- signature: z.string().nullable().optional(),
769
- manifest: jsonValueSchema.nullable().optional(),
770
- keywords: z.array(z.string()).optional(),
771
- searchText: z.string().nullable().optional(),
772
- creditAccountId: z.string().nullable().optional(),
773
- registeredByUserId: z.string().nullable().optional(),
774
- registeredByEmail: z.string().nullable().optional(),
775
- totalCostHbar: z.number().nullable().optional(),
776
- totalCostCredits: z.number().nullable().optional(),
777
- consensusTimestamp: z.string().nullable().optional(),
778
- sequenceNumber: z.number().int().nullable().optional(),
779
- payerAccountId: z.string().nullable().optional(),
780
- mirrorNodePayload: jsonValueSchema.nullable().optional(),
781
- versionTopicId: z.string().nullable().optional(),
782
- declarationTopicId: z.string().nullable().optional(),
783
- categoryEntrySequence: z.number().int().nullable().optional(),
784
- categoryEntryTransactionId: z.string().nullable().optional(),
785
- versionPointerSequence: z.number().int().nullable().optional(),
786
- versionPointerTransactionId: z.string().nullable().optional(),
787
- transactionId: z.string().nullable().optional(),
788
- createdAt: z.string().optional(),
789
- category: adapterRegistryCategorySchema.optional()
790
- }).passthrough();
791
- const adapterRegistryAdaptersResponseSchema = z.object({
792
- network: z.string(),
793
- adapters: z.array(adapterRegistryAdapterSchema)
794
- });
795
- const adapterRegistryCreateCategoryResponseSchema = z.object({
796
- category: adapterRegistryCategorySchema
797
- });
798
- z.object({
799
- adapter: z.record(jsonValueSchema),
800
- declaration: adapterDeclarationSchema,
801
- transactionId: z.string().optional().nullable(),
802
- category: adapterRegistryCategorySchema
803
- });
804
- const adapterRegistrySubmitAdapterAcceptedResponseSchema = z.object({
805
- submissionId: z.string(),
806
- status: z.string().optional(),
807
- network: z.string().optional(),
808
- message: z.string().optional()
809
- }).passthrough();
810
- const adapterRegistrySubmissionStatusResponseSchema = z.object({
811
- submission: z.object({
812
- id: z.string(),
813
- network: z.string(),
814
- status: z.enum(["pending", "running", "completed", "failed"]),
815
- adapterId: z.string(),
816
- categorySlug: z.string().nullable().optional(),
817
- creditAccountId: z.string().nullable().optional(),
818
- registeredByUserId: z.string().nullable().optional(),
819
- registeredByEmail: z.string().nullable().optional(),
820
- requestPayload: jsonValueSchema.optional(),
821
- resultPayload: jsonValueSchema.nullable().optional(),
822
- error: z.string().nullable().optional(),
823
- createdAt: z.string().optional(),
824
- updatedAt: z.string().optional(),
825
- startedAt: z.string().nullable().optional(),
826
- completedAt: z.string().nullable().optional()
827
- }).passthrough()
828
- });
829
- const adapterChatProfileSchema = z.object({
830
- supportsChat: z.boolean(),
831
- delivery: z.string().optional(),
832
- transport: z.string().optional(),
833
- streaming: z.boolean().optional(),
834
- requiresAuth: z.array(z.string()).optional(),
835
- notes: z.string().optional()
836
- });
837
- const adapterCapabilitiesSchema = z.object({
838
- discovery: z.boolean(),
839
- routing: z.boolean(),
840
- communication: z.boolean(),
841
- translation: z.boolean(),
842
- protocols: z.array(z.string())
843
- });
844
- const adapterDescriptorSchema = z.object({
845
- id: z.string(),
846
- name: z.string(),
847
- version: z.string(),
848
- author: z.string(),
849
- description: z.string(),
850
- supportedProtocols: z.array(z.string()),
851
- registryType: z.enum(["web2", "web3", "hybrid"]),
852
- chatProfile: adapterChatProfileSchema.optional(),
853
- capabilities: adapterCapabilitiesSchema,
854
- enabled: z.boolean(),
855
- priority: z.number(),
856
- status: z.enum(["running", "stopped"])
857
- });
858
- const adapterDetailsResponseSchema = z.object({
859
- adapters: z.array(adapterDescriptorSchema)
860
- });
861
- const metadataFacetOptionSchema = z.object({
862
- value: z.union([z.string(), z.number(), z.boolean()]),
863
- label: z.string()
864
- });
865
- const searchFacetSchema = z.object({
866
- key: z.string(),
867
- label: z.string(),
868
- description: z.string().optional(),
869
- type: z.enum(["string", "boolean", "number"]),
870
- adapters: z.array(z.string()).optional(),
871
- options: z.array(metadataFacetOptionSchema).optional()
872
- });
873
- const searchFacetsResponseSchema = z.object({
874
- facets: z.array(searchFacetSchema)
875
- });
1
+ import { isBrowser } from "./standards-sdk.es119.js";
2
+ let nodeRequire;
3
+ function isModuleNotFound(specifier, error) {
4
+ if (!error || typeof error !== "object") {
5
+ return false;
6
+ }
7
+ const code = Reflect.get(error, "code");
8
+ const message = Reflect.get(error, "message");
9
+ const messageText = typeof message === "string" ? message : "";
10
+ if (typeof code === "string" && code.includes("MODULE_NOT_FOUND")) {
11
+ return messageText.includes(specifier);
12
+ }
13
+ if (messageText) {
14
+ const lowered = messageText.toLowerCase();
15
+ if (lowered.includes("cannot find module") || lowered.includes("module not found") || lowered.includes("cannot find package")) {
16
+ return lowered.includes(specifier.toLowerCase());
17
+ }
18
+ }
19
+ return false;
20
+ }
21
+ async function resolveNodeRequire() {
22
+ if (nodeRequire !== void 0) {
23
+ return nodeRequire;
24
+ }
25
+ if (isBrowser) {
26
+ nodeRequire = null;
27
+ return nodeRequire;
28
+ }
29
+ try {
30
+ const globalObject = typeof global !== "undefined" ? global : globalThis;
31
+ const req = globalObject.process?.mainModule?.require ?? globalObject.require;
32
+ nodeRequire = typeof req === "function" && typeof req.resolve === "function" ? req : null;
33
+ } catch {
34
+ nodeRequire = null;
35
+ }
36
+ return nodeRequire;
37
+ }
38
+ async function dynamicImport(specifier) {
39
+ try {
40
+ return await import(specifier);
41
+ } catch (error) {
42
+ if (isModuleNotFound(specifier, error)) {
43
+ return null;
44
+ }
45
+ throw error;
46
+ }
47
+ }
48
+ async function optionalImport(specifier) {
49
+ if (isBrowser) {
50
+ return dynamicImport(specifier);
51
+ }
52
+ const requireFn = await resolveNodeRequire();
53
+ if (requireFn) {
54
+ try {
55
+ return requireFn(specifier);
56
+ } catch (error) {
57
+ if (!isModuleNotFound(specifier, error)) {
58
+ throw error;
59
+ }
60
+ }
61
+ }
62
+ return dynamicImport(specifier);
63
+ }
64
+ function optionalImportSync(specifier) {
65
+ if (isBrowser) {
66
+ return null;
67
+ }
68
+ try {
69
+ const globalObject = typeof global !== "undefined" ? global : globalThis;
70
+ const req = globalObject.process?.mainModule?.require ?? globalObject.require;
71
+ if (typeof req === "function" && typeof req.resolve === "function") {
72
+ return req(specifier);
73
+ }
74
+ } catch (error) {
75
+ if (!isModuleNotFound(specifier, error)) {
76
+ throw error;
77
+ }
78
+ }
79
+ return null;
80
+ }
876
81
  export {
877
- AIAgentCapability,
878
- AIAgentType,
879
- adapterChatProfileSchema,
880
- adapterDescriptorSchema,
881
- adapterDetailsResponseSchema,
882
- adapterRegistryAdapterSchema,
883
- adapterRegistryAdaptersResponseSchema,
884
- adapterRegistryCategoriesResponseSchema,
885
- adapterRegistryCategorySchema,
886
- adapterRegistryCreateCategoryResponseSchema,
887
- adapterRegistrySubmissionStatusResponseSchema,
888
- adapterRegistrySubmitAdapterAcceptedResponseSchema,
889
- adaptersResponseSchema,
890
- additionalRegistryCatalogResponseSchema,
891
- agentFeedbackEligibilityResponseSchema,
892
- agentFeedbackResponseSchema,
893
- agentFeedbackSubmissionResponseSchema,
894
- chatHistoryCompactionResponseSchema,
895
- chatHistorySnapshotResponseSchema,
896
- createSessionResponseSchema,
897
- creditPurchaseResponseSchema,
898
- dashboardStatsResponseSchema,
899
- detectProtocolResponseSchema,
900
- encryptionHandshakeResponseSchema,
901
- ledgerChallengeResponseSchema,
902
- ledgerVerifyResponseSchema,
903
- metricsSummaryResponseSchema,
904
- popularResponseSchema,
905
- protocolsResponseSchema,
906
- registerAgentResponseSchema,
907
- registerEncryptionKeyResponseSchema,
908
- registrationProgressResponseSchema,
909
- registrationQuoteResponseSchema,
910
- registriesResponseSchema,
911
- registrySearchByNamespaceSchema,
912
- resolveResponseSchema,
913
- searchFacetsResponseSchema,
914
- searchResponseSchema,
915
- searchStatusResponseSchema,
916
- sendMessageResponseSchema,
917
- sessionEncryptionStatusResponseSchema,
918
- statsResponseSchema,
919
- uaidConnectionStatusSchema,
920
- uaidValidationResponseSchema,
921
- vectorSearchResponseSchema,
922
- websocketStatsResponseSchema,
923
- x402CreditPurchaseResponseSchema,
924
- x402MinimumsResponseSchema
82
+ optionalImport,
83
+ optionalImportSync
925
84
  };
926
85
  //# sourceMappingURL=standards-sdk.es160.js.map