@handlebar/governance-schema 0.2.0 → 0.3.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.
@@ -33,904 +33,7 @@ export declare const RuleSchema: z.ZodObject<{
33
33
  tagsAny: z.ZodOptional<z.ZodArray<z.ZodString>>;
34
34
  }, z.core.$strict>>;
35
35
  }, z.core.$strict>;
36
- condition: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
37
- kind: z.ZodLiteral<"toolName">;
38
- op: z.ZodEnum<{
39
- eq: "eq";
40
- neq: "neq";
41
- contains: "contains";
42
- startsWith: "startsWith";
43
- endsWith: "endsWith";
44
- glob: "glob";
45
- }>;
46
- value: z.ZodString;
47
- }, z.core.$strict>, z.ZodObject<{
48
- kind: z.ZodLiteral<"toolName">;
49
- op: z.ZodLiteral<"in">;
50
- value: z.ZodArray<z.ZodString>;
51
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
52
- kind: z.ZodLiteral<"toolTag">;
53
- op: z.ZodLiteral<"has">;
54
- tag: z.ZodString;
55
- }, z.core.$strict>, z.ZodObject<{
56
- kind: z.ZodLiteral<"toolTag">;
57
- op: z.ZodLiteral<"anyOf">;
58
- tags: z.ZodArray<z.ZodString>;
59
- }, z.core.$strict>, z.ZodObject<{
60
- kind: z.ZodLiteral<"toolTag">;
61
- op: z.ZodLiteral<"allOf">;
62
- tags: z.ZodArray<z.ZodString>;
63
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
64
- kind: z.ZodLiteral<"toolArg">;
65
- type: z.ZodLiteral<"string">;
66
- op: z.ZodEnum<{
67
- in: "in";
68
- eq: "eq";
69
- neq: "neq";
70
- contains: "contains";
71
- startsWith: "startsWith";
72
- endsWith: "endsWith";
73
- }>;
74
- path: z.ZodString;
75
- value: z.ZodString;
76
- }, z.core.$strip>, z.ZodObject<{
77
- kind: z.ZodLiteral<"toolArg">;
78
- type: z.ZodLiteral<"number">;
79
- op: z.ZodEnum<{
80
- gt: "gt";
81
- gte: "gte";
82
- lt: "lt";
83
- lte: "lte";
84
- eq: "eq";
85
- neq: "neq";
86
- }>;
87
- path: z.ZodString;
88
- value: z.ZodNumber;
89
- }, z.core.$strip>, z.ZodObject<{
90
- kind: z.ZodLiteral<"toolArg">;
91
- type: z.ZodLiteral<"boolean">;
92
- op: z.ZodLiteral<"eq">;
93
- path: z.ZodString;
94
- value: z.ZodBoolean;
95
- }, z.core.$strip>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
96
- kind: z.ZodLiteral<"enduserTag">;
97
- op: z.ZodLiteral<"has">;
98
- tag: z.ZodString;
99
- }, z.core.$strict>, z.ZodObject<{
100
- kind: z.ZodLiteral<"enduserTag">;
101
- op: z.ZodLiteral<"hasValue">;
102
- tag: z.ZodString;
103
- value: z.ZodString;
104
- }, z.core.$strict>, z.ZodObject<{
105
- kind: z.ZodLiteral<"enduserTag">;
106
- op: z.ZodLiteral<"hasValueAny">;
107
- tag: z.ZodString;
108
- values: z.ZodArray<z.ZodString>;
109
- }, z.core.$strict>], "op">, z.ZodObject<{
110
- kind: z.ZodLiteral<"executionTime">;
111
- scope: z.ZodEnum<{
112
- tool: "tool";
113
- total: "total";
114
- }>;
115
- op: z.ZodEnum<{
116
- gt: "gt";
117
- gte: "gte";
118
- lt: "lt";
119
- lte: "lte";
120
- eq: "eq";
121
- neq: "neq";
122
- }>;
123
- ms: z.ZodNumber;
124
- }, z.core.$strict>, z.ZodObject<{
125
- kind: z.ZodLiteral<"sequence">;
126
- mustHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
127
- mustNotHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
128
- }, z.core.$strict>, z.ZodObject<{
129
- kind: z.ZodLiteral<"maxCalls">;
130
- selector: z.ZodDiscriminatedUnion<[z.ZodObject<{
131
- by: z.ZodLiteral<"toolName">;
132
- patterns: z.ZodArray<z.ZodString>;
133
- }, z.core.$strict>, z.ZodObject<{
134
- by: z.ZodLiteral<"toolTag">;
135
- tags: z.ZodArray<z.ZodString>;
136
- }, z.core.$strict>], "by">;
137
- max: z.ZodNumber;
138
- }, z.core.$strict>, z.ZodObject<{
139
- kind: z.ZodLiteral<"custom">;
140
- name: z.ZodString;
141
- args: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>;
142
- }, z.core.$strict>, z.ZodObject<{
143
- kind: z.ZodLiteral<"metricWindow">;
144
- scope: z.ZodEnum<{
145
- agent: "agent";
146
- agent_user: "agent_user";
147
- }>;
148
- metric: z.ZodDiscriminatedUnion<[z.ZodObject<{
149
- kind: z.ZodLiteral<"inbuilt">;
150
- key: z.ZodEnum<{
151
- bytes_in: "bytes_in";
152
- bytes_out: "bytes_out";
153
- duration_ms: "duration_ms";
154
- records_in: "records_in";
155
- records_out: "records_out";
156
- llm_tokens_in: "llm_tokens_in";
157
- llm_tokens_out: "llm_tokens_out";
158
- llm_cost_usd: "llm_cost_usd";
159
- }>;
160
- }, z.core.$strict>, z.ZodObject<{
161
- kind: z.ZodLiteral<"custom">;
162
- key: z.ZodString;
163
- }, z.core.$strict>], "kind">;
164
- aggregate: z.ZodEnum<{
165
- sum: "sum";
166
- avg: "avg";
167
- max: "max";
168
- min: "min";
169
- count: "count";
170
- }>;
171
- windowSeconds: z.ZodNumber;
172
- filter: z.ZodOptional<z.ZodObject<{
173
- toolName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
174
- toolTag: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
175
- }, z.core.$strict>>;
176
- op: z.ZodEnum<{
177
- gt: "gt";
178
- gte: "gte";
179
- lt: "lt";
180
- lte: "lte";
181
- eq: "eq";
182
- neq: "neq";
183
- }>;
184
- value: z.ZodNumber;
185
- onMissing: z.ZodOptional<z.ZodEnum<{
186
- hitl: "hitl";
187
- allow: "allow";
188
- block: "block";
189
- }>>;
190
- }, z.core.$strict>, z.ZodObject<{
191
- kind: z.ZodLiteral<"timeGate">;
192
- timezone: z.ZodObject<{
193
- source: z.ZodLiteral<"enduserTag">;
194
- tag: z.ZodString;
195
- fallback: z.ZodOptional<z.ZodLiteral<"org">>;
196
- }, z.core.$strict>;
197
- windows: z.ZodArray<z.ZodObject<{
198
- days: z.ZodArray<z.ZodEnum<{
199
- mon: "mon";
200
- tue: "tue";
201
- wed: "wed";
202
- thu: "thu";
203
- fri: "fri";
204
- sat: "sat";
205
- sun: "sun";
206
- }>>;
207
- start: z.ZodString;
208
- end: z.ZodString;
209
- }, z.core.$strict>>;
210
- }, z.core.$strict>, z.ZodObject<{
211
- kind: z.ZodLiteral<"requireSubject">;
212
- subjectType: z.ZodString;
213
- idSystem: z.ZodOptional<z.ZodString>;
214
- }, z.core.$strict>, z.ZodObject<{
215
- kind: z.ZodLiteral<"signal">;
216
- key: z.ZodString;
217
- args: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
218
- from: z.ZodLiteral<"enduserId">;
219
- }, z.core.$strict>, z.ZodObject<{
220
- from: z.ZodLiteral<"enduserTag">;
221
- tag: z.ZodString;
222
- }, z.core.$strict>, z.ZodObject<{
223
- from: z.ZodLiteral<"toolName">;
224
- }, z.core.$strict>, z.ZodObject<{
225
- from: z.ZodLiteral<"toolTag">;
226
- tag: z.ZodString;
227
- }, z.core.$strict>, z.ZodObject<{
228
- from: z.ZodLiteral<"toolArg">;
229
- path: z.ZodString;
230
- }, z.core.$strict>, z.ZodObject<{
231
- from: z.ZodLiteral<"subject">;
232
- subjectType: z.ZodString;
233
- role: z.ZodOptional<z.ZodString>;
234
- field: z.ZodOptional<z.ZodEnum<{
235
- idSystem: "idSystem";
236
- id: "id";
237
- }>>;
238
- }, z.core.$strict>, z.ZodObject<{
239
- from: z.ZodLiteral<"const">;
240
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
241
- }, z.core.$strict>], "from">>;
242
- op: z.ZodEnum<{
243
- in: "in";
244
- gt: "gt";
245
- gte: "gte";
246
- lt: "lt";
247
- lte: "lte";
248
- eq: "eq";
249
- neq: "neq";
250
- nin: "nin";
251
- }>;
252
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
253
- onMissing: z.ZodOptional<z.ZodEnum<{
254
- hitl: "hitl";
255
- allow: "allow";
256
- block: "block";
257
- }>>;
258
- }, z.core.$strict>]>, z.ZodObject<{
259
- kind: z.ZodLiteral<"and">;
260
- all: z.ZodArray<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
261
- kind: z.ZodLiteral<"toolName">;
262
- op: z.ZodEnum<{
263
- eq: "eq";
264
- neq: "neq";
265
- contains: "contains";
266
- startsWith: "startsWith";
267
- endsWith: "endsWith";
268
- glob: "glob";
269
- }>;
270
- value: z.ZodString;
271
- }, z.core.$strict>, z.ZodObject<{
272
- kind: z.ZodLiteral<"toolName">;
273
- op: z.ZodLiteral<"in">;
274
- value: z.ZodArray<z.ZodString>;
275
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
276
- kind: z.ZodLiteral<"toolTag">;
277
- op: z.ZodLiteral<"has">;
278
- tag: z.ZodString;
279
- }, z.core.$strict>, z.ZodObject<{
280
- kind: z.ZodLiteral<"toolTag">;
281
- op: z.ZodLiteral<"anyOf">;
282
- tags: z.ZodArray<z.ZodString>;
283
- }, z.core.$strict>, z.ZodObject<{
284
- kind: z.ZodLiteral<"toolTag">;
285
- op: z.ZodLiteral<"allOf">;
286
- tags: z.ZodArray<z.ZodString>;
287
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
288
- kind: z.ZodLiteral<"toolArg">;
289
- type: z.ZodLiteral<"string">;
290
- op: z.ZodEnum<{
291
- in: "in";
292
- eq: "eq";
293
- neq: "neq";
294
- contains: "contains";
295
- startsWith: "startsWith";
296
- endsWith: "endsWith";
297
- }>;
298
- path: z.ZodString;
299
- value: z.ZodString;
300
- }, z.core.$strip>, z.ZodObject<{
301
- kind: z.ZodLiteral<"toolArg">;
302
- type: z.ZodLiteral<"number">;
303
- op: z.ZodEnum<{
304
- gt: "gt";
305
- gte: "gte";
306
- lt: "lt";
307
- lte: "lte";
308
- eq: "eq";
309
- neq: "neq";
310
- }>;
311
- path: z.ZodString;
312
- value: z.ZodNumber;
313
- }, z.core.$strip>, z.ZodObject<{
314
- kind: z.ZodLiteral<"toolArg">;
315
- type: z.ZodLiteral<"boolean">;
316
- op: z.ZodLiteral<"eq">;
317
- path: z.ZodString;
318
- value: z.ZodBoolean;
319
- }, z.core.$strip>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
320
- kind: z.ZodLiteral<"enduserTag">;
321
- op: z.ZodLiteral<"has">;
322
- tag: z.ZodString;
323
- }, z.core.$strict>, z.ZodObject<{
324
- kind: z.ZodLiteral<"enduserTag">;
325
- op: z.ZodLiteral<"hasValue">;
326
- tag: z.ZodString;
327
- value: z.ZodString;
328
- }, z.core.$strict>, z.ZodObject<{
329
- kind: z.ZodLiteral<"enduserTag">;
330
- op: z.ZodLiteral<"hasValueAny">;
331
- tag: z.ZodString;
332
- values: z.ZodArray<z.ZodString>;
333
- }, z.core.$strict>], "op">, z.ZodObject<{
334
- kind: z.ZodLiteral<"executionTime">;
335
- scope: z.ZodEnum<{
336
- tool: "tool";
337
- total: "total";
338
- }>;
339
- op: z.ZodEnum<{
340
- gt: "gt";
341
- gte: "gte";
342
- lt: "lt";
343
- lte: "lte";
344
- eq: "eq";
345
- neq: "neq";
346
- }>;
347
- ms: z.ZodNumber;
348
- }, z.core.$strict>, z.ZodObject<{
349
- kind: z.ZodLiteral<"sequence">;
350
- mustHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
351
- mustNotHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
352
- }, z.core.$strict>, z.ZodObject<{
353
- kind: z.ZodLiteral<"maxCalls">;
354
- selector: z.ZodDiscriminatedUnion<[z.ZodObject<{
355
- by: z.ZodLiteral<"toolName">;
356
- patterns: z.ZodArray<z.ZodString>;
357
- }, z.core.$strict>, z.ZodObject<{
358
- by: z.ZodLiteral<"toolTag">;
359
- tags: z.ZodArray<z.ZodString>;
360
- }, z.core.$strict>], "by">;
361
- max: z.ZodNumber;
362
- }, z.core.$strict>, z.ZodObject<{
363
- kind: z.ZodLiteral<"custom">;
364
- name: z.ZodString;
365
- args: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>;
366
- }, z.core.$strict>, z.ZodObject<{
367
- kind: z.ZodLiteral<"metricWindow">;
368
- scope: z.ZodEnum<{
369
- agent: "agent";
370
- agent_user: "agent_user";
371
- }>;
372
- metric: z.ZodDiscriminatedUnion<[z.ZodObject<{
373
- kind: z.ZodLiteral<"inbuilt">;
374
- key: z.ZodEnum<{
375
- bytes_in: "bytes_in";
376
- bytes_out: "bytes_out";
377
- duration_ms: "duration_ms";
378
- records_in: "records_in";
379
- records_out: "records_out";
380
- llm_tokens_in: "llm_tokens_in";
381
- llm_tokens_out: "llm_tokens_out";
382
- llm_cost_usd: "llm_cost_usd";
383
- }>;
384
- }, z.core.$strict>, z.ZodObject<{
385
- kind: z.ZodLiteral<"custom">;
386
- key: z.ZodString;
387
- }, z.core.$strict>], "kind">;
388
- aggregate: z.ZodEnum<{
389
- sum: "sum";
390
- avg: "avg";
391
- max: "max";
392
- min: "min";
393
- count: "count";
394
- }>;
395
- windowSeconds: z.ZodNumber;
396
- filter: z.ZodOptional<z.ZodObject<{
397
- toolName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
398
- toolTag: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
399
- }, z.core.$strict>>;
400
- op: z.ZodEnum<{
401
- gt: "gt";
402
- gte: "gte";
403
- lt: "lt";
404
- lte: "lte";
405
- eq: "eq";
406
- neq: "neq";
407
- }>;
408
- value: z.ZodNumber;
409
- onMissing: z.ZodOptional<z.ZodEnum<{
410
- hitl: "hitl";
411
- allow: "allow";
412
- block: "block";
413
- }>>;
414
- }, z.core.$strict>, z.ZodObject<{
415
- kind: z.ZodLiteral<"timeGate">;
416
- timezone: z.ZodObject<{
417
- source: z.ZodLiteral<"enduserTag">;
418
- tag: z.ZodString;
419
- fallback: z.ZodOptional<z.ZodLiteral<"org">>;
420
- }, z.core.$strict>;
421
- windows: z.ZodArray<z.ZodObject<{
422
- days: z.ZodArray<z.ZodEnum<{
423
- mon: "mon";
424
- tue: "tue";
425
- wed: "wed";
426
- thu: "thu";
427
- fri: "fri";
428
- sat: "sat";
429
- sun: "sun";
430
- }>>;
431
- start: z.ZodString;
432
- end: z.ZodString;
433
- }, z.core.$strict>>;
434
- }, z.core.$strict>, z.ZodObject<{
435
- kind: z.ZodLiteral<"requireSubject">;
436
- subjectType: z.ZodString;
437
- idSystem: z.ZodOptional<z.ZodString>;
438
- }, z.core.$strict>, z.ZodObject<{
439
- kind: z.ZodLiteral<"signal">;
440
- key: z.ZodString;
441
- args: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
442
- from: z.ZodLiteral<"enduserId">;
443
- }, z.core.$strict>, z.ZodObject<{
444
- from: z.ZodLiteral<"enduserTag">;
445
- tag: z.ZodString;
446
- }, z.core.$strict>, z.ZodObject<{
447
- from: z.ZodLiteral<"toolName">;
448
- }, z.core.$strict>, z.ZodObject<{
449
- from: z.ZodLiteral<"toolTag">;
450
- tag: z.ZodString;
451
- }, z.core.$strict>, z.ZodObject<{
452
- from: z.ZodLiteral<"toolArg">;
453
- path: z.ZodString;
454
- }, z.core.$strict>, z.ZodObject<{
455
- from: z.ZodLiteral<"subject">;
456
- subjectType: z.ZodString;
457
- role: z.ZodOptional<z.ZodString>;
458
- field: z.ZodOptional<z.ZodEnum<{
459
- idSystem: "idSystem";
460
- id: "id";
461
- }>>;
462
- }, z.core.$strict>, z.ZodObject<{
463
- from: z.ZodLiteral<"const">;
464
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
465
- }, z.core.$strict>], "from">>;
466
- op: z.ZodEnum<{
467
- in: "in";
468
- gt: "gt";
469
- gte: "gte";
470
- lt: "lt";
471
- lte: "lte";
472
- eq: "eq";
473
- neq: "neq";
474
- nin: "nin";
475
- }>;
476
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
477
- onMissing: z.ZodOptional<z.ZodEnum<{
478
- hitl: "hitl";
479
- allow: "allow";
480
- block: "block";
481
- }>>;
482
- }, z.core.$strict>]>>;
483
- }, z.core.$strict>, z.ZodObject<{
484
- kind: z.ZodLiteral<"or">;
485
- any: z.ZodArray<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
486
- kind: z.ZodLiteral<"toolName">;
487
- op: z.ZodEnum<{
488
- eq: "eq";
489
- neq: "neq";
490
- contains: "contains";
491
- startsWith: "startsWith";
492
- endsWith: "endsWith";
493
- glob: "glob";
494
- }>;
495
- value: z.ZodString;
496
- }, z.core.$strict>, z.ZodObject<{
497
- kind: z.ZodLiteral<"toolName">;
498
- op: z.ZodLiteral<"in">;
499
- value: z.ZodArray<z.ZodString>;
500
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
501
- kind: z.ZodLiteral<"toolTag">;
502
- op: z.ZodLiteral<"has">;
503
- tag: z.ZodString;
504
- }, z.core.$strict>, z.ZodObject<{
505
- kind: z.ZodLiteral<"toolTag">;
506
- op: z.ZodLiteral<"anyOf">;
507
- tags: z.ZodArray<z.ZodString>;
508
- }, z.core.$strict>, z.ZodObject<{
509
- kind: z.ZodLiteral<"toolTag">;
510
- op: z.ZodLiteral<"allOf">;
511
- tags: z.ZodArray<z.ZodString>;
512
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
513
- kind: z.ZodLiteral<"toolArg">;
514
- type: z.ZodLiteral<"string">;
515
- op: z.ZodEnum<{
516
- in: "in";
517
- eq: "eq";
518
- neq: "neq";
519
- contains: "contains";
520
- startsWith: "startsWith";
521
- endsWith: "endsWith";
522
- }>;
523
- path: z.ZodString;
524
- value: z.ZodString;
525
- }, z.core.$strip>, z.ZodObject<{
526
- kind: z.ZodLiteral<"toolArg">;
527
- type: z.ZodLiteral<"number">;
528
- op: z.ZodEnum<{
529
- gt: "gt";
530
- gte: "gte";
531
- lt: "lt";
532
- lte: "lte";
533
- eq: "eq";
534
- neq: "neq";
535
- }>;
536
- path: z.ZodString;
537
- value: z.ZodNumber;
538
- }, z.core.$strip>, z.ZodObject<{
539
- kind: z.ZodLiteral<"toolArg">;
540
- type: z.ZodLiteral<"boolean">;
541
- op: z.ZodLiteral<"eq">;
542
- path: z.ZodString;
543
- value: z.ZodBoolean;
544
- }, z.core.$strip>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
545
- kind: z.ZodLiteral<"enduserTag">;
546
- op: z.ZodLiteral<"has">;
547
- tag: z.ZodString;
548
- }, z.core.$strict>, z.ZodObject<{
549
- kind: z.ZodLiteral<"enduserTag">;
550
- op: z.ZodLiteral<"hasValue">;
551
- tag: z.ZodString;
552
- value: z.ZodString;
553
- }, z.core.$strict>, z.ZodObject<{
554
- kind: z.ZodLiteral<"enduserTag">;
555
- op: z.ZodLiteral<"hasValueAny">;
556
- tag: z.ZodString;
557
- values: z.ZodArray<z.ZodString>;
558
- }, z.core.$strict>], "op">, z.ZodObject<{
559
- kind: z.ZodLiteral<"executionTime">;
560
- scope: z.ZodEnum<{
561
- tool: "tool";
562
- total: "total";
563
- }>;
564
- op: z.ZodEnum<{
565
- gt: "gt";
566
- gte: "gte";
567
- lt: "lt";
568
- lte: "lte";
569
- eq: "eq";
570
- neq: "neq";
571
- }>;
572
- ms: z.ZodNumber;
573
- }, z.core.$strict>, z.ZodObject<{
574
- kind: z.ZodLiteral<"sequence">;
575
- mustHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
576
- mustNotHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
577
- }, z.core.$strict>, z.ZodObject<{
578
- kind: z.ZodLiteral<"maxCalls">;
579
- selector: z.ZodDiscriminatedUnion<[z.ZodObject<{
580
- by: z.ZodLiteral<"toolName">;
581
- patterns: z.ZodArray<z.ZodString>;
582
- }, z.core.$strict>, z.ZodObject<{
583
- by: z.ZodLiteral<"toolTag">;
584
- tags: z.ZodArray<z.ZodString>;
585
- }, z.core.$strict>], "by">;
586
- max: z.ZodNumber;
587
- }, z.core.$strict>, z.ZodObject<{
588
- kind: z.ZodLiteral<"custom">;
589
- name: z.ZodString;
590
- args: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>;
591
- }, z.core.$strict>, z.ZodObject<{
592
- kind: z.ZodLiteral<"metricWindow">;
593
- scope: z.ZodEnum<{
594
- agent: "agent";
595
- agent_user: "agent_user";
596
- }>;
597
- metric: z.ZodDiscriminatedUnion<[z.ZodObject<{
598
- kind: z.ZodLiteral<"inbuilt">;
599
- key: z.ZodEnum<{
600
- bytes_in: "bytes_in";
601
- bytes_out: "bytes_out";
602
- duration_ms: "duration_ms";
603
- records_in: "records_in";
604
- records_out: "records_out";
605
- llm_tokens_in: "llm_tokens_in";
606
- llm_tokens_out: "llm_tokens_out";
607
- llm_cost_usd: "llm_cost_usd";
608
- }>;
609
- }, z.core.$strict>, z.ZodObject<{
610
- kind: z.ZodLiteral<"custom">;
611
- key: z.ZodString;
612
- }, z.core.$strict>], "kind">;
613
- aggregate: z.ZodEnum<{
614
- sum: "sum";
615
- avg: "avg";
616
- max: "max";
617
- min: "min";
618
- count: "count";
619
- }>;
620
- windowSeconds: z.ZodNumber;
621
- filter: z.ZodOptional<z.ZodObject<{
622
- toolName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
623
- toolTag: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
624
- }, z.core.$strict>>;
625
- op: z.ZodEnum<{
626
- gt: "gt";
627
- gte: "gte";
628
- lt: "lt";
629
- lte: "lte";
630
- eq: "eq";
631
- neq: "neq";
632
- }>;
633
- value: z.ZodNumber;
634
- onMissing: z.ZodOptional<z.ZodEnum<{
635
- hitl: "hitl";
636
- allow: "allow";
637
- block: "block";
638
- }>>;
639
- }, z.core.$strict>, z.ZodObject<{
640
- kind: z.ZodLiteral<"timeGate">;
641
- timezone: z.ZodObject<{
642
- source: z.ZodLiteral<"enduserTag">;
643
- tag: z.ZodString;
644
- fallback: z.ZodOptional<z.ZodLiteral<"org">>;
645
- }, z.core.$strict>;
646
- windows: z.ZodArray<z.ZodObject<{
647
- days: z.ZodArray<z.ZodEnum<{
648
- mon: "mon";
649
- tue: "tue";
650
- wed: "wed";
651
- thu: "thu";
652
- fri: "fri";
653
- sat: "sat";
654
- sun: "sun";
655
- }>>;
656
- start: z.ZodString;
657
- end: z.ZodString;
658
- }, z.core.$strict>>;
659
- }, z.core.$strict>, z.ZodObject<{
660
- kind: z.ZodLiteral<"requireSubject">;
661
- subjectType: z.ZodString;
662
- idSystem: z.ZodOptional<z.ZodString>;
663
- }, z.core.$strict>, z.ZodObject<{
664
- kind: z.ZodLiteral<"signal">;
665
- key: z.ZodString;
666
- args: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
667
- from: z.ZodLiteral<"enduserId">;
668
- }, z.core.$strict>, z.ZodObject<{
669
- from: z.ZodLiteral<"enduserTag">;
670
- tag: z.ZodString;
671
- }, z.core.$strict>, z.ZodObject<{
672
- from: z.ZodLiteral<"toolName">;
673
- }, z.core.$strict>, z.ZodObject<{
674
- from: z.ZodLiteral<"toolTag">;
675
- tag: z.ZodString;
676
- }, z.core.$strict>, z.ZodObject<{
677
- from: z.ZodLiteral<"toolArg">;
678
- path: z.ZodString;
679
- }, z.core.$strict>, z.ZodObject<{
680
- from: z.ZodLiteral<"subject">;
681
- subjectType: z.ZodString;
682
- role: z.ZodOptional<z.ZodString>;
683
- field: z.ZodOptional<z.ZodEnum<{
684
- idSystem: "idSystem";
685
- id: "id";
686
- }>>;
687
- }, z.core.$strict>, z.ZodObject<{
688
- from: z.ZodLiteral<"const">;
689
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
690
- }, z.core.$strict>], "from">>;
691
- op: z.ZodEnum<{
692
- in: "in";
693
- gt: "gt";
694
- gte: "gte";
695
- lt: "lt";
696
- lte: "lte";
697
- eq: "eq";
698
- neq: "neq";
699
- nin: "nin";
700
- }>;
701
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
702
- onMissing: z.ZodOptional<z.ZodEnum<{
703
- hitl: "hitl";
704
- allow: "allow";
705
- block: "block";
706
- }>>;
707
- }, z.core.$strict>]>>;
708
- }, z.core.$strict>, z.ZodObject<{
709
- kind: z.ZodLiteral<"not">;
710
- not: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
711
- kind: z.ZodLiteral<"toolName">;
712
- op: z.ZodEnum<{
713
- eq: "eq";
714
- neq: "neq";
715
- contains: "contains";
716
- startsWith: "startsWith";
717
- endsWith: "endsWith";
718
- glob: "glob";
719
- }>;
720
- value: z.ZodString;
721
- }, z.core.$strict>, z.ZodObject<{
722
- kind: z.ZodLiteral<"toolName">;
723
- op: z.ZodLiteral<"in">;
724
- value: z.ZodArray<z.ZodString>;
725
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
726
- kind: z.ZodLiteral<"toolTag">;
727
- op: z.ZodLiteral<"has">;
728
- tag: z.ZodString;
729
- }, z.core.$strict>, z.ZodObject<{
730
- kind: z.ZodLiteral<"toolTag">;
731
- op: z.ZodLiteral<"anyOf">;
732
- tags: z.ZodArray<z.ZodString>;
733
- }, z.core.$strict>, z.ZodObject<{
734
- kind: z.ZodLiteral<"toolTag">;
735
- op: z.ZodLiteral<"allOf">;
736
- tags: z.ZodArray<z.ZodString>;
737
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
738
- kind: z.ZodLiteral<"toolArg">;
739
- type: z.ZodLiteral<"string">;
740
- op: z.ZodEnum<{
741
- in: "in";
742
- eq: "eq";
743
- neq: "neq";
744
- contains: "contains";
745
- startsWith: "startsWith";
746
- endsWith: "endsWith";
747
- }>;
748
- path: z.ZodString;
749
- value: z.ZodString;
750
- }, z.core.$strip>, z.ZodObject<{
751
- kind: z.ZodLiteral<"toolArg">;
752
- type: z.ZodLiteral<"number">;
753
- op: z.ZodEnum<{
754
- gt: "gt";
755
- gte: "gte";
756
- lt: "lt";
757
- lte: "lte";
758
- eq: "eq";
759
- neq: "neq";
760
- }>;
761
- path: z.ZodString;
762
- value: z.ZodNumber;
763
- }, z.core.$strip>, z.ZodObject<{
764
- kind: z.ZodLiteral<"toolArg">;
765
- type: z.ZodLiteral<"boolean">;
766
- op: z.ZodLiteral<"eq">;
767
- path: z.ZodString;
768
- value: z.ZodBoolean;
769
- }, z.core.$strip>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
770
- kind: z.ZodLiteral<"enduserTag">;
771
- op: z.ZodLiteral<"has">;
772
- tag: z.ZodString;
773
- }, z.core.$strict>, z.ZodObject<{
774
- kind: z.ZodLiteral<"enduserTag">;
775
- op: z.ZodLiteral<"hasValue">;
776
- tag: z.ZodString;
777
- value: z.ZodString;
778
- }, z.core.$strict>, z.ZodObject<{
779
- kind: z.ZodLiteral<"enduserTag">;
780
- op: z.ZodLiteral<"hasValueAny">;
781
- tag: z.ZodString;
782
- values: z.ZodArray<z.ZodString>;
783
- }, z.core.$strict>], "op">, z.ZodObject<{
784
- kind: z.ZodLiteral<"executionTime">;
785
- scope: z.ZodEnum<{
786
- tool: "tool";
787
- total: "total";
788
- }>;
789
- op: z.ZodEnum<{
790
- gt: "gt";
791
- gte: "gte";
792
- lt: "lt";
793
- lte: "lte";
794
- eq: "eq";
795
- neq: "neq";
796
- }>;
797
- ms: z.ZodNumber;
798
- }, z.core.$strict>, z.ZodObject<{
799
- kind: z.ZodLiteral<"sequence">;
800
- mustHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
801
- mustNotHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
802
- }, z.core.$strict>, z.ZodObject<{
803
- kind: z.ZodLiteral<"maxCalls">;
804
- selector: z.ZodDiscriminatedUnion<[z.ZodObject<{
805
- by: z.ZodLiteral<"toolName">;
806
- patterns: z.ZodArray<z.ZodString>;
807
- }, z.core.$strict>, z.ZodObject<{
808
- by: z.ZodLiteral<"toolTag">;
809
- tags: z.ZodArray<z.ZodString>;
810
- }, z.core.$strict>], "by">;
811
- max: z.ZodNumber;
812
- }, z.core.$strict>, z.ZodObject<{
813
- kind: z.ZodLiteral<"custom">;
814
- name: z.ZodString;
815
- args: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>;
816
- }, z.core.$strict>, z.ZodObject<{
817
- kind: z.ZodLiteral<"metricWindow">;
818
- scope: z.ZodEnum<{
819
- agent: "agent";
820
- agent_user: "agent_user";
821
- }>;
822
- metric: z.ZodDiscriminatedUnion<[z.ZodObject<{
823
- kind: z.ZodLiteral<"inbuilt">;
824
- key: z.ZodEnum<{
825
- bytes_in: "bytes_in";
826
- bytes_out: "bytes_out";
827
- duration_ms: "duration_ms";
828
- records_in: "records_in";
829
- records_out: "records_out";
830
- llm_tokens_in: "llm_tokens_in";
831
- llm_tokens_out: "llm_tokens_out";
832
- llm_cost_usd: "llm_cost_usd";
833
- }>;
834
- }, z.core.$strict>, z.ZodObject<{
835
- kind: z.ZodLiteral<"custom">;
836
- key: z.ZodString;
837
- }, z.core.$strict>], "kind">;
838
- aggregate: z.ZodEnum<{
839
- sum: "sum";
840
- avg: "avg";
841
- max: "max";
842
- min: "min";
843
- count: "count";
844
- }>;
845
- windowSeconds: z.ZodNumber;
846
- filter: z.ZodOptional<z.ZodObject<{
847
- toolName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
848
- toolTag: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
849
- }, z.core.$strict>>;
850
- op: z.ZodEnum<{
851
- gt: "gt";
852
- gte: "gte";
853
- lt: "lt";
854
- lte: "lte";
855
- eq: "eq";
856
- neq: "neq";
857
- }>;
858
- value: z.ZodNumber;
859
- onMissing: z.ZodOptional<z.ZodEnum<{
860
- hitl: "hitl";
861
- allow: "allow";
862
- block: "block";
863
- }>>;
864
- }, z.core.$strict>, z.ZodObject<{
865
- kind: z.ZodLiteral<"timeGate">;
866
- timezone: z.ZodObject<{
867
- source: z.ZodLiteral<"enduserTag">;
868
- tag: z.ZodString;
869
- fallback: z.ZodOptional<z.ZodLiteral<"org">>;
870
- }, z.core.$strict>;
871
- windows: z.ZodArray<z.ZodObject<{
872
- days: z.ZodArray<z.ZodEnum<{
873
- mon: "mon";
874
- tue: "tue";
875
- wed: "wed";
876
- thu: "thu";
877
- fri: "fri";
878
- sat: "sat";
879
- sun: "sun";
880
- }>>;
881
- start: z.ZodString;
882
- end: z.ZodString;
883
- }, z.core.$strict>>;
884
- }, z.core.$strict>, z.ZodObject<{
885
- kind: z.ZodLiteral<"requireSubject">;
886
- subjectType: z.ZodString;
887
- idSystem: z.ZodOptional<z.ZodString>;
888
- }, z.core.$strict>, z.ZodObject<{
889
- kind: z.ZodLiteral<"signal">;
890
- key: z.ZodString;
891
- args: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
892
- from: z.ZodLiteral<"enduserId">;
893
- }, z.core.$strict>, z.ZodObject<{
894
- from: z.ZodLiteral<"enduserTag">;
895
- tag: z.ZodString;
896
- }, z.core.$strict>, z.ZodObject<{
897
- from: z.ZodLiteral<"toolName">;
898
- }, z.core.$strict>, z.ZodObject<{
899
- from: z.ZodLiteral<"toolTag">;
900
- tag: z.ZodString;
901
- }, z.core.$strict>, z.ZodObject<{
902
- from: z.ZodLiteral<"toolArg">;
903
- path: z.ZodString;
904
- }, z.core.$strict>, z.ZodObject<{
905
- from: z.ZodLiteral<"subject">;
906
- subjectType: z.ZodString;
907
- role: z.ZodOptional<z.ZodString>;
908
- field: z.ZodOptional<z.ZodEnum<{
909
- idSystem: "idSystem";
910
- id: "id";
911
- }>>;
912
- }, z.core.$strict>, z.ZodObject<{
913
- from: z.ZodLiteral<"const">;
914
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
915
- }, z.core.$strict>], "from">>;
916
- op: z.ZodEnum<{
917
- in: "in";
918
- gt: "gt";
919
- gte: "gte";
920
- lt: "lt";
921
- lte: "lte";
922
- eq: "eq";
923
- neq: "neq";
924
- nin: "nin";
925
- }>;
926
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
927
- onMissing: z.ZodOptional<z.ZodEnum<{
928
- hitl: "hitl";
929
- allow: "allow";
930
- block: "block";
931
- }>>;
932
- }, z.core.$strict>]>;
933
- }, z.core.$strict>]>;
36
+ condition: z.ZodType<import("./condition").RuleCondition, unknown, z.core.$ZodTypeInternals<import("./condition").RuleCondition, unknown>>;
934
37
  effect: z.ZodDiscriminatedUnion<[z.ZodObject<{
935
38
  type: z.ZodLiteral<"allow">;
936
39
  reason: z.ZodOptional<z.ZodString>;
@@ -967,904 +70,7 @@ export declare const RuleSpecSchema: z.ZodObject<{
967
70
  tagsAny: z.ZodOptional<z.ZodArray<z.ZodString>>;
968
71
  }, z.core.$strict>>;
969
72
  }, z.core.$strict>;
970
- condition: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
971
- kind: z.ZodLiteral<"toolName">;
972
- op: z.ZodEnum<{
973
- eq: "eq";
974
- neq: "neq";
975
- contains: "contains";
976
- startsWith: "startsWith";
977
- endsWith: "endsWith";
978
- glob: "glob";
979
- }>;
980
- value: z.ZodString;
981
- }, z.core.$strict>, z.ZodObject<{
982
- kind: z.ZodLiteral<"toolName">;
983
- op: z.ZodLiteral<"in">;
984
- value: z.ZodArray<z.ZodString>;
985
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
986
- kind: z.ZodLiteral<"toolTag">;
987
- op: z.ZodLiteral<"has">;
988
- tag: z.ZodString;
989
- }, z.core.$strict>, z.ZodObject<{
990
- kind: z.ZodLiteral<"toolTag">;
991
- op: z.ZodLiteral<"anyOf">;
992
- tags: z.ZodArray<z.ZodString>;
993
- }, z.core.$strict>, z.ZodObject<{
994
- kind: z.ZodLiteral<"toolTag">;
995
- op: z.ZodLiteral<"allOf">;
996
- tags: z.ZodArray<z.ZodString>;
997
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
998
- kind: z.ZodLiteral<"toolArg">;
999
- type: z.ZodLiteral<"string">;
1000
- op: z.ZodEnum<{
1001
- in: "in";
1002
- eq: "eq";
1003
- neq: "neq";
1004
- contains: "contains";
1005
- startsWith: "startsWith";
1006
- endsWith: "endsWith";
1007
- }>;
1008
- path: z.ZodString;
1009
- value: z.ZodString;
1010
- }, z.core.$strip>, z.ZodObject<{
1011
- kind: z.ZodLiteral<"toolArg">;
1012
- type: z.ZodLiteral<"number">;
1013
- op: z.ZodEnum<{
1014
- gt: "gt";
1015
- gte: "gte";
1016
- lt: "lt";
1017
- lte: "lte";
1018
- eq: "eq";
1019
- neq: "neq";
1020
- }>;
1021
- path: z.ZodString;
1022
- value: z.ZodNumber;
1023
- }, z.core.$strip>, z.ZodObject<{
1024
- kind: z.ZodLiteral<"toolArg">;
1025
- type: z.ZodLiteral<"boolean">;
1026
- op: z.ZodLiteral<"eq">;
1027
- path: z.ZodString;
1028
- value: z.ZodBoolean;
1029
- }, z.core.$strip>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
1030
- kind: z.ZodLiteral<"enduserTag">;
1031
- op: z.ZodLiteral<"has">;
1032
- tag: z.ZodString;
1033
- }, z.core.$strict>, z.ZodObject<{
1034
- kind: z.ZodLiteral<"enduserTag">;
1035
- op: z.ZodLiteral<"hasValue">;
1036
- tag: z.ZodString;
1037
- value: z.ZodString;
1038
- }, z.core.$strict>, z.ZodObject<{
1039
- kind: z.ZodLiteral<"enduserTag">;
1040
- op: z.ZodLiteral<"hasValueAny">;
1041
- tag: z.ZodString;
1042
- values: z.ZodArray<z.ZodString>;
1043
- }, z.core.$strict>], "op">, z.ZodObject<{
1044
- kind: z.ZodLiteral<"executionTime">;
1045
- scope: z.ZodEnum<{
1046
- tool: "tool";
1047
- total: "total";
1048
- }>;
1049
- op: z.ZodEnum<{
1050
- gt: "gt";
1051
- gte: "gte";
1052
- lt: "lt";
1053
- lte: "lte";
1054
- eq: "eq";
1055
- neq: "neq";
1056
- }>;
1057
- ms: z.ZodNumber;
1058
- }, z.core.$strict>, z.ZodObject<{
1059
- kind: z.ZodLiteral<"sequence">;
1060
- mustHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
1061
- mustNotHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
1062
- }, z.core.$strict>, z.ZodObject<{
1063
- kind: z.ZodLiteral<"maxCalls">;
1064
- selector: z.ZodDiscriminatedUnion<[z.ZodObject<{
1065
- by: z.ZodLiteral<"toolName">;
1066
- patterns: z.ZodArray<z.ZodString>;
1067
- }, z.core.$strict>, z.ZodObject<{
1068
- by: z.ZodLiteral<"toolTag">;
1069
- tags: z.ZodArray<z.ZodString>;
1070
- }, z.core.$strict>], "by">;
1071
- max: z.ZodNumber;
1072
- }, z.core.$strict>, z.ZodObject<{
1073
- kind: z.ZodLiteral<"custom">;
1074
- name: z.ZodString;
1075
- args: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>;
1076
- }, z.core.$strict>, z.ZodObject<{
1077
- kind: z.ZodLiteral<"metricWindow">;
1078
- scope: z.ZodEnum<{
1079
- agent: "agent";
1080
- agent_user: "agent_user";
1081
- }>;
1082
- metric: z.ZodDiscriminatedUnion<[z.ZodObject<{
1083
- kind: z.ZodLiteral<"inbuilt">;
1084
- key: z.ZodEnum<{
1085
- bytes_in: "bytes_in";
1086
- bytes_out: "bytes_out";
1087
- duration_ms: "duration_ms";
1088
- records_in: "records_in";
1089
- records_out: "records_out";
1090
- llm_tokens_in: "llm_tokens_in";
1091
- llm_tokens_out: "llm_tokens_out";
1092
- llm_cost_usd: "llm_cost_usd";
1093
- }>;
1094
- }, z.core.$strict>, z.ZodObject<{
1095
- kind: z.ZodLiteral<"custom">;
1096
- key: z.ZodString;
1097
- }, z.core.$strict>], "kind">;
1098
- aggregate: z.ZodEnum<{
1099
- sum: "sum";
1100
- avg: "avg";
1101
- max: "max";
1102
- min: "min";
1103
- count: "count";
1104
- }>;
1105
- windowSeconds: z.ZodNumber;
1106
- filter: z.ZodOptional<z.ZodObject<{
1107
- toolName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
1108
- toolTag: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
1109
- }, z.core.$strict>>;
1110
- op: z.ZodEnum<{
1111
- gt: "gt";
1112
- gte: "gte";
1113
- lt: "lt";
1114
- lte: "lte";
1115
- eq: "eq";
1116
- neq: "neq";
1117
- }>;
1118
- value: z.ZodNumber;
1119
- onMissing: z.ZodOptional<z.ZodEnum<{
1120
- hitl: "hitl";
1121
- allow: "allow";
1122
- block: "block";
1123
- }>>;
1124
- }, z.core.$strict>, z.ZodObject<{
1125
- kind: z.ZodLiteral<"timeGate">;
1126
- timezone: z.ZodObject<{
1127
- source: z.ZodLiteral<"enduserTag">;
1128
- tag: z.ZodString;
1129
- fallback: z.ZodOptional<z.ZodLiteral<"org">>;
1130
- }, z.core.$strict>;
1131
- windows: z.ZodArray<z.ZodObject<{
1132
- days: z.ZodArray<z.ZodEnum<{
1133
- mon: "mon";
1134
- tue: "tue";
1135
- wed: "wed";
1136
- thu: "thu";
1137
- fri: "fri";
1138
- sat: "sat";
1139
- sun: "sun";
1140
- }>>;
1141
- start: z.ZodString;
1142
- end: z.ZodString;
1143
- }, z.core.$strict>>;
1144
- }, z.core.$strict>, z.ZodObject<{
1145
- kind: z.ZodLiteral<"requireSubject">;
1146
- subjectType: z.ZodString;
1147
- idSystem: z.ZodOptional<z.ZodString>;
1148
- }, z.core.$strict>, z.ZodObject<{
1149
- kind: z.ZodLiteral<"signal">;
1150
- key: z.ZodString;
1151
- args: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1152
- from: z.ZodLiteral<"enduserId">;
1153
- }, z.core.$strict>, z.ZodObject<{
1154
- from: z.ZodLiteral<"enduserTag">;
1155
- tag: z.ZodString;
1156
- }, z.core.$strict>, z.ZodObject<{
1157
- from: z.ZodLiteral<"toolName">;
1158
- }, z.core.$strict>, z.ZodObject<{
1159
- from: z.ZodLiteral<"toolTag">;
1160
- tag: z.ZodString;
1161
- }, z.core.$strict>, z.ZodObject<{
1162
- from: z.ZodLiteral<"toolArg">;
1163
- path: z.ZodString;
1164
- }, z.core.$strict>, z.ZodObject<{
1165
- from: z.ZodLiteral<"subject">;
1166
- subjectType: z.ZodString;
1167
- role: z.ZodOptional<z.ZodString>;
1168
- field: z.ZodOptional<z.ZodEnum<{
1169
- idSystem: "idSystem";
1170
- id: "id";
1171
- }>>;
1172
- }, z.core.$strict>, z.ZodObject<{
1173
- from: z.ZodLiteral<"const">;
1174
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
1175
- }, z.core.$strict>], "from">>;
1176
- op: z.ZodEnum<{
1177
- in: "in";
1178
- gt: "gt";
1179
- gte: "gte";
1180
- lt: "lt";
1181
- lte: "lte";
1182
- eq: "eq";
1183
- neq: "neq";
1184
- nin: "nin";
1185
- }>;
1186
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
1187
- onMissing: z.ZodOptional<z.ZodEnum<{
1188
- hitl: "hitl";
1189
- allow: "allow";
1190
- block: "block";
1191
- }>>;
1192
- }, z.core.$strict>]>, z.ZodObject<{
1193
- kind: z.ZodLiteral<"and">;
1194
- all: z.ZodArray<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
1195
- kind: z.ZodLiteral<"toolName">;
1196
- op: z.ZodEnum<{
1197
- eq: "eq";
1198
- neq: "neq";
1199
- contains: "contains";
1200
- startsWith: "startsWith";
1201
- endsWith: "endsWith";
1202
- glob: "glob";
1203
- }>;
1204
- value: z.ZodString;
1205
- }, z.core.$strict>, z.ZodObject<{
1206
- kind: z.ZodLiteral<"toolName">;
1207
- op: z.ZodLiteral<"in">;
1208
- value: z.ZodArray<z.ZodString>;
1209
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
1210
- kind: z.ZodLiteral<"toolTag">;
1211
- op: z.ZodLiteral<"has">;
1212
- tag: z.ZodString;
1213
- }, z.core.$strict>, z.ZodObject<{
1214
- kind: z.ZodLiteral<"toolTag">;
1215
- op: z.ZodLiteral<"anyOf">;
1216
- tags: z.ZodArray<z.ZodString>;
1217
- }, z.core.$strict>, z.ZodObject<{
1218
- kind: z.ZodLiteral<"toolTag">;
1219
- op: z.ZodLiteral<"allOf">;
1220
- tags: z.ZodArray<z.ZodString>;
1221
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
1222
- kind: z.ZodLiteral<"toolArg">;
1223
- type: z.ZodLiteral<"string">;
1224
- op: z.ZodEnum<{
1225
- in: "in";
1226
- eq: "eq";
1227
- neq: "neq";
1228
- contains: "contains";
1229
- startsWith: "startsWith";
1230
- endsWith: "endsWith";
1231
- }>;
1232
- path: z.ZodString;
1233
- value: z.ZodString;
1234
- }, z.core.$strip>, z.ZodObject<{
1235
- kind: z.ZodLiteral<"toolArg">;
1236
- type: z.ZodLiteral<"number">;
1237
- op: z.ZodEnum<{
1238
- gt: "gt";
1239
- gte: "gte";
1240
- lt: "lt";
1241
- lte: "lte";
1242
- eq: "eq";
1243
- neq: "neq";
1244
- }>;
1245
- path: z.ZodString;
1246
- value: z.ZodNumber;
1247
- }, z.core.$strip>, z.ZodObject<{
1248
- kind: z.ZodLiteral<"toolArg">;
1249
- type: z.ZodLiteral<"boolean">;
1250
- op: z.ZodLiteral<"eq">;
1251
- path: z.ZodString;
1252
- value: z.ZodBoolean;
1253
- }, z.core.$strip>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
1254
- kind: z.ZodLiteral<"enduserTag">;
1255
- op: z.ZodLiteral<"has">;
1256
- tag: z.ZodString;
1257
- }, z.core.$strict>, z.ZodObject<{
1258
- kind: z.ZodLiteral<"enduserTag">;
1259
- op: z.ZodLiteral<"hasValue">;
1260
- tag: z.ZodString;
1261
- value: z.ZodString;
1262
- }, z.core.$strict>, z.ZodObject<{
1263
- kind: z.ZodLiteral<"enduserTag">;
1264
- op: z.ZodLiteral<"hasValueAny">;
1265
- tag: z.ZodString;
1266
- values: z.ZodArray<z.ZodString>;
1267
- }, z.core.$strict>], "op">, z.ZodObject<{
1268
- kind: z.ZodLiteral<"executionTime">;
1269
- scope: z.ZodEnum<{
1270
- tool: "tool";
1271
- total: "total";
1272
- }>;
1273
- op: z.ZodEnum<{
1274
- gt: "gt";
1275
- gte: "gte";
1276
- lt: "lt";
1277
- lte: "lte";
1278
- eq: "eq";
1279
- neq: "neq";
1280
- }>;
1281
- ms: z.ZodNumber;
1282
- }, z.core.$strict>, z.ZodObject<{
1283
- kind: z.ZodLiteral<"sequence">;
1284
- mustHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
1285
- mustNotHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
1286
- }, z.core.$strict>, z.ZodObject<{
1287
- kind: z.ZodLiteral<"maxCalls">;
1288
- selector: z.ZodDiscriminatedUnion<[z.ZodObject<{
1289
- by: z.ZodLiteral<"toolName">;
1290
- patterns: z.ZodArray<z.ZodString>;
1291
- }, z.core.$strict>, z.ZodObject<{
1292
- by: z.ZodLiteral<"toolTag">;
1293
- tags: z.ZodArray<z.ZodString>;
1294
- }, z.core.$strict>], "by">;
1295
- max: z.ZodNumber;
1296
- }, z.core.$strict>, z.ZodObject<{
1297
- kind: z.ZodLiteral<"custom">;
1298
- name: z.ZodString;
1299
- args: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>;
1300
- }, z.core.$strict>, z.ZodObject<{
1301
- kind: z.ZodLiteral<"metricWindow">;
1302
- scope: z.ZodEnum<{
1303
- agent: "agent";
1304
- agent_user: "agent_user";
1305
- }>;
1306
- metric: z.ZodDiscriminatedUnion<[z.ZodObject<{
1307
- kind: z.ZodLiteral<"inbuilt">;
1308
- key: z.ZodEnum<{
1309
- bytes_in: "bytes_in";
1310
- bytes_out: "bytes_out";
1311
- duration_ms: "duration_ms";
1312
- records_in: "records_in";
1313
- records_out: "records_out";
1314
- llm_tokens_in: "llm_tokens_in";
1315
- llm_tokens_out: "llm_tokens_out";
1316
- llm_cost_usd: "llm_cost_usd";
1317
- }>;
1318
- }, z.core.$strict>, z.ZodObject<{
1319
- kind: z.ZodLiteral<"custom">;
1320
- key: z.ZodString;
1321
- }, z.core.$strict>], "kind">;
1322
- aggregate: z.ZodEnum<{
1323
- sum: "sum";
1324
- avg: "avg";
1325
- max: "max";
1326
- min: "min";
1327
- count: "count";
1328
- }>;
1329
- windowSeconds: z.ZodNumber;
1330
- filter: z.ZodOptional<z.ZodObject<{
1331
- toolName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
1332
- toolTag: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
1333
- }, z.core.$strict>>;
1334
- op: z.ZodEnum<{
1335
- gt: "gt";
1336
- gte: "gte";
1337
- lt: "lt";
1338
- lte: "lte";
1339
- eq: "eq";
1340
- neq: "neq";
1341
- }>;
1342
- value: z.ZodNumber;
1343
- onMissing: z.ZodOptional<z.ZodEnum<{
1344
- hitl: "hitl";
1345
- allow: "allow";
1346
- block: "block";
1347
- }>>;
1348
- }, z.core.$strict>, z.ZodObject<{
1349
- kind: z.ZodLiteral<"timeGate">;
1350
- timezone: z.ZodObject<{
1351
- source: z.ZodLiteral<"enduserTag">;
1352
- tag: z.ZodString;
1353
- fallback: z.ZodOptional<z.ZodLiteral<"org">>;
1354
- }, z.core.$strict>;
1355
- windows: z.ZodArray<z.ZodObject<{
1356
- days: z.ZodArray<z.ZodEnum<{
1357
- mon: "mon";
1358
- tue: "tue";
1359
- wed: "wed";
1360
- thu: "thu";
1361
- fri: "fri";
1362
- sat: "sat";
1363
- sun: "sun";
1364
- }>>;
1365
- start: z.ZodString;
1366
- end: z.ZodString;
1367
- }, z.core.$strict>>;
1368
- }, z.core.$strict>, z.ZodObject<{
1369
- kind: z.ZodLiteral<"requireSubject">;
1370
- subjectType: z.ZodString;
1371
- idSystem: z.ZodOptional<z.ZodString>;
1372
- }, z.core.$strict>, z.ZodObject<{
1373
- kind: z.ZodLiteral<"signal">;
1374
- key: z.ZodString;
1375
- args: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1376
- from: z.ZodLiteral<"enduserId">;
1377
- }, z.core.$strict>, z.ZodObject<{
1378
- from: z.ZodLiteral<"enduserTag">;
1379
- tag: z.ZodString;
1380
- }, z.core.$strict>, z.ZodObject<{
1381
- from: z.ZodLiteral<"toolName">;
1382
- }, z.core.$strict>, z.ZodObject<{
1383
- from: z.ZodLiteral<"toolTag">;
1384
- tag: z.ZodString;
1385
- }, z.core.$strict>, z.ZodObject<{
1386
- from: z.ZodLiteral<"toolArg">;
1387
- path: z.ZodString;
1388
- }, z.core.$strict>, z.ZodObject<{
1389
- from: z.ZodLiteral<"subject">;
1390
- subjectType: z.ZodString;
1391
- role: z.ZodOptional<z.ZodString>;
1392
- field: z.ZodOptional<z.ZodEnum<{
1393
- idSystem: "idSystem";
1394
- id: "id";
1395
- }>>;
1396
- }, z.core.$strict>, z.ZodObject<{
1397
- from: z.ZodLiteral<"const">;
1398
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
1399
- }, z.core.$strict>], "from">>;
1400
- op: z.ZodEnum<{
1401
- in: "in";
1402
- gt: "gt";
1403
- gte: "gte";
1404
- lt: "lt";
1405
- lte: "lte";
1406
- eq: "eq";
1407
- neq: "neq";
1408
- nin: "nin";
1409
- }>;
1410
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
1411
- onMissing: z.ZodOptional<z.ZodEnum<{
1412
- hitl: "hitl";
1413
- allow: "allow";
1414
- block: "block";
1415
- }>>;
1416
- }, z.core.$strict>]>>;
1417
- }, z.core.$strict>, z.ZodObject<{
1418
- kind: z.ZodLiteral<"or">;
1419
- any: z.ZodArray<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
1420
- kind: z.ZodLiteral<"toolName">;
1421
- op: z.ZodEnum<{
1422
- eq: "eq";
1423
- neq: "neq";
1424
- contains: "contains";
1425
- startsWith: "startsWith";
1426
- endsWith: "endsWith";
1427
- glob: "glob";
1428
- }>;
1429
- value: z.ZodString;
1430
- }, z.core.$strict>, z.ZodObject<{
1431
- kind: z.ZodLiteral<"toolName">;
1432
- op: z.ZodLiteral<"in">;
1433
- value: z.ZodArray<z.ZodString>;
1434
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
1435
- kind: z.ZodLiteral<"toolTag">;
1436
- op: z.ZodLiteral<"has">;
1437
- tag: z.ZodString;
1438
- }, z.core.$strict>, z.ZodObject<{
1439
- kind: z.ZodLiteral<"toolTag">;
1440
- op: z.ZodLiteral<"anyOf">;
1441
- tags: z.ZodArray<z.ZodString>;
1442
- }, z.core.$strict>, z.ZodObject<{
1443
- kind: z.ZodLiteral<"toolTag">;
1444
- op: z.ZodLiteral<"allOf">;
1445
- tags: z.ZodArray<z.ZodString>;
1446
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
1447
- kind: z.ZodLiteral<"toolArg">;
1448
- type: z.ZodLiteral<"string">;
1449
- op: z.ZodEnum<{
1450
- in: "in";
1451
- eq: "eq";
1452
- neq: "neq";
1453
- contains: "contains";
1454
- startsWith: "startsWith";
1455
- endsWith: "endsWith";
1456
- }>;
1457
- path: z.ZodString;
1458
- value: z.ZodString;
1459
- }, z.core.$strip>, z.ZodObject<{
1460
- kind: z.ZodLiteral<"toolArg">;
1461
- type: z.ZodLiteral<"number">;
1462
- op: z.ZodEnum<{
1463
- gt: "gt";
1464
- gte: "gte";
1465
- lt: "lt";
1466
- lte: "lte";
1467
- eq: "eq";
1468
- neq: "neq";
1469
- }>;
1470
- path: z.ZodString;
1471
- value: z.ZodNumber;
1472
- }, z.core.$strip>, z.ZodObject<{
1473
- kind: z.ZodLiteral<"toolArg">;
1474
- type: z.ZodLiteral<"boolean">;
1475
- op: z.ZodLiteral<"eq">;
1476
- path: z.ZodString;
1477
- value: z.ZodBoolean;
1478
- }, z.core.$strip>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
1479
- kind: z.ZodLiteral<"enduserTag">;
1480
- op: z.ZodLiteral<"has">;
1481
- tag: z.ZodString;
1482
- }, z.core.$strict>, z.ZodObject<{
1483
- kind: z.ZodLiteral<"enduserTag">;
1484
- op: z.ZodLiteral<"hasValue">;
1485
- tag: z.ZodString;
1486
- value: z.ZodString;
1487
- }, z.core.$strict>, z.ZodObject<{
1488
- kind: z.ZodLiteral<"enduserTag">;
1489
- op: z.ZodLiteral<"hasValueAny">;
1490
- tag: z.ZodString;
1491
- values: z.ZodArray<z.ZodString>;
1492
- }, z.core.$strict>], "op">, z.ZodObject<{
1493
- kind: z.ZodLiteral<"executionTime">;
1494
- scope: z.ZodEnum<{
1495
- tool: "tool";
1496
- total: "total";
1497
- }>;
1498
- op: z.ZodEnum<{
1499
- gt: "gt";
1500
- gte: "gte";
1501
- lt: "lt";
1502
- lte: "lte";
1503
- eq: "eq";
1504
- neq: "neq";
1505
- }>;
1506
- ms: z.ZodNumber;
1507
- }, z.core.$strict>, z.ZodObject<{
1508
- kind: z.ZodLiteral<"sequence">;
1509
- mustHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
1510
- mustNotHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
1511
- }, z.core.$strict>, z.ZodObject<{
1512
- kind: z.ZodLiteral<"maxCalls">;
1513
- selector: z.ZodDiscriminatedUnion<[z.ZodObject<{
1514
- by: z.ZodLiteral<"toolName">;
1515
- patterns: z.ZodArray<z.ZodString>;
1516
- }, z.core.$strict>, z.ZodObject<{
1517
- by: z.ZodLiteral<"toolTag">;
1518
- tags: z.ZodArray<z.ZodString>;
1519
- }, z.core.$strict>], "by">;
1520
- max: z.ZodNumber;
1521
- }, z.core.$strict>, z.ZodObject<{
1522
- kind: z.ZodLiteral<"custom">;
1523
- name: z.ZodString;
1524
- args: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>;
1525
- }, z.core.$strict>, z.ZodObject<{
1526
- kind: z.ZodLiteral<"metricWindow">;
1527
- scope: z.ZodEnum<{
1528
- agent: "agent";
1529
- agent_user: "agent_user";
1530
- }>;
1531
- metric: z.ZodDiscriminatedUnion<[z.ZodObject<{
1532
- kind: z.ZodLiteral<"inbuilt">;
1533
- key: z.ZodEnum<{
1534
- bytes_in: "bytes_in";
1535
- bytes_out: "bytes_out";
1536
- duration_ms: "duration_ms";
1537
- records_in: "records_in";
1538
- records_out: "records_out";
1539
- llm_tokens_in: "llm_tokens_in";
1540
- llm_tokens_out: "llm_tokens_out";
1541
- llm_cost_usd: "llm_cost_usd";
1542
- }>;
1543
- }, z.core.$strict>, z.ZodObject<{
1544
- kind: z.ZodLiteral<"custom">;
1545
- key: z.ZodString;
1546
- }, z.core.$strict>], "kind">;
1547
- aggregate: z.ZodEnum<{
1548
- sum: "sum";
1549
- avg: "avg";
1550
- max: "max";
1551
- min: "min";
1552
- count: "count";
1553
- }>;
1554
- windowSeconds: z.ZodNumber;
1555
- filter: z.ZodOptional<z.ZodObject<{
1556
- toolName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
1557
- toolTag: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
1558
- }, z.core.$strict>>;
1559
- op: z.ZodEnum<{
1560
- gt: "gt";
1561
- gte: "gte";
1562
- lt: "lt";
1563
- lte: "lte";
1564
- eq: "eq";
1565
- neq: "neq";
1566
- }>;
1567
- value: z.ZodNumber;
1568
- onMissing: z.ZodOptional<z.ZodEnum<{
1569
- hitl: "hitl";
1570
- allow: "allow";
1571
- block: "block";
1572
- }>>;
1573
- }, z.core.$strict>, z.ZodObject<{
1574
- kind: z.ZodLiteral<"timeGate">;
1575
- timezone: z.ZodObject<{
1576
- source: z.ZodLiteral<"enduserTag">;
1577
- tag: z.ZodString;
1578
- fallback: z.ZodOptional<z.ZodLiteral<"org">>;
1579
- }, z.core.$strict>;
1580
- windows: z.ZodArray<z.ZodObject<{
1581
- days: z.ZodArray<z.ZodEnum<{
1582
- mon: "mon";
1583
- tue: "tue";
1584
- wed: "wed";
1585
- thu: "thu";
1586
- fri: "fri";
1587
- sat: "sat";
1588
- sun: "sun";
1589
- }>>;
1590
- start: z.ZodString;
1591
- end: z.ZodString;
1592
- }, z.core.$strict>>;
1593
- }, z.core.$strict>, z.ZodObject<{
1594
- kind: z.ZodLiteral<"requireSubject">;
1595
- subjectType: z.ZodString;
1596
- idSystem: z.ZodOptional<z.ZodString>;
1597
- }, z.core.$strict>, z.ZodObject<{
1598
- kind: z.ZodLiteral<"signal">;
1599
- key: z.ZodString;
1600
- args: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1601
- from: z.ZodLiteral<"enduserId">;
1602
- }, z.core.$strict>, z.ZodObject<{
1603
- from: z.ZodLiteral<"enduserTag">;
1604
- tag: z.ZodString;
1605
- }, z.core.$strict>, z.ZodObject<{
1606
- from: z.ZodLiteral<"toolName">;
1607
- }, z.core.$strict>, z.ZodObject<{
1608
- from: z.ZodLiteral<"toolTag">;
1609
- tag: z.ZodString;
1610
- }, z.core.$strict>, z.ZodObject<{
1611
- from: z.ZodLiteral<"toolArg">;
1612
- path: z.ZodString;
1613
- }, z.core.$strict>, z.ZodObject<{
1614
- from: z.ZodLiteral<"subject">;
1615
- subjectType: z.ZodString;
1616
- role: z.ZodOptional<z.ZodString>;
1617
- field: z.ZodOptional<z.ZodEnum<{
1618
- idSystem: "idSystem";
1619
- id: "id";
1620
- }>>;
1621
- }, z.core.$strict>, z.ZodObject<{
1622
- from: z.ZodLiteral<"const">;
1623
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
1624
- }, z.core.$strict>], "from">>;
1625
- op: z.ZodEnum<{
1626
- in: "in";
1627
- gt: "gt";
1628
- gte: "gte";
1629
- lt: "lt";
1630
- lte: "lte";
1631
- eq: "eq";
1632
- neq: "neq";
1633
- nin: "nin";
1634
- }>;
1635
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
1636
- onMissing: z.ZodOptional<z.ZodEnum<{
1637
- hitl: "hitl";
1638
- allow: "allow";
1639
- block: "block";
1640
- }>>;
1641
- }, z.core.$strict>]>>;
1642
- }, z.core.$strict>, z.ZodObject<{
1643
- kind: z.ZodLiteral<"not">;
1644
- not: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
1645
- kind: z.ZodLiteral<"toolName">;
1646
- op: z.ZodEnum<{
1647
- eq: "eq";
1648
- neq: "neq";
1649
- contains: "contains";
1650
- startsWith: "startsWith";
1651
- endsWith: "endsWith";
1652
- glob: "glob";
1653
- }>;
1654
- value: z.ZodString;
1655
- }, z.core.$strict>, z.ZodObject<{
1656
- kind: z.ZodLiteral<"toolName">;
1657
- op: z.ZodLiteral<"in">;
1658
- value: z.ZodArray<z.ZodString>;
1659
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
1660
- kind: z.ZodLiteral<"toolTag">;
1661
- op: z.ZodLiteral<"has">;
1662
- tag: z.ZodString;
1663
- }, z.core.$strict>, z.ZodObject<{
1664
- kind: z.ZodLiteral<"toolTag">;
1665
- op: z.ZodLiteral<"anyOf">;
1666
- tags: z.ZodArray<z.ZodString>;
1667
- }, z.core.$strict>, z.ZodObject<{
1668
- kind: z.ZodLiteral<"toolTag">;
1669
- op: z.ZodLiteral<"allOf">;
1670
- tags: z.ZodArray<z.ZodString>;
1671
- }, z.core.$strict>], "op">, z.ZodDiscriminatedUnion<[z.ZodObject<{
1672
- kind: z.ZodLiteral<"toolArg">;
1673
- type: z.ZodLiteral<"string">;
1674
- op: z.ZodEnum<{
1675
- in: "in";
1676
- eq: "eq";
1677
- neq: "neq";
1678
- contains: "contains";
1679
- startsWith: "startsWith";
1680
- endsWith: "endsWith";
1681
- }>;
1682
- path: z.ZodString;
1683
- value: z.ZodString;
1684
- }, z.core.$strip>, z.ZodObject<{
1685
- kind: z.ZodLiteral<"toolArg">;
1686
- type: z.ZodLiteral<"number">;
1687
- op: z.ZodEnum<{
1688
- gt: "gt";
1689
- gte: "gte";
1690
- lt: "lt";
1691
- lte: "lte";
1692
- eq: "eq";
1693
- neq: "neq";
1694
- }>;
1695
- path: z.ZodString;
1696
- value: z.ZodNumber;
1697
- }, z.core.$strip>, z.ZodObject<{
1698
- kind: z.ZodLiteral<"toolArg">;
1699
- type: z.ZodLiteral<"boolean">;
1700
- op: z.ZodLiteral<"eq">;
1701
- path: z.ZodString;
1702
- value: z.ZodBoolean;
1703
- }, z.core.$strip>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
1704
- kind: z.ZodLiteral<"enduserTag">;
1705
- op: z.ZodLiteral<"has">;
1706
- tag: z.ZodString;
1707
- }, z.core.$strict>, z.ZodObject<{
1708
- kind: z.ZodLiteral<"enduserTag">;
1709
- op: z.ZodLiteral<"hasValue">;
1710
- tag: z.ZodString;
1711
- value: z.ZodString;
1712
- }, z.core.$strict>, z.ZodObject<{
1713
- kind: z.ZodLiteral<"enduserTag">;
1714
- op: z.ZodLiteral<"hasValueAny">;
1715
- tag: z.ZodString;
1716
- values: z.ZodArray<z.ZodString>;
1717
- }, z.core.$strict>], "op">, z.ZodObject<{
1718
- kind: z.ZodLiteral<"executionTime">;
1719
- scope: z.ZodEnum<{
1720
- tool: "tool";
1721
- total: "total";
1722
- }>;
1723
- op: z.ZodEnum<{
1724
- gt: "gt";
1725
- gte: "gte";
1726
- lt: "lt";
1727
- lte: "lte";
1728
- eq: "eq";
1729
- neq: "neq";
1730
- }>;
1731
- ms: z.ZodNumber;
1732
- }, z.core.$strict>, z.ZodObject<{
1733
- kind: z.ZodLiteral<"sequence">;
1734
- mustHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
1735
- mustNotHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
1736
- }, z.core.$strict>, z.ZodObject<{
1737
- kind: z.ZodLiteral<"maxCalls">;
1738
- selector: z.ZodDiscriminatedUnion<[z.ZodObject<{
1739
- by: z.ZodLiteral<"toolName">;
1740
- patterns: z.ZodArray<z.ZodString>;
1741
- }, z.core.$strict>, z.ZodObject<{
1742
- by: z.ZodLiteral<"toolTag">;
1743
- tags: z.ZodArray<z.ZodString>;
1744
- }, z.core.$strict>], "by">;
1745
- max: z.ZodNumber;
1746
- }, z.core.$strict>, z.ZodObject<{
1747
- kind: z.ZodLiteral<"custom">;
1748
- name: z.ZodString;
1749
- args: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>;
1750
- }, z.core.$strict>, z.ZodObject<{
1751
- kind: z.ZodLiteral<"metricWindow">;
1752
- scope: z.ZodEnum<{
1753
- agent: "agent";
1754
- agent_user: "agent_user";
1755
- }>;
1756
- metric: z.ZodDiscriminatedUnion<[z.ZodObject<{
1757
- kind: z.ZodLiteral<"inbuilt">;
1758
- key: z.ZodEnum<{
1759
- bytes_in: "bytes_in";
1760
- bytes_out: "bytes_out";
1761
- duration_ms: "duration_ms";
1762
- records_in: "records_in";
1763
- records_out: "records_out";
1764
- llm_tokens_in: "llm_tokens_in";
1765
- llm_tokens_out: "llm_tokens_out";
1766
- llm_cost_usd: "llm_cost_usd";
1767
- }>;
1768
- }, z.core.$strict>, z.ZodObject<{
1769
- kind: z.ZodLiteral<"custom">;
1770
- key: z.ZodString;
1771
- }, z.core.$strict>], "kind">;
1772
- aggregate: z.ZodEnum<{
1773
- sum: "sum";
1774
- avg: "avg";
1775
- max: "max";
1776
- min: "min";
1777
- count: "count";
1778
- }>;
1779
- windowSeconds: z.ZodNumber;
1780
- filter: z.ZodOptional<z.ZodObject<{
1781
- toolName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
1782
- toolTag: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
1783
- }, z.core.$strict>>;
1784
- op: z.ZodEnum<{
1785
- gt: "gt";
1786
- gte: "gte";
1787
- lt: "lt";
1788
- lte: "lte";
1789
- eq: "eq";
1790
- neq: "neq";
1791
- }>;
1792
- value: z.ZodNumber;
1793
- onMissing: z.ZodOptional<z.ZodEnum<{
1794
- hitl: "hitl";
1795
- allow: "allow";
1796
- block: "block";
1797
- }>>;
1798
- }, z.core.$strict>, z.ZodObject<{
1799
- kind: z.ZodLiteral<"timeGate">;
1800
- timezone: z.ZodObject<{
1801
- source: z.ZodLiteral<"enduserTag">;
1802
- tag: z.ZodString;
1803
- fallback: z.ZodOptional<z.ZodLiteral<"org">>;
1804
- }, z.core.$strict>;
1805
- windows: z.ZodArray<z.ZodObject<{
1806
- days: z.ZodArray<z.ZodEnum<{
1807
- mon: "mon";
1808
- tue: "tue";
1809
- wed: "wed";
1810
- thu: "thu";
1811
- fri: "fri";
1812
- sat: "sat";
1813
- sun: "sun";
1814
- }>>;
1815
- start: z.ZodString;
1816
- end: z.ZodString;
1817
- }, z.core.$strict>>;
1818
- }, z.core.$strict>, z.ZodObject<{
1819
- kind: z.ZodLiteral<"requireSubject">;
1820
- subjectType: z.ZodString;
1821
- idSystem: z.ZodOptional<z.ZodString>;
1822
- }, z.core.$strict>, z.ZodObject<{
1823
- kind: z.ZodLiteral<"signal">;
1824
- key: z.ZodString;
1825
- args: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1826
- from: z.ZodLiteral<"enduserId">;
1827
- }, z.core.$strict>, z.ZodObject<{
1828
- from: z.ZodLiteral<"enduserTag">;
1829
- tag: z.ZodString;
1830
- }, z.core.$strict>, z.ZodObject<{
1831
- from: z.ZodLiteral<"toolName">;
1832
- }, z.core.$strict>, z.ZodObject<{
1833
- from: z.ZodLiteral<"toolTag">;
1834
- tag: z.ZodString;
1835
- }, z.core.$strict>, z.ZodObject<{
1836
- from: z.ZodLiteral<"toolArg">;
1837
- path: z.ZodString;
1838
- }, z.core.$strict>, z.ZodObject<{
1839
- from: z.ZodLiteral<"subject">;
1840
- subjectType: z.ZodString;
1841
- role: z.ZodOptional<z.ZodString>;
1842
- field: z.ZodOptional<z.ZodEnum<{
1843
- idSystem: "idSystem";
1844
- id: "id";
1845
- }>>;
1846
- }, z.core.$strict>, z.ZodObject<{
1847
- from: z.ZodLiteral<"const">;
1848
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
1849
- }, z.core.$strict>], "from">>;
1850
- op: z.ZodEnum<{
1851
- in: "in";
1852
- gt: "gt";
1853
- gte: "gte";
1854
- lt: "lt";
1855
- lte: "lte";
1856
- eq: "eq";
1857
- neq: "neq";
1858
- nin: "nin";
1859
- }>;
1860
- value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
1861
- onMissing: z.ZodOptional<z.ZodEnum<{
1862
- hitl: "hitl";
1863
- allow: "allow";
1864
- block: "block";
1865
- }>>;
1866
- }, z.core.$strict>]>;
1867
- }, z.core.$strict>]>;
73
+ condition: z.ZodType<import("./condition").RuleCondition, unknown, z.core.$ZodTypeInternals<import("./condition").RuleCondition, unknown>>;
1868
74
  effect: z.ZodDiscriminatedUnion<[z.ZodObject<{
1869
75
  type: z.ZodLiteral<"allow">;
1870
76
  reason: z.ZodOptional<z.ZodString>;