@meistrari/chat-nuxt 4.10.0-rc.7 → 4.10.0-rc.8
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-drawer.d.vue.ts +2 -2
- package/dist/runtime/embed/components/mobile/chat-mobile-drawer.vue.d.ts +2 -2
- 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/types/schemas/chat/v3.d.ts +92 -0
- package/dist/runtime/types/schemas/chat/v3.js +44 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -10,12 +10,12 @@ type __VLS_Props = {
|
|
|
10
10
|
userImage?: string;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
-
select: (id: string) => any;
|
|
14
13
|
close: () => any;
|
|
14
|
+
select: (id: string) => any;
|
|
15
15
|
newConvo: (groupId?: string | null | undefined) => any;
|
|
16
16
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
-
onSelect?: ((id: string) => any) | undefined;
|
|
18
17
|
onClose?: (() => any) | undefined;
|
|
18
|
+
onSelect?: ((id: string) => any) | undefined;
|
|
19
19
|
onNewConvo?: ((groupId?: string | null | undefined) => any) | undefined;
|
|
20
20
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -10,12 +10,12 @@ type __VLS_Props = {
|
|
|
10
10
|
userImage?: string;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
-
select: (id: string) => any;
|
|
14
13
|
close: () => any;
|
|
14
|
+
select: (id: string) => any;
|
|
15
15
|
newConvo: (groupId?: string | null | undefined) => any;
|
|
16
16
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
-
onSelect?: ((id: string) => any) | undefined;
|
|
18
17
|
onClose?: (() => any) | undefined;
|
|
18
|
+
onSelect?: ((id: string) => any) | undefined;
|
|
19
19
|
onNewConvo?: ((groupId?: string | null | undefined) => any) | undefined;
|
|
20
20
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -64,11 +64,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
64
64
|
"update:selectedReasoningEffort": (value: any) => any;
|
|
65
65
|
} & {
|
|
66
66
|
delete: () => any;
|
|
67
|
-
cancel: () => any;
|
|
68
67
|
rename: () => any;
|
|
69
68
|
duplicate: () => any;
|
|
70
69
|
export: () => any;
|
|
71
70
|
copyLink: () => any;
|
|
71
|
+
cancel: () => any;
|
|
72
72
|
debug: () => any;
|
|
73
73
|
selectConversation: (id: string) => any;
|
|
74
74
|
settings: () => any;
|
|
@@ -86,11 +86,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
86
86
|
"update:workspaceSheetOpen": (value: boolean) => any;
|
|
87
87
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
88
88
|
onDelete?: (() => any) | undefined;
|
|
89
|
-
onCancel?: (() => any) | undefined;
|
|
90
89
|
onRename?: (() => any) | undefined;
|
|
91
90
|
onDuplicate?: (() => any) | undefined;
|
|
92
91
|
onExport?: (() => any) | undefined;
|
|
93
92
|
onCopyLink?: (() => any) | undefined;
|
|
93
|
+
onCancel?: (() => any) | undefined;
|
|
94
94
|
onDebug?: (() => any) | undefined;
|
|
95
95
|
onSelectConversation?: ((id: string) => any) | undefined;
|
|
96
96
|
onSettings?: (() => any) | undefined;
|
|
@@ -64,11 +64,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
64
64
|
"update:selectedReasoningEffort": (value: any) => any;
|
|
65
65
|
} & {
|
|
66
66
|
delete: () => any;
|
|
67
|
-
cancel: () => any;
|
|
68
67
|
rename: () => any;
|
|
69
68
|
duplicate: () => any;
|
|
70
69
|
export: () => any;
|
|
71
70
|
copyLink: () => any;
|
|
71
|
+
cancel: () => any;
|
|
72
72
|
debug: () => any;
|
|
73
73
|
selectConversation: (id: string) => any;
|
|
74
74
|
settings: () => any;
|
|
@@ -86,11 +86,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
86
86
|
"update:workspaceSheetOpen": (value: boolean) => any;
|
|
87
87
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
88
88
|
onDelete?: (() => any) | undefined;
|
|
89
|
-
onCancel?: (() => any) | undefined;
|
|
90
89
|
onRename?: (() => any) | undefined;
|
|
91
90
|
onDuplicate?: (() => any) | undefined;
|
|
92
91
|
onExport?: (() => any) | undefined;
|
|
93
92
|
onCopyLink?: (() => any) | undefined;
|
|
93
|
+
onCancel?: (() => any) | undefined;
|
|
94
94
|
onDebug?: (() => any) | undefined;
|
|
95
95
|
onSelectConversation?: ((id: string) => any) | undefined;
|
|
96
96
|
onSettings?: (() => any) | undefined;
|
|
@@ -119,3 +119,95 @@ export declare const chatV3ThreadListSchema: z.ZodObject<{
|
|
|
119
119
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
120
120
|
}, z.core.$strip>;
|
|
121
121
|
export type ChatV3ThreadList = z.infer<typeof chatV3ThreadListSchema>;
|
|
122
|
+
export declare const CHAT_V3_MESSAGE_PAGE: {
|
|
123
|
+
readonly default: 30;
|
|
124
|
+
readonly max: 100;
|
|
125
|
+
};
|
|
126
|
+
/** A message's text; above the inline limit agent-api keeps it in Vault and the event points at it. */
|
|
127
|
+
export declare const chatV3SendMessageSchema: z.ZodObject<{
|
|
128
|
+
text: z.ZodString;
|
|
129
|
+
}, z.core.$strict>;
|
|
130
|
+
export type ChatV3SendMessage = z.infer<typeof chatV3SendMessageSchema>;
|
|
131
|
+
/** Cancels the running turn; the turnId comes from the message that started it. */
|
|
132
|
+
export declare const chatV3CancelTurnSchema: z.ZodObject<{
|
|
133
|
+
turnId: z.ZodString;
|
|
134
|
+
}, z.core.$strict>;
|
|
135
|
+
export type ChatV3CancelTurn = z.infer<typeof chatV3CancelTurnSchema>;
|
|
136
|
+
/** The answer of every write: agent-api admitted the user event. `messageId` is its v5 eventId. */
|
|
137
|
+
export declare const chatV3MessageReceiptSchema: z.ZodObject<{
|
|
138
|
+
messageId: z.ZodString;
|
|
139
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
140
|
+
status: z.ZodString;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
export type ChatV3MessageReceipt = z.infer<typeof chatV3MessageReceiptSchema>;
|
|
143
|
+
export declare const chatV3MessageStatusSchema: z.ZodEnum<{
|
|
144
|
+
running: "running";
|
|
145
|
+
completed: "completed";
|
|
146
|
+
failed: "failed";
|
|
147
|
+
cancelled: "cancelled";
|
|
148
|
+
queued: "queued";
|
|
149
|
+
uncertain: "uncertain";
|
|
150
|
+
}>;
|
|
151
|
+
export type ChatV3MessageStatus = z.infer<typeof chatV3MessageStatusSchema>;
|
|
152
|
+
/**
|
|
153
|
+
* One message of the user and the agent's reply to it, rebuilt from the session's events on
|
|
154
|
+
* every read. `text` is `null` while it is only in Vault (`textInVault`); `reply` is the
|
|
155
|
+
* canonical text the agent stored so far, without the live drafts.
|
|
156
|
+
*/
|
|
157
|
+
export declare const chatV3MessageSchema: z.ZodObject<{
|
|
158
|
+
messageId: z.ZodString;
|
|
159
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
160
|
+
mode: z.ZodEnum<{
|
|
161
|
+
queue: "queue";
|
|
162
|
+
steer: "steer";
|
|
163
|
+
answer: "answer";
|
|
164
|
+
}>;
|
|
165
|
+
status: z.ZodEnum<{
|
|
166
|
+
running: "running";
|
|
167
|
+
completed: "completed";
|
|
168
|
+
failed: "failed";
|
|
169
|
+
cancelled: "cancelled";
|
|
170
|
+
queued: "queued";
|
|
171
|
+
uncertain: "uncertain";
|
|
172
|
+
}>;
|
|
173
|
+
text: z.ZodNullable<z.ZodString>;
|
|
174
|
+
textInVault: z.ZodBoolean;
|
|
175
|
+
reply: z.ZodString;
|
|
176
|
+
createdAt: z.ZodString;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
export type ChatV3Message = z.infer<typeof chatV3MessageSchema>;
|
|
179
|
+
export declare const chatV3MessageListQuerySchema: z.ZodObject<{
|
|
180
|
+
before: z.ZodOptional<z.ZodString>;
|
|
181
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
182
|
+
}, z.core.$strict>;
|
|
183
|
+
export type ChatV3MessageListQuery = z.infer<typeof chatV3MessageListQuerySchema>;
|
|
184
|
+
/**
|
|
185
|
+
* The latest messages, oldest first. `eventCursor` is the last event the page was built from:
|
|
186
|
+
* open the event stream with it as `Last-Event-ID` and nothing falls between the two.
|
|
187
|
+
*/
|
|
188
|
+
export declare const chatV3MessageListSchema: z.ZodObject<{
|
|
189
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
190
|
+
messageId: z.ZodString;
|
|
191
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
192
|
+
mode: z.ZodEnum<{
|
|
193
|
+
queue: "queue";
|
|
194
|
+
steer: "steer";
|
|
195
|
+
answer: "answer";
|
|
196
|
+
}>;
|
|
197
|
+
status: z.ZodEnum<{
|
|
198
|
+
running: "running";
|
|
199
|
+
completed: "completed";
|
|
200
|
+
failed: "failed";
|
|
201
|
+
cancelled: "cancelled";
|
|
202
|
+
queued: "queued";
|
|
203
|
+
uncertain: "uncertain";
|
|
204
|
+
}>;
|
|
205
|
+
text: z.ZodNullable<z.ZodString>;
|
|
206
|
+
textInVault: z.ZodBoolean;
|
|
207
|
+
reply: z.ZodString;
|
|
208
|
+
createdAt: z.ZodString;
|
|
209
|
+
}, z.core.$strip>>;
|
|
210
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
211
|
+
eventCursor: z.ZodNullable<z.ZodString>;
|
|
212
|
+
}, z.core.$strip>;
|
|
213
|
+
export type ChatV3MessageList = z.infer<typeof chatV3MessageListSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { v5HarnessSchema } from '../integrations/agent-events';
|
|
2
|
+
import { v5EventIdSchema, v5HarnessSchema, v5Limits, 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.
|
|
@@ -78,3 +78,46 @@ export const chatV3ThreadListSchema = z.object({
|
|
|
78
78
|
threads: z.array(chatV3ThreadSchema),
|
|
79
79
|
nextCursor: z.string().uuid().nullable(),
|
|
80
80
|
});
|
|
81
|
+
export const CHAT_V3_MESSAGE_PAGE = { default: 30, max: 100 };
|
|
82
|
+
/** A message's text; above the inline limit agent-api keeps it in Vault and the event points at it. */
|
|
83
|
+
export const chatV3SendMessageSchema = z.object({
|
|
84
|
+
text: z.string().min(1).max(v5Limits.messageTextChars),
|
|
85
|
+
}).strict();
|
|
86
|
+
/** Cancels the running turn; the turnId comes from the message that started it. */
|
|
87
|
+
export const chatV3CancelTurnSchema = z.object({ turnId: v5TurnIdSchema }).strict();
|
|
88
|
+
/** The answer of every write: agent-api admitted the user event. `messageId` is its v5 eventId. */
|
|
89
|
+
export const chatV3MessageReceiptSchema = z.object({
|
|
90
|
+
messageId: v5EventIdSchema,
|
|
91
|
+
turnId: v5TurnIdSchema.nullable(),
|
|
92
|
+
status: z.string(),
|
|
93
|
+
});
|
|
94
|
+
export const chatV3MessageStatusSchema = z.enum(['queued', 'running', 'completed', 'failed', 'cancelled', 'uncertain']);
|
|
95
|
+
/**
|
|
96
|
+
* One message of the user and the agent's reply to it, rebuilt from the session's events on
|
|
97
|
+
* every read. `text` is `null` while it is only in Vault (`textInVault`); `reply` is the
|
|
98
|
+
* canonical text the agent stored so far, without the live drafts.
|
|
99
|
+
*/
|
|
100
|
+
export const chatV3MessageSchema = z.object({
|
|
101
|
+
messageId: v5EventIdSchema,
|
|
102
|
+
turnId: v5TurnIdSchema.nullable(),
|
|
103
|
+
mode: z.enum(['queue', 'steer', 'answer']),
|
|
104
|
+
status: chatV3MessageStatusSchema,
|
|
105
|
+
text: z.string().nullable(),
|
|
106
|
+
textInVault: z.boolean(),
|
|
107
|
+
reply: z.string(),
|
|
108
|
+
createdAt: z.string(),
|
|
109
|
+
});
|
|
110
|
+
export const chatV3MessageListQuerySchema = z.object({
|
|
111
|
+
/** Exclusive cursor: the `nextCursor` of the previous page, which reads older messages. */
|
|
112
|
+
before: v5EventIdSchema.optional(),
|
|
113
|
+
limit: z.coerce.number().int().min(1).max(CHAT_V3_MESSAGE_PAGE.max).default(CHAT_V3_MESSAGE_PAGE.default),
|
|
114
|
+
}).strict();
|
|
115
|
+
/**
|
|
116
|
+
* The latest messages, oldest first. `eventCursor` is the last event the page was built from:
|
|
117
|
+
* open the event stream with it as `Last-Event-ID` and nothing falls between the two.
|
|
118
|
+
*/
|
|
119
|
+
export const chatV3MessageListSchema = z.object({
|
|
120
|
+
messages: z.array(chatV3MessageSchema),
|
|
121
|
+
nextCursor: v5EventIdSchema.nullable(),
|
|
122
|
+
eventCursor: v5EventIdSchema.nullable(),
|
|
123
|
+
});
|