@meistrari/chat-nuxt 4.13.0 → 4.14.0-rc.0

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.18",
4
+ "version": "4.14.0-rc.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -161,6 +161,8 @@ export declare const CHAT_V3_THREAD_PAGE: {
161
161
  readonly default: 30;
162
162
  readonly max: 100;
163
163
  };
164
+ /** The longest text a thread list searches its titles for. */
165
+ export declare const CHAT_V3_THREAD_SEARCH_CHARS = 200;
164
166
  /** The effort a thread can choose, as agent-api takes it in a message's settings. */
165
167
  export declare const chatV3ReasoningEffortSchema: z.ZodEnum<{
166
168
  low: "low";
@@ -389,6 +391,7 @@ export declare const chatV3ThreadListQuerySchema: z.ZodObject<{
389
391
  me: "me";
390
392
  }>>;
391
393
  folderId: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>]>>;
394
+ q: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
392
395
  before: z.ZodOptional<z.ZodString>;
393
396
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
394
397
  }, z.core.$strict>;
@@ -91,6 +91,8 @@ export const chatV3ConfigurationSchema = z.object({
91
91
  export const CHAT_V3_TITLE_CHARS = 200;
92
92
  export const CHAT_V3_CREATION_KEY_CHARS = 128;
93
93
  export const CHAT_V3_THREAD_PAGE = { default: 30, max: 100 };
94
+ /** The longest text a thread list searches its titles for. */
95
+ export const CHAT_V3_THREAD_SEARCH_CHARS = 200;
94
96
  /**
95
97
  * The agent's id in agent-api, the only one the chat uses. Lowercased, as agent-api and Postgres
96
98
  * write uuids, so the same agent always compares equal.
@@ -225,6 +227,11 @@ export const chatV3ThreadListQuerySchema = z.object({
225
227
  creator: chatV3ThreadCreatorSchema.optional(),
226
228
  /** Only the threads of this folder, or with `none` only those outside every folder. */
227
229
  folderId: z.union([z.literal(CHAT_V3_NO_FOLDER), folderIdSchema]).optional(),
230
+ /**
231
+ * Only the threads whose title contains this text, ignoring case (not accents): never what
232
+ * their messages say. Trimmed; blank is no search.
233
+ */
234
+ q: z.string().trim().max(CHAT_V3_THREAD_SEARCH_CHARS).optional().transform(value => value || undefined),
228
235
  /** Exclusive, opaque cursor: the `nextCursor` of the previous page. */
229
236
  before: z.string().min(1).max(200).optional(),
230
237
  limit: z.coerce.number().int().min(1).max(CHAT_V3_THREAD_PAGE.max).default(CHAT_V3_THREAD_PAGE.default),
@@ -5,6 +5,7 @@ export type SlackOutcome<T> = {
5
5
  } | {
6
6
  kind: 'rejected';
7
7
  error: string;
8
+ pointer?: string;
8
9
  } | {
9
10
  kind: 'rate_limited';
10
11
  retryAfter: number;
@@ -28,6 +29,7 @@ export interface RotatedConfigToken {
28
29
  exp: number;
29
30
  }
30
31
  export declare const slackAppIdSchema: z.ZodString;
32
+ export declare const slackManifestPointerSchema: z.ZodString;
31
33
  export declare const slackApiResponseSchema: z.ZodObject<{
32
34
  ok: z.ZodBoolean;
33
35
  error: z.ZodOptional<z.ZodString>;
@@ -1,5 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export const slackAppIdSchema = z.string().regex(/^A[A-Z0-9]+$/).max(100);
3
+ // The manifest field of a refusal, as a JSON pointer. Slack's own message is never kept: it is text Slack wrote.
4
+ export const slackManifestPointerSchema = z.string().regex(/^(?:\/[a-z0-9_]+)+$/).max(200);
3
5
  export const slackApiResponseSchema = z.object({ ok: z.boolean(), error: z.string().max(200).optional(), app_id: slackAppIdSchema.optional() }).passthrough();
4
6
  export const slackCreatedAppResponseSchema = z.object({ app_id: slackAppIdSchema, credentials: z.object({ client_id: z.string().regex(/^\d+\.\d+$/).max(100), client_secret: z.string().min(1).max(2000), signing_secret: z.string().min(1).max(2000) }) });
5
7
  export const slackExportedManifestResponseSchema = z.object({ manifest: z.record(z.string(), z.unknown()) });
@@ -115,6 +115,10 @@ export declare const botSchema: z.ZodObject<{
115
115
  deleted: "deleted";
116
116
  }>;
117
117
  error: z.ZodNullable<z.ZodString>;
118
+ rejection: z.ZodNullable<z.ZodObject<{
119
+ code: z.ZodString;
120
+ pointer: z.ZodNullable<z.ZodString>;
121
+ }, z.core.$strip>>;
118
122
  updating: z.ZodBoolean;
119
123
  photoUrl: z.ZodNullable<z.ZodString>;
120
124
  pendingPhotoUrl: z.ZodNullable<z.ZodString>;
@@ -16,8 +16,9 @@ export const registrationSchema = z.discriminatedUnion('role', [
16
16
  z.strictObject({ ...common, role: z.literal('manager') }),
17
17
  z.strictObject({ ...common, role: z.literal('dedicated'), workspaceId: z.uuid(), agentId: z.uuid() }),
18
18
  ]);
19
- // Slack limits app names to 35 characters. Plain words only: no mention, link or mrkdwn syntax.
20
- export const appNameSchema = z.string().max(200).transform(value => value.normalize('NFC').trim().replace(/ {2,}/g, ' ')).pipe(z.string().min(1).max(35).regex(/^[\p{L}\p{N}][\p{L}\p{N} .'()·-]*$/u));
19
+ // Slack limits app names to 35 characters. Plain unaccented words only: the name is also the bot user's display name, where Slack
20
+ // refuses a manifest with accented letters, and it never carries mention, link or mrkdwn syntax.
21
+ export const appNameSchema = z.string().max(200).transform(value => value.trim().replace(/ {2,}/g, ' ')).pipe(z.string().min(1).max(35).regex(/^[A-Z0-9][A-Z0-9 .-]*$/i));
21
22
  export const botStatuses = ['creating', 'configuring', 'awaiting_distribution', 'awaiting_installation', 'active', 'uninstalled', 'failed', 'unknown', 'deactivated', 'deleting', 'delete_failed', 'deleted'];
22
23
  export const botStatusSchema = z.enum(botStatuses);
23
24
  export const botTargetSchema = z.object({ actorId: actorIdSchema, workspaceId: z.uuid(), agentId: z.uuid() });
@@ -43,6 +44,10 @@ export const botSchema = z.object({
43
44
  teamName: z.string().nullable().describe('Workspace name learned from Sign in with Slack.'),
44
45
  status: botStatusSchema,
45
46
  error: z.string().nullable().describe('Why provisioning failed or is unknown, why a configuring bot\'s chosen photo is still being retried (`photo_unavailable`, `photo_unknown`), or why a deletion waits or failed.'),
47
+ rejection: z.object({
48
+ code: z.string().describe('Slack\'s own error code, such as `invalid_manifest`.'),
49
+ pointer: z.string().nullable().describe('The manifest field Slack pointed at, as a JSON pointer such as `/features/bot_user/display_name`.'),
50
+ }).nullable().describe('Why Slack refused to create (`create_rejected`) or configure (`configure_rejected`) the app of a failed bot.'),
46
51
  updating: z.boolean().describe('A rename or a changed photo is being applied to the Slack app.'),
47
52
  photoUrl: z.string().nullable().describe('The app icon Slack accepted last, as Tela published it; null while the bot keeps Slack\'s default icon.'),
48
53
  pendingPhotoUrl: z.string().nullable().describe('A photo an administrator chose, not the app icon yet.'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
- "version": "4.13.0",
3
+ "version": "4.14.0-rc.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {