stitchkit 0.62.0 → 0.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,6 +99,7 @@ export declare const AgentStoreAppliedSchema: z.ZodObject<{
99
99
  assistantMessageId: z.ZodString;
100
100
  state: z.ZodEnum<{
101
101
  abandoned: "abandoned";
102
+ absorbed: "absorbed";
102
103
  cancelled: "cancelled";
103
104
  completed: "completed";
104
105
  failed: "failed";
@@ -117,6 +118,7 @@ export declare const AgentStoreAppliedSchema: z.ZodObject<{
117
118
  interrupted: "interrupted";
118
119
  policy_stop: "policy_stop";
119
120
  provider_failure: "provider_failure";
121
+ provider_stop: "provider_stop";
120
122
  shutdown: "shutdown";
121
123
  success: "success";
122
124
  superseded: "superseded";
@@ -124,6 +126,64 @@ export declare const AgentStoreAppliedSchema: z.ZodObject<{
124
126
  tool_failure: "tool_failure";
125
127
  }>>;
126
128
  terminalPolicyName: z.ZodOptional<z.ZodString>;
129
+ absorbedIntoRunId: z.ZodOptional<z.ZodString>;
130
+ usage: z.ZodOptional<z.ZodObject<{
131
+ inputTokens: z.ZodObject<{
132
+ value: z.ZodOptional<z.ZodNumber>;
133
+ provenance: z.ZodEnum<{
134
+ computed: "computed";
135
+ estimated: "estimated";
136
+ "provider-reported": "provider-reported";
137
+ unavailable: "unavailable";
138
+ }>;
139
+ }, z.core.$strip>;
140
+ outputTokens: z.ZodObject<{
141
+ value: z.ZodOptional<z.ZodNumber>;
142
+ provenance: z.ZodEnum<{
143
+ computed: "computed";
144
+ estimated: "estimated";
145
+ "provider-reported": "provider-reported";
146
+ unavailable: "unavailable";
147
+ }>;
148
+ }, z.core.$strip>;
149
+ reasoningTokens: z.ZodOptional<z.ZodObject<{
150
+ value: z.ZodOptional<z.ZodNumber>;
151
+ provenance: z.ZodEnum<{
152
+ computed: "computed";
153
+ estimated: "estimated";
154
+ "provider-reported": "provider-reported";
155
+ unavailable: "unavailable";
156
+ }>;
157
+ }, z.core.$strip>>;
158
+ cacheReadTokens: z.ZodOptional<z.ZodObject<{
159
+ value: z.ZodOptional<z.ZodNumber>;
160
+ provenance: z.ZodEnum<{
161
+ computed: "computed";
162
+ estimated: "estimated";
163
+ "provider-reported": "provider-reported";
164
+ unavailable: "unavailable";
165
+ }>;
166
+ }, z.core.$strip>>;
167
+ cacheWriteTokens: z.ZodOptional<z.ZodObject<{
168
+ value: z.ZodOptional<z.ZodNumber>;
169
+ provenance: z.ZodEnum<{
170
+ computed: "computed";
171
+ estimated: "estimated";
172
+ "provider-reported": "provider-reported";
173
+ unavailable: "unavailable";
174
+ }>;
175
+ }, z.core.$strip>>;
176
+ cost: z.ZodOptional<z.ZodObject<{
177
+ value: z.ZodOptional<z.ZodNumber>;
178
+ currency: z.ZodOptional<z.ZodString>;
179
+ provenance: z.ZodEnum<{
180
+ computed: "computed";
181
+ estimated: "estimated";
182
+ "provider-reported": "provider-reported";
183
+ unavailable: "unavailable";
184
+ }>;
185
+ }, z.core.$strip>>;
186
+ }, z.core.$strip>>;
127
187
  createdAt: z.ZodISODateTime;
128
188
  updatedAt: z.ZodISODateTime;
129
189
  }, z.core.$strip>>;
@@ -220,6 +280,7 @@ export declare const AgentStoreDuplicateSchema: z.ZodObject<{
220
280
  assistantMessageId: z.ZodString;
221
281
  state: z.ZodEnum<{
222
282
  abandoned: "abandoned";
283
+ absorbed: "absorbed";
223
284
  cancelled: "cancelled";
224
285
  completed: "completed";
225
286
  failed: "failed";
@@ -238,6 +299,7 @@ export declare const AgentStoreDuplicateSchema: z.ZodObject<{
238
299
  interrupted: "interrupted";
239
300
  policy_stop: "policy_stop";
240
301
  provider_failure: "provider_failure";
302
+ provider_stop: "provider_stop";
241
303
  shutdown: "shutdown";
242
304
  success: "success";
243
305
  superseded: "superseded";
@@ -245,6 +307,64 @@ export declare const AgentStoreDuplicateSchema: z.ZodObject<{
245
307
  tool_failure: "tool_failure";
246
308
  }>>;
247
309
  terminalPolicyName: z.ZodOptional<z.ZodString>;
310
+ absorbedIntoRunId: z.ZodOptional<z.ZodString>;
311
+ usage: z.ZodOptional<z.ZodObject<{
312
+ inputTokens: z.ZodObject<{
313
+ value: z.ZodOptional<z.ZodNumber>;
314
+ provenance: z.ZodEnum<{
315
+ computed: "computed";
316
+ estimated: "estimated";
317
+ "provider-reported": "provider-reported";
318
+ unavailable: "unavailable";
319
+ }>;
320
+ }, z.core.$strip>;
321
+ outputTokens: z.ZodObject<{
322
+ value: z.ZodOptional<z.ZodNumber>;
323
+ provenance: z.ZodEnum<{
324
+ computed: "computed";
325
+ estimated: "estimated";
326
+ "provider-reported": "provider-reported";
327
+ unavailable: "unavailable";
328
+ }>;
329
+ }, z.core.$strip>;
330
+ reasoningTokens: z.ZodOptional<z.ZodObject<{
331
+ value: z.ZodOptional<z.ZodNumber>;
332
+ provenance: z.ZodEnum<{
333
+ computed: "computed";
334
+ estimated: "estimated";
335
+ "provider-reported": "provider-reported";
336
+ unavailable: "unavailable";
337
+ }>;
338
+ }, z.core.$strip>>;
339
+ cacheReadTokens: z.ZodOptional<z.ZodObject<{
340
+ value: z.ZodOptional<z.ZodNumber>;
341
+ provenance: z.ZodEnum<{
342
+ computed: "computed";
343
+ estimated: "estimated";
344
+ "provider-reported": "provider-reported";
345
+ unavailable: "unavailable";
346
+ }>;
347
+ }, z.core.$strip>>;
348
+ cacheWriteTokens: z.ZodOptional<z.ZodObject<{
349
+ value: z.ZodOptional<z.ZodNumber>;
350
+ provenance: z.ZodEnum<{
351
+ computed: "computed";
352
+ estimated: "estimated";
353
+ "provider-reported": "provider-reported";
354
+ unavailable: "unavailable";
355
+ }>;
356
+ }, z.core.$strip>>;
357
+ cost: z.ZodOptional<z.ZodObject<{
358
+ value: z.ZodOptional<z.ZodNumber>;
359
+ currency: z.ZodOptional<z.ZodString>;
360
+ provenance: z.ZodEnum<{
361
+ computed: "computed";
362
+ estimated: "estimated";
363
+ "provider-reported": "provider-reported";
364
+ unavailable: "unavailable";
365
+ }>;
366
+ }, z.core.$strip>>;
367
+ }, z.core.$strip>>;
248
368
  createdAt: z.ZodISODateTime;
249
369
  updatedAt: z.ZodISODateTime;
250
370
  }, z.core.$strip>;
@@ -416,6 +536,7 @@ export declare const AgentStoreDuplicateSchema: z.ZodObject<{
416
536
  assistantMessageId: z.ZodString;
417
537
  state: z.ZodEnum<{
418
538
  abandoned: "abandoned";
539
+ absorbed: "absorbed";
419
540
  cancelled: "cancelled";
420
541
  completed: "completed";
421
542
  failed: "failed";
@@ -434,6 +555,7 @@ export declare const AgentStoreDuplicateSchema: z.ZodObject<{
434
555
  interrupted: "interrupted";
435
556
  policy_stop: "policy_stop";
436
557
  provider_failure: "provider_failure";
558
+ provider_stop: "provider_stop";
437
559
  shutdown: "shutdown";
438
560
  success: "success";
439
561
  superseded: "superseded";
@@ -441,6 +563,64 @@ export declare const AgentStoreDuplicateSchema: z.ZodObject<{
441
563
  tool_failure: "tool_failure";
442
564
  }>>;
443
565
  terminalPolicyName: z.ZodOptional<z.ZodString>;
566
+ absorbedIntoRunId: z.ZodOptional<z.ZodString>;
567
+ usage: z.ZodOptional<z.ZodObject<{
568
+ inputTokens: z.ZodObject<{
569
+ value: z.ZodOptional<z.ZodNumber>;
570
+ provenance: z.ZodEnum<{
571
+ computed: "computed";
572
+ estimated: "estimated";
573
+ "provider-reported": "provider-reported";
574
+ unavailable: "unavailable";
575
+ }>;
576
+ }, z.core.$strip>;
577
+ outputTokens: z.ZodObject<{
578
+ value: z.ZodOptional<z.ZodNumber>;
579
+ provenance: z.ZodEnum<{
580
+ computed: "computed";
581
+ estimated: "estimated";
582
+ "provider-reported": "provider-reported";
583
+ unavailable: "unavailable";
584
+ }>;
585
+ }, z.core.$strip>;
586
+ reasoningTokens: z.ZodOptional<z.ZodObject<{
587
+ value: z.ZodOptional<z.ZodNumber>;
588
+ provenance: z.ZodEnum<{
589
+ computed: "computed";
590
+ estimated: "estimated";
591
+ "provider-reported": "provider-reported";
592
+ unavailable: "unavailable";
593
+ }>;
594
+ }, z.core.$strip>>;
595
+ cacheReadTokens: z.ZodOptional<z.ZodObject<{
596
+ value: z.ZodOptional<z.ZodNumber>;
597
+ provenance: z.ZodEnum<{
598
+ computed: "computed";
599
+ estimated: "estimated";
600
+ "provider-reported": "provider-reported";
601
+ unavailable: "unavailable";
602
+ }>;
603
+ }, z.core.$strip>>;
604
+ cacheWriteTokens: z.ZodOptional<z.ZodObject<{
605
+ value: z.ZodOptional<z.ZodNumber>;
606
+ provenance: z.ZodEnum<{
607
+ computed: "computed";
608
+ estimated: "estimated";
609
+ "provider-reported": "provider-reported";
610
+ unavailable: "unavailable";
611
+ }>;
612
+ }, z.core.$strip>>;
613
+ cost: z.ZodOptional<z.ZodObject<{
614
+ value: z.ZodOptional<z.ZodNumber>;
615
+ currency: z.ZodOptional<z.ZodString>;
616
+ provenance: z.ZodEnum<{
617
+ computed: "computed";
618
+ estimated: "estimated";
619
+ "provider-reported": "provider-reported";
620
+ unavailable: "unavailable";
621
+ }>;
622
+ }, z.core.$strip>>;
623
+ }, z.core.$strip>>;
444
624
  createdAt: z.ZodISODateTime;
445
625
  updatedAt: z.ZodISODateTime;
446
626
  }, z.core.$strip>>;
@@ -538,6 +718,7 @@ export declare const AgentStoreMutationResultSchema: z.ZodDiscriminatedUnion<[z.
538
718
  assistantMessageId: z.ZodString;
539
719
  state: z.ZodEnum<{
540
720
  abandoned: "abandoned";
721
+ absorbed: "absorbed";
541
722
  cancelled: "cancelled";
542
723
  completed: "completed";
543
724
  failed: "failed";
@@ -556,6 +737,7 @@ export declare const AgentStoreMutationResultSchema: z.ZodDiscriminatedUnion<[z.
556
737
  interrupted: "interrupted";
557
738
  policy_stop: "policy_stop";
558
739
  provider_failure: "provider_failure";
740
+ provider_stop: "provider_stop";
559
741
  shutdown: "shutdown";
560
742
  success: "success";
561
743
  superseded: "superseded";
@@ -563,6 +745,64 @@ export declare const AgentStoreMutationResultSchema: z.ZodDiscriminatedUnion<[z.
563
745
  tool_failure: "tool_failure";
564
746
  }>>;
565
747
  terminalPolicyName: z.ZodOptional<z.ZodString>;
748
+ absorbedIntoRunId: z.ZodOptional<z.ZodString>;
749
+ usage: z.ZodOptional<z.ZodObject<{
750
+ inputTokens: z.ZodObject<{
751
+ value: z.ZodOptional<z.ZodNumber>;
752
+ provenance: z.ZodEnum<{
753
+ computed: "computed";
754
+ estimated: "estimated";
755
+ "provider-reported": "provider-reported";
756
+ unavailable: "unavailable";
757
+ }>;
758
+ }, z.core.$strip>;
759
+ outputTokens: z.ZodObject<{
760
+ value: z.ZodOptional<z.ZodNumber>;
761
+ provenance: z.ZodEnum<{
762
+ computed: "computed";
763
+ estimated: "estimated";
764
+ "provider-reported": "provider-reported";
765
+ unavailable: "unavailable";
766
+ }>;
767
+ }, z.core.$strip>;
768
+ reasoningTokens: z.ZodOptional<z.ZodObject<{
769
+ value: z.ZodOptional<z.ZodNumber>;
770
+ provenance: z.ZodEnum<{
771
+ computed: "computed";
772
+ estimated: "estimated";
773
+ "provider-reported": "provider-reported";
774
+ unavailable: "unavailable";
775
+ }>;
776
+ }, z.core.$strip>>;
777
+ cacheReadTokens: z.ZodOptional<z.ZodObject<{
778
+ value: z.ZodOptional<z.ZodNumber>;
779
+ provenance: z.ZodEnum<{
780
+ computed: "computed";
781
+ estimated: "estimated";
782
+ "provider-reported": "provider-reported";
783
+ unavailable: "unavailable";
784
+ }>;
785
+ }, z.core.$strip>>;
786
+ cacheWriteTokens: z.ZodOptional<z.ZodObject<{
787
+ value: z.ZodOptional<z.ZodNumber>;
788
+ provenance: z.ZodEnum<{
789
+ computed: "computed";
790
+ estimated: "estimated";
791
+ "provider-reported": "provider-reported";
792
+ unavailable: "unavailable";
793
+ }>;
794
+ }, z.core.$strip>>;
795
+ cost: z.ZodOptional<z.ZodObject<{
796
+ value: z.ZodOptional<z.ZodNumber>;
797
+ currency: z.ZodOptional<z.ZodString>;
798
+ provenance: z.ZodEnum<{
799
+ computed: "computed";
800
+ estimated: "estimated";
801
+ "provider-reported": "provider-reported";
802
+ unavailable: "unavailable";
803
+ }>;
804
+ }, z.core.$strip>>;
805
+ }, z.core.$strip>>;
566
806
  createdAt: z.ZodISODateTime;
567
807
  updatedAt: z.ZodISODateTime;
568
808
  }, z.core.$strip>>;
@@ -658,6 +898,7 @@ export declare const AgentStoreMutationResultSchema: z.ZodDiscriminatedUnion<[z.
658
898
  assistantMessageId: z.ZodString;
659
899
  state: z.ZodEnum<{
660
900
  abandoned: "abandoned";
901
+ absorbed: "absorbed";
661
902
  cancelled: "cancelled";
662
903
  completed: "completed";
663
904
  failed: "failed";
@@ -676,6 +917,7 @@ export declare const AgentStoreMutationResultSchema: z.ZodDiscriminatedUnion<[z.
676
917
  interrupted: "interrupted";
677
918
  policy_stop: "policy_stop";
678
919
  provider_failure: "provider_failure";
920
+ provider_stop: "provider_stop";
679
921
  shutdown: "shutdown";
680
922
  success: "success";
681
923
  superseded: "superseded";
@@ -683,6 +925,64 @@ export declare const AgentStoreMutationResultSchema: z.ZodDiscriminatedUnion<[z.
683
925
  tool_failure: "tool_failure";
684
926
  }>>;
685
927
  terminalPolicyName: z.ZodOptional<z.ZodString>;
928
+ absorbedIntoRunId: z.ZodOptional<z.ZodString>;
929
+ usage: z.ZodOptional<z.ZodObject<{
930
+ inputTokens: z.ZodObject<{
931
+ value: z.ZodOptional<z.ZodNumber>;
932
+ provenance: z.ZodEnum<{
933
+ computed: "computed";
934
+ estimated: "estimated";
935
+ "provider-reported": "provider-reported";
936
+ unavailable: "unavailable";
937
+ }>;
938
+ }, z.core.$strip>;
939
+ outputTokens: z.ZodObject<{
940
+ value: z.ZodOptional<z.ZodNumber>;
941
+ provenance: z.ZodEnum<{
942
+ computed: "computed";
943
+ estimated: "estimated";
944
+ "provider-reported": "provider-reported";
945
+ unavailable: "unavailable";
946
+ }>;
947
+ }, z.core.$strip>;
948
+ reasoningTokens: z.ZodOptional<z.ZodObject<{
949
+ value: z.ZodOptional<z.ZodNumber>;
950
+ provenance: z.ZodEnum<{
951
+ computed: "computed";
952
+ estimated: "estimated";
953
+ "provider-reported": "provider-reported";
954
+ unavailable: "unavailable";
955
+ }>;
956
+ }, z.core.$strip>>;
957
+ cacheReadTokens: z.ZodOptional<z.ZodObject<{
958
+ value: z.ZodOptional<z.ZodNumber>;
959
+ provenance: z.ZodEnum<{
960
+ computed: "computed";
961
+ estimated: "estimated";
962
+ "provider-reported": "provider-reported";
963
+ unavailable: "unavailable";
964
+ }>;
965
+ }, z.core.$strip>>;
966
+ cacheWriteTokens: z.ZodOptional<z.ZodObject<{
967
+ value: z.ZodOptional<z.ZodNumber>;
968
+ provenance: z.ZodEnum<{
969
+ computed: "computed";
970
+ estimated: "estimated";
971
+ "provider-reported": "provider-reported";
972
+ unavailable: "unavailable";
973
+ }>;
974
+ }, z.core.$strip>>;
975
+ cost: z.ZodOptional<z.ZodObject<{
976
+ value: z.ZodOptional<z.ZodNumber>;
977
+ currency: z.ZodOptional<z.ZodString>;
978
+ provenance: z.ZodEnum<{
979
+ computed: "computed";
980
+ estimated: "estimated";
981
+ "provider-reported": "provider-reported";
982
+ unavailable: "unavailable";
983
+ }>;
984
+ }, z.core.$strip>>;
985
+ }, z.core.$strip>>;
686
986
  createdAt: z.ZodISODateTime;
687
987
  updatedAt: z.ZodISODateTime;
688
988
  }, z.core.$strip>;
@@ -854,6 +1154,7 @@ export declare const AgentStoreMutationResultSchema: z.ZodDiscriminatedUnion<[z.
854
1154
  assistantMessageId: z.ZodString;
855
1155
  state: z.ZodEnum<{
856
1156
  abandoned: "abandoned";
1157
+ absorbed: "absorbed";
857
1158
  cancelled: "cancelled";
858
1159
  completed: "completed";
859
1160
  failed: "failed";
@@ -872,6 +1173,7 @@ export declare const AgentStoreMutationResultSchema: z.ZodDiscriminatedUnion<[z.
872
1173
  interrupted: "interrupted";
873
1174
  policy_stop: "policy_stop";
874
1175
  provider_failure: "provider_failure";
1176
+ provider_stop: "provider_stop";
875
1177
  shutdown: "shutdown";
876
1178
  success: "success";
877
1179
  superseded: "superseded";
@@ -879,6 +1181,64 @@ export declare const AgentStoreMutationResultSchema: z.ZodDiscriminatedUnion<[z.
879
1181
  tool_failure: "tool_failure";
880
1182
  }>>;
881
1183
  terminalPolicyName: z.ZodOptional<z.ZodString>;
1184
+ absorbedIntoRunId: z.ZodOptional<z.ZodString>;
1185
+ usage: z.ZodOptional<z.ZodObject<{
1186
+ inputTokens: z.ZodObject<{
1187
+ value: z.ZodOptional<z.ZodNumber>;
1188
+ provenance: z.ZodEnum<{
1189
+ computed: "computed";
1190
+ estimated: "estimated";
1191
+ "provider-reported": "provider-reported";
1192
+ unavailable: "unavailable";
1193
+ }>;
1194
+ }, z.core.$strip>;
1195
+ outputTokens: z.ZodObject<{
1196
+ value: z.ZodOptional<z.ZodNumber>;
1197
+ provenance: z.ZodEnum<{
1198
+ computed: "computed";
1199
+ estimated: "estimated";
1200
+ "provider-reported": "provider-reported";
1201
+ unavailable: "unavailable";
1202
+ }>;
1203
+ }, z.core.$strip>;
1204
+ reasoningTokens: z.ZodOptional<z.ZodObject<{
1205
+ value: z.ZodOptional<z.ZodNumber>;
1206
+ provenance: z.ZodEnum<{
1207
+ computed: "computed";
1208
+ estimated: "estimated";
1209
+ "provider-reported": "provider-reported";
1210
+ unavailable: "unavailable";
1211
+ }>;
1212
+ }, z.core.$strip>>;
1213
+ cacheReadTokens: z.ZodOptional<z.ZodObject<{
1214
+ value: z.ZodOptional<z.ZodNumber>;
1215
+ provenance: z.ZodEnum<{
1216
+ computed: "computed";
1217
+ estimated: "estimated";
1218
+ "provider-reported": "provider-reported";
1219
+ unavailable: "unavailable";
1220
+ }>;
1221
+ }, z.core.$strip>>;
1222
+ cacheWriteTokens: z.ZodOptional<z.ZodObject<{
1223
+ value: z.ZodOptional<z.ZodNumber>;
1224
+ provenance: z.ZodEnum<{
1225
+ computed: "computed";
1226
+ estimated: "estimated";
1227
+ "provider-reported": "provider-reported";
1228
+ unavailable: "unavailable";
1229
+ }>;
1230
+ }, z.core.$strip>>;
1231
+ cost: z.ZodOptional<z.ZodObject<{
1232
+ value: z.ZodOptional<z.ZodNumber>;
1233
+ currency: z.ZodOptional<z.ZodString>;
1234
+ provenance: z.ZodEnum<{
1235
+ computed: "computed";
1236
+ estimated: "estimated";
1237
+ "provider-reported": "provider-reported";
1238
+ unavailable: "unavailable";
1239
+ }>;
1240
+ }, z.core.$strip>>;
1241
+ }, z.core.$strip>>;
882
1242
  createdAt: z.ZodISODateTime;
883
1243
  updatedAt: z.ZodISODateTime;
884
1244
  }, z.core.$strip>>;
@@ -979,6 +1339,7 @@ export declare const AcceptInputAndAssignRunSchema: z.ZodObject<{
979
1339
  assistantMessageId: z.ZodString;
980
1340
  state: z.ZodEnum<{
981
1341
  abandoned: "abandoned";
1342
+ absorbed: "absorbed";
982
1343
  cancelled: "cancelled";
983
1344
  completed: "completed";
984
1345
  failed: "failed";
@@ -997,6 +1358,7 @@ export declare const AcceptInputAndAssignRunSchema: z.ZodObject<{
997
1358
  interrupted: "interrupted";
998
1359
  policy_stop: "policy_stop";
999
1360
  provider_failure: "provider_failure";
1361
+ provider_stop: "provider_stop";
1000
1362
  shutdown: "shutdown";
1001
1363
  success: "success";
1002
1364
  superseded: "superseded";
@@ -1004,6 +1366,64 @@ export declare const AcceptInputAndAssignRunSchema: z.ZodObject<{
1004
1366
  tool_failure: "tool_failure";
1005
1367
  }>>;
1006
1368
  terminalPolicyName: z.ZodOptional<z.ZodString>;
1369
+ absorbedIntoRunId: z.ZodOptional<z.ZodString>;
1370
+ usage: z.ZodOptional<z.ZodObject<{
1371
+ inputTokens: z.ZodObject<{
1372
+ value: z.ZodOptional<z.ZodNumber>;
1373
+ provenance: z.ZodEnum<{
1374
+ computed: "computed";
1375
+ estimated: "estimated";
1376
+ "provider-reported": "provider-reported";
1377
+ unavailable: "unavailable";
1378
+ }>;
1379
+ }, z.core.$strip>;
1380
+ outputTokens: z.ZodObject<{
1381
+ value: z.ZodOptional<z.ZodNumber>;
1382
+ provenance: z.ZodEnum<{
1383
+ computed: "computed";
1384
+ estimated: "estimated";
1385
+ "provider-reported": "provider-reported";
1386
+ unavailable: "unavailable";
1387
+ }>;
1388
+ }, z.core.$strip>;
1389
+ reasoningTokens: z.ZodOptional<z.ZodObject<{
1390
+ value: z.ZodOptional<z.ZodNumber>;
1391
+ provenance: z.ZodEnum<{
1392
+ computed: "computed";
1393
+ estimated: "estimated";
1394
+ "provider-reported": "provider-reported";
1395
+ unavailable: "unavailable";
1396
+ }>;
1397
+ }, z.core.$strip>>;
1398
+ cacheReadTokens: z.ZodOptional<z.ZodObject<{
1399
+ value: z.ZodOptional<z.ZodNumber>;
1400
+ provenance: z.ZodEnum<{
1401
+ computed: "computed";
1402
+ estimated: "estimated";
1403
+ "provider-reported": "provider-reported";
1404
+ unavailable: "unavailable";
1405
+ }>;
1406
+ }, z.core.$strip>>;
1407
+ cacheWriteTokens: z.ZodOptional<z.ZodObject<{
1408
+ value: z.ZodOptional<z.ZodNumber>;
1409
+ provenance: z.ZodEnum<{
1410
+ computed: "computed";
1411
+ estimated: "estimated";
1412
+ "provider-reported": "provider-reported";
1413
+ unavailable: "unavailable";
1414
+ }>;
1415
+ }, z.core.$strip>>;
1416
+ cost: z.ZodOptional<z.ZodObject<{
1417
+ value: z.ZodOptional<z.ZodNumber>;
1418
+ currency: z.ZodOptional<z.ZodString>;
1419
+ provenance: z.ZodEnum<{
1420
+ computed: "computed";
1421
+ estimated: "estimated";
1422
+ "provider-reported": "provider-reported";
1423
+ unavailable: "unavailable";
1424
+ }>;
1425
+ }, z.core.$strip>>;
1426
+ }, z.core.$strip>>;
1007
1427
  createdAt: z.ZodISODateTime;
1008
1428
  updatedAt: z.ZodISODateTime;
1009
1429
  }, z.core.$strip>;
@@ -1099,6 +1519,63 @@ export declare const CheckpointRunAssistantSchema: z.ZodObject<{
1099
1519
  createdAt: z.ZodISODateTime;
1100
1520
  updatedAt: z.ZodISODateTime;
1101
1521
  }, z.core.$strip>;
1522
+ usage: z.ZodOptional<z.ZodObject<{
1523
+ inputTokens: z.ZodObject<{
1524
+ value: z.ZodOptional<z.ZodNumber>;
1525
+ provenance: z.ZodEnum<{
1526
+ computed: "computed";
1527
+ estimated: "estimated";
1528
+ "provider-reported": "provider-reported";
1529
+ unavailable: "unavailable";
1530
+ }>;
1531
+ }, z.core.$strip>;
1532
+ outputTokens: z.ZodObject<{
1533
+ value: z.ZodOptional<z.ZodNumber>;
1534
+ provenance: z.ZodEnum<{
1535
+ computed: "computed";
1536
+ estimated: "estimated";
1537
+ "provider-reported": "provider-reported";
1538
+ unavailable: "unavailable";
1539
+ }>;
1540
+ }, z.core.$strip>;
1541
+ reasoningTokens: z.ZodOptional<z.ZodObject<{
1542
+ value: z.ZodOptional<z.ZodNumber>;
1543
+ provenance: z.ZodEnum<{
1544
+ computed: "computed";
1545
+ estimated: "estimated";
1546
+ "provider-reported": "provider-reported";
1547
+ unavailable: "unavailable";
1548
+ }>;
1549
+ }, z.core.$strip>>;
1550
+ cacheReadTokens: z.ZodOptional<z.ZodObject<{
1551
+ value: z.ZodOptional<z.ZodNumber>;
1552
+ provenance: z.ZodEnum<{
1553
+ computed: "computed";
1554
+ estimated: "estimated";
1555
+ "provider-reported": "provider-reported";
1556
+ unavailable: "unavailable";
1557
+ }>;
1558
+ }, z.core.$strip>>;
1559
+ cacheWriteTokens: z.ZodOptional<z.ZodObject<{
1560
+ value: z.ZodOptional<z.ZodNumber>;
1561
+ provenance: z.ZodEnum<{
1562
+ computed: "computed";
1563
+ estimated: "estimated";
1564
+ "provider-reported": "provider-reported";
1565
+ unavailable: "unavailable";
1566
+ }>;
1567
+ }, z.core.$strip>>;
1568
+ cost: z.ZodOptional<z.ZodObject<{
1569
+ value: z.ZodOptional<z.ZodNumber>;
1570
+ currency: z.ZodOptional<z.ZodString>;
1571
+ provenance: z.ZodEnum<{
1572
+ computed: "computed";
1573
+ estimated: "estimated";
1574
+ "provider-reported": "provider-reported";
1575
+ unavailable: "unavailable";
1576
+ }>;
1577
+ }, z.core.$strip>>;
1578
+ }, z.core.$strip>>;
1102
1579
  }, z.core.$strip>;
1103
1580
  export declare const CommitRunTerminalSchema: z.ZodObject<{
1104
1581
  conversationId: z.ZodString;
@@ -1190,6 +1667,7 @@ export declare const CommitRunTerminalSchema: z.ZodObject<{
1190
1667
  interrupted: "interrupted";
1191
1668
  policy_stop: "policy_stop";
1192
1669
  provider_failure: "provider_failure";
1670
+ provider_stop: "provider_stop";
1193
1671
  shutdown: "shutdown";
1194
1672
  success: "success";
1195
1673
  superseded: "superseded";
@@ -1197,6 +1675,82 @@ export declare const CommitRunTerminalSchema: z.ZodObject<{
1197
1675
  tool_failure: "tool_failure";
1198
1676
  }>;
1199
1677
  policyName: z.ZodOptional<z.ZodString>;
1678
+ usage: z.ZodOptional<z.ZodObject<{
1679
+ inputTokens: z.ZodObject<{
1680
+ value: z.ZodOptional<z.ZodNumber>;
1681
+ provenance: z.ZodEnum<{
1682
+ computed: "computed";
1683
+ estimated: "estimated";
1684
+ "provider-reported": "provider-reported";
1685
+ unavailable: "unavailable";
1686
+ }>;
1687
+ }, z.core.$strip>;
1688
+ outputTokens: z.ZodObject<{
1689
+ value: z.ZodOptional<z.ZodNumber>;
1690
+ provenance: z.ZodEnum<{
1691
+ computed: "computed";
1692
+ estimated: "estimated";
1693
+ "provider-reported": "provider-reported";
1694
+ unavailable: "unavailable";
1695
+ }>;
1696
+ }, z.core.$strip>;
1697
+ reasoningTokens: z.ZodOptional<z.ZodObject<{
1698
+ value: z.ZodOptional<z.ZodNumber>;
1699
+ provenance: z.ZodEnum<{
1700
+ computed: "computed";
1701
+ estimated: "estimated";
1702
+ "provider-reported": "provider-reported";
1703
+ unavailable: "unavailable";
1704
+ }>;
1705
+ }, z.core.$strip>>;
1706
+ cacheReadTokens: z.ZodOptional<z.ZodObject<{
1707
+ value: z.ZodOptional<z.ZodNumber>;
1708
+ provenance: z.ZodEnum<{
1709
+ computed: "computed";
1710
+ estimated: "estimated";
1711
+ "provider-reported": "provider-reported";
1712
+ unavailable: "unavailable";
1713
+ }>;
1714
+ }, z.core.$strip>>;
1715
+ cacheWriteTokens: z.ZodOptional<z.ZodObject<{
1716
+ value: z.ZodOptional<z.ZodNumber>;
1717
+ provenance: z.ZodEnum<{
1718
+ computed: "computed";
1719
+ estimated: "estimated";
1720
+ "provider-reported": "provider-reported";
1721
+ unavailable: "unavailable";
1722
+ }>;
1723
+ }, z.core.$strip>>;
1724
+ cost: z.ZodOptional<z.ZodObject<{
1725
+ value: z.ZodOptional<z.ZodNumber>;
1726
+ currency: z.ZodOptional<z.ZodString>;
1727
+ provenance: z.ZodEnum<{
1728
+ computed: "computed";
1729
+ estimated: "estimated";
1730
+ "provider-reported": "provider-reported";
1731
+ unavailable: "unavailable";
1732
+ }>;
1733
+ }, z.core.$strip>>;
1734
+ }, z.core.$strip>>;
1735
+ }, z.core.$strip>;
1736
+ /**
1737
+ * Move a queued successor's inputs into the run already answering, atomically.
1738
+ *
1739
+ * The alternative — attaching a new input straight to a running run — has a
1740
+ * loss case with no honest answer: the run may terminate before the loop ever
1741
+ * reaches a step boundary, and the input is then recorded as answered by a turn
1742
+ * that never saw it. Accepting it as an ordinary successor first means the
1743
+ * fallback is simply that the successor runs, which is the behaviour every
1744
+ * other policy already has.
1745
+ */
1746
+ export declare const AbsorbQueuedRunSchema: z.ZodObject<{
1747
+ conversationId: z.ZodString;
1748
+ runningRunId: z.ZodString;
1749
+ runningExpectedRevision: z.ZodInt;
1750
+ ownerId: z.ZodString;
1751
+ fencingToken: z.ZodOptional<z.ZodInt>;
1752
+ queuedRunId: z.ZodString;
1753
+ queuedExpectedRevision: z.ZodInt;
1200
1754
  }, z.core.$strip>;
1201
1755
  export declare const RequestRunInterruptSchema: z.ZodObject<{
1202
1756
  conversationId: z.ZodString;
@@ -1300,6 +1854,7 @@ export type AcceptInputAndAssignRun = z.infer<typeof AcceptInputAndAssignRunSche
1300
1854
  export type AcquireAgentRun = z.infer<typeof AcquireAgentRunSchema>;
1301
1855
  export type CheckpointRunAssistant = z.infer<typeof CheckpointRunAssistantSchema>;
1302
1856
  export type CommitRunTerminal = z.infer<typeof CommitRunTerminalSchema>;
1857
+ export type AbsorbQueuedRun = z.infer<typeof AbsorbQueuedRunSchema>;
1303
1858
  export type RequestRunInterrupt = z.infer<typeof RequestRunInterruptSchema>;
1304
1859
  export type RecoverAgentRun = z.infer<typeof RecoverAgentRunSchema>;
1305
1860
  export type ReplaceCompactedRange = z.infer<typeof ReplaceCompactedRangeSchema>;
@@ -1309,6 +1864,7 @@ export interface AgentRuntimeStore {
1309
1864
  acquireRun(input: AcquireAgentRun): Promise<AgentStoreMutationResult>;
1310
1865
  checkpointRunAssistant(input: CheckpointRunAssistant): Promise<AgentStoreMutationResult>;
1311
1866
  requestRunInterrupt(input: RequestRunInterrupt): Promise<AgentStoreMutationResult>;
1867
+ absorbQueuedRun(input: AbsorbQueuedRun): Promise<AgentStoreMutationResult>;
1312
1868
  recoverRun(input: RecoverAgentRun): Promise<AgentStoreMutationResult>;
1313
1869
  commitRunTerminal(input: CommitRunTerminal): Promise<AgentStoreMutationResult>;
1314
1870
  replaceCompactedRange(input: ReplaceCompactedRange): Promise<AgentStoreMutationResult>;