pitroom 0.6.10 → 0.8.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.
@@ -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.6.10",
4
+ "version": "0.8.0",
5
5
  "author": {
6
6
  "name": "TahaAtas"
7
7
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pitroom",
3
- "version": "0.6.10",
3
+ "version": "0.8.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"
@@ -19,6 +19,7 @@
19
19
  "workflow"
20
20
  ],
21
21
  "skills": "./skills/",
22
+ "hooks": "./hooks/codex-hooks.json",
22
23
  "interface": {
23
24
  "displayName": "Pitroom",
24
25
  "shortDescription": "Cheap workers for your agent",
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Dashboard
6
+ - An edited file in a run card opens as its diff: line numbers, added and removed rows, syntax highlighting (Shiki: TypeScript, JavaScript, TSX, JSX, JSON, CSS, HTML, Python, Bash, YAML) and a copy button. Messages and tool results get their own rows with a status, and the step list has a scroller with a rail and a "Last step" button that follows new steps while you are at the bottom.
7
+ - The dashboard files grow from about 0.7 MB to 1.9 MB for the highlighter; the npm package from 422 kB to 592 kB.
8
+ - A renamed file whose path starts with `a/` or `b/` keeps its real name in the diff.
9
+
10
+ ### Fixes
11
+ - `pitroom init` asks OpenCode for its models twice: the first call can come back empty while OpenCode's service starts, which made init see no models and suggest no fallback.
12
+
13
+ ## 0.7.0
14
+
15
+ ### Codex
16
+ - The Codex plugin registers hooks (`hooks/codex-hooks.json`, named in `.codex-plugin/plugin.json`): Pitroom is introduced at session start, so the agent knows it even when Codex drops skill descriptions because many skills are installed, and a job card follows each `pitroom` command. Codex asks you to trust the plugin's hooks once. The hooks go through `pitroom` on PATH (`pitroom hook-start` is new) and stay silent when it is missing. Checked against Codex 0.159.
17
+
18
+ ### CLI
19
+ - `pitroom init` proposes a starter config from the worker CLIs and OpenCode models you have: a fallback chain from your free models, tiers when more than one CLI is installed. It never picks your model, and writes only with `--yes` (`--force` to replace a file, which is kept as `.bak`).
20
+ - `pitroom doctor` groups its checks (Setup, Worker chain, one section per worker CLI, Skills and agents), ends with one verdict line and a Next list of the commands the findings point to, and warns when the first `node` on PATH is too old. Colour only on a terminal (`NO_COLOR` and `FORCE_COLOR` are honoured); `ls`, `status`, `history` and run reports colour the state too.
21
+ - The `pitroom` command is now a small launcher that finds a Node 22.13+ (`PITROOM_NODE`, nvm, Homebrew, `/usr/local`) when the shell's own `node` is old, instead of crashing with a syntax error; without one it says how to fix it.
22
+ - A timed-out run's report says what to do: raise the limit with `-t` (or `PITROOM_TIMEOUT`) for a long job, or `--continue`.
23
+
24
+ ### One figure for savings
25
+ - The Stats tab (and `pitroom history stats`) takes its saved figures, total, per worker and per day, from the ledger, the same ones the Live tab, `pitroom savings` and the status line add up. They used to be calculated twice and could differ.
26
+ - A run that finished while another process was marking it as crashed no longer loses its usage and savings.
27
+
28
+ ### Dashboard
29
+ - Cards name the model the worker really ran (what the CLI reported), not just `opencode`; terminal cards do too.
30
+ - The close button closes the card (its click used to bubble into the card's open handler and re-open it). The step list scrolls by hand while a worker runs and follows new steps only while you are at the bottom.
31
+ - A `#run-id` link opens that run as the same expandable card the lists use, pinned above the page, and clears the link when closed; `/api/run/:id` carries the card. A page opened in a background tab fetched nothing until shown: fixed.
32
+ - The state icons explain themselves on hover and focus (a clock is a timeout).
33
+ - No `NaN%` for a worker the history has no run for.
34
+
3
35
  ## 0.6.10
4
36
 
5
37
  ### Verified answers
package/README.md CHANGED
@@ -114,7 +114,7 @@ In isolate mode nothing reaches your tree until you apply it.
114
114
  - **Zero repo pollution.** No `.pitroom/` folder, no `.gitignore` edits, no branches. Records live in `~/.local/state/pitroom`.
115
115
  - **Works with any agent.** Fourteen [Agent Skills](https://agentskills.io): the superpowers development workflow run by workers, plus delegation (`using-pitroom`, `pitroom-research`, `-crew`, `-implement`), a CLI, and a Claude Code / Codex plugin whose session-start hook loads the workflow. Claude Code, Codex, Gemini CLI, Cursor, or anything that can run a shell command.
116
116
  - **A live dashboard and a searchable history.** `pitroom dash` opens a local page of every run (the task, what the worker did step by step, its result and diff) with history and statistics, for the agent apps that show neither hooks nor a status line; `pitroom history` searches everything Pitroom ever ran. See [Dashboard](#dashboard).
117
- - **Small.** About 6,000 lines of TypeScript, a ~190 KB CLI bundle (plus the ~0.7 MB of dashboard files it serves), zero runtime dependencies.
117
+ - **Small.** About 6,500 lines of TypeScript in the CLI, a ~210 KB CLI bundle (plus the ~1.9 MB of dashboard files it serves, with syntax highlighting for ten languages), zero runtime dependencies.
118
118
 
119
119
  ### How it stays safe
120
120
 
@@ -270,7 +270,7 @@ pitroom install
270
270
  | Path | You get |
271
271
  |---|---|
272
272
  | Claude Code plugin | The 14 skills, the session-start hook that introduces Pitroom, and a card after each `pitroom` command. |
273
- | Codex plugin | The 14 skills. Codex has no session-start hook, so Pitroom is not introduced on its own: the skills load when a task matches, or name one. `pitroom` itself comes from npm. |
273
+ | Codex plugin | The 14 skills, a session-start hook that introduces Pitroom (so it is known even when Codex drops skill descriptions because many are installed), and a card after each `pitroom` command. Codex asks you to trust the plugin's hooks once. The hooks call `pitroom`, which comes from npm (`npm i -g pitroom`). |
274
274
  | npm + `pitroom install` | The CLI, and the skills linked into `~/.agents/skills` and `~/.claude/skills`. |
275
275
 
276
276
  Pick one path, not several: `doctor` warns if the skills load twice. The plugins alone do not put `pitroom` on your PATH, so install it from npm too if you want to run it yourself (`watch`, `models`, `savings`, the status line).
@@ -442,7 +442,7 @@ pitroom ls [--running] [-g NAME] · pitroom clean [--days 14] [--yes]
442
442
  pitroom savings [--since 7d|30d|all] [--models] [--card file.svg] [--badge]
443
443
  pitroom models [worker] [--all] [--json] models, effort levels, your costs, your usage
444
444
  pitroom statusline [--then CMD] · pitroom hook-card
445
- pitroom doctor [--probe] · pitroom config · pitroom install [--copy] [--force] · pitroom uninstall
445
+ pitroom doctor [--probe] · pitroom config · pitroom init [--model ID] [--fallback A,B] [--yes] [--force] · pitroom install [--copy] [--force] · pitroom uninstall
446
446
  ```
447
447
 
448
448
  Exit codes: `0` ok · `1` worker failed · `2` usage · `3` refused/setup · `4` timeout · `5` read-only violation · `6` verify failed · `75` still running.
@@ -551,7 +551,7 @@ Fallbacks cross backends (e.g. `"fallback": ["codex:#low", "opencode"]`): a work
551
551
 
552
552
  </details>
553
553
 
554
- Or put defaults in `~/.config/pitroom/config.json` (flags and env still win); `pitroom config` shows every effective value and where it came from. `models` gives each worker a default model for targets that name none (`-W codex`, a `"codex"` fallback); a model in the target or `-m` still wins. `tiers` names workers for `--tier` and for plan tasks' `**Worker:**` lines:
554
+ Or put defaults in `~/.config/pitroom/config.json` (flags and env still win); `pitroom config` shows every effective value and where it came from. `pitroom init` proposes a starter config from the worker CLIs and OpenCode models you have (a fallback chain of your free models, tiers when more than one CLI is installed) and writes it only with `--yes`; it never picks your model for you. `models` gives each worker a default model for targets that name none (`-W codex`, a `"codex"` fallback); a model in the target or `-m` still wins. `tiers` names workers for `--tier` and for plan tasks' `**Worker:**` lines:
555
555
 
556
556
  ```json
557
557
  {
@@ -24,7 +24,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
24
24
  | [Base UI](https://github.com/mui/base-ui) | MIT | Material-UI SAS (2019) |
25
25
  | [shadcn/ui](https://github.com/shadcn-ui/ui) components (`ui/src/components/ui`) | MIT | shadcn |
26
26
  | [Shadix UI](https://github.com/apix-js/shadix-ui) expandable card (`ui/src/components/expandable-card.tsx`) | MIT | gihanrangana (2025) |
27
- | [beUI](https://github.com/starc007/ui-components) agent activity (`ui/src/components/agents`, `motion`, `lib`) | MIT | Saurabh Chauhan (2026) |
27
+ | [beUI](https://github.com/starc007/ui-components) agent activity, file diff, tool result, message scroller and preview rail (`ui/src/components/agents`, `motion`, `lib`) | MIT | Saurabh Chauhan (2026) |
28
+ | [Shiki](https://github.com/shikijs/shiki) syntax highlighting | MIT | Pine Wu (2021), Anthony Fu (2023) |
28
29
  | [Motion](https://github.com/motiondivision/motion) (with framer-motion) | MIT | Motion B.V. (2024), Framer B.V. (2018) |
29
30
  | [Tailwind CSS](https://github.com/tailwindlabs/tailwindcss) | MIT | Tailwind Labs, Inc. |
30
31
  | [tw-animate-css](https://github.com/Wombosvideo/tw-animate-css) | MIT | Wombosvideo (2025) |
@@ -0,0 +1,68 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ // The `pitroom` command. Plain ES5 so that even an old Node can run it: it finds a Node.js of 22.13 or newer
4
+ // and runs dist/pitroom.mjs with it. Agent apps often run commands in a shell whose first `node` is an old one
5
+ // (an installer's Node 14 in /usr/local/bin, say), where the real CLI would only crash with a syntax error.
6
+ var cp = require('child_process');
7
+ var fs = require('fs');
8
+ var path = require('path');
9
+
10
+ var MIN = [22, 13];
11
+ var cli = path.join(__dirname, '..', 'dist', 'pitroom.mjs');
12
+
13
+ function ok(v) {
14
+ return v[0] > MIN[0] || (v[0] === MIN[0] && v[1] >= MIN[1]);
15
+ }
16
+ function parse(text) {
17
+ var m = /(\d+)\.(\d+)\.(\d+)/.exec(String(text));
18
+ return m ? [Number(m[1]), Number(m[2]), Number(m[3])] : null;
19
+ }
20
+ function versionOf(bin) {
21
+ var r = cp.spawnSync(bin, ['-p', 'process.versions.node'], { encoding: 'utf8', timeout: 5000 });
22
+ return r.status === 0 ? parse(r.stdout) : null;
23
+ }
24
+ function newer(a, b) {
25
+ return a[0] - b[0] || a[1] - b[1] || a[2] - b[2];
26
+ }
27
+
28
+ // PITROOM_TEST_NODE_VERSION only lets the tests pretend this Node is old.
29
+ var current = parse(process.env.PITROOM_TEST_NODE_VERSION || process.versions.node) || [0, 0, 0];
30
+ var node = process.execPath;
31
+
32
+ if (!ok(current)) {
33
+ node = null;
34
+ var candidates = [];
35
+ if (process.env.PITROOM_NODE) candidates.push(process.env.PITROOM_NODE);
36
+ // PITROOM_NODE_SEARCH (a path-delimited list) replaces the places searched below; the tests use it.
37
+ var nvm = path.join(process.env.NVM_DIR || path.join(process.env.HOME || '', '.nvm'), 'versions', 'node');
38
+ try {
39
+ candidates = candidates.concat(
40
+ fs.readdirSync(nvm).filter(function (d) { return /^v\d+\.\d+\.\d+$/.test(d); })
41
+ .sort(function (a, b) { return newer(parse(b), parse(a)); })
42
+ .map(function (d) { return path.join(nvm, d, 'bin', 'node'); }),
43
+ );
44
+ } catch (e) { /* no nvm */ }
45
+ candidates.push('/opt/homebrew/bin/node', '/usr/local/bin/node', '/usr/bin/node');
46
+ if (process.env.PITROOM_NODE_SEARCH !== undefined) candidates = process.env.PITROOM_NODE_SEARCH.split(path.delimiter).filter(Boolean);
47
+ for (var i = 0; i < candidates.length && !node; i++) {
48
+ if (!fs.existsSync(candidates[i])) continue;
49
+ var v = versionOf(candidates[i]);
50
+ if (v && ok(v)) node = candidates[i];
51
+ }
52
+ if (!node) {
53
+ process.stderr.write(
54
+ 'pitroom needs Node.js ' + MIN.join('.') + ' or newer, but this shell runs Node.js v' + current.join('.') + ' (' + process.execPath + ').\n' +
55
+ 'Install a current one and make it the default, for example: nvm install 24 && nvm alias default 24\n' +
56
+ '(or put a newer node first on PATH, or set PITROOM_NODE=/path/to/node)\n',
57
+ );
58
+ process.exit(1);
59
+ }
60
+ }
61
+
62
+ var r = cp.spawnSync(node, [cli].concat(process.argv.slice(2)), { stdio: 'inherit' });
63
+ if (r.error) {
64
+ process.stderr.write('pitroom: could not run ' + node + ': ' + r.error.message + '\n');
65
+ process.exit(1);
66
+ }
67
+ if (r.signal) process.kill(process.pid, r.signal);
68
+ process.exit(r.status === null ? 1 : r.status);