@intutic/shared-types 2.9.0 → 3.0.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.
- package/dist/decide.d.ts +269 -0
- package/dist/decide.d.ts.map +1 -0
- package/dist/decide.js +781 -0
- package/dist/decide.js.map +1 -0
- package/dist/decideEngine.d.ts +195 -0
- package/dist/decideEngine.d.ts.map +1 -0
- package/dist/decideEngine.js +720 -0
- package/dist/decideEngine.js.map +1 -0
- package/dist/decideEvaluate.d.ts +250 -0
- package/dist/decideEvaluate.d.ts.map +1 -0
- package/dist/decideEvaluate.js +518 -0
- package/dist/decideEvaluate.js.map +1 -0
- package/dist/decideHostGuard.d.ts +56 -0
- package/dist/decideHostGuard.d.ts.map +1 -0
- package/dist/decideHostGuard.js +200 -0
- package/dist/decideHostGuard.js.map +1 -0
- package/dist/decideLog.d.ts +287 -0
- package/dist/decideLog.d.ts.map +1 -0
- package/dist/decideLog.js +543 -0
- package/dist/decideLog.js.map +1 -0
- package/dist/decideLogRedaction.d.ts +12 -0
- package/dist/decideLogRedaction.d.ts.map +1 -0
- package/dist/decideLogRedaction.js +19 -0
- package/dist/decideLogRedaction.js.map +1 -0
- package/dist/decideRecord.d.ts +128 -0
- package/dist/decideRecord.d.ts.map +1 -0
- package/dist/decideRecord.js +266 -0
- package/dist/decideRecord.js.map +1 -0
- package/dist/decideSdk.d.ts +86 -0
- package/dist/decideSdk.d.ts.map +1 -0
- package/dist/decideSdk.js +151 -0
- package/dist/decideSdk.js.map +1 -0
- package/dist/errors.d.ts +11 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +12 -1
- package/dist/errors.js.map +1 -1
- package/dist/gateLimits.d.ts +27 -0
- package/dist/gateLimits.d.ts.map +1 -1
- package/dist/gateLimits.js +29 -1
- package/dist/gateLimits.js.map +1 -1
- package/dist/gateRuleRecord.d.ts +244 -0
- package/dist/gateRuleRecord.d.ts.map +1 -0
- package/dist/gateRuleRecord.js +474 -0
- package/dist/gateRuleRecord.js.map +1 -0
- package/dist/guardrailIr.d.ts +301 -10
- package/dist/guardrailIr.d.ts.map +1 -1
- package/dist/guardrailIr.js +86 -7
- package/dist/guardrailIr.js.map +1 -1
- package/dist/guardrailRender.d.ts +38 -4
- package/dist/guardrailRender.d.ts.map +1 -1
- package/dist/guardrailRender.js +155 -14
- package/dist/guardrailRender.js.map +1 -1
- package/dist/index.d.ts +28 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +162 -8
- package/dist/index.js.map +1 -1
- package/dist/lanes.d.ts +94 -0
- package/dist/lanes.d.ts.map +1 -0
- package/dist/lanes.js +160 -0
- package/dist/lanes.js.map +1 -0
- package/dist/loopVerify.d.ts +49 -0
- package/dist/loopVerify.d.ts.map +1 -0
- package/dist/loopVerify.js +77 -0
- package/dist/loopVerify.js.map +1 -0
- package/dist/mcpBudgets.d.ts +8 -8
- package/dist/notifications.d.ts +1 -1
- package/dist/notifications.d.ts.map +1 -1
- package/dist/notifications.js +14 -0
- package/dist/notifications.js.map +1 -1
- package/dist/providers.d.ts +13 -0
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +31 -0
- package/dist/providers.js.map +1 -1
- package/dist/refusalDetail.d.ts +58 -0
- package/dist/refusalDetail.d.ts.map +1 -0
- package/dist/refusalDetail.js +128 -0
- package/dist/refusalDetail.js.map +1 -0
- package/dist/responses/decide.d.ts +1858 -0
- package/dist/responses/decide.d.ts.map +1 -0
- package/dist/responses/decide.js +166 -0
- package/dist/responses/decide.js.map +1 -0
- package/dist/responses/gateways.d.ts +745 -101
- package/dist/responses/gateways.d.ts.map +1 -1
- package/dist/responses/gateways.js +34 -2
- package/dist/responses/gateways.js.map +1 -1
- package/dist/responses/guardrails.d.ts +1434 -144
- package/dist/responses/guardrails.d.ts.map +1 -1
- package/dist/responses/identity.d.ts +6 -6
- package/dist/responses/index.d.ts +1 -0
- package/dist/responses/index.d.ts.map +1 -1
- package/dist/responses/index.js +1 -0
- package/dist/responses/index.js.map +1 -1
- package/dist/responses/integrations.d.ts +84 -84
- package/dist/responses/observability.d.ts +272 -92
- package/dist/responses/observability.d.ts.map +1 -1
- package/dist/responses/observability.js +31 -1
- package/dist/responses/observability.js.map +1 -1
- package/dist/responses/rules.d.ts +1026 -187
- package/dist/responses/rules.d.ts.map +1 -1
- package/dist/responses/rules.js +47 -1
- package/dist/responses/rules.js.map +1 -1
- package/dist/scopeMatch.d.ts +156 -0
- package/dist/scopeMatch.d.ts.map +1 -0
- package/dist/scopeMatch.js +451 -0
- package/dist/scopeMatch.js.map +1 -0
- package/dist/sopKeySince.d.ts +41 -0
- package/dist/sopKeySince.d.ts.map +1 -0
- package/dist/sopKeySince.js +81 -0
- package/dist/sopKeySince.js.map +1 -0
- package/dist/testOutcome.d.ts +164 -0
- package/dist/testOutcome.d.ts.map +1 -0
- package/dist/testOutcome.js +454 -0
- package/dist/testOutcome.js.map +1 -0
- package/dist/upstreamRetry.d.ts +2 -2
- package/dist/workspaceSettings.d.ts +91 -0
- package/dist/workspaceSettings.d.ts.map +1 -1
- package/dist/workspaceSettings.js +48 -2
- package/dist/workspaceSettings.js.map +1 -1
- package/package.json +2 -2
package/dist/guardrailIr.d.ts
CHANGED
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
* (`SETTING_KIND_KEYS`). Neither carries roles — a workspace setting has no
|
|
29
29
|
* per-role form — and neither is projected into a rule endpoint: a promoted
|
|
30
30
|
* one is written into the setting the proxy already enforces.
|
|
31
|
+
* - `decide` — a few narrow questions a self-hosted model answers about a
|
|
32
|
+
* tool call or a response, combined by a `when` expression. Its grammar,
|
|
33
|
+
* validation and semantics live in `./decide.ts`, which every port of the
|
|
34
|
+
* rule shares; it is written as one `decide: {json}` front-matter line.
|
|
31
35
|
* - `none` — "this passage contains no enforceable rule", so the corpus can
|
|
32
36
|
* measure over-generation.
|
|
33
37
|
*
|
|
@@ -47,13 +51,14 @@
|
|
|
47
51
|
*/
|
|
48
52
|
import { z } from 'zod';
|
|
49
53
|
/**
|
|
50
|
-
* The
|
|
51
|
-
*
|
|
54
|
+
* The `action:` tokens the proxy's classifier synthesises from tool calls.
|
|
55
|
+
* Moved here from `services/control-plane/src/services/learnedHoldService.ts`
|
|
52
56
|
* so the IR, the validator and the hold miner read one list; that file
|
|
53
57
|
* re-exports it. A token outside this set and outside the observed tool names
|
|
54
|
-
* compiles into a control that can never fire.
|
|
58
|
+
* compiles into a control that can never fire. The last five
|
|
59
|
+
* are lanes: each token's reversibility class is in `./lanes.ts`.
|
|
55
60
|
*/
|
|
56
|
-
export declare const ACTION_TOKENS: readonly ["action:deploy", "action:publish", "action:release", "action:db_write", "action:secret_read", "action:http_post", "action:pii_export", "action:run_tests"];
|
|
61
|
+
export declare const ACTION_TOKENS: readonly ["action:deploy", "action:publish", "action:release", "action:db_write", "action:secret_read", "action:http_post", "action:pii_export", "action:run_tests", "action:migrate", "action:prod_write", "action:destroy", "action:force_push", "action:payment"];
|
|
57
62
|
export type ActionToken = (typeof ACTION_TOKENS)[number];
|
|
58
63
|
export declare function isActionToken(value: string): value is ActionToken;
|
|
59
64
|
/**
|
|
@@ -72,6 +77,12 @@ export declare const MAX_ROLES = 8;
|
|
|
72
77
|
export declare const MAX_TITLE_CHARS = 80;
|
|
73
78
|
export declare const MAX_RATIONALE_CHARS = 480;
|
|
74
79
|
export declare const MAX_CALLS_LIMIT = 1000;
|
|
80
|
+
/**
|
|
81
|
+
* The tokens a qualified ordering rule may name on its left
|
|
82
|
+
* (`requires_before: action:run_tests[ok] -> action:deploy`):
|
|
83
|
+
* only `action:run_tests[ok]`, met only by the latest test run passing.
|
|
84
|
+
*/
|
|
85
|
+
export declare const QUALIFIED_TOKENS: readonly ["action:run_tests[ok]"];
|
|
75
86
|
declare const HookRuleSchema: z.ZodObject<{
|
|
76
87
|
kind: z.ZodLiteral<"hook_rule">;
|
|
77
88
|
title: z.ZodString;
|
|
@@ -106,15 +117,15 @@ declare const WasmPredicateSchema: z.ZodObject<{
|
|
|
106
117
|
title: string;
|
|
107
118
|
rationale: string;
|
|
108
119
|
verdict: 3;
|
|
109
|
-
roles?: string[] | undefined;
|
|
110
120
|
predicate?: unknown;
|
|
121
|
+
roles?: string[] | undefined;
|
|
111
122
|
}, {
|
|
112
123
|
kind: "wasm_predicate";
|
|
113
124
|
title: string;
|
|
114
125
|
rationale: string;
|
|
115
126
|
verdict: 3;
|
|
116
|
-
roles?: string[] | undefined;
|
|
117
127
|
predicate?: unknown;
|
|
128
|
+
roles?: string[] | undefined;
|
|
118
129
|
}>;
|
|
119
130
|
/**
|
|
120
131
|
* A model id as the proxy compares it: `check_model_allowed` in
|
|
@@ -141,6 +152,145 @@ export declare const MIN_EGRESS_CIDR_PREFIX = 8;
|
|
|
141
152
|
* everything). IPv6 is honoured by the proxy but not offered here.
|
|
142
153
|
*/
|
|
143
154
|
export declare function isEgressHostEntry(value: string): boolean;
|
|
155
|
+
declare const DecideSchema: z.ZodObject<{
|
|
156
|
+
kind: z.ZodLiteral<"decide">;
|
|
157
|
+
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<{
|
|
162
|
+
type: z.ZodLiteral<"yes_no">;
|
|
163
|
+
ask: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
|
|
164
|
+
band: z.ZodOptional<z.ZodObject<{
|
|
165
|
+
yes_at: z.ZodNumber;
|
|
166
|
+
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<{
|
|
189
|
+
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">;
|
|
192
|
+
band: z.ZodOptional<z.ZodObject<{
|
|
193
|
+
yes_at: z.ZodNumber;
|
|
194
|
+
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>;
|
|
220
|
+
band: z.ZodOptional<z.ZodObject<{
|
|
221
|
+
yes_at: z.ZodNumber;
|
|
222
|
+
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;
|
|
229
|
+
}>>;
|
|
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
|
+
}>;
|
|
144
294
|
export declare const GuardrailIrSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
145
295
|
kind: z.ZodLiteral<"hook_rule">;
|
|
146
296
|
title: z.ZodString;
|
|
@@ -258,15 +408,15 @@ export declare const GuardrailIrSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodOb
|
|
|
258
408
|
title: string;
|
|
259
409
|
rationale: string;
|
|
260
410
|
verdict: 3;
|
|
261
|
-
roles?: string[] | undefined;
|
|
262
411
|
predicate?: unknown;
|
|
412
|
+
roles?: string[] | undefined;
|
|
263
413
|
}, {
|
|
264
414
|
kind: "wasm_predicate";
|
|
265
415
|
title: string;
|
|
266
416
|
rationale: string;
|
|
267
417
|
verdict: 3;
|
|
268
|
-
roles?: string[] | undefined;
|
|
269
418
|
predicate?: unknown;
|
|
419
|
+
roles?: string[] | undefined;
|
|
270
420
|
}>, z.ZodObject<{
|
|
271
421
|
kind: z.ZodLiteral<"allowed_models">;
|
|
272
422
|
models: z.ZodArray<z.ZodString, "many">;
|
|
@@ -285,6 +435,144 @@ export declare const GuardrailIrSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodOb
|
|
|
285
435
|
}, {
|
|
286
436
|
kind: "egress_allow";
|
|
287
437
|
hosts: string[];
|
|
438
|
+
}>, z.ZodObject<{
|
|
439
|
+
kind: z.ZodLiteral<"decide">;
|
|
440
|
+
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<{
|
|
445
|
+
type: z.ZodLiteral<"yes_no">;
|
|
446
|
+
ask: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
|
|
447
|
+
band: z.ZodOptional<z.ZodObject<{
|
|
448
|
+
yes_at: z.ZodNumber;
|
|
449
|
+
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<{
|
|
472
|
+
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">;
|
|
475
|
+
band: z.ZodOptional<z.ZodObject<{
|
|
476
|
+
yes_at: z.ZodNumber;
|
|
477
|
+
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>;
|
|
503
|
+
band: z.ZodOptional<z.ZodObject<{
|
|
504
|
+
yes_at: z.ZodNumber;
|
|
505
|
+
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;
|
|
512
|
+
}>>;
|
|
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;
|
|
288
576
|
}>, z.ZodObject<{
|
|
289
577
|
kind: z.ZodLiteral<"none">;
|
|
290
578
|
reason: z.ZodString;
|
|
@@ -298,6 +586,7 @@ export declare const GuardrailIrSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodOb
|
|
|
298
586
|
export type GuardrailIr = z.infer<typeof GuardrailIrSchema>;
|
|
299
587
|
export type HookRuleIr = z.infer<typeof HookRuleSchema>;
|
|
300
588
|
export type WasmPredicateIr = z.infer<typeof WasmPredicateSchema>;
|
|
589
|
+
export type DecideIr = z.infer<typeof DecideSchema>;
|
|
301
590
|
export type FrontMatterIr = Extract<GuardrailIr, {
|
|
302
591
|
kind: 'deny_tools' | 'review_before' | 'requires_before' | 'forbid_after' | 'max_calls' | 'forbid_with';
|
|
303
592
|
}>;
|
|
@@ -306,7 +595,7 @@ export type SettingIr = Extract<GuardrailIr, {
|
|
|
306
595
|
}>;
|
|
307
596
|
export type IrKind = GuardrailIr['kind'];
|
|
308
597
|
/** Every kind, in one place, for the lint gate (`check-guardrail-ir-keys.js`). */
|
|
309
|
-
export declare const IR_KINDS: readonly ["hook_rule", "deny_tools", "review_before", "requires_before", "forbid_after", "max_calls", "forbid_with", "wasm_predicate", "allowed_models", "egress_allow", "none"];
|
|
598
|
+
export declare const IR_KINDS: readonly ["hook_rule", "deny_tools", "review_before", "requires_before", "forbid_after", "max_calls", "forbid_with", "wasm_predicate", "allowed_models", "egress_allow", "decide", "none"];
|
|
310
599
|
/** The kinds that render to a SOP front-matter key the Rust proxy reads. */
|
|
311
600
|
export declare const FRONT_MATTER_KINDS: readonly ["deny_tools", "review_before", "requires_before", "forbid_after", "max_calls", "forbid_with"];
|
|
312
601
|
export declare function isFrontMatterIr(ir: GuardrailIr): ir is FrontMatterIr;
|
|
@@ -335,7 +624,9 @@ export type IrValidation = {
|
|
|
335
624
|
* Parse an untrusted value into the IR, or say why it is not one. Never
|
|
336
625
|
* throws. This — not `GuardrailIrSchema.parse` — is the entry point: the
|
|
337
626
|
* shape parse cannot express "the two ordering tokens differ" or "the wasm
|
|
338
|
-
* predicate is in the closed DSL", so both are checked here.
|
|
627
|
+
* predicate is in the closed DSL", so both are checked here. A `decide` IR
|
|
628
|
+
* is answered by `validateDecideRule`, the ordered checks every port of the
|
|
629
|
+
* rule shares, before the shape parse types it.
|
|
339
630
|
*/
|
|
340
631
|
export declare function validateGuardrailIr(value: unknown): IrValidation;
|
|
341
632
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guardrailIr.d.ts","sourceRoot":"","sources":["../src/guardrailIr.ts"],"names":[],"mappings":"AAAA
|
|
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,eAAe,KAAK,CAAA;AACjC,eAAO,MAAM,mBAAmB,MAAM,CAAA;AACtC,eAAO,MAAM,eAAe,OAAO,CAAA;AAUnC;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,mCAAoC,CAAA;AAiCjE,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;EAST,CAAA;AAyCX,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;EASd,CAAA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qBlD"}
|
package/dist/guardrailIr.js
CHANGED
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
* (`SETTING_KIND_KEYS`). Neither carries roles — a workspace setting has no
|
|
30
30
|
* per-role form — and neither is projected into a rule endpoint: a promoted
|
|
31
31
|
* one is written into the setting the proxy already enforces.
|
|
32
|
+
* - `decide` — a few narrow questions a self-hosted model answers about a
|
|
33
|
+
* tool call or a response, combined by a `when` expression. Its grammar,
|
|
34
|
+
* validation and semantics live in `./decide.ts`, which every port of the
|
|
35
|
+
* rule shares; it is written as one `decide: {json}` front-matter line.
|
|
32
36
|
* - `none` — "this passage contains no enforceable rule", so the corpus can
|
|
33
37
|
* measure over-generation.
|
|
34
38
|
*
|
|
@@ -47,7 +51,7 @@
|
|
|
47
51
|
* @module
|
|
48
52
|
*/
|
|
49
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.SETTING_KIND_KEYS = exports.SETTING_KINDS = exports.FRONT_MATTER_KINDS = exports.IR_KINDS = exports.GuardrailIrSchema = exports.MIN_EGRESS_CIDR_PREFIX = exports.MAX_SETTING_VALUES = exports.MODEL_ID_RE = exports.MAX_CALLS_LIMIT = exports.MAX_RATIONALE_CHARS = exports.MAX_TITLE_CHARS = exports.MAX_ROLES = exports.MAX_LITERAL_CHARS = exports.MAX_LITERALS = exports.MAX_LIST_TOKENS = exports.MAX_HOOK_TOOLS = exports.TOOL_TOKEN_RE = exports.ACTION_TOKENS = void 0;
|
|
54
|
+
exports.SETTING_KIND_KEYS = exports.SETTING_KINDS = exports.FRONT_MATTER_KINDS = exports.IR_KINDS = exports.GuardrailIrSchema = exports.MIN_EGRESS_CIDR_PREFIX = exports.MAX_SETTING_VALUES = exports.MODEL_ID_RE = exports.QUALIFIED_TOKENS = exports.MAX_CALLS_LIMIT = exports.MAX_RATIONALE_CHARS = exports.MAX_TITLE_CHARS = exports.MAX_ROLES = exports.MAX_LITERAL_CHARS = exports.MAX_LITERALS = exports.MAX_LIST_TOKENS = exports.MAX_HOOK_TOOLS = exports.TOOL_TOKEN_RE = exports.ACTION_TOKENS = void 0;
|
|
51
55
|
exports.isActionToken = isActionToken;
|
|
52
56
|
exports.isEgressHostEntry = isEgressHostEntry;
|
|
53
57
|
exports.isFrontMatterIr = isFrontMatterIr;
|
|
@@ -58,12 +62,14 @@ exports.canonicalizeIr = canonicalizeIr;
|
|
|
58
62
|
exports.irTokens = irTokens;
|
|
59
63
|
const zod_1 = require("zod");
|
|
60
64
|
const rulePredicateDsl_js_1 = require("./rulePredicateDsl.js");
|
|
65
|
+
const decide_js_1 = require("./decide.js");
|
|
61
66
|
/**
|
|
62
|
-
* The
|
|
63
|
-
*
|
|
67
|
+
* The `action:` tokens the proxy's classifier synthesises from tool calls.
|
|
68
|
+
* Moved here from `services/control-plane/src/services/learnedHoldService.ts`
|
|
64
69
|
* so the IR, the validator and the hold miner read one list; that file
|
|
65
70
|
* re-exports it. A token outside this set and outside the observed tool names
|
|
66
|
-
* compiles into a control that can never fire.
|
|
71
|
+
* compiles into a control that can never fire. The last five
|
|
72
|
+
* are lanes: each token's reversibility class is in `./lanes.ts`.
|
|
67
73
|
*/
|
|
68
74
|
exports.ACTION_TOKENS = [
|
|
69
75
|
'action:deploy',
|
|
@@ -74,6 +80,11 @@ exports.ACTION_TOKENS = [
|
|
|
74
80
|
'action:http_post',
|
|
75
81
|
'action:pii_export',
|
|
76
82
|
'action:run_tests',
|
|
83
|
+
'action:migrate',
|
|
84
|
+
'action:prod_write',
|
|
85
|
+
'action:destroy',
|
|
86
|
+
'action:force_push',
|
|
87
|
+
'action:payment',
|
|
77
88
|
];
|
|
78
89
|
function isActionToken(value) {
|
|
79
90
|
return exports.ACTION_TOKENS.includes(value);
|
|
@@ -99,7 +110,21 @@ const Token = zod_1.z
|
|
|
99
110
|
.min(1)
|
|
100
111
|
.max(64)
|
|
101
112
|
.refine((v) => isActionToken(v) || exports.TOOL_TOKEN_RE.test(v), {
|
|
102
|
-
message: 'a token is a tool name (`Bash`, `mcp__github__create_issue`) or one of the
|
|
113
|
+
message: 'a token is a tool name (`Bash`, `mcp__github__create_issue`) or one of the `action:` tokens — never a command',
|
|
114
|
+
});
|
|
115
|
+
/**
|
|
116
|
+
* The tokens a qualified ordering rule may name on its left
|
|
117
|
+
* (`requires_before: action:run_tests[ok] -> action:deploy`):
|
|
118
|
+
* only `action:run_tests[ok]`, met only by the latest test run passing.
|
|
119
|
+
*/
|
|
120
|
+
exports.QUALIFIED_TOKENS = ['action:run_tests[ok]'];
|
|
121
|
+
/** The left side of a `requires_before`: a token, or {@link QUALIFIED_TOKENS}. */
|
|
122
|
+
const RequiresFirst = zod_1.z
|
|
123
|
+
.string()
|
|
124
|
+
.min(1)
|
|
125
|
+
.max(64)
|
|
126
|
+
.refine((v) => isActionToken(v) || exports.TOOL_TOKEN_RE.test(v) || exports.QUALIFIED_TOKENS.includes(v), {
|
|
127
|
+
message: 'a token is a tool name (`Bash`, `mcp__github__create_issue`), one of the `action:` tokens, or `action:run_tests[ok]` (requires_before, on the left) — never a command',
|
|
103
128
|
});
|
|
104
129
|
/**
|
|
105
130
|
* A literal substring of the serialised tool input. No tab or newline (the
|
|
@@ -144,7 +169,7 @@ const orderingShape = {
|
|
|
144
169
|
// Discriminated-union members must be plain objects, so the two cross-field
|
|
145
170
|
// rules (ordering tokens differ; a wasm predicate validates) are applied in
|
|
146
171
|
// `validateGuardrailIr` after the shape parse rather than as refinements here.
|
|
147
|
-
const RequiresBeforeSchema = zod_1.z.object({ kind: zod_1.z.literal('requires_before'), ...orderingShape }).strict();
|
|
172
|
+
const RequiresBeforeSchema = zod_1.z.object({ kind: zod_1.z.literal('requires_before'), ...orderingShape, first: RequiresFirst }).strict();
|
|
148
173
|
const ForbidAfterSchema = zod_1.z.object({ kind: zod_1.z.literal('forbid_after'), ...orderingShape }).strict();
|
|
149
174
|
const MaxCallsSchema = zod_1.z
|
|
150
175
|
.object({
|
|
@@ -239,6 +264,45 @@ const EgressAllowSchema = zod_1.z
|
|
|
239
264
|
.object({ kind: zod_1.z.literal('egress_allow'), hosts: zod_1.z.array(HostEntry).min(1).max(exports.MAX_SETTING_VALUES) })
|
|
240
265
|
.strict();
|
|
241
266
|
const NoneSchema = zod_1.z.object({ kind: zod_1.z.literal('none'), reason: Rationale }).strict();
|
|
267
|
+
// The decide kind's shape. `validateDecideRule` in `./decide.ts` is what
|
|
268
|
+
// `validateGuardrailIr` answers with, so every port gives the same reason;
|
|
269
|
+
// this schema types the result and holds the same bounds. Lengths are in
|
|
270
|
+
// code points, as the Rust and Python ports count them.
|
|
271
|
+
const codePointsBetween = (min, max) => (v) => {
|
|
272
|
+
const n = Array.from(v).length;
|
|
273
|
+
return n >= min && n <= max;
|
|
274
|
+
};
|
|
275
|
+
const DecideName = zod_1.z.string().regex(/^[a-z][a-z0-9_]{0,31}$/);
|
|
276
|
+
const DecideAsk = zod_1.z
|
|
277
|
+
.string()
|
|
278
|
+
.refine(codePointsBetween(decide_js_1.DECIDE_MIN_ASK_CHARS, decide_js_1.DECIDE_MAX_ASK_CHARS))
|
|
279
|
+
.refine((v) => !/[\t\r\n]/.test(v))
|
|
280
|
+
.refine((v) => !decide_js_1.DECIDE_APPROVAL_RE.test(v));
|
|
281
|
+
const DecideTitle = zod_1.z
|
|
282
|
+
.string()
|
|
283
|
+
.refine(codePointsBetween(1, exports.MAX_TITLE_CHARS))
|
|
284
|
+
.refine((v) => !/[\t\r\n]/.test(v));
|
|
285
|
+
// `no_below < yes_at` is a cross-field rule, checked by `validateDecideRule`.
|
|
286
|
+
const DecideBand = zod_1.z.object({ yes_at: zod_1.z.number().gt(0.5).lt(1), no_below: zod_1.z.number().gt(0) }).strict();
|
|
287
|
+
const DecideQuestion = zod_1.z.discriminatedUnion('type', [
|
|
288
|
+
zod_1.z.object({ type: zod_1.z.literal('yes_no'), ask: DecideAsk, band: DecideBand.optional() }).strict(),
|
|
289
|
+
zod_1.z.object({ type: zod_1.z.literal('choice'), ask: DecideAsk, options: zod_1.z.array(DecideName).min(2).max(decide_js_1.DECIDE_MAX_OPTIONS), band: DecideBand.optional() }).strict(),
|
|
290
|
+
]);
|
|
291
|
+
const DecideSchema = zod_1.z
|
|
292
|
+
.object({
|
|
293
|
+
kind: zod_1.z.literal('decide'),
|
|
294
|
+
id: zod_1.z.string().regex(/^[a-z][a-z0-9_-]{0,47}$/),
|
|
295
|
+
title: DecideTitle.optional(),
|
|
296
|
+
on: zod_1.z.enum(['tool_call', 'response']),
|
|
297
|
+
tools: zod_1.z.array(zod_1.z.string().regex(exports.TOOL_TOKEN_RE)).min(1).max(exports.MAX_HOOK_TOOLS).optional(),
|
|
298
|
+
questions: zod_1.z.record(DecideName, DecideQuestion),
|
|
299
|
+
when: zod_1.z.string().refine(codePointsBetween(1, decide_js_1.DECIDE_MAX_WHEN_CHARS)),
|
|
300
|
+
band: DecideBand.optional(),
|
|
301
|
+
escalate: zod_1.z.enum(['ask', 'review', 'refuse']).optional(),
|
|
302
|
+
rollout: zod_1.z.enum(['shadow', 'enforce']).optional(),
|
|
303
|
+
context: zod_1.z.array(zod_1.z.literal('last_user_turn')).max(1).optional(),
|
|
304
|
+
})
|
|
305
|
+
.strict();
|
|
242
306
|
exports.GuardrailIrSchema = zod_1.z.discriminatedUnion('kind', [
|
|
243
307
|
HookRuleSchema,
|
|
244
308
|
DenyToolsSchema,
|
|
@@ -250,6 +314,7 @@ exports.GuardrailIrSchema = zod_1.z.discriminatedUnion('kind', [
|
|
|
250
314
|
WasmPredicateSchema,
|
|
251
315
|
AllowedModelsSchema,
|
|
252
316
|
EgressAllowSchema,
|
|
317
|
+
DecideSchema,
|
|
253
318
|
NoneSchema,
|
|
254
319
|
]);
|
|
255
320
|
/** Every kind, in one place, for the lint gate (`check-guardrail-ir-keys.js`). */
|
|
@@ -264,6 +329,7 @@ exports.IR_KINDS = [
|
|
|
264
329
|
'wasm_predicate',
|
|
265
330
|
'allowed_models',
|
|
266
331
|
'egress_allow',
|
|
332
|
+
'decide',
|
|
267
333
|
'none',
|
|
268
334
|
];
|
|
269
335
|
/** The kinds that render to a SOP front-matter key the Rust proxy reads. */
|
|
@@ -296,9 +362,16 @@ function settingValues(ir) {
|
|
|
296
362
|
* Parse an untrusted value into the IR, or say why it is not one. Never
|
|
297
363
|
* throws. This — not `GuardrailIrSchema.parse` — is the entry point: the
|
|
298
364
|
* shape parse cannot express "the two ordering tokens differ" or "the wasm
|
|
299
|
-
* predicate is in the closed DSL", so both are checked here.
|
|
365
|
+
* predicate is in the closed DSL", so both are checked here. A `decide` IR
|
|
366
|
+
* is answered by `validateDecideRule`, the ordered checks every port of the
|
|
367
|
+
* rule shares, before the shape parse types it.
|
|
300
368
|
*/
|
|
301
369
|
function validateGuardrailIr(value) {
|
|
370
|
+
if (value !== null && typeof value === 'object' && !Array.isArray(value) && value.kind === 'decide') {
|
|
371
|
+
const decided = (0, decide_js_1.validateDecideRule)(Object.fromEntries(Object.entries(value).filter(([k]) => k !== 'kind')));
|
|
372
|
+
if (!decided.ok)
|
|
373
|
+
return { ok: false, reason: decided.reason };
|
|
374
|
+
}
|
|
302
375
|
const parsed = exports.GuardrailIrSchema.safeParse(value);
|
|
303
376
|
if (!parsed.success) {
|
|
304
377
|
const first = parsed.error.issues[0];
|
|
@@ -368,6 +441,10 @@ function canonicalizeIr(ir) {
|
|
|
368
441
|
case 'egress_allow':
|
|
369
442
|
core = { hosts: settingValues(ir) };
|
|
370
443
|
break;
|
|
444
|
+
case 'decide':
|
|
445
|
+
// The rule hash's input, so a policy clause and the snapshot name a
|
|
446
|
+
// decide rule by the same bytes.
|
|
447
|
+
return (0, decide_js_1.decideHashInput)(ir);
|
|
371
448
|
case 'none':
|
|
372
449
|
core = {};
|
|
373
450
|
break;
|
|
@@ -386,6 +463,8 @@ function irTokens(ir) {
|
|
|
386
463
|
case 'hook_rule':
|
|
387
464
|
case 'deny_tools':
|
|
388
465
|
return [...ir.tools];
|
|
466
|
+
case 'decide':
|
|
467
|
+
return [...(ir.tools ?? [])];
|
|
389
468
|
case 'review_before':
|
|
390
469
|
return [...ir.tokens];
|
|
391
470
|
case 'requires_before':
|
package/dist/guardrailIr.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guardrailIr.js","sourceRoot":"","sources":["../src/guardrailIr.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;;;AAyBH,sCAEC;AA6ID,8CAmBC;AAkED,0CAEC;AAYD,kCAEC;AAGD,sCAEC;AAUD,kDAmBC;AAgBD,wCAyCC;AAUD,4BAmBC;AAnYD,6BAAuB;AACvB,+DAAyD;AAEzD;;;;;;GAMG;AACU,QAAA,aAAa,GAAG;IAC3B,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,oBAAoB;IACpB,kBAAkB;IAClB,mBAAmB;IACnB,kBAAkB;CACV,CAAA;AAIV,SAAgB,aAAa,CAAC,KAAa;IACzC,OAAQ,qBAAmC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC7D,CAAC;AAED;;;;;;GAMG;AACU,QAAA,aAAa,GAAG,iCAAiC,CAAA;AAEjD,QAAA,cAAc,GAAG,CAAC,CAAA;AAClB,QAAA,eAAe,GAAG,EAAE,CAAA;AACpB,QAAA,YAAY,GAAG,CAAC,CAAA;AAChB,QAAA,iBAAiB,GAAG,EAAE,CAAA;AACtB,QAAA,SAAS,GAAG,CAAC,CAAA;AACb,QAAA,eAAe,GAAG,EAAE,CAAA;AACpB,QAAA,mBAAmB,GAAG,GAAG,CAAA;AACzB,QAAA,eAAe,GAAG,IAAI,CAAA;AAEnC,MAAM,KAAK,GAAG,OAAC;KACZ,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,EAAE,CAAC;KACP,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,qBAAa,CAAC,IAAI,CAAC,CAAC,C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