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,3311 @@
1
+ {
2
+ "id": "608e6038-558f-45f2-97ab-be921e124e46",
3
+ "prevId": "caa76187-cf9f-4ab3-95bf-186816ceefdd",
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
+ "operationId": {
510
+ "name": "operationId",
511
+ "type": "uuid",
512
+ "primaryKey": false,
513
+ "notNull": true
514
+ },
515
+ "ownerId": {
516
+ "name": "ownerId",
517
+ "type": "text",
518
+ "primaryKey": false,
519
+ "notNull": true
520
+ },
521
+ "parentConversationId": {
522
+ "name": "parentConversationId",
523
+ "type": "uuid",
524
+ "primaryKey": false,
525
+ "notNull": false
526
+ },
527
+ "rootConversationId": {
528
+ "name": "rootConversationId",
529
+ "type": "uuid",
530
+ "primaryKey": false,
531
+ "notNull": false
532
+ },
533
+ "sessionId": {
534
+ "name": "sessionId",
535
+ "type": "text",
536
+ "primaryKey": false,
537
+ "notNull": false
538
+ },
539
+ "state": {
540
+ "name": "state",
541
+ "type": "text",
542
+ "primaryKey": false,
543
+ "notNull": true,
544
+ "default": "'creating'"
545
+ },
546
+ "usageStreamIndex": {
547
+ "name": "usageStreamIndex",
548
+ "type": "integer",
549
+ "primaryKey": false,
550
+ "notNull": true,
551
+ "default": 0
552
+ },
553
+ "visibility": {
554
+ "name": "visibility",
555
+ "type": "varchar",
556
+ "primaryKey": false,
557
+ "notNull": true,
558
+ "default": "'private'"
559
+ }
560
+ },
561
+ "indexes": {
562
+ "EveConversation_owner_chat": {
563
+ "name": "EveConversation_owner_chat",
564
+ "columns": [
565
+ {
566
+ "expression": "ownerId",
567
+ "isExpression": false,
568
+ "asc": true,
569
+ "nulls": "last"
570
+ },
571
+ {
572
+ "expression": "chatId",
573
+ "isExpression": false,
574
+ "asc": true,
575
+ "nulls": "last"
576
+ }
577
+ ],
578
+ "isUnique": false,
579
+ "concurrently": false,
580
+ "method": "btree",
581
+ "with": {}
582
+ },
583
+ "EveConversation_owner_root": {
584
+ "name": "EveConversation_owner_root",
585
+ "columns": [
586
+ {
587
+ "expression": "ownerId",
588
+ "isExpression": false,
589
+ "asc": true,
590
+ "nulls": "last"
591
+ },
592
+ {
593
+ "expression": "rootConversationId",
594
+ "isExpression": false,
595
+ "asc": true,
596
+ "nulls": "last"
597
+ }
598
+ ],
599
+ "isUnique": false,
600
+ "concurrently": false,
601
+ "method": "btree",
602
+ "with": {}
603
+ },
604
+ "EveConversation_owner_operation": {
605
+ "name": "EveConversation_owner_operation",
606
+ "columns": [
607
+ {
608
+ "expression": "ownerId",
609
+ "isExpression": false,
610
+ "asc": true,
611
+ "nulls": "last"
612
+ },
613
+ {
614
+ "expression": "operationId",
615
+ "isExpression": false,
616
+ "asc": true,
617
+ "nulls": "last"
618
+ }
619
+ ],
620
+ "isUnique": true,
621
+ "concurrently": false,
622
+ "method": "btree",
623
+ "with": {}
624
+ }
625
+ },
626
+ "foreignKeys": {
627
+ "EveConversation_ownerId_user_id_fk": {
628
+ "name": "EveConversation_ownerId_user_id_fk",
629
+ "tableFrom": "EveConversation",
630
+ "tableTo": "user",
631
+ "columnsFrom": [
632
+ "ownerId"
633
+ ],
634
+ "columnsTo": [
635
+ "id"
636
+ ],
637
+ "onDelete": "no action",
638
+ "onUpdate": "no action"
639
+ },
640
+ "EveConversation_chat_owner_fk": {
641
+ "name": "EveConversation_chat_owner_fk",
642
+ "tableFrom": "EveConversation",
643
+ "tableTo": "EveChat",
644
+ "columnsFrom": [
645
+ "chatId",
646
+ "ownerId"
647
+ ],
648
+ "columnsTo": [
649
+ "id",
650
+ "ownerId"
651
+ ],
652
+ "onDelete": "no action",
653
+ "onUpdate": "no action"
654
+ },
655
+ "EveConversation_parent_owner_fk": {
656
+ "name": "EveConversation_parent_owner_fk",
657
+ "tableFrom": "EveConversation",
658
+ "tableTo": "EveConversation",
659
+ "columnsFrom": [
660
+ "parentConversationId",
661
+ "ownerId",
662
+ "chatId"
663
+ ],
664
+ "columnsTo": [
665
+ "id",
666
+ "ownerId",
667
+ "chatId"
668
+ ],
669
+ "onDelete": "no action",
670
+ "onUpdate": "no action"
671
+ },
672
+ "EveConversation_root_owner_fk": {
673
+ "name": "EveConversation_root_owner_fk",
674
+ "tableFrom": "EveConversation",
675
+ "tableTo": "EveConversation",
676
+ "columnsFrom": [
677
+ "rootConversationId",
678
+ "ownerId",
679
+ "chatId"
680
+ ],
681
+ "columnsTo": [
682
+ "id",
683
+ "ownerId",
684
+ "chatId"
685
+ ],
686
+ "onDelete": "no action",
687
+ "onUpdate": "no action"
688
+ }
689
+ },
690
+ "compositePrimaryKeys": {},
691
+ "uniqueConstraints": {
692
+ "EveConversation_sessionId_unique": {
693
+ "name": "EveConversation_sessionId_unique",
694
+ "nullsNotDistinct": false,
695
+ "columns": [
696
+ "sessionId"
697
+ ]
698
+ },
699
+ "EveConversation_id_owner": {
700
+ "name": "EveConversation_id_owner",
701
+ "nullsNotDistinct": false,
702
+ "columns": [
703
+ "id",
704
+ "ownerId"
705
+ ]
706
+ },
707
+ "EveConversation_id_owner_chat": {
708
+ "name": "EveConversation_id_owner_chat",
709
+ "nullsNotDistinct": false,
710
+ "columns": [
711
+ "id",
712
+ "ownerId",
713
+ "chatId"
714
+ ]
715
+ }
716
+ },
717
+ "policies": {},
718
+ "checkConstraints": {
719
+ "EveConversation_creation_kind": {
720
+ "name": "EveConversation_creation_kind",
721
+ "value": "\"EveConversation\".\"creationKind\" in ('message', 'copy')"
722
+ },
723
+ "EveConversation_copy_root": {
724
+ "name": "EveConversation_copy_root",
725
+ "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 )"
726
+ },
727
+ "EveConversation_named_fork_shape": {
728
+ "name": "EveConversation_named_fork_shape",
729
+ "value": "\"EveConversation\".\"forkCheckpointId\" is null or (\n \"EveConversation\".\"parentConversationId\" is not null and \"EveConversation\".\"forkMessageId\" is null\n )"
730
+ },
731
+ "EveConversation_fork_shape": {
732
+ "name": "EveConversation_fork_shape",
733
+ "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 )"
734
+ },
735
+ "EveConversation_fork_kind": {
736
+ "name": "EveConversation_fork_kind",
737
+ "value": "\"EveConversation\".\"forkKind\" is null or \"EveConversation\".\"forkKind\" in ('edit', 'regenerate', 'comparison')"
738
+ }
739
+ },
740
+ "isRLSEnabled": false
741
+ },
742
+ "public.EveConversationCopy": {
743
+ "name": "EveConversationCopy",
744
+ "schema": "",
745
+ "columns": {
746
+ "acceptedAt": {
747
+ "name": "acceptedAt",
748
+ "type": "timestamp",
749
+ "primaryKey": false,
750
+ "notNull": false
751
+ },
752
+ "conversationId": {
753
+ "name": "conversationId",
754
+ "type": "uuid",
755
+ "primaryKey": true,
756
+ "notNull": true
757
+ },
758
+ "documentsReady": {
759
+ "name": "documentsReady",
760
+ "type": "boolean",
761
+ "primaryKey": false,
762
+ "notNull": true,
763
+ "default": false
764
+ },
765
+ "ownerId": {
766
+ "name": "ownerId",
767
+ "type": "text",
768
+ "primaryKey": false,
769
+ "notNull": true
770
+ },
771
+ "phase": {
772
+ "name": "phase",
773
+ "type": "text",
774
+ "primaryKey": false,
775
+ "notNull": true,
776
+ "default": "'preparing'"
777
+ },
778
+ "plan": {
779
+ "name": "plan",
780
+ "type": "jsonb",
781
+ "primaryKey": false,
782
+ "notNull": false
783
+ },
784
+ "planHash": {
785
+ "name": "planHash",
786
+ "type": "text",
787
+ "primaryKey": false,
788
+ "notNull": true
789
+ },
790
+ "projectionHash": {
791
+ "name": "projectionHash",
792
+ "type": "text",
793
+ "primaryKey": false,
794
+ "notNull": true
795
+ },
796
+ "seed": {
797
+ "name": "seed",
798
+ "type": "jsonb",
799
+ "primaryKey": false,
800
+ "notNull": false
801
+ },
802
+ "sourceConversationId": {
803
+ "name": "sourceConversationId",
804
+ "type": "uuid",
805
+ "primaryKey": false,
806
+ "notNull": true
807
+ },
808
+ "sourceOwnerId": {
809
+ "name": "sourceOwnerId",
810
+ "type": "text",
811
+ "primaryKey": false,
812
+ "notNull": true
813
+ },
814
+ "sourceSessionId": {
815
+ "name": "sourceSessionId",
816
+ "type": "text",
817
+ "primaryKey": false,
818
+ "notNull": true
819
+ }
820
+ },
821
+ "indexes": {},
822
+ "foreignKeys": {
823
+ "EveConversationCopy_owner_fk": {
824
+ "name": "EveConversationCopy_owner_fk",
825
+ "tableFrom": "EveConversationCopy",
826
+ "tableTo": "EveConversation",
827
+ "columnsFrom": [
828
+ "conversationId",
829
+ "ownerId"
830
+ ],
831
+ "columnsTo": [
832
+ "id",
833
+ "ownerId"
834
+ ],
835
+ "onDelete": "no action",
836
+ "onUpdate": "no action"
837
+ }
838
+ },
839
+ "compositePrimaryKeys": {},
840
+ "uniqueConstraints": {
841
+ "EveConversationCopy_owner_identity": {
842
+ "name": "EveConversationCopy_owner_identity",
843
+ "nullsNotDistinct": false,
844
+ "columns": [
845
+ "conversationId",
846
+ "ownerId"
847
+ ]
848
+ }
849
+ },
850
+ "policies": {},
851
+ "checkConstraints": {
852
+ "EveConversationCopy_phase_payload": {
853
+ "name": "EveConversationCopy_phase_payload",
854
+ "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 )"
855
+ }
856
+ },
857
+ "isRLSEnabled": false
858
+ },
859
+ "public.EveConversationCopyFile": {
860
+ "name": "EveConversationCopyFile",
861
+ "schema": "",
862
+ "columns": {
863
+ "conversationId": {
864
+ "name": "conversationId",
865
+ "type": "uuid",
866
+ "primaryKey": false,
867
+ "notNull": true
868
+ },
869
+ "key": {
870
+ "name": "key",
871
+ "type": "text",
872
+ "primaryKey": false,
873
+ "notNull": true
874
+ },
875
+ "mediaType": {
876
+ "name": "mediaType",
877
+ "type": "text",
878
+ "primaryKey": false,
879
+ "notNull": true
880
+ },
881
+ "ownerId": {
882
+ "name": "ownerId",
883
+ "type": "text",
884
+ "primaryKey": false,
885
+ "notNull": true
886
+ },
887
+ "sha256": {
888
+ "name": "sha256",
889
+ "type": "text",
890
+ "primaryKey": false,
891
+ "notNull": true
892
+ },
893
+ "size": {
894
+ "name": "size",
895
+ "type": "integer",
896
+ "primaryKey": false,
897
+ "notNull": true
898
+ },
899
+ "writtenAt": {
900
+ "name": "writtenAt",
901
+ "type": "timestamp",
902
+ "primaryKey": false,
903
+ "notNull": false
904
+ }
905
+ },
906
+ "indexes": {},
907
+ "foreignKeys": {
908
+ "EveConversationCopyFile_copy_owner_fk": {
909
+ "name": "EveConversationCopyFile_copy_owner_fk",
910
+ "tableFrom": "EveConversationCopyFile",
911
+ "tableTo": "EveConversationCopy",
912
+ "columnsFrom": [
913
+ "conversationId",
914
+ "ownerId"
915
+ ],
916
+ "columnsTo": [
917
+ "conversationId",
918
+ "ownerId"
919
+ ],
920
+ "onDelete": "no action",
921
+ "onUpdate": "no action"
922
+ }
923
+ },
924
+ "compositePrimaryKeys": {
925
+ "EveConversationCopyFile_conversationId_key_pk": {
926
+ "name": "EveConversationCopyFile_conversationId_key_pk",
927
+ "columns": [
928
+ "conversationId",
929
+ "key"
930
+ ]
931
+ }
932
+ },
933
+ "uniqueConstraints": {},
934
+ "policies": {},
935
+ "checkConstraints": {
936
+ "EveConversationCopyFile_size": {
937
+ "name": "EveConversationCopyFile_size",
938
+ "value": "\"EveConversationCopyFile\".\"size\" > 0"
939
+ },
940
+ "EveConversationCopyFile_hash": {
941
+ "name": "EveConversationCopyFile_hash",
942
+ "value": "\"EveConversationCopyFile\".\"sha256\" ~ '^[a-f0-9]{64}$'"
943
+ }
944
+ },
945
+ "isRLSEnabled": false
946
+ },
947
+ "public.EveDocumentCheckpoint": {
948
+ "name": "EveDocumentCheckpoint",
949
+ "schema": "",
950
+ "columns": {
951
+ "conversationId": {
952
+ "name": "conversationId",
953
+ "type": "uuid",
954
+ "primaryKey": false,
955
+ "notNull": true
956
+ },
957
+ "ownerId": {
958
+ "name": "ownerId",
959
+ "type": "text",
960
+ "primaryKey": false,
961
+ "notNull": true
962
+ },
963
+ "turnIndex": {
964
+ "name": "turnIndex",
965
+ "type": "integer",
966
+ "primaryKey": false,
967
+ "notNull": true
968
+ }
969
+ },
970
+ "indexes": {},
971
+ "foreignKeys": {
972
+ "EveDocumentCheckpoint_conversation_owner_fk": {
973
+ "name": "EveDocumentCheckpoint_conversation_owner_fk",
974
+ "tableFrom": "EveDocumentCheckpoint",
975
+ "tableTo": "EveConversation",
976
+ "columnsFrom": [
977
+ "conversationId",
978
+ "ownerId"
979
+ ],
980
+ "columnsTo": [
981
+ "id",
982
+ "ownerId"
983
+ ],
984
+ "onDelete": "no action",
985
+ "onUpdate": "no action"
986
+ }
987
+ },
988
+ "compositePrimaryKeys": {
989
+ "EveDocumentCheckpoint_conversationId_turnIndex_pk": {
990
+ "name": "EveDocumentCheckpoint_conversationId_turnIndex_pk",
991
+ "columns": [
992
+ "conversationId",
993
+ "turnIndex"
994
+ ]
995
+ }
996
+ },
997
+ "uniqueConstraints": {
998
+ "EveDocumentCheckpoint_owner_identity": {
999
+ "name": "EveDocumentCheckpoint_owner_identity",
1000
+ "nullsNotDistinct": false,
1001
+ "columns": [
1002
+ "conversationId",
1003
+ "turnIndex",
1004
+ "ownerId"
1005
+ ]
1006
+ }
1007
+ },
1008
+ "policies": {},
1009
+ "checkConstraints": {
1010
+ "EveDocumentCheckpoint_turn_nonnegative": {
1011
+ "name": "EveDocumentCheckpoint_turn_nonnegative",
1012
+ "value": "\"EveDocumentCheckpoint\".\"turnIndex\" >= 0"
1013
+ }
1014
+ },
1015
+ "isRLSEnabled": false
1016
+ },
1017
+ "public.EveDocumentCheckpointEntry": {
1018
+ "name": "EveDocumentCheckpointEntry",
1019
+ "schema": "",
1020
+ "columns": {
1021
+ "conversationId": {
1022
+ "name": "conversationId",
1023
+ "type": "uuid",
1024
+ "primaryKey": false,
1025
+ "notNull": true
1026
+ },
1027
+ "documentId": {
1028
+ "name": "documentId",
1029
+ "type": "uuid",
1030
+ "primaryKey": false,
1031
+ "notNull": true
1032
+ },
1033
+ "ownerId": {
1034
+ "name": "ownerId",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": true
1038
+ },
1039
+ "revisionId": {
1040
+ "name": "revisionId",
1041
+ "type": "uuid",
1042
+ "primaryKey": false,
1043
+ "notNull": true
1044
+ },
1045
+ "turnIndex": {
1046
+ "name": "turnIndex",
1047
+ "type": "integer",
1048
+ "primaryKey": false,
1049
+ "notNull": true
1050
+ }
1051
+ },
1052
+ "indexes": {},
1053
+ "foreignKeys": {
1054
+ "EveDocumentCheckpointEntry_checkpoint_owner_fk": {
1055
+ "name": "EveDocumentCheckpointEntry_checkpoint_owner_fk",
1056
+ "tableFrom": "EveDocumentCheckpointEntry",
1057
+ "tableTo": "EveDocumentCheckpoint",
1058
+ "columnsFrom": [
1059
+ "conversationId",
1060
+ "turnIndex",
1061
+ "ownerId"
1062
+ ],
1063
+ "columnsTo": [
1064
+ "conversationId",
1065
+ "turnIndex",
1066
+ "ownerId"
1067
+ ],
1068
+ "onDelete": "no action",
1069
+ "onUpdate": "no action"
1070
+ },
1071
+ "EveDocumentCheckpointEntry_revision_owner_fk": {
1072
+ "name": "EveDocumentCheckpointEntry_revision_owner_fk",
1073
+ "tableFrom": "EveDocumentCheckpointEntry",
1074
+ "tableTo": "EveDocumentRevision",
1075
+ "columnsFrom": [
1076
+ "revisionId",
1077
+ "documentId",
1078
+ "ownerId"
1079
+ ],
1080
+ "columnsTo": [
1081
+ "id",
1082
+ "documentId",
1083
+ "ownerId"
1084
+ ],
1085
+ "onDelete": "no action",
1086
+ "onUpdate": "no action"
1087
+ }
1088
+ },
1089
+ "compositePrimaryKeys": {
1090
+ "EveDocumentCheckpointEntry_conversationId_turnIndex_documentId_pk": {
1091
+ "name": "EveDocumentCheckpointEntry_conversationId_turnIndex_documentId_pk",
1092
+ "columns": [
1093
+ "conversationId",
1094
+ "turnIndex",
1095
+ "documentId"
1096
+ ]
1097
+ }
1098
+ },
1099
+ "uniqueConstraints": {},
1100
+ "policies": {},
1101
+ "checkConstraints": {},
1102
+ "isRLSEnabled": false
1103
+ },
1104
+ "public.EveDocumentHead": {
1105
+ "name": "EveDocumentHead",
1106
+ "schema": "",
1107
+ "columns": {
1108
+ "conversationId": {
1109
+ "name": "conversationId",
1110
+ "type": "uuid",
1111
+ "primaryKey": false,
1112
+ "notNull": true
1113
+ },
1114
+ "documentId": {
1115
+ "name": "documentId",
1116
+ "type": "uuid",
1117
+ "primaryKey": false,
1118
+ "notNull": true
1119
+ },
1120
+ "ownerId": {
1121
+ "name": "ownerId",
1122
+ "type": "text",
1123
+ "primaryKey": false,
1124
+ "notNull": true
1125
+ },
1126
+ "revisionId": {
1127
+ "name": "revisionId",
1128
+ "type": "uuid",
1129
+ "primaryKey": false,
1130
+ "notNull": true
1131
+ }
1132
+ },
1133
+ "indexes": {},
1134
+ "foreignKeys": {
1135
+ "EveDocumentHead_conversation_owner_fk": {
1136
+ "name": "EveDocumentHead_conversation_owner_fk",
1137
+ "tableFrom": "EveDocumentHead",
1138
+ "tableTo": "EveConversation",
1139
+ "columnsFrom": [
1140
+ "conversationId",
1141
+ "ownerId"
1142
+ ],
1143
+ "columnsTo": [
1144
+ "id",
1145
+ "ownerId"
1146
+ ],
1147
+ "onDelete": "no action",
1148
+ "onUpdate": "no action"
1149
+ },
1150
+ "EveDocumentHead_revision_document_owner_fk": {
1151
+ "name": "EveDocumentHead_revision_document_owner_fk",
1152
+ "tableFrom": "EveDocumentHead",
1153
+ "tableTo": "EveDocumentRevision",
1154
+ "columnsFrom": [
1155
+ "revisionId",
1156
+ "documentId",
1157
+ "ownerId"
1158
+ ],
1159
+ "columnsTo": [
1160
+ "id",
1161
+ "documentId",
1162
+ "ownerId"
1163
+ ],
1164
+ "onDelete": "no action",
1165
+ "onUpdate": "no action"
1166
+ }
1167
+ },
1168
+ "compositePrimaryKeys": {
1169
+ "EveDocumentHead_conversationId_documentId_pk": {
1170
+ "name": "EveDocumentHead_conversationId_documentId_pk",
1171
+ "columns": [
1172
+ "conversationId",
1173
+ "documentId"
1174
+ ]
1175
+ }
1176
+ },
1177
+ "uniqueConstraints": {},
1178
+ "policies": {},
1179
+ "checkConstraints": {},
1180
+ "isRLSEnabled": false
1181
+ },
1182
+ "public.EveDocumentRevision": {
1183
+ "name": "EveDocumentRevision",
1184
+ "schema": "",
1185
+ "columns": {
1186
+ "content": {
1187
+ "name": "content",
1188
+ "type": "text",
1189
+ "primaryKey": false,
1190
+ "notNull": true
1191
+ },
1192
+ "conversationId": {
1193
+ "name": "conversationId",
1194
+ "type": "uuid",
1195
+ "primaryKey": false,
1196
+ "notNull": true
1197
+ },
1198
+ "createdAt": {
1199
+ "name": "createdAt",
1200
+ "type": "timestamp",
1201
+ "primaryKey": false,
1202
+ "notNull": true,
1203
+ "default": "now()"
1204
+ },
1205
+ "documentId": {
1206
+ "name": "documentId",
1207
+ "type": "uuid",
1208
+ "primaryKey": false,
1209
+ "notNull": true
1210
+ },
1211
+ "fileIds": {
1212
+ "name": "fileIds",
1213
+ "type": "jsonb",
1214
+ "primaryKey": false,
1215
+ "notNull": true,
1216
+ "default": "'[]'::jsonb"
1217
+ },
1218
+ "id": {
1219
+ "name": "id",
1220
+ "type": "uuid",
1221
+ "primaryKey": true,
1222
+ "notNull": true,
1223
+ "default": "gen_random_uuid()"
1224
+ },
1225
+ "kind": {
1226
+ "name": "kind",
1227
+ "type": "varchar",
1228
+ "primaryKey": false,
1229
+ "notNull": true
1230
+ },
1231
+ "operationId": {
1232
+ "name": "operationId",
1233
+ "type": "text",
1234
+ "primaryKey": false,
1235
+ "notNull": true
1236
+ },
1237
+ "ownerId": {
1238
+ "name": "ownerId",
1239
+ "type": "text",
1240
+ "primaryKey": false,
1241
+ "notNull": true
1242
+ },
1243
+ "parentRevisionId": {
1244
+ "name": "parentRevisionId",
1245
+ "type": "uuid",
1246
+ "primaryKey": false,
1247
+ "notNull": false
1248
+ },
1249
+ "title": {
1250
+ "name": "title",
1251
+ "type": "text",
1252
+ "primaryKey": false,
1253
+ "notNull": true
1254
+ },
1255
+ "turnIndex": {
1256
+ "name": "turnIndex",
1257
+ "type": "integer",
1258
+ "primaryKey": false,
1259
+ "notNull": false
1260
+ }
1261
+ },
1262
+ "indexes": {
1263
+ "EveDocumentRevision_operation": {
1264
+ "name": "EveDocumentRevision_operation",
1265
+ "columns": [
1266
+ {
1267
+ "expression": "conversationId",
1268
+ "isExpression": false,
1269
+ "asc": true,
1270
+ "nulls": "last"
1271
+ },
1272
+ {
1273
+ "expression": "operationId",
1274
+ "isExpression": false,
1275
+ "asc": true,
1276
+ "nulls": "last"
1277
+ }
1278
+ ],
1279
+ "isUnique": true,
1280
+ "concurrently": false,
1281
+ "method": "btree",
1282
+ "with": {}
1283
+ }
1284
+ },
1285
+ "foreignKeys": {
1286
+ "EveDocumentRevision_conversation_owner_fk": {
1287
+ "name": "EveDocumentRevision_conversation_owner_fk",
1288
+ "tableFrom": "EveDocumentRevision",
1289
+ "tableTo": "EveConversation",
1290
+ "columnsFrom": [
1291
+ "conversationId",
1292
+ "ownerId"
1293
+ ],
1294
+ "columnsTo": [
1295
+ "id",
1296
+ "ownerId"
1297
+ ],
1298
+ "onDelete": "no action",
1299
+ "onUpdate": "no action"
1300
+ },
1301
+ "EveDocumentRevision_parent_document_owner_fk": {
1302
+ "name": "EveDocumentRevision_parent_document_owner_fk",
1303
+ "tableFrom": "EveDocumentRevision",
1304
+ "tableTo": "EveDocumentRevision",
1305
+ "columnsFrom": [
1306
+ "parentRevisionId",
1307
+ "documentId",
1308
+ "ownerId"
1309
+ ],
1310
+ "columnsTo": [
1311
+ "id",
1312
+ "documentId",
1313
+ "ownerId"
1314
+ ],
1315
+ "onDelete": "no action",
1316
+ "onUpdate": "no action"
1317
+ }
1318
+ },
1319
+ "compositePrimaryKeys": {},
1320
+ "uniqueConstraints": {
1321
+ "EveDocumentRevision_identity": {
1322
+ "name": "EveDocumentRevision_identity",
1323
+ "nullsNotDistinct": false,
1324
+ "columns": [
1325
+ "id",
1326
+ "documentId",
1327
+ "ownerId"
1328
+ ]
1329
+ }
1330
+ },
1331
+ "policies": {},
1332
+ "checkConstraints": {
1333
+ "EveDocumentRevision_turn_nonnegative": {
1334
+ "name": "EveDocumentRevision_turn_nonnegative",
1335
+ "value": "\"EveDocumentRevision\".\"turnIndex\" >= 0"
1336
+ }
1337
+ },
1338
+ "isRLSEnabled": false
1339
+ },
1340
+ "public.EveFileReference": {
1341
+ "name": "EveFileReference",
1342
+ "schema": "",
1343
+ "columns": {
1344
+ "conversationId": {
1345
+ "name": "conversationId",
1346
+ "type": "uuid",
1347
+ "primaryKey": false,
1348
+ "notNull": true
1349
+ },
1350
+ "key": {
1351
+ "name": "key",
1352
+ "type": "text",
1353
+ "primaryKey": false,
1354
+ "notNull": true
1355
+ },
1356
+ "ownerId": {
1357
+ "name": "ownerId",
1358
+ "type": "text",
1359
+ "primaryKey": false,
1360
+ "notNull": true
1361
+ }
1362
+ },
1363
+ "indexes": {
1364
+ "EveFileReference_key": {
1365
+ "name": "EveFileReference_key",
1366
+ "columns": [
1367
+ {
1368
+ "expression": "key",
1369
+ "isExpression": false,
1370
+ "asc": true,
1371
+ "nulls": "last"
1372
+ }
1373
+ ],
1374
+ "isUnique": false,
1375
+ "concurrently": false,
1376
+ "method": "btree",
1377
+ "with": {}
1378
+ }
1379
+ },
1380
+ "foreignKeys": {
1381
+ "EveFileReference_conversationId_ownerId_EveConversation_id_ownerId_fk": {
1382
+ "name": "EveFileReference_conversationId_ownerId_EveConversation_id_ownerId_fk",
1383
+ "tableFrom": "EveFileReference",
1384
+ "tableTo": "EveConversation",
1385
+ "columnsFrom": [
1386
+ "conversationId",
1387
+ "ownerId"
1388
+ ],
1389
+ "columnsTo": [
1390
+ "id",
1391
+ "ownerId"
1392
+ ],
1393
+ "onDelete": "no action",
1394
+ "onUpdate": "no action"
1395
+ },
1396
+ "EveFileReference_key_ownerId_EveStoredFile_key_ownerId_fk": {
1397
+ "name": "EveFileReference_key_ownerId_EveStoredFile_key_ownerId_fk",
1398
+ "tableFrom": "EveFileReference",
1399
+ "tableTo": "EveStoredFile",
1400
+ "columnsFrom": [
1401
+ "key",
1402
+ "ownerId"
1403
+ ],
1404
+ "columnsTo": [
1405
+ "key",
1406
+ "ownerId"
1407
+ ],
1408
+ "onDelete": "no action",
1409
+ "onUpdate": "no action"
1410
+ }
1411
+ },
1412
+ "compositePrimaryKeys": {
1413
+ "EveFileReference_conversationId_key_pk": {
1414
+ "name": "EveFileReference_conversationId_key_pk",
1415
+ "columns": [
1416
+ "conversationId",
1417
+ "key"
1418
+ ]
1419
+ }
1420
+ },
1421
+ "uniqueConstraints": {},
1422
+ "policies": {},
1423
+ "checkConstraints": {},
1424
+ "isRLSEnabled": false
1425
+ },
1426
+ "public.EveGuest": {
1427
+ "name": "EveGuest",
1428
+ "schema": "",
1429
+ "columns": {
1430
+ "createdAt": {
1431
+ "name": "createdAt",
1432
+ "type": "timestamp with time zone",
1433
+ "primaryKey": false,
1434
+ "notNull": true,
1435
+ "default": "now()"
1436
+ },
1437
+ "expiresAt": {
1438
+ "name": "expiresAt",
1439
+ "type": "timestamp with time zone",
1440
+ "primaryKey": false,
1441
+ "notNull": true
1442
+ },
1443
+ "messageLimit": {
1444
+ "name": "messageLimit",
1445
+ "type": "integer",
1446
+ "primaryKey": false,
1447
+ "notNull": true
1448
+ },
1449
+ "ownerId": {
1450
+ "name": "ownerId",
1451
+ "type": "text",
1452
+ "primaryKey": true,
1453
+ "notNull": true
1454
+ },
1455
+ "remainingMessages": {
1456
+ "name": "remainingMessages",
1457
+ "type": "integer",
1458
+ "primaryKey": false,
1459
+ "notNull": true
1460
+ },
1461
+ "tokenHash": {
1462
+ "name": "tokenHash",
1463
+ "type": "varchar(64)",
1464
+ "primaryKey": false,
1465
+ "notNull": true
1466
+ }
1467
+ },
1468
+ "indexes": {
1469
+ "EveGuest_expiry_idx": {
1470
+ "name": "EveGuest_expiry_idx",
1471
+ "columns": [
1472
+ {
1473
+ "expression": "expiresAt",
1474
+ "isExpression": false,
1475
+ "asc": true,
1476
+ "nulls": "last"
1477
+ }
1478
+ ],
1479
+ "isUnique": false,
1480
+ "concurrently": false,
1481
+ "method": "btree",
1482
+ "with": {}
1483
+ }
1484
+ },
1485
+ "foreignKeys": {
1486
+ "EveGuest_ownerId_user_id_fk": {
1487
+ "name": "EveGuest_ownerId_user_id_fk",
1488
+ "tableFrom": "EveGuest",
1489
+ "tableTo": "user",
1490
+ "columnsFrom": [
1491
+ "ownerId"
1492
+ ],
1493
+ "columnsTo": [
1494
+ "id"
1495
+ ],
1496
+ "onDelete": "cascade",
1497
+ "onUpdate": "no action"
1498
+ }
1499
+ },
1500
+ "compositePrimaryKeys": {},
1501
+ "uniqueConstraints": {
1502
+ "EveGuest_tokenHash_unique": {
1503
+ "name": "EveGuest_tokenHash_unique",
1504
+ "nullsNotDistinct": false,
1505
+ "columns": [
1506
+ "tokenHash"
1507
+ ]
1508
+ }
1509
+ },
1510
+ "policies": {},
1511
+ "checkConstraints": {
1512
+ "EveGuest_message_balance": {
1513
+ "name": "EveGuest_message_balance",
1514
+ "value": "\"EveGuest\".\"remainingMessages\" >= 0 and \"EveGuest\".\"remainingMessages\" <= \"EveGuest\".\"messageLimit\""
1515
+ },
1516
+ "EveGuest_token_hash": {
1517
+ "name": "EveGuest_token_hash",
1518
+ "value": "\"EveGuest\".\"tokenHash\" ~ '^[0-9a-f]{64}$'"
1519
+ }
1520
+ },
1521
+ "isRLSEnabled": false
1522
+ },
1523
+ "public.EveGuestMessage": {
1524
+ "name": "EveGuestMessage",
1525
+ "schema": "",
1526
+ "columns": {
1527
+ "ipHash": {
1528
+ "name": "ipHash",
1529
+ "type": "varchar(64)",
1530
+ "primaryKey": false,
1531
+ "notNull": true
1532
+ },
1533
+ "operationId": {
1534
+ "name": "operationId",
1535
+ "type": "uuid",
1536
+ "primaryKey": false,
1537
+ "notNull": true
1538
+ },
1539
+ "ownerId": {
1540
+ "name": "ownerId",
1541
+ "type": "text",
1542
+ "primaryKey": false,
1543
+ "notNull": true
1544
+ },
1545
+ "requestHash": {
1546
+ "name": "requestHash",
1547
+ "type": "varchar(64)",
1548
+ "primaryKey": false,
1549
+ "notNull": true
1550
+ },
1551
+ "reservationId": {
1552
+ "name": "reservationId",
1553
+ "type": "uuid",
1554
+ "primaryKey": false,
1555
+ "notNull": true
1556
+ },
1557
+ "reservedAt": {
1558
+ "name": "reservedAt",
1559
+ "type": "timestamp with time zone",
1560
+ "primaryKey": false,
1561
+ "notNull": true
1562
+ },
1563
+ "state": {
1564
+ "name": "state",
1565
+ "type": "text",
1566
+ "primaryKey": false,
1567
+ "notNull": true
1568
+ }
1569
+ },
1570
+ "indexes": {},
1571
+ "foreignKeys": {
1572
+ "EveGuestMessage_ownerId_EveGuest_ownerId_fk": {
1573
+ "name": "EveGuestMessage_ownerId_EveGuest_ownerId_fk",
1574
+ "tableFrom": "EveGuestMessage",
1575
+ "tableTo": "EveGuest",
1576
+ "columnsFrom": [
1577
+ "ownerId"
1578
+ ],
1579
+ "columnsTo": [
1580
+ "ownerId"
1581
+ ],
1582
+ "onDelete": "cascade",
1583
+ "onUpdate": "no action"
1584
+ }
1585
+ },
1586
+ "compositePrimaryKeys": {
1587
+ "EveGuestMessage_ownerId_operationId_pk": {
1588
+ "name": "EveGuestMessage_ownerId_operationId_pk",
1589
+ "columns": [
1590
+ "ownerId",
1591
+ "operationId"
1592
+ ]
1593
+ }
1594
+ },
1595
+ "uniqueConstraints": {},
1596
+ "policies": {},
1597
+ "checkConstraints": {
1598
+ "EveGuestMessage_state": {
1599
+ "name": "EveGuestMessage_state",
1600
+ "value": "\"EveGuestMessage\".\"state\" in ('reserved', 'committed', 'released')"
1601
+ },
1602
+ "EveGuestMessage_request_hash": {
1603
+ "name": "EveGuestMessage_request_hash",
1604
+ "value": "\"EveGuestMessage\".\"requestHash\" ~ '^[0-9a-f]{64}$'"
1605
+ }
1606
+ },
1607
+ "isRLSEnabled": false
1608
+ },
1609
+ "public.EveGuestRate": {
1610
+ "name": "EveGuestRate",
1611
+ "schema": "",
1612
+ "columns": {
1613
+ "ipHash": {
1614
+ "name": "ipHash",
1615
+ "type": "varchar(64)",
1616
+ "primaryKey": false,
1617
+ "notNull": true
1618
+ },
1619
+ "requests": {
1620
+ "name": "requests",
1621
+ "type": "integer",
1622
+ "primaryKey": false,
1623
+ "notNull": true
1624
+ },
1625
+ "startsAt": {
1626
+ "name": "startsAt",
1627
+ "type": "timestamp with time zone",
1628
+ "primaryKey": false,
1629
+ "notNull": true
1630
+ },
1631
+ "windowSeconds": {
1632
+ "name": "windowSeconds",
1633
+ "type": "integer",
1634
+ "primaryKey": false,
1635
+ "notNull": true
1636
+ }
1637
+ },
1638
+ "indexes": {},
1639
+ "foreignKeys": {},
1640
+ "compositePrimaryKeys": {
1641
+ "EveGuestRate_ipHash_windowSeconds_startsAt_pk": {
1642
+ "name": "EveGuestRate_ipHash_windowSeconds_startsAt_pk",
1643
+ "columns": [
1644
+ "ipHash",
1645
+ "windowSeconds",
1646
+ "startsAt"
1647
+ ]
1648
+ }
1649
+ },
1650
+ "uniqueConstraints": {},
1651
+ "policies": {},
1652
+ "checkConstraints": {
1653
+ "EveGuestRate_requests": {
1654
+ "name": "EveGuestRate_requests",
1655
+ "value": "\"EveGuestRate\".\"requests\" >= 0"
1656
+ },
1657
+ "EveGuestRate_window": {
1658
+ "name": "EveGuestRate_window",
1659
+ "value": "\"EveGuestRate\".\"windowSeconds\" in (60, 2592000)"
1660
+ }
1661
+ },
1662
+ "isRLSEnabled": false
1663
+ },
1664
+ "public.EveImportedDocumentCheckpoint": {
1665
+ "name": "EveImportedDocumentCheckpoint",
1666
+ "schema": "",
1667
+ "columns": {
1668
+ "conversationId": {
1669
+ "name": "conversationId",
1670
+ "type": "uuid",
1671
+ "primaryKey": false,
1672
+ "notNull": true
1673
+ },
1674
+ "messageIndex": {
1675
+ "name": "messageIndex",
1676
+ "type": "integer",
1677
+ "primaryKey": false,
1678
+ "notNull": true
1679
+ },
1680
+ "ownerId": {
1681
+ "name": "ownerId",
1682
+ "type": "text",
1683
+ "primaryKey": false,
1684
+ "notNull": true
1685
+ }
1686
+ },
1687
+ "indexes": {},
1688
+ "foreignKeys": {
1689
+ "EveImportedDocumentCheckpoint_conversation_owner_fk": {
1690
+ "name": "EveImportedDocumentCheckpoint_conversation_owner_fk",
1691
+ "tableFrom": "EveImportedDocumentCheckpoint",
1692
+ "tableTo": "EveConversation",
1693
+ "columnsFrom": [
1694
+ "conversationId",
1695
+ "ownerId"
1696
+ ],
1697
+ "columnsTo": [
1698
+ "id",
1699
+ "ownerId"
1700
+ ],
1701
+ "onDelete": "no action",
1702
+ "onUpdate": "no action"
1703
+ }
1704
+ },
1705
+ "compositePrimaryKeys": {
1706
+ "EveImportedDocumentCheckpoint_conversationId_messageIndex_pk": {
1707
+ "name": "EveImportedDocumentCheckpoint_conversationId_messageIndex_pk",
1708
+ "columns": [
1709
+ "conversationId",
1710
+ "messageIndex"
1711
+ ]
1712
+ }
1713
+ },
1714
+ "uniqueConstraints": {
1715
+ "EveImportedDocumentCheckpoint_owner_identity": {
1716
+ "name": "EveImportedDocumentCheckpoint_owner_identity",
1717
+ "nullsNotDistinct": false,
1718
+ "columns": [
1719
+ "conversationId",
1720
+ "messageIndex",
1721
+ "ownerId"
1722
+ ]
1723
+ }
1724
+ },
1725
+ "policies": {},
1726
+ "checkConstraints": {
1727
+ "EveImportedDocumentCheckpoint_message_range": {
1728
+ "name": "EveImportedDocumentCheckpoint_message_range",
1729
+ "value": "\"EveImportedDocumentCheckpoint\".\"messageIndex\" between 0 and 9999"
1730
+ }
1731
+ },
1732
+ "isRLSEnabled": false
1733
+ },
1734
+ "public.EveImportedDocumentCheckpointEntry": {
1735
+ "name": "EveImportedDocumentCheckpointEntry",
1736
+ "schema": "",
1737
+ "columns": {
1738
+ "conversationId": {
1739
+ "name": "conversationId",
1740
+ "type": "uuid",
1741
+ "primaryKey": false,
1742
+ "notNull": true
1743
+ },
1744
+ "documentId": {
1745
+ "name": "documentId",
1746
+ "type": "uuid",
1747
+ "primaryKey": false,
1748
+ "notNull": true
1749
+ },
1750
+ "messageIndex": {
1751
+ "name": "messageIndex",
1752
+ "type": "integer",
1753
+ "primaryKey": false,
1754
+ "notNull": true
1755
+ },
1756
+ "ownerId": {
1757
+ "name": "ownerId",
1758
+ "type": "text",
1759
+ "primaryKey": false,
1760
+ "notNull": true
1761
+ },
1762
+ "revisionId": {
1763
+ "name": "revisionId",
1764
+ "type": "uuid",
1765
+ "primaryKey": false,
1766
+ "notNull": true
1767
+ }
1768
+ },
1769
+ "indexes": {},
1770
+ "foreignKeys": {
1771
+ "EveImportedDocumentCheckpointEntry_checkpoint_owner_fk": {
1772
+ "name": "EveImportedDocumentCheckpointEntry_checkpoint_owner_fk",
1773
+ "tableFrom": "EveImportedDocumentCheckpointEntry",
1774
+ "tableTo": "EveImportedDocumentCheckpoint",
1775
+ "columnsFrom": [
1776
+ "conversationId",
1777
+ "messageIndex",
1778
+ "ownerId"
1779
+ ],
1780
+ "columnsTo": [
1781
+ "conversationId",
1782
+ "messageIndex",
1783
+ "ownerId"
1784
+ ],
1785
+ "onDelete": "no action",
1786
+ "onUpdate": "no action"
1787
+ },
1788
+ "EveImportedDocumentCheckpointEntry_revision_owner_fk": {
1789
+ "name": "EveImportedDocumentCheckpointEntry_revision_owner_fk",
1790
+ "tableFrom": "EveImportedDocumentCheckpointEntry",
1791
+ "tableTo": "EveDocumentRevision",
1792
+ "columnsFrom": [
1793
+ "revisionId",
1794
+ "documentId",
1795
+ "ownerId"
1796
+ ],
1797
+ "columnsTo": [
1798
+ "id",
1799
+ "documentId",
1800
+ "ownerId"
1801
+ ],
1802
+ "onDelete": "no action",
1803
+ "onUpdate": "no action"
1804
+ }
1805
+ },
1806
+ "compositePrimaryKeys": {
1807
+ "EveImportedDocumentCheckpointEntry_conversationId_messageIndex_documentId_pk": {
1808
+ "name": "EveImportedDocumentCheckpointEntry_conversationId_messageIndex_documentId_pk",
1809
+ "columns": [
1810
+ "conversationId",
1811
+ "messageIndex",
1812
+ "documentId"
1813
+ ]
1814
+ }
1815
+ },
1816
+ "uniqueConstraints": {},
1817
+ "policies": {},
1818
+ "checkConstraints": {},
1819
+ "isRLSEnabled": false
1820
+ },
1821
+ "public.EveNamedDocumentCheckpoint": {
1822
+ "name": "EveNamedDocumentCheckpoint",
1823
+ "schema": "",
1824
+ "columns": {
1825
+ "checkpointId": {
1826
+ "name": "checkpointId",
1827
+ "type": "uuid",
1828
+ "primaryKey": false,
1829
+ "notNull": true
1830
+ },
1831
+ "conversationId": {
1832
+ "name": "conversationId",
1833
+ "type": "uuid",
1834
+ "primaryKey": false,
1835
+ "notNull": true
1836
+ },
1837
+ "ownerId": {
1838
+ "name": "ownerId",
1839
+ "type": "text",
1840
+ "primaryKey": false,
1841
+ "notNull": true
1842
+ },
1843
+ "turnIndex": {
1844
+ "name": "turnIndex",
1845
+ "type": "integer",
1846
+ "primaryKey": false,
1847
+ "notNull": true
1848
+ }
1849
+ },
1850
+ "indexes": {},
1851
+ "foreignKeys": {
1852
+ "EveNamedDocumentCheckpoint_conversation_owner_fk": {
1853
+ "name": "EveNamedDocumentCheckpoint_conversation_owner_fk",
1854
+ "tableFrom": "EveNamedDocumentCheckpoint",
1855
+ "tableTo": "EveConversation",
1856
+ "columnsFrom": [
1857
+ "conversationId",
1858
+ "ownerId"
1859
+ ],
1860
+ "columnsTo": [
1861
+ "id",
1862
+ "ownerId"
1863
+ ],
1864
+ "onDelete": "no action",
1865
+ "onUpdate": "no action"
1866
+ }
1867
+ },
1868
+ "compositePrimaryKeys": {
1869
+ "EveNamedDocumentCheckpoint_conversationId_checkpointId_pk": {
1870
+ "name": "EveNamedDocumentCheckpoint_conversationId_checkpointId_pk",
1871
+ "columns": [
1872
+ "conversationId",
1873
+ "checkpointId"
1874
+ ]
1875
+ }
1876
+ },
1877
+ "uniqueConstraints": {
1878
+ "EveNamedDocumentCheckpoint_owner_identity": {
1879
+ "name": "EveNamedDocumentCheckpoint_owner_identity",
1880
+ "nullsNotDistinct": false,
1881
+ "columns": [
1882
+ "conversationId",
1883
+ "checkpointId",
1884
+ "ownerId"
1885
+ ]
1886
+ }
1887
+ },
1888
+ "policies": {},
1889
+ "checkConstraints": {
1890
+ "EveNamedDocumentCheckpoint_turn_nonnegative": {
1891
+ "name": "EveNamedDocumentCheckpoint_turn_nonnegative",
1892
+ "value": "\"EveNamedDocumentCheckpoint\".\"turnIndex\" >= 0"
1893
+ }
1894
+ },
1895
+ "isRLSEnabled": false
1896
+ },
1897
+ "public.EveNamedDocumentCheckpointEntry": {
1898
+ "name": "EveNamedDocumentCheckpointEntry",
1899
+ "schema": "",
1900
+ "columns": {
1901
+ "checkpointId": {
1902
+ "name": "checkpointId",
1903
+ "type": "uuid",
1904
+ "primaryKey": false,
1905
+ "notNull": true
1906
+ },
1907
+ "conversationId": {
1908
+ "name": "conversationId",
1909
+ "type": "uuid",
1910
+ "primaryKey": false,
1911
+ "notNull": true
1912
+ },
1913
+ "documentId": {
1914
+ "name": "documentId",
1915
+ "type": "uuid",
1916
+ "primaryKey": false,
1917
+ "notNull": true
1918
+ },
1919
+ "ownerId": {
1920
+ "name": "ownerId",
1921
+ "type": "text",
1922
+ "primaryKey": false,
1923
+ "notNull": true
1924
+ },
1925
+ "revisionId": {
1926
+ "name": "revisionId",
1927
+ "type": "uuid",
1928
+ "primaryKey": false,
1929
+ "notNull": true
1930
+ }
1931
+ },
1932
+ "indexes": {},
1933
+ "foreignKeys": {
1934
+ "EveNamedDocumentCheckpointEntry_checkpoint_owner_fk": {
1935
+ "name": "EveNamedDocumentCheckpointEntry_checkpoint_owner_fk",
1936
+ "tableFrom": "EveNamedDocumentCheckpointEntry",
1937
+ "tableTo": "EveNamedDocumentCheckpoint",
1938
+ "columnsFrom": [
1939
+ "conversationId",
1940
+ "checkpointId",
1941
+ "ownerId"
1942
+ ],
1943
+ "columnsTo": [
1944
+ "conversationId",
1945
+ "checkpointId",
1946
+ "ownerId"
1947
+ ],
1948
+ "onDelete": "no action",
1949
+ "onUpdate": "no action"
1950
+ },
1951
+ "EveNamedDocumentCheckpointEntry_revision_owner_fk": {
1952
+ "name": "EveNamedDocumentCheckpointEntry_revision_owner_fk",
1953
+ "tableFrom": "EveNamedDocumentCheckpointEntry",
1954
+ "tableTo": "EveDocumentRevision",
1955
+ "columnsFrom": [
1956
+ "revisionId",
1957
+ "documentId",
1958
+ "ownerId"
1959
+ ],
1960
+ "columnsTo": [
1961
+ "id",
1962
+ "documentId",
1963
+ "ownerId"
1964
+ ],
1965
+ "onDelete": "no action",
1966
+ "onUpdate": "no action"
1967
+ }
1968
+ },
1969
+ "compositePrimaryKeys": {
1970
+ "EveNamedDocumentCheckpointEntry_conversationId_checkpointId_documentId_pk": {
1971
+ "name": "EveNamedDocumentCheckpointEntry_conversationId_checkpointId_documentId_pk",
1972
+ "columns": [
1973
+ "conversationId",
1974
+ "checkpointId",
1975
+ "documentId"
1976
+ ]
1977
+ }
1978
+ },
1979
+ "uniqueConstraints": {},
1980
+ "policies": {},
1981
+ "checkConstraints": {},
1982
+ "isRLSEnabled": false
1983
+ },
1984
+ "public.EveResponseGroup": {
1985
+ "name": "EveResponseGroup",
1986
+ "schema": "",
1987
+ "columns": {
1988
+ "candidateOperationIds": {
1989
+ "name": "candidateOperationIds",
1990
+ "type": "uuid[]",
1991
+ "primaryKey": false,
1992
+ "notNull": true
1993
+ },
1994
+ "candidates": {
1995
+ "name": "candidates",
1996
+ "type": "jsonb",
1997
+ "primaryKey": false,
1998
+ "notNull": false
1999
+ },
2000
+ "createdAt": {
2001
+ "name": "createdAt",
2002
+ "type": "timestamp",
2003
+ "primaryKey": false,
2004
+ "notNull": true,
2005
+ "default": "now()"
2006
+ },
2007
+ "deleted": {
2008
+ "name": "deleted",
2009
+ "type": "boolean",
2010
+ "primaryKey": false,
2011
+ "notNull": true,
2012
+ "default": false
2013
+ },
2014
+ "id": {
2015
+ "name": "id",
2016
+ "type": "uuid",
2017
+ "primaryKey": true,
2018
+ "notNull": true,
2019
+ "default": "gen_random_uuid()"
2020
+ },
2021
+ "inputHash": {
2022
+ "name": "inputHash",
2023
+ "type": "text",
2024
+ "primaryKey": false,
2025
+ "notNull": false
2026
+ },
2027
+ "operationId": {
2028
+ "name": "operationId",
2029
+ "type": "uuid",
2030
+ "primaryKey": false,
2031
+ "notNull": true
2032
+ },
2033
+ "ownerId": {
2034
+ "name": "ownerId",
2035
+ "type": "text",
2036
+ "primaryKey": false,
2037
+ "notNull": true
2038
+ },
2039
+ "sourceConversationId": {
2040
+ "name": "sourceConversationId",
2041
+ "type": "uuid",
2042
+ "primaryKey": false,
2043
+ "notNull": false
2044
+ },
2045
+ "sourceIdentityKnown": {
2046
+ "name": "sourceIdentityKnown",
2047
+ "type": "boolean",
2048
+ "primaryKey": false,
2049
+ "notNull": true,
2050
+ "default": false
2051
+ }
2052
+ },
2053
+ "indexes": {
2054
+ "EveResponseGroup_owner_operation": {
2055
+ "name": "EveResponseGroup_owner_operation",
2056
+ "columns": [
2057
+ {
2058
+ "expression": "ownerId",
2059
+ "isExpression": false,
2060
+ "asc": true,
2061
+ "nulls": "last"
2062
+ },
2063
+ {
2064
+ "expression": "operationId",
2065
+ "isExpression": false,
2066
+ "asc": true,
2067
+ "nulls": "last"
2068
+ }
2069
+ ],
2070
+ "isUnique": true,
2071
+ "concurrently": false,
2072
+ "method": "btree",
2073
+ "with": {}
2074
+ }
2075
+ },
2076
+ "foreignKeys": {
2077
+ "EveResponseGroup_ownerId_user_id_fk": {
2078
+ "name": "EveResponseGroup_ownerId_user_id_fk",
2079
+ "tableFrom": "EveResponseGroup",
2080
+ "tableTo": "user",
2081
+ "columnsFrom": [
2082
+ "ownerId"
2083
+ ],
2084
+ "columnsTo": [
2085
+ "id"
2086
+ ],
2087
+ "onDelete": "no action",
2088
+ "onUpdate": "no action"
2089
+ }
2090
+ },
2091
+ "compositePrimaryKeys": {},
2092
+ "uniqueConstraints": {},
2093
+ "policies": {},
2094
+ "checkConstraints": {},
2095
+ "isRLSEnabled": false
2096
+ },
2097
+ "public.EveSearchText": {
2098
+ "name": "EveSearchText",
2099
+ "schema": "",
2100
+ "columns": {
2101
+ "conversationId": {
2102
+ "name": "conversationId",
2103
+ "type": "uuid",
2104
+ "primaryKey": false,
2105
+ "notNull": true
2106
+ },
2107
+ "key": {
2108
+ "name": "key",
2109
+ "type": "text",
2110
+ "primaryKey": false,
2111
+ "notNull": true
2112
+ },
2113
+ "ownerId": {
2114
+ "name": "ownerId",
2115
+ "type": "text",
2116
+ "primaryKey": false,
2117
+ "notNull": true
2118
+ },
2119
+ "text": {
2120
+ "name": "text",
2121
+ "type": "text",
2122
+ "primaryKey": false,
2123
+ "notNull": true
2124
+ }
2125
+ },
2126
+ "indexes": {
2127
+ "EveSearchText_owner": {
2128
+ "name": "EveSearchText_owner",
2129
+ "columns": [
2130
+ {
2131
+ "expression": "ownerId",
2132
+ "isExpression": false,
2133
+ "asc": true,
2134
+ "nulls": "last"
2135
+ }
2136
+ ],
2137
+ "isUnique": false,
2138
+ "concurrently": false,
2139
+ "method": "btree",
2140
+ "with": {}
2141
+ },
2142
+ "EveSearchText_content": {
2143
+ "name": "EveSearchText_content",
2144
+ "columns": [
2145
+ {
2146
+ "expression": "to_tsvector('simple', \"text\")",
2147
+ "asc": true,
2148
+ "isExpression": true,
2149
+ "nulls": "last"
2150
+ }
2151
+ ],
2152
+ "isUnique": false,
2153
+ "concurrently": false,
2154
+ "method": "gin",
2155
+ "with": {}
2156
+ }
2157
+ },
2158
+ "foreignKeys": {
2159
+ "EveSearchText_conversationId_ownerId_EveConversation_id_ownerId_fk": {
2160
+ "name": "EveSearchText_conversationId_ownerId_EveConversation_id_ownerId_fk",
2161
+ "tableFrom": "EveSearchText",
2162
+ "tableTo": "EveConversation",
2163
+ "columnsFrom": [
2164
+ "conversationId",
2165
+ "ownerId"
2166
+ ],
2167
+ "columnsTo": [
2168
+ "id",
2169
+ "ownerId"
2170
+ ],
2171
+ "onDelete": "cascade",
2172
+ "onUpdate": "no action"
2173
+ }
2174
+ },
2175
+ "compositePrimaryKeys": {
2176
+ "EveSearchText_conversationId_key_pk": {
2177
+ "name": "EveSearchText_conversationId_key_pk",
2178
+ "columns": [
2179
+ "conversationId",
2180
+ "key"
2181
+ ]
2182
+ }
2183
+ },
2184
+ "uniqueConstraints": {},
2185
+ "policies": {},
2186
+ "checkConstraints": {},
2187
+ "isRLSEnabled": false
2188
+ },
2189
+ "public.EveStoredFile": {
2190
+ "name": "EveStoredFile",
2191
+ "schema": "",
2192
+ "columns": {
2193
+ "createdAt": {
2194
+ "name": "createdAt",
2195
+ "type": "timestamp",
2196
+ "primaryKey": false,
2197
+ "notNull": true,
2198
+ "default": "now()"
2199
+ },
2200
+ "key": {
2201
+ "name": "key",
2202
+ "type": "text",
2203
+ "primaryKey": true,
2204
+ "notNull": true
2205
+ },
2206
+ "ownerId": {
2207
+ "name": "ownerId",
2208
+ "type": "text",
2209
+ "primaryKey": false,
2210
+ "notNull": true
2211
+ },
2212
+ "state": {
2213
+ "name": "state",
2214
+ "type": "text",
2215
+ "primaryKey": false,
2216
+ "notNull": true,
2217
+ "default": "'active'"
2218
+ },
2219
+ "storageKey": {
2220
+ "name": "storageKey",
2221
+ "type": "text",
2222
+ "primaryKey": false,
2223
+ "notNull": true,
2224
+ "default": "gen_random_uuid()::text"
2225
+ }
2226
+ },
2227
+ "indexes": {
2228
+ "EveStoredFile_owner": {
2229
+ "name": "EveStoredFile_owner",
2230
+ "columns": [
2231
+ {
2232
+ "expression": "ownerId",
2233
+ "isExpression": false,
2234
+ "asc": true,
2235
+ "nulls": "last"
2236
+ }
2237
+ ],
2238
+ "isUnique": false,
2239
+ "concurrently": false,
2240
+ "method": "btree",
2241
+ "with": {}
2242
+ }
2243
+ },
2244
+ "foreignKeys": {
2245
+ "EveStoredFile_ownerId_user_id_fk": {
2246
+ "name": "EveStoredFile_ownerId_user_id_fk",
2247
+ "tableFrom": "EveStoredFile",
2248
+ "tableTo": "user",
2249
+ "columnsFrom": [
2250
+ "ownerId"
2251
+ ],
2252
+ "columnsTo": [
2253
+ "id"
2254
+ ],
2255
+ "onDelete": "no action",
2256
+ "onUpdate": "no action"
2257
+ }
2258
+ },
2259
+ "compositePrimaryKeys": {},
2260
+ "uniqueConstraints": {
2261
+ "EveStoredFile_storageKey_unique": {
2262
+ "name": "EveStoredFile_storageKey_unique",
2263
+ "nullsNotDistinct": false,
2264
+ "columns": [
2265
+ "storageKey"
2266
+ ]
2267
+ },
2268
+ "EveStoredFile_key_owner": {
2269
+ "name": "EveStoredFile_key_owner",
2270
+ "nullsNotDistinct": false,
2271
+ "columns": [
2272
+ "key",
2273
+ "ownerId"
2274
+ ]
2275
+ }
2276
+ },
2277
+ "policies": {},
2278
+ "checkConstraints": {},
2279
+ "isRLSEnabled": false
2280
+ },
2281
+ "public.EveSubagentSession": {
2282
+ "name": "EveSubagentSession",
2283
+ "schema": "",
2284
+ "columns": {
2285
+ "conversationId": {
2286
+ "name": "conversationId",
2287
+ "type": "uuid",
2288
+ "primaryKey": false,
2289
+ "notNull": true
2290
+ },
2291
+ "ownerId": {
2292
+ "name": "ownerId",
2293
+ "type": "text",
2294
+ "primaryKey": false,
2295
+ "notNull": true
2296
+ },
2297
+ "parentSessionId": {
2298
+ "name": "parentSessionId",
2299
+ "type": "text",
2300
+ "primaryKey": false,
2301
+ "notNull": true
2302
+ },
2303
+ "rootTurnId": {
2304
+ "name": "rootTurnId",
2305
+ "type": "text",
2306
+ "primaryKey": false,
2307
+ "notNull": true
2308
+ },
2309
+ "sessionId": {
2310
+ "name": "sessionId",
2311
+ "type": "text",
2312
+ "primaryKey": true,
2313
+ "notNull": true
2314
+ },
2315
+ "usageStreamIndex": {
2316
+ "name": "usageStreamIndex",
2317
+ "type": "integer",
2318
+ "primaryKey": false,
2319
+ "notNull": true,
2320
+ "default": 0
2321
+ }
2322
+ },
2323
+ "indexes": {
2324
+ "EveSubagentSession_conversation": {
2325
+ "name": "EveSubagentSession_conversation",
2326
+ "columns": [
2327
+ {
2328
+ "expression": "conversationId",
2329
+ "isExpression": false,
2330
+ "asc": true,
2331
+ "nulls": "last"
2332
+ }
2333
+ ],
2334
+ "isUnique": false,
2335
+ "concurrently": false,
2336
+ "method": "btree",
2337
+ "with": {}
2338
+ }
2339
+ },
2340
+ "foreignKeys": {
2341
+ "EveSubagentSession_conversation_owner_fk": {
2342
+ "name": "EveSubagentSession_conversation_owner_fk",
2343
+ "tableFrom": "EveSubagentSession",
2344
+ "tableTo": "EveConversation",
2345
+ "columnsFrom": [
2346
+ "conversationId",
2347
+ "ownerId"
2348
+ ],
2349
+ "columnsTo": [
2350
+ "id",
2351
+ "ownerId"
2352
+ ],
2353
+ "onDelete": "cascade",
2354
+ "onUpdate": "no action"
2355
+ }
2356
+ },
2357
+ "compositePrimaryKeys": {},
2358
+ "uniqueConstraints": {},
2359
+ "policies": {},
2360
+ "checkConstraints": {
2361
+ "EveSubagentSession_not_self": {
2362
+ "name": "EveSubagentSession_not_self",
2363
+ "value": "\"EveSubagentSession\".\"sessionId\" <> \"EveSubagentSession\".\"parentSessionId\""
2364
+ },
2365
+ "EveSubagentSession_cursor": {
2366
+ "name": "EveSubagentSession_cursor",
2367
+ "value": "\"EveSubagentSession\".\"usageStreamIndex\" >= 0"
2368
+ }
2369
+ },
2370
+ "isRLSEnabled": false
2371
+ },
2372
+ "public.EveUsage": {
2373
+ "name": "EveUsage",
2374
+ "schema": "",
2375
+ "columns": {
2376
+ "chargedCents": {
2377
+ "name": "chargedCents",
2378
+ "type": "integer",
2379
+ "primaryKey": false,
2380
+ "notNull": true,
2381
+ "default": 0
2382
+ },
2383
+ "costUsd": {
2384
+ "name": "costUsd",
2385
+ "type": "numeric(24, 12)",
2386
+ "primaryKey": false,
2387
+ "notNull": false
2388
+ },
2389
+ "createdAt": {
2390
+ "name": "createdAt",
2391
+ "type": "timestamp",
2392
+ "primaryKey": false,
2393
+ "notNull": true,
2394
+ "default": "now()"
2395
+ },
2396
+ "eventId": {
2397
+ "name": "eventId",
2398
+ "type": "text",
2399
+ "primaryKey": true,
2400
+ "notNull": true
2401
+ },
2402
+ "generationId": {
2403
+ "name": "generationId",
2404
+ "type": "text",
2405
+ "primaryKey": false,
2406
+ "notNull": false
2407
+ },
2408
+ "modelAttempt": {
2409
+ "name": "modelAttempt",
2410
+ "type": "jsonb",
2411
+ "primaryKey": false,
2412
+ "notNull": false
2413
+ },
2414
+ "ownerId": {
2415
+ "name": "ownerId",
2416
+ "type": "text",
2417
+ "primaryKey": false,
2418
+ "notNull": true
2419
+ },
2420
+ "sessionId": {
2421
+ "name": "sessionId",
2422
+ "type": "text",
2423
+ "primaryKey": false,
2424
+ "notNull": true
2425
+ },
2426
+ "turnId": {
2427
+ "name": "turnId",
2428
+ "type": "text",
2429
+ "primaryKey": false,
2430
+ "notNull": true
2431
+ }
2432
+ },
2433
+ "indexes": {
2434
+ "EveUsage_session_turn": {
2435
+ "name": "EveUsage_session_turn",
2436
+ "columns": [
2437
+ {
2438
+ "expression": "sessionId",
2439
+ "isExpression": false,
2440
+ "asc": true,
2441
+ "nulls": "last"
2442
+ },
2443
+ {
2444
+ "expression": "turnId",
2445
+ "isExpression": false,
2446
+ "asc": true,
2447
+ "nulls": "last"
2448
+ }
2449
+ ],
2450
+ "isUnique": false,
2451
+ "concurrently": false,
2452
+ "method": "btree",
2453
+ "with": {}
2454
+ },
2455
+ "EveUsage_unpriced_owner": {
2456
+ "name": "EveUsage_unpriced_owner",
2457
+ "columns": [
2458
+ {
2459
+ "expression": "ownerId",
2460
+ "isExpression": false,
2461
+ "asc": true,
2462
+ "nulls": "last"
2463
+ }
2464
+ ],
2465
+ "isUnique": false,
2466
+ "where": "\"EveUsage\".\"costUsd\" is null",
2467
+ "concurrently": false,
2468
+ "method": "btree",
2469
+ "with": {}
2470
+ }
2471
+ },
2472
+ "foreignKeys": {
2473
+ "EveUsage_ownerId_user_id_fk": {
2474
+ "name": "EveUsage_ownerId_user_id_fk",
2475
+ "tableFrom": "EveUsage",
2476
+ "tableTo": "user",
2477
+ "columnsFrom": [
2478
+ "ownerId"
2479
+ ],
2480
+ "columnsTo": [
2481
+ "id"
2482
+ ],
2483
+ "onDelete": "no action",
2484
+ "onUpdate": "no action"
2485
+ }
2486
+ },
2487
+ "compositePrimaryKeys": {},
2488
+ "uniqueConstraints": {},
2489
+ "policies": {},
2490
+ "checkConstraints": {},
2491
+ "isRLSEnabled": false
2492
+ },
2493
+ "public.EveVote": {
2494
+ "name": "EveVote",
2495
+ "schema": "",
2496
+ "columns": {
2497
+ "conversationId": {
2498
+ "name": "conversationId",
2499
+ "type": "uuid",
2500
+ "primaryKey": false,
2501
+ "notNull": true
2502
+ },
2503
+ "isUpvoted": {
2504
+ "name": "isUpvoted",
2505
+ "type": "boolean",
2506
+ "primaryKey": false,
2507
+ "notNull": true
2508
+ },
2509
+ "messageId": {
2510
+ "name": "messageId",
2511
+ "type": "text",
2512
+ "primaryKey": false,
2513
+ "notNull": true
2514
+ }
2515
+ },
2516
+ "indexes": {},
2517
+ "foreignKeys": {
2518
+ "EveVote_conversationId_EveConversation_id_fk": {
2519
+ "name": "EveVote_conversationId_EveConversation_id_fk",
2520
+ "tableFrom": "EveVote",
2521
+ "tableTo": "EveConversation",
2522
+ "columnsFrom": [
2523
+ "conversationId"
2524
+ ],
2525
+ "columnsTo": [
2526
+ "id"
2527
+ ],
2528
+ "onDelete": "cascade",
2529
+ "onUpdate": "no action"
2530
+ }
2531
+ },
2532
+ "compositePrimaryKeys": {
2533
+ "EveVote_conversationId_messageId_pk": {
2534
+ "name": "EveVote_conversationId_messageId_pk",
2535
+ "columns": [
2536
+ "conversationId",
2537
+ "messageId"
2538
+ ]
2539
+ }
2540
+ },
2541
+ "uniqueConstraints": {},
2542
+ "policies": {},
2543
+ "checkConstraints": {},
2544
+ "isRLSEnabled": false
2545
+ },
2546
+ "public.EveWorkflowBackend": {
2547
+ "name": "EveWorkflowBackend",
2548
+ "schema": "",
2549
+ "columns": {
2550
+ "id": {
2551
+ "name": "id",
2552
+ "type": "integer",
2553
+ "primaryKey": true,
2554
+ "notNull": true,
2555
+ "default": 1
2556
+ },
2557
+ "world": {
2558
+ "name": "world",
2559
+ "type": "text",
2560
+ "primaryKey": false,
2561
+ "notNull": true
2562
+ }
2563
+ },
2564
+ "indexes": {},
2565
+ "foreignKeys": {},
2566
+ "compositePrimaryKeys": {},
2567
+ "uniqueConstraints": {},
2568
+ "policies": {},
2569
+ "checkConstraints": {
2570
+ "EveWorkflowBackend_singleton": {
2571
+ "name": "EveWorkflowBackend_singleton",
2572
+ "value": "\"EveWorkflowBackend\".\"id\" = 1"
2573
+ }
2574
+ },
2575
+ "isRLSEnabled": false
2576
+ },
2577
+ "public.McpConnector": {
2578
+ "name": "McpConnector",
2579
+ "schema": "",
2580
+ "columns": {
2581
+ "createdAt": {
2582
+ "name": "createdAt",
2583
+ "type": "timestamp",
2584
+ "primaryKey": false,
2585
+ "notNull": true,
2586
+ "default": "now()"
2587
+ },
2588
+ "enabled": {
2589
+ "name": "enabled",
2590
+ "type": "boolean",
2591
+ "primaryKey": false,
2592
+ "notNull": true,
2593
+ "default": true
2594
+ },
2595
+ "id": {
2596
+ "name": "id",
2597
+ "type": "uuid",
2598
+ "primaryKey": true,
2599
+ "notNull": true,
2600
+ "default": "gen_random_uuid()"
2601
+ },
2602
+ "name": {
2603
+ "name": "name",
2604
+ "type": "varchar(256)",
2605
+ "primaryKey": false,
2606
+ "notNull": true
2607
+ },
2608
+ "nameId": {
2609
+ "name": "nameId",
2610
+ "type": "varchar(256)",
2611
+ "primaryKey": false,
2612
+ "notNull": true
2613
+ },
2614
+ "oauthClientId": {
2615
+ "name": "oauthClientId",
2616
+ "type": "text",
2617
+ "primaryKey": false,
2618
+ "notNull": false
2619
+ },
2620
+ "oauthClientSecret": {
2621
+ "name": "oauthClientSecret",
2622
+ "type": "text",
2623
+ "primaryKey": false,
2624
+ "notNull": false
2625
+ },
2626
+ "requireApproval": {
2627
+ "name": "requireApproval",
2628
+ "type": "boolean",
2629
+ "primaryKey": false,
2630
+ "notNull": true,
2631
+ "default": false
2632
+ },
2633
+ "type": {
2634
+ "name": "type",
2635
+ "type": "varchar",
2636
+ "primaryKey": false,
2637
+ "notNull": true,
2638
+ "default": "'http'"
2639
+ },
2640
+ "updatedAt": {
2641
+ "name": "updatedAt",
2642
+ "type": "timestamp",
2643
+ "primaryKey": false,
2644
+ "notNull": true,
2645
+ "default": "now()"
2646
+ },
2647
+ "url": {
2648
+ "name": "url",
2649
+ "type": "text",
2650
+ "primaryKey": false,
2651
+ "notNull": true
2652
+ },
2653
+ "userId": {
2654
+ "name": "userId",
2655
+ "type": "text",
2656
+ "primaryKey": false,
2657
+ "notNull": false
2658
+ }
2659
+ },
2660
+ "indexes": {
2661
+ "McpConnector_user_id_idx": {
2662
+ "name": "McpConnector_user_id_idx",
2663
+ "columns": [
2664
+ {
2665
+ "expression": "userId",
2666
+ "isExpression": false,
2667
+ "asc": true,
2668
+ "nulls": "last"
2669
+ }
2670
+ ],
2671
+ "isUnique": false,
2672
+ "concurrently": false,
2673
+ "method": "btree",
2674
+ "with": {}
2675
+ },
2676
+ "McpConnector_user_name_id_idx": {
2677
+ "name": "McpConnector_user_name_id_idx",
2678
+ "columns": [
2679
+ {
2680
+ "expression": "userId",
2681
+ "isExpression": false,
2682
+ "asc": true,
2683
+ "nulls": "last"
2684
+ },
2685
+ {
2686
+ "expression": "nameId",
2687
+ "isExpression": false,
2688
+ "asc": true,
2689
+ "nulls": "last"
2690
+ }
2691
+ ],
2692
+ "isUnique": false,
2693
+ "concurrently": false,
2694
+ "method": "btree",
2695
+ "with": {}
2696
+ },
2697
+ "McpConnector_user_name_id_unique": {
2698
+ "name": "McpConnector_user_name_id_unique",
2699
+ "columns": [
2700
+ {
2701
+ "expression": "userId",
2702
+ "isExpression": false,
2703
+ "asc": true,
2704
+ "nulls": "last"
2705
+ },
2706
+ {
2707
+ "expression": "nameId",
2708
+ "isExpression": false,
2709
+ "asc": true,
2710
+ "nulls": "last"
2711
+ }
2712
+ ],
2713
+ "isUnique": true,
2714
+ "concurrently": false,
2715
+ "method": "btree",
2716
+ "with": {}
2717
+ }
2718
+ },
2719
+ "foreignKeys": {
2720
+ "McpConnector_userId_user_id_fk": {
2721
+ "name": "McpConnector_userId_user_id_fk",
2722
+ "tableFrom": "McpConnector",
2723
+ "tableTo": "user",
2724
+ "columnsFrom": [
2725
+ "userId"
2726
+ ],
2727
+ "columnsTo": [
2728
+ "id"
2729
+ ],
2730
+ "onDelete": "cascade",
2731
+ "onUpdate": "no action"
2732
+ }
2733
+ },
2734
+ "compositePrimaryKeys": {},
2735
+ "uniqueConstraints": {},
2736
+ "policies": {},
2737
+ "checkConstraints": {},
2738
+ "isRLSEnabled": false
2739
+ },
2740
+ "public.McpOAuthSession": {
2741
+ "name": "McpOAuthSession",
2742
+ "schema": "",
2743
+ "columns": {
2744
+ "clientInfo": {
2745
+ "name": "clientInfo",
2746
+ "type": "text",
2747
+ "primaryKey": false,
2748
+ "notNull": false
2749
+ },
2750
+ "codeVerifier": {
2751
+ "name": "codeVerifier",
2752
+ "type": "text",
2753
+ "primaryKey": false,
2754
+ "notNull": false
2755
+ },
2756
+ "createdAt": {
2757
+ "name": "createdAt",
2758
+ "type": "timestamp",
2759
+ "primaryKey": false,
2760
+ "notNull": true,
2761
+ "default": "now()"
2762
+ },
2763
+ "id": {
2764
+ "name": "id",
2765
+ "type": "uuid",
2766
+ "primaryKey": true,
2767
+ "notNull": true,
2768
+ "default": "gen_random_uuid()"
2769
+ },
2770
+ "mcpConnectorId": {
2771
+ "name": "mcpConnectorId",
2772
+ "type": "uuid",
2773
+ "primaryKey": false,
2774
+ "notNull": true
2775
+ },
2776
+ "serverUrl": {
2777
+ "name": "serverUrl",
2778
+ "type": "text",
2779
+ "primaryKey": false,
2780
+ "notNull": true
2781
+ },
2782
+ "state": {
2783
+ "name": "state",
2784
+ "type": "text",
2785
+ "primaryKey": false,
2786
+ "notNull": false
2787
+ },
2788
+ "tokens": {
2789
+ "name": "tokens",
2790
+ "type": "text",
2791
+ "primaryKey": false,
2792
+ "notNull": false
2793
+ },
2794
+ "updatedAt": {
2795
+ "name": "updatedAt",
2796
+ "type": "timestamp",
2797
+ "primaryKey": false,
2798
+ "notNull": true,
2799
+ "default": "now()"
2800
+ }
2801
+ },
2802
+ "indexes": {
2803
+ "McpOAuthSession_connector_idx": {
2804
+ "name": "McpOAuthSession_connector_idx",
2805
+ "columns": [
2806
+ {
2807
+ "expression": "mcpConnectorId",
2808
+ "isExpression": false,
2809
+ "asc": true,
2810
+ "nulls": "last"
2811
+ }
2812
+ ],
2813
+ "isUnique": false,
2814
+ "concurrently": false,
2815
+ "method": "btree",
2816
+ "with": {}
2817
+ },
2818
+ "McpOAuthSession_state_idx": {
2819
+ "name": "McpOAuthSession_state_idx",
2820
+ "columns": [
2821
+ {
2822
+ "expression": "state",
2823
+ "isExpression": false,
2824
+ "asc": true,
2825
+ "nulls": "last"
2826
+ }
2827
+ ],
2828
+ "isUnique": false,
2829
+ "concurrently": false,
2830
+ "method": "btree",
2831
+ "with": {}
2832
+ }
2833
+ },
2834
+ "foreignKeys": {
2835
+ "McpOAuthSession_mcpConnectorId_McpConnector_id_fk": {
2836
+ "name": "McpOAuthSession_mcpConnectorId_McpConnector_id_fk",
2837
+ "tableFrom": "McpOAuthSession",
2838
+ "tableTo": "McpConnector",
2839
+ "columnsFrom": [
2840
+ "mcpConnectorId"
2841
+ ],
2842
+ "columnsTo": [
2843
+ "id"
2844
+ ],
2845
+ "onDelete": "cascade",
2846
+ "onUpdate": "no action"
2847
+ }
2848
+ },
2849
+ "compositePrimaryKeys": {},
2850
+ "uniqueConstraints": {
2851
+ "McpOAuthSession_state_unique": {
2852
+ "name": "McpOAuthSession_state_unique",
2853
+ "nullsNotDistinct": false,
2854
+ "columns": [
2855
+ "state"
2856
+ ]
2857
+ }
2858
+ },
2859
+ "policies": {},
2860
+ "checkConstraints": {},
2861
+ "isRLSEnabled": false
2862
+ },
2863
+ "public.Project": {
2864
+ "name": "Project",
2865
+ "schema": "",
2866
+ "columns": {
2867
+ "createdAt": {
2868
+ "name": "createdAt",
2869
+ "type": "timestamp",
2870
+ "primaryKey": false,
2871
+ "notNull": true,
2872
+ "default": "now()"
2873
+ },
2874
+ "icon": {
2875
+ "name": "icon",
2876
+ "type": "varchar(64)",
2877
+ "primaryKey": false,
2878
+ "notNull": true,
2879
+ "default": "'folder'"
2880
+ },
2881
+ "iconColor": {
2882
+ "name": "iconColor",
2883
+ "type": "varchar(32)",
2884
+ "primaryKey": false,
2885
+ "notNull": true,
2886
+ "default": "'gray'"
2887
+ },
2888
+ "id": {
2889
+ "name": "id",
2890
+ "type": "uuid",
2891
+ "primaryKey": true,
2892
+ "notNull": true,
2893
+ "default": "gen_random_uuid()"
2894
+ },
2895
+ "instructions": {
2896
+ "name": "instructions",
2897
+ "type": "text",
2898
+ "primaryKey": false,
2899
+ "notNull": true,
2900
+ "default": "''"
2901
+ },
2902
+ "name": {
2903
+ "name": "name",
2904
+ "type": "text",
2905
+ "primaryKey": false,
2906
+ "notNull": true
2907
+ },
2908
+ "updatedAt": {
2909
+ "name": "updatedAt",
2910
+ "type": "timestamp",
2911
+ "primaryKey": false,
2912
+ "notNull": true,
2913
+ "default": "now()"
2914
+ },
2915
+ "userId": {
2916
+ "name": "userId",
2917
+ "type": "text",
2918
+ "primaryKey": false,
2919
+ "notNull": true
2920
+ }
2921
+ },
2922
+ "indexes": {
2923
+ "Project_user_id_idx": {
2924
+ "name": "Project_user_id_idx",
2925
+ "columns": [
2926
+ {
2927
+ "expression": "userId",
2928
+ "isExpression": false,
2929
+ "asc": true,
2930
+ "nulls": "last"
2931
+ }
2932
+ ],
2933
+ "isUnique": false,
2934
+ "concurrently": false,
2935
+ "method": "btree",
2936
+ "with": {}
2937
+ }
2938
+ },
2939
+ "foreignKeys": {
2940
+ "Project_userId_user_id_fk": {
2941
+ "name": "Project_userId_user_id_fk",
2942
+ "tableFrom": "Project",
2943
+ "tableTo": "user",
2944
+ "columnsFrom": [
2945
+ "userId"
2946
+ ],
2947
+ "columnsTo": [
2948
+ "id"
2949
+ ],
2950
+ "onDelete": "cascade",
2951
+ "onUpdate": "no action"
2952
+ }
2953
+ },
2954
+ "compositePrimaryKeys": {},
2955
+ "uniqueConstraints": {
2956
+ "Project_id_user": {
2957
+ "name": "Project_id_user",
2958
+ "nullsNotDistinct": false,
2959
+ "columns": [
2960
+ "id",
2961
+ "userId"
2962
+ ]
2963
+ }
2964
+ },
2965
+ "policies": {},
2966
+ "checkConstraints": {},
2967
+ "isRLSEnabled": false
2968
+ },
2969
+ "public.session": {
2970
+ "name": "session",
2971
+ "schema": "",
2972
+ "columns": {
2973
+ "created_at": {
2974
+ "name": "created_at",
2975
+ "type": "timestamp",
2976
+ "primaryKey": false,
2977
+ "notNull": true,
2978
+ "default": "now()"
2979
+ },
2980
+ "expires_at": {
2981
+ "name": "expires_at",
2982
+ "type": "timestamp",
2983
+ "primaryKey": false,
2984
+ "notNull": true
2985
+ },
2986
+ "id": {
2987
+ "name": "id",
2988
+ "type": "text",
2989
+ "primaryKey": true,
2990
+ "notNull": true
2991
+ },
2992
+ "ip_address": {
2993
+ "name": "ip_address",
2994
+ "type": "text",
2995
+ "primaryKey": false,
2996
+ "notNull": false
2997
+ },
2998
+ "token": {
2999
+ "name": "token",
3000
+ "type": "text",
3001
+ "primaryKey": false,
3002
+ "notNull": true
3003
+ },
3004
+ "updated_at": {
3005
+ "name": "updated_at",
3006
+ "type": "timestamp",
3007
+ "primaryKey": false,
3008
+ "notNull": true
3009
+ },
3010
+ "user_agent": {
3011
+ "name": "user_agent",
3012
+ "type": "text",
3013
+ "primaryKey": false,
3014
+ "notNull": false
3015
+ },
3016
+ "user_id": {
3017
+ "name": "user_id",
3018
+ "type": "text",
3019
+ "primaryKey": false,
3020
+ "notNull": true
3021
+ }
3022
+ },
3023
+ "indexes": {},
3024
+ "foreignKeys": {
3025
+ "session_user_id_user_id_fk": {
3026
+ "name": "session_user_id_user_id_fk",
3027
+ "tableFrom": "session",
3028
+ "tableTo": "user",
3029
+ "columnsFrom": [
3030
+ "user_id"
3031
+ ],
3032
+ "columnsTo": [
3033
+ "id"
3034
+ ],
3035
+ "onDelete": "cascade",
3036
+ "onUpdate": "no action"
3037
+ }
3038
+ },
3039
+ "compositePrimaryKeys": {},
3040
+ "uniqueConstraints": {
3041
+ "session_token_unique": {
3042
+ "name": "session_token_unique",
3043
+ "nullsNotDistinct": false,
3044
+ "columns": [
3045
+ "token"
3046
+ ]
3047
+ }
3048
+ },
3049
+ "policies": {},
3050
+ "checkConstraints": {},
3051
+ "isRLSEnabled": false
3052
+ },
3053
+ "public.user": {
3054
+ "name": "user",
3055
+ "schema": "",
3056
+ "columns": {
3057
+ "created_at": {
3058
+ "name": "created_at",
3059
+ "type": "timestamp",
3060
+ "primaryKey": false,
3061
+ "notNull": true,
3062
+ "default": "now()"
3063
+ },
3064
+ "email": {
3065
+ "name": "email",
3066
+ "type": "text",
3067
+ "primaryKey": false,
3068
+ "notNull": true
3069
+ },
3070
+ "email_verified": {
3071
+ "name": "email_verified",
3072
+ "type": "boolean",
3073
+ "primaryKey": false,
3074
+ "notNull": true,
3075
+ "default": false
3076
+ },
3077
+ "eve_usage_reconciled_at": {
3078
+ "name": "eve_usage_reconciled_at",
3079
+ "type": "timestamp",
3080
+ "primaryKey": false,
3081
+ "notNull": false
3082
+ },
3083
+ "id": {
3084
+ "name": "id",
3085
+ "type": "text",
3086
+ "primaryKey": true,
3087
+ "notNull": true
3088
+ },
3089
+ "image": {
3090
+ "name": "image",
3091
+ "type": "text",
3092
+ "primaryKey": false,
3093
+ "notNull": false
3094
+ },
3095
+ "name": {
3096
+ "name": "name",
3097
+ "type": "text",
3098
+ "primaryKey": false,
3099
+ "notNull": true
3100
+ },
3101
+ "updated_at": {
3102
+ "name": "updated_at",
3103
+ "type": "timestamp",
3104
+ "primaryKey": false,
3105
+ "notNull": true,
3106
+ "default": "now()"
3107
+ }
3108
+ },
3109
+ "indexes": {},
3110
+ "foreignKeys": {},
3111
+ "compositePrimaryKeys": {},
3112
+ "uniqueConstraints": {
3113
+ "user_email_unique": {
3114
+ "name": "user_email_unique",
3115
+ "nullsNotDistinct": false,
3116
+ "columns": [
3117
+ "email"
3118
+ ]
3119
+ }
3120
+ },
3121
+ "policies": {},
3122
+ "checkConstraints": {},
3123
+ "isRLSEnabled": false
3124
+ },
3125
+ "public.UserCredit": {
3126
+ "name": "UserCredit",
3127
+ "schema": "",
3128
+ "columns": {
3129
+ "credits": {
3130
+ "name": "credits",
3131
+ "type": "integer",
3132
+ "primaryKey": false,
3133
+ "notNull": true,
3134
+ "default": 50
3135
+ },
3136
+ "userId": {
3137
+ "name": "userId",
3138
+ "type": "text",
3139
+ "primaryKey": true,
3140
+ "notNull": true
3141
+ }
3142
+ },
3143
+ "indexes": {},
3144
+ "foreignKeys": {
3145
+ "UserCredit_userId_user_id_fk": {
3146
+ "name": "UserCredit_userId_user_id_fk",
3147
+ "tableFrom": "UserCredit",
3148
+ "tableTo": "user",
3149
+ "columnsFrom": [
3150
+ "userId"
3151
+ ],
3152
+ "columnsTo": [
3153
+ "id"
3154
+ ],
3155
+ "onDelete": "cascade",
3156
+ "onUpdate": "no action"
3157
+ }
3158
+ },
3159
+ "compositePrimaryKeys": {},
3160
+ "uniqueConstraints": {},
3161
+ "policies": {},
3162
+ "checkConstraints": {},
3163
+ "isRLSEnabled": false
3164
+ },
3165
+ "public.UserModelPreference": {
3166
+ "name": "UserModelPreference",
3167
+ "schema": "",
3168
+ "columns": {
3169
+ "createdAt": {
3170
+ "name": "createdAt",
3171
+ "type": "timestamp",
3172
+ "primaryKey": false,
3173
+ "notNull": true,
3174
+ "default": "now()"
3175
+ },
3176
+ "enabled": {
3177
+ "name": "enabled",
3178
+ "type": "boolean",
3179
+ "primaryKey": false,
3180
+ "notNull": true
3181
+ },
3182
+ "modelId": {
3183
+ "name": "modelId",
3184
+ "type": "varchar(256)",
3185
+ "primaryKey": false,
3186
+ "notNull": true
3187
+ },
3188
+ "updatedAt": {
3189
+ "name": "updatedAt",
3190
+ "type": "timestamp",
3191
+ "primaryKey": false,
3192
+ "notNull": true,
3193
+ "default": "now()"
3194
+ },
3195
+ "userId": {
3196
+ "name": "userId",
3197
+ "type": "text",
3198
+ "primaryKey": false,
3199
+ "notNull": true
3200
+ }
3201
+ },
3202
+ "indexes": {
3203
+ "UserModelPreference_user_id_idx": {
3204
+ "name": "UserModelPreference_user_id_idx",
3205
+ "columns": [
3206
+ {
3207
+ "expression": "userId",
3208
+ "isExpression": false,
3209
+ "asc": true,
3210
+ "nulls": "last"
3211
+ }
3212
+ ],
3213
+ "isUnique": false,
3214
+ "concurrently": false,
3215
+ "method": "btree",
3216
+ "with": {}
3217
+ }
3218
+ },
3219
+ "foreignKeys": {
3220
+ "UserModelPreference_userId_user_id_fk": {
3221
+ "name": "UserModelPreference_userId_user_id_fk",
3222
+ "tableFrom": "UserModelPreference",
3223
+ "tableTo": "user",
3224
+ "columnsFrom": [
3225
+ "userId"
3226
+ ],
3227
+ "columnsTo": [
3228
+ "id"
3229
+ ],
3230
+ "onDelete": "cascade",
3231
+ "onUpdate": "no action"
3232
+ }
3233
+ },
3234
+ "compositePrimaryKeys": {
3235
+ "UserModelPreference_userId_modelId_pk": {
3236
+ "name": "UserModelPreference_userId_modelId_pk",
3237
+ "columns": [
3238
+ "userId",
3239
+ "modelId"
3240
+ ]
3241
+ }
3242
+ },
3243
+ "uniqueConstraints": {},
3244
+ "policies": {},
3245
+ "checkConstraints": {},
3246
+ "isRLSEnabled": false
3247
+ },
3248
+ "public.verification": {
3249
+ "name": "verification",
3250
+ "schema": "",
3251
+ "columns": {
3252
+ "created_at": {
3253
+ "name": "created_at",
3254
+ "type": "timestamp",
3255
+ "primaryKey": false,
3256
+ "notNull": true,
3257
+ "default": "now()"
3258
+ },
3259
+ "expires_at": {
3260
+ "name": "expires_at",
3261
+ "type": "timestamp",
3262
+ "primaryKey": false,
3263
+ "notNull": true
3264
+ },
3265
+ "id": {
3266
+ "name": "id",
3267
+ "type": "text",
3268
+ "primaryKey": true,
3269
+ "notNull": true
3270
+ },
3271
+ "identifier": {
3272
+ "name": "identifier",
3273
+ "type": "text",
3274
+ "primaryKey": false,
3275
+ "notNull": true
3276
+ },
3277
+ "updated_at": {
3278
+ "name": "updated_at",
3279
+ "type": "timestamp",
3280
+ "primaryKey": false,
3281
+ "notNull": true,
3282
+ "default": "now()"
3283
+ },
3284
+ "value": {
3285
+ "name": "value",
3286
+ "type": "text",
3287
+ "primaryKey": false,
3288
+ "notNull": true
3289
+ }
3290
+ },
3291
+ "indexes": {},
3292
+ "foreignKeys": {},
3293
+ "compositePrimaryKeys": {},
3294
+ "uniqueConstraints": {},
3295
+ "policies": {},
3296
+ "checkConstraints": {},
3297
+ "isRLSEnabled": false
3298
+ }
3299
+ },
3300
+ "enums": {},
3301
+ "schemas": {},
3302
+ "sequences": {},
3303
+ "roles": {},
3304
+ "policies": {},
3305
+ "views": {},
3306
+ "_meta": {
3307
+ "columns": {},
3308
+ "schemas": {},
3309
+ "tables": {}
3310
+ }
3311
+ }