chat-js 1.0.0-alpha.7 → 1.0.0-beta.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.
Files changed (305) hide show
  1. package/README.md +8 -6
  2. package/dist/index.js +7487 -6859
  3. package/package.json +2 -2
  4. package/templates/chat-app/AGENTS.md +1 -1
  5. package/templates/chat-app/agent/agent.ts +0 -2
  6. package/templates/chat-app/agent/hooks/followup-suggestions.ts +1 -1
  7. package/templates/chat-app/agent/hooks/projects.ts +1 -1
  8. package/templates/chat-app/agent/hooks/search.ts +1 -1
  9. package/templates/chat-app/agent/instructions/projects.ts +1 -1
  10. package/templates/chat-app/agent/tools/mcp.ts +1 -1
  11. package/templates/chat-app/app/(auth)/device-login/page.tsx +1 -1
  12. package/templates/chat-app/app/(chat)/api/files/upload/route.ts +1 -1
  13. package/templates/chat-app/app/(chat)/chat/{[id] → [chatId]}/page.tsx +4 -4
  14. package/templates/chat-app/app/(chat)/project/[projectId]/chat/[chatId]/page.tsx +1 -1
  15. package/templates/chat-app/app/(chat)/project/[projectId]/page.tsx +1 -1
  16. package/templates/chat-app/app/(chat)/settings/connectors/[connectorId]/page.tsx +1 -1
  17. package/templates/chat-app/app/(chat)/settings/connectors/page.tsx +1 -1
  18. package/templates/chat-app/app/(chat)/settings/models/page.tsx +1 -1
  19. package/templates/chat-app/app/(chat)/share/[id]/page.tsx +1 -1
  20. package/templates/chat-app/app/api/agent-conversations/route.test.ts +5 -5
  21. package/templates/chat-app/app/api/agent-conversations/route.ts +2 -2
  22. package/templates/chat-app/app/api/agent-response-groups/route.test.ts +5 -5
  23. package/templates/chat-app/app/api/agent-response-groups/route.ts +1 -1
  24. package/templates/chat-app/app/api/eve/[...path]/route.test.ts +133 -4
  25. package/templates/chat-app/app/api/eve/[...path]/route.ts +175 -49
  26. package/templates/chat-app/app/api/eve-guest/route.ts +1 -1
  27. package/templates/chat-app/app/api/mcp/oauth/callback/route.ts +1 -1
  28. package/templates/chat-app/app/editor.css +0 -6
  29. package/templates/chat-app/app/layout.tsx +11 -18
  30. package/templates/chat-app/app/opengraph-image.png +0 -0
  31. package/templates/chat-app/chat.config.ts +0 -44
  32. package/templates/chat-app/chatjs/core/chat/compose.ts +4 -4
  33. package/templates/chat-app/chatjs/core/chat/contracts.ts +6 -6
  34. package/templates/chat-app/chatjs/core/gateway/runtime.ts +0 -7
  35. package/templates/chat-app/chatjs/core/installation/contracts.ts +0 -7
  36. package/templates/chat-app/chatjs/core/ui/slots.tsx +15 -5
  37. package/templates/chat-app/chatjs/generated/installed-auth-ui.ts +2 -2
  38. package/templates/chat-app/chatjs/generated/installed-auth.ts +4 -2
  39. package/templates/chat-app/chatjs/generated/installed-billing.ts +2 -2
  40. package/templates/chat-app/chatjs/generated/installed-chat-ui.ts +28 -24
  41. package/templates/chat-app/chatjs/generated/installed-chat.ts +12 -12
  42. package/templates/chat-app/chatjs/generated/installed-cleanup.ts +4 -4
  43. package/templates/chat-app/chatjs/generated/installed-instrumentation.ts +8 -2
  44. package/templates/chat-app/chatjs/generated/installed-layout.ts +2 -2
  45. package/templates/chat-app/chatjs/generated/installed-model-visibility.ts +2 -2
  46. package/templates/chat-app/chatjs/generated/installed-navigation.ts +2 -2
  47. package/templates/chat-app/chatjs/generated/installed-routers.ts +18 -19
  48. package/templates/chat-app/chatjs/generated/installed-session-profiles.ts +5 -3
  49. package/templates/chat-app/chatjs/generated/installed-sign-out.ts +2 -2
  50. package/templates/chat-app/chatjs/generated/installed-signed-out.ts +2 -2
  51. package/templates/chat-app/chatjs/generated/installed-uploads.ts +2 -2
  52. package/templates/chat-app/chatjs/generated/installed.ts +2 -0
  53. package/templates/chat-app/chatjs/plugins/ai-titles/{chat.ts → chat-server.ts} +3 -1
  54. package/templates/chat-app/chatjs/plugins/ai-titles/generate-title.ts +7 -9
  55. package/templates/chat-app/chatjs/plugins/ai-titles/{chatjs.json → plugin.json} +3 -4
  56. package/templates/chat-app/chatjs/plugins/ai-titles/title-queries.ts +4 -4
  57. package/templates/chat-app/chatjs/plugins/attachment-uploads/{client-plugin.ts → chat-ui.ts} +1 -3
  58. package/templates/chat-app/chatjs/plugins/attachment-uploads/plugin.json +16 -0
  59. package/templates/chat-app/chatjs/plugins/credits/billing.ts +3 -1
  60. package/templates/chat-app/chatjs/plugins/credits/{client-plugin.ts → chat-ui.ts} +1 -1
  61. package/templates/chat-app/chatjs/plugins/credits/{chatjs.json → plugin.json} +4 -13
  62. package/templates/chat-app/chatjs/plugins/credits/router.ts +4 -2
  63. package/templates/chat-app/chatjs/plugins/desktop/auth-form.tsx +3 -1
  64. package/templates/chat-app/chatjs/plugins/desktop/auth-server.ts +3 -1
  65. package/templates/chat-app/chatjs/plugins/desktop/{client-plugin.ts → layout-ui.ts} +1 -1
  66. package/templates/chat-app/chatjs/plugins/desktop/navigation.ts +3 -1
  67. package/templates/chat-app/chatjs/plugins/desktop/{chatjs.json → plugin.json} +4 -16
  68. package/templates/chat-app/chatjs/plugins/desktop/sign-out.ts +3 -1
  69. package/templates/chat-app/chatjs/plugins/feedback/chat-server.ts +13 -0
  70. package/templates/chat-app/chatjs/plugins/feedback/{client-plugin.ts → chat-ui.ts} +1 -1
  71. package/templates/chat-app/chatjs/plugins/feedback/feedback-actions.tsx +4 -4
  72. package/templates/chat-app/chatjs/plugins/feedback/feedback-queries.ts +11 -11
  73. package/templates/chat-app/chatjs/plugins/feedback/feedback-schema.ts +2 -2
  74. package/templates/chat-app/chatjs/plugins/feedback/{chatjs.json → plugin.json} +5 -14
  75. package/templates/chat-app/chatjs/plugins/feedback/router.ts +9 -7
  76. package/templates/chat-app/chatjs/plugins/feedback/vote-message.ts +3 -6
  77. package/templates/chat-app/chatjs/plugins/followup-suggestions/{chat.ts → chat-server.ts} +3 -1
  78. package/templates/chat-app/chatjs/plugins/followup-suggestions/{client-plugin.ts → chat-ui.ts} +1 -1
  79. package/templates/chat-app/chatjs/plugins/followup-suggestions/followup-queries.ts +2 -2
  80. package/templates/chat-app/chatjs/plugins/followup-suggestions/{chatjs.json → plugin.json} +5 -17
  81. package/templates/chat-app/chatjs/plugins/followup-suggestions/router.ts +8 -9
  82. package/templates/chat-app/chatjs/plugins/followup-suggestions/suggestions.tsx +2 -7
  83. package/templates/chat-app/chatjs/plugins/followup-suggestions/use-followups.ts +2 -2
  84. package/templates/chat-app/chatjs/plugins/guest-chat/cleanup.ts +1 -7
  85. package/templates/chat-app/chatjs/plugins/guest-chat/guest-auth.ts +1 -0
  86. package/templates/chat-app/chatjs/plugins/guest-chat/instrumentation.ts +6 -0
  87. package/templates/chat-app/chatjs/plugins/guest-chat/{chatjs.json → plugin.json} +6 -12
  88. package/templates/chat-app/chatjs/plugins/guest-chat/session-profile.ts +3 -1
  89. package/templates/chat-app/chatjs/plugins/guest-chat/signed-out.tsx +53 -24
  90. package/templates/chat-app/chatjs/plugins/image-viewer/{client-plugin.ts → chat-ui.ts} +1 -1
  91. package/templates/chat-app/chatjs/plugins/image-viewer/plugin.json +11 -0
  92. package/templates/chat-app/chatjs/plugins/mcp/{client-plugin.ts → chat-ui.ts} +1 -1
  93. package/templates/chat-app/chatjs/plugins/mcp/db/encrypted-text.ts +1 -1
  94. package/templates/chat-app/chatjs/plugins/mcp/{chatjs.json → plugin.json} +5 -13
  95. package/templates/chat-app/chatjs/plugins/mcp/router.ts +4 -2
  96. package/templates/chat-app/chatjs/plugins/mcp/routes/connectors-page.tsx +4 -1
  97. package/templates/chat-app/chatjs/plugins/mcp/setup.ts +2 -2
  98. package/templates/chat-app/chatjs/plugins/mcp/ui/connectors-settings.tsx +1 -1
  99. package/templates/chat-app/chatjs/plugins/mcp/ui/mcp-connect-dialog.tsx +1 -1
  100. package/templates/chat-app/chatjs/plugins/mcp/ui/mcp-create-dialog.tsx +1 -1
  101. package/templates/chat-app/chatjs/plugins/mcp/{mcp-env.ts → validate-env.ts} +2 -1
  102. package/templates/chat-app/chatjs/plugins/model-preferences/{client-plugin.ts → chat-ui.ts} +1 -3
  103. package/templates/chat-app/chatjs/plugins/model-preferences/model-row.tsx +3 -0
  104. package/templates/chat-app/chatjs/plugins/model-preferences/{use-model-preferences.ts → model-visibility.ts} +1 -1
  105. package/templates/chat-app/chatjs/plugins/model-preferences/models-settings.tsx +1 -0
  106. package/templates/chat-app/chatjs/plugins/model-preferences/{chatjs.json → plugin.json} +5 -13
  107. package/templates/chat-app/chatjs/plugins/model-preferences/router.ts +5 -1
  108. package/templates/chat-app/chatjs/plugins/projects/{chat.ts → chat-server.ts} +3 -1
  109. package/templates/chat-app/chatjs/plugins/projects/{client-plugin.ts → chat-ui.ts} +1 -1
  110. package/templates/chat-app/chatjs/plugins/projects/conversation-hook.ts +1 -1
  111. package/templates/chat-app/chatjs/plugins/projects/db/project-queries.ts +2 -2
  112. package/templates/chat-app/chatjs/plugins/projects/{chatjs.json → plugin.json} +5 -14
  113. package/templates/chat-app/chatjs/plugins/projects/router.ts +7 -7
  114. package/templates/chat-app/chatjs/plugins/projects/routes/project-page.tsx +10 -1
  115. package/templates/chat-app/chatjs/plugins/projects/ui/chat-contributions.tsx +3 -3
  116. package/templates/chat-app/chatjs/plugins/projects/ui/delete-project-dialog.tsx +0 -3
  117. package/templates/chat-app/chatjs/plugins/projects/ui/eve-move-project-dialog.tsx +1 -1
  118. package/templates/chat-app/chatjs/plugins/projects/ui/project-icon-picker.tsx +1 -0
  119. package/templates/chat-app/chatjs/plugins/projects/ui/sidebar-projects.tsx +12 -11
  120. package/templates/chat-app/chatjs/plugins/search/{chat.ts → chat-server.ts} +8 -6
  121. package/templates/chat-app/chatjs/plugins/search/{client-plugin.ts → chat-ui.ts} +1 -1
  122. package/templates/chat-app/chatjs/plugins/search/{chatjs.json → plugin.json} +5 -14
  123. package/templates/chat-app/chatjs/plugins/search/router.ts +4 -2
  124. package/templates/chat-app/chatjs/plugins/search/search-backfill.ts +4 -4
  125. package/templates/chat-app/chatjs/plugins/search/search-chats.tsx +1 -1
  126. package/templates/chat-app/chatjs/plugins/search/search-hook.ts +2 -2
  127. package/templates/chat-app/chatjs/plugins/search/search-queries.ts +13 -13
  128. package/templates/chat-app/chatjs/plugins/search/search-results-view.tsx +2 -2
  129. package/templates/chat-app/chatjs/plugins/search/search-schema.ts +3 -3
  130. package/templates/chat-app/chatjs/plugins/sharing/{chat.ts → chat-server.ts} +3 -1
  131. package/templates/chat-app/chatjs/plugins/sharing/{client-plugin.ts → chat-ui.ts} +1 -1
  132. package/templates/chat-app/chatjs/plugins/sharing/{chatjs.json → plugin.json} +5 -14
  133. package/templates/chat-app/chatjs/plugins/sharing/router.ts +4 -2
  134. package/templates/chat-app/chatjs/plugins/sharing/ui/chat-contributions.tsx +9 -11
  135. package/templates/chat-app/chatjs/plugins/sharing/ui/share-button.tsx +6 -6
  136. package/templates/chat-app/chatjs/plugins/sharing/ui/share-dialog.tsx +9 -9
  137. package/templates/chat-app/chatjs/plugins/spreadsheet-viewer/{client-plugin.ts → chat-ui.ts} +1 -1
  138. package/templates/chat-app/chatjs/plugins/spreadsheet-viewer/plugin.json +12 -0
  139. package/templates/chat-app/chatjs/plugins/streamdown-math/chat-ui.ts +11 -0
  140. package/templates/chat-app/chatjs/plugins/streamdown-math/plugin.json +6 -0
  141. package/templates/chat-app/chatjs/plugins/streamdown-mermaid/chat-ui.ts +10 -0
  142. package/templates/chat-app/chatjs/plugins/streamdown-mermaid/plugin.json +6 -0
  143. package/templates/chat-app/chatjs/plugins/video-viewer/{client-plugin.ts → chat-ui.ts} +1 -1
  144. package/templates/chat-app/chatjs/plugins/video-viewer/plugin.json +10 -0
  145. package/templates/chat-app/chatjs/providers/gateway.ts +49 -55
  146. package/templates/chat-app/chatjs/tools/attach-workspace-file/tool.ts +2 -2
  147. package/templates/chat-app/chatjs/tools/generate-image/tool.test.ts +3 -14
  148. package/templates/chat-app/components/ai-elements/response.tsx +16 -15
  149. package/templates/chat-app/components/auth-form-view.tsx +35 -43
  150. package/templates/chat-app/components/chat/chat-composer.tsx +90 -27
  151. package/templates/chat-app/components/chat/chat-conversation-screen.tsx +3 -3
  152. package/templates/chat-app/components/chat/chat-navigation.tsx +11 -1
  153. package/templates/chat-app/components/chat/chat-sidebar.tsx +8 -9
  154. package/templates/chat-app/components/chat/chat-transcript.tsx +52 -23
  155. package/templates/chat-app/components/chat-slots.tsx +1 -1
  156. package/templates/chat-app/components/composer/composer-menu.tsx +5 -4
  157. package/templates/chat-app/components/composer/prompt-form.tsx +7 -1
  158. package/templates/chat-app/components/eve/eve-chat-error.tsx +12 -2
  159. package/templates/chat-app/components/eve/eve-chat-header.tsx +5 -7
  160. package/templates/chat-app/components/eve/eve-chat-page.tsx +9 -9
  161. package/templates/chat-app/components/eve/eve-composer.tsx +16 -5
  162. package/templates/chat-app/components/eve/eve-conversation.tsx +342 -209
  163. package/templates/chat-app/components/eve/eve-creation-recovery.tsx +53 -3
  164. package/templates/chat-app/components/eve/eve-deletion-provider.tsx +10 -12
  165. package/templates/chat-app/components/eve/eve-history-list.tsx +4 -9
  166. package/templates/chat-app/components/eve/eve-logical-context.tsx +1 -0
  167. package/templates/chat-app/components/eve/eve-logical-navigation.tsx +3 -3
  168. package/templates/chat-app/components/eve/eve-message-content.tsx +252 -0
  169. package/templates/chat-app/components/eve/eve-message-part.tsx +13 -58
  170. package/templates/chat-app/components/eve/eve-pending-input.tsx +82 -5
  171. package/templates/chat-app/components/eve/eve-runtime-provider.tsx +74 -15
  172. package/templates/chat-app/components/eve/use-eve-composer-draft.ts +64 -26
  173. package/templates/chat-app/components/eve/use-eve-fork.ts +14 -16
  174. package/templates/chat-app/components/eve/use-logical-commands.ts +3 -3
  175. package/templates/chat-app/components/eve/use-new-eve-conversation.tsx +42 -7
  176. package/templates/chat-app/components/model-selection-indicator.tsx +12 -10
  177. package/templates/chat-app/components/model-selector-view.tsx +211 -186
  178. package/templates/chat-app/components/new-chat-button.tsx +1 -1
  179. package/templates/chat-app/components/parallel-responses/model-picker.tsx +5 -1
  180. package/templates/chat-app/components/parallel-responses/responses.tsx +2 -2
  181. package/templates/chat-app/components/settings/settings-nav.tsx +1 -1
  182. package/templates/chat-app/components/settings/settings-navigation-link.tsx +1 -0
  183. package/templates/chat-app/components/sidebar-top-row.tsx +1 -1
  184. package/templates/chat-app/components/ui/sidebar.tsx +1 -1
  185. package/templates/chat-app/components/ui/trace.tsx +1 -1
  186. package/templates/chat-app/hooks/use-auto-focus.ts +12 -13
  187. package/templates/chat-app/integrations/routers.ts +1 -1
  188. package/templates/chat-app/lib/ai/active-gateway.ts +0 -9
  189. package/templates/chat-app/lib/ai/app-models.test.ts +0 -4
  190. package/templates/chat-app/lib/ai/app-models.ts +11 -6
  191. package/templates/chat-app/lib/ai/gateways/registry.ts +4 -31
  192. package/templates/chat-app/lib/ai/model-catalog.ts +50 -0
  193. package/templates/chat-app/lib/ai/models.ts +4 -39
  194. package/templates/chat-app/lib/ai/providers.ts +2 -16
  195. package/templates/chat-app/lib/chat-after-create.test.ts +1 -1
  196. package/templates/chat-app/lib/chat-after-create.ts +1 -1
  197. package/templates/chat-app/lib/config-schema.ts +0 -96
  198. package/templates/chat-app/lib/db/eve-creation-failure.ts +3 -3
  199. package/templates/chat-app/lib/db/eve-current-copy.ts +11 -11
  200. package/templates/chat-app/lib/db/eve-deletion.ts +19 -19
  201. package/templates/chat-app/lib/db/eve-dispatch.ts +115 -18
  202. package/templates/chat-app/lib/db/eve-file-purge.ts +4 -4
  203. package/templates/chat-app/lib/db/eve-files.ts +13 -13
  204. package/templates/chat-app/lib/db/eve-queries.ts +28 -43
  205. package/templates/chat-app/lib/db/eve-response-groups.ts +30 -112
  206. package/templates/chat-app/lib/db/eve-subagents.ts +8 -8
  207. package/templates/chat-app/lib/db/eve-title.ts +2 -2
  208. package/templates/chat-app/lib/db/eve-workspace-deletion.ts +3 -3
  209. package/templates/chat-app/lib/db/eve-workspace-turns.ts +37 -5
  210. package/templates/chat-app/lib/db/eve-workspaces.ts +3 -3
  211. package/templates/chat-app/lib/db/migrations/0029_branch_identifiers.sql +23 -0
  212. package/templates/chat-app/lib/db/migrations/meta/0029_snapshot.json +2547 -0
  213. package/templates/chat-app/lib/db/migrations/meta/_journal.json +7 -0
  214. package/templates/chat-app/lib/db/schema.ts +19 -25
  215. package/templates/chat-app/lib/devtools-disabled.ts +1 -0
  216. package/templates/chat-app/lib/eve/completed-copy-source.test.ts +12 -2
  217. package/templates/chat-app/lib/eve/completed-copy-source.ts +5 -2
  218. package/templates/chat-app/lib/eve/contracts.test.ts +5 -5
  219. package/templates/chat-app/lib/eve/contracts.ts +1 -1
  220. package/templates/chat-app/lib/eve/conversation-scope.test.ts +2 -2
  221. package/templates/chat-app/lib/eve/conversation-scope.ts +4 -4
  222. package/templates/chat-app/lib/eve/create-conversation-operation.test.ts +1 -1
  223. package/templates/chat-app/lib/eve/create-response-group.test.ts +3 -3
  224. package/templates/chat-app/lib/eve/delete-local-conversation.ts +3 -3
  225. package/templates/chat-app/lib/eve/generated-files.test.ts +1 -1
  226. package/templates/chat-app/lib/eve/generated-files.ts +2 -2
  227. package/templates/chat-app/lib/eve/logical-chat.test.ts +17 -17
  228. package/templates/chat-app/lib/eve/logical-chat.ts +27 -31
  229. package/templates/chat-app/lib/eve/logical-response-slots.ts +4 -7
  230. package/templates/chat-app/lib/eve/message-delivery.ts +1 -0
  231. package/templates/chat-app/lib/eve/model-selection.test.ts +47 -50
  232. package/templates/chat-app/lib/eve/model-selection.ts +5 -37
  233. package/templates/chat-app/lib/eve/pending-create.test.ts +46 -7
  234. package/templates/chat-app/lib/eve/pending-create.ts +36 -4
  235. package/templates/chat-app/lib/eve/persisted-wire-order.test.ts +2 -2
  236. package/templates/chat-app/lib/eve/prepare-deletion.ts +3 -3
  237. package/templates/chat-app/lib/eve/purge-local-resources.ts +3 -3
  238. package/templates/chat-app/lib/eve/reconcile-workspace-turn.ts +2 -2
  239. package/templates/chat-app/lib/eve/request-policy.ts +1 -0
  240. package/templates/chat-app/lib/eve/resolve-creation-request.ts +1 -1
  241. package/templates/chat-app/lib/eve/response-group-contracts.ts +1 -1
  242. package/templates/chat-app/lib/eve/response-group-lineage.test.ts +12 -12
  243. package/templates/chat-app/lib/eve/response-group-lineage.ts +21 -24
  244. package/templates/chat-app/lib/eve/response-group.test.ts +2 -2
  245. package/templates/chat-app/lib/eve/response-group.ts +1 -1
  246. package/templates/chat-app/lib/eve/response-model.ts +11 -1
  247. package/templates/chat-app/lib/eve/restore-message-attachments.test.ts +1 -1
  248. package/templates/chat-app/lib/eve/restore-message-attachments.ts +3 -3
  249. package/templates/chat-app/lib/eve/retire-session.ts +3 -3
  250. package/templates/chat-app/lib/eve/steer-rejected.ts +7 -0
  251. package/templates/chat-app/lib/eve/tool-cost.test.ts +18 -6
  252. package/templates/chat-app/lib/eve/tool-cost.ts +10 -18
  253. package/templates/chat-app/lib/eve/workspace-turn-evidence.test.ts +27 -0
  254. package/templates/chat-app/lib/eve/workspace-turn-evidence.ts +20 -13
  255. package/templates/chat-app/oxfmt.config.ts +0 -2
  256. package/templates/chat-app/package.json +7 -9
  257. package/templates/chat-app/playwright.config.ts +5 -1
  258. package/templates/chat-app/proxy.ts +2 -4
  259. package/templates/chat-app/scripts/agent-status.ts +6 -19
  260. package/templates/chat-app/scripts/build-eve.test.ts +56 -0
  261. package/templates/chat-app/scripts/build-eve.ts +12 -5
  262. package/templates/chat-app/scripts/check-env.ts +77 -73
  263. package/templates/chat-app/scripts/environment-validation-report.ts +1 -20
  264. package/templates/chat-app/scripts/installed-environment-validation.ts +14 -15
  265. package/templates/chat-app/trpc/init.ts +2 -0
  266. package/templates/chat-app/trpc/react.tsx +2 -2
  267. package/templates/chat-app/trpc/routers/_app.test.ts +56 -0
  268. package/templates/chat-app/trpc/routers/_app.ts +12 -11
  269. package/templates/chat-app/trpc/routers/eve.router.ts +2 -2
  270. package/templates/electron/forge.config.ts +1 -19
  271. package/templates/electron/scripts/write-branding.ts +1 -5
  272. package/templates/chat-app/app/privacy/page.tsx +0 -153
  273. package/templates/chat-app/app/terms/page.tsx +0 -270
  274. package/templates/chat-app/chatjs/core/installation/plugin.ts +0 -13
  275. package/templates/chat-app/chatjs/plugins/attachment-uploads/chatjs.json +0 -22
  276. package/templates/chat-app/chatjs/plugins/credits/server-plugin.ts +0 -5
  277. package/templates/chat-app/chatjs/plugins/feedback/chat.ts +0 -13
  278. package/templates/chat-app/chatjs/plugins/feedback/server-plugin.ts +0 -8
  279. package/templates/chat-app/chatjs/plugins/followup-suggestions/server-plugin.ts +0 -8
  280. package/templates/chat-app/chatjs/plugins/guest-chat/server-plugin.ts +0 -12
  281. package/templates/chat-app/chatjs/plugins/image-viewer/chatjs.json +0 -17
  282. package/templates/chat-app/chatjs/plugins/mcp/server-plugin.ts +0 -5
  283. package/templates/chat-app/chatjs/plugins/model-preferences/server-plugin.ts +0 -8
  284. package/templates/chat-app/chatjs/plugins/projects/server-plugin.ts +0 -8
  285. package/templates/chat-app/chatjs/plugins/search/server-plugin.ts +0 -5
  286. package/templates/chat-app/chatjs/plugins/sharing/server-plugin.ts +0 -5
  287. package/templates/chat-app/chatjs/plugins/spreadsheet-viewer/chatjs.json +0 -18
  288. package/templates/chat-app/chatjs/plugins/video-viewer/chatjs.json +0 -16
  289. package/templates/chat-app/components/ai-elements/context-hover.radix.tsx +0 -15
  290. package/templates/chat-app/components/ai-elements/context-hover.tsx +0 -17
  291. package/templates/chat-app/components/ai-elements/context.tsx +0 -405
  292. package/templates/chat-app/components/composer/editor.css +0 -96
  293. package/templates/chat-app/components/lexical-chat-input.tsx +0 -276
  294. package/templates/chat-app/components/model-selection-indicator.radix.tsx +0 -17
  295. package/templates/chat-app/components/ui/resizable.tsx +0 -49
  296. package/templates/chat-app/lib/ai/gateways/fallback-models.ts +0 -29
  297. package/templates/chat-app/lib/ai/models.generated.ts +0 -4242
  298. package/templates/chat-app/lib/ai/usage-token-details.test.ts +0 -76
  299. package/templates/chat-app/lib/ai/usage-token-details.ts +0 -33
  300. package/templates/chat-app/lib/chat-route.ts +0 -18
  301. package/templates/chat-app/providers/parse-chat-id-from-pathname.test.ts +0 -126
  302. package/templates/chat-app/providers/parse-chat-id-from-pathname.ts +0 -51
  303. package/templates/chat-app/scripts/fetch-models.ts +0 -30
  304. package/templates/chat-app/scripts/gateway-snapshot-warning.test.ts +0 -9
  305. /package/templates/chat-app/chatjs/plugins/attachment-uploads/{integration.tsx → uploads.ts} +0 -0
@@ -0,0 +1,2547 @@
1
+ {
2
+ "id": "a8b5ed30-ff3a-4a9c-956f-015a88f4b734",
3
+ "prevId": "fead720d-0704-4da9-9736-d4ffc66e51ec",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.account": {
8
+ "name": "account",
9
+ "schema": "",
10
+ "columns": {
11
+ "access_token": {
12
+ "name": "access_token",
13
+ "type": "text",
14
+ "primaryKey": false,
15
+ "notNull": false
16
+ },
17
+ "access_token_expires_at": {
18
+ "name": "access_token_expires_at",
19
+ "type": "timestamp",
20
+ "primaryKey": false,
21
+ "notNull": false
22
+ },
23
+ "account_id": {
24
+ "name": "account_id",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "created_at": {
30
+ "name": "created_at",
31
+ "type": "timestamp",
32
+ "primaryKey": false,
33
+ "notNull": true,
34
+ "default": "now()"
35
+ },
36
+ "id": {
37
+ "name": "id",
38
+ "type": "text",
39
+ "primaryKey": true,
40
+ "notNull": true
41
+ },
42
+ "id_token": {
43
+ "name": "id_token",
44
+ "type": "text",
45
+ "primaryKey": false,
46
+ "notNull": false
47
+ },
48
+ "password": {
49
+ "name": "password",
50
+ "type": "text",
51
+ "primaryKey": false,
52
+ "notNull": false
53
+ },
54
+ "provider_id": {
55
+ "name": "provider_id",
56
+ "type": "text",
57
+ "primaryKey": false,
58
+ "notNull": true
59
+ },
60
+ "refresh_token": {
61
+ "name": "refresh_token",
62
+ "type": "text",
63
+ "primaryKey": false,
64
+ "notNull": false
65
+ },
66
+ "refresh_token_expires_at": {
67
+ "name": "refresh_token_expires_at",
68
+ "type": "timestamp",
69
+ "primaryKey": false,
70
+ "notNull": false
71
+ },
72
+ "scope": {
73
+ "name": "scope",
74
+ "type": "text",
75
+ "primaryKey": false,
76
+ "notNull": false
77
+ },
78
+ "updated_at": {
79
+ "name": "updated_at",
80
+ "type": "timestamp",
81
+ "primaryKey": false,
82
+ "notNull": true
83
+ },
84
+ "user_id": {
85
+ "name": "user_id",
86
+ "type": "text",
87
+ "primaryKey": false,
88
+ "notNull": true
89
+ }
90
+ },
91
+ "indexes": {},
92
+ "foreignKeys": {
93
+ "account_user_id_user_id_fk": {
94
+ "name": "account_user_id_user_id_fk",
95
+ "tableFrom": "account",
96
+ "tableTo": "user",
97
+ "columnsFrom": [
98
+ "user_id"
99
+ ],
100
+ "columnsTo": [
101
+ "id"
102
+ ],
103
+ "onDelete": "cascade",
104
+ "onUpdate": "no action"
105
+ }
106
+ },
107
+ "compositePrimaryKeys": {},
108
+ "uniqueConstraints": {},
109
+ "policies": {},
110
+ "checkConstraints": {},
111
+ "isRLSEnabled": false
112
+ },
113
+ "public.EveChat": {
114
+ "name": "EveChat",
115
+ "schema": "",
116
+ "columns": {
117
+ "activeBranchId": {
118
+ "name": "activeBranchId",
119
+ "type": "uuid",
120
+ "primaryKey": false,
121
+ "notNull": false
122
+ },
123
+ "createdAt": {
124
+ "name": "createdAt",
125
+ "type": "timestamp",
126
+ "primaryKey": false,
127
+ "notNull": true,
128
+ "default": "now()"
129
+ },
130
+ "id": {
131
+ "name": "id",
132
+ "type": "uuid",
133
+ "primaryKey": true,
134
+ "notNull": true,
135
+ "default": "gen_random_uuid()"
136
+ },
137
+ "isPinned": {
138
+ "name": "isPinned",
139
+ "type": "boolean",
140
+ "primaryKey": false,
141
+ "notNull": true,
142
+ "default": false
143
+ },
144
+ "ownerId": {
145
+ "name": "ownerId",
146
+ "type": "text",
147
+ "primaryKey": false,
148
+ "notNull": true
149
+ },
150
+ "title": {
151
+ "name": "title",
152
+ "type": "text",
153
+ "primaryKey": false,
154
+ "notNull": true
155
+ },
156
+ "titleStatus": {
157
+ "name": "titleStatus",
158
+ "type": "text",
159
+ "primaryKey": false,
160
+ "notNull": true,
161
+ "default": "'pending'"
162
+ },
163
+ "updatedAt": {
164
+ "name": "updatedAt",
165
+ "type": "timestamp",
166
+ "primaryKey": false,
167
+ "notNull": true,
168
+ "default": "now()"
169
+ }
170
+ },
171
+ "indexes": {
172
+ "EveChat_search_title": {
173
+ "name": "EveChat_search_title",
174
+ "columns": [
175
+ {
176
+ "expression": "to_tsvector('simple', \"title\")",
177
+ "asc": true,
178
+ "isExpression": true,
179
+ "nulls": "last"
180
+ }
181
+ ],
182
+ "isUnique": false,
183
+ "concurrently": false,
184
+ "method": "gin",
185
+ "with": {}
186
+ },
187
+ "EveChat_owner_activity": {
188
+ "name": "EveChat_owner_activity",
189
+ "columns": [
190
+ {
191
+ "expression": "ownerId",
192
+ "isExpression": false,
193
+ "asc": true,
194
+ "nulls": "last"
195
+ },
196
+ {
197
+ "expression": "isPinned",
198
+ "isExpression": false,
199
+ "asc": true,
200
+ "nulls": "last"
201
+ },
202
+ {
203
+ "expression": "updatedAt",
204
+ "isExpression": false,
205
+ "asc": true,
206
+ "nulls": "last"
207
+ }
208
+ ],
209
+ "isUnique": false,
210
+ "concurrently": false,
211
+ "method": "btree",
212
+ "with": {}
213
+ }
214
+ },
215
+ "foreignKeys": {
216
+ "EveChat_ownerId_user_id_fk": {
217
+ "name": "EveChat_ownerId_user_id_fk",
218
+ "tableFrom": "EveChat",
219
+ "tableTo": "user",
220
+ "columnsFrom": [
221
+ "ownerId"
222
+ ],
223
+ "columnsTo": [
224
+ "id"
225
+ ],
226
+ "onDelete": "cascade",
227
+ "onUpdate": "no action"
228
+ }
229
+ },
230
+ "compositePrimaryKeys": {},
231
+ "uniqueConstraints": {
232
+ "EveChat_id_owner": {
233
+ "name": "EveChat_id_owner",
234
+ "nullsNotDistinct": false,
235
+ "columns": [
236
+ "id",
237
+ "ownerId"
238
+ ]
239
+ }
240
+ },
241
+ "policies": {},
242
+ "checkConstraints": {
243
+ "EveChat_title_status": {
244
+ "name": "EveChat_title_status",
245
+ "value": "\"EveChat\".\"titleStatus\" in ('pending', 'fallback', 'generated', 'manual')"
246
+ }
247
+ },
248
+ "isRLSEnabled": false
249
+ },
250
+ "public.EveConversation": {
251
+ "name": "EveConversation",
252
+ "schema": "",
253
+ "columns": {
254
+ "chatId": {
255
+ "name": "chatId",
256
+ "type": "uuid",
257
+ "primaryKey": false,
258
+ "notNull": true
259
+ },
260
+ "workspaceId": {
261
+ "name": "workspaceId",
262
+ "type": "uuid",
263
+ "primaryKey": false,
264
+ "notNull": true
265
+ },
266
+ "createdAt": {
267
+ "name": "createdAt",
268
+ "type": "timestamp",
269
+ "primaryKey": false,
270
+ "notNull": true,
271
+ "default": "now()"
272
+ },
273
+ "creationKind": {
274
+ "name": "creationKind",
275
+ "type": "text",
276
+ "primaryKey": false,
277
+ "notNull": true,
278
+ "default": "'message'"
279
+ },
280
+ "firstMessage": {
281
+ "name": "firstMessage",
282
+ "type": "text",
283
+ "primaryKey": false,
284
+ "notNull": true
285
+ },
286
+ "forkCheckpointId": {
287
+ "name": "forkCheckpointId",
288
+ "type": "uuid",
289
+ "primaryKey": false,
290
+ "notNull": false
291
+ },
292
+ "forkKind": {
293
+ "name": "forkKind",
294
+ "type": "text",
295
+ "primaryKey": false,
296
+ "notNull": false
297
+ },
298
+ "forkMessageId": {
299
+ "name": "forkMessageId",
300
+ "type": "text",
301
+ "primaryKey": false,
302
+ "notNull": false
303
+ },
304
+ "forkTurnId": {
305
+ "name": "forkTurnId",
306
+ "type": "text",
307
+ "primaryKey": false,
308
+ "notNull": false
309
+ },
310
+ "id": {
311
+ "name": "id",
312
+ "type": "uuid",
313
+ "primaryKey": true,
314
+ "notNull": true,
315
+ "default": "gen_random_uuid()"
316
+ },
317
+ "initialContentHash": {
318
+ "name": "initialContentHash",
319
+ "type": "text",
320
+ "primaryKey": false,
321
+ "notNull": false
322
+ },
323
+ "initialModelId": {
324
+ "name": "initialModelId",
325
+ "type": "text",
326
+ "primaryKey": false,
327
+ "notNull": false
328
+ },
329
+ "initialRequest": {
330
+ "name": "initialRequest",
331
+ "type": "jsonb",
332
+ "primaryKey": false,
333
+ "notNull": false
334
+ },
335
+ "initialSeed": {
336
+ "name": "initialSeed",
337
+ "type": "jsonb",
338
+ "primaryKey": false,
339
+ "notNull": false
340
+ },
341
+ "operationId": {
342
+ "name": "operationId",
343
+ "type": "uuid",
344
+ "primaryKey": false,
345
+ "notNull": true
346
+ },
347
+ "ownerId": {
348
+ "name": "ownerId",
349
+ "type": "text",
350
+ "primaryKey": false,
351
+ "notNull": true
352
+ },
353
+ "parentBranchId": {
354
+ "name": "parentBranchId",
355
+ "type": "uuid",
356
+ "primaryKey": false,
357
+ "notNull": false
358
+ },
359
+ "rootBranchId": {
360
+ "name": "rootBranchId",
361
+ "type": "uuid",
362
+ "primaryKey": false,
363
+ "notNull": false
364
+ },
365
+ "sessionId": {
366
+ "name": "sessionId",
367
+ "type": "text",
368
+ "primaryKey": false,
369
+ "notNull": false
370
+ },
371
+ "state": {
372
+ "name": "state",
373
+ "type": "text",
374
+ "primaryKey": false,
375
+ "notNull": true,
376
+ "default": "'creating'"
377
+ },
378
+ "usageStreamIndex": {
379
+ "name": "usageStreamIndex",
380
+ "type": "integer",
381
+ "primaryKey": false,
382
+ "notNull": true,
383
+ "default": 0
384
+ },
385
+ "visibility": {
386
+ "name": "visibility",
387
+ "type": "varchar",
388
+ "primaryKey": false,
389
+ "notNull": true,
390
+ "default": "'private'"
391
+ }
392
+ },
393
+ "indexes": {
394
+ "EveConversation_owner_chat": {
395
+ "name": "EveConversation_owner_chat",
396
+ "columns": [
397
+ {
398
+ "expression": "ownerId",
399
+ "isExpression": false,
400
+ "asc": true,
401
+ "nulls": "last"
402
+ },
403
+ {
404
+ "expression": "chatId",
405
+ "isExpression": false,
406
+ "asc": true,
407
+ "nulls": "last"
408
+ }
409
+ ],
410
+ "isUnique": false,
411
+ "concurrently": false,
412
+ "method": "btree",
413
+ "with": {}
414
+ },
415
+ "EveConversation_workspace": {
416
+ "name": "EveConversation_workspace",
417
+ "columns": [
418
+ {
419
+ "expression": "workspaceId",
420
+ "isExpression": false,
421
+ "asc": true,
422
+ "nulls": "last"
423
+ }
424
+ ],
425
+ "isUnique": false,
426
+ "concurrently": false,
427
+ "method": "btree",
428
+ "with": {}
429
+ },
430
+ "EveConversation_owner_root": {
431
+ "name": "EveConversation_owner_root",
432
+ "columns": [
433
+ {
434
+ "expression": "ownerId",
435
+ "isExpression": false,
436
+ "asc": true,
437
+ "nulls": "last"
438
+ },
439
+ {
440
+ "expression": "rootBranchId",
441
+ "isExpression": false,
442
+ "asc": true,
443
+ "nulls": "last"
444
+ }
445
+ ],
446
+ "isUnique": false,
447
+ "concurrently": false,
448
+ "method": "btree",
449
+ "with": {}
450
+ },
451
+ "EveConversation_owner_operation": {
452
+ "name": "EveConversation_owner_operation",
453
+ "columns": [
454
+ {
455
+ "expression": "ownerId",
456
+ "isExpression": false,
457
+ "asc": true,
458
+ "nulls": "last"
459
+ },
460
+ {
461
+ "expression": "operationId",
462
+ "isExpression": false,
463
+ "asc": true,
464
+ "nulls": "last"
465
+ }
466
+ ],
467
+ "isUnique": true,
468
+ "concurrently": false,
469
+ "method": "btree",
470
+ "with": {}
471
+ }
472
+ },
473
+ "foreignKeys": {
474
+ "EveConversation_ownerId_user_id_fk": {
475
+ "name": "EveConversation_ownerId_user_id_fk",
476
+ "tableFrom": "EveConversation",
477
+ "tableTo": "user",
478
+ "columnsFrom": [
479
+ "ownerId"
480
+ ],
481
+ "columnsTo": [
482
+ "id"
483
+ ],
484
+ "onDelete": "no action",
485
+ "onUpdate": "no action"
486
+ },
487
+ "EveConversation_workspace_owner_fk": {
488
+ "name": "EveConversation_workspace_owner_fk",
489
+ "tableFrom": "EveConversation",
490
+ "tableTo": "EveWorkspace",
491
+ "columnsFrom": [
492
+ "workspaceId",
493
+ "ownerId"
494
+ ],
495
+ "columnsTo": [
496
+ "id",
497
+ "ownerId"
498
+ ],
499
+ "onDelete": "no action",
500
+ "onUpdate": "no action"
501
+ },
502
+ "EveConversation_chat_owner_fk": {
503
+ "name": "EveConversation_chat_owner_fk",
504
+ "tableFrom": "EveConversation",
505
+ "tableTo": "EveChat",
506
+ "columnsFrom": [
507
+ "chatId",
508
+ "ownerId"
509
+ ],
510
+ "columnsTo": [
511
+ "id",
512
+ "ownerId"
513
+ ],
514
+ "onDelete": "no action",
515
+ "onUpdate": "no action"
516
+ },
517
+ "EveConversation_parent_owner_fk": {
518
+ "name": "EveConversation_parent_owner_fk",
519
+ "tableFrom": "EveConversation",
520
+ "tableTo": "EveConversation",
521
+ "columnsFrom": [
522
+ "parentBranchId",
523
+ "ownerId",
524
+ "chatId"
525
+ ],
526
+ "columnsTo": [
527
+ "id",
528
+ "ownerId",
529
+ "chatId"
530
+ ],
531
+ "onDelete": "no action",
532
+ "onUpdate": "no action"
533
+ },
534
+ "EveConversation_root_owner_fk": {
535
+ "name": "EveConversation_root_owner_fk",
536
+ "tableFrom": "EveConversation",
537
+ "tableTo": "EveConversation",
538
+ "columnsFrom": [
539
+ "rootBranchId",
540
+ "ownerId",
541
+ "chatId"
542
+ ],
543
+ "columnsTo": [
544
+ "id",
545
+ "ownerId",
546
+ "chatId"
547
+ ],
548
+ "onDelete": "no action",
549
+ "onUpdate": "no action"
550
+ }
551
+ },
552
+ "compositePrimaryKeys": {},
553
+ "uniqueConstraints": {
554
+ "EveConversation_sessionId_unique": {
555
+ "name": "EveConversation_sessionId_unique",
556
+ "nullsNotDistinct": false,
557
+ "columns": [
558
+ "sessionId"
559
+ ]
560
+ },
561
+ "EveConversation_id_owner": {
562
+ "name": "EveConversation_id_owner",
563
+ "nullsNotDistinct": false,
564
+ "columns": [
565
+ "id",
566
+ "ownerId"
567
+ ]
568
+ },
569
+ "EveConversation_id_owner_chat": {
570
+ "name": "EveConversation_id_owner_chat",
571
+ "nullsNotDistinct": false,
572
+ "columns": [
573
+ "id",
574
+ "ownerId",
575
+ "chatId"
576
+ ]
577
+ }
578
+ },
579
+ "policies": {},
580
+ "checkConstraints": {
581
+ "EveConversation_creation_kind": {
582
+ "name": "EveConversation_creation_kind",
583
+ "value": "\"EveConversation\".\"creationKind\" in ('message', 'copy')"
584
+ },
585
+ "EveConversation_named_fork_shape": {
586
+ "name": "EveConversation_named_fork_shape",
587
+ "value": "\"EveConversation\".\"forkCheckpointId\" is null or (\n \"EveConversation\".\"parentBranchId\" is not null and \"EveConversation\".\"forkMessageId\" is null\n )"
588
+ },
589
+ "EveConversation_fork_shape": {
590
+ "name": "EveConversation_fork_shape",
591
+ "value": "(\n \"EveConversation\".\"parentBranchId\" is null and \"EveConversation\".\"rootBranchId\" is null and\n \"EveConversation\".\"forkTurnId\" is null and \"EveConversation\".\"forkMessageId\" is null and \"EveConversation\".\"forkKind\" is null\n ) or (\n \"EveConversation\".\"parentBranchId\" is not null and \"EveConversation\".\"rootBranchId\" is not null and\n (\n (\"EveConversation\".\"forkTurnId\" is null and \"EveConversation\".\"forkMessageId\" is null) or\n (\"EveConversation\".\"forkTurnId\" is not null and \"EveConversation\".\"forkTurnId\" ~ '^turn_(0|[1-9][0-9]*)$' and \"EveConversation\".\"forkMessageId\" is null) or\n (\"EveConversation\".\"forkMessageId\" is not null and length(\"EveConversation\".\"forkMessageId\") between 1 and 512 and \"EveConversation\".\"forkTurnId\" is null)\n ) and\n \"EveConversation\".\"parentBranchId\" <> \"EveConversation\".\"id\" and \"EveConversation\".\"rootBranchId\" <> \"EveConversation\".\"id\"\n )"
592
+ },
593
+ "EveConversation_fork_kind": {
594
+ "name": "EveConversation_fork_kind",
595
+ "value": "\"EveConversation\".\"forkKind\" is null or \"EveConversation\".\"forkKind\" in ('edit', 'regenerate', 'comparison')"
596
+ }
597
+ },
598
+ "isRLSEnabled": false
599
+ },
600
+ "public.EveDispatch": {
601
+ "name": "EveDispatch",
602
+ "schema": "",
603
+ "columns": {
604
+ "ownerId": {
605
+ "name": "ownerId",
606
+ "type": "text",
607
+ "primaryKey": false,
608
+ "notNull": true
609
+ },
610
+ "operationId": {
611
+ "name": "operationId",
612
+ "type": "uuid",
613
+ "primaryKey": false,
614
+ "notNull": true
615
+ },
616
+ "branchId": {
617
+ "name": "branchId",
618
+ "type": "uuid",
619
+ "primaryKey": false,
620
+ "notNull": true
621
+ },
622
+ "kind": {
623
+ "name": "kind",
624
+ "type": "text",
625
+ "primaryKey": false,
626
+ "notNull": true
627
+ },
628
+ "intent": {
629
+ "name": "intent",
630
+ "type": "jsonb",
631
+ "primaryKey": false,
632
+ "notNull": true
633
+ },
634
+ "sessionId": {
635
+ "name": "sessionId",
636
+ "type": "text",
637
+ "primaryKey": false,
638
+ "notNull": false
639
+ },
640
+ "deliveryId": {
641
+ "name": "deliveryId",
642
+ "type": "text",
643
+ "primaryKey": false,
644
+ "notNull": false
645
+ },
646
+ "createdAt": {
647
+ "name": "createdAt",
648
+ "type": "timestamp",
649
+ "primaryKey": false,
650
+ "notNull": true,
651
+ "default": "now()"
652
+ }
653
+ },
654
+ "indexes": {},
655
+ "foreignKeys": {
656
+ "EveDispatch_ownerId_user_id_fk": {
657
+ "name": "EveDispatch_ownerId_user_id_fk",
658
+ "tableFrom": "EveDispatch",
659
+ "tableTo": "user",
660
+ "columnsFrom": [
661
+ "ownerId"
662
+ ],
663
+ "columnsTo": [
664
+ "id"
665
+ ],
666
+ "onDelete": "no action",
667
+ "onUpdate": "no action"
668
+ },
669
+ "EveDispatch_conversation_owner_fk": {
670
+ "name": "EveDispatch_conversation_owner_fk",
671
+ "tableFrom": "EveDispatch",
672
+ "tableTo": "EveConversation",
673
+ "columnsFrom": [
674
+ "branchId",
675
+ "ownerId"
676
+ ],
677
+ "columnsTo": [
678
+ "id",
679
+ "ownerId"
680
+ ],
681
+ "onDelete": "no action",
682
+ "onUpdate": "no action"
683
+ }
684
+ },
685
+ "compositePrimaryKeys": {
686
+ "EveDispatch_ownerId_operationId_pk": {
687
+ "name": "EveDispatch_ownerId_operationId_pk",
688
+ "columns": [
689
+ "ownerId",
690
+ "operationId"
691
+ ]
692
+ }
693
+ },
694
+ "uniqueConstraints": {},
695
+ "policies": {},
696
+ "checkConstraints": {
697
+ "EveDispatch_kind": {
698
+ "name": "EveDispatch_kind",
699
+ "value": "\"EveDispatch\".\"kind\" in ('create', 'copy', 'send')"
700
+ },
701
+ "EveDispatch_binding": {
702
+ "name": "EveDispatch_binding",
703
+ "value": "\"EveDispatch\".\"deliveryId\" is null or \"EveDispatch\".\"sessionId\" is not null"
704
+ }
705
+ },
706
+ "isRLSEnabled": false
707
+ },
708
+ "public.EveFileReference": {
709
+ "name": "EveFileReference",
710
+ "schema": "",
711
+ "columns": {
712
+ "branchId": {
713
+ "name": "branchId",
714
+ "type": "uuid",
715
+ "primaryKey": false,
716
+ "notNull": true
717
+ },
718
+ "key": {
719
+ "name": "key",
720
+ "type": "text",
721
+ "primaryKey": false,
722
+ "notNull": true
723
+ },
724
+ "ownerId": {
725
+ "name": "ownerId",
726
+ "type": "text",
727
+ "primaryKey": false,
728
+ "notNull": true
729
+ }
730
+ },
731
+ "indexes": {
732
+ "EveFileReference_key": {
733
+ "name": "EveFileReference_key",
734
+ "columns": [
735
+ {
736
+ "expression": "key",
737
+ "isExpression": false,
738
+ "asc": true,
739
+ "nulls": "last"
740
+ }
741
+ ],
742
+ "isUnique": false,
743
+ "concurrently": false,
744
+ "method": "btree",
745
+ "with": {}
746
+ }
747
+ },
748
+ "foreignKeys": {
749
+ "EveFileReference_branchId_ownerId_EveConversation_id_ownerId_fk": {
750
+ "name": "EveFileReference_branchId_ownerId_EveConversation_id_ownerId_fk",
751
+ "tableFrom": "EveFileReference",
752
+ "tableTo": "EveConversation",
753
+ "columnsFrom": [
754
+ "branchId",
755
+ "ownerId"
756
+ ],
757
+ "columnsTo": [
758
+ "id",
759
+ "ownerId"
760
+ ],
761
+ "onDelete": "no action",
762
+ "onUpdate": "no action"
763
+ },
764
+ "EveFileReference_key_ownerId_EveStoredFile_key_ownerId_fk": {
765
+ "name": "EveFileReference_key_ownerId_EveStoredFile_key_ownerId_fk",
766
+ "tableFrom": "EveFileReference",
767
+ "tableTo": "EveStoredFile",
768
+ "columnsFrom": [
769
+ "key",
770
+ "ownerId"
771
+ ],
772
+ "columnsTo": [
773
+ "key",
774
+ "ownerId"
775
+ ],
776
+ "onDelete": "no action",
777
+ "onUpdate": "no action"
778
+ }
779
+ },
780
+ "compositePrimaryKeys": {
781
+ "EveFileReference_branchId_key_pk": {
782
+ "name": "EveFileReference_branchId_key_pk",
783
+ "columns": [
784
+ "branchId",
785
+ "key"
786
+ ]
787
+ }
788
+ },
789
+ "uniqueConstraints": {},
790
+ "policies": {},
791
+ "checkConstraints": {},
792
+ "isRLSEnabled": false
793
+ },
794
+ "public.EveResponseGroup": {
795
+ "name": "EveResponseGroup",
796
+ "schema": "",
797
+ "columns": {
798
+ "candidateOperationIds": {
799
+ "name": "candidateOperationIds",
800
+ "type": "uuid[]",
801
+ "primaryKey": false,
802
+ "notNull": true
803
+ },
804
+ "candidates": {
805
+ "name": "candidates",
806
+ "type": "jsonb",
807
+ "primaryKey": false,
808
+ "notNull": false
809
+ },
810
+ "createdAt": {
811
+ "name": "createdAt",
812
+ "type": "timestamp",
813
+ "primaryKey": false,
814
+ "notNull": true,
815
+ "default": "now()"
816
+ },
817
+ "deleted": {
818
+ "name": "deleted",
819
+ "type": "boolean",
820
+ "primaryKey": false,
821
+ "notNull": true,
822
+ "default": false
823
+ },
824
+ "id": {
825
+ "name": "id",
826
+ "type": "uuid",
827
+ "primaryKey": true,
828
+ "notNull": true,
829
+ "default": "gen_random_uuid()"
830
+ },
831
+ "inputHash": {
832
+ "name": "inputHash",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": false
836
+ },
837
+ "operationId": {
838
+ "name": "operationId",
839
+ "type": "uuid",
840
+ "primaryKey": false,
841
+ "notNull": true
842
+ },
843
+ "ownerId": {
844
+ "name": "ownerId",
845
+ "type": "text",
846
+ "primaryKey": false,
847
+ "notNull": true
848
+ },
849
+ "sourceBranchId": {
850
+ "name": "sourceBranchId",
851
+ "type": "uuid",
852
+ "primaryKey": false,
853
+ "notNull": false
854
+ }
855
+ },
856
+ "indexes": {
857
+ "EveResponseGroup_owner_operation": {
858
+ "name": "EveResponseGroup_owner_operation",
859
+ "columns": [
860
+ {
861
+ "expression": "ownerId",
862
+ "isExpression": false,
863
+ "asc": true,
864
+ "nulls": "last"
865
+ },
866
+ {
867
+ "expression": "operationId",
868
+ "isExpression": false,
869
+ "asc": true,
870
+ "nulls": "last"
871
+ }
872
+ ],
873
+ "isUnique": true,
874
+ "concurrently": false,
875
+ "method": "btree",
876
+ "with": {}
877
+ }
878
+ },
879
+ "foreignKeys": {
880
+ "EveResponseGroup_ownerId_user_id_fk": {
881
+ "name": "EveResponseGroup_ownerId_user_id_fk",
882
+ "tableFrom": "EveResponseGroup",
883
+ "tableTo": "user",
884
+ "columnsFrom": [
885
+ "ownerId"
886
+ ],
887
+ "columnsTo": [
888
+ "id"
889
+ ],
890
+ "onDelete": "no action",
891
+ "onUpdate": "no action"
892
+ }
893
+ },
894
+ "compositePrimaryKeys": {},
895
+ "uniqueConstraints": {},
896
+ "policies": {},
897
+ "checkConstraints": {},
898
+ "isRLSEnabled": false
899
+ },
900
+ "public.EveStoredFile": {
901
+ "name": "EveStoredFile",
902
+ "schema": "",
903
+ "columns": {
904
+ "createdAt": {
905
+ "name": "createdAt",
906
+ "type": "timestamp",
907
+ "primaryKey": false,
908
+ "notNull": true,
909
+ "default": "now()"
910
+ },
911
+ "key": {
912
+ "name": "key",
913
+ "type": "text",
914
+ "primaryKey": true,
915
+ "notNull": true
916
+ },
917
+ "ownerId": {
918
+ "name": "ownerId",
919
+ "type": "text",
920
+ "primaryKey": false,
921
+ "notNull": true
922
+ },
923
+ "state": {
924
+ "name": "state",
925
+ "type": "text",
926
+ "primaryKey": false,
927
+ "notNull": true,
928
+ "default": "'active'"
929
+ },
930
+ "storageKey": {
931
+ "name": "storageKey",
932
+ "type": "text",
933
+ "primaryKey": false,
934
+ "notNull": true,
935
+ "default": "gen_random_uuid()::text"
936
+ }
937
+ },
938
+ "indexes": {
939
+ "EveStoredFile_owner": {
940
+ "name": "EveStoredFile_owner",
941
+ "columns": [
942
+ {
943
+ "expression": "ownerId",
944
+ "isExpression": false,
945
+ "asc": true,
946
+ "nulls": "last"
947
+ }
948
+ ],
949
+ "isUnique": false,
950
+ "concurrently": false,
951
+ "method": "btree",
952
+ "with": {}
953
+ }
954
+ },
955
+ "foreignKeys": {
956
+ "EveStoredFile_ownerId_user_id_fk": {
957
+ "name": "EveStoredFile_ownerId_user_id_fk",
958
+ "tableFrom": "EveStoredFile",
959
+ "tableTo": "user",
960
+ "columnsFrom": [
961
+ "ownerId"
962
+ ],
963
+ "columnsTo": [
964
+ "id"
965
+ ],
966
+ "onDelete": "no action",
967
+ "onUpdate": "no action"
968
+ }
969
+ },
970
+ "compositePrimaryKeys": {},
971
+ "uniqueConstraints": {
972
+ "EveStoredFile_storageKey_unique": {
973
+ "name": "EveStoredFile_storageKey_unique",
974
+ "nullsNotDistinct": false,
975
+ "columns": [
976
+ "storageKey"
977
+ ]
978
+ },
979
+ "EveStoredFile_key_owner": {
980
+ "name": "EveStoredFile_key_owner",
981
+ "nullsNotDistinct": false,
982
+ "columns": [
983
+ "key",
984
+ "ownerId"
985
+ ]
986
+ }
987
+ },
988
+ "policies": {},
989
+ "checkConstraints": {},
990
+ "isRLSEnabled": false
991
+ },
992
+ "public.EveSubagentSession": {
993
+ "name": "EveSubagentSession",
994
+ "schema": "",
995
+ "columns": {
996
+ "branchId": {
997
+ "name": "branchId",
998
+ "type": "uuid",
999
+ "primaryKey": false,
1000
+ "notNull": true
1001
+ },
1002
+ "ownerId": {
1003
+ "name": "ownerId",
1004
+ "type": "text",
1005
+ "primaryKey": false,
1006
+ "notNull": true
1007
+ },
1008
+ "parentSessionId": {
1009
+ "name": "parentSessionId",
1010
+ "type": "text",
1011
+ "primaryKey": false,
1012
+ "notNull": true
1013
+ },
1014
+ "rootTurnId": {
1015
+ "name": "rootTurnId",
1016
+ "type": "text",
1017
+ "primaryKey": false,
1018
+ "notNull": true
1019
+ },
1020
+ "sessionId": {
1021
+ "name": "sessionId",
1022
+ "type": "text",
1023
+ "primaryKey": true,
1024
+ "notNull": true
1025
+ },
1026
+ "usageStreamIndex": {
1027
+ "name": "usageStreamIndex",
1028
+ "type": "integer",
1029
+ "primaryKey": false,
1030
+ "notNull": true,
1031
+ "default": 0
1032
+ }
1033
+ },
1034
+ "indexes": {
1035
+ "EveSubagentSession_conversation": {
1036
+ "name": "EveSubagentSession_conversation",
1037
+ "columns": [
1038
+ {
1039
+ "expression": "branchId",
1040
+ "isExpression": false,
1041
+ "asc": true,
1042
+ "nulls": "last"
1043
+ }
1044
+ ],
1045
+ "isUnique": false,
1046
+ "concurrently": false,
1047
+ "method": "btree",
1048
+ "with": {}
1049
+ }
1050
+ },
1051
+ "foreignKeys": {
1052
+ "EveSubagentSession_conversation_owner_fk": {
1053
+ "name": "EveSubagentSession_conversation_owner_fk",
1054
+ "tableFrom": "EveSubagentSession",
1055
+ "tableTo": "EveConversation",
1056
+ "columnsFrom": [
1057
+ "branchId",
1058
+ "ownerId"
1059
+ ],
1060
+ "columnsTo": [
1061
+ "id",
1062
+ "ownerId"
1063
+ ],
1064
+ "onDelete": "cascade",
1065
+ "onUpdate": "no action"
1066
+ }
1067
+ },
1068
+ "compositePrimaryKeys": {},
1069
+ "uniqueConstraints": {},
1070
+ "policies": {},
1071
+ "checkConstraints": {
1072
+ "EveSubagentSession_not_self": {
1073
+ "name": "EveSubagentSession_not_self",
1074
+ "value": "\"EveSubagentSession\".\"sessionId\" <> \"EveSubagentSession\".\"parentSessionId\""
1075
+ },
1076
+ "EveSubagentSession_cursor": {
1077
+ "name": "EveSubagentSession_cursor",
1078
+ "value": "\"EveSubagentSession\".\"usageStreamIndex\" >= 0"
1079
+ }
1080
+ },
1081
+ "isRLSEnabled": false
1082
+ },
1083
+ "public.EveUsage": {
1084
+ "name": "EveUsage",
1085
+ "schema": "",
1086
+ "columns": {
1087
+ "chargedCents": {
1088
+ "name": "chargedCents",
1089
+ "type": "integer",
1090
+ "primaryKey": false,
1091
+ "notNull": true,
1092
+ "default": 0
1093
+ },
1094
+ "costUsd": {
1095
+ "name": "costUsd",
1096
+ "type": "numeric(24, 12)",
1097
+ "primaryKey": false,
1098
+ "notNull": false
1099
+ },
1100
+ "createdAt": {
1101
+ "name": "createdAt",
1102
+ "type": "timestamp",
1103
+ "primaryKey": false,
1104
+ "notNull": true,
1105
+ "default": "now()"
1106
+ },
1107
+ "eventId": {
1108
+ "name": "eventId",
1109
+ "type": "text",
1110
+ "primaryKey": true,
1111
+ "notNull": true
1112
+ },
1113
+ "generationId": {
1114
+ "name": "generationId",
1115
+ "type": "text",
1116
+ "primaryKey": false,
1117
+ "notNull": false
1118
+ },
1119
+ "modelAttempt": {
1120
+ "name": "modelAttempt",
1121
+ "type": "jsonb",
1122
+ "primaryKey": false,
1123
+ "notNull": false
1124
+ },
1125
+ "ownerId": {
1126
+ "name": "ownerId",
1127
+ "type": "text",
1128
+ "primaryKey": false,
1129
+ "notNull": true
1130
+ },
1131
+ "sessionId": {
1132
+ "name": "sessionId",
1133
+ "type": "text",
1134
+ "primaryKey": false,
1135
+ "notNull": true
1136
+ },
1137
+ "turnId": {
1138
+ "name": "turnId",
1139
+ "type": "text",
1140
+ "primaryKey": false,
1141
+ "notNull": true
1142
+ }
1143
+ },
1144
+ "indexes": {
1145
+ "EveUsage_session_turn": {
1146
+ "name": "EveUsage_session_turn",
1147
+ "columns": [
1148
+ {
1149
+ "expression": "sessionId",
1150
+ "isExpression": false,
1151
+ "asc": true,
1152
+ "nulls": "last"
1153
+ },
1154
+ {
1155
+ "expression": "turnId",
1156
+ "isExpression": false,
1157
+ "asc": true,
1158
+ "nulls": "last"
1159
+ }
1160
+ ],
1161
+ "isUnique": false,
1162
+ "concurrently": false,
1163
+ "method": "btree",
1164
+ "with": {}
1165
+ },
1166
+ "EveUsage_unpriced_owner": {
1167
+ "name": "EveUsage_unpriced_owner",
1168
+ "columns": [
1169
+ {
1170
+ "expression": "ownerId",
1171
+ "isExpression": false,
1172
+ "asc": true,
1173
+ "nulls": "last"
1174
+ }
1175
+ ],
1176
+ "isUnique": false,
1177
+ "where": "\"EveUsage\".\"costUsd\" is null",
1178
+ "concurrently": false,
1179
+ "method": "btree",
1180
+ "with": {}
1181
+ }
1182
+ },
1183
+ "foreignKeys": {
1184
+ "EveUsage_ownerId_user_id_fk": {
1185
+ "name": "EveUsage_ownerId_user_id_fk",
1186
+ "tableFrom": "EveUsage",
1187
+ "tableTo": "user",
1188
+ "columnsFrom": [
1189
+ "ownerId"
1190
+ ],
1191
+ "columnsTo": [
1192
+ "id"
1193
+ ],
1194
+ "onDelete": "no action",
1195
+ "onUpdate": "no action"
1196
+ }
1197
+ },
1198
+ "compositePrimaryKeys": {},
1199
+ "uniqueConstraints": {},
1200
+ "policies": {},
1201
+ "checkConstraints": {},
1202
+ "isRLSEnabled": false
1203
+ },
1204
+ "public.EveWorkflowBackend": {
1205
+ "name": "EveWorkflowBackend",
1206
+ "schema": "",
1207
+ "columns": {
1208
+ "id": {
1209
+ "name": "id",
1210
+ "type": "integer",
1211
+ "primaryKey": true,
1212
+ "notNull": true,
1213
+ "default": 1
1214
+ },
1215
+ "world": {
1216
+ "name": "world",
1217
+ "type": "text",
1218
+ "primaryKey": false,
1219
+ "notNull": true
1220
+ }
1221
+ },
1222
+ "indexes": {},
1223
+ "foreignKeys": {},
1224
+ "compositePrimaryKeys": {},
1225
+ "uniqueConstraints": {},
1226
+ "policies": {},
1227
+ "checkConstraints": {
1228
+ "EveWorkflowBackend_singleton": {
1229
+ "name": "EveWorkflowBackend_singleton",
1230
+ "value": "\"EveWorkflowBackend\".\"id\" = 1"
1231
+ }
1232
+ },
1233
+ "isRLSEnabled": false
1234
+ },
1235
+ "public.EveWorkspace": {
1236
+ "name": "EveWorkspace",
1237
+ "schema": "",
1238
+ "columns": {
1239
+ "id": {
1240
+ "name": "id",
1241
+ "type": "uuid",
1242
+ "primaryKey": true,
1243
+ "notNull": true,
1244
+ "default": "gen_random_uuid()"
1245
+ },
1246
+ "ownerId": {
1247
+ "name": "ownerId",
1248
+ "type": "text",
1249
+ "primaryKey": false,
1250
+ "notNull": true
1251
+ },
1252
+ "state": {
1253
+ "name": "state",
1254
+ "type": "text",
1255
+ "primaryKey": false,
1256
+ "notNull": true,
1257
+ "default": "'active'"
1258
+ },
1259
+ "activeOperationId": {
1260
+ "name": "activeOperationId",
1261
+ "type": "uuid",
1262
+ "primaryKey": false,
1263
+ "notNull": false
1264
+ }
1265
+ },
1266
+ "indexes": {},
1267
+ "foreignKeys": {
1268
+ "EveWorkspace_ownerId_user_id_fk": {
1269
+ "name": "EveWorkspace_ownerId_user_id_fk",
1270
+ "tableFrom": "EveWorkspace",
1271
+ "tableTo": "user",
1272
+ "columnsFrom": [
1273
+ "ownerId"
1274
+ ],
1275
+ "columnsTo": [
1276
+ "id"
1277
+ ],
1278
+ "onDelete": "cascade",
1279
+ "onUpdate": "no action"
1280
+ }
1281
+ },
1282
+ "compositePrimaryKeys": {},
1283
+ "uniqueConstraints": {
1284
+ "EveWorkspace_id_owner": {
1285
+ "name": "EveWorkspace_id_owner",
1286
+ "nullsNotDistinct": false,
1287
+ "columns": [
1288
+ "id",
1289
+ "ownerId"
1290
+ ]
1291
+ }
1292
+ },
1293
+ "policies": {},
1294
+ "checkConstraints": {},
1295
+ "isRLSEnabled": false
1296
+ },
1297
+ "public.session": {
1298
+ "name": "session",
1299
+ "schema": "",
1300
+ "columns": {
1301
+ "created_at": {
1302
+ "name": "created_at",
1303
+ "type": "timestamp",
1304
+ "primaryKey": false,
1305
+ "notNull": true,
1306
+ "default": "now()"
1307
+ },
1308
+ "expires_at": {
1309
+ "name": "expires_at",
1310
+ "type": "timestamp",
1311
+ "primaryKey": false,
1312
+ "notNull": true
1313
+ },
1314
+ "id": {
1315
+ "name": "id",
1316
+ "type": "text",
1317
+ "primaryKey": true,
1318
+ "notNull": true
1319
+ },
1320
+ "ip_address": {
1321
+ "name": "ip_address",
1322
+ "type": "text",
1323
+ "primaryKey": false,
1324
+ "notNull": false
1325
+ },
1326
+ "token": {
1327
+ "name": "token",
1328
+ "type": "text",
1329
+ "primaryKey": false,
1330
+ "notNull": true
1331
+ },
1332
+ "updated_at": {
1333
+ "name": "updated_at",
1334
+ "type": "timestamp",
1335
+ "primaryKey": false,
1336
+ "notNull": true
1337
+ },
1338
+ "user_agent": {
1339
+ "name": "user_agent",
1340
+ "type": "text",
1341
+ "primaryKey": false,
1342
+ "notNull": false
1343
+ },
1344
+ "user_id": {
1345
+ "name": "user_id",
1346
+ "type": "text",
1347
+ "primaryKey": false,
1348
+ "notNull": true
1349
+ }
1350
+ },
1351
+ "indexes": {},
1352
+ "foreignKeys": {
1353
+ "session_user_id_user_id_fk": {
1354
+ "name": "session_user_id_user_id_fk",
1355
+ "tableFrom": "session",
1356
+ "tableTo": "user",
1357
+ "columnsFrom": [
1358
+ "user_id"
1359
+ ],
1360
+ "columnsTo": [
1361
+ "id"
1362
+ ],
1363
+ "onDelete": "cascade",
1364
+ "onUpdate": "no action"
1365
+ }
1366
+ },
1367
+ "compositePrimaryKeys": {},
1368
+ "uniqueConstraints": {
1369
+ "session_token_unique": {
1370
+ "name": "session_token_unique",
1371
+ "nullsNotDistinct": false,
1372
+ "columns": [
1373
+ "token"
1374
+ ]
1375
+ }
1376
+ },
1377
+ "policies": {},
1378
+ "checkConstraints": {},
1379
+ "isRLSEnabled": false
1380
+ },
1381
+ "public.user": {
1382
+ "name": "user",
1383
+ "schema": "",
1384
+ "columns": {
1385
+ "created_at": {
1386
+ "name": "created_at",
1387
+ "type": "timestamp",
1388
+ "primaryKey": false,
1389
+ "notNull": true,
1390
+ "default": "now()"
1391
+ },
1392
+ "email": {
1393
+ "name": "email",
1394
+ "type": "text",
1395
+ "primaryKey": false,
1396
+ "notNull": true
1397
+ },
1398
+ "email_verified": {
1399
+ "name": "email_verified",
1400
+ "type": "boolean",
1401
+ "primaryKey": false,
1402
+ "notNull": true,
1403
+ "default": false
1404
+ },
1405
+ "eve_usage_reconciled_at": {
1406
+ "name": "eve_usage_reconciled_at",
1407
+ "type": "timestamp",
1408
+ "primaryKey": false,
1409
+ "notNull": false
1410
+ },
1411
+ "id": {
1412
+ "name": "id",
1413
+ "type": "text",
1414
+ "primaryKey": true,
1415
+ "notNull": true
1416
+ },
1417
+ "image": {
1418
+ "name": "image",
1419
+ "type": "text",
1420
+ "primaryKey": false,
1421
+ "notNull": false
1422
+ },
1423
+ "name": {
1424
+ "name": "name",
1425
+ "type": "text",
1426
+ "primaryKey": false,
1427
+ "notNull": true
1428
+ },
1429
+ "updated_at": {
1430
+ "name": "updated_at",
1431
+ "type": "timestamp",
1432
+ "primaryKey": false,
1433
+ "notNull": true,
1434
+ "default": "now()"
1435
+ }
1436
+ },
1437
+ "indexes": {},
1438
+ "foreignKeys": {},
1439
+ "compositePrimaryKeys": {},
1440
+ "uniqueConstraints": {
1441
+ "user_email_unique": {
1442
+ "name": "user_email_unique",
1443
+ "nullsNotDistinct": false,
1444
+ "columns": [
1445
+ "email"
1446
+ ]
1447
+ }
1448
+ },
1449
+ "policies": {},
1450
+ "checkConstraints": {},
1451
+ "isRLSEnabled": false
1452
+ },
1453
+ "public.verification": {
1454
+ "name": "verification",
1455
+ "schema": "",
1456
+ "columns": {
1457
+ "created_at": {
1458
+ "name": "created_at",
1459
+ "type": "timestamp",
1460
+ "primaryKey": false,
1461
+ "notNull": true,
1462
+ "default": "now()"
1463
+ },
1464
+ "expires_at": {
1465
+ "name": "expires_at",
1466
+ "type": "timestamp",
1467
+ "primaryKey": false,
1468
+ "notNull": true
1469
+ },
1470
+ "id": {
1471
+ "name": "id",
1472
+ "type": "text",
1473
+ "primaryKey": true,
1474
+ "notNull": true
1475
+ },
1476
+ "identifier": {
1477
+ "name": "identifier",
1478
+ "type": "text",
1479
+ "primaryKey": false,
1480
+ "notNull": true
1481
+ },
1482
+ "updated_at": {
1483
+ "name": "updated_at",
1484
+ "type": "timestamp",
1485
+ "primaryKey": false,
1486
+ "notNull": true,
1487
+ "default": "now()"
1488
+ },
1489
+ "value": {
1490
+ "name": "value",
1491
+ "type": "text",
1492
+ "primaryKey": false,
1493
+ "notNull": true
1494
+ }
1495
+ },
1496
+ "indexes": {},
1497
+ "foreignKeys": {},
1498
+ "compositePrimaryKeys": {},
1499
+ "uniqueConstraints": {},
1500
+ "policies": {},
1501
+ "checkConstraints": {},
1502
+ "isRLSEnabled": false
1503
+ },
1504
+ "public.UserCredit": {
1505
+ "name": "UserCredit",
1506
+ "schema": "",
1507
+ "columns": {
1508
+ "credits": {
1509
+ "name": "credits",
1510
+ "type": "integer",
1511
+ "primaryKey": false,
1512
+ "notNull": true,
1513
+ "default": 50
1514
+ },
1515
+ "userId": {
1516
+ "name": "userId",
1517
+ "type": "text",
1518
+ "primaryKey": true,
1519
+ "notNull": true
1520
+ }
1521
+ },
1522
+ "indexes": {},
1523
+ "foreignKeys": {
1524
+ "UserCredit_userId_user_id_fk": {
1525
+ "name": "UserCredit_userId_user_id_fk",
1526
+ "tableFrom": "UserCredit",
1527
+ "tableTo": "user",
1528
+ "columnsFrom": [
1529
+ "userId"
1530
+ ],
1531
+ "columnsTo": [
1532
+ "id"
1533
+ ],
1534
+ "onDelete": "cascade",
1535
+ "onUpdate": "no action"
1536
+ }
1537
+ },
1538
+ "compositePrimaryKeys": {},
1539
+ "uniqueConstraints": {},
1540
+ "policies": {},
1541
+ "checkConstraints": {},
1542
+ "isRLSEnabled": false
1543
+ },
1544
+ "public.EveVote": {
1545
+ "name": "EveVote",
1546
+ "schema": "",
1547
+ "columns": {
1548
+ "branchId": {
1549
+ "name": "branchId",
1550
+ "type": "uuid",
1551
+ "primaryKey": false,
1552
+ "notNull": true
1553
+ },
1554
+ "isUpvoted": {
1555
+ "name": "isUpvoted",
1556
+ "type": "boolean",
1557
+ "primaryKey": false,
1558
+ "notNull": true
1559
+ },
1560
+ "messageId": {
1561
+ "name": "messageId",
1562
+ "type": "text",
1563
+ "primaryKey": false,
1564
+ "notNull": true
1565
+ }
1566
+ },
1567
+ "indexes": {},
1568
+ "foreignKeys": {
1569
+ "EveVote_branchId_EveConversation_id_fk": {
1570
+ "name": "EveVote_branchId_EveConversation_id_fk",
1571
+ "tableFrom": "EveVote",
1572
+ "tableTo": "EveConversation",
1573
+ "columnsFrom": [
1574
+ "branchId"
1575
+ ],
1576
+ "columnsTo": [
1577
+ "id"
1578
+ ],
1579
+ "onDelete": "cascade",
1580
+ "onUpdate": "no action"
1581
+ }
1582
+ },
1583
+ "compositePrimaryKeys": {
1584
+ "EveVote_branchId_messageId_pk": {
1585
+ "name": "EveVote_branchId_messageId_pk",
1586
+ "columns": [
1587
+ "branchId",
1588
+ "messageId"
1589
+ ]
1590
+ }
1591
+ },
1592
+ "uniqueConstraints": {},
1593
+ "policies": {},
1594
+ "checkConstraints": {},
1595
+ "isRLSEnabled": false
1596
+ },
1597
+ "public.EveFollowup": {
1598
+ "name": "EveFollowup",
1599
+ "schema": "",
1600
+ "columns": {
1601
+ "chatId": {
1602
+ "name": "chatId",
1603
+ "type": "uuid",
1604
+ "primaryKey": false,
1605
+ "notNull": true
1606
+ },
1607
+ "ownerId": {
1608
+ "name": "ownerId",
1609
+ "type": "text",
1610
+ "primaryKey": false,
1611
+ "notNull": true
1612
+ },
1613
+ "turnId": {
1614
+ "name": "turnId",
1615
+ "type": "text",
1616
+ "primaryKey": false,
1617
+ "notNull": true
1618
+ },
1619
+ "sessionId": {
1620
+ "name": "sessionId",
1621
+ "type": "text",
1622
+ "primaryKey": false,
1623
+ "notNull": true
1624
+ },
1625
+ "eventId": {
1626
+ "name": "eventId",
1627
+ "type": "text",
1628
+ "primaryKey": true,
1629
+ "notNull": true
1630
+ },
1631
+ "suggestions": {
1632
+ "name": "suggestions",
1633
+ "type": "jsonb",
1634
+ "primaryKey": false,
1635
+ "notNull": false
1636
+ }
1637
+ },
1638
+ "indexes": {
1639
+ "EveFollowup_chat": {
1640
+ "name": "EveFollowup_chat",
1641
+ "columns": [
1642
+ {
1643
+ "expression": "chatId",
1644
+ "isExpression": false,
1645
+ "asc": true,
1646
+ "nulls": "last"
1647
+ }
1648
+ ],
1649
+ "isUnique": false,
1650
+ "concurrently": false,
1651
+ "method": "btree",
1652
+ "with": {}
1653
+ }
1654
+ },
1655
+ "foreignKeys": {
1656
+ "EveFollowup_chatId_ownerId_EveChat_id_ownerId_fk": {
1657
+ "name": "EveFollowup_chatId_ownerId_EveChat_id_ownerId_fk",
1658
+ "tableFrom": "EveFollowup",
1659
+ "tableTo": "EveChat",
1660
+ "columnsFrom": [
1661
+ "chatId",
1662
+ "ownerId"
1663
+ ],
1664
+ "columnsTo": [
1665
+ "id",
1666
+ "ownerId"
1667
+ ],
1668
+ "onDelete": "cascade",
1669
+ "onUpdate": "no action"
1670
+ }
1671
+ },
1672
+ "compositePrimaryKeys": {},
1673
+ "uniqueConstraints": {
1674
+ "EveFollowup_sessionId_turnId_unique": {
1675
+ "name": "EveFollowup_sessionId_turnId_unique",
1676
+ "nullsNotDistinct": false,
1677
+ "columns": [
1678
+ "sessionId",
1679
+ "turnId"
1680
+ ]
1681
+ }
1682
+ },
1683
+ "policies": {},
1684
+ "checkConstraints": {},
1685
+ "isRLSEnabled": false
1686
+ },
1687
+ "public.GuestRuntimeRate": {
1688
+ "name": "GuestRuntimeRate",
1689
+ "schema": "",
1690
+ "columns": {
1691
+ "ipHash": {
1692
+ "name": "ipHash",
1693
+ "type": "text",
1694
+ "primaryKey": false,
1695
+ "notNull": true
1696
+ },
1697
+ "kind": {
1698
+ "name": "kind",
1699
+ "type": "text",
1700
+ "primaryKey": false,
1701
+ "notNull": true
1702
+ },
1703
+ "startsAt": {
1704
+ "name": "startsAt",
1705
+ "type": "timestamp with time zone",
1706
+ "primaryKey": false,
1707
+ "notNull": true
1708
+ },
1709
+ "requests": {
1710
+ "name": "requests",
1711
+ "type": "integer",
1712
+ "primaryKey": false,
1713
+ "notNull": true,
1714
+ "default": 0
1715
+ }
1716
+ },
1717
+ "indexes": {},
1718
+ "foreignKeys": {},
1719
+ "compositePrimaryKeys": {
1720
+ "GuestRuntimeRate_ipHash_kind_startsAt_pk": {
1721
+ "name": "GuestRuntimeRate_ipHash_kind_startsAt_pk",
1722
+ "columns": [
1723
+ "ipHash",
1724
+ "kind",
1725
+ "startsAt"
1726
+ ]
1727
+ }
1728
+ },
1729
+ "uniqueConstraints": {},
1730
+ "policies": {},
1731
+ "checkConstraints": {
1732
+ "GuestRuntimeRate_requests": {
1733
+ "name": "GuestRuntimeRate_requests",
1734
+ "value": "\"GuestRuntimeRate\".\"requests\" >= 0"
1735
+ },
1736
+ "GuestRuntimeRate_kind": {
1737
+ "name": "GuestRuntimeRate_kind",
1738
+ "value": "\"GuestRuntimeRate\".\"kind\" in ('session', 'message')"
1739
+ }
1740
+ },
1741
+ "isRLSEnabled": false
1742
+ },
1743
+ "public.GuestRuntimeSession": {
1744
+ "name": "GuestRuntimeSession",
1745
+ "schema": "",
1746
+ "columns": {
1747
+ "id": {
1748
+ "name": "id",
1749
+ "type": "uuid",
1750
+ "primaryKey": true,
1751
+ "notNull": true,
1752
+ "default": "gen_random_uuid()"
1753
+ },
1754
+ "ownerId": {
1755
+ "name": "ownerId",
1756
+ "type": "text",
1757
+ "primaryKey": false,
1758
+ "notNull": true
1759
+ },
1760
+ "sessionId": {
1761
+ "name": "sessionId",
1762
+ "type": "text",
1763
+ "primaryKey": false,
1764
+ "notNull": false
1765
+ },
1766
+ "modelId": {
1767
+ "name": "modelId",
1768
+ "type": "text",
1769
+ "primaryKey": false,
1770
+ "notNull": true
1771
+ },
1772
+ "ipHash": {
1773
+ "name": "ipHash",
1774
+ "type": "text",
1775
+ "primaryKey": false,
1776
+ "notNull": true
1777
+ },
1778
+ "policyVersion": {
1779
+ "name": "policyVersion",
1780
+ "type": "integer",
1781
+ "primaryKey": false,
1782
+ "notNull": true,
1783
+ "default": 1
1784
+ },
1785
+ "state": {
1786
+ "name": "state",
1787
+ "type": "text",
1788
+ "primaryKey": false,
1789
+ "notNull": true,
1790
+ "default": "'active'"
1791
+ },
1792
+ "createdAt": {
1793
+ "name": "createdAt",
1794
+ "type": "timestamp with time zone",
1795
+ "primaryKey": false,
1796
+ "notNull": true,
1797
+ "default": "now()"
1798
+ },
1799
+ "expiresAt": {
1800
+ "name": "expiresAt",
1801
+ "type": "timestamp with time zone",
1802
+ "primaryKey": false,
1803
+ "notNull": true,
1804
+ "default": "now() + interval '24 hours'"
1805
+ },
1806
+ "credentialExpiresAt": {
1807
+ "name": "credentialExpiresAt",
1808
+ "type": "timestamp with time zone",
1809
+ "primaryKey": false,
1810
+ "notNull": true
1811
+ },
1812
+ "inputCharactersUsed": {
1813
+ "name": "inputCharactersUsed",
1814
+ "type": "integer",
1815
+ "primaryKey": false,
1816
+ "notNull": true,
1817
+ "default": 0
1818
+ },
1819
+ "cleanupAttemptedAt": {
1820
+ "name": "cleanupAttemptedAt",
1821
+ "type": "timestamp with time zone",
1822
+ "primaryKey": false,
1823
+ "notNull": false
1824
+ },
1825
+ "deletedAt": {
1826
+ "name": "deletedAt",
1827
+ "type": "timestamp with time zone",
1828
+ "primaryKey": false,
1829
+ "notNull": false
1830
+ }
1831
+ },
1832
+ "indexes": {
1833
+ "GuestRuntimeSession_cleanup_idx": {
1834
+ "name": "GuestRuntimeSession_cleanup_idx",
1835
+ "columns": [
1836
+ {
1837
+ "expression": "state",
1838
+ "isExpression": false,
1839
+ "asc": true,
1840
+ "nulls": "last"
1841
+ },
1842
+ {
1843
+ "expression": "expiresAt",
1844
+ "isExpression": false,
1845
+ "asc": true,
1846
+ "nulls": "last"
1847
+ }
1848
+ ],
1849
+ "isUnique": false,
1850
+ "concurrently": false,
1851
+ "method": "btree",
1852
+ "with": {}
1853
+ }
1854
+ },
1855
+ "foreignKeys": {},
1856
+ "compositePrimaryKeys": {},
1857
+ "uniqueConstraints": {
1858
+ "GuestRuntimeSession_ownerId_unique": {
1859
+ "name": "GuestRuntimeSession_ownerId_unique",
1860
+ "nullsNotDistinct": false,
1861
+ "columns": [
1862
+ "ownerId"
1863
+ ]
1864
+ },
1865
+ "GuestRuntimeSession_sessionId_unique": {
1866
+ "name": "GuestRuntimeSession_sessionId_unique",
1867
+ "nullsNotDistinct": false,
1868
+ "columns": [
1869
+ "sessionId"
1870
+ ]
1871
+ }
1872
+ },
1873
+ "policies": {},
1874
+ "checkConstraints": {
1875
+ "GuestRuntimeSession_state": {
1876
+ "name": "GuestRuntimeSession_state",
1877
+ "value": "\"GuestRuntimeSession\".\"state\" in ('active', 'deleting', 'deleted')"
1878
+ },
1879
+ "GuestRuntimeSession_ip_hash": {
1880
+ "name": "GuestRuntimeSession_ip_hash",
1881
+ "value": "\"GuestRuntimeSession\".\"ipHash\" ~ '^[0-9a-f]{64}$'"
1882
+ },
1883
+ "GuestRuntimeSession_expiry": {
1884
+ "name": "GuestRuntimeSession_expiry",
1885
+ "value": "\"GuestRuntimeSession\".\"expiresAt\" = \"GuestRuntimeSession\".\"createdAt\" + interval '24 hours'"
1886
+ }
1887
+ },
1888
+ "isRLSEnabled": false
1889
+ },
1890
+ "public.McpConnector": {
1891
+ "name": "McpConnector",
1892
+ "schema": "",
1893
+ "columns": {
1894
+ "createdAt": {
1895
+ "name": "createdAt",
1896
+ "type": "timestamp",
1897
+ "primaryKey": false,
1898
+ "notNull": true,
1899
+ "default": "now()"
1900
+ },
1901
+ "enabled": {
1902
+ "name": "enabled",
1903
+ "type": "boolean",
1904
+ "primaryKey": false,
1905
+ "notNull": true,
1906
+ "default": true
1907
+ },
1908
+ "id": {
1909
+ "name": "id",
1910
+ "type": "uuid",
1911
+ "primaryKey": true,
1912
+ "notNull": true,
1913
+ "default": "gen_random_uuid()"
1914
+ },
1915
+ "name": {
1916
+ "name": "name",
1917
+ "type": "varchar(256)",
1918
+ "primaryKey": false,
1919
+ "notNull": true
1920
+ },
1921
+ "nameId": {
1922
+ "name": "nameId",
1923
+ "type": "varchar(256)",
1924
+ "primaryKey": false,
1925
+ "notNull": true
1926
+ },
1927
+ "oauthClientId": {
1928
+ "name": "oauthClientId",
1929
+ "type": "text",
1930
+ "primaryKey": false,
1931
+ "notNull": false
1932
+ },
1933
+ "oauthClientSecret": {
1934
+ "name": "oauthClientSecret",
1935
+ "type": "text",
1936
+ "primaryKey": false,
1937
+ "notNull": false
1938
+ },
1939
+ "requireApproval": {
1940
+ "name": "requireApproval",
1941
+ "type": "boolean",
1942
+ "primaryKey": false,
1943
+ "notNull": true,
1944
+ "default": false
1945
+ },
1946
+ "type": {
1947
+ "name": "type",
1948
+ "type": "varchar",
1949
+ "primaryKey": false,
1950
+ "notNull": true,
1951
+ "default": "'http'"
1952
+ },
1953
+ "updatedAt": {
1954
+ "name": "updatedAt",
1955
+ "type": "timestamp",
1956
+ "primaryKey": false,
1957
+ "notNull": true,
1958
+ "default": "now()"
1959
+ },
1960
+ "url": {
1961
+ "name": "url",
1962
+ "type": "text",
1963
+ "primaryKey": false,
1964
+ "notNull": true
1965
+ },
1966
+ "userId": {
1967
+ "name": "userId",
1968
+ "type": "text",
1969
+ "primaryKey": false,
1970
+ "notNull": false
1971
+ }
1972
+ },
1973
+ "indexes": {
1974
+ "McpConnector_user_id_idx": {
1975
+ "name": "McpConnector_user_id_idx",
1976
+ "columns": [
1977
+ {
1978
+ "expression": "userId",
1979
+ "isExpression": false,
1980
+ "asc": true,
1981
+ "nulls": "last"
1982
+ }
1983
+ ],
1984
+ "isUnique": false,
1985
+ "concurrently": false,
1986
+ "method": "btree",
1987
+ "with": {}
1988
+ },
1989
+ "McpConnector_user_name_id_idx": {
1990
+ "name": "McpConnector_user_name_id_idx",
1991
+ "columns": [
1992
+ {
1993
+ "expression": "userId",
1994
+ "isExpression": false,
1995
+ "asc": true,
1996
+ "nulls": "last"
1997
+ },
1998
+ {
1999
+ "expression": "nameId",
2000
+ "isExpression": false,
2001
+ "asc": true,
2002
+ "nulls": "last"
2003
+ }
2004
+ ],
2005
+ "isUnique": false,
2006
+ "concurrently": false,
2007
+ "method": "btree",
2008
+ "with": {}
2009
+ },
2010
+ "McpConnector_user_name_id_unique": {
2011
+ "name": "McpConnector_user_name_id_unique",
2012
+ "columns": [
2013
+ {
2014
+ "expression": "userId",
2015
+ "isExpression": false,
2016
+ "asc": true,
2017
+ "nulls": "last"
2018
+ },
2019
+ {
2020
+ "expression": "nameId",
2021
+ "isExpression": false,
2022
+ "asc": true,
2023
+ "nulls": "last"
2024
+ }
2025
+ ],
2026
+ "isUnique": true,
2027
+ "concurrently": false,
2028
+ "method": "btree",
2029
+ "with": {}
2030
+ }
2031
+ },
2032
+ "foreignKeys": {
2033
+ "McpConnector_userId_user_id_fk": {
2034
+ "name": "McpConnector_userId_user_id_fk",
2035
+ "tableFrom": "McpConnector",
2036
+ "tableTo": "user",
2037
+ "columnsFrom": [
2038
+ "userId"
2039
+ ],
2040
+ "columnsTo": [
2041
+ "id"
2042
+ ],
2043
+ "onDelete": "cascade",
2044
+ "onUpdate": "no action"
2045
+ }
2046
+ },
2047
+ "compositePrimaryKeys": {},
2048
+ "uniqueConstraints": {},
2049
+ "policies": {},
2050
+ "checkConstraints": {},
2051
+ "isRLSEnabled": false
2052
+ },
2053
+ "public.McpOAuthSession": {
2054
+ "name": "McpOAuthSession",
2055
+ "schema": "",
2056
+ "columns": {
2057
+ "clientInfo": {
2058
+ "name": "clientInfo",
2059
+ "type": "text",
2060
+ "primaryKey": false,
2061
+ "notNull": false
2062
+ },
2063
+ "codeVerifier": {
2064
+ "name": "codeVerifier",
2065
+ "type": "text",
2066
+ "primaryKey": false,
2067
+ "notNull": false
2068
+ },
2069
+ "createdAt": {
2070
+ "name": "createdAt",
2071
+ "type": "timestamp",
2072
+ "primaryKey": false,
2073
+ "notNull": true,
2074
+ "default": "now()"
2075
+ },
2076
+ "id": {
2077
+ "name": "id",
2078
+ "type": "uuid",
2079
+ "primaryKey": true,
2080
+ "notNull": true,
2081
+ "default": "gen_random_uuid()"
2082
+ },
2083
+ "mcpConnectorId": {
2084
+ "name": "mcpConnectorId",
2085
+ "type": "uuid",
2086
+ "primaryKey": false,
2087
+ "notNull": true
2088
+ },
2089
+ "serverUrl": {
2090
+ "name": "serverUrl",
2091
+ "type": "text",
2092
+ "primaryKey": false,
2093
+ "notNull": true
2094
+ },
2095
+ "state": {
2096
+ "name": "state",
2097
+ "type": "text",
2098
+ "primaryKey": false,
2099
+ "notNull": false
2100
+ },
2101
+ "tokens": {
2102
+ "name": "tokens",
2103
+ "type": "text",
2104
+ "primaryKey": false,
2105
+ "notNull": false
2106
+ },
2107
+ "updatedAt": {
2108
+ "name": "updatedAt",
2109
+ "type": "timestamp",
2110
+ "primaryKey": false,
2111
+ "notNull": true,
2112
+ "default": "now()"
2113
+ }
2114
+ },
2115
+ "indexes": {
2116
+ "McpOAuthSession_connector_idx": {
2117
+ "name": "McpOAuthSession_connector_idx",
2118
+ "columns": [
2119
+ {
2120
+ "expression": "mcpConnectorId",
2121
+ "isExpression": false,
2122
+ "asc": true,
2123
+ "nulls": "last"
2124
+ }
2125
+ ],
2126
+ "isUnique": false,
2127
+ "concurrently": false,
2128
+ "method": "btree",
2129
+ "with": {}
2130
+ },
2131
+ "McpOAuthSession_state_idx": {
2132
+ "name": "McpOAuthSession_state_idx",
2133
+ "columns": [
2134
+ {
2135
+ "expression": "state",
2136
+ "isExpression": false,
2137
+ "asc": true,
2138
+ "nulls": "last"
2139
+ }
2140
+ ],
2141
+ "isUnique": false,
2142
+ "concurrently": false,
2143
+ "method": "btree",
2144
+ "with": {}
2145
+ }
2146
+ },
2147
+ "foreignKeys": {
2148
+ "McpOAuthSession_mcpConnectorId_McpConnector_id_fk": {
2149
+ "name": "McpOAuthSession_mcpConnectorId_McpConnector_id_fk",
2150
+ "tableFrom": "McpOAuthSession",
2151
+ "tableTo": "McpConnector",
2152
+ "columnsFrom": [
2153
+ "mcpConnectorId"
2154
+ ],
2155
+ "columnsTo": [
2156
+ "id"
2157
+ ],
2158
+ "onDelete": "cascade",
2159
+ "onUpdate": "no action"
2160
+ }
2161
+ },
2162
+ "compositePrimaryKeys": {},
2163
+ "uniqueConstraints": {
2164
+ "McpOAuthSession_state_unique": {
2165
+ "name": "McpOAuthSession_state_unique",
2166
+ "nullsNotDistinct": false,
2167
+ "columns": [
2168
+ "state"
2169
+ ]
2170
+ }
2171
+ },
2172
+ "policies": {},
2173
+ "checkConstraints": {},
2174
+ "isRLSEnabled": false
2175
+ },
2176
+ "public.UserModelPreference": {
2177
+ "name": "UserModelPreference",
2178
+ "schema": "",
2179
+ "columns": {
2180
+ "createdAt": {
2181
+ "name": "createdAt",
2182
+ "type": "timestamp",
2183
+ "primaryKey": false,
2184
+ "notNull": true,
2185
+ "default": "now()"
2186
+ },
2187
+ "enabled": {
2188
+ "name": "enabled",
2189
+ "type": "boolean",
2190
+ "primaryKey": false,
2191
+ "notNull": true
2192
+ },
2193
+ "modelId": {
2194
+ "name": "modelId",
2195
+ "type": "varchar(256)",
2196
+ "primaryKey": false,
2197
+ "notNull": true
2198
+ },
2199
+ "updatedAt": {
2200
+ "name": "updatedAt",
2201
+ "type": "timestamp",
2202
+ "primaryKey": false,
2203
+ "notNull": true,
2204
+ "default": "now()"
2205
+ },
2206
+ "userId": {
2207
+ "name": "userId",
2208
+ "type": "text",
2209
+ "primaryKey": false,
2210
+ "notNull": true
2211
+ }
2212
+ },
2213
+ "indexes": {
2214
+ "UserModelPreference_user_id_idx": {
2215
+ "name": "UserModelPreference_user_id_idx",
2216
+ "columns": [
2217
+ {
2218
+ "expression": "userId",
2219
+ "isExpression": false,
2220
+ "asc": true,
2221
+ "nulls": "last"
2222
+ }
2223
+ ],
2224
+ "isUnique": false,
2225
+ "concurrently": false,
2226
+ "method": "btree",
2227
+ "with": {}
2228
+ }
2229
+ },
2230
+ "foreignKeys": {
2231
+ "UserModelPreference_userId_user_id_fk": {
2232
+ "name": "UserModelPreference_userId_user_id_fk",
2233
+ "tableFrom": "UserModelPreference",
2234
+ "tableTo": "user",
2235
+ "columnsFrom": [
2236
+ "userId"
2237
+ ],
2238
+ "columnsTo": [
2239
+ "id"
2240
+ ],
2241
+ "onDelete": "cascade",
2242
+ "onUpdate": "no action"
2243
+ }
2244
+ },
2245
+ "compositePrimaryKeys": {
2246
+ "UserModelPreference_userId_modelId_pk": {
2247
+ "name": "UserModelPreference_userId_modelId_pk",
2248
+ "columns": [
2249
+ "userId",
2250
+ "modelId"
2251
+ ]
2252
+ }
2253
+ },
2254
+ "uniqueConstraints": {},
2255
+ "policies": {},
2256
+ "checkConstraints": {},
2257
+ "isRLSEnabled": false
2258
+ },
2259
+ "public.EveChatProject": {
2260
+ "name": "EveChatProject",
2261
+ "schema": "",
2262
+ "columns": {
2263
+ "chatId": {
2264
+ "name": "chatId",
2265
+ "type": "uuid",
2266
+ "primaryKey": true,
2267
+ "notNull": true
2268
+ },
2269
+ "ownerId": {
2270
+ "name": "ownerId",
2271
+ "type": "text",
2272
+ "primaryKey": false,
2273
+ "notNull": true
2274
+ },
2275
+ "projectId": {
2276
+ "name": "projectId",
2277
+ "type": "uuid",
2278
+ "primaryKey": false,
2279
+ "notNull": true
2280
+ }
2281
+ },
2282
+ "indexes": {
2283
+ "EveChatProject_project": {
2284
+ "name": "EveChatProject_project",
2285
+ "columns": [
2286
+ {
2287
+ "expression": "projectId",
2288
+ "isExpression": false,
2289
+ "asc": true,
2290
+ "nulls": "last"
2291
+ }
2292
+ ],
2293
+ "isUnique": false,
2294
+ "concurrently": false,
2295
+ "method": "btree",
2296
+ "with": {}
2297
+ }
2298
+ },
2299
+ "foreignKeys": {
2300
+ "EveChatProject_chatId_ownerId_EveChat_id_ownerId_fk": {
2301
+ "name": "EveChatProject_chatId_ownerId_EveChat_id_ownerId_fk",
2302
+ "tableFrom": "EveChatProject",
2303
+ "tableTo": "EveChat",
2304
+ "columnsFrom": [
2305
+ "chatId",
2306
+ "ownerId"
2307
+ ],
2308
+ "columnsTo": [
2309
+ "id",
2310
+ "ownerId"
2311
+ ],
2312
+ "onDelete": "cascade",
2313
+ "onUpdate": "no action"
2314
+ },
2315
+ "EveChatProject_projectId_ownerId_Project_id_userId_fk": {
2316
+ "name": "EveChatProject_projectId_ownerId_Project_id_userId_fk",
2317
+ "tableFrom": "EveChatProject",
2318
+ "tableTo": "Project",
2319
+ "columnsFrom": [
2320
+ "projectId",
2321
+ "ownerId"
2322
+ ],
2323
+ "columnsTo": [
2324
+ "id",
2325
+ "userId"
2326
+ ],
2327
+ "onDelete": "cascade",
2328
+ "onUpdate": "no action"
2329
+ }
2330
+ },
2331
+ "compositePrimaryKeys": {},
2332
+ "uniqueConstraints": {},
2333
+ "policies": {},
2334
+ "checkConstraints": {},
2335
+ "isRLSEnabled": false
2336
+ },
2337
+ "public.Project": {
2338
+ "name": "Project",
2339
+ "schema": "",
2340
+ "columns": {
2341
+ "createdAt": {
2342
+ "name": "createdAt",
2343
+ "type": "timestamp",
2344
+ "primaryKey": false,
2345
+ "notNull": true,
2346
+ "default": "now()"
2347
+ },
2348
+ "icon": {
2349
+ "name": "icon",
2350
+ "type": "varchar(64)",
2351
+ "primaryKey": false,
2352
+ "notNull": true,
2353
+ "default": "'folder'"
2354
+ },
2355
+ "iconColor": {
2356
+ "name": "iconColor",
2357
+ "type": "varchar(32)",
2358
+ "primaryKey": false,
2359
+ "notNull": true,
2360
+ "default": "'gray'"
2361
+ },
2362
+ "id": {
2363
+ "name": "id",
2364
+ "type": "uuid",
2365
+ "primaryKey": true,
2366
+ "notNull": true,
2367
+ "default": "gen_random_uuid()"
2368
+ },
2369
+ "instructions": {
2370
+ "name": "instructions",
2371
+ "type": "text",
2372
+ "primaryKey": false,
2373
+ "notNull": true,
2374
+ "default": "''"
2375
+ },
2376
+ "name": {
2377
+ "name": "name",
2378
+ "type": "text",
2379
+ "primaryKey": false,
2380
+ "notNull": true
2381
+ },
2382
+ "updatedAt": {
2383
+ "name": "updatedAt",
2384
+ "type": "timestamp",
2385
+ "primaryKey": false,
2386
+ "notNull": true,
2387
+ "default": "now()"
2388
+ },
2389
+ "userId": {
2390
+ "name": "userId",
2391
+ "type": "text",
2392
+ "primaryKey": false,
2393
+ "notNull": true
2394
+ }
2395
+ },
2396
+ "indexes": {
2397
+ "Project_user_id_idx": {
2398
+ "name": "Project_user_id_idx",
2399
+ "columns": [
2400
+ {
2401
+ "expression": "userId",
2402
+ "isExpression": false,
2403
+ "asc": true,
2404
+ "nulls": "last"
2405
+ }
2406
+ ],
2407
+ "isUnique": false,
2408
+ "concurrently": false,
2409
+ "method": "btree",
2410
+ "with": {}
2411
+ }
2412
+ },
2413
+ "foreignKeys": {
2414
+ "Project_userId_user_id_fk": {
2415
+ "name": "Project_userId_user_id_fk",
2416
+ "tableFrom": "Project",
2417
+ "tableTo": "user",
2418
+ "columnsFrom": [
2419
+ "userId"
2420
+ ],
2421
+ "columnsTo": [
2422
+ "id"
2423
+ ],
2424
+ "onDelete": "cascade",
2425
+ "onUpdate": "no action"
2426
+ }
2427
+ },
2428
+ "compositePrimaryKeys": {},
2429
+ "uniqueConstraints": {
2430
+ "Project_id_user": {
2431
+ "name": "Project_id_user",
2432
+ "nullsNotDistinct": false,
2433
+ "columns": [
2434
+ "id",
2435
+ "userId"
2436
+ ]
2437
+ }
2438
+ },
2439
+ "policies": {},
2440
+ "checkConstraints": {},
2441
+ "isRLSEnabled": false
2442
+ },
2443
+ "public.EveSearchText": {
2444
+ "name": "EveSearchText",
2445
+ "schema": "",
2446
+ "columns": {
2447
+ "branchId": {
2448
+ "name": "branchId",
2449
+ "type": "uuid",
2450
+ "primaryKey": false,
2451
+ "notNull": true
2452
+ },
2453
+ "key": {
2454
+ "name": "key",
2455
+ "type": "text",
2456
+ "primaryKey": false,
2457
+ "notNull": true
2458
+ },
2459
+ "ownerId": {
2460
+ "name": "ownerId",
2461
+ "type": "text",
2462
+ "primaryKey": false,
2463
+ "notNull": true
2464
+ },
2465
+ "text": {
2466
+ "name": "text",
2467
+ "type": "text",
2468
+ "primaryKey": false,
2469
+ "notNull": true
2470
+ }
2471
+ },
2472
+ "indexes": {
2473
+ "EveSearchText_owner": {
2474
+ "name": "EveSearchText_owner",
2475
+ "columns": [
2476
+ {
2477
+ "expression": "ownerId",
2478
+ "isExpression": false,
2479
+ "asc": true,
2480
+ "nulls": "last"
2481
+ }
2482
+ ],
2483
+ "isUnique": false,
2484
+ "concurrently": false,
2485
+ "method": "btree",
2486
+ "with": {}
2487
+ },
2488
+ "EveSearchText_content": {
2489
+ "name": "EveSearchText_content",
2490
+ "columns": [
2491
+ {
2492
+ "expression": "to_tsvector('simple', \"text\")",
2493
+ "asc": true,
2494
+ "isExpression": true,
2495
+ "nulls": "last"
2496
+ }
2497
+ ],
2498
+ "isUnique": false,
2499
+ "concurrently": false,
2500
+ "method": "gin",
2501
+ "with": {}
2502
+ }
2503
+ },
2504
+ "foreignKeys": {
2505
+ "EveSearchText_branchId_ownerId_EveConversation_id_ownerId_fk": {
2506
+ "name": "EveSearchText_branchId_ownerId_EveConversation_id_ownerId_fk",
2507
+ "tableFrom": "EveSearchText",
2508
+ "tableTo": "EveConversation",
2509
+ "columnsFrom": [
2510
+ "branchId",
2511
+ "ownerId"
2512
+ ],
2513
+ "columnsTo": [
2514
+ "id",
2515
+ "ownerId"
2516
+ ],
2517
+ "onDelete": "cascade",
2518
+ "onUpdate": "no action"
2519
+ }
2520
+ },
2521
+ "compositePrimaryKeys": {
2522
+ "EveSearchText_branchId_key_pk": {
2523
+ "name": "EveSearchText_branchId_key_pk",
2524
+ "columns": [
2525
+ "branchId",
2526
+ "key"
2527
+ ]
2528
+ }
2529
+ },
2530
+ "uniqueConstraints": {},
2531
+ "policies": {},
2532
+ "checkConstraints": {},
2533
+ "isRLSEnabled": false
2534
+ }
2535
+ },
2536
+ "enums": {},
2537
+ "schemas": {},
2538
+ "sequences": {},
2539
+ "roles": {},
2540
+ "policies": {},
2541
+ "views": {},
2542
+ "_meta": {
2543
+ "columns": {},
2544
+ "schemas": {},
2545
+ "tables": {}
2546
+ }
2547
+ }