@intutic/shared-types 2.5.1 → 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 (38) hide show
  1. package/dist/apiKeyScopes.d.ts +8 -9
  2. package/dist/apiKeyScopes.d.ts.map +1 -1
  3. package/dist/apiKeyScopes.js +10 -12
  4. package/dist/apiKeyScopes.js.map +1 -1
  5. package/dist/auth.d.ts +0 -6
  6. package/dist/auth.d.ts.map +1 -1
  7. package/dist/notifications.d.ts +1 -1
  8. package/dist/notifications.d.ts.map +1 -1
  9. package/dist/notifications.js +12 -0
  10. package/dist/notifications.js.map +1 -1
  11. package/dist/responses/common.d.ts +10 -0
  12. package/dist/responses/common.d.ts.map +1 -1
  13. package/dist/responses/common.js.map +1 -1
  14. package/dist/responses/gateways.d.ts +398 -100
  15. package/dist/responses/gateways.d.ts.map +1 -1
  16. package/dist/responses/gateways.js +110 -31
  17. package/dist/responses/gateways.js.map +1 -1
  18. package/dist/responses/guardrails.d.ts +8 -8
  19. package/dist/responses/guardrails.js +1 -1
  20. package/dist/responses/guardrails.js.map +1 -1
  21. package/dist/responses/identity.d.ts +0 -8
  22. package/dist/responses/identity.d.ts.map +1 -1
  23. package/dist/responses/identity.js +0 -1
  24. package/dist/responses/identity.js.map +1 -1
  25. package/dist/responses/integrations.d.ts +139 -9
  26. package/dist/responses/integrations.d.ts.map +1 -1
  27. package/dist/responses/integrations.js +38 -2
  28. package/dist/responses/integrations.js.map +1 -1
  29. package/dist/responses/observability.d.ts +38 -38
  30. package/dist/responses/rules.d.ts +426 -470
  31. package/dist/responses/rules.d.ts.map +1 -1
  32. package/dist/responses/rules.js +61 -82
  33. package/dist/responses/rules.js.map +1 -1
  34. package/dist/workspaceSettings.d.ts +2 -5
  35. package/dist/workspaceSettings.d.ts.map +1 -1
  36. package/dist/workspaceSettings.js +1 -2
  37. package/dist/workspaceSettings.js.map +1 -1
  38. package/package.json +2 -2
@@ -1,457 +1,9 @@
1
1
  /**
2
- * Responses of the control plane routes in policies.ts, wasmRules.ts, sops.ts, decisions.ts, judge.ts and hookEvents.ts.
2
+ * Responses of the control plane routes in wasmRules.ts, sops.ts, decisions.ts, judge.ts and hookEvents.ts.
3
3
  *
4
4
  * @module
5
5
  */
6
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
7
  /** A `wasm_rule_bundles` row without its binary. */
456
8
  export declare const WasmRuleResponse: z.ZodObject<{
457
9
  ruleId: z.ZodString;
@@ -1154,6 +706,7 @@ export declare const SopRulesResponse: z.ZodObject<{
1154
706
  argPattern?: string | undefined;
1155
707
  origin?: "guardrail" | undefined;
1156
708
  }>, "many">;
709
+ } & {
1157
710
  allowedTools: z.ZodArray<z.ZodString, "many">;
1158
711
  toolDescriptionOverrides: z.ZodRecord<z.ZodString, z.ZodString>;
1159
712
  allowedServers: z.ZodArray<z.ZodString, "many">;
@@ -1276,11 +829,12 @@ export declare const SopRulesResponse: z.ZodObject<{
1276
829
  memberId: string;
1277
830
  ssoGroups: string[];
1278
831
  }>>;
1279
- interventionMode: z.ZodEnum<["TRANSPARENT", "OPAQUE", "SILENT_LOG"]>;
1280
832
  mcpProxyFailBehavior: z.ZodOptional<z.ZodEnum<["open", "closed"]>>;
1281
833
  mcpInjectionAction: z.ZodOptional<z.ZodEnum<["warn", "block"]>>;
1282
834
  mcpAnomalyMode: z.ZodOptional<z.ZodEnum<["enforce", "warn", "off"]>>;
1283
835
  mcpAnomalyOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["steer", "reask", "kill", "off"]>>>;
836
+ } & {
837
+ interventionMode: z.ZodEnum<["TRANSPARENT", "OPAQUE", "SILENT_LOG"]>;
1284
838
  }, "strip", z.ZodTypeAny, {
1285
839
  ok: true;
1286
840
  piiDetectors: Partial<Record<"pii.card" | "pii.iban" | "pii.ssn" | "pii.email" | "pii.phone", "redact" | "off" | "block">> | null;
@@ -1403,6 +957,287 @@ export declare const SopRulesResponse: z.ZodObject<{
1403
957
  mcpAnomalyOverrides?: Record<string, "off" | "steer" | "reask" | "kill"> | undefined;
1404
958
  }>;
1405
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>;
1406
1241
  /** `POST /api/v1/decisions`: how many holds became queue entries. */
1407
1242
  export declare const DecisionIngestResponse: z.ZodObject<{
1408
1243
  accepted: z.ZodNumber;
@@ -1505,6 +1340,46 @@ export declare const ApprovedBypassListResponse: z.ZodObject<{
1505
1340
  }[];
1506
1341
  }>;
1507
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>;
1508
1383
  /** `POST /api/v1/decisions/:entryId/review`. */
1509
1384
  export declare const DecisionReviewResponse: z.ZodObject<{
1510
1385
  ok: z.ZodLiteral<true>;
@@ -1608,6 +1483,87 @@ export declare const RuleCandidateBundleResponse: z.ZodUnion<[z.ZodObject<{
1608
1483
  }[];
1609
1484
  }>]>;
1610
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>;
1611
1567
  /** `POST /api/v1/judge/finalize`: the final verdict on a response. */
1612
1568
  export declare const JudgeFinalizeResponse: z.ZodObject<{
1613
1569
  verdict: z.ZodEnum<["TRIGGERED", "REVIEW", "PASS"]>;
@@ -1626,14 +1582,14 @@ export declare const JudgeFinalizeResponse: z.ZodObject<{
1626
1582
  independent: z.ZodBoolean;
1627
1583
  }, "strip", z.ZodTypeAny, {
1628
1584
  model: string;
1629
- independent: boolean;
1630
1585
  violation: boolean;
1586
+ independent: boolean;
1631
1587
  pViolation: number;
1632
1588
  threshold: number;
1633
1589
  }, {
1634
1590
  model: string;
1635
- independent: boolean;
1636
1591
  violation: boolean;
1592
+ independent: boolean;
1637
1593
  pViolation: number;
1638
1594
  threshold: number;
1639
1595
  }>>;
@@ -1682,21 +1638,14 @@ export declare const JudgeFinalizeResponse: z.ZodObject<{
1682
1638
  score: number;
1683
1639
  }>>;
1684
1640
  }, "strip", z.ZodTypeAny, {
1685
- verdict: "TRIGGERED" | "REVIEW" | "PASS";
1641
+ verdict: "TRIGGERED" | "PASS" | "REVIEW";
1686
1642
  triggered: boolean;
1687
1643
  personalTriggered: boolean;
1688
- correctionSummary: string;
1689
1644
  independent: boolean;
1690
1645
  judgeSource: "platform";
1691
1646
  judgeModel: string;
1647
+ correctionSummary: string;
1692
1648
  explanation?: string | undefined;
1693
- typedAdvisory?: {
1694
- model: string;
1695
- independent: boolean;
1696
- violation: boolean;
1697
- pViolation: number;
1698
- threshold: number;
1699
- } | undefined;
1700
1649
  cascade?: {
1701
1650
  model: string;
1702
1651
  decision: "review" | "clean" | "violation";
@@ -1707,26 +1656,26 @@ export declare const JudgeFinalizeResponse: z.ZodObject<{
1707
1656
  };
1708
1657
  reviewId?: string | undefined;
1709
1658
  } | undefined;
1659
+ typedAdvisory?: {
1660
+ model: string;
1661
+ violation: boolean;
1662
+ independent: boolean;
1663
+ pViolation: number;
1664
+ threshold: number;
1665
+ } | undefined;
1710
1666
  personalCascade?: {
1711
1667
  decision: "review" | "clean" | "violation";
1712
1668
  score: number;
1713
1669
  } | undefined;
1714
1670
  }, {
1715
- verdict: "TRIGGERED" | "REVIEW" | "PASS";
1671
+ verdict: "TRIGGERED" | "PASS" | "REVIEW";
1716
1672
  triggered: boolean;
1717
1673
  personalTriggered: boolean;
1718
- correctionSummary: string;
1719
1674
  independent: boolean;
1720
1675
  judgeSource: "platform";
1721
1676
  judgeModel: string;
1677
+ correctionSummary: string;
1722
1678
  explanation?: string | undefined;
1723
- typedAdvisory?: {
1724
- model: string;
1725
- independent: boolean;
1726
- violation: boolean;
1727
- pViolation: number;
1728
- threshold: number;
1729
- } | undefined;
1730
1679
  cascade?: {
1731
1680
  model: string;
1732
1681
  decision: "review" | "clean" | "violation";
@@ -1737,6 +1686,13 @@ export declare const JudgeFinalizeResponse: z.ZodObject<{
1737
1686
  };
1738
1687
  reviewId?: string | undefined;
1739
1688
  } | undefined;
1689
+ typedAdvisory?: {
1690
+ model: string;
1691
+ violation: boolean;
1692
+ independent: boolean;
1693
+ pViolation: number;
1694
+ threshold: number;
1695
+ } | undefined;
1740
1696
  personalCascade?: {
1741
1697
  decision: "review" | "clean" | "violation";
1742
1698
  score: number;