@adecore/agent-contracts 0.41.1 → 0.42.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.
- package/dist/chat.d.ts +119 -0
- package/dist/chat.js +21 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/protocol.d.ts +81 -0
- package/dist/protocol.js +2 -1
- package/package.json +2 -2
- package/src/chat.ts +28 -2
- package/src/index.ts +7 -0
- package/src/protocol.ts +3 -0
package/dist/chat.d.ts
CHANGED
|
@@ -769,6 +769,12 @@ export declare const ChatWorkflowSchema: z.ZodObject<{
|
|
|
769
769
|
export type ChatWorkflow = z.infer<typeof ChatWorkflowSchema>;
|
|
770
770
|
export declare function workflowAgentRef(agentId: string): string;
|
|
771
771
|
export declare function workflowAgentIdOf(ref: string): string | null;
|
|
772
|
+
export declare const CHAT_PAYLOAD_INLINE_BYTES: number;
|
|
773
|
+
export declare const ChatPayloadRefSchema: z.ZodObject<{
|
|
774
|
+
id: z.ZodString;
|
|
775
|
+
bytes: z.ZodNumber;
|
|
776
|
+
}, z.core.$strip>;
|
|
777
|
+
export type ChatPayloadRef = z.infer<typeof ChatPayloadRefSchema>;
|
|
772
778
|
export declare const ChatToolItemSchema: z.ZodObject<{
|
|
773
779
|
id: z.ZodString;
|
|
774
780
|
createdAt: z.ZodNumber;
|
|
@@ -826,6 +832,10 @@ export declare const ChatToolItemSchema: z.ZodObject<{
|
|
|
826
832
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
827
833
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
828
834
|
}, z.core.$strip>>;
|
|
835
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
836
|
+
id: z.ZodString;
|
|
837
|
+
bytes: z.ZodNumber;
|
|
838
|
+
}, z.core.$strip>>;
|
|
829
839
|
}, z.core.$strip>;
|
|
830
840
|
export declare const ChatSubagentUsageSchema: z.ZodObject<{
|
|
831
841
|
totalTokens: z.ZodNumber;
|
|
@@ -1022,6 +1032,10 @@ export declare const ChatTurnItemSchema: z.ZodObject<{
|
|
|
1022
1032
|
}>;
|
|
1023
1033
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
1024
1034
|
}, z.core.$strip>>;
|
|
1035
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
1036
|
+
id: z.ZodString;
|
|
1037
|
+
bytes: z.ZodNumber;
|
|
1038
|
+
}, z.core.$strip>>;
|
|
1025
1039
|
}, z.core.$strip>;
|
|
1026
1040
|
export declare function notResumedNote(reason: string): string;
|
|
1027
1041
|
export declare function abortedByMachine(turn: {
|
|
@@ -1244,6 +1258,10 @@ export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1244
1258
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
1245
1259
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
1246
1260
|
}, z.core.$strip>>;
|
|
1261
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
1262
|
+
id: z.ZodString;
|
|
1263
|
+
bytes: z.ZodNumber;
|
|
1264
|
+
}, z.core.$strip>>;
|
|
1247
1265
|
}, z.core.$strip>, z.ZodObject<{
|
|
1248
1266
|
id: z.ZodString;
|
|
1249
1267
|
createdAt: z.ZodNumber;
|
|
@@ -1386,6 +1404,10 @@ export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1386
1404
|
}>;
|
|
1387
1405
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
1388
1406
|
}, z.core.$strip>>;
|
|
1407
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
1408
|
+
id: z.ZodString;
|
|
1409
|
+
bytes: z.ZodNumber;
|
|
1410
|
+
}, z.core.$strip>>;
|
|
1389
1411
|
}, z.core.$strip>, z.ZodObject<{
|
|
1390
1412
|
id: z.ZodString;
|
|
1391
1413
|
createdAt: z.ZodNumber;
|
|
@@ -1602,6 +1624,10 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1602
1624
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
1603
1625
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
1604
1626
|
}, z.core.$strip>>;
|
|
1627
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
1628
|
+
id: z.ZodString;
|
|
1629
|
+
bytes: z.ZodNumber;
|
|
1630
|
+
}, z.core.$strip>>;
|
|
1605
1631
|
}, z.core.$strip>, z.ZodObject<{
|
|
1606
1632
|
id: z.ZodString;
|
|
1607
1633
|
createdAt: z.ZodNumber;
|
|
@@ -1744,6 +1770,10 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1744
1770
|
}>;
|
|
1745
1771
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
1746
1772
|
}, z.core.$strip>>;
|
|
1773
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
1774
|
+
id: z.ZodString;
|
|
1775
|
+
bytes: z.ZodNumber;
|
|
1776
|
+
}, z.core.$strip>>;
|
|
1747
1777
|
}, z.core.$strip>, z.ZodObject<{
|
|
1748
1778
|
id: z.ZodString;
|
|
1749
1779
|
createdAt: z.ZodNumber;
|
|
@@ -2345,6 +2375,10 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2345
2375
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
2346
2376
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
2347
2377
|
}, z.core.$strip>>;
|
|
2378
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
2379
|
+
id: z.ZodString;
|
|
2380
|
+
bytes: z.ZodNumber;
|
|
2381
|
+
}, z.core.$strip>>;
|
|
2348
2382
|
}, z.core.$strip>, z.ZodObject<{
|
|
2349
2383
|
id: z.ZodString;
|
|
2350
2384
|
createdAt: z.ZodNumber;
|
|
@@ -2487,6 +2521,10 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2487
2521
|
}>;
|
|
2488
2522
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
2489
2523
|
}, z.core.$strip>>;
|
|
2524
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
2525
|
+
id: z.ZodString;
|
|
2526
|
+
bytes: z.ZodNumber;
|
|
2527
|
+
}, z.core.$strip>>;
|
|
2490
2528
|
}, z.core.$strip>, z.ZodObject<{
|
|
2491
2529
|
id: z.ZodString;
|
|
2492
2530
|
createdAt: z.ZodNumber;
|
|
@@ -2693,6 +2731,10 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
2693
2731
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
2694
2732
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
2695
2733
|
}, z.core.$strip>>;
|
|
2734
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
2735
|
+
id: z.ZodString;
|
|
2736
|
+
bytes: z.ZodNumber;
|
|
2737
|
+
}, z.core.$strip>>;
|
|
2696
2738
|
}, z.core.$strip>, z.ZodObject<{
|
|
2697
2739
|
id: z.ZodString;
|
|
2698
2740
|
createdAt: z.ZodNumber;
|
|
@@ -2835,6 +2877,10 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
2835
2877
|
}>;
|
|
2836
2878
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
2837
2879
|
}, z.core.$strip>>;
|
|
2880
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
2881
|
+
id: z.ZodString;
|
|
2882
|
+
bytes: z.ZodNumber;
|
|
2883
|
+
}, z.core.$strip>>;
|
|
2838
2884
|
}, z.core.$strip>, z.ZodObject<{
|
|
2839
2885
|
id: z.ZodString;
|
|
2840
2886
|
createdAt: z.ZodNumber;
|
|
@@ -3436,6 +3482,10 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
3436
3482
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
3437
3483
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
3438
3484
|
}, z.core.$strip>>;
|
|
3485
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
3486
|
+
id: z.ZodString;
|
|
3487
|
+
bytes: z.ZodNumber;
|
|
3488
|
+
}, z.core.$strip>>;
|
|
3439
3489
|
}, z.core.$strip>, z.ZodObject<{
|
|
3440
3490
|
id: z.ZodString;
|
|
3441
3491
|
createdAt: z.ZodNumber;
|
|
@@ -3578,6 +3628,10 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
3578
3628
|
}>;
|
|
3579
3629
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
3580
3630
|
}, z.core.$strip>>;
|
|
3631
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
3632
|
+
id: z.ZodString;
|
|
3633
|
+
bytes: z.ZodNumber;
|
|
3634
|
+
}, z.core.$strip>>;
|
|
3581
3635
|
}, z.core.$strip>, z.ZodObject<{
|
|
3582
3636
|
id: z.ZodString;
|
|
3583
3637
|
createdAt: z.ZodNumber;
|
|
@@ -3866,6 +3920,10 @@ export declare const ChatHistoryResultSchema: z.ZodObject<{
|
|
|
3866
3920
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
3867
3921
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
3868
3922
|
}, z.core.$strip>>;
|
|
3923
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
3924
|
+
id: z.ZodString;
|
|
3925
|
+
bytes: z.ZodNumber;
|
|
3926
|
+
}, z.core.$strip>>;
|
|
3869
3927
|
}, z.core.$strip>, z.ZodObject<{
|
|
3870
3928
|
id: z.ZodString;
|
|
3871
3929
|
createdAt: z.ZodNumber;
|
|
@@ -4008,6 +4066,10 @@ export declare const ChatHistoryResultSchema: z.ZodObject<{
|
|
|
4008
4066
|
}>;
|
|
4009
4067
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
4010
4068
|
}, z.core.$strip>>;
|
|
4069
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
4070
|
+
id: z.ZodString;
|
|
4071
|
+
bytes: z.ZodNumber;
|
|
4072
|
+
}, z.core.$strip>>;
|
|
4011
4073
|
}, z.core.$strip>, z.ZodObject<{
|
|
4012
4074
|
id: z.ZodString;
|
|
4013
4075
|
createdAt: z.ZodNumber;
|
|
@@ -4257,6 +4319,10 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
|
|
|
4257
4319
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
4258
4320
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
4259
4321
|
}, z.core.$strip>>;
|
|
4322
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
4323
|
+
id: z.ZodString;
|
|
4324
|
+
bytes: z.ZodNumber;
|
|
4325
|
+
}, z.core.$strip>>;
|
|
4260
4326
|
}, z.core.$strip>, z.ZodObject<{
|
|
4261
4327
|
id: z.ZodString;
|
|
4262
4328
|
createdAt: z.ZodNumber;
|
|
@@ -4399,6 +4465,10 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
|
|
|
4399
4465
|
}>;
|
|
4400
4466
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
4401
4467
|
}, z.core.$strip>>;
|
|
4468
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
4469
|
+
id: z.ZodString;
|
|
4470
|
+
bytes: z.ZodNumber;
|
|
4471
|
+
}, z.core.$strip>>;
|
|
4402
4472
|
}, z.core.$strip>, z.ZodObject<{
|
|
4403
4473
|
id: z.ZodString;
|
|
4404
4474
|
createdAt: z.ZodNumber;
|
|
@@ -5094,6 +5164,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5094
5164
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
5095
5165
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
5096
5166
|
}, z.core.$strip>>;
|
|
5167
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
5168
|
+
id: z.ZodString;
|
|
5169
|
+
bytes: z.ZodNumber;
|
|
5170
|
+
}, z.core.$strip>>;
|
|
5097
5171
|
}, z.core.$strip>, z.ZodObject<{
|
|
5098
5172
|
id: z.ZodString;
|
|
5099
5173
|
createdAt: z.ZodNumber;
|
|
@@ -5236,6 +5310,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5236
5310
|
}>;
|
|
5237
5311
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
5238
5312
|
}, z.core.$strip>>;
|
|
5313
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
5314
|
+
id: z.ZodString;
|
|
5315
|
+
bytes: z.ZodNumber;
|
|
5316
|
+
}, z.core.$strip>>;
|
|
5239
5317
|
}, z.core.$strip>, z.ZodObject<{
|
|
5240
5318
|
id: z.ZodString;
|
|
5241
5319
|
createdAt: z.ZodNumber;
|
|
@@ -5440,6 +5518,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5440
5518
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
5441
5519
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
5442
5520
|
}, z.core.$strip>>;
|
|
5521
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
5522
|
+
id: z.ZodString;
|
|
5523
|
+
bytes: z.ZodNumber;
|
|
5524
|
+
}, z.core.$strip>>;
|
|
5443
5525
|
}, z.core.$strip>, z.ZodObject<{
|
|
5444
5526
|
id: z.ZodString;
|
|
5445
5527
|
createdAt: z.ZodNumber;
|
|
@@ -5582,6 +5664,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5582
5664
|
}>;
|
|
5583
5665
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
5584
5666
|
}, z.core.$strip>>;
|
|
5667
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
5668
|
+
id: z.ZodString;
|
|
5669
|
+
bytes: z.ZodNumber;
|
|
5670
|
+
}, z.core.$strip>>;
|
|
5585
5671
|
}, z.core.$strip>, z.ZodObject<{
|
|
5586
5672
|
id: z.ZodString;
|
|
5587
5673
|
createdAt: z.ZodNumber;
|
|
@@ -5785,6 +5871,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5785
5871
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
5786
5872
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
5787
5873
|
}, z.core.$strip>>;
|
|
5874
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
5875
|
+
id: z.ZodString;
|
|
5876
|
+
bytes: z.ZodNumber;
|
|
5877
|
+
}, z.core.$strip>>;
|
|
5788
5878
|
}, z.core.$strip>, z.ZodObject<{
|
|
5789
5879
|
id: z.ZodString;
|
|
5790
5880
|
createdAt: z.ZodNumber;
|
|
@@ -5927,6 +6017,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5927
6017
|
}>;
|
|
5928
6018
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
5929
6019
|
}, z.core.$strip>>;
|
|
6020
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
6021
|
+
id: z.ZodString;
|
|
6022
|
+
bytes: z.ZodNumber;
|
|
6023
|
+
}, z.core.$strip>>;
|
|
5930
6024
|
}, z.core.$strip>, z.ZodObject<{
|
|
5931
6025
|
id: z.ZodString;
|
|
5932
6026
|
createdAt: z.ZodNumber;
|
|
@@ -6528,6 +6622,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6528
6622
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
6529
6623
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
6530
6624
|
}, z.core.$strip>>;
|
|
6625
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
6626
|
+
id: z.ZodString;
|
|
6627
|
+
bytes: z.ZodNumber;
|
|
6628
|
+
}, z.core.$strip>>;
|
|
6531
6629
|
}, z.core.$strip>, z.ZodObject<{
|
|
6532
6630
|
id: z.ZodString;
|
|
6533
6631
|
createdAt: z.ZodNumber;
|
|
@@ -6670,6 +6768,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6670
6768
|
}>;
|
|
6671
6769
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
6672
6770
|
}, z.core.$strip>>;
|
|
6771
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
6772
|
+
id: z.ZodString;
|
|
6773
|
+
bytes: z.ZodNumber;
|
|
6774
|
+
}, z.core.$strip>>;
|
|
6673
6775
|
}, z.core.$strip>, z.ZodObject<{
|
|
6674
6776
|
id: z.ZodString;
|
|
6675
6777
|
createdAt: z.ZodNumber;
|
|
@@ -6929,6 +7031,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6929
7031
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
6930
7032
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
6931
7033
|
}, z.core.$strip>>;
|
|
7034
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
7035
|
+
id: z.ZodString;
|
|
7036
|
+
bytes: z.ZodNumber;
|
|
7037
|
+
}, z.core.$strip>>;
|
|
6932
7038
|
}, z.core.$strip>, z.ZodObject<{
|
|
6933
7039
|
id: z.ZodString;
|
|
6934
7040
|
createdAt: z.ZodNumber;
|
|
@@ -7071,6 +7177,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
7071
7177
|
}>;
|
|
7072
7178
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
7073
7179
|
}, z.core.$strip>>;
|
|
7180
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
7181
|
+
id: z.ZodString;
|
|
7182
|
+
bytes: z.ZodNumber;
|
|
7183
|
+
}, z.core.$strip>>;
|
|
7074
7184
|
}, z.core.$strip>, z.ZodObject<{
|
|
7075
7185
|
id: z.ZodString;
|
|
7076
7186
|
createdAt: z.ZodNumber;
|
|
@@ -7241,6 +7351,15 @@ export declare const ChatTurnDiffResultSchema: z.ZodObject<{
|
|
|
7241
7351
|
}, z.core.$strip>>;
|
|
7242
7352
|
}, z.core.$strip>;
|
|
7243
7353
|
export type ChatTurnDiffResult = z.infer<typeof ChatTurnDiffResultSchema>;
|
|
7354
|
+
export declare const ChatToolOutputPayloadSchema: z.ZodObject<{
|
|
7355
|
+
chatId: z.ZodString;
|
|
7356
|
+
itemId: z.ZodString;
|
|
7357
|
+
}, z.core.$strip>;
|
|
7358
|
+
export type ChatToolOutputPayload = z.infer<typeof ChatToolOutputPayloadSchema>;
|
|
7359
|
+
export declare const ChatToolOutputResultSchema: z.ZodObject<{
|
|
7360
|
+
output: z.ZodNullable<z.ZodString>;
|
|
7361
|
+
}, z.core.$strip>;
|
|
7362
|
+
export type ChatToolOutputResult = z.infer<typeof ChatToolOutputResultSchema>;
|
|
7244
7363
|
export declare const CHAT_FORK_TITLE_MAX = 120;
|
|
7245
7364
|
export declare const ChatForkPayloadSchema: z.ZodObject<{
|
|
7246
7365
|
chatId: z.ZodString;
|
package/dist/chat.js
CHANGED
|
@@ -418,6 +418,15 @@ export function workflowAgentRef(agentId) {
|
|
|
418
418
|
export function workflowAgentIdOf(ref) {
|
|
419
419
|
return ref.startsWith(WORKFLOW_AGENT_REF) ? ref.slice(WORKFLOW_AGENT_REF.length) || null : null;
|
|
420
420
|
}
|
|
421
|
+
/* Past this many UTF-8 bytes a tool's output or a turn's checkpoint diff is stored apart, and the item carries its beginning. */
|
|
422
|
+
export const CHAT_PAYLOAD_INLINE_BYTES = 64 * 1024;
|
|
423
|
+
// The whole of a value a host keeps apart from the thread; the item carries only its beginning.
|
|
424
|
+
export const ChatPayloadRefSchema = z.object({
|
|
425
|
+
// Opaque to a client, which asks for the value by the item that carries this.
|
|
426
|
+
id: z.string(),
|
|
427
|
+
// The size of the whole value in UTF-8 bytes: the text of an output, the JSON of a diff.
|
|
428
|
+
bytes: z.number().int().nonnegative()
|
|
429
|
+
});
|
|
421
430
|
export const ChatToolItemSchema = z.object({
|
|
422
431
|
...base,
|
|
423
432
|
kind: z.literal('tool'),
|
|
@@ -431,7 +440,9 @@ export const ChatToolItemSchema = z.object({
|
|
|
431
440
|
progress: ChatToolProgressSchema.optional(),
|
|
432
441
|
changes: z.array(ChatFileChangeSchema).optional(),
|
|
433
442
|
// Set on a Workflow call once the CLI reports what the workflow runs, replaced whole by every report.
|
|
434
|
-
workflow: ChatWorkflowSchema.optional()
|
|
443
|
+
workflow: ChatWorkflowSchema.optional(),
|
|
444
|
+
// Set when `output` is only the beginning of what the call answered; `chat.toolOutput` answers the whole.
|
|
445
|
+
outputRef: ChatPayloadRefSchema.optional()
|
|
435
446
|
});
|
|
436
447
|
export const ChatSubagentUsageSchema = z.object({
|
|
437
448
|
totalTokens: z.number().int().nonnegative(),
|
|
@@ -556,7 +567,9 @@ export const ChatTurnItemSchema = z.object({
|
|
|
556
567
|
// Set on the turn a fork writes a summary in: the chat it is for, which gets the last answer of the turn.
|
|
557
568
|
summaryFor: ChatIdSchema.optional(),
|
|
558
569
|
// Set on a turn that ended in an error because of a limit rather than a mistake.
|
|
559
|
-
limit: ChatTurnLimitSchema.optional()
|
|
570
|
+
limit: ChatTurnLimitSchema.optional(),
|
|
571
|
+
// Set when `checkpointDiff` lists every file but holds back diffs past the first few; `chat.turnDiff` answers the whole.
|
|
572
|
+
checkpointDiffRef: ChatPayloadRefSchema.optional()
|
|
560
573
|
});
|
|
561
574
|
/* What a turn a restart could not take up again ends with, so a client can tell it from a turn a person stopped. */
|
|
562
575
|
const NOT_RESUMED_PREFIX = 'This turn could not be resumed after the machine restarted: ';
|
|
@@ -881,6 +894,12 @@ export const ChatTurnDiffPayloadSchema = z.object({
|
|
|
881
894
|
});
|
|
882
895
|
// Null when the turn has no checkpoint to diff against: no repository, or git could not be read.
|
|
883
896
|
export const ChatTurnDiffResultSchema = z.object({ diff: ChatCheckpointDiffSchema.nullable() });
|
|
897
|
+
export const ChatToolOutputPayloadSchema = z.object({
|
|
898
|
+
chatId: ChatIdSchema,
|
|
899
|
+
itemId: z.string().min(1)
|
|
900
|
+
});
|
|
901
|
+
// The whole of what a tool call answered, also where its item carries only the beginning; null before it answered.
|
|
902
|
+
export const ChatToolOutputResultSchema = z.object({ output: z.string().nullable() });
|
|
884
903
|
// A title of a node the fork makes; the same cap the canvas verbs hold a title to.
|
|
885
904
|
export const CHAT_FORK_TITLE_MAX = 120;
|
|
886
905
|
/*
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { KNOWN_AGENT_KINDS, type KnownAgentKind, AGENT_KIND_MAX_LENGTH, AgentKindSchema, type AgentKind, isKnownAgentKind, AgentStatusSchema, type AgentStatus, SUGGESTED_TITLE_LIMIT, SuggestedTitleSchema, AgentRequestSchema, type AgentRequest, AgentInfoSchema, type AgentInfo, SessionStatusEventSchema, type SessionStatusEvent, AgentResumePayloadSchema, type AgentResumePayload, ApprovalChoiceSchema, type ApprovalChoice, ApprovalRequestSchema, type ApprovalRequest, SessionApprovalsEventSchema, type SessionApprovalsEvent, ApprovalAnswerPayloadSchema, type ApprovalAnswerPayload, ApprovalAnswerResultSchema, type ApprovalAnswerResult, ApprovalPreferencePayloadSchema, type ApprovalPreferencePayload } from './agent.ts';
|
|
2
|
-
export { ChatIdSchema, type ChatId, ChatContextBreakdownSchema, type ChatContextBreakdown, ChatUsageSchema, type ChatUsage, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, attachmentBytes, attachmentImageMime, ChatAttachmentUploadSchema, type ChatAttachmentUpload, ChatAttachmentUploadsSchema, ChatAttachmentSchema, type ChatAttachment, ChatUiChoiceOriginSchema, type ChatUiChoiceOrigin, ChatUiAnswerSchema, type ChatUiAnswer, ChatQuoteSourceSchema, type ChatQuoteSource, ChatQueuedMessageSchema, type ChatQueuedMessage, ChatBackgroundTaskSchema, type ChatBackgroundTask, ChatTurnLimitSchema, type ChatTurnLimit, ChatGoalStatusSchema, type ChatGoalStatus, ChatGoalSchema, type ChatGoal, ChatQuestionSchema, type ChatQuestion, ChatRequestKindSchema, type ChatRequestKind, CHAT_REQUEST_LIMITS, ChatRequestApprovalSchema, type ChatRequestApproval, ChatRequestSummarySchema, type ChatRequestSummary, ChatInfoSchema, type ChatInfo, ChatSkillSourceSchema, type ChatSkillSource, ChatSkillSchema, type ChatSkill, SkillsListPayloadSchema, type SkillsListPayload, SkillsListResultSchema, type SkillsListResult, ChatUserItemSchema, ChatUiQueryReadingSchema, type ChatUiQueryReading, ChatUiLinkReadingSchema, type ChatUiLinkReading, ChatUiPlaceReadingSchema, type ChatUiPlaceReading, ChatUiQueryStateSchema, type ChatUiQueryState, ChatAssistantItemSchema, ChatThinkingItemSchema, ChatToolStateSchema, type ChatToolState, ChatToolProgressSchema, type ChatToolProgress, ChatFileChangeSchema, type ChatFileChange, ChatSubagentStatusSchema, type ChatSubagentStatus, ChatWorkflowPhaseSchema, type ChatWorkflowPhase, ChatWorkflowAgentSchema, type ChatWorkflowAgent, ChatWorkflowSchema, type ChatWorkflow, workflowAgentRef, workflowAgentIdOf, ChatToolItemSchema, ChatSubagentUsageSchema, type ChatSubagentUsage, HOST_TASK_ORIGIN, ChatSubagentItemSchema, ChatApprovalDecisionSchema, type ChatApprovalDecision, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, type ChatCheckpointFile, ChatCheckpointDiffSchema, type ChatCheckpointDiff, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatCompactionItemSchema, ChatItemSchema, type ChatItem, type ChatUserItem, type ChatAssistantItem, type ChatThinkingItem, type ChatToolItem, type ChatSubagentItem, type ChatApprovalItem, type ChatQuestionItem, type ChatTurnItem, type ChatNoteItem, type ChatCompactionItem, ChatEventSchema, type ChatEvent, ChatEventEnvelopeSchema, type ChatEventEnvelope, ChatCreatePayloadSchema, type ChatCreatePayload, ChatConfigurePayloadSchema, type ChatConfigurePayload, ChatPreferencesPayloadSchema, type ChatPreferencesPayload, ChatTargetPayloadSchema, type ChatTargetPayload, ChatClearPayloadSchema, type ChatClearPayload, ChatCancelPayloadSchema, type ChatCancelPayload, ChatAttachPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryPageSchema, ChatHistoryResultSchema, type ChatHistoryResult, ChatSubagentPayloadSchema, type ChatSubagentPayload, ChatStopSubagentPayloadSchema, type ChatStopSubagentPayload, ChatGoalActionSchema, type ChatGoalAction, ChatGoalPayloadSchema, type ChatGoalPayload, ChatStopTaskPayloadSchema, type ChatStopTaskPayload, ChatSubagentPageSchema, ChatSubagentSourceSchema, type ChatSubagentSource, ChatSubagentResultSchema, type ChatSubagentResult, ChatStatusEventSchema, type ChatStatusEvent, ChatSubagentChangedEventSchema, type ChatSubagentChangedEvent, CHAT_BOOKMARK_LIMITS, ChatBookmarkSchema, type ChatBookmark, ChatBookmarksSchema, ChatAddBookmarkPayloadSchema, type ChatAddBookmarkPayload, ChatRenameBookmarkPayloadSchema, type ChatRenameBookmarkPayload, ChatRemoveBookmarkPayloadSchema, type ChatRemoveBookmarkPayload, ChatBookmarksResultSchema, type ChatBookmarksResult, ChatBookmarksEventSchema, type ChatBookmarksEvent, ChatRemoveVisualPayloadSchema, type ChatRemoveVisualPayload, ChatVisualsResultSchema, type ChatVisualsResult, ChatVisualsEventSchema, type ChatVisualsEvent, ChatAttachResultSchema, type ChatAttachResult, ChatDeliverySchema, type ChatDelivery, ChatSendPayloadSchema, type ChatSendPayload, ChatSendResultSchema, type ChatSendResult, ChatUiChoicePayloadSchema, type ChatUiChoicePayload, ChatUiQueryPayloadSchema, type ChatUiQueryPayload, ChatUiLinkPayloadSchema, type ChatUiLinkPayload, ChatQueuePayloadSchema, type ChatQueuePayload, ChatUnqueueResultSchema, type ChatUnqueueResult, ChatApprovePayloadSchema, type ChatApprovePayload, ChatDismissPayloadSchema, type ChatDismissPayload, ChatAnswerPayloadSchema, type ChatAnswerPayload, ChatTurnDiffPayloadSchema, type ChatTurnDiffPayload, ChatTurnDiffResultSchema, type ChatTurnDiffResult, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, type ChatForkPayload, ChatForkResultSchema, type ChatForkResult, ChatContinueOnPayloadSchema, type ChatContinueOnPayload, ChatContinueOnResultSchema, type ChatContinueOnResult, ChatSummarizePayloadSchema, type ChatSummarizePayload, ChatSummarizeResultSchema, type ChatSummarizeResult, ChatForkInfoPayloadSchema, type ChatForkInfoPayload, ChatForkInfoResultSchema, type ChatForkInfoResult, ChatListResultSchema, type ChatListResult, GeneratedImageInputSchema, type GeneratedImageInput, generatedImageAttachment, holdsConversation } from './chat.ts';
|
|
2
|
+
export { ChatIdSchema, type ChatId, ChatContextBreakdownSchema, type ChatContextBreakdown, ChatUsageSchema, type ChatUsage, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, attachmentBytes, attachmentImageMime, ChatAttachmentUploadSchema, type ChatAttachmentUpload, ChatAttachmentUploadsSchema, ChatAttachmentSchema, type ChatAttachment, ChatUiChoiceOriginSchema, type ChatUiChoiceOrigin, ChatUiAnswerSchema, type ChatUiAnswer, ChatQuoteSourceSchema, type ChatQuoteSource, ChatQueuedMessageSchema, type ChatQueuedMessage, ChatBackgroundTaskSchema, type ChatBackgroundTask, ChatTurnLimitSchema, type ChatTurnLimit, ChatGoalStatusSchema, type ChatGoalStatus, ChatGoalSchema, type ChatGoal, ChatQuestionSchema, type ChatQuestion, ChatRequestKindSchema, type ChatRequestKind, CHAT_REQUEST_LIMITS, ChatRequestApprovalSchema, type ChatRequestApproval, ChatRequestSummarySchema, type ChatRequestSummary, ChatInfoSchema, type ChatInfo, ChatSkillSourceSchema, type ChatSkillSource, ChatSkillSchema, type ChatSkill, SkillsListPayloadSchema, type SkillsListPayload, SkillsListResultSchema, type SkillsListResult, ChatUserItemSchema, ChatUiQueryReadingSchema, type ChatUiQueryReading, ChatUiLinkReadingSchema, type ChatUiLinkReading, ChatUiPlaceReadingSchema, type ChatUiPlaceReading, ChatUiQueryStateSchema, type ChatUiQueryState, ChatAssistantItemSchema, ChatThinkingItemSchema, ChatToolStateSchema, type ChatToolState, ChatToolProgressSchema, type ChatToolProgress, ChatFileChangeSchema, type ChatFileChange, ChatSubagentStatusSchema, type ChatSubagentStatus, ChatWorkflowPhaseSchema, type ChatWorkflowPhase, ChatWorkflowAgentSchema, type ChatWorkflowAgent, ChatWorkflowSchema, type ChatWorkflow, workflowAgentRef, workflowAgentIdOf, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, type ChatPayloadRef, ChatToolItemSchema, ChatSubagentUsageSchema, type ChatSubagentUsage, HOST_TASK_ORIGIN, ChatSubagentItemSchema, ChatApprovalDecisionSchema, type ChatApprovalDecision, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, type ChatCheckpointFile, ChatCheckpointDiffSchema, type ChatCheckpointDiff, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatCompactionItemSchema, ChatItemSchema, type ChatItem, type ChatUserItem, type ChatAssistantItem, type ChatThinkingItem, type ChatToolItem, type ChatSubagentItem, type ChatApprovalItem, type ChatQuestionItem, type ChatTurnItem, type ChatNoteItem, type ChatCompactionItem, ChatEventSchema, type ChatEvent, ChatEventEnvelopeSchema, type ChatEventEnvelope, ChatCreatePayloadSchema, type ChatCreatePayload, ChatConfigurePayloadSchema, type ChatConfigurePayload, ChatPreferencesPayloadSchema, type ChatPreferencesPayload, ChatTargetPayloadSchema, type ChatTargetPayload, ChatClearPayloadSchema, type ChatClearPayload, ChatCancelPayloadSchema, type ChatCancelPayload, ChatAttachPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryPageSchema, ChatHistoryResultSchema, type ChatHistoryResult, ChatSubagentPayloadSchema, type ChatSubagentPayload, ChatStopSubagentPayloadSchema, type ChatStopSubagentPayload, ChatGoalActionSchema, type ChatGoalAction, ChatGoalPayloadSchema, type ChatGoalPayload, ChatStopTaskPayloadSchema, type ChatStopTaskPayload, ChatSubagentPageSchema, ChatSubagentSourceSchema, type ChatSubagentSource, ChatSubagentResultSchema, type ChatSubagentResult, ChatStatusEventSchema, type ChatStatusEvent, ChatSubagentChangedEventSchema, type ChatSubagentChangedEvent, CHAT_BOOKMARK_LIMITS, ChatBookmarkSchema, type ChatBookmark, ChatBookmarksSchema, ChatAddBookmarkPayloadSchema, type ChatAddBookmarkPayload, ChatRenameBookmarkPayloadSchema, type ChatRenameBookmarkPayload, ChatRemoveBookmarkPayloadSchema, type ChatRemoveBookmarkPayload, ChatBookmarksResultSchema, type ChatBookmarksResult, ChatBookmarksEventSchema, type ChatBookmarksEvent, ChatRemoveVisualPayloadSchema, type ChatRemoveVisualPayload, ChatVisualsResultSchema, type ChatVisualsResult, ChatVisualsEventSchema, type ChatVisualsEvent, ChatAttachResultSchema, type ChatAttachResult, ChatDeliverySchema, type ChatDelivery, ChatSendPayloadSchema, type ChatSendPayload, ChatSendResultSchema, type ChatSendResult, ChatUiChoicePayloadSchema, type ChatUiChoicePayload, ChatUiQueryPayloadSchema, type ChatUiQueryPayload, ChatUiLinkPayloadSchema, type ChatUiLinkPayload, ChatQueuePayloadSchema, type ChatQueuePayload, ChatUnqueueResultSchema, type ChatUnqueueResult, ChatApprovePayloadSchema, type ChatApprovePayload, ChatDismissPayloadSchema, type ChatDismissPayload, ChatAnswerPayloadSchema, type ChatAnswerPayload, ChatTurnDiffPayloadSchema, type ChatTurnDiffPayload, ChatTurnDiffResultSchema, type ChatTurnDiffResult, ChatToolOutputPayloadSchema, type ChatToolOutputPayload, ChatToolOutputResultSchema, type ChatToolOutputResult, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, type ChatForkPayload, ChatForkResultSchema, type ChatForkResult, ChatContinueOnPayloadSchema, type ChatContinueOnPayload, ChatContinueOnResultSchema, type ChatContinueOnResult, ChatSummarizePayloadSchema, type ChatSummarizePayload, ChatSummarizeResultSchema, type ChatSummarizeResult, ChatForkInfoPayloadSchema, type ChatForkInfoPayload, ChatForkInfoResultSchema, type ChatForkInfoResult, ChatListResultSchema, type ChatListResult, GeneratedImageInputSchema, type GeneratedImageInput, generatedImageAttachment, holdsConversation } from './chat.ts';
|
|
3
3
|
export { ErrorSchema, type WireError, RequestSchema, type Request, ReplyOkSchema, type ReplyOk, ReplyErrorSchema, type ReplyError, ReplySchema, type Reply, EventSchema, type Event, ServerFrameSchema, type ServerFrame, type ParseResult, parseRequest, parseServerFrame } from './envelope.ts';
|
|
4
4
|
export { SessionIdSchema, type SessionId } from './ids.ts';
|
|
5
5
|
export { ModelOptionChoiceSchema, type ModelOptionChoice, ModelOptionDescriptorSchema, type ModelOptionDescriptor, ModelInfoSchema, type ModelInfo, ModelSelectionSchema, type ModelSelection, ModelCatalogProfileSchema, type ModelCatalogProfile, ModelCatalogEntrySchema, type ModelCatalogEntry, ModelCatalogDataSchema, type ModelCatalogData, RuntimeModeSchema, type RuntimeMode, ProviderCapabilitiesSchema, type ProviderCapabilities, ProviderPlatformSchema, type ProviderPlatform, ProviderSignInSchema, type ProviderSignIn, ProviderInstallSchema, type ProviderInstall, ProviderInfoSchema, type ProviderInfo, FRONTIER_PROVIDER_KINDS, API_PROVIDER_KINDS, type ProviderPickerGroup, type ProviderPickerGroups, providerGroupOf, pickerGroupsOf, ProviderListResultSchema, type ProviderListResult, resumeCommandFor } from './model.ts';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Public API: exports.test.ts snapshots this list, so a name added or dropped here is an API change.
|
|
2
2
|
export { KNOWN_AGENT_KINDS, AGENT_KIND_MAX_LENGTH, AgentKindSchema, isKnownAgentKind, AgentStatusSchema, SUGGESTED_TITLE_LIMIT, SuggestedTitleSchema, AgentRequestSchema, AgentInfoSchema, SessionStatusEventSchema, AgentResumePayloadSchema, ApprovalChoiceSchema, ApprovalRequestSchema, SessionApprovalsEventSchema, ApprovalAnswerPayloadSchema, ApprovalAnswerResultSchema, ApprovalPreferencePayloadSchema } from './agent.js';
|
|
3
|
-
export { ChatIdSchema, ChatContextBreakdownSchema, ChatUsageSchema, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, attachmentBytes, attachmentImageMime, ChatAttachmentUploadSchema, ChatAttachmentUploadsSchema, ChatAttachmentSchema, ChatUiChoiceOriginSchema, ChatUiAnswerSchema, ChatQuoteSourceSchema, ChatQueuedMessageSchema, ChatBackgroundTaskSchema, ChatTurnLimitSchema, ChatGoalStatusSchema, ChatGoalSchema, ChatQuestionSchema, ChatRequestKindSchema, CHAT_REQUEST_LIMITS, ChatRequestApprovalSchema, ChatRequestSummarySchema, ChatInfoSchema, ChatSkillSourceSchema, ChatSkillSchema, SkillsListPayloadSchema, SkillsListResultSchema, ChatUserItemSchema, ChatUiQueryReadingSchema, ChatUiLinkReadingSchema, ChatUiPlaceReadingSchema, ChatUiQueryStateSchema, ChatAssistantItemSchema, ChatThinkingItemSchema, ChatToolStateSchema, ChatToolProgressSchema, ChatFileChangeSchema, ChatSubagentStatusSchema, ChatWorkflowPhaseSchema, ChatWorkflowAgentSchema, ChatWorkflowSchema, workflowAgentRef, workflowAgentIdOf, ChatToolItemSchema, ChatSubagentUsageSchema, HOST_TASK_ORIGIN, ChatSubagentItemSchema, ChatApprovalDecisionSchema, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, ChatCheckpointDiffSchema, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatCompactionItemSchema, ChatItemSchema, ChatEventSchema, ChatEventEnvelopeSchema, ChatCreatePayloadSchema, ChatConfigurePayloadSchema, ChatPreferencesPayloadSchema, ChatTargetPayloadSchema, ChatClearPayloadSchema, ChatCancelPayloadSchema, ChatAttachPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryPageSchema, ChatHistoryResultSchema, ChatSubagentPayloadSchema, ChatStopSubagentPayloadSchema, ChatGoalActionSchema, ChatGoalPayloadSchema, ChatStopTaskPayloadSchema, ChatSubagentPageSchema, ChatSubagentSourceSchema, ChatSubagentResultSchema, ChatStatusEventSchema, ChatSubagentChangedEventSchema, CHAT_BOOKMARK_LIMITS, ChatBookmarkSchema, ChatBookmarksSchema, ChatAddBookmarkPayloadSchema, ChatRenameBookmarkPayloadSchema, ChatRemoveBookmarkPayloadSchema, ChatBookmarksResultSchema, ChatBookmarksEventSchema, ChatRemoveVisualPayloadSchema, ChatVisualsResultSchema, ChatVisualsEventSchema, ChatAttachResultSchema, ChatDeliverySchema, ChatSendPayloadSchema, ChatSendResultSchema, ChatUiChoicePayloadSchema, ChatUiQueryPayloadSchema, ChatUiLinkPayloadSchema, ChatQueuePayloadSchema, ChatUnqueueResultSchema, ChatApprovePayloadSchema, ChatDismissPayloadSchema, ChatAnswerPayloadSchema, ChatTurnDiffPayloadSchema, ChatTurnDiffResultSchema, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, ChatForkResultSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatListResultSchema, GeneratedImageInputSchema, generatedImageAttachment, holdsConversation } from './chat.js';
|
|
3
|
+
export { ChatIdSchema, ChatContextBreakdownSchema, ChatUsageSchema, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, attachmentBytes, attachmentImageMime, ChatAttachmentUploadSchema, ChatAttachmentUploadsSchema, ChatAttachmentSchema, ChatUiChoiceOriginSchema, ChatUiAnswerSchema, ChatQuoteSourceSchema, ChatQueuedMessageSchema, ChatBackgroundTaskSchema, ChatTurnLimitSchema, ChatGoalStatusSchema, ChatGoalSchema, ChatQuestionSchema, ChatRequestKindSchema, CHAT_REQUEST_LIMITS, ChatRequestApprovalSchema, ChatRequestSummarySchema, ChatInfoSchema, ChatSkillSourceSchema, ChatSkillSchema, SkillsListPayloadSchema, SkillsListResultSchema, ChatUserItemSchema, ChatUiQueryReadingSchema, ChatUiLinkReadingSchema, ChatUiPlaceReadingSchema, ChatUiQueryStateSchema, ChatAssistantItemSchema, ChatThinkingItemSchema, ChatToolStateSchema, ChatToolProgressSchema, ChatFileChangeSchema, ChatSubagentStatusSchema, ChatWorkflowPhaseSchema, ChatWorkflowAgentSchema, ChatWorkflowSchema, workflowAgentRef, workflowAgentIdOf, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, ChatToolItemSchema, ChatSubagentUsageSchema, HOST_TASK_ORIGIN, ChatSubagentItemSchema, ChatApprovalDecisionSchema, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, ChatCheckpointDiffSchema, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatCompactionItemSchema, ChatItemSchema, ChatEventSchema, ChatEventEnvelopeSchema, ChatCreatePayloadSchema, ChatConfigurePayloadSchema, ChatPreferencesPayloadSchema, ChatTargetPayloadSchema, ChatClearPayloadSchema, ChatCancelPayloadSchema, ChatAttachPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryPageSchema, ChatHistoryResultSchema, ChatSubagentPayloadSchema, ChatStopSubagentPayloadSchema, ChatGoalActionSchema, ChatGoalPayloadSchema, ChatStopTaskPayloadSchema, ChatSubagentPageSchema, ChatSubagentSourceSchema, ChatSubagentResultSchema, ChatStatusEventSchema, ChatSubagentChangedEventSchema, CHAT_BOOKMARK_LIMITS, ChatBookmarkSchema, ChatBookmarksSchema, ChatAddBookmarkPayloadSchema, ChatRenameBookmarkPayloadSchema, ChatRemoveBookmarkPayloadSchema, ChatBookmarksResultSchema, ChatBookmarksEventSchema, ChatRemoveVisualPayloadSchema, ChatVisualsResultSchema, ChatVisualsEventSchema, ChatAttachResultSchema, ChatDeliverySchema, ChatSendPayloadSchema, ChatSendResultSchema, ChatUiChoicePayloadSchema, ChatUiQueryPayloadSchema, ChatUiLinkPayloadSchema, ChatQueuePayloadSchema, ChatUnqueueResultSchema, ChatApprovePayloadSchema, ChatDismissPayloadSchema, ChatAnswerPayloadSchema, ChatTurnDiffPayloadSchema, ChatTurnDiffResultSchema, ChatToolOutputPayloadSchema, ChatToolOutputResultSchema, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, ChatForkResultSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatListResultSchema, GeneratedImageInputSchema, generatedImageAttachment, holdsConversation } from './chat.js';
|
|
4
4
|
export { ErrorSchema, RequestSchema, ReplyOkSchema, ReplyErrorSchema, ReplySchema, EventSchema, ServerFrameSchema, parseRequest, parseServerFrame } from './envelope.js';
|
|
5
5
|
export { SessionIdSchema } from './ids.js';
|
|
6
6
|
export { ModelOptionChoiceSchema, ModelOptionDescriptorSchema, ModelInfoSchema, ModelSelectionSchema, ModelCatalogProfileSchema, ModelCatalogEntrySchema, ModelCatalogDataSchema, RuntimeModeSchema, ProviderCapabilitiesSchema, ProviderPlatformSchema, ProviderSignInSchema, ProviderInstallSchema, ProviderInfoSchema, FRONTIER_PROVIDER_KINDS, API_PROVIDER_KINDS, providerGroupOf, pickerGroupsOf, ProviderListResultSchema, resumeCommandFor } from './model.js';
|
package/dist/protocol.d.ts
CHANGED
|
@@ -373,6 +373,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
373
373
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
374
374
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
375
375
|
}, z.core.$strip>>;
|
|
376
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
377
|
+
id: z.ZodString;
|
|
378
|
+
bytes: z.ZodNumber;
|
|
379
|
+
}, z.core.$strip>>;
|
|
376
380
|
}, z.core.$strip>, z.ZodObject<{
|
|
377
381
|
id: z.ZodString;
|
|
378
382
|
createdAt: z.ZodNumber;
|
|
@@ -515,6 +519,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
515
519
|
}>;
|
|
516
520
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
517
521
|
}, z.core.$strip>>;
|
|
522
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
523
|
+
id: z.ZodString;
|
|
524
|
+
bytes: z.ZodNumber;
|
|
525
|
+
}, z.core.$strip>>;
|
|
518
526
|
}, z.core.$strip>, z.ZodObject<{
|
|
519
527
|
id: z.ZodString;
|
|
520
528
|
createdAt: z.ZodNumber;
|
|
@@ -893,6 +901,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
893
901
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
894
902
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
895
903
|
}, z.core.$strip>>;
|
|
904
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
905
|
+
id: z.ZodString;
|
|
906
|
+
bytes: z.ZodNumber;
|
|
907
|
+
}, z.core.$strip>>;
|
|
896
908
|
}, z.core.$strip>, z.ZodObject<{
|
|
897
909
|
id: z.ZodString;
|
|
898
910
|
createdAt: z.ZodNumber;
|
|
@@ -1035,6 +1047,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1035
1047
|
}>;
|
|
1036
1048
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
1037
1049
|
}, z.core.$strip>>;
|
|
1050
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
1051
|
+
id: z.ZodString;
|
|
1052
|
+
bytes: z.ZodNumber;
|
|
1053
|
+
}, z.core.$strip>>;
|
|
1038
1054
|
}, z.core.$strip>, z.ZodObject<{
|
|
1039
1055
|
id: z.ZodString;
|
|
1040
1056
|
createdAt: z.ZodNumber;
|
|
@@ -1239,6 +1255,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1239
1255
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
1240
1256
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
1241
1257
|
}, z.core.$strip>>;
|
|
1258
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
1259
|
+
id: z.ZodString;
|
|
1260
|
+
bytes: z.ZodNumber;
|
|
1261
|
+
}, z.core.$strip>>;
|
|
1242
1262
|
}, z.core.$strip>, z.ZodObject<{
|
|
1243
1263
|
id: z.ZodString;
|
|
1244
1264
|
createdAt: z.ZodNumber;
|
|
@@ -1381,6 +1401,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1381
1401
|
}>;
|
|
1382
1402
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
1383
1403
|
}, z.core.$strip>>;
|
|
1404
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
1405
|
+
id: z.ZodString;
|
|
1406
|
+
bytes: z.ZodNumber;
|
|
1407
|
+
}, z.core.$strip>>;
|
|
1384
1408
|
}, z.core.$strip>, z.ZodObject<{
|
|
1385
1409
|
id: z.ZodString;
|
|
1386
1410
|
createdAt: z.ZodNumber;
|
|
@@ -1584,6 +1608,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1584
1608
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
1585
1609
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
1586
1610
|
}, z.core.$strip>>;
|
|
1611
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
1612
|
+
id: z.ZodString;
|
|
1613
|
+
bytes: z.ZodNumber;
|
|
1614
|
+
}, z.core.$strip>>;
|
|
1587
1615
|
}, z.core.$strip>, z.ZodObject<{
|
|
1588
1616
|
id: z.ZodString;
|
|
1589
1617
|
createdAt: z.ZodNumber;
|
|
@@ -1726,6 +1754,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1726
1754
|
}>;
|
|
1727
1755
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
1728
1756
|
}, z.core.$strip>>;
|
|
1757
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
1758
|
+
id: z.ZodString;
|
|
1759
|
+
bytes: z.ZodNumber;
|
|
1760
|
+
}, z.core.$strip>>;
|
|
1729
1761
|
}, z.core.$strip>, z.ZodObject<{
|
|
1730
1762
|
id: z.ZodString;
|
|
1731
1763
|
createdAt: z.ZodNumber;
|
|
@@ -2327,6 +2359,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2327
2359
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
2328
2360
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
2329
2361
|
}, z.core.$strip>>;
|
|
2362
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
2363
|
+
id: z.ZodString;
|
|
2364
|
+
bytes: z.ZodNumber;
|
|
2365
|
+
}, z.core.$strip>>;
|
|
2330
2366
|
}, z.core.$strip>, z.ZodObject<{
|
|
2331
2367
|
id: z.ZodString;
|
|
2332
2368
|
createdAt: z.ZodNumber;
|
|
@@ -2469,6 +2505,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2469
2505
|
}>;
|
|
2470
2506
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
2471
2507
|
}, z.core.$strip>>;
|
|
2508
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
2509
|
+
id: z.ZodString;
|
|
2510
|
+
bytes: z.ZodNumber;
|
|
2511
|
+
}, z.core.$strip>>;
|
|
2472
2512
|
}, z.core.$strip>, z.ZodObject<{
|
|
2473
2513
|
id: z.ZodString;
|
|
2474
2514
|
createdAt: z.ZodNumber;
|
|
@@ -2728,6 +2768,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2728
2768
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
2729
2769
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
2730
2770
|
}, z.core.$strip>>;
|
|
2771
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
2772
|
+
id: z.ZodString;
|
|
2773
|
+
bytes: z.ZodNumber;
|
|
2774
|
+
}, z.core.$strip>>;
|
|
2731
2775
|
}, z.core.$strip>, z.ZodObject<{
|
|
2732
2776
|
id: z.ZodString;
|
|
2733
2777
|
createdAt: z.ZodNumber;
|
|
@@ -2870,6 +2914,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2870
2914
|
}>;
|
|
2871
2915
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
2872
2916
|
}, z.core.$strip>>;
|
|
2917
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
2918
|
+
id: z.ZodString;
|
|
2919
|
+
bytes: z.ZodNumber;
|
|
2920
|
+
}, z.core.$strip>>;
|
|
2873
2921
|
}, z.core.$strip>, z.ZodObject<{
|
|
2874
2922
|
id: z.ZodString;
|
|
2875
2923
|
createdAt: z.ZodNumber;
|
|
@@ -3327,6 +3375,15 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
3327
3375
|
}, z.core.$strip>>;
|
|
3328
3376
|
}, z.core.$strip>;
|
|
3329
3377
|
};
|
|
3378
|
+
readonly 'chat.toolOutput': {
|
|
3379
|
+
readonly payload: z.ZodObject<{
|
|
3380
|
+
chatId: z.ZodString;
|
|
3381
|
+
itemId: z.ZodString;
|
|
3382
|
+
}, z.core.$strip>;
|
|
3383
|
+
readonly result: z.ZodObject<{
|
|
3384
|
+
output: z.ZodNullable<z.ZodString>;
|
|
3385
|
+
}, z.core.$strip>;
|
|
3386
|
+
};
|
|
3330
3387
|
readonly 'chat.fork': {
|
|
3331
3388
|
readonly payload: z.ZodObject<{
|
|
3332
3389
|
chatId: z.ZodString;
|
|
@@ -3945,6 +4002,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
3945
4002
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
3946
4003
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
3947
4004
|
}, z.core.$strip>>;
|
|
4005
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
4006
|
+
id: z.ZodString;
|
|
4007
|
+
bytes: z.ZodNumber;
|
|
4008
|
+
}, z.core.$strip>>;
|
|
3948
4009
|
}, z.core.$strip>, z.ZodObject<{
|
|
3949
4010
|
id: z.ZodString;
|
|
3950
4011
|
createdAt: z.ZodNumber;
|
|
@@ -4087,6 +4148,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
4087
4148
|
}>;
|
|
4088
4149
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
4089
4150
|
}, z.core.$strip>>;
|
|
4151
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
4152
|
+
id: z.ZodString;
|
|
4153
|
+
bytes: z.ZodNumber;
|
|
4154
|
+
}, z.core.$strip>>;
|
|
4090
4155
|
}, z.core.$strip>, z.ZodObject<{
|
|
4091
4156
|
id: z.ZodString;
|
|
4092
4157
|
createdAt: z.ZodNumber;
|
|
@@ -5197,6 +5262,10 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
5197
5262
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
5198
5263
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
5199
5264
|
}, z.core.$strip>>;
|
|
5265
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
5266
|
+
id: z.ZodString;
|
|
5267
|
+
bytes: z.ZodNumber;
|
|
5268
|
+
}, z.core.$strip>>;
|
|
5200
5269
|
}, z.core.$strip>, z.ZodObject<{
|
|
5201
5270
|
id: z.ZodString;
|
|
5202
5271
|
createdAt: z.ZodNumber;
|
|
@@ -5339,6 +5408,10 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
5339
5408
|
}>;
|
|
5340
5409
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
5341
5410
|
}, z.core.$strip>>;
|
|
5411
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
5412
|
+
id: z.ZodString;
|
|
5413
|
+
bytes: z.ZodNumber;
|
|
5414
|
+
}, z.core.$strip>>;
|
|
5342
5415
|
}, z.core.$strip>, z.ZodObject<{
|
|
5343
5416
|
id: z.ZodString;
|
|
5344
5417
|
createdAt: z.ZodNumber;
|
|
@@ -5940,6 +6013,10 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
5940
6013
|
lastProgressAt: z.ZodOptional<z.ZodNumber>;
|
|
5941
6014
|
stalledAt: z.ZodOptional<z.ZodNumber>;
|
|
5942
6015
|
}, z.core.$strip>>;
|
|
6016
|
+
outputRef: z.ZodOptional<z.ZodObject<{
|
|
6017
|
+
id: z.ZodString;
|
|
6018
|
+
bytes: z.ZodNumber;
|
|
6019
|
+
}, z.core.$strip>>;
|
|
5943
6020
|
}, z.core.$strip>, z.ZodObject<{
|
|
5944
6021
|
id: z.ZodString;
|
|
5945
6022
|
createdAt: z.ZodNumber;
|
|
@@ -6082,6 +6159,10 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
6082
6159
|
}>;
|
|
6083
6160
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
6084
6161
|
}, z.core.$strip>>;
|
|
6162
|
+
checkpointDiffRef: z.ZodOptional<z.ZodObject<{
|
|
6163
|
+
id: z.ZodString;
|
|
6164
|
+
bytes: z.ZodNumber;
|
|
6165
|
+
}, z.core.$strip>>;
|
|
6085
6166
|
}, z.core.$strip>, z.ZodObject<{
|
|
6086
6167
|
id: z.ZodString;
|
|
6087
6168
|
createdAt: z.ZodNumber;
|
package/dist/protocol.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ChatAddBookmarkPayloadSchema, ChatAnswerPayloadSchema, ChatApprovePayloadSchema, ChatAttachPayloadSchema, ChatAttachResultSchema, ChatBookmarksEventSchema, ChatBookmarksResultSchema, ChatCancelPayloadSchema, ChatClearPayloadSchema, ChatConfigurePayloadSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatCreatePayloadSchema, ChatDismissPayloadSchema, ChatEventEnvelopeSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatForkPayloadSchema, ChatForkResultSchema, ChatGoalPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryResultSchema, ChatInfoSchema, ChatListResultSchema, ChatPreferencesPayloadSchema, ChatQueuePayloadSchema, ChatRemoveBookmarkPayloadSchema, ChatRemoveVisualPayloadSchema, ChatRenameBookmarkPayloadSchema, ChatSendPayloadSchema, ChatSendResultSchema, ChatUiChoicePayloadSchema, ChatUiLinkPayloadSchema, ChatUiLinkReadingSchema, ChatUiQueryPayloadSchema, ChatUiQueryReadingSchema, ChatStatusEventSchema, ChatStopSubagentPayloadSchema, ChatStopTaskPayloadSchema, ChatSubagentChangedEventSchema, ChatSubagentPayloadSchema, ChatSubagentResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatTargetPayloadSchema, ChatTurnDiffPayloadSchema, ChatTurnDiffResultSchema, ChatUnqueueResultSchema, ChatVisualsEventSchema, ChatVisualsResultSchema, SkillsListPayloadSchema, SkillsListResultSchema } from './chat.js';
|
|
2
|
+
import { ChatAddBookmarkPayloadSchema, ChatAnswerPayloadSchema, ChatApprovePayloadSchema, ChatAttachPayloadSchema, ChatAttachResultSchema, ChatBookmarksEventSchema, ChatBookmarksResultSchema, ChatCancelPayloadSchema, ChatClearPayloadSchema, ChatConfigurePayloadSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatCreatePayloadSchema, ChatDismissPayloadSchema, ChatEventEnvelopeSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatForkPayloadSchema, ChatForkResultSchema, ChatGoalPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryResultSchema, ChatInfoSchema, ChatListResultSchema, ChatPreferencesPayloadSchema, ChatQueuePayloadSchema, ChatRemoveBookmarkPayloadSchema, ChatRemoveVisualPayloadSchema, ChatRenameBookmarkPayloadSchema, ChatSendPayloadSchema, ChatSendResultSchema, ChatUiChoicePayloadSchema, ChatUiLinkPayloadSchema, ChatUiLinkReadingSchema, ChatUiQueryPayloadSchema, ChatUiQueryReadingSchema, ChatStatusEventSchema, ChatStopSubagentPayloadSchema, ChatStopTaskPayloadSchema, ChatSubagentChangedEventSchema, ChatSubagentPayloadSchema, ChatSubagentResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatTargetPayloadSchema, ChatTurnDiffPayloadSchema, ChatTurnDiffResultSchema, ChatToolOutputPayloadSchema, ChatToolOutputResultSchema, ChatUnqueueResultSchema, ChatVisualsEventSchema, ChatVisualsResultSchema, SkillsListPayloadSchema, SkillsListResultSchema } from './chat.js';
|
|
3
3
|
import { ProviderListResultSchema } from './model.js';
|
|
4
4
|
import { ProviderAccountCreatePayloadSchema, ProviderAccountCreateResultSchema, ProviderAccountWatchLoginPayloadSchema, ProviderAccountsSavePayloadSchema, ProviderAccountsSchema } from './provider-accounts.js';
|
|
5
5
|
import { UsageChangedEventSchema, UsageLimitsSnapshotSchema, UsageSummaryPayloadSchema, UsageSummaryResultSchema } from './usage.js';
|
|
@@ -29,6 +29,7 @@ export const AGENT_REQUEST_SCHEMAS = {
|
|
|
29
29
|
'chat.compact': { payload: ChatTargetPayloadSchema, result: EmptySchema },
|
|
30
30
|
'chat.clear': { payload: ChatClearPayloadSchema, result: EmptySchema },
|
|
31
31
|
'chat.turnDiff': { payload: ChatTurnDiffPayloadSchema, result: ChatTurnDiffResultSchema },
|
|
32
|
+
'chat.toolOutput': { payload: ChatToolOutputPayloadSchema, result: ChatToolOutputResultSchema },
|
|
32
33
|
'chat.fork': { payload: ChatForkPayloadSchema, result: ChatForkResultSchema },
|
|
33
34
|
'chat.continueOn': { payload: ChatContinueOnPayloadSchema, result: ChatContinueOnResultSchema },
|
|
34
35
|
'chat.forkInfo': { payload: ChatForkInfoPayloadSchema, result: ChatForkInfoResultSchema },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/agent-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "Schemas and port contracts for agent chats, provider accounts, models and usage.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"test": "bun --conditions=source test"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@adecore/intelligent-ui": "0.
|
|
89
|
+
"@adecore/intelligent-ui": "0.42.0",
|
|
90
90
|
"zod": "^4.6.7"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
package/src/chat.ts
CHANGED
|
@@ -509,6 +509,18 @@ export function workflowAgentIdOf(ref: string): string | null {
|
|
|
509
509
|
return ref.startsWith(WORKFLOW_AGENT_REF) ? ref.slice(WORKFLOW_AGENT_REF.length) || null : null;
|
|
510
510
|
}
|
|
511
511
|
|
|
512
|
+
/* Past this many UTF-8 bytes a tool's output or a turn's checkpoint diff is stored apart, and the item carries its beginning. */
|
|
513
|
+
export const CHAT_PAYLOAD_INLINE_BYTES = 64 * 1024;
|
|
514
|
+
|
|
515
|
+
// The whole of a value a host keeps apart from the thread; the item carries only its beginning.
|
|
516
|
+
export const ChatPayloadRefSchema = z.object({
|
|
517
|
+
// Opaque to a client, which asks for the value by the item that carries this.
|
|
518
|
+
id: z.string(),
|
|
519
|
+
// The size of the whole value in UTF-8 bytes: the text of an output, the JSON of a diff.
|
|
520
|
+
bytes: z.number().int().nonnegative()
|
|
521
|
+
});
|
|
522
|
+
export type ChatPayloadRef = z.infer<typeof ChatPayloadRefSchema>;
|
|
523
|
+
|
|
512
524
|
export const ChatToolItemSchema = z.object({
|
|
513
525
|
...base,
|
|
514
526
|
kind: z.literal('tool'),
|
|
@@ -522,7 +534,9 @@ export const ChatToolItemSchema = z.object({
|
|
|
522
534
|
progress: ChatToolProgressSchema.optional(),
|
|
523
535
|
changes: z.array(ChatFileChangeSchema).optional(),
|
|
524
536
|
// Set on a Workflow call once the CLI reports what the workflow runs, replaced whole by every report.
|
|
525
|
-
workflow: ChatWorkflowSchema.optional()
|
|
537
|
+
workflow: ChatWorkflowSchema.optional(),
|
|
538
|
+
// Set when `output` is only the beginning of what the call answered; `chat.toolOutput` answers the whole.
|
|
539
|
+
outputRef: ChatPayloadRefSchema.optional()
|
|
526
540
|
});
|
|
527
541
|
|
|
528
542
|
export const ChatSubagentUsageSchema = z.object({
|
|
@@ -660,7 +674,9 @@ export const ChatTurnItemSchema = z.object({
|
|
|
660
674
|
// Set on the turn a fork writes a summary in: the chat it is for, which gets the last answer of the turn.
|
|
661
675
|
summaryFor: ChatIdSchema.optional(),
|
|
662
676
|
// Set on a turn that ended in an error because of a limit rather than a mistake.
|
|
663
|
-
limit: ChatTurnLimitSchema.optional()
|
|
677
|
+
limit: ChatTurnLimitSchema.optional(),
|
|
678
|
+
// Set when `checkpointDiff` lists every file but holds back diffs past the first few; `chat.turnDiff` answers the whole.
|
|
679
|
+
checkpointDiffRef: ChatPayloadRefSchema.optional()
|
|
664
680
|
});
|
|
665
681
|
|
|
666
682
|
/* What a turn a restart could not take up again ends with, so a client can tell it from a turn a person stopped. */
|
|
@@ -1112,6 +1128,16 @@ export type ChatTurnDiffPayload = z.infer<typeof ChatTurnDiffPayloadSchema>;
|
|
|
1112
1128
|
export const ChatTurnDiffResultSchema = z.object({ diff: ChatCheckpointDiffSchema.nullable() });
|
|
1113
1129
|
export type ChatTurnDiffResult = z.infer<typeof ChatTurnDiffResultSchema>;
|
|
1114
1130
|
|
|
1131
|
+
export const ChatToolOutputPayloadSchema = z.object({
|
|
1132
|
+
chatId: ChatIdSchema,
|
|
1133
|
+
itemId: z.string().min(1)
|
|
1134
|
+
});
|
|
1135
|
+
export type ChatToolOutputPayload = z.infer<typeof ChatToolOutputPayloadSchema>;
|
|
1136
|
+
|
|
1137
|
+
// The whole of what a tool call answered, also where its item carries only the beginning; null before it answered.
|
|
1138
|
+
export const ChatToolOutputResultSchema = z.object({ output: z.string().nullable() });
|
|
1139
|
+
export type ChatToolOutputResult = z.infer<typeof ChatToolOutputResultSchema>;
|
|
1140
|
+
|
|
1115
1141
|
// A title of a node the fork makes; the same cap the canvas verbs hold a title to.
|
|
1116
1142
|
export const CHAT_FORK_TITLE_MAX = 120;
|
|
1117
1143
|
|
package/src/index.ts
CHANGED
|
@@ -110,6 +110,9 @@ export {
|
|
|
110
110
|
type ChatWorkflow,
|
|
111
111
|
workflowAgentRef,
|
|
112
112
|
workflowAgentIdOf,
|
|
113
|
+
CHAT_PAYLOAD_INLINE_BYTES,
|
|
114
|
+
ChatPayloadRefSchema,
|
|
115
|
+
type ChatPayloadRef,
|
|
113
116
|
ChatToolItemSchema,
|
|
114
117
|
ChatSubagentUsageSchema,
|
|
115
118
|
type ChatSubagentUsage,
|
|
@@ -234,6 +237,10 @@ export {
|
|
|
234
237
|
type ChatTurnDiffPayload,
|
|
235
238
|
ChatTurnDiffResultSchema,
|
|
236
239
|
type ChatTurnDiffResult,
|
|
240
|
+
ChatToolOutputPayloadSchema,
|
|
241
|
+
type ChatToolOutputPayload,
|
|
242
|
+
ChatToolOutputResultSchema,
|
|
243
|
+
type ChatToolOutputResult,
|
|
237
244
|
CHAT_FORK_TITLE_MAX,
|
|
238
245
|
ChatForkPayloadSchema,
|
|
239
246
|
type ChatForkPayload,
|
package/src/protocol.ts
CHANGED
|
@@ -47,6 +47,8 @@ import {
|
|
|
47
47
|
ChatTargetPayloadSchema,
|
|
48
48
|
ChatTurnDiffPayloadSchema,
|
|
49
49
|
ChatTurnDiffResultSchema,
|
|
50
|
+
ChatToolOutputPayloadSchema,
|
|
51
|
+
ChatToolOutputResultSchema,
|
|
50
52
|
ChatUnqueueResultSchema,
|
|
51
53
|
ChatVisualsEventSchema,
|
|
52
54
|
ChatVisualsResultSchema,
|
|
@@ -90,6 +92,7 @@ export const AGENT_REQUEST_SCHEMAS = {
|
|
|
90
92
|
'chat.compact': { payload: ChatTargetPayloadSchema, result: EmptySchema },
|
|
91
93
|
'chat.clear': { payload: ChatClearPayloadSchema, result: EmptySchema },
|
|
92
94
|
'chat.turnDiff': { payload: ChatTurnDiffPayloadSchema, result: ChatTurnDiffResultSchema },
|
|
95
|
+
'chat.toolOutput': { payload: ChatToolOutputPayloadSchema, result: ChatToolOutputResultSchema },
|
|
93
96
|
'chat.fork': { payload: ChatForkPayloadSchema, result: ChatForkResultSchema },
|
|
94
97
|
'chat.continueOn': { payload: ChatContinueOnPayloadSchema, result: ChatContinueOnResultSchema },
|
|
95
98
|
'chat.forkInfo': { payload: ChatForkInfoPayloadSchema, result: ChatForkInfoResultSchema },
|