agentex-creator-sdk 1.0.0

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 (97) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/LICENSE +21 -0
  3. package/README.md +195 -0
  4. package/dist/packages/contracts/src/deployer-investigation.d.ts +1015 -0
  5. package/dist/packages/contracts/src/deployer-investigation.js +101 -0
  6. package/dist/packages/contracts/src/index.d.ts +1701 -0
  7. package/dist/packages/contracts/src/index.js +380 -0
  8. package/dist/packages/contracts/src/indexed-activity.d.ts +684 -0
  9. package/dist/packages/contracts/src/indexed-activity.js +71 -0
  10. package/dist/packages/contracts/src/indexed-agents.d.ts +299 -0
  11. package/dist/packages/contracts/src/indexed-agents.js +131 -0
  12. package/dist/packages/contracts/src/inspection.d.ts +906 -0
  13. package/dist/packages/contracts/src/inspection.js +114 -0
  14. package/dist/packages/contracts/src/kinds.d.ts +5398 -0
  15. package/dist/packages/contracts/src/kinds.js +156 -0
  16. package/dist/packages/contracts/src/report-presentation.d.ts +346 -0
  17. package/dist/packages/contracts/src/report-presentation.js +120 -0
  18. package/dist/packages/contracts/src/solana-inspection.d.ts +451 -0
  19. package/dist/packages/contracts/src/solana-inspection.js +94 -0
  20. package/dist/packages/contracts/src/token-market.d.ts +193 -0
  21. package/dist/packages/contracts/src/token-market.js +335 -0
  22. package/dist/packages/contracts/src/wallet-analysis.d.ts +866 -0
  23. package/dist/packages/contracts/src/wallet-analysis.js +89 -0
  24. package/dist/packages/contracts/src/watchtower.d.ts +1141 -0
  25. package/dist/packages/contracts/src/watchtower.js +196 -0
  26. package/dist/packages/contracts/src/workflow.d.ts +1568 -0
  27. package/dist/packages/contracts/src/workflow.js +651 -0
  28. package/dist/packages/inspector/src/decode.d.ts +23 -0
  29. package/dist/packages/inspector/src/decode.js +150 -0
  30. package/dist/packages/inspector/src/scope.d.ts +87 -0
  31. package/dist/packages/inspector/src/scope.js +64 -0
  32. package/dist/packages/model/src/analysis.d.ts +149 -0
  33. package/dist/packages/model/src/analysis.js +387 -0
  34. package/dist/packages/model/src/pricing.d.ts +38 -0
  35. package/dist/packages/model/src/pricing.js +49 -0
  36. package/dist/packages/model/src/retry.d.ts +20 -0
  37. package/dist/packages/model/src/retry.js +31 -0
  38. package/dist/packages/model/src/schema.d.ts +10 -0
  39. package/dist/packages/model/src/schema.js +51 -0
  40. package/dist/packages/model/src/summary.d.ts +91 -0
  41. package/dist/packages/model/src/summary.js +177 -0
  42. package/dist/packages/model/src/types.d.ts +81 -0
  43. package/dist/packages/model/src/types.js +19 -0
  44. package/dist/packages/monitoring/src/delivery.d.ts +32 -0
  45. package/dist/packages/monitoring/src/delivery.js +53 -0
  46. package/dist/packages/providers/src/chain-transport.d.ts +42 -0
  47. package/dist/packages/providers/src/chain-transport.js +57 -0
  48. package/dist/packages/providers/src/coverage.d.ts +105 -0
  49. package/dist/packages/providers/src/coverage.js +260 -0
  50. package/dist/packages/providers/src/health.d.ts +273 -0
  51. package/dist/packages/providers/src/health.js +505 -0
  52. package/dist/packages/providers/src/keyed.d.ts +96 -0
  53. package/dist/packages/providers/src/keyed.js +240 -0
  54. package/dist/packages/providers/src/snapshot.d.ts +61 -0
  55. package/dist/packages/providers/src/snapshot.js +77 -0
  56. package/dist/packages/publication/src/fixtures.d.ts +45 -0
  57. package/dist/packages/publication/src/fixtures.js +350 -0
  58. package/dist/packages/research/src/index.d.ts +188 -0
  59. package/dist/packages/research/src/index.js +829 -0
  60. package/dist/packages/runtime/src/checkpoints.d.ts +65 -0
  61. package/dist/packages/runtime/src/checkpoints.js +214 -0
  62. package/dist/packages/runtime/src/policy.d.ts +57 -0
  63. package/dist/packages/runtime/src/policy.js +296 -0
  64. package/dist/packages/sdk/src/bin/agentex-buyer.d.ts +2 -0
  65. package/dist/packages/sdk/src/bin/agentex-buyer.js +4 -0
  66. package/dist/packages/sdk/src/bin/agentex.d.ts +2 -0
  67. package/dist/packages/sdk/src/bin/agentex.js +3 -0
  68. package/dist/packages/sdk/src/buyer-cli.d.ts +10 -0
  69. package/dist/packages/sdk/src/buyer-cli.js +210 -0
  70. package/dist/packages/sdk/src/buyer.d.ts +534 -0
  71. package/dist/packages/sdk/src/buyer.js +441 -0
  72. package/dist/packages/sdk/src/cli.d.ts +14 -0
  73. package/dist/packages/sdk/src/cli.js +149 -0
  74. package/dist/packages/sdk/src/errors.d.ts +31 -0
  75. package/dist/packages/sdk/src/errors.js +24 -0
  76. package/dist/packages/sdk/src/index.d.ts +236 -0
  77. package/dist/packages/sdk/src/index.js +150 -0
  78. package/dist/packages/sdk/src/local.d.ts +11 -0
  79. package/dist/packages/sdk/src/local.js +110 -0
  80. package/dist/packages/sdk/src/rails.d.ts +59 -0
  81. package/dist/packages/sdk/src/rails.js +96 -0
  82. package/dist/packages/sdk/src/report.d.ts +121 -0
  83. package/dist/packages/sdk/src/report.js +114 -0
  84. package/dist/packages/sdk/src/version.d.ts +2 -0
  85. package/dist/packages/sdk/src/version.js +2 -0
  86. package/dist/packages/watchtower/src/index.d.ts +150 -0
  87. package/dist/packages/watchtower/src/index.js +786 -0
  88. package/dist/packages/workflow/src/registry.d.ts +61 -0
  89. package/dist/packages/workflow/src/registry.js +76 -0
  90. package/examples/README.md +34 -0
  91. package/examples/cli-usage.sh +30 -0
  92. package/examples/fixtures/base-weth-input.json +4 -0
  93. package/examples/focused-researcher.json +127 -0
  94. package/examples/pay-with-eth-robinhood.mts +37 -0
  95. package/examples/pay-with-usdc.mts +41 -0
  96. package/examples/quickstart.mts +73 -0
  97. package/package.json +50 -0
@@ -0,0 +1,1568 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * General creator workflows (`agentex.workflow.v1`). Kept outside index.ts so the fixed first-party manifests, their schemas
4
+ * and hashes stay byte-for-byte unchanged. A workflow is typed data: declared tools from the platform registry, typed bindings,
5
+ * deterministic conditions/transforms and report sections. Descriptive text never grants a capability; permissions are derived
6
+ * only from `tools`, `permissions`, `secrets` and `limits` and are enforced by runtime policy outside nodes.
7
+ */
8
+ export declare const WORKFLOW_SCHEMA_ID: "agentex.workflow.v1";
9
+ export declare const MODEL_PROVIDER_UNCONFIGURED = "AI analysis is not available on this server, so AI analysis steps stay switched off and no model is called.";
10
+ /** L04: models a creator may select for an AI analysis node. Mirrors the priced server tariff table (packages/model MODEL_TARIFFS); others are refused. */
11
+ export declare const WORKFLOW_ALLOWED_MODELS: readonly ["claude-opus-5", "claude-opus-4-8"];
12
+ export declare const WorkflowChainKeySchema: z.ZodEnum<{
13
+ ethereum: "ethereum";
14
+ base: "base";
15
+ robinhood: "robinhood";
16
+ solana: "solana";
17
+ }>;
18
+ export type WorkflowChainKey = z.infer<typeof WorkflowChainKeySchema>;
19
+ export declare const ToolCapabilitySchema: z.ZodEnum<{
20
+ "evm.read": "evm.read";
21
+ "http.read": "http.read";
22
+ "solana.read": "solana.read";
23
+ }>;
24
+ export type ToolCapability = z.infer<typeof ToolCapabilitySchema>;
25
+ /** Methods a read capability may ever request. Signing, sending and account-management methods are absent by construction. */
26
+ export declare const CAPABILITY_METHODS: Readonly<Record<ToolCapability, readonly string[]>>;
27
+ export declare const WorkflowFieldSchema: z.ZodObject<{
28
+ type: z.ZodEnum<{
29
+ string: "string";
30
+ boolean: "boolean";
31
+ integer: "integer";
32
+ "evm-address": "evm-address";
33
+ "solana-address": "solana-address";
34
+ }>;
35
+ description: z.ZodString;
36
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
37
+ }, z.core.$strict>;
38
+ export declare const WorkflowInputSchemaDefinition: z.ZodObject<{
39
+ type: z.ZodLiteral<"object">;
40
+ properties: z.ZodRecord<z.ZodString, z.ZodObject<{
41
+ type: z.ZodEnum<{
42
+ string: "string";
43
+ boolean: "boolean";
44
+ integer: "integer";
45
+ "evm-address": "evm-address";
46
+ "solana-address": "solana-address";
47
+ }>;
48
+ description: z.ZodString;
49
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
50
+ }, z.core.$strict>>;
51
+ required: z.ZodArray<z.ZodString>;
52
+ additionalProperties: z.ZodLiteral<false>;
53
+ }, z.core.$strict>;
54
+ export declare const WorkflowBindingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
55
+ source: z.ZodLiteral<"input">;
56
+ path: z.ZodString;
57
+ }, z.core.$strict>, z.ZodObject<{
58
+ source: z.ZodLiteral<"node">;
59
+ nodeId: z.ZodString;
60
+ path: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strict>, z.ZodObject<{
62
+ source: z.ZodLiteral<"literal">;
63
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
64
+ }, z.core.$strict>], "source">;
65
+ export type WorkflowBinding = z.infer<typeof WorkflowBindingSchema>;
66
+ export declare const ConditionOperatorSchema: z.ZodEnum<{
67
+ equals: "equals";
68
+ exists: "exists";
69
+ gt: "gt";
70
+ lt: "lt";
71
+ gte: "gte";
72
+ lte: "lte";
73
+ }>;
74
+ export type ConditionOperator = z.infer<typeof ConditionOperatorSchema>;
75
+ export declare const TransformSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
76
+ op: z.ZodLiteral<"pick">;
77
+ from: z.ZodDiscriminatedUnion<[z.ZodObject<{
78
+ source: z.ZodLiteral<"input">;
79
+ path: z.ZodString;
80
+ }, z.core.$strict>, z.ZodObject<{
81
+ source: z.ZodLiteral<"node">;
82
+ nodeId: z.ZodString;
83
+ path: z.ZodOptional<z.ZodString>;
84
+ }, z.core.$strict>, z.ZodObject<{
85
+ source: z.ZodLiteral<"literal">;
86
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
87
+ }, z.core.$strict>], "source">;
88
+ }, z.core.$strict>, z.ZodObject<{
89
+ op: z.ZodLiteral<"compare">;
90
+ left: z.ZodDiscriminatedUnion<[z.ZodObject<{
91
+ source: z.ZodLiteral<"input">;
92
+ path: z.ZodString;
93
+ }, z.core.$strict>, z.ZodObject<{
94
+ source: z.ZodLiteral<"node">;
95
+ nodeId: z.ZodString;
96
+ path: z.ZodOptional<z.ZodString>;
97
+ }, z.core.$strict>, z.ZodObject<{
98
+ source: z.ZodLiteral<"literal">;
99
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
100
+ }, z.core.$strict>], "source">;
101
+ operator: z.ZodEnum<{
102
+ equals: "equals";
103
+ gt: "gt";
104
+ lt: "lt";
105
+ gte: "gte";
106
+ lte: "lte";
107
+ }>;
108
+ right: z.ZodDiscriminatedUnion<[z.ZodObject<{
109
+ source: z.ZodLiteral<"input">;
110
+ path: z.ZodString;
111
+ }, z.core.$strict>, z.ZodObject<{
112
+ source: z.ZodLiteral<"node">;
113
+ nodeId: z.ZodString;
114
+ path: z.ZodOptional<z.ZodString>;
115
+ }, z.core.$strict>, z.ZodObject<{
116
+ source: z.ZodLiteral<"literal">;
117
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
118
+ }, z.core.$strict>], "source">;
119
+ }, z.core.$strict>, z.ZodObject<{
120
+ op: z.ZodLiteral<"threshold">;
121
+ value: z.ZodDiscriminatedUnion<[z.ZodObject<{
122
+ source: z.ZodLiteral<"input">;
123
+ path: z.ZodString;
124
+ }, z.core.$strict>, z.ZodObject<{
125
+ source: z.ZodLiteral<"node">;
126
+ nodeId: z.ZodString;
127
+ path: z.ZodOptional<z.ZodString>;
128
+ }, z.core.$strict>, z.ZodObject<{
129
+ source: z.ZodLiteral<"literal">;
130
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
131
+ }, z.core.$strict>], "source">;
132
+ threshold: z.ZodString;
133
+ }, z.core.$strict>, z.ZodObject<{
134
+ op: z.ZodLiteral<"format-amount">;
135
+ amount: z.ZodDiscriminatedUnion<[z.ZodObject<{
136
+ source: z.ZodLiteral<"input">;
137
+ path: z.ZodString;
138
+ }, z.core.$strict>, z.ZodObject<{
139
+ source: z.ZodLiteral<"node">;
140
+ nodeId: z.ZodString;
141
+ path: z.ZodOptional<z.ZodString>;
142
+ }, z.core.$strict>, z.ZodObject<{
143
+ source: z.ZodLiteral<"literal">;
144
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
145
+ }, z.core.$strict>], "source">;
146
+ decimals: z.ZodDiscriminatedUnion<[z.ZodObject<{
147
+ source: z.ZodLiteral<"input">;
148
+ path: z.ZodString;
149
+ }, z.core.$strict>, z.ZodObject<{
150
+ source: z.ZodLiteral<"node">;
151
+ nodeId: z.ZodString;
152
+ path: z.ZodOptional<z.ZodString>;
153
+ }, z.core.$strict>, z.ZodObject<{
154
+ source: z.ZodLiteral<"literal">;
155
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
156
+ }, z.core.$strict>], "source">;
157
+ }, z.core.$strict>], "op">;
158
+ export type WorkflowTransform = z.infer<typeof TransformSchema>;
159
+ export declare const FindingValueTypeSchema: z.ZodEnum<{
160
+ string: "string";
161
+ boolean: "boolean";
162
+ address: "address";
163
+ integer: "integer";
164
+ decimal: "decimal";
165
+ }>;
166
+ export type FindingValueType = z.infer<typeof FindingValueTypeSchema>;
167
+ export declare const WorkflowNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
168
+ type: z.ZodLiteral<"input">;
169
+ id: z.ZodString;
170
+ label: z.ZodOptional<z.ZodString>;
171
+ dependsOn: z.ZodArray<z.ZodString>;
172
+ }, z.core.$strict>, z.ZodObject<{
173
+ type: z.ZodLiteral<"tool">;
174
+ tool: z.ZodString;
175
+ arguments: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
176
+ source: z.ZodLiteral<"input">;
177
+ path: z.ZodString;
178
+ }, z.core.$strict>, z.ZodObject<{
179
+ source: z.ZodLiteral<"node">;
180
+ nodeId: z.ZodString;
181
+ path: z.ZodOptional<z.ZodString>;
182
+ }, z.core.$strict>, z.ZodObject<{
183
+ source: z.ZodLiteral<"literal">;
184
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
185
+ }, z.core.$strict>], "source">>;
186
+ id: z.ZodString;
187
+ label: z.ZodOptional<z.ZodString>;
188
+ dependsOn: z.ZodArray<z.ZodString>;
189
+ }, z.core.$strict>, z.ZodObject<{
190
+ type: z.ZodLiteral<"condition">;
191
+ field: z.ZodDiscriminatedUnion<[z.ZodObject<{
192
+ source: z.ZodLiteral<"input">;
193
+ path: z.ZodString;
194
+ }, z.core.$strict>, z.ZodObject<{
195
+ source: z.ZodLiteral<"node">;
196
+ nodeId: z.ZodString;
197
+ path: z.ZodOptional<z.ZodString>;
198
+ }, z.core.$strict>, z.ZodObject<{
199
+ source: z.ZodLiteral<"literal">;
200
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
201
+ }, z.core.$strict>], "source">;
202
+ operator: z.ZodEnum<{
203
+ equals: "equals";
204
+ exists: "exists";
205
+ gt: "gt";
206
+ lt: "lt";
207
+ gte: "gte";
208
+ lte: "lte";
209
+ }>;
210
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
211
+ whenTrue: z.ZodNullable<z.ZodString>;
212
+ whenFalse: z.ZodNullable<z.ZodString>;
213
+ id: z.ZodString;
214
+ label: z.ZodOptional<z.ZodString>;
215
+ dependsOn: z.ZodArray<z.ZodString>;
216
+ }, z.core.$strict>, z.ZodObject<{
217
+ type: z.ZodLiteral<"transform">;
218
+ transform: z.ZodDiscriminatedUnion<[z.ZodObject<{
219
+ op: z.ZodLiteral<"pick">;
220
+ from: z.ZodDiscriminatedUnion<[z.ZodObject<{
221
+ source: z.ZodLiteral<"input">;
222
+ path: z.ZodString;
223
+ }, z.core.$strict>, z.ZodObject<{
224
+ source: z.ZodLiteral<"node">;
225
+ nodeId: z.ZodString;
226
+ path: z.ZodOptional<z.ZodString>;
227
+ }, z.core.$strict>, z.ZodObject<{
228
+ source: z.ZodLiteral<"literal">;
229
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
230
+ }, z.core.$strict>], "source">;
231
+ }, z.core.$strict>, z.ZodObject<{
232
+ op: z.ZodLiteral<"compare">;
233
+ left: z.ZodDiscriminatedUnion<[z.ZodObject<{
234
+ source: z.ZodLiteral<"input">;
235
+ path: z.ZodString;
236
+ }, z.core.$strict>, z.ZodObject<{
237
+ source: z.ZodLiteral<"node">;
238
+ nodeId: z.ZodString;
239
+ path: z.ZodOptional<z.ZodString>;
240
+ }, z.core.$strict>, z.ZodObject<{
241
+ source: z.ZodLiteral<"literal">;
242
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
243
+ }, z.core.$strict>], "source">;
244
+ operator: z.ZodEnum<{
245
+ equals: "equals";
246
+ gt: "gt";
247
+ lt: "lt";
248
+ gte: "gte";
249
+ lte: "lte";
250
+ }>;
251
+ right: z.ZodDiscriminatedUnion<[z.ZodObject<{
252
+ source: z.ZodLiteral<"input">;
253
+ path: z.ZodString;
254
+ }, z.core.$strict>, z.ZodObject<{
255
+ source: z.ZodLiteral<"node">;
256
+ nodeId: z.ZodString;
257
+ path: z.ZodOptional<z.ZodString>;
258
+ }, z.core.$strict>, z.ZodObject<{
259
+ source: z.ZodLiteral<"literal">;
260
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
261
+ }, z.core.$strict>], "source">;
262
+ }, z.core.$strict>, z.ZodObject<{
263
+ op: z.ZodLiteral<"threshold">;
264
+ value: z.ZodDiscriminatedUnion<[z.ZodObject<{
265
+ source: z.ZodLiteral<"input">;
266
+ path: z.ZodString;
267
+ }, z.core.$strict>, z.ZodObject<{
268
+ source: z.ZodLiteral<"node">;
269
+ nodeId: z.ZodString;
270
+ path: z.ZodOptional<z.ZodString>;
271
+ }, z.core.$strict>, z.ZodObject<{
272
+ source: z.ZodLiteral<"literal">;
273
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
274
+ }, z.core.$strict>], "source">;
275
+ threshold: z.ZodString;
276
+ }, z.core.$strict>, z.ZodObject<{
277
+ op: z.ZodLiteral<"format-amount">;
278
+ amount: z.ZodDiscriminatedUnion<[z.ZodObject<{
279
+ source: z.ZodLiteral<"input">;
280
+ path: z.ZodString;
281
+ }, z.core.$strict>, z.ZodObject<{
282
+ source: z.ZodLiteral<"node">;
283
+ nodeId: z.ZodString;
284
+ path: z.ZodOptional<z.ZodString>;
285
+ }, z.core.$strict>, z.ZodObject<{
286
+ source: z.ZodLiteral<"literal">;
287
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
288
+ }, z.core.$strict>], "source">;
289
+ decimals: z.ZodDiscriminatedUnion<[z.ZodObject<{
290
+ source: z.ZodLiteral<"input">;
291
+ path: z.ZodString;
292
+ }, z.core.$strict>, z.ZodObject<{
293
+ source: z.ZodLiteral<"node">;
294
+ nodeId: z.ZodString;
295
+ path: z.ZodOptional<z.ZodString>;
296
+ }, z.core.$strict>, z.ZodObject<{
297
+ source: z.ZodLiteral<"literal">;
298
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
299
+ }, z.core.$strict>], "source">;
300
+ }, z.core.$strict>], "op">;
301
+ id: z.ZodString;
302
+ label: z.ZodOptional<z.ZodString>;
303
+ dependsOn: z.ZodArray<z.ZodString>;
304
+ }, z.core.$strict>, z.ZodObject<{
305
+ type: z.ZodLiteral<"report-section">;
306
+ section: z.ZodString;
307
+ findings: z.ZodArray<z.ZodObject<{
308
+ code: z.ZodString;
309
+ value: z.ZodDiscriminatedUnion<[z.ZodObject<{
310
+ source: z.ZodLiteral<"input">;
311
+ path: z.ZodString;
312
+ }, z.core.$strict>, z.ZodObject<{
313
+ source: z.ZodLiteral<"node">;
314
+ nodeId: z.ZodString;
315
+ path: z.ZodOptional<z.ZodString>;
316
+ }, z.core.$strict>, z.ZodObject<{
317
+ source: z.ZodLiteral<"literal">;
318
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
319
+ }, z.core.$strict>], "source">;
320
+ }, z.core.$strict>>;
321
+ id: z.ZodString;
322
+ label: z.ZodOptional<z.ZodString>;
323
+ dependsOn: z.ZodArray<z.ZodString>;
324
+ }, z.core.$strict>, z.ZodObject<{
325
+ type: z.ZodLiteral<"ai-analysis">;
326
+ instructions: z.ZodString;
327
+ inputs: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
328
+ source: z.ZodLiteral<"input">;
329
+ path: z.ZodString;
330
+ }, z.core.$strict>, z.ZodObject<{
331
+ source: z.ZodLiteral<"node">;
332
+ nodeId: z.ZodString;
333
+ path: z.ZodOptional<z.ZodString>;
334
+ }, z.core.$strict>, z.ZodObject<{
335
+ source: z.ZodLiteral<"literal">;
336
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
337
+ }, z.core.$strict>], "source">>;
338
+ maximumTokens: z.ZodNumber;
339
+ model: z.ZodOptional<z.ZodEnum<{
340
+ "claude-opus-5": "claude-opus-5";
341
+ "claude-opus-4-8": "claude-opus-4-8";
342
+ }>>;
343
+ id: z.ZodString;
344
+ label: z.ZodOptional<z.ZodString>;
345
+ dependsOn: z.ZodArray<z.ZodString>;
346
+ }, z.core.$strict>, z.ZodObject<{
347
+ type: z.ZodLiteral<"output">;
348
+ sections: z.ZodArray<z.ZodString>;
349
+ id: z.ZodString;
350
+ label: z.ZodOptional<z.ZodString>;
351
+ dependsOn: z.ZodArray<z.ZodString>;
352
+ }, z.core.$strict>, z.ZodObject<{
353
+ type: z.ZodLiteral<"sandboxed-transform">;
354
+ inputs: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
355
+ source: z.ZodLiteral<"input">;
356
+ path: z.ZodString;
357
+ }, z.core.$strict>, z.ZodObject<{
358
+ source: z.ZodLiteral<"node">;
359
+ nodeId: z.ZodString;
360
+ path: z.ZodOptional<z.ZodString>;
361
+ }, z.core.$strict>, z.ZodObject<{
362
+ source: z.ZodLiteral<"literal">;
363
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
364
+ }, z.core.$strict>], "source">>;
365
+ source: z.ZodString;
366
+ timeoutMs: z.ZodNumber;
367
+ id: z.ZodString;
368
+ label: z.ZodOptional<z.ZodString>;
369
+ dependsOn: z.ZodArray<z.ZodString>;
370
+ }, z.core.$strict>], "type">;
371
+ export type WorkflowNode = z.infer<typeof WorkflowNodeSchema>;
372
+ export type WorkflowNodeType = WorkflowNode['type'];
373
+ export declare const WorkflowToolDeclarationSchema: z.ZodObject<{
374
+ id: z.ZodString;
375
+ version: z.ZodString;
376
+ capability: z.ZodEnum<{
377
+ "evm.read": "evm.read";
378
+ "http.read": "http.read";
379
+ "solana.read": "solana.read";
380
+ }>;
381
+ chains: z.ZodArray<z.ZodEnum<{
382
+ ethereum: "ethereum";
383
+ base: "base";
384
+ robinhood: "robinhood";
385
+ solana: "solana";
386
+ }>>;
387
+ maximumCalls: z.ZodNumber;
388
+ }, z.core.$strict>;
389
+ export type WorkflowToolDeclaration = z.infer<typeof WorkflowToolDeclarationSchema>;
390
+ /**
391
+ * N03/N04: a reviewed remote connector pinned by the version. `id` is the alias tool nodes name, `schemaHash` the approved connector version's
392
+ * declaration hash, `maximumCalls` the per-run call ceiling and `maximumCostMicrousd` the per-run metered cost ceiling. Absent keeps existing
393
+ * manifests byte-identical. Connector nodes run only on servers with AGENTEX_CONNECTORS_ENABLED=true, through the connector gateway.
394
+ */
395
+ export declare const WorkflowConnectorDeclarationSchema: z.ZodObject<{
396
+ id: z.ZodString;
397
+ connectorId: z.ZodUUID;
398
+ schemaHash: z.ZodString;
399
+ maximumCalls: z.ZodNumber;
400
+ maximumCostMicrousd: z.ZodNumber;
401
+ }, z.core.$strict>;
402
+ export type WorkflowConnectorDeclaration = z.infer<typeof WorkflowConnectorDeclarationSchema>;
403
+ export declare const WORKFLOW_CONNECTOR_TOOL_VERSION: "1.0.0";
404
+ /** Evidence and step tool reference of a connector node. Aliases never collide with declared tool ids. */
405
+ export declare const connectorToolRef: (alias: string) => string;
406
+ export declare const CONNECTOR_CALL_METHOD: "POST";
407
+ export declare const CONNECTORS_DISABLED = "Remote connectors are switched off on this server, so workflows that declare connectors cannot be saved, versioned or run.";
408
+ export declare const WorkflowOutputSchemaDefinition: z.ZodObject<{
409
+ sections: z.ZodArray<z.ZodObject<{
410
+ id: z.ZodString;
411
+ title: z.ZodString;
412
+ required: z.ZodBoolean;
413
+ findings: z.ZodArray<z.ZodObject<{
414
+ code: z.ZodString;
415
+ label: z.ZodString;
416
+ valueType: z.ZodEnum<{
417
+ string: "string";
418
+ boolean: "boolean";
419
+ address: "address";
420
+ integer: "integer";
421
+ decimal: "decimal";
422
+ }>;
423
+ }, z.core.$strict>>;
424
+ }, z.core.$strict>>;
425
+ }, z.core.$strict>;
426
+ /** Hosted use, source viewing and fork permission are separate rights. Per-run fees pay for platform execution only. */
427
+ export declare const WorkflowRightsSchema: z.ZodObject<{
428
+ hostedUse: z.ZodEnum<{
429
+ "owner-only": "owner-only";
430
+ "listed-buyers": "listed-buyers";
431
+ }>;
432
+ sourceView: z.ZodEnum<{
433
+ public: "public";
434
+ "owner-only": "owner-only";
435
+ }>;
436
+ fork: z.ZodEnum<{
437
+ "not-permitted": "not-permitted";
438
+ permitted: "permitted";
439
+ "permitted-with-attribution": "permitted-with-attribution";
440
+ }>;
441
+ attributionNotice: z.ZodOptional<z.ZodString>;
442
+ }, z.core.$strict>;
443
+ export type WorkflowRights = z.infer<typeof WorkflowRightsSchema>;
444
+ export declare const AttributionSchema: z.ZodObject<{
445
+ sourceId: z.ZodString;
446
+ sourceVersionHash: z.ZodString;
447
+ author: z.ZodString;
448
+ license: z.ZodString;
449
+ notice: z.ZodString;
450
+ }, z.core.$strict>;
451
+ export declare const WorkflowManifestSchema: z.ZodObject<{
452
+ schemaVersion: z.ZodLiteral<"1.0">;
453
+ id: z.ZodString;
454
+ version: z.ZodString;
455
+ name: z.ZodString;
456
+ description: z.ZodString;
457
+ author: z.ZodObject<{
458
+ id: z.ZodString;
459
+ name: z.ZodString;
460
+ ownership: z.ZodEnum<{
461
+ "first-party": "first-party";
462
+ independent: "independent";
463
+ }>;
464
+ }, z.core.$strict>;
465
+ license: z.ZodString;
466
+ visibility: z.ZodEnum<{
467
+ private: "private";
468
+ "source-visible": "source-visible";
469
+ "source-private": "source-private";
470
+ }>;
471
+ rights: z.ZodObject<{
472
+ hostedUse: z.ZodEnum<{
473
+ "owner-only": "owner-only";
474
+ "listed-buyers": "listed-buyers";
475
+ }>;
476
+ sourceView: z.ZodEnum<{
477
+ public: "public";
478
+ "owner-only": "owner-only";
479
+ }>;
480
+ fork: z.ZodEnum<{
481
+ "not-permitted": "not-permitted";
482
+ permitted: "permitted";
483
+ "permitted-with-attribution": "permitted-with-attribution";
484
+ }>;
485
+ attributionNotice: z.ZodOptional<z.ZodString>;
486
+ }, z.core.$strict>;
487
+ attribution: z.ZodArray<z.ZodObject<{
488
+ sourceId: z.ZodString;
489
+ sourceVersionHash: z.ZodString;
490
+ author: z.ZodString;
491
+ license: z.ZodString;
492
+ notice: z.ZodString;
493
+ }, z.core.$strict>>;
494
+ chains: z.ZodArray<z.ZodEnum<{
495
+ ethereum: "ethereum";
496
+ base: "base";
497
+ robinhood: "robinhood";
498
+ solana: "solana";
499
+ }>>;
500
+ inputSchema: z.ZodObject<{
501
+ type: z.ZodLiteral<"object">;
502
+ properties: z.ZodRecord<z.ZodString, z.ZodObject<{
503
+ type: z.ZodEnum<{
504
+ string: "string";
505
+ boolean: "boolean";
506
+ integer: "integer";
507
+ "evm-address": "evm-address";
508
+ "solana-address": "solana-address";
509
+ }>;
510
+ description: z.ZodString;
511
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
512
+ }, z.core.$strict>>;
513
+ required: z.ZodArray<z.ZodString>;
514
+ additionalProperties: z.ZodLiteral<false>;
515
+ }, z.core.$strict>;
516
+ outputSchemaId: z.ZodLiteral<"agentex.workflow.v1">;
517
+ outputSchema: z.ZodObject<{
518
+ sections: z.ZodArray<z.ZodObject<{
519
+ id: z.ZodString;
520
+ title: z.ZodString;
521
+ required: z.ZodBoolean;
522
+ findings: z.ZodArray<z.ZodObject<{
523
+ code: z.ZodString;
524
+ label: z.ZodString;
525
+ valueType: z.ZodEnum<{
526
+ string: "string";
527
+ boolean: "boolean";
528
+ address: "address";
529
+ integer: "integer";
530
+ decimal: "decimal";
531
+ }>;
532
+ }, z.core.$strict>>;
533
+ }, z.core.$strict>>;
534
+ }, z.core.$strict>;
535
+ tools: z.ZodArray<z.ZodObject<{
536
+ id: z.ZodString;
537
+ version: z.ZodString;
538
+ capability: z.ZodEnum<{
539
+ "evm.read": "evm.read";
540
+ "http.read": "http.read";
541
+ "solana.read": "solana.read";
542
+ }>;
543
+ chains: z.ZodArray<z.ZodEnum<{
544
+ ethereum: "ethereum";
545
+ base: "base";
546
+ robinhood: "robinhood";
547
+ solana: "solana";
548
+ }>>;
549
+ maximumCalls: z.ZodNumber;
550
+ }, z.core.$strict>>;
551
+ connectors: z.ZodOptional<z.ZodArray<z.ZodObject<{
552
+ id: z.ZodString;
553
+ connectorId: z.ZodUUID;
554
+ schemaHash: z.ZodString;
555
+ maximumCalls: z.ZodNumber;
556
+ maximumCostMicrousd: z.ZodNumber;
557
+ }, z.core.$strict>>>;
558
+ permissions: z.ZodObject<{
559
+ addressScope: z.ZodEnum<{
560
+ "input-bound": "input-bound";
561
+ "input-derived": "input-derived";
562
+ }>;
563
+ domains: z.ZodArray<z.ZodString>;
564
+ destinations: z.ZodTuple<[z.ZodLiteral<"run-report">], null>;
565
+ }, z.core.$strict>;
566
+ modelPolicy: z.ZodDiscriminatedUnion<[z.ZodObject<{
567
+ mode: z.ZodLiteral<"deterministic">;
568
+ maximumModelTokens: z.ZodLiteral<0>;
569
+ }, z.core.$strict>, z.ZodObject<{
570
+ mode: z.ZodLiteral<"bounded-model">;
571
+ maximumModelTokens: z.ZodNumber;
572
+ maximumCostMicrousd: z.ZodOptional<z.ZodNumber>;
573
+ }, z.core.$strict>], "mode">;
574
+ secrets: z.ZodArray<z.ZodObject<{
575
+ name: z.ZodString;
576
+ reference: z.ZodString;
577
+ purpose: z.ZodString;
578
+ }, z.core.$strict>>;
579
+ limits: z.ZodObject<{
580
+ maximumSteps: z.ZodNumber;
581
+ maximumRpcCalls: z.ZodNumber;
582
+ maximumDurationMs: z.ZodNumber;
583
+ stepTimeoutMs: z.ZodNumber;
584
+ maximumOutputBytes: z.ZodNumber;
585
+ maximumGraphDepth: z.ZodNumber;
586
+ maximumBlockRange: z.ZodNumber;
587
+ maximumPages: z.ZodNumber;
588
+ maximumExecutionAtomic: z.ZodString;
589
+ }, z.core.$strict>;
590
+ workflow: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
591
+ type: z.ZodLiteral<"input">;
592
+ id: z.ZodString;
593
+ label: z.ZodOptional<z.ZodString>;
594
+ dependsOn: z.ZodArray<z.ZodString>;
595
+ }, z.core.$strict>, z.ZodObject<{
596
+ type: z.ZodLiteral<"tool">;
597
+ tool: z.ZodString;
598
+ arguments: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
599
+ source: z.ZodLiteral<"input">;
600
+ path: z.ZodString;
601
+ }, z.core.$strict>, z.ZodObject<{
602
+ source: z.ZodLiteral<"node">;
603
+ nodeId: z.ZodString;
604
+ path: z.ZodOptional<z.ZodString>;
605
+ }, z.core.$strict>, z.ZodObject<{
606
+ source: z.ZodLiteral<"literal">;
607
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
608
+ }, z.core.$strict>], "source">>;
609
+ id: z.ZodString;
610
+ label: z.ZodOptional<z.ZodString>;
611
+ dependsOn: z.ZodArray<z.ZodString>;
612
+ }, z.core.$strict>, z.ZodObject<{
613
+ type: z.ZodLiteral<"condition">;
614
+ field: z.ZodDiscriminatedUnion<[z.ZodObject<{
615
+ source: z.ZodLiteral<"input">;
616
+ path: z.ZodString;
617
+ }, z.core.$strict>, z.ZodObject<{
618
+ source: z.ZodLiteral<"node">;
619
+ nodeId: z.ZodString;
620
+ path: z.ZodOptional<z.ZodString>;
621
+ }, z.core.$strict>, z.ZodObject<{
622
+ source: z.ZodLiteral<"literal">;
623
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
624
+ }, z.core.$strict>], "source">;
625
+ operator: z.ZodEnum<{
626
+ equals: "equals";
627
+ exists: "exists";
628
+ gt: "gt";
629
+ lt: "lt";
630
+ gte: "gte";
631
+ lte: "lte";
632
+ }>;
633
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
634
+ whenTrue: z.ZodNullable<z.ZodString>;
635
+ whenFalse: z.ZodNullable<z.ZodString>;
636
+ id: z.ZodString;
637
+ label: z.ZodOptional<z.ZodString>;
638
+ dependsOn: z.ZodArray<z.ZodString>;
639
+ }, z.core.$strict>, z.ZodObject<{
640
+ type: z.ZodLiteral<"transform">;
641
+ transform: z.ZodDiscriminatedUnion<[z.ZodObject<{
642
+ op: z.ZodLiteral<"pick">;
643
+ from: z.ZodDiscriminatedUnion<[z.ZodObject<{
644
+ source: z.ZodLiteral<"input">;
645
+ path: z.ZodString;
646
+ }, z.core.$strict>, z.ZodObject<{
647
+ source: z.ZodLiteral<"node">;
648
+ nodeId: z.ZodString;
649
+ path: z.ZodOptional<z.ZodString>;
650
+ }, z.core.$strict>, z.ZodObject<{
651
+ source: z.ZodLiteral<"literal">;
652
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
653
+ }, z.core.$strict>], "source">;
654
+ }, z.core.$strict>, z.ZodObject<{
655
+ op: z.ZodLiteral<"compare">;
656
+ left: z.ZodDiscriminatedUnion<[z.ZodObject<{
657
+ source: z.ZodLiteral<"input">;
658
+ path: z.ZodString;
659
+ }, z.core.$strict>, z.ZodObject<{
660
+ source: z.ZodLiteral<"node">;
661
+ nodeId: z.ZodString;
662
+ path: z.ZodOptional<z.ZodString>;
663
+ }, z.core.$strict>, z.ZodObject<{
664
+ source: z.ZodLiteral<"literal">;
665
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
666
+ }, z.core.$strict>], "source">;
667
+ operator: z.ZodEnum<{
668
+ equals: "equals";
669
+ gt: "gt";
670
+ lt: "lt";
671
+ gte: "gte";
672
+ lte: "lte";
673
+ }>;
674
+ right: z.ZodDiscriminatedUnion<[z.ZodObject<{
675
+ source: z.ZodLiteral<"input">;
676
+ path: z.ZodString;
677
+ }, z.core.$strict>, z.ZodObject<{
678
+ source: z.ZodLiteral<"node">;
679
+ nodeId: z.ZodString;
680
+ path: z.ZodOptional<z.ZodString>;
681
+ }, z.core.$strict>, z.ZodObject<{
682
+ source: z.ZodLiteral<"literal">;
683
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
684
+ }, z.core.$strict>], "source">;
685
+ }, z.core.$strict>, z.ZodObject<{
686
+ op: z.ZodLiteral<"threshold">;
687
+ value: z.ZodDiscriminatedUnion<[z.ZodObject<{
688
+ source: z.ZodLiteral<"input">;
689
+ path: z.ZodString;
690
+ }, z.core.$strict>, z.ZodObject<{
691
+ source: z.ZodLiteral<"node">;
692
+ nodeId: z.ZodString;
693
+ path: z.ZodOptional<z.ZodString>;
694
+ }, z.core.$strict>, z.ZodObject<{
695
+ source: z.ZodLiteral<"literal">;
696
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
697
+ }, z.core.$strict>], "source">;
698
+ threshold: z.ZodString;
699
+ }, z.core.$strict>, z.ZodObject<{
700
+ op: z.ZodLiteral<"format-amount">;
701
+ amount: z.ZodDiscriminatedUnion<[z.ZodObject<{
702
+ source: z.ZodLiteral<"input">;
703
+ path: z.ZodString;
704
+ }, z.core.$strict>, z.ZodObject<{
705
+ source: z.ZodLiteral<"node">;
706
+ nodeId: z.ZodString;
707
+ path: z.ZodOptional<z.ZodString>;
708
+ }, z.core.$strict>, z.ZodObject<{
709
+ source: z.ZodLiteral<"literal">;
710
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
711
+ }, z.core.$strict>], "source">;
712
+ decimals: z.ZodDiscriminatedUnion<[z.ZodObject<{
713
+ source: z.ZodLiteral<"input">;
714
+ path: z.ZodString;
715
+ }, z.core.$strict>, z.ZodObject<{
716
+ source: z.ZodLiteral<"node">;
717
+ nodeId: z.ZodString;
718
+ path: z.ZodOptional<z.ZodString>;
719
+ }, z.core.$strict>, z.ZodObject<{
720
+ source: z.ZodLiteral<"literal">;
721
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
722
+ }, z.core.$strict>], "source">;
723
+ }, z.core.$strict>], "op">;
724
+ id: z.ZodString;
725
+ label: z.ZodOptional<z.ZodString>;
726
+ dependsOn: z.ZodArray<z.ZodString>;
727
+ }, z.core.$strict>, z.ZodObject<{
728
+ type: z.ZodLiteral<"report-section">;
729
+ section: z.ZodString;
730
+ findings: z.ZodArray<z.ZodObject<{
731
+ code: z.ZodString;
732
+ value: z.ZodDiscriminatedUnion<[z.ZodObject<{
733
+ source: z.ZodLiteral<"input">;
734
+ path: z.ZodString;
735
+ }, z.core.$strict>, z.ZodObject<{
736
+ source: z.ZodLiteral<"node">;
737
+ nodeId: z.ZodString;
738
+ path: z.ZodOptional<z.ZodString>;
739
+ }, z.core.$strict>, z.ZodObject<{
740
+ source: z.ZodLiteral<"literal">;
741
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
742
+ }, z.core.$strict>], "source">;
743
+ }, z.core.$strict>>;
744
+ id: z.ZodString;
745
+ label: z.ZodOptional<z.ZodString>;
746
+ dependsOn: z.ZodArray<z.ZodString>;
747
+ }, z.core.$strict>, z.ZodObject<{
748
+ type: z.ZodLiteral<"ai-analysis">;
749
+ instructions: z.ZodString;
750
+ inputs: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
751
+ source: z.ZodLiteral<"input">;
752
+ path: z.ZodString;
753
+ }, z.core.$strict>, z.ZodObject<{
754
+ source: z.ZodLiteral<"node">;
755
+ nodeId: z.ZodString;
756
+ path: z.ZodOptional<z.ZodString>;
757
+ }, z.core.$strict>, z.ZodObject<{
758
+ source: z.ZodLiteral<"literal">;
759
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
760
+ }, z.core.$strict>], "source">>;
761
+ maximumTokens: z.ZodNumber;
762
+ model: z.ZodOptional<z.ZodEnum<{
763
+ "claude-opus-5": "claude-opus-5";
764
+ "claude-opus-4-8": "claude-opus-4-8";
765
+ }>>;
766
+ id: z.ZodString;
767
+ label: z.ZodOptional<z.ZodString>;
768
+ dependsOn: z.ZodArray<z.ZodString>;
769
+ }, z.core.$strict>, z.ZodObject<{
770
+ type: z.ZodLiteral<"output">;
771
+ sections: z.ZodArray<z.ZodString>;
772
+ id: z.ZodString;
773
+ label: z.ZodOptional<z.ZodString>;
774
+ dependsOn: z.ZodArray<z.ZodString>;
775
+ }, z.core.$strict>, z.ZodObject<{
776
+ type: z.ZodLiteral<"sandboxed-transform">;
777
+ inputs: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
778
+ source: z.ZodLiteral<"input">;
779
+ path: z.ZodString;
780
+ }, z.core.$strict>, z.ZodObject<{
781
+ source: z.ZodLiteral<"node">;
782
+ nodeId: z.ZodString;
783
+ path: z.ZodOptional<z.ZodString>;
784
+ }, z.core.$strict>, z.ZodObject<{
785
+ source: z.ZodLiteral<"literal">;
786
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
787
+ }, z.core.$strict>], "source">>;
788
+ source: z.ZodString;
789
+ timeoutMs: z.ZodNumber;
790
+ id: z.ZodString;
791
+ label: z.ZodOptional<z.ZodString>;
792
+ dependsOn: z.ZodArray<z.ZodString>;
793
+ }, z.core.$strict>], "type">>;
794
+ sampleOutput: z.ZodArray<z.ZodObject<{
795
+ section: z.ZodString;
796
+ findings: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
797
+ }, z.core.$strict>>;
798
+ testCases: z.ZodArray<z.ZodObject<{
799
+ id: z.ZodString;
800
+ chain: z.ZodEnum<{
801
+ ethereum: "ethereum";
802
+ base: "base";
803
+ robinhood: "robinhood";
804
+ solana: "solana";
805
+ }>;
806
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
807
+ }, z.core.$strict>>;
808
+ presentation: z.ZodOptional<z.ZodObject<{
809
+ archetype: z.ZodEnum<{
810
+ "token-protocol": "token-protocol";
811
+ "wallet-flow": "wallet-flow";
812
+ "contract-security": "contract-security";
813
+ "market-liquidity": "market-liquidity";
814
+ "governance-treasury": "governance-treasury";
815
+ "monitoring-events": "monitoring-events";
816
+ }>;
817
+ headline: z.ZodOptional<z.ZodObject<{
818
+ section: z.ZodString;
819
+ finding: z.ZodString;
820
+ }, z.core.$strict>>;
821
+ datasets: z.ZodOptional<z.ZodArray<z.ZodObject<{
822
+ id: z.ZodString;
823
+ title: z.ZodString;
824
+ node: z.ZodString;
825
+ path: z.ZodString;
826
+ columns: z.ZodArray<z.ZodObject<{
827
+ key: z.ZodString;
828
+ label: z.ZodString;
829
+ type: z.ZodEnum<{
830
+ boolean: "boolean";
831
+ address: "address";
832
+ integer: "integer";
833
+ label: "label";
834
+ text: "text";
835
+ amount: "amount";
836
+ percent: "percent";
837
+ block: "block";
838
+ transaction: "transaction";
839
+ time: "time";
840
+ }>;
841
+ path: z.ZodString;
842
+ }, z.core.$strict>>;
843
+ maxRows: z.ZodNumber;
844
+ }, z.core.$strict>>>;
845
+ signals: z.ZodOptional<z.ZodArray<z.ZodString>>;
846
+ coverage: z.ZodOptional<z.ZodArray<z.ZodObject<{
847
+ node: z.ZodString;
848
+ path: z.ZodString;
849
+ label: z.ZodString;
850
+ }, z.core.$strict>>>;
851
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
852
+ type: z.ZodLiteral<"metrics">;
853
+ title: z.ZodString;
854
+ items: z.ZodArray<z.ZodObject<{
855
+ section: z.ZodString;
856
+ finding: z.ZodString;
857
+ }, z.core.$strict>>;
858
+ }, z.core.$strict>, z.ZodObject<{
859
+ type: z.ZodLiteral<"section">;
860
+ section: z.ZodString;
861
+ }, z.core.$strict>, z.ZodObject<{
862
+ type: z.ZodLiteral<"table">;
863
+ dataset: z.ZodString;
864
+ title: z.ZodOptional<z.ZodString>;
865
+ }, z.core.$strict>, z.ZodObject<{
866
+ type: z.ZodLiteral<"bars">;
867
+ dataset: z.ZodString;
868
+ label: z.ZodString;
869
+ value: z.ZodString;
870
+ title: z.ZodOptional<z.ZodString>;
871
+ }, z.core.$strict>, z.ZodObject<{
872
+ type: z.ZodLiteral<"timeline">;
873
+ dataset: z.ZodString;
874
+ at: z.ZodString;
875
+ label: z.ZodString;
876
+ detail: z.ZodOptional<z.ZodString>;
877
+ title: z.ZodOptional<z.ZodString>;
878
+ }, z.core.$strict>, z.ZodObject<{
879
+ type: z.ZodLiteral<"flow">;
880
+ dataset: z.ZodString;
881
+ from: z.ZodString;
882
+ to: z.ZodString;
883
+ amount: z.ZodOptional<z.ZodString>;
884
+ title: z.ZodOptional<z.ZodString>;
885
+ }, z.core.$strict>, z.ZodObject<{
886
+ type: z.ZodLiteral<"graph">;
887
+ dataset: z.ZodString;
888
+ to: z.ZodString;
889
+ relation: z.ZodOptional<z.ZodString>;
890
+ from: z.ZodOptional<z.ZodString>;
891
+ title: z.ZodOptional<z.ZodString>;
892
+ }, z.core.$strict>, z.ZodObject<{
893
+ type: z.ZodLiteral<"signals">;
894
+ title: z.ZodOptional<z.ZodString>;
895
+ }, z.core.$strict>, z.ZodObject<{
896
+ type: z.ZodLiteral<"coverage">;
897
+ title: z.ZodOptional<z.ZodString>;
898
+ }, z.core.$strict>, z.ZodObject<{
899
+ type: z.ZodLiteral<"limitations">;
900
+ title: z.ZodOptional<z.ZodString>;
901
+ }, z.core.$strict>], "type">>;
902
+ }, z.core.$strict>>;
903
+ }, z.core.$strict>;
904
+ export type WorkflowManifest = z.infer<typeof WorkflowManifestSchema>;
905
+ export declare function workflowBindings(node: WorkflowNode): WorkflowBinding[];
906
+ export declare const isWorkflowManifest: (manifest: unknown) => boolean;
907
+ /** Exact decimal helpers. Never floating point: numbers are only accepted when they are safe integers or already exact finite literals. */
908
+ export declare function isDecimal(value: unknown): value is string | number;
909
+ /** Compares two exact decimals; returns -1, 0 or 1. */
910
+ export declare function compareDecimal(left: string | number, right: string | number): -1 | 0 | 1;
911
+ /** Formats an unsigned atomic integer with `decimals` places exactly, trimming only trailing fractional zeros. */
912
+ export declare function formatExactAmount(atomic: string | number, decimals: number): string;
913
+ export declare function findingValueMatches(value: unknown, type: FindingValueType): boolean;
914
+ /** Run input envelope. `values` are validated against the pinned manifest's input schema by `parseWorkflowRunInput`. */
915
+ export declare const WorkflowRunInputSchema: z.ZodObject<{
916
+ workflow: z.ZodLiteral<"agentex.workflow.v1">;
917
+ chain: z.ZodEnum<{
918
+ ethereum: "ethereum";
919
+ base: "base";
920
+ robinhood: "robinhood";
921
+ solana: "solana";
922
+ }>;
923
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
924
+ }, z.core.$strict>;
925
+ export type WorkflowRunInput = z.infer<typeof WorkflowRunInputSchema>;
926
+ export declare function parseWorkflowRunInput(raw: unknown, manifest: WorkflowManifest): WorkflowRunInput;
927
+ /**
928
+ * F02 evidence envelope produced by every registry tool. It mirrors `agentex.tool-evidence.v1` in packages/tools/src/evidence.ts,
929
+ * which owns construction (`makeToolEvidence`); keep both definitions identical. Ids derive from the artifact hash, so neither a
930
+ * tool, a node nor a model can invent or reuse one. Contracts keep a copy so reports validate without tool implementations.
931
+ */
932
+ export declare const TOOL_EVIDENCE_VERSION: "agentex.tool-evidence.v1";
933
+ export declare const ToolSnapshotSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
934
+ kind: z.ZodLiteral<"evm-block">;
935
+ chainId: z.ZodNumber;
936
+ blockNumber: z.ZodString;
937
+ blockHash: z.ZodString;
938
+ timestamp: z.ZodNullable<z.ZodString>;
939
+ }, z.core.$strict>, z.ZodObject<{
940
+ kind: z.ZodLiteral<"solana-slot">;
941
+ genesisHash: z.ZodString;
942
+ slot: z.ZodString;
943
+ commitment: z.ZodEnum<{
944
+ finalized: "finalized";
945
+ confirmed: "confirmed";
946
+ }>;
947
+ exactness: z.ZodEnum<{
948
+ "observed-context": "observed-context";
949
+ "lower-bound": "lower-bound";
950
+ }>;
951
+ }, z.core.$strict>, z.ZodObject<{
952
+ kind: z.ZodLiteral<"http-retrieval">;
953
+ retrievedAt: z.ZodISODateTime;
954
+ }, z.core.$strict>, z.ZodObject<{
955
+ kind: z.ZodLiteral<"offline-input">;
956
+ inputHash: z.ZodString;
957
+ }, z.core.$strict>], "kind">;
958
+ export declare const ToolEvidenceCompletenessSchema: z.ZodEnum<{
959
+ error: "error";
960
+ "complete-for-request": "complete-for-request";
961
+ unavailable: "unavailable";
962
+ truncated: "truncated";
963
+ "empty-result": "empty-result";
964
+ }>;
965
+ /** Canonicality is excluded: it is the only field a completion recheck may legitimately change. */
966
+ export declare function toolArtifactHash(item: Record<string, unknown>): string;
967
+ export declare const ToolEvidenceItemSchema: z.ZodObject<{
968
+ schemaVersion: z.ZodLiteral<"agentex.tool-evidence.v1">;
969
+ id: z.ZodString;
970
+ tool: z.ZodString;
971
+ capability: z.ZodEnum<{
972
+ "evm.read": "evm.read";
973
+ "http.read": "http.read";
974
+ "solana.read": "solana.read";
975
+ }>;
976
+ source: z.ZodObject<{
977
+ kind: z.ZodEnum<{
978
+ rpc: "rpc";
979
+ http: "http";
980
+ offline: "offline";
981
+ }>;
982
+ provider: z.ZodString;
983
+ method: z.ZodString;
984
+ documentationUrl: z.ZodNullable<z.ZodURL>;
985
+ }, z.core.$strict>;
986
+ chain: z.ZodString;
987
+ scope: z.ZodObject<{
988
+ subjects: z.ZodArray<z.ZodString>;
989
+ window: z.ZodNullable<z.ZodObject<{
990
+ unit: z.ZodEnum<{
991
+ block: "block";
992
+ slot: "slot";
993
+ }>;
994
+ from: z.ZodString;
995
+ to: z.ZodString;
996
+ }, z.core.$strict>>;
997
+ page: z.ZodNullable<z.ZodObject<{
998
+ index: z.ZodNumber;
999
+ size: z.ZodNumber;
1000
+ cursor: z.ZodNullable<z.ZodString>;
1001
+ }, z.core.$strict>>;
1002
+ }, z.core.$strict>;
1003
+ request: z.ZodJSONSchema;
1004
+ snapshot: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1005
+ kind: z.ZodLiteral<"evm-block">;
1006
+ chainId: z.ZodNumber;
1007
+ blockNumber: z.ZodString;
1008
+ blockHash: z.ZodString;
1009
+ timestamp: z.ZodNullable<z.ZodString>;
1010
+ }, z.core.$strict>, z.ZodObject<{
1011
+ kind: z.ZodLiteral<"solana-slot">;
1012
+ genesisHash: z.ZodString;
1013
+ slot: z.ZodString;
1014
+ commitment: z.ZodEnum<{
1015
+ finalized: "finalized";
1016
+ confirmed: "confirmed";
1017
+ }>;
1018
+ exactness: z.ZodEnum<{
1019
+ "observed-context": "observed-context";
1020
+ "lower-bound": "lower-bound";
1021
+ }>;
1022
+ }, z.core.$strict>, z.ZodObject<{
1023
+ kind: z.ZodLiteral<"http-retrieval">;
1024
+ retrievedAt: z.ZodISODateTime;
1025
+ }, z.core.$strict>, z.ZodObject<{
1026
+ kind: z.ZodLiteral<"offline-input">;
1027
+ inputHash: z.ZodString;
1028
+ }, z.core.$strict>], "kind">>;
1029
+ observedAt: z.ZodISODateTime;
1030
+ finality: z.ZodEnum<{
1031
+ finalized: "finalized";
1032
+ "sequencer-confirmed": "sequencer-confirmed";
1033
+ unverified: "unverified";
1034
+ "not-applicable": "not-applicable";
1035
+ confirmed: "confirmed";
1036
+ "finalized-lower-bound": "finalized-lower-bound";
1037
+ "confirmed-lower-bound": "confirmed-lower-bound";
1038
+ }>;
1039
+ canonicality: z.ZodEnum<{
1040
+ "verified-at-completion": "verified-at-completion";
1041
+ unchecked: "unchecked";
1042
+ changed: "changed";
1043
+ "not-applicable": "not-applicable";
1044
+ }>;
1045
+ completeness: z.ZodEnum<{
1046
+ error: "error";
1047
+ "complete-for-request": "complete-for-request";
1048
+ unavailable: "unavailable";
1049
+ truncated: "truncated";
1050
+ "empty-result": "empty-result";
1051
+ }>;
1052
+ errorCategory: z.ZodNullable<z.ZodString>;
1053
+ result: z.ZodJSONSchema;
1054
+ contentHash: z.ZodString;
1055
+ artifactHash: z.ZodString;
1056
+ privacy: z.ZodEnum<{
1057
+ "public-chain-data": "public-chain-data";
1058
+ "public-web-content": "public-web-content";
1059
+ "private-input": "private-input";
1060
+ }>;
1061
+ trust: z.ZodEnum<{
1062
+ "chain-state": "chain-state";
1063
+ "provider-assertion": "provider-assertion";
1064
+ "untrusted-third-party-content": "untrusted-third-party-content";
1065
+ "offline-decoding": "offline-decoding";
1066
+ }>;
1067
+ }, z.core.$strict>;
1068
+ export type ToolEvidenceItem = z.infer<typeof ToolEvidenceItemSchema>;
1069
+ export declare const WorkflowErrorCategorySchema: z.ZodEnum<{
1070
+ "no-contract": "no-contract";
1071
+ "provider-unavailable": "provider-unavailable";
1072
+ "history-unavailable": "history-unavailable";
1073
+ "rate-limited": "rate-limited";
1074
+ timeout: "timeout";
1075
+ cancelled: "cancelled";
1076
+ unsupported: "unsupported";
1077
+ "contract-reverted": "contract-reverted";
1078
+ "invalid-response": "invalid-response";
1079
+ "chain-mismatch": "chain-mismatch";
1080
+ "snapshot-changed": "snapshot-changed";
1081
+ "limit-exceeded": "limit-exceeded";
1082
+ unconfigured: "unconfigured";
1083
+ "permission-denied": "permission-denied";
1084
+ "invalid-arguments": "invalid-arguments";
1085
+ "invalid-tool-output": "invalid-tool-output";
1086
+ "invented-evidence": "invented-evidence";
1087
+ "unregistered-tool": "unregistered-tool";
1088
+ "model-unconfigured": "model-unconfigured";
1089
+ "step-timeout": "step-timeout";
1090
+ "condition-unknown": "condition-unknown";
1091
+ "model-failed": "model-failed";
1092
+ "sandbox-unavailable": "sandbox-unavailable";
1093
+ "sandbox-failed": "sandbox-failed";
1094
+ }>;
1095
+ export type WorkflowErrorCategory = z.infer<typeof WorkflowErrorCategorySchema>;
1096
+ export declare const WorkflowStepSchema: z.ZodObject<{
1097
+ nodeId: z.ZodString;
1098
+ type: z.ZodEnum<{
1099
+ output: "output";
1100
+ input: "input";
1101
+ transform: "transform";
1102
+ tool: "tool";
1103
+ condition: "condition";
1104
+ "report-section": "report-section";
1105
+ "ai-analysis": "ai-analysis";
1106
+ "sandboxed-transform": "sandboxed-transform";
1107
+ }>;
1108
+ tool: z.ZodNullable<z.ZodString>;
1109
+ status: z.ZodEnum<{
1110
+ skipped: "skipped";
1111
+ failed: "failed";
1112
+ disabled: "disabled";
1113
+ succeeded: "succeeded";
1114
+ }>;
1115
+ reason: z.ZodNullable<z.ZodString>;
1116
+ branch: z.ZodNullable<z.ZodEnum<{
1117
+ unknown: "unknown";
1118
+ false: "false";
1119
+ true: "true";
1120
+ }>>;
1121
+ rpcCalls: z.ZodNumber;
1122
+ evidenceIds: z.ZodArray<z.ZodString>;
1123
+ elapsedMs: z.ZodNumber;
1124
+ }, z.core.$strict>;
1125
+ export declare const WorkflowReportSchema: z.ZodObject<{
1126
+ schemaVersion: z.ZodLiteral<"agentex.workflow.v1">;
1127
+ agentVersion: z.ZodString;
1128
+ manifestHash: z.ZodString;
1129
+ input: z.ZodObject<{
1130
+ workflow: z.ZodLiteral<"agentex.workflow.v1">;
1131
+ chain: z.ZodEnum<{
1132
+ ethereum: "ethereum";
1133
+ base: "base";
1134
+ robinhood: "robinhood";
1135
+ solana: "solana";
1136
+ }>;
1137
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1138
+ }, z.core.$strict>;
1139
+ status: z.ZodEnum<{
1140
+ complete: "complete";
1141
+ partial: "partial";
1142
+ failed: "failed";
1143
+ }>;
1144
+ generatedAt: z.ZodISODateTime;
1145
+ requiredSections: z.ZodArray<z.ZodString>;
1146
+ sections: z.ZodArray<z.ZodObject<{
1147
+ id: z.ZodString;
1148
+ title: z.ZodString;
1149
+ status: z.ZodEnum<{
1150
+ skipped: "skipped";
1151
+ complete: "complete";
1152
+ partial: "partial";
1153
+ failed: "failed";
1154
+ }>;
1155
+ reason: z.ZodNullable<z.ZodString>;
1156
+ findings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1157
+ code: z.ZodString;
1158
+ label: z.ZodString;
1159
+ status: z.ZodLiteral<"observed">;
1160
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
1161
+ evidenceIds: z.ZodArray<z.ZodString>;
1162
+ }, z.core.$strict>, z.ZodObject<{
1163
+ code: z.ZodString;
1164
+ label: z.ZodString;
1165
+ status: z.ZodLiteral<"from-input">;
1166
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
1167
+ evidenceIds: z.ZodArray<z.ZodString>;
1168
+ }, z.core.$strict>, z.ZodObject<{
1169
+ code: z.ZodString;
1170
+ label: z.ZodString;
1171
+ status: z.ZodEnum<{
1172
+ unknown: "unknown";
1173
+ "not-run": "not-run";
1174
+ }>;
1175
+ reason: z.ZodString;
1176
+ evidenceIds: z.ZodArray<z.ZodString>;
1177
+ }, z.core.$strict>], "status">>;
1178
+ }, z.core.$strict>>;
1179
+ steps: z.ZodArray<z.ZodObject<{
1180
+ nodeId: z.ZodString;
1181
+ type: z.ZodEnum<{
1182
+ output: "output";
1183
+ input: "input";
1184
+ transform: "transform";
1185
+ tool: "tool";
1186
+ condition: "condition";
1187
+ "report-section": "report-section";
1188
+ "ai-analysis": "ai-analysis";
1189
+ "sandboxed-transform": "sandboxed-transform";
1190
+ }>;
1191
+ tool: z.ZodNullable<z.ZodString>;
1192
+ status: z.ZodEnum<{
1193
+ skipped: "skipped";
1194
+ failed: "failed";
1195
+ disabled: "disabled";
1196
+ succeeded: "succeeded";
1197
+ }>;
1198
+ reason: z.ZodNullable<z.ZodString>;
1199
+ branch: z.ZodNullable<z.ZodEnum<{
1200
+ unknown: "unknown";
1201
+ false: "false";
1202
+ true: "true";
1203
+ }>>;
1204
+ rpcCalls: z.ZodNumber;
1205
+ evidenceIds: z.ZodArray<z.ZodString>;
1206
+ elapsedMs: z.ZodNumber;
1207
+ }, z.core.$strict>>;
1208
+ evidence: z.ZodArray<z.ZodObject<{
1209
+ schemaVersion: z.ZodLiteral<"agentex.tool-evidence.v1">;
1210
+ id: z.ZodString;
1211
+ tool: z.ZodString;
1212
+ capability: z.ZodEnum<{
1213
+ "evm.read": "evm.read";
1214
+ "http.read": "http.read";
1215
+ "solana.read": "solana.read";
1216
+ }>;
1217
+ source: z.ZodObject<{
1218
+ kind: z.ZodEnum<{
1219
+ rpc: "rpc";
1220
+ http: "http";
1221
+ offline: "offline";
1222
+ }>;
1223
+ provider: z.ZodString;
1224
+ method: z.ZodString;
1225
+ documentationUrl: z.ZodNullable<z.ZodURL>;
1226
+ }, z.core.$strict>;
1227
+ chain: z.ZodString;
1228
+ scope: z.ZodObject<{
1229
+ subjects: z.ZodArray<z.ZodString>;
1230
+ window: z.ZodNullable<z.ZodObject<{
1231
+ unit: z.ZodEnum<{
1232
+ block: "block";
1233
+ slot: "slot";
1234
+ }>;
1235
+ from: z.ZodString;
1236
+ to: z.ZodString;
1237
+ }, z.core.$strict>>;
1238
+ page: z.ZodNullable<z.ZodObject<{
1239
+ index: z.ZodNumber;
1240
+ size: z.ZodNumber;
1241
+ cursor: z.ZodNullable<z.ZodString>;
1242
+ }, z.core.$strict>>;
1243
+ }, z.core.$strict>;
1244
+ request: z.ZodJSONSchema;
1245
+ snapshot: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1246
+ kind: z.ZodLiteral<"evm-block">;
1247
+ chainId: z.ZodNumber;
1248
+ blockNumber: z.ZodString;
1249
+ blockHash: z.ZodString;
1250
+ timestamp: z.ZodNullable<z.ZodString>;
1251
+ }, z.core.$strict>, z.ZodObject<{
1252
+ kind: z.ZodLiteral<"solana-slot">;
1253
+ genesisHash: z.ZodString;
1254
+ slot: z.ZodString;
1255
+ commitment: z.ZodEnum<{
1256
+ finalized: "finalized";
1257
+ confirmed: "confirmed";
1258
+ }>;
1259
+ exactness: z.ZodEnum<{
1260
+ "observed-context": "observed-context";
1261
+ "lower-bound": "lower-bound";
1262
+ }>;
1263
+ }, z.core.$strict>, z.ZodObject<{
1264
+ kind: z.ZodLiteral<"http-retrieval">;
1265
+ retrievedAt: z.ZodISODateTime;
1266
+ }, z.core.$strict>, z.ZodObject<{
1267
+ kind: z.ZodLiteral<"offline-input">;
1268
+ inputHash: z.ZodString;
1269
+ }, z.core.$strict>], "kind">>;
1270
+ observedAt: z.ZodISODateTime;
1271
+ finality: z.ZodEnum<{
1272
+ finalized: "finalized";
1273
+ "sequencer-confirmed": "sequencer-confirmed";
1274
+ unverified: "unverified";
1275
+ "not-applicable": "not-applicable";
1276
+ confirmed: "confirmed";
1277
+ "finalized-lower-bound": "finalized-lower-bound";
1278
+ "confirmed-lower-bound": "confirmed-lower-bound";
1279
+ }>;
1280
+ canonicality: z.ZodEnum<{
1281
+ "verified-at-completion": "verified-at-completion";
1282
+ unchecked: "unchecked";
1283
+ changed: "changed";
1284
+ "not-applicable": "not-applicable";
1285
+ }>;
1286
+ completeness: z.ZodEnum<{
1287
+ error: "error";
1288
+ "complete-for-request": "complete-for-request";
1289
+ unavailable: "unavailable";
1290
+ truncated: "truncated";
1291
+ "empty-result": "empty-result";
1292
+ }>;
1293
+ errorCategory: z.ZodNullable<z.ZodString>;
1294
+ result: z.ZodJSONSchema;
1295
+ contentHash: z.ZodString;
1296
+ artifactHash: z.ZodString;
1297
+ privacy: z.ZodEnum<{
1298
+ "public-chain-data": "public-chain-data";
1299
+ "public-web-content": "public-web-content";
1300
+ "private-input": "private-input";
1301
+ }>;
1302
+ trust: z.ZodEnum<{
1303
+ "chain-state": "chain-state";
1304
+ "provider-assertion": "provider-assertion";
1305
+ "untrusted-third-party-content": "untrusted-third-party-content";
1306
+ "offline-decoding": "offline-decoding";
1307
+ }>;
1308
+ }, z.core.$strict>>;
1309
+ errors: z.ZodArray<z.ZodObject<{
1310
+ category: z.ZodEnum<{
1311
+ "no-contract": "no-contract";
1312
+ "provider-unavailable": "provider-unavailable";
1313
+ "history-unavailable": "history-unavailable";
1314
+ "rate-limited": "rate-limited";
1315
+ timeout: "timeout";
1316
+ cancelled: "cancelled";
1317
+ unsupported: "unsupported";
1318
+ "contract-reverted": "contract-reverted";
1319
+ "invalid-response": "invalid-response";
1320
+ "chain-mismatch": "chain-mismatch";
1321
+ "snapshot-changed": "snapshot-changed";
1322
+ "limit-exceeded": "limit-exceeded";
1323
+ unconfigured: "unconfigured";
1324
+ "permission-denied": "permission-denied";
1325
+ "invalid-arguments": "invalid-arguments";
1326
+ "invalid-tool-output": "invalid-tool-output";
1327
+ "invented-evidence": "invented-evidence";
1328
+ "unregistered-tool": "unregistered-tool";
1329
+ "model-unconfigured": "model-unconfigured";
1330
+ "step-timeout": "step-timeout";
1331
+ "condition-unknown": "condition-unknown";
1332
+ "model-failed": "model-failed";
1333
+ "sandbox-unavailable": "sandbox-unavailable";
1334
+ "sandbox-failed": "sandbox-failed";
1335
+ }>;
1336
+ message: z.ZodString;
1337
+ step: z.ZodString;
1338
+ evidenceId: z.ZodOptional<z.ZodString>;
1339
+ }, z.core.$strict>>;
1340
+ limitations: z.ZodArray<z.ZodString>;
1341
+ usage: z.ZodObject<{
1342
+ rpcCalls: z.ZodNumber;
1343
+ maximumRpcCalls: z.ZodNumber;
1344
+ toolExecutions: z.ZodNumber;
1345
+ elapsedMs: z.ZodNumber;
1346
+ modelTokens: z.ZodNumber;
1347
+ providerCostAtomic: z.ZodNull;
1348
+ providerCostStatus: z.ZodLiteral<"unpriced">;
1349
+ modelCostMicrousd: z.ZodOptional<z.ZodNumber>;
1350
+ }, z.core.$strict>;
1351
+ presentation: z.ZodOptional<z.ZodObject<{
1352
+ archetype: z.ZodEnum<{
1353
+ "token-protocol": "token-protocol";
1354
+ "wallet-flow": "wallet-flow";
1355
+ "contract-security": "contract-security";
1356
+ "market-liquidity": "market-liquidity";
1357
+ "governance-treasury": "governance-treasury";
1358
+ "monitoring-events": "monitoring-events";
1359
+ }>;
1360
+ agentName: z.ZodOptional<z.ZodString>;
1361
+ headline: z.ZodNullable<z.ZodObject<{
1362
+ section: z.ZodString;
1363
+ finding: z.ZodString;
1364
+ }, z.core.$strict>>;
1365
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1366
+ type: z.ZodLiteral<"metrics">;
1367
+ title: z.ZodString;
1368
+ items: z.ZodArray<z.ZodObject<{
1369
+ section: z.ZodString;
1370
+ finding: z.ZodString;
1371
+ }, z.core.$strict>>;
1372
+ }, z.core.$strict>, z.ZodObject<{
1373
+ type: z.ZodLiteral<"section">;
1374
+ section: z.ZodString;
1375
+ }, z.core.$strict>, z.ZodObject<{
1376
+ type: z.ZodLiteral<"table">;
1377
+ dataset: z.ZodString;
1378
+ title: z.ZodOptional<z.ZodString>;
1379
+ }, z.core.$strict>, z.ZodObject<{
1380
+ type: z.ZodLiteral<"bars">;
1381
+ dataset: z.ZodString;
1382
+ label: z.ZodString;
1383
+ value: z.ZodString;
1384
+ title: z.ZodOptional<z.ZodString>;
1385
+ }, z.core.$strict>, z.ZodObject<{
1386
+ type: z.ZodLiteral<"timeline">;
1387
+ dataset: z.ZodString;
1388
+ at: z.ZodString;
1389
+ label: z.ZodString;
1390
+ detail: z.ZodOptional<z.ZodString>;
1391
+ title: z.ZodOptional<z.ZodString>;
1392
+ }, z.core.$strict>, z.ZodObject<{
1393
+ type: z.ZodLiteral<"flow">;
1394
+ dataset: z.ZodString;
1395
+ from: z.ZodString;
1396
+ to: z.ZodString;
1397
+ amount: z.ZodOptional<z.ZodString>;
1398
+ title: z.ZodOptional<z.ZodString>;
1399
+ }, z.core.$strict>, z.ZodObject<{
1400
+ type: z.ZodLiteral<"graph">;
1401
+ dataset: z.ZodString;
1402
+ to: z.ZodString;
1403
+ relation: z.ZodOptional<z.ZodString>;
1404
+ from: z.ZodOptional<z.ZodString>;
1405
+ title: z.ZodOptional<z.ZodString>;
1406
+ }, z.core.$strict>, z.ZodObject<{
1407
+ type: z.ZodLiteral<"signals">;
1408
+ title: z.ZodOptional<z.ZodString>;
1409
+ }, z.core.$strict>, z.ZodObject<{
1410
+ type: z.ZodLiteral<"coverage">;
1411
+ title: z.ZodOptional<z.ZodString>;
1412
+ }, z.core.$strict>, z.ZodObject<{
1413
+ type: z.ZodLiteral<"limitations">;
1414
+ title: z.ZodOptional<z.ZodString>;
1415
+ }, z.core.$strict>], "type">>;
1416
+ }, z.core.$strict>>;
1417
+ datasets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1418
+ id: z.ZodString;
1419
+ title: z.ZodString;
1420
+ node: z.ZodString;
1421
+ status: z.ZodEnum<{
1422
+ observed: "observed";
1423
+ unavailable: "unavailable";
1424
+ absent: "absent";
1425
+ }>;
1426
+ reason: z.ZodNullable<z.ZodString>;
1427
+ columns: z.ZodArray<z.ZodObject<{
1428
+ key: z.ZodString;
1429
+ label: z.ZodString;
1430
+ type: z.ZodEnum<{
1431
+ boolean: "boolean";
1432
+ address: "address";
1433
+ integer: "integer";
1434
+ label: "label";
1435
+ text: "text";
1436
+ amount: "amount";
1437
+ percent: "percent";
1438
+ block: "block";
1439
+ transaction: "transaction";
1440
+ time: "time";
1441
+ }>;
1442
+ }, z.core.$strict>>;
1443
+ rows: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
1444
+ totalRows: z.ZodNumber;
1445
+ truncated: z.ZodBoolean;
1446
+ evidenceIds: z.ZodArray<z.ZodString>;
1447
+ }, z.core.$strict>>>;
1448
+ signals: z.ZodOptional<z.ZodArray<z.ZodObject<{
1449
+ node: z.ZodString;
1450
+ code: z.ZodString;
1451
+ message: z.ZodString;
1452
+ evidenceIds: z.ZodArray<z.ZodString>;
1453
+ }, z.core.$strict>>>;
1454
+ coverage: z.ZodOptional<z.ZodArray<z.ZodObject<{
1455
+ node: z.ZodString;
1456
+ label: z.ZodString;
1457
+ status: z.ZodEnum<{
1458
+ observed: "observed";
1459
+ unavailable: "unavailable";
1460
+ absent: "absent";
1461
+ }>;
1462
+ fromBlock: z.ZodNullable<z.ZodString>;
1463
+ toBlock: z.ZodNullable<z.ZodString>;
1464
+ blocks: z.ZodNullable<z.ZodNumber>;
1465
+ requestedBlocks: z.ZodNullable<z.ZodNumber>;
1466
+ complete: z.ZodNullable<z.ZodBoolean>;
1467
+ reason: z.ZodNullable<z.ZodString>;
1468
+ approximateDuration: z.ZodNullable<z.ZodString>;
1469
+ }, z.core.$strict>>>;
1470
+ }, z.core.$strict>;
1471
+ export type WorkflowReport = z.infer<typeof WorkflowReportSchema>;
1472
+ /**
1473
+ * Server execution capabilities, decided by platform configuration (never by a package). Omitted capabilities are unavailable,
1474
+ * so every caller that does not pass them fails closed.
1475
+ */
1476
+ export interface WorkflowRuntimeCapabilities {
1477
+ modelAnalysis?: boolean;
1478
+ sandboxedTransforms?: boolean; /** N03: reviewed remote connectors (AGENTEX_CONNECTORS_ENABLED=true). */
1479
+ connectors?: boolean;
1480
+ }
1481
+ export declare const SANDBOX_UNAVAILABLE = "Custom code steps are not available on this server, so sandboxed transform steps stay switched off. Creator code only ever runs inside the isolated sandbox.";
1482
+ export declare const MODEL_MINIMUM_OUTPUT_TOKENS = 256;
1483
+ /** Effective permissions, derived only from typed fields and server capabilities. Listing text, names and descriptions are never consulted. */
1484
+ export declare function workflowPermissions(manifest: WorkflowManifest, capabilities?: WorkflowRuntimeCapabilities): {
1485
+ capabilities: ("evm.read" | "http.read" | "solana.read")[];
1486
+ chains: ("ethereum" | "base" | "robinhood" | "solana")[];
1487
+ tools: {
1488
+ ref: string;
1489
+ capability: "evm.read" | "http.read" | "solana.read";
1490
+ maximumCalls: number;
1491
+ executions: number;
1492
+ }[];
1493
+ addressScope: "input-bound" | "input-derived";
1494
+ addressInputs: string[];
1495
+ domains: string[];
1496
+ destinations: "run-report"[];
1497
+ secrets: {
1498
+ name: string;
1499
+ reference: string;
1500
+ }[];
1501
+ budget: {
1502
+ maximumRpcCalls: number;
1503
+ maximumSteps: number;
1504
+ maximumDurationMs: number;
1505
+ stepTimeoutMs: number;
1506
+ maximumBlockRange: number;
1507
+ maximumPages: number;
1508
+ maximumExecutionAtomic: string;
1509
+ maximumModelTokens: number;
1510
+ };
1511
+ aiAnalysis: {
1512
+ declared: number;
1513
+ enabled: boolean;
1514
+ tools: string[];
1515
+ reason: string | null;
1516
+ };
1517
+ sandboxedTransforms: {
1518
+ declared: number;
1519
+ enabled: boolean;
1520
+ network: "none";
1521
+ reason: string | null;
1522
+ };
1523
+ connectors: {
1524
+ alias: string;
1525
+ connectorId: string;
1526
+ schemaHash: string;
1527
+ maximumCalls: number;
1528
+ maximumCostMicrousd: number;
1529
+ executions: number;
1530
+ enabled: boolean;
1531
+ reason: string;
1532
+ }[];
1533
+ signing: boolean;
1534
+ broadcasting: boolean;
1535
+ };
1536
+ /** Worst-case RPC attempts: every tool execution at its declared ceiling, bounded by the workflow budget. Provider cost stays unpriced. */
1537
+ export declare function estimateWorkflowRpcCost(manifest: WorkflowManifest): {
1538
+ steps: {
1539
+ nodeId: string;
1540
+ tool: string;
1541
+ maximumCalls: number;
1542
+ }[];
1543
+ declaredMaximum: number;
1544
+ maximumRpcCalls: number;
1545
+ budgetBinding: boolean;
1546
+ providerCostAtomic: null;
1547
+ providerCostStatus: "unpriced";
1548
+ };
1549
+ /** Blocking reasons for creating an immutable test version or executing. Drafts may still contain disabled declarations. */
1550
+ export declare function workflowExecutionBlockers(manifest: WorkflowManifest, capabilities?: WorkflowRuntimeCapabilities): string[];
1551
+ /** Structured validation for editors: returns every issue with its JSON path, never throws. */
1552
+ export declare function validateWorkflowManifest(raw: unknown): {
1553
+ ok: true;
1554
+ manifest: WorkflowManifest;
1555
+ issues: [];
1556
+ } | {
1557
+ ok: false;
1558
+ issues: {
1559
+ path: string;
1560
+ message: string;
1561
+ }[];
1562
+ };
1563
+ /**
1564
+ * Buyer result contract for workflow runs: a non-failed report bound to its manifest in which every required section is complete,
1565
+ * every finding is observed (citing complete captured tool evidence) or taken from input, at least one finding is tool-observed,
1566
+ * and no policy/integrity failure or disabled model step occurred. Returns the unmet conditions; an empty list satisfies it.
1567
+ */
1568
+ export declare function workflowResultContractIssues(raw: unknown, manifest?: WorkflowManifest): string[];