@meistrari/chat-nuxt 4.13.0-rc.8 → 4.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.d.vue.ts +2 -2
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue.d.ts +2 -2
- package/dist/runtime/files/components/chat-file-reference.vue +5 -2
- package/dist/runtime/files/components/chat-vault-link.vue +1 -1
- package/dist/runtime/files/file-reference.d.ts +7 -0
- package/dist/runtime/files/file-reference.js +8 -0
- package/dist/runtime/messages/components/chat-debug-widget-gallery.vue +13 -3
- package/dist/runtime/messages/tool-registry.js +7 -0
- package/dist/runtime/rendering/debug/widget-gallery.d.ts +2 -0
- package/dist/runtime/rendering/debug/widget-gallery.js +4 -0
- package/dist/runtime/types/schemas/chat/v3-mentions.d.ts +33 -0
- package/dist/runtime/types/schemas/chat/v3-mentions.js +96 -0
- package/dist/runtime/types/schemas/chat/v3.d.ts +494 -6
- package/dist/runtime/types/schemas/chat/v3.js +271 -13
- package/dist/runtime/types/schemas/integrations/agent-events.d.ts +246 -45
- package/dist/runtime/types/schemas/integrations/agent-events.js +101 -5
- package/package.json +2 -2
|
@@ -13,6 +13,64 @@ export declare const chatV3AgentStatusSchema: z.ZodEnum<{
|
|
|
13
13
|
not_published: "not_published";
|
|
14
14
|
}>;
|
|
15
15
|
export type ChatV3AgentStatus = z.infer<typeof chatV3AgentStatusSchema>;
|
|
16
|
+
/**
|
|
17
|
+
* An input the agent declares (its `input-schema.json`), at the commit a session runs. It has no
|
|
18
|
+
* default value: the host or the user gives it, and the session's first message has to carry
|
|
19
|
+
* every required one.
|
|
20
|
+
*/
|
|
21
|
+
export declare const chatV3AgentInputSchema: z.ZodObject<{
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
type: z.ZodEnum<{
|
|
24
|
+
file: "file";
|
|
25
|
+
text: "text";
|
|
26
|
+
}>;
|
|
27
|
+
required: z.ZodBoolean;
|
|
28
|
+
description: z.ZodNullable<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type ChatV3AgentInput = z.infer<typeof chatV3AgentInputSchema>;
|
|
31
|
+
/** A skill the user can trigger with `/`: a `SKILL.md` of the agent's repository at its published commit. */
|
|
32
|
+
export declare const chatV3SkillSchema: z.ZodObject<{
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
description: z.ZodString;
|
|
35
|
+
path: z.ZodString;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export type ChatV3Skill = z.infer<typeof chatV3SkillSchema>;
|
|
38
|
+
/** A file under the agent's `references/`, which the agent reads from its working tree. */
|
|
39
|
+
export declare const chatV3ContextFileSchema: z.ZodObject<{
|
|
40
|
+
path: z.ZodString;
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export type ChatV3ContextFile = z.infer<typeof chatV3ContextFileSchema>;
|
|
45
|
+
/**
|
|
46
|
+
* What `/` and `@` offer in a thread: the skills and context files of the commit its session runs,
|
|
47
|
+
* which an agent published again since does not change. Empty when the caller may not read the
|
|
48
|
+
* repository or agent-api fails to give it.
|
|
49
|
+
*/
|
|
50
|
+
export declare const chatV3ThreadCatalogSchema: z.ZodObject<{
|
|
51
|
+
commitSha: z.ZodNullable<z.ZodString>;
|
|
52
|
+
skills: z.ZodArray<z.ZodObject<{
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
description: z.ZodString;
|
|
55
|
+
path: z.ZodString;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
contextFiles: z.ZodArray<z.ZodObject<{
|
|
58
|
+
path: z.ZodString;
|
|
59
|
+
name: z.ZodString;
|
|
60
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
export type ChatV3ThreadCatalog = z.infer<typeof chatV3ThreadCatalogSchema>;
|
|
64
|
+
/**
|
|
65
|
+
* How the agent of a request was chosen, in the order v1 chooses it: the one the request names,
|
|
66
|
+
* the workspace's own agent (its v1 agent, by id), or the environment's default.
|
|
67
|
+
*/
|
|
68
|
+
export declare const chatV3AgentSourceSchema: z.ZodEnum<{
|
|
69
|
+
default: "default";
|
|
70
|
+
request: "request";
|
|
71
|
+
workspace: "workspace";
|
|
72
|
+
}>;
|
|
73
|
+
export type ChatV3AgentSource = z.infer<typeof chatV3AgentSourceSchema>;
|
|
16
74
|
export declare const chatV3AgentSchema: z.ZodObject<{
|
|
17
75
|
agentId: z.ZodString;
|
|
18
76
|
repository: z.ZodString;
|
|
@@ -24,6 +82,25 @@ export declare const chatV3AgentSchema: z.ZodObject<{
|
|
|
24
82
|
model: z.ZodNullable<z.ZodString>;
|
|
25
83
|
publishedSnapshotId: z.ZodNullable<z.ZodString>;
|
|
26
84
|
publishedCommitSha: z.ZodNullable<z.ZodString>;
|
|
85
|
+
inputs: z.ZodArray<z.ZodObject<{
|
|
86
|
+
name: z.ZodString;
|
|
87
|
+
type: z.ZodEnum<{
|
|
88
|
+
file: "file";
|
|
89
|
+
text: "text";
|
|
90
|
+
}>;
|
|
91
|
+
required: z.ZodBoolean;
|
|
92
|
+
description: z.ZodNullable<z.ZodString>;
|
|
93
|
+
}, z.core.$strip>>;
|
|
94
|
+
skills: z.ZodArray<z.ZodObject<{
|
|
95
|
+
name: z.ZodString;
|
|
96
|
+
description: z.ZodString;
|
|
97
|
+
path: z.ZodString;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
contextFiles: z.ZodArray<z.ZodObject<{
|
|
100
|
+
path: z.ZodString;
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
103
|
+
}, z.core.$strip>>;
|
|
27
104
|
}, z.core.$strip>;
|
|
28
105
|
export type ChatV3Agent = z.infer<typeof chatV3AgentSchema>;
|
|
29
106
|
export declare const chatV3ConfigurationSchema: z.ZodObject<{
|
|
@@ -35,6 +112,11 @@ export declare const chatV3ConfigurationSchema: z.ZodObject<{
|
|
|
35
112
|
not_in_catalog: "not_in_catalog";
|
|
36
113
|
not_published: "not_published";
|
|
37
114
|
}>;
|
|
115
|
+
agentSource: z.ZodNullable<z.ZodEnum<{
|
|
116
|
+
default: "default";
|
|
117
|
+
request: "request";
|
|
118
|
+
workspace: "workspace";
|
|
119
|
+
}>>;
|
|
38
120
|
agent: z.ZodNullable<z.ZodObject<{
|
|
39
121
|
agentId: z.ZodString;
|
|
40
122
|
repository: z.ZodString;
|
|
@@ -46,6 +128,25 @@ export declare const chatV3ConfigurationSchema: z.ZodObject<{
|
|
|
46
128
|
model: z.ZodNullable<z.ZodString>;
|
|
47
129
|
publishedSnapshotId: z.ZodNullable<z.ZodString>;
|
|
48
130
|
publishedCommitSha: z.ZodNullable<z.ZodString>;
|
|
131
|
+
inputs: z.ZodArray<z.ZodObject<{
|
|
132
|
+
name: z.ZodString;
|
|
133
|
+
type: z.ZodEnum<{
|
|
134
|
+
file: "file";
|
|
135
|
+
text: "text";
|
|
136
|
+
}>;
|
|
137
|
+
required: z.ZodBoolean;
|
|
138
|
+
description: z.ZodNullable<z.ZodString>;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
skills: z.ZodArray<z.ZodObject<{
|
|
141
|
+
name: z.ZodString;
|
|
142
|
+
description: z.ZodString;
|
|
143
|
+
path: z.ZodString;
|
|
144
|
+
}, z.core.$strip>>;
|
|
145
|
+
contextFiles: z.ZodArray<z.ZodObject<{
|
|
146
|
+
path: z.ZodString;
|
|
147
|
+
name: z.ZodString;
|
|
148
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
149
|
+
}, z.core.$strip>>;
|
|
49
150
|
}, z.core.$strip>>;
|
|
50
151
|
limits: z.ZodObject<{
|
|
51
152
|
messageTextChars: z.ZodNumber;
|
|
@@ -60,17 +161,59 @@ export declare const CHAT_V3_THREAD_PAGE: {
|
|
|
60
161
|
readonly default: 30;
|
|
61
162
|
readonly max: 100;
|
|
62
163
|
};
|
|
63
|
-
/**
|
|
164
|
+
/** The effort a thread can choose, as agent-api takes it in a message's settings. */
|
|
165
|
+
export declare const chatV3ReasoningEffortSchema: z.ZodEnum<{
|
|
166
|
+
low: "low";
|
|
167
|
+
medium: "medium";
|
|
168
|
+
high: "high";
|
|
169
|
+
xhigh: "xhigh";
|
|
170
|
+
max: "max";
|
|
171
|
+
}>;
|
|
172
|
+
export type ChatV3ReasoningEffort = z.infer<typeof chatV3ReasoningEffortSchema>;
|
|
173
|
+
/**
|
|
174
|
+
* A thread as the chat owns it: access, title and the model chosen for it here, history in the
|
|
175
|
+
* agent-api session. `model` and `reasoningEffort` go as the settings of each message; both null
|
|
176
|
+
* runs the agent's own. Like a v1 conversation it belongs to the workspace, the agent and the
|
|
177
|
+
* host's scope: every member there sees it and can change it.
|
|
178
|
+
*/
|
|
64
179
|
export declare const chatV3ThreadSchema: z.ZodObject<{
|
|
65
180
|
threadId: z.ZodString;
|
|
66
181
|
agentId: z.ZodString;
|
|
67
182
|
sessionId: z.ZodString;
|
|
68
183
|
title: z.ZodString;
|
|
69
184
|
folderId: z.ZodNullable<z.ZodString>;
|
|
185
|
+
model: z.ZodNullable<z.ZodString>;
|
|
186
|
+
reasoningEffort: z.ZodNullable<z.ZodEnum<{
|
|
187
|
+
low: "low";
|
|
188
|
+
medium: "medium";
|
|
189
|
+
high: "high";
|
|
190
|
+
xhigh: "xhigh";
|
|
191
|
+
max: "max";
|
|
192
|
+
}>>;
|
|
193
|
+
createdBy: z.ZodString;
|
|
194
|
+
scope: z.ZodNullable<z.ZodString>;
|
|
195
|
+
lastActivityAt: z.ZodString;
|
|
70
196
|
createdAt: z.ZodString;
|
|
71
197
|
updatedAt: z.ZodString;
|
|
72
198
|
}, z.core.$strip>;
|
|
73
199
|
export type ChatV3Thread = z.infer<typeof chatV3ThreadSchema>;
|
|
200
|
+
/**
|
|
201
|
+
* `GET /threads/{id}/inputs`: the inputs the commit the thread's session pinned declares. They stay
|
|
202
|
+
* those of that commit after the agent is published again.
|
|
203
|
+
*/
|
|
204
|
+
export declare const chatV3ThreadInputsSchema: z.ZodObject<{
|
|
205
|
+
commitSha: z.ZodString;
|
|
206
|
+
inputs: z.ZodArray<z.ZodObject<{
|
|
207
|
+
name: z.ZodString;
|
|
208
|
+
type: z.ZodEnum<{
|
|
209
|
+
file: "file";
|
|
210
|
+
text: "text";
|
|
211
|
+
}>;
|
|
212
|
+
required: z.ZodBoolean;
|
|
213
|
+
description: z.ZodNullable<z.ZodString>;
|
|
214
|
+
}, z.core.$strip>>;
|
|
215
|
+
}, z.core.$strip>;
|
|
216
|
+
export type ChatV3ThreadInputs = z.infer<typeof chatV3ThreadInputsSchema>;
|
|
74
217
|
/** The session behind a thread, read live from agent-api; `null` when agent-api no longer has it. */
|
|
75
218
|
export declare const chatV3SessionSummarySchema: z.ZodNullable<z.ZodObject<{
|
|
76
219
|
status: z.ZodString;
|
|
@@ -84,6 +227,17 @@ export declare const chatV3ThreadDetailSchema: z.ZodObject<{
|
|
|
84
227
|
sessionId: z.ZodString;
|
|
85
228
|
title: z.ZodString;
|
|
86
229
|
folderId: z.ZodNullable<z.ZodString>;
|
|
230
|
+
model: z.ZodNullable<z.ZodString>;
|
|
231
|
+
reasoningEffort: z.ZodNullable<z.ZodEnum<{
|
|
232
|
+
low: "low";
|
|
233
|
+
medium: "medium";
|
|
234
|
+
high: "high";
|
|
235
|
+
xhigh: "xhigh";
|
|
236
|
+
max: "max";
|
|
237
|
+
}>>;
|
|
238
|
+
createdBy: z.ZodString;
|
|
239
|
+
scope: z.ZodNullable<z.ZodString>;
|
|
240
|
+
lastActivityAt: z.ZodString;
|
|
87
241
|
createdAt: z.ZodString;
|
|
88
242
|
updatedAt: z.ZodString;
|
|
89
243
|
session: z.ZodNullable<z.ZodObject<{
|
|
@@ -94,23 +248,146 @@ export declare const chatV3ThreadDetailSchema: z.ZodObject<{
|
|
|
94
248
|
}, z.core.$strip>>;
|
|
95
249
|
}, z.core.$strip>;
|
|
96
250
|
export type ChatV3ThreadDetail = z.infer<typeof chatV3ThreadDetailSchema>;
|
|
97
|
-
/**
|
|
251
|
+
/**
|
|
252
|
+
* Creation also opens the agent-api session; send an `Idempotency-Key` header to retry safely.
|
|
253
|
+
* Without `agentId` the agent is chosen as v1 does: the workspace's own agent, else the default.
|
|
254
|
+
* `agentBranch` runs the head of that branch of the agent's repository instead of its publication;
|
|
255
|
+
* the session stays on that commit. The model and effort are optional, both or neither: agent-api
|
|
256
|
+
* checks them when a message goes.
|
|
257
|
+
*/
|
|
98
258
|
export declare const chatV3CreateThreadSchema: z.ZodObject<{
|
|
99
|
-
agentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string
|
|
259
|
+
agentId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
260
|
+
agentBranch: z.ZodOptional<z.ZodString>;
|
|
100
261
|
title: z.ZodOptional<z.ZodString>;
|
|
101
262
|
folderId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
263
|
+
model: z.ZodOptional<z.ZodString>;
|
|
264
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
265
|
+
low: "low";
|
|
266
|
+
medium: "medium";
|
|
267
|
+
high: "high";
|
|
268
|
+
xhigh: "xhigh";
|
|
269
|
+
max: "max";
|
|
270
|
+
}>>;
|
|
102
271
|
}, z.core.$strict>;
|
|
103
272
|
export type ChatV3CreateThread = z.infer<typeof chatV3CreateThreadSchema>;
|
|
104
|
-
/**
|
|
273
|
+
/**
|
|
274
|
+
* Renames the thread, moves it into a folder (`folderId`) or out of one (`folderId: null`), changes
|
|
275
|
+
* its model and effort (both, or both null to go back to the agent's), or any of them; the last
|
|
276
|
+
* update wins. The next message runs with the new settings.
|
|
277
|
+
*/
|
|
105
278
|
export declare const chatV3UpdateThreadSchema: z.ZodObject<{
|
|
106
279
|
title: z.ZodOptional<z.ZodString>;
|
|
107
280
|
folderId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
281
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
282
|
+
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
283
|
+
low: "low";
|
|
284
|
+
medium: "medium";
|
|
285
|
+
high: "high";
|
|
286
|
+
xhigh: "xhigh";
|
|
287
|
+
max: "max";
|
|
288
|
+
}>>>;
|
|
108
289
|
}, z.core.$strict>;
|
|
109
290
|
export type ChatV3UpdateThread = z.infer<typeof chatV3UpdateThreadSchema>;
|
|
291
|
+
/** Whose threads a list shows, as v1's `creator`: `all` (the default) or `me`, the caller's own. */
|
|
292
|
+
export declare const chatV3ThreadCreatorSchema: z.ZodEnum<{
|
|
293
|
+
all: "all";
|
|
294
|
+
me: "me";
|
|
295
|
+
}>;
|
|
296
|
+
export type ChatV3ThreadCreator = z.infer<typeof chatV3ThreadCreatorSchema>;
|
|
110
297
|
/** `folderId=none` lists the threads outside every folder. */
|
|
111
298
|
export declare const CHAT_V3_NO_FOLDER = "none";
|
|
299
|
+
/**
|
|
300
|
+
* Whose catalog: an agent's, for a new thread, or a thread's, which runs the harness and model its
|
|
301
|
+
* session was pinned with even after the agent is published again. One of the two.
|
|
302
|
+
*/
|
|
303
|
+
export declare const chatV3ModelListQuerySchema: z.ZodObject<{
|
|
304
|
+
agentId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
305
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
306
|
+
}, z.core.$strict>;
|
|
307
|
+
export type ChatV3ModelListQuery = z.infer<typeof chatV3ModelListQuerySchema>;
|
|
308
|
+
/**
|
|
309
|
+
* A model a thread of the agent can choose, with the efforts it runs with, and what the chat's
|
|
310
|
+
* model picker shows of it: `cost` (1 to 5) is agent-api's tier, `description` the chat's own.
|
|
311
|
+
*/
|
|
312
|
+
export declare const chatV3ModelSchema: z.ZodObject<{
|
|
313
|
+
id: z.ZodString;
|
|
314
|
+
name: z.ZodString;
|
|
315
|
+
vendor: z.ZodString;
|
|
316
|
+
description: z.ZodNullable<z.ZodString>;
|
|
317
|
+
cost: z.ZodNumber;
|
|
318
|
+
maxInputTokens: z.ZodNumber;
|
|
319
|
+
maxOutputTokens: z.ZodNullable<z.ZodNumber>;
|
|
320
|
+
isMultiModal: z.ZodBoolean;
|
|
321
|
+
reasoningEfforts: z.ZodArray<z.ZodEnum<{
|
|
322
|
+
low: "low";
|
|
323
|
+
medium: "medium";
|
|
324
|
+
high: "high";
|
|
325
|
+
xhigh: "xhigh";
|
|
326
|
+
max: "max";
|
|
327
|
+
}>>;
|
|
328
|
+
defaultReasoningEffort: z.ZodNullable<z.ZodEnum<{
|
|
329
|
+
low: "low";
|
|
330
|
+
medium: "medium";
|
|
331
|
+
high: "high";
|
|
332
|
+
xhigh: "xhigh";
|
|
333
|
+
max: "max";
|
|
334
|
+
}>>;
|
|
335
|
+
}, z.core.$strip>;
|
|
336
|
+
export type ChatV3Model = z.infer<typeof chatV3ModelSchema>;
|
|
337
|
+
/**
|
|
338
|
+
* The models of agent-api's catalog for the harness, available ones only. `defaultModel` is what a
|
|
339
|
+
* thread without a choice runs: the agent's own model, or for a thread its session's. An agent
|
|
340
|
+
* agent-api does not have, or one without a harness yet, has no models.
|
|
341
|
+
*/
|
|
342
|
+
export declare const chatV3ModelListSchema: z.ZodObject<{
|
|
343
|
+
agentStatus: z.ZodEnum<{
|
|
344
|
+
ready: "ready";
|
|
345
|
+
not_requested: "not_requested";
|
|
346
|
+
not_in_catalog: "not_in_catalog";
|
|
347
|
+
not_published: "not_published";
|
|
348
|
+
}>;
|
|
349
|
+
harness: z.ZodNullable<z.ZodEnum<{
|
|
350
|
+
claude: "claude";
|
|
351
|
+
lightweight: "lightweight";
|
|
352
|
+
codex: "codex";
|
|
353
|
+
}>>;
|
|
354
|
+
defaultModel: z.ZodNullable<z.ZodString>;
|
|
355
|
+
models: z.ZodArray<z.ZodObject<{
|
|
356
|
+
id: z.ZodString;
|
|
357
|
+
name: z.ZodString;
|
|
358
|
+
vendor: z.ZodString;
|
|
359
|
+
description: z.ZodNullable<z.ZodString>;
|
|
360
|
+
cost: z.ZodNumber;
|
|
361
|
+
maxInputTokens: z.ZodNumber;
|
|
362
|
+
maxOutputTokens: z.ZodNullable<z.ZodNumber>;
|
|
363
|
+
isMultiModal: z.ZodBoolean;
|
|
364
|
+
reasoningEfforts: z.ZodArray<z.ZodEnum<{
|
|
365
|
+
low: "low";
|
|
366
|
+
medium: "medium";
|
|
367
|
+
high: "high";
|
|
368
|
+
xhigh: "xhigh";
|
|
369
|
+
max: "max";
|
|
370
|
+
}>>;
|
|
371
|
+
defaultReasoningEffort: z.ZodNullable<z.ZodEnum<{
|
|
372
|
+
low: "low";
|
|
373
|
+
medium: "medium";
|
|
374
|
+
high: "high";
|
|
375
|
+
xhigh: "xhigh";
|
|
376
|
+
max: "max";
|
|
377
|
+
}>>;
|
|
378
|
+
}, z.core.$strip>>;
|
|
379
|
+
}, z.core.$strip>;
|
|
380
|
+
export type ChatV3ModelList = z.infer<typeof chatV3ModelListSchema>;
|
|
381
|
+
/**
|
|
382
|
+
* A list is always of one agent, as a v1 conversation list always is. Without `agentId`, the agent
|
|
383
|
+
* is chosen as v1 does: the workspace's own agent, else the default.
|
|
384
|
+
*/
|
|
112
385
|
export declare const chatV3ThreadListQuerySchema: z.ZodObject<{
|
|
113
386
|
agentId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
387
|
+
creator: z.ZodOptional<z.ZodEnum<{
|
|
388
|
+
all: "all";
|
|
389
|
+
me: "me";
|
|
390
|
+
}>>;
|
|
114
391
|
folderId: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>]>>;
|
|
115
392
|
before: z.ZodOptional<z.ZodString>;
|
|
116
393
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -123,6 +400,17 @@ export declare const chatV3ThreadListSchema: z.ZodObject<{
|
|
|
123
400
|
sessionId: z.ZodString;
|
|
124
401
|
title: z.ZodString;
|
|
125
402
|
folderId: z.ZodNullable<z.ZodString>;
|
|
403
|
+
model: z.ZodNullable<z.ZodString>;
|
|
404
|
+
reasoningEffort: z.ZodNullable<z.ZodEnum<{
|
|
405
|
+
low: "low";
|
|
406
|
+
medium: "medium";
|
|
407
|
+
high: "high";
|
|
408
|
+
xhigh: "xhigh";
|
|
409
|
+
max: "max";
|
|
410
|
+
}>>;
|
|
411
|
+
createdBy: z.ZodString;
|
|
412
|
+
scope: z.ZodNullable<z.ZodString>;
|
|
413
|
+
lastActivityAt: z.ZodString;
|
|
126
414
|
createdAt: z.ZodString;
|
|
127
415
|
updatedAt: z.ZodString;
|
|
128
416
|
}, z.core.$strip>>;
|
|
@@ -168,6 +456,16 @@ export declare const chatV3UpdateFolderSchema: z.ZodObject<{
|
|
|
168
456
|
name: z.ZodString;
|
|
169
457
|
}, z.core.$strict>;
|
|
170
458
|
export type ChatV3UpdateFolder = z.infer<typeof chatV3UpdateFolderSchema>;
|
|
459
|
+
export declare const chatV3ThreadCountQuerySchema: z.ZodObject<{
|
|
460
|
+
agentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
461
|
+
}, z.core.$strict>;
|
|
462
|
+
export type ChatV3ThreadCountQuery = z.infer<typeof chatV3ThreadCountQuerySchema>;
|
|
463
|
+
/** How many threads each filter of the list shows, as v1's conversation counts. */
|
|
464
|
+
export declare const chatV3ThreadCountSchema: z.ZodObject<{
|
|
465
|
+
all: z.ZodNumber;
|
|
466
|
+
mine: z.ZodNumber;
|
|
467
|
+
}, z.core.$strip>;
|
|
468
|
+
export type ChatV3ThreadCount = z.infer<typeof chatV3ThreadCountSchema>;
|
|
171
469
|
export declare const CHAT_V3_MESSAGE_PAGE: {
|
|
172
470
|
readonly default: 30;
|
|
173
471
|
readonly max: 100;
|
|
@@ -206,15 +504,93 @@ export declare const chatV3FileUploadSchema: z.ZodObject<{
|
|
|
206
504
|
expiresAt: z.ZodString;
|
|
207
505
|
}, z.core.$strip>;
|
|
208
506
|
export type ChatV3FileUpload = z.infer<typeof chatV3FileUploadSchema>;
|
|
507
|
+
/** How many agent inputs one message carries; with its files and itself they stay within agent-api's batch. */
|
|
508
|
+
export declare const CHAT_V3_INPUTS_PER_MESSAGE = 20;
|
|
209
509
|
/**
|
|
210
|
-
*
|
|
211
|
-
*
|
|
510
|
+
* The value of one agent input: text for a `text` input, a Vault reference (uploaded with
|
|
511
|
+
* `POST /files`) for a `file` one. agent-api checks the type against the declaration.
|
|
512
|
+
*/
|
|
513
|
+
export declare const chatV3SendInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
514
|
+
name: z.ZodString;
|
|
515
|
+
text: z.ZodString;
|
|
516
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
517
|
+
name: z.ZodString;
|
|
518
|
+
vaultReference: z.ZodString;
|
|
519
|
+
}, z.core.$strict>]>;
|
|
520
|
+
export type ChatV3SendInput = z.infer<typeof chatV3SendInputSchema>;
|
|
521
|
+
/**
|
|
522
|
+
* A file sent with a message, by its Vault reference. Its name, size and type are what `POST /files`
|
|
523
|
+
* answered: with them the thread lists the file, for `@` to mention it again.
|
|
524
|
+
*/
|
|
525
|
+
export declare const chatV3MessageFileSchema: z.ZodObject<{
|
|
526
|
+
vaultReference: z.ZodString;
|
|
527
|
+
name: z.ZodOptional<z.ZodString>;
|
|
528
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
529
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
530
|
+
}, z.core.$strict>;
|
|
531
|
+
export type ChatV3MessageFile = z.infer<typeof chatV3MessageFileSchema>;
|
|
532
|
+
export declare const CHAT_V3_MENTIONS_PER_MESSAGE = 20;
|
|
533
|
+
export declare const CHAT_V3_SKILL_NAME_CHARS = 128;
|
|
534
|
+
export declare const CHAT_V3_MENTION_PATH_CHARS = 1024;
|
|
535
|
+
/**
|
|
536
|
+
* Where a file mentioned by path sits in the agent's working tree: its context files
|
|
537
|
+
* (`references/`), the files the agent published (`output/`) and the ones sent to it
|
|
538
|
+
* (`attachments/`). Relative, without `..` or hidden segments.
|
|
539
|
+
*/
|
|
540
|
+
export declare const chatV3MentionPathSchema: z.ZodString;
|
|
541
|
+
/**
|
|
542
|
+
* What the user picked with `/` or `@`. The text keeps the token where it was picked (`/name`,
|
|
543
|
+
* `@name`); chat-api adds what each one means for the agent at the end of the message.
|
|
544
|
+
* - `skill`: a skill of the agent at the commit the thread runs.
|
|
545
|
+
* - `file`: a file of the agent's working tree, by path.
|
|
546
|
+
* - `attachment`: a file in Vault, sent with the message (again, if it went with an earlier one).
|
|
547
|
+
*/
|
|
548
|
+
export declare const chatV3MentionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
549
|
+
type: z.ZodLiteral<"skill">;
|
|
550
|
+
name: z.ZodString;
|
|
551
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
552
|
+
type: z.ZodLiteral<"file">;
|
|
553
|
+
name: z.ZodString;
|
|
554
|
+
path: z.ZodString;
|
|
555
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
556
|
+
type: z.ZodLiteral<"attachment">;
|
|
557
|
+
name: z.ZodString;
|
|
558
|
+
vaultReference: z.ZodString;
|
|
559
|
+
}, z.core.$strict>], "type">;
|
|
560
|
+
export type ChatV3Mention = z.infer<typeof chatV3MentionSchema>;
|
|
561
|
+
/**
|
|
562
|
+
* A message's text, the files sent with it, what it mentions and the agent inputs it sets. Above
|
|
563
|
+
* the inline limit agent-api keeps the text in Vault and the event points at it; each file goes as
|
|
564
|
+
* an `input` the agent finds in `attachments/`, each agent input as a named `input` it finds in
|
|
565
|
+
* `input/<name>/`.
|
|
212
566
|
*/
|
|
213
567
|
export declare const chatV3SendMessageSchema: z.ZodObject<{
|
|
214
568
|
text: z.ZodString;
|
|
215
569
|
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
216
570
|
vaultReference: z.ZodString;
|
|
571
|
+
name: z.ZodOptional<z.ZodString>;
|
|
572
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
573
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
217
574
|
}, z.core.$strict>>>;
|
|
575
|
+
mentions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
576
|
+
type: z.ZodLiteral<"skill">;
|
|
577
|
+
name: z.ZodString;
|
|
578
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
579
|
+
type: z.ZodLiteral<"file">;
|
|
580
|
+
name: z.ZodString;
|
|
581
|
+
path: z.ZodString;
|
|
582
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
583
|
+
type: z.ZodLiteral<"attachment">;
|
|
584
|
+
name: z.ZodString;
|
|
585
|
+
vaultReference: z.ZodString;
|
|
586
|
+
}, z.core.$strict>], "type">>>;
|
|
587
|
+
inputs: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
588
|
+
name: z.ZodString;
|
|
589
|
+
text: z.ZodString;
|
|
590
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
591
|
+
name: z.ZodString;
|
|
592
|
+
vaultReference: z.ZodString;
|
|
593
|
+
}, z.core.$strict>]>>>;
|
|
218
594
|
}, z.core.$strict>;
|
|
219
595
|
export type ChatV3SendMessage = z.infer<typeof chatV3SendMessageSchema>;
|
|
220
596
|
/** Text sent into a running turn; files go only with a queued message. */
|
|
@@ -252,6 +628,28 @@ export declare const chatV3MessageStatusSchema: z.ZodEnum<{
|
|
|
252
628
|
uncertain: "uncertain";
|
|
253
629
|
}>;
|
|
254
630
|
export type ChatV3MessageStatus = z.infer<typeof chatV3MessageStatusSchema>;
|
|
631
|
+
/** The longest duration a timings report takes: one hour, in ms. */
|
|
632
|
+
export declare const CHAT_V3_TIMING_MAX_MS: number;
|
|
633
|
+
/**
|
|
634
|
+
* How long a message took, as the browser that sent it and followed its turn measured it. Drafts
|
|
635
|
+
* are never stored, so the first output (TTFT) exists only there. Durations count from the
|
|
636
|
+
* runtime accepting the message, except the queue; each is left out when it was not seen.
|
|
637
|
+
* `errorCode` is the code agent-api gave a failed turn, never its text.
|
|
638
|
+
*/
|
|
639
|
+
export declare const chatV3MessageTimingsSchema: z.ZodObject<{
|
|
640
|
+
queueMs: z.ZodOptional<z.ZodNumber>;
|
|
641
|
+
ttftMs: z.ZodOptional<z.ZodNumber>;
|
|
642
|
+
firstTextMs: z.ZodOptional<z.ZodNumber>;
|
|
643
|
+
turnMs: z.ZodOptional<z.ZodNumber>;
|
|
644
|
+
outcome: z.ZodEnum<{
|
|
645
|
+
completed: "completed";
|
|
646
|
+
failed: "failed";
|
|
647
|
+
cancelled: "cancelled";
|
|
648
|
+
uncertain: "uncertain";
|
|
649
|
+
}>;
|
|
650
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
651
|
+
}, z.core.$strict>;
|
|
652
|
+
export type ChatV3MessageTimings = z.infer<typeof chatV3MessageTimingsSchema>;
|
|
255
653
|
/**
|
|
256
654
|
* A question the agent asked (`ask_user`), answered by its `toolCallId`. `answeredBy` is the
|
|
257
655
|
* message that answered it; nothing else tracks whether the agent still waits. One too long for
|
|
@@ -288,6 +686,10 @@ export type ChatV3Question = z.infer<typeof chatV3QuestionSchema>;
|
|
|
288
686
|
* is shown but cannot be answered: agent-api could not check its answers.
|
|
289
687
|
*/
|
|
290
688
|
export declare function questionOfEvent(event: V5SessionEvent): ChatV3Question | null;
|
|
689
|
+
export declare const chatV3MessageAuthorSchema: z.ZodObject<{
|
|
690
|
+
userId: z.ZodString;
|
|
691
|
+
}, z.core.$strip>;
|
|
692
|
+
export type ChatV3MessageAuthor = z.infer<typeof chatV3MessageAuthorSchema>;
|
|
291
693
|
/**
|
|
292
694
|
* One message of the user and the agent's reply to it, rebuilt from the session's events on
|
|
293
695
|
* every read. `text` is `null` while it is only in Vault (`textInVault`); `reply` is the
|
|
@@ -315,6 +717,16 @@ export declare const chatV3MessageSchema: z.ZodObject<{
|
|
|
315
717
|
createdAt: z.ZodString;
|
|
316
718
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
317
719
|
fileCount: z.ZodNumber;
|
|
720
|
+
inputNames: z.ZodArray<z.ZodString>;
|
|
721
|
+
mentions: z.ZodArray<z.ZodObject<{
|
|
722
|
+
type: z.ZodEnum<{
|
|
723
|
+
file: "file";
|
|
724
|
+
skill: "skill";
|
|
725
|
+
attachment: "attachment";
|
|
726
|
+
}>;
|
|
727
|
+
name: z.ZodString;
|
|
728
|
+
path: z.ZodNullable<z.ZodString>;
|
|
729
|
+
}, z.core.$strip>>;
|
|
318
730
|
question: z.ZodNullable<z.ZodObject<{
|
|
319
731
|
eventId: z.ZodString;
|
|
320
732
|
toolCallId: z.ZodString;
|
|
@@ -339,6 +751,12 @@ export declare const chatV3MessageSchema: z.ZodObject<{
|
|
|
339
751
|
answerable: z.ZodBoolean;
|
|
340
752
|
answeredBy: z.ZodNullable<z.ZodString>;
|
|
341
753
|
}, z.core.$strip>>;
|
|
754
|
+
model: z.ZodNullable<z.ZodString>;
|
|
755
|
+
reasoningEffort: z.ZodNullable<z.ZodString>;
|
|
756
|
+
author: z.ZodNullable<z.ZodObject<{
|
|
757
|
+
userId: z.ZodString;
|
|
758
|
+
}, z.core.$strip>>;
|
|
759
|
+
error: z.ZodNullable<z.ZodString>;
|
|
342
760
|
}, z.core.$strip>;
|
|
343
761
|
export type ChatV3Message = z.infer<typeof chatV3MessageSchema>;
|
|
344
762
|
export declare const chatV3MessageListQuerySchema: z.ZodObject<{
|
|
@@ -373,6 +791,16 @@ export declare const chatV3MessageListSchema: z.ZodObject<{
|
|
|
373
791
|
createdAt: z.ZodString;
|
|
374
792
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
375
793
|
fileCount: z.ZodNumber;
|
|
794
|
+
inputNames: z.ZodArray<z.ZodString>;
|
|
795
|
+
mentions: z.ZodArray<z.ZodObject<{
|
|
796
|
+
type: z.ZodEnum<{
|
|
797
|
+
file: "file";
|
|
798
|
+
skill: "skill";
|
|
799
|
+
attachment: "attachment";
|
|
800
|
+
}>;
|
|
801
|
+
name: z.ZodString;
|
|
802
|
+
path: z.ZodNullable<z.ZodString>;
|
|
803
|
+
}, z.core.$strip>>;
|
|
376
804
|
question: z.ZodNullable<z.ZodObject<{
|
|
377
805
|
eventId: z.ZodString;
|
|
378
806
|
toolCallId: z.ZodString;
|
|
@@ -397,6 +825,12 @@ export declare const chatV3MessageListSchema: z.ZodObject<{
|
|
|
397
825
|
answerable: z.ZodBoolean;
|
|
398
826
|
answeredBy: z.ZodNullable<z.ZodString>;
|
|
399
827
|
}, z.core.$strip>>;
|
|
828
|
+
model: z.ZodNullable<z.ZodString>;
|
|
829
|
+
reasoningEffort: z.ZodNullable<z.ZodString>;
|
|
830
|
+
author: z.ZodNullable<z.ZodObject<{
|
|
831
|
+
userId: z.ZodString;
|
|
832
|
+
}, z.core.$strip>>;
|
|
833
|
+
error: z.ZodNullable<z.ZodString>;
|
|
400
834
|
}, z.core.$strip>>;
|
|
401
835
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
402
836
|
eventCursor: z.ZodNullable<z.ZodString>;
|
|
@@ -485,3 +919,57 @@ export declare const chatV3ArtifactListSchema: z.ZodObject<{
|
|
|
485
919
|
hasMore: z.ZodBoolean;
|
|
486
920
|
}, z.core.$loose>;
|
|
487
921
|
export type ChatV3ArtifactList = z.infer<typeof chatV3ArtifactListSchema>;
|
|
922
|
+
/**
|
|
923
|
+
* A file `@` can mention in a thread: one the user sent (`upload`, by its Vault reference, sent
|
|
924
|
+
* again with the message that mentions it) or one the agent published there (`artifact`, by its
|
|
925
|
+
* path in the agent's working tree).
|
|
926
|
+
*/
|
|
927
|
+
export declare const chatV3ThreadFileSchema: z.ZodObject<{
|
|
928
|
+
source: z.ZodEnum<{
|
|
929
|
+
upload: "upload";
|
|
930
|
+
artifact: "artifact";
|
|
931
|
+
}>;
|
|
932
|
+
name: z.ZodString;
|
|
933
|
+
vaultReference: z.ZodNullable<z.ZodString>;
|
|
934
|
+
path: z.ZodNullable<z.ZodString>;
|
|
935
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
936
|
+
contentType: z.ZodNullable<z.ZodString>;
|
|
937
|
+
createdAt: z.ZodNullable<z.ZodString>;
|
|
938
|
+
}, z.core.$strip>;
|
|
939
|
+
export type ChatV3ThreadFile = z.infer<typeof chatV3ThreadFileSchema>;
|
|
940
|
+
export declare const chatV3ThreadFileListSchema: z.ZodObject<{
|
|
941
|
+
files: z.ZodArray<z.ZodObject<{
|
|
942
|
+
source: z.ZodEnum<{
|
|
943
|
+
upload: "upload";
|
|
944
|
+
artifact: "artifact";
|
|
945
|
+
}>;
|
|
946
|
+
name: z.ZodString;
|
|
947
|
+
vaultReference: z.ZodNullable<z.ZodString>;
|
|
948
|
+
path: z.ZodNullable<z.ZodString>;
|
|
949
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
950
|
+
contentType: z.ZodNullable<z.ZodString>;
|
|
951
|
+
createdAt: z.ZodNullable<z.ZodString>;
|
|
952
|
+
}, z.core.$strip>>;
|
|
953
|
+
}, z.core.$strip>;
|
|
954
|
+
export type ChatV3ThreadFileList = z.infer<typeof chatV3ThreadFileListSchema>;
|
|
955
|
+
export declare const CHAT_V3_RECENT_FILES = 20;
|
|
956
|
+
export declare const chatV3RecentFileQuerySchema: z.ZodObject<{
|
|
957
|
+
agentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
958
|
+
}, z.core.$strict>;
|
|
959
|
+
export type ChatV3RecentFileQuery = z.infer<typeof chatV3RecentFileQuerySchema>;
|
|
960
|
+
/** The files the user sent lately in their threads with the agent, newest first, each once. */
|
|
961
|
+
export declare const chatV3RecentFileListSchema: z.ZodObject<{
|
|
962
|
+
files: z.ZodArray<z.ZodObject<{
|
|
963
|
+
source: z.ZodEnum<{
|
|
964
|
+
upload: "upload";
|
|
965
|
+
artifact: "artifact";
|
|
966
|
+
}>;
|
|
967
|
+
name: z.ZodString;
|
|
968
|
+
vaultReference: z.ZodNullable<z.ZodString>;
|
|
969
|
+
path: z.ZodNullable<z.ZodString>;
|
|
970
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
971
|
+
contentType: z.ZodNullable<z.ZodString>;
|
|
972
|
+
createdAt: z.ZodNullable<z.ZodString>;
|
|
973
|
+
}, z.core.$strip>>;
|
|
974
|
+
}, z.core.$strip>;
|
|
975
|
+
export type ChatV3RecentFileList = z.infer<typeof chatV3RecentFileListSchema>;
|