Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
dist/
build/
coverage/
.next/
vendor/
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Documentation site for the Leverframe agent-infrastructure stack.

Sections:

| Section | Product | Repo |
|---|---|---|
| `/fleet-bridge` | fleet-bridge — bridge OpenClaw/Hermes agents to any MCP client | [leverframe/fleet-bridge](https://github.com/leverframe/fleet-bridge) |
| `/wranglebot` | wranglebot — deterministic guardrails, loop-breaking, .curt emission | [leverframe/wranglebot](https://github.com/leverframe/wranglebot) |
| `/tractum` | tractum — verifiable multi-agent consensus with cryptographic receipts | [leverframe/tractum](https://github.com/leverframe/tractum) |
| Section | Product | Repo |
| --------------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `/fleet-bridge` | fleet-bridge — bridge OpenClaw/Hermes agents to any MCP client | [leverframe/fleet-bridge](https://github.com/leverframe/fleet-bridge) |
| `/wranglebot` | wranglebot — deterministic guardrails, loop-breaking, .curt emission | [leverframe/wranglebot](https://github.com/leverframe/wranglebot) |
| `/tractum` | tractum — verifiable multi-agent consensus with cryptographic receipts | [leverframe/tractum](https://github.com/leverframe/tractum) |

## Local development

Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
30 changes: 15 additions & 15 deletions cabinet-lite/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ cabinet-lite is one Node (>= 24, ESM) process. TypeScript compiles to
`dist/` (`tsc`, `module: nodenext`, strict). No framework, no dependencies
at runtime — `node:http`, `node:fs`, and `fetch` only.

| Module | Role |
|---|---|
| `index.ts` | entrypoint: starts the server, logs the listen line, handles SIGINT/SIGTERM via `instance.stop()` |
| `server.ts` | HTTP server, snapshot assembly, SSE broadcast, plate refresh loop |
| `fleet.ts` | roster loading, health polling, transition detection |
| `plates.ts` | plate fetchers (`fetchCabinetTasks`, `fetchFleetHealth`) and their types |
| `feed.ts` | in-memory ring buffer (`Feed`, cap 500, newest first) |
| `ui/index.html` | static shell: all CSS inline, no build step |
| `ui/app.js` | browser client: SSE listener + renderers |
| Module | Role |
| --------------- | ------------------------------------------------------------------------------------------------- |
| `index.ts` | entrypoint: starts the server, logs the listen line, handles SIGINT/SIGTERM via `instance.stop()` |
| `server.ts` | HTTP server, snapshot assembly, SSE broadcast, plate refresh loop |
| `fleet.ts` | roster loading, health polling, transition detection |
| `plates.ts` | plate fetchers (`fetchCabinetTasks`, `fetchFleetHealth`) and their types |
| `feed.ts` | in-memory ring buffer (`Feed`, cap 500, newest first) |
| `ui/index.html` | static shell: all CSS inline, no build step |
| `ui/app.js` | browser client: SSE listener + renderers |

## HTTP surface

Exactly four routes, served by a plain `http.createServer` handler.
Everything else is `404 not found`.

| Route | Method | Meaning |
|---|---|---|
| `/` | GET | `ui/index.html` |
| `/ui/app.js` | GET | `ui/app.js` |
| `/api/snapshot` | GET | full snapshot as JSON |
| `/api/stream` | GET | SSE; each event is `event: snapshot` with the full snapshot as data |
| Route | Method | Meaning |
| --------------- | ------ | ------------------------------------------------------------------- |
| `/` | GET | `ui/index.html` |
| `/ui/app.js` | GET | `ui/app.js` |
| `/api/snapshot` | GET | full snapshot as JSON |
| `/api/stream` | GET | SSE; each event is `event: snapshot` with the full snapshot as data |

The server listens on `127.0.0.1` only. There are no POST/PUT/DELETE
handlers anywhere in v1 — read-only by absence.
Expand Down
74 changes: 37 additions & 37 deletions cabinet-lite/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ roster files. It has no config file of its own.

## Environment variables

| Var | Default | Meaning |
|---|---|---|
| `FLEET_BRIDGE_AGENTS` | (unset) | path to the OpenClaw roster JSON |
| `FLEET_BRIDGE_HERMES` | (unset) | path to the Hermes roster JSON |
| `FLEET_BRIDGE_GENERIC` | (unset) | path to the generic-runtime roster JSON |
| `CABINET_URL` | (unset) | Cabinet base URL, read-only; unset degrades the `needs_you` plate |
| `FLEET_HEALTH_URL` | (unset) | fleet-health aggregate base URL; unset degrades the `fleet_health` plate |
| `PORT` | `9100` | listen port (read once at startup) |
| Var | Default | Meaning |
| ---------------------- | ------- | ------------------------------------------------------------------------ |
| `FLEET_BRIDGE_AGENTS` | (unset) | path to the OpenClaw roster JSON |
| `FLEET_BRIDGE_HERMES` | (unset) | path to the Hermes roster JSON |
| `FLEET_BRIDGE_GENERIC` | (unset) | path to the generic-runtime roster JSON |
| `CABINET_URL` | (unset) | Cabinet base URL, read-only; unset degrades the `needs_you` plate |
| `FLEET_HEALTH_URL` | (unset) | fleet-health aggregate base URL; unset degrades the `fleet_health` plate |
| `PORT` | `9100` | listen port (read once at startup) |

All roster paths are read at startup into memory; the files are re-read
only on process restart. URLs accept any base the Node `fetch` can reach
Expand Down Expand Up @@ -54,17 +54,17 @@ fleet-bridge's `agents.json` / `hermes-agents.json`.
}
```

| Field | Required | Meaning |
|---|---|---|
| `name` | yes | agent name — key for health lookups and feed entries |
| `role` | yes | one-line role, shown on the lever tile |
| `tier` | no | fleet tier (e.g. `worker`) |
| `model` | no | model the agent runs |
| `host` | yes | hostname reachable from the box |
| `port` | yes | gateway port — polled at the health path |
| `token` | yes | gateway token; never leaves the box (v2 use) |
| `runtime` | no | display label; defaults to `openclaw` |
| `healthPath` | no | probe path; defaults to `/health` |
| Field | Required | Meaning |
| ------------ | -------- | ---------------------------------------------------- |
| `name` | yes | agent name — key for health lookups and feed entries |
| `role` | yes | one-line role, shown on the lever tile |
| `tier` | no | fleet tier (e.g. `worker`) |
| `model` | no | model the agent runs |
| `host` | yes | hostname reachable from the box |
| `port` | yes | gateway port — polled at the health path |
| `token` | yes | gateway token; never leaves the box (v2 use) |
| `runtime` | no | display label; defaults to `openclaw` |
| `healthPath` | no | probe path; defaults to `/health` |

### Hermes roster (`FLEET_BRIDGE_HERMES`)

Expand All @@ -83,15 +83,15 @@ fleet-bridge's `agents.json` / `hermes-agents.json`.
}
```

| Field | Required | Meaning |
|---|---|---|
| `name` | yes | agent name |
| `role` | yes | one-line role, shown on the lever tile |
| `model` | no | model the agent runs |
| `host` | yes | host the agent lives on |
| `ssh_user` | yes | SSH user for Hermes invocations (v2) |
| `binary` | yes | Hermes binary path/name on the host (v2) |
| `runtime` | no | display label; defaults to `hermes` |
| Field | Required | Meaning |
| ---------- | -------- | ---------------------------------------- |
| `name` | yes | agent name |
| `role` | yes | one-line role, shown on the lever tile |
| `model` | no | model the agent runs |
| `host` | yes | host the agent lives on |
| `ssh_user` | yes | SSH user for Hermes invocations (v2) |
| `binary` | yes | Hermes binary path/name on the host (v2) |
| `runtime` | no | display label; defaults to `hermes` |

Hermes entries are not polled in v1 — they render static `idle` tiles and
report `"ssh"` status in the snapshot.
Expand Down Expand Up @@ -125,16 +125,16 @@ entries (same timeout, stagger, cache, live-down transitions) at their own
}
```

| Field | Required | Meaning |
|---|---|---|
| `name` | yes | agent name |
| `role` | yes | one-line role, shown on the lever tile |
| `host` | yes | hostname reachable from the box |
| `port` | yes | port on the host |
| Field | Required | Meaning |
| ------------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `name` | yes | agent name |
| `role` | yes | one-line role, shown on the lever tile |
| `host` | yes | hostname reachable from the box |
| `port` | yes | port on the host |
| `healthPath` | yes in practice | probe path; omitting polls `/health`. Must return JSON (e.g. an object with `ok: true`) — text endpoints render the tile `down` |
| `runtime` | no | display label; defaults to `openclaw` |
| `model` | no | model the agent runs |
| `token` | no | optional gateway token (never leaves the box) |
| `runtime` | no | display label; defaults to `openclaw` |
| `model` | no | model the agent runs |
| `token` | no | optional gateway token (never leaves the box) |

Entries without `runtime` default by file: OpenClaw and generic lines to
`openclaw`, Hermes lines to `hermes`. The UI badge map styles
Expand Down
28 changes: 14 additions & 14 deletions cabinet-lite/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@ npm start

`package.json` scripts:

| Script | Command | Meaning |
|---|---|---|
| `build` | `tsc` | compile TypeScript to `dist/` |
| `start` | `node dist/index.js` | run the box |
| `dev` | `tsc --watch` | rebuild on change |
| `test` | build + `node --test "dist/test/*.test.js"` | run the test suite |
| Script | Command | Meaning |
| ------- | ------------------------------------------- | ----------------------------- |
| `build` | `tsc` | compile TypeScript to `dist/` |
| `start` | `node dist/index.js` | run the box |
| `dev` | `tsc --watch` | rebuild on change |
| `test` | build + `node --test "dist/test/*.test.js"` | run the test suite |

## Environment variables

| Var | Required | Default | Meaning |
|---|---|---|---|
| `FLEET_BRIDGE_AGENTS` | yes (for OpenClaw agents) | unset | path to the OpenClaw roster JSON |
| `FLEET_BRIDGE_HERMES` | yes (for Hermes agents) | unset | path to the Hermes roster JSON |
| `FLEET_BRIDGE_GENERIC` | no | unset | path to the generic-runtime roster JSON |
| `CABINET_URL` | no | unset | Cabinet base URL, consumed read-only; unset = `needs_you` plate degrades |
| `FLEET_HEALTH_URL` | no | unset | fleet-health aggregate base URL; unset = `fleet_health` plate degrades |
| `PORT` | no | `9100` | listen port |
| Var | Required | Default | Meaning |
| ---------------------- | ------------------------- | ------- | ------------------------------------------------------------------------ |
| `FLEET_BRIDGE_AGENTS` | yes (for OpenClaw agents) | unset | path to the OpenClaw roster JSON |
| `FLEET_BRIDGE_HERMES` | yes (for Hermes agents) | unset | path to the Hermes roster JSON |
| `FLEET_BRIDGE_GENERIC` | no | unset | path to the generic-runtime roster JSON |
| `CABINET_URL` | no | unset | Cabinet base URL, consumed read-only; unset = `needs_you` plate degrades |
| `FLEET_HEALTH_URL` | no | unset | fleet-health aggregate base URL; unset = `fleet_health` plate degrades |
| `PORT` | no | `9100` | listen port |

Notes:

Expand Down
12 changes: 6 additions & 6 deletions cabinet-lite/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ write path.

The box is organized around four questions:

| Question | Surface | Status in v1 |
|---|---|---|
| What needs me? | The `needs_you` plate (attention banner) | live |
| Who's free? | Lever tiles with live/down/idle states | live |
| What happened? | The pull feed with runtime provenance | live |
| Act from here? | The invoke panel | wired, GO-gated OFF |
| Question | Surface | Status in v1 |
| -------------- | ---------------------------------------- | ------------------- |
| What needs me? | The `needs_you` plate (attention banner) | live |
| Who's free? | Lever tiles with live/down/idle states | live |
| What happened? | The pull feed with runtime provenance | live |
| Act from here? | The invoke panel | wired, GO-gated OFF |

See [plates](./plates.md), [lever tiles](./lever-tiles.md), the
[pull feed](./pull-feed.md), and the [invoke panel](./invoke-panel.md).
Expand Down
10 changes: 5 additions & 5 deletions cabinet-lite/lever-tiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ name, its role, a lever slot graphic, and a runtime tag.

The state dot in the tile's top-right corner is driven by the health cache:

| State | Dot | When |
|---|---|---|
| `live` | solid green (`#00C853`) | health result has no `error` and `ok` is true |
| `down` | red (`#E5484D`) plus a red-tinted tile border | health result carries an `error` (probe failed, timed out, non-JSON) |
| `idle` | gray, 40 percent opacity | no health result yet, or the entry is not health-displayed (see below) |
| State | Dot | When |
| ------ | --------------------------------------------- | ---------------------------------------------------------------------- |
| `live` | solid green (`#00C853`) | health result has no `error` and `ok` is true |
| `down` | red (`#E5484D`) plus a red-tinted tile border | health result carries an `error` (probe failed, timed out, non-JSON) |
| `idle` | gray, 40 percent opacity | no health result yet, or the entry is not health-displayed (see below) |

Health semantics come from `fleet.ts`: each OpenClaw and generic entry is
polled with HTTP GET at its `healthPath` (default `/health`), 5 s timeout,
Expand Down
24 changes: 12 additions & 12 deletions cabinet-lite/pull-feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ sidebar_position: 6
The feed is the "what happened" journal. Each entry (`FeedEntry` in
`feed.ts`) carries:

| Field | Meaning |
|---|---|
| `ts` | timestamp, stamped by the server at insertion |
| Field | Meaning |
| --------- | ----------------------------------------------------------------------------------- |
| `ts` | timestamp, stamped by the server at insertion |
| `runtime` | provenance label — `openclaw` / `hermes` / `mcp` today, any roster label in general |
| `agent` | agent name |
| `summary` | one-line description |
| `ms` | latency in milliseconds (`0` renders as an em dash) |
| `ok` | success flag |
| `agent` | agent name |
| `summary` | one-line description |
| `ms` | latency in milliseconds (`0` renders as an em dash) |
| `ok` | success flag |

Storage is an in-memory ring buffer capped at 500 entries, newest first.
Restarts reset the feed — it is a journal, not a store.
Expand All @@ -35,11 +35,11 @@ carries runtime provenance.

Each row renders a badge after the agent name:

| Label | Badge style |
|---|---|
| `openclaw` | amber (`b-oc`) |
| `hermes` | steel (`b-he`) |
| `mcp` | muted gray (`b-mcp`) |
| Label | Badge style |
| ------------- | ----------------------------------------------------------------------------------------------------------------- |
| `openclaw` | amber (`b-oc`) |
| `hermes` | steel (`b-he`) |
| `mcp` | muted gray (`b-mcp`) |
| anything else | generic steel badge (`b-x`) with the label uppercased — e.g. a generic roster entry labeled `khoj` renders `KHOJ` |

The RUNTIMES side-rail in the sidebar counts every distinct label across
Expand Down
Loading
Loading