pitroom 0.6.10 → 0.7.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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +2 -1
- package/CHANGELOG.md +22 -0
- package/README.md +3 -3
- package/bin/pitroom.cjs +68 -0
- package/dist/pitroom.mjs +493 -259
- package/dist/ui/app.css +1 -1
- package/dist/ui/app.js +11 -11
- package/hooks/codex-hooks.json +28 -0
- package/package.json +3 -2
|
@@ -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.
|
|
4
|
+
"version": "0.7.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TahaAtas"
|
|
7
7
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pitroom",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Codex
|
|
6
|
+
- 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.
|
|
7
|
+
|
|
8
|
+
### CLI
|
|
9
|
+
- `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`).
|
|
10
|
+
- `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.
|
|
11
|
+
- 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.
|
|
12
|
+
- A timed-out run's report says what to do: raise the limit with `-t` (or `PITROOM_TIMEOUT`) for a long job, or `--continue`.
|
|
13
|
+
|
|
14
|
+
### One figure for savings
|
|
15
|
+
- 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.
|
|
16
|
+
- A run that finished while another process was marking it as crashed no longer loses its usage and savings.
|
|
17
|
+
|
|
18
|
+
### Dashboard
|
|
19
|
+
- Cards name the model the worker really ran (what the CLI reported), not just `opencode`; terminal cards do too.
|
|
20
|
+
- 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.
|
|
21
|
+
- 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.
|
|
22
|
+
- The state icons explain themselves on hover and focus (a clock is a timeout).
|
|
23
|
+
- No `NaN%` for a worker the history has no run for.
|
|
24
|
+
|
|
3
25
|
## 0.6.10
|
|
4
26
|
|
|
5
27
|
### Verified answers
|
package/README.md
CHANGED
|
@@ -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
|
|
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
|
{
|
package/bin/pitroom.cjs
ADDED
|
@@ -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);
|