chat-js 1.0.0-alpha.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 (1145) hide show
  1. package/README.md +141 -0
  2. package/dist/index.js +74613 -0
  3. package/package.json +71 -0
  4. package/templates/chat-app/.env.example +92 -0
  5. package/templates/chat-app/AGENTS.md +66 -0
  6. package/templates/chat-app/CHANGELOG.md +25 -0
  7. package/templates/chat-app/agent/agent.ts +54 -0
  8. package/templates/chat-app/agent/channels/eve.ts +27 -0
  9. package/templates/chat-app/agent/hooks/activity.ts +37 -0
  10. package/templates/chat-app/agent/hooks/billing.ts +60 -0
  11. package/templates/chat-app/agent/hooks/conversation.ts +34 -0
  12. package/templates/chat-app/agent/hooks/followup-suggestions.ts +2 -0
  13. package/templates/chat-app/agent/hooks/persistent-sandbox.ts +14 -0
  14. package/templates/chat-app/agent/hooks/projects.ts +2 -0
  15. package/templates/chat-app/agent/hooks/search.ts +2 -0
  16. package/templates/chat-app/agent/hooks/tool-selection.ts +23 -0
  17. package/templates/chat-app/agent/instructions/chat.ts +14 -0
  18. package/templates/chat-app/agent/instructions/projects.ts +2 -0
  19. package/templates/chat-app/agent/instructions/tool-selection.ts +23 -0
  20. package/templates/chat-app/agent/sandbox.ts +6 -0
  21. package/templates/chat-app/agent/tools/installed.ts +17 -0
  22. package/templates/chat-app/agent/tools/mcp.ts +2 -0
  23. package/templates/chat-app/app/(auth)/device-login/page.tsx +2 -0
  24. package/templates/chat-app/app/(auth)/login/page.tsx +46 -0
  25. package/templates/chat-app/app/(auth)/register/page.tsx +30 -0
  26. package/templates/chat-app/app/(chat)/api/files/[key]/route.test.ts +78 -0
  27. package/templates/chat-app/app/(chat)/api/files/[key]/route.ts +27 -0
  28. package/templates/chat-app/app/(chat)/api/files/upload/route.ts +2 -0
  29. package/templates/chat-app/app/(chat)/chat/[id]/page.tsx +32 -0
  30. package/templates/chat-app/app/(chat)/layout.tsx +113 -0
  31. package/templates/chat-app/app/(chat)/loading.tsx +11 -0
  32. package/templates/chat-app/app/(chat)/page.tsx +11 -0
  33. package/templates/chat-app/app/(chat)/project/[projectId]/chat/[chatId]/page.tsx +2 -0
  34. package/templates/chat-app/app/(chat)/project/[projectId]/page.tsx +2 -0
  35. package/templates/chat-app/app/(chat)/settings/connectors/[connectorId]/page.tsx +8 -0
  36. package/templates/chat-app/app/(chat)/settings/connectors/page.tsx +6 -0
  37. package/templates/chat-app/app/(chat)/settings/layout.tsx +53 -0
  38. package/templates/chat-app/app/(chat)/settings/loading.tsx +11 -0
  39. package/templates/chat-app/app/(chat)/settings/models/page.tsx +2 -0
  40. package/templates/chat-app/app/(chat)/settings/page.tsx +14 -0
  41. package/templates/chat-app/app/(chat)/share/[id]/page.tsx +25 -0
  42. package/templates/chat-app/app/actions/get-chat-models.ts +6 -0
  43. package/templates/chat-app/app/api/agent-conversation-copies/route.test.ts +190 -0
  44. package/templates/chat-app/app/api/agent-conversation-copies/route.ts +105 -0
  45. package/templates/chat-app/app/api/agent-conversations/[id]/route.test.ts +139 -0
  46. package/templates/chat-app/app/api/agent-conversations/[id]/route.ts +155 -0
  47. package/templates/chat-app/app/api/agent-conversations/route.test.ts +103 -0
  48. package/templates/chat-app/app/api/agent-conversations/route.ts +54 -0
  49. package/templates/chat-app/app/api/agent-response-groups/[id]/route.ts +34 -0
  50. package/templates/chat-app/app/api/agent-response-groups/route.test.ts +147 -0
  51. package/templates/chat-app/app/api/agent-response-groups/route.ts +77 -0
  52. package/templates/chat-app/app/api/agent-workspaces/[id]/route.test.ts +92 -0
  53. package/templates/chat-app/app/api/agent-workspaces/[id]/route.ts +52 -0
  54. package/templates/chat-app/app/api/auth/[...all]/route.ts +4 -0
  55. package/templates/chat-app/app/api/chat-model/route.ts +43 -0
  56. package/templates/chat-app/app/api/cron/cleanup/route.ts +26 -0
  57. package/templates/chat-app/app/api/dev-login/route.test.ts +159 -0
  58. package/templates/chat-app/app/api/dev-login/route.ts +142 -0
  59. package/templates/chat-app/app/api/eve/[...path]/relay-response.ts +20 -0
  60. package/templates/chat-app/app/api/eve/[...path]/route.test.ts +230 -0
  61. package/templates/chat-app/app/api/eve/[...path]/route.ts +327 -0
  62. package/templates/chat-app/app/api/eve-guest/route.ts +2 -0
  63. package/templates/chat-app/app/api/health/route.test.ts +91 -0
  64. package/templates/chat-app/app/api/health/route.ts +58 -0
  65. package/templates/chat-app/app/api/mcp/oauth/callback/route.ts +2 -0
  66. package/templates/chat-app/app/api/trpc/[trpc]/route.ts +17 -0
  67. package/templates/chat-app/app/apple-icon.png +0 -0
  68. package/templates/chat-app/app/chatjs.css +178 -0
  69. package/templates/chat-app/app/editor.css +53 -0
  70. package/templates/chat-app/app/favicon.ico +0 -0
  71. package/templates/chat-app/app/globals.css +141 -0
  72. package/templates/chat-app/app/icon.svg +3 -0
  73. package/templates/chat-app/app/layout.tsx +121 -0
  74. package/templates/chat-app/app/loading.tsx +11 -0
  75. package/templates/chat-app/app/manifest.ts +22 -0
  76. package/templates/chat-app/app/not-found.tsx +25 -0
  77. package/templates/chat-app/app/opengraph-image.png +0 -0
  78. package/templates/chat-app/app/privacy/page.tsx +153 -0
  79. package/templates/chat-app/app/sitemap.ts +19 -0
  80. package/templates/chat-app/app/terms/page.tsx +270 -0
  81. package/templates/chat-app/chat.config.ts +134 -0
  82. package/templates/chat-app/chatjs/core/authentication/contracts.ts +19 -0
  83. package/templates/chat-app/chatjs/core/billing/compose.test.ts +25 -0
  84. package/templates/chat-app/chatjs/core/billing/compose.ts +24 -0
  85. package/templates/chat-app/chatjs/core/billing/contracts.ts +11 -0
  86. package/templates/chat-app/chatjs/core/chat/compose.test.ts +61 -0
  87. package/templates/chat-app/chatjs/core/chat/compose.ts +67 -0
  88. package/templates/chat-app/chatjs/core/chat/contracts.ts +83 -0
  89. package/templates/chat-app/chatjs/core/documents/compose-views.ts +12 -0
  90. package/templates/chat-app/chatjs/core/documents/contracts.ts +91 -0
  91. package/templates/chat-app/chatjs/core/documents/document-definition.test.ts +60 -0
  92. package/templates/chat-app/chatjs/core/documents/document-definition.ts +55 -0
  93. package/templates/chat-app/chatjs/core/documents/ui.ts +67 -0
  94. package/templates/chat-app/chatjs/core/installation/contracts.ts +45 -0
  95. package/templates/chat-app/chatjs/core/installation/plugin.ts +13 -0
  96. package/templates/chat-app/chatjs/core/installation/select.ts +10 -0
  97. package/templates/chat-app/chatjs/core/session/contracts.ts +32 -0
  98. package/templates/chat-app/chatjs/core/tools/define-renderer.tsx +191 -0
  99. package/templates/chat-app/chatjs/core/tools/tool-contract.test.tsx +97 -0
  100. package/templates/chat-app/chatjs/core/tools/tool-definition.test.ts +29 -0
  101. package/templates/chat-app/chatjs/core/tools/tool-definition.ts +30 -0
  102. package/templates/chat-app/chatjs/core/tools/validate-output.ts +10 -0
  103. package/templates/chat-app/chatjs/core/ui/slots.tsx +91 -0
  104. package/templates/chat-app/chatjs/core/uploads/use-attachment-picker.ts +83 -0
  105. package/templates/chat-app/chatjs/generated/code-executor.ts +6 -0
  106. package/templates/chat-app/chatjs/generated/composer-tools.ts +17 -0
  107. package/templates/chat-app/chatjs/generated/document-run.ts +12 -0
  108. package/templates/chat-app/chatjs/generated/document-ui.ts +7 -0
  109. package/templates/chat-app/chatjs/generated/documents.ts +6 -0
  110. package/templates/chat-app/chatjs/generated/installed-auth-ui.ts +5 -0
  111. package/templates/chat-app/chatjs/generated/installed-auth.ts +4 -0
  112. package/templates/chat-app/chatjs/generated/installed-billing.ts +4 -0
  113. package/templates/chat-app/chatjs/generated/installed-chat-ui.ts +23 -0
  114. package/templates/chat-app/chatjs/generated/installed-chat.ts +16 -0
  115. package/templates/chat-app/chatjs/generated/installed-cleanup.ts +6 -0
  116. package/templates/chat-app/chatjs/generated/installed-config.ts +17 -0
  117. package/templates/chat-app/chatjs/generated/installed-database.ts +11 -0
  118. package/templates/chat-app/chatjs/generated/installed-instrumentation.ts +6 -0
  119. package/templates/chat-app/chatjs/generated/installed-layout.ts +11 -0
  120. package/templates/chat-app/chatjs/generated/installed-model-visibility.ts +6 -0
  121. package/templates/chat-app/chatjs/generated/installed-navigation.ts +5 -0
  122. package/templates/chat-app/chatjs/generated/installed-routers.ts +20 -0
  123. package/templates/chat-app/chatjs/generated/installed-session-profiles.ts +6 -0
  124. package/templates/chat-app/chatjs/generated/installed-sign-out.ts +5 -0
  125. package/templates/chat-app/chatjs/generated/installed-signed-out.ts +6 -0
  126. package/templates/chat-app/chatjs/generated/installed-tools.ts +6 -0
  127. package/templates/chat-app/chatjs/generated/installed-uploads.ts +6 -0
  128. package/templates/chat-app/chatjs/generated/installed.ts +18 -0
  129. package/templates/chat-app/chatjs/generated/providers.ts +16 -0
  130. package/templates/chat-app/chatjs/generated/tool-availability.ts +10 -0
  131. package/templates/chat-app/chatjs/generated/tool-definitions.ts +5 -0
  132. package/templates/chat-app/chatjs/generated/tools.ts +34 -0
  133. package/templates/chat-app/chatjs/generated/ui.ts +24 -0
  134. package/templates/chat-app/chatjs/generated/workflow-types.ts +7 -0
  135. package/templates/chat-app/chatjs/plugins/ai-titles/chat.ts +9 -0
  136. package/templates/chat-app/chatjs/plugins/ai-titles/chatjs.json +11 -0
  137. package/templates/chat-app/chatjs/plugins/ai-titles/generate-title.ts +115 -0
  138. package/templates/chat-app/chatjs/plugins/ai-titles/title-queries.ts +59 -0
  139. package/templates/chat-app/chatjs/plugins/attachment-uploads/chatjs.json +23 -0
  140. package/templates/chat-app/chatjs/plugins/attachment-uploads/client-plugin.ts +14 -0
  141. package/templates/chat-app/chatjs/plugins/attachment-uploads/controls.tsx +80 -0
  142. package/templates/chat-app/chatjs/plugins/attachment-uploads/integration.tsx +104 -0
  143. package/templates/chat-app/chatjs/plugins/attachment-uploads/routes/upload.ts +170 -0
  144. package/templates/chat-app/chatjs/plugins/attachment-uploads/upload-prep.ts +115 -0
  145. package/templates/chat-app/chatjs/plugins/attachment-uploads/upload.ts +34 -0
  146. package/templates/chat-app/chatjs/plugins/credits/balance.tsx +23 -0
  147. package/templates/chat-app/chatjs/plugins/credits/billing.ts +19 -0
  148. package/templates/chat-app/chatjs/plugins/credits/chatjs.json +25 -0
  149. package/templates/chat-app/chatjs/plugins/credits/client-plugin.ts +9 -0
  150. package/templates/chat-app/chatjs/plugins/credits/credits-queries.ts +37 -0
  151. package/templates/chat-app/chatjs/plugins/credits/credits-schema.ts +17 -0
  152. package/templates/chat-app/chatjs/plugins/credits/router.ts +15 -0
  153. package/templates/chat-app/chatjs/plugins/credits/server-plugin.ts +5 -0
  154. package/templates/chat-app/chatjs/plugins/credits/use-credits.ts +26 -0
  155. package/templates/chat-app/chatjs/plugins/desktop/auth-form.tsx +81 -0
  156. package/templates/chat-app/chatjs/plugins/desktop/auth-handler.tsx +214 -0
  157. package/templates/chat-app/chatjs/plugins/desktop/auth-server.ts +50 -0
  158. package/templates/chat-app/chatjs/plugins/desktop/auth-ui.tsx +151 -0
  159. package/templates/chat-app/chatjs/plugins/desktop/bridge.ts +45 -0
  160. package/templates/chat-app/chatjs/plugins/desktop/chatjs.json +34 -0
  161. package/templates/chat-app/chatjs/plugins/desktop/client-plugin.ts +9 -0
  162. package/templates/chat-app/chatjs/plugins/desktop/desktop-auth-client.ts +26 -0
  163. package/templates/chat-app/chatjs/plugins/desktop/device-login-page.tsx +211 -0
  164. package/templates/chat-app/chatjs/plugins/desktop/device-login-route.tsx +67 -0
  165. package/templates/chat-app/chatjs/plugins/desktop/electron-auth.ts +78 -0
  166. package/templates/chat-app/chatjs/plugins/desktop/navigation.ts +3 -0
  167. package/templates/chat-app/chatjs/plugins/desktop/protocol.ts +5 -0
  168. package/templates/chat-app/chatjs/plugins/desktop/sign-out.ts +18 -0
  169. package/templates/chat-app/chatjs/plugins/feedback/chat.ts +13 -0
  170. package/templates/chat-app/chatjs/plugins/feedback/chatjs.json +26 -0
  171. package/templates/chat-app/chatjs/plugins/feedback/client-plugin.ts +9 -0
  172. package/templates/chat-app/chatjs/plugins/feedback/feedback-actions.tsx +68 -0
  173. package/templates/chat-app/chatjs/plugins/feedback/feedback-queries.ts +116 -0
  174. package/templates/chat-app/chatjs/plugins/feedback/feedback-schema.ts +15 -0
  175. package/templates/chat-app/chatjs/plugins/feedback/message-vote-actions.tsx +50 -0
  176. package/templates/chat-app/chatjs/plugins/feedback/router.ts +52 -0
  177. package/templates/chat-app/chatjs/plugins/feedback/server-plugin.ts +8 -0
  178. package/templates/chat-app/chatjs/plugins/feedback/vote-message.ts +52 -0
  179. package/templates/chat-app/chatjs/plugins/followup-suggestions/chat.ts +13 -0
  180. package/templates/chat-app/chatjs/plugins/followup-suggestions/chatjs.json +35 -0
  181. package/templates/chat-app/chatjs/plugins/followup-suggestions/client-plugin.ts +9 -0
  182. package/templates/chat-app/chatjs/plugins/followup-suggestions/followup-completion.ts +19 -0
  183. package/templates/chat-app/chatjs/plugins/followup-suggestions/followup-context.ts +36 -0
  184. package/templates/chat-app/chatjs/plugins/followup-suggestions/followup-hook.ts +59 -0
  185. package/templates/chat-app/chatjs/plugins/followup-suggestions/followup-queries.ts +79 -0
  186. package/templates/chat-app/chatjs/plugins/followup-suggestions/followup-schema.ts +31 -0
  187. package/templates/chat-app/chatjs/plugins/followup-suggestions/followup-suggestions-view.tsx +61 -0
  188. package/templates/chat-app/chatjs/plugins/followup-suggestions/generate-suggestions.ts +69 -0
  189. package/templates/chat-app/chatjs/plugins/followup-suggestions/router.ts +31 -0
  190. package/templates/chat-app/chatjs/plugins/followup-suggestions/server-plugin.ts +8 -0
  191. package/templates/chat-app/chatjs/plugins/followup-suggestions/suggestion-output.ts +5 -0
  192. package/templates/chat-app/chatjs/plugins/followup-suggestions/suggestions.tsx +29 -0
  193. package/templates/chat-app/chatjs/plugins/followup-suggestions/use-followups.ts +42 -0
  194. package/templates/chat-app/chatjs/plugins/guest-chat/chatjs.json +33 -0
  195. package/templates/chat-app/chatjs/plugins/guest-chat/cleanup.ts +7 -0
  196. package/templates/chat-app/chatjs/plugins/guest-chat/guest-auth.ts +157 -0
  197. package/templates/chat-app/chatjs/plugins/guest-chat/guest-body.ts +34 -0
  198. package/templates/chat-app/chatjs/plugins/guest-chat/guest-cleanup-auth.ts +19 -0
  199. package/templates/chat-app/chatjs/plugins/guest-chat/guest-cleanup.ts +139 -0
  200. package/templates/chat-app/chatjs/plugins/guest-chat/guest-credential.ts +89 -0
  201. package/templates/chat-app/chatjs/plugins/guest-chat/guest-ip.ts +79 -0
  202. package/templates/chat-app/chatjs/plugins/guest-chat/guest-model.ts +106 -0
  203. package/templates/chat-app/chatjs/plugins/guest-chat/guest-policy.ts +20 -0
  204. package/templates/chat-app/chatjs/plugins/guest-chat/guest-queries.ts +303 -0
  205. package/templates/chat-app/chatjs/plugins/guest-chat/guest-scheduler.ts +114 -0
  206. package/templates/chat-app/chatjs/plugins/guest-chat/guest-schema.ts +74 -0
  207. package/templates/chat-app/chatjs/plugins/guest-chat/routes/create-session.ts +141 -0
  208. package/templates/chat-app/chatjs/plugins/guest-chat/server-plugin.ts +12 -0
  209. package/templates/chat-app/chatjs/plugins/guest-chat/session-profile.ts +11 -0
  210. package/templates/chat-app/chatjs/plugins/guest-chat/signed-out.tsx +363 -0
  211. package/templates/chat-app/chatjs/plugins/langfuse/chatjs.json +14 -0
  212. package/templates/chat-app/chatjs/plugins/langfuse/credentials.ts +22 -0
  213. package/templates/chat-app/chatjs/plugins/langfuse/instrumentation.ts +22 -0
  214. package/templates/chat-app/chatjs/plugins/langfuse/server-plugin.ts +5 -0
  215. package/templates/chat-app/chatjs/plugins/mcp/chatjs.json +55 -0
  216. package/templates/chat-app/chatjs/plugins/mcp/client-plugin.ts +13 -0
  217. package/templates/chat-app/chatjs/plugins/mcp/composer.tsx +143 -0
  218. package/templates/chat-app/chatjs/plugins/mcp/connector-menu-item.tsx +25 -0
  219. package/templates/chat-app/chatjs/plugins/mcp/db/encrypted-text.ts +78 -0
  220. package/templates/chat-app/chatjs/plugins/mcp/db/mcp-connector-queries.ts +161 -0
  221. package/templates/chat-app/chatjs/plugins/mcp/db/mcp-oauth-lock.ts +118 -0
  222. package/templates/chat-app/chatjs/plugins/mcp/db/mcp-oauth-queries.ts +282 -0
  223. package/templates/chat-app/chatjs/plugins/mcp/db/mcp-queries.ts +21 -0
  224. package/templates/chat-app/chatjs/plugins/mcp/db/mcp-schema.ts +81 -0
  225. package/templates/chat-app/chatjs/plugins/mcp/mcp-env.ts +26 -0
  226. package/templates/chat-app/chatjs/plugins/mcp/oauth/cache.ts +147 -0
  227. package/templates/chat-app/chatjs/plugins/mcp/oauth/mcp-client-manager.ts +95 -0
  228. package/templates/chat-app/chatjs/plugins/mcp/oauth/mcp-client.ts +477 -0
  229. package/templates/chat-app/chatjs/plugins/mcp/oauth/mcp-fetch.ts +43 -0
  230. package/templates/chat-app/chatjs/plugins/mcp/oauth/mcp-oauth-provider.ts +565 -0
  231. package/templates/chat-app/chatjs/plugins/mcp/oauth/oauth-authorization-required-error.ts +33 -0
  232. package/templates/chat-app/chatjs/plugins/mcp/router.ts +852 -0
  233. package/templates/chat-app/chatjs/plugins/mcp/routes/connector-page.tsx +72 -0
  234. package/templates/chat-app/chatjs/plugins/mcp/routes/connectors-page.tsx +58 -0
  235. package/templates/chat-app/chatjs/plugins/mcp/routes/oauth-callback.ts +180 -0
  236. package/templates/chat-app/chatjs/plugins/mcp/runtime/agent-tools.ts +113 -0
  237. package/templates/chat-app/chatjs/plugins/mcp/runtime/mcp-adapter.ts +94 -0
  238. package/templates/chat-app/chatjs/plugins/mcp/runtime/mcp-tools.ts +459 -0
  239. package/templates/chat-app/chatjs/plugins/mcp/search/mcp-search-params.server.ts +19 -0
  240. package/templates/chat-app/chatjs/plugins/mcp/search/mcp-search-params.ts +16 -0
  241. package/templates/chat-app/chatjs/plugins/mcp/server-plugin.ts +5 -0
  242. package/templates/chat-app/chatjs/plugins/mcp/settings.tsx +10 -0
  243. package/templates/chat-app/chatjs/plugins/mcp/setup.ts +18 -0
  244. package/templates/chat-app/chatjs/plugins/mcp/ui/connector-header.tsx +65 -0
  245. package/templates/chat-app/chatjs/plugins/mcp/ui/connectors-settings.tsx +533 -0
  246. package/templates/chat-app/chatjs/plugins/mcp/ui/mcp-connect-dialog.tsx +220 -0
  247. package/templates/chat-app/chatjs/plugins/mcp/ui/mcp-create-dialog.tsx +355 -0
  248. package/templates/chat-app/chatjs/plugins/mcp/ui/mcp-details-page.tsx +575 -0
  249. package/templates/chat-app/chatjs/plugins/mcp/ui/transport-select.tsx +46 -0
  250. package/templates/chat-app/chatjs/plugins/model-preferences/apply-model-preferences.ts +18 -0
  251. package/templates/chat-app/chatjs/plugins/model-preferences/chatjs.json +31 -0
  252. package/templates/chat-app/chatjs/plugins/model-preferences/client-plugin.ts +11 -0
  253. package/templates/chat-app/chatjs/plugins/model-preferences/model-preferences-queries.ts +40 -0
  254. package/templates/chat-app/chatjs/plugins/model-preferences/model-preferences-schema.ts +36 -0
  255. package/templates/chat-app/chatjs/plugins/model-preferences/model-row.tsx +60 -0
  256. package/templates/chat-app/chatjs/plugins/model-preferences/models-page.tsx +55 -0
  257. package/templates/chat-app/chatjs/plugins/model-preferences/models-settings.tsx +60 -0
  258. package/templates/chat-app/chatjs/plugins/model-preferences/models-table.tsx +198 -0
  259. package/templates/chat-app/chatjs/plugins/model-preferences/router.ts +46 -0
  260. package/templates/chat-app/chatjs/plugins/model-preferences/server-plugin.ts +8 -0
  261. package/templates/chat-app/chatjs/plugins/model-preferences/settings-link.tsx +52 -0
  262. package/templates/chat-app/chatjs/plugins/model-preferences/use-model-preferences.ts +26 -0
  263. package/templates/chat-app/chatjs/plugins/projects/chat.ts +55 -0
  264. package/templates/chat-app/chatjs/plugins/projects/chatjs.json +50 -0
  265. package/templates/chat-app/chatjs/plugins/projects/client-plugin.ts +21 -0
  266. package/templates/chat-app/chatjs/plugins/projects/conversation-hook.ts +44 -0
  267. package/templates/chat-app/chatjs/plugins/projects/creation.ts +28 -0
  268. package/templates/chat-app/chatjs/plugins/projects/db/project-queries.ts +180 -0
  269. package/templates/chat-app/chatjs/plugins/projects/db/project-schema.ts +61 -0
  270. package/templates/chat-app/chatjs/plugins/projects/instructions-state.ts +8 -0
  271. package/templates/chat-app/chatjs/plugins/projects/instructions.ts +19 -0
  272. package/templates/chat-app/chatjs/plugins/projects/project-icons.ts +75 -0
  273. package/templates/chat-app/chatjs/plugins/projects/router.ts +316 -0
  274. package/templates/chat-app/chatjs/plugins/projects/routes/project-chat-page.tsx +37 -0
  275. package/templates/chat-app/chatjs/plugins/projects/routes/project-page.tsx +71 -0
  276. package/templates/chat-app/chatjs/plugins/projects/server-plugin.ts +8 -0
  277. package/templates/chat-app/chatjs/plugins/projects/ui/chat-contributions.tsx +102 -0
  278. package/templates/chat-app/chatjs/plugins/projects/ui/delete-project-dialog.tsx +118 -0
  279. package/templates/chat-app/chatjs/plugins/projects/ui/eve-move-project-dialog.tsx +152 -0
  280. package/templates/chat-app/chatjs/plugins/projects/ui/eve-project-home.tsx +202 -0
  281. package/templates/chat-app/chatjs/plugins/projects/ui/move-menu-item.tsx +22 -0
  282. package/templates/chat-app/chatjs/plugins/projects/ui/project-chat-item.tsx +165 -0
  283. package/templates/chat-app/chatjs/plugins/projects/ui/project-config.tsx +75 -0
  284. package/templates/chat-app/chatjs/plugins/projects/ui/project-details-dialog.tsx +200 -0
  285. package/templates/chat-app/chatjs/plugins/projects/ui/project-history.tsx +57 -0
  286. package/templates/chat-app/chatjs/plugins/projects/ui/project-icon-picker.tsx +101 -0
  287. package/templates/chat-app/chatjs/plugins/projects/ui/project-icon.tsx +92 -0
  288. package/templates/chat-app/chatjs/plugins/projects/ui/project-instructions-dialog.tsx +86 -0
  289. package/templates/chat-app/chatjs/plugins/projects/ui/project-menu-items.tsx +27 -0
  290. package/templates/chat-app/chatjs/plugins/projects/ui/sidebar-project-item.tsx +111 -0
  291. package/templates/chat-app/chatjs/plugins/projects/ui/sidebar-projects.tsx +110 -0
  292. package/templates/chat-app/chatjs/plugins/projects/use-projects.ts +87 -0
  293. package/templates/chat-app/chatjs/plugins/search/backfill.ts +187 -0
  294. package/templates/chat-app/chatjs/plugins/search/chat.ts +14 -0
  295. package/templates/chat-app/chatjs/plugins/search/chatjs.json +34 -0
  296. package/templates/chat-app/chatjs/plugins/search/client-plugin.ts +9 -0
  297. package/templates/chat-app/chatjs/plugins/search/router.ts +46 -0
  298. package/templates/chat-app/chatjs/plugins/search/search-backfill.ts +40 -0
  299. package/templates/chat-app/chatjs/plugins/search/search-chats.tsx +250 -0
  300. package/templates/chat-app/chatjs/plugins/search/search-hook.ts +121 -0
  301. package/templates/chat-app/chatjs/plugins/search/search-queries.ts +298 -0
  302. package/templates/chat-app/chatjs/plugins/search/search-results-view.tsx +215 -0
  303. package/templates/chat-app/chatjs/plugins/search/search-schema.ts +33 -0
  304. package/templates/chat-app/chatjs/plugins/search/search-surface-props.ts +8 -0
  305. package/templates/chat-app/chatjs/plugins/search/search-surface.tsx +28 -0
  306. package/templates/chat-app/chatjs/plugins/search/search-text.ts +60 -0
  307. package/templates/chat-app/chatjs/plugins/search/server-plugin.ts +5 -0
  308. package/templates/chat-app/chatjs/plugins/search/sidebar-item.tsx +13 -0
  309. package/templates/chat-app/chatjs/plugins/search/use-debounced-search.ts +23 -0
  310. package/templates/chat-app/chatjs/plugins/sharing/chat.ts +7 -0
  311. package/templates/chat-app/chatjs/plugins/sharing/chatjs.json +31 -0
  312. package/templates/chat-app/chatjs/plugins/sharing/client-plugin.ts +12 -0
  313. package/templates/chat-app/chatjs/plugins/sharing/public-conversation.ts +48 -0
  314. package/templates/chat-app/chatjs/plugins/sharing/queries.ts +72 -0
  315. package/templates/chat-app/chatjs/plugins/sharing/router.ts +27 -0
  316. package/templates/chat-app/chatjs/plugins/sharing/server-plugin.ts +5 -0
  317. package/templates/chat-app/chatjs/plugins/sharing/ui/chat-contributions.tsx +54 -0
  318. package/templates/chat-app/chatjs/plugins/sharing/ui/share-button.tsx +319 -0
  319. package/templates/chat-app/chatjs/plugins/sharing/ui/share-dialog.tsx +57 -0
  320. package/templates/chat-app/chatjs/plugins/sharing/ui/share-menu-item.tsx +20 -0
  321. package/templates/chat-app/chatjs/plugins/sharing/ui/share-menu-surface.tsx +63 -0
  322. package/templates/chat-app/chatjs/plugins/sharing/ui/shared-badge.tsx +21 -0
  323. package/templates/chat-app/chatjs/plugins/sharing/ui/shared-page.tsx +69 -0
  324. package/templates/chat-app/chatjs/plugins/sharing/ui/transcript-messages.tsx +42 -0
  325. package/templates/chat-app/chatjs/plugins/vercel-analytics/chatjs.json +15 -0
  326. package/templates/chat-app/chatjs/plugins/vercel-analytics/client-plugin.ts +9 -0
  327. package/templates/chat-app/chatjs/plugins/vercel-analytics/component.tsx +5 -0
  328. package/templates/chat-app/chatjs/plugins/vercel-speed-insights/chatjs.json +15 -0
  329. package/templates/chat-app/chatjs/plugins/vercel-speed-insights/client-plugin.ts +9 -0
  330. package/templates/chat-app/chatjs/plugins/vercel-speed-insights/component.tsx +4 -0
  331. package/templates/chat-app/chatjs/providers/gateway-defaults.ts +43 -0
  332. package/templates/chat-app/chatjs/providers/gateway.ts +136 -0
  333. package/templates/chat-app/chatjs/providers/sandbox/adapter.ts +232 -0
  334. package/templates/chat-app/chatjs/providers/sandbox/options.ts +13 -0
  335. package/templates/chat-app/chatjs/providers/sandbox/persistent.ts +258 -0
  336. package/templates/chat-app/chatjs/providers/sandbox/provider.ts +27 -0
  337. package/templates/chat-app/chatjs/providers/sandbox/vercel-sandbox-env.ts +22 -0
  338. package/templates/chat-app/chatjs/providers/storage-options.ts +15 -0
  339. package/templates/chat-app/chatjs/providers/storage.ts +13 -0
  340. package/templates/chat-app/chatjs/tools/_shared/code-execution/code-execution-chart.tsx +83 -0
  341. package/templates/chat-app/chatjs/tools/_shared/code-execution/interactive-chart-impl.tsx +290 -0
  342. package/templates/chat-app/chatjs/tools/_shared/code-execution/interactive-charts.tsx +24 -0
  343. package/templates/chat-app/chatjs/tools/_shared/code-execution/javascript.ts +222 -0
  344. package/templates/chat-app/chatjs/tools/_shared/code-execution/python.ts +381 -0
  345. package/templates/chat-app/chatjs/tools/_shared/code-execution/types.ts +27 -0
  346. package/templates/chat-app/chatjs/tools/_shared/lib/define-tool-renderer.test.ts +194 -0
  347. package/templates/chat-app/chatjs/tools/code-documents/assistant-actions.ts +16 -0
  348. package/templates/chat-app/chatjs/tools/code-documents/chatjs.json +20 -0
  349. package/templates/chat-app/chatjs/tools/code-documents/configuration-schema.ts +7 -0
  350. package/templates/chat-app/chatjs/tools/code-documents/definition.ts +9 -0
  351. package/templates/chat-app/chatjs/tools/code-documents/document.tsx +33 -0
  352. package/templates/chat-app/chatjs/tools/code-documents/editor.tsx +144 -0
  353. package/templates/chat-app/chatjs/tools/code-documents/guidelines.ts +15 -0
  354. package/templates/chat-app/chatjs/tools/code-documents/tool.ts +54 -0
  355. package/templates/chat-app/chatjs/tools/code-execution/chatjs.json +21 -0
  356. package/templates/chat-app/chatjs/tools/code-execution/python.test.ts +207 -0
  357. package/templates/chat-app/chatjs/tools/code-execution/renderer.test.tsx +142 -0
  358. package/templates/chat-app/chatjs/tools/code-execution/renderer.tsx +68 -0
  359. package/templates/chat-app/chatjs/tools/code-execution/schemas.ts +23 -0
  360. package/templates/chat-app/chatjs/tools/code-execution/tool.ts +93 -0
  361. package/templates/chat-app/chatjs/tools/deep-research/agent.ts +18 -0
  362. package/templates/chat-app/chatjs/tools/deep-research/availability.ts +23 -0
  363. package/templates/chat-app/chatjs/tools/deep-research/chatjs.json +21 -0
  364. package/templates/chat-app/chatjs/tools/deep-research/configuration-schema.ts +36 -0
  365. package/templates/chat-app/chatjs/tools/deep-research/configuration.ts +22 -0
  366. package/templates/chat-app/chatjs/tools/deep-research/progress-panel.tsx +121 -0
  367. package/templates/chat-app/chatjs/tools/deep-research/progress.tsx +23 -0
  368. package/templates/chat-app/chatjs/tools/deep-research/prompts.ts +280 -0
  369. package/templates/chat-app/chatjs/tools/deep-research/renderer.tsx +49 -0
  370. package/templates/chat-app/chatjs/tools/deep-research/schemas.ts +46 -0
  371. package/templates/chat-app/chatjs/tools/deep-research/search-updates.ts +76 -0
  372. package/templates/chat-app/chatjs/tools/deep-research/steps.ts +92 -0
  373. package/templates/chat-app/chatjs/tools/deep-research/task.tsx +69 -0
  374. package/templates/chat-app/chatjs/tools/deep-research/tasks.tsx +53 -0
  375. package/templates/chat-app/chatjs/tools/deep-research/tool.ts +1 -0
  376. package/templates/chat-app/chatjs/tools/delete-document/availability.ts +13 -0
  377. package/templates/chat-app/chatjs/tools/delete-document/chatjs.json +9 -0
  378. package/templates/chat-app/chatjs/tools/delete-document/execute.ts +78 -0
  379. package/templates/chat-app/chatjs/tools/delete-document/schemas.ts +18 -0
  380. package/templates/chat-app/chatjs/tools/delete-document/tool.ts +49 -0
  381. package/templates/chat-app/chatjs/tools/generate-image/chatjs.json +22 -0
  382. package/templates/chat-app/chatjs/tools/generate-image/configuration-schema.ts +9 -0
  383. package/templates/chat-app/chatjs/tools/generate-image/image-errors.ts +59 -0
  384. package/templates/chat-app/chatjs/tools/generate-image/image-generation.ts +257 -0
  385. package/templates/chat-app/chatjs/tools/generate-image/image-input.ts +47 -0
  386. package/templates/chat-app/chatjs/tools/generate-image/image-model.ts +58 -0
  387. package/templates/chat-app/chatjs/tools/generate-image/image-request.ts +140 -0
  388. package/templates/chat-app/chatjs/tools/generate-image/renderer.tsx +102 -0
  389. package/templates/chat-app/chatjs/tools/generate-image/schemas.ts +16 -0
  390. package/templates/chat-app/chatjs/tools/generate-image/tool.test.ts +229 -0
  391. package/templates/chat-app/chatjs/tools/generate-image/tool.ts +21 -0
  392. package/templates/chat-app/chatjs/tools/generate-video/chatjs.json +22 -0
  393. package/templates/chat-app/chatjs/tools/generate-video/configuration-schema.ts +9 -0
  394. package/templates/chat-app/chatjs/tools/generate-video/renderer.tsx +55 -0
  395. package/templates/chat-app/chatjs/tools/generate-video/schemas.ts +28 -0
  396. package/templates/chat-app/chatjs/tools/generate-video/tool.test.ts +123 -0
  397. package/templates/chat-app/chatjs/tools/generate-video/tool.ts +288 -0
  398. package/templates/chat-app/chatjs/tools/get-weather/chatjs.json +14 -0
  399. package/templates/chat-app/chatjs/tools/get-weather/definition.ts +10 -0
  400. package/templates/chat-app/chatjs/tools/get-weather/renderer.test.tsx +57 -0
  401. package/templates/chat-app/chatjs/tools/get-weather/renderer.tsx +290 -0
  402. package/templates/chat-app/chatjs/tools/get-weather/schemas.ts +51 -0
  403. package/templates/chat-app/chatjs/tools/get-weather/tool.ts +34 -0
  404. package/templates/chat-app/chatjs/tools/read-document/chatjs.json +8 -0
  405. package/templates/chat-app/chatjs/tools/read-document/tool.ts +27 -0
  406. package/templates/chat-app/chatjs/tools/retrieve-url/chatjs.json +11 -0
  407. package/templates/chat-app/chatjs/tools/retrieve-url/renderer.tsx +200 -0
  408. package/templates/chat-app/chatjs/tools/retrieve-url/retrieve-url-env.ts +11 -0
  409. package/templates/chat-app/chatjs/tools/retrieve-url/schemas.ts +24 -0
  410. package/templates/chat-app/chatjs/tools/retrieve-url/tool.test.ts +144 -0
  411. package/templates/chat-app/chatjs/tools/retrieve-url/tool.ts +169 -0
  412. package/templates/chat-app/chatjs/tools/saved-code-execution/chatjs.json +12 -0
  413. package/templates/chat-app/chatjs/tools/saved-code-execution/document-runs.ts +31 -0
  414. package/templates/chat-app/chatjs/tools/saved-code-execution/document.tsx +84 -0
  415. package/templates/chat-app/chatjs/tools/saved-code-execution/execute.ts +126 -0
  416. package/templates/chat-app/chatjs/tools/saved-code-execution/renderer.tsx +30 -0
  417. package/templates/chat-app/chatjs/tools/saved-code-execution/result.tsx +42 -0
  418. package/templates/chat-app/chatjs/tools/saved-code-execution/schemas.ts +82 -0
  419. package/templates/chat-app/chatjs/tools/saved-code-execution/tool.ts +12 -0
  420. package/templates/chat-app/chatjs/tools/sheet-documents/assistant-actions.ts +22 -0
  421. package/templates/chat-app/chatjs/tools/sheet-documents/chatjs.json +20 -0
  422. package/templates/chat-app/chatjs/tools/sheet-documents/configuration-schema.ts +10 -0
  423. package/templates/chat-app/chatjs/tools/sheet-documents/definition.ts +9 -0
  424. package/templates/chat-app/chatjs/tools/sheet-documents/document.tsx +41 -0
  425. package/templates/chat-app/chatjs/tools/sheet-documents/editor.tsx +180 -0
  426. package/templates/chat-app/chatjs/tools/sheet-documents/guidelines.ts +5 -0
  427. package/templates/chat-app/chatjs/tools/sheet-documents/tool.ts +54 -0
  428. package/templates/chat-app/chatjs/tools/tavily-search/chatjs.json +19 -0
  429. package/templates/chat-app/chatjs/tools/tavily-search/renderer.tsx +25 -0
  430. package/templates/chat-app/chatjs/tools/tavily-search/schemas.ts +39 -0
  431. package/templates/chat-app/chatjs/tools/tavily-search/tavily-search-env.ts +11 -0
  432. package/templates/chat-app/chatjs/tools/tavily-search/tool.test.ts +114 -0
  433. package/templates/chat-app/chatjs/tools/tavily-search/tool.ts +143 -0
  434. package/templates/chat-app/chatjs/tools/text-documents/assistant-actions.ts +12 -0
  435. package/templates/chat-app/chatjs/tools/text-documents/chatjs.json +20 -0
  436. package/templates/chat-app/chatjs/tools/text-documents/comparison.tsx +72 -0
  437. package/templates/chat-app/chatjs/tools/text-documents/configuration-schema.ts +7 -0
  438. package/templates/chat-app/chatjs/tools/text-documents/definition.ts +9 -0
  439. package/templates/chat-app/chatjs/tools/text-documents/diffview.tsx +214 -0
  440. package/templates/chat-app/chatjs/tools/text-documents/document.tsx +46 -0
  441. package/templates/chat-app/chatjs/tools/text-documents/editor-config.ts +53 -0
  442. package/templates/chat-app/chatjs/tools/text-documents/editor.tsx +139 -0
  443. package/templates/chat-app/chatjs/tools/text-documents/guidelines.ts +7 -0
  444. package/templates/chat-app/chatjs/tools/text-documents/tool.ts +54 -0
  445. package/templates/chat-app/chatjs/tools/word-count/chatjs.json +14 -0
  446. package/templates/chat-app/chatjs/tools/word-count/definition.ts +10 -0
  447. package/templates/chat-app/chatjs/tools/word-count/renderer.tsx +64 -0
  448. package/templates/chat-app/chatjs/tools/word-count/schemas.ts +13 -0
  449. package/templates/chat-app/chatjs/tools/word-count/tool.ts +45 -0
  450. package/templates/chat-app/components/account-form.tsx +22 -0
  451. package/templates/chat-app/components/ai-elements/context-hover.radix.tsx +15 -0
  452. package/templates/chat-app/components/ai-elements/context-hover.tsx +17 -0
  453. package/templates/chat-app/components/ai-elements/context.tsx +405 -0
  454. package/templates/chat-app/components/ai-elements/parse-incomplete-markdown.test.ts +34 -0
  455. package/templates/chat-app/components/ai-elements/parse-incomplete-markdown.tsx +138 -0
  456. package/templates/chat-app/components/ai-elements/response.tsx +51 -0
  457. package/templates/chat-app/components/ai-elements/suggestion.tsx +59 -0
  458. package/templates/chat-app/components/app-sidebar.tsx +94 -0
  459. package/templates/chat-app/components/attachment-card-view.tsx +53 -0
  460. package/templates/chat-app/components/attachment-card.tsx +92 -0
  461. package/templates/chat-app/components/attachment-list.tsx +188 -0
  462. package/templates/chat-app/components/attachment-preview-trigger.radix.tsx +12 -0
  463. package/templates/chat-app/components/attachment-preview-trigger.tsx +8 -0
  464. package/templates/chat-app/components/auth-card-skeleton.tsx +52 -0
  465. package/templates/chat-app/components/auth-form-view.tsx +72 -0
  466. package/templates/chat-app/components/auth-providers.tsx +201 -0
  467. package/templates/chat-app/components/chat/chat-layout.tsx +129 -0
  468. package/templates/chat-app/components/chat/chat-welcome-view.tsx +34 -0
  469. package/templates/chat-app/components/chat-header-view.tsx +36 -0
  470. package/templates/chat-app/components/chat-loading-shell.tsx +24 -0
  471. package/templates/chat-app/components/chat-menu-items.tsx +43 -0
  472. package/templates/chat-app/components/chat-message-view.tsx +39 -0
  473. package/templates/chat-app/components/chat-rename-dialog.tsx +156 -0
  474. package/templates/chat-app/components/chat-sidebar-view.tsx +53 -0
  475. package/templates/chat-app/components/chat-slots.tsx +24 -0
  476. package/templates/chat-app/components/client-snapshot.ts +32 -0
  477. package/templates/chat-app/components/clone-chat-button-view.tsx +43 -0
  478. package/templates/chat-app/components/code-snippet.tsx +35 -0
  479. package/templates/chat-app/components/composer/active-tool.tsx +48 -0
  480. package/templates/chat-app/components/composer/composer-attachments.tsx +26 -0
  481. package/templates/chat-app/components/composer/composer-menu.tsx +92 -0
  482. package/templates/chat-app/components/composer/control.ts +20 -0
  483. package/templates/chat-app/components/composer/editor.css +96 -0
  484. package/templates/chat-app/components/composer/prompt-form.tsx +49 -0
  485. package/templates/chat-app/components/composer/submission.ts +10 -0
  486. package/templates/chat-app/components/composer/tool-controls.tsx +139 -0
  487. package/templates/chat-app/components/composer/tool-display.ts +19 -0
  488. package/templates/chat-app/components/composer/tool-menu-item.radix.tsx +24 -0
  489. package/templates/chat-app/components/composer/tool-menu-item.tsx +25 -0
  490. package/templates/chat-app/components/context-bar.tsx +39 -0
  491. package/templates/chat-app/components/controlled-chat-composer.tsx +197 -0
  492. package/templates/chat-app/components/custom-content.ts +17 -0
  493. package/templates/chat-app/components/dev-login-tool.tsx +29 -0
  494. package/templates/chat-app/components/dialog-button.radix.tsx +13 -0
  495. package/templates/chat-app/components/dialog-button.tsx +11 -0
  496. package/templates/chat-app/components/disclosure-button.radix.tsx +13 -0
  497. package/templates/chat-app/components/disclosure-button.tsx +13 -0
  498. package/templates/chat-app/components/document-skeleton.tsx +33 -0
  499. package/templates/chat-app/components/drawer-close-button.radix.tsx +13 -0
  500. package/templates/chat-app/components/drawer-close-button.tsx +11 -0
  501. package/templates/chat-app/components/editable-bubble-props.ts +6 -0
  502. package/templates/chat-app/components/editable-bubble.radix.tsx +18 -0
  503. package/templates/chat-app/components/editable-bubble.tsx +16 -0
  504. package/templates/chat-app/components/eve/eve-artifact-layout.tsx +722 -0
  505. package/templates/chat-app/components/eve/eve-attachment.tsx +62 -0
  506. package/templates/chat-app/components/eve/eve-chat-error.tsx +16 -0
  507. package/templates/chat-app/components/eve/eve-chat-header.tsx +169 -0
  508. package/templates/chat-app/components/eve/eve-chat-page.tsx +120 -0
  509. package/templates/chat-app/components/eve/eve-composer.tsx +184 -0
  510. package/templates/chat-app/components/eve/eve-conversation.tsx +995 -0
  511. package/templates/chat-app/components/eve/eve-copy-button.tsx +165 -0
  512. package/templates/chat-app/components/eve/eve-creation-recovery.tsx +247 -0
  513. package/templates/chat-app/components/eve/eve-delete-dialog.tsx +195 -0
  514. package/templates/chat-app/components/eve/eve-deletion-provider.tsx +108 -0
  515. package/templates/chat-app/components/eve/eve-document-actions.tsx +124 -0
  516. package/templates/chat-app/components/eve/eve-document-assistant-actions.tsx +157 -0
  517. package/templates/chat-app/components/eve/eve-document-body.tsx +29 -0
  518. package/templates/chat-app/components/eve/eve-document-context.tsx +12 -0
  519. package/templates/chat-app/components/eve/eve-document-preview.tsx +128 -0
  520. package/templates/chat-app/components/eve/eve-document-tool.tsx +190 -0
  521. package/templates/chat-app/components/eve/eve-fork-recovery.tsx +79 -0
  522. package/templates/chat-app/components/eve/eve-history-list.tsx +303 -0
  523. package/templates/chat-app/components/eve/eve-history.tsx +25 -0
  524. package/templates/chat-app/components/eve/eve-initial-message.tsx +24 -0
  525. package/templates/chat-app/components/eve/eve-logical-context.tsx +46 -0
  526. package/templates/chat-app/components/eve/eve-logical-group-recovery.tsx +191 -0
  527. package/templates/chat-app/components/eve/eve-logical-navigation.tsx +38 -0
  528. package/templates/chat-app/components/eve/eve-mcp-result.tsx +41 -0
  529. package/templates/chat-app/components/eve/eve-message-part.tsx +176 -0
  530. package/templates/chat-app/components/eve/eve-messages.tsx +389 -0
  531. package/templates/chat-app/components/eve/eve-model-picker.tsx +35 -0
  532. package/templates/chat-app/components/eve/eve-optimistic-response-group.tsx +70 -0
  533. package/templates/chat-app/components/eve/eve-pending-input.tsx +156 -0
  534. package/templates/chat-app/components/eve/eve-response-group-cards.tsx +83 -0
  535. package/templates/chat-app/components/eve/eve-runtime-provider.tsx +372 -0
  536. package/templates/chat-app/components/eve/eve-thinking-message.tsx +42 -0
  537. package/templates/chat-app/components/eve/eve-tool-result.tsx +63 -0
  538. package/templates/chat-app/components/eve/new-conversation-view.tsx +55 -0
  539. package/templates/chat-app/components/eve/new-eve-conversation.tsx +31 -0
  540. package/templates/chat-app/components/eve/use-document-draft.ts +281 -0
  541. package/templates/chat-app/components/eve/use-eve-attachments.ts +34 -0
  542. package/templates/chat-app/components/eve/use-eve-composer-draft.ts +149 -0
  543. package/templates/chat-app/components/eve/use-eve-delivery-receipt.ts +58 -0
  544. package/templates/chat-app/components/eve/use-eve-fork.ts +537 -0
  545. package/templates/chat-app/components/eve/use-eve-message-delivery.ts +171 -0
  546. package/templates/chat-app/components/eve/use-eve-metadata-mutations.ts +61 -0
  547. package/templates/chat-app/components/eve/use-logical-commands.ts +16 -0
  548. package/templates/chat-app/components/eve/use-new-eve-conversation.tsx +342 -0
  549. package/templates/chat-app/components/favicon-group.tsx +50 -0
  550. package/templates/chat-app/components/favicon.tsx +54 -0
  551. package/templates/chat-app/components/get-google-favicon-url.tsx +21 -0
  552. package/templates/chat-app/components/get-url-without-params.ts +9 -0
  553. package/templates/chat-app/components/header-actions.tsx +48 -0
  554. package/templates/chat-app/components/hint.radix.tsx +26 -0
  555. package/templates/chat-app/components/hint.tsx +26 -0
  556. package/templates/chat-app/components/icons.tsx +53 -0
  557. package/templates/chat-app/components/image-modal.tsx +180 -0
  558. package/templates/chat-app/components/internal-link.tsx +89 -0
  559. package/templates/chat-app/components/keyboard-shortcuts.tsx +58 -0
  560. package/templates/chat-app/components/layout-plugins.tsx +10 -0
  561. package/templates/chat-app/components/layout-slots.tsx +4 -0
  562. package/templates/chat-app/components/lexical-chat-input.tsx +276 -0
  563. package/templates/chat-app/components/login-form.tsx +5 -0
  564. package/templates/chat-app/components/menu-button.radix.tsx +13 -0
  565. package/templates/chat-app/components/menu-button.tsx +13 -0
  566. package/templates/chat-app/components/message-action.tsx +28 -0
  567. package/templates/chat-app/components/message-actions-view.tsx +74 -0
  568. package/templates/chat-app/components/message-siblings-view.tsx +48 -0
  569. package/templates/chat-app/components/model-selection-indicator.radix.tsx +17 -0
  570. package/templates/chat-app/components/model-selection-indicator.tsx +17 -0
  571. package/templates/chat-app/components/model-selector-logo.tsx +37 -0
  572. package/templates/chat-app/components/model-selector-view.tsx +772 -0
  573. package/templates/chat-app/components/model-selector.tsx +46 -0
  574. package/templates/chat-app/components/navigation-links.radix.tsx +50 -0
  575. package/templates/chat-app/components/navigation-links.tsx +48 -0
  576. package/templates/chat-app/components/new-chat-button.tsx +41 -0
  577. package/templates/chat-app/components/optional-content.test.ts +28 -0
  578. package/templates/chat-app/components/parallel-responses/client-plugin.ts +11 -0
  579. package/templates/chat-app/components/parallel-responses/model-picker.tsx +75 -0
  580. package/templates/chat-app/components/parallel-responses/responses.tsx +148 -0
  581. package/templates/chat-app/components/part/document-common.tsx +152 -0
  582. package/templates/chat-app/components/part/mcp-tool-result.tsx +43 -0
  583. package/templates/chat-app/components/part/message-reasoning.tsx +71 -0
  584. package/templates/chat-app/components/part/tool-activity.tsx +93 -0
  585. package/templates/chat-app/components/part/tool-data.tsx +77 -0
  586. package/templates/chat-app/components/part/web-search.tsx +75 -0
  587. package/templates/chat-app/components/popover-button.radix.tsx +13 -0
  588. package/templates/chat-app/components/popover-button.tsx +11 -0
  589. package/templates/chat-app/components/response-choice-cards.tsx +60 -0
  590. package/templates/chat-app/components/retry-button-view.tsx +32 -0
  591. package/templates/chat-app/components/sandbox.tsx +43 -0
  592. package/templates/chat-app/components/settings/settings-header.tsx +21 -0
  593. package/templates/chat-app/components/settings/settings-nav.tsx +25 -0
  594. package/templates/chat-app/components/settings/settings-navigation-link.tsx +29 -0
  595. package/templates/chat-app/components/settings/settings-page.tsx +63 -0
  596. package/templates/chat-app/components/sidebar-chat-item.tsx +176 -0
  597. package/templates/chat-app/components/sidebar-menus.radix.tsx +62 -0
  598. package/templates/chat-app/components/sidebar-menus.tsx +66 -0
  599. package/templates/chat-app/components/sidebar-toggle.tsx +42 -0
  600. package/templates/chat-app/components/sidebar-top-row.tsx +64 -0
  601. package/templates/chat-app/components/sidebar-user-nav.tsx +208 -0
  602. package/templates/chat-app/components/signup-form.tsx +5 -0
  603. package/templates/chat-app/components/source-badge.tsx +50 -0
  604. package/templates/chat-app/components/sources.tsx +140 -0
  605. package/templates/chat-app/components/tag.tsx +23 -0
  606. package/templates/chat-app/components/task-cleanup.test.ts +39 -0
  607. package/templates/chat-app/components/task-cleanup.ts +15 -0
  608. package/templates/chat-app/components/test-dom-harness.ts +22 -0
  609. package/templates/chat-app/components/text-value.ts +7 -0
  610. package/templates/chat-app/components/theme-provider.tsx +14 -0
  611. package/templates/chat-app/components/thinking-message.tsx +17 -0
  612. package/templates/chat-app/components/ui/alert-dialog.tsx +187 -0
  613. package/templates/chat-app/components/ui/alert.tsx +75 -0
  614. package/templates/chat-app/components/ui/attachment.tsx +207 -0
  615. package/templates/chat-app/components/ui/avatar.tsx +108 -0
  616. package/templates/chat-app/components/ui/badge.tsx +51 -0
  617. package/templates/chat-app/components/ui/breadcrumb.tsx +124 -0
  618. package/templates/chat-app/components/ui/bubble.tsx +127 -0
  619. package/templates/chat-app/components/ui/button-group.tsx +87 -0
  620. package/templates/chat-app/components/ui/button.tsx +55 -0
  621. package/templates/chat-app/components/ui/card.tsx +99 -0
  622. package/templates/chat-app/components/ui/checkbox.tsx +28 -0
  623. package/templates/chat-app/components/ui/code-block.tsx +252 -0
  624. package/templates/chat-app/components/ui/collapsible.tsx +21 -0
  625. package/templates/chat-app/components/ui/command.tsx +196 -0
  626. package/templates/chat-app/components/ui/dialog.tsx +160 -0
  627. package/templates/chat-app/components/ui/direction.tsx +6 -0
  628. package/templates/chat-app/components/ui/drawer.tsx +227 -0
  629. package/templates/chat-app/components/ui/dropdown-menu.tsx +267 -0
  630. package/templates/chat-app/components/ui/empty.tsx +103 -0
  631. package/templates/chat-app/components/ui/extra/action-container.tsx +50 -0
  632. package/templates/chat-app/components/ui/field.tsx +238 -0
  633. package/templates/chat-app/components/ui/hover-card.tsx +50 -0
  634. package/templates/chat-app/components/ui/input-group.tsx +157 -0
  635. package/templates/chat-app/components/ui/input.tsx +19 -0
  636. package/templates/chat-app/components/ui/item.tsx +201 -0
  637. package/templates/chat-app/components/ui/label.tsx +19 -0
  638. package/templates/chat-app/components/ui/message-scroller.tsx +130 -0
  639. package/templates/chat-app/components/ui/message.tsx +91 -0
  640. package/templates/chat-app/components/ui/popover.tsx +89 -0
  641. package/templates/chat-app/components/ui/progress.tsx +82 -0
  642. package/templates/chat-app/components/ui/questionnaire.tsx +324 -0
  643. package/templates/chat-app/components/ui/resizable.tsx +49 -0
  644. package/templates/chat-app/components/ui/scroll-area.tsx +54 -0
  645. package/templates/chat-app/components/ui/select.tsx +200 -0
  646. package/templates/chat-app/components/ui/separator.tsx +24 -0
  647. package/templates/chat-app/components/ui/sheet.tsx +138 -0
  648. package/templates/chat-app/components/ui/sidebar.tsx +726 -0
  649. package/templates/chat-app/components/ui/skeleton.tsx +13 -0
  650. package/templates/chat-app/components/ui/slider.tsx +51 -0
  651. package/templates/chat-app/components/ui/spinner.tsx +10 -0
  652. package/templates/chat-app/components/ui/switch.tsx +31 -0
  653. package/templates/chat-app/components/ui/table.tsx +115 -0
  654. package/templates/chat-app/components/ui/tabs.tsx +81 -0
  655. package/templates/chat-app/components/ui/textarea.tsx +17 -0
  656. package/templates/chat-app/components/ui/toggle.tsx +44 -0
  657. package/templates/chat-app/components/ui/tooltip.tsx +65 -0
  658. package/templates/chat-app/components/ui/trace.tsx +162 -0
  659. package/templates/chat-app/components/upgrade-cta/login-cta-banner.tsx +112 -0
  660. package/templates/chat-app/components/upgrade-cta/login-prompt.tsx +34 -0
  661. package/templates/chat-app/components/user-message-view.tsx +92 -0
  662. package/templates/chat-app/components/with-skeleton.tsx +35 -0
  663. package/templates/chat-app/components.json +27 -0
  664. package/templates/chat-app/composer-controls.ts +16 -0
  665. package/templates/chat-app/docs/cleanup.md +21 -0
  666. package/templates/chat-app/docs/guest-sessions.md +29 -0
  667. package/templates/chat-app/docs/single-agent-verification.md +35 -0
  668. package/templates/chat-app/drizzle.config.ts +23 -0
  669. package/templates/chat-app/drizzle.generate.config.ts +9 -0
  670. package/templates/chat-app/hooks/responsive-hooks.test.tsx +20 -0
  671. package/templates/chat-app/hooks/use-artifact.tsx +180 -0
  672. package/templates/chat-app/hooks/use-auto-focus.ts +57 -0
  673. package/templates/chat-app/hooks/use-highlighted-code.ts +75 -0
  674. package/templates/chat-app/hooks/use-image-load-error.ts +20 -0
  675. package/templates/chat-app/hooks/use-media-query.tsx +24 -0
  676. package/templates/chat-app/hooks/use-mobile.ts +19 -0
  677. package/templates/chat-app/hooks/use-mounted.ts +11 -0
  678. package/templates/chat-app/instrumentation.ts +14 -0
  679. package/templates/chat-app/integrations/auth/form.ts +8 -0
  680. package/templates/chat-app/integrations/auth/server.ts +12 -0
  681. package/templates/chat-app/integrations/auth/sign-out.ts +6 -0
  682. package/templates/chat-app/integrations/auth/signed-out.ts +7 -0
  683. package/templates/chat-app/integrations/billing.ts +5 -0
  684. package/templates/chat-app/integrations/chat/model-visibility.ts +8 -0
  685. package/templates/chat-app/integrations/chat/server.ts +5 -0
  686. package/templates/chat-app/integrations/chat/session-profiles.ts +3 -0
  687. package/templates/chat-app/integrations/chat/ui.ts +4 -0
  688. package/templates/chat-app/integrations/chat/uploads.ts +18 -0
  689. package/templates/chat-app/integrations/cleanup.ts +3 -0
  690. package/templates/chat-app/integrations/database.ts +3 -0
  691. package/templates/chat-app/integrations/documents/definitions.ts +4 -0
  692. package/templates/chat-app/integrations/documents/run.ts +1 -0
  693. package/templates/chat-app/integrations/documents/ui.ts +4 -0
  694. package/templates/chat-app/integrations/instrumentation.ts +3 -0
  695. package/templates/chat-app/integrations/layout.ts +3 -0
  696. package/templates/chat-app/integrations/navigation.ts +8 -0
  697. package/templates/chat-app/integrations/plugin-catalog.ts +5 -0
  698. package/templates/chat-app/integrations/providers/gateway.ts +5 -0
  699. package/templates/chat-app/integrations/providers/sandbox.ts +10 -0
  700. package/templates/chat-app/integrations/providers/storage.ts +5 -0
  701. package/templates/chat-app/integrations/routers.ts +3 -0
  702. package/templates/chat-app/integrations/tools/availability.ts +3 -0
  703. package/templates/chat-app/integrations/tools/catalog.ts +10 -0
  704. package/templates/chat-app/integrations/tools/code-executor.ts +1 -0
  705. package/templates/chat-app/integrations/tools/composer.ts +20 -0
  706. package/templates/chat-app/integrations/tools/configuration.ts +3 -0
  707. package/templates/chat-app/integrations/tools/definitions.ts +6 -0
  708. package/templates/chat-app/integrations/tools/execution.ts +15 -0
  709. package/templates/chat-app/integrations/tools/providers.ts +3 -0
  710. package/templates/chat-app/integrations/tools/selection.ts +10 -0
  711. package/templates/chat-app/integrations/tools/ui.ts +4 -0
  712. package/templates/chat-app/lib/ai/active-gateway.ts +24 -0
  713. package/templates/chat-app/lib/ai/app-model-id.ts +23 -0
  714. package/templates/chat-app/lib/ai/app-models.test.ts +92 -0
  715. package/templates/chat-app/lib/ai/app-models.ts +153 -0
  716. package/templates/chat-app/lib/ai/gateways/fallback-models.ts +29 -0
  717. package/templates/chat-app/lib/ai/gateways/registry.ts +71 -0
  718. package/templates/chat-app/lib/ai/mcp-name-id.ts +112 -0
  719. package/templates/chat-app/lib/ai/model-data.ts +35 -0
  720. package/templates/chat-app/lib/ai/models.generated.ts +4242 -0
  721. package/templates/chat-app/lib/ai/models.ts +44 -0
  722. package/templates/chat-app/lib/ai/prompts.ts +25 -0
  723. package/templates/chat-app/lib/ai/providers.ts +41 -0
  724. package/templates/chat-app/lib/ai/telemetry.ts +4 -0
  725. package/templates/chat-app/lib/ai/to-model-data.test.ts +24 -0
  726. package/templates/chat-app/lib/ai/to-model-data.ts +63 -0
  727. package/templates/chat-app/lib/ai/tool-context.ts +28 -0
  728. package/templates/chat-app/lib/ai/tool-renderer-registry.ts +30 -0
  729. package/templates/chat-app/lib/ai/types.ts +85 -0
  730. package/templates/chat-app/lib/ai/usage-token-details.test.ts +76 -0
  731. package/templates/chat-app/lib/ai/usage-token-details.ts +33 -0
  732. package/templates/chat-app/lib/artifacts/artifact-kind.ts +8 -0
  733. package/templates/chat-app/lib/artifacts/types.ts +19 -0
  734. package/templates/chat-app/lib/auth-client.ts +5 -0
  735. package/templates/chat-app/lib/auth-session-options.test.ts +106 -0
  736. package/templates/chat-app/lib/auth-session-options.ts +47 -0
  737. package/templates/chat-app/lib/auth.ts +90 -0
  738. package/templates/chat-app/lib/chat-after-create.test.ts +74 -0
  739. package/templates/chat-app/lib/chat-after-create.ts +32 -0
  740. package/templates/chat-app/lib/chat-route.ts +18 -0
  741. package/templates/chat-app/lib/cleanup/contracts.ts +10 -0
  742. package/templates/chat-app/lib/cleanup/job.ts +53 -0
  743. package/templates/chat-app/lib/cleanup/route.test.ts +47 -0
  744. package/templates/chat-app/lib/config-models.ts +30 -0
  745. package/templates/chat-app/lib/config-requirements.test.ts +162 -0
  746. package/templates/chat-app/lib/config-requirements.ts +110 -0
  747. package/templates/chat-app/lib/config-schema.test.ts +71 -0
  748. package/templates/chat-app/lib/config-schema.ts +411 -0
  749. package/templates/chat-app/lib/config.ts +21 -0
  750. package/templates/chat-app/lib/constants.ts +7 -0
  751. package/templates/chat-app/lib/creation-rejected-error.ts +11 -0
  752. package/templates/chat-app/lib/db/client.ts +13 -0
  753. package/templates/chat-app/lib/db/connection.test.ts +56 -0
  754. package/templates/chat-app/lib/db/connection.ts +75 -0
  755. package/templates/chat-app/lib/db/creation-conflict-error.ts +15 -0
  756. package/templates/chat-app/lib/db/eve-billing.ts +398 -0
  757. package/templates/chat-app/lib/db/eve-code-sandboxes.ts +197 -0
  758. package/templates/chat-app/lib/db/eve-creation-failure.ts +37 -0
  759. package/templates/chat-app/lib/db/eve-current-copy.ts +230 -0
  760. package/templates/chat-app/lib/db/eve-deletion-scope.ts +9 -0
  761. package/templates/chat-app/lib/db/eve-deletion.ts +367 -0
  762. package/templates/chat-app/lib/db/eve-dispatch.ts +283 -0
  763. package/templates/chat-app/lib/db/eve-document-retention.ts +36 -0
  764. package/templates/chat-app/lib/db/eve-documents.ts +700 -0
  765. package/templates/chat-app/lib/db/eve-family-lock.ts +15 -0
  766. package/templates/chat-app/lib/db/eve-file-purge.ts +311 -0
  767. package/templates/chat-app/lib/db/eve-files.ts +335 -0
  768. package/templates/chat-app/lib/db/eve-model-ledger.ts +135 -0
  769. package/templates/chat-app/lib/db/eve-orphaned-files.ts +84 -0
  770. package/templates/chat-app/lib/db/eve-queries.ts +1191 -0
  771. package/templates/chat-app/lib/db/eve-response-groups.ts +603 -0
  772. package/templates/chat-app/lib/db/eve-sandbox-run-coverage.ts +97 -0
  773. package/templates/chat-app/lib/db/eve-subagents.ts +170 -0
  774. package/templates/chat-app/lib/db/eve-title.ts +27 -0
  775. package/templates/chat-app/lib/db/eve-workspace-turns.ts +123 -0
  776. package/templates/chat-app/lib/db/eve-workspaces.ts +64 -0
  777. package/templates/chat-app/lib/db/file-storage-keys.ts +38 -0
  778. package/templates/chat-app/lib/db/health.test.ts +36 -0
  779. package/templates/chat-app/lib/db/health.ts +16 -0
  780. package/templates/chat-app/lib/db/migrate.ts +171 -0
  781. package/templates/chat-app/lib/db/migration-history.test.ts +162 -0
  782. package/templates/chat-app/lib/db/migration-history.ts +109 -0
  783. package/templates/chat-app/lib/db/migrations/0000_eve_baseline.sql +433 -0
  784. package/templates/chat-app/lib/db/migrations/0001_brainy_the_stranger.sql +1 -0
  785. package/templates/chat-app/lib/db/migrations/0002_nappy_caretaker.sql +5 -0
  786. package/templates/chat-app/lib/db/migrations/0003_ambitious_oracle.sql +24 -0
  787. package/templates/chat-app/lib/db/migrations/0004_misty_next_avengers.sql +11 -0
  788. package/templates/chat-app/lib/db/migrations/0005_managed_workflow_safeguards.sql +12 -0
  789. package/templates/chat-app/lib/db/migrations/0006_unpriced_usage_index.sql +2 -0
  790. package/templates/chat-app/lib/db/migrations/0007_kind_charles_xavier.sql +13 -0
  791. package/templates/chat-app/lib/db/migrations/0008_mysterious_excalibur.sql +1 -0
  792. package/templates/chat-app/lib/db/migrations/0009_absent_the_hunter.sql +1 -0
  793. package/templates/chat-app/lib/db/migrations/0010_omniscient_junta.sql +11 -0
  794. package/templates/chat-app/lib/db/migrations/0011_followup_chat_index.sql +1 -0
  795. package/templates/chat-app/lib/db/migrations/0012_aberrant_joseph.sql +16 -0
  796. package/templates/chat-app/lib/db/migrations/0013_current_copy_seed.sql +1 -0
  797. package/templates/chat-app/lib/db/migrations/0014_current_copy_ancestry.sql +13 -0
  798. package/templates/chat-app/lib/db/migrations/0015_conscious_gorilla_man.sql +13 -0
  799. package/templates/chat-app/lib/db/migrations/0016_large_zeigeist.sql +21 -0
  800. package/templates/chat-app/lib/db/migrations/0017_flimsy_whiplash.sql +34 -0
  801. package/templates/chat-app/lib/db/migrations/0018_shallow_tyrannus.sql +1 -0
  802. package/templates/chat-app/lib/db/migrations/0019_woozy_wither.sql +50 -0
  803. package/templates/chat-app/lib/db/migrations/0020_organic_black_panther.sql +12 -0
  804. package/templates/chat-app/lib/db/migrations/0021_glorious_chameleon.sql +6 -0
  805. package/templates/chat-app/lib/db/migrations/0022_hard_photon.sql +16 -0
  806. package/templates/chat-app/lib/db/migrations/meta/0000_snapshot.json +2714 -0
  807. package/templates/chat-app/lib/db/migrations/meta/0001_snapshot.json +2720 -0
  808. package/templates/chat-app/lib/db/migrations/meta/0002_snapshot.json +2732 -0
  809. package/templates/chat-app/lib/db/migrations/meta/0003_snapshot.json +2739 -0
  810. package/templates/chat-app/lib/db/migrations/meta/0004_snapshot.json +2837 -0
  811. package/templates/chat-app/lib/db/migrations/meta/0005_snapshot.json +2874 -0
  812. package/templates/chat-app/lib/db/migrations/meta/0006_snapshot.json +2890 -0
  813. package/templates/chat-app/lib/db/migrations/meta/0007_snapshot.json +2975 -0
  814. package/templates/chat-app/lib/db/migrations/meta/0008_snapshot.json +2982 -0
  815. package/templates/chat-app/lib/db/migrations/meta/0009_snapshot.json +3311 -0
  816. package/templates/chat-app/lib/db/migrations/meta/0010_snapshot.json +3385 -0
  817. package/templates/chat-app/lib/db/migrations/meta/0011_snapshot.json +3401 -0
  818. package/templates/chat-app/lib/db/migrations/meta/0012_snapshot.json +3509 -0
  819. package/templates/chat-app/lib/db/migrations/meta/0013_snapshot.json +3515 -0
  820. package/templates/chat-app/lib/db/migrations/meta/0014_snapshot.json +3515 -0
  821. package/templates/chat-app/lib/db/migrations/meta/0015_snapshot.json +3515 -0
  822. package/templates/chat-app/lib/db/migrations/meta/0016_snapshot.json +3668 -0
  823. package/templates/chat-app/lib/db/migrations/meta/0017_snapshot.json +3881 -0
  824. package/templates/chat-app/lib/db/migrations/meta/0018_snapshot.json +3888 -0
  825. package/templates/chat-app/lib/db/migrations/meta/0019_snapshot.json +3926 -0
  826. package/templates/chat-app/lib/db/migrations/meta/0020_snapshot.json +3920 -0
  827. package/templates/chat-app/lib/db/migrations/meta/0021_snapshot.json +3887 -0
  828. package/templates/chat-app/lib/db/migrations/meta/0022_snapshot.json +3659 -0
  829. package/templates/chat-app/lib/db/migrations/meta/_journal.json +167 -0
  830. package/templates/chat-app/lib/db/queries.ts +23 -0
  831. package/templates/chat-app/lib/db/schema.ts +822 -0
  832. package/templates/chat-app/lib/db/update-owned-chat.ts +58 -0
  833. package/templates/chat-app/lib/db/workflow-backend.ts +28 -0
  834. package/templates/chat-app/lib/env-runtime-options.ts +121 -0
  835. package/templates/chat-app/lib/env-schema.test.ts +107 -0
  836. package/templates/chat-app/lib/env-schema.ts +136 -0
  837. package/templates/chat-app/lib/env.ts +24 -0
  838. package/templates/chat-app/lib/eve/accounting-log.ts +49 -0
  839. package/templates/chat-app/lib/eve/activity.ts +14 -0
  840. package/templates/chat-app/lib/eve/admission-retry.ts +41 -0
  841. package/templates/chat-app/lib/eve/channel-files.test.ts +85 -0
  842. package/templates/chat-app/lib/eve/channel-files.ts +57 -0
  843. package/templates/chat-app/lib/eve/cleanup-orphaned-files.test.ts +88 -0
  844. package/templates/chat-app/lib/eve/cleanup-orphaned-files.ts +68 -0
  845. package/templates/chat-app/lib/eve/code-executor.ts +32 -0
  846. package/templates/chat-app/lib/eve/code-sandbox-name.test.ts +60 -0
  847. package/templates/chat-app/lib/eve/code-sandbox-name.ts +56 -0
  848. package/templates/chat-app/lib/eve/code-sandbox-ownership.ts +88 -0
  849. package/templates/chat-app/lib/eve/command-rejection.test.ts +28 -0
  850. package/templates/chat-app/lib/eve/command-rejection.ts +17 -0
  851. package/templates/chat-app/lib/eve/completed-copy-source.test.ts +114 -0
  852. package/templates/chat-app/lib/eve/completed-copy-source.ts +48 -0
  853. package/templates/chat-app/lib/eve/connection-options.ts +40 -0
  854. package/templates/chat-app/lib/eve/contracts.test.ts +246 -0
  855. package/templates/chat-app/lib/eve/contracts.ts +70 -0
  856. package/templates/chat-app/lib/eve/conversation-scope.test.ts +147 -0
  857. package/templates/chat-app/lib/eve/conversation-scope.ts +102 -0
  858. package/templates/chat-app/lib/eve/conversation-title.ts +40 -0
  859. package/templates/chat-app/lib/eve/copy-input.ts +11 -0
  860. package/templates/chat-app/lib/eve/copy-seed.test.ts +101 -0
  861. package/templates/chat-app/lib/eve/copy-seed.ts +143 -0
  862. package/templates/chat-app/lib/eve/copy-transcript.test.ts +372 -0
  863. package/templates/chat-app/lib/eve/copy-transcript.ts +389 -0
  864. package/templates/chat-app/lib/eve/create-conversation-operation.test.ts +223 -0
  865. package/templates/chat-app/lib/eve/create-conversation-operation.ts +107 -0
  866. package/templates/chat-app/lib/eve/create-conversation.test.ts +143 -0
  867. package/templates/chat-app/lib/eve/create-conversation.ts +75 -0
  868. package/templates/chat-app/lib/eve/create-native-copy.ts +38 -0
  869. package/templates/chat-app/lib/eve/create-response-group.test.ts +268 -0
  870. package/templates/chat-app/lib/eve/create-response-group.ts +158 -0
  871. package/templates/chat-app/lib/eve/creation-content-hash.ts +20 -0
  872. package/templates/chat-app/lib/eve/creation-recovery-error.ts +8 -0
  873. package/templates/chat-app/lib/eve/creation-transport.ts +36 -0
  874. package/templates/chat-app/lib/eve/delete-local-conversation.test.ts +145 -0
  875. package/templates/chat-app/lib/eve/delete-local-conversation.ts +54 -0
  876. package/templates/chat-app/lib/eve/deletion-lifecycle.ts +18 -0
  877. package/templates/chat-app/lib/eve/deletion-policy.ts +27 -0
  878. package/templates/chat-app/lib/eve/document-assistant-actions.test.ts +48 -0
  879. package/templates/chat-app/lib/eve/document-assistant-actions.ts +22 -0
  880. package/templates/chat-app/lib/eve/document-kind-lifecycle.test.ts +148 -0
  881. package/templates/chat-app/lib/eve/document-tools.ts +164 -0
  882. package/templates/chat-app/lib/eve/draft.test.ts +32 -0
  883. package/templates/chat-app/lib/eve/draft.ts +70 -0
  884. package/templates/chat-app/lib/eve/environment.test.ts +257 -0
  885. package/templates/chat-app/lib/eve/environment.ts +126 -0
  886. package/templates/chat-app/lib/eve/execute-conversation-creation.ts +198 -0
  887. package/templates/chat-app/lib/eve/file-references.ts +22 -0
  888. package/templates/chat-app/lib/eve/fork-boundary-error.ts +8 -0
  889. package/templates/chat-app/lib/eve/gateway-auth.test.ts +229 -0
  890. package/templates/chat-app/lib/eve/gateway-auth.ts +182 -0
  891. package/templates/chat-app/lib/eve/generated-files.test.ts +75 -0
  892. package/templates/chat-app/lib/eve/generated-files.ts +46 -0
  893. package/templates/chat-app/lib/eve/history-input.ts +31 -0
  894. package/templates/chat-app/lib/eve/image-context.test.ts +66 -0
  895. package/templates/chat-app/lib/eve/image-context.ts +143 -0
  896. package/templates/chat-app/lib/eve/installed-tools.test.ts +162 -0
  897. package/templates/chat-app/lib/eve/lifecycle/postgres/compatibility.ts +84 -0
  898. package/templates/chat-app/lib/eve/lifecycle/postgres/eve-native-purge.ts +205 -0
  899. package/templates/chat-app/lib/eve/lifecycle/postgres/eve-payload-purge.ts +147 -0
  900. package/templates/chat-app/lib/eve/lifecycle/postgres/eve-queue-fence.ts +82 -0
  901. package/templates/chat-app/lib/eve/lifecycle/postgres/eve-queue-inventory.ts +89 -0
  902. package/templates/chat-app/lib/eve/lifecycle/postgres/eve-queue-purge.ts +250 -0
  903. package/templates/chat-app/lib/eve/lifecycle/postgres/eve-resource-fence.ts +213 -0
  904. package/templates/chat-app/lib/eve/lifecycle/postgres/eve-run-inventory.ts +165 -0
  905. package/templates/chat-app/lib/eve/lifecycle/postgres/eve-sandbox-coverage-proof.ts +140 -0
  906. package/templates/chat-app/lib/eve/lifecycle/postgres/eve-session-fence.ts +108 -0
  907. package/templates/chat-app/lib/eve/lifecycle/postgres/eve-stream-positions.ts +81 -0
  908. package/templates/chat-app/lib/eve/lifecycle/postgres/provider.ts +91 -0
  909. package/templates/chat-app/lib/eve/lifecycle/provider.test.ts +57 -0
  910. package/templates/chat-app/lib/eve/lifecycle/provider.ts +102 -0
  911. package/templates/chat-app/lib/eve/local-deletion-available.test.ts +19 -0
  912. package/templates/chat-app/lib/eve/local-deletion-available.ts +22 -0
  913. package/templates/chat-app/lib/eve/logical-chat.test.ts +400 -0
  914. package/templates/chat-app/lib/eve/logical-chat.ts +477 -0
  915. package/templates/chat-app/lib/eve/logical-commands.ts +42 -0
  916. package/templates/chat-app/lib/eve/logical-response-slots.ts +180 -0
  917. package/templates/chat-app/lib/eve/mcp-result.ts +25 -0
  918. package/templates/chat-app/lib/eve/message-delivery.test.ts +165 -0
  919. package/templates/chat-app/lib/eve/message-delivery.ts +145 -0
  920. package/templates/chat-app/lib/eve/message-display.test.ts +105 -0
  921. package/templates/chat-app/lib/eve/message-display.ts +65 -0
  922. package/templates/chat-app/lib/eve/message-input.ts +69 -0
  923. package/templates/chat-app/lib/eve/message-tool-selection.test.ts +23 -0
  924. package/templates/chat-app/lib/eve/message-tool-selection.ts +31 -0
  925. package/templates/chat-app/lib/eve/model-accounting.test.ts +194 -0
  926. package/templates/chat-app/lib/eve/model-accounting.ts +101 -0
  927. package/templates/chat-app/lib/eve/model-ledger.test.ts +485 -0
  928. package/templates/chat-app/lib/eve/model-ledger.ts +239 -0
  929. package/templates/chat-app/lib/eve/model-selection.test.ts +139 -0
  930. package/templates/chat-app/lib/eve/model-selection.ts +99 -0
  931. package/templates/chat-app/lib/eve/optimistic-metadata.test.ts +85 -0
  932. package/templates/chat-app/lib/eve/optimistic-metadata.ts +139 -0
  933. package/templates/chat-app/lib/eve/pending-create.test.ts +112 -0
  934. package/templates/chat-app/lib/eve/pending-create.ts +246 -0
  935. package/templates/chat-app/lib/eve/persisted-wire-order.test.ts +33 -0
  936. package/templates/chat-app/lib/eve/persistent-sandbox-store.ts +621 -0
  937. package/templates/chat-app/lib/eve/persistent-sandbox.test.ts +209 -0
  938. package/templates/chat-app/lib/eve/persistent-sandbox.ts +328 -0
  939. package/templates/chat-app/lib/eve/prepare-deletion.test.ts +118 -0
  940. package/templates/chat-app/lib/eve/prepare-deletion.ts +62 -0
  941. package/templates/chat-app/lib/eve/prepare-message.test.ts +67 -0
  942. package/templates/chat-app/lib/eve/prepare-message.ts +60 -0
  943. package/templates/chat-app/lib/eve/principal.test.ts +25 -0
  944. package/templates/chat-app/lib/eve/principal.ts +23 -0
  945. package/templates/chat-app/lib/eve/project-creation.ts +22 -0
  946. package/templates/chat-app/lib/eve/projects-absent.test.ts +27 -0
  947. package/templates/chat-app/lib/eve/purge-code-sandboxes.test.ts +125 -0
  948. package/templates/chat-app/lib/eve/purge-code-sandboxes.ts +83 -0
  949. package/templates/chat-app/lib/eve/purge-files.test.ts +41 -0
  950. package/templates/chat-app/lib/eve/purge-files.ts +38 -0
  951. package/templates/chat-app/lib/eve/purge-local-resources.ts +73 -0
  952. package/templates/chat-app/lib/eve/readonly-message-types.ts +19 -0
  953. package/templates/chat-app/lib/eve/reconcile-subagent-usage.ts +99 -0
  954. package/templates/chat-app/lib/eve/reconcile-usage.test.ts +488 -0
  955. package/templates/chat-app/lib/eve/reconcile-usage.ts +238 -0
  956. package/templates/chat-app/lib/eve/reconcile-workspace-turn.ts +137 -0
  957. package/templates/chat-app/lib/eve/recover-creations.test.ts +63 -0
  958. package/templates/chat-app/lib/eve/recover-creations.ts +83 -0
  959. package/templates/chat-app/lib/eve/request-copy.test.ts +95 -0
  960. package/templates/chat-app/lib/eve/request-copy.ts +129 -0
  961. package/templates/chat-app/lib/eve/request-policy.test.ts +54 -0
  962. package/templates/chat-app/lib/eve/request-policy.ts +120 -0
  963. package/templates/chat-app/lib/eve/research-progress.test.ts +95 -0
  964. package/templates/chat-app/lib/eve/research-progress.ts +42 -0
  965. package/templates/chat-app/lib/eve/resolve-creation-request.ts +59 -0
  966. package/templates/chat-app/lib/eve/response-group-candidates.ts +16 -0
  967. package/templates/chat-app/lib/eve/response-group-contracts.ts +23 -0
  968. package/templates/chat-app/lib/eve/response-group-input.ts +39 -0
  969. package/templates/chat-app/lib/eve/response-group-lineage.test.ts +133 -0
  970. package/templates/chat-app/lib/eve/response-group-lineage.ts +201 -0
  971. package/templates/chat-app/lib/eve/response-group.test.ts +101 -0
  972. package/templates/chat-app/lib/eve/response-group.ts +139 -0
  973. package/templates/chat-app/lib/eve/response-model.test.ts +52 -0
  974. package/templates/chat-app/lib/eve/response-model.ts +46 -0
  975. package/templates/chat-app/lib/eve/restore-message-attachments.test.ts +421 -0
  976. package/templates/chat-app/lib/eve/restore-message-attachments.ts +241 -0
  977. package/templates/chat-app/lib/eve/retire-session.test.ts +158 -0
  978. package/templates/chat-app/lib/eve/retire-session.ts +140 -0
  979. package/templates/chat-app/lib/eve/sandbox-environment.test.ts +49 -0
  980. package/templates/chat-app/lib/eve/sandbox-environment.ts +29 -0
  981. package/templates/chat-app/lib/eve/save-copy-operation.ts +33 -0
  982. package/templates/chat-app/lib/eve/save-document.ts +87 -0
  983. package/templates/chat-app/lib/eve/selected-tools.ts +22 -0
  984. package/templates/chat-app/lib/eve/send-command.test.ts +36 -0
  985. package/templates/chat-app/lib/eve/send-command.ts +54 -0
  986. package/templates/chat-app/lib/eve/server.test.ts +90 -0
  987. package/templates/chat-app/lib/eve/server.ts +60 -0
  988. package/templates/chat-app/lib/eve/session-identity.ts +21 -0
  989. package/templates/chat-app/lib/eve/session-mapping-error.ts +19 -0
  990. package/templates/chat-app/lib/eve/session-profile.test.ts +49 -0
  991. package/templates/chat-app/lib/eve/session-profile.ts +22 -0
  992. package/templates/chat-app/lib/eve/shared-messages.test.ts +270 -0
  993. package/templates/chat-app/lib/eve/shared-messages.ts +158 -0
  994. package/templates/chat-app/lib/eve/spending-admission.ts +11 -0
  995. package/templates/chat-app/lib/eve/stream-positions.test.ts +51 -0
  996. package/templates/chat-app/lib/eve/stream-positions.ts +27 -0
  997. package/templates/chat-app/lib/eve/tool-availability.ts +34 -0
  998. package/templates/chat-app/lib/eve/tool-cost.test.ts +46 -0
  999. package/templates/chat-app/lib/eve/tool-cost.ts +111 -0
  1000. package/templates/chat-app/lib/eve/tool-image-context.ts +11 -0
  1001. package/templates/chat-app/lib/eve/tool-model-output.ts +15 -0
  1002. package/templates/chat-app/lib/eve/tool-models.ts +36 -0
  1003. package/templates/chat-app/lib/eve/tool-result.test.ts +20 -0
  1004. package/templates/chat-app/lib/eve/tool-result.ts +97 -0
  1005. package/templates/chat-app/lib/eve/tool-types.test.ts +60 -0
  1006. package/templates/chat-app/lib/eve/tool-types.ts +35 -0
  1007. package/templates/chat-app/lib/eve/tool-ui-state.ts +19 -0
  1008. package/templates/chat-app/lib/eve/tool-usage.ts +152 -0
  1009. package/templates/chat-app/lib/eve/turn-tools.ts +52 -0
  1010. package/templates/chat-app/lib/eve/usage-reconciliation-busy.ts +20 -0
  1011. package/templates/chat-app/lib/eve/usage.test.ts +230 -0
  1012. package/templates/chat-app/lib/eve/usage.ts +82 -0
  1013. package/templates/chat-app/lib/eve/verify-local-coverage.ts +84 -0
  1014. package/templates/chat-app/lib/eve/workspace-attachments.ts +173 -0
  1015. package/templates/chat-app/lib/eve/workspace-turn-evidence.test.ts +131 -0
  1016. package/templates/chat-app/lib/eve/workspace-turn-evidence.ts +51 -0
  1017. package/templates/chat-app/lib/eve/world-config.test.ts +43 -0
  1018. package/templates/chat-app/lib/eve/world-config.ts +24 -0
  1019. package/templates/chat-app/lib/features-config.test.ts +17 -0
  1020. package/templates/chat-app/lib/features-config.ts +88 -0
  1021. package/templates/chat-app/lib/file-content-response.test.ts +116 -0
  1022. package/templates/chat-app/lib/file-content-response.ts +151 -0
  1023. package/templates/chat-app/lib/file-language.test.ts +12 -0
  1024. package/templates/chat-app/lib/file-language.ts +51 -0
  1025. package/templates/chat-app/lib/file-storage.test.ts +123 -0
  1026. package/templates/chat-app/lib/file-storage.ts +184 -0
  1027. package/templates/chat-app/lib/file-url.test.ts +60 -0
  1028. package/templates/chat-app/lib/file-url.ts +49 -0
  1029. package/templates/chat-app/lib/highlighter.tsx +124 -0
  1030. package/templates/chat-app/lib/id.ts +5 -0
  1031. package/templates/chat-app/lib/is-non-empty-string.test.ts +21 -0
  1032. package/templates/chat-app/lib/is-non-empty-string.ts +2 -0
  1033. package/templates/chat-app/lib/limits/tokens.ts +9 -0
  1034. package/templates/chat-app/lib/logger.ts +28 -0
  1035. package/templates/chat-app/lib/playwright-test-environment.ts +17 -0
  1036. package/templates/chat-app/lib/plugin-route.ts +16 -0
  1037. package/templates/chat-app/lib/readonly-native-surface.ts +23 -0
  1038. package/templates/chat-app/lib/readonly-react-node.ts +8 -0
  1039. package/templates/chat-app/lib/required-credentials.test.ts +141 -0
  1040. package/templates/chat-app/lib/required-credentials.ts +66 -0
  1041. package/templates/chat-app/lib/sandbox/runtime.ts +12 -0
  1042. package/templates/chat-app/lib/sign-out.test.ts +19 -0
  1043. package/templates/chat-app/lib/sign-out.ts +17 -0
  1044. package/templates/chat-app/lib/social-auth.test.ts +79 -0
  1045. package/templates/chat-app/lib/social-auth.ts +57 -0
  1046. package/templates/chat-app/lib/url-utils.tsx +13 -0
  1047. package/templates/chat-app/lib/url.test.ts +54 -0
  1048. package/templates/chat-app/lib/url.ts +25 -0
  1049. package/templates/chat-app/lib/utils.ts +1 -0
  1050. package/templates/chat-app/logo.svg +1 -0
  1051. package/templates/chat-app/next-env.d.ts +7 -0
  1052. package/templates/chat-app/next.config.test.ts +45 -0
  1053. package/templates/chat-app/next.config.ts +48 -0
  1054. package/templates/chat-app/oxfmt.config.ts +29 -0
  1055. package/templates/chat-app/oxlint.config.ts +38 -0
  1056. package/templates/chat-app/package.json +165 -0
  1057. package/templates/chat-app/playwright.config.ts +106 -0
  1058. package/templates/chat-app/postcss.config.mjs +8 -0
  1059. package/templates/chat-app/providers/chat-models-provider.tsx +74 -0
  1060. package/templates/chat-app/providers/chat-plugins.tsx +8 -0
  1061. package/templates/chat-app/providers/default-model-provider.tsx +91 -0
  1062. package/templates/chat-app/providers/parse-chat-id-from-pathname.test.ts +126 -0
  1063. package/templates/chat-app/providers/parse-chat-id-from-pathname.ts +51 -0
  1064. package/templates/chat-app/providers/session-provider.tsx +107 -0
  1065. package/templates/chat-app/providers/ui-direction.radix.tsx +11 -0
  1066. package/templates/chat-app/providers/ui-direction.tsx +11 -0
  1067. package/templates/chat-app/proxy.test.ts +104 -0
  1068. package/templates/chat-app/proxy.ts +128 -0
  1069. package/templates/chat-app/scripts/build-eve.ts +28 -0
  1070. package/templates/chat-app/scripts/check-db.test.ts +49 -0
  1071. package/templates/chat-app/scripts/check-db.ts +99 -0
  1072. package/templates/chat-app/scripts/check-env.ts +337 -0
  1073. package/templates/chat-app/scripts/check-worker-typescript.ts +88 -0
  1074. package/templates/chat-app/scripts/check-workflow-backend.ts +29 -0
  1075. package/templates/chat-app/scripts/cleanup.ts +112 -0
  1076. package/templates/chat-app/scripts/dev-health.ts +64 -0
  1077. package/templates/chat-app/scripts/dev-process-tree.ts +41 -0
  1078. package/templates/chat-app/scripts/dev-recovery.ts +38 -0
  1079. package/templates/chat-app/scripts/dev-supervisor.mts +297 -0
  1080. package/templates/chat-app/scripts/environment-validation-report.ts +46 -0
  1081. package/templates/chat-app/scripts/eve-setup-config.test.ts +73 -0
  1082. package/templates/chat-app/scripts/eve-setup-config.ts +51 -0
  1083. package/templates/chat-app/scripts/eve-setup.ts +179 -0
  1084. package/templates/chat-app/scripts/fetch-models.ts +30 -0
  1085. package/templates/chat-app/scripts/gateway-snapshot-warning.test.ts +9 -0
  1086. package/templates/chat-app/scripts/installed-environment-validation.ts +39 -0
  1087. package/templates/chat-app/scripts/persistent-sandbox-cleanup.ts +128 -0
  1088. package/templates/chat-app/scripts/stop-persistent-sandboxes.ts +24 -0
  1089. package/templates/chat-app/scripts/worker-bundle-source.test.ts +37 -0
  1090. package/templates/chat-app/scripts/worker-bundle-source.ts +14 -0
  1091. package/templates/chat-app/scripts/worktree-setup.sh +27 -0
  1092. package/templates/chat-app/tests/artifacts.e2e.ts +7 -0
  1093. package/templates/chat-app/tests/auth.setup.e2e.ts +11 -0
  1094. package/templates/chat-app/tests/chat.e2e.ts +20 -0
  1095. package/templates/chat-app/tests/fixtures/eve-subagent-tool.ts +1 -0
  1096. package/templates/chat-app/tests/fixtures/models/openai.svg +3 -0
  1097. package/templates/chat-app/tests/helpers/eve-dynamic-context.ts +20 -0
  1098. package/templates/chat-app/tests/helpers/eve-hook-context.ts +26 -0
  1099. package/templates/chat-app/tests/helpers/eve-tool-context.ts +24 -0
  1100. package/templates/chat-app/tests/helpers/eve-tool-events.ts +24 -0
  1101. package/templates/chat-app/tests/presentation-fonts.ts +20 -0
  1102. package/templates/chat-app/tests/reasoning.e2e.ts +7 -0
  1103. package/templates/chat-app/tests/reasoning.setup.e2e.ts +11 -0
  1104. package/templates/chat-app/tests/visual-capture.css +4 -0
  1105. package/templates/chat-app/tools/platform/documents/types.ts +11 -0
  1106. package/templates/chat-app/tools/platform/research-updates-schema.ts +60 -0
  1107. package/templates/chat-app/tools/platform/search-presentation.ts +138 -0
  1108. package/templates/chat-app/tools/platform/steps/multi-query-web-search.test.ts +45 -0
  1109. package/templates/chat-app/tools/platform/steps/multi-query-web-search.ts +142 -0
  1110. package/templates/chat-app/tools/platform/steps/search-utils.ts +26 -0
  1111. package/templates/chat-app/trpc/eve-owned-procedure.ts +26 -0
  1112. package/templates/chat-app/trpc/init.ts +173 -0
  1113. package/templates/chat-app/trpc/is-aborted-request.test.ts +26 -0
  1114. package/templates/chat-app/trpc/is-aborted-request.ts +9 -0
  1115. package/templates/chat-app/trpc/preload-query.test.ts +29 -0
  1116. package/templates/chat-app/trpc/preload-query.ts +11 -0
  1117. package/templates/chat-app/trpc/query-client.ts +32 -0
  1118. package/templates/chat-app/trpc/react.tsx +99 -0
  1119. package/templates/chat-app/trpc/routers/_app.ts +29 -0
  1120. package/templates/chat-app/trpc/routers/eve.router.ts +247 -0
  1121. package/templates/chat-app/trpc/server.tsx +33 -0
  1122. package/templates/chat-app/tsconfig.json +50 -0
  1123. package/templates/chat-app/vendor/workflow-world-postgres-5.0.0-beta.40.tgz +0 -0
  1124. package/templates/chat-app/vercel.json +10 -0
  1125. package/templates/chat-app/vitest.config.ts +11 -0
  1126. package/templates/chat-app/vitest.eve-runtime.config.ts +10 -0
  1127. package/templates/electron/CHANGELOG.md +19 -0
  1128. package/templates/electron/entitlements.mac.plist +10 -0
  1129. package/templates/electron/forge.config.ts +207 -0
  1130. package/templates/electron/icon.png +0 -0
  1131. package/templates/electron/package.json +56 -0
  1132. package/templates/electron/scripts/generate-icons.test.js +39 -0
  1133. package/templates/electron/scripts/generate-icons.ts +47 -0
  1134. package/templates/electron/scripts/run-forge.cjs +56 -0
  1135. package/templates/electron/scripts/write-branding.ts +44 -0
  1136. package/templates/electron/src/auth-request-options.test.ts +46 -0
  1137. package/templates/electron/src/auth-request-options.ts +42 -0
  1138. package/templates/electron/src/config.ts +50 -0
  1139. package/templates/electron/src/lib/auth-client.ts +53 -0
  1140. package/templates/electron/src/lib/auth-cookies.test.ts +34 -0
  1141. package/templates/electron/src/lib/auth-cookies.ts +28 -0
  1142. package/templates/electron/src/main.ts +747 -0
  1143. package/templates/electron/src/preload.d.ts +31 -0
  1144. package/templates/electron/src/preload.ts +28 -0
  1145. package/templates/electron/tsconfig.json +24 -0
@@ -0,0 +1,3515 @@
1
+ {
2
+ "id": "e9b38ca0-8cb1-4223-82f1-de80247e7723",
3
+ "prevId": "a985fc08-a08f-4f12-b02f-dc3125a12f32",
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
+ "activeConversationId": {
118
+ "name": "activeConversationId",
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.EveChatProject": {
251
+ "name": "EveChatProject",
252
+ "schema": "",
253
+ "columns": {
254
+ "chatId": {
255
+ "name": "chatId",
256
+ "type": "uuid",
257
+ "primaryKey": true,
258
+ "notNull": true
259
+ },
260
+ "ownerId": {
261
+ "name": "ownerId",
262
+ "type": "text",
263
+ "primaryKey": false,
264
+ "notNull": true
265
+ },
266
+ "projectId": {
267
+ "name": "projectId",
268
+ "type": "uuid",
269
+ "primaryKey": false,
270
+ "notNull": true
271
+ }
272
+ },
273
+ "indexes": {
274
+ "EveChatProject_project": {
275
+ "name": "EveChatProject_project",
276
+ "columns": [
277
+ {
278
+ "expression": "projectId",
279
+ "isExpression": false,
280
+ "asc": true,
281
+ "nulls": "last"
282
+ }
283
+ ],
284
+ "isUnique": false,
285
+ "concurrently": false,
286
+ "method": "btree",
287
+ "with": {}
288
+ }
289
+ },
290
+ "foreignKeys": {
291
+ "EveChatProject_chatId_ownerId_EveChat_id_ownerId_fk": {
292
+ "name": "EveChatProject_chatId_ownerId_EveChat_id_ownerId_fk",
293
+ "tableFrom": "EveChatProject",
294
+ "tableTo": "EveChat",
295
+ "columnsFrom": [
296
+ "chatId",
297
+ "ownerId"
298
+ ],
299
+ "columnsTo": [
300
+ "id",
301
+ "ownerId"
302
+ ],
303
+ "onDelete": "cascade",
304
+ "onUpdate": "no action"
305
+ },
306
+ "EveChatProject_projectId_ownerId_Project_id_userId_fk": {
307
+ "name": "EveChatProject_projectId_ownerId_Project_id_userId_fk",
308
+ "tableFrom": "EveChatProject",
309
+ "tableTo": "Project",
310
+ "columnsFrom": [
311
+ "projectId",
312
+ "ownerId"
313
+ ],
314
+ "columnsTo": [
315
+ "id",
316
+ "userId"
317
+ ],
318
+ "onDelete": "cascade",
319
+ "onUpdate": "no action"
320
+ }
321
+ },
322
+ "compositePrimaryKeys": {},
323
+ "uniqueConstraints": {},
324
+ "policies": {},
325
+ "checkConstraints": {},
326
+ "isRLSEnabled": false
327
+ },
328
+ "public.EveCodeSandbox": {
329
+ "name": "EveCodeSandbox",
330
+ "schema": "",
331
+ "columns": {
332
+ "callId": {
333
+ "name": "callId",
334
+ "type": "text",
335
+ "primaryKey": false,
336
+ "notNull": true
337
+ },
338
+ "conversationId": {
339
+ "name": "conversationId",
340
+ "type": "uuid",
341
+ "primaryKey": false,
342
+ "notNull": true
343
+ },
344
+ "createdAt": {
345
+ "name": "createdAt",
346
+ "type": "timestamp",
347
+ "primaryKey": false,
348
+ "notNull": true,
349
+ "default": "now()"
350
+ },
351
+ "creationConfirmed": {
352
+ "name": "creationConfirmed",
353
+ "type": "boolean",
354
+ "primaryKey": false,
355
+ "notNull": true,
356
+ "default": false
357
+ },
358
+ "name": {
359
+ "name": "name",
360
+ "type": "text",
361
+ "primaryKey": true,
362
+ "notNull": true
363
+ },
364
+ "ownerId": {
365
+ "name": "ownerId",
366
+ "type": "text",
367
+ "primaryKey": false,
368
+ "notNull": true
369
+ },
370
+ "state": {
371
+ "name": "state",
372
+ "type": "text",
373
+ "primaryKey": false,
374
+ "notNull": true,
375
+ "default": "'unresolved'"
376
+ }
377
+ },
378
+ "indexes": {
379
+ "EveCodeSandbox_conversation": {
380
+ "name": "EveCodeSandbox_conversation",
381
+ "columns": [
382
+ {
383
+ "expression": "conversationId",
384
+ "isExpression": false,
385
+ "asc": true,
386
+ "nulls": "last"
387
+ }
388
+ ],
389
+ "isUnique": false,
390
+ "concurrently": false,
391
+ "method": "btree",
392
+ "with": {}
393
+ }
394
+ },
395
+ "foreignKeys": {
396
+ "EveCodeSandbox_conversationId_ownerId_EveConversation_id_ownerId_fk": {
397
+ "name": "EveCodeSandbox_conversationId_ownerId_EveConversation_id_ownerId_fk",
398
+ "tableFrom": "EveCodeSandbox",
399
+ "tableTo": "EveConversation",
400
+ "columnsFrom": [
401
+ "conversationId",
402
+ "ownerId"
403
+ ],
404
+ "columnsTo": [
405
+ "id",
406
+ "ownerId"
407
+ ],
408
+ "onDelete": "no action",
409
+ "onUpdate": "no action"
410
+ }
411
+ },
412
+ "compositePrimaryKeys": {},
413
+ "uniqueConstraints": {},
414
+ "policies": {},
415
+ "checkConstraints": {},
416
+ "isRLSEnabled": false
417
+ },
418
+ "public.EveConversation": {
419
+ "name": "EveConversation",
420
+ "schema": "",
421
+ "columns": {
422
+ "chatId": {
423
+ "name": "chatId",
424
+ "type": "uuid",
425
+ "primaryKey": false,
426
+ "notNull": true
427
+ },
428
+ "createdAt": {
429
+ "name": "createdAt",
430
+ "type": "timestamp",
431
+ "primaryKey": false,
432
+ "notNull": true,
433
+ "default": "now()"
434
+ },
435
+ "creationKind": {
436
+ "name": "creationKind",
437
+ "type": "text",
438
+ "primaryKey": false,
439
+ "notNull": true,
440
+ "default": "'message'"
441
+ },
442
+ "firstMessage": {
443
+ "name": "firstMessage",
444
+ "type": "text",
445
+ "primaryKey": false,
446
+ "notNull": true
447
+ },
448
+ "forkCheckpointId": {
449
+ "name": "forkCheckpointId",
450
+ "type": "uuid",
451
+ "primaryKey": false,
452
+ "notNull": false
453
+ },
454
+ "forkKind": {
455
+ "name": "forkKind",
456
+ "type": "text",
457
+ "primaryKey": false,
458
+ "notNull": false
459
+ },
460
+ "forkMessageId": {
461
+ "name": "forkMessageId",
462
+ "type": "text",
463
+ "primaryKey": false,
464
+ "notNull": false
465
+ },
466
+ "forkTurnId": {
467
+ "name": "forkTurnId",
468
+ "type": "text",
469
+ "primaryKey": false,
470
+ "notNull": false
471
+ },
472
+ "guestCleanupAttemptedAt": {
473
+ "name": "guestCleanupAttemptedAt",
474
+ "type": "timestamp with time zone",
475
+ "primaryKey": false,
476
+ "notNull": false
477
+ },
478
+ "id": {
479
+ "name": "id",
480
+ "type": "uuid",
481
+ "primaryKey": true,
482
+ "notNull": true,
483
+ "default": "gen_random_uuid()"
484
+ },
485
+ "initialContentHash": {
486
+ "name": "initialContentHash",
487
+ "type": "text",
488
+ "primaryKey": false,
489
+ "notNull": false
490
+ },
491
+ "initialModelId": {
492
+ "name": "initialModelId",
493
+ "type": "text",
494
+ "primaryKey": false,
495
+ "notNull": false
496
+ },
497
+ "initialProjectId": {
498
+ "name": "initialProjectId",
499
+ "type": "uuid",
500
+ "primaryKey": false,
501
+ "notNull": false
502
+ },
503
+ "initialRequest": {
504
+ "name": "initialRequest",
505
+ "type": "jsonb",
506
+ "primaryKey": false,
507
+ "notNull": false
508
+ },
509
+ "initialSeed": {
510
+ "name": "initialSeed",
511
+ "type": "jsonb",
512
+ "primaryKey": false,
513
+ "notNull": false
514
+ },
515
+ "operationId": {
516
+ "name": "operationId",
517
+ "type": "uuid",
518
+ "primaryKey": false,
519
+ "notNull": true
520
+ },
521
+ "ownerId": {
522
+ "name": "ownerId",
523
+ "type": "text",
524
+ "primaryKey": false,
525
+ "notNull": true
526
+ },
527
+ "parentConversationId": {
528
+ "name": "parentConversationId",
529
+ "type": "uuid",
530
+ "primaryKey": false,
531
+ "notNull": false
532
+ },
533
+ "rootConversationId": {
534
+ "name": "rootConversationId",
535
+ "type": "uuid",
536
+ "primaryKey": false,
537
+ "notNull": false
538
+ },
539
+ "sessionId": {
540
+ "name": "sessionId",
541
+ "type": "text",
542
+ "primaryKey": false,
543
+ "notNull": false
544
+ },
545
+ "state": {
546
+ "name": "state",
547
+ "type": "text",
548
+ "primaryKey": false,
549
+ "notNull": true,
550
+ "default": "'creating'"
551
+ },
552
+ "usageStreamIndex": {
553
+ "name": "usageStreamIndex",
554
+ "type": "integer",
555
+ "primaryKey": false,
556
+ "notNull": true,
557
+ "default": 0
558
+ },
559
+ "visibility": {
560
+ "name": "visibility",
561
+ "type": "varchar",
562
+ "primaryKey": false,
563
+ "notNull": true,
564
+ "default": "'private'"
565
+ }
566
+ },
567
+ "indexes": {
568
+ "EveConversation_owner_chat": {
569
+ "name": "EveConversation_owner_chat",
570
+ "columns": [
571
+ {
572
+ "expression": "ownerId",
573
+ "isExpression": false,
574
+ "asc": true,
575
+ "nulls": "last"
576
+ },
577
+ {
578
+ "expression": "chatId",
579
+ "isExpression": false,
580
+ "asc": true,
581
+ "nulls": "last"
582
+ }
583
+ ],
584
+ "isUnique": false,
585
+ "concurrently": false,
586
+ "method": "btree",
587
+ "with": {}
588
+ },
589
+ "EveConversation_owner_root": {
590
+ "name": "EveConversation_owner_root",
591
+ "columns": [
592
+ {
593
+ "expression": "ownerId",
594
+ "isExpression": false,
595
+ "asc": true,
596
+ "nulls": "last"
597
+ },
598
+ {
599
+ "expression": "rootConversationId",
600
+ "isExpression": false,
601
+ "asc": true,
602
+ "nulls": "last"
603
+ }
604
+ ],
605
+ "isUnique": false,
606
+ "concurrently": false,
607
+ "method": "btree",
608
+ "with": {}
609
+ },
610
+ "EveConversation_owner_operation": {
611
+ "name": "EveConversation_owner_operation",
612
+ "columns": [
613
+ {
614
+ "expression": "ownerId",
615
+ "isExpression": false,
616
+ "asc": true,
617
+ "nulls": "last"
618
+ },
619
+ {
620
+ "expression": "operationId",
621
+ "isExpression": false,
622
+ "asc": true,
623
+ "nulls": "last"
624
+ }
625
+ ],
626
+ "isUnique": true,
627
+ "concurrently": false,
628
+ "method": "btree",
629
+ "with": {}
630
+ }
631
+ },
632
+ "foreignKeys": {
633
+ "EveConversation_ownerId_user_id_fk": {
634
+ "name": "EveConversation_ownerId_user_id_fk",
635
+ "tableFrom": "EveConversation",
636
+ "tableTo": "user",
637
+ "columnsFrom": [
638
+ "ownerId"
639
+ ],
640
+ "columnsTo": [
641
+ "id"
642
+ ],
643
+ "onDelete": "no action",
644
+ "onUpdate": "no action"
645
+ },
646
+ "EveConversation_chat_owner_fk": {
647
+ "name": "EveConversation_chat_owner_fk",
648
+ "tableFrom": "EveConversation",
649
+ "tableTo": "EveChat",
650
+ "columnsFrom": [
651
+ "chatId",
652
+ "ownerId"
653
+ ],
654
+ "columnsTo": [
655
+ "id",
656
+ "ownerId"
657
+ ],
658
+ "onDelete": "no action",
659
+ "onUpdate": "no action"
660
+ },
661
+ "EveConversation_parent_owner_fk": {
662
+ "name": "EveConversation_parent_owner_fk",
663
+ "tableFrom": "EveConversation",
664
+ "tableTo": "EveConversation",
665
+ "columnsFrom": [
666
+ "parentConversationId",
667
+ "ownerId",
668
+ "chatId"
669
+ ],
670
+ "columnsTo": [
671
+ "id",
672
+ "ownerId",
673
+ "chatId"
674
+ ],
675
+ "onDelete": "no action",
676
+ "onUpdate": "no action"
677
+ },
678
+ "EveConversation_root_owner_fk": {
679
+ "name": "EveConversation_root_owner_fk",
680
+ "tableFrom": "EveConversation",
681
+ "tableTo": "EveConversation",
682
+ "columnsFrom": [
683
+ "rootConversationId",
684
+ "ownerId",
685
+ "chatId"
686
+ ],
687
+ "columnsTo": [
688
+ "id",
689
+ "ownerId",
690
+ "chatId"
691
+ ],
692
+ "onDelete": "no action",
693
+ "onUpdate": "no action"
694
+ }
695
+ },
696
+ "compositePrimaryKeys": {},
697
+ "uniqueConstraints": {
698
+ "EveConversation_sessionId_unique": {
699
+ "name": "EveConversation_sessionId_unique",
700
+ "nullsNotDistinct": false,
701
+ "columns": [
702
+ "sessionId"
703
+ ]
704
+ },
705
+ "EveConversation_id_owner": {
706
+ "name": "EveConversation_id_owner",
707
+ "nullsNotDistinct": false,
708
+ "columns": [
709
+ "id",
710
+ "ownerId"
711
+ ]
712
+ },
713
+ "EveConversation_id_owner_chat": {
714
+ "name": "EveConversation_id_owner_chat",
715
+ "nullsNotDistinct": false,
716
+ "columns": [
717
+ "id",
718
+ "ownerId",
719
+ "chatId"
720
+ ]
721
+ }
722
+ },
723
+ "policies": {},
724
+ "checkConstraints": {
725
+ "EveConversation_creation_kind": {
726
+ "name": "EveConversation_creation_kind",
727
+ "value": "\"EveConversation\".\"creationKind\" in ('message', 'copy')"
728
+ },
729
+ "EveConversation_copy_root": {
730
+ "name": "EveConversation_copy_root",
731
+ "value": "\"EveConversation\".\"creationKind\" <> 'copy' or (\n \"EveConversation\".\"parentConversationId\" is null and \"EveConversation\".\"rootConversationId\" is null and\n \"EveConversation\".\"forkTurnId\" is null and \"EveConversation\".\"forkMessageId\" is null and \"EveConversation\".\"forkCheckpointId\" is null and\n \"EveConversation\".\"forkKind\" is null\n )"
732
+ },
733
+ "EveConversation_named_fork_shape": {
734
+ "name": "EveConversation_named_fork_shape",
735
+ "value": "\"EveConversation\".\"forkCheckpointId\" is null or (\n \"EveConversation\".\"parentConversationId\" is not null and \"EveConversation\".\"forkMessageId\" is null\n )"
736
+ },
737
+ "EveConversation_fork_shape": {
738
+ "name": "EveConversation_fork_shape",
739
+ "value": "(\n \"EveConversation\".\"parentConversationId\" is null and \"EveConversation\".\"rootConversationId\" is null and\n \"EveConversation\".\"forkTurnId\" is null and \"EveConversation\".\"forkMessageId\" is null and \"EveConversation\".\"forkKind\" is null\n ) or (\n \"EveConversation\".\"parentConversationId\" is not null and \"EveConversation\".\"rootConversationId\" is not null and\n (\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 \"EveConversation\".\"forkMessageId\" ~ '^seed_message_(0|[1-9][0-9]{0,3})$' and \"EveConversation\".\"forkTurnId\" is null)\n ) and\n \"EveConversation\".\"parentConversationId\" <> \"EveConversation\".\"id\" and \"EveConversation\".\"rootConversationId\" <> \"EveConversation\".\"id\"\n )"
740
+ },
741
+ "EveConversation_fork_kind": {
742
+ "name": "EveConversation_fork_kind",
743
+ "value": "\"EveConversation\".\"forkKind\" is null or \"EveConversation\".\"forkKind\" in ('edit', 'regenerate', 'comparison')"
744
+ }
745
+ },
746
+ "isRLSEnabled": false
747
+ },
748
+ "public.EveConversationCopy": {
749
+ "name": "EveConversationCopy",
750
+ "schema": "",
751
+ "columns": {
752
+ "acceptedAt": {
753
+ "name": "acceptedAt",
754
+ "type": "timestamp",
755
+ "primaryKey": false,
756
+ "notNull": false
757
+ },
758
+ "conversationId": {
759
+ "name": "conversationId",
760
+ "type": "uuid",
761
+ "primaryKey": true,
762
+ "notNull": true
763
+ },
764
+ "documentsReady": {
765
+ "name": "documentsReady",
766
+ "type": "boolean",
767
+ "primaryKey": false,
768
+ "notNull": true,
769
+ "default": false
770
+ },
771
+ "ownerId": {
772
+ "name": "ownerId",
773
+ "type": "text",
774
+ "primaryKey": false,
775
+ "notNull": true
776
+ },
777
+ "phase": {
778
+ "name": "phase",
779
+ "type": "text",
780
+ "primaryKey": false,
781
+ "notNull": true,
782
+ "default": "'preparing'"
783
+ },
784
+ "plan": {
785
+ "name": "plan",
786
+ "type": "jsonb",
787
+ "primaryKey": false,
788
+ "notNull": false
789
+ },
790
+ "planHash": {
791
+ "name": "planHash",
792
+ "type": "text",
793
+ "primaryKey": false,
794
+ "notNull": true
795
+ },
796
+ "projectionHash": {
797
+ "name": "projectionHash",
798
+ "type": "text",
799
+ "primaryKey": false,
800
+ "notNull": true
801
+ },
802
+ "seed": {
803
+ "name": "seed",
804
+ "type": "jsonb",
805
+ "primaryKey": false,
806
+ "notNull": false
807
+ },
808
+ "sourceConversationId": {
809
+ "name": "sourceConversationId",
810
+ "type": "uuid",
811
+ "primaryKey": false,
812
+ "notNull": true
813
+ },
814
+ "sourceOwnerId": {
815
+ "name": "sourceOwnerId",
816
+ "type": "text",
817
+ "primaryKey": false,
818
+ "notNull": true
819
+ },
820
+ "sourceSessionId": {
821
+ "name": "sourceSessionId",
822
+ "type": "text",
823
+ "primaryKey": false,
824
+ "notNull": true
825
+ }
826
+ },
827
+ "indexes": {},
828
+ "foreignKeys": {
829
+ "EveConversationCopy_owner_fk": {
830
+ "name": "EveConversationCopy_owner_fk",
831
+ "tableFrom": "EveConversationCopy",
832
+ "tableTo": "EveConversation",
833
+ "columnsFrom": [
834
+ "conversationId",
835
+ "ownerId"
836
+ ],
837
+ "columnsTo": [
838
+ "id",
839
+ "ownerId"
840
+ ],
841
+ "onDelete": "no action",
842
+ "onUpdate": "no action"
843
+ }
844
+ },
845
+ "compositePrimaryKeys": {},
846
+ "uniqueConstraints": {
847
+ "EveConversationCopy_owner_identity": {
848
+ "name": "EveConversationCopy_owner_identity",
849
+ "nullsNotDistinct": false,
850
+ "columns": [
851
+ "conversationId",
852
+ "ownerId"
853
+ ]
854
+ }
855
+ },
856
+ "policies": {},
857
+ "checkConstraints": {
858
+ "EveConversationCopy_phase_payload": {
859
+ "name": "EveConversationCopy_phase_payload",
860
+ "value": "(\n \"EveConversationCopy\".\"phase\" = 'preparing' and \"EveConversationCopy\".\"plan\" is not null and \"EveConversationCopy\".\"seed\" is null and \"EveConversationCopy\".\"acceptedAt\" is null\n ) or (\n \"EveConversationCopy\".\"phase\" = 'accepted' and \"EveConversationCopy\".\"plan\" is null and \"EveConversationCopy\".\"seed\" is not null and \"EveConversationCopy\".\"acceptedAt\" is not null and \"EveConversationCopy\".\"documentsReady\"\n ) or (\n \"EveConversationCopy\".\"phase\" = 'bound' and \"EveConversationCopy\".\"plan\" is null and \"EveConversationCopy\".\"seed\" is null and \"EveConversationCopy\".\"acceptedAt\" is not null and \"EveConversationCopy\".\"documentsReady\"\n ) or (\n \"EveConversationCopy\".\"phase\" = 'rejected' and \"EveConversationCopy\".\"plan\" is null and \"EveConversationCopy\".\"seed\" is null and \"EveConversationCopy\".\"acceptedAt\" is null\n )"
861
+ }
862
+ },
863
+ "isRLSEnabled": false
864
+ },
865
+ "public.EveConversationCopyFile": {
866
+ "name": "EveConversationCopyFile",
867
+ "schema": "",
868
+ "columns": {
869
+ "conversationId": {
870
+ "name": "conversationId",
871
+ "type": "uuid",
872
+ "primaryKey": false,
873
+ "notNull": true
874
+ },
875
+ "key": {
876
+ "name": "key",
877
+ "type": "text",
878
+ "primaryKey": false,
879
+ "notNull": true
880
+ },
881
+ "mediaType": {
882
+ "name": "mediaType",
883
+ "type": "text",
884
+ "primaryKey": false,
885
+ "notNull": true
886
+ },
887
+ "ownerId": {
888
+ "name": "ownerId",
889
+ "type": "text",
890
+ "primaryKey": false,
891
+ "notNull": true
892
+ },
893
+ "sha256": {
894
+ "name": "sha256",
895
+ "type": "text",
896
+ "primaryKey": false,
897
+ "notNull": true
898
+ },
899
+ "size": {
900
+ "name": "size",
901
+ "type": "integer",
902
+ "primaryKey": false,
903
+ "notNull": true
904
+ },
905
+ "writtenAt": {
906
+ "name": "writtenAt",
907
+ "type": "timestamp",
908
+ "primaryKey": false,
909
+ "notNull": false
910
+ }
911
+ },
912
+ "indexes": {},
913
+ "foreignKeys": {
914
+ "EveConversationCopyFile_copy_owner_fk": {
915
+ "name": "EveConversationCopyFile_copy_owner_fk",
916
+ "tableFrom": "EveConversationCopyFile",
917
+ "tableTo": "EveConversationCopy",
918
+ "columnsFrom": [
919
+ "conversationId",
920
+ "ownerId"
921
+ ],
922
+ "columnsTo": [
923
+ "conversationId",
924
+ "ownerId"
925
+ ],
926
+ "onDelete": "no action",
927
+ "onUpdate": "no action"
928
+ }
929
+ },
930
+ "compositePrimaryKeys": {
931
+ "EveConversationCopyFile_conversationId_key_pk": {
932
+ "name": "EveConversationCopyFile_conversationId_key_pk",
933
+ "columns": [
934
+ "conversationId",
935
+ "key"
936
+ ]
937
+ }
938
+ },
939
+ "uniqueConstraints": {},
940
+ "policies": {},
941
+ "checkConstraints": {
942
+ "EveConversationCopyFile_size": {
943
+ "name": "EveConversationCopyFile_size",
944
+ "value": "\"EveConversationCopyFile\".\"size\" > 0"
945
+ },
946
+ "EveConversationCopyFile_hash": {
947
+ "name": "EveConversationCopyFile_hash",
948
+ "value": "\"EveConversationCopyFile\".\"sha256\" ~ '^[a-f0-9]{64}$'"
949
+ }
950
+ },
951
+ "isRLSEnabled": false
952
+ },
953
+ "public.EveDispatch": {
954
+ "name": "EveDispatch",
955
+ "schema": "",
956
+ "columns": {
957
+ "ownerId": {
958
+ "name": "ownerId",
959
+ "type": "text",
960
+ "primaryKey": false,
961
+ "notNull": true
962
+ },
963
+ "operationId": {
964
+ "name": "operationId",
965
+ "type": "uuid",
966
+ "primaryKey": false,
967
+ "notNull": true
968
+ },
969
+ "conversationId": {
970
+ "name": "conversationId",
971
+ "type": "uuid",
972
+ "primaryKey": false,
973
+ "notNull": true
974
+ },
975
+ "kind": {
976
+ "name": "kind",
977
+ "type": "text",
978
+ "primaryKey": false,
979
+ "notNull": true
980
+ },
981
+ "intent": {
982
+ "name": "intent",
983
+ "type": "jsonb",
984
+ "primaryKey": false,
985
+ "notNull": true
986
+ },
987
+ "sessionId": {
988
+ "name": "sessionId",
989
+ "type": "text",
990
+ "primaryKey": false,
991
+ "notNull": false
992
+ },
993
+ "deliveryId": {
994
+ "name": "deliveryId",
995
+ "type": "text",
996
+ "primaryKey": false,
997
+ "notNull": false
998
+ },
999
+ "createdAt": {
1000
+ "name": "createdAt",
1001
+ "type": "timestamp",
1002
+ "primaryKey": false,
1003
+ "notNull": true,
1004
+ "default": "now()"
1005
+ }
1006
+ },
1007
+ "indexes": {},
1008
+ "foreignKeys": {
1009
+ "EveDispatch_ownerId_user_id_fk": {
1010
+ "name": "EveDispatch_ownerId_user_id_fk",
1011
+ "tableFrom": "EveDispatch",
1012
+ "tableTo": "user",
1013
+ "columnsFrom": [
1014
+ "ownerId"
1015
+ ],
1016
+ "columnsTo": [
1017
+ "id"
1018
+ ],
1019
+ "onDelete": "no action",
1020
+ "onUpdate": "no action"
1021
+ },
1022
+ "EveDispatch_conversation_owner_fk": {
1023
+ "name": "EveDispatch_conversation_owner_fk",
1024
+ "tableFrom": "EveDispatch",
1025
+ "tableTo": "EveConversation",
1026
+ "columnsFrom": [
1027
+ "conversationId",
1028
+ "ownerId"
1029
+ ],
1030
+ "columnsTo": [
1031
+ "id",
1032
+ "ownerId"
1033
+ ],
1034
+ "onDelete": "no action",
1035
+ "onUpdate": "no action"
1036
+ }
1037
+ },
1038
+ "compositePrimaryKeys": {
1039
+ "EveDispatch_ownerId_operationId_pk": {
1040
+ "name": "EveDispatch_ownerId_operationId_pk",
1041
+ "columns": [
1042
+ "ownerId",
1043
+ "operationId"
1044
+ ]
1045
+ }
1046
+ },
1047
+ "uniqueConstraints": {},
1048
+ "policies": {},
1049
+ "checkConstraints": {
1050
+ "EveDispatch_kind": {
1051
+ "name": "EveDispatch_kind",
1052
+ "value": "\"EveDispatch\".\"kind\" in ('create', 'copy', 'send')"
1053
+ },
1054
+ "EveDispatch_binding": {
1055
+ "name": "EveDispatch_binding",
1056
+ "value": "\"EveDispatch\".\"deliveryId\" is null or \"EveDispatch\".\"sessionId\" is not null"
1057
+ }
1058
+ },
1059
+ "isRLSEnabled": false
1060
+ },
1061
+ "public.EveDocumentCheckpoint": {
1062
+ "name": "EveDocumentCheckpoint",
1063
+ "schema": "",
1064
+ "columns": {
1065
+ "conversationId": {
1066
+ "name": "conversationId",
1067
+ "type": "uuid",
1068
+ "primaryKey": false,
1069
+ "notNull": true
1070
+ },
1071
+ "ownerId": {
1072
+ "name": "ownerId",
1073
+ "type": "text",
1074
+ "primaryKey": false,
1075
+ "notNull": true
1076
+ },
1077
+ "turnIndex": {
1078
+ "name": "turnIndex",
1079
+ "type": "integer",
1080
+ "primaryKey": false,
1081
+ "notNull": true
1082
+ }
1083
+ },
1084
+ "indexes": {},
1085
+ "foreignKeys": {
1086
+ "EveDocumentCheckpoint_conversation_owner_fk": {
1087
+ "name": "EveDocumentCheckpoint_conversation_owner_fk",
1088
+ "tableFrom": "EveDocumentCheckpoint",
1089
+ "tableTo": "EveConversation",
1090
+ "columnsFrom": [
1091
+ "conversationId",
1092
+ "ownerId"
1093
+ ],
1094
+ "columnsTo": [
1095
+ "id",
1096
+ "ownerId"
1097
+ ],
1098
+ "onDelete": "no action",
1099
+ "onUpdate": "no action"
1100
+ }
1101
+ },
1102
+ "compositePrimaryKeys": {
1103
+ "EveDocumentCheckpoint_conversationId_turnIndex_pk": {
1104
+ "name": "EveDocumentCheckpoint_conversationId_turnIndex_pk",
1105
+ "columns": [
1106
+ "conversationId",
1107
+ "turnIndex"
1108
+ ]
1109
+ }
1110
+ },
1111
+ "uniqueConstraints": {
1112
+ "EveDocumentCheckpoint_owner_identity": {
1113
+ "name": "EveDocumentCheckpoint_owner_identity",
1114
+ "nullsNotDistinct": false,
1115
+ "columns": [
1116
+ "conversationId",
1117
+ "turnIndex",
1118
+ "ownerId"
1119
+ ]
1120
+ }
1121
+ },
1122
+ "policies": {},
1123
+ "checkConstraints": {
1124
+ "EveDocumentCheckpoint_turn_nonnegative": {
1125
+ "name": "EveDocumentCheckpoint_turn_nonnegative",
1126
+ "value": "\"EveDocumentCheckpoint\".\"turnIndex\" >= 0"
1127
+ }
1128
+ },
1129
+ "isRLSEnabled": false
1130
+ },
1131
+ "public.EveDocumentCheckpointEntry": {
1132
+ "name": "EveDocumentCheckpointEntry",
1133
+ "schema": "",
1134
+ "columns": {
1135
+ "conversationId": {
1136
+ "name": "conversationId",
1137
+ "type": "uuid",
1138
+ "primaryKey": false,
1139
+ "notNull": true
1140
+ },
1141
+ "documentId": {
1142
+ "name": "documentId",
1143
+ "type": "uuid",
1144
+ "primaryKey": false,
1145
+ "notNull": true
1146
+ },
1147
+ "ownerId": {
1148
+ "name": "ownerId",
1149
+ "type": "text",
1150
+ "primaryKey": false,
1151
+ "notNull": true
1152
+ },
1153
+ "revisionId": {
1154
+ "name": "revisionId",
1155
+ "type": "uuid",
1156
+ "primaryKey": false,
1157
+ "notNull": true
1158
+ },
1159
+ "turnIndex": {
1160
+ "name": "turnIndex",
1161
+ "type": "integer",
1162
+ "primaryKey": false,
1163
+ "notNull": true
1164
+ }
1165
+ },
1166
+ "indexes": {},
1167
+ "foreignKeys": {
1168
+ "EveDocumentCheckpointEntry_checkpoint_owner_fk": {
1169
+ "name": "EveDocumentCheckpointEntry_checkpoint_owner_fk",
1170
+ "tableFrom": "EveDocumentCheckpointEntry",
1171
+ "tableTo": "EveDocumentCheckpoint",
1172
+ "columnsFrom": [
1173
+ "conversationId",
1174
+ "turnIndex",
1175
+ "ownerId"
1176
+ ],
1177
+ "columnsTo": [
1178
+ "conversationId",
1179
+ "turnIndex",
1180
+ "ownerId"
1181
+ ],
1182
+ "onDelete": "no action",
1183
+ "onUpdate": "no action"
1184
+ },
1185
+ "EveDocumentCheckpointEntry_revision_owner_fk": {
1186
+ "name": "EveDocumentCheckpointEntry_revision_owner_fk",
1187
+ "tableFrom": "EveDocumentCheckpointEntry",
1188
+ "tableTo": "EveDocumentRevision",
1189
+ "columnsFrom": [
1190
+ "revisionId",
1191
+ "documentId",
1192
+ "ownerId"
1193
+ ],
1194
+ "columnsTo": [
1195
+ "id",
1196
+ "documentId",
1197
+ "ownerId"
1198
+ ],
1199
+ "onDelete": "no action",
1200
+ "onUpdate": "no action"
1201
+ }
1202
+ },
1203
+ "compositePrimaryKeys": {
1204
+ "EveDocumentCheckpointEntry_conversationId_turnIndex_documentId_pk": {
1205
+ "name": "EveDocumentCheckpointEntry_conversationId_turnIndex_documentId_pk",
1206
+ "columns": [
1207
+ "conversationId",
1208
+ "turnIndex",
1209
+ "documentId"
1210
+ ]
1211
+ }
1212
+ },
1213
+ "uniqueConstraints": {},
1214
+ "policies": {},
1215
+ "checkConstraints": {},
1216
+ "isRLSEnabled": false
1217
+ },
1218
+ "public.EveDocumentHead": {
1219
+ "name": "EveDocumentHead",
1220
+ "schema": "",
1221
+ "columns": {
1222
+ "conversationId": {
1223
+ "name": "conversationId",
1224
+ "type": "uuid",
1225
+ "primaryKey": false,
1226
+ "notNull": true
1227
+ },
1228
+ "documentId": {
1229
+ "name": "documentId",
1230
+ "type": "uuid",
1231
+ "primaryKey": false,
1232
+ "notNull": true
1233
+ },
1234
+ "ownerId": {
1235
+ "name": "ownerId",
1236
+ "type": "text",
1237
+ "primaryKey": false,
1238
+ "notNull": true
1239
+ },
1240
+ "revisionId": {
1241
+ "name": "revisionId",
1242
+ "type": "uuid",
1243
+ "primaryKey": false,
1244
+ "notNull": true
1245
+ }
1246
+ },
1247
+ "indexes": {},
1248
+ "foreignKeys": {
1249
+ "EveDocumentHead_conversation_owner_fk": {
1250
+ "name": "EveDocumentHead_conversation_owner_fk",
1251
+ "tableFrom": "EveDocumentHead",
1252
+ "tableTo": "EveConversation",
1253
+ "columnsFrom": [
1254
+ "conversationId",
1255
+ "ownerId"
1256
+ ],
1257
+ "columnsTo": [
1258
+ "id",
1259
+ "ownerId"
1260
+ ],
1261
+ "onDelete": "no action",
1262
+ "onUpdate": "no action"
1263
+ },
1264
+ "EveDocumentHead_revision_document_owner_fk": {
1265
+ "name": "EveDocumentHead_revision_document_owner_fk",
1266
+ "tableFrom": "EveDocumentHead",
1267
+ "tableTo": "EveDocumentRevision",
1268
+ "columnsFrom": [
1269
+ "revisionId",
1270
+ "documentId",
1271
+ "ownerId"
1272
+ ],
1273
+ "columnsTo": [
1274
+ "id",
1275
+ "documentId",
1276
+ "ownerId"
1277
+ ],
1278
+ "onDelete": "no action",
1279
+ "onUpdate": "no action"
1280
+ }
1281
+ },
1282
+ "compositePrimaryKeys": {
1283
+ "EveDocumentHead_conversationId_documentId_pk": {
1284
+ "name": "EveDocumentHead_conversationId_documentId_pk",
1285
+ "columns": [
1286
+ "conversationId",
1287
+ "documentId"
1288
+ ]
1289
+ }
1290
+ },
1291
+ "uniqueConstraints": {},
1292
+ "policies": {},
1293
+ "checkConstraints": {},
1294
+ "isRLSEnabled": false
1295
+ },
1296
+ "public.EveDocumentRevision": {
1297
+ "name": "EveDocumentRevision",
1298
+ "schema": "",
1299
+ "columns": {
1300
+ "content": {
1301
+ "name": "content",
1302
+ "type": "text",
1303
+ "primaryKey": false,
1304
+ "notNull": true
1305
+ },
1306
+ "conversationId": {
1307
+ "name": "conversationId",
1308
+ "type": "uuid",
1309
+ "primaryKey": false,
1310
+ "notNull": true
1311
+ },
1312
+ "createdAt": {
1313
+ "name": "createdAt",
1314
+ "type": "timestamp",
1315
+ "primaryKey": false,
1316
+ "notNull": true,
1317
+ "default": "now()"
1318
+ },
1319
+ "documentId": {
1320
+ "name": "documentId",
1321
+ "type": "uuid",
1322
+ "primaryKey": false,
1323
+ "notNull": true
1324
+ },
1325
+ "fileIds": {
1326
+ "name": "fileIds",
1327
+ "type": "jsonb",
1328
+ "primaryKey": false,
1329
+ "notNull": true,
1330
+ "default": "'[]'::jsonb"
1331
+ },
1332
+ "id": {
1333
+ "name": "id",
1334
+ "type": "uuid",
1335
+ "primaryKey": true,
1336
+ "notNull": true,
1337
+ "default": "gen_random_uuid()"
1338
+ },
1339
+ "kind": {
1340
+ "name": "kind",
1341
+ "type": "varchar",
1342
+ "primaryKey": false,
1343
+ "notNull": true
1344
+ },
1345
+ "operationId": {
1346
+ "name": "operationId",
1347
+ "type": "text",
1348
+ "primaryKey": false,
1349
+ "notNull": true
1350
+ },
1351
+ "ownerId": {
1352
+ "name": "ownerId",
1353
+ "type": "text",
1354
+ "primaryKey": false,
1355
+ "notNull": true
1356
+ },
1357
+ "parentRevisionId": {
1358
+ "name": "parentRevisionId",
1359
+ "type": "uuid",
1360
+ "primaryKey": false,
1361
+ "notNull": false
1362
+ },
1363
+ "title": {
1364
+ "name": "title",
1365
+ "type": "text",
1366
+ "primaryKey": false,
1367
+ "notNull": true
1368
+ },
1369
+ "turnIndex": {
1370
+ "name": "turnIndex",
1371
+ "type": "integer",
1372
+ "primaryKey": false,
1373
+ "notNull": false
1374
+ }
1375
+ },
1376
+ "indexes": {
1377
+ "EveDocumentRevision_operation": {
1378
+ "name": "EveDocumentRevision_operation",
1379
+ "columns": [
1380
+ {
1381
+ "expression": "conversationId",
1382
+ "isExpression": false,
1383
+ "asc": true,
1384
+ "nulls": "last"
1385
+ },
1386
+ {
1387
+ "expression": "operationId",
1388
+ "isExpression": false,
1389
+ "asc": true,
1390
+ "nulls": "last"
1391
+ }
1392
+ ],
1393
+ "isUnique": true,
1394
+ "concurrently": false,
1395
+ "method": "btree",
1396
+ "with": {}
1397
+ }
1398
+ },
1399
+ "foreignKeys": {
1400
+ "EveDocumentRevision_conversation_owner_fk": {
1401
+ "name": "EveDocumentRevision_conversation_owner_fk",
1402
+ "tableFrom": "EveDocumentRevision",
1403
+ "tableTo": "EveConversation",
1404
+ "columnsFrom": [
1405
+ "conversationId",
1406
+ "ownerId"
1407
+ ],
1408
+ "columnsTo": [
1409
+ "id",
1410
+ "ownerId"
1411
+ ],
1412
+ "onDelete": "no action",
1413
+ "onUpdate": "no action"
1414
+ },
1415
+ "EveDocumentRevision_parent_document_owner_fk": {
1416
+ "name": "EveDocumentRevision_parent_document_owner_fk",
1417
+ "tableFrom": "EveDocumentRevision",
1418
+ "tableTo": "EveDocumentRevision",
1419
+ "columnsFrom": [
1420
+ "parentRevisionId",
1421
+ "documentId",
1422
+ "ownerId"
1423
+ ],
1424
+ "columnsTo": [
1425
+ "id",
1426
+ "documentId",
1427
+ "ownerId"
1428
+ ],
1429
+ "onDelete": "no action",
1430
+ "onUpdate": "no action"
1431
+ }
1432
+ },
1433
+ "compositePrimaryKeys": {},
1434
+ "uniqueConstraints": {
1435
+ "EveDocumentRevision_identity": {
1436
+ "name": "EveDocumentRevision_identity",
1437
+ "nullsNotDistinct": false,
1438
+ "columns": [
1439
+ "id",
1440
+ "documentId",
1441
+ "ownerId"
1442
+ ]
1443
+ }
1444
+ },
1445
+ "policies": {},
1446
+ "checkConstraints": {
1447
+ "EveDocumentRevision_turn_nonnegative": {
1448
+ "name": "EveDocumentRevision_turn_nonnegative",
1449
+ "value": "\"EveDocumentRevision\".\"turnIndex\" >= 0"
1450
+ }
1451
+ },
1452
+ "isRLSEnabled": false
1453
+ },
1454
+ "public.EveFileReference": {
1455
+ "name": "EveFileReference",
1456
+ "schema": "",
1457
+ "columns": {
1458
+ "conversationId": {
1459
+ "name": "conversationId",
1460
+ "type": "uuid",
1461
+ "primaryKey": false,
1462
+ "notNull": true
1463
+ },
1464
+ "key": {
1465
+ "name": "key",
1466
+ "type": "text",
1467
+ "primaryKey": false,
1468
+ "notNull": true
1469
+ },
1470
+ "ownerId": {
1471
+ "name": "ownerId",
1472
+ "type": "text",
1473
+ "primaryKey": false,
1474
+ "notNull": true
1475
+ }
1476
+ },
1477
+ "indexes": {
1478
+ "EveFileReference_key": {
1479
+ "name": "EveFileReference_key",
1480
+ "columns": [
1481
+ {
1482
+ "expression": "key",
1483
+ "isExpression": false,
1484
+ "asc": true,
1485
+ "nulls": "last"
1486
+ }
1487
+ ],
1488
+ "isUnique": false,
1489
+ "concurrently": false,
1490
+ "method": "btree",
1491
+ "with": {}
1492
+ }
1493
+ },
1494
+ "foreignKeys": {
1495
+ "EveFileReference_conversationId_ownerId_EveConversation_id_ownerId_fk": {
1496
+ "name": "EveFileReference_conversationId_ownerId_EveConversation_id_ownerId_fk",
1497
+ "tableFrom": "EveFileReference",
1498
+ "tableTo": "EveConversation",
1499
+ "columnsFrom": [
1500
+ "conversationId",
1501
+ "ownerId"
1502
+ ],
1503
+ "columnsTo": [
1504
+ "id",
1505
+ "ownerId"
1506
+ ],
1507
+ "onDelete": "no action",
1508
+ "onUpdate": "no action"
1509
+ },
1510
+ "EveFileReference_key_ownerId_EveStoredFile_key_ownerId_fk": {
1511
+ "name": "EveFileReference_key_ownerId_EveStoredFile_key_ownerId_fk",
1512
+ "tableFrom": "EveFileReference",
1513
+ "tableTo": "EveStoredFile",
1514
+ "columnsFrom": [
1515
+ "key",
1516
+ "ownerId"
1517
+ ],
1518
+ "columnsTo": [
1519
+ "key",
1520
+ "ownerId"
1521
+ ],
1522
+ "onDelete": "no action",
1523
+ "onUpdate": "no action"
1524
+ }
1525
+ },
1526
+ "compositePrimaryKeys": {
1527
+ "EveFileReference_conversationId_key_pk": {
1528
+ "name": "EveFileReference_conversationId_key_pk",
1529
+ "columns": [
1530
+ "conversationId",
1531
+ "key"
1532
+ ]
1533
+ }
1534
+ },
1535
+ "uniqueConstraints": {},
1536
+ "policies": {},
1537
+ "checkConstraints": {},
1538
+ "isRLSEnabled": false
1539
+ },
1540
+ "public.EveFollowup": {
1541
+ "name": "EveFollowup",
1542
+ "schema": "",
1543
+ "columns": {
1544
+ "chatId": {
1545
+ "name": "chatId",
1546
+ "type": "uuid",
1547
+ "primaryKey": false,
1548
+ "notNull": true
1549
+ },
1550
+ "ownerId": {
1551
+ "name": "ownerId",
1552
+ "type": "text",
1553
+ "primaryKey": false,
1554
+ "notNull": true
1555
+ },
1556
+ "turnId": {
1557
+ "name": "turnId",
1558
+ "type": "text",
1559
+ "primaryKey": false,
1560
+ "notNull": true
1561
+ },
1562
+ "sessionId": {
1563
+ "name": "sessionId",
1564
+ "type": "text",
1565
+ "primaryKey": false,
1566
+ "notNull": true
1567
+ },
1568
+ "eventId": {
1569
+ "name": "eventId",
1570
+ "type": "text",
1571
+ "primaryKey": true,
1572
+ "notNull": true
1573
+ },
1574
+ "suggestions": {
1575
+ "name": "suggestions",
1576
+ "type": "jsonb",
1577
+ "primaryKey": false,
1578
+ "notNull": false
1579
+ }
1580
+ },
1581
+ "indexes": {
1582
+ "EveFollowup_chat": {
1583
+ "name": "EveFollowup_chat",
1584
+ "columns": [
1585
+ {
1586
+ "expression": "chatId",
1587
+ "isExpression": false,
1588
+ "asc": true,
1589
+ "nulls": "last"
1590
+ }
1591
+ ],
1592
+ "isUnique": false,
1593
+ "concurrently": false,
1594
+ "method": "btree",
1595
+ "with": {}
1596
+ }
1597
+ },
1598
+ "foreignKeys": {
1599
+ "EveFollowup_chatId_ownerId_EveChat_id_ownerId_fk": {
1600
+ "name": "EveFollowup_chatId_ownerId_EveChat_id_ownerId_fk",
1601
+ "tableFrom": "EveFollowup",
1602
+ "tableTo": "EveChat",
1603
+ "columnsFrom": [
1604
+ "chatId",
1605
+ "ownerId"
1606
+ ],
1607
+ "columnsTo": [
1608
+ "id",
1609
+ "ownerId"
1610
+ ],
1611
+ "onDelete": "cascade",
1612
+ "onUpdate": "no action"
1613
+ }
1614
+ },
1615
+ "compositePrimaryKeys": {},
1616
+ "uniqueConstraints": {
1617
+ "EveFollowup_sessionId_turnId_unique": {
1618
+ "name": "EveFollowup_sessionId_turnId_unique",
1619
+ "nullsNotDistinct": false,
1620
+ "columns": [
1621
+ "sessionId",
1622
+ "turnId"
1623
+ ]
1624
+ }
1625
+ },
1626
+ "policies": {},
1627
+ "checkConstraints": {},
1628
+ "isRLSEnabled": false
1629
+ },
1630
+ "public.EveGuest": {
1631
+ "name": "EveGuest",
1632
+ "schema": "",
1633
+ "columns": {
1634
+ "createdAt": {
1635
+ "name": "createdAt",
1636
+ "type": "timestamp with time zone",
1637
+ "primaryKey": false,
1638
+ "notNull": true,
1639
+ "default": "now()"
1640
+ },
1641
+ "expiresAt": {
1642
+ "name": "expiresAt",
1643
+ "type": "timestamp with time zone",
1644
+ "primaryKey": false,
1645
+ "notNull": true
1646
+ },
1647
+ "messageLimit": {
1648
+ "name": "messageLimit",
1649
+ "type": "integer",
1650
+ "primaryKey": false,
1651
+ "notNull": true
1652
+ },
1653
+ "ownerId": {
1654
+ "name": "ownerId",
1655
+ "type": "text",
1656
+ "primaryKey": true,
1657
+ "notNull": true
1658
+ },
1659
+ "remainingMessages": {
1660
+ "name": "remainingMessages",
1661
+ "type": "integer",
1662
+ "primaryKey": false,
1663
+ "notNull": true
1664
+ },
1665
+ "tokenHash": {
1666
+ "name": "tokenHash",
1667
+ "type": "varchar(64)",
1668
+ "primaryKey": false,
1669
+ "notNull": true
1670
+ }
1671
+ },
1672
+ "indexes": {
1673
+ "EveGuest_expiry_idx": {
1674
+ "name": "EveGuest_expiry_idx",
1675
+ "columns": [
1676
+ {
1677
+ "expression": "expiresAt",
1678
+ "isExpression": false,
1679
+ "asc": true,
1680
+ "nulls": "last"
1681
+ }
1682
+ ],
1683
+ "isUnique": false,
1684
+ "concurrently": false,
1685
+ "method": "btree",
1686
+ "with": {}
1687
+ }
1688
+ },
1689
+ "foreignKeys": {
1690
+ "EveGuest_ownerId_user_id_fk": {
1691
+ "name": "EveGuest_ownerId_user_id_fk",
1692
+ "tableFrom": "EveGuest",
1693
+ "tableTo": "user",
1694
+ "columnsFrom": [
1695
+ "ownerId"
1696
+ ],
1697
+ "columnsTo": [
1698
+ "id"
1699
+ ],
1700
+ "onDelete": "cascade",
1701
+ "onUpdate": "no action"
1702
+ }
1703
+ },
1704
+ "compositePrimaryKeys": {},
1705
+ "uniqueConstraints": {
1706
+ "EveGuest_tokenHash_unique": {
1707
+ "name": "EveGuest_tokenHash_unique",
1708
+ "nullsNotDistinct": false,
1709
+ "columns": [
1710
+ "tokenHash"
1711
+ ]
1712
+ }
1713
+ },
1714
+ "policies": {},
1715
+ "checkConstraints": {
1716
+ "EveGuest_message_balance": {
1717
+ "name": "EveGuest_message_balance",
1718
+ "value": "\"EveGuest\".\"remainingMessages\" >= 0 and \"EveGuest\".\"remainingMessages\" <= \"EveGuest\".\"messageLimit\""
1719
+ },
1720
+ "EveGuest_token_hash": {
1721
+ "name": "EveGuest_token_hash",
1722
+ "value": "\"EveGuest\".\"tokenHash\" ~ '^[0-9a-f]{64}$'"
1723
+ }
1724
+ },
1725
+ "isRLSEnabled": false
1726
+ },
1727
+ "public.EveGuestMessage": {
1728
+ "name": "EveGuestMessage",
1729
+ "schema": "",
1730
+ "columns": {
1731
+ "ipHash": {
1732
+ "name": "ipHash",
1733
+ "type": "varchar(64)",
1734
+ "primaryKey": false,
1735
+ "notNull": true
1736
+ },
1737
+ "operationId": {
1738
+ "name": "operationId",
1739
+ "type": "uuid",
1740
+ "primaryKey": false,
1741
+ "notNull": true
1742
+ },
1743
+ "ownerId": {
1744
+ "name": "ownerId",
1745
+ "type": "text",
1746
+ "primaryKey": false,
1747
+ "notNull": true
1748
+ },
1749
+ "requestHash": {
1750
+ "name": "requestHash",
1751
+ "type": "varchar(64)",
1752
+ "primaryKey": false,
1753
+ "notNull": true
1754
+ },
1755
+ "reservationId": {
1756
+ "name": "reservationId",
1757
+ "type": "uuid",
1758
+ "primaryKey": false,
1759
+ "notNull": true
1760
+ },
1761
+ "reservedAt": {
1762
+ "name": "reservedAt",
1763
+ "type": "timestamp with time zone",
1764
+ "primaryKey": false,
1765
+ "notNull": true
1766
+ },
1767
+ "state": {
1768
+ "name": "state",
1769
+ "type": "text",
1770
+ "primaryKey": false,
1771
+ "notNull": true
1772
+ }
1773
+ },
1774
+ "indexes": {},
1775
+ "foreignKeys": {
1776
+ "EveGuestMessage_ownerId_EveGuest_ownerId_fk": {
1777
+ "name": "EveGuestMessage_ownerId_EveGuest_ownerId_fk",
1778
+ "tableFrom": "EveGuestMessage",
1779
+ "tableTo": "EveGuest",
1780
+ "columnsFrom": [
1781
+ "ownerId"
1782
+ ],
1783
+ "columnsTo": [
1784
+ "ownerId"
1785
+ ],
1786
+ "onDelete": "cascade",
1787
+ "onUpdate": "no action"
1788
+ }
1789
+ },
1790
+ "compositePrimaryKeys": {
1791
+ "EveGuestMessage_ownerId_operationId_pk": {
1792
+ "name": "EveGuestMessage_ownerId_operationId_pk",
1793
+ "columns": [
1794
+ "ownerId",
1795
+ "operationId"
1796
+ ]
1797
+ }
1798
+ },
1799
+ "uniqueConstraints": {},
1800
+ "policies": {},
1801
+ "checkConstraints": {
1802
+ "EveGuestMessage_state": {
1803
+ "name": "EveGuestMessage_state",
1804
+ "value": "\"EveGuestMessage\".\"state\" in ('reserved', 'committed', 'released')"
1805
+ },
1806
+ "EveGuestMessage_request_hash": {
1807
+ "name": "EveGuestMessage_request_hash",
1808
+ "value": "\"EveGuestMessage\".\"requestHash\" ~ '^[0-9a-f]{64}$'"
1809
+ }
1810
+ },
1811
+ "isRLSEnabled": false
1812
+ },
1813
+ "public.EveGuestRate": {
1814
+ "name": "EveGuestRate",
1815
+ "schema": "",
1816
+ "columns": {
1817
+ "ipHash": {
1818
+ "name": "ipHash",
1819
+ "type": "varchar(64)",
1820
+ "primaryKey": false,
1821
+ "notNull": true
1822
+ },
1823
+ "requests": {
1824
+ "name": "requests",
1825
+ "type": "integer",
1826
+ "primaryKey": false,
1827
+ "notNull": true
1828
+ },
1829
+ "startsAt": {
1830
+ "name": "startsAt",
1831
+ "type": "timestamp with time zone",
1832
+ "primaryKey": false,
1833
+ "notNull": true
1834
+ },
1835
+ "windowSeconds": {
1836
+ "name": "windowSeconds",
1837
+ "type": "integer",
1838
+ "primaryKey": false,
1839
+ "notNull": true
1840
+ }
1841
+ },
1842
+ "indexes": {},
1843
+ "foreignKeys": {},
1844
+ "compositePrimaryKeys": {
1845
+ "EveGuestRate_ipHash_windowSeconds_startsAt_pk": {
1846
+ "name": "EveGuestRate_ipHash_windowSeconds_startsAt_pk",
1847
+ "columns": [
1848
+ "ipHash",
1849
+ "windowSeconds",
1850
+ "startsAt"
1851
+ ]
1852
+ }
1853
+ },
1854
+ "uniqueConstraints": {},
1855
+ "policies": {},
1856
+ "checkConstraints": {
1857
+ "EveGuestRate_requests": {
1858
+ "name": "EveGuestRate_requests",
1859
+ "value": "\"EveGuestRate\".\"requests\" >= 0"
1860
+ },
1861
+ "EveGuestRate_window": {
1862
+ "name": "EveGuestRate_window",
1863
+ "value": "\"EveGuestRate\".\"windowSeconds\" in (60, 2592000)"
1864
+ }
1865
+ },
1866
+ "isRLSEnabled": false
1867
+ },
1868
+ "public.EveImportedDocumentCheckpoint": {
1869
+ "name": "EveImportedDocumentCheckpoint",
1870
+ "schema": "",
1871
+ "columns": {
1872
+ "conversationId": {
1873
+ "name": "conversationId",
1874
+ "type": "uuid",
1875
+ "primaryKey": false,
1876
+ "notNull": true
1877
+ },
1878
+ "messageIndex": {
1879
+ "name": "messageIndex",
1880
+ "type": "integer",
1881
+ "primaryKey": false,
1882
+ "notNull": true
1883
+ },
1884
+ "ownerId": {
1885
+ "name": "ownerId",
1886
+ "type": "text",
1887
+ "primaryKey": false,
1888
+ "notNull": true
1889
+ }
1890
+ },
1891
+ "indexes": {},
1892
+ "foreignKeys": {
1893
+ "EveImportedDocumentCheckpoint_conversation_owner_fk": {
1894
+ "name": "EveImportedDocumentCheckpoint_conversation_owner_fk",
1895
+ "tableFrom": "EveImportedDocumentCheckpoint",
1896
+ "tableTo": "EveConversation",
1897
+ "columnsFrom": [
1898
+ "conversationId",
1899
+ "ownerId"
1900
+ ],
1901
+ "columnsTo": [
1902
+ "id",
1903
+ "ownerId"
1904
+ ],
1905
+ "onDelete": "no action",
1906
+ "onUpdate": "no action"
1907
+ }
1908
+ },
1909
+ "compositePrimaryKeys": {
1910
+ "EveImportedDocumentCheckpoint_conversationId_messageIndex_pk": {
1911
+ "name": "EveImportedDocumentCheckpoint_conversationId_messageIndex_pk",
1912
+ "columns": [
1913
+ "conversationId",
1914
+ "messageIndex"
1915
+ ]
1916
+ }
1917
+ },
1918
+ "uniqueConstraints": {
1919
+ "EveImportedDocumentCheckpoint_owner_identity": {
1920
+ "name": "EveImportedDocumentCheckpoint_owner_identity",
1921
+ "nullsNotDistinct": false,
1922
+ "columns": [
1923
+ "conversationId",
1924
+ "messageIndex",
1925
+ "ownerId"
1926
+ ]
1927
+ }
1928
+ },
1929
+ "policies": {},
1930
+ "checkConstraints": {
1931
+ "EveImportedDocumentCheckpoint_message_range": {
1932
+ "name": "EveImportedDocumentCheckpoint_message_range",
1933
+ "value": "\"EveImportedDocumentCheckpoint\".\"messageIndex\" between 0 and 9999"
1934
+ }
1935
+ },
1936
+ "isRLSEnabled": false
1937
+ },
1938
+ "public.EveImportedDocumentCheckpointEntry": {
1939
+ "name": "EveImportedDocumentCheckpointEntry",
1940
+ "schema": "",
1941
+ "columns": {
1942
+ "conversationId": {
1943
+ "name": "conversationId",
1944
+ "type": "uuid",
1945
+ "primaryKey": false,
1946
+ "notNull": true
1947
+ },
1948
+ "documentId": {
1949
+ "name": "documentId",
1950
+ "type": "uuid",
1951
+ "primaryKey": false,
1952
+ "notNull": true
1953
+ },
1954
+ "messageIndex": {
1955
+ "name": "messageIndex",
1956
+ "type": "integer",
1957
+ "primaryKey": false,
1958
+ "notNull": true
1959
+ },
1960
+ "ownerId": {
1961
+ "name": "ownerId",
1962
+ "type": "text",
1963
+ "primaryKey": false,
1964
+ "notNull": true
1965
+ },
1966
+ "revisionId": {
1967
+ "name": "revisionId",
1968
+ "type": "uuid",
1969
+ "primaryKey": false,
1970
+ "notNull": true
1971
+ }
1972
+ },
1973
+ "indexes": {},
1974
+ "foreignKeys": {
1975
+ "EveImportedDocumentCheckpointEntry_checkpoint_owner_fk": {
1976
+ "name": "EveImportedDocumentCheckpointEntry_checkpoint_owner_fk",
1977
+ "tableFrom": "EveImportedDocumentCheckpointEntry",
1978
+ "tableTo": "EveImportedDocumentCheckpoint",
1979
+ "columnsFrom": [
1980
+ "conversationId",
1981
+ "messageIndex",
1982
+ "ownerId"
1983
+ ],
1984
+ "columnsTo": [
1985
+ "conversationId",
1986
+ "messageIndex",
1987
+ "ownerId"
1988
+ ],
1989
+ "onDelete": "no action",
1990
+ "onUpdate": "no action"
1991
+ },
1992
+ "EveImportedDocumentCheckpointEntry_revision_owner_fk": {
1993
+ "name": "EveImportedDocumentCheckpointEntry_revision_owner_fk",
1994
+ "tableFrom": "EveImportedDocumentCheckpointEntry",
1995
+ "tableTo": "EveDocumentRevision",
1996
+ "columnsFrom": [
1997
+ "revisionId",
1998
+ "documentId",
1999
+ "ownerId"
2000
+ ],
2001
+ "columnsTo": [
2002
+ "id",
2003
+ "documentId",
2004
+ "ownerId"
2005
+ ],
2006
+ "onDelete": "no action",
2007
+ "onUpdate": "no action"
2008
+ }
2009
+ },
2010
+ "compositePrimaryKeys": {
2011
+ "EveImportedDocumentCheckpointEntry_conversationId_messageIndex_documentId_pk": {
2012
+ "name": "EveImportedDocumentCheckpointEntry_conversationId_messageIndex_documentId_pk",
2013
+ "columns": [
2014
+ "conversationId",
2015
+ "messageIndex",
2016
+ "documentId"
2017
+ ]
2018
+ }
2019
+ },
2020
+ "uniqueConstraints": {},
2021
+ "policies": {},
2022
+ "checkConstraints": {},
2023
+ "isRLSEnabled": false
2024
+ },
2025
+ "public.EveNamedDocumentCheckpoint": {
2026
+ "name": "EveNamedDocumentCheckpoint",
2027
+ "schema": "",
2028
+ "columns": {
2029
+ "checkpointId": {
2030
+ "name": "checkpointId",
2031
+ "type": "uuid",
2032
+ "primaryKey": false,
2033
+ "notNull": true
2034
+ },
2035
+ "conversationId": {
2036
+ "name": "conversationId",
2037
+ "type": "uuid",
2038
+ "primaryKey": false,
2039
+ "notNull": true
2040
+ },
2041
+ "ownerId": {
2042
+ "name": "ownerId",
2043
+ "type": "text",
2044
+ "primaryKey": false,
2045
+ "notNull": true
2046
+ },
2047
+ "turnIndex": {
2048
+ "name": "turnIndex",
2049
+ "type": "integer",
2050
+ "primaryKey": false,
2051
+ "notNull": true
2052
+ }
2053
+ },
2054
+ "indexes": {},
2055
+ "foreignKeys": {
2056
+ "EveNamedDocumentCheckpoint_conversation_owner_fk": {
2057
+ "name": "EveNamedDocumentCheckpoint_conversation_owner_fk",
2058
+ "tableFrom": "EveNamedDocumentCheckpoint",
2059
+ "tableTo": "EveConversation",
2060
+ "columnsFrom": [
2061
+ "conversationId",
2062
+ "ownerId"
2063
+ ],
2064
+ "columnsTo": [
2065
+ "id",
2066
+ "ownerId"
2067
+ ],
2068
+ "onDelete": "no action",
2069
+ "onUpdate": "no action"
2070
+ }
2071
+ },
2072
+ "compositePrimaryKeys": {
2073
+ "EveNamedDocumentCheckpoint_conversationId_checkpointId_pk": {
2074
+ "name": "EveNamedDocumentCheckpoint_conversationId_checkpointId_pk",
2075
+ "columns": [
2076
+ "conversationId",
2077
+ "checkpointId"
2078
+ ]
2079
+ }
2080
+ },
2081
+ "uniqueConstraints": {
2082
+ "EveNamedDocumentCheckpoint_owner_identity": {
2083
+ "name": "EveNamedDocumentCheckpoint_owner_identity",
2084
+ "nullsNotDistinct": false,
2085
+ "columns": [
2086
+ "conversationId",
2087
+ "checkpointId",
2088
+ "ownerId"
2089
+ ]
2090
+ }
2091
+ },
2092
+ "policies": {},
2093
+ "checkConstraints": {
2094
+ "EveNamedDocumentCheckpoint_turn_nonnegative": {
2095
+ "name": "EveNamedDocumentCheckpoint_turn_nonnegative",
2096
+ "value": "\"EveNamedDocumentCheckpoint\".\"turnIndex\" >= 0"
2097
+ }
2098
+ },
2099
+ "isRLSEnabled": false
2100
+ },
2101
+ "public.EveNamedDocumentCheckpointEntry": {
2102
+ "name": "EveNamedDocumentCheckpointEntry",
2103
+ "schema": "",
2104
+ "columns": {
2105
+ "checkpointId": {
2106
+ "name": "checkpointId",
2107
+ "type": "uuid",
2108
+ "primaryKey": false,
2109
+ "notNull": true
2110
+ },
2111
+ "conversationId": {
2112
+ "name": "conversationId",
2113
+ "type": "uuid",
2114
+ "primaryKey": false,
2115
+ "notNull": true
2116
+ },
2117
+ "documentId": {
2118
+ "name": "documentId",
2119
+ "type": "uuid",
2120
+ "primaryKey": false,
2121
+ "notNull": true
2122
+ },
2123
+ "ownerId": {
2124
+ "name": "ownerId",
2125
+ "type": "text",
2126
+ "primaryKey": false,
2127
+ "notNull": true
2128
+ },
2129
+ "revisionId": {
2130
+ "name": "revisionId",
2131
+ "type": "uuid",
2132
+ "primaryKey": false,
2133
+ "notNull": true
2134
+ }
2135
+ },
2136
+ "indexes": {},
2137
+ "foreignKeys": {
2138
+ "EveNamedDocumentCheckpointEntry_checkpoint_owner_fk": {
2139
+ "name": "EveNamedDocumentCheckpointEntry_checkpoint_owner_fk",
2140
+ "tableFrom": "EveNamedDocumentCheckpointEntry",
2141
+ "tableTo": "EveNamedDocumentCheckpoint",
2142
+ "columnsFrom": [
2143
+ "conversationId",
2144
+ "checkpointId",
2145
+ "ownerId"
2146
+ ],
2147
+ "columnsTo": [
2148
+ "conversationId",
2149
+ "checkpointId",
2150
+ "ownerId"
2151
+ ],
2152
+ "onDelete": "no action",
2153
+ "onUpdate": "no action"
2154
+ },
2155
+ "EveNamedDocumentCheckpointEntry_revision_owner_fk": {
2156
+ "name": "EveNamedDocumentCheckpointEntry_revision_owner_fk",
2157
+ "tableFrom": "EveNamedDocumentCheckpointEntry",
2158
+ "tableTo": "EveDocumentRevision",
2159
+ "columnsFrom": [
2160
+ "revisionId",
2161
+ "documentId",
2162
+ "ownerId"
2163
+ ],
2164
+ "columnsTo": [
2165
+ "id",
2166
+ "documentId",
2167
+ "ownerId"
2168
+ ],
2169
+ "onDelete": "no action",
2170
+ "onUpdate": "no action"
2171
+ }
2172
+ },
2173
+ "compositePrimaryKeys": {
2174
+ "EveNamedDocumentCheckpointEntry_conversationId_checkpointId_documentId_pk": {
2175
+ "name": "EveNamedDocumentCheckpointEntry_conversationId_checkpointId_documentId_pk",
2176
+ "columns": [
2177
+ "conversationId",
2178
+ "checkpointId",
2179
+ "documentId"
2180
+ ]
2181
+ }
2182
+ },
2183
+ "uniqueConstraints": {},
2184
+ "policies": {},
2185
+ "checkConstraints": {},
2186
+ "isRLSEnabled": false
2187
+ },
2188
+ "public.EveResponseGroup": {
2189
+ "name": "EveResponseGroup",
2190
+ "schema": "",
2191
+ "columns": {
2192
+ "candidateOperationIds": {
2193
+ "name": "candidateOperationIds",
2194
+ "type": "uuid[]",
2195
+ "primaryKey": false,
2196
+ "notNull": true
2197
+ },
2198
+ "candidates": {
2199
+ "name": "candidates",
2200
+ "type": "jsonb",
2201
+ "primaryKey": false,
2202
+ "notNull": false
2203
+ },
2204
+ "createdAt": {
2205
+ "name": "createdAt",
2206
+ "type": "timestamp",
2207
+ "primaryKey": false,
2208
+ "notNull": true,
2209
+ "default": "now()"
2210
+ },
2211
+ "deleted": {
2212
+ "name": "deleted",
2213
+ "type": "boolean",
2214
+ "primaryKey": false,
2215
+ "notNull": true,
2216
+ "default": false
2217
+ },
2218
+ "id": {
2219
+ "name": "id",
2220
+ "type": "uuid",
2221
+ "primaryKey": true,
2222
+ "notNull": true,
2223
+ "default": "gen_random_uuid()"
2224
+ },
2225
+ "inputHash": {
2226
+ "name": "inputHash",
2227
+ "type": "text",
2228
+ "primaryKey": false,
2229
+ "notNull": false
2230
+ },
2231
+ "operationId": {
2232
+ "name": "operationId",
2233
+ "type": "uuid",
2234
+ "primaryKey": false,
2235
+ "notNull": true
2236
+ },
2237
+ "ownerId": {
2238
+ "name": "ownerId",
2239
+ "type": "text",
2240
+ "primaryKey": false,
2241
+ "notNull": true
2242
+ },
2243
+ "sourceConversationId": {
2244
+ "name": "sourceConversationId",
2245
+ "type": "uuid",
2246
+ "primaryKey": false,
2247
+ "notNull": false
2248
+ },
2249
+ "sourceIdentityKnown": {
2250
+ "name": "sourceIdentityKnown",
2251
+ "type": "boolean",
2252
+ "primaryKey": false,
2253
+ "notNull": true,
2254
+ "default": false
2255
+ }
2256
+ },
2257
+ "indexes": {
2258
+ "EveResponseGroup_owner_operation": {
2259
+ "name": "EveResponseGroup_owner_operation",
2260
+ "columns": [
2261
+ {
2262
+ "expression": "ownerId",
2263
+ "isExpression": false,
2264
+ "asc": true,
2265
+ "nulls": "last"
2266
+ },
2267
+ {
2268
+ "expression": "operationId",
2269
+ "isExpression": false,
2270
+ "asc": true,
2271
+ "nulls": "last"
2272
+ }
2273
+ ],
2274
+ "isUnique": true,
2275
+ "concurrently": false,
2276
+ "method": "btree",
2277
+ "with": {}
2278
+ }
2279
+ },
2280
+ "foreignKeys": {
2281
+ "EveResponseGroup_ownerId_user_id_fk": {
2282
+ "name": "EveResponseGroup_ownerId_user_id_fk",
2283
+ "tableFrom": "EveResponseGroup",
2284
+ "tableTo": "user",
2285
+ "columnsFrom": [
2286
+ "ownerId"
2287
+ ],
2288
+ "columnsTo": [
2289
+ "id"
2290
+ ],
2291
+ "onDelete": "no action",
2292
+ "onUpdate": "no action"
2293
+ }
2294
+ },
2295
+ "compositePrimaryKeys": {},
2296
+ "uniqueConstraints": {},
2297
+ "policies": {},
2298
+ "checkConstraints": {},
2299
+ "isRLSEnabled": false
2300
+ },
2301
+ "public.EveSearchText": {
2302
+ "name": "EveSearchText",
2303
+ "schema": "",
2304
+ "columns": {
2305
+ "conversationId": {
2306
+ "name": "conversationId",
2307
+ "type": "uuid",
2308
+ "primaryKey": false,
2309
+ "notNull": true
2310
+ },
2311
+ "key": {
2312
+ "name": "key",
2313
+ "type": "text",
2314
+ "primaryKey": false,
2315
+ "notNull": true
2316
+ },
2317
+ "ownerId": {
2318
+ "name": "ownerId",
2319
+ "type": "text",
2320
+ "primaryKey": false,
2321
+ "notNull": true
2322
+ },
2323
+ "text": {
2324
+ "name": "text",
2325
+ "type": "text",
2326
+ "primaryKey": false,
2327
+ "notNull": true
2328
+ }
2329
+ },
2330
+ "indexes": {
2331
+ "EveSearchText_owner": {
2332
+ "name": "EveSearchText_owner",
2333
+ "columns": [
2334
+ {
2335
+ "expression": "ownerId",
2336
+ "isExpression": false,
2337
+ "asc": true,
2338
+ "nulls": "last"
2339
+ }
2340
+ ],
2341
+ "isUnique": false,
2342
+ "concurrently": false,
2343
+ "method": "btree",
2344
+ "with": {}
2345
+ },
2346
+ "EveSearchText_content": {
2347
+ "name": "EveSearchText_content",
2348
+ "columns": [
2349
+ {
2350
+ "expression": "to_tsvector('simple', \"text\")",
2351
+ "asc": true,
2352
+ "isExpression": true,
2353
+ "nulls": "last"
2354
+ }
2355
+ ],
2356
+ "isUnique": false,
2357
+ "concurrently": false,
2358
+ "method": "gin",
2359
+ "with": {}
2360
+ }
2361
+ },
2362
+ "foreignKeys": {
2363
+ "EveSearchText_conversationId_ownerId_EveConversation_id_ownerId_fk": {
2364
+ "name": "EveSearchText_conversationId_ownerId_EveConversation_id_ownerId_fk",
2365
+ "tableFrom": "EveSearchText",
2366
+ "tableTo": "EveConversation",
2367
+ "columnsFrom": [
2368
+ "conversationId",
2369
+ "ownerId"
2370
+ ],
2371
+ "columnsTo": [
2372
+ "id",
2373
+ "ownerId"
2374
+ ],
2375
+ "onDelete": "cascade",
2376
+ "onUpdate": "no action"
2377
+ }
2378
+ },
2379
+ "compositePrimaryKeys": {
2380
+ "EveSearchText_conversationId_key_pk": {
2381
+ "name": "EveSearchText_conversationId_key_pk",
2382
+ "columns": [
2383
+ "conversationId",
2384
+ "key"
2385
+ ]
2386
+ }
2387
+ },
2388
+ "uniqueConstraints": {},
2389
+ "policies": {},
2390
+ "checkConstraints": {},
2391
+ "isRLSEnabled": false
2392
+ },
2393
+ "public.EveStoredFile": {
2394
+ "name": "EveStoredFile",
2395
+ "schema": "",
2396
+ "columns": {
2397
+ "createdAt": {
2398
+ "name": "createdAt",
2399
+ "type": "timestamp",
2400
+ "primaryKey": false,
2401
+ "notNull": true,
2402
+ "default": "now()"
2403
+ },
2404
+ "key": {
2405
+ "name": "key",
2406
+ "type": "text",
2407
+ "primaryKey": true,
2408
+ "notNull": true
2409
+ },
2410
+ "ownerId": {
2411
+ "name": "ownerId",
2412
+ "type": "text",
2413
+ "primaryKey": false,
2414
+ "notNull": true
2415
+ },
2416
+ "state": {
2417
+ "name": "state",
2418
+ "type": "text",
2419
+ "primaryKey": false,
2420
+ "notNull": true,
2421
+ "default": "'active'"
2422
+ },
2423
+ "storageKey": {
2424
+ "name": "storageKey",
2425
+ "type": "text",
2426
+ "primaryKey": false,
2427
+ "notNull": true,
2428
+ "default": "gen_random_uuid()::text"
2429
+ }
2430
+ },
2431
+ "indexes": {
2432
+ "EveStoredFile_owner": {
2433
+ "name": "EveStoredFile_owner",
2434
+ "columns": [
2435
+ {
2436
+ "expression": "ownerId",
2437
+ "isExpression": false,
2438
+ "asc": true,
2439
+ "nulls": "last"
2440
+ }
2441
+ ],
2442
+ "isUnique": false,
2443
+ "concurrently": false,
2444
+ "method": "btree",
2445
+ "with": {}
2446
+ }
2447
+ },
2448
+ "foreignKeys": {
2449
+ "EveStoredFile_ownerId_user_id_fk": {
2450
+ "name": "EveStoredFile_ownerId_user_id_fk",
2451
+ "tableFrom": "EveStoredFile",
2452
+ "tableTo": "user",
2453
+ "columnsFrom": [
2454
+ "ownerId"
2455
+ ],
2456
+ "columnsTo": [
2457
+ "id"
2458
+ ],
2459
+ "onDelete": "no action",
2460
+ "onUpdate": "no action"
2461
+ }
2462
+ },
2463
+ "compositePrimaryKeys": {},
2464
+ "uniqueConstraints": {
2465
+ "EveStoredFile_storageKey_unique": {
2466
+ "name": "EveStoredFile_storageKey_unique",
2467
+ "nullsNotDistinct": false,
2468
+ "columns": [
2469
+ "storageKey"
2470
+ ]
2471
+ },
2472
+ "EveStoredFile_key_owner": {
2473
+ "name": "EveStoredFile_key_owner",
2474
+ "nullsNotDistinct": false,
2475
+ "columns": [
2476
+ "key",
2477
+ "ownerId"
2478
+ ]
2479
+ }
2480
+ },
2481
+ "policies": {},
2482
+ "checkConstraints": {},
2483
+ "isRLSEnabled": false
2484
+ },
2485
+ "public.EveSubagentSession": {
2486
+ "name": "EveSubagentSession",
2487
+ "schema": "",
2488
+ "columns": {
2489
+ "conversationId": {
2490
+ "name": "conversationId",
2491
+ "type": "uuid",
2492
+ "primaryKey": false,
2493
+ "notNull": true
2494
+ },
2495
+ "ownerId": {
2496
+ "name": "ownerId",
2497
+ "type": "text",
2498
+ "primaryKey": false,
2499
+ "notNull": true
2500
+ },
2501
+ "parentSessionId": {
2502
+ "name": "parentSessionId",
2503
+ "type": "text",
2504
+ "primaryKey": false,
2505
+ "notNull": true
2506
+ },
2507
+ "rootTurnId": {
2508
+ "name": "rootTurnId",
2509
+ "type": "text",
2510
+ "primaryKey": false,
2511
+ "notNull": true
2512
+ },
2513
+ "sessionId": {
2514
+ "name": "sessionId",
2515
+ "type": "text",
2516
+ "primaryKey": true,
2517
+ "notNull": true
2518
+ },
2519
+ "usageStreamIndex": {
2520
+ "name": "usageStreamIndex",
2521
+ "type": "integer",
2522
+ "primaryKey": false,
2523
+ "notNull": true,
2524
+ "default": 0
2525
+ }
2526
+ },
2527
+ "indexes": {
2528
+ "EveSubagentSession_conversation": {
2529
+ "name": "EveSubagentSession_conversation",
2530
+ "columns": [
2531
+ {
2532
+ "expression": "conversationId",
2533
+ "isExpression": false,
2534
+ "asc": true,
2535
+ "nulls": "last"
2536
+ }
2537
+ ],
2538
+ "isUnique": false,
2539
+ "concurrently": false,
2540
+ "method": "btree",
2541
+ "with": {}
2542
+ }
2543
+ },
2544
+ "foreignKeys": {
2545
+ "EveSubagentSession_conversation_owner_fk": {
2546
+ "name": "EveSubagentSession_conversation_owner_fk",
2547
+ "tableFrom": "EveSubagentSession",
2548
+ "tableTo": "EveConversation",
2549
+ "columnsFrom": [
2550
+ "conversationId",
2551
+ "ownerId"
2552
+ ],
2553
+ "columnsTo": [
2554
+ "id",
2555
+ "ownerId"
2556
+ ],
2557
+ "onDelete": "cascade",
2558
+ "onUpdate": "no action"
2559
+ }
2560
+ },
2561
+ "compositePrimaryKeys": {},
2562
+ "uniqueConstraints": {},
2563
+ "policies": {},
2564
+ "checkConstraints": {
2565
+ "EveSubagentSession_not_self": {
2566
+ "name": "EveSubagentSession_not_self",
2567
+ "value": "\"EveSubagentSession\".\"sessionId\" <> \"EveSubagentSession\".\"parentSessionId\""
2568
+ },
2569
+ "EveSubagentSession_cursor": {
2570
+ "name": "EveSubagentSession_cursor",
2571
+ "value": "\"EveSubagentSession\".\"usageStreamIndex\" >= 0"
2572
+ }
2573
+ },
2574
+ "isRLSEnabled": false
2575
+ },
2576
+ "public.EveUsage": {
2577
+ "name": "EveUsage",
2578
+ "schema": "",
2579
+ "columns": {
2580
+ "chargedCents": {
2581
+ "name": "chargedCents",
2582
+ "type": "integer",
2583
+ "primaryKey": false,
2584
+ "notNull": true,
2585
+ "default": 0
2586
+ },
2587
+ "costUsd": {
2588
+ "name": "costUsd",
2589
+ "type": "numeric(24, 12)",
2590
+ "primaryKey": false,
2591
+ "notNull": false
2592
+ },
2593
+ "createdAt": {
2594
+ "name": "createdAt",
2595
+ "type": "timestamp",
2596
+ "primaryKey": false,
2597
+ "notNull": true,
2598
+ "default": "now()"
2599
+ },
2600
+ "eventId": {
2601
+ "name": "eventId",
2602
+ "type": "text",
2603
+ "primaryKey": true,
2604
+ "notNull": true
2605
+ },
2606
+ "generationId": {
2607
+ "name": "generationId",
2608
+ "type": "text",
2609
+ "primaryKey": false,
2610
+ "notNull": false
2611
+ },
2612
+ "modelAttempt": {
2613
+ "name": "modelAttempt",
2614
+ "type": "jsonb",
2615
+ "primaryKey": false,
2616
+ "notNull": false
2617
+ },
2618
+ "ownerId": {
2619
+ "name": "ownerId",
2620
+ "type": "text",
2621
+ "primaryKey": false,
2622
+ "notNull": true
2623
+ },
2624
+ "sessionId": {
2625
+ "name": "sessionId",
2626
+ "type": "text",
2627
+ "primaryKey": false,
2628
+ "notNull": true
2629
+ },
2630
+ "turnId": {
2631
+ "name": "turnId",
2632
+ "type": "text",
2633
+ "primaryKey": false,
2634
+ "notNull": true
2635
+ }
2636
+ },
2637
+ "indexes": {
2638
+ "EveUsage_session_turn": {
2639
+ "name": "EveUsage_session_turn",
2640
+ "columns": [
2641
+ {
2642
+ "expression": "sessionId",
2643
+ "isExpression": false,
2644
+ "asc": true,
2645
+ "nulls": "last"
2646
+ },
2647
+ {
2648
+ "expression": "turnId",
2649
+ "isExpression": false,
2650
+ "asc": true,
2651
+ "nulls": "last"
2652
+ }
2653
+ ],
2654
+ "isUnique": false,
2655
+ "concurrently": false,
2656
+ "method": "btree",
2657
+ "with": {}
2658
+ },
2659
+ "EveUsage_unpriced_owner": {
2660
+ "name": "EveUsage_unpriced_owner",
2661
+ "columns": [
2662
+ {
2663
+ "expression": "ownerId",
2664
+ "isExpression": false,
2665
+ "asc": true,
2666
+ "nulls": "last"
2667
+ }
2668
+ ],
2669
+ "isUnique": false,
2670
+ "where": "\"EveUsage\".\"costUsd\" is null",
2671
+ "concurrently": false,
2672
+ "method": "btree",
2673
+ "with": {}
2674
+ }
2675
+ },
2676
+ "foreignKeys": {
2677
+ "EveUsage_ownerId_user_id_fk": {
2678
+ "name": "EveUsage_ownerId_user_id_fk",
2679
+ "tableFrom": "EveUsage",
2680
+ "tableTo": "user",
2681
+ "columnsFrom": [
2682
+ "ownerId"
2683
+ ],
2684
+ "columnsTo": [
2685
+ "id"
2686
+ ],
2687
+ "onDelete": "no action",
2688
+ "onUpdate": "no action"
2689
+ }
2690
+ },
2691
+ "compositePrimaryKeys": {},
2692
+ "uniqueConstraints": {},
2693
+ "policies": {},
2694
+ "checkConstraints": {},
2695
+ "isRLSEnabled": false
2696
+ },
2697
+ "public.EveVote": {
2698
+ "name": "EveVote",
2699
+ "schema": "",
2700
+ "columns": {
2701
+ "conversationId": {
2702
+ "name": "conversationId",
2703
+ "type": "uuid",
2704
+ "primaryKey": false,
2705
+ "notNull": true
2706
+ },
2707
+ "isUpvoted": {
2708
+ "name": "isUpvoted",
2709
+ "type": "boolean",
2710
+ "primaryKey": false,
2711
+ "notNull": true
2712
+ },
2713
+ "messageId": {
2714
+ "name": "messageId",
2715
+ "type": "text",
2716
+ "primaryKey": false,
2717
+ "notNull": true
2718
+ }
2719
+ },
2720
+ "indexes": {},
2721
+ "foreignKeys": {
2722
+ "EveVote_conversationId_EveConversation_id_fk": {
2723
+ "name": "EveVote_conversationId_EveConversation_id_fk",
2724
+ "tableFrom": "EveVote",
2725
+ "tableTo": "EveConversation",
2726
+ "columnsFrom": [
2727
+ "conversationId"
2728
+ ],
2729
+ "columnsTo": [
2730
+ "id"
2731
+ ],
2732
+ "onDelete": "cascade",
2733
+ "onUpdate": "no action"
2734
+ }
2735
+ },
2736
+ "compositePrimaryKeys": {
2737
+ "EveVote_conversationId_messageId_pk": {
2738
+ "name": "EveVote_conversationId_messageId_pk",
2739
+ "columns": [
2740
+ "conversationId",
2741
+ "messageId"
2742
+ ]
2743
+ }
2744
+ },
2745
+ "uniqueConstraints": {},
2746
+ "policies": {},
2747
+ "checkConstraints": {},
2748
+ "isRLSEnabled": false
2749
+ },
2750
+ "public.EveWorkflowBackend": {
2751
+ "name": "EveWorkflowBackend",
2752
+ "schema": "",
2753
+ "columns": {
2754
+ "id": {
2755
+ "name": "id",
2756
+ "type": "integer",
2757
+ "primaryKey": true,
2758
+ "notNull": true,
2759
+ "default": 1
2760
+ },
2761
+ "world": {
2762
+ "name": "world",
2763
+ "type": "text",
2764
+ "primaryKey": false,
2765
+ "notNull": true
2766
+ }
2767
+ },
2768
+ "indexes": {},
2769
+ "foreignKeys": {},
2770
+ "compositePrimaryKeys": {},
2771
+ "uniqueConstraints": {},
2772
+ "policies": {},
2773
+ "checkConstraints": {
2774
+ "EveWorkflowBackend_singleton": {
2775
+ "name": "EveWorkflowBackend_singleton",
2776
+ "value": "\"EveWorkflowBackend\".\"id\" = 1"
2777
+ }
2778
+ },
2779
+ "isRLSEnabled": false
2780
+ },
2781
+ "public.McpConnector": {
2782
+ "name": "McpConnector",
2783
+ "schema": "",
2784
+ "columns": {
2785
+ "createdAt": {
2786
+ "name": "createdAt",
2787
+ "type": "timestamp",
2788
+ "primaryKey": false,
2789
+ "notNull": true,
2790
+ "default": "now()"
2791
+ },
2792
+ "enabled": {
2793
+ "name": "enabled",
2794
+ "type": "boolean",
2795
+ "primaryKey": false,
2796
+ "notNull": true,
2797
+ "default": true
2798
+ },
2799
+ "id": {
2800
+ "name": "id",
2801
+ "type": "uuid",
2802
+ "primaryKey": true,
2803
+ "notNull": true,
2804
+ "default": "gen_random_uuid()"
2805
+ },
2806
+ "name": {
2807
+ "name": "name",
2808
+ "type": "varchar(256)",
2809
+ "primaryKey": false,
2810
+ "notNull": true
2811
+ },
2812
+ "nameId": {
2813
+ "name": "nameId",
2814
+ "type": "varchar(256)",
2815
+ "primaryKey": false,
2816
+ "notNull": true
2817
+ },
2818
+ "oauthClientId": {
2819
+ "name": "oauthClientId",
2820
+ "type": "text",
2821
+ "primaryKey": false,
2822
+ "notNull": false
2823
+ },
2824
+ "oauthClientSecret": {
2825
+ "name": "oauthClientSecret",
2826
+ "type": "text",
2827
+ "primaryKey": false,
2828
+ "notNull": false
2829
+ },
2830
+ "requireApproval": {
2831
+ "name": "requireApproval",
2832
+ "type": "boolean",
2833
+ "primaryKey": false,
2834
+ "notNull": true,
2835
+ "default": false
2836
+ },
2837
+ "type": {
2838
+ "name": "type",
2839
+ "type": "varchar",
2840
+ "primaryKey": false,
2841
+ "notNull": true,
2842
+ "default": "'http'"
2843
+ },
2844
+ "updatedAt": {
2845
+ "name": "updatedAt",
2846
+ "type": "timestamp",
2847
+ "primaryKey": false,
2848
+ "notNull": true,
2849
+ "default": "now()"
2850
+ },
2851
+ "url": {
2852
+ "name": "url",
2853
+ "type": "text",
2854
+ "primaryKey": false,
2855
+ "notNull": true
2856
+ },
2857
+ "userId": {
2858
+ "name": "userId",
2859
+ "type": "text",
2860
+ "primaryKey": false,
2861
+ "notNull": false
2862
+ }
2863
+ },
2864
+ "indexes": {
2865
+ "McpConnector_user_id_idx": {
2866
+ "name": "McpConnector_user_id_idx",
2867
+ "columns": [
2868
+ {
2869
+ "expression": "userId",
2870
+ "isExpression": false,
2871
+ "asc": true,
2872
+ "nulls": "last"
2873
+ }
2874
+ ],
2875
+ "isUnique": false,
2876
+ "concurrently": false,
2877
+ "method": "btree",
2878
+ "with": {}
2879
+ },
2880
+ "McpConnector_user_name_id_idx": {
2881
+ "name": "McpConnector_user_name_id_idx",
2882
+ "columns": [
2883
+ {
2884
+ "expression": "userId",
2885
+ "isExpression": false,
2886
+ "asc": true,
2887
+ "nulls": "last"
2888
+ },
2889
+ {
2890
+ "expression": "nameId",
2891
+ "isExpression": false,
2892
+ "asc": true,
2893
+ "nulls": "last"
2894
+ }
2895
+ ],
2896
+ "isUnique": false,
2897
+ "concurrently": false,
2898
+ "method": "btree",
2899
+ "with": {}
2900
+ },
2901
+ "McpConnector_user_name_id_unique": {
2902
+ "name": "McpConnector_user_name_id_unique",
2903
+ "columns": [
2904
+ {
2905
+ "expression": "userId",
2906
+ "isExpression": false,
2907
+ "asc": true,
2908
+ "nulls": "last"
2909
+ },
2910
+ {
2911
+ "expression": "nameId",
2912
+ "isExpression": false,
2913
+ "asc": true,
2914
+ "nulls": "last"
2915
+ }
2916
+ ],
2917
+ "isUnique": true,
2918
+ "concurrently": false,
2919
+ "method": "btree",
2920
+ "with": {}
2921
+ }
2922
+ },
2923
+ "foreignKeys": {
2924
+ "McpConnector_userId_user_id_fk": {
2925
+ "name": "McpConnector_userId_user_id_fk",
2926
+ "tableFrom": "McpConnector",
2927
+ "tableTo": "user",
2928
+ "columnsFrom": [
2929
+ "userId"
2930
+ ],
2931
+ "columnsTo": [
2932
+ "id"
2933
+ ],
2934
+ "onDelete": "cascade",
2935
+ "onUpdate": "no action"
2936
+ }
2937
+ },
2938
+ "compositePrimaryKeys": {},
2939
+ "uniqueConstraints": {},
2940
+ "policies": {},
2941
+ "checkConstraints": {},
2942
+ "isRLSEnabled": false
2943
+ },
2944
+ "public.McpOAuthSession": {
2945
+ "name": "McpOAuthSession",
2946
+ "schema": "",
2947
+ "columns": {
2948
+ "clientInfo": {
2949
+ "name": "clientInfo",
2950
+ "type": "text",
2951
+ "primaryKey": false,
2952
+ "notNull": false
2953
+ },
2954
+ "codeVerifier": {
2955
+ "name": "codeVerifier",
2956
+ "type": "text",
2957
+ "primaryKey": false,
2958
+ "notNull": false
2959
+ },
2960
+ "createdAt": {
2961
+ "name": "createdAt",
2962
+ "type": "timestamp",
2963
+ "primaryKey": false,
2964
+ "notNull": true,
2965
+ "default": "now()"
2966
+ },
2967
+ "id": {
2968
+ "name": "id",
2969
+ "type": "uuid",
2970
+ "primaryKey": true,
2971
+ "notNull": true,
2972
+ "default": "gen_random_uuid()"
2973
+ },
2974
+ "mcpConnectorId": {
2975
+ "name": "mcpConnectorId",
2976
+ "type": "uuid",
2977
+ "primaryKey": false,
2978
+ "notNull": true
2979
+ },
2980
+ "serverUrl": {
2981
+ "name": "serverUrl",
2982
+ "type": "text",
2983
+ "primaryKey": false,
2984
+ "notNull": true
2985
+ },
2986
+ "state": {
2987
+ "name": "state",
2988
+ "type": "text",
2989
+ "primaryKey": false,
2990
+ "notNull": false
2991
+ },
2992
+ "tokens": {
2993
+ "name": "tokens",
2994
+ "type": "text",
2995
+ "primaryKey": false,
2996
+ "notNull": false
2997
+ },
2998
+ "updatedAt": {
2999
+ "name": "updatedAt",
3000
+ "type": "timestamp",
3001
+ "primaryKey": false,
3002
+ "notNull": true,
3003
+ "default": "now()"
3004
+ }
3005
+ },
3006
+ "indexes": {
3007
+ "McpOAuthSession_connector_idx": {
3008
+ "name": "McpOAuthSession_connector_idx",
3009
+ "columns": [
3010
+ {
3011
+ "expression": "mcpConnectorId",
3012
+ "isExpression": false,
3013
+ "asc": true,
3014
+ "nulls": "last"
3015
+ }
3016
+ ],
3017
+ "isUnique": false,
3018
+ "concurrently": false,
3019
+ "method": "btree",
3020
+ "with": {}
3021
+ },
3022
+ "McpOAuthSession_state_idx": {
3023
+ "name": "McpOAuthSession_state_idx",
3024
+ "columns": [
3025
+ {
3026
+ "expression": "state",
3027
+ "isExpression": false,
3028
+ "asc": true,
3029
+ "nulls": "last"
3030
+ }
3031
+ ],
3032
+ "isUnique": false,
3033
+ "concurrently": false,
3034
+ "method": "btree",
3035
+ "with": {}
3036
+ }
3037
+ },
3038
+ "foreignKeys": {
3039
+ "McpOAuthSession_mcpConnectorId_McpConnector_id_fk": {
3040
+ "name": "McpOAuthSession_mcpConnectorId_McpConnector_id_fk",
3041
+ "tableFrom": "McpOAuthSession",
3042
+ "tableTo": "McpConnector",
3043
+ "columnsFrom": [
3044
+ "mcpConnectorId"
3045
+ ],
3046
+ "columnsTo": [
3047
+ "id"
3048
+ ],
3049
+ "onDelete": "cascade",
3050
+ "onUpdate": "no action"
3051
+ }
3052
+ },
3053
+ "compositePrimaryKeys": {},
3054
+ "uniqueConstraints": {
3055
+ "McpOAuthSession_state_unique": {
3056
+ "name": "McpOAuthSession_state_unique",
3057
+ "nullsNotDistinct": false,
3058
+ "columns": [
3059
+ "state"
3060
+ ]
3061
+ }
3062
+ },
3063
+ "policies": {},
3064
+ "checkConstraints": {},
3065
+ "isRLSEnabled": false
3066
+ },
3067
+ "public.Project": {
3068
+ "name": "Project",
3069
+ "schema": "",
3070
+ "columns": {
3071
+ "createdAt": {
3072
+ "name": "createdAt",
3073
+ "type": "timestamp",
3074
+ "primaryKey": false,
3075
+ "notNull": true,
3076
+ "default": "now()"
3077
+ },
3078
+ "icon": {
3079
+ "name": "icon",
3080
+ "type": "varchar(64)",
3081
+ "primaryKey": false,
3082
+ "notNull": true,
3083
+ "default": "'folder'"
3084
+ },
3085
+ "iconColor": {
3086
+ "name": "iconColor",
3087
+ "type": "varchar(32)",
3088
+ "primaryKey": false,
3089
+ "notNull": true,
3090
+ "default": "'gray'"
3091
+ },
3092
+ "id": {
3093
+ "name": "id",
3094
+ "type": "uuid",
3095
+ "primaryKey": true,
3096
+ "notNull": true,
3097
+ "default": "gen_random_uuid()"
3098
+ },
3099
+ "instructions": {
3100
+ "name": "instructions",
3101
+ "type": "text",
3102
+ "primaryKey": false,
3103
+ "notNull": true,
3104
+ "default": "''"
3105
+ },
3106
+ "name": {
3107
+ "name": "name",
3108
+ "type": "text",
3109
+ "primaryKey": false,
3110
+ "notNull": true
3111
+ },
3112
+ "updatedAt": {
3113
+ "name": "updatedAt",
3114
+ "type": "timestamp",
3115
+ "primaryKey": false,
3116
+ "notNull": true,
3117
+ "default": "now()"
3118
+ },
3119
+ "userId": {
3120
+ "name": "userId",
3121
+ "type": "text",
3122
+ "primaryKey": false,
3123
+ "notNull": true
3124
+ }
3125
+ },
3126
+ "indexes": {
3127
+ "Project_user_id_idx": {
3128
+ "name": "Project_user_id_idx",
3129
+ "columns": [
3130
+ {
3131
+ "expression": "userId",
3132
+ "isExpression": false,
3133
+ "asc": true,
3134
+ "nulls": "last"
3135
+ }
3136
+ ],
3137
+ "isUnique": false,
3138
+ "concurrently": false,
3139
+ "method": "btree",
3140
+ "with": {}
3141
+ }
3142
+ },
3143
+ "foreignKeys": {
3144
+ "Project_userId_user_id_fk": {
3145
+ "name": "Project_userId_user_id_fk",
3146
+ "tableFrom": "Project",
3147
+ "tableTo": "user",
3148
+ "columnsFrom": [
3149
+ "userId"
3150
+ ],
3151
+ "columnsTo": [
3152
+ "id"
3153
+ ],
3154
+ "onDelete": "cascade",
3155
+ "onUpdate": "no action"
3156
+ }
3157
+ },
3158
+ "compositePrimaryKeys": {},
3159
+ "uniqueConstraints": {
3160
+ "Project_id_user": {
3161
+ "name": "Project_id_user",
3162
+ "nullsNotDistinct": false,
3163
+ "columns": [
3164
+ "id",
3165
+ "userId"
3166
+ ]
3167
+ }
3168
+ },
3169
+ "policies": {},
3170
+ "checkConstraints": {},
3171
+ "isRLSEnabled": false
3172
+ },
3173
+ "public.session": {
3174
+ "name": "session",
3175
+ "schema": "",
3176
+ "columns": {
3177
+ "created_at": {
3178
+ "name": "created_at",
3179
+ "type": "timestamp",
3180
+ "primaryKey": false,
3181
+ "notNull": true,
3182
+ "default": "now()"
3183
+ },
3184
+ "expires_at": {
3185
+ "name": "expires_at",
3186
+ "type": "timestamp",
3187
+ "primaryKey": false,
3188
+ "notNull": true
3189
+ },
3190
+ "id": {
3191
+ "name": "id",
3192
+ "type": "text",
3193
+ "primaryKey": true,
3194
+ "notNull": true
3195
+ },
3196
+ "ip_address": {
3197
+ "name": "ip_address",
3198
+ "type": "text",
3199
+ "primaryKey": false,
3200
+ "notNull": false
3201
+ },
3202
+ "token": {
3203
+ "name": "token",
3204
+ "type": "text",
3205
+ "primaryKey": false,
3206
+ "notNull": true
3207
+ },
3208
+ "updated_at": {
3209
+ "name": "updated_at",
3210
+ "type": "timestamp",
3211
+ "primaryKey": false,
3212
+ "notNull": true
3213
+ },
3214
+ "user_agent": {
3215
+ "name": "user_agent",
3216
+ "type": "text",
3217
+ "primaryKey": false,
3218
+ "notNull": false
3219
+ },
3220
+ "user_id": {
3221
+ "name": "user_id",
3222
+ "type": "text",
3223
+ "primaryKey": false,
3224
+ "notNull": true
3225
+ }
3226
+ },
3227
+ "indexes": {},
3228
+ "foreignKeys": {
3229
+ "session_user_id_user_id_fk": {
3230
+ "name": "session_user_id_user_id_fk",
3231
+ "tableFrom": "session",
3232
+ "tableTo": "user",
3233
+ "columnsFrom": [
3234
+ "user_id"
3235
+ ],
3236
+ "columnsTo": [
3237
+ "id"
3238
+ ],
3239
+ "onDelete": "cascade",
3240
+ "onUpdate": "no action"
3241
+ }
3242
+ },
3243
+ "compositePrimaryKeys": {},
3244
+ "uniqueConstraints": {
3245
+ "session_token_unique": {
3246
+ "name": "session_token_unique",
3247
+ "nullsNotDistinct": false,
3248
+ "columns": [
3249
+ "token"
3250
+ ]
3251
+ }
3252
+ },
3253
+ "policies": {},
3254
+ "checkConstraints": {},
3255
+ "isRLSEnabled": false
3256
+ },
3257
+ "public.user": {
3258
+ "name": "user",
3259
+ "schema": "",
3260
+ "columns": {
3261
+ "created_at": {
3262
+ "name": "created_at",
3263
+ "type": "timestamp",
3264
+ "primaryKey": false,
3265
+ "notNull": true,
3266
+ "default": "now()"
3267
+ },
3268
+ "email": {
3269
+ "name": "email",
3270
+ "type": "text",
3271
+ "primaryKey": false,
3272
+ "notNull": true
3273
+ },
3274
+ "email_verified": {
3275
+ "name": "email_verified",
3276
+ "type": "boolean",
3277
+ "primaryKey": false,
3278
+ "notNull": true,
3279
+ "default": false
3280
+ },
3281
+ "eve_usage_reconciled_at": {
3282
+ "name": "eve_usage_reconciled_at",
3283
+ "type": "timestamp",
3284
+ "primaryKey": false,
3285
+ "notNull": false
3286
+ },
3287
+ "id": {
3288
+ "name": "id",
3289
+ "type": "text",
3290
+ "primaryKey": true,
3291
+ "notNull": true
3292
+ },
3293
+ "image": {
3294
+ "name": "image",
3295
+ "type": "text",
3296
+ "primaryKey": false,
3297
+ "notNull": false
3298
+ },
3299
+ "name": {
3300
+ "name": "name",
3301
+ "type": "text",
3302
+ "primaryKey": false,
3303
+ "notNull": true
3304
+ },
3305
+ "updated_at": {
3306
+ "name": "updated_at",
3307
+ "type": "timestamp",
3308
+ "primaryKey": false,
3309
+ "notNull": true,
3310
+ "default": "now()"
3311
+ }
3312
+ },
3313
+ "indexes": {},
3314
+ "foreignKeys": {},
3315
+ "compositePrimaryKeys": {},
3316
+ "uniqueConstraints": {
3317
+ "user_email_unique": {
3318
+ "name": "user_email_unique",
3319
+ "nullsNotDistinct": false,
3320
+ "columns": [
3321
+ "email"
3322
+ ]
3323
+ }
3324
+ },
3325
+ "policies": {},
3326
+ "checkConstraints": {},
3327
+ "isRLSEnabled": false
3328
+ },
3329
+ "public.UserCredit": {
3330
+ "name": "UserCredit",
3331
+ "schema": "",
3332
+ "columns": {
3333
+ "credits": {
3334
+ "name": "credits",
3335
+ "type": "integer",
3336
+ "primaryKey": false,
3337
+ "notNull": true,
3338
+ "default": 50
3339
+ },
3340
+ "userId": {
3341
+ "name": "userId",
3342
+ "type": "text",
3343
+ "primaryKey": true,
3344
+ "notNull": true
3345
+ }
3346
+ },
3347
+ "indexes": {},
3348
+ "foreignKeys": {
3349
+ "UserCredit_userId_user_id_fk": {
3350
+ "name": "UserCredit_userId_user_id_fk",
3351
+ "tableFrom": "UserCredit",
3352
+ "tableTo": "user",
3353
+ "columnsFrom": [
3354
+ "userId"
3355
+ ],
3356
+ "columnsTo": [
3357
+ "id"
3358
+ ],
3359
+ "onDelete": "cascade",
3360
+ "onUpdate": "no action"
3361
+ }
3362
+ },
3363
+ "compositePrimaryKeys": {},
3364
+ "uniqueConstraints": {},
3365
+ "policies": {},
3366
+ "checkConstraints": {},
3367
+ "isRLSEnabled": false
3368
+ },
3369
+ "public.UserModelPreference": {
3370
+ "name": "UserModelPreference",
3371
+ "schema": "",
3372
+ "columns": {
3373
+ "createdAt": {
3374
+ "name": "createdAt",
3375
+ "type": "timestamp",
3376
+ "primaryKey": false,
3377
+ "notNull": true,
3378
+ "default": "now()"
3379
+ },
3380
+ "enabled": {
3381
+ "name": "enabled",
3382
+ "type": "boolean",
3383
+ "primaryKey": false,
3384
+ "notNull": true
3385
+ },
3386
+ "modelId": {
3387
+ "name": "modelId",
3388
+ "type": "varchar(256)",
3389
+ "primaryKey": false,
3390
+ "notNull": true
3391
+ },
3392
+ "updatedAt": {
3393
+ "name": "updatedAt",
3394
+ "type": "timestamp",
3395
+ "primaryKey": false,
3396
+ "notNull": true,
3397
+ "default": "now()"
3398
+ },
3399
+ "userId": {
3400
+ "name": "userId",
3401
+ "type": "text",
3402
+ "primaryKey": false,
3403
+ "notNull": true
3404
+ }
3405
+ },
3406
+ "indexes": {
3407
+ "UserModelPreference_user_id_idx": {
3408
+ "name": "UserModelPreference_user_id_idx",
3409
+ "columns": [
3410
+ {
3411
+ "expression": "userId",
3412
+ "isExpression": false,
3413
+ "asc": true,
3414
+ "nulls": "last"
3415
+ }
3416
+ ],
3417
+ "isUnique": false,
3418
+ "concurrently": false,
3419
+ "method": "btree",
3420
+ "with": {}
3421
+ }
3422
+ },
3423
+ "foreignKeys": {
3424
+ "UserModelPreference_userId_user_id_fk": {
3425
+ "name": "UserModelPreference_userId_user_id_fk",
3426
+ "tableFrom": "UserModelPreference",
3427
+ "tableTo": "user",
3428
+ "columnsFrom": [
3429
+ "userId"
3430
+ ],
3431
+ "columnsTo": [
3432
+ "id"
3433
+ ],
3434
+ "onDelete": "cascade",
3435
+ "onUpdate": "no action"
3436
+ }
3437
+ },
3438
+ "compositePrimaryKeys": {
3439
+ "UserModelPreference_userId_modelId_pk": {
3440
+ "name": "UserModelPreference_userId_modelId_pk",
3441
+ "columns": [
3442
+ "userId",
3443
+ "modelId"
3444
+ ]
3445
+ }
3446
+ },
3447
+ "uniqueConstraints": {},
3448
+ "policies": {},
3449
+ "checkConstraints": {},
3450
+ "isRLSEnabled": false
3451
+ },
3452
+ "public.verification": {
3453
+ "name": "verification",
3454
+ "schema": "",
3455
+ "columns": {
3456
+ "created_at": {
3457
+ "name": "created_at",
3458
+ "type": "timestamp",
3459
+ "primaryKey": false,
3460
+ "notNull": true,
3461
+ "default": "now()"
3462
+ },
3463
+ "expires_at": {
3464
+ "name": "expires_at",
3465
+ "type": "timestamp",
3466
+ "primaryKey": false,
3467
+ "notNull": true
3468
+ },
3469
+ "id": {
3470
+ "name": "id",
3471
+ "type": "text",
3472
+ "primaryKey": true,
3473
+ "notNull": true
3474
+ },
3475
+ "identifier": {
3476
+ "name": "identifier",
3477
+ "type": "text",
3478
+ "primaryKey": false,
3479
+ "notNull": true
3480
+ },
3481
+ "updated_at": {
3482
+ "name": "updated_at",
3483
+ "type": "timestamp",
3484
+ "primaryKey": false,
3485
+ "notNull": true,
3486
+ "default": "now()"
3487
+ },
3488
+ "value": {
3489
+ "name": "value",
3490
+ "type": "text",
3491
+ "primaryKey": false,
3492
+ "notNull": true
3493
+ }
3494
+ },
3495
+ "indexes": {},
3496
+ "foreignKeys": {},
3497
+ "compositePrimaryKeys": {},
3498
+ "uniqueConstraints": {},
3499
+ "policies": {},
3500
+ "checkConstraints": {},
3501
+ "isRLSEnabled": false
3502
+ }
3503
+ },
3504
+ "enums": {},
3505
+ "schemas": {},
3506
+ "sequences": {},
3507
+ "roles": {},
3508
+ "policies": {},
3509
+ "views": {},
3510
+ "_meta": {
3511
+ "columns": {},
3512
+ "schemas": {},
3513
+ "tables": {}
3514
+ }
3515
+ }