okengine 0.1.4 → 0.1.6
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/README.md +34 -8
- package/package.json +3 -3
- package/src/auth/index.ts +1 -0
- package/src/client/index.ts +1 -0
- package/src/config/index.ts +1 -0
- package/src/console/index.ts +1 -0
- package/src/drivers/index.ts +1 -0
- package/src/elements/ai.ts +1 -0
- package/src/elements/channel.ts +1 -0
- package/src/elements/clock.ts +1 -0
- package/src/elements/gate.ts +1 -0
- package/src/elements/signal.ts +1 -0
- package/src/elements/store.ts +1 -0
- package/src/elements/vault.ts +1 -0
- package/src/index.ts +9 -0
- package/src/mcp/index.ts +1 -0
- package/src/runs/index.ts +1 -0
- package/src/test/index.ts +1 -0
- package/docs/spec/complete-example.md +0 -1188
- package/src/console/ui/dist/assets/index-B71Yl_SS.js +0 -10
- package/src/console/ui/dist/assets/panel-access-Dd37LU2c.js +0 -64
- package/src/console/ui/dist/assets/panel-ai-CC7LR6-J.js +0 -1
- package/src/console/ui/dist/assets/panel-architecture-B5b3iKCz.js +0 -1
- package/src/console/ui/dist/assets/panel-channels-CeNjTKXp.js +0 -1
- package/src/console/ui/dist/assets/panel-clock-DgFTLoHV.js +0 -1
- package/src/console/ui/dist/assets/panel-diff-DxehccqB.js +0 -1
- package/src/console/ui/dist/assets/panel-flows-BtrVn-Eg.js +0 -45
- package/src/console/ui/dist/assets/panel-gates-Z9MKRGdH.js +0 -1
- package/src/console/ui/dist/assets/panel-overview-Bd48d9km.js +0 -1
- package/src/console/ui/dist/assets/panel-plugins-DWd0TowH.js +0 -1
- package/src/console/ui/dist/assets/panel-runs-BwsWqKeB.js +0 -1
- package/src/console/ui/dist/assets/panel-signals-9najbZY2.js +0 -1
- package/src/console/ui/dist/assets/panel-store-OHkP2pDp.js +0 -1
- package/src/console/ui/dist/assets/panel-traces-tn2JoY8U.js +0 -1
- package/src/console/ui/dist/assets/panel-vault-BbfWdox0.js +0 -1
- package/src/console/ui/dist/assets/rolldown-runtime-CNC7AqOf.js +0 -1
- package/src/console/ui/dist/assets/style-Cnl7WLya.css +0 -3
- package/src/console/ui/dist/index.html +0 -14
package/README.md
CHANGED
|
@@ -2,12 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
*"Encore's batteries and dashboard, Elysia's speed and DX, Hono's portability — without the Rust lock-in, the cloud gravity, or the source-available license."*
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/okengine)
|
|
6
|
+
[](https://jsr.io/@omqkhafi/okengine)
|
|
7
|
+
[](https://www.npmjs.com/package/create-oke)
|
|
5
8
|
[](https://opensource.org/licenses/MIT)
|
|
6
9
|
[](https://bun.sh)
|
|
7
10
|
|
|
8
|
-
**
|
|
11
|
+
**Framework:** [`okengine`](https://www.npmjs.com/package/okengine) · **CLI:** `oke` · **Scaffold:** [`create-oke`](https://www.npmjs.com/package/create-oke) · **License:** MIT
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
### Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
bun add okengine # npm (recommended — ships the `oke` CLI)
|
|
17
|
+
bunx jsr add @omqkhafi/okengine # JSR — library API only
|
|
18
|
+
bunx create-oke@latest my-app # scaffold from npm
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
| Package | npm | JSR |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| Framework | [`okengine`](https://www.npmjs.com/package/okengine) | [`@omqkhafi/okengine`](https://jsr.io/@omqkhafi/okengine) |
|
|
24
|
+
| Scaffold | [`create-oke`](https://www.npmjs.com/package/create-oke) | [`@omqkhafi/create-oke`](https://jsr.io/@omqkhafi/create-oke) |
|
|
25
|
+
|
|
26
|
+
### npm vs JSR
|
|
27
|
+
|
|
28
|
+
| Surface | npm | JSR |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| Library imports (`okengine`, `/client`, `/drivers`, …) | yes | yes |
|
|
31
|
+
| Deep drivers (`okengine/drivers/postgres`, …) | yes | no — use `okengine/drivers`, or install from npm |
|
|
32
|
+
| `oke` CLI | yes | no |
|
|
33
|
+
| `create-oke` binary | yes | no — prefer `bunx create-oke@latest` from npm |
|
|
34
|
+
|
|
35
|
+
JSR cannot rewrite the CLI’s dynamic imports of your app entry (`oke dev` / `oke start` / config load). Install `okengine` from npm when you need the binary. Deep driver subpaths use npm `exports` wildcards, which JSR does not support.
|
|
11
36
|
|
|
12
37
|
---
|
|
13
38
|
|
|
@@ -27,7 +52,7 @@ Eight elements cover what a backend needs. Ten exports are the whole public voca
|
|
|
27
52
|
import { on, flow, signal, store, clock, gate, vault, channel, ai, plugin } from "okengine";
|
|
28
53
|
```
|
|
29
54
|
|
|
30
|
-
Batteries included for the Bun era: contract-first APIs, typed client, infrastructure primitives, Console, auth — pure TypeScript, MIT, self-hostable, no cloud lock-in. Detail and comparisons live in [`docs/spec/unified-theory.md`](docs/spec/unified-theory.md).
|
|
55
|
+
Batteries included for the Bun era: contract-first APIs, typed client, infrastructure primitives, Console, auth — pure TypeScript, MIT, self-hostable, no cloud lock-in. Detail and comparisons live in [`docs/spec/unified-theory.md`](https://github.com/omqkhafi/okengine/blob/main/docs/spec/unified-theory.md).
|
|
31
56
|
|
|
32
57
|
---
|
|
33
58
|
|
|
@@ -45,7 +70,7 @@ oke dev
|
|
|
45
70
|
| `:6533` | Console |
|
|
46
71
|
| `:6535` | MCP |
|
|
47
72
|
|
|
48
|
-
That scaffolds the **Notes** app (same tree as [`examples/notes`](examples/notes)). Open the Console — flows, contracts, effects, and an architecture diagram are already there. Derived, not configured.
|
|
73
|
+
That scaffolds the **Notes** app (same tree as [`examples/notes`](https://github.com/omqkhafi/okengine/tree/main/examples/notes)). Open the Console — flows, contracts, effects, and an architecture diagram are already there. Derived, not configured.
|
|
49
74
|
|
|
50
75
|
### The idea, in one file
|
|
51
76
|
|
|
@@ -318,10 +343,11 @@ The Console is treated as internet-facing even on localhost. Host header validat
|
|
|
318
343
|
|
|
319
344
|
## Status
|
|
320
345
|
|
|
321
|
-
Pre-1.0. MIT. No `CONTRIBUTING` yet — issues and PRs welcome.
|
|
346
|
+
Pre-1.0. Published on [npm](https://www.npmjs.com/package/okengine) and [JSR](https://jsr.io/@omqkhafi/okengine) (`okengine` + `create-oke`, lockstep). MIT. No `CONTRIBUTING` yet — issues and PRs welcome.
|
|
322
347
|
|
|
323
348
|
| Spec | Path |
|
|
324
349
|
|---|---|
|
|
325
|
-
| Unified theory | [`docs/spec/unified-theory.md`](docs/spec/unified-theory.md) |
|
|
326
|
-
| Four applications | [`docs/spec/four-applications.md`](docs/spec/four-applications.md) |
|
|
327
|
-
| Console | [`docs/spec/console.md`](docs/spec/console.md) |
|
|
350
|
+
| Unified theory | [`docs/spec/unified-theory.md`](https://github.com/omqkhafi/okengine/blob/main/docs/spec/unified-theory.md) |
|
|
351
|
+
| Four applications | [`docs/spec/four-applications.md`](https://github.com/omqkhafi/okengine/blob/main/docs/spec/four-applications.md) |
|
|
352
|
+
| Console | [`docs/spec/console.md`](https://github.com/omqkhafi/okengine/blob/main/docs/spec/console.md) |
|
|
353
|
+
| Scaffold | [`packages/create-oke`](https://github.com/omqkhafi/okengine/tree/main/packages/create-oke) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "okengine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
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
|
"type": "module",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"bun": ">=1.3"
|
|
123
123
|
},
|
|
124
124
|
"bin": {
|
|
125
|
-
"oke": "
|
|
125
|
+
"oke": "src/cli/index.ts"
|
|
126
126
|
},
|
|
127
127
|
"exports": {
|
|
128
128
|
".": "./src/index.ts",
|
|
@@ -149,4 +149,4 @@
|
|
|
149
149
|
"AGENTS.md",
|
|
150
150
|
"docs/spec"
|
|
151
151
|
]
|
|
152
|
-
}
|
|
152
|
+
}
|
package/src/auth/index.ts
CHANGED
package/src/client/index.ts
CHANGED
package/src/config/index.ts
CHANGED
package/src/console/index.ts
CHANGED
package/src/drivers/index.ts
CHANGED
package/src/elements/ai.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* (`oke eval` gates CI). Agents' tools are the app's own flows (gates apply).
|
|
10
10
|
* PII fields cannot reach a third-party model without explicit `allowPii`.
|
|
11
11
|
* Nondeterministic ⇒ journaling forced, auto-cache disabled.
|
|
12
|
+
* @module
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
15
|
export { ai } from "./ai/declare.ts";
|
package/src/elements/channel.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* MIME, attachments, retry, and the unified error hierarchy come from sently.
|
|
9
9
|
* OKE adds: declared templates with i18n, consent/opt-out, fallback chains
|
|
10
10
|
* recorded as chains, and delivery receipts.
|
|
11
|
+
* @module
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
export { channel } from "./channel/declare.ts";
|
package/src/elements/clock.ts
CHANGED
package/src/elements/gate.ts
CHANGED
package/src/elements/signal.ts
CHANGED
package/src/elements/store.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Drivers are protocol-named and live under `src/drivers/*`.
|
|
6
6
|
* All world access still goes through `fx`; this module only declares
|
|
7
7
|
* resources and provides runtime helpers (cache, replica routing, PII).
|
|
8
|
+
* @module
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
export { store, sql, kv, files, index } from "./store/declare.ts";
|
package/src/elements/vault.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* A declaration is a contract, never a value. Boot validates every contract
|
|
8
8
|
* and lists all gaps at once. Logs/traces receive fingerprints and redaction
|
|
9
9
|
* registered at boot — cleartext never appears even when passed to `fx.log`.
|
|
10
|
+
* @module
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
export {
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Full ten-export surface lands as elements ship; this entry exposes the
|
|
5
5
|
* executable core (oke · on · flow · http · fx · contracts).
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { oke, on, flow, http } from "okengine";
|
|
10
|
+
*
|
|
11
|
+
* export const app = oke({ name: "notes" });
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @module
|
|
6
15
|
*/
|
|
7
16
|
|
|
8
17
|
export {
|
package/src/mcp/index.ts
CHANGED
package/src/runs/index.ts
CHANGED