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