@intutic/shared-types 3.0.5 → 3.0.7

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
@@ -4,7 +4,7 @@
4
4
  * An LLM reading corporate policy prose is allowed to propose exactly two
5
5
  * things: a verbatim quote anchored to a passage it was shown, and a clause in
6
6
  * this closed IR. Everything after that is deterministic code: the validator
7
- * (`services/control-plane/src/lib/guardrailValidator.ts`) checks the quote by
7
+ * (the control plane) checks the quote by
8
8
  * containment and the IR against the grammar the proxy and the harness gates
9
9
  * already enforce, the renderers in `./guardrailRender.ts` turn it into the
10
10
  * exact bytes those enforcers read, and cross-language parity fixtures prove
@@ -52,7 +52,7 @@
52
52
  import { z } from 'zod';
53
53
  /**
54
54
  * The `action:` tokens the proxy's classifier synthesises from tool calls.
55
- * Moved here from `services/control-plane/src/services/learnedHoldService.ts`
55
+ * Moved here from the control plane
56
56
  * so the IR, the validator and the hold miner read one list; that file
57
57
  * re-exports it. A token outside this set and outside the observed tool names
58
58
  * compiles into a control that can never fire. The last five
@@ -86,47 +86,19 @@ export declare const QUALIFIED_TOKENS: readonly ["action:run_tests[ok]"];
86
86
  declare const HookRuleSchema: z.ZodObject<{
87
87
  kind: z.ZodLiteral<"hook_rule">;
88
88
  title: z.ZodString;
89
- tools: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
90
- argContains: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
91
- argNotContains: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
92
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
93
- }, "strict", z.ZodTypeAny, {
94
- kind: "hook_rule";
95
- title: string;
96
- tools: string[];
97
- argContains?: string[] | undefined;
98
- argNotContains?: string[] | undefined;
99
- roles?: string[] | undefined;
100
- }, {
101
- kind: "hook_rule";
102
- title: string;
103
- tools: string[];
104
- argContains?: string[] | undefined;
105
- argNotContains?: string[] | undefined;
106
- roles?: string[] | undefined;
107
- }>;
89
+ tools: z.ZodArray<z.ZodString>;
90
+ argContains: z.ZodOptional<z.ZodArray<z.ZodString>>;
91
+ argNotContains: z.ZodOptional<z.ZodArray<z.ZodString>>;
92
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
93
+ }, z.core.$strict>;
108
94
  declare const WasmPredicateSchema: z.ZodObject<{
109
95
  kind: z.ZodLiteral<"wasm_predicate">;
110
96
  title: z.ZodString;
111
97
  rationale: z.ZodString;
112
98
  predicate: z.ZodUnknown;
113
99
  verdict: z.ZodLiteral<3>;
114
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
115
- }, "strict", z.ZodTypeAny, {
116
- kind: "wasm_predicate";
117
- title: string;
118
- rationale: string;
119
- verdict: 3;
120
- predicate?: unknown;
121
- roles?: string[] | undefined;
122
- }, {
123
- kind: "wasm_predicate";
124
- title: string;
125
- rationale: string;
126
- verdict: 3;
127
- predicate?: unknown;
128
- roles?: string[] | undefined;
129
- }>;
100
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
101
+ }, z.core.$strict>;
130
102
  /**
131
103
  * A model id as the proxy compares it: `check_model_allowed` in
132
104
  * `packages/proxy/src/metering.rs` is an exact, case-sensitive string match
@@ -155,434 +127,139 @@ export declare function isEgressHostEntry(value: string): boolean;
155
127
  declare const DecideSchema: z.ZodObject<{
156
128
  kind: z.ZodLiteral<"decide">;
157
129
  id: z.ZodString;
158
- title: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
159
- on: z.ZodEnum<["tool_call", "response"]>;
160
- tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
161
- questions: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
130
+ title: z.ZodOptional<z.ZodString>;
131
+ on: z.ZodEnum<{
132
+ tool_call: "tool_call";
133
+ response: "response";
134
+ }>;
135
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
136
+ questions: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
162
137
  type: z.ZodLiteral<"yes_no">;
163
- ask: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
138
+ ask: z.ZodString;
164
139
  band: z.ZodOptional<z.ZodObject<{
165
140
  yes_at: z.ZodNumber;
166
141
  no_below: z.ZodNumber;
167
- }, "strict", z.ZodTypeAny, {
168
- yes_at: number;
169
- no_below: number;
170
- }, {
171
- yes_at: number;
172
- no_below: number;
173
- }>>;
174
- }, "strict", z.ZodTypeAny, {
175
- type: "yes_no";
176
- ask: string;
177
- band?: {
178
- yes_at: number;
179
- no_below: number;
180
- } | undefined;
181
- }, {
182
- type: "yes_no";
183
- ask: string;
184
- band?: {
185
- yes_at: number;
186
- no_below: number;
187
- } | undefined;
188
- }>, z.ZodObject<{
142
+ }, z.core.$strict>>;
143
+ }, z.core.$strict>, z.ZodObject<{
189
144
  type: z.ZodLiteral<"choice">;
190
- ask: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
191
- options: z.ZodArray<z.ZodString, "many">;
145
+ ask: z.ZodString;
146
+ options: z.ZodArray<z.ZodString>;
192
147
  band: z.ZodOptional<z.ZodObject<{
193
148
  yes_at: z.ZodNumber;
194
149
  no_below: z.ZodNumber;
195
- }, "strict", z.ZodTypeAny, {
196
- yes_at: number;
197
- no_below: number;
198
- }, {
199
- yes_at: number;
200
- no_below: number;
201
- }>>;
202
- }, "strict", z.ZodTypeAny, {
203
- options: string[];
204
- type: "choice";
205
- ask: string;
206
- band?: {
207
- yes_at: number;
208
- no_below: number;
209
- } | undefined;
210
- }, {
211
- options: string[];
212
- type: "choice";
213
- ask: string;
214
- band?: {
215
- yes_at: number;
216
- no_below: number;
217
- } | undefined;
218
- }>]>>;
219
- when: z.ZodEffects<z.ZodString, string, string>;
150
+ }, z.core.$strict>>;
151
+ }, z.core.$strict>], "type">>;
152
+ when: z.ZodString;
220
153
  band: z.ZodOptional<z.ZodObject<{
221
154
  yes_at: z.ZodNumber;
222
155
  no_below: z.ZodNumber;
223
- }, "strict", z.ZodTypeAny, {
224
- yes_at: number;
225
- no_below: number;
226
- }, {
227
- yes_at: number;
228
- no_below: number;
156
+ }, z.core.$strict>>;
157
+ escalate: z.ZodOptional<z.ZodEnum<{
158
+ ask: "ask";
159
+ review: "review";
160
+ refuse: "refuse";
229
161
  }>>;
230
- escalate: z.ZodOptional<z.ZodEnum<["ask", "review", "refuse"]>>;
231
- rollout: z.ZodOptional<z.ZodEnum<["shadow", "enforce"]>>;
232
- context: z.ZodOptional<z.ZodArray<z.ZodLiteral<"last_user_turn">, "many">>;
233
- }, "strict", z.ZodTypeAny, {
234
- id: string;
235
- kind: "decide";
236
- on: "tool_call" | "response";
237
- questions: Record<string, {
238
- type: "yes_no";
239
- ask: string;
240
- band?: {
241
- yes_at: number;
242
- no_below: number;
243
- } | undefined;
244
- } | {
245
- options: string[];
246
- type: "choice";
247
- ask: string;
248
- band?: {
249
- yes_at: number;
250
- no_below: number;
251
- } | undefined;
252
- }>;
253
- when: string;
254
- title?: string | undefined;
255
- tools?: string[] | undefined;
256
- band?: {
257
- yes_at: number;
258
- no_below: number;
259
- } | undefined;
260
- escalate?: "ask" | "review" | "refuse" | undefined;
261
- rollout?: "shadow" | "enforce" | undefined;
262
- context?: "last_user_turn"[] | undefined;
263
- }, {
264
- id: string;
265
- kind: "decide";
266
- on: "tool_call" | "response";
267
- questions: Record<string, {
268
- type: "yes_no";
269
- ask: string;
270
- band?: {
271
- yes_at: number;
272
- no_below: number;
273
- } | undefined;
274
- } | {
275
- options: string[];
276
- type: "choice";
277
- ask: string;
278
- band?: {
279
- yes_at: number;
280
- no_below: number;
281
- } | undefined;
282
- }>;
283
- when: string;
284
- title?: string | undefined;
285
- tools?: string[] | undefined;
286
- band?: {
287
- yes_at: number;
288
- no_below: number;
289
- } | undefined;
290
- escalate?: "ask" | "review" | "refuse" | undefined;
291
- rollout?: "shadow" | "enforce" | undefined;
292
- context?: "last_user_turn"[] | undefined;
293
- }>;
294
- export declare const GuardrailIrSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
162
+ rollout: z.ZodOptional<z.ZodEnum<{
163
+ shadow: "shadow";
164
+ enforce: "enforce";
165
+ }>>;
166
+ context: z.ZodOptional<z.ZodArray<z.ZodLiteral<"last_user_turn">>>;
167
+ }, z.core.$strict>;
168
+ export declare const GuardrailIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
295
169
  kind: z.ZodLiteral<"hook_rule">;
296
170
  title: z.ZodString;
297
- tools: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
298
- argContains: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
299
- argNotContains: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
300
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
301
- }, "strict", z.ZodTypeAny, {
302
- kind: "hook_rule";
303
- title: string;
304
- tools: string[];
305
- argContains?: string[] | undefined;
306
- argNotContains?: string[] | undefined;
307
- roles?: string[] | undefined;
308
- }, {
309
- kind: "hook_rule";
310
- title: string;
311
- tools: string[];
312
- argContains?: string[] | undefined;
313
- argNotContains?: string[] | undefined;
314
- roles?: string[] | undefined;
315
- }>, z.ZodObject<{
171
+ tools: z.ZodArray<z.ZodString>;
172
+ argContains: z.ZodOptional<z.ZodArray<z.ZodString>>;
173
+ argNotContains: z.ZodOptional<z.ZodArray<z.ZodString>>;
174
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
175
+ }, z.core.$strict>, z.ZodObject<{
316
176
  kind: z.ZodLiteral<"deny_tools">;
317
- tools: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
318
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
319
- }, "strict", z.ZodTypeAny, {
320
- kind: "deny_tools";
321
- tools: string[];
322
- roles?: string[] | undefined;
323
- }, {
324
- kind: "deny_tools";
325
- tools: string[];
326
- roles?: string[] | undefined;
327
- }>, z.ZodObject<{
177
+ tools: z.ZodArray<z.ZodString>;
178
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
179
+ }, z.core.$strict>, z.ZodObject<{
328
180
  kind: z.ZodLiteral<"review_before">;
329
- tokens: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
330
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
331
- }, "strict", z.ZodTypeAny, {
332
- kind: "review_before";
333
- tokens: string[];
334
- roles?: string[] | undefined;
335
- }, {
336
- kind: "review_before";
337
- tokens: string[];
338
- roles?: string[] | undefined;
339
- }>, z.ZodObject<{
340
- first: z.ZodEffects<z.ZodString, string, string>;
341
- then: z.ZodEffects<z.ZodString, string, string>;
342
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
181
+ tokens: z.ZodArray<z.ZodString>;
182
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
183
+ }, z.core.$strict>, z.ZodObject<{
184
+ first: z.ZodString;
185
+ then: z.ZodString;
186
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
343
187
  kind: z.ZodLiteral<"requires_before">;
344
- }, "strict", z.ZodTypeAny, {
345
- kind: "requires_before";
346
- then: string;
347
- first: string;
348
- roles?: string[] | undefined;
349
- }, {
350
- kind: "requires_before";
351
- then: string;
352
- first: string;
353
- roles?: string[] | undefined;
354
- }>, z.ZodObject<{
355
- first: z.ZodEffects<z.ZodString, string, string>;
356
- then: z.ZodEffects<z.ZodString, string, string>;
357
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
188
+ }, z.core.$strict>, z.ZodObject<{
189
+ first: z.ZodString;
190
+ then: z.ZodString;
191
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
358
192
  kind: z.ZodLiteral<"forbid_after">;
359
- }, "strict", z.ZodTypeAny, {
360
- kind: "forbid_after";
361
- then: string;
362
- first: string;
363
- roles?: string[] | undefined;
364
- }, {
365
- kind: "forbid_after";
366
- then: string;
367
- first: string;
368
- roles?: string[] | undefined;
369
- }>, z.ZodObject<{
193
+ }, z.core.$strict>, z.ZodObject<{
370
194
  kind: z.ZodLiteral<"max_calls">;
371
- token: z.ZodEffects<z.ZodString, string, string>;
195
+ token: z.ZodString;
372
196
  limit: z.ZodNumber;
373
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
374
- }, "strict", z.ZodTypeAny, {
375
- token: string;
376
- kind: "max_calls";
377
- limit: number;
378
- roles?: string[] | undefined;
379
- }, {
380
- token: string;
381
- kind: "max_calls";
382
- limit: number;
383
- roles?: string[] | undefined;
384
- }>, z.ZodObject<{
197
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
198
+ }, z.core.$strict>, z.ZodObject<{
385
199
  kind: z.ZodLiteral<"forbid_with">;
386
- taint: z.ZodEnum<["secrets()", "pii()"]>;
387
- token: z.ZodEffects<z.ZodString, string, string>;
388
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
389
- }, "strict", z.ZodTypeAny, {
390
- token: string;
391
- kind: "forbid_with";
392
- taint: "secrets()" | "pii()";
393
- roles?: string[] | undefined;
394
- }, {
395
- token: string;
396
- kind: "forbid_with";
397
- taint: "secrets()" | "pii()";
398
- roles?: string[] | undefined;
399
- }>, z.ZodObject<{
200
+ taint: z.ZodEnum<{
201
+ "secrets()": "secrets()";
202
+ "pii()": "pii()";
203
+ }>;
204
+ token: z.ZodString;
205
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
206
+ }, z.core.$strict>, z.ZodObject<{
400
207
  kind: z.ZodLiteral<"wasm_predicate">;
401
208
  title: z.ZodString;
402
209
  rationale: z.ZodString;
403
210
  predicate: z.ZodUnknown;
404
211
  verdict: z.ZodLiteral<3>;
405
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
406
- }, "strict", z.ZodTypeAny, {
407
- kind: "wasm_predicate";
408
- title: string;
409
- rationale: string;
410
- verdict: 3;
411
- predicate?: unknown;
412
- roles?: string[] | undefined;
413
- }, {
414
- kind: "wasm_predicate";
415
- title: string;
416
- rationale: string;
417
- verdict: 3;
418
- predicate?: unknown;
419
- roles?: string[] | undefined;
420
- }>, z.ZodObject<{
212
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
213
+ }, z.core.$strict>, z.ZodObject<{
421
214
  kind: z.ZodLiteral<"allowed_models">;
422
- models: z.ZodArray<z.ZodString, "many">;
423
- }, "strict", z.ZodTypeAny, {
424
- kind: "allowed_models";
425
- models: string[];
426
- }, {
427
- kind: "allowed_models";
428
- models: string[];
429
- }>, z.ZodObject<{
215
+ models: z.ZodArray<z.ZodString>;
216
+ }, z.core.$strict>, z.ZodObject<{
430
217
  kind: z.ZodLiteral<"egress_allow">;
431
- hosts: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
432
- }, "strict", z.ZodTypeAny, {
433
- kind: "egress_allow";
434
- hosts: string[];
435
- }, {
436
- kind: "egress_allow";
437
- hosts: string[];
438
- }>, z.ZodObject<{
218
+ hosts: z.ZodArray<z.ZodString>;
219
+ }, z.core.$strict>, z.ZodObject<{
439
220
  kind: z.ZodLiteral<"decide">;
440
221
  id: z.ZodString;
441
- title: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
442
- on: z.ZodEnum<["tool_call", "response"]>;
443
- tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
444
- questions: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
222
+ title: z.ZodOptional<z.ZodString>;
223
+ on: z.ZodEnum<{
224
+ tool_call: "tool_call";
225
+ response: "response";
226
+ }>;
227
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
228
+ questions: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
445
229
  type: z.ZodLiteral<"yes_no">;
446
- ask: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
230
+ ask: z.ZodString;
447
231
  band: z.ZodOptional<z.ZodObject<{
448
232
  yes_at: z.ZodNumber;
449
233
  no_below: z.ZodNumber;
450
- }, "strict", z.ZodTypeAny, {
451
- yes_at: number;
452
- no_below: number;
453
- }, {
454
- yes_at: number;
455
- no_below: number;
456
- }>>;
457
- }, "strict", z.ZodTypeAny, {
458
- type: "yes_no";
459
- ask: string;
460
- band?: {
461
- yes_at: number;
462
- no_below: number;
463
- } | undefined;
464
- }, {
465
- type: "yes_no";
466
- ask: string;
467
- band?: {
468
- yes_at: number;
469
- no_below: number;
470
- } | undefined;
471
- }>, z.ZodObject<{
234
+ }, z.core.$strict>>;
235
+ }, z.core.$strict>, z.ZodObject<{
472
236
  type: z.ZodLiteral<"choice">;
473
- ask: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
474
- options: z.ZodArray<z.ZodString, "many">;
237
+ ask: z.ZodString;
238
+ options: z.ZodArray<z.ZodString>;
475
239
  band: z.ZodOptional<z.ZodObject<{
476
240
  yes_at: z.ZodNumber;
477
241
  no_below: z.ZodNumber;
478
- }, "strict", z.ZodTypeAny, {
479
- yes_at: number;
480
- no_below: number;
481
- }, {
482
- yes_at: number;
483
- no_below: number;
484
- }>>;
485
- }, "strict", z.ZodTypeAny, {
486
- options: string[];
487
- type: "choice";
488
- ask: string;
489
- band?: {
490
- yes_at: number;
491
- no_below: number;
492
- } | undefined;
493
- }, {
494
- options: string[];
495
- type: "choice";
496
- ask: string;
497
- band?: {
498
- yes_at: number;
499
- no_below: number;
500
- } | undefined;
501
- }>]>>;
502
- when: z.ZodEffects<z.ZodString, string, string>;
242
+ }, z.core.$strict>>;
243
+ }, z.core.$strict>], "type">>;
244
+ when: z.ZodString;
503
245
  band: z.ZodOptional<z.ZodObject<{
504
246
  yes_at: z.ZodNumber;
505
247
  no_below: z.ZodNumber;
506
- }, "strict", z.ZodTypeAny, {
507
- yes_at: number;
508
- no_below: number;
509
- }, {
510
- yes_at: number;
511
- no_below: number;
248
+ }, z.core.$strict>>;
249
+ escalate: z.ZodOptional<z.ZodEnum<{
250
+ ask: "ask";
251
+ review: "review";
252
+ refuse: "refuse";
512
253
  }>>;
513
- escalate: z.ZodOptional<z.ZodEnum<["ask", "review", "refuse"]>>;
514
- rollout: z.ZodOptional<z.ZodEnum<["shadow", "enforce"]>>;
515
- context: z.ZodOptional<z.ZodArray<z.ZodLiteral<"last_user_turn">, "many">>;
516
- }, "strict", z.ZodTypeAny, {
517
- id: string;
518
- kind: "decide";
519
- on: "tool_call" | "response";
520
- questions: Record<string, {
521
- type: "yes_no";
522
- ask: string;
523
- band?: {
524
- yes_at: number;
525
- no_below: number;
526
- } | undefined;
527
- } | {
528
- options: string[];
529
- type: "choice";
530
- ask: string;
531
- band?: {
532
- yes_at: number;
533
- no_below: number;
534
- } | undefined;
535
- }>;
536
- when: string;
537
- title?: string | undefined;
538
- tools?: string[] | undefined;
539
- band?: {
540
- yes_at: number;
541
- no_below: number;
542
- } | undefined;
543
- escalate?: "ask" | "review" | "refuse" | undefined;
544
- rollout?: "shadow" | "enforce" | undefined;
545
- context?: "last_user_turn"[] | undefined;
546
- }, {
547
- id: string;
548
- kind: "decide";
549
- on: "tool_call" | "response";
550
- questions: Record<string, {
551
- type: "yes_no";
552
- ask: string;
553
- band?: {
554
- yes_at: number;
555
- no_below: number;
556
- } | undefined;
557
- } | {
558
- options: string[];
559
- type: "choice";
560
- ask: string;
561
- band?: {
562
- yes_at: number;
563
- no_below: number;
564
- } | undefined;
565
- }>;
566
- when: string;
567
- title?: string | undefined;
568
- tools?: string[] | undefined;
569
- band?: {
570
- yes_at: number;
571
- no_below: number;
572
- } | undefined;
573
- escalate?: "ask" | "review" | "refuse" | undefined;
574
- rollout?: "shadow" | "enforce" | undefined;
575
- context?: "last_user_turn"[] | undefined;
576
- }>, z.ZodObject<{
254
+ rollout: z.ZodOptional<z.ZodEnum<{
255
+ shadow: "shadow";
256
+ enforce: "enforce";
257
+ }>>;
258
+ context: z.ZodOptional<z.ZodArray<z.ZodLiteral<"last_user_turn">>>;
259
+ }, z.core.$strict>, z.ZodObject<{
577
260
  kind: z.ZodLiteral<"none">;
578
261
  reason: z.ZodString;
579
- }, "strict", z.ZodTypeAny, {
580
- reason: string;
581
- kind: "none";
582
- }, {
583
- reason: string;
584
- kind: "none";
585
- }>]>;
262
+ }, z.core.$strict>], "kind">;
586
263
  export type GuardrailIr = z.infer<typeof GuardrailIrSchema>;
587
264
  export type HookRuleIr = z.infer<typeof HookRuleSchema>;
588
265
  export type WasmPredicateIr = z.infer<typeof WasmPredicateSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"guardrailIr.d.ts","sourceRoot":"","sources":["../src/guardrailIr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,sQAchB,CAAA;AAEV,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AAExD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAEjE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,QAAoC,CAAA;AAE9D,eAAO,MAAM,cAAc,IAAI,CAAA;AAC/B,eAAO,MAAM,eAAe,KAAK,CAAA;AACjC,eAAO,MAAM,YAAY,IAAI,CAAA;AAC7B,eAAO,MAAM,iBAAiB,KAAK,CAAA;AACnC,eAAO,MAAM,SAAS,IAAI,CAAA;AAC1B,eAAO,MAAM,eAA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AE,EAAE,WAAW,GAAG,EAAE,IAAI,aAAa,CAEpE;AAED,oFAAoF;AACpF,eAAO,MAAM,aAAa,6CAA8C,CAAA;AAExE;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;CAA4E,CAAA;AAC1G,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAA;AAEnF,wBAAgB,WAAW,CAAC,EAAE,EAAE,WAAW,GAAG,EAAE,IAAI,SAAS,CAE5D;AAED,kMAAkM;AAClM,wBAAgB,aAAa,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,EAAE,CAErD;AAED,MAAM,MAAM,YAAY,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,EAAE,EAAE,WAAW,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAExF;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAuBhE;AAMD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CA6CtD;AASD,qGAAqG;AACrG,wBAAgB,QAAQ,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,EAAE,CAqBlD"}
@@ -5,7 +5,7 @@
5
5
  * An LLM reading corporate policy prose is allowed to propose exactly two
6
6
  * things: a verbatim quote anchored to a passage it was shown, and a clause in
7
7
  * this closed IR. Everything after that is deterministic code: the validator
8
- * (`services/control-plane/src/lib/guardrailValidator.ts`) checks the quote by
8
+ * (the control plane) checks the quote by
9
9
  * containment and the IR against the grammar the proxy and the harness gates
10
10
  * already enforce, the renderers in `./guardrailRender.ts` turn it into the
11
11
  * exact bytes those enforcers read, and cross-language parity fixtures prove
@@ -65,7 +65,7 @@ const rulePredicateDsl_js_1 = require("./rulePredicateDsl.js");
65
65
  const decide_js_1 = require("./decide.js");
66
66
  /**
67
67
  * The `action:` tokens the proxy's classifier synthesises from tool calls.
68
- * Moved here from `services/control-plane/src/services/learnedHoldService.ts`
68
+ * Moved here from the control plane
69
69
  * so the IR, the validator and the hold miner read one list; that file
70
70
  * re-exports it. A token outside this set and outside the observed tool names
71
71
  * compiles into a control that can never fire. The last five