@hashgraphonline/standards-sdk 0.1.180 → 0.1.181

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 (132) hide show
  1. package/dist/browser/services/registry-broker/client/base-client.d.ts +3 -0
  2. package/dist/browser/services/registry-broker/client/base-client.d.ts.map +1 -1
  3. package/dist/browser/services/registry-broker/client/guard.d.ts.map +1 -1
  4. package/dist/browser/services/registry-broker/types.d.ts +3 -0
  5. package/dist/browser/services/registry-broker/types.d.ts.map +1 -1
  6. package/dist/browser-root/services/registry-broker/client/base-client.d.ts +3 -0
  7. package/dist/browser-root/services/registry-broker/client/base-client.d.ts.map +1 -1
  8. package/dist/browser-root/services/registry-broker/client/guard.d.ts.map +1 -1
  9. package/dist/browser-root/services/registry-broker/types.d.ts +3 -0
  10. package/dist/browser-root/services/registry-broker/types.d.ts.map +1 -1
  11. package/dist/browser-root/standards-sdk.root-browser.js +340 -104
  12. package/dist/browser-root/standards-sdk.root-browser.js.map +1 -1
  13. package/dist/cjs/services/registry-broker/client/base-client.d.ts +3 -0
  14. package/dist/cjs/services/registry-broker/client/base-client.d.ts.map +1 -1
  15. package/dist/cjs/services/registry-broker/client/guard.d.ts.map +1 -1
  16. package/dist/cjs/services/registry-broker/types.d.ts +3 -0
  17. package/dist/cjs/services/registry-broker/types.d.ts.map +1 -1
  18. package/dist/cjs/standards-sdk.cjs +1 -1
  19. package/dist/cjs/standards-sdk.cjs.map +1 -1
  20. package/dist/es/services/registry-broker/client/base-client.d.ts +3 -0
  21. package/dist/es/services/registry-broker/client/base-client.d.ts.map +1 -1
  22. package/dist/es/services/registry-broker/client/guard.d.ts.map +1 -1
  23. package/dist/es/services/registry-broker/types.d.ts +3 -0
  24. package/dist/es/services/registry-broker/types.d.ts.map +1 -1
  25. package/dist/es/standards-sdk.es.js +10 -7
  26. package/dist/es/standards-sdk.es.js.map +1 -1
  27. package/dist/es/standards-sdk.es104.js +1 -1
  28. package/dist/es/standards-sdk.es106.js +1 -1
  29. package/dist/es/standards-sdk.es108.js +1 -1
  30. package/dist/es/standards-sdk.es11.js +1 -1
  31. package/dist/es/standards-sdk.es110.js +1 -1
  32. package/dist/es/standards-sdk.es116.js +1 -1
  33. package/dist/es/standards-sdk.es12.js +1 -1
  34. package/dist/es/standards-sdk.es121.js +1 -1
  35. package/dist/es/standards-sdk.es127.js +2 -2
  36. package/dist/es/standards-sdk.es142.js +1 -1
  37. package/dist/es/standards-sdk.es145.js +43 -14
  38. package/dist/es/standards-sdk.es145.js.map +1 -1
  39. package/dist/es/standards-sdk.es147.js +3 -3
  40. package/dist/es/standards-sdk.es148.js +4 -81
  41. package/dist/es/standards-sdk.es148.js.map +1 -1
  42. package/dist/es/standards-sdk.es149.js +71 -77
  43. package/dist/es/standards-sdk.es149.js.map +1 -1
  44. package/dist/es/standards-sdk.es150.js +80 -53
  45. package/dist/es/standards-sdk.es150.js.map +1 -1
  46. package/dist/es/standards-sdk.es151.js +53 -152
  47. package/dist/es/standards-sdk.es151.js.map +1 -1
  48. package/dist/es/standards-sdk.es152.js +159 -7
  49. package/dist/es/standards-sdk.es152.js.map +1 -1
  50. package/dist/es/standards-sdk.es153.js +7 -86
  51. package/dist/es/standards-sdk.es153.js.map +1 -1
  52. package/dist/es/standards-sdk.es154.js +64 -43
  53. package/dist/es/standards-sdk.es154.js.map +1 -1
  54. package/dist/es/standards-sdk.es155.js +65 -30
  55. package/dist/es/standards-sdk.es155.js.map +1 -1
  56. package/dist/es/standards-sdk.es156.js +30 -34
  57. package/dist/es/standards-sdk.es156.js.map +1 -1
  58. package/dist/es/standards-sdk.es157.js +34 -48
  59. package/dist/es/standards-sdk.es157.js.map +1 -1
  60. package/dist/es/standards-sdk.es158.js +48 -138
  61. package/dist/es/standards-sdk.es158.js.map +1 -1
  62. package/dist/es/standards-sdk.es159.js +133 -37
  63. package/dist/es/standards-sdk.es159.js.map +1 -1
  64. package/dist/es/standards-sdk.es16.js +2 -2
  65. package/dist/es/standards-sdk.es160.js +42 -2352
  66. package/dist/es/standards-sdk.es160.js.map +1 -1
  67. package/dist/es/standards-sdk.es162.js +2352 -672
  68. package/dist/es/standards-sdk.es162.js.map +1 -1
  69. package/dist/es/standards-sdk.es163.js +15 -54
  70. package/dist/es/standards-sdk.es163.js.map +1 -1
  71. package/dist/es/standards-sdk.es165.js +63 -71
  72. package/dist/es/standards-sdk.es165.js.map +1 -1
  73. package/dist/es/standards-sdk.es166.js +48 -192
  74. package/dist/es/standards-sdk.es166.js.map +1 -1
  75. package/dist/es/standards-sdk.es167.js +79 -15
  76. package/dist/es/standards-sdk.es167.js.map +1 -1
  77. package/dist/es/standards-sdk.es168.js +181 -54
  78. package/dist/es/standards-sdk.es168.js.map +1 -1
  79. package/dist/es/standards-sdk.es175.js +653 -120
  80. package/dist/es/standards-sdk.es175.js.map +1 -1
  81. package/dist/es/standards-sdk.es176.js +111 -303
  82. package/dist/es/standards-sdk.es176.js.map +1 -1
  83. package/dist/es/standards-sdk.es177.js +297 -225
  84. package/dist/es/standards-sdk.es177.js.map +1 -1
  85. package/dist/es/standards-sdk.es178.js +239 -176
  86. package/dist/es/standards-sdk.es178.js.map +1 -1
  87. package/dist/es/standards-sdk.es179.js +178 -101
  88. package/dist/es/standards-sdk.es179.js.map +1 -1
  89. package/dist/es/standards-sdk.es18.js +4 -4
  90. package/dist/es/standards-sdk.es180.js +75 -108
  91. package/dist/es/standards-sdk.es180.js.map +1 -1
  92. package/dist/es/standards-sdk.es181.js +116 -148
  93. package/dist/es/standards-sdk.es181.js.map +1 -1
  94. package/dist/es/standards-sdk.es182.js +143 -439
  95. package/dist/es/standards-sdk.es182.js.map +1 -1
  96. package/dist/es/standards-sdk.es183.js +661 -162
  97. package/dist/es/standards-sdk.es183.js.map +1 -1
  98. package/dist/es/standards-sdk.es184.js +156 -206
  99. package/dist/es/standards-sdk.es184.js.map +1 -1
  100. package/dist/es/standards-sdk.es185.js +219 -223
  101. package/dist/es/standards-sdk.es185.js.map +1 -1
  102. package/dist/es/standards-sdk.es186.js +242 -0
  103. package/dist/es/standards-sdk.es186.js.map +1 -0
  104. package/dist/es/standards-sdk.es19.js +2 -2
  105. package/dist/es/standards-sdk.es22.js +1 -1
  106. package/dist/es/standards-sdk.es27.js +4 -4
  107. package/dist/es/standards-sdk.es35.js +2 -2
  108. package/dist/es/standards-sdk.es36.js +2 -2
  109. package/dist/es/standards-sdk.es4.js +1 -1
  110. package/dist/es/standards-sdk.es53.js +1 -1
  111. package/dist/es/standards-sdk.es56.js +1 -1
  112. package/dist/es/standards-sdk.es59.js +1 -1
  113. package/dist/es/standards-sdk.es62.js +1 -1
  114. package/dist/es/standards-sdk.es63.js +2 -2
  115. package/dist/es/standards-sdk.es64.js +1 -1
  116. package/dist/es/standards-sdk.es65.js +1 -1
  117. package/dist/es/standards-sdk.es67.js +3 -3
  118. package/dist/es/standards-sdk.es7.js +1 -1
  119. package/dist/es/standards-sdk.es71.js +1 -1
  120. package/dist/es/standards-sdk.es72.js +2 -2
  121. package/dist/es/standards-sdk.es75.js +2 -2
  122. package/dist/es/standards-sdk.es76.js +1 -1
  123. package/dist/es/standards-sdk.es78.js +1 -1
  124. package/dist/es/standards-sdk.es83.js +1 -1
  125. package/dist/es/standards-sdk.es84.js +2 -2
  126. package/dist/es/standards-sdk.es85.js +1 -1
  127. package/dist/es/standards-sdk.es88.js +1 -1
  128. package/dist/es/standards-sdk.es90.js +1 -1
  129. package/dist/es/standards-sdk.es94.js +3 -3
  130. package/dist/es/standards-sdk.es98.js +1 -1
  131. package/dist/es/standards-sdk.es99.js +1 -1
  132. package/package.json +1 -1
@@ -1,2355 +1,45 @@
1
- import { z } from "zod";
2
- import { adapterDeclarationSchema } from "./standards-sdk.es86.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
- const resolveResponseSchema = z.object({
180
- agent: searchHitSchema
181
- });
182
- const delegationPlanCandidateSchema = z.object({
183
- uaid: z.string(),
184
- score: z.number(),
185
- displayName: z.string().optional(),
186
- summary: z.string().optional(),
187
- protocols: z.array(z.string()).optional(),
188
- surfaces: z.array(z.string()).optional(),
189
- languages: z.array(z.string()).optional(),
190
- artifacts: z.array(z.string()).optional(),
191
- availability: z.boolean().optional(),
192
- explanation: z.string().optional()
193
- }).passthrough();
194
- const delegationOpportunitySchema = z.object({
195
- id: z.string(),
196
- title: z.string(),
197
- reason: z.string(),
198
- role: z.string(),
199
- type: z.enum(["ai-agents", "mcp-servers"]),
200
- suggestedMode: z.enum(["best-match", "fallback", "parallel"]),
201
- searchQueries: z.array(z.string()),
202
- protocols: z.array(z.string()).optional(),
203
- surfaces: z.array(z.string()).optional(),
204
- languages: z.array(z.string()).optional(),
205
- artifacts: z.array(z.string()).optional(),
206
- candidates: z.array(delegationPlanCandidateSchema)
207
- }).passthrough();
208
- const delegationRecommendationSchema = z.object({
209
- action: z.enum(["delegate-now", "review-shortlist", "handle-locally"]),
210
- confidence: z.number(),
211
- reason: z.string(),
212
- opportunityId: z.string().optional(),
213
- candidate: delegationPlanCandidateSchema.optional()
214
- }).passthrough();
215
- const delegationPlanResponseSchema = z.object({
216
- task: z.string(),
217
- context: z.string().optional(),
218
- summary: z.string().optional(),
219
- intents: z.array(z.string()),
220
- protocols: z.array(z.string()),
221
- surfaces: z.array(z.string()),
222
- languages: z.array(z.string()).optional(),
223
- artifacts: z.array(z.string()).optional(),
224
- shouldDelegate: z.boolean(),
225
- localFirstReason: z.string().optional(),
226
- recommendation: delegationRecommendationSchema.optional(),
227
- opportunities: z.array(delegationOpportunitySchema)
228
- }).passthrough();
229
- const agentFeedbackSummarySchema = z.object({
230
- averageScore: z.number(),
231
- totalFeedbacks: z.number(),
232
- registry: z.string().optional(),
233
- network: z.string().optional(),
234
- updatedAt: z.string().optional()
235
- });
236
- const agentFeedbackEntrySchema = z.object({
237
- registry: z.string(),
238
- network: z.string().optional(),
239
- agentId: z.number(),
240
- client: z.string(),
241
- score: z.number(),
242
- tag1: z.string().nullable().optional(),
243
- tag2: z.string().nullable().optional(),
244
- revoked: z.boolean(),
245
- feedbackIndex: z.number().nullable().optional(),
246
- fileUri: z.string().nullable().optional(),
247
- fileHash: z.string().nullable().optional(),
248
- createdAt: z.string().nullable().optional()
249
- });
250
- const agentFeedbackResponseSchema = z.object({
251
- uaid: z.string(),
252
- summary: agentFeedbackSummarySchema,
253
- entries: z.array(agentFeedbackEntrySchema)
254
- });
255
- const agentFeedbackEligibilityResponseSchema = z.object({
256
- uaid: z.string(),
257
- sessionId: z.string(),
258
- eligible: z.boolean(),
259
- messageCount: z.number(),
260
- minimumMessages: z.number(),
261
- reason: z.string().optional(),
262
- onchain: z.object({
263
- eligible: z.boolean(),
264
- reason: z.string().optional(),
265
- estimatedCredits: z.number().optional(),
266
- usdEstimate: z.number().optional(),
267
- nativeFeeEstimate: z.number().optional()
268
- }).optional()
269
- });
270
- const agentFeedbackSubmissionResponseSchema = z.object({
271
- uaid: z.string(),
272
- registry: z.string(),
273
- network: z.string().optional(),
274
- agentId: z.number(),
275
- score: z.number(),
276
- tag1: z.string().nullable().optional(),
277
- tag2: z.string().nullable().optional(),
278
- fileUri: z.string().nullable().optional(),
279
- fileHash: z.string().nullable().optional(),
280
- feedbackIndex: z.number().nullable().optional(),
281
- transactionHash: z.string().nullable().optional(),
282
- signature: z.string().nullable().optional(),
283
- submittedAt: z.string()
284
- });
285
- const agentFeedbackIndexResponseSchema = z.object({
286
- page: z.number(),
287
- limit: z.number(),
288
- total: z.number(),
289
- items: z.array(
290
- z.object({
291
- uaid: z.string(),
292
- registry: z.string(),
293
- network: z.string().optional(),
294
- agentId: z.number().nullable().optional(),
295
- summary: agentFeedbackSummarySchema.nullable(),
296
- trustScore: z.number().nullable().optional()
297
- })
298
- )
299
- });
300
- const agentFeedbackEntriesIndexResponseSchema = z.object({
301
- page: z.number(),
302
- limit: z.number(),
303
- total: z.number(),
304
- items: z.array(
305
- z.object({
306
- uaid: z.string(),
307
- entry: agentFeedbackEntrySchema
308
- })
309
- )
310
- });
311
- const createSessionResponseSchema = z.object({
312
- sessionId: z.string(),
313
- uaid: z.string().nullable().optional(),
314
- agent: z.object({
315
- name: z.string(),
316
- description: z.string().optional(),
317
- capabilities: z.record(jsonValueSchema).nullable().optional(),
318
- skills: z.array(z.string()).optional()
319
- }),
320
- history: z.array(chatHistoryEntrySchema).optional().default([]),
321
- historyTtlSeconds: z.number().nullable().optional(),
322
- encryption: sessionEncryptionSummarySchema.nullable().optional()
323
- });
324
- const sendMessageResponseSchema = z.object({
325
- sessionId: z.string(),
326
- uaid: z.string().nullable().optional(),
327
- message: z.string(),
328
- timestamp: z.string(),
329
- rawResponse: jsonValueSchema.optional(),
330
- content: z.string().optional(),
331
- ops: z.array(z.record(jsonValueSchema)).optional(),
332
- history: z.array(chatHistoryEntrySchema).optional(),
333
- historyTtlSeconds: z.number().nullable().optional(),
334
- encrypted: z.boolean().optional()
335
- });
336
- const chatHistorySnapshotResponseSchema = z.object({
337
- sessionId: z.string(),
338
- history: z.array(chatHistoryEntrySchema),
339
- historyTtlSeconds: z.number()
340
- });
341
- z.object({
342
- preserveEntries: z.number().int().min(0).optional()
343
- }).strict();
344
- const chatHistoryCompactionResponseSchema = z.object({
345
- sessionId: z.string(),
346
- history: z.array(chatHistoryEntrySchema),
347
- summaryEntry: chatHistoryEntrySchema,
348
- preservedEntries: z.array(chatHistoryEntrySchema),
349
- historyTtlSeconds: z.number(),
350
- creditsDebited: z.number(),
351
- metadata: z.record(jsonValueSchema).optional()
352
- });
353
- const sessionEncryptionStatusResponseSchema = z.object({
354
- sessionId: z.string(),
355
- encryption: sessionEncryptionSummarySchema.nullable()
356
- });
357
- const encryptionHandshakeResponseSchema = z.object({
358
- sessionId: z.string(),
359
- handshake: encryptionHandshakeRecordSchema
360
- });
361
- const registerEncryptionKeyResponseSchema = z.object({
362
- id: z.string(),
363
- keyType: z.string(),
364
- publicKey: z.string(),
365
- uaid: z.string().nullable(),
366
- ledgerAccountId: z.string().nullable(),
367
- ledgerNetwork: z.string().nullable().optional(),
368
- userId: z.string().nullable().optional(),
369
- email: z.string().nullable().optional(),
370
- createdAt: z.string(),
371
- updatedAt: z.string()
372
- });
373
- const ledgerChallengeResponseSchema = z.object({
374
- challengeId: z.string(),
375
- message: z.string(),
376
- expiresAt: z.string()
377
- });
378
- const ledgerApiKeySummarySchema = z.object({
379
- id: z.string(),
380
- label: z.string().optional(),
381
- prefix: z.string(),
382
- lastFour: z.string(),
383
- createdAt: z.string(),
384
- lastUsedAt: z.string().nullable().optional(),
385
- ownerType: z.literal("ledger"),
386
- ledgerAccountId: z.string().optional(),
387
- ledgerNetwork: z.string().optional(),
388
- ledgerNetworkCanonical: z.string().optional()
389
- });
390
- const ledgerVerifyResponseSchema = z.object({
391
- key: z.string(),
392
- apiKey: ledgerApiKeySummarySchema,
393
- accountId: z.string(),
394
- network: z.string(),
395
- networkCanonical: z.string().optional()
396
- });
397
- const protocolsResponseSchema = z.object({
398
- protocols: z.array(z.string())
399
- });
400
- const detectProtocolResponseSchema = z.object({
401
- protocol: z.string().nullable()
402
- });
403
- const registrySearchByNamespaceSchema = z.object({
404
- hits: z.array(searchHitSchema),
405
- total: z.number(),
406
- page: z.number().optional(),
407
- limit: z.number().optional()
408
- });
409
- const capabilityFilterValueSchema = z.union([z.string(), z.number()]);
410
- const vectorSearchFilterSchema = z.object({
411
- capabilities: z.array(capabilityFilterValueSchema).optional(),
412
- type: z.enum(["ai-agents", "mcp-servers"]).optional(),
413
- registry: z.string().optional(),
414
- protocols: z.array(z.string()).optional(),
415
- adapter: z.array(z.string()).optional()
416
- }).strict();
417
- z.object({
418
- query: z.string(),
419
- filter: vectorSearchFilterSchema.optional(),
420
- limit: z.number().int().min(1).max(100).optional(),
421
- offset: z.number().int().min(0).optional()
422
- }).strict();
423
- const vectorSearchHitSchema = z.object({
424
- agent: searchHitSchema,
425
- score: z.number().optional(),
426
- highlights: z.record(z.array(z.string())).optional()
427
- });
428
- const vectorSearchResponseSchema = z.object({
429
- hits: z.array(vectorSearchHitSchema),
430
- total: z.number(),
431
- took: z.number(),
432
- totalAvailable: z.number().optional(),
433
- visible: z.number().optional(),
434
- limited: z.boolean().optional(),
435
- credits_used: z.number().optional()
436
- });
437
- const vectorStatusSchema = z.object({
438
- enabled: z.boolean(),
439
- healthy: z.boolean(),
440
- mode: z.enum(["disabled", "initializing", "healthy", "degraded", "error"]),
441
- lastUpdated: z.string(),
442
- details: z.record(z.any()).optional(),
443
- lastError: z.object({
444
- message: z.string(),
445
- stack: z.string().optional(),
446
- timestamp: z.string().optional()
447
- }).optional()
448
- });
449
- const searchStatusResponseSchema = z.object({
450
- storageMode: z.string(),
451
- vectorStatus: vectorStatusSchema
452
- });
453
- const websocketStatsResponseSchema = z.object({
454
- clients: z.number(),
455
- stats: z.object({
456
- totalClients: z.number().optional(),
457
- clientsByRegistry: z.record(z.number()).optional(),
458
- clientsByEventType: z.record(z.number()).optional()
459
- }).passthrough()
460
- });
461
- const durationStatsSchema = z.object({
462
- p50: z.number(),
463
- p90: z.number(),
464
- p95: z.number(),
465
- p99: z.number()
466
- });
467
- const metricsSummaryResponseSchema = z.object({
468
- http: z.object({
469
- requestsTotal: z.number(),
470
- activeConnections: z.number(),
471
- requestDuration: durationStatsSchema
472
- }),
473
- search: z.object({
474
- queriesTotal: z.number(),
475
- queryDuration: durationStatsSchema
476
- }),
477
- indexing: z.object({ agentsTotal: z.number(), crawlErrors: z.number() }),
478
- registration: z.object({
479
- total: z.number(),
480
- failures: z.number(),
481
- duration: durationStatsSchema
482
- }),
483
- cache: z.object({
484
- hits: z.number(),
485
- misses: z.number(),
486
- hitRate: z.number()
487
- }),
488
- websocket: z.object({ connections: z.number() })
489
- });
490
- const uaidValidationResponseSchema = z.object({
491
- uaid: z.string(),
492
- valid: z.boolean(),
493
- formats: z.array(z.string())
494
- });
495
- const adapterConnectionSchema = z.object({
496
- id: z.string(),
497
- agentId: z.string(),
498
- protocol: z.string(),
499
- endpoint: z.string(),
500
- status: z.enum(["connected", "disconnected", "error"]),
501
- metadata: z.record(jsonPrimitiveSchema).optional(),
502
- createdAt: z.string()
503
- });
504
- const uaidConnectionStatusSchema = z.object({
505
- connected: z.boolean(),
506
- connection: adapterConnectionSchema.optional(),
507
- adapter: z.string().optional(),
508
- agentId: z.string().optional()
509
- });
510
- const dashboardStatsResponseSchema = z.object({
511
- operatorId: z.string().optional(),
512
- adapters: z.array(
513
- z.object({
514
- name: z.string(),
515
- version: z.string(),
516
- status: z.string(),
517
- agentCount: z.number(),
518
- lastDiscovery: z.string(),
519
- registryType: z.string(),
520
- health: z.string()
521
- })
522
- ).optional(),
523
- totalAgents: z.number().optional(),
524
- elasticsearchDocumentCount: z.number().optional(),
525
- agentsByAdapter: z.record(z.number()).optional(),
526
- agentsByRegistry: z.record(z.number()).optional(),
527
- systemInfo: z.object({
528
- uptime: z.number().optional(),
529
- version: z.string().optional(),
530
- network: z.string().optional()
531
- }).optional()
532
- });
533
- const registrationAgentSchema = z.object({
534
- id: z.string(),
535
- name: z.string(),
536
- type: z.string(),
537
- endpoint: z.string().optional(),
538
- capabilities: z.array(capabilityValueSchema),
539
- registry: z.string().optional(),
540
- protocol: z.string().optional(),
541
- profile: agentProfileSchema.optional(),
542
- nativeId: z.string().optional(),
543
- metadata: z.record(jsonValueSchema).optional()
544
- });
545
- const registrationProfileInfoSchema = z.object({
546
- tId: z.string().nullable(),
547
- sizeBytes: z.number().optional()
548
- });
549
- const profileRegistrySchema = z.object({
550
- topicId: z.string().optional(),
551
- sequenceNumber: z.number().optional(),
552
- profileReference: z.string().optional(),
553
- profileTopicId: z.string().optional()
554
- }).passthrough().nullable().optional();
555
- const additionalRegistryResultSchema = z.object({
556
- registry: z.string(),
557
- status: z.enum([
558
- "created",
559
- "duplicate",
560
- "skipped",
561
- "error",
562
- "updated",
563
- "pending"
564
- ]),
565
- agentId: z.string().nullable().optional(),
566
- agentUri: z.string().nullable().optional(),
567
- error: z.string().optional(),
568
- metadata: z.record(jsonValueSchema).optional(),
569
- registryKey: z.string().optional(),
570
- networkId: z.string().optional(),
571
- networkName: z.string().optional(),
572
- chainId: z.number().optional(),
573
- estimatedCredits: z.number().nullable().optional(),
574
- gasEstimateCredits: z.number().nullable().optional(),
575
- gasEstimateUsd: z.number().nullable().optional(),
576
- gasPriceGwei: z.number().nullable().optional(),
577
- gasLimit: z.number().nullable().optional(),
578
- creditMode: z.enum(["fixed", "gas"]).nullable().optional(),
579
- minCredits: z.number().nullable().optional(),
580
- consumedCredits: z.number().nullable().optional(),
581
- cost: z.object({
582
- credits: z.number(),
583
- usd: z.number(),
584
- eth: z.number(),
585
- gasUsedWei: z.string(),
586
- effectiveGasPriceWei: z.string().nullable().optional(),
587
- transactions: z.array(
588
- z.object({
589
- hash: z.string(),
590
- gasUsedWei: z.string(),
591
- effectiveGasPriceWei: z.string().nullable().optional(),
592
- costWei: z.string()
593
- })
594
- ).optional()
595
- }).optional()
596
- });
597
- const registrationCreditsSchema = z.object({
598
- base: z.number(),
599
- additional: z.number(),
600
- total: z.number()
601
- });
602
- const hcs10RegistrySchema = z.object({
603
- status: z.string(),
604
- uaid: z.string().optional(),
605
- transactionId: z.string().optional(),
606
- consensusTimestamp: z.string().optional(),
607
- registryTopicId: z.string().optional(),
608
- topicSequenceNumber: z.number().optional(),
609
- payloadHash: z.string().optional(),
610
- profileReference: z.string().optional(),
611
- tId: z.string().optional(),
612
- profileSizeBytes: z.number().optional(),
613
- error: z.string().optional()
614
- }).passthrough();
615
- const additionalRegistryNetworkSchema = z.object({
616
- key: z.string(),
617
- registryId: z.string().optional(),
618
- networkId: z.string().optional(),
619
- name: z.string().optional(),
620
- chainId: z.number().optional(),
621
- label: z.string().optional(),
622
- estimatedCredits: z.number().nullable().optional(),
623
- baseCredits: z.number().nullable().optional(),
624
- gasPortionCredits: z.number().nullable().optional(),
625
- gasPortionUsd: z.number().nullable().optional(),
626
- gasEstimateCredits: z.number().nullable().optional(),
627
- gasEstimateUsd: z.number().nullable().optional(),
628
- gasPriceGwei: z.number().nullable().optional(),
629
- gasLimit: z.number().nullable().optional(),
630
- minCredits: z.number().nullable().optional(),
631
- creditMode: z.string().nullable().optional()
632
- }).passthrough();
633
- const additionalRegistryDescriptorSchema = z.object({
634
- id: z.string(),
635
- label: z.string(),
636
- networks: z.array(additionalRegistryNetworkSchema)
637
- });
638
- const additionalRegistryCatalogResponseSchema = z.object({
639
- registries: z.array(additionalRegistryDescriptorSchema)
640
- });
641
- const registerAgentSuccessResponse = z.object({
642
- success: z.literal(true),
643
- status: z.enum(["created", "duplicate", "updated"]).optional(),
644
- uaid: z.string(),
645
- agentId: z.string(),
646
- message: z.string().optional(),
647
- registry: z.string().optional(),
648
- attemptId: z.string().nullable().optional(),
649
- agent: registrationAgentSchema,
650
- openConvAI: z.object({
651
- compatible: z.boolean(),
652
- hcs11Profile: agentProfileSchema.optional(),
653
- bridgeEndpoint: z.string().optional()
654
- }).optional(),
655
- profile: registrationProfileInfoSchema.optional(),
656
- profileRegistry: profileRegistrySchema.nullable().optional(),
657
- hcs10Registry: hcs10RegistrySchema.nullable().optional(),
658
- credits: registrationCreditsSchema.optional(),
659
- additionalRegistries: z.array(additionalRegistryResultSchema).optional(),
660
- additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
661
- additionalRegistryCostPerRegistry: z.number().optional(),
662
- additionalRegistrySecrets: z.record(z.string(), z.record(jsonValueSchema)).optional()
663
- });
664
- const registerAgentPendingResponse = z.object({
665
- success: z.literal(true),
666
- status: z.literal("pending"),
667
- message: z.string(),
668
- uaid: z.string(),
669
- agentId: z.string(),
670
- registry: z.string().optional(),
671
- attemptId: z.string().nullable(),
672
- agent: registrationAgentSchema,
673
- openConvAI: z.object({
674
- compatible: z.boolean(),
675
- hcs11Profile: agentProfileSchema.optional(),
676
- bridgeEndpoint: z.string().optional()
677
- }).optional(),
678
- profile: registrationProfileInfoSchema.optional(),
679
- profileRegistry: profileRegistrySchema.nullable().optional(),
680
- hcs10Registry: hcs10RegistrySchema.nullable().optional(),
681
- credits: registrationCreditsSchema,
682
- additionalRegistries: z.array(additionalRegistryResultSchema),
683
- additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
684
- additionalRegistryCostPerRegistry: z.number().optional(),
685
- additionalRegistrySecrets: z.record(z.string(), z.record(jsonValueSchema)).optional()
686
- });
687
- const registerAgentPartialResponse = z.object({
688
- success: z.literal(false),
689
- status: z.literal("partial"),
690
- message: z.string(),
691
- uaid: z.string(),
692
- agentId: z.string(),
693
- registry: z.string().optional(),
694
- attemptId: z.string().nullable().optional(),
695
- agent: registrationAgentSchema,
696
- openConvAI: z.object({
697
- compatible: z.boolean(),
698
- hcs11Profile: agentProfileSchema.optional(),
699
- bridgeEndpoint: z.string().optional()
700
- }).optional(),
701
- profile: registrationProfileInfoSchema.optional(),
702
- profileRegistry: profileRegistrySchema.nullable().optional(),
703
- hcs10Registry: hcs10RegistrySchema.nullable().optional(),
704
- credits: registrationCreditsSchema.optional(),
705
- additionalRegistries: z.array(additionalRegistryResultSchema).optional(),
706
- additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
707
- additionalRegistryCostPerRegistry: z.number().optional(),
708
- additionalRegistrySecrets: z.record(z.string(), z.record(jsonValueSchema)).optional(),
709
- errors: z.array(
710
- z.object({
711
- registry: z.string(),
712
- registryKey: z.string().nullable().optional(),
713
- error: z.string()
714
- })
715
- ).min(1)
716
- });
717
- const registerAgentResponseSchema = z.union([
718
- registerAgentSuccessResponse,
719
- registerAgentPendingResponse,
720
- registerAgentPartialResponse
721
- ]);
722
- const registrationProgressAdditionalEntry = z.object({
723
- registryId: z.string(),
724
- registryKey: z.string(),
725
- networkId: z.string().optional(),
726
- networkName: z.string().optional(),
727
- chainId: z.number().optional(),
728
- label: z.string().optional(),
729
- status: z.enum(["pending", "in_progress", "completed", "failed"]),
730
- error: z.string().optional(),
731
- credits: z.number().nullable().optional(),
732
- agentId: z.string().nullable().optional(),
733
- agentUri: z.string().nullable().optional(),
734
- metadata: z.record(jsonValueSchema).optional(),
735
- lastUpdated: z.string()
736
- });
737
- const registrationProgressRecord = z.object({
738
- attemptId: z.string(),
739
- mode: z.enum(["register", "update"]),
740
- status: z.enum(["pending", "partial", "completed", "failed"]),
741
- uaid: z.string().optional(),
742
- agentId: z.string().optional(),
743
- registryNamespace: z.string(),
744
- accountId: z.string().optional(),
745
- startedAt: z.string(),
746
- completedAt: z.string().optional(),
747
- primary: z.object({
748
- status: z.enum(["pending", "completed", "failed"]),
749
- finishedAt: z.string().optional(),
750
- error: z.string().optional()
751
- }),
752
- additionalRegistries: z.record(
753
- z.string(),
754
- registrationProgressAdditionalEntry
755
- ),
756
- errors: z.array(z.string()).optional()
757
- });
758
- const registrationProgressResponseSchema = z.object({
759
- progress: registrationProgressRecord
760
- });
761
- const registrationQuoteResponseSchema = z.object({
762
- accountId: z.string().nullable().optional(),
763
- registry: z.string().optional(),
764
- protocol: z.string().optional(),
765
- requiredCredits: z.number(),
766
- availableCredits: z.number().nullable().optional(),
767
- shortfallCredits: z.number().nullable().optional(),
768
- creditsPerHbar: z.number().nullable().optional(),
769
- estimatedHbar: z.number().nullable().optional()
770
- });
771
- const creditPurchaseResponseSchema = z.object({
772
- success: z.boolean().optional(),
773
- purchaser: z.string(),
774
- credits: z.number(),
775
- hbarAmount: z.number(),
776
- transactionId: z.string(),
777
- consensusTimestamp: z.string().nullable().optional()
778
- });
779
- const creditProviderSummarySchema = z.object({
780
- name: z.string(),
781
- publishableKey: z.string().optional(),
782
- currency: z.string().optional(),
783
- centsPerHbar: z.number().nullable().optional()
784
- });
785
- const creditProvidersResponseSchema = z.object({
786
- providers: z.array(creditProviderSummarySchema)
787
- });
788
- const creditBalanceResponseSchema = z.object({
789
- accountId: z.string(),
790
- balance: z.number(),
791
- balanceRecord: jsonValueSchema.optional(),
792
- timestamp: z.string().optional()
793
- });
794
- const guardPlanIdSchema = z.enum(["free", "pro", "team", "enterprise"]);
795
- const guardBucketBalanceSchema = z.object({
796
- bucketId: z.enum([
797
- "registry_credits",
798
- "chat_credits",
799
- "guard_credits",
800
- "org_policy_credits"
801
- ]),
802
- label: z.string(),
803
- availableCredits: z.number(),
804
- includedMonthlyCredits: z.number().nullable().optional()
805
- });
806
- const guardPrincipalSchema = z.object({
807
- signedIn: z.boolean(),
808
- principalType: z.enum(["user", "service"]).default("user"),
809
- userId: z.string().optional(),
810
- email: z.string().optional(),
811
- accountId: z.string().optional(),
812
- stripeCustomerId: z.string().optional(),
813
- serviceId: z.string().optional(),
814
- workspaceId: z.string().optional(),
815
- serviceLabel: z.string().optional(),
816
- roles: z.array(z.string())
817
- });
818
- const guardEntitlementsSchema = z.object({
819
- planId: guardPlanIdSchema,
820
- includedMonthlyCredits: z.number(),
821
- deviceLimit: z.number(),
822
- retentionDays: z.number(),
823
- syncEnabled: z.boolean(),
824
- premiumFeedsEnabled: z.boolean(),
825
- teamPolicyEnabled: z.boolean()
826
- });
827
- const guardSessionResponseSchema = z.object({
828
- principal: guardPrincipalSchema,
829
- entitlements: guardEntitlementsSchema,
830
- balance: z.object({
831
- accountId: z.string(),
832
- availableCredits: z.number()
833
- }).nullable(),
834
- bucketingMode: z.enum(["shared-ledger", "product-bucketed"]),
835
- buckets: z.array(guardBucketBalanceSchema)
836
- });
837
- const guardBalanceResponseSchema = z.object({
838
- generatedAt: z.string(),
839
- bucketingMode: z.enum(["shared-ledger", "product-bucketed"]),
840
- buckets: z.array(guardBucketBalanceSchema)
841
- });
842
- const guardFeedItemSchema = z.object({
843
- id: z.string(),
844
- artifactType: z.enum(["skill", "plugin"]),
845
- slug: z.string(),
846
- name: z.string(),
847
- href: z.string(),
848
- ecosystem: z.string().optional(),
849
- safetyScore: z.number().nullable().optional(),
850
- trustScore: z.number().nullable().optional(),
851
- verified: z.boolean(),
852
- recommendation: z.enum(["monitor", "review", "block"]),
853
- updatedAt: z.string()
854
- });
855
- const guardFeedSummarySchema = z.object({
856
- total: z.number(),
857
- monitorCount: z.number(),
858
- reviewCount: z.number(),
859
- blockCount: z.number()
860
- });
861
- const guardFeedResponseSchema = z.object({
862
- generatedAt: z.string(),
863
- items: z.array(guardFeedItemSchema),
864
- summary: guardFeedSummarySchema
865
- });
866
- const guardIntegrationSchema = z.object({
867
- id: z.enum(["openclaw", "hermes"]),
868
- name: z.string(),
869
- status: z.enum(["available", "planned"]),
870
- href: z.string().nullable(),
871
- summary: z.string()
872
- });
873
- const guardActionItemSchema = z.object({
874
- title: z.string(),
875
- description: z.string(),
876
- href: z.string()
877
- });
878
- const guardOverviewResponseSchema = z.object({
879
- generatedAt: z.string(),
880
- principal: guardPrincipalSchema,
881
- entitlements: guardEntitlementsSchema,
882
- balance: z.object({
883
- accountId: z.string(),
884
- availableCredits: z.number()
885
- }).nullable(),
886
- trustFeed: guardFeedResponseSchema,
887
- integrations: z.array(guardIntegrationSchema),
888
- actionItems: z.array(guardActionItemSchema)
889
- });
890
- const guardPolicySchema = z.object({
891
- mode: z.enum(["observe", "prompt", "enforce"]),
892
- defaultAction: z.enum(["allow", "warn", "block"]),
893
- unknownPublisherAction: z.enum(["review", "block", "allow"]),
894
- changedHashAction: z.enum(["allow", "warn", "require-reapproval", "block"]),
895
- newNetworkDomainAction: z.enum(["allow", "warn", "block"]),
896
- subprocessAction: z.enum(["allow", "warn", "block"]),
897
- telemetryEnabled: z.boolean(),
898
- syncEnabled: z.boolean(),
899
- updatedAt: z.string()
900
- });
901
- const guardTrustMatchSchema = z.object({
902
- artifactId: z.string(),
903
- artifactName: z.string(),
904
- artifactType: z.enum(["skill", "plugin"]),
905
- artifactSlug: z.string(),
906
- recommendation: z.enum(["monitor", "review", "block"]),
907
- verified: z.boolean(),
908
- safetyScore: z.number().nullable().optional(),
909
- trustScore: z.number().nullable().optional(),
910
- href: z.string().optional(),
911
- ecosystem: z.string().optional()
912
- });
913
- const guardTrustByHashResponseSchema = z.object({
914
- generatedAt: z.string(),
915
- query: z.object({
916
- sha256: z.string()
917
- }),
918
- match: guardTrustMatchSchema.nullable(),
919
- evidence: z.array(z.string())
920
- });
921
- const guardTrustResolveResponseSchema = z.object({
922
- generatedAt: z.string(),
923
- query: z.object({
924
- ecosystem: z.string().optional(),
925
- name: z.string().optional(),
926
- version: z.string().optional()
927
- }),
928
- items: z.array(guardTrustMatchSchema)
929
- });
930
- const guardRevocationSchema = z.object({
931
- id: z.string(),
932
- artifactId: z.string(),
933
- artifactName: z.string(),
934
- reason: z.string(),
935
- severity: z.enum(["low", "medium", "high"]),
936
- publishedAt: z.string(),
937
- confidence: z.number().optional(),
938
- remediation: z.string().nullable().optional(),
939
- scope: z.enum(["artifact", "publisher", "domain", "workspace", "ecosystem"]).optional(),
940
- source: z.string().optional(),
941
- firstSeenAt: z.string().optional(),
942
- lastUpdatedAt: z.string().optional()
943
- });
944
- const guardRevocationResponseSchema = z.object({
945
- generatedAt: z.string(),
946
- items: z.array(guardRevocationSchema)
947
- });
948
- const guardReceiptSchema = z.object({
949
- receiptId: z.string(),
950
- capturedAt: z.string(),
951
- harness: z.string(),
952
- deviceId: z.string(),
953
- deviceName: z.string(),
954
- artifactId: z.string(),
955
- artifactName: z.string(),
956
- artifactType: z.enum(["skill", "plugin"]),
957
- artifactSlug: z.string(),
958
- artifactHash: z.string(),
959
- policyDecision: z.enum([
960
- "allow",
961
- "warn",
962
- "block",
963
- "review",
964
- "require-reapproval",
965
- "sandbox-required"
966
- ]),
967
- recommendation: z.enum(["monitor", "review", "block"]),
968
- changedSinceLastApproval: z.boolean(),
969
- publisher: z.string().optional(),
970
- capabilities: z.array(z.string()),
971
- summary: z.string()
972
- });
973
- const guardHistoryArtifactSchema = z.object({
974
- artifactId: z.string(),
975
- artifactName: z.string(),
976
- artifactType: z.enum(["skill", "plugin"]),
977
- artifactSlug: z.string(),
978
- publisher: z.string().optional(),
979
- harnesses: z.array(z.string()),
980
- eventCount: z.number(),
981
- firstSeenAt: z.string(),
982
- lastSeenAt: z.string(),
983
- latestDecision: z.enum([
984
- "allow",
985
- "warn",
986
- "block",
987
- "review",
988
- "require-reapproval",
989
- "sandbox-required"
990
- ]),
991
- latestRecommendation: z.enum(["monitor", "review", "block"])
992
- });
993
- const guardReceiptHistoryResponseSchema = z.object({
994
- generatedAt: z.string(),
995
- artifacts: z.array(guardHistoryArtifactSchema)
996
- });
997
- const guardInventoryArtifactSchema = z.object({
998
- artifactId: z.string(),
999
- artifactName: z.string(),
1000
- artifactType: z.enum(["skill", "plugin"]),
1001
- artifactSlug: z.string(),
1002
- publisher: z.string().optional(),
1003
- harnesses: z.array(z.string()),
1004
- devices: z.array(z.string()),
1005
- eventCount: z.number(),
1006
- firstSeenAt: z.string(),
1007
- lastSeenAt: z.string(),
1008
- latestDecision: z.enum([
1009
- "allow",
1010
- "warn",
1011
- "block",
1012
- "review",
1013
- "require-reapproval",
1014
- "sandbox-required"
1015
- ]),
1016
- latestRecommendation: z.enum(["monitor", "review", "block"]),
1017
- latestHash: z.string(),
1018
- latestSummary: z.string()
1019
- });
1020
- const guardInventoryDiffEntrySchema = z.object({
1021
- artifactId: z.string(),
1022
- artifactName: z.string(),
1023
- artifactType: z.enum(["skill", "plugin"]),
1024
- changeType: z.enum(["new", "changed", "removed"]),
1025
- previousHash: z.string().nullable(),
1026
- currentHash: z.string().nullable()
1027
- });
1028
- const guardInventoryDiffResponseSchema = z.object({
1029
- generatedAt: z.string(),
1030
- items: z.array(guardInventoryDiffEntrySchema)
1031
- });
1032
- const guardReceiptSyncResponseSchema = z.object({
1033
- syncedAt: z.string(),
1034
- receiptsStored: z.number(),
1035
- inventoryStored: z.number().optional(),
1036
- inventoryDiff: guardInventoryDiffResponseSchema.optional(),
1037
- advisories: z.array(guardRevocationSchema).optional(),
1038
- policy: guardPolicySchema.optional(),
1039
- alertPreferences: z.lazy(() => guardAlertPreferencesSchema).optional(),
1040
- exceptions: z.array(z.lazy(() => guardExceptionItemSchema)).optional(),
1041
- teamPolicyPack: z.lazy(() => guardTeamPolicyPackSchema).optional()
1042
- });
1043
- const guardInventoryResponseSchema = z.object({
1044
- generatedAt: z.string(),
1045
- items: z.array(guardInventoryArtifactSchema)
1046
- });
1047
- const guardAbomSummarySchema = z.object({
1048
- totalArtifacts: z.number(),
1049
- totalDevices: z.number(),
1050
- totalHarnesses: z.number(),
1051
- blockedArtifacts: z.number(),
1052
- reviewArtifacts: z.number()
1053
- });
1054
- const guardAbomResponseSchema = z.object({
1055
- generatedAt: z.string(),
1056
- summary: guardAbomSummarySchema,
1057
- items: z.array(guardInventoryArtifactSchema)
1058
- });
1059
- const guardTimelineEventSchema = z.object({
1060
- receiptId: z.string(),
1061
- capturedAt: z.string(),
1062
- harness: z.string(),
1063
- deviceId: z.string(),
1064
- deviceName: z.string(),
1065
- artifactHash: z.string(),
1066
- policyDecision: z.enum([
1067
- "allow",
1068
- "warn",
1069
- "block",
1070
- "review",
1071
- "require-reapproval",
1072
- "sandbox-required"
1073
- ]),
1074
- recommendation: z.enum(["monitor", "review", "block"]),
1075
- changedSinceLastApproval: z.boolean(),
1076
- summary: z.string(),
1077
- capabilities: z.array(z.string()),
1078
- publisher: z.string().optional()
1079
- });
1080
- const guardArtifactTimelineResponseSchema = z.object({
1081
- generatedAt: z.string(),
1082
- artifactId: z.string(),
1083
- artifactName: z.string(),
1084
- artifactType: z.enum(["skill", "plugin"]),
1085
- artifactSlug: z.string(),
1086
- events: z.array(guardTimelineEventSchema)
1087
- });
1088
- const guardReceiptExportSummarySchema = z.object({
1089
- totalReceipts: z.number(),
1090
- blockedCount: z.number(),
1091
- reviewCount: z.number(),
1092
- approvedCount: z.number()
1093
- });
1094
- const guardExportSignatureSchema = z.object({
1095
- algorithm: z.enum(["hmac-sha256", "none"]),
1096
- digest: z.string()
1097
- });
1098
- const guardReceiptExportResponseSchema = z.object({
1099
- generatedAt: z.string(),
1100
- summary: guardReceiptExportSummarySchema,
1101
- provenanceSummary: z.array(z.string()),
1102
- items: z.array(guardReceiptSchema),
1103
- signature: guardExportSignatureSchema
1104
- });
1105
- const guardAlertPreferencesSchema = z.object({
1106
- emailEnabled: z.boolean(),
1107
- digestMode: z.enum(["immediate", "daily", "weekly"]),
1108
- watchlistEnabled: z.boolean(),
1109
- advisoriesEnabled: z.boolean(),
1110
- repeatedWarningsEnabled: z.boolean(),
1111
- teamAlertsEnabled: z.boolean(),
1112
- updatedAt: z.string()
1113
- });
1114
- const guardWatchlistItemSchema = z.object({
1115
- artifactId: z.string(),
1116
- artifactName: z.string(),
1117
- artifactType: z.enum(["skill", "plugin"]),
1118
- artifactSlug: z.string(),
1119
- reason: z.string(),
1120
- source: z.enum(["manual", "synced", "team-policy"]),
1121
- createdAt: z.string()
1122
- });
1123
- const guardWatchlistResponseSchema = z.object({
1124
- generatedAt: z.string(),
1125
- items: z.array(guardWatchlistItemSchema)
1126
- });
1127
- const guardWatchlistLookupMatchSchema = z.object({
1128
- artifactId: z.string().nullable(),
1129
- publisher: z.string().nullable(),
1130
- domain: z.string().nullable(),
1131
- source: z.enum(["watchlist", "team-policy"]),
1132
- reason: z.string()
1133
- });
1134
- const guardWatchlistLookupResponseSchema = z.object({
1135
- generatedAt: z.string(),
1136
- matched: z.boolean(),
1137
- scope: z.enum(["artifact", "publisher", "domain", "none"]),
1138
- item: guardWatchlistLookupMatchSchema.nullable()
1139
- });
1140
- const guardPainSignalSchema = z.object({
1141
- signalId: z.string(),
1142
- signalName: z.string(),
1143
- artifactId: z.string(),
1144
- artifactName: z.string(),
1145
- artifactType: z.enum(["skill", "plugin"]),
1146
- harness: z.string(),
1147
- latestSummary: z.string(),
1148
- firstSeenAt: z.string(),
1149
- lastSeenAt: z.string(),
1150
- count: z.number(),
1151
- source: z.literal("scanner"),
1152
- publisher: z.string().optional()
1153
- });
1154
- const guardPainSignalListResponseSchema = z.object({
1155
- generatedAt: z.string(),
1156
- items: z.array(guardPainSignalSchema)
1157
- });
1158
- const guardPainSignalAggregateSchema = z.object({
1159
- artifactId: z.string(),
1160
- artifactName: z.string(),
1161
- artifactType: z.enum(["skill", "plugin"]),
1162
- signalName: z.string(),
1163
- latestSummary: z.string(),
1164
- firstSeenAt: z.string(),
1165
- lastSeenAt: z.string(),
1166
- totalCount: z.number(),
1167
- consumerCount: z.number(),
1168
- harnesses: z.array(z.string()),
1169
- publishers: z.array(z.string())
1170
- });
1171
- const guardPainSignalAggregateResponseSchema = z.object({
1172
- generatedAt: z.string(),
1173
- summary: z.object({
1174
- totalSignals: z.number(),
1175
- uniqueArtifacts: z.number(),
1176
- uniqueConsumers: z.number()
1177
- }),
1178
- items: z.array(guardPainSignalAggregateSchema)
1179
- });
1180
- const guardExceptionItemSchema = z.object({
1181
- exceptionId: z.string(),
1182
- scope: z.enum(["artifact", "publisher", "harness", "global"]),
1183
- harness: z.string().nullable(),
1184
- artifactId: z.string().nullable(),
1185
- publisher: z.string().nullable(),
1186
- reason: z.string(),
1187
- owner: z.string(),
1188
- source: z.enum(["manual", "team-policy"]),
1189
- expiresAt: z.string(),
1190
- createdAt: z.string(),
1191
- updatedAt: z.string()
1192
- });
1193
- const guardExceptionListResponseSchema = z.object({
1194
- generatedAt: z.string(),
1195
- items: z.array(guardExceptionItemSchema)
1196
- });
1197
- const guardPreflightEvidenceSchema = z.object({
1198
- category: z.enum([
1199
- "policy",
1200
- "trust",
1201
- "watchlist",
1202
- "team-policy",
1203
- "exception"
1204
- ]),
1205
- source: z.string(),
1206
- detail: z.string()
1207
- });
1208
- z.object({
1209
- harness: z.string(),
1210
- artifactName: z.string(),
1211
- artifactType: z.enum(["skill", "plugin"]),
1212
- artifactId: z.string().optional(),
1213
- artifactSlug: z.string().optional(),
1214
- artifactHash: z.string().optional(),
1215
- publisher: z.string().optional(),
1216
- domain: z.string().optional(),
1217
- launchSummary: z.string().optional(),
1218
- capabilities: z.array(z.string()).optional(),
1219
- workspacePath: z.string().optional()
1220
- });
1221
- const guardPreflightVerdictResponseSchema = z.object({
1222
- generatedAt: z.string(),
1223
- principal: guardPrincipalSchema,
1224
- decision: z.enum(["allow", "review", "block"]),
1225
- recommendation: z.enum(["monitor", "review", "block"]),
1226
- rationale: z.string(),
1227
- category: z.enum(["exception", "team-policy", "watchlist", "trust", "policy"]).optional(),
1228
- confidence: z.number().optional(),
1229
- freshnessTimestamp: z.string().optional(),
1230
- evidenceSources: z.array(z.string()).optional(),
1231
- scope: z.enum(["artifact", "publisher", "domain", "policy"]),
1232
- matchedEvidence: z.array(guardPreflightEvidenceSchema),
1233
- matchedException: guardExceptionItemSchema.nullable(),
1234
- trustMatch: guardTrustMatchSchema.nullable()
1235
- });
1236
- const guardTeamPolicyAuditItemSchema = z.object({
1237
- changedAt: z.string(),
1238
- actor: z.string(),
1239
- change: z.enum(["created", "updated"]),
1240
- summary: z.string()
1241
- });
1242
- const guardTeamPolicyPackSchema = z.object({
1243
- name: z.string(),
1244
- sharedHarnessDefaults: z.record(
1245
- z.string(),
1246
- z.enum(["observe", "prompt", "enforce"])
1247
- ),
1248
- allowedPublishers: z.array(z.string()),
1249
- blockedPublishers: z.array(z.string()).optional(),
1250
- blockedDomains: z.array(z.string()).optional(),
1251
- blockedArtifacts: z.array(z.string()),
1252
- alertChannel: z.enum(["email", "slack", "teams", "webhook"]),
1253
- updatedAt: z.string(),
1254
- auditTrail: z.array(guardTeamPolicyAuditItemSchema)
1255
- });
1256
- const guardDeviceSchema = z.object({
1257
- deviceId: z.string(),
1258
- deviceName: z.string(),
1259
- harnesses: z.array(z.string()),
1260
- receiptCount: z.number(),
1261
- lastSeenAt: z.string()
1262
- });
1263
- const guardDeviceListResponseSchema = z.object({
1264
- generatedAt: z.string(),
1265
- items: z.array(guardDeviceSchema)
1266
- });
1267
- const hbarPurchaseIntentResponseSchema = z.object({
1268
- transaction: z.string(),
1269
- transactionId: z.string(),
1270
- network: z.enum(["mainnet", "testnet"]),
1271
- accountId: z.string(),
1272
- treasuryAccountId: z.string(),
1273
- hbarAmount: z.number(),
1274
- credits: z.number(),
1275
- tinybarAmount: z.number(),
1276
- memo: z.string(),
1277
- centsPerHbar: z.number(),
1278
- validStart: z.string(),
1279
- validDurationSeconds: z.number(),
1280
- requiresManualSubmit: z.literal(true),
1281
- purchaseId: z.string()
1282
- });
1283
- const x402SettlementSchema = z.object({
1284
- success: z.boolean().optional(),
1285
- transaction: z.string().optional(),
1286
- network: z.string().optional(),
1287
- payer: z.string().optional(),
1288
- errorReason: z.string().optional()
1289
- }).strict();
1290
- const x402CreditPurchaseResponseSchema = z.object({
1291
- success: z.boolean(),
1292
- accountId: z.string(),
1293
- creditedCredits: z.number(),
1294
- usdAmount: z.number(),
1295
- balance: z.number(),
1296
- payment: z.object({
1297
- payer: z.string().optional(),
1298
- requirement: z.record(jsonValueSchema).optional(),
1299
- settlement: x402SettlementSchema.optional()
1300
- }).optional()
1301
- });
1302
- const x402MinimumsResponseSchema = z.object({
1303
- minimums: z.record(
1304
- z.object({
1305
- network: z.string().optional(),
1306
- gasLimit: z.number().optional(),
1307
- gasPriceWei: z.string().optional(),
1308
- gasUsd: z.number().optional(),
1309
- minUsd: z.number().optional(),
1310
- ethUsd: z.number().optional(),
1311
- fetchedAt: z.string().optional(),
1312
- source: z.string().optional()
1313
- })
1314
- ).optional(),
1315
- creditUnitUsd: z.number().optional()
1316
- });
1317
- const adaptersResponseSchema = z.object({
1318
- adapters: z.array(z.string())
1319
- });
1320
- const adapterRegistryCategorySchema = z.object({
1321
- id: z.number().int(),
1322
- network: z.string(),
1323
- type: z.string(),
1324
- slug: z.string(),
1325
- name: z.string(),
1326
- description: z.string().nullable().optional(),
1327
- topicId: z.string(),
1328
- versionTopicId: z.string(),
1329
- registryTransactionId: z.string().nullable().optional(),
1330
- versionTransactionId: z.string().nullable().optional(),
1331
- metadataPointer: z.string().nullable().optional(),
1332
- metadataSequence: z.number().int().nullable().optional(),
1333
- createdAt: z.string(),
1334
- updatedAt: z.string(),
1335
- metadata: jsonValueSchema.optional().nullable()
1336
- });
1337
- const adapterRegistryCategoriesResponseSchema = z.object({
1338
- categories: z.array(adapterRegistryCategorySchema)
1339
- });
1340
- const adapterRegistryAdapterSchema = z.object({
1341
- id: z.union([z.string(), z.number()]).optional(),
1342
- network: z.string().optional(),
1343
- categoryId: z.union([z.string(), z.number()]).nullable().optional(),
1344
- operation: z.string().optional(),
1345
- adapterId: z.string(),
1346
- adapterName: z.string(),
1347
- entity: z.string(),
1348
- manifestPointer: z.string().nullable().optional(),
1349
- manifestSequence: z.number().int().nullable().optional(),
1350
- packageRegistry: z.string().nullable().optional(),
1351
- packageName: z.string().nullable().optional(),
1352
- packageVersion: z.string().nullable().optional(),
1353
- packageIntegrity: z.string().nullable().optional(),
1354
- stateModel: z.string().nullable().optional(),
1355
- config: jsonValueSchema.nullable().optional(),
1356
- signature: z.string().nullable().optional(),
1357
- manifest: jsonValueSchema.nullable().optional(),
1358
- keywords: z.array(z.string()).optional(),
1359
- searchText: z.string().nullable().optional(),
1360
- creditAccountId: z.string().nullable().optional(),
1361
- registeredByUserId: z.string().nullable().optional(),
1362
- registeredByEmail: z.string().nullable().optional(),
1363
- totalCostHbar: z.number().nullable().optional(),
1364
- totalCostCredits: z.number().nullable().optional(),
1365
- consensusTimestamp: z.string().nullable().optional(),
1366
- sequenceNumber: z.number().int().nullable().optional(),
1367
- payerAccountId: z.string().nullable().optional(),
1368
- mirrorNodePayload: jsonValueSchema.nullable().optional(),
1369
- versionTopicId: z.string().nullable().optional(),
1370
- declarationTopicId: z.string().nullable().optional(),
1371
- categoryEntrySequence: z.number().int().nullable().optional(),
1372
- categoryEntryTransactionId: z.string().nullable().optional(),
1373
- versionPointerSequence: z.number().int().nullable().optional(),
1374
- versionPointerTransactionId: z.string().nullable().optional(),
1375
- transactionId: z.string().nullable().optional(),
1376
- createdAt: z.string().optional(),
1377
- category: adapterRegistryCategorySchema.optional()
1378
- }).passthrough();
1379
- const adapterRegistryAdaptersResponseSchema = z.object({
1380
- network: z.string(),
1381
- adapters: z.array(adapterRegistryAdapterSchema)
1382
- });
1383
- const adapterRegistryCreateCategoryResponseSchema = z.object({
1384
- category: adapterRegistryCategorySchema
1385
- });
1386
- z.object({
1387
- adapter: z.record(jsonValueSchema),
1388
- declaration: adapterDeclarationSchema,
1389
- transactionId: z.string().optional().nullable(),
1390
- category: adapterRegistryCategorySchema
1391
- });
1392
- const adapterRegistrySubmitAdapterAcceptedResponseSchema = z.object({
1393
- submissionId: z.string(),
1394
- status: z.string().optional(),
1395
- network: z.string().optional(),
1396
- message: z.string().optional()
1397
- }).passthrough();
1398
- const adapterRegistrySubmissionStatusResponseSchema = z.object({
1399
- submission: z.object({
1400
- id: z.string(),
1401
- network: z.string(),
1402
- status: z.enum(["pending", "running", "completed", "failed"]),
1403
- adapterId: z.string(),
1404
- categorySlug: z.string().nullable().optional(),
1405
- creditAccountId: z.string().nullable().optional(),
1406
- registeredByUserId: z.string().nullable().optional(),
1407
- registeredByEmail: z.string().nullable().optional(),
1408
- requestPayload: jsonValueSchema.optional(),
1409
- resultPayload: jsonValueSchema.nullable().optional(),
1410
- error: z.string().nullable().optional(),
1411
- createdAt: z.string().optional(),
1412
- updatedAt: z.string().optional(),
1413
- startedAt: z.string().nullable().optional(),
1414
- completedAt: z.string().nullable().optional()
1415
- }).passthrough()
1416
- });
1417
- const adapterChatProfileSchema = z.object({
1418
- supportsChat: z.boolean(),
1419
- delivery: z.string().optional(),
1420
- transport: z.string().optional(),
1421
- streaming: z.boolean().optional(),
1422
- requiresAuth: z.array(z.string()).optional(),
1423
- notes: z.string().optional()
1424
- });
1425
- const adapterCapabilitiesSchema = z.object({
1426
- discovery: z.boolean(),
1427
- routing: z.boolean(),
1428
- communication: z.boolean(),
1429
- translation: z.boolean(),
1430
- protocols: z.array(z.string())
1431
- });
1432
- const adapterDescriptorSchema = z.object({
1433
- id: z.string(),
1434
- name: z.string(),
1435
- version: z.string(),
1436
- author: z.string(),
1437
- description: z.string(),
1438
- supportedProtocols: z.array(z.string()),
1439
- registryType: z.enum(["web2", "web3", "hybrid"]),
1440
- chatProfile: adapterChatProfileSchema.optional(),
1441
- capabilities: adapterCapabilitiesSchema,
1442
- enabled: z.boolean(),
1443
- priority: z.number(),
1444
- status: z.enum(["running", "stopped"])
1445
- });
1446
- const adapterDetailsResponseSchema = z.object({
1447
- adapters: z.array(adapterDescriptorSchema)
1448
- });
1449
- const metadataFacetOptionSchema = z.object({
1450
- value: z.union([z.string(), z.number(), z.boolean()]),
1451
- label: z.string()
1452
- });
1453
- const searchFacetSchema = z.object({
1454
- key: z.string(),
1455
- label: z.string(),
1456
- description: z.string().optional(),
1457
- type: z.enum(["string", "boolean", "number"]),
1458
- adapters: z.array(z.string()).optional(),
1459
- options: z.array(metadataFacetOptionSchema).optional()
1460
- });
1461
- const searchFacetsResponseSchema = z.object({
1462
- facets: z.array(searchFacetSchema)
1463
- });
1464
- const verificationExistingOwnershipSchema = z.object({
1465
- ownerType: z.string(),
1466
- ownerId: z.string(),
1467
- ownerHandle: z.string().optional(),
1468
- verifiedAt: z.string().optional(),
1469
- method: z.string().optional()
1470
- }).passthrough();
1471
- const verificationChallengeResponseSchema = z.object({
1472
- challengeId: z.string(),
1473
- code: z.string(),
1474
- expiresAt: z.string(),
1475
- expectedHandle: z.string(),
1476
- instructions: z.string(),
1477
- existingOwnership: verificationExistingOwnershipSchema.optional()
1478
- }).passthrough();
1479
- const verificationChallengeDetailsResponseSchema = z.object({
1480
- challengeId: z.string(),
1481
- uaid: z.string(),
1482
- code: z.string(),
1483
- expiresAt: z.string(),
1484
- status: z.string(),
1485
- message: z.string().optional()
1486
- }).passthrough();
1487
- const verificationVerifyResponseSchema = z.object({
1488
- verified: z.boolean(),
1489
- uaid: z.string(),
1490
- ownerType: z.string(),
1491
- ownerId: z.string(),
1492
- ownerHandle: z.string().optional(),
1493
- method: z.string().optional(),
1494
- verificationPostUrl: z.string().optional()
1495
- }).passthrough();
1496
- const verificationOwnershipResponseSchema = z.object({
1497
- uaid: z.string(),
1498
- ownerType: z.string(),
1499
- ownerId: z.string(),
1500
- ownerHandle: z.string().optional(),
1501
- chain: z.string(),
1502
- verifiedAt: z.string(),
1503
- method: z.string()
1504
- }).passthrough();
1505
- const verificationStatusResponseSchema = z.object({
1506
- uaid: z.string(),
1507
- verified: z.boolean(),
1508
- chain: z.string().nullable()
1509
- }).passthrough();
1510
- const verificationVerifySenderResponseSchema = z.object({
1511
- verified: z.boolean(),
1512
- uaid: z.string(),
1513
- ownerType: z.string(),
1514
- ownerId: z.string()
1515
- }).passthrough();
1516
- const verificationDnsErrorSchema = z.object({
1517
- code: z.string(),
1518
- message: z.string(),
1519
- details: z.record(jsonValueSchema).optional()
1520
- }).passthrough();
1521
- const verificationDnsStatusResponseSchema = z.object({
1522
- uaid: z.string(),
1523
- verified: z.boolean(),
1524
- profileId: z.string(),
1525
- checkedAt: z.string(),
1526
- nativeId: z.string().optional(),
1527
- dnsName: z.string().optional(),
1528
- verificationLevel: z.string().optional(),
1529
- resolutionMode: z.string().optional(),
1530
- reconstructedUaid: z.string().optional(),
1531
- selectedFollowupProfile: z.string().optional(),
1532
- error: verificationDnsErrorSchema.optional(),
1533
- source: z.string().optional(),
1534
- persisted: z.boolean().optional()
1535
- }).passthrough();
1536
- const registerStatusResponseSchema = z.object({
1537
- registered: z.boolean(),
1538
- agent: jsonValueSchema.optional()
1539
- }).passthrough();
1540
- const moltbookOwnerRegistrationUpdateResponseSchema = z.object({
1541
- ok: z.boolean(),
1542
- uaid: z.string(),
1543
- registered: z.boolean(),
1544
- registeredAt: z.string().optional(),
1545
- agent: jsonValueSchema.optional(),
1546
- warning: z.string().optional()
1547
- }).passthrough();
1548
- const skillRegistryFileRoleSchema = z.union([
1549
- z.literal("skill-md"),
1550
- z.literal("skill-json"),
1551
- z.literal("skill-icon"),
1552
- z.literal("file")
1553
- ]);
1554
- const trustScoreBreakdownSchema = z.record(z.number()).refine(
1555
- (record) => typeof record.total === "number" && Number.isFinite(record.total),
1556
- { message: "trustScores.total is required" }
1557
- );
1558
- const skillSafetyLabelSchema = z.enum(["safe", "review", "caution", "unsafe"]);
1559
- const skillSafetySummarySchema = z.object({
1560
- score: z.number(),
1561
- label: skillSafetyLabelSchema,
1562
- findingsTotal: z.number().int(),
1563
- highFindings: z.number().int(),
1564
- scriptsTotal: z.number().int(),
1565
- permissionsMissing: z.array(z.string())
1566
- }).passthrough();
1567
- const skillSafetyFindingSeveritySchema = z.enum(["low", "medium", "high"]);
1568
- const skillSafetyFindingSchema = z.object({
1569
- ruleId: z.string(),
1570
- severity: skillSafetyFindingSeveritySchema,
1571
- file: z.string(),
1572
- message: z.string()
1573
- }).passthrough();
1574
- const skillRegistryFileDescriptorSchema = z.object({
1575
- name: z.string(),
1576
- mimeType: z.string(),
1577
- role: skillRegistryFileRoleSchema,
1578
- topicId: z.string().optional(),
1579
- hrl: z.string().optional(),
1580
- packageSequenceNumber: z.number().int().optional()
1581
- }).passthrough();
1582
- const skillRegistryPublishSummarySchema = z.object({
1583
- jobId: z.string(),
1584
- network: z.union([z.literal("mainnet"), z.literal("testnet")]),
1585
- name: z.string(),
1586
- version: z.string(),
1587
- description: z.string().optional(),
1588
- createdAt: z.string(),
1589
- directoryTopicId: z.string(),
1590
- skillUid: z.number().int().optional(),
1591
- directorySequenceNumber: z.number().int().optional(),
1592
- versionRegistryTopicId: z.string().optional(),
1593
- packageTopicId: z.string(),
1594
- manifestHrl: z.string().optional(),
1595
- skillJsonHrl: z.string(),
1596
- iconHcs1: z.string().optional(),
1597
- tags: z.array(z.string()).optional(),
1598
- category: z.string().optional(),
1599
- featured: z.boolean().optional(),
1600
- verified: z.boolean().optional(),
1601
- upvotes: z.number().int().optional(),
1602
- trustScore: z.number().optional(),
1603
- trustScores: trustScoreBreakdownSchema.optional(),
1604
- safety: skillSafetySummarySchema.optional(),
1605
- safetyFindings: z.array(skillSafetyFindingSchema).optional(),
1606
- files: z.array(skillRegistryFileDescriptorSchema).optional()
1607
- }).passthrough();
1608
- const skillRegistryListResponseSchema = z.object({
1609
- items: z.array(skillRegistryPublishSummarySchema),
1610
- nextCursor: z.string().nullable()
1611
- }).passthrough();
1612
- z.enum([
1613
- "stable",
1614
- "prerelease",
1615
- "all"
1616
- ]);
1617
- z.enum([
1618
- "trending",
1619
- "upvotes",
1620
- "updated",
1621
- "name"
1622
- ]);
1623
- const skillCatalogVersionSummarySchema = z.object({
1624
- version: z.string(),
1625
- publishedAt: z.string(),
1626
- verified: z.boolean().optional()
1627
- }).passthrough();
1628
- const skillCatalogItemSchema = z.object({
1629
- name: z.string(),
1630
- description: z.string().optional(),
1631
- iconHcs1: z.string().optional(),
1632
- category: z.string().optional(),
1633
- tags: z.array(z.string()).optional(),
1634
- latest: skillCatalogVersionSummarySchema,
1635
- latestStable: skillCatalogVersionSummarySchema.optional(),
1636
- recommended: skillCatalogVersionSummarySchema,
1637
- upvotes: z.number().int(),
1638
- verified: z.boolean(),
1639
- repoStamped: z.boolean(),
1640
- trustScore: z.number().optional(),
1641
- safetyScore: z.number().optional()
1642
- }).passthrough();
1643
- const skillCatalogResponseSchema = z.object({
1644
- items: z.array(skillCatalogItemSchema),
1645
- nextCursor: z.string().nullable()
1646
- }).passthrough();
1647
- const skillRecommendedVersionResponseSchema = z.object({
1648
- name: z.string(),
1649
- version: z.string(),
1650
- updatedAt: z.string(),
1651
- setBy: z.string()
1652
- }).passthrough();
1653
- const skillDeprecationRecordSchema = z.object({
1654
- name: z.string(),
1655
- version: z.string().optional(),
1656
- reason: z.string(),
1657
- replacementRef: z.string().optional(),
1658
- deprecatedAt: z.string(),
1659
- deprecatedBy: z.string()
1660
- }).passthrough();
1661
- const skillDeprecationsResponseSchema = z.object({
1662
- name: z.string(),
1663
- items: z.array(skillDeprecationRecordSchema)
1664
- }).passthrough();
1665
- const skillSecurityBreakdownResponseSchema = z.object({
1666
- jobId: z.string(),
1667
- score: z.number().nullable().optional(),
1668
- findings: z.array(jsonValueSchema).optional(),
1669
- summary: jsonValueSchema.optional(),
1670
- generatedAt: z.string().nullable().optional(),
1671
- scannerVersion: z.string().nullable().optional()
1672
- }).passthrough();
1673
- const skillBadgeMetricSchema = z.enum([
1674
- "version",
1675
- "version_verification",
1676
- "status",
1677
- "verification",
1678
- "repo_commit",
1679
- "manifest",
1680
- "domain",
1681
- "trust",
1682
- "tier",
1683
- "safety",
1684
- "upvotes",
1685
- "updated"
1686
- ]);
1687
- const skillBadgeStyleSchema = z.enum([
1688
- "flat",
1689
- "flat-square",
1690
- "for-the-badge",
1691
- "plastic",
1692
- "social"
1693
- ]);
1694
- const skillBadgeResponseSchema = z.object({
1695
- schemaVersion: z.number().int(),
1696
- label: z.string(),
1697
- message: z.string(),
1698
- color: z.string(),
1699
- style: skillBadgeStyleSchema.optional(),
1700
- isError: z.boolean().optional(),
1701
- cacheSeconds: z.number().int().optional()
1702
- }).passthrough();
1703
- const skillRegistryTagsResponseSchema = z.object({
1704
- tags: z.array(z.string())
1705
- }).passthrough();
1706
- const skillRegistryCategoriesResponseSchema = z.object({
1707
- categories: z.array(z.string())
1708
- }).passthrough();
1709
- const skillResolverManifestResponseSchema = z.record(jsonValueSchema);
1710
- const skillRegistryQuoteFileBreakdownSchema = z.object({
1711
- name: z.string(),
1712
- mimeType: z.string(),
1713
- estimatedCostHbar: z.number()
1714
- }).passthrough();
1715
- const skillRegistryQuoteResponseSchema = z.object({
1716
- quoteId: z.string(),
1717
- name: z.string(),
1718
- version: z.string(),
1719
- directoryTopicId: z.string(),
1720
- estimatedCostHbar: z.number(),
1721
- credits: z.number(),
1722
- usdCents: z.number(),
1723
- expiresAt: z.string(),
1724
- files: z.array(skillRegistryQuoteFileBreakdownSchema)
1725
- }).passthrough();
1726
- const skillRegistryJobStatusSchema = z.union([
1727
- z.literal("pending"),
1728
- z.literal("in_progress"),
1729
- z.literal("completed"),
1730
- z.literal("failed")
1731
- ]);
1732
- const skillRegistryPublishResponseSchema = z.object({
1733
- jobId: z.string(),
1734
- status: skillRegistryJobStatusSchema,
1735
- credits: z.number().nullable().optional(),
1736
- usdCents: z.number().nullable().optional(),
1737
- quoteId: z.string().nullable().optional(),
1738
- createdAt: z.string(),
1739
- updatedAt: z.string(),
1740
- network: z.union([z.literal("mainnet"), z.literal("testnet")])
1741
- }).passthrough();
1742
- const skillRegistryJobStatusResponseSchema = z.object({
1743
- jobId: z.string(),
1744
- status: skillRegistryJobStatusSchema,
1745
- network: z.union([z.literal("mainnet"), z.literal("testnet")]),
1746
- name: z.string(),
1747
- version: z.string(),
1748
- directoryTopicId: z.string(),
1749
- skillUid: z.number().int().nullable().optional(),
1750
- directorySequenceNumber: z.number().int().nullable().optional(),
1751
- versionRegistryTopicId: z.string().nullable().optional(),
1752
- packageTopicId: z.string().nullable().optional(),
1753
- manifestHrl: z.string().nullable().optional(),
1754
- skillJsonHrl: z.string().nullable().optional(),
1755
- iconHcs1: z.string().nullable().optional(),
1756
- tags: z.array(z.string()).nullable().optional(),
1757
- category: z.string().nullable().optional(),
1758
- files: z.array(skillRegistryFileDescriptorSchema).nullable().optional(),
1759
- quoteCredits: z.number().nullable().optional(),
1760
- quoteUsdCents: z.number().nullable().optional(),
1761
- safety: skillSafetySummarySchema.nullable().optional(),
1762
- reservationId: z.string().nullable().optional(),
1763
- totalCostHbar: z.number().nullable().optional(),
1764
- totalCostCredits: z.number().nullable().optional(),
1765
- failureReason: z.string().nullable().optional(),
1766
- createdAt: z.string(),
1767
- updatedAt: z.string()
1768
- }).passthrough();
1769
- const skillRegistryVersionItemSchema = z.object({
1770
- jobId: z.string(),
1771
- version: z.string(),
1772
- createdAt: z.string(),
1773
- verified: z.boolean().optional()
1774
- }).passthrough();
1775
- const skillRegistryVersionsResponseSchema = z.object({
1776
- name: z.string(),
1777
- items: z.array(skillRegistryVersionItemSchema)
1778
- }).passthrough();
1779
- const skillRegistryMineItemSchema = z.object({
1780
- name: z.string(),
1781
- latestVersion: z.string(),
1782
- latestCreatedAt: z.string(),
1783
- verified: z.boolean().optional(),
1784
- iconHcs1: z.string().optional(),
1785
- versions: z.array(z.string())
1786
- }).passthrough();
1787
- const skillRegistryMineResponseSchema = z.object({
1788
- items: z.array(skillRegistryMineItemSchema)
1789
- }).passthrough();
1790
- const skillRegistryMyListResponseSchema = z.object({
1791
- owned: skillRegistryMineResponseSchema,
1792
- upvoted: skillRegistryListResponseSchema
1793
- }).passthrough();
1794
- const skillRegistryConfigResponseSchema = z.object({
1795
- enabled: z.boolean(),
1796
- directoryTopicId: z.string().nullable().optional(),
1797
- maxFiles: z.number().int().nullable().optional(),
1798
- maxTotalSizeBytes: z.number().int().nullable().optional(),
1799
- allowedMimeTypes: z.array(z.string()).nullable().optional(),
1800
- network: z.union([z.literal("mainnet"), z.literal("testnet")]).nullable().optional(),
1801
- publisher: z.object({
1802
- cliPackageUrl: z.string(),
1803
- cliCommand: z.string(),
1804
- actionMarketplaceUrl: z.string(),
1805
- repositoryUrl: z.string(),
1806
- guideUrl: z.string().nullable().optional(),
1807
- docsUrl: z.string().nullable().optional(),
1808
- submitUrl: z.string().nullable().optional(),
1809
- skillsIndexUrl: z.string().nullable().optional(),
1810
- quickstartCommands: z.array(
1811
- z.object({
1812
- id: z.string(),
1813
- label: z.string(),
1814
- description: z.string(),
1815
- command: z.string(),
1816
- href: z.string().nullable().optional()
1817
- }).passthrough()
1818
- ).optional().default([]),
1819
- templatePresets: z.array(
1820
- z.object({
1821
- presetId: z.string(),
1822
- label: z.string(),
1823
- description: z.string(),
1824
- recommendedFor: z.string(),
1825
- command: z.string()
1826
- }).passthrough()
1827
- ).optional().default([])
1828
- }).nullable().optional()
1829
- }).passthrough();
1830
- const skillRegistryOwnershipResponseSchema = z.object({
1831
- name: z.string(),
1832
- exists: z.boolean(),
1833
- isOwner: z.boolean()
1834
- }).passthrough();
1835
- const skillRegistryVoteStatusResponseSchema = z.object({
1836
- name: z.string(),
1837
- upvotes: z.number().int(),
1838
- hasUpvoted: z.boolean()
1839
- }).passthrough();
1840
- const skillTrustTierSchema = z.enum([
1841
- "unclaimed",
1842
- "validated",
1843
- "published",
1844
- "verified",
1845
- "hardened"
1846
- ]);
1847
- const skillStatusNextStepSchema = z.object({
1848
- kind: z.enum([
1849
- "setup_validate",
1850
- "publish_first_release",
1851
- "verify_domain",
1852
- "harden_workflow",
1853
- "share_status"
1854
- ]),
1855
- priority: z.number().int(),
1856
- id: z.string(),
1857
- label: z.string(),
1858
- description: z.string(),
1859
- url: z.string().nullable().optional(),
1860
- href: z.string().nullable().optional(),
1861
- command: z.string().nullable().optional()
1862
- }).passthrough();
1863
- const skillPreviewSuggestedNextStepSchema = z.object({
1864
- id: z.string(),
1865
- label: z.string(),
1866
- description: z.string(),
1867
- command: z.string().optional(),
1868
- href: z.string().optional()
1869
- }).passthrough();
1870
- const skillPreviewReportSchema = z.object({
1871
- schema_version: z.literal("skill-preview.v1"),
1872
- tool_version: z.string(),
1873
- preview_id: z.string(),
1874
- repo_url: z.string(),
1875
- repo_owner: z.string(),
1876
- repo_name: z.string(),
1877
- default_branch: z.string(),
1878
- commit_sha: z.string(),
1879
- ref: z.string(),
1880
- event_name: z.string(),
1881
- workflow_run_url: z.string(),
1882
- skill_dir: z.string(),
1883
- name: z.string(),
1884
- version: z.string(),
1885
- validation_status: z.literal("passed"),
1886
- findings: z.array(z.unknown()),
1887
- package_summary: z.record(z.string(), z.unknown()),
1888
- suggested_next_steps: z.array(skillPreviewSuggestedNextStepSchema),
1889
- generated_at: z.string()
1890
- }).passthrough();
1891
- const skillPreviewRecordSchema = z.object({
1892
- id: z.string(),
1893
- previewId: z.string(),
1894
- source: z.literal("github-oidc"),
1895
- report: skillPreviewReportSchema,
1896
- generatedAt: z.string(),
1897
- expiresAt: z.string(),
1898
- statusUrl: z.string(),
1899
- authoritative: z.boolean()
1900
- }).passthrough();
1901
- const skillPreviewLookupResponseSchema = z.object({
1902
- found: z.boolean(),
1903
- authoritative: z.boolean(),
1904
- preview: skillPreviewRecordSchema.nullable(),
1905
- statusUrl: z.string().nullable(),
1906
- expiresAt: z.string().nullable()
1907
- }).passthrough();
1908
- const skillStatusPreviewMetadataSchema = z.object({
1909
- previewId: z.string(),
1910
- repoUrl: z.string(),
1911
- repoOwner: z.string(),
1912
- repoName: z.string(),
1913
- commitSha: z.string(),
1914
- ref: z.string(),
1915
- eventName: z.string(),
1916
- skillDir: z.string(),
1917
- generatedAt: z.string(),
1918
- expiresAt: z.string(),
1919
- statusUrl: z.string()
1920
- }).passthrough();
1921
- const skillStatusChecksSchema = z.object({
1922
- repoCommitIntegrity: z.boolean(),
1923
- manifestIntegrity: z.boolean(),
1924
- domainProof: z.boolean()
1925
- }).passthrough();
1926
- const skillStatusVerificationSignalsSchema = z.object({
1927
- publisherBound: z.boolean(),
1928
- domainProof: z.boolean(),
1929
- verifiedDomain: z.boolean(),
1930
- previewValidated: z.boolean()
1931
- }).passthrough();
1932
- const skillStatusProvenanceSignalsSchema = z.object({
1933
- repoCommitIntegrity: z.boolean(),
1934
- manifestIntegrity: z.boolean(),
1935
- canonicalRelease: z.boolean(),
1936
- previewAvailable: z.boolean(),
1937
- previewAuthoritative: z.boolean()
1938
- }).passthrough();
1939
- const skillStatusResponseSchema = z.object({
1940
- name: z.string(),
1941
- version: z.string().nullable(),
1942
- published: z.boolean(),
1943
- verifiedDomain: z.boolean(),
1944
- trustTier: skillTrustTierSchema,
1945
- badgeMetric: skillBadgeMetricSchema,
1946
- checks: skillStatusChecksSchema,
1947
- nextSteps: z.array(skillStatusNextStepSchema),
1948
- verificationSignals: skillStatusVerificationSignalsSchema,
1949
- provenanceSignals: skillStatusProvenanceSignalsSchema,
1950
- publisher: skillRegistryConfigResponseSchema.shape.publisher,
1951
- preview: skillStatusPreviewMetadataSchema.nullable().optional(),
1952
- statusUrl: z.string().nullable().optional()
1953
- }).passthrough();
1954
- const skillQuotePreviewRangeSchema = z.object({
1955
- min: z.number(),
1956
- max: z.number()
1957
- }).passthrough();
1958
- const skillQuotePreviewResponseSchema = z.object({
1959
- estimatedCredits: skillQuotePreviewRangeSchema,
1960
- estimatedHbar: skillQuotePreviewRangeSchema,
1961
- pricingVersion: z.string(),
1962
- assumptions: z.array(z.string()),
1963
- purchaseUrl: z.string().nullable(),
1964
- publishUrl: z.string().nullable(),
1965
- verificationUrl: z.string().nullable()
1966
- }).passthrough();
1967
- const skillConversionSignalsResponseSchema = z.object({
1968
- repoUrl: z.string(),
1969
- skillDir: z.string(),
1970
- trustTier: skillTrustTierSchema,
1971
- actionInstalled: z.boolean(),
1972
- previewUploaded: z.boolean(),
1973
- previewId: z.string().nullable(),
1974
- lastValidateSuccessAt: z.string().nullable(),
1975
- stalePreviewAgeDays: z.number().nullable(),
1976
- published: z.boolean(),
1977
- verified: z.boolean(),
1978
- publishReady: z.boolean(),
1979
- publishBlockedByMissingAuth: z.boolean(),
1980
- statusUrl: z.string().nullable(),
1981
- purchaseUrl: z.string().nullable(),
1982
- publishUrl: z.string().nullable(),
1983
- verificationUrl: z.string().nullable(),
1984
- nextSteps: z.array(skillStatusNextStepSchema)
1985
- }).passthrough();
1986
- const skillInstallArtifactDescriptorSchema = z.object({
1987
- url: z.string(),
1988
- pointer: z.string().nullable(),
1989
- sha256: z.string().nullable()
1990
- }).passthrough();
1991
- const skillInstallResolverDescriptorSchema = z.object({
1992
- skillRef: z.string(),
1993
- skillMdUrl: z.string(),
1994
- manifestUrl: z.string()
1995
- }).passthrough();
1996
- const skillInstallBadgeDescriptorSchema = z.object({
1997
- apiUrl: z.string(),
1998
- imageUrl: z.string(),
1999
- markdown: z.string(),
2000
- html: z.string()
2001
- }).passthrough();
2002
- const skillInstallShareDescriptorSchema = z.object({
2003
- canonicalUrl: z.string().nullable(),
2004
- latestUrl: z.string().nullable(),
2005
- markdownLink: z.string().nullable(),
2006
- htmlLink: z.string().nullable(),
2007
- badge: skillInstallBadgeDescriptorSchema.nullable()
2008
- }).passthrough();
2009
- const skillInstallSnippetSetSchema = z.object({
2010
- cli: z.string(),
2011
- claude: z.string(),
2012
- cursor: z.string(),
2013
- codex: z.string(),
2014
- openclaw: z.string()
2015
- }).passthrough();
2016
- const skillInstallResponseSchema = z.object({
2017
- name: z.string(),
2018
- version: z.string(),
2019
- skillRef: z.string(),
2020
- network: z.union([z.literal("mainnet"), z.literal("testnet")]),
2021
- detailUrl: z.string().nullable(),
2022
- artifacts: z.object({
2023
- skillMd: skillInstallArtifactDescriptorSchema,
2024
- manifest: skillInstallArtifactDescriptorSchema
2025
- }).passthrough(),
2026
- resolvers: z.object({
2027
- pinned: skillInstallResolverDescriptorSchema,
2028
- latest: skillInstallResolverDescriptorSchema
2029
- }).passthrough(),
2030
- share: skillInstallShareDescriptorSchema,
2031
- snippets: skillInstallSnippetSetSchema
2032
- }).passthrough();
2033
- const skillInstallCopyTelemetryResponseSchema = z.object({
2034
- accepted: z.boolean()
2035
- }).passthrough();
2036
- const skillVerificationTierSchema = z.enum(["basic", "express"]);
2037
- const skillVerificationStatusSchema = z.enum([
2038
- "pending",
2039
- "approved",
2040
- "rejected"
2041
- ]);
2042
- const skillVerificationStatusLabelSchema = z.enum([
2043
- "not_requested",
2044
- "pending",
2045
- "approved",
2046
- "rejected"
2047
- ]);
2048
- const skillVerificationSignalFailureReasonSchema = z.enum([
2049
- "missing_owner",
2050
- "missing_repo_or_commit",
2051
- "unsupported_repo",
2052
- "repo_fetch_failed",
2053
- "manifest_pointer_missing",
2054
- "manifest_fetch_failed",
2055
- "manifest_parse_failed",
2056
- "missing_file_hashes",
2057
- "missing_domain",
2058
- "challenge_invalid",
2059
- "challenge_expired",
2060
- "dns_lookup_failed",
2061
- "dns_record_missing",
2062
- "mismatch"
2063
- ]);
2064
- const skillVerificationPublisherBoundSignalSchema = z.object({
2065
- ok: z.boolean(),
2066
- ownerAccountId: z.string().nullable(),
2067
- ownerUserId: z.string().nullable(),
2068
- checkedAt: z.string(),
2069
- reason: skillVerificationSignalFailureReasonSchema.optional()
2070
- }).passthrough();
2071
- const skillVerificationRepoCommitIntegrityMismatchSchema = z.object({
2072
- path: z.string(),
2073
- expectedSha256: z.string(),
2074
- actualSha256: z.string().optional(),
2075
- error: z.string().optional()
2076
- }).passthrough();
2077
- const skillVerificationRepoCommitIntegritySignalSchema = z.object({
2078
- ok: z.boolean(),
2079
- repo: z.string().nullable(),
2080
- commit: z.string().nullable(),
2081
- checkedAt: z.string(),
2082
- filesChecked: z.number().int().min(0),
2083
- mismatches: z.array(skillVerificationRepoCommitIntegrityMismatchSchema),
2084
- partial: z.boolean().optional(),
2085
- reason: skillVerificationSignalFailureReasonSchema.optional()
2086
- }).passthrough();
2087
- const skillVerificationManifestIntegrityShaMismatchSchema = z.object({
2088
- path: z.string(),
2089
- expectedSha256: z.string(),
2090
- actualSha256: z.string().optional()
2091
- }).passthrough();
2092
- const skillVerificationManifestIntegritySignalSchema = z.object({
2093
- ok: z.boolean(),
2094
- manifestHrl: z.string().nullable(),
2095
- manifestSha256: z.string().nullable(),
2096
- checkedAt: z.string(),
2097
- missingFiles: z.array(z.string()),
2098
- shaMismatches: z.array(skillVerificationManifestIntegrityShaMismatchSchema),
2099
- extraFiles: z.array(z.string()).optional(),
2100
- reason: skillVerificationSignalFailureReasonSchema.optional()
2101
- }).passthrough();
2102
- const skillVerificationDomainProofSignalSchema = z.object({
2103
- ok: z.boolean(),
2104
- domain: z.string().optional(),
2105
- method: z.literal("dns_txt").optional(),
2106
- checkedAt: z.string().optional(),
2107
- details: z.string().optional(),
2108
- txtRecordName: z.string().optional(),
2109
- reason: skillVerificationSignalFailureReasonSchema.optional()
2110
- }).passthrough();
2111
- const skillVerificationSignalsSchema = z.object({
2112
- publisherBound: skillVerificationPublisherBoundSignalSchema,
2113
- repoCommitIntegrity: skillVerificationRepoCommitIntegritySignalSchema,
2114
- manifestIntegrity: skillVerificationManifestIntegritySignalSchema,
2115
- domainProof: skillVerificationDomainProofSignalSchema.optional()
2116
- }).passthrough();
2117
- const skillVerificationRequestSchema = z.object({
2118
- id: z.string(),
2119
- network: z.union([z.literal("mainnet"), z.literal("testnet")]),
2120
- name: z.string(),
2121
- version: z.string().optional(),
2122
- tier: skillVerificationTierSchema,
2123
- status: skillVerificationStatusSchema,
2124
- usdCents: z.number(),
2125
- creditsCharged: z.number(),
2126
- creditAccountId: z.string().optional(),
2127
- signals: skillVerificationSignalsSchema.optional(),
2128
- reviewNotes: z.string().optional(),
2129
- requestedBy: z.object({
2130
- userId: z.string().optional(),
2131
- accountId: z.string().optional(),
2132
- email: z.string().optional()
2133
- }).optional(),
2134
- approvedBy: z.object({
2135
- userId: z.string().optional(),
2136
- email: z.string().optional()
2137
- }).optional(),
2138
- approvedAt: z.string().optional(),
2139
- rejectedBy: z.object({
2140
- userId: z.string().optional(),
2141
- email: z.string().optional()
2142
- }).optional(),
2143
- rejectedAt: z.string().optional(),
2144
- createdAt: z.string(),
2145
- updatedAt: z.string()
2146
- }).passthrough();
2147
- const skillVerificationRequestCreateResponseSchema = z.object({
2148
- request: skillVerificationRequestSchema
2149
- }).passthrough();
2150
- const skillVerificationStatusResponseSchema = z.object({
2151
- name: z.string(),
2152
- version: z.string(),
2153
- status: skillVerificationStatusLabelSchema,
2154
- verified: z.boolean(),
2155
- previouslyVerified: z.boolean(),
2156
- signals: skillVerificationSignalsSchema.nullable().optional(),
2157
- reviewNotes: z.string().nullable().optional(),
2158
- pendingRequest: skillVerificationRequestSchema.nullable().optional()
2159
- }).passthrough();
2160
- z.object({
2161
- name: z.string().min(1),
2162
- version: z.string().min(1).optional(),
2163
- domain: z.string().min(1).optional()
2164
- }).passthrough();
2165
- const skillVerificationDomainProofChallengeResponseSchema = z.object({
2166
- challengeId: z.string().min(1),
2167
- name: z.string().min(1),
2168
- version: z.string().min(1),
2169
- domain: z.string().min(1),
2170
- method: z.literal("dns_txt"),
2171
- txtRecordName: z.string().min(1),
2172
- txtRecordValue: z.string().min(1),
2173
- expiresAt: z.string().min(1)
2174
- }).passthrough();
2175
- z.object({
2176
- name: z.string().min(1),
2177
- version: z.string().min(1).optional(),
2178
- domain: z.string().min(1).optional(),
2179
- challengeToken: z.string().min(1)
2180
- }).passthrough();
2181
- const skillVerificationDomainProofVerifyResponseSchema = z.object({
2182
- name: z.string().min(1),
2183
- version: z.string().min(1),
2184
- signal: skillVerificationDomainProofSignalSchema
2185
- }).passthrough();
1
+ import { TopicMessageSubmitTransaction, TopicId, TopicCreateTransaction, PublicKey, KeyList } from "@hashgraph/sdk";
2
+ function encodeHcs2RegistryMemo(indexedFlag, ttl) {
3
+ return `hcs-2:${indexedFlag}:${ttl}`;
4
+ }
5
+ function buildTopicCreateTx(params) {
6
+ const { memo, adminKey, submitKey, operatorPublicKey } = params;
7
+ const tx = new TopicCreateTransaction().setTopicMemo(memo);
8
+ const coerceKey = (k) => {
9
+ if (!k) return void 0;
10
+ if (k instanceof PublicKey || k instanceof KeyList) return k;
11
+ if (typeof k === "boolean") {
12
+ return k ? operatorPublicKey : void 0;
13
+ }
14
+ if (typeof k === "string") {
15
+ try {
16
+ return PublicKey.fromString(k);
17
+ } catch {
18
+ return void 0;
19
+ }
20
+ }
21
+ return void 0;
22
+ };
23
+ const admin = coerceKey(adminKey);
24
+ if (admin) {
25
+ tx.setAdminKey(admin);
26
+ }
27
+ const submit = coerceKey(submitKey);
28
+ if (submit) {
29
+ tx.setSubmitKey(submit);
30
+ }
31
+ return tx;
32
+ }
33
+ function buildMessageTx(params) {
34
+ const tx = new TopicMessageSubmitTransaction().setTopicId(TopicId.fromString(params.topicId)).setMessage(params.message);
35
+ if (params.transactionMemo) {
36
+ tx.setTransactionMemo(params.transactionMemo);
37
+ }
38
+ return tx;
39
+ }
2186
40
  export {
2187
- AIAgentCapability,
2188
- AIAgentType,
2189
- adapterChatProfileSchema,
2190
- adapterDescriptorSchema,
2191
- adapterDetailsResponseSchema,
2192
- adapterRegistryAdapterSchema,
2193
- adapterRegistryAdaptersResponseSchema,
2194
- adapterRegistryCategoriesResponseSchema,
2195
- adapterRegistryCategorySchema,
2196
- adapterRegistryCreateCategoryResponseSchema,
2197
- adapterRegistrySubmissionStatusResponseSchema,
2198
- adapterRegistrySubmitAdapterAcceptedResponseSchema,
2199
- adaptersResponseSchema,
2200
- additionalRegistryCatalogResponseSchema,
2201
- agentFeedbackEligibilityResponseSchema,
2202
- agentFeedbackEntriesIndexResponseSchema,
2203
- agentFeedbackIndexResponseSchema,
2204
- agentFeedbackResponseSchema,
2205
- agentFeedbackSubmissionResponseSchema,
2206
- chatHistoryCompactionResponseSchema,
2207
- chatHistorySnapshotResponseSchema,
2208
- createSessionResponseSchema,
2209
- creditBalanceResponseSchema,
2210
- creditProviderSummarySchema,
2211
- creditProvidersResponseSchema,
2212
- creditPurchaseResponseSchema,
2213
- dashboardStatsResponseSchema,
2214
- delegationPlanResponseSchema,
2215
- detectProtocolResponseSchema,
2216
- encryptionHandshakeResponseSchema,
2217
- guardAbomResponseSchema,
2218
- guardAbomSummarySchema,
2219
- guardActionItemSchema,
2220
- guardAlertPreferencesSchema,
2221
- guardArtifactTimelineResponseSchema,
2222
- guardBalanceResponseSchema,
2223
- guardBucketBalanceSchema,
2224
- guardDeviceListResponseSchema,
2225
- guardDeviceSchema,
2226
- guardEntitlementsSchema,
2227
- guardExceptionItemSchema,
2228
- guardExceptionListResponseSchema,
2229
- guardExportSignatureSchema,
2230
- guardFeedItemSchema,
2231
- guardFeedResponseSchema,
2232
- guardFeedSummarySchema,
2233
- guardHistoryArtifactSchema,
2234
- guardIntegrationSchema,
2235
- guardInventoryArtifactSchema,
2236
- guardInventoryDiffEntrySchema,
2237
- guardInventoryDiffResponseSchema,
2238
- guardInventoryResponseSchema,
2239
- guardOverviewResponseSchema,
2240
- guardPainSignalAggregateResponseSchema,
2241
- guardPainSignalAggregateSchema,
2242
- guardPainSignalListResponseSchema,
2243
- guardPainSignalSchema,
2244
- guardPlanIdSchema,
2245
- guardPolicySchema,
2246
- guardPreflightEvidenceSchema,
2247
- guardPreflightVerdictResponseSchema,
2248
- guardPrincipalSchema,
2249
- guardReceiptExportResponseSchema,
2250
- guardReceiptExportSummarySchema,
2251
- guardReceiptHistoryResponseSchema,
2252
- guardReceiptSchema,
2253
- guardReceiptSyncResponseSchema,
2254
- guardRevocationResponseSchema,
2255
- guardRevocationSchema,
2256
- guardSessionResponseSchema,
2257
- guardTeamPolicyAuditItemSchema,
2258
- guardTeamPolicyPackSchema,
2259
- guardTimelineEventSchema,
2260
- guardTrustByHashResponseSchema,
2261
- guardTrustMatchSchema,
2262
- guardTrustResolveResponseSchema,
2263
- guardWatchlistItemSchema,
2264
- guardWatchlistLookupMatchSchema,
2265
- guardWatchlistLookupResponseSchema,
2266
- guardWatchlistResponseSchema,
2267
- hbarPurchaseIntentResponseSchema,
2268
- ledgerChallengeResponseSchema,
2269
- ledgerVerifyResponseSchema,
2270
- metricsSummaryResponseSchema,
2271
- moltbookOwnerRegistrationUpdateResponseSchema,
2272
- popularResponseSchema,
2273
- protocolsResponseSchema,
2274
- registerAgentResponseSchema,
2275
- registerEncryptionKeyResponseSchema,
2276
- registerStatusResponseSchema,
2277
- registrationProgressResponseSchema,
2278
- registrationQuoteResponseSchema,
2279
- registriesResponseSchema,
2280
- registrySearchByNamespaceSchema,
2281
- resolveResponseSchema,
2282
- searchFacetsResponseSchema,
2283
- searchResponseSchema,
2284
- searchStatusResponseSchema,
2285
- sendMessageResponseSchema,
2286
- sessionEncryptionStatusResponseSchema,
2287
- skillBadgeMetricSchema,
2288
- skillBadgeResponseSchema,
2289
- skillBadgeStyleSchema,
2290
- skillCatalogItemSchema,
2291
- skillCatalogResponseSchema,
2292
- skillCatalogVersionSummarySchema,
2293
- skillConversionSignalsResponseSchema,
2294
- skillDeprecationRecordSchema,
2295
- skillDeprecationsResponseSchema,
2296
- skillInstallArtifactDescriptorSchema,
2297
- skillInstallBadgeDescriptorSchema,
2298
- skillInstallCopyTelemetryResponseSchema,
2299
- skillInstallResolverDescriptorSchema,
2300
- skillInstallResponseSchema,
2301
- skillInstallShareDescriptorSchema,
2302
- skillInstallSnippetSetSchema,
2303
- skillPreviewLookupResponseSchema,
2304
- skillPreviewRecordSchema,
2305
- skillPreviewReportSchema,
2306
- skillPreviewSuggestedNextStepSchema,
2307
- skillQuotePreviewRangeSchema,
2308
- skillQuotePreviewResponseSchema,
2309
- skillRecommendedVersionResponseSchema,
2310
- skillRegistryCategoriesResponseSchema,
2311
- skillRegistryConfigResponseSchema,
2312
- skillRegistryFileDescriptorSchema,
2313
- skillRegistryJobStatusResponseSchema,
2314
- skillRegistryListResponseSchema,
2315
- skillRegistryMineItemSchema,
2316
- skillRegistryMineResponseSchema,
2317
- skillRegistryMyListResponseSchema,
2318
- skillRegistryOwnershipResponseSchema,
2319
- skillRegistryPublishResponseSchema,
2320
- skillRegistryPublishSummarySchema,
2321
- skillRegistryQuoteFileBreakdownSchema,
2322
- skillRegistryQuoteResponseSchema,
2323
- skillRegistryTagsResponseSchema,
2324
- skillRegistryVersionItemSchema,
2325
- skillRegistryVersionsResponseSchema,
2326
- skillRegistryVoteStatusResponseSchema,
2327
- skillResolverManifestResponseSchema,
2328
- skillSecurityBreakdownResponseSchema,
2329
- skillStatusChecksSchema,
2330
- skillStatusNextStepSchema,
2331
- skillStatusPreviewMetadataSchema,
2332
- skillStatusProvenanceSignalsSchema,
2333
- skillStatusResponseSchema,
2334
- skillStatusVerificationSignalsSchema,
2335
- skillTrustTierSchema,
2336
- skillVerificationDomainProofChallengeResponseSchema,
2337
- skillVerificationDomainProofVerifyResponseSchema,
2338
- skillVerificationRequestCreateResponseSchema,
2339
- skillVerificationStatusResponseSchema,
2340
- statsResponseSchema,
2341
- uaidConnectionStatusSchema,
2342
- uaidValidationResponseSchema,
2343
- vectorSearchResponseSchema,
2344
- verificationChallengeDetailsResponseSchema,
2345
- verificationChallengeResponseSchema,
2346
- verificationDnsStatusResponseSchema,
2347
- verificationOwnershipResponseSchema,
2348
- verificationStatusResponseSchema,
2349
- verificationVerifyResponseSchema,
2350
- verificationVerifySenderResponseSchema,
2351
- websocketStatsResponseSchema,
2352
- x402CreditPurchaseResponseSchema,
2353
- x402MinimumsResponseSchema
41
+ buildMessageTx,
42
+ buildTopicCreateTx,
43
+ encodeHcs2RegistryMemo
2354
44
  };
2355
45
  //# sourceMappingURL=standards-sdk.es160.js.map