okengine 0.11.2 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1273) hide show
  1. package/manifest.v1.schema.json +1 -1
  2. package/package.json +57 -3
  3. package/site/content/docs/ai/index.mdx +2 -2
  4. package/site/content/docs/ai/llms-txt.mdx +21 -16
  5. package/site/content/docs/ai/mcp.mdx +1 -1
  6. package/site/content/docs/ai/skills.mdx +16 -14
  7. package/site/content/docs/deployment/docker-swarm.mdx +7 -8
  8. package/site/content/docs/deployment/docker.mdx +20 -12
  9. package/site/content/docs/deployment/index.mdx +2 -2
  10. package/site/content/docs/deployment/kubernetes.mdx +2 -2
  11. package/site/content/docs/deployment/reverse-proxy.mdx +39 -21
  12. package/site/content/docs/elements/ai.mdx +25 -15
  13. package/site/content/docs/elements/channel.mdx +2 -2
  14. package/site/content/docs/elements/clock.mdx +11 -1
  15. package/site/content/docs/elements/flow.mdx +66 -16
  16. package/site/content/docs/elements/gate.mdx +47 -39
  17. package/site/content/docs/elements/signal.mdx +2 -2
  18. package/site/content/docs/elements/store.mdx +211 -48
  19. package/site/content/docs/elements/vault.mdx +126 -41
  20. package/site/content/docs/get-started/basic-usage.mdx +14 -6
  21. package/site/content/docs/get-started/installation.mdx +24 -16
  22. package/site/content/docs/plugins/cors.mdx +9 -9
  23. package/site/content/docs/plugins/csrf.mdx +1 -1
  24. package/site/content/docs/providers/cockroachdb.mdx +13 -0
  25. package/site/content/docs/providers/index.mdx +1 -0
  26. package/site/content/docs/providers/neon.mdx +22 -0
  27. package/site/content/docs/providers/supabase.mdx +17 -0
  28. package/site/content/docs/providers/yugabytedb.mdx +15 -0
  29. package/site/content/docs/recipes/caddy.mdx +3 -3
  30. package/site/content/docs/recipes/cockroachdb.mdx +8 -2
  31. package/site/content/docs/recipes/dragonfly.mdx +4 -3
  32. package/site/content/docs/recipes/index.mdx +6 -1
  33. package/site/content/docs/recipes/llama-cpp.mdx +5 -6
  34. package/site/content/docs/recipes/mailpit.mdx +3 -3
  35. package/site/content/docs/recipes/meilisearch.mdx +4 -4
  36. package/site/content/docs/recipes/meta.json +1 -0
  37. package/site/content/docs/recipes/nginx.mdx +117 -0
  38. package/site/content/docs/recipes/ollama.mdx +3 -3
  39. package/site/content/docs/recipes/pgdog.mdx +1 -1
  40. package/site/content/docs/recipes/postgres.mdx +44 -8
  41. package/site/content/docs/recipes/redis.mdx +11 -7
  42. package/site/content/docs/recipes/rustfs.mdx +4 -4
  43. package/site/content/docs/recipes/sglang.mdx +2 -2
  44. package/site/content/docs/recipes/supabase-docker.mdx +24 -0
  45. package/site/content/docs/recipes/timescale.mdx +30 -6
  46. package/site/content/docs/recipes/traefik.mdx +10 -7
  47. package/site/content/docs/recipes/valkey.mdx +5 -3
  48. package/site/content/docs/recipes/vllm.mdx +2 -2
  49. package/site/content/docs/recipes/yugabytedb.mdx +7 -1
  50. package/site/content/docs/reference/cli.md +67 -34
  51. package/site/content/docs/reference/client.mdx +39 -20
  52. package/site/content/docs/reference/configuration.mdx +34 -25
  53. package/site/content/docs/reference/environment-variables.mdx +28 -25
  54. package/site/content/docs/reference/errors.mdx +25 -20
  55. package/site/content/docs/reference/fx.mdx +19 -12
  56. package/site/content/docs/reference/plugins.mdx +2 -2
  57. package/site/content/docs/reference/security.md +16 -7
  58. package/src/auth/auth.test.ts +2 -2
  59. package/src/auth/bindings.ts +5 -5
  60. package/src/auth/config.ts +8 -0
  61. package/src/auth/gate-auth.test.ts +5 -5
  62. package/src/auth/index.ts +3 -0
  63. package/src/auth/operator.ts +1 -1
  64. package/src/auth/password-policy.test.ts +142 -5
  65. package/src/auth/password-policy.ts +128 -12
  66. package/src/auth/plugin.ts +2 -2
  67. package/src/cli/ai-setup/ai-setup.test.ts +1 -1
  68. package/src/cli/ai-setup/apply.ts +3 -18
  69. package/src/cli/ai-setup/index.ts +4 -4
  70. package/src/cli/ai-setup/prompts.ts +1 -1
  71. package/src/cli/ask-seed.test.ts +27 -0
  72. package/src/cli/ask-seed.ts +11 -7
  73. package/src/cli/attach-host-console.test.ts +134 -0
  74. package/src/cli/attach-host-console.ts +100 -0
  75. package/src/cli/console-cmd.test.ts +81 -0
  76. package/src/cli/console-cmd.ts +107 -0
  77. package/src/cli/db-seed.ts +14 -3
  78. package/src/cli/db.test.ts +37 -2
  79. package/src/cli/db.ts +26 -0
  80. package/src/cli/dev-app-runner.ts +6 -40
  81. package/src/cli/dev-console-vite.test.ts +86 -0
  82. package/src/cli/dev-console-vite.ts +164 -0
  83. package/src/cli/dev-schema-sync.ts +2 -2
  84. package/src/cli/dev.test.ts +78 -2
  85. package/src/cli/dev.ts +170 -56
  86. package/src/cli/docker-cli.test.ts +2 -2
  87. package/src/cli/docker.ts +1 -1
  88. package/src/cli/doctor.ts +2 -1
  89. package/src/cli/drizzle-env.test.ts +4 -9
  90. package/src/cli/drizzle-env.ts +2 -2
  91. package/src/cli/hero-meta.test.ts +37 -0
  92. package/src/cli/hero-meta.ts +30 -9
  93. package/src/cli/index.ts +5 -0
  94. package/src/cli/load-config.images.test.ts +13 -12
  95. package/src/cli/load-config.ts +1 -1
  96. package/src/cli/project-state.test.ts +6 -2
  97. package/src/cli/project-state.ts +27 -11
  98. package/src/cli/registry.ts +11 -0
  99. package/src/cli/replay.ts +7 -2
  100. package/src/cli/vault-cmd.test.ts +2 -0
  101. package/src/cli/vault-cmd.ts +7 -2
  102. package/src/client/create.test.ts +38 -2
  103. package/src/client/create.ts +16 -11
  104. package/src/client/index.ts +6 -0
  105. package/src/client/pager.test.ts +66 -0
  106. package/src/client/pager.ts +138 -0
  107. package/src/client/transport.ts +9 -6
  108. package/src/client/types.ts +58 -10
  109. package/src/compiler/aot.test.ts +12 -2
  110. package/src/compiler/effects-infer.ts +13 -4
  111. package/src/compiler/extract.test.ts +257 -5
  112. package/src/compiler/extract.ts +324 -58
  113. package/src/compiler/fixtures/skyport/src/flows/bookings/index.ts +2 -2
  114. package/src/compiler/fixtures/skyport/src/gates.ts +2 -0
  115. package/src/compiler/fixtures/skyport.expected.json +4 -0
  116. package/src/config/driver-defaults.test.ts +3 -0
  117. package/src/config/driver-defaults.ts +14 -0
  118. package/src/config/index.ts +5 -0
  119. package/src/console/budget.test.ts +27 -37
  120. package/src/console/index.ts +3 -0
  121. package/src/console/password-policy.ts +89 -0
  122. package/src/console/server/app.ts +138 -12
  123. package/src/console/server/auth-rate.test.ts +3 -3
  124. package/src/console/server/auth-store.test.ts +222 -0
  125. package/src/console/server/auth-store.ts +499 -0
  126. package/src/console/server/bind.ts +2 -3
  127. package/src/console/server/channels.test.ts +1 -1
  128. package/src/console/server/claim.test.ts +60 -1
  129. package/src/console/server/claim.ts +137 -2
  130. package/src/console/server/console.test.ts +102 -6
  131. package/src/console/server/dry-run.audit.test.ts +5 -2
  132. package/src/console/server/files-catalog.test.ts +51 -0
  133. package/src/console/server/files-catalog.ts +122 -0
  134. package/src/console/server/flows-invoke.test.ts +655 -38
  135. package/src/console/server/flows.ts +907 -90
  136. package/src/console/server/gates.test.ts +59 -0
  137. package/src/console/server/gates.ts +17 -14
  138. package/src/console/server/i18n.ts +7 -4
  139. package/src/console/server/index-search.test.ts +57 -0
  140. package/src/console/server/index-search.ts +102 -0
  141. package/src/console/server/index.ts +32 -1
  142. package/src/console/server/instances.test.ts +68 -0
  143. package/src/console/server/instances.ts +58 -0
  144. package/src/console/server/invoke-user-flow.test.ts +206 -0
  145. package/src/console/server/invoke-user-flow.ts +367 -0
  146. package/src/console/server/live.test.ts +44 -1
  147. package/src/console/server/live.ts +16 -0
  148. package/src/console/server/operator-db.test.ts +5 -5
  149. package/src/console/server/operator-db.ts +2 -2
  150. package/src/console/server/panel-load.ts +1 -0
  151. package/src/console/server/plugin.ts +12 -2
  152. package/src/console/server/runs-history.test.ts +143 -0
  153. package/src/console/server/runs-ingest.test.ts +379 -0
  154. package/src/console/server/runs-ingest.ts +127 -0
  155. package/src/console/server/runs-list-nesting.test.ts +97 -0
  156. package/src/console/server/runs-pii.test.ts +69 -0
  157. package/src/console/server/runs-pii.ts +50 -4
  158. package/src/console/server/runs-query-guard.test.ts +75 -0
  159. package/src/console/server/runs-query-guard.ts +224 -0
  160. package/src/console/server/runs-query-mask.test.ts +37 -0
  161. package/src/console/server/runs-query-mask.ts +82 -0
  162. package/src/console/server/runs-query.test.ts +287 -0
  163. package/src/console/server/runs-query.ts +107 -0
  164. package/src/console/server/security-headers.ts +21 -2
  165. package/src/console/server/security.gate.test.ts +306 -3
  166. package/src/console/server/serve.ts +138 -9
  167. package/src/console/server/spa-paths.test.ts +36 -0
  168. package/src/console/server/spa-proxy.test.ts +86 -0
  169. package/src/console/server/sql-catalog.ts +572 -0
  170. package/src/console/server/sql-extension.test.ts +19 -0
  171. package/src/console/server/sql-rls.test.ts +44 -0
  172. package/src/console/server/state.ts +445 -7
  173. package/src/console/server/store-kv-stats.test.ts +178 -0
  174. package/src/console/server/store-kv-stats.ts +339 -0
  175. package/src/console/server/store-stats.test.ts +165 -0
  176. package/src/console/server/store-stats.ts +526 -0
  177. package/src/console/server/store.test.ts +930 -0
  178. package/src/console/server/store.ts +859 -76
  179. package/src/console/server/traces-replay.test.ts +212 -0
  180. package/src/console/server/vault-http.test.ts +458 -0
  181. package/src/console/server/vault-overlay.test.ts +49 -0
  182. package/src/console/server/vault-overlay.ts +99 -0
  183. package/src/console/server/vault.test.ts +75 -0
  184. package/src/console/server/vault.ts +443 -27
  185. package/src/console/ui-next/components.json +26 -0
  186. package/src/console/ui-next/dist/assets/bash-CLZ0U2zV.js +1 -0
  187. package/src/console/ui-next/dist/assets/cache-glyph-CLPBqZeb.js +1 -0
  188. package/src/console/ui-next/dist/assets/call-pii-button-bqkxMrJH.js +1 -0
  189. package/src/console/ui-next/dist/assets/collapsible-DYb0xU8C.js +1 -0
  190. package/src/console/ui-next/dist/assets/confirm-sheet-DDCRmG62.js +1 -0
  191. package/src/console/ui-next/dist/assets/dagre.esm-ZwcdTuZZ.js +1 -0
  192. package/src/console/ui-next/dist/assets/duration-tone-oiRxPVsZ.js +9 -0
  193. package/src/console/ui-next/dist/assets/explorer-empty-HjTnVQoR.js +1 -0
  194. package/src/console/ui-next/dist/assets/flows-page-Dg8CTE29.js +1 -0
  195. package/src/console/ui-next/dist/assets/github-dark-C-LZuMrd.js +1 -0
  196. package/src/console/ui-next/dist/assets/github-light-EUqPIrTm.js +1 -0
  197. package/src/console/ui-next/dist/assets/highlighted-json-CvDPvveV.js +154 -0
  198. package/src/console/ui-next/dist/assets/http-method-BJ92Z_ke.js +1 -0
  199. package/src/console/ui-next/dist/assets/index-Bp-R7jtM.js +66 -0
  200. package/src/console/ui-next/dist/assets/index-D4Ldtj79.css +2 -0
  201. package/src/console/ui-next/dist/assets/json-qhed-kSA.js +1 -0
  202. package/src/console/ui-next/dist/assets/link-DF7SZ9Ek.js +1 -0
  203. package/src/console/ui-next/dist/assets/observability-page-DAnpEaq1.js +4 -0
  204. package/src/console/ui-next/dist/assets/preload-helper-oH4irX4C.js +1 -0
  205. package/src/console/ui-next/dist/assets/query-gate-parts-1m8m1iNp.js +2 -0
  206. package/src/console/ui-next/dist/assets/react-B1ML8gxg.js +1 -0
  207. package/src/console/ui-next/dist/assets/react-dom-Bph1y7z7.js +9 -0
  208. package/src/console/ui-next/dist/assets/replica-lag-C8_BRt2x.js +18 -0
  209. package/src/console/ui-next/dist/assets/rolldown-runtime-hePW80VL.js +1 -0
  210. package/src/console/ui-next/dist/assets/sheet-form-D-ata7jy.js +1 -0
  211. package/src/console/ui-next/dist/assets/shortcut-Cgzuv4k1.js +1 -0
  212. package/src/console/ui-next/dist/assets/shortcut-keys-DO4IsVqv.js +1 -0
  213. package/src/console/ui-next/dist/assets/skeleton-CL_X0GCj.js +1 -0
  214. package/src/console/ui-next/dist/assets/sql-BskegiFM.js +1 -0
  215. package/src/console/ui-next/dist/assets/store-page-v3LXdYpr.js +45 -0
  216. package/src/console/ui-next/dist/assets/trace-detail-sheet-D16lWQMt.js +2 -0
  217. package/src/console/ui-next/dist/assets/tsx-udAQXfEw.js +1 -0
  218. package/src/console/ui-next/dist/assets/typescript-bsJCZSQ-.js +1 -0
  219. package/src/console/ui-next/dist/assets/units-page-BtQ0bqMe.js +1 -0
  220. package/src/console/ui-next/dist/assets/use-vault-list-Cl79j_ku.js +1 -0
  221. package/src/console/ui-next/dist/assets/vault-page-Ca-MvcmJ.js +2 -0
  222. package/src/console/ui-next/dist/assets/xyflow-D7n4g6go.js +7 -0
  223. package/src/console/ui-next/dist/assets/xyflow-DZ0Ws1xk.css +1 -0
  224. package/src/console/ui-next/dist/favicon.svg +6 -0
  225. package/src/console/ui-next/dist/index.html +56 -0
  226. package/src/console/ui-next/index.html +45 -0
  227. package/src/console/ui-next/public/favicon.svg +6 -0
  228. package/src/console/ui-next/seed-invoke-host.test.ts +47 -0
  229. package/src/console/ui-next/seed-invoke-host.ts +199 -0
  230. package/src/console/ui-next/seed-invoke-ops.test.ts +280 -0
  231. package/src/console/ui-next/seed-invoke-ops.ts +587 -0
  232. package/src/console/ui-next/src/client-session.test.ts +22 -0
  233. package/src/console/ui-next/src/client.ts +1379 -0
  234. package/src/console/ui-next/src/components/agents/agent-code.tsx +207 -0
  235. package/src/console/ui-next/src/components/agents/agent-disclosure.tsx +63 -0
  236. package/src/console/ui-next/src/components/agents/file-diff.tsx +271 -0
  237. package/src/console/ui-next/src/components/auth-card.tsx +298 -0
  238. package/src/console/ui-next/src/components/charts/animation.ts +36 -0
  239. package/src/console/ui-next/src/components/charts/area-chart-loading.tsx +115 -0
  240. package/src/console/ui-next/src/components/charts/area-chart.tsx +261 -0
  241. package/src/console/ui-next/src/components/charts/area-gradient-defs.tsx +98 -0
  242. package/src/console/ui-next/src/components/charts/area.tsx +349 -0
  243. package/src/console/ui-next/src/components/charts/chart-child-passthrough.ts +110 -0
  244. package/src/console/ui-next/src/components/charts/chart-config-context.tsx +81 -0
  245. package/src/console/ui-next/src/components/charts/chart-context.tsx +414 -0
  246. package/src/console/ui-next/src/components/charts/chart-defs.ts +61 -0
  247. package/src/console/ui-next/src/components/charts/chart-formatters.ts +26 -0
  248. package/src/console/ui-next/src/components/charts/chart-legend-hover.tsx +41 -0
  249. package/src/console/ui-next/src/components/charts/chart-loading-label.tsx +56 -0
  250. package/src/console/ui-next/src/components/charts/chart-phase.ts +52 -0
  251. package/src/console/ui-next/src/components/charts/chart-reveal-clip.tsx +87 -0
  252. package/src/console/ui-next/src/components/charts/composed-chart.tsx +333 -0
  253. package/src/console/ui-next/src/components/charts/dash-tail-stroke.tsx +75 -0
  254. package/src/console/ui-next/src/components/charts/decimate-time-series.ts +134 -0
  255. package/src/console/ui-next/src/components/charts/fade-edges.ts +52 -0
  256. package/src/console/ui-next/src/components/charts/filter-data-by-x-domain.ts +59 -0
  257. package/src/console/ui-next/src/components/charts/generate-chart-skeleton-data.ts +42 -0
  258. package/src/console/ui-next/src/components/charts/grid.tsx +299 -0
  259. package/src/console/ui-next/src/components/charts/highlight-segment-bounds.ts +68 -0
  260. package/src/console/ui-next/src/components/charts/highlight-segment.tsx +65 -0
  261. package/src/console/ui-next/src/components/charts/indicator-fade.ts +62 -0
  262. package/src/console/ui-next/src/components/charts/line-chart-loading.tsx +111 -0
  263. package/src/console/ui-next/src/components/charts/line-chart.tsx +293 -0
  264. package/src/console/ui-next/src/components/charts/line-loading-pulse.tsx +201 -0
  265. package/src/console/ui-next/src/components/charts/line-loading-timing.ts +12 -0
  266. package/src/console/ui-next/src/components/charts/line-series-terminal-marker.tsx +91 -0
  267. package/src/console/ui-next/src/components/charts/line.tsx +384 -0
  268. package/src/console/ui-next/src/components/charts/loading-sweep.tsx +452 -0
  269. package/src/console/ui-next/src/components/charts/motion-utils.ts +47 -0
  270. package/src/console/ui-next/src/components/charts/path-stroke-utils.ts +82 -0
  271. package/src/console/ui-next/src/components/charts/pattern-area.tsx +45 -0
  272. package/src/console/ui-next/src/components/charts/projection-config.ts +112 -0
  273. package/src/console/ui-next/src/components/charts/projection-line-end-marker.tsx +51 -0
  274. package/src/console/ui-next/src/components/charts/projection-line.tsx +208 -0
  275. package/src/console/ui-next/src/components/charts/projection-utils.ts +378 -0
  276. package/src/console/ui-next/src/components/charts/reference-area-config.ts +59 -0
  277. package/src/console/ui-next/src/components/charts/reference-area-geometry.ts +136 -0
  278. package/src/console/ui-next/src/components/charts/reference-area-registration-context.tsx +16 -0
  279. package/src/console/ui-next/src/components/charts/series-bar-layout.ts +60 -0
  280. package/src/console/ui-next/src/components/charts/series-bar.tsx +304 -0
  281. package/src/console/ui-next/src/components/charts/series-dash-tail-overlay.tsx +82 -0
  282. package/src/console/ui-next/src/components/charts/series-highlight-layer.tsx +49 -0
  283. package/src/console/ui-next/src/components/charts/series-hover-dim.tsx +57 -0
  284. package/src/console/ui-next/src/components/charts/series-markers.tsx +267 -0
  285. package/src/console/ui-next/src/components/charts/series-path-utils.ts +103 -0
  286. package/src/console/ui-next/src/components/charts/series-point-marker.tsx +205 -0
  287. package/src/console/ui-next/src/components/charts/static-chart-preview-context.tsx +16 -0
  288. package/src/console/ui-next/src/components/charts/time-series-chart-shell.tsx +644 -0
  289. package/src/console/ui-next/src/components/charts/tooltip/chart-tooltip.tsx +400 -0
  290. package/src/console/ui-next/src/components/charts/tooltip/date-ticker.tsx +140 -0
  291. package/src/console/ui-next/src/components/charts/tooltip/index.ts +10 -0
  292. package/src/console/ui-next/src/components/charts/tooltip/tooltip-box.tsx +227 -0
  293. package/src/console/ui-next/src/components/charts/tooltip/tooltip-content.tsx +58 -0
  294. package/src/console/ui-next/src/components/charts/tooltip/tooltip-dot.tsx +173 -0
  295. package/src/console/ui-next/src/components/charts/tooltip/tooltip-indicator.tsx +191 -0
  296. package/src/console/ui-next/src/components/charts/use-animated-series-path.ts +155 -0
  297. package/src/console/ui-next/src/components/charts/use-animated-y-domains.ts +227 -0
  298. package/src/console/ui-next/src/components/charts/use-chart-interaction.ts +343 -0
  299. package/src/console/ui-next/src/components/charts/use-chart-phase-orchestrator.ts +173 -0
  300. package/src/console/ui-next/src/components/charts/use-enter-complete.ts +28 -0
  301. package/src/console/ui-next/src/components/charts/use-grid-shimmer.ts +101 -0
  302. package/src/console/ui-next/src/components/charts/use-highlight-segment.ts +58 -0
  303. package/src/console/ui-next/src/components/charts/use-mount-progress.ts +29 -0
  304. package/src/console/ui-next/src/components/charts/use-scheduled-tooltip.ts +97 -0
  305. package/src/console/ui-next/src/components/charts/x-axis.tsx +635 -0
  306. package/src/console/ui-next/src/components/charts/y-axis-scales.ts +108 -0
  307. package/src/console/ui-next/src/components/charts/y-axis-ticks.ts +25 -0
  308. package/src/console/ui-next/src/components/charts/y-axis.tsx +151 -0
  309. package/src/console/ui-next/src/components/charts/y-domain-utils.ts +120 -0
  310. package/src/console/ui-next/src/components/console-chrome.tsx +50 -0
  311. package/src/console/ui-next/src/components/document-title.tsx +18 -0
  312. package/src/console/ui-next/src/components/explorer/copy-inline-button.tsx +57 -0
  313. package/src/console/ui-next/src/components/explorer/detail-header.tsx +82 -0
  314. package/src/console/ui-next/src/components/explorer/explorer-chrome.ts +123 -0
  315. package/src/console/ui-next/src/components/explorer/explorer-empty.tsx +67 -0
  316. package/src/console/ui-next/src/components/explorer/explorer-search.tsx +20 -0
  317. package/src/console/ui-next/src/components/explorer/explorer-start-toggle.tsx +52 -0
  318. package/src/console/ui-next/src/components/explorer/section-head.tsx +33 -0
  319. package/src/console/ui-next/src/components/explorer/tree-expand-toggle.tsx +69 -0
  320. package/src/console/ui-next/src/components/explorer/use-explorer-start-panel.ts +34 -0
  321. package/src/console/ui-next/src/components/gate-list.tsx +70 -0
  322. package/src/console/ui-next/src/components/generate-password-button.tsx +76 -0
  323. package/src/console/ui-next/src/components/highlighted-json.tsx +73 -0
  324. package/src/console/ui-next/src/components/http-method-badge.tsx +35 -0
  325. package/src/console/ui-next/src/components/mode-toggle.tsx +84 -0
  326. package/src/console/ui-next/src/components/motion/button/base.tsx +145 -0
  327. package/src/console/ui-next/src/components/motion/button/expanding-arrow.tsx +167 -0
  328. package/src/console/ui-next/src/components/motion/button/index.ts +12 -0
  329. package/src/console/ui-next/src/components/motion/button/stateful.tsx +243 -0
  330. package/src/console/ui-next/src/components/motion/checkbox.tsx +120 -0
  331. package/src/console/ui-next/src/components/motion/select.tsx +436 -0
  332. package/src/console/ui-next/src/components/motion/switch.tsx +108 -0
  333. package/src/console/ui-next/src/components/motion/table/editable-cell.tsx +98 -0
  334. package/src/console/ui-next/src/components/motion/table/index.tsx +404 -0
  335. package/src/console/ui-next/src/components/motion/table/row-handle.tsx +95 -0
  336. package/src/console/ui-next/src/components/motion/table/skeleton-rows.tsx +52 -0
  337. package/src/console/ui-next/src/components/motion/table/table-header.tsx +337 -0
  338. package/src/console/ui-next/src/components/motion/table/table-menu.tsx +130 -0
  339. package/src/console/ui-next/src/components/motion/table/types.ts +109 -0
  340. package/src/console/ui-next/src/components/motion/table/use-cell-range.ts +145 -0
  341. package/src/console/ui-next/src/components/motion/table/use-column-reorder.ts +112 -0
  342. package/src/console/ui-next/src/components/motion/table/use-column-resize.ts +83 -0
  343. package/src/console/ui-next/src/components/motion/table/use-column-sort.ts +73 -0
  344. package/src/console/ui-next/src/components/motion/table/use-row-selection.ts +70 -0
  345. package/src/console/ui-next/src/components/motion/table/utils.ts +138 -0
  346. package/src/console/ui-next/src/components/oke-logo.tsx +65 -0
  347. package/src/console/ui-next/src/components/password-input.tsx +67 -0
  348. package/src/console/ui-next/src/components/password-strength.tsx +160 -0
  349. package/src/console/ui-next/src/components/shell/app-sidebar.tsx +117 -0
  350. package/src/console/ui-next/src/components/shell/command-items.test.ts +30 -0
  351. package/src/console/ui-next/src/components/shell/command-items.ts +144 -0
  352. package/src/console/ui-next/src/components/shell/command-match.test.ts +37 -0
  353. package/src/console/ui-next/src/components/shell/command-match.ts +45 -0
  354. package/src/console/ui-next/src/components/shell/command-palette.tsx +334 -0
  355. package/src/console/ui-next/src/components/shell/nav-footer.tsx +109 -0
  356. package/src/console/ui-next/src/components/shell/section-empty.tsx +42 -0
  357. package/src/console/ui-next/src/components/shell/settings-dialog.tsx +65 -0
  358. package/src/console/ui-next/src/components/shell/shell-layout.tsx +100 -0
  359. package/src/console/ui-next/src/components/shimmering-text.tsx +87 -0
  360. package/src/console/ui-next/src/components/signal-delivery-badge.tsx +38 -0
  361. package/src/console/ui-next/src/components/theme-provider.tsx +86 -0
  362. package/src/console/ui-next/src/components/ui/alert-dialog.tsx +147 -0
  363. package/src/console/ui-next/src/components/ui/avatar.tsx +91 -0
  364. package/src/console/ui-next/src/components/ui/badge.tsx +54 -0
  365. package/src/console/ui-next/src/components/ui/breadcrumb.tsx +104 -0
  366. package/src/console/ui-next/src/components/ui/button.tsx +58 -0
  367. package/src/console/ui-next/src/components/ui/card.tsx +88 -0
  368. package/src/console/ui-next/src/components/ui/collapsible.tsx +15 -0
  369. package/src/console/ui-next/src/components/ui/confirm-sheet.tsx +149 -0
  370. package/src/console/ui-next/src/components/ui/dialog.tsx +144 -0
  371. package/src/console/ui-next/src/components/ui/dropdown-menu.tsx +265 -0
  372. package/src/console/ui-next/src/components/ui/empty.tsx +95 -0
  373. package/src/console/ui-next/src/components/ui/field.tsx +224 -0
  374. package/src/console/ui-next/src/components/ui/input.tsx +30 -0
  375. package/src/console/ui-next/src/components/ui/kbd.tsx +41 -0
  376. package/src/console/ui-next/src/components/ui/label.tsx +20 -0
  377. package/src/console/ui-next/src/components/ui/progress.tsx +66 -0
  378. package/src/console/ui-next/src/components/ui/resizable.tsx +74 -0
  379. package/src/console/ui-next/src/components/ui/select.tsx +230 -0
  380. package/src/console/ui-next/src/components/ui/separator.tsx +21 -0
  381. package/src/console/ui-next/src/components/ui/sheet-form.tsx +337 -0
  382. package/src/console/ui-next/src/components/ui/sheet.tsx +130 -0
  383. package/src/console/ui-next/src/components/ui/sidebar.tsx +691 -0
  384. package/src/console/ui-next/src/components/ui/skeleton.tsx +20 -0
  385. package/src/console/ui-next/src/components/ui/toggle-group.tsx +87 -0
  386. package/src/console/ui-next/src/components/ui/toggle.tsx +46 -0
  387. package/src/console/ui-next/src/components/ui/toolbar-tip.tsx +41 -0
  388. package/src/console/ui-next/src/components/ui/tooltip.tsx +74 -0
  389. package/src/console/ui-next/src/features/auth/auth-redirect.test.ts +119 -0
  390. package/src/console/ui-next/src/features/auth/auth-redirect.ts +153 -0
  391. package/src/console/ui-next/src/features/auth/login-form.tsx +234 -0
  392. package/src/console/ui-next/src/features/auth/logout.ts +17 -0
  393. package/src/console/ui-next/src/features/flows/data/console-live-session.test.ts +329 -0
  394. package/src/console/ui-next/src/features/flows/data/console-live-session.ts +210 -0
  395. package/src/console/ui-next/src/features/flows/data/use-console-live.ts +79 -0
  396. package/src/console/ui-next/src/features/flows/data/use-manifest.ts +23 -0
  397. package/src/console/ui-next/src/features/flows/data/use-runs.ts +24 -0
  398. package/src/console/ui-next/src/features/flows/fixture.ts +81 -0
  399. package/src/console/ui-next/src/features/flows/flows-page.tsx +227 -0
  400. package/src/console/ui-next/src/features/flows/graph/build-flow-graph.test.ts +236 -0
  401. package/src/console/ui-next/src/features/flows/graph/build-flow-graph.ts +530 -0
  402. package/src/console/ui-next/src/features/flows/graph/element-map.test.ts +443 -0
  403. package/src/console/ui-next/src/features/flows/graph/element-map.ts +1077 -0
  404. package/src/console/ui-next/src/features/flows/graph/flow-graph-nodes.tsx +486 -0
  405. package/src/console/ui-next/src/features/flows/graph/flow-graph-theme.ts +143 -0
  406. package/src/console/ui-next/src/features/flows/graph/flow-graph.tsx +268 -0
  407. package/src/console/ui-next/src/features/flows/graph/neighborhood.test.ts +64 -0
  408. package/src/console/ui-next/src/features/flows/graph/neighborhood.ts +82 -0
  409. package/src/console/ui-next/src/features/flows/graph/orchestra.test.ts +97 -0
  410. package/src/console/ui-next/src/features/flows/graph/orchestra.ts +86 -0
  411. package/src/console/ui-next/src/features/flows/graph/use-overview-orchestra.ts +95 -0
  412. package/src/console/ui-next/src/features/flows/state/flows-selection.test.ts +24 -0
  413. package/src/console/ui-next/src/features/flows/state/flows-selection.ts +92 -0
  414. package/src/console/ui-next/src/features/flows/traces/advanced-filters.tsx +222 -0
  415. package/src/console/ui-next/src/features/flows/traces/cache-glyph.tsx +42 -0
  416. package/src/console/ui-next/src/features/flows/traces/cache-icon.test.ts +27 -0
  417. package/src/console/ui-next/src/features/flows/traces/cache-icon.ts +48 -0
  418. package/src/console/ui-next/src/features/flows/traces/dimension-query.test.ts +100 -0
  419. package/src/console/ui-next/src/features/flows/traces/dimension-query.ts +325 -0
  420. package/src/console/ui-next/src/features/flows/traces/duration-tone.test.ts +71 -0
  421. package/src/console/ui-next/src/features/flows/traces/duration-tone.ts +128 -0
  422. package/src/console/ui-next/src/features/flows/traces/effect-kind.ts +106 -0
  423. package/src/console/ui-next/src/features/flows/traces/effect-summary.ts +193 -0
  424. package/src/console/ui-next/src/features/flows/traces/filter-runs.test.ts +98 -0
  425. package/src/console/ui-next/src/features/flows/traces/filter-runs.ts +68 -0
  426. package/src/console/ui-next/src/features/flows/traces/format-duration.test.ts +47 -0
  427. package/src/console/ui-next/src/features/flows/traces/format-duration.ts +25 -0
  428. package/src/console/ui-next/src/features/flows/traces/graph-filter.test.ts +192 -0
  429. package/src/console/ui-next/src/features/flows/traces/graph-filter.ts +175 -0
  430. package/src/console/ui-next/src/features/flows/traces/http-method.ts +134 -0
  431. package/src/console/ui-next/src/features/flows/traces/replay-playback.test.ts +101 -0
  432. package/src/console/ui-next/src/features/flows/traces/replay-playback.ts +107 -0
  433. package/src/console/ui-next/src/features/flows/traces/request-input-view.test.ts +60 -0
  434. package/src/console/ui-next/src/features/flows/traces/request-input-view.ts +108 -0
  435. package/src/console/ui-next/src/features/flows/traces/request-meta.ts +62 -0
  436. package/src/console/ui-next/src/features/flows/traces/scope-runs.test.ts +51 -0
  437. package/src/console/ui-next/src/features/flows/traces/scope-runs.ts +23 -0
  438. package/src/console/ui-next/src/features/flows/traces/trace-actions.test.ts +80 -0
  439. package/src/console/ui-next/src/features/flows/traces/trace-actions.ts +57 -0
  440. package/src/console/ui-next/src/features/flows/traces/trace-chain.test.ts +68 -0
  441. package/src/console/ui-next/src/features/flows/traces/trace-chain.ts +59 -0
  442. package/src/console/ui-next/src/features/flows/traces/trace-detail-sheet.tsx +1003 -0
  443. package/src/console/ui-next/src/features/flows/traces/trace-detail.test.ts +357 -0
  444. package/src/console/ui-next/src/features/flows/traces/trace-gates.ts +90 -0
  445. package/src/console/ui-next/src/features/flows/traces/trace-request-section.tsx +574 -0
  446. package/src/console/ui-next/src/features/flows/traces/trace-row-meta.test.ts +42 -0
  447. package/src/console/ui-next/src/features/flows/traces/trace-row-meta.ts +47 -0
  448. package/src/console/ui-next/src/features/flows/traces/trace-row.tsx +149 -0
  449. package/src/console/ui-next/src/features/flows/traces/traces-pane.tsx +289 -0
  450. package/src/console/ui-next/src/features/flows/traces/trigger-icon.test.ts +42 -0
  451. package/src/console/ui-next/src/features/flows/traces/trigger-icon.ts +53 -0
  452. package/src/console/ui-next/src/features/flows/traces/waterfall-bars.test.ts +93 -0
  453. package/src/console/ui-next/src/features/flows/traces/waterfall-bars.ts +80 -0
  454. package/src/console/ui-next/src/features/flows/traces/waterfall-timeline.test.ts +121 -0
  455. package/src/console/ui-next/src/features/flows/traces/waterfall-timeline.ts +230 -0
  456. package/src/console/ui-next/src/features/flows/traces/waterfall-tooltip.test.ts +51 -0
  457. package/src/console/ui-next/src/features/flows/traces/waterfall-tooltip.ts +20 -0
  458. package/src/console/ui-next/src/features/not-found/not-found-page.tsx +23 -0
  459. package/src/console/ui-next/src/features/observability/data/use-ai-list.ts +26 -0
  460. package/src/console/ui-next/src/features/observability/data/use-clock-list.ts +27 -0
  461. package/src/console/ui-next/src/features/observability/data/use-instances-list.ts +27 -0
  462. package/src/console/ui-next/src/features/observability/data/use-runs-query.ts +39 -0
  463. package/src/console/ui-next/src/features/observability/data/use-signals-list.ts +25 -0
  464. package/src/console/ui-next/src/features/observability/detail/ai-rail.tsx +77 -0
  465. package/src/console/ui-next/src/features/observability/detail/instance-fleet-sheet.tsx +111 -0
  466. package/src/console/ui-next/src/features/observability/detail/metrics-chart.tsx +111 -0
  467. package/src/console/ui-next/src/features/observability/detail/metrics-panel.tsx +154 -0
  468. package/src/console/ui-next/src/features/observability/explorer/error-list.tsx +139 -0
  469. package/src/console/ui-next/src/features/observability/explorer/error-row.tsx +84 -0
  470. package/src/console/ui-next/src/features/observability/explorer/health-strip.tsx +146 -0
  471. package/src/console/ui-next/src/features/observability/lib/ask-count.test.ts +47 -0
  472. package/src/console/ui-next/src/features/observability/lib/ask-count.ts +44 -0
  473. package/src/console/ui-next/src/features/observability/lib/health-cells.test.ts +243 -0
  474. package/src/console/ui-next/src/features/observability/lib/health-cells.ts +207 -0
  475. package/src/console/ui-next/src/features/observability/lib/run-fixture.ts +43 -0
  476. package/src/console/ui-next/src/features/observability/lib/time-buckets.test.ts +61 -0
  477. package/src/console/ui-next/src/features/observability/lib/time-buckets.ts +126 -0
  478. package/src/console/ui-next/src/features/observability/lib/token-count.test.ts +75 -0
  479. package/src/console/ui-next/src/features/observability/lib/token-count.ts +70 -0
  480. package/src/console/ui-next/src/features/observability/lib/top-errors.test.ts +89 -0
  481. package/src/console/ui-next/src/features/observability/lib/top-errors.ts +135 -0
  482. package/src/console/ui-next/src/features/observability/lib/window-stats.test.ts +62 -0
  483. package/src/console/ui-next/src/features/observability/lib/window-stats.ts +124 -0
  484. package/src/console/ui-next/src/features/observability/observability-page.tsx +217 -0
  485. package/src/console/ui-next/src/features/observability/query/runs-query-panel.tsx +91 -0
  486. package/src/console/ui-next/src/features/observability/state/observability-selection.test.ts +27 -0
  487. package/src/console/ui-next/src/features/observability/state/observability-selection.ts +121 -0
  488. package/src/console/ui-next/src/features/setup/auth-gate.test.ts +17 -0
  489. package/src/console/ui-next/src/features/setup/auth-gate.ts +21 -0
  490. package/src/console/ui-next/src/features/setup/claim-page.tsx +418 -0
  491. package/src/console/ui-next/src/features/store/data/use-gates.ts +26 -0
  492. package/src/console/ui-next/src/features/store/data/use-store-edit.ts +92 -0
  493. package/src/console/ui-next/src/features/store/data/use-store-files.ts +96 -0
  494. package/src/console/ui-next/src/features/store/data/use-store-kv-stats.ts +47 -0
  495. package/src/console/ui-next/src/features/store/data/use-store-query.test.ts +42 -0
  496. package/src/console/ui-next/src/features/store/data/use-store-query.ts +68 -0
  497. package/src/console/ui-next/src/features/store/data/use-store-reveal.ts +28 -0
  498. package/src/console/ui-next/src/features/store/data/use-store-sql-advise.ts +39 -0
  499. package/src/console/ui-next/src/features/store/data/use-store-sql-locks.ts +51 -0
  500. package/src/console/ui-next/src/features/store/data/use-store-sql-stats.ts +47 -0
  501. package/src/console/ui-next/src/features/store/data/use-store-sql.ts +39 -0
  502. package/src/console/ui-next/src/features/store/data/use-stores-list.ts +24 -0
  503. package/src/console/ui-next/src/features/store/detail/browse-section.tsx +692 -0
  504. package/src/console/ui-next/src/features/store/detail/json-value-sheet.tsx +470 -0
  505. package/src/console/ui-next/src/features/store/detail/resource-panel.tsx +325 -0
  506. package/src/console/ui-next/src/features/store/detail/reveal-cell.tsx +137 -0
  507. package/src/console/ui-next/src/features/store/detail/store-row-detail-sheet.tsx +225 -0
  508. package/src/console/ui-next/src/features/store/detail/touched-by-section.tsx +101 -0
  509. package/src/console/ui-next/src/features/store/explorer/store-tree.tsx +1044 -0
  510. package/src/console/ui-next/src/features/store/files/file-explorer.tsx +563 -0
  511. package/src/console/ui-next/src/features/store/files/file-kind-icon.tsx +70 -0
  512. package/src/console/ui-next/src/features/store/files/file-preview.tsx +338 -0
  513. package/src/console/ui-next/src/features/store/files/file-upload-sheet.tsx +190 -0
  514. package/src/console/ui-next/src/features/store/grid/catalog-advanced.tsx +80 -0
  515. package/src/console/ui-next/src/features/store/grid/extension-library-sheet.tsx +761 -0
  516. package/src/console/ui-next/src/features/store/grid/kv-add-sheet.tsx +165 -0
  517. package/src/console/ui-next/src/features/store/grid/pending-changes-sheet.tsx +219 -0
  518. package/src/console/ui-next/src/features/store/grid/rls-policy-sheet.tsx +875 -0
  519. package/src/console/ui-next/src/features/store/grid/sql-function-sheet.tsx +473 -0
  520. package/src/console/ui-next/src/features/store/grid/sql-index-sheet.tsx +355 -0
  521. package/src/console/ui-next/src/features/store/grid/sql-insert-sheet.tsx +177 -0
  522. package/src/console/ui-next/src/features/store/grid/sql-trigger-sheet.tsx +445 -0
  523. package/src/console/ui-next/src/features/store/grid/store-confirm-sheet.tsx +73 -0
  524. package/src/console/ui-next/src/features/store/grid/store-data-grid.tsx +1844 -0
  525. package/src/console/ui-next/src/features/store/grid/store-edit-sheet.tsx +329 -0
  526. package/src/console/ui-next/src/features/store/grid/store-grid-context-menu.tsx +111 -0
  527. package/src/console/ui-next/src/features/store/grid/store-grid-shortcuts.tsx +124 -0
  528. package/src/console/ui-next/src/features/store/lib/cell-selection.test.ts +125 -0
  529. package/src/console/ui-next/src/features/store/lib/cell-selection.ts +115 -0
  530. package/src/console/ui-next/src/features/store/lib/confirmation.test.ts +48 -0
  531. package/src/console/ui-next/src/features/store/lib/confirmation.ts +63 -0
  532. package/src/console/ui-next/src/features/store/lib/edit-history.test.ts +60 -0
  533. package/src/console/ui-next/src/features/store/lib/edit-history.ts +64 -0
  534. package/src/console/ui-next/src/features/store/lib/fields-from-table.ts +94 -0
  535. package/src/console/ui-next/src/features/store/lib/files-body.test.ts +16 -0
  536. package/src/console/ui-next/src/features/store/lib/files-body.ts +79 -0
  537. package/src/console/ui-next/src/features/store/lib/files-meta.test.ts +75 -0
  538. package/src/console/ui-next/src/features/store/lib/files-meta.ts +259 -0
  539. package/src/console/ui-next/src/features/store/lib/files-origin.test.ts +69 -0
  540. package/src/console/ui-next/src/features/store/lib/files-origin.ts +53 -0
  541. package/src/console/ui-next/src/features/store/lib/files-tree.test.ts +123 -0
  542. package/src/console/ui-next/src/features/store/lib/files-tree.ts +233 -0
  543. package/src/console/ui-next/src/features/store/lib/grid-model.test.ts +127 -0
  544. package/src/console/ui-next/src/features/store/lib/grid-model.ts +219 -0
  545. package/src/console/ui-next/src/features/store/lib/grid-transfer.test.ts +123 -0
  546. package/src/console/ui-next/src/features/store/lib/grid-transfer.ts +217 -0
  547. package/src/console/ui-next/src/features/store/lib/index-query.test.ts +30 -0
  548. package/src/console/ui-next/src/features/store/lib/index-query.ts +57 -0
  549. package/src/console/ui-next/src/features/store/lib/json-value.test.ts +141 -0
  550. package/src/console/ui-next/src/features/store/lib/json-value.ts +266 -0
  551. package/src/console/ui-next/src/features/store/lib/kv-format.test.ts +44 -0
  552. package/src/console/ui-next/src/features/store/lib/kv-format.ts +103 -0
  553. package/src/console/ui-next/src/features/store/lib/kv-meta.test.ts +43 -0
  554. package/src/console/ui-next/src/features/store/lib/kv-meta.ts +63 -0
  555. package/src/console/ui-next/src/features/store/lib/kv-query.test.ts +128 -0
  556. package/src/console/ui-next/src/features/store/lib/kv-query.ts +303 -0
  557. package/src/console/ui-next/src/features/store/lib/parse-resource-ref.ts +38 -0
  558. package/src/console/ui-next/src/features/store/lib/patch.test.ts +99 -0
  559. package/src/console/ui-next/src/features/store/lib/patch.ts +129 -0
  560. package/src/console/ui-next/src/features/store/lib/pending-edits.test.ts +125 -0
  561. package/src/console/ui-next/src/features/store/lib/pending-edits.ts +150 -0
  562. package/src/console/ui-next/src/features/store/lib/pending-sql.test.ts +108 -0
  563. package/src/console/ui-next/src/features/store/lib/pending-sql.ts +136 -0
  564. package/src/console/ui-next/src/features/store/lib/pg-extension-library.test.ts +117 -0
  565. package/src/console/ui-next/src/features/store/lib/pg-extension-library.ts +277 -0
  566. package/src/console/ui-next/src/features/store/lib/query-defaults.test.ts +78 -0
  567. package/src/console/ui-next/src/features/store/lib/query-defaults.ts +77 -0
  568. package/src/console/ui-next/src/features/store/lib/query-gate.test.ts +132 -0
  569. package/src/console/ui-next/src/features/store/lib/query-gate.ts +187 -0
  570. package/src/console/ui-next/src/features/store/lib/query-highlight.test.ts +103 -0
  571. package/src/console/ui-next/src/features/store/lib/query-highlight.ts +382 -0
  572. package/src/console/ui-next/src/features/store/lib/query-schema.test.ts +139 -0
  573. package/src/console/ui-next/src/features/store/lib/query-schema.ts +128 -0
  574. package/src/console/ui-next/src/features/store/lib/query-session.test.ts +91 -0
  575. package/src/console/ui-next/src/features/store/lib/query-session.ts +330 -0
  576. package/src/console/ui-next/src/features/store/lib/replica-lag.test.ts +101 -0
  577. package/src/console/ui-next/src/features/store/lib/replica-lag.ts +31 -0
  578. package/src/console/ui-next/src/features/store/lib/resource-effects.ts +12 -0
  579. package/src/console/ui-next/src/features/store/lib/rls-gate-catalog.test.ts +131 -0
  580. package/src/console/ui-next/src/features/store/lib/rls-gate-catalog.ts +274 -0
  581. package/src/console/ui-next/src/features/store/lib/rls-policy.test.ts +95 -0
  582. package/src/console/ui-next/src/features/store/lib/rls-policy.ts +290 -0
  583. package/src/console/ui-next/src/features/store/lib/rtl.test.ts +17 -0
  584. package/src/console/ui-next/src/features/store/lib/rtl.ts +15 -0
  585. package/src/console/ui-next/src/features/store/lib/schema-color.test.ts +91 -0
  586. package/src/console/ui-next/src/features/store/lib/schema-color.ts +216 -0
  587. package/src/console/ui-next/src/features/store/lib/schema-graph.test.ts +435 -0
  588. package/src/console/ui-next/src/features/store/lib/schema-graph.ts +566 -0
  589. package/src/console/ui-next/src/features/store/lib/sql-catalog.test.ts +60 -0
  590. package/src/console/ui-next/src/features/store/lib/sql-catalog.ts +98 -0
  591. package/src/console/ui-next/src/features/store/lib/sql-complete.test.ts +109 -0
  592. package/src/console/ui-next/src/features/store/lib/sql-complete.ts +385 -0
  593. package/src/console/ui-next/src/features/store/lib/sql-format.test.ts +35 -0
  594. package/src/console/ui-next/src/features/store/lib/sql-format.ts +85 -0
  595. package/src/console/ui-next/src/features/store/lib/sql-function.test.ts +141 -0
  596. package/src/console/ui-next/src/features/store/lib/sql-function.ts +195 -0
  597. package/src/console/ui-next/src/features/store/lib/sql-index.test.ts +101 -0
  598. package/src/console/ui-next/src/features/store/lib/sql-index.ts +151 -0
  599. package/src/console/ui-next/src/features/store/lib/sql-statements.test.ts +114 -0
  600. package/src/console/ui-next/src/features/store/lib/sql-statements.ts +205 -0
  601. package/src/console/ui-next/src/features/store/lib/sql-trigger.test.ts +125 -0
  602. package/src/console/ui-next/src/features/store/lib/sql-trigger.ts +210 -0
  603. package/src/console/ui-next/src/features/store/lib/store-tree.test.ts +220 -0
  604. package/src/console/ui-next/src/features/store/lib/store-tree.ts +314 -0
  605. package/src/console/ui-next/src/features/store/performance/advisor-enable.test.ts +16 -0
  606. package/src/console/ui-next/src/features/store/performance/advisor-enable.ts +26 -0
  607. package/src/console/ui-next/src/features/store/performance/kv-performance-panel.tsx +223 -0
  608. package/src/console/ui-next/src/features/store/performance/performance-panel.tsx +442 -0
  609. package/src/console/ui-next/src/features/store/query/query-complete.tsx +131 -0
  610. package/src/console/ui-next/src/features/store/query/query-console.tsx +1159 -0
  611. package/src/console/ui-next/src/features/store/query/query-editor.tsx +300 -0
  612. package/src/console/ui-next/src/features/store/query/query-gate-menu.tsx +178 -0
  613. package/src/console/ui-next/src/features/store/query/query-gate-parts.tsx +344 -0
  614. package/src/console/ui-next/src/features/store/query/query-gate-viz.tsx +166 -0
  615. package/src/console/ui-next/src/features/store/query/query-highlight-view.tsx +61 -0
  616. package/src/console/ui-next/src/features/store/query/query-results.tsx +369 -0
  617. package/src/console/ui-next/src/features/store/query/query-schema-panel.tsx +300 -0
  618. package/src/console/ui-next/src/features/store/query/sql-style-editor.tsx +73 -0
  619. package/src/console/ui-next/src/features/store/schema/schema-constraint-icon.tsx +108 -0
  620. package/src/console/ui-next/src/features/store/schema/schema-relation-edge.tsx +76 -0
  621. package/src/console/ui-next/src/features/store/schema/schema-relation-icon.tsx +84 -0
  622. package/src/console/ui-next/src/features/store/schema/schema-table-node.tsx +199 -0
  623. package/src/console/ui-next/src/features/store/schema/schema-visualizer.tsx +273 -0
  624. package/src/console/ui-next/src/features/store/state/store-selection.test.ts +38 -0
  625. package/src/console/ui-next/src/features/store/state/store-selection.ts +154 -0
  626. package/src/console/ui-next/src/features/store/store-page.tsx +180 -0
  627. package/src/console/ui-next/src/features/units/call/call-api-panel.tsx +1247 -0
  628. package/src/console/ui-next/src/features/units/call/call-identity-menu.tsx +226 -0
  629. package/src/console/ui-next/src/features/units/call/call-pii-button.tsx +60 -0
  630. package/src/console/ui-next/src/features/units/data/use-flows-invoke.ts +75 -0
  631. package/src/console/ui-next/src/features/units/detail/effects-summary.tsx +80 -0
  632. package/src/console/ui-next/src/features/units/detail/errors-section.tsx +64 -0
  633. package/src/console/ui-next/src/features/units/detail/flow-activity-strip.tsx +119 -0
  634. package/src/console/ui-next/src/features/units/detail/flow-contract-panel.tsx +335 -0
  635. package/src/console/ui-next/src/features/units/detail/schema-fields.tsx +149 -0
  636. package/src/console/ui-next/src/features/units/detail/validation-section.tsx +66 -0
  637. package/src/console/ui-next/src/features/units/explorer/units-tree.tsx +644 -0
  638. package/src/console/ui-next/src/features/units/lib/call-invoke-as.test.ts +40 -0
  639. package/src/console/ui-next/src/features/units/lib/call-read-safe.test.ts +38 -0
  640. package/src/console/ui-next/src/features/units/lib/call-read-safe.ts +32 -0
  641. package/src/console/ui-next/src/features/units/lib/call-timing.test.ts +28 -0
  642. package/src/console/ui-next/src/features/units/lib/call-timing.ts +34 -0
  643. package/src/console/ui-next/src/features/units/lib/contract-input.test.ts +47 -0
  644. package/src/console/ui-next/src/features/units/lib/contract-input.ts +68 -0
  645. package/src/console/ui-next/src/features/units/lib/fields-from-schema.test.ts +119 -0
  646. package/src/console/ui-next/src/features/units/lib/fields-from-schema.ts +329 -0
  647. package/src/console/ui-next/src/features/units/lib/fk-lookup.test.ts +103 -0
  648. package/src/console/ui-next/src/features/units/lib/fk-lookup.ts +175 -0
  649. package/src/console/ui-next/src/features/units/lib/flow-activity.test.ts +76 -0
  650. package/src/console/ui-next/src/features/units/lib/flow-activity.ts +68 -0
  651. package/src/console/ui-next/src/features/units/lib/flow-trigger.test.ts +63 -0
  652. package/src/console/ui-next/src/features/units/lib/flow-trigger.ts +120 -0
  653. package/src/console/ui-next/src/features/units/lib/invoke-cache.test.ts +31 -0
  654. package/src/console/ui-next/src/features/units/lib/invoke-cache.ts +22 -0
  655. package/src/console/ui-next/src/features/units/lib/invoke-response.test.ts +76 -0
  656. package/src/console/ui-next/src/features/units/lib/invoke-response.ts +70 -0
  657. package/src/console/ui-next/src/features/units/lib/path-params.test.ts +43 -0
  658. package/src/console/ui-next/src/features/units/lib/path-params.ts +75 -0
  659. package/src/console/ui-next/src/features/units/lib/resolve-clock.test.ts +106 -0
  660. package/src/console/ui-next/src/features/units/lib/resolve-clock.ts +79 -0
  661. package/src/console/ui-next/src/features/units/lib/schema-type-visual.ts +28 -0
  662. package/src/console/ui-next/src/features/units/lib/signal-delivery.test.ts +29 -0
  663. package/src/console/ui-next/src/features/units/lib/signal-delivery.ts +67 -0
  664. package/src/console/ui-next/src/features/units/lib/unit-tree.test.ts +289 -0
  665. package/src/console/ui-next/src/features/units/lib/unit-tree.ts +307 -0
  666. package/src/console/ui-next/src/features/units/lib/validate-contract.ts +103 -0
  667. package/src/console/ui-next/src/features/units/state/units-selection.ts +49 -0
  668. package/src/console/ui-next/src/features/units/units-page.tsx +120 -0
  669. package/src/console/ui-next/src/features/vault/data/use-vault-list.ts +27 -0
  670. package/src/console/ui-next/src/features/vault/detail/vault-detail.tsx +831 -0
  671. package/src/console/ui-next/src/features/vault/detail/vault-overview.tsx +71 -0
  672. package/src/console/ui-next/src/features/vault/explorer/vault-list.tsx +291 -0
  673. package/src/console/ui-next/src/features/vault/explorer/vault-posture-strip.tsx +131 -0
  674. package/src/console/ui-next/src/features/vault/explorer/vault-search.tsx +126 -0
  675. package/src/console/ui-next/src/features/vault/lib/backend.test.ts +147 -0
  676. package/src/console/ui-next/src/features/vault/lib/backend.ts +216 -0
  677. package/src/console/ui-next/src/features/vault/lib/blast-radius.ts +53 -0
  678. package/src/console/ui-next/src/features/vault/lib/confirmation.test.ts +41 -0
  679. package/src/console/ui-next/src/features/vault/lib/confirmation.ts +50 -0
  680. package/src/console/ui-next/src/features/vault/lib/contract-ops.test.ts +35 -0
  681. package/src/console/ui-next/src/features/vault/lib/contract-ops.ts +94 -0
  682. package/src/console/ui-next/src/features/vault/lib/dormant.ts +28 -0
  683. package/src/console/ui-next/src/features/vault/lib/export-safe.test.ts +25 -0
  684. package/src/console/ui-next/src/features/vault/lib/export-safe.ts +62 -0
  685. package/src/console/ui-next/src/features/vault/lib/fixture.ts +92 -0
  686. package/src/console/ui-next/src/features/vault/lib/group.test.ts +31 -0
  687. package/src/console/ui-next/src/features/vault/lib/group.ts +43 -0
  688. package/src/console/ui-next/src/features/vault/lib/posture.test.ts +137 -0
  689. package/src/console/ui-next/src/features/vault/lib/posture.ts +275 -0
  690. package/src/console/ui-next/src/features/vault/lib/progress.test.ts +36 -0
  691. package/src/console/ui-next/src/features/vault/lib/progress.ts +51 -0
  692. package/src/console/ui-next/src/features/vault/lib/search.test.ts +139 -0
  693. package/src/console/ui-next/src/features/vault/lib/search.ts +403 -0
  694. package/src/console/ui-next/src/features/vault/lib/theme.ts +14 -0
  695. package/src/console/ui-next/src/features/vault/lib/types.ts +114 -0
  696. package/src/console/ui-next/src/features/vault/lib/write-review.test.ts +139 -0
  697. package/src/console/ui-next/src/features/vault/lib/write-review.ts +115 -0
  698. package/src/console/ui-next/src/features/vault/sheets/vault-create-sheet.tsx +209 -0
  699. package/src/console/ui-next/src/features/vault/sheets/vault-master-key-sheet.tsx +87 -0
  700. package/src/console/ui-next/src/features/vault/sheets/vault-rotate-master-sheet.tsx +43 -0
  701. package/src/console/ui-next/src/features/vault/sheets/vault-security-sheet.tsx +205 -0
  702. package/src/console/ui-next/src/features/vault/sheets/vault-verify-sheet.tsx +103 -0
  703. package/src/console/ui-next/src/features/vault/sheets/vault-write-review-dialog.test.tsx +175 -0
  704. package/src/console/ui-next/src/features/vault/sheets/vault-write-review-dialog.tsx +135 -0
  705. package/src/console/ui-next/src/features/vault/sheets/vault-write-sheet.tsx +224 -0
  706. package/src/console/ui-next/src/features/vault/state/vault-selection.test.ts +20 -0
  707. package/src/console/ui-next/src/features/vault/state/vault-selection.ts +87 -0
  708. package/src/console/ui-next/src/features/vault/vault-page.tsx +439 -0
  709. package/src/console/ui-next/src/hooks/use-mobile.ts +22 -0
  710. package/src/console/ui-next/src/lib/document-meta.test.ts +43 -0
  711. package/src/console/ui-next/src/lib/document-meta.ts +34 -0
  712. package/src/console/ui-next/src/lib/ease.ts +59 -0
  713. package/src/console/ui-next/src/lib/element-icons.test.ts +38 -0
  714. package/src/console/ui-next/src/lib/element-icons.ts +75 -0
  715. package/src/console/ui-next/src/lib/highlight.test.ts +30 -0
  716. package/src/console/ui-next/src/lib/highlight.ts +39 -0
  717. package/src/console/ui-next/src/lib/hooks/use-hover-capable.ts +30 -0
  718. package/src/console/ui-next/src/lib/last-module-search.test.ts +47 -0
  719. package/src/console/ui-next/src/lib/last-module-search.ts +164 -0
  720. package/src/console/ui-next/src/lib/motion.ts +16 -0
  721. package/src/console/ui-next/src/lib/shiki.ts +42 -0
  722. package/src/console/ui-next/src/lib/shortcut-keys.tsx +47 -0
  723. package/src/console/ui-next/src/lib/shortcut.test.ts +70 -0
  724. package/src/console/ui-next/src/lib/shortcut.ts +111 -0
  725. package/src/console/ui-next/src/lib/use-console-shortcuts.ts +56 -0
  726. package/src/console/ui-next/src/lib/use-last-module-search.ts +37 -0
  727. package/src/console/ui-next/src/lib/utils.ts +15 -0
  728. package/src/console/ui-next/src/main.tsx +44 -0
  729. package/src/console/ui-next/src/router.tsx +175 -0
  730. package/src/console/ui-next/src/styles.css +384 -0
  731. package/src/console/ui-next/src/vite-env.d.ts +17 -0
  732. package/src/console/ui-next/tsconfig.json +25 -0
  733. package/src/console/ui-next/ui-next-dev-operator.test.ts +76 -0
  734. package/src/console/ui-next/ui-next-dev-operator.ts +81 -0
  735. package/src/console/ui-next/ui-next-seed-app-schema.ts +526 -0
  736. package/src/console/ui-next/ui-next-seed-manifest-surface.ts +882 -0
  737. package/src/console/ui-next/ui-next-seed-manifest.ts +635 -0
  738. package/src/console/ui-next/ui-next-seed-runs.ts +1429 -0
  739. package/src/console/ui-next/ui-next-seed-store.ts +1125 -0
  740. package/src/console/ui-next/ui-next-seed.test.ts +511 -0
  741. package/src/console/ui-next/ui-next-seed.ts +122 -0
  742. package/src/console/ui-next/vite-console-kernel-plugin.ts +195 -0
  743. package/src/console/ui-next/vite.config.ts +88 -0
  744. package/src/console/xss.gate.test.ts +21 -26
  745. package/src/docker/compose.ts +26 -7
  746. package/src/docker/derive.ts +67 -13
  747. package/src/docker/docker.test.ts +219 -27
  748. package/src/docker/helpers.ts +48 -0
  749. package/src/docker/images-config.test.ts +29 -22
  750. package/src/docker/index.ts +8 -0
  751. package/src/docker/postgres-advisor.integration.test.ts +163 -0
  752. package/src/docker/query-passthrough.integration.test.ts +212 -0
  753. package/src/docker/recipes/dragonfly.ts +3 -6
  754. package/src/docker/recipes/index.ts +13 -0
  755. package/src/docker/recipes/llama-cpp.ts +3 -3
  756. package/src/docker/recipes/nginx.ts +61 -0
  757. package/src/docker/recipes/ollama.ts +1 -1
  758. package/src/docker/recipes/postgres-advisor.ts +58 -0
  759. package/src/docker/recipes/postgres.ts +6 -2
  760. package/src/docker/recipes/redis.ts +2 -6
  761. package/src/docker/recipes/sglang.ts +1 -1
  762. package/src/docker/recipes/timescale.ts +6 -2
  763. package/src/docker/recipes/traefik.ts +1 -0
  764. package/src/docker/recipes/valkey.ts +2 -6
  765. package/src/docker/recipes/vllm.ts +1 -1
  766. package/src/docker/stack-id.test.ts +5 -14
  767. package/src/docker/stack-id.ts +15 -35
  768. package/src/docker/stack.integration.test.ts +2 -2
  769. package/src/docker/types.ts +16 -7
  770. package/src/drivers/ai-mock.ts +41 -1
  771. package/src/drivers/ai-openai-compatible.ts +19 -1
  772. package/src/drivers/index.ts +32 -0
  773. package/src/drivers/instances-postgres.ts +154 -0
  774. package/src/drivers/meilisearch.integration.test.ts +9 -0
  775. package/src/drivers/meilisearch.test.ts +134 -6
  776. package/src/drivers/meilisearch.ts +77 -8
  777. package/src/drivers/memory.ts +384 -24
  778. package/src/drivers/pg-extensions.test.ts +50 -0
  779. package/src/drivers/pg-extensions.ts +1054 -0
  780. package/src/drivers/pg-rls.test.ts +71 -0
  781. package/src/drivers/pg-rls.ts +234 -0
  782. package/src/drivers/pgvector.ts +24 -0
  783. package/src/drivers/redis.ts +12 -0
  784. package/src/drivers/s3-ensure-bucket.test.ts +88 -0
  785. package/src/drivers/s3-ensure-bucket.ts +152 -0
  786. package/src/drivers/s3.ts +34 -2
  787. package/src/drivers/types.ts +29 -1
  788. package/src/drivers/vault-1password.test.ts +164 -0
  789. package/src/drivers/vault-1password.ts +351 -0
  790. package/src/drivers/vault-aws-secrets-manager.ts +15 -94
  791. package/src/drivers/vault-azure-key-vault.test.ts +137 -0
  792. package/src/drivers/vault-azure-key-vault.ts +243 -0
  793. package/src/drivers/vault-doppler.test.ts +133 -0
  794. package/src/drivers/vault-doppler.ts +202 -0
  795. package/src/drivers/vault-dotenv-parse.ts +32 -0
  796. package/src/drivers/vault-env.ts +1 -1
  797. package/src/drivers/vault-gcp-secret-manager.test.ts +127 -0
  798. package/src/drivers/vault-gcp-secret-manager.ts +291 -0
  799. package/src/drivers/vault-managed.test.ts +23 -26
  800. package/src/drivers/vault-managed.ts +58 -20
  801. package/src/drivers/vault-remote-bag.ts +242 -0
  802. package/src/drivers/vault-types.ts +9 -7
  803. package/src/elements/ai/runtime.ts +100 -8
  804. package/src/elements/ai/schema.test.ts +133 -0
  805. package/src/elements/ai/schema.ts +156 -11
  806. package/src/elements/ai.test.ts +53 -0
  807. package/src/elements/ai.ts +1 -0
  808. package/src/elements/clock/runtime.ts +31 -13
  809. package/src/elements/clock.test.ts +49 -0
  810. package/src/elements/gate/config.ts +18 -3
  811. package/src/elements/gate/declare.ts +25 -5
  812. package/src/elements/gate/flatten.ts +74 -0
  813. package/src/elements/gate/permissions.ts +1 -0
  814. package/src/elements/gate/runtime.ts +19 -7
  815. package/src/elements/gate.test.ts +32 -0
  816. package/src/elements/gate.ts +9 -1
  817. package/src/elements/store/cache.test.ts +79 -0
  818. package/src/elements/store/cache.ts +176 -0
  819. package/src/elements/store/classify.ts +79 -4
  820. package/src/elements/store/declare.ts +7 -0
  821. package/src/elements/store/emit-drizzle.ts +3 -1
  822. package/src/elements/store/files-policy.test.ts +36 -1
  823. package/src/elements/store/files-policy.ts +151 -0
  824. package/src/elements/store/kv-sql.test.ts +86 -0
  825. package/src/elements/store/kv-sql.ts +178 -0
  826. package/src/elements/store/resource-list-docs.fixture.ts +0 -2
  827. package/src/elements/store/resource-list-docs.test.ts +3 -0
  828. package/src/elements/store/resource.test.ts +62 -2
  829. package/src/elements/store/resource.ts +279 -62
  830. package/src/elements/store/runtime.ts +88 -11
  831. package/src/elements/store/schema-decl.test.ts +49 -0
  832. package/src/elements/store/schema-decl.ts +29 -9
  833. package/src/elements/store/seed.test.ts +22 -1
  834. package/src/elements/store/seed.ts +46 -1
  835. package/src/elements/store/sql-session.ts +32 -7
  836. package/src/elements/store/table.ts +17 -1
  837. package/src/elements/store/upsert-app.test.ts +1 -1
  838. package/src/elements/store.test.ts +23 -0
  839. package/src/elements/store.ts +26 -3
  840. package/src/elements/vault/boot-chain.test.ts +108 -10
  841. package/src/elements/vault/boot-chain.ts +15 -15
  842. package/src/elements/vault/builtin-adapter.test.ts +1 -0
  843. package/src/elements/vault/builtin-adapter.ts +12 -0
  844. package/src/elements/vault/chain.ts +6 -20
  845. package/src/elements/vault/declare.ts +5 -2
  846. package/src/elements/vault/runtime.ts +47 -13
  847. package/src/elements/vault/storage.ts +35 -4
  848. package/src/elements/vault.test.ts +1 -0
  849. package/src/elements/vault.ts +2 -0
  850. package/src/full.ts +10 -0
  851. package/src/http.ts +1 -1
  852. package/src/index.ts +8 -0
  853. package/src/kernel/adopt-barrel-fresh.test.ts +1 -2
  854. package/src/kernel/app-auth.ts +8 -1
  855. package/src/kernel/app.ts +245 -25
  856. package/src/kernel/auth-resolve.ts +51 -0
  857. package/src/kernel/auto-cache.test.ts +270 -0
  858. package/src/kernel/boot-bind/ai.test.ts +34 -1
  859. package/src/kernel/boot-bind/ai.ts +15 -2
  860. package/src/kernel/boot-bind/channel.test.ts +1 -1
  861. package/src/kernel/boot-bind/channel.ts +1 -1
  862. package/src/kernel/boot-bind/clock.ts +9 -7
  863. package/src/kernel/boot-bind/gate.ts +1 -1
  864. package/src/kernel/boot-bind/honor-config.test.ts +70 -3
  865. package/src/kernel/boot-bind/instances.ts +58 -0
  866. package/src/kernel/boot-bind/journal.ts +3 -2
  867. package/src/kernel/boot-bind/runs.ts +63 -5
  868. package/src/kernel/boot-bind/signal.ts +1 -1
  869. package/src/kernel/boot-bind/store.test.ts +150 -1
  870. package/src/kernel/boot-bind/store.ts +70 -5
  871. package/src/kernel/boot.test.ts +9 -9
  872. package/src/kernel/boot.ts +115 -16
  873. package/src/kernel/capability.test.ts +42 -0
  874. package/src/kernel/capability.ts +44 -2
  875. package/src/kernel/compensate.test.ts +34 -1
  876. package/src/kernel/compensate.ts +19 -0
  877. package/src/kernel/effect-timing.test.ts +16 -0
  878. package/src/kernel/effects-stamping.test.ts +3 -3
  879. package/src/kernel/effects.test.ts +15 -0
  880. package/src/kernel/effects.ts +39 -5
  881. package/src/kernel/elapsed.test.ts +26 -0
  882. package/src/kernel/elapsed.ts +23 -0
  883. package/src/kernel/errors.ts +26 -3
  884. package/src/kernel/flow.ts +5 -1
  885. package/src/kernel/fx-ask-telemetry.test.ts +114 -0
  886. package/src/kernel/fx.test.ts +143 -2
  887. package/src/kernel/fx.ts +136 -19
  888. package/src/kernel/graceful-shutdown.test.ts +20 -0
  889. package/src/kernel/graceful-shutdown.ts +9 -3
  890. package/src/kernel/horizontal-child.ts +4 -4
  891. package/src/kernel/http-query.test.ts +184 -0
  892. package/src/kernel/http-resource.ts +55 -0
  893. package/src/kernel/index.ts +43 -0
  894. package/src/kernel/instance-id.ts +23 -0
  895. package/src/kernel/instances-chaos-child.ts +73 -0
  896. package/src/kernel/instances.chaos.test.ts +238 -0
  897. package/src/kernel/instances.test.ts +85 -0
  898. package/src/kernel/instances.ts +372 -0
  899. package/src/kernel/lazy-require.ts +20 -0
  900. package/src/kernel/list-page.test.ts +194 -0
  901. package/src/kernel/list-page.ts +515 -0
  902. package/src/kernel/list-query.ts +469 -0
  903. package/src/kernel/pipeline-api-key.test.ts +266 -0
  904. package/src/kernel/pipeline.test.ts +164 -2
  905. package/src/kernel/pipeline.ts +13 -1
  906. package/src/kernel/plugin-elements.test.ts +1 -1
  907. package/src/kernel/plugin-needs.test.ts +1 -1
  908. package/src/kernel/plugin.ts +5 -5
  909. package/src/kernel/ready.test.ts +22 -2
  910. package/src/kernel/registry.ts +8 -4
  911. package/src/kernel/resource-mount.test.ts +75 -0
  912. package/src/kernel/router/index.ts +2 -0
  913. package/src/kernel/router/linear.ts +7 -0
  914. package/src/kernel/router/regexp.ts +8 -0
  915. package/src/kernel/router/smart.ts +7 -3
  916. package/src/kernel/router/trie.ts +7 -0
  917. package/src/kernel/router/types.ts +41 -1
  918. package/src/kernel/router.test.ts +27 -0
  919. package/src/kernel/router.ts +2 -0
  920. package/src/kernel/run-duration.test.ts +92 -0
  921. package/src/kernel/run-telemetry.ts +8 -2
  922. package/src/kernel/triggers.ts +95 -74
  923. package/src/manifest/diff.test.ts +13 -0
  924. package/src/manifest/diff.ts +15 -0
  925. package/src/manifest/sql-resource.test.ts +29 -0
  926. package/src/manifest/sql-resource.ts +20 -4
  927. package/src/manifest/types.ts +13 -3
  928. package/src/plugins/auth-delivery.mailpit.integration.test.ts +1 -1
  929. package/src/plugins/auth-methods.security.test.ts +3 -3
  930. package/src/plugins/auth-methods.test.ts +2 -2
  931. package/src/plugins/cors.test.ts +4 -2
  932. package/src/plugins/cors.ts +11 -2
  933. package/src/plugins/csrf.test.ts +17 -0
  934. package/src/plugins/csrf.ts +1 -1
  935. package/src/plugins/username-policy.test.ts +8 -8
  936. package/src/plugins/username.ts +1 -1
  937. package/src/release/build-lib.ts +7 -1
  938. package/src/release/limits.ts +2 -2
  939. package/src/release/measure.ts +7 -10
  940. package/src/runs/bridge-to-console.ts +99 -0
  941. package/src/runs/collect.test.ts +68 -0
  942. package/src/runs/collect.ts +29 -2
  943. package/src/runs/drivers/clickhouse.ts +4 -1
  944. package/src/runs/drivers/files.ts +138 -33
  945. package/src/runs/drivers/memory.ts +46 -7
  946. package/src/runs/drivers/postgres.ts +4 -1
  947. package/src/runs/duckdb.test.ts +33 -0
  948. package/src/runs/duckdb.ts +41 -0
  949. package/src/runs/history.ts +61 -0
  950. package/src/runs/index.ts +29 -1
  951. package/src/runs/parquet.test.ts +110 -0
  952. package/src/runs/parquet.ts +129 -8
  953. package/src/runs/retention.test.ts +24 -0
  954. package/src/runs/retention.ts +42 -0
  955. package/src/runs/runs.test.ts +101 -0
  956. package/src/runs/runtime.ts +5 -3
  957. package/src/runs/types.ts +33 -4
  958. package/src/runtime/bun.ts +61 -4
  959. package/src/runtime/dev-request-log.test.ts +4 -0
  960. package/src/runtime/dev-request-log.ts +19 -2
  961. package/src/runtime/index.ts +8 -1
  962. package/src/runtime/json-code-block.test.ts +355 -0
  963. package/src/runtime/json-code-block.ts +961 -0
  964. package/src/runtime/serve.test.ts +49 -4
  965. package/src/term.test.ts +89 -1
  966. package/src/term.ts +103 -29
  967. package/src/test/create-test-app.ts +3 -1
  968. package/src/console/ui/access/AccessA11yView.tsx +0 -222
  969. package/src/console/ui/access/a11y.test.tsx +0 -113
  970. package/src/console/ui/access/acknowledgement.test.ts +0 -10
  971. package/src/console/ui/access/acknowledgement.ts +0 -33
  972. package/src/console/ui/access/blast-radius.test.ts +0 -26
  973. package/src/console/ui/access/blast-radius.ts +0 -38
  974. package/src/console/ui/access/confirmation.test.ts +0 -34
  975. package/src/console/ui/access/confirmation.ts +0 -33
  976. package/src/console/ui/access/fixture.ts +0 -199
  977. package/src/console/ui/access/grantable.test.ts +0 -15
  978. package/src/console/ui/access/grantable.ts +0 -31
  979. package/src/console/ui/access/hygiene.test.ts +0 -12
  980. package/src/console/ui/access/hygiene.ts +0 -39
  981. package/src/console/ui/access/index.ts +0 -47
  982. package/src/console/ui/access/provenance.test.ts +0 -10
  983. package/src/console/ui/access/provenance.ts +0 -25
  984. package/src/console/ui/access/search.test.ts +0 -13
  985. package/src/console/ui/access/search.ts +0 -68
  986. package/src/console/ui/access/types.ts +0 -111
  987. package/src/console/ui/ai/AiA11yView.tsx +0 -254
  988. package/src/console/ui/ai/a11y.test.tsx +0 -96
  989. package/src/console/ui/ai/findings.ts +0 -41
  990. package/src/console/ui/ai/fixture.ts +0 -177
  991. package/src/console/ui/ai/format.ts +0 -88
  992. package/src/console/ui/ai/group.test.ts +0 -35
  993. package/src/console/ui/ai/group.ts +0 -80
  994. package/src/console/ui/ai/index.ts +0 -59
  995. package/src/console/ui/ai/promotion.test.ts +0 -72
  996. package/src/console/ui/ai/promotion.ts +0 -141
  997. package/src/console/ui/ai/search.test.ts +0 -31
  998. package/src/console/ui/ai/search.ts +0 -79
  999. package/src/console/ui/ai/types.ts +0 -132
  1000. package/src/console/ui/architecture/ArchitectureA11yView.tsx +0 -142
  1001. package/src/console/ui/architecture/a11y.test.tsx +0 -96
  1002. package/src/console/ui/architecture/boundary.ts +0 -42
  1003. package/src/console/ui/architecture/declared.ts +0 -161
  1004. package/src/console/ui/architecture/fixture.ts +0 -74
  1005. package/src/console/ui/architecture/index.ts +0 -56
  1006. package/src/console/ui/architecture/layers.ts +0 -64
  1007. package/src/console/ui/architecture/layout.ts +0 -66
  1008. package/src/console/ui/architecture/pathologies.ts +0 -251
  1009. package/src/console/ui/architecture/search.ts +0 -136
  1010. package/src/console/ui/architecture/traffic.ts +0 -92
  1011. package/src/console/ui/architecture/types.ts +0 -136
  1012. package/src/console/ui/architecture/view.test.ts +0 -153
  1013. package/src/console/ui/architecture/view.ts +0 -489
  1014. package/src/console/ui/channels/ChannelsA11yView.tsx +0 -171
  1015. package/src/console/ui/channels/a11y.test.tsx +0 -95
  1016. package/src/console/ui/channels/confirmation.test.ts +0 -34
  1017. package/src/console/ui/channels/confirmation.ts +0 -24
  1018. package/src/console/ui/channels/fallback.test.ts +0 -15
  1019. package/src/console/ui/channels/fallback.ts +0 -20
  1020. package/src/console/ui/channels/findings.ts +0 -34
  1021. package/src/console/ui/channels/fixture.ts +0 -134
  1022. package/src/console/ui/channels/group.ts +0 -25
  1023. package/src/console/ui/channels/index.ts +0 -51
  1024. package/src/console/ui/channels/locale.test.ts +0 -15
  1025. package/src/console/ui/channels/locale.ts +0 -25
  1026. package/src/console/ui/channels/mask.test.ts +0 -14
  1027. package/src/console/ui/channels/mask.ts +0 -12
  1028. package/src/console/ui/channels/search.ts +0 -49
  1029. package/src/console/ui/channels/taxonomy.test.ts +0 -17
  1030. package/src/console/ui/channels/taxonomy.ts +0 -47
  1031. package/src/console/ui/channels/types.ts +0 -118
  1032. package/src/console/ui/clock/ClockA11yView.tsx +0 -165
  1033. package/src/console/ui/clock/a11y.test.tsx +0 -96
  1034. package/src/console/ui/clock/confirmation.test.ts +0 -30
  1035. package/src/console/ui/clock/confirmation.ts +0 -31
  1036. package/src/console/ui/clock/findings.ts +0 -37
  1037. package/src/console/ui/clock/fixture.ts +0 -111
  1038. package/src/console/ui/clock/health.test.ts +0 -25
  1039. package/src/console/ui/clock/health.ts +0 -56
  1040. package/src/console/ui/clock/index.ts +0 -41
  1041. package/src/console/ui/clock/search.test.ts +0 -37
  1042. package/src/console/ui/clock/search.ts +0 -72
  1043. package/src/console/ui/clock/timeline.test.ts +0 -42
  1044. package/src/console/ui/clock/timeline.ts +0 -41
  1045. package/src/console/ui/clock/types.ts +0 -79
  1046. package/src/console/ui/clock/waiting-on.test.ts +0 -30
  1047. package/src/console/ui/clock/waiting-on.ts +0 -78
  1048. package/src/console/ui/confirmation.unify.test.ts +0 -92
  1049. package/src/console/ui/diff/DiffA11yView.tsx +0 -76
  1050. package/src/console/ui/diff/a11y.test.tsx +0 -96
  1051. package/src/console/ui/diff/fixture.ts +0 -85
  1052. package/src/console/ui/diff/group.test.ts +0 -48
  1053. package/src/console/ui/diff/group.ts +0 -91
  1054. package/src/console/ui/diff/index.ts +0 -32
  1055. package/src/console/ui/diff/search.test.ts +0 -28
  1056. package/src/console/ui/diff/search.ts +0 -63
  1057. package/src/console/ui/diff/summary.ts +0 -73
  1058. package/src/console/ui/diff/types.ts +0 -48
  1059. package/src/console/ui/display.test.ts +0 -14
  1060. package/src/console/ui/display.ts +0 -9
  1061. package/src/console/ui/dist/assets/index--Y0Uaz-m.js +0 -10
  1062. package/src/console/ui/dist/assets/panel-access-ri1X9Otj.js +0 -64
  1063. package/src/console/ui/dist/assets/panel-ai-DLHjRoJk.js +0 -1
  1064. package/src/console/ui/dist/assets/panel-architecture-DI3bQF3J.js +0 -1
  1065. package/src/console/ui/dist/assets/panel-channels-BDYWX29p.js +0 -1
  1066. package/src/console/ui/dist/assets/panel-clock-i-JpTjVB.js +0 -1
  1067. package/src/console/ui/dist/assets/panel-diff-CFuWxiXy.js +0 -1
  1068. package/src/console/ui/dist/assets/panel-flows-B8TRhcoe.js +0 -48
  1069. package/src/console/ui/dist/assets/panel-gates-CfkBgco7.js +0 -1
  1070. package/src/console/ui/dist/assets/panel-overview-CW0CQEc2.js +0 -1
  1071. package/src/console/ui/dist/assets/panel-plugins-DDJwTehL.js +0 -1
  1072. package/src/console/ui/dist/assets/panel-runs-BxuyDI3x.js +0 -1
  1073. package/src/console/ui/dist/assets/panel-signals-BXofbj7v.js +0 -1
  1074. package/src/console/ui/dist/assets/panel-store-B8mH-arU.js +0 -1
  1075. package/src/console/ui/dist/assets/panel-traces-DSA-ZWnf.js +0 -1
  1076. package/src/console/ui/dist/assets/panel-vault-BkZdJPX8.js +0 -1
  1077. package/src/console/ui/dist/assets/rolldown-runtime-B0Z9INg1.js +0 -1
  1078. package/src/console/ui/dist/assets/style-C3L349iZ.css +0 -3
  1079. package/src/console/ui/dist/favicon.svg +0 -7
  1080. package/src/console/ui/dist/index.html +0 -15
  1081. package/src/console/ui/flows/FlowsA11yView.tsx +0 -140
  1082. package/src/console/ui/flows/a11y.test.tsx +0 -99
  1083. package/src/console/ui/flows/buffer.test.ts +0 -83
  1084. package/src/console/ui/flows/buffer.ts +0 -111
  1085. package/src/console/ui/flows/confirmation.ts +0 -129
  1086. package/src/console/ui/flows/contract.test.ts +0 -85
  1087. package/src/console/ui/flows/contract.ts +0 -329
  1088. package/src/console/ui/flows/fixture.ts +0 -81
  1089. package/src/console/ui/flows/graph.test.ts +0 -93
  1090. package/src/console/ui/flows/graph.ts +0 -539
  1091. package/src/console/ui/flows/index.ts +0 -82
  1092. package/src/console/ui/flows/save-as-test.test.ts +0 -47
  1093. package/src/console/ui/flows/save-as-test.ts +0 -97
  1094. package/src/console/ui/flows/search.ts +0 -238
  1095. package/src/console/ui/flows/tiers.ts +0 -133
  1096. package/src/console/ui/gates/GatesA11yView.tsx +0 -183
  1097. package/src/console/ui/gates/a11y.test.tsx +0 -113
  1098. package/src/console/ui/gates/audit.test.ts +0 -40
  1099. package/src/console/ui/gates/audit.ts +0 -61
  1100. package/src/console/ui/gates/denial.test.ts +0 -34
  1101. package/src/console/ui/gates/denial.ts +0 -43
  1102. package/src/console/ui/gates/findings.ts +0 -17
  1103. package/src/console/ui/gates/fixture.ts +0 -193
  1104. package/src/console/ui/gates/group.test.ts +0 -30
  1105. package/src/console/ui/gates/group.ts +0 -94
  1106. package/src/console/ui/gates/index.ts +0 -39
  1107. package/src/console/ui/gates/search.test.ts +0 -49
  1108. package/src/console/ui/gates/search.ts +0 -108
  1109. package/src/console/ui/gates/types.ts +0 -124
  1110. package/src/console/ui/overview/OverviewA11yView.tsx +0 -134
  1111. package/src/console/ui/overview/a11y.test.tsx +0 -112
  1112. package/src/console/ui/overview/busiest.ts +0 -24
  1113. package/src/console/ui/overview/compose.ts +0 -121
  1114. package/src/console/ui/overview/cost.test.ts +0 -39
  1115. package/src/console/ui/overview/cost.ts +0 -134
  1116. package/src/console/ui/overview/fixture.ts +0 -156
  1117. package/src/console/ui/overview/golden.ts +0 -47
  1118. package/src/console/ui/overview/index.ts +0 -52
  1119. package/src/console/ui/overview/rank.test.ts +0 -129
  1120. package/src/console/ui/overview/rank.ts +0 -205
  1121. package/src/console/ui/overview/slo.test.ts +0 -69
  1122. package/src/console/ui/overview/slo.ts +0 -240
  1123. package/src/console/ui/overview/types.ts +0 -127
  1124. package/src/console/ui/overview/verdict.ts +0 -124
  1125. package/src/console/ui/plugins/PluginsA11yView.tsx +0 -217
  1126. package/src/console/ui/plugins/a11y.test.tsx +0 -96
  1127. package/src/console/ui/plugins/command.test.ts +0 -22
  1128. package/src/console/ui/plugins/command.ts +0 -27
  1129. package/src/console/ui/plugins/findings.ts +0 -39
  1130. package/src/console/ui/plugins/fixture.ts +0 -238
  1131. package/src/console/ui/plugins/group.test.ts +0 -36
  1132. package/src/console/ui/plugins/group.ts +0 -62
  1133. package/src/console/ui/plugins/index.ts +0 -30
  1134. package/src/console/ui/plugins/search.ts +0 -55
  1135. package/src/console/ui/plugins/types.ts +0 -118
  1136. package/src/console/ui/runs/RunsA11yView.tsx +0 -252
  1137. package/src/console/ui/runs/a11y.test.tsx +0 -96
  1138. package/src/console/ui/runs/errors.test.ts +0 -53
  1139. package/src/console/ui/runs/errors.ts +0 -88
  1140. package/src/console/ui/runs/explain.test.ts +0 -23
  1141. package/src/console/ui/runs/explain.ts +0 -28
  1142. package/src/console/ui/runs/fixture.ts +0 -189
  1143. package/src/console/ui/runs/group.test.ts +0 -24
  1144. package/src/console/ui/runs/group.ts +0 -76
  1145. package/src/console/ui/runs/histogram.test.ts +0 -22
  1146. package/src/console/ui/runs/histogram.ts +0 -82
  1147. package/src/console/ui/runs/index.ts +0 -69
  1148. package/src/console/ui/runs/project.ts +0 -118
  1149. package/src/console/ui/runs/query.test.ts +0 -48
  1150. package/src/console/ui/runs/query.ts +0 -260
  1151. package/src/console/ui/runs/search.test.ts +0 -45
  1152. package/src/console/ui/runs/search.ts +0 -143
  1153. package/src/console/ui/runs/trace-link.test.ts +0 -26
  1154. package/src/console/ui/runs/trace-link.ts +0 -87
  1155. package/src/console/ui/runs/types.ts +0 -135
  1156. package/src/console/ui/shell/App.tsx +0 -88
  1157. package/src/console/ui/shell/client.ts +0 -1642
  1158. package/src/console/ui/shell/components/oke-logo.tsx +0 -40
  1159. package/src/console/ui/shell/components/ui.tsx +0 -111
  1160. package/src/console/ui/shell/index.html +0 -13
  1161. package/src/console/ui/shell/layout/Shell.tsx +0 -92
  1162. package/src/console/ui/shell/main.tsx +0 -216
  1163. package/src/console/ui/shell/panels/Access.tsx +0 -5
  1164. package/src/console/ui/shell/panels/Ai.tsx +0 -5
  1165. package/src/console/ui/shell/panels/Architecture.tsx +0 -5
  1166. package/src/console/ui/shell/panels/Channels.tsx +0 -5
  1167. package/src/console/ui/shell/panels/Clock.tsx +0 -5
  1168. package/src/console/ui/shell/panels/Diff.tsx +0 -5
  1169. package/src/console/ui/shell/panels/Flows.tsx +0 -5
  1170. package/src/console/ui/shell/panels/Gates.tsx +0 -5
  1171. package/src/console/ui/shell/panels/Overview.tsx +0 -6
  1172. package/src/console/ui/shell/panels/Plugins.tsx +0 -5
  1173. package/src/console/ui/shell/panels/Runs.tsx +0 -5
  1174. package/src/console/ui/shell/panels/Signals.tsx +0 -5
  1175. package/src/console/ui/shell/panels/Store.tsx +0 -5
  1176. package/src/console/ui/shell/panels/Traces.tsx +0 -5
  1177. package/src/console/ui/shell/panels/Vault.tsx +0 -5
  1178. package/src/console/ui/shell/panels/access/AccessPanel.tsx +0 -749
  1179. package/src/console/ui/shell/panels/ai/AiPanel.tsx +0 -492
  1180. package/src/console/ui/shell/panels/architecture/ArchitecturePanel.tsx +0 -329
  1181. package/src/console/ui/shell/panels/channels/ChannelsPanel.tsx +0 -422
  1182. package/src/console/ui/shell/panels/clock/ClockPanel.tsx +0 -454
  1183. package/src/console/ui/shell/panels/diff/DiffPanel.tsx +0 -234
  1184. package/src/console/ui/shell/panels/flows/ContractEditor.tsx +0 -284
  1185. package/src/console/ui/shell/panels/flows/FlowDrawer.tsx +0 -335
  1186. package/src/console/ui/shell/panels/flows/FlowsPanel.tsx +0 -482
  1187. package/src/console/ui/shell/panels/gates/GatesPanel.tsx +0 -433
  1188. package/src/console/ui/shell/panels/overview/OverviewPanel.tsx +0 -398
  1189. package/src/console/ui/shell/panels/plugins/PluginsPanel.tsx +0 -402
  1190. package/src/console/ui/shell/panels/runs/RunsPanel.tsx +0 -652
  1191. package/src/console/ui/shell/panels/signals/SignalsPanel.tsx +0 -788
  1192. package/src/console/ui/shell/panels/store/StorePanel.tsx +0 -755
  1193. package/src/console/ui/shell/panels/traces/TracesPanel.tsx +0 -478
  1194. package/src/console/ui/shell/panels/vault/VaultPanel.tsx +0 -477
  1195. package/src/console/ui/shell/plugin/Sandbox.tsx +0 -29
  1196. package/src/console/ui/shell/public/favicon.svg +0 -7
  1197. package/src/console/ui/shell/setup/Wizard.tsx +0 -211
  1198. package/src/console/ui/shell/styles.css +0 -74
  1199. package/src/console/ui/signals/SignalsA11yView.tsx +0 -252
  1200. package/src/console/ui/signals/a11y.test.tsx +0 -96
  1201. package/src/console/ui/signals/confirmation.test.ts +0 -35
  1202. package/src/console/ui/signals/confirmation.ts +0 -59
  1203. package/src/console/ui/signals/dry-run.test.ts +0 -18
  1204. package/src/console/ui/signals/dry-run.ts +0 -34
  1205. package/src/console/ui/signals/durable.test.ts +0 -22
  1206. package/src/console/ui/signals/durable.ts +0 -39
  1207. package/src/console/ui/signals/findings.ts +0 -31
  1208. package/src/console/ui/signals/fixture.ts +0 -242
  1209. package/src/console/ui/signals/group.test.ts +0 -26
  1210. package/src/console/ui/signals/group.ts +0 -41
  1211. package/src/console/ui/signals/index.ts +0 -49
  1212. package/src/console/ui/signals/monitor.test.ts +0 -30
  1213. package/src/console/ui/signals/monitor.ts +0 -74
  1214. package/src/console/ui/signals/schema-form.test.ts +0 -23
  1215. package/src/console/ui/signals/schema-form.ts +0 -109
  1216. package/src/console/ui/signals/search.ts +0 -93
  1217. package/src/console/ui/signals/types.ts +0 -72
  1218. package/src/console/ui/store/StoreA11yView.tsx +0 -193
  1219. package/src/console/ui/store/a11y.test.tsx +0 -96
  1220. package/src/console/ui/store/cache-view.test.ts +0 -13
  1221. package/src/console/ui/store/cache-view.ts +0 -36
  1222. package/src/console/ui/store/confirmation.test.ts +0 -36
  1223. package/src/console/ui/store/confirmation.ts +0 -52
  1224. package/src/console/ui/store/dry-run.test.ts +0 -15
  1225. package/src/console/ui/store/dry-run.ts +0 -26
  1226. package/src/console/ui/store/fixture.ts +0 -167
  1227. package/src/console/ui/store/group.test.ts +0 -16
  1228. package/src/console/ui/store/group.ts +0 -38
  1229. package/src/console/ui/store/index.ts +0 -36
  1230. package/src/console/ui/store/search.ts +0 -74
  1231. package/src/console/ui/store/types.ts +0 -67
  1232. package/src/console/ui/store/will-not-fire.test.ts +0 -19
  1233. package/src/console/ui/store/will-not-fire.ts +0 -39
  1234. package/src/console/ui/traces/TracesA11yView.tsx +0 -181
  1235. package/src/console/ui/traces/a11y.test.tsx +0 -96
  1236. package/src/console/ui/traces/chain.test.ts +0 -47
  1237. package/src/console/ui/traces/chain.ts +0 -142
  1238. package/src/console/ui/traces/critical-path.test.ts +0 -22
  1239. package/src/console/ui/traces/critical-path.ts +0 -55
  1240. package/src/console/ui/traces/filter.test.ts +0 -74
  1241. package/src/console/ui/traces/filter.ts +0 -104
  1242. package/src/console/ui/traces/fixture.ts +0 -126
  1243. package/src/console/ui/traces/fold.test.ts +0 -59
  1244. package/src/console/ui/traces/fold.ts +0 -168
  1245. package/src/console/ui/traces/index.ts +0 -64
  1246. package/src/console/ui/traces/mini.ts +0 -63
  1247. package/src/console/ui/traces/replay.test.ts +0 -22
  1248. package/src/console/ui/traces/replay.ts +0 -33
  1249. package/src/console/ui/traces/sampling.test.ts +0 -26
  1250. package/src/console/ui/traces/sampling.ts +0 -63
  1251. package/src/console/ui/traces/search.ts +0 -135
  1252. package/src/console/ui/traces/tier.ts +0 -70
  1253. package/src/console/ui/traces/types.ts +0 -125
  1254. package/src/console/ui/tsconfig.json +0 -20
  1255. package/src/console/ui/vault/VaultA11yView.tsx +0 -197
  1256. package/src/console/ui/vault/a11y.test.tsx +0 -96
  1257. package/src/console/ui/vault/backend.test.ts +0 -75
  1258. package/src/console/ui/vault/backend.ts +0 -117
  1259. package/src/console/ui/vault/blast-radius.ts +0 -53
  1260. package/src/console/ui/vault/confirmation.test.ts +0 -37
  1261. package/src/console/ui/vault/confirmation.ts +0 -36
  1262. package/src/console/ui/vault/dormant.ts +0 -28
  1263. package/src/console/ui/vault/export-safe.test.ts +0 -26
  1264. package/src/console/ui/vault/export-safe.ts +0 -62
  1265. package/src/console/ui/vault/fixture.ts +0 -94
  1266. package/src/console/ui/vault/group.test.ts +0 -25
  1267. package/src/console/ui/vault/group.ts +0 -49
  1268. package/src/console/ui/vault/index.ts +0 -47
  1269. package/src/console/ui/vault/search.ts +0 -58
  1270. package/src/console/ui/vault/types.ts +0 -83
  1271. package/src/console/ui/vite.config.ts +0 -84
  1272. /package/src/console/{ui/vault → ui-next/src/features/vault/lib}/blast-radius.test.ts +0 -0
  1273. /package/src/console/{ui/vault → ui-next/src/features/vault/lib}/dormant.test.ts +0 -0
@@ -0,0 +1,1125 @@
1
+ /**
2
+ * Lived-in keel Store rows for Console ui-next seed.
3
+ *
4
+ * Workspace ENG / DES / GTM — spaces, goals, projects, sections, tasks,
5
+ * comments, plus KV drafts/reminders, keel workspace files
6
+ * (attachments / documents / avatars / projects / exports / forms),
7
+ * and task / document / comment / project indexes.
8
+ */
9
+
10
+ import { defineTable } from "../../elements/store.ts";
11
+ import { classify } from "../../elements/store/classify.ts";
12
+ import {
13
+ UI_NEXT_SEED_APP_SYSTEM_ROWS,
14
+ UI_NEXT_SEED_APP_SYSTEM_TABLES,
15
+ } from "./ui-next-seed-app-schema.ts";
16
+ import type { SqlRow } from "../../drivers/types.ts";
17
+ import type { SqlStoreHandle } from "../../elements/store/sql-session.ts";
18
+ import type {
19
+ FilesStoreFxHandle,
20
+ KvStoreFxHandle,
21
+ StoreRuntime,
22
+ VectorIndexStoreFxHandle,
23
+ } from "../../elements/store/runtime.ts";
24
+
25
+ /** Extra generated volume on top of the featured Harbor story rows. */
26
+ const GENERATED = {
27
+ members: 12,
28
+ projects: 6,
29
+ tasks: 500,
30
+ comments: 220,
31
+ documents: 20,
32
+ kvKeys: 40,
33
+ files: 24,
34
+ index: 44,
35
+ } as const;
36
+
37
+ const SEED_SPACES = [
38
+ { id: "space_eng", key: "ENG", name: "Engineering", color: "#2563eb" },
39
+ { id: "space_des", key: "DES", name: "Design", color: "#db2777" },
40
+ { id: "space_gtm", key: "GTM", name: "Go-to-market", color: "#059669" },
41
+ ] as const;
42
+
43
+ const SEED_MEMBERS = [
44
+ {
45
+ id: "mem_aria",
46
+ space_id: "space_eng",
47
+ name: "Aria Chen",
48
+ email: "aria@keel.dev",
49
+ role: "project_manager",
50
+ },
51
+ {
52
+ id: "mem_ben",
53
+ space_id: "space_eng",
54
+ name: "Ben Okonkwo",
55
+ email: "ben@keel.dev",
56
+ role: "developer",
57
+ },
58
+ {
59
+ id: "mem_cai",
60
+ space_id: "space_des",
61
+ name: "Cai Moreno",
62
+ email: "cai@keel.dev",
63
+ role: "member",
64
+ },
65
+ {
66
+ id: "mem_dia",
67
+ space_id: "space_gtm",
68
+ name: "Dia Farouk",
69
+ email: "dia@keel.dev",
70
+ role: "guest",
71
+ },
72
+ {
73
+ id: "mem_eli",
74
+ space_id: "space_eng",
75
+ name: "Eli Park",
76
+ email: "eli@keel.dev",
77
+ role: "developer",
78
+ },
79
+ ] as const;
80
+
81
+ const SEED_GOALS = [
82
+ {
83
+ id: "goal_harbor",
84
+ name: "Harbor GA",
85
+ status: "at_risk",
86
+ owner_email: "aria@keel.dev",
87
+ target_date: "2026-09-30",
88
+ },
89
+ ] as const;
90
+
91
+ const SEED_PROJECTS = [
92
+ {
93
+ id: "proj_api",
94
+ space_id: "space_eng",
95
+ goal_id: "goal_harbor",
96
+ name: "Harbor API",
97
+ status: "started",
98
+ lead_email: "ben@keel.dev",
99
+ start_date: "2026-07-01",
100
+ target_date: "2026-08-29",
101
+ color: "#2563eb",
102
+ },
103
+ {
104
+ id: "proj_web",
105
+ space_id: "space_eng",
106
+ goal_id: "goal_harbor",
107
+ name: "Harbor Web",
108
+ status: "started",
109
+ lead_email: "eli@keel.dev",
110
+ start_date: "2026-07-08",
111
+ target_date: "2026-09-12",
112
+ color: "#7c3aed",
113
+ },
114
+ {
115
+ id: "proj_launch",
116
+ space_id: "space_gtm",
117
+ goal_id: "goal_harbor",
118
+ name: "Launch checklist",
119
+ status: "planned",
120
+ lead_email: "aria@keel.dev",
121
+ start_date: "2026-08-01",
122
+ target_date: "2026-09-30",
123
+ color: "#059669",
124
+ },
125
+ ] as const;
126
+
127
+ const SECTIONS = ["Backlog", "Ready", "Doing", "Review", "Done"] as const;
128
+
129
+ const SEED_SECTIONS = [
130
+ ...SECTIONS.map((name, i) => ({
131
+ id: `sec_api_${i}`,
132
+ project_id: "proj_api",
133
+ name,
134
+ sort_order: i,
135
+ })),
136
+ ...SECTIONS.map((name, i) => ({
137
+ id: `sec_web_${i}`,
138
+ project_id: "proj_web",
139
+ name,
140
+ sort_order: i,
141
+ })),
142
+ ...SECTIONS.map((name, i) => ({
143
+ id: `sec_launch_${i}`,
144
+ project_id: "proj_launch",
145
+ name,
146
+ sort_order: i,
147
+ })),
148
+ ] as const;
149
+
150
+ const SEED_TAGS = [
151
+ { id: "tag_bug", name: "bug", group_name: "type" },
152
+ { id: "tag_feature", name: "feature", group_name: "type" },
153
+ { id: "tag_customer", name: "customer", group_name: "source" },
154
+ { id: "tag_design", name: "design", group_name: "area" },
155
+ ] as const;
156
+
157
+ type TaskRow = {
158
+ id: string;
159
+ identifier: string;
160
+ title: string;
161
+ description: string;
162
+ kind: string;
163
+ priority: number;
164
+ estimate: number | null;
165
+ status: string;
166
+ space_id: string;
167
+ project_id: string | null;
168
+ section_id: string | null;
169
+ parent_id: string | null;
170
+ due_date: string | null;
171
+ completed_at: string | null;
172
+ archived_at: string | null;
173
+ creator_email: string;
174
+ role_needed: string | null;
175
+ };
176
+
177
+ function task(
178
+ row: Omit<
179
+ TaskRow,
180
+ "kind" | "estimate" | "parent_id" | "due_date" | "completed_at" | "archived_at" | "role_needed"
181
+ > &
182
+ Partial<TaskRow>,
183
+ ): TaskRow {
184
+ return {
185
+ kind: "task",
186
+ estimate: null,
187
+ parent_id: null,
188
+ due_date: null,
189
+ completed_at: null,
190
+ archived_at: null,
191
+ role_needed: null,
192
+ ...row,
193
+ };
194
+ }
195
+
196
+ const SEED_TASKS: readonly TaskRow[] = [
197
+ task({
198
+ id: "tsk_eng_12",
199
+ identifier: "ENG-12",
200
+ title: "SSO login fails",
201
+ description: "Customer cannot sign in after rotating the claim code.",
202
+ priority: 1,
203
+ estimate: 5,
204
+ status: "doing",
205
+ space_id: "space_eng",
206
+ project_id: "proj_api",
207
+ section_id: "sec_api_2",
208
+ due_date: "2026-08-08",
209
+ creator_email: "aria@keel.dev",
210
+ role_needed: "developer",
211
+ }),
212
+ task({
213
+ id: "tsk_eng_13",
214
+ identifier: "ENG-13",
215
+ title: "Billing webhook",
216
+ description: "Stripe → Harbor invoice settled.",
217
+ priority: 2,
218
+ estimate: 8,
219
+ status: "doing",
220
+ space_id: "space_eng",
221
+ project_id: "proj_api",
222
+ section_id: "sec_api_2",
223
+ creator_email: "ben@keel.dev",
224
+ role_needed: "developer",
225
+ }),
226
+ task({
227
+ id: "tsk_eng_14",
228
+ identifier: "ENG-14",
229
+ title: "Checkout polish",
230
+ description: "Blocked on billing webhook.",
231
+ priority: 2,
232
+ estimate: 5,
233
+ status: "ready",
234
+ space_id: "space_eng",
235
+ project_id: "proj_web",
236
+ section_id: "sec_web_1",
237
+ creator_email: "eli@keel.dev",
238
+ role_needed: "developer",
239
+ }),
240
+ task({
241
+ id: "tsk_eng_10",
242
+ identifier: "ENG-10",
243
+ title: "API freeze",
244
+ description: "No breaking changes after this date.",
245
+ kind: "milestone",
246
+ priority: 2,
247
+ status: "ready",
248
+ space_id: "space_eng",
249
+ project_id: "proj_api",
250
+ section_id: "sec_api_1",
251
+ due_date: "2026-08-20",
252
+ creator_email: "aria@keel.dev",
253
+ role_needed: "project_manager",
254
+ }),
255
+ task({
256
+ id: "tsk_eng_9",
257
+ identifier: "ENG-9",
258
+ title: "Weekly launch review",
259
+ description: "Recurring PM + eng sync.",
260
+ priority: 3,
261
+ status: "todo",
262
+ space_id: "space_gtm",
263
+ project_id: "proj_launch",
264
+ section_id: "sec_launch_1",
265
+ creator_email: "aria@keel.dev",
266
+ role_needed: "project_manager",
267
+ }),
268
+ task({
269
+ id: "tsk_des_4",
270
+ identifier: "DES-4",
271
+ title: "RTL checkout labels",
272
+ description: "ملاحظة التصميم — identifiers stay LTR.",
273
+ priority: 3,
274
+ estimate: 3,
275
+ status: "todo",
276
+ space_id: "space_des",
277
+ project_id: "proj_web",
278
+ section_id: "sec_web_1",
279
+ due_date: "2026-08-10",
280
+ creator_email: "cai@keel.dev",
281
+ }),
282
+ task({
283
+ id: "tsk_eng_8",
284
+ identifier: "ENG-8",
285
+ title: "Replica lag banner",
286
+ description: "Overdue — store browse showed stale rows.",
287
+ priority: 1,
288
+ estimate: 3,
289
+ status: "todo",
290
+ space_id: "space_eng",
291
+ project_id: "proj_web",
292
+ section_id: "sec_web_0",
293
+ due_date: "2026-08-01",
294
+ creator_email: "eli@keel.dev",
295
+ role_needed: "developer",
296
+ }),
297
+ ];
298
+
299
+ const SEED_ASSIGNEES = [
300
+ { id: "asg_1", task_id: "tsk_eng_12", assignee_email: "ben@keel.dev" },
301
+ { id: "asg_2", task_id: "tsk_eng_13", assignee_email: "ben@keel.dev" },
302
+ { id: "asg_3", task_id: "tsk_eng_14", assignee_email: "eli@keel.dev" },
303
+ { id: "asg_4", task_id: "tsk_eng_8", assignee_email: "eli@keel.dev" },
304
+ { id: "asg_5", task_id: "tsk_eng_9", assignee_email: "aria@keel.dev" },
305
+ ] as const;
306
+
307
+ const SEED_UPDATES = [
308
+ {
309
+ id: "upd_web_1",
310
+ project_id: "proj_web",
311
+ health: "at_risk",
312
+ body: "Checkout polish blocked on billing webhook.",
313
+ author_email: "eli@keel.dev",
314
+ },
315
+ ] as const;
316
+
317
+ const SEED_COMMENTS = [
318
+ {
319
+ id: "cmt_1",
320
+ task_id: "tsk_eng_12",
321
+ author_email: "aria@keel.dev",
322
+ body: "Form intake — assign to a developer. @ben@keel.dev can you take this?",
323
+ },
324
+ {
325
+ id: "cmt_2",
326
+ task_id: "tsk_eng_12",
327
+ author_email: "ben@keel.dev",
328
+ body: "Repro'd — session cleared after claim rotate.",
329
+ },
330
+ {
331
+ id: "cmt_3",
332
+ task_id: "tsk_des_4",
333
+ author_email: "cai@keel.dev",
334
+ body: "ملاحظة التصميم — identifiers stay LTR inside RTL notes.",
335
+ },
336
+ ] as const;
337
+
338
+ const SEED_DOCUMENTS = [
339
+ {
340
+ id: "doc_prd_api",
341
+ title: "Harbor API PRD",
342
+ body: "SSO + billing webhook before freeze.",
343
+ parent_kind: "project",
344
+ parent_id: "proj_api",
345
+ },
346
+ {
347
+ id: "doc_spec_12",
348
+ title: "ENG-12 implementation spec",
349
+ body: "Claim rotate must keep the session cookie.",
350
+ parent_kind: "task",
351
+ parent_id: "tsk_eng_12",
352
+ },
353
+ ] as const;
354
+
355
+ const SEED_VIEWS = [
356
+ {
357
+ id: "view_web_board",
358
+ project_id: "proj_web",
359
+ name: "Web board",
360
+ kind: "board",
361
+ filters_json: "{}",
362
+ owner_email: "aria@keel.dev",
363
+ },
364
+ {
365
+ id: "view_api_list",
366
+ project_id: "proj_api",
367
+ name: "API list",
368
+ kind: "list",
369
+ filters_json: "{}",
370
+ owner_email: "ben@keel.dev",
371
+ },
372
+ {
373
+ id: "view_launch_tl",
374
+ project_id: "proj_launch",
375
+ name: "Launch timeline",
376
+ kind: "timeline",
377
+ filters_json: "{}",
378
+ owner_email: "aria@keel.dev",
379
+ },
380
+ ] as const;
381
+
382
+ const SEED_FORMS = [
383
+ {
384
+ id: "form_customer",
385
+ project_id: "proj_api",
386
+ name: "Customer request",
387
+ schema_json: '{"title":"string","body":"string"}',
388
+ },
389
+ ] as const;
390
+
391
+ const SEED_SUBMISSIONS = [
392
+ {
393
+ id: "sub_1",
394
+ form_id: "form_customer",
395
+ task_id: "tsk_eng_12",
396
+ payload_json: '{"title":"SSO login fails"}',
397
+ customer_name: "Harbor Logistics",
398
+ },
399
+ ] as const;
400
+
401
+ const SEED_INBOX = [
402
+ {
403
+ id: "inb_1",
404
+ member_email: "aria@keel.dev",
405
+ kind: "form-submitted",
406
+ title: "Harbor Logistics",
407
+ ref_id: "tsk_eng_12",
408
+ read_at: null as string | null,
409
+ },
410
+ {
411
+ id: "inb_2",
412
+ member_email: "ben@keel.dev",
413
+ kind: "task-assigned",
414
+ title: "SSO login fails",
415
+ ref_id: "tsk_eng_12",
416
+ read_at: null,
417
+ },
418
+ ] as const;
419
+
420
+ const SEED_KV: ReadonlyArray<{ key: string; value: unknown; ttl?: string }> = [
421
+ {
422
+ key: "drafts:ENG-12",
423
+ value: {
424
+ identifier: "ENG-12",
425
+ title: "SSO login fails",
426
+ expiresAt: "2026-08-14T01:00:00Z",
427
+ },
428
+ ttl: "2h",
429
+ },
430
+ {
431
+ key: "drafts:ENG-14",
432
+ value: {
433
+ identifier: "ENG-14",
434
+ title: "Checkout polish",
435
+ expiresAt: "2026-08-14T01:10:00Z",
436
+ },
437
+ ttl: "45m",
438
+ },
439
+ {
440
+ key: "reminders:ENG-8",
441
+ value: { identifier: "ENG-8", until: "2026-08-15T12:00:00Z", reason: "overdue banner" },
442
+ ttl: "12h",
443
+ },
444
+ ];
445
+
446
+ /** 1×1 PNG so the Files inspector can preview a real image. */
447
+ const SEED_PNG = Uint8Array.from(
448
+ atob(
449
+ "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==",
450
+ ),
451
+ (ch) => ch.charCodeAt(0),
452
+ );
453
+
454
+ const SEED_FILES: ReadonlyArray<{
455
+ key: string;
456
+ originalName: string;
457
+ data: string | Uint8Array;
458
+ }> = [
459
+ { key: "attachments/tsk_eng_12/spec.pdf", originalName: "spec.pdf", data: "spec-bytes:ENG-12" },
460
+ {
461
+ key: "attachments/tsk_eng_12/screenshot.png",
462
+ originalName: "screenshot.png",
463
+ data: SEED_PNG,
464
+ },
465
+ {
466
+ key: "documents/doc_prd_api/prd.md",
467
+ originalName: "prd.md",
468
+ data: "# Harbor API PRD\n\nSSO + billing webhook before freeze.\n",
469
+ },
470
+ {
471
+ key: "documents/doc_spec_12/impl-spec.md",
472
+ originalName: "impl-spec.md",
473
+ data: "# ENG-12\n\nClaim rotate must keep the session cookie.\n",
474
+ },
475
+ { key: "avatars/mem_aria.png", originalName: "aria.png", data: SEED_PNG },
476
+ { key: "avatars/mem_ben.png", originalName: "ben.png", data: SEED_PNG },
477
+ {
478
+ key: "projects/proj_api/brief.md",
479
+ originalName: "brief.md",
480
+ data: "# Harbor API\n\nLead: Ben. Target 2026-08-29.\n",
481
+ },
482
+ { key: "projects/proj_web/cover.png", originalName: "cover.png", data: SEED_PNG },
483
+ {
484
+ key: "exports/harbor-ga.csv",
485
+ originalName: "harbor-ga.csv",
486
+ data: "identifier,title,status\nENG-12,SSO login fails,started\n",
487
+ },
488
+ {
489
+ key: "forms/form_customer/intake.json",
490
+ originalName: "intake.json",
491
+ data: '{"title":"SSO login fails","body":"Form intake"}\n',
492
+ },
493
+ ];
494
+
495
+ const SEED_INDEX: ReadonlyArray<{
496
+ id: string;
497
+ vector: readonly number[];
498
+ meta: Record<string, unknown>;
499
+ }> = [
500
+ {
501
+ id: "tsk_eng_12",
502
+ vector: [1, 0, 0],
503
+ meta: { identifier: "ENG-12", title: "SSO login fails" },
504
+ },
505
+ {
506
+ id: "tsk_eng_13",
507
+ vector: [0, 1, 0],
508
+ meta: { identifier: "ENG-13", title: "Billing webhook" },
509
+ },
510
+ {
511
+ id: "tsk_des_4",
512
+ vector: [0, 0, 1],
513
+ meta: { identifier: "DES-4", title: "RTL checkout labels" },
514
+ },
515
+ {
516
+ id: "tsk_eng_8",
517
+ vector: [1, 1, 0],
518
+ meta: { identifier: "ENG-8", title: "Replica lag banner" },
519
+ },
520
+ ];
521
+
522
+ /**
523
+ * Deterministic PRNG so volume seed is stable across boots/tests.
524
+ *
525
+ * @param seed - 32-bit seed
526
+ */
527
+ function mulberry32(seed: number): () => number {
528
+ let t = seed >>> 0;
529
+ return () => {
530
+ t = (t + 0x6d2b79f5) >>> 0;
531
+ let r = Math.imul(t ^ (t >>> 15), 1 | t);
532
+ r ^= r + Math.imul(r ^ (r >>> 7), 61 | r);
533
+ return ((r ^ (r >>> 14)) >>> 0) / 4294967296;
534
+ };
535
+ }
536
+
537
+ const TASK_TITLES = [
538
+ "Fix flaky checkout hover",
539
+ "Goal capacity dial",
540
+ "Reminder persist",
541
+ "PRD document template",
542
+ "Overdue banner on tasks",
543
+ "Subtask auto-complete parent",
544
+ "GitHub PR moves to Done",
545
+ "Mention reply locale",
546
+ "Draft TTL sweep",
547
+ "Project health update",
548
+ "Tag group for area",
549
+ "Replica lag chip",
550
+ "Keyboard copy run id",
551
+ "Index stale after rename",
552
+ "Form attach",
553
+ "Section progress rollup",
554
+ "Role needed blocks assignment",
555
+ "Duplicate reserved status",
556
+ "Inbox live comment",
557
+ "Ask intake from Slack",
558
+ ] as const;
559
+
560
+ const COMMENT_BODIES = [
561
+ "Ship it — matches the spec.",
562
+ "Need a screenshot before we accept.",
563
+ "Moved to the next section.",
564
+ "Duplicate of the SSO work.",
565
+ "ملاحظة المراجعة — keep identifiers LTR.",
566
+ "Assignee swapped after form intake.",
567
+ ] as const;
568
+
569
+ const EXTRA_PEOPLE = [
570
+ { id: "nora", name: "Nora Singh", space_id: "space_eng" },
571
+ { id: "omar", name: "Omar Haddad", space_id: "space_eng" },
572
+ { id: "priya", name: "Priya Shah", space_id: "space_eng" },
573
+ { id: "quin", name: "Quin Walsh", space_id: "space_eng" },
574
+ { id: "rosa", name: "Rosa Alvarez", space_id: "space_eng" },
575
+ { id: "samir", name: "Samir Cole", space_id: "space_eng" },
576
+ { id: "tess", name: "Tess Nguyen", space_id: "space_eng" },
577
+ { id: "uma", name: "Uma Berg", space_id: "space_eng" },
578
+ { id: "vik", name: "Vik Noor", space_id: "space_des" },
579
+ { id: "wen", name: "Wen Li", space_id: "space_des" },
580
+ { id: "yael", name: "Yael Cohen", space_id: "space_gtm" },
581
+ { id: "zio", name: "Zio Hart", space_id: "space_gtm" },
582
+ ] as const;
583
+
584
+ const STATUSES = ["backlog", "todo", "ready", "doing", "review", "done"] as const;
585
+ const ESTIMATES = [1, 2, 3, 5, 8, 13, null] as const;
586
+ const KINDS = ["task", "task", "task", "subtask", "milestone"] as const;
587
+ const ROLES = ["developer", "project_manager", "member", null] as const;
588
+
589
+ /**
590
+ * Build the high-volume tail so Store browse looks like a live work-management org.
591
+ */
592
+ function generateKeelVolume(): {
593
+ readonly members: ReadonlyArray<{
594
+ id: string;
595
+ space_id: string;
596
+ name: string;
597
+ email: string;
598
+ role: string;
599
+ }>;
600
+ readonly projects: ReadonlyArray<{
601
+ id: string;
602
+ space_id: string;
603
+ goal_id: string;
604
+ name: string;
605
+ status: string;
606
+ lead_email: string;
607
+ start_date: string;
608
+ target_date: string;
609
+ color: string;
610
+ }>;
611
+ readonly tasks: readonly TaskRow[];
612
+ readonly comments: ReadonlyArray<{
613
+ id: string;
614
+ task_id: string;
615
+ author_email: string;
616
+ body: string;
617
+ }>;
618
+ readonly documents: ReadonlyArray<{
619
+ id: string;
620
+ title: string;
621
+ body: string;
622
+ parent_kind: string;
623
+ parent_id: string;
624
+ }>;
625
+ readonly kv: ReadonlyArray<{ key: string; value: unknown; ttl?: string }>;
626
+ readonly files: ReadonlyArray<{ key: string; originalName: string; data: string }>;
627
+ readonly index: ReadonlyArray<{
628
+ id: string;
629
+ vector: readonly number[];
630
+ meta: Record<string, unknown>;
631
+ }>;
632
+ } {
633
+ const rand = mulberry32(0x6ee1_5eed);
634
+ const pick = <T>(xs: readonly T[]): T => xs[Math.floor(rand() * xs.length)]!;
635
+
636
+ const members = EXTRA_PEOPLE.map((p) => ({
637
+ id: `mem_${p.id}`,
638
+ space_id: p.space_id,
639
+ name: p.name,
640
+ email: `${p.id}@keel.dev`,
641
+ role: "member",
642
+ }));
643
+ const emails = [
644
+ "aria@keel.dev",
645
+ "ben@keel.dev",
646
+ "cai@keel.dev",
647
+ "dia@keel.dev",
648
+ "eli@keel.dev",
649
+ ...members.map((m) => m.email),
650
+ ];
651
+
652
+ const projects = Array.from({ length: GENERATED.projects }, (_, i) => ({
653
+ id: `proj_g_${String(i + 1).padStart(2, "0")}`,
654
+ space_id: pick(["space_eng", "space_des", "space_gtm"] as const),
655
+ goal_id: "goal_harbor",
656
+ name: `${pick(["Inbox", "Agents", "Replay", "Access", "Vault", "Clock"])} ${i + 1}`,
657
+ status: pick(["backlog", "started", "completed"]),
658
+ lead_email: pick(emails),
659
+ start_date: `2026-0${(i % 9) + 1}-01`,
660
+ target_date: `2026-0${(i % 9) + 1}-15`,
661
+ color: "#64748b",
662
+ }));
663
+ const projectIds = ["proj_api", "proj_web", "proj_launch", ...projects.map((p) => p.id), null];
664
+
665
+ const tasks: TaskRow[] = [];
666
+ for (let i = 0; i < GENERATED.tasks; i += 1) {
667
+ const roll = rand();
668
+ const space = roll < 0.72 ? ("ENG" as const) : roll < 0.9 ? ("DES" as const) : ("GTM" as const);
669
+ const n = 200 + i;
670
+ const identifier = `${space}-${n}`;
671
+ const title = `${pick(TASK_TITLES)} (${identifier})`;
672
+ const rtl = rand() < 0.06;
673
+ tasks.push({
674
+ id: `tsk_${space.toLowerCase()}_${n}`,
675
+ identifier,
676
+ title,
677
+ description: rtl
678
+ ? `ملاحظة ${identifier} — ${title}`
679
+ : `${title} filed from the lived-in keel backlog.`,
680
+ kind: pick(KINDS),
681
+ priority: Math.floor(rand() * 5),
682
+ estimate: pick(ESTIMATES),
683
+ status: pick(STATUSES),
684
+ space_id: space === "ENG" ? "space_eng" : space === "DES" ? "space_des" : "space_gtm",
685
+ project_id: pick(projectIds),
686
+ section_id: rand() < 0.4 ? pick(["sec_api_0", "sec_api_2", "sec_web_1", null]) : null,
687
+ parent_id:
688
+ i > 8 && rand() < 0.08 ? (tasks[i - 1 - Math.floor(rand() * 4)]?.id ?? null) : null,
689
+ creator_email: pick(emails),
690
+ role_needed: pick(ROLES),
691
+ due_date:
692
+ rand() < 0.35 ? `2026-08-${String(1 + Math.floor(rand() * 28)).padStart(2, "0")}` : null,
693
+ completed_at: rand() < 0.12 ? "2026-08-01T00:00:00Z" : null,
694
+ archived_at: rand() < 0.04 ? "2026-08-01T00:00:00Z" : null,
695
+ });
696
+ }
697
+
698
+ const comments: Array<{ id: string; task_id: string; author_email: string; body: string }> = [];
699
+ for (let i = 0; i < GENERATED.comments; i += 1) {
700
+ const row = tasks[Math.floor(rand() * tasks.length)]!;
701
+ comments.push({
702
+ id: `cmt_g_${i}`,
703
+ task_id: row.id,
704
+ author_email: pick(emails),
705
+ body: pick(COMMENT_BODIES),
706
+ });
707
+ }
708
+
709
+ const documents = Array.from({ length: GENERATED.documents }, (_, i) => {
710
+ const row = tasks[i]!;
711
+ return {
712
+ id: `doc_g_${i}`,
713
+ title: `Notes ${row.identifier}`,
714
+ body: `Working notes for ${row.title}.`,
715
+ parent_kind: "task",
716
+ parent_id: row.id,
717
+ };
718
+ });
719
+
720
+ const kv = Array.from({ length: GENERATED.kvKeys }, (_, i) => {
721
+ const row = tasks[i]!;
722
+ const ttls = ["30m", "2h", "12h", "1d"] as const;
723
+ return {
724
+ key: i % 7 === 0 ? `reminders:${row.identifier}` : `drafts:${row.identifier}`,
725
+ value: {
726
+ identifier: row.identifier,
727
+ title: row.title,
728
+ expiresAt: "2026-08-14T02:00:00Z",
729
+ },
730
+ ...(i % 5 === 0 ? {} : { ttl: ttls[i % ttls.length] }),
731
+ };
732
+ });
733
+
734
+ const files = Array.from({ length: GENERATED.files }, (_, i) => {
735
+ const row = tasks[i]!;
736
+ const member = members[i % members.length]!;
737
+ const project = projects[i % projects.length]!;
738
+ const document = documents[i % documents.length]!;
739
+ switch (i % 6) {
740
+ case 1:
741
+ return {
742
+ key: `documents/${document.id}/notes-${i}.md`,
743
+ originalName: `notes-${i}.md`,
744
+ data: `# ${document.title}\n\n${document.body}\n`,
745
+ };
746
+ case 2:
747
+ return {
748
+ key: `avatars/${member.id}/photo-${i}.txt`,
749
+ originalName: `photo-${i}.txt`,
750
+ data: `avatar:${member.email}`,
751
+ };
752
+ case 3:
753
+ return {
754
+ key: `projects/${project.id}/asset-${i}.md`,
755
+ originalName: `asset-${i}.md`,
756
+ data: `# ${project.name}\n\nStatus ${project.status}.\n`,
757
+ };
758
+ case 4:
759
+ return {
760
+ key: `exports/${row.identifier}.csv`,
761
+ originalName: `${row.identifier}.csv`,
762
+ data: `identifier,title\n${row.identifier},${row.title}\n`,
763
+ };
764
+ case 5:
765
+ return {
766
+ key: `forms/form_customer/sub-${i}.json`,
767
+ originalName: `sub-${i}.json`,
768
+ data: `{"title":${JSON.stringify(row.title)}}\n`,
769
+ };
770
+ default:
771
+ return {
772
+ key: `attachments/${row.identifier}/note-${i}.txt`,
773
+ originalName: `note-${i}.txt`,
774
+ data: `bytes:${row.identifier}`,
775
+ };
776
+ }
777
+ });
778
+
779
+ const index = Array.from({ length: GENERATED.index }, (_, i) => {
780
+ const row = tasks[i]!;
781
+ const a = i % 3 === 0 ? 1 : 0;
782
+ const b = i % 3 === 1 ? 1 : 0;
783
+ const c = i % 3 === 2 ? 1 : 0;
784
+ return {
785
+ id: row.id,
786
+ vector: [a, b, c] as const,
787
+ meta: { identifier: row.identifier, title: row.title },
788
+ };
789
+ });
790
+
791
+ return {
792
+ members,
793
+ projects,
794
+ tasks,
795
+ comments,
796
+ documents,
797
+ kv,
798
+ files,
799
+ index,
800
+ };
801
+ }
802
+
803
+ const KEEL_VOLUME = generateKeelVolume();
804
+
805
+ /** Seeded facet / table counts (verifiable in tests). */
806
+ export const UI_NEXT_SEED_STORE_COUNTS = {
807
+ sqlSpaces: SEED_SPACES.length,
808
+ sqlMembers: SEED_MEMBERS.length + KEEL_VOLUME.members.length,
809
+ sqlGoals: SEED_GOALS.length,
810
+ sqlProjects: SEED_PROJECTS.length + KEEL_VOLUME.projects.length,
811
+ sqlSections: SEED_SECTIONS.length,
812
+ sqlTasks: SEED_TASKS.length + KEEL_VOLUME.tasks.length,
813
+ sqlComments: SEED_COMMENTS.length + KEEL_VOLUME.comments.length,
814
+ sqlDocuments: SEED_DOCUMENTS.length + KEEL_VOLUME.documents.length,
815
+ kvKeys: SEED_KV.length + KEEL_VOLUME.kv.length,
816
+ filesAttachments: SEED_FILES.length + KEEL_VOLUME.files.length,
817
+ indexTasks: SEED_INDEX.length + KEEL_VOLUME.index.length,
818
+ indexDocuments: SEED_DOCUMENTS.length + KEEL_VOLUME.documents.length,
819
+ indexComments: SEED_COMMENTS.length + KEEL_VOLUME.comments.length,
820
+ indexProjects: SEED_PROJECTS.length + KEEL_VOLUME.projects.length,
821
+ sqlIdentities: UI_NEXT_SEED_APP_SYSTEM_ROWS.oke_identities?.length ?? 0,
822
+ sqlAppSessions: UI_NEXT_SEED_APP_SYSTEM_ROWS.oke_sessions?.length ?? 0,
823
+ sqlCrons: UI_NEXT_SEED_APP_SYSTEM_ROWS.oke_crons?.length ?? 0,
824
+ } as const;
825
+
826
+ /**
827
+ * Seed real Store rows/keys/objects/vectors into the Console Manifest memory
828
+ * runtime so every facet browse is non-empty (SQL/KV/Files/Index).
829
+ *
830
+ * @param runtime - Booted Console Store runtime
831
+ */
832
+ export async function seedUiNextStoreData(runtime: StoreRuntime): Promise<void> {
833
+ const sql = (await runtime.openRef("sql:db", {
834
+ effects: { writes: ["sql:db"] },
835
+ revealPii: true,
836
+ })) as SqlStoreHandle;
837
+
838
+ const spaces = defineTable("spaces", {
839
+ id: true,
840
+ key: true,
841
+ name: true,
842
+ color: true,
843
+ });
844
+ const members = defineTable("members", {
845
+ id: true,
846
+ space_id: true,
847
+ name: true,
848
+ email: classify({ pii: true }),
849
+ role: true,
850
+ });
851
+ const goals = defineTable("goals", {
852
+ id: true,
853
+ name: true,
854
+ status: true,
855
+ owner_email: classify({ pii: true }),
856
+ target_date: true,
857
+ });
858
+ const projects = defineTable("projects", {
859
+ id: true,
860
+ space_id: true,
861
+ goal_id: true,
862
+ name: true,
863
+ status: true,
864
+ lead_email: classify({ pii: true }),
865
+ start_date: true,
866
+ target_date: true,
867
+ color: true,
868
+ });
869
+ const sections = defineTable("sections", {
870
+ id: true,
871
+ project_id: true,
872
+ name: true,
873
+ sort_order: true,
874
+ });
875
+ const tasks = defineTable("tasks", {
876
+ id: true,
877
+ identifier: true,
878
+ title: true,
879
+ description: true,
880
+ kind: true,
881
+ priority: true,
882
+ estimate: true,
883
+ status: true,
884
+ space_id: true,
885
+ project_id: true,
886
+ section_id: true,
887
+ parent_id: true,
888
+ due_date: true,
889
+ completed_at: true,
890
+ archived_at: true,
891
+ creator_email: classify({ pii: true }),
892
+ role_needed: true,
893
+ });
894
+ const assignees = defineTable("task_assignees", {
895
+ id: true,
896
+ task_id: true,
897
+ assignee_email: classify({ pii: true }),
898
+ });
899
+ const comments = defineTable("comments", {
900
+ id: true,
901
+ task_id: true,
902
+ author_email: classify({ pii: true }),
903
+ body: true,
904
+ });
905
+ const documents = defineTable("documents", {
906
+ id: true,
907
+ title: true,
908
+ body: true,
909
+ parent_kind: true,
910
+ parent_id: true,
911
+ });
912
+ const fileObjects = defineTable("file_objects", {
913
+ id: true,
914
+ object_key: true,
915
+ original_name: true,
916
+ content_type: true,
917
+ size_bytes: true,
918
+ store_ref: true,
919
+ });
920
+ const updates = defineTable("project_updates", {
921
+ id: true,
922
+ project_id: true,
923
+ health: true,
924
+ body: true,
925
+ author_email: classify({ pii: true }),
926
+ });
927
+ const views = defineTable("views", {
928
+ id: true,
929
+ project_id: true,
930
+ name: true,
931
+ kind: true,
932
+ filters_json: true,
933
+ owner_email: classify({ pii: true }),
934
+ });
935
+ const forms = defineTable("forms", {
936
+ id: true,
937
+ project_id: true,
938
+ name: true,
939
+ schema_json: true,
940
+ });
941
+ const submissions = defineTable("form_submissions", {
942
+ id: true,
943
+ form_id: true,
944
+ task_id: true,
945
+ payload_json: true,
946
+ customer_name: true,
947
+ });
948
+ const inbox = defineTable("inbox", {
949
+ id: true,
950
+ member_email: classify({ pii: true }),
951
+ kind: true,
952
+ title: true,
953
+ ref_id: true,
954
+ read_at: true,
955
+ });
956
+ const tags = defineTable("tags", {
957
+ id: true,
958
+ name: true,
959
+ group_name: true,
960
+ });
961
+
962
+ const tables: ReadonlyArray<readonly [ReturnType<typeof defineTable>, readonly SqlRow[]]> = [
963
+ [spaces, SEED_SPACES],
964
+ [members, [...SEED_MEMBERS, ...KEEL_VOLUME.members]],
965
+ [goals, SEED_GOALS],
966
+ [projects, [...SEED_PROJECTS, ...KEEL_VOLUME.projects]],
967
+ [sections, SEED_SECTIONS],
968
+ [tags, SEED_TAGS],
969
+ [tasks, [...SEED_TASKS, ...KEEL_VOLUME.tasks]],
970
+ [assignees, SEED_ASSIGNEES],
971
+ [comments, [...SEED_COMMENTS, ...KEEL_VOLUME.comments]],
972
+ [documents, [...SEED_DOCUMENTS, ...KEEL_VOLUME.documents]],
973
+ [updates, SEED_UPDATES],
974
+ [views, SEED_VIEWS],
975
+ [forms, SEED_FORMS],
976
+ [submissions, SEED_SUBMISSIONS],
977
+ [inbox, SEED_INBOX],
978
+ [
979
+ fileObjects,
980
+ [...SEED_FILES, ...KEEL_VOLUME.files].map((entry) => ({
981
+ id: entry.key,
982
+ object_key: entry.key,
983
+ original_name: entry.originalName,
984
+ content_type: entry.originalName.endsWith(".png")
985
+ ? "image/png"
986
+ : entry.originalName.endsWith(".pdf")
987
+ ? "application/pdf"
988
+ : entry.originalName.endsWith(".patch")
989
+ ? "text/x-patch"
990
+ : "text/plain",
991
+ size_bytes: typeof entry.data === "string" ? entry.data.length : entry.data.byteLength,
992
+ store_ref: "files:keel",
993
+ })),
994
+ ],
995
+ ];
996
+
997
+ for (const [table, rows] of tables) {
998
+ await sql.ensureTable(table);
999
+ for (const row of rows) {
1000
+ await sql.insert(table).values(row);
1001
+ }
1002
+ }
1003
+
1004
+ for (const [name, rows] of Object.entries(UI_NEXT_SEED_APP_SYSTEM_ROWS)) {
1005
+ const declared = UI_NEXT_SEED_APP_SYSTEM_TABLES[name]?.columns ?? {};
1006
+ const columns: Record<string, true | ReturnType<typeof classify>> = {};
1007
+ for (const [key, spec] of Object.entries(declared)) {
1008
+ const pii = spec.pii === true;
1009
+ const sensitive = spec.sensitive === true;
1010
+ columns[key] =
1011
+ pii || sensitive
1012
+ ? classify({ ...(pii ? { pii } : {}), ...(sensitive ? { sensitive } : {}) })
1013
+ : true;
1014
+ }
1015
+ const table = defineTable(name, columns);
1016
+ await sql.ensureTable(table);
1017
+ for (const row of rows) {
1018
+ await sql.insert(table).values(row as SqlRow);
1019
+ }
1020
+ }
1021
+
1022
+ const kv = (await runtime.openRef("kv:cache", {
1023
+ effects: { writes: ["kv:cache"] },
1024
+ })) as KvStoreFxHandle;
1025
+ for (const entry of [...SEED_KV, ...KEEL_VOLUME.kv]) {
1026
+ await kv.set(
1027
+ entry.key,
1028
+ entry.value,
1029
+ "ttl" in entry && typeof entry.ttl === "string" ? entry.ttl : undefined,
1030
+ );
1031
+ }
1032
+
1033
+ const files = (await runtime.openRef("files:keel", {
1034
+ effects: { writes: ["files:keel"] },
1035
+ })) as FilesStoreFxHandle;
1036
+ const allFiles = [...SEED_FILES, ...KEEL_VOLUME.files];
1037
+ for (const entry of allFiles) {
1038
+ await files.put(entry.key, entry.data);
1039
+ }
1040
+ const catalog = {
1041
+ version: 1 as const,
1042
+ objects: Object.fromEntries(
1043
+ allFiles.map((entry) => [
1044
+ entry.key,
1045
+ {
1046
+ originalName: entry.originalName,
1047
+ contentType: entry.originalName.endsWith(".png")
1048
+ ? "image/png"
1049
+ : entry.originalName.endsWith(".pdf")
1050
+ ? "application/pdf"
1051
+ : entry.originalName.endsWith(".patch")
1052
+ ? "text/x-patch"
1053
+ : "text/plain",
1054
+ sizeBytes: typeof entry.data === "string" ? entry.data.length : entry.data.byteLength,
1055
+ updatedAt: "2026-08-14T00:00:00.000Z",
1056
+ },
1057
+ ]),
1058
+ ),
1059
+ };
1060
+ await files.put(".oke/catalog.json", JSON.stringify(catalog));
1061
+
1062
+ await seedIndexRef(runtime, "index:search", [...SEED_INDEX, ...KEEL_VOLUME.index]);
1063
+ await seedIndexRef(runtime, "index:documents", [
1064
+ ...SEED_DOCUMENTS.map((row, i) =>
1065
+ toIndexEntry(row.id, i, { title: row.title, parentKind: row.parent_kind }),
1066
+ ),
1067
+ ...KEEL_VOLUME.documents.map((row, i) =>
1068
+ toIndexEntry(row.id, SEED_DOCUMENTS.length + i, {
1069
+ title: row.title,
1070
+ parentKind: row.parent_kind,
1071
+ }),
1072
+ ),
1073
+ ]);
1074
+ await seedIndexRef(runtime, "index:comments", [
1075
+ ...SEED_COMMENTS.map((row, i) =>
1076
+ toIndexEntry(row.id, i, { taskId: row.task_id, body: row.body }),
1077
+ ),
1078
+ ...KEEL_VOLUME.comments.map((row, i) =>
1079
+ toIndexEntry(row.id, SEED_COMMENTS.length + i, {
1080
+ taskId: row.task_id,
1081
+ body: row.body,
1082
+ }),
1083
+ ),
1084
+ ]);
1085
+ await seedIndexRef(runtime, "index:projects", [
1086
+ ...SEED_PROJECTS.map((row, i) =>
1087
+ toIndexEntry(row.id, i, { name: row.name, status: row.status }),
1088
+ ),
1089
+ ...KEEL_VOLUME.projects.map((row, i) =>
1090
+ toIndexEntry(row.id, SEED_PROJECTS.length + i, {
1091
+ name: row.name,
1092
+ status: row.status,
1093
+ }),
1094
+ ),
1095
+ ]);
1096
+ }
1097
+
1098
+ function indexVector(i: number): readonly [number, number, number] {
1099
+ return [i % 3 === 0 ? 1 : 0, i % 3 === 1 ? 1 : 0, i % 3 === 2 ? 1 : 0];
1100
+ }
1101
+
1102
+ function toIndexEntry(
1103
+ id: string,
1104
+ i: number,
1105
+ meta: Record<string, unknown>,
1106
+ ): { id: string; vector: readonly number[]; meta: Record<string, unknown> } {
1107
+ return { id, vector: indexVector(i), meta };
1108
+ }
1109
+
1110
+ async function seedIndexRef(
1111
+ runtime: StoreRuntime,
1112
+ ref: `index:${string}`,
1113
+ entries: ReadonlyArray<{
1114
+ id: string;
1115
+ vector: readonly number[];
1116
+ meta: Record<string, unknown>;
1117
+ }>,
1118
+ ): Promise<void> {
1119
+ const index = (await runtime.openRef(ref, {
1120
+ effects: { writes: [ref] },
1121
+ })) as VectorIndexStoreFxHandle;
1122
+ for (const entry of entries) {
1123
+ await index.upsert(entry.id, entry.vector, entry.meta);
1124
+ }
1125
+ }