@adecore/agent-contracts 0.69.1 → 0.70.1
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 +200 -0
- package/dist/chat.js +32 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/protocol.d.ts +144 -0
- package/dist/usage.d.ts +14 -1
- package/dist/usage.js +1 -1
- package/package.json +3 -3
- package/src/chat.ts +38 -4
- package/src/index.ts +4 -0
- package/src/usage.ts +7 -3
package/dist/chat.d.ts
CHANGED
|
@@ -128,6 +128,8 @@ export declare const ChatBackgroundTaskSchema: z.ZodObject<{
|
|
|
128
128
|
startedAt: z.ZodNumber;
|
|
129
129
|
}, z.core.$strip>;
|
|
130
130
|
export type ChatBackgroundTask = z.infer<typeof ChatBackgroundTaskSchema>;
|
|
131
|
+
export declare function scheduledWakeupId(ref: string, scheduledFor: number): string;
|
|
132
|
+
export declare function scheduledWakeupAt(task: Pick<ChatBackgroundTask, 'id'>): number | null;
|
|
131
133
|
export declare const ChatTurnLimitSchema: z.ZodObject<{
|
|
132
134
|
kind: z.ZodEnum<{
|
|
133
135
|
overload: "overload";
|
|
@@ -843,6 +845,7 @@ export declare const ChatToolItemSchema: z.ZodObject<{
|
|
|
843
845
|
error: "error";
|
|
844
846
|
running: "running";
|
|
845
847
|
}>;
|
|
848
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
846
849
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
847
850
|
progress: z.ZodOptional<z.ZodObject<{
|
|
848
851
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1055,6 +1058,7 @@ export declare const ChatTurnItemSchema: z.ZodObject<{
|
|
|
1055
1058
|
}, z.core.$strip>>;
|
|
1056
1059
|
label: z.ZodOptional<z.ZodString>;
|
|
1057
1060
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
1061
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
1058
1062
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
1059
1063
|
costUsd: z.ZodNumber;
|
|
1060
1064
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -1164,6 +1168,20 @@ export declare const ChatCompactionItemSchema: z.ZodObject<{
|
|
|
1164
1168
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
1165
1169
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
1166
1170
|
}, z.core.$strip>;
|
|
1171
|
+
export declare const ChatSecretItemSchema: z.ZodObject<{
|
|
1172
|
+
id: z.ZodString;
|
|
1173
|
+
createdAt: z.ZodNumber;
|
|
1174
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
1175
|
+
kind: z.ZodLiteral<"secret">;
|
|
1176
|
+
label: z.ZodString;
|
|
1177
|
+
outcome: z.ZodEnum<{
|
|
1178
|
+
cancelled: "cancelled";
|
|
1179
|
+
declined: "declined";
|
|
1180
|
+
saved: "saved";
|
|
1181
|
+
"timed-out": "timed-out";
|
|
1182
|
+
}>;
|
|
1183
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1184
|
+
}, z.core.$strip>;
|
|
1167
1185
|
export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1168
1186
|
id: z.ZodString;
|
|
1169
1187
|
createdAt: z.ZodNumber;
|
|
@@ -1338,6 +1356,7 @@ export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1338
1356
|
error: "error";
|
|
1339
1357
|
running: "running";
|
|
1340
1358
|
}>;
|
|
1359
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
1341
1360
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
1342
1361
|
progress: z.ZodOptional<z.ZodObject<{
|
|
1343
1362
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1491,6 +1510,7 @@ export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1491
1510
|
}, z.core.$strip>>;
|
|
1492
1511
|
label: z.ZodOptional<z.ZodString>;
|
|
1493
1512
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
1513
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
1494
1514
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
1495
1515
|
costUsd: z.ZodNumber;
|
|
1496
1516
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -1567,6 +1587,19 @@ export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1567
1587
|
kind: z.ZodLiteral<"compaction">;
|
|
1568
1588
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
1569
1589
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
1590
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1591
|
+
id: z.ZodString;
|
|
1592
|
+
createdAt: z.ZodNumber;
|
|
1593
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
1594
|
+
kind: z.ZodLiteral<"secret">;
|
|
1595
|
+
label: z.ZodString;
|
|
1596
|
+
outcome: z.ZodEnum<{
|
|
1597
|
+
cancelled: "cancelled";
|
|
1598
|
+
declined: "declined";
|
|
1599
|
+
saved: "saved";
|
|
1600
|
+
"timed-out": "timed-out";
|
|
1601
|
+
}>;
|
|
1602
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1570
1603
|
}, z.core.$strip>], "kind">;
|
|
1571
1604
|
export type ChatItem = z.infer<typeof ChatItemSchema>;
|
|
1572
1605
|
export interface ChatUnknownItem {
|
|
@@ -1587,6 +1620,7 @@ export type ChatTurnItem = z.infer<typeof ChatTurnItemSchema>;
|
|
|
1587
1620
|
export type ChatNoteItem = z.infer<typeof ChatNoteItemSchema>;
|
|
1588
1621
|
export type ChatNoteMessage = z.infer<typeof ChatNoteMessageSchema>;
|
|
1589
1622
|
export type ChatCompactionItem = z.infer<typeof ChatCompactionItemSchema>;
|
|
1623
|
+
export type ChatSecretItem = z.infer<typeof ChatSecretItemSchema>;
|
|
1590
1624
|
type ThreadItem = {
|
|
1591
1625
|
readonly kind: string;
|
|
1592
1626
|
readonly createdAt: number;
|
|
@@ -1772,6 +1806,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1772
1806
|
error: "error";
|
|
1773
1807
|
running: "running";
|
|
1774
1808
|
}>;
|
|
1809
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
1775
1810
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
1776
1811
|
progress: z.ZodOptional<z.ZodObject<{
|
|
1777
1812
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1925,6 +1960,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1925
1960
|
}, z.core.$strip>>;
|
|
1926
1961
|
label: z.ZodOptional<z.ZodString>;
|
|
1927
1962
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
1963
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
1928
1964
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
1929
1965
|
costUsd: z.ZodNumber;
|
|
1930
1966
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -2001,6 +2037,19 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2001
2037
|
kind: z.ZodLiteral<"compaction">;
|
|
2002
2038
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
2003
2039
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
2040
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2041
|
+
id: z.ZodString;
|
|
2042
|
+
createdAt: z.ZodNumber;
|
|
2043
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
2044
|
+
kind: z.ZodLiteral<"secret">;
|
|
2045
|
+
label: z.ZodString;
|
|
2046
|
+
outcome: z.ZodEnum<{
|
|
2047
|
+
cancelled: "cancelled";
|
|
2048
|
+
declined: "declined";
|
|
2049
|
+
saved: "saved";
|
|
2050
|
+
"timed-out": "timed-out";
|
|
2051
|
+
}>;
|
|
2052
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2004
2053
|
}, z.core.$strip>], "kind">;
|
|
2005
2054
|
historyIndex: z.ZodOptional<z.ZodNumber>;
|
|
2006
2055
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2617,6 +2666,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2617
2666
|
error: "error";
|
|
2618
2667
|
running: "running";
|
|
2619
2668
|
}>;
|
|
2669
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
2620
2670
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
2621
2671
|
progress: z.ZodOptional<z.ZodObject<{
|
|
2622
2672
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -2770,6 +2820,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2770
2820
|
}, z.core.$strip>>;
|
|
2771
2821
|
label: z.ZodOptional<z.ZodString>;
|
|
2772
2822
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
2823
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
2773
2824
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
2774
2825
|
costUsd: z.ZodNumber;
|
|
2775
2826
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -2846,6 +2897,19 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2846
2897
|
kind: z.ZodLiteral<"compaction">;
|
|
2847
2898
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
2848
2899
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
2900
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2901
|
+
id: z.ZodString;
|
|
2902
|
+
createdAt: z.ZodNumber;
|
|
2903
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
2904
|
+
kind: z.ZodLiteral<"secret">;
|
|
2905
|
+
label: z.ZodString;
|
|
2906
|
+
outcome: z.ZodEnum<{
|
|
2907
|
+
cancelled: "cancelled";
|
|
2908
|
+
declined: "declined";
|
|
2909
|
+
saved: "saved";
|
|
2910
|
+
"timed-out": "timed-out";
|
|
2911
|
+
}>;
|
|
2912
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2849
2913
|
}, z.core.$strip>], "kind">>;
|
|
2850
2914
|
}, z.core.$strip>], "type">;
|
|
2851
2915
|
export type ChatEvent = z.infer<typeof ChatEventSchema>;
|
|
@@ -3031,6 +3095,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
3031
3095
|
error: "error";
|
|
3032
3096
|
running: "running";
|
|
3033
3097
|
}>;
|
|
3098
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
3034
3099
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
3035
3100
|
progress: z.ZodOptional<z.ZodObject<{
|
|
3036
3101
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -3184,6 +3249,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
3184
3249
|
}, z.core.$strip>>;
|
|
3185
3250
|
label: z.ZodOptional<z.ZodString>;
|
|
3186
3251
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
3252
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
3187
3253
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
3188
3254
|
costUsd: z.ZodNumber;
|
|
3189
3255
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -3260,6 +3326,19 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
3260
3326
|
kind: z.ZodLiteral<"compaction">;
|
|
3261
3327
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
3262
3328
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
3329
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3330
|
+
id: z.ZodString;
|
|
3331
|
+
createdAt: z.ZodNumber;
|
|
3332
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
3333
|
+
kind: z.ZodLiteral<"secret">;
|
|
3334
|
+
label: z.ZodString;
|
|
3335
|
+
outcome: z.ZodEnum<{
|
|
3336
|
+
cancelled: "cancelled";
|
|
3337
|
+
declined: "declined";
|
|
3338
|
+
saved: "saved";
|
|
3339
|
+
"timed-out": "timed-out";
|
|
3340
|
+
}>;
|
|
3341
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3263
3342
|
}, z.core.$strip>], "kind">;
|
|
3264
3343
|
historyIndex: z.ZodOptional<z.ZodNumber>;
|
|
3265
3344
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3876,6 +3955,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
3876
3955
|
error: "error";
|
|
3877
3956
|
running: "running";
|
|
3878
3957
|
}>;
|
|
3958
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
3879
3959
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
3880
3960
|
progress: z.ZodOptional<z.ZodObject<{
|
|
3881
3961
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -4029,6 +4109,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
4029
4109
|
}, z.core.$strip>>;
|
|
4030
4110
|
label: z.ZodOptional<z.ZodString>;
|
|
4031
4111
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
4112
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
4032
4113
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
4033
4114
|
costUsd: z.ZodNumber;
|
|
4034
4115
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -4105,6 +4186,19 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
4105
4186
|
kind: z.ZodLiteral<"compaction">;
|
|
4106
4187
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
4107
4188
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
4189
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4190
|
+
id: z.ZodString;
|
|
4191
|
+
createdAt: z.ZodNumber;
|
|
4192
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
4193
|
+
kind: z.ZodLiteral<"secret">;
|
|
4194
|
+
label: z.ZodString;
|
|
4195
|
+
outcome: z.ZodEnum<{
|
|
4196
|
+
cancelled: "cancelled";
|
|
4197
|
+
declined: "declined";
|
|
4198
|
+
saved: "saved";
|
|
4199
|
+
"timed-out": "timed-out";
|
|
4200
|
+
}>;
|
|
4201
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4108
4202
|
}, z.core.$strip>], "kind">>;
|
|
4109
4203
|
}, z.core.$strip>], "type">;
|
|
4110
4204
|
seq: z.ZodOptional<z.ZodNumber>;
|
|
@@ -4384,6 +4478,7 @@ export declare const ChatHistoryResultSchema: z.ZodObject<{
|
|
|
4384
4478
|
error: "error";
|
|
4385
4479
|
running: "running";
|
|
4386
4480
|
}>;
|
|
4481
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
4387
4482
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
4388
4483
|
progress: z.ZodOptional<z.ZodObject<{
|
|
4389
4484
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -4537,6 +4632,7 @@ export declare const ChatHistoryResultSchema: z.ZodObject<{
|
|
|
4537
4632
|
}, z.core.$strip>>;
|
|
4538
4633
|
label: z.ZodOptional<z.ZodString>;
|
|
4539
4634
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
4635
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
4540
4636
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
4541
4637
|
costUsd: z.ZodNumber;
|
|
4542
4638
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -4613,6 +4709,19 @@ export declare const ChatHistoryResultSchema: z.ZodObject<{
|
|
|
4613
4709
|
kind: z.ZodLiteral<"compaction">;
|
|
4614
4710
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
4615
4711
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
4712
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4713
|
+
id: z.ZodString;
|
|
4714
|
+
createdAt: z.ZodNumber;
|
|
4715
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
4716
|
+
kind: z.ZodLiteral<"secret">;
|
|
4717
|
+
label: z.ZodString;
|
|
4718
|
+
outcome: z.ZodEnum<{
|
|
4719
|
+
cancelled: "cancelled";
|
|
4720
|
+
declined: "declined";
|
|
4721
|
+
saved: "saved";
|
|
4722
|
+
"timed-out": "timed-out";
|
|
4723
|
+
}>;
|
|
4724
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4616
4725
|
}, z.core.$strip>], "kind">>;
|
|
4617
4726
|
history: z.ZodObject<{
|
|
4618
4727
|
start: z.ZodNumber;
|
|
@@ -4837,6 +4946,7 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
|
|
|
4837
4946
|
error: "error";
|
|
4838
4947
|
running: "running";
|
|
4839
4948
|
}>;
|
|
4949
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
4840
4950
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
4841
4951
|
progress: z.ZodOptional<z.ZodObject<{
|
|
4842
4952
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -4990,6 +5100,7 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
|
|
|
4990
5100
|
}, z.core.$strip>>;
|
|
4991
5101
|
label: z.ZodOptional<z.ZodString>;
|
|
4992
5102
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
5103
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
4993
5104
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
4994
5105
|
costUsd: z.ZodNumber;
|
|
4995
5106
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -5066,6 +5177,19 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
|
|
|
5066
5177
|
kind: z.ZodLiteral<"compaction">;
|
|
5067
5178
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
5068
5179
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
5180
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5181
|
+
id: z.ZodString;
|
|
5182
|
+
createdAt: z.ZodNumber;
|
|
5183
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
5184
|
+
kind: z.ZodLiteral<"secret">;
|
|
5185
|
+
label: z.ZodString;
|
|
5186
|
+
outcome: z.ZodEnum<{
|
|
5187
|
+
cancelled: "cancelled";
|
|
5188
|
+
declined: "declined";
|
|
5189
|
+
saved: "saved";
|
|
5190
|
+
"timed-out": "timed-out";
|
|
5191
|
+
}>;
|
|
5192
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5069
5193
|
}, z.core.$strip>], "kind">>;
|
|
5070
5194
|
history: z.ZodObject<{
|
|
5071
5195
|
start: z.ZodOptional<z.ZodNumber>;
|
|
@@ -5745,6 +5869,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5745
5869
|
error: "error";
|
|
5746
5870
|
running: "running";
|
|
5747
5871
|
}>;
|
|
5872
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
5748
5873
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
5749
5874
|
progress: z.ZodOptional<z.ZodObject<{
|
|
5750
5875
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -5898,6 +6023,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5898
6023
|
}, z.core.$strip>>;
|
|
5899
6024
|
label: z.ZodOptional<z.ZodString>;
|
|
5900
6025
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
6026
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
5901
6027
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
5902
6028
|
costUsd: z.ZodNumber;
|
|
5903
6029
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -5974,6 +6100,19 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5974
6100
|
kind: z.ZodLiteral<"compaction">;
|
|
5975
6101
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
5976
6102
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
6103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6104
|
+
id: z.ZodString;
|
|
6105
|
+
createdAt: z.ZodNumber;
|
|
6106
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
6107
|
+
kind: z.ZodLiteral<"secret">;
|
|
6108
|
+
label: z.ZodString;
|
|
6109
|
+
outcome: z.ZodEnum<{
|
|
6110
|
+
cancelled: "cancelled";
|
|
6111
|
+
declined: "declined";
|
|
6112
|
+
saved: "saved";
|
|
6113
|
+
"timed-out": "timed-out";
|
|
6114
|
+
}>;
|
|
6115
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5977
6116
|
}, z.core.$strip>], "kind">>;
|
|
5978
6117
|
history: z.ZodOptional<z.ZodObject<{
|
|
5979
6118
|
start: z.ZodNumber;
|
|
@@ -6153,6 +6292,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6153
6292
|
error: "error";
|
|
6154
6293
|
running: "running";
|
|
6155
6294
|
}>;
|
|
6295
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
6156
6296
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
6157
6297
|
progress: z.ZodOptional<z.ZodObject<{
|
|
6158
6298
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -6306,6 +6446,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6306
6446
|
}, z.core.$strip>>;
|
|
6307
6447
|
label: z.ZodOptional<z.ZodString>;
|
|
6308
6448
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
6449
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
6309
6450
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
6310
6451
|
costUsd: z.ZodNumber;
|
|
6311
6452
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -6382,6 +6523,19 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6382
6523
|
kind: z.ZodLiteral<"compaction">;
|
|
6383
6524
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
6384
6525
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
6526
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6527
|
+
id: z.ZodString;
|
|
6528
|
+
createdAt: z.ZodNumber;
|
|
6529
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
6530
|
+
kind: z.ZodLiteral<"secret">;
|
|
6531
|
+
label: z.ZodString;
|
|
6532
|
+
outcome: z.ZodEnum<{
|
|
6533
|
+
cancelled: "cancelled";
|
|
6534
|
+
declined: "declined";
|
|
6535
|
+
saved: "saved";
|
|
6536
|
+
"timed-out": "timed-out";
|
|
6537
|
+
}>;
|
|
6538
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6385
6539
|
}, z.core.$strip>], "kind">>>;
|
|
6386
6540
|
seq: z.ZodOptional<z.ZodNumber>;
|
|
6387
6541
|
events: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -6560,6 +6714,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6560
6714
|
error: "error";
|
|
6561
6715
|
running: "running";
|
|
6562
6716
|
}>;
|
|
6717
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
6563
6718
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
6564
6719
|
progress: z.ZodOptional<z.ZodObject<{
|
|
6565
6720
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -6713,6 +6868,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6713
6868
|
}, z.core.$strip>>;
|
|
6714
6869
|
label: z.ZodOptional<z.ZodString>;
|
|
6715
6870
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
6871
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
6716
6872
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
6717
6873
|
costUsd: z.ZodNumber;
|
|
6718
6874
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -6789,6 +6945,19 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6789
6945
|
kind: z.ZodLiteral<"compaction">;
|
|
6790
6946
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
6791
6947
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
6948
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6949
|
+
id: z.ZodString;
|
|
6950
|
+
createdAt: z.ZodNumber;
|
|
6951
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
6952
|
+
kind: z.ZodLiteral<"secret">;
|
|
6953
|
+
label: z.ZodString;
|
|
6954
|
+
outcome: z.ZodEnum<{
|
|
6955
|
+
cancelled: "cancelled";
|
|
6956
|
+
declined: "declined";
|
|
6957
|
+
saved: "saved";
|
|
6958
|
+
"timed-out": "timed-out";
|
|
6959
|
+
}>;
|
|
6960
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6792
6961
|
}, z.core.$strip>], "kind">;
|
|
6793
6962
|
historyIndex: z.ZodOptional<z.ZodNumber>;
|
|
6794
6963
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -7405,6 +7574,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
7405
7574
|
error: "error";
|
|
7406
7575
|
running: "running";
|
|
7407
7576
|
}>;
|
|
7577
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
7408
7578
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
7409
7579
|
progress: z.ZodOptional<z.ZodObject<{
|
|
7410
7580
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -7558,6 +7728,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
7558
7728
|
}, z.core.$strip>>;
|
|
7559
7729
|
label: z.ZodOptional<z.ZodString>;
|
|
7560
7730
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
7731
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
7561
7732
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
7562
7733
|
costUsd: z.ZodNumber;
|
|
7563
7734
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -7634,6 +7805,19 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
7634
7805
|
kind: z.ZodLiteral<"compaction">;
|
|
7635
7806
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
7636
7807
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
7808
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7809
|
+
id: z.ZodString;
|
|
7810
|
+
createdAt: z.ZodNumber;
|
|
7811
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
7812
|
+
kind: z.ZodLiteral<"secret">;
|
|
7813
|
+
label: z.ZodString;
|
|
7814
|
+
outcome: z.ZodEnum<{
|
|
7815
|
+
cancelled: "cancelled";
|
|
7816
|
+
declined: "declined";
|
|
7817
|
+
saved: "saved";
|
|
7818
|
+
"timed-out": "timed-out";
|
|
7819
|
+
}>;
|
|
7820
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7637
7821
|
}, z.core.$strip>], "kind">>;
|
|
7638
7822
|
}, z.core.$strip>], "type">>>;
|
|
7639
7823
|
bookmarks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -7708,6 +7892,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
7708
7892
|
error: "error";
|
|
7709
7893
|
running: "running";
|
|
7710
7894
|
}>;
|
|
7895
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
7711
7896
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
7712
7897
|
progress: z.ZodOptional<z.ZodObject<{
|
|
7713
7898
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -7931,6 +8116,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
7931
8116
|
error: "error";
|
|
7932
8117
|
running: "running";
|
|
7933
8118
|
}>;
|
|
8119
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
7934
8120
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
7935
8121
|
progress: z.ZodOptional<z.ZodObject<{
|
|
7936
8122
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -8084,6 +8270,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
8084
8270
|
}, z.core.$strip>>;
|
|
8085
8271
|
label: z.ZodOptional<z.ZodString>;
|
|
8086
8272
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
8273
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
8087
8274
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
8088
8275
|
costUsd: z.ZodNumber;
|
|
8089
8276
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -8160,6 +8347,19 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
8160
8347
|
kind: z.ZodLiteral<"compaction">;
|
|
8161
8348
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
8162
8349
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
8350
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8351
|
+
id: z.ZodString;
|
|
8352
|
+
createdAt: z.ZodNumber;
|
|
8353
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
8354
|
+
kind: z.ZodLiteral<"secret">;
|
|
8355
|
+
label: z.ZodString;
|
|
8356
|
+
outcome: z.ZodEnum<{
|
|
8357
|
+
cancelled: "cancelled";
|
|
8358
|
+
declined: "declined";
|
|
8359
|
+
saved: "saved";
|
|
8360
|
+
"timed-out": "timed-out";
|
|
8361
|
+
}>;
|
|
8362
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8163
8363
|
}, z.core.$strip>], "kind">>>;
|
|
8164
8364
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
8165
8365
|
}, z.core.$strip>;
|
package/dist/chat.js
CHANGED
|
@@ -135,6 +135,20 @@ export const ChatBackgroundTaskSchema = z.object({
|
|
|
135
135
|
command: z.string().nullable(),
|
|
136
136
|
startedAt: z.number()
|
|
137
137
|
});
|
|
138
|
+
const SCHEDULED_WAKEUP_ID = /^wakeup-(\d+)-./;
|
|
139
|
+
/*
|
|
140
|
+
* A wakeup the CLI scheduled for itself, which starts a turn of its own at `scheduledFor`, is a monitor in the
|
|
141
|
+
* chat's background work. Its time rides in the id, so a client that does not know wakeups still draws a
|
|
142
|
+
* row with a stop, and the wire keeps its shape.
|
|
143
|
+
*/
|
|
144
|
+
export function scheduledWakeupId(ref, scheduledFor) {
|
|
145
|
+
return `wakeup-${Math.round(scheduledFor)}-${ref}`;
|
|
146
|
+
}
|
|
147
|
+
/* When a background task that is a scheduled wakeup fires; null for any other task. */
|
|
148
|
+
export function scheduledWakeupAt(task) {
|
|
149
|
+
const match = SCHEDULED_WAKEUP_ID.exec(task.id);
|
|
150
|
+
return match === null ? null : Number(match[1]);
|
|
151
|
+
}
|
|
138
152
|
/*
|
|
139
153
|
* Why a turn stopped short, when its CLI said so in its own stream: the plan's usage limit, or a model
|
|
140
154
|
* too busy to answer. Not a state of its own, since a client that validates `state` knows four.
|
|
@@ -458,6 +472,8 @@ export const ChatToolItemSchema = z.object({
|
|
|
458
472
|
input: z.unknown(),
|
|
459
473
|
output: z.string().nullable(),
|
|
460
474
|
state: ChatToolStateSchema,
|
|
475
|
+
// Set on a call in `error` that ended because a person stopped it, not because it failed.
|
|
476
|
+
stopped: z.boolean().optional(),
|
|
461
477
|
// Set for a tool call made by a subagent, with the id of the Task call that spawned it.
|
|
462
478
|
parentToolUseId: z.string().nullable(),
|
|
463
479
|
progress: ChatToolProgressSchema.optional(),
|
|
@@ -574,6 +590,8 @@ export const ChatTurnItemSchema = z.object({
|
|
|
574
590
|
label: z.string().optional(),
|
|
575
591
|
// The Agent call the CLI woke up about, so the header can point at the subagent row it belongs to.
|
|
576
592
|
taskToolUseId: z.string().optional(),
|
|
593
|
+
// Set on an agent turn a wakeup the agent scheduled for itself started.
|
|
594
|
+
wakeup: z.boolean().optional(),
|
|
577
595
|
endedAt: z.number().nullable(),
|
|
578
596
|
costUsd: z.number().nonnegative(),
|
|
579
597
|
// The git tree of the chat's folder when the turn started; absent outside a repository.
|
|
@@ -654,10 +672,19 @@ export const ChatCompactionItemSchema = z.object({
|
|
|
654
672
|
// The size the CLI named right after the fold; absent when it named none.
|
|
655
673
|
postTokens: z.number().int().nonnegative().optional()
|
|
656
674
|
});
|
|
675
|
+
export const ChatSecretItemSchema = z.object({
|
|
676
|
+
...base,
|
|
677
|
+
kind: z.literal('secret'),
|
|
678
|
+
// What the person was asked for; the value they gave never appears in the thread.
|
|
679
|
+
label: z.string(),
|
|
680
|
+
outcome: z.enum(['saved', 'declined', 'timed-out', 'cancelled']),
|
|
681
|
+
// The names of the values when one request asked for several.
|
|
682
|
+
fields: z.array(z.string()).optional()
|
|
683
|
+
});
|
|
657
684
|
/*
|
|
658
|
-
*
|
|
659
|
-
*
|
|
660
|
-
*
|
|
685
|
+
* An open union: a client that reads tolerantly keeps a member it does not know as an unknown item in its place, so a
|
|
686
|
+
* new member is fine. A new value in an enum of an existing member that no `openValues` stamps turns that whole item
|
|
687
|
+
* unknown to such a client, so add an optional field instead.
|
|
661
688
|
*/
|
|
662
689
|
export const ChatItemSchema = openUnion(z.discriminatedUnion('kind', [
|
|
663
690
|
ChatUserItemSchema,
|
|
@@ -669,7 +696,8 @@ export const ChatItemSchema = openUnion(z.discriminatedUnion('kind', [
|
|
|
669
696
|
ChatQuestionItemSchema,
|
|
670
697
|
ChatTurnItemSchema,
|
|
671
698
|
ChatNoteItemSchema,
|
|
672
|
-
ChatCompactionItemSchema
|
|
699
|
+
ChatCompactionItemSchema,
|
|
700
|
+
ChatSecretItemSchema
|
|
673
701
|
]), 'ChatItem', { tag: 'kind', base: ['id', 'createdAt', 'turnId'] });
|
|
674
702
|
function isSubagentItem(item) {
|
|
675
703
|
return item.kind === 'subagent';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AGENT_KIND_MAX_LENGTH, AgentKindSchema, type AgentKind, 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, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, type ChatPayloadRef, ChatToolItemSchema, ChatSubagentUsageSchema, type ChatSubagentUsage, HOST_TASK_ORIGIN, taskRowId, taskIdOfRow, ChatSubagentItemSchema, ChatApprovalDecisionSchema, type ChatApprovalDecision, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, type ChatCheckpointFile, ChatCheckpointDiffSchema, type ChatCheckpointDiff, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, activeWorkflows, workflowEndedAt, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatNoteMessageSchema, ChatCompactionItemSchema, ChatItemSchema, type ChatItem, type ChatUserItem, type ChatAssistantItem, type ChatThinkingItem, type ChatToolItem, type ChatSubagentItem, type ChatApprovalItem, type ChatQuestionItem, type ChatTurnItem, type ChatNoteItem, type ChatNoteMessage, type ChatCompactionItem, type ChatUnknownItem, ChatEventSchema, type ChatEvent, type ChatUnknownEvent, 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, ChatSuggestionEventSchema, type ChatSuggestionEvent, 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, ChatListPayloadSchema, type ChatListPayload, ChatListResultSchema, type ChatListResult, GeneratedImageInputSchema, type GeneratedImageInput, generatedImageAttachment, holdsConversation, chatActivity, type ChatActivity } 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, scheduledWakeupId, scheduledWakeupAt, 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, taskRowId, taskIdOfRow, ChatSubagentItemSchema, ChatApprovalDecisionSchema, type ChatApprovalDecision, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, type ChatCheckpointFile, ChatCheckpointDiffSchema, type ChatCheckpointDiff, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, activeWorkflows, workflowEndedAt, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatNoteMessageSchema, ChatCompactionItemSchema, ChatSecretItemSchema, ChatItemSchema, type ChatItem, type ChatUserItem, type ChatAssistantItem, type ChatThinkingItem, type ChatToolItem, type ChatSubagentItem, type ChatApprovalItem, type ChatQuestionItem, type ChatTurnItem, type ChatNoteItem, type ChatNoteMessage, type ChatCompactionItem, type ChatSecretItem, type ChatUnknownItem, ChatEventSchema, type ChatEvent, type ChatUnknownEvent, 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, ChatSuggestionEventSchema, type ChatSuggestionEvent, 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, ChatListPayloadSchema, type ChatListPayload, ChatListResultSchema, type ChatListResult, GeneratedImageInputSchema, type GeneratedImageInput, generatedImageAttachment, holdsConversation, chatActivity, type ChatActivity } 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, inPickerOrder, separatesGroups, 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 { AGENT_KIND_MAX_LENGTH, AgentKindSchema, 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, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, ChatToolItemSchema, ChatSubagentUsageSchema, HOST_TASK_ORIGIN, taskRowId, taskIdOfRow, ChatSubagentItemSchema, ChatApprovalDecisionSchema, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, ChatCheckpointDiffSchema, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, activeWorkflows, workflowEndedAt, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatNoteMessageSchema, 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, ChatSuggestionEventSchema, 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, ChatListPayloadSchema, ChatListResultSchema, GeneratedImageInputSchema, generatedImageAttachment, holdsConversation, chatActivity } 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, scheduledWakeupId, scheduledWakeupAt, 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, taskRowId, taskIdOfRow, ChatSubagentItemSchema, ChatApprovalDecisionSchema, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, ChatCheckpointDiffSchema, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, activeWorkflows, workflowEndedAt, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatNoteMessageSchema, ChatCompactionItemSchema, ChatSecretItemSchema, 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, ChatSuggestionEventSchema, 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, ChatListPayloadSchema, ChatListResultSchema, GeneratedImageInputSchema, generatedImageAttachment, holdsConversation, chatActivity } 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, inPickerOrder, separatesGroups, ProviderListResultSchema, resumeCommandFor } from './model.js';
|
package/dist/protocol.d.ts
CHANGED
|
@@ -368,6 +368,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
368
368
|
error: "error";
|
|
369
369
|
running: "running";
|
|
370
370
|
}>;
|
|
371
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
371
372
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
372
373
|
progress: z.ZodOptional<z.ZodObject<{
|
|
373
374
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -521,6 +522,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
521
522
|
}, z.core.$strip>>;
|
|
522
523
|
label: z.ZodOptional<z.ZodString>;
|
|
523
524
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
525
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
524
526
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
525
527
|
costUsd: z.ZodNumber;
|
|
526
528
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -597,6 +599,19 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
597
599
|
kind: z.ZodLiteral<"compaction">;
|
|
598
600
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
599
601
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
602
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
603
|
+
id: z.ZodString;
|
|
604
|
+
createdAt: z.ZodNumber;
|
|
605
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
606
|
+
kind: z.ZodLiteral<"secret">;
|
|
607
|
+
label: z.ZodString;
|
|
608
|
+
outcome: z.ZodEnum<{
|
|
609
|
+
cancelled: "cancelled";
|
|
610
|
+
declined: "declined";
|
|
611
|
+
saved: "saved";
|
|
612
|
+
"timed-out": "timed-out";
|
|
613
|
+
}>;
|
|
614
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
600
615
|
}, z.core.$strip>], "kind">>;
|
|
601
616
|
history: z.ZodObject<{
|
|
602
617
|
start: z.ZodNumber;
|
|
@@ -968,6 +983,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
968
983
|
error: "error";
|
|
969
984
|
running: "running";
|
|
970
985
|
}>;
|
|
986
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
971
987
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
972
988
|
progress: z.ZodOptional<z.ZodObject<{
|
|
973
989
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1121,6 +1137,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1121
1137
|
}, z.core.$strip>>;
|
|
1122
1138
|
label: z.ZodOptional<z.ZodString>;
|
|
1123
1139
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
1140
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
1124
1141
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
1125
1142
|
costUsd: z.ZodNumber;
|
|
1126
1143
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -1197,6 +1214,19 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1197
1214
|
kind: z.ZodLiteral<"compaction">;
|
|
1198
1215
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
1199
1216
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
1217
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1218
|
+
id: z.ZodString;
|
|
1219
|
+
createdAt: z.ZodNumber;
|
|
1220
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
1221
|
+
kind: z.ZodLiteral<"secret">;
|
|
1222
|
+
label: z.ZodString;
|
|
1223
|
+
outcome: z.ZodEnum<{
|
|
1224
|
+
cancelled: "cancelled";
|
|
1225
|
+
declined: "declined";
|
|
1226
|
+
saved: "saved";
|
|
1227
|
+
"timed-out": "timed-out";
|
|
1228
|
+
}>;
|
|
1229
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1200
1230
|
}, z.core.$strip>], "kind">>;
|
|
1201
1231
|
history: z.ZodOptional<z.ZodObject<{
|
|
1202
1232
|
start: z.ZodNumber;
|
|
@@ -1376,6 +1406,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1376
1406
|
error: "error";
|
|
1377
1407
|
running: "running";
|
|
1378
1408
|
}>;
|
|
1409
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
1379
1410
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
1380
1411
|
progress: z.ZodOptional<z.ZodObject<{
|
|
1381
1412
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1529,6 +1560,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1529
1560
|
}, z.core.$strip>>;
|
|
1530
1561
|
label: z.ZodOptional<z.ZodString>;
|
|
1531
1562
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
1563
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
1532
1564
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
1533
1565
|
costUsd: z.ZodNumber;
|
|
1534
1566
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -1605,6 +1637,19 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1605
1637
|
kind: z.ZodLiteral<"compaction">;
|
|
1606
1638
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
1607
1639
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
1640
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1641
|
+
id: z.ZodString;
|
|
1642
|
+
createdAt: z.ZodNumber;
|
|
1643
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
1644
|
+
kind: z.ZodLiteral<"secret">;
|
|
1645
|
+
label: z.ZodString;
|
|
1646
|
+
outcome: z.ZodEnum<{
|
|
1647
|
+
cancelled: "cancelled";
|
|
1648
|
+
declined: "declined";
|
|
1649
|
+
saved: "saved";
|
|
1650
|
+
"timed-out": "timed-out";
|
|
1651
|
+
}>;
|
|
1652
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1608
1653
|
}, z.core.$strip>], "kind">>>;
|
|
1609
1654
|
seq: z.ZodOptional<z.ZodNumber>;
|
|
1610
1655
|
events: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1783,6 +1828,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1783
1828
|
error: "error";
|
|
1784
1829
|
running: "running";
|
|
1785
1830
|
}>;
|
|
1831
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
1786
1832
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
1787
1833
|
progress: z.ZodOptional<z.ZodObject<{
|
|
1788
1834
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1936,6 +1982,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1936
1982
|
}, z.core.$strip>>;
|
|
1937
1983
|
label: z.ZodOptional<z.ZodString>;
|
|
1938
1984
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
1985
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
1939
1986
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
1940
1987
|
costUsd: z.ZodNumber;
|
|
1941
1988
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -2012,6 +2059,19 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2012
2059
|
kind: z.ZodLiteral<"compaction">;
|
|
2013
2060
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
2014
2061
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
2062
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2063
|
+
id: z.ZodString;
|
|
2064
|
+
createdAt: z.ZodNumber;
|
|
2065
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
2066
|
+
kind: z.ZodLiteral<"secret">;
|
|
2067
|
+
label: z.ZodString;
|
|
2068
|
+
outcome: z.ZodEnum<{
|
|
2069
|
+
cancelled: "cancelled";
|
|
2070
|
+
declined: "declined";
|
|
2071
|
+
saved: "saved";
|
|
2072
|
+
"timed-out": "timed-out";
|
|
2073
|
+
}>;
|
|
2074
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2015
2075
|
}, z.core.$strip>], "kind">;
|
|
2016
2076
|
historyIndex: z.ZodOptional<z.ZodNumber>;
|
|
2017
2077
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2628,6 +2688,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2628
2688
|
error: "error";
|
|
2629
2689
|
running: "running";
|
|
2630
2690
|
}>;
|
|
2691
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
2631
2692
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
2632
2693
|
progress: z.ZodOptional<z.ZodObject<{
|
|
2633
2694
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -2781,6 +2842,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2781
2842
|
}, z.core.$strip>>;
|
|
2782
2843
|
label: z.ZodOptional<z.ZodString>;
|
|
2783
2844
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
2845
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
2784
2846
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
2785
2847
|
costUsd: z.ZodNumber;
|
|
2786
2848
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -2857,6 +2919,19 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2857
2919
|
kind: z.ZodLiteral<"compaction">;
|
|
2858
2920
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
2859
2921
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
2922
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2923
|
+
id: z.ZodString;
|
|
2924
|
+
createdAt: z.ZodNumber;
|
|
2925
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
2926
|
+
kind: z.ZodLiteral<"secret">;
|
|
2927
|
+
label: z.ZodString;
|
|
2928
|
+
outcome: z.ZodEnum<{
|
|
2929
|
+
cancelled: "cancelled";
|
|
2930
|
+
declined: "declined";
|
|
2931
|
+
saved: "saved";
|
|
2932
|
+
"timed-out": "timed-out";
|
|
2933
|
+
}>;
|
|
2934
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2860
2935
|
}, z.core.$strip>], "kind">>;
|
|
2861
2936
|
}, z.core.$strip>], "type">>>;
|
|
2862
2937
|
bookmarks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -2931,6 +3006,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2931
3006
|
error: "error";
|
|
2932
3007
|
running: "running";
|
|
2933
3008
|
}>;
|
|
3009
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
2934
3010
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
2935
3011
|
progress: z.ZodOptional<z.ZodObject<{
|
|
2936
3012
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -3154,6 +3230,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
3154
3230
|
error: "error";
|
|
3155
3231
|
running: "running";
|
|
3156
3232
|
}>;
|
|
3233
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
3157
3234
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
3158
3235
|
progress: z.ZodOptional<z.ZodObject<{
|
|
3159
3236
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -3307,6 +3384,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
3307
3384
|
}, z.core.$strip>>;
|
|
3308
3385
|
label: z.ZodOptional<z.ZodString>;
|
|
3309
3386
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
3387
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
3310
3388
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
3311
3389
|
costUsd: z.ZodNumber;
|
|
3312
3390
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -3383,6 +3461,19 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
3383
3461
|
kind: z.ZodLiteral<"compaction">;
|
|
3384
3462
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
3385
3463
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
3464
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3465
|
+
id: z.ZodString;
|
|
3466
|
+
createdAt: z.ZodNumber;
|
|
3467
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
3468
|
+
kind: z.ZodLiteral<"secret">;
|
|
3469
|
+
label: z.ZodString;
|
|
3470
|
+
outcome: z.ZodEnum<{
|
|
3471
|
+
cancelled: "cancelled";
|
|
3472
|
+
declined: "declined";
|
|
3473
|
+
saved: "saved";
|
|
3474
|
+
"timed-out": "timed-out";
|
|
3475
|
+
}>;
|
|
3476
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3386
3477
|
}, z.core.$strip>], "kind">>>;
|
|
3387
3478
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
3388
3479
|
}, z.core.$strip>;
|
|
@@ -4450,6 +4541,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
4450
4541
|
error: "error";
|
|
4451
4542
|
running: "running";
|
|
4452
4543
|
}>;
|
|
4544
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
4453
4545
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
4454
4546
|
progress: z.ZodOptional<z.ZodObject<{
|
|
4455
4547
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -4603,6 +4695,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
4603
4695
|
}, z.core.$strip>>;
|
|
4604
4696
|
label: z.ZodOptional<z.ZodString>;
|
|
4605
4697
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
4698
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
4606
4699
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
4607
4700
|
costUsd: z.ZodNumber;
|
|
4608
4701
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -4679,6 +4772,19 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
4679
4772
|
kind: z.ZodLiteral<"compaction">;
|
|
4680
4773
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
4681
4774
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
4775
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4776
|
+
id: z.ZodString;
|
|
4777
|
+
createdAt: z.ZodNumber;
|
|
4778
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
4779
|
+
kind: z.ZodLiteral<"secret">;
|
|
4780
|
+
label: z.ZodString;
|
|
4781
|
+
outcome: z.ZodEnum<{
|
|
4782
|
+
cancelled: "cancelled";
|
|
4783
|
+
declined: "declined";
|
|
4784
|
+
saved: "saved";
|
|
4785
|
+
"timed-out": "timed-out";
|
|
4786
|
+
}>;
|
|
4787
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4682
4788
|
}, z.core.$strip>], "kind">>;
|
|
4683
4789
|
history: z.ZodObject<{
|
|
4684
4790
|
start: z.ZodOptional<z.ZodNumber>;
|
|
@@ -5277,6 +5383,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
5277
5383
|
slot: z.ZodString;
|
|
5278
5384
|
provider: z.ZodEnum<{
|
|
5279
5385
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
5386
|
+
antigravity: "antigravity";
|
|
5280
5387
|
claude: "claude";
|
|
5281
5388
|
codex: "codex";
|
|
5282
5389
|
copilot: "copilot";
|
|
@@ -5301,6 +5408,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
5301
5408
|
models: z.ZodArray<z.ZodObject<{
|
|
5302
5409
|
provider: z.ZodEnum<{
|
|
5303
5410
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
5411
|
+
antigravity: "antigravity";
|
|
5304
5412
|
claude: "claude";
|
|
5305
5413
|
codex: "codex";
|
|
5306
5414
|
copilot: "copilot";
|
|
@@ -5333,6 +5441,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
5333
5441
|
projectId: z.ZodNullable<z.ZodString>;
|
|
5334
5442
|
byProvider: z.ZodRecord<z.ZodEnum<{
|
|
5335
5443
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
5444
|
+
antigravity: "antigravity";
|
|
5336
5445
|
claude: "claude";
|
|
5337
5446
|
codex: "codex";
|
|
5338
5447
|
copilot: "copilot";
|
|
@@ -5380,6 +5489,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
5380
5489
|
roots: z.ZodArray<z.ZodObject<{
|
|
5381
5490
|
provider: z.ZodEnum<{
|
|
5382
5491
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
5492
|
+
antigravity: "antigravity";
|
|
5383
5493
|
claude: "claude";
|
|
5384
5494
|
codex: "codex";
|
|
5385
5495
|
copilot: "copilot";
|
|
@@ -5398,6 +5508,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
5398
5508
|
id: z.ZodString;
|
|
5399
5509
|
kind: z.ZodEnum<{
|
|
5400
5510
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
5511
|
+
antigravity: "antigravity";
|
|
5401
5512
|
claude: "claude";
|
|
5402
5513
|
codex: "codex";
|
|
5403
5514
|
copilot: "copilot";
|
|
@@ -5423,6 +5534,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
5423
5534
|
providers: z.ZodArray<z.ZodObject<{
|
|
5424
5535
|
kind: z.ZodEnum<{
|
|
5425
5536
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
5537
|
+
antigravity: "antigravity";
|
|
5426
5538
|
claude: "claude";
|
|
5427
5539
|
codex: "codex";
|
|
5428
5540
|
copilot: "copilot";
|
|
@@ -5473,6 +5585,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
5473
5585
|
providers: z.ZodArray<z.ZodObject<{
|
|
5474
5586
|
kind: z.ZodEnum<{
|
|
5475
5587
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
5588
|
+
antigravity: "antigravity";
|
|
5476
5589
|
claude: "claude";
|
|
5477
5590
|
codex: "codex";
|
|
5478
5591
|
copilot: "copilot";
|
|
@@ -5883,6 +5996,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
5883
5996
|
error: "error";
|
|
5884
5997
|
running: "running";
|
|
5885
5998
|
}>;
|
|
5999
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
5886
6000
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
5887
6001
|
progress: z.ZodOptional<z.ZodObject<{
|
|
5888
6002
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -6036,6 +6150,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
6036
6150
|
}, z.core.$strip>>;
|
|
6037
6151
|
label: z.ZodOptional<z.ZodString>;
|
|
6038
6152
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
6153
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
6039
6154
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
6040
6155
|
costUsd: z.ZodNumber;
|
|
6041
6156
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -6112,6 +6227,19 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
6112
6227
|
kind: z.ZodLiteral<"compaction">;
|
|
6113
6228
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
6114
6229
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
6230
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6231
|
+
id: z.ZodString;
|
|
6232
|
+
createdAt: z.ZodNumber;
|
|
6233
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
6234
|
+
kind: z.ZodLiteral<"secret">;
|
|
6235
|
+
label: z.ZodString;
|
|
6236
|
+
outcome: z.ZodEnum<{
|
|
6237
|
+
cancelled: "cancelled";
|
|
6238
|
+
declined: "declined";
|
|
6239
|
+
saved: "saved";
|
|
6240
|
+
"timed-out": "timed-out";
|
|
6241
|
+
}>;
|
|
6242
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6115
6243
|
}, z.core.$strip>], "kind">;
|
|
6116
6244
|
historyIndex: z.ZodOptional<z.ZodNumber>;
|
|
6117
6245
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -6728,6 +6856,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
6728
6856
|
error: "error";
|
|
6729
6857
|
running: "running";
|
|
6730
6858
|
}>;
|
|
6859
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
6731
6860
|
parentToolUseId: z.ZodNullable<z.ZodString>;
|
|
6732
6861
|
progress: z.ZodOptional<z.ZodObject<{
|
|
6733
6862
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -6881,6 +7010,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
6881
7010
|
}, z.core.$strip>>;
|
|
6882
7011
|
label: z.ZodOptional<z.ZodString>;
|
|
6883
7012
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
7013
|
+
wakeup: z.ZodOptional<z.ZodBoolean>;
|
|
6884
7014
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
6885
7015
|
costUsd: z.ZodNumber;
|
|
6886
7016
|
checkpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -6957,6 +7087,19 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
6957
7087
|
kind: z.ZodLiteral<"compaction">;
|
|
6958
7088
|
preTokens: z.ZodNullable<z.ZodNumber>;
|
|
6959
7089
|
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
7090
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7091
|
+
id: z.ZodString;
|
|
7092
|
+
createdAt: z.ZodNumber;
|
|
7093
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
7094
|
+
kind: z.ZodLiteral<"secret">;
|
|
7095
|
+
label: z.ZodString;
|
|
7096
|
+
outcome: z.ZodEnum<{
|
|
7097
|
+
cancelled: "cancelled";
|
|
7098
|
+
declined: "declined";
|
|
7099
|
+
saved: "saved";
|
|
7100
|
+
"timed-out": "timed-out";
|
|
7101
|
+
}>;
|
|
7102
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6960
7103
|
}, z.core.$strip>], "kind">>;
|
|
6961
7104
|
}, z.core.$strip>], "type">;
|
|
6962
7105
|
seq: z.ZodOptional<z.ZodNumber>;
|
|
@@ -7171,6 +7314,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
7171
7314
|
providers: z.ZodArray<z.ZodObject<{
|
|
7172
7315
|
kind: z.ZodEnum<{
|
|
7173
7316
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
7317
|
+
antigravity: "antigravity";
|
|
7174
7318
|
claude: "claude";
|
|
7175
7319
|
codex: "codex";
|
|
7176
7320
|
copilot: "copilot";
|
package/dist/usage.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const UsageProviderSchema: z.ZodEnum<{
|
|
3
3
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
4
|
+
antigravity: "antigravity";
|
|
4
5
|
claude: "claude";
|
|
5
6
|
codex: "codex";
|
|
6
7
|
copilot: "copilot";
|
|
@@ -8,7 +9,7 @@ export declare const UsageProviderSchema: z.ZodEnum<{
|
|
|
8
9
|
nanogpt: "nanogpt";
|
|
9
10
|
}>;
|
|
10
11
|
export type UsageProvider = z.infer<typeof UsageProviderSchema>;
|
|
11
|
-
export declare const USAGE_PROVIDERS: ("anthropic-claude-api" | "claude" | "codex" | "copilot" | "grok" | "nanogpt")[];
|
|
12
|
+
export declare const USAGE_PROVIDERS: ("anthropic-claude-api" | "antigravity" | "claude" | "codex" | "copilot" | "grok" | "nanogpt")[];
|
|
12
13
|
export declare const UsageResolutionSchema: z.ZodEnum<{
|
|
13
14
|
day: "day";
|
|
14
15
|
hour: "hour";
|
|
@@ -31,6 +32,7 @@ export declare const UsageAccountSchema: z.ZodObject<{
|
|
|
31
32
|
id: z.ZodString;
|
|
32
33
|
kind: z.ZodEnum<{
|
|
33
34
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
35
|
+
antigravity: "antigravity";
|
|
34
36
|
claude: "claude";
|
|
35
37
|
codex: "codex";
|
|
36
38
|
copilot: "copilot";
|
|
@@ -45,6 +47,7 @@ export declare const UsageBucketSchema: z.ZodObject<{
|
|
|
45
47
|
slot: z.ZodString;
|
|
46
48
|
provider: z.ZodEnum<{
|
|
47
49
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
50
|
+
antigravity: "antigravity";
|
|
48
51
|
claude: "claude";
|
|
49
52
|
codex: "codex";
|
|
50
53
|
copilot: "copilot";
|
|
@@ -77,6 +80,7 @@ export type UsagePriceBasis = z.infer<typeof UsagePriceBasisSchema>;
|
|
|
77
80
|
export declare const UsageModelSchema: z.ZodObject<{
|
|
78
81
|
provider: z.ZodEnum<{
|
|
79
82
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
83
|
+
antigravity: "antigravity";
|
|
80
84
|
claude: "claude";
|
|
81
85
|
codex: "codex";
|
|
82
86
|
copilot: "copilot";
|
|
@@ -110,6 +114,7 @@ export declare const UsageProjectSchema: z.ZodObject<{
|
|
|
110
114
|
projectId: z.ZodNullable<z.ZodString>;
|
|
111
115
|
byProvider: z.ZodRecord<z.ZodEnum<{
|
|
112
116
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
117
|
+
antigravity: "antigravity";
|
|
113
118
|
claude: "claude";
|
|
114
119
|
codex: "codex";
|
|
115
120
|
copilot: "copilot";
|
|
@@ -164,6 +169,7 @@ export type UsagePricing = z.infer<typeof UsagePricingSchema>;
|
|
|
164
169
|
export declare const UsageRootSchema: z.ZodObject<{
|
|
165
170
|
provider: z.ZodEnum<{
|
|
166
171
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
172
|
+
antigravity: "antigravity";
|
|
167
173
|
claude: "claude";
|
|
168
174
|
codex: "codex";
|
|
169
175
|
copilot: "copilot";
|
|
@@ -198,6 +204,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
|
|
|
198
204
|
slot: z.ZodString;
|
|
199
205
|
provider: z.ZodEnum<{
|
|
200
206
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
207
|
+
antigravity: "antigravity";
|
|
201
208
|
claude: "claude";
|
|
202
209
|
codex: "codex";
|
|
203
210
|
copilot: "copilot";
|
|
@@ -222,6 +229,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
|
|
|
222
229
|
models: z.ZodArray<z.ZodObject<{
|
|
223
230
|
provider: z.ZodEnum<{
|
|
224
231
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
232
|
+
antigravity: "antigravity";
|
|
225
233
|
claude: "claude";
|
|
226
234
|
codex: "codex";
|
|
227
235
|
copilot: "copilot";
|
|
@@ -254,6 +262,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
|
|
|
254
262
|
projectId: z.ZodNullable<z.ZodString>;
|
|
255
263
|
byProvider: z.ZodRecord<z.ZodEnum<{
|
|
256
264
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
265
|
+
antigravity: "antigravity";
|
|
257
266
|
claude: "claude";
|
|
258
267
|
codex: "codex";
|
|
259
268
|
copilot: "copilot";
|
|
@@ -301,6 +310,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
|
|
|
301
310
|
roots: z.ZodArray<z.ZodObject<{
|
|
302
311
|
provider: z.ZodEnum<{
|
|
303
312
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
313
|
+
antigravity: "antigravity";
|
|
304
314
|
claude: "claude";
|
|
305
315
|
codex: "codex";
|
|
306
316
|
copilot: "copilot";
|
|
@@ -319,6 +329,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
|
|
|
319
329
|
id: z.ZodString;
|
|
320
330
|
kind: z.ZodEnum<{
|
|
321
331
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
332
|
+
antigravity: "antigravity";
|
|
322
333
|
claude: "claude";
|
|
323
334
|
codex: "codex";
|
|
324
335
|
copilot: "copilot";
|
|
@@ -357,6 +368,7 @@ export declare function evenPace(window: UsageWindow, now: number): EvenPace | n
|
|
|
357
368
|
export declare const UsageLimitsProviderSchema: z.ZodObject<{
|
|
358
369
|
kind: z.ZodEnum<{
|
|
359
370
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
371
|
+
antigravity: "antigravity";
|
|
360
372
|
claude: "claude";
|
|
361
373
|
codex: "codex";
|
|
362
374
|
copilot: "copilot";
|
|
@@ -404,6 +416,7 @@ export declare const UsageLimitsSnapshotSchema: z.ZodObject<{
|
|
|
404
416
|
providers: z.ZodArray<z.ZodObject<{
|
|
405
417
|
kind: z.ZodEnum<{
|
|
406
418
|
"anthropic-claude-api": "anthropic-claude-api";
|
|
419
|
+
antigravity: "antigravity";
|
|
407
420
|
claude: "claude";
|
|
408
421
|
codex: "codex";
|
|
409
422
|
copilot: "copilot";
|
package/dist/usage.js
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { ProviderAccountIdSchema } from './provider-accounts.js';
|
|
3
3
|
import { openValues } from './wire-stamps.js';
|
|
4
4
|
/* The providers whose usage the daemon reads: the CLIs' own records, and the log a host keeps of what it calls itself. A subset of `AgentKindSchema`: it grows with the readers. */
|
|
5
|
-
export const UsageProviderSchema = openValues(z.enum(['claude', 'codex', 'nanogpt', 'grok', 'copilot', 'anthropic-claude-api']), 'UsageProvider', {
|
|
5
|
+
export const UsageProviderSchema = openValues(z.enum(['claude', 'codex', 'nanogpt', 'grok', 'copilot', 'anthropic-claude-api', 'antigravity']), 'UsageProvider', {
|
|
6
6
|
words: 'strings'
|
|
7
7
|
});
|
|
8
8
|
export const USAGE_PROVIDERS = UsageProviderSchema.options;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/agent-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.70.1",
|
|
4
4
|
"description": "Schemas and port contracts for agent chats, provider accounts, models and usage.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"test": "bun --conditions=source test"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@adecore/intelligent-ui": "0.
|
|
90
|
-
"@adecore/utils": "0.
|
|
89
|
+
"@adecore/intelligent-ui": "0.70.1",
|
|
90
|
+
"@adecore/utils": "0.70.1",
|
|
91
91
|
"zod": "^4.6.7"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
package/src/chat.ts
CHANGED
|
@@ -168,6 +168,24 @@ export const ChatBackgroundTaskSchema = z.object({
|
|
|
168
168
|
});
|
|
169
169
|
export type ChatBackgroundTask = z.infer<typeof ChatBackgroundTaskSchema>;
|
|
170
170
|
|
|
171
|
+
const SCHEDULED_WAKEUP_ID = /^wakeup-(\d+)-./;
|
|
172
|
+
|
|
173
|
+
/*
|
|
174
|
+
* A wakeup the CLI scheduled for itself, which starts a turn of its own at `scheduledFor`, is a monitor in the
|
|
175
|
+
* chat's background work. Its time rides in the id, so a client that does not know wakeups still draws a
|
|
176
|
+
* row with a stop, and the wire keeps its shape.
|
|
177
|
+
*/
|
|
178
|
+
export function scheduledWakeupId(ref: string, scheduledFor: number): string {
|
|
179
|
+
return `wakeup-${Math.round(scheduledFor)}-${ref}`;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* When a background task that is a scheduled wakeup fires; null for any other task. */
|
|
183
|
+
export function scheduledWakeupAt(task: Pick<ChatBackgroundTask, 'id'>): number | null {
|
|
184
|
+
const match = SCHEDULED_WAKEUP_ID.exec(task.id);
|
|
185
|
+
|
|
186
|
+
return match === null ? null : Number(match[1]);
|
|
187
|
+
}
|
|
188
|
+
|
|
171
189
|
/*
|
|
172
190
|
* Why a turn stopped short, when its CLI said so in its own stream: the plan's usage limit, or a model
|
|
173
191
|
* too busy to answer. Not a state of its own, since a client that validates `state` knows four.
|
|
@@ -576,6 +594,8 @@ export const ChatToolItemSchema = z.object({
|
|
|
576
594
|
input: z.unknown(),
|
|
577
595
|
output: z.string().nullable(),
|
|
578
596
|
state: ChatToolStateSchema,
|
|
597
|
+
// Set on a call in `error` that ended because a person stopped it, not because it failed.
|
|
598
|
+
stopped: z.boolean().optional(),
|
|
579
599
|
// Set for a tool call made by a subagent, with the id of the Task call that spawned it.
|
|
580
600
|
parentToolUseId: z.string().nullable(),
|
|
581
601
|
progress: ChatToolProgressSchema.optional(),
|
|
@@ -708,6 +728,8 @@ export const ChatTurnItemSchema = z.object({
|
|
|
708
728
|
label: z.string().optional(),
|
|
709
729
|
// The Agent call the CLI woke up about, so the header can point at the subagent row it belongs to.
|
|
710
730
|
taskToolUseId: z.string().optional(),
|
|
731
|
+
// Set on an agent turn a wakeup the agent scheduled for itself started.
|
|
732
|
+
wakeup: z.boolean().optional(),
|
|
711
733
|
endedAt: z.number().nullable(),
|
|
712
734
|
costUsd: z.number().nonnegative(),
|
|
713
735
|
// The git tree of the chat's folder when the turn started; absent outside a repository.
|
|
@@ -803,10 +825,20 @@ export const ChatCompactionItemSchema = z.object({
|
|
|
803
825
|
postTokens: z.number().int().nonnegative().optional()
|
|
804
826
|
});
|
|
805
827
|
|
|
828
|
+
export const ChatSecretItemSchema = z.object({
|
|
829
|
+
...base,
|
|
830
|
+
kind: z.literal('secret'),
|
|
831
|
+
// What the person was asked for; the value they gave never appears in the thread.
|
|
832
|
+
label: z.string(),
|
|
833
|
+
outcome: z.enum(['saved', 'declined', 'timed-out', 'cancelled']),
|
|
834
|
+
// The names of the values when one request asked for several.
|
|
835
|
+
fields: z.array(z.string()).optional()
|
|
836
|
+
});
|
|
837
|
+
|
|
806
838
|
/*
|
|
807
|
-
*
|
|
808
|
-
*
|
|
809
|
-
*
|
|
839
|
+
* An open union: a client that reads tolerantly keeps a member it does not know as an unknown item in its place, so a
|
|
840
|
+
* new member is fine. A new value in an enum of an existing member that no `openValues` stamps turns that whole item
|
|
841
|
+
* unknown to such a client, so add an optional field instead.
|
|
810
842
|
*/
|
|
811
843
|
export const ChatItemSchema = openUnion(
|
|
812
844
|
z.discriminatedUnion('kind', [
|
|
@@ -819,7 +851,8 @@ export const ChatItemSchema = openUnion(
|
|
|
819
851
|
ChatQuestionItemSchema,
|
|
820
852
|
ChatTurnItemSchema,
|
|
821
853
|
ChatNoteItemSchema,
|
|
822
|
-
ChatCompactionItemSchema
|
|
854
|
+
ChatCompactionItemSchema,
|
|
855
|
+
ChatSecretItemSchema
|
|
823
856
|
]),
|
|
824
857
|
'ChatItem',
|
|
825
858
|
{ tag: 'kind', base: ['id', 'createdAt', 'turnId'] }
|
|
@@ -848,6 +881,7 @@ export type ChatTurnItem = z.infer<typeof ChatTurnItemSchema>;
|
|
|
848
881
|
export type ChatNoteItem = z.infer<typeof ChatNoteItemSchema>;
|
|
849
882
|
export type ChatNoteMessage = z.infer<typeof ChatNoteMessageSchema>;
|
|
850
883
|
export type ChatCompactionItem = z.infer<typeof ChatCompactionItemSchema>;
|
|
884
|
+
export type ChatSecretItem = z.infer<typeof ChatSecretItemSchema>;
|
|
851
885
|
|
|
852
886
|
// An item as a host holds it or as a client reads it, where a newer host's item may be unknown or carry a newer word.
|
|
853
887
|
type ThreadItem = { readonly kind: string; readonly createdAt: number };
|
package/src/index.ts
CHANGED
|
@@ -55,6 +55,8 @@ export {
|
|
|
55
55
|
type ChatQueuedMessage,
|
|
56
56
|
ChatBackgroundTaskSchema,
|
|
57
57
|
type ChatBackgroundTask,
|
|
58
|
+
scheduledWakeupId,
|
|
59
|
+
scheduledWakeupAt,
|
|
58
60
|
ChatTurnLimitSchema,
|
|
59
61
|
type ChatTurnLimit,
|
|
60
62
|
ChatGoalStatusSchema,
|
|
@@ -139,6 +141,7 @@ export {
|
|
|
139
141
|
ChatNoteItemSchema,
|
|
140
142
|
ChatNoteMessageSchema,
|
|
141
143
|
ChatCompactionItemSchema,
|
|
144
|
+
ChatSecretItemSchema,
|
|
142
145
|
ChatItemSchema,
|
|
143
146
|
type ChatItem,
|
|
144
147
|
type ChatUserItem,
|
|
@@ -152,6 +155,7 @@ export {
|
|
|
152
155
|
type ChatNoteItem,
|
|
153
156
|
type ChatNoteMessage,
|
|
154
157
|
type ChatCompactionItem,
|
|
158
|
+
type ChatSecretItem,
|
|
155
159
|
type ChatUnknownItem,
|
|
156
160
|
ChatEventSchema,
|
|
157
161
|
type ChatEvent,
|
package/src/usage.ts
CHANGED
|
@@ -3,9 +3,13 @@ import { ProviderAccountIdSchema } from './provider-accounts.ts';
|
|
|
3
3
|
import { openValues } from './wire-stamps.ts';
|
|
4
4
|
|
|
5
5
|
/* The providers whose usage the daemon reads: the CLIs' own records, and the log a host keeps of what it calls itself. A subset of `AgentKindSchema`: it grows with the readers. */
|
|
6
|
-
export const UsageProviderSchema = openValues(
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export const UsageProviderSchema = openValues(
|
|
7
|
+
z.enum(['claude', 'codex', 'nanogpt', 'grok', 'copilot', 'anthropic-claude-api', 'antigravity']),
|
|
8
|
+
'UsageProvider',
|
|
9
|
+
{
|
|
10
|
+
words: 'strings'
|
|
11
|
+
}
|
|
12
|
+
);
|
|
9
13
|
export type UsageProvider = z.infer<typeof UsageProviderSchema>;
|
|
10
14
|
|
|
11
15
|
export const USAGE_PROVIDERS = UsageProviderSchema.options;
|