okengine 0.10.2 → 0.11.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 (343) hide show
  1. package/package.json +76 -10
  2. package/site/content/docs/ai/mcp.mdx +0 -1
  3. package/site/content/docs/deployment/docker-swarm.mdx +48 -111
  4. package/site/content/docs/deployment/docker.mdx +43 -36
  5. package/site/content/docs/deployment/index.mdx +9 -9
  6. package/site/content/docs/deployment/kubernetes.mdx +4 -4
  7. package/site/content/docs/elements/ai.mdx +7 -13
  8. package/site/content/docs/elements/channel.mdx +9 -13
  9. package/site/content/docs/elements/clock.mdx +8 -14
  10. package/site/content/docs/elements/flow.mdx +46 -54
  11. package/site/content/docs/elements/gate.mdx +6 -11
  12. package/site/content/docs/elements/signal.mdx +2 -8
  13. package/site/content/docs/elements/store.mdx +79 -93
  14. package/site/content/docs/elements/vault.mdx +89 -76
  15. package/site/content/docs/get-started/basic-usage.mdx +8 -14
  16. package/site/content/docs/get-started/installation.mdx +36 -36
  17. package/site/content/docs/get-started/introduction.mdx +11 -0
  18. package/site/content/docs/get-started/why.mdx +3 -4
  19. package/site/content/docs/index.mdx +0 -1
  20. package/site/content/docs/meta.json +0 -1
  21. package/site/content/docs/plugins/anonymous.mdx +1 -1
  22. package/site/content/docs/plugins/magic-link.mdx +11 -11
  23. package/site/content/docs/plugins/otp.mdx +2 -2
  24. package/site/content/docs/plugins/passkey.mdx +1 -1
  25. package/site/content/docs/plugins/two-factor.mdx +1 -1
  26. package/site/content/docs/plugins/username.mdx +1 -1
  27. package/site/content/docs/recipes/caddy.mdx +1 -1
  28. package/site/content/docs/recipes/cockroachdb.mdx +2 -2
  29. package/site/content/docs/recipes/dragonfly.mdx +1 -1
  30. package/site/content/docs/recipes/index.mdx +1 -2
  31. package/site/content/docs/recipes/llama-cpp.mdx +21 -23
  32. package/site/content/docs/recipes/mailpit.mdx +11 -11
  33. package/site/content/docs/recipes/meilisearch.mdx +10 -10
  34. package/site/content/docs/recipes/meta.json +0 -1
  35. package/site/content/docs/recipes/ollama.mdx +1 -1
  36. package/site/content/docs/recipes/pgdog.mdx +12 -9
  37. package/site/content/docs/recipes/postgres.mdx +3 -3
  38. package/site/content/docs/recipes/redis.mdx +2 -2
  39. package/site/content/docs/recipes/rustfs.mdx +10 -7
  40. package/site/content/docs/recipes/sglang.mdx +1 -1
  41. package/site/content/docs/recipes/supabase-docker.mdx +1 -1
  42. package/site/content/docs/recipes/timescale.mdx +2 -2
  43. package/site/content/docs/recipes/valkey.mdx +1 -1
  44. package/site/content/docs/recipes/vllm.mdx +1 -1
  45. package/site/content/docs/recipes/yugabytedb.mdx +2 -2
  46. package/site/content/docs/reference/cli.md +61 -38
  47. package/site/content/docs/reference/configuration.mdx +145 -70
  48. package/site/content/docs/reference/environment-variables.mdx +36 -28
  49. package/site/content/docs/reference/errors.mdx +28 -29
  50. package/site/content/docs/reference/fx.mdx +14 -7
  51. package/site/content/docs/reference/i18n.mdx +17 -6
  52. package/site/content/docs/reference/index.mdx +5 -0
  53. package/site/content/docs/reference/meta.json +1 -0
  54. package/site/content/docs/reference/migrating-environments.mdx +158 -0
  55. package/site/content/docs/reference/plugins.mdx +2 -2
  56. package/src/auth/gate-auth.test.ts +12 -10
  57. package/src/cli/ai-setup/ai-setup.test.ts +30 -16
  58. package/src/cli/ai-setup/apply.ts +111 -15
  59. package/src/cli/ai-setup/catalog.ts +3 -3
  60. package/src/cli/ai-setup/index.ts +1 -1
  61. package/src/cli/ai-setup/prompts.ts +1 -1
  62. package/src/cli/ai-setup/recommend.test.ts +1 -1
  63. package/src/cli/ask-seed.test.ts +3 -3
  64. package/src/cli/build.ts +8 -9
  65. package/src/cli/db-auto-push.test.ts +6 -3
  66. package/src/cli/db-auto-push.ts +7 -5
  67. package/src/cli/db-seed.ts +7 -8
  68. package/src/cli/db.test.ts +70 -71
  69. package/src/cli/db.ts +86 -12
  70. package/src/cli/dev-controller.test.ts +35 -0
  71. package/src/cli/dev-controller.ts +298 -0
  72. package/src/cli/dev-controls.ts +11 -65
  73. package/src/cli/dev-db-push.test.ts +47 -15
  74. package/src/cli/dev-schema-sync.test.ts +11 -11
  75. package/src/cli/dev-schema-sync.ts +10 -10
  76. package/src/cli/dev-session-lock.test.ts +106 -0
  77. package/src/cli/dev-session-lock.ts +209 -0
  78. package/src/cli/dev.test.ts +246 -114
  79. package/src/cli/dev.ts +153 -205
  80. package/src/cli/doc-staleness.test.ts +3 -6
  81. package/src/cli/docker-clean.test.ts +33 -1
  82. package/src/cli/docker-clean.ts +28 -33
  83. package/src/cli/docker-cli.test.ts +12 -11
  84. package/src/cli/docker.ts +95 -20
  85. package/src/cli/doctor.test.ts +40 -0
  86. package/src/cli/doctor.ts +142 -9
  87. package/src/cli/drizzle-env.test.ts +11 -13
  88. package/src/cli/drizzle-env.ts +18 -11
  89. package/src/cli/ensure-drizzle-config.ts +11 -14
  90. package/src/cli/hero-meta.test.ts +15 -15
  91. package/src/cli/hero-meta.ts +10 -9
  92. package/src/cli/index.ts +36 -6
  93. package/src/cli/load-config.images.test.ts +44 -10
  94. package/src/cli/load-config.source.test.ts +50 -0
  95. package/src/cli/load-config.ts +35 -29
  96. package/src/cli/meilisearch-local.ts +1 -2
  97. package/src/cli/mode.ts +7 -58
  98. package/src/cli/registry.ts +175 -19
  99. package/src/cli/resolve-dev-sql-env.test.ts +8 -16
  100. package/src/cli/resolve-dev-sql-env.ts +13 -15
  101. package/src/cli/safe-defaults.test.ts +29 -11
  102. package/src/cli/schema.ts +65 -16
  103. package/src/cli/test.ts +58 -0
  104. package/src/cli/tui/App.tsx +252 -0
  105. package/src/cli/tui/DevLive.tsx +116 -0
  106. package/src/cli/tui/components/ConfirmDialog.tsx +48 -0
  107. package/src/cli/tui/components/HeaderBar.tsx +67 -0
  108. package/src/cli/tui/components/LogStream.tsx +47 -0
  109. package/src/cli/tui/components/PanelCard.tsx +39 -0
  110. package/src/cli/tui/components/SelectRow.tsx +37 -0
  111. package/src/cli/tui/components/SlashPalette.tsx +172 -0
  112. package/src/cli/tui/components/Spinner.tsx +32 -0
  113. package/src/cli/tui/components/StatusBar.tsx +51 -0
  114. package/src/cli/tui/components/StatusDot.tsx +37 -0
  115. package/src/cli/tui/components/TabBar.tsx +49 -0
  116. package/src/cli/tui/components/Wordmark.tsx +43 -0
  117. package/src/cli/tui/format.ts +38 -0
  118. package/src/cli/tui/keys.test.ts +18 -0
  119. package/src/cli/tui/keys.ts +26 -0
  120. package/src/cli/tui/launch.test.ts +18 -0
  121. package/src/cli/tui/launch.ts +57 -0
  122. package/src/cli/tui/panels/Dashboard.tsx +201 -0
  123. package/src/cli/tui/panels/Database.tsx +198 -0
  124. package/src/cli/tui/panels/Dev.tsx +257 -0
  125. package/src/cli/tui/panels/Docker.tsx +357 -0
  126. package/src/cli/tui/panels/Navigator.test.ts +22 -0
  127. package/src/cli/tui/panels/Navigator.tsx +213 -0
  128. package/src/cli/tui/slash-catalog.test.ts +31 -0
  129. package/src/cli/tui/slash-catalog.ts +184 -0
  130. package/src/cli/tui/slash-run.ts +54 -0
  131. package/src/cli/tui/state/ports.ts +95 -0
  132. package/src/cli/tui/theme.ts +24 -0
  133. package/src/cli/vault-cmd.test.ts +402 -0
  134. package/src/cli/vault-cmd.ts +727 -69
  135. package/src/cli/vault-secure-input.test.ts +56 -0
  136. package/src/cli/vault-secure-input.ts +124 -0
  137. package/src/compiler/effects-infer.ts +7 -0
  138. package/src/compiler/extract.ts +12 -0
  139. package/src/compiler/fixtures/skyport/oke.config.ts +7 -5
  140. package/src/compiler/fixtures/skyport/src/flows/payments/index.ts +1 -1
  141. package/src/compiler/fixtures/skyport.expected.json +1 -1
  142. package/src/compiler/generate-adopt.ts +27 -1
  143. package/src/compiler-entry.ts +7 -0
  144. package/src/config/define-config.test.ts +111 -47
  145. package/src/config/driver-defaults.test.ts +115 -0
  146. package/src/config/driver-defaults.ts +156 -0
  147. package/src/config/index.ts +246 -131
  148. package/src/config/resolve-driver.test.ts +14 -19
  149. package/src/console/server/app.ts +4 -2
  150. package/src/console/server/console.test.ts +58 -1
  151. package/src/console/server/flows.ts +22 -2
  152. package/src/console/server/index.ts +3 -0
  153. package/src/console/server/operator-db.test.ts +55 -13
  154. package/src/console/server/operator-db.ts +305 -263
  155. package/src/console/server/serve.ts +16 -7
  156. package/src/console/server/state.ts +31 -9
  157. package/src/console/server/vault.test.ts +120 -5
  158. package/src/console/server/vault.ts +208 -12
  159. package/src/console/ui/dist/assets/{index-D-9KFce5.js → index--Y0Uaz-m.js} +2 -2
  160. package/src/console/ui/dist/assets/panel-vault-BkZdJPX8.js +1 -0
  161. package/src/console/ui/dist/assets/style-C3L349iZ.css +3 -0
  162. package/src/console/ui/dist/index.html +2 -2
  163. package/src/console/ui/shell/client.ts +16 -0
  164. package/src/console/ui/shell/panels/vault/VaultPanel.tsx +54 -1
  165. package/src/console/ui/vault/VaultA11yView.tsx +33 -1
  166. package/src/console/ui/vault/backend.test.ts +75 -0
  167. package/src/console/ui/vault/backend.ts +117 -0
  168. package/src/console/ui/vault/fixture.ts +21 -2
  169. package/src/console/ui/vault/index.ts +11 -1
  170. package/src/console/ui/vault/types.ts +26 -0
  171. package/src/docker/compose.ts +164 -61
  172. package/src/docker/derive.ts +106 -12
  173. package/src/docker/docker.test.ts +156 -110
  174. package/src/docker/helpers.ts +98 -0
  175. package/src/docker/images-config.test.ts +163 -0
  176. package/src/docker/index.ts +30 -5
  177. package/src/docker/recipes/index.ts +0 -3
  178. package/src/docker/recipes/llama-cpp.ts +4 -4
  179. package/src/docker/recipes/pgdog.ts +9 -2
  180. package/src/docker/resources.test.ts +71 -0
  181. package/src/docker/resources.ts +176 -0
  182. package/src/docker/stack-id.test.ts +11 -4
  183. package/src/docker/stack-id.ts +42 -32
  184. package/src/docker/stack.integration.test.ts +4 -15
  185. package/src/docker/types.ts +35 -3
  186. package/src/drivers/ai-ollama.integration.test.ts +2 -2
  187. package/src/drivers/conformance.test.ts +11 -12
  188. package/src/drivers/drizzle-dialect.test.ts +0 -4
  189. package/src/drivers/drizzle-dialect.ts +7 -13
  190. package/src/drivers/index.ts +24 -7
  191. package/src/drivers/journal-postgres.test.ts +3 -1
  192. package/src/drivers/journal-postgres.ts +4 -2
  193. package/src/drivers/meilisearch.ts +1 -1
  194. package/src/drivers/pglite.ts +28 -5
  195. package/src/drivers/types.ts +9 -11
  196. package/src/drivers/vault-aws-secrets-manager.test.ts +159 -0
  197. package/src/drivers/vault-aws-secrets-manager.ts +333 -0
  198. package/src/drivers/vault-builtin.test.ts +110 -0
  199. package/src/drivers/vault-builtin.ts +184 -0
  200. package/src/drivers/vault-driver-removal.test.ts +13 -0
  201. package/src/drivers/vault-managed.test.ts +95 -0
  202. package/src/drivers/vault-managed.ts +101 -25
  203. package/src/drivers/vault-types.ts +25 -5
  204. package/src/elements/ai/runtime.ts +1 -1
  205. package/src/elements/clock/chaos.test.ts +4 -1
  206. package/src/elements/clock/durable.ts +57 -4
  207. package/src/elements/clock.test.ts +13 -14
  208. package/src/elements/gate/constants.ts +18 -0
  209. package/src/elements/gate.test.ts +1 -1
  210. package/src/elements/gate.ts +2 -2
  211. package/src/elements/store/domain-ddl.test.ts +5 -12
  212. package/src/elements/store/emit-drizzle.ts +44 -19
  213. package/src/elements/store/index-boot.test.ts +15 -116
  214. package/src/elements/store/load-plugin-tables.ts +1 -1
  215. package/src/elements/store/resource-list-docs.fixture.ts +12 -6
  216. package/src/elements/store/resource-list-docs.test.ts +64 -44
  217. package/src/elements/store/resource.test.ts +17 -10
  218. package/src/elements/store/runtime.ts +9 -12
  219. package/src/elements/store/schema-decl.test.ts +16 -32
  220. package/src/elements/store/seed.test.ts +1 -2
  221. package/src/elements/store/seed.ts +7 -8
  222. package/src/elements/store/sql-condition.test.ts +2 -2
  223. package/src/elements/store/sql-session.test.ts +8 -10
  224. package/src/elements/store/sql-session.ts +10 -2
  225. package/src/elements/store.test.ts +13 -13
  226. package/src/elements/vault/audit.ts +233 -0
  227. package/src/elements/vault/boot-chain.test.ts +78 -0
  228. package/src/elements/vault/boot-chain.ts +43 -39
  229. package/src/elements/vault/builtin-adapter.test.ts +479 -0
  230. package/src/elements/vault/builtin-adapter.ts +1184 -0
  231. package/src/elements/vault/crypto.test.ts +237 -0
  232. package/src/elements/vault/crypto.ts +431 -0
  233. package/src/elements/vault/declare.ts +164 -3
  234. package/src/elements/vault/errors.ts +56 -0
  235. package/src/elements/vault/kms-unseal.test.ts +76 -0
  236. package/src/elements/vault/kms-unseal.ts +181 -0
  237. package/src/elements/vault/path.ts +90 -0
  238. package/src/elements/vault/resilience.test.ts +102 -0
  239. package/src/elements/vault/resilience.ts +107 -0
  240. package/src/elements/vault/runtime.ts +36 -4
  241. package/src/elements/vault/security-checklist.test.ts +130 -0
  242. package/src/elements/vault/storage.ts +448 -0
  243. package/src/elements/vault/types.ts +288 -0
  244. package/src/elements/vault/unseal.ts +150 -0
  245. package/src/elements/vault.test.ts +72 -4
  246. package/src/elements/vault.ts +91 -2
  247. package/src/full.ts +248 -0
  248. package/src/http.ts +41 -0
  249. package/src/i18n/interpolate-simple.ts +37 -0
  250. package/src/i18n/messages.ts +51 -4
  251. package/src/i18n-entry.ts +7 -0
  252. package/src/index.ts +35 -145
  253. package/src/journal-entry.ts +20 -0
  254. package/src/kernel/adopt-barrel-fresh.test.ts +25 -10
  255. package/src/kernel/app.ts +40 -42
  256. package/src/kernel/auto-registry.test.ts +2 -2
  257. package/src/kernel/boot-bind/ai.test.ts +5 -5
  258. package/src/kernel/boot-bind/ai.ts +2 -1
  259. package/src/kernel/boot-bind/channel.test.ts +6 -6
  260. package/src/kernel/boot-bind/channel.ts +5 -4
  261. package/src/kernel/boot-bind/clock.ts +5 -5
  262. package/src/kernel/boot-bind/gate.ts +6 -7
  263. package/src/kernel/boot-bind/honor-config.test.ts +42 -42
  264. package/src/kernel/boot-bind/journal.ts +5 -5
  265. package/src/kernel/boot-bind/signal.ts +3 -1
  266. package/src/kernel/boot-bind/store.test.ts +55 -37
  267. package/src/kernel/boot-bind/store.ts +24 -34
  268. package/src/kernel/boot-bind/vault.ts +19 -4
  269. package/src/kernel/boot.test.ts +12 -4
  270. package/src/kernel/boot.ts +31 -19
  271. package/src/kernel/budget-entry.ts +1 -1
  272. package/src/kernel/compensate.test.ts +288 -1
  273. package/src/kernel/compensate.ts +126 -0
  274. package/src/kernel/concurrency.test.ts +10 -9
  275. package/src/kernel/effects-stamping.test.ts +27 -2
  276. package/src/kernel/element-registries.ts +5 -3
  277. package/src/kernel/flow.ts +4 -2
  278. package/src/kernel/fx.test.ts +119 -3
  279. package/src/kernel/fx.ts +215 -40
  280. package/src/kernel/index.ts +14 -0
  281. package/src/kernel/journal.ts +130 -7
  282. package/src/kernel/pipeline.test.ts +20 -6
  283. package/src/kernel/redacted.test.ts +35 -0
  284. package/src/kernel/redacted.ts +24 -2
  285. package/src/kernel/router/create-default.ts +16 -0
  286. package/src/kernel/router/create-edge.ts +18 -0
  287. package/src/kernel/router/create.ts +23 -0
  288. package/src/kernel/router/index.ts +23 -0
  289. package/src/kernel/router/linear.ts +88 -0
  290. package/src/kernel/router/regexp.ts +188 -0
  291. package/src/kernel/router/smart.ts +120 -0
  292. package/src/kernel/router/trie.ts +108 -0
  293. package/src/kernel/router/types.ts +56 -0
  294. package/src/kernel/router.ts +18 -532
  295. package/src/kernel-entry.ts +43 -0
  296. package/src/manifest/fixtures/skyport.excerpt.json +1 -1
  297. package/src/manifest/fixtures/skyport.manifest.json +1 -1
  298. package/src/plugins/config-source.test.ts +7 -7
  299. package/src/release/build-lib.ts +58 -0
  300. package/src/release/exports.test.ts +4 -2
  301. package/src/release/exports.ts +30 -4
  302. package/src/release/measure.ts +101 -22
  303. package/src/runs/duckdb.ts +7 -2
  304. package/src/shared/optional-peer.ts +41 -0
  305. package/src/term.test.ts +3 -44
  306. package/src/test/create-test-app.ts +12 -0
  307. package/src/test/provisions.integration.test.ts +1 -1
  308. package/src/test/reset-element-registries.ts +2 -0
  309. package/src/upgrade/codemods.test.ts +7 -20
  310. package/src/upgrade/codemods.ts +93 -60
  311. package/site/content/docs/console/access.mdx +0 -29
  312. package/site/content/docs/console/ai.mdx +0 -35
  313. package/site/content/docs/console/architecture.mdx +0 -35
  314. package/site/content/docs/console/channels.mdx +0 -37
  315. package/site/content/docs/console/clock.mdx +0 -51
  316. package/site/content/docs/console/flows.mdx +0 -31
  317. package/site/content/docs/console/gates.mdx +0 -73
  318. package/site/content/docs/console/index.mdx +0 -54
  319. package/site/content/docs/console/manifest-diff.mdx +0 -34
  320. package/site/content/docs/console/meta.json +0 -24
  321. package/site/content/docs/console/overview.mdx +0 -40
  322. package/site/content/docs/console/plugins.mdx +0 -41
  323. package/site/content/docs/console/privacy.mdx +0 -32
  324. package/site/content/docs/console/runs.mdx +0 -50
  325. package/site/content/docs/console/signals.mdx +0 -40
  326. package/site/content/docs/console/store.mdx +0 -32
  327. package/site/content/docs/console/tenancy.mdx +0 -32
  328. package/site/content/docs/console/traces.mdx +0 -38
  329. package/site/content/docs/console/vault.mdx +0 -41
  330. package/site/content/docs/recipes/openbao.mdx +0 -141
  331. package/src/cli/ask-dev-mode.ts +0 -40
  332. package/src/cli/dev-mode.test.ts +0 -45
  333. package/src/cli/dev-mode.ts +0 -78
  334. package/src/cli/openbao-bootstrap.test.ts +0 -150
  335. package/src/cli/openbao-bootstrap.ts +0 -321
  336. package/src/cli/openbao-restart.integration.test.ts +0 -145
  337. package/src/console/ui/dist/assets/panel-vault-Za1GyJfM.js +0 -1
  338. package/src/console/ui/dist/assets/style-C8MxEWPd.css +0 -3
  339. package/src/docker/recipes/openbao.ts +0 -47
  340. package/src/drivers/libsql.ts +0 -179
  341. package/src/drivers/sqlite.ts +0 -44
  342. package/src/drivers/vault-openbao.test.ts +0 -97
  343. package/src/drivers/vault-openbao.ts +0 -143
@@ -1,32 +0,0 @@
1
- ---
2
- title: "Privacy"
3
- description: "Where PII lives, who touches it, export/erase (conditional)."
4
- icon: "EyeOff"
5
- source: "docs/spec/console.md"
6
- ---
7
-
8
- Answers: **where PII lives, who touches it, export/erase**
9
-
10
- <Callout title="Governing rule">
11
- Conditional panel — appears when the privacy plugin is plugged. Catalog row is the durable
12
- reference.
13
- </Callout>
14
-
15
- ## What this panel shows
16
-
17
- <Cards>
18
- <Card title="PII map" description="Where personal data lives and who touches it." />
19
- <Card title="Export / erase" description="`oke privacy export|erase --subject` across stores." />
20
- </Cards>
21
-
22
- ## Catalog
23
-
24
- <Cards>
25
- <Card title="Dev" description="✓" />
26
- <Card title="Prod" description="✓" />
27
- </Cards>
28
-
29
- <Callout title="Conditional">
30
- This panel appears when the optional core plugin is plugged. There is no separate detailed
31
- subsection beyond the catalog row.
32
- </Callout>
@@ -1,50 +0,0 @@
1
- ---
2
- title: "Runs"
3
- description: "Wide events — one record per flow execution."
4
- icon: "Play"
5
- source: "docs/spec/console.md"
6
- ---
7
-
8
- Answers: **wide events — one record per flow execution, queried by dimension**
9
-
10
- <Callout title="Governing rule">
11
- One flow execution = one wide event = one span. Analysis by dimension, not a text search box.
12
- </Callout>
13
-
14
- ## What this panel shows
15
-
16
- <Cards>
17
- <Card
18
- title="Wide events"
19
- description="Dimensions from effects — no manual instrumentation tax."
20
- />
21
- <Card
22
- title="Error patterns"
23
- description="Failed runs in the lookback window, grouped by error code."
24
- />
25
- <Card
26
- title="Outlier explanation"
27
- description="Compare all dimensions between slow and baseline populations."
28
- />
29
- <Card
30
- title="Storage tiers"
31
- description="Default Parquet + DuckDB; optional postgres / clickhouse."
32
- />
33
- <Card
34
- title="Lifecycle"
35
- description="Retain by default; redaction and crypto-shredding for compliance."
36
- />
37
- </Cards>
38
-
39
- Use **Since** (`5m` · `1h` · `24h` · all time) to bound the population. Error patterns count
40
- `error_code` occurrences in that window — the same store Traces and Overview read.
41
-
42
- Local replay: `oke replay --request-id <runId>` re-invokes from the stored input snapshot
43
- (dry-run when the ledger has `send` / `ask`).
44
-
45
- ## Catalog
46
-
47
- <Cards>
48
- <Card title="Dev" description="✓" />
49
- <Card title="Prod" description="✓" />
50
- </Cards>
@@ -1,40 +0,0 @@
1
- ---
2
- title: "Signals"
3
- description: "Queue depth, in-flight, DLQ, live monitors, orphaned config."
4
- icon: "Radio"
5
- source: "docs/spec/console.md"
6
- ---
7
-
8
- Answers: **queue depth, in-flight, DLQ, live monitors, orphaned config**
9
-
10
- <Callout title="Governing rule">
11
- One list grouped by delivery physics — not three tabs that re-split the element.
12
- </Callout>
13
-
14
- ## What this panel shows
15
-
16
- <Cards>
17
- <Card title="once" description="Pending, in-flight (leased), DLQ, retry policy." />
18
- <Card title="broadcast" description="Per-subscriber lag and targeted replay." />
19
- <Card
20
- title="live"
21
- description="Connection count, throughput, newest-50 payload monitor (full history still retained)."
22
- />
23
- <Card
24
- title="DLQ repair"
25
- description="Schema form, typed errors, causal chain, dry-run bulk replay."
26
- />
27
- <Card
28
- title="Orphaned"
29
- description="Config still listed after the declaration left code — messages kept; dry-run refused."
30
- />
31
- </Cards>
32
-
33
- Dry-run is refused for orphaned signals and for signals with no Manifest consumer — unknown handler shapes are not invoked unsafely. Restore the `signal(…)` declaration (and a consumer) before replaying DLQ rows. Lease / at-least-once physics live on [Signal](/docs/elements/signal).
34
-
35
- ## Catalog
36
-
37
- <Cards>
38
- <Card title="Dev" description="full" />
39
- <Card title="Prod" description="replay/purge per gates" />
40
- </Cards>
@@ -1,32 +0,0 @@
1
- ---
2
- title: "Store"
3
- description: "Browse sql/kv/files/index; cache keys; replica lag."
4
- icon: "Database"
5
- source: "docs/spec/console.md"
6
- ---
7
-
8
- Answers: **browse sql/kv/files/index; cache keys; replica lag**
9
-
10
- <Callout title="Governing rule">
11
- The most dangerous panel in production — gates, tenant isolation, PII masking, and audit on the
12
- data path.
13
- </Callout>
14
-
15
- ## What this panel shows
16
-
17
- <Cards>
18
- <Card title="Four facets" description="sql · kv · files · index with adaptive detail." />
19
- <Card title="PII masking" description="Follows schema classification, including raw SQL." />
20
- <Card title="Cache keys" description="Which read produced a key; which write invalidates it." />
21
- <Card
22
- title="Direct edit warning"
23
- description="Names what will not happen — not a silent row patch."
24
- />
25
- </Cards>
26
-
27
- ## Catalog
28
-
29
- <Cards>
30
- <Card title="Dev" description="full + Studio link" />
31
- <Card title="Prod" description="masked, gated, audited" />
32
- </Cards>
@@ -1,32 +0,0 @@
1
- ---
2
- title: "Tenancy"
3
- description: "Per-tenant usage, limits, isolation checks (conditional)."
4
- icon: "Building2"
5
- source: "docs/spec/console.md"
6
- ---
7
-
8
- Answers: **per-tenant usage, limits, isolation checks**
9
-
10
- <Callout title="Governing rule">
11
- Conditional panel — appears when the tenancy plugin is plugged. Catalog row is the durable
12
- reference.
13
- </Callout>
14
-
15
- ## What this panel shows
16
-
17
- <Cards>
18
- <Card title="Usage &amp; limits" description="Per-tenant usage and configured limits." />
19
- <Card title="Isolation" description="Checks that tenant boundaries hold." />
20
- </Cards>
21
-
22
- ## Catalog
23
-
24
- <Cards>
25
- <Card title="Dev" description="✓" />
26
- <Card title="Prod" description="✓" />
27
- </Cards>
28
-
29
- <Callout title="Conditional">
30
- This panel appears when the optional core plugin is plugged. There is no separate detailed
31
- subsection beyond the catalog row.
32
- </Callout>
@@ -1,38 +0,0 @@
1
- ---
2
- title: "Traces"
3
- description: "One timeline across http → store → signal → durable steps."
4
- icon: "Route"
5
- source: "docs/spec/console.md"
6
- ---
7
-
8
- Answers: **one timeline across http → store → signal → durable steps**
9
-
10
- <Callout title="Governing rule">
11
- Folded time across async boundaries — a seven-day sleep is not 99.99% empty waterfall.
12
- </Callout>
13
-
14
- ## What this panel shows
15
-
16
- <Cards>
17
- <Card title="Causal chain" description="Join parent/child across emit boundaries." />
18
- <Card title="Effect tiers" description="Spans coloured by the same vocabulary as Flows." />
19
- <Card
20
- title="Filter by effect"
21
- description="Everything that wrote a table, sent mail, or cost more than X."
22
- />
23
- <Card
24
- title="Why slow / why fail"
25
- description="Critical path highlight; open on the failing span."
26
- />
27
- </Cards>
28
-
29
- Chains use `WideEvent.parentId`: producers stamp it on `fx.emit` / `fx.call`;
30
- consumers record it on their run. Per-effect timing comes from the ledger
31
- (`timestamp` + `duration`) — not a second instrumentation API.
32
-
33
- ## Catalog
34
-
35
- <Cards>
36
- <Card title="Dev" description="✓" />
37
- <Card title="Prod" description="✓" />
38
- </Cards>
@@ -1,41 +0,0 @@
1
- ---
2
- title: "Vault"
3
- description: "Secret contracts, who can read each, rotation due."
4
- icon: "KeyRound"
5
- source: "docs/spec/console.md"
6
- ---
7
-
8
- Answers: **secret contracts, who can read each, rotation due**
9
-
10
- <Callout title="Governing rule">
11
- Secrets are write-only — the panel can set and rotate; it can never reveal.
12
- </Callout>
13
-
14
- ## What this panel shows
15
-
16
- <Cards>
17
- <Card
18
- title="Contracts"
19
- description="Optional description as the human title; technical key stays visible."
20
- />
21
- <Card
22
- title="Fingerprints"
23
- description="Salted hash per environment — rotation and drift without exposure."
24
- />
25
- <Card
26
- title="Resolution chain"
27
- description="Which source won: env, files, vault driver, or fallback."
28
- />
29
- <Card title="Who can read" description="Derived from effects that declare `fx.vault`." />
30
- <Card
31
- title="Rotation blast radius"
32
- description="In-flight durable runs that wake with a new key."
33
- />
34
- </Cards>
35
-
36
- ## Catalog
37
-
38
- <Cards>
39
- <Card title="Dev" description="full" />
40
- <Card title="Prod" description="set/rotate only, never reveal" />
41
- </Cards>
@@ -1,141 +0,0 @@
1
- ---
2
- title: "OpenBao"
3
- description: "Durable single-node vault — Raft under /openbao/file, OKE_VAULT_URL / OKE_VAULT_TOKEN, host unseal key SPOF."
4
- icon: "KeyRound"
5
- source: "docs/spec/unified-theory.md"
6
- ---
7
-
8
- OpenBao is the docker/prod Vault driver target — a real secrets service with Raft
9
- storage, **not** an in-memory `-dev` server. Templates pin
10
- `vault: "openbao/openbao:2.6.1"` and `drivers.vault.docker/prod: "openbao"`.
11
-
12
- <Callout title="The one rule">
13
- Never run OpenBao `-dev` in docker/prod. Data belongs on the Raft volume; init + unseal stay on
14
- the host under `.oke/openbao/`.
15
- </Callout>
16
-
17
- ## Quick start
18
-
19
- <Steps>
20
-
21
- <Step>
22
- ### Pin driver + image
23
-
24
- ```typescript title="oke.config.ts"
25
- drivers: {
26
- vault: { local: "env", docker: "openbao", test: "memory", prod: "openbao" },
27
- },
28
- images: {
29
- vault: "openbao/openbao:2.6.1",
30
- },
31
- ```
32
-
33
- </Step>
34
-
35
- <Step>
36
- ### First boot is automatic
37
-
38
- `oke dev --docker` initializes OpenBao (Shamir 1-of-1), unseals it, writes a
39
- least-privilege policy for **declared** secrets only, and mints an app token. You do not
40
- run raw `bao` commands.
41
-
42
- </Step>
43
-
44
- <Step>
45
- ### App sees only the least-privilege token
46
-
47
- ```bash title="docker/.env.docker"
48
- OKE_VAULT_URL=http://127.0.0.1:8200
49
- OKE_VAULT_TOKEN=… # app token — not the root token
50
- OKE_VAULT_MOUNT=secret # KV v2 mount (default)
51
- ```
52
-
53
- </Step>
54
-
55
- </Steps>
56
-
57
- ## Required env
58
-
59
- | Variable | Who holds it | Meaning |
60
- | ------------------ | ------------------- | ---------------------------------------- |
61
- | `OKE_VAULT_URL` | App / stack | OpenBao base URL |
62
- | `OKE_VAULT_TOKEN` | App (`.env.docker`) | Least-privilege app token |
63
- | `OKE_VAULT_MOUNT` | Optional | KV v2 mount path (default `"secret"`) |
64
- | `BAO_LOCAL_CONFIG` | Container (recipe) | Listener + Raft JSON — set by the recipe |
65
-
66
- Host-only material (mode `0600`, gitignored) — **not** in compose YAML:
67
-
68
- | File | Holds |
69
- | ------------------------- | ---------------------------------------- |
70
- | `.oke/openbao/unseal.key` | Single unseal share |
71
- | `.oke/openbao/root.token` | Root token (CLI policy sync / mint only) |
72
- | `.oke/openbao/app.token` | Same least-privilege token the app uses |
73
-
74
- ## Data and backup
75
-
76
- | Volume | Path | What it stores |
77
- | ------------ | --------------- | ---------------------------- |
78
- | `vault-data` | `/openbao/file` | Raft storage (node id `oke`) |
79
-
80
- Recipe note: Raft path is `/openbao/file` (the stock entrypoint chowns that directory).
81
- Healthcheck hits `/v1/sys/init` — **200 even while sealed**; bootstrap owns unseal.
82
-
83
- **Backup means two things:**
84
-
85
- 1. The Raft volume (`/openbao/file`) — encrypted secret store
86
- 2. `.oke/openbao/unseal.key` on the host — without it the volume is unrecoverable
87
-
88
- ## Production note
89
-
90
- <Callout title="Single point of failure — read this once" type="warn">
91
- Back up `.oke/openbao/unseal.key` to a separate safe location. Losing it means losing every secret
92
- permanently, with no recovery. Restated from [Vault ·
93
- OpenBao](/docs/elements/vault#openbao-in-docker-and-prod).
94
- </Callout>
95
-
96
- Self-hosted single-node, Shamir 1-of-1, no cloud KMS — by design. If OpenBao is
97
- initialized but the key is gone, boot fails with an explicit permanent-loss error; it
98
- never silently starts empty.
99
-
100
- ## What the recipe configures
101
-
102
- | Field | Value |
103
- | -------------- | -------------------------------------------------------------------------------------- |
104
- | Container port | `8200` |
105
- | Command | `server` (with `BAO_LOCAL_CONFIG`) |
106
- | TLS | Disabled on the listener for compose (`tls_disable: true`) — rely on network isolation |
107
- | Healthcheck | `wget` `/v1/sys/init`, every 5s, 12 retries |
108
-
109
- ## Troubleshooting
110
-
111
- <Accordions>
112
- <Accordion title="openbao vault: GET … failed (… ) — sealed or unauthorized?">
113
-
114
- `OpenBaoUnavailableError` — vault sealed, wrong token, or unreachable. Re-run
115
- `oke dev --docker` so bootstrap unseals with the host key. If the vault is initialized
116
- but `.oke/openbao/unseal.key` is missing, restore the key from backup.
117
-
118
- </Accordion>
119
- <Accordion title="Permanent-loss / initialized but key missing">
120
-
121
- Starting empty would look like “no secrets.” The CLI refuses that path. Restore
122
- `unseal.key` or treat the Raft volume as destroyed and re-init only if you accept wiping
123
- secrets.
124
-
125
- </Accordion>
126
- </Accordions>
127
-
128
- ## Learn more
129
-
130
- - [Vault · OpenBao in docker and prod](/docs/elements/vault#openbao-in-docker-and-prod) —
131
- full bootstrap, key table, SPOF callout
132
- - [Errors](/docs/reference/errors) — `OpenBaoUnavailableError`, `OpenBaoBootstrapError`
133
- - [CLI · oke vault](/docs/reference/cli) — `set` / `list` / `import`
134
-
135
- ## Next
136
-
137
- <Cards>
138
- <Card title="Vault" description="Resolution chain and rotation." href="/docs/elements/vault" />
139
- <Card title="Mailpit" description="Local email catcher." href="/docs/recipes/mailpit" />
140
- <Card title="RustFS" description="S3-compatible files." href="/docs/recipes/rustfs" />
141
- </Cards>
@@ -1,40 +0,0 @@
1
- /**
2
- * One-time interactive `oke dev` mode choice via `@clack/prompts`.
3
- */
4
-
5
- import { isCancel, select } from "@clack/prompts";
6
- import type { DevMode } from "./dev-mode.ts";
7
-
8
- /**
9
- * Injectable ask step — production uses {@link askDevMode}.
10
- *
11
- * @returns Chosen mode, or `null` if the user cancelled
12
- */
13
- export type AskDevModeFn = () => Promise<DevMode | null>;
14
-
15
- /**
16
- * Prompt once: local vs docker.
17
- *
18
- * @returns Chosen mode, or `null` on cancel
19
- */
20
- export async function askDevMode(): Promise<DevMode | null> {
21
- const value = await select({
22
- message: "Run against",
23
- options: [
24
- {
25
- value: "local",
26
- label: "local",
27
- hint: "sqlite file, instant, no Docker needed",
28
- },
29
- {
30
- value: "docker",
31
- label: "docker",
32
- hint: "real Postgres/Redis via compose, closer to production",
33
- },
34
- ],
35
- initialValue: "local",
36
- });
37
- if (isCancel(value)) return null;
38
- if (value === "local" || value === "docker") return value;
39
- return null;
40
- }
@@ -1,45 +0,0 @@
1
- /**
2
- * `.oke/mode` persistence and prompt gating.
3
- */
4
-
5
- import { afterEach, describe, expect, test } from "bun:test";
6
- import { mkdtemp, rm } from "node:fs/promises";
7
- import { tmpdir } from "node:os";
8
- import { join } from "node:path";
9
- import { parseDevMode, readDevMode, shouldAskDevMode, writeDevMode } from "./dev-mode.ts";
10
-
11
- const dirs: string[] = [];
12
-
13
- afterEach(async () => {
14
- await Promise.all(dirs.splice(0).map((d) => rm(d, { recursive: true, force: true })));
15
- });
16
-
17
- async function tempDir(): Promise<string> {
18
- const dir = await mkdtemp(join(tmpdir(), "oke-mode-"));
19
- dirs.push(dir);
20
- return dir;
21
- }
22
-
23
- describe("dev-mode", () => {
24
- test("parseDevMode accepts local|docker only", () => {
25
- expect(parseDevMode("local")).toBe("local");
26
- expect(parseDevMode(" docker \n")).toBe("docker");
27
- expect(parseDevMode("stack")).toBeNull();
28
- expect(parseDevMode(undefined)).toBeNull();
29
- });
30
-
31
- test("read/write round-trip", async () => {
32
- const dir = await tempDir();
33
- expect(await readDevMode(dir)).toBeNull();
34
- await writeDevMode(dir, "docker");
35
- expect(await readDevMode(dir)).toBe("docker");
36
- });
37
-
38
- test("shouldAskDevMode: TTY + unset → ask; non-TTY → never", () => {
39
- expect(shouldAskDevMode({ saved: null, explicit: false, stdinIsTTY: true })).toBe(true);
40
- expect(shouldAskDevMode({ saved: null, explicit: false, stdinIsTTY: false })).toBe(false);
41
- expect(shouldAskDevMode({ saved: null, explicit: false, stdinIsTTY: undefined })).toBe(false);
42
- expect(shouldAskDevMode({ saved: "local", explicit: false, stdinIsTTY: true })).toBe(false);
43
- expect(shouldAskDevMode({ saved: null, explicit: true, stdinIsTTY: true })).toBe(false);
44
- });
45
- });
@@ -1,78 +0,0 @@
1
- /**
2
- * Persisted `oke dev` run mode — `local` vs `docker`.
3
- */
4
-
5
- import { mkdir } from "node:fs/promises";
6
- import { join, resolve } from "node:path";
7
-
8
- /** Saved / selectable `oke dev` infrastructure mode. */
9
- export type DevMode = "local" | "docker";
10
-
11
- /** Relative path under the project root. */
12
- export const DEV_MODE_RELATIVE_PATH = ".oke/mode";
13
-
14
- /**
15
- * Absolute path to the mode preference file.
16
- *
17
- * @param cwd - Project root
18
- */
19
- export function devModePath(cwd: string): string {
20
- return resolve(cwd, DEV_MODE_RELATIVE_PATH);
21
- }
22
-
23
- /**
24
- * Parse a raw mode string.
25
- *
26
- * @param raw - File contents or CLI arg
27
- */
28
- export function parseDevMode(raw: string | undefined | null): DevMode | null {
29
- if (raw === undefined || raw === null) return null;
30
- const value = raw.trim().toLowerCase();
31
- if (value === "local" || value === "docker") return value;
32
- return null;
33
- }
34
-
35
- /**
36
- * Read the saved mode from `.oke/mode`, or `null` when unset / invalid.
37
- *
38
- * @param cwd - Project root
39
- */
40
- export async function readDevMode(cwd: string): Promise<DevMode | null> {
41
- const path = devModePath(cwd);
42
- const file = Bun.file(path);
43
- if (!(await file.exists())) return null;
44
- try {
45
- return parseDevMode(await file.text());
46
- } catch {
47
- return null;
48
- }
49
- }
50
-
51
- /**
52
- * Persist the preferred mode for future `oke dev` invocations.
53
- *
54
- * @param cwd - Project root
55
- * @param mode - Mode to save
56
- */
57
- export async function writeDevMode(cwd: string, mode: DevMode): Promise<void> {
58
- const path = devModePath(cwd);
59
- await mkdir(join(cwd, ".oke"), { recursive: true });
60
- await Bun.write(path, `${mode}\n`);
61
- }
62
-
63
- /**
64
- * Whether `oke dev` should open the one-time mode prompt.
65
- *
66
- * Mirrors create-oke: never prompt when stdin is not a TTY.
67
- *
68
- * @param options - Preference + TTY + explicit flag
69
- */
70
- export function shouldAskDevMode(options: {
71
- readonly saved: DevMode | null;
72
- readonly explicit: boolean;
73
- readonly stdinIsTTY: boolean | undefined;
74
- }): boolean {
75
- if (options.explicit) return false;
76
- if (options.saved !== null) return false;
77
- return Boolean(options.stdinIsTTY);
78
- }