piroboros 0.1.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -2,7 +2,29 @@
2
2
 
3
3
  This project follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [Semantic Versioning](https://semver.org/).
4
4
 
5
- ## [Unreleased]
5
+ ## [0.2.0] - 2026-10-24
6
+
7
+ ### Added
8
+
9
+ - `/telemetry` and the `telemetry` setting. Model request and task timings are recorded to `telemetry.sqlite` in `PIROBOROS_HOME`, on by default, local only, with no message text and no error text. `"telemetry": false` stops it at the next start.
10
+ - The first start copies the chat database to `chat.schema1.sqlite` before the schema 2 upgrade and checks the copy.
11
+
12
+ ### Changed
13
+
14
+ - Built on pi-durable, chord and pi-ai 1.4.0. The chat database moves to schema 2 on the first start, and 0.1.0 cannot open it after that. The start first copies it to `chat.schema1.sqlite`, so you can go back by restoring that copy.
15
+ - piroboros sends no provider attribution headers. Requests still carry the pi-ai User-Agent.
16
+ - Compactor retry waits survive a restart: closing piroboros during a wait no longer reruns the request.
17
+ - Status line errors name the failing task or extension.
18
+ - A task that was cut off on several starts in a row is paused. piroboros says so at every start, and Esc or `/conclave cancel` clears it.
19
+ - The README is a short overview with diagrams of a turn, the Conclave and where data goes. The full reference moved to `docs/`, which ships in the package.
20
+ - The turn state, plan, Conclave and node documents now store a full copy after every 64 changes, so a long chat no longer replays its whole change history each time one of them is read.
21
+ - `--backup` writes to `<file>.tmp`, checks the copy with SQLite `quick_check` and only then renames it, so a failed backup never leaves a file under the final name.
22
+
23
+ ### Fixed
24
+
25
+ - Windows shell lookup with an unusual `SystemRoot`.
26
+ - Whitespace-only tool output was rejected by the OpenAI and Google providers.
27
+ - Gateway `upstream_error` replies were not retried.
6
28
 
7
29
  ## [0.1.0] - 2026-10-17
8
30
 
package/README.md CHANGED
@@ -8,6 +8,8 @@ A Windows-first terminal agent harness built around one long-lived chat. Each tu
8
8
 
9
9
  piroboros runs the shell commands the model asks for, with the rights of your account. The guard is a tripwire, not a sandbox: it stops common mistakes, and a command can be worded around it. For untrusted tasks, use a throwaway directory or account. Web access is off by default. Undo copies can hold file contents unredacted.
10
10
 
11
+ More in [Privacy and limits](docs/privacy.md).
12
+
11
13
  ## Quickstart
12
14
 
13
15
  ```
@@ -36,182 +38,101 @@ A checkout runs the TypeScript sources directly. To type `piroboros` in any term
36
38
  - `git` for the optional memory vault, and `rg` (ripgrep) for exact search and as the fallback when fff cannot load.
37
39
  - Windows and Linux are both targets.
38
40
 
39
- ## Configuration and data
40
-
41
- Everything piroboros stores lives under `PIROBOROS_HOME` (default `~/.piroboros`): the chat database, `auth.json`, `settings.json`, `models.json`, the memory stores, the optional vault clone, your `skills` folder and `skills-trust.json`. Copy `settings.json.example` and `models.json.example` from this repository as a starting point; the examples use placeholder hosts.
42
-
43
- `PIROBOROS_HOME/instructions.md` is an optional file of your own standing instructions. It is read again for every request, so an edit applies at the next turn and `/reload` is not needed. The text goes to the main model as an `instructions` section and is also appended to the compactor's system prompt, so the compactor follows it too. A line meant only for replies should say so, for example "Do not apply this to compaction lines."
44
-
45
- ### Custom providers (`models.json`)
46
-
47
- `models.json` adds providers that speak one of three wire formats: `openai-completions`, `openai-responses` or `anthropic-messages`. Each model needs `id`, `api`, `baseUrl`, `contextWindow` and `maxTokens`. See `models.json.example`.
48
-
49
- - OpenAI formats take a base URL that ends in `/v1`. The Anthropic format takes the host root, because the client adds `/v1/messages` itself; a base URL ending in `/v1` is rejected.
50
- - A provider id must not contain `/`, and must not be the id of a built-in provider.
51
- - A model needs `contextWindow` minus `maxTokens` of at least 24,000 to load. The main model needs `contextWindow` minus `maxTokens` minus 2,000 to be at least 72,000, otherwise it is listed as disabled in the main-model picker.
52
- - The API key comes from the variable `<ID>_API_KEY`: the id is upper-cased and every character outside A-Z and 0-9 becomes an underscore, so `my-llm.v2` reads `MY_LLM_V2_API_KEY`. A key stored through setup or `/login` takes precedence over the variable.
53
- - A UTF-8 BOM at the start of the file is accepted.
54
- - Two optional keys control reasoning. `thinkingLevelMap` maps piroboros thinking levels (`off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`) to the value the provider accepts, or to `null` for a level the model does not support; it needs `"reasoning": true`. `compat` is passed to pi-ai unchanged and covers provider differences such as `supportsReasoningEffort` or `thinkingFormat`. Some models reason by default even when no level is sent, so mapping `off` to the provider's lowest value is how you cap them. For example, a model that accepts only `low` and `high`:
55
-
56
- ```json
57
- "reasoning": true,
58
- "compat": { "supportsReasoningEffort": true },
59
- "thinkingLevelMap": { "off": "low", "minimal": "low", "low": "low", "medium": "low", "high": "high", "xhigh": "high", "max": "high" }
60
- ```
61
- - An invalid file does not stop startup. piroboros starts without custom providers and shows the error, which names the field. `/reload` re-reads `models.json` and `settings.json` and keeps the previous configuration if either is invalid.
62
-
63
- ## Commands
64
-
65
- - `npm start` opens the chat. If no main model is set it runs setup first. To type `piroboros` in any terminal instead, run `npm link` once in this folder; `npm unlink -g piroboros` removes it. While the chat is open the window title reads `piroboros - <folder>`, the folder it was started in.
66
- - `npm run setup` runs the guided setup. It needs the same exclusive access as the chat, so it exits with code 3 while the chat is open. If a config file was edited outside piroboros, setup shows the change and asks whether to accept it before it starts, the same as starting the chat does; answering no exits with code 5.
67
- - `--print <message>` sends one message and prints the answer. `--model provider/model` uses another model for that run only, with `--print` and for the interactive start; an unknown model exits 2 and does not open setup. Exit codes: 2 when no main model is set, 4 when login is required, 5 when the config files were changed outside piroboros.
68
- - `--backup <file>` writes a copy of the chat database.
69
-
70
- `/model`, `/reload`, `/login`, `/settings`, `/status`, `/conclave`, `/akashic`, `/thinking-steps` and `/skills` are available in the chat, and so is one command for each skill you have installed (see Skills).
71
-
72
- `/login` signs in from the chat. `/login` alone lists the providers, with `[ready]` on the ones that already resolve, and the two web search keys. `/login <provider>` goes straight to one, and `/login web-tinyfish` or `/login web-exa` stores a search key. A provider that offers both an OAuth and an API key method asks which one you want, and a provider that is already signed in asks before it signs in again. What you type is masked in a box that replaces the chat, the credential goes to `auth.json`, and error text is scrubbed before it is shown. The sign-in address is shown on screen and opened with the platform's default handler. Esc cancels, and closing piroboros during a sign-in stops its local callback server. The next turn uses the new credential without a restart.
73
-
74
- `/settings` changes `settings.json` from the chat. `/settings` lists 24 keys and the 8 Conclave members with their current values (a default is marked as such), and the list filters as you type. `/settings conclave.members.vaelia` lists that member's four keys, and `/settings <key>`, for example `/settings web.maxFetches`, goes straight to a key; an unknown key gets a hint. The editor depends on the key: a choice for words and on/off, a number box that starts at the current value and refuses a value outside the allowed range, the setup model pick for model keys (it signs in when the provider needs it), and for lists such as `guard.deny` a menu of the entries, where picking an entry removes it and "Add an entry" adds one. Every key can be reset to its default, which removes it from the file. The editor says when a change applies: at the next turn, right away, at the next Conclave run or at the next start. `cacheRetention` applies at the next turn: `"short"` keeps the prompt cache for about 5 minutes, and `"long"` keeps it for an hour and costs more per cache write.
75
-
76
- A change to a security-relevant key shows the old and the new value and asks before it is saved. Those keys are `main`, `compactor.model`, `compactor.allowThirdParty`, `conclave.defaultModel`, the model of each Conclave member, `shellEnvAllow`, `shellTimeoutMs`, `guard.deny` and the `web` keys. `/model` asks the same way when it changes the main model, and asks nothing when the model is already the main one. A compactor model on a host that is not loopback also asks whether third-party use is allowed, as setup does, and setting `web.search.provider` with no stored key offers to enter the key. Every write goes through the same checked path as `/thinking-steps global`: if `settings.json` was edited outside piroboros, the write is refused until `/reload`. When piroboros was started with `--model`, `/settings` says so and explains that a change to `main` applies when it starts without the flag.
41
+ ## How a turn works
42
+
43
+ ```mermaid
44
+ flowchart LR
45
+ you["Your message"] --> log[("Chat log")]
46
+ log --> comp["Compactor (background)"]
47
+ comp -->|"summary lines, at most 512 bytes each"| view["Size-limited view"]
48
+ log --> view
49
+ view --> main["Main model"]
50
+ main -->|"tool call"| guard{"Guard"}
51
+ guard -->|"allowed"| tools["File, shell, search, plan and memory tools"]
52
+ guard -->|"refused"| main
53
+ tools -->|"result"| main
54
+ main -->|"reply"| log
55
+ ```
77
56
 
78
- `/reload` shows the changed security-relevant settings (hosts, `allowThirdParty`, `shellEnvAllow`, `guard.deny`, the `web` keys) and asks before it accepts files that were edited outside piroboros. `/status` shows the messages saved, the summary view size and the cache use of recent responses. The compactor asks its model for lines of at most 400 bytes; 512 bytes stays the hard limit, and a line still over it after five tries is cut at a clause boundary. A provider reply of HTTP 429 or 503 counts as busy: the compactor waits longer and does not count it as an error, up to 20 times per node, and `/status` shows the retries made while the provider was busy. Until a compactor is configured, long messages show as "not summarized yet" lines and each request carries a window of at most 128 KB of the view.
57
+ Every turn builds a new request from the view, so the request stays bounded as the chat grows. Until a compactor is configured, long messages show as "not summarized yet" lines and each request carries a window of at most 128 KB of the view. Your local log keeps the raw text.
79
58
 
80
59
  ## The Conclave
81
60
 
82
- The Conclave is a team of eight agents defined in `agents/*.md` and `skills/conclave/SKILL.md`. `/conclave <task>` starts a review. Samaela plans, then Nytheria, Elaria, Raskreia, Avaritia, Vaelia and Astrelia review in that order. Each member runs alone, in its own child conversation, and sees the task and the reports posted so far. If any reviewer's verdict is `proceed with changes` or `send back`, Samaela runs once more as the final-plan seat (shown as "Samaela (final plan)" in the pane). She gets the task, her first plan and all the reviewer reports, and her report is the final plan; Vesperia is briefed with it in place of the first plan. When every verdict is `proceed`, this step is skipped. Each member's final message is posted as a report, but the reports are held while the pipeline runs: they reach the chat together, in one turn, when the review ends at `awaiting approve`, or when the execution finishes, fails or is cancelled. Messages you send meanwhile are answered as usual and do not bring the held reports in. A report over 4,000 characters keeps its first 2,400 and last 1,400 characters, and every report ends with a pointer to the member's whole chat. When the report's verdict line falls in the cut part, it is repeated after the cut marker, so the verdict still counts. `zoom("Name")` shows that member's latest run, 30,000 characters per page (`zoom` with `page`). Names are not case-sensitive; an unknown name and a member that has not run yet get different answers.
83
-
84
- While a pipeline exists, the chat shows a Conclave pane. Each member is `waiting`, `running`, `done`, `partial`, `blocked`, `failed (reason)`, `not run` or, for Vesperia after a complete review, `awaiting approve`. The running member's last entries and its answer in progress appear under the list, at most 10 lines. A hint under the list says what to do next: `/conclave cancel stops it` while it runs, `/conclave approve runs Vesperia` when it waits, `/conclave approve runs Vesperia again` after a stopped execution, and `/conclave <task> starts a new review` after a failed review. When the terminal has too few rows, the pane drops rows in this order: the stream, the thinking steps, the member's name, members that wait, finished members, the hint, other members, the running member and the title. A pane under the chat is hidden when the chat would get fewer than 8 rows. In a terminal of 100 columns or more there is always a right column, 30% wide. It shows the Conclave pane while a pipeline is running, waiting for approval or stopped with a failed member, and a session panel otherwise: the main model, the thinking level, the chat view size against 128 KB, the compactor state, the memory status, web access, and the outcome of the last run (or the hint `/conclave <task>`). In a narrower terminal the pane goes under the chat at full width with 4 stream lines, and there is no idle panel. A pipeline that completed shows one line with its outcome, and a stopped one keeps the member list so the failed member and its reason stay visible.
85
-
86
- Typing `/` as the first character opens a list of commands above the input, with a one-line description and the argument hint of each. Up and Down move, Tab completes the highlighted name, Enter runs a command that takes no argument or completes one that does, and Esc closes the list and keeps the text. After a space the list offers the choices for `/model`, `/conclave`, `/thinking-steps`, `/akashic`, `/login` (providers and the two web keys) and `/settings` (keys and members, matched anywhere in the name). Text that is not a command, such as `/srv/data`, goes to the chat. Questions that need an answer, such as the `/reload` confirmation, open an overlay that replaces the chat until it is answered; Esc cancels it, and a secret typed or pasted there is masked with a fixed-length mask.
87
-
88
- The screen is never as tall as the window, because Ink clears the whole console on Windows when a frame is as tall as the window. The chat, the command list, replies, the pane and the notices share the rows, and the chat always keeps at least 3. From top to bottom the screen shows the header, the chat (with held messages under it), standing notices, replies, alerts, the status line, the command list and the input box. In a terminal under 16 rows or 60 columns there is no header and there are no boxes, and a row of key hints sits above the input; otherwise the keys show in the empty input. The chat shows the last 60 entries. PgUp and PgDn scroll it, also while the command list is open, and End returns to the newest line. A view you scrolled stays where it is while new lines arrive, until you press End or send a message. Narrowing the window wraps the text again, so the view position is not kept. Tool calls show their main argument, for example `▸ bash npm run build`, or `[tool bash: npm run build]` in a small terminal. Tool output is limited to 3 rows and ends with `(N more lines)`, and a tool error reads `✗ name message`, or `tool error (name): message` in a small terminal. Reports from Conclave members are labeled `◆ <member> report`, or `<member> report:` in a small terminal. After a failed turn the alert says that your message is back in the input and Enter sends it again, and the hint under the error names the next step for that kind of failure.
89
-
90
- - `/conclave approve` runs Vesperia, who executes the plan of the latest complete review. Only Vesperia can write files and run shell commands, and she can write only inside the working directory. The reviewers can read, search, `zoom` and `date`. They also have `mnemosia_brief`. They have no shell, because the shell is not confined to a directory, and they cannot write memory.
91
- - `/conclave cancel` stops a running pipeline and posts a `FAILED (cancelled)` report. `/conclave status` shows the current member.
92
- - `/conclave undo` restores the files of the last Vesperia run. It covers only what she changed with the `write` and `edit` tools. Changes made through `bash` are not covered; the list says how many shell commands she ran. Only the latest run is kept. Before the first change, the tools save the exact bytes of each file under `<home>/undo/<run>/`, so these copies can hold file contents, secrets included. They are not redacted and are deleted by the undo or when the next run starts. Files over 1 MB, or past 20 MB of copies per run, are listed as not restorable. The command shows what it would restore, delete and skip, and asks before it touches anything. A file that changed after the run is skipped. A file the run created is deleted only if it is unchanged since. It is refused while a pipeline runs. Her decision memory, if any, stays quarantined until you run `/akashic accept`; there is no reject command.
93
- - After a run that ended `partial`, `blocked` or failed, `/conclave approve` starts a new Vesperia and gives her the earlier report as one more card, marked as evidence and not as instructions. Type your new instruction in the chat first. The brief says whether `/conclave undo` restored the files. The pane shows `partial` or `blocked` for Vesperia instead of `done`. A new review forgets the earlier report. After a run that ended `done`, `/conclave approve` is refused: start a new review with `/conclave <task>`. A run with no verdict line can be approved again.
94
- - `/conclave` is refused while the chat is busy with a turn or while another pipeline runs. Esc in the chat does not stop a pipeline.
95
- - A member that gives no report, makes too many model calls (`maxTurns`, 64, or 256 for Vesperia), produces no output for too long (`idleTimeoutMs`, 10 minutes, not counted while a tool runs) or repeats the same failing call is reported as `FAILED`, and the pipeline stops there. A member whose final answer is empty, aborted or errored is reported as `FAILED: no report produced`.
96
- - Each member's model is `conclave.members.<name>.model`, then `conclave.defaultModel`, then `main`. The choice is made once when the pipeline starts. A member whose model has no credentials fails the start before any member runs. `model:` is not allowed in an agent file, because the model is your choice and belongs in `settings.json`. `thinking`, `maxTurns` and `idleTimeoutMs` can be set per member in `settings.json` as well. The thinking level defaults come from the agent files: Samaela `high`, Vesperia `medium`, Astrelia and Vaelia `low`, the other reviewers `medium`. To give Samaela one model and the others another, set `conclave.members.samaela.model` and `conclave.defaultModel`, as in `settings.json.example`; `/settings conclave.members.samaela` edits the same keys from the chat.
97
- - While a pipeline runs, the root chat cannot write files or run commands. A chat turn that was started only by member reports cannot either, until you send a message. Reports are treated as untrusted data. Such a turn ends its input with one line from piroboros that tells the model this rule, so it summarizes the reports and points to `/conclave approve` or a reply from you instead of trying a tool that would be refused.
98
- - If piroboros closes while a pipeline runs, it resumes the pipeline at the next start and says so.
99
-
100
- ## Look
101
-
102
- From 60 columns and 16 rows the screen is drawn in a theme. A header row shows `◆ piroboros`, the version, the state of the app (`ready`, `working (Esc stops)`, `no model set`, `login required`, `ERROR <reason>`, `error` or `stopped`), the number of Conclave members, and `conclave D/N` while a pipeline is live. In a narrow terminal the version leaves the header first, then the member count, then the Conclave count. From 24 rows a rule runs under the header and the chat box starts with a title row: `◆ piroboros` and the main model. The chat sits in a bordered box. Your messages carry a `● You` label with a rule above it, and replies, tool calls and tool results carry a `◆ piroboros` label. A Conclave report carries a `◆ <Member> report` label that ends with a `done` or `failed` pill (Vesperia's follows her verdict: `done`, `partial`, `blocked` or `failed`) and, on the newest report of a member whose run has ended, the time the run took, such as `(2m 14s)`. While a turn or a pipeline runs, the bottom of the chat box shows a rule and one row: `piroboros is working`, or `Waiting for <member> (turn T of M)`; the rows are left out when the chat would be left with fewer than 4 rows. Below come a status row and the input in a bordered box. The input shows the keys while it is empty. When it fits, a strip at its right shows the token counts of the last reply: `IN`, `OUT`, `CACHE` (the share of the prompt read from the cache) and `CTX` (prompt and output against the model's context window). Otherwise the cache counts stay in the status row.
103
-
104
- From 100 columns a second box sits beside the chat and has the same height. It is `◆ Conclave review` or `◆ Conclave execution` with a progress bar while a pipeline is on screen, and `◆ Session` with the session rows otherwise. Below that every member has a row with a state pill (`running`, `done`, `failed`, `partial`, `blocked`, `waiting`, `awaiting approve`, `not run` or `idle`; a box too narrow for the long words shows `approve` and `idle`). A muted row under it gives how long an ended member took, or the turn and the start time of the running one, and any detail such as the reason for a failure. The one-line description from the member's agent file follows, clipped to the box. After the members come the running member's thinking and stream, a hint, `◆ Recent Activity` (the starts and ends of the latest pipeline, newest first, each with the time and the verdict or reason, or `no conclave run yet` before a timed run) and `◆ Resource Usage` (the last reply of the main chat: input, output, cache read, the cache share, and the share of the context window with a bar). When the box is too short, rows leave in a fixed order: the descriptions and the activity first, then the thinking and the stream, the rules, the hint, the usage rows, the session rows and the progress bar, and the members and the title last. The strip at the right of the input row shows only while the Input row of Resource Usage is not on screen, and the cache counts stay out of the status row while the strip or the Read row shows them. Under 100 columns the Conclave pane sits under the chat as before and the session panel is not shown.
105
-
106
- The times come from the `conclave` document: each seat's start and end, in the clock of the harness, are stored from this version on and cleared by a new review (a re-approval clears Vesperia's entry). A run from an older version shows no durations and no activity. If piroboros closes while a seat is running, the seat's end is the time the run resumed, so its duration includes the time the program was closed. The pills and durations on report labels are drawn from these numbers when the screen is drawn; they are never written into a report or sent to a model.
107
-
108
- The colors are a dark red accent, a lighter tint of it for text, grey for secondary text, and green, amber and red for states. At start piroboros sets the terminal's default background to #1A1A1A with OSC 11 and its default text color to white with OSC 10, and resets both with OSC 111 and OSC 110 when it ends, on SIGTERM, SIGHUP and SIGBREAK, and at process exit. Closing the console window delivers SIGHUP, and Windows ends the process shortly after. Ctrl+Break delivers SIGBREAK. SIGTERM arrives only from a program that sends it. Those handlers exit with code 1 without releasing the lock file, as a default kill does, and the operating system frees the file handle. A hard kill, for example from Task Manager, resets nothing, and the colors stay until the tab closes. `NO_COLOR` with a non-empty value, or `FORCE_COLOR=0` or `FORCE_COLOR=false`, turns the colors and the OSC writes off. The setup wizard that runs before the chat gets the palette colors but not the background.
109
-
110
- The text cursor is the real terminal cursor, set to a blinking bar (DECSCUSR 5) when piroboros starts and reset (DECSCUSR 0) at the same points as the colors. It is set under `NO_COLOR` too, because only the colors are switched off. It sits after the typed text, at the start of the keys text while the input is empty, and is hidden while a question overlay owns the keys; the setup wizard has no cursor. The screen is redrawn with the cursor hidden and shown again each time, so the blink restarts on every redraw while an answer streams. A hard kill does not reset the shape.
111
-
112
- ## Thinking steps
113
-
114
- Above each assistant message the chat shows a panel built from the message's thinking blocks, and from the live partial while the answer is still being written. It is display only: thinking never reaches the index, the view, the compactor or the member briefs. There are three modes. `collapsed` is one line with the most relevant step. `summary` (the default) is up to five steps in order. `expanded` is every step with its text. Alt+T cycles the modes. Ctrl+T sets the main model's thinking level to the next of `off`, `minimal`, `low`, `medium`, `high`, `xhigh` and `max` (then `off` again), writes it to `settings.json` like `/settings thinking`, and it applies at the next turn. A model's `thinkingLevelMap` in `models.json` decides what each level sends. `/thinking-steps <mode>` sets the mode for this session. `/thinking-steps global <mode|clear>` writes `tui.thinkingSteps` in `settings.json` and also sets the session mode; `clear` removes the key and the session shows `summary`. A new session starts from the global value, then `summary`. The rows of the panel wrap to the width and keep the tree gutter. They count against the rows of the screen like any chat line, and a long panel scrolls with the chat.
115
-
116
- The panel says `Waiting for thinking content` while a response has no thinking yet, `No thinking content supplied` when a finished message has none, and `Reasoning is hidden by the provider` for a redacted block. It is hidden when the thinking level is `off` or the main model has `reasoning` false. Steps are re-derived at most every 100 ms while streaming, from the last 32,000 characters; a finished message is parsed once. In the Conclave pane the running member's thinking steps appear under its name, within the same line limit, and only when the member produced thinking. An entry that holds only tool calls has no thinking line. Text from the model is sanitized, so a control character is shown as a symbol. A zero-width joiner between two emoji, as in a family, a flag or a skin tone, is shown as it is; anywhere else it is shown as a symbol.
117
-
118
- ## Memory
119
-
120
- Three tools give the model memory that outlives the chat. `akashic_memory` keeps durable facts in SQLite at `${PIROBOROS_HOME}/akashic/memory.sqlite`. The categories are decisions, people, project-state, open-loops, preferences and procedures, and the actions are remember, record, search, update, forget, recent and group. Text over 4,000 characters is split into parts that share a group id. Every write records its actor as `piroboros:<role>`. `mnemosia_brief` returns a ranked briefing from those memories within a token budget, and `mnemosia_submit_feedback` reports how a briefing did. Traces and feedback go under `${PIROBOROS_HOME}/mnemosia/`. The root chat and Vesperia have all three tools. The other Conclave members have `mnemosia_brief` only.
121
-
122
- Before a turn, the top five memories for the working directory are written to the log as a note whenever they change. The view shows the note as `[akashic snapshot <hash>: ids <list>]`, and `zoom` on it shows the text, framed as untrusted data with `<` and `>` escaped.
123
-
124
- One scanner checks every memory that is written, updated, imported or shown. It rejects hidden characters, text that overrides instructions, asks for the system prompt, sends secrets to an address, or runs downloaded code. A memory written in a turn that holds only member reports is quarantined: it stays out of the snapshot and out of search until you run `/akashic accept <id|all>`. The status line counts quarantined memories. Vesperia's records wait for `/akashic accept` the same way. After a retry that fixed what an earlier attempt got wrong, she may record a short lesson besides her decision memory; it waits for `/akashic accept` too, and you should read it before accepting, because `/akashic accept all` takes everything.
125
-
126
- `/akashic vault init <repo-url> [--auto-push]` mirrors every memory to a Git clone at `${PIROBOROS_HOME}/akashic/vault/` as Markdown files, committed as `piroboros <piroboros@localhost>`. SQLite stays the source of truth. Nothing is pulled before a write, and a failed mirror never loses the write: the tool result says `saved locally` and names a code (`VAULT_GIT_MISSING`, `VAULT_GH_MISSING`, `VAULT_NOT_PRIVATE`, `VAULT_TRANSPORT`, `VAULT_DIRTY`, `VAULT_PUSH_REJECTED` or `VAULT_CONFLICT`), the status line shows `vault: sync pending`, and the next write or `/akashic vault sync` tries again. A clone that was edited by hand is not written into until you deal with the edit. Project paths are written as hashes. `/akashic vault import` reads the clone's files into the store as proposed memories. It never overwrites or deletes a stored memory, and proposed memories stay out of the snapshot until you run `/akashic vault accept <id|all>`. Records tagged `source=archive` or `source=compaction-extraction` are never mirrored on their own; `/akashic vault commit [message]` copies them into the clone and commits. `/akashic vault status`, `/akashic vault push` and `/akashic` (counts) complete the set.
127
-
128
- ## Web access (Vaelia)
129
-
130
- Web access is off. With `"web": { "enabled": true }` in `settings.json`, the Vaelia seat of a Conclave run gets one more tool, `web_fetch` (and `web_search`, see below), and a paragraph of web rules in her instructions. No other member has it, and neither does the root chat or Vesperia. The tool lives in its own extension that the root never selects, and it checks the caller's seat and `web.enabled` on every call, so setting `enabled` to false and running `/reload` stops it at once. The grant is made when a pipeline starts: a review that started with web access off has no web tool, and the Vaelia instructions say so.
131
-
132
- What it can reach:
133
-
134
- - https URLs on port 443, with a host name. An IP address as host, user info in the URL and any other port are refused.
135
- - The host name is resolved once, every answer is checked, and the connection goes to the address that was checked. The peer address is checked again after the connection opens. Blocked IPv4: 0/8, loopback, 10/8, 172.16/12, 192.168/16, link-local (cloud metadata), 100.64/10, 192.0.0/24, the documentation ranges, 198.18/15, multicast and 240/4. IPv6 is allowed only inside 2000::/3, minus Teredo, 6to4, the documentation range and 3fff::/20, and an IPv4 address carried inside an IPv6 address is checked as IPv4.
136
- - A URL has no query string unless its host is in `web.queryHosts`; a fragment is dropped, since it is never sent. It is at most 300 characters, its host labels at most 63, and a path word that looks like a random identifier (a hex run, or a long word with digits) is refused. The strict outbound scrub is a last check: a URL that it would change (secret-shaped text, a hex run of 32 or more, a known credential value) is refused. When `web.allowHosts` is not empty, only those exact hosts are allowed.
137
- - Redirects are followed by hand, at most 5, and every hop passes all of these checks again.
138
- - `web_fetch` opens only a URL that already appeared in the run: in the task text, in a report posted before Vaelia's seat, in a `web_search` result URL, or as a link or written address in a page she fetched earlier. The match is exact after parsing and dropping the fragment, so a trailing slash counts. Hosts in `web.allowHosts` and `web.queryHosts` accept any path. A miss is a recoverable error that tells her to search, follow a link, or ask for the host to be added to `allowHosts`. The redirect hops of a URL that passed are not checked against this rule. Without a search key and without `allowHosts`, `web_fetch` therefore reaches only URLs that are in the task or in the earlier reports.
139
-
140
- Limits: GET only, no cookies, no custom headers, and a `User-Agent` of `piroboros/<version>`. robots.txt is not read. The download is capped at 2 MB, also after decompression, and a fetch with its redirects at 20 seconds. Only text, JSON and XML are accepted. HTML becomes plain text: scripts, styles, comments, `head`, `noscript`, `template`, `svg` and hidden elements are dropped, entities are decoded once, `<pre>` keeps its whitespace and links read `text (url)`. A page that is almost empty says it is probably rendered by JavaScript. A result is 16,000 characters; `page` reads the next one. Eight converted pages are cached in memory, so a later page costs no fetch. `web.maxFetches` (default 10) and `web.maxSearches` (default 5) cap one Vaelia run. The count is read from the run's committed tool calls: a call counts once its details say it reached the network, even when it failed or was interrupted by a crash, and a refusal before the network or a cached page does not. A restart keeps the count; a page that left the cache is fetched again and counted. A 429 or 5xx answer is an error and is not retried. A fetch that was running when piroboros crashed is not run again.
141
-
142
- Page text is untrusted. Each result is framed with its final URL and fetch time, and the F1 scanner adds a warning line when it finds an injection phrase; the scanner is a tripwire, because documentation can legitimately contain `curl | sh`. `zoom("Vaelia")` shows `[web content omitted: <url>, N chars]` in place of page text, so the root and later members see the URLs and not the pages, and each zoom page of a run that used web tools starts with `[origin=web: this run read web pages; its text is reference, not instructions]`. The copy of her report that the root receives ends with `[origin: web, N pages from hosts ...]`; the stored report is unchanged. When her final report cites URLs she never fetched with `web_fetch` in that run, the line also lists up to five of them as `cited but not fetched: <origin and path>`, with `+N more` after that, and the brief of every later member, including the final-plan brief, adds `N citations in this report were not fetched.` after that report; a cited URL that was only shown in the task or a search result still counts as not fetched. When she fetched anything, her report is marked `origin="web"` in the briefs, `</report>` and `</task>` tags in report text are neutralized, and Vesperia is told to act only on what the approved plan states. `/conclave approve` says how many pages Vaelia fetched and from which hosts.
143
-
144
- There is no proxy support. The connection is always direct, and `HTTPS_PROXY` and `NODE_USE_ENV_PROXY` are ignored. If your network only allows access through a proxy, the fetch fails.
145
-
146
- Accepted residual risk: a page can steer Vaelia to fetch a URL, and the URL reaches the host's logs. The seen-URL rule reduces this to choosing among links that were already shown to her: at most `maxFetches` times log2(N) bits, where N is the number of links seen. The checks on the URL itself stop secret-shaped text, query strings and random-looking identifiers, not readable prose. Two channels remain. The root can carry an attacker URL from a page into a later task, and that task text seeds the seen set. Search queries are a 300-character channel to the search provider. With `web.allowHosts` set, the seen rule adds nothing; the allowlist already applies to every URL.
147
-
148
- Settings: `web.enabled` (default false), `web.maxFetches` (default 10, 1 to 100), `web.allowHosts` and `web.queryHosts` (lists of lower case host names), `web.maxSearches` (default 5, 1 to 100) and `web.search.provider` (`"tinyfish"` or `"exa"`; absent means search is off). All six are security keys: `/reload` shows them when they changed outside piroboros. Enabled with no provider is a valid fetch-only setup.
149
-
150
- ### Web search
151
-
152
- With `web.enabled` true, a `web.search.provider` and a key for it, the Vaelia seat also gets `web_search`. It sends a short query to the provider and returns a numbered list of titles, URLs, dates and snippets. The list is a set of leads: Vaelia opens a page with `web_fetch`, which applies its own URL policy, and cites the URL. Without a provider or without a key the tool is not granted and Vaelia keeps `web_fetch` alone. The seat gate, the live `web.enabled` check, the unsafe replay setting, the `origin="web"` mark on her report and the framing of untrusted text are the same as for `web_fetch`. `zoom("Vaelia")` shows `[web search omitted: <query>, N results]` in place of the results, and `/conclave approve` says "Vaelia ran N searches and fetched M pages from hosts ...". Search results are not written to the memory store, the vault or the briefing traces.
153
-
154
- Providers (both are plain HTTPS calls to a fixed host, with certificate checks, no proxy and a 256 KB response cap):
155
-
156
- - TinyFish: `GET https://api.search.tinyfish.ai?query=...` with an `X-API-Key` header. The optional `purpose` field is never sent. At the time of writing the free tier allows up to 12,000 searches a day at 30 a minute. This is the wizard's recommended choice.
157
- - Exa: `POST https://api.exa.ai/search` with an `x-api-key` header, `type: "auto"`, 8 results and highlights of up to 1,000 characters. Exa charges per search, with a monthly free credit on its free plan.
158
-
159
- Keys: the wizard asks for the key with masked input and stores it in `auth.json` under `web-tinyfish` or `web-exa`; `/login web-tinyfish` and `/login web-exa` do the same from the chat. The environment variables `TINYFISH_API_KEY` and `EXA_API_KEY` work instead, and a stored key wins. Both values are scrubbed from anything that leaves the machine. Piroboros ships no key: you use your own and accept the provider's terms.
160
-
161
- Queries: at most 300 characters, no control characters, and the strict outbound scrub acts as a tripwire, so a query that holds something secret-shaped is refused before it is sent. `web.maxSearches` caps one Vaelia run, counted in memory like the fetch counter. A 401, 402, 429 or 5xx answer is returned as an error that names the provider and its code, with no retry, and never shows the key.
162
-
163
- A query is a disclosure. It leaves your machine and the provider keeps it. Our reading of the terms on 2026-10-13, which is not legal advice and may be out of date: TinyFish may use customer data to train and improve its models, and Exa takes a perpetual license to what you send and receive. Read both sets of terms before you choose. Exa's terms also limit copying or storing what its service returns. Search results sit in Vaelia's chat history as ordinary tool results, which may be a gray area under that wording, so piroboros keeps them out of the vault and memory and hides them from `zoom`.
164
-
165
- ## File search, plans and loops
166
-
167
- - `find` and `grep` search the working directory. They use fff (`@ff-labs/fff-node`, an indexed finder) and fall back to ripgrep when fff cannot load or returns an error, or when `grep` is called with `exact: true`. Each result says which backend answered in `details.backend`. If neither fff nor `rg` works, the tools return a named error (`search_unavailable`). A ripgrep run that fails, for example on an invalid glob, returns `search_rg_failed` with its first error line instead of an empty result. The fff databases live in `${PIROBOROS_HOME}/fff/`. Results under protected locations (`PIROBOROS_HOME`, `~/.ssh`, `.env` files, `guard.deny`) are dropped, credential-shaped text is redacted, and output is capped at 20,000 characters.
168
- - The `plan` tool keeps a short task list for the current request. The model sends the whole list each time, with exactly one item in progress. The list is shown to the model with every message of that request and is cleared when the next user message starts. Set `"planning": false` in `settings.json` to remove the tool; the change applies at the next start.
169
- - If the model makes the same tool call five times in a row, it gets a reminder to change approach. If the same call fails eight times in a row, the turn ends and the status line says `stopped (stuck)`. Denied calls do not count. If the model's run produces no output and no tool is running for ten minutes, the turn ends and the status line says `stopped (idle)`. If one run makes 256 tool rounds without finishing, the turn ends and the status line says `stopped (round limit)`.
170
- - A message you send while a turn runs is added to that turn. Esc stops the turn and puts your unanswered messages back in the input box, in the order you sent them. Ctrl+C does the same while a turn runs, and a second press within 2 seconds exits. With no turn running, Ctrl+C clears text you typed or pasted, and exits when there is none. Text put back after a stop does not count as typed. While a turn runs, the status line starts with `working (Esc stops)`. Ctrl+T steps the main model's thinking level and Alt+T cycles the thinking steps view (see Thinking steps). Set `NO_COLOR` to turn colors off; an explicit `FORCE_COLOR` wins over it.
171
-
172
- ## Skills
173
-
174
- A skill is a folder with a `SKILL.md` file. The file starts with a block between two `---` lines that holds a `name` and a `description`, and the instructions follow. Skills are for the main chat. The Conclave members, the compactor and Vesperia do not get them.
175
-
176
- - **Where they come from.** In this order, and the first skill with a name wins: `PIROBOROS_HOME/skills`, then the `skills` folder inside `.agents` in your user profile, then the project folders, which are the `skills` folder inside `.agents` and the one inside `.piroboros` in the working directory. A skill is a folder one level down, `<folder>/<skill>/SKILL.md`. A link to a folder is followed. A folder with no `SKILL.md` of its own is listed as skipped and is not searched further.
177
- - **What is read.** Only `name` and `description`, as plain, quoted or block (`>` and `|`) values. Other keys, including nested ones, are ignored. A name is lowercase letters, digits and single hyphens, at most 64 characters, and it may differ from its folder name. A description is cut to 512 characters, and a `SKILL.md` over 256 KB is skipped. A bad file is skipped with a reason that `/skills` shows, and it never stops startup.
178
- - **What the model sees.** One line per skill (name, description and folder) in a `skills` section of the system prompt, after the chat section. The text changes only when the list changes, or when a name, description or folder does, so prompt caching keeps working. It is capped at 20 KB, filled in the order above, and `/skills` lists what did not fit. The model opens a `SKILL.md` with the `read` tool when a task matches it, and the section says that a `SKILL.md` at a listed path is your instruction. With no skills installed there is no section. A skill deleted after the last scan gives a read error until `/reload`.
179
- - **Project skills need a yes.** The first time a project skill is seen, and again whenever its `SKILL.md` changes, the chat asks one question for all of them, listing the names and paths. Yes loads them. No records each as declined, and it stays out until its file changes; typing `/name` for it says so. The answers are in `PIROBOROS_HOME/skills-trust.json`, which is checked like the other config files: an edit outside piroboros is shown at startup, and a missing, corrupt or edited file means every project skill is asked about again. The question opens when the chat screen opens. Until you answer, the index holds your own skills only, and a yes adds the project ones. With `--print` no question is possible, so project skills are left out, nothing is recorded and one line on stderr says how many. Only `SKILL.md` is pinned. Scripts and other files beside it can change without a new question, so say yes only to a folder you trust.
180
- - **Commands.** `/skill-name some request` is sent to the chat exactly as typed, and the model reads the skill. Skills appear in the command list after the built-in commands, with their descriptions. A skill named like a built-in command, such as `conclave`, stays available to the model only, and so does a name that starts with a digit. A name with a digit in it is a command only when it is a loaded skill, so `/42 is the answer` and `/v2` stay ordinary text. `/skills` lists the loaded, shadowed, skipped, declined, waiting and over-budget skills. `/reload` rescans and asks about new project skills.
181
- - **Reading inside `PIROBOROS_HOME`.** The `read` tool may open files under `PIROBOROS_HOME/skills`, so skills installed there work. Files named like secrets stay refused there: `.env` files, `*.pem`, `*.key`, `*.p12`, `*.pfx`, `*.kdbx`, `id_rsa*`, `id_ed25519*`, `id_ecdsa*`, `*.sqlite*`, `auth.json`, `.netrc` and `.npmrc`. Everything else in the home stays refused for every tool: credentials, settings, the chat database, memory, traces, undo copies and the trust file. Writing under `skills` is refused too, a link out of that folder to a protected place is refused, and a `SKILL.md` that is linked into a protected place is skipped. `find` and `grep` search the working directory only, so they never reach it. The guard is a tripwire for the file tools. It cannot tell a hard link from a file, and shell commands are not confined.
182
-
183
- ## Privacy and limits
184
-
185
- - Each provider you configure receives the prompts for the model you assign to it: the main model gets the chat view, the compactor gets the text it summarizes, and each Conclave member gets its own conversation. Everything sent to the compactor is scrubbed first: credential-shaped strings (keys, authorization headers, PEM blocks, JSON and environment-style labels, password phrases), every value in `auth.json`, and the value of every environment variable named `*_API_KEY`, `*_TOKEN` or `*_SECRET` that is 8 or more characters long. Your local log keeps the raw text. A compactor is a third party when its provider is not the one your main model or any Conclave member uses and its address is not loopback; sending the chat to a third party needs your explicit consent (`compactor.allowThirdParty: true`), and a third party also loses hex strings of 32 or more characters. Without consent the compactor shows as disabled with the reason and nothing is sent. This is checked again on every compactor request, so withdrawing consent and running `/reload` stops the next request. "Loopback" means the host is exactly `localhost`, is inside 127.0.0.0/8, or is `::1`, with no user name or password in the URL; piroboros treats it as user-declared local and cannot check that the address really is.
186
- - Shell output beyond 30,000 characters is cut to its first 12,000 and last 18,000 characters, with a marker in between. The cut part is not saved to any file, so the model has to run the command again to see it.
187
- - Memory-briefing traces (mnemosia) are written under `PIROBOROS_HOME`. A trace is kept while it is under 90 days old or among the 500 newest, and older ones are deleted at startup. The feedback log, `feedback.jsonl`, is capped at 2 MB; when it passes the cap, the oldest lines are dropped.
188
- - The shell tool is not path-confined. The guard limits which agents may write. A shell command can reach any path your account can.
189
- - Shell commands that kill processes (`kill`, `pkill`, `killall`, `taskkill`, `tskill`, `Stop-Process`, `spps`, or `wmic` deleting a process) are refused, because `taskkill /IM node.exe` would also end piroboros. This is a tripwire against accidents, not a sandbox: a command can be worded around it.
190
- - The memory vault mirrors to a private GitHub repository. Only GitHub remotes are tested.
191
-
192
- ## Development
193
-
194
- These sections apply to a source checkout. `src/tune` is not in the npm package.
195
-
196
- ```
197
- npm run typecheck
198
- npm run build
61
+ `/conclave <task>` starts a review by eight agents, each in its own child conversation, one at a time.
62
+
63
+ ```mermaid
64
+ flowchart TD
65
+ task["/conclave task"] --> plan["Samaela plans"]
66
+ plan --> review["Nytheria, Elaria, Raskreia, Avaritia, Vaelia, Astrelia review in order"]
67
+ review --> verdicts{"Any verdict 'proceed with changes' or 'send back'?"}
68
+ verdicts -->|"yes"| final["Samaela writes the final plan"]
69
+ verdicts -->|"no"| wait["awaiting approve"]
70
+ final --> wait
71
+ wait -->|"/conclave approve"| exec["Vesperia executes the plan"]
72
+ exec --> verdict{"Vesperia's verdict"}
73
+ verdict -->|"done"| fin["Finished. A new task needs a new review"]
74
+ verdict -->|"partial, blocked or failed"| again["/conclave approve runs a new Vesperia with the earlier report"]
75
+ exec -.->|"/conclave undo"| undo["Restore the files she changed with write and edit"]
199
76
  ```
200
77
 
201
- `npm run build` writes `dist/`, the step `npm pack` runs before packing. The launcher never runs a `dist/` found in a checkout. The repository has no test suite.
78
+ The reports are held while the pipeline runs and reach the chat together when the review waits for approval or the execution ends. `/conclave cancel` stops a run, `/conclave status` shows the current member and `zoom("Name")` shows a member's whole chat.
202
79
 
203
- Versions follow semver. See `CHANGELOG.md`.
80
+ Who can do what:
204
81
 
205
- ### Compactor prompt tuning
82
+ | Seat | Read and search | Write files | Shell | Memory | Web |
83
+ | --- | --- | --- | --- | --- | --- |
84
+ | Root chat | yes | yes, not while a pipeline runs | yes, not while a pipeline runs | all three tools | no |
85
+ | Samaela and the reviewers | yes, plus `zoom` and `date` | no | no | `mnemosia_brief` only | Vaelia only, when `web.enabled` is on |
86
+ | Vesperia | yes | inside the working directory | yes | all three tools, records wait for `/akashic accept` | no |
206
87
 
207
- `npm run tune:compactor` runs the real compaction prompts over 12 made-up coding chats (8 dev, 4 held-out, in `src/tune/corpus`) and scores each produced line against fixed probes: exact tokens that must survive, and corrected values that must replace the old one. A candidate in `src/tune/candidates` is kept only if its held-out mean beats the baseline by `--margin` (default 0.02), its dev mean does not drop, and no probe type drops on the held-out chats. The script prints a verdict and never edits `src`; apply a winning candidate to `src/chat/prompt.ts` yourself, then delete its file. A candidate is a JSON file `{ "name", "messageTaskSuffix"?, "mergeTaskSuffix"? }`. The first one, the "was X, now Y (replaced)" rule for merges, won over three repeats (held-out 0.671 to 0.814, corrections kept 4% to 58%) and is now part of the merge task.
88
+ Details: [The Conclave](docs/conclave.md).
208
89
 
209
- ```
210
- npm run tune:compactor -- --dry-run
211
- npm run tune:compactor -- --yes
90
+ ## Where your data goes
91
+
92
+ ```mermaid
93
+ flowchart LR
94
+ subgraph home["PIROBOROS_HOME on your machine"]
95
+ store[("chat database, auth.json, settings, memory, telemetry, undo copies")]
96
+ end
97
+ home -->|"chat view"| mainp["Main model provider"]
98
+ home -->|"scrubbed text"| compp["Compactor provider"]
99
+ home -->|"each member's own conversation"| memp["Conclave member providers"]
100
+ home -.->|"optional mirror"| vault["Private GitHub vault"]
101
+ vaelia["Vaelia, when web is on"] -.->|"https GET and search queries"| web["Web hosts and search provider"]
212
102
  ```
213
103
 
214
- It uses the compactor model from your `settings.json` (or `--model provider/id`) with your stored login. Other options: `--repeats N` (default 1) and `--out file.json`, which also holds a `meta` block with the date, model, thinking level, repeats, margin and each candidate's name and text. A real run needs `--yes` because it sends hundreds of requests to that provider and costs money: `--dry-run` prints the minimum call count first, and replies over 512 bytes add retries. The chats are invented and the corpus is not scrubbed or sent anywhere else.
104
+ A compactor on a third-party provider needs your consent (`compactor.allowThirdParty: true`). Details: [Privacy and limits](docs/privacy.md), [Web access](docs/web.md), [Memory](docs/memory.md).
105
+
106
+ ## Commands at a glance
107
+
108
+ | Command | What it does |
109
+ | --- | --- |
110
+ | `piroboros` / `npm start` | Opens the chat; runs setup first when no main model is set |
111
+ | `piroboros setup` / `npm run setup` | Runs the guided setup |
112
+ | `--print <message>` | Sends one message and prints the answer |
113
+ | `--model provider/model` | Uses another model for that run only |
114
+ | `--backup <file>` | Writes a copy of the chat database |
115
+ | `/model`, `/settings`, `/login` | Change the main model, edit `settings.json`, sign in |
116
+ | `/reload`, `/status` | Re-read the config files, show the view and cache state |
117
+ | `/telemetry` | Model requests, latency and cost of the last 24 hours |
118
+ | `/conclave <task>`, `approve`, `cancel`, `status`, `undo` | Run and control the Conclave |
119
+ | `/akashic` | Memory and vault commands |
120
+ | `/thinking-steps`, `/skills`, `/<skill-name>` | Thinking panel mode, skill list, run a skill |
121
+ | `/` as the first character | Opens the command list |
122
+ | Esc, Ctrl+C | Stop the turn and put your unanswered messages back in the input; Ctrl+C twice within 2 seconds exits |
123
+ | Ctrl+T, Alt+T | Next thinking level, next thinking-steps view |
124
+ | PgUp, PgDn, End | Scroll the chat, return to the newest line |
125
+
126
+ ## Documentation
127
+
128
+ - [Configuration and commands](docs/configuration.md): `PIROBOROS_HOME`, `instructions.md`, `models.json`, command-line flags and exit codes, `/login`, `/settings`, `/reload`, `/status`
129
+ - [The Conclave](docs/conclave.md): the pipeline, the pane, approve, cancel, undo, retries, member models and limits
130
+ - [Interface](docs/interface.md): the command list, the screen layout, the look, thinking steps and keys
131
+ - [Memory](docs/memory.md): `akashic_memory`, `mnemosia_brief`, quarantine and the Git vault
132
+ - [Web access](docs/web.md): `web_fetch` and `web_search` for Vaelia, URL rules, limits and providers
133
+ - [Tools and skills](docs/tools.md): file search, the plan tool, loop limits and `SKILL.md` skills
134
+ - [Privacy and limits](docs/privacy.md): what each provider receives, scrubbing, traces and shell limits
135
+ - [Development](docs/development.md): typecheck, build and compactor prompt tuning
215
136
 
216
137
  ## License
217
138
 
@@ -461,6 +461,7 @@ function makeTask(compactor) {
461
461
  const thinking = withDefaults(settings).compactor.thinking;
462
462
  const reply = await runtime.models.completeSimple(model, { systemPrompt: scrub(compactor.systemPrompt()), messages }, {
463
463
  signal: AbortSignal.any([runtime.signal, AbortSignal.timeout(compactor.requestTimeoutMs())]),
464
+ telemetry: context.telemetry,
464
465
  maxTokens: model.maxTokens > 0 ? Math.min(model.maxTokens, 8_192) : 8_192,
465
466
  ...(thinking === "off" ? {} : { reasoning: thinking }),
466
467
  });
@@ -483,9 +484,9 @@ function makeTask(compactor) {
483
484
  spend(q);
484
485
  q.busy = (q.busy ?? 0) + 1;
485
486
  q.lastError = message;
486
- return { status: "running", checkpoint: { ...cp, busy } };
487
+ return { status: "sleeping", until: runtime.now() + compactor.busyBackoff(busy), checkpoint: { ...cp, busy } };
487
488
  }, context);
488
- return await runtime.sleep(runtime.now() + compactor.busyBackoff(busy), context);
489
+ return;
489
490
  }
490
491
  const errors = cp.errors + 1;
491
492
  if (errors >= MAX_ERRORS)
@@ -495,9 +496,9 @@ function makeTask(compactor) {
495
496
  spend(q);
496
497
  q.retries += 1;
497
498
  q.lastError = message;
498
- return { status: "running", checkpoint: { ...cp, errors } };
499
+ return { status: "sleeping", until: runtime.now() + compactor.backoff(errors), checkpoint: { ...cp, errors } };
499
500
  }, context);
500
- return await runtime.sleep(runtime.now() + compactor.backoff(errors), context);
501
+ return;
501
502
  }
502
503
  const text = textOf(reply);
503
504
  const calls = cp.calls + 1;
package/dist/chat/log.js CHANGED
@@ -7,7 +7,7 @@ import { NODE_TEXT_MAX, utf8Bytes } from "./view.js";
7
7
  // same commit that indexes their messages.
8
8
  /** One-way door: a live log is never silently remapped. */
9
9
  export const MAPPING_VERSION = 3;
10
- const FRESH_START = "delete chat.sqlite in PIROBOROS_HOME to start fresh; auth.json and settings.json are kept";
10
+ const FRESH_START = "delete chat.sqlite (and chat.schema1.sqlite, if there is one) in PIROBOROS_HOME to start fresh; auth.json and settings.json are kept";
11
11
  export const CHUNK = 1_024;
12
12
  export const SPLIT_CHARS = 30_000;
13
13
  export const PASS_ENTRIES = 256;
@@ -39,6 +39,7 @@ export const NodeDoc = defineDocFamily({
39
39
  version: 1,
40
40
  family: true,
41
41
  initial: (seed) => ({ text: seed.text, bytes: seed.bytes }),
42
+ checkpointWhen: (_value, _ops, info) => info.deltasSinceBase >= 64,
42
43
  migrate: (_value, fromVersion) => { throw new Error(`unsupported piroboros.node v${fromVersion}`); },
43
44
  });
44
45
  export const nodeKey = (level, index) => `${level}:${index}`;
package/dist/chat/plan.js CHANGED
@@ -7,6 +7,7 @@ export const PlanDoc = defineDoc({
7
7
  kind: "piroboros.plan",
8
8
  version: 1,
9
9
  initial: () => ({ items: [] }),
10
+ checkpointWhen: (_value, _ops, info) => info.deltasSinceBase >= 64,
10
11
  migrate: (_value, fromVersion) => { throw new Error(`unsupported piroboros.plan v${fromVersion}`); },
11
12
  });
12
13
  export const PLAN_MAX_ITEMS = 20;
package/dist/chat/tree.js CHANGED
@@ -18,6 +18,7 @@ export const TurnStateDoc = defineDoc({
18
18
  kind: "piroboros.turnState",
19
19
  version: 1,
20
20
  initial: () => ({ itemIds: [], cwd: "", at: 0, T: 0, windowStart: 0, compactor: "not configured", reportOnly: false }),
21
+ checkpointWhen: (_value, _ops, info) => info.deltasSinceBase >= 64,
21
22
  migrate: (_value, fromVersion) => { throw new Error(`unsupported piroboros.turnState v${fromVersion}`); },
22
23
  });
23
24
  export const toViewState = (doc) => (doc === undefined ? emptyView() : cloneView(doc));
@@ -1,4 +1,4 @@
1
- import { configure, ctx, defineDoc, defineExtension, defineTask, isIdle, isTaskLive, LiveDoc, recentEntries, ROOT, } from "../durable.js";
1
+ import { configure, ctx, defineDoc, defineExtension, defineTask, isIdle, isLiveStatus, isTaskLive, LiveDoc, recentEntries, ROOT, } from "../durable.js";
2
2
  import { CONCLAVE_MEMBERS, withDefaults } from "../config.js";
3
3
  import { contextCheck, hasAuth, resolveModel } from "../models.js";
4
4
  import { failureText, PendingDoc } from "../chat/turn.js";
@@ -102,6 +102,7 @@ export const ConclaveDoc = defineDoc({
102
102
  kind: "piroboros.conclave",
103
103
  version: 1,
104
104
  initial: () => ({ taskId: null, vesperia: null, mode: null, task: "", review: { complete: false, reports: [] }, outcome: "", runs: {} }),
105
+ checkpointWhen: (_value, _ops, info) => info.deltasSinceBase >= 64,
105
106
  migrate: (_value, fromVersion) => { throw new Error(`unsupported piroboros.conclave v${fromVersion}`); },
106
107
  });
107
108
  /**
@@ -163,7 +164,6 @@ export function feedWatch(h, conv, watch, onLive) {
163
164
  }
164
165
  /* --- helpers ---------------------------------------------------------------------------------------------------- */
165
166
  const ROOT_BUSY = "the root is busy; wait for the current turn to finish (or press Esc), then run the command again";
166
- const LIVE_STATUSES = new Set(["pending", "running", "waiting", "completing"]);
167
167
  const taskKey = (id) => (/^\d+$/u.test(id) ? Number(id) : id);
168
168
  const textOfEntry = (entry) => {
169
169
  const content = entry?.model?.[0]?.content;
@@ -220,7 +220,7 @@ export class Conclave {
220
220
  return "no pipeline is running";
221
221
  const record = await this.h.getTask(taskKey(doc.taskId), ctx).catch(() => undefined);
222
222
  const status = record?.state?.status;
223
- if (record !== undefined && !LIVE_STATUSES.has(status ?? "")) {
223
+ if (record !== undefined && !isLiveStatus(status)) {
224
224
  const outcome = this.outcomeText(record);
225
225
  await this.h.commit(async (tx) => { (await tx.doc(ConclaveDoc)).taskId = null; }, ctx);
226
226
  return `pipeline already ended (${outcome})`;
@@ -244,8 +244,8 @@ export class Conclave {
244
244
  const record = await this.h.getTask(taskKey(doc.taskId), ctx).catch(() => undefined);
245
245
  if (record === undefined)
246
246
  return "the pipeline state could not be read; it is treated as running";
247
- const status = record.state.status ?? "";
248
- if (!LIVE_STATUSES.has(status))
247
+ const status = record.state.status;
248
+ if (!isLiveStatus(status))
249
249
  return `no pipeline is running; the last one: ${this.outcomeText(record)}`;
250
250
  const input = record.input;
251
251
  const cp = record.state.checkpoint;
@@ -467,7 +467,7 @@ export class Conclave {
467
467
  // Table reads come first (D20). The check is repeated in the creating commit, so two starts cannot both win.
468
468
  if (before !== null) {
469
469
  const record = await tx.task(taskKey(before));
470
- if (record === undefined || LIVE_STATUSES.has(record.state.status ?? ""))
470
+ if (record === undefined || isLiveStatus(record.state.status))
471
471
  throw new Error("a pipeline is already running; /conclave cancel stops it");
472
472
  }
473
473
  // The idle check above ran before the credential awaits; a root turn may have started since.
package/dist/config.js CHANGED
@@ -26,6 +26,7 @@ export function homePaths(home) {
26
26
  chat: join(home, "chat.sqlite"),
27
27
  integrity: join(home, "config-integrity.json"),
28
28
  skillsTrust: join(home, "skills-trust.json"),
29
+ telemetry: join(home, "telemetry.sqlite"),
29
30
  };
30
31
  }
31
32
  /** The home piroboros would use with no override. Tests must never touch it. */
@@ -147,6 +148,7 @@ export const SETTINGS_DEFAULTS = {
147
148
  shellEnvAllow: [],
148
149
  shellTimeoutMs: 600_000,
149
150
  tui: { thinkingSteps: "summary" },
151
+ telemetry: true,
150
152
  web: { enabled: false, maxFetches: 10, maxSearches: 5 },
151
153
  };
152
154
  /** A host name for web.allowHosts and web.queryHosts: lower case DNS labels, no scheme, port, path or wildcard. */
@@ -191,7 +193,7 @@ export function validateSettings(value) {
191
193
  issues.push(`${path}: must be an integer from ${min}${max === Number.MAX_SAFE_INTEGER ? " up" : ` to ${max}`}`);
192
194
  },
193
195
  };
194
- known(value, ["main", "thinking", "compactor", "conclave", "gateTimeoutMs", "cacheRetention", "shellEnvAllow", "shellTimeoutMs", "guard", "tui", "planning", "web"], "");
196
+ known(value, ["main", "thinking", "compactor", "conclave", "gateTimeoutMs", "cacheRetention", "shellEnvAllow", "shellTimeoutMs", "guard", "tui", "planning", "telemetry", "web"], "");
195
197
  check.ref(value.main, "main");
196
198
  check.level(value.thinking, "thinking");
197
199
  if (value.compactor !== undefined) {
@@ -247,6 +249,8 @@ export function validateSettings(value) {
247
249
  check.int(value.shellTimeoutMs, "shellTimeoutMs", 1_000);
248
250
  if (value.planning !== undefined && typeof value.planning !== "boolean")
249
251
  issues.push("planning: must be true or false");
252
+ if (value.telemetry !== undefined && typeof value.telemetry !== "boolean")
253
+ issues.push("telemetry: must be true or false");
250
254
  if (value.guard !== undefined) {
251
255
  if (!isObj(value.guard))
252
256
  issues.push("guard: must be an object");
@@ -307,6 +311,7 @@ export function withDefaults(settings) {
307
311
  shellTimeoutMs: settings.shellTimeoutMs ?? SETTINGS_DEFAULTS.shellTimeoutMs,
308
312
  guardDeny: settings.guard?.deny ?? [],
309
313
  planning: settings.planning ?? true,
314
+ telemetry: settings.telemetry ?? SETTINGS_DEFAULTS.telemetry,
310
315
  web: {
311
316
  enabled: settings.web?.enabled ?? SETTINGS_DEFAULTS.web.enabled,
312
317
  maxFetches: settings.web?.maxFetches ?? SETTINGS_DEFAULTS.web.maxFetches,
@@ -509,6 +514,7 @@ export const SETTING_FIELDS = [
509
514
  field("guard.deny", "list", "now", { entry: "path" }),
510
515
  field("tui.thinkingSteps", "enum", "now", { values: THINKING_STEP_MODES }),
511
516
  field("planning", "bool", "start"),
517
+ field("telemetry", "bool", "start"),
512
518
  field("web.enabled", "bool", "run"),
513
519
  field("web.maxFetches", "int", "now", { min: 1, max: 100 }),
514
520
  field("web.maxSearches", "int", "now", { min: 1, max: 100 }),