pitroom 0.8.1 → 0.10.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.
@@ -7,7 +7,7 @@
7
7
  "plugins": [
8
8
  {
9
9
  "name": "pitroom",
10
- "description": "Delegate research, fixes, tests and parallel investigations to cheap OpenCode, Codex or Claude Code workers, with verified answers, exact diffs and cost receipts.",
10
+ "description": "Delegate research, fixes, tests and parallel investigations to cheap OpenCode, Codex, Claude Code or Gemini CLI workers, with verified answers, exact diffs and cost receipts.",
11
11
  "source": {
12
12
  "source": "npm",
13
13
  "package": "pitroom"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pitroom",
3
3
  "description": "A free pit crew for your expensive coding agent: the superpowers development workflow, run by cheap workers. Delegate research, fixes, tests, reviews and whole plans from Claude Code, Codex or any agent to OpenCode, Codex or Claude Code workers, with receipts that prove the savings.",
4
- "version": "0.8.1",
4
+ "version": "0.10.0",
5
5
  "author": {
6
6
  "name": "TahaAtas"
7
7
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pitroom",
3
- "version": "0.8.1",
3
+ "version": "0.10.0",
4
4
  "description": "A free pit crew for your expensive coding agent: delegate research, fixes, tests, reviews and parallel investigations to cheap worker agents running your own models, with verified answers, exact diffs and cost receipts.",
5
5
  "author": {
6
6
  "name": "TahaAtas"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.0
4
+
5
+ ### Audits
6
+ - A finished read run's answer can be re-checked in the background by another worker, which verifies the key claims against your project and replies `AGREE`, `PARTIAL` or `DISAGREE` with the claims it disputes. Pitroom already checked that every cited `path:line` exists; an audit checks that what is said about it is true.
7
+ - Ways to use it: `pitroom audit RUN [-W worker]` now; `pitroom run --audit` / `--no-audit` per run; `"audit": 0.1` in the config (or `PITROOM_AUDIT=0.1`) for about one read run in ten, chosen by a stable hash of the run id. The auditor is the `audit` tier, else `cheap`.
8
+ - **Off by default.** An audit costs about the rate times the answer's own tokens, runs detached after the run and never delays or fails it. The auditor is never the worker and model that gave the answer, and does not fall back to it; with no other worker nothing starts and `pitroom doctor` says so. Only read runs are audited, never reviews, changes or other audits.
9
+ - The verdict and the disputed claims are on the audited run (`pitroom show`, the dashboard card with an `audited · agrees/disagrees` badge and a note, History), and Stats has an Audited column per worker (confirmed/audited). Audits are not counted as runs and are not in the savings ledger.
10
+ - An audit is a sample, not a guarantee: the auditor is a model too and can share a blind spot.
11
+
12
+ ### Tests
13
+ - Test cleanup retries when a background process (Chrome, a dash server, an audit) is still writing as a test directory is removed (an `ENOTEMPTY` flake seen on CI).
14
+
15
+ ## 0.9.0
16
+
17
+ ### Gemini CLI worker (beta)
18
+ - A fourth worker: `-W gemini` (or `gemini:<model>`). Read runs use Gemini's `plan` approval mode, isolate and write runs use `auto_edit`; never `--yolo`. Shell commands that change history or delete in bulk (`git commit`, `git push`, `rm -rf`, `sudo`, other agents) are refused by Pitroom's policy files (`policies/gemini`), which ship in the package.
19
+ - Workers run in a private Gemini home (`<pitroom home>/gemini-home`): your hooks, MCP servers, skills and global `GEMINI.md` are not loaded, and your sign-in method is carried over. Folders you trusted in Gemini stay trusted; `PITROOM_GEMINI_TRUST=1` trusts others (`--skip-trust`).
20
+ - Needs a Google AI Studio API key (`gemini` stores it, or `GEMINI_API_KEY`): Google refuses account sign-in for this CLI (`IneligibleTierError`). Pin a model, e.g. `-W gemini:gemini-3.8-flash`: the 2.5 models are no longer served to new keys, and the free tier has a small daily quota per model. Tokens are reported, cost is not.
21
+ - Tried against Gemini CLI 0.62; real runs are recorded as test fixtures. **Not enforced by Gemini 0.62, so do not rely on it:** the secret-file deny rules (`.env`, `*.pem`, keys): use `--isolate`. The web-tool rule was not verified. Details in `docs/backends.md`.
22
+ - The dashboard shows Gemini's logo and mascot, and `doctor` has a Gemini section.
23
+
24
+ ### Tests and docs
25
+ - Browser tests for the dashboard (`test/ui.test.mjs`): system Chrome over the DevTools protocol, skipped when Chrome is missing. They cover opening and closing a card, a `#run-id` link, an isolate run's highlighted diff and the Stats logos.
26
+ - README screenshots and the GIF are regenerated: a file opened to its diff, Stats with worker logos, a running Gemini worker.
27
+ - The adapter test fixtures' `*.stderr.log` files were git-ignored by `*.log` and so missing from the repository (their tests were skipped there); they are tracked now.
28
+
3
29
  ## 0.8.1
4
30
 
5
31
  ### Dashboard
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  **Cheaper and faster: hand the reading, fixes, tests and reviews to workers that run in parallel. Keep the decisions.**
8
8
 
9
- Model-agnostic · Verified answers · Receipts, not vibes · OpenCode / Codex / Claude Code workers
9
+ Model-agnostic · Verified answers · Receipts, not vibes · OpenCode / Codex / Claude Code / Gemini CLI workers
10
10
 
11
11
  <br />
12
12
 
@@ -72,7 +72,7 @@ Pitroom uses your worker CLI's default model: a free tier, a local MLX/Ollama mo
72
72
 
73
73
  ### Any worker CLI
74
74
 
75
- OpenCode, Codex CLI and Claude Code today, Gemini CLI soon.
75
+ OpenCode, Codex CLI, Claude Code and Gemini CLI.
76
76
 
77
77
  One group can mix them, and a fallback chain can cross them ([how adapters work](docs/backends.md)).
78
78
 
@@ -107,7 +107,7 @@ In isolate mode nothing reaches your tree until you apply it.
107
107
  - **Self-healing worker chain.** Free models get rate-limited or retired. List fallback workers once (`fallback`) and a run that hits "model not found", 429 or quota errors moves to the next model automatically. Still no model hardcoded: the chain is yours.
108
108
  - **A crew, not just one worker.** `pitroom crew` starts several workers at once, `pitroom watch --json` streams one line per change so your agent follows them live, `pitroom wait -g` collects every answer, `pitroom apply -g` lands isolated patches in order. Up to 20 workers run at once by default (`maxParallel`, 30 at most), the rest queue, and the fallback chain absorbs free-tier rate limits; parallel writers are refused.
109
109
  - **Faster, not only cheaper.** Workers run in the background and side by side (up to 20 at once) while your agent keeps working, so slow reading and review stop blocking it. In the [benchmark](#benchmarks), 470 s of worker time finished in 156 s of wall clock, about 3× faster than one question after another, and your agent's own context stayed small.
110
- - **Free first, dearer only when needed.** Runs and plan tasks start on the `cheap` tier, OpenCode's free model; `standard` (Codex) and `capable` (Claude Code) are for tasks that need them, and an optional `review` tier names who reviews. `pitroom models` shows what each worker offers, the effort levels (`low` … `xhigh`) each model accepts, what you say it costs (`costs`) and what it used; `--effort` sets the level per run. Details: [Models, costs and effort](#models-costs-and-effort).
110
+ - **Free first, dearer only when needed.** Runs and plan tasks start on the `cheap` tier, OpenCode's free model; `standard` (Codex) and `capable` (Claude Code) are for tasks that need them, and an optional `review` tier names who reviews. Gemini CLI with a free Google AI Studio key is one more cheap worker (small daily quota per model). `pitroom models` shows what each worker offers, the effort levels (`low` … `xhigh`) each model accepts, what you say it costs (`costs`) and what it used; `--effort` sets the level per run. Details: [Models, costs and effort](#models-costs-and-effort).
111
111
  - **Exact changes, even in a dirty tree.** Pitroom snapshots the working tree with a throwaway git index (your index, branches and stash are never touched), so it reports *only the worker's* edits and can undo exactly those: `pitroom revert <id>`.
112
112
  - **Your agent sets the permissions.** It creates each worker with the permissions the task and your session allow (read-only, isolated copy, in-place edits, web), and a worker never widens its own. A fixed floor stays for every run: no git history changes, no `sudo`, no publishing, no secrets. A worker cannot land a deletion either: `pitroom apply` refuses a patch that deletes files unless your agent passes `--allow-delete`.
113
113
  - **Real isolation.** `--isolate` runs the worker in a private copy of your **current** state (its own repository, sharing your objects read-only), uncommitted and untracked files included, then hands you a patch: `pitroom apply <id>` (checked, refuses on conflict) or `pitroom discard <id>`.
@@ -160,11 +160,11 @@ The screenshots below show sample data (an imaginary `shop-api` project), not a
160
160
 
161
161
  **Click a card and it grows into a panel** with the task, what the worker did step by step (files read, searches, commands, edits, with times, failed ones marked), its result, the files and diff it changed, and the details (model, tokens, cost, fallbacks, reference check).
162
162
 
163
- <p align="center"><img src="docs/dash-card.png" width="100%" alt="An expanded run card: the task, a ten-step activity list, the result, five changed files and the details"></p>
163
+ <p align="center"><img src="docs/dash-card.png" width="100%" alt="An expanded run card: the task, a ten-step activity list, the result, five changed files with one opened to its highlighted diff, and the details"></p>
164
164
 
165
165
  **History** searches everything Pitroom ever ran (the full text of tasks, answers and steps), with filters by state, model and period; each run opens as the same card as on Live. **Stats** shows runs, success rate, time, tokens and savings, per worker and model and per day.
166
166
 
167
- <p align="center"><img src="docs/dash-history.png" width="49%" alt="The History tab: a search box, filters and every past run as a card"> <img src="docs/dash-stats.png" width="49%" alt="The Stats tab: totals, runs per day and success rate per worker and model"></p>
167
+ <p align="center"><img src="docs/dash-history.png" width="49%" alt="The History tab: a search box, filters and every past run as a card"> <img src="docs/dash-stats.png" width="49%" alt="The Stats tab: totals, runs per day and success rate per worker and model, each with its logo"></p>
168
168
 
169
169
  The dashboard is a React app built once into `dist/ui` and served as two static files, so the CLI still has no runtime dependencies. It follows your system's light or dark theme (a button switches it).
170
170
 
@@ -239,7 +239,7 @@ To repeat it on your own repository: `pitroom crew -d <repo> -g bench "<question
239
239
 
240
240
  ## Quick start
241
241
 
242
- You need Node.js 22.13+ and at least one worker CLI: [OpenCode](https://opencode.ai) v2+ (the default worker, with free models), [Codex CLI](https://github.com/openai/codex) or [Claude Code](https://claude.com/claude-code).
242
+ You need Node.js 22.13+ and at least one worker CLI: [OpenCode](https://opencode.ai) v2+ (the default worker, with free models), [Codex CLI](https://github.com/openai/codex), [Claude Code](https://claude.com/claude-code) or [Gemini CLI](https://github.com/google-gemini/gemini-cli) (beta; it needs an API key from [Google AI Studio](https://aistudio.google.com/apikey), a Google account sign-in no longer works for it).
243
243
 
244
244
  ### 1. Install: pick your agent
245
245
 
@@ -294,6 +294,7 @@ Or start a worker yourself and read its receipt:
294
294
 
295
295
  ```bash
296
296
  pitroom "Which files read the session cookie? Cite file:line."
297
+ pitroom -W gemini:gemini-3.8-flash "…" # the same on another worker (see Workers below)
297
298
  pitroom savings # what all your runs saved so far
298
299
  pitroom models # what each worker offers, what it costs you, what it used
299
300
  ```
@@ -359,6 +360,22 @@ Tiers map plan tasks to workers: `"tiers": {"cheap": "opencode", "standard": "co
359
360
 
360
361
  ---
361
362
 
363
+ ## Audits
364
+
365
+ Pitroom checks every `path:line` a worker cites, which proves a line exists, not that the claim about it is true. An **audit** asks a second worker to verify an answer's key claims against your project and to say `AGREE`, `PARTIAL` or `DISAGREE`, with the claims it disputes.
366
+
367
+ ```bash
368
+ pitroom audit <run> # now: re-check one read run (-W picks the auditor)
369
+ pitroom run --audit "…" # re-check this run's answer when it finishes (--no-audit skips it)
370
+ ```
371
+
372
+ or set `"audit": 0.1` in the config (or `PITROOM_AUDIT=0.1`) to have about one read run in ten audited, in the background, without your agent asking. The same run is always in or out of the sample.
373
+
374
+ - **Cost:** off by default. An audit is a read run of the auditor, so about the rate times the worker's own tokens, on the `audit` tier (else `cheap`, i.e. a free model if that is your cheap tier). It never delays the run or fails it.
375
+ - **Never itself:** the auditor is never the worker and model that gave the answer; with no other worker configured nothing is audited (`pitroom doctor` says so). Only read runs are audited: a change has `pitroom review`.
376
+ - **Where it shows:** the answer's card and `pitroom show` carry the verdict and the disputed claims; the Stats tab counts, per worker, how many audited answers were confirmed. Audits are not counted as runs and save nothing.
377
+ - **A sample, not a guarantee.** The auditor is a model too: it can share a blind spot, and a few audits say little about a worker. Treat `DISAGREE` as a reason to look, and `AGREE` as one more signal.
378
+
362
379
  ## Crews
363
380
 
364
381
  A real crew over this repository, four questions at once on a free OpenCode Zen model:
@@ -431,6 +448,7 @@ pitroom run --continue <run|last> "follow-up"
431
448
  pitroom crew [-i] [-g NAME] "task 1" "task 2" … (or --task-file with --- separators)
432
449
  pitroom run -i --plan PLAN --step N [--tier T] ["notes"]
433
450
  pitroom review [run | --range A..B [--plan PLAN]] [--tier T | -W T] [--bg]
451
+ pitroom audit RUN [-W worker]
434
452
  pitroom plan status PLAN [--json] · pitroom plan note PLAN "Task N: …"
435
453
  pitroom status|wait|watch [run… | -g NAME] wait: --any --brief --timeout · watch: --json|--brief --interval
436
454
  pitroom dash [--detach] [--port N] [--open] [--stop] a live page of the runs on 127.0.0.1
@@ -502,8 +520,9 @@ A worker is named by a target: `backend[:model]`.
502
520
  pitroom run "…" # preferred worker (config "worker", default opencode)
503
521
  pitroom run -W opencode:opencode/space-bunny-free "…" # a specific backend and model
504
522
  pitroom run -W 'codex:#low' "…" # the model from config "models" (not Codex's default), low reasoning effort
505
- pitroom run --effort high "…" # any worker: model#level (Codex, Claude Code, OpenCode)
523
+ pitroom run --effort high "…" # model#level (Codex, Claude Code, OpenCode; Gemini CLI has no effort option)
506
524
  pitroom run -W claude:haiku "…" # Claude Code on a cheap model
525
+ pitroom run -W gemini:gemini-3.8-flash "…" # Gemini CLI (beta; needs a Google AI Studio API key)
507
526
  pitroom run -m nvidia/z-ai/glm-5.3 "…" # another model on the preferred worker
508
527
  ```
509
528
 
@@ -512,11 +531,11 @@ pitroom run -m nvidia/z-ai/glm-5.3 "…" # another model on th
512
531
  | OpenCode (v2+) | ✅ | per-run permission rules | reported | private `--standalone` server per run |
513
532
  | Codex CLI | ✅ | OS sandbox (`read-only` / `workspace-write`) | tokens only | `codex login`; your `~/.codex/config.toml` is ignored for workers (its MCP servers run outside the sandbox); models take `#effort` |
514
533
  | Claude Code | ✅ | tool allowlist (`--restricted --safe-mode`, `dontAsk`) | reported | `claude auth login`; its default is often Opus, so prefer `-W claude:haiku` |
515
- | Gemini CLI | soon | approval mode + policy engine | | |
534
+ | Gemini CLI | beta | `--approval-mode plan` plus Pitroom's policy rules | tokens only | an API key from Google AI Studio (sign in with `gemini` or set `GEMINI_API_KEY`; Google account sign-in is refused by Google); workers run in a private Gemini home without your hooks, MCP servers and skills; secret-file rules are not enforced by Gemini 0.62, so use `--isolate`; pin a model, e.g. `-W gemini:gemini-3.8-flash`; no `--continue` (see [the notes](docs/backends.md#gemini-cli-notes)) |
516
535
 
517
536
  ### Models, costs and effort
518
537
 
519
- `pitroom models` lists what each worker offers (Codex from its own model cache, Claude Code's aliases, OpenCode's `opencode models`), the reasoning-effort levels each model accepts, what you say it costs and what your own runs used:
538
+ `pitroom models` lists what each worker offers (Codex from its own model cache, Claude Code's aliases, OpenCode's `opencode models`, Gemini CLI's built-in names), the reasoning-effort levels each model accepts, what you say it costs and what your own runs used:
520
539
 
521
540
  ```text
522
541
  worker model effort (* default) cost runs avg tokens $/run in use
@@ -563,12 +582,14 @@ Or put defaults in `~/.config/pitroom/config.json` (flags and env still win); `p
563
582
  "timeout": "20m",
564
583
  "primary": "opus",
565
584
  "link": ["node_modules"],
566
- "maxParallel": 20
585
+ "maxParallel": 20,
586
+ "audit": 0.1
567
587
  }
568
588
  ```
569
589
 
570
590
  - `worker` and `fallback`: who runs a task when you name no one, and who takes over when it fails; `models`: the model each worker uses when a target names none.
571
591
  - `tiers`: `cheap`, `standard` and `capable` name the workers for plan tasks and `--tier`; an optional `review` tier names who reviews a run (by default another worker than the implementer's, `standard` first).
592
+ - `audit`: the chance (0 to 1, default 0 = off) that a finished read run is re-checked in the background, see [Audits](#audits). The `audit` tier (else `cheap`) names who does it.
572
593
  - `costs`: your relative cost per `worker:model`, only compared with each other; `maxParallel`: workers at once (default 20, at most 30).
573
594
 
574
595
 
@@ -38,12 +38,12 @@ The MIT License for the projects above is the one reproduced for superpowers, wi
38
38
 
39
39
  ## Not bundled
40
40
 
41
- Pitroom starts worker CLIs you install yourself (OpenCode, Codex CLI, Claude Code). They are not part of this package and keep their own licenses and terms.
41
+ Pitroom starts worker CLIs you install yourself (OpenCode, Codex CLI, Claude Code, Gemini CLI). They are not part of this package and keep their own licenses and terms.
42
42
 
43
43
  ## Pixel mascots (CodeIsland)
44
44
 
45
- The animated Claude Code, Codex and OpenCode characters shown on a running card (`ui/src/assets/mascots`) are from [CodeIsland](https://github.com/wxtsky/CodeIsland), MIT License, Copyright (c) 2026 wxtsky. The license text is the one reproduced for superpowers above, with that copyright holder.
45
+ The animated Claude Code, Codex, OpenCode and Gemini CLI characters shown on a running card (`ui/src/assets/mascots`) are from [CodeIsland](https://github.com/wxtsky/CodeIsland), MIT License, Copyright (c) 2026 wxtsky. The license text is the one reproduced for superpowers above, with that copyright holder.
46
46
 
47
47
  ## Product names and marks
48
48
 
49
- `docs/architecture.svg` and the dashboard's run cards show the logos of OpenCode, Codex (OpenAI) and Claude Code (Anthropic) only to say which tools Pitroom can drive. The files come from [svgl](https://svgl.app) (OpenCode) and the MIT-licensed [LobeHub icons](https://github.com/lobehub/lobe-icons) set (Codex, Claude Code). The names and logos belong to their owners. Pitroom is not affiliated with or endorsed by them.
49
+ `docs/architecture.svg` and the dashboard's run cards show the logos of OpenCode, Codex (OpenAI), Claude Code (Anthropic) and Gemini CLI (Google) only to say which tools Pitroom can drive. The files come from [svgl](https://svgl.app) (OpenCode) and the MIT-licensed [LobeHub icons](https://github.com/lobehub/lobe-icons) set (Codex, Claude Code, Gemini). The names and logos belong to their owners. Pitroom is not affiliated with or endorsed by them.