@intutic/shared-types 3.0.5 → 3.0.8

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 (89) hide show
  1. package/README.md +1 -1
  2. package/dist/api-contracts.d.ts +85 -116
  3. package/dist/api-contracts.d.ts.map +1 -1
  4. package/dist/api-contracts.js +5 -5
  5. package/dist/api-contracts.js.map +1 -1
  6. package/dist/apiKeyScopes.d.ts +1 -1
  7. package/dist/apiKeyScopes.js +1 -1
  8. package/dist/attenuation.d.ts +4 -22
  9. package/dist/attenuation.d.ts.map +1 -1
  10. package/dist/auth.d.ts +44 -226
  11. package/dist/auth.d.ts.map +1 -1
  12. package/dist/auth.js +3 -3
  13. package/dist/auth.js.map +1 -1
  14. package/dist/chaos.d.ts +168 -1778
  15. package/dist/chaos.d.ts.map +1 -1
  16. package/dist/enums.d.ts +1 -1
  17. package/dist/enums.js +1 -1
  18. package/dist/governanceCoverage.d.ts +4 -4
  19. package/dist/governanceCoverage.js +3 -3
  20. package/dist/guardrailIr.d.ts +98 -421
  21. package/dist/guardrailIr.d.ts.map +1 -1
  22. package/dist/guardrailIr.js +2 -2
  23. package/dist/identity.d.ts +16 -29
  24. package/dist/identity.d.ts.map +1 -1
  25. package/dist/mcpBudgets.d.ts +14 -82
  26. package/dist/mcpBudgets.d.ts.map +1 -1
  27. package/dist/mcpToolRisk.d.ts +1 -1
  28. package/dist/mcpToolRisk.js +1 -1
  29. package/dist/modelCatalog.generated.d.ts +404 -66
  30. package/dist/modelCatalog.generated.d.ts.map +1 -1
  31. package/dist/modelCatalog.generated.js +62 -36
  32. package/dist/modelCatalog.generated.js.map +1 -1
  33. package/dist/piiDetectors.d.ts +11 -1
  34. package/dist/piiDetectors.d.ts.map +1 -1
  35. package/dist/piiDetectors.js +1 -1
  36. package/dist/piiDetectors.js.map +1 -1
  37. package/dist/policyGuardrails.d.ts +6 -30
  38. package/dist/policyGuardrails.d.ts.map +1 -1
  39. package/dist/policyGuardrails.js +1 -1
  40. package/dist/policyGuardrails.js.map +1 -1
  41. package/dist/providerVerification.d.ts +2 -2
  42. package/dist/providerVerification.js +2 -2
  43. package/dist/providers.d.ts +2 -2
  44. package/dist/providers.js +2 -2
  45. package/dist/responses/common.d.ts +8 -14
  46. package/dist/responses/common.d.ts.map +1 -1
  47. package/dist/responses/common.js +1 -1
  48. package/dist/responses/decide.d.ts +115 -1514
  49. package/dist/responses/decide.d.ts.map +1 -1
  50. package/dist/responses/decide.js +9 -9
  51. package/dist/responses/decide.js.map +1 -1
  52. package/dist/responses/gateways.d.ts +883 -5211
  53. package/dist/responses/gateways.d.ts.map +1 -1
  54. package/dist/responses/gateways.js +8 -8
  55. package/dist/responses/gateways.js.map +1 -1
  56. package/dist/responses/guardrails.d.ts +600 -5829
  57. package/dist/responses/guardrails.d.ts.map +1 -1
  58. package/dist/responses/guardrails.js +3 -3
  59. package/dist/responses/guardrails.js.map +1 -1
  60. package/dist/responses/identity.d.ts +217 -1296
  61. package/dist/responses/identity.d.ts.map +1 -1
  62. package/dist/responses/identity.js +1 -1
  63. package/dist/responses/identity.js.map +1 -1
  64. package/dist/responses/integrations.d.ts +717 -3709
  65. package/dist/responses/integrations.d.ts.map +1 -1
  66. package/dist/responses/integrations.js +6 -6
  67. package/dist/responses/integrations.js.map +1 -1
  68. package/dist/responses/observability.d.ts +386 -2597
  69. package/dist/responses/observability.d.ts.map +1 -1
  70. package/dist/responses/observability.js +5 -5
  71. package/dist/responses/observability.js.map +1 -1
  72. package/dist/responses/orgSops.d.ts +15 -79
  73. package/dist/responses/orgSops.d.ts.map +1 -1
  74. package/dist/responses/rules.d.ts +449 -2386
  75. package/dist/responses/rules.d.ts.map +1 -1
  76. package/dist/responses/rules.js +8 -8
  77. package/dist/responses/rules.js.map +1 -1
  78. package/dist/spendBudgets.d.ts +20 -38
  79. package/dist/spendBudgets.d.ts.map +1 -1
  80. package/dist/ssoGroupClearance.d.ts +4 -12
  81. package/dist/ssoGroupClearance.d.ts.map +1 -1
  82. package/dist/sync.d.ts +25 -124
  83. package/dist/sync.d.ts.map +1 -1
  84. package/dist/toon.d.ts +1 -1
  85. package/dist/toon.js +1 -1
  86. package/dist/upstreamRetry.d.ts +32 -61
  87. package/dist/upstreamRetry.d.ts.map +1 -1
  88. package/dist/workspaceSettings.d.ts +5 -5
  89. package/package.json +4 -4
package/dist/chaos.d.ts CHANGED
@@ -65,1179 +65,249 @@ declare const MatchSchema: z.ZodObject<{
65
65
  tool: z.ZodOptional<z.ZodString>;
66
66
  host: z.ZodOptional<z.ZodString>;
67
67
  model: z.ZodOptional<z.ZodString>;
68
- }, "strict", z.ZodTypeAny, {
69
- tool?: string | undefined;
70
- host?: string | undefined;
71
- model?: string | undefined;
72
- }, {
73
- tool?: string | undefined;
74
- host?: string | undefined;
75
- model?: string | undefined;
76
- }>;
68
+ }, z.core.$strict>;
77
69
  export type FaultMatch = z.infer<typeof MatchSchema>;
78
- export declare const FaultSchema: z.ZodDiscriminatedUnion<"id", [z.ZodObject<{
70
+ export declare const FaultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
79
71
  retry_after_s: z.ZodDefault<z.ZodNumber>;
80
72
  match: z.ZodOptional<z.ZodObject<{
81
73
  tool: z.ZodOptional<z.ZodString>;
82
74
  host: z.ZodOptional<z.ZodString>;
83
75
  model: z.ZodOptional<z.ZodString>;
84
- }, "strict", z.ZodTypeAny, {
85
- tool?: string | undefined;
86
- host?: string | undefined;
87
- model?: string | undefined;
88
- }, {
89
- tool?: string | undefined;
90
- host?: string | undefined;
91
- model?: string | undefined;
92
- }>>;
93
- /** Skip this many matching calls before the first injection. */
76
+ }, z.core.$strict>>;
94
77
  after_calls: z.ZodDefault<z.ZodNumber>;
95
- /** Inject at most this many times; absent means every matching call. */
96
78
  times: z.ZodOptional<z.ZodNumber>;
97
79
  id: z.ZodLiteral<"llm.rate_limit">;
98
- }, "strict", z.ZodTypeAny, {
99
- id: "llm.rate_limit";
100
- retry_after_s: number;
101
- after_calls: number;
102
- match?: {
103
- tool?: string | undefined;
104
- host?: string | undefined;
105
- model?: string | undefined;
106
- } | undefined;
107
- times?: number | undefined;
108
- }, {
109
- id: "llm.rate_limit";
110
- retry_after_s?: number | undefined;
111
- match?: {
112
- tool?: string | undefined;
113
- host?: string | undefined;
114
- model?: string | undefined;
115
- } | undefined;
116
- after_calls?: number | undefined;
117
- times?: number | undefined;
118
- }>, z.ZodObject<{
119
- status: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<500>, z.ZodLiteral<502>, z.ZodLiteral<503>, z.ZodLiteral<529>]>>;
120
- /** Cut a streamed response after this many chunks instead of failing the request. */
80
+ }, z.core.$strict>, z.ZodObject<{
81
+ status: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<500>, z.ZodLiteral<502>, z.ZodLiteral<503>, z.ZodLiteral<529>]>>;
121
82
  stream_cut_after_chunks: z.ZodOptional<z.ZodNumber>;
122
83
  match: z.ZodOptional<z.ZodObject<{
123
84
  tool: z.ZodOptional<z.ZodString>;
124
85
  host: z.ZodOptional<z.ZodString>;
125
86
  model: z.ZodOptional<z.ZodString>;
126
- }, "strict", z.ZodTypeAny, {
127
- tool?: string | undefined;
128
- host?: string | undefined;
129
- model?: string | undefined;
130
- }, {
131
- tool?: string | undefined;
132
- host?: string | undefined;
133
- model?: string | undefined;
134
- }>>;
135
- /** Skip this many matching calls before the first injection. */
87
+ }, z.core.$strict>>;
136
88
  after_calls: z.ZodDefault<z.ZodNumber>;
137
- /** Inject at most this many times; absent means every matching call. */
138
89
  times: z.ZodOptional<z.ZodNumber>;
139
90
  id: z.ZodLiteral<"llm.upstream_5xx">;
140
- }, "strict", z.ZodTypeAny, {
141
- status: 500 | 502 | 503 | 529;
142
- id: "llm.upstream_5xx";
143
- after_calls: number;
144
- match?: {
145
- tool?: string | undefined;
146
- host?: string | undefined;
147
- model?: string | undefined;
148
- } | undefined;
149
- times?: number | undefined;
150
- stream_cut_after_chunks?: number | undefined;
151
- }, {
152
- id: "llm.upstream_5xx";
153
- status?: 500 | 502 | 503 | 529 | undefined;
154
- match?: {
155
- tool?: string | undefined;
156
- host?: string | undefined;
157
- model?: string | undefined;
158
- } | undefined;
159
- after_calls?: number | undefined;
160
- times?: number | undefined;
161
- stream_cut_after_chunks?: number | undefined;
162
- }>, z.ZodObject<{
91
+ }, z.core.$strict>, z.ZodObject<{
163
92
  drop_oldest: z.ZodDefault<z.ZodNumber>;
164
93
  drop_system: z.ZodDefault<z.ZodBoolean>;
165
94
  match: z.ZodOptional<z.ZodObject<{
166
95
  tool: z.ZodOptional<z.ZodString>;
167
96
  host: z.ZodOptional<z.ZodString>;
168
97
  model: z.ZodOptional<z.ZodString>;
169
- }, "strict", z.ZodTypeAny, {
170
- tool?: string | undefined;
171
- host?: string | undefined;
172
- model?: string | undefined;
173
- }, {
174
- tool?: string | undefined;
175
- host?: string | undefined;
176
- model?: string | undefined;
177
- }>>;
178
- /** Skip this many matching calls before the first injection. */
98
+ }, z.core.$strict>>;
179
99
  after_calls: z.ZodDefault<z.ZodNumber>;
180
- /** Inject at most this many times; absent means every matching call. */
181
100
  times: z.ZodOptional<z.ZodNumber>;
182
101
  id: z.ZodLiteral<"llm.context_trim">;
183
- }, "strict", z.ZodTypeAny, {
184
- id: "llm.context_trim";
185
- after_calls: number;
186
- drop_oldest: number;
187
- drop_system: boolean;
188
- match?: {
189
- tool?: string | undefined;
190
- host?: string | undefined;
191
- model?: string | undefined;
192
- } | undefined;
193
- times?: number | undefined;
194
- }, {
195
- id: "llm.context_trim";
196
- match?: {
197
- tool?: string | undefined;
198
- host?: string | undefined;
199
- model?: string | undefined;
200
- } | undefined;
201
- after_calls?: number | undefined;
202
- times?: number | undefined;
203
- drop_oldest?: number | undefined;
204
- drop_system?: boolean | undefined;
205
- }>, z.ZodObject<{
102
+ }, z.core.$strict>, z.ZodObject<{
206
103
  to_model: z.ZodString;
207
104
  match: z.ZodOptional<z.ZodObject<{
208
105
  tool: z.ZodOptional<z.ZodString>;
209
106
  host: z.ZodOptional<z.ZodString>;
210
107
  model: z.ZodOptional<z.ZodString>;
211
- }, "strict", z.ZodTypeAny, {
212
- tool?: string | undefined;
213
- host?: string | undefined;
214
- model?: string | undefined;
215
- }, {
216
- tool?: string | undefined;
217
- host?: string | undefined;
218
- model?: string | undefined;
219
- }>>;
220
- /** Skip this many matching calls before the first injection. */
108
+ }, z.core.$strict>>;
221
109
  after_calls: z.ZodDefault<z.ZodNumber>;
222
- /** Inject at most this many times; absent means every matching call. */
223
110
  times: z.ZodOptional<z.ZodNumber>;
224
111
  id: z.ZodLiteral<"llm.model_degrade">;
225
- }, "strict", z.ZodTypeAny, {
226
- id: "llm.model_degrade";
227
- after_calls: number;
228
- to_model: string;
229
- match?: {
230
- tool?: string | undefined;
231
- host?: string | undefined;
232
- model?: string | undefined;
233
- } | undefined;
234
- times?: number | undefined;
235
- }, {
236
- id: "llm.model_degrade";
237
- to_model: string;
238
- match?: {
239
- tool?: string | undefined;
240
- host?: string | undefined;
241
- model?: string | undefined;
242
- } | undefined;
243
- after_calls?: number | undefined;
244
- times?: number | undefined;
245
- }>, z.ZodObject<{
112
+ }, z.core.$strict>, z.ZodObject<{
246
113
  message: z.ZodDefault<z.ZodString>;
247
114
  match: z.ZodOptional<z.ZodObject<{
248
115
  tool: z.ZodOptional<z.ZodString>;
249
116
  host: z.ZodOptional<z.ZodString>;
250
117
  model: z.ZodOptional<z.ZodString>;
251
- }, "strict", z.ZodTypeAny, {
252
- tool?: string | undefined;
253
- host?: string | undefined;
254
- model?: string | undefined;
255
- }, {
256
- tool?: string | undefined;
257
- host?: string | undefined;
258
- model?: string | undefined;
259
- }>>;
260
- /** Skip this many matching calls before the first injection. */
118
+ }, z.core.$strict>>;
261
119
  after_calls: z.ZodDefault<z.ZodNumber>;
262
- /** Inject at most this many times; absent means every matching call. */
263
120
  times: z.ZodOptional<z.ZodNumber>;
264
121
  id: z.ZodLiteral<"tool.error">;
265
- }, "strict", z.ZodTypeAny, {
266
- message: string;
267
- id: "tool.error";
268
- after_calls: number;
269
- match?: {
270
- tool?: string | undefined;
271
- host?: string | undefined;
272
- model?: string | undefined;
273
- } | undefined;
274
- times?: number | undefined;
275
- }, {
276
- id: "tool.error";
277
- message?: string | undefined;
278
- match?: {
279
- tool?: string | undefined;
280
- host?: string | undefined;
281
- model?: string | undefined;
282
- } | undefined;
283
- after_calls?: number | undefined;
284
- times?: number | undefined;
285
- }>, z.ZodObject<{
122
+ }, z.core.$strict>, z.ZodObject<{
286
123
  result: z.ZodString;
287
124
  match: z.ZodOptional<z.ZodObject<{
288
125
  tool: z.ZodOptional<z.ZodString>;
289
126
  host: z.ZodOptional<z.ZodString>;
290
127
  model: z.ZodOptional<z.ZodString>;
291
- }, "strict", z.ZodTypeAny, {
292
- tool?: string | undefined;
293
- host?: string | undefined;
294
- model?: string | undefined;
295
- }, {
296
- tool?: string | undefined;
297
- host?: string | undefined;
298
- model?: string | undefined;
299
- }>>;
300
- /** Skip this many matching calls before the first injection. */
128
+ }, z.core.$strict>>;
301
129
  after_calls: z.ZodDefault<z.ZodNumber>;
302
- /** Inject at most this many times; absent means every matching call. */
303
130
  times: z.ZodOptional<z.ZodNumber>;
304
131
  id: z.ZodLiteral<"tool.stale_data">;
305
- }, "strict", z.ZodTypeAny, {
306
- id: "tool.stale_data";
307
- after_calls: number;
308
- result: string;
309
- match?: {
310
- tool?: string | undefined;
311
- host?: string | undefined;
312
- model?: string | undefined;
313
- } | undefined;
314
- times?: number | undefined;
315
- }, {
316
- id: "tool.stale_data";
317
- result: string;
318
- match?: {
319
- tool?: string | undefined;
320
- host?: string | undefined;
321
- model?: string | undefined;
322
- } | undefined;
323
- after_calls?: number | undefined;
324
- times?: number | undefined;
325
- }>, z.ZodObject<{
326
- remove: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
327
- /** Tool name → the description it is redefined with. */
132
+ }, z.core.$strict>, z.ZodObject<{
133
+ remove: z.ZodDefault<z.ZodArray<z.ZodString>>;
328
134
  redefine: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
329
135
  match: z.ZodOptional<z.ZodObject<{
330
136
  tool: z.ZodOptional<z.ZodString>;
331
137
  host: z.ZodOptional<z.ZodString>;
332
138
  model: z.ZodOptional<z.ZodString>;
333
- }, "strict", z.ZodTypeAny, {
334
- tool?: string | undefined;
335
- host?: string | undefined;
336
- model?: string | undefined;
337
- }, {
338
- tool?: string | undefined;
339
- host?: string | undefined;
340
- model?: string | undefined;
341
- }>>;
342
- /** Skip this many matching calls before the first injection. */
139
+ }, z.core.$strict>>;
343
140
  after_calls: z.ZodDefault<z.ZodNumber>;
344
- /** Inject at most this many times; absent means every matching call. */
345
141
  times: z.ZodOptional<z.ZodNumber>;
346
142
  id: z.ZodLiteral<"mcp.toolset_change">;
347
- }, "strict", z.ZodTypeAny, {
348
- id: "mcp.toolset_change";
349
- after_calls: number;
350
- remove: string[];
351
- redefine: Record<string, string>;
352
- match?: {
353
- tool?: string | undefined;
354
- host?: string | undefined;
355
- model?: string | undefined;
356
- } | undefined;
357
- times?: number | undefined;
358
- }, {
359
- id: "mcp.toolset_change";
360
- match?: {
361
- tool?: string | undefined;
362
- host?: string | undefined;
363
- model?: string | undefined;
364
- } | undefined;
365
- after_calls?: number | undefined;
366
- times?: number | undefined;
367
- remove?: string[] | undefined;
368
- redefine?: Record<string, string> | undefined;
369
- }>, z.ZodObject<{
370
- mode: z.ZodDefault<z.ZodEnum<["deny", "delay", "hold_then_deny"]>>;
371
- /**
372
- * `delay` and `hold_then_deny`: how long a held call stays held. The
373
- * call is refused as held, the way an approval hold refuses it, and so
374
- * is its identical retry until this many seconds have passed since the
375
- * first refusal; then the retry is allowed (`delay`) or denied
376
- * (`hold_then_deny`). Nothing waits: 0 holds the call once and allows
377
- * (or denies) the first retry.
378
- */
143
+ }, z.core.$strict>, z.ZodObject<{
144
+ mode: z.ZodDefault<z.ZodEnum<{
145
+ deny: "deny";
146
+ delay: "delay";
147
+ hold_then_deny: "hold_then_deny";
148
+ }>>;
379
149
  delay_s: z.ZodDefault<z.ZodNumber>;
380
150
  match: z.ZodOptional<z.ZodObject<{
381
151
  tool: z.ZodOptional<z.ZodString>;
382
152
  host: z.ZodOptional<z.ZodString>;
383
153
  model: z.ZodOptional<z.ZodString>;
384
- }, "strict", z.ZodTypeAny, {
385
- tool?: string | undefined;
386
- host?: string | undefined;
387
- model?: string | undefined;
388
- }, {
389
- tool?: string | undefined;
390
- host?: string | undefined;
391
- model?: string | undefined;
392
- }>>;
393
- /** Skip this many matching calls before the first injection. */
154
+ }, z.core.$strict>>;
394
155
  after_calls: z.ZodDefault<z.ZodNumber>;
395
- /** Inject at most this many times; absent means every matching call. */
396
156
  times: z.ZodOptional<z.ZodNumber>;
397
157
  id: z.ZodLiteral<"permission.deny_or_delay">;
398
- }, "strict", z.ZodTypeAny, {
399
- id: "permission.deny_or_delay";
400
- after_calls: number;
401
- mode: "deny" | "delay" | "hold_then_deny";
402
- delay_s: number;
403
- match?: {
404
- tool?: string | undefined;
405
- host?: string | undefined;
406
- model?: string | undefined;
407
- } | undefined;
408
- times?: number | undefined;
409
- }, {
410
- id: "permission.deny_or_delay";
411
- match?: {
412
- tool?: string | undefined;
413
- host?: string | undefined;
414
- model?: string | undefined;
415
- } | undefined;
416
- after_calls?: number | undefined;
417
- times?: number | undefined;
418
- mode?: "deny" | "delay" | "hold_then_deny" | undefined;
419
- delay_s?: number | undefined;
420
- }>, z.ZodObject<{
158
+ }, z.core.$strict>, z.ZodObject<{
421
159
  payload: z.ZodString;
422
160
  match: z.ZodOptional<z.ZodObject<{
423
161
  tool: z.ZodOptional<z.ZodString>;
424
162
  host: z.ZodOptional<z.ZodString>;
425
163
  model: z.ZodOptional<z.ZodString>;
426
- }, "strict", z.ZodTypeAny, {
427
- tool?: string | undefined;
428
- host?: string | undefined;
429
- model?: string | undefined;
430
- }, {
431
- tool?: string | undefined;
432
- host?: string | undefined;
433
- model?: string | undefined;
434
- }>>;
435
- /** Skip this many matching calls before the first injection. */
164
+ }, z.core.$strict>>;
436
165
  after_calls: z.ZodDefault<z.ZodNumber>;
437
- /** Inject at most this many times; absent means every matching call. */
438
166
  times: z.ZodOptional<z.ZodNumber>;
439
167
  id: z.ZodLiteral<"inject.tool_result">;
440
- }, "strict", z.ZodTypeAny, {
441
- id: "inject.tool_result";
442
- after_calls: number;
443
- payload: string;
444
- match?: {
445
- tool?: string | undefined;
446
- host?: string | undefined;
447
- model?: string | undefined;
448
- } | undefined;
449
- times?: number | undefined;
450
- }, {
451
- id: "inject.tool_result";
452
- payload: string;
453
- match?: {
454
- tool?: string | undefined;
455
- host?: string | undefined;
456
- model?: string | undefined;
457
- } | undefined;
458
- after_calls?: number | undefined;
459
- times?: number | undefined;
460
- }>, z.ZodObject<{
168
+ }, z.core.$strict>, z.ZodObject<{
461
169
  match: z.ZodObject<{
462
170
  tool: z.ZodOptional<z.ZodString>;
463
171
  model: z.ZodOptional<z.ZodString>;
464
- } & {
465
172
  host: z.ZodString;
466
- }, "strict", z.ZodTypeAny, {
467
- host: string;
468
- tool?: string | undefined;
469
- model?: string | undefined;
470
- }, {
471
- host: string;
472
- tool?: string | undefined;
473
- model?: string | undefined;
474
- }>;
475
- /** Skip this many matching calls before the first injection. */
173
+ }, z.core.$strict>;
476
174
  after_calls: z.ZodDefault<z.ZodNumber>;
477
- /** Inject at most this many times; absent means every matching call. */
478
175
  times: z.ZodOptional<z.ZodNumber>;
479
176
  id: z.ZodLiteral<"egress.dns_fail">;
480
- }, "strict", z.ZodTypeAny, {
481
- id: "egress.dns_fail";
482
- match: {
483
- host: string;
484
- tool?: string | undefined;
485
- model?: string | undefined;
486
- };
487
- after_calls: number;
488
- times?: number | undefined;
489
- }, {
490
- id: "egress.dns_fail";
491
- match: {
492
- host: string;
493
- tool?: string | undefined;
494
- model?: string | undefined;
495
- };
496
- after_calls?: number | undefined;
497
- times?: number | undefined;
498
- }>, z.ZodObject<{
177
+ }, z.core.$strict>, z.ZodObject<{
499
178
  match: z.ZodObject<{
500
179
  tool: z.ZodOptional<z.ZodString>;
501
180
  model: z.ZodOptional<z.ZodString>;
502
- } & {
503
181
  host: z.ZodString;
504
- }, "strict", z.ZodTypeAny, {
505
- host: string;
506
- tool?: string | undefined;
507
- model?: string | undefined;
508
- }, {
509
- host: string;
510
- tool?: string | undefined;
511
- model?: string | undefined;
512
- }>;
513
- /** Skip this many matching calls before the first injection. */
182
+ }, z.core.$strict>;
514
183
  after_calls: z.ZodDefault<z.ZodNumber>;
515
- /** Inject at most this many times; absent means every matching call. */
516
184
  times: z.ZodOptional<z.ZodNumber>;
517
185
  id: z.ZodLiteral<"egress.credential_401">;
518
- }, "strict", z.ZodTypeAny, {
519
- id: "egress.credential_401";
520
- match: {
521
- host: string;
522
- tool?: string | undefined;
523
- model?: string | undefined;
524
- };
525
- after_calls: number;
526
- times?: number | undefined;
527
- }, {
528
- id: "egress.credential_401";
529
- match: {
530
- host: string;
531
- tool?: string | undefined;
532
- model?: string | undefined;
533
- };
534
- after_calls?: number | undefined;
535
- times?: number | undefined;
536
- }>]>;
186
+ }, z.core.$strict>], "id">;
537
187
  export type Fault = z.infer<typeof FaultSchema>;
538
188
  export declare const ChaosPlanSchema: z.ZodObject<{
539
189
  v: z.ZodLiteral<1>;
540
190
  runId: z.ZodString;
541
- /** 0-based repetition index; baseline repetitions carry no faults. */
542
191
  repetition: z.ZodNumber;
543
- /** Token every injected error text carries, so `failure_surfaced` needs no model. */
544
192
  canary: z.ZodString;
545
- faults: z.ZodArray<z.ZodDiscriminatedUnion<"id", [z.ZodObject<{
193
+ faults: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
546
194
  retry_after_s: z.ZodDefault<z.ZodNumber>;
547
195
  match: z.ZodOptional<z.ZodObject<{
548
196
  tool: z.ZodOptional<z.ZodString>;
549
197
  host: z.ZodOptional<z.ZodString>;
550
198
  model: z.ZodOptional<z.ZodString>;
551
- }, "strict", z.ZodTypeAny, {
552
- tool?: string | undefined;
553
- host?: string | undefined;
554
- model?: string | undefined;
555
- }, {
556
- tool?: string | undefined;
557
- host?: string | undefined;
558
- model?: string | undefined;
559
- }>>;
560
- /** Skip this many matching calls before the first injection. */
199
+ }, z.core.$strict>>;
561
200
  after_calls: z.ZodDefault<z.ZodNumber>;
562
- /** Inject at most this many times; absent means every matching call. */
563
201
  times: z.ZodOptional<z.ZodNumber>;
564
202
  id: z.ZodLiteral<"llm.rate_limit">;
565
- }, "strict", z.ZodTypeAny, {
566
- id: "llm.rate_limit";
567
- retry_after_s: number;
568
- after_calls: number;
569
- match?: {
570
- tool?: string | undefined;
571
- host?: string | undefined;
572
- model?: string | undefined;
573
- } | undefined;
574
- times?: number | undefined;
575
- }, {
576
- id: "llm.rate_limit";
577
- retry_after_s?: number | undefined;
578
- match?: {
579
- tool?: string | undefined;
580
- host?: string | undefined;
581
- model?: string | undefined;
582
- } | undefined;
583
- after_calls?: number | undefined;
584
- times?: number | undefined;
585
- }>, z.ZodObject<{
586
- status: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<500>, z.ZodLiteral<502>, z.ZodLiteral<503>, z.ZodLiteral<529>]>>;
587
- /** Cut a streamed response after this many chunks instead of failing the request. */
203
+ }, z.core.$strict>, z.ZodObject<{
204
+ status: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<500>, z.ZodLiteral<502>, z.ZodLiteral<503>, z.ZodLiteral<529>]>>;
588
205
  stream_cut_after_chunks: z.ZodOptional<z.ZodNumber>;
589
206
  match: z.ZodOptional<z.ZodObject<{
590
207
  tool: z.ZodOptional<z.ZodString>;
591
208
  host: z.ZodOptional<z.ZodString>;
592
209
  model: z.ZodOptional<z.ZodString>;
593
- }, "strict", z.ZodTypeAny, {
594
- tool?: string | undefined;
595
- host?: string | undefined;
596
- model?: string | undefined;
597
- }, {
598
- tool?: string | undefined;
599
- host?: string | undefined;
600
- model?: string | undefined;
601
- }>>;
602
- /** Skip this many matching calls before the first injection. */
210
+ }, z.core.$strict>>;
603
211
  after_calls: z.ZodDefault<z.ZodNumber>;
604
- /** Inject at most this many times; absent means every matching call. */
605
212
  times: z.ZodOptional<z.ZodNumber>;
606
213
  id: z.ZodLiteral<"llm.upstream_5xx">;
607
- }, "strict", z.ZodTypeAny, {
608
- status: 500 | 502 | 503 | 529;
609
- id: "llm.upstream_5xx";
610
- after_calls: number;
611
- match?: {
612
- tool?: string | undefined;
613
- host?: string | undefined;
614
- model?: string | undefined;
615
- } | undefined;
616
- times?: number | undefined;
617
- stream_cut_after_chunks?: number | undefined;
618
- }, {
619
- id: "llm.upstream_5xx";
620
- status?: 500 | 502 | 503 | 529 | undefined;
621
- match?: {
622
- tool?: string | undefined;
623
- host?: string | undefined;
624
- model?: string | undefined;
625
- } | undefined;
626
- after_calls?: number | undefined;
627
- times?: number | undefined;
628
- stream_cut_after_chunks?: number | undefined;
629
- }>, z.ZodObject<{
214
+ }, z.core.$strict>, z.ZodObject<{
630
215
  drop_oldest: z.ZodDefault<z.ZodNumber>;
631
216
  drop_system: z.ZodDefault<z.ZodBoolean>;
632
217
  match: z.ZodOptional<z.ZodObject<{
633
218
  tool: z.ZodOptional<z.ZodString>;
634
219
  host: z.ZodOptional<z.ZodString>;
635
220
  model: z.ZodOptional<z.ZodString>;
636
- }, "strict", z.ZodTypeAny, {
637
- tool?: string | undefined;
638
- host?: string | undefined;
639
- model?: string | undefined;
640
- }, {
641
- tool?: string | undefined;
642
- host?: string | undefined;
643
- model?: string | undefined;
644
- }>>;
645
- /** Skip this many matching calls before the first injection. */
221
+ }, z.core.$strict>>;
646
222
  after_calls: z.ZodDefault<z.ZodNumber>;
647
- /** Inject at most this many times; absent means every matching call. */
648
223
  times: z.ZodOptional<z.ZodNumber>;
649
224
  id: z.ZodLiteral<"llm.context_trim">;
650
- }, "strict", z.ZodTypeAny, {
651
- id: "llm.context_trim";
652
- after_calls: number;
653
- drop_oldest: number;
654
- drop_system: boolean;
655
- match?: {
656
- tool?: string | undefined;
657
- host?: string | undefined;
658
- model?: string | undefined;
659
- } | undefined;
660
- times?: number | undefined;
661
- }, {
662
- id: "llm.context_trim";
663
- match?: {
664
- tool?: string | undefined;
665
- host?: string | undefined;
666
- model?: string | undefined;
667
- } | undefined;
668
- after_calls?: number | undefined;
669
- times?: number | undefined;
670
- drop_oldest?: number | undefined;
671
- drop_system?: boolean | undefined;
672
- }>, z.ZodObject<{
225
+ }, z.core.$strict>, z.ZodObject<{
673
226
  to_model: z.ZodString;
674
227
  match: z.ZodOptional<z.ZodObject<{
675
228
  tool: z.ZodOptional<z.ZodString>;
676
229
  host: z.ZodOptional<z.ZodString>;
677
230
  model: z.ZodOptional<z.ZodString>;
678
- }, "strict", z.ZodTypeAny, {
679
- tool?: string | undefined;
680
- host?: string | undefined;
681
- model?: string | undefined;
682
- }, {
683
- tool?: string | undefined;
684
- host?: string | undefined;
685
- model?: string | undefined;
686
- }>>;
687
- /** Skip this many matching calls before the first injection. */
231
+ }, z.core.$strict>>;
688
232
  after_calls: z.ZodDefault<z.ZodNumber>;
689
- /** Inject at most this many times; absent means every matching call. */
690
233
  times: z.ZodOptional<z.ZodNumber>;
691
234
  id: z.ZodLiteral<"llm.model_degrade">;
692
- }, "strict", z.ZodTypeAny, {
693
- id: "llm.model_degrade";
694
- after_calls: number;
695
- to_model: string;
696
- match?: {
697
- tool?: string | undefined;
698
- host?: string | undefined;
699
- model?: string | undefined;
700
- } | undefined;
701
- times?: number | undefined;
702
- }, {
703
- id: "llm.model_degrade";
704
- to_model: string;
705
- match?: {
706
- tool?: string | undefined;
707
- host?: string | undefined;
708
- model?: string | undefined;
709
- } | undefined;
710
- after_calls?: number | undefined;
711
- times?: number | undefined;
712
- }>, z.ZodObject<{
235
+ }, z.core.$strict>, z.ZodObject<{
713
236
  message: z.ZodDefault<z.ZodString>;
714
237
  match: z.ZodOptional<z.ZodObject<{
715
238
  tool: z.ZodOptional<z.ZodString>;
716
239
  host: z.ZodOptional<z.ZodString>;
717
240
  model: z.ZodOptional<z.ZodString>;
718
- }, "strict", z.ZodTypeAny, {
719
- tool?: string | undefined;
720
- host?: string | undefined;
721
- model?: string | undefined;
722
- }, {
723
- tool?: string | undefined;
724
- host?: string | undefined;
725
- model?: string | undefined;
726
- }>>;
727
- /** Skip this many matching calls before the first injection. */
241
+ }, z.core.$strict>>;
728
242
  after_calls: z.ZodDefault<z.ZodNumber>;
729
- /** Inject at most this many times; absent means every matching call. */
730
243
  times: z.ZodOptional<z.ZodNumber>;
731
244
  id: z.ZodLiteral<"tool.error">;
732
- }, "strict", z.ZodTypeAny, {
733
- message: string;
734
- id: "tool.error";
735
- after_calls: number;
736
- match?: {
737
- tool?: string | undefined;
738
- host?: string | undefined;
739
- model?: string | undefined;
740
- } | undefined;
741
- times?: number | undefined;
742
- }, {
743
- id: "tool.error";
744
- message?: string | undefined;
745
- match?: {
746
- tool?: string | undefined;
747
- host?: string | undefined;
748
- model?: string | undefined;
749
- } | undefined;
750
- after_calls?: number | undefined;
751
- times?: number | undefined;
752
- }>, z.ZodObject<{
245
+ }, z.core.$strict>, z.ZodObject<{
753
246
  result: z.ZodString;
754
247
  match: z.ZodOptional<z.ZodObject<{
755
248
  tool: z.ZodOptional<z.ZodString>;
756
249
  host: z.ZodOptional<z.ZodString>;
757
250
  model: z.ZodOptional<z.ZodString>;
758
- }, "strict", z.ZodTypeAny, {
759
- tool?: string | undefined;
760
- host?: string | undefined;
761
- model?: string | undefined;
762
- }, {
763
- tool?: string | undefined;
764
- host?: string | undefined;
765
- model?: string | undefined;
766
- }>>;
767
- /** Skip this many matching calls before the first injection. */
251
+ }, z.core.$strict>>;
768
252
  after_calls: z.ZodDefault<z.ZodNumber>;
769
- /** Inject at most this many times; absent means every matching call. */
770
253
  times: z.ZodOptional<z.ZodNumber>;
771
254
  id: z.ZodLiteral<"tool.stale_data">;
772
- }, "strict", z.ZodTypeAny, {
773
- id: "tool.stale_data";
774
- after_calls: number;
775
- result: string;
776
- match?: {
777
- tool?: string | undefined;
778
- host?: string | undefined;
779
- model?: string | undefined;
780
- } | undefined;
781
- times?: number | undefined;
782
- }, {
783
- id: "tool.stale_data";
784
- result: string;
785
- match?: {
786
- tool?: string | undefined;
787
- host?: string | undefined;
788
- model?: string | undefined;
789
- } | undefined;
790
- after_calls?: number | undefined;
791
- times?: number | undefined;
792
- }>, z.ZodObject<{
793
- remove: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
794
- /** Tool name → the description it is redefined with. */
255
+ }, z.core.$strict>, z.ZodObject<{
256
+ remove: z.ZodDefault<z.ZodArray<z.ZodString>>;
795
257
  redefine: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
796
258
  match: z.ZodOptional<z.ZodObject<{
797
259
  tool: z.ZodOptional<z.ZodString>;
798
260
  host: z.ZodOptional<z.ZodString>;
799
261
  model: z.ZodOptional<z.ZodString>;
800
- }, "strict", z.ZodTypeAny, {
801
- tool?: string | undefined;
802
- host?: string | undefined;
803
- model?: string | undefined;
804
- }, {
805
- tool?: string | undefined;
806
- host?: string | undefined;
807
- model?: string | undefined;
808
- }>>;
809
- /** Skip this many matching calls before the first injection. */
262
+ }, z.core.$strict>>;
810
263
  after_calls: z.ZodDefault<z.ZodNumber>;
811
- /** Inject at most this many times; absent means every matching call. */
812
264
  times: z.ZodOptional<z.ZodNumber>;
813
265
  id: z.ZodLiteral<"mcp.toolset_change">;
814
- }, "strict", z.ZodTypeAny, {
815
- id: "mcp.toolset_change";
816
- after_calls: number;
817
- remove: string[];
818
- redefine: Record<string, string>;
819
- match?: {
820
- tool?: string | undefined;
821
- host?: string | undefined;
822
- model?: string | undefined;
823
- } | undefined;
824
- times?: number | undefined;
825
- }, {
826
- id: "mcp.toolset_change";
827
- match?: {
828
- tool?: string | undefined;
829
- host?: string | undefined;
830
- model?: string | undefined;
831
- } | undefined;
832
- after_calls?: number | undefined;
833
- times?: number | undefined;
834
- remove?: string[] | undefined;
835
- redefine?: Record<string, string> | undefined;
836
- }>, z.ZodObject<{
837
- mode: z.ZodDefault<z.ZodEnum<["deny", "delay", "hold_then_deny"]>>;
838
- /**
839
- * `delay` and `hold_then_deny`: how long a held call stays held. The
840
- * call is refused as held, the way an approval hold refuses it, and so
841
- * is its identical retry until this many seconds have passed since the
842
- * first refusal; then the retry is allowed (`delay`) or denied
843
- * (`hold_then_deny`). Nothing waits: 0 holds the call once and allows
844
- * (or denies) the first retry.
845
- */
266
+ }, z.core.$strict>, z.ZodObject<{
267
+ mode: z.ZodDefault<z.ZodEnum<{
268
+ deny: "deny";
269
+ delay: "delay";
270
+ hold_then_deny: "hold_then_deny";
271
+ }>>;
846
272
  delay_s: z.ZodDefault<z.ZodNumber>;
847
273
  match: z.ZodOptional<z.ZodObject<{
848
274
  tool: z.ZodOptional<z.ZodString>;
849
275
  host: z.ZodOptional<z.ZodString>;
850
276
  model: z.ZodOptional<z.ZodString>;
851
- }, "strict", z.ZodTypeAny, {
852
- tool?: string | undefined;
853
- host?: string | undefined;
854
- model?: string | undefined;
855
- }, {
856
- tool?: string | undefined;
857
- host?: string | undefined;
858
- model?: string | undefined;
859
- }>>;
860
- /** Skip this many matching calls before the first injection. */
277
+ }, z.core.$strict>>;
861
278
  after_calls: z.ZodDefault<z.ZodNumber>;
862
- /** Inject at most this many times; absent means every matching call. */
863
279
  times: z.ZodOptional<z.ZodNumber>;
864
280
  id: z.ZodLiteral<"permission.deny_or_delay">;
865
- }, "strict", z.ZodTypeAny, {
866
- id: "permission.deny_or_delay";
867
- after_calls: number;
868
- mode: "deny" | "delay" | "hold_then_deny";
869
- delay_s: number;
870
- match?: {
871
- tool?: string | undefined;
872
- host?: string | undefined;
873
- model?: string | undefined;
874
- } | undefined;
875
- times?: number | undefined;
876
- }, {
877
- id: "permission.deny_or_delay";
878
- match?: {
879
- tool?: string | undefined;
880
- host?: string | undefined;
881
- model?: string | undefined;
882
- } | undefined;
883
- after_calls?: number | undefined;
884
- times?: number | undefined;
885
- mode?: "deny" | "delay" | "hold_then_deny" | undefined;
886
- delay_s?: number | undefined;
887
- }>, z.ZodObject<{
281
+ }, z.core.$strict>, z.ZodObject<{
888
282
  payload: z.ZodString;
889
283
  match: z.ZodOptional<z.ZodObject<{
890
284
  tool: z.ZodOptional<z.ZodString>;
891
285
  host: z.ZodOptional<z.ZodString>;
892
286
  model: z.ZodOptional<z.ZodString>;
893
- }, "strict", z.ZodTypeAny, {
894
- tool?: string | undefined;
895
- host?: string | undefined;
896
- model?: string | undefined;
897
- }, {
898
- tool?: string | undefined;
899
- host?: string | undefined;
900
- model?: string | undefined;
901
- }>>;
902
- /** Skip this many matching calls before the first injection. */
287
+ }, z.core.$strict>>;
903
288
  after_calls: z.ZodDefault<z.ZodNumber>;
904
- /** Inject at most this many times; absent means every matching call. */
905
289
  times: z.ZodOptional<z.ZodNumber>;
906
290
  id: z.ZodLiteral<"inject.tool_result">;
907
- }, "strict", z.ZodTypeAny, {
908
- id: "inject.tool_result";
909
- after_calls: number;
910
- payload: string;
911
- match?: {
912
- tool?: string | undefined;
913
- host?: string | undefined;
914
- model?: string | undefined;
915
- } | undefined;
916
- times?: number | undefined;
917
- }, {
918
- id: "inject.tool_result";
919
- payload: string;
920
- match?: {
921
- tool?: string | undefined;
922
- host?: string | undefined;
923
- model?: string | undefined;
924
- } | undefined;
925
- after_calls?: number | undefined;
926
- times?: number | undefined;
927
- }>, z.ZodObject<{
291
+ }, z.core.$strict>, z.ZodObject<{
928
292
  match: z.ZodObject<{
929
293
  tool: z.ZodOptional<z.ZodString>;
930
294
  model: z.ZodOptional<z.ZodString>;
931
- } & {
932
295
  host: z.ZodString;
933
- }, "strict", z.ZodTypeAny, {
934
- host: string;
935
- tool?: string | undefined;
936
- model?: string | undefined;
937
- }, {
938
- host: string;
939
- tool?: string | undefined;
940
- model?: string | undefined;
941
- }>;
942
- /** Skip this many matching calls before the first injection. */
296
+ }, z.core.$strict>;
943
297
  after_calls: z.ZodDefault<z.ZodNumber>;
944
- /** Inject at most this many times; absent means every matching call. */
945
298
  times: z.ZodOptional<z.ZodNumber>;
946
299
  id: z.ZodLiteral<"egress.dns_fail">;
947
- }, "strict", z.ZodTypeAny, {
948
- id: "egress.dns_fail";
949
- match: {
950
- host: string;
951
- tool?: string | undefined;
952
- model?: string | undefined;
953
- };
954
- after_calls: number;
955
- times?: number | undefined;
956
- }, {
957
- id: "egress.dns_fail";
958
- match: {
959
- host: string;
960
- tool?: string | undefined;
961
- model?: string | undefined;
962
- };
963
- after_calls?: number | undefined;
964
- times?: number | undefined;
965
- }>, z.ZodObject<{
300
+ }, z.core.$strict>, z.ZodObject<{
966
301
  match: z.ZodObject<{
967
302
  tool: z.ZodOptional<z.ZodString>;
968
303
  model: z.ZodOptional<z.ZodString>;
969
- } & {
970
304
  host: z.ZodString;
971
- }, "strict", z.ZodTypeAny, {
972
- host: string;
973
- tool?: string | undefined;
974
- model?: string | undefined;
975
- }, {
976
- host: string;
977
- tool?: string | undefined;
978
- model?: string | undefined;
979
- }>;
980
- /** Skip this many matching calls before the first injection. */
305
+ }, z.core.$strict>;
981
306
  after_calls: z.ZodDefault<z.ZodNumber>;
982
- /** Inject at most this many times; absent means every matching call. */
983
307
  times: z.ZodOptional<z.ZodNumber>;
984
308
  id: z.ZodLiteral<"egress.credential_401">;
985
- }, "strict", z.ZodTypeAny, {
986
- id: "egress.credential_401";
987
- match: {
988
- host: string;
989
- tool?: string | undefined;
990
- model?: string | undefined;
991
- };
992
- after_calls: number;
993
- times?: number | undefined;
994
- }, {
995
- id: "egress.credential_401";
996
- match: {
997
- host: string;
998
- tool?: string | undefined;
999
- model?: string | undefined;
1000
- };
1001
- after_calls?: number | undefined;
1002
- times?: number | undefined;
1003
- }>]>, "many">;
1004
- }, "strict", z.ZodTypeAny, {
1005
- v: 1;
1006
- runId: string;
1007
- repetition: number;
1008
- canary: string;
1009
- faults: ({
1010
- id: "llm.rate_limit";
1011
- retry_after_s: number;
1012
- after_calls: number;
1013
- match?: {
1014
- tool?: string | undefined;
1015
- host?: string | undefined;
1016
- model?: string | undefined;
1017
- } | undefined;
1018
- times?: number | undefined;
1019
- } | {
1020
- status: 500 | 502 | 503 | 529;
1021
- id: "llm.upstream_5xx";
1022
- after_calls: number;
1023
- match?: {
1024
- tool?: string | undefined;
1025
- host?: string | undefined;
1026
- model?: string | undefined;
1027
- } | undefined;
1028
- times?: number | undefined;
1029
- stream_cut_after_chunks?: number | undefined;
1030
- } | {
1031
- id: "llm.context_trim";
1032
- after_calls: number;
1033
- drop_oldest: number;
1034
- drop_system: boolean;
1035
- match?: {
1036
- tool?: string | undefined;
1037
- host?: string | undefined;
1038
- model?: string | undefined;
1039
- } | undefined;
1040
- times?: number | undefined;
1041
- } | {
1042
- id: "llm.model_degrade";
1043
- after_calls: number;
1044
- to_model: string;
1045
- match?: {
1046
- tool?: string | undefined;
1047
- host?: string | undefined;
1048
- model?: string | undefined;
1049
- } | undefined;
1050
- times?: number | undefined;
1051
- } | {
1052
- message: string;
1053
- id: "tool.error";
1054
- after_calls: number;
1055
- match?: {
1056
- tool?: string | undefined;
1057
- host?: string | undefined;
1058
- model?: string | undefined;
1059
- } | undefined;
1060
- times?: number | undefined;
1061
- } | {
1062
- id: "tool.stale_data";
1063
- after_calls: number;
1064
- result: string;
1065
- match?: {
1066
- tool?: string | undefined;
1067
- host?: string | undefined;
1068
- model?: string | undefined;
1069
- } | undefined;
1070
- times?: number | undefined;
1071
- } | {
1072
- id: "mcp.toolset_change";
1073
- after_calls: number;
1074
- remove: string[];
1075
- redefine: Record<string, string>;
1076
- match?: {
1077
- tool?: string | undefined;
1078
- host?: string | undefined;
1079
- model?: string | undefined;
1080
- } | undefined;
1081
- times?: number | undefined;
1082
- } | {
1083
- id: "permission.deny_or_delay";
1084
- after_calls: number;
1085
- mode: "deny" | "delay" | "hold_then_deny";
1086
- delay_s: number;
1087
- match?: {
1088
- tool?: string | undefined;
1089
- host?: string | undefined;
1090
- model?: string | undefined;
1091
- } | undefined;
1092
- times?: number | undefined;
1093
- } | {
1094
- id: "inject.tool_result";
1095
- after_calls: number;
1096
- payload: string;
1097
- match?: {
1098
- tool?: string | undefined;
1099
- host?: string | undefined;
1100
- model?: string | undefined;
1101
- } | undefined;
1102
- times?: number | undefined;
1103
- } | {
1104
- id: "egress.dns_fail";
1105
- match: {
1106
- host: string;
1107
- tool?: string | undefined;
1108
- model?: string | undefined;
1109
- };
1110
- after_calls: number;
1111
- times?: number | undefined;
1112
- } | {
1113
- id: "egress.credential_401";
1114
- match: {
1115
- host: string;
1116
- tool?: string | undefined;
1117
- model?: string | undefined;
1118
- };
1119
- after_calls: number;
1120
- times?: number | undefined;
1121
- })[];
1122
- }, {
1123
- v: 1;
1124
- runId: string;
1125
- repetition: number;
1126
- canary: string;
1127
- faults: ({
1128
- id: "llm.rate_limit";
1129
- retry_after_s?: number | undefined;
1130
- match?: {
1131
- tool?: string | undefined;
1132
- host?: string | undefined;
1133
- model?: string | undefined;
1134
- } | undefined;
1135
- after_calls?: number | undefined;
1136
- times?: number | undefined;
1137
- } | {
1138
- id: "llm.upstream_5xx";
1139
- status?: 500 | 502 | 503 | 529 | undefined;
1140
- match?: {
1141
- tool?: string | undefined;
1142
- host?: string | undefined;
1143
- model?: string | undefined;
1144
- } | undefined;
1145
- after_calls?: number | undefined;
1146
- times?: number | undefined;
1147
- stream_cut_after_chunks?: number | undefined;
1148
- } | {
1149
- id: "llm.context_trim";
1150
- match?: {
1151
- tool?: string | undefined;
1152
- host?: string | undefined;
1153
- model?: string | undefined;
1154
- } | undefined;
1155
- after_calls?: number | undefined;
1156
- times?: number | undefined;
1157
- drop_oldest?: number | undefined;
1158
- drop_system?: boolean | undefined;
1159
- } | {
1160
- id: "llm.model_degrade";
1161
- to_model: string;
1162
- match?: {
1163
- tool?: string | undefined;
1164
- host?: string | undefined;
1165
- model?: string | undefined;
1166
- } | undefined;
1167
- after_calls?: number | undefined;
1168
- times?: number | undefined;
1169
- } | {
1170
- id: "tool.error";
1171
- message?: string | undefined;
1172
- match?: {
1173
- tool?: string | undefined;
1174
- host?: string | undefined;
1175
- model?: string | undefined;
1176
- } | undefined;
1177
- after_calls?: number | undefined;
1178
- times?: number | undefined;
1179
- } | {
1180
- id: "tool.stale_data";
1181
- result: string;
1182
- match?: {
1183
- tool?: string | undefined;
1184
- host?: string | undefined;
1185
- model?: string | undefined;
1186
- } | undefined;
1187
- after_calls?: number | undefined;
1188
- times?: number | undefined;
1189
- } | {
1190
- id: "mcp.toolset_change";
1191
- match?: {
1192
- tool?: string | undefined;
1193
- host?: string | undefined;
1194
- model?: string | undefined;
1195
- } | undefined;
1196
- after_calls?: number | undefined;
1197
- times?: number | undefined;
1198
- remove?: string[] | undefined;
1199
- redefine?: Record<string, string> | undefined;
1200
- } | {
1201
- id: "permission.deny_or_delay";
1202
- match?: {
1203
- tool?: string | undefined;
1204
- host?: string | undefined;
1205
- model?: string | undefined;
1206
- } | undefined;
1207
- after_calls?: number | undefined;
1208
- times?: number | undefined;
1209
- mode?: "deny" | "delay" | "hold_then_deny" | undefined;
1210
- delay_s?: number | undefined;
1211
- } | {
1212
- id: "inject.tool_result";
1213
- payload: string;
1214
- match?: {
1215
- tool?: string | undefined;
1216
- host?: string | undefined;
1217
- model?: string | undefined;
1218
- } | undefined;
1219
- after_calls?: number | undefined;
1220
- times?: number | undefined;
1221
- } | {
1222
- id: "egress.dns_fail";
1223
- match: {
1224
- host: string;
1225
- tool?: string | undefined;
1226
- model?: string | undefined;
1227
- };
1228
- after_calls?: number | undefined;
1229
- times?: number | undefined;
1230
- } | {
1231
- id: "egress.credential_401";
1232
- match: {
1233
- host: string;
1234
- tool?: string | undefined;
1235
- model?: string | undefined;
1236
- };
1237
- after_calls?: number | undefined;
1238
- times?: number | undefined;
1239
- })[];
1240
- }>;
309
+ }, z.core.$strict>], "id">>;
310
+ }, z.core.$strict>;
1241
311
  export type ChaosPlan = z.infer<typeof ChaosPlanSchema>;
1242
312
  /** Encode a plan for {@link CHAOS_PLAN_ENV}. */
1243
313
  export declare function encodeChaosPlan(plan: ChaosPlan): string;
@@ -1268,103 +338,75 @@ export declare class FaultCounter {
1268
338
  }
1269
339
  /** The error text an injected failure carries: the base message plus the canary. */
1270
340
  export declare function faultMessage(plan: Pick<ChaosPlan, 'canary'>, base: string): string;
1271
- export declare const ChaosEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
341
+ export declare const ChaosEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1272
342
  type: z.ZodLiteral<"plan_loaded">;
1273
343
  faults: z.ZodNumber;
1274
344
  ts: z.ZodString;
1275
345
  runId: z.ZodString;
1276
- component: z.ZodEnum<["runner", "proxy", "mcp-proxy", "gate"]>;
1277
- }, "strip", z.ZodTypeAny, {
1278
- type: "plan_loaded";
1279
- runId: string;
1280
- faults: number;
1281
- ts: string;
1282
- component: "runner" | "proxy" | "mcp-proxy" | "gate";
1283
- }, {
1284
- type: "plan_loaded";
1285
- runId: string;
1286
- faults: number;
1287
- ts: string;
1288
- component: "runner" | "proxy" | "mcp-proxy" | "gate";
1289
- }>, z.ZodObject<{
346
+ component: z.ZodEnum<{
347
+ runner: "runner";
348
+ proxy: "proxy";
349
+ "mcp-proxy": "mcp-proxy";
350
+ gate: "gate";
351
+ }>;
352
+ }, z.core.$strip>, z.ZodObject<{
1290
353
  type: z.ZodLiteral<"fault_injected">;
1291
- faultId: z.ZodEnum<["llm.rate_limit", "llm.upstream_5xx", "llm.context_trim", "llm.model_degrade", "tool.error", "tool.stale_data", "mcp.toolset_change", "permission.deny_or_delay", "inject.tool_result", "egress.dns_fail", "egress.credential_401"]>;
1292
- /** The 1-based index of the matching call that was hit. */
354
+ faultId: z.ZodEnum<{
355
+ "llm.rate_limit": "llm.rate_limit";
356
+ "llm.upstream_5xx": "llm.upstream_5xx";
357
+ "llm.context_trim": "llm.context_trim";
358
+ "llm.model_degrade": "llm.model_degrade";
359
+ "tool.error": "tool.error";
360
+ "tool.stale_data": "tool.stale_data";
361
+ "mcp.toolset_change": "mcp.toolset_change";
362
+ "permission.deny_or_delay": "permission.deny_or_delay";
363
+ "inject.tool_result": "inject.tool_result";
364
+ "egress.dns_fail": "egress.dns_fail";
365
+ "egress.credential_401": "egress.credential_401";
366
+ }>;
1293
367
  call: z.ZodNumber;
1294
368
  target: z.ZodOptional<z.ZodString>;
1295
369
  ts: z.ZodString;
1296
370
  runId: z.ZodString;
1297
- component: z.ZodEnum<["runner", "proxy", "mcp-proxy", "gate"]>;
1298
- }, "strip", z.ZodTypeAny, {
1299
- type: "fault_injected";
1300
- runId: string;
1301
- ts: string;
1302
- component: "runner" | "proxy" | "mcp-proxy" | "gate";
1303
- faultId: "llm.rate_limit" | "llm.upstream_5xx" | "llm.context_trim" | "llm.model_degrade" | "tool.error" | "tool.stale_data" | "mcp.toolset_change" | "permission.deny_or_delay" | "inject.tool_result" | "egress.dns_fail" | "egress.credential_401";
1304
- call: number;
1305
- target?: string | undefined;
1306
- }, {
1307
- type: "fault_injected";
1308
- runId: string;
1309
- ts: string;
1310
- component: "runner" | "proxy" | "mcp-proxy" | "gate";
1311
- faultId: "llm.rate_limit" | "llm.upstream_5xx" | "llm.context_trim" | "llm.model_degrade" | "tool.error" | "tool.stale_data" | "mcp.toolset_change" | "permission.deny_or_delay" | "inject.tool_result" | "egress.dns_fail" | "egress.credential_401";
1312
- call: number;
1313
- target?: string | undefined;
1314
- }>, z.ZodObject<{
371
+ component: z.ZodEnum<{
372
+ runner: "runner";
373
+ proxy: "proxy";
374
+ "mcp-proxy": "mcp-proxy";
375
+ gate: "gate";
376
+ }>;
377
+ }, z.core.$strip>, z.ZodObject<{
1315
378
  type: z.ZodLiteral<"tool_call">;
1316
379
  tool: z.ZodString;
1317
380
  ok: z.ZodBoolean;
1318
381
  ts: z.ZodString;
1319
382
  runId: z.ZodString;
1320
- component: z.ZodEnum<["runner", "proxy", "mcp-proxy", "gate"]>;
1321
- }, "strip", z.ZodTypeAny, {
1322
- type: "tool_call";
1323
- tool: string;
1324
- runId: string;
1325
- ts: string;
1326
- component: "runner" | "proxy" | "mcp-proxy" | "gate";
1327
- ok: boolean;
1328
- }, {
1329
- type: "tool_call";
1330
- tool: string;
1331
- runId: string;
1332
- ts: string;
1333
- component: "runner" | "proxy" | "mcp-proxy" | "gate";
1334
- ok: boolean;
1335
- }>, z.ZodObject<{
383
+ component: z.ZodEnum<{
384
+ runner: "runner";
385
+ proxy: "proxy";
386
+ "mcp-proxy": "mcp-proxy";
387
+ gate: "gate";
388
+ }>;
389
+ }, z.core.$strip>, z.ZodObject<{
1336
390
  type: z.ZodLiteral<"gate_decision">;
1337
391
  tool: z.ZodString;
1338
- decision: z.ZodEnum<["allow", "deny", "ask", "hold"]>;
392
+ decision: z.ZodEnum<{
393
+ deny: "deny";
394
+ allow: "allow";
395
+ ask: "ask";
396
+ hold: "hold";
397
+ }>;
1339
398
  ruleId: z.ZodOptional<z.ZodString>;
1340
- /** The call hit the destructive-command tier, whether or not it was blocked. */
1341
399
  destructive: z.ZodBoolean;
1342
- /** An enforce-mode rule fired on the call. */
1343
400
  policyHit: z.ZodBoolean;
1344
401
  ts: z.ZodString;
1345
402
  runId: z.ZodString;
1346
- component: z.ZodEnum<["runner", "proxy", "mcp-proxy", "gate"]>;
1347
- }, "strip", z.ZodTypeAny, {
1348
- type: "gate_decision";
1349
- tool: string;
1350
- runId: string;
1351
- ts: string;
1352
- component: "runner" | "proxy" | "mcp-proxy" | "gate";
1353
- decision: "deny" | "allow" | "ask" | "hold";
1354
- destructive: boolean;
1355
- policyHit: boolean;
1356
- ruleId?: string | undefined;
1357
- }, {
1358
- type: "gate_decision";
1359
- tool: string;
1360
- runId: string;
1361
- ts: string;
1362
- component: "runner" | "proxy" | "mcp-proxy" | "gate";
1363
- decision: "deny" | "allow" | "ask" | "hold";
1364
- destructive: boolean;
1365
- policyHit: boolean;
1366
- ruleId?: string | undefined;
1367
- }>, z.ZodObject<{
403
+ component: z.ZodEnum<{
404
+ runner: "runner";
405
+ proxy: "proxy";
406
+ "mcp-proxy": "mcp-proxy";
407
+ gate: "gate";
408
+ }>;
409
+ }, z.core.$strip>, z.ZodObject<{
1368
410
  type: z.ZodLiteral<"llm_usage">;
1369
411
  model: z.ZodString;
1370
412
  inputTokens: z.ZodNumber;
@@ -1372,44 +414,24 @@ export declare const ChaosEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
1372
414
  costUsd: z.ZodNumber;
1373
415
  ts: z.ZodString;
1374
416
  runId: z.ZodString;
1375
- component: z.ZodEnum<["runner", "proxy", "mcp-proxy", "gate"]>;
1376
- }, "strip", z.ZodTypeAny, {
1377
- type: "llm_usage";
1378
- outputTokens: number;
1379
- model: string;
1380
- runId: string;
1381
- ts: string;
1382
- component: "runner" | "proxy" | "mcp-proxy" | "gate";
1383
- inputTokens: number;
1384
- costUsd: number;
1385
- }, {
1386
- type: "llm_usage";
1387
- outputTokens: number;
1388
- model: string;
1389
- runId: string;
1390
- ts: string;
1391
- component: "runner" | "proxy" | "mcp-proxy" | "gate";
1392
- inputTokens: number;
1393
- costUsd: number;
1394
- }>, z.ZodObject<{
417
+ component: z.ZodEnum<{
418
+ runner: "runner";
419
+ proxy: "proxy";
420
+ "mcp-proxy": "mcp-proxy";
421
+ gate: "gate";
422
+ }>;
423
+ }, z.core.$strip>, z.ZodObject<{
1395
424
  type: z.ZodLiteral<"abort">;
1396
425
  reason: z.ZodString;
1397
426
  ts: z.ZodString;
1398
427
  runId: z.ZodString;
1399
- component: z.ZodEnum<["runner", "proxy", "mcp-proxy", "gate"]>;
1400
- }, "strip", z.ZodTypeAny, {
1401
- type: "abort";
1402
- reason: string;
1403
- runId: string;
1404
- ts: string;
1405
- component: "runner" | "proxy" | "mcp-proxy" | "gate";
1406
- }, {
1407
- type: "abort";
1408
- reason: string;
1409
- runId: string;
1410
- ts: string;
1411
- component: "runner" | "proxy" | "mcp-proxy" | "gate";
1412
- }>]>;
428
+ component: z.ZodEnum<{
429
+ runner: "runner";
430
+ proxy: "proxy";
431
+ "mcp-proxy": "mcp-proxy";
432
+ gate: "gate";
433
+ }>;
434
+ }, z.core.$strip>], "type">;
1413
435
  export type ChaosEvent = z.infer<typeof ChaosEventSchema>;
1414
436
  /** Parse an events file's text; malformed lines are counted, not thrown. */
1415
437
  export declare function parseChaosEvents(text: string): {
@@ -1421,777 +443,145 @@ export type ProbeId = (typeof PROBE_IDS)[number];
1421
443
  export declare const ExperimentSchema: z.ZodObject<{
1422
444
  name: z.ZodString;
1423
445
  description: z.ZodOptional<z.ZodString>;
1424
- /** The agent command, run in the sandbox through a shell. */
1425
446
  agent: z.ZodString;
1426
- /** Run in the sandbox after the agent; exit 0 means the task succeeded. */
1427
447
  verify: z.ZodString;
1428
- /** Faulted repetitions; the same number of baseline repetitions run first. */
1429
448
  repeat: z.ZodDefault<z.ZodNumber>;
1430
- faults: z.ZodArray<z.ZodDiscriminatedUnion<"id", [z.ZodObject<{
449
+ faults: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1431
450
  retry_after_s: z.ZodDefault<z.ZodNumber>;
1432
451
  match: z.ZodOptional<z.ZodObject<{
1433
452
  tool: z.ZodOptional<z.ZodString>;
1434
453
  host: z.ZodOptional<z.ZodString>;
1435
454
  model: z.ZodOptional<z.ZodString>;
1436
- }, "strict", z.ZodTypeAny, {
1437
- tool?: string | undefined;
1438
- host?: string | undefined;
1439
- model?: string | undefined;
1440
- }, {
1441
- tool?: string | undefined;
1442
- host?: string | undefined;
1443
- model?: string | undefined;
1444
- }>>;
1445
- /** Skip this many matching calls before the first injection. */
455
+ }, z.core.$strict>>;
1446
456
  after_calls: z.ZodDefault<z.ZodNumber>;
1447
- /** Inject at most this many times; absent means every matching call. */
1448
457
  times: z.ZodOptional<z.ZodNumber>;
1449
458
  id: z.ZodLiteral<"llm.rate_limit">;
1450
- }, "strict", z.ZodTypeAny, {
1451
- id: "llm.rate_limit";
1452
- retry_after_s: number;
1453
- after_calls: number;
1454
- match?: {
1455
- tool?: string | undefined;
1456
- host?: string | undefined;
1457
- model?: string | undefined;
1458
- } | undefined;
1459
- times?: number | undefined;
1460
- }, {
1461
- id: "llm.rate_limit";
1462
- retry_after_s?: number | undefined;
1463
- match?: {
1464
- tool?: string | undefined;
1465
- host?: string | undefined;
1466
- model?: string | undefined;
1467
- } | undefined;
1468
- after_calls?: number | undefined;
1469
- times?: number | undefined;
1470
- }>, z.ZodObject<{
1471
- status: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<500>, z.ZodLiteral<502>, z.ZodLiteral<503>, z.ZodLiteral<529>]>>;
1472
- /** Cut a streamed response after this many chunks instead of failing the request. */
459
+ }, z.core.$strict>, z.ZodObject<{
460
+ status: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<500>, z.ZodLiteral<502>, z.ZodLiteral<503>, z.ZodLiteral<529>]>>;
1473
461
  stream_cut_after_chunks: z.ZodOptional<z.ZodNumber>;
1474
462
  match: z.ZodOptional<z.ZodObject<{
1475
463
  tool: z.ZodOptional<z.ZodString>;
1476
464
  host: z.ZodOptional<z.ZodString>;
1477
465
  model: z.ZodOptional<z.ZodString>;
1478
- }, "strict", z.ZodTypeAny, {
1479
- tool?: string | undefined;
1480
- host?: string | undefined;
1481
- model?: string | undefined;
1482
- }, {
1483
- tool?: string | undefined;
1484
- host?: string | undefined;
1485
- model?: string | undefined;
1486
- }>>;
1487
- /** Skip this many matching calls before the first injection. */
466
+ }, z.core.$strict>>;
1488
467
  after_calls: z.ZodDefault<z.ZodNumber>;
1489
- /** Inject at most this many times; absent means every matching call. */
1490
468
  times: z.ZodOptional<z.ZodNumber>;
1491
469
  id: z.ZodLiteral<"llm.upstream_5xx">;
1492
- }, "strict", z.ZodTypeAny, {
1493
- status: 500 | 502 | 503 | 529;
1494
- id: "llm.upstream_5xx";
1495
- after_calls: number;
1496
- match?: {
1497
- tool?: string | undefined;
1498
- host?: string | undefined;
1499
- model?: string | undefined;
1500
- } | undefined;
1501
- times?: number | undefined;
1502
- stream_cut_after_chunks?: number | undefined;
1503
- }, {
1504
- id: "llm.upstream_5xx";
1505
- status?: 500 | 502 | 503 | 529 | undefined;
1506
- match?: {
1507
- tool?: string | undefined;
1508
- host?: string | undefined;
1509
- model?: string | undefined;
1510
- } | undefined;
1511
- after_calls?: number | undefined;
1512
- times?: number | undefined;
1513
- stream_cut_after_chunks?: number | undefined;
1514
- }>, z.ZodObject<{
470
+ }, z.core.$strict>, z.ZodObject<{
1515
471
  drop_oldest: z.ZodDefault<z.ZodNumber>;
1516
472
  drop_system: z.ZodDefault<z.ZodBoolean>;
1517
473
  match: z.ZodOptional<z.ZodObject<{
1518
474
  tool: z.ZodOptional<z.ZodString>;
1519
475
  host: z.ZodOptional<z.ZodString>;
1520
476
  model: z.ZodOptional<z.ZodString>;
1521
- }, "strict", z.ZodTypeAny, {
1522
- tool?: string | undefined;
1523
- host?: string | undefined;
1524
- model?: string | undefined;
1525
- }, {
1526
- tool?: string | undefined;
1527
- host?: string | undefined;
1528
- model?: string | undefined;
1529
- }>>;
1530
- /** Skip this many matching calls before the first injection. */
477
+ }, z.core.$strict>>;
1531
478
  after_calls: z.ZodDefault<z.ZodNumber>;
1532
- /** Inject at most this many times; absent means every matching call. */
1533
479
  times: z.ZodOptional<z.ZodNumber>;
1534
480
  id: z.ZodLiteral<"llm.context_trim">;
1535
- }, "strict", z.ZodTypeAny, {
1536
- id: "llm.context_trim";
1537
- after_calls: number;
1538
- drop_oldest: number;
1539
- drop_system: boolean;
1540
- match?: {
1541
- tool?: string | undefined;
1542
- host?: string | undefined;
1543
- model?: string | undefined;
1544
- } | undefined;
1545
- times?: number | undefined;
1546
- }, {
1547
- id: "llm.context_trim";
1548
- match?: {
1549
- tool?: string | undefined;
1550
- host?: string | undefined;
1551
- model?: string | undefined;
1552
- } | undefined;
1553
- after_calls?: number | undefined;
1554
- times?: number | undefined;
1555
- drop_oldest?: number | undefined;
1556
- drop_system?: boolean | undefined;
1557
- }>, z.ZodObject<{
481
+ }, z.core.$strict>, z.ZodObject<{
1558
482
  to_model: z.ZodString;
1559
483
  match: z.ZodOptional<z.ZodObject<{
1560
484
  tool: z.ZodOptional<z.ZodString>;
1561
485
  host: z.ZodOptional<z.ZodString>;
1562
486
  model: z.ZodOptional<z.ZodString>;
1563
- }, "strict", z.ZodTypeAny, {
1564
- tool?: string | undefined;
1565
- host?: string | undefined;
1566
- model?: string | undefined;
1567
- }, {
1568
- tool?: string | undefined;
1569
- host?: string | undefined;
1570
- model?: string | undefined;
1571
- }>>;
1572
- /** Skip this many matching calls before the first injection. */
487
+ }, z.core.$strict>>;
1573
488
  after_calls: z.ZodDefault<z.ZodNumber>;
1574
- /** Inject at most this many times; absent means every matching call. */
1575
489
  times: z.ZodOptional<z.ZodNumber>;
1576
490
  id: z.ZodLiteral<"llm.model_degrade">;
1577
- }, "strict", z.ZodTypeAny, {
1578
- id: "llm.model_degrade";
1579
- after_calls: number;
1580
- to_model: string;
1581
- match?: {
1582
- tool?: string | undefined;
1583
- host?: string | undefined;
1584
- model?: string | undefined;
1585
- } | undefined;
1586
- times?: number | undefined;
1587
- }, {
1588
- id: "llm.model_degrade";
1589
- to_model: string;
1590
- match?: {
1591
- tool?: string | undefined;
1592
- host?: string | undefined;
1593
- model?: string | undefined;
1594
- } | undefined;
1595
- after_calls?: number | undefined;
1596
- times?: number | undefined;
1597
- }>, z.ZodObject<{
491
+ }, z.core.$strict>, z.ZodObject<{
1598
492
  message: z.ZodDefault<z.ZodString>;
1599
493
  match: z.ZodOptional<z.ZodObject<{
1600
494
  tool: z.ZodOptional<z.ZodString>;
1601
495
  host: z.ZodOptional<z.ZodString>;
1602
496
  model: z.ZodOptional<z.ZodString>;
1603
- }, "strict", z.ZodTypeAny, {
1604
- tool?: string | undefined;
1605
- host?: string | undefined;
1606
- model?: string | undefined;
1607
- }, {
1608
- tool?: string | undefined;
1609
- host?: string | undefined;
1610
- model?: string | undefined;
1611
- }>>;
1612
- /** Skip this many matching calls before the first injection. */
497
+ }, z.core.$strict>>;
1613
498
  after_calls: z.ZodDefault<z.ZodNumber>;
1614
- /** Inject at most this many times; absent means every matching call. */
1615
499
  times: z.ZodOptional<z.ZodNumber>;
1616
500
  id: z.ZodLiteral<"tool.error">;
1617
- }, "strict", z.ZodTypeAny, {
1618
- message: string;
1619
- id: "tool.error";
1620
- after_calls: number;
1621
- match?: {
1622
- tool?: string | undefined;
1623
- host?: string | undefined;
1624
- model?: string | undefined;
1625
- } | undefined;
1626
- times?: number | undefined;
1627
- }, {
1628
- id: "tool.error";
1629
- message?: string | undefined;
1630
- match?: {
1631
- tool?: string | undefined;
1632
- host?: string | undefined;
1633
- model?: string | undefined;
1634
- } | undefined;
1635
- after_calls?: number | undefined;
1636
- times?: number | undefined;
1637
- }>, z.ZodObject<{
501
+ }, z.core.$strict>, z.ZodObject<{
1638
502
  result: z.ZodString;
1639
503
  match: z.ZodOptional<z.ZodObject<{
1640
504
  tool: z.ZodOptional<z.ZodString>;
1641
505
  host: z.ZodOptional<z.ZodString>;
1642
506
  model: z.ZodOptional<z.ZodString>;
1643
- }, "strict", z.ZodTypeAny, {
1644
- tool?: string | undefined;
1645
- host?: string | undefined;
1646
- model?: string | undefined;
1647
- }, {
1648
- tool?: string | undefined;
1649
- host?: string | undefined;
1650
- model?: string | undefined;
1651
- }>>;
1652
- /** Skip this many matching calls before the first injection. */
507
+ }, z.core.$strict>>;
1653
508
  after_calls: z.ZodDefault<z.ZodNumber>;
1654
- /** Inject at most this many times; absent means every matching call. */
1655
509
  times: z.ZodOptional<z.ZodNumber>;
1656
510
  id: z.ZodLiteral<"tool.stale_data">;
1657
- }, "strict", z.ZodTypeAny, {
1658
- id: "tool.stale_data";
1659
- after_calls: number;
1660
- result: string;
1661
- match?: {
1662
- tool?: string | undefined;
1663
- host?: string | undefined;
1664
- model?: string | undefined;
1665
- } | undefined;
1666
- times?: number | undefined;
1667
- }, {
1668
- id: "tool.stale_data";
1669
- result: string;
1670
- match?: {
1671
- tool?: string | undefined;
1672
- host?: string | undefined;
1673
- model?: string | undefined;
1674
- } | undefined;
1675
- after_calls?: number | undefined;
1676
- times?: number | undefined;
1677
- }>, z.ZodObject<{
1678
- remove: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1679
- /** Tool name → the description it is redefined with. */
511
+ }, z.core.$strict>, z.ZodObject<{
512
+ remove: z.ZodDefault<z.ZodArray<z.ZodString>>;
1680
513
  redefine: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1681
514
  match: z.ZodOptional<z.ZodObject<{
1682
515
  tool: z.ZodOptional<z.ZodString>;
1683
516
  host: z.ZodOptional<z.ZodString>;
1684
517
  model: z.ZodOptional<z.ZodString>;
1685
- }, "strict", z.ZodTypeAny, {
1686
- tool?: string | undefined;
1687
- host?: string | undefined;
1688
- model?: string | undefined;
1689
- }, {
1690
- tool?: string | undefined;
1691
- host?: string | undefined;
1692
- model?: string | undefined;
1693
- }>>;
1694
- /** Skip this many matching calls before the first injection. */
518
+ }, z.core.$strict>>;
1695
519
  after_calls: z.ZodDefault<z.ZodNumber>;
1696
- /** Inject at most this many times; absent means every matching call. */
1697
520
  times: z.ZodOptional<z.ZodNumber>;
1698
521
  id: z.ZodLiteral<"mcp.toolset_change">;
1699
- }, "strict", z.ZodTypeAny, {
1700
- id: "mcp.toolset_change";
1701
- after_calls: number;
1702
- remove: string[];
1703
- redefine: Record<string, string>;
1704
- match?: {
1705
- tool?: string | undefined;
1706
- host?: string | undefined;
1707
- model?: string | undefined;
1708
- } | undefined;
1709
- times?: number | undefined;
1710
- }, {
1711
- id: "mcp.toolset_change";
1712
- match?: {
1713
- tool?: string | undefined;
1714
- host?: string | undefined;
1715
- model?: string | undefined;
1716
- } | undefined;
1717
- after_calls?: number | undefined;
1718
- times?: number | undefined;
1719
- remove?: string[] | undefined;
1720
- redefine?: Record<string, string> | undefined;
1721
- }>, z.ZodObject<{
1722
- mode: z.ZodDefault<z.ZodEnum<["deny", "delay", "hold_then_deny"]>>;
1723
- /**
1724
- * `delay` and `hold_then_deny`: how long a held call stays held. The
1725
- * call is refused as held, the way an approval hold refuses it, and so
1726
- * is its identical retry until this many seconds have passed since the
1727
- * first refusal; then the retry is allowed (`delay`) or denied
1728
- * (`hold_then_deny`). Nothing waits: 0 holds the call once and allows
1729
- * (or denies) the first retry.
1730
- */
522
+ }, z.core.$strict>, z.ZodObject<{
523
+ mode: z.ZodDefault<z.ZodEnum<{
524
+ deny: "deny";
525
+ delay: "delay";
526
+ hold_then_deny: "hold_then_deny";
527
+ }>>;
1731
528
  delay_s: z.ZodDefault<z.ZodNumber>;
1732
529
  match: z.ZodOptional<z.ZodObject<{
1733
530
  tool: z.ZodOptional<z.ZodString>;
1734
531
  host: z.ZodOptional<z.ZodString>;
1735
532
  model: z.ZodOptional<z.ZodString>;
1736
- }, "strict", z.ZodTypeAny, {
1737
- tool?: string | undefined;
1738
- host?: string | undefined;
1739
- model?: string | undefined;
1740
- }, {
1741
- tool?: string | undefined;
1742
- host?: string | undefined;
1743
- model?: string | undefined;
1744
- }>>;
1745
- /** Skip this many matching calls before the first injection. */
533
+ }, z.core.$strict>>;
1746
534
  after_calls: z.ZodDefault<z.ZodNumber>;
1747
- /** Inject at most this many times; absent means every matching call. */
1748
535
  times: z.ZodOptional<z.ZodNumber>;
1749
536
  id: z.ZodLiteral<"permission.deny_or_delay">;
1750
- }, "strict", z.ZodTypeAny, {
1751
- id: "permission.deny_or_delay";
1752
- after_calls: number;
1753
- mode: "deny" | "delay" | "hold_then_deny";
1754
- delay_s: number;
1755
- match?: {
1756
- tool?: string | undefined;
1757
- host?: string | undefined;
1758
- model?: string | undefined;
1759
- } | undefined;
1760
- times?: number | undefined;
1761
- }, {
1762
- id: "permission.deny_or_delay";
1763
- match?: {
1764
- tool?: string | undefined;
1765
- host?: string | undefined;
1766
- model?: string | undefined;
1767
- } | undefined;
1768
- after_calls?: number | undefined;
1769
- times?: number | undefined;
1770
- mode?: "deny" | "delay" | "hold_then_deny" | undefined;
1771
- delay_s?: number | undefined;
1772
- }>, z.ZodObject<{
537
+ }, z.core.$strict>, z.ZodObject<{
1773
538
  payload: z.ZodString;
1774
539
  match: z.ZodOptional<z.ZodObject<{
1775
540
  tool: z.ZodOptional<z.ZodString>;
1776
541
  host: z.ZodOptional<z.ZodString>;
1777
542
  model: z.ZodOptional<z.ZodString>;
1778
- }, "strict", z.ZodTypeAny, {
1779
- tool?: string | undefined;
1780
- host?: string | undefined;
1781
- model?: string | undefined;
1782
- }, {
1783
- tool?: string | undefined;
1784
- host?: string | undefined;
1785
- model?: string | undefined;
1786
- }>>;
1787
- /** Skip this many matching calls before the first injection. */
543
+ }, z.core.$strict>>;
1788
544
  after_calls: z.ZodDefault<z.ZodNumber>;
1789
- /** Inject at most this many times; absent means every matching call. */
1790
545
  times: z.ZodOptional<z.ZodNumber>;
1791
546
  id: z.ZodLiteral<"inject.tool_result">;
1792
- }, "strict", z.ZodTypeAny, {
1793
- id: "inject.tool_result";
1794
- after_calls: number;
1795
- payload: string;
1796
- match?: {
1797
- tool?: string | undefined;
1798
- host?: string | undefined;
1799
- model?: string | undefined;
1800
- } | undefined;
1801
- times?: number | undefined;
1802
- }, {
1803
- id: "inject.tool_result";
1804
- payload: string;
1805
- match?: {
1806
- tool?: string | undefined;
1807
- host?: string | undefined;
1808
- model?: string | undefined;
1809
- } | undefined;
1810
- after_calls?: number | undefined;
1811
- times?: number | undefined;
1812
- }>, z.ZodObject<{
547
+ }, z.core.$strict>, z.ZodObject<{
1813
548
  match: z.ZodObject<{
1814
549
  tool: z.ZodOptional<z.ZodString>;
1815
550
  model: z.ZodOptional<z.ZodString>;
1816
- } & {
1817
551
  host: z.ZodString;
1818
- }, "strict", z.ZodTypeAny, {
1819
- host: string;
1820
- tool?: string | undefined;
1821
- model?: string | undefined;
1822
- }, {
1823
- host: string;
1824
- tool?: string | undefined;
1825
- model?: string | undefined;
1826
- }>;
1827
- /** Skip this many matching calls before the first injection. */
552
+ }, z.core.$strict>;
1828
553
  after_calls: z.ZodDefault<z.ZodNumber>;
1829
- /** Inject at most this many times; absent means every matching call. */
1830
554
  times: z.ZodOptional<z.ZodNumber>;
1831
555
  id: z.ZodLiteral<"egress.dns_fail">;
1832
- }, "strict", z.ZodTypeAny, {
1833
- id: "egress.dns_fail";
1834
- match: {
1835
- host: string;
1836
- tool?: string | undefined;
1837
- model?: string | undefined;
1838
- };
1839
- after_calls: number;
1840
- times?: number | undefined;
1841
- }, {
1842
- id: "egress.dns_fail";
1843
- match: {
1844
- host: string;
1845
- tool?: string | undefined;
1846
- model?: string | undefined;
1847
- };
1848
- after_calls?: number | undefined;
1849
- times?: number | undefined;
1850
- }>, z.ZodObject<{
556
+ }, z.core.$strict>, z.ZodObject<{
1851
557
  match: z.ZodObject<{
1852
558
  tool: z.ZodOptional<z.ZodString>;
1853
559
  model: z.ZodOptional<z.ZodString>;
1854
- } & {
1855
560
  host: z.ZodString;
1856
- }, "strict", z.ZodTypeAny, {
1857
- host: string;
1858
- tool?: string | undefined;
1859
- model?: string | undefined;
1860
- }, {
1861
- host: string;
1862
- tool?: string | undefined;
1863
- model?: string | undefined;
1864
- }>;
1865
- /** Skip this many matching calls before the first injection. */
561
+ }, z.core.$strict>;
1866
562
  after_calls: z.ZodDefault<z.ZodNumber>;
1867
- /** Inject at most this many times; absent means every matching call. */
1868
563
  times: z.ZodOptional<z.ZodNumber>;
1869
564
  id: z.ZodLiteral<"egress.credential_401">;
1870
- }, "strict", z.ZodTypeAny, {
1871
- id: "egress.credential_401";
1872
- match: {
1873
- host: string;
1874
- tool?: string | undefined;
1875
- model?: string | undefined;
1876
- };
1877
- after_calls: number;
1878
- times?: number | undefined;
1879
- }, {
1880
- id: "egress.credential_401";
1881
- match: {
1882
- host: string;
1883
- tool?: string | undefined;
1884
- model?: string | undefined;
1885
- };
1886
- after_calls?: number | undefined;
1887
- times?: number | undefined;
1888
- }>]>, "many">;
1889
- probes: z.ZodArray<z.ZodEffects<z.ZodObject<{
1890
- id: z.ZodEnum<["task_success", "no_destructive_attempt", "failure_surfaced", "no_policy_hits", "cost_multiplier_below", "recovered_within"]>;
565
+ }, z.core.$strict>], "id">>;
566
+ probes: z.ZodArray<z.ZodObject<{
567
+ id: z.ZodEnum<{
568
+ task_success: "task_success";
569
+ no_destructive_attempt: "no_destructive_attempt";
570
+ failure_surfaced: "failure_surfaced";
571
+ no_policy_hits: "no_policy_hits";
572
+ cost_multiplier_below: "cost_multiplier_below";
573
+ recovered_within: "recovered_within";
574
+ }>;
1891
575
  weight: z.ZodNumber;
1892
- /** Threshold for `cost_multiplier_below` (a ratio) and `recovered_within` (calls). */
1893
576
  value: z.ZodOptional<z.ZodNumber>;
1894
- }, "strict", z.ZodTypeAny, {
1895
- id: "task_success" | "no_destructive_attempt" | "failure_surfaced" | "no_policy_hits" | "cost_multiplier_below" | "recovered_within";
1896
- weight: number;
1897
- value?: number | undefined;
1898
- }, {
1899
- id: "task_success" | "no_destructive_attempt" | "failure_surfaced" | "no_policy_hits" | "cost_multiplier_below" | "recovered_within";
1900
- weight: number;
1901
- value?: number | undefined;
1902
- }>, {
1903
- id: "task_success" | "no_destructive_attempt" | "failure_surfaced" | "no_policy_hits" | "cost_multiplier_below" | "recovered_within";
1904
- weight: number;
1905
- value?: number | undefined;
1906
- }, {
1907
- id: "task_success" | "no_destructive_attempt" | "failure_surfaced" | "no_policy_hits" | "cost_multiplier_below" | "recovered_within";
1908
- weight: number;
1909
- value?: number | undefined;
1910
- }>, "many">;
1911
- /** A cost ceiling is mandatory: every run spends real tokens. */
1912
- abort: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"destructive_attempt">, z.ZodObject<{
577
+ }, z.core.$strict>>;
578
+ abort: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"destructive_attempt">, z.ZodObject<{
1913
579
  cost_usd_above: z.ZodNumber;
1914
- }, "strict", z.ZodTypeAny, {
1915
- cost_usd_above: number;
1916
- }, {
1917
- cost_usd_above: number;
1918
- }>, z.ZodObject<{
580
+ }, z.core.$strict>, z.ZodObject<{
1919
581
  wall_clock_s_above: z.ZodNumber;
1920
- }, "strict", z.ZodTypeAny, {
1921
- wall_clock_s_above: number;
1922
- }, {
1923
- wall_clock_s_above: number;
1924
- }>]>, "many">, ("destructive_attempt" | {
1925
- cost_usd_above: number;
1926
- } | {
1927
- wall_clock_s_above: number;
1928
- })[], ("destructive_attempt" | {
1929
- cost_usd_above: number;
1930
- } | {
1931
- wall_clock_s_above: number;
1932
- })[]>;
582
+ }, z.core.$strict>]>>;
1933
583
  sandbox_image: z.ZodOptional<z.ZodString>;
1934
- }, "strict", z.ZodTypeAny, {
1935
- name: string;
1936
- faults: ({
1937
- id: "llm.rate_limit";
1938
- retry_after_s: number;
1939
- after_calls: number;
1940
- match?: {
1941
- tool?: string | undefined;
1942
- host?: string | undefined;
1943
- model?: string | undefined;
1944
- } | undefined;
1945
- times?: number | undefined;
1946
- } | {
1947
- status: 500 | 502 | 503 | 529;
1948
- id: "llm.upstream_5xx";
1949
- after_calls: number;
1950
- match?: {
1951
- tool?: string | undefined;
1952
- host?: string | undefined;
1953
- model?: string | undefined;
1954
- } | undefined;
1955
- times?: number | undefined;
1956
- stream_cut_after_chunks?: number | undefined;
1957
- } | {
1958
- id: "llm.context_trim";
1959
- after_calls: number;
1960
- drop_oldest: number;
1961
- drop_system: boolean;
1962
- match?: {
1963
- tool?: string | undefined;
1964
- host?: string | undefined;
1965
- model?: string | undefined;
1966
- } | undefined;
1967
- times?: number | undefined;
1968
- } | {
1969
- id: "llm.model_degrade";
1970
- after_calls: number;
1971
- to_model: string;
1972
- match?: {
1973
- tool?: string | undefined;
1974
- host?: string | undefined;
1975
- model?: string | undefined;
1976
- } | undefined;
1977
- times?: number | undefined;
1978
- } | {
1979
- message: string;
1980
- id: "tool.error";
1981
- after_calls: number;
1982
- match?: {
1983
- tool?: string | undefined;
1984
- host?: string | undefined;
1985
- model?: string | undefined;
1986
- } | undefined;
1987
- times?: number | undefined;
1988
- } | {
1989
- id: "tool.stale_data";
1990
- after_calls: number;
1991
- result: string;
1992
- match?: {
1993
- tool?: string | undefined;
1994
- host?: string | undefined;
1995
- model?: string | undefined;
1996
- } | undefined;
1997
- times?: number | undefined;
1998
- } | {
1999
- id: "mcp.toolset_change";
2000
- after_calls: number;
2001
- remove: string[];
2002
- redefine: Record<string, string>;
2003
- match?: {
2004
- tool?: string | undefined;
2005
- host?: string | undefined;
2006
- model?: string | undefined;
2007
- } | undefined;
2008
- times?: number | undefined;
2009
- } | {
2010
- id: "permission.deny_or_delay";
2011
- after_calls: number;
2012
- mode: "deny" | "delay" | "hold_then_deny";
2013
- delay_s: number;
2014
- match?: {
2015
- tool?: string | undefined;
2016
- host?: string | undefined;
2017
- model?: string | undefined;
2018
- } | undefined;
2019
- times?: number | undefined;
2020
- } | {
2021
- id: "inject.tool_result";
2022
- after_calls: number;
2023
- payload: string;
2024
- match?: {
2025
- tool?: string | undefined;
2026
- host?: string | undefined;
2027
- model?: string | undefined;
2028
- } | undefined;
2029
- times?: number | undefined;
2030
- } | {
2031
- id: "egress.dns_fail";
2032
- match: {
2033
- host: string;
2034
- tool?: string | undefined;
2035
- model?: string | undefined;
2036
- };
2037
- after_calls: number;
2038
- times?: number | undefined;
2039
- } | {
2040
- id: "egress.credential_401";
2041
- match: {
2042
- host: string;
2043
- tool?: string | undefined;
2044
- model?: string | undefined;
2045
- };
2046
- after_calls: number;
2047
- times?: number | undefined;
2048
- })[];
2049
- abort: ("destructive_attempt" | {
2050
- cost_usd_above: number;
2051
- } | {
2052
- wall_clock_s_above: number;
2053
- })[];
2054
- agent: string;
2055
- verify: string;
2056
- repeat: number;
2057
- probes: {
2058
- id: "task_success" | "no_destructive_attempt" | "failure_surfaced" | "no_policy_hits" | "cost_multiplier_below" | "recovered_within";
2059
- weight: number;
2060
- value?: number | undefined;
2061
- }[];
2062
- description?: string | undefined;
2063
- sandbox_image?: string | undefined;
2064
- }, {
2065
- name: string;
2066
- faults: ({
2067
- id: "llm.rate_limit";
2068
- retry_after_s?: number | undefined;
2069
- match?: {
2070
- tool?: string | undefined;
2071
- host?: string | undefined;
2072
- model?: string | undefined;
2073
- } | undefined;
2074
- after_calls?: number | undefined;
2075
- times?: number | undefined;
2076
- } | {
2077
- id: "llm.upstream_5xx";
2078
- status?: 500 | 502 | 503 | 529 | undefined;
2079
- match?: {
2080
- tool?: string | undefined;
2081
- host?: string | undefined;
2082
- model?: string | undefined;
2083
- } | undefined;
2084
- after_calls?: number | undefined;
2085
- times?: number | undefined;
2086
- stream_cut_after_chunks?: number | undefined;
2087
- } | {
2088
- id: "llm.context_trim";
2089
- match?: {
2090
- tool?: string | undefined;
2091
- host?: string | undefined;
2092
- model?: string | undefined;
2093
- } | undefined;
2094
- after_calls?: number | undefined;
2095
- times?: number | undefined;
2096
- drop_oldest?: number | undefined;
2097
- drop_system?: boolean | undefined;
2098
- } | {
2099
- id: "llm.model_degrade";
2100
- to_model: string;
2101
- match?: {
2102
- tool?: string | undefined;
2103
- host?: string | undefined;
2104
- model?: string | undefined;
2105
- } | undefined;
2106
- after_calls?: number | undefined;
2107
- times?: number | undefined;
2108
- } | {
2109
- id: "tool.error";
2110
- message?: string | undefined;
2111
- match?: {
2112
- tool?: string | undefined;
2113
- host?: string | undefined;
2114
- model?: string | undefined;
2115
- } | undefined;
2116
- after_calls?: number | undefined;
2117
- times?: number | undefined;
2118
- } | {
2119
- id: "tool.stale_data";
2120
- result: string;
2121
- match?: {
2122
- tool?: string | undefined;
2123
- host?: string | undefined;
2124
- model?: string | undefined;
2125
- } | undefined;
2126
- after_calls?: number | undefined;
2127
- times?: number | undefined;
2128
- } | {
2129
- id: "mcp.toolset_change";
2130
- match?: {
2131
- tool?: string | undefined;
2132
- host?: string | undefined;
2133
- model?: string | undefined;
2134
- } | undefined;
2135
- after_calls?: number | undefined;
2136
- times?: number | undefined;
2137
- remove?: string[] | undefined;
2138
- redefine?: Record<string, string> | undefined;
2139
- } | {
2140
- id: "permission.deny_or_delay";
2141
- match?: {
2142
- tool?: string | undefined;
2143
- host?: string | undefined;
2144
- model?: string | undefined;
2145
- } | undefined;
2146
- after_calls?: number | undefined;
2147
- times?: number | undefined;
2148
- mode?: "deny" | "delay" | "hold_then_deny" | undefined;
2149
- delay_s?: number | undefined;
2150
- } | {
2151
- id: "inject.tool_result";
2152
- payload: string;
2153
- match?: {
2154
- tool?: string | undefined;
2155
- host?: string | undefined;
2156
- model?: string | undefined;
2157
- } | undefined;
2158
- after_calls?: number | undefined;
2159
- times?: number | undefined;
2160
- } | {
2161
- id: "egress.dns_fail";
2162
- match: {
2163
- host: string;
2164
- tool?: string | undefined;
2165
- model?: string | undefined;
2166
- };
2167
- after_calls?: number | undefined;
2168
- times?: number | undefined;
2169
- } | {
2170
- id: "egress.credential_401";
2171
- match: {
2172
- host: string;
2173
- tool?: string | undefined;
2174
- model?: string | undefined;
2175
- };
2176
- after_calls?: number | undefined;
2177
- times?: number | undefined;
2178
- })[];
2179
- abort: ("destructive_attempt" | {
2180
- cost_usd_above: number;
2181
- } | {
2182
- wall_clock_s_above: number;
2183
- })[];
2184
- agent: string;
2185
- verify: string;
2186
- probes: {
2187
- id: "task_success" | "no_destructive_attempt" | "failure_surfaced" | "no_policy_hits" | "cost_multiplier_below" | "recovered_within";
2188
- weight: number;
2189
- value?: number | undefined;
2190
- }[];
2191
- description?: string | undefined;
2192
- repeat?: number | undefined;
2193
- sandbox_image?: string | undefined;
2194
- }>;
584
+ }, z.core.$strict>;
2195
585
  export type Experiment = z.infer<typeof ExperimentSchema>;
2196
586
  /** One probe's outcome across a run's faulted repetitions. */
2197
587
  export interface ProbeOutcome {