@hashgraphonline/standards-sdk 0.1.143-feat-solana-register.canary.b9faba1.72 → 0.1.143-feat-solana-register.canary.74520ad.73

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 (122) hide show
  1. package/dist/cjs/hcs-16/tx.d.ts +1 -1
  2. package/dist/cjs/hcs-16/tx.d.ts.map +1 -1
  3. package/dist/cjs/services/registry-broker/client/feedback.d.ts +9 -0
  4. package/dist/cjs/services/registry-broker/client/feedback.d.ts.map +1 -0
  5. package/dist/cjs/services/registry-broker/client.d.ts.map +1 -1
  6. package/dist/cjs/services/registry-broker/schemas.d.ts +189 -16
  7. package/dist/cjs/services/registry-broker/schemas.d.ts.map +1 -1
  8. package/dist/cjs/services/registry-broker/types.d.ts +19 -1
  9. package/dist/cjs/services/registry-broker/types.d.ts.map +1 -1
  10. package/dist/cjs/standards-sdk.cjs +2 -2
  11. package/dist/cjs/standards-sdk.cjs.map +1 -1
  12. package/dist/es/hcs-16/tx.d.ts +1 -1
  13. package/dist/es/hcs-16/tx.d.ts.map +1 -1
  14. package/dist/es/services/registry-broker/client/feedback.d.ts +9 -0
  15. package/dist/es/services/registry-broker/client/feedback.d.ts.map +1 -0
  16. package/dist/es/services/registry-broker/client.d.ts.map +1 -1
  17. package/dist/es/services/registry-broker/schemas.d.ts +189 -16
  18. package/dist/es/services/registry-broker/schemas.d.ts.map +1 -1
  19. package/dist/es/services/registry-broker/types.d.ts +19 -1
  20. package/dist/es/services/registry-broker/types.d.ts.map +1 -1
  21. package/dist/es/standards-sdk.es.js +9 -8
  22. package/dist/es/standards-sdk.es.js.map +1 -1
  23. package/dist/es/standards-sdk.es100.js +1 -1
  24. package/dist/es/standards-sdk.es102.js +1 -1
  25. package/dist/es/standards-sdk.es104.js +1 -1
  26. package/dist/es/standards-sdk.es110.js +2 -1
  27. package/dist/es/standards-sdk.es110.js.map +1 -1
  28. package/dist/es/standards-sdk.es12.js +1 -1
  29. package/dist/es/standards-sdk.es125.js +1 -1
  30. package/dist/es/standards-sdk.es126.js +1 -1
  31. package/dist/es/standards-sdk.es128.js +3 -3
  32. package/dist/es/standards-sdk.es129.js +4 -4
  33. package/dist/es/standards-sdk.es13.js +1 -1
  34. package/dist/es/standards-sdk.es130.js +3 -3
  35. package/dist/es/standards-sdk.es131.js +4 -4
  36. package/dist/es/standards-sdk.es132.js +4 -4
  37. package/dist/es/standards-sdk.es133.js +4 -4
  38. package/dist/es/standards-sdk.es134.js +2 -2
  39. package/dist/es/standards-sdk.es135.js +4 -4
  40. package/dist/es/standards-sdk.es136.js +55 -367
  41. package/dist/es/standards-sdk.es136.js.map +1 -1
  42. package/dist/es/standards-sdk.es137.js +363 -14
  43. package/dist/es/standards-sdk.es137.js.map +1 -1
  44. package/dist/es/standards-sdk.es138.js +15 -79
  45. package/dist/es/standards-sdk.es138.js.map +1 -1
  46. package/dist/es/standards-sdk.es139.js +71 -77
  47. package/dist/es/standards-sdk.es139.js.map +1 -1
  48. package/dist/es/standards-sdk.es140.js +80 -152
  49. package/dist/es/standards-sdk.es140.js.map +1 -1
  50. package/dist/es/standards-sdk.es141.js +159 -7
  51. package/dist/es/standards-sdk.es141.js.map +1 -1
  52. package/dist/es/standards-sdk.es142.js +7 -86
  53. package/dist/es/standards-sdk.es142.js.map +1 -1
  54. package/dist/es/standards-sdk.es143.js +64 -43
  55. package/dist/es/standards-sdk.es143.js.map +1 -1
  56. package/dist/es/standards-sdk.es144.js +65 -30
  57. package/dist/es/standards-sdk.es144.js.map +1 -1
  58. package/dist/es/standards-sdk.es145.js +30 -34
  59. package/dist/es/standards-sdk.es145.js.map +1 -1
  60. package/dist/es/standards-sdk.es146.js +34 -28
  61. package/dist/es/standards-sdk.es146.js.map +1 -1
  62. package/dist/es/standards-sdk.es147.js +28 -138
  63. package/dist/es/standards-sdk.es147.js.map +1 -1
  64. package/dist/es/standards-sdk.es148.js +133 -37
  65. package/dist/es/standards-sdk.es148.js.map +1 -1
  66. package/dist/es/standards-sdk.es149.js +34 -12281
  67. package/dist/es/standards-sdk.es149.js.map +1 -1
  68. package/dist/es/standards-sdk.es150.js +12286 -53
  69. package/dist/es/standards-sdk.es150.js.map +1 -1
  70. package/dist/es/standards-sdk.es151.js +48 -74
  71. package/dist/es/standards-sdk.es151.js.map +1 -1
  72. package/dist/es/standards-sdk.es152.js +80 -15
  73. package/dist/es/standards-sdk.es152.js.map +1 -1
  74. package/dist/es/standards-sdk.es159.js +17 -871
  75. package/dist/es/standards-sdk.es159.js.map +1 -1
  76. package/dist/es/standards-sdk.es160.js +923 -239
  77. package/dist/es/standards-sdk.es160.js.map +1 -1
  78. package/dist/es/standards-sdk.es161.js +218 -223
  79. package/dist/es/standards-sdk.es161.js.map +1 -1
  80. package/dist/es/standards-sdk.es162.js +247 -0
  81. package/dist/es/standards-sdk.es162.js.map +1 -0
  82. package/dist/es/standards-sdk.es17.js +9 -5
  83. package/dist/es/standards-sdk.es17.js.map +1 -1
  84. package/dist/es/standards-sdk.es19.js +5 -4
  85. package/dist/es/standards-sdk.es19.js.map +1 -1
  86. package/dist/es/standards-sdk.es20.js +3 -2
  87. package/dist/es/standards-sdk.es20.js.map +1 -1
  88. package/dist/es/standards-sdk.es23.js +1 -1
  89. package/dist/es/standards-sdk.es28.js +5 -4
  90. package/dist/es/standards-sdk.es28.js.map +1 -1
  91. package/dist/es/standards-sdk.es31.js +1 -1
  92. package/dist/es/standards-sdk.es32.js +1 -1
  93. package/dist/es/standards-sdk.es36.js +3 -2
  94. package/dist/es/standards-sdk.es36.js.map +1 -1
  95. package/dist/es/standards-sdk.es37.js +3 -3
  96. package/dist/es/standards-sdk.es38.js +1 -1
  97. package/dist/es/standards-sdk.es5.js +1 -1
  98. package/dist/es/standards-sdk.es54.js +1 -1
  99. package/dist/es/standards-sdk.es57.js +1 -1
  100. package/dist/es/standards-sdk.es59.js +1 -1
  101. package/dist/es/standards-sdk.es60.js +1 -1
  102. package/dist/es/standards-sdk.es61.js +3 -2
  103. package/dist/es/standards-sdk.es61.js.map +1 -1
  104. package/dist/es/standards-sdk.es63.js +1 -1
  105. package/dist/es/standards-sdk.es65.js +1 -1
  106. package/dist/es/standards-sdk.es66.js +2 -2
  107. package/dist/es/standards-sdk.es69.js +2 -2
  108. package/dist/es/standards-sdk.es70.js +1 -1
  109. package/dist/es/standards-sdk.es72.js +1 -1
  110. package/dist/es/standards-sdk.es77.js +1 -1
  111. package/dist/es/standards-sdk.es78.js +2 -1
  112. package/dist/es/standards-sdk.es78.js.map +1 -1
  113. package/dist/es/standards-sdk.es79.js +1 -1
  114. package/dist/es/standards-sdk.es8.js +1 -1
  115. package/dist/es/standards-sdk.es82.js +1 -1
  116. package/dist/es/standards-sdk.es84.js +1 -1
  117. package/dist/es/standards-sdk.es88.js +3 -3
  118. package/dist/es/standards-sdk.es92.js +2 -2
  119. package/dist/es/standards-sdk.es92.js.map +1 -1
  120. package/dist/es/standards-sdk.es93.js +1 -1
  121. package/dist/es/standards-sdk.es98.js +1 -1
  122. package/package.json +1 -1
@@ -1,242 +1,926 @@
1
- const DEFAULT_USER_AGENT = "@hol-org/rb-client";
2
- const DEFAULT_PROGRESS_INTERVAL_MS = 1500;
3
- const DEFAULT_PROGRESS_TIMEOUT_MS = 5 * 60 * 1e3;
4
- const DEFAULT_BASE_URL = "https://hol.org/registry/api/v1";
5
- const JSON_CONTENT_TYPE = /application\/json/i;
6
- const DEFAULT_HISTORY_TOP_UP_HBAR = 0.25;
7
- const MINIMUM_REGISTRATION_AUTO_TOP_UP_CREDITS = 1;
8
- const stripTrailingSlashes = (value) => {
9
- let end = value.length;
10
- while (end > 0 && value.charCodeAt(end - 1) === 47) {
11
- end -= 1;
12
- }
13
- return end === value.length ? value : value.slice(0, end);
14
- };
15
- const createAbortError = () => typeof DOMException === "function" ? new DOMException("Aborted", "AbortError") : new Error("The operation was aborted");
16
- const normaliseHeaderName = (name) => name.trim().toLowerCase();
17
- const isBrowserRuntime = () => typeof window !== "undefined" && typeof window.fetch === "function";
18
- const toJsonValue = (value) => {
19
- if (value === null) {
20
- return null;
21
- }
22
- if (value instanceof Date) {
23
- return value.toISOString();
24
- }
25
- if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
26
- return value;
27
- }
28
- if (Array.isArray(value)) {
29
- return value.map((item) => item === void 0 ? null : toJsonValue(item));
30
- }
31
- if (typeof value === "object") {
32
- const result = {};
33
- Object.entries(value).forEach(
34
- ([key, entryValue]) => {
35
- if (entryValue !== void 0) {
36
- result[key] = toJsonValue(entryValue);
37
- }
38
- }
39
- );
40
- return result;
41
- }
42
- throw new TypeError("Only JSON-compatible values are supported");
43
- };
44
- const isJsonObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
45
- const toJsonObject = (value) => {
46
- const normalised = toJsonValue(value);
47
- if (isJsonObject(normalised)) {
48
- return normalised;
49
- }
50
- throw new TypeError("Expected JSON object value");
51
- };
52
- const serialiseAuthConfig = (auth) => {
53
- const authPayload = {};
54
- if (auth.type) {
55
- authPayload.type = auth.type;
56
- }
57
- if (auth.token) {
58
- authPayload.token = auth.token;
59
- }
60
- if (auth.username) {
61
- authPayload.username = auth.username;
62
- }
63
- if (auth.password) {
64
- authPayload.password = auth.password;
65
- }
66
- if (auth.headerName) {
67
- authPayload.headerName = auth.headerName;
68
- }
69
- if (auth.headerValue) {
70
- authPayload.headerValue = auth.headerValue;
71
- }
72
- if (auth.headers) {
73
- authPayload.headers = { ...auth.headers };
74
- }
75
- return authPayload;
76
- };
77
- const serialiseAgentRegistrationRequest = (payload) => {
78
- const body = {
79
- profile: toJsonObject(payload.profile)
80
- };
81
- if (payload.endpoint !== void 0) {
82
- body.endpoint = payload.endpoint;
83
- }
84
- if (payload.protocol !== void 0) {
85
- body.protocol = payload.protocol;
86
- }
87
- if (payload.communicationProtocol !== void 0) {
88
- body.communicationProtocol = payload.communicationProtocol;
89
- }
90
- if (payload.registry !== void 0) {
91
- body.registry = payload.registry;
92
- }
93
- if (payload.additionalRegistries !== void 0) {
94
- body.additionalRegistries = payload.additionalRegistries;
95
- }
96
- if (payload.metadata !== void 0) {
97
- body.metadata = toJsonObject(payload.metadata);
98
- }
99
- return body;
100
- };
101
- const normalizeHexPrivateKey = (value) => {
102
- const trimmed = value.trim();
103
- if (!trimmed) {
104
- throw new Error("evmPrivateKey is required");
105
- }
106
- return trimmed.startsWith("0x") ? trimmed : `0x${trimmed}`;
107
- };
108
- function normaliseBaseUrl(input) {
109
- const trimmed = input?.trim();
110
- let baseCandidate = trimmed && trimmed.length > 0 ? trimmed : DEFAULT_BASE_URL;
111
- try {
112
- const url = new URL(stripTrailingSlashes(baseCandidate));
113
- const hostname = url.hostname.toLowerCase();
114
- const ensureRegistryPrefix = () => {
115
- if (!url.pathname.startsWith("/registry")) {
116
- url.pathname = url.pathname === "/" ? "/registry" : `/registry${url.pathname}`;
117
- }
118
- };
119
- if (hostname === "hol.org") {
120
- ensureRegistryPrefix();
121
- baseCandidate = url.toString();
122
- } else if (hostname === "registry.hashgraphonline.com" || hostname === "hashgraphonline.com") {
123
- ensureRegistryPrefix();
124
- url.hostname = "hol.org";
125
- baseCandidate = url.toString();
126
- }
127
- } catch {
128
- }
129
- const withoutTrailing = stripTrailingSlashes(baseCandidate);
130
- if (/\/api\/v\d+$/i.test(withoutTrailing)) {
131
- return withoutTrailing;
132
- }
133
- if (/\/api$/i.test(withoutTrailing)) {
134
- return `${withoutTrailing}/v1`;
135
- }
136
- return `${withoutTrailing}/api/v1`;
137
- }
138
- function buildSearchQuery(params) {
139
- const query = new URLSearchParams();
140
- const appendList = (key, values) => {
141
- if (!values) {
142
- return;
143
- }
144
- values.forEach((value) => {
145
- if (typeof value === "string") {
146
- const trimmed = value.trim();
147
- if (trimmed.length > 0) {
148
- query.append(key, trimmed);
149
- }
150
- }
151
- });
152
- };
153
- if (params.q) {
154
- const trimmed = params.q.trim();
155
- if (trimmed.length > 0) {
156
- query.set("q", trimmed);
157
- }
158
- }
159
- if (typeof params.page === "number") {
160
- query.set("page", params.page.toString());
161
- }
162
- if (typeof params.limit === "number") {
163
- query.set("limit", params.limit.toString());
164
- }
165
- if (params.registry) {
166
- const trimmed = params.registry.trim();
167
- if (trimmed.length > 0) {
168
- query.set("registry", trimmed);
169
- }
170
- }
171
- appendList("registries", params.registries);
172
- if (typeof params.minTrust === "number") {
173
- query.set("minTrust", params.minTrust.toString());
174
- }
175
- appendList("capabilities", params.capabilities);
176
- appendList("protocols", params.protocols);
177
- appendList("adapters", params.adapters);
178
- if (params.metadata) {
179
- Object.entries(params.metadata).forEach(([key, values]) => {
180
- if (!key || !Array.isArray(values) || values.length === 0) {
181
- return;
182
- }
183
- const trimmedKey = key.trim();
184
- if (trimmedKey.length === 0) {
185
- return;
186
- }
187
- values.forEach((value) => {
188
- if (value === void 0 || value === null) {
189
- return;
190
- }
191
- query.append(`metadata.${trimmedKey}`, String(value));
192
- });
193
- });
194
- }
195
- if (params.type) {
196
- const trimmedType = params.type.trim();
197
- if (trimmedType.length > 0 && trimmedType.toLowerCase() !== "all") {
198
- query.set("type", trimmedType);
199
- }
200
- }
201
- if (params.verified === true) {
202
- query.set("verified", "true");
203
- }
204
- if (params.online === true) {
205
- query.set("online", "true");
206
- }
207
- if (params.sortBy) {
208
- const trimmedSort = params.sortBy.trim();
209
- if (trimmedSort.length > 0) {
210
- query.set("sortBy", trimmedSort);
211
- }
212
- }
213
- if (params.sortOrder) {
214
- const lowered = params.sortOrder.toLowerCase();
215
- if (lowered === "asc" || lowered === "desc") {
216
- query.set("sortOrder", lowered);
217
- }
218
- }
219
- const queryString = query.toString();
220
- return queryString.length > 0 ? `?${queryString}` : "";
221
- }
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
+ });
222
876
  export {
223
- DEFAULT_BASE_URL,
224
- DEFAULT_HISTORY_TOP_UP_HBAR,
225
- DEFAULT_PROGRESS_INTERVAL_MS,
226
- DEFAULT_PROGRESS_TIMEOUT_MS,
227
- DEFAULT_USER_AGENT,
228
- JSON_CONTENT_TYPE,
229
- MINIMUM_REGISTRATION_AUTO_TOP_UP_CREDITS,
230
- buildSearchQuery,
231
- createAbortError,
232
- isBrowserRuntime,
233
- isJsonObject,
234
- normaliseBaseUrl,
235
- normaliseHeaderName,
236
- normalizeHexPrivateKey,
237
- serialiseAgentRegistrationRequest,
238
- serialiseAuthConfig,
239
- toJsonObject,
240
- toJsonValue
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
241
925
  };
242
926
  //# sourceMappingURL=standards-sdk.es160.js.map