@neurocode-ai/core 1.18.8

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 (490) hide show
  1. package/bin/neurocode +199 -0
  2. package/bunfig.toml +2 -0
  3. package/drizzle.config.ts +10 -0
  4. package/package.json +131 -0
  5. package/schema.json +2071 -0
  6. package/script/fix-node-pty.ts +28 -0
  7. package/script/migration.ts +196 -0
  8. package/src/account/sql.ts +39 -0
  9. package/src/account.ts +101 -0
  10. package/src/agent.ts +111 -0
  11. package/src/aisdk.ts +235 -0
  12. package/src/background-job.ts +365 -0
  13. package/src/catalog.ts +301 -0
  14. package/src/command.ts +64 -0
  15. package/src/config/agent.ts +25 -0
  16. package/src/config/attachments.ts +15 -0
  17. package/src/config/command.ts +12 -0
  18. package/src/config/compaction.ts +15 -0
  19. package/src/config/experimental.ts +18 -0
  20. package/src/config/formatter.ts +12 -0
  21. package/src/config/lsp.ts +18 -0
  22. package/src/config/markdown.ts +36 -0
  23. package/src/config/mcp.ts +48 -0
  24. package/src/config/plugin/agent.ts +179 -0
  25. package/src/config/plugin/command.ts +83 -0
  26. package/src/config/plugin/external.ts +91 -0
  27. package/src/config/plugin/provider.ts +113 -0
  28. package/src/config/plugin/reference.ts +70 -0
  29. package/src/config/plugin/skill.ts +50 -0
  30. package/src/config/plugin.ts +13 -0
  31. package/src/config/provider.ts +71 -0
  32. package/src/config/reference.ts +22 -0
  33. package/src/config/tool-output.ts +9 -0
  34. package/src/config/watcher.ts +7 -0
  35. package/src/config.ts +227 -0
  36. package/src/control-plane/move-session.ts +148 -0
  37. package/src/control-plane/workspace.sql.ts +20 -0
  38. package/src/credential/sql.ts +14 -0
  39. package/src/credential.ts +138 -0
  40. package/src/cross-spawn-spawner.ts +507 -0
  41. package/src/data-migration.sql.ts +6 -0
  42. package/src/database/database.ts +57 -0
  43. package/src/database/migration/20260127222353_familiar_lady_ursula.ts +107 -0
  44. package/src/database/migration/20260211171708_add_project_commands.ts +11 -0
  45. package/src/database/migration/20260213144116_wakeful_the_professor.ts +23 -0
  46. package/src/database/migration/20260225215848_workspace.ts +19 -0
  47. package/src/database/migration/20260227213759_add_session_workspace_id.ts +12 -0
  48. package/src/database/migration/20260228203230_blue_harpoon.ts +30 -0
  49. package/src/database/migration/20260303231226_add_workspace_fields.ts +15 -0
  50. package/src/database/migration/20260309230000_move_org_to_state.ts +15 -0
  51. package/src/database/migration/20260312043431_session_message_cursor.ts +16 -0
  52. package/src/database/migration/20260323234822_events.ts +26 -0
  53. package/src/database/migration/20260410174513_workspace-name.ts +29 -0
  54. package/src/database/migration/20260413175956_chief_energizer.ts +24 -0
  55. package/src/database/migration/20260423070820_add_icon_url_override.ts +14 -0
  56. package/src/database/migration/20260427172553_slow_nightmare.ts +30 -0
  57. package/src/database/migration/20260428004200_add_session_path.ts +11 -0
  58. package/src/database/migration/20260501142318_next_venus.ts +12 -0
  59. package/src/database/migration/20260504145000_add_sync_owner.ts +11 -0
  60. package/src/database/migration/20260507164347_add_workspace_time.ts +11 -0
  61. package/src/database/migration/20260510033149_session_usage.ts +56 -0
  62. package/src/database/migration/20260511000411_data_migration_state.ts +16 -0
  63. package/src/database/migration/20260511173437_session-metadata.ts +16 -0
  64. package/src/database/migration/20260601010001_normalize_storage_paths.ts +22 -0
  65. package/src/database/migration/20260601202201_amazing_prowler.ts +11 -0
  66. package/src/database/migration/20260602002951_lowly_union_jack.ts +24 -0
  67. package/src/database/migration/20260602182828_add_project_directories.ts +20 -0
  68. package/src/database/migration/20260603001617_session_message_projection_indexes.ts +19 -0
  69. package/src/database/migration/20260603040000_session_message_projection_order.ts +19 -0
  70. package/src/database/migration/20260603141458_session_input_inbox.ts +25 -0
  71. package/src/database/migration/20260603160727_jittery_ezekiel_stane.ts +20 -0
  72. package/src/database/migration/20260604172448_event_sourced_session_input.ts +47 -0
  73. package/src/database/migration/20260605003541_add_session_context_snapshot.ts +21 -0
  74. package/src/database/migration/20260605042240_add_context_epoch_agent.ts +11 -0
  75. package/src/database/migration/20260611035744_credential.ts +25 -0
  76. package/src/database/migration/20260611192811_lush_chimera.ts +25 -0
  77. package/src/database/migration/20260612174303_project_dir_strategy.ts +29 -0
  78. package/src/database/migration/20260622142730_simplify_session_context_epoch.ts +13 -0
  79. package/src/database/migration/20260622170816_reset_v2_session_state.ts +17 -0
  80. package/src/database/migration/20260622202450_simplify_session_input.ts +17 -0
  81. package/src/database/migration.gen.ts +44 -0
  82. package/src/database/migration.ts +81 -0
  83. package/src/database/path.ts +91 -0
  84. package/src/database/schema.gen.ts +274 -0
  85. package/src/database/schema.sql.ts +10 -0
  86. package/src/database/sqlite.bun.ts +183 -0
  87. package/src/database/sqlite.node.ts +178 -0
  88. package/src/database/sqlite.ts +8 -0
  89. package/src/effect/app-node-builder.ts +23 -0
  90. package/src/effect/app-node-platform.ts +18 -0
  91. package/src/effect/app-node.ts +14 -0
  92. package/src/effect/dfdf +1 -0
  93. package/src/effect/keyed-mutex.ts +45 -0
  94. package/src/effect/layer-node.ts +333 -0
  95. package/src/effect/memo-map.ts +3 -0
  96. package/src/effect/runtime.ts +21 -0
  97. package/src/effect/service-use.ts +43 -0
  98. package/src/event/sql.ts +25 -0
  99. package/src/event.ts +638 -0
  100. package/src/file-mutation.ts +207 -0
  101. package/src/file.ts +6 -0
  102. package/src/filesystem/fff.bun.ts +140 -0
  103. package/src/filesystem/fff.node.ts +138 -0
  104. package/src/filesystem/ignore.ts +67 -0
  105. package/src/filesystem/protected.ts +53 -0
  106. package/src/filesystem/search.ts +239 -0
  107. package/src/filesystem/watcher.ts +140 -0
  108. package/src/filesystem.ts +118 -0
  109. package/src/flag/flag.ts +78 -0
  110. package/src/fs-util.ts +274 -0
  111. package/src/git.ts +987 -0
  112. package/src/github-copilot/README.md +5 -0
  113. package/src/github-copilot/chat/convert-to-openai-compatible-chat-messages.ts +170 -0
  114. package/src/github-copilot/chat/get-response-metadata.ts +15 -0
  115. package/src/github-copilot/chat/map-openai-compatible-finish-reason.ts +19 -0
  116. package/src/github-copilot/chat/openai-compatible-api-types.ts +64 -0
  117. package/src/github-copilot/chat/openai-compatible-chat-language-model.ts +815 -0
  118. package/src/github-copilot/chat/openai-compatible-chat-options.ts +28 -0
  119. package/src/github-copilot/chat/openai-compatible-metadata-extractor.ts +44 -0
  120. package/src/github-copilot/chat/openai-compatible-prepare-tools.ts +83 -0
  121. package/src/github-copilot/copilot-provider.ts +100 -0
  122. package/src/github-copilot/openai-compatible-error.ts +27 -0
  123. package/src/github-copilot/responses/convert-to-openai-responses-input.ts +335 -0
  124. package/src/github-copilot/responses/map-openai-responses-finish-reason.ts +22 -0
  125. package/src/github-copilot/responses/openai-config.ts +18 -0
  126. package/src/github-copilot/responses/openai-error.ts +22 -0
  127. package/src/github-copilot/responses/openai-responses-api-types.ts +214 -0
  128. package/src/github-copilot/responses/openai-responses-language-model.ts +1770 -0
  129. package/src/github-copilot/responses/openai-responses-prepare-tools.ts +173 -0
  130. package/src/github-copilot/responses/openai-responses-settings.ts +1 -0
  131. package/src/github-copilot/responses/tool/code-interpreter.ts +87 -0
  132. package/src/github-copilot/responses/tool/file-search.ts +127 -0
  133. package/src/github-copilot/responses/tool/image-generation.ts +114 -0
  134. package/src/github-copilot/responses/tool/local-shell.ts +64 -0
  135. package/src/github-copilot/responses/tool/web-search-preview.ts +103 -0
  136. package/src/github-copilot/responses/tool/web-search.ts +102 -0
  137. package/src/global.ts +87 -0
  138. package/src/id/id.ts +47 -0
  139. package/src/image/photon.ts +94 -0
  140. package/src/image.ts +81 -0
  141. package/src/installation/version.ts +8 -0
  142. package/src/instruction-context.ts +101 -0
  143. package/src/integration/connection.ts +12 -0
  144. package/src/integration.ts +520 -0
  145. package/src/location-mutation.ts +162 -0
  146. package/src/location-service-map.ts +18 -0
  147. package/src/location-services.ts +115 -0
  148. package/src/location.ts +39 -0
  149. package/src/markdown.d.ts +4 -0
  150. package/src/model.ts +41 -0
  151. package/src/models-dev.ts +260 -0
  152. package/src/npm-config.ts +40 -0
  153. package/src/npm.ts +269 -0
  154. package/src/oauth/page.ts +276 -0
  155. package/src/observability/logging.ts +71 -0
  156. package/src/observability/otlp.ts +79 -0
  157. package/src/observability/shared.ts +1 -0
  158. package/src/observability.ts +24 -0
  159. package/src/patch.ts +197 -0
  160. package/src/permission/saved.ts +79 -0
  161. package/src/permission/sql.ts +20 -0
  162. package/src/permission.ts +310 -0
  163. package/src/plugin/agent.ts +206 -0
  164. package/src/plugin/command/initialize.txt +65 -0
  165. package/src/plugin/command/review.txt +100 -0
  166. package/src/plugin/command.ts +25 -0
  167. package/src/plugin/host.ts +219 -0
  168. package/src/plugin/internal.ts +153 -0
  169. package/src/plugin/layer-map.example.ts +94 -0
  170. package/src/plugin/models-dev.ts +183 -0
  171. package/src/plugin/promise.ts +93 -0
  172. package/src/plugin/provider/alibaba.ts +15 -0
  173. package/src/plugin/provider/amazon-bedrock.ts +126 -0
  174. package/src/plugin/provider/anthropic.ts +27 -0
  175. package/src/plugin/provider/azure.ts +82 -0
  176. package/src/plugin/provider/cerebras.ts +26 -0
  177. package/src/plugin/provider/cloudflare-ai-gateway.ts +81 -0
  178. package/src/plugin/provider/cloudflare-workers-ai.ts +81 -0
  179. package/src/plugin/provider/cohere.ts +15 -0
  180. package/src/plugin/provider/deepinfra.ts +15 -0
  181. package/src/plugin/provider/dynamic.ts +31 -0
  182. package/src/plugin/provider/gateway.ts +15 -0
  183. package/src/plugin/provider/github-copilot.ts +52 -0
  184. package/src/plugin/provider/gitlab.ts +65 -0
  185. package/src/plugin/provider/google-vertex.ts +173 -0
  186. package/src/plugin/provider/google.ts +15 -0
  187. package/src/plugin/provider/groq.ts +15 -0
  188. package/src/plugin/provider/kilo.ts +21 -0
  189. package/src/plugin/provider/llmgateway.ts +26 -0
  190. package/src/plugin/provider/mistral.ts +15 -0
  191. package/src/plugin/provider/nvidia.ts +22 -0
  192. package/src/plugin/provider/openai-compatible.ts +17 -0
  193. package/src/plugin/provider/openai.ts +292 -0
  194. package/src/plugin/provider/opencode.ts +311 -0
  195. package/src/plugin/provider/openrouter.ts +36 -0
  196. package/src/plugin/provider/perplexity.ts +15 -0
  197. package/src/plugin/provider/sap-ai-core.ts +46 -0
  198. package/src/plugin/provider/snowflake-cortex.ts +89 -0
  199. package/src/plugin/provider/togetherai.ts +15 -0
  200. package/src/plugin/provider/venice.ts +15 -0
  201. package/src/plugin/provider/vercel.ts +27 -0
  202. package/src/plugin/provider/xai.ts +22 -0
  203. package/src/plugin/provider/zenmux.ts +21 -0
  204. package/src/plugin/provider.ts +71 -0
  205. package/src/plugin/skill/customize-neurocode.md +452 -0
  206. package/src/plugin/skill.ts +31 -0
  207. package/src/plugin/variant.ts +39 -0
  208. package/src/plugin.ts +167 -0
  209. package/src/policy.ts +49 -0
  210. package/src/process.ts +261 -0
  211. package/src/project/copy-strategies.ts +35 -0
  212. package/src/project/copy.ts +292 -0
  213. package/src/project/directories.ts +158 -0
  214. package/src/project/schema.ts +16 -0
  215. package/src/project/sql.ts +35 -0
  216. package/src/project.ts +136 -0
  217. package/src/provider.ts +25 -0
  218. package/src/pty/protocol.ts +37 -0
  219. package/src/pty/pty.bun.ts +26 -0
  220. package/src/pty/pty.node.ts +29 -0
  221. package/src/pty/pty.ts +25 -0
  222. package/src/pty/schema.ts +1 -0
  223. package/src/pty/ticket.ts +56 -0
  224. package/src/pty.ts +318 -0
  225. package/src/public-event-manifest.ts +7 -0
  226. package/src/question.ts +153 -0
  227. package/src/reference/guidance.ts +69 -0
  228. package/src/reference.ts +125 -0
  229. package/src/repository-cache.ts +259 -0
  230. package/src/repository.ts +214 -0
  231. package/src/ripgrep/binary.ts +132 -0
  232. package/src/ripgrep.ts +281 -0
  233. package/src/schema.ts +79 -0
  234. package/src/session/compaction.ts +241 -0
  235. package/src/session/context-epoch.ts +174 -0
  236. package/src/session/error.ts +24 -0
  237. package/src/session/event.ts +2 -0
  238. package/src/session/execution/local.ts +46 -0
  239. package/src/session/execution.ts +34 -0
  240. package/src/session/history.ts +101 -0
  241. package/src/session/info.ts +50 -0
  242. package/src/session/input.ts +288 -0
  243. package/src/session/message-updater.ts +397 -0
  244. package/src/session/message.ts +2 -0
  245. package/src/session/projector.ts +458 -0
  246. package/src/session/prompt.ts +1 -0
  247. package/src/session/revert.ts +121 -0
  248. package/src/session/run-coordinator.ts +104 -0
  249. package/src/session/runner/index.ts +28 -0
  250. package/src/session/runner/llm.ts +432 -0
  251. package/src/session/runner/max-steps.ts +16 -0
  252. package/src/session/runner/model.ts +218 -0
  253. package/src/session/runner/publish-llm-event.ts +423 -0
  254. package/src/session/runner/to-llm-message.ts +171 -0
  255. package/src/session/schema.ts +9 -0
  256. package/src/session/sql.ts +176 -0
  257. package/src/session/store.ts +63 -0
  258. package/src/session/todo.ts +78 -0
  259. package/src/session.ts +486 -0
  260. package/src/share/sql.ts +13 -0
  261. package/src/shell.ts +226 -0
  262. package/src/skill/discovery.ts +213 -0
  263. package/src/skill/guidance.ts +76 -0
  264. package/src/skill.ts +132 -0
  265. package/src/snapshot.ts +266 -0
  266. package/src/state.ts +128 -0
  267. package/src/system-context/builtins.ts +50 -0
  268. package/src/system-context/index.ts +320 -0
  269. package/src/system-context/registry.ts +49 -0
  270. package/src/tool/AGENTS.md +59 -0
  271. package/src/tool/application-tools.ts +57 -0
  272. package/src/tool/apply-patch.ts +219 -0
  273. package/src/tool/bash.ts +207 -0
  274. package/src/tool/builtins.ts +48 -0
  275. package/src/tool/edit.ts +223 -0
  276. package/src/tool/glob.ts +105 -0
  277. package/src/tool/grep.ts +137 -0
  278. package/src/tool/http-body.ts +30 -0
  279. package/src/tool/question.ts +94 -0
  280. package/src/tool/read-filesystem.ts +366 -0
  281. package/src/tool/read.ts +117 -0
  282. package/src/tool/registry.ts +147 -0
  283. package/src/tool/skill.ts +109 -0
  284. package/src/tool/todowrite.ts +62 -0
  285. package/src/tool/tool.ts +162 -0
  286. package/src/tool/tools.ts +13 -0
  287. package/src/tool/webfetch.ts +218 -0
  288. package/src/tool/websearch.ts +260 -0
  289. package/src/tool/write.ts +101 -0
  290. package/src/tool-output-store.ts +211 -0
  291. package/src/util/array.ts +10 -0
  292. package/src/util/binary.ts +41 -0
  293. package/src/util/effect-flock.ts +284 -0
  294. package/src/util/encode.ts +51 -0
  295. package/src/util/error.ts +70 -0
  296. package/src/util/flock.ts +358 -0
  297. package/src/util/glob.ts +34 -0
  298. package/src/util/hash.ts +11 -0
  299. package/src/util/identifier.ts +1 -0
  300. package/src/util/iife.ts +3 -0
  301. package/src/util/lazy.ts +11 -0
  302. package/src/util/module.ts +10 -0
  303. package/src/util/path.ts +37 -0
  304. package/src/util/retry.ts +42 -0
  305. package/src/util/slug.ts +74 -0
  306. package/src/util/token.ts +5 -0
  307. package/src/util/which.ts +14 -0
  308. package/src/util/wildcard.ts +14 -0
  309. package/src/v1/config/agent.ts +89 -0
  310. package/src/v1/config/attachment.ts +25 -0
  311. package/src/v1/config/command.ts +13 -0
  312. package/src/v1/config/config.ts +192 -0
  313. package/src/v1/config/console-state.ts +16 -0
  314. package/src/v1/config/error.ts +39 -0
  315. package/src/v1/config/formatter.ts +13 -0
  316. package/src/v1/config/layout.ts +6 -0
  317. package/src/v1/config/lsp.ts +80 -0
  318. package/src/v1/config/mcp.ts +63 -0
  319. package/src/v1/config/migrate.ts +254 -0
  320. package/src/v1/config/permission.ts +50 -0
  321. package/src/v1/config/plugin.ts +9 -0
  322. package/src/v1/config/provider-options.ts +227 -0
  323. package/src/v1/config/provider.ts +121 -0
  324. package/src/v1/config/server.ts +19 -0
  325. package/src/v1/config/skills.ts +13 -0
  326. package/src/v1/permission.ts +33 -0
  327. package/src/v1/session.ts +68 -0
  328. package/src/v2-schema.ts +3 -0
  329. package/src/workspace.ts +6 -0
  330. package/sst-env.d.ts +10 -0
  331. package/test/agent.test.ts +131 -0
  332. package/test/application-tools.test.ts +287 -0
  333. package/test/background-job.test.ts +106 -0
  334. package/test/catalog.test.ts +353 -0
  335. package/test/command.test.ts +56 -0
  336. package/test/config/agent.test.ts +349 -0
  337. package/test/config/command.test.ts +83 -0
  338. package/test/config/config.test.ts +798 -0
  339. package/test/config/fixtures/plugin/directory-plugin.ts +13 -0
  340. package/test/config/plugin.test.ts +248 -0
  341. package/test/config/provider-options.test.ts +224 -0
  342. package/test/config/provider.test.ts +269 -0
  343. package/test/config/skill.test.ts +80 -0
  344. package/test/credential.test.ts +36 -0
  345. package/test/database-migration.test.ts +644 -0
  346. package/test/effect/cross-spawn-spawner.test.ts +426 -0
  347. package/test/effect/keyed-mutex.test.ts +73 -0
  348. package/test/effect/layer-node/layer-node-types.test.ts +143 -0
  349. package/test/effect/layer-node/layer-node.test.ts +261 -0
  350. package/test/effect/layer-node/node-build.test.ts +125 -0
  351. package/test/effect/observability.test.ts +109 -0
  352. package/test/event.test.ts +1124 -0
  353. package/test/file-mutation.test.ts +368 -0
  354. package/test/filesystem/filesystem.test.ts +387 -0
  355. package/test/filesystem/ignore.test.ts +10 -0
  356. package/test/filesystem/search.test.ts +44 -0
  357. package/test/filesystem/watcher.test.ts +266 -0
  358. package/test/fixture/effect-flock-worker.ts +60 -0
  359. package/test/fixture/flock-worker.ts +72 -0
  360. package/test/fixture/git.ts +49 -0
  361. package/test/fixture/location.ts +26 -0
  362. package/test/fixture/tmpdir.ts +25 -0
  363. package/test/fixtures/recordings/session-runner/openai-chat-streams-text.json +27 -0
  364. package/test/git.test.ts +164 -0
  365. package/test/github-copilot/convert-to-copilot-messages.test.ts +523 -0
  366. package/test/github-copilot/copilot-chat-model.test.ts +592 -0
  367. package/test/github-copilot/openai-responses-language-model.test.ts +206 -0
  368. package/test/global.test.ts +16 -0
  369. package/test/instruction-context.test.ts +323 -0
  370. package/test/integration.test.ts +349 -0
  371. package/test/legacy-event-schema.test.ts +16 -0
  372. package/test/lib/effect.ts +53 -0
  373. package/test/lib/tool.ts +20 -0
  374. package/test/location-filesystem.test.ts +69 -0
  375. package/test/location-layer.test.ts +226 -0
  376. package/test/location-mutation.test.ts +178 -0
  377. package/test/location.test.ts +42 -0
  378. package/test/model.test.ts +23 -0
  379. package/test/models.test.ts +290 -0
  380. package/test/move-session.test.ts +235 -0
  381. package/test/npm-config.test.ts +51 -0
  382. package/test/npm.test.ts +84 -0
  383. package/test/oauth-page.test.ts +15 -0
  384. package/test/patch.test.ts +68 -0
  385. package/test/permission.test.ts +315 -0
  386. package/test/plugin/command.test.ts +47 -0
  387. package/test/plugin/fixture.ts +52 -0
  388. package/test/plugin/fixtures/config-effect-plugin.ts +15 -0
  389. package/test/plugin/fixtures/config-promise-plugin.ts +13 -0
  390. package/test/plugin/fixtures/invalid-plugin.ts +1 -0
  391. package/test/plugin/fixtures/models-dev.json +14 -0
  392. package/test/plugin/fixtures/provider-factory.ts +9 -0
  393. package/test/plugin/host.ts +303 -0
  394. package/test/plugin/models-dev.test.ts +170 -0
  395. package/test/plugin/promise.test.ts +67 -0
  396. package/test/plugin/provider-alibaba.test.ts +92 -0
  397. package/test/plugin/provider-amazon-bedrock.test.ts +622 -0
  398. package/test/plugin/provider-anthropic.test.ts +94 -0
  399. package/test/plugin/provider-azure-cognitive-services.test.ts +199 -0
  400. package/test/plugin/provider-azure.test.ts +293 -0
  401. package/test/plugin/provider-cerebras.test.ts +136 -0
  402. package/test/plugin/provider-cloudflare-ai-gateway.test.ts +426 -0
  403. package/test/plugin/provider-cloudflare-workers-ai.test.ts +279 -0
  404. package/test/plugin/provider-cohere.test.ts +123 -0
  405. package/test/plugin/provider-deepinfra.test.ts +159 -0
  406. package/test/plugin/provider-dynamic.test.ts +184 -0
  407. package/test/plugin/provider-gateway.test.ts +115 -0
  408. package/test/plugin/provider-github-copilot.test.ts +278 -0
  409. package/test/plugin/provider-gitlab.test.ts +308 -0
  410. package/test/plugin/provider-google-vertex-anthropic.test.ts +264 -0
  411. package/test/plugin/provider-google-vertex.test.ts +387 -0
  412. package/test/plugin/provider-google.test.ts +80 -0
  413. package/test/plugin/provider-groq.test.ts +121 -0
  414. package/test/plugin/provider-kilo.test.ts +99 -0
  415. package/test/plugin/provider-llmgateway.test.ts +80 -0
  416. package/test/plugin/provider-mistral.test.ts +129 -0
  417. package/test/plugin/provider-nvidia.test.ts +97 -0
  418. package/test/plugin/provider-openai-compatible.test.ts +107 -0
  419. package/test/plugin/provider-openai.test.ts +176 -0
  420. package/test/plugin/provider-opencode.test.ts +423 -0
  421. package/test/plugin/provider-openrouter.test.ts +113 -0
  422. package/test/plugin/provider-perplexity.test.ts +122 -0
  423. package/test/plugin/provider-sap-ai-core.test.ts +159 -0
  424. package/test/plugin/provider-snowflake-cortex.test.ts +261 -0
  425. package/test/plugin/provider-togetherai.test.ts +129 -0
  426. package/test/plugin/provider-venice.test.ts +115 -0
  427. package/test/plugin/provider-vercel.test.ts +83 -0
  428. package/test/plugin/provider-xai.test.ts +125 -0
  429. package/test/plugin/provider-zenmux.test.ts +110 -0
  430. package/test/plugin/skill.test.ts +25 -0
  431. package/test/plugin/variant.test.ts +67 -0
  432. package/test/plugin.test.ts +71 -0
  433. package/test/policy.test.ts +85 -0
  434. package/test/preload.ts +5 -0
  435. package/test/process/process.test.ts +368 -0
  436. package/test/project-copy.test.ts +400 -0
  437. package/test/project-directories.test.ts +61 -0
  438. package/test/project.test.ts +221 -0
  439. package/test/provider-mistral.test.ts +282 -0
  440. package/test/provider-xai-responses.test.ts +32 -0
  441. package/test/pty/info-schema.test.ts +32 -0
  442. package/test/pty/protocol.test.ts +27 -0
  443. package/test/pty/pty-session.test.ts +240 -0
  444. package/test/pty/ticket.test.ts +62 -0
  445. package/test/question.test.ts +114 -0
  446. package/test/reference-guidance.test.ts +76 -0
  447. package/test/reference.test.ts +78 -0
  448. package/test/repository-cache.test.ts +153 -0
  449. package/test/repository.test.ts +71 -0
  450. package/test/ripgrep.test.ts +65 -0
  451. package/test/session-compaction.test.ts +27 -0
  452. package/test/session-create.test.ts +425 -0
  453. package/test/session-history.test.ts +165 -0
  454. package/test/session-projector.test.ts +533 -0
  455. package/test/session-prompt.test.ts +584 -0
  456. package/test/session-run-coordinator.test.ts +418 -0
  457. package/test/session-runner-message.test.ts +501 -0
  458. package/test/session-runner-model.test.ts +347 -0
  459. package/test/session-runner-recorded.test.ts +193 -0
  460. package/test/session-runner-tool-events.test.ts +136 -0
  461. package/test/session-runner-tool-registry.test.ts +452 -0
  462. package/test/session-runner.test.ts +3365 -0
  463. package/test/session-todo.test.ts +94 -0
  464. package/test/session-tool-progress.test.ts +158 -0
  465. package/test/shared-schema.test.ts +206 -0
  466. package/test/shell.test.ts +108 -0
  467. package/test/skill/guidance.test.ts +144 -0
  468. package/test/skill-discovery.test.ts +165 -0
  469. package/test/skill.test.ts +125 -0
  470. package/test/snapshot.test.ts +178 -0
  471. package/test/state.test.ts +115 -0
  472. package/test/system-context/builtins.test.ts +129 -0
  473. package/test/system-context/index.test.ts +307 -0
  474. package/test/system-context/registry.test.ts +114 -0
  475. package/test/tool-apply-patch.test.ts +436 -0
  476. package/test/tool-bash.test.ts +437 -0
  477. package/test/tool-edit.test.ts +434 -0
  478. package/test/tool-output-store.test.ts +247 -0
  479. package/test/tool-question.test.ts +162 -0
  480. package/test/tool-read-filesystem.test.ts +118 -0
  481. package/test/tool-read.test.ts +674 -0
  482. package/test/tool-skill.test.ts +149 -0
  483. package/test/tool-todowrite.test.ts +125 -0
  484. package/test/tool-webfetch.test.ts +281 -0
  485. package/test/tool-websearch.test.ts +316 -0
  486. package/test/tool-write.test.ts +305 -0
  487. package/test/util/effect-flock.test.ts +392 -0
  488. package/test/util/flock.test.ts +428 -0
  489. package/test/util/which.test.ts +100 -0
  490. package/tsconfig.json +7 -0
package/schema.json ADDED
@@ -0,0 +1,2071 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "sqlite",
4
+ "id": "f14a9b18-8207-487e-a3d3-227e629ba9ad",
5
+ "prevIds": ["169a0f0f-d58f-479f-b024-fa1c7b9a09db"],
6
+ "ddl": [
7
+ {
8
+ "name": "workspace",
9
+ "entityType": "tables"
10
+ },
11
+ {
12
+ "name": "data_migration",
13
+ "entityType": "tables"
14
+ },
15
+ {
16
+ "name": "account_state",
17
+ "entityType": "tables"
18
+ },
19
+ {
20
+ "name": "account",
21
+ "entityType": "tables"
22
+ },
23
+ {
24
+ "name": "control_account",
25
+ "entityType": "tables"
26
+ },
27
+ {
28
+ "name": "credential",
29
+ "entityType": "tables"
30
+ },
31
+ {
32
+ "name": "event_sequence",
33
+ "entityType": "tables"
34
+ },
35
+ {
36
+ "name": "event",
37
+ "entityType": "tables"
38
+ },
39
+ {
40
+ "name": "permission",
41
+ "entityType": "tables"
42
+ },
43
+ {
44
+ "name": "project_directory",
45
+ "entityType": "tables"
46
+ },
47
+ {
48
+ "name": "project",
49
+ "entityType": "tables"
50
+ },
51
+ {
52
+ "name": "message",
53
+ "entityType": "tables"
54
+ },
55
+ {
56
+ "name": "part",
57
+ "entityType": "tables"
58
+ },
59
+ {
60
+ "name": "session_context_epoch",
61
+ "entityType": "tables"
62
+ },
63
+ {
64
+ "name": "session_input",
65
+ "entityType": "tables"
66
+ },
67
+ {
68
+ "name": "session_message",
69
+ "entityType": "tables"
70
+ },
71
+ {
72
+ "name": "session",
73
+ "entityType": "tables"
74
+ },
75
+ {
76
+ "name": "todo",
77
+ "entityType": "tables"
78
+ },
79
+ {
80
+ "name": "session_share",
81
+ "entityType": "tables"
82
+ },
83
+ {
84
+ "type": "text",
85
+ "notNull": false,
86
+ "autoincrement": false,
87
+ "default": null,
88
+ "generated": null,
89
+ "name": "id",
90
+ "entityType": "columns",
91
+ "table": "workspace"
92
+ },
93
+ {
94
+ "type": "text",
95
+ "notNull": true,
96
+ "autoincrement": false,
97
+ "default": null,
98
+ "generated": null,
99
+ "name": "type",
100
+ "entityType": "columns",
101
+ "table": "workspace"
102
+ },
103
+ {
104
+ "type": "text",
105
+ "notNull": true,
106
+ "autoincrement": false,
107
+ "default": "''",
108
+ "generated": null,
109
+ "name": "name",
110
+ "entityType": "columns",
111
+ "table": "workspace"
112
+ },
113
+ {
114
+ "type": "text",
115
+ "notNull": false,
116
+ "autoincrement": false,
117
+ "default": null,
118
+ "generated": null,
119
+ "name": "branch",
120
+ "entityType": "columns",
121
+ "table": "workspace"
122
+ },
123
+ {
124
+ "type": "text",
125
+ "notNull": false,
126
+ "autoincrement": false,
127
+ "default": null,
128
+ "generated": null,
129
+ "name": "directory",
130
+ "entityType": "columns",
131
+ "table": "workspace"
132
+ },
133
+ {
134
+ "type": "text",
135
+ "notNull": false,
136
+ "autoincrement": false,
137
+ "default": null,
138
+ "generated": null,
139
+ "name": "extra",
140
+ "entityType": "columns",
141
+ "table": "workspace"
142
+ },
143
+ {
144
+ "type": "text",
145
+ "notNull": true,
146
+ "autoincrement": false,
147
+ "default": null,
148
+ "generated": null,
149
+ "name": "project_id",
150
+ "entityType": "columns",
151
+ "table": "workspace"
152
+ },
153
+ {
154
+ "type": "integer",
155
+ "notNull": true,
156
+ "autoincrement": false,
157
+ "default": null,
158
+ "generated": null,
159
+ "name": "time_used",
160
+ "entityType": "columns",
161
+ "table": "workspace"
162
+ },
163
+ {
164
+ "type": "text",
165
+ "notNull": false,
166
+ "autoincrement": false,
167
+ "default": null,
168
+ "generated": null,
169
+ "name": "name",
170
+ "entityType": "columns",
171
+ "table": "data_migration"
172
+ },
173
+ {
174
+ "type": "integer",
175
+ "notNull": true,
176
+ "autoincrement": false,
177
+ "default": null,
178
+ "generated": null,
179
+ "name": "time_completed",
180
+ "entityType": "columns",
181
+ "table": "data_migration"
182
+ },
183
+ {
184
+ "type": "integer",
185
+ "notNull": false,
186
+ "autoincrement": false,
187
+ "default": null,
188
+ "generated": null,
189
+ "name": "id",
190
+ "entityType": "columns",
191
+ "table": "account_state"
192
+ },
193
+ {
194
+ "type": "text",
195
+ "notNull": false,
196
+ "autoincrement": false,
197
+ "default": null,
198
+ "generated": null,
199
+ "name": "active_account_id",
200
+ "entityType": "columns",
201
+ "table": "account_state"
202
+ },
203
+ {
204
+ "type": "text",
205
+ "notNull": false,
206
+ "autoincrement": false,
207
+ "default": null,
208
+ "generated": null,
209
+ "name": "active_org_id",
210
+ "entityType": "columns",
211
+ "table": "account_state"
212
+ },
213
+ {
214
+ "type": "text",
215
+ "notNull": false,
216
+ "autoincrement": false,
217
+ "default": null,
218
+ "generated": null,
219
+ "name": "id",
220
+ "entityType": "columns",
221
+ "table": "account"
222
+ },
223
+ {
224
+ "type": "text",
225
+ "notNull": true,
226
+ "autoincrement": false,
227
+ "default": null,
228
+ "generated": null,
229
+ "name": "email",
230
+ "entityType": "columns",
231
+ "table": "account"
232
+ },
233
+ {
234
+ "type": "text",
235
+ "notNull": true,
236
+ "autoincrement": false,
237
+ "default": null,
238
+ "generated": null,
239
+ "name": "url",
240
+ "entityType": "columns",
241
+ "table": "account"
242
+ },
243
+ {
244
+ "type": "text",
245
+ "notNull": true,
246
+ "autoincrement": false,
247
+ "default": null,
248
+ "generated": null,
249
+ "name": "access_token",
250
+ "entityType": "columns",
251
+ "table": "account"
252
+ },
253
+ {
254
+ "type": "text",
255
+ "notNull": true,
256
+ "autoincrement": false,
257
+ "default": null,
258
+ "generated": null,
259
+ "name": "refresh_token",
260
+ "entityType": "columns",
261
+ "table": "account"
262
+ },
263
+ {
264
+ "type": "integer",
265
+ "notNull": false,
266
+ "autoincrement": false,
267
+ "default": null,
268
+ "generated": null,
269
+ "name": "token_expiry",
270
+ "entityType": "columns",
271
+ "table": "account"
272
+ },
273
+ {
274
+ "type": "integer",
275
+ "notNull": true,
276
+ "autoincrement": false,
277
+ "default": null,
278
+ "generated": null,
279
+ "name": "time_created",
280
+ "entityType": "columns",
281
+ "table": "account"
282
+ },
283
+ {
284
+ "type": "integer",
285
+ "notNull": true,
286
+ "autoincrement": false,
287
+ "default": null,
288
+ "generated": null,
289
+ "name": "time_updated",
290
+ "entityType": "columns",
291
+ "table": "account"
292
+ },
293
+ {
294
+ "type": "text",
295
+ "notNull": true,
296
+ "autoincrement": false,
297
+ "default": null,
298
+ "generated": null,
299
+ "name": "email",
300
+ "entityType": "columns",
301
+ "table": "control_account"
302
+ },
303
+ {
304
+ "type": "text",
305
+ "notNull": true,
306
+ "autoincrement": false,
307
+ "default": null,
308
+ "generated": null,
309
+ "name": "url",
310
+ "entityType": "columns",
311
+ "table": "control_account"
312
+ },
313
+ {
314
+ "type": "text",
315
+ "notNull": true,
316
+ "autoincrement": false,
317
+ "default": null,
318
+ "generated": null,
319
+ "name": "access_token",
320
+ "entityType": "columns",
321
+ "table": "control_account"
322
+ },
323
+ {
324
+ "type": "text",
325
+ "notNull": true,
326
+ "autoincrement": false,
327
+ "default": null,
328
+ "generated": null,
329
+ "name": "refresh_token",
330
+ "entityType": "columns",
331
+ "table": "control_account"
332
+ },
333
+ {
334
+ "type": "integer",
335
+ "notNull": false,
336
+ "autoincrement": false,
337
+ "default": null,
338
+ "generated": null,
339
+ "name": "token_expiry",
340
+ "entityType": "columns",
341
+ "table": "control_account"
342
+ },
343
+ {
344
+ "type": "integer",
345
+ "notNull": true,
346
+ "autoincrement": false,
347
+ "default": null,
348
+ "generated": null,
349
+ "name": "active",
350
+ "entityType": "columns",
351
+ "table": "control_account"
352
+ },
353
+ {
354
+ "type": "integer",
355
+ "notNull": true,
356
+ "autoincrement": false,
357
+ "default": null,
358
+ "generated": null,
359
+ "name": "time_created",
360
+ "entityType": "columns",
361
+ "table": "control_account"
362
+ },
363
+ {
364
+ "type": "integer",
365
+ "notNull": true,
366
+ "autoincrement": false,
367
+ "default": null,
368
+ "generated": null,
369
+ "name": "time_updated",
370
+ "entityType": "columns",
371
+ "table": "control_account"
372
+ },
373
+ {
374
+ "type": "text",
375
+ "notNull": false,
376
+ "autoincrement": false,
377
+ "default": null,
378
+ "generated": null,
379
+ "name": "id",
380
+ "entityType": "columns",
381
+ "table": "credential"
382
+ },
383
+ {
384
+ "type": "text",
385
+ "notNull": false,
386
+ "autoincrement": false,
387
+ "default": null,
388
+ "generated": null,
389
+ "name": "integration_id",
390
+ "entityType": "columns",
391
+ "table": "credential"
392
+ },
393
+ {
394
+ "type": "text",
395
+ "notNull": true,
396
+ "autoincrement": false,
397
+ "default": null,
398
+ "generated": null,
399
+ "name": "label",
400
+ "entityType": "columns",
401
+ "table": "credential"
402
+ },
403
+ {
404
+ "type": "text",
405
+ "notNull": true,
406
+ "autoincrement": false,
407
+ "default": null,
408
+ "generated": null,
409
+ "name": "value",
410
+ "entityType": "columns",
411
+ "table": "credential"
412
+ },
413
+ {
414
+ "type": "text",
415
+ "notNull": false,
416
+ "autoincrement": false,
417
+ "default": null,
418
+ "generated": null,
419
+ "name": "connector_id",
420
+ "entityType": "columns",
421
+ "table": "credential"
422
+ },
423
+ {
424
+ "type": "text",
425
+ "notNull": false,
426
+ "autoincrement": false,
427
+ "default": null,
428
+ "generated": null,
429
+ "name": "method_id",
430
+ "entityType": "columns",
431
+ "table": "credential"
432
+ },
433
+ {
434
+ "type": "integer",
435
+ "notNull": false,
436
+ "autoincrement": false,
437
+ "default": null,
438
+ "generated": null,
439
+ "name": "active",
440
+ "entityType": "columns",
441
+ "table": "credential"
442
+ },
443
+ {
444
+ "type": "integer",
445
+ "notNull": true,
446
+ "autoincrement": false,
447
+ "default": null,
448
+ "generated": null,
449
+ "name": "time_created",
450
+ "entityType": "columns",
451
+ "table": "credential"
452
+ },
453
+ {
454
+ "type": "integer",
455
+ "notNull": true,
456
+ "autoincrement": false,
457
+ "default": null,
458
+ "generated": null,
459
+ "name": "time_updated",
460
+ "entityType": "columns",
461
+ "table": "credential"
462
+ },
463
+ {
464
+ "type": "text",
465
+ "notNull": false,
466
+ "autoincrement": false,
467
+ "default": null,
468
+ "generated": null,
469
+ "name": "aggregate_id",
470
+ "entityType": "columns",
471
+ "table": "event_sequence"
472
+ },
473
+ {
474
+ "type": "integer",
475
+ "notNull": true,
476
+ "autoincrement": false,
477
+ "default": null,
478
+ "generated": null,
479
+ "name": "seq",
480
+ "entityType": "columns",
481
+ "table": "event_sequence"
482
+ },
483
+ {
484
+ "type": "text",
485
+ "notNull": false,
486
+ "autoincrement": false,
487
+ "default": null,
488
+ "generated": null,
489
+ "name": "owner_id",
490
+ "entityType": "columns",
491
+ "table": "event_sequence"
492
+ },
493
+ {
494
+ "type": "text",
495
+ "notNull": false,
496
+ "autoincrement": false,
497
+ "default": null,
498
+ "generated": null,
499
+ "name": "id",
500
+ "entityType": "columns",
501
+ "table": "event"
502
+ },
503
+ {
504
+ "type": "text",
505
+ "notNull": true,
506
+ "autoincrement": false,
507
+ "default": null,
508
+ "generated": null,
509
+ "name": "aggregate_id",
510
+ "entityType": "columns",
511
+ "table": "event"
512
+ },
513
+ {
514
+ "type": "integer",
515
+ "notNull": true,
516
+ "autoincrement": false,
517
+ "default": null,
518
+ "generated": null,
519
+ "name": "seq",
520
+ "entityType": "columns",
521
+ "table": "event"
522
+ },
523
+ {
524
+ "type": "text",
525
+ "notNull": true,
526
+ "autoincrement": false,
527
+ "default": null,
528
+ "generated": null,
529
+ "name": "type",
530
+ "entityType": "columns",
531
+ "table": "event"
532
+ },
533
+ {
534
+ "type": "text",
535
+ "notNull": true,
536
+ "autoincrement": false,
537
+ "default": null,
538
+ "generated": null,
539
+ "name": "data",
540
+ "entityType": "columns",
541
+ "table": "event"
542
+ },
543
+ {
544
+ "type": "text",
545
+ "notNull": false,
546
+ "autoincrement": false,
547
+ "default": null,
548
+ "generated": null,
549
+ "name": "id",
550
+ "entityType": "columns",
551
+ "table": "permission"
552
+ },
553
+ {
554
+ "type": "text",
555
+ "notNull": true,
556
+ "autoincrement": false,
557
+ "default": null,
558
+ "generated": null,
559
+ "name": "project_id",
560
+ "entityType": "columns",
561
+ "table": "permission"
562
+ },
563
+ {
564
+ "type": "text",
565
+ "notNull": true,
566
+ "autoincrement": false,
567
+ "default": null,
568
+ "generated": null,
569
+ "name": "action",
570
+ "entityType": "columns",
571
+ "table": "permission"
572
+ },
573
+ {
574
+ "type": "text",
575
+ "notNull": true,
576
+ "autoincrement": false,
577
+ "default": null,
578
+ "generated": null,
579
+ "name": "resource",
580
+ "entityType": "columns",
581
+ "table": "permission"
582
+ },
583
+ {
584
+ "type": "integer",
585
+ "notNull": true,
586
+ "autoincrement": false,
587
+ "default": null,
588
+ "generated": null,
589
+ "name": "time_created",
590
+ "entityType": "columns",
591
+ "table": "permission"
592
+ },
593
+ {
594
+ "type": "integer",
595
+ "notNull": true,
596
+ "autoincrement": false,
597
+ "default": null,
598
+ "generated": null,
599
+ "name": "time_updated",
600
+ "entityType": "columns",
601
+ "table": "permission"
602
+ },
603
+ {
604
+ "type": "text",
605
+ "notNull": true,
606
+ "autoincrement": false,
607
+ "default": null,
608
+ "generated": null,
609
+ "name": "project_id",
610
+ "entityType": "columns",
611
+ "table": "project_directory"
612
+ },
613
+ {
614
+ "type": "text",
615
+ "notNull": true,
616
+ "autoincrement": false,
617
+ "default": null,
618
+ "generated": null,
619
+ "name": "directory",
620
+ "entityType": "columns",
621
+ "table": "project_directory"
622
+ },
623
+ {
624
+ "type": "text",
625
+ "notNull": false,
626
+ "autoincrement": false,
627
+ "default": null,
628
+ "generated": null,
629
+ "name": "type",
630
+ "entityType": "columns",
631
+ "table": "project_directory"
632
+ },
633
+ {
634
+ "type": "text",
635
+ "notNull": false,
636
+ "autoincrement": false,
637
+ "default": null,
638
+ "generated": null,
639
+ "name": "strategy",
640
+ "entityType": "columns",
641
+ "table": "project_directory"
642
+ },
643
+ {
644
+ "type": "integer",
645
+ "notNull": true,
646
+ "autoincrement": false,
647
+ "default": null,
648
+ "generated": null,
649
+ "name": "time_created",
650
+ "entityType": "columns",
651
+ "table": "project_directory"
652
+ },
653
+ {
654
+ "type": "text",
655
+ "notNull": false,
656
+ "autoincrement": false,
657
+ "default": null,
658
+ "generated": null,
659
+ "name": "id",
660
+ "entityType": "columns",
661
+ "table": "project"
662
+ },
663
+ {
664
+ "type": "text",
665
+ "notNull": true,
666
+ "autoincrement": false,
667
+ "default": null,
668
+ "generated": null,
669
+ "name": "worktree",
670
+ "entityType": "columns",
671
+ "table": "project"
672
+ },
673
+ {
674
+ "type": "text",
675
+ "notNull": false,
676
+ "autoincrement": false,
677
+ "default": null,
678
+ "generated": null,
679
+ "name": "vcs",
680
+ "entityType": "columns",
681
+ "table": "project"
682
+ },
683
+ {
684
+ "type": "text",
685
+ "notNull": false,
686
+ "autoincrement": false,
687
+ "default": null,
688
+ "generated": null,
689
+ "name": "name",
690
+ "entityType": "columns",
691
+ "table": "project"
692
+ },
693
+ {
694
+ "type": "text",
695
+ "notNull": false,
696
+ "autoincrement": false,
697
+ "default": null,
698
+ "generated": null,
699
+ "name": "icon_url",
700
+ "entityType": "columns",
701
+ "table": "project"
702
+ },
703
+ {
704
+ "type": "text",
705
+ "notNull": false,
706
+ "autoincrement": false,
707
+ "default": null,
708
+ "generated": null,
709
+ "name": "icon_url_override",
710
+ "entityType": "columns",
711
+ "table": "project"
712
+ },
713
+ {
714
+ "type": "text",
715
+ "notNull": false,
716
+ "autoincrement": false,
717
+ "default": null,
718
+ "generated": null,
719
+ "name": "icon_color",
720
+ "entityType": "columns",
721
+ "table": "project"
722
+ },
723
+ {
724
+ "type": "integer",
725
+ "notNull": true,
726
+ "autoincrement": false,
727
+ "default": null,
728
+ "generated": null,
729
+ "name": "time_created",
730
+ "entityType": "columns",
731
+ "table": "project"
732
+ },
733
+ {
734
+ "type": "integer",
735
+ "notNull": true,
736
+ "autoincrement": false,
737
+ "default": null,
738
+ "generated": null,
739
+ "name": "time_updated",
740
+ "entityType": "columns",
741
+ "table": "project"
742
+ },
743
+ {
744
+ "type": "integer",
745
+ "notNull": false,
746
+ "autoincrement": false,
747
+ "default": null,
748
+ "generated": null,
749
+ "name": "time_initialized",
750
+ "entityType": "columns",
751
+ "table": "project"
752
+ },
753
+ {
754
+ "type": "text",
755
+ "notNull": true,
756
+ "autoincrement": false,
757
+ "default": null,
758
+ "generated": null,
759
+ "name": "sandboxes",
760
+ "entityType": "columns",
761
+ "table": "project"
762
+ },
763
+ {
764
+ "type": "text",
765
+ "notNull": false,
766
+ "autoincrement": false,
767
+ "default": null,
768
+ "generated": null,
769
+ "name": "commands",
770
+ "entityType": "columns",
771
+ "table": "project"
772
+ },
773
+ {
774
+ "type": "text",
775
+ "notNull": false,
776
+ "autoincrement": false,
777
+ "default": null,
778
+ "generated": null,
779
+ "name": "id",
780
+ "entityType": "columns",
781
+ "table": "message"
782
+ },
783
+ {
784
+ "type": "text",
785
+ "notNull": true,
786
+ "autoincrement": false,
787
+ "default": null,
788
+ "generated": null,
789
+ "name": "session_id",
790
+ "entityType": "columns",
791
+ "table": "message"
792
+ },
793
+ {
794
+ "type": "integer",
795
+ "notNull": true,
796
+ "autoincrement": false,
797
+ "default": null,
798
+ "generated": null,
799
+ "name": "time_created",
800
+ "entityType": "columns",
801
+ "table": "message"
802
+ },
803
+ {
804
+ "type": "integer",
805
+ "notNull": true,
806
+ "autoincrement": false,
807
+ "default": null,
808
+ "generated": null,
809
+ "name": "time_updated",
810
+ "entityType": "columns",
811
+ "table": "message"
812
+ },
813
+ {
814
+ "type": "text",
815
+ "notNull": true,
816
+ "autoincrement": false,
817
+ "default": null,
818
+ "generated": null,
819
+ "name": "data",
820
+ "entityType": "columns",
821
+ "table": "message"
822
+ },
823
+ {
824
+ "type": "text",
825
+ "notNull": false,
826
+ "autoincrement": false,
827
+ "default": null,
828
+ "generated": null,
829
+ "name": "id",
830
+ "entityType": "columns",
831
+ "table": "part"
832
+ },
833
+ {
834
+ "type": "text",
835
+ "notNull": true,
836
+ "autoincrement": false,
837
+ "default": null,
838
+ "generated": null,
839
+ "name": "message_id",
840
+ "entityType": "columns",
841
+ "table": "part"
842
+ },
843
+ {
844
+ "type": "text",
845
+ "notNull": true,
846
+ "autoincrement": false,
847
+ "default": null,
848
+ "generated": null,
849
+ "name": "session_id",
850
+ "entityType": "columns",
851
+ "table": "part"
852
+ },
853
+ {
854
+ "type": "integer",
855
+ "notNull": true,
856
+ "autoincrement": false,
857
+ "default": null,
858
+ "generated": null,
859
+ "name": "time_created",
860
+ "entityType": "columns",
861
+ "table": "part"
862
+ },
863
+ {
864
+ "type": "integer",
865
+ "notNull": true,
866
+ "autoincrement": false,
867
+ "default": null,
868
+ "generated": null,
869
+ "name": "time_updated",
870
+ "entityType": "columns",
871
+ "table": "part"
872
+ },
873
+ {
874
+ "type": "text",
875
+ "notNull": true,
876
+ "autoincrement": false,
877
+ "default": null,
878
+ "generated": null,
879
+ "name": "data",
880
+ "entityType": "columns",
881
+ "table": "part"
882
+ },
883
+ {
884
+ "type": "text",
885
+ "notNull": false,
886
+ "autoincrement": false,
887
+ "default": null,
888
+ "generated": null,
889
+ "name": "session_id",
890
+ "entityType": "columns",
891
+ "table": "session_context_epoch"
892
+ },
893
+ {
894
+ "type": "text",
895
+ "notNull": true,
896
+ "autoincrement": false,
897
+ "default": null,
898
+ "generated": null,
899
+ "name": "baseline",
900
+ "entityType": "columns",
901
+ "table": "session_context_epoch"
902
+ },
903
+ {
904
+ "type": "text",
905
+ "notNull": true,
906
+ "autoincrement": false,
907
+ "default": null,
908
+ "generated": null,
909
+ "name": "snapshot",
910
+ "entityType": "columns",
911
+ "table": "session_context_epoch"
912
+ },
913
+ {
914
+ "type": "integer",
915
+ "notNull": true,
916
+ "autoincrement": false,
917
+ "default": null,
918
+ "generated": null,
919
+ "name": "baseline_seq",
920
+ "entityType": "columns",
921
+ "table": "session_context_epoch"
922
+ },
923
+ {
924
+ "type": "text",
925
+ "notNull": false,
926
+ "autoincrement": false,
927
+ "default": null,
928
+ "generated": null,
929
+ "name": "id",
930
+ "entityType": "columns",
931
+ "table": "session_input"
932
+ },
933
+ {
934
+ "type": "text",
935
+ "notNull": true,
936
+ "autoincrement": false,
937
+ "default": null,
938
+ "generated": null,
939
+ "name": "session_id",
940
+ "entityType": "columns",
941
+ "table": "session_input"
942
+ },
943
+ {
944
+ "type": "text",
945
+ "notNull": true,
946
+ "autoincrement": false,
947
+ "default": null,
948
+ "generated": null,
949
+ "name": "prompt",
950
+ "entityType": "columns",
951
+ "table": "session_input"
952
+ },
953
+ {
954
+ "type": "text",
955
+ "notNull": true,
956
+ "autoincrement": false,
957
+ "default": null,
958
+ "generated": null,
959
+ "name": "delivery",
960
+ "entityType": "columns",
961
+ "table": "session_input"
962
+ },
963
+ {
964
+ "type": "integer",
965
+ "notNull": true,
966
+ "autoincrement": false,
967
+ "default": null,
968
+ "generated": null,
969
+ "name": "admitted_seq",
970
+ "entityType": "columns",
971
+ "table": "session_input"
972
+ },
973
+ {
974
+ "type": "integer",
975
+ "notNull": false,
976
+ "autoincrement": false,
977
+ "default": null,
978
+ "generated": null,
979
+ "name": "promoted_seq",
980
+ "entityType": "columns",
981
+ "table": "session_input"
982
+ },
983
+ {
984
+ "type": "integer",
985
+ "notNull": true,
986
+ "autoincrement": false,
987
+ "default": null,
988
+ "generated": null,
989
+ "name": "time_created",
990
+ "entityType": "columns",
991
+ "table": "session_input"
992
+ },
993
+ {
994
+ "type": "text",
995
+ "notNull": false,
996
+ "autoincrement": false,
997
+ "default": null,
998
+ "generated": null,
999
+ "name": "id",
1000
+ "entityType": "columns",
1001
+ "table": "session_message"
1002
+ },
1003
+ {
1004
+ "type": "text",
1005
+ "notNull": true,
1006
+ "autoincrement": false,
1007
+ "default": null,
1008
+ "generated": null,
1009
+ "name": "session_id",
1010
+ "entityType": "columns",
1011
+ "table": "session_message"
1012
+ },
1013
+ {
1014
+ "type": "text",
1015
+ "notNull": true,
1016
+ "autoincrement": false,
1017
+ "default": null,
1018
+ "generated": null,
1019
+ "name": "type",
1020
+ "entityType": "columns",
1021
+ "table": "session_message"
1022
+ },
1023
+ {
1024
+ "type": "integer",
1025
+ "notNull": true,
1026
+ "autoincrement": false,
1027
+ "default": null,
1028
+ "generated": null,
1029
+ "name": "seq",
1030
+ "entityType": "columns",
1031
+ "table": "session_message"
1032
+ },
1033
+ {
1034
+ "type": "integer",
1035
+ "notNull": true,
1036
+ "autoincrement": false,
1037
+ "default": null,
1038
+ "generated": null,
1039
+ "name": "time_created",
1040
+ "entityType": "columns",
1041
+ "table": "session_message"
1042
+ },
1043
+ {
1044
+ "type": "integer",
1045
+ "notNull": true,
1046
+ "autoincrement": false,
1047
+ "default": null,
1048
+ "generated": null,
1049
+ "name": "time_updated",
1050
+ "entityType": "columns",
1051
+ "table": "session_message"
1052
+ },
1053
+ {
1054
+ "type": "text",
1055
+ "notNull": true,
1056
+ "autoincrement": false,
1057
+ "default": null,
1058
+ "generated": null,
1059
+ "name": "data",
1060
+ "entityType": "columns",
1061
+ "table": "session_message"
1062
+ },
1063
+ {
1064
+ "type": "text",
1065
+ "notNull": false,
1066
+ "autoincrement": false,
1067
+ "default": null,
1068
+ "generated": null,
1069
+ "name": "id",
1070
+ "entityType": "columns",
1071
+ "table": "session"
1072
+ },
1073
+ {
1074
+ "type": "text",
1075
+ "notNull": true,
1076
+ "autoincrement": false,
1077
+ "default": null,
1078
+ "generated": null,
1079
+ "name": "project_id",
1080
+ "entityType": "columns",
1081
+ "table": "session"
1082
+ },
1083
+ {
1084
+ "type": "text",
1085
+ "notNull": false,
1086
+ "autoincrement": false,
1087
+ "default": null,
1088
+ "generated": null,
1089
+ "name": "workspace_id",
1090
+ "entityType": "columns",
1091
+ "table": "session"
1092
+ },
1093
+ {
1094
+ "type": "text",
1095
+ "notNull": false,
1096
+ "autoincrement": false,
1097
+ "default": null,
1098
+ "generated": null,
1099
+ "name": "parent_id",
1100
+ "entityType": "columns",
1101
+ "table": "session"
1102
+ },
1103
+ {
1104
+ "type": "text",
1105
+ "notNull": true,
1106
+ "autoincrement": false,
1107
+ "default": null,
1108
+ "generated": null,
1109
+ "name": "slug",
1110
+ "entityType": "columns",
1111
+ "table": "session"
1112
+ },
1113
+ {
1114
+ "type": "text",
1115
+ "notNull": true,
1116
+ "autoincrement": false,
1117
+ "default": null,
1118
+ "generated": null,
1119
+ "name": "directory",
1120
+ "entityType": "columns",
1121
+ "table": "session"
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "notNull": false,
1126
+ "autoincrement": false,
1127
+ "default": null,
1128
+ "generated": null,
1129
+ "name": "path",
1130
+ "entityType": "columns",
1131
+ "table": "session"
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "notNull": true,
1136
+ "autoincrement": false,
1137
+ "default": null,
1138
+ "generated": null,
1139
+ "name": "title",
1140
+ "entityType": "columns",
1141
+ "table": "session"
1142
+ },
1143
+ {
1144
+ "type": "text",
1145
+ "notNull": true,
1146
+ "autoincrement": false,
1147
+ "default": null,
1148
+ "generated": null,
1149
+ "name": "version",
1150
+ "entityType": "columns",
1151
+ "table": "session"
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "notNull": false,
1156
+ "autoincrement": false,
1157
+ "default": null,
1158
+ "generated": null,
1159
+ "name": "share_url",
1160
+ "entityType": "columns",
1161
+ "table": "session"
1162
+ },
1163
+ {
1164
+ "type": "integer",
1165
+ "notNull": false,
1166
+ "autoincrement": false,
1167
+ "default": null,
1168
+ "generated": null,
1169
+ "name": "summary_additions",
1170
+ "entityType": "columns",
1171
+ "table": "session"
1172
+ },
1173
+ {
1174
+ "type": "integer",
1175
+ "notNull": false,
1176
+ "autoincrement": false,
1177
+ "default": null,
1178
+ "generated": null,
1179
+ "name": "summary_deletions",
1180
+ "entityType": "columns",
1181
+ "table": "session"
1182
+ },
1183
+ {
1184
+ "type": "integer",
1185
+ "notNull": false,
1186
+ "autoincrement": false,
1187
+ "default": null,
1188
+ "generated": null,
1189
+ "name": "summary_files",
1190
+ "entityType": "columns",
1191
+ "table": "session"
1192
+ },
1193
+ {
1194
+ "type": "text",
1195
+ "notNull": false,
1196
+ "autoincrement": false,
1197
+ "default": null,
1198
+ "generated": null,
1199
+ "name": "summary_diffs",
1200
+ "entityType": "columns",
1201
+ "table": "session"
1202
+ },
1203
+ {
1204
+ "type": "text",
1205
+ "notNull": false,
1206
+ "autoincrement": false,
1207
+ "default": null,
1208
+ "generated": null,
1209
+ "name": "metadata",
1210
+ "entityType": "columns",
1211
+ "table": "session"
1212
+ },
1213
+ {
1214
+ "type": "real",
1215
+ "notNull": true,
1216
+ "autoincrement": false,
1217
+ "default": "0",
1218
+ "generated": null,
1219
+ "name": "cost",
1220
+ "entityType": "columns",
1221
+ "table": "session"
1222
+ },
1223
+ {
1224
+ "type": "integer",
1225
+ "notNull": true,
1226
+ "autoincrement": false,
1227
+ "default": "0",
1228
+ "generated": null,
1229
+ "name": "tokens_input",
1230
+ "entityType": "columns",
1231
+ "table": "session"
1232
+ },
1233
+ {
1234
+ "type": "integer",
1235
+ "notNull": true,
1236
+ "autoincrement": false,
1237
+ "default": "0",
1238
+ "generated": null,
1239
+ "name": "tokens_output",
1240
+ "entityType": "columns",
1241
+ "table": "session"
1242
+ },
1243
+ {
1244
+ "type": "integer",
1245
+ "notNull": true,
1246
+ "autoincrement": false,
1247
+ "default": "0",
1248
+ "generated": null,
1249
+ "name": "tokens_reasoning",
1250
+ "entityType": "columns",
1251
+ "table": "session"
1252
+ },
1253
+ {
1254
+ "type": "integer",
1255
+ "notNull": true,
1256
+ "autoincrement": false,
1257
+ "default": "0",
1258
+ "generated": null,
1259
+ "name": "tokens_cache_read",
1260
+ "entityType": "columns",
1261
+ "table": "session"
1262
+ },
1263
+ {
1264
+ "type": "integer",
1265
+ "notNull": true,
1266
+ "autoincrement": false,
1267
+ "default": "0",
1268
+ "generated": null,
1269
+ "name": "tokens_cache_write",
1270
+ "entityType": "columns",
1271
+ "table": "session"
1272
+ },
1273
+ {
1274
+ "type": "text",
1275
+ "notNull": false,
1276
+ "autoincrement": false,
1277
+ "default": null,
1278
+ "generated": null,
1279
+ "name": "revert",
1280
+ "entityType": "columns",
1281
+ "table": "session"
1282
+ },
1283
+ {
1284
+ "type": "text",
1285
+ "notNull": false,
1286
+ "autoincrement": false,
1287
+ "default": null,
1288
+ "generated": null,
1289
+ "name": "permission",
1290
+ "entityType": "columns",
1291
+ "table": "session"
1292
+ },
1293
+ {
1294
+ "type": "text",
1295
+ "notNull": false,
1296
+ "autoincrement": false,
1297
+ "default": null,
1298
+ "generated": null,
1299
+ "name": "agent",
1300
+ "entityType": "columns",
1301
+ "table": "session"
1302
+ },
1303
+ {
1304
+ "type": "text",
1305
+ "notNull": false,
1306
+ "autoincrement": false,
1307
+ "default": null,
1308
+ "generated": null,
1309
+ "name": "model",
1310
+ "entityType": "columns",
1311
+ "table": "session"
1312
+ },
1313
+ {
1314
+ "type": "integer",
1315
+ "notNull": true,
1316
+ "autoincrement": false,
1317
+ "default": null,
1318
+ "generated": null,
1319
+ "name": "time_created",
1320
+ "entityType": "columns",
1321
+ "table": "session"
1322
+ },
1323
+ {
1324
+ "type": "integer",
1325
+ "notNull": true,
1326
+ "autoincrement": false,
1327
+ "default": null,
1328
+ "generated": null,
1329
+ "name": "time_updated",
1330
+ "entityType": "columns",
1331
+ "table": "session"
1332
+ },
1333
+ {
1334
+ "type": "integer",
1335
+ "notNull": false,
1336
+ "autoincrement": false,
1337
+ "default": null,
1338
+ "generated": null,
1339
+ "name": "time_compacting",
1340
+ "entityType": "columns",
1341
+ "table": "session"
1342
+ },
1343
+ {
1344
+ "type": "integer",
1345
+ "notNull": false,
1346
+ "autoincrement": false,
1347
+ "default": null,
1348
+ "generated": null,
1349
+ "name": "time_archived",
1350
+ "entityType": "columns",
1351
+ "table": "session"
1352
+ },
1353
+ {
1354
+ "type": "text",
1355
+ "notNull": true,
1356
+ "autoincrement": false,
1357
+ "default": null,
1358
+ "generated": null,
1359
+ "name": "session_id",
1360
+ "entityType": "columns",
1361
+ "table": "todo"
1362
+ },
1363
+ {
1364
+ "type": "text",
1365
+ "notNull": true,
1366
+ "autoincrement": false,
1367
+ "default": null,
1368
+ "generated": null,
1369
+ "name": "content",
1370
+ "entityType": "columns",
1371
+ "table": "todo"
1372
+ },
1373
+ {
1374
+ "type": "text",
1375
+ "notNull": true,
1376
+ "autoincrement": false,
1377
+ "default": null,
1378
+ "generated": null,
1379
+ "name": "status",
1380
+ "entityType": "columns",
1381
+ "table": "todo"
1382
+ },
1383
+ {
1384
+ "type": "text",
1385
+ "notNull": true,
1386
+ "autoincrement": false,
1387
+ "default": null,
1388
+ "generated": null,
1389
+ "name": "priority",
1390
+ "entityType": "columns",
1391
+ "table": "todo"
1392
+ },
1393
+ {
1394
+ "type": "integer",
1395
+ "notNull": true,
1396
+ "autoincrement": false,
1397
+ "default": null,
1398
+ "generated": null,
1399
+ "name": "position",
1400
+ "entityType": "columns",
1401
+ "table": "todo"
1402
+ },
1403
+ {
1404
+ "type": "integer",
1405
+ "notNull": true,
1406
+ "autoincrement": false,
1407
+ "default": null,
1408
+ "generated": null,
1409
+ "name": "time_created",
1410
+ "entityType": "columns",
1411
+ "table": "todo"
1412
+ },
1413
+ {
1414
+ "type": "integer",
1415
+ "notNull": true,
1416
+ "autoincrement": false,
1417
+ "default": null,
1418
+ "generated": null,
1419
+ "name": "time_updated",
1420
+ "entityType": "columns",
1421
+ "table": "todo"
1422
+ },
1423
+ {
1424
+ "type": "text",
1425
+ "notNull": false,
1426
+ "autoincrement": false,
1427
+ "default": null,
1428
+ "generated": null,
1429
+ "name": "session_id",
1430
+ "entityType": "columns",
1431
+ "table": "session_share"
1432
+ },
1433
+ {
1434
+ "type": "text",
1435
+ "notNull": true,
1436
+ "autoincrement": false,
1437
+ "default": null,
1438
+ "generated": null,
1439
+ "name": "id",
1440
+ "entityType": "columns",
1441
+ "table": "session_share"
1442
+ },
1443
+ {
1444
+ "type": "text",
1445
+ "notNull": true,
1446
+ "autoincrement": false,
1447
+ "default": null,
1448
+ "generated": null,
1449
+ "name": "secret",
1450
+ "entityType": "columns",
1451
+ "table": "session_share"
1452
+ },
1453
+ {
1454
+ "type": "text",
1455
+ "notNull": true,
1456
+ "autoincrement": false,
1457
+ "default": null,
1458
+ "generated": null,
1459
+ "name": "url",
1460
+ "entityType": "columns",
1461
+ "table": "session_share"
1462
+ },
1463
+ {
1464
+ "type": "integer",
1465
+ "notNull": true,
1466
+ "autoincrement": false,
1467
+ "default": null,
1468
+ "generated": null,
1469
+ "name": "time_created",
1470
+ "entityType": "columns",
1471
+ "table": "session_share"
1472
+ },
1473
+ {
1474
+ "type": "integer",
1475
+ "notNull": true,
1476
+ "autoincrement": false,
1477
+ "default": null,
1478
+ "generated": null,
1479
+ "name": "time_updated",
1480
+ "entityType": "columns",
1481
+ "table": "session_share"
1482
+ },
1483
+ {
1484
+ "columns": ["project_id"],
1485
+ "tableTo": "project",
1486
+ "columnsTo": ["id"],
1487
+ "onUpdate": "NO ACTION",
1488
+ "onDelete": "CASCADE",
1489
+ "nameExplicit": false,
1490
+ "name": "fk_workspace_project_id_project_id_fk",
1491
+ "entityType": "fks",
1492
+ "table": "workspace"
1493
+ },
1494
+ {
1495
+ "columns": ["active_account_id"],
1496
+ "tableTo": "account",
1497
+ "columnsTo": ["id"],
1498
+ "onUpdate": "NO ACTION",
1499
+ "onDelete": "SET NULL",
1500
+ "nameExplicit": false,
1501
+ "name": "fk_account_state_active_account_id_account_id_fk",
1502
+ "entityType": "fks",
1503
+ "table": "account_state"
1504
+ },
1505
+ {
1506
+ "columns": ["aggregate_id"],
1507
+ "tableTo": "event_sequence",
1508
+ "columnsTo": ["aggregate_id"],
1509
+ "onUpdate": "NO ACTION",
1510
+ "onDelete": "CASCADE",
1511
+ "nameExplicit": false,
1512
+ "name": "fk_event_aggregate_id_event_sequence_aggregate_id_fk",
1513
+ "entityType": "fks",
1514
+ "table": "event"
1515
+ },
1516
+ {
1517
+ "columns": ["project_id"],
1518
+ "tableTo": "project",
1519
+ "columnsTo": ["id"],
1520
+ "onUpdate": "NO ACTION",
1521
+ "onDelete": "CASCADE",
1522
+ "nameExplicit": false,
1523
+ "name": "fk_permission_project_id_project_id_fk",
1524
+ "entityType": "fks",
1525
+ "table": "permission"
1526
+ },
1527
+ {
1528
+ "columns": ["project_id"],
1529
+ "tableTo": "project",
1530
+ "columnsTo": ["id"],
1531
+ "onUpdate": "NO ACTION",
1532
+ "onDelete": "CASCADE",
1533
+ "nameExplicit": false,
1534
+ "name": "fk_project_directory_project_id_project_id_fk",
1535
+ "entityType": "fks",
1536
+ "table": "project_directory"
1537
+ },
1538
+ {
1539
+ "columns": ["session_id"],
1540
+ "tableTo": "session",
1541
+ "columnsTo": ["id"],
1542
+ "onUpdate": "NO ACTION",
1543
+ "onDelete": "CASCADE",
1544
+ "nameExplicit": false,
1545
+ "name": "fk_message_session_id_session_id_fk",
1546
+ "entityType": "fks",
1547
+ "table": "message"
1548
+ },
1549
+ {
1550
+ "columns": ["message_id"],
1551
+ "tableTo": "message",
1552
+ "columnsTo": ["id"],
1553
+ "onUpdate": "NO ACTION",
1554
+ "onDelete": "CASCADE",
1555
+ "nameExplicit": false,
1556
+ "name": "fk_part_message_id_message_id_fk",
1557
+ "entityType": "fks",
1558
+ "table": "part"
1559
+ },
1560
+ {
1561
+ "columns": ["session_id"],
1562
+ "tableTo": "session",
1563
+ "columnsTo": ["id"],
1564
+ "onUpdate": "NO ACTION",
1565
+ "onDelete": "CASCADE",
1566
+ "nameExplicit": false,
1567
+ "name": "fk_session_context_epoch_session_id_session_id_fk",
1568
+ "entityType": "fks",
1569
+ "table": "session_context_epoch"
1570
+ },
1571
+ {
1572
+ "columns": ["session_id"],
1573
+ "tableTo": "session",
1574
+ "columnsTo": ["id"],
1575
+ "onUpdate": "NO ACTION",
1576
+ "onDelete": "CASCADE",
1577
+ "nameExplicit": false,
1578
+ "name": "fk_session_input_session_id_session_id_fk",
1579
+ "entityType": "fks",
1580
+ "table": "session_input"
1581
+ },
1582
+ {
1583
+ "columns": ["session_id"],
1584
+ "tableTo": "session",
1585
+ "columnsTo": ["id"],
1586
+ "onUpdate": "NO ACTION",
1587
+ "onDelete": "CASCADE",
1588
+ "nameExplicit": false,
1589
+ "name": "fk_session_message_session_id_session_id_fk",
1590
+ "entityType": "fks",
1591
+ "table": "session_message"
1592
+ },
1593
+ {
1594
+ "columns": ["project_id"],
1595
+ "tableTo": "project",
1596
+ "columnsTo": ["id"],
1597
+ "onUpdate": "NO ACTION",
1598
+ "onDelete": "CASCADE",
1599
+ "nameExplicit": false,
1600
+ "name": "fk_session_project_id_project_id_fk",
1601
+ "entityType": "fks",
1602
+ "table": "session"
1603
+ },
1604
+ {
1605
+ "columns": ["session_id"],
1606
+ "tableTo": "session",
1607
+ "columnsTo": ["id"],
1608
+ "onUpdate": "NO ACTION",
1609
+ "onDelete": "CASCADE",
1610
+ "nameExplicit": false,
1611
+ "name": "fk_todo_session_id_session_id_fk",
1612
+ "entityType": "fks",
1613
+ "table": "todo"
1614
+ },
1615
+ {
1616
+ "columns": ["session_id"],
1617
+ "tableTo": "session",
1618
+ "columnsTo": ["id"],
1619
+ "onUpdate": "NO ACTION",
1620
+ "onDelete": "CASCADE",
1621
+ "nameExplicit": false,
1622
+ "name": "fk_session_share_session_id_session_id_fk",
1623
+ "entityType": "fks",
1624
+ "table": "session_share"
1625
+ },
1626
+ {
1627
+ "columns": ["email", "url"],
1628
+ "nameExplicit": false,
1629
+ "name": "control_account_pk",
1630
+ "entityType": "pks",
1631
+ "table": "control_account"
1632
+ },
1633
+ {
1634
+ "columns": ["project_id", "directory"],
1635
+ "nameExplicit": false,
1636
+ "name": "project_directory_pk",
1637
+ "entityType": "pks",
1638
+ "table": "project_directory"
1639
+ },
1640
+ {
1641
+ "columns": ["session_id", "position"],
1642
+ "nameExplicit": false,
1643
+ "name": "todo_pk",
1644
+ "entityType": "pks",
1645
+ "table": "todo"
1646
+ },
1647
+ {
1648
+ "columns": ["id"],
1649
+ "nameExplicit": false,
1650
+ "name": "workspace_pk",
1651
+ "table": "workspace",
1652
+ "entityType": "pks"
1653
+ },
1654
+ {
1655
+ "columns": ["name"],
1656
+ "nameExplicit": false,
1657
+ "name": "data_migration_pk",
1658
+ "table": "data_migration",
1659
+ "entityType": "pks"
1660
+ },
1661
+ {
1662
+ "columns": ["id"],
1663
+ "nameExplicit": false,
1664
+ "name": "account_state_pk",
1665
+ "table": "account_state",
1666
+ "entityType": "pks"
1667
+ },
1668
+ {
1669
+ "columns": ["id"],
1670
+ "nameExplicit": false,
1671
+ "name": "account_pk",
1672
+ "table": "account",
1673
+ "entityType": "pks"
1674
+ },
1675
+ {
1676
+ "columns": ["id"],
1677
+ "nameExplicit": false,
1678
+ "name": "credential_pk",
1679
+ "table": "credential",
1680
+ "entityType": "pks"
1681
+ },
1682
+ {
1683
+ "columns": ["aggregate_id"],
1684
+ "nameExplicit": false,
1685
+ "name": "event_sequence_pk",
1686
+ "table": "event_sequence",
1687
+ "entityType": "pks"
1688
+ },
1689
+ {
1690
+ "columns": ["id"],
1691
+ "nameExplicit": false,
1692
+ "name": "event_pk",
1693
+ "table": "event",
1694
+ "entityType": "pks"
1695
+ },
1696
+ {
1697
+ "columns": ["id"],
1698
+ "nameExplicit": false,
1699
+ "name": "permission_pk",
1700
+ "table": "permission",
1701
+ "entityType": "pks"
1702
+ },
1703
+ {
1704
+ "columns": ["id"],
1705
+ "nameExplicit": false,
1706
+ "name": "project_pk",
1707
+ "table": "project",
1708
+ "entityType": "pks"
1709
+ },
1710
+ {
1711
+ "columns": ["id"],
1712
+ "nameExplicit": false,
1713
+ "name": "message_pk",
1714
+ "table": "message",
1715
+ "entityType": "pks"
1716
+ },
1717
+ {
1718
+ "columns": ["id"],
1719
+ "nameExplicit": false,
1720
+ "name": "part_pk",
1721
+ "table": "part",
1722
+ "entityType": "pks"
1723
+ },
1724
+ {
1725
+ "columns": ["session_id"],
1726
+ "nameExplicit": false,
1727
+ "name": "session_context_epoch_pk",
1728
+ "table": "session_context_epoch",
1729
+ "entityType": "pks"
1730
+ },
1731
+ {
1732
+ "columns": ["id"],
1733
+ "nameExplicit": false,
1734
+ "name": "session_input_pk",
1735
+ "table": "session_input",
1736
+ "entityType": "pks"
1737
+ },
1738
+ {
1739
+ "columns": ["id"],
1740
+ "nameExplicit": false,
1741
+ "name": "session_message_pk",
1742
+ "table": "session_message",
1743
+ "entityType": "pks"
1744
+ },
1745
+ {
1746
+ "columns": ["id"],
1747
+ "nameExplicit": false,
1748
+ "name": "session_pk",
1749
+ "table": "session",
1750
+ "entityType": "pks"
1751
+ },
1752
+ {
1753
+ "columns": ["session_id"],
1754
+ "nameExplicit": false,
1755
+ "name": "session_share_pk",
1756
+ "table": "session_share",
1757
+ "entityType": "pks"
1758
+ },
1759
+ {
1760
+ "columns": [
1761
+ {
1762
+ "value": "aggregate_id",
1763
+ "isExpression": false
1764
+ },
1765
+ {
1766
+ "value": "seq",
1767
+ "isExpression": false
1768
+ }
1769
+ ],
1770
+ "isUnique": true,
1771
+ "where": null,
1772
+ "origin": "manual",
1773
+ "name": "event_aggregate_seq_idx",
1774
+ "entityType": "indexes",
1775
+ "table": "event"
1776
+ },
1777
+ {
1778
+ "columns": [
1779
+ {
1780
+ "value": "aggregate_id",
1781
+ "isExpression": false
1782
+ },
1783
+ {
1784
+ "value": "type",
1785
+ "isExpression": false
1786
+ },
1787
+ {
1788
+ "value": "seq",
1789
+ "isExpression": false
1790
+ }
1791
+ ],
1792
+ "isUnique": false,
1793
+ "where": null,
1794
+ "origin": "manual",
1795
+ "name": "event_aggregate_type_seq_idx",
1796
+ "entityType": "indexes",
1797
+ "table": "event"
1798
+ },
1799
+ {
1800
+ "columns": [
1801
+ {
1802
+ "value": "project_id",
1803
+ "isExpression": false
1804
+ },
1805
+ {
1806
+ "value": "action",
1807
+ "isExpression": false
1808
+ },
1809
+ {
1810
+ "value": "resource",
1811
+ "isExpression": false
1812
+ }
1813
+ ],
1814
+ "isUnique": true,
1815
+ "where": null,
1816
+ "origin": "manual",
1817
+ "name": "permission_project_action_resource_idx",
1818
+ "entityType": "indexes",
1819
+ "table": "permission"
1820
+ },
1821
+ {
1822
+ "columns": [
1823
+ {
1824
+ "value": "session_id",
1825
+ "isExpression": false
1826
+ },
1827
+ {
1828
+ "value": "time_created",
1829
+ "isExpression": false
1830
+ },
1831
+ {
1832
+ "value": "id",
1833
+ "isExpression": false
1834
+ }
1835
+ ],
1836
+ "isUnique": false,
1837
+ "where": null,
1838
+ "origin": "manual",
1839
+ "name": "message_session_time_created_id_idx",
1840
+ "entityType": "indexes",
1841
+ "table": "message"
1842
+ },
1843
+ {
1844
+ "columns": [
1845
+ {
1846
+ "value": "message_id",
1847
+ "isExpression": false
1848
+ },
1849
+ {
1850
+ "value": "id",
1851
+ "isExpression": false
1852
+ }
1853
+ ],
1854
+ "isUnique": false,
1855
+ "where": null,
1856
+ "origin": "manual",
1857
+ "name": "part_message_id_id_idx",
1858
+ "entityType": "indexes",
1859
+ "table": "part"
1860
+ },
1861
+ {
1862
+ "columns": [
1863
+ {
1864
+ "value": "session_id",
1865
+ "isExpression": false
1866
+ }
1867
+ ],
1868
+ "isUnique": false,
1869
+ "where": null,
1870
+ "origin": "manual",
1871
+ "name": "part_session_idx",
1872
+ "entityType": "indexes",
1873
+ "table": "part"
1874
+ },
1875
+ {
1876
+ "columns": [
1877
+ {
1878
+ "value": "session_id",
1879
+ "isExpression": false
1880
+ },
1881
+ {
1882
+ "value": "promoted_seq",
1883
+ "isExpression": false
1884
+ },
1885
+ {
1886
+ "value": "delivery",
1887
+ "isExpression": false
1888
+ },
1889
+ {
1890
+ "value": "admitted_seq",
1891
+ "isExpression": false
1892
+ }
1893
+ ],
1894
+ "isUnique": false,
1895
+ "where": null,
1896
+ "origin": "manual",
1897
+ "name": "session_input_session_pending_delivery_seq_idx",
1898
+ "entityType": "indexes",
1899
+ "table": "session_input"
1900
+ },
1901
+ {
1902
+ "columns": [
1903
+ {
1904
+ "value": "session_id",
1905
+ "isExpression": false
1906
+ },
1907
+ {
1908
+ "value": "admitted_seq",
1909
+ "isExpression": false
1910
+ }
1911
+ ],
1912
+ "isUnique": true,
1913
+ "where": null,
1914
+ "origin": "manual",
1915
+ "name": "session_input_session_admitted_seq_idx",
1916
+ "entityType": "indexes",
1917
+ "table": "session_input"
1918
+ },
1919
+ {
1920
+ "columns": [
1921
+ {
1922
+ "value": "session_id",
1923
+ "isExpression": false
1924
+ },
1925
+ {
1926
+ "value": "promoted_seq",
1927
+ "isExpression": false
1928
+ }
1929
+ ],
1930
+ "isUnique": true,
1931
+ "where": null,
1932
+ "origin": "manual",
1933
+ "name": "session_input_session_promoted_seq_idx",
1934
+ "entityType": "indexes",
1935
+ "table": "session_input"
1936
+ },
1937
+ {
1938
+ "columns": [
1939
+ {
1940
+ "value": "session_id",
1941
+ "isExpression": false
1942
+ },
1943
+ {
1944
+ "value": "seq",
1945
+ "isExpression": false
1946
+ }
1947
+ ],
1948
+ "isUnique": true,
1949
+ "where": null,
1950
+ "origin": "manual",
1951
+ "name": "session_message_session_seq_idx",
1952
+ "entityType": "indexes",
1953
+ "table": "session_message"
1954
+ },
1955
+ {
1956
+ "columns": [
1957
+ {
1958
+ "value": "session_id",
1959
+ "isExpression": false
1960
+ },
1961
+ {
1962
+ "value": "type",
1963
+ "isExpression": false
1964
+ },
1965
+ {
1966
+ "value": "seq",
1967
+ "isExpression": false
1968
+ }
1969
+ ],
1970
+ "isUnique": false,
1971
+ "where": null,
1972
+ "origin": "manual",
1973
+ "name": "session_message_session_type_seq_idx",
1974
+ "entityType": "indexes",
1975
+ "table": "session_message"
1976
+ },
1977
+ {
1978
+ "columns": [
1979
+ {
1980
+ "value": "session_id",
1981
+ "isExpression": false
1982
+ },
1983
+ {
1984
+ "value": "time_created",
1985
+ "isExpression": false
1986
+ },
1987
+ {
1988
+ "value": "id",
1989
+ "isExpression": false
1990
+ }
1991
+ ],
1992
+ "isUnique": false,
1993
+ "where": null,
1994
+ "origin": "manual",
1995
+ "name": "session_message_session_time_created_id_idx",
1996
+ "entityType": "indexes",
1997
+ "table": "session_message"
1998
+ },
1999
+ {
2000
+ "columns": [
2001
+ {
2002
+ "value": "time_created",
2003
+ "isExpression": false
2004
+ }
2005
+ ],
2006
+ "isUnique": false,
2007
+ "where": null,
2008
+ "origin": "manual",
2009
+ "name": "session_message_time_created_idx",
2010
+ "entityType": "indexes",
2011
+ "table": "session_message"
2012
+ },
2013
+ {
2014
+ "columns": [
2015
+ {
2016
+ "value": "project_id",
2017
+ "isExpression": false
2018
+ }
2019
+ ],
2020
+ "isUnique": false,
2021
+ "where": null,
2022
+ "origin": "manual",
2023
+ "name": "session_project_idx",
2024
+ "entityType": "indexes",
2025
+ "table": "session"
2026
+ },
2027
+ {
2028
+ "columns": [
2029
+ {
2030
+ "value": "workspace_id",
2031
+ "isExpression": false
2032
+ }
2033
+ ],
2034
+ "isUnique": false,
2035
+ "where": null,
2036
+ "origin": "manual",
2037
+ "name": "session_workspace_idx",
2038
+ "entityType": "indexes",
2039
+ "table": "session"
2040
+ },
2041
+ {
2042
+ "columns": [
2043
+ {
2044
+ "value": "parent_id",
2045
+ "isExpression": false
2046
+ }
2047
+ ],
2048
+ "isUnique": false,
2049
+ "where": null,
2050
+ "origin": "manual",
2051
+ "name": "session_parent_idx",
2052
+ "entityType": "indexes",
2053
+ "table": "session"
2054
+ },
2055
+ {
2056
+ "columns": [
2057
+ {
2058
+ "value": "session_id",
2059
+ "isExpression": false
2060
+ }
2061
+ ],
2062
+ "isUnique": false,
2063
+ "where": null,
2064
+ "origin": "manual",
2065
+ "name": "todo_session_idx",
2066
+ "entityType": "indexes",
2067
+ "table": "todo"
2068
+ }
2069
+ ],
2070
+ "renames": []
2071
+ }