@hashgraphonline/standards-sdk 0.1.146-chore-jsr-improvements.canary.01d3174.92 → 0.1.146-chore-jsr-improvements.canary.62a5b19.93

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 (165) hide show
  1. package/dist/cjs/services/registry-broker/client/adapters.d.ts +4 -19
  2. package/dist/cjs/services/registry-broker/client/adapters.d.ts.map +1 -1
  3. package/dist/cjs/services/registry-broker/client/agents.d.ts +4 -15
  4. package/dist/cjs/services/registry-broker/client/agents.d.ts.map +1 -1
  5. package/dist/cjs/services/registry-broker/client/base-client.d.ts +51 -1
  6. package/dist/cjs/services/registry-broker/client/base-client.d.ts.map +1 -1
  7. package/dist/cjs/services/registry-broker/client/chat-history.d.ts +4 -22
  8. package/dist/cjs/services/registry-broker/client/chat-history.d.ts.map +1 -1
  9. package/dist/cjs/services/registry-broker/client/chat.d.ts +4 -32
  10. package/dist/cjs/services/registry-broker/client/chat.d.ts.map +1 -1
  11. package/dist/cjs/services/registry-broker/client/credits.d.ts +4 -39
  12. package/dist/cjs/services/registry-broker/client/credits.d.ts.map +1 -1
  13. package/dist/cjs/services/registry-broker/client/encrypted-chat-manager.d.ts +4 -34
  14. package/dist/cjs/services/registry-broker/client/encrypted-chat-manager.d.ts.map +1 -1
  15. package/dist/cjs/services/registry-broker/client/encryption.d.ts +4 -32
  16. package/dist/cjs/services/registry-broker/client/encryption.d.ts.map +1 -1
  17. package/dist/cjs/services/registry-broker/client/ledger-auth.d.ts +4 -9
  18. package/dist/cjs/services/registry-broker/client/ledger-auth.d.ts.map +1 -1
  19. package/dist/cjs/services/registry-broker/client.d.ts +4 -0
  20. package/dist/cjs/services/registry-broker/client.d.ts.map +1 -1
  21. package/dist/cjs/standards-sdk.cjs +3 -3
  22. package/dist/cjs/standards-sdk.cjs.map +1 -1
  23. package/dist/es/services/registry-broker/client/adapters.d.ts +4 -19
  24. package/dist/es/services/registry-broker/client/adapters.d.ts.map +1 -1
  25. package/dist/es/services/registry-broker/client/agents.d.ts +4 -15
  26. package/dist/es/services/registry-broker/client/agents.d.ts.map +1 -1
  27. package/dist/es/services/registry-broker/client/base-client.d.ts +51 -1
  28. package/dist/es/services/registry-broker/client/base-client.d.ts.map +1 -1
  29. package/dist/es/services/registry-broker/client/chat-history.d.ts +4 -22
  30. package/dist/es/services/registry-broker/client/chat-history.d.ts.map +1 -1
  31. package/dist/es/services/registry-broker/client/chat.d.ts +4 -32
  32. package/dist/es/services/registry-broker/client/chat.d.ts.map +1 -1
  33. package/dist/es/services/registry-broker/client/credits.d.ts +4 -39
  34. package/dist/es/services/registry-broker/client/credits.d.ts.map +1 -1
  35. package/dist/es/services/registry-broker/client/encrypted-chat-manager.d.ts +4 -34
  36. package/dist/es/services/registry-broker/client/encrypted-chat-manager.d.ts.map +1 -1
  37. package/dist/es/services/registry-broker/client/encryption.d.ts +4 -32
  38. package/dist/es/services/registry-broker/client/encryption.d.ts.map +1 -1
  39. package/dist/es/services/registry-broker/client/ledger-auth.d.ts +4 -9
  40. package/dist/es/services/registry-broker/client/ledger-auth.d.ts.map +1 -1
  41. package/dist/es/services/registry-broker/client.d.ts +4 -0
  42. package/dist/es/services/registry-broker/client.d.ts.map +1 -1
  43. package/dist/es/standards-sdk.es.js +9 -16
  44. package/dist/es/standards-sdk.es.js.map +1 -1
  45. package/dist/es/standards-sdk.es101.js +1 -1
  46. package/dist/es/standards-sdk.es103.js +1 -1
  47. package/dist/es/standards-sdk.es109.js +2 -9
  48. package/dist/es/standards-sdk.es109.js.map +1 -1
  49. package/dist/es/standards-sdk.es11.js +1 -1
  50. package/dist/es/standards-sdk.es110.js +5 -5
  51. package/dist/es/standards-sdk.es12.js +1 -1
  52. package/dist/es/standards-sdk.es120.js +1 -1
  53. package/dist/es/standards-sdk.es121.js +1 -1
  54. package/dist/es/standards-sdk.es122.js +5 -5
  55. package/dist/es/standards-sdk.es124.js +1 -1
  56. package/dist/es/standards-sdk.es125.js +1 -1
  57. package/dist/es/standards-sdk.es127.js +624 -155
  58. package/dist/es/standards-sdk.es127.js.map +1 -1
  59. package/dist/es/standards-sdk.es128.js +16 -103
  60. package/dist/es/standards-sdk.es128.js.map +1 -1
  61. package/dist/es/standards-sdk.es129.js +72 -112
  62. package/dist/es/standards-sdk.es129.js.map +1 -1
  63. package/dist/es/standards-sdk.es130.js +75 -235
  64. package/dist/es/standards-sdk.es130.js.map +1 -1
  65. package/dist/es/standards-sdk.es131.js +53 -173
  66. package/dist/es/standards-sdk.es131.js.map +1 -1
  67. package/dist/es/standards-sdk.es132.js +156 -119
  68. package/dist/es/standards-sdk.es132.js.map +1 -1
  69. package/dist/es/standards-sdk.es133.js +8 -327
  70. package/dist/es/standards-sdk.es133.js.map +1 -1
  71. package/dist/es/standards-sdk.es134.js +74 -613
  72. package/dist/es/standards-sdk.es134.js.map +1 -1
  73. package/dist/es/standards-sdk.es135.js +61 -13
  74. package/dist/es/standards-sdk.es135.js.map +1 -1
  75. package/dist/es/standards-sdk.es136.js +30 -81
  76. package/dist/es/standards-sdk.es136.js.map +1 -1
  77. package/dist/es/standards-sdk.es137.js +34 -87
  78. package/dist/es/standards-sdk.es137.js.map +1 -1
  79. package/dist/es/standards-sdk.es138.js +28 -60
  80. package/dist/es/standards-sdk.es138.js.map +1 -1
  81. package/dist/es/standards-sdk.es139.js +933 -159
  82. package/dist/es/standards-sdk.es139.js.map +1 -1
  83. package/dist/es/standards-sdk.es140.js +12289 -7
  84. package/dist/es/standards-sdk.es140.js.map +1 -1
  85. package/dist/es/standards-sdk.es141.js +122 -70
  86. package/dist/es/standards-sdk.es141.js.map +1 -1
  87. package/dist/es/standards-sdk.es142.js +35 -58
  88. package/dist/es/standards-sdk.es142.js.map +1 -1
  89. package/dist/es/standards-sdk.es143.js +56 -30
  90. package/dist/es/standards-sdk.es143.js.map +1 -1
  91. package/dist/es/standards-sdk.es144.js +84 -34
  92. package/dist/es/standards-sdk.es144.js.map +1 -1
  93. package/dist/es/standards-sdk.es145.js +17 -28
  94. package/dist/es/standards-sdk.es145.js.map +1 -1
  95. package/dist/es/standards-sdk.es146.js +152 -118
  96. package/dist/es/standards-sdk.es146.js.map +1 -1
  97. package/dist/es/standards-sdk.es147.js +314 -34
  98. package/dist/es/standards-sdk.es147.js.map +1 -1
  99. package/dist/es/standards-sdk.es148.js +342 -13
  100. package/dist/es/standards-sdk.es148.js.map +1 -1
  101. package/dist/es/standards-sdk.es149.js +395 -12231
  102. package/dist/es/standards-sdk.es149.js.map +1 -1
  103. package/dist/es/standards-sdk.es150.js +331 -959
  104. package/dist/es/standards-sdk.es150.js.map +1 -1
  105. package/dist/es/standards-sdk.es151.js +69 -49
  106. package/dist/es/standards-sdk.es151.js.map +1 -1
  107. package/dist/es/standards-sdk.es152.js +121 -66
  108. package/dist/es/standards-sdk.es152.js.map +1 -1
  109. package/dist/es/standards-sdk.es16.js +2 -9
  110. package/dist/es/standards-sdk.es16.js.map +1 -1
  111. package/dist/es/standards-sdk.es18.js +5 -12
  112. package/dist/es/standards-sdk.es18.js.map +1 -1
  113. package/dist/es/standards-sdk.es19.js +3 -10
  114. package/dist/es/standards-sdk.es19.js.map +1 -1
  115. package/dist/es/standards-sdk.es22.js +1 -1
  116. package/dist/es/standards-sdk.es27.js +5 -12
  117. package/dist/es/standards-sdk.es27.js.map +1 -1
  118. package/dist/es/standards-sdk.es30.js +1 -1
  119. package/dist/es/standards-sdk.es31.js +1 -1
  120. package/dist/es/standards-sdk.es35.js +3 -10
  121. package/dist/es/standards-sdk.es35.js.map +1 -1
  122. package/dist/es/standards-sdk.es36.js +3 -3
  123. package/dist/es/standards-sdk.es37.js +1 -1
  124. package/dist/es/standards-sdk.es4.js +1 -1
  125. package/dist/es/standards-sdk.es53.js +1 -1
  126. package/dist/es/standards-sdk.es56.js +1 -1
  127. package/dist/es/standards-sdk.es58.js +1 -1
  128. package/dist/es/standards-sdk.es59.js +1 -1
  129. package/dist/es/standards-sdk.es60.js +3 -10
  130. package/dist/es/standards-sdk.es60.js.map +1 -1
  131. package/dist/es/standards-sdk.es62.js +1 -1
  132. package/dist/es/standards-sdk.es64.js +1 -1
  133. package/dist/es/standards-sdk.es65.js +2 -2
  134. package/dist/es/standards-sdk.es68.js +2 -2
  135. package/dist/es/standards-sdk.es69.js +1 -1
  136. package/dist/es/standards-sdk.es7.js +1 -1
  137. package/dist/es/standards-sdk.es71.js +1 -1
  138. package/dist/es/standards-sdk.es76.js +1 -1
  139. package/dist/es/standards-sdk.es77.js +2 -9
  140. package/dist/es/standards-sdk.es77.js.map +1 -1
  141. package/dist/es/standards-sdk.es78.js +1 -1
  142. package/dist/es/standards-sdk.es81.js +1 -1
  143. package/dist/es/standards-sdk.es83.js +1 -1
  144. package/dist/es/standards-sdk.es87.js +3 -3
  145. package/dist/es/standards-sdk.es91.js +1 -1
  146. package/dist/es/standards-sdk.es92.js +1 -1
  147. package/dist/es/standards-sdk.es97.js +1 -1
  148. package/dist/es/standards-sdk.es99.js +1 -1
  149. package/package.json +1 -1
  150. package/dist/es/standards-sdk.es153.js +0 -175
  151. package/dist/es/standards-sdk.es153.js.map +0 -1
  152. package/dist/es/standards-sdk.es154.js +0 -325
  153. package/dist/es/standards-sdk.es154.js.map +0 -1
  154. package/dist/es/standards-sdk.es155.js +0 -349
  155. package/dist/es/standards-sdk.es155.js.map +0 -1
  156. package/dist/es/standards-sdk.es156.js +0 -456
  157. package/dist/es/standards-sdk.es156.js.map +0 -1
  158. package/dist/es/standards-sdk.es157.js +0 -334
  159. package/dist/es/standards-sdk.es157.js.map +0 -1
  160. package/dist/es/standards-sdk.es158.js +0 -79
  161. package/dist/es/standards-sdk.es158.js.map +0 -1
  162. package/dist/es/standards-sdk.es159.js +0 -242
  163. package/dist/es/standards-sdk.es159.js.map +0 -1
  164. package/dist/es/standards-sdk.es160.js +0 -247
  165. package/dist/es/standards-sdk.es160.js.map +0 -1
@@ -1,162 +1,936 @@
1
- import { CustomFeeType } from "./standards-sdk.es140.js";
2
- import { HederaMirrorNode } from "./standards-sdk.es126.js";
3
- class FeeConfigBuilder {
4
- constructor(options) {
5
- this.customFees = [];
6
- this.logger = options.logger;
7
- this.mirrorNode = new HederaMirrorNode(options.network, options.logger);
8
- this.defaultCollectorAccountId = options.defaultCollectorAccountId || "";
9
- }
10
- /**
11
- * Static factory method to create a FeeConfigBuilder with a single HBAR fee.
12
- * @param hbarAmount Amount in HBAR.
13
- * @param collectorAccountId Optional account ID to collect the fee. If omitted or undefined, defaults to the agent's own account ID during topic creation.
14
- * @param network Network type ('mainnet' or 'testnet').
15
- * @param logger Logger instance.
16
- * @param exemptAccounts Optional array of account IDs exempt from this fee.
17
- * @returns A configured FeeConfigBuilder instance.
18
- */
19
- static forHbar(hbarAmount, collectorAccountId, network, logger, exemptAccounts = []) {
20
- const builder = new FeeConfigBuilder({
21
- network,
22
- logger,
23
- defaultCollectorAccountId: collectorAccountId
24
- });
25
- return builder.addHbarFee(hbarAmount, collectorAccountId, exemptAccounts);
26
- }
27
- /**
28
- * Static factory method to create a FeeConfigBuilder with a single token fee.
29
- * Automatically fetches token decimals if not provided.
30
- * @param tokenAmount Amount of tokens.
31
- * @param feeTokenId Token ID for the fee.
32
- * @param collectorAccountId Optional account ID to collect the fee. If omitted or undefined, defaults to the agent's own account ID during topic creation.
33
- * @param network Network type ('mainnet' or 'testnet').
34
- * @param logger Logger instance.
35
- * @param exemptAccounts Optional array of account IDs exempt from this fee.
36
- * @param decimals Optional decimals for the token (fetched if omitted).
37
- * @returns A Promise resolving to a configured FeeConfigBuilder instance.
38
- */
39
- static async forToken(tokenAmount, feeTokenId, collectorAccountId, network, logger, exemptAccounts = [], decimals) {
40
- const builder = new FeeConfigBuilder({
41
- network,
42
- logger,
43
- defaultCollectorAccountId: collectorAccountId
44
- });
45
- await builder.addTokenFee(
46
- tokenAmount,
47
- feeTokenId,
48
- collectorAccountId,
49
- decimals,
50
- exemptAccounts
51
- );
52
- return builder;
53
- }
54
- /**
55
- * Adds an HBAR fee configuration to the builder.
56
- * Allows chaining multiple fee additions.
57
- * @param hbarAmount The amount in HBAR (e.g., 0.5).
58
- * @param collectorAccountId Optional. The account ID to collect this fee. If omitted, defaults to the agent's own account ID during topic creation.
59
- * @param exemptAccountIds Optional. Accounts specifically exempt from *this* HBAR fee.
60
- * @returns This FeeConfigBuilder instance for chaining.
61
- */
62
- addHbarFee(hbarAmount, collectorAccountId, exemptAccountIds = []) {
63
- if (hbarAmount <= 0) {
64
- throw new Error("HBAR amount must be greater than zero");
65
- }
66
- this.customFees.push({
67
- feeAmount: {
68
- amount: hbarAmount * 1e8,
69
- decimals: 0
70
- },
71
- feeCollectorAccountId: collectorAccountId || this.defaultCollectorAccountId,
72
- feeTokenId: void 0,
73
- exemptAccounts: [...exemptAccountIds],
74
- type: CustomFeeType.FIXED_FEE
75
- });
76
- return this;
77
- }
78
- /**
79
- * Adds a token fee configuration to the builder.
80
- * Allows chaining multiple fee additions.
81
- * Fetches token decimals automatically if not provided.
82
- * @param tokenAmount The amount of the specified token.
83
- * @param feeTokenId The ID of the token to charge the fee in.
84
- * @param collectorAccountId Optional. The account ID to collect this fee. If omitted, defaults to the agent's own account ID during topic creation.
85
- * @param decimals Optional. The number of decimals for the token. If omitted, it will be fetched from the mirror node.
86
- * @param exemptAccountIds Optional. Accounts specifically exempt from *this* token fee.
87
- * @returns A Promise resolving to this FeeConfigBuilder instance for chaining.
88
- */
89
- async addTokenFee(tokenAmount, feeTokenId, collectorAccountId, decimals, exemptAccountIds = []) {
90
- if (tokenAmount <= 0) {
91
- throw new Error("Token amount must be greater than zero");
92
- }
93
- if (!feeTokenId) {
94
- throw new Error("Fee token ID is required when adding a token fee");
95
- }
96
- let finalDecimals = decimals;
97
- if (finalDecimals === void 0) {
98
- try {
99
- const tokenInfo = await this.mirrorNode.getTokenInfo(feeTokenId);
100
- if (tokenInfo?.decimals) {
101
- finalDecimals = parseInt(tokenInfo.decimals, 10);
102
- this.logger.info(
103
- `Fetched decimals for ${feeTokenId}: ${finalDecimals}`
104
- );
105
- } else {
106
- this.logger.warn(
107
- `Could not fetch decimals for ${feeTokenId}, defaulting to 0.`
108
- );
109
- finalDecimals = 0;
110
- }
111
- } catch (error) {
112
- this.logger.error(
113
- `Error fetching decimals for ${feeTokenId}, defaulting to 0: ${error}`
114
- );
115
- finalDecimals = 0;
116
- }
117
- }
118
- this.customFees.push({
119
- feeAmount: {
120
- amount: tokenAmount * 10 ** finalDecimals,
121
- decimals: finalDecimals
122
- },
123
- feeCollectorAccountId: collectorAccountId || this.defaultCollectorAccountId,
124
- feeTokenId,
125
- exemptAccounts: [...exemptAccountIds],
126
- type: CustomFeeType.FIXED_FEE
127
- });
128
- return this;
129
- }
130
- /**
131
- * Builds the final TopicFeeConfig object.
132
- * @returns The TopicFeeConfig containing all added custom fees and a consolidated list of unique exempt accounts.
133
- * @throws Error if no fees have been added.
134
- * @throws Error if more than 10 fees have been added.
135
- */
136
- build() {
137
- if (this.customFees.length === 0) {
138
- throw new Error(
139
- "At least one fee must be added using addHbarFee/addTokenFee or created using forHbar/forToken"
140
- );
141
- }
142
- if (this.customFees.length > 10) {
143
- throw new Error("Maximum of 10 custom fees per topic allowed");
144
- }
145
- const allExemptAccounts = /* @__PURE__ */ new Set();
146
- this.customFees.forEach((fee) => {
147
- fee.exemptAccounts.forEach((account) => allExemptAccounts.add(account));
148
- });
149
- const resolvedCustomFees = this.customFees.map((fee) => ({
150
- ...fee,
151
- feeCollectorAccountId: fee.feeCollectorAccountId || this.defaultCollectorAccountId
152
- }));
153
- return {
154
- customFees: resolvedCustomFees,
155
- exemptAccounts: Array.from(allExemptAccounts)
156
- };
157
- }
158
- }
1
+ import { z } from "zod";
2
+ import { adapterDeclarationSchema } from "./standards-sdk.es79.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([z.number(), 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(z.union([capabilitySchema, z.number()])).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
+ 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
+ onchain: z.object({
216
+ eligible: z.boolean(),
217
+ reason: z.string().optional(),
218
+ estimatedCredits: z.number().optional(),
219
+ usdEstimate: z.number().optional(),
220
+ nativeFeeEstimate: z.number().optional()
221
+ }).optional()
222
+ });
223
+ const agentFeedbackSubmissionResponseSchema = z.object({
224
+ uaid: z.string(),
225
+ registry: z.string(),
226
+ network: z.string().optional(),
227
+ agentId: z.number(),
228
+ score: z.number(),
229
+ tag1: z.string().nullable().optional(),
230
+ tag2: z.string().nullable().optional(),
231
+ fileUri: z.string().nullable().optional(),
232
+ fileHash: z.string().nullable().optional(),
233
+ feedbackIndex: z.number().nullable().optional(),
234
+ transactionHash: z.string().nullable().optional(),
235
+ signature: z.string().nullable().optional(),
236
+ submittedAt: z.string()
237
+ });
238
+ const agentFeedbackIndexResponseSchema = z.object({
239
+ page: z.number(),
240
+ limit: z.number(),
241
+ total: z.number(),
242
+ items: z.array(
243
+ z.object({
244
+ uaid: z.string(),
245
+ registry: z.string(),
246
+ network: z.string().optional(),
247
+ agentId: z.number().nullable().optional(),
248
+ summary: agentFeedbackSummarySchema.nullable(),
249
+ trustScore: z.number().nullable().optional()
250
+ })
251
+ )
252
+ });
253
+ const agentFeedbackEntriesIndexResponseSchema = z.object({
254
+ page: z.number(),
255
+ limit: z.number(),
256
+ total: z.number(),
257
+ items: z.array(
258
+ z.object({
259
+ uaid: z.string(),
260
+ entry: agentFeedbackEntrySchema
261
+ })
262
+ )
263
+ });
264
+ z.object({
265
+ sessionId: z.string(),
266
+ uaid: z.string().nullable().optional(),
267
+ agent: z.object({
268
+ name: z.string(),
269
+ description: z.string().optional(),
270
+ capabilities: z.record(jsonValueSchema).nullable().optional(),
271
+ skills: z.array(z.string()).optional()
272
+ }),
273
+ history: z.array(chatHistoryEntrySchema).optional().default([]),
274
+ historyTtlSeconds: z.number().nullable().optional(),
275
+ encryption: sessionEncryptionSummarySchema.nullable().optional()
276
+ });
277
+ z.object({
278
+ sessionId: z.string(),
279
+ uaid: z.string().nullable().optional(),
280
+ message: z.string(),
281
+ timestamp: z.string(),
282
+ rawResponse: jsonValueSchema.optional(),
283
+ content: z.string().optional(),
284
+ ops: z.array(z.record(jsonValueSchema)).optional(),
285
+ history: z.array(chatHistoryEntrySchema).optional(),
286
+ historyTtlSeconds: z.number().nullable().optional(),
287
+ encrypted: z.boolean().optional()
288
+ });
289
+ z.object({
290
+ sessionId: z.string(),
291
+ history: z.array(chatHistoryEntrySchema),
292
+ historyTtlSeconds: z.number()
293
+ });
294
+ z.object({
295
+ preserveEntries: z.number().int().min(0).optional()
296
+ }).strict();
297
+ z.object({
298
+ sessionId: z.string(),
299
+ history: z.array(chatHistoryEntrySchema),
300
+ summaryEntry: chatHistoryEntrySchema,
301
+ preservedEntries: z.array(chatHistoryEntrySchema),
302
+ historyTtlSeconds: z.number(),
303
+ creditsDebited: z.number(),
304
+ metadata: z.record(jsonValueSchema).optional()
305
+ });
306
+ z.object({
307
+ sessionId: z.string(),
308
+ encryption: sessionEncryptionSummarySchema.nullable()
309
+ });
310
+ z.object({
311
+ sessionId: z.string(),
312
+ handshake: encryptionHandshakeRecordSchema
313
+ });
314
+ z.object({
315
+ id: z.string(),
316
+ keyType: z.string(),
317
+ publicKey: z.string(),
318
+ uaid: z.string().nullable(),
319
+ ledgerAccountId: z.string().nullable(),
320
+ ledgerNetwork: z.string().nullable().optional(),
321
+ userId: z.string().nullable().optional(),
322
+ email: z.string().nullable().optional(),
323
+ createdAt: z.string(),
324
+ updatedAt: z.string()
325
+ });
326
+ z.object({
327
+ challengeId: z.string(),
328
+ message: z.string(),
329
+ expiresAt: z.string()
330
+ });
331
+ const ledgerApiKeySummarySchema = z.object({
332
+ id: z.string(),
333
+ label: z.string().optional(),
334
+ prefix: z.string(),
335
+ lastFour: z.string(),
336
+ createdAt: z.string(),
337
+ lastUsedAt: z.string().nullable().optional(),
338
+ ownerType: z.literal("ledger"),
339
+ ledgerAccountId: z.string().optional(),
340
+ ledgerNetwork: z.string().optional(),
341
+ ledgerNetworkCanonical: z.string().optional()
342
+ });
343
+ z.object({
344
+ key: z.string(),
345
+ apiKey: ledgerApiKeySummarySchema,
346
+ accountId: z.string(),
347
+ network: z.string(),
348
+ networkCanonical: z.string().optional()
349
+ });
350
+ const protocolsResponseSchema = z.object({
351
+ protocols: z.array(z.string())
352
+ });
353
+ const detectProtocolResponseSchema = z.object({
354
+ protocol: z.string().nullable()
355
+ });
356
+ const registrySearchByNamespaceSchema = z.object({
357
+ hits: z.array(searchHitSchema),
358
+ total: z.number(),
359
+ page: z.number().optional(),
360
+ limit: z.number().optional()
361
+ });
362
+ const capabilityFilterValueSchema = z.union([z.string(), z.number()]);
363
+ const vectorSearchFilterSchema = z.object({
364
+ capabilities: z.array(capabilityFilterValueSchema).optional(),
365
+ type: z.enum(["ai-agents", "mcp-servers"]).optional(),
366
+ registry: z.string().optional(),
367
+ protocols: z.array(z.string()).optional(),
368
+ adapter: z.array(z.string()).optional()
369
+ }).strict();
370
+ z.object({
371
+ query: z.string(),
372
+ filter: vectorSearchFilterSchema.optional(),
373
+ limit: z.number().int().min(1).max(100).optional(),
374
+ offset: z.number().int().min(0).optional()
375
+ }).strict();
376
+ const vectorSearchHitSchema = z.object({
377
+ agent: searchHitSchema,
378
+ score: z.number().optional(),
379
+ highlights: z.record(z.array(z.string())).optional()
380
+ });
381
+ const vectorSearchResponseSchema = z.object({
382
+ hits: z.array(vectorSearchHitSchema),
383
+ total: z.number(),
384
+ took: z.number(),
385
+ totalAvailable: z.number().optional(),
386
+ visible: z.number().optional(),
387
+ limited: z.boolean().optional(),
388
+ credits_used: z.number().optional()
389
+ });
390
+ const vectorStatusSchema = z.object({
391
+ enabled: z.boolean(),
392
+ healthy: z.boolean(),
393
+ mode: z.enum(["disabled", "initializing", "healthy", "degraded", "error"]),
394
+ lastUpdated: z.string(),
395
+ details: z.record(z.any()).optional(),
396
+ lastError: z.object({
397
+ message: z.string(),
398
+ stack: z.string().optional(),
399
+ timestamp: z.string().optional()
400
+ }).optional()
401
+ });
402
+ const searchStatusResponseSchema = z.object({
403
+ storageMode: z.string(),
404
+ vectorStatus: vectorStatusSchema
405
+ });
406
+ const websocketStatsResponseSchema = z.object({
407
+ clients: z.number(),
408
+ stats: z.object({
409
+ totalClients: z.number().optional(),
410
+ clientsByRegistry: z.record(z.number()).optional(),
411
+ clientsByEventType: z.record(z.number()).optional()
412
+ }).passthrough()
413
+ });
414
+ const durationStatsSchema = z.object({
415
+ p50: z.number(),
416
+ p90: z.number(),
417
+ p95: z.number(),
418
+ p99: z.number()
419
+ });
420
+ const metricsSummaryResponseSchema = z.object({
421
+ http: z.object({
422
+ requestsTotal: z.number(),
423
+ activeConnections: z.number(),
424
+ requestDuration: durationStatsSchema
425
+ }),
426
+ search: z.object({
427
+ queriesTotal: z.number(),
428
+ queryDuration: durationStatsSchema
429
+ }),
430
+ indexing: z.object({ agentsTotal: z.number(), crawlErrors: z.number() }),
431
+ registration: z.object({
432
+ total: z.number(),
433
+ failures: z.number(),
434
+ duration: durationStatsSchema
435
+ }),
436
+ cache: z.object({
437
+ hits: z.number(),
438
+ misses: z.number(),
439
+ hitRate: z.number()
440
+ }),
441
+ websocket: z.object({ connections: z.number() })
442
+ });
443
+ z.object({
444
+ uaid: z.string(),
445
+ valid: z.boolean(),
446
+ formats: z.array(z.string())
447
+ });
448
+ const adapterConnectionSchema = z.object({
449
+ id: z.string(),
450
+ agentId: z.string(),
451
+ protocol: z.string(),
452
+ endpoint: z.string(),
453
+ status: z.enum(["connected", "disconnected", "error"]),
454
+ metadata: z.record(jsonPrimitiveSchema).optional(),
455
+ createdAt: z.string()
456
+ });
457
+ z.object({
458
+ connected: z.boolean(),
459
+ connection: adapterConnectionSchema.optional(),
460
+ adapter: z.string().optional(),
461
+ agentId: z.string().optional()
462
+ });
463
+ z.object({
464
+ operatorId: z.string().optional(),
465
+ adapters: z.array(
466
+ z.object({
467
+ name: z.string(),
468
+ version: z.string(),
469
+ status: z.string(),
470
+ agentCount: z.number(),
471
+ lastDiscovery: z.string(),
472
+ registryType: z.string(),
473
+ health: z.string()
474
+ })
475
+ ).optional(),
476
+ totalAgents: z.number().optional(),
477
+ elasticsearchDocumentCount: z.number().optional(),
478
+ agentsByAdapter: z.record(z.number()).optional(),
479
+ agentsByRegistry: z.record(z.number()).optional(),
480
+ systemInfo: z.object({
481
+ uptime: z.number().optional(),
482
+ version: z.string().optional(),
483
+ network: z.string().optional()
484
+ }).optional()
485
+ });
486
+ const registrationAgentSchema = z.object({
487
+ id: z.string(),
488
+ name: z.string(),
489
+ type: z.string(),
490
+ endpoint: z.string().optional(),
491
+ capabilities: z.array(capabilityValueSchema),
492
+ registry: z.string().optional(),
493
+ protocol: z.string().optional(),
494
+ profile: agentProfileSchema.optional(),
495
+ nativeId: z.string().optional(),
496
+ metadata: z.record(jsonValueSchema).optional()
497
+ });
498
+ const registrationProfileInfoSchema = z.object({
499
+ tId: z.string().nullable(),
500
+ sizeBytes: z.number().optional()
501
+ });
502
+ const profileRegistrySchema = z.object({
503
+ topicId: z.string().optional(),
504
+ sequenceNumber: z.number().optional(),
505
+ profileReference: z.string().optional(),
506
+ profileTopicId: z.string().optional()
507
+ }).passthrough().nullable().optional();
508
+ const additionalRegistryResultSchema = z.object({
509
+ registry: z.string(),
510
+ status: z.enum([
511
+ "created",
512
+ "duplicate",
513
+ "skipped",
514
+ "error",
515
+ "updated",
516
+ "pending"
517
+ ]),
518
+ agentId: z.string().nullable().optional(),
519
+ agentUri: z.string().nullable().optional(),
520
+ error: z.string().optional(),
521
+ metadata: z.record(jsonValueSchema).optional(),
522
+ registryKey: z.string().optional(),
523
+ networkId: z.string().optional(),
524
+ networkName: z.string().optional(),
525
+ chainId: z.number().optional(),
526
+ estimatedCredits: z.number().nullable().optional(),
527
+ gasEstimateCredits: z.number().nullable().optional(),
528
+ gasEstimateUsd: z.number().nullable().optional(),
529
+ gasPriceGwei: z.number().nullable().optional(),
530
+ gasLimit: z.number().nullable().optional(),
531
+ creditMode: z.enum(["fixed", "gas"]).nullable().optional(),
532
+ minCredits: z.number().nullable().optional(),
533
+ consumedCredits: z.number().nullable().optional(),
534
+ cost: z.object({
535
+ credits: z.number(),
536
+ usd: z.number(),
537
+ eth: z.number(),
538
+ gasUsedWei: z.string(),
539
+ effectiveGasPriceWei: z.string().nullable().optional(),
540
+ transactions: z.array(
541
+ z.object({
542
+ hash: z.string(),
543
+ gasUsedWei: z.string(),
544
+ effectiveGasPriceWei: z.string().nullable().optional(),
545
+ costWei: z.string()
546
+ })
547
+ ).optional()
548
+ }).optional()
549
+ });
550
+ const registrationCreditsSchema = z.object({
551
+ base: z.number(),
552
+ additional: z.number(),
553
+ total: z.number()
554
+ });
555
+ const hcs10RegistrySchema = z.object({
556
+ status: z.string(),
557
+ uaid: z.string().optional(),
558
+ transactionId: z.string().optional(),
559
+ consensusTimestamp: z.string().optional(),
560
+ registryTopicId: z.string().optional(),
561
+ topicSequenceNumber: z.number().optional(),
562
+ payloadHash: z.string().optional(),
563
+ profileReference: z.string().optional(),
564
+ tId: z.string().optional(),
565
+ profileSizeBytes: z.number().optional(),
566
+ error: z.string().optional()
567
+ }).passthrough();
568
+ const additionalRegistryNetworkSchema = z.object({
569
+ key: z.string(),
570
+ registryId: z.string().optional(),
571
+ networkId: z.string().optional(),
572
+ name: z.string().optional(),
573
+ chainId: z.number().optional(),
574
+ label: z.string().optional(),
575
+ estimatedCredits: z.number().nullable().optional(),
576
+ baseCredits: z.number().nullable().optional(),
577
+ gasPortionCredits: z.number().nullable().optional(),
578
+ gasPortionUsd: z.number().nullable().optional(),
579
+ gasEstimateCredits: z.number().nullable().optional(),
580
+ gasEstimateUsd: z.number().nullable().optional(),
581
+ gasPriceGwei: z.number().nullable().optional(),
582
+ gasLimit: z.number().nullable().optional(),
583
+ minCredits: z.number().nullable().optional(),
584
+ creditMode: z.string().nullable().optional()
585
+ }).passthrough();
586
+ const additionalRegistryDescriptorSchema = z.object({
587
+ id: z.string(),
588
+ label: z.string(),
589
+ networks: z.array(additionalRegistryNetworkSchema)
590
+ });
591
+ const additionalRegistryCatalogResponseSchema = z.object({
592
+ registries: z.array(additionalRegistryDescriptorSchema)
593
+ });
594
+ const registerAgentSuccessResponse = z.object({
595
+ success: z.literal(true),
596
+ status: z.enum(["created", "duplicate", "updated"]).optional(),
597
+ uaid: z.string(),
598
+ agentId: z.string(),
599
+ message: z.string().optional(),
600
+ registry: z.string().optional(),
601
+ attemptId: z.string().nullable().optional(),
602
+ agent: registrationAgentSchema,
603
+ openConvAI: z.object({
604
+ compatible: z.boolean(),
605
+ hcs11Profile: agentProfileSchema.optional(),
606
+ bridgeEndpoint: z.string().optional()
607
+ }).optional(),
608
+ profile: registrationProfileInfoSchema.optional(),
609
+ profileRegistry: profileRegistrySchema.nullable().optional(),
610
+ hcs10Registry: hcs10RegistrySchema.nullable().optional(),
611
+ credits: registrationCreditsSchema.optional(),
612
+ additionalRegistries: z.array(additionalRegistryResultSchema).optional(),
613
+ additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
614
+ additionalRegistryCostPerRegistry: z.number().optional()
615
+ });
616
+ const registerAgentPendingResponse = z.object({
617
+ success: z.literal(true),
618
+ status: z.literal("pending"),
619
+ message: z.string(),
620
+ uaid: z.string(),
621
+ agentId: z.string(),
622
+ registry: z.string().optional(),
623
+ attemptId: z.string().nullable(),
624
+ agent: registrationAgentSchema,
625
+ openConvAI: z.object({
626
+ compatible: z.boolean(),
627
+ hcs11Profile: agentProfileSchema.optional(),
628
+ bridgeEndpoint: z.string().optional()
629
+ }).optional(),
630
+ profile: registrationProfileInfoSchema.optional(),
631
+ profileRegistry: profileRegistrySchema.nullable().optional(),
632
+ hcs10Registry: hcs10RegistrySchema.nullable().optional(),
633
+ credits: registrationCreditsSchema,
634
+ additionalRegistries: z.array(additionalRegistryResultSchema),
635
+ additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
636
+ additionalRegistryCostPerRegistry: z.number().optional()
637
+ });
638
+ const registerAgentPartialResponse = z.object({
639
+ success: z.literal(false),
640
+ status: z.literal("partial"),
641
+ message: z.string(),
642
+ uaid: z.string(),
643
+ agentId: z.string(),
644
+ registry: z.string().optional(),
645
+ attemptId: z.string().nullable().optional(),
646
+ agent: registrationAgentSchema,
647
+ openConvAI: z.object({
648
+ compatible: z.boolean(),
649
+ hcs11Profile: agentProfileSchema.optional(),
650
+ bridgeEndpoint: z.string().optional()
651
+ }).optional(),
652
+ profile: registrationProfileInfoSchema.optional(),
653
+ profileRegistry: profileRegistrySchema.nullable().optional(),
654
+ hcs10Registry: hcs10RegistrySchema.nullable().optional(),
655
+ credits: registrationCreditsSchema.optional(),
656
+ additionalRegistries: z.array(additionalRegistryResultSchema).optional(),
657
+ additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
658
+ additionalRegistryCostPerRegistry: z.number().optional(),
659
+ errors: z.array(
660
+ z.object({
661
+ registry: z.string(),
662
+ registryKey: z.string().nullable().optional(),
663
+ error: z.string()
664
+ })
665
+ ).min(1)
666
+ });
667
+ z.union([
668
+ registerAgentSuccessResponse,
669
+ registerAgentPendingResponse,
670
+ registerAgentPartialResponse
671
+ ]);
672
+ const registrationProgressAdditionalEntry = z.object({
673
+ registryId: z.string(),
674
+ registryKey: z.string(),
675
+ networkId: z.string().optional(),
676
+ networkName: z.string().optional(),
677
+ chainId: z.number().optional(),
678
+ label: z.string().optional(),
679
+ status: z.enum(["pending", "in_progress", "completed", "failed"]),
680
+ error: z.string().optional(),
681
+ credits: z.number().nullable().optional(),
682
+ agentId: z.string().nullable().optional(),
683
+ agentUri: z.string().nullable().optional(),
684
+ metadata: z.record(jsonValueSchema).optional(),
685
+ lastUpdated: z.string()
686
+ });
687
+ const registrationProgressRecord = z.object({
688
+ attemptId: z.string(),
689
+ mode: z.enum(["register", "update"]),
690
+ status: z.enum(["pending", "partial", "completed", "failed"]),
691
+ uaid: z.string().optional(),
692
+ agentId: z.string().optional(),
693
+ registryNamespace: z.string(),
694
+ accountId: z.string().optional(),
695
+ startedAt: z.string(),
696
+ completedAt: z.string().optional(),
697
+ primary: z.object({
698
+ status: z.enum(["pending", "completed", "failed"]),
699
+ finishedAt: z.string().optional(),
700
+ error: z.string().optional()
701
+ }),
702
+ additionalRegistries: z.record(
703
+ z.string(),
704
+ registrationProgressAdditionalEntry
705
+ ),
706
+ errors: z.array(z.string()).optional()
707
+ });
708
+ z.object({
709
+ progress: registrationProgressRecord
710
+ });
711
+ z.object({
712
+ accountId: z.string().nullable().optional(),
713
+ registry: z.string().optional(),
714
+ protocol: z.string().optional(),
715
+ requiredCredits: z.number(),
716
+ availableCredits: z.number().nullable().optional(),
717
+ shortfallCredits: z.number().nullable().optional(),
718
+ creditsPerHbar: z.number().nullable().optional(),
719
+ estimatedHbar: z.number().nullable().optional()
720
+ });
721
+ z.object({
722
+ success: z.boolean().optional(),
723
+ purchaser: z.string(),
724
+ credits: z.number(),
725
+ hbarAmount: z.number(),
726
+ transactionId: z.string(),
727
+ consensusTimestamp: z.string().nullable().optional()
728
+ });
729
+ const x402SettlementSchema = z.object({
730
+ success: z.boolean().optional(),
731
+ transaction: z.string().optional(),
732
+ network: z.string().optional(),
733
+ payer: z.string().optional(),
734
+ errorReason: z.string().optional()
735
+ }).strict();
736
+ z.object({
737
+ success: z.boolean(),
738
+ accountId: z.string(),
739
+ creditedCredits: z.number(),
740
+ usdAmount: z.number(),
741
+ balance: z.number(),
742
+ payment: z.object({
743
+ payer: z.string().optional(),
744
+ requirement: z.record(jsonValueSchema).optional(),
745
+ settlement: x402SettlementSchema.optional()
746
+ }).optional()
747
+ });
748
+ z.object({
749
+ minimums: z.record(
750
+ z.object({
751
+ network: z.string().optional(),
752
+ gasLimit: z.number().optional(),
753
+ gasPriceWei: z.string().optional(),
754
+ gasUsd: z.number().optional(),
755
+ minUsd: z.number().optional(),
756
+ ethUsd: z.number().optional(),
757
+ fetchedAt: z.string().optional(),
758
+ source: z.string().optional()
759
+ })
760
+ ).optional(),
761
+ creditUnitUsd: z.number().optional()
762
+ });
763
+ z.object({
764
+ adapters: z.array(z.string())
765
+ });
766
+ const adapterRegistryCategorySchema = z.object({
767
+ id: z.number().int(),
768
+ network: z.string(),
769
+ type: z.string(),
770
+ slug: z.string(),
771
+ name: z.string(),
772
+ description: z.string().nullable().optional(),
773
+ topicId: z.string(),
774
+ versionTopicId: z.string(),
775
+ registryTransactionId: z.string().nullable().optional(),
776
+ versionTransactionId: z.string().nullable().optional(),
777
+ metadataPointer: z.string().nullable().optional(),
778
+ metadataSequence: z.number().int().nullable().optional(),
779
+ createdAt: z.string(),
780
+ updatedAt: z.string(),
781
+ metadata: jsonValueSchema.optional().nullable()
782
+ });
783
+ z.object({
784
+ categories: z.array(adapterRegistryCategorySchema)
785
+ });
786
+ const adapterRegistryAdapterSchema = z.object({
787
+ id: z.union([z.string(), z.number()]).optional(),
788
+ network: z.string().optional(),
789
+ categoryId: z.union([z.string(), z.number()]).nullable().optional(),
790
+ operation: z.string().optional(),
791
+ adapterId: z.string(),
792
+ adapterName: z.string(),
793
+ entity: z.string(),
794
+ manifestPointer: z.string().nullable().optional(),
795
+ manifestSequence: z.number().int().nullable().optional(),
796
+ packageRegistry: z.string().nullable().optional(),
797
+ packageName: z.string().nullable().optional(),
798
+ packageVersion: z.string().nullable().optional(),
799
+ packageIntegrity: z.string().nullable().optional(),
800
+ stateModel: z.string().nullable().optional(),
801
+ config: jsonValueSchema.nullable().optional(),
802
+ signature: z.string().nullable().optional(),
803
+ manifest: jsonValueSchema.nullable().optional(),
804
+ keywords: z.array(z.string()).optional(),
805
+ searchText: z.string().nullable().optional(),
806
+ creditAccountId: z.string().nullable().optional(),
807
+ registeredByUserId: z.string().nullable().optional(),
808
+ registeredByEmail: z.string().nullable().optional(),
809
+ totalCostHbar: z.number().nullable().optional(),
810
+ totalCostCredits: z.number().nullable().optional(),
811
+ consensusTimestamp: z.string().nullable().optional(),
812
+ sequenceNumber: z.number().int().nullable().optional(),
813
+ payerAccountId: z.string().nullable().optional(),
814
+ mirrorNodePayload: jsonValueSchema.nullable().optional(),
815
+ versionTopicId: z.string().nullable().optional(),
816
+ declarationTopicId: z.string().nullable().optional(),
817
+ categoryEntrySequence: z.number().int().nullable().optional(),
818
+ categoryEntryTransactionId: z.string().nullable().optional(),
819
+ versionPointerSequence: z.number().int().nullable().optional(),
820
+ versionPointerTransactionId: z.string().nullable().optional(),
821
+ transactionId: z.string().nullable().optional(),
822
+ createdAt: z.string().optional(),
823
+ category: adapterRegistryCategorySchema.optional()
824
+ }).passthrough();
825
+ z.object({
826
+ network: z.string(),
827
+ adapters: z.array(adapterRegistryAdapterSchema)
828
+ });
829
+ z.object({
830
+ category: adapterRegistryCategorySchema
831
+ });
832
+ z.object({
833
+ adapter: z.record(jsonValueSchema),
834
+ declaration: adapterDeclarationSchema,
835
+ transactionId: z.string().optional().nullable(),
836
+ category: adapterRegistryCategorySchema
837
+ });
838
+ z.object({
839
+ submissionId: z.string(),
840
+ status: z.string().optional(),
841
+ network: z.string().optional(),
842
+ message: z.string().optional()
843
+ }).passthrough();
844
+ z.object({
845
+ submission: z.object({
846
+ id: z.string(),
847
+ network: z.string(),
848
+ status: z.enum(["pending", "running", "completed", "failed"]),
849
+ adapterId: z.string(),
850
+ categorySlug: z.string().nullable().optional(),
851
+ creditAccountId: z.string().nullable().optional(),
852
+ registeredByUserId: z.string().nullable().optional(),
853
+ registeredByEmail: z.string().nullable().optional(),
854
+ requestPayload: jsonValueSchema.optional(),
855
+ resultPayload: jsonValueSchema.nullable().optional(),
856
+ error: z.string().nullable().optional(),
857
+ createdAt: z.string().optional(),
858
+ updatedAt: z.string().optional(),
859
+ startedAt: z.string().nullable().optional(),
860
+ completedAt: z.string().nullable().optional()
861
+ }).passthrough()
862
+ });
863
+ const adapterChatProfileSchema = z.object({
864
+ supportsChat: z.boolean(),
865
+ delivery: z.string().optional(),
866
+ transport: z.string().optional(),
867
+ streaming: z.boolean().optional(),
868
+ requiresAuth: z.array(z.string()).optional(),
869
+ notes: z.string().optional()
870
+ });
871
+ const adapterCapabilitiesSchema = z.object({
872
+ discovery: z.boolean(),
873
+ routing: z.boolean(),
874
+ communication: z.boolean(),
875
+ translation: z.boolean(),
876
+ protocols: z.array(z.string())
877
+ });
878
+ const adapterDescriptorSchema = z.object({
879
+ id: z.string(),
880
+ name: z.string(),
881
+ version: z.string(),
882
+ author: z.string(),
883
+ description: z.string(),
884
+ supportedProtocols: z.array(z.string()),
885
+ registryType: z.enum(["web2", "web3", "hybrid"]),
886
+ chatProfile: adapterChatProfileSchema.optional(),
887
+ capabilities: adapterCapabilitiesSchema,
888
+ enabled: z.boolean(),
889
+ priority: z.number(),
890
+ status: z.enum(["running", "stopped"])
891
+ });
892
+ z.object({
893
+ adapters: z.array(adapterDescriptorSchema)
894
+ });
895
+ const metadataFacetOptionSchema = z.object({
896
+ value: z.union([z.string(), z.number(), z.boolean()]),
897
+ label: z.string()
898
+ });
899
+ const searchFacetSchema = z.object({
900
+ key: z.string(),
901
+ label: z.string(),
902
+ description: z.string().optional(),
903
+ type: z.enum(["string", "boolean", "number"]),
904
+ adapters: z.array(z.string()).optional(),
905
+ options: z.array(metadataFacetOptionSchema).optional()
906
+ });
907
+ const searchFacetsResponseSchema = z.object({
908
+ facets: z.array(searchFacetSchema)
909
+ });
159
910
  export {
160
- FeeConfigBuilder
911
+ AIAgentCapability,
912
+ AIAgentType,
913
+ adapterChatProfileSchema,
914
+ adapterDescriptorSchema,
915
+ adapterRegistryAdapterSchema,
916
+ adapterRegistryCategorySchema,
917
+ additionalRegistryCatalogResponseSchema,
918
+ agentFeedbackEligibilityResponseSchema,
919
+ agentFeedbackEntriesIndexResponseSchema,
920
+ agentFeedbackIndexResponseSchema,
921
+ agentFeedbackResponseSchema,
922
+ agentFeedbackSubmissionResponseSchema,
923
+ detectProtocolResponseSchema,
924
+ metricsSummaryResponseSchema,
925
+ popularResponseSchema,
926
+ protocolsResponseSchema,
927
+ registriesResponseSchema,
928
+ registrySearchByNamespaceSchema,
929
+ searchFacetsResponseSchema,
930
+ searchResponseSchema,
931
+ searchStatusResponseSchema,
932
+ statsResponseSchema,
933
+ vectorSearchResponseSchema,
934
+ websocketStatsResponseSchema
161
935
  };
162
936
  //# sourceMappingURL=standards-sdk.es139.js.map