@meistrari/chat-nuxt 4.13.0-rc.15 → 4.13.0-rc.16
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 +26 -4
- package/dist/runtime/types/schemas/chat/v3.js +19 -5
- package/dist/runtime/types/schemas/integrations/agent-events.d.ts +18 -0
- package/dist/runtime/types/schemas/integrations/agent-events.js +13 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -13,6 +13,16 @@ 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
|
+
* How the agent of a request was chosen, in the order v1 chooses it: the one the request names,
|
|
18
|
+
* the workspace's own agent (its v1 agent, by id), or the environment's default.
|
|
19
|
+
*/
|
|
20
|
+
export declare const chatV3AgentSourceSchema: z.ZodEnum<{
|
|
21
|
+
default: "default";
|
|
22
|
+
request: "request";
|
|
23
|
+
workspace: "workspace";
|
|
24
|
+
}>;
|
|
25
|
+
export type ChatV3AgentSource = z.infer<typeof chatV3AgentSourceSchema>;
|
|
16
26
|
export declare const chatV3AgentSchema: z.ZodObject<{
|
|
17
27
|
agentId: z.ZodString;
|
|
18
28
|
repository: z.ZodString;
|
|
@@ -35,6 +45,11 @@ export declare const chatV3ConfigurationSchema: z.ZodObject<{
|
|
|
35
45
|
not_in_catalog: "not_in_catalog";
|
|
36
46
|
not_published: "not_published";
|
|
37
47
|
}>;
|
|
48
|
+
agentSource: z.ZodNullable<z.ZodEnum<{
|
|
49
|
+
default: "default";
|
|
50
|
+
request: "request";
|
|
51
|
+
workspace: "workspace";
|
|
52
|
+
}>>;
|
|
38
53
|
agent: z.ZodNullable<z.ZodObject<{
|
|
39
54
|
agentId: z.ZodString;
|
|
40
55
|
repository: z.ZodString;
|
|
@@ -132,10 +147,14 @@ export declare const chatV3ThreadDetailSchema: z.ZodObject<{
|
|
|
132
147
|
export type ChatV3ThreadDetail = z.infer<typeof chatV3ThreadDetailSchema>;
|
|
133
148
|
/**
|
|
134
149
|
* Creation also opens the agent-api session; send an `Idempotency-Key` header to retry safely.
|
|
135
|
-
*
|
|
150
|
+
* Without `agentId` the agent is chosen as v1 does: the workspace's own agent, else the default.
|
|
151
|
+
* `agentBranch` runs the head of that branch of the agent's repository instead of its publication;
|
|
152
|
+
* the session stays on that commit. The model and effort are optional, both or neither: agent-api
|
|
153
|
+
* checks them when a message goes.
|
|
136
154
|
*/
|
|
137
155
|
export declare const chatV3CreateThreadSchema: z.ZodObject<{
|
|
138
|
-
agentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string
|
|
156
|
+
agentId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
157
|
+
agentBranch: z.ZodOptional<z.ZodString>;
|
|
139
158
|
title: z.ZodOptional<z.ZodString>;
|
|
140
159
|
folderId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
141
160
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -256,9 +275,12 @@ export declare const chatV3ModelListSchema: z.ZodObject<{
|
|
|
256
275
|
}, z.core.$strip>>;
|
|
257
276
|
}, z.core.$strip>;
|
|
258
277
|
export type ChatV3ModelList = z.infer<typeof chatV3ModelListSchema>;
|
|
259
|
-
/**
|
|
278
|
+
/**
|
|
279
|
+
* A list is always of one agent, as a v1 conversation list always is. Without `agentId`, the agent
|
|
280
|
+
* is chosen as v1 does: the workspace's own agent, else the default.
|
|
281
|
+
*/
|
|
260
282
|
export declare const chatV3ThreadListQuerySchema: z.ZodObject<{
|
|
261
|
-
agentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string
|
|
283
|
+
agentId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
262
284
|
creator: z.ZodOptional<z.ZodEnum<{
|
|
263
285
|
all: "all";
|
|
264
286
|
me: "me";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { parseV5EventHint, v5ArtifactPageSchema, v5EventIdSchema, v5HarnessSchema, v5Limits, v5ModelIdSchema, v5ReasoningEffortSchema, v5SessionEventSchema, v5TurnIdSchema, v5UserInputRequestSchema, v5VaultReferenceSchema } from '../integrations/agent-events';
|
|
2
|
+
import { parseV5EventHint, v5ArtifactPageSchema, v5BranchNameSchema, 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.
|
|
@@ -16,6 +16,11 @@ export const chatV3AgentStatusSchema = z.enum([
|
|
|
16
16
|
/** Published: a session can start. */
|
|
17
17
|
'ready',
|
|
18
18
|
]);
|
|
19
|
+
/**
|
|
20
|
+
* How the agent of a request was chosen, in the order v1 chooses it: the one the request names,
|
|
21
|
+
* the workspace's own agent (its v1 agent, by id), or the environment's default.
|
|
22
|
+
*/
|
|
23
|
+
export const chatV3AgentSourceSchema = z.enum(['request', 'workspace', 'default']);
|
|
19
24
|
export const chatV3AgentSchema = z.object({
|
|
20
25
|
agentId: z.string().uuid(),
|
|
21
26
|
repository: z.string(),
|
|
@@ -28,6 +33,8 @@ export const chatV3ConfigurationSchema = z.object({
|
|
|
28
33
|
apiVersion: z.literal(3),
|
|
29
34
|
contractVersion: z.literal(CHAT_V3_CONTRACT_VERSION),
|
|
30
35
|
agentStatus: chatV3AgentStatusSchema,
|
|
36
|
+
/** `null` when no agent is named and there is neither a workspace agent nor a default one. */
|
|
37
|
+
agentSource: chatV3AgentSourceSchema.nullable(),
|
|
31
38
|
agent: chatV3AgentSchema.nullable(),
|
|
32
39
|
limits: z.object({
|
|
33
40
|
messageTextChars: z.number().int().positive(),
|
|
@@ -86,10 +93,14 @@ export const chatV3SessionSummarySchema = z.object({
|
|
|
86
93
|
export const chatV3ThreadDetailSchema = chatV3ThreadSchema.extend({ session: chatV3SessionSummarySchema });
|
|
87
94
|
/**
|
|
88
95
|
* Creation also opens the agent-api session; send an `Idempotency-Key` header to retry safely.
|
|
89
|
-
*
|
|
96
|
+
* Without `agentId` the agent is chosen as v1 does: the workspace's own agent, else the default.
|
|
97
|
+
* `agentBranch` runs the head of that branch of the agent's repository instead of its publication;
|
|
98
|
+
* the session stays on that commit. The model and effort are optional, both or neither: agent-api
|
|
99
|
+
* checks them when a message goes.
|
|
90
100
|
*/
|
|
91
101
|
export const chatV3CreateThreadSchema = z.object({
|
|
92
|
-
agentId: agentIdSchema,
|
|
102
|
+
agentId: agentIdSchema.optional(),
|
|
103
|
+
agentBranch: v5BranchNameSchema.optional(),
|
|
93
104
|
title: z.string().trim().max(CHAT_V3_TITLE_CHARS).optional(),
|
|
94
105
|
/** Starts the thread inside this folder, which must be the agent's in the caller's scope. */
|
|
95
106
|
folderId: folderIdSchema.optional(),
|
|
@@ -151,9 +162,12 @@ export const chatV3ModelListSchema = z.object({
|
|
|
151
162
|
defaultModel: z.string().nullable(),
|
|
152
163
|
models: z.array(chatV3ModelSchema),
|
|
153
164
|
});
|
|
154
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* A list is always of one agent, as a v1 conversation list always is. Without `agentId`, the agent
|
|
167
|
+
* is chosen as v1 does: the workspace's own agent, else the default.
|
|
168
|
+
*/
|
|
155
169
|
export const chatV3ThreadListQuerySchema = z.object({
|
|
156
|
-
agentId: agentIdSchema,
|
|
170
|
+
agentId: agentIdSchema.optional(),
|
|
157
171
|
creator: chatV3ThreadCreatorSchema.optional(),
|
|
158
172
|
/** Only the threads of this folder, or with `none` only those outside every folder. */
|
|
159
173
|
folderId: z.union([z.literal(CHAT_V3_NO_FOLDER), folderIdSchema]).optional(),
|
|
@@ -866,6 +866,24 @@ export declare const v5AgentListSchema: z.ZodObject<{
|
|
|
866
866
|
updatedAt: z.ZodString;
|
|
867
867
|
}, z.core.$loose>>;
|
|
868
868
|
}, z.core.$loose>;
|
|
869
|
+
/** A branch of an agent's repository, as agent-api takes it in a query or a body. */
|
|
870
|
+
export declare const v5BranchNameSchema: z.ZodString;
|
|
871
|
+
export declare const v5CommitHashSchema: z.ZodString;
|
|
872
|
+
/** Where a read of the repository looks: a branch, a commit, or the default branch. */
|
|
873
|
+
export declare const v5RepositoryRefSchema: z.ZodObject<{
|
|
874
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
875
|
+
commitHash: z.ZodOptional<z.ZodString>;
|
|
876
|
+
}, z.core.$strict>;
|
|
877
|
+
export type V5RepositoryRef = z.infer<typeof v5RepositoryRefSchema>;
|
|
878
|
+
export declare const v5RepositorySchema: z.ZodObject<{
|
|
879
|
+
branch: z.ZodString;
|
|
880
|
+
commitHash: z.ZodString;
|
|
881
|
+
tree: z.ZodArray<z.ZodObject<{
|
|
882
|
+
path: z.ZodString;
|
|
883
|
+
type: z.ZodString;
|
|
884
|
+
}, z.core.$loose>>;
|
|
885
|
+
}, z.core.$loose>;
|
|
886
|
+
export type V5Repository = z.infer<typeof v5RepositorySchema>;
|
|
869
887
|
/**
|
|
870
888
|
* A model of agent-api's catalog (`GET /v5/agents/models`). `reasoningEfforts` are the ones the
|
|
871
889
|
* model runs with, `none` included; an alias (`aliasOf`) names another entry.
|
|
@@ -340,6 +340,19 @@ export const v5AgentSchema = z.looseObject({
|
|
|
340
340
|
});
|
|
341
341
|
export const v5AgentDetailSchema = v5AgentSchema.extend({ snapshots: z.array(v5AgentSnapshotSchema) });
|
|
342
342
|
export const v5AgentListSchema = z.looseObject({ agents: z.array(v5AgentSchema) });
|
|
343
|
+
/** A branch of an agent's repository, as agent-api takes it in a query or a body. */
|
|
344
|
+
export const v5BranchNameSchema = z.string().min(1).max(200).regex(/^(?!-)[\w./-]+$/u);
|
|
345
|
+
export const v5CommitHashSchema = z.string().min(1).max(64).regex(/^[\da-f]+$/iu);
|
|
346
|
+
/** Where a read of the repository looks: a branch, a commit, or the default branch. */
|
|
347
|
+
export const v5RepositoryRefSchema = z.object({
|
|
348
|
+
branch: v5BranchNameSchema.optional(),
|
|
349
|
+
commitHash: v5CommitHashSchema.optional(),
|
|
350
|
+
}).strict();
|
|
351
|
+
export const v5RepositorySchema = z.looseObject({
|
|
352
|
+
branch: z.string(),
|
|
353
|
+
commitHash: z.string(),
|
|
354
|
+
tree: z.array(z.looseObject({ path: z.string(), type: z.string() })),
|
|
355
|
+
});
|
|
343
356
|
/**
|
|
344
357
|
* A model of agent-api's catalog (`GET /v5/agents/models`). `reasoningEfforts` are the ones the
|
|
345
358
|
* model runs with, `none` included; an alias (`aliasOf`) names another entry.
|