@meistrari/chat-nuxt 4.13.0-rc.1 → 4.13.0-rc.3

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.1",
4
+ "version": "4.13.0-rc.3",
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
- settings: () => any;
76
75
  send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
76
+ settings: () => 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
- onSettings?: (() => any) | undefined;
98
97
  onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
98
+ onSettings?: (() => 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
- settings: () => any;
76
75
  send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
76
+ settings: () => 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
- onSettings?: (() => any) | undefined;
98
97
  onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
98
+ onSettings?: (() => 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;
@@ -66,6 +66,7 @@ export declare const chatV3ThreadSchema: z.ZodObject<{
66
66
  agentId: z.ZodString;
67
67
  sessionId: z.ZodString;
68
68
  title: z.ZodString;
69
+ folderId: z.ZodNullable<z.ZodString>;
69
70
  createdAt: z.ZodString;
70
71
  updatedAt: z.ZodString;
71
72
  }, z.core.$strip>;
@@ -82,6 +83,7 @@ export declare const chatV3ThreadDetailSchema: z.ZodObject<{
82
83
  agentId: z.ZodString;
83
84
  sessionId: z.ZodString;
84
85
  title: z.ZodString;
86
+ folderId: z.ZodNullable<z.ZodString>;
85
87
  createdAt: z.ZodString;
86
88
  updatedAt: z.ZodString;
87
89
  session: z.ZodNullable<z.ZodObject<{
@@ -96,14 +98,20 @@ export type ChatV3ThreadDetail = z.infer<typeof chatV3ThreadDetailSchema>;
96
98
  export declare const chatV3CreateThreadSchema: z.ZodObject<{
97
99
  agentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
98
100
  title: z.ZodOptional<z.ZodString>;
101
+ folderId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
99
102
  }, z.core.$strict>;
100
103
  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. */
101
105
  export declare const chatV3UpdateThreadSchema: z.ZodObject<{
102
- title: z.ZodString;
106
+ title: z.ZodOptional<z.ZodString>;
107
+ folderId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
103
108
  }, z.core.$strict>;
104
109
  export type ChatV3UpdateThread = z.infer<typeof chatV3UpdateThreadSchema>;
110
+ /** `folderId=none` lists the threads outside every folder. */
111
+ export declare const CHAT_V3_NO_FOLDER = "none";
105
112
  export declare const chatV3ThreadListQuerySchema: z.ZodObject<{
106
113
  agentId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
114
+ folderId: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>]>>;
107
115
  before: z.ZodOptional<z.ZodString>;
108
116
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
109
117
  }, z.core.$strict>;
@@ -114,12 +122,52 @@ export declare const chatV3ThreadListSchema: z.ZodObject<{
114
122
  agentId: z.ZodString;
115
123
  sessionId: z.ZodString;
116
124
  title: z.ZodString;
125
+ folderId: z.ZodNullable<z.ZodString>;
117
126
  createdAt: z.ZodString;
118
127
  updatedAt: z.ZodString;
119
128
  }, z.core.$strip>>;
120
129
  nextCursor: z.ZodNullable<z.ZodString>;
121
130
  }, z.core.$strip>;
122
131
  export type ChatV3ThreadList = z.infer<typeof chatV3ThreadListSchema>;
132
+ export declare const CHAT_V3_FOLDER_NAME_CHARS = 80;
133
+ /**
134
+ * A folder threads are kept in. Like the v1 groups it belongs to the workspace, the agent and the
135
+ * host's scope (`x-chat-conversation-scope`), not to a person, and it only organizes: a folder
136
+ * grants no access to the threads in it.
137
+ */
138
+ export declare const chatV3FolderSchema: z.ZodObject<{
139
+ folderId: z.ZodString;
140
+ agentId: z.ZodString;
141
+ name: z.ZodString;
142
+ createdAt: z.ZodString;
143
+ updatedAt: z.ZodString;
144
+ }, z.core.$strip>;
145
+ export type ChatV3Folder = z.infer<typeof chatV3FolderSchema>;
146
+ export declare const chatV3FolderListQuerySchema: z.ZodObject<{
147
+ agentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
148
+ }, z.core.$strict>;
149
+ export type ChatV3FolderListQuery = z.infer<typeof chatV3FolderListQuerySchema>;
150
+ /** Every folder of the agent in the caller's scope, oldest first. */
151
+ export declare const chatV3FolderListSchema: z.ZodObject<{
152
+ folders: z.ZodArray<z.ZodObject<{
153
+ folderId: z.ZodString;
154
+ agentId: z.ZodString;
155
+ name: z.ZodString;
156
+ createdAt: z.ZodString;
157
+ updatedAt: z.ZodString;
158
+ }, z.core.$strip>>;
159
+ }, z.core.$strip>;
160
+ export type ChatV3FolderList = z.infer<typeof chatV3FolderListSchema>;
161
+ /** Send an `Idempotency-Key` header to retry safely. */
162
+ export declare const chatV3CreateFolderSchema: z.ZodObject<{
163
+ agentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
164
+ name: z.ZodString;
165
+ }, z.core.$strict>;
166
+ export type ChatV3CreateFolder = z.infer<typeof chatV3CreateFolderSchema>;
167
+ export declare const chatV3UpdateFolderSchema: z.ZodObject<{
168
+ name: z.ZodString;
169
+ }, z.core.$strict>;
170
+ export type ChatV3UpdateFolder = z.infer<typeof chatV3UpdateFolderSchema>;
123
171
  export declare const CHAT_V3_MESSAGE_PAGE: {
124
172
  readonly default: 30;
125
173
  readonly max: 100;
@@ -43,12 +43,16 @@ export const CHAT_V3_THREAD_PAGE = { default: 30, max: 100 };
43
43
  * write uuids, so the same agent always compares equal.
44
44
  */
45
45
  const agentIdSchema = z.string().uuid().transform(id => id.toLowerCase());
46
+ /** A folder's id, lowercased like the agent's so the same folder always compares equal. */
47
+ const folderIdSchema = z.string().uuid().transform(id => id.toLowerCase());
46
48
  /** A thread as the chat owns it: access and title here, history in the agent-api session. */
47
49
  export const chatV3ThreadSchema = z.object({
48
50
  threadId: z.string().uuid(),
49
51
  agentId: z.string().uuid(),
50
52
  sessionId: z.string().uuid(),
51
53
  title: z.string(),
54
+ /** The folder it is kept in; `null` outside any folder. */
55
+ folderId: z.string().uuid().nullable(),
52
56
  createdAt: z.string(),
53
57
  updatedAt: z.string(),
54
58
  });
@@ -64,12 +68,20 @@ export const chatV3ThreadDetailSchema = chatV3ThreadSchema.extend({ session: cha
64
68
  export const chatV3CreateThreadSchema = z.object({
65
69
  agentId: agentIdSchema,
66
70
  title: z.string().trim().max(CHAT_V3_TITLE_CHARS).optional(),
71
+ /** Starts the thread inside this folder, which must be the agent's in the caller's scope. */
72
+ folderId: folderIdSchema.optional(),
67
73
  }).strict();
74
+ /** Renames the thread, moves it into a folder (`folderId`) or out of one (`folderId: null`), or both. */
68
75
  export const chatV3UpdateThreadSchema = z.object({
69
- title: z.string().trim().max(CHAT_V3_TITLE_CHARS),
70
- }).strict();
76
+ title: z.string().trim().max(CHAT_V3_TITLE_CHARS).optional(),
77
+ folderId: folderIdSchema.nullable().optional(),
78
+ }).strict().refine(body => body.title !== undefined || body.folderId !== undefined, { message: 'Send a title, a folderId or both' });
79
+ /** `folderId=none` lists the threads outside every folder. */
80
+ export const CHAT_V3_NO_FOLDER = 'none';
71
81
  export const chatV3ThreadListQuerySchema = z.object({
72
82
  agentId: agentIdSchema.optional(),
83
+ /** Only the threads of this folder, or with `none` only those outside every folder. */
84
+ folderId: z.union([z.literal(CHAT_V3_NO_FOLDER), folderIdSchema]).optional(),
73
85
  /** Exclusive cursor: the last `threadId` of the previous page. */
74
86
  before: z.string().uuid().optional(),
75
87
  limit: z.coerce.number().int().min(1).max(CHAT_V3_THREAD_PAGE.max).default(CHAT_V3_THREAD_PAGE.default),
@@ -78,6 +90,35 @@ export const chatV3ThreadListSchema = z.object({
78
90
  threads: z.array(chatV3ThreadSchema),
79
91
  nextCursor: z.string().uuid().nullable(),
80
92
  });
93
+ export const CHAT_V3_FOLDER_NAME_CHARS = 80;
94
+ const folderNameSchema = z.string().trim().min(1).max(CHAT_V3_FOLDER_NAME_CHARS);
95
+ /**
96
+ * A folder threads are kept in. Like the v1 groups it belongs to the workspace, the agent and the
97
+ * host's scope (`x-chat-conversation-scope`), not to a person, and it only organizes: a folder
98
+ * grants no access to the threads in it.
99
+ */
100
+ export const chatV3FolderSchema = z.object({
101
+ folderId: z.string().uuid(),
102
+ agentId: z.string().uuid(),
103
+ name: z.string(),
104
+ createdAt: z.string(),
105
+ updatedAt: z.string(),
106
+ });
107
+ export const chatV3FolderListQuerySchema = z.object({
108
+ agentId: agentIdSchema,
109
+ }).strict();
110
+ /** Every folder of the agent in the caller's scope, oldest first. */
111
+ export const chatV3FolderListSchema = z.object({
112
+ folders: z.array(chatV3FolderSchema),
113
+ });
114
+ /** Send an `Idempotency-Key` header to retry safely. */
115
+ export const chatV3CreateFolderSchema = z.object({
116
+ agentId: agentIdSchema,
117
+ name: folderNameSchema,
118
+ }).strict();
119
+ export const chatV3UpdateFolderSchema = z.object({
120
+ name: folderNameSchema,
121
+ }).strict();
81
122
  export const CHAT_V3_MESSAGE_PAGE = { default: 30, max: 100 };
82
123
  /** How many files one message carries; with the message they stay within agent-api's batch. */
83
124
  export const CHAT_V3_FILES_PER_MESSAGE = 10;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
- "version": "4.13.0-rc.1",
3
+ "version": "4.13.0-rc.3",
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.7.0-rc.0",
55
+ "@meistrari/chat-ui-lang": "0.7.0",
56
56
  "@meistrari/logger": "^2.1.3",
57
57
  "@meistrari/tela-build": "^1.79.0",
58
58
  "@openuidev/lang-core": "1.0.0",