@sixb/server 0.1.1 → 0.1.2

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 (166) hide show
  1. package/README.md +3 -3
  2. package/dist/auth/application-access.d.ts +2 -2
  3. package/dist/auth/application-access.d.ts.map +1 -1
  4. package/dist/auth/connector-callback-cookie.d.ts +12 -0
  5. package/dist/auth/connector-callback-cookie.d.ts.map +1 -0
  6. package/dist/auth/guard.d.ts +3 -3
  7. package/dist/auth/guard.d.ts.map +1 -1
  8. package/dist/auth/public-routes.d.ts.map +1 -1
  9. package/dist/auth/scope.d.ts +13 -27
  10. package/dist/auth/scope.d.ts.map +1 -1
  11. package/dist/auth/session-cookies.d.ts +2 -2
  12. package/dist/auth/session-cookies.d.ts.map +1 -1
  13. package/dist/connectors/http.d.ts +16 -0
  14. package/dist/connectors/http.d.ts.map +1 -0
  15. package/dist/index.js +3293 -2704
  16. package/dist/index.js.map +55 -50
  17. package/dist/openapi/tags.d.ts +11 -3
  18. package/dist/openapi/tags.d.ts.map +1 -1
  19. package/dist/registerRoutes.d.ts +6 -2
  20. package/dist/registerRoutes.d.ts.map +1 -1
  21. package/dist/routes/action-runs.d.ts +21 -31
  22. package/dist/routes/action-runs.d.ts.map +1 -1
  23. package/dist/routes/actions.d.ts +9 -8
  24. package/dist/routes/actions.d.ts.map +1 -1
  25. package/dist/routes/agent-api-gateway.d.ts +2 -2
  26. package/dist/routes/agent-api-gateway.d.ts.map +1 -1
  27. package/dist/routes/agents.d.ts +130 -131
  28. package/dist/routes/agents.d.ts.map +1 -1
  29. package/dist/routes/auth.d.ts +84 -84
  30. package/dist/routes/auth.d.ts.map +1 -1
  31. package/dist/routes/connector-connection-runs.d.ts +794 -0
  32. package/dist/routes/connector-connection-runs.d.ts.map +1 -0
  33. package/dist/routes/connector-connections.d.ts +219 -0
  34. package/dist/routes/connector-connections.d.ts.map +1 -0
  35. package/dist/routes/connectors.d.ts +10 -4
  36. package/dist/routes/connectors.d.ts.map +1 -1
  37. package/dist/routes/datasets.d.ts +8 -4
  38. package/dist/routes/datasets.d.ts.map +1 -1
  39. package/dist/routes/events.d.ts +8 -8
  40. package/dist/routes/events.d.ts.map +1 -1
  41. package/dist/routes/files.d.ts +11 -10
  42. package/dist/routes/files.d.ts.map +1 -1
  43. package/dist/routes/links.d.ts +2 -2
  44. package/dist/routes/links.d.ts.map +1 -1
  45. package/dist/routes/logs.d.ts +5 -5
  46. package/dist/routes/logs.d.ts.map +1 -1
  47. package/dist/routes/objects.d.ts +34 -34
  48. package/dist/routes/objects.d.ts.map +1 -1
  49. package/dist/routes/ontology.d.ts +50 -50
  50. package/dist/routes/ontology.d.ts.map +1 -1
  51. package/dist/routes/pipelines.d.ts +24 -34
  52. package/dist/routes/pipelines.d.ts.map +1 -1
  53. package/dist/routes/project.d.ts +2 -2
  54. package/dist/routes/project.d.ts.map +1 -1
  55. package/dist/routes/projections.d.ts +131 -83
  56. package/dist/routes/projections.d.ts.map +1 -1
  57. package/dist/routes/rules.d.ts +6 -6
  58. package/dist/routes/rules.d.ts.map +1 -1
  59. package/dist/routes/status.d.ts +2 -2
  60. package/dist/routes/status.d.ts.map +1 -1
  61. package/dist/routes/syncs.d.ts +20 -25
  62. package/dist/routes/syncs.d.ts.map +1 -1
  63. package/dist/routes/telemetry.d.ts +2 -2
  64. package/dist/routes/telemetry.d.ts.map +1 -1
  65. package/dist/routes/webhook-runs.d.ts +9 -9
  66. package/dist/routes/webhook-runs.d.ts.map +1 -1
  67. package/dist/routes/webhooks.d.ts +2 -2
  68. package/dist/routes/webhooks.d.ts.map +1 -1
  69. package/dist/routes/workflows.d.ts +74 -48
  70. package/dist/routes/workflows.d.ts.map +1 -1
  71. package/dist/routes/ws/agents.d.ts +11 -5
  72. package/dist/routes/ws/agents.d.ts.map +1 -1
  73. package/dist/routes/ws/events.d.ts +8 -8
  74. package/dist/routes/ws/events.d.ts.map +1 -1
  75. package/dist/routes/ws/log-subscription-hub.d.ts +6 -3
  76. package/dist/routes/ws/log-subscription-hub.d.ts.map +1 -1
  77. package/dist/routes/ws/logs.d.ts +10 -10
  78. package/dist/routes/ws/logs.d.ts.map +1 -1
  79. package/dist/schemas/actions.d.ts +97 -202
  80. package/dist/schemas/actions.d.ts.map +1 -1
  81. package/dist/schemas/agents.d.ts +442 -439
  82. package/dist/schemas/agents.d.ts.map +1 -1
  83. package/dist/schemas/ai-usage.d.ts +34 -0
  84. package/dist/schemas/ai-usage.d.ts.map +1 -0
  85. package/dist/schemas/auth.d.ts +142 -142
  86. package/dist/schemas/common.d.ts +37 -0
  87. package/dist/schemas/common.d.ts.map +1 -1
  88. package/dist/schemas/connectors.d.ts +713 -2
  89. package/dist/schemas/connectors.d.ts.map +1 -1
  90. package/dist/schemas/datasets.d.ts +2 -2
  91. package/dist/schemas/event-payloads.d.ts +6 -6
  92. package/dist/schemas/events.d.ts +34 -34
  93. package/dist/schemas/logs.d.ts +22 -22
  94. package/dist/schemas/objects.d.ts +10 -10
  95. package/dist/schemas/ontology.d.ts +118 -118
  96. package/dist/schemas/pipelines.d.ts +95 -190
  97. package/dist/schemas/pipelines.d.ts.map +1 -1
  98. package/dist/schemas/projections.d.ts +918 -563
  99. package/dist/schemas/projections.d.ts.map +1 -1
  100. package/dist/schemas/rules.d.ts +6 -6
  101. package/dist/schemas/status.d.ts +2 -2
  102. package/dist/schemas/syncs.d.ts +65 -108
  103. package/dist/schemas/syncs.d.ts.map +1 -1
  104. package/dist/schemas/webhook-runs.d.ts +41 -41
  105. package/dist/schemas/webhook-runs.d.ts.map +1 -1
  106. package/dist/schemas/workflows.d.ts +516 -183
  107. package/dist/schemas/workflows.d.ts.map +1 -1
  108. package/dist/server.d.ts +6 -6
  109. package/dist/server.d.ts.map +1 -1
  110. package/dist/utils/http.d.ts +2 -0
  111. package/dist/utils/http.d.ts.map +1 -1
  112. package/dist/utils/ws.d.ts +4 -3
  113. package/dist/utils/ws.d.ts.map +1 -1
  114. package/package.json +4 -4
  115. package/src/auth/access-token-boundary.ts +4 -4
  116. package/src/auth/application-access.ts +8 -9
  117. package/src/auth/connector-callback-cookie.ts +95 -0
  118. package/src/auth/guard.ts +11 -11
  119. package/src/auth/public-routes.ts +13 -0
  120. package/src/auth/scope.ts +26 -36
  121. package/src/auth/session-cookies.ts +3 -3
  122. package/src/connectors/http.ts +110 -0
  123. package/src/openapi/tags.ts +9 -1
  124. package/src/registerRoutes.ts +34 -23
  125. package/src/routes/action-runs.ts +39 -39
  126. package/src/routes/actions.ts +7 -13
  127. package/src/routes/agent-api-gateway.ts +41 -38
  128. package/src/routes/agents.ts +89 -200
  129. package/src/routes/auth.ts +87 -91
  130. package/src/routes/connector-connection-runs.ts +346 -0
  131. package/src/routes/connector-connections.ts +135 -0
  132. package/src/routes/connectors.ts +24 -12
  133. package/src/routes/datasets.ts +55 -54
  134. package/src/routes/events.ts +5 -5
  135. package/src/routes/files.ts +22 -30
  136. package/src/routes/links.ts +31 -35
  137. package/src/routes/logs.ts +6 -11
  138. package/src/routes/objects.ts +51 -114
  139. package/src/routes/ontology.ts +27 -38
  140. package/src/routes/pipelines.ts +28 -62
  141. package/src/routes/project.ts +3 -3
  142. package/src/routes/projections.ts +26 -38
  143. package/src/routes/rules.ts +11 -25
  144. package/src/routes/status.ts +5 -5
  145. package/src/routes/syncs.ts +19 -45
  146. package/src/routes/telemetry.ts +18 -29
  147. package/src/routes/webhook-runs.ts +5 -5
  148. package/src/routes/webhooks.ts +259 -341
  149. package/src/routes/workflows.ts +226 -248
  150. package/src/routes/ws/agents.ts +196 -66
  151. package/src/routes/ws/events.ts +11 -10
  152. package/src/routes/ws/log-subscription-hub.ts +6 -12
  153. package/src/routes/ws/logs.ts +13 -5
  154. package/src/schemas/actions.ts +58 -25
  155. package/src/schemas/agents.ts +19 -14
  156. package/src/schemas/ai-usage.ts +16 -0
  157. package/src/schemas/common.ts +24 -0
  158. package/src/schemas/connectors.ts +164 -0
  159. package/src/schemas/pipelines.ts +23 -15
  160. package/src/schemas/projections.ts +17 -3
  161. package/src/schemas/syncs.ts +13 -8
  162. package/src/schemas/webhook-runs.ts +10 -5
  163. package/src/schemas/workflows.ts +16 -6
  164. package/src/server.ts +65 -26
  165. package/src/utils/http.ts +34 -6
  166. package/src/utils/ws.ts +10 -5
@@ -1,4 +1,6 @@
1
+ import { type AgentRunFailureCode, type SixbFailure } from "@sixb/core/storage";
1
2
  import { z } from "zod";
3
+ export declare const AgentRunFailureSchema: z.ZodType<SixbFailure<AgentRunFailureCode>>;
2
4
  export declare const AgentIdParamsSchema: z.ZodObject<{
3
5
  agentId: z.ZodString;
4
6
  }, "strip", z.ZodTypeAny, {
@@ -35,11 +37,21 @@ export declare const AgentPrincipalSchema: z.ZodObject<{
35
37
  type: z.ZodEnum<["user", "serviceAccount", "system"]>;
36
38
  id: z.ZodString;
37
39
  }, "strip", z.ZodTypeAny, {
38
- type: "user" | "serviceAccount" | "system";
39
40
  id: string;
41
+ type: "user" | "serviceAccount" | "system";
40
42
  }, {
43
+ id: string;
41
44
  type: "user" | "serviceAccount" | "system";
45
+ }>;
46
+ export declare const AgentAuthorizablePrincipalSchema: z.ZodObject<{
47
+ type: z.ZodEnum<["user", "serviceAccount"]>;
48
+ id: z.ZodString;
49
+ }, "strip", z.ZodTypeAny, {
50
+ id: string;
51
+ type: "user" | "serviceAccount";
52
+ }, {
42
53
  id: string;
54
+ type: "user" | "serviceAccount";
43
55
  }>;
44
56
  export declare const AgentObjectContextSchema: z.ZodObject<{
45
57
  kind: z.ZodLiteral<"object">;
@@ -73,16 +85,16 @@ export declare const AgentAppStateContextSchema: z.ZodObject<{
73
85
  description: z.ZodString;
74
86
  value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
75
87
  }, "strip", z.ZodTypeAny, {
88
+ id: string;
76
89
  kind: "app-state";
77
90
  description: string;
78
91
  value: import("./common").JsonValue;
79
- id: string;
80
92
  label: string;
81
93
  }, {
94
+ id: string;
82
95
  kind: "app-state";
83
96
  description: string;
84
97
  value: import("./common").JsonValue;
85
- id: string;
86
98
  label: string;
87
99
  }>;
88
100
  export declare const AgentContextInputSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -116,16 +128,16 @@ export declare const AgentContextInputSchema: z.ZodDiscriminatedUnion<"kind", [z
116
128
  description: z.ZodString;
117
129
  value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
118
130
  }, "strip", z.ZodTypeAny, {
131
+ id: string;
119
132
  kind: "app-state";
120
133
  description: string;
121
134
  value: import("./common").JsonValue;
122
- id: string;
123
135
  label: string;
124
136
  }, {
137
+ id: string;
125
138
  kind: "app-state";
126
139
  description: string;
127
140
  value: import("./common").JsonValue;
128
- id: string;
129
141
  label: string;
130
142
  }>]>;
131
143
  export declare const AgentContextOriginSchema: z.ZodEnum<["ambient", "explicit"]>;
@@ -161,16 +173,16 @@ export declare const AgentContextEntryInputSchema: z.ZodObject<{
161
173
  description: z.ZodString;
162
174
  value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
163
175
  }, "strip", z.ZodTypeAny, {
176
+ id: string;
164
177
  kind: "app-state";
165
178
  description: string;
166
179
  value: import("./common").JsonValue;
167
- id: string;
168
180
  label: string;
169
181
  }, {
182
+ id: string;
170
183
  kind: "app-state";
171
184
  description: string;
172
185
  value: import("./common").JsonValue;
173
- id: string;
174
186
  label: string;
175
187
  }>]>;
176
188
  origin: z.ZodEnum<["ambient", "explicit"]>;
@@ -183,10 +195,10 @@ export declare const AgentContextEntryInputSchema: z.ZodObject<{
183
195
  primaryId: string;
184
196
  };
185
197
  } | {
198
+ id: string;
186
199
  kind: "app-state";
187
200
  description: string;
188
201
  value: import("./common").JsonValue;
189
- id: string;
190
202
  label: string;
191
203
  };
192
204
  }, {
@@ -198,10 +210,10 @@ export declare const AgentContextEntryInputSchema: z.ZodObject<{
198
210
  primaryId: string;
199
211
  };
200
212
  } | {
213
+ id: string;
201
214
  kind: "app-state";
202
215
  description: string;
203
216
  value: import("./common").JsonValue;
204
- id: string;
205
217
  label: string;
206
218
  };
207
219
  }>;
@@ -237,16 +249,16 @@ export declare const AgentContextPartSchema: z.ZodObject<{
237
249
  description: z.ZodString;
238
250
  value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
239
251
  }, "strip", z.ZodTypeAny, {
252
+ id: string;
240
253
  kind: "app-state";
241
254
  description: string;
242
255
  value: import("./common").JsonValue;
243
- id: string;
244
256
  label: string;
245
257
  }, {
258
+ id: string;
246
259
  kind: "app-state";
247
260
  description: string;
248
261
  value: import("./common").JsonValue;
249
- id: string;
250
262
  label: string;
251
263
  }>]>;
252
264
  origin: z.ZodEnum<["ambient", "explicit"]>;
@@ -262,10 +274,10 @@ export declare const AgentContextPartSchema: z.ZodObject<{
262
274
  primaryId: string;
263
275
  };
264
276
  } | {
277
+ id: string;
265
278
  kind: "app-state";
266
279
  description: string;
267
280
  value: import("./common").JsonValue;
268
- id: string;
269
281
  label: string;
270
282
  };
271
283
  }, {
@@ -278,10 +290,10 @@ export declare const AgentContextPartSchema: z.ZodObject<{
278
290
  primaryId: string;
279
291
  };
280
292
  } | {
293
+ id: string;
281
294
  kind: "app-state";
282
295
  description: string;
283
296
  value: import("./common").JsonValue;
284
- id: string;
285
297
  label: string;
286
298
  };
287
299
  }>;
@@ -328,8 +340,8 @@ export declare const AgentCatalogItemSchema: z.ZodObject<{
328
340
  } | undefined;
329
341
  }>>;
330
342
  }, "strip", z.ZodTypeAny, {
331
- name: string;
332
343
  id: string;
344
+ name: string;
333
345
  groupIds: string[];
334
346
  description?: string | undefined;
335
347
  modelId?: string | undefined;
@@ -340,8 +352,8 @@ export declare const AgentCatalogItemSchema: z.ZodObject<{
340
352
  } | undefined;
341
353
  } | undefined;
342
354
  }, {
343
- name: string;
344
355
  id: string;
356
+ name: string;
345
357
  groupIds: string[];
346
358
  description?: string | undefined;
347
359
  modelId?: string | undefined;
@@ -361,16 +373,16 @@ export declare const AgentThreadListQuerySchema: z.ZodObject<{
361
373
  order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
362
374
  }, "strip", z.ZodTypeAny, {
363
375
  status?: "active" | "archived" | undefined;
364
- agentId?: string | undefined;
365
376
  limit?: string | undefined;
366
377
  offset?: string | undefined;
367
378
  order?: "asc" | "desc" | undefined;
379
+ agentId?: string | undefined;
368
380
  }, {
369
381
  status?: "active" | "archived" | undefined;
370
- agentId?: string | undefined;
371
382
  limit?: string | undefined;
372
383
  offset?: string | undefined;
373
384
  order?: "asc" | "desc" | undefined;
385
+ agentId?: string | undefined;
374
386
  }>;
375
387
  export declare const CreateAgentThreadBodySchema: z.ZodObject<{
376
388
  agentId: z.ZodString;
@@ -393,11 +405,11 @@ export declare const AgentThreadSchema: z.ZodObject<{
393
405
  type: z.ZodEnum<["user", "serviceAccount", "system"]>;
394
406
  id: z.ZodString;
395
407
  }, "strip", z.ZodTypeAny, {
396
- type: "user" | "serviceAccount" | "system";
397
408
  id: string;
398
- }, {
399
409
  type: "user" | "serviceAccount" | "system";
410
+ }, {
400
411
  id: string;
412
+ type: "user" | "serviceAccount" | "system";
401
413
  }>;
402
414
  title: z.ZodOptional<z.ZodString>;
403
415
  status: z.ZodEnum<["active", "archived"]>;
@@ -407,14 +419,14 @@ export declare const AgentThreadSchema: z.ZodObject<{
407
419
  createdAt: z.ZodString;
408
420
  updatedAt: z.ZodString;
409
421
  }, "strip", z.ZodTypeAny, {
410
- status: "active" | "archived";
411
422
  projectId: string;
423
+ id: string;
424
+ status: "active" | "archived";
425
+ agentId: string;
412
426
  ownerPrincipal: {
413
- type: "user" | "serviceAccount" | "system";
414
427
  id: string;
428
+ type: "user" | "serviceAccount" | "system";
415
429
  };
416
- agentId: string;
417
- id: string;
418
430
  activeRunId: string | null;
419
431
  messageCount: number;
420
432
  createdAt: string;
@@ -422,14 +434,14 @@ export declare const AgentThreadSchema: z.ZodObject<{
422
434
  title?: string | undefined;
423
435
  lastMessageAt?: string | undefined;
424
436
  }, {
425
- status: "active" | "archived";
426
437
  projectId: string;
438
+ id: string;
439
+ status: "active" | "archived";
440
+ agentId: string;
427
441
  ownerPrincipal: {
428
- type: "user" | "serviceAccount" | "system";
429
442
  id: string;
443
+ type: "user" | "serviceAccount" | "system";
430
444
  };
431
- agentId: string;
432
- id: string;
433
445
  activeRunId: string | null;
434
446
  messageCount: number;
435
447
  createdAt: string;
@@ -446,11 +458,11 @@ export declare const AgentThreadListResponseSchema: z.ZodObject<{
446
458
  type: z.ZodEnum<["user", "serviceAccount", "system"]>;
447
459
  id: z.ZodString;
448
460
  }, "strip", z.ZodTypeAny, {
449
- type: "user" | "serviceAccount" | "system";
450
461
  id: string;
451
- }, {
452
462
  type: "user" | "serviceAccount" | "system";
463
+ }, {
453
464
  id: string;
465
+ type: "user" | "serviceAccount" | "system";
454
466
  }>;
455
467
  title: z.ZodOptional<z.ZodString>;
456
468
  status: z.ZodEnum<["active", "archived"]>;
@@ -460,14 +472,14 @@ export declare const AgentThreadListResponseSchema: z.ZodObject<{
460
472
  createdAt: z.ZodString;
461
473
  updatedAt: z.ZodString;
462
474
  }, "strip", z.ZodTypeAny, {
463
- status: "active" | "archived";
464
475
  projectId: string;
476
+ id: string;
477
+ status: "active" | "archived";
478
+ agentId: string;
465
479
  ownerPrincipal: {
466
- type: "user" | "serviceAccount" | "system";
467
480
  id: string;
481
+ type: "user" | "serviceAccount" | "system";
468
482
  };
469
- agentId: string;
470
- id: string;
471
483
  activeRunId: string | null;
472
484
  messageCount: number;
473
485
  createdAt: string;
@@ -475,14 +487,14 @@ export declare const AgentThreadListResponseSchema: z.ZodObject<{
475
487
  title?: string | undefined;
476
488
  lastMessageAt?: string | undefined;
477
489
  }, {
478
- status: "active" | "archived";
479
490
  projectId: string;
491
+ id: string;
492
+ status: "active" | "archived";
493
+ agentId: string;
480
494
  ownerPrincipal: {
481
- type: "user" | "serviceAccount" | "system";
482
495
  id: string;
496
+ type: "user" | "serviceAccount" | "system";
483
497
  };
484
- agentId: string;
485
- id: string;
486
498
  activeRunId: string | null;
487
499
  messageCount: number;
488
500
  createdAt: string;
@@ -496,14 +508,14 @@ export declare const AgentThreadListResponseSchema: z.ZodObject<{
496
508
  hasMore: boolean;
497
509
  total: number;
498
510
  threads: {
499
- status: "active" | "archived";
500
511
  projectId: string;
512
+ id: string;
513
+ status: "active" | "archived";
514
+ agentId: string;
501
515
  ownerPrincipal: {
502
- type: "user" | "serviceAccount" | "system";
503
516
  id: string;
517
+ type: "user" | "serviceAccount" | "system";
504
518
  };
505
- agentId: string;
506
- id: string;
507
519
  activeRunId: string | null;
508
520
  messageCount: number;
509
521
  createdAt: string;
@@ -515,14 +527,14 @@ export declare const AgentThreadListResponseSchema: z.ZodObject<{
515
527
  hasMore: boolean;
516
528
  total: number;
517
529
  threads: {
518
- status: "active" | "archived";
519
530
  projectId: string;
531
+ id: string;
532
+ status: "active" | "archived";
533
+ agentId: string;
520
534
  ownerPrincipal: {
521
- type: "user" | "serviceAccount" | "system";
522
535
  id: string;
536
+ type: "user" | "serviceAccount" | "system";
523
537
  };
524
- agentId: string;
525
- id: string;
526
538
  activeRunId: string | null;
527
539
  messageCount: number;
528
540
  createdAt: string;
@@ -540,11 +552,11 @@ export declare const CreateAgentThreadResponseSchema: z.ZodObject<{
540
552
  type: z.ZodEnum<["user", "serviceAccount", "system"]>;
541
553
  id: z.ZodString;
542
554
  }, "strip", z.ZodTypeAny, {
543
- type: "user" | "serviceAccount" | "system";
544
555
  id: string;
545
- }, {
546
556
  type: "user" | "serviceAccount" | "system";
557
+ }, {
547
558
  id: string;
559
+ type: "user" | "serviceAccount" | "system";
548
560
  }>;
549
561
  title: z.ZodOptional<z.ZodString>;
550
562
  status: z.ZodEnum<["active", "archived"]>;
@@ -554,14 +566,14 @@ export declare const CreateAgentThreadResponseSchema: z.ZodObject<{
554
566
  createdAt: z.ZodString;
555
567
  updatedAt: z.ZodString;
556
568
  }, "strip", z.ZodTypeAny, {
557
- status: "active" | "archived";
558
569
  projectId: string;
570
+ id: string;
571
+ status: "active" | "archived";
572
+ agentId: string;
559
573
  ownerPrincipal: {
560
- type: "user" | "serviceAccount" | "system";
561
574
  id: string;
575
+ type: "user" | "serviceAccount" | "system";
562
576
  };
563
- agentId: string;
564
- id: string;
565
577
  activeRunId: string | null;
566
578
  messageCount: number;
567
579
  createdAt: string;
@@ -569,14 +581,14 @@ export declare const CreateAgentThreadResponseSchema: z.ZodObject<{
569
581
  title?: string | undefined;
570
582
  lastMessageAt?: string | undefined;
571
583
  }, {
572
- status: "active" | "archived";
573
584
  projectId: string;
585
+ id: string;
586
+ status: "active" | "archived";
587
+ agentId: string;
574
588
  ownerPrincipal: {
575
- type: "user" | "serviceAccount" | "system";
576
589
  id: string;
590
+ type: "user" | "serviceAccount" | "system";
577
591
  };
578
- agentId: string;
579
- id: string;
580
592
  activeRunId: string | null;
581
593
  messageCount: number;
582
594
  createdAt: string;
@@ -586,14 +598,14 @@ export declare const CreateAgentThreadResponseSchema: z.ZodObject<{
586
598
  }>;
587
599
  }, "strip", z.ZodTypeAny, {
588
600
  thread: {
589
- status: "active" | "archived";
590
601
  projectId: string;
602
+ id: string;
603
+ status: "active" | "archived";
604
+ agentId: string;
591
605
  ownerPrincipal: {
592
- type: "user" | "serviceAccount" | "system";
593
606
  id: string;
607
+ type: "user" | "serviceAccount" | "system";
594
608
  };
595
- agentId: string;
596
- id: string;
597
609
  activeRunId: string | null;
598
610
  messageCount: number;
599
611
  createdAt: string;
@@ -603,14 +615,14 @@ export declare const CreateAgentThreadResponseSchema: z.ZodObject<{
603
615
  };
604
616
  }, {
605
617
  thread: {
606
- status: "active" | "archived";
607
618
  projectId: string;
619
+ id: string;
620
+ status: "active" | "archived";
621
+ agentId: string;
608
622
  ownerPrincipal: {
609
- type: "user" | "serviceAccount" | "system";
610
623
  id: string;
624
+ type: "user" | "serviceAccount" | "system";
611
625
  };
612
- agentId: string;
613
- id: string;
614
626
  activeRunId: string | null;
615
627
  messageCount: number;
616
628
  createdAt: string;
@@ -729,16 +741,16 @@ export declare const AgentMessagePartSchema: z.ZodUnion<[z.ZodObject<{
729
741
  description: z.ZodString;
730
742
  value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
731
743
  }, "strip", z.ZodTypeAny, {
744
+ id: string;
732
745
  kind: "app-state";
733
746
  description: string;
734
747
  value: import("./common").JsonValue;
735
- id: string;
736
748
  label: string;
737
749
  }, {
750
+ id: string;
738
751
  kind: "app-state";
739
752
  description: string;
740
753
  value: import("./common").JsonValue;
741
- id: string;
742
754
  label: string;
743
755
  }>]>;
744
756
  origin: z.ZodEnum<["ambient", "explicit"]>;
@@ -754,10 +766,10 @@ export declare const AgentMessagePartSchema: z.ZodUnion<[z.ZodObject<{
754
766
  primaryId: string;
755
767
  };
756
768
  } | {
769
+ id: string;
757
770
  kind: "app-state";
758
771
  description: string;
759
772
  value: import("./common").JsonValue;
760
- id: string;
761
773
  label: string;
762
774
  };
763
775
  }, {
@@ -770,10 +782,10 @@ export declare const AgentMessagePartSchema: z.ZodUnion<[z.ZodObject<{
770
782
  primaryId: string;
771
783
  };
772
784
  } | {
785
+ id: string;
773
786
  kind: "app-state";
774
787
  description: string;
775
788
  value: import("./common").JsonValue;
776
- id: string;
777
789
  label: string;
778
790
  };
779
791
  }>, z.ZodObject<{
@@ -868,11 +880,11 @@ export declare const AgentMessageSchema: z.ZodObject<{
868
880
  type: z.ZodEnum<["user", "serviceAccount", "system"]>;
869
881
  id: z.ZodString;
870
882
  }, "strip", z.ZodTypeAny, {
871
- type: "user" | "serviceAccount" | "system";
872
883
  id: string;
873
- }, {
874
884
  type: "user" | "serviceAccount" | "system";
885
+ }, {
875
886
  id: string;
887
+ type: "user" | "serviceAccount" | "system";
876
888
  }>>;
877
889
  seq: z.ZodNumber;
878
890
  parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
@@ -984,16 +996,16 @@ export declare const AgentMessageSchema: z.ZodObject<{
984
996
  description: z.ZodString;
985
997
  value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
986
998
  }, "strip", z.ZodTypeAny, {
999
+ id: string;
987
1000
  kind: "app-state";
988
1001
  description: string;
989
1002
  value: import("./common").JsonValue;
990
- id: string;
991
1003
  label: string;
992
1004
  }, {
1005
+ id: string;
993
1006
  kind: "app-state";
994
1007
  description: string;
995
1008
  value: import("./common").JsonValue;
996
- id: string;
997
1009
  label: string;
998
1010
  }>]>;
999
1011
  origin: z.ZodEnum<["ambient", "explicit"]>;
@@ -1009,10 +1021,10 @@ export declare const AgentMessageSchema: z.ZodObject<{
1009
1021
  primaryId: string;
1010
1022
  };
1011
1023
  } | {
1024
+ id: string;
1012
1025
  kind: "app-state";
1013
1026
  description: string;
1014
1027
  value: import("./common").JsonValue;
1015
- id: string;
1016
1028
  label: string;
1017
1029
  };
1018
1030
  }, {
@@ -1025,10 +1037,10 @@ export declare const AgentMessageSchema: z.ZodObject<{
1025
1037
  primaryId: string;
1026
1038
  };
1027
1039
  } | {
1040
+ id: string;
1028
1041
  kind: "app-state";
1029
1042
  description: string;
1030
1043
  value: import("./common").JsonValue;
1031
- id: string;
1032
1044
  label: string;
1033
1045
  };
1034
1046
  }>, z.ZodObject<{
@@ -1132,10 +1144,10 @@ export declare const AgentMessageSchema: z.ZodObject<{
1132
1144
  primaryId: string;
1133
1145
  };
1134
1146
  } | {
1147
+ id: string;
1135
1148
  kind: "app-state";
1136
1149
  description: string;
1137
1150
  value: import("./common").JsonValue;
1138
- id: string;
1139
1151
  label: string;
1140
1152
  };
1141
1153
  } | {
@@ -1194,8 +1206,8 @@ export declare const AgentMessageSchema: z.ZodObject<{
1194
1206
  contentVersion: number;
1195
1207
  completedAt?: string | undefined;
1196
1208
  authorPrincipal?: {
1197
- type: "user" | "serviceAccount" | "system";
1198
1209
  id: string;
1210
+ type: "user" | "serviceAccount" | "system";
1199
1211
  } | undefined;
1200
1212
  metadata?: import("./common").JsonValue | undefined;
1201
1213
  }, {
@@ -1212,10 +1224,10 @@ export declare const AgentMessageSchema: z.ZodObject<{
1212
1224
  primaryId: string;
1213
1225
  };
1214
1226
  } | {
1227
+ id: string;
1215
1228
  kind: "app-state";
1216
1229
  description: string;
1217
1230
  value: import("./common").JsonValue;
1218
- id: string;
1219
1231
  label: string;
1220
1232
  };
1221
1233
  } | {
@@ -1274,8 +1286,8 @@ export declare const AgentMessageSchema: z.ZodObject<{
1274
1286
  contentVersion: number;
1275
1287
  completedAt?: string | undefined;
1276
1288
  authorPrincipal?: {
1277
- type: "user" | "serviceAccount" | "system";
1278
1289
  id: string;
1290
+ type: "user" | "serviceAccount" | "system";
1279
1291
  } | undefined;
1280
1292
  metadata?: import("./common").JsonValue | undefined;
1281
1293
  }>;
@@ -1306,11 +1318,11 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1306
1318
  type: z.ZodEnum<["user", "serviceAccount", "system"]>;
1307
1319
  id: z.ZodString;
1308
1320
  }, "strip", z.ZodTypeAny, {
1309
- type: "user" | "serviceAccount" | "system";
1310
1321
  id: string;
1311
- }, {
1312
1322
  type: "user" | "serviceAccount" | "system";
1323
+ }, {
1313
1324
  id: string;
1325
+ type: "user" | "serviceAccount" | "system";
1314
1326
  }>>;
1315
1327
  seq: z.ZodNumber;
1316
1328
  parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
@@ -1422,16 +1434,16 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1422
1434
  description: z.ZodString;
1423
1435
  value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
1424
1436
  }, "strip", z.ZodTypeAny, {
1437
+ id: string;
1425
1438
  kind: "app-state";
1426
1439
  description: string;
1427
1440
  value: import("./common").JsonValue;
1428
- id: string;
1429
1441
  label: string;
1430
1442
  }, {
1443
+ id: string;
1431
1444
  kind: "app-state";
1432
1445
  description: string;
1433
1446
  value: import("./common").JsonValue;
1434
- id: string;
1435
1447
  label: string;
1436
1448
  }>]>;
1437
1449
  origin: z.ZodEnum<["ambient", "explicit"]>;
@@ -1447,10 +1459,10 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1447
1459
  primaryId: string;
1448
1460
  };
1449
1461
  } | {
1462
+ id: string;
1450
1463
  kind: "app-state";
1451
1464
  description: string;
1452
1465
  value: import("./common").JsonValue;
1453
- id: string;
1454
1466
  label: string;
1455
1467
  };
1456
1468
  }, {
@@ -1463,10 +1475,10 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1463
1475
  primaryId: string;
1464
1476
  };
1465
1477
  } | {
1478
+ id: string;
1466
1479
  kind: "app-state";
1467
1480
  description: string;
1468
1481
  value: import("./common").JsonValue;
1469
- id: string;
1470
1482
  label: string;
1471
1483
  };
1472
1484
  }>, z.ZodObject<{
@@ -1570,10 +1582,10 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1570
1582
  primaryId: string;
1571
1583
  };
1572
1584
  } | {
1585
+ id: string;
1573
1586
  kind: "app-state";
1574
1587
  description: string;
1575
1588
  value: import("./common").JsonValue;
1576
- id: string;
1577
1589
  label: string;
1578
1590
  };
1579
1591
  } | {
@@ -1632,8 +1644,8 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1632
1644
  contentVersion: number;
1633
1645
  completedAt?: string | undefined;
1634
1646
  authorPrincipal?: {
1635
- type: "user" | "serviceAccount" | "system";
1636
1647
  id: string;
1648
+ type: "user" | "serviceAccount" | "system";
1637
1649
  } | undefined;
1638
1650
  metadata?: import("./common").JsonValue | undefined;
1639
1651
  }, {
@@ -1650,10 +1662,10 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1650
1662
  primaryId: string;
1651
1663
  };
1652
1664
  } | {
1665
+ id: string;
1653
1666
  kind: "app-state";
1654
1667
  description: string;
1655
1668
  value: import("./common").JsonValue;
1656
- id: string;
1657
1669
  label: string;
1658
1670
  };
1659
1671
  } | {
@@ -1712,8 +1724,8 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1712
1724
  contentVersion: number;
1713
1725
  completedAt?: string | undefined;
1714
1726
  authorPrincipal?: {
1715
- type: "user" | "serviceAccount" | "system";
1716
1727
  id: string;
1728
+ type: "user" | "serviceAccount" | "system";
1717
1729
  } | undefined;
1718
1730
  metadata?: import("./common").JsonValue | undefined;
1719
1731
  }>, "many">;
@@ -1736,10 +1748,10 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1736
1748
  primaryId: string;
1737
1749
  };
1738
1750
  } | {
1751
+ id: string;
1739
1752
  kind: "app-state";
1740
1753
  description: string;
1741
1754
  value: import("./common").JsonValue;
1742
- id: string;
1743
1755
  label: string;
1744
1756
  };
1745
1757
  } | {
@@ -1798,8 +1810,8 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1798
1810
  contentVersion: number;
1799
1811
  completedAt?: string | undefined;
1800
1812
  authorPrincipal?: {
1801
- type: "user" | "serviceAccount" | "system";
1802
1813
  id: string;
1814
+ type: "user" | "serviceAccount" | "system";
1803
1815
  } | undefined;
1804
1816
  metadata?: import("./common").JsonValue | undefined;
1805
1817
  }[];
@@ -1820,10 +1832,10 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1820
1832
  primaryId: string;
1821
1833
  };
1822
1834
  } | {
1835
+ id: string;
1823
1836
  kind: "app-state";
1824
1837
  description: string;
1825
1838
  value: import("./common").JsonValue;
1826
- id: string;
1827
1839
  label: string;
1828
1840
  };
1829
1841
  } | {
@@ -1882,8 +1894,8 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1882
1894
  contentVersion: number;
1883
1895
  completedAt?: string | undefined;
1884
1896
  authorPrincipal?: {
1885
- type: "user" | "serviceAccount" | "system";
1886
1897
  id: string;
1898
+ type: "user" | "serviceAccount" | "system";
1887
1899
  } | undefined;
1888
1900
  metadata?: import("./common").JsonValue | undefined;
1889
1901
  }[];
@@ -1944,16 +1956,16 @@ export declare const PostAgentMessageBodySchema: z.ZodObject<{
1944
1956
  description: z.ZodString;
1945
1957
  value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
1946
1958
  }, "strip", z.ZodTypeAny, {
1959
+ id: string;
1947
1960
  kind: "app-state";
1948
1961
  description: string;
1949
1962
  value: import("./common").JsonValue;
1950
- id: string;
1951
1963
  label: string;
1952
1964
  }, {
1965
+ id: string;
1953
1966
  kind: "app-state";
1954
1967
  description: string;
1955
1968
  value: import("./common").JsonValue;
1956
- id: string;
1957
1969
  label: string;
1958
1970
  }>]>;
1959
1971
  origin: z.ZodEnum<["ambient", "explicit"]>;
@@ -1966,10 +1978,10 @@ export declare const PostAgentMessageBodySchema: z.ZodObject<{
1966
1978
  primaryId: string;
1967
1979
  };
1968
1980
  } | {
1981
+ id: string;
1969
1982
  kind: "app-state";
1970
1983
  description: string;
1971
1984
  value: import("./common").JsonValue;
1972
- id: string;
1973
1985
  label: string;
1974
1986
  };
1975
1987
  }, {
@@ -1981,17 +1993,16 @@ export declare const PostAgentMessageBodySchema: z.ZodObject<{
1981
1993
  primaryId: string;
1982
1994
  };
1983
1995
  } | {
1996
+ id: string;
1984
1997
  kind: "app-state";
1985
1998
  description: string;
1986
1999
  value: import("./common").JsonValue;
1987
- id: string;
1988
2000
  label: string;
1989
2001
  };
1990
2002
  }>, "many">>;
1991
2003
  messageId: z.ZodOptional<z.ZodString>;
1992
2004
  }, "strip", z.ZodTypeAny, {
1993
2005
  text: string;
1994
- messageId?: string | undefined;
1995
2006
  context?: {
1996
2007
  origin: "ambient" | "explicit";
1997
2008
  context: {
@@ -2001,13 +2012,14 @@ export declare const PostAgentMessageBodySchema: z.ZodObject<{
2001
2012
  primaryId: string;
2002
2013
  };
2003
2014
  } | {
2015
+ id: string;
2004
2016
  kind: "app-state";
2005
2017
  description: string;
2006
2018
  value: import("./common").JsonValue;
2007
- id: string;
2008
2019
  label: string;
2009
2020
  };
2010
2021
  }[] | undefined;
2022
+ messageId?: string | undefined;
2011
2023
  attachments?: {
2012
2024
  blobId: string;
2013
2025
  digest: string;
@@ -2018,7 +2030,6 @@ export declare const PostAgentMessageBodySchema: z.ZodObject<{
2018
2030
  }[] | undefined;
2019
2031
  }, {
2020
2032
  text: string;
2021
- messageId?: string | undefined;
2022
2033
  context?: {
2023
2034
  origin: "ambient" | "explicit";
2024
2035
  context: {
@@ -2028,13 +2039,14 @@ export declare const PostAgentMessageBodySchema: z.ZodObject<{
2028
2039
  primaryId: string;
2029
2040
  };
2030
2041
  } | {
2042
+ id: string;
2031
2043
  kind: "app-state";
2032
2044
  description: string;
2033
2045
  value: import("./common").JsonValue;
2034
- id: string;
2035
2046
  label: string;
2036
2047
  };
2037
2048
  }[] | undefined;
2049
+ messageId?: string | undefined;
2038
2050
  attachments?: {
2039
2051
  blobId: string;
2040
2052
  digest: string;
@@ -2053,50 +2065,21 @@ export declare const CancelAgentRunBodySchema: z.ZodObject<{
2053
2065
  }>;
2054
2066
  export declare const AgentRunStatusSchema: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2055
2067
  export declare const AgentRunFinishReasonSchema: z.ZodEnum<["stop", "length", "content-filter", "tool-calls", "error", "other", "unknown"]>;
2056
- export declare const AgentRunUsageSchema: z.ZodObject<{
2057
- inputTokens: z.ZodOptional<z.ZodNumber>;
2058
- outputTokens: z.ZodOptional<z.ZodNumber>;
2059
- totalTokens: z.ZodOptional<z.ZodNumber>;
2060
- reasoningTokens: z.ZodOptional<z.ZodNumber>;
2061
- cachedInputTokens: z.ZodOptional<z.ZodNumber>;
2062
- }, "strip", z.ZodTypeAny, {
2063
- inputTokens?: number | undefined;
2064
- outputTokens?: number | undefined;
2065
- totalTokens?: number | undefined;
2066
- reasoningTokens?: number | undefined;
2067
- cachedInputTokens?: number | undefined;
2068
- }, {
2069
- inputTokens?: number | undefined;
2070
- outputTokens?: number | undefined;
2071
- totalTokens?: number | undefined;
2072
- reasoningTokens?: number | undefined;
2073
- cachedInputTokens?: number | undefined;
2074
- }>;
2075
2068
  export declare const AgentRunSchema: z.ZodObject<{
2076
2069
  id: z.ZodString;
2077
2070
  projectId: z.ZodString;
2078
2071
  threadId: z.ZodString;
2079
2072
  agentId: z.ZodString;
2080
2073
  triggerMessageId: z.ZodString;
2081
- requestedByPrincipal: z.ZodObject<{
2082
- type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2083
- id: z.ZodString;
2084
- }, "strip", z.ZodTypeAny, {
2085
- type: "user" | "serviceAccount" | "system";
2086
- id: string;
2087
- }, {
2088
- type: "user" | "serviceAccount" | "system";
2089
- id: string;
2090
- }>;
2091
- executionPrincipal: z.ZodOptional<z.ZodObject<{
2092
- type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2074
+ requestedBy: z.ZodOptional<z.ZodObject<{
2075
+ type: z.ZodEnum<["user", "serviceAccount"]>;
2093
2076
  id: z.ZodString;
2094
2077
  }, "strip", z.ZodTypeAny, {
2095
- type: "user" | "serviceAccount" | "system";
2096
2078
  id: string;
2079
+ type: "user" | "serviceAccount";
2097
2080
  }, {
2098
- type: "user" | "serviceAccount" | "system";
2099
2081
  id: string;
2082
+ type: "user" | "serviceAccount";
2100
2083
  }>>;
2101
2084
  status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2102
2085
  modelId: z.ZodOptional<z.ZodString>;
@@ -2105,20 +2088,32 @@ export declare const AgentRunSchema: z.ZodObject<{
2105
2088
  inputTokens: z.ZodOptional<z.ZodNumber>;
2106
2089
  outputTokens: z.ZodOptional<z.ZodNumber>;
2107
2090
  totalTokens: z.ZodOptional<z.ZodNumber>;
2108
- reasoningTokens: z.ZodOptional<z.ZodNumber>;
2109
- cachedInputTokens: z.ZodOptional<z.ZodNumber>;
2091
+ uncachedInputTokens: z.ZodOptional<z.ZodNumber>;
2092
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
2093
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
2094
+ textOutputTokens: z.ZodOptional<z.ZodNumber>;
2095
+ reasoningOutputTokens: z.ZodOptional<z.ZodNumber>;
2096
+ reportingStatus: z.ZodEnum<["complete", "partial", "unavailable"]>;
2110
2097
  }, "strip", z.ZodTypeAny, {
2098
+ reportingStatus: "complete" | "partial" | "unavailable";
2111
2099
  inputTokens?: number | undefined;
2112
2100
  outputTokens?: number | undefined;
2113
2101
  totalTokens?: number | undefined;
2114
- reasoningTokens?: number | undefined;
2115
- cachedInputTokens?: number | undefined;
2102
+ uncachedInputTokens?: number | undefined;
2103
+ cacheReadInputTokens?: number | undefined;
2104
+ cacheWriteInputTokens?: number | undefined;
2105
+ textOutputTokens?: number | undefined;
2106
+ reasoningOutputTokens?: number | undefined;
2116
2107
  }, {
2108
+ reportingStatus: "complete" | "partial" | "unavailable";
2117
2109
  inputTokens?: number | undefined;
2118
2110
  outputTokens?: number | undefined;
2119
2111
  totalTokens?: number | undefined;
2120
- reasoningTokens?: number | undefined;
2121
- cachedInputTokens?: number | undefined;
2112
+ uncachedInputTokens?: number | undefined;
2113
+ cacheReadInputTokens?: number | undefined;
2114
+ cacheWriteInputTokens?: number | undefined;
2115
+ textOutputTokens?: number | undefined;
2116
+ reasoningOutputTokens?: number | undefined;
2122
2117
  }>>;
2123
2118
  diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
2124
2119
  code: z.ZodEnum<["output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed"]>;
@@ -2139,41 +2134,41 @@ export declare const AgentRunSchema: z.ZodObject<{
2139
2134
  scope: "output";
2140
2135
  path?: string | undefined;
2141
2136
  }>, "many">>;
2142
- error: z.ZodOptional<z.ZodString>;
2137
+ error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">>>;
2143
2138
  attempt: z.ZodNumber;
2144
2139
  streamId: z.ZodString;
2145
2140
  createdAt: z.ZodString;
2146
2141
  startedAt: z.ZodOptional<z.ZodString>;
2147
2142
  completedAt: z.ZodOptional<z.ZodString>;
2148
2143
  }, "strip", z.ZodTypeAny, {
2149
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2150
2144
  projectId: string;
2151
- agentId: string;
2152
2145
  id: string;
2146
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2147
+ agentId: string;
2153
2148
  threadId: string;
2154
2149
  createdAt: string;
2155
2150
  triggerMessageId: string;
2156
- requestedByPrincipal: {
2157
- type: "user" | "serviceAccount" | "system";
2158
- id: string;
2159
- };
2160
2151
  attempt: number;
2161
2152
  streamId: string;
2162
- error?: string | undefined;
2153
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2163
2154
  startedAt?: string | undefined;
2164
2155
  completedAt?: string | undefined;
2165
- executionPrincipal?: {
2166
- type: "user" | "serviceAccount" | "system";
2156
+ modelId?: string | undefined;
2157
+ requestedBy?: {
2167
2158
  id: string;
2159
+ type: "user" | "serviceAccount";
2168
2160
  } | undefined;
2169
- modelId?: string | undefined;
2170
2161
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2171
2162
  usage?: {
2163
+ reportingStatus: "complete" | "partial" | "unavailable";
2172
2164
  inputTokens?: number | undefined;
2173
2165
  outputTokens?: number | undefined;
2174
2166
  totalTokens?: number | undefined;
2175
- reasoningTokens?: number | undefined;
2176
- cachedInputTokens?: number | undefined;
2167
+ uncachedInputTokens?: number | undefined;
2168
+ cacheReadInputTokens?: number | undefined;
2169
+ cacheWriteInputTokens?: number | undefined;
2170
+ textOutputTokens?: number | undefined;
2171
+ reasoningOutputTokens?: number | undefined;
2177
2172
  } | undefined;
2178
2173
  diagnostics?: {
2179
2174
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -2183,34 +2178,34 @@ export declare const AgentRunSchema: z.ZodObject<{
2183
2178
  path?: string | undefined;
2184
2179
  }[] | undefined;
2185
2180
  }, {
2186
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2187
2181
  projectId: string;
2188
- agentId: string;
2189
2182
  id: string;
2183
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2184
+ agentId: string;
2190
2185
  threadId: string;
2191
2186
  createdAt: string;
2192
2187
  triggerMessageId: string;
2193
- requestedByPrincipal: {
2194
- type: "user" | "serviceAccount" | "system";
2195
- id: string;
2196
- };
2197
2188
  attempt: number;
2198
2189
  streamId: string;
2199
- error?: string | undefined;
2190
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2200
2191
  startedAt?: string | undefined;
2201
2192
  completedAt?: string | undefined;
2202
- executionPrincipal?: {
2203
- type: "user" | "serviceAccount" | "system";
2193
+ modelId?: string | undefined;
2194
+ requestedBy?: {
2204
2195
  id: string;
2196
+ type: "user" | "serviceAccount";
2205
2197
  } | undefined;
2206
- modelId?: string | undefined;
2207
2198
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2208
2199
  usage?: {
2200
+ reportingStatus: "complete" | "partial" | "unavailable";
2209
2201
  inputTokens?: number | undefined;
2210
2202
  outputTokens?: number | undefined;
2211
2203
  totalTokens?: number | undefined;
2212
- reasoningTokens?: number | undefined;
2213
- cachedInputTokens?: number | undefined;
2204
+ uncachedInputTokens?: number | undefined;
2205
+ cacheReadInputTokens?: number | undefined;
2206
+ cacheWriteInputTokens?: number | undefined;
2207
+ textOutputTokens?: number | undefined;
2208
+ reasoningOutputTokens?: number | undefined;
2214
2209
  } | undefined;
2215
2210
  diagnostics?: {
2216
2211
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -2227,25 +2222,15 @@ export declare const PostAgentMessageResponseSchema: z.ZodObject<{
2227
2222
  threadId: z.ZodString;
2228
2223
  agentId: z.ZodString;
2229
2224
  triggerMessageId: z.ZodString;
2230
- requestedByPrincipal: z.ZodObject<{
2231
- type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2232
- id: z.ZodString;
2233
- }, "strip", z.ZodTypeAny, {
2234
- type: "user" | "serviceAccount" | "system";
2235
- id: string;
2236
- }, {
2237
- type: "user" | "serviceAccount" | "system";
2238
- id: string;
2239
- }>;
2240
- executionPrincipal: z.ZodOptional<z.ZodObject<{
2241
- type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2225
+ requestedBy: z.ZodOptional<z.ZodObject<{
2226
+ type: z.ZodEnum<["user", "serviceAccount"]>;
2242
2227
  id: z.ZodString;
2243
2228
  }, "strip", z.ZodTypeAny, {
2244
- type: "user" | "serviceAccount" | "system";
2245
2229
  id: string;
2230
+ type: "user" | "serviceAccount";
2246
2231
  }, {
2247
- type: "user" | "serviceAccount" | "system";
2248
2232
  id: string;
2233
+ type: "user" | "serviceAccount";
2249
2234
  }>>;
2250
2235
  status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2251
2236
  modelId: z.ZodOptional<z.ZodString>;
@@ -2254,20 +2239,32 @@ export declare const PostAgentMessageResponseSchema: z.ZodObject<{
2254
2239
  inputTokens: z.ZodOptional<z.ZodNumber>;
2255
2240
  outputTokens: z.ZodOptional<z.ZodNumber>;
2256
2241
  totalTokens: z.ZodOptional<z.ZodNumber>;
2257
- reasoningTokens: z.ZodOptional<z.ZodNumber>;
2258
- cachedInputTokens: z.ZodOptional<z.ZodNumber>;
2242
+ uncachedInputTokens: z.ZodOptional<z.ZodNumber>;
2243
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
2244
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
2245
+ textOutputTokens: z.ZodOptional<z.ZodNumber>;
2246
+ reasoningOutputTokens: z.ZodOptional<z.ZodNumber>;
2247
+ reportingStatus: z.ZodEnum<["complete", "partial", "unavailable"]>;
2259
2248
  }, "strip", z.ZodTypeAny, {
2249
+ reportingStatus: "complete" | "partial" | "unavailable";
2260
2250
  inputTokens?: number | undefined;
2261
2251
  outputTokens?: number | undefined;
2262
2252
  totalTokens?: number | undefined;
2263
- reasoningTokens?: number | undefined;
2264
- cachedInputTokens?: number | undefined;
2253
+ uncachedInputTokens?: number | undefined;
2254
+ cacheReadInputTokens?: number | undefined;
2255
+ cacheWriteInputTokens?: number | undefined;
2256
+ textOutputTokens?: number | undefined;
2257
+ reasoningOutputTokens?: number | undefined;
2265
2258
  }, {
2259
+ reportingStatus: "complete" | "partial" | "unavailable";
2266
2260
  inputTokens?: number | undefined;
2267
2261
  outputTokens?: number | undefined;
2268
2262
  totalTokens?: number | undefined;
2269
- reasoningTokens?: number | undefined;
2270
- cachedInputTokens?: number | undefined;
2263
+ uncachedInputTokens?: number | undefined;
2264
+ cacheReadInputTokens?: number | undefined;
2265
+ cacheWriteInputTokens?: number | undefined;
2266
+ textOutputTokens?: number | undefined;
2267
+ reasoningOutputTokens?: number | undefined;
2271
2268
  }>>;
2272
2269
  diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
2273
2270
  code: z.ZodEnum<["output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed"]>;
@@ -2288,41 +2285,41 @@ export declare const PostAgentMessageResponseSchema: z.ZodObject<{
2288
2285
  scope: "output";
2289
2286
  path?: string | undefined;
2290
2287
  }>, "many">>;
2291
- error: z.ZodOptional<z.ZodString>;
2288
+ error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">>>;
2292
2289
  attempt: z.ZodNumber;
2293
2290
  streamId: z.ZodString;
2294
2291
  createdAt: z.ZodString;
2295
2292
  startedAt: z.ZodOptional<z.ZodString>;
2296
2293
  completedAt: z.ZodOptional<z.ZodString>;
2297
2294
  }, "strip", z.ZodTypeAny, {
2298
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2299
2295
  projectId: string;
2300
- agentId: string;
2301
2296
  id: string;
2297
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2298
+ agentId: string;
2302
2299
  threadId: string;
2303
2300
  createdAt: string;
2304
2301
  triggerMessageId: string;
2305
- requestedByPrincipal: {
2306
- type: "user" | "serviceAccount" | "system";
2307
- id: string;
2308
- };
2309
2302
  attempt: number;
2310
2303
  streamId: string;
2311
- error?: string | undefined;
2304
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2312
2305
  startedAt?: string | undefined;
2313
2306
  completedAt?: string | undefined;
2314
- executionPrincipal?: {
2315
- type: "user" | "serviceAccount" | "system";
2307
+ modelId?: string | undefined;
2308
+ requestedBy?: {
2316
2309
  id: string;
2310
+ type: "user" | "serviceAccount";
2317
2311
  } | undefined;
2318
- modelId?: string | undefined;
2319
2312
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2320
2313
  usage?: {
2314
+ reportingStatus: "complete" | "partial" | "unavailable";
2321
2315
  inputTokens?: number | undefined;
2322
2316
  outputTokens?: number | undefined;
2323
2317
  totalTokens?: number | undefined;
2324
- reasoningTokens?: number | undefined;
2325
- cachedInputTokens?: number | undefined;
2318
+ uncachedInputTokens?: number | undefined;
2319
+ cacheReadInputTokens?: number | undefined;
2320
+ cacheWriteInputTokens?: number | undefined;
2321
+ textOutputTokens?: number | undefined;
2322
+ reasoningOutputTokens?: number | undefined;
2326
2323
  } | undefined;
2327
2324
  diagnostics?: {
2328
2325
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -2332,34 +2329,34 @@ export declare const PostAgentMessageResponseSchema: z.ZodObject<{
2332
2329
  path?: string | undefined;
2333
2330
  }[] | undefined;
2334
2331
  }, {
2335
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2336
2332
  projectId: string;
2337
- agentId: string;
2338
2333
  id: string;
2334
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2335
+ agentId: string;
2339
2336
  threadId: string;
2340
2337
  createdAt: string;
2341
2338
  triggerMessageId: string;
2342
- requestedByPrincipal: {
2343
- type: "user" | "serviceAccount" | "system";
2344
- id: string;
2345
- };
2346
2339
  attempt: number;
2347
2340
  streamId: string;
2348
- error?: string | undefined;
2341
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2349
2342
  startedAt?: string | undefined;
2350
2343
  completedAt?: string | undefined;
2351
- executionPrincipal?: {
2352
- type: "user" | "serviceAccount" | "system";
2344
+ modelId?: string | undefined;
2345
+ requestedBy?: {
2353
2346
  id: string;
2347
+ type: "user" | "serviceAccount";
2354
2348
  } | undefined;
2355
- modelId?: string | undefined;
2356
2349
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2357
2350
  usage?: {
2351
+ reportingStatus: "complete" | "partial" | "unavailable";
2358
2352
  inputTokens?: number | undefined;
2359
2353
  outputTokens?: number | undefined;
2360
2354
  totalTokens?: number | undefined;
2361
- reasoningTokens?: number | undefined;
2362
- cachedInputTokens?: number | undefined;
2355
+ uncachedInputTokens?: number | undefined;
2356
+ cacheReadInputTokens?: number | undefined;
2357
+ cacheWriteInputTokens?: number | undefined;
2358
+ textOutputTokens?: number | undefined;
2359
+ reasoningOutputTokens?: number | undefined;
2363
2360
  } | undefined;
2364
2361
  diagnostics?: {
2365
2362
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -2371,34 +2368,34 @@ export declare const PostAgentMessageResponseSchema: z.ZodObject<{
2371
2368
  }>;
2372
2369
  }, "strip", z.ZodTypeAny, {
2373
2370
  run: {
2374
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2375
2371
  projectId: string;
2376
- agentId: string;
2377
2372
  id: string;
2373
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2374
+ agentId: string;
2378
2375
  threadId: string;
2379
2376
  createdAt: string;
2380
2377
  triggerMessageId: string;
2381
- requestedByPrincipal: {
2382
- type: "user" | "serviceAccount" | "system";
2383
- id: string;
2384
- };
2385
2378
  attempt: number;
2386
2379
  streamId: string;
2387
- error?: string | undefined;
2380
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2388
2381
  startedAt?: string | undefined;
2389
2382
  completedAt?: string | undefined;
2390
- executionPrincipal?: {
2391
- type: "user" | "serviceAccount" | "system";
2383
+ modelId?: string | undefined;
2384
+ requestedBy?: {
2392
2385
  id: string;
2386
+ type: "user" | "serviceAccount";
2393
2387
  } | undefined;
2394
- modelId?: string | undefined;
2395
2388
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2396
2389
  usage?: {
2390
+ reportingStatus: "complete" | "partial" | "unavailable";
2397
2391
  inputTokens?: number | undefined;
2398
2392
  outputTokens?: number | undefined;
2399
2393
  totalTokens?: number | undefined;
2400
- reasoningTokens?: number | undefined;
2401
- cachedInputTokens?: number | undefined;
2394
+ uncachedInputTokens?: number | undefined;
2395
+ cacheReadInputTokens?: number | undefined;
2396
+ cacheWriteInputTokens?: number | undefined;
2397
+ textOutputTokens?: number | undefined;
2398
+ reasoningOutputTokens?: number | undefined;
2402
2399
  } | undefined;
2403
2400
  diagnostics?: {
2404
2401
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -2410,34 +2407,34 @@ export declare const PostAgentMessageResponseSchema: z.ZodObject<{
2410
2407
  };
2411
2408
  }, {
2412
2409
  run: {
2413
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2414
2410
  projectId: string;
2415
- agentId: string;
2416
2411
  id: string;
2412
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2413
+ agentId: string;
2417
2414
  threadId: string;
2418
2415
  createdAt: string;
2419
2416
  triggerMessageId: string;
2420
- requestedByPrincipal: {
2421
- type: "user" | "serviceAccount" | "system";
2422
- id: string;
2423
- };
2424
2417
  attempt: number;
2425
2418
  streamId: string;
2426
- error?: string | undefined;
2419
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2427
2420
  startedAt?: string | undefined;
2428
2421
  completedAt?: string | undefined;
2429
- executionPrincipal?: {
2430
- type: "user" | "serviceAccount" | "system";
2422
+ modelId?: string | undefined;
2423
+ requestedBy?: {
2431
2424
  id: string;
2425
+ type: "user" | "serviceAccount";
2432
2426
  } | undefined;
2433
- modelId?: string | undefined;
2434
2427
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2435
2428
  usage?: {
2429
+ reportingStatus: "complete" | "partial" | "unavailable";
2436
2430
  inputTokens?: number | undefined;
2437
2431
  outputTokens?: number | undefined;
2438
2432
  totalTokens?: number | undefined;
2439
- reasoningTokens?: number | undefined;
2440
- cachedInputTokens?: number | undefined;
2433
+ uncachedInputTokens?: number | undefined;
2434
+ cacheReadInputTokens?: number | undefined;
2435
+ cacheWriteInputTokens?: number | undefined;
2436
+ textOutputTokens?: number | undefined;
2437
+ reasoningOutputTokens?: number | undefined;
2441
2438
  } | undefined;
2442
2439
  diagnostics?: {
2443
2440
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -2455,25 +2452,15 @@ export declare const CancelAgentRunResponseSchema: z.ZodObject<{
2455
2452
  threadId: z.ZodString;
2456
2453
  agentId: z.ZodString;
2457
2454
  triggerMessageId: z.ZodString;
2458
- requestedByPrincipal: z.ZodObject<{
2459
- type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2460
- id: z.ZodString;
2461
- }, "strip", z.ZodTypeAny, {
2462
- type: "user" | "serviceAccount" | "system";
2463
- id: string;
2464
- }, {
2465
- type: "user" | "serviceAccount" | "system";
2466
- id: string;
2467
- }>;
2468
- executionPrincipal: z.ZodOptional<z.ZodObject<{
2469
- type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2455
+ requestedBy: z.ZodOptional<z.ZodObject<{
2456
+ type: z.ZodEnum<["user", "serviceAccount"]>;
2470
2457
  id: z.ZodString;
2471
2458
  }, "strip", z.ZodTypeAny, {
2472
- type: "user" | "serviceAccount" | "system";
2473
2459
  id: string;
2460
+ type: "user" | "serviceAccount";
2474
2461
  }, {
2475
- type: "user" | "serviceAccount" | "system";
2476
2462
  id: string;
2463
+ type: "user" | "serviceAccount";
2477
2464
  }>>;
2478
2465
  status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2479
2466
  modelId: z.ZodOptional<z.ZodString>;
@@ -2482,20 +2469,32 @@ export declare const CancelAgentRunResponseSchema: z.ZodObject<{
2482
2469
  inputTokens: z.ZodOptional<z.ZodNumber>;
2483
2470
  outputTokens: z.ZodOptional<z.ZodNumber>;
2484
2471
  totalTokens: z.ZodOptional<z.ZodNumber>;
2485
- reasoningTokens: z.ZodOptional<z.ZodNumber>;
2486
- cachedInputTokens: z.ZodOptional<z.ZodNumber>;
2472
+ uncachedInputTokens: z.ZodOptional<z.ZodNumber>;
2473
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
2474
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
2475
+ textOutputTokens: z.ZodOptional<z.ZodNumber>;
2476
+ reasoningOutputTokens: z.ZodOptional<z.ZodNumber>;
2477
+ reportingStatus: z.ZodEnum<["complete", "partial", "unavailable"]>;
2487
2478
  }, "strip", z.ZodTypeAny, {
2479
+ reportingStatus: "complete" | "partial" | "unavailable";
2488
2480
  inputTokens?: number | undefined;
2489
2481
  outputTokens?: number | undefined;
2490
2482
  totalTokens?: number | undefined;
2491
- reasoningTokens?: number | undefined;
2492
- cachedInputTokens?: number | undefined;
2483
+ uncachedInputTokens?: number | undefined;
2484
+ cacheReadInputTokens?: number | undefined;
2485
+ cacheWriteInputTokens?: number | undefined;
2486
+ textOutputTokens?: number | undefined;
2487
+ reasoningOutputTokens?: number | undefined;
2493
2488
  }, {
2489
+ reportingStatus: "complete" | "partial" | "unavailable";
2494
2490
  inputTokens?: number | undefined;
2495
2491
  outputTokens?: number | undefined;
2496
2492
  totalTokens?: number | undefined;
2497
- reasoningTokens?: number | undefined;
2498
- cachedInputTokens?: number | undefined;
2493
+ uncachedInputTokens?: number | undefined;
2494
+ cacheReadInputTokens?: number | undefined;
2495
+ cacheWriteInputTokens?: number | undefined;
2496
+ textOutputTokens?: number | undefined;
2497
+ reasoningOutputTokens?: number | undefined;
2499
2498
  }>>;
2500
2499
  diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
2501
2500
  code: z.ZodEnum<["output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed"]>;
@@ -2516,41 +2515,41 @@ export declare const CancelAgentRunResponseSchema: z.ZodObject<{
2516
2515
  scope: "output";
2517
2516
  path?: string | undefined;
2518
2517
  }>, "many">>;
2519
- error: z.ZodOptional<z.ZodString>;
2518
+ error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">>>;
2520
2519
  attempt: z.ZodNumber;
2521
2520
  streamId: z.ZodString;
2522
2521
  createdAt: z.ZodString;
2523
2522
  startedAt: z.ZodOptional<z.ZodString>;
2524
2523
  completedAt: z.ZodOptional<z.ZodString>;
2525
2524
  }, "strip", z.ZodTypeAny, {
2526
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2527
2525
  projectId: string;
2528
- agentId: string;
2529
2526
  id: string;
2527
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2528
+ agentId: string;
2530
2529
  threadId: string;
2531
2530
  createdAt: string;
2532
2531
  triggerMessageId: string;
2533
- requestedByPrincipal: {
2534
- type: "user" | "serviceAccount" | "system";
2535
- id: string;
2536
- };
2537
2532
  attempt: number;
2538
2533
  streamId: string;
2539
- error?: string | undefined;
2534
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2540
2535
  startedAt?: string | undefined;
2541
2536
  completedAt?: string | undefined;
2542
- executionPrincipal?: {
2543
- type: "user" | "serviceAccount" | "system";
2537
+ modelId?: string | undefined;
2538
+ requestedBy?: {
2544
2539
  id: string;
2540
+ type: "user" | "serviceAccount";
2545
2541
  } | undefined;
2546
- modelId?: string | undefined;
2547
2542
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2548
2543
  usage?: {
2544
+ reportingStatus: "complete" | "partial" | "unavailable";
2549
2545
  inputTokens?: number | undefined;
2550
2546
  outputTokens?: number | undefined;
2551
2547
  totalTokens?: number | undefined;
2552
- reasoningTokens?: number | undefined;
2553
- cachedInputTokens?: number | undefined;
2548
+ uncachedInputTokens?: number | undefined;
2549
+ cacheReadInputTokens?: number | undefined;
2550
+ cacheWriteInputTokens?: number | undefined;
2551
+ textOutputTokens?: number | undefined;
2552
+ reasoningOutputTokens?: number | undefined;
2554
2553
  } | undefined;
2555
2554
  diagnostics?: {
2556
2555
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -2560,34 +2559,34 @@ export declare const CancelAgentRunResponseSchema: z.ZodObject<{
2560
2559
  path?: string | undefined;
2561
2560
  }[] | undefined;
2562
2561
  }, {
2563
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2564
2562
  projectId: string;
2565
- agentId: string;
2566
2563
  id: string;
2564
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2565
+ agentId: string;
2567
2566
  threadId: string;
2568
2567
  createdAt: string;
2569
2568
  triggerMessageId: string;
2570
- requestedByPrincipal: {
2571
- type: "user" | "serviceAccount" | "system";
2572
- id: string;
2573
- };
2574
2569
  attempt: number;
2575
2570
  streamId: string;
2576
- error?: string | undefined;
2571
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2577
2572
  startedAt?: string | undefined;
2578
2573
  completedAt?: string | undefined;
2579
- executionPrincipal?: {
2580
- type: "user" | "serviceAccount" | "system";
2574
+ modelId?: string | undefined;
2575
+ requestedBy?: {
2581
2576
  id: string;
2577
+ type: "user" | "serviceAccount";
2582
2578
  } | undefined;
2583
- modelId?: string | undefined;
2584
2579
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2585
2580
  usage?: {
2581
+ reportingStatus: "complete" | "partial" | "unavailable";
2586
2582
  inputTokens?: number | undefined;
2587
2583
  outputTokens?: number | undefined;
2588
2584
  totalTokens?: number | undefined;
2589
- reasoningTokens?: number | undefined;
2590
- cachedInputTokens?: number | undefined;
2585
+ uncachedInputTokens?: number | undefined;
2586
+ cacheReadInputTokens?: number | undefined;
2587
+ cacheWriteInputTokens?: number | undefined;
2588
+ textOutputTokens?: number | undefined;
2589
+ reasoningOutputTokens?: number | undefined;
2591
2590
  } | undefined;
2592
2591
  diagnostics?: {
2593
2592
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -2599,34 +2598,34 @@ export declare const CancelAgentRunResponseSchema: z.ZodObject<{
2599
2598
  }>;
2600
2599
  }, "strip", z.ZodTypeAny, {
2601
2600
  run: {
2602
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2603
2601
  projectId: string;
2604
- agentId: string;
2605
2602
  id: string;
2603
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2604
+ agentId: string;
2606
2605
  threadId: string;
2607
2606
  createdAt: string;
2608
2607
  triggerMessageId: string;
2609
- requestedByPrincipal: {
2610
- type: "user" | "serviceAccount" | "system";
2611
- id: string;
2612
- };
2613
2608
  attempt: number;
2614
2609
  streamId: string;
2615
- error?: string | undefined;
2610
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2616
2611
  startedAt?: string | undefined;
2617
2612
  completedAt?: string | undefined;
2618
- executionPrincipal?: {
2619
- type: "user" | "serviceAccount" | "system";
2613
+ modelId?: string | undefined;
2614
+ requestedBy?: {
2620
2615
  id: string;
2616
+ type: "user" | "serviceAccount";
2621
2617
  } | undefined;
2622
- modelId?: string | undefined;
2623
2618
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2624
2619
  usage?: {
2620
+ reportingStatus: "complete" | "partial" | "unavailable";
2625
2621
  inputTokens?: number | undefined;
2626
2622
  outputTokens?: number | undefined;
2627
2623
  totalTokens?: number | undefined;
2628
- reasoningTokens?: number | undefined;
2629
- cachedInputTokens?: number | undefined;
2624
+ uncachedInputTokens?: number | undefined;
2625
+ cacheReadInputTokens?: number | undefined;
2626
+ cacheWriteInputTokens?: number | undefined;
2627
+ textOutputTokens?: number | undefined;
2628
+ reasoningOutputTokens?: number | undefined;
2630
2629
  } | undefined;
2631
2630
  diagnostics?: {
2632
2631
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -2638,34 +2637,34 @@ export declare const CancelAgentRunResponseSchema: z.ZodObject<{
2638
2637
  };
2639
2638
  }, {
2640
2639
  run: {
2641
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2642
2640
  projectId: string;
2643
- agentId: string;
2644
2641
  id: string;
2642
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2643
+ agentId: string;
2645
2644
  threadId: string;
2646
2645
  createdAt: string;
2647
2646
  triggerMessageId: string;
2648
- requestedByPrincipal: {
2649
- type: "user" | "serviceAccount" | "system";
2650
- id: string;
2651
- };
2652
2647
  attempt: number;
2653
2648
  streamId: string;
2654
- error?: string | undefined;
2649
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2655
2650
  startedAt?: string | undefined;
2656
2651
  completedAt?: string | undefined;
2657
- executionPrincipal?: {
2658
- type: "user" | "serviceAccount" | "system";
2652
+ modelId?: string | undefined;
2653
+ requestedBy?: {
2659
2654
  id: string;
2655
+ type: "user" | "serviceAccount";
2660
2656
  } | undefined;
2661
- modelId?: string | undefined;
2662
2657
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2663
2658
  usage?: {
2659
+ reportingStatus: "complete" | "partial" | "unavailable";
2664
2660
  inputTokens?: number | undefined;
2665
2661
  outputTokens?: number | undefined;
2666
2662
  totalTokens?: number | undefined;
2667
- reasoningTokens?: number | undefined;
2668
- cachedInputTokens?: number | undefined;
2663
+ uncachedInputTokens?: number | undefined;
2664
+ cacheReadInputTokens?: number | undefined;
2665
+ cacheWriteInputTokens?: number | undefined;
2666
+ textOutputTokens?: number | undefined;
2667
+ reasoningOutputTokens?: number | undefined;
2669
2668
  } | undefined;
2670
2669
  diagnostics?: {
2671
2670
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -2683,25 +2682,15 @@ export declare const RetryAgentRunResponseSchema: z.ZodObject<{
2683
2682
  threadId: z.ZodString;
2684
2683
  agentId: z.ZodString;
2685
2684
  triggerMessageId: z.ZodString;
2686
- requestedByPrincipal: z.ZodObject<{
2687
- type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2688
- id: z.ZodString;
2689
- }, "strip", z.ZodTypeAny, {
2690
- type: "user" | "serviceAccount" | "system";
2691
- id: string;
2692
- }, {
2693
- type: "user" | "serviceAccount" | "system";
2694
- id: string;
2695
- }>;
2696
- executionPrincipal: z.ZodOptional<z.ZodObject<{
2697
- type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2685
+ requestedBy: z.ZodOptional<z.ZodObject<{
2686
+ type: z.ZodEnum<["user", "serviceAccount"]>;
2698
2687
  id: z.ZodString;
2699
2688
  }, "strip", z.ZodTypeAny, {
2700
- type: "user" | "serviceAccount" | "system";
2701
2689
  id: string;
2690
+ type: "user" | "serviceAccount";
2702
2691
  }, {
2703
- type: "user" | "serviceAccount" | "system";
2704
2692
  id: string;
2693
+ type: "user" | "serviceAccount";
2705
2694
  }>>;
2706
2695
  status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2707
2696
  modelId: z.ZodOptional<z.ZodString>;
@@ -2710,20 +2699,32 @@ export declare const RetryAgentRunResponseSchema: z.ZodObject<{
2710
2699
  inputTokens: z.ZodOptional<z.ZodNumber>;
2711
2700
  outputTokens: z.ZodOptional<z.ZodNumber>;
2712
2701
  totalTokens: z.ZodOptional<z.ZodNumber>;
2713
- reasoningTokens: z.ZodOptional<z.ZodNumber>;
2714
- cachedInputTokens: z.ZodOptional<z.ZodNumber>;
2702
+ uncachedInputTokens: z.ZodOptional<z.ZodNumber>;
2703
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
2704
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
2705
+ textOutputTokens: z.ZodOptional<z.ZodNumber>;
2706
+ reasoningOutputTokens: z.ZodOptional<z.ZodNumber>;
2707
+ reportingStatus: z.ZodEnum<["complete", "partial", "unavailable"]>;
2715
2708
  }, "strip", z.ZodTypeAny, {
2709
+ reportingStatus: "complete" | "partial" | "unavailable";
2716
2710
  inputTokens?: number | undefined;
2717
2711
  outputTokens?: number | undefined;
2718
2712
  totalTokens?: number | undefined;
2719
- reasoningTokens?: number | undefined;
2720
- cachedInputTokens?: number | undefined;
2713
+ uncachedInputTokens?: number | undefined;
2714
+ cacheReadInputTokens?: number | undefined;
2715
+ cacheWriteInputTokens?: number | undefined;
2716
+ textOutputTokens?: number | undefined;
2717
+ reasoningOutputTokens?: number | undefined;
2721
2718
  }, {
2719
+ reportingStatus: "complete" | "partial" | "unavailable";
2722
2720
  inputTokens?: number | undefined;
2723
2721
  outputTokens?: number | undefined;
2724
2722
  totalTokens?: number | undefined;
2725
- reasoningTokens?: number | undefined;
2726
- cachedInputTokens?: number | undefined;
2723
+ uncachedInputTokens?: number | undefined;
2724
+ cacheReadInputTokens?: number | undefined;
2725
+ cacheWriteInputTokens?: number | undefined;
2726
+ textOutputTokens?: number | undefined;
2727
+ reasoningOutputTokens?: number | undefined;
2727
2728
  }>>;
2728
2729
  diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
2729
2730
  code: z.ZodEnum<["output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed"]>;
@@ -2744,41 +2745,41 @@ export declare const RetryAgentRunResponseSchema: z.ZodObject<{
2744
2745
  scope: "output";
2745
2746
  path?: string | undefined;
2746
2747
  }>, "many">>;
2747
- error: z.ZodOptional<z.ZodString>;
2748
+ error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">>>;
2748
2749
  attempt: z.ZodNumber;
2749
2750
  streamId: z.ZodString;
2750
2751
  createdAt: z.ZodString;
2751
2752
  startedAt: z.ZodOptional<z.ZodString>;
2752
2753
  completedAt: z.ZodOptional<z.ZodString>;
2753
2754
  }, "strip", z.ZodTypeAny, {
2754
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2755
2755
  projectId: string;
2756
- agentId: string;
2757
2756
  id: string;
2757
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2758
+ agentId: string;
2758
2759
  threadId: string;
2759
2760
  createdAt: string;
2760
2761
  triggerMessageId: string;
2761
- requestedByPrincipal: {
2762
- type: "user" | "serviceAccount" | "system";
2763
- id: string;
2764
- };
2765
2762
  attempt: number;
2766
2763
  streamId: string;
2767
- error?: string | undefined;
2764
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2768
2765
  startedAt?: string | undefined;
2769
2766
  completedAt?: string | undefined;
2770
- executionPrincipal?: {
2771
- type: "user" | "serviceAccount" | "system";
2767
+ modelId?: string | undefined;
2768
+ requestedBy?: {
2772
2769
  id: string;
2770
+ type: "user" | "serviceAccount";
2773
2771
  } | undefined;
2774
- modelId?: string | undefined;
2775
2772
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2776
2773
  usage?: {
2774
+ reportingStatus: "complete" | "partial" | "unavailable";
2777
2775
  inputTokens?: number | undefined;
2778
2776
  outputTokens?: number | undefined;
2779
2777
  totalTokens?: number | undefined;
2780
- reasoningTokens?: number | undefined;
2781
- cachedInputTokens?: number | undefined;
2778
+ uncachedInputTokens?: number | undefined;
2779
+ cacheReadInputTokens?: number | undefined;
2780
+ cacheWriteInputTokens?: number | undefined;
2781
+ textOutputTokens?: number | undefined;
2782
+ reasoningOutputTokens?: number | undefined;
2782
2783
  } | undefined;
2783
2784
  diagnostics?: {
2784
2785
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -2788,34 +2789,34 @@ export declare const RetryAgentRunResponseSchema: z.ZodObject<{
2788
2789
  path?: string | undefined;
2789
2790
  }[] | undefined;
2790
2791
  }, {
2791
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2792
2792
  projectId: string;
2793
- agentId: string;
2794
2793
  id: string;
2794
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2795
+ agentId: string;
2795
2796
  threadId: string;
2796
2797
  createdAt: string;
2797
2798
  triggerMessageId: string;
2798
- requestedByPrincipal: {
2799
- type: "user" | "serviceAccount" | "system";
2800
- id: string;
2801
- };
2802
2799
  attempt: number;
2803
2800
  streamId: string;
2804
- error?: string | undefined;
2801
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2805
2802
  startedAt?: string | undefined;
2806
2803
  completedAt?: string | undefined;
2807
- executionPrincipal?: {
2808
- type: "user" | "serviceAccount" | "system";
2804
+ modelId?: string | undefined;
2805
+ requestedBy?: {
2809
2806
  id: string;
2807
+ type: "user" | "serviceAccount";
2810
2808
  } | undefined;
2811
- modelId?: string | undefined;
2812
2809
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2813
2810
  usage?: {
2811
+ reportingStatus: "complete" | "partial" | "unavailable";
2814
2812
  inputTokens?: number | undefined;
2815
2813
  outputTokens?: number | undefined;
2816
2814
  totalTokens?: number | undefined;
2817
- reasoningTokens?: number | undefined;
2818
- cachedInputTokens?: number | undefined;
2815
+ uncachedInputTokens?: number | undefined;
2816
+ cacheReadInputTokens?: number | undefined;
2817
+ cacheWriteInputTokens?: number | undefined;
2818
+ textOutputTokens?: number | undefined;
2819
+ reasoningOutputTokens?: number | undefined;
2819
2820
  } | undefined;
2820
2821
  diagnostics?: {
2821
2822
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -2827,34 +2828,34 @@ export declare const RetryAgentRunResponseSchema: z.ZodObject<{
2827
2828
  }>;
2828
2829
  }, "strip", z.ZodTypeAny, {
2829
2830
  run: {
2830
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2831
2831
  projectId: string;
2832
- agentId: string;
2833
2832
  id: string;
2833
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2834
+ agentId: string;
2834
2835
  threadId: string;
2835
2836
  createdAt: string;
2836
2837
  triggerMessageId: string;
2837
- requestedByPrincipal: {
2838
- type: "user" | "serviceAccount" | "system";
2839
- id: string;
2840
- };
2841
2838
  attempt: number;
2842
2839
  streamId: string;
2843
- error?: string | undefined;
2840
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2844
2841
  startedAt?: string | undefined;
2845
2842
  completedAt?: string | undefined;
2846
- executionPrincipal?: {
2847
- type: "user" | "serviceAccount" | "system";
2843
+ modelId?: string | undefined;
2844
+ requestedBy?: {
2848
2845
  id: string;
2846
+ type: "user" | "serviceAccount";
2849
2847
  } | undefined;
2850
- modelId?: string | undefined;
2851
2848
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2852
2849
  usage?: {
2850
+ reportingStatus: "complete" | "partial" | "unavailable";
2853
2851
  inputTokens?: number | undefined;
2854
2852
  outputTokens?: number | undefined;
2855
2853
  totalTokens?: number | undefined;
2856
- reasoningTokens?: number | undefined;
2857
- cachedInputTokens?: number | undefined;
2854
+ uncachedInputTokens?: number | undefined;
2855
+ cacheReadInputTokens?: number | undefined;
2856
+ cacheWriteInputTokens?: number | undefined;
2857
+ textOutputTokens?: number | undefined;
2858
+ reasoningOutputTokens?: number | undefined;
2858
2859
  } | undefined;
2859
2860
  diagnostics?: {
2860
2861
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -2866,34 +2867,34 @@ export declare const RetryAgentRunResponseSchema: z.ZodObject<{
2866
2867
  };
2867
2868
  }, {
2868
2869
  run: {
2869
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2870
2870
  projectId: string;
2871
- agentId: string;
2872
2871
  id: string;
2872
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2873
+ agentId: string;
2873
2874
  threadId: string;
2874
2875
  createdAt: string;
2875
2876
  triggerMessageId: string;
2876
- requestedByPrincipal: {
2877
- type: "user" | "serviceAccount" | "system";
2878
- id: string;
2879
- };
2880
2877
  attempt: number;
2881
2878
  streamId: string;
2882
- error?: string | undefined;
2879
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2883
2880
  startedAt?: string | undefined;
2884
2881
  completedAt?: string | undefined;
2885
- executionPrincipal?: {
2886
- type: "user" | "serviceAccount" | "system";
2882
+ modelId?: string | undefined;
2883
+ requestedBy?: {
2887
2884
  id: string;
2885
+ type: "user" | "serviceAccount";
2888
2886
  } | undefined;
2889
- modelId?: string | undefined;
2890
2887
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2891
2888
  usage?: {
2889
+ reportingStatus: "complete" | "partial" | "unavailable";
2892
2890
  inputTokens?: number | undefined;
2893
2891
  outputTokens?: number | undefined;
2894
2892
  totalTokens?: number | undefined;
2895
- reasoningTokens?: number | undefined;
2896
- cachedInputTokens?: number | undefined;
2893
+ uncachedInputTokens?: number | undefined;
2894
+ cacheReadInputTokens?: number | undefined;
2895
+ cacheWriteInputTokens?: number | undefined;
2896
+ textOutputTokens?: number | undefined;
2897
+ reasoningOutputTokens?: number | undefined;
2897
2898
  } | undefined;
2898
2899
  diagnostics?: {
2899
2900
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -2927,25 +2928,15 @@ export declare const AgentRunListResponseSchema: z.ZodObject<{
2927
2928
  threadId: z.ZodString;
2928
2929
  agentId: z.ZodString;
2929
2930
  triggerMessageId: z.ZodString;
2930
- requestedByPrincipal: z.ZodObject<{
2931
- type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2932
- id: z.ZodString;
2933
- }, "strip", z.ZodTypeAny, {
2934
- type: "user" | "serviceAccount" | "system";
2935
- id: string;
2936
- }, {
2937
- type: "user" | "serviceAccount" | "system";
2938
- id: string;
2939
- }>;
2940
- executionPrincipal: z.ZodOptional<z.ZodObject<{
2941
- type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2931
+ requestedBy: z.ZodOptional<z.ZodObject<{
2932
+ type: z.ZodEnum<["user", "serviceAccount"]>;
2942
2933
  id: z.ZodString;
2943
2934
  }, "strip", z.ZodTypeAny, {
2944
- type: "user" | "serviceAccount" | "system";
2945
2935
  id: string;
2936
+ type: "user" | "serviceAccount";
2946
2937
  }, {
2947
- type: "user" | "serviceAccount" | "system";
2948
2938
  id: string;
2939
+ type: "user" | "serviceAccount";
2949
2940
  }>>;
2950
2941
  status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2951
2942
  modelId: z.ZodOptional<z.ZodString>;
@@ -2954,20 +2945,32 @@ export declare const AgentRunListResponseSchema: z.ZodObject<{
2954
2945
  inputTokens: z.ZodOptional<z.ZodNumber>;
2955
2946
  outputTokens: z.ZodOptional<z.ZodNumber>;
2956
2947
  totalTokens: z.ZodOptional<z.ZodNumber>;
2957
- reasoningTokens: z.ZodOptional<z.ZodNumber>;
2958
- cachedInputTokens: z.ZodOptional<z.ZodNumber>;
2948
+ uncachedInputTokens: z.ZodOptional<z.ZodNumber>;
2949
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
2950
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
2951
+ textOutputTokens: z.ZodOptional<z.ZodNumber>;
2952
+ reasoningOutputTokens: z.ZodOptional<z.ZodNumber>;
2953
+ reportingStatus: z.ZodEnum<["complete", "partial", "unavailable"]>;
2959
2954
  }, "strip", z.ZodTypeAny, {
2955
+ reportingStatus: "complete" | "partial" | "unavailable";
2960
2956
  inputTokens?: number | undefined;
2961
2957
  outputTokens?: number | undefined;
2962
2958
  totalTokens?: number | undefined;
2963
- reasoningTokens?: number | undefined;
2964
- cachedInputTokens?: number | undefined;
2959
+ uncachedInputTokens?: number | undefined;
2960
+ cacheReadInputTokens?: number | undefined;
2961
+ cacheWriteInputTokens?: number | undefined;
2962
+ textOutputTokens?: number | undefined;
2963
+ reasoningOutputTokens?: number | undefined;
2965
2964
  }, {
2965
+ reportingStatus: "complete" | "partial" | "unavailable";
2966
2966
  inputTokens?: number | undefined;
2967
2967
  outputTokens?: number | undefined;
2968
2968
  totalTokens?: number | undefined;
2969
- reasoningTokens?: number | undefined;
2970
- cachedInputTokens?: number | undefined;
2969
+ uncachedInputTokens?: number | undefined;
2970
+ cacheReadInputTokens?: number | undefined;
2971
+ cacheWriteInputTokens?: number | undefined;
2972
+ textOutputTokens?: number | undefined;
2973
+ reasoningOutputTokens?: number | undefined;
2971
2974
  }>>;
2972
2975
  diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
2973
2976
  code: z.ZodEnum<["output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed"]>;
@@ -2988,41 +2991,41 @@ export declare const AgentRunListResponseSchema: z.ZodObject<{
2988
2991
  scope: "output";
2989
2992
  path?: string | undefined;
2990
2993
  }>, "many">>;
2991
- error: z.ZodOptional<z.ZodString>;
2994
+ error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">>>;
2992
2995
  attempt: z.ZodNumber;
2993
2996
  streamId: z.ZodString;
2994
2997
  createdAt: z.ZodString;
2995
2998
  startedAt: z.ZodOptional<z.ZodString>;
2996
2999
  completedAt: z.ZodOptional<z.ZodString>;
2997
3000
  }, "strip", z.ZodTypeAny, {
2998
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2999
3001
  projectId: string;
3000
- agentId: string;
3001
3002
  id: string;
3003
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3004
+ agentId: string;
3002
3005
  threadId: string;
3003
3006
  createdAt: string;
3004
3007
  triggerMessageId: string;
3005
- requestedByPrincipal: {
3006
- type: "user" | "serviceAccount" | "system";
3007
- id: string;
3008
- };
3009
3008
  attempt: number;
3010
3009
  streamId: string;
3011
- error?: string | undefined;
3010
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3012
3011
  startedAt?: string | undefined;
3013
3012
  completedAt?: string | undefined;
3014
- executionPrincipal?: {
3015
- type: "user" | "serviceAccount" | "system";
3013
+ modelId?: string | undefined;
3014
+ requestedBy?: {
3016
3015
  id: string;
3016
+ type: "user" | "serviceAccount";
3017
3017
  } | undefined;
3018
- modelId?: string | undefined;
3019
3018
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
3020
3019
  usage?: {
3020
+ reportingStatus: "complete" | "partial" | "unavailable";
3021
3021
  inputTokens?: number | undefined;
3022
3022
  outputTokens?: number | undefined;
3023
3023
  totalTokens?: number | undefined;
3024
- reasoningTokens?: number | undefined;
3025
- cachedInputTokens?: number | undefined;
3024
+ uncachedInputTokens?: number | undefined;
3025
+ cacheReadInputTokens?: number | undefined;
3026
+ cacheWriteInputTokens?: number | undefined;
3027
+ textOutputTokens?: number | undefined;
3028
+ reasoningOutputTokens?: number | undefined;
3026
3029
  } | undefined;
3027
3030
  diagnostics?: {
3028
3031
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -3032,34 +3035,34 @@ export declare const AgentRunListResponseSchema: z.ZodObject<{
3032
3035
  path?: string | undefined;
3033
3036
  }[] | undefined;
3034
3037
  }, {
3035
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3036
3038
  projectId: string;
3037
- agentId: string;
3038
3039
  id: string;
3040
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3041
+ agentId: string;
3039
3042
  threadId: string;
3040
3043
  createdAt: string;
3041
3044
  triggerMessageId: string;
3042
- requestedByPrincipal: {
3043
- type: "user" | "serviceAccount" | "system";
3044
- id: string;
3045
- };
3046
3045
  attempt: number;
3047
3046
  streamId: string;
3048
- error?: string | undefined;
3047
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3049
3048
  startedAt?: string | undefined;
3050
3049
  completedAt?: string | undefined;
3051
- executionPrincipal?: {
3052
- type: "user" | "serviceAccount" | "system";
3050
+ modelId?: string | undefined;
3051
+ requestedBy?: {
3053
3052
  id: string;
3053
+ type: "user" | "serviceAccount";
3054
3054
  } | undefined;
3055
- modelId?: string | undefined;
3056
3055
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
3057
3056
  usage?: {
3057
+ reportingStatus: "complete" | "partial" | "unavailable";
3058
3058
  inputTokens?: number | undefined;
3059
3059
  outputTokens?: number | undefined;
3060
3060
  totalTokens?: number | undefined;
3061
- reasoningTokens?: number | undefined;
3062
- cachedInputTokens?: number | undefined;
3061
+ uncachedInputTokens?: number | undefined;
3062
+ cacheReadInputTokens?: number | undefined;
3063
+ cacheWriteInputTokens?: number | undefined;
3064
+ textOutputTokens?: number | undefined;
3065
+ reasoningOutputTokens?: number | undefined;
3063
3066
  } | undefined;
3064
3067
  diagnostics?: {
3065
3068
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -3073,34 +3076,34 @@ export declare const AgentRunListResponseSchema: z.ZodObject<{
3073
3076
  total: z.ZodNumber;
3074
3077
  }, "strip", z.ZodTypeAny, {
3075
3078
  runs: {
3076
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3077
3079
  projectId: string;
3078
- agentId: string;
3079
3080
  id: string;
3081
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3082
+ agentId: string;
3080
3083
  threadId: string;
3081
3084
  createdAt: string;
3082
3085
  triggerMessageId: string;
3083
- requestedByPrincipal: {
3084
- type: "user" | "serviceAccount" | "system";
3085
- id: string;
3086
- };
3087
3086
  attempt: number;
3088
3087
  streamId: string;
3089
- error?: string | undefined;
3088
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3090
3089
  startedAt?: string | undefined;
3091
3090
  completedAt?: string | undefined;
3092
- executionPrincipal?: {
3093
- type: "user" | "serviceAccount" | "system";
3091
+ modelId?: string | undefined;
3092
+ requestedBy?: {
3094
3093
  id: string;
3094
+ type: "user" | "serviceAccount";
3095
3095
  } | undefined;
3096
- modelId?: string | undefined;
3097
3096
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
3098
3097
  usage?: {
3098
+ reportingStatus: "complete" | "partial" | "unavailable";
3099
3099
  inputTokens?: number | undefined;
3100
3100
  outputTokens?: number | undefined;
3101
3101
  totalTokens?: number | undefined;
3102
- reasoningTokens?: number | undefined;
3103
- cachedInputTokens?: number | undefined;
3102
+ uncachedInputTokens?: number | undefined;
3103
+ cacheReadInputTokens?: number | undefined;
3104
+ cacheWriteInputTokens?: number | undefined;
3105
+ textOutputTokens?: number | undefined;
3106
+ reasoningOutputTokens?: number | undefined;
3104
3107
  } | undefined;
3105
3108
  diagnostics?: {
3106
3109
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -3114,34 +3117,34 @@ export declare const AgentRunListResponseSchema: z.ZodObject<{
3114
3117
  total: number;
3115
3118
  }, {
3116
3119
  runs: {
3117
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3118
3120
  projectId: string;
3119
- agentId: string;
3120
3121
  id: string;
3122
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3123
+ agentId: string;
3121
3124
  threadId: string;
3122
3125
  createdAt: string;
3123
3126
  triggerMessageId: string;
3124
- requestedByPrincipal: {
3125
- type: "user" | "serviceAccount" | "system";
3126
- id: string;
3127
- };
3128
3127
  attempt: number;
3129
3128
  streamId: string;
3130
- error?: string | undefined;
3129
+ error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3131
3130
  startedAt?: string | undefined;
3132
3131
  completedAt?: string | undefined;
3133
- executionPrincipal?: {
3134
- type: "user" | "serviceAccount" | "system";
3132
+ modelId?: string | undefined;
3133
+ requestedBy?: {
3135
3134
  id: string;
3135
+ type: "user" | "serviceAccount";
3136
3136
  } | undefined;
3137
- modelId?: string | undefined;
3138
3137
  finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
3139
3138
  usage?: {
3139
+ reportingStatus: "complete" | "partial" | "unavailable";
3140
3140
  inputTokens?: number | undefined;
3141
3141
  outputTokens?: number | undefined;
3142
3142
  totalTokens?: number | undefined;
3143
- reasoningTokens?: number | undefined;
3144
- cachedInputTokens?: number | undefined;
3143
+ uncachedInputTokens?: number | undefined;
3144
+ cacheReadInputTokens?: number | undefined;
3145
+ cacheWriteInputTokens?: number | undefined;
3146
+ textOutputTokens?: number | undefined;
3147
+ reasoningOutputTokens?: number | undefined;
3145
3148
  } | undefined;
3146
3149
  diagnostics?: {
3147
3150
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";