@meistrari/chat-nuxt 1.1.2 → 1.1.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.
Files changed (90) hide show
  1. package/README.md +25 -7
  2. package/dist/module.json +2 -2
  3. package/dist/module.mjs +38 -4
  4. package/dist/runtime/composables/useWorkspaceCredentials.d.ts +3 -3
  5. package/dist/runtime/composables/useWorkspaceSettings.js +1 -1
  6. package/dist/runtime/server/api/admin/trigger-usage-report.post.d.ts +4 -1
  7. package/dist/runtime/server/api/admin/trigger-usage-report.post.js +2 -0
  8. package/dist/runtime/server/api/chat/workspace/settings.get.d.ts +1 -1
  9. package/dist/runtime/server/api/chat/workspace/settings.get.js +1 -0
  10. package/dist/runtime/server/api/conversations/[id]/cancel.post.d.ts +4 -1
  11. package/dist/runtime/server/api/conversations/[id]/cancel.post.js +1 -0
  12. package/dist/runtime/server/api/conversations/[id]/clear.post.d.ts +1 -1
  13. package/dist/runtime/server/api/conversations/[id]/clear.post.js +1 -0
  14. package/dist/runtime/server/api/conversations/[id]/duplicate.post.d.ts +1 -1
  15. package/dist/runtime/server/api/conversations/[id]/duplicate.post.js +1 -0
  16. package/dist/runtime/server/api/conversations/[id]/files.get.d.ts +1 -1
  17. package/dist/runtime/server/api/conversations/[id]/files.get.js +2 -0
  18. package/dist/runtime/server/api/conversations/[id]/index.delete.d.ts +3 -1
  19. package/dist/runtime/server/api/conversations/[id]/index.delete.js +1 -0
  20. package/dist/runtime/server/api/conversations/[id]/index.get.d.ts +1 -1
  21. package/dist/runtime/server/api/conversations/[id]/index.get.js +1 -0
  22. package/dist/runtime/server/api/conversations/[id]/index.patch.d.ts +1 -1
  23. package/dist/runtime/server/api/conversations/[id]/index.patch.js +1 -0
  24. package/dist/runtime/server/api/conversations/[id]/messages/[messageId]/retry.post.d.ts +1 -1
  25. package/dist/runtime/server/api/conversations/[id]/messages/[messageId]/retry.post.js +2 -0
  26. package/dist/runtime/server/api/conversations/[id]/messages/index.get.d.ts +14 -1
  27. package/dist/runtime/server/api/conversations/[id]/messages/index.get.js +2 -0
  28. package/dist/runtime/server/api/conversations/[id]/messages/index.post.d.ts +4 -1
  29. package/dist/runtime/server/api/conversations/[id]/messages/index.post.js +2 -0
  30. package/dist/runtime/server/api/conversations/[id]/usage.get.d.ts +1 -1
  31. package/dist/runtime/server/api/conversations/[id]/usage.get.js +1 -0
  32. package/dist/runtime/server/api/conversations/generate-title.post.d.ts +3 -1
  33. package/dist/runtime/server/api/conversations/generate-title.post.js +2 -0
  34. package/dist/runtime/server/api/conversations/index.get.d.ts +1 -1
  35. package/dist/runtime/server/api/conversations/index.get.js +1 -0
  36. package/dist/runtime/server/api/conversations/index.post.d.ts +1 -1
  37. package/dist/runtime/server/api/conversations/index.post.js +1 -0
  38. package/dist/runtime/server/api/external-skills/discover.post.d.ts +1 -1
  39. package/dist/runtime/server/api/external-skills/discover.post.js +2 -0
  40. package/dist/runtime/server/api/github/disconnect.post.d.ts +3 -1
  41. package/dist/runtime/server/api/github/disconnect.post.js +2 -0
  42. package/dist/runtime/server/api/github/status.get.d.ts +1 -1
  43. package/dist/runtime/server/api/github/status.get.js +2 -0
  44. package/dist/runtime/server/api/tela/canvas.get.d.ts +1 -1
  45. package/dist/runtime/server/api/tela/canvas.get.js +1 -0
  46. package/dist/runtime/server/api/tela/projects.get.d.ts +1 -1
  47. package/dist/runtime/server/api/tela/projects.get.js +1 -0
  48. package/dist/runtime/server/api/tela/workspaces.get.d.ts +1 -1
  49. package/dist/runtime/server/api/tela/workspaces.get.js +1 -0
  50. package/dist/runtime/server/api/tela/workstations.get.d.ts +1 -1
  51. package/dist/runtime/server/api/tela/workstations.get.js +1 -0
  52. package/dist/runtime/server/api/vault/permalink-metadata.post.d.ts +5 -1
  53. package/dist/runtime/server/api/vault/permalink-metadata.post.js +2 -0
  54. package/dist/runtime/server/api/vault/resolve.post.d.ts +9 -1
  55. package/dist/runtime/server/api/vault/resolve.post.js +2 -0
  56. package/dist/runtime/server/api/vault/upload.post.d.ts +6 -1
  57. package/dist/runtime/server/api/vault/upload.post.js +2 -0
  58. package/dist/runtime/server/api/workspace/credentials/[id].delete.d.ts +3 -1
  59. package/dist/runtime/server/api/workspace/credentials/[id].delete.js +1 -0
  60. package/dist/runtime/server/api/workspace/credentials/[id].put.d.ts +1 -1
  61. package/dist/runtime/server/api/workspace/credentials/[id].put.js +1 -0
  62. package/dist/runtime/server/api/workspace/credentials/index.get.d.ts +1 -1
  63. package/dist/runtime/server/api/workspace/credentials/index.get.js +1 -0
  64. package/dist/runtime/server/api/workspace/credentials/index.post.d.ts +1 -1
  65. package/dist/runtime/server/api/workspace/credentials/index.post.js +1 -0
  66. package/dist/runtime/server/api/workspace/settings.get.d.ts +1 -1
  67. package/dist/runtime/server/api/workspace/settings.get.js +1 -0
  68. package/dist/runtime/server/api/workspace/settings.patch.d.ts +1 -1
  69. package/dist/runtime/server/api/workspace/settings.patch.js +1 -0
  70. package/dist/runtime/server/api/workspace/usage.get.d.ts +1 -1
  71. package/dist/runtime/server/api/workspace/usage.get.js +1 -0
  72. package/dist/runtime/server/db/index.js +1 -0
  73. package/dist/runtime/server/middleware/domain-validation.d.ts +1 -1
  74. package/dist/runtime/server/middleware/domain-validation.js +2 -0
  75. package/dist/runtime/server/middleware/request-logger.d.ts +1 -1
  76. package/dist/runtime/server/middleware/request-logger.js +1 -0
  77. package/dist/runtime/server/tasks/send-daily-usage-report.d.ts +1 -1
  78. package/dist/runtime/server/tasks/send-daily-usage-report.js +1 -0
  79. package/dist/runtime/server/utils/agent-api.d.ts +1 -1
  80. package/dist/runtime/server/utils/agent-api.js +2 -0
  81. package/dist/runtime/server/utils/auth-api.js +2 -0
  82. package/dist/runtime/server/utils/auth.d.ts +1 -1
  83. package/dist/runtime/server/utils/auth.js +1 -0
  84. package/dist/runtime/server/utils/tela-api.d.ts +1 -1
  85. package/dist/runtime/server/utils/tela-api.js +2 -0
  86. package/dist/runtime/server/utils/workspace.js +1 -0
  87. package/package.json +27 -11
  88. /package/dist/runtime/components/{TelaChat.d.vue.ts → MeistrariChatEmbed.d.vue.ts} +0 -0
  89. /package/dist/runtime/components/{TelaChat.vue → MeistrariChatEmbed.vue} +0 -0
  90. /package/dist/runtime/components/{TelaChat.vue.d.ts → MeistrariChatEmbed.vue.d.ts} +0 -0
package/README.md CHANGED
@@ -8,6 +8,24 @@ Nuxt module that adds a complete AI chat interface to your app. Powered by Tela'
8
8
  pnpm add @meistrari/chat-nuxt @meistrari/auth-nuxt @meistrari/tela-build markstream-vue
9
9
  ```
10
10
 
11
+ ### Required: Vue dedupe via pnpm overrides
12
+
13
+ `@meistrari/tela-build` pins `vue@3.5.13` as a direct dependency, which collides with the Vue that Nuxt installs. Without an override, pnpm installs two Vue copies and you'll hit runtime errors such as `root.ce._hasShadowRoot is not a function` when custom elements register against one Vue and mount against the other.
14
+
15
+ Until tela-build is published with Vue as a peer dependency, pin a single Vue version in your consumer `package.json`:
16
+
17
+ ```json
18
+ {
19
+ "pnpm": {
20
+ "overrides": {
21
+ "vue": "3.5.33"
22
+ }
23
+ }
24
+ }
25
+ ```
26
+
27
+ Keep this entry until `@meistrari/tela-build` moves Vue to `peerDependencies` — at that point the override becomes unnecessary and should be removed.
28
+
11
29
  ## Setup
12
30
 
13
31
  ### 1. Register the modules
@@ -91,7 +109,7 @@ const workspaceId = computed(() => activeOrganization.value?.id ?? null)
91
109
 
92
110
  <template>
93
111
  <div v-if="workspaceId" h-screen>
94
- <TelaChat :workspace-id="workspaceId" />
112
+ <MeistrariChatEmbed :workspace-id="workspaceId" />
95
113
  </div>
96
114
  </template>
97
115
  ```
@@ -110,7 +128,7 @@ The main use case: drop the chat inside your existing app UI.
110
128
  <main>
111
129
  <!-- Chat embedded in a card -->
112
130
  <div style="height: 600px" class="rounded-2xl overflow-hidden border">
113
- <TelaChat
131
+ <MeistrariChatEmbed
114
132
  v-model:conversation-id="activeConversation"
115
133
  :workspace-id="workspaceId"
116
134
  :hide-sidebar="true"
@@ -127,7 +145,7 @@ Key props for embedding:
127
145
  - **`v-model:conversation-id`** — sync the active conversation with your app's state
128
146
  - **`:initial-conversation-id`** — open a specific conversation on mount
129
147
 
130
- ## `<TelaChat>` Props
148
+ ## `<MeistrariChatEmbed>` Props
131
149
 
132
150
  | Prop | Type | Default | Description |
133
151
  |------|------|---------|-------------|
@@ -179,7 +197,7 @@ onMounted(async () => {
179
197
  </script>
180
198
  ```
181
199
 
182
- 3. Pass flags to `<TelaChat>`:
200
+ 3. Pass flags to `<MeistrariChatEmbed>`:
183
201
 
184
202
  ```vue
185
203
  <script setup lang="ts">
@@ -194,14 +212,14 @@ const features = computed(() => ({
194
212
  </script>
195
213
 
196
214
  <template>
197
- <TelaChat :workspace-id="workspaceId" :features="features" />
215
+ <MeistrariChatEmbed :workspace-id="workspaceId" :features="features" />
198
216
  </template>
199
217
  ```
200
218
 
201
219
  Without PostHog, you can pass features statically:
202
220
 
203
221
  ```vue
204
- <TelaChat :workspace-id="workspaceId" :features="{ showUsageTab: true }" />
222
+ <MeistrariChatEmbed :workspace-id="workspaceId" :features="{ showUsageTab: true }" />
205
223
  ```
206
224
 
207
225
  ## Optional: Custom Workspace Settings
@@ -215,7 +233,7 @@ You can override this in two ways:
215
233
  Pass settings directly from your host app:
216
234
 
217
235
  ```vue
218
- <TelaChat
236
+ <MeistrariChatEmbed
219
237
  :workspace-id="workspaceId"
220
238
  :workspace-settings="{
221
239
  workspaceId: 'ws_123',
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
- "configKey": "telaChat",
4
- "version": "1.1.2",
3
+ "configKey": "chatNuxt",
4
+ "version": "1.1.3",
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
- import { existsSync, mkdirSync, symlinkSync } from 'node:fs';
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, addImportsDir, addComponentsDir } from 'nuxt/kit';
4
+ import { defineNuxtModule, createResolver, addImportsDir, addComponent, addComponentsDir } from 'nuxt/kit';
5
5
 
6
6
  const localRequire = createRequire(import.meta.url);
7
7
  const runtimeAliasPackages = [
@@ -168,6 +168,9 @@ function isAuthModuleEntry(entry) {
168
168
  if (typeof entry === "string") {
169
169
  return entry === "@meistrari/auth-nuxt";
170
170
  }
171
+ if (entry && typeof entry === "object" && "src" in entry) {
172
+ return entry.src === "@meistrari/auth-nuxt";
173
+ }
171
174
  if (Array.isArray(entry)) {
172
175
  return entry[0] === "@meistrari/auth-nuxt";
173
176
  }
@@ -176,16 +179,16 @@ function isAuthModuleEntry(entry) {
176
179
  const module$1 = defineNuxtModule({
177
180
  meta: {
178
181
  name: "@meistrari/chat-nuxt",
179
- configKey: "telaChat"
182
+ configKey: "chatNuxt"
180
183
  },
181
184
  setup(_, nuxt) {
182
- ensureIconifyPackages(nuxt.options.rootDir);
183
185
  const hasAuthModule = (nuxt.options.modules ?? []).some(isAuthModuleEntry);
184
186
  if (!hasAuthModule) {
185
187
  throw new Error(
186
188
  '[@meistrari/chat-nuxt] Missing required module "@meistrari/auth-nuxt". Install and enable it so useTelaApplicationAuth() and event.context.auth are available.'
187
189
  );
188
190
  }
191
+ ensureIconifyPackages(nuxt.options.rootDir);
189
192
  const resolver = createResolver(import.meta.url);
190
193
  const runtimeDir = resolver.resolve("./runtime");
191
194
  const workspaceSettingsResolverEntry = resolveWorkspaceSettingsResolverEntry(
@@ -203,6 +206,13 @@ const module$1 = defineNuxtModule({
203
206
  "#chat-workspace-settings-resolver": workspaceSettingsResolverEntry,
204
207
  "#chat-runtime": runtimeDir
205
208
  };
209
+ if (nuxt.options.imports !== false) {
210
+ nuxt.options.imports = nuxt.options.imports || {};
211
+ nuxt.options.imports.transform = nuxt.options.imports.transform || {};
212
+ nuxt.options.imports.transform.include = nuxt.options.imports.transform.include || [];
213
+ const runtimeDirRegExp = new RegExp(runtimeDir.replace(/\\/g, "/").replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
214
+ nuxt.options.imports.transform.include.push(runtimeDirRegExp);
215
+ }
206
216
  const rc = nuxt.options.runtimeConfig;
207
217
  rc.databaseUrl = rc.databaseUrl || process.env.DATABASE_URL || "";
208
218
  rc.telaApiUrl = rc.telaApiUrl || process.env.TELA_API_URL || "";
@@ -218,6 +228,11 @@ const module$1 = defineNuxtModule({
218
228
  rc.public.agentApiUrl = rc.public.agentApiUrl || process.env.AGENT_API_URL || "";
219
229
  addImportsDir(resolver.resolve("./runtime/composables"));
220
230
  addImportsDir(resolver.resolve("./runtime/utils"));
231
+ addComponent({
232
+ name: "MeistrariChatEmbed",
233
+ filePath: resolver.resolve("./runtime/components/MeistrariChatEmbed.vue"),
234
+ priority: 1e3
235
+ });
221
236
  addComponentsDir({
222
237
  path: resolver.resolve("./runtime/components")
223
238
  });
@@ -243,6 +258,25 @@ const module$1 = defineNuxtModule({
243
258
  ...config.resolve.dedupe || [],
244
259
  ...runtimeAliasDedupe
245
260
  ]));
261
+ config.plugins.push({
262
+ name: "@meistrari/chat-nuxt:elkjs-umd-interop",
263
+ enforce: "pre",
264
+ apply: "serve",
265
+ load(id) {
266
+ const cleanId = id.split("?")[0] ?? id;
267
+ if (!cleanId.endsWith("/elkjs/lib/elk.bundled.js")) {
268
+ return null;
269
+ }
270
+ try {
271
+ const source = readFileSync(cleanId, "utf8");
272
+ return `${source}
273
+ export default globalThis.ELK;
274
+ `;
275
+ } catch {
276
+ return null;
277
+ }
278
+ }
279
+ });
246
280
  });
247
281
  const serverDir = resolver.resolve("./runtime/server");
248
282
  nuxt.hook("nitro:config", (nitroConfig) => {
@@ -2,14 +2,14 @@ import type { WorkspaceCredential } from '../types/credential.js';
2
2
  export declare function useWorkspaceCredentials(searchQuery?: Ref<string>): {
3
3
  credentials: any;
4
4
  loading: any;
5
- fetchCredentials: () => Promise<any>;
5
+ fetchCredentials: () => Promise<WorkspaceCredential[]>;
6
6
  createCredential: (payload: {
7
7
  key: string;
8
8
  value: string;
9
- }) => Promise<any>;
9
+ }) => Promise<WorkspaceCredential>;
10
10
  updateCredential: (id: string, payload: {
11
11
  value: string;
12
- }) => Promise<any>;
12
+ }) => Promise<WorkspaceCredential>;
13
13
  deleteCredential: (id: string) => Promise<void>;
14
14
  filteredCredentials: any;
15
15
  credentialModalOpen: any;
@@ -88,7 +88,7 @@ export function useWorkspaceSettings() {
88
88
  externalSkills: data.externalSkills
89
89
  };
90
90
  if (JSON.stringify(hydratedSettings) !== JSON.stringify(trustedSettings)) {
91
- console.warn("[TelaChat] Hydrated workspace settings differ from trusted server settings");
91
+ console.warn("[MeistrariChatEmbed] Hydrated workspace settings differ from trusted server settings");
92
92
  }
93
93
  }
94
94
  settings.value = data;
@@ -1,2 +1,5 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ success: boolean;
3
+ result: import("nitropack").TaskResult<unknown>;
4
+ }>>;
2
5
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler } from "h3";
2
+ import { runTask } from "nitropack/runtime";
1
3
  import { requireUser } from "#chat-runtime/server/utils/auth";
2
4
  export default defineEventHandler(async (event) => {
3
5
  const session = requireUser(event);
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler } from "h3";
1
2
  import { useDb } from "#chat-runtime/server/db";
2
3
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
3
4
  import { getWorkspaceSettingsUpdatedAt, resolveWorkspaceSettings } from "#chat-runtime/server/utils/chat-workspace-settings";
@@ -1,2 +1,5 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ success: boolean;
3
+ previousStatus: any;
4
+ }>>;
2
5
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, getRouterParam } from "h3";
1
2
  import { eq, and } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, getRouterParam } from "h3";
1
2
  import { eq, and } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, getRouterParam } from "h3";
1
2
  import { eq, and } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<ConversationFilesResponse>>;
2
2
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, getRouterParam } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { and, asc, eq } from "drizzle-orm";
2
4
  import { useDb, schema } from "#chat-runtime/server/db";
3
5
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
@@ -1,2 +1,4 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ success: boolean;
3
+ }>>;
2
4
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, getRouterParam } from "h3";
1
2
  import { eq, and } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, getRouterParam } from "h3";
1
2
  import { eq, and, asc } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, getRouterParam, readBody } from "h3";
1
2
  import { eq, and } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, getRouterParam } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { eq, and, lt, desc, isNull } from "drizzle-orm";
2
4
  import { logger } from "#chat-runtime/server/utils/logger";
3
5
  import { useDb, schema } from "#chat-runtime/server/db";
@@ -1,2 +1,15 @@
1
- declare const _default: any;
1
+ type MessageFile = {
2
+ url: string;
3
+ name: string;
4
+ mimeType?: string;
5
+ source: 'user' | 'assistant';
6
+ size?: number;
7
+ };
8
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
9
+ messages: any;
10
+ newFiles: MessageFile[];
11
+ } | {
12
+ messages: any;
13
+ newFiles?: undefined;
14
+ }>>;
2
15
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, getQuery, getRouterParam } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { and, asc, eq, gt, isNotNull } from "drizzle-orm";
2
4
  import { APIKeyAuthStrategy, VaultFile } from "@meistrari/vault-sdk";
3
5
  import { schema, useDb } from "#chat-runtime/server/db";
@@ -1,2 +1,5 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ userMessage: any;
3
+ assistantMessage: any;
4
+ }>>;
2
5
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, getRouterParam, readBody } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { eq, and, isNull } from "drizzle-orm";
2
4
  import { useDb, schema } from "#chat-runtime/server/db";
3
5
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
@@ -4,5 +4,5 @@ export interface ConversationUsageResponse {
4
4
  usage: ConversationUsage | null;
5
5
  billing: BillingConfig;
6
6
  }
7
- declare const _default: any;
7
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<ConversationUsageResponse>>;
8
8
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, getRouterParam } from "h3";
1
2
  import { eq, and } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
@@ -1,2 +1,4 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ title: string;
3
+ }>>;
2
4
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, readBody } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { createTelaClient } from "@meistrari/tela-sdk-js";
2
4
  import { logger } from "#chat-runtime/server/utils/logger";
3
5
  import { requireUser } from "#chat-runtime/server/utils/auth";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler } from "h3";
1
2
  import { desc, eq } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, getRequestHeader, readBody } from "h3";
1
2
  import { useDb, schema } from "#chat-runtime/server/db";
2
3
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
3
4
  import { logger } from "#chat-runtime/server/utils/logger";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<DiscoveredSkill>>;
2
2
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, readBody } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { getAgentDataToken } from "#chat-runtime/server/utils/agent-api";
2
4
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
5
  import { logger } from "#chat-runtime/server/utils/logger";
@@ -1,2 +1,4 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ success: boolean;
3
+ }>>;
2
4
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { getAgentDataToken } from "#chat-runtime/server/utils/agent-api";
2
4
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
5
  import { logger } from "#chat-runtime/server/utils/logger";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { defineEventHandler } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { getAgentDataToken } from "#chat-runtime/server/utils/agent-api";
2
4
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
5
  import { logger } from "#chat-runtime/server/utils/logger";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler, getQuery } from "h3";
1
2
  import { logger } from "#chat-runtime/server/utils/logger";
2
3
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
4
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler } from "h3";
1
2
  import { logger } from "#chat-runtime/server/utils/logger";
2
3
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
4
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler } from "h3";
1
2
  import { logger } from "#chat-runtime/server/utils/logger";
2
3
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
4
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<TelaWorkstation[]>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler } from "h3";
1
2
  import { logger } from "#chat-runtime/server/utils/logger";
2
3
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
4
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
@@ -1,2 +1,6 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ mimeType: string | undefined;
3
+ fileSize: number | undefined;
4
+ originalFileName: string | undefined;
5
+ }>>;
2
6
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, readBody } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { logger } from "#chat-runtime/server/utils/logger";
2
4
  import { isAllowedPermalinkUrl, isAllowedRedirectUrl } from "#chat-runtime/server/utils/vault";
3
5
  export default defineEventHandler(async (event) => {
@@ -1,2 +1,10 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ url: string;
3
+ originalFileName?: undefined;
4
+ mimeType?: undefined;
5
+ } | {
6
+ url: string;
7
+ originalFileName: any;
8
+ mimeType: any;
9
+ }>>;
2
10
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, readBody } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { APIKeyAuthStrategy, VaultFile } from "@meistrari/vault-sdk";
2
4
  import { logger } from "#chat-runtime/server/utils/logger";
3
5
  import { getAgentDataToken } from "#chat-runtime/server/utils/agent-api";
@@ -1,2 +1,7 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ vaultReference: string;
3
+ url: string;
4
+ mimeType: any;
5
+ size: number;
6
+ }>>;
2
7
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, readFormData } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { APIKeyAuthStrategy, VaultFile } from "@meistrari/vault-sdk";
2
4
  import { logger } from "#chat-runtime/server/utils/logger";
3
5
  import { getAgentDataToken } from "#chat-runtime/server/utils/agent-api";
@@ -1,2 +1,4 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ success: boolean;
3
+ }>>;
2
4
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, getRouterParam } from "h3";
1
2
  import { requireUser } from "#chat-runtime/server/utils/auth";
2
3
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
3
4
  export default defineEventHandler(async (event) => {
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, getRouterParam, readBody } from "h3";
1
2
  import { requireUser } from "#chat-runtime/server/utils/auth";
2
3
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
3
4
  export default defineEventHandler(async (event) => {
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler } from "h3";
1
2
  import { requireUser } from "#chat-runtime/server/utils/auth";
2
3
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
3
4
  export default defineEventHandler(async (event) => {
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, readBody } from "h3";
1
2
  import { requireUser } from "#chat-runtime/server/utils/auth";
2
3
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
3
4
  export default defineEventHandler(async (event) => {
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler } from "h3";
1
2
  import { eq } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { requireUser } from "#chat-runtime/server/utils/auth";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, readBody } from "h3";
1
2
  import { eq, and, inArray } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { requireUser } from "#chat-runtime/server/utils/auth";
@@ -44,5 +44,5 @@ export interface WorkspaceUsageResponse {
44
44
  hasMore: boolean;
45
45
  billing: BillingConfig;
46
46
  }
47
- declare const _default: any;
47
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<WorkspaceUsageResponse>>;
48
48
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler, getQuery } from "h3";
1
2
  import { and, eq, gte, lte, sql, desc } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { requireUser } from "#chat-runtime/server/utils/auth";
@@ -1,3 +1,4 @@
1
+ import { useRuntimeConfig } from "nitropack/runtime";
1
2
  import postgres from "postgres";
2
3
  import { drizzle } from "drizzle-orm/postgres-js";
3
4
  import * as schema from "./schema/index.js";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<void>>;
2
2
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { logger } from "#chat-runtime/server/utils/logger";
2
4
  export default defineEventHandler(async (event) => {
3
5
  const config = useRuntimeConfig(event);
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, void>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler, getMethod, getRequestURL } from "h3";
1
2
  import { logger } from "#chat-runtime/server/utils/logger";
2
3
  export default defineEventHandler((event) => {
3
4
  const path = getRequestURL(event).pathname;
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("nitropack").Task<string>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineTask, useRuntimeConfig } from "nitropack/runtime";
1
2
  import { and, gte, lte, sql } from "drizzle-orm";
2
3
  import { useDb, schema } from "../db/index.js";
3
4
  import { sendSlackMessage, formatUsageReport } from "../utils/slack.js";
@@ -1,4 +1,4 @@
1
- import type { H3Event } from 'h3';
1
+ import { type H3Event } from 'h3';
2
2
  import type { AgentApiChatPayload, AgentApiSession, ContinueSessionPayload, ReasoningItem } from '#chat-runtime/types/agent';
3
3
  export declare function getAgentDataToken(event: H3Event): string;
4
4
  export declare function createChatAgentSession(token: string, payload: AgentApiChatPayload): Promise<{
@@ -1,3 +1,5 @@
1
+ import { createError } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { agentApiQueryResponseSchema, agentApiSessionSchema } from "#chat-runtime/types/agent";
2
4
  import { logger } from "#chat-runtime/server/utils/logger";
3
5
  const getConfig = () => useRuntimeConfig();
@@ -1,3 +1,5 @@
1
+ import { createError } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { logger } from "#chat-runtime/server/utils/logger";
2
4
  export async function authApiFetch(path, options) {
3
5
  const config = useRuntimeConfig();
@@ -1,4 +1,4 @@
1
- import type { H3Event } from 'h3';
1
+ import { type H3Event } from 'h3';
2
2
  export type SessionUser = {
3
3
  id: string;
4
4
  name: string;
@@ -1,3 +1,4 @@
1
+ import { createError } from "h3";
1
2
  import { logger } from "#chat-runtime/server/utils/logger";
2
3
  export function requireUser(event) {
3
4
  const { user, workspace } = event.context.auth ?? {};
@@ -1,2 +1,2 @@
1
- import type { H3Event } from 'h3';
1
+ import { type H3Event } from 'h3';
2
2
  export declare function telaFetch<T>(event: H3Event, path: string, options?: RequestInit): Promise<T>;
@@ -1,3 +1,5 @@
1
+ import { createError } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { logger } from "#chat-runtime/server/utils/logger";
2
4
  export async function telaFetch(event, path, options) {
3
5
  const config = useRuntimeConfig();
@@ -1,3 +1,4 @@
1
+ import { useRuntimeConfig } from "nitropack/runtime";
1
2
  import { eq } from "drizzle-orm";
2
3
  import { schema } from "#chat-runtime/server/db";
3
4
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -28,27 +28,31 @@
28
28
  "db:studio": "infisical run --env=dev -- ./scripts/drizzle.sh studio"
29
29
  },
30
30
  "peerDependencies": {
31
- "@meistrari/auth-nuxt": "^3.4.1"
31
+ "@iconify/vue": "^5.0.0",
32
+ "@meistrari/auth-nuxt": "^3.4.1",
33
+ "@meistrari/tela-build": "^1.30.0",
34
+ "@sentry/nuxt": "^10.0.0",
35
+ "@vueuse/components": "^12.8.0",
36
+ "@vueuse/core": "^12.8.0",
37
+ "h3": "^1.15.0",
38
+ "markstream-vue": "0.0.3-beta.6",
39
+ "motion": "^11.13.0",
40
+ "nitropack": "^2.10.0",
41
+ "nuxt": "^3.17.0",
42
+ "virtua": "^0.42.0",
43
+ "vue": "^3.5.0",
44
+ "vue-i18n": "^11.0.0"
32
45
  },
33
46
  "dependencies": {
34
47
  "@iconify-json/ph": "^1.2.2",
35
48
  "@meistrari/logger": "^2.1.3",
36
49
  "@meistrari/mise-en-place": "^2.5.1",
37
- "@meistrari/tela-build": "^1.30.0",
38
50
  "@meistrari/tela-sdk-js": "^2.8.0",
39
51
  "@meistrari/vault-sdk": "^3.0.0",
40
- "@sentry/nuxt": "^10.38.0",
41
- "@vueuse/components": "12.8.2",
42
- "@vueuse/core": "12.8.2",
43
52
  "beautiful-mermaid": "^1.1.3",
44
53
  "dompurify": "^3.3.2",
45
54
  "drizzle-orm": "^0.38.0",
46
- "h3": "^1.15.1",
47
- "markstream-vue": "0.0.3-beta.6",
48
55
  "mermaid": "^11.13.0",
49
- "motion": "11.13.1",
50
- "nitropack": "2.10.4",
51
- "nuxt": "3.17.7",
52
56
  "pdfjs-dist": "^5.4.530",
53
57
  "postgres": "^3.4.5",
54
58
  "posthog-js": "^1.364.2",
@@ -57,16 +61,28 @@
57
61
  },
58
62
  "devDependencies": {
59
63
  "@antfu/eslint-config": "3.11.2",
64
+ "@iconify/vue": "5.0.0",
60
65
  "@meistrari/auth-nuxt": "3.4.1",
66
+ "@meistrari/tela-build": "^1.30.0",
61
67
  "@nuxt/module-builder": "^1.0.2",
68
+ "@sentry/nuxt": "^10.38.0",
62
69
  "@types/node": "^20.19.0",
70
+ "@vueuse/components": "12.8.2",
71
+ "@vueuse/core": "12.8.2",
63
72
  "dotenv-cli": "^11.0.0",
64
73
  "drizzle-kit": "^0.30.0",
65
74
  "eslint": "9.16.0",
75
+ "h3": "^1.15.1",
76
+ "markstream-vue": "0.0.3-beta.6",
77
+ "motion": "11.13.1",
78
+ "nitropack": "2.10.4",
79
+ "nuxt": "3.17.7",
66
80
  "pino": "^10.3.1",
67
81
  "pino-pretty": "^13.1.3",
68
82
  "typescript": "^5.7.3",
83
+ "virtua": "0.42.0",
69
84
  "vitest": "^3.2.1",
85
+ "vue-i18n": "11.3.2",
70
86
  "vue-tsc": "^3.2.6"
71
87
  }
72
88
  }