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

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