@meistrari/chat-nuxt 4.13.0-rc.12 → 4.13.0-rc.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
3
  "configKey": "chatNuxt",
4
- "version": "4.13.0-rc.12",
4
+ "version": "4.13.0-rc.14",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -72,8 +72,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
72
72
  copyLink: () => any;
73
73
  debug: () => any;
74
74
  selectConversation: (id: string) => any;
75
- send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
76
75
  settings: () => any;
76
+ send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
77
77
  newConversation: (groupId?: string | null | undefined) => any;
78
78
  selectExecutionProfile: (profile: ChatExecutionProfile) => any;
79
79
  tabChange: (tab: TopbarTab) => any;
@@ -94,8 +94,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
94
94
  onCopyLink?: (() => any) | undefined;
95
95
  onDebug?: (() => any) | undefined;
96
96
  onSelectConversation?: ((id: string) => any) | undefined;
97
- onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
98
97
  onSettings?: (() => any) | undefined;
98
+ onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
99
99
  onNewConversation?: ((groupId?: string | null | undefined) => any) | undefined;
100
100
  onSelectExecutionProfile?: ((profile: ChatExecutionProfile) => any) | undefined;
101
101
  "onUpdate:selectedModel"?: ((value: string | null) => any) | undefined;
@@ -72,8 +72,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
72
72
  copyLink: () => any;
73
73
  debug: () => any;
74
74
  selectConversation: (id: string) => any;
75
- send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
76
75
  settings: () => any;
76
+ send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
77
77
  newConversation: (groupId?: string | null | undefined) => any;
78
78
  selectExecutionProfile: (profile: ChatExecutionProfile) => any;
79
79
  tabChange: (tab: TopbarTab) => any;
@@ -94,8 +94,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
94
94
  onCopyLink?: (() => any) | undefined;
95
95
  onDebug?: (() => any) | undefined;
96
96
  onSelectConversation?: ((id: string) => any) | undefined;
97
- onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
98
97
  onSettings?: (() => any) | undefined;
98
+ onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
99
99
  onNewConversation?: ((groupId?: string | null | undefined) => any) | undefined;
100
100
  onSelectExecutionProfile?: ((profile: ChatExecutionProfile) => any) | undefined;
101
101
  "onUpdate:selectedModel"?: ((value: string | null) => any) | undefined;
@@ -60,13 +60,38 @@ export declare const CHAT_V3_THREAD_PAGE: {
60
60
  readonly default: 30;
61
61
  readonly max: 100;
62
62
  };
63
- /** A thread as the chat owns it: access and title here, history in the agent-api session. */
63
+ /** The effort a thread can choose, as agent-api takes it in a message's settings. */
64
+ export declare const chatV3ReasoningEffortSchema: z.ZodEnum<{
65
+ low: "low";
66
+ medium: "medium";
67
+ high: "high";
68
+ xhigh: "xhigh";
69
+ max: "max";
70
+ }>;
71
+ export type ChatV3ReasoningEffort = z.infer<typeof chatV3ReasoningEffortSchema>;
72
+ /**
73
+ * A thread as the chat owns it: access, title and the model chosen for it here, history in the
74
+ * agent-api session. `model` and `reasoningEffort` go as the settings of each message; both null
75
+ * runs the agent's own. Like a v1 conversation it belongs to the workspace, the agent and the
76
+ * host's scope: every member there sees it and can change it.
77
+ */
64
78
  export declare const chatV3ThreadSchema: z.ZodObject<{
65
79
  threadId: z.ZodString;
66
80
  agentId: z.ZodString;
67
81
  sessionId: z.ZodString;
68
82
  title: z.ZodString;
69
83
  folderId: z.ZodNullable<z.ZodString>;
84
+ model: z.ZodNullable<z.ZodString>;
85
+ reasoningEffort: z.ZodNullable<z.ZodEnum<{
86
+ low: "low";
87
+ medium: "medium";
88
+ high: "high";
89
+ xhigh: "xhigh";
90
+ max: "max";
91
+ }>>;
92
+ createdBy: z.ZodString;
93
+ scope: z.ZodNullable<z.ZodString>;
94
+ lastActivityAt: z.ZodString;
70
95
  createdAt: z.ZodString;
71
96
  updatedAt: z.ZodString;
72
97
  }, z.core.$strip>;
@@ -84,6 +109,17 @@ export declare const chatV3ThreadDetailSchema: z.ZodObject<{
84
109
  sessionId: z.ZodString;
85
110
  title: z.ZodString;
86
111
  folderId: z.ZodNullable<z.ZodString>;
112
+ model: z.ZodNullable<z.ZodString>;
113
+ reasoningEffort: z.ZodNullable<z.ZodEnum<{
114
+ low: "low";
115
+ medium: "medium";
116
+ high: "high";
117
+ xhigh: "xhigh";
118
+ max: "max";
119
+ }>>;
120
+ createdBy: z.ZodString;
121
+ scope: z.ZodNullable<z.ZodString>;
122
+ lastActivityAt: z.ZodString;
87
123
  createdAt: z.ZodString;
88
124
  updatedAt: z.ZodString;
89
125
  session: z.ZodNullable<z.ZodObject<{
@@ -94,23 +130,139 @@ export declare const chatV3ThreadDetailSchema: z.ZodObject<{
94
130
  }, z.core.$strip>>;
95
131
  }, z.core.$strip>;
96
132
  export type ChatV3ThreadDetail = z.infer<typeof chatV3ThreadDetailSchema>;
97
- /** Creation also opens the agent-api session; send an `Idempotency-Key` header to retry safely. */
133
+ /**
134
+ * Creation also opens the agent-api session; send an `Idempotency-Key` header to retry safely.
135
+ * The model and effort are optional, both or neither: agent-api checks them when a message goes.
136
+ */
98
137
  export declare const chatV3CreateThreadSchema: z.ZodObject<{
99
138
  agentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
100
139
  title: z.ZodOptional<z.ZodString>;
101
140
  folderId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
141
+ model: z.ZodOptional<z.ZodString>;
142
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
143
+ low: "low";
144
+ medium: "medium";
145
+ high: "high";
146
+ xhigh: "xhigh";
147
+ max: "max";
148
+ }>>;
102
149
  }, z.core.$strict>;
103
150
  export type ChatV3CreateThread = z.infer<typeof chatV3CreateThreadSchema>;
104
- /** Renames the thread, moves it into a folder (`folderId`) or out of one (`folderId: null`), or both. */
151
+ /**
152
+ * Renames the thread, moves it into a folder (`folderId`) or out of one (`folderId: null`), changes
153
+ * its model and effort (both, or both null to go back to the agent's), or any of them; the last
154
+ * update wins. The next message runs with the new settings.
155
+ */
105
156
  export declare const chatV3UpdateThreadSchema: z.ZodObject<{
106
157
  title: z.ZodOptional<z.ZodString>;
107
158
  folderId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
159
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
160
+ reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
161
+ low: "low";
162
+ medium: "medium";
163
+ high: "high";
164
+ xhigh: "xhigh";
165
+ max: "max";
166
+ }>>>;
108
167
  }, z.core.$strict>;
109
168
  export type ChatV3UpdateThread = z.infer<typeof chatV3UpdateThreadSchema>;
169
+ /** Whose threads a list shows, as v1's `creator`: `all` (the default) or `me`, the caller's own. */
170
+ export declare const chatV3ThreadCreatorSchema: z.ZodEnum<{
171
+ all: "all";
172
+ me: "me";
173
+ }>;
174
+ export type ChatV3ThreadCreator = z.infer<typeof chatV3ThreadCreatorSchema>;
110
175
  /** `folderId=none` lists the threads outside every folder. */
111
176
  export declare const CHAT_V3_NO_FOLDER = "none";
112
- export declare const chatV3ThreadListQuerySchema: z.ZodObject<{
177
+ /**
178
+ * Whose catalog: an agent's, for a new thread, or a thread's, which runs the harness and model its
179
+ * session was pinned with even after the agent is published again. One of the two.
180
+ */
181
+ export declare const chatV3ModelListQuerySchema: z.ZodObject<{
113
182
  agentId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
183
+ threadId: z.ZodOptional<z.ZodString>;
184
+ }, z.core.$strict>;
185
+ export type ChatV3ModelListQuery = z.infer<typeof chatV3ModelListQuerySchema>;
186
+ /**
187
+ * A model a thread of the agent can choose, with the efforts it runs with, and what the chat's
188
+ * model picker shows of it: `cost` (1 to 5) is agent-api's tier, `description` the chat's own.
189
+ */
190
+ export declare const chatV3ModelSchema: z.ZodObject<{
191
+ id: z.ZodString;
192
+ name: z.ZodString;
193
+ vendor: z.ZodString;
194
+ description: z.ZodNullable<z.ZodString>;
195
+ cost: z.ZodNumber;
196
+ maxInputTokens: z.ZodNumber;
197
+ maxOutputTokens: z.ZodNullable<z.ZodNumber>;
198
+ isMultiModal: z.ZodBoolean;
199
+ reasoningEfforts: z.ZodArray<z.ZodEnum<{
200
+ low: "low";
201
+ medium: "medium";
202
+ high: "high";
203
+ xhigh: "xhigh";
204
+ max: "max";
205
+ }>>;
206
+ defaultReasoningEffort: z.ZodNullable<z.ZodEnum<{
207
+ low: "low";
208
+ medium: "medium";
209
+ high: "high";
210
+ xhigh: "xhigh";
211
+ max: "max";
212
+ }>>;
213
+ }, z.core.$strip>;
214
+ export type ChatV3Model = z.infer<typeof chatV3ModelSchema>;
215
+ /**
216
+ * The models of agent-api's catalog for the harness, available ones only. `defaultModel` is what a
217
+ * thread without a choice runs: the agent's own model, or for a thread its session's. An agent
218
+ * agent-api does not have, or one without a harness yet, has no models.
219
+ */
220
+ export declare const chatV3ModelListSchema: z.ZodObject<{
221
+ agentStatus: z.ZodEnum<{
222
+ ready: "ready";
223
+ not_requested: "not_requested";
224
+ not_in_catalog: "not_in_catalog";
225
+ not_published: "not_published";
226
+ }>;
227
+ harness: z.ZodNullable<z.ZodEnum<{
228
+ claude: "claude";
229
+ lightweight: "lightweight";
230
+ codex: "codex";
231
+ }>>;
232
+ defaultModel: z.ZodNullable<z.ZodString>;
233
+ models: z.ZodArray<z.ZodObject<{
234
+ id: z.ZodString;
235
+ name: z.ZodString;
236
+ vendor: z.ZodString;
237
+ description: z.ZodNullable<z.ZodString>;
238
+ cost: z.ZodNumber;
239
+ maxInputTokens: z.ZodNumber;
240
+ maxOutputTokens: z.ZodNullable<z.ZodNumber>;
241
+ isMultiModal: z.ZodBoolean;
242
+ reasoningEfforts: z.ZodArray<z.ZodEnum<{
243
+ low: "low";
244
+ medium: "medium";
245
+ high: "high";
246
+ xhigh: "xhigh";
247
+ max: "max";
248
+ }>>;
249
+ defaultReasoningEffort: z.ZodNullable<z.ZodEnum<{
250
+ low: "low";
251
+ medium: "medium";
252
+ high: "high";
253
+ xhigh: "xhigh";
254
+ max: "max";
255
+ }>>;
256
+ }, z.core.$strip>>;
257
+ }, z.core.$strip>;
258
+ export type ChatV3ModelList = z.infer<typeof chatV3ModelListSchema>;
259
+ /** A list is always of one agent, as a v1 conversation list always is. */
260
+ export declare const chatV3ThreadListQuerySchema: z.ZodObject<{
261
+ agentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
262
+ creator: z.ZodOptional<z.ZodEnum<{
263
+ all: "all";
264
+ me: "me";
265
+ }>>;
114
266
  folderId: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>]>>;
115
267
  before: z.ZodOptional<z.ZodString>;
116
268
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -123,6 +275,17 @@ export declare const chatV3ThreadListSchema: z.ZodObject<{
123
275
  sessionId: z.ZodString;
124
276
  title: z.ZodString;
125
277
  folderId: z.ZodNullable<z.ZodString>;
278
+ model: z.ZodNullable<z.ZodString>;
279
+ reasoningEffort: z.ZodNullable<z.ZodEnum<{
280
+ low: "low";
281
+ medium: "medium";
282
+ high: "high";
283
+ xhigh: "xhigh";
284
+ max: "max";
285
+ }>>;
286
+ createdBy: z.ZodString;
287
+ scope: z.ZodNullable<z.ZodString>;
288
+ lastActivityAt: z.ZodString;
126
289
  createdAt: z.ZodString;
127
290
  updatedAt: z.ZodString;
128
291
  }, z.core.$strip>>;
@@ -168,6 +331,16 @@ export declare const chatV3UpdateFolderSchema: z.ZodObject<{
168
331
  name: z.ZodString;
169
332
  }, z.core.$strict>;
170
333
  export type ChatV3UpdateFolder = z.infer<typeof chatV3UpdateFolderSchema>;
334
+ export declare const chatV3ThreadCountQuerySchema: z.ZodObject<{
335
+ agentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
336
+ }, z.core.$strict>;
337
+ export type ChatV3ThreadCountQuery = z.infer<typeof chatV3ThreadCountQuerySchema>;
338
+ /** How many threads each filter of the list shows, as v1's conversation counts. */
339
+ export declare const chatV3ThreadCountSchema: z.ZodObject<{
340
+ all: z.ZodNumber;
341
+ mine: z.ZodNumber;
342
+ }, z.core.$strip>;
343
+ export type ChatV3ThreadCount = z.infer<typeof chatV3ThreadCountSchema>;
171
344
  export declare const CHAT_V3_MESSAGE_PAGE: {
172
345
  readonly default: 30;
173
346
  readonly max: 100;
@@ -252,6 +425,28 @@ export declare const chatV3MessageStatusSchema: z.ZodEnum<{
252
425
  uncertain: "uncertain";
253
426
  }>;
254
427
  export type ChatV3MessageStatus = z.infer<typeof chatV3MessageStatusSchema>;
428
+ /** The longest duration a timings report takes: one hour, in ms. */
429
+ export declare const CHAT_V3_TIMING_MAX_MS: number;
430
+ /**
431
+ * How long a message took, as the browser that sent it and followed its turn measured it. Drafts
432
+ * are never stored, so the first output (TTFT) exists only there. Durations count from the
433
+ * runtime accepting the message, except the queue; each is left out when it was not seen.
434
+ * `errorCode` is the code agent-api gave a failed turn, never its text.
435
+ */
436
+ export declare const chatV3MessageTimingsSchema: z.ZodObject<{
437
+ queueMs: z.ZodOptional<z.ZodNumber>;
438
+ ttftMs: z.ZodOptional<z.ZodNumber>;
439
+ firstTextMs: z.ZodOptional<z.ZodNumber>;
440
+ turnMs: z.ZodOptional<z.ZodNumber>;
441
+ outcome: z.ZodEnum<{
442
+ completed: "completed";
443
+ failed: "failed";
444
+ cancelled: "cancelled";
445
+ uncertain: "uncertain";
446
+ }>;
447
+ errorCode: z.ZodOptional<z.ZodString>;
448
+ }, z.core.$strict>;
449
+ export type ChatV3MessageTimings = z.infer<typeof chatV3MessageTimingsSchema>;
255
450
  /**
256
451
  * A question the agent asked (`ask_user`), answered by its `toolCallId`. `answeredBy` is the
257
452
  * message that answered it; nothing else tracks whether the agent still waits. One too long for
@@ -288,6 +483,10 @@ export type ChatV3Question = z.infer<typeof chatV3QuestionSchema>;
288
483
  * is shown but cannot be answered: agent-api could not check its answers.
289
484
  */
290
485
  export declare function questionOfEvent(event: V5SessionEvent): ChatV3Question | null;
486
+ export declare const chatV3MessageAuthorSchema: z.ZodObject<{
487
+ userId: z.ZodString;
488
+ }, z.core.$strip>;
489
+ export type ChatV3MessageAuthor = z.infer<typeof chatV3MessageAuthorSchema>;
291
490
  /**
292
491
  * One message of the user and the agent's reply to it, rebuilt from the session's events on
293
492
  * every read. `text` is `null` while it is only in Vault (`textInVault`); `reply` is the
@@ -339,6 +538,11 @@ export declare const chatV3MessageSchema: z.ZodObject<{
339
538
  answerable: z.ZodBoolean;
340
539
  answeredBy: z.ZodNullable<z.ZodString>;
341
540
  }, z.core.$strip>>;
541
+ model: z.ZodNullable<z.ZodString>;
542
+ reasoningEffort: z.ZodNullable<z.ZodString>;
543
+ author: z.ZodNullable<z.ZodObject<{
544
+ userId: z.ZodString;
545
+ }, z.core.$strip>>;
342
546
  }, z.core.$strip>;
343
547
  export type ChatV3Message = z.infer<typeof chatV3MessageSchema>;
344
548
  export declare const chatV3MessageListQuerySchema: z.ZodObject<{
@@ -397,6 +601,11 @@ export declare const chatV3MessageListSchema: z.ZodObject<{
397
601
  answerable: z.ZodBoolean;
398
602
  answeredBy: z.ZodNullable<z.ZodString>;
399
603
  }, z.core.$strip>>;
604
+ model: z.ZodNullable<z.ZodString>;
605
+ reasoningEffort: z.ZodNullable<z.ZodString>;
606
+ author: z.ZodNullable<z.ZodObject<{
607
+ userId: z.ZodString;
608
+ }, z.core.$strip>>;
400
609
  }, z.core.$strip>>;
401
610
  nextCursor: z.ZodNullable<z.ZodString>;
402
611
  eventCursor: z.ZodNullable<z.ZodString>;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { parseV5EventHint, v5ArtifactPageSchema, v5EventIdSchema, v5HarnessSchema, v5Limits, v5SessionEventSchema, v5TurnIdSchema, v5UserInputRequestSchema, v5VaultReferenceSchema } from '../integrations/agent-events';
2
+ import { parseV5EventHint, v5ArtifactPageSchema, v5EventIdSchema, v5HarnessSchema, v5Limits, v5ModelIdSchema, v5ReasoningEffortSchema, v5SessionEventSchema, v5TurnIdSchema, v5UserInputRequestSchema, v5VaultReferenceSchema } 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.
@@ -45,7 +45,19 @@ export const CHAT_V3_THREAD_PAGE = { default: 30, max: 100 };
45
45
  const agentIdSchema = z.string().uuid().transform(id => id.toLowerCase());
46
46
  /** A folder's id, lowercased like the agent's so the same folder always compares equal. */
47
47
  const folderIdSchema = z.string().uuid().transform(id => id.toLowerCase());
48
- /** A thread as the chat owns it: access and title here, history in the agent-api session. */
48
+ /** The effort a thread can choose, as agent-api takes it in a message's settings. */
49
+ export const chatV3ReasoningEffortSchema = v5ReasoningEffortSchema;
50
+ const SETTINGS_TOGETHER = 'Send model and reasoningEffort together, or neither.';
51
+ /** agent-api takes a message's model and effort as a pair: both given, both null, or both left out. */
52
+ function settingsTogether(body) {
53
+ return (body.model === undefined) === (body.reasoningEffort === undefined) && (body.model === null) === (body.reasoningEffort === null);
54
+ }
55
+ /**
56
+ * A thread as the chat owns it: access, title and the model chosen for it here, history in the
57
+ * agent-api session. `model` and `reasoningEffort` go as the settings of each message; both null
58
+ * runs the agent's own. Like a v1 conversation it belongs to the workspace, the agent and the
59
+ * host's scope: every member there sees it and can change it.
60
+ */
49
61
  export const chatV3ThreadSchema = z.object({
50
62
  threadId: z.string().uuid(),
51
63
  agentId: z.string().uuid(),
@@ -53,6 +65,14 @@ export const chatV3ThreadSchema = z.object({
53
65
  title: z.string(),
54
66
  /** The folder it is kept in; `null` outside any folder. */
55
67
  folderId: z.string().uuid().nullable(),
68
+ model: z.string().nullable(),
69
+ reasoningEffort: chatV3ReasoningEffortSchema.nullable(),
70
+ /** The member who created it (user id), for the "mine" filter and the author in the list. */
71
+ createdBy: z.string(),
72
+ /** The host's scope it was created in (`x-chat-conversation-scope`); null outside a scoped host. */
73
+ scope: z.string().nullable(),
74
+ /** Moves when a message, a steer, an answer or a new title goes through the chat; lists are ordered by it. */
75
+ lastActivityAt: z.string(),
56
76
  createdAt: z.string(),
57
77
  updatedAt: z.string(),
58
78
  });
@@ -64,31 +84,86 @@ export const chatV3SessionSummarySchema = z.object({
64
84
  reasoningEffort: z.string().nullable(),
65
85
  }).nullable();
66
86
  export const chatV3ThreadDetailSchema = chatV3ThreadSchema.extend({ session: chatV3SessionSummarySchema });
67
- /** Creation also opens the agent-api session; send an `Idempotency-Key` header to retry safely. */
87
+ /**
88
+ * Creation also opens the agent-api session; send an `Idempotency-Key` header to retry safely.
89
+ * The model and effort are optional, both or neither: agent-api checks them when a message goes.
90
+ */
68
91
  export const chatV3CreateThreadSchema = z.object({
69
92
  agentId: agentIdSchema,
70
93
  title: z.string().trim().max(CHAT_V3_TITLE_CHARS).optional(),
71
94
  /** Starts the thread inside this folder, which must be the agent's in the caller's scope. */
72
95
  folderId: folderIdSchema.optional(),
73
- }).strict();
74
- /** Renames the thread, moves it into a folder (`folderId`) or out of one (`folderId: null`), or both. */
96
+ model: v5ModelIdSchema.optional(),
97
+ reasoningEffort: chatV3ReasoningEffortSchema.optional(),
98
+ }).strict().refine(settingsTogether, { message: SETTINGS_TOGETHER, path: ['reasoningEffort'] });
99
+ /**
100
+ * Renames the thread, moves it into a folder (`folderId`) or out of one (`folderId: null`), changes
101
+ * its model and effort (both, or both null to go back to the agent's), or any of them; the last
102
+ * update wins. The next message runs with the new settings.
103
+ */
75
104
  export const chatV3UpdateThreadSchema = z.object({
76
105
  title: z.string().trim().max(CHAT_V3_TITLE_CHARS).optional(),
77
106
  folderId: folderIdSchema.nullable().optional(),
78
- }).strict().refine(body => body.title !== undefined || body.folderId !== undefined, { message: 'Send a title, a folderId or both' });
107
+ model: v5ModelIdSchema.nullable().optional(),
108
+ reasoningEffort: chatV3ReasoningEffortSchema.nullable().optional(),
109
+ }).strict().superRefine((body, ctx) => {
110
+ if (!settingsTogether(body))
111
+ ctx.addIssue({ code: 'custom', message: SETTINGS_TOGETHER, path: ['reasoningEffort'] });
112
+ else if (body.title === undefined && body.folderId === undefined && body.model === undefined)
113
+ ctx.addIssue({ code: 'custom', message: 'Send a title, a folderId, or a model and reasoningEffort.' });
114
+ });
115
+ /** Whose threads a list shows, as v1's `creator`: `all` (the default) or `me`, the caller's own. */
116
+ export const chatV3ThreadCreatorSchema = z.enum(['all', 'me']);
79
117
  /** `folderId=none` lists the threads outside every folder. */
80
118
  export const CHAT_V3_NO_FOLDER = 'none';
81
- export const chatV3ThreadListQuerySchema = z.object({
119
+ /**
120
+ * Whose catalog: an agent's, for a new thread, or a thread's, which runs the harness and model its
121
+ * session was pinned with even after the agent is published again. One of the two.
122
+ */
123
+ export const chatV3ModelListQuerySchema = z.object({
82
124
  agentId: agentIdSchema.optional(),
125
+ threadId: z.string().uuid().optional(),
126
+ }).strict().refine(query => (query.agentId === undefined) !== (query.threadId === undefined), { message: 'Send an agentId or a threadId.' });
127
+ /**
128
+ * A model a thread of the agent can choose, with the efforts it runs with, and what the chat's
129
+ * model picker shows of it: `cost` (1 to 5) is agent-api's tier, `description` the chat's own.
130
+ */
131
+ export const chatV3ModelSchema = z.object({
132
+ id: z.string(),
133
+ name: z.string(),
134
+ vendor: z.string(),
135
+ description: z.string().nullable(),
136
+ cost: z.number().int().min(1).max(5),
137
+ maxInputTokens: z.number().int().positive(),
138
+ maxOutputTokens: z.number().int().positive().nullable(),
139
+ isMultiModal: z.boolean(),
140
+ reasoningEfforts: z.array(chatV3ReasoningEffortSchema),
141
+ defaultReasoningEffort: chatV3ReasoningEffortSchema.nullable(),
142
+ });
143
+ /**
144
+ * The models of agent-api's catalog for the harness, available ones only. `defaultModel` is what a
145
+ * thread without a choice runs: the agent's own model, or for a thread its session's. An agent
146
+ * agent-api does not have, or one without a harness yet, has no models.
147
+ */
148
+ export const chatV3ModelListSchema = z.object({
149
+ agentStatus: chatV3AgentStatusSchema,
150
+ harness: v5HarnessSchema.nullable(),
151
+ defaultModel: z.string().nullable(),
152
+ models: z.array(chatV3ModelSchema),
153
+ });
154
+ /** A list is always of one agent, as a v1 conversation list always is. */
155
+ export const chatV3ThreadListQuerySchema = z.object({
156
+ agentId: agentIdSchema,
157
+ creator: chatV3ThreadCreatorSchema.optional(),
83
158
  /** Only the threads of this folder, or with `none` only those outside every folder. */
84
159
  folderId: z.union([z.literal(CHAT_V3_NO_FOLDER), folderIdSchema]).optional(),
85
- /** Exclusive cursor: the last `threadId` of the previous page. */
86
- before: z.string().uuid().optional(),
160
+ /** Exclusive, opaque cursor: the `nextCursor` of the previous page. */
161
+ before: z.string().min(1).max(200).optional(),
87
162
  limit: z.coerce.number().int().min(1).max(CHAT_V3_THREAD_PAGE.max).default(CHAT_V3_THREAD_PAGE.default),
88
163
  }).strict();
89
164
  export const chatV3ThreadListSchema = z.object({
90
165
  threads: z.array(chatV3ThreadSchema),
91
- nextCursor: z.string().uuid().nullable(),
166
+ nextCursor: z.string().nullable(),
92
167
  });
93
168
  export const CHAT_V3_FOLDER_NAME_CHARS = 80;
94
169
  const folderNameSchema = z.string().trim().min(1).max(CHAT_V3_FOLDER_NAME_CHARS);
@@ -119,6 +194,14 @@ export const chatV3CreateFolderSchema = z.object({
119
194
  export const chatV3UpdateFolderSchema = z.object({
120
195
  name: folderNameSchema,
121
196
  }).strict();
197
+ export const chatV3ThreadCountQuerySchema = z.object({
198
+ agentId: agentIdSchema,
199
+ }).strict();
200
+ /** How many threads each filter of the list shows, as v1's conversation counts. */
201
+ export const chatV3ThreadCountSchema = z.object({
202
+ all: z.number().int().nonnegative(),
203
+ mine: z.number().int().nonnegative(),
204
+ });
122
205
  export const CHAT_V3_MESSAGE_PAGE = { default: 30, max: 100 };
123
206
  /** How many files one message carries; with the message they stay within agent-api's batch. */
124
207
  export const CHAT_V3_FILES_PER_MESSAGE = 10;
@@ -177,6 +260,23 @@ export const chatV3MessageReceiptSchema = z.object({
177
260
  status: z.string(),
178
261
  });
179
262
  export const chatV3MessageStatusSchema = z.enum(['queued', 'running', 'completed', 'failed', 'cancelled', 'uncertain']);
263
+ /** The longest duration a timings report takes: one hour, in ms. */
264
+ export const CHAT_V3_TIMING_MAX_MS = 60 * 60 * 1000;
265
+ const timingMsSchema = z.number().int().min(0).max(CHAT_V3_TIMING_MAX_MS).optional();
266
+ /**
267
+ * How long a message took, as the browser that sent it and followed its turn measured it. Drafts
268
+ * are never stored, so the first output (TTFT) exists only there. Durations count from the
269
+ * runtime accepting the message, except the queue; each is left out when it was not seen.
270
+ * `errorCode` is the code agent-api gave a failed turn, never its text.
271
+ */
272
+ export const chatV3MessageTimingsSchema = z.object({
273
+ queueMs: timingMsSchema,
274
+ ttftMs: timingMsSchema,
275
+ firstTextMs: timingMsSchema,
276
+ turnMs: timingMsSchema,
277
+ outcome: z.enum(['completed', 'failed', 'cancelled', 'uncertain']),
278
+ errorCode: z.string().min(1).max(100).regex(/^[\w.:-]+$/u).optional(),
279
+ }).strict();
180
280
  /**
181
281
  * A question the agent asked (`ask_user`), answered by its `toolCallId`. `answeredBy` is the
182
282
  * message that answered it; nothing else tracks whether the agent still waits. One too long for
@@ -221,6 +321,7 @@ function parseQuestion(text) {
221
321
  return null;
222
322
  }
223
323
  }
324
+ export const chatV3MessageAuthorSchema = z.object({ userId: z.string() });
224
325
  /**
225
326
  * One message of the user and the agent's reply to it, rebuilt from the session's events on
226
327
  * every read. `text` is `null` while it is only in Vault (`textInVault`); `reply` is the
@@ -241,6 +342,14 @@ export const chatV3MessageSchema = z.object({
241
342
  fileCount: z.number().int().nonnegative(),
242
343
  /** What the agent asked while answering, if it did: its turn ended waiting for the answer. */
243
344
  question: chatV3QuestionSchema.nullable(),
345
+ /** The model and effort it ran with, as agent-api reported them when it started; null until it runs. */
346
+ model: z.string().nullable(),
347
+ reasoningEffort: z.string().nullable(),
348
+ /**
349
+ * The member who sent it. agent-api v5 does not record it yet (`user_events.actor`), so it is
350
+ * always null for now; it is never inferred from who created the thread.
351
+ */
352
+ author: chatV3MessageAuthorSchema.nullable(),
244
353
  });
245
354
  export const chatV3MessageListQuerySchema = z.object({
246
355
  /** Exclusive cursor: the `nextCursor` of the previous page, which reads older messages. */
@@ -65,6 +65,9 @@ export declare const v5ErrorStatus: {
65
65
  readonly payload_not_offloaded: 413;
66
66
  readonly agent_config_invalid: 422;
67
67
  readonly model_not_on_provider: 422;
68
+ readonly model_not_found: 422;
69
+ readonly model_harness_mismatch: 422;
70
+ readonly invalid_effort: 422;
68
71
  readonly internal_error: 500;
69
72
  readonly session_vault_unavailable: 503;
70
73
  readonly detached_delivery_unavailable: 503;
@@ -113,10 +116,47 @@ export declare const v5UserEventTypeSchema: z.ZodEnum<{
113
116
  export declare const VAULT_REFERENCE_PREFIX = "vault://";
114
117
  export declare function isVaultReference(payload: string): boolean;
115
118
  export declare const v5VaultReferenceSchema: z.ZodString;
119
+ /** The efforts a message's `settings` take. The catalog also lists `none`, which a message cannot ask for. */
120
+ export declare const v5ReasoningEffortValues: readonly ["low", "medium", "high", "xhigh", "max"];
121
+ export declare const v5ReasoningEffortSchema: z.ZodEnum<{
122
+ low: "low";
123
+ medium: "medium";
124
+ high: "high";
125
+ xhigh: "xhigh";
126
+ max: "max";
127
+ }>;
128
+ export type V5ReasoningEffort = z.infer<typeof v5ReasoningEffortSchema>;
129
+ export declare const v5ModelIdSchema: z.ZodString;
130
+ /**
131
+ * The model and effort one message runs with, both or none. Without them, agent-api runs the
132
+ * message with the session's own (the agent's at its snapshot); it never keeps the last ones.
133
+ * agent-api checks the model against the session's harness and provider when it admits the message.
134
+ */
135
+ export declare const v5MessageSettingsSchema: z.ZodObject<{
136
+ model: z.ZodString;
137
+ reasoningEffort: z.ZodEnum<{
138
+ low: "low";
139
+ medium: "medium";
140
+ high: "high";
141
+ xhigh: "xhigh";
142
+ max: "max";
143
+ }>;
144
+ }, z.core.$strict>;
145
+ export type V5MessageSettings = z.infer<typeof v5MessageSettingsSchema>;
116
146
  /** A user event as the client sends it: a message, a steer, an input, a cancel or an answer. */
117
147
  export declare const v5UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
118
148
  type: z.ZodLiteral<"message-queue">;
119
149
  payload: z.ZodString;
150
+ settings: z.ZodOptional<z.ZodObject<{
151
+ model: z.ZodString;
152
+ reasoningEffort: z.ZodEnum<{
153
+ low: "low";
154
+ medium: "medium";
155
+ high: "high";
156
+ xhigh: "xhigh";
157
+ max: "max";
158
+ }>;
159
+ }, z.core.$strict>>;
120
160
  }, z.core.$strict>, z.ZodObject<{
121
161
  type: z.ZodLiteral<"message-steer">;
122
162
  turnId: z.ZodString;
@@ -132,12 +172,32 @@ export declare const v5UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
132
172
  type: z.ZodLiteral<"tool-result">;
133
173
  toolCallId: z.ZodString;
134
174
  payload: z.ZodString;
175
+ settings: z.ZodOptional<z.ZodObject<{
176
+ model: z.ZodString;
177
+ reasoningEffort: z.ZodEnum<{
178
+ low: "low";
179
+ medium: "medium";
180
+ high: "high";
181
+ xhigh: "xhigh";
182
+ max: "max";
183
+ }>;
184
+ }, z.core.$strict>>;
135
185
  }, z.core.$strict>], "type">;
136
186
  export type V5UserEvent = z.infer<typeof v5UserEventSchema>;
137
187
  export declare const v5EventsRequestSchema: z.ZodObject<{
138
188
  events: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
139
189
  type: z.ZodLiteral<"message-queue">;
140
190
  payload: z.ZodString;
191
+ settings: z.ZodOptional<z.ZodObject<{
192
+ model: z.ZodString;
193
+ reasoningEffort: z.ZodEnum<{
194
+ low: "low";
195
+ medium: "medium";
196
+ high: "high";
197
+ xhigh: "xhigh";
198
+ max: "max";
199
+ }>;
200
+ }, z.core.$strict>>;
141
201
  }, z.core.$strict>, z.ZodObject<{
142
202
  type: z.ZodLiteral<"message-steer">;
143
203
  turnId: z.ZodString;
@@ -153,6 +213,16 @@ export declare const v5EventsRequestSchema: z.ZodObject<{
153
213
  type: z.ZodLiteral<"tool-result">;
154
214
  toolCallId: z.ZodString;
155
215
  payload: z.ZodString;
216
+ settings: z.ZodOptional<z.ZodObject<{
217
+ model: z.ZodString;
218
+ reasoningEffort: z.ZodEnum<{
219
+ low: "low";
220
+ medium: "medium";
221
+ high: "high";
222
+ xhigh: "xhigh";
223
+ max: "max";
224
+ }>;
225
+ }, z.core.$strict>>;
156
226
  }, z.core.$strict>], "type">>;
157
227
  }, z.core.$strict>;
158
228
  export type V5EventsRequest = z.infer<typeof v5EventsRequestSchema>;
@@ -616,53 +686,6 @@ export declare const v5SessionSchema: z.ZodObject<{
616
686
  createdAt: z.ZodString;
617
687
  }, z.core.$loose>;
618
688
  export type V5Session = z.infer<typeof v5SessionSchema>;
619
- export declare const v5SessionListSchema: z.ZodObject<{
620
- sessions: z.ZodArray<z.ZodObject<{
621
- sessionId: z.ZodString;
622
- agentId: z.ZodString;
623
- snapshotId: z.ZodString;
624
- harness: z.ZodEnum<{
625
- claude: "claude";
626
- lightweight: "lightweight";
627
- codex: "codex";
628
- }>;
629
- status: z.ZodEnum<{
630
- running: "running";
631
- failed: "failed";
632
- ready: "ready";
633
- initializing: "initializing";
634
- paused: "paused";
635
- detached: "detached";
636
- closing: "closing";
637
- closed: "closed";
638
- }>;
639
- executionMode: z.ZodEnum<{
640
- chat: "chat";
641
- sync: "sync";
642
- async: "async";
643
- }>;
644
- runtime: z.ZodObject<{
645
- state: z.ZodString;
646
- }, z.core.$loose>;
647
- configuration: z.ZodObject<{
648
- harness: z.ZodEnum<{
649
- claude: "claude";
650
- lightweight: "lightweight";
651
- codex: "codex";
652
- }>;
653
- model: z.ZodOptional<z.ZodString>;
654
- provider: z.ZodOptional<z.ZodString>;
655
- effort: z.ZodOptional<z.ZodString>;
656
- commitSha: z.ZodString;
657
- repository: z.ZodString;
658
- }, z.core.$loose>;
659
- effectiveModelSettings: z.ZodNullable<z.ZodObject<{
660
- model: z.ZodString;
661
- reasoningEffort: z.ZodNullable<z.ZodString>;
662
- }, z.core.$loose>>;
663
- createdAt: z.ZodString;
664
- }, z.core.$loose>>;
665
- }, z.core.$loose>;
666
689
  /** Creation admits the session and its first queued messages and inputs in one idempotent request. */
667
690
  export declare const v5SessionCreateSchema: z.ZodObject<{
668
691
  agentId: z.ZodString;
@@ -676,6 +699,16 @@ export declare const v5SessionCreateSchema: z.ZodObject<{
676
699
  events: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
677
700
  type: z.ZodLiteral<"message-queue">;
678
701
  payload: z.ZodString;
702
+ settings: z.ZodOptional<z.ZodObject<{
703
+ model: z.ZodString;
704
+ reasoningEffort: z.ZodEnum<{
705
+ low: "low";
706
+ medium: "medium";
707
+ high: "high";
708
+ xhigh: "xhigh";
709
+ max: "max";
710
+ }>;
711
+ }, z.core.$strict>>;
679
712
  }, z.core.$strict>, z.ZodObject<{
680
713
  type: z.ZodLiteral<"message-steer">;
681
714
  turnId: z.ZodString;
@@ -691,6 +724,16 @@ export declare const v5SessionCreateSchema: z.ZodObject<{
691
724
  type: z.ZodLiteral<"tool-result">;
692
725
  toolCallId: z.ZodString;
693
726
  payload: z.ZodString;
727
+ settings: z.ZodOptional<z.ZodObject<{
728
+ model: z.ZodString;
729
+ reasoningEffort: z.ZodEnum<{
730
+ low: "low";
731
+ medium: "medium";
732
+ high: "high";
733
+ xhigh: "xhigh";
734
+ max: "max";
735
+ }>;
736
+ }, z.core.$strict>>;
694
737
  }, z.core.$strict>], "type">>>;
695
738
  telaAgentId: z.ZodOptional<z.ZodString>;
696
739
  projectId: z.ZodOptional<z.ZodString>;
@@ -823,6 +866,79 @@ export declare const v5AgentListSchema: z.ZodObject<{
823
866
  updatedAt: z.ZodString;
824
867
  }, z.core.$loose>>;
825
868
  }, z.core.$loose>;
869
+ /**
870
+ * A model of agent-api's catalog (`GET /v5/agents/models`). `reasoningEfforts` are the ones the
871
+ * model runs with, `none` included; an alias (`aliasOf`) names another entry.
872
+ */
873
+ export declare const v5ModelSchema: z.ZodObject<{
874
+ id: z.ZodString;
875
+ name: z.ZodString;
876
+ vendor: z.ZodString;
877
+ harness: z.ZodEnum<{
878
+ claude: "claude";
879
+ lightweight: "lightweight";
880
+ codex: "codex";
881
+ }>;
882
+ harnesses: z.ZodArray<z.ZodEnum<{
883
+ claude: "claude";
884
+ lightweight: "lightweight";
885
+ codex: "codex";
886
+ }>>;
887
+ contextWindow: z.ZodNumber;
888
+ maxOutputTokens: z.ZodNullable<z.ZodNumber>;
889
+ inputModalities: z.ZodArray<z.ZodString>;
890
+ tier: z.ZodNumber;
891
+ reasoningEfforts: z.ZodArray<z.ZodString>;
892
+ defaultReasoningEffort: z.ZodNullable<z.ZodString>;
893
+ status: z.ZodEnum<{
894
+ available: "available";
895
+ deprecated: "deprecated";
896
+ }>;
897
+ aliasOf: z.ZodNullable<z.ZodString>;
898
+ isDefault: z.ZodBoolean;
899
+ }, z.core.$loose>;
900
+ export type V5Model = z.infer<typeof v5ModelSchema>;
901
+ export declare const v5ModelListSchema: z.ZodObject<{
902
+ models: z.ZodArray<z.ZodObject<{
903
+ id: z.ZodString;
904
+ name: z.ZodString;
905
+ vendor: z.ZodString;
906
+ harness: z.ZodEnum<{
907
+ claude: "claude";
908
+ lightweight: "lightweight";
909
+ codex: "codex";
910
+ }>;
911
+ harnesses: z.ZodArray<z.ZodEnum<{
912
+ claude: "claude";
913
+ lightweight: "lightweight";
914
+ codex: "codex";
915
+ }>>;
916
+ contextWindow: z.ZodNumber;
917
+ maxOutputTokens: z.ZodNullable<z.ZodNumber>;
918
+ inputModalities: z.ZodArray<z.ZodString>;
919
+ tier: z.ZodNumber;
920
+ reasoningEfforts: z.ZodArray<z.ZodString>;
921
+ defaultReasoningEffort: z.ZodNullable<z.ZodString>;
922
+ status: z.ZodEnum<{
923
+ available: "available";
924
+ deprecated: "deprecated";
925
+ }>;
926
+ aliasOf: z.ZodNullable<z.ZodString>;
927
+ isDefault: z.ZodBoolean;
928
+ }, z.core.$loose>>;
929
+ }, z.core.$loose>;
930
+ export declare const v5ModelQuerySchema: z.ZodObject<{
931
+ harness: z.ZodOptional<z.ZodEnum<{
932
+ claude: "claude";
933
+ lightweight: "lightweight";
934
+ codex: "codex";
935
+ }>>;
936
+ status: z.ZodOptional<z.ZodEnum<{
937
+ available: "available";
938
+ deprecated: "deprecated";
939
+ }>>;
940
+ }, z.core.$strict>;
941
+ export type V5ModelQuery = z.infer<typeof v5ModelQuerySchema>;
826
942
  export declare const v5SnapshotPublishSchema: z.ZodObject<{
827
943
  organizationName: z.ZodString;
828
944
  repository: z.ZodString;
@@ -59,6 +59,9 @@ export const v5ErrorStatus = {
59
59
  payload_not_offloaded: 413,
60
60
  agent_config_invalid: 422,
61
61
  model_not_on_provider: 422,
62
+ model_not_found: 422,
63
+ model_harness_mismatch: 422,
64
+ invalid_effort: 422,
62
65
  internal_error: 500,
63
66
  session_vault_unavailable: 503,
64
67
  detached_delivery_unavailable: 503,
@@ -78,6 +81,16 @@ export function isVaultReference(payload) {
78
81
  return payload.startsWith(VAULT_REFERENCE_PREFIX);
79
82
  }
80
83
  export const v5VaultReferenceSchema = z.string().max(2048).regex(/^vault:\/\/\S+$/u);
84
+ /** The efforts a message's `settings` take. The catalog also lists `none`, which a message cannot ask for. */
85
+ export const v5ReasoningEffortValues = ['low', 'medium', 'high', 'xhigh', 'max'];
86
+ export const v5ReasoningEffortSchema = z.enum(v5ReasoningEffortValues);
87
+ export const v5ModelIdSchema = z.string().min(1).max(256);
88
+ /**
89
+ * The model and effort one message runs with, both or none. Without them, agent-api runs the
90
+ * message with the session's own (the agent's at its snapshot); it never keeps the last ones.
91
+ * agent-api checks the model against the session's harness and provider when it admits the message.
92
+ */
93
+ export const v5MessageSettingsSchema = z.object({ model: v5ModelIdSchema, reasoningEffort: v5ReasoningEffortSchema }).strict();
81
94
  const inputNameSchema = z.string().min(1).max(128).regex(/^[a-z_][\w-]*$/iu);
82
95
  const payloadSchema = z.string().min(1);
83
96
  function isAnswers(payload) {
@@ -91,11 +104,12 @@ function isAnswers(payload) {
91
104
  }
92
105
  /** A user event as the client sends it: a message, a steer, an input, a cancel or an answer. */
93
106
  export const v5UserEventSchema = z.discriminatedUnion('type', [
94
- z.object({ type: z.literal('message-queue'), payload: payloadSchema }).strict(),
107
+ z.object({ type: z.literal('message-queue'), payload: payloadSchema, settings: v5MessageSettingsSchema.optional() }).strict(),
95
108
  z.object({ type: z.literal('message-steer'), turnId: v5TurnIdSchema, payload: payloadSchema }).strict(),
96
109
  z.object({ type: z.literal('input'), name: inputNameSchema.optional(), payload: payloadSchema.optional() }).strict(),
97
110
  z.object({ type: z.literal('cancel'), turnId: v5TurnIdSchema }).strict(),
98
- z.object({ type: z.literal('tool-result'), toolCallId: z.string().min(1).max(v5Limits.turnIdChars), payload: payloadSchema }).strict(),
111
+ // An answer opens the next turn, so it takes settings too; a steer runs in the turn it joins.
112
+ z.object({ type: z.literal('tool-result'), toolCallId: z.string().min(1).max(v5Limits.turnIdChars), payload: payloadSchema, settings: v5MessageSettingsSchema.optional() }).strict(),
99
113
  ]).superRefine((input, ctx) => {
100
114
  const payload = 'payload' in input ? input.payload : undefined;
101
115
  if (input.type === 'input' && payload === undefined && input.name === undefined)
@@ -281,7 +295,6 @@ export const v5SessionSchema = z.looseObject({
281
295
  effectiveModelSettings: z.looseObject({ model: z.string(), reasoningEffort: z.string().nullable() }).nullable(),
282
296
  createdAt: z.string(),
283
297
  });
284
- export const v5SessionListSchema = z.looseObject({ sessions: z.array(v5SessionSchema) });
285
298
  /** Creation admits the session and its first queued messages and inputs in one idempotent request. */
286
299
  export const v5SessionCreateSchema = z.object({
287
300
  agentId: z.string().uuid(),
@@ -327,6 +340,31 @@ export const v5AgentSchema = z.looseObject({
327
340
  });
328
341
  export const v5AgentDetailSchema = v5AgentSchema.extend({ snapshots: z.array(v5AgentSnapshotSchema) });
329
342
  export const v5AgentListSchema = z.looseObject({ agents: z.array(v5AgentSchema) });
343
+ /**
344
+ * A model of agent-api's catalog (`GET /v5/agents/models`). `reasoningEfforts` are the ones the
345
+ * model runs with, `none` included; an alias (`aliasOf`) names another entry.
346
+ */
347
+ export const v5ModelSchema = z.looseObject({
348
+ id: z.string().min(1),
349
+ name: z.string().min(1),
350
+ vendor: z.string().min(1),
351
+ harness: v5HarnessSchema,
352
+ harnesses: z.array(v5HarnessSchema),
353
+ contextWindow: z.number().int().positive(),
354
+ maxOutputTokens: z.number().int().positive().nullable(),
355
+ inputModalities: z.array(z.string()),
356
+ tier: z.number().int(),
357
+ reasoningEfforts: z.array(z.string()),
358
+ defaultReasoningEffort: z.string().nullable(),
359
+ status: z.enum(['available', 'deprecated']),
360
+ aliasOf: z.string().nullable(),
361
+ isDefault: z.boolean(),
362
+ });
363
+ export const v5ModelListSchema = z.looseObject({ models: z.array(v5ModelSchema) });
364
+ export const v5ModelQuerySchema = z.object({
365
+ harness: v5HarnessSchema.optional(),
366
+ status: z.enum(['available', 'deprecated']).optional(),
367
+ }).strict();
330
368
  export const v5SnapshotPublishSchema = z.object({
331
369
  organizationName: z.string().min(1).max(v5Limits.attributionChars),
332
370
  repository: z.string().min(1).max(v5Limits.attributionChars),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
- "version": "4.13.0-rc.12",
3
+ "version": "4.13.0-rc.14",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -52,7 +52,7 @@
52
52
  "@iconify-json/ph": "^1.2.2",
53
53
  "@iconify/vue": "^5.0.0",
54
54
  "@meistrari/auth-nuxt": "3.31.0",
55
- "@meistrari/chat-ui-lang": "0.8.1-rc.1",
55
+ "@meistrari/chat-ui-lang": "0.8.1-rc.2",
56
56
  "@meistrari/logger": "^2.1.3",
57
57
  "@meistrari/tela-build": "^1.79.0",
58
58
  "@openuidev/lang-core": "1.0.0",