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

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 +4 -4
  2. package/dist/index.js +2625 -2666
  3. package/package.json +8 -3
  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,3686 @@
1
+ {
2
+ "id": "02ca1e85-1914-4a92-bb09-c406af8f3c99",
3
+ "prevId": "c22a3e57-2d4e-4a5f-929b-9d89fd78d936",
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.EveResponseGroup": {
1598
+ "name": "EveResponseGroup",
1599
+ "schema": "",
1600
+ "columns": {
1601
+ "candidateOperationIds": {
1602
+ "name": "candidateOperationIds",
1603
+ "type": "uuid[]",
1604
+ "primaryKey": false,
1605
+ "notNull": true
1606
+ },
1607
+ "candidates": {
1608
+ "name": "candidates",
1609
+ "type": "jsonb",
1610
+ "primaryKey": false,
1611
+ "notNull": false
1612
+ },
1613
+ "createdAt": {
1614
+ "name": "createdAt",
1615
+ "type": "timestamp",
1616
+ "primaryKey": false,
1617
+ "notNull": true,
1618
+ "default": "now()"
1619
+ },
1620
+ "deleted": {
1621
+ "name": "deleted",
1622
+ "type": "boolean",
1623
+ "primaryKey": false,
1624
+ "notNull": true,
1625
+ "default": false
1626
+ },
1627
+ "id": {
1628
+ "name": "id",
1629
+ "type": "uuid",
1630
+ "primaryKey": true,
1631
+ "notNull": true,
1632
+ "default": "gen_random_uuid()"
1633
+ },
1634
+ "inputHash": {
1635
+ "name": "inputHash",
1636
+ "type": "text",
1637
+ "primaryKey": false,
1638
+ "notNull": false
1639
+ },
1640
+ "operationId": {
1641
+ "name": "operationId",
1642
+ "type": "uuid",
1643
+ "primaryKey": false,
1644
+ "notNull": true
1645
+ },
1646
+ "ownerId": {
1647
+ "name": "ownerId",
1648
+ "type": "text",
1649
+ "primaryKey": false,
1650
+ "notNull": true
1651
+ },
1652
+ "sourceConversationId": {
1653
+ "name": "sourceConversationId",
1654
+ "type": "uuid",
1655
+ "primaryKey": false,
1656
+ "notNull": false
1657
+ },
1658
+ "sourceIdentityKnown": {
1659
+ "name": "sourceIdentityKnown",
1660
+ "type": "boolean",
1661
+ "primaryKey": false,
1662
+ "notNull": true,
1663
+ "default": false
1664
+ }
1665
+ },
1666
+ "indexes": {
1667
+ "EveResponseGroup_owner_operation": {
1668
+ "name": "EveResponseGroup_owner_operation",
1669
+ "columns": [
1670
+ {
1671
+ "expression": "ownerId",
1672
+ "isExpression": false,
1673
+ "asc": true,
1674
+ "nulls": "last"
1675
+ },
1676
+ {
1677
+ "expression": "operationId",
1678
+ "isExpression": false,
1679
+ "asc": true,
1680
+ "nulls": "last"
1681
+ }
1682
+ ],
1683
+ "isUnique": true,
1684
+ "concurrently": false,
1685
+ "method": "btree",
1686
+ "with": {}
1687
+ }
1688
+ },
1689
+ "foreignKeys": {
1690
+ "EveResponseGroup_ownerId_user_id_fk": {
1691
+ "name": "EveResponseGroup_ownerId_user_id_fk",
1692
+ "tableFrom": "EveResponseGroup",
1693
+ "tableTo": "user",
1694
+ "columnsFrom": [
1695
+ "ownerId"
1696
+ ],
1697
+ "columnsTo": [
1698
+ "id"
1699
+ ],
1700
+ "onDelete": "no action",
1701
+ "onUpdate": "no action"
1702
+ }
1703
+ },
1704
+ "compositePrimaryKeys": {},
1705
+ "uniqueConstraints": {},
1706
+ "policies": {},
1707
+ "checkConstraints": {},
1708
+ "isRLSEnabled": false
1709
+ },
1710
+ "public.EveStoredFile": {
1711
+ "name": "EveStoredFile",
1712
+ "schema": "",
1713
+ "columns": {
1714
+ "createdAt": {
1715
+ "name": "createdAt",
1716
+ "type": "timestamp",
1717
+ "primaryKey": false,
1718
+ "notNull": true,
1719
+ "default": "now()"
1720
+ },
1721
+ "key": {
1722
+ "name": "key",
1723
+ "type": "text",
1724
+ "primaryKey": true,
1725
+ "notNull": true
1726
+ },
1727
+ "ownerId": {
1728
+ "name": "ownerId",
1729
+ "type": "text",
1730
+ "primaryKey": false,
1731
+ "notNull": true
1732
+ },
1733
+ "state": {
1734
+ "name": "state",
1735
+ "type": "text",
1736
+ "primaryKey": false,
1737
+ "notNull": true,
1738
+ "default": "'active'"
1739
+ },
1740
+ "storageKey": {
1741
+ "name": "storageKey",
1742
+ "type": "text",
1743
+ "primaryKey": false,
1744
+ "notNull": true,
1745
+ "default": "gen_random_uuid()::text"
1746
+ }
1747
+ },
1748
+ "indexes": {
1749
+ "EveStoredFile_owner": {
1750
+ "name": "EveStoredFile_owner",
1751
+ "columns": [
1752
+ {
1753
+ "expression": "ownerId",
1754
+ "isExpression": false,
1755
+ "asc": true,
1756
+ "nulls": "last"
1757
+ }
1758
+ ],
1759
+ "isUnique": false,
1760
+ "concurrently": false,
1761
+ "method": "btree",
1762
+ "with": {}
1763
+ }
1764
+ },
1765
+ "foreignKeys": {
1766
+ "EveStoredFile_ownerId_user_id_fk": {
1767
+ "name": "EveStoredFile_ownerId_user_id_fk",
1768
+ "tableFrom": "EveStoredFile",
1769
+ "tableTo": "user",
1770
+ "columnsFrom": [
1771
+ "ownerId"
1772
+ ],
1773
+ "columnsTo": [
1774
+ "id"
1775
+ ],
1776
+ "onDelete": "no action",
1777
+ "onUpdate": "no action"
1778
+ }
1779
+ },
1780
+ "compositePrimaryKeys": {},
1781
+ "uniqueConstraints": {
1782
+ "EveStoredFile_storageKey_unique": {
1783
+ "name": "EveStoredFile_storageKey_unique",
1784
+ "nullsNotDistinct": false,
1785
+ "columns": [
1786
+ "storageKey"
1787
+ ]
1788
+ },
1789
+ "EveStoredFile_key_owner": {
1790
+ "name": "EveStoredFile_key_owner",
1791
+ "nullsNotDistinct": false,
1792
+ "columns": [
1793
+ "key",
1794
+ "ownerId"
1795
+ ]
1796
+ }
1797
+ },
1798
+ "policies": {},
1799
+ "checkConstraints": {},
1800
+ "isRLSEnabled": false
1801
+ },
1802
+ "public.EveSubagentSession": {
1803
+ "name": "EveSubagentSession",
1804
+ "schema": "",
1805
+ "columns": {
1806
+ "conversationId": {
1807
+ "name": "conversationId",
1808
+ "type": "uuid",
1809
+ "primaryKey": false,
1810
+ "notNull": true
1811
+ },
1812
+ "ownerId": {
1813
+ "name": "ownerId",
1814
+ "type": "text",
1815
+ "primaryKey": false,
1816
+ "notNull": true
1817
+ },
1818
+ "parentSessionId": {
1819
+ "name": "parentSessionId",
1820
+ "type": "text",
1821
+ "primaryKey": false,
1822
+ "notNull": true
1823
+ },
1824
+ "rootTurnId": {
1825
+ "name": "rootTurnId",
1826
+ "type": "text",
1827
+ "primaryKey": false,
1828
+ "notNull": true
1829
+ },
1830
+ "sessionId": {
1831
+ "name": "sessionId",
1832
+ "type": "text",
1833
+ "primaryKey": true,
1834
+ "notNull": true
1835
+ },
1836
+ "usageStreamIndex": {
1837
+ "name": "usageStreamIndex",
1838
+ "type": "integer",
1839
+ "primaryKey": false,
1840
+ "notNull": true,
1841
+ "default": 0
1842
+ }
1843
+ },
1844
+ "indexes": {
1845
+ "EveSubagentSession_conversation": {
1846
+ "name": "EveSubagentSession_conversation",
1847
+ "columns": [
1848
+ {
1849
+ "expression": "conversationId",
1850
+ "isExpression": false,
1851
+ "asc": true,
1852
+ "nulls": "last"
1853
+ }
1854
+ ],
1855
+ "isUnique": false,
1856
+ "concurrently": false,
1857
+ "method": "btree",
1858
+ "with": {}
1859
+ }
1860
+ },
1861
+ "foreignKeys": {
1862
+ "EveSubagentSession_conversation_owner_fk": {
1863
+ "name": "EveSubagentSession_conversation_owner_fk",
1864
+ "tableFrom": "EveSubagentSession",
1865
+ "tableTo": "EveConversation",
1866
+ "columnsFrom": [
1867
+ "conversationId",
1868
+ "ownerId"
1869
+ ],
1870
+ "columnsTo": [
1871
+ "id",
1872
+ "ownerId"
1873
+ ],
1874
+ "onDelete": "cascade",
1875
+ "onUpdate": "no action"
1876
+ }
1877
+ },
1878
+ "compositePrimaryKeys": {},
1879
+ "uniqueConstraints": {},
1880
+ "policies": {},
1881
+ "checkConstraints": {
1882
+ "EveSubagentSession_not_self": {
1883
+ "name": "EveSubagentSession_not_self",
1884
+ "value": "\"EveSubagentSession\".\"sessionId\" <> \"EveSubagentSession\".\"parentSessionId\""
1885
+ },
1886
+ "EveSubagentSession_cursor": {
1887
+ "name": "EveSubagentSession_cursor",
1888
+ "value": "\"EveSubagentSession\".\"usageStreamIndex\" >= 0"
1889
+ }
1890
+ },
1891
+ "isRLSEnabled": false
1892
+ },
1893
+ "public.EveUsage": {
1894
+ "name": "EveUsage",
1895
+ "schema": "",
1896
+ "columns": {
1897
+ "chargedCents": {
1898
+ "name": "chargedCents",
1899
+ "type": "integer",
1900
+ "primaryKey": false,
1901
+ "notNull": true,
1902
+ "default": 0
1903
+ },
1904
+ "costUsd": {
1905
+ "name": "costUsd",
1906
+ "type": "numeric(24, 12)",
1907
+ "primaryKey": false,
1908
+ "notNull": false
1909
+ },
1910
+ "createdAt": {
1911
+ "name": "createdAt",
1912
+ "type": "timestamp",
1913
+ "primaryKey": false,
1914
+ "notNull": true,
1915
+ "default": "now()"
1916
+ },
1917
+ "eventId": {
1918
+ "name": "eventId",
1919
+ "type": "text",
1920
+ "primaryKey": true,
1921
+ "notNull": true
1922
+ },
1923
+ "generationId": {
1924
+ "name": "generationId",
1925
+ "type": "text",
1926
+ "primaryKey": false,
1927
+ "notNull": false
1928
+ },
1929
+ "modelAttempt": {
1930
+ "name": "modelAttempt",
1931
+ "type": "jsonb",
1932
+ "primaryKey": false,
1933
+ "notNull": false
1934
+ },
1935
+ "ownerId": {
1936
+ "name": "ownerId",
1937
+ "type": "text",
1938
+ "primaryKey": false,
1939
+ "notNull": true
1940
+ },
1941
+ "sessionId": {
1942
+ "name": "sessionId",
1943
+ "type": "text",
1944
+ "primaryKey": false,
1945
+ "notNull": true
1946
+ },
1947
+ "turnId": {
1948
+ "name": "turnId",
1949
+ "type": "text",
1950
+ "primaryKey": false,
1951
+ "notNull": true
1952
+ }
1953
+ },
1954
+ "indexes": {
1955
+ "EveUsage_session_turn": {
1956
+ "name": "EveUsage_session_turn",
1957
+ "columns": [
1958
+ {
1959
+ "expression": "sessionId",
1960
+ "isExpression": false,
1961
+ "asc": true,
1962
+ "nulls": "last"
1963
+ },
1964
+ {
1965
+ "expression": "turnId",
1966
+ "isExpression": false,
1967
+ "asc": true,
1968
+ "nulls": "last"
1969
+ }
1970
+ ],
1971
+ "isUnique": false,
1972
+ "concurrently": false,
1973
+ "method": "btree",
1974
+ "with": {}
1975
+ },
1976
+ "EveUsage_unpriced_owner": {
1977
+ "name": "EveUsage_unpriced_owner",
1978
+ "columns": [
1979
+ {
1980
+ "expression": "ownerId",
1981
+ "isExpression": false,
1982
+ "asc": true,
1983
+ "nulls": "last"
1984
+ }
1985
+ ],
1986
+ "isUnique": false,
1987
+ "where": "\"EveUsage\".\"costUsd\" is null",
1988
+ "concurrently": false,
1989
+ "method": "btree",
1990
+ "with": {}
1991
+ }
1992
+ },
1993
+ "foreignKeys": {
1994
+ "EveUsage_ownerId_user_id_fk": {
1995
+ "name": "EveUsage_ownerId_user_id_fk",
1996
+ "tableFrom": "EveUsage",
1997
+ "tableTo": "user",
1998
+ "columnsFrom": [
1999
+ "ownerId"
2000
+ ],
2001
+ "columnsTo": [
2002
+ "id"
2003
+ ],
2004
+ "onDelete": "no action",
2005
+ "onUpdate": "no action"
2006
+ }
2007
+ },
2008
+ "compositePrimaryKeys": {},
2009
+ "uniqueConstraints": {},
2010
+ "policies": {},
2011
+ "checkConstraints": {},
2012
+ "isRLSEnabled": false
2013
+ },
2014
+ "public.EveWorkflowBackend": {
2015
+ "name": "EveWorkflowBackend",
2016
+ "schema": "",
2017
+ "columns": {
2018
+ "id": {
2019
+ "name": "id",
2020
+ "type": "integer",
2021
+ "primaryKey": true,
2022
+ "notNull": true,
2023
+ "default": 1
2024
+ },
2025
+ "world": {
2026
+ "name": "world",
2027
+ "type": "text",
2028
+ "primaryKey": false,
2029
+ "notNull": true
2030
+ }
2031
+ },
2032
+ "indexes": {},
2033
+ "foreignKeys": {},
2034
+ "compositePrimaryKeys": {},
2035
+ "uniqueConstraints": {},
2036
+ "policies": {},
2037
+ "checkConstraints": {
2038
+ "EveWorkflowBackend_singleton": {
2039
+ "name": "EveWorkflowBackend_singleton",
2040
+ "value": "\"EveWorkflowBackend\".\"id\" = 1"
2041
+ }
2042
+ },
2043
+ "isRLSEnabled": false
2044
+ },
2045
+ "public.EveWorkspace": {
2046
+ "name": "EveWorkspace",
2047
+ "schema": "",
2048
+ "columns": {
2049
+ "id": {
2050
+ "name": "id",
2051
+ "type": "uuid",
2052
+ "primaryKey": true,
2053
+ "notNull": true,
2054
+ "default": "gen_random_uuid()"
2055
+ },
2056
+ "ownerId": {
2057
+ "name": "ownerId",
2058
+ "type": "text",
2059
+ "primaryKey": false,
2060
+ "notNull": true
2061
+ },
2062
+ "state": {
2063
+ "name": "state",
2064
+ "type": "text",
2065
+ "primaryKey": false,
2066
+ "notNull": true,
2067
+ "default": "'active'"
2068
+ },
2069
+ "activeOperationId": {
2070
+ "name": "activeOperationId",
2071
+ "type": "uuid",
2072
+ "primaryKey": false,
2073
+ "notNull": false
2074
+ }
2075
+ },
2076
+ "indexes": {},
2077
+ "foreignKeys": {
2078
+ "EveWorkspace_ownerId_user_id_fk": {
2079
+ "name": "EveWorkspace_ownerId_user_id_fk",
2080
+ "tableFrom": "EveWorkspace",
2081
+ "tableTo": "user",
2082
+ "columnsFrom": [
2083
+ "ownerId"
2084
+ ],
2085
+ "columnsTo": [
2086
+ "id"
2087
+ ],
2088
+ "onDelete": "cascade",
2089
+ "onUpdate": "no action"
2090
+ }
2091
+ },
2092
+ "compositePrimaryKeys": {},
2093
+ "uniqueConstraints": {
2094
+ "EveWorkspace_id_owner": {
2095
+ "name": "EveWorkspace_id_owner",
2096
+ "nullsNotDistinct": false,
2097
+ "columns": [
2098
+ "id",
2099
+ "ownerId"
2100
+ ]
2101
+ }
2102
+ },
2103
+ "policies": {},
2104
+ "checkConstraints": {},
2105
+ "isRLSEnabled": false
2106
+ },
2107
+ "public.session": {
2108
+ "name": "session",
2109
+ "schema": "",
2110
+ "columns": {
2111
+ "created_at": {
2112
+ "name": "created_at",
2113
+ "type": "timestamp",
2114
+ "primaryKey": false,
2115
+ "notNull": true,
2116
+ "default": "now()"
2117
+ },
2118
+ "expires_at": {
2119
+ "name": "expires_at",
2120
+ "type": "timestamp",
2121
+ "primaryKey": false,
2122
+ "notNull": true
2123
+ },
2124
+ "id": {
2125
+ "name": "id",
2126
+ "type": "text",
2127
+ "primaryKey": true,
2128
+ "notNull": true
2129
+ },
2130
+ "ip_address": {
2131
+ "name": "ip_address",
2132
+ "type": "text",
2133
+ "primaryKey": false,
2134
+ "notNull": false
2135
+ },
2136
+ "token": {
2137
+ "name": "token",
2138
+ "type": "text",
2139
+ "primaryKey": false,
2140
+ "notNull": true
2141
+ },
2142
+ "updated_at": {
2143
+ "name": "updated_at",
2144
+ "type": "timestamp",
2145
+ "primaryKey": false,
2146
+ "notNull": true
2147
+ },
2148
+ "user_agent": {
2149
+ "name": "user_agent",
2150
+ "type": "text",
2151
+ "primaryKey": false,
2152
+ "notNull": false
2153
+ },
2154
+ "user_id": {
2155
+ "name": "user_id",
2156
+ "type": "text",
2157
+ "primaryKey": false,
2158
+ "notNull": true
2159
+ }
2160
+ },
2161
+ "indexes": {},
2162
+ "foreignKeys": {
2163
+ "session_user_id_user_id_fk": {
2164
+ "name": "session_user_id_user_id_fk",
2165
+ "tableFrom": "session",
2166
+ "tableTo": "user",
2167
+ "columnsFrom": [
2168
+ "user_id"
2169
+ ],
2170
+ "columnsTo": [
2171
+ "id"
2172
+ ],
2173
+ "onDelete": "cascade",
2174
+ "onUpdate": "no action"
2175
+ }
2176
+ },
2177
+ "compositePrimaryKeys": {},
2178
+ "uniqueConstraints": {
2179
+ "session_token_unique": {
2180
+ "name": "session_token_unique",
2181
+ "nullsNotDistinct": false,
2182
+ "columns": [
2183
+ "token"
2184
+ ]
2185
+ }
2186
+ },
2187
+ "policies": {},
2188
+ "checkConstraints": {},
2189
+ "isRLSEnabled": false
2190
+ },
2191
+ "public.user": {
2192
+ "name": "user",
2193
+ "schema": "",
2194
+ "columns": {
2195
+ "created_at": {
2196
+ "name": "created_at",
2197
+ "type": "timestamp",
2198
+ "primaryKey": false,
2199
+ "notNull": true,
2200
+ "default": "now()"
2201
+ },
2202
+ "email": {
2203
+ "name": "email",
2204
+ "type": "text",
2205
+ "primaryKey": false,
2206
+ "notNull": true
2207
+ },
2208
+ "email_verified": {
2209
+ "name": "email_verified",
2210
+ "type": "boolean",
2211
+ "primaryKey": false,
2212
+ "notNull": true,
2213
+ "default": false
2214
+ },
2215
+ "eve_usage_reconciled_at": {
2216
+ "name": "eve_usage_reconciled_at",
2217
+ "type": "timestamp",
2218
+ "primaryKey": false,
2219
+ "notNull": false
2220
+ },
2221
+ "id": {
2222
+ "name": "id",
2223
+ "type": "text",
2224
+ "primaryKey": true,
2225
+ "notNull": true
2226
+ },
2227
+ "image": {
2228
+ "name": "image",
2229
+ "type": "text",
2230
+ "primaryKey": false,
2231
+ "notNull": false
2232
+ },
2233
+ "name": {
2234
+ "name": "name",
2235
+ "type": "text",
2236
+ "primaryKey": false,
2237
+ "notNull": true
2238
+ },
2239
+ "updated_at": {
2240
+ "name": "updated_at",
2241
+ "type": "timestamp",
2242
+ "primaryKey": false,
2243
+ "notNull": true,
2244
+ "default": "now()"
2245
+ }
2246
+ },
2247
+ "indexes": {},
2248
+ "foreignKeys": {},
2249
+ "compositePrimaryKeys": {},
2250
+ "uniqueConstraints": {
2251
+ "user_email_unique": {
2252
+ "name": "user_email_unique",
2253
+ "nullsNotDistinct": false,
2254
+ "columns": [
2255
+ "email"
2256
+ ]
2257
+ }
2258
+ },
2259
+ "policies": {},
2260
+ "checkConstraints": {},
2261
+ "isRLSEnabled": false
2262
+ },
2263
+ "public.verification": {
2264
+ "name": "verification",
2265
+ "schema": "",
2266
+ "columns": {
2267
+ "created_at": {
2268
+ "name": "created_at",
2269
+ "type": "timestamp",
2270
+ "primaryKey": false,
2271
+ "notNull": true,
2272
+ "default": "now()"
2273
+ },
2274
+ "expires_at": {
2275
+ "name": "expires_at",
2276
+ "type": "timestamp",
2277
+ "primaryKey": false,
2278
+ "notNull": true
2279
+ },
2280
+ "id": {
2281
+ "name": "id",
2282
+ "type": "text",
2283
+ "primaryKey": true,
2284
+ "notNull": true
2285
+ },
2286
+ "identifier": {
2287
+ "name": "identifier",
2288
+ "type": "text",
2289
+ "primaryKey": false,
2290
+ "notNull": true
2291
+ },
2292
+ "updated_at": {
2293
+ "name": "updated_at",
2294
+ "type": "timestamp",
2295
+ "primaryKey": false,
2296
+ "notNull": true,
2297
+ "default": "now()"
2298
+ },
2299
+ "value": {
2300
+ "name": "value",
2301
+ "type": "text",
2302
+ "primaryKey": false,
2303
+ "notNull": true
2304
+ }
2305
+ },
2306
+ "indexes": {},
2307
+ "foreignKeys": {},
2308
+ "compositePrimaryKeys": {},
2309
+ "uniqueConstraints": {},
2310
+ "policies": {},
2311
+ "checkConstraints": {},
2312
+ "isRLSEnabled": false
2313
+ },
2314
+ "public.UserCredit": {
2315
+ "name": "UserCredit",
2316
+ "schema": "",
2317
+ "columns": {
2318
+ "credits": {
2319
+ "name": "credits",
2320
+ "type": "integer",
2321
+ "primaryKey": false,
2322
+ "notNull": true,
2323
+ "default": 50
2324
+ },
2325
+ "userId": {
2326
+ "name": "userId",
2327
+ "type": "text",
2328
+ "primaryKey": true,
2329
+ "notNull": true
2330
+ }
2331
+ },
2332
+ "indexes": {},
2333
+ "foreignKeys": {
2334
+ "UserCredit_userId_user_id_fk": {
2335
+ "name": "UserCredit_userId_user_id_fk",
2336
+ "tableFrom": "UserCredit",
2337
+ "tableTo": "user",
2338
+ "columnsFrom": [
2339
+ "userId"
2340
+ ],
2341
+ "columnsTo": [
2342
+ "id"
2343
+ ],
2344
+ "onDelete": "cascade",
2345
+ "onUpdate": "no action"
2346
+ }
2347
+ },
2348
+ "compositePrimaryKeys": {},
2349
+ "uniqueConstraints": {},
2350
+ "policies": {},
2351
+ "checkConstraints": {},
2352
+ "isRLSEnabled": false
2353
+ },
2354
+ "public.EveVote": {
2355
+ "name": "EveVote",
2356
+ "schema": "",
2357
+ "columns": {
2358
+ "conversationId": {
2359
+ "name": "conversationId",
2360
+ "type": "uuid",
2361
+ "primaryKey": false,
2362
+ "notNull": true
2363
+ },
2364
+ "isUpvoted": {
2365
+ "name": "isUpvoted",
2366
+ "type": "boolean",
2367
+ "primaryKey": false,
2368
+ "notNull": true
2369
+ },
2370
+ "messageId": {
2371
+ "name": "messageId",
2372
+ "type": "text",
2373
+ "primaryKey": false,
2374
+ "notNull": true
2375
+ }
2376
+ },
2377
+ "indexes": {},
2378
+ "foreignKeys": {
2379
+ "EveVote_conversationId_EveConversation_id_fk": {
2380
+ "name": "EveVote_conversationId_EveConversation_id_fk",
2381
+ "tableFrom": "EveVote",
2382
+ "tableTo": "EveConversation",
2383
+ "columnsFrom": [
2384
+ "conversationId"
2385
+ ],
2386
+ "columnsTo": [
2387
+ "id"
2388
+ ],
2389
+ "onDelete": "cascade",
2390
+ "onUpdate": "no action"
2391
+ }
2392
+ },
2393
+ "compositePrimaryKeys": {
2394
+ "EveVote_conversationId_messageId_pk": {
2395
+ "name": "EveVote_conversationId_messageId_pk",
2396
+ "columns": [
2397
+ "conversationId",
2398
+ "messageId"
2399
+ ]
2400
+ }
2401
+ },
2402
+ "uniqueConstraints": {},
2403
+ "policies": {},
2404
+ "checkConstraints": {},
2405
+ "isRLSEnabled": false
2406
+ },
2407
+ "public.EveFollowup": {
2408
+ "name": "EveFollowup",
2409
+ "schema": "",
2410
+ "columns": {
2411
+ "chatId": {
2412
+ "name": "chatId",
2413
+ "type": "uuid",
2414
+ "primaryKey": false,
2415
+ "notNull": true
2416
+ },
2417
+ "ownerId": {
2418
+ "name": "ownerId",
2419
+ "type": "text",
2420
+ "primaryKey": false,
2421
+ "notNull": true
2422
+ },
2423
+ "turnId": {
2424
+ "name": "turnId",
2425
+ "type": "text",
2426
+ "primaryKey": false,
2427
+ "notNull": true
2428
+ },
2429
+ "sessionId": {
2430
+ "name": "sessionId",
2431
+ "type": "text",
2432
+ "primaryKey": false,
2433
+ "notNull": true
2434
+ },
2435
+ "eventId": {
2436
+ "name": "eventId",
2437
+ "type": "text",
2438
+ "primaryKey": true,
2439
+ "notNull": true
2440
+ },
2441
+ "suggestions": {
2442
+ "name": "suggestions",
2443
+ "type": "jsonb",
2444
+ "primaryKey": false,
2445
+ "notNull": false
2446
+ }
2447
+ },
2448
+ "indexes": {
2449
+ "EveFollowup_chat": {
2450
+ "name": "EveFollowup_chat",
2451
+ "columns": [
2452
+ {
2453
+ "expression": "chatId",
2454
+ "isExpression": false,
2455
+ "asc": true,
2456
+ "nulls": "last"
2457
+ }
2458
+ ],
2459
+ "isUnique": false,
2460
+ "concurrently": false,
2461
+ "method": "btree",
2462
+ "with": {}
2463
+ }
2464
+ },
2465
+ "foreignKeys": {
2466
+ "EveFollowup_chatId_ownerId_EveChat_id_ownerId_fk": {
2467
+ "name": "EveFollowup_chatId_ownerId_EveChat_id_ownerId_fk",
2468
+ "tableFrom": "EveFollowup",
2469
+ "tableTo": "EveChat",
2470
+ "columnsFrom": [
2471
+ "chatId",
2472
+ "ownerId"
2473
+ ],
2474
+ "columnsTo": [
2475
+ "id",
2476
+ "ownerId"
2477
+ ],
2478
+ "onDelete": "cascade",
2479
+ "onUpdate": "no action"
2480
+ }
2481
+ },
2482
+ "compositePrimaryKeys": {},
2483
+ "uniqueConstraints": {
2484
+ "EveFollowup_sessionId_turnId_unique": {
2485
+ "name": "EveFollowup_sessionId_turnId_unique",
2486
+ "nullsNotDistinct": false,
2487
+ "columns": [
2488
+ "sessionId",
2489
+ "turnId"
2490
+ ]
2491
+ }
2492
+ },
2493
+ "policies": {},
2494
+ "checkConstraints": {},
2495
+ "isRLSEnabled": false
2496
+ },
2497
+ "public.GuestRuntimeRate": {
2498
+ "name": "GuestRuntimeRate",
2499
+ "schema": "",
2500
+ "columns": {
2501
+ "ipHash": {
2502
+ "name": "ipHash",
2503
+ "type": "text",
2504
+ "primaryKey": false,
2505
+ "notNull": true
2506
+ },
2507
+ "kind": {
2508
+ "name": "kind",
2509
+ "type": "text",
2510
+ "primaryKey": false,
2511
+ "notNull": true
2512
+ },
2513
+ "startsAt": {
2514
+ "name": "startsAt",
2515
+ "type": "timestamp with time zone",
2516
+ "primaryKey": false,
2517
+ "notNull": true
2518
+ },
2519
+ "requests": {
2520
+ "name": "requests",
2521
+ "type": "integer",
2522
+ "primaryKey": false,
2523
+ "notNull": true,
2524
+ "default": 0
2525
+ }
2526
+ },
2527
+ "indexes": {},
2528
+ "foreignKeys": {},
2529
+ "compositePrimaryKeys": {
2530
+ "GuestRuntimeRate_ipHash_kind_startsAt_pk": {
2531
+ "name": "GuestRuntimeRate_ipHash_kind_startsAt_pk",
2532
+ "columns": [
2533
+ "ipHash",
2534
+ "kind",
2535
+ "startsAt"
2536
+ ]
2537
+ }
2538
+ },
2539
+ "uniqueConstraints": {},
2540
+ "policies": {},
2541
+ "checkConstraints": {
2542
+ "GuestRuntimeRate_requests": {
2543
+ "name": "GuestRuntimeRate_requests",
2544
+ "value": "\"GuestRuntimeRate\".\"requests\" >= 0"
2545
+ },
2546
+ "GuestRuntimeRate_kind": {
2547
+ "name": "GuestRuntimeRate_kind",
2548
+ "value": "\"GuestRuntimeRate\".\"kind\" in ('session', 'message')"
2549
+ }
2550
+ },
2551
+ "isRLSEnabled": false
2552
+ },
2553
+ "public.GuestRuntimeSession": {
2554
+ "name": "GuestRuntimeSession",
2555
+ "schema": "",
2556
+ "columns": {
2557
+ "id": {
2558
+ "name": "id",
2559
+ "type": "uuid",
2560
+ "primaryKey": true,
2561
+ "notNull": true,
2562
+ "default": "gen_random_uuid()"
2563
+ },
2564
+ "ownerId": {
2565
+ "name": "ownerId",
2566
+ "type": "text",
2567
+ "primaryKey": false,
2568
+ "notNull": true
2569
+ },
2570
+ "sessionId": {
2571
+ "name": "sessionId",
2572
+ "type": "text",
2573
+ "primaryKey": false,
2574
+ "notNull": false
2575
+ },
2576
+ "modelId": {
2577
+ "name": "modelId",
2578
+ "type": "text",
2579
+ "primaryKey": false,
2580
+ "notNull": true
2581
+ },
2582
+ "ipHash": {
2583
+ "name": "ipHash",
2584
+ "type": "text",
2585
+ "primaryKey": false,
2586
+ "notNull": true
2587
+ },
2588
+ "policyVersion": {
2589
+ "name": "policyVersion",
2590
+ "type": "integer",
2591
+ "primaryKey": false,
2592
+ "notNull": true,
2593
+ "default": 1
2594
+ },
2595
+ "state": {
2596
+ "name": "state",
2597
+ "type": "text",
2598
+ "primaryKey": false,
2599
+ "notNull": true,
2600
+ "default": "'active'"
2601
+ },
2602
+ "createdAt": {
2603
+ "name": "createdAt",
2604
+ "type": "timestamp with time zone",
2605
+ "primaryKey": false,
2606
+ "notNull": true,
2607
+ "default": "now()"
2608
+ },
2609
+ "expiresAt": {
2610
+ "name": "expiresAt",
2611
+ "type": "timestamp with time zone",
2612
+ "primaryKey": false,
2613
+ "notNull": true,
2614
+ "default": "now() + interval '24 hours'"
2615
+ },
2616
+ "credentialExpiresAt": {
2617
+ "name": "credentialExpiresAt",
2618
+ "type": "timestamp with time zone",
2619
+ "primaryKey": false,
2620
+ "notNull": true
2621
+ },
2622
+ "inputCharactersUsed": {
2623
+ "name": "inputCharactersUsed",
2624
+ "type": "integer",
2625
+ "primaryKey": false,
2626
+ "notNull": true,
2627
+ "default": 0
2628
+ },
2629
+ "cleanupAttemptedAt": {
2630
+ "name": "cleanupAttemptedAt",
2631
+ "type": "timestamp with time zone",
2632
+ "primaryKey": false,
2633
+ "notNull": false
2634
+ },
2635
+ "deletedAt": {
2636
+ "name": "deletedAt",
2637
+ "type": "timestamp with time zone",
2638
+ "primaryKey": false,
2639
+ "notNull": false
2640
+ }
2641
+ },
2642
+ "indexes": {
2643
+ "GuestRuntimeSession_cleanup_idx": {
2644
+ "name": "GuestRuntimeSession_cleanup_idx",
2645
+ "columns": [
2646
+ {
2647
+ "expression": "state",
2648
+ "isExpression": false,
2649
+ "asc": true,
2650
+ "nulls": "last"
2651
+ },
2652
+ {
2653
+ "expression": "expiresAt",
2654
+ "isExpression": false,
2655
+ "asc": true,
2656
+ "nulls": "last"
2657
+ }
2658
+ ],
2659
+ "isUnique": false,
2660
+ "concurrently": false,
2661
+ "method": "btree",
2662
+ "with": {}
2663
+ }
2664
+ },
2665
+ "foreignKeys": {},
2666
+ "compositePrimaryKeys": {},
2667
+ "uniqueConstraints": {
2668
+ "GuestRuntimeSession_ownerId_unique": {
2669
+ "name": "GuestRuntimeSession_ownerId_unique",
2670
+ "nullsNotDistinct": false,
2671
+ "columns": [
2672
+ "ownerId"
2673
+ ]
2674
+ },
2675
+ "GuestRuntimeSession_sessionId_unique": {
2676
+ "name": "GuestRuntimeSession_sessionId_unique",
2677
+ "nullsNotDistinct": false,
2678
+ "columns": [
2679
+ "sessionId"
2680
+ ]
2681
+ }
2682
+ },
2683
+ "policies": {},
2684
+ "checkConstraints": {
2685
+ "GuestRuntimeSession_state": {
2686
+ "name": "GuestRuntimeSession_state",
2687
+ "value": "\"GuestRuntimeSession\".\"state\" in ('active', 'deleting', 'deleted')"
2688
+ },
2689
+ "GuestRuntimeSession_ip_hash": {
2690
+ "name": "GuestRuntimeSession_ip_hash",
2691
+ "value": "\"GuestRuntimeSession\".\"ipHash\" ~ '^[0-9a-f]{64}$'"
2692
+ },
2693
+ "GuestRuntimeSession_expiry": {
2694
+ "name": "GuestRuntimeSession_expiry",
2695
+ "value": "\"GuestRuntimeSession\".\"expiresAt\" = \"GuestRuntimeSession\".\"createdAt\" + interval '24 hours'"
2696
+ }
2697
+ },
2698
+ "isRLSEnabled": false
2699
+ },
2700
+ "public.McpConnector": {
2701
+ "name": "McpConnector",
2702
+ "schema": "",
2703
+ "columns": {
2704
+ "createdAt": {
2705
+ "name": "createdAt",
2706
+ "type": "timestamp",
2707
+ "primaryKey": false,
2708
+ "notNull": true,
2709
+ "default": "now()"
2710
+ },
2711
+ "enabled": {
2712
+ "name": "enabled",
2713
+ "type": "boolean",
2714
+ "primaryKey": false,
2715
+ "notNull": true,
2716
+ "default": true
2717
+ },
2718
+ "id": {
2719
+ "name": "id",
2720
+ "type": "uuid",
2721
+ "primaryKey": true,
2722
+ "notNull": true,
2723
+ "default": "gen_random_uuid()"
2724
+ },
2725
+ "name": {
2726
+ "name": "name",
2727
+ "type": "varchar(256)",
2728
+ "primaryKey": false,
2729
+ "notNull": true
2730
+ },
2731
+ "nameId": {
2732
+ "name": "nameId",
2733
+ "type": "varchar(256)",
2734
+ "primaryKey": false,
2735
+ "notNull": true
2736
+ },
2737
+ "oauthClientId": {
2738
+ "name": "oauthClientId",
2739
+ "type": "text",
2740
+ "primaryKey": false,
2741
+ "notNull": false
2742
+ },
2743
+ "oauthClientSecret": {
2744
+ "name": "oauthClientSecret",
2745
+ "type": "text",
2746
+ "primaryKey": false,
2747
+ "notNull": false
2748
+ },
2749
+ "requireApproval": {
2750
+ "name": "requireApproval",
2751
+ "type": "boolean",
2752
+ "primaryKey": false,
2753
+ "notNull": true,
2754
+ "default": false
2755
+ },
2756
+ "type": {
2757
+ "name": "type",
2758
+ "type": "varchar",
2759
+ "primaryKey": false,
2760
+ "notNull": true,
2761
+ "default": "'http'"
2762
+ },
2763
+ "updatedAt": {
2764
+ "name": "updatedAt",
2765
+ "type": "timestamp",
2766
+ "primaryKey": false,
2767
+ "notNull": true,
2768
+ "default": "now()"
2769
+ },
2770
+ "url": {
2771
+ "name": "url",
2772
+ "type": "text",
2773
+ "primaryKey": false,
2774
+ "notNull": true
2775
+ },
2776
+ "userId": {
2777
+ "name": "userId",
2778
+ "type": "text",
2779
+ "primaryKey": false,
2780
+ "notNull": false
2781
+ }
2782
+ },
2783
+ "indexes": {
2784
+ "McpConnector_user_id_idx": {
2785
+ "name": "McpConnector_user_id_idx",
2786
+ "columns": [
2787
+ {
2788
+ "expression": "userId",
2789
+ "isExpression": false,
2790
+ "asc": true,
2791
+ "nulls": "last"
2792
+ }
2793
+ ],
2794
+ "isUnique": false,
2795
+ "concurrently": false,
2796
+ "method": "btree",
2797
+ "with": {}
2798
+ },
2799
+ "McpConnector_user_name_id_idx": {
2800
+ "name": "McpConnector_user_name_id_idx",
2801
+ "columns": [
2802
+ {
2803
+ "expression": "userId",
2804
+ "isExpression": false,
2805
+ "asc": true,
2806
+ "nulls": "last"
2807
+ },
2808
+ {
2809
+ "expression": "nameId",
2810
+ "isExpression": false,
2811
+ "asc": true,
2812
+ "nulls": "last"
2813
+ }
2814
+ ],
2815
+ "isUnique": false,
2816
+ "concurrently": false,
2817
+ "method": "btree",
2818
+ "with": {}
2819
+ },
2820
+ "McpConnector_user_name_id_unique": {
2821
+ "name": "McpConnector_user_name_id_unique",
2822
+ "columns": [
2823
+ {
2824
+ "expression": "userId",
2825
+ "isExpression": false,
2826
+ "asc": true,
2827
+ "nulls": "last"
2828
+ },
2829
+ {
2830
+ "expression": "nameId",
2831
+ "isExpression": false,
2832
+ "asc": true,
2833
+ "nulls": "last"
2834
+ }
2835
+ ],
2836
+ "isUnique": true,
2837
+ "concurrently": false,
2838
+ "method": "btree",
2839
+ "with": {}
2840
+ }
2841
+ },
2842
+ "foreignKeys": {
2843
+ "McpConnector_userId_user_id_fk": {
2844
+ "name": "McpConnector_userId_user_id_fk",
2845
+ "tableFrom": "McpConnector",
2846
+ "tableTo": "user",
2847
+ "columnsFrom": [
2848
+ "userId"
2849
+ ],
2850
+ "columnsTo": [
2851
+ "id"
2852
+ ],
2853
+ "onDelete": "cascade",
2854
+ "onUpdate": "no action"
2855
+ }
2856
+ },
2857
+ "compositePrimaryKeys": {},
2858
+ "uniqueConstraints": {},
2859
+ "policies": {},
2860
+ "checkConstraints": {},
2861
+ "isRLSEnabled": false
2862
+ },
2863
+ "public.McpOAuthSession": {
2864
+ "name": "McpOAuthSession",
2865
+ "schema": "",
2866
+ "columns": {
2867
+ "clientInfo": {
2868
+ "name": "clientInfo",
2869
+ "type": "text",
2870
+ "primaryKey": false,
2871
+ "notNull": false
2872
+ },
2873
+ "codeVerifier": {
2874
+ "name": "codeVerifier",
2875
+ "type": "text",
2876
+ "primaryKey": false,
2877
+ "notNull": false
2878
+ },
2879
+ "createdAt": {
2880
+ "name": "createdAt",
2881
+ "type": "timestamp",
2882
+ "primaryKey": false,
2883
+ "notNull": true,
2884
+ "default": "now()"
2885
+ },
2886
+ "id": {
2887
+ "name": "id",
2888
+ "type": "uuid",
2889
+ "primaryKey": true,
2890
+ "notNull": true,
2891
+ "default": "gen_random_uuid()"
2892
+ },
2893
+ "mcpConnectorId": {
2894
+ "name": "mcpConnectorId",
2895
+ "type": "uuid",
2896
+ "primaryKey": false,
2897
+ "notNull": true
2898
+ },
2899
+ "serverUrl": {
2900
+ "name": "serverUrl",
2901
+ "type": "text",
2902
+ "primaryKey": false,
2903
+ "notNull": true
2904
+ },
2905
+ "state": {
2906
+ "name": "state",
2907
+ "type": "text",
2908
+ "primaryKey": false,
2909
+ "notNull": false
2910
+ },
2911
+ "tokens": {
2912
+ "name": "tokens",
2913
+ "type": "text",
2914
+ "primaryKey": false,
2915
+ "notNull": false
2916
+ },
2917
+ "updatedAt": {
2918
+ "name": "updatedAt",
2919
+ "type": "timestamp",
2920
+ "primaryKey": false,
2921
+ "notNull": true,
2922
+ "default": "now()"
2923
+ }
2924
+ },
2925
+ "indexes": {
2926
+ "McpOAuthSession_connector_idx": {
2927
+ "name": "McpOAuthSession_connector_idx",
2928
+ "columns": [
2929
+ {
2930
+ "expression": "mcpConnectorId",
2931
+ "isExpression": false,
2932
+ "asc": true,
2933
+ "nulls": "last"
2934
+ }
2935
+ ],
2936
+ "isUnique": false,
2937
+ "concurrently": false,
2938
+ "method": "btree",
2939
+ "with": {}
2940
+ },
2941
+ "McpOAuthSession_state_idx": {
2942
+ "name": "McpOAuthSession_state_idx",
2943
+ "columns": [
2944
+ {
2945
+ "expression": "state",
2946
+ "isExpression": false,
2947
+ "asc": true,
2948
+ "nulls": "last"
2949
+ }
2950
+ ],
2951
+ "isUnique": false,
2952
+ "concurrently": false,
2953
+ "method": "btree",
2954
+ "with": {}
2955
+ }
2956
+ },
2957
+ "foreignKeys": {
2958
+ "McpOAuthSession_mcpConnectorId_McpConnector_id_fk": {
2959
+ "name": "McpOAuthSession_mcpConnectorId_McpConnector_id_fk",
2960
+ "tableFrom": "McpOAuthSession",
2961
+ "tableTo": "McpConnector",
2962
+ "columnsFrom": [
2963
+ "mcpConnectorId"
2964
+ ],
2965
+ "columnsTo": [
2966
+ "id"
2967
+ ],
2968
+ "onDelete": "cascade",
2969
+ "onUpdate": "no action"
2970
+ }
2971
+ },
2972
+ "compositePrimaryKeys": {},
2973
+ "uniqueConstraints": {
2974
+ "McpOAuthSession_state_unique": {
2975
+ "name": "McpOAuthSession_state_unique",
2976
+ "nullsNotDistinct": false,
2977
+ "columns": [
2978
+ "state"
2979
+ ]
2980
+ }
2981
+ },
2982
+ "policies": {},
2983
+ "checkConstraints": {},
2984
+ "isRLSEnabled": false
2985
+ },
2986
+ "public.UserModelPreference": {
2987
+ "name": "UserModelPreference",
2988
+ "schema": "",
2989
+ "columns": {
2990
+ "createdAt": {
2991
+ "name": "createdAt",
2992
+ "type": "timestamp",
2993
+ "primaryKey": false,
2994
+ "notNull": true,
2995
+ "default": "now()"
2996
+ },
2997
+ "enabled": {
2998
+ "name": "enabled",
2999
+ "type": "boolean",
3000
+ "primaryKey": false,
3001
+ "notNull": true
3002
+ },
3003
+ "modelId": {
3004
+ "name": "modelId",
3005
+ "type": "varchar(256)",
3006
+ "primaryKey": false,
3007
+ "notNull": true
3008
+ },
3009
+ "updatedAt": {
3010
+ "name": "updatedAt",
3011
+ "type": "timestamp",
3012
+ "primaryKey": false,
3013
+ "notNull": true,
3014
+ "default": "now()"
3015
+ },
3016
+ "userId": {
3017
+ "name": "userId",
3018
+ "type": "text",
3019
+ "primaryKey": false,
3020
+ "notNull": true
3021
+ }
3022
+ },
3023
+ "indexes": {
3024
+ "UserModelPreference_user_id_idx": {
3025
+ "name": "UserModelPreference_user_id_idx",
3026
+ "columns": [
3027
+ {
3028
+ "expression": "userId",
3029
+ "isExpression": false,
3030
+ "asc": true,
3031
+ "nulls": "last"
3032
+ }
3033
+ ],
3034
+ "isUnique": false,
3035
+ "concurrently": false,
3036
+ "method": "btree",
3037
+ "with": {}
3038
+ }
3039
+ },
3040
+ "foreignKeys": {
3041
+ "UserModelPreference_userId_user_id_fk": {
3042
+ "name": "UserModelPreference_userId_user_id_fk",
3043
+ "tableFrom": "UserModelPreference",
3044
+ "tableTo": "user",
3045
+ "columnsFrom": [
3046
+ "userId"
3047
+ ],
3048
+ "columnsTo": [
3049
+ "id"
3050
+ ],
3051
+ "onDelete": "cascade",
3052
+ "onUpdate": "no action"
3053
+ }
3054
+ },
3055
+ "compositePrimaryKeys": {
3056
+ "UserModelPreference_userId_modelId_pk": {
3057
+ "name": "UserModelPreference_userId_modelId_pk",
3058
+ "columns": [
3059
+ "userId",
3060
+ "modelId"
3061
+ ]
3062
+ }
3063
+ },
3064
+ "uniqueConstraints": {},
3065
+ "policies": {},
3066
+ "checkConstraints": {},
3067
+ "isRLSEnabled": false
3068
+ },
3069
+ "public.EveChatProject": {
3070
+ "name": "EveChatProject",
3071
+ "schema": "",
3072
+ "columns": {
3073
+ "chatId": {
3074
+ "name": "chatId",
3075
+ "type": "uuid",
3076
+ "primaryKey": true,
3077
+ "notNull": true
3078
+ },
3079
+ "ownerId": {
3080
+ "name": "ownerId",
3081
+ "type": "text",
3082
+ "primaryKey": false,
3083
+ "notNull": true
3084
+ },
3085
+ "projectId": {
3086
+ "name": "projectId",
3087
+ "type": "uuid",
3088
+ "primaryKey": false,
3089
+ "notNull": true
3090
+ }
3091
+ },
3092
+ "indexes": {
3093
+ "EveChatProject_project": {
3094
+ "name": "EveChatProject_project",
3095
+ "columns": [
3096
+ {
3097
+ "expression": "projectId",
3098
+ "isExpression": false,
3099
+ "asc": true,
3100
+ "nulls": "last"
3101
+ }
3102
+ ],
3103
+ "isUnique": false,
3104
+ "concurrently": false,
3105
+ "method": "btree",
3106
+ "with": {}
3107
+ }
3108
+ },
3109
+ "foreignKeys": {
3110
+ "EveChatProject_chatId_ownerId_EveChat_id_ownerId_fk": {
3111
+ "name": "EveChatProject_chatId_ownerId_EveChat_id_ownerId_fk",
3112
+ "tableFrom": "EveChatProject",
3113
+ "tableTo": "EveChat",
3114
+ "columnsFrom": [
3115
+ "chatId",
3116
+ "ownerId"
3117
+ ],
3118
+ "columnsTo": [
3119
+ "id",
3120
+ "ownerId"
3121
+ ],
3122
+ "onDelete": "cascade",
3123
+ "onUpdate": "no action"
3124
+ },
3125
+ "EveChatProject_projectId_ownerId_Project_id_userId_fk": {
3126
+ "name": "EveChatProject_projectId_ownerId_Project_id_userId_fk",
3127
+ "tableFrom": "EveChatProject",
3128
+ "tableTo": "Project",
3129
+ "columnsFrom": [
3130
+ "projectId",
3131
+ "ownerId"
3132
+ ],
3133
+ "columnsTo": [
3134
+ "id",
3135
+ "userId"
3136
+ ],
3137
+ "onDelete": "cascade",
3138
+ "onUpdate": "no action"
3139
+ }
3140
+ },
3141
+ "compositePrimaryKeys": {},
3142
+ "uniqueConstraints": {},
3143
+ "policies": {},
3144
+ "checkConstraints": {},
3145
+ "isRLSEnabled": false
3146
+ },
3147
+ "public.Project": {
3148
+ "name": "Project",
3149
+ "schema": "",
3150
+ "columns": {
3151
+ "createdAt": {
3152
+ "name": "createdAt",
3153
+ "type": "timestamp",
3154
+ "primaryKey": false,
3155
+ "notNull": true,
3156
+ "default": "now()"
3157
+ },
3158
+ "icon": {
3159
+ "name": "icon",
3160
+ "type": "varchar(64)",
3161
+ "primaryKey": false,
3162
+ "notNull": true,
3163
+ "default": "'folder'"
3164
+ },
3165
+ "iconColor": {
3166
+ "name": "iconColor",
3167
+ "type": "varchar(32)",
3168
+ "primaryKey": false,
3169
+ "notNull": true,
3170
+ "default": "'gray'"
3171
+ },
3172
+ "id": {
3173
+ "name": "id",
3174
+ "type": "uuid",
3175
+ "primaryKey": true,
3176
+ "notNull": true,
3177
+ "default": "gen_random_uuid()"
3178
+ },
3179
+ "instructions": {
3180
+ "name": "instructions",
3181
+ "type": "text",
3182
+ "primaryKey": false,
3183
+ "notNull": true,
3184
+ "default": "''"
3185
+ },
3186
+ "name": {
3187
+ "name": "name",
3188
+ "type": "text",
3189
+ "primaryKey": false,
3190
+ "notNull": true
3191
+ },
3192
+ "updatedAt": {
3193
+ "name": "updatedAt",
3194
+ "type": "timestamp",
3195
+ "primaryKey": false,
3196
+ "notNull": true,
3197
+ "default": "now()"
3198
+ },
3199
+ "userId": {
3200
+ "name": "userId",
3201
+ "type": "text",
3202
+ "primaryKey": false,
3203
+ "notNull": true
3204
+ }
3205
+ },
3206
+ "indexes": {
3207
+ "Project_user_id_idx": {
3208
+ "name": "Project_user_id_idx",
3209
+ "columns": [
3210
+ {
3211
+ "expression": "userId",
3212
+ "isExpression": false,
3213
+ "asc": true,
3214
+ "nulls": "last"
3215
+ }
3216
+ ],
3217
+ "isUnique": false,
3218
+ "concurrently": false,
3219
+ "method": "btree",
3220
+ "with": {}
3221
+ }
3222
+ },
3223
+ "foreignKeys": {
3224
+ "Project_userId_user_id_fk": {
3225
+ "name": "Project_userId_user_id_fk",
3226
+ "tableFrom": "Project",
3227
+ "tableTo": "user",
3228
+ "columnsFrom": [
3229
+ "userId"
3230
+ ],
3231
+ "columnsTo": [
3232
+ "id"
3233
+ ],
3234
+ "onDelete": "cascade",
3235
+ "onUpdate": "no action"
3236
+ }
3237
+ },
3238
+ "compositePrimaryKeys": {},
3239
+ "uniqueConstraints": {
3240
+ "Project_id_user": {
3241
+ "name": "Project_id_user",
3242
+ "nullsNotDistinct": false,
3243
+ "columns": [
3244
+ "id",
3245
+ "userId"
3246
+ ]
3247
+ }
3248
+ },
3249
+ "policies": {},
3250
+ "checkConstraints": {},
3251
+ "isRLSEnabled": false
3252
+ },
3253
+ "public.EveSearchText": {
3254
+ "name": "EveSearchText",
3255
+ "schema": "",
3256
+ "columns": {
3257
+ "conversationId": {
3258
+ "name": "conversationId",
3259
+ "type": "uuid",
3260
+ "primaryKey": false,
3261
+ "notNull": true
3262
+ },
3263
+ "key": {
3264
+ "name": "key",
3265
+ "type": "text",
3266
+ "primaryKey": false,
3267
+ "notNull": true
3268
+ },
3269
+ "ownerId": {
3270
+ "name": "ownerId",
3271
+ "type": "text",
3272
+ "primaryKey": false,
3273
+ "notNull": true
3274
+ },
3275
+ "text": {
3276
+ "name": "text",
3277
+ "type": "text",
3278
+ "primaryKey": false,
3279
+ "notNull": true
3280
+ }
3281
+ },
3282
+ "indexes": {
3283
+ "EveSearchText_owner": {
3284
+ "name": "EveSearchText_owner",
3285
+ "columns": [
3286
+ {
3287
+ "expression": "ownerId",
3288
+ "isExpression": false,
3289
+ "asc": true,
3290
+ "nulls": "last"
3291
+ }
3292
+ ],
3293
+ "isUnique": false,
3294
+ "concurrently": false,
3295
+ "method": "btree",
3296
+ "with": {}
3297
+ },
3298
+ "EveSearchText_content": {
3299
+ "name": "EveSearchText_content",
3300
+ "columns": [
3301
+ {
3302
+ "expression": "to_tsvector('simple', \"text\")",
3303
+ "asc": true,
3304
+ "isExpression": true,
3305
+ "nulls": "last"
3306
+ }
3307
+ ],
3308
+ "isUnique": false,
3309
+ "concurrently": false,
3310
+ "method": "gin",
3311
+ "with": {}
3312
+ }
3313
+ },
3314
+ "foreignKeys": {
3315
+ "EveSearchText_conversationId_ownerId_EveConversation_id_ownerId_fk": {
3316
+ "name": "EveSearchText_conversationId_ownerId_EveConversation_id_ownerId_fk",
3317
+ "tableFrom": "EveSearchText",
3318
+ "tableTo": "EveConversation",
3319
+ "columnsFrom": [
3320
+ "conversationId",
3321
+ "ownerId"
3322
+ ],
3323
+ "columnsTo": [
3324
+ "id",
3325
+ "ownerId"
3326
+ ],
3327
+ "onDelete": "cascade",
3328
+ "onUpdate": "no action"
3329
+ }
3330
+ },
3331
+ "compositePrimaryKeys": {
3332
+ "EveSearchText_conversationId_key_pk": {
3333
+ "name": "EveSearchText_conversationId_key_pk",
3334
+ "columns": [
3335
+ "conversationId",
3336
+ "key"
3337
+ ]
3338
+ }
3339
+ },
3340
+ "uniqueConstraints": {},
3341
+ "policies": {},
3342
+ "checkConstraints": {},
3343
+ "isRLSEnabled": false
3344
+ },
3345
+ "public.SlackConversation": {
3346
+ "name": "SlackConversation",
3347
+ "schema": "",
3348
+ "columns": {
3349
+ "id": {
3350
+ "name": "id",
3351
+ "type": "uuid",
3352
+ "primaryKey": true,
3353
+ "notNull": true,
3354
+ "default": "gen_random_uuid()"
3355
+ },
3356
+ "teamId": {
3357
+ "name": "teamId",
3358
+ "type": "text",
3359
+ "primaryKey": false,
3360
+ "notNull": true
3361
+ },
3362
+ "channelId": {
3363
+ "name": "channelId",
3364
+ "type": "text",
3365
+ "primaryKey": false,
3366
+ "notNull": true
3367
+ },
3368
+ "threadTs": {
3369
+ "name": "threadTs",
3370
+ "type": "text",
3371
+ "primaryKey": false,
3372
+ "notNull": true
3373
+ },
3374
+ "direct": {
3375
+ "name": "direct",
3376
+ "type": "boolean",
3377
+ "primaryKey": false,
3378
+ "notNull": true
3379
+ },
3380
+ "createdAt": {
3381
+ "name": "createdAt",
3382
+ "type": "timestamp",
3383
+ "primaryKey": false,
3384
+ "notNull": true,
3385
+ "default": "now()"
3386
+ }
3387
+ },
3388
+ "indexes": {},
3389
+ "foreignKeys": {},
3390
+ "compositePrimaryKeys": {},
3391
+ "uniqueConstraints": {
3392
+ "SlackConversation_team_thread": {
3393
+ "name": "SlackConversation_team_thread",
3394
+ "nullsNotDistinct": false,
3395
+ "columns": [
3396
+ "teamId",
3397
+ "channelId",
3398
+ "threadTs"
3399
+ ]
3400
+ },
3401
+ "SlackConversation_id_team": {
3402
+ "name": "SlackConversation_id_team",
3403
+ "nullsNotDistinct": false,
3404
+ "columns": [
3405
+ "id",
3406
+ "teamId"
3407
+ ]
3408
+ },
3409
+ "SlackConversation_native_address": {
3410
+ "name": "SlackConversation_native_address",
3411
+ "nullsNotDistinct": false,
3412
+ "columns": [
3413
+ "channelId",
3414
+ "threadTs"
3415
+ ]
3416
+ }
3417
+ },
3418
+ "policies": {},
3419
+ "checkConstraints": {},
3420
+ "isRLSEnabled": false
3421
+ },
3422
+ "public.SlackDocument": {
3423
+ "name": "SlackDocument",
3424
+ "schema": "",
3425
+ "columns": {
3426
+ "id": {
3427
+ "name": "id",
3428
+ "type": "uuid",
3429
+ "primaryKey": true,
3430
+ "notNull": true
3431
+ },
3432
+ "conversationId": {
3433
+ "name": "conversationId",
3434
+ "type": "uuid",
3435
+ "primaryKey": false,
3436
+ "notNull": true
3437
+ },
3438
+ "teamId": {
3439
+ "name": "teamId",
3440
+ "type": "text",
3441
+ "primaryKey": false,
3442
+ "notNull": true
3443
+ },
3444
+ "creatorId": {
3445
+ "name": "creatorId",
3446
+ "type": "text",
3447
+ "primaryKey": false,
3448
+ "notNull": true
3449
+ },
3450
+ "headRevisionId": {
3451
+ "name": "headRevisionId",
3452
+ "type": "uuid",
3453
+ "primaryKey": false,
3454
+ "notNull": false
3455
+ }
3456
+ },
3457
+ "indexes": {},
3458
+ "foreignKeys": {
3459
+ "SlackDocument_conversationId_teamId_SlackConversation_id_teamId_fk": {
3460
+ "name": "SlackDocument_conversationId_teamId_SlackConversation_id_teamId_fk",
3461
+ "tableFrom": "SlackDocument",
3462
+ "tableTo": "SlackConversation",
3463
+ "columnsFrom": [
3464
+ "conversationId",
3465
+ "teamId"
3466
+ ],
3467
+ "columnsTo": [
3468
+ "id",
3469
+ "teamId"
3470
+ ],
3471
+ "onDelete": "no action",
3472
+ "onUpdate": "no action"
3473
+ }
3474
+ },
3475
+ "compositePrimaryKeys": {},
3476
+ "uniqueConstraints": {
3477
+ "SlackDocument_id_conversation_team": {
3478
+ "name": "SlackDocument_id_conversation_team",
3479
+ "nullsNotDistinct": false,
3480
+ "columns": [
3481
+ "id",
3482
+ "conversationId",
3483
+ "teamId"
3484
+ ]
3485
+ }
3486
+ },
3487
+ "policies": {},
3488
+ "checkConstraints": {},
3489
+ "isRLSEnabled": false
3490
+ },
3491
+ "public.SlackDocumentRevision": {
3492
+ "name": "SlackDocumentRevision",
3493
+ "schema": "",
3494
+ "columns": {
3495
+ "id": {
3496
+ "name": "id",
3497
+ "type": "uuid",
3498
+ "primaryKey": true,
3499
+ "notNull": true,
3500
+ "default": "gen_random_uuid()"
3501
+ },
3502
+ "documentId": {
3503
+ "name": "documentId",
3504
+ "type": "uuid",
3505
+ "primaryKey": false,
3506
+ "notNull": true
3507
+ },
3508
+ "conversationId": {
3509
+ "name": "conversationId",
3510
+ "type": "uuid",
3511
+ "primaryKey": false,
3512
+ "notNull": true
3513
+ },
3514
+ "teamId": {
3515
+ "name": "teamId",
3516
+ "type": "text",
3517
+ "primaryKey": false,
3518
+ "notNull": true
3519
+ },
3520
+ "actorId": {
3521
+ "name": "actorId",
3522
+ "type": "text",
3523
+ "primaryKey": false,
3524
+ "notNull": true
3525
+ },
3526
+ "operationId": {
3527
+ "name": "operationId",
3528
+ "type": "text",
3529
+ "primaryKey": false,
3530
+ "notNull": true
3531
+ },
3532
+ "requestHash": {
3533
+ "name": "requestHash",
3534
+ "type": "text",
3535
+ "primaryKey": false,
3536
+ "notNull": true
3537
+ },
3538
+ "kind": {
3539
+ "name": "kind",
3540
+ "type": "text",
3541
+ "primaryKey": false,
3542
+ "notNull": true
3543
+ },
3544
+ "title": {
3545
+ "name": "title",
3546
+ "type": "text",
3547
+ "primaryKey": false,
3548
+ "notNull": true
3549
+ },
3550
+ "content": {
3551
+ "name": "content",
3552
+ "type": "text",
3553
+ "primaryKey": false,
3554
+ "notNull": true
3555
+ },
3556
+ "fileIds": {
3557
+ "name": "fileIds",
3558
+ "type": "jsonb",
3559
+ "primaryKey": false,
3560
+ "notNull": true,
3561
+ "default": "'[]'::jsonb"
3562
+ },
3563
+ "createdAt": {
3564
+ "name": "createdAt",
3565
+ "type": "timestamp",
3566
+ "primaryKey": false,
3567
+ "notNull": true,
3568
+ "default": "now()"
3569
+ }
3570
+ },
3571
+ "indexes": {},
3572
+ "foreignKeys": {
3573
+ "SlackDocumentRevision_documentId_conversationId_teamId_SlackDocument_id_conversationId_teamId_fk": {
3574
+ "name": "SlackDocumentRevision_documentId_conversationId_teamId_SlackDocument_id_conversationId_teamId_fk",
3575
+ "tableFrom": "SlackDocumentRevision",
3576
+ "tableTo": "SlackDocument",
3577
+ "columnsFrom": [
3578
+ "documentId",
3579
+ "conversationId",
3580
+ "teamId"
3581
+ ],
3582
+ "columnsTo": [
3583
+ "id",
3584
+ "conversationId",
3585
+ "teamId"
3586
+ ],
3587
+ "onDelete": "no action",
3588
+ "onUpdate": "no action"
3589
+ }
3590
+ },
3591
+ "compositePrimaryKeys": {},
3592
+ "uniqueConstraints": {
3593
+ "SlackDocumentRevision_operation": {
3594
+ "name": "SlackDocumentRevision_operation",
3595
+ "nullsNotDistinct": false,
3596
+ "columns": [
3597
+ "conversationId",
3598
+ "operationId"
3599
+ ]
3600
+ }
3601
+ },
3602
+ "policies": {},
3603
+ "checkConstraints": {},
3604
+ "isRLSEnabled": false
3605
+ },
3606
+ "public.SlackSession": {
3607
+ "name": "SlackSession",
3608
+ "schema": "",
3609
+ "columns": {
3610
+ "sessionId": {
3611
+ "name": "sessionId",
3612
+ "type": "text",
3613
+ "primaryKey": true,
3614
+ "notNull": true
3615
+ },
3616
+ "conversationId": {
3617
+ "name": "conversationId",
3618
+ "type": "uuid",
3619
+ "primaryKey": false,
3620
+ "notNull": true
3621
+ },
3622
+ "teamId": {
3623
+ "name": "teamId",
3624
+ "type": "text",
3625
+ "primaryKey": false,
3626
+ "notNull": true
3627
+ },
3628
+ "rootSessionId": {
3629
+ "name": "rootSessionId",
3630
+ "type": "text",
3631
+ "primaryKey": false,
3632
+ "notNull": true
3633
+ },
3634
+ "rootTurnId": {
3635
+ "name": "rootTurnId",
3636
+ "type": "text",
3637
+ "primaryKey": false,
3638
+ "notNull": false
3639
+ }
3640
+ },
3641
+ "indexes": {},
3642
+ "foreignKeys": {
3643
+ "SlackSession_conversationId_teamId_SlackConversation_id_teamId_fk": {
3644
+ "name": "SlackSession_conversationId_teamId_SlackConversation_id_teamId_fk",
3645
+ "tableFrom": "SlackSession",
3646
+ "tableTo": "SlackConversation",
3647
+ "columnsFrom": [
3648
+ "conversationId",
3649
+ "teamId"
3650
+ ],
3651
+ "columnsTo": [
3652
+ "id",
3653
+ "teamId"
3654
+ ],
3655
+ "onDelete": "no action",
3656
+ "onUpdate": "no action"
3657
+ }
3658
+ },
3659
+ "compositePrimaryKeys": {},
3660
+ "uniqueConstraints": {
3661
+ "SlackSession_id_team": {
3662
+ "name": "SlackSession_id_team",
3663
+ "nullsNotDistinct": false,
3664
+ "columns": [
3665
+ "sessionId",
3666
+ "teamId"
3667
+ ]
3668
+ }
3669
+ },
3670
+ "policies": {},
3671
+ "checkConstraints": {},
3672
+ "isRLSEnabled": false
3673
+ }
3674
+ },
3675
+ "enums": {},
3676
+ "schemas": {},
3677
+ "sequences": {},
3678
+ "roles": {},
3679
+ "policies": {},
3680
+ "views": {},
3681
+ "_meta": {
3682
+ "columns": {},
3683
+ "schemas": {},
3684
+ "tables": {}
3685
+ }
3686
+ }