@meistrari/chat-nuxt 4.10.0-rc.24 → 4.10.0-rc.26
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/types/schemas/chat/v3.d.ts +83 -0
- package/dist/runtime/types/schemas/chat/v3.js +28 -1
- package/dist/runtime/types/schemas/integrations/agent-events.d.ts +16 -0
- package/dist/runtime/types/schemas/integrations/agent-events.js +12 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -211,3 +211,86 @@ export declare const chatV3MessageListSchema: z.ZodObject<{
|
|
|
211
211
|
eventCursor: z.ZodNullable<z.ZodString>;
|
|
212
212
|
}, z.core.$strip>;
|
|
213
213
|
export type ChatV3MessageList = z.infer<typeof chatV3MessageListSchema>;
|
|
214
|
+
/**
|
|
215
|
+
* The event types of a message's activity: what the agent did while answering it (its tools as
|
|
216
|
+
* they start, its closed steps, its questions and their answers, the files it published, its usage) and the inputs that
|
|
217
|
+
* travelled with it. The reply's text is left out: the message list already carries it.
|
|
218
|
+
*/
|
|
219
|
+
export declare const CHAT_V3_ACTIVITY_EVENT_TYPES: readonly ["step.started", "step", "user_input.requested", "user_input.resolved", "artifact.published", "input", "usage"];
|
|
220
|
+
export declare const chatV3ActivityQuerySchema: z.ZodObject<{
|
|
221
|
+
after: z.ZodOptional<z.ZodString>;
|
|
222
|
+
}, z.core.$strict>;
|
|
223
|
+
export type ChatV3ActivityQuery = z.infer<typeof chatV3ActivityQuerySchema>;
|
|
224
|
+
/**
|
|
225
|
+
* One page of a message's activity, oldest first, as agent-api stored it: summaries and previews
|
|
226
|
+
* only. A step's full input and output stay in Vault until read through its content route. A
|
|
227
|
+
* page can be shorter than agent-api's (even empty) and still have more: read on while `hasMore`.
|
|
228
|
+
*/
|
|
229
|
+
export declare const chatV3ActivitySchema: z.ZodObject<{
|
|
230
|
+
events: z.ZodArray<z.ZodObject<{
|
|
231
|
+
eventId: z.ZodString;
|
|
232
|
+
sessionId: z.ZodString;
|
|
233
|
+
type: z.ZodString;
|
|
234
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
235
|
+
messageId: z.ZodNullable<z.ZodString>;
|
|
236
|
+
toolCallId: z.ZodNullable<z.ZodString>;
|
|
237
|
+
occurredAt: z.ZodString;
|
|
238
|
+
hint: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
239
|
+
text: z.ZodNullable<z.ZodString>;
|
|
240
|
+
partIndex: z.ZodNullable<z.ZodNumber>;
|
|
241
|
+
partCount: z.ZodNullable<z.ZodNumber>;
|
|
242
|
+
payloadVaultStatus: z.ZodEnum<{
|
|
243
|
+
pending: "pending";
|
|
244
|
+
none: "none";
|
|
245
|
+
published: "published";
|
|
246
|
+
}>;
|
|
247
|
+
receipt: z.ZodOptional<z.ZodObject<{
|
|
248
|
+
eventId: z.ZodString;
|
|
249
|
+
type: z.ZodEnum<{
|
|
250
|
+
input: "input";
|
|
251
|
+
"tool-result": "tool-result";
|
|
252
|
+
"message-queue": "message-queue";
|
|
253
|
+
"message-steer": "message-steer";
|
|
254
|
+
cancel: "cancel";
|
|
255
|
+
}>;
|
|
256
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
257
|
+
sessionId: z.ZodString;
|
|
258
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
259
|
+
status: z.ZodEnum<{
|
|
260
|
+
running: "running";
|
|
261
|
+
completed: "completed";
|
|
262
|
+
failed: "failed";
|
|
263
|
+
cancelled: "cancelled";
|
|
264
|
+
queued: "queued";
|
|
265
|
+
dispatched: "dispatched";
|
|
266
|
+
received: "received";
|
|
267
|
+
uncertain: "uncertain";
|
|
268
|
+
}>;
|
|
269
|
+
}, z.core.$loose>>;
|
|
270
|
+
}, z.core.$loose>>;
|
|
271
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
272
|
+
hasMore: z.ZodBoolean;
|
|
273
|
+
}, z.core.$strip>;
|
|
274
|
+
export type ChatV3Activity = z.infer<typeof chatV3ActivitySchema>;
|
|
275
|
+
export declare const chatV3ArtifactListQuerySchema: z.ZodObject<{
|
|
276
|
+
after: z.ZodOptional<z.ZodString>;
|
|
277
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
278
|
+
}, z.core.$strict>;
|
|
279
|
+
export type ChatV3ArtifactListQuery = z.infer<typeof chatV3ArtifactListQuerySchema>;
|
|
280
|
+
/** The files the agent published in the thread and agent-api verified, in the order they were published. */
|
|
281
|
+
export declare const chatV3ArtifactListSchema: z.ZodObject<{
|
|
282
|
+
artifacts: z.ZodArray<z.ZodObject<{
|
|
283
|
+
artifactId: z.ZodString;
|
|
284
|
+
turnId: z.ZodString;
|
|
285
|
+
filename: z.ZodString;
|
|
286
|
+
byteSize: z.ZodNumber;
|
|
287
|
+
sha256: z.ZodString;
|
|
288
|
+
eventId: z.ZodString;
|
|
289
|
+
messageId: z.ZodString;
|
|
290
|
+
stepId: z.ZodNullable<z.ZodString>;
|
|
291
|
+
mediaType: z.ZodString;
|
|
292
|
+
}, z.core.$loose>>;
|
|
293
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
294
|
+
hasMore: z.ZodBoolean;
|
|
295
|
+
}, z.core.$loose>;
|
|
296
|
+
export type ChatV3ArtifactList = z.infer<typeof chatV3ArtifactListSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { v5EventIdSchema, v5HarnessSchema, v5Limits, v5TurnIdSchema } from '../integrations/agent-events';
|
|
2
|
+
import { v5ArtifactPageSchema, v5EventIdSchema, v5HarnessSchema, v5Limits, v5SessionEventSchema, v5TurnIdSchema } from '../integrations/agent-events';
|
|
3
3
|
/**
|
|
4
4
|
* Chat API v3 (`/v3/chat`): the conversational surface over agent-api v5 events-v1.
|
|
5
5
|
* The chat-api owns the thread; agent-api owns the session and its history.
|
|
@@ -121,3 +121,30 @@ export const chatV3MessageListSchema = z.object({
|
|
|
121
121
|
nextCursor: v5EventIdSchema.nullable(),
|
|
122
122
|
eventCursor: v5EventIdSchema.nullable(),
|
|
123
123
|
});
|
|
124
|
+
/**
|
|
125
|
+
* The event types of a message's activity: what the agent did while answering it (its tools as
|
|
126
|
+
* they start, its closed steps, its questions and their answers, the files it published, its usage) and the inputs that
|
|
127
|
+
* travelled with it. The reply's text is left out: the message list already carries it.
|
|
128
|
+
*/
|
|
129
|
+
export const CHAT_V3_ACTIVITY_EVENT_TYPES = ['step.started', 'step', 'user_input.requested', 'user_input.resolved', 'artifact.published', 'input', 'usage'];
|
|
130
|
+
export const chatV3ActivityQuerySchema = z.object({
|
|
131
|
+
/** Exclusive cursor: the `nextCursor` of the previous page. */
|
|
132
|
+
after: v5EventIdSchema.optional(),
|
|
133
|
+
}).strict();
|
|
134
|
+
/**
|
|
135
|
+
* One page of a message's activity, oldest first, as agent-api stored it: summaries and previews
|
|
136
|
+
* only. A step's full input and output stay in Vault until read through its content route. A
|
|
137
|
+
* page can be shorter than agent-api's (even empty) and still have more: read on while `hasMore`.
|
|
138
|
+
*/
|
|
139
|
+
export const chatV3ActivitySchema = z.object({
|
|
140
|
+
events: z.array(v5SessionEventSchema),
|
|
141
|
+
nextCursor: v5EventIdSchema.nullable(),
|
|
142
|
+
hasMore: z.boolean(),
|
|
143
|
+
});
|
|
144
|
+
export const chatV3ArtifactListQuerySchema = z.object({
|
|
145
|
+
/** Exclusive cursor: the `nextCursor` of the previous page. */
|
|
146
|
+
after: v5EventIdSchema.optional(),
|
|
147
|
+
limit: z.coerce.number().int().min(1).max(v5Limits.artifactPage.max).default(v5Limits.artifactPage.default),
|
|
148
|
+
}).strict();
|
|
149
|
+
/** The files the agent published in the thread and agent-api verified, in the order they were published. */
|
|
150
|
+
export const chatV3ArtifactListSchema = v5ArtifactPageSchema;
|
|
@@ -311,6 +311,22 @@ export declare const v5EventHintSchemas: {
|
|
|
311
311
|
endedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
312
312
|
}, z.core.$loose>;
|
|
313
313
|
}, z.core.$loose>;
|
|
314
|
+
/** A tool step that started; its closed `step` (same `stepId`) follows with the detail. */
|
|
315
|
+
readonly 'step.started': z.ZodObject<{
|
|
316
|
+
title: z.ZodString;
|
|
317
|
+
status: z.ZodLiteral<"running">;
|
|
318
|
+
step: z.ZodObject<{
|
|
319
|
+
stepId: z.ZodOptional<z.ZodString>;
|
|
320
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
321
|
+
message: "message";
|
|
322
|
+
reasoning: "reasoning";
|
|
323
|
+
tool: "tool";
|
|
324
|
+
}>>;
|
|
325
|
+
toolName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
326
|
+
preview: z.ZodOptional<z.ZodString>;
|
|
327
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
328
|
+
}, z.core.$loose>;
|
|
329
|
+
}, z.core.$loose>;
|
|
314
330
|
readonly usage: z.ZodObject<{
|
|
315
331
|
provider: z.ZodOptional<z.ZodString>;
|
|
316
332
|
usageScope: z.ZodString;
|
|
@@ -173,6 +173,18 @@ export const v5EventHintSchemas = {
|
|
|
173
173
|
endedAt: z.string().nullable().optional(),
|
|
174
174
|
}),
|
|
175
175
|
}),
|
|
176
|
+
/** A tool step that started; its closed `step` (same `stepId`) follows with the detail. */
|
|
177
|
+
'step.started': z.looseObject({
|
|
178
|
+
title: z.string(),
|
|
179
|
+
status: z.literal('running'),
|
|
180
|
+
step: z.looseObject({
|
|
181
|
+
stepId: z.string().optional(),
|
|
182
|
+
kind: z.enum(['message', 'tool', 'reasoning']).optional(),
|
|
183
|
+
toolName: z.string().nullable().optional(),
|
|
184
|
+
preview: z.string().optional(),
|
|
185
|
+
startedAt: z.string().optional(),
|
|
186
|
+
}),
|
|
187
|
+
}),
|
|
176
188
|
'usage': z.looseObject({ provider: z.string().optional(), usageScope: z.string() }),
|
|
177
189
|
'user_input.requested': z.looseObject({ requestId: z.string().min(1), questionCount: z.number().int().positive(), contentOmitted: z.literal(true).optional() }),
|
|
178
190
|
'user_input.resolved': z.looseObject({ requestId: z.string().min(1), userEventId: z.string().uuid() }),
|