@meistrari/chat-nuxt 4.14.0-rc.9 → 4.15.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.14.0-rc.9",
4
+ "version": "4.15.0-rc.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -6,8 +6,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
6
6
  } & {
7
7
  create: (canvasTools: CanvasTool[]) => any;
8
8
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
9
- "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
10
9
  onCreate?: ((canvasTools: CanvasTool[]) => any) | undefined;
10
+ "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
11
11
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
12
  declare const _default: typeof __VLS_export;
13
13
  export default _default;
@@ -6,8 +6,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
6
6
  } & {
7
7
  create: (canvasTools: CanvasTool[]) => any;
8
8
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
9
- "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
10
9
  onCreate?: ((canvasTools: CanvasTool[]) => any) | undefined;
10
+ "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
11
11
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
12
  declare const _default: typeof __VLS_export;
13
13
  export default _default;
@@ -15,23 +15,23 @@ type __VLS_Props = {
15
15
  };
16
16
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
17
17
  delete: () => any;
18
+ openDrawer: () => any;
19
+ copyLink: () => any;
20
+ openOutdatedSettings: () => any;
18
21
  rename: () => any;
19
22
  duplicate: () => any;
20
23
  export: () => any;
21
- copyLink: () => any;
22
24
  debug: () => any;
23
- openDrawer: () => any;
24
- openOutdatedSettings: () => any;
25
25
  tabChange: (tab: TopbarTab) => any;
26
26
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
27
27
  onDelete?: (() => any) | undefined;
28
+ onOpenDrawer?: (() => any) | undefined;
29
+ onCopyLink?: (() => any) | undefined;
30
+ onOpenOutdatedSettings?: (() => any) | undefined;
28
31
  onRename?: (() => any) | undefined;
29
32
  onDuplicate?: (() => any) | undefined;
30
33
  onExport?: (() => any) | undefined;
31
- onCopyLink?: (() => any) | undefined;
32
34
  onDebug?: (() => any) | undefined;
33
- onOpenDrawer?: (() => any) | undefined;
34
- onOpenOutdatedSettings?: (() => any) | undefined;
35
35
  onTabChange?: ((tab: TopbarTab) => any) | undefined;
36
36
  }>, {
37
37
  showDrawerButton: boolean;
@@ -15,23 +15,23 @@ type __VLS_Props = {
15
15
  };
16
16
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
17
17
  delete: () => any;
18
+ openDrawer: () => any;
19
+ copyLink: () => any;
20
+ openOutdatedSettings: () => any;
18
21
  rename: () => any;
19
22
  duplicate: () => any;
20
23
  export: () => any;
21
- copyLink: () => any;
22
24
  debug: () => any;
23
- openDrawer: () => any;
24
- openOutdatedSettings: () => any;
25
25
  tabChange: (tab: TopbarTab) => any;
26
26
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
27
27
  onDelete?: (() => any) | undefined;
28
+ onOpenDrawer?: (() => any) | undefined;
29
+ onCopyLink?: (() => any) | undefined;
30
+ onOpenOutdatedSettings?: (() => any) | undefined;
28
31
  onRename?: (() => any) | undefined;
29
32
  onDuplicate?: (() => any) | undefined;
30
33
  onExport?: (() => any) | undefined;
31
- onCopyLink?: (() => any) | undefined;
32
34
  onDebug?: (() => any) | undefined;
33
- onOpenDrawer?: (() => any) | undefined;
34
- onOpenOutdatedSettings?: (() => any) | undefined;
35
35
  onTabChange?: ((tab: TopbarTab) => any) | undefined;
36
36
  }>, {
37
37
  showDrawerButton: boolean;
@@ -68,46 +68,46 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
68
68
  } & {
69
69
  delete: () => any;
70
70
  cancel: () => any;
71
+ settings: () => any;
72
+ send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
73
+ newConversation: (groupId?: string | null | undefined) => any;
74
+ selectExecutionProfile: (profile: ChatExecutionProfile) => any;
75
+ copyLink: () => any;
71
76
  rename: () => any;
72
77
  duplicate: () => any;
73
78
  export: () => any;
74
- copyLink: () => any;
75
79
  debug: () => any;
76
- selectConversation: (id: string) => any;
77
- send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
78
- settings: () => any;
79
- newConversation: (groupId?: string | null | undefined) => any;
80
- selectExecutionProfile: (profile: ChatExecutionProfile) => any;
81
80
  tabChange: (tab: TopbarTab) => any;
82
81
  switchWorkspace: () => any;
83
82
  signout: () => any;
84
83
  cancelEditing: () => any;
85
84
  dismissOutdatedBanner: () => any;
86
85
  saveTitle: () => any;
86
+ selectConversation: (id: string) => any;
87
87
  "update:drawerOpen": (value: boolean) => any;
88
88
  "update:editTitle": (value: string) => any;
89
89
  "update:workspaceSheetOpen": (value: boolean) => any;
90
90
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
91
91
  onDelete?: (() => any) | undefined;
92
92
  onCancel?: (() => any) | undefined;
93
- onRename?: (() => any) | undefined;
94
- onDuplicate?: (() => any) | undefined;
95
- onExport?: (() => any) | undefined;
96
- onCopyLink?: (() => any) | undefined;
97
- onDebug?: (() => any) | undefined;
98
- onSelectConversation?: ((id: string) => any) | undefined;
99
- onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
100
93
  onSettings?: (() => any) | undefined;
94
+ onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
101
95
  onNewConversation?: ((groupId?: string | null | undefined) => any) | undefined;
102
96
  onSelectExecutionProfile?: ((profile: ChatExecutionProfile) => any) | undefined;
103
97
  "onUpdate:selectedModel"?: ((value: string | null) => any) | undefined;
104
98
  "onUpdate:selectedReasoningEffort"?: ((value: any) => any) | undefined;
99
+ onCopyLink?: (() => any) | undefined;
100
+ onRename?: (() => any) | undefined;
101
+ onDuplicate?: (() => any) | undefined;
102
+ onExport?: (() => any) | undefined;
103
+ onDebug?: (() => any) | undefined;
105
104
  onTabChange?: ((tab: TopbarTab) => any) | undefined;
106
105
  onSwitchWorkspace?: (() => any) | undefined;
107
106
  onSignout?: (() => any) | undefined;
108
107
  onCancelEditing?: (() => any) | undefined;
109
108
  onDismissOutdatedBanner?: (() => any) | undefined;
110
109
  onSaveTitle?: (() => any) | undefined;
110
+ onSelectConversation?: ((id: string) => any) | undefined;
111
111
  "onUpdate:drawerOpen"?: ((value: boolean) => any) | undefined;
112
112
  "onUpdate:editTitle"?: ((value: string) => any) | undefined;
113
113
  "onUpdate:workspaceSheetOpen"?: ((value: boolean) => any) | undefined;
@@ -68,46 +68,46 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
68
68
  } & {
69
69
  delete: () => any;
70
70
  cancel: () => any;
71
+ settings: () => any;
72
+ send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
73
+ newConversation: (groupId?: string | null | undefined) => any;
74
+ selectExecutionProfile: (profile: ChatExecutionProfile) => any;
75
+ copyLink: () => any;
71
76
  rename: () => any;
72
77
  duplicate: () => any;
73
78
  export: () => any;
74
- copyLink: () => any;
75
79
  debug: () => any;
76
- selectConversation: (id: string) => any;
77
- send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
78
- settings: () => any;
79
- newConversation: (groupId?: string | null | undefined) => any;
80
- selectExecutionProfile: (profile: ChatExecutionProfile) => any;
81
80
  tabChange: (tab: TopbarTab) => any;
82
81
  switchWorkspace: () => any;
83
82
  signout: () => any;
84
83
  cancelEditing: () => any;
85
84
  dismissOutdatedBanner: () => any;
86
85
  saveTitle: () => any;
86
+ selectConversation: (id: string) => any;
87
87
  "update:drawerOpen": (value: boolean) => any;
88
88
  "update:editTitle": (value: string) => any;
89
89
  "update:workspaceSheetOpen": (value: boolean) => any;
90
90
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
91
91
  onDelete?: (() => any) | undefined;
92
92
  onCancel?: (() => any) | undefined;
93
- onRename?: (() => any) | undefined;
94
- onDuplicate?: (() => any) | undefined;
95
- onExport?: (() => any) | undefined;
96
- onCopyLink?: (() => any) | undefined;
97
- onDebug?: (() => any) | undefined;
98
- onSelectConversation?: ((id: string) => any) | undefined;
99
- onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
100
93
  onSettings?: (() => any) | undefined;
94
+ onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
101
95
  onNewConversation?: ((groupId?: string | null | undefined) => any) | undefined;
102
96
  onSelectExecutionProfile?: ((profile: ChatExecutionProfile) => any) | undefined;
103
97
  "onUpdate:selectedModel"?: ((value: string | null) => any) | undefined;
104
98
  "onUpdate:selectedReasoningEffort"?: ((value: any) => any) | undefined;
99
+ onCopyLink?: (() => any) | undefined;
100
+ onRename?: (() => any) | undefined;
101
+ onDuplicate?: (() => any) | undefined;
102
+ onExport?: (() => any) | undefined;
103
+ onDebug?: (() => any) | undefined;
105
104
  onTabChange?: ((tab: TopbarTab) => any) | undefined;
106
105
  onSwitchWorkspace?: (() => any) | undefined;
107
106
  onSignout?: (() => any) | undefined;
108
107
  onCancelEditing?: (() => any) | undefined;
109
108
  onDismissOutdatedBanner?: (() => any) | undefined;
110
109
  onSaveTitle?: (() => any) | undefined;
110
+ onSelectConversation?: ((id: string) => any) | undefined;
111
111
  "onUpdate:drawerOpen"?: ((value: boolean) => any) | undefined;
112
112
  "onUpdate:editTitle"?: ((value: string) => any) | undefined;
113
113
  "onUpdate:workspaceSheetOpen"?: ((value: boolean) => any) | undefined;
@@ -9,9 +9,9 @@ type __VLS_Slots = {} & {
9
9
  default?: (props: typeof __VLS_1) => any;
10
10
  };
11
11
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
- flush: boolean;
13
12
  tone: "mono" | "prose" | "error";
14
13
  limit: "input" | "output" | "none";
14
+ flush: boolean;
15
15
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
16
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
17
  declare const _default: typeof __VLS_export;
@@ -9,9 +9,9 @@ type __VLS_Slots = {} & {
9
9
  default?: (props: typeof __VLS_1) => any;
10
10
  };
11
11
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
- flush: boolean;
13
12
  tone: "mono" | "prose" | "error";
14
13
  limit: "input" | "output" | "none";
14
+ flush: boolean;
15
15
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
16
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
17
  declare const _default: typeof __VLS_export;
@@ -10,7 +10,7 @@ export const credentialsSchema = z.strictObject({
10
10
  export const botCapabilities = ['thread_context', 'files', 'direct_messages', 'message_triggers', 'reaction_triggers', 'post_to_public_channels', 'member_email'];
11
11
  export const botCapabilitySchema = z.enum(botCapabilities);
12
12
  export const legacyBotCapabilities = ['thread_context', 'files'];
13
- export const botCapabilitiesSchema = z.array(botCapabilitySchema).max(botCapabilities.length).describe('`thread_context` (reads the thread of a mention), `files` (reads attachments), `direct_messages` (answers DMs as private conversations, with native streaming and the thread context of a DM thread: `im:history`, `im:read`), `message_triggers` and `reaction_triggers` (reserved: subscribe to channel messages and reactions for configurable triggers), `post_to_public_channels` (`chat:write.public`), `member_email` (`users:read.email`).');
13
+ export const botCapabilitiesSchema = z.array(botCapabilitySchema).max(botCapabilities.length).describe('`thread_context` (reads the thread of a mention), `files` (reads attachments), `direct_messages` (answers DMs as private conversations, with native streaming and the thread context of a DM thread: `im:history`, `im:read`), `message_triggers` and `reaction_triggers` (allow configurable triggers of that type: the bot reads public channel messages or reactions), `post_to_public_channels` (`chat:write.public`), `member_email` (`users:read.email`).');
14
14
  const common = {
15
15
  appId: z.string().regex(/^A[A-Z0-9]+$/),
16
16
  teamId: z.string().regex(/^T[A-Z0-9]+$/),
@@ -0,0 +1,64 @@
1
+ import { z } from 'zod';
2
+ export declare const botTriggerTypes: readonly ["message", "reaction"];
3
+ export declare const botTriggerTypeSchema: z.ZodEnum<{
4
+ message: "message";
5
+ reaction: "reaction";
6
+ }>;
7
+ export declare const botTriggerConnectionModes: readonly ["ignore", "prompt"];
8
+ export declare const botTriggerLimits: {
9
+ readonly triggers: 20;
10
+ readonly pattern: 500;
11
+ readonly instruction: 2000;
12
+ };
13
+ export declare const botTriggerInputSchema: z.ZodObject<{
14
+ id: z.ZodOptional<z.ZodUUID>;
15
+ type: z.ZodEnum<{
16
+ message: "message";
17
+ reaction: "reaction";
18
+ }>;
19
+ pattern: z.ZodString;
20
+ channelNamePattern: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
21
+ instruction: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
22
+ ifNotConnected: z.ZodDefault<z.ZodEnum<{
23
+ prompt: "prompt";
24
+ ignore: "ignore";
25
+ }>>;
26
+ }, z.core.$strip>;
27
+ export declare const botTriggerSchema: z.ZodObject<{
28
+ id: z.ZodUUID;
29
+ type: z.ZodEnum<{
30
+ message: "message";
31
+ reaction: "reaction";
32
+ }>;
33
+ pattern: z.ZodString;
34
+ channelNamePattern: z.ZodNullable<z.ZodString>;
35
+ instruction: z.ZodNullable<z.ZodString>;
36
+ ifNotConnected: z.ZodEnum<{
37
+ prompt: "prompt";
38
+ ignore: "ignore";
39
+ }>;
40
+ }, z.core.$strip>;
41
+ export declare const botTriggersChangeSchema: z.ZodObject<{
42
+ actorId: z.ZodString;
43
+ workspaceId: z.ZodUUID;
44
+ agentId: z.ZodUUID;
45
+ triggers: z.ZodArray<z.ZodObject<{
46
+ id: z.ZodOptional<z.ZodUUID>;
47
+ type: z.ZodEnum<{
48
+ message: "message";
49
+ reaction: "reaction";
50
+ }>;
51
+ pattern: z.ZodString;
52
+ channelNamePattern: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
53
+ instruction: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
54
+ ifNotConnected: z.ZodDefault<z.ZodEnum<{
55
+ prompt: "prompt";
56
+ ignore: "ignore";
57
+ }>>;
58
+ }, z.core.$strip>>;
59
+ }, z.core.$strip>;
60
+ export type BotTriggerInput = z.infer<typeof botTriggerInputSchema>;
61
+ export type BotTrigger = z.infer<typeof botTriggerSchema>;
62
+ export type BotTriggersChange = z.infer<typeof botTriggersChangeSchema> & {
63
+ botId: string;
64
+ };
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ import { botTargetSchema } from './apps';
3
+ // A trigger makes a dedicated bot run a turn without being mentioned: a channel message whose text matches its pattern, or a reaction
4
+ // whose name does. Patterns are RE2 regular expressions, matched anywhere in the text unless anchored; the service refuses one RE2 cannot
5
+ // compile (no backreferences or lookarounds).
6
+ export const botTriggerTypes = ['message', 'reaction'];
7
+ export const botTriggerTypeSchema = z.enum(botTriggerTypes);
8
+ export const botTriggerConnectionModes = ['ignore', 'prompt'];
9
+ export const botTriggerLimits = { triggers: 20, pattern: 500, instruction: 2000 };
10
+ const optionalText = (max) => z.string().max(max).nullish().transform(value => value?.trim() || null);
11
+ export const botTriggerInputSchema = z.object({
12
+ id: z.uuid().optional().describe('An existing trigger of this bot to keep its id; omitted for a new trigger.'),
13
+ type: botTriggerTypeSchema.describe('`message`: the pattern matches the text of a public channel message (Slack writes member mentions as `<@U…>`). `reaction`: the pattern matches a reaction name, without colons.'),
14
+ pattern: z.string().min(1).max(botTriggerLimits.pattern),
15
+ channelNamePattern: optionalText(botTriggerLimits.pattern).describe('Restricts the trigger to public channels whose name, without `#`, matches this RE2 pattern. Null or empty: every channel the bot is in.'),
16
+ instruction: optionalText(botTriggerLimits.instruction).describe('Sent to the agent as `gatilho.instrucao` of the request context. Null or empty: none.'),
17
+ ifNotConnected: z.enum(botTriggerConnectionModes).default('ignore').describe('A member without a connected Tela account: `ignore` drops the event without any message; `prompt` posts the usual connection card.'),
18
+ });
19
+ export const botTriggerSchema = z.object({
20
+ id: z.uuid(),
21
+ type: botTriggerTypeSchema,
22
+ pattern: z.string(),
23
+ channelNamePattern: z.string().nullable(),
24
+ instruction: z.string().nullable(),
25
+ ifNotConnected: z.enum(botTriggerConnectionModes),
26
+ });
27
+ // The whole ordered list replaces the bot's triggers; the first trigger that matches an event is the one that runs.
28
+ export const botTriggersChangeSchema = botTargetSchema.extend({
29
+ triggers: z.array(botTriggerInputSchema).max(botTriggerLimits.triggers).refine((triggers) => {
30
+ const ids = triggers.flatMap(trigger => trigger.id ? [trigger.id] : []);
31
+ return new Set(ids).size === ids.length;
32
+ }, 'Trigger ids must be unique'),
33
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
- "version": "4.14.0-rc.9",
3
+ "version": "4.15.0-rc.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {