diff --git a/docs/VISION.md b/docs/VISION.md index 53b5807..b17baab 100644 --- a/docs/VISION.md +++ b/docs/VISION.md @@ -25,7 +25,7 @@ These extend the principles in the root README. | Name | What it is | |---|---| | kernel | Processes, a filesystem view, and module loading for one sandbox. The current `@nibling/runtime`. | -| process kind | How a process sees the world: `web` (ESM and web globals, the default), `node` (Node globals and builtins), or `bash`. | +| process runtime | How a process sees the world: `web` (ESM and web globals, the default), `node` (Node globals and builtins), or `bash`. | | sandbox | One origin with its own Service Worker and kernel, plus a manifest that declares its permissions and a lockfile that pins its dependencies. | | placement | Where a sandbox runs: the browser, or a runner service identified by a DID. | | mount | A tree attached to a sandbox's namespace: content-addressed (read-only), an atproto repo, a Space, a git repo, or a writable overlay. | @@ -50,7 +50,7 @@ Each tier depends only on the one below it. Internal tools can stop at tier 1 or Today every process is a Node process. `installGlobals` (`packages/runtime/src/runtime/globals.ts`) installs `process`, `Buffer` and `global` in every worker, and `spawn` only runs `node` or files with a node shebang. -Change: add a process `kind` to the spawn spec. (Not "personality": agents will have personalities.) A `web` process gets web globals and `nib:*`. A `node` process also gets Node globals. `node:` builtins stay importable from any kind and load only when imported. The ESM path already uses the browser's own module loader over the Service Worker's virtual origin, so this is a change of defaults, not a rewrite. +Change: add a `runtime` field to the spawn spec. (Not "personality": agents will have personalities.) A `web` process gets web globals and `nib:*`. A `node` process also gets Node globals. `node:` builtins stay importable from either runtime and load only when imported. The ESM path already uses the browser's own module loader over the Service Worker's virtual origin, so this is a change of defaults, not a rewrite. Follow-up: rewrite the problem statement in `packages/runtime/DESIGN.md`, which describes "a browser-run Node-compatible runtime". @@ -152,7 +152,7 @@ The syscall table is already the boundary between a process and its kernel, so a - Skills are locked dependencies (D4). - Git is required. isomorphic-git is the default candidate in the browser. Tangled is jj-native. jj-lib compiles to WASI with one upstream patch, but its git backend (gitoxide) is untested on WASI, so jj waits on that probe. - Tangled repos mount lazily under `/src/tangled.org/`. Clones go straight from the browser to the knot, which allows cross-origin reads. Pushes go through a runner over SSH unless knots turn out to accept HTTPS push. -- Bash stays as a process kind. Agents are trained on shell commands, and the bashkit evaluation already exists. Bash and code mode go through the same kernel and the same permission checks, and each capability generates a `nib` CLI command, so neither path has more power than the other. +- Bash stays as a process runtime. Agents are trained on shell commands, and the bashkit evaluation already exists. Bash and code mode go through the same kernel and the same permission checks, and each capability generates a `nib` CLI command, so neither path has more power than the other. ### D8. The kernel never calls a model on its own @@ -216,7 +216,7 @@ Consequences: | Area | State | Gap | |---|---|---| -| ESM | Native module loading over the Service Worker virtual origin | Default process kind is Node (D2) | +| ESM | Native module loading over the Service Worker virtual origin | Default process runtime is Node (D2) | | Kernel | Single filesystem owner behind a typed syscall table | Objects have no stable identity (D5); no permissions (D3) | | Persistence | In-memory store | Sync format before OPFS (D5) | | Resolver | One scheme check for `node:` | Add `nib:` | @@ -246,7 +246,7 @@ Consequences: 1. Accept or amend these decisions. 2. Probe gitoxide on WASI, since jj in the browser depends on it. (The CSP, knot CORS, and jj-lib probes ran on 2026-10-30; see D3 and the open questions.) 3. Done 2026-10-30 (see D3): the sandbox-origin probe passed in all three engines. Real Safari 27.0 also passed on its default feature flags. Follow-ups are Service Worker restarts. The `server.ts` header options are done. -4. Add process kinds to the spawn spec (D2). +4. Add the process `runtime` field to the spawn spec (D2). 5. Add the `nib:` scheme with a scoped `nib:fs` and `nib:context`, and generate their types. 6. Design the store and namespace format (D5), then build OPFS on it. 7. Build Drive on that format.