@meistrari/chat-nuxt 1.6.0 → 1.7.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/README.md CHANGED
@@ -161,11 +161,18 @@ The chat workspace is resolved from the authenticated `activeOrganization` provi
161
161
  <MeistrariChatEmbed tela-agent-id="agent_123" />
162
162
  ```
163
163
 
164
+ `conversationScope` works in both runtimes. In default chat mode, it isolates conversations inside the authenticated workspace without requiring a Tela agent:
165
+
166
+ ```vue
167
+ <MeistrariChatEmbed :conversation-scope="`user:${userId}`" />
168
+ ```
169
+
164
170
  Host apps can also provide Tela agent inputs directly. When `telaAgentInputs` is non-null, the chat sends those inputs with each agent run and does not render the agent variables panel.
165
171
 
166
172
  ```vue
167
173
  <MeistrariChatEmbed
168
174
  tela-agent-id="agent_123"
175
+ :conversation-scope="`customer:${customerId}`"
169
176
  :tela-agent-inputs="[
170
177
  { type: 'text', name: 'customer_id', content: customerId },
171
178
  ]"
@@ -203,6 +210,7 @@ Key props for embedding:
203
210
  - **`:hide-sidebar="true"`** — removes the conversation list, keeps just the chat
204
211
  - **`v-model:conversation-id`** — sync the active conversation with your app's state
205
212
  - **`:initial-conversation-id`** — open a specific conversation on mount
213
+ - **`conversation-scope`** — isolate conversation history inside the same workspace or Tela agent
206
214
 
207
215
  ## `<MeistrariChatEmbed>` Props
208
216
 
@@ -211,6 +219,7 @@ Key props for embedding:
211
219
  | `hideSidebar` | `boolean` | `false` | Hide conversation list sidebar |
212
220
  | `conversationId` | `string \| null` | `null` | Controlled conversation (supports v-model) |
213
221
  | `initialConversationId` | `string \| null` | `null` | Open this conversation on mount |
222
+ | `conversationScope` | `string \| null` | `null` | Isolate conversation history by technical scope within the current workspace and runtime |
214
223
  | `telaAgentId` | `string` | — | Use Tela agent mode for this embed |
215
224
  | `telaAgentInputs` | `TelaAgentExecutionInput[] \| null` | `undefined` | Inputs sent with each Tela agent run; hides the variables panel when non-null |
216
225
  | `workspaceSettings` | `WorkspaceSettings \| null` | `null` | Override settings from host app |
@@ -221,6 +230,22 @@ Key props for embedding:
221
230
 
222
231
  `loadingMessagesMode` only applies when `loadingMessages` has at least one non-empty message.
223
232
 
233
+ Use `conversationScope` when you need multiple chat surfaces to share the same authenticated workspace but keep separate histories. This is useful for per-user inboxes, record detail pages, customer workspaces, template previews, workflow steps, or any app route where the same chat should only show conversations for that route's domain object. The scope is applied together with the workspace and, when present, the `telaAgentId`.
234
+
235
+ Scoped embeds only see conversations created with the same scope. Unscoped embeds only see unscoped conversations, so adding a scope will not mix with existing workspace-level history. Scope values are technical identifiers: they are trimmed, blank strings become `null`, and server requests accept 1-200 characters from `A-Z`, `a-z`, `0-9`, `.`, `_`, `:`, `/`, and `-`.
236
+
237
+ ```vue
238
+ <!-- Default chat mode: workspace + scope -->
239
+ <MeistrariChatEmbed :conversation-scope="`user:${userId}`" />
240
+ <MeistrariChatEmbed :conversation-scope="`customer:${customerId}`" />
241
+
242
+ <!-- Tela agent mode: workspace + telaAgentId + scope -->
243
+ <MeistrariChatEmbed
244
+ tela-agent-id="agent_123"
245
+ :conversation-scope="`template:${templateId}`"
246
+ />
247
+ ```
248
+
224
249
  **Events:**
225
250
 
226
251
  | Event | Payload | Description |
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
3
  "configKey": "chatNuxt",
4
- "version": "1.6.0",
4
+ "version": "1.7.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync, mkdirSync, symlinkSync } from 'node:fs';
2
2
  import { createRequire } from 'node:module';
3
3
  import { join, dirname } from 'node:path';
4
- import { defineNuxtModule, createResolver, addTemplate, addPlugin, addImportsDir, addComponent, addComponentsDir } from 'nuxt/kit';
4
+ import { defineNuxtModule, createResolver, addTemplate, addTypeTemplate, addPlugin, addImportsDir, addComponent, addComponentsDir } from 'nuxt/kit';
5
5
 
6
6
  const agentEnvironmentResolverCandidates = [
7
7
  "server/chat/resolve-agent-environment.ts",
@@ -179,6 +179,7 @@ const DEFAULT_FEATURES = {
179
179
  generateTitle: false,
180
180
  credentials: false
181
181
  };
182
+ const VUE_COMPONENT_EXTENSIONS = [".vue"];
182
183
  function resolveChatAuthMode(runtimeConfig) {
183
184
  const publicConfig = runtimeConfig.public;
184
185
  const telaAuth = publicConfig?.telaAuth;
@@ -342,6 +343,22 @@ const module$1 = defineNuxtModule({
342
343
  filename: "chat-nuxt/auth.mjs",
343
344
  getContents: () => buildChatAuthTemplate(chatAuthMode)
344
345
  });
346
+ const chatAuthTypeTemplate = addTypeTemplate({
347
+ filename: "chat-nuxt/chat-auth.d.ts",
348
+ src: join(runtimeDir, "types/chat-auth.d.ts")
349
+ });
350
+ addTypeTemplate({
351
+ filename: "chat-nuxt/chat-agent-environment-resolver.d.ts",
352
+ src: join(runtimeDir, "types/chat-agent-environment-resolver.d.ts")
353
+ }, {
354
+ nitro: true,
355
+ nuxt: true
356
+ });
357
+ nuxt.hook("prepare:types", ({ tsConfig }) => {
358
+ tsConfig.compilerOptions ||= {};
359
+ tsConfig.compilerOptions.paths ||= {};
360
+ tsConfig.compilerOptions.paths["#chat-auth"] = [chatAuthTypeTemplate.dst];
361
+ });
345
362
  if (!Array.isArray(nuxt.options.extends)) {
346
363
  nuxt.options.extends = nuxt.options.extends ? [nuxt.options.extends] : [];
347
364
  }
@@ -401,10 +418,12 @@ const module$1 = defineNuxtModule({
401
418
  priority: 1e3
402
419
  });
403
420
  addComponentsDir({
404
- path: join(runtimeDir, "components")
421
+ path: join(runtimeDir, "components"),
422
+ extensions: VUE_COMPONENT_EXTENSIONS
405
423
  });
406
424
  addComponentsDir({
407
425
  path: join(runtimeDir, "embed/components"),
426
+ extensions: VUE_COMPONENT_EXTENSIONS,
408
427
  pathPrefix: false
409
428
  });
410
429
  nuxt.hook("vite:extendConfig", (config, { isServer }) => {
@@ -2,6 +2,7 @@
2
2
  defineProps({
3
3
  conversationId: { type: [String, null], required: false },
4
4
  initialConversationId: { type: [String, null], required: false },
5
+ conversationScope: { type: [String, null], required: false },
5
6
  hideSidebar: { type: Boolean, required: false },
6
7
  loadingMessages: { type: [Array, null], required: false },
7
8
  loadingMessagesMode: { type: [String, null], required: false },
@@ -23,6 +24,7 @@ defineEmits(["update:conversationId", "action"]);
23
24
  :tela-agent-inputs="telaAgentInputs"
24
25
  :conversation-id="conversationId"
25
26
  :initial-conversation-id="initialConversationId"
27
+ :conversation-scope="conversationScope"
26
28
  :hide-sidebar="hideSidebar"
27
29
  :features="features"
28
30
  :loading-messages="loadingMessages"
@@ -38,6 +40,7 @@ defineEmits(["update:conversationId", "action"]);
38
40
  :user="user"
39
41
  :conversation-id="conversationId"
40
42
  :initial-conversation-id="initialConversationId"
43
+ :conversation-scope="conversationScope"
41
44
  :hide-sidebar="hideSidebar"
42
45
  :features="features"
43
46
  :loading-messages="loadingMessages"
@@ -156,7 +156,8 @@ export function useChat() {
156
156
  const isTelaAgentMode = computed(() => !!embedConfig?.telaAgentId.value);
157
157
  const chatScope = computed(() => resolveChatStateScope(
158
158
  embedConfig?.workspaceId.value || activeOrganization.value?.id,
159
- embedConfig?.telaAgentId.value
159
+ embedConfig?.telaAgentId.value,
160
+ embedConfig?.conversationScope?.value
160
161
  ));
161
162
  const currentConversationBuckets = useState("chat-current-conversation", () => ({}));
162
163
  const messageBuckets = useState("chat-messages", () => ({}));
@@ -14,6 +14,10 @@ export function useChatApi() {
14
14
  if (telaAgentId) {
15
15
  mergedHeaders["x-chat-tela-agent-id"] = telaAgentId;
16
16
  }
17
+ const conversationScope = embedConfig?.conversationScope?.value?.trim();
18
+ if (conversationScope) {
19
+ mergedHeaders["x-chat-conversation-scope"] = conversationScope;
20
+ }
17
21
  return Object.keys(mergedHeaders).length > 0 ? mergedHeaders : void 0;
18
22
  }
19
23
  function withChatHeaders(options) {
@@ -38,7 +38,8 @@ export function useConversations() {
38
38
  const isTelaAgentMode = computed(() => !!embedConfig?.telaAgentId.value);
39
39
  const workspaceScope = computed(() => resolveChatStateScope(
40
40
  embedConfig?.workspaceId.value || activeOrganization.value?.id,
41
- embedConfig?.telaAgentId.value
41
+ embedConfig?.telaAgentId.value,
42
+ embedConfig?.conversationScope?.value
42
43
  ));
43
44
  const conversations = computed({
44
45
  get: () => conversationBuckets.value[workspaceScope.value] ?? [],
@@ -230,6 +231,7 @@ export function useConversations() {
230
231
  appliedSettingsSnapshot: cloneAppliedSettingsSnapshot(updated.appliedSettingsSnapshot),
231
232
  telaAgentId: updated.telaAgentId,
232
233
  createdBy: updated.createdBy,
234
+ conversationScope: updated.conversationScope,
233
235
  createdAt: updated.createdAt,
234
236
  updatedAt: updated.updatedAt
235
237
  };
@@ -6,6 +6,7 @@ type ConfiguredTelaAgentInputs = DeepReadonly<TelaAgentExecutionInput[]> | null
6
6
  export type EmbedConfig = {
7
7
  workspaceId: Ref<string>;
8
8
  telaAgentId: Ref<string | null>;
9
+ conversationScope: Ref<string | null>;
9
10
  telaAgentInputs: Ref<ConfiguredTelaAgentInputs>;
10
11
  workspaceSettings: Ref<DeepReadonly<WorkspaceSettings> | WorkspaceSettings | null | undefined>;
11
12
  hideSidebar: Ref<boolean>;
@@ -17,6 +18,7 @@ export type EmbedConfig = {
17
18
  type EmbedConfigInput = {
18
19
  workspaceId: MaybeRefOrGetter<string>;
19
20
  telaAgentId?: MaybeRefOrGetter<string | null | undefined>;
21
+ conversationScope?: MaybeRefOrGetter<string | null | undefined>;
20
22
  telaAgentInputs?: MaybeRefOrGetter<ConfiguredTelaAgentInputs>;
21
23
  workspaceSettings?: MaybeRefOrGetter<DeepReadonly<WorkspaceSettings> | WorkspaceSettings | null | undefined>;
22
24
  hideSidebar?: MaybeRefOrGetter<boolean | undefined>;
@@ -1,3 +1,4 @@
1
+ import { normalizeConversationScope } from "../utils/tela-chat.js";
1
2
  const EMBED_CONFIG_KEY = "embed-config";
2
3
  function useGlobalCustomComponentsState() {
3
4
  const nuxtApp = useNuxtApp();
@@ -9,6 +10,7 @@ function useGlobalEmbedConfigState() {
9
10
  provided: useState("chat-embed-config-provided", () => false),
10
11
  workspaceId: useState("chat-embed-config-workspace-id", () => ""),
11
12
  telaAgentId: useState("chat-embed-config-tela-agent-id", () => null),
13
+ conversationScope: useState("chat-embed-config-conversation-scope", () => null),
12
14
  telaAgentInputs: useState("chat-embed-config-tela-agent-inputs", () => void 0),
13
15
  workspaceSettings: useState("chat-embed-config-workspace-settings", () => void 0),
14
16
  hideSidebar: useState("chat-embed-config-hide-sidebar", () => void 0),
@@ -22,6 +24,7 @@ export function provideEmbedConfig(input, options = {}) {
22
24
  const config = {
23
25
  workspaceId: computed(() => toValue(input.workspaceId)),
24
26
  telaAgentId: computed(() => toValue(input.telaAgentId) ?? null),
27
+ conversationScope: computed(() => normalizeConversationScope(toValue(input.conversationScope))),
25
28
  telaAgentInputs: computed(() => toValue(input.telaAgentInputs)),
26
29
  workspaceSettings: computed(() => toValue(input.workspaceSettings)),
27
30
  hideSidebar: computed(() => toValue(input.hideSidebar) ?? true),
@@ -36,6 +39,7 @@ export function provideEmbedConfig(input, options = {}) {
36
39
  globalConfig.provided.value = true;
37
40
  globalConfig.workspaceId.value = config.workspaceId.value;
38
41
  globalConfig.telaAgentId.value = config.telaAgentId.value;
42
+ globalConfig.conversationScope.value = config.conversationScope.value;
39
43
  globalConfig.telaAgentInputs.value = config.telaAgentInputs.value;
40
44
  globalConfig.workspaceSettings.value = config.workspaceSettings.value;
41
45
  globalConfig.hideSidebar.value = config.hideSidebar.value;
@@ -57,6 +61,7 @@ export function useEmbedConfig() {
57
61
  return {
58
62
  workspaceId: computed(() => globalConfig.workspaceId.value),
59
63
  telaAgentId: computed(() => globalConfig.telaAgentId.value),
64
+ conversationScope: computed(() => globalConfig.conversationScope.value),
60
65
  telaAgentInputs: computed(() => globalConfig.telaAgentInputs.value),
61
66
  workspaceSettings: computed(() => globalConfig.workspaceSettings.value),
62
67
  hideSidebar: computed(() => globalConfig.hideSidebar.value ?? true),
@@ -2,11 +2,12 @@
2
2
  import { useChatAuth } from "#chat-auth";
3
3
  import { provideEmbedConfig, useEmbedConfig } from "../../composables/useEmbedConfig";
4
4
  import { provideChatAction } from "../../composables/useChatAction";
5
- import { normalizeTelaAgentId } from "../../utils/tela-chat";
5
+ import { normalizeConversationScope, normalizeTelaAgentId, resolveConversationScopeKeySegment } from "../../utils/tela-chat";
6
6
  import ChatEmbedInner from "./ChatEmbedInner.vue";
7
7
  const props = defineProps({
8
8
  conversationId: { type: [String, null], required: false },
9
9
  initialConversationId: { type: [String, null], required: false },
10
+ conversationScope: { type: [String, null], required: false },
10
11
  hideSidebar: { type: Boolean, required: false },
11
12
  loadingMessages: { type: [Array, null], required: false },
12
13
  loadingMessagesMode: { type: [String, null], required: false },
@@ -23,10 +24,12 @@ const parentEmbedConfig = useEmbedConfig();
23
24
  const { activeOrganization } = useChatAuth();
24
25
  const workspaceId = computed(() => activeOrganization.value?.id?.trim() ?? "");
25
26
  const normalizedTelaAgentId = computed(() => normalizeTelaAgentId(props.telaAgentId));
27
+ const normalizedConversationScope = computed(() => normalizeConversationScope(props.conversationScope));
26
28
  const ignoredPropsWarningKey = ref(null);
27
29
  provideEmbedConfig({
28
30
  workspaceId,
29
31
  telaAgentId: normalizedTelaAgentId,
32
+ conversationScope: normalizedConversationScope,
30
33
  telaAgentInputs: computed(() => props.telaAgentInputs),
31
34
  workspaceSettings: computed(() => props.workspaceSettings),
32
35
  hideSidebar: computed(() => props.hideSidebar),
@@ -62,7 +65,7 @@ provideChatAction((payload) => {
62
65
  <template>
63
66
  <ChatEmbedInner
64
67
  v-if="workspaceId"
65
- :key="`${workspaceId}:${normalizedTelaAgentId ?? 'default-chat'}`"
68
+ :key="`${workspaceId}:${normalizedTelaAgentId ?? 'default-chat'}:scope:${resolveConversationScopeKeySegment(normalizedConversationScope)}`"
66
69
  :conversation-id="conversationId"
67
70
  :initial-conversation-id="initialConversationId"
68
71
  :hide-sidebar="hideSidebar"
@@ -30,6 +30,7 @@ export default defineEventHandler(async (event) => {
30
30
  title: `${original.title} (copy)`,
31
31
  createdBy: context.user.email,
32
32
  telaAgentId: original.telaAgentId,
33
+ conversationScope: original.conversationScope,
33
34
  threadSessionId: null,
34
35
  model: original.telaAgentId ? null : original.model,
35
36
  appliedSettingsAt: trustedSettings ? getWorkspaceSettingsUpdatedAt(trustedSettings) : null,
@@ -30,6 +30,7 @@ export default defineEventHandler(async (event) => {
30
30
  userId: context.user.id,
31
31
  createdBy: context.user.email,
32
32
  telaAgentId: context.telaAgentId,
33
+ conversationScope: context.conversationScope,
33
34
  ...context.telaAgentId ? { model: null } : body.model ? { model: body.model } : {}
34
35
  }).returning();
35
36
  if (!conversation) {
@@ -105,6 +105,23 @@ export declare const conversations: import("drizzle-orm/pg-core").PgTableWithCol
105
105
  identity: undefined;
106
106
  generated: undefined;
107
107
  }, {}, {}>;
108
+ conversationScope: import("drizzle-orm/pg-core").PgColumn<{
109
+ name: "conversation_scope";
110
+ tableName: "conversations";
111
+ dataType: "string";
112
+ columnType: "PgText";
113
+ data: string;
114
+ driverParam: string;
115
+ notNull: false;
116
+ hasDefault: false;
117
+ isPrimaryKey: false;
118
+ isAutoincrement: false;
119
+ hasRuntimeDefault: false;
120
+ enumValues: [string, ...string[]];
121
+ baseColumn: never;
122
+ identity: undefined;
123
+ generated: undefined;
124
+ }, {}, {}>;
108
125
  model: import("drizzle-orm/pg-core").PgColumn<{
109
126
  name: "model";
110
127
  tableName: "conversations";
@@ -7,6 +7,7 @@ export const conversations = chatSchema.table("conversations", {
7
7
  title: text("title").notNull().default("Nova conversa"),
8
8
  threadSessionId: text("thread_session_id"),
9
9
  telaAgentId: text("tela_agent_id"),
10
+ conversationScope: text("conversation_scope"),
10
11
  model: text("model").default("claude-sonnet-4-5"),
11
12
  appliedSettingsAt: timestamp("applied_settings_at", { withTimezone: true }),
12
13
  appliedSettingsSnapshot: jsonb("applied_settings_snapshot").$type(),
@@ -6,9 +6,11 @@ export type ChatContext = {
6
6
  };
7
7
  export type ChatRuntimeContext = ChatContext & {
8
8
  telaAgentId: string | null;
9
+ conversationScope: string | null;
9
10
  };
10
11
  export declare function resolveRequestedWorkspaceId(requestedWorkspaceId: string | null | undefined): string | null;
11
12
  export declare function resolveRequestedTelaAgentId(requestedTelaAgentId: string | null | undefined): string | null;
13
+ export declare function resolveRequestedConversationScope(requestedConversationScope: string | null | undefined): string | null;
12
14
  export declare function resolveChatContextFromSession(session: AppSession, requestedWorkspaceId?: string | null): ChatContext;
13
15
  export declare function resolveChatContext(event: H3Event): ChatContext;
14
16
  export declare function resolveChatRuntimeContext(event: H3Event): ChatRuntimeContext;
@@ -1,6 +1,7 @@
1
1
  import { createError, getHeader } from "h3";
2
2
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
3
  const TELA_AGENT_ID_PATTERN = /^[A-Za-z0-9_-]{1,128}$/;
4
+ const CONVERSATION_SCOPE_PATTERN = /^[A-Za-z0-9._:/-]{1,200}$/;
4
5
  export function resolveRequestedWorkspaceId(requestedWorkspaceId) {
5
6
  const normalized = requestedWorkspaceId?.trim();
6
7
  return normalized || null;
@@ -17,6 +18,18 @@ export function resolveRequestedTelaAgentId(requestedTelaAgentId) {
17
18
  }
18
19
  return normalized;
19
20
  }
21
+ export function resolveRequestedConversationScope(requestedConversationScope) {
22
+ const normalized = requestedConversationScope?.trim();
23
+ if (!normalized)
24
+ return null;
25
+ if (!CONVERSATION_SCOPE_PATTERN.test(normalized)) {
26
+ throw createError({
27
+ statusCode: 400,
28
+ statusMessage: "Invalid conversation scope"
29
+ });
30
+ }
31
+ return normalized;
32
+ }
20
33
  export function resolveChatContextFromSession(session, requestedWorkspaceId) {
21
34
  const normalizedRequestedWorkspaceId = resolveRequestedWorkspaceId(requestedWorkspaceId);
22
35
  if (normalizedRequestedWorkspaceId && normalizedRequestedWorkspaceId !== session.workspace.id) {
@@ -39,6 +52,7 @@ export function resolveChatRuntimeContext(event) {
39
52
  const context = resolveChatContext(event);
40
53
  return {
41
54
  ...context,
42
- telaAgentId: resolveRequestedTelaAgentId(getHeader(event, "x-chat-tela-agent-id"))
55
+ telaAgentId: resolveRequestedTelaAgentId(getHeader(event, "x-chat-tela-agent-id")),
56
+ conversationScope: resolveRequestedConversationScope(getHeader(event, "x-chat-conversation-scope"))
43
57
  };
44
58
  }
@@ -3,7 +3,8 @@ import { schema } from "#chat-runtime/server/db";
3
3
  export function conversationScopeConditions(context, conversationId) {
4
4
  const conditions = [
5
5
  eq(schema.conversations.workspaceId, context.workspaceId),
6
- context.telaAgentId ? eq(schema.conversations.telaAgentId, context.telaAgentId) : isNull(schema.conversations.telaAgentId)
6
+ context.telaAgentId ? eq(schema.conversations.telaAgentId, context.telaAgentId) : isNull(schema.conversations.telaAgentId),
7
+ context.conversationScope ? eq(schema.conversations.conversationScope, context.conversationScope) : isNull(schema.conversations.conversationScope)
7
8
  ];
8
9
  if (conversationId) {
9
10
  conditions.unshift(eq(schema.conversations.id, conversationId));
@@ -21,15 +21,15 @@ type ChatAuthMember = {
21
21
 
22
22
  type ChatAuthOrganization = {
23
23
  id: string
24
+ name?: string
25
+ logo?: string | null
24
26
  members?: ChatAuthMember[]
25
27
  }
26
28
 
27
- declare module '#chat-auth' {
28
- export function useChatAuth(): {
29
- user: Ref<ChatAuthUser | null>
30
- activeOrganization: Ref<ChatAuthOrganization | null>
31
- getToken: () => Promise<string | null | undefined>
32
- getAvailableOrganizations: () => Promise<ChatAuthOrganization[]>
33
- switchOrganization: (organizationId: string) => Promise<void>
34
- }
29
+ export function useChatAuth(): {
30
+ user: Ref<ChatAuthUser | null>
31
+ activeOrganization: Ref<ChatAuthOrganization | null>
32
+ getToken: () => Promise<string | null | undefined>
33
+ getAvailableOrganizations: () => Promise<ChatAuthOrganization[]>
34
+ switchOrganization: (organizationId: string) => Promise<void>
35
35
  }
@@ -4,26 +4,45 @@ import type { TelaAgentExecutionInput } from './tela-agent.js';
4
4
  import type { ChatLoadingMessageMode } from '../utils/chat-loading-messages.js';
5
5
  import type { ChatActor, ChatFeatureConfig } from '../utils/tela-chat.js';
6
6
  export type ChatEmbedSharedProps = {
7
+ /** Controlled conversation id. Use with `v-model:conversation-id` when the host owns active conversation state. */
7
8
  conversationId?: string | null;
9
+ /** Conversation id to open once on mount when `conversationId` is uncontrolled. */
8
10
  initialConversationId?: string | null;
11
+ /** Technical scope that isolates conversation history within the current workspace and runtime. */
12
+ conversationScope?: string | null;
13
+ /** Hide the conversation list and render only the active chat surface. */
9
14
  hideSidebar?: boolean;
15
+ /** Custom pending-response messages shown while the assistant is working. */
10
16
  loadingMessages?: readonly string[] | null;
17
+ /** How custom loading messages rotate. Defaults to ordered behavior when omitted. */
11
18
  loadingMessagesMode?: ChatLoadingMessageMode | null;
19
+ /** Custom markdown component renderers keyed by markdown node or tag name. */
12
20
  customComponents?: Record<string, Component>;
21
+ /** Extra HTML tags allowed by the markdown renderer. */
13
22
  customHtmlTags?: readonly string[];
14
23
  };
15
24
  export type DefaultChatEmbedProps = ChatEmbedSharedProps & {
25
+ /** Omitted in default chat mode. Set this to switch to Tela agent mode. */
16
26
  telaAgentId?: undefined;
27
+ /** Tela agent inputs are only accepted in Tela agent mode. */
17
28
  telaAgentInputs?: undefined;
29
+ /** Optional host-provided workspace settings. When omitted, chat-nuxt loads workspace settings itself. */
18
30
  workspaceSettings?: DeepReadonly<WorkspaceSettings> | WorkspaceSettings | null;
31
+ /** Optional display identity for messages created by the current user. */
19
32
  user?: ChatActor | null;
33
+ /** Optional UI feature toggles for the default chat runtime. */
20
34
  features?: Partial<ChatFeatureConfig>;
21
35
  };
22
36
  export type TelaAgentChatEmbedProps = ChatEmbedSharedProps & {
37
+ /** Tela agent id that switches the embed into Tela agent runtime mode. */
23
38
  telaAgentId: string;
39
+ /** Inputs sent with each Tela agent run. Non-null values hide the variables panel. */
24
40
  telaAgentInputs?: DeepReadonly<TelaAgentExecutionInput[]> | null;
41
+ /** Not accepted in Tela agent mode because the Tela agent owns runtime settings. */
25
42
  workspaceSettings?: never;
43
+ /** Not accepted in Tela agent mode because execution identity comes from the Tela agent runtime. */
26
44
  user?: never;
45
+ /** Optional UI feature toggles that are still supported in Tela agent mode. */
27
46
  features?: Partial<ChatFeatureConfig>;
28
47
  };
29
48
  export type MeistrariChatEmbedProps = DefaultChatEmbedProps | TelaAgentChatEmbedProps;
@@ -17,7 +17,9 @@ export type ChatActor = {
17
17
  };
18
18
  export declare function normalizeConversationId(value: string | null | undefined): string | null;
19
19
  export declare function normalizeTelaAgentId(value: string | null | undefined): string | null;
20
- export declare function resolveChatStateScope(workspaceId: string | null | undefined, telaAgentId: string | null | undefined): string;
20
+ export declare function normalizeConversationScope(value: string | null | undefined): string | null;
21
+ export declare function resolveConversationScopeKeySegment(value: string | null | undefined): string;
22
+ export declare function resolveChatStateScope(workspaceId: string | null | undefined, telaAgentId: string | null | undefined, conversationScope?: string | null): string;
21
23
  export declare function resolveChatFeatures(features?: Partial<ChatFeatureConfig>): ResolvedChatFeatureConfig;
22
24
  export declare function resolveConversationCreator(conversationUserId: string | null | undefined, options: {
23
25
  currentUser?: ChatActor | null;
@@ -9,10 +9,19 @@ export function normalizeTelaAgentId(value) {
9
9
  const normalized = value?.trim();
10
10
  return normalized || null;
11
11
  }
12
- export function resolveChatStateScope(workspaceId, telaAgentId) {
12
+ export function normalizeConversationScope(value) {
13
+ const normalized = value?.trim();
14
+ return normalized || null;
15
+ }
16
+ export function resolveConversationScopeKeySegment(value) {
17
+ const normalizedConversationScope = normalizeConversationScope(value);
18
+ return normalizedConversationScope ? `value:${normalizedConversationScope}` : "none";
19
+ }
20
+ export function resolveChatStateScope(workspaceId, telaAgentId, conversationScope) {
13
21
  const normalizedWorkspaceId = workspaceId?.trim() || "default";
14
22
  const normalizedTelaAgentId = normalizeTelaAgentId(telaAgentId);
15
- return normalizedTelaAgentId ? `${normalizedWorkspaceId}:tela-agent:${normalizedTelaAgentId}` : `${normalizedWorkspaceId}:default-chat`;
23
+ const runtimeScope = normalizedTelaAgentId ? `${normalizedWorkspaceId}:tela-agent:${normalizedTelaAgentId}` : `${normalizedWorkspaceId}:default-chat`;
24
+ return `${runtimeScope}:scope:${resolveConversationScopeKeySegment(conversationScope)}`;
16
25
  }
17
26
  export function resolveChatFeatures(features) {
18
27
  return {
@@ -0,0 +1 @@
1
+ ALTER TABLE "chat"."conversations" ADD COLUMN "conversation_scope" text;
@@ -0,0 +1,738 @@
1
+ {
2
+ "id": "4c144c5c-7df6-4aa0-9c2d-ac7d60864537",
3
+ "prevId": "00e3e29e-98c4-4e48-98f4-0af0913d882b",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "chat.conversation_usage": {
8
+ "name": "conversation_usage",
9
+ "schema": "chat",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "workspace_id": {
19
+ "name": "workspace_id",
20
+ "type": "text",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "conversation_id": {
25
+ "name": "conversation_id",
26
+ "type": "uuid",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "prompt_tokens": {
31
+ "name": "prompt_tokens",
32
+ "type": "integer",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "completion_tokens": {
37
+ "name": "completion_tokens",
38
+ "type": "integer",
39
+ "primaryKey": false,
40
+ "notNull": true
41
+ },
42
+ "total_tokens": {
43
+ "name": "total_tokens",
44
+ "type": "integer",
45
+ "primaryKey": false,
46
+ "notNull": true
47
+ },
48
+ "prompt_cost": {
49
+ "name": "prompt_cost",
50
+ "type": "numeric(12, 8)",
51
+ "primaryKey": false,
52
+ "notNull": true
53
+ },
54
+ "completion_cost": {
55
+ "name": "completion_cost",
56
+ "type": "numeric(12, 8)",
57
+ "primaryKey": false,
58
+ "notNull": true
59
+ },
60
+ "total_cost": {
61
+ "name": "total_cost",
62
+ "type": "numeric(12, 8)",
63
+ "primaryKey": false,
64
+ "notNull": true
65
+ },
66
+ "duration_ms": {
67
+ "name": "duration_ms",
68
+ "type": "integer",
69
+ "primaryKey": false,
70
+ "notNull": false
71
+ },
72
+ "turns": {
73
+ "name": "turns",
74
+ "type": "integer",
75
+ "primaryKey": false,
76
+ "notNull": false
77
+ },
78
+ "user_id": {
79
+ "name": "user_id",
80
+ "type": "text",
81
+ "primaryKey": false,
82
+ "notNull": true
83
+ },
84
+ "user_email": {
85
+ "name": "user_email",
86
+ "type": "text",
87
+ "primaryKey": false,
88
+ "notNull": false
89
+ },
90
+ "model": {
91
+ "name": "model",
92
+ "type": "text",
93
+ "primaryKey": false,
94
+ "notNull": false
95
+ },
96
+ "session_id": {
97
+ "name": "session_id",
98
+ "type": "text",
99
+ "primaryKey": false,
100
+ "notNull": false
101
+ },
102
+ "cache_read_input_tokens": {
103
+ "name": "cache_read_input_tokens",
104
+ "type": "integer",
105
+ "primaryKey": false,
106
+ "notNull": false
107
+ },
108
+ "cache_creation_input_tokens": {
109
+ "name": "cache_creation_input_tokens",
110
+ "type": "integer",
111
+ "primaryKey": false,
112
+ "notNull": false
113
+ },
114
+ "model_usage": {
115
+ "name": "model_usage",
116
+ "type": "jsonb",
117
+ "primaryKey": false,
118
+ "notNull": false
119
+ },
120
+ "duration_api_ms": {
121
+ "name": "duration_api_ms",
122
+ "type": "integer",
123
+ "primaryKey": false,
124
+ "notNull": false
125
+ },
126
+ "web_search_requests": {
127
+ "name": "web_search_requests",
128
+ "type": "integer",
129
+ "primaryKey": false,
130
+ "notNull": false
131
+ },
132
+ "web_fetch_requests": {
133
+ "name": "web_fetch_requests",
134
+ "type": "integer",
135
+ "primaryKey": false,
136
+ "notNull": false
137
+ },
138
+ "metadata": {
139
+ "name": "metadata",
140
+ "type": "jsonb",
141
+ "primaryKey": false,
142
+ "notNull": false
143
+ },
144
+ "created_at": {
145
+ "name": "created_at",
146
+ "type": "timestamp with time zone",
147
+ "primaryKey": false,
148
+ "notNull": true,
149
+ "default": "now()"
150
+ },
151
+ "updated_at": {
152
+ "name": "updated_at",
153
+ "type": "timestamp with time zone",
154
+ "primaryKey": false,
155
+ "notNull": true,
156
+ "default": "now()"
157
+ }
158
+ },
159
+ "indexes": {
160
+ "idx_usage_workspace": {
161
+ "name": "idx_usage_workspace",
162
+ "columns": [
163
+ {
164
+ "expression": "workspace_id",
165
+ "isExpression": false,
166
+ "asc": true,
167
+ "nulls": "last"
168
+ }
169
+ ],
170
+ "isUnique": false,
171
+ "concurrently": false,
172
+ "method": "btree",
173
+ "with": {}
174
+ },
175
+ "idx_usage_workspace_created": {
176
+ "name": "idx_usage_workspace_created",
177
+ "columns": [
178
+ {
179
+ "expression": "workspace_id",
180
+ "isExpression": false,
181
+ "asc": true,
182
+ "nulls": "last"
183
+ },
184
+ {
185
+ "expression": "created_at",
186
+ "isExpression": false,
187
+ "asc": true,
188
+ "nulls": "last"
189
+ }
190
+ ],
191
+ "isUnique": false,
192
+ "concurrently": false,
193
+ "method": "btree",
194
+ "with": {}
195
+ },
196
+ "idx_usage_conversation": {
197
+ "name": "idx_usage_conversation",
198
+ "columns": [
199
+ {
200
+ "expression": "conversation_id",
201
+ "isExpression": false,
202
+ "asc": true,
203
+ "nulls": "last"
204
+ }
205
+ ],
206
+ "isUnique": false,
207
+ "concurrently": false,
208
+ "method": "btree",
209
+ "with": {}
210
+ },
211
+ "idx_usage_user": {
212
+ "name": "idx_usage_user",
213
+ "columns": [
214
+ {
215
+ "expression": "user_id",
216
+ "isExpression": false,
217
+ "asc": true,
218
+ "nulls": "last"
219
+ }
220
+ ],
221
+ "isUnique": false,
222
+ "concurrently": false,
223
+ "method": "btree",
224
+ "with": {}
225
+ }
226
+ },
227
+ "foreignKeys": {
228
+ "conversation_usage_conversation_id_conversations_id_fk": {
229
+ "name": "conversation_usage_conversation_id_conversations_id_fk",
230
+ "tableFrom": "conversation_usage",
231
+ "tableTo": "conversations",
232
+ "schemaTo": "chat",
233
+ "columnsFrom": [
234
+ "conversation_id"
235
+ ],
236
+ "columnsTo": [
237
+ "id"
238
+ ],
239
+ "onDelete": "cascade",
240
+ "onUpdate": "no action"
241
+ }
242
+ },
243
+ "compositePrimaryKeys": {},
244
+ "uniqueConstraints": {
245
+ "conversation_usage_conversation_id_unique": {
246
+ "name": "conversation_usage_conversation_id_unique",
247
+ "nullsNotDistinct": false,
248
+ "columns": [
249
+ "conversation_id"
250
+ ]
251
+ }
252
+ },
253
+ "policies": {},
254
+ "checkConstraints": {},
255
+ "isRLSEnabled": false
256
+ },
257
+ "chat.conversations": {
258
+ "name": "conversations",
259
+ "schema": "chat",
260
+ "columns": {
261
+ "id": {
262
+ "name": "id",
263
+ "type": "uuid",
264
+ "primaryKey": true,
265
+ "notNull": true,
266
+ "default": "gen_random_uuid()"
267
+ },
268
+ "workspace_id": {
269
+ "name": "workspace_id",
270
+ "type": "text",
271
+ "primaryKey": false,
272
+ "notNull": true
273
+ },
274
+ "user_id": {
275
+ "name": "user_id",
276
+ "type": "text",
277
+ "primaryKey": false,
278
+ "notNull": true
279
+ },
280
+ "title": {
281
+ "name": "title",
282
+ "type": "text",
283
+ "primaryKey": false,
284
+ "notNull": true,
285
+ "default": "'Nova conversa'"
286
+ },
287
+ "thread_session_id": {
288
+ "name": "thread_session_id",
289
+ "type": "text",
290
+ "primaryKey": false,
291
+ "notNull": false
292
+ },
293
+ "tela_agent_id": {
294
+ "name": "tela_agent_id",
295
+ "type": "text",
296
+ "primaryKey": false,
297
+ "notNull": false
298
+ },
299
+ "conversation_scope": {
300
+ "name": "conversation_scope",
301
+ "type": "text",
302
+ "primaryKey": false,
303
+ "notNull": false
304
+ },
305
+ "model": {
306
+ "name": "model",
307
+ "type": "text",
308
+ "primaryKey": false,
309
+ "notNull": false,
310
+ "default": "'claude-sonnet-4-5'"
311
+ },
312
+ "applied_settings_at": {
313
+ "name": "applied_settings_at",
314
+ "type": "timestamp with time zone",
315
+ "primaryKey": false,
316
+ "notNull": false
317
+ },
318
+ "applied_settings_snapshot": {
319
+ "name": "applied_settings_snapshot",
320
+ "type": "jsonb",
321
+ "primaryKey": false,
322
+ "notNull": false
323
+ },
324
+ "created_by": {
325
+ "name": "created_by",
326
+ "type": "text",
327
+ "primaryKey": false,
328
+ "notNull": false
329
+ },
330
+ "created_at": {
331
+ "name": "created_at",
332
+ "type": "timestamp with time zone",
333
+ "primaryKey": false,
334
+ "notNull": true,
335
+ "default": "now()"
336
+ },
337
+ "updated_at": {
338
+ "name": "updated_at",
339
+ "type": "timestamp with time zone",
340
+ "primaryKey": false,
341
+ "notNull": true,
342
+ "default": "now()"
343
+ }
344
+ },
345
+ "indexes": {
346
+ "idx_conversations_workspace": {
347
+ "name": "idx_conversations_workspace",
348
+ "columns": [
349
+ {
350
+ "expression": "workspace_id",
351
+ "isExpression": false,
352
+ "asc": true,
353
+ "nulls": "last"
354
+ }
355
+ ],
356
+ "isUnique": false,
357
+ "concurrently": false,
358
+ "method": "btree",
359
+ "with": {}
360
+ },
361
+ "idx_conversations_user": {
362
+ "name": "idx_conversations_user",
363
+ "columns": [
364
+ {
365
+ "expression": "user_id",
366
+ "isExpression": false,
367
+ "asc": true,
368
+ "nulls": "last"
369
+ }
370
+ ],
371
+ "isUnique": false,
372
+ "concurrently": false,
373
+ "method": "btree",
374
+ "with": {}
375
+ },
376
+ "idx_conversations_updated": {
377
+ "name": "idx_conversations_updated",
378
+ "columns": [
379
+ {
380
+ "expression": "updated_at",
381
+ "isExpression": false,
382
+ "asc": true,
383
+ "nulls": "last"
384
+ }
385
+ ],
386
+ "isUnique": false,
387
+ "concurrently": false,
388
+ "method": "btree",
389
+ "with": {}
390
+ },
391
+ "idx_conversations_workspace_tela_agent_updated": {
392
+ "name": "idx_conversations_workspace_tela_agent_updated",
393
+ "columns": [
394
+ {
395
+ "expression": "workspace_id",
396
+ "isExpression": false,
397
+ "asc": true,
398
+ "nulls": "last"
399
+ },
400
+ {
401
+ "expression": "tela_agent_id",
402
+ "isExpression": false,
403
+ "asc": true,
404
+ "nulls": "last"
405
+ },
406
+ {
407
+ "expression": "updated_at",
408
+ "isExpression": false,
409
+ "asc": true,
410
+ "nulls": "last"
411
+ }
412
+ ],
413
+ "isUnique": false,
414
+ "concurrently": false,
415
+ "method": "btree",
416
+ "with": {}
417
+ }
418
+ },
419
+ "foreignKeys": {},
420
+ "compositePrimaryKeys": {},
421
+ "uniqueConstraints": {},
422
+ "policies": {},
423
+ "checkConstraints": {},
424
+ "isRLSEnabled": false
425
+ },
426
+ "chat.external_skills": {
427
+ "name": "external_skills",
428
+ "schema": "chat",
429
+ "columns": {
430
+ "id": {
431
+ "name": "id",
432
+ "type": "serial",
433
+ "primaryKey": true,
434
+ "notNull": true
435
+ },
436
+ "workspace_id": {
437
+ "name": "workspace_id",
438
+ "type": "text",
439
+ "primaryKey": false,
440
+ "notNull": true
441
+ },
442
+ "ref": {
443
+ "name": "ref",
444
+ "type": "text",
445
+ "primaryKey": false,
446
+ "notNull": true
447
+ },
448
+ "name": {
449
+ "name": "name",
450
+ "type": "text",
451
+ "primaryKey": false,
452
+ "notNull": true
453
+ },
454
+ "description": {
455
+ "name": "description",
456
+ "type": "text",
457
+ "primaryKey": false,
458
+ "notNull": true,
459
+ "default": "''"
460
+ },
461
+ "runtime": {
462
+ "name": "runtime",
463
+ "type": "text",
464
+ "primaryKey": false,
465
+ "notNull": true,
466
+ "default": "'unknown'"
467
+ },
468
+ "allowed_tools": {
469
+ "name": "allowed_tools",
470
+ "type": "jsonb",
471
+ "primaryKey": false,
472
+ "notNull": true,
473
+ "default": "'[]'::jsonb"
474
+ },
475
+ "is_public": {
476
+ "name": "is_public",
477
+ "type": "boolean",
478
+ "primaryKey": false,
479
+ "notNull": true,
480
+ "default": true
481
+ },
482
+ "added_by_user_id": {
483
+ "name": "added_by_user_id",
484
+ "type": "text",
485
+ "primaryKey": false,
486
+ "notNull": true
487
+ },
488
+ "added_by_username": {
489
+ "name": "added_by_username",
490
+ "type": "text",
491
+ "primaryKey": false,
492
+ "notNull": true
493
+ },
494
+ "added_at": {
495
+ "name": "added_at",
496
+ "type": "timestamp with time zone",
497
+ "primaryKey": false,
498
+ "notNull": true,
499
+ "default": "now()"
500
+ },
501
+ "created_at": {
502
+ "name": "created_at",
503
+ "type": "timestamp with time zone",
504
+ "primaryKey": false,
505
+ "notNull": true,
506
+ "default": "now()"
507
+ },
508
+ "updated_at": {
509
+ "name": "updated_at",
510
+ "type": "timestamp with time zone",
511
+ "primaryKey": false,
512
+ "notNull": true,
513
+ "default": "now()"
514
+ }
515
+ },
516
+ "indexes": {},
517
+ "foreignKeys": {},
518
+ "compositePrimaryKeys": {},
519
+ "uniqueConstraints": {
520
+ "external_skills_workspace_ref_unique": {
521
+ "name": "external_skills_workspace_ref_unique",
522
+ "nullsNotDistinct": false,
523
+ "columns": [
524
+ "workspace_id",
525
+ "ref"
526
+ ]
527
+ }
528
+ },
529
+ "policies": {},
530
+ "checkConstraints": {},
531
+ "isRLSEnabled": false
532
+ },
533
+ "chat.messages": {
534
+ "name": "messages",
535
+ "schema": "chat",
536
+ "columns": {
537
+ "id": {
538
+ "name": "id",
539
+ "type": "uuid",
540
+ "primaryKey": true,
541
+ "notNull": true,
542
+ "default": "gen_random_uuid()"
543
+ },
544
+ "conversation_id": {
545
+ "name": "conversation_id",
546
+ "type": "uuid",
547
+ "primaryKey": false,
548
+ "notNull": true
549
+ },
550
+ "role": {
551
+ "name": "role",
552
+ "type": "text",
553
+ "primaryKey": false,
554
+ "notNull": true
555
+ },
556
+ "content": {
557
+ "name": "content",
558
+ "type": "text",
559
+ "primaryKey": false,
560
+ "notNull": true
561
+ },
562
+ "status": {
563
+ "name": "status",
564
+ "type": "text",
565
+ "primaryKey": false,
566
+ "notNull": false,
567
+ "default": "'completed'"
568
+ },
569
+ "reasoning_data": {
570
+ "name": "reasoning_data",
571
+ "type": "jsonb",
572
+ "primaryKey": false,
573
+ "notNull": false
574
+ },
575
+ "files": {
576
+ "name": "files",
577
+ "type": "jsonb",
578
+ "primaryKey": false,
579
+ "notNull": false
580
+ },
581
+ "external_uuid": {
582
+ "name": "external_uuid",
583
+ "type": "text",
584
+ "primaryKey": false,
585
+ "notNull": false
586
+ },
587
+ "ttft": {
588
+ "name": "ttft",
589
+ "type": "text",
590
+ "primaryKey": false,
591
+ "notNull": false
592
+ },
593
+ "created_by": {
594
+ "name": "created_by",
595
+ "type": "text",
596
+ "primaryKey": false,
597
+ "notNull": false
598
+ },
599
+ "created_at": {
600
+ "name": "created_at",
601
+ "type": "timestamp with time zone",
602
+ "primaryKey": false,
603
+ "notNull": true,
604
+ "default": "now()"
605
+ },
606
+ "updated_at": {
607
+ "name": "updated_at",
608
+ "type": "timestamp with time zone",
609
+ "primaryKey": false,
610
+ "notNull": false
611
+ }
612
+ },
613
+ "indexes": {
614
+ "idx_messages_conversation": {
615
+ "name": "idx_messages_conversation",
616
+ "columns": [
617
+ {
618
+ "expression": "conversation_id",
619
+ "isExpression": false,
620
+ "asc": true,
621
+ "nulls": "last"
622
+ }
623
+ ],
624
+ "isUnique": false,
625
+ "concurrently": false,
626
+ "method": "btree",
627
+ "with": {}
628
+ },
629
+ "idx_messages_created": {
630
+ "name": "idx_messages_created",
631
+ "columns": [
632
+ {
633
+ "expression": "created_at",
634
+ "isExpression": false,
635
+ "asc": true,
636
+ "nulls": "last"
637
+ }
638
+ ],
639
+ "isUnique": false,
640
+ "concurrently": false,
641
+ "method": "btree",
642
+ "with": {}
643
+ }
644
+ },
645
+ "foreignKeys": {
646
+ "messages_conversation_id_conversations_id_fk": {
647
+ "name": "messages_conversation_id_conversations_id_fk",
648
+ "tableFrom": "messages",
649
+ "tableTo": "conversations",
650
+ "schemaTo": "chat",
651
+ "columnsFrom": [
652
+ "conversation_id"
653
+ ],
654
+ "columnsTo": [
655
+ "id"
656
+ ],
657
+ "onDelete": "cascade",
658
+ "onUpdate": "no action"
659
+ }
660
+ },
661
+ "compositePrimaryKeys": {},
662
+ "uniqueConstraints": {},
663
+ "policies": {},
664
+ "checkConstraints": {},
665
+ "isRLSEnabled": false
666
+ },
667
+ "chat.workspace_settings": {
668
+ "name": "workspace_settings",
669
+ "schema": "chat",
670
+ "columns": {
671
+ "workspace_id": {
672
+ "name": "workspace_id",
673
+ "type": "text",
674
+ "primaryKey": true,
675
+ "notNull": true
676
+ },
677
+ "system_message": {
678
+ "name": "system_message",
679
+ "type": "text",
680
+ "primaryKey": false,
681
+ "notNull": false
682
+ },
683
+ "context_files": {
684
+ "name": "context_files",
685
+ "type": "jsonb",
686
+ "primaryKey": false,
687
+ "notNull": false
688
+ },
689
+ "canvas_tools": {
690
+ "name": "canvas_tools",
691
+ "type": "jsonb",
692
+ "primaryKey": false,
693
+ "notNull": false
694
+ },
695
+ "knowledge_sources": {
696
+ "name": "knowledge_sources",
697
+ "type": "jsonb",
698
+ "primaryKey": false,
699
+ "notNull": false
700
+ },
701
+ "created_at": {
702
+ "name": "created_at",
703
+ "type": "timestamp with time zone",
704
+ "primaryKey": false,
705
+ "notNull": true,
706
+ "default": "now()"
707
+ },
708
+ "updated_at": {
709
+ "name": "updated_at",
710
+ "type": "timestamp with time zone",
711
+ "primaryKey": false,
712
+ "notNull": true,
713
+ "default": "now()"
714
+ }
715
+ },
716
+ "indexes": {},
717
+ "foreignKeys": {},
718
+ "compositePrimaryKeys": {},
719
+ "uniqueConstraints": {},
720
+ "policies": {},
721
+ "checkConstraints": {},
722
+ "isRLSEnabled": false
723
+ }
724
+ },
725
+ "enums": {},
726
+ "schemas": {
727
+ "chat": "chat"
728
+ },
729
+ "sequences": {},
730
+ "roles": {},
731
+ "policies": {},
732
+ "views": {},
733
+ "_meta": {
734
+ "columns": {},
735
+ "schemas": {},
736
+ "tables": {}
737
+ }
738
+ }
@@ -106,6 +106,13 @@
106
106
  "when": 1777993742734,
107
107
  "tag": "0014_faulty_lake",
108
108
  "breakpoints": true
109
+ },
110
+ {
111
+ "idx": 15,
112
+ "version": "7",
113
+ "when": 1779212743677,
114
+ "tag": "0015_illegal_blindfold",
115
+ "breakpoints": true
109
116
  }
110
117
  ]
111
118
  }
package/package.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/types.d.mts",
8
8
  "import": "./dist/module.mjs"
9
9
  },
10
+ "./components/MeistrariChatEmbed": {
11
+ "types": "./dist/runtime/components/MeistrariChatEmbed.vue.d.ts",
12
+ "import": "./dist/runtime/components/MeistrariChatEmbed.vue"
13
+ },
10
14
  "./assets/css/*": "./dist/runtime/assets/css/*",
11
15
  "./types/*": {
12
16
  "types": "./dist/runtime/types/*.d.ts",
@@ -26,6 +30,7 @@
26
30
  "scripts": {
27
31
  "build": "mkdir -p .nuxt && { [ -f .nuxt/tsconfig.json ] || printf '{}' > .nuxt/tsconfig.json; } && { [ -f .nuxt/tsconfig.server.json ] || printf '{}' > .nuxt/tsconfig.server.json; } && nuxt-module-build build",
28
32
  "dev:prepare": "nuxt-module-build build --stub",
33
+ "test:types": "pnpm build && tsc -p tsconfig.type-tests.json --noEmit",
29
34
  "smoke:pack": "./scripts/smoke-pack-consumer.sh",
30
35
  "lint": "eslint .",
31
36
  "lint:fix": "eslint . --fix",