okengine 0.3.6 → 0.5.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.
- package/AGENTS.md +2 -0
- package/package.json +14 -12
- package/site/content/docs/ai/index.mdx +24 -0
- package/site/content/docs/ai/llms-txt.mdx +3 -0
- package/site/content/docs/ai/meta.json +1 -1
- package/site/content/docs/ai/skills.mdx +5 -3
- package/site/content/docs/console/gates.mdx +46 -8
- package/site/content/docs/console/index.mdx +54 -0
- package/site/content/docs/console/meta.json +1 -0
- package/site/content/docs/elements/ai.mdx +2 -0
- package/site/content/docs/elements/channel.mdx +2 -0
- package/site/content/docs/elements/clock.mdx +1 -4
- package/site/content/docs/elements/flow.mdx +4 -10
- package/site/content/docs/elements/gate.mdx +189 -48
- package/site/content/docs/elements/index.mdx +45 -0
- package/site/content/docs/elements/meta.json +1 -1
- package/site/content/docs/elements/signal.mdx +1 -5
- package/site/content/docs/elements/store.mdx +27 -6
- package/site/content/docs/elements/vault.mdx +10 -11
- package/site/content/docs/get-started/basic-usage.mdx +79 -43
- package/site/content/docs/get-started/index.mdx +33 -0
- package/site/content/docs/get-started/installation.mdx +95 -43
- package/site/content/docs/get-started/introduction.mdx +128 -75
- package/site/content/docs/get-started/meta.json +1 -1
- package/site/content/docs/get-started/why.mdx +141 -0
- package/site/content/docs/index.mdx +9 -31
- package/site/content/docs/plugins/anonymous.mdx +95 -0
- package/site/content/docs/plugins/compression.mdx +2 -2
- package/site/content/docs/plugins/cors.mdx +2 -2
- package/site/content/docs/plugins/csrf.mdx +2 -2
- package/site/content/docs/plugins/email-otp.mdx +111 -0
- package/site/content/docs/plugins/{security-headers.mdx → headers.mdx} +2 -2
- package/site/content/docs/plugins/index.mdx +69 -0
- package/site/content/docs/plugins/ip-allowlist.mdx +1 -2
- package/site/content/docs/plugins/magic-link.mdx +112 -0
- package/site/content/docs/plugins/maintenance-mode.mdx +8 -8
- package/site/content/docs/plugins/meta.json +10 -1
- package/site/content/docs/plugins/passkey.mdx +128 -0
- package/site/content/docs/plugins/phone-number.mdx +111 -0
- package/site/content/docs/plugins/two-factor.mdx +116 -0
- package/site/content/docs/plugins/username.mdx +117 -0
- package/site/content/docs/reference/client.mdx +331 -0
- package/site/content/docs/reference/configuration.mdx +1 -1
- package/site/content/docs/reference/environment-variables.mdx +5 -3
- package/site/content/docs/reference/fx.mdx +36 -8
- package/site/content/docs/reference/index.mdx +45 -0
- package/site/content/docs/reference/meta.json +11 -1
- package/site/content/docs/reference/plugins.mdx +25 -14
- package/src/auth/auth.test.ts +20 -2
- package/src/auth/bindings.ts +439 -0
- package/src/auth/breach-check.ts +112 -0
- package/src/auth/config.ts +288 -0
- package/src/auth/cookies.ts +123 -0
- package/src/auth/gate-auth.test.ts +379 -0
- package/src/auth/identity.ts +190 -0
- package/src/auth/index.ts +117 -1
- package/src/auth/method-context.ts +33 -0
- package/src/auth/operator.ts +27 -1
- package/src/auth/password-policy.test.ts +126 -0
- package/src/auth/password-policy.ts +77 -0
- package/src/auth/plugin.ts +62 -4
- package/src/auth/rate.ts +45 -0
- package/src/auth/schema.ts +260 -0
- package/src/auth/secondary-storage.ts +37 -0
- package/src/auth/sessions.ts +58 -1
- package/src/auth/tables.ts +4 -0
- package/src/auth/verification.ts +78 -0
- package/src/cli/competitor-mention-removal.test.ts +117 -0
- package/src/cli/dev.test.ts +3 -3
- package/src/cli/dev.ts +20 -0
- package/src/cli/meilisearch-local.test.ts +69 -0
- package/src/cli/meilisearch-local.ts +188 -0
- package/src/cli/schema.ts +95 -23
- package/src/client/auth.ts +120 -0
- package/src/client-react/index.ts +93 -0
- package/src/compiler/aot.test.ts +2 -1
- package/src/compiler/extract.ts +19 -0
- package/src/compiler/fixtures/skyport/src/flows/payments/index.ts +5 -1
- package/src/compiler/response.ts +16 -2
- package/src/console/server/app.ts +10 -6
- package/src/console/server/auth-rate.test.ts +3 -3
- package/src/console/server/bind.ts +12 -1
- package/src/console/server/channels.test.ts +1 -1
- package/src/console/server/console-gates.ts +14 -0
- package/src/console/server/console.test.ts +6 -6
- package/src/console/server/flows-invoke.test.ts +2 -2
- package/src/console/server/flows.ts +2 -0
- package/src/console/server/gates.ts +8 -1
- package/src/console/server/operator-db.test.ts +4 -4
- package/src/console/server/operator-db.ts +22 -4
- package/src/console/server/security.gate.test.ts +3 -3
- package/src/console/server/store.test.ts +1 -1
- package/src/console/server/store.ts +11 -1
- package/src/console/ui/dist/assets/index-CjxwRGVv.js +10 -0
- package/src/console/ui/dist/assets/panel-access-BGv45snf.js +64 -0
- package/src/console/ui/dist/assets/{panel-ai-D_m6WQI8.js → panel-ai-B2S7LEii.js} +1 -1
- package/src/console/ui/dist/assets/{panel-architecture-CKnXFyUx.js → panel-architecture-D7UJh91v.js} +1 -1
- package/src/console/ui/dist/assets/{panel-channels-DCDd4WAC.js → panel-channels-9T3ybqRu.js} +1 -1
- package/src/console/ui/dist/assets/panel-clock-Cb1UXGRQ.js +1 -0
- package/src/console/ui/dist/assets/{panel-diff-cdonmH8c.js → panel-diff-DmYbKWmN.js} +1 -1
- package/src/console/ui/dist/assets/panel-flows-PiHwT55z.js +48 -0
- package/src/console/ui/dist/assets/{panel-gates-B5eTE8XH.js → panel-gates-BQGYXvjT.js} +1 -1
- package/src/console/ui/dist/assets/panel-overview-BBnRO18l.js +1 -0
- package/src/console/ui/dist/assets/{panel-plugins-Cj7DK1er.js → panel-plugins-D0PsmVw2.js} +1 -1
- package/src/console/ui/dist/assets/panel-runs-CWuRDe0r.js +1 -0
- package/src/console/ui/dist/assets/{panel-signals-whmDXIg3.js → panel-signals-Bbg4ewpP.js} +1 -1
- package/src/console/ui/dist/assets/{panel-store-CEMHLvaw.js → panel-store-CPCbsDRa.js} +1 -1
- package/src/console/ui/dist/assets/panel-traces-DVAzuA_S.js +1 -0
- package/src/console/ui/dist/assets/{panel-vault-C9wjbki8.js → panel-vault-D1_MvOmo.js} +1 -1
- package/src/console/ui/dist/assets/{rolldown-runtime-CNC7AqOf.js → rolldown-runtime-B0Z9INg1.js} +1 -1
- package/src/console/ui/dist/index.html +2 -2
- package/src/console/ui/gates/fixture.ts +4 -0
- package/src/console/ui/gates/types.ts +2 -0
- package/src/console/ui/shell/client.ts +1 -0
- package/src/docker/compose.ts +5 -0
- package/src/docker/docker.test.ts +41 -0
- package/src/docker/recipes/index.ts +10 -2
- package/src/docker/recipes/meilisearch.ts +31 -0
- package/src/drivers/conformance.test.ts +16 -1
- package/src/drivers/conformance.ts +40 -3
- package/src/drivers/index.ts +14 -2
- package/src/drivers/libsql.ts +4 -4
- package/src/drivers/meilisearch.integration.test.ts +77 -0
- package/src/drivers/meilisearch.test.ts +181 -0
- package/src/drivers/meilisearch.ts +208 -0
- package/src/drivers/memory.ts +4 -4
- package/src/drivers/pgvector.ts +6 -6
- package/src/drivers/types.ts +93 -12
- package/src/drivers/vault-driver-removal.test.ts +6 -0
- package/src/drivers/vault-types.ts +4 -4
- package/src/elements/ai/runtime.ts +6 -0
- package/src/elements/ai.test.ts +22 -0
- package/src/elements/gate/boot.ts +136 -0
- package/src/elements/gate/config.ts +69 -0
- package/src/elements/gate/declare.ts +51 -1
- package/src/elements/gate/runtime.ts +3 -1
- package/src/elements/gate.test.ts +77 -0
- package/src/elements/gate.ts +20 -1
- package/src/elements/index.ts +8 -0
- package/src/elements/store/index-boot.test.ts +49 -7
- package/src/elements/store/runtime.ts +50 -15
- package/src/elements/store.ts +2 -0
- package/src/elements/vault.test.ts +27 -4
- package/src/elements/vault.ts +1 -1
- package/src/index.ts +15 -0
- package/src/kernel/app.ts +253 -32
- package/src/kernel/boot-bind/store.test.ts +9 -0
- package/src/kernel/boot-bind/store.ts +30 -2
- package/src/kernel/boot.test.ts +40 -3
- package/src/kernel/boot.ts +8 -0
- package/src/kernel/call.test.ts +46 -2
- package/src/kernel/concurrency.test.ts +58 -0
- package/src/kernel/concurrency.ts +48 -0
- package/src/kernel/edge.test.ts +3 -3
- package/src/kernel/flow.test.ts +2 -2
- package/src/kernel/fx.test.ts +12 -2
- package/src/kernel/fx.ts +97 -5
- package/src/kernel/hooks.test.ts +4 -4
- package/src/kernel/index.ts +22 -1
- package/src/kernel/pipeline.test.ts +12 -8
- package/src/kernel/pipeline.ts +23 -4
- package/src/kernel/plugin/decorate.test.ts +3 -3
- package/src/kernel/plugin/scoping.test.ts +3 -3
- package/src/kernel/plugin-elements.test.ts +51 -0
- package/src/kernel/plugin-needs.test.ts +83 -0
- package/src/kernel/plugin-needs.ts +129 -0
- package/src/kernel/plugin.ts +101 -0
- package/src/kernel/redacted.ts +74 -0
- package/src/kernel/registry-isolation.test.ts +5 -5
- package/src/kernel/registry.ts +102 -3
- package/src/kernel/router.ts +3 -3
- package/src/manifest/types.ts +2 -0
- package/src/plugins/anonymous.ts +58 -0
- package/src/plugins/auth/shared.ts +121 -0
- package/src/plugins/auth-methods.test.ts +176 -0
- package/src/plugins/compression.test.ts +5 -5
- package/src/plugins/config-source.test.ts +1 -1
- package/src/plugins/cors.test.ts +16 -10
- package/src/plugins/csrf.test.ts +1 -1
- package/src/plugins/email-otp.ts +161 -0
- package/src/plugins/index.ts +31 -0
- package/src/plugins/ip-allowlist.test.ts +19 -9
- package/src/plugins/magic-link.ts +163 -0
- package/src/plugins/maintenance-mode.test.ts +9 -5
- package/src/plugins/passkey.ts +216 -0
- package/src/plugins/phone-number.ts +149 -0
- package/src/plugins/security-headers.test.ts +14 -14
- package/src/plugins/two-factor.ts +249 -0
- package/src/plugins/username.ts +148 -0
- package/src/runs/runs.test.ts +6 -2
- package/src/runtime/primitives.ts +37 -4
- package/src/runtime/serve.test.ts +3 -2
- package/src/runtime/types.ts +25 -2
- package/src/test/create-test-app.test.ts +1 -1
- package/src/test/create-test-app.ts +4 -1
- package/src/test/provisions.integration.test.ts +2 -2
- package/site/content/docs/get-started/comparison.mdx +0 -65
- package/src/console/ui/dist/assets/index-CrKMmO__.js +0 -10
- package/src/console/ui/dist/assets/panel-access-C0J2D-a2.js +0 -64
- package/src/console/ui/dist/assets/panel-clock-DjGGFPzr.js +0 -1
- package/src/console/ui/dist/assets/panel-flows-DlCU5zjA.js +0 -45
- package/src/console/ui/dist/assets/panel-overview-BsFvDdts.js +0 -1
- package/src/console/ui/dist/assets/panel-runs-C0gmnoYL.js +0 -1
- package/src/console/ui/dist/assets/panel-traces-BDiAuVSK.js +0 -1
- package/src/drivers/vault-infisical.ts +0 -57
package/AGENTS.md
CHANGED
|
@@ -96,3 +96,5 @@ Engine: Bun `>=1.3`.
|
|
|
96
96
|
## After every implementation
|
|
97
97
|
|
|
98
98
|
Before claiming work done: run [`.agents/skills/oke-ship`](.agents/skills/oke-ship/SKILL.md) — append notes to `changelog.md` under `## Unreleased` (never under a shipped `## v…` section), and update site docs via [`.agents/skills/oke-docs`](.agents/skills/oke-docs/SKILL.md) for any user-facing surface. Version bump is separate: `bun run bump` promotes Unreleased into the next `## vX.Y.Z`.
|
|
99
|
+
|
|
100
|
+
Dependency bumps (one package, one `package.json`, or all): [`.agents/skills/oke-deps`](.agents/skills/oke-deps/SKILL.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "okengine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "One law. Eight elements. Ten exports. One package. One manifest. Every backend need is derived, never added.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
"exports": {
|
|
27
27
|
".": "./src/index.ts",
|
|
28
28
|
"./client": "./src/client/index.ts",
|
|
29
|
+
"./client/auth": "./src/client/auth.ts",
|
|
30
|
+
"./client-react": "./src/client-react/index.ts",
|
|
29
31
|
"./test": "./src/test/index.ts",
|
|
30
32
|
"./config": "./src/config/index.ts",
|
|
31
33
|
"./auth": "./src/auth/index.ts",
|
|
@@ -56,7 +58,7 @@
|
|
|
56
58
|
"prepack": "bun run build",
|
|
57
59
|
"bench": "bun test ./src/runtime/cold-start.bench.ts src/client/budget.test.ts src/console/budget.test.ts src/kernel/budget.test.ts src/kernel/routing-budget.test.ts src/runs/bench.test.ts",
|
|
58
60
|
"budgets": "bun src/release/publish.ts",
|
|
59
|
-
"gate": "bun test src/cli/doc-staleness.test.ts src/drivers/vault-driver-removal.test.ts src/kernel/errors.registry.test.ts src/upgrade/codemods.test.ts",
|
|
61
|
+
"gate": "bun test src/cli/doc-staleness.test.ts src/cli/competitor-mention-removal.test.ts src/drivers/vault-driver-removal.test.ts src/kernel/errors.registry.test.ts src/upgrade/codemods.test.ts",
|
|
60
62
|
"dev": "bun run --cwd site dev",
|
|
61
63
|
"site:build": "bun run --cwd site build",
|
|
62
64
|
"ci": "bun scripts/ci.ts",
|
|
@@ -66,10 +68,10 @@
|
|
|
66
68
|
},
|
|
67
69
|
"dependencies": {
|
|
68
70
|
"@clack/prompts": "^1.7.0",
|
|
69
|
-
"@duckdb/node-api": "^1.5.5-r.
|
|
71
|
+
"@duckdb/node-api": "^1.5.5-r.2",
|
|
70
72
|
"ajv": "^8.20.0",
|
|
71
73
|
"ajv-formats": "^3.0.1",
|
|
72
|
-
"oxc-parser": "^0.
|
|
74
|
+
"oxc-parser": "^0.142.0",
|
|
73
75
|
"sently": "^0.8.0"
|
|
74
76
|
},
|
|
75
77
|
"devDependencies": {
|
|
@@ -78,20 +80,20 @@
|
|
|
78
80
|
"@codemirror/lang-json": "^6.0.2",
|
|
79
81
|
"@codemirror/state": "^6.7.1",
|
|
80
82
|
"@codemirror/theme-one-dark": "^6.1.3",
|
|
81
|
-
"@codemirror/view": "^6.43.
|
|
83
|
+
"@codemirror/view": "^6.43.7",
|
|
82
84
|
"@electric-sql/pglite": "^0.5.4",
|
|
83
85
|
"@electric-sql/pglite-pgvector": "^0.0.5",
|
|
84
86
|
"@libsql/client": "^0.17.4",
|
|
85
|
-
"@oxc-project/types": "^0.
|
|
86
|
-
"@playwright/test": "^1.62.
|
|
87
|
+
"@oxc-project/types": "^0.142.0",
|
|
88
|
+
"@playwright/test": "^1.62.1",
|
|
87
89
|
"@sinclair/typebox": "^0.34.52",
|
|
88
90
|
"@tailwindcss/vite": "^4.3.3",
|
|
89
91
|
"@tanstack/react-query": "^5.101.4",
|
|
90
92
|
"@tanstack/react-router": "^1.170.18",
|
|
91
93
|
"@types/bun": "latest",
|
|
92
|
-
"@types/react": "^19.2.
|
|
93
|
-
"@types/react-dom": "^19.2.
|
|
94
|
-
"@vitejs/plugin-react": "^6.0.
|
|
94
|
+
"@types/react": "^19.2.18",
|
|
95
|
+
"@types/react-dom": "^19.2.4",
|
|
96
|
+
"@vitejs/plugin-react": "^6.0.5",
|
|
95
97
|
"arktype": "^2.2.3",
|
|
96
98
|
"axe-core": "^4.12.1",
|
|
97
99
|
"clsx": "^2.1.1",
|
|
@@ -105,13 +107,13 @@
|
|
|
105
107
|
"oxfmt": "^0.61.0",
|
|
106
108
|
"oxlint": "^1.76.0",
|
|
107
109
|
"oxlint-tsgolint": "^7.0.2001",
|
|
108
|
-
"playwright": "^1.62.
|
|
110
|
+
"playwright": "^1.62.1",
|
|
109
111
|
"react": "^19.2.8",
|
|
110
112
|
"react-dom": "^19.2.8",
|
|
111
113
|
"tailwindcss": "^4.3.3",
|
|
112
114
|
"typescript": "^7.0.2",
|
|
113
115
|
"valibot": "^1.4.2",
|
|
114
|
-
"vite": "^8.
|
|
116
|
+
"vite": "^8.2.0",
|
|
115
117
|
"zod": "^4.4.3"
|
|
116
118
|
},
|
|
117
119
|
"peerDependencies": {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "AI Resources"
|
|
3
|
+
description: "Machine-facing surfaces — MCP on :6535/:6536, agent skills, and /llms.txt."
|
|
4
|
+
icon: "Bot"
|
|
5
|
+
source: "docs/spec/unified-theory.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Resources for AI agents that read or operate an OKE app — not the `ai` element itself.
|
|
9
|
+
|
|
10
|
+
## Pages
|
|
11
|
+
|
|
12
|
+
<Cards>
|
|
13
|
+
<Card title="MCP" description="Runtime MCP on :6535; docs MCP on :6536." href="/docs/ai/mcp" />
|
|
14
|
+
<Card
|
|
15
|
+
title="Skills"
|
|
16
|
+
description="AGENTS.md contract and installable skills."
|
|
17
|
+
href="/docs/ai/skills"
|
|
18
|
+
/>
|
|
19
|
+
<Card
|
|
20
|
+
title="llms.txt"
|
|
21
|
+
description="Machine-readable docs index and pages."
|
|
22
|
+
href="/docs/ai/llms-txt"
|
|
23
|
+
/>
|
|
24
|
+
</Cards>
|
|
@@ -31,6 +31,9 @@ curl https://oke.omqkhafi.dev/llms.mdx/docs/elements/vault
|
|
|
31
31
|
only when breadth matters more than tokens; per-page `/llms.mdx` is the precise instrument.
|
|
32
32
|
</Callout>
|
|
33
33
|
|
|
34
|
+
The homepage **Onboard AI** button copies a one-line prompt that points an agent at
|
|
35
|
+
`/llms.txt` plus the repo-root `AGENTS.md` — project-wide context, not a single docs page.
|
|
36
|
+
|
|
34
37
|
## How it pairs with the docs MCP
|
|
35
38
|
|
|
36
39
|
These endpoints serve the _published_ docs of the framework. During `oke dev`, the [docs MCP server](/docs/ai/mcp) also runs on :6536 (`oke.docs.search` / `oke.docs.get`), answering from the same content over the MCP protocol — pick the plain HTTP endpoints for one-shot context, the MCP tools when the agent is already connected as a client.
|
|
@@ -7,14 +7,15 @@ source: "docs/spec/unified-theory.md"
|
|
|
7
7
|
|
|
8
8
|
Tools alone don't make a good operator — an agent also needs to know the _vocabulary_: what a Flow is, why `fx` is the only door, which driver ids are legal. OKE ships that knowledge as contracts and skills that agents load automatically, so sessions start aligned instead of drifting and getting corrected.
|
|
9
9
|
|
|
10
|
-
## The
|
|
10
|
+
## The layers
|
|
11
11
|
|
|
12
12
|
| Layer | Path | Loaded when | Teaches |
|
|
13
13
|
| ------------------ | -------------------------- | ------------------------------------------------- | --------------------------------------------------------------------- |
|
|
14
14
|
| **Agent contract** | `AGENTS.md` (repo root) | Every agent session, automatically | The one law, eight elements, ten exports, the fx rule, ports, budgets |
|
|
15
15
|
| **Element skill** | `.agents/skills/oke/` | Building or changing an okengine app | The element contract in depth — declaration patterns per element |
|
|
16
16
|
| **Docs skill** | `.agents/skills/oke-docs/` | Writing or editing docs under `site/content/docs` | The documentation information-architecture standard and its gates |
|
|
17
|
-
| **Ship skill** | `.agents/skills/oke-ship/` | After any implementation, before claiming done | Changelog under
|
|
17
|
+
| **Ship skill** | `.agents/skills/oke-ship/` | After any implementation, before claiming done | Changelog under `## Unreleased` + docs sync via `oke-docs` |
|
|
18
|
+
| **Deps skill** | `.agents/skills/oke-deps/` | Updating `package.json` dependencies | Scoped bumps, Bun install, pins (Drizzle RC, fumadocs alias, …) |
|
|
18
19
|
|
|
19
20
|
## AGENTS.md — the root contract
|
|
20
21
|
|
|
@@ -22,13 +23,14 @@ Every OKE app's repo carries an `AGENTS.md` that agents (Cursor, Claude Code, an
|
|
|
22
23
|
|
|
23
24
|
## Skills — installable know-how
|
|
24
25
|
|
|
25
|
-
Skills are `SKILL.md` packages an agent loads when the work matches their description.
|
|
26
|
+
Skills are `SKILL.md` packages an agent loads when the work matches their description. OKE ships:
|
|
26
27
|
|
|
27
28
|
| Skill | Use it for | Inside |
|
|
28
29
|
| ---------- | -------------------------------------------- | ------------------------------------------------------------------------- |
|
|
29
30
|
| `oke` | App work — flows, elements, drivers | The agent contract, element patterns, the fx invariants |
|
|
30
31
|
| `oke-docs` | Docs work — new pages, rewrites | The page skeleton, verification sources, the density gate |
|
|
31
32
|
| `oke-ship` | Closing an implementation — changelog + docs | Append under `## Unreleased`; `bun run bump` promotes it into `## vX.Y.Z` |
|
|
33
|
+
| `oke-deps` | Dependency updates — one package or all | Scope map, `ncu` + Bun, reject downgrades / protect RC and aliases |
|
|
32
34
|
|
|
33
35
|
All live in the repo under `.agents/skills/`, so they travel with the code and stay versioned with what they describe.
|
|
34
36
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Gates"
|
|
3
|
-
description: "Permission
|
|
3
|
+
description: "Permission inquiry, rate counters, and continuous audit of unguarded vs explicitly public flows."
|
|
4
4
|
icon: "Shield"
|
|
5
5
|
source: "docs/spec/console.md"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
The Gates panel answers **who may do what** without dumping a giant roles×permissions matrix as
|
|
9
|
+
the home screen. Inquire from a principal or from a flow; the simulator shows the chain in
|
|
10
|
+
evaluation order.
|
|
9
11
|
|
|
10
|
-
<Callout title="
|
|
12
|
+
<Callout title="The one rule">
|
|
11
13
|
Refuse the giant roles×permissions matrix as the entry point — inquire from principal or from
|
|
12
14
|
flow.
|
|
13
15
|
</Callout>
|
|
@@ -15,10 +17,10 @@ Answers: **permission matrix, rate counters, MFA map**
|
|
|
15
17
|
## What this panel shows
|
|
16
18
|
|
|
17
19
|
<Cards>
|
|
18
|
-
<Card title="Simulator" description="Gate chain in evaluation order — where a
|
|
20
|
+
<Card title="Simulator" description="Gate chain in evaluation order — where a denial stopped." />
|
|
19
21
|
<Card
|
|
20
|
-
title="Unguarded
|
|
21
|
-
description="
|
|
22
|
+
title="Unguarded vs public"
|
|
23
|
+
description="Empty chain (missing posture) vs gate.public (intentional)."
|
|
22
24
|
/>
|
|
23
25
|
<Card title="Deploy diff" description="Permission widening caught from Manifest Diff." />
|
|
24
26
|
<Card
|
|
@@ -27,9 +29,45 @@ Answers: **permission matrix, rate counters, MFA map**
|
|
|
27
29
|
/>
|
|
28
30
|
</Cards>
|
|
29
31
|
|
|
32
|
+
## Unguarded vs explicit public
|
|
33
|
+
|
|
34
|
+
| Flag | Meaning |
|
|
35
|
+
| --------------- | ---------------------------------------------------------------------------- |
|
|
36
|
+
| Unguarded | User-plane flow with an **empty** gate chain — missing auth posture |
|
|
37
|
+
| Explicit public | Chain includes the reserved `public` sentinel (`gate.public` on the trigger) |
|
|
38
|
+
|
|
39
|
+
App boot fails on unguarded HTTP triggers (`GateBootError`) unless `env === "test"` and
|
|
40
|
+
`gate: { unguardedHttp: "allow" }`. Prefer fixing the flow: attach a policy, or attach
|
|
41
|
+
`gate.public` when the surface is intentionally open.
|
|
42
|
+
|
|
43
|
+
App authors configure Gate under `oke({ gate: { policies, auth, unguardedHttp } })` — see
|
|
44
|
+
[Gate](/docs/elements/gate). Builtin `/auth/*` Flows from `gate.auth` are audited the same way.
|
|
45
|
+
|
|
30
46
|
## Catalog
|
|
31
47
|
|
|
48
|
+
Policies, rates, and `/auth/*` Bindings from the Manifest — inquire and audit, not a live
|
|
49
|
+
rate editor. Rate `overridable` is a catalog flag; schedule edits live under
|
|
50
|
+
[Clock](/docs/console/clock).
|
|
51
|
+
|
|
32
52
|
<Cards>
|
|
33
|
-
<Card title="Dev" description="full" />
|
|
34
|
-
<Card title="Prod" description="
|
|
53
|
+
<Card title="Dev" description="full catalog + simulator" />
|
|
54
|
+
<Card title="Prod" description="same inquire surface; no silent ungated HTTP" />
|
|
55
|
+
</Cards>
|
|
56
|
+
|
|
57
|
+
## Learn more
|
|
58
|
+
|
|
59
|
+
- [Gate](/docs/elements/gate) — policies, rate limits, `gate.auth`, posture
|
|
60
|
+
- [Plugins](/docs/plugins) — plugged sign-in method plugins
|
|
61
|
+
- [Access](/docs/console/access) — roles and API keys
|
|
62
|
+
|
|
63
|
+
## Next
|
|
64
|
+
|
|
65
|
+
<Cards>
|
|
66
|
+
<Card title="Gate" description="Declare policies and auth." href="/docs/elements/gate" />
|
|
67
|
+
<Card title="Access" description="Roles and API keys." href="/docs/console/access" />
|
|
68
|
+
<Card
|
|
69
|
+
title="Overview"
|
|
70
|
+
description="Console panels from the Manifest."
|
|
71
|
+
href="/docs/console/overview"
|
|
72
|
+
/>
|
|
35
73
|
</Cards>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Console"
|
|
3
|
+
description: "Manifest-derived operator panels on :6533 — health, elements, traces, access, and more."
|
|
4
|
+
icon: "LayoutDashboard"
|
|
5
|
+
source: "docs/spec/console.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The Console is derived from your Manifest. Each panel answers one operator question.
|
|
9
|
+
|
|
10
|
+
## Pages
|
|
11
|
+
|
|
12
|
+
<Cards>
|
|
13
|
+
<Card
|
|
14
|
+
title="Overview"
|
|
15
|
+
description="Is the system healthy right now?"
|
|
16
|
+
href="/docs/console/overview"
|
|
17
|
+
/>
|
|
18
|
+
<Card
|
|
19
|
+
title="Flows"
|
|
20
|
+
description="What exists; call it; read its contract."
|
|
21
|
+
href="/docs/console/flows"
|
|
22
|
+
/>
|
|
23
|
+
<Card title="Signals" description="Queue depth, in-flight, DLQ." href="/docs/console/signals" />
|
|
24
|
+
<Card title="Store" description="Browse sql/kv/files/index." href="/docs/console/store" />
|
|
25
|
+
<Card title="Clock" description="Crons, sleeps, journal." href="/docs/console/clock" />
|
|
26
|
+
<Card
|
|
27
|
+
title="Gates"
|
|
28
|
+
description="Permission matrix and rate counters."
|
|
29
|
+
href="/docs/console/gates"
|
|
30
|
+
/>
|
|
31
|
+
<Card title="Vault" description="Secret contracts and rotation." href="/docs/console/vault" />
|
|
32
|
+
<Card
|
|
33
|
+
title="Channels"
|
|
34
|
+
description="Templates, receipts, opt-outs."
|
|
35
|
+
href="/docs/console/channels"
|
|
36
|
+
/>
|
|
37
|
+
<Card title="AI" description="Prompts, evals, cost, agents." href="/docs/console/ai" />
|
|
38
|
+
<Card title="Architecture" description="How it all connects." href="/docs/console/architecture" />
|
|
39
|
+
<Card title="Traces" description="One timeline across effects." href="/docs/console/traces" />
|
|
40
|
+
<Card title="Runs" description="Wide events per execution." href="/docs/console/runs" />
|
|
41
|
+
<Card
|
|
42
|
+
title="Manifest Diff"
|
|
43
|
+
description="Blast radius of a deploy."
|
|
44
|
+
href="/docs/console/manifest-diff"
|
|
45
|
+
/>
|
|
46
|
+
<Card title="Access" description="Identities, roles, API keys." href="/docs/console/access" />
|
|
47
|
+
<Card title="Plugins" description="Installed plugins and panels." href="/docs/console/plugins" />
|
|
48
|
+
<Card title="Privacy" description="Where PII lives (conditional)." href="/docs/console/privacy" />
|
|
49
|
+
<Card
|
|
50
|
+
title="Tenancy"
|
|
51
|
+
description="Per-tenant usage (conditional)."
|
|
52
|
+
href="/docs/console/tenancy"
|
|
53
|
+
/>
|
|
54
|
+
</Cards>
|
|
@@ -86,6 +86,8 @@ export const triage = smart.prompt("ticket-triage", {
|
|
|
86
86
|
| `evals` | string | Path to a `.jsonl` eval set, regression-gated via `oke eval` |
|
|
87
87
|
| `budget` | object | `maxCostPerCall` — cost is a first-class dimension |
|
|
88
88
|
|
|
89
|
+
<AiGuardrails />
|
|
90
|
+
|
|
89
91
|
## Agents with real guardrails
|
|
90
92
|
|
|
91
93
|
An agent's tools are your flows — each carrying its own gates, effects, and typed errors, so the agent can never do anything a flow couldn't:
|
|
@@ -79,6 +79,8 @@ Locally the `console` driver captures mail into an inbox instead of sending; in
|
|
|
79
79
|
|
|
80
80
|
## The human physics
|
|
81
81
|
|
|
82
|
+
<ChannelPhysics />
|
|
83
|
+
|
|
82
84
|
### Consent is checked before sending
|
|
83
85
|
|
|
84
86
|
Opt-out is first-class: a subject who opted out of a medium is **suppressed** — the send resolves without contacting the provider, and the receipt says so. You never hand-roll "did they unsubscribe?" checks.
|
|
@@ -83,10 +83,7 @@ do: async (input, fx) => {
|
|
|
83
83
|
|
|
84
84
|
## Two kinds of schedules
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
| ------------------- | ---------------- | --------------- | ------------------ | --------------------------------- |
|
|
88
|
-
| `every("1h")` | no | no | no | Simple fixed intervals |
|
|
89
|
-
| `clock(name, opts)` | yes | yes | when `overridable` | Business schedules operators tune |
|
|
86
|
+
<ClockSchedules />
|
|
90
87
|
|
|
91
88
|
Both are triggers consumed with the same `on(trigger, flow)` — the flow underneath does not know the difference.
|
|
92
89
|
|
|
@@ -96,13 +96,7 @@ Every response follows one envelope — success `{ data, error: null }`, failure
|
|
|
96
96
|
|
|
97
97
|
## The five triggers
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
| ---------------------------- | ---------------------------- | ------------------ |
|
|
101
|
-
| `http.post("/orders")` | a request arrives | endpoint · handler |
|
|
102
|
-
| `orderPlaced` (a signal) | another flow emits | queue consumer |
|
|
103
|
-
| `every("1h")` | time passes | cron job |
|
|
104
|
-
| `db.table(orders).changed()` | a row changes | CDC pipeline |
|
|
105
|
-
| — none | another flow calls `fx.call` | "private" helper |
|
|
99
|
+
<FlowTriggers />
|
|
106
100
|
|
|
107
101
|
### http — a request arrives
|
|
108
102
|
|
|
@@ -192,7 +186,7 @@ Everything a flow may touch, on one object:
|
|
|
192
186
|
| `fx.ask(prompt, input)` | ask | Call a versioned AI prompt |
|
|
193
187
|
| `fx.run(agent, input)` | ask | Run a bounded agent |
|
|
194
188
|
| `fx.call(flow, input)` | call | Invoke another flow |
|
|
195
|
-
| `fx.vault(contract)` | read | Read a secret (
|
|
189
|
+
| `fx.vault(contract)` | read | Read a secret (`Redacted`; logs masked) |
|
|
196
190
|
| `fx.clock.now()` / `.sleep(…)` | — | Injected time / durable sleep |
|
|
197
191
|
| `fx.cache.get/set` | — | Shared cache with effect-aware invalidation |
|
|
198
192
|
| `fx.step(name, fn)` | — | Named durable step — never re-runs on replay |
|
|
@@ -218,12 +212,12 @@ export const chargeOrder = flow({
|
|
|
218
212
|
out: z.boolean(),
|
|
219
213
|
do: async ({ orderId }, fx) => {
|
|
220
214
|
const intent = await fx.step("create-intent", () =>
|
|
221
|
-
stripe(fx.vault(stripeKey)).create(orderId),
|
|
215
|
+
stripe(fx.vault(stripeKey).reveal()).create(orderId),
|
|
222
216
|
);
|
|
223
217
|
|
|
224
218
|
await fx.clock.sleep("verify-window", "2m"); // survives restart and deploy
|
|
225
219
|
|
|
226
|
-
return fx.step("confirm", () => stripe(fx.vault(stripeKey)).confirm(intent));
|
|
220
|
+
return fx.step("confirm", () => stripe(fx.vault(stripeKey).reveal()).confirm(intent));
|
|
227
221
|
},
|
|
228
222
|
});
|
|
229
223
|
```
|