volcano-separator
by Nesarf
README.md
# Volcano Separator
[](https://github.com/Nesarf/volcano-separator/actions/workflows/ci.yml)
**A Windows workstation supervisor: it keeps a service reachable, and it makes the machine say what
it is doing.**
**Every art asset and every piece of UI here is pixel art, window design included**, and this tool's
pixel layer is **its own**: it borrows no font, icon or palette from a sibling project, because a
watchdog whose value is that it depends on nothing cannot depend on one. That rule is shared by four
tools and now lives in exactly one place — [`Nesarf/NTVI`](https://github.com/Nesarf/NTVI).
How far this tool has actually got with it, **and the limit**, is in
[`DESIGN-enforcement.md`](DESIGN-enforcement.md) §12.5.
It started as one thing and grew into three, because the first job kept failing for reasons the
second and third exist to explain.
| Role | Question it answers | Commands |
|---|---|---|
| **Supervisor** | why did my memory service go away, and can it come back? | `status` `heal` `warm` `serve` `stop` `restart` `doctor` `guard` `install-service` |
| **Observer** | what is actually running on this machine? | `activity` `busy` `ps` `reveal` `resources` `redline` `cache` |
| **Incident response** | something is hiding — what do I do about it? | `signals` `decide` `policy` `detain` `release` `detained` `timeline` |
## The problem it was extracted from
```
uvx (the package installer)
└─ an ephemeral env inside the uv cache ← the daemon's own code lives here
└─ the hindsight daemon ← spawned on demand by a host plugin,
└─ Postgres (pg0) only at session start / on retain
← the data lives here
```
The state of a *package installer* decided whether the *service* could start, and the service's
lifetime was decided by the *host's session timing*. When any link caught a cold, memory went away
— **silently**.
Measured on the machine this was extracted from (`volcano-separator doctor`):
```
12 start attempts, 7 failed on timeout, 1 succeeded
```
Every failure log showed `Downloaded botocore` / `Built claude-agent-sdk==0.2.16x` on the start
path. **A build and a watchdog were racing each other** — the plugin's watchdog allows ~180 s,
while a cold-cache uvx run on a spinning disk needs far more. It loses every time.
## The fix: stage the work so no watchdog ever races a build
| Stage | What it does | Watchdog |
|---|---|---|
| **warm** | make sure the uv env is complete (idempotent) | **none** — it may take minutes; it runs to completion |
| **serve** | start the daemon only once the env is hot | yes, but this is seconds now, so it cannot trip |
| **watch** | health probe and repair on demand | heartbeat, near-zero cost when healthy |
The property that makes this work: **`heal` costs about a second when healthy** (one TCP probe), so
it can run every few minutes without a resident supervisor process — **the scheduler does the
watching**.
The other half of the fix is upstream of this tool: point `UV_CACHE_DIR` at an SSD, so even a cold
start is fast.
## Install
```bash
git clone https://github.com/Nesarf/volcano-separator.git
cd volcano-separator
node bin/cli.mjs status # no install step: zero dependencies
```
Optionally put it on PATH:
```bash
npm link # provides `volcano-separator` and `vos`
```
## Commands
**Service**
```bash
volcano-separator status [--deep] # whole-chain check; see the note on --deep below
volcano-separator heal [--custody] # intelligent repair: warm -> serve -> watch
volcano-separator warm [--force] # warm the env only (no watchdog)
volcano-separator serve # start the service only
volcano-separator stop | restart
volcano-separator doctor # count historical start failures from the plugin log
volcano-separator guard clean # is a uv cache operation safe right now?
volcano-separator install-service # register the watchdog task (at logon + every N minutes)
volcano-separator service # watchdog task state
volcano-separator resources [n] # free memory, CPU load, largest processes
volcano-separator defer [--wait] # exit 0 = go ahead, 3 = not now
```
`status` is read-only. The one probe that is not is the uv warmth measurement — it runs
`uvx --with ... --help`, and uvx builds an environment to run anything — so it is behind `--deep`
and reported as unmeasured otherwise.
Warmth itself is a question about **completeness, not speed**: the probe resolves with the
network off, so success proves the environment is complete locally and failure proves it is not.
It cannot download, which matters twice over — the probe cannot leave a half-populated cache
behind, and it cannot make a cold environment look warm by quietly filling it. An earlier version
timed a `uvx` run and called anything slower than 15 s cold, which meant a busy machine reported
a warm environment as cold and triggered the full warm-up the measurement exists to avoid. If the
probe runs out of time now it says *undetermined*, because a guess in that direction is expensive.
**Activity**
```bash
volcano-separator activity [n] # the system-wide process/window/persistence record
volcano-separator busy [minutes] # what has actually been running, grouped
volcano-separator ps # what is running now, with ages (spots a wedged process)
volcano-separator reveal windows # every top-level window; --show forces hidden ones visible
volcano-separator reveal process <pid>
volcano-separator reveal chain <pid> # inherited chain, recovered from history
volcano-separator redline [seconds] # what is sitting on C: in user-writable space
volcano-separator cache [--prune] [--apply] # uv cache: duplicates, old versions, idle envs
```
**Incident response**
```bash
volcano-separator signals [minutes] # what looks like stealth, with evidence (observe-only)
volcano-separator decide [minutes] # what would be done about each signal (acts on nothing)
volcano-separator policy show|allow|deny|mode
volcano-separator detain <pid> # freeze it, force its windows open, open a custody window
volcano-separator release <pid> # resume a detained process
volcano-separator detained # what is under custody, reconciled against the live system
volcano-separator timeline # the life of each custody decision
```
Options: `--profile <name>` (default `coding-agent`), `--port <n>` (default `9077`), `--json`,
`--quiet`, `--force`, `--dry-run`.
## Interfaces
| Form | Entry point | For |
|---|---|---|
| CLI | `bin/cli.mjs` | humans, scripts, the scheduled task |
| Library | `lib/core.mjs` | other tools (pure Node, zero dependencies) |
| MCP | `lib/tools.mjs`, served by `lib/mcp.mjs` | any harness — 17 tools, listed below |
| PTC | `lib/ptc.mjs`, served by `vos web` | one program that sequences several read-only calls |
The MCP surface is **read-only apart from `heal`**, and that is the design rather than a stage of
completion.
| Read-only | |
|---|---|
| service | `volcano_status` `volcano_doctor` |
| surface | `volcano_web_log` |
| machine | `volcano_resources` `volcano_ps` `volcano_redline` |
| record | `volcano_activity` `volcano_busy` |
| detection | `volcano_signals` `volcano_decide` `volcano_evidence` |
| custody | `volcano_detained` `volcano_timeline` `volcano_isolated` |
| cache | `volcano_cache_plan` |
| repair | `volcano_heal_status` |
| correlate | `volcano_entity` |
`volcano_heal` is the one that starts something: it repairs a service the agent is usually the
reason for needing, removes nothing, and the worst outcome is a slower path to the same place.
**It does not block.** A healthy service is answered in about 50 ms; a repair that is actually
needed is handed to its own process and the call returns a receipt, which `volcano_heal_status`
follows. That split is what let this server's tool timeout come down from thirty minutes to five —
before it, every tool here shared a timeout chosen for the slowest possible repair.
There is no `volcano_detain`, `volcano_release`, `volcano_cache_apply` or `volcano_policy_allow`.
Freezing a process or deleting cache entries are decisions a human should make, and `cache_plan`
exists so an agent can show a person exactly what a prune would remove and let them run it. An
agent that can act on its own is a worse failure than one that has to ask.
## The programmatic surface
`vos web` listens on `127.0.0.1:3250` and answers two routes:
| Route | What it does |
|---|---|
| `GET /ptc/bindings` | every tool this server exposes, with the same schemas the MCP surface publishes |
| `POST /ptc/run` | `{ "program": "...", "timeoutMs": 30000 }` returns `{ "logs": [...], "value": ... }` |
| `POST /ptc/chat` | `{ "messages": [...] }` runs the agent loop and returns the answer, the transcript and the steps |
**Nothing starts it, and nothing depends on it.** The heartbeat's scheduled task runs `heal`, never
`web`; a repair neither consults this server nor notices whether it is up, and the server takes no part
in a repair. It lives exactly as long as the terminal that typed it — `Ctrl+C` releases any suspension
it still holds, closes the socket and exits 0 — and that lifetime is the design rather than a gap
waiting for a service, a login task or a `start` subcommand. Two things follow from it, both intended:
a port that exists only while somebody means to use it is a smaller thing to defend than one that is
always listening, and no second process is left running with the authority to stop what this surface
exists to watch.
Opening `/` in a browser is the same surface with a face: the binding list on the left, a program
editor on the right, and the logs, value and error of the last run underneath. Its colours are read
from `bin/panel.json` at request time — the same nine roles and bevel rule the chamber's window draws
with — so a colour changed for the window changes the page in the same commit. The pixel-art
constraint this project has carried since 2026-10-06 applies to a web page as much as to a WinForms
one.
A program gets one global, `tools`, whose members are the read-only tools. What that buys is
sequencing without round trips — the check, the action and the re-check in one request:
```js
const s = await tools.volcano_heal_status({})
if (!s.ok) {
const ps = await tools.volcano_ps({})
return { heal: s, processes: ps }
}
return { heal: s }
```
The failure taxonomy is orthogonal, because a budget expiry is not an exception and an abort is not
a timeout: `exception`, `timeout`, `abort`, `worker-exit`, `invalid-output`, `output-limit`. A
program that returns nothing is **not** a failure — it is a run that produced logs and no completion
value, and `value` is simply absent.
Two things this surface is not. It is not a second implementation: the bindings are generated from
the same `TOOLS` array and dispatch through the same `call()` the MCP server uses, which is why the
two were split into `lib/tools.mjs` rather than copied. And it is not a sandbox — `node:vm` is not a
security boundary, as Node's own documentation says. What it does have is a fixed binding list, no
`require` or `process` in the context, and a deadline. `volcano_heal` is excluded by name: it is the
one tool that changes the machine, and it already has two callers with their own gates.
### Who may run a program
`POST /ptc/run` needs `content-type: application/json` and an `x-vos-token` header whose value is in
`~/.volcano-separator/ptc.token` — written on first start, `--token-file` to put it elsewhere. `GET`
routes stay open, so a caller can learn what exists before it holds the credential. `OPTIONS` is
answered 405, and no response carries an `Access-Control-*` header.
What that defends is narrower than "local security", and saying so is the point: any process running as
this user can read the token file, so it is not a border between local processes. It keeps out a page
on another origin. Such a page can send `GET /` — a simple request, no permission needed — but without
CORS it cannot read the response, so the token inlined into that page never reaches it; and it cannot
send the POST at all, because a JSON content type plus a custom header makes the request preflighted
and this server answers no preflight.
The shape requirement is therefore the load-bearing half and the token is the second lock. Both are
checked, and the suite asserts each one by taking it away: a test of the happy path alone passes just
as well against a server with no guard at all.
### External commands, off by default
`vos web --extras <path>` adds commands described in a small JSON file to the same `tools`
namespace. Without the flag they do not exist, and the built-in sixteen are the whole surface.
It is a file rather than a handful of hardcoded paths because of the distinction this project keeps
between *origin* and *dependency*: a resource may be produced elsewhere as long as what runs reads
nothing outside its own repository. A binding that pointed at `nanodesu.py` would be a dependency in
the running process, and the first time that checkout moved, the tool would start failing for a
reason that has nothing to do with supervising anything. The core knows nothing about any other
project; the person who starts the server names the file, and that naming is the decision.
`extras.example.json` ships with the repository and names no real checkout. A binding runs its
command and answers `{ ok, exitCode, json?, text }` — `json` only when stdout parsed as JSON, `text`
always, and a non-zero exit as `ok: false` rather than an exception. It is not a sandbox: the command
runs with your authority and the arguments the file gives it.
### Suspending the heartbeat
`vos web --allow-quiesce` adds two more bindings, and they are the only ones that change the machine:
`volcano_quiesce` disables this tool's scheduled task and returns a handle; `volcano_resume` takes that
handle and puts the task back. Off by default, and the task name is not a parameter — the only task it
can ever touch is its own heartbeat.
This exists because "stop the scheduled task before touching the host" was a rule with a manual step,
and the manual step is the one that gets forgotten at the end of a repair. A program holds the handle; a
person reading a checklist does not.
Two things it refuses to guess at. It records the state it found and restores *that*, so a task you had
already disabled stays disabled — the other reading would let a tool call override your decision without
telling you. And it will not release a leftover suspension automatically on the next start: the record
says what the state was, but the world has had time to move since, and re-enabling on a guess is how a
safety mechanism becomes the thing that switches the safety mechanism on. A leftover is reported
instead.
What it cannot do: survive its own process being force-killed. Enabling a task needs a child process,
and a terminated one never gets to start it, so a pending suspension is written to
`~/.volcano-separator/quiesce.json` and reported on the next start. The suite runs against an injected
command executor and never touches a real scheduled task — a test that disabled the real heartbeat
would be a test that changes the thing it measures. The real pair was checked once by hand: `ready` →
`disabled` → `ready`, with the disk record cleared.
### Plugins
`plugins/*.js` holds programs with names. The page lists them under the binding list and runs one on a
click. Each file is ordinary JavaScript that goes through the same `POST /ptc/run` path as the editor —
same sandbox, same bindings, same failure taxonomy — and the three comment lines at the top are what the
page reads:
```js
// name: 巡检
// description: one line the page shows on hover
// needs: volcano_status, volcano_doctor
const status = await tools.volcano_status({})
return { status }
```
`needs:` is what keeps the page honest. A plugin that calls `volcano_quiesce` cannot run unless the
server was started with `--allow-quiesce`, and listing it anyway would read as a broken tool rather than
a switch somebody left off — so it is shown greyed, with the missing binding in its title.
A plugin can take arguments. Declare them — all text, with an optional default — and the page draws a
box beside the name:
```js
// params: port=3080
const port = String(args.port || '3080')
const found = await tools.volcano_entity({ kind: 'port', id: port })
return { port, entity: found }
```
`args` is frozen and reaches the program as an object, so what ran is still answerable afterwards. The
editor's own run button sends an empty one: the editor has no parameter boxes, and a program that needs
arguments there can write them in — that is the difference between the two paths, and it is the whole of
the difference.
One boundary that surprises people: returning nothing is fine (it is a run that produced logs), but a
returned object carrying a single `undefined` field is `invalid-output`. Trimming the field would be a
silent edit of what the program said.
A plugin that changes something can ask first:
```js
// confirm: 这一下会改计划任务的状态,确定要动吗?
```
The question is shown before the program reaches the editor or leaves the page, so a cancel leaves the
editor holding what it held. `heartbeat` needs one because it decides its own direction — which is also
why its sentence describes both directions rather than one.
Each plugin's last result is kept in the page's own storage and shows up as a badge: when it ran, and
whether it worked. Clicking the badge puts that result back under the editor without running anything,
which is the difference between "I forgot what it said" and "run it again and hope it says the same".
A result too large to keep is remembered as omitted; the editor's own run button stores nothing, since
there is no plugin identity to file it under.
`--plugins DIR` points at another directory, and `--plugins ''` loads none. The default is this
repository's own, for the same reason extras are a file rather than four paths: what runs reads nothing
outside this repository, and what it offers is something a person named.
### The model call
`vos llm` configures and exercises one call. The key is protected with DPAPI by the same script the vault
uses — not a config file, which would travel with every copy of this directory, and not an environment
variable alone, which every child process inherits:
```text
vos llm set-key # reads stdin; --key works but lands in the shell history and the process list
vos llm status # endpoint, model, and where the key came from -- never the key
vos llm ask "..." # one call, printed
vos llm forget
```
The endpoint and model are values rather than constants: any OpenAI-shaped chat endpoint works, and
`--llm-endpoint` / `--llm-model` override both. DeepSeek is the default because it is what this machine
pays for, not because it is the only shape — hard-coding one host would be a choice nobody could see.
A program reaches it only with `--allow-llm`, which adds one binding, `vos_ask`. That is a separate switch
from `--allow-quiesce` on purpose: suspending a scheduled task changes this machine, and a model call
spends money and sends the prompt off it. Failures come back classified — `no-key`, `network`, `timeout`,
`http`, `bad-response`, `empty-prompt`, `prompt-too-long` — so a program can decide whether to retry
instead of guessing.
### Talking to an agent
`POST /ptc/chat` takes a conversation and runs a loop: the model is offered every tool this server
exposes, calls what it needs, reads the results, and answers. `steps` in the response says which tools
ran and how large each result was — what the agent said and what it did are two different claims, and
only one of them is the model's own words.
Three limits bound it: six rounds, four tool calls per round, two minutes. A result over 4000 characters
is truncated **and the model is told so in the text it reads**, because a silently cut result is a wrong
answer delivered confidently.
The history belongs to the caller. The server keeps no session, so `vos web` can be restarted without
ending a conversation. The page stores the list in the browser beside each reply's step list, which is
stripped before the next request — a display detail that reached the provider would be a failed request
caused by a decoration.
Without `--allow-llm` the route answers 404 and names the switch.
### `vos web timed`
`timed` keeps a timestamped log per start — `vos-web-<yyyyMMdd-HHmmss>.log` under the log directory, written
from the same lines the terminal shows but without the colour. The convention is the one
`dsh-web-timed.ps1` uses for its own logs, so both kinds sort together in one listing, and the run that went
wrong is still on disk after the next one has scrolled the terminal away. The startup output ends with that
path, so there is nothing to remember.
It does not stop by itself. A time limit is a different word, and would be a different flag.
MCP client config:
```json
{
"mcpServers": {
"volcano-separator": {
"command": "node",
"args": ["/path/to/volcano-separator/lib/mcp.mjs"]
}
}
}
```
## Real traps it handles for you
**1. The daemon's code lives inside the uv cache.**
So `uv cache clean` / `prune` is blocked by the running daemon's in-use lock, and `--force` deletes
the running daemon's own files out from under it.
`volcano-separator guard <op>` checks first and prints the safe order:
`stop -> uv cache <op> -> heal`.
**2. A daemon started by the host plugin is not recognised by the embed manager.**
`hindsight-embed daemon stop` tracks its own PIDs; a daemon the host plugin spawned itself is not in
that record, so:
```
WARNING - Could not find PID for port 9077
WARNING - Port 9077 is bound but no hindsight daemon could be identified on it
Failed to stop daemon
```
`stop` therefore has two levels: the official path first, then **find the port owner and collect its
process tree**. Without that layer, one plugin-spawned daemon would make the supervisor permanently
unable to stop it.
Collecting a process tree is the most destructive thing here, so the identity check is not "the
image is called python.exe". That matches a python from anywhere, and the anchor is only "something
is listening on 9077" — which is not by itself proof of what it is. A chain member has to be a name
the daemon uses **and** name the daemon or the port in its command line, which every member of the
real chain does. Anything else stops the walk and is reported with its path and the reason:
`refused to kill pid 5136 (node.exe): image name 'node.exe' is not one of the daemon's`. A refusal
is reported as a refusal, never as "no collectable process was found" — those mean different things
and only one of them tells you what to do next.
**3. "The port answers" is not the same as "it works".**
A daemon can keep `/health` green while being unable to reach its database. Observed in the wild: a
saturated disk made the daemon's Postgres connection handshake time out 48 times, the port never
blinked, and every memory write stalled with no visible reason. That is why `status` also probes
Postgres *and* scans the daemon's own log — using **two windows**: errors in the last 5 minutes mean
it is failing *now*, while anything older is reported as context (`recovered`) so a past incident
does not keep the chain marked unhealthy forever.
**4. Command lines carry secrets.**
The activity recorder stores full command lines, because that is often the only thing distinguishing
an expected process from an unexpected one — and for the same reason it is where credentials travel.
`--token`, `--password`, `AWS_SECRET_ACCESS_KEY=`, `Authorization: Bearer ...` and URL credentials
are redacted **before the line is written**, because the log is append-only: redacting only on
display would hide the secret from the default view while leaving it in the file.
**5. An idle cache is not a small one.**
After months the uv cache held 8.6 GB, of which 5.3 GB was eight uvx environments built by earlier
runs and never reaped, and a further 1.9 GB was duplicate copies and superseded versions.
`cache` reports that, `--prune` lists the removals and stores the list, `--apply` carries out
exactly that list. Each removal is staged by renaming the entry first: Windows refuses to rename a
directory while a file inside it is open, so a refused rename *is* the answer that something is
using it — and it is one atomic operation, where scanning running processes and then deleting is
not.
The rename answers *is anything holding this entry*. It cannot answer *is this still the entry that
was reviewed*, so every entry is rechecked — same path, same size — before it moves. An entry that
changed or vanished is left alone and named, and nothing outside the reviewed plan is ever removed:
candidates that appeared since are left for the next plan, where they are visible before they are
approved. A plan reviewed as 40 entries executes as those 40.
## Boundaries — what it deliberately does not do
- **It records; it does not block.** The activity recorder gives attribution and a timeline, not
prevention. Blocking a write needs a filter driver, and claiming otherwise would be the exact kind
of false signal this tool was built to remove.
- **It never quarantines on its own.** Nothing this tool detects is acted on by a rule. Every act is
a command a person types, and each says what it does to the target:
- `detain` freezes a process and asks a human. The file is not touched at all, and a suspension is
persistent and loud, because one nobody comes back for is worse than one never applied.
- `isolate` rewrites the file's ACL and stops it launching. The bytes are untouched.
- `vault` copies a file into a store on its own volume; **`vault --move` is the one operation that
takes a file out of its place**, and it has to be asked for by that word. The default leaves the
original exactly where it was, so a mistake costs disk space rather than a file.
- Every one of them prints the command that reverses it, and that command does not need this tool
to exist.
- **Detection does not act.** `signals` reports and `decide` says what it *would* do; the mode
defaults to `observe` and nothing reads it. `policy mode suspend` and `policy mode reject` are
**recorded as intentions and implemented nowhere** — the command says so when you set one, and
`policy show` reports a non-observe mode as recorded intent rather than as an alarm, because a
setting that promises an action the tool cannot take is the kind of false signal this project
exists to remove. What is left of the old promise is a field that nothing read, and it is gone
rather than kept as decoration. Promotion to automatic would first need a measured false-positive
rate, and the detectors have to be shown to fire at all before that number means anything. The
design for changing this, and the sequence it would have to follow, is in
[`DESIGN-enforcement.md`](DESIGN-enforcement.md).
- **It does not patch the host plugin.** The plugin's `ensureDaemon()` starts with
`if (await isServerHealthy(...)) return;` — once the service is healthy it returns immediately and
the fragile path is never entered. That is "no longer traversed", not "patched".
- **No extra resident process.** Watching is delegated to the OS scheduler.
- **It only reads the service's logs**; it never touches hindsight's own data.
## Platform
**The platform layer is Windows-only; the staging model is not.**
Everything that touches the machine — process enumeration, windows, the registry, service and
scheduled-task control, `NtSuspendProcess` — goes through PowerShell and Win32. The activity
recorder, `resources`, `reveal`, `detain` and `install-service` do not work anywhere else today.
What is portable is the supervisor's shape: staged recovery, the health model, and the CLI. Porting
means replacing the platform layer — a launchd plist or systemd timer in place of the scheduled
task — not rewriting the logic. `package.json` therefore declares no `os` restriction, because that
field constrains where a package may be installed rather than what it supports, and this package
installs and runs its portable parts anywhere Node does.
## Modules
`lib/` is layered, and **the layers are checkable by reading the import lines** rather than by
trusting this table. Two modules import nothing local; everything else imports only downward.
```
platform · commandline leaves: one spawns and reads, one parses a command line
↑
policy · lock · service · database · uvcache · vault · redline
↑
resources · activity · enforce · live
↑
crypt · custody · signals · chamber
↑
supervisor the staged recovery, and the only thing that starts services
↑
core config + context + the re-export facade
↑
mcp · bin/cli.mjs the two entry points
```
Two things worth knowing that the shape does not show:
- **`crypt` and `enforce` are not re-exported through `core`.** The CLI imports them as namespaces
(`cry.`, `enf.`), because they are the two modules that touch secrets and ACLs and a caller should
have to name them to reach them.
- **`vault` is likewise not facaded.** It is the only operation that moves a file.
`chamber` sits where it does because it composes two sources that must not be confused: live facts
from a probe, and per-pid history from the record. It reads `custody` for the second.
`entity` sits near the bottom because it reads several surfaces at once: it is the one module that
answers about a *thing* — a pid or a path — instead of about a surface. **Events and snapshots are kept
apart there on purpose.** `activity` is a record of events, which have a time and happened once; `ps`
and `redline` are snapshots, true when taken and silent about a minute ago. Flattening them into one
table would let "happened at 14:02" be read as "is true", and this tool exists to remove that kind of
answer rather than produce it.
## Configuration
Everything is discovered, not hardcoded: `uvx` comes from `PATH`, the cache dir from
`UV_CACHE_DIR` (with junctions resolved to their real target), the embed version from the host
config.
Tune behaviour in `DEFAULTS` at the top of `lib/core.mjs`, or in the policy file at
`~/.volcano-separator/policy.json`:
```js
profile: 'coding-agent',
port: 9077,
withPackages: ['pg0-embedded'],
warmProbeMs: 15000, // safety timeout for the offline probe, not the warm/cold test
warmBudgetMs: 15 * 60 * 1000,
serveBudgetMs: 5 * 60 * 1000,
taskName: 'Volcano-Separator',
taskIntervalMinutes: 5,
```
## Planned
Agreed work that is not done, each with what is measured and what would count as finished, is in
[`TODO.md`](TODO.md). The first entry is the largest: today the supervisor knows one specific stack
(`uv` → the Hindsight daemon → its embedded PostgreSQL), and it should be able to supervise a
comparable local service without being rewritten.
## Requirements
Node >= 20.12. Zero third-party dependencies. PowerShell for the platform layer.
## Tests
```bash
node test/smoke.mjs # or: npm test
```
About 170 checks. They are behaviour-level rather than unit-level, and they are **not offline**: the
suite drives the real CLI, so on a machine with the service running it reads live state (and on one
without, it asserts the degradation instead — every probe has to say "unavailable" rather than
throw). It also invokes PowerShell, and spawns the MCP server to read its handshake back.
Two habits worth knowing if you add to it:
- **A test that cannot fail is not a test.** A detector that reports zero findings and a detector
that cannot fire look identical from the outside, so the signal rules are checked against
synthetic positive cases, and the redaction rules are checked against a fixture with the expected
output written out — agreement between two implementations is not enough, since two
identically-wrong implementations agree perfectly.
- **Assert the observation, not the method.** Where a check would otherwise match on a process name,
it matches on the file growing instead; a name match finds the shell that is running the check.
There is a second, blunter check next to it:
```bash
node test/commands.mjs # or: npm run commands
```
It runs every command that reads, once, and looks at the exit code. That is cruder than the smoke
suite and it is aimed at a different failure: the smoke suite asserts behaviour, and a large
refactor does not break behaviour first -- it breaks reachability. A handler that loses an import,
or a function that stops being re-exported, is invisible to tests that call the functions which
survived. The commands that change the machine (stop, restart, serve, detain, release, warm
--force, install-service) are deliberately absent, so this is safe to run on a working machine at
any time; `guard clean` is included *because* it must refuse while the service is up, and its
expected codes are written per command rather than assumed.
CI runs the smoke suite on Node 20 and 22, on Linux and Windows.
## License
MIT
This server cannot be deployed
Maintenance
ActivityActive
ResponsivenessOutdated data