pitroom 0.9.0 → 0.10.1

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.9.0",
4
+ "version": "0.10.1",
5
5
  "author": {
6
6
  "name": "TahaAtas"
7
7
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pitroom",
3
- "version": "0.9.0",
3
+ "version": "0.10.1",
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,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.1
4
+
5
+ ### Docs
6
+ - The README names Gemini CLI in the quick start (with the API-key requirement), the features, the examples and `pitroom models`; the Gemini star joins Claude and Codex in the hero image. The skills and the marketplace text list Gemini CLI too. The npm page shows the README of the published package, so this is where it reaches it.
7
+
8
+ ## 0.10.0
9
+
10
+ ### Audits
11
+ - 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.
12
+ - 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`.
13
+ - **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.
14
+ - 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.
15
+ - An audit is a sample, not a guarantee: the auditor is a model too and can share a blind spot.
16
+
17
+ ### Tests
18
+ - 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).
19
+
3
20
  ## 0.9.0
4
21
 
5
22
  ### Gemini CLI worker (beta)
package/README.md CHANGED
@@ -31,7 +31,7 @@ Model-agnostic · Verified answers · Receipts, not vibes · OpenCode / Codex /
31
31
 
32
32
  <br />
33
33
 
34
- <img src="docs/pitroom-hero.png" alt="Pitroom — a free pit crew for your expensive coding agent. Orange Claw’d and a blue terminal-faced Codex pet work together at a coding terminal." width="94%" />
34
+ <img src="docs/pitroom-hero.png" alt="Pitroom — a free pit crew for your expensive coding agent. Orange Claw’d, a blue terminal-faced Codex pet and a purple-blue Gemini star work together at a coding terminal." width="94%" />
35
35
 
36
36
  <br />
37
37
 
@@ -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>`.
@@ -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
 
@@ -516,7 +535,7 @@ pitroom run -m nvidia/z-ai/glm-5.3 "…" # another model on th
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
 
package/dist/lib.mjs CHANGED
@@ -1512,6 +1512,13 @@ function parseVerdict(text) {
1512
1512
  minor: count("minor")
1513
1513
  };
1514
1514
  }
1515
+ function parseAudit(text) {
1516
+ const word = /^\s*AUDIT:\s*(AGREE|PARTIAL|DISAGREE)\b/im.exec(text)?.[1]?.toLowerCase();
1517
+ const verdict = word === "agree" || word === "partial" || word === "disagree" ? word : "unclear";
1518
+ const after = /^\s*DISPUTED:\s*$/im.exec(text);
1519
+ const disputed = after ? text.slice(after.index + after[0].length).split("\n").map((l) => l.trim()).filter((l) => /^[-*•]\s+\S/.test(l)).map((l) => l.replace(/^[-*•]\s+/, "")).filter((l) => !/^\(?none\)?\.?$/i.test(l)).slice(0, 8) : [];
1520
+ return { verdict, disputed };
1521
+ }
1515
1522
 
1516
1523
  // src/core/plan.ts
1517
1524
  import fs8 from "node:fs";
@@ -1596,6 +1603,7 @@ export {
1596
1603
  getBackend,
1597
1604
  loadPlan,
1598
1605
  loadTemplate,
1606
+ parseAudit,
1599
1607
  parsePlan,
1600
1608
  parseStatus,
1601
1609
  parseTarget,