@eloxiv/cli 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +12 -2
- package/dist/AgentSkills.d.ts +51 -0
- package/dist/AgentSkills.d.ts.map +1 -0
- package/dist/AgentSkills.js +264 -0
- package/dist/AgentSkills.js.map +1 -0
- package/dist/AgentWeb.d.ts +83 -0
- package/dist/AgentWeb.d.ts.map +1 -0
- package/dist/AgentWeb.js +436 -0
- package/dist/AgentWeb.js.map +1 -0
- package/dist/App.d.ts +213 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +357 -0
- package/dist/App.js.map +1 -0
- package/dist/Blueprint.d.ts +47 -0
- package/dist/Blueprint.d.ts.map +1 -0
- package/dist/Blueprint.js +241 -0
- package/dist/Blueprint.js.map +1 -0
- package/dist/Brand.d.ts +42 -0
- package/dist/Brand.d.ts.map +1 -0
- package/dist/Brand.js +370 -0
- package/dist/Brand.js.map +1 -0
- package/dist/Changelog.d.ts +22 -0
- package/dist/Changelog.d.ts.map +1 -0
- package/dist/Changelog.js +117 -0
- package/dist/Changelog.js.map +1 -0
- package/dist/Cli.d.ts +17 -0
- package/dist/Cli.d.ts.map +1 -0
- package/dist/Cli.js +810 -0
- package/dist/Cli.js.map +1 -0
- package/dist/DbAdmin.d.ts +18 -0
- package/dist/DbAdmin.d.ts.map +1 -0
- package/dist/DbAdmin.js +91 -0
- package/dist/DbAdmin.js.map +1 -0
- package/dist/Dependencies.d.ts +53 -0
- package/dist/Dependencies.d.ts.map +1 -0
- package/dist/Dependencies.js +132 -0
- package/dist/Dependencies.js.map +1 -0
- package/dist/Deploy.d.ts +39 -0
- package/dist/Deploy.d.ts.map +1 -0
- package/dist/Deploy.js +458 -0
- package/dist/Deploy.js.map +1 -0
- package/dist/Docs.d.ts +71 -0
- package/dist/Docs.d.ts.map +1 -0
- package/dist/Docs.js +240 -0
- package/dist/Docs.js.map +1 -0
- package/dist/Doctor.d.ts +56 -0
- package/dist/Doctor.d.ts.map +1 -0
- package/dist/Doctor.js +368 -0
- package/dist/Doctor.js.map +1 -0
- package/dist/Dossier.d.ts +23 -0
- package/dist/Dossier.d.ts.map +1 -0
- package/dist/Dossier.js +92 -0
- package/dist/Dossier.js.map +1 -0
- package/dist/Emit.d.ts +26 -0
- package/dist/Emit.d.ts.map +1 -0
- package/dist/Emit.js +51 -0
- package/dist/Emit.js.map +1 -0
- package/dist/Errors.d.ts +26 -0
- package/dist/Errors.d.ts.map +1 -0
- package/dist/Errors.js +17 -0
- package/dist/Errors.js.map +1 -0
- package/dist/Evals.d.ts +52 -0
- package/dist/Evals.d.ts.map +1 -0
- package/dist/Evals.js +126 -0
- package/dist/Evals.js.map +1 -0
- package/dist/Files.d.ts +47 -0
- package/dist/Files.d.ts.map +1 -0
- package/dist/Files.js +145 -0
- package/dist/Files.js.map +1 -0
- package/dist/Generate.d.ts +80 -0
- package/dist/Generate.d.ts.map +1 -0
- package/dist/Generate.js +310 -0
- package/dist/Generate.js.map +1 -0
- package/dist/Guards.d.ts +45 -0
- package/dist/Guards.d.ts.map +1 -0
- package/dist/Guards.js +530 -0
- package/dist/Guards.js.map +1 -0
- package/dist/Inspect.d.ts +125 -0
- package/dist/Inspect.d.ts.map +1 -0
- package/dist/Inspect.js +270 -0
- package/dist/Inspect.js.map +1 -0
- package/dist/Keychain.d.ts +57 -0
- package/dist/Keychain.d.ts.map +1 -0
- package/dist/Keychain.js +73 -0
- package/dist/Keychain.js.map +1 -0
- package/dist/Lock.d.ts +13 -0
- package/dist/Lock.d.ts.map +1 -0
- package/dist/Lock.js +145 -0
- package/dist/Lock.js.map +1 -0
- package/dist/Mcp.d.ts +91 -0
- package/dist/Mcp.d.ts.map +1 -0
- package/dist/Mcp.js +128 -0
- package/dist/Mcp.js.map +1 -0
- package/dist/Merge.d.ts +18 -0
- package/dist/Merge.d.ts.map +1 -0
- package/dist/Merge.js +43 -0
- package/dist/Merge.js.map +1 -0
- package/dist/Migrate.d.ts +78 -0
- package/dist/Migrate.d.ts.map +1 -0
- package/dist/Migrate.js +288 -0
- package/dist/Migrate.js.map +1 -0
- package/dist/Plugins.d.ts +36 -0
- package/dist/Plugins.d.ts.map +1 -0
- package/dist/Plugins.js +304 -0
- package/dist/Plugins.js.map +1 -0
- package/dist/Postgres.d.ts +73 -0
- package/dist/Postgres.d.ts.map +1 -0
- package/dist/Postgres.js +294 -0
- package/dist/Postgres.js.map +1 -0
- package/dist/Publish.d.ts +23 -0
- package/dist/Publish.d.ts.map +1 -0
- package/dist/Publish.js +59 -0
- package/dist/Publish.js.map +1 -0
- package/dist/Registry.d.ts +539 -0
- package/dist/Registry.d.ts.map +1 -0
- package/dist/Registry.js +340 -0
- package/dist/Registry.js.map +1 -0
- package/dist/Remote.d.ts +90 -0
- package/dist/Remote.d.ts.map +1 -0
- package/dist/Remote.js +1006 -0
- package/dist/Remote.js.map +1 -0
- package/dist/Run.d.ts +120 -0
- package/dist/Run.d.ts.map +1 -0
- package/dist/Run.js +477 -0
- package/dist/Run.js.map +1 -0
- package/dist/SyncGen.d.ts +118 -0
- package/dist/SyncGen.d.ts.map +1 -0
- package/dist/SyncGen.js +392 -0
- package/dist/SyncGen.js.map +1 -0
- package/dist/Update.d.ts +301 -0
- package/dist/Update.d.ts.map +1 -0
- package/dist/Update.js +627 -0
- package/dist/Update.js.map +1 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +42 -0
- package/dist/bin.js.map +1 -0
- package/dist/docs/backlog.md +56 -0
- package/dist/docs/ci.md +277 -0
- package/dist/docs/cli.md +696 -0
- package/dist/docs/connectors/google.md +115 -0
- package/dist/docs/connectors/http-openapi.md +7 -0
- package/dist/docs/connectors/mcp.md +8 -0
- package/dist/docs/connectors/microsoft-graph.md +75 -0
- package/dist/docs/connectors/openai.md +25 -0
- package/dist/docs/connectors/slack.md +162 -0
- package/dist/docs/connectors/workos.md +39 -0
- package/dist/docs/contracts/README.md +173 -0
- package/dist/docs/contracts/action-consent.md +92 -0
- package/dist/docs/contracts/action-registry.md +85 -0
- package/dist/docs/contracts/actor.md +100 -0
- package/dist/docs/contracts/agent-resources.md +90 -0
- package/dist/docs/contracts/agent-runtime.md +257 -0
- package/dist/docs/contracts/approvals.md +126 -0
- package/dist/docs/contracts/audit.md +75 -0
- package/dist/docs/contracts/auth-provider.md +74 -0
- package/dist/docs/contracts/calendar-provider.md +46 -0
- package/dist/docs/contracts/client-sdk.md +245 -0
- package/dist/docs/contracts/collab-document.md +151 -0
- package/dist/docs/contracts/command.md +44 -0
- package/dist/docs/contracts/connections.md +235 -0
- package/dist/docs/contracts/context-accounting.md +50 -0
- package/dist/docs/contracts/daemon.md +243 -0
- package/dist/docs/contracts/db-tx.md +53 -0
- package/dist/docs/contracts/delegation.md +68 -0
- package/dist/docs/contracts/device-control.md +103 -0
- package/dist/docs/contracts/directory-provider.md +36 -0
- package/dist/docs/contracts/directory.md +161 -0
- package/dist/docs/contracts/document-source.md +33 -0
- package/dist/docs/contracts/files.md +115 -0
- package/dist/docs/contracts/flags.md +83 -0
- package/dist/docs/contracts/host.md +68 -0
- package/dist/docs/contracts/http-api.md +43 -0
- package/dist/docs/contracts/ingestion.md +130 -0
- package/dist/docs/contracts/ingress.md +141 -0
- package/dist/docs/contracts/invocation.md +260 -0
- package/dist/docs/contracts/local-client.md +108 -0
- package/dist/docs/contracts/locale.md +56 -0
- package/dist/docs/contracts/machine-identity.md +117 -0
- package/dist/docs/contracts/mail-provider.md +49 -0
- package/dist/docs/contracts/memory.md +53 -0
- package/dist/docs/contracts/messaging.md +40 -0
- package/dist/docs/contracts/metering.md +139 -0
- package/dist/docs/contracts/model-provider.md +84 -0
- package/dist/docs/contracts/module-manifest.md +213 -0
- package/dist/docs/contracts/notification-channel.md +90 -0
- package/dist/docs/contracts/notifications.md +123 -0
- package/dist/docs/contracts/outbox.md +80 -0
- package/dist/docs/contracts/privacy.md +110 -0
- package/dist/docs/contracts/progress.md +52 -0
- package/dist/docs/contracts/query-surface.md +108 -0
- package/dist/docs/contracts/readiness.md +63 -0
- package/dist/docs/contracts/release.md +142 -0
- package/dist/docs/contracts/result-rendering.md +61 -0
- package/dist/docs/contracts/sandbox.md +186 -0
- package/dist/docs/contracts/scheduler.md +148 -0
- package/dist/docs/contracts/screen-context.md +81 -0
- package/dist/docs/contracts/search.md +120 -0
- package/dist/docs/contracts/secrets.md +74 -0
- package/dist/docs/contracts/settings.md +109 -0
- package/dist/docs/contracts/sharing.md +77 -0
- package/dist/docs/contracts/slot.md +48 -0
- package/dist/docs/contracts/space.md +67 -0
- package/dist/docs/contracts/storage-adapter.md +45 -0
- package/dist/docs/contracts/storage-backend.md +56 -0
- package/dist/docs/contracts/sync.md +213 -0
- package/dist/docs/contracts/telemetry.md +80 -0
- package/dist/docs/contracts/theme-tokens.md +50 -0
- package/dist/docs/contracts/tool-source.md +58 -0
- package/dist/docs/contracts/versioning.md +99 -0
- package/dist/docs/contracts/view.md +65 -0
- package/dist/docs/contracts/work-items.md +99 -0
- package/dist/docs/contracts/workflow.md +82 -0
- package/dist/docs/decisions.md +163 -0
- package/dist/docs/example-app.md +192 -0
- package/dist/docs/getting-started.md +927 -0
- package/dist/docs/goal.md +54 -0
- package/dist/docs/parity.md +29 -0
- package/dist/docs/performance.md +129 -0
- package/dist/docs/registry/README.md +74 -0
- package/dist/docs/registry/app.md +38 -0
- package/dist/docs/registry/approvals-ui-foldkit.md +28 -0
- package/dist/docs/registry/calendar-ui-foldkit.md +27 -0
- package/dist/docs/registry/calendar.md +35 -0
- package/dist/docs/registry/chat-ui-foldkit.md +30 -0
- package/dist/docs/registry/desktop-rune.md +49 -0
- package/dist/docs/registry/desktop.md +32 -0
- package/dist/docs/registry/eloxiv-action.md +25 -0
- package/dist/docs/registry/eloxiv-connector.md +25 -0
- package/dist/docs/registry/eloxiv-module.md +25 -0
- package/dist/docs/registry/eloxiv-policy.md +25 -0
- package/dist/docs/registry/eloxiv-view.md +25 -0
- package/dist/docs/registry/hello-ui-foldkit.md +29 -0
- package/dist/docs/registry/hello.md +39 -0
- package/dist/docs/registry/home-ui-foldkit.md +27 -0
- package/dist/docs/registry/home.md +29 -0
- package/dist/docs/registry/inbox-ui-foldkit.md +27 -0
- package/dist/docs/registry/mail-ui-foldkit.md +27 -0
- package/dist/docs/registry/mail.md +34 -0
- package/dist/docs/registry/meeting-prep.md +26 -0
- package/dist/docs/registry/members-ui-foldkit.md +28 -0
- package/dist/docs/registry/mobile.md +37 -0
- package/dist/docs/registry/notes-ui-foldkit.md +27 -0
- package/dist/docs/registry/notes.md +26 -0
- package/dist/docs/registry/people-ui-foldkit.md +28 -0
- package/dist/docs/registry/people.md +38 -0
- package/dist/docs/registry/shell-foldkit.md +34 -0
- package/dist/docs/registry/theme.md +25 -0
- package/dist/docs/registry/ui-conformance.md +30 -0
- package/dist/docs/release.md +100 -0
- package/dist/docs/scaffold.md +826 -0
- package/dist/docs/security/threat-model.md +299 -0
- package/dist/docs/upstream/zero-cache-socket-handoff.md +105 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -3
- package/src/AgentSkills.ts +329 -0
- package/src/AgentWeb.ts +507 -0
- package/src/App.ts +435 -0
- package/src/Blueprint.ts +276 -0
- package/src/Brand.ts +415 -0
- package/src/Changelog.ts +136 -0
- package/src/Cli.ts +1458 -0
- package/src/DbAdmin.ts +115 -0
- package/src/Dependencies.ts +170 -0
- package/src/Deploy.ts +563 -0
- package/src/Docs.ts +309 -0
- package/src/Doctor.ts +424 -0
- package/src/Dossier.ts +148 -0
- package/src/Emit.ts +68 -0
- package/src/Errors.ts +18 -0
- package/src/Evals.ts +153 -0
- package/src/Files.ts +152 -0
- package/src/Generate.ts +402 -0
- package/src/Guards.ts +541 -0
- package/src/Inspect.ts +358 -0
- package/src/Keychain.ts +107 -0
- package/src/Lock.ts +174 -0
- package/src/Mcp.ts +159 -0
- package/src/Merge.ts +70 -0
- package/src/Migrate.ts +331 -0
- package/src/Plugins.ts +347 -0
- package/src/Postgres.ts +353 -0
- package/src/Publish.ts +64 -0
- package/src/Registry.ts +405 -0
- package/src/Remote.ts +1158 -0
- package/src/Run.ts +541 -0
- package/src/SyncGen.ts +570 -0
- package/src/Update.ts +873 -0
- package/src/bin.ts +46 -0
- package/src/index.ts +7 -0
package/dist/docs/cli.md
ADDED
|
@@ -0,0 +1,696 @@
|
|
|
1
|
+
# The `eloxiv` CLI
|
|
2
|
+
|
|
3
|
+
`eloxiv` assembles an app from the Eloxiv registry and keeps it up to date, and calls a running kernel ([Calling a kernel](#calling-a-kernel)). Registry items (modules, connectors, the web shell, UI items, the desktop host, skills, the app's server entry) are **copied into your app's repository and owned there**, shadcn-style. The CLI records where each one came from, so it can show what you changed, show what the registry changed, and merge the registry's new versions into your copy without losing your edits.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pnpm add -D @eloxiv/cli # or run it from the Eloxiv workspace: pnpm eloxiv ...
|
|
7
|
+
eloxiv --help
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
The app commands take `--cwd <dir>` (default: the current directory) to name the app; the kernel commands take `--url <kernel>`.
|
|
11
|
+
|
|
12
|
+
| Command | What it does |
|
|
13
|
+
| --- | --- |
|
|
14
|
+
| [`eloxiv init <dir>`](#init) | Create an app (with `--preset`, assembled at once) |
|
|
15
|
+
| [`eloxiv add <items...>`](#add) | Copy registry items into the app, with provenance |
|
|
16
|
+
| [`eloxiv info <item>`](#info) | Show a registry item as published: what it is, needs and installs (nothing of it runs) |
|
|
17
|
+
| [`eloxiv list`](#list) | List the installed items and whether each needs attention |
|
|
18
|
+
| [`eloxiv diff [items...]`](#diff) | Show local edits and upstream changes |
|
|
19
|
+
| [`eloxiv update [items...]`](#update) | Three-way merge the registry's new versions into the app |
|
|
20
|
+
| [`eloxiv update --continue`](#resolving-conflicts) | Record that the last update's conflicts are resolved |
|
|
21
|
+
| [`eloxiv restore <item> [paths...]`](#restore) | Put an item's locally edited or deleted files back as installed |
|
|
22
|
+
| [`eloxiv eject <items...>`](#eject) | Take items over: the app owns them, diff and update leave them alone |
|
|
23
|
+
| [`eloxiv generate`](#generate) | Regenerate each module's sync tables (from its Drizzle tables) and mutators (from its actions' optimistic effects), and the composition files |
|
|
24
|
+
| [`eloxiv setup`](#setup) | Set up the app's database: roles, schemas, every pending migration (checked before it runs) |
|
|
25
|
+
| [`eloxiv doctor`](#doctor) | Check the app's assembly; each check passes, fails, warns or says why it could not run |
|
|
26
|
+
| [`eloxiv clean`](#clean) | Remove build outputs and caches (a dry run unless `--yes`) |
|
|
27
|
+
| [`eloxiv login`](#login) | Sign in to a kernel with the OAuth device flow |
|
|
28
|
+
| [`eloxiv logout`](#logout) | Revoke and forget that sign-in |
|
|
29
|
+
| [`eloxiv whoami`](#whoami) | Show the kernel and credential in use, and the organisations it acts for |
|
|
30
|
+
| [`eloxiv actions`](#actions) | List the kernel's actions |
|
|
31
|
+
| [`eloxiv call <action>`](#call) | Invoke an action and print its result envelope |
|
|
32
|
+
| [`eloxiv agent <prompt>`](#agent) | Ask your agent one thing and follow the run to its end |
|
|
33
|
+
| [`eloxiv mcp install\|uninstall\|status`](#mcp) | List the kernel's MCP server in coding agents' project configuration (Claude Code, Cursor, VS Code) |
|
|
34
|
+
| [`eloxiv mcp serve`](#mcp-serve) | Serve the kernel's MCP tools over stdio, with your sign-in |
|
|
35
|
+
| [`eloxiv dev`](#dev) | Run the app in development: kernel, zero-cache and the shell's dev server |
|
|
36
|
+
| [`eloxiv build`](#build) | Build the shell for production |
|
|
37
|
+
| [`eloxiv start [role]`](#start) | Run one production process: `kernel`, `zero`, `shell` or `setup` |
|
|
38
|
+
| [`eloxiv typecheck`](#typecheck) | Typecheck the app and its shell with the app's own TypeScript |
|
|
39
|
+
| [`eloxiv deploy <docker\|fly\|railway>`](#deploy) | Write a deployment recipe into the app (never deploys) |
|
|
40
|
+
| [`eloxiv deploy check`](#deploy-check) | Check the production environment before a deploy |
|
|
41
|
+
| [`eloxiv db host <provider>`](#db-host) | What to enable on a PostgreSQL host and which endpoint each connection uses |
|
|
42
|
+
| [`eloxiv db check [--live]`](#db-check) | Check the deployment's database URLs (and, live, the host) |
|
|
43
|
+
| [`eloxiv db schemas\|tables\|rows\|sql`](#db-development-administration) | Browse and query a development database (refused for production) |
|
|
44
|
+
| [`eloxiv docs search <words>`](#docs) | Search the framework documentation shipped with this CLI and the installed `@eloxiv` packages' source, at their versions |
|
|
45
|
+
| [`eloxiv migrate`](#migrate) | Apply the installed items' compatibility migrations; `--dossier` prints a migration brief |
|
|
46
|
+
| [`eloxiv blueprint <kind>`](#blueprint) | Markdown instructions for an agent to write a connector, channel, action, module or MAKE module |
|
|
47
|
+
| [`eloxiv changelog add\|release\|list`](#changelog) | The app's release notes |
|
|
48
|
+
| [`eloxiv eval`](#eval) | Run the app's skill evals through the real agent runtime |
|
|
49
|
+
| [`eloxiv eval promote <run>`](#eval-promote) | Turn a finished run into an eval case, under your review and allowlists |
|
|
50
|
+
| [`eloxiv agent-web generate\|audit`](#agent-web) | Public agent-readable files (robots, sitemaps, llms.txt, Markdown, JSON-LD), and an audit of a deployed site |
|
|
51
|
+
| [`eloxiv brand extract <sources...>`](#brand) | A brand's colours, fonts and tokens, proposed as theme overrides |
|
|
52
|
+
| [`eloxiv skills link\|unlink`](#skills) | Write the app's skills into coding agents' project skill directories (Claude Code, Codex), or remove them |
|
|
53
|
+
| [`eloxiv plugin import <dir>`](#plugin) | Import a coding-agent plugin's skills (inert, for development) and its remote MCP servers |
|
|
54
|
+
|
|
55
|
+
The executable runs on Node 24.11 or later, or Bun 1.4 or later (the workspace's `engines`), and refuses an older runtime before anything runs. `eloxiv --version` prints its version, `eloxiv --help` (and `eloxiv <command> --help`) its commands.
|
|
56
|
+
|
|
57
|
+
**Exit codes**, for scripts and CI: `0` success (for `diff`: nothing differs); `1` there is something to act on (`diff` found differences; `update` left conflicts, was blocked, or met an item with unresolved conflicts; `update --continue` found conflict markers; `doctor`, `deploy check`, `db check` or `agent-web audit` found a failing check; `typecheck`, `build`, `dev` or `start` ended with a failing tool; `migrate` left a change for you; `eval` scored a skill below its threshold); `2` the command failed (invalid usage, an unreachable registry or kernel, a refused operation, not signed in). `call` and `agent` exit `1` when the kernel refused or failed the action or the run (its error is printed as JSON).
|
|
58
|
+
|
|
59
|
+
## Files in an app
|
|
60
|
+
|
|
61
|
+
| File | Owner | Purpose |
|
|
62
|
+
| --- | --- | --- |
|
|
63
|
+
| `eloxiv.json` | you | `{ "name": ..., "registry": ..., "modules": [...] }`: the registry location, a directory or an `https` URL (a relative directory is resolved against the app), and the app's own modules, if any ([below](#the-apps-own-modules)) |
|
|
64
|
+
| `eloxiv.lock.json` | the CLI | Provenance of every installed item (below). Commit it. Do not edit it by hand |
|
|
65
|
+
| `eloxiv.modules.ts`, `eloxiv.server.ts`, `eloxiv.schema.ts`, `eloxiv.sync.ts` | the CLI | Composition: the installed modules' contracts, server halves (with the kernel-provided modules they ask for, the installed connectors and the installed skills), and the app-wide typed sync schema with every module's named queries (`eloxiv.schema.ts`, what the server imports), with the modules' mutators added for clients (`eloxiv.sync.ts`, which alone loads a module's `predictions.ts`). Regenerated by `add`, `update` and `generate` |
|
|
66
|
+
| `modules/<module>/sync.gen.ts` | `eloxiv generate` | A module's Zero tables, generated from its Drizzle tables and entities (decision 9). Shipped with the module item like its migrations; run `eloxiv generate` after changing the module's `schema.ts` or entities |
|
|
67
|
+
| everything an item installed | you | Copied from the registry; edit freely. `diff` and `update` keep track of your edits |
|
|
68
|
+
|
|
69
|
+
### The app's own modules
|
|
70
|
+
|
|
71
|
+
A module the app writes itself (not installed from a registry) is listed by name in `eloxiv.json`'s `modules`, and the composition takes it in beside the installed modules, by the registry's layout:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{ "name": "my-app", "registry": "...", "modules": ["tasks"] }
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
| File | What the composition takes from it |
|
|
78
|
+
| --- | --- |
|
|
79
|
+
| `modules/tasks/contract.ts` | the module contract, exported as `tasks` (a name with `_` is camel-cased: `audit_log` exports `auditLog`), into `eloxiv.modules.ts` |
|
|
80
|
+
| `modules/tasks/server.ts` | its server half, exported as `tasksModule`, into `eloxiv.server.ts` (so `setup` makes its schema and roles and applies its migrations, and the kernel serves its actions) |
|
|
81
|
+
| `modules/tasks/sync.ts`, if it exists | its named queries, and the tables `eloxiv generate` writes from its entities to `modules/tasks/sync.gen.ts`, into `eloxiv.schema.ts` and `eloxiv.sync.ts`; with an action predicted by its own code (`optimistic.custom()`, in `modules/tasks/predictions.ts`), its mutators go to `modules/tasks/mutators.gen.ts`, which `eloxiv generate` removes again once no such action is left |
|
|
82
|
+
|
|
83
|
+
Run `eloxiv generate` after listing it, and after changing its tables or entities. A name that is not a lower-case identifier, that names an installed item, or whose `contract.ts` or `server.ts` is missing is refused. The lockfile never records it, so `diff`, `update` and `eject` leave it alone: it is the app's code like any other. [Getting started](getting-started.md) builds one step by step.
|
|
84
|
+
|
|
85
|
+
## The registry
|
|
86
|
+
|
|
87
|
+
A registry is a directory (or an `https` base URL) of built items in the [shadcn registry-item format](https://ui.shadcn.com/docs/registry), each with an `meta.eloxiv` block:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{ "meta": { "eloxiv": { "kind": "module", "version": "0.2.0", "contract": { ... }, "server": { ... }, "sync": { ... } } } }
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`kind` is one of `app`, `module`, `ui`, `shell`, `desktop`, `mobile`, `connector`, `skill`, `theme`, `space`. A `space` asks for kernel-provided modules without a screen (`kernelModules`, as modules and UI items do): `home` brings the home space's (the spaces of the launcher, the global agent and the unified inbox) to an app with no UI, with a guide to their headless surface (`home/README.md`). Every kind is added, diffed and updated the same way; modules, connectors and skills are also composed into `eloxiv.server.ts` (modules into `eloxiv.modules.ts` and `eloxiv.sync.ts` too). Connectors list the capability contracts they implement (`provides`) and their `server` export (a `ConnectorDefinition`); skills their name (`skill`) and their `server` export, an app skill (`defineAppSkill` from `@eloxiv/kernel`: a name, a description and a document beside it, `SKILL.md`), which the app installs as `KernelApp.skills` and agents read like a module's skill ([AgentResources](contracts/agent-resources.md)); any item may list `next` steps that `add` prints.
|
|
94
|
+
|
|
95
|
+
**Eloxiv's own registry** publishes every kind; [the registry's index](registry/README.md) has a page per item (what it is, how to add and use it, its guarantees and limits). In short: modules (`hello`, `notes`, `people`, `mail`, `calendar`), connectors (`google`, `microsoft-graph`, `slack`, `mcp`, `http-openapi`, `openai`), the shell (`shell-foldkit`, decision 10), UI items (`hello-ui-foldkit`, `notes-ui-foldkit`, `people-ui-foldkit`, `mail-ui-foldkit`, `calendar-ui-foldkit`, `chat-ui-foldkit`, `approvals-ui-foldkit`, `inbox-ui-foldkit`, `home-ui-foldkit`, `members-ui-foldkit`, and `ui-conformance`, the UI kit's conformance kit: probes over Foldkit Scene that check a kit adapter's semantics, interaction, keyboard and state against contract major 1, run against the shell's own `ui.ts` in `registry/test/ui-conformance.test.ts`; an app that replaces `ui.ts` runs them against its own), the desktop host (`desktop`), the theme (`theme`), a skill (`meeting-prep`, over calendar, people and mail), the home space without a screen (`home`) and the app's server entry (`app`). `packages/cli/test/registry-items.test.ts` drives every one of them (every item `registry.json` lists; retired ones, in `deprecated.json`, are not) through the `eloxiv` executable: `add` records its version and content hash (and each file's hash as published) and composes it; `update` merges its next version into a copy with a local edit in a file that version changed (merged line by line), reports a conflict where both sides changed the same lines and waits for `update --continue`; `eject` hands it to the app until `eject --undo`. The next version is the one the registry published after the installed one where it offers such edits, or else one the test publishes from the item's real files.
|
|
96
|
+
|
|
97
|
+
**Versions are immutable.** A registry publishes each item twice:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
<name>.json the latest version (what `add` installs)
|
|
101
|
+
<name>/<version>.json every version ever published, never changed
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`update` needs the exact version an app installed (the **base** of the three-way merge), so it fetches `<name>/<version>.json` again and checks it against the content hash in the lock. The content hash covers everything installing and merging an item uses: its files (by target), its npm and registry dependencies and its `meta.eloxiv`, so a base changed in any of these is refused. The other way round, `add` and `update` only install a latest `<name>.json` that is identical to its immutable `<name>/<version>.json`, since that copy is what the next update merges from.
|
|
105
|
+
|
|
106
|
+
Eloxiv's own registry enforces immutability in its build (`registry/scripts/publish.ts`, using `publishVersions` from `@eloxiv/cli`): if an item's content changes without a bump of `meta.eloxiv.version`, the build fails. Every item is checked before any version file is written, so a refused build writes nothing; the writes themselves are ordinary file writes, not a transaction. Bump the item's version in `registry/scripts/index.ts` whenever its files, dependencies or metadata change.
|
|
107
|
+
|
|
108
|
+
**Private registries.** Registry items are served from a private GitHub repository. Point the app at the raw files and give the CLI a token:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
# eloxiv.json: "registry": "https://raw.githubusercontent.com/<org>/<repo>/<ref>/registry/public/r"
|
|
112
|
+
export ELOXIV_REGISTRY_TOKEN=github_pat_... # a fine-grained token with read access to the repository's contents
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The token is sent as `Authorization: Bearer <token>` over `https` (or plain `http` to `localhost`/`127.0.0.1`/`::1`, for local mirrors), never written to any file, never included in error messages, and dropped if a redirect leaves the registry's origin. A token with spaces, a newline or other characters a bearer token cannot hold is refused before any request.
|
|
116
|
+
|
|
117
|
+
## init
|
|
118
|
+
|
|
119
|
+
```sh
|
|
120
|
+
eloxiv init my-app [--name my-app] [--registry <dir-or-url>] [--preset headless|web|desktop] [--no-install]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Creates `package.json`, `tsconfig.json`, `eloxiv.json`, an empty `eloxiv.lock.json`, empty composition files and `.gitignore`. Run from an installed CLI (npx, a global install, an app's dependency), `package.json` has `@eloxiv/cli` at `^` the CLI's version among its devDependencies, so the app runs `eloxiv` from its own dependencies (the deployment recipes need it there); the registry items bring the other `@eloxiv/*` packages at the published range they name. Run from a checkout of Eloxiv, it adds no `@eloxiv/cli`.
|
|
124
|
+
|
|
125
|
+
`--registry` (recorded in `eloxiv.json`, which every later command reads; edit it there to change it) is a directory of built items, an https URL, or `npm:<package>`: that package's `r/` as the running CLI resolves it. The default from an installed CLI is `npm:@eloxiv/registry`, the registry's items published with the CLI (its dependency, every published version included), so `add`, `diff` and `update` need no network access and `eloxiv.json` names no path of one machine; a newer CLI brings newer items ([release.md](release.md)). From a checkout the default is Eloxiv's registry on GitHub (`https://raw.githubusercontent.com/eloxiv/eloxiv/main/registry/public/r`; `ELOXIV_REGISTRY_TOKEN` for a private repository). Next: `eloxiv add app`, then modules and, for a UI, their UI items (`eloxiv add hello hello-ui-foldkit`, which brings the shell, `shell-foldkit`; `pnpm run shell` starts its dev server). A headless app adds modules only.
|
|
126
|
+
|
|
127
|
+
`--preset` adds the items a kind of app starts from, as `eloxiv add` would (with their registry dependencies), and runs `pnpm install` unless `--no-install`:
|
|
128
|
+
|
|
129
|
+
| Preset | Items |
|
|
130
|
+
| --- | --- |
|
|
131
|
+
| `headless` | `app`: the server, no UI; add modules as the app grows |
|
|
132
|
+
| `web` | `app`, `shell-foldkit` (and `theme`): the server and the web shell |
|
|
133
|
+
| `desktop` | `app`, `shell-foldkit` (and `theme`), `desktop`: the server, the web shell and the Tauri host, which embeds the shell |
|
|
134
|
+
|
|
135
|
+
An unknown preset is refused before anything is created.
|
|
136
|
+
|
|
137
|
+
## add
|
|
138
|
+
|
|
139
|
+
```sh
|
|
140
|
+
eloxiv add <items...> [--overwrite] [--no-install]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Resolves the items and their registry dependencies (dependencies first), copies their files, merges their npm dependencies into `package.json`, records provenance, regenerates the composition files, prints each item's next steps and runs `pnpm install` (unless `--no-install`).
|
|
144
|
+
|
|
145
|
+
- Items already installed at the registry's current content are skipped, and so are app-owned (ejected) items.
|
|
146
|
+
- A file that already exists with different content is never overwritten unless you pass `--overwrite` (which replaces files wholesale). Every item is checked before any file is written, so a refused `add` writes nothing; an I/O failure part-way can still leave some files written.
|
|
147
|
+
- Item targets are normalised (`./src/a` is `src/a`). A target outside the app is refused, and so is any path that goes through a symbolic link inside the app (`add`, `update` and the files the CLI maintains never write or delete through one).
|
|
148
|
+
- npm dependencies the app's `package.json` lacks are added. One it already has at another version is your pin: it is kept, and `add` reports it.
|
|
149
|
+
- **pnpm patches** an item needs applied to a dependency (`meta.eloxiv.patchedDependencies`: `name@version` to one of the item's files) go to `pnpm.patchedDependencies` in `package.json`, so `pnpm install` applies each to that package wherever the app's dependency tree has it; the same rules as for npm dependencies apply (an entry the app already has for the package is the app's). The `app` item (from 0.7.0) carries one: `patches/@rocicorp__zero@1.11.3.patch`, zero-cache's socket handoff (backlog 23) and, from 0.9.0, its initial indexing status (backlog 33), until they are fixed upstream. Inside this repository's workspace pnpm reads only the root's patches (it warns that an example app's entry "will not take effect"); the root applies the same file.
|
|
150
|
+
- An installed item whose registry content changed is refused: use `eloxiv update`.
|
|
151
|
+
- A **retired** item is refused, with the reason and its replacement. A registry lists them in `deprecated.json` (`{ "<item>": { "version", "replacement", "reason" } }`); a retired item's last version stays published (versions are immutable), so an app that installed it keeps working: `diff` and `update` report it as deprecated, naming the replacement, and change nothing. Eloxiv's registry retired the React shell (`shell`, last 0.4.0) and its hello route (`hello-ui`, last 0.3.0) for the Foldkit shell (`shell-foldkit`) and `hello-ui-foldkit` (decision 10). **Updating never switches an app's shell**: no item an update brings in depends on the Foldkit shell unless the app already uses it (the desktop host, from 0.4.0, depends on no shell and embeds the app's own), so a React app updated stays a React app, building and showing its screens. Switching is the app's own step: `eloxiv add shell-foldkit` (or a Foldkit UI item, which brings it), then porting its screens; the desktop host embeds `shell-foldkit` once it is there (`ELOXIV_DESKTOP_SHELL=shell` keeps the React one meanwhile).
|
|
152
|
+
|
|
153
|
+
The lock entry records, per item: `registry` (the location in `eloxiv.json`), `registryVersion`, `contentHash` (sha256 over the item as published: files, dependencies and `meta.eloxiv`), `item` (the immutable path of that version, `<name>/<version>.json`), `files` (sha256 of each file **as published**), the item's `meta`, and `installedAt`. A file whose working copy hashes differently from its lock entry is a local edit.
|
|
154
|
+
|
|
155
|
+
## info
|
|
156
|
+
|
|
157
|
+
```sh
|
|
158
|
+
eloxiv info <item> [--version <v>] [--registry <dir-or-url>] [--json | --markdown]
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
`eloxiv info @eloxiv/<package>` instead describes a package the app has installed: its version, its entry points (`exports`), the names its main entry exports (following its own re-exports), and where its documentation is (its source's doc comments, searched with [`eloxiv docs search`](#docs)).
|
|
162
|
+
|
|
163
|
+
Otherwise it reads an item from the registry (the latest, or the immutable copy of `--version`) as data, without installing it or running any of its code: kind, version, content hash, description, the versions the registry has published (a directory registry; an `https` one cannot be listed), registry and npm dependencies, what it provides (connectors), the kernel modules it needs (modules), its skill name (skills), what the composition imports from it, each file it installs with its size, and its next steps. Run in an app, it reads the app's registry and says whether, at which version and by whom (registry or app) the item is installed; elsewhere, pass `--registry`. `--markdown` prints the same as a blueprint for a coding agent to apply (the command that installs or updates it, what it adds, needs and asks next).
|
|
164
|
+
|
|
165
|
+
## list
|
|
166
|
+
|
|
167
|
+
```sh
|
|
168
|
+
eloxiv list [--kind <kind>] [--json]
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Every installed item (or those of `--kind`): its kind, installed version, owner, the registry's latest version, how many of its files were edited or deleted, unresolved conflicts, and a status: `app-owned`, `conflicts` (recorded, or markers in its files), `update available`, `modified`, `up to date`, or `unknown` (the registry could not be read). `eloxiv list --kind skill` lists the app's skills.
|
|
172
|
+
|
|
173
|
+
## diff
|
|
174
|
+
|
|
175
|
+
```sh
|
|
176
|
+
eloxiv diff [items...] [--json] [--name-only]
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
For each installed item (all by default):
|
|
180
|
+
|
|
181
|
+
- **Local edits:** files whose working copy differs from the installed version (modified or deleted), with a unified diff from the installed version (`a/`, labelled `name@version`) to your file (`b/`, labelled `app`). If the registry no longer has the installed version, local edits are still listed by hash, without diffs. Files are compared as bytes; a binary file (not UTF-8, or holding NUL) is listed as modified, without a diff (`"binary": true`).
|
|
182
|
+
- **Upstream changes:** what the registry's latest version changed since the installed one: files added, removed or modified (with unified diffs), npm dependency changes, and registry dependencies added or removed.
|
|
183
|
+
- **Unresolved conflicts** from the last update, and app-owned items (not compared).
|
|
184
|
+
|
|
185
|
+
`--name-only` lists files without diffs. `--json` prints the report:
|
|
186
|
+
|
|
187
|
+
```json
|
|
188
|
+
{
|
|
189
|
+
"differences": true,
|
|
190
|
+
"items": [
|
|
191
|
+
{
|
|
192
|
+
"name": "hello", "kind": "module", "owner": "registry",
|
|
193
|
+
"installed": { "version": "0.1.0", "contentHash": "..." },
|
|
194
|
+
"latest": { "version": "0.2.0", "contentHash": "..." },
|
|
195
|
+
"conflicts": [],
|
|
196
|
+
"local": [{ "path": "modules/hello/server.ts", "change": "modified", "diff": "--- a/..." }],
|
|
197
|
+
"upstream": [{ "path": "modules/hello/contract.ts", "change": "modified", "diff": "--- a/..." }],
|
|
198
|
+
"dependencies": [{ "field": "dependencies", "name": "drizzle-orm", "from": "0.45.4", "to": "0.46.0" }],
|
|
199
|
+
"registryDependencies": { "added": [], "removed": [] },
|
|
200
|
+
"baseAvailable": true
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
`latest` is `null` when the registry no longer has the item. Exit code `1` when any item (other than app-owned ones) has local edits, upstream changes (files, npm or registry dependencies, or a new version) or unresolved conflicts; `0` otherwise.
|
|
207
|
+
|
|
208
|
+
## update
|
|
209
|
+
|
|
210
|
+
```sh
|
|
211
|
+
eloxiv update [items...] [--dry-run] [--json] [--no-install]
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Updates each installed item (all by default) to the registry's latest version with a **three-way merge per file**: the base is the installed version, *ours* is your file, *theirs* is the new version.
|
|
215
|
+
|
|
216
|
+
| Base → new version | Your file | Result |
|
|
217
|
+
| --- | --- | --- |
|
|
218
|
+
| changed | unchanged | **updated**: replaced with the new version |
|
|
219
|
+
| unchanged | changed | **kept**: your file stays |
|
|
220
|
+
| changed | changed differently | **merged** (line-based diff3) when the changes don't overlap; **CONFLICT** otherwise, written with markers |
|
|
221
|
+
| changed (binary) | changed differently (binary) | **CONFLICT** (binary): never line-merged; your file stays, the new version is written beside it as `<file>.upstream` |
|
|
222
|
+
| changed | changed to the same | **same**: nothing to do |
|
|
223
|
+
| added | absent (or identical) | **added** |
|
|
224
|
+
| added | an unrelated file at that path | **BLOCKED**: the item is not updated at all; move your file and run update again |
|
|
225
|
+
| removed | unchanged | **removed** |
|
|
226
|
+
| removed | changed | **kept**: no longer part of the item; it is now your own file |
|
|
227
|
+
| changed | deleted | **CONFLICT** (deleted locally): nothing written; restore it or leave it deleted |
|
|
228
|
+
| unchanged | deleted | stays deleted |
|
|
229
|
+
|
|
230
|
+
Files are read as bytes. A file is line-merged only when it is valid UTF-8 without NUL on every side; otherwise it is binary, compared byte for byte, and whichever side changed is taken byte for byte (both changed: the binary conflict above).
|
|
231
|
+
|
|
232
|
+
Then:
|
|
233
|
+
|
|
234
|
+
- **Registry dependencies** the new version needs and the app lacks are installed (as `add` does, with their own dependencies).
|
|
235
|
+
- **npm dependencies** are merged into `package.json`, once, for the item and the registry items installed with it: new ones are added; a version the item changed is updated if your `package.json` still has the installed version's, and kept (reported as `kept-local`) if it has any other; a registry item installed with the update never overrides a version `package.json` already has (reported with `"item"` naming it); a dependency the item dropped is removed if `package.json` still has the version the item asked for and no other installed item asks for it (`removed`), and otherwise reported and left in place (`no-longer-needed`: your pin, or something else needs it). **pnpm patches** (`pnpm.patchedDependencies`) merge the same way, the patch file going with the item's other files: kept while the item carries it, moved to a new file with it, removed when the item drops it (`packages/cli/test/zero-patch.test.ts`).
|
|
236
|
+
- **Provenance** moves to the new version: `registryVersion`, `contentHash`, `item`, per-file hashes (of the new version as published), `meta`, plus `updatedFrom` and `updatedAt`.
|
|
237
|
+
- **Composition files** are regenerated, and `pnpm install` runs if dependencies changed (unless `--no-install`).
|
|
238
|
+
|
|
239
|
+
`--dry-run` prints the same report (`would update`, `would add dependency`, ...) and writes nothing. Exit code `1` when an item has conflicts or is blocked.
|
|
240
|
+
|
|
241
|
+
A conflict looks like this (diff3 style, with the base in the middle):
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
the new version's lines
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Update refuses, with exit code `2`, when the registry no longer publishes the installed version (it cannot merge without the base), when the installed version's published content no longer matches the lock's hash, when the registry's latest has the installed version number but different content, when the latest differs from its own immutable copy, or when a path it would write or delete goes through a symbolic link.
|
|
248
|
+
|
|
249
|
+
**Not a transaction.** Every file of an item is planned and checked (blocked files, symbolic links) before any is written, but the writes themselves are ordinary file writes: an I/O failure part-way can leave an item partly updated. To keep that recoverable, an item's conflicts are recorded in the lock before any of its files is written, so an interrupted update leaves the item waiting for `update --continue`, never conflict markers the lock does not know about.
|
|
250
|
+
|
|
251
|
+
### Resolving conflicts
|
|
252
|
+
|
|
253
|
+
An update with conflicts still moves the item to the new version (every other file is updated), and records the conflicted files in the lock (`"conflicts": [{ "path": ..., "reason": "content" | "binary" | "deleted-locally" }]`). While they are recorded, `update` skips the item (reporting `unresolved conflicts`) and `diff` lists them. `update` also skips an item, the same way, when one of its locally edited files holds conflict markers that were never recorded.
|
|
254
|
+
|
|
255
|
+
1. Edit each conflicted file: keep what you want, remove the `<<<<<<<`, `|||||||`, `=======` and `>>>>>>>` lines. For a binary file, keep yours or replace it with `<file>.upstream`, then delete `<file>.upstream`. For a file deleted locally and changed upstream, restore it (from `eloxiv diff`'s upstream diff) or leave it deleted.
|
|
256
|
+
2. Run `eloxiv update --continue [items...]`. It checks that no conflicted file, and no locally edited file of the item whether recorded or not, still holds `<<<<<<<` or `>>>>>>>` markers, and that no `<file>.upstream` of a binary conflict is left (exit `1` and the list of files otherwise), and then clears the item's `conflicts`.
|
|
257
|
+
|
|
258
|
+
Nothing needs re-hashing: the lock's per-file hashes always describe the installed version **as published**, so a resolved file that differs from it simply shows up as a local edit in `eloxiv diff`, and the next update merges from there.
|
|
259
|
+
|
|
260
|
+
## restore
|
|
261
|
+
|
|
262
|
+
```sh
|
|
263
|
+
eloxiv restore <item> [paths...] [--dry-run]
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Writes an item's files back as its installed version has them: every file edited or deleted locally, or only `paths` (which must be the item's). The installed version is fetched again from the registry and checked against the lock's hash first. `--dry-run` lists what would be restored and writes nothing. Recorded conflicts stay recorded until `eloxiv update --continue`, which then finds the restored files without markers; after an update with conflicts, restoring a conflicted file takes the new version's.
|
|
267
|
+
|
|
268
|
+
## eject
|
|
269
|
+
|
|
270
|
+
```sh
|
|
271
|
+
eloxiv eject <items...> [--undo]
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Takes items over: the lock entry gets `"owner": "app"`, and from then on `diff` reports the item as app-owned without comparing it, `update` leaves it alone (`app-owned; not updated`), and `add` skips it. The files stay where they are and are yours to change, rewrite or replace. The provenance stays in the lock, so `eloxiv eject --undo <items...>` hands an item back: the next update merges from the version you ejected at.
|
|
275
|
+
|
|
276
|
+
**Optional UI items.** The shell (`shell-foldkit`: Foldkit, StyleX and Vite, decision 10) gets its screens from UI items: a UI item such as `hello-ui-foldkit` adds one file to `shell-foldkit/src/screens/` exporting `screen` (`defineScreen` from `shell-foldkit/src/screen.ts`: the manifest view it renders, its Model, Messages, update, view and Subscriptions, and the slots it shows), the shell discovers every file there when it is built (`import.meta.glob`), and a view an installed module declares gets a route and a link only when its screen is installed. A screen's slots show what other modules contribute to them (their manifests' `contributions`) when those modules' UI items are installed: `notes-ui-foldkit` puts notes' screen beside hello's greetings, and without it hello's screen shows nothing there. The reference screens of the kernel's own capabilities, `chat-ui-foldkit` and `approvals-ui-foldkit`, are UI items too: each asks for the kernel module it needs (`kernelModules`: the agent, the inbox), which the composition installs with its sync tables and queries; the chat still needs a model provider for the agent (its `next` step says how). One screen may claim the home route, `/` (`home: true`, a launcher), shown there in place of the shell's own list of modules. A module added without its UI item (`eloxiv add hello shell-foldkit`) assembles and builds with no route to its views; `packages/cli/test/shell-assemblies.test.ts` builds and typechecks both kinds of app.
|
|
277
|
+
|
|
278
|
+
**Replacing a UI item.** UI items are templates, never kernel code (no UI item depends on `@eloxiv/kernel` or writes outside the app): the kernel has no UI dependency, and the shell builds its navigation from the screens that are installed. To swap a registry screen for your own, eject the item and rewrite its file, for example `shell-foldkit/src/screens/hello.ts` from `hello-ui-foldkit` (keep the manifest view it renders). Your app keeps depending on the same `@eloxiv/kernel` version and no package changes; `packages/cli/test/shell-assemblies.test.ts` builds and typechecks such an app, and `registry-items.test.ts` replaces every UI item of the registry this way through the executable, leaving the kernel, the app's packages and the other items untouched. To drop a UI item entirely instead, delete its files and its entry from `eloxiv.lock.json` (a `remove` command does not exist yet).
|
|
279
|
+
|
|
280
|
+
## generate
|
|
281
|
+
|
|
282
|
+
```sh
|
|
283
|
+
eloxiv generate
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Regenerates, on Bun or Node:
|
|
287
|
+
|
|
288
|
+
1. **Each installed module's sync tables**, and each of the app's own modules' (`sync.tables` in the item's metadata, by default `sync.gen.ts` beside its `sync.ts`). The CLI imports the module's contract (so the app's dependencies must be installed), reads each entity's Drizzle table, and writes the module's Zero tables through its generator: drizzle-zero 0.21.0's programmatic conversion (the `schema.table` name, column renames, the type mapping, keys, and relationships from the Drizzle relations an entity names), corrected and checked by Eloxiv (a column is optional exactly when it admits NULL; enum values become literal types; a sharing attribute adds the `shares` relationship to the kernel's grants; a column sync cannot represent exactly, an entity without an organisation column, a relation to a table that does not sync, or two entities syncing under one name fail the command). When any of the module's actions declares an optimistic effect ([ModuleManifest](contracts/module-manifest.md#optimistic-effects)), the file also exports `mutators`: each such action's prediction over the module's tables, named like the action (an effect the manifest check refuses fails the command). An action declaring `optimistic.custom()` takes the module's own prediction from its `predictions.ts`, beside the generated file: the file exports `Predictions` (each such action's input and the synced tables of the entities it declares) to type it, and the command fails when the module has no `predictions.ts` ([Sync](contracts/sync.md#custom-predictions)). The file is static TypeScript with literal types, importing only `@eloxiv/client` (and, for its mutators, the module's own contract and, for custom predictions, its `predictions.ts`).
|
|
289
|
+
2. **The composition files** `eloxiv.modules.ts`, `eloxiv.server.ts`, `eloxiv.schema.ts` and `eloxiv.sync.ts` from the modules, connectors, skills and UI items in the lockfile, and [the app's own modules](#the-apps-own-modules). `eloxiv.server.ts` exports `modules` (the installed modules' server halves), `kernelModules` (the kernel-provided modules they ask for in `meta.eloxiv.kernelModules`, each once and in dependency order: `inbox` (`inboxModules`: work items, notifications, approvals, consent), `sharing` (which brings the inbox), `connections`, which any installed connector brings too, and `search`: `searchModule` and `ingestionModule`; a UI item or a space may ask too, for these and for `agent` (`agentModule`, which brings the inbox its consent needs) and `spaces` (`spacesModule`): the chat screen asks for the agent, a launcher for spaces), `connectors` (each connector item's `server` export) and `skills` (each skill item's `server` export, an app skill); the `app` item's `server/main.ts` installs `[...modules, ...kernelModules]`, `connectors` and `skills`. `eloxiv.sync.ts` composes the modules' generated tables, and those of each synced kernel-provided module installed (the inbox's work items, notifications and approval requests; the agent's conversations, messages and runs; spaces' grants and preferences, from `@eloxiv/client/sync`), into the app's sync schema (`schema`, typed `AppSchema`, so `connectSync({ schema, ... })` is a `SyncClient<AppSchema>`) and their named queries (`queries`, namespaced by module), and every module's mutators (`mutators`, named by action, for `connectSync({ mutators })` and `write`, see [Sync](contracts/sync.md#optimistic-writes)).
|
|
290
|
+
|
|
291
|
+
`add` and `update` rewrite the composition files only (a module's generated tables ship with the item, the way its migrations do); run `generate` after changing a module's `schema.ts` or entities, after editing the lockfile, or if a generated file was changed by hand. The kernel refuses to start with a sync schema that differs from what the generator writes for the installed entities ([Sync](contracts/sync.md), guarantee 6), so a stale or edited file is caught at startup.
|
|
292
|
+
|
|
293
|
+
## setup
|
|
294
|
+
|
|
295
|
+
```sh
|
|
296
|
+
eloxiv setup [--seed]
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Runs the app's server entry (`server/main.ts setup`, from the `app` item) on the CLI's runtime: kernel setup against `ELOXIV_DATABASE_URL`, as the role in `ELOXIV_ADMIN_DATABASE_URL`: the kernel's and modules' roles, schemas, and every pending migration, each checked before it runs and run as its module's owner ([Release](contracts/release.md)). Running it again changes nothing that is current. `--seed` also creates the demo organisation and users (`server/main.ts prepare`). A failed setup fails the command (exit `2`); its output is shown as it runs.
|
|
300
|
+
|
|
301
|
+
## doctor
|
|
302
|
+
|
|
303
|
+
```sh
|
|
304
|
+
eloxiv doctor [--json]
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
Checks the app's assembly and reports each check as `ok`, `warn`, `FAIL` or `skip` (it could not run, and why: a skipped check is never counted as passed):
|
|
308
|
+
|
|
309
|
+
| Check | Fails when |
|
|
310
|
+
| --- | --- |
|
|
311
|
+
| `runtime` | Node or Bun is older than Eloxiv supports |
|
|
312
|
+
| `config`, `lockfile` | `eloxiv.json` or `eloxiv.lock.json` cannot be read |
|
|
313
|
+
| `<item>: files` / `<item>: conflicts` | an item has unresolved conflicts, recorded or as markers in its files (a deleted file only warns; edits are reported) |
|
|
314
|
+
| `<item>: base` | the version the app installed is no longer published, or was published again with other content, so the next update could not merge from it (skipped when the registry cannot be read) |
|
|
315
|
+
| `composition` | `eloxiv.modules.ts`, `eloxiv.server.ts`, `eloxiv.schema.ts` or `eloxiv.sync.ts` is not what the generator writes for the installed items (run `eloxiv generate`) |
|
|
316
|
+
| `dependencies` | `package.json` lacks an npm dependency an installed item asks for (another version is the app's pin, and only warns) |
|
|
317
|
+
| `sync tables` | a module's `sync.gen.ts` is not what `eloxiv generate` writes from its Drizzle tables (skipped until the app's dependencies are installed) |
|
|
318
|
+
| `moved imports` | an app file still imports a module, export or stylesheet that an installed item's [compatibility migrations](#compatibility-migrations) moved (run `eloxiv migrate`; a namespace use such as `K.runServer` is named for you to change by hand) |
|
|
319
|
+
| `module boundaries` | a module, connector or skill loads another module's code other than its `contract.ts`, or uses a computed `import()` that cannot be checked |
|
|
320
|
+
| `sync engine` | any file of the app imports `@rocicorp/zero` directly (decision 9: sync only through `@eloxiv/client`) |
|
|
321
|
+
| `kernel in UI` | a shell or UI file imports `@eloxiv/kernel` (UI reaches the kernel through `@eloxiv/client`) |
|
|
322
|
+
| `ambient credentials` | module, connector or skill code reads `process.env`, `Bun.env`, `Deno.env` or `import.meta.env`: credentials and settings come scoped to an actor and organisation through Connections, Secrets and Settings (the shell's build-time `import.meta.env` is configuration and is not checked) |
|
|
323
|
+
| `secrets in source` | a private key or a provider token (OpenAI, Anthropic, Slack, GitHub, AWS, Google, an Eloxiv API token) is in the app's files, or an environment file (`.env`, `*.env`, not `*.example`) is tracked by git |
|
|
324
|
+
| `replication slots` | never fails; lists every inactive replication slot of the app's database (`ELOXIV_DATABASE_URL`, read with `psql`) and the WAL it holds back, and warns on one holding more than 1 GiB. A slot nobody reads keeps WAL without end: a development database's zero-cache slot once held 58 GB. The check gives the exact `SELECT pg_drop_replication_slot('<name>')` for each, to run only if nothing will read that slot again (a replica resumes from its slot); `mise run dev` names inactive slots in one line and drops none (skipped without `ELOXIV_DATABASE_URL` or `psql`) |
|
|
325
|
+
|
|
326
|
+
The guards (`module boundaries` to `secrets in source`) read each code file of the app's own source as a syntax tree, with no build, and what they cannot resolve fails: a load whose path is computed (a template with an expression, a variable, `require` taken as a value or aliased, `createRequire`), the environment reached through an alias or by a computed name on the global object (`globalThis[name]`), and a secret split across strings (constant concatenations are folded before they are checked). Comments and text in strings are never taken for code. They are an early warning; the database still enforces module isolation at run time.
|
|
327
|
+
|
|
328
|
+
Exits `1` when any check fails.
|
|
329
|
+
|
|
330
|
+
## clean
|
|
331
|
+
|
|
332
|
+
```sh
|
|
333
|
+
eloxiv clean [--yes]
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Lists the build outputs and caches the tools write again on demand: each installed shell's `dist/` and `node_modules/.vite`, the app's `node_modules/.vite` and `.eloxiv/tmp`, and each desktop host's Cargo `target/` beside its `Cargo.lock` (`desktop/src-tauri/target`, `desktop-rune/target`). With `--yes` it removes them (a symbolic link is removed, never followed). Source, data and the lockfile are never touched.
|
|
337
|
+
|
|
338
|
+
## Calling a kernel
|
|
339
|
+
|
|
340
|
+
The CLI is one of the kernel's surfaces: it signs a person in with the kernel's OAuth authorisation server ([MachineIdentity](contracts/machine-identity.md)) and invokes actions over the HTTP surface, through the same invocation path as every other surface. Calls are audited with surface `cli`: the CLI labels them with `x-eloxiv-surface: cli`, and the label grants nothing (identity comes from the token; any other label is ordinary `http`).
|
|
341
|
+
|
|
342
|
+
**Which kernel.** `--url <kernel>`, else `ELOXIV_URL`, else the kernel `login` last signed in to. The URL must be the kernel's `ELOXIV_BASE_URL`, since tokens are bound to it.
|
|
343
|
+
|
|
344
|
+
**Credentials.** A sign-in's access and refresh tokens are kept in the operating system's keychain: the macOS Keychain, Windows Credential Manager, or the Secret Service on Linux (GNOME Keyring, KWallet, KeePassXC), through [`@napi-rs/keyring`](https://github.com/Brooooooklyn/keyring-node) (2.1.2, pinned; the same binding under Node and Bun), under the service `eloxiv-cli` and an account naming the grant (the kernel's URL, `#mcp` added for an MCP grant) and the config directory. The rest of each sign-in (the registered client id, the expiry, the scope, and the kernel `login` last signed in to) is in `credentials.json` in the CLI's config directory: `ELOXIV_CONFIG_DIR`, else `$XDG_CONFIG_HOME/eloxiv`, else `~/.config/eloxiv` (`%APPDATA%\eloxiv` on Windows), always resolved to an absolute path, since it also names the lock and the keychain accounts (a relative `ELOXIV_CONFIG_DIR` is taken from the working directory; a relative `XDG_CONFIG_HOME` is ignored, as the XDG Base Directory specification asks). Where no keychain answers (headless Linux without a Secret Service, CI, a platform without a prebuilt binding) the tokens are kept in that file instead, and `login` says so and why. On Linux only the Secret Service counts: the kernel's keyutils keyring, the binding's other store, forgets everything at a reboot. `ELOXIV_CREDENTIAL_STORE` chooses: `auto` (the default) takes the keychain when one answers and the file otherwise; `keychain` requires the keychain (a command fails when none answers); `file` never touches it. Tokens an earlier CLI kept in the file move to the keychain on the next command that reads the credentials, and the file is rewritten without them (`Moved sign-in tokens from ... to ...` on standard error); a sign-in whose tokens are in the keychain is refused, saying so, by a command that cannot reach the keychain, rather than treated as signed out; `login` likewise refuses to replace it with a sign-in kept in the file (with `ELOXIV_CREDENTIAL_STORE=file`, or while the keychain is unavailable), since its grant would stay valid with nothing left naming it: unlock the keychain, or `logout` where it is available, first. Should that refusal come only after the person confirmed the code (another command signed in meanwhile), the grant the kernel just issued is revoked before `login` fails, and the message says whether that worked. Each keychain entry holds the grant's two tokens and the client they were issued to. Before the credentials are read or written, the config directory is made private: created with mode `0700`, tightened to `0700` when you own it and its group or others may use it, and refused (`... belongs to another user ...`) when another user owns it. The file is written through a new temporary file in that directory, created exclusively with mode `0600` and renamed over `credentials.json` (so it is `0600` also when it existed), and removed if the write fails. A command killed between writing that temporary file and renaming it leaves it behind, tokens included where they are kept in the file: the next write under the lock removes every such `credentials.json.<pid>.<hex>.tmp` file you own in the config directory (no other command is writing one then). On Windows these modes mean nothing: the directory and file keep the ACL they inherit from `%APPDATA%` (Node cannot set an owner-only ACL), which on a default installation already admits only you, SYSTEM and administrators; keep the keychain (Windows Credential Manager) in use there rather than the file. The CLI does not check or set that ACL: this is a known limit of the file fallback on Windows, including an `ELOXIV_CONFIG_DIR` in a shared location. Every change to the credentials (a refresh, a login, a logout) happens under a lock, `credentials.json.lock` (a directory, created atomically), after reading the file again: commands run at the same time refresh an expired sign-in once and the others use what it stored, since presenting one refresh token twice is reuse and ends the whole grant. The lock records its holder (a random token, the pid and the host). It is taken over only when its holder is gone: on the same host, when that pid no longer runs (a command suspended for any time keeps it); otherwise, or with no record yet, when it is older than a minute. A takeover moves the lock aside and checks by its token that it moved the lock it judged stale, putting back anything else; a command removes only a lock that is still its own. A command waits at most 90 s for the lock. Every request to a kernel gives up after 20 s. To use an API token instead (in CI, for a service principal), set `ELOXIV_TOKEN=elxk_...`; it takes precedence over a stored sign-in.
|
|
345
|
+
|
|
346
|
+
### login
|
|
347
|
+
|
|
348
|
+
```sh
|
|
349
|
+
eloxiv login --url https://app.example.com [--scope "action:hello.greet"]
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
Registers the CLI with the kernel as a public client (once per kernel; dynamic client registration), starts the device flow (RFC 8628) for the resource `<kernel>/api`, and prints:
|
|
353
|
+
|
|
354
|
+
```
|
|
355
|
+
To sign in, open https://app.example.com/oauth/device and enter the code BCDF-GHJK
|
|
356
|
+
or open https://app.example.com/oauth/device?user_code=BCDF-GHJK
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
Open the link in any browser, sign in, pick the organisation and allow. The CLI polls (respecting the interval and `slow_down`) and stores the tokens, saying where (`Tokens stored in the Secret Service (GNOME Keyring, KWallet)`, or the file and why no keychain is available). The token acts in the organisation you picked, and only as far as `--scope` allows (default `actions`: every action you may call). Access tokens last an hour; `call` refreshes them with the stored refresh token.
|
|
360
|
+
|
|
361
|
+
### logout
|
|
362
|
+
|
|
363
|
+
```sh
|
|
364
|
+
eloxiv logout [--url <kernel>]
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
Revokes the stored grant at the kernel (RFC 7009; its access and refresh tokens stop working) and removes it from both stores: the keychain and the credentials file. If it cannot be revoked (the kernel is unreachable, offers no revocation endpoint, or answers anything but `200`, a `503` included), the grant may still be valid: `logout` keeps the credentials, so it can be run again, and exits `2`. With the keychain in use, `logout` also revokes and removes a keychain entry for the kernel that the file no longer records; an entry that is not a pair of tokens is reported (the sign-in is kept, and `logout` exits `2`) rather than taken for a sign-out. A keychain entry the file does not record must name the client its tokens were issued to: one without (written by a development build of the keychain support) is left in place and reported, and `logout` exits `2`, since revoking it under another grant's client would revoke nothing while the kernel still answers `200`; revoke that sign-in on the kernel, then delete the entry by hand. Where the sign-in's tokens are in the keychain and this command cannot reach it, `logout` fails and keeps it. To forget a sign-in without revoking it, remove its entry from the file (and its keychain entry, `eloxiv-cli`). A sign-in whose keychain entry is gone (removed by hand) has nothing to revoke with: `logout` forgets it. `eloxiv mcp logout` does the same for the MCP grant.
|
|
368
|
+
|
|
369
|
+
A known limit: one key with a grant in both stores at once (tokens in the file and an older, different grant in the keychain) is not handled. Released CLIs keep tokens in the file only, and since the keychain support every command that writes one store moves or refuses the other, so only a development build of that support, never released, could leave both. The next command moves the file's tokens over the keychain entry, and `logout` then revokes only that grant; the older one stays valid until the kernel revokes it.
|
|
370
|
+
|
|
371
|
+
### whoami
|
|
372
|
+
|
|
373
|
+
```sh
|
|
374
|
+
eloxiv whoami [--url <kernel>] [--json]
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
The kernel, the credential in use (a `login`, with its scope, when its access token expires and where its tokens are kept, or `ELOXIV_TOKEN`), checked against the kernel first, and the organisations it acts for with your roles in each. Only a kernel that accepts the credential makes it succeed: a refused credential fails the command, and so does a kernel that could not answer (unreachable, or a 5xx), saying it could not check. The kernel lists organisations to a person's session; an OAuth grant acts in the organisation picked at consent and an API token in its own, so for those the kernel declines (401) and `organizations` is `null`; any other failure to read them fails the command.
|
|
378
|
+
|
|
379
|
+
### actions
|
|
380
|
+
|
|
381
|
+
```sh
|
|
382
|
+
eloxiv actions [--url <kernel>] [--json]
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
Lists the kernel's actions with their descriptions, from its OpenAPI document; `--json` adds each action's input schema. Signed in (or with `ELOXIV_TOKEN`), it lists only the actions you can reach: the kernel leaves out what its policy or your token's scope hides from you ([Invocation](contracts/invocation.md#reach)); a refused sign-in, or one that has ended (its refresh refused), fails the command (exit `2`), as `call` does: it never falls back to the whole catalogue. Not signed in, it lists every action.
|
|
386
|
+
|
|
387
|
+
### call
|
|
388
|
+
|
|
389
|
+
```sh
|
|
390
|
+
eloxiv call hello.greet --input '{"message":"Hello"}'
|
|
391
|
+
eloxiv call hello.greet --input @greeting.json --idempotency-key greet-2026-11-03
|
|
392
|
+
echo '{"message":"Hi"}' | eloxiv call hello.greet --input @-
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
Invokes the action with `POST /api/actions/<action>` and prints the result envelope as JSON: `{ "kind": "output", "output": ... }`, or `{ "kind": "replay", "receipt": ... }` when the idempotency key was already used with the same input. `--input` is JSON, `@<file>` or `@-` (standard input); default `{}`. `--org <id>` sends `x-eloxiv-org` (a sign-in acts only in the organisation picked at login, so another one is `Forbidden`). A refused or failed call prints the error (`{ "_tag": "Forbidden", ... }`) and exits `1`. If the access token is refused, `call` refreshes it once and retries; if the sign-in has ended, it asks you to log in again.
|
|
396
|
+
|
|
397
|
+
### agent
|
|
398
|
+
|
|
399
|
+
```sh
|
|
400
|
+
eloxiv agent "What is on my calendar tomorrow?" [--conversation <id>] [--url <kernel>] [--json]
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
Sends one message to your agent on the kernel (`POST /agent/messages`, the action `agent.send`: policy, consent, tool groups and budgets apply as on every surface) and follows the run over its event stream until it finishes: the answer is printed to standard output as it streams (or whole at the end), each tool call the agent makes on standard error (`tool: <name>`), and a call waiting for your consent is announced there too (answer it in the app). The last line on standard error names the run's outcome and the conversation to continue with `--conversation`. `--json` prints the run's outcome instead (`conversationId`, `runId`, `status`, `result`, `error`, `usage`, `steps`). Exits `1` when the kernel refuses the message (its error is printed) or the run does not succeed. Needs a credential that is not narrowed to some actions (the agent's routes refuse those): `eloxiv login` with its default scope, or a session token in `ELOXIV_TOKEN`.
|
|
404
|
+
|
|
405
|
+
## mcp
|
|
406
|
+
|
|
407
|
+
```sh
|
|
408
|
+
eloxiv mcp install [--url <kernel>] [--host claude,cursor,vscode|all] [--name <server>]
|
|
409
|
+
eloxiv mcp uninstall [--host ...] [--name <server>]
|
|
410
|
+
eloxiv mcp status [--url <kernel>] [--name <server>] [--json]
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
Coding agents reach the kernel's actions as MCP tools at `<kernel>/mcp`. `install` lists that endpoint, under `--name` (default: the name the kernel gives its MCP server at `GET /.well-known/mcp.json`, else, when the kernel does not answer within three seconds, the app's name in `eloxiv.json`, made the same way), in each host's project configuration, keeping every other server the file lists:
|
|
414
|
+
|
|
415
|
+
| Host | File | Entry |
|
|
416
|
+
| --- | --- | --- |
|
|
417
|
+
| `claude` (Claude Code, the default) | `.mcp.json` | `mcpServers.<name>: { "type": "http", "url": ... }` |
|
|
418
|
+
| `cursor` | `.cursor/mcp.json` | `mcpServers.<name>: { "url": ... }` |
|
|
419
|
+
| `vscode` | `.vscode/mcp.json` | `servers.<name>: { "type": "http", "url": ... }` |
|
|
420
|
+
|
|
421
|
+
No credential is written: the host signs the person in itself, through the kernel's OAuth authorisation server ([MachineIdentity](contracts/machine-identity.md): client registration, PKCE, a token bound to the MCP resource), so the agent may call what the person may, within the scope they allow. A file that is not a JSON object is refused and left as it is. `uninstall` removes only that server. `status` shows which hosts list it (and the URL each has) and whether the kernel serves MCP with OAuth there (its protected-resource metadata, RFC 9728). The CLI mints no tokens for this: MachineIdentity's management operations need a person's session, never a machine credential.
|
|
422
|
+
|
|
423
|
+
### mcp serve
|
|
424
|
+
|
|
425
|
+
```sh
|
|
426
|
+
eloxiv mcp login [--url <kernel>] # once: a grant for the kernel's MCP resource
|
|
427
|
+
eloxiv mcp serve [--url <kernel>]
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
For hosts that start MCP servers as local processes (stdio): each line on standard input is a JSON-RPC message, posted to `<kernel>/mcp` with the MCP grant `eloxiv mcp login` stored (the kernel takes for MCP only a token bound to its MCP resource, so the API sign-in of `eloxiv login` is never used; `eloxiv mcp logout` revokes the grant) or `ELOXIV_TOKEN`, refreshed once if refused; without one it refuses to start, since the device flow cannot run on the host's channel; each message the kernel answers (JSON, or each event of a stream) is written to standard output as one line. The session the kernel opens (`mcp-session-id`) is sent with every later request and ended when standard input closes. A request the kernel refuses outright (401, 403) is answered with a JSON-RPC error for its id, and the reason goes to standard error. A host configuration: `{ "command": "eloxiv", "args": ["mcp", "serve", "--url", "https://app.example.com"] }`. The tools are exactly the ones your credential reaches, through the same invocation path as every surface.
|
|
431
|
+
|
|
432
|
+
## Running an app
|
|
433
|
+
|
|
434
|
+
These commands run the app's own tools (`node_modules/.bin/<tool>`, so the versions are the ones the app pins); a missing tool is reported with what to install. The kernel runs on the CLI's runtime (Bun or Node); zero-cache always on Node (its SQLite binding needs it): with Bun, the first `node` on `PATH` that is not Bun's shim. zero-cache is `@rocicorp/zero` as the app installed it (its own dependency, else the one `@eloxiv/kernel` brings).
|
|
435
|
+
|
|
436
|
+
### dev
|
|
437
|
+
|
|
438
|
+
```sh
|
|
439
|
+
eloxiv dev [--no-shell]
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
Starts, until Ctrl-C or one of them exits (then the others are stopped too):
|
|
443
|
+
|
|
444
|
+
- the kernel with `server/main.ts prepare-and-serve` (setup, seed, serve) on `ELOXIV_PORT` (default 4100), trusting the shell's origin;
|
|
445
|
+
- zero-cache on `ELOXIV_ZERO_PORT` (default 4848; it also takes the port after it, for its change streamer) with [Eloxiv's sync settings](#start) and development's admin password, once the kernel serves (so on a new database, setup has made it first); its replica is `.eloxiv/zero/replica.db` (`ZERO_REPLICA_FILE`), its directory made if missing;
|
|
446
|
+
- the shell's Vite dev server on `ELOXIV_SHELL_PORT` (default 5173), pointed at both, when the app has `shell-foldkit` (not with `--no-shell`).
|
|
447
|
+
|
|
448
|
+
PostgreSQL is yours (`ELOXIV_DATABASE_URL`, `ELOXIV_ADMIN_DATABASE_URL`), with `wal_level=logical`. Ctrl-C stops every process it started and waits for them (exit 130). Inside the Eloxiv repository `mise run dev` does the same for the example app, with a managed PostgreSQL.
|
|
449
|
+
|
|
450
|
+
### build
|
|
451
|
+
|
|
452
|
+
```sh
|
|
453
|
+
eloxiv build [--kernel-url <url>] [--sync-url <url>]
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
The shell's production build (`vite build` in `shell-foldkit`, into `shell-foldkit/dist`), with the public URLs the deployed shell talks to compiled in: `--kernel-url` (else `VITE_ELOXIV_URL`, else `ELOXIV_BASE_URL`) and `--sync-url` (else `VITE_ELOXIV_SYNC_URL`, else `ELOXIV_ZERO_URL`). A headless app has nothing to build: Bun and Node run the server's TypeScript as it is.
|
|
457
|
+
|
|
458
|
+
### start
|
|
459
|
+
|
|
460
|
+
```sh
|
|
461
|
+
eloxiv start [kernel|zero|shell|setup] [--port <n>] [--kernel-url <url>] [--sync-url <url>]
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
One production process of the app; every [deployment recipe](#deploy) runs these four from one image. It runs in production only: `ELOXIV_ENV=production` or `NODE_ENV=production` (the recipes' image sets both); without either it refuses and points at `eloxiv dev`, and with `NODE_ENV=production` alone it passes `ELOXIV_ENV=production` on, so the kernel applies its production rules too.
|
|
465
|
+
|
|
466
|
+
| Role | Runs |
|
|
467
|
+
| --- | --- |
|
|
468
|
+
| `kernel` (default) | `server/main.ts`: every surface |
|
|
469
|
+
| `setup` | `server/main.ts setup`: roles, schemas and pending migrations ([Release](contracts/release.md)); the release step, run before kernels of a new version start |
|
|
470
|
+
| `zero` | zero-cache with Eloxiv's sync settings, derived from the kernel's environment (below) |
|
|
471
|
+
| `shell` | the built shell (`shell-foldkit/dist`) on `--port` (else `PORT`, else 8080), with its security headers |
|
|
472
|
+
|
|
473
|
+
**zero-cache's settings.** Every `ZERO_*` variable you set wins, except the two sync's guarantees rest on, which are always `ZERO_ENABLE_CRUD_MUTATIONS=false` (writes reach the database only through the kernel's actions) and `ZERO_APP_PUBLICATIONS=eloxiv_sync`. The rest default to: `ZERO_UPSTREAM_DB` the setup role (`ELOXIV_ADMIN_DATABASE_URL`) on the app's database (`ELOXIV_DATABASE_URL`'s), in UTC; `ZERO_QUERY_URL` and `ZERO_MUTATE_URL` the kernel's `/zero/query` and `/zero/mutate` at `ELOXIV_KERNEL_INTERNAL_URL` (else `ELOXIV_BASE_URL`); `ZERO_MUTATE_API_KEY` and `ZERO_QUERY_API_KEY` `ELOXIV_ZERO_API_KEY` (the kernel's too: only a call carrying it is taken as zero-cache's, with the client group and user it names, and only such a push records its client group, [Privacy](contracts/privacy.md); outside production a development key); `ZERO_APP_ID` `ELOXIV_ZERO_APP_ID` (default `zero`, the kernel's default too); `ZERO_PORT` `ELOXIV_ZERO_PORT` (default 4848); `ZERO_REPLICA_FILE` `.eloxiv/zero/replica.db` in the app (set it to a persistent volume in production); the allowed client headers the kernel reads; `ZERO_AUTH_REVALIDATE_INTERVAL_SECONDS=10` (how long a signed-out session's replica may keep receiving rows, [Sync](contracts/sync.md)); the query planner and telemetry off. In production (`ELOXIV_ENV=production` or `NODE_ENV=production`), `ZERO_ADMIN_PASSWORD` and `ELOXIV_ZERO_API_KEY` are required and zero-cache does not start without them.
|
|
474
|
+
|
|
475
|
+
**The shell's headers.** Every response carries a Content-Security-Policy (`default-src 'self'`; scripts only from the shell's origin; `connect-src` the kernel and sync, `wss:` included; `frame-src` the kernel, for MAKE views; `frame-ancestors 'none'`; `object-src 'none'`), `X-Content-Type-Options: nosniff`, `Referrer-Policy: strict-origin-when-cross-origin`, `Cross-Origin-Opener-Policy: same-origin`, a restrictive `Permissions-Policy` and HSTS; Vite's content-hashed `/assets/` are cached for a year (`immutable`), everything else `no-cache`. Any other path without an extension serves `index.html` (the shell routes on the client); a missing file with an extension is 404; dot files, paths out of `dist` and symbolic links out of it are never served. Behind your own CDN or proxy, copy these headers there.
|
|
476
|
+
|
|
477
|
+
The CLI stops the process it started on Ctrl-C or SIGTERM (as a container stop sends) and waits for it.
|
|
478
|
+
|
|
479
|
+
### typecheck
|
|
480
|
+
|
|
481
|
+
```sh
|
|
482
|
+
eloxiv typecheck
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
`tsc --noEmit` over the app's `tsconfig.json`, then the shell's (`shell-foldkit/tsconfig.json`), with the app's own TypeScript. Exits `1` when either fails.
|
|
486
|
+
|
|
487
|
+
## Deploying
|
|
488
|
+
|
|
489
|
+
Eloxiv runs as long-running processes beside PostgreSQL (decisions.md, "Hosting": a long-running server per deployment, self-hosted, Railway or Fly; sync needs long-running processes, so serverless and edge hosts are not targets). A recipe writes the files for one host into the app; you review them, commit them and deploy with the host's own tools. **The CLI never builds, pushes, publishes or deploys anything.**
|
|
490
|
+
|
|
491
|
+
### deploy
|
|
492
|
+
|
|
493
|
+
```sh
|
|
494
|
+
eloxiv deploy docker|fly|railway [--dry-run] [--overwrite]
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
Every target writes `deploy/Dockerfile` (one image for every role: Node 24 with Bun, `pnpm install --frozen-lockfile`, `eloxiv build` with the URLs passed as build arguments when the app has a shell; `ELOXIV_ENV=production` and `NODE_ENV=production`), `.dockerignore` (which keeps every environment file at any depth, `.env`, `.env.*`, `*.env`, and `.npmrc` out of the build context, so out of every image; a private registry's `.npmrc` reaches `pnpm install` only as the build secret `npmrc`, mounted for that step alone) and `deploy/env.example` (every variable a production deployment sets, which role reads it and which are secrets; no secret has a value), plus:
|
|
498
|
+
|
|
499
|
+
| Target | Files | Shape |
|
|
500
|
+
| --- | --- | --- |
|
|
501
|
+
| `docker` | `deploy/compose.yaml` | Services `setup` (runs once; the others wait for it to complete), `kernel` (healthcheck on `/ready`), `zero` (a named volume for its replica, reaching the kernel inside the network), `shell`. Only `setup` and `kernel` read the whole `deploy/.env`; `zero` gets just its role's variables and `shell` only `ELOXIV_BASE_URL`, `ELOXIV_ZERO_URL` and its port, so the static shell never holds a database URL, a secret or a key. A private registry: `NPMRC_FILE=~/.npmrc` before `docker compose`. PostgreSQL is yours |
|
|
502
|
+
| `fly` | `deploy/fly/kernel.toml`, `zero.toml`, `shell.toml` | One Fly app per role, each built from the one Dockerfile (with the shell's URLs as build arguments when the app has a shell); set each app only its role's secrets. The kernel's `release_command` runs setup before new machines start; zero mounts the `zero_replica` volume and reaches the kernel over the private network; nothing scales to zero (sync and the kernel hold long-lived connections) |
|
|
503
|
+
| `railway` | `deploy/railway/kernel.json`, `zero.json`, `shell.json` | Railway config-as-code per service: the kernel's `preDeployCommand` runs setup, its healthcheck is `/ready`; give zero a volume at `/data` |
|
|
504
|
+
|
|
505
|
+
The app needs `@eloxiv/cli` in its `package.json`: the recipes run its built entry on Bun (`bun node_modules/@eloxiv/cli/dist/bin.js start <role>`), so the kernel runs on Bun and zero-cache on the image's Node. A file that exists with other content (your edits) is never replaced without `--overwrite`: the whole write is refused, nothing written. `--dry-run` lists what would be created, replaced or left unchanged and writes nothing. After writing, the command prints the next steps for the host (creating apps and volumes, setting secrets, the deploy command); it runs none of them.
|
|
506
|
+
|
|
507
|
+
### deploy check
|
|
508
|
+
|
|
509
|
+
```sh
|
|
510
|
+
eloxiv deploy check [--env-file <file>] [--json]
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
The production environment (the process's, with a dotenv file over it) checked before a deploy. Fails on: a placeholder left from `env.example`; `ELOXIV_ENV` not `production`; `ELOXIV_BASE_URL` not `https`; `ELOXIV_AUTH_SECRET` unset, shorter than 32 characters or the development default; `ELOXIV_MAKE_ROLE_KEY` unset; `ELOXIV_TRUSTED_ORIGINS` unset or holding a non-`https` origin (`tauri://localhost` and `http://tauri.localhost` aside); `ZERO_ADMIN_PASSWORD` unset; with a shell, `ELOXIV_ZERO_URL` not `https`; a database URL on the wrong kind of endpoint ([db check](#db-check)); no `server/main.ts`; no `@eloxiv/cli` in `package.json`. Warns on `ELOXIV_SECRETS_KEYS` unset. Exits `1` when a check fails.
|
|
514
|
+
|
|
515
|
+
## Database hosts
|
|
516
|
+
|
|
517
|
+
Setup's admin connection and zero-cache's replication need real sessions on the database itself (session advisory locks, owner logins, logical replication), so neither may go through a transaction pooler or a proxy that pools; the kernel's runtime connection may use a session pooler ([Release](contracts/release.md), "Database hosts").
|
|
518
|
+
|
|
519
|
+
### db host
|
|
520
|
+
|
|
521
|
+
```sh
|
|
522
|
+
eloxiv db host neon|supabase|rds|azure|cloud-sql|postgres [--json]
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
Prints the provider's recipe: what to enable before setup runs (logical replication and its settings, the role's attributes), which endpoint each URL uses (`ELOXIV_ADMIN_DATABASE_URL`, `ELOXIV_DATABASE_URL`, `ZERO_UPSTREAM_DB`), the environment it needs (Neon: `ELOXIV_DATABASE_ROLE_PASSWORDS=plaintext`, the operator's choice) and its caveats. Neon (in CI's `live postgres (neon)` job) and plain PostgreSQL are proven end to end; the Supabase, RDS, Azure and Cloud SQL recipes follow the providers' documentation and say so: check the role with `--live` first.
|
|
526
|
+
|
|
527
|
+
### db check
|
|
528
|
+
|
|
529
|
+
```sh
|
|
530
|
+
eloxiv db check [--env-file <file>] [--live] [--json]
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
Classifies each URL by its host and port, without connecting: Neon direct or `-pooler` (transaction mode), Supabase direct, Supavisor session (5432) or transaction (6543) mode, RDS instance or RDS Proxy, Azure direct or its PgBouncer (6432), Cloud SQL's Auth Proxy (`?host=/cloudsql/...`: it tunnels sessions, so it is allowed everywhere), and anything else (6432 taken for PgBouncer). A pooler or proxy where a session is needed fails, naming the endpoint to use; a hosted database without `sslmode=require` (or stricter) warns. `ZERO_UPSTREAM_DB` defaults, as `eloxiv start zero` does, to the admin URL. `--live` also queries the host through `ELOXIV_ADMIN_DATABASE_URL` with `psql` (read only): `wal_level=logical`, room for replication slots and senders, PostgreSQL 15 or later, the setup role's `CREATEROLE`, `CREATEDB`, `BYPASSRLS` and `pg_authid` read access (or a superuser), and whether it may replicate. An unreachable host fails; it is never reported as passed.
|
|
534
|
+
|
|
535
|
+
### db (development administration)
|
|
536
|
+
|
|
537
|
+
```sh
|
|
538
|
+
eloxiv db schemas [--json]
|
|
539
|
+
eloxiv db tables [schema] [--json]
|
|
540
|
+
eloxiv db rows <schema>.<table> [--limit 20]
|
|
541
|
+
eloxiv db sql "<sql>" [--write]
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
Browse a development database: its schemas (the kernel's, Better Auth's, each module's) with their owners, tables with their row estimates and whether row-level security is on, a table's rows as JSON (at most 1000), and SQL with `psql`'s output. It connects as the setup role (`ELOXIV_ADMIN_DATABASE_URL`) to the app's database (`ELOXIV_DATABASE_URL`'s), so it reads past row-level security: a developer's tool, which is why it refuses anything that may be a deployment. **Refused:** production, `ELOXIV_ENV=production` or `NODE_ENV=production`, always; and a database on any host but this machine (`localhost`, `127.0.0.1`, `::1`, a Unix socket) unless `ELOXIV_DB_ADMIN=development` declares the remote one a development database (a Neon branch, a shared development server). SQL runs in read-only transactions unless `--write`: a rail against accidents, not a boundary, since whoever runs it holds the setup role's URL already.
|
|
545
|
+
|
|
546
|
+
## docs
|
|
547
|
+
|
|
548
|
+
```sh
|
|
549
|
+
eloxiv docs search "resource pack conflict" # the best 5 sections, and the best 5 source lines
|
|
550
|
+
eloxiv docs search defineAppSkill --in source --limit 3 # only the app's installed packages
|
|
551
|
+
eloxiv docs search "sharing link" --in docs --json # as data, for a coding agent
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
Bounded, version-matched answers for a coding agent (or a person), from two sources (`--in docs|source|all`, default `all`), each giving at most `--limit` results (default 5, at most 20), never the whole corpus:
|
|
555
|
+
|
|
556
|
+
- **The framework's documentation as it shipped with this CLI** (contracts, the CLI, the scaffold and guides; not research notes, spikes or the build's progress log): the package carries it in `dist/docs/`, copied at build, so the answer matches the installed release (run from the Eloxiv repository, it reads `docs/`). Each answer is a section: its page, the line it starts on, its heading and an excerpt of at most 320 characters. Ranking prefers sections with every word of the query, then how often they appear (a heading counts more), a little less for very long sections.
|
|
557
|
+
- **The source of the `@eloxiv` packages the app installed** (`--cwd`), at the versions it runs: each package's `src/` (its doc comments), its README and `@eloxiv/contracts`' published schemas, tests excluded. A file must contain every word; lines are ranked by how many words they hold, declarations and headings first; at most two per file, each three lines with its `package@version file:line`.
|
|
558
|
+
|
|
559
|
+
`--json` prints `{ version, root, docs: [{ path, line, heading, excerpt, score }], source: [{ package, version, file, line, excerpt, score }] }`.
|
|
560
|
+
|
|
561
|
+
## Compatibility migrations
|
|
562
|
+
|
|
563
|
+
A registry item's version can declare what it moved, so apps that import it keep building after `eloxiv update`. In the item's `meta.eloxiv`:
|
|
564
|
+
|
|
565
|
+
```json
|
|
566
|
+
"migrations": [{
|
|
567
|
+
"since": "0.5.0",
|
|
568
|
+
"note": "greetPerson takes the person's id, not their name",
|
|
569
|
+
"moves": [
|
|
570
|
+
{ "from": "./modules/hello/contract.ts", "symbol": "greet", "to": "./modules/hello/api.ts", "as": "greetPerson" },
|
|
571
|
+
{ "from": "@eloxiv/kernel", "symbol": "runServer", "to": "@eloxiv/kernel/runtime/bun" },
|
|
572
|
+
{ "from": "./shell-foldkit/src/old.css", "to": "./shell-foldkit/src/theme.css" }
|
|
573
|
+
]
|
|
574
|
+
}]
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
Files are parsed (Babel's parser, with TypeScript and JSX), and only real import and export declarations are rewritten; a file that does not parse is left as it is and reported. Symbolic links are never followed or written through, so a linked shared directory is never another checkout's files changed. A move names a module, as `./` and a path from the app's root or a package specifier, and optionally one export of it (`symbol`); `to` is where it now lives and `as` its new name. `update` applies the migrations of every version it moves an item past (`since` after the installed version, up to the new one) to the app's own files (not the files the update itself writes, nor the composition files): an import of a moved module is pointed at the new one (with its extension as `to` writes it), a moved export is imported from its new module **under its old local name** (`import { greetPerson as greet } from "../hello/api.ts"`), so no other line of the file changes, re-exports likewise, and a stylesheet's `@import` follows its file. What cannot be rewritten safely, a namespace import's uses of a moved export (`K.runServer`), is reported as `MANUAL` and makes the update exit `1`. The report lists each change (`migrated file:line ...`, or `would migrate` with `--dry-run`, which writes nothing) and each `note`, the part a person or agent must still do.
|
|
578
|
+
|
|
579
|
+
### migrate
|
|
580
|
+
|
|
581
|
+
```sh
|
|
582
|
+
eloxiv migrate [items...] [--dry-run] [--json]
|
|
583
|
+
eloxiv migrate [items...] --dossier
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
Applies every migration of the installed items up to their installed versions to the app's own files again, for code written since (from older documentation, or merged from a branch); applying them twice changes nothing. Exits `1` when a change is left for you. `eloxiv doctor` fails (`moved imports`) while any file needs it.
|
|
587
|
+
|
|
588
|
+
`--dossier` prints a migration dossier in Markdown, for a person or a coding agent to carry the app to the registry's latest versions, and writes nothing: a table of every item (installed and latest versions, local edits, upstream changes, likely conflicts), then per item with an update, what upstream changed (files, npm and registry dependencies), your local edits and which of them upstream also changed (where the line merge may conflict), the compatibility migrations between the two versions with their notes, the files of yours that use what moves, and the steps in order (`update --dry-run`, `update`, resolving conflicts, `update --continue`, finishing what is left by hand, `migrate`, `generate`, `doctor`, `typecheck`).
|
|
589
|
+
|
|
590
|
+
## blueprint
|
|
591
|
+
|
|
592
|
+
```sh
|
|
593
|
+
eloxiv blueprint connector --name <name> --provides MailProvider[,CalendarProvider,...]
|
|
594
|
+
eloxiv blueprint channel --name <name>
|
|
595
|
+
eloxiv blueprint action --module <module> --name <action>
|
|
596
|
+
eloxiv blueprint module --name <module>
|
|
597
|
+
eloxiv blueprint make --name <module>
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
Prints Markdown instructions for a coding agent to write that kind of code in this app, and writes nothing. A connector's blueprint lists every operation of each capability contract it implements as the app's installed `@eloxiv/contracts` publishes it (so it matches the version the app runs), the files and the `defineConnector` fields (OAuth from `ELOXIV_CONNECTOR_<NAME>__<KEY>` settings, `identify`, `apiOrigins`, `classify`, each capability's `scopes` and `make` over the kernel's authorised HTTP), and how to prove it (a protocol fake and the contract's conformance kit from `@eloxiv/testing`). A channel is a Messaging connector with an Ingress source. An action's covers its contract definition, handler, Cedar permit, migration and eval case, and says when the module does not exist yet; a module's, its tables, contract, policy, migrations, server half, named queries and skills; a MAKE module's, the draft (manifest, policy, capability profile, migrations, sandboxed code) and its lifecycle. The registry's own items are the worked examples each points to (`eloxiv info <item> --markdown`).
|
|
601
|
+
|
|
602
|
+
## changelog
|
|
603
|
+
|
|
604
|
+
```sh
|
|
605
|
+
eloxiv changelog add added|changed|deprecated|removed|fixed|security <text...>
|
|
606
|
+
eloxiv changelog release <version> [--date YYYY-MM-DD]
|
|
607
|
+
eloxiv changelog list [--version <v>] [--json]
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
The app's release notes in `CHANGELOG.md`, in the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) form. `add` puts an entry under `[Unreleased]` (created when missing) in its type's section. `release` turns Unreleased into `[<version>] - <date>` (today by default) and sets `package.json`'s `version`, which the app's build can advertise ([Release](contracts/release.md): `ELOXIV_APP_VERSION`); it refuses an empty Unreleased and a version that is not newer than the last release. `list` prints the releases (or one) with their entries.
|
|
611
|
+
|
|
612
|
+
## eval
|
|
613
|
+
|
|
614
|
+
```sh
|
|
615
|
+
eloxiv eval [--module <m>]... [--model <provider>:<model>] [--repeat <n>] [--permission <p>]... [--database <name>]
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
Runs the app's module skills' eval cases (`skills.<id>.evals` in a module's contract, a `SkillEvals` JSON file: [AgentRuntime](contracts/agent-runtime.md)) through the real agent runtime on a real kernel, on a scratch database (`--database`, default `eloxiv_evals`) dropped before and after each run, and scores each skill against its threshold. A case sends its prompt as a new member, follows the run, then checks the tool calls (in order), the tools it must not call, the answer, and the state left in published query views. `--model` (else `ELOXIV_EVAL_MODEL`) picks the model: unset or `scripted`, the scripted provider plays each case's `script` (a regression test of the harness and runtime, as in CI); `gateway:<model>` the Vercel AI Gateway (`AI_GATEWAY_API_KEY`); `<provider>:<model>` the AI SDK package `@ai-sdk/<provider>` with its usual key. `--permission` gives every evaluator a module permission its skills need; `--repeat` runs the suite several times. Needs `@eloxiv/testing` in the app's devDependencies (the runner) and PostgreSQL (`ELOXIV_ADMIN_DATABASE_URL`). Exits `1` when a skill is below its threshold.
|
|
619
|
+
|
|
620
|
+
### eval promote
|
|
621
|
+
|
|
622
|
+
```sh
|
|
623
|
+
eloxiv eval promote <run> --name <case> --prompt "<the case's prompt>" \
|
|
624
|
+
--allow-tool notes_write,query --allow-view notes.recent --keep-input notes_write.title \
|
|
625
|
+
[--answer-includes noted] [--forbid people_delete] [--into modules/notes/skills/reading.evals.json --reviewed] [--url <kernel>]
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
Turns a finished run of your agent (`eloxiv agent` prints its id) into an eval case, without taking production data with it. It reads the run's events from the kernel as you (so only your own runs), and keeps only what you name: the prompt is the one you give (at most 2000 characters; the person's own words are never copied); the run may have called only the tools `--allow-tool` lists, and read only the query views `--allow-view` lists; a call's input keeps only the fields `--keep-input` names (`<tool>.<field>`; the `query` tool keeps its `view`), and what was dropped is printed; the answer is checked only for the words `--answer-includes` gives. A run that did not succeed, or that called a tool or read a view not allowed, is refused, with every reason. The case's `script` replays the calls with the kept inputs, for the scripted provider: review it, since a dropped field may be one the action needs. Without `--into` the case is printed; with it, the case is added to that skill eval file only with `--reviewed` (your statement that you reviewed the prompt, the allowlists and the kept inputs), never replacing a case of the same name.
|
|
629
|
+
|
|
630
|
+
## agent-web
|
|
631
|
+
|
|
632
|
+
```sh
|
|
633
|
+
eloxiv agent-web generate [--config agent-web.json] [--out <dir>] [--dry-run] [--overwrite]
|
|
634
|
+
eloxiv agent-web audit <url> [--config agent-web.json] [--json]
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
Public, agent-readable pages for an app's website, from its own config, `agent-web.json`:
|
|
638
|
+
|
|
639
|
+
```json
|
|
640
|
+
{
|
|
641
|
+
"site": "https://acme.example",
|
|
642
|
+
"kernel": "https://api.acme.example",
|
|
643
|
+
"name": "Acme Desk",
|
|
644
|
+
"description": "Help desk software for small teams.",
|
|
645
|
+
"pages": [
|
|
646
|
+
{ "path": "/", "title": "Acme Desk", "description": "What it is", "markdown": "content/home.md" },
|
|
647
|
+
{ "path": "/guides/setup", "title": "Set up", "description": "First steps", "group": "guides", "type": "Article" }
|
|
648
|
+
],
|
|
649
|
+
"crawlers": { "disallow": ["/drafts/"], "aiTraining": false },
|
|
650
|
+
"publicTools": []
|
|
651
|
+
}
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
`generate` writes into the shell's public directory (`shell-foldkit/public`, else `public`, or `--out`): `robots.txt` (the app's own areas, `/api/`, `/mcp`, `/auth/`, `/oauth/`, `/rpc`, `/zero/`, `/connections/`, `/ingress/`, always disallowed, plus yours; AI training crawlers such as GPTBot, Google-Extended and CCBot refused unless `aiTraining`; the sitemap named), `sitemap.xml` (an index) with one `sitemap-<group>.xml` per page group, `llms.txt` (the site, each page linked to its Markdown mirror when it has one, and the tools), each page's Markdown mirror at `<path>.md` (`/index.md` for `/`), and each page's JSON-LD in `jsonld/<page>.json` (schema.org `WebPage` or the page's `type`, part of the `WebSite`), to put in that page's `<head>`. The site must be `https`; a page in the app's own areas is refused. Generated files follow the same rules as [deploy](#deploy): never replacing your edits without `--overwrite`, nothing written with `--dry-run`.
|
|
655
|
+
|
|
656
|
+
**A public page never implies public tool access.** The kernel serves its MCP tools to signed-in clients only (MachineIdentity's OAuth), and `llms.txt` says so; a tool is listed as public only when `publicTools` names it, and the audit holds the deployment to that list.
|
|
657
|
+
|
|
658
|
+
`audit` checks a deployed site, fetching only its origin and the kernel's (at most 50 pages, each within 10 s and 1 MiB, redirects never off those origins): `robots.txt` served and disallowing the app's areas, and naming the sitemap; `sitemap.xml` and its group sitemaps served, listing only the site's own URLs, and every page answering 200 (a page without JSON-LD warns; one whose JSON-LD does not parse fails); `llms.txt` served, and each Markdown mirror it links served as Markdown, not the shell's HTML fallback; and the tools `<kernel>/mcp` lists to a client with no credential, asked as an MCP client must (`initialize`, `notifications/initialized`, then `tools/list` in the session it opened): refused (401 or 403) passes when no tool is declared public; a listing that does not succeed (another status, a JSON-RPC error such as a missing session, no `tools` in the result) fails, never taken for an empty list; offering tools fails unless they are exactly the declared ones (with `--config`, `publicTools`, and those `llms.txt` lists). Exits `1` when a check fails.
|
|
659
|
+
|
|
660
|
+
## brand
|
|
661
|
+
|
|
662
|
+
```sh
|
|
663
|
+
eloxiv brand extract <sources...> [--out <file>] [--overwrite] [--json]
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
Reads a brand's colours, fonts and design tokens from websites, stylesheets (CSS, SCSS, Less), HTML, a Tailwind config (`tailwind.config.{js,cjs,mjs,ts}`: its colours and `fontFamily`), design-token JSON (W3C `$value`s) or a whole directory, and proposes overrides for the app's theme ([ThemeTokens](contracts/theme-tokens.md)): `primary` (a custom property named like primary or brand, else the page's `theme-color`, else the most used colourful colour), its `ring` and sidebar variants, a `primary-foreground` of white or near black, whichever reads better, with the contrast measured (AA is 4.5:1), and the sans and mono font stacks. It prints every colour found (normalised to `#rrggbb`, or `oklch(...)` as written) with how often it occurs and which custom properties hold it, the fonts (Google Fonts links included), and the proposal; `--out` also writes the whole report as JSON into the app. It changes no theme: the app owns `themes/<name>/tokens.ts`, applies what it accepts and regenerates the theme's CSS and StyleX module.
|
|
667
|
+
|
|
668
|
+
Reading is bounded. A website must be `https` (or `http` on `localhost`); the page and at most 10 stylesheets it links are read, each at most 1 MiB and 10 s, redirects followed only to `https`; a stylesheet over the limit is skipped and listed as such. Files: at most 500 under the path given, each at most 1 MiB, never in `node_modules`, `dist` or `.git`, never through a symbolic link.
|
|
669
|
+
|
|
670
|
+
## skills
|
|
671
|
+
|
|
672
|
+
```sh
|
|
673
|
+
eloxiv skills link # every skills/<name>/ into .claude/skills and .agents/skills
|
|
674
|
+
eloxiv skills link --host claude # one host
|
|
675
|
+
eloxiv skills unlink # remove what link wrote
|
|
676
|
+
eloxiv skills ensure # every skill linked and current; exits 1 otherwise (--fix links again)
|
|
677
|
+
eloxiv skills link --mcp # also list the app's kernel as an MCP server, for skills that work through it
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
Coding agents load a project's skills from their own directories (Claude Code from `.claude/skills/`, Codex from `.agents/skills/`), each a `SKILL.md` that starts with YAML frontmatter naming the skill and saying what it is for. `link` writes each of the app's skills (`skills/<name>/SKILL.md`, from registry `skill` items or `plugin import`) there in that form: the name, the description from its `skill.ts` (else the document's first paragraph), a line marking the file as generated, then the document. The skill's Markdown and text references are copied beside it, so its relative links resolve in the host. The app's `skills/` stays the one to edit; linking again refreshes the copies and removes those whose skill is gone. A host skill without the mark is the person's own and is never overwritten or removed (`link` reports it as kept); `unlink` removes only marked copies.
|
|
681
|
+
|
|
682
|
+
`ensure` checks that every skill is linked and current in each host, and reports what is missing, out of date or kept; it exits 1 then, so a script or CI step can require it (`--fix` links again first). A skill that works through the app (its kernel's actions over MCP) needs the app's MCP server in the host too: `link --mcp` lists it as `eloxiv mcp install` does (no credential; the host signs the person in through the kernel's OAuth), and `ensure --mcp` requires it. The app itself runs with `eloxiv dev`. The registry's framework skills (`eloxiv-module`, `eloxiv-action`, `eloxiv-policy`, `eloxiv-connector`, `eloxiv-view`) are what a coding agent building the app reads: `eloxiv add eloxiv-module`, then `eloxiv skills link`.
|
|
683
|
+
|
|
684
|
+
## plugin
|
|
685
|
+
|
|
686
|
+
```sh
|
|
687
|
+
eloxiv plugin import ../review-kit # skills, and its MCP servers for every host
|
|
688
|
+
eloxiv plugin import ../review-kit --host claude --dry-run
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
Imports a coding-agent plugin in the standard layout (Claude Code's): `.claude-plugin/plugin.json` (its `name` in kebab case, its `version` a semantic version: anything else is refused and nothing is written), `skills/<skill>/SKILL.md` (frontmatter with `name` and `description`) and `.mcp.json` (`mcpServers`).
|
|
692
|
+
|
|
693
|
+
- **Skills** become app skills named `<plugin>-<skill>` in `skills/`, **for development only** (`audience: "development"`: coding agents read them, through `eloxiv skills link`; the app's own agent is never given them), and **inert**: the document and the skill's Markdown and text references are copied, nothing else (no script, binary or dotfile), and only files that are inside the plugin's directory (a symbolic link, or anything whose real path is outside the plugin, is refused and reported). Nothing from the plugin goes into the generated `skill.ts` as code or in a comment (its name is checked kebab case, its description is a JSON string literal); where it came from is recorded as data (`plugin.json`: the plugin, its version, each file's hash). A skill directory already there that the same plugin did not import is left alone and reported; importing again refreshes what the plugin brought.
|
|
694
|
+
- **MCP servers**: each remote server over HTTP (an `https` URL, or `http` on this machine) is listed in the hosts' project configuration, as `eloxiv mcp install` lists the kernel's, named `<plugin>-<server>`. A server that runs a local command, uses another transport, or carries a credential (headers or environment, a user and password in its URL, or a key, token or secret in its query) is not imported, and is reported by name: no command runs and no credential is written. A server of the same name already listed with another endpoint is kept (reported as kept); `--replace` replaces it.
|
|
695
|
+
|
|
696
|
+
Everything skipped is reported with why; `--dry-run` writes nothing; `--json` prints the report.
|