chat-js 1.0.0-alpha.2 → 1.0.0-alpha.4

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