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