@sixb/server 0.1.6 → 0.1.8

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 (120) hide show
  1. package/dist/auth/access-token-boundary.d.ts +3 -0
  2. package/dist/auth/access-token-boundary.d.ts.map +1 -1
  3. package/dist/auth/public-routes.d.ts.map +1 -1
  4. package/dist/auth/scope.d.ts +6 -2
  5. package/dist/auth/scope.d.ts.map +1 -1
  6. package/dist/auth/shared-access.d.ts +66 -0
  7. package/dist/auth/shared-access.d.ts.map +1 -0
  8. package/dist/files/content.d.ts +8 -0
  9. package/dist/files/content.d.ts.map +1 -1
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +3402 -1693
  13. package/dist/index.js.map +35 -28
  14. package/dist/models/display.d.ts +22 -0
  15. package/dist/models/display.d.ts.map +1 -0
  16. package/dist/openapi/security.d.ts +15 -1
  17. package/dist/openapi/security.d.ts.map +1 -1
  18. package/dist/openapi/tags.d.ts +6 -2
  19. package/dist/openapi/tags.d.ts.map +1 -1
  20. package/dist/registerRoutes.d.ts +2 -0
  21. package/dist/registerRoutes.d.ts.map +1 -1
  22. package/dist/routes/action-runs.d.ts +2 -0
  23. package/dist/routes/action-runs.d.ts.map +1 -1
  24. package/dist/routes/actions.d.ts +1 -0
  25. package/dist/routes/actions.d.ts.map +1 -1
  26. package/dist/routes/agent-api-gateway.d.ts.map +1 -1
  27. package/dist/routes/agents.d.ts +100 -90
  28. package/dist/routes/agents.d.ts.map +1 -1
  29. package/dist/routes/ai-accounting.d.ts.map +1 -1
  30. package/dist/routes/auth.d.ts +143 -24
  31. package/dist/routes/auth.d.ts.map +1 -1
  32. package/dist/routes/connector-connection-runs.d.ts +8 -8
  33. package/dist/routes/connector-connections.d.ts +4 -4
  34. package/dist/routes/datasets.d.ts +5 -3
  35. package/dist/routes/datasets.d.ts.map +1 -1
  36. package/dist/routes/events.d.ts +3 -3
  37. package/dist/routes/files.d.ts +1 -0
  38. package/dist/routes/files.d.ts.map +1 -1
  39. package/dist/routes/logs.d.ts +1 -1
  40. package/dist/routes/models.d.ts +18 -1
  41. package/dist/routes/models.d.ts.map +1 -1
  42. package/dist/routes/objects.d.ts +3 -1
  43. package/dist/routes/objects.d.ts.map +1 -1
  44. package/dist/routes/pipelines.d.ts +6 -1
  45. package/dist/routes/pipelines.d.ts.map +1 -1
  46. package/dist/routes/rules.d.ts +1 -1
  47. package/dist/routes/share-grants.d.ts +264 -0
  48. package/dist/routes/share-grants.d.ts.map +1 -0
  49. package/dist/routes/shared-access.d.ts +155 -0
  50. package/dist/routes/shared-access.d.ts.map +1 -0
  51. package/dist/routes/syncs.d.ts +3 -0
  52. package/dist/routes/syncs.d.ts.map +1 -1
  53. package/dist/routes/workflows.d.ts +58 -55
  54. package/dist/routes/workflows.d.ts.map +1 -1
  55. package/dist/routes/ws/logs.d.ts +4 -4
  56. package/dist/schemas/agents.d.ts +385 -230
  57. package/dist/schemas/agents.d.ts.map +1 -1
  58. package/dist/schemas/ai-accounting.d.ts +1847 -295
  59. package/dist/schemas/ai-accounting.d.ts.map +1 -1
  60. package/dist/schemas/ai-limits.d.ts +2210 -0
  61. package/dist/schemas/ai-limits.d.ts.map +1 -0
  62. package/dist/schemas/auth.d.ts +195 -112
  63. package/dist/schemas/auth.d.ts.map +1 -1
  64. package/dist/schemas/datasets.d.ts +28 -22
  65. package/dist/schemas/datasets.d.ts.map +1 -1
  66. package/dist/schemas/events.d.ts +6 -6
  67. package/dist/schemas/files.d.ts +3 -0
  68. package/dist/schemas/files.d.ts.map +1 -1
  69. package/dist/schemas/logs.d.ts +6 -6
  70. package/dist/schemas/models.d.ts +214 -14
  71. package/dist/schemas/models.d.ts.map +1 -1
  72. package/dist/schemas/objects.d.ts +4 -4
  73. package/dist/schemas/pipelines.d.ts +42 -6
  74. package/dist/schemas/pipelines.d.ts.map +1 -1
  75. package/dist/schemas/rules.d.ts +6 -6
  76. package/dist/schemas/share-grants.d.ts +518 -0
  77. package/dist/schemas/share-grants.d.ts.map +1 -0
  78. package/dist/schemas/shared-access.d.ts +42 -0
  79. package/dist/schemas/shared-access.d.ts.map +1 -0
  80. package/dist/schemas/syncs.d.ts +7 -0
  81. package/dist/schemas/syncs.d.ts.map +1 -1
  82. package/dist/schemas/workflows.d.ts +200 -210
  83. package/dist/schemas/workflows.d.ts.map +1 -1
  84. package/dist/server.d.ts +5 -0
  85. package/dist/server.d.ts.map +1 -1
  86. package/dist/utils/http.d.ts +8 -4
  87. package/dist/utils/http.d.ts.map +1 -1
  88. package/package.json +4 -4
  89. package/src/auth/access-token-boundary.ts +17 -2
  90. package/src/auth/public-routes.ts +23 -0
  91. package/src/auth/scope.ts +3 -2
  92. package/src/auth/shared-access.ts +376 -0
  93. package/src/files/content.ts +39 -6
  94. package/src/index.ts +1 -0
  95. package/src/models/display.ts +91 -0
  96. package/src/openapi/security.ts +20 -1
  97. package/src/openapi/tags.ts +4 -0
  98. package/src/registerRoutes.ts +6 -0
  99. package/src/routes/actions.ts +5 -10
  100. package/src/routes/agent-api-gateway.ts +137 -38
  101. package/src/routes/agents.ts +58 -83
  102. package/src/routes/ai-accounting.ts +414 -23
  103. package/src/routes/auth.ts +280 -1
  104. package/src/routes/models.ts +12 -4
  105. package/src/routes/share-grants.ts +238 -0
  106. package/src/routes/shared-access.ts +165 -0
  107. package/src/routes/workflows.ts +3 -5
  108. package/src/routes/ws/agents.ts +17 -6
  109. package/src/schemas/agents.ts +38 -50
  110. package/src/schemas/ai-accounting.ts +88 -19
  111. package/src/schemas/ai-limits.ts +116 -0
  112. package/src/schemas/auth.ts +32 -0
  113. package/src/schemas/datasets.ts +2 -1
  114. package/src/schemas/files.ts +1 -0
  115. package/src/schemas/models.ts +33 -5
  116. package/src/schemas/share-grants.ts +109 -0
  117. package/src/schemas/shared-access.ts +31 -0
  118. package/src/schemas/workflows.ts +0 -2
  119. package/src/server.ts +91 -1
  120. package/src/utils/http.ts +33 -2
@@ -1,13 +1,6 @@
1
1
  import { type AgentRunFailureCode, type SixbFailure } from "@sixb/core/storage";
2
2
  import { z } from "zod";
3
3
  export declare const AgentRunFailureSchema: z.ZodType<SixbFailure<AgentRunFailureCode>>;
4
- export declare const AgentIdParamsSchema: z.ZodObject<{
5
- agentId: z.ZodString;
6
- }, "strip", z.ZodTypeAny, {
7
- agentId: string;
8
- }, {
9
- agentId: string;
10
- }>;
11
4
  export declare const AgentThreadParamsSchema: z.ZodObject<{
12
5
  threadId: z.ZodString;
13
6
  }, "strip", z.ZodTypeAny, {
@@ -266,7 +259,6 @@ export declare const AgentContextPartSchema: z.ZodObject<{
266
259
  type: z.ZodLiteral<"context">;
267
260
  }, "strip", z.ZodTypeAny, {
268
261
  origin: "ambient" | "explicit";
269
- type: "context";
270
262
  context: {
271
263
  kind: "object";
272
264
  ref: {
@@ -280,9 +272,9 @@ export declare const AgentContextPartSchema: z.ZodObject<{
280
272
  value: import("./common").JsonValue;
281
273
  label: string;
282
274
  };
275
+ type: "context";
283
276
  }, {
284
277
  origin: "ambient" | "explicit";
285
- type: "context";
286
278
  context: {
287
279
  kind: "object";
288
280
  ref: {
@@ -296,167 +288,63 @@ export declare const AgentContextPartSchema: z.ZodObject<{
296
288
  value: import("./common").JsonValue;
297
289
  label: string;
298
290
  };
291
+ type: "context";
299
292
  }>;
300
- export declare const AgentLoopConfigSchema: z.ZodObject<{
301
- stopWhen: z.ZodOptional<z.ZodObject<{
302
- maxSteps: z.ZodOptional<z.ZodNumber>;
303
- }, "strip", z.ZodTypeAny, {
304
- maxSteps?: number | undefined;
305
- }, {
306
- maxSteps?: number | undefined;
307
- }>>;
308
- context: z.ZodOptional<z.ZodObject<{
309
- windowTokens: z.ZodOptional<z.ZodNumber>;
310
- reserveTokens: z.ZodOptional<z.ZodNumber>;
311
- keepRecentTokens: z.ZodOptional<z.ZodNumber>;
312
- }, "strip", z.ZodTypeAny, {
313
- windowTokens?: number | undefined;
314
- reserveTokens?: number | undefined;
315
- keepRecentTokens?: number | undefined;
316
- }, {
317
- windowTokens?: number | undefined;
318
- reserveTokens?: number | undefined;
319
- keepRecentTokens?: number | undefined;
320
- }>>;
321
- }, "strip", z.ZodTypeAny, {
322
- context?: {
323
- windowTokens?: number | undefined;
324
- reserveTokens?: number | undefined;
325
- keepRecentTokens?: number | undefined;
326
- } | undefined;
327
- stopWhen?: {
328
- maxSteps?: number | undefined;
329
- } | undefined;
330
- }, {
331
- context?: {
332
- windowTokens?: number | undefined;
333
- reserveTokens?: number | undefined;
334
- keepRecentTokens?: number | undefined;
335
- } | undefined;
336
- stopWhen?: {
337
- maxSteps?: number | undefined;
338
- } | undefined;
339
- }>;
340
- export declare const AgentReasoningLevelSchema: z.ZodEnum<["provider-default", "none", "minimal", "low", "medium", "high", "xhigh"]>;
341
- export declare const AgentCatalogItemSchema: z.ZodObject<{
342
- id: z.ZodString;
293
+ export declare const AgentDescriptorSchema: z.ZodObject<{
343
294
  name: z.ZodString;
344
- description: z.ZodOptional<z.ZodString>;
345
- modelId: z.ZodOptional<z.ZodString>;
346
- reasoning: z.ZodOptional<z.ZodEnum<["provider-default", "none", "minimal", "low", "medium", "high", "xhigh"]>>;
347
- groupIds: z.ZodArray<z.ZodString, "many">;
348
- loop: z.ZodOptional<z.ZodObject<{
349
- stopWhen: z.ZodOptional<z.ZodObject<{
350
- maxSteps: z.ZodOptional<z.ZodNumber>;
351
- }, "strip", z.ZodTypeAny, {
352
- maxSteps?: number | undefined;
353
- }, {
354
- maxSteps?: number | undefined;
355
- }>>;
356
- context: z.ZodOptional<z.ZodObject<{
357
- windowTokens: z.ZodOptional<z.ZodNumber>;
358
- reserveTokens: z.ZodOptional<z.ZodNumber>;
359
- keepRecentTokens: z.ZodOptional<z.ZodNumber>;
360
- }, "strip", z.ZodTypeAny, {
361
- windowTokens?: number | undefined;
362
- reserveTokens?: number | undefined;
363
- keepRecentTokens?: number | undefined;
364
- }, {
365
- windowTokens?: number | undefined;
366
- reserveTokens?: number | undefined;
367
- keepRecentTokens?: number | undefined;
368
- }>>;
295
+ model: z.ZodObject<{
296
+ provider: z.ZodString;
297
+ modelId: z.ZodString;
369
298
  }, "strip", z.ZodTypeAny, {
370
- context?: {
371
- windowTokens?: number | undefined;
372
- reserveTokens?: number | undefined;
373
- keepRecentTokens?: number | undefined;
374
- } | undefined;
375
- stopWhen?: {
376
- maxSteps?: number | undefined;
377
- } | undefined;
299
+ provider: string;
300
+ modelId: string;
378
301
  }, {
379
- context?: {
380
- windowTokens?: number | undefined;
381
- reserveTokens?: number | undefined;
382
- keepRecentTokens?: number | undefined;
383
- } | undefined;
384
- stopWhen?: {
385
- maxSteps?: number | undefined;
386
- } | undefined;
387
- }>>;
302
+ provider: string;
303
+ modelId: string;
304
+ }>;
388
305
  }, "strip", z.ZodTypeAny, {
389
- id: string;
390
306
  name: string;
391
- groupIds: string[];
392
- description?: string | undefined;
393
- modelId?: string | undefined;
394
- reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
395
- loop?: {
396
- context?: {
397
- windowTokens?: number | undefined;
398
- reserveTokens?: number | undefined;
399
- keepRecentTokens?: number | undefined;
400
- } | undefined;
401
- stopWhen?: {
402
- maxSteps?: number | undefined;
403
- } | undefined;
404
- } | undefined;
307
+ model: {
308
+ provider: string;
309
+ modelId: string;
310
+ };
405
311
  }, {
406
- id: string;
407
312
  name: string;
408
- groupIds: string[];
409
- description?: string | undefined;
410
- modelId?: string | undefined;
411
- reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
412
- loop?: {
413
- context?: {
414
- windowTokens?: number | undefined;
415
- reserveTokens?: number | undefined;
416
- keepRecentTokens?: number | undefined;
417
- } | undefined;
418
- stopWhen?: {
419
- maxSteps?: number | undefined;
420
- } | undefined;
421
- } | undefined;
313
+ model: {
314
+ provider: string;
315
+ modelId: string;
316
+ };
422
317
  }>;
423
318
  export declare const AgentThreadStatusSchema: z.ZodEnum<["active", "archived"]>;
424
319
  export declare const AgentThreadListQuerySchema: z.ZodObject<{
425
- agentId: z.ZodOptional<z.ZodString>;
426
320
  status: z.ZodOptional<z.ZodEnum<["active", "archived"]>>;
427
321
  limit: z.ZodOptional<z.ZodString>;
428
322
  offset: z.ZodOptional<z.ZodString>;
429
323
  order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
430
- }, "strip", z.ZodTypeAny, {
324
+ }, "strict", z.ZodTypeAny, {
431
325
  status?: "active" | "archived" | undefined;
432
326
  limit?: string | undefined;
433
327
  offset?: string | undefined;
434
328
  order?: "asc" | "desc" | undefined;
435
- agentId?: string | undefined;
436
329
  }, {
437
330
  status?: "active" | "archived" | undefined;
438
331
  limit?: string | undefined;
439
332
  offset?: string | undefined;
440
333
  order?: "asc" | "desc" | undefined;
441
- agentId?: string | undefined;
442
334
  }>;
443
335
  export declare const CreateAgentThreadBodySchema: z.ZodObject<{
444
- agentId: z.ZodString;
445
336
  title: z.ZodOptional<z.ZodString>;
446
337
  threadId: z.ZodOptional<z.ZodString>;
447
- }, "strip", z.ZodTypeAny, {
448
- agentId: string;
338
+ }, "strict", z.ZodTypeAny, {
449
339
  title?: string | undefined;
450
340
  threadId?: string | undefined;
451
341
  }, {
452
- agentId: string;
453
342
  title?: string | undefined;
454
343
  threadId?: string | undefined;
455
344
  }>;
456
345
  export declare const AgentThreadSchema: z.ZodObject<{
457
346
  id: z.ZodString;
458
347
  projectId: z.ZodString;
459
- agentId: z.ZodString;
460
348
  ownerPrincipal: z.ZodObject<{
461
349
  type: z.ZodEnum<["user", "serviceAccount", "system"]>;
462
350
  id: z.ZodString;
@@ -478,7 +366,6 @@ export declare const AgentThreadSchema: z.ZodObject<{
478
366
  status: "active" | "archived";
479
367
  projectId: string;
480
368
  id: string;
481
- agentId: string;
482
369
  ownerPrincipal: {
483
370
  id: string;
484
371
  type: "user" | "serviceAccount" | "system";
@@ -493,7 +380,6 @@ export declare const AgentThreadSchema: z.ZodObject<{
493
380
  status: "active" | "archived";
494
381
  projectId: string;
495
382
  id: string;
496
- agentId: string;
497
383
  ownerPrincipal: {
498
384
  id: string;
499
385
  type: "user" | "serviceAccount" | "system";
@@ -509,7 +395,6 @@ export declare const AgentThreadListResponseSchema: z.ZodObject<{
509
395
  threads: z.ZodArray<z.ZodObject<{
510
396
  id: z.ZodString;
511
397
  projectId: z.ZodString;
512
- agentId: z.ZodString;
513
398
  ownerPrincipal: z.ZodObject<{
514
399
  type: z.ZodEnum<["user", "serviceAccount", "system"]>;
515
400
  id: z.ZodString;
@@ -531,7 +416,6 @@ export declare const AgentThreadListResponseSchema: z.ZodObject<{
531
416
  status: "active" | "archived";
532
417
  projectId: string;
533
418
  id: string;
534
- agentId: string;
535
419
  ownerPrincipal: {
536
420
  id: string;
537
421
  type: "user" | "serviceAccount" | "system";
@@ -546,7 +430,6 @@ export declare const AgentThreadListResponseSchema: z.ZodObject<{
546
430
  status: "active" | "archived";
547
431
  projectId: string;
548
432
  id: string;
549
- agentId: string;
550
433
  ownerPrincipal: {
551
434
  id: string;
552
435
  type: "user" | "serviceAccount" | "system";
@@ -567,7 +450,6 @@ export declare const AgentThreadListResponseSchema: z.ZodObject<{
567
450
  status: "active" | "archived";
568
451
  projectId: string;
569
452
  id: string;
570
- agentId: string;
571
453
  ownerPrincipal: {
572
454
  id: string;
573
455
  type: "user" | "serviceAccount" | "system";
@@ -586,7 +468,6 @@ export declare const AgentThreadListResponseSchema: z.ZodObject<{
586
468
  status: "active" | "archived";
587
469
  projectId: string;
588
470
  id: string;
589
- agentId: string;
590
471
  ownerPrincipal: {
591
472
  id: string;
592
473
  type: "user" | "serviceAccount" | "system";
@@ -603,7 +484,6 @@ export declare const CreateAgentThreadResponseSchema: z.ZodObject<{
603
484
  thread: z.ZodObject<{
604
485
  id: z.ZodString;
605
486
  projectId: z.ZodString;
606
- agentId: z.ZodString;
607
487
  ownerPrincipal: z.ZodObject<{
608
488
  type: z.ZodEnum<["user", "serviceAccount", "system"]>;
609
489
  id: z.ZodString;
@@ -625,7 +505,6 @@ export declare const CreateAgentThreadResponseSchema: z.ZodObject<{
625
505
  status: "active" | "archived";
626
506
  projectId: string;
627
507
  id: string;
628
- agentId: string;
629
508
  ownerPrincipal: {
630
509
  id: string;
631
510
  type: "user" | "serviceAccount" | "system";
@@ -640,7 +519,6 @@ export declare const CreateAgentThreadResponseSchema: z.ZodObject<{
640
519
  status: "active" | "archived";
641
520
  projectId: string;
642
521
  id: string;
643
- agentId: string;
644
522
  ownerPrincipal: {
645
523
  id: string;
646
524
  type: "user" | "serviceAccount" | "system";
@@ -657,7 +535,6 @@ export declare const CreateAgentThreadResponseSchema: z.ZodObject<{
657
535
  status: "active" | "archived";
658
536
  projectId: string;
659
537
  id: string;
660
- agentId: string;
661
538
  ownerPrincipal: {
662
539
  id: string;
663
540
  type: "user" | "serviceAccount" | "system";
@@ -674,7 +551,6 @@ export declare const CreateAgentThreadResponseSchema: z.ZodObject<{
674
551
  status: "active" | "archived";
675
552
  projectId: string;
676
553
  id: string;
677
- agentId: string;
678
554
  ownerPrincipal: {
679
555
  id: string;
680
556
  type: "user" | "serviceAccount" | "system";
@@ -765,6 +641,18 @@ export declare const AgentMessagePartSchema: z.ZodUnion<[z.ZodObject<{
765
641
  logicalPath?: string | undefined;
766
642
  };
767
643
  providerMetadata?: import("./common").JsonValue | undefined;
644
+ }>, z.ZodObject<{
645
+ type: z.ZodLiteral<"provider-state">;
646
+ providerId: z.ZodString;
647
+ data: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
648
+ }, "strip", z.ZodTypeAny, {
649
+ type: "provider-state";
650
+ providerId: string;
651
+ data: import("./common").JsonValue;
652
+ }, {
653
+ type: "provider-state";
654
+ providerId: string;
655
+ data: import("./common").JsonValue;
768
656
  }>, z.ZodObject<{
769
657
  context: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
770
658
  kind: z.ZodLiteral<"object">;
@@ -814,7 +702,6 @@ export declare const AgentMessagePartSchema: z.ZodUnion<[z.ZodObject<{
814
702
  type: z.ZodLiteral<"context">;
815
703
  }, "strip", z.ZodTypeAny, {
816
704
  origin: "ambient" | "explicit";
817
- type: "context";
818
705
  context: {
819
706
  kind: "object";
820
707
  ref: {
@@ -828,9 +715,9 @@ export declare const AgentMessagePartSchema: z.ZodUnion<[z.ZodObject<{
828
715
  value: import("./common").JsonValue;
829
716
  label: string;
830
717
  };
718
+ type: "context";
831
719
  }, {
832
720
  origin: "ambient" | "explicit";
833
- type: "context";
834
721
  context: {
835
722
  kind: "object";
836
723
  ref: {
@@ -844,6 +731,7 @@ export declare const AgentMessagePartSchema: z.ZodUnion<[z.ZodObject<{
844
731
  value: import("./common").JsonValue;
845
732
  label: string;
846
733
  };
734
+ type: "context";
847
735
  }>, z.ZodObject<{
848
736
  type: z.ZodLiteral<"tool-call">;
849
737
  toolCallId: z.ZodString;
@@ -858,9 +746,9 @@ export declare const AgentMessagePartSchema: z.ZodUnion<[z.ZodObject<{
858
746
  }, "strip", z.ZodTypeAny, {
859
747
  type: "tool-call";
860
748
  output: import("./common").JsonValue;
749
+ input: import("./common").JsonValue;
861
750
  toolCallId: string;
862
751
  toolName: string;
863
- input: import("./common").JsonValue;
864
752
  state: "output-available";
865
753
  providerMetadata?: import("./common").JsonValue | undefined;
866
754
  dynamic?: boolean | undefined;
@@ -868,9 +756,9 @@ export declare const AgentMessagePartSchema: z.ZodUnion<[z.ZodObject<{
868
756
  }, {
869
757
  type: "tool-call";
870
758
  output: import("./common").JsonValue;
759
+ input: import("./common").JsonValue;
871
760
  toolCallId: string;
872
761
  toolName: string;
873
- input: import("./common").JsonValue;
874
762
  state: "output-available";
875
763
  providerMetadata?: import("./common").JsonValue | undefined;
876
764
  dynamic?: boolean | undefined;
@@ -888,9 +776,9 @@ export declare const AgentMessagePartSchema: z.ZodUnion<[z.ZodObject<{
888
776
  errorText: z.ZodString;
889
777
  }, "strip", z.ZodTypeAny, {
890
778
  type: "tool-call";
779
+ input: import("./common").JsonValue;
891
780
  toolCallId: string;
892
781
  toolName: string;
893
- input: import("./common").JsonValue;
894
782
  state: "output-error";
895
783
  errorText: string;
896
784
  providerMetadata?: import("./common").JsonValue | undefined;
@@ -898,9 +786,9 @@ export declare const AgentMessagePartSchema: z.ZodUnion<[z.ZodObject<{
898
786
  providerExecuted?: boolean | undefined;
899
787
  }, {
900
788
  type: "tool-call";
789
+ input: import("./common").JsonValue;
901
790
  toolCallId: string;
902
791
  toolName: string;
903
- input: import("./common").JsonValue;
904
792
  state: "output-error";
905
793
  errorText: string;
906
794
  providerMetadata?: import("./common").JsonValue | undefined;
@@ -1033,6 +921,18 @@ export declare const AgentMessageSchema: z.ZodObject<{
1033
921
  logicalPath?: string | undefined;
1034
922
  };
1035
923
  providerMetadata?: import("./common").JsonValue | undefined;
924
+ }>, z.ZodObject<{
925
+ type: z.ZodLiteral<"provider-state">;
926
+ providerId: z.ZodString;
927
+ data: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
928
+ }, "strip", z.ZodTypeAny, {
929
+ type: "provider-state";
930
+ providerId: string;
931
+ data: import("./common").JsonValue;
932
+ }, {
933
+ type: "provider-state";
934
+ providerId: string;
935
+ data: import("./common").JsonValue;
1036
936
  }>, z.ZodObject<{
1037
937
  context: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1038
938
  kind: z.ZodLiteral<"object">;
@@ -1082,7 +982,6 @@ export declare const AgentMessageSchema: z.ZodObject<{
1082
982
  type: z.ZodLiteral<"context">;
1083
983
  }, "strip", z.ZodTypeAny, {
1084
984
  origin: "ambient" | "explicit";
1085
- type: "context";
1086
985
  context: {
1087
986
  kind: "object";
1088
987
  ref: {
@@ -1096,9 +995,9 @@ export declare const AgentMessageSchema: z.ZodObject<{
1096
995
  value: import("./common").JsonValue;
1097
996
  label: string;
1098
997
  };
998
+ type: "context";
1099
999
  }, {
1100
1000
  origin: "ambient" | "explicit";
1101
- type: "context";
1102
1001
  context: {
1103
1002
  kind: "object";
1104
1003
  ref: {
@@ -1112,6 +1011,7 @@ export declare const AgentMessageSchema: z.ZodObject<{
1112
1011
  value: import("./common").JsonValue;
1113
1012
  label: string;
1114
1013
  };
1014
+ type: "context";
1115
1015
  }>, z.ZodObject<{
1116
1016
  type: z.ZodLiteral<"tool-call">;
1117
1017
  toolCallId: z.ZodString;
@@ -1126,9 +1026,9 @@ export declare const AgentMessageSchema: z.ZodObject<{
1126
1026
  }, "strip", z.ZodTypeAny, {
1127
1027
  type: "tool-call";
1128
1028
  output: import("./common").JsonValue;
1029
+ input: import("./common").JsonValue;
1129
1030
  toolCallId: string;
1130
1031
  toolName: string;
1131
- input: import("./common").JsonValue;
1132
1032
  state: "output-available";
1133
1033
  providerMetadata?: import("./common").JsonValue | undefined;
1134
1034
  dynamic?: boolean | undefined;
@@ -1136,9 +1036,9 @@ export declare const AgentMessageSchema: z.ZodObject<{
1136
1036
  }, {
1137
1037
  type: "tool-call";
1138
1038
  output: import("./common").JsonValue;
1039
+ input: import("./common").JsonValue;
1139
1040
  toolCallId: string;
1140
1041
  toolName: string;
1141
- input: import("./common").JsonValue;
1142
1042
  state: "output-available";
1143
1043
  providerMetadata?: import("./common").JsonValue | undefined;
1144
1044
  dynamic?: boolean | undefined;
@@ -1156,9 +1056,9 @@ export declare const AgentMessageSchema: z.ZodObject<{
1156
1056
  errorText: z.ZodString;
1157
1057
  }, "strip", z.ZodTypeAny, {
1158
1058
  type: "tool-call";
1059
+ input: import("./common").JsonValue;
1159
1060
  toolCallId: string;
1160
1061
  toolName: string;
1161
- input: import("./common").JsonValue;
1162
1062
  state: "output-error";
1163
1063
  errorText: string;
1164
1064
  providerMetadata?: import("./common").JsonValue | undefined;
@@ -1166,9 +1066,9 @@ export declare const AgentMessageSchema: z.ZodObject<{
1166
1066
  providerExecuted?: boolean | undefined;
1167
1067
  }, {
1168
1068
  type: "tool-call";
1069
+ input: import("./common").JsonValue;
1169
1070
  toolCallId: string;
1170
1071
  toolName: string;
1171
- input: import("./common").JsonValue;
1172
1072
  state: "output-error";
1173
1073
  errorText: string;
1174
1074
  providerMetadata?: import("./common").JsonValue | undefined;
@@ -1219,7 +1119,6 @@ export declare const AgentMessageSchema: z.ZodObject<{
1219
1119
  runId: string | null;
1220
1120
  parts: ({
1221
1121
  origin: "ambient" | "explicit";
1222
- type: "context";
1223
1122
  context: {
1224
1123
  kind: "object";
1225
1124
  ref: {
@@ -1233,6 +1132,7 @@ export declare const AgentMessageSchema: z.ZodObject<{
1233
1132
  value: import("./common").JsonValue;
1234
1133
  label: string;
1235
1134
  };
1135
+ type: "context";
1236
1136
  } | {
1237
1137
  type: "text";
1238
1138
  text: string;
@@ -1254,21 +1154,25 @@ export declare const AgentMessageSchema: z.ZodObject<{
1254
1154
  logicalPath?: string | undefined;
1255
1155
  };
1256
1156
  providerMetadata?: import("./common").JsonValue | undefined;
1157
+ } | {
1158
+ type: "provider-state";
1159
+ providerId: string;
1160
+ data: import("./common").JsonValue;
1257
1161
  } | {
1258
1162
  type: "tool-call";
1259
1163
  output: import("./common").JsonValue;
1164
+ input: import("./common").JsonValue;
1260
1165
  toolCallId: string;
1261
1166
  toolName: string;
1262
- input: import("./common").JsonValue;
1263
1167
  state: "output-available";
1264
1168
  providerMetadata?: import("./common").JsonValue | undefined;
1265
1169
  dynamic?: boolean | undefined;
1266
1170
  providerExecuted?: boolean | undefined;
1267
1171
  } | {
1268
1172
  type: "tool-call";
1173
+ input: import("./common").JsonValue;
1269
1174
  toolCallId: string;
1270
1175
  toolName: string;
1271
- input: import("./common").JsonValue;
1272
1176
  state: "output-error";
1273
1177
  errorText: string;
1274
1178
  providerMetadata?: import("./common").JsonValue | undefined;
@@ -1304,7 +1208,6 @@ export declare const AgentMessageSchema: z.ZodObject<{
1304
1208
  runId: string | null;
1305
1209
  parts: ({
1306
1210
  origin: "ambient" | "explicit";
1307
- type: "context";
1308
1211
  context: {
1309
1212
  kind: "object";
1310
1213
  ref: {
@@ -1318,6 +1221,7 @@ export declare const AgentMessageSchema: z.ZodObject<{
1318
1221
  value: import("./common").JsonValue;
1319
1222
  label: string;
1320
1223
  };
1224
+ type: "context";
1321
1225
  } | {
1322
1226
  type: "text";
1323
1227
  text: string;
@@ -1339,21 +1243,25 @@ export declare const AgentMessageSchema: z.ZodObject<{
1339
1243
  logicalPath?: string | undefined;
1340
1244
  };
1341
1245
  providerMetadata?: import("./common").JsonValue | undefined;
1246
+ } | {
1247
+ type: "provider-state";
1248
+ providerId: string;
1249
+ data: import("./common").JsonValue;
1342
1250
  } | {
1343
1251
  type: "tool-call";
1344
1252
  output: import("./common").JsonValue;
1253
+ input: import("./common").JsonValue;
1345
1254
  toolCallId: string;
1346
1255
  toolName: string;
1347
- input: import("./common").JsonValue;
1348
1256
  state: "output-available";
1349
1257
  providerMetadata?: import("./common").JsonValue | undefined;
1350
1258
  dynamic?: boolean | undefined;
1351
1259
  providerExecuted?: boolean | undefined;
1352
1260
  } | {
1353
1261
  type: "tool-call";
1262
+ input: import("./common").JsonValue;
1354
1263
  toolCallId: string;
1355
1264
  toolName: string;
1356
- input: import("./common").JsonValue;
1357
1265
  state: "output-error";
1358
1266
  errorText: string;
1359
1267
  providerMetadata?: import("./common").JsonValue | undefined;
@@ -1495,6 +1403,18 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1495
1403
  logicalPath?: string | undefined;
1496
1404
  };
1497
1405
  providerMetadata?: import("./common").JsonValue | undefined;
1406
+ }>, z.ZodObject<{
1407
+ type: z.ZodLiteral<"provider-state">;
1408
+ providerId: z.ZodString;
1409
+ data: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
1410
+ }, "strip", z.ZodTypeAny, {
1411
+ type: "provider-state";
1412
+ providerId: string;
1413
+ data: import("./common").JsonValue;
1414
+ }, {
1415
+ type: "provider-state";
1416
+ providerId: string;
1417
+ data: import("./common").JsonValue;
1498
1418
  }>, z.ZodObject<{
1499
1419
  context: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1500
1420
  kind: z.ZodLiteral<"object">;
@@ -1544,7 +1464,6 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1544
1464
  type: z.ZodLiteral<"context">;
1545
1465
  }, "strip", z.ZodTypeAny, {
1546
1466
  origin: "ambient" | "explicit";
1547
- type: "context";
1548
1467
  context: {
1549
1468
  kind: "object";
1550
1469
  ref: {
@@ -1558,9 +1477,9 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1558
1477
  value: import("./common").JsonValue;
1559
1478
  label: string;
1560
1479
  };
1480
+ type: "context";
1561
1481
  }, {
1562
1482
  origin: "ambient" | "explicit";
1563
- type: "context";
1564
1483
  context: {
1565
1484
  kind: "object";
1566
1485
  ref: {
@@ -1574,6 +1493,7 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1574
1493
  value: import("./common").JsonValue;
1575
1494
  label: string;
1576
1495
  };
1496
+ type: "context";
1577
1497
  }>, z.ZodObject<{
1578
1498
  type: z.ZodLiteral<"tool-call">;
1579
1499
  toolCallId: z.ZodString;
@@ -1588,9 +1508,9 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1588
1508
  }, "strip", z.ZodTypeAny, {
1589
1509
  type: "tool-call";
1590
1510
  output: import("./common").JsonValue;
1511
+ input: import("./common").JsonValue;
1591
1512
  toolCallId: string;
1592
1513
  toolName: string;
1593
- input: import("./common").JsonValue;
1594
1514
  state: "output-available";
1595
1515
  providerMetadata?: import("./common").JsonValue | undefined;
1596
1516
  dynamic?: boolean | undefined;
@@ -1598,9 +1518,9 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1598
1518
  }, {
1599
1519
  type: "tool-call";
1600
1520
  output: import("./common").JsonValue;
1521
+ input: import("./common").JsonValue;
1601
1522
  toolCallId: string;
1602
1523
  toolName: string;
1603
- input: import("./common").JsonValue;
1604
1524
  state: "output-available";
1605
1525
  providerMetadata?: import("./common").JsonValue | undefined;
1606
1526
  dynamic?: boolean | undefined;
@@ -1618,9 +1538,9 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1618
1538
  errorText: z.ZodString;
1619
1539
  }, "strip", z.ZodTypeAny, {
1620
1540
  type: "tool-call";
1541
+ input: import("./common").JsonValue;
1621
1542
  toolCallId: string;
1622
1543
  toolName: string;
1623
- input: import("./common").JsonValue;
1624
1544
  state: "output-error";
1625
1545
  errorText: string;
1626
1546
  providerMetadata?: import("./common").JsonValue | undefined;
@@ -1628,9 +1548,9 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1628
1548
  providerExecuted?: boolean | undefined;
1629
1549
  }, {
1630
1550
  type: "tool-call";
1551
+ input: import("./common").JsonValue;
1631
1552
  toolCallId: string;
1632
1553
  toolName: string;
1633
- input: import("./common").JsonValue;
1634
1554
  state: "output-error";
1635
1555
  errorText: string;
1636
1556
  providerMetadata?: import("./common").JsonValue | undefined;
@@ -1681,7 +1601,6 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1681
1601
  runId: string | null;
1682
1602
  parts: ({
1683
1603
  origin: "ambient" | "explicit";
1684
- type: "context";
1685
1604
  context: {
1686
1605
  kind: "object";
1687
1606
  ref: {
@@ -1695,6 +1614,7 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1695
1614
  value: import("./common").JsonValue;
1696
1615
  label: string;
1697
1616
  };
1617
+ type: "context";
1698
1618
  } | {
1699
1619
  type: "text";
1700
1620
  text: string;
@@ -1716,21 +1636,25 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1716
1636
  logicalPath?: string | undefined;
1717
1637
  };
1718
1638
  providerMetadata?: import("./common").JsonValue | undefined;
1639
+ } | {
1640
+ type: "provider-state";
1641
+ providerId: string;
1642
+ data: import("./common").JsonValue;
1719
1643
  } | {
1720
1644
  type: "tool-call";
1721
1645
  output: import("./common").JsonValue;
1646
+ input: import("./common").JsonValue;
1722
1647
  toolCallId: string;
1723
1648
  toolName: string;
1724
- input: import("./common").JsonValue;
1725
1649
  state: "output-available";
1726
1650
  providerMetadata?: import("./common").JsonValue | undefined;
1727
1651
  dynamic?: boolean | undefined;
1728
1652
  providerExecuted?: boolean | undefined;
1729
1653
  } | {
1730
1654
  type: "tool-call";
1655
+ input: import("./common").JsonValue;
1731
1656
  toolCallId: string;
1732
1657
  toolName: string;
1733
- input: import("./common").JsonValue;
1734
1658
  state: "output-error";
1735
1659
  errorText: string;
1736
1660
  providerMetadata?: import("./common").JsonValue | undefined;
@@ -1766,7 +1690,6 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1766
1690
  runId: string | null;
1767
1691
  parts: ({
1768
1692
  origin: "ambient" | "explicit";
1769
- type: "context";
1770
1693
  context: {
1771
1694
  kind: "object";
1772
1695
  ref: {
@@ -1780,6 +1703,7 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1780
1703
  value: import("./common").JsonValue;
1781
1704
  label: string;
1782
1705
  };
1706
+ type: "context";
1783
1707
  } | {
1784
1708
  type: "text";
1785
1709
  text: string;
@@ -1801,21 +1725,25 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1801
1725
  logicalPath?: string | undefined;
1802
1726
  };
1803
1727
  providerMetadata?: import("./common").JsonValue | undefined;
1728
+ } | {
1729
+ type: "provider-state";
1730
+ providerId: string;
1731
+ data: import("./common").JsonValue;
1804
1732
  } | {
1805
1733
  type: "tool-call";
1806
1734
  output: import("./common").JsonValue;
1735
+ input: import("./common").JsonValue;
1807
1736
  toolCallId: string;
1808
1737
  toolName: string;
1809
- input: import("./common").JsonValue;
1810
1738
  state: "output-available";
1811
1739
  providerMetadata?: import("./common").JsonValue | undefined;
1812
1740
  dynamic?: boolean | undefined;
1813
1741
  providerExecuted?: boolean | undefined;
1814
1742
  } | {
1815
1743
  type: "tool-call";
1744
+ input: import("./common").JsonValue;
1816
1745
  toolCallId: string;
1817
1746
  toolName: string;
1818
- input: import("./common").JsonValue;
1819
1747
  state: "output-error";
1820
1748
  errorText: string;
1821
1749
  providerMetadata?: import("./common").JsonValue | undefined;
@@ -1857,7 +1785,6 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1857
1785
  runId: string | null;
1858
1786
  parts: ({
1859
1787
  origin: "ambient" | "explicit";
1860
- type: "context";
1861
1788
  context: {
1862
1789
  kind: "object";
1863
1790
  ref: {
@@ -1871,6 +1798,7 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1871
1798
  value: import("./common").JsonValue;
1872
1799
  label: string;
1873
1800
  };
1801
+ type: "context";
1874
1802
  } | {
1875
1803
  type: "text";
1876
1804
  text: string;
@@ -1892,21 +1820,25 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1892
1820
  logicalPath?: string | undefined;
1893
1821
  };
1894
1822
  providerMetadata?: import("./common").JsonValue | undefined;
1823
+ } | {
1824
+ type: "provider-state";
1825
+ providerId: string;
1826
+ data: import("./common").JsonValue;
1895
1827
  } | {
1896
1828
  type: "tool-call";
1897
1829
  output: import("./common").JsonValue;
1830
+ input: import("./common").JsonValue;
1898
1831
  toolCallId: string;
1899
1832
  toolName: string;
1900
- input: import("./common").JsonValue;
1901
1833
  state: "output-available";
1902
1834
  providerMetadata?: import("./common").JsonValue | undefined;
1903
1835
  dynamic?: boolean | undefined;
1904
1836
  providerExecuted?: boolean | undefined;
1905
1837
  } | {
1906
1838
  type: "tool-call";
1839
+ input: import("./common").JsonValue;
1907
1840
  toolCallId: string;
1908
1841
  toolName: string;
1909
- input: import("./common").JsonValue;
1910
1842
  state: "output-error";
1911
1843
  errorText: string;
1912
1844
  providerMetadata?: import("./common").JsonValue | undefined;
@@ -1946,7 +1878,6 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1946
1878
  runId: string | null;
1947
1879
  parts: ({
1948
1880
  origin: "ambient" | "explicit";
1949
- type: "context";
1950
1881
  context: {
1951
1882
  kind: "object";
1952
1883
  ref: {
@@ -1960,6 +1891,7 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1960
1891
  value: import("./common").JsonValue;
1961
1892
  label: string;
1962
1893
  };
1894
+ type: "context";
1963
1895
  } | {
1964
1896
  type: "text";
1965
1897
  text: string;
@@ -1981,21 +1913,25 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1981
1913
  logicalPath?: string | undefined;
1982
1914
  };
1983
1915
  providerMetadata?: import("./common").JsonValue | undefined;
1916
+ } | {
1917
+ type: "provider-state";
1918
+ providerId: string;
1919
+ data: import("./common").JsonValue;
1984
1920
  } | {
1985
1921
  type: "tool-call";
1986
1922
  output: import("./common").JsonValue;
1923
+ input: import("./common").JsonValue;
1987
1924
  toolCallId: string;
1988
1925
  toolName: string;
1989
- input: import("./common").JsonValue;
1990
1926
  state: "output-available";
1991
1927
  providerMetadata?: import("./common").JsonValue | undefined;
1992
1928
  dynamic?: boolean | undefined;
1993
1929
  providerExecuted?: boolean | undefined;
1994
1930
  } | {
1995
1931
  type: "tool-call";
1932
+ input: import("./common").JsonValue;
1996
1933
  toolCallId: string;
1997
1934
  toolName: string;
1998
- input: import("./common").JsonValue;
1999
1935
  state: "output-error";
2000
1936
  errorText: string;
2001
1937
  providerMetadata?: import("./common").JsonValue | undefined;
@@ -2029,6 +1965,23 @@ export declare const AgentMessageListResponseSchema: z.ZodObject<{
2029
1965
  }>;
2030
1966
  export declare const PostAgentMessageBodySchema: z.ZodObject<{
2031
1967
  text: z.ZodString;
1968
+ model: z.ZodOptional<z.ZodObject<{
1969
+ provider: z.ZodString;
1970
+ modelId: z.ZodString;
1971
+ }, "strip", z.ZodTypeAny, {
1972
+ provider: string;
1973
+ modelId: string;
1974
+ }, {
1975
+ provider: string;
1976
+ modelId: string;
1977
+ }>>;
1978
+ reasoning: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max"]>, z.ZodObject<{
1979
+ budgetTokens: z.ZodNumber;
1980
+ }, "strict", z.ZodTypeAny, {
1981
+ budgetTokens: number;
1982
+ }, {
1983
+ budgetTokens: number;
1984
+ }>]>>;
2032
1985
  attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
2033
1986
  blobId: z.ZodString;
2034
1987
  digest: z.ZodString;
@@ -2128,7 +2081,7 @@ export declare const PostAgentMessageBodySchema: z.ZodObject<{
2128
2081
  };
2129
2082
  }>, "many">>;
2130
2083
  messageId: z.ZodOptional<z.ZodString>;
2131
- }, "strip", z.ZodTypeAny, {
2084
+ }, "strict", z.ZodTypeAny, {
2132
2085
  text: string;
2133
2086
  context?: {
2134
2087
  origin: "ambient" | "explicit";
@@ -2146,7 +2099,10 @@ export declare const PostAgentMessageBodySchema: z.ZodObject<{
2146
2099
  label: string;
2147
2100
  };
2148
2101
  }[] | undefined;
2149
- messageId?: string | undefined;
2102
+ model?: {
2103
+ provider: string;
2104
+ modelId: string;
2105
+ } | undefined;
2150
2106
  attachments?: {
2151
2107
  blobId: string;
2152
2108
  digest: string;
@@ -2155,6 +2111,10 @@ export declare const PostAgentMessageBodySchema: z.ZodObject<{
2155
2111
  mediaType?: string | undefined;
2156
2112
  logicalPath?: string | undefined;
2157
2113
  }[] | undefined;
2114
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2115
+ budgetTokens: number;
2116
+ } | undefined;
2117
+ messageId?: string | undefined;
2158
2118
  }, {
2159
2119
  text: string;
2160
2120
  context?: {
@@ -2173,7 +2133,10 @@ export declare const PostAgentMessageBodySchema: z.ZodObject<{
2173
2133
  label: string;
2174
2134
  };
2175
2135
  }[] | undefined;
2176
- messageId?: string | undefined;
2136
+ model?: {
2137
+ provider: string;
2138
+ modelId: string;
2139
+ } | undefined;
2177
2140
  attachments?: {
2178
2141
  blobId: string;
2179
2142
  digest: string;
@@ -2182,6 +2145,10 @@ export declare const PostAgentMessageBodySchema: z.ZodObject<{
2182
2145
  mediaType?: string | undefined;
2183
2146
  logicalPath?: string | undefined;
2184
2147
  }[] | undefined;
2148
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2149
+ budgetTokens: number;
2150
+ } | undefined;
2151
+ messageId?: string | undefined;
2185
2152
  }>;
2186
2153
  export declare const CancelAgentRunBodySchema: z.ZodObject<{
2187
2154
  runId: z.ZodString;
@@ -2196,7 +2163,6 @@ export declare const AgentRunSchema: z.ZodObject<{
2196
2163
  id: z.ZodString;
2197
2164
  projectId: z.ZodString;
2198
2165
  threadId: z.ZodString;
2199
- agentId: z.ZodString;
2200
2166
  triggerMessageId: z.ZodString;
2201
2167
  requestedBy: z.ZodOptional<z.ZodObject<{
2202
2168
  type: z.ZodEnum<["user", "serviceAccount"]>;
@@ -2209,6 +2175,23 @@ export declare const AgentRunSchema: z.ZodObject<{
2209
2175
  type: "user" | "serviceAccount";
2210
2176
  }>>;
2211
2177
  status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2178
+ model: z.ZodOptional<z.ZodObject<{
2179
+ provider: z.ZodString;
2180
+ modelId: z.ZodString;
2181
+ }, "strip", z.ZodTypeAny, {
2182
+ provider: string;
2183
+ modelId: string;
2184
+ }, {
2185
+ provider: string;
2186
+ modelId: string;
2187
+ }>>;
2188
+ reasoning: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max"]>, z.ZodObject<{
2189
+ budgetTokens: z.ZodNumber;
2190
+ }, "strict", z.ZodTypeAny, {
2191
+ budgetTokens: number;
2192
+ }, {
2193
+ budgetTokens: number;
2194
+ }>]>>;
2212
2195
  modelId: z.ZodOptional<z.ZodString>;
2213
2196
  finishReason: z.ZodOptional<z.ZodEnum<["stop", "length", "content-filter", "tool-calls", "timeout", "error", "other", "unknown"]>>;
2214
2197
  usage: z.ZodOptional<z.ZodObject<{
@@ -2292,7 +2275,7 @@ export declare const AgentRunSchema: z.ZodObject<{
2292
2275
  scope: "output";
2293
2276
  path?: string | undefined;
2294
2277
  }>, "many">>;
2295
- error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">>>;
2278
+ error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled">>>;
2296
2279
  attempt: z.ZodNumber;
2297
2280
  streamId: z.ZodString;
2298
2281
  createdAt: z.ZodString;
@@ -2302,16 +2285,22 @@ export declare const AgentRunSchema: z.ZodObject<{
2302
2285
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2303
2286
  projectId: string;
2304
2287
  id: string;
2305
- agentId: string;
2306
2288
  attempt: number;
2307
2289
  threadId: string;
2308
2290
  createdAt: string;
2309
2291
  triggerMessageId: string;
2310
2292
  streamId: string;
2311
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2293
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2312
2294
  startedAt?: string | undefined;
2313
2295
  completedAt?: string | undefined;
2296
+ model?: {
2297
+ provider: string;
2298
+ modelId: string;
2299
+ } | undefined;
2314
2300
  modelId?: string | undefined;
2301
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2302
+ budgetTokens: number;
2303
+ } | undefined;
2315
2304
  usage?: {
2316
2305
  reportingStatus: "complete" | "partial" | "unavailable";
2317
2306
  inputTokens?: number | undefined;
@@ -2348,16 +2337,22 @@ export declare const AgentRunSchema: z.ZodObject<{
2348
2337
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2349
2338
  projectId: string;
2350
2339
  id: string;
2351
- agentId: string;
2352
2340
  attempt: number;
2353
2341
  threadId: string;
2354
2342
  createdAt: string;
2355
2343
  triggerMessageId: string;
2356
2344
  streamId: string;
2357
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2345
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2358
2346
  startedAt?: string | undefined;
2359
2347
  completedAt?: string | undefined;
2348
+ model?: {
2349
+ provider: string;
2350
+ modelId: string;
2351
+ } | undefined;
2360
2352
  modelId?: string | undefined;
2353
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2354
+ budgetTokens: number;
2355
+ } | undefined;
2361
2356
  usage?: {
2362
2357
  reportingStatus: "complete" | "partial" | "unavailable";
2363
2358
  inputTokens?: number | undefined;
@@ -2396,7 +2391,6 @@ export declare const PostAgentMessageResponseSchema: z.ZodObject<{
2396
2391
  id: z.ZodString;
2397
2392
  projectId: z.ZodString;
2398
2393
  threadId: z.ZodString;
2399
- agentId: z.ZodString;
2400
2394
  triggerMessageId: z.ZodString;
2401
2395
  requestedBy: z.ZodOptional<z.ZodObject<{
2402
2396
  type: z.ZodEnum<["user", "serviceAccount"]>;
@@ -2409,6 +2403,23 @@ export declare const PostAgentMessageResponseSchema: z.ZodObject<{
2409
2403
  type: "user" | "serviceAccount";
2410
2404
  }>>;
2411
2405
  status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2406
+ model: z.ZodOptional<z.ZodObject<{
2407
+ provider: z.ZodString;
2408
+ modelId: z.ZodString;
2409
+ }, "strip", z.ZodTypeAny, {
2410
+ provider: string;
2411
+ modelId: string;
2412
+ }, {
2413
+ provider: string;
2414
+ modelId: string;
2415
+ }>>;
2416
+ reasoning: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max"]>, z.ZodObject<{
2417
+ budgetTokens: z.ZodNumber;
2418
+ }, "strict", z.ZodTypeAny, {
2419
+ budgetTokens: number;
2420
+ }, {
2421
+ budgetTokens: number;
2422
+ }>]>>;
2412
2423
  modelId: z.ZodOptional<z.ZodString>;
2413
2424
  finishReason: z.ZodOptional<z.ZodEnum<["stop", "length", "content-filter", "tool-calls", "timeout", "error", "other", "unknown"]>>;
2414
2425
  usage: z.ZodOptional<z.ZodObject<{
@@ -2492,7 +2503,7 @@ export declare const PostAgentMessageResponseSchema: z.ZodObject<{
2492
2503
  scope: "output";
2493
2504
  path?: string | undefined;
2494
2505
  }>, "many">>;
2495
- error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">>>;
2506
+ error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled">>>;
2496
2507
  attempt: z.ZodNumber;
2497
2508
  streamId: z.ZodString;
2498
2509
  createdAt: z.ZodString;
@@ -2502,16 +2513,22 @@ export declare const PostAgentMessageResponseSchema: z.ZodObject<{
2502
2513
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2503
2514
  projectId: string;
2504
2515
  id: string;
2505
- agentId: string;
2506
2516
  attempt: number;
2507
2517
  threadId: string;
2508
2518
  createdAt: string;
2509
2519
  triggerMessageId: string;
2510
2520
  streamId: string;
2511
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2521
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2512
2522
  startedAt?: string | undefined;
2513
2523
  completedAt?: string | undefined;
2524
+ model?: {
2525
+ provider: string;
2526
+ modelId: string;
2527
+ } | undefined;
2514
2528
  modelId?: string | undefined;
2529
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2530
+ budgetTokens: number;
2531
+ } | undefined;
2515
2532
  usage?: {
2516
2533
  reportingStatus: "complete" | "partial" | "unavailable";
2517
2534
  inputTokens?: number | undefined;
@@ -2548,16 +2565,22 @@ export declare const PostAgentMessageResponseSchema: z.ZodObject<{
2548
2565
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2549
2566
  projectId: string;
2550
2567
  id: string;
2551
- agentId: string;
2552
2568
  attempt: number;
2553
2569
  threadId: string;
2554
2570
  createdAt: string;
2555
2571
  triggerMessageId: string;
2556
2572
  streamId: string;
2557
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2573
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2558
2574
  startedAt?: string | undefined;
2559
2575
  completedAt?: string | undefined;
2576
+ model?: {
2577
+ provider: string;
2578
+ modelId: string;
2579
+ } | undefined;
2560
2580
  modelId?: string | undefined;
2581
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2582
+ budgetTokens: number;
2583
+ } | undefined;
2561
2584
  usage?: {
2562
2585
  reportingStatus: "complete" | "partial" | "unavailable";
2563
2586
  inputTokens?: number | undefined;
@@ -2596,16 +2619,22 @@ export declare const PostAgentMessageResponseSchema: z.ZodObject<{
2596
2619
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2597
2620
  projectId: string;
2598
2621
  id: string;
2599
- agentId: string;
2600
2622
  attempt: number;
2601
2623
  threadId: string;
2602
2624
  createdAt: string;
2603
2625
  triggerMessageId: string;
2604
2626
  streamId: string;
2605
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2627
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2606
2628
  startedAt?: string | undefined;
2607
2629
  completedAt?: string | undefined;
2630
+ model?: {
2631
+ provider: string;
2632
+ modelId: string;
2633
+ } | undefined;
2608
2634
  modelId?: string | undefined;
2635
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2636
+ budgetTokens: number;
2637
+ } | undefined;
2609
2638
  usage?: {
2610
2639
  reportingStatus: "complete" | "partial" | "unavailable";
2611
2640
  inputTokens?: number | undefined;
@@ -2644,16 +2673,22 @@ export declare const PostAgentMessageResponseSchema: z.ZodObject<{
2644
2673
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2645
2674
  projectId: string;
2646
2675
  id: string;
2647
- agentId: string;
2648
2676
  attempt: number;
2649
2677
  threadId: string;
2650
2678
  createdAt: string;
2651
2679
  triggerMessageId: string;
2652
2680
  streamId: string;
2653
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2681
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2654
2682
  startedAt?: string | undefined;
2655
2683
  completedAt?: string | undefined;
2684
+ model?: {
2685
+ provider: string;
2686
+ modelId: string;
2687
+ } | undefined;
2656
2688
  modelId?: string | undefined;
2689
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2690
+ budgetTokens: number;
2691
+ } | undefined;
2657
2692
  usage?: {
2658
2693
  reportingStatus: "complete" | "partial" | "unavailable";
2659
2694
  inputTokens?: number | undefined;
@@ -2693,7 +2728,6 @@ export declare const CancelAgentRunResponseSchema: z.ZodObject<{
2693
2728
  id: z.ZodString;
2694
2729
  projectId: z.ZodString;
2695
2730
  threadId: z.ZodString;
2696
- agentId: z.ZodString;
2697
2731
  triggerMessageId: z.ZodString;
2698
2732
  requestedBy: z.ZodOptional<z.ZodObject<{
2699
2733
  type: z.ZodEnum<["user", "serviceAccount"]>;
@@ -2706,6 +2740,23 @@ export declare const CancelAgentRunResponseSchema: z.ZodObject<{
2706
2740
  type: "user" | "serviceAccount";
2707
2741
  }>>;
2708
2742
  status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2743
+ model: z.ZodOptional<z.ZodObject<{
2744
+ provider: z.ZodString;
2745
+ modelId: z.ZodString;
2746
+ }, "strip", z.ZodTypeAny, {
2747
+ provider: string;
2748
+ modelId: string;
2749
+ }, {
2750
+ provider: string;
2751
+ modelId: string;
2752
+ }>>;
2753
+ reasoning: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max"]>, z.ZodObject<{
2754
+ budgetTokens: z.ZodNumber;
2755
+ }, "strict", z.ZodTypeAny, {
2756
+ budgetTokens: number;
2757
+ }, {
2758
+ budgetTokens: number;
2759
+ }>]>>;
2709
2760
  modelId: z.ZodOptional<z.ZodString>;
2710
2761
  finishReason: z.ZodOptional<z.ZodEnum<["stop", "length", "content-filter", "tool-calls", "timeout", "error", "other", "unknown"]>>;
2711
2762
  usage: z.ZodOptional<z.ZodObject<{
@@ -2789,7 +2840,7 @@ export declare const CancelAgentRunResponseSchema: z.ZodObject<{
2789
2840
  scope: "output";
2790
2841
  path?: string | undefined;
2791
2842
  }>, "many">>;
2792
- error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">>>;
2843
+ error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled">>>;
2793
2844
  attempt: z.ZodNumber;
2794
2845
  streamId: z.ZodString;
2795
2846
  createdAt: z.ZodString;
@@ -2799,16 +2850,22 @@ export declare const CancelAgentRunResponseSchema: z.ZodObject<{
2799
2850
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2800
2851
  projectId: string;
2801
2852
  id: string;
2802
- agentId: string;
2803
2853
  attempt: number;
2804
2854
  threadId: string;
2805
2855
  createdAt: string;
2806
2856
  triggerMessageId: string;
2807
2857
  streamId: string;
2808
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2858
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2809
2859
  startedAt?: string | undefined;
2810
2860
  completedAt?: string | undefined;
2861
+ model?: {
2862
+ provider: string;
2863
+ modelId: string;
2864
+ } | undefined;
2811
2865
  modelId?: string | undefined;
2866
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2867
+ budgetTokens: number;
2868
+ } | undefined;
2812
2869
  usage?: {
2813
2870
  reportingStatus: "complete" | "partial" | "unavailable";
2814
2871
  inputTokens?: number | undefined;
@@ -2845,16 +2902,22 @@ export declare const CancelAgentRunResponseSchema: z.ZodObject<{
2845
2902
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2846
2903
  projectId: string;
2847
2904
  id: string;
2848
- agentId: string;
2849
2905
  attempt: number;
2850
2906
  threadId: string;
2851
2907
  createdAt: string;
2852
2908
  triggerMessageId: string;
2853
2909
  streamId: string;
2854
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2910
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2855
2911
  startedAt?: string | undefined;
2856
2912
  completedAt?: string | undefined;
2913
+ model?: {
2914
+ provider: string;
2915
+ modelId: string;
2916
+ } | undefined;
2857
2917
  modelId?: string | undefined;
2918
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2919
+ budgetTokens: number;
2920
+ } | undefined;
2858
2921
  usage?: {
2859
2922
  reportingStatus: "complete" | "partial" | "unavailable";
2860
2923
  inputTokens?: number | undefined;
@@ -2893,16 +2956,22 @@ export declare const CancelAgentRunResponseSchema: z.ZodObject<{
2893
2956
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2894
2957
  projectId: string;
2895
2958
  id: string;
2896
- agentId: string;
2897
2959
  attempt: number;
2898
2960
  threadId: string;
2899
2961
  createdAt: string;
2900
2962
  triggerMessageId: string;
2901
2963
  streamId: string;
2902
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2964
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2903
2965
  startedAt?: string | undefined;
2904
2966
  completedAt?: string | undefined;
2967
+ model?: {
2968
+ provider: string;
2969
+ modelId: string;
2970
+ } | undefined;
2905
2971
  modelId?: string | undefined;
2972
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2973
+ budgetTokens: number;
2974
+ } | undefined;
2906
2975
  usage?: {
2907
2976
  reportingStatus: "complete" | "partial" | "unavailable";
2908
2977
  inputTokens?: number | undefined;
@@ -2941,16 +3010,22 @@ export declare const CancelAgentRunResponseSchema: z.ZodObject<{
2941
3010
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2942
3011
  projectId: string;
2943
3012
  id: string;
2944
- agentId: string;
2945
3013
  attempt: number;
2946
3014
  threadId: string;
2947
3015
  createdAt: string;
2948
3016
  triggerMessageId: string;
2949
3017
  streamId: string;
2950
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3018
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
2951
3019
  startedAt?: string | undefined;
2952
3020
  completedAt?: string | undefined;
3021
+ model?: {
3022
+ provider: string;
3023
+ modelId: string;
3024
+ } | undefined;
2953
3025
  modelId?: string | undefined;
3026
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
3027
+ budgetTokens: number;
3028
+ } | undefined;
2954
3029
  usage?: {
2955
3030
  reportingStatus: "complete" | "partial" | "unavailable";
2956
3031
  inputTokens?: number | undefined;
@@ -2990,7 +3065,6 @@ export declare const RetryAgentRunResponseSchema: z.ZodObject<{
2990
3065
  id: z.ZodString;
2991
3066
  projectId: z.ZodString;
2992
3067
  threadId: z.ZodString;
2993
- agentId: z.ZodString;
2994
3068
  triggerMessageId: z.ZodString;
2995
3069
  requestedBy: z.ZodOptional<z.ZodObject<{
2996
3070
  type: z.ZodEnum<["user", "serviceAccount"]>;
@@ -3003,6 +3077,23 @@ export declare const RetryAgentRunResponseSchema: z.ZodObject<{
3003
3077
  type: "user" | "serviceAccount";
3004
3078
  }>>;
3005
3079
  status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
3080
+ model: z.ZodOptional<z.ZodObject<{
3081
+ provider: z.ZodString;
3082
+ modelId: z.ZodString;
3083
+ }, "strip", z.ZodTypeAny, {
3084
+ provider: string;
3085
+ modelId: string;
3086
+ }, {
3087
+ provider: string;
3088
+ modelId: string;
3089
+ }>>;
3090
+ reasoning: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max"]>, z.ZodObject<{
3091
+ budgetTokens: z.ZodNumber;
3092
+ }, "strict", z.ZodTypeAny, {
3093
+ budgetTokens: number;
3094
+ }, {
3095
+ budgetTokens: number;
3096
+ }>]>>;
3006
3097
  modelId: z.ZodOptional<z.ZodString>;
3007
3098
  finishReason: z.ZodOptional<z.ZodEnum<["stop", "length", "content-filter", "tool-calls", "timeout", "error", "other", "unknown"]>>;
3008
3099
  usage: z.ZodOptional<z.ZodObject<{
@@ -3086,7 +3177,7 @@ export declare const RetryAgentRunResponseSchema: z.ZodObject<{
3086
3177
  scope: "output";
3087
3178
  path?: string | undefined;
3088
3179
  }>, "many">>;
3089
- error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">>>;
3180
+ error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled">>>;
3090
3181
  attempt: z.ZodNumber;
3091
3182
  streamId: z.ZodString;
3092
3183
  createdAt: z.ZodString;
@@ -3096,16 +3187,22 @@ export declare const RetryAgentRunResponseSchema: z.ZodObject<{
3096
3187
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3097
3188
  projectId: string;
3098
3189
  id: string;
3099
- agentId: string;
3100
3190
  attempt: number;
3101
3191
  threadId: string;
3102
3192
  createdAt: string;
3103
3193
  triggerMessageId: string;
3104
3194
  streamId: string;
3105
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3195
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3106
3196
  startedAt?: string | undefined;
3107
3197
  completedAt?: string | undefined;
3198
+ model?: {
3199
+ provider: string;
3200
+ modelId: string;
3201
+ } | undefined;
3108
3202
  modelId?: string | undefined;
3203
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
3204
+ budgetTokens: number;
3205
+ } | undefined;
3109
3206
  usage?: {
3110
3207
  reportingStatus: "complete" | "partial" | "unavailable";
3111
3208
  inputTokens?: number | undefined;
@@ -3142,16 +3239,22 @@ export declare const RetryAgentRunResponseSchema: z.ZodObject<{
3142
3239
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3143
3240
  projectId: string;
3144
3241
  id: string;
3145
- agentId: string;
3146
3242
  attempt: number;
3147
3243
  threadId: string;
3148
3244
  createdAt: string;
3149
3245
  triggerMessageId: string;
3150
3246
  streamId: string;
3151
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3247
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3152
3248
  startedAt?: string | undefined;
3153
3249
  completedAt?: string | undefined;
3250
+ model?: {
3251
+ provider: string;
3252
+ modelId: string;
3253
+ } | undefined;
3154
3254
  modelId?: string | undefined;
3255
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
3256
+ budgetTokens: number;
3257
+ } | undefined;
3155
3258
  usage?: {
3156
3259
  reportingStatus: "complete" | "partial" | "unavailable";
3157
3260
  inputTokens?: number | undefined;
@@ -3190,16 +3293,22 @@ export declare const RetryAgentRunResponseSchema: z.ZodObject<{
3190
3293
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3191
3294
  projectId: string;
3192
3295
  id: string;
3193
- agentId: string;
3194
3296
  attempt: number;
3195
3297
  threadId: string;
3196
3298
  createdAt: string;
3197
3299
  triggerMessageId: string;
3198
3300
  streamId: string;
3199
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3301
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3200
3302
  startedAt?: string | undefined;
3201
3303
  completedAt?: string | undefined;
3304
+ model?: {
3305
+ provider: string;
3306
+ modelId: string;
3307
+ } | undefined;
3202
3308
  modelId?: string | undefined;
3309
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
3310
+ budgetTokens: number;
3311
+ } | undefined;
3203
3312
  usage?: {
3204
3313
  reportingStatus: "complete" | "partial" | "unavailable";
3205
3314
  inputTokens?: number | undefined;
@@ -3238,16 +3347,22 @@ export declare const RetryAgentRunResponseSchema: z.ZodObject<{
3238
3347
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3239
3348
  projectId: string;
3240
3349
  id: string;
3241
- agentId: string;
3242
3350
  attempt: number;
3243
3351
  threadId: string;
3244
3352
  createdAt: string;
3245
3353
  triggerMessageId: string;
3246
3354
  streamId: string;
3247
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3355
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3248
3356
  startedAt?: string | undefined;
3249
3357
  completedAt?: string | undefined;
3358
+ model?: {
3359
+ provider: string;
3360
+ modelId: string;
3361
+ } | undefined;
3250
3362
  modelId?: string | undefined;
3363
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
3364
+ budgetTokens: number;
3365
+ } | undefined;
3251
3366
  usage?: {
3252
3367
  reportingStatus: "complete" | "partial" | "unavailable";
3253
3368
  inputTokens?: number | undefined;
@@ -3303,7 +3418,6 @@ export declare const AgentRunListResponseSchema: z.ZodObject<{
3303
3418
  id: z.ZodString;
3304
3419
  projectId: z.ZodString;
3305
3420
  threadId: z.ZodString;
3306
- agentId: z.ZodString;
3307
3421
  triggerMessageId: z.ZodString;
3308
3422
  requestedBy: z.ZodOptional<z.ZodObject<{
3309
3423
  type: z.ZodEnum<["user", "serviceAccount"]>;
@@ -3316,6 +3430,23 @@ export declare const AgentRunListResponseSchema: z.ZodObject<{
3316
3430
  type: "user" | "serviceAccount";
3317
3431
  }>>;
3318
3432
  status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
3433
+ model: z.ZodOptional<z.ZodObject<{
3434
+ provider: z.ZodString;
3435
+ modelId: z.ZodString;
3436
+ }, "strip", z.ZodTypeAny, {
3437
+ provider: string;
3438
+ modelId: string;
3439
+ }, {
3440
+ provider: string;
3441
+ modelId: string;
3442
+ }>>;
3443
+ reasoning: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max"]>, z.ZodObject<{
3444
+ budgetTokens: z.ZodNumber;
3445
+ }, "strict", z.ZodTypeAny, {
3446
+ budgetTokens: number;
3447
+ }, {
3448
+ budgetTokens: number;
3449
+ }>]>>;
3319
3450
  modelId: z.ZodOptional<z.ZodString>;
3320
3451
  finishReason: z.ZodOptional<z.ZodEnum<["stop", "length", "content-filter", "tool-calls", "timeout", "error", "other", "unknown"]>>;
3321
3452
  usage: z.ZodOptional<z.ZodObject<{
@@ -3399,7 +3530,7 @@ export declare const AgentRunListResponseSchema: z.ZodObject<{
3399
3530
  scope: "output";
3400
3531
  path?: string | undefined;
3401
3532
  }>, "many">>;
3402
- error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled">>>;
3533
+ error: z.ZodOptional<z.ZodType<SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled">, z.ZodTypeDef, SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled">>>;
3403
3534
  attempt: z.ZodNumber;
3404
3535
  streamId: z.ZodString;
3405
3536
  createdAt: z.ZodString;
@@ -3409,16 +3540,22 @@ export declare const AgentRunListResponseSchema: z.ZodObject<{
3409
3540
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3410
3541
  projectId: string;
3411
3542
  id: string;
3412
- agentId: string;
3413
3543
  attempt: number;
3414
3544
  threadId: string;
3415
3545
  createdAt: string;
3416
3546
  triggerMessageId: string;
3417
3547
  streamId: string;
3418
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3548
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3419
3549
  startedAt?: string | undefined;
3420
3550
  completedAt?: string | undefined;
3551
+ model?: {
3552
+ provider: string;
3553
+ modelId: string;
3554
+ } | undefined;
3421
3555
  modelId?: string | undefined;
3556
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
3557
+ budgetTokens: number;
3558
+ } | undefined;
3422
3559
  usage?: {
3423
3560
  reportingStatus: "complete" | "partial" | "unavailable";
3424
3561
  inputTokens?: number | undefined;
@@ -3455,16 +3592,22 @@ export declare const AgentRunListResponseSchema: z.ZodObject<{
3455
3592
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3456
3593
  projectId: string;
3457
3594
  id: string;
3458
- agentId: string;
3459
3595
  attempt: number;
3460
3596
  threadId: string;
3461
3597
  createdAt: string;
3462
3598
  triggerMessageId: string;
3463
3599
  streamId: string;
3464
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3600
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3465
3601
  startedAt?: string | undefined;
3466
3602
  completedAt?: string | undefined;
3603
+ model?: {
3604
+ provider: string;
3605
+ modelId: string;
3606
+ } | undefined;
3467
3607
  modelId?: string | undefined;
3608
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
3609
+ budgetTokens: number;
3610
+ } | undefined;
3468
3611
  usage?: {
3469
3612
  reportingStatus: "complete" | "partial" | "unavailable";
3470
3613
  inputTokens?: number | undefined;
@@ -3505,16 +3648,22 @@ export declare const AgentRunListResponseSchema: z.ZodObject<{
3505
3648
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3506
3649
  projectId: string;
3507
3650
  id: string;
3508
- agentId: string;
3509
3651
  attempt: number;
3510
3652
  threadId: string;
3511
3653
  createdAt: string;
3512
3654
  triggerMessageId: string;
3513
3655
  streamId: string;
3514
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3656
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3515
3657
  startedAt?: string | undefined;
3516
3658
  completedAt?: string | undefined;
3659
+ model?: {
3660
+ provider: string;
3661
+ modelId: string;
3662
+ } | undefined;
3517
3663
  modelId?: string | undefined;
3664
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
3665
+ budgetTokens: number;
3666
+ } | undefined;
3518
3667
  usage?: {
3519
3668
  reportingStatus: "complete" | "partial" | "unavailable";
3520
3669
  inputTokens?: number | undefined;
@@ -3555,16 +3704,22 @@ export declare const AgentRunListResponseSchema: z.ZodObject<{
3555
3704
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3556
3705
  projectId: string;
3557
3706
  id: string;
3558
- agentId: string;
3559
3707
  attempt: number;
3560
3708
  threadId: string;
3561
3709
  createdAt: string;
3562
3710
  triggerMessageId: string;
3563
3711
  streamId: string;
3564
- error?: SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3712
+ error?: SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
3565
3713
  startedAt?: string | undefined;
3566
3714
  completedAt?: string | undefined;
3715
+ model?: {
3716
+ provider: string;
3717
+ modelId: string;
3718
+ } | undefined;
3567
3719
  modelId?: string | undefined;
3720
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
3721
+ budgetTokens: number;
3722
+ } | undefined;
3568
3723
  usage?: {
3569
3724
  reportingStatus: "complete" | "partial" | "unavailable";
3570
3725
  inputTokens?: number | undefined;