@intutic/shared-types 2.5.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +9 -9
  2. package/dist/apiKeyScopes.d.ts +99 -0
  3. package/dist/apiKeyScopes.d.ts.map +1 -0
  4. package/dist/apiKeyScopes.js +140 -0
  5. package/dist/apiKeyScopes.js.map +1 -0
  6. package/dist/attenuation.d.ts +6 -2
  7. package/dist/attenuation.d.ts.map +1 -1
  8. package/dist/attenuation.js +13 -1
  9. package/dist/attenuation.js.map +1 -1
  10. package/dist/auth.d.ts +29 -4
  11. package/dist/auth.d.ts.map +1 -1
  12. package/dist/auth.js +26 -6
  13. package/dist/auth.js.map +1 -1
  14. package/dist/enums.d.ts +9 -26
  15. package/dist/enums.d.ts.map +1 -1
  16. package/dist/enums.js +11 -28
  17. package/dist/enums.js.map +1 -1
  18. package/dist/errors.d.ts +6 -1
  19. package/dist/errors.d.ts.map +1 -1
  20. package/dist/errors.js +6 -1
  21. package/dist/errors.js.map +1 -1
  22. package/dist/finops.d.ts +4 -2
  23. package/dist/finops.d.ts.map +1 -1
  24. package/dist/guardrailRender.d.ts +51 -0
  25. package/dist/guardrailRender.d.ts.map +1 -1
  26. package/dist/guardrailRender.js +69 -1
  27. package/dist/guardrailRender.js.map +1 -1
  28. package/dist/identity.d.ts +0 -18
  29. package/dist/identity.d.ts.map +1 -1
  30. package/dist/identity.js +1 -5
  31. package/dist/identity.js.map +1 -1
  32. package/dist/index.d.ts +12 -8
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +42 -10
  35. package/dist/index.js.map +1 -1
  36. package/dist/mcpDaemonPolicyCache.d.ts +32 -0
  37. package/dist/mcpDaemonPolicyCache.d.ts.map +1 -0
  38. package/dist/mcpDaemonPolicyCache.js +43 -0
  39. package/dist/mcpDaemonPolicyCache.js.map +1 -0
  40. package/dist/notifications.d.ts +1 -1
  41. package/dist/notifications.d.ts.map +1 -1
  42. package/dist/notifications.js +12 -0
  43. package/dist/notifications.js.map +1 -1
  44. package/dist/piiDetectors.d.ts +3 -0
  45. package/dist/piiDetectors.d.ts.map +1 -1
  46. package/dist/piiDetectors.js.map +1 -1
  47. package/dist/piiDetectors.json +11 -6
  48. package/dist/posturePresets.d.ts.map +1 -1
  49. package/dist/posturePresets.js +12 -3
  50. package/dist/posturePresets.js.map +1 -1
  51. package/dist/responses/common.d.ts +63 -0
  52. package/dist/responses/common.d.ts.map +1 -0
  53. package/dist/responses/common.js +43 -0
  54. package/dist/responses/common.js.map +1 -0
  55. package/dist/responses/gateways.d.ts +5297 -0
  56. package/dist/responses/gateways.d.ts.map +1 -0
  57. package/dist/responses/gateways.js +473 -0
  58. package/dist/responses/gateways.js.map +1 -0
  59. package/dist/responses/guardrails.d.ts +5200 -0
  60. package/dist/responses/guardrails.d.ts.map +1 -0
  61. package/dist/responses/guardrails.js +374 -0
  62. package/dist/responses/guardrails.js.map +1 -0
  63. package/dist/responses/identity.d.ts +1659 -0
  64. package/dist/responses/identity.d.ts.map +1 -0
  65. package/dist/responses/identity.js +291 -0
  66. package/dist/responses/identity.js.map +1 -0
  67. package/dist/responses/index.d.ts +15 -0
  68. package/dist/responses/index.d.ts.map +1 -0
  69. package/dist/responses/index.js +31 -0
  70. package/dist/responses/index.js.map +1 -0
  71. package/dist/responses/integrations.d.ts +4248 -0
  72. package/dist/responses/integrations.d.ts.map +1 -0
  73. package/dist/responses/integrations.js +436 -0
  74. package/dist/responses/integrations.js.map +1 -0
  75. package/dist/responses/observability.d.ts +3222 -0
  76. package/dist/responses/observability.d.ts.map +1 -0
  77. package/dist/responses/observability.js +598 -0
  78. package/dist/responses/observability.js.map +1 -0
  79. package/dist/responses/orgSops.d.ts +112 -0
  80. package/dist/responses/orgSops.d.ts.map +1 -0
  81. package/dist/responses/orgSops.js +29 -0
  82. package/dist/responses/orgSops.js.map +1 -0
  83. package/dist/responses/rules.d.ts +1904 -0
  84. package/dist/responses/rules.d.ts.map +1 -0
  85. package/dist/responses/rules.js +331 -0
  86. package/dist/responses/rules.js.map +1 -0
  87. package/dist/skillScan.d.ts +31 -0
  88. package/dist/skillScan.d.ts.map +1 -1
  89. package/dist/skillScan.js +25 -1
  90. package/dist/skillScan.js.map +1 -1
  91. package/dist/sop.d.ts +8 -1
  92. package/dist/sop.d.ts.map +1 -1
  93. package/dist/sop.js.map +1 -1
  94. package/dist/workspaceSettings.d.ts +25 -10
  95. package/dist/workspaceSettings.d.ts.map +1 -1
  96. package/dist/workspaceSettings.js +2 -1
  97. package/dist/workspaceSettings.js.map +1 -1
  98. package/package.json +2 -2
@@ -0,0 +1,1904 @@
1
+ /**
2
+ * Responses of the control plane routes in wasmRules.ts, sops.ts, decisions.ts, judge.ts and hookEvents.ts.
3
+ *
4
+ * @module
5
+ */
6
+ import { z } from 'zod';
7
+ /** A `wasm_rule_bundles` row without its binary. */
8
+ export declare const WasmRuleResponse: z.ZodObject<{
9
+ ruleId: z.ZodString;
10
+ workspaceId: z.ZodString;
11
+ name: z.ZodString;
12
+ description: z.ZodString;
13
+ bundleSha256: z.ZodString;
14
+ isActive: z.ZodBoolean;
15
+ /** Ascending; lower runs first. */
16
+ priority: z.ZodNumber;
17
+ mode: z.ZodString;
18
+ version: z.ZodNumber;
19
+ createdAt: z.ZodString;
20
+ updatedAt: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ workspaceId: string;
23
+ name: string;
24
+ mode: string;
25
+ ruleId: string;
26
+ description: string;
27
+ priority: number;
28
+ isActive: boolean;
29
+ createdAt: string;
30
+ updatedAt: string;
31
+ version: number;
32
+ bundleSha256: string;
33
+ }, {
34
+ workspaceId: string;
35
+ name: string;
36
+ mode: string;
37
+ ruleId: string;
38
+ description: string;
39
+ priority: number;
40
+ isActive: boolean;
41
+ createdAt: string;
42
+ updatedAt: string;
43
+ version: number;
44
+ bundleSha256: string;
45
+ }>;
46
+ export type WasmRuleResponse = z.infer<typeof WasmRuleResponse>;
47
+ /** `GET /api/v1/wasm-rules`: every rule of the workspace, as a bare array. */
48
+ export declare const WasmRuleListResponse: z.ZodArray<z.ZodObject<{
49
+ ruleId: z.ZodString;
50
+ workspaceId: z.ZodString;
51
+ name: z.ZodString;
52
+ description: z.ZodString;
53
+ bundleSha256: z.ZodString;
54
+ isActive: z.ZodBoolean;
55
+ /** Ascending; lower runs first. */
56
+ priority: z.ZodNumber;
57
+ mode: z.ZodString;
58
+ version: z.ZodNumber;
59
+ createdAt: z.ZodString;
60
+ updatedAt: z.ZodString;
61
+ }, "strip", z.ZodTypeAny, {
62
+ workspaceId: string;
63
+ name: string;
64
+ mode: string;
65
+ ruleId: string;
66
+ description: string;
67
+ priority: number;
68
+ isActive: boolean;
69
+ createdAt: string;
70
+ updatedAt: string;
71
+ version: number;
72
+ bundleSha256: string;
73
+ }, {
74
+ workspaceId: string;
75
+ name: string;
76
+ mode: string;
77
+ ruleId: string;
78
+ description: string;
79
+ priority: number;
80
+ isActive: boolean;
81
+ createdAt: string;
82
+ updatedAt: string;
83
+ version: number;
84
+ bundleSha256: string;
85
+ }>, "many">;
86
+ export type WasmRuleListResponse = z.infer<typeof WasmRuleListResponse>;
87
+ /** `PUT /api/v1/wasm-rules/:ruleId`. */
88
+ export declare const WasmRuleUpdatedResponse: z.ZodObject<{
89
+ updated: z.ZodLiteral<true>;
90
+ }, "strip", z.ZodTypeAny, {
91
+ updated: true;
92
+ }, {
93
+ updated: true;
94
+ }>;
95
+ export type WasmRuleUpdatedResponse = z.infer<typeof WasmRuleUpdatedResponse>;
96
+ /** `DELETE /api/v1/wasm-rules/:ruleId`. */
97
+ export declare const WasmRuleDeletedResponse: z.ZodObject<{
98
+ deleted: z.ZodLiteral<true>;
99
+ }, "strip", z.ZodTypeAny, {
100
+ deleted: true;
101
+ }, {
102
+ deleted: true;
103
+ }>;
104
+ export type WasmRuleDeletedResponse = z.infer<typeof WasmRuleDeletedResponse>;
105
+ /** `POST /api/v1/wasm-rules/:ruleId/replay`: the rule run over sampled request contexts (`summarizeReplay`). */
106
+ export declare const WasmRuleReplayResponse: z.ZodObject<{
107
+ ruleId: z.ZodString;
108
+ since: z.ZodNullable<z.ZodString>;
109
+ contextCount: z.ZodNumber;
110
+ wouldActCount: z.ZodNumber;
111
+ wouldActRate: z.ZodNumber;
112
+ verdictCounts: z.ZodRecord<z.ZodString, z.ZodNumber>;
113
+ sampleMatches: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
114
+ argumentsWithheld: z.ZodNumber;
115
+ argumentsNote: z.ZodOptional<z.ZodString>;
116
+ }, "strip", z.ZodTypeAny, {
117
+ ruleId: string;
118
+ wouldActRate: number;
119
+ since: string | null;
120
+ contextCount: number;
121
+ wouldActCount: number;
122
+ verdictCounts: Record<string, number>;
123
+ sampleMatches: Record<string, unknown>[];
124
+ argumentsWithheld: number;
125
+ argumentsNote?: string | undefined;
126
+ }, {
127
+ ruleId: string;
128
+ wouldActRate: number;
129
+ since: string | null;
130
+ contextCount: number;
131
+ wouldActCount: number;
132
+ verdictCounts: Record<string, number>;
133
+ sampleMatches: Record<string, unknown>[];
134
+ argumentsWithheld: number;
135
+ argumentsNote?: string | undefined;
136
+ }>;
137
+ export type WasmRuleReplayResponse = z.infer<typeof WasmRuleReplayResponse>;
138
+ /** A SOP as `sopService.ts` returns it. Which optional fields are present depends on the route. */
139
+ export declare const SopResponse: z.ZodObject<{
140
+ sopId: z.ZodString;
141
+ workspaceId: z.ZodString;
142
+ title: z.ZodString;
143
+ version: z.ZodString;
144
+ markdownContent: z.ZodString;
145
+ /** Null for a SOP written without one (the `sop_registry` view applies no column default; the SOP health cron writes none). */
146
+ riskTier: z.ZodNullable<z.ZodNativeEnum<{
147
+ readonly LOW: "LOW";
148
+ readonly MEDIUM: "MEDIUM";
149
+ readonly HIGH: "HIGH";
150
+ readonly CRITICAL: "CRITICAL";
151
+ }>>;
152
+ complexityTier: z.ZodNullable<z.ZodNativeEnum<{
153
+ readonly TIER_0: "TIER_0";
154
+ readonly TIER_1: "TIER_1";
155
+ readonly TIER_2: "TIER_2";
156
+ }>>;
157
+ isActive: z.ZodBoolean;
158
+ lifecycleState: z.ZodNativeEnum<{
159
+ readonly DRAFT: "DRAFT";
160
+ readonly PENDING_REVIEW: "PENDING_REVIEW";
161
+ readonly GENERATED: "GENERATED";
162
+ readonly HYPOTHESIZED: "HYPOTHESIZED";
163
+ readonly REFINED: "REFINED";
164
+ readonly VALIDATED: "VALIDATED";
165
+ readonly INVALIDATED: "INVALIDATED";
166
+ }>;
167
+ createdAt: z.ZodOptional<z.ZodString>;
168
+ updatedAt: z.ZodOptional<z.ZodString>;
169
+ contentHash: z.ZodOptional<z.ZodString>;
170
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
171
+ createdBy: z.ZodOptional<z.ZodString>;
172
+ versionCounter: z.ZodOptional<z.ZodNumber>;
173
+ priorVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
174
+ shadowEvaluations: z.ZodOptional<z.ZodNumber>;
175
+ shadowWouldBlock: z.ZodOptional<z.ZodNumber>;
176
+ gitDriftStatus: z.ZodOptional<z.ZodString>;
177
+ gitDriftCheckedAt: z.ZodOptional<z.ZodString>;
178
+ sslCompileState: z.ZodOptional<z.ZodEnum<["compiled", "stale", "uncompiled"]>>;
179
+ }, "strip", z.ZodTypeAny, {
180
+ workspaceId: string;
181
+ title: string;
182
+ riskTier: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL" | null;
183
+ markdownContent: string;
184
+ isActive: boolean;
185
+ sopId: string;
186
+ version: string;
187
+ complexityTier: "TIER_0" | "TIER_1" | "TIER_2" | null;
188
+ lifecycleState: "DRAFT" | "PENDING_REVIEW" | "GENERATED" | "HYPOTHESIZED" | "REFINED" | "VALIDATED" | "INVALIDATED";
189
+ contentHash?: string | undefined;
190
+ shadowEvaluations?: number | undefined;
191
+ shadowWouldBlock?: number | undefined;
192
+ createdAt?: string | undefined;
193
+ updatedAt?: string | undefined;
194
+ dependencies?: string[] | undefined;
195
+ createdBy?: string | undefined;
196
+ versionCounter?: number | undefined;
197
+ priorVersionId?: string | null | undefined;
198
+ gitDriftStatus?: string | undefined;
199
+ gitDriftCheckedAt?: string | undefined;
200
+ sslCompileState?: "compiled" | "stale" | "uncompiled" | undefined;
201
+ }, {
202
+ workspaceId: string;
203
+ title: string;
204
+ riskTier: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL" | null;
205
+ markdownContent: string;
206
+ isActive: boolean;
207
+ sopId: string;
208
+ version: string;
209
+ complexityTier: "TIER_0" | "TIER_1" | "TIER_2" | null;
210
+ lifecycleState: "DRAFT" | "PENDING_REVIEW" | "GENERATED" | "HYPOTHESIZED" | "REFINED" | "VALIDATED" | "INVALIDATED";
211
+ contentHash?: string | undefined;
212
+ shadowEvaluations?: number | undefined;
213
+ shadowWouldBlock?: number | undefined;
214
+ createdAt?: string | undefined;
215
+ updatedAt?: string | undefined;
216
+ dependencies?: string[] | undefined;
217
+ createdBy?: string | undefined;
218
+ versionCounter?: number | undefined;
219
+ priorVersionId?: string | null | undefined;
220
+ gitDriftStatus?: string | undefined;
221
+ gitDriftCheckedAt?: string | undefined;
222
+ sslCompileState?: "compiled" | "stale" | "uncompiled" | undefined;
223
+ }>;
224
+ export type SopResponse = z.infer<typeof SopResponse>;
225
+ /** `POST /api/v1/sops`: the created SOP; its tiers are the ones the request named. */
226
+ export declare const SopCreatedResponse: z.ZodObject<{
227
+ sopId: z.ZodString;
228
+ workspaceId: z.ZodString;
229
+ title: z.ZodString;
230
+ version: z.ZodString;
231
+ markdownContent: z.ZodString;
232
+ isActive: z.ZodBoolean;
233
+ lifecycleState: z.ZodNativeEnum<{
234
+ readonly DRAFT: "DRAFT";
235
+ readonly PENDING_REVIEW: "PENDING_REVIEW";
236
+ readonly GENERATED: "GENERATED";
237
+ readonly HYPOTHESIZED: "HYPOTHESIZED";
238
+ readonly REFINED: "REFINED";
239
+ readonly VALIDATED: "VALIDATED";
240
+ readonly INVALIDATED: "INVALIDATED";
241
+ }>;
242
+ createdAt: z.ZodOptional<z.ZodString>;
243
+ updatedAt: z.ZodOptional<z.ZodString>;
244
+ contentHash: z.ZodOptional<z.ZodString>;
245
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
246
+ createdBy: z.ZodOptional<z.ZodString>;
247
+ versionCounter: z.ZodOptional<z.ZodNumber>;
248
+ priorVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
249
+ shadowEvaluations: z.ZodOptional<z.ZodNumber>;
250
+ shadowWouldBlock: z.ZodOptional<z.ZodNumber>;
251
+ gitDriftStatus: z.ZodOptional<z.ZodString>;
252
+ gitDriftCheckedAt: z.ZodOptional<z.ZodString>;
253
+ sslCompileState: z.ZodOptional<z.ZodEnum<["compiled", "stale", "uncompiled"]>>;
254
+ } & {
255
+ riskTier: z.ZodNativeEnum<{
256
+ readonly LOW: "LOW";
257
+ readonly MEDIUM: "MEDIUM";
258
+ readonly HIGH: "HIGH";
259
+ readonly CRITICAL: "CRITICAL";
260
+ }>;
261
+ complexityTier: z.ZodNativeEnum<{
262
+ readonly TIER_0: "TIER_0";
263
+ readonly TIER_1: "TIER_1";
264
+ readonly TIER_2: "TIER_2";
265
+ }>;
266
+ }, "strip", z.ZodTypeAny, {
267
+ workspaceId: string;
268
+ title: string;
269
+ riskTier: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
270
+ markdownContent: string;
271
+ isActive: boolean;
272
+ sopId: string;
273
+ version: string;
274
+ complexityTier: "TIER_0" | "TIER_1" | "TIER_2";
275
+ lifecycleState: "DRAFT" | "PENDING_REVIEW" | "GENERATED" | "HYPOTHESIZED" | "REFINED" | "VALIDATED" | "INVALIDATED";
276
+ contentHash?: string | undefined;
277
+ shadowEvaluations?: number | undefined;
278
+ shadowWouldBlock?: number | undefined;
279
+ createdAt?: string | undefined;
280
+ updatedAt?: string | undefined;
281
+ dependencies?: string[] | undefined;
282
+ createdBy?: string | undefined;
283
+ versionCounter?: number | undefined;
284
+ priorVersionId?: string | null | undefined;
285
+ gitDriftStatus?: string | undefined;
286
+ gitDriftCheckedAt?: string | undefined;
287
+ sslCompileState?: "compiled" | "stale" | "uncompiled" | undefined;
288
+ }, {
289
+ workspaceId: string;
290
+ title: string;
291
+ riskTier: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
292
+ markdownContent: string;
293
+ isActive: boolean;
294
+ sopId: string;
295
+ version: string;
296
+ complexityTier: "TIER_0" | "TIER_1" | "TIER_2";
297
+ lifecycleState: "DRAFT" | "PENDING_REVIEW" | "GENERATED" | "HYPOTHESIZED" | "REFINED" | "VALIDATED" | "INVALIDATED";
298
+ contentHash?: string | undefined;
299
+ shadowEvaluations?: number | undefined;
300
+ shadowWouldBlock?: number | undefined;
301
+ createdAt?: string | undefined;
302
+ updatedAt?: string | undefined;
303
+ dependencies?: string[] | undefined;
304
+ createdBy?: string | undefined;
305
+ versionCounter?: number | undefined;
306
+ priorVersionId?: string | null | undefined;
307
+ gitDriftStatus?: string | undefined;
308
+ gitDriftCheckedAt?: string | undefined;
309
+ sslCompileState?: "compiled" | "stale" | "uncompiled" | undefined;
310
+ }>;
311
+ export type SopCreatedResponse = z.infer<typeof SopCreatedResponse>;
312
+ /** `GET /api/v1/sops`: one page of SOPs. */
313
+ export declare const SopListResponse: z.ZodObject<{
314
+ listProperty: z.ZodLiteral<"items">;
315
+ rowCase: z.ZodLiteral<"camel">;
316
+ } & {
317
+ items: z.ZodArray<z.ZodObject<{
318
+ sopId: z.ZodString;
319
+ workspaceId: z.ZodString;
320
+ title: z.ZodString;
321
+ version: z.ZodString;
322
+ markdownContent: z.ZodString;
323
+ /** Null for a SOP written without one (the `sop_registry` view applies no column default; the SOP health cron writes none). */
324
+ riskTier: z.ZodNullable<z.ZodNativeEnum<{
325
+ readonly LOW: "LOW";
326
+ readonly MEDIUM: "MEDIUM";
327
+ readonly HIGH: "HIGH";
328
+ readonly CRITICAL: "CRITICAL";
329
+ }>>;
330
+ complexityTier: z.ZodNullable<z.ZodNativeEnum<{
331
+ readonly TIER_0: "TIER_0";
332
+ readonly TIER_1: "TIER_1";
333
+ readonly TIER_2: "TIER_2";
334
+ }>>;
335
+ isActive: z.ZodBoolean;
336
+ lifecycleState: z.ZodNativeEnum<{
337
+ readonly DRAFT: "DRAFT";
338
+ readonly PENDING_REVIEW: "PENDING_REVIEW";
339
+ readonly GENERATED: "GENERATED";
340
+ readonly HYPOTHESIZED: "HYPOTHESIZED";
341
+ readonly REFINED: "REFINED";
342
+ readonly VALIDATED: "VALIDATED";
343
+ readonly INVALIDATED: "INVALIDATED";
344
+ }>;
345
+ createdAt: z.ZodOptional<z.ZodString>;
346
+ updatedAt: z.ZodOptional<z.ZodString>;
347
+ contentHash: z.ZodOptional<z.ZodString>;
348
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
349
+ createdBy: z.ZodOptional<z.ZodString>;
350
+ versionCounter: z.ZodOptional<z.ZodNumber>;
351
+ priorVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
352
+ shadowEvaluations: z.ZodOptional<z.ZodNumber>;
353
+ shadowWouldBlock: z.ZodOptional<z.ZodNumber>;
354
+ gitDriftStatus: z.ZodOptional<z.ZodString>;
355
+ gitDriftCheckedAt: z.ZodOptional<z.ZodString>;
356
+ sslCompileState: z.ZodOptional<z.ZodEnum<["compiled", "stale", "uncompiled"]>>;
357
+ }, "strip", z.ZodTypeAny, {
358
+ workspaceId: string;
359
+ title: string;
360
+ riskTier: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL" | null;
361
+ markdownContent: string;
362
+ isActive: boolean;
363
+ sopId: string;
364
+ version: string;
365
+ complexityTier: "TIER_0" | "TIER_1" | "TIER_2" | null;
366
+ lifecycleState: "DRAFT" | "PENDING_REVIEW" | "GENERATED" | "HYPOTHESIZED" | "REFINED" | "VALIDATED" | "INVALIDATED";
367
+ contentHash?: string | undefined;
368
+ shadowEvaluations?: number | undefined;
369
+ shadowWouldBlock?: number | undefined;
370
+ createdAt?: string | undefined;
371
+ updatedAt?: string | undefined;
372
+ dependencies?: string[] | undefined;
373
+ createdBy?: string | undefined;
374
+ versionCounter?: number | undefined;
375
+ priorVersionId?: string | null | undefined;
376
+ gitDriftStatus?: string | undefined;
377
+ gitDriftCheckedAt?: string | undefined;
378
+ sslCompileState?: "compiled" | "stale" | "uncompiled" | undefined;
379
+ }, {
380
+ workspaceId: string;
381
+ title: string;
382
+ riskTier: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL" | null;
383
+ markdownContent: string;
384
+ isActive: boolean;
385
+ sopId: string;
386
+ version: string;
387
+ complexityTier: "TIER_0" | "TIER_1" | "TIER_2" | null;
388
+ lifecycleState: "DRAFT" | "PENDING_REVIEW" | "GENERATED" | "HYPOTHESIZED" | "REFINED" | "VALIDATED" | "INVALIDATED";
389
+ contentHash?: string | undefined;
390
+ shadowEvaluations?: number | undefined;
391
+ shadowWouldBlock?: number | undefined;
392
+ createdAt?: string | undefined;
393
+ updatedAt?: string | undefined;
394
+ dependencies?: string[] | undefined;
395
+ createdBy?: string | undefined;
396
+ versionCounter?: number | undefined;
397
+ priorVersionId?: string | null | undefined;
398
+ gitDriftStatus?: string | undefined;
399
+ gitDriftCheckedAt?: string | undefined;
400
+ sslCompileState?: "compiled" | "stale" | "uncompiled" | undefined;
401
+ }>, "many">;
402
+ total: z.ZodNumber;
403
+ page: z.ZodNumber;
404
+ limit: z.ZodNumber;
405
+ }, "strip", z.ZodTypeAny, {
406
+ limit: number;
407
+ items: {
408
+ workspaceId: string;
409
+ title: string;
410
+ riskTier: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL" | null;
411
+ markdownContent: string;
412
+ isActive: boolean;
413
+ sopId: string;
414
+ version: string;
415
+ complexityTier: "TIER_0" | "TIER_1" | "TIER_2" | null;
416
+ lifecycleState: "DRAFT" | "PENDING_REVIEW" | "GENERATED" | "HYPOTHESIZED" | "REFINED" | "VALIDATED" | "INVALIDATED";
417
+ contentHash?: string | undefined;
418
+ shadowEvaluations?: number | undefined;
419
+ shadowWouldBlock?: number | undefined;
420
+ createdAt?: string | undefined;
421
+ updatedAt?: string | undefined;
422
+ dependencies?: string[] | undefined;
423
+ createdBy?: string | undefined;
424
+ versionCounter?: number | undefined;
425
+ priorVersionId?: string | null | undefined;
426
+ gitDriftStatus?: string | undefined;
427
+ gitDriftCheckedAt?: string | undefined;
428
+ sslCompileState?: "compiled" | "stale" | "uncompiled" | undefined;
429
+ }[];
430
+ listProperty: "items";
431
+ rowCase: "camel";
432
+ total: number;
433
+ page: number;
434
+ }, {
435
+ limit: number;
436
+ items: {
437
+ workspaceId: string;
438
+ title: string;
439
+ riskTier: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL" | null;
440
+ markdownContent: string;
441
+ isActive: boolean;
442
+ sopId: string;
443
+ version: string;
444
+ complexityTier: "TIER_0" | "TIER_1" | "TIER_2" | null;
445
+ lifecycleState: "DRAFT" | "PENDING_REVIEW" | "GENERATED" | "HYPOTHESIZED" | "REFINED" | "VALIDATED" | "INVALIDATED";
446
+ contentHash?: string | undefined;
447
+ shadowEvaluations?: number | undefined;
448
+ shadowWouldBlock?: number | undefined;
449
+ createdAt?: string | undefined;
450
+ updatedAt?: string | undefined;
451
+ dependencies?: string[] | undefined;
452
+ createdBy?: string | undefined;
453
+ versionCounter?: number | undefined;
454
+ priorVersionId?: string | null | undefined;
455
+ gitDriftStatus?: string | undefined;
456
+ gitDriftCheckedAt?: string | undefined;
457
+ sslCompileState?: "compiled" | "stale" | "uncompiled" | undefined;
458
+ }[];
459
+ listProperty: "items";
460
+ rowCase: "camel";
461
+ total: number;
462
+ page: number;
463
+ }>;
464
+ export type SopListResponse = z.infer<typeof SopListResponse>;
465
+ /** `PUT /api/v1/sops/:sopId`: the updated SOP (a new DRAFT version when the SOP was not a DRAFT), and the anti-gaming analysis when the content changed. */
466
+ export declare const SopUpdatedResponse: z.ZodObject<{
467
+ sop: z.ZodObject<{
468
+ sopId: z.ZodString;
469
+ workspaceId: z.ZodString;
470
+ title: z.ZodString;
471
+ version: z.ZodString;
472
+ markdownContent: z.ZodString;
473
+ /** Null for a SOP written without one (the `sop_registry` view applies no column default; the SOP health cron writes none). */
474
+ riskTier: z.ZodNullable<z.ZodNativeEnum<{
475
+ readonly LOW: "LOW";
476
+ readonly MEDIUM: "MEDIUM";
477
+ readonly HIGH: "HIGH";
478
+ readonly CRITICAL: "CRITICAL";
479
+ }>>;
480
+ complexityTier: z.ZodNullable<z.ZodNativeEnum<{
481
+ readonly TIER_0: "TIER_0";
482
+ readonly TIER_1: "TIER_1";
483
+ readonly TIER_2: "TIER_2";
484
+ }>>;
485
+ isActive: z.ZodBoolean;
486
+ lifecycleState: z.ZodNativeEnum<{
487
+ readonly DRAFT: "DRAFT";
488
+ readonly PENDING_REVIEW: "PENDING_REVIEW";
489
+ readonly GENERATED: "GENERATED";
490
+ readonly HYPOTHESIZED: "HYPOTHESIZED";
491
+ readonly REFINED: "REFINED";
492
+ readonly VALIDATED: "VALIDATED";
493
+ readonly INVALIDATED: "INVALIDATED";
494
+ }>;
495
+ createdAt: z.ZodOptional<z.ZodString>;
496
+ updatedAt: z.ZodOptional<z.ZodString>;
497
+ contentHash: z.ZodOptional<z.ZodString>;
498
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
499
+ createdBy: z.ZodOptional<z.ZodString>;
500
+ versionCounter: z.ZodOptional<z.ZodNumber>;
501
+ priorVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
502
+ shadowEvaluations: z.ZodOptional<z.ZodNumber>;
503
+ shadowWouldBlock: z.ZodOptional<z.ZodNumber>;
504
+ gitDriftStatus: z.ZodOptional<z.ZodString>;
505
+ gitDriftCheckedAt: z.ZodOptional<z.ZodString>;
506
+ sslCompileState: z.ZodOptional<z.ZodEnum<["compiled", "stale", "uncompiled"]>>;
507
+ }, "strip", z.ZodTypeAny, {
508
+ workspaceId: string;
509
+ title: string;
510
+ riskTier: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL" | null;
511
+ markdownContent: string;
512
+ isActive: boolean;
513
+ sopId: string;
514
+ version: string;
515
+ complexityTier: "TIER_0" | "TIER_1" | "TIER_2" | null;
516
+ lifecycleState: "DRAFT" | "PENDING_REVIEW" | "GENERATED" | "HYPOTHESIZED" | "REFINED" | "VALIDATED" | "INVALIDATED";
517
+ contentHash?: string | undefined;
518
+ shadowEvaluations?: number | undefined;
519
+ shadowWouldBlock?: number | undefined;
520
+ createdAt?: string | undefined;
521
+ updatedAt?: string | undefined;
522
+ dependencies?: string[] | undefined;
523
+ createdBy?: string | undefined;
524
+ versionCounter?: number | undefined;
525
+ priorVersionId?: string | null | undefined;
526
+ gitDriftStatus?: string | undefined;
527
+ gitDriftCheckedAt?: string | undefined;
528
+ sslCompileState?: "compiled" | "stale" | "uncompiled" | undefined;
529
+ }, {
530
+ workspaceId: string;
531
+ title: string;
532
+ riskTier: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL" | null;
533
+ markdownContent: string;
534
+ isActive: boolean;
535
+ sopId: string;
536
+ version: string;
537
+ complexityTier: "TIER_0" | "TIER_1" | "TIER_2" | null;
538
+ lifecycleState: "DRAFT" | "PENDING_REVIEW" | "GENERATED" | "HYPOTHESIZED" | "REFINED" | "VALIDATED" | "INVALIDATED";
539
+ contentHash?: string | undefined;
540
+ shadowEvaluations?: number | undefined;
541
+ shadowWouldBlock?: number | undefined;
542
+ createdAt?: string | undefined;
543
+ updatedAt?: string | undefined;
544
+ dependencies?: string[] | undefined;
545
+ createdBy?: string | undefined;
546
+ versionCounter?: number | undefined;
547
+ priorVersionId?: string | null | undefined;
548
+ gitDriftStatus?: string | undefined;
549
+ gitDriftCheckedAt?: string | undefined;
550
+ sslCompileState?: "compiled" | "stale" | "uncompiled" | undefined;
551
+ }>;
552
+ antiGaming: z.ZodOptional<z.ZodObject<{
553
+ changeClassification: z.ZodNativeEnum<{
554
+ readonly STRENGTHEN: "STRENGTHEN";
555
+ readonly CLARIFY: "CLARIFY";
556
+ readonly NARROW: "NARROW";
557
+ readonly WEAKEN: "WEAKEN";
558
+ }>;
559
+ requiresElevatedApproval: z.ZodBoolean;
560
+ impactSummary: z.ZodString;
561
+ }, "strip", z.ZodTypeAny, {
562
+ changeClassification: "STRENGTHEN" | "CLARIFY" | "NARROW" | "WEAKEN";
563
+ requiresElevatedApproval: boolean;
564
+ impactSummary: string;
565
+ }, {
566
+ changeClassification: "STRENGTHEN" | "CLARIFY" | "NARROW" | "WEAKEN";
567
+ requiresElevatedApproval: boolean;
568
+ impactSummary: string;
569
+ }>>;
570
+ }, "strip", z.ZodTypeAny, {
571
+ sop: {
572
+ workspaceId: string;
573
+ title: string;
574
+ riskTier: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL" | null;
575
+ markdownContent: string;
576
+ isActive: boolean;
577
+ sopId: string;
578
+ version: string;
579
+ complexityTier: "TIER_0" | "TIER_1" | "TIER_2" | null;
580
+ lifecycleState: "DRAFT" | "PENDING_REVIEW" | "GENERATED" | "HYPOTHESIZED" | "REFINED" | "VALIDATED" | "INVALIDATED";
581
+ contentHash?: string | undefined;
582
+ shadowEvaluations?: number | undefined;
583
+ shadowWouldBlock?: number | undefined;
584
+ createdAt?: string | undefined;
585
+ updatedAt?: string | undefined;
586
+ dependencies?: string[] | undefined;
587
+ createdBy?: string | undefined;
588
+ versionCounter?: number | undefined;
589
+ priorVersionId?: string | null | undefined;
590
+ gitDriftStatus?: string | undefined;
591
+ gitDriftCheckedAt?: string | undefined;
592
+ sslCompileState?: "compiled" | "stale" | "uncompiled" | undefined;
593
+ };
594
+ antiGaming?: {
595
+ changeClassification: "STRENGTHEN" | "CLARIFY" | "NARROW" | "WEAKEN";
596
+ requiresElevatedApproval: boolean;
597
+ impactSummary: string;
598
+ } | undefined;
599
+ }, {
600
+ sop: {
601
+ workspaceId: string;
602
+ title: string;
603
+ riskTier: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL" | null;
604
+ markdownContent: string;
605
+ isActive: boolean;
606
+ sopId: string;
607
+ version: string;
608
+ complexityTier: "TIER_0" | "TIER_1" | "TIER_2" | null;
609
+ lifecycleState: "DRAFT" | "PENDING_REVIEW" | "GENERATED" | "HYPOTHESIZED" | "REFINED" | "VALIDATED" | "INVALIDATED";
610
+ contentHash?: string | undefined;
611
+ shadowEvaluations?: number | undefined;
612
+ shadowWouldBlock?: number | undefined;
613
+ createdAt?: string | undefined;
614
+ updatedAt?: string | undefined;
615
+ dependencies?: string[] | undefined;
616
+ createdBy?: string | undefined;
617
+ versionCounter?: number | undefined;
618
+ priorVersionId?: string | null | undefined;
619
+ gitDriftStatus?: string | undefined;
620
+ gitDriftCheckedAt?: string | undefined;
621
+ sslCompileState?: "compiled" | "stale" | "uncompiled" | undefined;
622
+ };
623
+ antiGaming?: {
624
+ changeClassification: "STRENGTHEN" | "CLARIFY" | "NARROW" | "WEAKEN";
625
+ requiresElevatedApproval: boolean;
626
+ impactSummary: string;
627
+ } | undefined;
628
+ }>;
629
+ export type SopUpdatedResponse = z.infer<typeof SopUpdatedResponse>;
630
+ /** `DELETE /api/v1/sops/:sopId`: soft-deleted. */
631
+ export declare const SopDeletedResponse: z.ZodObject<{
632
+ deleted: z.ZodLiteral<true>;
633
+ }, "strip", z.ZodTypeAny, {
634
+ deleted: true;
635
+ }, {
636
+ deleted: true;
637
+ }>;
638
+ export type SopDeletedResponse = z.infer<typeof SopDeletedResponse>;
639
+ /** `POST /api/v1/sops/git-drift-report`. */
640
+ export declare const SopGitDriftReportResponse: z.ZodObject<{
641
+ ok: z.ZodLiteral<true>;
642
+ recorded: z.ZodNumber;
643
+ }, "strip", z.ZodTypeAny, {
644
+ ok: true;
645
+ recorded: number;
646
+ }, {
647
+ ok: true;
648
+ recorded: number;
649
+ }>;
650
+ export type SopGitDriftReportResponse = z.infer<typeof SopGitDriftReportResponse>;
651
+ /** A rule the MCP proxy and the hook gate enforce: from a SOP title, or projected from a hook-rule guardrail (`origin: 'guardrail'`). */
652
+ export declare const SopRuleResponse: z.ZodObject<{
653
+ id: z.ZodString;
654
+ toolPattern: z.ZodString;
655
+ argPattern: z.ZodOptional<z.ZodString>;
656
+ action: z.ZodEnum<["block", "warn", "require_approval"]>;
657
+ reason: z.ZodString;
658
+ origin: z.ZodOptional<z.ZodLiteral<"guardrail">>;
659
+ roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
660
+ }, "strip", z.ZodTypeAny, {
661
+ action: "block" | "warn" | "require_approval";
662
+ reason: string;
663
+ id: string;
664
+ toolPattern: string;
665
+ roles?: string[] | undefined;
666
+ argPattern?: string | undefined;
667
+ origin?: "guardrail" | undefined;
668
+ }, {
669
+ action: "block" | "warn" | "require_approval";
670
+ reason: string;
671
+ id: string;
672
+ toolPattern: string;
673
+ roles?: string[] | undefined;
674
+ argPattern?: string | undefined;
675
+ origin?: "guardrail" | undefined;
676
+ }>;
677
+ export type SopRuleResponse = z.infer<typeof SopRuleResponse>;
678
+ /** `GET /api/v1/sop/rules`: the rule set and MCP curation the MCP proxy polls. */
679
+ export declare const SopRulesResponse: z.ZodObject<{
680
+ listProperty: z.ZodLiteral<"rules">;
681
+ rowCase: z.ZodLiteral<"camel">;
682
+ } & {
683
+ ok: z.ZodLiteral<true>;
684
+ rules: z.ZodArray<z.ZodObject<{
685
+ id: z.ZodString;
686
+ toolPattern: z.ZodString;
687
+ argPattern: z.ZodOptional<z.ZodString>;
688
+ action: z.ZodEnum<["block", "warn", "require_approval"]>;
689
+ reason: z.ZodString;
690
+ origin: z.ZodOptional<z.ZodLiteral<"guardrail">>;
691
+ roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
692
+ }, "strip", z.ZodTypeAny, {
693
+ action: "block" | "warn" | "require_approval";
694
+ reason: string;
695
+ id: string;
696
+ toolPattern: string;
697
+ roles?: string[] | undefined;
698
+ argPattern?: string | undefined;
699
+ origin?: "guardrail" | undefined;
700
+ }, {
701
+ action: "block" | "warn" | "require_approval";
702
+ reason: string;
703
+ id: string;
704
+ toolPattern: string;
705
+ roles?: string[] | undefined;
706
+ argPattern?: string | undefined;
707
+ origin?: "guardrail" | undefined;
708
+ }>, "many">;
709
+ } & {
710
+ allowedTools: z.ZodArray<z.ZodString, "many">;
711
+ toolDescriptionOverrides: z.ZodRecord<z.ZodString, z.ZodString>;
712
+ allowedServers: z.ZodArray<z.ZodString, "many">;
713
+ mcpInjectionPatterns: z.ZodArray<z.ZodString, "many">;
714
+ mcpRegistry: z.ZodObject<{
715
+ defaultPolicy: z.ZodEnum<["allow", "deny"]>;
716
+ approvedServers: z.ZodArray<z.ZodString, "many">;
717
+ blockedServers: z.ZodArray<z.ZodString, "many">;
718
+ heldServers: z.ZodArray<z.ZodString, "many">;
719
+ disabledTools: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
720
+ }, "strip", z.ZodTypeAny, {
721
+ disabledTools: Record<string, string[]>;
722
+ defaultPolicy: "deny" | "allow";
723
+ approvedServers: string[];
724
+ blockedServers: string[];
725
+ heldServers: string[];
726
+ }, {
727
+ disabledTools: Record<string, string[]>;
728
+ defaultPolicy: "deny" | "allow";
729
+ approvedServers: string[];
730
+ blockedServers: string[];
731
+ heldServers: string[];
732
+ }>;
733
+ mcpBudgets: z.ZodObject<{
734
+ budgets: z.ZodArray<z.ZodObject<{
735
+ id: z.ZodString;
736
+ scope: z.ZodEnum<["server", "tool", "member", "member_server"]>;
737
+ server: z.ZodOptional<z.ZodString>;
738
+ tool: z.ZodOptional<z.ZodString>;
739
+ memberId: z.ZodOptional<z.ZodString>;
740
+ period: z.ZodEnum<["hour", "day"]>;
741
+ limit: z.ZodNumber;
742
+ }, "strip", z.ZodTypeAny, {
743
+ period: "day" | "hour";
744
+ id: string;
745
+ limit: number;
746
+ scope: "member" | "tool" | "server" | "member_server";
747
+ tool?: string | undefined;
748
+ server?: string | undefined;
749
+ memberId?: string | undefined;
750
+ }, {
751
+ period: "day" | "hour";
752
+ id: string;
753
+ limit: number;
754
+ scope: "member" | "tool" | "server" | "member_server";
755
+ tool?: string | undefined;
756
+ server?: string | undefined;
757
+ memberId?: string | undefined;
758
+ }>, "many">;
759
+ warnAtPct: z.ZodNumber;
760
+ }, "strip", z.ZodTypeAny, {
761
+ budgets: {
762
+ period: "day" | "hour";
763
+ id: string;
764
+ limit: number;
765
+ scope: "member" | "tool" | "server" | "member_server";
766
+ tool?: string | undefined;
767
+ server?: string | undefined;
768
+ memberId?: string | undefined;
769
+ }[];
770
+ warnAtPct: number;
771
+ }, {
772
+ budgets: {
773
+ period: "day" | "hour";
774
+ id: string;
775
+ limit: number;
776
+ scope: "member" | "tool" | "server" | "member_server";
777
+ tool?: string | undefined;
778
+ server?: string | undefined;
779
+ memberId?: string | undefined;
780
+ }[];
781
+ warnAtPct: number;
782
+ }>;
783
+ piiDetectors: z.ZodNullable<z.ZodRecord<z.ZodEnum<["pii.card", "pii.iban", "pii.ssn", "pii.email", "pii.phone"]>, z.ZodEnum<["off", "redact", "block"]>>>;
784
+ wasmRules: z.ZodArray<z.ZodObject<{
785
+ ruleId: z.ZodString;
786
+ name: z.ZodString;
787
+ sha256: z.ZodString;
788
+ priority: z.ZodNumber;
789
+ mode: z.ZodEnum<["ENFORCE", "SHADOW"]>;
790
+ }, "strip", z.ZodTypeAny, {
791
+ name: string;
792
+ mode: "SHADOW" | "ENFORCE";
793
+ ruleId: string;
794
+ sha256: string;
795
+ priority: number;
796
+ }, {
797
+ name: string;
798
+ mode: "SHADOW" | "ENFORCE";
799
+ ruleId: string;
800
+ sha256: string;
801
+ priority: number;
802
+ }>, "many">;
803
+ ssoGroupPolicy: z.ZodNullable<z.ZodObject<{
804
+ highRiskTools: z.ZodArray<z.ZodString, "many">;
805
+ requiredGroups: z.ZodArray<z.ZodString, "many">;
806
+ requireOboFor: z.ZodArray<z.ZodString, "many">;
807
+ }, "strip", z.ZodTypeAny, {
808
+ highRiskTools: string[];
809
+ requiredGroups: string[];
810
+ requireOboFor: string[];
811
+ }, {
812
+ highRiskTools: string[];
813
+ requiredGroups: string[];
814
+ requireOboFor: string[];
815
+ }>>;
816
+ principal: z.ZodNullable<z.ZodObject<{
817
+ memberId: z.ZodString;
818
+ email: z.ZodString;
819
+ role: z.ZodString;
820
+ ssoGroups: z.ZodArray<z.ZodString, "many">;
821
+ }, "strip", z.ZodTypeAny, {
822
+ email: string;
823
+ role: string;
824
+ memberId: string;
825
+ ssoGroups: string[];
826
+ }, {
827
+ email: string;
828
+ role: string;
829
+ memberId: string;
830
+ ssoGroups: string[];
831
+ }>>;
832
+ mcpProxyFailBehavior: z.ZodOptional<z.ZodEnum<["open", "closed"]>>;
833
+ mcpInjectionAction: z.ZodOptional<z.ZodEnum<["warn", "block"]>>;
834
+ mcpAnomalyMode: z.ZodOptional<z.ZodEnum<["enforce", "warn", "off"]>>;
835
+ mcpAnomalyOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["steer", "reask", "kill", "off"]>>>;
836
+ } & {
837
+ interventionMode: z.ZodEnum<["TRANSPARENT", "OPAQUE", "SILENT_LOG"]>;
838
+ }, "strip", z.ZodTypeAny, {
839
+ ok: true;
840
+ piiDetectors: Partial<Record<"pii.card" | "pii.iban" | "pii.ssn" | "pii.email" | "pii.phone", "redact" | "off" | "block">> | null;
841
+ mcpInjectionPatterns: string[];
842
+ mcpBudgets: {
843
+ budgets: {
844
+ period: "day" | "hour";
845
+ id: string;
846
+ limit: number;
847
+ scope: "member" | "tool" | "server" | "member_server";
848
+ tool?: string | undefined;
849
+ server?: string | undefined;
850
+ memberId?: string | undefined;
851
+ }[];
852
+ warnAtPct: number;
853
+ };
854
+ interventionMode: "TRANSPARENT" | "OPAQUE" | "SILENT_LOG";
855
+ rules: {
856
+ action: "block" | "warn" | "require_approval";
857
+ reason: string;
858
+ id: string;
859
+ toolPattern: string;
860
+ roles?: string[] | undefined;
861
+ argPattern?: string | undefined;
862
+ origin?: "guardrail" | undefined;
863
+ }[];
864
+ listProperty: "rules";
865
+ rowCase: "camel";
866
+ allowedTools: string[];
867
+ toolDescriptionOverrides: Record<string, string>;
868
+ allowedServers: string[];
869
+ mcpRegistry: {
870
+ disabledTools: Record<string, string[]>;
871
+ defaultPolicy: "deny" | "allow";
872
+ approvedServers: string[];
873
+ blockedServers: string[];
874
+ heldServers: string[];
875
+ };
876
+ wasmRules: {
877
+ name: string;
878
+ mode: "SHADOW" | "ENFORCE";
879
+ ruleId: string;
880
+ sha256: string;
881
+ priority: number;
882
+ }[];
883
+ ssoGroupPolicy: {
884
+ highRiskTools: string[];
885
+ requiredGroups: string[];
886
+ requireOboFor: string[];
887
+ } | null;
888
+ principal: {
889
+ email: string;
890
+ role: string;
891
+ memberId: string;
892
+ ssoGroups: string[];
893
+ } | null;
894
+ mcpProxyFailBehavior?: "open" | "closed" | undefined;
895
+ mcpInjectionAction?: "block" | "warn" | undefined;
896
+ mcpAnomalyMode?: "enforce" | "off" | "warn" | undefined;
897
+ mcpAnomalyOverrides?: Record<string, "off" | "steer" | "reask" | "kill"> | undefined;
898
+ }, {
899
+ ok: true;
900
+ piiDetectors: Partial<Record<"pii.card" | "pii.iban" | "pii.ssn" | "pii.email" | "pii.phone", "redact" | "off" | "block">> | null;
901
+ mcpInjectionPatterns: string[];
902
+ mcpBudgets: {
903
+ budgets: {
904
+ period: "day" | "hour";
905
+ id: string;
906
+ limit: number;
907
+ scope: "member" | "tool" | "server" | "member_server";
908
+ tool?: string | undefined;
909
+ server?: string | undefined;
910
+ memberId?: string | undefined;
911
+ }[];
912
+ warnAtPct: number;
913
+ };
914
+ interventionMode: "TRANSPARENT" | "OPAQUE" | "SILENT_LOG";
915
+ rules: {
916
+ action: "block" | "warn" | "require_approval";
917
+ reason: string;
918
+ id: string;
919
+ toolPattern: string;
920
+ roles?: string[] | undefined;
921
+ argPattern?: string | undefined;
922
+ origin?: "guardrail" | undefined;
923
+ }[];
924
+ listProperty: "rules";
925
+ rowCase: "camel";
926
+ allowedTools: string[];
927
+ toolDescriptionOverrides: Record<string, string>;
928
+ allowedServers: string[];
929
+ mcpRegistry: {
930
+ disabledTools: Record<string, string[]>;
931
+ defaultPolicy: "deny" | "allow";
932
+ approvedServers: string[];
933
+ blockedServers: string[];
934
+ heldServers: string[];
935
+ };
936
+ wasmRules: {
937
+ name: string;
938
+ mode: "SHADOW" | "ENFORCE";
939
+ ruleId: string;
940
+ sha256: string;
941
+ priority: number;
942
+ }[];
943
+ ssoGroupPolicy: {
944
+ highRiskTools: string[];
945
+ requiredGroups: string[];
946
+ requireOboFor: string[];
947
+ } | null;
948
+ principal: {
949
+ email: string;
950
+ role: string;
951
+ memberId: string;
952
+ ssoGroups: string[];
953
+ } | null;
954
+ mcpProxyFailBehavior?: "open" | "closed" | undefined;
955
+ mcpInjectionAction?: "block" | "warn" | undefined;
956
+ mcpAnomalyMode?: "enforce" | "off" | "warn" | undefined;
957
+ mcpAnomalyOverrides?: Record<string, "off" | "steer" | "reask" | "kill"> | undefined;
958
+ }>;
959
+ export type SopRulesResponse = z.infer<typeof SopRulesResponse>;
960
+ /**
961
+ * `GET /api/v1/policy/resolve`: the same rules and curation as
962
+ * `GET /api/v1/sop/rules`, as the sync daemon and the daemon-mode MCP proxy
963
+ * cache them, plus the flags the daemon's policy snapshot carries.
964
+ */
965
+ export declare const PolicyResolveResponse: z.ZodObject<{
966
+ allowedTools: z.ZodArray<z.ZodString, "many">;
967
+ toolDescriptionOverrides: z.ZodRecord<z.ZodString, z.ZodString>;
968
+ allowedServers: z.ZodArray<z.ZodString, "many">;
969
+ mcpInjectionPatterns: z.ZodArray<z.ZodString, "many">;
970
+ mcpRegistry: z.ZodObject<{
971
+ defaultPolicy: z.ZodEnum<["allow", "deny"]>;
972
+ approvedServers: z.ZodArray<z.ZodString, "many">;
973
+ blockedServers: z.ZodArray<z.ZodString, "many">;
974
+ heldServers: z.ZodArray<z.ZodString, "many">;
975
+ disabledTools: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
976
+ }, "strip", z.ZodTypeAny, {
977
+ disabledTools: Record<string, string[]>;
978
+ defaultPolicy: "deny" | "allow";
979
+ approvedServers: string[];
980
+ blockedServers: string[];
981
+ heldServers: string[];
982
+ }, {
983
+ disabledTools: Record<string, string[]>;
984
+ defaultPolicy: "deny" | "allow";
985
+ approvedServers: string[];
986
+ blockedServers: string[];
987
+ heldServers: string[];
988
+ }>;
989
+ mcpBudgets: z.ZodObject<{
990
+ budgets: z.ZodArray<z.ZodObject<{
991
+ id: z.ZodString;
992
+ scope: z.ZodEnum<["server", "tool", "member", "member_server"]>;
993
+ server: z.ZodOptional<z.ZodString>;
994
+ tool: z.ZodOptional<z.ZodString>;
995
+ memberId: z.ZodOptional<z.ZodString>;
996
+ period: z.ZodEnum<["hour", "day"]>;
997
+ limit: z.ZodNumber;
998
+ }, "strip", z.ZodTypeAny, {
999
+ period: "day" | "hour";
1000
+ id: string;
1001
+ limit: number;
1002
+ scope: "member" | "tool" | "server" | "member_server";
1003
+ tool?: string | undefined;
1004
+ server?: string | undefined;
1005
+ memberId?: string | undefined;
1006
+ }, {
1007
+ period: "day" | "hour";
1008
+ id: string;
1009
+ limit: number;
1010
+ scope: "member" | "tool" | "server" | "member_server";
1011
+ tool?: string | undefined;
1012
+ server?: string | undefined;
1013
+ memberId?: string | undefined;
1014
+ }>, "many">;
1015
+ warnAtPct: z.ZodNumber;
1016
+ }, "strip", z.ZodTypeAny, {
1017
+ budgets: {
1018
+ period: "day" | "hour";
1019
+ id: string;
1020
+ limit: number;
1021
+ scope: "member" | "tool" | "server" | "member_server";
1022
+ tool?: string | undefined;
1023
+ server?: string | undefined;
1024
+ memberId?: string | undefined;
1025
+ }[];
1026
+ warnAtPct: number;
1027
+ }, {
1028
+ budgets: {
1029
+ period: "day" | "hour";
1030
+ id: string;
1031
+ limit: number;
1032
+ scope: "member" | "tool" | "server" | "member_server";
1033
+ tool?: string | undefined;
1034
+ server?: string | undefined;
1035
+ memberId?: string | undefined;
1036
+ }[];
1037
+ warnAtPct: number;
1038
+ }>;
1039
+ piiDetectors: z.ZodNullable<z.ZodRecord<z.ZodEnum<["pii.card", "pii.iban", "pii.ssn", "pii.email", "pii.phone"]>, z.ZodEnum<["off", "redact", "block"]>>>;
1040
+ wasmRules: z.ZodArray<z.ZodObject<{
1041
+ ruleId: z.ZodString;
1042
+ name: z.ZodString;
1043
+ sha256: z.ZodString;
1044
+ priority: z.ZodNumber;
1045
+ mode: z.ZodEnum<["ENFORCE", "SHADOW"]>;
1046
+ }, "strip", z.ZodTypeAny, {
1047
+ name: string;
1048
+ mode: "SHADOW" | "ENFORCE";
1049
+ ruleId: string;
1050
+ sha256: string;
1051
+ priority: number;
1052
+ }, {
1053
+ name: string;
1054
+ mode: "SHADOW" | "ENFORCE";
1055
+ ruleId: string;
1056
+ sha256: string;
1057
+ priority: number;
1058
+ }>, "many">;
1059
+ ssoGroupPolicy: z.ZodNullable<z.ZodObject<{
1060
+ highRiskTools: z.ZodArray<z.ZodString, "many">;
1061
+ requiredGroups: z.ZodArray<z.ZodString, "many">;
1062
+ requireOboFor: z.ZodArray<z.ZodString, "many">;
1063
+ }, "strip", z.ZodTypeAny, {
1064
+ highRiskTools: string[];
1065
+ requiredGroups: string[];
1066
+ requireOboFor: string[];
1067
+ }, {
1068
+ highRiskTools: string[];
1069
+ requiredGroups: string[];
1070
+ requireOboFor: string[];
1071
+ }>>;
1072
+ principal: z.ZodNullable<z.ZodObject<{
1073
+ memberId: z.ZodString;
1074
+ email: z.ZodString;
1075
+ role: z.ZodString;
1076
+ ssoGroups: z.ZodArray<z.ZodString, "many">;
1077
+ }, "strip", z.ZodTypeAny, {
1078
+ email: string;
1079
+ role: string;
1080
+ memberId: string;
1081
+ ssoGroups: string[];
1082
+ }, {
1083
+ email: string;
1084
+ role: string;
1085
+ memberId: string;
1086
+ ssoGroups: string[];
1087
+ }>>;
1088
+ mcpProxyFailBehavior: z.ZodOptional<z.ZodEnum<["open", "closed"]>>;
1089
+ mcpInjectionAction: z.ZodOptional<z.ZodEnum<["warn", "block"]>>;
1090
+ mcpAnomalyMode: z.ZodOptional<z.ZodEnum<["enforce", "warn", "off"]>>;
1091
+ mcpAnomalyOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["steer", "reask", "kill", "off"]>>>;
1092
+ } & {
1093
+ workspaceId: z.ZodString;
1094
+ sopRules: z.ZodArray<z.ZodObject<{
1095
+ id: z.ZodString;
1096
+ toolPattern: z.ZodString;
1097
+ argPattern: z.ZodOptional<z.ZodString>;
1098
+ action: z.ZodEnum<["block", "warn", "require_approval"]>;
1099
+ reason: z.ZodString;
1100
+ origin: z.ZodOptional<z.ZodLiteral<"guardrail">>;
1101
+ roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1102
+ }, "strip", z.ZodTypeAny, {
1103
+ action: "block" | "warn" | "require_approval";
1104
+ reason: string;
1105
+ id: string;
1106
+ toolPattern: string;
1107
+ roles?: string[] | undefined;
1108
+ argPattern?: string | undefined;
1109
+ origin?: "guardrail" | undefined;
1110
+ }, {
1111
+ action: "block" | "warn" | "require_approval";
1112
+ reason: string;
1113
+ id: string;
1114
+ toolPattern: string;
1115
+ roles?: string[] | undefined;
1116
+ argPattern?: string | undefined;
1117
+ origin?: "guardrail" | undefined;
1118
+ }>, "many">;
1119
+ interventionMode: z.ZodEnum<["TRANSPARENT", "OPAQUE", "SILENT_LOG"]>;
1120
+ sqlDropStrictBlock: z.ZodBoolean;
1121
+ }, "strip", z.ZodTypeAny, {
1122
+ workspaceId: string;
1123
+ piiDetectors: Partial<Record<"pii.card" | "pii.iban" | "pii.ssn" | "pii.email" | "pii.phone", "redact" | "off" | "block">> | null;
1124
+ mcpInjectionPatterns: string[];
1125
+ mcpBudgets: {
1126
+ budgets: {
1127
+ period: "day" | "hour";
1128
+ id: string;
1129
+ limit: number;
1130
+ scope: "member" | "tool" | "server" | "member_server";
1131
+ tool?: string | undefined;
1132
+ server?: string | undefined;
1133
+ memberId?: string | undefined;
1134
+ }[];
1135
+ warnAtPct: number;
1136
+ };
1137
+ interventionMode: "TRANSPARENT" | "OPAQUE" | "SILENT_LOG";
1138
+ allowedTools: string[];
1139
+ toolDescriptionOverrides: Record<string, string>;
1140
+ allowedServers: string[];
1141
+ mcpRegistry: {
1142
+ disabledTools: Record<string, string[]>;
1143
+ defaultPolicy: "deny" | "allow";
1144
+ approvedServers: string[];
1145
+ blockedServers: string[];
1146
+ heldServers: string[];
1147
+ };
1148
+ wasmRules: {
1149
+ name: string;
1150
+ mode: "SHADOW" | "ENFORCE";
1151
+ ruleId: string;
1152
+ sha256: string;
1153
+ priority: number;
1154
+ }[];
1155
+ ssoGroupPolicy: {
1156
+ highRiskTools: string[];
1157
+ requiredGroups: string[];
1158
+ requireOboFor: string[];
1159
+ } | null;
1160
+ principal: {
1161
+ email: string;
1162
+ role: string;
1163
+ memberId: string;
1164
+ ssoGroups: string[];
1165
+ } | null;
1166
+ sopRules: {
1167
+ action: "block" | "warn" | "require_approval";
1168
+ reason: string;
1169
+ id: string;
1170
+ toolPattern: string;
1171
+ roles?: string[] | undefined;
1172
+ argPattern?: string | undefined;
1173
+ origin?: "guardrail" | undefined;
1174
+ }[];
1175
+ sqlDropStrictBlock: boolean;
1176
+ mcpProxyFailBehavior?: "open" | "closed" | undefined;
1177
+ mcpInjectionAction?: "block" | "warn" | undefined;
1178
+ mcpAnomalyMode?: "enforce" | "off" | "warn" | undefined;
1179
+ mcpAnomalyOverrides?: Record<string, "off" | "steer" | "reask" | "kill"> | undefined;
1180
+ }, {
1181
+ workspaceId: string;
1182
+ piiDetectors: Partial<Record<"pii.card" | "pii.iban" | "pii.ssn" | "pii.email" | "pii.phone", "redact" | "off" | "block">> | null;
1183
+ mcpInjectionPatterns: string[];
1184
+ mcpBudgets: {
1185
+ budgets: {
1186
+ period: "day" | "hour";
1187
+ id: string;
1188
+ limit: number;
1189
+ scope: "member" | "tool" | "server" | "member_server";
1190
+ tool?: string | undefined;
1191
+ server?: string | undefined;
1192
+ memberId?: string | undefined;
1193
+ }[];
1194
+ warnAtPct: number;
1195
+ };
1196
+ interventionMode: "TRANSPARENT" | "OPAQUE" | "SILENT_LOG";
1197
+ allowedTools: string[];
1198
+ toolDescriptionOverrides: Record<string, string>;
1199
+ allowedServers: string[];
1200
+ mcpRegistry: {
1201
+ disabledTools: Record<string, string[]>;
1202
+ defaultPolicy: "deny" | "allow";
1203
+ approvedServers: string[];
1204
+ blockedServers: string[];
1205
+ heldServers: string[];
1206
+ };
1207
+ wasmRules: {
1208
+ name: string;
1209
+ mode: "SHADOW" | "ENFORCE";
1210
+ ruleId: string;
1211
+ sha256: string;
1212
+ priority: number;
1213
+ }[];
1214
+ ssoGroupPolicy: {
1215
+ highRiskTools: string[];
1216
+ requiredGroups: string[];
1217
+ requireOboFor: string[];
1218
+ } | null;
1219
+ principal: {
1220
+ email: string;
1221
+ role: string;
1222
+ memberId: string;
1223
+ ssoGroups: string[];
1224
+ } | null;
1225
+ sopRules: {
1226
+ action: "block" | "warn" | "require_approval";
1227
+ reason: string;
1228
+ id: string;
1229
+ toolPattern: string;
1230
+ roles?: string[] | undefined;
1231
+ argPattern?: string | undefined;
1232
+ origin?: "guardrail" | undefined;
1233
+ }[];
1234
+ sqlDropStrictBlock: boolean;
1235
+ mcpProxyFailBehavior?: "open" | "closed" | undefined;
1236
+ mcpInjectionAction?: "block" | "warn" | undefined;
1237
+ mcpAnomalyMode?: "enforce" | "off" | "warn" | undefined;
1238
+ mcpAnomalyOverrides?: Record<string, "off" | "steer" | "reask" | "kill"> | undefined;
1239
+ }>;
1240
+ export type PolicyResolveResponse = z.infer<typeof PolicyResolveResponse>;
1241
+ /** `POST /api/v1/decisions`: how many holds became queue entries. */
1242
+ export declare const DecisionIngestResponse: z.ZodObject<{
1243
+ accepted: z.ZodNumber;
1244
+ dropped: z.ZodNumber;
1245
+ entryIds: z.ZodArray<z.ZodString, "many">;
1246
+ }, "strip", z.ZodTypeAny, {
1247
+ dropped: number;
1248
+ accepted: number;
1249
+ entryIds: string[];
1250
+ }, {
1251
+ dropped: number;
1252
+ accepted: number;
1253
+ entryIds: string[];
1254
+ }>;
1255
+ export type DecisionIngestResponse = z.infer<typeof DecisionIngestResponse>;
1256
+ /** One approved bypass as `maybeWriteReviewHoldBypass` writes it to Valkey. */
1257
+ export declare const ApprovedBypassResponse: z.ZodObject<{
1258
+ workspaceId: z.ZodString;
1259
+ sopRuleId: z.ZodString;
1260
+ toolNameNormalized: z.ZodString;
1261
+ targetHash: z.ZodString;
1262
+ holdId: z.ZodString;
1263
+ decidedBy: z.ZodString;
1264
+ decidedAt: z.ZodString;
1265
+ expiresAt: z.ZodString;
1266
+ }, "strip", z.ZodTypeAny, {
1267
+ workspaceId: string;
1268
+ expiresAt: string;
1269
+ sopRuleId: string;
1270
+ toolNameNormalized: string;
1271
+ targetHash: string;
1272
+ holdId: string;
1273
+ decidedBy: string;
1274
+ decidedAt: string;
1275
+ }, {
1276
+ workspaceId: string;
1277
+ expiresAt: string;
1278
+ sopRuleId: string;
1279
+ toolNameNormalized: string;
1280
+ targetHash: string;
1281
+ holdId: string;
1282
+ decidedBy: string;
1283
+ decidedAt: string;
1284
+ }>;
1285
+ export type ApprovedBypassResponse = z.infer<typeof ApprovedBypassResponse>;
1286
+ /** `GET /api/v1/decisions/approved-bypasses`. */
1287
+ export declare const ApprovedBypassListResponse: z.ZodObject<{
1288
+ ok: z.ZodLiteral<true>;
1289
+ bypasses: z.ZodArray<z.ZodObject<{
1290
+ workspaceId: z.ZodString;
1291
+ sopRuleId: z.ZodString;
1292
+ toolNameNormalized: z.ZodString;
1293
+ targetHash: z.ZodString;
1294
+ holdId: z.ZodString;
1295
+ decidedBy: z.ZodString;
1296
+ decidedAt: z.ZodString;
1297
+ expiresAt: z.ZodString;
1298
+ }, "strip", z.ZodTypeAny, {
1299
+ workspaceId: string;
1300
+ expiresAt: string;
1301
+ sopRuleId: string;
1302
+ toolNameNormalized: string;
1303
+ targetHash: string;
1304
+ holdId: string;
1305
+ decidedBy: string;
1306
+ decidedAt: string;
1307
+ }, {
1308
+ workspaceId: string;
1309
+ expiresAt: string;
1310
+ sopRuleId: string;
1311
+ toolNameNormalized: string;
1312
+ targetHash: string;
1313
+ holdId: string;
1314
+ decidedBy: string;
1315
+ decidedAt: string;
1316
+ }>, "many">;
1317
+ }, "strip", z.ZodTypeAny, {
1318
+ ok: true;
1319
+ bypasses: {
1320
+ workspaceId: string;
1321
+ expiresAt: string;
1322
+ sopRuleId: string;
1323
+ toolNameNormalized: string;
1324
+ targetHash: string;
1325
+ holdId: string;
1326
+ decidedBy: string;
1327
+ decidedAt: string;
1328
+ }[];
1329
+ }, {
1330
+ ok: true;
1331
+ bypasses: {
1332
+ workspaceId: string;
1333
+ expiresAt: string;
1334
+ sopRuleId: string;
1335
+ toolNameNormalized: string;
1336
+ targetHash: string;
1337
+ holdId: string;
1338
+ decidedBy: string;
1339
+ decidedAt: string;
1340
+ }[];
1341
+ }>;
1342
+ export type ApprovedBypassListResponse = z.infer<typeof ApprovedBypassListResponse>;
1343
+ /**
1344
+ * `GET /api/v1/decisions/:entryId`: one decision-queue entry, found by its
1345
+ * entry id or by the hold id a gate gave the agent (`hold_…`). The MCP
1346
+ * proxy's `intutic_hold_status` tool reads `status`.
1347
+ */
1348
+ export declare const DecisionDetailResponse: z.ZodObject<{
1349
+ entry_id: z.ZodString;
1350
+ session_id: z.ZodNullable<z.ZodString>;
1351
+ workspace_id: z.ZodString;
1352
+ original_tool_call: z.ZodUnknown;
1353
+ hijacked_tool_call: z.ZodUnknown;
1354
+ outcome: z.ZodString;
1355
+ trace_id: z.ZodNullable<z.ZodString>;
1356
+ rationale: z.ZodNullable<z.ZodString>;
1357
+ status: z.ZodNullable<z.ZodString>;
1358
+ created_at: z.ZodNullable<z.ZodString>;
1359
+ }, "strip", z.ZodTypeAny, {
1360
+ status: string | null;
1361
+ rationale: string | null;
1362
+ workspace_id: string;
1363
+ session_id: string | null;
1364
+ created_at: string | null;
1365
+ entry_id: string;
1366
+ outcome: string;
1367
+ trace_id: string | null;
1368
+ original_tool_call?: unknown;
1369
+ hijacked_tool_call?: unknown;
1370
+ }, {
1371
+ status: string | null;
1372
+ rationale: string | null;
1373
+ workspace_id: string;
1374
+ session_id: string | null;
1375
+ created_at: string | null;
1376
+ entry_id: string;
1377
+ outcome: string;
1378
+ trace_id: string | null;
1379
+ original_tool_call?: unknown;
1380
+ hijacked_tool_call?: unknown;
1381
+ }>;
1382
+ export type DecisionDetailResponse = z.infer<typeof DecisionDetailResponse>;
1383
+ /** `POST /api/v1/decisions/:entryId/review`. */
1384
+ export declare const DecisionReviewResponse: z.ZodObject<{
1385
+ ok: z.ZodLiteral<true>;
1386
+ status: z.ZodEnum<["APPROVED", "REJECTED"]>;
1387
+ bypassWritten: z.ZodBoolean;
1388
+ }, "strip", z.ZodTypeAny, {
1389
+ status: "APPROVED" | "REJECTED";
1390
+ ok: true;
1391
+ bypassWritten: boolean;
1392
+ }, {
1393
+ status: "APPROVED" | "REJECTED";
1394
+ ok: true;
1395
+ bypassWritten: boolean;
1396
+ }>;
1397
+ export type DecisionReviewResponse = z.infer<typeof DecisionReviewResponse>;
1398
+ /** `GET /api/v1/rule-candidates/:candidateId/source`: the AssemblyScript a candidate renders to. */
1399
+ export declare const RuleCandidateSourceResponse: z.ZodObject<{
1400
+ candidateId: z.ZodString;
1401
+ guardrailId: z.ZodNullable<z.ZodString>;
1402
+ status: z.ZodString;
1403
+ source: z.ZodString;
1404
+ sourceSha256: z.ZodString;
1405
+ }, "strip", z.ZodTypeAny, {
1406
+ status: string;
1407
+ source: string;
1408
+ guardrailId: string | null;
1409
+ candidateId: string;
1410
+ sourceSha256: string;
1411
+ }, {
1412
+ status: string;
1413
+ source: string;
1414
+ guardrailId: string | null;
1415
+ candidateId: string;
1416
+ sourceSha256: string;
1417
+ }>;
1418
+ export type RuleCandidateSourceResponse = z.infer<typeof RuleCandidateSourceResponse>;
1419
+ /** `POST /api/v1/rule-candidates/:candidateId/bundle`: 201 with the SHADOW rule when every gate passed, else 200 with the gates. */
1420
+ export declare const RuleCandidateBundleResponse: z.ZodUnion<[z.ZodObject<{
1421
+ accepted: z.ZodLiteral<true>;
1422
+ ruleId: z.ZodString;
1423
+ mode: z.ZodLiteral<"SHADOW">;
1424
+ gates: z.ZodArray<z.ZodObject<{
1425
+ gate: z.ZodEnum<["predicate_valid", "mocks_from_history", "compiles_and_links", "default_allow", "discriminates", "historical_replay"]>;
1426
+ passed: z.ZodBoolean;
1427
+ detail: z.ZodString;
1428
+ }, "strip", z.ZodTypeAny, {
1429
+ gate: "predicate_valid" | "mocks_from_history" | "compiles_and_links" | "default_allow" | "discriminates" | "historical_replay";
1430
+ detail: string;
1431
+ passed: boolean;
1432
+ }, {
1433
+ gate: "predicate_valid" | "mocks_from_history" | "compiles_and_links" | "default_allow" | "discriminates" | "historical_replay";
1434
+ detail: string;
1435
+ passed: boolean;
1436
+ }>, "many">;
1437
+ }, "strip", z.ZodTypeAny, {
1438
+ mode: "SHADOW";
1439
+ ruleId: string;
1440
+ accepted: true;
1441
+ gates: {
1442
+ gate: "predicate_valid" | "mocks_from_history" | "compiles_and_links" | "default_allow" | "discriminates" | "historical_replay";
1443
+ detail: string;
1444
+ passed: boolean;
1445
+ }[];
1446
+ }, {
1447
+ mode: "SHADOW";
1448
+ ruleId: string;
1449
+ accepted: true;
1450
+ gates: {
1451
+ gate: "predicate_valid" | "mocks_from_history" | "compiles_and_links" | "default_allow" | "discriminates" | "historical_replay";
1452
+ detail: string;
1453
+ passed: boolean;
1454
+ }[];
1455
+ }>, z.ZodObject<{
1456
+ accepted: z.ZodLiteral<false>;
1457
+ gates: z.ZodArray<z.ZodObject<{
1458
+ gate: z.ZodEnum<["predicate_valid", "mocks_from_history", "compiles_and_links", "default_allow", "discriminates", "historical_replay"]>;
1459
+ passed: z.ZodBoolean;
1460
+ detail: z.ZodString;
1461
+ }, "strip", z.ZodTypeAny, {
1462
+ gate: "predicate_valid" | "mocks_from_history" | "compiles_and_links" | "default_allow" | "discriminates" | "historical_replay";
1463
+ detail: string;
1464
+ passed: boolean;
1465
+ }, {
1466
+ gate: "predicate_valid" | "mocks_from_history" | "compiles_and_links" | "default_allow" | "discriminates" | "historical_replay";
1467
+ detail: string;
1468
+ passed: boolean;
1469
+ }>, "many">;
1470
+ }, "strip", z.ZodTypeAny, {
1471
+ accepted: false;
1472
+ gates: {
1473
+ gate: "predicate_valid" | "mocks_from_history" | "compiles_and_links" | "default_allow" | "discriminates" | "historical_replay";
1474
+ detail: string;
1475
+ passed: boolean;
1476
+ }[];
1477
+ }, {
1478
+ accepted: false;
1479
+ gates: {
1480
+ gate: "predicate_valid" | "mocks_from_history" | "compiles_and_links" | "default_allow" | "discriminates" | "historical_replay";
1481
+ detail: string;
1482
+ passed: boolean;
1483
+ }[];
1484
+ }>]>;
1485
+ export type RuleCandidateBundleResponse = z.infer<typeof RuleCandidateBundleResponse>;
1486
+ /** `POST /api/v1/judge/chunk`: the verdict on one streamed segment of a response. */
1487
+ export declare const JudgeChunkResponse: z.ZodObject<{
1488
+ verdict: z.ZodEnum<["TRIGGERED", "PASS"]>;
1489
+ triggered: z.ZodBoolean;
1490
+ personalTriggered: z.ZodBoolean;
1491
+ explanation: z.ZodString;
1492
+ cascade: z.ZodOptional<z.ZodObject<{
1493
+ decision: z.ZodEnum<["clean", "violation", "review"]>;
1494
+ score: z.ZodNullable<z.ZodNumber>;
1495
+ band: z.ZodObject<{
1496
+ lo: z.ZodNumber;
1497
+ hi: z.ZodNumber;
1498
+ }, "strip", z.ZodTypeAny, {
1499
+ lo: number;
1500
+ hi: number;
1501
+ }, {
1502
+ lo: number;
1503
+ hi: number;
1504
+ }>;
1505
+ model: z.ZodString;
1506
+ reviewId: z.ZodOptional<z.ZodString>;
1507
+ }, "strip", z.ZodTypeAny, {
1508
+ model: string;
1509
+ decision: "review" | "clean" | "violation";
1510
+ score: number | null;
1511
+ band: {
1512
+ lo: number;
1513
+ hi: number;
1514
+ };
1515
+ reviewId?: string | undefined;
1516
+ }, {
1517
+ model: string;
1518
+ decision: "review" | "clean" | "violation";
1519
+ score: number | null;
1520
+ band: {
1521
+ lo: number;
1522
+ hi: number;
1523
+ };
1524
+ reviewId?: string | undefined;
1525
+ }>>;
1526
+ independent: z.ZodBoolean;
1527
+ judgeSource: z.ZodLiteral<"platform">;
1528
+ judgeModel: z.ZodString;
1529
+ }, "strip", z.ZodTypeAny, {
1530
+ verdict: "TRIGGERED" | "PASS";
1531
+ triggered: boolean;
1532
+ personalTriggered: boolean;
1533
+ explanation: string;
1534
+ independent: boolean;
1535
+ judgeSource: "platform";
1536
+ judgeModel: string;
1537
+ cascade?: {
1538
+ model: string;
1539
+ decision: "review" | "clean" | "violation";
1540
+ score: number | null;
1541
+ band: {
1542
+ lo: number;
1543
+ hi: number;
1544
+ };
1545
+ reviewId?: string | undefined;
1546
+ } | undefined;
1547
+ }, {
1548
+ verdict: "TRIGGERED" | "PASS";
1549
+ triggered: boolean;
1550
+ personalTriggered: boolean;
1551
+ explanation: string;
1552
+ independent: boolean;
1553
+ judgeSource: "platform";
1554
+ judgeModel: string;
1555
+ cascade?: {
1556
+ model: string;
1557
+ decision: "review" | "clean" | "violation";
1558
+ score: number | null;
1559
+ band: {
1560
+ lo: number;
1561
+ hi: number;
1562
+ };
1563
+ reviewId?: string | undefined;
1564
+ } | undefined;
1565
+ }>;
1566
+ export type JudgeChunkResponse = z.infer<typeof JudgeChunkResponse>;
1567
+ /** `POST /api/v1/judge/finalize`: the final verdict on a response. */
1568
+ export declare const JudgeFinalizeResponse: z.ZodObject<{
1569
+ verdict: z.ZodEnum<["TRIGGERED", "REVIEW", "PASS"]>;
1570
+ triggered: z.ZodBoolean;
1571
+ personalTriggered: z.ZodBoolean;
1572
+ explanation: z.ZodOptional<z.ZodString>;
1573
+ correctionSummary: z.ZodString;
1574
+ independent: z.ZodBoolean;
1575
+ judgeSource: z.ZodLiteral<"platform">;
1576
+ judgeModel: z.ZodString;
1577
+ typedAdvisory: z.ZodOptional<z.ZodObject<{
1578
+ violation: z.ZodBoolean;
1579
+ pViolation: z.ZodNumber;
1580
+ threshold: z.ZodNumber;
1581
+ model: z.ZodString;
1582
+ independent: z.ZodBoolean;
1583
+ }, "strip", z.ZodTypeAny, {
1584
+ model: string;
1585
+ violation: boolean;
1586
+ independent: boolean;
1587
+ pViolation: number;
1588
+ threshold: number;
1589
+ }, {
1590
+ model: string;
1591
+ violation: boolean;
1592
+ independent: boolean;
1593
+ pViolation: number;
1594
+ threshold: number;
1595
+ }>>;
1596
+ cascade: z.ZodOptional<z.ZodObject<{
1597
+ decision: z.ZodEnum<["clean", "violation", "review"]>;
1598
+ score: z.ZodNullable<z.ZodNumber>;
1599
+ band: z.ZodObject<{
1600
+ lo: z.ZodNumber;
1601
+ hi: z.ZodNumber;
1602
+ }, "strip", z.ZodTypeAny, {
1603
+ lo: number;
1604
+ hi: number;
1605
+ }, {
1606
+ lo: number;
1607
+ hi: number;
1608
+ }>;
1609
+ model: z.ZodString;
1610
+ reviewId: z.ZodOptional<z.ZodString>;
1611
+ }, "strip", z.ZodTypeAny, {
1612
+ model: string;
1613
+ decision: "review" | "clean" | "violation";
1614
+ score: number | null;
1615
+ band: {
1616
+ lo: number;
1617
+ hi: number;
1618
+ };
1619
+ reviewId?: string | undefined;
1620
+ }, {
1621
+ model: string;
1622
+ decision: "review" | "clean" | "violation";
1623
+ score: number | null;
1624
+ band: {
1625
+ lo: number;
1626
+ hi: number;
1627
+ };
1628
+ reviewId?: string | undefined;
1629
+ }>>;
1630
+ personalCascade: z.ZodOptional<z.ZodObject<{
1631
+ decision: z.ZodEnum<["clean", "violation", "review"]>;
1632
+ score: z.ZodNumber;
1633
+ }, "strip", z.ZodTypeAny, {
1634
+ decision: "review" | "clean" | "violation";
1635
+ score: number;
1636
+ }, {
1637
+ decision: "review" | "clean" | "violation";
1638
+ score: number;
1639
+ }>>;
1640
+ }, "strip", z.ZodTypeAny, {
1641
+ verdict: "TRIGGERED" | "PASS" | "REVIEW";
1642
+ triggered: boolean;
1643
+ personalTriggered: boolean;
1644
+ independent: boolean;
1645
+ judgeSource: "platform";
1646
+ judgeModel: string;
1647
+ correctionSummary: string;
1648
+ explanation?: string | undefined;
1649
+ cascade?: {
1650
+ model: string;
1651
+ decision: "review" | "clean" | "violation";
1652
+ score: number | null;
1653
+ band: {
1654
+ lo: number;
1655
+ hi: number;
1656
+ };
1657
+ reviewId?: string | undefined;
1658
+ } | undefined;
1659
+ typedAdvisory?: {
1660
+ model: string;
1661
+ violation: boolean;
1662
+ independent: boolean;
1663
+ pViolation: number;
1664
+ threshold: number;
1665
+ } | undefined;
1666
+ personalCascade?: {
1667
+ decision: "review" | "clean" | "violation";
1668
+ score: number;
1669
+ } | undefined;
1670
+ }, {
1671
+ verdict: "TRIGGERED" | "PASS" | "REVIEW";
1672
+ triggered: boolean;
1673
+ personalTriggered: boolean;
1674
+ independent: boolean;
1675
+ judgeSource: "platform";
1676
+ judgeModel: string;
1677
+ correctionSummary: string;
1678
+ explanation?: string | undefined;
1679
+ cascade?: {
1680
+ model: string;
1681
+ decision: "review" | "clean" | "violation";
1682
+ score: number | null;
1683
+ band: {
1684
+ lo: number;
1685
+ hi: number;
1686
+ };
1687
+ reviewId?: string | undefined;
1688
+ } | undefined;
1689
+ typedAdvisory?: {
1690
+ model: string;
1691
+ violation: boolean;
1692
+ independent: boolean;
1693
+ pViolation: number;
1694
+ threshold: number;
1695
+ } | undefined;
1696
+ personalCascade?: {
1697
+ decision: "review" | "clean" | "violation";
1698
+ score: number;
1699
+ } | undefined;
1700
+ }>;
1701
+ export type JudgeFinalizeResponse = z.infer<typeof JudgeFinalizeResponse>;
1702
+ /** `POST /api/v1/hook-events`: what the batch became. */
1703
+ export declare const HookEventsResponse: z.ZodObject<{
1704
+ ok: z.ZodLiteral<true>;
1705
+ summary: z.ZodObject<{
1706
+ total: z.ZodNumber;
1707
+ incidents_created: z.ZodNumber;
1708
+ tamper_alerts: z.ZodNumber;
1709
+ bypass_alerts: z.ZodNumber;
1710
+ allowed: z.ZodNumber;
1711
+ flagged: z.ZodNumber;
1712
+ skill_flagged: z.ZodNumber;
1713
+ would_block: z.ZodNumber;
1714
+ wasm_shadow_evaluations: z.ZodNumber;
1715
+ detector_findings: z.ZodNumber;
1716
+ guardrail_evidence: z.ZodObject<{
1717
+ replayed: z.ZodBoolean;
1718
+ evaluations: z.ZodNumber;
1719
+ evidenceRows: z.ZodNumber;
1720
+ findings: z.ZodNumber;
1721
+ guardrailsTouched: z.ZodNumber;
1722
+ errors: z.ZodNumber;
1723
+ }, "strip", z.ZodTypeAny, {
1724
+ findings: number;
1725
+ errors: number;
1726
+ evaluations: number;
1727
+ replayed: boolean;
1728
+ evidenceRows: number;
1729
+ guardrailsTouched: number;
1730
+ }, {
1731
+ findings: number;
1732
+ errors: number;
1733
+ evaluations: number;
1734
+ replayed: boolean;
1735
+ evidenceRows: number;
1736
+ guardrailsTouched: number;
1737
+ }>;
1738
+ snapshot_issues: z.ZodNumber;
1739
+ guards_disabled: z.ZodNumber;
1740
+ rejected: z.ZodNumber;
1741
+ replayed: z.ZodNumber;
1742
+ errors: z.ZodNumber;
1743
+ }, "strip", z.ZodTypeAny, {
1744
+ rejected: number;
1745
+ errors: number;
1746
+ total: number;
1747
+ incidents_created: number;
1748
+ tamper_alerts: number;
1749
+ bypass_alerts: number;
1750
+ allowed: number;
1751
+ flagged: number;
1752
+ skill_flagged: number;
1753
+ would_block: number;
1754
+ wasm_shadow_evaluations: number;
1755
+ detector_findings: number;
1756
+ guardrail_evidence: {
1757
+ findings: number;
1758
+ errors: number;
1759
+ evaluations: number;
1760
+ replayed: boolean;
1761
+ evidenceRows: number;
1762
+ guardrailsTouched: number;
1763
+ };
1764
+ replayed: number;
1765
+ snapshot_issues: number;
1766
+ guards_disabled: number;
1767
+ }, {
1768
+ rejected: number;
1769
+ errors: number;
1770
+ total: number;
1771
+ incidents_created: number;
1772
+ tamper_alerts: number;
1773
+ bypass_alerts: number;
1774
+ allowed: number;
1775
+ flagged: number;
1776
+ skill_flagged: number;
1777
+ would_block: number;
1778
+ wasm_shadow_evaluations: number;
1779
+ detector_findings: number;
1780
+ guardrail_evidence: {
1781
+ findings: number;
1782
+ errors: number;
1783
+ evaluations: number;
1784
+ replayed: boolean;
1785
+ evidenceRows: number;
1786
+ guardrailsTouched: number;
1787
+ };
1788
+ replayed: number;
1789
+ snapshot_issues: number;
1790
+ guards_disabled: number;
1791
+ }>;
1792
+ }, "strip", z.ZodTypeAny, {
1793
+ ok: true;
1794
+ summary: {
1795
+ rejected: number;
1796
+ errors: number;
1797
+ total: number;
1798
+ incidents_created: number;
1799
+ tamper_alerts: number;
1800
+ bypass_alerts: number;
1801
+ allowed: number;
1802
+ flagged: number;
1803
+ skill_flagged: number;
1804
+ would_block: number;
1805
+ wasm_shadow_evaluations: number;
1806
+ detector_findings: number;
1807
+ guardrail_evidence: {
1808
+ findings: number;
1809
+ errors: number;
1810
+ evaluations: number;
1811
+ replayed: boolean;
1812
+ evidenceRows: number;
1813
+ guardrailsTouched: number;
1814
+ };
1815
+ replayed: number;
1816
+ snapshot_issues: number;
1817
+ guards_disabled: number;
1818
+ };
1819
+ }, {
1820
+ ok: true;
1821
+ summary: {
1822
+ rejected: number;
1823
+ errors: number;
1824
+ total: number;
1825
+ incidents_created: number;
1826
+ tamper_alerts: number;
1827
+ bypass_alerts: number;
1828
+ allowed: number;
1829
+ flagged: number;
1830
+ skill_flagged: number;
1831
+ would_block: number;
1832
+ wasm_shadow_evaluations: number;
1833
+ detector_findings: number;
1834
+ guardrail_evidence: {
1835
+ findings: number;
1836
+ errors: number;
1837
+ evaluations: number;
1838
+ replayed: boolean;
1839
+ evidenceRows: number;
1840
+ guardrailsTouched: number;
1841
+ };
1842
+ replayed: number;
1843
+ snapshot_issues: number;
1844
+ guards_disabled: number;
1845
+ };
1846
+ }>;
1847
+ export type HookEventsResponse = z.infer<typeof HookEventsResponse>;
1848
+ /**
1849
+ * `POST /api/v1/hook-gate`: a verdict on one tool call, each naming its
1850
+ * `decisionId`: a refusal (`allowed: false`; in an OPAQUE workspace a generic
1851
+ * `reason` and no `ruleId`), a degraded allow (a shadow workspace whose checks
1852
+ * could not run), or an allow.
1853
+ */
1854
+ export declare const HookGateResponse: z.ZodUnion<[z.ZodObject<{
1855
+ allowed: z.ZodLiteral<false>;
1856
+ reason: z.ZodString;
1857
+ incidentId: z.ZodOptional<z.ZodString>;
1858
+ code: z.ZodOptional<z.ZodString>;
1859
+ ruleId: z.ZodOptional<z.ZodString>;
1860
+ decisionId: z.ZodString;
1861
+ }, "strip", z.ZodTypeAny, {
1862
+ reason: string;
1863
+ allowed: false;
1864
+ decisionId: string;
1865
+ code?: string | undefined;
1866
+ ruleId?: string | undefined;
1867
+ incidentId?: string | undefined;
1868
+ }, {
1869
+ reason: string;
1870
+ allowed: false;
1871
+ decisionId: string;
1872
+ code?: string | undefined;
1873
+ ruleId?: string | undefined;
1874
+ incidentId?: string | undefined;
1875
+ }>, z.ZodObject<{
1876
+ allowed: z.ZodLiteral<true>;
1877
+ degraded: z.ZodLiteral<true>;
1878
+ code: z.ZodLiteral<"GOVERNANCE_UNAVAILABLE">;
1879
+ reason: z.ZodString;
1880
+ decisionId: z.ZodString;
1881
+ }, "strip", z.ZodTypeAny, {
1882
+ code: "GOVERNANCE_UNAVAILABLE";
1883
+ reason: string;
1884
+ degraded: true;
1885
+ allowed: true;
1886
+ decisionId: string;
1887
+ }, {
1888
+ code: "GOVERNANCE_UNAVAILABLE";
1889
+ reason: string;
1890
+ degraded: true;
1891
+ allowed: true;
1892
+ decisionId: string;
1893
+ }>, z.ZodObject<{
1894
+ allowed: z.ZodLiteral<true>;
1895
+ decisionId: z.ZodString;
1896
+ }, "strip", z.ZodTypeAny, {
1897
+ allowed: true;
1898
+ decisionId: string;
1899
+ }, {
1900
+ allowed: true;
1901
+ decisionId: string;
1902
+ }>]>;
1903
+ export type HookGateResponse = z.infer<typeof HookGateResponse>;
1904
+ //# sourceMappingURL=rules.d.ts.map