@sudohackin/toolring-mcp 0.0.0-stage → 0.10.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 (77) hide show
  1. package/AGENT-INSTRUCTIONS.ru.md +136 -0
  2. package/LICENSE +21 -0
  3. package/README.md +1144 -2
  4. package/RUN-BASH.ru.md +34 -0
  5. package/TOOL-STDOUT.md +50 -0
  6. package/bin/toolring.js +2 -0
  7. package/dist/argv-policy.d.ts +493 -0
  8. package/dist/argv-policy.js +211 -0
  9. package/dist/argv-policy.js.map +1 -0
  10. package/dist/bash-process.d.ts +3 -0
  11. package/dist/bash-process.js +98 -0
  12. package/dist/bash-process.js.map +1 -0
  13. package/dist/bash-when.d.ts +44 -0
  14. package/dist/bash-when.js +119 -0
  15. package/dist/bash-when.js.map +1 -0
  16. package/dist/call-policy.d.ts +20 -0
  17. package/dist/call-policy.js +74 -0
  18. package/dist/call-policy.js.map +1 -0
  19. package/dist/call.d.ts +107 -0
  20. package/dist/call.js +90 -0
  21. package/dist/call.js.map +1 -0
  22. package/dist/catalog.d.ts +30 -0
  23. package/dist/catalog.js +34 -0
  24. package/dist/catalog.js.map +1 -0
  25. package/dist/command-plan.d.ts +34 -0
  26. package/dist/command-plan.js +229 -0
  27. package/dist/command-plan.js.map +1 -0
  28. package/dist/config.d.ts +4559 -0
  29. package/dist/config.js +459 -0
  30. package/dist/config.js.map +1 -0
  31. package/dist/connections.d.ts +17 -0
  32. package/dist/connections.js +87 -0
  33. package/dist/connections.js.map +1 -0
  34. package/dist/default-tools.yaml +15 -0
  35. package/dist/executor.d.ts +39 -0
  36. package/dist/executor.js +166 -0
  37. package/dist/executor.js.map +1 -0
  38. package/dist/index.d.ts +2 -0
  39. package/dist/index.js +288 -0
  40. package/dist/index.js.map +1 -0
  41. package/dist/module-contract.d.ts +98 -0
  42. package/dist/module-contract.js +4 -0
  43. package/dist/module-contract.js.map +1 -0
  44. package/dist/modules/json.d.ts +14 -0
  45. package/dist/modules/json.js +14 -0
  46. package/dist/modules/json.js.map +1 -0
  47. package/dist/modules/text.d.ts +14 -0
  48. package/dist/modules/text.js +14 -0
  49. package/dist/modules/text.js.map +1 -0
  50. package/dist/modules.d.ts +17 -0
  51. package/dist/modules.js +113 -0
  52. package/dist/modules.js.map +1 -0
  53. package/dist/pipeline-io.d.ts +15 -0
  54. package/dist/pipeline-io.js +112 -0
  55. package/dist/pipeline-io.js.map +1 -0
  56. package/dist/pipeline-parser.d.ts +8 -0
  57. package/dist/pipeline-parser.js +111 -0
  58. package/dist/pipeline-parser.js.map +1 -0
  59. package/dist/pipeline.d.ts +32 -0
  60. package/dist/pipeline.js +409 -0
  61. package/dist/pipeline.js.map +1 -0
  62. package/dist/schema.d.ts +38 -0
  63. package/dist/schema.js +113 -0
  64. package/dist/schema.js.map +1 -0
  65. package/dist/server.d.ts +38 -0
  66. package/dist/server.js +447 -0
  67. package/dist/server.js.map +1 -0
  68. package/dist/stdout-protocol.d.ts +4 -0
  69. package/dist/stdout-protocol.js +21 -0
  70. package/dist/stdout-protocol.js.map +1 -0
  71. package/dist/tool-stream.d.ts +6 -0
  72. package/dist/tool-stream.js +30 -0
  73. package/dist/tool-stream.js.map +1 -0
  74. package/docs/bash-policy.ru.md +211 -0
  75. package/package.json +68 -4
  76. package/skills/toolring/SKILL.md +22 -0
  77. package/skills/toolring-authoring/SKILL.md +63 -0
@@ -0,0 +1,4559 @@
1
+ import { z } from "zod";
2
+ import { type ModuleRegistry } from "./modules.js";
3
+ declare const commandParamSchema: z.ZodObject<{
4
+ /** Parameter name shown to the agent. */
5
+ name: z.ZodString;
6
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7
+ /** Human description — the agent reads this to decide how to use it. */
8
+ description: z.ZodOptional<z.ZodString>;
9
+ type: z.ZodDefault<z.ZodEnum<["string", "number", "boolean"]>>;
10
+ required: z.ZodDefault<z.ZodBoolean>;
11
+ /** For string params: allow-list of accepted values (rendered as an enum). */
12
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
13
+ /** Default value used when the agent omits the param. */
14
+ default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
15
+ } & {
16
+ /** CLI flag the value will be attached to, e.g. "--format". Omit for positional. */
17
+ flag: z.ZodOptional<z.ZodString>;
18
+ /** For string params: attach value with "=" instead of a separate argv token. */
19
+ equalsForm: z.ZodDefault<z.ZodBoolean>;
20
+ /** Only meaningful for boolean: emit this literal token when true (e.g. "--verbose"). */
21
+ trueFlag: z.ZodOptional<z.ZodString>;
22
+ /**
23
+ * Where the flag tokens go in argv:
24
+ * - "global": right after the executable, before spec.args (e.g. git -C <path> log)
25
+ * - "local" (default): after spec.args (the common case)
26
+ */
27
+ placement: z.ZodDefault<z.ZodEnum<["global", "local"]>>;
28
+ /** For string params: when set, the value is passed as a single positional arg. */
29
+ positional: z.ZodDefault<z.ZodBoolean>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ type: "string" | "number" | "boolean";
32
+ required: boolean;
33
+ name: string;
34
+ equalsForm: boolean;
35
+ placement: "global" | "local";
36
+ positional: boolean;
37
+ flag?: string | undefined;
38
+ description?: string | undefined;
39
+ default?: string | number | boolean | undefined;
40
+ aliases?: string[] | undefined;
41
+ enum?: string[] | undefined;
42
+ trueFlag?: string | undefined;
43
+ }, {
44
+ name: string;
45
+ type?: "string" | "number" | "boolean" | undefined;
46
+ required?: boolean | undefined;
47
+ flag?: string | undefined;
48
+ description?: string | undefined;
49
+ default?: string | number | boolean | undefined;
50
+ aliases?: string[] | undefined;
51
+ enum?: string[] | undefined;
52
+ equalsForm?: boolean | undefined;
53
+ trueFlag?: string | undefined;
54
+ placement?: "global" | "local" | undefined;
55
+ positional?: boolean | undefined;
56
+ }>;
57
+ export declare const commandToolSchema: z.ZodObject<{
58
+ /** Name of the MCP tool (also used in error messages). */
59
+ name: z.ZodString;
60
+ /** One-sentence description the agent reads. */
61
+ description: z.ZodString;
62
+ } & {
63
+ handler: z.ZodOptional<z.ZodNever>;
64
+ call: z.ZodOptional<z.ZodNever>;
65
+ connection: z.ZodOptional<z.ZodNever>;
66
+ steps: z.ZodOptional<z.ZodNever>;
67
+ /** Executable to run, e.g. "ffmpeg". Resolved against PATH. */
68
+ command: z.ZodString;
69
+ "command-policy": z.ZodOptional<z.ZodObject<{
70
+ default: z.ZodDefault<z.ZodEnum<["allow", "deny", "confirm"]>>;
71
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
72
+ when: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>, Record<string, string | number | boolean>, Record<string, string | number | boolean>>;
73
+ action: z.ZodEnum<["allow", "deny", "confirm"]>;
74
+ }, "strict", z.ZodTypeAny, {
75
+ when: Record<string, string | number | boolean>;
76
+ action: "allow" | "deny" | "confirm";
77
+ }, {
78
+ when: Record<string, string | number | boolean>;
79
+ action: "allow" | "deny" | "confirm";
80
+ }>, "many">>;
81
+ }, "strict", z.ZodTypeAny, {
82
+ default: "allow" | "deny" | "confirm";
83
+ rules: {
84
+ when: Record<string, string | number | boolean>;
85
+ action: "allow" | "deny" | "confirm";
86
+ }[];
87
+ }, {
88
+ default?: "allow" | "deny" | "confirm" | undefined;
89
+ rules?: {
90
+ when: Record<string, string | number | boolean>;
91
+ action: "allow" | "deny" | "confirm";
92
+ }[] | undefined;
93
+ }>>;
94
+ /** Literal argv tokens placed before every parameter, e.g. ["-i"]. */
95
+ args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
96
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
97
+ /** Parameter name shown to the agent. */
98
+ name: z.ZodString;
99
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
100
+ /** Human description — the agent reads this to decide how to use it. */
101
+ description: z.ZodOptional<z.ZodString>;
102
+ type: z.ZodDefault<z.ZodEnum<["string", "number", "boolean"]>>;
103
+ required: z.ZodDefault<z.ZodBoolean>;
104
+ /** For string params: allow-list of accepted values (rendered as an enum). */
105
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
106
+ /** Default value used when the agent omits the param. */
107
+ default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
108
+ } & {
109
+ /** CLI flag the value will be attached to, e.g. "--format". Omit for positional. */
110
+ flag: z.ZodOptional<z.ZodString>;
111
+ /** For string params: attach value with "=" instead of a separate argv token. */
112
+ equalsForm: z.ZodDefault<z.ZodBoolean>;
113
+ /** Only meaningful for boolean: emit this literal token when true (e.g. "--verbose"). */
114
+ trueFlag: z.ZodOptional<z.ZodString>;
115
+ /**
116
+ * Where the flag tokens go in argv:
117
+ * - "global": right after the executable, before spec.args (e.g. git -C <path> log)
118
+ * - "local" (default): after spec.args (the common case)
119
+ */
120
+ placement: z.ZodDefault<z.ZodEnum<["global", "local"]>>;
121
+ /** For string params: when set, the value is passed as a single positional arg. */
122
+ positional: z.ZodDefault<z.ZodBoolean>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ type: "string" | "number" | "boolean";
125
+ required: boolean;
126
+ name: string;
127
+ equalsForm: boolean;
128
+ placement: "global" | "local";
129
+ positional: boolean;
130
+ flag?: string | undefined;
131
+ description?: string | undefined;
132
+ default?: string | number | boolean | undefined;
133
+ aliases?: string[] | undefined;
134
+ enum?: string[] | undefined;
135
+ trueFlag?: string | undefined;
136
+ }, {
137
+ name: string;
138
+ type?: "string" | "number" | "boolean" | undefined;
139
+ required?: boolean | undefined;
140
+ flag?: string | undefined;
141
+ description?: string | undefined;
142
+ default?: string | number | boolean | undefined;
143
+ aliases?: string[] | undefined;
144
+ enum?: string[] | undefined;
145
+ equalsForm?: boolean | undefined;
146
+ trueFlag?: string | undefined;
147
+ placement?: "global" | "local" | undefined;
148
+ positional?: boolean | undefined;
149
+ }>, "many">>;
150
+ /** Working directory for the command. */
151
+ cwd: z.ZodOptional<z.ZodString>;
152
+ /** Kill the process after this many milliseconds. Default 30_000. */
153
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
154
+ /** When true, stdout is expected to be JSON and is returned as a structured result. */
155
+ jsonOutput: z.ZodDefault<z.ZodBoolean>;
156
+ /** When true, also return stderr in the tool result. Default false. */
157
+ includeStderr: z.ZodDefault<z.ZodBoolean>;
158
+ }, "strip", z.ZodTypeAny, {
159
+ params: {
160
+ type: "string" | "number" | "boolean";
161
+ required: boolean;
162
+ name: string;
163
+ equalsForm: boolean;
164
+ placement: "global" | "local";
165
+ positional: boolean;
166
+ flag?: string | undefined;
167
+ description?: string | undefined;
168
+ default?: string | number | boolean | undefined;
169
+ aliases?: string[] | undefined;
170
+ enum?: string[] | undefined;
171
+ trueFlag?: string | undefined;
172
+ }[];
173
+ name: string;
174
+ description: string;
175
+ command: string;
176
+ args: string[];
177
+ timeoutMs: number;
178
+ jsonOutput: boolean;
179
+ includeStderr: boolean;
180
+ handler?: undefined;
181
+ call?: undefined;
182
+ connection?: undefined;
183
+ steps?: undefined;
184
+ "command-policy"?: {
185
+ default: "allow" | "deny" | "confirm";
186
+ rules: {
187
+ when: Record<string, string | number | boolean>;
188
+ action: "allow" | "deny" | "confirm";
189
+ }[];
190
+ } | undefined;
191
+ cwd?: string | undefined;
192
+ }, {
193
+ name: string;
194
+ description: string;
195
+ command: string;
196
+ params?: {
197
+ name: string;
198
+ type?: "string" | "number" | "boolean" | undefined;
199
+ required?: boolean | undefined;
200
+ flag?: string | undefined;
201
+ description?: string | undefined;
202
+ default?: string | number | boolean | undefined;
203
+ aliases?: string[] | undefined;
204
+ enum?: string[] | undefined;
205
+ equalsForm?: boolean | undefined;
206
+ trueFlag?: string | undefined;
207
+ placement?: "global" | "local" | undefined;
208
+ positional?: boolean | undefined;
209
+ }[] | undefined;
210
+ handler?: undefined;
211
+ call?: undefined;
212
+ connection?: undefined;
213
+ steps?: undefined;
214
+ "command-policy"?: {
215
+ default?: "allow" | "deny" | "confirm" | undefined;
216
+ rules?: {
217
+ when: Record<string, string | number | boolean>;
218
+ action: "allow" | "deny" | "confirm";
219
+ }[] | undefined;
220
+ } | undefined;
221
+ args?: string[] | undefined;
222
+ cwd?: string | undefined;
223
+ timeoutMs?: number | undefined;
224
+ jsonOutput?: boolean | undefined;
225
+ includeStderr?: boolean | undefined;
226
+ }>;
227
+ export declare const operationMetadataSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
228
+ description: z.ZodString;
229
+ params: z.ZodOptional<z.ZodArray<z.ZodObject<{
230
+ name: z.ZodString;
231
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
232
+ description: z.ZodOptional<z.ZodString>;
233
+ required: z.ZodDefault<z.ZodBoolean>;
234
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
235
+ } & {
236
+ type: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "string[]"]>>;
237
+ default: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>>;
238
+ }, "strict", z.ZodTypeAny, {
239
+ type: "string" | "number" | "boolean" | "string[]";
240
+ required: boolean;
241
+ name: string;
242
+ description?: string | undefined;
243
+ default?: string | number | boolean | string[] | undefined;
244
+ aliases?: string[] | undefined;
245
+ enum?: string[] | undefined;
246
+ }, {
247
+ name: string;
248
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
249
+ required?: boolean | undefined;
250
+ description?: string | undefined;
251
+ default?: string | number | boolean | string[] | undefined;
252
+ aliases?: string[] | undefined;
253
+ enum?: string[] | undefined;
254
+ }>, "many">>;
255
+ example: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>;
256
+ }, "strict", z.ZodTypeAny, {
257
+ description: string;
258
+ params?: {
259
+ type: "string" | "number" | "boolean" | "string[]";
260
+ required: boolean;
261
+ name: string;
262
+ description?: string | undefined;
263
+ default?: string | number | boolean | string[] | undefined;
264
+ aliases?: string[] | undefined;
265
+ enum?: string[] | undefined;
266
+ }[] | undefined;
267
+ example?: Record<string, string | number | boolean | string[]> | undefined;
268
+ }, {
269
+ description: string;
270
+ params?: {
271
+ name: string;
272
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
273
+ required?: boolean | undefined;
274
+ description?: string | undefined;
275
+ default?: string | number | boolean | string[] | undefined;
276
+ aliases?: string[] | undefined;
277
+ enum?: string[] | undefined;
278
+ }[] | undefined;
279
+ example?: Record<string, string | number | boolean | string[]> | undefined;
280
+ }>>;
281
+ export type OperationMetadata = z.input<typeof operationMetadataSchema>;
282
+ declare const handlerToolSchema: z.ZodObject<{
283
+ /** Name of the MCP tool (also used in error messages). */
284
+ name: z.ZodString;
285
+ /** One-sentence description the agent reads. */
286
+ description: z.ZodString;
287
+ } & {
288
+ command: z.ZodOptional<z.ZodNever>;
289
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
290
+ name: z.ZodString;
291
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
292
+ description: z.ZodOptional<z.ZodString>;
293
+ required: z.ZodDefault<z.ZodBoolean>;
294
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
295
+ } & {
296
+ type: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "string[]"]>>;
297
+ default: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>>;
298
+ }, "strict", z.ZodTypeAny, {
299
+ type: "string" | "number" | "boolean" | "string[]";
300
+ required: boolean;
301
+ name: string;
302
+ description?: string | undefined;
303
+ default?: string | number | boolean | string[] | undefined;
304
+ aliases?: string[] | undefined;
305
+ enum?: string[] | undefined;
306
+ }, {
307
+ name: string;
308
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
309
+ required?: boolean | undefined;
310
+ description?: string | undefined;
311
+ default?: string | number | boolean | string[] | undefined;
312
+ aliases?: string[] | undefined;
313
+ enum?: string[] | undefined;
314
+ }>, "many">>;
315
+ } & {
316
+ handler: z.ZodEffects<z.ZodString, string, string>;
317
+ call: z.ZodOptional<z.ZodNever>;
318
+ connection: z.ZodOptional<z.ZodNever>;
319
+ steps: z.ZodOptional<z.ZodNever>;
320
+ }, "strict", z.ZodTypeAny, {
321
+ params: {
322
+ type: "string" | "number" | "boolean" | "string[]";
323
+ required: boolean;
324
+ name: string;
325
+ description?: string | undefined;
326
+ default?: string | number | boolean | string[] | undefined;
327
+ aliases?: string[] | undefined;
328
+ enum?: string[] | undefined;
329
+ }[];
330
+ name: string;
331
+ description: string;
332
+ handler: string;
333
+ call?: undefined;
334
+ connection?: undefined;
335
+ steps?: undefined;
336
+ command?: undefined;
337
+ }, {
338
+ name: string;
339
+ description: string;
340
+ handler: string;
341
+ params?: {
342
+ name: string;
343
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
344
+ required?: boolean | undefined;
345
+ description?: string | undefined;
346
+ default?: string | number | boolean | string[] | undefined;
347
+ aliases?: string[] | undefined;
348
+ enum?: string[] | undefined;
349
+ }[] | undefined;
350
+ call?: undefined;
351
+ connection?: undefined;
352
+ steps?: undefined;
353
+ command?: undefined;
354
+ }>;
355
+ export declare const moduleCallSchema: z.ZodObject<{
356
+ call: z.ZodString;
357
+ connection: z.ZodOptional<z.ZodString>;
358
+ }, "strict", z.ZodTypeAny, {
359
+ call: string;
360
+ connection?: string | undefined;
361
+ }, {
362
+ call: string;
363
+ connection?: string | undefined;
364
+ }>;
365
+ declare const moduleToolSchema: z.ZodObject<{
366
+ /** Name of the MCP tool (also used in error messages). */
367
+ name: z.ZodString;
368
+ /** One-sentence description the agent reads. */
369
+ description: z.ZodString;
370
+ } & {
371
+ command: z.ZodOptional<z.ZodNever>;
372
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
373
+ name: z.ZodString;
374
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
375
+ description: z.ZodOptional<z.ZodString>;
376
+ required: z.ZodDefault<z.ZodBoolean>;
377
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
378
+ } & {
379
+ type: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "string[]"]>>;
380
+ default: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>>;
381
+ }, "strict", z.ZodTypeAny, {
382
+ type: "string" | "number" | "boolean" | "string[]";
383
+ required: boolean;
384
+ name: string;
385
+ description?: string | undefined;
386
+ default?: string | number | boolean | string[] | undefined;
387
+ aliases?: string[] | undefined;
388
+ enum?: string[] | undefined;
389
+ }, {
390
+ name: string;
391
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
392
+ required?: boolean | undefined;
393
+ description?: string | undefined;
394
+ default?: string | number | boolean | string[] | undefined;
395
+ aliases?: string[] | undefined;
396
+ enum?: string[] | undefined;
397
+ }>, "many">>;
398
+ } & {
399
+ call: z.ZodString;
400
+ connection: z.ZodOptional<z.ZodString>;
401
+ } & {
402
+ validators: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
403
+ handler: z.ZodOptional<z.ZodNever>;
404
+ steps: z.ZodOptional<z.ZodNever>;
405
+ }, "strict", z.ZodTypeAny, {
406
+ params: {
407
+ type: "string" | "number" | "boolean" | "string[]";
408
+ required: boolean;
409
+ name: string;
410
+ description?: string | undefined;
411
+ default?: string | number | boolean | string[] | undefined;
412
+ aliases?: string[] | undefined;
413
+ enum?: string[] | undefined;
414
+ }[];
415
+ name: string;
416
+ description: string;
417
+ call: string;
418
+ handler?: undefined;
419
+ connection?: string | undefined;
420
+ steps?: undefined;
421
+ command?: undefined;
422
+ validators?: string[] | undefined;
423
+ }, {
424
+ name: string;
425
+ description: string;
426
+ call: string;
427
+ params?: {
428
+ name: string;
429
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
430
+ required?: boolean | undefined;
431
+ description?: string | undefined;
432
+ default?: string | number | boolean | string[] | undefined;
433
+ aliases?: string[] | undefined;
434
+ enum?: string[] | undefined;
435
+ }[] | undefined;
436
+ handler?: undefined;
437
+ connection?: string | undefined;
438
+ steps?: undefined;
439
+ command?: undefined;
440
+ validators?: string[] | undefined;
441
+ }>;
442
+ declare const sequenceToolSchema: z.ZodObject<{
443
+ /** Name of the MCP tool (also used in error messages). */
444
+ name: z.ZodString;
445
+ /** One-sentence description the agent reads. */
446
+ description: z.ZodString;
447
+ } & {
448
+ command: z.ZodOptional<z.ZodNever>;
449
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
450
+ name: z.ZodString;
451
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
452
+ description: z.ZodOptional<z.ZodString>;
453
+ required: z.ZodDefault<z.ZodBoolean>;
454
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
455
+ } & {
456
+ type: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "string[]"]>>;
457
+ default: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>>;
458
+ }, "strict", z.ZodTypeAny, {
459
+ type: "string" | "number" | "boolean" | "string[]";
460
+ required: boolean;
461
+ name: string;
462
+ description?: string | undefined;
463
+ default?: string | number | boolean | string[] | undefined;
464
+ aliases?: string[] | undefined;
465
+ enum?: string[] | undefined;
466
+ }, {
467
+ name: string;
468
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
469
+ required?: boolean | undefined;
470
+ description?: string | undefined;
471
+ default?: string | number | boolean | string[] | undefined;
472
+ aliases?: string[] | undefined;
473
+ enum?: string[] | undefined;
474
+ }>, "many">>;
475
+ } & {
476
+ validators: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
477
+ handler: z.ZodOptional<z.ZodNever>;
478
+ call: z.ZodOptional<z.ZodNever>;
479
+ connection: z.ZodOptional<z.ZodNever>;
480
+ steps: z.ZodArray<z.ZodObject<{
481
+ call: z.ZodString;
482
+ connection: z.ZodOptional<z.ZodString>;
483
+ }, "strict", z.ZodTypeAny, {
484
+ call: string;
485
+ connection?: string | undefined;
486
+ }, {
487
+ call: string;
488
+ connection?: string | undefined;
489
+ }>, "atleastone">;
490
+ }, "strict", z.ZodTypeAny, {
491
+ params: {
492
+ type: "string" | "number" | "boolean" | "string[]";
493
+ required: boolean;
494
+ name: string;
495
+ description?: string | undefined;
496
+ default?: string | number | boolean | string[] | undefined;
497
+ aliases?: string[] | undefined;
498
+ enum?: string[] | undefined;
499
+ }[];
500
+ name: string;
501
+ description: string;
502
+ steps: [{
503
+ call: string;
504
+ connection?: string | undefined;
505
+ }, ...{
506
+ call: string;
507
+ connection?: string | undefined;
508
+ }[]];
509
+ handler?: undefined;
510
+ call?: undefined;
511
+ connection?: undefined;
512
+ command?: undefined;
513
+ validators?: string[] | undefined;
514
+ }, {
515
+ name: string;
516
+ description: string;
517
+ steps: [{
518
+ call: string;
519
+ connection?: string | undefined;
520
+ }, ...{
521
+ call: string;
522
+ connection?: string | undefined;
523
+ }[]];
524
+ params?: {
525
+ name: string;
526
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
527
+ required?: boolean | undefined;
528
+ description?: string | undefined;
529
+ default?: string | number | boolean | string[] | undefined;
530
+ aliases?: string[] | undefined;
531
+ enum?: string[] | undefined;
532
+ }[] | undefined;
533
+ handler?: undefined;
534
+ call?: undefined;
535
+ connection?: undefined;
536
+ command?: undefined;
537
+ validators?: string[] | undefined;
538
+ }>;
539
+ declare const toolSchema: z.ZodUnion<[z.ZodObject<{
540
+ /** Name of the MCP tool (also used in error messages). */
541
+ name: z.ZodString;
542
+ /** One-sentence description the agent reads. */
543
+ description: z.ZodString;
544
+ } & {
545
+ handler: z.ZodOptional<z.ZodNever>;
546
+ call: z.ZodOptional<z.ZodNever>;
547
+ connection: z.ZodOptional<z.ZodNever>;
548
+ steps: z.ZodOptional<z.ZodNever>;
549
+ /** Executable to run, e.g. "ffmpeg". Resolved against PATH. */
550
+ command: z.ZodString;
551
+ "command-policy": z.ZodOptional<z.ZodObject<{
552
+ default: z.ZodDefault<z.ZodEnum<["allow", "deny", "confirm"]>>;
553
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
554
+ when: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>, Record<string, string | number | boolean>, Record<string, string | number | boolean>>;
555
+ action: z.ZodEnum<["allow", "deny", "confirm"]>;
556
+ }, "strict", z.ZodTypeAny, {
557
+ when: Record<string, string | number | boolean>;
558
+ action: "allow" | "deny" | "confirm";
559
+ }, {
560
+ when: Record<string, string | number | boolean>;
561
+ action: "allow" | "deny" | "confirm";
562
+ }>, "many">>;
563
+ }, "strict", z.ZodTypeAny, {
564
+ default: "allow" | "deny" | "confirm";
565
+ rules: {
566
+ when: Record<string, string | number | boolean>;
567
+ action: "allow" | "deny" | "confirm";
568
+ }[];
569
+ }, {
570
+ default?: "allow" | "deny" | "confirm" | undefined;
571
+ rules?: {
572
+ when: Record<string, string | number | boolean>;
573
+ action: "allow" | "deny" | "confirm";
574
+ }[] | undefined;
575
+ }>>;
576
+ /** Literal argv tokens placed before every parameter, e.g. ["-i"]. */
577
+ args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
578
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
579
+ /** Parameter name shown to the agent. */
580
+ name: z.ZodString;
581
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
582
+ /** Human description — the agent reads this to decide how to use it. */
583
+ description: z.ZodOptional<z.ZodString>;
584
+ type: z.ZodDefault<z.ZodEnum<["string", "number", "boolean"]>>;
585
+ required: z.ZodDefault<z.ZodBoolean>;
586
+ /** For string params: allow-list of accepted values (rendered as an enum). */
587
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
588
+ /** Default value used when the agent omits the param. */
589
+ default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
590
+ } & {
591
+ /** CLI flag the value will be attached to, e.g. "--format". Omit for positional. */
592
+ flag: z.ZodOptional<z.ZodString>;
593
+ /** For string params: attach value with "=" instead of a separate argv token. */
594
+ equalsForm: z.ZodDefault<z.ZodBoolean>;
595
+ /** Only meaningful for boolean: emit this literal token when true (e.g. "--verbose"). */
596
+ trueFlag: z.ZodOptional<z.ZodString>;
597
+ /**
598
+ * Where the flag tokens go in argv:
599
+ * - "global": right after the executable, before spec.args (e.g. git -C <path> log)
600
+ * - "local" (default): after spec.args (the common case)
601
+ */
602
+ placement: z.ZodDefault<z.ZodEnum<["global", "local"]>>;
603
+ /** For string params: when set, the value is passed as a single positional arg. */
604
+ positional: z.ZodDefault<z.ZodBoolean>;
605
+ }, "strip", z.ZodTypeAny, {
606
+ type: "string" | "number" | "boolean";
607
+ required: boolean;
608
+ name: string;
609
+ equalsForm: boolean;
610
+ placement: "global" | "local";
611
+ positional: boolean;
612
+ flag?: string | undefined;
613
+ description?: string | undefined;
614
+ default?: string | number | boolean | undefined;
615
+ aliases?: string[] | undefined;
616
+ enum?: string[] | undefined;
617
+ trueFlag?: string | undefined;
618
+ }, {
619
+ name: string;
620
+ type?: "string" | "number" | "boolean" | undefined;
621
+ required?: boolean | undefined;
622
+ flag?: string | undefined;
623
+ description?: string | undefined;
624
+ default?: string | number | boolean | undefined;
625
+ aliases?: string[] | undefined;
626
+ enum?: string[] | undefined;
627
+ equalsForm?: boolean | undefined;
628
+ trueFlag?: string | undefined;
629
+ placement?: "global" | "local" | undefined;
630
+ positional?: boolean | undefined;
631
+ }>, "many">>;
632
+ /** Working directory for the command. */
633
+ cwd: z.ZodOptional<z.ZodString>;
634
+ /** Kill the process after this many milliseconds. Default 30_000. */
635
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
636
+ /** When true, stdout is expected to be JSON and is returned as a structured result. */
637
+ jsonOutput: z.ZodDefault<z.ZodBoolean>;
638
+ /** When true, also return stderr in the tool result. Default false. */
639
+ includeStderr: z.ZodDefault<z.ZodBoolean>;
640
+ }, "strip", z.ZodTypeAny, {
641
+ params: {
642
+ type: "string" | "number" | "boolean";
643
+ required: boolean;
644
+ name: string;
645
+ equalsForm: boolean;
646
+ placement: "global" | "local";
647
+ positional: boolean;
648
+ flag?: string | undefined;
649
+ description?: string | undefined;
650
+ default?: string | number | boolean | undefined;
651
+ aliases?: string[] | undefined;
652
+ enum?: string[] | undefined;
653
+ trueFlag?: string | undefined;
654
+ }[];
655
+ name: string;
656
+ description: string;
657
+ command: string;
658
+ args: string[];
659
+ timeoutMs: number;
660
+ jsonOutput: boolean;
661
+ includeStderr: boolean;
662
+ handler?: undefined;
663
+ call?: undefined;
664
+ connection?: undefined;
665
+ steps?: undefined;
666
+ "command-policy"?: {
667
+ default: "allow" | "deny" | "confirm";
668
+ rules: {
669
+ when: Record<string, string | number | boolean>;
670
+ action: "allow" | "deny" | "confirm";
671
+ }[];
672
+ } | undefined;
673
+ cwd?: string | undefined;
674
+ }, {
675
+ name: string;
676
+ description: string;
677
+ command: string;
678
+ params?: {
679
+ name: string;
680
+ type?: "string" | "number" | "boolean" | undefined;
681
+ required?: boolean | undefined;
682
+ flag?: string | undefined;
683
+ description?: string | undefined;
684
+ default?: string | number | boolean | undefined;
685
+ aliases?: string[] | undefined;
686
+ enum?: string[] | undefined;
687
+ equalsForm?: boolean | undefined;
688
+ trueFlag?: string | undefined;
689
+ placement?: "global" | "local" | undefined;
690
+ positional?: boolean | undefined;
691
+ }[] | undefined;
692
+ handler?: undefined;
693
+ call?: undefined;
694
+ connection?: undefined;
695
+ steps?: undefined;
696
+ "command-policy"?: {
697
+ default?: "allow" | "deny" | "confirm" | undefined;
698
+ rules?: {
699
+ when: Record<string, string | number | boolean>;
700
+ action: "allow" | "deny" | "confirm";
701
+ }[] | undefined;
702
+ } | undefined;
703
+ args?: string[] | undefined;
704
+ cwd?: string | undefined;
705
+ timeoutMs?: number | undefined;
706
+ jsonOutput?: boolean | undefined;
707
+ includeStderr?: boolean | undefined;
708
+ }>, z.ZodObject<{
709
+ /** Name of the MCP tool (also used in error messages). */
710
+ name: z.ZodString;
711
+ /** One-sentence description the agent reads. */
712
+ description: z.ZodString;
713
+ } & {
714
+ command: z.ZodOptional<z.ZodNever>;
715
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
716
+ name: z.ZodString;
717
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
718
+ description: z.ZodOptional<z.ZodString>;
719
+ required: z.ZodDefault<z.ZodBoolean>;
720
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
721
+ } & {
722
+ type: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "string[]"]>>;
723
+ default: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>>;
724
+ }, "strict", z.ZodTypeAny, {
725
+ type: "string" | "number" | "boolean" | "string[]";
726
+ required: boolean;
727
+ name: string;
728
+ description?: string | undefined;
729
+ default?: string | number | boolean | string[] | undefined;
730
+ aliases?: string[] | undefined;
731
+ enum?: string[] | undefined;
732
+ }, {
733
+ name: string;
734
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
735
+ required?: boolean | undefined;
736
+ description?: string | undefined;
737
+ default?: string | number | boolean | string[] | undefined;
738
+ aliases?: string[] | undefined;
739
+ enum?: string[] | undefined;
740
+ }>, "many">>;
741
+ } & {
742
+ handler: z.ZodEffects<z.ZodString, string, string>;
743
+ call: z.ZodOptional<z.ZodNever>;
744
+ connection: z.ZodOptional<z.ZodNever>;
745
+ steps: z.ZodOptional<z.ZodNever>;
746
+ }, "strict", z.ZodTypeAny, {
747
+ params: {
748
+ type: "string" | "number" | "boolean" | "string[]";
749
+ required: boolean;
750
+ name: string;
751
+ description?: string | undefined;
752
+ default?: string | number | boolean | string[] | undefined;
753
+ aliases?: string[] | undefined;
754
+ enum?: string[] | undefined;
755
+ }[];
756
+ name: string;
757
+ description: string;
758
+ handler: string;
759
+ call?: undefined;
760
+ connection?: undefined;
761
+ steps?: undefined;
762
+ command?: undefined;
763
+ }, {
764
+ name: string;
765
+ description: string;
766
+ handler: string;
767
+ params?: {
768
+ name: string;
769
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
770
+ required?: boolean | undefined;
771
+ description?: string | undefined;
772
+ default?: string | number | boolean | string[] | undefined;
773
+ aliases?: string[] | undefined;
774
+ enum?: string[] | undefined;
775
+ }[] | undefined;
776
+ call?: undefined;
777
+ connection?: undefined;
778
+ steps?: undefined;
779
+ command?: undefined;
780
+ }>, z.ZodObject<{
781
+ /** Name of the MCP tool (also used in error messages). */
782
+ name: z.ZodString;
783
+ /** One-sentence description the agent reads. */
784
+ description: z.ZodString;
785
+ } & {
786
+ command: z.ZodOptional<z.ZodNever>;
787
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
788
+ name: z.ZodString;
789
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
790
+ description: z.ZodOptional<z.ZodString>;
791
+ required: z.ZodDefault<z.ZodBoolean>;
792
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
793
+ } & {
794
+ type: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "string[]"]>>;
795
+ default: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>>;
796
+ }, "strict", z.ZodTypeAny, {
797
+ type: "string" | "number" | "boolean" | "string[]";
798
+ required: boolean;
799
+ name: string;
800
+ description?: string | undefined;
801
+ default?: string | number | boolean | string[] | undefined;
802
+ aliases?: string[] | undefined;
803
+ enum?: string[] | undefined;
804
+ }, {
805
+ name: string;
806
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
807
+ required?: boolean | undefined;
808
+ description?: string | undefined;
809
+ default?: string | number | boolean | string[] | undefined;
810
+ aliases?: string[] | undefined;
811
+ enum?: string[] | undefined;
812
+ }>, "many">>;
813
+ } & {
814
+ call: z.ZodString;
815
+ connection: z.ZodOptional<z.ZodString>;
816
+ } & {
817
+ validators: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
818
+ handler: z.ZodOptional<z.ZodNever>;
819
+ steps: z.ZodOptional<z.ZodNever>;
820
+ }, "strict", z.ZodTypeAny, {
821
+ params: {
822
+ type: "string" | "number" | "boolean" | "string[]";
823
+ required: boolean;
824
+ name: string;
825
+ description?: string | undefined;
826
+ default?: string | number | boolean | string[] | undefined;
827
+ aliases?: string[] | undefined;
828
+ enum?: string[] | undefined;
829
+ }[];
830
+ name: string;
831
+ description: string;
832
+ call: string;
833
+ handler?: undefined;
834
+ connection?: string | undefined;
835
+ steps?: undefined;
836
+ command?: undefined;
837
+ validators?: string[] | undefined;
838
+ }, {
839
+ name: string;
840
+ description: string;
841
+ call: string;
842
+ params?: {
843
+ name: string;
844
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
845
+ required?: boolean | undefined;
846
+ description?: string | undefined;
847
+ default?: string | number | boolean | string[] | undefined;
848
+ aliases?: string[] | undefined;
849
+ enum?: string[] | undefined;
850
+ }[] | undefined;
851
+ handler?: undefined;
852
+ connection?: string | undefined;
853
+ steps?: undefined;
854
+ command?: undefined;
855
+ validators?: string[] | undefined;
856
+ }>, z.ZodObject<{
857
+ /** Name of the MCP tool (also used in error messages). */
858
+ name: z.ZodString;
859
+ /** One-sentence description the agent reads. */
860
+ description: z.ZodString;
861
+ } & {
862
+ command: z.ZodOptional<z.ZodNever>;
863
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
864
+ name: z.ZodString;
865
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
866
+ description: z.ZodOptional<z.ZodString>;
867
+ required: z.ZodDefault<z.ZodBoolean>;
868
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
869
+ } & {
870
+ type: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "string[]"]>>;
871
+ default: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>>;
872
+ }, "strict", z.ZodTypeAny, {
873
+ type: "string" | "number" | "boolean" | "string[]";
874
+ required: boolean;
875
+ name: string;
876
+ description?: string | undefined;
877
+ default?: string | number | boolean | string[] | undefined;
878
+ aliases?: string[] | undefined;
879
+ enum?: string[] | undefined;
880
+ }, {
881
+ name: string;
882
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
883
+ required?: boolean | undefined;
884
+ description?: string | undefined;
885
+ default?: string | number | boolean | string[] | undefined;
886
+ aliases?: string[] | undefined;
887
+ enum?: string[] | undefined;
888
+ }>, "many">>;
889
+ } & {
890
+ validators: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
891
+ handler: z.ZodOptional<z.ZodNever>;
892
+ call: z.ZodOptional<z.ZodNever>;
893
+ connection: z.ZodOptional<z.ZodNever>;
894
+ steps: z.ZodArray<z.ZodObject<{
895
+ call: z.ZodString;
896
+ connection: z.ZodOptional<z.ZodString>;
897
+ }, "strict", z.ZodTypeAny, {
898
+ call: string;
899
+ connection?: string | undefined;
900
+ }, {
901
+ call: string;
902
+ connection?: string | undefined;
903
+ }>, "atleastone">;
904
+ }, "strict", z.ZodTypeAny, {
905
+ params: {
906
+ type: "string" | "number" | "boolean" | "string[]";
907
+ required: boolean;
908
+ name: string;
909
+ description?: string | undefined;
910
+ default?: string | number | boolean | string[] | undefined;
911
+ aliases?: string[] | undefined;
912
+ enum?: string[] | undefined;
913
+ }[];
914
+ name: string;
915
+ description: string;
916
+ steps: [{
917
+ call: string;
918
+ connection?: string | undefined;
919
+ }, ...{
920
+ call: string;
921
+ connection?: string | undefined;
922
+ }[]];
923
+ handler?: undefined;
924
+ call?: undefined;
925
+ connection?: undefined;
926
+ command?: undefined;
927
+ validators?: string[] | undefined;
928
+ }, {
929
+ name: string;
930
+ description: string;
931
+ steps: [{
932
+ call: string;
933
+ connection?: string | undefined;
934
+ }, ...{
935
+ call: string;
936
+ connection?: string | undefined;
937
+ }[]];
938
+ params?: {
939
+ name: string;
940
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
941
+ required?: boolean | undefined;
942
+ description?: string | undefined;
943
+ default?: string | number | boolean | string[] | undefined;
944
+ aliases?: string[] | undefined;
945
+ enum?: string[] | undefined;
946
+ }[] | undefined;
947
+ handler?: undefined;
948
+ call?: undefined;
949
+ connection?: undefined;
950
+ command?: undefined;
951
+ validators?: string[] | undefined;
952
+ }>]>;
953
+ export declare const callToolName = "toolring_call";
954
+ export declare const bashToolName = "run_bash";
955
+ export declare const commandNamePattern: RegExp;
956
+ export declare const stageNamePattern: RegExp;
957
+ export declare const moduleArgsSchema: z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnknown>;
958
+ export declare const configSchema: z.ZodObject<{
959
+ "tool-policy": z.ZodOptional<z.ZodObject<{
960
+ default: z.ZodDefault<z.ZodEnum<["allow", "deny", "confirm"]>>;
961
+ } & {
962
+ validators: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
963
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
964
+ connection: z.ZodOptional<z.ZodString>;
965
+ } & {
966
+ call: z.ZodUnion<[z.ZodString, z.ZodString]>;
967
+ action: z.ZodEnum<["allow", "deny", "confirm"]>;
968
+ "allowed-args": z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
969
+ when: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnknown>>;
970
+ } & {
971
+ validators: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
972
+ }, "strict", z.ZodTypeAny, {
973
+ call: string;
974
+ action: "allow" | "deny" | "confirm";
975
+ connection?: string | undefined;
976
+ when?: Record<string, unknown> | undefined;
977
+ validators?: string[] | undefined;
978
+ "allowed-args"?: string[] | undefined;
979
+ }, {
980
+ call: string;
981
+ action: "allow" | "deny" | "confirm";
982
+ connection?: string | undefined;
983
+ when?: Record<string, unknown> | undefined;
984
+ validators?: string[] | undefined;
985
+ "allowed-args"?: string[] | undefined;
986
+ }>, "many">>;
987
+ operations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
988
+ validators: z.ZodArray<z.ZodString, "many">;
989
+ }, "strict", z.ZodTypeAny, {
990
+ validators: string[];
991
+ }, {
992
+ validators: string[];
993
+ }>>>;
994
+ }, "strict", z.ZodTypeAny, {
995
+ default: "allow" | "deny" | "confirm";
996
+ rules: {
997
+ call: string;
998
+ action: "allow" | "deny" | "confirm";
999
+ connection?: string | undefined;
1000
+ when?: Record<string, unknown> | undefined;
1001
+ validators?: string[] | undefined;
1002
+ "allowed-args"?: string[] | undefined;
1003
+ }[];
1004
+ validators?: string[] | undefined;
1005
+ operations?: Record<string, {
1006
+ validators: string[];
1007
+ }> | undefined;
1008
+ }, {
1009
+ default?: "allow" | "deny" | "confirm" | undefined;
1010
+ rules?: {
1011
+ call: string;
1012
+ action: "allow" | "deny" | "confirm";
1013
+ connection?: string | undefined;
1014
+ when?: Record<string, unknown> | undefined;
1015
+ validators?: string[] | undefined;
1016
+ "allowed-args"?: string[] | undefined;
1017
+ }[] | undefined;
1018
+ validators?: string[] | undefined;
1019
+ operations?: Record<string, {
1020
+ validators: string[];
1021
+ }> | undefined;
1022
+ }>>;
1023
+ "operation-policies": z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1024
+ validators: z.ZodArray<z.ZodString, "many">;
1025
+ }, "strict", z.ZodTypeAny, {
1026
+ validators: string[];
1027
+ }, {
1028
+ validators: string[];
1029
+ }>>>;
1030
+ "command-connections": z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1031
+ "command-policies": z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1032
+ parser: z.ZodOptional<z.ZodString>;
1033
+ connection: z.ZodOptional<z.ZodString>;
1034
+ backend: z.ZodDefault<z.ZodEnum<["process", "module"]>>;
1035
+ validators: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1036
+ }, "strict", z.ZodTypeAny, {
1037
+ validators: string[];
1038
+ backend: "process" | "module";
1039
+ connection?: string | undefined;
1040
+ parser?: string | undefined;
1041
+ }, {
1042
+ connection?: string | undefined;
1043
+ validators?: string[] | undefined;
1044
+ parser?: string | undefined;
1045
+ backend?: "process" | "module" | undefined;
1046
+ }>>>;
1047
+ "bash-policy": z.ZodOptional<z.ZodObject<{
1048
+ "external-commands": z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1049
+ default: z.ZodDefault<z.ZodEnum<["allow", "deny", "confirm"]>>;
1050
+ "command-defaults": z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["allow", "deny", "confirm"]>>>;
1051
+ guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
1052
+ command: z.ZodString;
1053
+ subcommand: z.ZodOptional<z.ZodString>;
1054
+ require: z.ZodObject<{
1055
+ option: z.ZodArray<z.ZodString, "atleastone">;
1056
+ equals: z.ZodString;
1057
+ }, "strict", z.ZodTypeAny, {
1058
+ option: [string, ...string[]];
1059
+ equals: string;
1060
+ }, {
1061
+ option: [string, ...string[]];
1062
+ equals: string;
1063
+ }>;
1064
+ }, "strict", z.ZodTypeAny, {
1065
+ command: string;
1066
+ require: {
1067
+ option: [string, ...string[]];
1068
+ equals: string;
1069
+ };
1070
+ subcommand?: string | undefined;
1071
+ }, {
1072
+ command: string;
1073
+ require: {
1074
+ option: [string, ...string[]];
1075
+ equals: string;
1076
+ };
1077
+ subcommand?: string | undefined;
1078
+ }>, "many">>;
1079
+ rules: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
1080
+ command: z.ZodString;
1081
+ argv: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
1082
+ oneOf: z.ZodArray<z.ZodString, "atleastone">;
1083
+ }, "strict", z.ZodTypeAny, {
1084
+ oneOf: [string, ...string[]];
1085
+ }, {
1086
+ oneOf: [string, ...string[]];
1087
+ }>, z.ZodObject<{
1088
+ startsWith: z.ZodString;
1089
+ }, "strict", z.ZodTypeAny, {
1090
+ startsWith: string;
1091
+ }, {
1092
+ startsWith: string;
1093
+ }>, z.ZodObject<{
1094
+ jsonPatch: z.ZodObject<{
1095
+ paths: z.ZodArray<z.ZodString, "atleastone">;
1096
+ }, "strict", z.ZodTypeAny, {
1097
+ paths: [string, ...string[]];
1098
+ }, {
1099
+ paths: [string, ...string[]];
1100
+ }>;
1101
+ }, "strict", z.ZodTypeAny, {
1102
+ jsonPatch: {
1103
+ paths: [string, ...string[]];
1104
+ };
1105
+ }, {
1106
+ jsonPatch: {
1107
+ paths: [string, ...string[]];
1108
+ };
1109
+ }>]>, "many">>;
1110
+ match: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
1111
+ subcommand: z.ZodString;
1112
+ target: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1113
+ oneOf: z.ZodArray<z.ZodString, "atleastone">;
1114
+ }, "strict", z.ZodTypeAny, {
1115
+ oneOf: [string, ...string[]];
1116
+ }, {
1117
+ oneOf: [string, ...string[]];
1118
+ }>]>>;
1119
+ assignments: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodString, z.ZodObject<{
1120
+ oneOf: z.ZodArray<z.ZodString, "atleastone">;
1121
+ }, "strict", z.ZodTypeAny, {
1122
+ oneOf: [string, ...string[]];
1123
+ }, {
1124
+ oneOf: [string, ...string[]];
1125
+ }>, z.ZodObject<{
1126
+ startsWith: z.ZodString;
1127
+ }, "strict", z.ZodTypeAny, {
1128
+ startsWith: string;
1129
+ }, {
1130
+ startsWith: string;
1131
+ }>, z.ZodObject<{
1132
+ jsonPatch: z.ZodObject<{
1133
+ paths: z.ZodArray<z.ZodString, "atleastone">;
1134
+ }, "strict", z.ZodTypeAny, {
1135
+ paths: [string, ...string[]];
1136
+ }, {
1137
+ paths: [string, ...string[]];
1138
+ }>;
1139
+ }, "strict", z.ZodTypeAny, {
1140
+ jsonPatch: {
1141
+ paths: [string, ...string[]];
1142
+ };
1143
+ }, {
1144
+ jsonPatch: {
1145
+ paths: [string, ...string[]];
1146
+ };
1147
+ }>]>>>;
1148
+ flags: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodObject<{
1149
+ names: z.ZodArray<z.ZodString, "atleastone">;
1150
+ required: z.ZodDefault<z.ZodBoolean>;
1151
+ } & {
1152
+ value: z.ZodUnion<[z.ZodString, z.ZodObject<{
1153
+ oneOf: z.ZodArray<z.ZodString, "atleastone">;
1154
+ }, "strict", z.ZodTypeAny, {
1155
+ oneOf: [string, ...string[]];
1156
+ }, {
1157
+ oneOf: [string, ...string[]];
1158
+ }>, z.ZodObject<{
1159
+ startsWith: z.ZodString;
1160
+ }, "strict", z.ZodTypeAny, {
1161
+ startsWith: string;
1162
+ }, {
1163
+ startsWith: string;
1164
+ }>, z.ZodObject<{
1165
+ jsonPatch: z.ZodObject<{
1166
+ paths: z.ZodArray<z.ZodString, "atleastone">;
1167
+ }, "strict", z.ZodTypeAny, {
1168
+ paths: [string, ...string[]];
1169
+ }, {
1170
+ paths: [string, ...string[]];
1171
+ }>;
1172
+ }, "strict", z.ZodTypeAny, {
1173
+ jsonPatch: {
1174
+ paths: [string, ...string[]];
1175
+ };
1176
+ }, {
1177
+ jsonPatch: {
1178
+ paths: [string, ...string[]];
1179
+ };
1180
+ }>]>;
1181
+ }, "strict", z.ZodTypeAny, {
1182
+ value: string | {
1183
+ oneOf: [string, ...string[]];
1184
+ } | {
1185
+ startsWith: string;
1186
+ } | {
1187
+ jsonPatch: {
1188
+ paths: [string, ...string[]];
1189
+ };
1190
+ };
1191
+ names: [string, ...string[]];
1192
+ required: boolean;
1193
+ }, {
1194
+ value: string | {
1195
+ oneOf: [string, ...string[]];
1196
+ } | {
1197
+ startsWith: string;
1198
+ } | {
1199
+ jsonPatch: {
1200
+ paths: [string, ...string[]];
1201
+ };
1202
+ };
1203
+ names: [string, ...string[]];
1204
+ required?: boolean | undefined;
1205
+ }>, z.ZodObject<{
1206
+ names: z.ZodArray<z.ZodString, "atleastone">;
1207
+ required: z.ZodDefault<z.ZodBoolean>;
1208
+ } & {
1209
+ type: z.ZodLiteral<"switch">;
1210
+ }, "strict", z.ZodTypeAny, {
1211
+ type: "switch";
1212
+ names: [string, ...string[]];
1213
+ required: boolean;
1214
+ }, {
1215
+ type: "switch";
1216
+ names: [string, ...string[]];
1217
+ required?: boolean | undefined;
1218
+ }>]>, "many">>;
1219
+ }, "strict", z.ZodTypeAny, {
1220
+ subcommand: string;
1221
+ flags: ({
1222
+ value: string | {
1223
+ oneOf: [string, ...string[]];
1224
+ } | {
1225
+ startsWith: string;
1226
+ } | {
1227
+ jsonPatch: {
1228
+ paths: [string, ...string[]];
1229
+ };
1230
+ };
1231
+ names: [string, ...string[]];
1232
+ required: boolean;
1233
+ } | {
1234
+ type: "switch";
1235
+ names: [string, ...string[]];
1236
+ required: boolean;
1237
+ })[];
1238
+ target?: string | {
1239
+ oneOf: [string, ...string[]];
1240
+ } | undefined;
1241
+ assignments?: Record<string, string | {
1242
+ oneOf: [string, ...string[]];
1243
+ } | {
1244
+ startsWith: string;
1245
+ } | {
1246
+ jsonPatch: {
1247
+ paths: [string, ...string[]];
1248
+ };
1249
+ }> | undefined;
1250
+ }, {
1251
+ subcommand: string;
1252
+ target?: string | {
1253
+ oneOf: [string, ...string[]];
1254
+ } | undefined;
1255
+ assignments?: Record<string, string | {
1256
+ oneOf: [string, ...string[]];
1257
+ } | {
1258
+ startsWith: string;
1259
+ } | {
1260
+ jsonPatch: {
1261
+ paths: [string, ...string[]];
1262
+ };
1263
+ }> | undefined;
1264
+ flags?: ({
1265
+ value: string | {
1266
+ oneOf: [string, ...string[]];
1267
+ } | {
1268
+ startsWith: string;
1269
+ } | {
1270
+ jsonPatch: {
1271
+ paths: [string, ...string[]];
1272
+ };
1273
+ };
1274
+ names: [string, ...string[]];
1275
+ required?: boolean | undefined;
1276
+ } | {
1277
+ type: "switch";
1278
+ names: [string, ...string[]];
1279
+ required?: boolean | undefined;
1280
+ })[] | undefined;
1281
+ }>, z.ZodObject<{
1282
+ positionals: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
1283
+ oneOf: z.ZodArray<z.ZodString, "atleastone">;
1284
+ }, "strict", z.ZodTypeAny, {
1285
+ oneOf: [string, ...string[]];
1286
+ }, {
1287
+ oneOf: [string, ...string[]];
1288
+ }>, z.ZodObject<{
1289
+ startsWith: z.ZodString;
1290
+ }, "strict", z.ZodTypeAny, {
1291
+ startsWith: string;
1292
+ }, {
1293
+ startsWith: string;
1294
+ }>, z.ZodObject<{
1295
+ jsonPatch: z.ZodObject<{
1296
+ paths: z.ZodArray<z.ZodString, "atleastone">;
1297
+ }, "strict", z.ZodTypeAny, {
1298
+ paths: [string, ...string[]];
1299
+ }, {
1300
+ paths: [string, ...string[]];
1301
+ }>;
1302
+ }, "strict", z.ZodTypeAny, {
1303
+ jsonPatch: {
1304
+ paths: [string, ...string[]];
1305
+ };
1306
+ }, {
1307
+ jsonPatch: {
1308
+ paths: [string, ...string[]];
1309
+ };
1310
+ }>]>, "many">;
1311
+ flags: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodObject<{
1312
+ names: z.ZodArray<z.ZodString, "atleastone">;
1313
+ required: z.ZodDefault<z.ZodBoolean>;
1314
+ } & {
1315
+ value: z.ZodUnion<[z.ZodString, z.ZodObject<{
1316
+ oneOf: z.ZodArray<z.ZodString, "atleastone">;
1317
+ }, "strict", z.ZodTypeAny, {
1318
+ oneOf: [string, ...string[]];
1319
+ }, {
1320
+ oneOf: [string, ...string[]];
1321
+ }>, z.ZodObject<{
1322
+ startsWith: z.ZodString;
1323
+ }, "strict", z.ZodTypeAny, {
1324
+ startsWith: string;
1325
+ }, {
1326
+ startsWith: string;
1327
+ }>, z.ZodObject<{
1328
+ jsonPatch: z.ZodObject<{
1329
+ paths: z.ZodArray<z.ZodString, "atleastone">;
1330
+ }, "strict", z.ZodTypeAny, {
1331
+ paths: [string, ...string[]];
1332
+ }, {
1333
+ paths: [string, ...string[]];
1334
+ }>;
1335
+ }, "strict", z.ZodTypeAny, {
1336
+ jsonPatch: {
1337
+ paths: [string, ...string[]];
1338
+ };
1339
+ }, {
1340
+ jsonPatch: {
1341
+ paths: [string, ...string[]];
1342
+ };
1343
+ }>]>;
1344
+ }, "strict", z.ZodTypeAny, {
1345
+ value: string | {
1346
+ oneOf: [string, ...string[]];
1347
+ } | {
1348
+ startsWith: string;
1349
+ } | {
1350
+ jsonPatch: {
1351
+ paths: [string, ...string[]];
1352
+ };
1353
+ };
1354
+ names: [string, ...string[]];
1355
+ required: boolean;
1356
+ }, {
1357
+ value: string | {
1358
+ oneOf: [string, ...string[]];
1359
+ } | {
1360
+ startsWith: string;
1361
+ } | {
1362
+ jsonPatch: {
1363
+ paths: [string, ...string[]];
1364
+ };
1365
+ };
1366
+ names: [string, ...string[]];
1367
+ required?: boolean | undefined;
1368
+ }>, z.ZodObject<{
1369
+ names: z.ZodArray<z.ZodString, "atleastone">;
1370
+ required: z.ZodDefault<z.ZodBoolean>;
1371
+ } & {
1372
+ type: z.ZodLiteral<"switch">;
1373
+ }, "strict", z.ZodTypeAny, {
1374
+ type: "switch";
1375
+ names: [string, ...string[]];
1376
+ required: boolean;
1377
+ }, {
1378
+ type: "switch";
1379
+ names: [string, ...string[]];
1380
+ required?: boolean | undefined;
1381
+ }>]>, "many">>;
1382
+ }, "strict", z.ZodTypeAny, {
1383
+ flags: ({
1384
+ value: string | {
1385
+ oneOf: [string, ...string[]];
1386
+ } | {
1387
+ startsWith: string;
1388
+ } | {
1389
+ jsonPatch: {
1390
+ paths: [string, ...string[]];
1391
+ };
1392
+ };
1393
+ names: [string, ...string[]];
1394
+ required: boolean;
1395
+ } | {
1396
+ type: "switch";
1397
+ names: [string, ...string[]];
1398
+ required: boolean;
1399
+ })[];
1400
+ positionals: (string | {
1401
+ oneOf: [string, ...string[]];
1402
+ } | {
1403
+ startsWith: string;
1404
+ } | {
1405
+ jsonPatch: {
1406
+ paths: [string, ...string[]];
1407
+ };
1408
+ })[];
1409
+ }, {
1410
+ positionals: (string | {
1411
+ oneOf: [string, ...string[]];
1412
+ } | {
1413
+ startsWith: string;
1414
+ } | {
1415
+ jsonPatch: {
1416
+ paths: [string, ...string[]];
1417
+ };
1418
+ })[];
1419
+ flags?: ({
1420
+ value: string | {
1421
+ oneOf: [string, ...string[]];
1422
+ } | {
1423
+ startsWith: string;
1424
+ } | {
1425
+ jsonPatch: {
1426
+ paths: [string, ...string[]];
1427
+ };
1428
+ };
1429
+ names: [string, ...string[]];
1430
+ required?: boolean | undefined;
1431
+ } | {
1432
+ type: "switch";
1433
+ names: [string, ...string[]];
1434
+ required?: boolean | undefined;
1435
+ })[] | undefined;
1436
+ }>]>, {
1437
+ subcommand: string;
1438
+ flags: ({
1439
+ value: string | {
1440
+ oneOf: [string, ...string[]];
1441
+ } | {
1442
+ startsWith: string;
1443
+ } | {
1444
+ jsonPatch: {
1445
+ paths: [string, ...string[]];
1446
+ };
1447
+ };
1448
+ names: [string, ...string[]];
1449
+ required: boolean;
1450
+ } | {
1451
+ type: "switch";
1452
+ names: [string, ...string[]];
1453
+ required: boolean;
1454
+ })[];
1455
+ target?: string | {
1456
+ oneOf: [string, ...string[]];
1457
+ } | undefined;
1458
+ assignments?: Record<string, string | {
1459
+ oneOf: [string, ...string[]];
1460
+ } | {
1461
+ startsWith: string;
1462
+ } | {
1463
+ jsonPatch: {
1464
+ paths: [string, ...string[]];
1465
+ };
1466
+ }> | undefined;
1467
+ } | {
1468
+ flags: ({
1469
+ value: string | {
1470
+ oneOf: [string, ...string[]];
1471
+ } | {
1472
+ startsWith: string;
1473
+ } | {
1474
+ jsonPatch: {
1475
+ paths: [string, ...string[]];
1476
+ };
1477
+ };
1478
+ names: [string, ...string[]];
1479
+ required: boolean;
1480
+ } | {
1481
+ type: "switch";
1482
+ names: [string, ...string[]];
1483
+ required: boolean;
1484
+ })[];
1485
+ positionals: (string | {
1486
+ oneOf: [string, ...string[]];
1487
+ } | {
1488
+ startsWith: string;
1489
+ } | {
1490
+ jsonPatch: {
1491
+ paths: [string, ...string[]];
1492
+ };
1493
+ })[];
1494
+ }, {
1495
+ subcommand: string;
1496
+ target?: string | {
1497
+ oneOf: [string, ...string[]];
1498
+ } | undefined;
1499
+ assignments?: Record<string, string | {
1500
+ oneOf: [string, ...string[]];
1501
+ } | {
1502
+ startsWith: string;
1503
+ } | {
1504
+ jsonPatch: {
1505
+ paths: [string, ...string[]];
1506
+ };
1507
+ }> | undefined;
1508
+ flags?: ({
1509
+ value: string | {
1510
+ oneOf: [string, ...string[]];
1511
+ } | {
1512
+ startsWith: string;
1513
+ } | {
1514
+ jsonPatch: {
1515
+ paths: [string, ...string[]];
1516
+ };
1517
+ };
1518
+ names: [string, ...string[]];
1519
+ required?: boolean | undefined;
1520
+ } | {
1521
+ type: "switch";
1522
+ names: [string, ...string[]];
1523
+ required?: boolean | undefined;
1524
+ })[] | undefined;
1525
+ } | {
1526
+ positionals: (string | {
1527
+ oneOf: [string, ...string[]];
1528
+ } | {
1529
+ startsWith: string;
1530
+ } | {
1531
+ jsonPatch: {
1532
+ paths: [string, ...string[]];
1533
+ };
1534
+ })[];
1535
+ flags?: ({
1536
+ value: string | {
1537
+ oneOf: [string, ...string[]];
1538
+ } | {
1539
+ startsWith: string;
1540
+ } | {
1541
+ jsonPatch: {
1542
+ paths: [string, ...string[]];
1543
+ };
1544
+ };
1545
+ names: [string, ...string[]];
1546
+ required?: boolean | undefined;
1547
+ } | {
1548
+ type: "switch";
1549
+ names: [string, ...string[]];
1550
+ required?: boolean | undefined;
1551
+ })[] | undefined;
1552
+ }>>;
1553
+ when: z.ZodOptional<z.ZodType<{
1554
+ subcommand: string;
1555
+ } | {
1556
+ option: [string, ...string[]];
1557
+ equals: string;
1558
+ } | {
1559
+ oneOf: [string, ...string[]];
1560
+ option: [string, ...string[]];
1561
+ } | {
1562
+ not: {
1563
+ subcommand: string;
1564
+ } | {
1565
+ option: [string, ...string[]];
1566
+ equals: string;
1567
+ } | {
1568
+ oneOf: [string, ...string[]];
1569
+ option: [string, ...string[]];
1570
+ } | /*elided*/ any | {
1571
+ anyOf: ({
1572
+ subcommand: string;
1573
+ } | {
1574
+ option: [string, ...string[]];
1575
+ equals: string;
1576
+ } | {
1577
+ oneOf: [string, ...string[]];
1578
+ option: [string, ...string[]];
1579
+ } | /*elided*/ any | /*elided*/ any | {
1580
+ allOf: ({
1581
+ subcommand: string;
1582
+ } | {
1583
+ option: [string, ...string[]];
1584
+ equals: string;
1585
+ } | {
1586
+ oneOf: [string, ...string[]];
1587
+ option: [string, ...string[]];
1588
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
1589
+ })[];
1590
+ } | {
1591
+ allOf: ({
1592
+ subcommand: string;
1593
+ } | {
1594
+ option: [string, ...string[]];
1595
+ equals: string;
1596
+ } | {
1597
+ oneOf: [string, ...string[]];
1598
+ option: [string, ...string[]];
1599
+ } | /*elided*/ any | {
1600
+ anyOf: ({
1601
+ subcommand: string;
1602
+ } | {
1603
+ option: [string, ...string[]];
1604
+ equals: string;
1605
+ } | {
1606
+ oneOf: [string, ...string[]];
1607
+ option: [string, ...string[]];
1608
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
1609
+ } | /*elided*/ any)[];
1610
+ };
1611
+ } | {
1612
+ anyOf: ({
1613
+ subcommand: string;
1614
+ } | {
1615
+ option: [string, ...string[]];
1616
+ equals: string;
1617
+ } | {
1618
+ oneOf: [string, ...string[]];
1619
+ option: [string, ...string[]];
1620
+ } | {
1621
+ not: {
1622
+ subcommand: string;
1623
+ } | {
1624
+ option: [string, ...string[]];
1625
+ equals: string;
1626
+ } | {
1627
+ oneOf: [string, ...string[]];
1628
+ option: [string, ...string[]];
1629
+ } | /*elided*/ any | /*elided*/ any | {
1630
+ allOf: ({
1631
+ subcommand: string;
1632
+ } | {
1633
+ option: [string, ...string[]];
1634
+ equals: string;
1635
+ } | {
1636
+ oneOf: [string, ...string[]];
1637
+ option: [string, ...string[]];
1638
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
1639
+ };
1640
+ } | /*elided*/ any | {
1641
+ allOf: ({
1642
+ subcommand: string;
1643
+ } | {
1644
+ option: [string, ...string[]];
1645
+ equals: string;
1646
+ } | {
1647
+ oneOf: [string, ...string[]];
1648
+ option: [string, ...string[]];
1649
+ } | {
1650
+ not: {
1651
+ subcommand: string;
1652
+ } | {
1653
+ option: [string, ...string[]];
1654
+ equals: string;
1655
+ } | {
1656
+ oneOf: [string, ...string[]];
1657
+ option: [string, ...string[]];
1658
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
1659
+ } | /*elided*/ any | /*elided*/ any)[];
1660
+ })[];
1661
+ } | {
1662
+ allOf: ({
1663
+ subcommand: string;
1664
+ } | {
1665
+ option: [string, ...string[]];
1666
+ equals: string;
1667
+ } | {
1668
+ oneOf: [string, ...string[]];
1669
+ option: [string, ...string[]];
1670
+ } | {
1671
+ not: {
1672
+ subcommand: string;
1673
+ } | {
1674
+ option: [string, ...string[]];
1675
+ equals: string;
1676
+ } | {
1677
+ oneOf: [string, ...string[]];
1678
+ option: [string, ...string[]];
1679
+ } | /*elided*/ any | {
1680
+ anyOf: ({
1681
+ subcommand: string;
1682
+ } | {
1683
+ option: [string, ...string[]];
1684
+ equals: string;
1685
+ } | {
1686
+ oneOf: [string, ...string[]];
1687
+ option: [string, ...string[]];
1688
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
1689
+ } | /*elided*/ any;
1690
+ } | {
1691
+ anyOf: ({
1692
+ subcommand: string;
1693
+ } | {
1694
+ option: [string, ...string[]];
1695
+ equals: string;
1696
+ } | {
1697
+ oneOf: [string, ...string[]];
1698
+ option: [string, ...string[]];
1699
+ } | {
1700
+ not: {
1701
+ subcommand: string;
1702
+ } | {
1703
+ option: [string, ...string[]];
1704
+ equals: string;
1705
+ } | {
1706
+ oneOf: [string, ...string[]];
1707
+ option: [string, ...string[]];
1708
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
1709
+ } | /*elided*/ any | /*elided*/ any)[];
1710
+ } | /*elided*/ any)[];
1711
+ }, z.ZodTypeDef, {
1712
+ subcommand: string;
1713
+ } | {
1714
+ option: [string, ...string[]];
1715
+ equals: string;
1716
+ } | {
1717
+ oneOf: [string, ...string[]];
1718
+ option: [string, ...string[]];
1719
+ } | {
1720
+ not: {
1721
+ subcommand: string;
1722
+ } | {
1723
+ option: [string, ...string[]];
1724
+ equals: string;
1725
+ } | {
1726
+ oneOf: [string, ...string[]];
1727
+ option: [string, ...string[]];
1728
+ } | /*elided*/ any | {
1729
+ anyOf: ({
1730
+ subcommand: string;
1731
+ } | {
1732
+ option: [string, ...string[]];
1733
+ equals: string;
1734
+ } | {
1735
+ oneOf: [string, ...string[]];
1736
+ option: [string, ...string[]];
1737
+ } | /*elided*/ any | /*elided*/ any | {
1738
+ allOf: ({
1739
+ subcommand: string;
1740
+ } | {
1741
+ option: [string, ...string[]];
1742
+ equals: string;
1743
+ } | {
1744
+ oneOf: [string, ...string[]];
1745
+ option: [string, ...string[]];
1746
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
1747
+ })[];
1748
+ } | {
1749
+ allOf: ({
1750
+ subcommand: string;
1751
+ } | {
1752
+ option: [string, ...string[]];
1753
+ equals: string;
1754
+ } | {
1755
+ oneOf: [string, ...string[]];
1756
+ option: [string, ...string[]];
1757
+ } | /*elided*/ any | {
1758
+ anyOf: ({
1759
+ subcommand: string;
1760
+ } | {
1761
+ option: [string, ...string[]];
1762
+ equals: string;
1763
+ } | {
1764
+ oneOf: [string, ...string[]];
1765
+ option: [string, ...string[]];
1766
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
1767
+ } | /*elided*/ any)[];
1768
+ };
1769
+ } | {
1770
+ anyOf: ({
1771
+ subcommand: string;
1772
+ } | {
1773
+ option: [string, ...string[]];
1774
+ equals: string;
1775
+ } | {
1776
+ oneOf: [string, ...string[]];
1777
+ option: [string, ...string[]];
1778
+ } | {
1779
+ not: {
1780
+ subcommand: string;
1781
+ } | {
1782
+ option: [string, ...string[]];
1783
+ equals: string;
1784
+ } | {
1785
+ oneOf: [string, ...string[]];
1786
+ option: [string, ...string[]];
1787
+ } | /*elided*/ any | /*elided*/ any | {
1788
+ allOf: ({
1789
+ subcommand: string;
1790
+ } | {
1791
+ option: [string, ...string[]];
1792
+ equals: string;
1793
+ } | {
1794
+ oneOf: [string, ...string[]];
1795
+ option: [string, ...string[]];
1796
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
1797
+ };
1798
+ } | /*elided*/ any | {
1799
+ allOf: ({
1800
+ subcommand: string;
1801
+ } | {
1802
+ option: [string, ...string[]];
1803
+ equals: string;
1804
+ } | {
1805
+ oneOf: [string, ...string[]];
1806
+ option: [string, ...string[]];
1807
+ } | {
1808
+ not: {
1809
+ subcommand: string;
1810
+ } | {
1811
+ option: [string, ...string[]];
1812
+ equals: string;
1813
+ } | {
1814
+ oneOf: [string, ...string[]];
1815
+ option: [string, ...string[]];
1816
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
1817
+ } | /*elided*/ any | /*elided*/ any)[];
1818
+ })[];
1819
+ } | {
1820
+ allOf: ({
1821
+ subcommand: string;
1822
+ } | {
1823
+ option: [string, ...string[]];
1824
+ equals: string;
1825
+ } | {
1826
+ oneOf: [string, ...string[]];
1827
+ option: [string, ...string[]];
1828
+ } | {
1829
+ not: {
1830
+ subcommand: string;
1831
+ } | {
1832
+ option: [string, ...string[]];
1833
+ equals: string;
1834
+ } | {
1835
+ oneOf: [string, ...string[]];
1836
+ option: [string, ...string[]];
1837
+ } | /*elided*/ any | {
1838
+ anyOf: ({
1839
+ subcommand: string;
1840
+ } | {
1841
+ option: [string, ...string[]];
1842
+ equals: string;
1843
+ } | {
1844
+ oneOf: [string, ...string[]];
1845
+ option: [string, ...string[]];
1846
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
1847
+ } | /*elided*/ any;
1848
+ } | {
1849
+ anyOf: ({
1850
+ subcommand: string;
1851
+ } | {
1852
+ option: [string, ...string[]];
1853
+ equals: string;
1854
+ } | {
1855
+ oneOf: [string, ...string[]];
1856
+ option: [string, ...string[]];
1857
+ } | {
1858
+ not: {
1859
+ subcommand: string;
1860
+ } | {
1861
+ option: [string, ...string[]];
1862
+ equals: string;
1863
+ } | {
1864
+ oneOf: [string, ...string[]];
1865
+ option: [string, ...string[]];
1866
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
1867
+ } | /*elided*/ any | /*elided*/ any)[];
1868
+ } | /*elided*/ any)[];
1869
+ }>>;
1870
+ action: z.ZodEnum<["allow", "deny", "confirm"]>;
1871
+ }, "strict", z.ZodTypeAny, {
1872
+ command: string;
1873
+ action: "allow" | "deny" | "confirm";
1874
+ when?: ({
1875
+ subcommand: string;
1876
+ } | {
1877
+ option: [string, ...string[]];
1878
+ equals: string;
1879
+ } | {
1880
+ oneOf: [string, ...string[]];
1881
+ option: [string, ...string[]];
1882
+ } | {
1883
+ not: {
1884
+ subcommand: string;
1885
+ } | {
1886
+ option: [string, ...string[]];
1887
+ equals: string;
1888
+ } | {
1889
+ oneOf: [string, ...string[]];
1890
+ option: [string, ...string[]];
1891
+ } | /*elided*/ any | {
1892
+ anyOf: ({
1893
+ subcommand: string;
1894
+ } | {
1895
+ option: [string, ...string[]];
1896
+ equals: string;
1897
+ } | {
1898
+ oneOf: [string, ...string[]];
1899
+ option: [string, ...string[]];
1900
+ } | /*elided*/ any | /*elided*/ any | {
1901
+ allOf: ({
1902
+ subcommand: string;
1903
+ } | {
1904
+ option: [string, ...string[]];
1905
+ equals: string;
1906
+ } | {
1907
+ oneOf: [string, ...string[]];
1908
+ option: [string, ...string[]];
1909
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
1910
+ })[];
1911
+ } | {
1912
+ allOf: ({
1913
+ subcommand: string;
1914
+ } | {
1915
+ option: [string, ...string[]];
1916
+ equals: string;
1917
+ } | {
1918
+ oneOf: [string, ...string[]];
1919
+ option: [string, ...string[]];
1920
+ } | /*elided*/ any | {
1921
+ anyOf: ({
1922
+ subcommand: string;
1923
+ } | {
1924
+ option: [string, ...string[]];
1925
+ equals: string;
1926
+ } | {
1927
+ oneOf: [string, ...string[]];
1928
+ option: [string, ...string[]];
1929
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
1930
+ } | /*elided*/ any)[];
1931
+ };
1932
+ } | {
1933
+ anyOf: ({
1934
+ subcommand: string;
1935
+ } | {
1936
+ option: [string, ...string[]];
1937
+ equals: string;
1938
+ } | {
1939
+ oneOf: [string, ...string[]];
1940
+ option: [string, ...string[]];
1941
+ } | {
1942
+ not: {
1943
+ subcommand: string;
1944
+ } | {
1945
+ option: [string, ...string[]];
1946
+ equals: string;
1947
+ } | {
1948
+ oneOf: [string, ...string[]];
1949
+ option: [string, ...string[]];
1950
+ } | /*elided*/ any | /*elided*/ any | {
1951
+ allOf: ({
1952
+ subcommand: string;
1953
+ } | {
1954
+ option: [string, ...string[]];
1955
+ equals: string;
1956
+ } | {
1957
+ oneOf: [string, ...string[]];
1958
+ option: [string, ...string[]];
1959
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
1960
+ };
1961
+ } | /*elided*/ any | {
1962
+ allOf: ({
1963
+ subcommand: string;
1964
+ } | {
1965
+ option: [string, ...string[]];
1966
+ equals: string;
1967
+ } | {
1968
+ oneOf: [string, ...string[]];
1969
+ option: [string, ...string[]];
1970
+ } | {
1971
+ not: {
1972
+ subcommand: string;
1973
+ } | {
1974
+ option: [string, ...string[]];
1975
+ equals: string;
1976
+ } | {
1977
+ oneOf: [string, ...string[]];
1978
+ option: [string, ...string[]];
1979
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
1980
+ } | /*elided*/ any | /*elided*/ any)[];
1981
+ })[];
1982
+ } | {
1983
+ allOf: ({
1984
+ subcommand: string;
1985
+ } | {
1986
+ option: [string, ...string[]];
1987
+ equals: string;
1988
+ } | {
1989
+ oneOf: [string, ...string[]];
1990
+ option: [string, ...string[]];
1991
+ } | {
1992
+ not: {
1993
+ subcommand: string;
1994
+ } | {
1995
+ option: [string, ...string[]];
1996
+ equals: string;
1997
+ } | {
1998
+ oneOf: [string, ...string[]];
1999
+ option: [string, ...string[]];
2000
+ } | /*elided*/ any | {
2001
+ anyOf: ({
2002
+ subcommand: string;
2003
+ } | {
2004
+ option: [string, ...string[]];
2005
+ equals: string;
2006
+ } | {
2007
+ oneOf: [string, ...string[]];
2008
+ option: [string, ...string[]];
2009
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2010
+ } | /*elided*/ any;
2011
+ } | {
2012
+ anyOf: ({
2013
+ subcommand: string;
2014
+ } | {
2015
+ option: [string, ...string[]];
2016
+ equals: string;
2017
+ } | {
2018
+ oneOf: [string, ...string[]];
2019
+ option: [string, ...string[]];
2020
+ } | {
2021
+ not: {
2022
+ subcommand: string;
2023
+ } | {
2024
+ option: [string, ...string[]];
2025
+ equals: string;
2026
+ } | {
2027
+ oneOf: [string, ...string[]];
2028
+ option: [string, ...string[]];
2029
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
2030
+ } | /*elided*/ any | /*elided*/ any)[];
2031
+ } | /*elided*/ any)[];
2032
+ }) | undefined;
2033
+ argv?: (string | {
2034
+ oneOf: [string, ...string[]];
2035
+ } | {
2036
+ startsWith: string;
2037
+ } | {
2038
+ jsonPatch: {
2039
+ paths: [string, ...string[]];
2040
+ };
2041
+ })[] | undefined;
2042
+ match?: {
2043
+ subcommand: string;
2044
+ flags: ({
2045
+ value: string | {
2046
+ oneOf: [string, ...string[]];
2047
+ } | {
2048
+ startsWith: string;
2049
+ } | {
2050
+ jsonPatch: {
2051
+ paths: [string, ...string[]];
2052
+ };
2053
+ };
2054
+ names: [string, ...string[]];
2055
+ required: boolean;
2056
+ } | {
2057
+ type: "switch";
2058
+ names: [string, ...string[]];
2059
+ required: boolean;
2060
+ })[];
2061
+ target?: string | {
2062
+ oneOf: [string, ...string[]];
2063
+ } | undefined;
2064
+ assignments?: Record<string, string | {
2065
+ oneOf: [string, ...string[]];
2066
+ } | {
2067
+ startsWith: string;
2068
+ } | {
2069
+ jsonPatch: {
2070
+ paths: [string, ...string[]];
2071
+ };
2072
+ }> | undefined;
2073
+ } | {
2074
+ flags: ({
2075
+ value: string | {
2076
+ oneOf: [string, ...string[]];
2077
+ } | {
2078
+ startsWith: string;
2079
+ } | {
2080
+ jsonPatch: {
2081
+ paths: [string, ...string[]];
2082
+ };
2083
+ };
2084
+ names: [string, ...string[]];
2085
+ required: boolean;
2086
+ } | {
2087
+ type: "switch";
2088
+ names: [string, ...string[]];
2089
+ required: boolean;
2090
+ })[];
2091
+ positionals: (string | {
2092
+ oneOf: [string, ...string[]];
2093
+ } | {
2094
+ startsWith: string;
2095
+ } | {
2096
+ jsonPatch: {
2097
+ paths: [string, ...string[]];
2098
+ };
2099
+ })[];
2100
+ } | undefined;
2101
+ }, {
2102
+ command: string;
2103
+ action: "allow" | "deny" | "confirm";
2104
+ when?: ({
2105
+ subcommand: string;
2106
+ } | {
2107
+ option: [string, ...string[]];
2108
+ equals: string;
2109
+ } | {
2110
+ oneOf: [string, ...string[]];
2111
+ option: [string, ...string[]];
2112
+ } | {
2113
+ not: {
2114
+ subcommand: string;
2115
+ } | {
2116
+ option: [string, ...string[]];
2117
+ equals: string;
2118
+ } | {
2119
+ oneOf: [string, ...string[]];
2120
+ option: [string, ...string[]];
2121
+ } | /*elided*/ any | {
2122
+ anyOf: ({
2123
+ subcommand: string;
2124
+ } | {
2125
+ option: [string, ...string[]];
2126
+ equals: string;
2127
+ } | {
2128
+ oneOf: [string, ...string[]];
2129
+ option: [string, ...string[]];
2130
+ } | /*elided*/ any | /*elided*/ any | {
2131
+ allOf: ({
2132
+ subcommand: string;
2133
+ } | {
2134
+ option: [string, ...string[]];
2135
+ equals: string;
2136
+ } | {
2137
+ oneOf: [string, ...string[]];
2138
+ option: [string, ...string[]];
2139
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2140
+ })[];
2141
+ } | {
2142
+ allOf: ({
2143
+ subcommand: string;
2144
+ } | {
2145
+ option: [string, ...string[]];
2146
+ equals: string;
2147
+ } | {
2148
+ oneOf: [string, ...string[]];
2149
+ option: [string, ...string[]];
2150
+ } | /*elided*/ any | {
2151
+ anyOf: ({
2152
+ subcommand: string;
2153
+ } | {
2154
+ option: [string, ...string[]];
2155
+ equals: string;
2156
+ } | {
2157
+ oneOf: [string, ...string[]];
2158
+ option: [string, ...string[]];
2159
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2160
+ } | /*elided*/ any)[];
2161
+ };
2162
+ } | {
2163
+ anyOf: ({
2164
+ subcommand: string;
2165
+ } | {
2166
+ option: [string, ...string[]];
2167
+ equals: string;
2168
+ } | {
2169
+ oneOf: [string, ...string[]];
2170
+ option: [string, ...string[]];
2171
+ } | {
2172
+ not: {
2173
+ subcommand: string;
2174
+ } | {
2175
+ option: [string, ...string[]];
2176
+ equals: string;
2177
+ } | {
2178
+ oneOf: [string, ...string[]];
2179
+ option: [string, ...string[]];
2180
+ } | /*elided*/ any | /*elided*/ any | {
2181
+ allOf: ({
2182
+ subcommand: string;
2183
+ } | {
2184
+ option: [string, ...string[]];
2185
+ equals: string;
2186
+ } | {
2187
+ oneOf: [string, ...string[]];
2188
+ option: [string, ...string[]];
2189
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2190
+ };
2191
+ } | /*elided*/ any | {
2192
+ allOf: ({
2193
+ subcommand: string;
2194
+ } | {
2195
+ option: [string, ...string[]];
2196
+ equals: string;
2197
+ } | {
2198
+ oneOf: [string, ...string[]];
2199
+ option: [string, ...string[]];
2200
+ } | {
2201
+ not: {
2202
+ subcommand: string;
2203
+ } | {
2204
+ option: [string, ...string[]];
2205
+ equals: string;
2206
+ } | {
2207
+ oneOf: [string, ...string[]];
2208
+ option: [string, ...string[]];
2209
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
2210
+ } | /*elided*/ any | /*elided*/ any)[];
2211
+ })[];
2212
+ } | {
2213
+ allOf: ({
2214
+ subcommand: string;
2215
+ } | {
2216
+ option: [string, ...string[]];
2217
+ equals: string;
2218
+ } | {
2219
+ oneOf: [string, ...string[]];
2220
+ option: [string, ...string[]];
2221
+ } | {
2222
+ not: {
2223
+ subcommand: string;
2224
+ } | {
2225
+ option: [string, ...string[]];
2226
+ equals: string;
2227
+ } | {
2228
+ oneOf: [string, ...string[]];
2229
+ option: [string, ...string[]];
2230
+ } | /*elided*/ any | {
2231
+ anyOf: ({
2232
+ subcommand: string;
2233
+ } | {
2234
+ option: [string, ...string[]];
2235
+ equals: string;
2236
+ } | {
2237
+ oneOf: [string, ...string[]];
2238
+ option: [string, ...string[]];
2239
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2240
+ } | /*elided*/ any;
2241
+ } | {
2242
+ anyOf: ({
2243
+ subcommand: string;
2244
+ } | {
2245
+ option: [string, ...string[]];
2246
+ equals: string;
2247
+ } | {
2248
+ oneOf: [string, ...string[]];
2249
+ option: [string, ...string[]];
2250
+ } | {
2251
+ not: {
2252
+ subcommand: string;
2253
+ } | {
2254
+ option: [string, ...string[]];
2255
+ equals: string;
2256
+ } | {
2257
+ oneOf: [string, ...string[]];
2258
+ option: [string, ...string[]];
2259
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
2260
+ } | /*elided*/ any | /*elided*/ any)[];
2261
+ } | /*elided*/ any)[];
2262
+ }) | undefined;
2263
+ argv?: (string | {
2264
+ oneOf: [string, ...string[]];
2265
+ } | {
2266
+ startsWith: string;
2267
+ } | {
2268
+ jsonPatch: {
2269
+ paths: [string, ...string[]];
2270
+ };
2271
+ })[] | undefined;
2272
+ match?: {
2273
+ subcommand: string;
2274
+ target?: string | {
2275
+ oneOf: [string, ...string[]];
2276
+ } | undefined;
2277
+ assignments?: Record<string, string | {
2278
+ oneOf: [string, ...string[]];
2279
+ } | {
2280
+ startsWith: string;
2281
+ } | {
2282
+ jsonPatch: {
2283
+ paths: [string, ...string[]];
2284
+ };
2285
+ }> | undefined;
2286
+ flags?: ({
2287
+ value: string | {
2288
+ oneOf: [string, ...string[]];
2289
+ } | {
2290
+ startsWith: string;
2291
+ } | {
2292
+ jsonPatch: {
2293
+ paths: [string, ...string[]];
2294
+ };
2295
+ };
2296
+ names: [string, ...string[]];
2297
+ required?: boolean | undefined;
2298
+ } | {
2299
+ type: "switch";
2300
+ names: [string, ...string[]];
2301
+ required?: boolean | undefined;
2302
+ })[] | undefined;
2303
+ } | {
2304
+ positionals: (string | {
2305
+ oneOf: [string, ...string[]];
2306
+ } | {
2307
+ startsWith: string;
2308
+ } | {
2309
+ jsonPatch: {
2310
+ paths: [string, ...string[]];
2311
+ };
2312
+ })[];
2313
+ flags?: ({
2314
+ value: string | {
2315
+ oneOf: [string, ...string[]];
2316
+ } | {
2317
+ startsWith: string;
2318
+ } | {
2319
+ jsonPatch: {
2320
+ paths: [string, ...string[]];
2321
+ };
2322
+ };
2323
+ names: [string, ...string[]];
2324
+ required?: boolean | undefined;
2325
+ } | {
2326
+ type: "switch";
2327
+ names: [string, ...string[]];
2328
+ required?: boolean | undefined;
2329
+ })[] | undefined;
2330
+ } | undefined;
2331
+ }>, {
2332
+ command: string;
2333
+ action: "allow" | "deny" | "confirm";
2334
+ when?: ({
2335
+ subcommand: string;
2336
+ } | {
2337
+ option: [string, ...string[]];
2338
+ equals: string;
2339
+ } | {
2340
+ oneOf: [string, ...string[]];
2341
+ option: [string, ...string[]];
2342
+ } | {
2343
+ not: {
2344
+ subcommand: string;
2345
+ } | {
2346
+ option: [string, ...string[]];
2347
+ equals: string;
2348
+ } | {
2349
+ oneOf: [string, ...string[]];
2350
+ option: [string, ...string[]];
2351
+ } | /*elided*/ any | {
2352
+ anyOf: ({
2353
+ subcommand: string;
2354
+ } | {
2355
+ option: [string, ...string[]];
2356
+ equals: string;
2357
+ } | {
2358
+ oneOf: [string, ...string[]];
2359
+ option: [string, ...string[]];
2360
+ } | /*elided*/ any | /*elided*/ any | {
2361
+ allOf: ({
2362
+ subcommand: string;
2363
+ } | {
2364
+ option: [string, ...string[]];
2365
+ equals: string;
2366
+ } | {
2367
+ oneOf: [string, ...string[]];
2368
+ option: [string, ...string[]];
2369
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2370
+ })[];
2371
+ } | {
2372
+ allOf: ({
2373
+ subcommand: string;
2374
+ } | {
2375
+ option: [string, ...string[]];
2376
+ equals: string;
2377
+ } | {
2378
+ oneOf: [string, ...string[]];
2379
+ option: [string, ...string[]];
2380
+ } | /*elided*/ any | {
2381
+ anyOf: ({
2382
+ subcommand: string;
2383
+ } | {
2384
+ option: [string, ...string[]];
2385
+ equals: string;
2386
+ } | {
2387
+ oneOf: [string, ...string[]];
2388
+ option: [string, ...string[]];
2389
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2390
+ } | /*elided*/ any)[];
2391
+ };
2392
+ } | {
2393
+ anyOf: ({
2394
+ subcommand: string;
2395
+ } | {
2396
+ option: [string, ...string[]];
2397
+ equals: string;
2398
+ } | {
2399
+ oneOf: [string, ...string[]];
2400
+ option: [string, ...string[]];
2401
+ } | {
2402
+ not: {
2403
+ subcommand: string;
2404
+ } | {
2405
+ option: [string, ...string[]];
2406
+ equals: string;
2407
+ } | {
2408
+ oneOf: [string, ...string[]];
2409
+ option: [string, ...string[]];
2410
+ } | /*elided*/ any | /*elided*/ any | {
2411
+ allOf: ({
2412
+ subcommand: string;
2413
+ } | {
2414
+ option: [string, ...string[]];
2415
+ equals: string;
2416
+ } | {
2417
+ oneOf: [string, ...string[]];
2418
+ option: [string, ...string[]];
2419
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2420
+ };
2421
+ } | /*elided*/ any | {
2422
+ allOf: ({
2423
+ subcommand: string;
2424
+ } | {
2425
+ option: [string, ...string[]];
2426
+ equals: string;
2427
+ } | {
2428
+ oneOf: [string, ...string[]];
2429
+ option: [string, ...string[]];
2430
+ } | {
2431
+ not: {
2432
+ subcommand: string;
2433
+ } | {
2434
+ option: [string, ...string[]];
2435
+ equals: string;
2436
+ } | {
2437
+ oneOf: [string, ...string[]];
2438
+ option: [string, ...string[]];
2439
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
2440
+ } | /*elided*/ any | /*elided*/ any)[];
2441
+ })[];
2442
+ } | {
2443
+ allOf: ({
2444
+ subcommand: string;
2445
+ } | {
2446
+ option: [string, ...string[]];
2447
+ equals: string;
2448
+ } | {
2449
+ oneOf: [string, ...string[]];
2450
+ option: [string, ...string[]];
2451
+ } | {
2452
+ not: {
2453
+ subcommand: string;
2454
+ } | {
2455
+ option: [string, ...string[]];
2456
+ equals: string;
2457
+ } | {
2458
+ oneOf: [string, ...string[]];
2459
+ option: [string, ...string[]];
2460
+ } | /*elided*/ any | {
2461
+ anyOf: ({
2462
+ subcommand: string;
2463
+ } | {
2464
+ option: [string, ...string[]];
2465
+ equals: string;
2466
+ } | {
2467
+ oneOf: [string, ...string[]];
2468
+ option: [string, ...string[]];
2469
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2470
+ } | /*elided*/ any;
2471
+ } | {
2472
+ anyOf: ({
2473
+ subcommand: string;
2474
+ } | {
2475
+ option: [string, ...string[]];
2476
+ equals: string;
2477
+ } | {
2478
+ oneOf: [string, ...string[]];
2479
+ option: [string, ...string[]];
2480
+ } | {
2481
+ not: {
2482
+ subcommand: string;
2483
+ } | {
2484
+ option: [string, ...string[]];
2485
+ equals: string;
2486
+ } | {
2487
+ oneOf: [string, ...string[]];
2488
+ option: [string, ...string[]];
2489
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
2490
+ } | /*elided*/ any | /*elided*/ any)[];
2491
+ } | /*elided*/ any)[];
2492
+ }) | undefined;
2493
+ argv?: (string | {
2494
+ oneOf: [string, ...string[]];
2495
+ } | {
2496
+ startsWith: string;
2497
+ } | {
2498
+ jsonPatch: {
2499
+ paths: [string, ...string[]];
2500
+ };
2501
+ })[] | undefined;
2502
+ match?: {
2503
+ subcommand: string;
2504
+ flags: ({
2505
+ value: string | {
2506
+ oneOf: [string, ...string[]];
2507
+ } | {
2508
+ startsWith: string;
2509
+ } | {
2510
+ jsonPatch: {
2511
+ paths: [string, ...string[]];
2512
+ };
2513
+ };
2514
+ names: [string, ...string[]];
2515
+ required: boolean;
2516
+ } | {
2517
+ type: "switch";
2518
+ names: [string, ...string[]];
2519
+ required: boolean;
2520
+ })[];
2521
+ target?: string | {
2522
+ oneOf: [string, ...string[]];
2523
+ } | undefined;
2524
+ assignments?: Record<string, string | {
2525
+ oneOf: [string, ...string[]];
2526
+ } | {
2527
+ startsWith: string;
2528
+ } | {
2529
+ jsonPatch: {
2530
+ paths: [string, ...string[]];
2531
+ };
2532
+ }> | undefined;
2533
+ } | {
2534
+ flags: ({
2535
+ value: string | {
2536
+ oneOf: [string, ...string[]];
2537
+ } | {
2538
+ startsWith: string;
2539
+ } | {
2540
+ jsonPatch: {
2541
+ paths: [string, ...string[]];
2542
+ };
2543
+ };
2544
+ names: [string, ...string[]];
2545
+ required: boolean;
2546
+ } | {
2547
+ type: "switch";
2548
+ names: [string, ...string[]];
2549
+ required: boolean;
2550
+ })[];
2551
+ positionals: (string | {
2552
+ oneOf: [string, ...string[]];
2553
+ } | {
2554
+ startsWith: string;
2555
+ } | {
2556
+ jsonPatch: {
2557
+ paths: [string, ...string[]];
2558
+ };
2559
+ })[];
2560
+ } | undefined;
2561
+ }, {
2562
+ command: string;
2563
+ action: "allow" | "deny" | "confirm";
2564
+ when?: ({
2565
+ subcommand: string;
2566
+ } | {
2567
+ option: [string, ...string[]];
2568
+ equals: string;
2569
+ } | {
2570
+ oneOf: [string, ...string[]];
2571
+ option: [string, ...string[]];
2572
+ } | {
2573
+ not: {
2574
+ subcommand: string;
2575
+ } | {
2576
+ option: [string, ...string[]];
2577
+ equals: string;
2578
+ } | {
2579
+ oneOf: [string, ...string[]];
2580
+ option: [string, ...string[]];
2581
+ } | /*elided*/ any | {
2582
+ anyOf: ({
2583
+ subcommand: string;
2584
+ } | {
2585
+ option: [string, ...string[]];
2586
+ equals: string;
2587
+ } | {
2588
+ oneOf: [string, ...string[]];
2589
+ option: [string, ...string[]];
2590
+ } | /*elided*/ any | /*elided*/ any | {
2591
+ allOf: ({
2592
+ subcommand: string;
2593
+ } | {
2594
+ option: [string, ...string[]];
2595
+ equals: string;
2596
+ } | {
2597
+ oneOf: [string, ...string[]];
2598
+ option: [string, ...string[]];
2599
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2600
+ })[];
2601
+ } | {
2602
+ allOf: ({
2603
+ subcommand: string;
2604
+ } | {
2605
+ option: [string, ...string[]];
2606
+ equals: string;
2607
+ } | {
2608
+ oneOf: [string, ...string[]];
2609
+ option: [string, ...string[]];
2610
+ } | /*elided*/ any | {
2611
+ anyOf: ({
2612
+ subcommand: string;
2613
+ } | {
2614
+ option: [string, ...string[]];
2615
+ equals: string;
2616
+ } | {
2617
+ oneOf: [string, ...string[]];
2618
+ option: [string, ...string[]];
2619
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2620
+ } | /*elided*/ any)[];
2621
+ };
2622
+ } | {
2623
+ anyOf: ({
2624
+ subcommand: string;
2625
+ } | {
2626
+ option: [string, ...string[]];
2627
+ equals: string;
2628
+ } | {
2629
+ oneOf: [string, ...string[]];
2630
+ option: [string, ...string[]];
2631
+ } | {
2632
+ not: {
2633
+ subcommand: string;
2634
+ } | {
2635
+ option: [string, ...string[]];
2636
+ equals: string;
2637
+ } | {
2638
+ oneOf: [string, ...string[]];
2639
+ option: [string, ...string[]];
2640
+ } | /*elided*/ any | /*elided*/ any | {
2641
+ allOf: ({
2642
+ subcommand: string;
2643
+ } | {
2644
+ option: [string, ...string[]];
2645
+ equals: string;
2646
+ } | {
2647
+ oneOf: [string, ...string[]];
2648
+ option: [string, ...string[]];
2649
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2650
+ };
2651
+ } | /*elided*/ any | {
2652
+ allOf: ({
2653
+ subcommand: string;
2654
+ } | {
2655
+ option: [string, ...string[]];
2656
+ equals: string;
2657
+ } | {
2658
+ oneOf: [string, ...string[]];
2659
+ option: [string, ...string[]];
2660
+ } | {
2661
+ not: {
2662
+ subcommand: string;
2663
+ } | {
2664
+ option: [string, ...string[]];
2665
+ equals: string;
2666
+ } | {
2667
+ oneOf: [string, ...string[]];
2668
+ option: [string, ...string[]];
2669
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
2670
+ } | /*elided*/ any | /*elided*/ any)[];
2671
+ })[];
2672
+ } | {
2673
+ allOf: ({
2674
+ subcommand: string;
2675
+ } | {
2676
+ option: [string, ...string[]];
2677
+ equals: string;
2678
+ } | {
2679
+ oneOf: [string, ...string[]];
2680
+ option: [string, ...string[]];
2681
+ } | {
2682
+ not: {
2683
+ subcommand: string;
2684
+ } | {
2685
+ option: [string, ...string[]];
2686
+ equals: string;
2687
+ } | {
2688
+ oneOf: [string, ...string[]];
2689
+ option: [string, ...string[]];
2690
+ } | /*elided*/ any | {
2691
+ anyOf: ({
2692
+ subcommand: string;
2693
+ } | {
2694
+ option: [string, ...string[]];
2695
+ equals: string;
2696
+ } | {
2697
+ oneOf: [string, ...string[]];
2698
+ option: [string, ...string[]];
2699
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2700
+ } | /*elided*/ any;
2701
+ } | {
2702
+ anyOf: ({
2703
+ subcommand: string;
2704
+ } | {
2705
+ option: [string, ...string[]];
2706
+ equals: string;
2707
+ } | {
2708
+ oneOf: [string, ...string[]];
2709
+ option: [string, ...string[]];
2710
+ } | {
2711
+ not: {
2712
+ subcommand: string;
2713
+ } | {
2714
+ option: [string, ...string[]];
2715
+ equals: string;
2716
+ } | {
2717
+ oneOf: [string, ...string[]];
2718
+ option: [string, ...string[]];
2719
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
2720
+ } | /*elided*/ any | /*elided*/ any)[];
2721
+ } | /*elided*/ any)[];
2722
+ }) | undefined;
2723
+ argv?: (string | {
2724
+ oneOf: [string, ...string[]];
2725
+ } | {
2726
+ startsWith: string;
2727
+ } | {
2728
+ jsonPatch: {
2729
+ paths: [string, ...string[]];
2730
+ };
2731
+ })[] | undefined;
2732
+ match?: {
2733
+ subcommand: string;
2734
+ target?: string | {
2735
+ oneOf: [string, ...string[]];
2736
+ } | undefined;
2737
+ assignments?: Record<string, string | {
2738
+ oneOf: [string, ...string[]];
2739
+ } | {
2740
+ startsWith: string;
2741
+ } | {
2742
+ jsonPatch: {
2743
+ paths: [string, ...string[]];
2744
+ };
2745
+ }> | undefined;
2746
+ flags?: ({
2747
+ value: string | {
2748
+ oneOf: [string, ...string[]];
2749
+ } | {
2750
+ startsWith: string;
2751
+ } | {
2752
+ jsonPatch: {
2753
+ paths: [string, ...string[]];
2754
+ };
2755
+ };
2756
+ names: [string, ...string[]];
2757
+ required?: boolean | undefined;
2758
+ } | {
2759
+ type: "switch";
2760
+ names: [string, ...string[]];
2761
+ required?: boolean | undefined;
2762
+ })[] | undefined;
2763
+ } | {
2764
+ positionals: (string | {
2765
+ oneOf: [string, ...string[]];
2766
+ } | {
2767
+ startsWith: string;
2768
+ } | {
2769
+ jsonPatch: {
2770
+ paths: [string, ...string[]];
2771
+ };
2772
+ })[];
2773
+ flags?: ({
2774
+ value: string | {
2775
+ oneOf: [string, ...string[]];
2776
+ } | {
2777
+ startsWith: string;
2778
+ } | {
2779
+ jsonPatch: {
2780
+ paths: [string, ...string[]];
2781
+ };
2782
+ };
2783
+ names: [string, ...string[]];
2784
+ required?: boolean | undefined;
2785
+ } | {
2786
+ type: "switch";
2787
+ names: [string, ...string[]];
2788
+ required?: boolean | undefined;
2789
+ })[] | undefined;
2790
+ } | undefined;
2791
+ }>, "many">>;
2792
+ stdin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2793
+ }, "strict", z.ZodTypeAny, {
2794
+ default: "allow" | "deny" | "confirm";
2795
+ rules: {
2796
+ command: string;
2797
+ action: "allow" | "deny" | "confirm";
2798
+ when?: ({
2799
+ subcommand: string;
2800
+ } | {
2801
+ option: [string, ...string[]];
2802
+ equals: string;
2803
+ } | {
2804
+ oneOf: [string, ...string[]];
2805
+ option: [string, ...string[]];
2806
+ } | {
2807
+ not: {
2808
+ subcommand: string;
2809
+ } | {
2810
+ option: [string, ...string[]];
2811
+ equals: string;
2812
+ } | {
2813
+ oneOf: [string, ...string[]];
2814
+ option: [string, ...string[]];
2815
+ } | /*elided*/ any | {
2816
+ anyOf: ({
2817
+ subcommand: string;
2818
+ } | {
2819
+ option: [string, ...string[]];
2820
+ equals: string;
2821
+ } | {
2822
+ oneOf: [string, ...string[]];
2823
+ option: [string, ...string[]];
2824
+ } | /*elided*/ any | /*elided*/ any | {
2825
+ allOf: ({
2826
+ subcommand: string;
2827
+ } | {
2828
+ option: [string, ...string[]];
2829
+ equals: string;
2830
+ } | {
2831
+ oneOf: [string, ...string[]];
2832
+ option: [string, ...string[]];
2833
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2834
+ })[];
2835
+ } | {
2836
+ allOf: ({
2837
+ subcommand: string;
2838
+ } | {
2839
+ option: [string, ...string[]];
2840
+ equals: string;
2841
+ } | {
2842
+ oneOf: [string, ...string[]];
2843
+ option: [string, ...string[]];
2844
+ } | /*elided*/ any | {
2845
+ anyOf: ({
2846
+ subcommand: string;
2847
+ } | {
2848
+ option: [string, ...string[]];
2849
+ equals: string;
2850
+ } | {
2851
+ oneOf: [string, ...string[]];
2852
+ option: [string, ...string[]];
2853
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2854
+ } | /*elided*/ any)[];
2855
+ };
2856
+ } | {
2857
+ anyOf: ({
2858
+ subcommand: string;
2859
+ } | {
2860
+ option: [string, ...string[]];
2861
+ equals: string;
2862
+ } | {
2863
+ oneOf: [string, ...string[]];
2864
+ option: [string, ...string[]];
2865
+ } | {
2866
+ not: {
2867
+ subcommand: string;
2868
+ } | {
2869
+ option: [string, ...string[]];
2870
+ equals: string;
2871
+ } | {
2872
+ oneOf: [string, ...string[]];
2873
+ option: [string, ...string[]];
2874
+ } | /*elided*/ any | /*elided*/ any | {
2875
+ allOf: ({
2876
+ subcommand: string;
2877
+ } | {
2878
+ option: [string, ...string[]];
2879
+ equals: string;
2880
+ } | {
2881
+ oneOf: [string, ...string[]];
2882
+ option: [string, ...string[]];
2883
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2884
+ };
2885
+ } | /*elided*/ any | {
2886
+ allOf: ({
2887
+ subcommand: string;
2888
+ } | {
2889
+ option: [string, ...string[]];
2890
+ equals: string;
2891
+ } | {
2892
+ oneOf: [string, ...string[]];
2893
+ option: [string, ...string[]];
2894
+ } | {
2895
+ not: {
2896
+ subcommand: string;
2897
+ } | {
2898
+ option: [string, ...string[]];
2899
+ equals: string;
2900
+ } | {
2901
+ oneOf: [string, ...string[]];
2902
+ option: [string, ...string[]];
2903
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
2904
+ } | /*elided*/ any | /*elided*/ any)[];
2905
+ })[];
2906
+ } | {
2907
+ allOf: ({
2908
+ subcommand: string;
2909
+ } | {
2910
+ option: [string, ...string[]];
2911
+ equals: string;
2912
+ } | {
2913
+ oneOf: [string, ...string[]];
2914
+ option: [string, ...string[]];
2915
+ } | {
2916
+ not: {
2917
+ subcommand: string;
2918
+ } | {
2919
+ option: [string, ...string[]];
2920
+ equals: string;
2921
+ } | {
2922
+ oneOf: [string, ...string[]];
2923
+ option: [string, ...string[]];
2924
+ } | /*elided*/ any | {
2925
+ anyOf: ({
2926
+ subcommand: string;
2927
+ } | {
2928
+ option: [string, ...string[]];
2929
+ equals: string;
2930
+ } | {
2931
+ oneOf: [string, ...string[]];
2932
+ option: [string, ...string[]];
2933
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
2934
+ } | /*elided*/ any;
2935
+ } | {
2936
+ anyOf: ({
2937
+ subcommand: string;
2938
+ } | {
2939
+ option: [string, ...string[]];
2940
+ equals: string;
2941
+ } | {
2942
+ oneOf: [string, ...string[]];
2943
+ option: [string, ...string[]];
2944
+ } | {
2945
+ not: {
2946
+ subcommand: string;
2947
+ } | {
2948
+ option: [string, ...string[]];
2949
+ equals: string;
2950
+ } | {
2951
+ oneOf: [string, ...string[]];
2952
+ option: [string, ...string[]];
2953
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
2954
+ } | /*elided*/ any | /*elided*/ any)[];
2955
+ } | /*elided*/ any)[];
2956
+ }) | undefined;
2957
+ argv?: (string | {
2958
+ oneOf: [string, ...string[]];
2959
+ } | {
2960
+ startsWith: string;
2961
+ } | {
2962
+ jsonPatch: {
2963
+ paths: [string, ...string[]];
2964
+ };
2965
+ })[] | undefined;
2966
+ match?: {
2967
+ subcommand: string;
2968
+ flags: ({
2969
+ value: string | {
2970
+ oneOf: [string, ...string[]];
2971
+ } | {
2972
+ startsWith: string;
2973
+ } | {
2974
+ jsonPatch: {
2975
+ paths: [string, ...string[]];
2976
+ };
2977
+ };
2978
+ names: [string, ...string[]];
2979
+ required: boolean;
2980
+ } | {
2981
+ type: "switch";
2982
+ names: [string, ...string[]];
2983
+ required: boolean;
2984
+ })[];
2985
+ target?: string | {
2986
+ oneOf: [string, ...string[]];
2987
+ } | undefined;
2988
+ assignments?: Record<string, string | {
2989
+ oneOf: [string, ...string[]];
2990
+ } | {
2991
+ startsWith: string;
2992
+ } | {
2993
+ jsonPatch: {
2994
+ paths: [string, ...string[]];
2995
+ };
2996
+ }> | undefined;
2997
+ } | {
2998
+ flags: ({
2999
+ value: string | {
3000
+ oneOf: [string, ...string[]];
3001
+ } | {
3002
+ startsWith: string;
3003
+ } | {
3004
+ jsonPatch: {
3005
+ paths: [string, ...string[]];
3006
+ };
3007
+ };
3008
+ names: [string, ...string[]];
3009
+ required: boolean;
3010
+ } | {
3011
+ type: "switch";
3012
+ names: [string, ...string[]];
3013
+ required: boolean;
3014
+ })[];
3015
+ positionals: (string | {
3016
+ oneOf: [string, ...string[]];
3017
+ } | {
3018
+ startsWith: string;
3019
+ } | {
3020
+ jsonPatch: {
3021
+ paths: [string, ...string[]];
3022
+ };
3023
+ })[];
3024
+ } | undefined;
3025
+ }[];
3026
+ "external-commands"?: string[] | undefined;
3027
+ "command-defaults"?: Record<string, "allow" | "deny" | "confirm"> | undefined;
3028
+ guards?: {
3029
+ command: string;
3030
+ require: {
3031
+ option: [string, ...string[]];
3032
+ equals: string;
3033
+ };
3034
+ subcommand?: string | undefined;
3035
+ }[] | undefined;
3036
+ stdin?: Record<string, string> | undefined;
3037
+ }, {
3038
+ default?: "allow" | "deny" | "confirm" | undefined;
3039
+ rules?: {
3040
+ command: string;
3041
+ action: "allow" | "deny" | "confirm";
3042
+ when?: ({
3043
+ subcommand: string;
3044
+ } | {
3045
+ option: [string, ...string[]];
3046
+ equals: string;
3047
+ } | {
3048
+ oneOf: [string, ...string[]];
3049
+ option: [string, ...string[]];
3050
+ } | {
3051
+ not: {
3052
+ subcommand: string;
3053
+ } | {
3054
+ option: [string, ...string[]];
3055
+ equals: string;
3056
+ } | {
3057
+ oneOf: [string, ...string[]];
3058
+ option: [string, ...string[]];
3059
+ } | /*elided*/ any | {
3060
+ anyOf: ({
3061
+ subcommand: string;
3062
+ } | {
3063
+ option: [string, ...string[]];
3064
+ equals: string;
3065
+ } | {
3066
+ oneOf: [string, ...string[]];
3067
+ option: [string, ...string[]];
3068
+ } | /*elided*/ any | /*elided*/ any | {
3069
+ allOf: ({
3070
+ subcommand: string;
3071
+ } | {
3072
+ option: [string, ...string[]];
3073
+ equals: string;
3074
+ } | {
3075
+ oneOf: [string, ...string[]];
3076
+ option: [string, ...string[]];
3077
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
3078
+ })[];
3079
+ } | {
3080
+ allOf: ({
3081
+ subcommand: string;
3082
+ } | {
3083
+ option: [string, ...string[]];
3084
+ equals: string;
3085
+ } | {
3086
+ oneOf: [string, ...string[]];
3087
+ option: [string, ...string[]];
3088
+ } | /*elided*/ any | {
3089
+ anyOf: ({
3090
+ subcommand: string;
3091
+ } | {
3092
+ option: [string, ...string[]];
3093
+ equals: string;
3094
+ } | {
3095
+ oneOf: [string, ...string[]];
3096
+ option: [string, ...string[]];
3097
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
3098
+ } | /*elided*/ any)[];
3099
+ };
3100
+ } | {
3101
+ anyOf: ({
3102
+ subcommand: string;
3103
+ } | {
3104
+ option: [string, ...string[]];
3105
+ equals: string;
3106
+ } | {
3107
+ oneOf: [string, ...string[]];
3108
+ option: [string, ...string[]];
3109
+ } | {
3110
+ not: {
3111
+ subcommand: string;
3112
+ } | {
3113
+ option: [string, ...string[]];
3114
+ equals: string;
3115
+ } | {
3116
+ oneOf: [string, ...string[]];
3117
+ option: [string, ...string[]];
3118
+ } | /*elided*/ any | /*elided*/ any | {
3119
+ allOf: ({
3120
+ subcommand: string;
3121
+ } | {
3122
+ option: [string, ...string[]];
3123
+ equals: string;
3124
+ } | {
3125
+ oneOf: [string, ...string[]];
3126
+ option: [string, ...string[]];
3127
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
3128
+ };
3129
+ } | /*elided*/ any | {
3130
+ allOf: ({
3131
+ subcommand: string;
3132
+ } | {
3133
+ option: [string, ...string[]];
3134
+ equals: string;
3135
+ } | {
3136
+ oneOf: [string, ...string[]];
3137
+ option: [string, ...string[]];
3138
+ } | {
3139
+ not: {
3140
+ subcommand: string;
3141
+ } | {
3142
+ option: [string, ...string[]];
3143
+ equals: string;
3144
+ } | {
3145
+ oneOf: [string, ...string[]];
3146
+ option: [string, ...string[]];
3147
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
3148
+ } | /*elided*/ any | /*elided*/ any)[];
3149
+ })[];
3150
+ } | {
3151
+ allOf: ({
3152
+ subcommand: string;
3153
+ } | {
3154
+ option: [string, ...string[]];
3155
+ equals: string;
3156
+ } | {
3157
+ oneOf: [string, ...string[]];
3158
+ option: [string, ...string[]];
3159
+ } | {
3160
+ not: {
3161
+ subcommand: string;
3162
+ } | {
3163
+ option: [string, ...string[]];
3164
+ equals: string;
3165
+ } | {
3166
+ oneOf: [string, ...string[]];
3167
+ option: [string, ...string[]];
3168
+ } | /*elided*/ any | {
3169
+ anyOf: ({
3170
+ subcommand: string;
3171
+ } | {
3172
+ option: [string, ...string[]];
3173
+ equals: string;
3174
+ } | {
3175
+ oneOf: [string, ...string[]];
3176
+ option: [string, ...string[]];
3177
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
3178
+ } | /*elided*/ any;
3179
+ } | {
3180
+ anyOf: ({
3181
+ subcommand: string;
3182
+ } | {
3183
+ option: [string, ...string[]];
3184
+ equals: string;
3185
+ } | {
3186
+ oneOf: [string, ...string[]];
3187
+ option: [string, ...string[]];
3188
+ } | {
3189
+ not: {
3190
+ subcommand: string;
3191
+ } | {
3192
+ option: [string, ...string[]];
3193
+ equals: string;
3194
+ } | {
3195
+ oneOf: [string, ...string[]];
3196
+ option: [string, ...string[]];
3197
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
3198
+ } | /*elided*/ any | /*elided*/ any)[];
3199
+ } | /*elided*/ any)[];
3200
+ }) | undefined;
3201
+ argv?: (string | {
3202
+ oneOf: [string, ...string[]];
3203
+ } | {
3204
+ startsWith: string;
3205
+ } | {
3206
+ jsonPatch: {
3207
+ paths: [string, ...string[]];
3208
+ };
3209
+ })[] | undefined;
3210
+ match?: {
3211
+ subcommand: string;
3212
+ target?: string | {
3213
+ oneOf: [string, ...string[]];
3214
+ } | undefined;
3215
+ assignments?: Record<string, string | {
3216
+ oneOf: [string, ...string[]];
3217
+ } | {
3218
+ startsWith: string;
3219
+ } | {
3220
+ jsonPatch: {
3221
+ paths: [string, ...string[]];
3222
+ };
3223
+ }> | undefined;
3224
+ flags?: ({
3225
+ value: string | {
3226
+ oneOf: [string, ...string[]];
3227
+ } | {
3228
+ startsWith: string;
3229
+ } | {
3230
+ jsonPatch: {
3231
+ paths: [string, ...string[]];
3232
+ };
3233
+ };
3234
+ names: [string, ...string[]];
3235
+ required?: boolean | undefined;
3236
+ } | {
3237
+ type: "switch";
3238
+ names: [string, ...string[]];
3239
+ required?: boolean | undefined;
3240
+ })[] | undefined;
3241
+ } | {
3242
+ positionals: (string | {
3243
+ oneOf: [string, ...string[]];
3244
+ } | {
3245
+ startsWith: string;
3246
+ } | {
3247
+ jsonPatch: {
3248
+ paths: [string, ...string[]];
3249
+ };
3250
+ })[];
3251
+ flags?: ({
3252
+ value: string | {
3253
+ oneOf: [string, ...string[]];
3254
+ } | {
3255
+ startsWith: string;
3256
+ } | {
3257
+ jsonPatch: {
3258
+ paths: [string, ...string[]];
3259
+ };
3260
+ };
3261
+ names: [string, ...string[]];
3262
+ required?: boolean | undefined;
3263
+ } | {
3264
+ type: "switch";
3265
+ names: [string, ...string[]];
3266
+ required?: boolean | undefined;
3267
+ })[] | undefined;
3268
+ } | undefined;
3269
+ }[] | undefined;
3270
+ "external-commands"?: string[] | undefined;
3271
+ "command-defaults"?: Record<string, "allow" | "deny" | "confirm"> | undefined;
3272
+ guards?: {
3273
+ command: string;
3274
+ require: {
3275
+ option: [string, ...string[]];
3276
+ equals: string;
3277
+ };
3278
+ subcommand?: string | undefined;
3279
+ }[] | undefined;
3280
+ stdin?: Record<string, string> | undefined;
3281
+ }>>;
3282
+ "allow-unpublished-tools": z.ZodOptional<z.ZodBoolean>;
3283
+ "call-policy": z.ZodOptional<z.ZodObject<{
3284
+ scope: z.ZodOptional<z.ZodEnum<["all", "toolring_call"]>>;
3285
+ default: z.ZodDefault<z.ZodEnum<["allow", "deny", "confirm"]>>;
3286
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
3287
+ connection: z.ZodOptional<z.ZodString>;
3288
+ } & {
3289
+ call: z.ZodUnion<[z.ZodString, z.ZodString]>;
3290
+ action: z.ZodEnum<["allow", "deny", "confirm"]>;
3291
+ "allowed-args": z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3292
+ when: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnknown>>;
3293
+ }, "strict", z.ZodTypeAny, {
3294
+ call: string;
3295
+ action: "allow" | "deny" | "confirm";
3296
+ connection?: string | undefined;
3297
+ when?: Record<string, unknown> | undefined;
3298
+ "allowed-args"?: string[] | undefined;
3299
+ }, {
3300
+ call: string;
3301
+ action: "allow" | "deny" | "confirm";
3302
+ connection?: string | undefined;
3303
+ when?: Record<string, unknown> | undefined;
3304
+ "allowed-args"?: string[] | undefined;
3305
+ }>, "many">>;
3306
+ }, "strict", z.ZodTypeAny, {
3307
+ default: "allow" | "deny" | "confirm";
3308
+ rules: {
3309
+ call: string;
3310
+ action: "allow" | "deny" | "confirm";
3311
+ connection?: string | undefined;
3312
+ when?: Record<string, unknown> | undefined;
3313
+ "allowed-args"?: string[] | undefined;
3314
+ }[];
3315
+ scope?: "all" | "toolring_call" | undefined;
3316
+ }, {
3317
+ default?: "allow" | "deny" | "confirm" | undefined;
3318
+ rules?: {
3319
+ call: string;
3320
+ action: "allow" | "deny" | "confirm";
3321
+ connection?: string | undefined;
3322
+ when?: Record<string, unknown> | undefined;
3323
+ "allowed-args"?: string[] | undefined;
3324
+ }[] | undefined;
3325
+ scope?: "all" | "toolring_call" | undefined;
3326
+ }>>;
3327
+ /** Tool namespace prefix, e.g. "ffmpeg" → tools named "ffmpeg_probe". */
3328
+ prefix: z.ZodOptional<z.ZodString>;
3329
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3330
+ modules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
3331
+ "enabled-modules": z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3332
+ connections: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3333
+ module: z.ZodString;
3334
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3335
+ module: z.ZodString;
3336
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3337
+ module: z.ZodString;
3338
+ }, z.ZodTypeAny, "passthrough">>>>;
3339
+ tools: z.ZodArray<z.ZodUnion<[z.ZodObject<{
3340
+ /** Name of the MCP tool (also used in error messages). */
3341
+ name: z.ZodString;
3342
+ /** One-sentence description the agent reads. */
3343
+ description: z.ZodString;
3344
+ } & {
3345
+ handler: z.ZodOptional<z.ZodNever>;
3346
+ call: z.ZodOptional<z.ZodNever>;
3347
+ connection: z.ZodOptional<z.ZodNever>;
3348
+ steps: z.ZodOptional<z.ZodNever>;
3349
+ /** Executable to run, e.g. "ffmpeg". Resolved against PATH. */
3350
+ command: z.ZodString;
3351
+ "command-policy": z.ZodOptional<z.ZodObject<{
3352
+ default: z.ZodDefault<z.ZodEnum<["allow", "deny", "confirm"]>>;
3353
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
3354
+ when: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>, Record<string, string | number | boolean>, Record<string, string | number | boolean>>;
3355
+ action: z.ZodEnum<["allow", "deny", "confirm"]>;
3356
+ }, "strict", z.ZodTypeAny, {
3357
+ when: Record<string, string | number | boolean>;
3358
+ action: "allow" | "deny" | "confirm";
3359
+ }, {
3360
+ when: Record<string, string | number | boolean>;
3361
+ action: "allow" | "deny" | "confirm";
3362
+ }>, "many">>;
3363
+ }, "strict", z.ZodTypeAny, {
3364
+ default: "allow" | "deny" | "confirm";
3365
+ rules: {
3366
+ when: Record<string, string | number | boolean>;
3367
+ action: "allow" | "deny" | "confirm";
3368
+ }[];
3369
+ }, {
3370
+ default?: "allow" | "deny" | "confirm" | undefined;
3371
+ rules?: {
3372
+ when: Record<string, string | number | boolean>;
3373
+ action: "allow" | "deny" | "confirm";
3374
+ }[] | undefined;
3375
+ }>>;
3376
+ /** Literal argv tokens placed before every parameter, e.g. ["-i"]. */
3377
+ args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3378
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
3379
+ /** Parameter name shown to the agent. */
3380
+ name: z.ZodString;
3381
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3382
+ /** Human description — the agent reads this to decide how to use it. */
3383
+ description: z.ZodOptional<z.ZodString>;
3384
+ type: z.ZodDefault<z.ZodEnum<["string", "number", "boolean"]>>;
3385
+ required: z.ZodDefault<z.ZodBoolean>;
3386
+ /** For string params: allow-list of accepted values (rendered as an enum). */
3387
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3388
+ /** Default value used when the agent omits the param. */
3389
+ default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
3390
+ } & {
3391
+ /** CLI flag the value will be attached to, e.g. "--format". Omit for positional. */
3392
+ flag: z.ZodOptional<z.ZodString>;
3393
+ /** For string params: attach value with "=" instead of a separate argv token. */
3394
+ equalsForm: z.ZodDefault<z.ZodBoolean>;
3395
+ /** Only meaningful for boolean: emit this literal token when true (e.g. "--verbose"). */
3396
+ trueFlag: z.ZodOptional<z.ZodString>;
3397
+ /**
3398
+ * Where the flag tokens go in argv:
3399
+ * - "global": right after the executable, before spec.args (e.g. git -C <path> log)
3400
+ * - "local" (default): after spec.args (the common case)
3401
+ */
3402
+ placement: z.ZodDefault<z.ZodEnum<["global", "local"]>>;
3403
+ /** For string params: when set, the value is passed as a single positional arg. */
3404
+ positional: z.ZodDefault<z.ZodBoolean>;
3405
+ }, "strip", z.ZodTypeAny, {
3406
+ type: "string" | "number" | "boolean";
3407
+ required: boolean;
3408
+ name: string;
3409
+ equalsForm: boolean;
3410
+ placement: "global" | "local";
3411
+ positional: boolean;
3412
+ flag?: string | undefined;
3413
+ description?: string | undefined;
3414
+ default?: string | number | boolean | undefined;
3415
+ aliases?: string[] | undefined;
3416
+ enum?: string[] | undefined;
3417
+ trueFlag?: string | undefined;
3418
+ }, {
3419
+ name: string;
3420
+ type?: "string" | "number" | "boolean" | undefined;
3421
+ required?: boolean | undefined;
3422
+ flag?: string | undefined;
3423
+ description?: string | undefined;
3424
+ default?: string | number | boolean | undefined;
3425
+ aliases?: string[] | undefined;
3426
+ enum?: string[] | undefined;
3427
+ equalsForm?: boolean | undefined;
3428
+ trueFlag?: string | undefined;
3429
+ placement?: "global" | "local" | undefined;
3430
+ positional?: boolean | undefined;
3431
+ }>, "many">>;
3432
+ /** Working directory for the command. */
3433
+ cwd: z.ZodOptional<z.ZodString>;
3434
+ /** Kill the process after this many milliseconds. Default 30_000. */
3435
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
3436
+ /** When true, stdout is expected to be JSON and is returned as a structured result. */
3437
+ jsonOutput: z.ZodDefault<z.ZodBoolean>;
3438
+ /** When true, also return stderr in the tool result. Default false. */
3439
+ includeStderr: z.ZodDefault<z.ZodBoolean>;
3440
+ }, "strip", z.ZodTypeAny, {
3441
+ params: {
3442
+ type: "string" | "number" | "boolean";
3443
+ required: boolean;
3444
+ name: string;
3445
+ equalsForm: boolean;
3446
+ placement: "global" | "local";
3447
+ positional: boolean;
3448
+ flag?: string | undefined;
3449
+ description?: string | undefined;
3450
+ default?: string | number | boolean | undefined;
3451
+ aliases?: string[] | undefined;
3452
+ enum?: string[] | undefined;
3453
+ trueFlag?: string | undefined;
3454
+ }[];
3455
+ name: string;
3456
+ description: string;
3457
+ command: string;
3458
+ args: string[];
3459
+ timeoutMs: number;
3460
+ jsonOutput: boolean;
3461
+ includeStderr: boolean;
3462
+ handler?: undefined;
3463
+ call?: undefined;
3464
+ connection?: undefined;
3465
+ steps?: undefined;
3466
+ "command-policy"?: {
3467
+ default: "allow" | "deny" | "confirm";
3468
+ rules: {
3469
+ when: Record<string, string | number | boolean>;
3470
+ action: "allow" | "deny" | "confirm";
3471
+ }[];
3472
+ } | undefined;
3473
+ cwd?: string | undefined;
3474
+ }, {
3475
+ name: string;
3476
+ description: string;
3477
+ command: string;
3478
+ params?: {
3479
+ name: string;
3480
+ type?: "string" | "number" | "boolean" | undefined;
3481
+ required?: boolean | undefined;
3482
+ flag?: string | undefined;
3483
+ description?: string | undefined;
3484
+ default?: string | number | boolean | undefined;
3485
+ aliases?: string[] | undefined;
3486
+ enum?: string[] | undefined;
3487
+ equalsForm?: boolean | undefined;
3488
+ trueFlag?: string | undefined;
3489
+ placement?: "global" | "local" | undefined;
3490
+ positional?: boolean | undefined;
3491
+ }[] | undefined;
3492
+ handler?: undefined;
3493
+ call?: undefined;
3494
+ connection?: undefined;
3495
+ steps?: undefined;
3496
+ "command-policy"?: {
3497
+ default?: "allow" | "deny" | "confirm" | undefined;
3498
+ rules?: {
3499
+ when: Record<string, string | number | boolean>;
3500
+ action: "allow" | "deny" | "confirm";
3501
+ }[] | undefined;
3502
+ } | undefined;
3503
+ args?: string[] | undefined;
3504
+ cwd?: string | undefined;
3505
+ timeoutMs?: number | undefined;
3506
+ jsonOutput?: boolean | undefined;
3507
+ includeStderr?: boolean | undefined;
3508
+ }>, z.ZodObject<{
3509
+ /** Name of the MCP tool (also used in error messages). */
3510
+ name: z.ZodString;
3511
+ /** One-sentence description the agent reads. */
3512
+ description: z.ZodString;
3513
+ } & {
3514
+ command: z.ZodOptional<z.ZodNever>;
3515
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
3516
+ name: z.ZodString;
3517
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3518
+ description: z.ZodOptional<z.ZodString>;
3519
+ required: z.ZodDefault<z.ZodBoolean>;
3520
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3521
+ } & {
3522
+ type: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "string[]"]>>;
3523
+ default: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>>;
3524
+ }, "strict", z.ZodTypeAny, {
3525
+ type: "string" | "number" | "boolean" | "string[]";
3526
+ required: boolean;
3527
+ name: string;
3528
+ description?: string | undefined;
3529
+ default?: string | number | boolean | string[] | undefined;
3530
+ aliases?: string[] | undefined;
3531
+ enum?: string[] | undefined;
3532
+ }, {
3533
+ name: string;
3534
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
3535
+ required?: boolean | undefined;
3536
+ description?: string | undefined;
3537
+ default?: string | number | boolean | string[] | undefined;
3538
+ aliases?: string[] | undefined;
3539
+ enum?: string[] | undefined;
3540
+ }>, "many">>;
3541
+ } & {
3542
+ handler: z.ZodEffects<z.ZodString, string, string>;
3543
+ call: z.ZodOptional<z.ZodNever>;
3544
+ connection: z.ZodOptional<z.ZodNever>;
3545
+ steps: z.ZodOptional<z.ZodNever>;
3546
+ }, "strict", z.ZodTypeAny, {
3547
+ params: {
3548
+ type: "string" | "number" | "boolean" | "string[]";
3549
+ required: boolean;
3550
+ name: string;
3551
+ description?: string | undefined;
3552
+ default?: string | number | boolean | string[] | undefined;
3553
+ aliases?: string[] | undefined;
3554
+ enum?: string[] | undefined;
3555
+ }[];
3556
+ name: string;
3557
+ description: string;
3558
+ handler: string;
3559
+ call?: undefined;
3560
+ connection?: undefined;
3561
+ steps?: undefined;
3562
+ command?: undefined;
3563
+ }, {
3564
+ name: string;
3565
+ description: string;
3566
+ handler: string;
3567
+ params?: {
3568
+ name: string;
3569
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
3570
+ required?: boolean | undefined;
3571
+ description?: string | undefined;
3572
+ default?: string | number | boolean | string[] | undefined;
3573
+ aliases?: string[] | undefined;
3574
+ enum?: string[] | undefined;
3575
+ }[] | undefined;
3576
+ call?: undefined;
3577
+ connection?: undefined;
3578
+ steps?: undefined;
3579
+ command?: undefined;
3580
+ }>, z.ZodObject<{
3581
+ /** Name of the MCP tool (also used in error messages). */
3582
+ name: z.ZodString;
3583
+ /** One-sentence description the agent reads. */
3584
+ description: z.ZodString;
3585
+ } & {
3586
+ command: z.ZodOptional<z.ZodNever>;
3587
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
3588
+ name: z.ZodString;
3589
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3590
+ description: z.ZodOptional<z.ZodString>;
3591
+ required: z.ZodDefault<z.ZodBoolean>;
3592
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3593
+ } & {
3594
+ type: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "string[]"]>>;
3595
+ default: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>>;
3596
+ }, "strict", z.ZodTypeAny, {
3597
+ type: "string" | "number" | "boolean" | "string[]";
3598
+ required: boolean;
3599
+ name: string;
3600
+ description?: string | undefined;
3601
+ default?: string | number | boolean | string[] | undefined;
3602
+ aliases?: string[] | undefined;
3603
+ enum?: string[] | undefined;
3604
+ }, {
3605
+ name: string;
3606
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
3607
+ required?: boolean | undefined;
3608
+ description?: string | undefined;
3609
+ default?: string | number | boolean | string[] | undefined;
3610
+ aliases?: string[] | undefined;
3611
+ enum?: string[] | undefined;
3612
+ }>, "many">>;
3613
+ } & {
3614
+ call: z.ZodString;
3615
+ connection: z.ZodOptional<z.ZodString>;
3616
+ } & {
3617
+ validators: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3618
+ handler: z.ZodOptional<z.ZodNever>;
3619
+ steps: z.ZodOptional<z.ZodNever>;
3620
+ }, "strict", z.ZodTypeAny, {
3621
+ params: {
3622
+ type: "string" | "number" | "boolean" | "string[]";
3623
+ required: boolean;
3624
+ name: string;
3625
+ description?: string | undefined;
3626
+ default?: string | number | boolean | string[] | undefined;
3627
+ aliases?: string[] | undefined;
3628
+ enum?: string[] | undefined;
3629
+ }[];
3630
+ name: string;
3631
+ description: string;
3632
+ call: string;
3633
+ handler?: undefined;
3634
+ connection?: string | undefined;
3635
+ steps?: undefined;
3636
+ command?: undefined;
3637
+ validators?: string[] | undefined;
3638
+ }, {
3639
+ name: string;
3640
+ description: string;
3641
+ call: string;
3642
+ params?: {
3643
+ name: string;
3644
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
3645
+ required?: boolean | undefined;
3646
+ description?: string | undefined;
3647
+ default?: string | number | boolean | string[] | undefined;
3648
+ aliases?: string[] | undefined;
3649
+ enum?: string[] | undefined;
3650
+ }[] | undefined;
3651
+ handler?: undefined;
3652
+ connection?: string | undefined;
3653
+ steps?: undefined;
3654
+ command?: undefined;
3655
+ validators?: string[] | undefined;
3656
+ }>, z.ZodObject<{
3657
+ /** Name of the MCP tool (also used in error messages). */
3658
+ name: z.ZodString;
3659
+ /** One-sentence description the agent reads. */
3660
+ description: z.ZodString;
3661
+ } & {
3662
+ command: z.ZodOptional<z.ZodNever>;
3663
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
3664
+ name: z.ZodString;
3665
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3666
+ description: z.ZodOptional<z.ZodString>;
3667
+ required: z.ZodDefault<z.ZodBoolean>;
3668
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3669
+ } & {
3670
+ type: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "string[]"]>>;
3671
+ default: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>>;
3672
+ }, "strict", z.ZodTypeAny, {
3673
+ type: "string" | "number" | "boolean" | "string[]";
3674
+ required: boolean;
3675
+ name: string;
3676
+ description?: string | undefined;
3677
+ default?: string | number | boolean | string[] | undefined;
3678
+ aliases?: string[] | undefined;
3679
+ enum?: string[] | undefined;
3680
+ }, {
3681
+ name: string;
3682
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
3683
+ required?: boolean | undefined;
3684
+ description?: string | undefined;
3685
+ default?: string | number | boolean | string[] | undefined;
3686
+ aliases?: string[] | undefined;
3687
+ enum?: string[] | undefined;
3688
+ }>, "many">>;
3689
+ } & {
3690
+ validators: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3691
+ handler: z.ZodOptional<z.ZodNever>;
3692
+ call: z.ZodOptional<z.ZodNever>;
3693
+ connection: z.ZodOptional<z.ZodNever>;
3694
+ steps: z.ZodArray<z.ZodObject<{
3695
+ call: z.ZodString;
3696
+ connection: z.ZodOptional<z.ZodString>;
3697
+ }, "strict", z.ZodTypeAny, {
3698
+ call: string;
3699
+ connection?: string | undefined;
3700
+ }, {
3701
+ call: string;
3702
+ connection?: string | undefined;
3703
+ }>, "atleastone">;
3704
+ }, "strict", z.ZodTypeAny, {
3705
+ params: {
3706
+ type: "string" | "number" | "boolean" | "string[]";
3707
+ required: boolean;
3708
+ name: string;
3709
+ description?: string | undefined;
3710
+ default?: string | number | boolean | string[] | undefined;
3711
+ aliases?: string[] | undefined;
3712
+ enum?: string[] | undefined;
3713
+ }[];
3714
+ name: string;
3715
+ description: string;
3716
+ steps: [{
3717
+ call: string;
3718
+ connection?: string | undefined;
3719
+ }, ...{
3720
+ call: string;
3721
+ connection?: string | undefined;
3722
+ }[]];
3723
+ handler?: undefined;
3724
+ call?: undefined;
3725
+ connection?: undefined;
3726
+ command?: undefined;
3727
+ validators?: string[] | undefined;
3728
+ }, {
3729
+ name: string;
3730
+ description: string;
3731
+ steps: [{
3732
+ call: string;
3733
+ connection?: string | undefined;
3734
+ }, ...{
3735
+ call: string;
3736
+ connection?: string | undefined;
3737
+ }[]];
3738
+ params?: {
3739
+ name: string;
3740
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
3741
+ required?: boolean | undefined;
3742
+ description?: string | undefined;
3743
+ default?: string | number | boolean | string[] | undefined;
3744
+ aliases?: string[] | undefined;
3745
+ enum?: string[] | undefined;
3746
+ }[] | undefined;
3747
+ handler?: undefined;
3748
+ call?: undefined;
3749
+ connection?: undefined;
3750
+ command?: undefined;
3751
+ validators?: string[] | undefined;
3752
+ }>]>, "many">;
3753
+ }, "strip", z.ZodTypeAny, {
3754
+ tools: ({
3755
+ params: {
3756
+ type: "string" | "number" | "boolean";
3757
+ required: boolean;
3758
+ name: string;
3759
+ equalsForm: boolean;
3760
+ placement: "global" | "local";
3761
+ positional: boolean;
3762
+ flag?: string | undefined;
3763
+ description?: string | undefined;
3764
+ default?: string | number | boolean | undefined;
3765
+ aliases?: string[] | undefined;
3766
+ enum?: string[] | undefined;
3767
+ trueFlag?: string | undefined;
3768
+ }[];
3769
+ name: string;
3770
+ description: string;
3771
+ command: string;
3772
+ args: string[];
3773
+ timeoutMs: number;
3774
+ jsonOutput: boolean;
3775
+ includeStderr: boolean;
3776
+ handler?: undefined;
3777
+ call?: undefined;
3778
+ connection?: undefined;
3779
+ steps?: undefined;
3780
+ "command-policy"?: {
3781
+ default: "allow" | "deny" | "confirm";
3782
+ rules: {
3783
+ when: Record<string, string | number | boolean>;
3784
+ action: "allow" | "deny" | "confirm";
3785
+ }[];
3786
+ } | undefined;
3787
+ cwd?: string | undefined;
3788
+ } | {
3789
+ params: {
3790
+ type: "string" | "number" | "boolean" | "string[]";
3791
+ required: boolean;
3792
+ name: string;
3793
+ description?: string | undefined;
3794
+ default?: string | number | boolean | string[] | undefined;
3795
+ aliases?: string[] | undefined;
3796
+ enum?: string[] | undefined;
3797
+ }[];
3798
+ name: string;
3799
+ description: string;
3800
+ handler: string;
3801
+ call?: undefined;
3802
+ connection?: undefined;
3803
+ steps?: undefined;
3804
+ command?: undefined;
3805
+ } | {
3806
+ params: {
3807
+ type: "string" | "number" | "boolean" | "string[]";
3808
+ required: boolean;
3809
+ name: string;
3810
+ description?: string | undefined;
3811
+ default?: string | number | boolean | string[] | undefined;
3812
+ aliases?: string[] | undefined;
3813
+ enum?: string[] | undefined;
3814
+ }[];
3815
+ name: string;
3816
+ description: string;
3817
+ call: string;
3818
+ handler?: undefined;
3819
+ connection?: string | undefined;
3820
+ steps?: undefined;
3821
+ command?: undefined;
3822
+ validators?: string[] | undefined;
3823
+ } | {
3824
+ params: {
3825
+ type: "string" | "number" | "boolean" | "string[]";
3826
+ required: boolean;
3827
+ name: string;
3828
+ description?: string | undefined;
3829
+ default?: string | number | boolean | string[] | undefined;
3830
+ aliases?: string[] | undefined;
3831
+ enum?: string[] | undefined;
3832
+ }[];
3833
+ name: string;
3834
+ description: string;
3835
+ steps: [{
3836
+ call: string;
3837
+ connection?: string | undefined;
3838
+ }, ...{
3839
+ call: string;
3840
+ connection?: string | undefined;
3841
+ }[]];
3842
+ handler?: undefined;
3843
+ call?: undefined;
3844
+ connection?: undefined;
3845
+ command?: undefined;
3846
+ validators?: string[] | undefined;
3847
+ })[];
3848
+ "tool-policy"?: {
3849
+ default: "allow" | "deny" | "confirm";
3850
+ rules: {
3851
+ call: string;
3852
+ action: "allow" | "deny" | "confirm";
3853
+ connection?: string | undefined;
3854
+ when?: Record<string, unknown> | undefined;
3855
+ validators?: string[] | undefined;
3856
+ "allowed-args"?: string[] | undefined;
3857
+ }[];
3858
+ validators?: string[] | undefined;
3859
+ operations?: Record<string, {
3860
+ validators: string[];
3861
+ }> | undefined;
3862
+ } | undefined;
3863
+ "operation-policies"?: Record<string, {
3864
+ validators: string[];
3865
+ }> | undefined;
3866
+ "command-connections"?: Record<string, string> | undefined;
3867
+ "command-policies"?: Record<string, {
3868
+ validators: string[];
3869
+ backend: "process" | "module";
3870
+ connection?: string | undefined;
3871
+ parser?: string | undefined;
3872
+ }> | undefined;
3873
+ "bash-policy"?: {
3874
+ default: "allow" | "deny" | "confirm";
3875
+ rules: {
3876
+ command: string;
3877
+ action: "allow" | "deny" | "confirm";
3878
+ when?: ({
3879
+ subcommand: string;
3880
+ } | {
3881
+ option: [string, ...string[]];
3882
+ equals: string;
3883
+ } | {
3884
+ oneOf: [string, ...string[]];
3885
+ option: [string, ...string[]];
3886
+ } | {
3887
+ not: {
3888
+ subcommand: string;
3889
+ } | {
3890
+ option: [string, ...string[]];
3891
+ equals: string;
3892
+ } | {
3893
+ oneOf: [string, ...string[]];
3894
+ option: [string, ...string[]];
3895
+ } | /*elided*/ any | {
3896
+ anyOf: ({
3897
+ subcommand: string;
3898
+ } | {
3899
+ option: [string, ...string[]];
3900
+ equals: string;
3901
+ } | {
3902
+ oneOf: [string, ...string[]];
3903
+ option: [string, ...string[]];
3904
+ } | /*elided*/ any | /*elided*/ any | {
3905
+ allOf: ({
3906
+ subcommand: string;
3907
+ } | {
3908
+ option: [string, ...string[]];
3909
+ equals: string;
3910
+ } | {
3911
+ oneOf: [string, ...string[]];
3912
+ option: [string, ...string[]];
3913
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
3914
+ })[];
3915
+ } | {
3916
+ allOf: ({
3917
+ subcommand: string;
3918
+ } | {
3919
+ option: [string, ...string[]];
3920
+ equals: string;
3921
+ } | {
3922
+ oneOf: [string, ...string[]];
3923
+ option: [string, ...string[]];
3924
+ } | /*elided*/ any | {
3925
+ anyOf: ({
3926
+ subcommand: string;
3927
+ } | {
3928
+ option: [string, ...string[]];
3929
+ equals: string;
3930
+ } | {
3931
+ oneOf: [string, ...string[]];
3932
+ option: [string, ...string[]];
3933
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
3934
+ } | /*elided*/ any)[];
3935
+ };
3936
+ } | {
3937
+ anyOf: ({
3938
+ subcommand: string;
3939
+ } | {
3940
+ option: [string, ...string[]];
3941
+ equals: string;
3942
+ } | {
3943
+ oneOf: [string, ...string[]];
3944
+ option: [string, ...string[]];
3945
+ } | {
3946
+ not: {
3947
+ subcommand: string;
3948
+ } | {
3949
+ option: [string, ...string[]];
3950
+ equals: string;
3951
+ } | {
3952
+ oneOf: [string, ...string[]];
3953
+ option: [string, ...string[]];
3954
+ } | /*elided*/ any | /*elided*/ any | {
3955
+ allOf: ({
3956
+ subcommand: string;
3957
+ } | {
3958
+ option: [string, ...string[]];
3959
+ equals: string;
3960
+ } | {
3961
+ oneOf: [string, ...string[]];
3962
+ option: [string, ...string[]];
3963
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
3964
+ };
3965
+ } | /*elided*/ any | {
3966
+ allOf: ({
3967
+ subcommand: string;
3968
+ } | {
3969
+ option: [string, ...string[]];
3970
+ equals: string;
3971
+ } | {
3972
+ oneOf: [string, ...string[]];
3973
+ option: [string, ...string[]];
3974
+ } | {
3975
+ not: {
3976
+ subcommand: string;
3977
+ } | {
3978
+ option: [string, ...string[]];
3979
+ equals: string;
3980
+ } | {
3981
+ oneOf: [string, ...string[]];
3982
+ option: [string, ...string[]];
3983
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
3984
+ } | /*elided*/ any | /*elided*/ any)[];
3985
+ })[];
3986
+ } | {
3987
+ allOf: ({
3988
+ subcommand: string;
3989
+ } | {
3990
+ option: [string, ...string[]];
3991
+ equals: string;
3992
+ } | {
3993
+ oneOf: [string, ...string[]];
3994
+ option: [string, ...string[]];
3995
+ } | {
3996
+ not: {
3997
+ subcommand: string;
3998
+ } | {
3999
+ option: [string, ...string[]];
4000
+ equals: string;
4001
+ } | {
4002
+ oneOf: [string, ...string[]];
4003
+ option: [string, ...string[]];
4004
+ } | /*elided*/ any | {
4005
+ anyOf: ({
4006
+ subcommand: string;
4007
+ } | {
4008
+ option: [string, ...string[]];
4009
+ equals: string;
4010
+ } | {
4011
+ oneOf: [string, ...string[]];
4012
+ option: [string, ...string[]];
4013
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
4014
+ } | /*elided*/ any;
4015
+ } | {
4016
+ anyOf: ({
4017
+ subcommand: string;
4018
+ } | {
4019
+ option: [string, ...string[]];
4020
+ equals: string;
4021
+ } | {
4022
+ oneOf: [string, ...string[]];
4023
+ option: [string, ...string[]];
4024
+ } | {
4025
+ not: {
4026
+ subcommand: string;
4027
+ } | {
4028
+ option: [string, ...string[]];
4029
+ equals: string;
4030
+ } | {
4031
+ oneOf: [string, ...string[]];
4032
+ option: [string, ...string[]];
4033
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
4034
+ } | /*elided*/ any | /*elided*/ any)[];
4035
+ } | /*elided*/ any)[];
4036
+ }) | undefined;
4037
+ argv?: (string | {
4038
+ oneOf: [string, ...string[]];
4039
+ } | {
4040
+ startsWith: string;
4041
+ } | {
4042
+ jsonPatch: {
4043
+ paths: [string, ...string[]];
4044
+ };
4045
+ })[] | undefined;
4046
+ match?: {
4047
+ subcommand: string;
4048
+ flags: ({
4049
+ value: string | {
4050
+ oneOf: [string, ...string[]];
4051
+ } | {
4052
+ startsWith: string;
4053
+ } | {
4054
+ jsonPatch: {
4055
+ paths: [string, ...string[]];
4056
+ };
4057
+ };
4058
+ names: [string, ...string[]];
4059
+ required: boolean;
4060
+ } | {
4061
+ type: "switch";
4062
+ names: [string, ...string[]];
4063
+ required: boolean;
4064
+ })[];
4065
+ target?: string | {
4066
+ oneOf: [string, ...string[]];
4067
+ } | undefined;
4068
+ assignments?: Record<string, string | {
4069
+ oneOf: [string, ...string[]];
4070
+ } | {
4071
+ startsWith: string;
4072
+ } | {
4073
+ jsonPatch: {
4074
+ paths: [string, ...string[]];
4075
+ };
4076
+ }> | undefined;
4077
+ } | {
4078
+ flags: ({
4079
+ value: string | {
4080
+ oneOf: [string, ...string[]];
4081
+ } | {
4082
+ startsWith: string;
4083
+ } | {
4084
+ jsonPatch: {
4085
+ paths: [string, ...string[]];
4086
+ };
4087
+ };
4088
+ names: [string, ...string[]];
4089
+ required: boolean;
4090
+ } | {
4091
+ type: "switch";
4092
+ names: [string, ...string[]];
4093
+ required: boolean;
4094
+ })[];
4095
+ positionals: (string | {
4096
+ oneOf: [string, ...string[]];
4097
+ } | {
4098
+ startsWith: string;
4099
+ } | {
4100
+ jsonPatch: {
4101
+ paths: [string, ...string[]];
4102
+ };
4103
+ })[];
4104
+ } | undefined;
4105
+ }[];
4106
+ "external-commands"?: string[] | undefined;
4107
+ "command-defaults"?: Record<string, "allow" | "deny" | "confirm"> | undefined;
4108
+ guards?: {
4109
+ command: string;
4110
+ require: {
4111
+ option: [string, ...string[]];
4112
+ equals: string;
4113
+ };
4114
+ subcommand?: string | undefined;
4115
+ }[] | undefined;
4116
+ stdin?: Record<string, string> | undefined;
4117
+ } | undefined;
4118
+ "allow-unpublished-tools"?: boolean | undefined;
4119
+ "call-policy"?: {
4120
+ default: "allow" | "deny" | "confirm";
4121
+ rules: {
4122
+ call: string;
4123
+ action: "allow" | "deny" | "confirm";
4124
+ connection?: string | undefined;
4125
+ when?: Record<string, unknown> | undefined;
4126
+ "allowed-args"?: string[] | undefined;
4127
+ }[];
4128
+ scope?: "all" | "toolring_call" | undefined;
4129
+ } | undefined;
4130
+ prefix?: string | undefined;
4131
+ env?: Record<string, string> | undefined;
4132
+ modules?: Record<string, string> | undefined;
4133
+ "enabled-modules"?: string[] | undefined;
4134
+ connections?: Record<string, z.objectOutputType<{
4135
+ module: z.ZodString;
4136
+ }, z.ZodTypeAny, "passthrough">> | undefined;
4137
+ }, {
4138
+ tools: ({
4139
+ name: string;
4140
+ description: string;
4141
+ command: string;
4142
+ params?: {
4143
+ name: string;
4144
+ type?: "string" | "number" | "boolean" | undefined;
4145
+ required?: boolean | undefined;
4146
+ flag?: string | undefined;
4147
+ description?: string | undefined;
4148
+ default?: string | number | boolean | undefined;
4149
+ aliases?: string[] | undefined;
4150
+ enum?: string[] | undefined;
4151
+ equalsForm?: boolean | undefined;
4152
+ trueFlag?: string | undefined;
4153
+ placement?: "global" | "local" | undefined;
4154
+ positional?: boolean | undefined;
4155
+ }[] | undefined;
4156
+ handler?: undefined;
4157
+ call?: undefined;
4158
+ connection?: undefined;
4159
+ steps?: undefined;
4160
+ "command-policy"?: {
4161
+ default?: "allow" | "deny" | "confirm" | undefined;
4162
+ rules?: {
4163
+ when: Record<string, string | number | boolean>;
4164
+ action: "allow" | "deny" | "confirm";
4165
+ }[] | undefined;
4166
+ } | undefined;
4167
+ args?: string[] | undefined;
4168
+ cwd?: string | undefined;
4169
+ timeoutMs?: number | undefined;
4170
+ jsonOutput?: boolean | undefined;
4171
+ includeStderr?: boolean | undefined;
4172
+ } | {
4173
+ name: string;
4174
+ description: string;
4175
+ handler: string;
4176
+ params?: {
4177
+ name: string;
4178
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
4179
+ required?: boolean | undefined;
4180
+ description?: string | undefined;
4181
+ default?: string | number | boolean | string[] | undefined;
4182
+ aliases?: string[] | undefined;
4183
+ enum?: string[] | undefined;
4184
+ }[] | undefined;
4185
+ call?: undefined;
4186
+ connection?: undefined;
4187
+ steps?: undefined;
4188
+ command?: undefined;
4189
+ } | {
4190
+ name: string;
4191
+ description: string;
4192
+ call: string;
4193
+ params?: {
4194
+ name: string;
4195
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
4196
+ required?: boolean | undefined;
4197
+ description?: string | undefined;
4198
+ default?: string | number | boolean | string[] | undefined;
4199
+ aliases?: string[] | undefined;
4200
+ enum?: string[] | undefined;
4201
+ }[] | undefined;
4202
+ handler?: undefined;
4203
+ connection?: string | undefined;
4204
+ steps?: undefined;
4205
+ command?: undefined;
4206
+ validators?: string[] | undefined;
4207
+ } | {
4208
+ name: string;
4209
+ description: string;
4210
+ steps: [{
4211
+ call: string;
4212
+ connection?: string | undefined;
4213
+ }, ...{
4214
+ call: string;
4215
+ connection?: string | undefined;
4216
+ }[]];
4217
+ params?: {
4218
+ name: string;
4219
+ type?: "string" | "number" | "boolean" | "string[]" | undefined;
4220
+ required?: boolean | undefined;
4221
+ description?: string | undefined;
4222
+ default?: string | number | boolean | string[] | undefined;
4223
+ aliases?: string[] | undefined;
4224
+ enum?: string[] | undefined;
4225
+ }[] | undefined;
4226
+ handler?: undefined;
4227
+ call?: undefined;
4228
+ connection?: undefined;
4229
+ command?: undefined;
4230
+ validators?: string[] | undefined;
4231
+ })[];
4232
+ "tool-policy"?: {
4233
+ default?: "allow" | "deny" | "confirm" | undefined;
4234
+ rules?: {
4235
+ call: string;
4236
+ action: "allow" | "deny" | "confirm";
4237
+ connection?: string | undefined;
4238
+ when?: Record<string, unknown> | undefined;
4239
+ validators?: string[] | undefined;
4240
+ "allowed-args"?: string[] | undefined;
4241
+ }[] | undefined;
4242
+ validators?: string[] | undefined;
4243
+ operations?: Record<string, {
4244
+ validators: string[];
4245
+ }> | undefined;
4246
+ } | undefined;
4247
+ "operation-policies"?: Record<string, {
4248
+ validators: string[];
4249
+ }> | undefined;
4250
+ "command-connections"?: Record<string, string> | undefined;
4251
+ "command-policies"?: Record<string, {
4252
+ connection?: string | undefined;
4253
+ validators?: string[] | undefined;
4254
+ parser?: string | undefined;
4255
+ backend?: "process" | "module" | undefined;
4256
+ }> | undefined;
4257
+ "bash-policy"?: {
4258
+ default?: "allow" | "deny" | "confirm" | undefined;
4259
+ rules?: {
4260
+ command: string;
4261
+ action: "allow" | "deny" | "confirm";
4262
+ when?: ({
4263
+ subcommand: string;
4264
+ } | {
4265
+ option: [string, ...string[]];
4266
+ equals: string;
4267
+ } | {
4268
+ oneOf: [string, ...string[]];
4269
+ option: [string, ...string[]];
4270
+ } | {
4271
+ not: {
4272
+ subcommand: string;
4273
+ } | {
4274
+ option: [string, ...string[]];
4275
+ equals: string;
4276
+ } | {
4277
+ oneOf: [string, ...string[]];
4278
+ option: [string, ...string[]];
4279
+ } | /*elided*/ any | {
4280
+ anyOf: ({
4281
+ subcommand: string;
4282
+ } | {
4283
+ option: [string, ...string[]];
4284
+ equals: string;
4285
+ } | {
4286
+ oneOf: [string, ...string[]];
4287
+ option: [string, ...string[]];
4288
+ } | /*elided*/ any | /*elided*/ any | {
4289
+ allOf: ({
4290
+ subcommand: string;
4291
+ } | {
4292
+ option: [string, ...string[]];
4293
+ equals: string;
4294
+ } | {
4295
+ oneOf: [string, ...string[]];
4296
+ option: [string, ...string[]];
4297
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
4298
+ })[];
4299
+ } | {
4300
+ allOf: ({
4301
+ subcommand: string;
4302
+ } | {
4303
+ option: [string, ...string[]];
4304
+ equals: string;
4305
+ } | {
4306
+ oneOf: [string, ...string[]];
4307
+ option: [string, ...string[]];
4308
+ } | /*elided*/ any | {
4309
+ anyOf: ({
4310
+ subcommand: string;
4311
+ } | {
4312
+ option: [string, ...string[]];
4313
+ equals: string;
4314
+ } | {
4315
+ oneOf: [string, ...string[]];
4316
+ option: [string, ...string[]];
4317
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
4318
+ } | /*elided*/ any)[];
4319
+ };
4320
+ } | {
4321
+ anyOf: ({
4322
+ subcommand: string;
4323
+ } | {
4324
+ option: [string, ...string[]];
4325
+ equals: string;
4326
+ } | {
4327
+ oneOf: [string, ...string[]];
4328
+ option: [string, ...string[]];
4329
+ } | {
4330
+ not: {
4331
+ subcommand: string;
4332
+ } | {
4333
+ option: [string, ...string[]];
4334
+ equals: string;
4335
+ } | {
4336
+ oneOf: [string, ...string[]];
4337
+ option: [string, ...string[]];
4338
+ } | /*elided*/ any | /*elided*/ any | {
4339
+ allOf: ({
4340
+ subcommand: string;
4341
+ } | {
4342
+ option: [string, ...string[]];
4343
+ equals: string;
4344
+ } | {
4345
+ oneOf: [string, ...string[]];
4346
+ option: [string, ...string[]];
4347
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
4348
+ };
4349
+ } | /*elided*/ any | {
4350
+ allOf: ({
4351
+ subcommand: string;
4352
+ } | {
4353
+ option: [string, ...string[]];
4354
+ equals: string;
4355
+ } | {
4356
+ oneOf: [string, ...string[]];
4357
+ option: [string, ...string[]];
4358
+ } | {
4359
+ not: {
4360
+ subcommand: string;
4361
+ } | {
4362
+ option: [string, ...string[]];
4363
+ equals: string;
4364
+ } | {
4365
+ oneOf: [string, ...string[]];
4366
+ option: [string, ...string[]];
4367
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
4368
+ } | /*elided*/ any | /*elided*/ any)[];
4369
+ })[];
4370
+ } | {
4371
+ allOf: ({
4372
+ subcommand: string;
4373
+ } | {
4374
+ option: [string, ...string[]];
4375
+ equals: string;
4376
+ } | {
4377
+ oneOf: [string, ...string[]];
4378
+ option: [string, ...string[]];
4379
+ } | {
4380
+ not: {
4381
+ subcommand: string;
4382
+ } | {
4383
+ option: [string, ...string[]];
4384
+ equals: string;
4385
+ } | {
4386
+ oneOf: [string, ...string[]];
4387
+ option: [string, ...string[]];
4388
+ } | /*elided*/ any | {
4389
+ anyOf: ({
4390
+ subcommand: string;
4391
+ } | {
4392
+ option: [string, ...string[]];
4393
+ equals: string;
4394
+ } | {
4395
+ oneOf: [string, ...string[]];
4396
+ option: [string, ...string[]];
4397
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any)[];
4398
+ } | /*elided*/ any;
4399
+ } | {
4400
+ anyOf: ({
4401
+ subcommand: string;
4402
+ } | {
4403
+ option: [string, ...string[]];
4404
+ equals: string;
4405
+ } | {
4406
+ oneOf: [string, ...string[]];
4407
+ option: [string, ...string[]];
4408
+ } | {
4409
+ not: {
4410
+ subcommand: string;
4411
+ } | {
4412
+ option: [string, ...string[]];
4413
+ equals: string;
4414
+ } | {
4415
+ oneOf: [string, ...string[]];
4416
+ option: [string, ...string[]];
4417
+ } | /*elided*/ any | /*elided*/ any | /*elided*/ any;
4418
+ } | /*elided*/ any | /*elided*/ any)[];
4419
+ } | /*elided*/ any)[];
4420
+ }) | undefined;
4421
+ argv?: (string | {
4422
+ oneOf: [string, ...string[]];
4423
+ } | {
4424
+ startsWith: string;
4425
+ } | {
4426
+ jsonPatch: {
4427
+ paths: [string, ...string[]];
4428
+ };
4429
+ })[] | undefined;
4430
+ match?: {
4431
+ subcommand: string;
4432
+ target?: string | {
4433
+ oneOf: [string, ...string[]];
4434
+ } | undefined;
4435
+ assignments?: Record<string, string | {
4436
+ oneOf: [string, ...string[]];
4437
+ } | {
4438
+ startsWith: string;
4439
+ } | {
4440
+ jsonPatch: {
4441
+ paths: [string, ...string[]];
4442
+ };
4443
+ }> | undefined;
4444
+ flags?: ({
4445
+ value: string | {
4446
+ oneOf: [string, ...string[]];
4447
+ } | {
4448
+ startsWith: string;
4449
+ } | {
4450
+ jsonPatch: {
4451
+ paths: [string, ...string[]];
4452
+ };
4453
+ };
4454
+ names: [string, ...string[]];
4455
+ required?: boolean | undefined;
4456
+ } | {
4457
+ type: "switch";
4458
+ names: [string, ...string[]];
4459
+ required?: boolean | undefined;
4460
+ })[] | undefined;
4461
+ } | {
4462
+ positionals: (string | {
4463
+ oneOf: [string, ...string[]];
4464
+ } | {
4465
+ startsWith: string;
4466
+ } | {
4467
+ jsonPatch: {
4468
+ paths: [string, ...string[]];
4469
+ };
4470
+ })[];
4471
+ flags?: ({
4472
+ value: string | {
4473
+ oneOf: [string, ...string[]];
4474
+ } | {
4475
+ startsWith: string;
4476
+ } | {
4477
+ jsonPatch: {
4478
+ paths: [string, ...string[]];
4479
+ };
4480
+ };
4481
+ names: [string, ...string[]];
4482
+ required?: boolean | undefined;
4483
+ } | {
4484
+ type: "switch";
4485
+ names: [string, ...string[]];
4486
+ required?: boolean | undefined;
4487
+ })[] | undefined;
4488
+ } | undefined;
4489
+ }[] | undefined;
4490
+ "external-commands"?: string[] | undefined;
4491
+ "command-defaults"?: Record<string, "allow" | "deny" | "confirm"> | undefined;
4492
+ guards?: {
4493
+ command: string;
4494
+ require: {
4495
+ option: [string, ...string[]];
4496
+ equals: string;
4497
+ };
4498
+ subcommand?: string | undefined;
4499
+ }[] | undefined;
4500
+ stdin?: Record<string, string> | undefined;
4501
+ } | undefined;
4502
+ "allow-unpublished-tools"?: boolean | undefined;
4503
+ "call-policy"?: {
4504
+ default?: "allow" | "deny" | "confirm" | undefined;
4505
+ rules?: {
4506
+ call: string;
4507
+ action: "allow" | "deny" | "confirm";
4508
+ connection?: string | undefined;
4509
+ when?: Record<string, unknown> | undefined;
4510
+ "allowed-args"?: string[] | undefined;
4511
+ }[] | undefined;
4512
+ scope?: "all" | "toolring_call" | undefined;
4513
+ } | undefined;
4514
+ prefix?: string | undefined;
4515
+ env?: Record<string, string> | undefined;
4516
+ modules?: Record<string, string> | undefined;
4517
+ "enabled-modules"?: string[] | undefined;
4518
+ connections?: Record<string, z.objectInputType<{
4519
+ module: z.ZodString;
4520
+ }, z.ZodTypeAny, "passthrough">> | undefined;
4521
+ }>;
4522
+ export type Param = z.infer<typeof commandParamSchema>;
4523
+ export type CommandToolSpec = z.infer<typeof commandToolSchema>;
4524
+ export type ModuleCall = z.infer<typeof moduleCallSchema>;
4525
+ export type NodeToolSpec = z.infer<typeof handlerToolSchema> | z.infer<typeof moduleToolSchema> | z.infer<typeof sequenceToolSchema>;
4526
+ export type ToolSpec = z.infer<typeof toolSchema>;
4527
+ export type ToolringConfig = z.infer<typeof configSchema>;
4528
+ /** New profiles always authorize the canonical operation across entry points. */
4529
+ export declare function effectiveCallPolicy(cfg: ToolringConfig): {
4530
+ default: "allow" | "deny" | "confirm";
4531
+ rules: {
4532
+ call: string;
4533
+ action: "allow" | "deny" | "confirm";
4534
+ connection?: string | undefined;
4535
+ when?: Record<string, unknown> | undefined;
4536
+ "allowed-args"?: string[] | undefined;
4537
+ }[];
4538
+ scope?: "all" | "toolring_call" | undefined;
4539
+ } | undefined;
4540
+ export declare function operationPolicies(cfg: ToolringConfig): Record<string, {
4541
+ validators: string[];
4542
+ }>;
4543
+ export declare const reloadToolName = "toolring_reload";
4544
+ export declare const catalogToolName = "toolring_catalog";
4545
+ export declare const managementToolNames: Set<string>;
4546
+ export declare function prefixedName(cfg: ToolringConfig, tool: ToolSpec): string;
4547
+ export declare function moduleCalls(tool: ToolSpec): readonly ModuleCall[];
4548
+ /** With an explicit module list, module.function stages keep their meaning even when disabled. */
4549
+ export declare function pipelineModuleAlias(name: string, cfg: ToolringConfig): string | undefined;
4550
+ /** Policy-only references are dormant until their module is enabled. */
4551
+ export declare function policyModuleWarnings(cfg: ToolringConfig, registry: ModuleRegistry): string[];
4552
+ export declare class ConfigError extends Error {
4553
+ constructor(message: string);
4554
+ }
4555
+ /** Parse a YAML or JSON config string into a validated ToolringConfig. */
4556
+ export declare function parseConfig(raw: string, registry?: ModuleRegistry): ToolringConfig;
4557
+ /** Resolve the same module and connection names for YAML and direct MCP calls. */
4558
+ export declare function validateModuleCall(step: ModuleCall, cfg: ToolringConfig, registry: ModuleRegistry, label: string, policyRule?: boolean): void;
4559
+ export {};