@intutic/shared-types 2.5.0 → 2.5.1

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