@adecore/agent-contracts 0.49.3 → 0.49.5
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 +69 -0
- package/dist/chat.js +9 -1
- package/dist/protocol.d.ts +45 -0
- package/package.json +2 -2
- package/src/chat.ts +9 -1
package/dist/chat.d.ts
CHANGED
|
@@ -1021,6 +1021,7 @@ export declare const ChatTurnItemSchema: z.ZodObject<{
|
|
|
1021
1021
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
1022
1022
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1023
1023
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1024
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
1024
1025
|
native: z.ZodOptional<z.ZodObject<{
|
|
1025
1026
|
turnId: z.ZodOptional<z.ZodString>;
|
|
1026
1027
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -1062,6 +1063,10 @@ export declare const WAITING_NOTE_PREFIX = "waiting-";
|
|
|
1062
1063
|
export declare const ChatNoteMessageSchema: z.ZodObject<{
|
|
1063
1064
|
from: z.ZodString;
|
|
1064
1065
|
title: z.ZodString;
|
|
1066
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
1067
|
+
dropped: "dropped";
|
|
1068
|
+
waiting: "waiting";
|
|
1069
|
+
}>>;
|
|
1065
1070
|
text: z.ZodString;
|
|
1066
1071
|
}, z.core.$strip>;
|
|
1067
1072
|
export declare const ChatNoteItemSchema: z.ZodObject<{
|
|
@@ -1079,6 +1084,10 @@ export declare const ChatNoteItemSchema: z.ZodObject<{
|
|
|
1079
1084
|
message: z.ZodOptional<z.ZodObject<{
|
|
1080
1085
|
from: z.ZodString;
|
|
1081
1086
|
title: z.ZodString;
|
|
1087
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
1088
|
+
dropped: "dropped";
|
|
1089
|
+
waiting: "waiting";
|
|
1090
|
+
}>>;
|
|
1082
1091
|
text: z.ZodString;
|
|
1083
1092
|
}, z.core.$strip>>;
|
|
1084
1093
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -1405,6 +1414,7 @@ export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1405
1414
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
1406
1415
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1407
1416
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1417
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
1408
1418
|
native: z.ZodOptional<z.ZodObject<{
|
|
1409
1419
|
turnId: z.ZodOptional<z.ZodString>;
|
|
1410
1420
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -1437,6 +1447,10 @@ export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1437
1447
|
message: z.ZodOptional<z.ZodObject<{
|
|
1438
1448
|
from: z.ZodString;
|
|
1439
1449
|
title: z.ZodString;
|
|
1450
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
1451
|
+
dropped: "dropped";
|
|
1452
|
+
waiting: "waiting";
|
|
1453
|
+
}>>;
|
|
1440
1454
|
text: z.ZodString;
|
|
1441
1455
|
}, z.core.$strip>>;
|
|
1442
1456
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -1781,6 +1795,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1781
1795
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
1782
1796
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1783
1797
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1798
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
1784
1799
|
native: z.ZodOptional<z.ZodObject<{
|
|
1785
1800
|
turnId: z.ZodOptional<z.ZodString>;
|
|
1786
1801
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -1813,6 +1828,10 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1813
1828
|
message: z.ZodOptional<z.ZodObject<{
|
|
1814
1829
|
from: z.ZodString;
|
|
1815
1830
|
title: z.ZodString;
|
|
1831
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
1832
|
+
dropped: "dropped";
|
|
1833
|
+
waiting: "waiting";
|
|
1834
|
+
}>>;
|
|
1816
1835
|
text: z.ZodString;
|
|
1817
1836
|
}, z.core.$strip>>;
|
|
1818
1837
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -2539,6 +2558,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2539
2558
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
2540
2559
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2541
2560
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2561
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
2542
2562
|
native: z.ZodOptional<z.ZodObject<{
|
|
2543
2563
|
turnId: z.ZodOptional<z.ZodString>;
|
|
2544
2564
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -2571,6 +2591,10 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2571
2591
|
message: z.ZodOptional<z.ZodObject<{
|
|
2572
2592
|
from: z.ZodString;
|
|
2573
2593
|
title: z.ZodString;
|
|
2594
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
2595
|
+
dropped: "dropped";
|
|
2596
|
+
waiting: "waiting";
|
|
2597
|
+
}>>;
|
|
2574
2598
|
text: z.ZodString;
|
|
2575
2599
|
}, z.core.$strip>>;
|
|
2576
2600
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -2902,6 +2926,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
2902
2926
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
2903
2927
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2904
2928
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2929
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
2905
2930
|
native: z.ZodOptional<z.ZodObject<{
|
|
2906
2931
|
turnId: z.ZodOptional<z.ZodString>;
|
|
2907
2932
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -2934,6 +2959,10 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
2934
2959
|
message: z.ZodOptional<z.ZodObject<{
|
|
2935
2960
|
from: z.ZodString;
|
|
2936
2961
|
title: z.ZodString;
|
|
2962
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
2963
|
+
dropped: "dropped";
|
|
2964
|
+
waiting: "waiting";
|
|
2965
|
+
}>>;
|
|
2937
2966
|
text: z.ZodString;
|
|
2938
2967
|
}, z.core.$strip>>;
|
|
2939
2968
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -3660,6 +3689,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
3660
3689
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
3661
3690
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3662
3691
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3692
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
3663
3693
|
native: z.ZodOptional<z.ZodObject<{
|
|
3664
3694
|
turnId: z.ZodOptional<z.ZodString>;
|
|
3665
3695
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -3692,6 +3722,10 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
3692
3722
|
message: z.ZodOptional<z.ZodObject<{
|
|
3693
3723
|
from: z.ZodString;
|
|
3694
3724
|
title: z.ZodString;
|
|
3725
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
3726
|
+
dropped: "dropped";
|
|
3727
|
+
waiting: "waiting";
|
|
3728
|
+
}>>;
|
|
3695
3729
|
text: z.ZodString;
|
|
3696
3730
|
}, z.core.$strip>>;
|
|
3697
3731
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -4105,6 +4139,7 @@ export declare const ChatHistoryResultSchema: z.ZodObject<{
|
|
|
4105
4139
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
4106
4140
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4107
4141
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4142
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
4108
4143
|
native: z.ZodOptional<z.ZodObject<{
|
|
4109
4144
|
turnId: z.ZodOptional<z.ZodString>;
|
|
4110
4145
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -4137,6 +4172,10 @@ export declare const ChatHistoryResultSchema: z.ZodObject<{
|
|
|
4137
4172
|
message: z.ZodOptional<z.ZodObject<{
|
|
4138
4173
|
from: z.ZodString;
|
|
4139
4174
|
title: z.ZodString;
|
|
4175
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
4176
|
+
dropped: "dropped";
|
|
4177
|
+
waiting: "waiting";
|
|
4178
|
+
}>>;
|
|
4140
4179
|
text: z.ZodString;
|
|
4141
4180
|
}, z.core.$strip>>;
|
|
4142
4181
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -4511,6 +4550,7 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
|
|
|
4511
4550
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
4512
4551
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4513
4552
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4553
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
4514
4554
|
native: z.ZodOptional<z.ZodObject<{
|
|
4515
4555
|
turnId: z.ZodOptional<z.ZodString>;
|
|
4516
4556
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -4543,6 +4583,10 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
|
|
|
4543
4583
|
message: z.ZodOptional<z.ZodObject<{
|
|
4544
4584
|
from: z.ZodString;
|
|
4545
4585
|
title: z.ZodString;
|
|
4586
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
4587
|
+
dropped: "dropped";
|
|
4588
|
+
waiting: "waiting";
|
|
4589
|
+
}>>;
|
|
4546
4590
|
text: z.ZodString;
|
|
4547
4591
|
}, z.core.$strip>>;
|
|
4548
4592
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -5363,6 +5407,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5363
5407
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
5364
5408
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5365
5409
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5410
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
5366
5411
|
native: z.ZodOptional<z.ZodObject<{
|
|
5367
5412
|
turnId: z.ZodOptional<z.ZodString>;
|
|
5368
5413
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -5395,6 +5440,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5395
5440
|
message: z.ZodOptional<z.ZodObject<{
|
|
5396
5441
|
from: z.ZodString;
|
|
5397
5442
|
title: z.ZodString;
|
|
5443
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
5444
|
+
dropped: "dropped";
|
|
5445
|
+
waiting: "waiting";
|
|
5446
|
+
}>>;
|
|
5398
5447
|
text: z.ZodString;
|
|
5399
5448
|
}, z.core.$strip>>;
|
|
5400
5449
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -5724,6 +5773,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5724
5773
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
5725
5774
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5726
5775
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5776
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
5727
5777
|
native: z.ZodOptional<z.ZodObject<{
|
|
5728
5778
|
turnId: z.ZodOptional<z.ZodString>;
|
|
5729
5779
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -5756,6 +5806,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5756
5806
|
message: z.ZodOptional<z.ZodObject<{
|
|
5757
5807
|
from: z.ZodString;
|
|
5758
5808
|
title: z.ZodString;
|
|
5809
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
5810
|
+
dropped: "dropped";
|
|
5811
|
+
waiting: "waiting";
|
|
5812
|
+
}>>;
|
|
5759
5813
|
text: z.ZodString;
|
|
5760
5814
|
}, z.core.$strip>>;
|
|
5761
5815
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -6084,6 +6138,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6084
6138
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
6085
6139
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6086
6140
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6141
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
6087
6142
|
native: z.ZodOptional<z.ZodObject<{
|
|
6088
6143
|
turnId: z.ZodOptional<z.ZodString>;
|
|
6089
6144
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -6116,6 +6171,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6116
6171
|
message: z.ZodOptional<z.ZodObject<{
|
|
6117
6172
|
from: z.ZodString;
|
|
6118
6173
|
title: z.ZodString;
|
|
6174
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
6175
|
+
dropped: "dropped";
|
|
6176
|
+
waiting: "waiting";
|
|
6177
|
+
}>>;
|
|
6119
6178
|
text: z.ZodString;
|
|
6120
6179
|
}, z.core.$strip>>;
|
|
6121
6180
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -6842,6 +6901,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6842
6901
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
6843
6902
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6844
6903
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6904
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
6845
6905
|
native: z.ZodOptional<z.ZodObject<{
|
|
6846
6906
|
turnId: z.ZodOptional<z.ZodString>;
|
|
6847
6907
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -6874,6 +6934,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6874
6934
|
message: z.ZodOptional<z.ZodObject<{
|
|
6875
6935
|
from: z.ZodString;
|
|
6876
6936
|
title: z.ZodString;
|
|
6937
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
6938
|
+
dropped: "dropped";
|
|
6939
|
+
waiting: "waiting";
|
|
6940
|
+
}>>;
|
|
6877
6941
|
text: z.ZodString;
|
|
6878
6942
|
}, z.core.$strip>>;
|
|
6879
6943
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -7321,6 +7385,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
7321
7385
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
7322
7386
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7323
7387
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7388
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
7324
7389
|
native: z.ZodOptional<z.ZodObject<{
|
|
7325
7390
|
turnId: z.ZodOptional<z.ZodString>;
|
|
7326
7391
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -7353,6 +7418,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
7353
7418
|
message: z.ZodOptional<z.ZodObject<{
|
|
7354
7419
|
from: z.ZodString;
|
|
7355
7420
|
title: z.ZodString;
|
|
7421
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
7422
|
+
dropped: "dropped";
|
|
7423
|
+
waiting: "waiting";
|
|
7424
|
+
}>>;
|
|
7356
7425
|
text: z.ZodString;
|
|
7357
7426
|
}, z.core.$strip>>;
|
|
7358
7427
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
package/dist/chat.js
CHANGED
|
@@ -562,6 +562,8 @@ export const ChatTurnItemSchema = z.object({
|
|
|
562
562
|
taskIds: z.array(z.string()).optional(),
|
|
563
563
|
// The nodes whose messages woke the chat for this turn, which is where waking on a message stops: a turn with one wakes nobody.
|
|
564
564
|
messageFrom: z.array(z.string()).optional(),
|
|
565
|
+
// How many messages led to this turn, which is what bounds a chain of them.
|
|
566
|
+
messageHop: z.number().optional(),
|
|
565
567
|
// The CLI's own name for where this turn ended, which is what a fork after this turn is cut at.
|
|
566
568
|
native: z.object({ turnId: z.string().optional(), lastUuid: z.string().optional() }).optional(),
|
|
567
569
|
// The git tree of the chat's folder when the turn settled: what a fork after this turn starts its files from.
|
|
@@ -592,7 +594,13 @@ export function abortedByEnd(turn, items) {
|
|
|
592
594
|
/* The id prefix of the note a host leaves in a parent about a child that waits on a request. */
|
|
593
595
|
export const WAITING_NOTE_PREFIX = 'waiting-';
|
|
594
596
|
/* A message another node sent a chat: its id, the name it had on the canvas then, and what it said. */
|
|
595
|
-
export const ChatNoteMessageSchema = z.object({
|
|
597
|
+
export const ChatNoteMessageSchema = z.object({
|
|
598
|
+
from: z.string().min(1),
|
|
599
|
+
title: z.string(),
|
|
600
|
+
// Absent once the agent heard it, and on every message from before this; `dropped` never reached it.
|
|
601
|
+
state: z.enum(['waiting', 'dropped']).optional(),
|
|
602
|
+
text: z.string()
|
|
603
|
+
});
|
|
596
604
|
export const ChatNoteItemSchema = z.object({
|
|
597
605
|
...base,
|
|
598
606
|
kind: z.literal('note'),
|
package/dist/protocol.d.ts
CHANGED
|
@@ -507,6 +507,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
507
507
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
508
508
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
509
509
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
510
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
510
511
|
native: z.ZodOptional<z.ZodObject<{
|
|
511
512
|
turnId: z.ZodOptional<z.ZodString>;
|
|
512
513
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -539,6 +540,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
539
540
|
message: z.ZodOptional<z.ZodObject<{
|
|
540
541
|
from: z.ZodString;
|
|
541
542
|
title: z.ZodString;
|
|
543
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
544
|
+
dropped: "dropped";
|
|
545
|
+
waiting: "waiting";
|
|
546
|
+
}>>;
|
|
542
547
|
text: z.ZodString;
|
|
543
548
|
}, z.core.$strip>>;
|
|
544
549
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -1042,6 +1047,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1042
1047
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
1043
1048
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1044
1049
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1050
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
1045
1051
|
native: z.ZodOptional<z.ZodObject<{
|
|
1046
1052
|
turnId: z.ZodOptional<z.ZodString>;
|
|
1047
1053
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -1074,6 +1080,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1074
1080
|
message: z.ZodOptional<z.ZodObject<{
|
|
1075
1081
|
from: z.ZodString;
|
|
1076
1082
|
title: z.ZodString;
|
|
1083
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
1084
|
+
dropped: "dropped";
|
|
1085
|
+
waiting: "waiting";
|
|
1086
|
+
}>>;
|
|
1077
1087
|
text: z.ZodString;
|
|
1078
1088
|
}, z.core.$strip>>;
|
|
1079
1089
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -1403,6 +1413,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1403
1413
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
1404
1414
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1405
1415
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1416
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
1406
1417
|
native: z.ZodOptional<z.ZodObject<{
|
|
1407
1418
|
turnId: z.ZodOptional<z.ZodString>;
|
|
1408
1419
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -1435,6 +1446,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1435
1446
|
message: z.ZodOptional<z.ZodObject<{
|
|
1436
1447
|
from: z.ZodString;
|
|
1437
1448
|
title: z.ZodString;
|
|
1449
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
1450
|
+
dropped: "dropped";
|
|
1451
|
+
waiting: "waiting";
|
|
1452
|
+
}>>;
|
|
1438
1453
|
text: z.ZodString;
|
|
1439
1454
|
}, z.core.$strip>>;
|
|
1440
1455
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -1763,6 +1778,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1763
1778
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
1764
1779
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1765
1780
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1781
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
1766
1782
|
native: z.ZodOptional<z.ZodObject<{
|
|
1767
1783
|
turnId: z.ZodOptional<z.ZodString>;
|
|
1768
1784
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -1795,6 +1811,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1795
1811
|
message: z.ZodOptional<z.ZodObject<{
|
|
1796
1812
|
from: z.ZodString;
|
|
1797
1813
|
title: z.ZodString;
|
|
1814
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
1815
|
+
dropped: "dropped";
|
|
1816
|
+
waiting: "waiting";
|
|
1817
|
+
}>>;
|
|
1798
1818
|
text: z.ZodString;
|
|
1799
1819
|
}, z.core.$strip>>;
|
|
1800
1820
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -2521,6 +2541,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2521
2541
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
2522
2542
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2523
2543
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2544
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
2524
2545
|
native: z.ZodOptional<z.ZodObject<{
|
|
2525
2546
|
turnId: z.ZodOptional<z.ZodString>;
|
|
2526
2547
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -2553,6 +2574,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2553
2574
|
message: z.ZodOptional<z.ZodObject<{
|
|
2554
2575
|
from: z.ZodString;
|
|
2555
2576
|
title: z.ZodString;
|
|
2577
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
2578
|
+
dropped: "dropped";
|
|
2579
|
+
waiting: "waiting";
|
|
2580
|
+
}>>;
|
|
2556
2581
|
text: z.ZodString;
|
|
2557
2582
|
}, z.core.$strip>>;
|
|
2558
2583
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -3000,6 +3025,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
3000
3025
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
3001
3026
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3002
3027
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3028
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
3003
3029
|
native: z.ZodOptional<z.ZodObject<{
|
|
3004
3030
|
turnId: z.ZodOptional<z.ZodString>;
|
|
3005
3031
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -3032,6 +3058,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
3032
3058
|
message: z.ZodOptional<z.ZodObject<{
|
|
3033
3059
|
from: z.ZodString;
|
|
3034
3060
|
title: z.ZodString;
|
|
3061
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
3062
|
+
dropped: "dropped";
|
|
3063
|
+
waiting: "waiting";
|
|
3064
|
+
}>>;
|
|
3035
3065
|
text: z.ZodString;
|
|
3036
3066
|
}, z.core.$strip>>;
|
|
3037
3067
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -4241,6 +4271,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
4241
4271
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
4242
4272
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4243
4273
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4274
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
4244
4275
|
native: z.ZodOptional<z.ZodObject<{
|
|
4245
4276
|
turnId: z.ZodOptional<z.ZodString>;
|
|
4246
4277
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -4273,6 +4304,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
4273
4304
|
message: z.ZodOptional<z.ZodObject<{
|
|
4274
4305
|
from: z.ZodString;
|
|
4275
4306
|
title: z.ZodString;
|
|
4307
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
4308
|
+
dropped: "dropped";
|
|
4309
|
+
waiting: "waiting";
|
|
4310
|
+
}>>;
|
|
4276
4311
|
text: z.ZodString;
|
|
4277
4312
|
}, z.core.$strip>>;
|
|
4278
4313
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -5561,6 +5596,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
5561
5596
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
5562
5597
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5563
5598
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5599
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
5564
5600
|
native: z.ZodOptional<z.ZodObject<{
|
|
5565
5601
|
turnId: z.ZodOptional<z.ZodString>;
|
|
5566
5602
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -5593,6 +5629,10 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
5593
5629
|
message: z.ZodOptional<z.ZodObject<{
|
|
5594
5630
|
from: z.ZodString;
|
|
5595
5631
|
title: z.ZodString;
|
|
5632
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
5633
|
+
dropped: "dropped";
|
|
5634
|
+
waiting: "waiting";
|
|
5635
|
+
}>>;
|
|
5596
5636
|
text: z.ZodString;
|
|
5597
5637
|
}, z.core.$strip>>;
|
|
5598
5638
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -6319,6 +6359,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
6319
6359
|
deliveryPending: z.ZodOptional<z.ZodBoolean>;
|
|
6320
6360
|
taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6321
6361
|
messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6362
|
+
messageHop: z.ZodOptional<z.ZodNumber>;
|
|
6322
6363
|
native: z.ZodOptional<z.ZodObject<{
|
|
6323
6364
|
turnId: z.ZodOptional<z.ZodString>;
|
|
6324
6365
|
lastUuid: z.ZodOptional<z.ZodString>;
|
|
@@ -6351,6 +6392,10 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
6351
6392
|
message: z.ZodOptional<z.ZodObject<{
|
|
6352
6393
|
from: z.ZodString;
|
|
6353
6394
|
title: z.ZodString;
|
|
6395
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
6396
|
+
dropped: "dropped";
|
|
6397
|
+
waiting: "waiting";
|
|
6398
|
+
}>>;
|
|
6354
6399
|
text: z.ZodString;
|
|
6355
6400
|
}, z.core.$strip>>;
|
|
6356
6401
|
said: z.ZodOptional<z.ZodLiteral<true>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/agent-contracts",
|
|
3
|
-
"version": "0.49.
|
|
3
|
+
"version": "0.49.5",
|
|
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.49.
|
|
89
|
+
"@adecore/intelligent-ui": "0.49.5",
|
|
90
90
|
"zod": "^4.6.7"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
package/src/chat.ts
CHANGED
|
@@ -669,6 +669,8 @@ export const ChatTurnItemSchema = z.object({
|
|
|
669
669
|
taskIds: z.array(z.string()).optional(),
|
|
670
670
|
// The nodes whose messages woke the chat for this turn, which is where waking on a message stops: a turn with one wakes nobody.
|
|
671
671
|
messageFrom: z.array(z.string()).optional(),
|
|
672
|
+
// How many messages led to this turn, which is what bounds a chain of them.
|
|
673
|
+
messageHop: z.number().optional(),
|
|
672
674
|
// The CLI's own name for where this turn ended, which is what a fork after this turn is cut at.
|
|
673
675
|
native: z.object({ turnId: z.string().optional(), lastUuid: z.string().optional() }).optional(),
|
|
674
676
|
// The git tree of the chat's folder when the turn settled: what a fork after this turn starts its files from.
|
|
@@ -711,7 +713,13 @@ export function abortedByEnd(turn: { id: string; state: string }, items: readonl
|
|
|
711
713
|
export const WAITING_NOTE_PREFIX = 'waiting-';
|
|
712
714
|
|
|
713
715
|
/* A message another node sent a chat: its id, the name it had on the canvas then, and what it said. */
|
|
714
|
-
export const ChatNoteMessageSchema = z.object({
|
|
716
|
+
export const ChatNoteMessageSchema = z.object({
|
|
717
|
+
from: z.string().min(1),
|
|
718
|
+
title: z.string(),
|
|
719
|
+
// Absent once the agent heard it, and on every message from before this; `dropped` never reached it.
|
|
720
|
+
state: z.enum(['waiting', 'dropped']).optional(),
|
|
721
|
+
text: z.string()
|
|
722
|
+
});
|
|
715
723
|
|
|
716
724
|
export const ChatNoteItemSchema = z.object({
|
|
717
725
|
...base,
|