@intutic/shared-types 2.4.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 (130) hide show
  1. package/README.md +9 -9
  2. package/dist/anomaly.d.ts +0 -19
  3. package/dist/anomaly.d.ts.map +1 -1
  4. package/dist/apiKeyScopes.d.ts +100 -0
  5. package/dist/apiKeyScopes.d.ts.map +1 -0
  6. package/dist/apiKeyScopes.js +142 -0
  7. package/dist/apiKeyScopes.js.map +1 -0
  8. package/dist/attenuation.d.ts +10 -5
  9. package/dist/attenuation.d.ts.map +1 -1
  10. package/dist/attenuation.js +17 -4
  11. package/dist/attenuation.js.map +1 -1
  12. package/dist/auth.d.ts +35 -4
  13. package/dist/auth.d.ts.map +1 -1
  14. package/dist/auth.js +26 -6
  15. package/dist/auth.js.map +1 -1
  16. package/dist/chaos.d.ts +2225 -0
  17. package/dist/chaos.d.ts.map +1 -0
  18. package/dist/chaos.js +358 -0
  19. package/dist/chaos.js.map +1 -0
  20. package/dist/chaosGate.d.ts +166 -0
  21. package/dist/chaosGate.d.ts.map +1 -0
  22. package/dist/chaosGate.js +383 -0
  23. package/dist/chaosGate.js.map +1 -0
  24. package/dist/enums.d.ts +9 -26
  25. package/dist/enums.d.ts.map +1 -1
  26. package/dist/enums.js +11 -28
  27. package/dist/enums.js.map +1 -1
  28. package/dist/errors.d.ts +6 -1
  29. package/dist/errors.d.ts.map +1 -1
  30. package/dist/errors.js +6 -1
  31. package/dist/errors.js.map +1 -1
  32. package/dist/finops.d.ts +4 -20
  33. package/dist/finops.d.ts.map +1 -1
  34. package/dist/guardrailIr.d.ts +6 -6
  35. package/dist/guardrailRender.d.ts +51 -0
  36. package/dist/guardrailRender.d.ts.map +1 -1
  37. package/dist/guardrailRender.js +69 -1
  38. package/dist/guardrailRender.js.map +1 -1
  39. package/dist/identity.d.ts +0 -18
  40. package/dist/identity.d.ts.map +1 -1
  41. package/dist/identity.js +1 -5
  42. package/dist/identity.js.map +1 -1
  43. package/dist/index.d.ts +22 -14
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +75 -13
  46. package/dist/index.js.map +1 -1
  47. package/dist/intelligence.d.ts +3 -100
  48. package/dist/intelligence.d.ts.map +1 -1
  49. package/dist/intelligence.js +3 -3
  50. package/dist/intelligence.js.map +1 -1
  51. package/dist/mcpBudgets.d.ts +16 -16
  52. package/dist/mcpDaemonPolicyCache.d.ts +32 -0
  53. package/dist/mcpDaemonPolicyCache.d.ts.map +1 -0
  54. package/dist/mcpDaemonPolicyCache.js +43 -0
  55. package/dist/mcpDaemonPolicyCache.js.map +1 -0
  56. package/dist/notifications.d.ts +1 -1
  57. package/dist/notifications.d.ts.map +1 -1
  58. package/dist/notifications.js +9 -4
  59. package/dist/notifications.js.map +1 -1
  60. package/dist/observability.d.ts +0 -31
  61. package/dist/observability.d.ts.map +1 -1
  62. package/dist/observability.js +0 -7
  63. package/dist/observability.js.map +1 -1
  64. package/dist/opaqueRefusal.d.ts +40 -0
  65. package/dist/opaqueRefusal.d.ts.map +1 -0
  66. package/dist/opaqueRefusal.js +53 -0
  67. package/dist/opaqueRefusal.js.map +1 -0
  68. package/dist/piiDetectors.d.ts +3 -0
  69. package/dist/piiDetectors.d.ts.map +1 -1
  70. package/dist/piiDetectors.js.map +1 -1
  71. package/dist/piiDetectors.json +11 -6
  72. package/dist/policyGuardrails.d.ts +5 -5
  73. package/dist/posturePresets.d.ts.map +1 -1
  74. package/dist/posturePresets.js +12 -3
  75. package/dist/posturePresets.js.map +1 -1
  76. package/dist/responses/common.d.ts +53 -0
  77. package/dist/responses/common.d.ts.map +1 -0
  78. package/dist/responses/common.js +43 -0
  79. package/dist/responses/common.js.map +1 -0
  80. package/dist/responses/gateways.d.ts +4999 -0
  81. package/dist/responses/gateways.d.ts.map +1 -0
  82. package/dist/responses/gateways.js +394 -0
  83. package/dist/responses/gateways.js.map +1 -0
  84. package/dist/responses/guardrails.d.ts +5200 -0
  85. package/dist/responses/guardrails.d.ts.map +1 -0
  86. package/dist/responses/guardrails.js +374 -0
  87. package/dist/responses/guardrails.js.map +1 -0
  88. package/dist/responses/identity.d.ts +1667 -0
  89. package/dist/responses/identity.d.ts.map +1 -0
  90. package/dist/responses/identity.js +292 -0
  91. package/dist/responses/identity.js.map +1 -0
  92. package/dist/responses/index.d.ts +15 -0
  93. package/dist/responses/index.d.ts.map +1 -0
  94. package/dist/responses/index.js +31 -0
  95. package/dist/responses/index.js.map +1 -0
  96. package/dist/responses/integrations.d.ts +4118 -0
  97. package/dist/responses/integrations.d.ts.map +1 -0
  98. package/dist/responses/integrations.js +400 -0
  99. package/dist/responses/integrations.js.map +1 -0
  100. package/dist/responses/observability.d.ts +3222 -0
  101. package/dist/responses/observability.d.ts.map +1 -0
  102. package/dist/responses/observability.js +598 -0
  103. package/dist/responses/observability.js.map +1 -0
  104. package/dist/responses/orgSops.d.ts +112 -0
  105. package/dist/responses/orgSops.d.ts.map +1 -0
  106. package/dist/responses/orgSops.js +29 -0
  107. package/dist/responses/orgSops.js.map +1 -0
  108. package/dist/responses/rules.d.ts +1948 -0
  109. package/dist/responses/rules.d.ts.map +1 -0
  110. package/dist/responses/rules.js +352 -0
  111. package/dist/responses/rules.js.map +1 -0
  112. package/dist/skillScan.d.ts +31 -0
  113. package/dist/skillScan.d.ts.map +1 -1
  114. package/dist/skillScan.js +25 -1
  115. package/dist/skillScan.js.map +1 -1
  116. package/dist/sop.d.ts +8 -1
  117. package/dist/sop.d.ts.map +1 -1
  118. package/dist/sop.js.map +1 -1
  119. package/dist/taskManagement.d.ts +34 -82
  120. package/dist/taskManagement.d.ts.map +1 -1
  121. package/dist/taskManagement.js +4 -4
  122. package/dist/toolPoison.d.ts +15 -2
  123. package/dist/toolPoison.d.ts.map +1 -1
  124. package/dist/toolPoison.js +14 -4
  125. package/dist/toolPoison.js.map +1 -1
  126. package/dist/workspaceSettings.d.ts +33 -14
  127. package/dist/workspaceSettings.d.ts.map +1 -1
  128. package/dist/workspaceSettings.js +3 -1
  129. package/dist/workspaceSettings.js.map +1 -1
  130. package/package.json +2 -2
@@ -0,0 +1,3222 @@
1
+ /**
2
+ * Responses of the control plane routes in incidents.ts, traces.ts, findings.ts, integrity.ts, inventory.ts, usage.ts and loops.ts.
3
+ *
4
+ * @module
5
+ */
6
+ import { z } from 'zod';
7
+ /** A governance incident, as `GET /api/v1/incidents/:id` maps its `governance_incidents` row. */
8
+ export declare const IncidentResponse: z.ZodObject<{
9
+ incident_id: z.ZodString;
10
+ workspace_id: z.ZodString;
11
+ trace_id: z.ZodNullable<z.ZodString>;
12
+ session_id: z.ZodNullable<z.ZodString>;
13
+ severity: z.ZodEnum<["LOW", "MEDIUM", "HIGH", "CRITICAL"]>;
14
+ anomaly_type: z.ZodEnum<[import("../enums.js").IncidentType, ...import("../enums.js").IncidentType[]]>;
15
+ description: z.ZodString;
16
+ resolution_status: z.ZodNullable<z.ZodString>;
17
+ resolved_by: z.ZodNullable<z.ZodString>;
18
+ resolved_at: z.ZodNullable<z.ZodString>;
19
+ escalation_chain: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
20
+ created_at: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ description: string;
23
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
24
+ workspace_id: string;
25
+ session_id: string | null;
26
+ created_at: string;
27
+ incident_id: string;
28
+ trace_id: string | null;
29
+ anomaly_type: import("../enums.js").IncidentType;
30
+ resolution_status: string | null;
31
+ resolved_by: string | null;
32
+ resolved_at: string | null;
33
+ escalation_chain: Record<string, unknown> | null;
34
+ }, {
35
+ description: string;
36
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
37
+ workspace_id: string;
38
+ session_id: string | null;
39
+ created_at: string;
40
+ incident_id: string;
41
+ trace_id: string | null;
42
+ anomaly_type: import("../enums.js").IncidentType;
43
+ resolution_status: string | null;
44
+ resolved_by: string | null;
45
+ resolved_at: string | null;
46
+ escalation_chain: Record<string, unknown> | null;
47
+ }>;
48
+ export type IncidentResponse = z.infer<typeof IncidentResponse>;
49
+ /** `GET /api/v1/incidents/:id`. */
50
+ export declare const IncidentDetailResponse: z.ZodObject<{
51
+ data: z.ZodObject<{
52
+ incident_id: z.ZodString;
53
+ workspace_id: z.ZodString;
54
+ trace_id: z.ZodNullable<z.ZodString>;
55
+ session_id: z.ZodNullable<z.ZodString>;
56
+ severity: z.ZodEnum<["LOW", "MEDIUM", "HIGH", "CRITICAL"]>;
57
+ anomaly_type: z.ZodEnum<[import("../enums.js").IncidentType, ...import("../enums.js").IncidentType[]]>;
58
+ description: z.ZodString;
59
+ resolution_status: z.ZodNullable<z.ZodString>;
60
+ resolved_by: z.ZodNullable<z.ZodString>;
61
+ resolved_at: z.ZodNullable<z.ZodString>;
62
+ escalation_chain: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
63
+ created_at: z.ZodString;
64
+ }, "strip", z.ZodTypeAny, {
65
+ description: string;
66
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
67
+ workspace_id: string;
68
+ session_id: string | null;
69
+ created_at: string;
70
+ incident_id: string;
71
+ trace_id: string | null;
72
+ anomaly_type: import("../enums.js").IncidentType;
73
+ resolution_status: string | null;
74
+ resolved_by: string | null;
75
+ resolved_at: string | null;
76
+ escalation_chain: Record<string, unknown> | null;
77
+ }, {
78
+ description: string;
79
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
80
+ workspace_id: string;
81
+ session_id: string | null;
82
+ created_at: string;
83
+ incident_id: string;
84
+ trace_id: string | null;
85
+ anomaly_type: import("../enums.js").IncidentType;
86
+ resolution_status: string | null;
87
+ resolved_by: string | null;
88
+ resolved_at: string | null;
89
+ escalation_chain: Record<string, unknown> | null;
90
+ }>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ data: {
93
+ description: string;
94
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
95
+ workspace_id: string;
96
+ session_id: string | null;
97
+ created_at: string;
98
+ incident_id: string;
99
+ trace_id: string | null;
100
+ anomaly_type: import("../enums.js").IncidentType;
101
+ resolution_status: string | null;
102
+ resolved_by: string | null;
103
+ resolved_at: string | null;
104
+ escalation_chain: Record<string, unknown> | null;
105
+ };
106
+ }, {
107
+ data: {
108
+ description: string;
109
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
110
+ workspace_id: string;
111
+ session_id: string | null;
112
+ created_at: string;
113
+ incident_id: string;
114
+ trace_id: string | null;
115
+ anomaly_type: import("../enums.js").IncidentType;
116
+ resolution_status: string | null;
117
+ resolved_by: string | null;
118
+ resolved_at: string | null;
119
+ escalation_chain: Record<string, unknown> | null;
120
+ };
121
+ }>;
122
+ export type IncidentDetailResponse = z.infer<typeof IncidentDetailResponse>;
123
+ /** How much of a ranked review queue the audit budget covers (`services/reviewPriority.ts` `describeBudget`). */
124
+ export declare const ReviewBudgetResponse: z.ZodObject<{
125
+ budget: z.ZodNumber;
126
+ matched: z.ZodNumber;
127
+ withheld: z.ZodNumber;
128
+ overBudget: z.ZodBoolean;
129
+ }, "strip", z.ZodTypeAny, {
130
+ budget: number;
131
+ matched: number;
132
+ withheld: number;
133
+ overBudget: boolean;
134
+ }, {
135
+ budget: number;
136
+ matched: number;
137
+ withheld: number;
138
+ overBudget: boolean;
139
+ }>;
140
+ export type ReviewBudgetResponse = z.infer<typeof ReviewBudgetResponse>;
141
+ /** One row of the incident list: the incident with its rank. */
142
+ export declare const IncidentListRowResponse: z.ZodObject<{
143
+ incident_id: z.ZodString;
144
+ workspace_id: z.ZodString;
145
+ trace_id: z.ZodNullable<z.ZodString>;
146
+ session_id: z.ZodNullable<z.ZodString>;
147
+ severity: z.ZodEnum<["LOW", "MEDIUM", "HIGH", "CRITICAL"]>;
148
+ anomaly_type: z.ZodEnum<[import("../enums.js").IncidentType, ...import("../enums.js").IncidentType[]]>;
149
+ description: z.ZodString;
150
+ resolution_status: z.ZodNullable<z.ZodString>;
151
+ resolved_by: z.ZodNullable<z.ZodString>;
152
+ resolved_at: z.ZodNullable<z.ZodString>;
153
+ escalation_chain: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
154
+ created_at: z.ZodString;
155
+ } & {
156
+ review_priority: z.ZodNumber;
157
+ }, "strip", z.ZodTypeAny, {
158
+ description: string;
159
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
160
+ workspace_id: string;
161
+ session_id: string | null;
162
+ created_at: string;
163
+ incident_id: string;
164
+ trace_id: string | null;
165
+ anomaly_type: import("../enums.js").IncidentType;
166
+ resolution_status: string | null;
167
+ resolved_by: string | null;
168
+ resolved_at: string | null;
169
+ escalation_chain: Record<string, unknown> | null;
170
+ review_priority: number;
171
+ }, {
172
+ description: string;
173
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
174
+ workspace_id: string;
175
+ session_id: string | null;
176
+ created_at: string;
177
+ incident_id: string;
178
+ trace_id: string | null;
179
+ anomaly_type: import("../enums.js").IncidentType;
180
+ resolution_status: string | null;
181
+ resolved_by: string | null;
182
+ resolved_at: string | null;
183
+ escalation_chain: Record<string, unknown> | null;
184
+ review_priority: number;
185
+ }>;
186
+ export type IncidentListRowResponse = z.infer<typeof IncidentListRowResponse>;
187
+ /**
188
+ * `GET /api/v1/incidents`. A page of 20 or more rows is TOON-encoded: the rows
189
+ * are one string under `data`, and `listProperty` names where a decoder puts
190
+ * them (`data` again).
191
+ */
192
+ export declare const IncidentListResponse: z.ZodUnion<[z.ZodObject<{
193
+ listProperty: z.ZodLiteral<"data">;
194
+ rowCase: z.ZodLiteral<"snake">;
195
+ } & {
196
+ format: z.ZodLiteral<"toon">;
197
+ data: z.ZodString;
198
+ meta: z.ZodObject<{
199
+ total: z.ZodNumber;
200
+ page: z.ZodNumber;
201
+ limit: z.ZodNumber;
202
+ audit: z.ZodObject<{
203
+ budget: z.ZodNumber;
204
+ matched: z.ZodNumber;
205
+ withheld: z.ZodNumber;
206
+ overBudget: z.ZodBoolean;
207
+ }, "strip", z.ZodTypeAny, {
208
+ budget: number;
209
+ matched: number;
210
+ withheld: number;
211
+ overBudget: boolean;
212
+ }, {
213
+ budget: number;
214
+ matched: number;
215
+ withheld: number;
216
+ overBudget: boolean;
217
+ }>;
218
+ }, "strip", z.ZodTypeAny, {
219
+ limit: number;
220
+ audit: {
221
+ budget: number;
222
+ matched: number;
223
+ withheld: number;
224
+ overBudget: boolean;
225
+ };
226
+ total: number;
227
+ page: number;
228
+ }, {
229
+ limit: number;
230
+ audit: {
231
+ budget: number;
232
+ matched: number;
233
+ withheld: number;
234
+ overBudget: boolean;
235
+ };
236
+ total: number;
237
+ page: number;
238
+ }>;
239
+ }, "strip", z.ZodTypeAny, {
240
+ data: string;
241
+ listProperty: "data";
242
+ rowCase: "snake";
243
+ format: "toon";
244
+ meta: {
245
+ limit: number;
246
+ audit: {
247
+ budget: number;
248
+ matched: number;
249
+ withheld: number;
250
+ overBudget: boolean;
251
+ };
252
+ total: number;
253
+ page: number;
254
+ };
255
+ }, {
256
+ data: string;
257
+ listProperty: "data";
258
+ rowCase: "snake";
259
+ format: "toon";
260
+ meta: {
261
+ limit: number;
262
+ audit: {
263
+ budget: number;
264
+ matched: number;
265
+ withheld: number;
266
+ overBudget: boolean;
267
+ };
268
+ total: number;
269
+ page: number;
270
+ };
271
+ }>, z.ZodObject<{
272
+ listProperty: z.ZodLiteral<"data">;
273
+ rowCase: z.ZodLiteral<"snake">;
274
+ } & {
275
+ data: z.ZodArray<z.ZodObject<{
276
+ incident_id: z.ZodString;
277
+ workspace_id: z.ZodString;
278
+ trace_id: z.ZodNullable<z.ZodString>;
279
+ session_id: z.ZodNullable<z.ZodString>;
280
+ severity: z.ZodEnum<["LOW", "MEDIUM", "HIGH", "CRITICAL"]>;
281
+ anomaly_type: z.ZodEnum<[import("../enums.js").IncidentType, ...import("../enums.js").IncidentType[]]>;
282
+ description: z.ZodString;
283
+ resolution_status: z.ZodNullable<z.ZodString>;
284
+ resolved_by: z.ZodNullable<z.ZodString>;
285
+ resolved_at: z.ZodNullable<z.ZodString>;
286
+ escalation_chain: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
287
+ created_at: z.ZodString;
288
+ } & {
289
+ review_priority: z.ZodNumber;
290
+ }, "strip", z.ZodTypeAny, {
291
+ description: string;
292
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
293
+ workspace_id: string;
294
+ session_id: string | null;
295
+ created_at: string;
296
+ incident_id: string;
297
+ trace_id: string | null;
298
+ anomaly_type: import("../enums.js").IncidentType;
299
+ resolution_status: string | null;
300
+ resolved_by: string | null;
301
+ resolved_at: string | null;
302
+ escalation_chain: Record<string, unknown> | null;
303
+ review_priority: number;
304
+ }, {
305
+ description: string;
306
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
307
+ workspace_id: string;
308
+ session_id: string | null;
309
+ created_at: string;
310
+ incident_id: string;
311
+ trace_id: string | null;
312
+ anomaly_type: import("../enums.js").IncidentType;
313
+ resolution_status: string | null;
314
+ resolved_by: string | null;
315
+ resolved_at: string | null;
316
+ escalation_chain: Record<string, unknown> | null;
317
+ review_priority: number;
318
+ }>, "many">;
319
+ meta: z.ZodObject<{
320
+ total: z.ZodNumber;
321
+ page: z.ZodNumber;
322
+ limit: z.ZodNumber;
323
+ audit: z.ZodObject<{
324
+ budget: z.ZodNumber;
325
+ matched: z.ZodNumber;
326
+ withheld: z.ZodNumber;
327
+ overBudget: z.ZodBoolean;
328
+ }, "strip", z.ZodTypeAny, {
329
+ budget: number;
330
+ matched: number;
331
+ withheld: number;
332
+ overBudget: boolean;
333
+ }, {
334
+ budget: number;
335
+ matched: number;
336
+ withheld: number;
337
+ overBudget: boolean;
338
+ }>;
339
+ }, "strip", z.ZodTypeAny, {
340
+ limit: number;
341
+ audit: {
342
+ budget: number;
343
+ matched: number;
344
+ withheld: number;
345
+ overBudget: boolean;
346
+ };
347
+ total: number;
348
+ page: number;
349
+ }, {
350
+ limit: number;
351
+ audit: {
352
+ budget: number;
353
+ matched: number;
354
+ withheld: number;
355
+ overBudget: boolean;
356
+ };
357
+ total: number;
358
+ page: number;
359
+ }>;
360
+ }, "strip", z.ZodTypeAny, {
361
+ data: {
362
+ description: string;
363
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
364
+ workspace_id: string;
365
+ session_id: string | null;
366
+ created_at: string;
367
+ incident_id: string;
368
+ trace_id: string | null;
369
+ anomaly_type: import("../enums.js").IncidentType;
370
+ resolution_status: string | null;
371
+ resolved_by: string | null;
372
+ resolved_at: string | null;
373
+ escalation_chain: Record<string, unknown> | null;
374
+ review_priority: number;
375
+ }[];
376
+ listProperty: "data";
377
+ rowCase: "snake";
378
+ meta: {
379
+ limit: number;
380
+ audit: {
381
+ budget: number;
382
+ matched: number;
383
+ withheld: number;
384
+ overBudget: boolean;
385
+ };
386
+ total: number;
387
+ page: number;
388
+ };
389
+ }, {
390
+ data: {
391
+ description: string;
392
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
393
+ workspace_id: string;
394
+ session_id: string | null;
395
+ created_at: string;
396
+ incident_id: string;
397
+ trace_id: string | null;
398
+ anomaly_type: import("../enums.js").IncidentType;
399
+ resolution_status: string | null;
400
+ resolved_by: string | null;
401
+ resolved_at: string | null;
402
+ escalation_chain: Record<string, unknown> | null;
403
+ review_priority: number;
404
+ }[];
405
+ listProperty: "data";
406
+ rowCase: "snake";
407
+ meta: {
408
+ limit: number;
409
+ audit: {
410
+ budget: number;
411
+ matched: number;
412
+ withheld: number;
413
+ overBudget: boolean;
414
+ };
415
+ total: number;
416
+ page: number;
417
+ };
418
+ }>]>;
419
+ export type IncidentListResponse = z.infer<typeof IncidentListResponse>;
420
+ /**
421
+ * One trace in the list (`traceQueryService.ts` `listTraces`). `breakGlass` and
422
+ * `breakGlassRequestId` are always sent; they are optional here because
423
+ * `TraceSummary` declares them so.
424
+ */
425
+ export declare const TraceSummaryResponse: z.ZodObject<{
426
+ traceId: z.ZodString;
427
+ timestamp: z.ZodString;
428
+ requestedModel: z.ZodString;
429
+ actualModelRouted: z.ZodString;
430
+ enforcementAction: z.ZodString;
431
+ complianceScore: z.ZodNumber;
432
+ actualCostUsd: z.ZodNumber;
433
+ anomalyDetected: z.ZodNullable<z.ZodString>;
434
+ breakGlass: z.ZodOptional<z.ZodBoolean>;
435
+ breakGlassRequestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
436
+ }, "strip", z.ZodTypeAny, {
437
+ requestedModel: string;
438
+ actualModelRouted: string;
439
+ actualCostUsd: number;
440
+ complianceScore: number;
441
+ enforcementAction: string;
442
+ anomalyDetected: string | null;
443
+ traceId: string;
444
+ timestamp: string;
445
+ breakGlass?: boolean | undefined;
446
+ breakGlassRequestId?: string | null | undefined;
447
+ }, {
448
+ requestedModel: string;
449
+ actualModelRouted: string;
450
+ actualCostUsd: number;
451
+ complianceScore: number;
452
+ enforcementAction: string;
453
+ anomalyDetected: string | null;
454
+ traceId: string;
455
+ timestamp: string;
456
+ breakGlass?: boolean | undefined;
457
+ breakGlassRequestId?: string | null | undefined;
458
+ }>;
459
+ export type TraceSummaryResponse = z.infer<typeof TraceSummaryResponse>;
460
+ /**
461
+ * `GET /api/v1/traces`. A page of 20 or more rows is TOON-encoded: the rows are
462
+ * one string under `data`, and `listProperty: 'traces'` names where a decoder
463
+ * puts them.
464
+ */
465
+ export declare const TraceListResponse: z.ZodUnion<[z.ZodObject<{
466
+ listProperty: z.ZodLiteral<"traces">;
467
+ rowCase: z.ZodLiteral<"camel">;
468
+ } & {
469
+ format: z.ZodLiteral<"toon">;
470
+ data: z.ZodString;
471
+ total: z.ZodNumber;
472
+ }, "strip", z.ZodTypeAny, {
473
+ data: string;
474
+ listProperty: "traces";
475
+ rowCase: "camel";
476
+ total: number;
477
+ format: "toon";
478
+ }, {
479
+ data: string;
480
+ listProperty: "traces";
481
+ rowCase: "camel";
482
+ total: number;
483
+ format: "toon";
484
+ }>, z.ZodObject<{
485
+ listProperty: z.ZodLiteral<"traces">;
486
+ rowCase: z.ZodLiteral<"camel">;
487
+ } & {
488
+ traces: z.ZodArray<z.ZodObject<{
489
+ traceId: z.ZodString;
490
+ timestamp: z.ZodString;
491
+ requestedModel: z.ZodString;
492
+ actualModelRouted: z.ZodString;
493
+ enforcementAction: z.ZodString;
494
+ complianceScore: z.ZodNumber;
495
+ actualCostUsd: z.ZodNumber;
496
+ anomalyDetected: z.ZodNullable<z.ZodString>;
497
+ breakGlass: z.ZodOptional<z.ZodBoolean>;
498
+ breakGlassRequestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
499
+ }, "strip", z.ZodTypeAny, {
500
+ requestedModel: string;
501
+ actualModelRouted: string;
502
+ actualCostUsd: number;
503
+ complianceScore: number;
504
+ enforcementAction: string;
505
+ anomalyDetected: string | null;
506
+ traceId: string;
507
+ timestamp: string;
508
+ breakGlass?: boolean | undefined;
509
+ breakGlassRequestId?: string | null | undefined;
510
+ }, {
511
+ requestedModel: string;
512
+ actualModelRouted: string;
513
+ actualCostUsd: number;
514
+ complianceScore: number;
515
+ enforcementAction: string;
516
+ anomalyDetected: string | null;
517
+ traceId: string;
518
+ timestamp: string;
519
+ breakGlass?: boolean | undefined;
520
+ breakGlassRequestId?: string | null | undefined;
521
+ }>, "many">;
522
+ total: z.ZodNumber;
523
+ limit: z.ZodNumber;
524
+ offset: z.ZodNumber;
525
+ }, "strip", z.ZodTypeAny, {
526
+ traces: {
527
+ requestedModel: string;
528
+ actualModelRouted: string;
529
+ actualCostUsd: number;
530
+ complianceScore: number;
531
+ enforcementAction: string;
532
+ anomalyDetected: string | null;
533
+ traceId: string;
534
+ timestamp: string;
535
+ breakGlass?: boolean | undefined;
536
+ breakGlassRequestId?: string | null | undefined;
537
+ }[];
538
+ limit: number;
539
+ offset: number;
540
+ listProperty: "traces";
541
+ rowCase: "camel";
542
+ total: number;
543
+ }, {
544
+ traces: {
545
+ requestedModel: string;
546
+ actualModelRouted: string;
547
+ actualCostUsd: number;
548
+ complianceScore: number;
549
+ enforcementAction: string;
550
+ anomalyDetected: string | null;
551
+ traceId: string;
552
+ timestamp: string;
553
+ breakGlass?: boolean | undefined;
554
+ breakGlassRequestId?: string | null | undefined;
555
+ }[];
556
+ limit: number;
557
+ offset: number;
558
+ listProperty: "traces";
559
+ rowCase: "camel";
560
+ total: number;
561
+ }>]>;
562
+ export type TraceListResponse = z.infer<typeof TraceListResponse>;
563
+ /**
564
+ * `GET /api/v1/traces/:id` (`traceQueryService.ts` `getTraceById`). Every field
565
+ * is always sent; the ones marked optional are optional because `TraceDetail`
566
+ * declares them so.
567
+ */
568
+ export declare const TraceDetailResponse: z.ZodObject<{
569
+ traceId: z.ZodString;
570
+ sessionId: z.ZodString;
571
+ requestId: z.ZodString;
572
+ timestamp: z.ZodString;
573
+ sopEffectiveDate: z.ZodString;
574
+ requestedModel: z.ZodString;
575
+ actualModelRouted: z.ZodString;
576
+ routingTier: z.ZodString;
577
+ complexityScore: z.ZodNumber;
578
+ rawInputTokens: z.ZodNumber;
579
+ compressedInputTokens: z.ZodNumber;
580
+ outputTokens: z.ZodNumber;
581
+ rawCostUsd: z.ZodNumber;
582
+ actualCostUsd: z.ZodNumber;
583
+ savingsUsd: z.ZodNumber;
584
+ tokenUtility: z.ZodNullable<z.ZodString>;
585
+ tokenUtilityClassifiedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
586
+ tokenUtilityScore: z.ZodNullable<z.ZodNumber>;
587
+ complianceScore: z.ZodNumber;
588
+ enforcementAction: z.ZodString;
589
+ anomalyDetected: z.ZodNullable<z.ZodString>;
590
+ anomalyConfidenceScore: z.ZodNullable<z.ZodNumber>;
591
+ taxonomyMetadata: z.ZodUnknown;
592
+ rootCauseAttribution: z.ZodUnknown;
593
+ correctivePromptCard: z.ZodUnknown;
594
+ reasoningTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
595
+ cacheReadInputTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
596
+ cacheCreationInputTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
597
+ toolCallMetrics: z.ZodOptional<z.ZodUnknown>;
598
+ changeManifest: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
599
+ tool: z.ZodString;
600
+ op: z.ZodEnum<["write", "edit", "delete", "move", "execute", "read", "fetch", "unknown"]>;
601
+ target: z.ZodString;
602
+ target_kind: z.ZodEnum<["path", "url", "command", "opaque"]>;
603
+ risk: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
604
+ bytes: z.ZodOptional<z.ZodNumber>;
605
+ }, "strip", z.ZodTypeAny, {
606
+ tool: string;
607
+ target: string;
608
+ op: "unknown" | "read" | "write" | "edit" | "delete" | "move" | "execute" | "fetch";
609
+ target_kind: "path" | "url" | "command" | "opaque";
610
+ risk?: string[] | undefined;
611
+ bytes?: number | undefined;
612
+ }, {
613
+ tool: string;
614
+ target: string;
615
+ op: "unknown" | "read" | "write" | "edit" | "delete" | "move" | "execute" | "fetch";
616
+ target_kind: "path" | "url" | "command" | "opaque";
617
+ risk?: string[] | undefined;
618
+ bytes?: number | undefined;
619
+ }>, "many">>>;
620
+ responseIntegrity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
621
+ qualityFault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
622
+ routingShadowModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
623
+ upstreamAttempts: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
624
+ model: z.ZodString;
625
+ provider: z.ZodString;
626
+ outcome: z.ZodString;
627
+ status: z.ZodOptional<z.ZodNumber>;
628
+ latencyMs: z.ZodNumber;
629
+ backoffMs: z.ZodOptional<z.ZodNumber>;
630
+ serverDelay: z.ZodOptional<z.ZodBoolean>;
631
+ stopped: z.ZodOptional<z.ZodString>;
632
+ }, "strip", z.ZodTypeAny, {
633
+ model: string;
634
+ provider: string;
635
+ latencyMs: number;
636
+ outcome: string;
637
+ status?: number | undefined;
638
+ stopped?: string | undefined;
639
+ backoffMs?: number | undefined;
640
+ serverDelay?: boolean | undefined;
641
+ }, {
642
+ model: string;
643
+ provider: string;
644
+ latencyMs: number;
645
+ outcome: string;
646
+ status?: number | undefined;
647
+ stopped?: string | undefined;
648
+ backoffMs?: number | undefined;
649
+ serverDelay?: boolean | undefined;
650
+ }>, "many">>>;
651
+ upstreamFallback: z.ZodOptional<z.ZodNullable<z.ZodObject<{
652
+ fromModel: z.ZodString;
653
+ toModel: z.ZodString;
654
+ toProvider: z.ZodString;
655
+ cacheAffinityBroken: z.ZodOptional<z.ZodBoolean>;
656
+ }, "strip", z.ZodTypeAny, {
657
+ fromModel: string;
658
+ toModel: string;
659
+ toProvider: string;
660
+ cacheAffinityBroken?: boolean | undefined;
661
+ }, {
662
+ fromModel: string;
663
+ toModel: string;
664
+ toProvider: string;
665
+ cacheAffinityBroken?: boolean | undefined;
666
+ }>>>;
667
+ breakGlass: z.ZodOptional<z.ZodBoolean>;
668
+ breakGlassRequestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
669
+ steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
670
+ logId: z.ZodString;
671
+ toolName: z.ZodString;
672
+ toolArguments: z.ZodUnknown;
673
+ riskCategory: z.ZodNullable<z.ZodString>;
674
+ verdict: z.ZodString;
675
+ confidence: z.ZodNumber;
676
+ reason: z.ZodString;
677
+ loopDetected: z.ZodBoolean;
678
+ latencyMs: z.ZodNullable<z.ZodNumber>;
679
+ timestamp: z.ZodString;
680
+ }, "strip", z.ZodTypeAny, {
681
+ confidence: number;
682
+ reason: string;
683
+ verdict: string;
684
+ toolName: string;
685
+ riskCategory: string | null;
686
+ timestamp: string;
687
+ logId: string;
688
+ loopDetected: boolean;
689
+ latencyMs: number | null;
690
+ toolArguments?: unknown;
691
+ }, {
692
+ confidence: number;
693
+ reason: string;
694
+ verdict: string;
695
+ toolName: string;
696
+ riskCategory: string | null;
697
+ timestamp: string;
698
+ logId: string;
699
+ loopDetected: boolean;
700
+ latencyMs: number | null;
701
+ toolArguments?: unknown;
702
+ }>, "many">>;
703
+ findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
704
+ findingId: z.ZodString;
705
+ detectorId: z.ZodString;
706
+ anomalyKind: z.ZodString;
707
+ severity: z.ZodString;
708
+ disposition: z.ZodString;
709
+ confidence: z.ZodNumber;
710
+ reason: z.ZodString;
711
+ shadowed: z.ZodBoolean;
712
+ }, "strip", z.ZodTypeAny, {
713
+ confidence: number;
714
+ reason: string;
715
+ severity: string;
716
+ findingId: string;
717
+ detectorId: string;
718
+ anomalyKind: string;
719
+ disposition: string;
720
+ shadowed: boolean;
721
+ }, {
722
+ confidence: number;
723
+ reason: string;
724
+ severity: string;
725
+ findingId: string;
726
+ detectorId: string;
727
+ anomalyKind: string;
728
+ disposition: string;
729
+ shadowed: boolean;
730
+ }>, "many">>;
731
+ }, "strip", z.ZodTypeAny, {
732
+ sessionId: string;
733
+ requestId: string;
734
+ sopEffectiveDate: string;
735
+ requestedModel: string;
736
+ actualModelRouted: string;
737
+ routingTier: string;
738
+ complexityScore: number;
739
+ rawInputTokens: number;
740
+ compressedInputTokens: number;
741
+ outputTokens: number;
742
+ rawCostUsd: number;
743
+ actualCostUsd: number;
744
+ tokenUtility: string | null;
745
+ tokenUtilityScore: number | null;
746
+ complianceScore: number;
747
+ enforcementAction: string;
748
+ anomalyDetected: string | null;
749
+ anomalyConfidenceScore: number | null;
750
+ traceId: string;
751
+ timestamp: string;
752
+ savingsUsd: number;
753
+ taxonomyMetadata?: unknown;
754
+ rootCauseAttribution?: unknown;
755
+ correctivePromptCard?: unknown;
756
+ findings?: {
757
+ confidence: number;
758
+ reason: string;
759
+ severity: string;
760
+ findingId: string;
761
+ detectorId: string;
762
+ anomalyKind: string;
763
+ disposition: string;
764
+ shadowed: boolean;
765
+ }[] | undefined;
766
+ breakGlass?: boolean | undefined;
767
+ breakGlassRequestId?: string | null | undefined;
768
+ tokenUtilityClassifiedBy?: string | null | undefined;
769
+ reasoningTokens?: number | null | undefined;
770
+ cacheReadInputTokens?: number | null | undefined;
771
+ cacheCreationInputTokens?: number | null | undefined;
772
+ toolCallMetrics?: unknown;
773
+ changeManifest?: {
774
+ tool: string;
775
+ target: string;
776
+ op: "unknown" | "read" | "write" | "edit" | "delete" | "move" | "execute" | "fetch";
777
+ target_kind: "path" | "url" | "command" | "opaque";
778
+ risk?: string[] | undefined;
779
+ bytes?: number | undefined;
780
+ }[] | null | undefined;
781
+ responseIntegrity?: number | null | undefined;
782
+ qualityFault?: string | null | undefined;
783
+ routingShadowModel?: string | null | undefined;
784
+ upstreamAttempts?: {
785
+ model: string;
786
+ provider: string;
787
+ latencyMs: number;
788
+ outcome: string;
789
+ status?: number | undefined;
790
+ stopped?: string | undefined;
791
+ backoffMs?: number | undefined;
792
+ serverDelay?: boolean | undefined;
793
+ }[] | null | undefined;
794
+ upstreamFallback?: {
795
+ fromModel: string;
796
+ toModel: string;
797
+ toProvider: string;
798
+ cacheAffinityBroken?: boolean | undefined;
799
+ } | null | undefined;
800
+ steps?: {
801
+ confidence: number;
802
+ reason: string;
803
+ verdict: string;
804
+ toolName: string;
805
+ riskCategory: string | null;
806
+ timestamp: string;
807
+ logId: string;
808
+ loopDetected: boolean;
809
+ latencyMs: number | null;
810
+ toolArguments?: unknown;
811
+ }[] | undefined;
812
+ }, {
813
+ sessionId: string;
814
+ requestId: string;
815
+ sopEffectiveDate: string;
816
+ requestedModel: string;
817
+ actualModelRouted: string;
818
+ routingTier: string;
819
+ complexityScore: number;
820
+ rawInputTokens: number;
821
+ compressedInputTokens: number;
822
+ outputTokens: number;
823
+ rawCostUsd: number;
824
+ actualCostUsd: number;
825
+ tokenUtility: string | null;
826
+ tokenUtilityScore: number | null;
827
+ complianceScore: number;
828
+ enforcementAction: string;
829
+ anomalyDetected: string | null;
830
+ anomalyConfidenceScore: number | null;
831
+ traceId: string;
832
+ timestamp: string;
833
+ savingsUsd: number;
834
+ taxonomyMetadata?: unknown;
835
+ rootCauseAttribution?: unknown;
836
+ correctivePromptCard?: unknown;
837
+ findings?: {
838
+ confidence: number;
839
+ reason: string;
840
+ severity: string;
841
+ findingId: string;
842
+ detectorId: string;
843
+ anomalyKind: string;
844
+ disposition: string;
845
+ shadowed: boolean;
846
+ }[] | undefined;
847
+ breakGlass?: boolean | undefined;
848
+ breakGlassRequestId?: string | null | undefined;
849
+ tokenUtilityClassifiedBy?: string | null | undefined;
850
+ reasoningTokens?: number | null | undefined;
851
+ cacheReadInputTokens?: number | null | undefined;
852
+ cacheCreationInputTokens?: number | null | undefined;
853
+ toolCallMetrics?: unknown;
854
+ changeManifest?: {
855
+ tool: string;
856
+ target: string;
857
+ op: "unknown" | "read" | "write" | "edit" | "delete" | "move" | "execute" | "fetch";
858
+ target_kind: "path" | "url" | "command" | "opaque";
859
+ risk?: string[] | undefined;
860
+ bytes?: number | undefined;
861
+ }[] | null | undefined;
862
+ responseIntegrity?: number | null | undefined;
863
+ qualityFault?: string | null | undefined;
864
+ routingShadowModel?: string | null | undefined;
865
+ upstreamAttempts?: {
866
+ model: string;
867
+ provider: string;
868
+ latencyMs: number;
869
+ outcome: string;
870
+ status?: number | undefined;
871
+ stopped?: string | undefined;
872
+ backoffMs?: number | undefined;
873
+ serverDelay?: boolean | undefined;
874
+ }[] | null | undefined;
875
+ upstreamFallback?: {
876
+ fromModel: string;
877
+ toModel: string;
878
+ toProvider: string;
879
+ cacheAffinityBroken?: boolean | undefined;
880
+ } | null | undefined;
881
+ steps?: {
882
+ confidence: number;
883
+ reason: string;
884
+ verdict: string;
885
+ toolName: string;
886
+ riskCategory: string | null;
887
+ timestamp: string;
888
+ logId: string;
889
+ loopDetected: boolean;
890
+ latencyMs: number | null;
891
+ toolArguments?: unknown;
892
+ }[] | undefined;
893
+ }>;
894
+ export type TraceDetailResponse = z.infer<typeof TraceDetailResponse>;
895
+ /** One detector finding (`detector_findings`), snake_cased by the list route. */
896
+ export declare const FindingResponse: z.ZodObject<{
897
+ finding_id: z.ZodString;
898
+ trace_id: z.ZodString;
899
+ session_id: z.ZodNullable<z.ZodString>;
900
+ loop_run_id: z.ZodNullable<z.ZodString>;
901
+ detector_id: z.ZodString;
902
+ anomaly_kind: z.ZodString;
903
+ severity: z.ZodString;
904
+ disposition: z.ZodString;
905
+ confidence: z.ZodNumber;
906
+ reason: z.ZodString;
907
+ harness: z.ZodNullable<z.ZodString>;
908
+ shadowed: z.ZodBoolean;
909
+ suppressed: z.ZodBoolean;
910
+ outcome: z.ZodNullable<z.ZodEnum<["TRUE_POSITIVE", "FALSE_POSITIVE"]>>;
911
+ outcome_by: z.ZodNullable<z.ZodString>;
912
+ outcome_at: z.ZodNullable<z.ZodString>;
913
+ outcome_note: z.ZodNullable<z.ZodString>;
914
+ created_at: z.ZodString;
915
+ }, "strip", z.ZodTypeAny, {
916
+ confidence: number;
917
+ reason: string;
918
+ harness: string | null;
919
+ severity: string;
920
+ session_id: string | null;
921
+ created_at: string;
922
+ trace_id: string;
923
+ disposition: string;
924
+ shadowed: boolean;
925
+ outcome: "FALSE_POSITIVE" | "TRUE_POSITIVE" | null;
926
+ finding_id: string;
927
+ loop_run_id: string | null;
928
+ detector_id: string;
929
+ anomaly_kind: string;
930
+ suppressed: boolean;
931
+ outcome_by: string | null;
932
+ outcome_at: string | null;
933
+ outcome_note: string | null;
934
+ }, {
935
+ confidence: number;
936
+ reason: string;
937
+ harness: string | null;
938
+ severity: string;
939
+ session_id: string | null;
940
+ created_at: string;
941
+ trace_id: string;
942
+ disposition: string;
943
+ shadowed: boolean;
944
+ outcome: "FALSE_POSITIVE" | "TRUE_POSITIVE" | null;
945
+ finding_id: string;
946
+ loop_run_id: string | null;
947
+ detector_id: string;
948
+ anomaly_kind: string;
949
+ suppressed: boolean;
950
+ outcome_by: string | null;
951
+ outcome_at: string | null;
952
+ outcome_note: string | null;
953
+ }>;
954
+ export type FindingResponse = z.infer<typeof FindingResponse>;
955
+ /** `GET /api/v1/findings`. */
956
+ export declare const FindingListResponse: z.ZodObject<{
957
+ findings: z.ZodArray<z.ZodObject<{
958
+ finding_id: z.ZodString;
959
+ trace_id: z.ZodString;
960
+ session_id: z.ZodNullable<z.ZodString>;
961
+ loop_run_id: z.ZodNullable<z.ZodString>;
962
+ detector_id: z.ZodString;
963
+ anomaly_kind: z.ZodString;
964
+ severity: z.ZodString;
965
+ disposition: z.ZodString;
966
+ confidence: z.ZodNumber;
967
+ reason: z.ZodString;
968
+ harness: z.ZodNullable<z.ZodString>;
969
+ shadowed: z.ZodBoolean;
970
+ suppressed: z.ZodBoolean;
971
+ outcome: z.ZodNullable<z.ZodEnum<["TRUE_POSITIVE", "FALSE_POSITIVE"]>>;
972
+ outcome_by: z.ZodNullable<z.ZodString>;
973
+ outcome_at: z.ZodNullable<z.ZodString>;
974
+ outcome_note: z.ZodNullable<z.ZodString>;
975
+ created_at: z.ZodString;
976
+ }, "strip", z.ZodTypeAny, {
977
+ confidence: number;
978
+ reason: string;
979
+ harness: string | null;
980
+ severity: string;
981
+ session_id: string | null;
982
+ created_at: string;
983
+ trace_id: string;
984
+ disposition: string;
985
+ shadowed: boolean;
986
+ outcome: "FALSE_POSITIVE" | "TRUE_POSITIVE" | null;
987
+ finding_id: string;
988
+ loop_run_id: string | null;
989
+ detector_id: string;
990
+ anomaly_kind: string;
991
+ suppressed: boolean;
992
+ outcome_by: string | null;
993
+ outcome_at: string | null;
994
+ outcome_note: string | null;
995
+ }, {
996
+ confidence: number;
997
+ reason: string;
998
+ harness: string | null;
999
+ severity: string;
1000
+ session_id: string | null;
1001
+ created_at: string;
1002
+ trace_id: string;
1003
+ disposition: string;
1004
+ shadowed: boolean;
1005
+ outcome: "FALSE_POSITIVE" | "TRUE_POSITIVE" | null;
1006
+ finding_id: string;
1007
+ loop_run_id: string | null;
1008
+ detector_id: string;
1009
+ anomaly_kind: string;
1010
+ suppressed: boolean;
1011
+ outcome_by: string | null;
1012
+ outcome_at: string | null;
1013
+ outcome_note: string | null;
1014
+ }>, "many">;
1015
+ }, "strip", z.ZodTypeAny, {
1016
+ findings: {
1017
+ confidence: number;
1018
+ reason: string;
1019
+ harness: string | null;
1020
+ severity: string;
1021
+ session_id: string | null;
1022
+ created_at: string;
1023
+ trace_id: string;
1024
+ disposition: string;
1025
+ shadowed: boolean;
1026
+ outcome: "FALSE_POSITIVE" | "TRUE_POSITIVE" | null;
1027
+ finding_id: string;
1028
+ loop_run_id: string | null;
1029
+ detector_id: string;
1030
+ anomaly_kind: string;
1031
+ suppressed: boolean;
1032
+ outcome_by: string | null;
1033
+ outcome_at: string | null;
1034
+ outcome_note: string | null;
1035
+ }[];
1036
+ }, {
1037
+ findings: {
1038
+ confidence: number;
1039
+ reason: string;
1040
+ harness: string | null;
1041
+ severity: string;
1042
+ session_id: string | null;
1043
+ created_at: string;
1044
+ trace_id: string;
1045
+ disposition: string;
1046
+ shadowed: boolean;
1047
+ outcome: "FALSE_POSITIVE" | "TRUE_POSITIVE" | null;
1048
+ finding_id: string;
1049
+ loop_run_id: string | null;
1050
+ detector_id: string;
1051
+ anomaly_kind: string;
1052
+ suppressed: boolean;
1053
+ outcome_by: string | null;
1054
+ outcome_at: string | null;
1055
+ outcome_note: string | null;
1056
+ }[];
1057
+ }>;
1058
+ export type FindingListResponse = z.infer<typeof FindingListResponse>;
1059
+ /** `POST /api/v1/findings/:findingId/adjudicate`. */
1060
+ export declare const FindingAdjudicationResponse: z.ZodObject<{
1061
+ finding_id: z.ZodString;
1062
+ outcome: z.ZodEnum<["TRUE_POSITIVE", "FALSE_POSITIVE"]>;
1063
+ }, "strip", z.ZodTypeAny, {
1064
+ outcome: "FALSE_POSITIVE" | "TRUE_POSITIVE";
1065
+ finding_id: string;
1066
+ }, {
1067
+ outcome: "FALSE_POSITIVE" | "TRUE_POSITIVE";
1068
+ finding_id: string;
1069
+ }>;
1070
+ export type FindingAdjudicationResponse = z.infer<typeof FindingAdjudicationResponse>;
1071
+ /** `GET /api/v1/findings/stats`: precision per detector, over adjudicated findings. */
1072
+ export declare const FindingStatsResponse: z.ZodObject<{
1073
+ detectors: z.ZodArray<z.ZodObject<{
1074
+ detector_id: z.ZodString;
1075
+ anomaly_kind: z.ZodString;
1076
+ shadowed: z.ZodBoolean;
1077
+ total_findings: z.ZodNumber;
1078
+ adjudicated: z.ZodNumber;
1079
+ false_positives: z.ZodNumber;
1080
+ false_positive_rate: z.ZodNullable<z.ZodNumber>;
1081
+ }, "strip", z.ZodTypeAny, {
1082
+ adjudicated: number;
1083
+ shadowed: boolean;
1084
+ detector_id: string;
1085
+ anomaly_kind: string;
1086
+ total_findings: number;
1087
+ false_positives: number;
1088
+ false_positive_rate: number | null;
1089
+ }, {
1090
+ adjudicated: number;
1091
+ shadowed: boolean;
1092
+ detector_id: string;
1093
+ anomaly_kind: string;
1094
+ total_findings: number;
1095
+ false_positives: number;
1096
+ false_positive_rate: number | null;
1097
+ }>, "many">;
1098
+ caveats: z.ZodArray<z.ZodString, "many">;
1099
+ }, "strip", z.ZodTypeAny, {
1100
+ detectors: {
1101
+ adjudicated: number;
1102
+ shadowed: boolean;
1103
+ detector_id: string;
1104
+ anomaly_kind: string;
1105
+ total_findings: number;
1106
+ false_positives: number;
1107
+ false_positive_rate: number | null;
1108
+ }[];
1109
+ caveats: string[];
1110
+ }, {
1111
+ detectors: {
1112
+ adjudicated: number;
1113
+ shadowed: boolean;
1114
+ detector_id: string;
1115
+ anomaly_kind: string;
1116
+ total_findings: number;
1117
+ false_positives: number;
1118
+ false_positive_rate: number | null;
1119
+ }[];
1120
+ caveats: string[];
1121
+ }>;
1122
+ export type FindingStatsResponse = z.infer<typeof FindingStatsResponse>;
1123
+ /** `GET /api/v1/findings/response-echo/report` (`responseInjectionCorpusService.ts`). */
1124
+ export declare const ResponseEchoReportResponse: z.ZodObject<{
1125
+ window: z.ZodObject<{
1126
+ since: z.ZodString;
1127
+ until: z.ZodString;
1128
+ }, "strip", z.ZodTypeAny, {
1129
+ since: string;
1130
+ until: string;
1131
+ }, {
1132
+ since: string;
1133
+ until: string;
1134
+ }>;
1135
+ tracesIngested: z.ZodNumber;
1136
+ refusal: z.ZodNullable<z.ZodString>;
1137
+ patterns: z.ZodArray<z.ZodObject<{
1138
+ pattern: z.ZodEnum<["override-instructions", "reveal-system-prompt", "role-reassignment", "guardrail-bypass", "instruction-boundary-forgery"]>;
1139
+ findings: z.ZodNumber;
1140
+ adjudicated: z.ZodNumber;
1141
+ truePositives: z.ZodNumber;
1142
+ falsePositives: z.ZodNumber;
1143
+ falsePositiveRate: z.ZodNullable<z.ZodNumber>;
1144
+ refusal: z.ZodNullable<z.ZodString>;
1145
+ }, "strip", z.ZodTypeAny, {
1146
+ findings: number;
1147
+ pattern: "override-instructions" | "reveal-system-prompt" | "role-reassignment" | "guardrail-bypass" | "instruction-boundary-forgery";
1148
+ adjudicated: number;
1149
+ falsePositives: number;
1150
+ falsePositiveRate: number | null;
1151
+ refusal: string | null;
1152
+ truePositives: number;
1153
+ }, {
1154
+ findings: number;
1155
+ pattern: "override-instructions" | "reveal-system-prompt" | "role-reassignment" | "guardrail-bypass" | "instruction-boundary-forgery";
1156
+ adjudicated: number;
1157
+ falsePositives: number;
1158
+ falsePositiveRate: number | null;
1159
+ refusal: string | null;
1160
+ truePositives: number;
1161
+ }>, "many">;
1162
+ }, "strip", z.ZodTypeAny, {
1163
+ window: {
1164
+ since: string;
1165
+ until: string;
1166
+ };
1167
+ tracesIngested: number;
1168
+ refusal: string | null;
1169
+ patterns: {
1170
+ findings: number;
1171
+ pattern: "override-instructions" | "reveal-system-prompt" | "role-reassignment" | "guardrail-bypass" | "instruction-boundary-forgery";
1172
+ adjudicated: number;
1173
+ falsePositives: number;
1174
+ falsePositiveRate: number | null;
1175
+ refusal: string | null;
1176
+ truePositives: number;
1177
+ }[];
1178
+ }, {
1179
+ window: {
1180
+ since: string;
1181
+ until: string;
1182
+ };
1183
+ tracesIngested: number;
1184
+ refusal: string | null;
1185
+ patterns: {
1186
+ findings: number;
1187
+ pattern: "override-instructions" | "reveal-system-prompt" | "role-reassignment" | "guardrail-bypass" | "instruction-boundary-forgery";
1188
+ adjudicated: number;
1189
+ falsePositives: number;
1190
+ falsePositiveRate: number | null;
1191
+ refusal: string | null;
1192
+ truePositives: number;
1193
+ }[];
1194
+ }>;
1195
+ export type ResponseEchoReportResponse = z.infer<typeof ResponseEchoReportResponse>;
1196
+ /** A sealed Merkle root as `GET /api/v1/integrity/roots` selects it (raw SQL, so snake_case and Postgres timestamp text). */
1197
+ export declare const IntegrityRootSummaryResponse: z.ZodObject<{
1198
+ root_id: z.ZodString;
1199
+ loop_run_id: z.ZodNullable<z.ZodString>;
1200
+ leaf_schema_version: z.ZodNumber;
1201
+ merkle_root: z.ZodString;
1202
+ leaf_count: z.ZodNumber;
1203
+ first_trace_at: z.ZodString;
1204
+ last_trace_at: z.ZodString;
1205
+ signature_alg: z.ZodNullable<z.ZodString>;
1206
+ signing_key_id: z.ZodNullable<z.ZodString>;
1207
+ sealed_at: z.ZodString;
1208
+ }, "strip", z.ZodTypeAny, {
1209
+ loop_run_id: string | null;
1210
+ root_id: string;
1211
+ leaf_schema_version: number;
1212
+ merkle_root: string;
1213
+ leaf_count: number;
1214
+ first_trace_at: string;
1215
+ last_trace_at: string;
1216
+ signature_alg: string | null;
1217
+ signing_key_id: string | null;
1218
+ sealed_at: string;
1219
+ }, {
1220
+ loop_run_id: string | null;
1221
+ root_id: string;
1222
+ leaf_schema_version: number;
1223
+ merkle_root: string;
1224
+ leaf_count: number;
1225
+ first_trace_at: string;
1226
+ last_trace_at: string;
1227
+ signature_alg: string | null;
1228
+ signing_key_id: string | null;
1229
+ sealed_at: string;
1230
+ }>;
1231
+ export type IntegrityRootSummaryResponse = z.infer<typeof IntegrityRootSummaryResponse>;
1232
+ /** `GET /api/v1/integrity/roots`: the workspace's sealed roots, newest first (at most 50). */
1233
+ export declare const IntegrityRootListResponse: z.ZodObject<{
1234
+ listProperty: z.ZodLiteral<"data">;
1235
+ rowCase: z.ZodLiteral<"snake">;
1236
+ } & {
1237
+ ok: z.ZodLiteral<true>;
1238
+ data: z.ZodArray<z.ZodObject<{
1239
+ root_id: z.ZodString;
1240
+ loop_run_id: z.ZodNullable<z.ZodString>;
1241
+ leaf_schema_version: z.ZodNumber;
1242
+ merkle_root: z.ZodString;
1243
+ leaf_count: z.ZodNumber;
1244
+ first_trace_at: z.ZodString;
1245
+ last_trace_at: z.ZodString;
1246
+ signature_alg: z.ZodNullable<z.ZodString>;
1247
+ signing_key_id: z.ZodNullable<z.ZodString>;
1248
+ sealed_at: z.ZodString;
1249
+ }, "strip", z.ZodTypeAny, {
1250
+ loop_run_id: string | null;
1251
+ root_id: string;
1252
+ leaf_schema_version: number;
1253
+ merkle_root: string;
1254
+ leaf_count: number;
1255
+ first_trace_at: string;
1256
+ last_trace_at: string;
1257
+ signature_alg: string | null;
1258
+ signing_key_id: string | null;
1259
+ sealed_at: string;
1260
+ }, {
1261
+ loop_run_id: string | null;
1262
+ root_id: string;
1263
+ leaf_schema_version: number;
1264
+ merkle_root: string;
1265
+ leaf_count: number;
1266
+ first_trace_at: string;
1267
+ last_trace_at: string;
1268
+ signature_alg: string | null;
1269
+ signing_key_id: string | null;
1270
+ sealed_at: string;
1271
+ }>, "many">;
1272
+ leafSchemaVersion: z.ZodNumber;
1273
+ }, "strip", z.ZodTypeAny, {
1274
+ ok: true;
1275
+ data: {
1276
+ loop_run_id: string | null;
1277
+ root_id: string;
1278
+ leaf_schema_version: number;
1279
+ merkle_root: string;
1280
+ leaf_count: number;
1281
+ first_trace_at: string;
1282
+ last_trace_at: string;
1283
+ signature_alg: string | null;
1284
+ signing_key_id: string | null;
1285
+ sealed_at: string;
1286
+ }[];
1287
+ listProperty: "data";
1288
+ rowCase: "snake";
1289
+ leafSchemaVersion: number;
1290
+ }, {
1291
+ ok: true;
1292
+ data: {
1293
+ loop_run_id: string | null;
1294
+ root_id: string;
1295
+ leaf_schema_version: number;
1296
+ merkle_root: string;
1297
+ leaf_count: number;
1298
+ first_trace_at: string;
1299
+ last_trace_at: string;
1300
+ signature_alg: string | null;
1301
+ signing_key_id: string | null;
1302
+ sealed_at: string;
1303
+ }[];
1304
+ listProperty: "data";
1305
+ rowCase: "snake";
1306
+ leafSchemaVersion: number;
1307
+ }>;
1308
+ export type IntegrityRootListResponse = z.infer<typeof IntegrityRootListResponse>;
1309
+ /** Every column of a `trace_merkle_roots` row (`SELECT *`). */
1310
+ export declare const IntegrityRootRowResponse: z.ZodObject<{
1311
+ root_id: z.ZodString;
1312
+ loop_run_id: z.ZodNullable<z.ZodString>;
1313
+ leaf_schema_version: z.ZodNumber;
1314
+ merkle_root: z.ZodString;
1315
+ leaf_count: z.ZodNumber;
1316
+ first_trace_at: z.ZodString;
1317
+ last_trace_at: z.ZodString;
1318
+ signature_alg: z.ZodNullable<z.ZodString>;
1319
+ signing_key_id: z.ZodNullable<z.ZodString>;
1320
+ sealed_at: z.ZodString;
1321
+ } & {
1322
+ workspace_id: z.ZodString;
1323
+ sample_preimage: z.ZodString;
1324
+ signature: z.ZodNullable<z.ZodString>;
1325
+ previous_root: z.ZodNullable<z.ZodString>;
1326
+ signing_preimage_version: z.ZodNumber;
1327
+ }, "strip", z.ZodTypeAny, {
1328
+ workspace_id: string;
1329
+ loop_run_id: string | null;
1330
+ root_id: string;
1331
+ leaf_schema_version: number;
1332
+ merkle_root: string;
1333
+ leaf_count: number;
1334
+ first_trace_at: string;
1335
+ last_trace_at: string;
1336
+ signature_alg: string | null;
1337
+ signing_key_id: string | null;
1338
+ sealed_at: string;
1339
+ sample_preimage: string;
1340
+ signature: string | null;
1341
+ previous_root: string | null;
1342
+ signing_preimage_version: number;
1343
+ }, {
1344
+ workspace_id: string;
1345
+ loop_run_id: string | null;
1346
+ root_id: string;
1347
+ leaf_schema_version: number;
1348
+ merkle_root: string;
1349
+ leaf_count: number;
1350
+ first_trace_at: string;
1351
+ last_trace_at: string;
1352
+ signature_alg: string | null;
1353
+ signing_key_id: string | null;
1354
+ sealed_at: string;
1355
+ sample_preimage: string;
1356
+ signature: string | null;
1357
+ previous_root: string | null;
1358
+ signing_preimage_version: number;
1359
+ }>;
1360
+ export type IntegrityRootRowResponse = z.infer<typeof IntegrityRootRowResponse>;
1361
+ /** One leaf of a sealed root. */
1362
+ export declare const IntegrityLeafResponse: z.ZodObject<{
1363
+ trace_id: z.ZodString;
1364
+ leaf_index: z.ZodNumber;
1365
+ leaf_hash: z.ZodString;
1366
+ }, "strip", z.ZodTypeAny, {
1367
+ trace_id: string;
1368
+ leaf_index: number;
1369
+ leaf_hash: string;
1370
+ }, {
1371
+ trace_id: string;
1372
+ leaf_index: number;
1373
+ leaf_hash: string;
1374
+ }>;
1375
+ export type IntegrityLeafResponse = z.infer<typeof IntegrityLeafResponse>;
1376
+ /** `GET /api/v1/integrity/roots/:rootId`: the root and the leaves it covers, in order. */
1377
+ export declare const IntegrityRootDetailResponse: z.ZodObject<{
1378
+ listProperty: z.ZodLiteral<"leaves">;
1379
+ rowCase: z.ZodLiteral<"snake">;
1380
+ } & {
1381
+ ok: z.ZodLiteral<true>;
1382
+ root: z.ZodObject<{
1383
+ root_id: z.ZodString;
1384
+ loop_run_id: z.ZodNullable<z.ZodString>;
1385
+ leaf_schema_version: z.ZodNumber;
1386
+ merkle_root: z.ZodString;
1387
+ leaf_count: z.ZodNumber;
1388
+ first_trace_at: z.ZodString;
1389
+ last_trace_at: z.ZodString;
1390
+ signature_alg: z.ZodNullable<z.ZodString>;
1391
+ signing_key_id: z.ZodNullable<z.ZodString>;
1392
+ sealed_at: z.ZodString;
1393
+ } & {
1394
+ workspace_id: z.ZodString;
1395
+ sample_preimage: z.ZodString;
1396
+ signature: z.ZodNullable<z.ZodString>;
1397
+ previous_root: z.ZodNullable<z.ZodString>;
1398
+ signing_preimage_version: z.ZodNumber;
1399
+ }, "strip", z.ZodTypeAny, {
1400
+ workspace_id: string;
1401
+ loop_run_id: string | null;
1402
+ root_id: string;
1403
+ leaf_schema_version: number;
1404
+ merkle_root: string;
1405
+ leaf_count: number;
1406
+ first_trace_at: string;
1407
+ last_trace_at: string;
1408
+ signature_alg: string | null;
1409
+ signing_key_id: string | null;
1410
+ sealed_at: string;
1411
+ sample_preimage: string;
1412
+ signature: string | null;
1413
+ previous_root: string | null;
1414
+ signing_preimage_version: number;
1415
+ }, {
1416
+ workspace_id: string;
1417
+ loop_run_id: string | null;
1418
+ root_id: string;
1419
+ leaf_schema_version: number;
1420
+ merkle_root: string;
1421
+ leaf_count: number;
1422
+ first_trace_at: string;
1423
+ last_trace_at: string;
1424
+ signature_alg: string | null;
1425
+ signing_key_id: string | null;
1426
+ sealed_at: string;
1427
+ sample_preimage: string;
1428
+ signature: string | null;
1429
+ previous_root: string | null;
1430
+ signing_preimage_version: number;
1431
+ }>;
1432
+ leaves: z.ZodArray<z.ZodObject<{
1433
+ trace_id: z.ZodString;
1434
+ leaf_index: z.ZodNumber;
1435
+ leaf_hash: z.ZodString;
1436
+ }, "strip", z.ZodTypeAny, {
1437
+ trace_id: string;
1438
+ leaf_index: number;
1439
+ leaf_hash: string;
1440
+ }, {
1441
+ trace_id: string;
1442
+ leaf_index: number;
1443
+ leaf_hash: string;
1444
+ }>, "many">;
1445
+ }, "strip", z.ZodTypeAny, {
1446
+ ok: true;
1447
+ listProperty: "leaves";
1448
+ rowCase: "snake";
1449
+ leaves: {
1450
+ trace_id: string;
1451
+ leaf_index: number;
1452
+ leaf_hash: string;
1453
+ }[];
1454
+ root: {
1455
+ workspace_id: string;
1456
+ loop_run_id: string | null;
1457
+ root_id: string;
1458
+ leaf_schema_version: number;
1459
+ merkle_root: string;
1460
+ leaf_count: number;
1461
+ first_trace_at: string;
1462
+ last_trace_at: string;
1463
+ signature_alg: string | null;
1464
+ signing_key_id: string | null;
1465
+ sealed_at: string;
1466
+ sample_preimage: string;
1467
+ signature: string | null;
1468
+ previous_root: string | null;
1469
+ signing_preimage_version: number;
1470
+ };
1471
+ }, {
1472
+ ok: true;
1473
+ listProperty: "leaves";
1474
+ rowCase: "snake";
1475
+ leaves: {
1476
+ trace_id: string;
1477
+ leaf_index: number;
1478
+ leaf_hash: string;
1479
+ }[];
1480
+ root: {
1481
+ workspace_id: string;
1482
+ loop_run_id: string | null;
1483
+ root_id: string;
1484
+ leaf_schema_version: number;
1485
+ merkle_root: string;
1486
+ leaf_count: number;
1487
+ first_trace_at: string;
1488
+ last_trace_at: string;
1489
+ signature_alg: string | null;
1490
+ signing_key_id: string | null;
1491
+ sealed_at: string;
1492
+ sample_preimage: string;
1493
+ signature: string | null;
1494
+ previous_root: string | null;
1495
+ signing_preimage_version: number;
1496
+ };
1497
+ }>;
1498
+ export type IntegrityRootDetailResponse = z.infer<typeof IntegrityRootDetailResponse>;
1499
+ /** `POST /api/v1/integrity/roots/:rootId/recompute` (`traceRootSweep.ts` `recomputeRoot`). A mismatch is an answer, so every verdict is a 200. */
1500
+ export declare const IntegrityRecomputeResponse: z.ZodObject<{
1501
+ ok: z.ZodLiteral<true>;
1502
+ verdict: z.ZodEnum<["match", "mismatch", "missing_traces"]>;
1503
+ storedRoot: z.ZodString;
1504
+ recomputedRoot: z.ZodNullable<z.ZodString>;
1505
+ changedTraceIds: z.ZodArray<z.ZodString, "many">;
1506
+ missingTraceIds: z.ZodArray<z.ZodString, "many">;
1507
+ retentionExpired: z.ZodBoolean;
1508
+ }, "strip", z.ZodTypeAny, {
1509
+ ok: true;
1510
+ verdict: "match" | "mismatch" | "missing_traces";
1511
+ storedRoot: string;
1512
+ recomputedRoot: string | null;
1513
+ changedTraceIds: string[];
1514
+ missingTraceIds: string[];
1515
+ retentionExpired: boolean;
1516
+ }, {
1517
+ ok: true;
1518
+ verdict: "match" | "mismatch" | "missing_traces";
1519
+ storedRoot: string;
1520
+ recomputedRoot: string | null;
1521
+ changedTraceIds: string[];
1522
+ missingTraceIds: string[];
1523
+ retentionExpired: boolean;
1524
+ }>;
1525
+ export type IntegrityRecomputeResponse = z.infer<typeof IntegrityRecomputeResponse>;
1526
+ /**
1527
+ * `GET /api/v1/integrity/chain` (`traceRootSweep.ts` `verifyRootChain`). A
1528
+ * break answers 409 with this same body (`ok: false`, `breaks` filled); a 200
1529
+ * never carries a break.
1530
+ */
1531
+ export declare const IntegrityChainResponse: z.ZodObject<{
1532
+ ok: z.ZodBoolean;
1533
+ workspaceId: z.ZodString;
1534
+ rootsWalked: z.ZodNumber;
1535
+ rootsNotWalked: z.ZodNumber;
1536
+ unchainedRootIds: z.ZodArray<z.ZodString, "many">;
1537
+ breaks: z.ZodArray<z.ZodObject<{
1538
+ rootId: z.ZodString;
1539
+ namedPrevious: z.ZodString;
1540
+ precedingRootId: z.ZodString;
1541
+ precedingMerkleRoot: z.ZodString;
1542
+ }, "strip", z.ZodTypeAny, {
1543
+ rootId: string;
1544
+ namedPrevious: string;
1545
+ precedingRootId: string;
1546
+ precedingMerkleRoot: string;
1547
+ }, {
1548
+ rootId: string;
1549
+ namedPrevious: string;
1550
+ precedingRootId: string;
1551
+ precedingMerkleRoot: string;
1552
+ }>, "many">;
1553
+ intact: z.ZodBoolean;
1554
+ }, "strip", z.ZodTypeAny, {
1555
+ workspaceId: string;
1556
+ ok: boolean;
1557
+ rootsWalked: number;
1558
+ rootsNotWalked: number;
1559
+ unchainedRootIds: string[];
1560
+ breaks: {
1561
+ rootId: string;
1562
+ namedPrevious: string;
1563
+ precedingRootId: string;
1564
+ precedingMerkleRoot: string;
1565
+ }[];
1566
+ intact: boolean;
1567
+ }, {
1568
+ workspaceId: string;
1569
+ ok: boolean;
1570
+ rootsWalked: number;
1571
+ rootsNotWalked: number;
1572
+ unchainedRootIds: string[];
1573
+ breaks: {
1574
+ rootId: string;
1575
+ namedPrevious: string;
1576
+ precedingRootId: string;
1577
+ precedingMerkleRoot: string;
1578
+ }[];
1579
+ intact: boolean;
1580
+ }>;
1581
+ export type IntegrityChainResponse = z.infer<typeof IntegrityChainResponse>;
1582
+ /**
1583
+ * `GET /api/v1/integrity/config-chain` (`harnessConfigService.ts`
1584
+ * `verifyConfigChain`). A break or an edited body answers 409 with this same
1585
+ * body; a 200 never carries either.
1586
+ */
1587
+ export declare const IntegrityConfigChainResponse: z.ZodObject<{
1588
+ ok: z.ZodBoolean;
1589
+ workspaceId: z.ZodString;
1590
+ harnessType: z.ZodNullable<z.ZodString>;
1591
+ snapshotsWalked: z.ZodNumber;
1592
+ snapshotsNotWalked: z.ZodNumber;
1593
+ unchainedSnapshotIds: z.ZodArray<z.ZodString, "many">;
1594
+ breaks: z.ZodArray<z.ZodObject<{
1595
+ snapshotId: z.ZodString;
1596
+ harnessType: z.ZodString;
1597
+ filePath: z.ZodString;
1598
+ namedPrevious: z.ZodString;
1599
+ precedingSnapshotId: z.ZodString;
1600
+ precedingContentHash: z.ZodString;
1601
+ }, "strip", z.ZodTypeAny, {
1602
+ harnessType: string;
1603
+ filePath: string;
1604
+ namedPrevious: string;
1605
+ snapshotId: string;
1606
+ precedingSnapshotId: string;
1607
+ precedingContentHash: string;
1608
+ }, {
1609
+ harnessType: string;
1610
+ filePath: string;
1611
+ namedPrevious: string;
1612
+ snapshotId: string;
1613
+ precedingSnapshotId: string;
1614
+ precedingContentHash: string;
1615
+ }>, "many">;
1616
+ contentMismatches: z.ZodArray<z.ZodObject<{
1617
+ snapshotId: z.ZodString;
1618
+ harnessType: z.ZodString;
1619
+ filePath: z.ZodString;
1620
+ storedHash: z.ZodString;
1621
+ recomputedHash: z.ZodString;
1622
+ }, "strip", z.ZodTypeAny, {
1623
+ harnessType: string;
1624
+ filePath: string;
1625
+ snapshotId: string;
1626
+ storedHash: string;
1627
+ recomputedHash: string;
1628
+ }, {
1629
+ harnessType: string;
1630
+ filePath: string;
1631
+ snapshotId: string;
1632
+ storedHash: string;
1633
+ recomputedHash: string;
1634
+ }>, "many">;
1635
+ snapshotsWithoutContent: z.ZodNumber;
1636
+ intact: z.ZodBoolean;
1637
+ }, "strip", z.ZodTypeAny, {
1638
+ workspaceId: string;
1639
+ harnessType: string | null;
1640
+ ok: boolean;
1641
+ breaks: {
1642
+ harnessType: string;
1643
+ filePath: string;
1644
+ namedPrevious: string;
1645
+ snapshotId: string;
1646
+ precedingSnapshotId: string;
1647
+ precedingContentHash: string;
1648
+ }[];
1649
+ intact: boolean;
1650
+ snapshotsWalked: number;
1651
+ snapshotsNotWalked: number;
1652
+ unchainedSnapshotIds: string[];
1653
+ contentMismatches: {
1654
+ harnessType: string;
1655
+ filePath: string;
1656
+ snapshotId: string;
1657
+ storedHash: string;
1658
+ recomputedHash: string;
1659
+ }[];
1660
+ snapshotsWithoutContent: number;
1661
+ }, {
1662
+ workspaceId: string;
1663
+ harnessType: string | null;
1664
+ ok: boolean;
1665
+ breaks: {
1666
+ harnessType: string;
1667
+ filePath: string;
1668
+ namedPrevious: string;
1669
+ snapshotId: string;
1670
+ precedingSnapshotId: string;
1671
+ precedingContentHash: string;
1672
+ }[];
1673
+ intact: boolean;
1674
+ snapshotsWalked: number;
1675
+ snapshotsNotWalked: number;
1676
+ unchainedSnapshotIds: string[];
1677
+ contentMismatches: {
1678
+ harnessType: string;
1679
+ filePath: string;
1680
+ snapshotId: string;
1681
+ storedHash: string;
1682
+ recomputedHash: string;
1683
+ }[];
1684
+ snapshotsWithoutContent: number;
1685
+ }>;
1686
+ export type IntegrityConfigChainResponse = z.infer<typeof IntegrityConfigChainResponse>;
1687
+ /** `GET /api/v1/inventory/summary` (`devInventoryService.ts` `summarize`). */
1688
+ export declare const InventorySummaryResponse: z.ZodObject<{
1689
+ data: z.ZodObject<{
1690
+ devices: z.ZodNumber;
1691
+ staleDevices: z.ZodNumber;
1692
+ harnesses: z.ZodNumber;
1693
+ governedHarnesses: z.ZodNumber;
1694
+ governedPercent: z.ZodNullable<z.ZodNumber>;
1695
+ ungovernedHarnesses: z.ZodNumber;
1696
+ staleGates: z.ZodNumber;
1697
+ unverifiedHarnesses: z.ZodNumber;
1698
+ mcpServers: z.ZodNumber;
1699
+ ungovernedMcpServers: z.ZodNumber;
1700
+ skills: z.ZodNumber;
1701
+ }, "strip", z.ZodTypeAny, {
1702
+ harnesses: number;
1703
+ devices: number;
1704
+ staleDevices: number;
1705
+ governedHarnesses: number;
1706
+ governedPercent: number | null;
1707
+ ungovernedHarnesses: number;
1708
+ staleGates: number;
1709
+ unverifiedHarnesses: number;
1710
+ mcpServers: number;
1711
+ ungovernedMcpServers: number;
1712
+ skills: number;
1713
+ }, {
1714
+ harnesses: number;
1715
+ devices: number;
1716
+ staleDevices: number;
1717
+ governedHarnesses: number;
1718
+ governedPercent: number | null;
1719
+ ungovernedHarnesses: number;
1720
+ staleGates: number;
1721
+ unverifiedHarnesses: number;
1722
+ mcpServers: number;
1723
+ ungovernedMcpServers: number;
1724
+ skills: number;
1725
+ }>;
1726
+ }, "strip", z.ZodTypeAny, {
1727
+ data: {
1728
+ harnesses: number;
1729
+ devices: number;
1730
+ staleDevices: number;
1731
+ governedHarnesses: number;
1732
+ governedPercent: number | null;
1733
+ ungovernedHarnesses: number;
1734
+ staleGates: number;
1735
+ unverifiedHarnesses: number;
1736
+ mcpServers: number;
1737
+ ungovernedMcpServers: number;
1738
+ skills: number;
1739
+ };
1740
+ }, {
1741
+ data: {
1742
+ harnesses: number;
1743
+ devices: number;
1744
+ staleDevices: number;
1745
+ governedHarnesses: number;
1746
+ governedPercent: number | null;
1747
+ ungovernedHarnesses: number;
1748
+ staleGates: number;
1749
+ unverifiedHarnesses: number;
1750
+ mcpServers: number;
1751
+ ungovernedMcpServers: number;
1752
+ skills: number;
1753
+ };
1754
+ }>;
1755
+ export type InventorySummaryResponse = z.infer<typeof InventorySummaryResponse>;
1756
+ /** One machine (`devInventoryService.ts` `InventoryDeviceRow`). */
1757
+ export declare const InventoryDeviceResponse: z.ZodObject<{
1758
+ deviceId: z.ZodString;
1759
+ hostname: z.ZodString;
1760
+ platform: z.ZodString;
1761
+ cliVersion: z.ZodNullable<z.ZodString>;
1762
+ reportedBy: z.ZodNullable<z.ZodString>;
1763
+ workspace: z.ZodNullable<z.ZodString>;
1764
+ guardProbes: z.ZodNullable<z.ZodObject<{
1765
+ total: z.ZodNumber;
1766
+ failed: z.ZodNumber;
1767
+ ranAt: z.ZodNumber;
1768
+ }, "strip", z.ZodTypeAny, {
1769
+ failed: number;
1770
+ total: number;
1771
+ ranAt: number;
1772
+ }, {
1773
+ failed: number;
1774
+ total: number;
1775
+ ranAt: number;
1776
+ }>>;
1777
+ firstSeenAt: z.ZodString;
1778
+ lastSeenAt: z.ZodString;
1779
+ stale: z.ZodBoolean;
1780
+ disconnectedAt: z.ZodNullable<z.ZodString>;
1781
+ harnesses: z.ZodNumber;
1782
+ ungovernedHarnesses: z.ZodNumber;
1783
+ staleGates: z.ZodNumber;
1784
+ mcpServers: z.ZodNumber;
1785
+ ungovernedMcpServers: z.ZodNumber;
1786
+ skills: z.ZodNumber;
1787
+ }, "strip", z.ZodTypeAny, {
1788
+ workspace: string | null;
1789
+ stale: boolean;
1790
+ harnesses: number;
1791
+ deviceId: string;
1792
+ platform: string;
1793
+ ungovernedHarnesses: number;
1794
+ staleGates: number;
1795
+ mcpServers: number;
1796
+ ungovernedMcpServers: number;
1797
+ skills: number;
1798
+ hostname: string;
1799
+ cliVersion: string | null;
1800
+ reportedBy: string | null;
1801
+ guardProbes: {
1802
+ failed: number;
1803
+ total: number;
1804
+ ranAt: number;
1805
+ } | null;
1806
+ firstSeenAt: string;
1807
+ lastSeenAt: string;
1808
+ disconnectedAt: string | null;
1809
+ }, {
1810
+ workspace: string | null;
1811
+ stale: boolean;
1812
+ harnesses: number;
1813
+ deviceId: string;
1814
+ platform: string;
1815
+ ungovernedHarnesses: number;
1816
+ staleGates: number;
1817
+ mcpServers: number;
1818
+ ungovernedMcpServers: number;
1819
+ skills: number;
1820
+ hostname: string;
1821
+ cliVersion: string | null;
1822
+ reportedBy: string | null;
1823
+ guardProbes: {
1824
+ failed: number;
1825
+ total: number;
1826
+ ranAt: number;
1827
+ } | null;
1828
+ firstSeenAt: string;
1829
+ lastSeenAt: string;
1830
+ disconnectedAt: string | null;
1831
+ }>;
1832
+ export type InventoryDeviceResponse = z.infer<typeof InventoryDeviceResponse>;
1833
+ /** One harness on one machine (`InventoryHarnessRow`). */
1834
+ export declare const InventoryHarnessResponse: z.ZodObject<{
1835
+ itemId: z.ZodString;
1836
+ deviceId: z.ZodString;
1837
+ hostname: z.ZodString;
1838
+ deviceStale: z.ZodBoolean;
1839
+ firstSeenAt: z.ZodString;
1840
+ lastSeenAt: z.ZodString;
1841
+ } & {
1842
+ harness: z.ZodString;
1843
+ version: z.ZodNullable<z.ZodString>;
1844
+ configured: z.ZodBoolean;
1845
+ gateKind: z.ZodEnum<["hook", "sdk", "none", "delegated", "bridge"]>;
1846
+ gateInstalled: z.ZodNullable<z.ZodBoolean>;
1847
+ gateFile: z.ZodNullable<z.ZodString>;
1848
+ lastHookEventAt: z.ZodNullable<z.ZodString>;
1849
+ status: z.ZodEnum<["governed", "ungoverned", "gate_stale", "unverified"]>;
1850
+ reason: z.ZodNullable<z.ZodEnum<["no_gate_mechanism", "not_connected", "gate_missing", "guards_disabled", "gate_silent", "awaiting_first_event", "gate_not_observable", "disconnected"]>>;
1851
+ reasonText: z.ZodNullable<z.ZodString>;
1852
+ }, "strip", z.ZodTypeAny, {
1853
+ status: "governed" | "ungoverned" | "gate_stale" | "unverified";
1854
+ reason: "guards_disabled" | "no_gate_mechanism" | "not_connected" | "gate_missing" | "gate_silent" | "awaiting_first_event" | "gate_not_observable" | "disconnected" | null;
1855
+ harness: string;
1856
+ deviceId: string;
1857
+ version: string | null;
1858
+ hostname: string;
1859
+ firstSeenAt: string;
1860
+ lastSeenAt: string;
1861
+ itemId: string;
1862
+ deviceStale: boolean;
1863
+ configured: boolean;
1864
+ gateKind: "hook" | "sdk" | "none" | "delegated" | "bridge";
1865
+ gateInstalled: boolean | null;
1866
+ gateFile: string | null;
1867
+ lastHookEventAt: string | null;
1868
+ reasonText: string | null;
1869
+ }, {
1870
+ status: "governed" | "ungoverned" | "gate_stale" | "unverified";
1871
+ reason: "guards_disabled" | "no_gate_mechanism" | "not_connected" | "gate_missing" | "gate_silent" | "awaiting_first_event" | "gate_not_observable" | "disconnected" | null;
1872
+ harness: string;
1873
+ deviceId: string;
1874
+ version: string | null;
1875
+ hostname: string;
1876
+ firstSeenAt: string;
1877
+ lastSeenAt: string;
1878
+ itemId: string;
1879
+ deviceStale: boolean;
1880
+ configured: boolean;
1881
+ gateKind: "hook" | "sdk" | "none" | "delegated" | "bridge";
1882
+ gateInstalled: boolean | null;
1883
+ gateFile: string | null;
1884
+ lastHookEventAt: string | null;
1885
+ reasonText: string | null;
1886
+ }>;
1887
+ export type InventoryHarnessResponse = z.infer<typeof InventoryHarnessResponse>;
1888
+ /** One MCP server on one machine (`InventoryMcpServerRow`). */
1889
+ export declare const InventoryMcpServerResponse: z.ZodObject<{
1890
+ itemId: z.ZodString;
1891
+ deviceId: z.ZodString;
1892
+ hostname: z.ZodString;
1893
+ deviceStale: z.ZodBoolean;
1894
+ firstSeenAt: z.ZodString;
1895
+ lastSeenAt: z.ZodString;
1896
+ } & {
1897
+ server: z.ZodString;
1898
+ harness: z.ZodString;
1899
+ transport: z.ZodEnum<["stdio", "http", "sse", "unknown"]>;
1900
+ endpoint: z.ZodNullable<z.ZodString>;
1901
+ status: z.ZodEnum<["governed", "ungoverned"]>;
1902
+ reason: z.ZodNullable<z.ZodString>;
1903
+ }, "strip", z.ZodTypeAny, {
1904
+ status: "governed" | "ungoverned";
1905
+ reason: string | null;
1906
+ endpoint: string | null;
1907
+ harness: string;
1908
+ server: string;
1909
+ deviceId: string;
1910
+ hostname: string;
1911
+ firstSeenAt: string;
1912
+ lastSeenAt: string;
1913
+ itemId: string;
1914
+ deviceStale: boolean;
1915
+ transport: "unknown" | "stdio" | "http" | "sse";
1916
+ }, {
1917
+ status: "governed" | "ungoverned";
1918
+ reason: string | null;
1919
+ endpoint: string | null;
1920
+ harness: string;
1921
+ server: string;
1922
+ deviceId: string;
1923
+ hostname: string;
1924
+ firstSeenAt: string;
1925
+ lastSeenAt: string;
1926
+ itemId: string;
1927
+ deviceStale: boolean;
1928
+ transport: "unknown" | "stdio" | "http" | "sse";
1929
+ }>;
1930
+ export type InventoryMcpServerResponse = z.infer<typeof InventoryMcpServerResponse>;
1931
+ /** One skill bundle on one machine (`InventorySkillRow`). */
1932
+ export declare const InventorySkillResponse: z.ZodObject<{
1933
+ itemId: z.ZodString;
1934
+ deviceId: z.ZodString;
1935
+ hostname: z.ZodString;
1936
+ deviceStale: z.ZodBoolean;
1937
+ firstSeenAt: z.ZodString;
1938
+ lastSeenAt: z.ZodString;
1939
+ } & {
1940
+ name: z.ZodString;
1941
+ source: z.ZodString;
1942
+ sha256: z.ZodNullable<z.ZodString>;
1943
+ scanned: z.ZodBoolean;
1944
+ clean: z.ZodBoolean;
1945
+ findingsCount: z.ZodNumber;
1946
+ scriptCount: z.ZodNumber;
1947
+ }, "strip", z.ZodTypeAny, {
1948
+ name: string;
1949
+ source: string;
1950
+ sha256: string | null;
1951
+ clean: boolean;
1952
+ deviceId: string;
1953
+ hostname: string;
1954
+ firstSeenAt: string;
1955
+ lastSeenAt: string;
1956
+ itemId: string;
1957
+ deviceStale: boolean;
1958
+ scanned: boolean;
1959
+ findingsCount: number;
1960
+ scriptCount: number;
1961
+ }, {
1962
+ name: string;
1963
+ source: string;
1964
+ sha256: string | null;
1965
+ clean: boolean;
1966
+ deviceId: string;
1967
+ hostname: string;
1968
+ firstSeenAt: string;
1969
+ lastSeenAt: string;
1970
+ itemId: string;
1971
+ deviceStale: boolean;
1972
+ scanned: boolean;
1973
+ findingsCount: number;
1974
+ scriptCount: number;
1975
+ }>;
1976
+ export type InventorySkillResponse = z.infer<typeof InventorySkillResponse>;
1977
+ /** One `intutic disconnect` a machine reported (`deviceDisconnectService.ts` `DeviceDisconnectRow`). */
1978
+ export declare const DeviceDisconnectRowResponse: z.ZodObject<{
1979
+ disconnectId: z.ZodString;
1980
+ hostname: z.ZodString;
1981
+ fingerprint: z.ZodString;
1982
+ scope: z.ZodEnum<["machine", "harness"]>;
1983
+ harnesses: z.ZodArray<z.ZodString, "many">;
1984
+ memberId: z.ZodNullable<z.ZodString>;
1985
+ reportedBy: z.ZodNullable<z.ZodString>;
1986
+ createdAt: z.ZodString;
1987
+ }, "strip", z.ZodTypeAny, {
1988
+ scope: "harness" | "machine";
1989
+ memberId: string | null;
1990
+ harnesses: string[];
1991
+ createdAt: string;
1992
+ disconnectId: string;
1993
+ hostname: string;
1994
+ reportedBy: string | null;
1995
+ fingerprint: string;
1996
+ }, {
1997
+ scope: "harness" | "machine";
1998
+ memberId: string | null;
1999
+ harnesses: string[];
2000
+ createdAt: string;
2001
+ disconnectId: string;
2002
+ hostname: string;
2003
+ reportedBy: string | null;
2004
+ fingerprint: string;
2005
+ }>;
2006
+ export type DeviceDisconnectRowResponse = z.infer<typeof DeviceDisconnectRowResponse>;
2007
+ /** `GET /api/v1/inventory/devices`. */
2008
+ export declare const InventoryDeviceListResponse: z.ZodObject<{
2009
+ listProperty: z.ZodLiteral<"data">;
2010
+ rowCase: z.ZodLiteral<"camel">;
2011
+ } & {
2012
+ data: z.ZodArray<z.ZodObject<{
2013
+ deviceId: z.ZodString;
2014
+ hostname: z.ZodString;
2015
+ platform: z.ZodString;
2016
+ cliVersion: z.ZodNullable<z.ZodString>;
2017
+ reportedBy: z.ZodNullable<z.ZodString>;
2018
+ workspace: z.ZodNullable<z.ZodString>;
2019
+ guardProbes: z.ZodNullable<z.ZodObject<{
2020
+ total: z.ZodNumber;
2021
+ failed: z.ZodNumber;
2022
+ ranAt: z.ZodNumber;
2023
+ }, "strip", z.ZodTypeAny, {
2024
+ failed: number;
2025
+ total: number;
2026
+ ranAt: number;
2027
+ }, {
2028
+ failed: number;
2029
+ total: number;
2030
+ ranAt: number;
2031
+ }>>;
2032
+ firstSeenAt: z.ZodString;
2033
+ lastSeenAt: z.ZodString;
2034
+ stale: z.ZodBoolean;
2035
+ disconnectedAt: z.ZodNullable<z.ZodString>;
2036
+ harnesses: z.ZodNumber;
2037
+ ungovernedHarnesses: z.ZodNumber;
2038
+ staleGates: z.ZodNumber;
2039
+ mcpServers: z.ZodNumber;
2040
+ ungovernedMcpServers: z.ZodNumber;
2041
+ skills: z.ZodNumber;
2042
+ }, "strip", z.ZodTypeAny, {
2043
+ workspace: string | null;
2044
+ stale: boolean;
2045
+ harnesses: number;
2046
+ deviceId: string;
2047
+ platform: string;
2048
+ ungovernedHarnesses: number;
2049
+ staleGates: number;
2050
+ mcpServers: number;
2051
+ ungovernedMcpServers: number;
2052
+ skills: number;
2053
+ hostname: string;
2054
+ cliVersion: string | null;
2055
+ reportedBy: string | null;
2056
+ guardProbes: {
2057
+ failed: number;
2058
+ total: number;
2059
+ ranAt: number;
2060
+ } | null;
2061
+ firstSeenAt: string;
2062
+ lastSeenAt: string;
2063
+ disconnectedAt: string | null;
2064
+ }, {
2065
+ workspace: string | null;
2066
+ stale: boolean;
2067
+ harnesses: number;
2068
+ deviceId: string;
2069
+ platform: string;
2070
+ ungovernedHarnesses: number;
2071
+ staleGates: number;
2072
+ mcpServers: number;
2073
+ ungovernedMcpServers: number;
2074
+ skills: number;
2075
+ hostname: string;
2076
+ cliVersion: string | null;
2077
+ reportedBy: string | null;
2078
+ guardProbes: {
2079
+ failed: number;
2080
+ total: number;
2081
+ ranAt: number;
2082
+ } | null;
2083
+ firstSeenAt: string;
2084
+ lastSeenAt: string;
2085
+ disconnectedAt: string | null;
2086
+ }>, "many">;
2087
+ }, "strip", z.ZodTypeAny, {
2088
+ data: {
2089
+ workspace: string | null;
2090
+ stale: boolean;
2091
+ harnesses: number;
2092
+ deviceId: string;
2093
+ platform: string;
2094
+ ungovernedHarnesses: number;
2095
+ staleGates: number;
2096
+ mcpServers: number;
2097
+ ungovernedMcpServers: number;
2098
+ skills: number;
2099
+ hostname: string;
2100
+ cliVersion: string | null;
2101
+ reportedBy: string | null;
2102
+ guardProbes: {
2103
+ failed: number;
2104
+ total: number;
2105
+ ranAt: number;
2106
+ } | null;
2107
+ firstSeenAt: string;
2108
+ lastSeenAt: string;
2109
+ disconnectedAt: string | null;
2110
+ }[];
2111
+ listProperty: "data";
2112
+ rowCase: "camel";
2113
+ }, {
2114
+ data: {
2115
+ workspace: string | null;
2116
+ stale: boolean;
2117
+ harnesses: number;
2118
+ deviceId: string;
2119
+ platform: string;
2120
+ ungovernedHarnesses: number;
2121
+ staleGates: number;
2122
+ mcpServers: number;
2123
+ ungovernedMcpServers: number;
2124
+ skills: number;
2125
+ hostname: string;
2126
+ cliVersion: string | null;
2127
+ reportedBy: string | null;
2128
+ guardProbes: {
2129
+ failed: number;
2130
+ total: number;
2131
+ ranAt: number;
2132
+ } | null;
2133
+ firstSeenAt: string;
2134
+ lastSeenAt: string;
2135
+ disconnectedAt: string | null;
2136
+ }[];
2137
+ listProperty: "data";
2138
+ rowCase: "camel";
2139
+ }>;
2140
+ export type InventoryDeviceListResponse = z.infer<typeof InventoryDeviceListResponse>;
2141
+ /** `GET /api/v1/inventory/harnesses` (JSON; `?format=csv` answers text). */
2142
+ export declare const InventoryHarnessListResponse: z.ZodObject<{
2143
+ listProperty: z.ZodLiteral<"data">;
2144
+ rowCase: z.ZodLiteral<"camel">;
2145
+ } & {
2146
+ data: z.ZodArray<z.ZodObject<{
2147
+ itemId: z.ZodString;
2148
+ deviceId: z.ZodString;
2149
+ hostname: z.ZodString;
2150
+ deviceStale: z.ZodBoolean;
2151
+ firstSeenAt: z.ZodString;
2152
+ lastSeenAt: z.ZodString;
2153
+ } & {
2154
+ harness: z.ZodString;
2155
+ version: z.ZodNullable<z.ZodString>;
2156
+ configured: z.ZodBoolean;
2157
+ gateKind: z.ZodEnum<["hook", "sdk", "none", "delegated", "bridge"]>;
2158
+ gateInstalled: z.ZodNullable<z.ZodBoolean>;
2159
+ gateFile: z.ZodNullable<z.ZodString>;
2160
+ lastHookEventAt: z.ZodNullable<z.ZodString>;
2161
+ status: z.ZodEnum<["governed", "ungoverned", "gate_stale", "unverified"]>;
2162
+ reason: z.ZodNullable<z.ZodEnum<["no_gate_mechanism", "not_connected", "gate_missing", "guards_disabled", "gate_silent", "awaiting_first_event", "gate_not_observable", "disconnected"]>>;
2163
+ reasonText: z.ZodNullable<z.ZodString>;
2164
+ }, "strip", z.ZodTypeAny, {
2165
+ status: "governed" | "ungoverned" | "gate_stale" | "unverified";
2166
+ reason: "guards_disabled" | "no_gate_mechanism" | "not_connected" | "gate_missing" | "gate_silent" | "awaiting_first_event" | "gate_not_observable" | "disconnected" | null;
2167
+ harness: string;
2168
+ deviceId: string;
2169
+ version: string | null;
2170
+ hostname: string;
2171
+ firstSeenAt: string;
2172
+ lastSeenAt: string;
2173
+ itemId: string;
2174
+ deviceStale: boolean;
2175
+ configured: boolean;
2176
+ gateKind: "hook" | "sdk" | "none" | "delegated" | "bridge";
2177
+ gateInstalled: boolean | null;
2178
+ gateFile: string | null;
2179
+ lastHookEventAt: string | null;
2180
+ reasonText: string | null;
2181
+ }, {
2182
+ status: "governed" | "ungoverned" | "gate_stale" | "unverified";
2183
+ reason: "guards_disabled" | "no_gate_mechanism" | "not_connected" | "gate_missing" | "gate_silent" | "awaiting_first_event" | "gate_not_observable" | "disconnected" | null;
2184
+ harness: string;
2185
+ deviceId: string;
2186
+ version: string | null;
2187
+ hostname: string;
2188
+ firstSeenAt: string;
2189
+ lastSeenAt: string;
2190
+ itemId: string;
2191
+ deviceStale: boolean;
2192
+ configured: boolean;
2193
+ gateKind: "hook" | "sdk" | "none" | "delegated" | "bridge";
2194
+ gateInstalled: boolean | null;
2195
+ gateFile: string | null;
2196
+ lastHookEventAt: string | null;
2197
+ reasonText: string | null;
2198
+ }>, "many">;
2199
+ }, "strip", z.ZodTypeAny, {
2200
+ data: {
2201
+ status: "governed" | "ungoverned" | "gate_stale" | "unverified";
2202
+ reason: "guards_disabled" | "no_gate_mechanism" | "not_connected" | "gate_missing" | "gate_silent" | "awaiting_first_event" | "gate_not_observable" | "disconnected" | null;
2203
+ harness: string;
2204
+ deviceId: string;
2205
+ version: string | null;
2206
+ hostname: string;
2207
+ firstSeenAt: string;
2208
+ lastSeenAt: string;
2209
+ itemId: string;
2210
+ deviceStale: boolean;
2211
+ configured: boolean;
2212
+ gateKind: "hook" | "sdk" | "none" | "delegated" | "bridge";
2213
+ gateInstalled: boolean | null;
2214
+ gateFile: string | null;
2215
+ lastHookEventAt: string | null;
2216
+ reasonText: string | null;
2217
+ }[];
2218
+ listProperty: "data";
2219
+ rowCase: "camel";
2220
+ }, {
2221
+ data: {
2222
+ status: "governed" | "ungoverned" | "gate_stale" | "unverified";
2223
+ reason: "guards_disabled" | "no_gate_mechanism" | "not_connected" | "gate_missing" | "gate_silent" | "awaiting_first_event" | "gate_not_observable" | "disconnected" | null;
2224
+ harness: string;
2225
+ deviceId: string;
2226
+ version: string | null;
2227
+ hostname: string;
2228
+ firstSeenAt: string;
2229
+ lastSeenAt: string;
2230
+ itemId: string;
2231
+ deviceStale: boolean;
2232
+ configured: boolean;
2233
+ gateKind: "hook" | "sdk" | "none" | "delegated" | "bridge";
2234
+ gateInstalled: boolean | null;
2235
+ gateFile: string | null;
2236
+ lastHookEventAt: string | null;
2237
+ reasonText: string | null;
2238
+ }[];
2239
+ listProperty: "data";
2240
+ rowCase: "camel";
2241
+ }>;
2242
+ export type InventoryHarnessListResponse = z.infer<typeof InventoryHarnessListResponse>;
2243
+ /** `GET /api/v1/inventory/mcp-servers` (JSON; `?format=csv` answers text). */
2244
+ export declare const InventoryMcpServerListResponse: z.ZodObject<{
2245
+ listProperty: z.ZodLiteral<"data">;
2246
+ rowCase: z.ZodLiteral<"camel">;
2247
+ } & {
2248
+ data: z.ZodArray<z.ZodObject<{
2249
+ itemId: z.ZodString;
2250
+ deviceId: z.ZodString;
2251
+ hostname: z.ZodString;
2252
+ deviceStale: z.ZodBoolean;
2253
+ firstSeenAt: z.ZodString;
2254
+ lastSeenAt: z.ZodString;
2255
+ } & {
2256
+ server: z.ZodString;
2257
+ harness: z.ZodString;
2258
+ transport: z.ZodEnum<["stdio", "http", "sse", "unknown"]>;
2259
+ endpoint: z.ZodNullable<z.ZodString>;
2260
+ status: z.ZodEnum<["governed", "ungoverned"]>;
2261
+ reason: z.ZodNullable<z.ZodString>;
2262
+ }, "strip", z.ZodTypeAny, {
2263
+ status: "governed" | "ungoverned";
2264
+ reason: string | null;
2265
+ endpoint: string | null;
2266
+ harness: string;
2267
+ server: string;
2268
+ deviceId: string;
2269
+ hostname: string;
2270
+ firstSeenAt: string;
2271
+ lastSeenAt: string;
2272
+ itemId: string;
2273
+ deviceStale: boolean;
2274
+ transport: "unknown" | "stdio" | "http" | "sse";
2275
+ }, {
2276
+ status: "governed" | "ungoverned";
2277
+ reason: string | null;
2278
+ endpoint: string | null;
2279
+ harness: string;
2280
+ server: string;
2281
+ deviceId: string;
2282
+ hostname: string;
2283
+ firstSeenAt: string;
2284
+ lastSeenAt: string;
2285
+ itemId: string;
2286
+ deviceStale: boolean;
2287
+ transport: "unknown" | "stdio" | "http" | "sse";
2288
+ }>, "many">;
2289
+ }, "strip", z.ZodTypeAny, {
2290
+ data: {
2291
+ status: "governed" | "ungoverned";
2292
+ reason: string | null;
2293
+ endpoint: string | null;
2294
+ harness: string;
2295
+ server: string;
2296
+ deviceId: string;
2297
+ hostname: string;
2298
+ firstSeenAt: string;
2299
+ lastSeenAt: string;
2300
+ itemId: string;
2301
+ deviceStale: boolean;
2302
+ transport: "unknown" | "stdio" | "http" | "sse";
2303
+ }[];
2304
+ listProperty: "data";
2305
+ rowCase: "camel";
2306
+ }, {
2307
+ data: {
2308
+ status: "governed" | "ungoverned";
2309
+ reason: string | null;
2310
+ endpoint: string | null;
2311
+ harness: string;
2312
+ server: string;
2313
+ deviceId: string;
2314
+ hostname: string;
2315
+ firstSeenAt: string;
2316
+ lastSeenAt: string;
2317
+ itemId: string;
2318
+ deviceStale: boolean;
2319
+ transport: "unknown" | "stdio" | "http" | "sse";
2320
+ }[];
2321
+ listProperty: "data";
2322
+ rowCase: "camel";
2323
+ }>;
2324
+ export type InventoryMcpServerListResponse = z.infer<typeof InventoryMcpServerListResponse>;
2325
+ /** `GET /api/v1/inventory/skills`. */
2326
+ export declare const InventorySkillListResponse: z.ZodObject<{
2327
+ listProperty: z.ZodLiteral<"data">;
2328
+ rowCase: z.ZodLiteral<"camel">;
2329
+ } & {
2330
+ data: z.ZodArray<z.ZodObject<{
2331
+ itemId: z.ZodString;
2332
+ deviceId: z.ZodString;
2333
+ hostname: z.ZodString;
2334
+ deviceStale: z.ZodBoolean;
2335
+ firstSeenAt: z.ZodString;
2336
+ lastSeenAt: z.ZodString;
2337
+ } & {
2338
+ name: z.ZodString;
2339
+ source: z.ZodString;
2340
+ sha256: z.ZodNullable<z.ZodString>;
2341
+ scanned: z.ZodBoolean;
2342
+ clean: z.ZodBoolean;
2343
+ findingsCount: z.ZodNumber;
2344
+ scriptCount: z.ZodNumber;
2345
+ }, "strip", z.ZodTypeAny, {
2346
+ name: string;
2347
+ source: string;
2348
+ sha256: string | null;
2349
+ clean: boolean;
2350
+ deviceId: string;
2351
+ hostname: string;
2352
+ firstSeenAt: string;
2353
+ lastSeenAt: string;
2354
+ itemId: string;
2355
+ deviceStale: boolean;
2356
+ scanned: boolean;
2357
+ findingsCount: number;
2358
+ scriptCount: number;
2359
+ }, {
2360
+ name: string;
2361
+ source: string;
2362
+ sha256: string | null;
2363
+ clean: boolean;
2364
+ deviceId: string;
2365
+ hostname: string;
2366
+ firstSeenAt: string;
2367
+ lastSeenAt: string;
2368
+ itemId: string;
2369
+ deviceStale: boolean;
2370
+ scanned: boolean;
2371
+ findingsCount: number;
2372
+ scriptCount: number;
2373
+ }>, "many">;
2374
+ }, "strip", z.ZodTypeAny, {
2375
+ data: {
2376
+ name: string;
2377
+ source: string;
2378
+ sha256: string | null;
2379
+ clean: boolean;
2380
+ deviceId: string;
2381
+ hostname: string;
2382
+ firstSeenAt: string;
2383
+ lastSeenAt: string;
2384
+ itemId: string;
2385
+ deviceStale: boolean;
2386
+ scanned: boolean;
2387
+ findingsCount: number;
2388
+ scriptCount: number;
2389
+ }[];
2390
+ listProperty: "data";
2391
+ rowCase: "camel";
2392
+ }, {
2393
+ data: {
2394
+ name: string;
2395
+ source: string;
2396
+ sha256: string | null;
2397
+ clean: boolean;
2398
+ deviceId: string;
2399
+ hostname: string;
2400
+ firstSeenAt: string;
2401
+ lastSeenAt: string;
2402
+ itemId: string;
2403
+ deviceStale: boolean;
2404
+ scanned: boolean;
2405
+ findingsCount: number;
2406
+ scriptCount: number;
2407
+ }[];
2408
+ listProperty: "data";
2409
+ rowCase: "camel";
2410
+ }>;
2411
+ export type InventorySkillListResponse = z.infer<typeof InventorySkillListResponse>;
2412
+ /** `GET /api/v1/inventory/disconnects`, newest first. */
2413
+ export declare const DeviceDisconnectListResponse: z.ZodObject<{
2414
+ listProperty: z.ZodLiteral<"data">;
2415
+ rowCase: z.ZodLiteral<"camel">;
2416
+ } & {
2417
+ data: z.ZodArray<z.ZodObject<{
2418
+ disconnectId: z.ZodString;
2419
+ hostname: z.ZodString;
2420
+ fingerprint: z.ZodString;
2421
+ scope: z.ZodEnum<["machine", "harness"]>;
2422
+ harnesses: z.ZodArray<z.ZodString, "many">;
2423
+ memberId: z.ZodNullable<z.ZodString>;
2424
+ reportedBy: z.ZodNullable<z.ZodString>;
2425
+ createdAt: z.ZodString;
2426
+ }, "strip", z.ZodTypeAny, {
2427
+ scope: "harness" | "machine";
2428
+ memberId: string | null;
2429
+ harnesses: string[];
2430
+ createdAt: string;
2431
+ disconnectId: string;
2432
+ hostname: string;
2433
+ reportedBy: string | null;
2434
+ fingerprint: string;
2435
+ }, {
2436
+ scope: "harness" | "machine";
2437
+ memberId: string | null;
2438
+ harnesses: string[];
2439
+ createdAt: string;
2440
+ disconnectId: string;
2441
+ hostname: string;
2442
+ reportedBy: string | null;
2443
+ fingerprint: string;
2444
+ }>, "many">;
2445
+ }, "strip", z.ZodTypeAny, {
2446
+ data: {
2447
+ scope: "harness" | "machine";
2448
+ memberId: string | null;
2449
+ harnesses: string[];
2450
+ createdAt: string;
2451
+ disconnectId: string;
2452
+ hostname: string;
2453
+ reportedBy: string | null;
2454
+ fingerprint: string;
2455
+ }[];
2456
+ listProperty: "data";
2457
+ rowCase: "camel";
2458
+ }, {
2459
+ data: {
2460
+ scope: "harness" | "machine";
2461
+ memberId: string | null;
2462
+ harnesses: string[];
2463
+ createdAt: string;
2464
+ disconnectId: string;
2465
+ hostname: string;
2466
+ reportedBy: string | null;
2467
+ fingerprint: string;
2468
+ }[];
2469
+ listProperty: "data";
2470
+ rowCase: "camel";
2471
+ }>;
2472
+ export type DeviceDisconnectListResponse = z.infer<typeof DeviceDisconnectListResponse>;
2473
+ /** One member's usage (`finopsService.ts` `getMemberUsage`). */
2474
+ export declare const MemberUsageRowResponse: z.ZodObject<{
2475
+ models: z.ZodArray<z.ZodString, "many">;
2476
+ activeDays: z.ZodNumber;
2477
+ totalCostUsd: z.ZodNumber;
2478
+ totalRawCostUsd: z.ZodNumber;
2479
+ totalInputTokens: z.ZodNumber;
2480
+ totalOutputTokens: z.ZodNumber;
2481
+ traceCount: z.ZodNumber;
2482
+ memberId: z.ZodNullable<z.ZodString>;
2483
+ displayName: z.ZodNullable<z.ZodString>;
2484
+ email: z.ZodNullable<z.ZodString>;
2485
+ }, "strip", z.ZodTypeAny, {
2486
+ email: string | null;
2487
+ displayName: string | null;
2488
+ models: string[];
2489
+ memberId: string | null;
2490
+ activeDays: number;
2491
+ totalCostUsd: number;
2492
+ totalRawCostUsd: number;
2493
+ totalInputTokens: number;
2494
+ totalOutputTokens: number;
2495
+ traceCount: number;
2496
+ }, {
2497
+ email: string | null;
2498
+ displayName: string | null;
2499
+ models: string[];
2500
+ memberId: string | null;
2501
+ activeDays: number;
2502
+ totalCostUsd: number;
2503
+ totalRawCostUsd: number;
2504
+ totalInputTokens: number;
2505
+ totalOutputTokens: number;
2506
+ traceCount: number;
2507
+ }>;
2508
+ export type MemberUsageRowResponse = z.infer<typeof MemberUsageRowResponse>;
2509
+ /** `GET /api/v1/usage/members`. */
2510
+ export declare const MemberUsageListResponse: z.ZodObject<{
2511
+ listProperty: z.ZodLiteral<"members">;
2512
+ rowCase: z.ZodLiteral<"camel">;
2513
+ } & {
2514
+ scope: z.ZodEnum<["workspace", "self"]>;
2515
+ members: z.ZodArray<z.ZodObject<{
2516
+ models: z.ZodArray<z.ZodString, "many">;
2517
+ activeDays: z.ZodNumber;
2518
+ totalCostUsd: z.ZodNumber;
2519
+ totalRawCostUsd: z.ZodNumber;
2520
+ totalInputTokens: z.ZodNumber;
2521
+ totalOutputTokens: z.ZodNumber;
2522
+ traceCount: z.ZodNumber;
2523
+ memberId: z.ZodNullable<z.ZodString>;
2524
+ displayName: z.ZodNullable<z.ZodString>;
2525
+ email: z.ZodNullable<z.ZodString>;
2526
+ }, "strip", z.ZodTypeAny, {
2527
+ email: string | null;
2528
+ displayName: string | null;
2529
+ models: string[];
2530
+ memberId: string | null;
2531
+ activeDays: number;
2532
+ totalCostUsd: number;
2533
+ totalRawCostUsd: number;
2534
+ totalInputTokens: number;
2535
+ totalOutputTokens: number;
2536
+ traceCount: number;
2537
+ }, {
2538
+ email: string | null;
2539
+ displayName: string | null;
2540
+ models: string[];
2541
+ memberId: string | null;
2542
+ activeDays: number;
2543
+ totalCostUsd: number;
2544
+ totalRawCostUsd: number;
2545
+ totalInputTokens: number;
2546
+ totalOutputTokens: number;
2547
+ traceCount: number;
2548
+ }>, "many">;
2549
+ }, "strip", z.ZodTypeAny, {
2550
+ members: {
2551
+ email: string | null;
2552
+ displayName: string | null;
2553
+ models: string[];
2554
+ memberId: string | null;
2555
+ activeDays: number;
2556
+ totalCostUsd: number;
2557
+ totalRawCostUsd: number;
2558
+ totalInputTokens: number;
2559
+ totalOutputTokens: number;
2560
+ traceCount: number;
2561
+ }[];
2562
+ scope: "workspace" | "self";
2563
+ listProperty: "members";
2564
+ rowCase: "camel";
2565
+ }, {
2566
+ members: {
2567
+ email: string | null;
2568
+ displayName: string | null;
2569
+ models: string[];
2570
+ memberId: string | null;
2571
+ activeDays: number;
2572
+ totalCostUsd: number;
2573
+ totalRawCostUsd: number;
2574
+ totalInputTokens: number;
2575
+ totalOutputTokens: number;
2576
+ traceCount: number;
2577
+ }[];
2578
+ scope: "workspace" | "self";
2579
+ listProperty: "members";
2580
+ rowCase: "camel";
2581
+ }>;
2582
+ export type MemberUsageListResponse = z.infer<typeof MemberUsageListResponse>;
2583
+ /** `GET /api/v1/usage/teams` (`getTeamUsage`): per SCIM group. */
2584
+ export declare const TeamUsageListResponse: z.ZodObject<{
2585
+ listProperty: z.ZodLiteral<"teams">;
2586
+ rowCase: z.ZodLiteral<"camel">;
2587
+ } & {
2588
+ scimGroups: z.ZodBoolean;
2589
+ teams: z.ZodArray<z.ZodObject<{
2590
+ totalCostUsd: z.ZodNumber;
2591
+ totalRawCostUsd: z.ZodNumber;
2592
+ totalInputTokens: z.ZodNumber;
2593
+ totalOutputTokens: z.ZodNumber;
2594
+ traceCount: z.ZodNumber;
2595
+ groupId: z.ZodString;
2596
+ displayName: z.ZodString;
2597
+ memberCount: z.ZodNumber;
2598
+ activeMembers: z.ZodNumber;
2599
+ }, "strip", z.ZodTypeAny, {
2600
+ displayName: string;
2601
+ totalCostUsd: number;
2602
+ totalRawCostUsd: number;
2603
+ totalInputTokens: number;
2604
+ totalOutputTokens: number;
2605
+ traceCount: number;
2606
+ groupId: string;
2607
+ memberCount: number;
2608
+ activeMembers: number;
2609
+ }, {
2610
+ displayName: string;
2611
+ totalCostUsd: number;
2612
+ totalRawCostUsd: number;
2613
+ totalInputTokens: number;
2614
+ totalOutputTokens: number;
2615
+ traceCount: number;
2616
+ groupId: string;
2617
+ memberCount: number;
2618
+ activeMembers: number;
2619
+ }>, "many">;
2620
+ }, "strip", z.ZodTypeAny, {
2621
+ listProperty: "teams";
2622
+ rowCase: "camel";
2623
+ teams: {
2624
+ displayName: string;
2625
+ totalCostUsd: number;
2626
+ totalRawCostUsd: number;
2627
+ totalInputTokens: number;
2628
+ totalOutputTokens: number;
2629
+ traceCount: number;
2630
+ groupId: string;
2631
+ memberCount: number;
2632
+ activeMembers: number;
2633
+ }[];
2634
+ scimGroups: boolean;
2635
+ }, {
2636
+ listProperty: "teams";
2637
+ rowCase: "camel";
2638
+ teams: {
2639
+ displayName: string;
2640
+ totalCostUsd: number;
2641
+ totalRawCostUsd: number;
2642
+ totalInputTokens: number;
2643
+ totalOutputTokens: number;
2644
+ traceCount: number;
2645
+ groupId: string;
2646
+ memberCount: number;
2647
+ activeMembers: number;
2648
+ }[];
2649
+ scimGroups: boolean;
2650
+ }>;
2651
+ export type TeamUsageListResponse = z.infer<typeof TeamUsageListResponse>;
2652
+ /** `GET /api/v1/usage/branches` (`getBranchUsage`). */
2653
+ export declare const BranchUsageListResponse: z.ZodObject<{
2654
+ listProperty: z.ZodLiteral<"branches">;
2655
+ rowCase: z.ZodLiteral<"camel">;
2656
+ } & {
2657
+ scope: z.ZodEnum<["workspace", "self"]>;
2658
+ branches: z.ZodArray<z.ZodObject<{
2659
+ lastCallAt: z.ZodString;
2660
+ totalCostUsd: z.ZodNumber;
2661
+ totalRawCostUsd: z.ZodNumber;
2662
+ totalInputTokens: z.ZodNumber;
2663
+ totalOutputTokens: z.ZodNumber;
2664
+ traceCount: z.ZodNumber;
2665
+ repo: z.ZodNullable<z.ZodString>;
2666
+ branch: z.ZodNullable<z.ZodString>;
2667
+ commitCount: z.ZodNumber;
2668
+ }, "strip", z.ZodTypeAny, {
2669
+ branch: string | null;
2670
+ totalCostUsd: number;
2671
+ totalRawCostUsd: number;
2672
+ totalInputTokens: number;
2673
+ totalOutputTokens: number;
2674
+ traceCount: number;
2675
+ repo: string | null;
2676
+ commitCount: number;
2677
+ lastCallAt: string;
2678
+ }, {
2679
+ branch: string | null;
2680
+ totalCostUsd: number;
2681
+ totalRawCostUsd: number;
2682
+ totalInputTokens: number;
2683
+ totalOutputTokens: number;
2684
+ traceCount: number;
2685
+ repo: string | null;
2686
+ commitCount: number;
2687
+ lastCallAt: string;
2688
+ }>, "many">;
2689
+ }, "strip", z.ZodTypeAny, {
2690
+ scope: "workspace" | "self";
2691
+ listProperty: "branches";
2692
+ rowCase: "camel";
2693
+ branches: {
2694
+ branch: string | null;
2695
+ totalCostUsd: number;
2696
+ totalRawCostUsd: number;
2697
+ totalInputTokens: number;
2698
+ totalOutputTokens: number;
2699
+ traceCount: number;
2700
+ repo: string | null;
2701
+ commitCount: number;
2702
+ lastCallAt: string;
2703
+ }[];
2704
+ }, {
2705
+ scope: "workspace" | "self";
2706
+ listProperty: "branches";
2707
+ rowCase: "camel";
2708
+ branches: {
2709
+ branch: string | null;
2710
+ totalCostUsd: number;
2711
+ totalRawCostUsd: number;
2712
+ totalInputTokens: number;
2713
+ totalOutputTokens: number;
2714
+ traceCount: number;
2715
+ repo: string | null;
2716
+ commitCount: number;
2717
+ lastCallAt: string;
2718
+ }[];
2719
+ }>;
2720
+ export type BranchUsageListResponse = z.infer<typeof BranchUsageListResponse>;
2721
+ /** `GET /api/v1/usage/commits` (`getCommitUsage`). */
2722
+ export declare const CommitUsageListResponse: z.ZodObject<{
2723
+ listProperty: z.ZodLiteral<"commits">;
2724
+ rowCase: z.ZodLiteral<"camel">;
2725
+ } & {
2726
+ scope: z.ZodEnum<["workspace", "self"]>;
2727
+ commits: z.ZodArray<z.ZodObject<{
2728
+ firstCallAt: z.ZodString;
2729
+ lastCallAt: z.ZodString;
2730
+ totalCostUsd: z.ZodNumber;
2731
+ totalRawCostUsd: z.ZodNumber;
2732
+ totalInputTokens: z.ZodNumber;
2733
+ totalOutputTokens: z.ZodNumber;
2734
+ traceCount: z.ZodNumber;
2735
+ repo: z.ZodNullable<z.ZodString>;
2736
+ branch: z.ZodNullable<z.ZodString>;
2737
+ commit: z.ZodNullable<z.ZodString>;
2738
+ }, "strip", z.ZodTypeAny, {
2739
+ commit: string | null;
2740
+ branch: string | null;
2741
+ totalCostUsd: number;
2742
+ totalRawCostUsd: number;
2743
+ totalInputTokens: number;
2744
+ totalOutputTokens: number;
2745
+ traceCount: number;
2746
+ repo: string | null;
2747
+ lastCallAt: string;
2748
+ firstCallAt: string;
2749
+ }, {
2750
+ commit: string | null;
2751
+ branch: string | null;
2752
+ totalCostUsd: number;
2753
+ totalRawCostUsd: number;
2754
+ totalInputTokens: number;
2755
+ totalOutputTokens: number;
2756
+ traceCount: number;
2757
+ repo: string | null;
2758
+ lastCallAt: string;
2759
+ firstCallAt: string;
2760
+ }>, "many">;
2761
+ }, "strip", z.ZodTypeAny, {
2762
+ scope: "workspace" | "self";
2763
+ listProperty: "commits";
2764
+ rowCase: "camel";
2765
+ commits: {
2766
+ commit: string | null;
2767
+ branch: string | null;
2768
+ totalCostUsd: number;
2769
+ totalRawCostUsd: number;
2770
+ totalInputTokens: number;
2771
+ totalOutputTokens: number;
2772
+ traceCount: number;
2773
+ repo: string | null;
2774
+ lastCallAt: string;
2775
+ firstCallAt: string;
2776
+ }[];
2777
+ }, {
2778
+ scope: "workspace" | "self";
2779
+ listProperty: "commits";
2780
+ rowCase: "camel";
2781
+ commits: {
2782
+ commit: string | null;
2783
+ branch: string | null;
2784
+ totalCostUsd: number;
2785
+ totalRawCostUsd: number;
2786
+ totalInputTokens: number;
2787
+ totalOutputTokens: number;
2788
+ traceCount: number;
2789
+ repo: string | null;
2790
+ lastCallAt: string;
2791
+ firstCallAt: string;
2792
+ }[];
2793
+ }>;
2794
+ export type CommitUsageListResponse = z.infer<typeof CommitUsageListResponse>;
2795
+ /** `GET /api/v1/usage/pull-requests` (`getPullRequestUsage`, `getPullRequestSources`). */
2796
+ export declare const PullRequestUsageListResponse: z.ZodObject<{
2797
+ listProperty: z.ZodLiteral<"pullRequests">;
2798
+ rowCase: z.ZodLiteral<"camel">;
2799
+ } & {
2800
+ scope: z.ZodEnum<["workspace", "self"]>;
2801
+ github: z.ZodObject<{
2802
+ connector: z.ZodBoolean;
2803
+ webhook: z.ZodBoolean;
2804
+ apiHost: z.ZodString;
2805
+ noAccessRepos: z.ZodArray<z.ZodString, "many">;
2806
+ mappedPullRequests: z.ZodNumber;
2807
+ lastCheckedAt: z.ZodNullable<z.ZodString>;
2808
+ }, "strip", z.ZodTypeAny, {
2809
+ webhook: boolean;
2810
+ connector: boolean;
2811
+ apiHost: string;
2812
+ noAccessRepos: string[];
2813
+ mappedPullRequests: number;
2814
+ lastCheckedAt: string | null;
2815
+ }, {
2816
+ webhook: boolean;
2817
+ connector: boolean;
2818
+ apiHost: string;
2819
+ noAccessRepos: string[];
2820
+ mappedPullRequests: number;
2821
+ lastCheckedAt: string | null;
2822
+ }>;
2823
+ pullRequests: z.ZodArray<z.ZodObject<{
2824
+ memberCount: z.ZodNumber;
2825
+ firstCallAt: z.ZodString;
2826
+ lastCallAt: z.ZodString;
2827
+ totalCostUsd: z.ZodNumber;
2828
+ totalRawCostUsd: z.ZodNumber;
2829
+ totalInputTokens: z.ZodNumber;
2830
+ totalOutputTokens: z.ZodNumber;
2831
+ traceCount: z.ZodNumber;
2832
+ repo: z.ZodString;
2833
+ number: z.ZodNumber;
2834
+ title: z.ZodString;
2835
+ author: z.ZodNullable<z.ZodString>;
2836
+ state: z.ZodEnum<["open", "closed", "merged"]>;
2837
+ headBranch: z.ZodString;
2838
+ baseBranch: z.ZodNullable<z.ZodString>;
2839
+ url: z.ZodString;
2840
+ openedAt: z.ZodString;
2841
+ mergedAt: z.ZodNullable<z.ZodString>;
2842
+ closedAt: z.ZodNullable<z.ZodString>;
2843
+ }, "strip", z.ZodTypeAny, {
2844
+ number: number;
2845
+ url: string;
2846
+ title: string;
2847
+ totalCostUsd: number;
2848
+ totalRawCostUsd: number;
2849
+ totalInputTokens: number;
2850
+ totalOutputTokens: number;
2851
+ traceCount: number;
2852
+ memberCount: number;
2853
+ repo: string;
2854
+ lastCallAt: string;
2855
+ firstCallAt: string;
2856
+ author: string | null;
2857
+ state: "open" | "closed" | "merged";
2858
+ headBranch: string;
2859
+ baseBranch: string | null;
2860
+ openedAt: string;
2861
+ mergedAt: string | null;
2862
+ closedAt: string | null;
2863
+ }, {
2864
+ number: number;
2865
+ url: string;
2866
+ title: string;
2867
+ totalCostUsd: number;
2868
+ totalRawCostUsd: number;
2869
+ totalInputTokens: number;
2870
+ totalOutputTokens: number;
2871
+ traceCount: number;
2872
+ memberCount: number;
2873
+ repo: string;
2874
+ lastCallAt: string;
2875
+ firstCallAt: string;
2876
+ author: string | null;
2877
+ state: "open" | "closed" | "merged";
2878
+ headBranch: string;
2879
+ baseBranch: string | null;
2880
+ openedAt: string;
2881
+ mergedAt: string | null;
2882
+ closedAt: string | null;
2883
+ }>, "many">;
2884
+ }, "strip", z.ZodTypeAny, {
2885
+ scope: "workspace" | "self";
2886
+ github: {
2887
+ webhook: boolean;
2888
+ connector: boolean;
2889
+ apiHost: string;
2890
+ noAccessRepos: string[];
2891
+ mappedPullRequests: number;
2892
+ lastCheckedAt: string | null;
2893
+ };
2894
+ listProperty: "pullRequests";
2895
+ rowCase: "camel";
2896
+ pullRequests: {
2897
+ number: number;
2898
+ url: string;
2899
+ title: string;
2900
+ totalCostUsd: number;
2901
+ totalRawCostUsd: number;
2902
+ totalInputTokens: number;
2903
+ totalOutputTokens: number;
2904
+ traceCount: number;
2905
+ memberCount: number;
2906
+ repo: string;
2907
+ lastCallAt: string;
2908
+ firstCallAt: string;
2909
+ author: string | null;
2910
+ state: "open" | "closed" | "merged";
2911
+ headBranch: string;
2912
+ baseBranch: string | null;
2913
+ openedAt: string;
2914
+ mergedAt: string | null;
2915
+ closedAt: string | null;
2916
+ }[];
2917
+ }, {
2918
+ scope: "workspace" | "self";
2919
+ github: {
2920
+ webhook: boolean;
2921
+ connector: boolean;
2922
+ apiHost: string;
2923
+ noAccessRepos: string[];
2924
+ mappedPullRequests: number;
2925
+ lastCheckedAt: string | null;
2926
+ };
2927
+ listProperty: "pullRequests";
2928
+ rowCase: "camel";
2929
+ pullRequests: {
2930
+ number: number;
2931
+ url: string;
2932
+ title: string;
2933
+ totalCostUsd: number;
2934
+ totalRawCostUsd: number;
2935
+ totalInputTokens: number;
2936
+ totalOutputTokens: number;
2937
+ traceCount: number;
2938
+ memberCount: number;
2939
+ repo: string;
2940
+ lastCallAt: string;
2941
+ firstCallAt: string;
2942
+ author: string | null;
2943
+ state: "open" | "closed" | "merged";
2944
+ headBranch: string;
2945
+ baseBranch: string | null;
2946
+ openedAt: string;
2947
+ mergedAt: string | null;
2948
+ closedAt: string | null;
2949
+ }[];
2950
+ }>;
2951
+ export type PullRequestUsageListResponse = z.infer<typeof PullRequestUsageListResponse>;
2952
+ /** `POST /api/v1/usage/pull-requests/refresh` (`syncWorkspacePullRequests`). */
2953
+ export declare const PullRequestRefreshResponse: z.ZodObject<{
2954
+ checked: z.ZodNumber;
2955
+ notModified: z.ZodNumber;
2956
+ pullRequests: z.ZodNumber;
2957
+ noAccess: z.ZodNumber;
2958
+ rateLimited: z.ZodBoolean;
2959
+ }, "strip", z.ZodTypeAny, {
2960
+ pullRequests: number;
2961
+ checked: number;
2962
+ notModified: number;
2963
+ noAccess: number;
2964
+ rateLimited: boolean;
2965
+ }, {
2966
+ pullRequests: number;
2967
+ checked: number;
2968
+ notModified: number;
2969
+ noAccess: number;
2970
+ rateLimited: boolean;
2971
+ }>;
2972
+ export type PullRequestRefreshResponse = z.infer<typeof PullRequestRefreshResponse>;
2973
+ /** A `loop_runs` row. */
2974
+ export declare const LoopRunResponse: z.ZodObject<{
2975
+ loopRunId: z.ZodString;
2976
+ workspaceId: z.ZodString;
2977
+ name: z.ZodString;
2978
+ status: z.ZodEnum<["ACTIVE", "PENDING_REVIEW", "COMPLETED", "FAILED", "KILLED"]>;
2979
+ startedBy: z.ZodNullable<z.ZodString>;
2980
+ reviewReason: z.ZodNullable<z.ZodString>;
2981
+ reviewedBy: z.ZodNullable<z.ZodString>;
2982
+ reviewedAt: z.ZodNullable<z.ZodString>;
2983
+ reviewNote: z.ZodNullable<z.ZodString>;
2984
+ totalTokenCostUsd: z.ZodString;
2985
+ budgetLimitUsd: z.ZodString;
2986
+ createdAt: z.ZodString;
2987
+ updatedAt: z.ZodString;
2988
+ }, "strip", z.ZodTypeAny, {
2989
+ workspaceId: string;
2990
+ status: "COMPLETED" | "FAILED" | "PENDING_REVIEW" | "ACTIVE" | "KILLED";
2991
+ name: string;
2992
+ createdAt: string;
2993
+ updatedAt: string;
2994
+ loopRunId: string;
2995
+ startedBy: string | null;
2996
+ reviewReason: string | null;
2997
+ reviewedBy: string | null;
2998
+ reviewedAt: string | null;
2999
+ reviewNote: string | null;
3000
+ totalTokenCostUsd: string;
3001
+ budgetLimitUsd: string;
3002
+ }, {
3003
+ workspaceId: string;
3004
+ status: "COMPLETED" | "FAILED" | "PENDING_REVIEW" | "ACTIVE" | "KILLED";
3005
+ name: string;
3006
+ createdAt: string;
3007
+ updatedAt: string;
3008
+ loopRunId: string;
3009
+ startedBy: string | null;
3010
+ reviewReason: string | null;
3011
+ reviewedBy: string | null;
3012
+ reviewedAt: string | null;
3013
+ reviewNote: string | null;
3014
+ totalTokenCostUsd: string;
3015
+ budgetLimitUsd: string;
3016
+ }>;
3017
+ export type LoopRunResponse = z.infer<typeof LoopRunResponse>;
3018
+ /** `POST /api/v1/loops/start` and `GET /api/v1/loops/:loopRunId`. */
3019
+ export declare const LoopRunEnvelopeResponse: z.ZodObject<{
3020
+ ok: z.ZodLiteral<true>;
3021
+ loop: z.ZodObject<{
3022
+ loopRunId: z.ZodString;
3023
+ workspaceId: z.ZodString;
3024
+ name: z.ZodString;
3025
+ status: z.ZodEnum<["ACTIVE", "PENDING_REVIEW", "COMPLETED", "FAILED", "KILLED"]>;
3026
+ startedBy: z.ZodNullable<z.ZodString>;
3027
+ reviewReason: z.ZodNullable<z.ZodString>;
3028
+ reviewedBy: z.ZodNullable<z.ZodString>;
3029
+ reviewedAt: z.ZodNullable<z.ZodString>;
3030
+ reviewNote: z.ZodNullable<z.ZodString>;
3031
+ totalTokenCostUsd: z.ZodString;
3032
+ budgetLimitUsd: z.ZodString;
3033
+ createdAt: z.ZodString;
3034
+ updatedAt: z.ZodString;
3035
+ }, "strip", z.ZodTypeAny, {
3036
+ workspaceId: string;
3037
+ status: "COMPLETED" | "FAILED" | "PENDING_REVIEW" | "ACTIVE" | "KILLED";
3038
+ name: string;
3039
+ createdAt: string;
3040
+ updatedAt: string;
3041
+ loopRunId: string;
3042
+ startedBy: string | null;
3043
+ reviewReason: string | null;
3044
+ reviewedBy: string | null;
3045
+ reviewedAt: string | null;
3046
+ reviewNote: string | null;
3047
+ totalTokenCostUsd: string;
3048
+ budgetLimitUsd: string;
3049
+ }, {
3050
+ workspaceId: string;
3051
+ status: "COMPLETED" | "FAILED" | "PENDING_REVIEW" | "ACTIVE" | "KILLED";
3052
+ name: string;
3053
+ createdAt: string;
3054
+ updatedAt: string;
3055
+ loopRunId: string;
3056
+ startedBy: string | null;
3057
+ reviewReason: string | null;
3058
+ reviewedBy: string | null;
3059
+ reviewedAt: string | null;
3060
+ reviewNote: string | null;
3061
+ totalTokenCostUsd: string;
3062
+ budgetLimitUsd: string;
3063
+ }>;
3064
+ }, "strip", z.ZodTypeAny, {
3065
+ ok: true;
3066
+ loop: {
3067
+ workspaceId: string;
3068
+ status: "COMPLETED" | "FAILED" | "PENDING_REVIEW" | "ACTIVE" | "KILLED";
3069
+ name: string;
3070
+ createdAt: string;
3071
+ updatedAt: string;
3072
+ loopRunId: string;
3073
+ startedBy: string | null;
3074
+ reviewReason: string | null;
3075
+ reviewedBy: string | null;
3076
+ reviewedAt: string | null;
3077
+ reviewNote: string | null;
3078
+ totalTokenCostUsd: string;
3079
+ budgetLimitUsd: string;
3080
+ };
3081
+ }, {
3082
+ ok: true;
3083
+ loop: {
3084
+ workspaceId: string;
3085
+ status: "COMPLETED" | "FAILED" | "PENDING_REVIEW" | "ACTIVE" | "KILLED";
3086
+ name: string;
3087
+ createdAt: string;
3088
+ updatedAt: string;
3089
+ loopRunId: string;
3090
+ startedBy: string | null;
3091
+ reviewReason: string | null;
3092
+ reviewedBy: string | null;
3093
+ reviewedAt: string | null;
3094
+ reviewNote: string | null;
3095
+ totalTokenCostUsd: string;
3096
+ budgetLimitUsd: string;
3097
+ };
3098
+ }>;
3099
+ export type LoopRunEnvelopeResponse = z.infer<typeof LoopRunEnvelopeResponse>;
3100
+ /** `GET /api/v1/loops`, newest first. */
3101
+ export declare const LoopRunListResponse: z.ZodObject<{
3102
+ listProperty: z.ZodLiteral<"loops">;
3103
+ rowCase: z.ZodLiteral<"camel">;
3104
+ } & {
3105
+ ok: z.ZodLiteral<true>;
3106
+ loops: z.ZodArray<z.ZodObject<{
3107
+ loopRunId: z.ZodString;
3108
+ workspaceId: z.ZodString;
3109
+ name: z.ZodString;
3110
+ status: z.ZodEnum<["ACTIVE", "PENDING_REVIEW", "COMPLETED", "FAILED", "KILLED"]>;
3111
+ startedBy: z.ZodNullable<z.ZodString>;
3112
+ reviewReason: z.ZodNullable<z.ZodString>;
3113
+ reviewedBy: z.ZodNullable<z.ZodString>;
3114
+ reviewedAt: z.ZodNullable<z.ZodString>;
3115
+ reviewNote: z.ZodNullable<z.ZodString>;
3116
+ totalTokenCostUsd: z.ZodString;
3117
+ budgetLimitUsd: z.ZodString;
3118
+ createdAt: z.ZodString;
3119
+ updatedAt: z.ZodString;
3120
+ }, "strip", z.ZodTypeAny, {
3121
+ workspaceId: string;
3122
+ status: "COMPLETED" | "FAILED" | "PENDING_REVIEW" | "ACTIVE" | "KILLED";
3123
+ name: string;
3124
+ createdAt: string;
3125
+ updatedAt: string;
3126
+ loopRunId: string;
3127
+ startedBy: string | null;
3128
+ reviewReason: string | null;
3129
+ reviewedBy: string | null;
3130
+ reviewedAt: string | null;
3131
+ reviewNote: string | null;
3132
+ totalTokenCostUsd: string;
3133
+ budgetLimitUsd: string;
3134
+ }, {
3135
+ workspaceId: string;
3136
+ status: "COMPLETED" | "FAILED" | "PENDING_REVIEW" | "ACTIVE" | "KILLED";
3137
+ name: string;
3138
+ createdAt: string;
3139
+ updatedAt: string;
3140
+ loopRunId: string;
3141
+ startedBy: string | null;
3142
+ reviewReason: string | null;
3143
+ reviewedBy: string | null;
3144
+ reviewedAt: string | null;
3145
+ reviewNote: string | null;
3146
+ totalTokenCostUsd: string;
3147
+ budgetLimitUsd: string;
3148
+ }>, "many">;
3149
+ }, "strip", z.ZodTypeAny, {
3150
+ ok: true;
3151
+ listProperty: "loops";
3152
+ rowCase: "camel";
3153
+ loops: {
3154
+ workspaceId: string;
3155
+ status: "COMPLETED" | "FAILED" | "PENDING_REVIEW" | "ACTIVE" | "KILLED";
3156
+ name: string;
3157
+ createdAt: string;
3158
+ updatedAt: string;
3159
+ loopRunId: string;
3160
+ startedBy: string | null;
3161
+ reviewReason: string | null;
3162
+ reviewedBy: string | null;
3163
+ reviewedAt: string | null;
3164
+ reviewNote: string | null;
3165
+ totalTokenCostUsd: string;
3166
+ budgetLimitUsd: string;
3167
+ }[];
3168
+ }, {
3169
+ ok: true;
3170
+ listProperty: "loops";
3171
+ rowCase: "camel";
3172
+ loops: {
3173
+ workspaceId: string;
3174
+ status: "COMPLETED" | "FAILED" | "PENDING_REVIEW" | "ACTIVE" | "KILLED";
3175
+ name: string;
3176
+ createdAt: string;
3177
+ updatedAt: string;
3178
+ loopRunId: string;
3179
+ startedBy: string | null;
3180
+ reviewReason: string | null;
3181
+ reviewedBy: string | null;
3182
+ reviewedAt: string | null;
3183
+ reviewNote: string | null;
3184
+ totalTokenCostUsd: string;
3185
+ budgetLimitUsd: string;
3186
+ }[];
3187
+ }>;
3188
+ export type LoopRunListResponse = z.infer<typeof LoopRunListResponse>;
3189
+ /** `POST /api/v1/loops/:loopRunId/complete`. */
3190
+ export declare const LoopRunCompleteResponse: z.ZodObject<{
3191
+ ok: z.ZodLiteral<true>;
3192
+ outcome: z.ZodEnum<["SUCCEEDED", "FAILED"]>;
3193
+ }, "strip", z.ZodTypeAny, {
3194
+ ok: true;
3195
+ outcome: "FAILED" | "SUCCEEDED";
3196
+ }, {
3197
+ ok: true;
3198
+ outcome: "FAILED" | "SUCCEEDED";
3199
+ }>;
3200
+ export type LoopRunCompleteResponse = z.infer<typeof LoopRunCompleteResponse>;
3201
+ /** `POST /api/v1/loops/:loopRunId/kill`. */
3202
+ export declare const LoopRunKillResponse: z.ZodObject<{
3203
+ ok: z.ZodLiteral<true>;
3204
+ }, "strip", z.ZodTypeAny, {
3205
+ ok: true;
3206
+ }, {
3207
+ ok: true;
3208
+ }>;
3209
+ export type LoopRunKillResponse = z.infer<typeof LoopRunKillResponse>;
3210
+ /** `POST /api/v1/loops/:loopRunId/review`: the run's status after the review. */
3211
+ export declare const LoopRunReviewResponse: z.ZodObject<{
3212
+ ok: z.ZodLiteral<true>;
3213
+ status: z.ZodEnum<["ACTIVE", "KILLED"]>;
3214
+ }, "strip", z.ZodTypeAny, {
3215
+ status: "ACTIVE" | "KILLED";
3216
+ ok: true;
3217
+ }, {
3218
+ status: "ACTIVE" | "KILLED";
3219
+ ok: true;
3220
+ }>;
3221
+ export type LoopRunReviewResponse = z.infer<typeof LoopRunReviewResponse>;
3222
+ //# sourceMappingURL=observability.d.ts.map