@opencode-ai/sdk 0.0.0-next-15090 → 0.0.0-next-15092
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/v2/client.d.ts +3 -0
- package/dist/v2/gen/types.gen.d.ts +479 -476
- package/package.json +1 -1
|
@@ -47,13 +47,6 @@ export type MoveSessionError = {
|
|
|
47
47
|
message: string;
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
|
-
export type SnapshotFileDiff = {
|
|
51
|
-
file?: string;
|
|
52
|
-
patch?: string;
|
|
53
|
-
additions: number;
|
|
54
|
-
deletions: number;
|
|
55
|
-
status?: "added" | "deleted" | "modified";
|
|
56
|
-
};
|
|
57
50
|
export type PermissionAction = "allow" | "deny" | "ask";
|
|
58
51
|
export type PermissionRule = {
|
|
59
52
|
permission: string;
|
|
@@ -61,58 +54,6 @@ export type PermissionRule = {
|
|
|
61
54
|
action: PermissionAction;
|
|
62
55
|
};
|
|
63
56
|
export type PermissionRuleset = Array<PermissionRule>;
|
|
64
|
-
export type Session = {
|
|
65
|
-
id: string;
|
|
66
|
-
slug: string;
|
|
67
|
-
projectID: string;
|
|
68
|
-
workspaceID?: string;
|
|
69
|
-
directory: string;
|
|
70
|
-
path?: string;
|
|
71
|
-
parentID?: string;
|
|
72
|
-
summary?: {
|
|
73
|
-
additions: number;
|
|
74
|
-
deletions: number;
|
|
75
|
-
files: number;
|
|
76
|
-
diffs?: Array<SnapshotFileDiff>;
|
|
77
|
-
};
|
|
78
|
-
cost?: number;
|
|
79
|
-
tokens?: {
|
|
80
|
-
input: number;
|
|
81
|
-
output: number;
|
|
82
|
-
reasoning: number;
|
|
83
|
-
cache: {
|
|
84
|
-
read: number;
|
|
85
|
-
write: number;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
share?: {
|
|
89
|
-
url: string;
|
|
90
|
-
};
|
|
91
|
-
title: string;
|
|
92
|
-
agent?: string;
|
|
93
|
-
model?: {
|
|
94
|
-
id: string;
|
|
95
|
-
providerID: string;
|
|
96
|
-
variant?: string;
|
|
97
|
-
};
|
|
98
|
-
version: string;
|
|
99
|
-
metadata?: {
|
|
100
|
-
[key: string]: unknown;
|
|
101
|
-
};
|
|
102
|
-
time: {
|
|
103
|
-
created: number;
|
|
104
|
-
updated: number;
|
|
105
|
-
compacting?: number;
|
|
106
|
-
archived?: number;
|
|
107
|
-
};
|
|
108
|
-
permission?: PermissionRuleset;
|
|
109
|
-
revert?: {
|
|
110
|
-
messageID: string;
|
|
111
|
-
partID?: string;
|
|
112
|
-
snapshot?: string;
|
|
113
|
-
diff?: string;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
57
|
export type OutputFormatText = {
|
|
117
58
|
type: "text";
|
|
118
59
|
};
|
|
@@ -136,7 +77,7 @@ export type UserMessage = {
|
|
|
136
77
|
summary?: {
|
|
137
78
|
title?: string;
|
|
138
79
|
body?: string;
|
|
139
|
-
diffs: Array<
|
|
80
|
+
diffs: Array<FileDiffLegacyInfo>;
|
|
140
81
|
};
|
|
141
82
|
agent: string;
|
|
142
83
|
model: {
|
|
@@ -606,14 +547,14 @@ export type GlobalEvent = {
|
|
|
606
547
|
type: "session.created";
|
|
607
548
|
properties: {
|
|
608
549
|
sessionID: string;
|
|
609
|
-
info:
|
|
550
|
+
info: SessionV1Info;
|
|
610
551
|
};
|
|
611
552
|
} | {
|
|
612
553
|
id: string;
|
|
613
554
|
type: "session.updated";
|
|
614
555
|
properties: {
|
|
615
556
|
sessionID: string;
|
|
616
|
-
info:
|
|
557
|
+
info: SessionV1Info;
|
|
617
558
|
};
|
|
618
559
|
} | {
|
|
619
560
|
id: string;
|
|
@@ -685,16 +626,8 @@ export type GlobalEvent = {
|
|
|
685
626
|
type: "session.usage.updated";
|
|
686
627
|
properties: {
|
|
687
628
|
sessionID: string;
|
|
688
|
-
cost:
|
|
689
|
-
tokens:
|
|
690
|
-
input: number;
|
|
691
|
-
output: number;
|
|
692
|
-
reasoning: number;
|
|
693
|
-
cache: {
|
|
694
|
-
read: number;
|
|
695
|
-
write: number;
|
|
696
|
-
};
|
|
697
|
-
};
|
|
629
|
+
cost: MoneyUsd;
|
|
630
|
+
tokens: TokenUsageInfo;
|
|
698
631
|
};
|
|
699
632
|
} | {
|
|
700
633
|
id: string;
|
|
@@ -769,6 +702,7 @@ export type GlobalEvent = {
|
|
|
769
702
|
type: "session.skill.activated";
|
|
770
703
|
properties: {
|
|
771
704
|
sessionID: string;
|
|
705
|
+
id: string;
|
|
772
706
|
name: string;
|
|
773
707
|
text: string;
|
|
774
708
|
};
|
|
@@ -809,16 +743,8 @@ export type GlobalEvent = {
|
|
|
809
743
|
sessionID: string;
|
|
810
744
|
assistantMessageID: string;
|
|
811
745
|
finish: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
|
|
812
|
-
cost:
|
|
813
|
-
tokens:
|
|
814
|
-
input: number;
|
|
815
|
-
output: number;
|
|
816
|
-
reasoning: number;
|
|
817
|
-
cache: {
|
|
818
|
-
read: number;
|
|
819
|
-
write: number;
|
|
820
|
-
};
|
|
821
|
-
};
|
|
746
|
+
cost: MoneyUsd;
|
|
747
|
+
tokens: TokenUsageInfo;
|
|
822
748
|
snapshot?: string;
|
|
823
749
|
files?: Array<string>;
|
|
824
750
|
};
|
|
@@ -829,16 +755,8 @@ export type GlobalEvent = {
|
|
|
829
755
|
sessionID: string;
|
|
830
756
|
assistantMessageID: string;
|
|
831
757
|
error: SessionStructuredError;
|
|
832
|
-
cost?:
|
|
833
|
-
tokens?:
|
|
834
|
-
input: number;
|
|
835
|
-
output: number;
|
|
836
|
-
reasoning: number;
|
|
837
|
-
cache: {
|
|
838
|
-
read: number;
|
|
839
|
-
write: number;
|
|
840
|
-
};
|
|
841
|
-
};
|
|
758
|
+
cost?: MoneyUsd;
|
|
759
|
+
tokens?: TokenUsageInfo;
|
|
842
760
|
};
|
|
843
761
|
} | {
|
|
844
762
|
id: string;
|
|
@@ -957,7 +875,6 @@ export type GlobalEvent = {
|
|
|
957
875
|
[key: string]: unknown;
|
|
958
876
|
};
|
|
959
877
|
content: Array<LlmToolContent>;
|
|
960
|
-
outputPaths?: Array<string>;
|
|
961
878
|
result?: unknown;
|
|
962
879
|
executed: boolean;
|
|
963
880
|
resultState?: SessionMessageProviderState;
|
|
@@ -997,6 +914,8 @@ export type GlobalEvent = {
|
|
|
997
914
|
properties: {
|
|
998
915
|
sessionID: string;
|
|
999
916
|
reason: "auto" | "manual";
|
|
917
|
+
recent: string;
|
|
918
|
+
inputID?: string;
|
|
1000
919
|
};
|
|
1001
920
|
} | {
|
|
1002
921
|
id: string;
|
|
@@ -1019,13 +938,16 @@ export type GlobalEvent = {
|
|
|
1019
938
|
type: "session.compaction.failed";
|
|
1020
939
|
properties: {
|
|
1021
940
|
sessionID: string;
|
|
941
|
+
reason: "auto" | "manual";
|
|
942
|
+
error: SessionStructuredError;
|
|
943
|
+
inputID?: string;
|
|
1022
944
|
};
|
|
1023
945
|
} | {
|
|
1024
946
|
id: string;
|
|
1025
947
|
type: "session.revert.staged";
|
|
1026
948
|
properties: {
|
|
1027
949
|
sessionID: string;
|
|
1028
|
-
revert:
|
|
950
|
+
revert: SessionRevert;
|
|
1029
951
|
};
|
|
1030
952
|
} | {
|
|
1031
953
|
id: string;
|
|
@@ -1055,7 +977,7 @@ export type GlobalEvent = {
|
|
|
1055
977
|
type: "session.diff";
|
|
1056
978
|
properties: {
|
|
1057
979
|
sessionID: string;
|
|
1058
|
-
diff: Array<
|
|
980
|
+
diff: Array<FileDiffLegacyInfo>;
|
|
1059
981
|
};
|
|
1060
982
|
} | {
|
|
1061
983
|
id: string;
|
|
@@ -1938,7 +1860,7 @@ export type GlobalSession = {
|
|
|
1938
1860
|
additions: number;
|
|
1939
1861
|
deletions: number;
|
|
1940
1862
|
files: number;
|
|
1941
|
-
diffs?: Array<
|
|
1863
|
+
diffs?: Array<FileDiffLegacyInfo>;
|
|
1942
1864
|
};
|
|
1943
1865
|
cost?: number;
|
|
1944
1866
|
tokens?: {
|
|
@@ -2227,6 +2149,58 @@ export type ProviderAuthError1 = {
|
|
|
2227
2149
|
kind?: string;
|
|
2228
2150
|
};
|
|
2229
2151
|
};
|
|
2152
|
+
export type Session = {
|
|
2153
|
+
id: string;
|
|
2154
|
+
slug: string;
|
|
2155
|
+
projectID: string;
|
|
2156
|
+
workspaceID?: string;
|
|
2157
|
+
directory: string;
|
|
2158
|
+
path?: string;
|
|
2159
|
+
parentID?: string;
|
|
2160
|
+
summary?: {
|
|
2161
|
+
additions: number;
|
|
2162
|
+
deletions: number;
|
|
2163
|
+
files: number;
|
|
2164
|
+
diffs?: Array<FileDiffLegacyInfo>;
|
|
2165
|
+
};
|
|
2166
|
+
cost?: number;
|
|
2167
|
+
tokens?: {
|
|
2168
|
+
input: number;
|
|
2169
|
+
output: number;
|
|
2170
|
+
reasoning: number;
|
|
2171
|
+
cache: {
|
|
2172
|
+
read: number;
|
|
2173
|
+
write: number;
|
|
2174
|
+
};
|
|
2175
|
+
};
|
|
2176
|
+
share?: {
|
|
2177
|
+
url: string;
|
|
2178
|
+
};
|
|
2179
|
+
title: string;
|
|
2180
|
+
agent?: string;
|
|
2181
|
+
model?: {
|
|
2182
|
+
id: string;
|
|
2183
|
+
providerID: string;
|
|
2184
|
+
variant?: string;
|
|
2185
|
+
};
|
|
2186
|
+
version: string;
|
|
2187
|
+
metadata?: {
|
|
2188
|
+
[key: string]: unknown;
|
|
2189
|
+
};
|
|
2190
|
+
time: {
|
|
2191
|
+
created: number;
|
|
2192
|
+
updated: number;
|
|
2193
|
+
compacting?: number;
|
|
2194
|
+
archived?: number;
|
|
2195
|
+
};
|
|
2196
|
+
permission?: PermissionRuleset;
|
|
2197
|
+
revert?: {
|
|
2198
|
+
messageID: string;
|
|
2199
|
+
partID?: string;
|
|
2200
|
+
snapshot?: string;
|
|
2201
|
+
diff?: string;
|
|
2202
|
+
};
|
|
2203
|
+
};
|
|
2230
2204
|
export type NotFoundError = {
|
|
2231
2205
|
name: "NotFoundError";
|
|
2232
2206
|
data: {
|
|
@@ -2339,7 +2313,7 @@ export type UnauthorizedError = {
|
|
|
2339
2313
|
message: string;
|
|
2340
2314
|
};
|
|
2341
2315
|
export type SessionsResponse = {
|
|
2342
|
-
data: Array<
|
|
2316
|
+
data: Array<SessionInfo>;
|
|
2343
2317
|
cursor: {
|
|
2344
2318
|
previous?: string;
|
|
2345
2319
|
next?: string;
|
|
@@ -2415,11 +2389,10 @@ export type Shell1 = {
|
|
|
2415
2389
|
completed?: number | "NaN" | "Infinity" | "-Infinity";
|
|
2416
2390
|
};
|
|
2417
2391
|
};
|
|
2418
|
-
export type
|
|
2419
|
-
export type SessionLogItem = SessionDurableEvent | EventLogSynced;
|
|
2392
|
+
export type SessionLogItem = SessionEventDurable | EventLogSynced;
|
|
2420
2393
|
export type SessionLogItemStream = string;
|
|
2421
2394
|
export type SessionMessagesResponse = {
|
|
2422
|
-
data: Array<
|
|
2395
|
+
data: Array<SessionMessageInfo>;
|
|
2423
2396
|
cursor: {
|
|
2424
2397
|
previous?: string;
|
|
2425
2398
|
next?: string;
|
|
@@ -2591,10 +2564,69 @@ export type IntegrationRef = {
|
|
|
2591
2564
|
id: string;
|
|
2592
2565
|
name: string;
|
|
2593
2566
|
};
|
|
2594
|
-
export type
|
|
2567
|
+
export type SkillSource = SkillDirectorySource | SkillUrlSource | SkillEmbeddedSource;
|
|
2595
2568
|
export type MoveSessionDestination = {
|
|
2596
2569
|
directory: string;
|
|
2597
2570
|
};
|
|
2571
|
+
export type FileDiffLegacyInfo = {
|
|
2572
|
+
file?: string;
|
|
2573
|
+
patch?: string;
|
|
2574
|
+
additions: number;
|
|
2575
|
+
deletions: number;
|
|
2576
|
+
status?: "added" | "deleted" | "modified";
|
|
2577
|
+
};
|
|
2578
|
+
export type SessionV1Info = {
|
|
2579
|
+
id: string;
|
|
2580
|
+
slug: string;
|
|
2581
|
+
projectID: string;
|
|
2582
|
+
workspaceID?: string;
|
|
2583
|
+
directory: string;
|
|
2584
|
+
path?: string;
|
|
2585
|
+
parentID?: string;
|
|
2586
|
+
summary?: {
|
|
2587
|
+
additions: number;
|
|
2588
|
+
deletions: number;
|
|
2589
|
+
files: number;
|
|
2590
|
+
diffs?: Array<FileDiffLegacyInfo>;
|
|
2591
|
+
};
|
|
2592
|
+
cost?: number;
|
|
2593
|
+
tokens?: {
|
|
2594
|
+
input: number;
|
|
2595
|
+
output: number;
|
|
2596
|
+
reasoning: number;
|
|
2597
|
+
cache: {
|
|
2598
|
+
read: number;
|
|
2599
|
+
write: number;
|
|
2600
|
+
};
|
|
2601
|
+
};
|
|
2602
|
+
share?: {
|
|
2603
|
+
url: string;
|
|
2604
|
+
};
|
|
2605
|
+
title: string;
|
|
2606
|
+
agent?: string;
|
|
2607
|
+
model?: {
|
|
2608
|
+
id: string;
|
|
2609
|
+
providerID: string;
|
|
2610
|
+
variant?: string;
|
|
2611
|
+
};
|
|
2612
|
+
version: string;
|
|
2613
|
+
metadata?: {
|
|
2614
|
+
[key: string]: unknown;
|
|
2615
|
+
};
|
|
2616
|
+
time: {
|
|
2617
|
+
created: number;
|
|
2618
|
+
updated: number;
|
|
2619
|
+
compacting?: number;
|
|
2620
|
+
archived?: number;
|
|
2621
|
+
};
|
|
2622
|
+
permission?: PermissionRuleset;
|
|
2623
|
+
revert?: {
|
|
2624
|
+
messageID: string;
|
|
2625
|
+
partID?: string;
|
|
2626
|
+
snapshot?: string;
|
|
2627
|
+
diff?: string;
|
|
2628
|
+
};
|
|
2629
|
+
};
|
|
2598
2630
|
export type ModelRef = {
|
|
2599
2631
|
id: string;
|
|
2600
2632
|
providerID: string;
|
|
@@ -2604,6 +2636,16 @@ export type LocationRef = {
|
|
|
2604
2636
|
directory: string;
|
|
2605
2637
|
workspaceID?: string;
|
|
2606
2638
|
};
|
|
2639
|
+
export type MoneyUsd = number;
|
|
2640
|
+
export type TokenUsageInfo = {
|
|
2641
|
+
input: number;
|
|
2642
|
+
output: number;
|
|
2643
|
+
reasoning: number;
|
|
2644
|
+
cache: {
|
|
2645
|
+
read: number;
|
|
2646
|
+
write: number;
|
|
2647
|
+
};
|
|
2648
|
+
};
|
|
2607
2649
|
export type PromptBase64 = string;
|
|
2608
2650
|
export type PromptFileSource = {
|
|
2609
2651
|
type: "inline";
|
|
@@ -2646,19 +2688,18 @@ export type ToolFileContent = {
|
|
|
2646
2688
|
name?: string;
|
|
2647
2689
|
};
|
|
2648
2690
|
export type LlmToolContent = ToolTextContent | ToolFileContent;
|
|
2649
|
-
export type
|
|
2650
|
-
|
|
2651
|
-
|
|
2691
|
+
export type FileDiffInfo = {
|
|
2692
|
+
file: string;
|
|
2693
|
+
patch: string;
|
|
2652
2694
|
additions: number;
|
|
2653
2695
|
deletions: number;
|
|
2654
|
-
|
|
2696
|
+
status: "added" | "deleted" | "modified";
|
|
2655
2697
|
};
|
|
2656
|
-
export type
|
|
2698
|
+
export type SessionRevert = {
|
|
2657
2699
|
messageID: string;
|
|
2658
2700
|
partID?: string;
|
|
2659
2701
|
snapshot?: string;
|
|
2660
|
-
|
|
2661
|
-
files?: Array<FileDiff>;
|
|
2702
|
+
files?: Array<FileDiffInfo>;
|
|
2662
2703
|
};
|
|
2663
2704
|
export type PermissionV2Source = {
|
|
2664
2705
|
type: "tool";
|
|
@@ -2824,7 +2865,7 @@ export type SyncEventSessionCreated = {
|
|
|
2824
2865
|
aggregateID: string;
|
|
2825
2866
|
data: {
|
|
2826
2867
|
sessionID: string;
|
|
2827
|
-
info:
|
|
2868
|
+
info: SessionV1Info;
|
|
2828
2869
|
};
|
|
2829
2870
|
};
|
|
2830
2871
|
};
|
|
@@ -2838,7 +2879,7 @@ export type SyncEventSessionUpdated = {
|
|
|
2838
2879
|
aggregateID: string;
|
|
2839
2880
|
data: {
|
|
2840
2881
|
sessionID: string;
|
|
2841
|
-
info:
|
|
2882
|
+
info: SessionV1Info;
|
|
2842
2883
|
};
|
|
2843
2884
|
};
|
|
2844
2885
|
};
|
|
@@ -3111,6 +3152,7 @@ export type SyncEventSessionSkillActivated = {
|
|
|
3111
3152
|
aggregateID: string;
|
|
3112
3153
|
data: {
|
|
3113
3154
|
sessionID: string;
|
|
3155
|
+
id: string;
|
|
3114
3156
|
name: string;
|
|
3115
3157
|
text: string;
|
|
3116
3158
|
};
|
|
@@ -3179,16 +3221,8 @@ export type SyncEventSessionStepEnded = {
|
|
|
3179
3221
|
sessionID: string;
|
|
3180
3222
|
assistantMessageID: string;
|
|
3181
3223
|
finish: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
|
|
3182
|
-
cost:
|
|
3183
|
-
tokens:
|
|
3184
|
-
input: number;
|
|
3185
|
-
output: number;
|
|
3186
|
-
reasoning: number;
|
|
3187
|
-
cache: {
|
|
3188
|
-
read: number;
|
|
3189
|
-
write: number;
|
|
3190
|
-
};
|
|
3191
|
-
};
|
|
3224
|
+
cost: MoneyUsd;
|
|
3225
|
+
tokens: TokenUsageInfo;
|
|
3192
3226
|
snapshot?: string;
|
|
3193
3227
|
files?: Array<string>;
|
|
3194
3228
|
};
|
|
@@ -3206,16 +3240,8 @@ export type SyncEventSessionStepFailed = {
|
|
|
3206
3240
|
sessionID: string;
|
|
3207
3241
|
assistantMessageID: string;
|
|
3208
3242
|
error: SessionStructuredError;
|
|
3209
|
-
cost?:
|
|
3210
|
-
tokens?:
|
|
3211
|
-
input: number;
|
|
3212
|
-
output: number;
|
|
3213
|
-
reasoning: number;
|
|
3214
|
-
cache: {
|
|
3215
|
-
read: number;
|
|
3216
|
-
write: number;
|
|
3217
|
-
};
|
|
3218
|
-
};
|
|
3243
|
+
cost?: MoneyUsd;
|
|
3244
|
+
tokens?: TokenUsageInfo;
|
|
3219
3245
|
};
|
|
3220
3246
|
};
|
|
3221
3247
|
};
|
|
@@ -3370,7 +3396,6 @@ export type SyncEventSessionToolSuccess = {
|
|
|
3370
3396
|
[key: string]: unknown;
|
|
3371
3397
|
};
|
|
3372
3398
|
content: Array<LlmToolContent>;
|
|
3373
|
-
outputPaths?: Array<string>;
|
|
3374
3399
|
result?: unknown;
|
|
3375
3400
|
executed: boolean;
|
|
3376
3401
|
resultState?: SessionMessageProviderState;
|
|
@@ -3438,6 +3463,8 @@ export type SyncEventSessionCompactionStarted = {
|
|
|
3438
3463
|
data: {
|
|
3439
3464
|
sessionID: string;
|
|
3440
3465
|
reason: "auto" | "manual";
|
|
3466
|
+
recent: string;
|
|
3467
|
+
inputID?: string;
|
|
3441
3468
|
};
|
|
3442
3469
|
};
|
|
3443
3470
|
};
|
|
@@ -3467,6 +3494,9 @@ export type SyncEventSessionCompactionFailed = {
|
|
|
3467
3494
|
aggregateID: string;
|
|
3468
3495
|
data: {
|
|
3469
3496
|
sessionID: string;
|
|
3497
|
+
reason: "auto" | "manual";
|
|
3498
|
+
error: SessionStructuredError;
|
|
3499
|
+
inputID?: string;
|
|
3470
3500
|
};
|
|
3471
3501
|
};
|
|
3472
3502
|
};
|
|
@@ -3480,7 +3510,7 @@ export type SyncEventSessionRevertStaged = {
|
|
|
3480
3510
|
aggregateID: string;
|
|
3481
3511
|
data: {
|
|
3482
3512
|
sessionID: string;
|
|
3483
|
-
revert:
|
|
3513
|
+
revert: SessionRevert;
|
|
3484
3514
|
};
|
|
3485
3515
|
};
|
|
3486
3516
|
};
|
|
@@ -3563,8 +3593,9 @@ export type PermissionV2Rule = {
|
|
|
3563
3593
|
effect: PermissionV2Effect;
|
|
3564
3594
|
};
|
|
3565
3595
|
export type PermissionV2Ruleset = Array<PermissionV2Rule>;
|
|
3566
|
-
export type
|
|
3596
|
+
export type AgentInfo = {
|
|
3567
3597
|
id: string;
|
|
3598
|
+
name: string;
|
|
3568
3599
|
model?: ModelRef;
|
|
3569
3600
|
request: ProviderRequest;
|
|
3570
3601
|
system?: string;
|
|
@@ -3578,7 +3609,7 @@ export type AgentV2Info = {
|
|
|
3578
3609
|
export type PluginInfo = {
|
|
3579
3610
|
id: string;
|
|
3580
3611
|
};
|
|
3581
|
-
export type
|
|
3612
|
+
export type SessionInfo = {
|
|
3582
3613
|
id: string;
|
|
3583
3614
|
parentID?: string;
|
|
3584
3615
|
fork?: {
|
|
@@ -3588,16 +3619,8 @@ export type SessionV2Info = {
|
|
|
3588
3619
|
projectID: string;
|
|
3589
3620
|
agent?: string;
|
|
3590
3621
|
model?: ModelRef;
|
|
3591
|
-
cost:
|
|
3592
|
-
tokens:
|
|
3593
|
-
input: number;
|
|
3594
|
-
output: number;
|
|
3595
|
-
reasoning: number;
|
|
3596
|
-
cache: {
|
|
3597
|
-
read: number;
|
|
3598
|
-
write: number;
|
|
3599
|
-
};
|
|
3600
|
-
};
|
|
3622
|
+
cost: MoneyUsd;
|
|
3623
|
+
tokens: TokenUsageInfo;
|
|
3601
3624
|
time: {
|
|
3602
3625
|
created: number;
|
|
3603
3626
|
updated: number;
|
|
@@ -3606,7 +3629,7 @@ export type SessionV2Info = {
|
|
|
3606
3629
|
title: string;
|
|
3607
3630
|
location: LocationRef;
|
|
3608
3631
|
subpath?: string;
|
|
3609
|
-
revert?:
|
|
3632
|
+
revert?: SessionRevert;
|
|
3610
3633
|
};
|
|
3611
3634
|
export type PromptInputFileAttachment = {
|
|
3612
3635
|
uri: string;
|
|
@@ -3675,7 +3698,6 @@ export type SessionMessageSynthetic = {
|
|
|
3675
3698
|
time: {
|
|
3676
3699
|
created: number;
|
|
3677
3700
|
};
|
|
3678
|
-
sessionID: string;
|
|
3679
3701
|
text: string;
|
|
3680
3702
|
description?: string;
|
|
3681
3703
|
type: "synthetic";
|
|
@@ -3700,6 +3722,7 @@ export type SessionMessageSkill = {
|
|
|
3700
3722
|
created: number;
|
|
3701
3723
|
};
|
|
3702
3724
|
type: "skill";
|
|
3725
|
+
skill: string;
|
|
3703
3726
|
name: string;
|
|
3704
3727
|
text: string;
|
|
3705
3728
|
};
|
|
@@ -3713,7 +3736,10 @@ export type SessionMessageShell = {
|
|
|
3713
3736
|
completed?: number;
|
|
3714
3737
|
};
|
|
3715
3738
|
type: "shell";
|
|
3716
|
-
|
|
3739
|
+
shellID: string;
|
|
3740
|
+
command: string;
|
|
3741
|
+
status: "running" | "exited" | "timeout" | "killed";
|
|
3742
|
+
exit?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
|
|
3717
3743
|
output?: {
|
|
3718
3744
|
output: string;
|
|
3719
3745
|
cursor: number;
|
|
@@ -3734,8 +3760,8 @@ export type SessionMessageAssistantReasoning = {
|
|
|
3734
3760
|
completed?: number;
|
|
3735
3761
|
};
|
|
3736
3762
|
};
|
|
3737
|
-
export type
|
|
3738
|
-
status: "
|
|
3763
|
+
export type SessionMessageToolStateStreaming = {
|
|
3764
|
+
status: "streaming";
|
|
3739
3765
|
input: string;
|
|
3740
3766
|
};
|
|
3741
3767
|
export type SessionMessageToolStateRunning = {
|
|
@@ -3753,9 +3779,7 @@ export type SessionMessageToolStateCompleted = {
|
|
|
3753
3779
|
input: {
|
|
3754
3780
|
[key: string]: unknown;
|
|
3755
3781
|
};
|
|
3756
|
-
attachments?: Array<PromptFileAttachment>;
|
|
3757
3782
|
content: Array<LlmToolContent>;
|
|
3758
|
-
outputPaths?: Array<string>;
|
|
3759
3783
|
structured: {
|
|
3760
3784
|
[key: string]: unknown;
|
|
3761
3785
|
};
|
|
@@ -3780,12 +3804,11 @@ export type SessionMessageAssistantTool = {
|
|
|
3780
3804
|
executed?: boolean;
|
|
3781
3805
|
providerState?: SessionMessageProviderState;
|
|
3782
3806
|
providerResultState?: SessionMessageProviderState;
|
|
3783
|
-
state:
|
|
3807
|
+
state: SessionMessageToolStateStreaming | SessionMessageToolStateRunning | SessionMessageToolStateCompleted | SessionMessageToolStateError;
|
|
3784
3808
|
time: {
|
|
3785
3809
|
created: number;
|
|
3786
3810
|
ran?: number;
|
|
3787
3811
|
completed?: number;
|
|
3788
|
-
pruned?: number;
|
|
3789
3812
|
};
|
|
3790
3813
|
};
|
|
3791
3814
|
export type SessionMessageAssistantRetry = {
|
|
@@ -3812,25 +3835,41 @@ export type SessionMessageAssistant = {
|
|
|
3812
3835
|
files?: Array<string>;
|
|
3813
3836
|
};
|
|
3814
3837
|
finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
|
|
3815
|
-
cost?:
|
|
3816
|
-
tokens?:
|
|
3817
|
-
input: number;
|
|
3818
|
-
output: number;
|
|
3819
|
-
reasoning: number;
|
|
3820
|
-
cache: {
|
|
3821
|
-
read: number;
|
|
3822
|
-
write: number;
|
|
3823
|
-
};
|
|
3824
|
-
};
|
|
3838
|
+
cost?: MoneyUsd;
|
|
3839
|
+
tokens?: TokenUsageInfo;
|
|
3825
3840
|
error?: SessionStructuredError;
|
|
3826
3841
|
retry?: SessionMessageAssistantRetry;
|
|
3827
3842
|
};
|
|
3828
|
-
export type
|
|
3843
|
+
export type SessionMessageCompactionRunning = {
|
|
3829
3844
|
type: "compaction";
|
|
3830
|
-
|
|
3845
|
+
id: string;
|
|
3846
|
+
metadata?: {
|
|
3847
|
+
[key: string]: unknown;
|
|
3848
|
+
};
|
|
3849
|
+
time: {
|
|
3850
|
+
created: number;
|
|
3851
|
+
};
|
|
3852
|
+
status: "running";
|
|
3853
|
+
reason: "auto" | "manual";
|
|
3854
|
+
summary: string;
|
|
3855
|
+
recent: string;
|
|
3856
|
+
};
|
|
3857
|
+
export type SessionMessageCompactionCompleted = {
|
|
3858
|
+
type: "compaction";
|
|
3859
|
+
id: string;
|
|
3860
|
+
metadata?: {
|
|
3861
|
+
[key: string]: unknown;
|
|
3862
|
+
};
|
|
3863
|
+
time: {
|
|
3864
|
+
created: number;
|
|
3865
|
+
};
|
|
3866
|
+
status: "completed";
|
|
3831
3867
|
reason: "auto" | "manual";
|
|
3832
3868
|
summary: string;
|
|
3833
3869
|
recent: string;
|
|
3870
|
+
};
|
|
3871
|
+
export type SessionMessageCompactionFailed = {
|
|
3872
|
+
type: "compaction";
|
|
3834
3873
|
id: string;
|
|
3835
3874
|
metadata?: {
|
|
3836
3875
|
[key: string]: unknown;
|
|
@@ -3838,8 +3877,12 @@ export type SessionMessageCompaction = {
|
|
|
3838
3877
|
time: {
|
|
3839
3878
|
created: number;
|
|
3840
3879
|
};
|
|
3880
|
+
status: "failed";
|
|
3881
|
+
reason: "auto" | "manual";
|
|
3882
|
+
error: SessionStructuredError;
|
|
3841
3883
|
};
|
|
3842
|
-
export type
|
|
3884
|
+
export type SessionMessageCompaction = SessionMessageCompactionRunning | SessionMessageCompactionCompleted | SessionMessageCompactionFailed;
|
|
3885
|
+
export type SessionMessageInfo = SessionMessageAgentSelected | SessionMessageModelSelected | SessionMessageUser | SessionMessageSynthetic | SessionMessageSystem | SessionMessageSkill | SessionMessageShell | SessionMessageAssistant | SessionMessageCompaction;
|
|
3843
3886
|
export type InstructionEntryKey = string;
|
|
3844
3887
|
export type InstructionEntryInfo = {
|
|
3845
3888
|
key: InstructionEntryKey;
|
|
@@ -3855,7 +3898,7 @@ export type SessionAgentSelected = {
|
|
|
3855
3898
|
durable: {
|
|
3856
3899
|
aggregateID: string;
|
|
3857
3900
|
seq: number;
|
|
3858
|
-
version:
|
|
3901
|
+
version: 1;
|
|
3859
3902
|
};
|
|
3860
3903
|
location?: LocationRef;
|
|
3861
3904
|
data: {
|
|
@@ -3873,7 +3916,7 @@ export type SessionModelSelected = {
|
|
|
3873
3916
|
durable: {
|
|
3874
3917
|
aggregateID: string;
|
|
3875
3918
|
seq: number;
|
|
3876
|
-
version:
|
|
3919
|
+
version: 1;
|
|
3877
3920
|
};
|
|
3878
3921
|
location?: LocationRef;
|
|
3879
3922
|
data: {
|
|
@@ -3891,7 +3934,7 @@ export type SessionMoved = {
|
|
|
3891
3934
|
durable: {
|
|
3892
3935
|
aggregateID: string;
|
|
3893
3936
|
seq: number;
|
|
3894
|
-
version:
|
|
3937
|
+
version: 1;
|
|
3895
3938
|
};
|
|
3896
3939
|
location?: LocationRef;
|
|
3897
3940
|
data: {
|
|
@@ -3910,7 +3953,7 @@ export type SessionRenamed = {
|
|
|
3910
3953
|
durable: {
|
|
3911
3954
|
aggregateID: string;
|
|
3912
3955
|
seq: number;
|
|
3913
|
-
version:
|
|
3956
|
+
version: 1;
|
|
3914
3957
|
};
|
|
3915
3958
|
location?: LocationRef;
|
|
3916
3959
|
data: {
|
|
@@ -3928,7 +3971,7 @@ export type SessionDeleted = {
|
|
|
3928
3971
|
durable: {
|
|
3929
3972
|
aggregateID: string;
|
|
3930
3973
|
seq: number;
|
|
3931
|
-
version:
|
|
3974
|
+
version: 2;
|
|
3932
3975
|
};
|
|
3933
3976
|
location?: LocationRef;
|
|
3934
3977
|
data: {
|
|
@@ -3945,7 +3988,7 @@ export type SessionForked = {
|
|
|
3945
3988
|
durable: {
|
|
3946
3989
|
aggregateID: string;
|
|
3947
3990
|
seq: number;
|
|
3948
|
-
version:
|
|
3991
|
+
version: 1;
|
|
3949
3992
|
};
|
|
3950
3993
|
location?: LocationRef;
|
|
3951
3994
|
data: {
|
|
@@ -3964,7 +4007,7 @@ export type SessionPromptPromoted = {
|
|
|
3964
4007
|
durable: {
|
|
3965
4008
|
aggregateID: string;
|
|
3966
4009
|
seq: number;
|
|
3967
|
-
version:
|
|
4010
|
+
version: 1;
|
|
3968
4011
|
};
|
|
3969
4012
|
location?: LocationRef;
|
|
3970
4013
|
data: {
|
|
@@ -3982,7 +4025,7 @@ export type SessionPromptAdmitted = {
|
|
|
3982
4025
|
durable: {
|
|
3983
4026
|
aggregateID: string;
|
|
3984
4027
|
seq: number;
|
|
3985
|
-
version:
|
|
4028
|
+
version: 1;
|
|
3986
4029
|
};
|
|
3987
4030
|
location?: LocationRef;
|
|
3988
4031
|
data: {
|
|
@@ -4002,7 +4045,7 @@ export type SessionExecutionStarted = {
|
|
|
4002
4045
|
durable: {
|
|
4003
4046
|
aggregateID: string;
|
|
4004
4047
|
seq: number;
|
|
4005
|
-
version:
|
|
4048
|
+
version: 1;
|
|
4006
4049
|
};
|
|
4007
4050
|
location?: LocationRef;
|
|
4008
4051
|
data: {
|
|
@@ -4019,7 +4062,7 @@ export type SessionExecutionSucceeded = {
|
|
|
4019
4062
|
durable: {
|
|
4020
4063
|
aggregateID: string;
|
|
4021
4064
|
seq: number;
|
|
4022
|
-
version:
|
|
4065
|
+
version: 1;
|
|
4023
4066
|
};
|
|
4024
4067
|
location?: LocationRef;
|
|
4025
4068
|
data: {
|
|
@@ -4036,7 +4079,7 @@ export type SessionExecutionFailed = {
|
|
|
4036
4079
|
durable: {
|
|
4037
4080
|
aggregateID: string;
|
|
4038
4081
|
seq: number;
|
|
4039
|
-
version:
|
|
4082
|
+
version: 1;
|
|
4040
4083
|
};
|
|
4041
4084
|
location?: LocationRef;
|
|
4042
4085
|
data: {
|
|
@@ -4054,7 +4097,7 @@ export type SessionExecutionInterrupted = {
|
|
|
4054
4097
|
durable: {
|
|
4055
4098
|
aggregateID: string;
|
|
4056
4099
|
seq: number;
|
|
4057
|
-
version:
|
|
4100
|
+
version: 1;
|
|
4058
4101
|
};
|
|
4059
4102
|
location?: LocationRef;
|
|
4060
4103
|
data: {
|
|
@@ -4072,7 +4115,7 @@ export type SessionInstructionsUpdated = {
|
|
|
4072
4115
|
durable: {
|
|
4073
4116
|
aggregateID: string;
|
|
4074
4117
|
seq: number;
|
|
4075
|
-
version:
|
|
4118
|
+
version: 1;
|
|
4076
4119
|
};
|
|
4077
4120
|
location?: LocationRef;
|
|
4078
4121
|
data: {
|
|
@@ -4090,7 +4133,7 @@ export type SessionSynthetic = {
|
|
|
4090
4133
|
durable: {
|
|
4091
4134
|
aggregateID: string;
|
|
4092
4135
|
seq: number;
|
|
4093
|
-
version:
|
|
4136
|
+
version: 1;
|
|
4094
4137
|
};
|
|
4095
4138
|
location?: LocationRef;
|
|
4096
4139
|
data: {
|
|
@@ -4112,11 +4155,12 @@ export type SessionSkillActivated = {
|
|
|
4112
4155
|
durable: {
|
|
4113
4156
|
aggregateID: string;
|
|
4114
4157
|
seq: number;
|
|
4115
|
-
version:
|
|
4158
|
+
version: 1;
|
|
4116
4159
|
};
|
|
4117
4160
|
location?: LocationRef;
|
|
4118
4161
|
data: {
|
|
4119
4162
|
sessionID: string;
|
|
4163
|
+
id: string;
|
|
4120
4164
|
name: string;
|
|
4121
4165
|
text: string;
|
|
4122
4166
|
};
|
|
@@ -4131,7 +4175,7 @@ export type SessionShellStarted = {
|
|
|
4131
4175
|
durable: {
|
|
4132
4176
|
aggregateID: string;
|
|
4133
4177
|
seq: number;
|
|
4134
|
-
version:
|
|
4178
|
+
version: 1;
|
|
4135
4179
|
};
|
|
4136
4180
|
location?: LocationRef;
|
|
4137
4181
|
data: {
|
|
@@ -4149,7 +4193,7 @@ export type SessionShellEnded = {
|
|
|
4149
4193
|
durable: {
|
|
4150
4194
|
aggregateID: string;
|
|
4151
4195
|
seq: number;
|
|
4152
|
-
version:
|
|
4196
|
+
version: 1;
|
|
4153
4197
|
};
|
|
4154
4198
|
location?: LocationRef;
|
|
4155
4199
|
data: {
|
|
@@ -4173,7 +4217,7 @@ export type SessionStepStarted = {
|
|
|
4173
4217
|
durable: {
|
|
4174
4218
|
aggregateID: string;
|
|
4175
4219
|
seq: number;
|
|
4176
|
-
version:
|
|
4220
|
+
version: 1;
|
|
4177
4221
|
};
|
|
4178
4222
|
location?: LocationRef;
|
|
4179
4223
|
data: {
|
|
@@ -4194,23 +4238,15 @@ export type SessionStepEnded = {
|
|
|
4194
4238
|
durable: {
|
|
4195
4239
|
aggregateID: string;
|
|
4196
4240
|
seq: number;
|
|
4197
|
-
version:
|
|
4241
|
+
version: 1;
|
|
4198
4242
|
};
|
|
4199
4243
|
location?: LocationRef;
|
|
4200
4244
|
data: {
|
|
4201
4245
|
sessionID: string;
|
|
4202
4246
|
assistantMessageID: string;
|
|
4203
4247
|
finish: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
|
|
4204
|
-
cost:
|
|
4205
|
-
tokens:
|
|
4206
|
-
input: number;
|
|
4207
|
-
output: number;
|
|
4208
|
-
reasoning: number;
|
|
4209
|
-
cache: {
|
|
4210
|
-
read: number;
|
|
4211
|
-
write: number;
|
|
4212
|
-
};
|
|
4213
|
-
};
|
|
4248
|
+
cost: MoneyUsd;
|
|
4249
|
+
tokens: TokenUsageInfo;
|
|
4214
4250
|
snapshot?: string;
|
|
4215
4251
|
files?: Array<string>;
|
|
4216
4252
|
};
|
|
@@ -4225,23 +4261,15 @@ export type SessionStepFailed = {
|
|
|
4225
4261
|
durable: {
|
|
4226
4262
|
aggregateID: string;
|
|
4227
4263
|
seq: number;
|
|
4228
|
-
version:
|
|
4264
|
+
version: 1;
|
|
4229
4265
|
};
|
|
4230
4266
|
location?: LocationRef;
|
|
4231
4267
|
data: {
|
|
4232
4268
|
sessionID: string;
|
|
4233
4269
|
assistantMessageID: string;
|
|
4234
4270
|
error: SessionStructuredError;
|
|
4235
|
-
cost?:
|
|
4236
|
-
tokens?:
|
|
4237
|
-
input: number;
|
|
4238
|
-
output: number;
|
|
4239
|
-
reasoning: number;
|
|
4240
|
-
cache: {
|
|
4241
|
-
read: number;
|
|
4242
|
-
write: number;
|
|
4243
|
-
};
|
|
4244
|
-
};
|
|
4271
|
+
cost?: MoneyUsd;
|
|
4272
|
+
tokens?: TokenUsageInfo;
|
|
4245
4273
|
};
|
|
4246
4274
|
};
|
|
4247
4275
|
export type SessionTextStarted = {
|
|
@@ -4254,7 +4282,7 @@ export type SessionTextStarted = {
|
|
|
4254
4282
|
durable: {
|
|
4255
4283
|
aggregateID: string;
|
|
4256
4284
|
seq: number;
|
|
4257
|
-
version:
|
|
4285
|
+
version: 1;
|
|
4258
4286
|
};
|
|
4259
4287
|
location?: LocationRef;
|
|
4260
4288
|
data: {
|
|
@@ -4273,7 +4301,7 @@ export type SessionTextEnded = {
|
|
|
4273
4301
|
durable: {
|
|
4274
4302
|
aggregateID: string;
|
|
4275
4303
|
seq: number;
|
|
4276
|
-
version:
|
|
4304
|
+
version: 1;
|
|
4277
4305
|
};
|
|
4278
4306
|
location?: LocationRef;
|
|
4279
4307
|
data: {
|
|
@@ -4293,7 +4321,7 @@ export type SessionReasoningStarted = {
|
|
|
4293
4321
|
durable: {
|
|
4294
4322
|
aggregateID: string;
|
|
4295
4323
|
seq: number;
|
|
4296
|
-
version:
|
|
4324
|
+
version: 1;
|
|
4297
4325
|
};
|
|
4298
4326
|
location?: LocationRef;
|
|
4299
4327
|
data: {
|
|
@@ -4313,7 +4341,7 @@ export type SessionReasoningEnded = {
|
|
|
4313
4341
|
durable: {
|
|
4314
4342
|
aggregateID: string;
|
|
4315
4343
|
seq: number;
|
|
4316
|
-
version:
|
|
4344
|
+
version: 1;
|
|
4317
4345
|
};
|
|
4318
4346
|
location?: LocationRef;
|
|
4319
4347
|
data: {
|
|
@@ -4334,7 +4362,7 @@ export type SessionToolInputStarted = {
|
|
|
4334
4362
|
durable: {
|
|
4335
4363
|
aggregateID: string;
|
|
4336
4364
|
seq: number;
|
|
4337
|
-
version:
|
|
4365
|
+
version: 1;
|
|
4338
4366
|
};
|
|
4339
4367
|
location?: LocationRef;
|
|
4340
4368
|
data: {
|
|
@@ -4354,7 +4382,7 @@ export type SessionToolInputEnded = {
|
|
|
4354
4382
|
durable: {
|
|
4355
4383
|
aggregateID: string;
|
|
4356
4384
|
seq: number;
|
|
4357
|
-
version:
|
|
4385
|
+
version: 1;
|
|
4358
4386
|
};
|
|
4359
4387
|
location?: LocationRef;
|
|
4360
4388
|
data: {
|
|
@@ -4374,7 +4402,7 @@ export type SessionToolCalled = {
|
|
|
4374
4402
|
durable: {
|
|
4375
4403
|
aggregateID: string;
|
|
4376
4404
|
seq: number;
|
|
4377
|
-
version:
|
|
4405
|
+
version: 1;
|
|
4378
4406
|
};
|
|
4379
4407
|
location?: LocationRef;
|
|
4380
4408
|
data: {
|
|
@@ -4398,7 +4426,7 @@ export type SessionToolProgress = {
|
|
|
4398
4426
|
durable: {
|
|
4399
4427
|
aggregateID: string;
|
|
4400
4428
|
seq: number;
|
|
4401
|
-
version:
|
|
4429
|
+
version: 1;
|
|
4402
4430
|
};
|
|
4403
4431
|
location?: LocationRef;
|
|
4404
4432
|
data: {
|
|
@@ -4421,7 +4449,7 @@ export type SessionToolSuccess = {
|
|
|
4421
4449
|
durable: {
|
|
4422
4450
|
aggregateID: string;
|
|
4423
4451
|
seq: number;
|
|
4424
|
-
version:
|
|
4452
|
+
version: 1;
|
|
4425
4453
|
};
|
|
4426
4454
|
location?: LocationRef;
|
|
4427
4455
|
data: {
|
|
@@ -4432,7 +4460,6 @@ export type SessionToolSuccess = {
|
|
|
4432
4460
|
[key: string]: unknown;
|
|
4433
4461
|
};
|
|
4434
4462
|
content: Array<LlmToolContent>;
|
|
4435
|
-
outputPaths?: Array<string>;
|
|
4436
4463
|
result?: unknown;
|
|
4437
4464
|
executed: boolean;
|
|
4438
4465
|
resultState?: SessionMessageProviderState;
|
|
@@ -4448,7 +4475,7 @@ export type SessionToolFailed = {
|
|
|
4448
4475
|
durable: {
|
|
4449
4476
|
aggregateID: string;
|
|
4450
4477
|
seq: number;
|
|
4451
|
-
version:
|
|
4478
|
+
version: 1;
|
|
4452
4479
|
};
|
|
4453
4480
|
location?: LocationRef;
|
|
4454
4481
|
data: {
|
|
@@ -4471,7 +4498,7 @@ export type SessionRetryScheduled = {
|
|
|
4471
4498
|
durable: {
|
|
4472
4499
|
aggregateID: string;
|
|
4473
4500
|
seq: number;
|
|
4474
|
-
version:
|
|
4501
|
+
version: 1;
|
|
4475
4502
|
};
|
|
4476
4503
|
location?: LocationRef;
|
|
4477
4504
|
data: {
|
|
@@ -4492,7 +4519,7 @@ export type SessionCompactionAdmitted = {
|
|
|
4492
4519
|
durable: {
|
|
4493
4520
|
aggregateID: string;
|
|
4494
4521
|
seq: number;
|
|
4495
|
-
version:
|
|
4522
|
+
version: 1;
|
|
4496
4523
|
};
|
|
4497
4524
|
location?: LocationRef;
|
|
4498
4525
|
data: {
|
|
@@ -4510,12 +4537,14 @@ export type SessionCompactionStarted = {
|
|
|
4510
4537
|
durable: {
|
|
4511
4538
|
aggregateID: string;
|
|
4512
4539
|
seq: number;
|
|
4513
|
-
version:
|
|
4540
|
+
version: 1;
|
|
4514
4541
|
};
|
|
4515
4542
|
location?: LocationRef;
|
|
4516
4543
|
data: {
|
|
4517
4544
|
sessionID: string;
|
|
4518
4545
|
reason: "auto" | "manual";
|
|
4546
|
+
recent: string;
|
|
4547
|
+
inputID?: string;
|
|
4519
4548
|
};
|
|
4520
4549
|
};
|
|
4521
4550
|
export type SessionCompactionEnded = {
|
|
@@ -4528,7 +4557,7 @@ export type SessionCompactionEnded = {
|
|
|
4528
4557
|
durable: {
|
|
4529
4558
|
aggregateID: string;
|
|
4530
4559
|
seq: number;
|
|
4531
|
-
version:
|
|
4560
|
+
version: 1;
|
|
4532
4561
|
};
|
|
4533
4562
|
location?: LocationRef;
|
|
4534
4563
|
data: {
|
|
@@ -4548,11 +4577,14 @@ export type SessionCompactionFailed = {
|
|
|
4548
4577
|
durable: {
|
|
4549
4578
|
aggregateID: string;
|
|
4550
4579
|
seq: number;
|
|
4551
|
-
version:
|
|
4580
|
+
version: 1;
|
|
4552
4581
|
};
|
|
4553
4582
|
location?: LocationRef;
|
|
4554
4583
|
data: {
|
|
4555
4584
|
sessionID: string;
|
|
4585
|
+
reason: "auto" | "manual";
|
|
4586
|
+
error: SessionStructuredError;
|
|
4587
|
+
inputID?: string;
|
|
4556
4588
|
};
|
|
4557
4589
|
};
|
|
4558
4590
|
export type SessionRevertStaged = {
|
|
@@ -4565,12 +4597,12 @@ export type SessionRevertStaged = {
|
|
|
4565
4597
|
durable: {
|
|
4566
4598
|
aggregateID: string;
|
|
4567
4599
|
seq: number;
|
|
4568
|
-
version:
|
|
4600
|
+
version: 1;
|
|
4569
4601
|
};
|
|
4570
4602
|
location?: LocationRef;
|
|
4571
4603
|
data: {
|
|
4572
4604
|
sessionID: string;
|
|
4573
|
-
revert:
|
|
4605
|
+
revert: SessionRevert;
|
|
4574
4606
|
};
|
|
4575
4607
|
};
|
|
4576
4608
|
export type SessionRevertCleared = {
|
|
@@ -4583,7 +4615,7 @@ export type SessionRevertCleared = {
|
|
|
4583
4615
|
durable: {
|
|
4584
4616
|
aggregateID: string;
|
|
4585
4617
|
seq: number;
|
|
4586
|
-
version:
|
|
4618
|
+
version: 1;
|
|
4587
4619
|
};
|
|
4588
4620
|
location?: LocationRef;
|
|
4589
4621
|
data: {
|
|
@@ -4600,7 +4632,7 @@ export type SessionRevertCommitted = {
|
|
|
4600
4632
|
durable: {
|
|
4601
4633
|
aggregateID: string;
|
|
4602
4634
|
seq: number;
|
|
4603
|
-
version:
|
|
4635
|
+
version: 1;
|
|
4604
4636
|
};
|
|
4605
4637
|
location?: LocationRef;
|
|
4606
4638
|
data: {
|
|
@@ -4608,6 +4640,7 @@ export type SessionRevertCommitted = {
|
|
|
4608
4640
|
to: string;
|
|
4609
4641
|
};
|
|
4610
4642
|
};
|
|
4643
|
+
export type SessionEventDurable = SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionDeleted | SessionForked | SessionPromptPromoted | SessionPromptAdmitted | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextEnded | SessionReasoningStarted | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputEnded | SessionToolCalled | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionAdmitted | SessionCompactionStarted | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted;
|
|
4611
4644
|
export type EventLogSynced = {
|
|
4612
4645
|
type: "log.synced";
|
|
4613
4646
|
aggregateID: string;
|
|
@@ -4630,19 +4663,20 @@ export type ModelVariant = {
|
|
|
4630
4663
|
[key: string]: unknown;
|
|
4631
4664
|
};
|
|
4632
4665
|
};
|
|
4666
|
+
export type MoneyUsdPerMillionTokens = number;
|
|
4633
4667
|
export type ModelCost = {
|
|
4634
4668
|
tier?: {
|
|
4635
4669
|
type: "context";
|
|
4636
4670
|
size: number;
|
|
4637
4671
|
};
|
|
4638
|
-
input:
|
|
4639
|
-
output:
|
|
4672
|
+
input: MoneyUsdPerMillionTokens;
|
|
4673
|
+
output: MoneyUsdPerMillionTokens;
|
|
4640
4674
|
cache: {
|
|
4641
|
-
read:
|
|
4642
|
-
write:
|
|
4675
|
+
read: MoneyUsdPerMillionTokens;
|
|
4676
|
+
write: MoneyUsdPerMillionTokens;
|
|
4643
4677
|
};
|
|
4644
4678
|
};
|
|
4645
|
-
export type
|
|
4679
|
+
export type ModelInfo = {
|
|
4646
4680
|
id: string;
|
|
4647
4681
|
modelID: string;
|
|
4648
4682
|
providerID: string;
|
|
@@ -4857,7 +4891,7 @@ export type FileSystemEntry = {
|
|
|
4857
4891
|
path: string;
|
|
4858
4892
|
type: "file" | "directory";
|
|
4859
4893
|
};
|
|
4860
|
-
export type
|
|
4894
|
+
export type CommandInfo = {
|
|
4861
4895
|
name: string;
|
|
4862
4896
|
template: string;
|
|
4863
4897
|
description?: string;
|
|
@@ -4865,7 +4899,8 @@ export type CommandV2Info = {
|
|
|
4865
4899
|
model?: ModelRef;
|
|
4866
4900
|
subtask?: boolean;
|
|
4867
4901
|
};
|
|
4868
|
-
export type
|
|
4902
|
+
export type SkillInfo = {
|
|
4903
|
+
id: string;
|
|
4869
4904
|
name: string;
|
|
4870
4905
|
description?: string;
|
|
4871
4906
|
slash?: boolean;
|
|
@@ -4943,12 +4978,12 @@ export type SessionCreated = {
|
|
|
4943
4978
|
durable: {
|
|
4944
4979
|
aggregateID: string;
|
|
4945
4980
|
seq: number;
|
|
4946
|
-
version:
|
|
4981
|
+
version: 1;
|
|
4947
4982
|
};
|
|
4948
4983
|
location?: LocationRef;
|
|
4949
4984
|
data: {
|
|
4950
4985
|
sessionID: string;
|
|
4951
|
-
info:
|
|
4986
|
+
info: SessionV1Info;
|
|
4952
4987
|
};
|
|
4953
4988
|
};
|
|
4954
4989
|
export type SessionUpdated = {
|
|
@@ -4961,12 +4996,12 @@ export type SessionUpdated = {
|
|
|
4961
4996
|
durable: {
|
|
4962
4997
|
aggregateID: string;
|
|
4963
4998
|
seq: number;
|
|
4964
|
-
version:
|
|
4999
|
+
version: 1;
|
|
4965
5000
|
};
|
|
4966
5001
|
location?: LocationRef;
|
|
4967
5002
|
data: {
|
|
4968
5003
|
sessionID: string;
|
|
4969
|
-
info:
|
|
5004
|
+
info: SessionV1Info;
|
|
4970
5005
|
};
|
|
4971
5006
|
};
|
|
4972
5007
|
export type MessageUpdated = {
|
|
@@ -4979,7 +5014,7 @@ export type MessageUpdated = {
|
|
|
4979
5014
|
durable: {
|
|
4980
5015
|
aggregateID: string;
|
|
4981
5016
|
seq: number;
|
|
4982
|
-
version:
|
|
5017
|
+
version: 1;
|
|
4983
5018
|
};
|
|
4984
5019
|
location?: LocationRef;
|
|
4985
5020
|
data: {
|
|
@@ -4997,7 +5032,7 @@ export type MessageRemoved = {
|
|
|
4997
5032
|
durable: {
|
|
4998
5033
|
aggregateID: string;
|
|
4999
5034
|
seq: number;
|
|
5000
|
-
version:
|
|
5035
|
+
version: 1;
|
|
5001
5036
|
};
|
|
5002
5037
|
location?: LocationRef;
|
|
5003
5038
|
data: {
|
|
@@ -5015,7 +5050,7 @@ export type MessagePartUpdated = {
|
|
|
5015
5050
|
durable: {
|
|
5016
5051
|
aggregateID: string;
|
|
5017
5052
|
seq: number;
|
|
5018
|
-
version:
|
|
5053
|
+
version: 1;
|
|
5019
5054
|
};
|
|
5020
5055
|
location?: LocationRef;
|
|
5021
5056
|
data: {
|
|
@@ -5034,7 +5069,7 @@ export type MessagePartRemoved = {
|
|
|
5034
5069
|
durable: {
|
|
5035
5070
|
aggregateID: string;
|
|
5036
5071
|
seq: number;
|
|
5037
|
-
version:
|
|
5072
|
+
version: 1;
|
|
5038
5073
|
};
|
|
5039
5074
|
location?: LocationRef;
|
|
5040
5075
|
data: {
|
|
@@ -5053,16 +5088,8 @@ export type SessionUsageUpdated = {
|
|
|
5053
5088
|
location?: LocationRef;
|
|
5054
5089
|
data: {
|
|
5055
5090
|
sessionID: string;
|
|
5056
|
-
cost:
|
|
5057
|
-
tokens:
|
|
5058
|
-
input: number;
|
|
5059
|
-
output: number;
|
|
5060
|
-
reasoning: number;
|
|
5061
|
-
cache: {
|
|
5062
|
-
read: number;
|
|
5063
|
-
write: number;
|
|
5064
|
-
};
|
|
5065
|
-
};
|
|
5091
|
+
cost: MoneyUsd;
|
|
5092
|
+
tokens: TokenUsageInfo;
|
|
5066
5093
|
};
|
|
5067
5094
|
};
|
|
5068
5095
|
export type SessionTextDelta = {
|
|
@@ -5149,7 +5176,7 @@ export type SessionDiff = {
|
|
|
5149
5176
|
location?: LocationRef;
|
|
5150
5177
|
data: {
|
|
5151
5178
|
sessionID: string;
|
|
5152
|
-
diff: Array<
|
|
5179
|
+
diff: Array<FileDiffLegacyInfo>;
|
|
5153
5180
|
};
|
|
5154
5181
|
};
|
|
5155
5182
|
export type SessionError = {
|
|
@@ -5937,7 +5964,7 @@ export type EventSessionCreated = {
|
|
|
5937
5964
|
type: "session.created";
|
|
5938
5965
|
properties: {
|
|
5939
5966
|
sessionID: string;
|
|
5940
|
-
info:
|
|
5967
|
+
info: SessionV1Info;
|
|
5941
5968
|
};
|
|
5942
5969
|
};
|
|
5943
5970
|
export type EventSessionUpdated = {
|
|
@@ -5945,7 +5972,7 @@ export type EventSessionUpdated = {
|
|
|
5945
5972
|
type: "session.updated";
|
|
5946
5973
|
properties: {
|
|
5947
5974
|
sessionID: string;
|
|
5948
|
-
info:
|
|
5975
|
+
info: SessionV1Info;
|
|
5949
5976
|
};
|
|
5950
5977
|
};
|
|
5951
5978
|
export type EventSessionDeleted = {
|
|
@@ -6027,16 +6054,8 @@ export type EventSessionUsageUpdated = {
|
|
|
6027
6054
|
type: "session.usage.updated";
|
|
6028
6055
|
properties: {
|
|
6029
6056
|
sessionID: string;
|
|
6030
|
-
cost:
|
|
6031
|
-
tokens:
|
|
6032
|
-
input: number;
|
|
6033
|
-
output: number;
|
|
6034
|
-
reasoning: number;
|
|
6035
|
-
cache: {
|
|
6036
|
-
read: number;
|
|
6037
|
-
write: number;
|
|
6038
|
-
};
|
|
6039
|
-
};
|
|
6057
|
+
cost: MoneyUsd;
|
|
6058
|
+
tokens: TokenUsageInfo;
|
|
6040
6059
|
};
|
|
6041
6060
|
};
|
|
6042
6061
|
export type EventSessionForked = {
|
|
@@ -6121,6 +6140,7 @@ export type EventSessionSkillActivated = {
|
|
|
6121
6140
|
type: "session.skill.activated";
|
|
6122
6141
|
properties: {
|
|
6123
6142
|
sessionID: string;
|
|
6143
|
+
id: string;
|
|
6124
6144
|
name: string;
|
|
6125
6145
|
text: string;
|
|
6126
6146
|
};
|
|
@@ -6165,16 +6185,8 @@ export type EventSessionStepEnded = {
|
|
|
6165
6185
|
sessionID: string;
|
|
6166
6186
|
assistantMessageID: string;
|
|
6167
6187
|
finish: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
|
|
6168
|
-
cost:
|
|
6169
|
-
tokens:
|
|
6170
|
-
input: number;
|
|
6171
|
-
output: number;
|
|
6172
|
-
reasoning: number;
|
|
6173
|
-
cache: {
|
|
6174
|
-
read: number;
|
|
6175
|
-
write: number;
|
|
6176
|
-
};
|
|
6177
|
-
};
|
|
6188
|
+
cost: MoneyUsd;
|
|
6189
|
+
tokens: TokenUsageInfo;
|
|
6178
6190
|
snapshot?: string;
|
|
6179
6191
|
files?: Array<string>;
|
|
6180
6192
|
};
|
|
@@ -6186,16 +6198,8 @@ export type EventSessionStepFailed = {
|
|
|
6186
6198
|
sessionID: string;
|
|
6187
6199
|
assistantMessageID: string;
|
|
6188
6200
|
error: SessionStructuredError;
|
|
6189
|
-
cost?:
|
|
6190
|
-
tokens?:
|
|
6191
|
-
input: number;
|
|
6192
|
-
output: number;
|
|
6193
|
-
reasoning: number;
|
|
6194
|
-
cache: {
|
|
6195
|
-
read: number;
|
|
6196
|
-
write: number;
|
|
6197
|
-
};
|
|
6198
|
-
};
|
|
6201
|
+
cost?: MoneyUsd;
|
|
6202
|
+
tokens?: TokenUsageInfo;
|
|
6199
6203
|
};
|
|
6200
6204
|
};
|
|
6201
6205
|
export type EventSessionTextStarted = {
|
|
@@ -6326,7 +6330,6 @@ export type EventSessionToolSuccess = {
|
|
|
6326
6330
|
[key: string]: unknown;
|
|
6327
6331
|
};
|
|
6328
6332
|
content: Array<LlmToolContent>;
|
|
6329
|
-
outputPaths?: Array<string>;
|
|
6330
6333
|
result?: unknown;
|
|
6331
6334
|
executed: boolean;
|
|
6332
6335
|
resultState?: SessionMessageProviderState;
|
|
@@ -6370,6 +6373,8 @@ export type EventSessionCompactionStarted = {
|
|
|
6370
6373
|
properties: {
|
|
6371
6374
|
sessionID: string;
|
|
6372
6375
|
reason: "auto" | "manual";
|
|
6376
|
+
recent: string;
|
|
6377
|
+
inputID?: string;
|
|
6373
6378
|
};
|
|
6374
6379
|
};
|
|
6375
6380
|
export type EventSessionCompactionDelta = {
|
|
@@ -6395,6 +6400,9 @@ export type EventSessionCompactionFailed = {
|
|
|
6395
6400
|
type: "session.compaction.failed";
|
|
6396
6401
|
properties: {
|
|
6397
6402
|
sessionID: string;
|
|
6403
|
+
reason: "auto" | "manual";
|
|
6404
|
+
error: SessionStructuredError;
|
|
6405
|
+
inputID?: string;
|
|
6398
6406
|
};
|
|
6399
6407
|
};
|
|
6400
6408
|
export type EventSessionRevertStaged = {
|
|
@@ -6402,7 +6410,7 @@ export type EventSessionRevertStaged = {
|
|
|
6402
6410
|
type: "session.revert.staged";
|
|
6403
6411
|
properties: {
|
|
6404
6412
|
sessionID: string;
|
|
6405
|
-
revert:
|
|
6413
|
+
revert: SessionRevert;
|
|
6406
6414
|
};
|
|
6407
6415
|
};
|
|
6408
6416
|
export type EventSessionRevertCleared = {
|
|
@@ -6436,7 +6444,7 @@ export type EventSessionDiff = {
|
|
|
6436
6444
|
type: "session.diff";
|
|
6437
6445
|
properties: {
|
|
6438
6446
|
sessionID: string;
|
|
6439
|
-
diff: Array<
|
|
6447
|
+
diff: Array<FileDiffLegacyInfo>;
|
|
6440
6448
|
};
|
|
6441
6449
|
};
|
|
6442
6450
|
export type EventSessionError = {
|
|
@@ -6891,17 +6899,17 @@ export type CredentialKey = {
|
|
|
6891
6899
|
[key: string]: unknown;
|
|
6892
6900
|
};
|
|
6893
6901
|
};
|
|
6894
|
-
export type
|
|
6902
|
+
export type SkillDirectorySource = {
|
|
6895
6903
|
type: "directory";
|
|
6896
6904
|
path: string;
|
|
6897
6905
|
};
|
|
6898
|
-
export type
|
|
6906
|
+
export type SkillUrlSource = {
|
|
6899
6907
|
type: "url";
|
|
6900
6908
|
url: string;
|
|
6901
6909
|
};
|
|
6902
|
-
export type
|
|
6910
|
+
export type SkillEmbeddedSource = {
|
|
6903
6911
|
type: "embedded";
|
|
6904
|
-
skill:
|
|
6912
|
+
skill: SkillInfo;
|
|
6905
6913
|
};
|
|
6906
6914
|
export type BadRequestError = {
|
|
6907
6915
|
name: "BadRequest";
|
|
@@ -6917,7 +6925,7 @@ export type InvalidRequestErrorV2 = {
|
|
|
6917
6925
|
field?: string | null;
|
|
6918
6926
|
};
|
|
6919
6927
|
export type SessionsResponseV2 = {
|
|
6920
|
-
data: Array<
|
|
6928
|
+
data: Array<SessionInfoV2>;
|
|
6921
6929
|
cursor: {
|
|
6922
6930
|
previous?: string | null;
|
|
6923
6931
|
next?: string | null;
|
|
@@ -6952,74 +6960,22 @@ export type ShellV2 = {
|
|
|
6952
6960
|
shell: string;
|
|
6953
6961
|
file: string;
|
|
6954
6962
|
pid?: number;
|
|
6955
|
-
exit?: number | "NaN" | "Infinity" | "-Infinity"
|
|
6963
|
+
exit?: number | "NaN" | "Infinity" | "-Infinity";
|
|
6956
6964
|
metadata: {
|
|
6957
6965
|
[key: string]: unknown;
|
|
6958
6966
|
};
|
|
6959
6967
|
time: {
|
|
6960
|
-
started: number | "NaN" | "Infinity" | "-Infinity"
|
|
6961
|
-
completed?: number | "NaN" | "Infinity" | "-Infinity"
|
|
6968
|
+
started: number | "NaN" | "Infinity" | "-Infinity";
|
|
6969
|
+
completed?: number | "NaN" | "Infinity" | "-Infinity";
|
|
6962
6970
|
};
|
|
6963
6971
|
};
|
|
6964
6972
|
export type SessionMessagesResponseV2 = {
|
|
6965
|
-
data: Array<
|
|
6973
|
+
data: Array<SessionMessageInfo>;
|
|
6966
6974
|
cursor: {
|
|
6967
6975
|
previous?: string | null;
|
|
6968
6976
|
next?: string | null;
|
|
6969
6977
|
};
|
|
6970
6978
|
};
|
|
6971
|
-
export type SessionV2 = {
|
|
6972
|
-
id: string;
|
|
6973
|
-
slug: string;
|
|
6974
|
-
projectID: string;
|
|
6975
|
-
workspaceID?: string;
|
|
6976
|
-
directory: string;
|
|
6977
|
-
path?: string;
|
|
6978
|
-
parentID?: string;
|
|
6979
|
-
summary?: {
|
|
6980
|
-
additions: number;
|
|
6981
|
-
deletions: number;
|
|
6982
|
-
files: number;
|
|
6983
|
-
diffs?: Array<SnapshotFileDiff>;
|
|
6984
|
-
};
|
|
6985
|
-
cost?: number;
|
|
6986
|
-
tokens?: {
|
|
6987
|
-
input: number;
|
|
6988
|
-
output: number;
|
|
6989
|
-
reasoning: number;
|
|
6990
|
-
cache: {
|
|
6991
|
-
read: number;
|
|
6992
|
-
write: number;
|
|
6993
|
-
};
|
|
6994
|
-
};
|
|
6995
|
-
share?: {
|
|
6996
|
-
url: string;
|
|
6997
|
-
};
|
|
6998
|
-
title: string;
|
|
6999
|
-
agent?: string;
|
|
7000
|
-
model?: {
|
|
7001
|
-
id: string;
|
|
7002
|
-
providerID: string;
|
|
7003
|
-
variant?: string;
|
|
7004
|
-
};
|
|
7005
|
-
version: string;
|
|
7006
|
-
metadata?: {
|
|
7007
|
-
[key: string]: unknown;
|
|
7008
|
-
};
|
|
7009
|
-
time: {
|
|
7010
|
-
created: number;
|
|
7011
|
-
updated: number;
|
|
7012
|
-
compacting?: number;
|
|
7013
|
-
archived?: number;
|
|
7014
|
-
};
|
|
7015
|
-
permission?: PermissionRuleset;
|
|
7016
|
-
revert?: {
|
|
7017
|
-
messageID: string;
|
|
7018
|
-
partID?: string;
|
|
7019
|
-
snapshot?: string;
|
|
7020
|
-
diff?: string;
|
|
7021
|
-
};
|
|
7022
|
-
};
|
|
7023
6979
|
export type OutputFormatV2 = {
|
|
7024
6980
|
type: "text";
|
|
7025
6981
|
} | {
|
|
@@ -7038,7 +6994,7 @@ export type UserMessageV2 = {
|
|
|
7038
6994
|
summary?: {
|
|
7039
6995
|
title?: string | null;
|
|
7040
6996
|
body?: string | null;
|
|
7041
|
-
diffs: Array<
|
|
6997
|
+
diffs: Array<FileDiffLegacyInfo>;
|
|
7042
6998
|
} | null;
|
|
7043
6999
|
agent: string;
|
|
7044
7000
|
model: {
|
|
@@ -7412,8 +7368,9 @@ export type LocationInfoV2 = {
|
|
|
7412
7368
|
};
|
|
7413
7369
|
};
|
|
7414
7370
|
export type AgentColorV2 = string | "primary" | "secondary" | "accent" | "success" | "warning" | "error" | "info";
|
|
7415
|
-
export type
|
|
7371
|
+
export type AgentInfoV2 = {
|
|
7416
7372
|
id: string;
|
|
7373
|
+
name: string;
|
|
7417
7374
|
model?: ModelRef;
|
|
7418
7375
|
request: ProviderRequest;
|
|
7419
7376
|
system?: string;
|
|
@@ -7428,21 +7385,20 @@ export type LocationRefV2 = {
|
|
|
7428
7385
|
directory: string;
|
|
7429
7386
|
workspaceID?: string;
|
|
7430
7387
|
};
|
|
7431
|
-
export type
|
|
7432
|
-
|
|
7433
|
-
|
|
7388
|
+
export type FileDiffInfoV2 = {
|
|
7389
|
+
file: string;
|
|
7390
|
+
patch: string;
|
|
7434
7391
|
additions: number;
|
|
7435
7392
|
deletions: number;
|
|
7436
|
-
|
|
7393
|
+
status: "added" | "deleted" | "modified";
|
|
7437
7394
|
};
|
|
7438
|
-
export type
|
|
7395
|
+
export type SessionRevertV2 = {
|
|
7439
7396
|
messageID: string;
|
|
7440
7397
|
partID?: string;
|
|
7441
7398
|
snapshot?: string;
|
|
7442
|
-
|
|
7443
|
-
files?: Array<FileDiffV2>;
|
|
7399
|
+
files?: Array<FileDiffInfoV2>;
|
|
7444
7400
|
};
|
|
7445
|
-
export type
|
|
7401
|
+
export type SessionInfoV2 = {
|
|
7446
7402
|
id: string;
|
|
7447
7403
|
parentID?: string;
|
|
7448
7404
|
fork?: {
|
|
@@ -7452,16 +7408,8 @@ export type SessionV2InfoV2 = {
|
|
|
7452
7408
|
projectID: string;
|
|
7453
7409
|
agent?: string;
|
|
7454
7410
|
model?: ModelRef;
|
|
7455
|
-
cost:
|
|
7456
|
-
tokens:
|
|
7457
|
-
input: number;
|
|
7458
|
-
output: number;
|
|
7459
|
-
reasoning: number;
|
|
7460
|
-
cache: {
|
|
7461
|
-
read: number;
|
|
7462
|
-
write: number;
|
|
7463
|
-
};
|
|
7464
|
-
};
|
|
7411
|
+
cost: MoneyUsd;
|
|
7412
|
+
tokens: TokenUsageInfo;
|
|
7465
7413
|
time: {
|
|
7466
7414
|
created: number;
|
|
7467
7415
|
updated: number;
|
|
@@ -7470,7 +7418,7 @@ export type SessionV2InfoV2 = {
|
|
|
7470
7418
|
title: string;
|
|
7471
7419
|
location: LocationRefV2;
|
|
7472
7420
|
subpath?: string;
|
|
7473
|
-
revert?:
|
|
7421
|
+
revert?: SessionRevertV2;
|
|
7474
7422
|
};
|
|
7475
7423
|
export type PromptBase64V2 = string;
|
|
7476
7424
|
export type SessionInputAdmittedV2 = {
|
|
@@ -7534,7 +7482,6 @@ export type SessionMessageSyntheticV2 = {
|
|
|
7534
7482
|
time: {
|
|
7535
7483
|
created: number;
|
|
7536
7484
|
};
|
|
7537
|
-
sessionID: string;
|
|
7538
7485
|
text: string;
|
|
7539
7486
|
description?: string;
|
|
7540
7487
|
type: "synthetic";
|
|
@@ -7559,6 +7506,7 @@ export type SessionMessageSkillV2 = {
|
|
|
7559
7506
|
created: number;
|
|
7560
7507
|
};
|
|
7561
7508
|
type: "skill";
|
|
7509
|
+
skill: string;
|
|
7562
7510
|
name: string;
|
|
7563
7511
|
text: string;
|
|
7564
7512
|
};
|
|
@@ -7572,7 +7520,10 @@ export type SessionMessageShellV2 = {
|
|
|
7572
7520
|
completed?: number;
|
|
7573
7521
|
};
|
|
7574
7522
|
type: "shell";
|
|
7575
|
-
|
|
7523
|
+
shellID: string;
|
|
7524
|
+
command: string;
|
|
7525
|
+
status: "running" | "exited" | "timeout" | "killed";
|
|
7526
|
+
exit?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
|
|
7576
7527
|
output?: {
|
|
7577
7528
|
output: string;
|
|
7578
7529
|
cursor: number;
|
|
@@ -7604,25 +7555,27 @@ export type SessionMessageAssistantV2 = {
|
|
|
7604
7555
|
files?: Array<string>;
|
|
7605
7556
|
};
|
|
7606
7557
|
finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
|
|
7607
|
-
cost?:
|
|
7608
|
-
tokens?:
|
|
7609
|
-
input: number;
|
|
7610
|
-
output: number;
|
|
7611
|
-
reasoning: number;
|
|
7612
|
-
cache: {
|
|
7613
|
-
read: number;
|
|
7614
|
-
write: number;
|
|
7615
|
-
};
|
|
7616
|
-
};
|
|
7558
|
+
cost?: MoneyUsd;
|
|
7559
|
+
tokens?: TokenUsageInfo;
|
|
7617
7560
|
error?: SessionStructuredError;
|
|
7618
7561
|
retry?: SessionMessageAssistantRetryV2;
|
|
7619
7562
|
};
|
|
7620
|
-
export type
|
|
7563
|
+
export type SessionMessageCompactionRunningV2 = {
|
|
7621
7564
|
type: "compaction";
|
|
7622
|
-
|
|
7565
|
+
id: string;
|
|
7566
|
+
metadata?: {
|
|
7567
|
+
[key: string]: unknown;
|
|
7568
|
+
};
|
|
7569
|
+
time: {
|
|
7570
|
+
created: number;
|
|
7571
|
+
};
|
|
7572
|
+
status: "running";
|
|
7623
7573
|
reason: "auto" | "manual";
|
|
7624
7574
|
summary: string;
|
|
7625
7575
|
recent: string;
|
|
7576
|
+
};
|
|
7577
|
+
export type SessionMessageCompactionCompletedV2 = {
|
|
7578
|
+
type: "compaction";
|
|
7626
7579
|
id: string;
|
|
7627
7580
|
metadata?: {
|
|
7628
7581
|
[key: string]: unknown;
|
|
@@ -7630,6 +7583,23 @@ export type SessionMessageCompactionV2 = {
|
|
|
7630
7583
|
time: {
|
|
7631
7584
|
created: number;
|
|
7632
7585
|
};
|
|
7586
|
+
status: "completed";
|
|
7587
|
+
reason: "auto" | "manual";
|
|
7588
|
+
summary: string;
|
|
7589
|
+
recent: string;
|
|
7590
|
+
};
|
|
7591
|
+
export type SessionMessageCompactionFailedV2 = {
|
|
7592
|
+
type: "compaction";
|
|
7593
|
+
id: string;
|
|
7594
|
+
metadata?: {
|
|
7595
|
+
[key: string]: unknown;
|
|
7596
|
+
};
|
|
7597
|
+
time: {
|
|
7598
|
+
created: number;
|
|
7599
|
+
};
|
|
7600
|
+
status: "failed";
|
|
7601
|
+
reason: "auto" | "manual";
|
|
7602
|
+
error: SessionStructuredError;
|
|
7633
7603
|
};
|
|
7634
7604
|
/**
|
|
7635
7605
|
* Instruction entry key (lowercase alphanumerics plus . _ -)
|
|
@@ -7645,7 +7615,7 @@ export type SessionAgentSelectedV2 = {
|
|
|
7645
7615
|
durable: {
|
|
7646
7616
|
aggregateID: string;
|
|
7647
7617
|
seq: number;
|
|
7648
|
-
version:
|
|
7618
|
+
version: 1;
|
|
7649
7619
|
};
|
|
7650
7620
|
location?: LocationRefV2;
|
|
7651
7621
|
data: {
|
|
@@ -7663,7 +7633,7 @@ export type SessionModelSelectedV2 = {
|
|
|
7663
7633
|
durable: {
|
|
7664
7634
|
aggregateID: string;
|
|
7665
7635
|
seq: number;
|
|
7666
|
-
version:
|
|
7636
|
+
version: 1;
|
|
7667
7637
|
};
|
|
7668
7638
|
location?: LocationRefV2;
|
|
7669
7639
|
data: {
|
|
@@ -7681,7 +7651,7 @@ export type SessionMovedV2 = {
|
|
|
7681
7651
|
durable: {
|
|
7682
7652
|
aggregateID: string;
|
|
7683
7653
|
seq: number;
|
|
7684
|
-
version:
|
|
7654
|
+
version: 1;
|
|
7685
7655
|
};
|
|
7686
7656
|
location?: LocationRefV2;
|
|
7687
7657
|
data: {
|
|
@@ -7700,7 +7670,7 @@ export type SessionRenamedV2 = {
|
|
|
7700
7670
|
durable: {
|
|
7701
7671
|
aggregateID: string;
|
|
7702
7672
|
seq: number;
|
|
7703
|
-
version:
|
|
7673
|
+
version: 1;
|
|
7704
7674
|
};
|
|
7705
7675
|
location?: LocationRefV2;
|
|
7706
7676
|
data: {
|
|
@@ -7718,7 +7688,7 @@ export type SessionDeletedV2 = {
|
|
|
7718
7688
|
durable: {
|
|
7719
7689
|
aggregateID: string;
|
|
7720
7690
|
seq: number;
|
|
7721
|
-
version:
|
|
7691
|
+
version: 2;
|
|
7722
7692
|
};
|
|
7723
7693
|
location?: LocationRefV2;
|
|
7724
7694
|
data: {
|
|
@@ -7735,7 +7705,7 @@ export type SessionForkedV2 = {
|
|
|
7735
7705
|
durable: {
|
|
7736
7706
|
aggregateID: string;
|
|
7737
7707
|
seq: number;
|
|
7738
|
-
version:
|
|
7708
|
+
version: 1;
|
|
7739
7709
|
};
|
|
7740
7710
|
location?: LocationRefV2;
|
|
7741
7711
|
data: {
|
|
@@ -7754,7 +7724,7 @@ export type SessionPromptPromotedV2 = {
|
|
|
7754
7724
|
durable: {
|
|
7755
7725
|
aggregateID: string;
|
|
7756
7726
|
seq: number;
|
|
7757
|
-
version:
|
|
7727
|
+
version: 1;
|
|
7758
7728
|
};
|
|
7759
7729
|
location?: LocationRefV2;
|
|
7760
7730
|
data: {
|
|
@@ -7772,7 +7742,7 @@ export type SessionPromptAdmittedV2 = {
|
|
|
7772
7742
|
durable: {
|
|
7773
7743
|
aggregateID: string;
|
|
7774
7744
|
seq: number;
|
|
7775
|
-
version:
|
|
7745
|
+
version: 1;
|
|
7776
7746
|
};
|
|
7777
7747
|
location?: LocationRefV2;
|
|
7778
7748
|
data: {
|
|
@@ -7792,7 +7762,7 @@ export type SessionExecutionStartedV2 = {
|
|
|
7792
7762
|
durable: {
|
|
7793
7763
|
aggregateID: string;
|
|
7794
7764
|
seq: number;
|
|
7795
|
-
version:
|
|
7765
|
+
version: 1;
|
|
7796
7766
|
};
|
|
7797
7767
|
location?: LocationRefV2;
|
|
7798
7768
|
data: {
|
|
@@ -7809,7 +7779,7 @@ export type SessionExecutionSucceededV2 = {
|
|
|
7809
7779
|
durable: {
|
|
7810
7780
|
aggregateID: string;
|
|
7811
7781
|
seq: number;
|
|
7812
|
-
version:
|
|
7782
|
+
version: 1;
|
|
7813
7783
|
};
|
|
7814
7784
|
location?: LocationRefV2;
|
|
7815
7785
|
data: {
|
|
@@ -7826,7 +7796,7 @@ export type SessionExecutionFailedV2 = {
|
|
|
7826
7796
|
durable: {
|
|
7827
7797
|
aggregateID: string;
|
|
7828
7798
|
seq: number;
|
|
7829
|
-
version:
|
|
7799
|
+
version: 1;
|
|
7830
7800
|
};
|
|
7831
7801
|
location?: LocationRefV2;
|
|
7832
7802
|
data: {
|
|
@@ -7844,7 +7814,7 @@ export type SessionExecutionInterruptedV2 = {
|
|
|
7844
7814
|
durable: {
|
|
7845
7815
|
aggregateID: string;
|
|
7846
7816
|
seq: number;
|
|
7847
|
-
version:
|
|
7817
|
+
version: 1;
|
|
7848
7818
|
};
|
|
7849
7819
|
location?: LocationRefV2;
|
|
7850
7820
|
data: {
|
|
@@ -7862,7 +7832,7 @@ export type SessionInstructionsUpdatedV2 = {
|
|
|
7862
7832
|
durable: {
|
|
7863
7833
|
aggregateID: string;
|
|
7864
7834
|
seq: number;
|
|
7865
|
-
version:
|
|
7835
|
+
version: 1;
|
|
7866
7836
|
};
|
|
7867
7837
|
location?: LocationRefV2;
|
|
7868
7838
|
data: {
|
|
@@ -7880,7 +7850,7 @@ export type SessionSyntheticV2 = {
|
|
|
7880
7850
|
durable: {
|
|
7881
7851
|
aggregateID: string;
|
|
7882
7852
|
seq: number;
|
|
7883
|
-
version:
|
|
7853
|
+
version: 1;
|
|
7884
7854
|
};
|
|
7885
7855
|
location?: LocationRefV2;
|
|
7886
7856
|
data: {
|
|
@@ -7902,11 +7872,12 @@ export type SessionSkillActivatedV2 = {
|
|
|
7902
7872
|
durable: {
|
|
7903
7873
|
aggregateID: string;
|
|
7904
7874
|
seq: number;
|
|
7905
|
-
version:
|
|
7875
|
+
version: 1;
|
|
7906
7876
|
};
|
|
7907
7877
|
location?: LocationRefV2;
|
|
7908
7878
|
data: {
|
|
7909
7879
|
sessionID: string;
|
|
7880
|
+
id: string;
|
|
7910
7881
|
name: string;
|
|
7911
7882
|
text: string;
|
|
7912
7883
|
};
|
|
@@ -7921,7 +7892,7 @@ export type SessionShellStartedV2 = {
|
|
|
7921
7892
|
durable: {
|
|
7922
7893
|
aggregateID: string;
|
|
7923
7894
|
seq: number;
|
|
7924
|
-
version:
|
|
7895
|
+
version: 1;
|
|
7925
7896
|
};
|
|
7926
7897
|
location?: LocationRefV2;
|
|
7927
7898
|
data: {
|
|
@@ -7939,7 +7910,7 @@ export type SessionShellEndedV2 = {
|
|
|
7939
7910
|
durable: {
|
|
7940
7911
|
aggregateID: string;
|
|
7941
7912
|
seq: number;
|
|
7942
|
-
version:
|
|
7913
|
+
version: 1;
|
|
7943
7914
|
};
|
|
7944
7915
|
location?: LocationRefV2;
|
|
7945
7916
|
data: {
|
|
@@ -7963,7 +7934,7 @@ export type SessionStepStartedV2 = {
|
|
|
7963
7934
|
durable: {
|
|
7964
7935
|
aggregateID: string;
|
|
7965
7936
|
seq: number;
|
|
7966
|
-
version:
|
|
7937
|
+
version: 1;
|
|
7967
7938
|
};
|
|
7968
7939
|
location?: LocationRefV2;
|
|
7969
7940
|
data: {
|
|
@@ -7984,23 +7955,15 @@ export type SessionStepEndedV2 = {
|
|
|
7984
7955
|
durable: {
|
|
7985
7956
|
aggregateID: string;
|
|
7986
7957
|
seq: number;
|
|
7987
|
-
version:
|
|
7958
|
+
version: 1;
|
|
7988
7959
|
};
|
|
7989
7960
|
location?: LocationRefV2;
|
|
7990
7961
|
data: {
|
|
7991
7962
|
sessionID: string;
|
|
7992
7963
|
assistantMessageID: string;
|
|
7993
7964
|
finish: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
|
|
7994
|
-
cost:
|
|
7995
|
-
tokens:
|
|
7996
|
-
input: number;
|
|
7997
|
-
output: number;
|
|
7998
|
-
reasoning: number;
|
|
7999
|
-
cache: {
|
|
8000
|
-
read: number;
|
|
8001
|
-
write: number;
|
|
8002
|
-
};
|
|
8003
|
-
};
|
|
7965
|
+
cost: MoneyUsd;
|
|
7966
|
+
tokens: TokenUsageInfo;
|
|
8004
7967
|
snapshot?: string;
|
|
8005
7968
|
files?: Array<string>;
|
|
8006
7969
|
};
|
|
@@ -8015,23 +7978,15 @@ export type SessionStepFailedV2 = {
|
|
|
8015
7978
|
durable: {
|
|
8016
7979
|
aggregateID: string;
|
|
8017
7980
|
seq: number;
|
|
8018
|
-
version:
|
|
7981
|
+
version: 1;
|
|
8019
7982
|
};
|
|
8020
7983
|
location?: LocationRefV2;
|
|
8021
7984
|
data: {
|
|
8022
7985
|
sessionID: string;
|
|
8023
7986
|
assistantMessageID: string;
|
|
8024
7987
|
error: SessionStructuredError;
|
|
8025
|
-
cost?:
|
|
8026
|
-
tokens?:
|
|
8027
|
-
input: number;
|
|
8028
|
-
output: number;
|
|
8029
|
-
reasoning: number;
|
|
8030
|
-
cache: {
|
|
8031
|
-
read: number;
|
|
8032
|
-
write: number;
|
|
8033
|
-
};
|
|
8034
|
-
};
|
|
7988
|
+
cost?: MoneyUsd;
|
|
7989
|
+
tokens?: TokenUsageInfo;
|
|
8035
7990
|
};
|
|
8036
7991
|
};
|
|
8037
7992
|
export type SessionTextStartedV2 = {
|
|
@@ -8044,7 +7999,7 @@ export type SessionTextStartedV2 = {
|
|
|
8044
7999
|
durable: {
|
|
8045
8000
|
aggregateID: string;
|
|
8046
8001
|
seq: number;
|
|
8047
|
-
version:
|
|
8002
|
+
version: 1;
|
|
8048
8003
|
};
|
|
8049
8004
|
location?: LocationRefV2;
|
|
8050
8005
|
data: {
|
|
@@ -8063,7 +8018,7 @@ export type SessionTextEndedV2 = {
|
|
|
8063
8018
|
durable: {
|
|
8064
8019
|
aggregateID: string;
|
|
8065
8020
|
seq: number;
|
|
8066
|
-
version:
|
|
8021
|
+
version: 1;
|
|
8067
8022
|
};
|
|
8068
8023
|
location?: LocationRefV2;
|
|
8069
8024
|
data: {
|
|
@@ -8086,7 +8041,7 @@ export type SessionReasoningStartedV2 = {
|
|
|
8086
8041
|
durable: {
|
|
8087
8042
|
aggregateID: string;
|
|
8088
8043
|
seq: number;
|
|
8089
|
-
version:
|
|
8044
|
+
version: 1;
|
|
8090
8045
|
};
|
|
8091
8046
|
location?: LocationRefV2;
|
|
8092
8047
|
data: {
|
|
@@ -8109,7 +8064,7 @@ export type SessionReasoningEndedV2 = {
|
|
|
8109
8064
|
durable: {
|
|
8110
8065
|
aggregateID: string;
|
|
8111
8066
|
seq: number;
|
|
8112
|
-
version:
|
|
8067
|
+
version: 1;
|
|
8113
8068
|
};
|
|
8114
8069
|
location?: LocationRefV2;
|
|
8115
8070
|
data: {
|
|
@@ -8130,7 +8085,7 @@ export type SessionToolInputStartedV2 = {
|
|
|
8130
8085
|
durable: {
|
|
8131
8086
|
aggregateID: string;
|
|
8132
8087
|
seq: number;
|
|
8133
|
-
version:
|
|
8088
|
+
version: 1;
|
|
8134
8089
|
};
|
|
8135
8090
|
location?: LocationRefV2;
|
|
8136
8091
|
data: {
|
|
@@ -8150,7 +8105,7 @@ export type SessionToolInputEndedV2 = {
|
|
|
8150
8105
|
durable: {
|
|
8151
8106
|
aggregateID: string;
|
|
8152
8107
|
seq: number;
|
|
8153
|
-
version:
|
|
8108
|
+
version: 1;
|
|
8154
8109
|
};
|
|
8155
8110
|
location?: LocationRefV2;
|
|
8156
8111
|
data: {
|
|
@@ -8173,7 +8128,7 @@ export type SessionToolCalledV2 = {
|
|
|
8173
8128
|
durable: {
|
|
8174
8129
|
aggregateID: string;
|
|
8175
8130
|
seq: number;
|
|
8176
|
-
version:
|
|
8131
|
+
version: 1;
|
|
8177
8132
|
};
|
|
8178
8133
|
location?: LocationRefV2;
|
|
8179
8134
|
data: {
|
|
@@ -8197,7 +8152,7 @@ export type SessionToolProgressV2 = {
|
|
|
8197
8152
|
durable: {
|
|
8198
8153
|
aggregateID: string;
|
|
8199
8154
|
seq: number;
|
|
8200
|
-
version:
|
|
8155
|
+
version: 1;
|
|
8201
8156
|
};
|
|
8202
8157
|
location?: LocationRefV2;
|
|
8203
8158
|
data: {
|
|
@@ -8223,7 +8178,7 @@ export type SessionToolSuccessV2 = {
|
|
|
8223
8178
|
durable: {
|
|
8224
8179
|
aggregateID: string;
|
|
8225
8180
|
seq: number;
|
|
8226
|
-
version:
|
|
8181
|
+
version: 1;
|
|
8227
8182
|
};
|
|
8228
8183
|
location?: LocationRefV2;
|
|
8229
8184
|
data: {
|
|
@@ -8234,7 +8189,6 @@ export type SessionToolSuccessV2 = {
|
|
|
8234
8189
|
[key: string]: unknown;
|
|
8235
8190
|
};
|
|
8236
8191
|
content: Array<LlmToolContent>;
|
|
8237
|
-
outputPaths?: Array<string>;
|
|
8238
8192
|
result?: unknown;
|
|
8239
8193
|
executed: boolean;
|
|
8240
8194
|
resultState?: SessionMessageProviderState6;
|
|
@@ -8253,7 +8207,7 @@ export type SessionToolFailedV2 = {
|
|
|
8253
8207
|
durable: {
|
|
8254
8208
|
aggregateID: string;
|
|
8255
8209
|
seq: number;
|
|
8256
|
-
version:
|
|
8210
|
+
version: 1;
|
|
8257
8211
|
};
|
|
8258
8212
|
location?: LocationRefV2;
|
|
8259
8213
|
data: {
|
|
@@ -8276,7 +8230,7 @@ export type SessionRetryScheduledV2 = {
|
|
|
8276
8230
|
durable: {
|
|
8277
8231
|
aggregateID: string;
|
|
8278
8232
|
seq: number;
|
|
8279
|
-
version:
|
|
8233
|
+
version: 1;
|
|
8280
8234
|
};
|
|
8281
8235
|
location?: LocationRefV2;
|
|
8282
8236
|
data: {
|
|
@@ -8297,7 +8251,7 @@ export type SessionCompactionAdmittedV2 = {
|
|
|
8297
8251
|
durable: {
|
|
8298
8252
|
aggregateID: string;
|
|
8299
8253
|
seq: number;
|
|
8300
|
-
version:
|
|
8254
|
+
version: 1;
|
|
8301
8255
|
};
|
|
8302
8256
|
location?: LocationRefV2;
|
|
8303
8257
|
data: {
|
|
@@ -8315,12 +8269,14 @@ export type SessionCompactionStartedV2 = {
|
|
|
8315
8269
|
durable: {
|
|
8316
8270
|
aggregateID: string;
|
|
8317
8271
|
seq: number;
|
|
8318
|
-
version:
|
|
8272
|
+
version: 1;
|
|
8319
8273
|
};
|
|
8320
8274
|
location?: LocationRefV2;
|
|
8321
8275
|
data: {
|
|
8322
8276
|
sessionID: string;
|
|
8323
8277
|
reason: "auto" | "manual";
|
|
8278
|
+
recent: string;
|
|
8279
|
+
inputID?: string;
|
|
8324
8280
|
};
|
|
8325
8281
|
};
|
|
8326
8282
|
export type SessionCompactionEndedV2 = {
|
|
@@ -8333,7 +8289,7 @@ export type SessionCompactionEndedV2 = {
|
|
|
8333
8289
|
durable: {
|
|
8334
8290
|
aggregateID: string;
|
|
8335
8291
|
seq: number;
|
|
8336
|
-
version:
|
|
8292
|
+
version: 1;
|
|
8337
8293
|
};
|
|
8338
8294
|
location?: LocationRefV2;
|
|
8339
8295
|
data: {
|
|
@@ -8353,11 +8309,14 @@ export type SessionCompactionFailedV2 = {
|
|
|
8353
8309
|
durable: {
|
|
8354
8310
|
aggregateID: string;
|
|
8355
8311
|
seq: number;
|
|
8356
|
-
version:
|
|
8312
|
+
version: 1;
|
|
8357
8313
|
};
|
|
8358
8314
|
location?: LocationRefV2;
|
|
8359
8315
|
data: {
|
|
8360
8316
|
sessionID: string;
|
|
8317
|
+
reason: "auto" | "manual";
|
|
8318
|
+
error: SessionStructuredError;
|
|
8319
|
+
inputID?: string;
|
|
8361
8320
|
};
|
|
8362
8321
|
};
|
|
8363
8322
|
export type SessionRevertStagedV2 = {
|
|
@@ -8370,12 +8329,12 @@ export type SessionRevertStagedV2 = {
|
|
|
8370
8329
|
durable: {
|
|
8371
8330
|
aggregateID: string;
|
|
8372
8331
|
seq: number;
|
|
8373
|
-
version:
|
|
8332
|
+
version: 1;
|
|
8374
8333
|
};
|
|
8375
8334
|
location?: LocationRefV2;
|
|
8376
8335
|
data: {
|
|
8377
8336
|
sessionID: string;
|
|
8378
|
-
revert:
|
|
8337
|
+
revert: SessionRevertV2;
|
|
8379
8338
|
};
|
|
8380
8339
|
};
|
|
8381
8340
|
export type SessionRevertClearedV2 = {
|
|
@@ -8388,7 +8347,7 @@ export type SessionRevertClearedV2 = {
|
|
|
8388
8347
|
durable: {
|
|
8389
8348
|
aggregateID: string;
|
|
8390
8349
|
seq: number;
|
|
8391
|
-
version:
|
|
8350
|
+
version: 1;
|
|
8392
8351
|
};
|
|
8393
8352
|
location?: LocationRefV2;
|
|
8394
8353
|
data: {
|
|
@@ -8405,7 +8364,7 @@ export type SessionRevertCommittedV2 = {
|
|
|
8405
8364
|
durable: {
|
|
8406
8365
|
aggregateID: string;
|
|
8407
8366
|
seq: number;
|
|
8408
|
-
version:
|
|
8367
|
+
version: 1;
|
|
8409
8368
|
};
|
|
8410
8369
|
location?: LocationRefV2;
|
|
8411
8370
|
data: {
|
|
@@ -8572,6 +8531,58 @@ export type AgentUpdatedV2 = {
|
|
|
8572
8531
|
[key: string]: unknown;
|
|
8573
8532
|
} | Array<unknown>;
|
|
8574
8533
|
};
|
|
8534
|
+
export type SessionV1InfoV2 = {
|
|
8535
|
+
id: string;
|
|
8536
|
+
slug: string;
|
|
8537
|
+
projectID: string;
|
|
8538
|
+
workspaceID?: string;
|
|
8539
|
+
directory: string;
|
|
8540
|
+
path?: string;
|
|
8541
|
+
parentID?: string;
|
|
8542
|
+
summary?: {
|
|
8543
|
+
additions: number;
|
|
8544
|
+
deletions: number;
|
|
8545
|
+
files: number;
|
|
8546
|
+
diffs?: Array<FileDiffLegacyInfo>;
|
|
8547
|
+
};
|
|
8548
|
+
cost?: number;
|
|
8549
|
+
tokens?: {
|
|
8550
|
+
input: number;
|
|
8551
|
+
output: number;
|
|
8552
|
+
reasoning: number;
|
|
8553
|
+
cache: {
|
|
8554
|
+
read: number;
|
|
8555
|
+
write: number;
|
|
8556
|
+
};
|
|
8557
|
+
};
|
|
8558
|
+
share?: {
|
|
8559
|
+
url: string;
|
|
8560
|
+
};
|
|
8561
|
+
title: string;
|
|
8562
|
+
agent?: string;
|
|
8563
|
+
model?: {
|
|
8564
|
+
id: string;
|
|
8565
|
+
providerID: string;
|
|
8566
|
+
variant?: string;
|
|
8567
|
+
};
|
|
8568
|
+
version: string;
|
|
8569
|
+
metadata?: {
|
|
8570
|
+
[key: string]: unknown;
|
|
8571
|
+
};
|
|
8572
|
+
time: {
|
|
8573
|
+
created: number;
|
|
8574
|
+
updated: number;
|
|
8575
|
+
compacting?: number;
|
|
8576
|
+
archived?: number;
|
|
8577
|
+
};
|
|
8578
|
+
permission?: PermissionRuleset;
|
|
8579
|
+
revert?: {
|
|
8580
|
+
messageID: string;
|
|
8581
|
+
partID?: string;
|
|
8582
|
+
snapshot?: string;
|
|
8583
|
+
diff?: string;
|
|
8584
|
+
};
|
|
8585
|
+
};
|
|
8575
8586
|
export type SessionCreatedV2 = {
|
|
8576
8587
|
id: string;
|
|
8577
8588
|
created: number;
|
|
@@ -8582,12 +8593,12 @@ export type SessionCreatedV2 = {
|
|
|
8582
8593
|
durable: {
|
|
8583
8594
|
aggregateID: string;
|
|
8584
8595
|
seq: number;
|
|
8585
|
-
version:
|
|
8596
|
+
version: 1;
|
|
8586
8597
|
};
|
|
8587
8598
|
location?: LocationRefV2;
|
|
8588
8599
|
data: {
|
|
8589
8600
|
sessionID: string;
|
|
8590
|
-
info:
|
|
8601
|
+
info: SessionV1InfoV2;
|
|
8591
8602
|
};
|
|
8592
8603
|
};
|
|
8593
8604
|
export type SessionUpdatedV2 = {
|
|
@@ -8600,12 +8611,12 @@ export type SessionUpdatedV2 = {
|
|
|
8600
8611
|
durable: {
|
|
8601
8612
|
aggregateID: string;
|
|
8602
8613
|
seq: number;
|
|
8603
|
-
version:
|
|
8614
|
+
version: 1;
|
|
8604
8615
|
};
|
|
8605
8616
|
location?: LocationRefV2;
|
|
8606
8617
|
data: {
|
|
8607
8618
|
sessionID: string;
|
|
8608
|
-
info:
|
|
8619
|
+
info: SessionV1InfoV2;
|
|
8609
8620
|
};
|
|
8610
8621
|
};
|
|
8611
8622
|
export type SessionDeleted1 = {
|
|
@@ -8618,12 +8629,12 @@ export type SessionDeleted1 = {
|
|
|
8618
8629
|
durable: {
|
|
8619
8630
|
aggregateID: string;
|
|
8620
8631
|
seq: number;
|
|
8621
|
-
version:
|
|
8632
|
+
version: 1;
|
|
8622
8633
|
};
|
|
8623
8634
|
location?: LocationRefV2;
|
|
8624
8635
|
data: {
|
|
8625
8636
|
sessionID: string;
|
|
8626
|
-
info:
|
|
8637
|
+
info: SessionV1InfoV2;
|
|
8627
8638
|
};
|
|
8628
8639
|
};
|
|
8629
8640
|
export type MessageUpdatedV2 = {
|
|
@@ -8636,7 +8647,7 @@ export type MessageUpdatedV2 = {
|
|
|
8636
8647
|
durable: {
|
|
8637
8648
|
aggregateID: string;
|
|
8638
8649
|
seq: number;
|
|
8639
|
-
version:
|
|
8650
|
+
version: 1;
|
|
8640
8651
|
};
|
|
8641
8652
|
location?: LocationRefV2;
|
|
8642
8653
|
data: {
|
|
@@ -8654,7 +8665,7 @@ export type MessageRemovedV2 = {
|
|
|
8654
8665
|
durable: {
|
|
8655
8666
|
aggregateID: string;
|
|
8656
8667
|
seq: number;
|
|
8657
|
-
version:
|
|
8668
|
+
version: 1;
|
|
8658
8669
|
};
|
|
8659
8670
|
location?: LocationRefV2;
|
|
8660
8671
|
data: {
|
|
@@ -8672,7 +8683,7 @@ export type MessagePartUpdatedV2 = {
|
|
|
8672
8683
|
durable: {
|
|
8673
8684
|
aggregateID: string;
|
|
8674
8685
|
seq: number;
|
|
8675
|
-
version:
|
|
8686
|
+
version: 1;
|
|
8676
8687
|
};
|
|
8677
8688
|
location?: LocationRefV2;
|
|
8678
8689
|
data: {
|
|
@@ -8691,7 +8702,7 @@ export type MessagePartRemovedV2 = {
|
|
|
8691
8702
|
durable: {
|
|
8692
8703
|
aggregateID: string;
|
|
8693
8704
|
seq: number;
|
|
8694
|
-
version:
|
|
8705
|
+
version: 1;
|
|
8695
8706
|
};
|
|
8696
8707
|
location?: LocationRefV2;
|
|
8697
8708
|
data: {
|
|
@@ -8710,16 +8721,8 @@ export type SessionUsageUpdatedV2 = {
|
|
|
8710
8721
|
location?: LocationRefV2;
|
|
8711
8722
|
data: {
|
|
8712
8723
|
sessionID: string;
|
|
8713
|
-
cost:
|
|
8714
|
-
tokens:
|
|
8715
|
-
input: number;
|
|
8716
|
-
output: number;
|
|
8717
|
-
reasoning: number;
|
|
8718
|
-
cache: {
|
|
8719
|
-
read: number;
|
|
8720
|
-
write: number;
|
|
8721
|
-
};
|
|
8722
|
-
};
|
|
8724
|
+
cost: MoneyUsd;
|
|
8725
|
+
tokens: TokenUsageInfo;
|
|
8723
8726
|
};
|
|
8724
8727
|
};
|
|
8725
8728
|
export type SessionTextDeltaV2 = {
|
|
@@ -11631,7 +11634,7 @@ export type SessionDiffResponses = {
|
|
|
11631
11634
|
/**
|
|
11632
11635
|
* Successfully retrieved diff
|
|
11633
11636
|
*/
|
|
11634
|
-
200: Array<
|
|
11637
|
+
200: Array<FileDiffLegacyInfo>;
|
|
11635
11638
|
};
|
|
11636
11639
|
export type SessionDiffResponse = SessionDiffResponses[keyof SessionDiffResponses];
|
|
11637
11640
|
export type SessionMessagesData = {
|
|
@@ -12972,7 +12975,7 @@ export type V2AgentListResponses = {
|
|
|
12972
12975
|
*/
|
|
12973
12976
|
200: {
|
|
12974
12977
|
location: LocationInfoV2;
|
|
12975
|
-
data: Array<
|
|
12978
|
+
data: Array<AgentInfoV2>;
|
|
12976
12979
|
};
|
|
12977
12980
|
};
|
|
12978
12981
|
export type V2AgentListResponse = V2AgentListResponses[keyof V2AgentListResponses];
|
|
@@ -13075,7 +13078,7 @@ export type V2SessionCreateResponses = {
|
|
|
13075
13078
|
* Success
|
|
13076
13079
|
*/
|
|
13077
13080
|
200: {
|
|
13078
|
-
data:
|
|
13081
|
+
data: SessionInfoV2;
|
|
13079
13082
|
};
|
|
13080
13083
|
};
|
|
13081
13084
|
export type V2SessionCreateResponse = V2SessionCreateResponses[keyof V2SessionCreateResponses];
|
|
@@ -13165,7 +13168,7 @@ export type V2SessionGetResponses = {
|
|
|
13165
13168
|
* Success
|
|
13166
13169
|
*/
|
|
13167
13170
|
200: {
|
|
13168
|
-
data:
|
|
13171
|
+
data: SessionInfoV2;
|
|
13169
13172
|
};
|
|
13170
13173
|
};
|
|
13171
13174
|
export type V2SessionGetResponse = V2SessionGetResponses[keyof V2SessionGetResponses];
|
|
@@ -13199,7 +13202,7 @@ export type V2SessionForkResponses = {
|
|
|
13199
13202
|
* Success
|
|
13200
13203
|
*/
|
|
13201
13204
|
200: {
|
|
13202
|
-
data:
|
|
13205
|
+
data: SessionInfoV2;
|
|
13203
13206
|
};
|
|
13204
13207
|
};
|
|
13205
13208
|
export type V2SessionForkResponse = V2SessionForkResponses[keyof V2SessionForkResponses];
|
|
@@ -13640,7 +13643,7 @@ export type V2SessionRevertStageResponses = {
|
|
|
13640
13643
|
* Success
|
|
13641
13644
|
*/
|
|
13642
13645
|
200: {
|
|
13643
|
-
data:
|
|
13646
|
+
data: SessionRevertV2;
|
|
13644
13647
|
};
|
|
13645
13648
|
};
|
|
13646
13649
|
export type V2SessionRevertStageResponse = V2SessionRevertStageResponses[keyof V2SessionRevertStageResponses];
|
|
@@ -13748,7 +13751,7 @@ export type V2SessionContextResponses = {
|
|
|
13748
13751
|
* Success
|
|
13749
13752
|
*/
|
|
13750
13753
|
200: {
|
|
13751
|
-
data: Array<
|
|
13754
|
+
data: Array<SessionMessageInfo>;
|
|
13752
13755
|
};
|
|
13753
13756
|
};
|
|
13754
13757
|
export type V2SessionContextResponse = V2SessionContextResponses[keyof V2SessionContextResponses];
|
|
@@ -13974,7 +13977,7 @@ export type V2SessionMessageResponses = {
|
|
|
13974
13977
|
* Success
|
|
13975
13978
|
*/
|
|
13976
13979
|
200: {
|
|
13977
|
-
data:
|
|
13980
|
+
data: SessionMessageInfo;
|
|
13978
13981
|
};
|
|
13979
13982
|
};
|
|
13980
13983
|
export type V2SessionMessageResponse = V2SessionMessageResponses[keyof V2SessionMessageResponses];
|
|
@@ -14054,7 +14057,7 @@ export type V2ModelListResponses = {
|
|
|
14054
14057
|
*/
|
|
14055
14058
|
200: {
|
|
14056
14059
|
location: LocationInfoV2;
|
|
14057
|
-
data: Array<
|
|
14060
|
+
data: Array<ModelInfo>;
|
|
14058
14061
|
};
|
|
14059
14062
|
};
|
|
14060
14063
|
export type V2ModelListResponse = V2ModelListResponses[keyof V2ModelListResponses];
|
|
@@ -14090,7 +14093,7 @@ export type V2ModelDefaultResponses = {
|
|
|
14090
14093
|
*/
|
|
14091
14094
|
200: {
|
|
14092
14095
|
location: LocationInfoV2;
|
|
14093
|
-
data:
|
|
14096
|
+
data: ModelInfo | null;
|
|
14094
14097
|
};
|
|
14095
14098
|
};
|
|
14096
14099
|
export type V2ModelDefaultResponse = V2ModelDefaultResponses[keyof V2ModelDefaultResponses];
|
|
@@ -15249,7 +15252,7 @@ export type V2CommandListResponses = {
|
|
|
15249
15252
|
*/
|
|
15250
15253
|
200: {
|
|
15251
15254
|
location: LocationInfoV2;
|
|
15252
|
-
data: Array<
|
|
15255
|
+
data: Array<CommandInfo>;
|
|
15253
15256
|
};
|
|
15254
15257
|
};
|
|
15255
15258
|
export type V2CommandListResponse = V2CommandListResponses[keyof V2CommandListResponses];
|
|
@@ -15281,7 +15284,7 @@ export type V2SkillListResponses = {
|
|
|
15281
15284
|
*/
|
|
15282
15285
|
200: {
|
|
15283
15286
|
location: LocationInfoV2;
|
|
15284
|
-
data: Array<
|
|
15287
|
+
data: Array<SkillInfo>;
|
|
15285
15288
|
};
|
|
15286
15289
|
};
|
|
15287
15290
|
export type V2SkillListResponse = V2SkillListResponses[keyof V2SkillListResponses];
|
|
@@ -16128,7 +16131,7 @@ export type V2VcsDiffResponses = {
|
|
|
16128
16131
|
*/
|
|
16129
16132
|
200: {
|
|
16130
16133
|
location: LocationInfoV2;
|
|
16131
|
-
data: Array<
|
|
16134
|
+
data: Array<FileDiffInfoV2>;
|
|
16132
16135
|
};
|
|
16133
16136
|
};
|
|
16134
16137
|
export type V2VcsDiffResponse = V2VcsDiffResponses[keyof V2VcsDiffResponses];
|