@codelia/shared-types 0.1.86 → 0.1.90
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/index.cjs +662 -21
- package/dist/index.d.cts +1228 -335
- package/dist/index.d.ts +1228 -335
- package/dist/index.js +591 -20
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,150 +1,333 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
declare const ApprovalModeSchema: z.ZodEnum<{
|
|
4
|
+
minimal: "minimal";
|
|
5
|
+
trusted: "trusted";
|
|
6
|
+
"full-access": "full-access";
|
|
7
|
+
}>;
|
|
8
|
+
type ApprovalMode = z.infer<typeof ApprovalModeSchema>;
|
|
4
9
|
declare const parseApprovalMode: (value: unknown) => ApprovalMode | undefined;
|
|
5
10
|
declare const sandboxModes: readonly ["readonly", "workspace-write", "full-access"];
|
|
6
|
-
|
|
11
|
+
declare const SandboxModeSchema: z.ZodEnum<{
|
|
12
|
+
"full-access": "full-access";
|
|
13
|
+
readonly: "readonly";
|
|
14
|
+
"workspace-write": "workspace-write";
|
|
15
|
+
}>;
|
|
16
|
+
type SandboxMode = z.infer<typeof SandboxModeSchema>;
|
|
7
17
|
declare const parseSandboxMode: (value: unknown) => SandboxMode | undefined;
|
|
8
18
|
|
|
9
19
|
declare const ATTACHMENT_ID_PATTERN: RegExp;
|
|
10
20
|
/** Immutable runtime-owned attachment metadata. No source path is retained. */
|
|
11
|
-
|
|
12
|
-
attachment_id:
|
|
13
|
-
sha256:
|
|
14
|
-
byte_size:
|
|
15
|
-
media_type:
|
|
16
|
-
display_name:
|
|
17
|
-
width
|
|
18
|
-
height
|
|
19
|
-
origin
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
type
|
|
25
|
-
/** Fixed model input representation; absent means the immutable original. */
|
|
26
|
-
type ImageModelView = {
|
|
27
|
-
version: "jpeg-q90-444-v1";
|
|
28
|
-
media_type: "image/jpeg";
|
|
29
|
-
sha256: string;
|
|
30
|
-
byte_size: number;
|
|
31
|
-
};
|
|
32
|
-
declare function isImageModelView(value: unknown): value is ImageModelView;
|
|
33
|
-
/** Durable image identity. Bytes are resolved only at the request/preview boundary. */
|
|
34
|
-
type ImageArtifactRef = {
|
|
35
|
-
artifact_id: string;
|
|
36
|
-
sha256: string;
|
|
37
|
-
media_type: ImageMediaType;
|
|
38
|
-
byte_size: number;
|
|
39
|
-
width: number;
|
|
40
|
-
height: number;
|
|
41
|
-
model_view?: ImageModelView;
|
|
42
|
-
};
|
|
43
|
-
type GeneratedImageMetadata = ImageArtifactRef & {
|
|
44
|
-
kind?: "generated";
|
|
45
|
-
media_type: "image/png" | "image/jpeg";
|
|
46
|
-
created_at: string;
|
|
47
|
-
provider: string;
|
|
48
|
-
requested_model: string;
|
|
49
|
-
effective_model?: string;
|
|
50
|
-
endpoint: string;
|
|
51
|
-
parent_artifact_ids: string[];
|
|
52
|
-
usage?: {
|
|
53
|
-
input_tokens?: number;
|
|
54
|
-
output_tokens?: number;
|
|
55
|
-
cost_usd?: number;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
type AttachedImageMetadata = ImageArtifactRef & {
|
|
59
|
-
kind: "attachment";
|
|
60
|
-
created_at: string;
|
|
61
|
-
};
|
|
62
|
-
type ImageArtifactMetadata = GeneratedImageMetadata | AttachedImageMetadata;
|
|
21
|
+
declare const AttachmentRefSchema: z.ZodObject<{
|
|
22
|
+
attachment_id: z.ZodString;
|
|
23
|
+
sha256: z.ZodString;
|
|
24
|
+
byte_size: z.ZodInt;
|
|
25
|
+
media_type: z.ZodString;
|
|
26
|
+
display_name: z.ZodString;
|
|
27
|
+
width: z.ZodOptional<z.ZodInt>;
|
|
28
|
+
height: z.ZodOptional<z.ZodInt>;
|
|
29
|
+
origin: z.ZodOptional<z.ZodEnum<{
|
|
30
|
+
file: "file";
|
|
31
|
+
clipboard_image: "clipboard_image";
|
|
32
|
+
}>>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
type AttachmentRef = z.infer<typeof AttachmentRefSchema>;
|
|
63
35
|
|
|
64
36
|
/**
|
|
65
37
|
* Message Content Parts
|
|
66
38
|
*/
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
type: "
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
39
|
+
declare const ImageDetailSchema: z.ZodEnum<{
|
|
40
|
+
auto: "auto";
|
|
41
|
+
low: "low";
|
|
42
|
+
high: "high";
|
|
43
|
+
}>;
|
|
44
|
+
declare const ImageRefPartSchema: z.ZodObject<{
|
|
45
|
+
type: z.ZodLiteral<"image_ref">;
|
|
46
|
+
image_ref: z.ZodObject<{
|
|
47
|
+
artifact_id: z.ZodString;
|
|
48
|
+
sha256: z.ZodString;
|
|
49
|
+
media_type: z.ZodEnum<{
|
|
50
|
+
"image/png": "image/png";
|
|
51
|
+
"image/jpeg": "image/jpeg";
|
|
52
|
+
"image/webp": "image/webp";
|
|
53
|
+
"image/gif": "image/gif";
|
|
54
|
+
}>;
|
|
55
|
+
byte_size: z.ZodInt;
|
|
56
|
+
width: z.ZodInt;
|
|
57
|
+
height: z.ZodInt;
|
|
58
|
+
model_view: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
version: z.ZodEnum<{
|
|
60
|
+
"jpeg-q90-444-v1": "jpeg-q90-444-v1";
|
|
61
|
+
}>;
|
|
62
|
+
media_type: z.ZodEnum<{
|
|
63
|
+
"image/jpeg": "image/jpeg";
|
|
64
|
+
}>;
|
|
65
|
+
sha256: z.ZodString;
|
|
66
|
+
byte_size: z.ZodInt;
|
|
67
|
+
}, z.core.$strip>>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
70
|
+
auto: "auto";
|
|
71
|
+
low: "low";
|
|
72
|
+
high: "high";
|
|
73
|
+
}>>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
type ImageRefPart = z.infer<typeof ImageRefPartSchema>;
|
|
76
|
+
declare const AttachmentRefPartSchema: z.ZodObject<{
|
|
77
|
+
type: z.ZodLiteral<"attachment_ref">;
|
|
78
|
+
attachment_ref: z.ZodObject<{
|
|
79
|
+
attachment_id: z.ZodString;
|
|
80
|
+
sha256: z.ZodString;
|
|
81
|
+
byte_size: z.ZodInt;
|
|
82
|
+
media_type: z.ZodString;
|
|
83
|
+
display_name: z.ZodString;
|
|
84
|
+
width: z.ZodOptional<z.ZodInt>;
|
|
85
|
+
height: z.ZodOptional<z.ZodInt>;
|
|
86
|
+
origin: z.ZodOptional<z.ZodEnum<{
|
|
87
|
+
file: "file";
|
|
88
|
+
clipboard_image: "clipboard_image";
|
|
89
|
+
}>>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
image_ref: z.ZodOptional<z.ZodObject<{
|
|
92
|
+
artifact_id: z.ZodString;
|
|
93
|
+
sha256: z.ZodString;
|
|
94
|
+
media_type: z.ZodEnum<{
|
|
95
|
+
"image/png": "image/png";
|
|
96
|
+
"image/jpeg": "image/jpeg";
|
|
97
|
+
"image/webp": "image/webp";
|
|
98
|
+
"image/gif": "image/gif";
|
|
99
|
+
}>;
|
|
100
|
+
byte_size: z.ZodInt;
|
|
101
|
+
width: z.ZodInt;
|
|
102
|
+
height: z.ZodInt;
|
|
103
|
+
model_view: z.ZodOptional<z.ZodObject<{
|
|
104
|
+
version: z.ZodEnum<{
|
|
105
|
+
"jpeg-q90-444-v1": "jpeg-q90-444-v1";
|
|
106
|
+
}>;
|
|
107
|
+
media_type: z.ZodEnum<{
|
|
108
|
+
"image/jpeg": "image/jpeg";
|
|
109
|
+
}>;
|
|
110
|
+
sha256: z.ZodString;
|
|
111
|
+
byte_size: z.ZodInt;
|
|
112
|
+
}, z.core.$strip>>;
|
|
113
|
+
}, z.core.$strip>>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
type AttachmentRefPart = z.infer<typeof AttachmentRefPartSchema>;
|
|
116
|
+
declare const TextPartSchema: z.ZodObject<{
|
|
117
|
+
type: z.ZodLiteral<"text">;
|
|
118
|
+
text: z.ZodString;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
type TextPart = z.infer<typeof TextPartSchema>;
|
|
121
|
+
declare const ImageUrlSchema: z.ZodObject<{
|
|
122
|
+
url: z.ZodString;
|
|
123
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
124
|
+
auto: "auto";
|
|
125
|
+
low: "low";
|
|
126
|
+
high: "high";
|
|
127
|
+
}>>;
|
|
128
|
+
media_type: z.ZodOptional<z.ZodEnum<{
|
|
129
|
+
"image/png": "image/png";
|
|
130
|
+
"image/jpeg": "image/jpeg";
|
|
131
|
+
"image/webp": "image/webp";
|
|
132
|
+
"image/gif": "image/gif";
|
|
133
|
+
}>>;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
declare const ImagePartSchema: z.ZodObject<{
|
|
136
|
+
type: z.ZodLiteral<"image_url">;
|
|
137
|
+
image_url: z.ZodObject<{
|
|
138
|
+
url: z.ZodString;
|
|
139
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
140
|
+
auto: "auto";
|
|
141
|
+
low: "low";
|
|
142
|
+
high: "high";
|
|
143
|
+
}>>;
|
|
144
|
+
media_type: z.ZodOptional<z.ZodEnum<{
|
|
145
|
+
"image/png": "image/png";
|
|
146
|
+
"image/jpeg": "image/jpeg";
|
|
147
|
+
"image/webp": "image/webp";
|
|
148
|
+
"image/gif": "image/gif";
|
|
149
|
+
}>>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
type ImagePart = z.infer<typeof ImagePartSchema>;
|
|
153
|
+
declare const DocumentPartSchema: z.ZodObject<{
|
|
154
|
+
type: z.ZodLiteral<"document">;
|
|
155
|
+
source: z.ZodObject<{
|
|
156
|
+
data: z.ZodString;
|
|
157
|
+
media_type: z.ZodEnum<{
|
|
158
|
+
"application/pdf": "application/pdf";
|
|
159
|
+
}>;
|
|
160
|
+
}, z.core.$strip>;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
type DocumentPart = z.infer<typeof DocumentPartSchema>;
|
|
163
|
+
declare const OtherPartSchema: z.ZodObject<{
|
|
164
|
+
type: z.ZodLiteral<"other">;
|
|
165
|
+
provider: z.ZodString;
|
|
166
|
+
kind: z.ZodString;
|
|
167
|
+
payload: z.ZodUnknown;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
type OtherPart = z.infer<typeof OtherPartSchema>;
|
|
170
|
+
declare const ContentPartSchema: z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
171
|
+
type: z.ZodLiteral<"text">;
|
|
172
|
+
text: z.ZodString;
|
|
173
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
174
|
+
type: z.ZodLiteral<"image_url">;
|
|
175
|
+
image_url: z.ZodObject<{
|
|
176
|
+
url: z.ZodString;
|
|
177
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
178
|
+
auto: "auto";
|
|
179
|
+
low: "low";
|
|
180
|
+
high: "high";
|
|
181
|
+
}>>;
|
|
182
|
+
media_type: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
"image/png": "image/png";
|
|
184
|
+
"image/jpeg": "image/jpeg";
|
|
185
|
+
"image/webp": "image/webp";
|
|
186
|
+
"image/gif": "image/gif";
|
|
187
|
+
}>>;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
190
|
+
type: z.ZodLiteral<"image_ref">;
|
|
191
|
+
image_ref: z.ZodObject<{
|
|
192
|
+
artifact_id: z.ZodString;
|
|
193
|
+
sha256: z.ZodString;
|
|
194
|
+
media_type: z.ZodEnum<{
|
|
195
|
+
"image/png": "image/png";
|
|
196
|
+
"image/jpeg": "image/jpeg";
|
|
197
|
+
"image/webp": "image/webp";
|
|
198
|
+
"image/gif": "image/gif";
|
|
199
|
+
}>;
|
|
200
|
+
byte_size: z.ZodInt;
|
|
201
|
+
width: z.ZodInt;
|
|
202
|
+
height: z.ZodInt;
|
|
203
|
+
model_view: z.ZodOptional<z.ZodObject<{
|
|
204
|
+
version: z.ZodEnum<{
|
|
205
|
+
"jpeg-q90-444-v1": "jpeg-q90-444-v1";
|
|
206
|
+
}>;
|
|
207
|
+
media_type: z.ZodEnum<{
|
|
208
|
+
"image/jpeg": "image/jpeg";
|
|
209
|
+
}>;
|
|
210
|
+
sha256: z.ZodString;
|
|
211
|
+
byte_size: z.ZodInt;
|
|
212
|
+
}, z.core.$strip>>;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
215
|
+
auto: "auto";
|
|
216
|
+
low: "low";
|
|
217
|
+
high: "high";
|
|
218
|
+
}>>;
|
|
219
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
220
|
+
type: z.ZodLiteral<"attachment_ref">;
|
|
221
|
+
attachment_ref: z.ZodObject<{
|
|
222
|
+
attachment_id: z.ZodString;
|
|
223
|
+
sha256: z.ZodString;
|
|
224
|
+
byte_size: z.ZodInt;
|
|
225
|
+
media_type: z.ZodString;
|
|
226
|
+
display_name: z.ZodString;
|
|
227
|
+
width: z.ZodOptional<z.ZodInt>;
|
|
228
|
+
height: z.ZodOptional<z.ZodInt>;
|
|
229
|
+
origin: z.ZodOptional<z.ZodEnum<{
|
|
230
|
+
file: "file";
|
|
231
|
+
clipboard_image: "clipboard_image";
|
|
232
|
+
}>>;
|
|
233
|
+
}, z.core.$strip>;
|
|
234
|
+
image_ref: z.ZodOptional<z.ZodObject<{
|
|
235
|
+
artifact_id: z.ZodString;
|
|
236
|
+
sha256: z.ZodString;
|
|
237
|
+
media_type: z.ZodEnum<{
|
|
238
|
+
"image/png": "image/png";
|
|
239
|
+
"image/jpeg": "image/jpeg";
|
|
240
|
+
"image/webp": "image/webp";
|
|
241
|
+
"image/gif": "image/gif";
|
|
242
|
+
}>;
|
|
243
|
+
byte_size: z.ZodInt;
|
|
244
|
+
width: z.ZodInt;
|
|
245
|
+
height: z.ZodInt;
|
|
246
|
+
model_view: z.ZodOptional<z.ZodObject<{
|
|
247
|
+
version: z.ZodEnum<{
|
|
248
|
+
"jpeg-q90-444-v1": "jpeg-q90-444-v1";
|
|
249
|
+
}>;
|
|
250
|
+
media_type: z.ZodEnum<{
|
|
251
|
+
"image/jpeg": "image/jpeg";
|
|
252
|
+
}>;
|
|
253
|
+
sha256: z.ZodString;
|
|
254
|
+
byte_size: z.ZodInt;
|
|
255
|
+
}, z.core.$strip>>;
|
|
256
|
+
}, z.core.$strip>>;
|
|
257
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
258
|
+
type: z.ZodLiteral<"document">;
|
|
259
|
+
source: z.ZodObject<{
|
|
260
|
+
data: z.ZodString;
|
|
261
|
+
media_type: z.ZodEnum<{
|
|
262
|
+
"application/pdf": "application/pdf";
|
|
263
|
+
}>;
|
|
264
|
+
}, z.core.$strip>;
|
|
265
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
266
|
+
type: z.ZodLiteral<"other">;
|
|
267
|
+
provider: z.ZodString;
|
|
268
|
+
kind: z.ZodString;
|
|
269
|
+
payload: z.ZodUnknown;
|
|
270
|
+
}, z.core.$strip>], "type">;
|
|
271
|
+
type ContentPart = z.infer<typeof ContentPartSchema>;
|
|
103
272
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
273
|
+
declare const ContextUsageCategorySchema: z.ZodEnum<{
|
|
274
|
+
system: "system";
|
|
275
|
+
tools: "tools";
|
|
276
|
+
messages: "messages";
|
|
277
|
+
tool_results: "tool_results";
|
|
278
|
+
images: "images";
|
|
279
|
+
}>;
|
|
280
|
+
type ContextUsageCategory = z.infer<typeof ContextUsageCategorySchema>;
|
|
281
|
+
declare const ContextUsageBreakdownEntrySchema: z.ZodObject<{
|
|
282
|
+
category: z.ZodEnum<{
|
|
283
|
+
system: "system";
|
|
284
|
+
tools: "tools";
|
|
285
|
+
messages: "messages";
|
|
286
|
+
tool_results: "tool_results";
|
|
287
|
+
images: "images";
|
|
288
|
+
}>;
|
|
289
|
+
tokens: z.ZodInt;
|
|
290
|
+
count: z.ZodOptional<z.ZodInt>;
|
|
291
|
+
}, z.core.$strip>;
|
|
292
|
+
type ContextUsageBreakdownEntry = z.infer<typeof ContextUsageBreakdownEntrySchema>;
|
|
112
293
|
/** Context window usage of one agent; produced by core, sent by runtime. */
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
type
|
|
294
|
+
declare const ContextUsageSchema: z.ZodObject<{
|
|
295
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
296
|
+
model: z.ZodNullable<z.ZodString>;
|
|
297
|
+
limit_tokens: z.ZodNullable<z.ZodInt>;
|
|
298
|
+
used_tokens: z.ZodNullable<z.ZodInt>;
|
|
299
|
+
input_tokens: z.ZodNullable<z.ZodInt>;
|
|
300
|
+
left_percent: z.ZodNullable<z.ZodNumber>;
|
|
301
|
+
basis: z.ZodEnum<{
|
|
302
|
+
provider: "provider";
|
|
303
|
+
none: "none";
|
|
304
|
+
}>;
|
|
305
|
+
breakdown: z.ZodArray<z.ZodObject<{
|
|
306
|
+
category: z.ZodEnum<{
|
|
307
|
+
system: "system";
|
|
308
|
+
tools: "tools";
|
|
309
|
+
messages: "messages";
|
|
310
|
+
tool_results: "tool_results";
|
|
311
|
+
images: "images";
|
|
312
|
+
}>;
|
|
313
|
+
tokens: z.ZodInt;
|
|
314
|
+
count: z.ZodOptional<z.ZodInt>;
|
|
315
|
+
}, z.core.$strip>>;
|
|
316
|
+
}, z.core.$strip>;
|
|
317
|
+
type ContextUsage = z.infer<typeof ContextUsageSchema>;
|
|
137
318
|
|
|
138
|
-
|
|
139
|
-
type: "text"
|
|
140
|
-
content:
|
|
141
|
-
timestamp:
|
|
142
|
-
}
|
|
143
|
-
type
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
319
|
+
declare const TextEventSchema: z.ZodObject<{
|
|
320
|
+
type: z.ZodLiteral<"text">;
|
|
321
|
+
content: z.ZodString;
|
|
322
|
+
timestamp: z.ZodInt;
|
|
323
|
+
}, z.core.$strip>;
|
|
324
|
+
type TextEvent = z.infer<typeof TextEventSchema>;
|
|
325
|
+
declare const ReasoningEventSchema: z.ZodObject<{
|
|
326
|
+
type: z.ZodLiteral<"reasoning">;
|
|
327
|
+
content: z.ZodString;
|
|
328
|
+
timestamp: z.ZodInt;
|
|
329
|
+
}, z.core.$strip>;
|
|
330
|
+
type ReasoningEvent = z.infer<typeof ReasoningEventSchema>;
|
|
148
331
|
/**
|
|
149
332
|
* Provisional, ephemeral text streamed while one model call attempt is in progress.
|
|
150
333
|
* `stream_id` identifies the attempt (a retried call gets a new id). `index` groups
|
|
@@ -154,151 +337,727 @@ type ReasoningEvent = {
|
|
|
154
337
|
* it on `llm.retry` or when the run ends without them. Never persisted or replayed.
|
|
155
338
|
* Opt-in via `ui_capabilities.supports_text_delta`. See ui-protocol.md §5.2.
|
|
156
339
|
*/
|
|
157
|
-
|
|
158
|
-
type: "text.delta"
|
|
159
|
-
delta:
|
|
160
|
-
stream_id:
|
|
161
|
-
index:
|
|
162
|
-
}
|
|
340
|
+
declare const TextDeltaEventSchema: z.ZodObject<{
|
|
341
|
+
type: z.ZodLiteral<"text.delta">;
|
|
342
|
+
delta: z.ZodString;
|
|
343
|
+
stream_id: z.ZodString;
|
|
344
|
+
index: z.ZodInt;
|
|
345
|
+
}, z.core.$strip>;
|
|
346
|
+
type TextDeltaEvent = z.infer<typeof TextDeltaEventSchema>;
|
|
163
347
|
/** Reasoning counterpart of `TextDeltaEvent`; the complete `reasoning` event stays authoritative. */
|
|
164
|
-
|
|
165
|
-
type: "reasoning.delta"
|
|
166
|
-
delta:
|
|
167
|
-
stream_id:
|
|
168
|
-
index:
|
|
169
|
-
}
|
|
170
|
-
type
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
348
|
+
declare const ReasoningDeltaEventSchema: z.ZodObject<{
|
|
349
|
+
type: z.ZodLiteral<"reasoning.delta">;
|
|
350
|
+
delta: z.ZodString;
|
|
351
|
+
stream_id: z.ZodString;
|
|
352
|
+
index: z.ZodInt;
|
|
353
|
+
}, z.core.$strip>;
|
|
354
|
+
type ReasoningDeltaEvent = z.infer<typeof ReasoningDeltaEventSchema>;
|
|
355
|
+
declare const LlmRetryEventSchema: z.ZodObject<{
|
|
356
|
+
type: z.ZodLiteral<"llm.retry">;
|
|
357
|
+
provider: z.ZodString;
|
|
358
|
+
failure_kind: z.ZodEnum<{
|
|
359
|
+
provider: "provider";
|
|
360
|
+
rate_limit: "rate_limit";
|
|
361
|
+
overloaded: "overloaded";
|
|
362
|
+
timeout: "timeout";
|
|
363
|
+
network: "network";
|
|
364
|
+
}>;
|
|
365
|
+
next_attempt: z.ZodInt;
|
|
366
|
+
max_attempts: z.ZodInt;
|
|
367
|
+
delay_ms: z.ZodNumber;
|
|
368
|
+
delay_source: z.ZodEnum<{
|
|
369
|
+
"retry-after": "retry-after";
|
|
370
|
+
"reset-header": "reset-header";
|
|
371
|
+
"provider-body": "provider-body";
|
|
372
|
+
backoff: "backoff";
|
|
373
|
+
}>;
|
|
374
|
+
status: z.ZodOptional<z.ZodInt>;
|
|
375
|
+
}, z.core.$strip>;
|
|
376
|
+
type LlmRetryEvent = z.infer<typeof LlmRetryEventSchema>;
|
|
377
|
+
declare const LlmStatusVerificationEventSchema: z.ZodObject<{
|
|
378
|
+
type: z.ZodLiteral<"llm.status">;
|
|
379
|
+
provider: z.ZodEnum<{
|
|
380
|
+
openai: "openai";
|
|
381
|
+
}>;
|
|
382
|
+
kind: z.ZodLiteral<"verification">;
|
|
383
|
+
verification: z.ZodEnum<{
|
|
384
|
+
trusted_access_for_cyber: "trusted_access_for_cyber";
|
|
385
|
+
}>;
|
|
386
|
+
}, z.core.$strip>;
|
|
387
|
+
declare const LlmStatusBufferingEventSchema: z.ZodObject<{
|
|
388
|
+
type: z.ZodLiteral<"llm.status">;
|
|
389
|
+
provider: z.ZodEnum<{
|
|
390
|
+
openai: "openai";
|
|
391
|
+
}>;
|
|
392
|
+
kind: z.ZodLiteral<"buffering">;
|
|
393
|
+
active: z.ZodBoolean;
|
|
394
|
+
faster_model: z.ZodOptional<z.ZodString>;
|
|
395
|
+
}, z.core.$strip>;
|
|
180
396
|
/** Informational provider status; never assistant history or model selection. */
|
|
181
|
-
|
|
182
|
-
type: "llm.status"
|
|
183
|
-
provider:
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
type
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
type: "
|
|
209
|
-
tool:
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
type
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
type: "permission.
|
|
227
|
-
tool:
|
|
228
|
-
tool_call_id
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
type: "
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
397
|
+
declare const LlmStatusEventSchema: z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
398
|
+
type: z.ZodLiteral<"llm.status">;
|
|
399
|
+
provider: z.ZodEnum<{
|
|
400
|
+
openai: "openai";
|
|
401
|
+
}>;
|
|
402
|
+
kind: z.ZodLiteral<"verification">;
|
|
403
|
+
verification: z.ZodEnum<{
|
|
404
|
+
trusted_access_for_cyber: "trusted_access_for_cyber";
|
|
405
|
+
}>;
|
|
406
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
407
|
+
type: z.ZodLiteral<"llm.status">;
|
|
408
|
+
provider: z.ZodEnum<{
|
|
409
|
+
openai: "openai";
|
|
410
|
+
}>;
|
|
411
|
+
kind: z.ZodLiteral<"buffering">;
|
|
412
|
+
active: z.ZodBoolean;
|
|
413
|
+
faster_model: z.ZodOptional<z.ZodString>;
|
|
414
|
+
}, z.core.$strip>], "kind">;
|
|
415
|
+
type LlmStatusEvent = z.infer<typeof LlmStatusEventSchema>;
|
|
416
|
+
declare const StepStartEventSchema: z.ZodObject<{
|
|
417
|
+
type: z.ZodLiteral<"step_start">;
|
|
418
|
+
step_id: z.ZodString;
|
|
419
|
+
title: z.ZodString;
|
|
420
|
+
step_number: z.ZodInt;
|
|
421
|
+
}, z.core.$strip>;
|
|
422
|
+
type StepStartEvent = z.infer<typeof StepStartEventSchema>;
|
|
423
|
+
declare const ToolCallEventSchema: z.ZodObject<{
|
|
424
|
+
type: z.ZodLiteral<"tool_call">;
|
|
425
|
+
tool: z.ZodString;
|
|
426
|
+
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
427
|
+
raw_args: z.ZodOptional<z.ZodString>;
|
|
428
|
+
tool_call_id: z.ZodString;
|
|
429
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
430
|
+
}, z.core.$strip>;
|
|
431
|
+
type ToolCallEvent = z.infer<typeof ToolCallEventSchema>;
|
|
432
|
+
declare const ToolResultEventSchema: z.ZodObject<{
|
|
433
|
+
type: z.ZodLiteral<"tool_result">;
|
|
434
|
+
tool: z.ZodString;
|
|
435
|
+
result: z.ZodString;
|
|
436
|
+
tool_call_id: z.ZodString;
|
|
437
|
+
is_error: z.ZodOptional<z.ZodBoolean>;
|
|
438
|
+
screenshot_base64: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
439
|
+
}, z.core.$strip>;
|
|
440
|
+
type ToolResultEvent = z.infer<typeof ToolResultEventSchema>;
|
|
441
|
+
declare const PermissionPreviewEventSchema: z.ZodObject<{
|
|
442
|
+
type: z.ZodLiteral<"permission.preview">;
|
|
443
|
+
tool: z.ZodString;
|
|
444
|
+
tool_call_id: z.ZodOptional<z.ZodString>;
|
|
445
|
+
file_path: z.ZodOptional<z.ZodString>;
|
|
446
|
+
language: z.ZodOptional<z.ZodString>;
|
|
447
|
+
diff: z.ZodOptional<z.ZodString>;
|
|
448
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
449
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
450
|
+
}, z.core.$strip>;
|
|
451
|
+
type PermissionPreviewEvent = z.infer<typeof PermissionPreviewEventSchema>;
|
|
452
|
+
declare const PermissionReadyEventSchema: z.ZodObject<{
|
|
453
|
+
type: z.ZodLiteral<"permission.ready">;
|
|
454
|
+
tool: z.ZodString;
|
|
455
|
+
tool_call_id: z.ZodOptional<z.ZodString>;
|
|
456
|
+
}, z.core.$strip>;
|
|
457
|
+
type PermissionReadyEvent = z.infer<typeof PermissionReadyEventSchema>;
|
|
458
|
+
declare const StepCompleteEventSchema: z.ZodObject<{
|
|
459
|
+
type: z.ZodLiteral<"step_complete">;
|
|
460
|
+
step_id: z.ZodString;
|
|
461
|
+
status: z.ZodEnum<{
|
|
462
|
+
error: "error";
|
|
463
|
+
completed: "completed";
|
|
464
|
+
}>;
|
|
465
|
+
duration_ms: z.ZodNumber;
|
|
466
|
+
}, z.core.$strip>;
|
|
467
|
+
type StepCompleteEvent = z.infer<typeof StepCompleteEventSchema>;
|
|
468
|
+
declare const CompactionStartEventSchema: z.ZodObject<{
|
|
469
|
+
type: z.ZodLiteral<"compaction_start">;
|
|
470
|
+
timestamp: z.ZodInt;
|
|
471
|
+
}, z.core.$strip>;
|
|
472
|
+
type CompactionStartEvent = z.infer<typeof CompactionStartEventSchema>;
|
|
473
|
+
declare const CompactionCompleteEventSchema: z.ZodObject<{
|
|
474
|
+
type: z.ZodLiteral<"compaction_complete">;
|
|
475
|
+
timestamp: z.ZodInt;
|
|
476
|
+
compacted: z.ZodBoolean;
|
|
477
|
+
}, z.core.$strip>;
|
|
478
|
+
type CompactionCompleteEvent = z.infer<typeof CompactionCompleteEventSchema>;
|
|
479
|
+
declare const HiddenUserMessageEventSchema: z.ZodObject<{
|
|
480
|
+
type: z.ZodLiteral<"hidden_user_message">;
|
|
481
|
+
content: z.ZodString;
|
|
482
|
+
}, z.core.$strip>;
|
|
483
|
+
type HiddenUserMessageEvent = z.infer<typeof HiddenUserMessageEventSchema>;
|
|
484
|
+
declare const SteerAppliedEventSchema: z.ZodObject<{
|
|
485
|
+
type: z.ZodLiteral<"steer_applied">;
|
|
486
|
+
steer_id: z.ZodString;
|
|
487
|
+
client_steer_id: z.ZodOptional<z.ZodString>;
|
|
488
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
489
|
+
type: z.ZodLiteral<"text">;
|
|
490
|
+
text: z.ZodString;
|
|
491
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
492
|
+
type: z.ZodLiteral<"image_url">;
|
|
493
|
+
image_url: z.ZodObject<{
|
|
494
|
+
url: z.ZodString;
|
|
495
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
496
|
+
auto: "auto";
|
|
497
|
+
low: "low";
|
|
498
|
+
high: "high";
|
|
499
|
+
}>>;
|
|
500
|
+
media_type: z.ZodOptional<z.ZodEnum<{
|
|
501
|
+
"image/png": "image/png";
|
|
502
|
+
"image/jpeg": "image/jpeg";
|
|
503
|
+
"image/webp": "image/webp";
|
|
504
|
+
"image/gif": "image/gif";
|
|
505
|
+
}>>;
|
|
506
|
+
}, z.core.$strip>;
|
|
507
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
508
|
+
type: z.ZodLiteral<"image_ref">;
|
|
509
|
+
image_ref: z.ZodObject<{
|
|
510
|
+
artifact_id: z.ZodString;
|
|
511
|
+
sha256: z.ZodString;
|
|
512
|
+
media_type: z.ZodEnum<{
|
|
513
|
+
"image/png": "image/png";
|
|
514
|
+
"image/jpeg": "image/jpeg";
|
|
515
|
+
"image/webp": "image/webp";
|
|
516
|
+
"image/gif": "image/gif";
|
|
517
|
+
}>;
|
|
518
|
+
byte_size: z.ZodInt;
|
|
519
|
+
width: z.ZodInt;
|
|
520
|
+
height: z.ZodInt;
|
|
521
|
+
model_view: z.ZodOptional<z.ZodObject<{
|
|
522
|
+
version: z.ZodEnum<{
|
|
523
|
+
"jpeg-q90-444-v1": "jpeg-q90-444-v1";
|
|
524
|
+
}>;
|
|
525
|
+
media_type: z.ZodEnum<{
|
|
526
|
+
"image/jpeg": "image/jpeg";
|
|
527
|
+
}>;
|
|
528
|
+
sha256: z.ZodString;
|
|
529
|
+
byte_size: z.ZodInt;
|
|
530
|
+
}, z.core.$strip>>;
|
|
531
|
+
}, z.core.$strip>;
|
|
532
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
533
|
+
auto: "auto";
|
|
534
|
+
low: "low";
|
|
535
|
+
high: "high";
|
|
536
|
+
}>>;
|
|
537
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
538
|
+
type: z.ZodLiteral<"attachment_ref">;
|
|
539
|
+
attachment_ref: z.ZodObject<{
|
|
540
|
+
attachment_id: z.ZodString;
|
|
541
|
+
sha256: z.ZodString;
|
|
542
|
+
byte_size: z.ZodInt;
|
|
543
|
+
media_type: z.ZodString;
|
|
544
|
+
display_name: z.ZodString;
|
|
545
|
+
width: z.ZodOptional<z.ZodInt>;
|
|
546
|
+
height: z.ZodOptional<z.ZodInt>;
|
|
547
|
+
origin: z.ZodOptional<z.ZodEnum<{
|
|
548
|
+
file: "file";
|
|
549
|
+
clipboard_image: "clipboard_image";
|
|
550
|
+
}>>;
|
|
551
|
+
}, z.core.$strip>;
|
|
552
|
+
image_ref: z.ZodOptional<z.ZodObject<{
|
|
553
|
+
artifact_id: z.ZodString;
|
|
554
|
+
sha256: z.ZodString;
|
|
555
|
+
media_type: z.ZodEnum<{
|
|
556
|
+
"image/png": "image/png";
|
|
557
|
+
"image/jpeg": "image/jpeg";
|
|
558
|
+
"image/webp": "image/webp";
|
|
559
|
+
"image/gif": "image/gif";
|
|
560
|
+
}>;
|
|
561
|
+
byte_size: z.ZodInt;
|
|
562
|
+
width: z.ZodInt;
|
|
563
|
+
height: z.ZodInt;
|
|
564
|
+
model_view: z.ZodOptional<z.ZodObject<{
|
|
565
|
+
version: z.ZodEnum<{
|
|
566
|
+
"jpeg-q90-444-v1": "jpeg-q90-444-v1";
|
|
567
|
+
}>;
|
|
568
|
+
media_type: z.ZodEnum<{
|
|
569
|
+
"image/jpeg": "image/jpeg";
|
|
570
|
+
}>;
|
|
571
|
+
sha256: z.ZodString;
|
|
572
|
+
byte_size: z.ZodInt;
|
|
573
|
+
}, z.core.$strip>>;
|
|
574
|
+
}, z.core.$strip>>;
|
|
575
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
576
|
+
type: z.ZodLiteral<"document">;
|
|
577
|
+
source: z.ZodObject<{
|
|
578
|
+
data: z.ZodString;
|
|
579
|
+
media_type: z.ZodEnum<{
|
|
580
|
+
"application/pdf": "application/pdf";
|
|
581
|
+
}>;
|
|
582
|
+
}, z.core.$strip>;
|
|
583
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
584
|
+
type: z.ZodLiteral<"other">;
|
|
585
|
+
provider: z.ZodString;
|
|
586
|
+
kind: z.ZodString;
|
|
587
|
+
payload: z.ZodUnknown;
|
|
588
|
+
}, z.core.$strip>], "type">>]>;
|
|
589
|
+
timestamp: z.ZodInt;
|
|
590
|
+
}, z.core.$strip>;
|
|
591
|
+
type SteerAppliedEvent = z.infer<typeof SteerAppliedEventSchema>;
|
|
592
|
+
declare const FinalResponseEventSchema: z.ZodObject<{
|
|
593
|
+
type: z.ZodLiteral<"final">;
|
|
594
|
+
content: z.ZodString;
|
|
595
|
+
termination_reason: z.ZodOptional<z.ZodEnum<{
|
|
596
|
+
normal: "normal";
|
|
597
|
+
max_steps: "max_steps";
|
|
598
|
+
permission_denied: "permission_denied";
|
|
599
|
+
}>>;
|
|
600
|
+
}, z.core.$strip>;
|
|
601
|
+
type FinalResponseEvent = z.infer<typeof FinalResponseEventSchema>;
|
|
602
|
+
/** Persisted and replayed: new variants and optional fields only. */
|
|
603
|
+
declare const AgentEventSchema: z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
604
|
+
type: z.ZodLiteral<"text">;
|
|
605
|
+
content: z.ZodString;
|
|
606
|
+
timestamp: z.ZodInt;
|
|
607
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
608
|
+
type: z.ZodLiteral<"reasoning">;
|
|
609
|
+
content: z.ZodString;
|
|
610
|
+
timestamp: z.ZodInt;
|
|
611
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
612
|
+
type: z.ZodLiteral<"text.delta">;
|
|
613
|
+
delta: z.ZodString;
|
|
614
|
+
stream_id: z.ZodString;
|
|
615
|
+
index: z.ZodInt;
|
|
616
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
617
|
+
type: z.ZodLiteral<"reasoning.delta">;
|
|
618
|
+
delta: z.ZodString;
|
|
619
|
+
stream_id: z.ZodString;
|
|
620
|
+
index: z.ZodInt;
|
|
621
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
622
|
+
type: z.ZodLiteral<"llm.retry">;
|
|
623
|
+
provider: z.ZodString;
|
|
624
|
+
failure_kind: z.ZodEnum<{
|
|
625
|
+
provider: "provider";
|
|
626
|
+
rate_limit: "rate_limit";
|
|
627
|
+
overloaded: "overloaded";
|
|
628
|
+
timeout: "timeout";
|
|
629
|
+
network: "network";
|
|
630
|
+
}>;
|
|
631
|
+
next_attempt: z.ZodInt;
|
|
632
|
+
max_attempts: z.ZodInt;
|
|
633
|
+
delay_ms: z.ZodNumber;
|
|
634
|
+
delay_source: z.ZodEnum<{
|
|
635
|
+
"retry-after": "retry-after";
|
|
636
|
+
"reset-header": "reset-header";
|
|
637
|
+
"provider-body": "provider-body";
|
|
638
|
+
backoff: "backoff";
|
|
639
|
+
}>;
|
|
640
|
+
status: z.ZodOptional<z.ZodInt>;
|
|
641
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
642
|
+
type: z.ZodLiteral<"llm.status">;
|
|
643
|
+
provider: z.ZodEnum<{
|
|
644
|
+
openai: "openai";
|
|
645
|
+
}>;
|
|
646
|
+
kind: z.ZodLiteral<"verification">;
|
|
647
|
+
verification: z.ZodEnum<{
|
|
648
|
+
trusted_access_for_cyber: "trusted_access_for_cyber";
|
|
649
|
+
}>;
|
|
650
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
651
|
+
type: z.ZodLiteral<"llm.status">;
|
|
652
|
+
provider: z.ZodEnum<{
|
|
653
|
+
openai: "openai";
|
|
654
|
+
}>;
|
|
655
|
+
kind: z.ZodLiteral<"buffering">;
|
|
656
|
+
active: z.ZodBoolean;
|
|
657
|
+
faster_model: z.ZodOptional<z.ZodString>;
|
|
658
|
+
}, z.core.$strip>], "kind">, z.ZodObject<{
|
|
659
|
+
type: z.ZodLiteral<"step_start">;
|
|
660
|
+
step_id: z.ZodString;
|
|
661
|
+
title: z.ZodString;
|
|
662
|
+
step_number: z.ZodInt;
|
|
663
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
664
|
+
type: z.ZodLiteral<"tool_call">;
|
|
665
|
+
tool: z.ZodString;
|
|
666
|
+
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
667
|
+
raw_args: z.ZodOptional<z.ZodString>;
|
|
668
|
+
tool_call_id: z.ZodString;
|
|
669
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
670
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
671
|
+
type: z.ZodLiteral<"tool_result">;
|
|
672
|
+
tool: z.ZodString;
|
|
673
|
+
result: z.ZodString;
|
|
674
|
+
tool_call_id: z.ZodString;
|
|
675
|
+
is_error: z.ZodOptional<z.ZodBoolean>;
|
|
676
|
+
screenshot_base64: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
677
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
678
|
+
type: z.ZodLiteral<"permission.preview">;
|
|
679
|
+
tool: z.ZodString;
|
|
680
|
+
tool_call_id: z.ZodOptional<z.ZodString>;
|
|
681
|
+
file_path: z.ZodOptional<z.ZodString>;
|
|
682
|
+
language: z.ZodOptional<z.ZodString>;
|
|
683
|
+
diff: z.ZodOptional<z.ZodString>;
|
|
684
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
685
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
686
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
687
|
+
type: z.ZodLiteral<"permission.ready">;
|
|
688
|
+
tool: z.ZodString;
|
|
689
|
+
tool_call_id: z.ZodOptional<z.ZodString>;
|
|
690
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
691
|
+
type: z.ZodLiteral<"step_complete">;
|
|
692
|
+
step_id: z.ZodString;
|
|
693
|
+
status: z.ZodEnum<{
|
|
694
|
+
error: "error";
|
|
695
|
+
completed: "completed";
|
|
696
|
+
}>;
|
|
697
|
+
duration_ms: z.ZodNumber;
|
|
698
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
699
|
+
type: z.ZodLiteral<"compaction_start">;
|
|
700
|
+
timestamp: z.ZodInt;
|
|
701
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
702
|
+
type: z.ZodLiteral<"compaction_complete">;
|
|
703
|
+
timestamp: z.ZodInt;
|
|
704
|
+
compacted: z.ZodBoolean;
|
|
705
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
706
|
+
type: z.ZodLiteral<"hidden_user_message">;
|
|
707
|
+
content: z.ZodString;
|
|
708
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
709
|
+
type: z.ZodLiteral<"steer_applied">;
|
|
710
|
+
steer_id: z.ZodString;
|
|
711
|
+
client_steer_id: z.ZodOptional<z.ZodString>;
|
|
712
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
713
|
+
type: z.ZodLiteral<"text">;
|
|
714
|
+
text: z.ZodString;
|
|
715
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
716
|
+
type: z.ZodLiteral<"image_url">;
|
|
717
|
+
image_url: z.ZodObject<{
|
|
718
|
+
url: z.ZodString;
|
|
719
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
720
|
+
auto: "auto";
|
|
721
|
+
low: "low";
|
|
722
|
+
high: "high";
|
|
723
|
+
}>>;
|
|
724
|
+
media_type: z.ZodOptional<z.ZodEnum<{
|
|
725
|
+
"image/png": "image/png";
|
|
726
|
+
"image/jpeg": "image/jpeg";
|
|
727
|
+
"image/webp": "image/webp";
|
|
728
|
+
"image/gif": "image/gif";
|
|
729
|
+
}>>;
|
|
730
|
+
}, z.core.$strip>;
|
|
731
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
732
|
+
type: z.ZodLiteral<"image_ref">;
|
|
733
|
+
image_ref: z.ZodObject<{
|
|
734
|
+
artifact_id: z.ZodString;
|
|
735
|
+
sha256: z.ZodString;
|
|
736
|
+
media_type: z.ZodEnum<{
|
|
737
|
+
"image/png": "image/png";
|
|
738
|
+
"image/jpeg": "image/jpeg";
|
|
739
|
+
"image/webp": "image/webp";
|
|
740
|
+
"image/gif": "image/gif";
|
|
741
|
+
}>;
|
|
742
|
+
byte_size: z.ZodInt;
|
|
743
|
+
width: z.ZodInt;
|
|
744
|
+
height: z.ZodInt;
|
|
745
|
+
model_view: z.ZodOptional<z.ZodObject<{
|
|
746
|
+
version: z.ZodEnum<{
|
|
747
|
+
"jpeg-q90-444-v1": "jpeg-q90-444-v1";
|
|
748
|
+
}>;
|
|
749
|
+
media_type: z.ZodEnum<{
|
|
750
|
+
"image/jpeg": "image/jpeg";
|
|
751
|
+
}>;
|
|
752
|
+
sha256: z.ZodString;
|
|
753
|
+
byte_size: z.ZodInt;
|
|
754
|
+
}, z.core.$strip>>;
|
|
755
|
+
}, z.core.$strip>;
|
|
756
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
757
|
+
auto: "auto";
|
|
758
|
+
low: "low";
|
|
759
|
+
high: "high";
|
|
760
|
+
}>>;
|
|
761
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
762
|
+
type: z.ZodLiteral<"attachment_ref">;
|
|
763
|
+
attachment_ref: z.ZodObject<{
|
|
764
|
+
attachment_id: z.ZodString;
|
|
765
|
+
sha256: z.ZodString;
|
|
766
|
+
byte_size: z.ZodInt;
|
|
767
|
+
media_type: z.ZodString;
|
|
768
|
+
display_name: z.ZodString;
|
|
769
|
+
width: z.ZodOptional<z.ZodInt>;
|
|
770
|
+
height: z.ZodOptional<z.ZodInt>;
|
|
771
|
+
origin: z.ZodOptional<z.ZodEnum<{
|
|
772
|
+
file: "file";
|
|
773
|
+
clipboard_image: "clipboard_image";
|
|
774
|
+
}>>;
|
|
775
|
+
}, z.core.$strip>;
|
|
776
|
+
image_ref: z.ZodOptional<z.ZodObject<{
|
|
777
|
+
artifact_id: z.ZodString;
|
|
778
|
+
sha256: z.ZodString;
|
|
779
|
+
media_type: z.ZodEnum<{
|
|
780
|
+
"image/png": "image/png";
|
|
781
|
+
"image/jpeg": "image/jpeg";
|
|
782
|
+
"image/webp": "image/webp";
|
|
783
|
+
"image/gif": "image/gif";
|
|
784
|
+
}>;
|
|
785
|
+
byte_size: z.ZodInt;
|
|
786
|
+
width: z.ZodInt;
|
|
787
|
+
height: z.ZodInt;
|
|
788
|
+
model_view: z.ZodOptional<z.ZodObject<{
|
|
789
|
+
version: z.ZodEnum<{
|
|
790
|
+
"jpeg-q90-444-v1": "jpeg-q90-444-v1";
|
|
791
|
+
}>;
|
|
792
|
+
media_type: z.ZodEnum<{
|
|
793
|
+
"image/jpeg": "image/jpeg";
|
|
794
|
+
}>;
|
|
795
|
+
sha256: z.ZodString;
|
|
796
|
+
byte_size: z.ZodInt;
|
|
797
|
+
}, z.core.$strip>>;
|
|
798
|
+
}, z.core.$strip>>;
|
|
799
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
800
|
+
type: z.ZodLiteral<"document">;
|
|
801
|
+
source: z.ZodObject<{
|
|
802
|
+
data: z.ZodString;
|
|
803
|
+
media_type: z.ZodEnum<{
|
|
804
|
+
"application/pdf": "application/pdf";
|
|
805
|
+
}>;
|
|
806
|
+
}, z.core.$strip>;
|
|
807
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
808
|
+
type: z.ZodLiteral<"other">;
|
|
809
|
+
provider: z.ZodString;
|
|
810
|
+
kind: z.ZodString;
|
|
811
|
+
payload: z.ZodUnknown;
|
|
812
|
+
}, z.core.$strip>], "type">>]>;
|
|
813
|
+
timestamp: z.ZodInt;
|
|
814
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
815
|
+
type: z.ZodLiteral<"final">;
|
|
816
|
+
content: z.ZodString;
|
|
817
|
+
termination_reason: z.ZodOptional<z.ZodEnum<{
|
|
818
|
+
normal: "normal";
|
|
819
|
+
max_steps: "max_steps";
|
|
820
|
+
permission_denied: "permission_denied";
|
|
821
|
+
}>>;
|
|
822
|
+
}, z.core.$strip>], "type">;
|
|
823
|
+
type AgentEvent = z.infer<typeof AgentEventSchema>;
|
|
824
|
+
|
|
825
|
+
/** Persistence/schema safety ceiling, not a provider capability promise. */
|
|
826
|
+
declare const IMAGE_REFERENCE_MAX_COUNT = 16;
|
|
827
|
+
declare const ImageMediaTypeSchema: z.ZodEnum<{
|
|
828
|
+
"image/png": "image/png";
|
|
829
|
+
"image/jpeg": "image/jpeg";
|
|
830
|
+
"image/webp": "image/webp";
|
|
831
|
+
"image/gif": "image/gif";
|
|
832
|
+
}>;
|
|
833
|
+
type ImageMediaType = z.infer<typeof ImageMediaTypeSchema>;
|
|
834
|
+
/** Fixed model input representation; absent means the immutable original. */
|
|
835
|
+
declare const ImageModelViewSchema: z.ZodObject<{
|
|
836
|
+
version: z.ZodEnum<{
|
|
837
|
+
"jpeg-q90-444-v1": "jpeg-q90-444-v1";
|
|
838
|
+
}>;
|
|
839
|
+
media_type: z.ZodEnum<{
|
|
840
|
+
"image/jpeg": "image/jpeg";
|
|
841
|
+
}>;
|
|
842
|
+
sha256: z.ZodString;
|
|
843
|
+
byte_size: z.ZodInt;
|
|
844
|
+
}, z.core.$strip>;
|
|
845
|
+
type ImageModelView = z.infer<typeof ImageModelViewSchema>;
|
|
846
|
+
declare function isImageModelView(value: unknown): value is ImageModelView;
|
|
847
|
+
/** Durable image identity. Bytes are resolved only at the request/preview boundary. */
|
|
848
|
+
declare const ImageArtifactRefSchema: z.ZodObject<{
|
|
849
|
+
artifact_id: z.ZodString;
|
|
850
|
+
sha256: z.ZodString;
|
|
851
|
+
media_type: z.ZodEnum<{
|
|
852
|
+
"image/png": "image/png";
|
|
853
|
+
"image/jpeg": "image/jpeg";
|
|
854
|
+
"image/webp": "image/webp";
|
|
855
|
+
"image/gif": "image/gif";
|
|
856
|
+
}>;
|
|
857
|
+
byte_size: z.ZodInt;
|
|
858
|
+
width: z.ZodInt;
|
|
859
|
+
height: z.ZodInt;
|
|
860
|
+
model_view: z.ZodOptional<z.ZodObject<{
|
|
861
|
+
version: z.ZodEnum<{
|
|
862
|
+
"jpeg-q90-444-v1": "jpeg-q90-444-v1";
|
|
863
|
+
}>;
|
|
864
|
+
media_type: z.ZodEnum<{
|
|
865
|
+
"image/jpeg": "image/jpeg";
|
|
866
|
+
}>;
|
|
867
|
+
sha256: z.ZodString;
|
|
868
|
+
byte_size: z.ZodInt;
|
|
869
|
+
}, z.core.$strip>>;
|
|
870
|
+
}, z.core.$strip>;
|
|
871
|
+
type ImageArtifactRef = z.infer<typeof ImageArtifactRefSchema>;
|
|
872
|
+
declare const ImageGenerationUsageSchema: z.ZodObject<{
|
|
873
|
+
input_tokens: z.ZodOptional<z.ZodInt>;
|
|
874
|
+
output_tokens: z.ZodOptional<z.ZodInt>;
|
|
875
|
+
cost_usd: z.ZodOptional<z.ZodNumber>;
|
|
876
|
+
}, z.core.$strip>;
|
|
877
|
+
/** A generated image. Metadata written before `kind` existed omits it. */
|
|
878
|
+
declare const GeneratedImageMetadataSchema: z.ZodObject<{
|
|
879
|
+
artifact_id: z.ZodString;
|
|
880
|
+
sha256: z.ZodString;
|
|
881
|
+
byte_size: z.ZodInt;
|
|
882
|
+
width: z.ZodInt;
|
|
883
|
+
height: z.ZodInt;
|
|
884
|
+
model_view: z.ZodOptional<z.ZodObject<{
|
|
885
|
+
version: z.ZodEnum<{
|
|
886
|
+
"jpeg-q90-444-v1": "jpeg-q90-444-v1";
|
|
887
|
+
}>;
|
|
888
|
+
media_type: z.ZodEnum<{
|
|
889
|
+
"image/jpeg": "image/jpeg";
|
|
890
|
+
}>;
|
|
891
|
+
sha256: z.ZodString;
|
|
892
|
+
byte_size: z.ZodInt;
|
|
893
|
+
}, z.core.$strip>>;
|
|
894
|
+
kind: z.ZodOptional<z.ZodLiteral<"generated">>;
|
|
895
|
+
media_type: z.ZodEnum<{
|
|
896
|
+
"image/png": "image/png";
|
|
897
|
+
"image/jpeg": "image/jpeg";
|
|
898
|
+
}>;
|
|
899
|
+
created_at: z.ZodString;
|
|
900
|
+
provider: z.ZodString;
|
|
901
|
+
requested_model: z.ZodString;
|
|
902
|
+
effective_model: z.ZodOptional<z.ZodString>;
|
|
903
|
+
endpoint: z.ZodString;
|
|
904
|
+
parent_artifact_ids: z.ZodArray<z.ZodString>;
|
|
905
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
906
|
+
input_tokens: z.ZodOptional<z.ZodInt>;
|
|
907
|
+
output_tokens: z.ZodOptional<z.ZodInt>;
|
|
908
|
+
cost_usd: z.ZodOptional<z.ZodNumber>;
|
|
909
|
+
}, z.core.$strip>>;
|
|
910
|
+
}, z.core.$strip>;
|
|
911
|
+
type GeneratedImageMetadata = z.infer<typeof GeneratedImageMetadataSchema>;
|
|
912
|
+
declare const AttachedImageMetadataSchema: z.ZodObject<{
|
|
913
|
+
artifact_id: z.ZodString;
|
|
914
|
+
sha256: z.ZodString;
|
|
915
|
+
media_type: z.ZodEnum<{
|
|
916
|
+
"image/png": "image/png";
|
|
917
|
+
"image/jpeg": "image/jpeg";
|
|
918
|
+
"image/webp": "image/webp";
|
|
919
|
+
"image/gif": "image/gif";
|
|
920
|
+
}>;
|
|
921
|
+
byte_size: z.ZodInt;
|
|
922
|
+
width: z.ZodInt;
|
|
923
|
+
height: z.ZodInt;
|
|
924
|
+
model_view: z.ZodOptional<z.ZodObject<{
|
|
925
|
+
version: z.ZodEnum<{
|
|
926
|
+
"jpeg-q90-444-v1": "jpeg-q90-444-v1";
|
|
927
|
+
}>;
|
|
928
|
+
media_type: z.ZodEnum<{
|
|
929
|
+
"image/jpeg": "image/jpeg";
|
|
930
|
+
}>;
|
|
931
|
+
sha256: z.ZodString;
|
|
932
|
+
byte_size: z.ZodInt;
|
|
933
|
+
}, z.core.$strip>>;
|
|
934
|
+
kind: z.ZodLiteral<"attachment">;
|
|
935
|
+
created_at: z.ZodString;
|
|
936
|
+
}, z.core.$strip>;
|
|
937
|
+
type AttachedImageMetadata = z.infer<typeof AttachedImageMetadataSchema>;
|
|
938
|
+
declare const ImageArtifactMetadataSchema: z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
939
|
+
artifact_id: z.ZodString;
|
|
940
|
+
sha256: z.ZodString;
|
|
941
|
+
byte_size: z.ZodInt;
|
|
942
|
+
width: z.ZodInt;
|
|
943
|
+
height: z.ZodInt;
|
|
944
|
+
model_view: z.ZodOptional<z.ZodObject<{
|
|
945
|
+
version: z.ZodEnum<{
|
|
946
|
+
"jpeg-q90-444-v1": "jpeg-q90-444-v1";
|
|
947
|
+
}>;
|
|
948
|
+
media_type: z.ZodEnum<{
|
|
949
|
+
"image/jpeg": "image/jpeg";
|
|
950
|
+
}>;
|
|
951
|
+
sha256: z.ZodString;
|
|
952
|
+
byte_size: z.ZodInt;
|
|
953
|
+
}, z.core.$strip>>;
|
|
954
|
+
kind: z.ZodOptional<z.ZodLiteral<"generated">>;
|
|
955
|
+
media_type: z.ZodEnum<{
|
|
956
|
+
"image/png": "image/png";
|
|
957
|
+
"image/jpeg": "image/jpeg";
|
|
958
|
+
}>;
|
|
959
|
+
created_at: z.ZodString;
|
|
960
|
+
provider: z.ZodString;
|
|
961
|
+
requested_model: z.ZodString;
|
|
962
|
+
effective_model: z.ZodOptional<z.ZodString>;
|
|
963
|
+
endpoint: z.ZodString;
|
|
964
|
+
parent_artifact_ids: z.ZodArray<z.ZodString>;
|
|
965
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
966
|
+
input_tokens: z.ZodOptional<z.ZodInt>;
|
|
967
|
+
output_tokens: z.ZodOptional<z.ZodInt>;
|
|
968
|
+
cost_usd: z.ZodOptional<z.ZodNumber>;
|
|
969
|
+
}, z.core.$strip>>;
|
|
970
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
971
|
+
artifact_id: z.ZodString;
|
|
972
|
+
sha256: z.ZodString;
|
|
973
|
+
media_type: z.ZodEnum<{
|
|
974
|
+
"image/png": "image/png";
|
|
975
|
+
"image/jpeg": "image/jpeg";
|
|
976
|
+
"image/webp": "image/webp";
|
|
977
|
+
"image/gif": "image/gif";
|
|
978
|
+
}>;
|
|
979
|
+
byte_size: z.ZodInt;
|
|
980
|
+
width: z.ZodInt;
|
|
981
|
+
height: z.ZodInt;
|
|
982
|
+
model_view: z.ZodOptional<z.ZodObject<{
|
|
983
|
+
version: z.ZodEnum<{
|
|
984
|
+
"jpeg-q90-444-v1": "jpeg-q90-444-v1";
|
|
985
|
+
}>;
|
|
986
|
+
media_type: z.ZodEnum<{
|
|
987
|
+
"image/jpeg": "image/jpeg";
|
|
988
|
+
}>;
|
|
989
|
+
sha256: z.ZodString;
|
|
990
|
+
byte_size: z.ZodInt;
|
|
991
|
+
}, z.core.$strip>>;
|
|
992
|
+
kind: z.ZodLiteral<"attachment">;
|
|
993
|
+
created_at: z.ZodString;
|
|
994
|
+
}, z.core.$strip>], "kind">;
|
|
995
|
+
type ImageArtifactMetadata = z.infer<typeof ImageArtifactMetadataSchema>;
|
|
261
996
|
|
|
262
997
|
/** Observed successful stream timing, measured with a monotonic clock. */
|
|
263
|
-
|
|
264
|
-
time_to_first_token_ms:
|
|
265
|
-
generation_duration_ms:
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
998
|
+
declare const LlmCallTimingSchema: z.ZodObject<{
|
|
999
|
+
time_to_first_token_ms: z.ZodNumber;
|
|
1000
|
+
generation_duration_ms: z.ZodNumber;
|
|
1001
|
+
generation_start_ms: z.ZodOptional<z.ZodNumber>;
|
|
1002
|
+
generation_start_source: z.ZodOptional<z.ZodEnum<{
|
|
1003
|
+
reasoning_item: "reasoning_item";
|
|
1004
|
+
thought_step: "thought_step";
|
|
1005
|
+
}>>;
|
|
1006
|
+
}, z.core.$strip>;
|
|
1007
|
+
type LlmCallTiming = z.infer<typeof LlmCallTimingSchema>;
|
|
270
1008
|
|
|
1009
|
+
/** Named speed tiers beyond the boolean Fast switch. */
|
|
1010
|
+
declare const ModelSpeedTierSchema: z.ZodEnum<{
|
|
1011
|
+
ultrafast: "ultrafast";
|
|
1012
|
+
}>;
|
|
271
1013
|
/** Explicit speed selection; booleans preserve the original fast-mode contract. */
|
|
272
|
-
|
|
1014
|
+
declare const ModelFastModeSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
|
|
1015
|
+
ultrafast: "ultrafast";
|
|
1016
|
+
}>]>;
|
|
1017
|
+
type ModelFastMode = z.infer<typeof ModelFastModeSchema>;
|
|
273
1018
|
declare const isModelFastMode: (value: unknown) => value is ModelFastMode;
|
|
274
1019
|
declare const MODEL_REASONING_LEVELS: readonly ["low", "medium", "high", "xhigh", "max"];
|
|
275
|
-
|
|
1020
|
+
declare const ModelReasoningLevelSchema: z.ZodEnum<{
|
|
1021
|
+
low: "low";
|
|
1022
|
+
high: "high";
|
|
1023
|
+
medium: "medium";
|
|
1024
|
+
xhigh: "xhigh";
|
|
1025
|
+
max: "max";
|
|
1026
|
+
}>;
|
|
1027
|
+
type ModelReasoningLevel = z.infer<typeof ModelReasoningLevelSchema>;
|
|
276
1028
|
declare const isModelReasoningLevel: (value: string) => value is ModelReasoningLevel;
|
|
277
1029
|
|
|
1030
|
+
type BuiltinProviderName = "openai" | "anthropic" | "openrouter" | "google" | "deepseek" | "moonshot" | "zai" | "xai";
|
|
1031
|
+
/** Runtime endpoint names are configured independently of builtin adapters. */
|
|
1032
|
+
declare const ProviderNameSchema: z.ZodString;
|
|
1033
|
+
type ProviderName = z.infer<typeof ProviderNameSchema>;
|
|
1034
|
+
|
|
278
1035
|
/** Safe failure-only context for status notifications and retained errors. */
|
|
279
|
-
|
|
280
|
-
name:
|
|
281
|
-
message:
|
|
282
|
-
provider
|
|
283
|
-
kind
|
|
284
|
-
status
|
|
285
|
-
code
|
|
286
|
-
attempts
|
|
287
|
-
max_attempts
|
|
288
|
-
detail
|
|
289
|
-
hint
|
|
290
|
-
}
|
|
1036
|
+
declare const RunErrorInfoSchema: z.ZodObject<{
|
|
1037
|
+
name: z.ZodString;
|
|
1038
|
+
message: z.ZodString;
|
|
1039
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
1040
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
1041
|
+
status: z.ZodOptional<z.ZodInt>;
|
|
1042
|
+
code: z.ZodOptional<z.ZodString>;
|
|
1043
|
+
attempts: z.ZodOptional<z.ZodInt>;
|
|
1044
|
+
max_attempts: z.ZodOptional<z.ZodInt>;
|
|
1045
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1046
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
1047
|
+
}, z.core.$strip>;
|
|
1048
|
+
type RunErrorInfo = z.infer<typeof RunErrorInfoSchema>;
|
|
291
1049
|
|
|
292
|
-
|
|
293
|
-
session_id:
|
|
294
|
-
updated_at:
|
|
295
|
-
run_id
|
|
296
|
-
message_count
|
|
297
|
-
last_user_message
|
|
298
|
-
workspace_root
|
|
299
|
-
pinned
|
|
300
|
-
archived_at
|
|
301
|
-
}
|
|
1050
|
+
declare const SessionStateSummarySchema: z.ZodObject<{
|
|
1051
|
+
session_id: z.ZodString;
|
|
1052
|
+
updated_at: z.ZodString;
|
|
1053
|
+
run_id: z.ZodOptional<z.ZodString>;
|
|
1054
|
+
message_count: z.ZodOptional<z.ZodInt>;
|
|
1055
|
+
last_user_message: z.ZodOptional<z.ZodString>;
|
|
1056
|
+
workspace_root: z.ZodOptional<z.ZodString>;
|
|
1057
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
1058
|
+
archived_at: z.ZodOptional<z.ZodString>;
|
|
1059
|
+
}, z.core.$strip>;
|
|
1060
|
+
type SessionStateSummary = z.infer<typeof SessionStateSummarySchema>;
|
|
302
1061
|
|
|
303
1062
|
declare const SkillScopeSchema: z.ZodEnum<{
|
|
304
1063
|
repo: "repo";
|
|
@@ -375,47 +1134,78 @@ type SkillSearchReason = z.infer<typeof SkillSearchReasonSchema>;
|
|
|
375
1134
|
type SkillSearchResult = z.infer<typeof SkillSearchResultSchema>;
|
|
376
1135
|
|
|
377
1136
|
/** Stable delegated-task metadata shared by runtime, storage, and protocol. */
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
1137
|
+
declare const TaskTerminationReasonSchema: z.ZodEnum<{
|
|
1138
|
+
timeout: "timeout";
|
|
1139
|
+
normal: "normal";
|
|
1140
|
+
max_steps: "max_steps";
|
|
1141
|
+
cancelled: "cancelled";
|
|
1142
|
+
startup_error: "startup_error";
|
|
1143
|
+
execution_error: "execution_error";
|
|
1144
|
+
}>;
|
|
1145
|
+
type TaskTerminationReason = z.infer<typeof TaskTerminationReasonSchema>;
|
|
1146
|
+
declare const SubagentLineageSchema: z.ZodObject<{
|
|
1147
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1148
|
+
tree_id: z.ZodString;
|
|
1149
|
+
node_id: z.ZodString;
|
|
1150
|
+
parent_node_id: z.ZodString;
|
|
1151
|
+
owner_session_id: z.ZodString;
|
|
1152
|
+
depth: z.ZodLiteral<1>;
|
|
1153
|
+
spawn_index: z.ZodInt;
|
|
1154
|
+
context_mode: z.ZodEnum<{
|
|
1155
|
+
fresh: "fresh";
|
|
1156
|
+
}>;
|
|
1157
|
+
effective_policy_id: z.ZodString;
|
|
1158
|
+
workspace_lease_id: z.ZodString;
|
|
1159
|
+
}, z.core.$strip>;
|
|
1160
|
+
type SubagentLineage = z.infer<typeof SubagentLineageSchema>;
|
|
1161
|
+
declare const TaskUsageSchema: z.ZodObject<{
|
|
1162
|
+
total_tokens: z.ZodInt;
|
|
1163
|
+
total_cost_usd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1164
|
+
}, z.core.$strip>;
|
|
1165
|
+
type TaskUsage = z.infer<typeof TaskUsageSchema>;
|
|
1166
|
+
declare const TaskProgressCurrentToolSchema: z.ZodObject<{
|
|
1167
|
+
name: z.ZodString;
|
|
1168
|
+
tool_call_id: z.ZodString;
|
|
1169
|
+
started_at: z.ZodString;
|
|
1170
|
+
}, z.core.$strip>;
|
|
1171
|
+
declare const TaskProgressLastToolSchema: z.ZodObject<{
|
|
1172
|
+
name: z.ZodString;
|
|
1173
|
+
status: z.ZodEnum<{
|
|
1174
|
+
error: "error";
|
|
1175
|
+
ok: "ok";
|
|
1176
|
+
}>;
|
|
1177
|
+
finished_at: z.ZodString;
|
|
1178
|
+
}, z.core.$strip>;
|
|
396
1179
|
/**
|
|
397
1180
|
* Parent-visible progress of a running subagent. Counts, phase and tool names
|
|
398
1181
|
* only; arguments and results stay in the child session.
|
|
399
1182
|
*/
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
1183
|
+
declare const TaskProgressSchema: z.ZodObject<{
|
|
1184
|
+
step: z.ZodInt;
|
|
1185
|
+
max_steps: z.ZodOptional<z.ZodInt>;
|
|
1186
|
+
phase: z.ZodEnum<{
|
|
1187
|
+
model: "model";
|
|
1188
|
+
tool: "tool";
|
|
1189
|
+
compacting: "compacting";
|
|
1190
|
+
finishing: "finishing";
|
|
1191
|
+
}>;
|
|
1192
|
+
current_tool: z.ZodOptional<z.ZodObject<{
|
|
1193
|
+
name: z.ZodString;
|
|
1194
|
+
tool_call_id: z.ZodString;
|
|
1195
|
+
started_at: z.ZodString;
|
|
1196
|
+
}, z.core.$strip>>;
|
|
1197
|
+
last_tool: z.ZodOptional<z.ZodObject<{
|
|
1198
|
+
name: z.ZodString;
|
|
1199
|
+
status: z.ZodEnum<{
|
|
1200
|
+
error: "error";
|
|
1201
|
+
ok: "ok";
|
|
1202
|
+
}>;
|
|
1203
|
+
finished_at: z.ZodString;
|
|
1204
|
+
}, z.core.$strip>>;
|
|
1205
|
+
tool_calls: z.ZodInt;
|
|
1206
|
+
updated_at: z.ZodString;
|
|
1207
|
+
}, z.core.$strip>;
|
|
1208
|
+
type TaskProgress = z.infer<typeof TaskProgressSchema>;
|
|
419
1209
|
/** Stored peer content is untrusted; accepted does not mean acted on by a model. */
|
|
420
1210
|
type AgentMessage = {
|
|
421
1211
|
message_id: string;
|
|
@@ -427,37 +1217,140 @@ type AgentMessage = {
|
|
|
427
1217
|
content: string;
|
|
428
1218
|
};
|
|
429
1219
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
type
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
1220
|
+
/** JSON Schema key that states what `null` means on an optional field. */
|
|
1221
|
+
declare const WIRE_PRESENCE_KEY = "x-codelia-presence";
|
|
1222
|
+
/** JSON Schema key that names the discriminator of a tagged union. */
|
|
1223
|
+
declare const WIRE_TAG_KEY = "x-codelia-tag";
|
|
1224
|
+
/** JSON Schema key that marks a union told apart by a required key. */
|
|
1225
|
+
declare const WIRE_KEYED_KEY = "x-codelia-keyed";
|
|
1226
|
+
/** JSON Schema key for a number that Rust senders write as an integer. */
|
|
1227
|
+
declare const WIRE_ENCODE_KEY = "x-codelia-encode";
|
|
1228
|
+
/** Integer on the wire: counters, sequence numbers, sizes, ms timestamps. */
|
|
1229
|
+
declare const wireInt: () => z.ZodInt;
|
|
1230
|
+
/**
|
|
1231
|
+
* A UI-sent count, limit or position that the runtime truncates. Any number
|
|
1232
|
+
* is accepted (protocol version 0 always did); Rust senders write integers.
|
|
1233
|
+
* Not allowed where the TUI decodes.
|
|
1234
|
+
*/
|
|
1235
|
+
declare const wireCount: () => z.ZodNumber;
|
|
1236
|
+
/** Optional field where absent keeps, `null` clears and a value sets. */
|
|
1237
|
+
declare const clearable: <T extends z.ZodType>(schema: T) => z.ZodOptional<z.ZodNullable<T>>;
|
|
1238
|
+
/** Optional field where absent and `null` both mean "not reported". */
|
|
1239
|
+
declare const nullish: <T extends z.ZodType>(schema: T) => z.ZodOptional<z.ZodNullable<T>>;
|
|
1240
|
+
/**
|
|
1241
|
+
* Union discriminated by a literal at `tag`. Branch literals are unique
|
|
1242
|
+
* strings, or exactly `true` and `false`. One string-tagged branch may make
|
|
1243
|
+
* its literal optional; a value without the tag then belongs to it (for
|
|
1244
|
+
* payloads written before the tag existed). Every tagged union is a named wire
|
|
1245
|
+
* type, so `meta.id` is required.
|
|
1246
|
+
*/
|
|
1247
|
+
declare const tagged: <Tag extends string, const Branches extends readonly [z.core.$ZodTypeDiscriminable<Tag>, ...z.core.$ZodTypeDiscriminable<Tag>[]]>(tag: Tag, branches: Branches, meta: {
|
|
1248
|
+
id: string;
|
|
1249
|
+
description?: string;
|
|
1250
|
+
}) => z.ZodDiscriminatedUnion<Branches, Tag>;
|
|
1251
|
+
/**
|
|
1252
|
+
* Union of named object branches without a shared discriminator. Each branch
|
|
1253
|
+
* must have a required key that no other branch declares; receivers pick the
|
|
1254
|
+
* branch by which of those keys is present. Prefer `tagged` for new shapes.
|
|
1255
|
+
*/
|
|
1256
|
+
declare const keyed: <const Branches extends readonly [z.ZodObject, z.ZodObject, ...z.ZodObject[]]>(branches: Branches, meta: {
|
|
1257
|
+
id: string;
|
|
1258
|
+
description?: string;
|
|
1259
|
+
}) => z.ZodUnion<Branches>;
|
|
1260
|
+
|
|
1261
|
+
declare const GoalStatusSchema: z.ZodEnum<{
|
|
1262
|
+
active: "active";
|
|
1263
|
+
paused: "paused";
|
|
1264
|
+
blocked: "blocked";
|
|
1265
|
+
usage_limited: "usage_limited";
|
|
1266
|
+
budget_limited: "budget_limited";
|
|
1267
|
+
complete: "complete";
|
|
1268
|
+
}>;
|
|
1269
|
+
type GoalStatus = z.infer<typeof GoalStatusSchema>;
|
|
1270
|
+
declare const GoalStopReasonSchema: z.ZodEnum<{
|
|
1271
|
+
user: "user";
|
|
1272
|
+
turn_limit: "turn_limit";
|
|
1273
|
+
run_error: "run_error";
|
|
1274
|
+
checkpoint_failed: "checkpoint_failed";
|
|
1275
|
+
interrupted: "interrupted";
|
|
1276
|
+
blocker: "blocker";
|
|
1277
|
+
}>;
|
|
1278
|
+
type GoalStopReason = z.infer<typeof GoalStopReasonSchema>;
|
|
1279
|
+
declare const GoalRecordSchema: z.ZodObject<{
|
|
1280
|
+
session_id: z.ZodString;
|
|
1281
|
+
goal_id: z.ZodString;
|
|
1282
|
+
revision: z.ZodInt;
|
|
1283
|
+
objective: z.ZodString;
|
|
1284
|
+
status: z.ZodEnum<{
|
|
1285
|
+
active: "active";
|
|
1286
|
+
paused: "paused";
|
|
1287
|
+
blocked: "blocked";
|
|
1288
|
+
usage_limited: "usage_limited";
|
|
1289
|
+
budget_limited: "budget_limited";
|
|
1290
|
+
complete: "complete";
|
|
1291
|
+
}>;
|
|
1292
|
+
stop_reason: z.ZodOptional<z.ZodEnum<{
|
|
1293
|
+
user: "user";
|
|
1294
|
+
turn_limit: "turn_limit";
|
|
1295
|
+
run_error: "run_error";
|
|
1296
|
+
checkpoint_failed: "checkpoint_failed";
|
|
1297
|
+
interrupted: "interrupted";
|
|
1298
|
+
blocker: "blocker";
|
|
1299
|
+
}>>;
|
|
1300
|
+
stop_detail: z.ZodOptional<z.ZodString>;
|
|
1301
|
+
token_budget: z.ZodNullable<z.ZodInt>;
|
|
1302
|
+
tokens_used: z.ZodInt;
|
|
1303
|
+
usage_known: z.ZodBoolean;
|
|
1304
|
+
activation_id: z.ZodString;
|
|
1305
|
+
automatic_runs: z.ZodInt;
|
|
1306
|
+
created_at: z.ZodString;
|
|
1307
|
+
updated_at: z.ZodString;
|
|
1308
|
+
}, z.core.$strip>;
|
|
1309
|
+
type GoalRecord = z.infer<typeof GoalRecordSchema>;
|
|
1310
|
+
declare const GoalSnapshotSchema: z.ZodObject<{
|
|
1311
|
+
session_id: z.ZodNullable<z.ZodString>;
|
|
1312
|
+
goal: z.ZodNullable<z.ZodObject<{
|
|
1313
|
+
session_id: z.ZodString;
|
|
1314
|
+
goal_id: z.ZodString;
|
|
1315
|
+
revision: z.ZodInt;
|
|
1316
|
+
objective: z.ZodString;
|
|
1317
|
+
status: z.ZodEnum<{
|
|
1318
|
+
active: "active";
|
|
1319
|
+
paused: "paused";
|
|
1320
|
+
blocked: "blocked";
|
|
1321
|
+
usage_limited: "usage_limited";
|
|
1322
|
+
budget_limited: "budget_limited";
|
|
1323
|
+
complete: "complete";
|
|
1324
|
+
}>;
|
|
1325
|
+
stop_reason: z.ZodOptional<z.ZodEnum<{
|
|
1326
|
+
user: "user";
|
|
1327
|
+
turn_limit: "turn_limit";
|
|
1328
|
+
run_error: "run_error";
|
|
1329
|
+
checkpoint_failed: "checkpoint_failed";
|
|
1330
|
+
interrupted: "interrupted";
|
|
1331
|
+
blocker: "blocker";
|
|
1332
|
+
}>>;
|
|
1333
|
+
stop_detail: z.ZodOptional<z.ZodString>;
|
|
1334
|
+
token_budget: z.ZodNullable<z.ZodInt>;
|
|
1335
|
+
tokens_used: z.ZodInt;
|
|
1336
|
+
usage_known: z.ZodBoolean;
|
|
1337
|
+
activation_id: z.ZodString;
|
|
1338
|
+
automatic_runs: z.ZodInt;
|
|
1339
|
+
created_at: z.ZodString;
|
|
1340
|
+
updated_at: z.ZodString;
|
|
1341
|
+
}, z.core.$strip>>;
|
|
1342
|
+
can_continue: z.ZodBoolean;
|
|
1343
|
+
accepted_run_id: z.ZodOptional<z.ZodString>;
|
|
1344
|
+
active_run_id: z.ZodOptional<z.ZodString>;
|
|
1345
|
+
}, z.core.$strip>;
|
|
1346
|
+
type GoalSnapshot = z.infer<typeof GoalSnapshotSchema>;
|
|
1347
|
+
declare const GoalOfferSchema: z.ZodObject<{
|
|
1348
|
+
session_id: z.ZodString;
|
|
1349
|
+
goal_id: z.ZodString;
|
|
1350
|
+
revision: z.ZodInt;
|
|
1351
|
+
continuation_id: z.ZodString;
|
|
1352
|
+
after_run_id: z.ZodOptional<z.ZodString>;
|
|
1353
|
+
}, z.core.$strip>;
|
|
1354
|
+
type GoalOffer = z.infer<typeof GoalOfferSchema>;
|
|
462
1355
|
|
|
463
|
-
export { ATTACHMENT_ID_PATTERN, type AgentEvent, type AgentMessage, type ApprovalMode, type AttachedImageMetadata, type AttachmentRef, type AttachmentRefPart, type BuiltinProviderName, type CompactionCompleteEvent, type CompactionStartEvent, type ContentPart, type ContextUsage, type ContextUsageBreakdownEntry, type ContextUsageCategory, type DocumentPart, type FinalResponseEvent, type GeneratedImageMetadata, type GoalOffer, type GoalRecord, type GoalSnapshot, type GoalStatus, type GoalStopReason, type HiddenUserMessageEvent, IMAGE_REFERENCE_MAX_COUNT, type ImageArtifactMetadata, type ImageArtifactRef, type ImageMediaType, type ImageModelView, type ImagePart, type ImageRefPart, type LlmCallTiming, type LlmRetryEvent, type LlmStatusEvent, MODEL_REASONING_LEVELS, type ModelFastMode, type ModelReasoningLevel, type OtherPart, type PermissionPreviewEvent, type PermissionReadyEvent, type ProviderName, type ReasoningDeltaEvent, type ReasoningEvent, type RunErrorInfo, type SandboxMode, type SessionStateSummary, type SkillCatalog, SkillCatalogSchema, type SkillLoadError, SkillLoadErrorSchema, type SkillMetadata, SkillMetadataSchema, type SkillScope, SkillScopeSchema, type SkillSearchReason, SkillSearchReasonSchema, type SkillSearchResult, SkillSearchResultSchema, type SteerAppliedEvent, type StepCompleteEvent, type StepStartEvent, type SubagentLineage, type TaskProgress, type TaskTerminationReason, type TaskUsage, type TextDeltaEvent, type TextEvent, type TextPart, type ToolCallEvent, type ToolResultEvent, isImageModelView, isModelFastMode, isModelReasoningLevel, parseApprovalMode, parseSandboxMode, sandboxModes };
|
|
1356
|
+
export { ATTACHMENT_ID_PATTERN, type AgentEvent, AgentEventSchema, type AgentMessage, type ApprovalMode, ApprovalModeSchema, type AttachedImageMetadata, AttachedImageMetadataSchema, type AttachmentRef, type AttachmentRefPart, AttachmentRefPartSchema, AttachmentRefSchema, type BuiltinProviderName, type CompactionCompleteEvent, CompactionCompleteEventSchema, type CompactionStartEvent, CompactionStartEventSchema, type ContentPart, ContentPartSchema, type ContextUsage, type ContextUsageBreakdownEntry, ContextUsageBreakdownEntrySchema, type ContextUsageCategory, ContextUsageCategorySchema, ContextUsageSchema, type DocumentPart, DocumentPartSchema, type FinalResponseEvent, FinalResponseEventSchema, type GeneratedImageMetadata, GeneratedImageMetadataSchema, type GoalOffer, GoalOfferSchema, type GoalRecord, GoalRecordSchema, type GoalSnapshot, GoalSnapshotSchema, type GoalStatus, GoalStatusSchema, type GoalStopReason, GoalStopReasonSchema, type HiddenUserMessageEvent, HiddenUserMessageEventSchema, IMAGE_REFERENCE_MAX_COUNT, type ImageArtifactMetadata, ImageArtifactMetadataSchema, type ImageArtifactRef, ImageArtifactRefSchema, ImageDetailSchema, ImageGenerationUsageSchema, type ImageMediaType, ImageMediaTypeSchema, type ImageModelView, ImageModelViewSchema, type ImagePart, ImagePartSchema, type ImageRefPart, ImageRefPartSchema, ImageUrlSchema, type LlmCallTiming, LlmCallTimingSchema, type LlmRetryEvent, LlmRetryEventSchema, LlmStatusBufferingEventSchema, type LlmStatusEvent, LlmStatusEventSchema, LlmStatusVerificationEventSchema, MODEL_REASONING_LEVELS, type ModelFastMode, ModelFastModeSchema, type ModelReasoningLevel, ModelReasoningLevelSchema, ModelSpeedTierSchema, type OtherPart, OtherPartSchema, type PermissionPreviewEvent, PermissionPreviewEventSchema, type PermissionReadyEvent, PermissionReadyEventSchema, type ProviderName, ProviderNameSchema, type ReasoningDeltaEvent, ReasoningDeltaEventSchema, type ReasoningEvent, ReasoningEventSchema, type RunErrorInfo, RunErrorInfoSchema, type SandboxMode, SandboxModeSchema, type SessionStateSummary, SessionStateSummarySchema, type SkillCatalog, SkillCatalogSchema, type SkillLoadError, SkillLoadErrorSchema, type SkillMetadata, SkillMetadataSchema, type SkillScope, SkillScopeSchema, type SkillSearchReason, SkillSearchReasonSchema, type SkillSearchResult, SkillSearchResultSchema, type SteerAppliedEvent, SteerAppliedEventSchema, type StepCompleteEvent, StepCompleteEventSchema, type StepStartEvent, StepStartEventSchema, type SubagentLineage, SubagentLineageSchema, type TaskProgress, TaskProgressCurrentToolSchema, TaskProgressLastToolSchema, TaskProgressSchema, type TaskTerminationReason, TaskTerminationReasonSchema, type TaskUsage, TaskUsageSchema, type TextDeltaEvent, TextDeltaEventSchema, type TextEvent, TextEventSchema, type TextPart, TextPartSchema, type ToolCallEvent, ToolCallEventSchema, type ToolResultEvent, ToolResultEventSchema, WIRE_ENCODE_KEY, WIRE_KEYED_KEY, WIRE_PRESENCE_KEY, WIRE_TAG_KEY, clearable, isImageModelView, isModelFastMode, isModelReasoningLevel, keyed, nullish, parseApprovalMode, parseSandboxMode, sandboxModes, tagged, wireCount, wireInt };
|