@crediolabs/policy-builder-mcp 0.1.18 → 0.2.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.
@@ -1,1113 +0,0 @@
1
- import { ComposeUserResponsesSchema, GetInterpreterInfoInputSchema, InstallPolicyInputSchema, InterpreterOptionsSchema, MandateSpecSchema, NetworkSchema, OraclePriceFixtureSchema, OzAdapterConfigSchema, PredicateNodeSchema, RecordedTransactionSchema, RecordTransactionInputSchema, RevokePolicyInputSchema, SimulatePolicyInputSchema, SynthesizePolicyInputSchema, ToolErrorSchema, VerifyPolicyInputSchema } from '@crediolabs/policy-synth/run';
2
- import { z } from 'zod';
3
- export { ComposeUserResponsesSchema, GetInterpreterInfoInputSchema, InstallPolicyInputSchema, InterpreterOptionsSchema, MandateSpecSchema, NetworkSchema, OraclePriceFixtureSchema, OzAdapterConfigSchema, PredicateNodeSchema, RecordedTransactionSchema, RecordTransactionInputSchema, RevokePolicyInputSchema, SimulatePolicyInputSchema, SynthesizePolicyInputSchema, ToolErrorSchema, VerifyPolicyInputSchema, };
4
- /** Flat ZodRawShape used for the MCP SDK tool registration. The body
5
- * re-validates against `RecordTransactionInputSchema` so the mutual-exclusion
6
- * rule still fires (the SDK does not invoke `.refine()` at registration time). */
7
- export declare const RecordTransactionToolShape: {
8
- readonly hash: z.ZodOptional<z.ZodString>;
9
- readonly xdr: z.ZodOptional<z.ZodString>;
10
- readonly network: z.ZodEnum<["mainnet", "testnet"]>;
11
- readonly confidenceOverride: z.ZodOptional<z.ZodNumber>;
12
- };
13
- /** Flat ZodRawShape used for MCP tool registration. Every field is optional
14
- * so the JSON-Schema the SDK exposes to clients does not forbid either
15
- * front-end; the body re-validates against the discriminated union. */
16
- export declare const SynthesizePolicyToolShape: {
17
- readonly source: z.ZodOptional<z.ZodEnum<["mandate", "recording"]>>;
18
- readonly mandate: z.ZodOptional<z.ZodEffects<z.ZodObject<{
19
- chain: z.ZodLiteral<"stellar">;
20
- contract: z.ZodString;
21
- method: z.ZodOptional<z.ZodString>;
22
- spendingLimit: z.ZodOptional<z.ZodObject<{
23
- token: z.ZodString;
24
- limit: z.ZodString;
25
- windowSeconds: z.ZodNumber;
26
- }, "strip", z.ZodTypeAny, {
27
- token: string;
28
- limit: string;
29
- windowSeconds: number;
30
- }, {
31
- token: string;
32
- limit: string;
33
- windowSeconds: number;
34
- }>>;
35
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
36
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
37
- expiry: z.ZodOptional<z.ZodObject<{
38
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
39
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
40
- }, "strip", z.ZodTypeAny, {
41
- validUntilLedger?: number | undefined;
42
- validUntilUnixSeconds?: number | undefined;
43
- }, {
44
- validUntilLedger?: number | undefined;
45
- validUntilUnixSeconds?: number | undefined;
46
- }>>;
47
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
48
- chain: z.ZodLiteral<"stellar">;
49
- contract: z.ZodString;
50
- method: z.ZodOptional<z.ZodString>;
51
- spendingLimit: z.ZodOptional<z.ZodObject<{
52
- token: z.ZodString;
53
- limit: z.ZodString;
54
- windowSeconds: z.ZodNumber;
55
- }, "strip", z.ZodTypeAny, {
56
- token: string;
57
- limit: string;
58
- windowSeconds: number;
59
- }, {
60
- token: string;
61
- limit: string;
62
- windowSeconds: number;
63
- }>>;
64
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
65
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
66
- expiry: z.ZodOptional<z.ZodObject<{
67
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
68
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
69
- }, "strip", z.ZodTypeAny, {
70
- validUntilLedger?: number | undefined;
71
- validUntilUnixSeconds?: number | undefined;
72
- }, {
73
- validUntilLedger?: number | undefined;
74
- validUntilUnixSeconds?: number | undefined;
75
- }>>;
76
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
77
- chain: z.ZodLiteral<"stellar">;
78
- contract: z.ZodString;
79
- method: z.ZodOptional<z.ZodString>;
80
- spendingLimit: z.ZodOptional<z.ZodObject<{
81
- token: z.ZodString;
82
- limit: z.ZodString;
83
- windowSeconds: z.ZodNumber;
84
- }, "strip", z.ZodTypeAny, {
85
- token: string;
86
- limit: string;
87
- windowSeconds: number;
88
- }, {
89
- token: string;
90
- limit: string;
91
- windowSeconds: number;
92
- }>>;
93
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
94
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
95
- expiry: z.ZodOptional<z.ZodObject<{
96
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
97
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
98
- }, "strip", z.ZodTypeAny, {
99
- validUntilLedger?: number | undefined;
100
- validUntilUnixSeconds?: number | undefined;
101
- }, {
102
- validUntilLedger?: number | undefined;
103
- validUntilUnixSeconds?: number | undefined;
104
- }>>;
105
- }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
106
- chain: z.ZodLiteral<"stellar">;
107
- contract: z.ZodString;
108
- method: z.ZodOptional<z.ZodString>;
109
- spendingLimit: z.ZodOptional<z.ZodObject<{
110
- token: z.ZodString;
111
- limit: z.ZodString;
112
- windowSeconds: z.ZodNumber;
113
- }, "strip", z.ZodTypeAny, {
114
- token: string;
115
- limit: string;
116
- windowSeconds: number;
117
- }, {
118
- token: string;
119
- limit: string;
120
- windowSeconds: number;
121
- }>>;
122
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
123
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
124
- expiry: z.ZodOptional<z.ZodObject<{
125
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
126
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
127
- }, "strip", z.ZodTypeAny, {
128
- validUntilLedger?: number | undefined;
129
- validUntilUnixSeconds?: number | undefined;
130
- }, {
131
- validUntilLedger?: number | undefined;
132
- validUntilUnixSeconds?: number | undefined;
133
- }>>;
134
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
135
- chain: z.ZodLiteral<"stellar">;
136
- contract: z.ZodString;
137
- method: z.ZodOptional<z.ZodString>;
138
- spendingLimit: z.ZodOptional<z.ZodObject<{
139
- token: z.ZodString;
140
- limit: z.ZodString;
141
- windowSeconds: z.ZodNumber;
142
- }, "strip", z.ZodTypeAny, {
143
- token: string;
144
- limit: string;
145
- windowSeconds: number;
146
- }, {
147
- token: string;
148
- limit: string;
149
- windowSeconds: number;
150
- }>>;
151
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
152
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
153
- expiry: z.ZodOptional<z.ZodObject<{
154
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
155
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
156
- }, "strip", z.ZodTypeAny, {
157
- validUntilLedger?: number | undefined;
158
- validUntilUnixSeconds?: number | undefined;
159
- }, {
160
- validUntilLedger?: number | undefined;
161
- validUntilUnixSeconds?: number | undefined;
162
- }>>;
163
- }, z.ZodTypeAny, "passthrough">>>;
164
- readonly recordedTx: z.ZodOptional<z.ZodObject<{
165
- network: z.ZodEnum<["mainnet", "testnet"]>;
166
- signers: z.ZodArray<z.ZodString, "many">;
167
- invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
168
- tokenMovements: z.ZodArray<z.ZodObject<{
169
- token: z.ZodString;
170
- from: z.ZodString;
171
- to: z.ZodString;
172
- amount: z.ZodString;
173
- }, "strip", z.ZodTypeAny, {
174
- amount: string;
175
- token: string;
176
- from: string;
177
- to: string;
178
- }, {
179
- amount: string;
180
- token: string;
181
- from: string;
182
- to: string;
183
- }>, "many">;
184
- events: z.ZodArray<z.ZodObject<{
185
- contract: z.ZodString;
186
- topics: z.ZodArray<z.ZodString, "many">;
187
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
188
- }, "strip", z.ZodTypeAny, {
189
- contract: string;
190
- topics: string[];
191
- data?: unknown;
192
- }, {
193
- contract: string;
194
- topics: string[];
195
- data?: unknown;
196
- }>, "many">;
197
- authEntries: z.ZodArray<z.ZodUnknown, "many">;
198
- ledgerSequence: z.ZodNumber;
199
- fetchedAt: z.ZodNumber;
200
- parseConfidence: z.ZodObject<{
201
- overall: z.ZodNumber;
202
- knownContracts: z.ZodArray<z.ZodString, "many">;
203
- unknownContracts: z.ZodArray<z.ZodObject<{
204
- contract: z.ZodString;
205
- reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
206
- }, "strip", z.ZodTypeAny, {
207
- contract: string;
208
- reason: "no-abi" | "version-mismatch" | "opaque-result";
209
- }, {
210
- contract: string;
211
- reason: "no-abi" | "version-mismatch" | "opaque-result";
212
- }>, "many">;
213
- opaqueScVals: z.ZodArray<z.ZodObject<{
214
- path: z.ZodString;
215
- type: z.ZodString;
216
- }, "strip", z.ZodTypeAny, {
217
- type: string;
218
- path: string;
219
- }, {
220
- type: string;
221
- path: string;
222
- }>, "many">;
223
- thresholdUsed: z.ZodNumber;
224
- }, "strip", z.ZodTypeAny, {
225
- opaqueScVals: {
226
- type: string;
227
- path: string;
228
- }[];
229
- unknownContracts: {
230
- contract: string;
231
- reason: "no-abi" | "version-mismatch" | "opaque-result";
232
- }[];
233
- overall: number;
234
- knownContracts: string[];
235
- thresholdUsed: number;
236
- }, {
237
- opaqueScVals: {
238
- type: string;
239
- path: string;
240
- }[];
241
- unknownContracts: {
242
- contract: string;
243
- reason: "no-abi" | "version-mismatch" | "opaque-result";
244
- }[];
245
- overall: number;
246
- knownContracts: string[];
247
- thresholdUsed: number;
248
- }>;
249
- sourceAccount: z.ZodString;
250
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
251
- network: z.ZodEnum<["mainnet", "testnet"]>;
252
- signers: z.ZodArray<z.ZodString, "many">;
253
- invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
254
- tokenMovements: z.ZodArray<z.ZodObject<{
255
- token: z.ZodString;
256
- from: z.ZodString;
257
- to: z.ZodString;
258
- amount: z.ZodString;
259
- }, "strip", z.ZodTypeAny, {
260
- amount: string;
261
- token: string;
262
- from: string;
263
- to: string;
264
- }, {
265
- amount: string;
266
- token: string;
267
- from: string;
268
- to: string;
269
- }>, "many">;
270
- events: z.ZodArray<z.ZodObject<{
271
- contract: z.ZodString;
272
- topics: z.ZodArray<z.ZodString, "many">;
273
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
274
- }, "strip", z.ZodTypeAny, {
275
- contract: string;
276
- topics: string[];
277
- data?: unknown;
278
- }, {
279
- contract: string;
280
- topics: string[];
281
- data?: unknown;
282
- }>, "many">;
283
- authEntries: z.ZodArray<z.ZodUnknown, "many">;
284
- ledgerSequence: z.ZodNumber;
285
- fetchedAt: z.ZodNumber;
286
- parseConfidence: z.ZodObject<{
287
- overall: z.ZodNumber;
288
- knownContracts: z.ZodArray<z.ZodString, "many">;
289
- unknownContracts: z.ZodArray<z.ZodObject<{
290
- contract: z.ZodString;
291
- reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
292
- }, "strip", z.ZodTypeAny, {
293
- contract: string;
294
- reason: "no-abi" | "version-mismatch" | "opaque-result";
295
- }, {
296
- contract: string;
297
- reason: "no-abi" | "version-mismatch" | "opaque-result";
298
- }>, "many">;
299
- opaqueScVals: z.ZodArray<z.ZodObject<{
300
- path: z.ZodString;
301
- type: z.ZodString;
302
- }, "strip", z.ZodTypeAny, {
303
- type: string;
304
- path: string;
305
- }, {
306
- type: string;
307
- path: string;
308
- }>, "many">;
309
- thresholdUsed: z.ZodNumber;
310
- }, "strip", z.ZodTypeAny, {
311
- opaqueScVals: {
312
- type: string;
313
- path: string;
314
- }[];
315
- unknownContracts: {
316
- contract: string;
317
- reason: "no-abi" | "version-mismatch" | "opaque-result";
318
- }[];
319
- overall: number;
320
- knownContracts: string[];
321
- thresholdUsed: number;
322
- }, {
323
- opaqueScVals: {
324
- type: string;
325
- path: string;
326
- }[];
327
- unknownContracts: {
328
- contract: string;
329
- reason: "no-abi" | "version-mismatch" | "opaque-result";
330
- }[];
331
- overall: number;
332
- knownContracts: string[];
333
- thresholdUsed: number;
334
- }>;
335
- sourceAccount: z.ZodString;
336
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
337
- network: z.ZodEnum<["mainnet", "testnet"]>;
338
- signers: z.ZodArray<z.ZodString, "many">;
339
- invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
340
- tokenMovements: z.ZodArray<z.ZodObject<{
341
- token: z.ZodString;
342
- from: z.ZodString;
343
- to: z.ZodString;
344
- amount: z.ZodString;
345
- }, "strip", z.ZodTypeAny, {
346
- amount: string;
347
- token: string;
348
- from: string;
349
- to: string;
350
- }, {
351
- amount: string;
352
- token: string;
353
- from: string;
354
- to: string;
355
- }>, "many">;
356
- events: z.ZodArray<z.ZodObject<{
357
- contract: z.ZodString;
358
- topics: z.ZodArray<z.ZodString, "many">;
359
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
360
- }, "strip", z.ZodTypeAny, {
361
- contract: string;
362
- topics: string[];
363
- data?: unknown;
364
- }, {
365
- contract: string;
366
- topics: string[];
367
- data?: unknown;
368
- }>, "many">;
369
- authEntries: z.ZodArray<z.ZodUnknown, "many">;
370
- ledgerSequence: z.ZodNumber;
371
- fetchedAt: z.ZodNumber;
372
- parseConfidence: z.ZodObject<{
373
- overall: z.ZodNumber;
374
- knownContracts: z.ZodArray<z.ZodString, "many">;
375
- unknownContracts: z.ZodArray<z.ZodObject<{
376
- contract: z.ZodString;
377
- reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
378
- }, "strip", z.ZodTypeAny, {
379
- contract: string;
380
- reason: "no-abi" | "version-mismatch" | "opaque-result";
381
- }, {
382
- contract: string;
383
- reason: "no-abi" | "version-mismatch" | "opaque-result";
384
- }>, "many">;
385
- opaqueScVals: z.ZodArray<z.ZodObject<{
386
- path: z.ZodString;
387
- type: z.ZodString;
388
- }, "strip", z.ZodTypeAny, {
389
- type: string;
390
- path: string;
391
- }, {
392
- type: string;
393
- path: string;
394
- }>, "many">;
395
- thresholdUsed: z.ZodNumber;
396
- }, "strip", z.ZodTypeAny, {
397
- opaqueScVals: {
398
- type: string;
399
- path: string;
400
- }[];
401
- unknownContracts: {
402
- contract: string;
403
- reason: "no-abi" | "version-mismatch" | "opaque-result";
404
- }[];
405
- overall: number;
406
- knownContracts: string[];
407
- thresholdUsed: number;
408
- }, {
409
- opaqueScVals: {
410
- type: string;
411
- path: string;
412
- }[];
413
- unknownContracts: {
414
- contract: string;
415
- reason: "no-abi" | "version-mismatch" | "opaque-result";
416
- }[];
417
- overall: number;
418
- knownContracts: string[];
419
- thresholdUsed: number;
420
- }>;
421
- sourceAccount: z.ZodString;
422
- }, z.ZodTypeAny, "passthrough">>>;
423
- readonly network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
424
- readonly userResponses: z.ZodOptional<z.ZodObject<{
425
- windowSeconds: z.ZodOptional<z.ZodNumber>;
426
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
427
- limitAmount: z.ZodOptional<z.ZodString>;
428
- invocationLimit: z.ZodOptional<z.ZodNumber>;
429
- swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
430
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
431
- windowSeconds: z.ZodOptional<z.ZodNumber>;
432
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
433
- limitAmount: z.ZodOptional<z.ZodString>;
434
- invocationLimit: z.ZodOptional<z.ZodNumber>;
435
- swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
436
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
437
- windowSeconds: z.ZodOptional<z.ZodNumber>;
438
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
439
- limitAmount: z.ZodOptional<z.ZodString>;
440
- invocationLimit: z.ZodOptional<z.ZodNumber>;
441
- swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
442
- }, z.ZodTypeAny, "passthrough">>>;
443
- readonly confidenceOverride: z.ZodOptional<z.ZodObject<{
444
- threshold: z.ZodNumber;
445
- }, "strip", z.ZodTypeAny, {
446
- threshold: number;
447
- }, {
448
- threshold: number;
449
- }>>;
450
- readonly interpreter: z.ZodOptional<z.ZodObject<{
451
- smartAccountAddress: z.ZodString;
452
- installNonce: z.ZodOptional<z.ZodNumber>;
453
- oracleParams: z.ZodOptional<z.ZodObject<{
454
- maxStalenessSeconds: z.ZodOptional<z.ZodNumber>;
455
- maxDeviationBps: z.ZodOptional<z.ZodNumber>;
456
- }, "strip", z.ZodTypeAny, {
457
- maxStalenessSeconds?: number | undefined;
458
- maxDeviationBps?: number | undefined;
459
- }, {
460
- maxStalenessSeconds?: number | undefined;
461
- maxDeviationBps?: number | undefined;
462
- }>>;
463
- }, "strip", z.ZodTypeAny, {
464
- smartAccountAddress: string;
465
- oracleParams?: {
466
- maxStalenessSeconds?: number | undefined;
467
- maxDeviationBps?: number | undefined;
468
- } | undefined;
469
- installNonce?: number | undefined;
470
- }, {
471
- smartAccountAddress: string;
472
- oracleParams?: {
473
- maxStalenessSeconds?: number | undefined;
474
- maxDeviationBps?: number | undefined;
475
- } | undefined;
476
- installNonce?: number | undefined;
477
- }>>;
478
- readonly ozConfig: z.ZodOptional<z.ZodObject<{
479
- network: z.ZodEnum<["mainnet", "testnet"]>;
480
- instances: z.ZodObject<{
481
- spending_limit: z.ZodString;
482
- simple_threshold: z.ZodString;
483
- weighted_threshold: z.ZodString;
484
- }, "strip", z.ZodTypeAny, {
485
- spending_limit: string;
486
- simple_threshold: string;
487
- weighted_threshold: string;
488
- }, {
489
- spending_limit: string;
490
- simple_threshold: string;
491
- weighted_threshold: string;
492
- }>;
493
- }, "strip", z.ZodTypeAny, {
494
- network: "mainnet" | "testnet";
495
- instances: {
496
- spending_limit: string;
497
- simple_threshold: string;
498
- weighted_threshold: string;
499
- };
500
- }, {
501
- network: "mainnet" | "testnet";
502
- instances: {
503
- spending_limit: string;
504
- simple_threshold: string;
505
- weighted_threshold: string;
506
- };
507
- }>>;
508
- readonly explain: z.ZodOptional<z.ZodBoolean>;
509
- };
510
- /** Flat ZodRawShape for `simulate_policy`. The `predicate` is typed as
511
- * `z.unknown()` at the tool boundary because the recursive
512
- * `PredicateNodeSchema` is a `z.lazy()` union (the SDK does not accept
513
- * unions at the tool-registration boundary); the body re-validates
514
- * against `SimulatePolicyInputSchema`, which fails closed on a
515
- * malformed predicate. `predicate` is nullable here (vs required for
516
- * verify_policy) so the SDK-emitted JSON Schema mirrors the engine's
517
- * "OZ-only / no interpreter predicate" contract. */
518
- export declare const SimulatePolicyToolShape: {
519
- readonly predicate: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
520
- readonly permitTx: z.ZodObject<{
521
- network: z.ZodEnum<["mainnet", "testnet"]>;
522
- signers: z.ZodArray<z.ZodString, "many">;
523
- invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
524
- tokenMovements: z.ZodArray<z.ZodObject<{
525
- token: z.ZodString;
526
- from: z.ZodString;
527
- to: z.ZodString;
528
- amount: z.ZodString;
529
- }, "strip", z.ZodTypeAny, {
530
- amount: string;
531
- token: string;
532
- from: string;
533
- to: string;
534
- }, {
535
- amount: string;
536
- token: string;
537
- from: string;
538
- to: string;
539
- }>, "many">;
540
- events: z.ZodArray<z.ZodObject<{
541
- contract: z.ZodString;
542
- topics: z.ZodArray<z.ZodString, "many">;
543
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
544
- }, "strip", z.ZodTypeAny, {
545
- contract: string;
546
- topics: string[];
547
- data?: unknown;
548
- }, {
549
- contract: string;
550
- topics: string[];
551
- data?: unknown;
552
- }>, "many">;
553
- authEntries: z.ZodArray<z.ZodUnknown, "many">;
554
- ledgerSequence: z.ZodNumber;
555
- fetchedAt: z.ZodNumber;
556
- parseConfidence: z.ZodObject<{
557
- overall: z.ZodNumber;
558
- knownContracts: z.ZodArray<z.ZodString, "many">;
559
- unknownContracts: z.ZodArray<z.ZodObject<{
560
- contract: z.ZodString;
561
- reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
562
- }, "strip", z.ZodTypeAny, {
563
- contract: string;
564
- reason: "no-abi" | "version-mismatch" | "opaque-result";
565
- }, {
566
- contract: string;
567
- reason: "no-abi" | "version-mismatch" | "opaque-result";
568
- }>, "many">;
569
- opaqueScVals: z.ZodArray<z.ZodObject<{
570
- path: z.ZodString;
571
- type: z.ZodString;
572
- }, "strip", z.ZodTypeAny, {
573
- type: string;
574
- path: string;
575
- }, {
576
- type: string;
577
- path: string;
578
- }>, "many">;
579
- thresholdUsed: z.ZodNumber;
580
- }, "strip", z.ZodTypeAny, {
581
- opaqueScVals: {
582
- type: string;
583
- path: string;
584
- }[];
585
- unknownContracts: {
586
- contract: string;
587
- reason: "no-abi" | "version-mismatch" | "opaque-result";
588
- }[];
589
- overall: number;
590
- knownContracts: string[];
591
- thresholdUsed: number;
592
- }, {
593
- opaqueScVals: {
594
- type: string;
595
- path: string;
596
- }[];
597
- unknownContracts: {
598
- contract: string;
599
- reason: "no-abi" | "version-mismatch" | "opaque-result";
600
- }[];
601
- overall: number;
602
- knownContracts: string[];
603
- thresholdUsed: number;
604
- }>;
605
- sourceAccount: z.ZodString;
606
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
607
- network: z.ZodEnum<["mainnet", "testnet"]>;
608
- signers: z.ZodArray<z.ZodString, "many">;
609
- invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
610
- tokenMovements: z.ZodArray<z.ZodObject<{
611
- token: z.ZodString;
612
- from: z.ZodString;
613
- to: z.ZodString;
614
- amount: z.ZodString;
615
- }, "strip", z.ZodTypeAny, {
616
- amount: string;
617
- token: string;
618
- from: string;
619
- to: string;
620
- }, {
621
- amount: string;
622
- token: string;
623
- from: string;
624
- to: string;
625
- }>, "many">;
626
- events: z.ZodArray<z.ZodObject<{
627
- contract: z.ZodString;
628
- topics: z.ZodArray<z.ZodString, "many">;
629
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
630
- }, "strip", z.ZodTypeAny, {
631
- contract: string;
632
- topics: string[];
633
- data?: unknown;
634
- }, {
635
- contract: string;
636
- topics: string[];
637
- data?: unknown;
638
- }>, "many">;
639
- authEntries: z.ZodArray<z.ZodUnknown, "many">;
640
- ledgerSequence: z.ZodNumber;
641
- fetchedAt: z.ZodNumber;
642
- parseConfidence: z.ZodObject<{
643
- overall: z.ZodNumber;
644
- knownContracts: z.ZodArray<z.ZodString, "many">;
645
- unknownContracts: z.ZodArray<z.ZodObject<{
646
- contract: z.ZodString;
647
- reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
648
- }, "strip", z.ZodTypeAny, {
649
- contract: string;
650
- reason: "no-abi" | "version-mismatch" | "opaque-result";
651
- }, {
652
- contract: string;
653
- reason: "no-abi" | "version-mismatch" | "opaque-result";
654
- }>, "many">;
655
- opaqueScVals: z.ZodArray<z.ZodObject<{
656
- path: z.ZodString;
657
- type: z.ZodString;
658
- }, "strip", z.ZodTypeAny, {
659
- type: string;
660
- path: string;
661
- }, {
662
- type: string;
663
- path: string;
664
- }>, "many">;
665
- thresholdUsed: z.ZodNumber;
666
- }, "strip", z.ZodTypeAny, {
667
- opaqueScVals: {
668
- type: string;
669
- path: string;
670
- }[];
671
- unknownContracts: {
672
- contract: string;
673
- reason: "no-abi" | "version-mismatch" | "opaque-result";
674
- }[];
675
- overall: number;
676
- knownContracts: string[];
677
- thresholdUsed: number;
678
- }, {
679
- opaqueScVals: {
680
- type: string;
681
- path: string;
682
- }[];
683
- unknownContracts: {
684
- contract: string;
685
- reason: "no-abi" | "version-mismatch" | "opaque-result";
686
- }[];
687
- overall: number;
688
- knownContracts: string[];
689
- thresholdUsed: number;
690
- }>;
691
- sourceAccount: z.ZodString;
692
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
693
- network: z.ZodEnum<["mainnet", "testnet"]>;
694
- signers: z.ZodArray<z.ZodString, "many">;
695
- invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
696
- tokenMovements: z.ZodArray<z.ZodObject<{
697
- token: z.ZodString;
698
- from: z.ZodString;
699
- to: z.ZodString;
700
- amount: z.ZodString;
701
- }, "strip", z.ZodTypeAny, {
702
- amount: string;
703
- token: string;
704
- from: string;
705
- to: string;
706
- }, {
707
- amount: string;
708
- token: string;
709
- from: string;
710
- to: string;
711
- }>, "many">;
712
- events: z.ZodArray<z.ZodObject<{
713
- contract: z.ZodString;
714
- topics: z.ZodArray<z.ZodString, "many">;
715
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
716
- }, "strip", z.ZodTypeAny, {
717
- contract: string;
718
- topics: string[];
719
- data?: unknown;
720
- }, {
721
- contract: string;
722
- topics: string[];
723
- data?: unknown;
724
- }>, "many">;
725
- authEntries: z.ZodArray<z.ZodUnknown, "many">;
726
- ledgerSequence: z.ZodNumber;
727
- fetchedAt: z.ZodNumber;
728
- parseConfidence: z.ZodObject<{
729
- overall: z.ZodNumber;
730
- knownContracts: z.ZodArray<z.ZodString, "many">;
731
- unknownContracts: z.ZodArray<z.ZodObject<{
732
- contract: z.ZodString;
733
- reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
734
- }, "strip", z.ZodTypeAny, {
735
- contract: string;
736
- reason: "no-abi" | "version-mismatch" | "opaque-result";
737
- }, {
738
- contract: string;
739
- reason: "no-abi" | "version-mismatch" | "opaque-result";
740
- }>, "many">;
741
- opaqueScVals: z.ZodArray<z.ZodObject<{
742
- path: z.ZodString;
743
- type: z.ZodString;
744
- }, "strip", z.ZodTypeAny, {
745
- type: string;
746
- path: string;
747
- }, {
748
- type: string;
749
- path: string;
750
- }>, "many">;
751
- thresholdUsed: z.ZodNumber;
752
- }, "strip", z.ZodTypeAny, {
753
- opaqueScVals: {
754
- type: string;
755
- path: string;
756
- }[];
757
- unknownContracts: {
758
- contract: string;
759
- reason: "no-abi" | "version-mismatch" | "opaque-result";
760
- }[];
761
- overall: number;
762
- knownContracts: string[];
763
- thresholdUsed: number;
764
- }, {
765
- opaqueScVals: {
766
- type: string;
767
- path: string;
768
- }[];
769
- unknownContracts: {
770
- contract: string;
771
- reason: "no-abi" | "version-mismatch" | "opaque-result";
772
- }[];
773
- overall: number;
774
- knownContracts: string[];
775
- thresholdUsed: number;
776
- }>;
777
- sourceAccount: z.ZodString;
778
- }, z.ZodTypeAny, "passthrough">>;
779
- readonly validUntilLedger: z.ZodOptional<z.ZodNumber>;
780
- readonly oraclePricesByAsset: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
781
- price: z.ZodString;
782
- timestampSeconds: z.ZodNumber;
783
- }, "strip", z.ZodTypeAny, {
784
- price: string;
785
- timestampSeconds: number;
786
- }, {
787
- price: string;
788
- timestampSeconds: number;
789
- }>, z.ZodObject<{
790
- error: z.ZodEnum<["stale", "missing", "deviation", "paused", "decimals", "fingerprint"]>;
791
- }, "strip", z.ZodTypeAny, {
792
- error: "stale" | "missing" | "deviation" | "paused" | "decimals" | "fingerprint";
793
- }, {
794
- error: "stale" | "missing" | "deviation" | "paused" | "decimals" | "fingerprint";
795
- }>]>>>;
796
- };
797
- /** Flat ZodRawShape for `verify_policy`. Same `z.unknown()` boundary
798
- * trick for `predicate` as `SimulatePolicyToolShape`; `predicate` is
799
- * required at the strict-schema level (`VerifyPolicyInputSchema`) so
800
- * the body fails closed on a missing predicate. */
801
- export declare const VerifyPolicyToolShape: {
802
- readonly predicate: z.ZodUnknown;
803
- readonly permitTx: z.ZodObject<{
804
- network: z.ZodEnum<["mainnet", "testnet"]>;
805
- signers: z.ZodArray<z.ZodString, "many">;
806
- invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
807
- tokenMovements: z.ZodArray<z.ZodObject<{
808
- token: z.ZodString;
809
- from: z.ZodString;
810
- to: z.ZodString;
811
- amount: z.ZodString;
812
- }, "strip", z.ZodTypeAny, {
813
- amount: string;
814
- token: string;
815
- from: string;
816
- to: string;
817
- }, {
818
- amount: string;
819
- token: string;
820
- from: string;
821
- to: string;
822
- }>, "many">;
823
- events: z.ZodArray<z.ZodObject<{
824
- contract: z.ZodString;
825
- topics: z.ZodArray<z.ZodString, "many">;
826
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
827
- }, "strip", z.ZodTypeAny, {
828
- contract: string;
829
- topics: string[];
830
- data?: unknown;
831
- }, {
832
- contract: string;
833
- topics: string[];
834
- data?: unknown;
835
- }>, "many">;
836
- authEntries: z.ZodArray<z.ZodUnknown, "many">;
837
- ledgerSequence: z.ZodNumber;
838
- fetchedAt: z.ZodNumber;
839
- parseConfidence: z.ZodObject<{
840
- overall: z.ZodNumber;
841
- knownContracts: z.ZodArray<z.ZodString, "many">;
842
- unknownContracts: z.ZodArray<z.ZodObject<{
843
- contract: z.ZodString;
844
- reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
845
- }, "strip", z.ZodTypeAny, {
846
- contract: string;
847
- reason: "no-abi" | "version-mismatch" | "opaque-result";
848
- }, {
849
- contract: string;
850
- reason: "no-abi" | "version-mismatch" | "opaque-result";
851
- }>, "many">;
852
- opaqueScVals: z.ZodArray<z.ZodObject<{
853
- path: z.ZodString;
854
- type: z.ZodString;
855
- }, "strip", z.ZodTypeAny, {
856
- type: string;
857
- path: string;
858
- }, {
859
- type: string;
860
- path: string;
861
- }>, "many">;
862
- thresholdUsed: z.ZodNumber;
863
- }, "strip", z.ZodTypeAny, {
864
- opaqueScVals: {
865
- type: string;
866
- path: string;
867
- }[];
868
- unknownContracts: {
869
- contract: string;
870
- reason: "no-abi" | "version-mismatch" | "opaque-result";
871
- }[];
872
- overall: number;
873
- knownContracts: string[];
874
- thresholdUsed: number;
875
- }, {
876
- opaqueScVals: {
877
- type: string;
878
- path: string;
879
- }[];
880
- unknownContracts: {
881
- contract: string;
882
- reason: "no-abi" | "version-mismatch" | "opaque-result";
883
- }[];
884
- overall: number;
885
- knownContracts: string[];
886
- thresholdUsed: number;
887
- }>;
888
- sourceAccount: z.ZodString;
889
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
890
- network: z.ZodEnum<["mainnet", "testnet"]>;
891
- signers: z.ZodArray<z.ZodString, "many">;
892
- invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
893
- tokenMovements: z.ZodArray<z.ZodObject<{
894
- token: z.ZodString;
895
- from: z.ZodString;
896
- to: z.ZodString;
897
- amount: z.ZodString;
898
- }, "strip", z.ZodTypeAny, {
899
- amount: string;
900
- token: string;
901
- from: string;
902
- to: string;
903
- }, {
904
- amount: string;
905
- token: string;
906
- from: string;
907
- to: string;
908
- }>, "many">;
909
- events: z.ZodArray<z.ZodObject<{
910
- contract: z.ZodString;
911
- topics: z.ZodArray<z.ZodString, "many">;
912
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
913
- }, "strip", z.ZodTypeAny, {
914
- contract: string;
915
- topics: string[];
916
- data?: unknown;
917
- }, {
918
- contract: string;
919
- topics: string[];
920
- data?: unknown;
921
- }>, "many">;
922
- authEntries: z.ZodArray<z.ZodUnknown, "many">;
923
- ledgerSequence: z.ZodNumber;
924
- fetchedAt: z.ZodNumber;
925
- parseConfidence: z.ZodObject<{
926
- overall: z.ZodNumber;
927
- knownContracts: z.ZodArray<z.ZodString, "many">;
928
- unknownContracts: z.ZodArray<z.ZodObject<{
929
- contract: z.ZodString;
930
- reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
931
- }, "strip", z.ZodTypeAny, {
932
- contract: string;
933
- reason: "no-abi" | "version-mismatch" | "opaque-result";
934
- }, {
935
- contract: string;
936
- reason: "no-abi" | "version-mismatch" | "opaque-result";
937
- }>, "many">;
938
- opaqueScVals: z.ZodArray<z.ZodObject<{
939
- path: z.ZodString;
940
- type: z.ZodString;
941
- }, "strip", z.ZodTypeAny, {
942
- type: string;
943
- path: string;
944
- }, {
945
- type: string;
946
- path: string;
947
- }>, "many">;
948
- thresholdUsed: z.ZodNumber;
949
- }, "strip", z.ZodTypeAny, {
950
- opaqueScVals: {
951
- type: string;
952
- path: string;
953
- }[];
954
- unknownContracts: {
955
- contract: string;
956
- reason: "no-abi" | "version-mismatch" | "opaque-result";
957
- }[];
958
- overall: number;
959
- knownContracts: string[];
960
- thresholdUsed: number;
961
- }, {
962
- opaqueScVals: {
963
- type: string;
964
- path: string;
965
- }[];
966
- unknownContracts: {
967
- contract: string;
968
- reason: "no-abi" | "version-mismatch" | "opaque-result";
969
- }[];
970
- overall: number;
971
- knownContracts: string[];
972
- thresholdUsed: number;
973
- }>;
974
- sourceAccount: z.ZodString;
975
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
976
- network: z.ZodEnum<["mainnet", "testnet"]>;
977
- signers: z.ZodArray<z.ZodString, "many">;
978
- invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
979
- tokenMovements: z.ZodArray<z.ZodObject<{
980
- token: z.ZodString;
981
- from: z.ZodString;
982
- to: z.ZodString;
983
- amount: z.ZodString;
984
- }, "strip", z.ZodTypeAny, {
985
- amount: string;
986
- token: string;
987
- from: string;
988
- to: string;
989
- }, {
990
- amount: string;
991
- token: string;
992
- from: string;
993
- to: string;
994
- }>, "many">;
995
- events: z.ZodArray<z.ZodObject<{
996
- contract: z.ZodString;
997
- topics: z.ZodArray<z.ZodString, "many">;
998
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
999
- }, "strip", z.ZodTypeAny, {
1000
- contract: string;
1001
- topics: string[];
1002
- data?: unknown;
1003
- }, {
1004
- contract: string;
1005
- topics: string[];
1006
- data?: unknown;
1007
- }>, "many">;
1008
- authEntries: z.ZodArray<z.ZodUnknown, "many">;
1009
- ledgerSequence: z.ZodNumber;
1010
- fetchedAt: z.ZodNumber;
1011
- parseConfidence: z.ZodObject<{
1012
- overall: z.ZodNumber;
1013
- knownContracts: z.ZodArray<z.ZodString, "many">;
1014
- unknownContracts: z.ZodArray<z.ZodObject<{
1015
- contract: z.ZodString;
1016
- reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
1017
- }, "strip", z.ZodTypeAny, {
1018
- contract: string;
1019
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1020
- }, {
1021
- contract: string;
1022
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1023
- }>, "many">;
1024
- opaqueScVals: z.ZodArray<z.ZodObject<{
1025
- path: z.ZodString;
1026
- type: z.ZodString;
1027
- }, "strip", z.ZodTypeAny, {
1028
- type: string;
1029
- path: string;
1030
- }, {
1031
- type: string;
1032
- path: string;
1033
- }>, "many">;
1034
- thresholdUsed: z.ZodNumber;
1035
- }, "strip", z.ZodTypeAny, {
1036
- opaqueScVals: {
1037
- type: string;
1038
- path: string;
1039
- }[];
1040
- unknownContracts: {
1041
- contract: string;
1042
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1043
- }[];
1044
- overall: number;
1045
- knownContracts: string[];
1046
- thresholdUsed: number;
1047
- }, {
1048
- opaqueScVals: {
1049
- type: string;
1050
- path: string;
1051
- }[];
1052
- unknownContracts: {
1053
- contract: string;
1054
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1055
- }[];
1056
- overall: number;
1057
- knownContracts: string[];
1058
- thresholdUsed: number;
1059
- }>;
1060
- sourceAccount: z.ZodString;
1061
- }, z.ZodTypeAny, "passthrough">>;
1062
- readonly validUntilLedger: z.ZodOptional<z.ZodNumber>;
1063
- readonly oraclePricesByAsset: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
1064
- price: z.ZodString;
1065
- timestampSeconds: z.ZodNumber;
1066
- }, "strip", z.ZodTypeAny, {
1067
- price: string;
1068
- timestampSeconds: number;
1069
- }, {
1070
- price: string;
1071
- timestampSeconds: number;
1072
- }>, z.ZodObject<{
1073
- error: z.ZodEnum<["stale", "missing", "deviation", "paused", "decimals", "fingerprint"]>;
1074
- }, "strip", z.ZodTypeAny, {
1075
- error: "stale" | "missing" | "deviation" | "paused" | "decimals" | "fingerprint";
1076
- }, {
1077
- error: "stale" | "missing" | "deviation" | "paused" | "decimals" | "fingerprint";
1078
- }>]>>>;
1079
- };
1080
- export type { GetInterpreterInfoInput, InstallPolicyInput, RevokePolicyInput, SimulatePolicyInput, VerifyPolicyInput, } from '@crediolabs/policy-synth/run';
1081
- /** Flat ZodRawShape for `install_policy`. `rule` is typed as `z.unknown()`
1082
- * at the tool boundary because the rule schema is a discriminated union
1083
- * the SDK does not accept at registration; the body re-validates
1084
- * against `InstallPolicyInputSchema`. `encodedPredicate` /
1085
- * `predicateHash` live INSIDE `rule.policies[].predicateBlobBase64`
1086
- * (the policy already carries the encoded predicate); the run-layer
1087
- * extracts them from there. */
1088
- export declare const InstallPolicyToolShape: {
1089
- readonly rule: z.ZodOptional<z.ZodUnknown>;
1090
- readonly installNonce: z.ZodOptional<z.ZodNumber>;
1091
- readonly interpreterAddress: z.ZodOptional<z.ZodString>;
1092
- readonly smartAccount: z.ZodOptional<z.ZodString>;
1093
- readonly sourceAccount: z.ZodOptional<z.ZodString>;
1094
- readonly rpcUrl: z.ZodOptional<z.ZodString>;
1095
- readonly baseFee: z.ZodOptional<z.ZodNumber>;
1096
- };
1097
- /** Flat ZodRawShape for `revoke_policy`. */
1098
- export declare const RevokePolicyToolShape: {
1099
- readonly ruleId: z.ZodOptional<z.ZodNumber>;
1100
- readonly interpreterAddress: z.ZodOptional<z.ZodString>;
1101
- readonly smartAccount: z.ZodOptional<z.ZodString>;
1102
- readonly sourceAccount: z.ZodOptional<z.ZodString>;
1103
- readonly rpcUrl: z.ZodOptional<z.ZodString>;
1104
- readonly baseFee: z.ZodOptional<z.ZodNumber>;
1105
- };
1106
- /** Flat ZodRawShape for `get_interpreter_info`. `verifyLive` triggers an
1107
- * optional RPC `grammar_version()` call so the caller can verify the
1108
- * deployed contract matches the pin. */
1109
- export declare const GetInterpreterInfoToolShape: {
1110
- readonly network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
1111
- readonly verifyLive: z.ZodOptional<z.ZodBoolean>;
1112
- readonly rpcUrl: z.ZodOptional<z.ZodString>;
1113
- };