pitroom 0.6.3 → 0.6.4
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 +1 -1
- package/CHANGELOG.md +7 -0
- package/README.md +1 -0
- package/dist/pitroom.mjs +35 -6
- package/package.json +1 -1
- package/skills/pitroom-crew/SKILL.md +1 -1
- package/skills/pitroom-driven-development/SKILL.md +1 -1
- package/skills/pitroom-implement/SKILL.md +1 -1
- package/skills/using-pitroom/SKILL.md +3 -0
|
@@ -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.
|
|
4
|
+
"version": "0.6.4",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TahaAtas"
|
|
7
7
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pitroom",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
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,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.4
|
|
4
|
+
|
|
5
|
+
### Deleting is the user's call
|
|
6
|
+
- `pitroom apply` (and `apply -g`) refuses a patch that deletes files unless you pass `--allow-delete`; nothing of the patch is applied. The run report flags deletions with a warning, for isolated runs and for `-w` runs (undo: `pitroom revert`).
|
|
7
|
+
- Workers are told to delete a file only when the task explicitly asks for it, to list every deleted file, and to propose any other deletion under OPEN ISSUES instead of doing it.
|
|
8
|
+
- The skills (`using-pitroom`, `pitroom-implement`, `pitroom-driven-development`, `pitroom-crew`) make the primary agent the decider: it sets each worker's permissions from the task and the user's session (read, isolate or write mode, `--web`), decides whether a deletion is wanted and passes `--allow-delete` itself, asking the user only when the worker deleted something that was not asked for. A fixed floor (no git history changes, no `sudo`, no publishing, no secrets) stays in place.
|
|
9
|
+
|
|
3
10
|
## 0.6.3
|
|
4
11
|
|
|
5
12
|
### Skills
|
package/README.md
CHANGED
|
@@ -100,6 +100,7 @@ In isolate mode nothing reaches your tree until you apply it.
|
|
|
100
100
|
- **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.
|
|
101
101
|
- **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. A queue (`maxParallel`) keeps free tiers from rate-limiting you; parallel writers are refused.
|
|
102
102
|
- **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>`.
|
|
103
|
+
- **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`.
|
|
103
104
|
- **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>`.
|
|
104
105
|
- **Zero repo pollution.** No `.pitroom/` folder, no `.gitignore` edits, no branches. Records live in `~/.local/state/pitroom`.
|
|
105
106
|
- **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.
|
package/dist/pitroom.mjs
CHANGED
|
@@ -7,6 +7,12 @@ var UserError = class extends Error {
|
|
|
7
7
|
this.code = code;
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
+
var DeletionRefused = class extends UserError {
|
|
11
|
+
constructor(message, files) {
|
|
12
|
+
super(message, 3);
|
|
13
|
+
this.files = files;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
10
16
|
|
|
11
17
|
// src/backends/claude/index.ts
|
|
12
18
|
import { spawnSync } from "node:child_process";
|
|
@@ -1174,6 +1180,7 @@ var BOOL_FLAGS = {
|
|
|
1174
1180
|
"--probe": "probe",
|
|
1175
1181
|
"--copy": "copy",
|
|
1176
1182
|
"--force": "force",
|
|
1183
|
+
"--allow-delete": "allow-delete",
|
|
1177
1184
|
"--yes": "yes",
|
|
1178
1185
|
"--any": "any",
|
|
1179
1186
|
"--brief": "brief",
|
|
@@ -1514,6 +1521,12 @@ function formatReport(meta, finalText = readSummary(meta), maxLines = 400) {
|
|
|
1514
1521
|
);
|
|
1515
1522
|
for (const c of meta.changes.slice(0, 50)) out.push(` ${c.status} ${c.path}`);
|
|
1516
1523
|
if (meta.changes.length > 50) out.push(` \u2026 ${meta.changes.length - 50} more`);
|
|
1524
|
+
const deleted = meta.changes.filter((c) => c.status === "D").length;
|
|
1525
|
+
if (deleted && !meta.applied && !meta.reverted && !meta.discarded) {
|
|
1526
|
+
out.push(
|
|
1527
|
+
meta.mode === "isolate" ? ` \u26A0 deletes ${deleted} file${deleted === 1 ? "" : "s"}: check they are wanted before applying (apply refuses without --allow-delete)` : ` \u26A0 deleted ${deleted} file${deleted === 1 ? "" : "s"} in your tree: check they are wanted (undo: pitroom revert ${meta.id})`
|
|
1528
|
+
);
|
|
1529
|
+
}
|
|
1517
1530
|
if (meta.changes.length) {
|
|
1518
1531
|
out.push(` diff: pitroom show ${meta.id} --patch`);
|
|
1519
1532
|
out.push(` review: pitroom review ${meta.id}`);
|
|
@@ -2598,6 +2611,7 @@ Rules:
|
|
|
2598
2611
|
- Stay inside the task scope and the project directory.
|
|
2599
2612
|
- Never commit, push, reset, checkout, restore, stash, clean, rebase or merge, and never discard or overwrite uncommitted work you did not create.
|
|
2600
2613
|
- Never read or reveal secrets (.env files, keys, tokens).
|
|
2614
|
+
- Delete a file only when the task explicitly asks for it, and name every file you delete under FILES CHANGED. Whether anything else should be deleted or overwritten is the primary agent's decision: propose it under OPEN ISSUES and leave the file alone.
|
|
2601
2615
|
- Do not ask questions. If something is ambiguous, choose the safest reasonable interpretation and state the assumption.
|
|
2602
2616
|
- Be economical: open only what you need.
|
|
2603
2617
|
|
|
@@ -2720,7 +2734,7 @@ function inside(file, roots) {
|
|
|
2720
2734
|
var escape = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2721
2735
|
|
|
2722
2736
|
// src/core/run.ts
|
|
2723
|
-
var VERSION2 = true ? "0.6.
|
|
2737
|
+
var VERSION2 = true ? "0.6.4" : "0.0.0-dev";
|
|
2724
2738
|
function planWork(o) {
|
|
2725
2739
|
if (!o.plan) return { task: o.task.trim(), tier: o.tier };
|
|
2726
2740
|
if (o.continueFrom) throw new UserError("a follow-up continues its parent's task; drop --plan/--step");
|
|
@@ -3020,10 +3034,21 @@ function runVerify(meta) {
|
|
|
3020
3034
|
fs21.writeFileSync(runFile(meta.id, "verify.log"), output);
|
|
3021
3035
|
return { ok: r.status === 0, code: r.status, tail: output.trimEnd().split("\n").slice(-25).join("\n") };
|
|
3022
3036
|
}
|
|
3023
|
-
function applyRun(meta) {
|
|
3037
|
+
function applyRun(meta, allowDelete = false) {
|
|
3024
3038
|
if (meta.mode !== "isolate") throw new UserError(`run ${meta.id} edited your tree directly (${meta.mode}); nothing to apply`);
|
|
3025
3039
|
if (meta.applied) throw new UserError(`run ${meta.id} was already applied`);
|
|
3026
3040
|
if (!meta.changes?.length) throw new UserError(`run ${meta.id} has no changes`);
|
|
3041
|
+
const deleted = meta.changes.filter((c) => c.status === "D").map((c) => c.path);
|
|
3042
|
+
if (deleted.length && !allowDelete) {
|
|
3043
|
+
const list2 = deleted.slice(0, 10).map((f) => ` ${f}`).join("\n") + (deleted.length > 10 ? `
|
|
3044
|
+
\u2026 ${deleted.length - 10} more` : "");
|
|
3045
|
+
throw new DeletionRefused(
|
|
3046
|
+
`run ${meta.id} deletes ${deleted.length} file${deleted.length === 1 ? "" : "s"}; nothing was applied:
|
|
3047
|
+
${list2}
|
|
3048
|
+
Check that the deletion is what the user asked for: if so apply with --allow-delete, otherwise ask the user or discard the run.`,
|
|
3049
|
+
deleted
|
|
3050
|
+
);
|
|
3051
|
+
}
|
|
3027
3052
|
const res = applyPatch(meta.repoRoot, runFile(meta.id, "changes.patch"), false);
|
|
3028
3053
|
if (!res.ok) throw new UserError(`patch does not apply cleanly (your tree changed since the snapshot):
|
|
3029
3054
|
${res.message}`, 1);
|
|
@@ -3229,19 +3254,21 @@ function cmdLs(p) {
|
|
|
3229
3254
|
function cmdApply(p) {
|
|
3230
3255
|
const group = flag(p, "group");
|
|
3231
3256
|
if (!group) {
|
|
3232
|
-
console.log(applyRun(freshMeta(resolveRun(p.positional[0]))));
|
|
3257
|
+
console.log(applyRun(freshMeta(resolveRun(p.positional[0])), has(p, "allow-delete")));
|
|
3233
3258
|
return 0;
|
|
3234
3259
|
}
|
|
3235
3260
|
const pending = groupIds(group).map((id) => freshMeta(id)).filter((m) => m.mode === "isolate" && m.state === "done" && m.changes?.length && !m.applied && !m.discarded);
|
|
3236
3261
|
if (!pending.length) throw new UserError(`group "${group}" has no finished isolate patches to apply`);
|
|
3237
3262
|
for (const [i, m] of pending.entries()) {
|
|
3238
3263
|
try {
|
|
3239
|
-
console.log(applyRun(m));
|
|
3264
|
+
console.log(applyRun(m, has(p, "allow-delete")));
|
|
3240
3265
|
} catch (e) {
|
|
3241
3266
|
const rest = pending.slice(i + 1).map((r) => r.id);
|
|
3242
3267
|
console.log(`\u2718 ${m.id}: ${e.message}`);
|
|
3243
3268
|
if (rest.length) console.log(` not applied yet: ${rest.join(" ")}`);
|
|
3244
|
-
|
|
3269
|
+
if (!(e instanceof DeletionRefused)) {
|
|
3270
|
+
console.log(` resolve it (e.g. pitroom run --continue ${m.id} "rebase your change on the current tree"), then apply the rest`);
|
|
3271
|
+
}
|
|
3245
3272
|
return 1;
|
|
3246
3273
|
}
|
|
3247
3274
|
}
|
|
@@ -3588,7 +3615,9 @@ Usage
|
|
|
3588
3615
|
live table (TTY) or one JSON line per change, until done
|
|
3589
3616
|
pitroom show [run] [--patch|--events|--full|--json]
|
|
3590
3617
|
pitroom ls [--running] [-g NAME] recent runs
|
|
3591
|
-
pitroom apply [run | -g NAME]
|
|
3618
|
+
pitroom apply [run | -g NAME] [--allow-delete]
|
|
3619
|
+
apply --isolate patch(es) to your tree (checked first); a patch
|
|
3620
|
+
that deletes files is refused unless --allow-delete
|
|
3592
3621
|
pitroom discard [run] drop an --isolate run's copy (the patch is kept)
|
|
3593
3622
|
pitroom revert [run] undo the changes of a --write run (checked first)
|
|
3594
3623
|
pitroom stop [run | -g NAME] stop running or queued workers
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pitroom",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"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.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "TahaAtas",
|
|
@@ -70,7 +70,7 @@ pitroom show <run> # the full report of the ones you need
|
|
|
70
70
|
- Read each summary and understand what changed.
|
|
71
71
|
- Check for conflicts: did two workers touch the same code or contradict each other?
|
|
72
72
|
- Verify what you will rely on (`refs:` lines help), then combine the findings in your own words.
|
|
73
|
-
- For `-i` crews: review each patch (`pitroom review <run>` or `pitroom show <run> --patch`), then `pitroom apply -g NAME`. It applies in order
|
|
73
|
+
- For `-i` crews: review each patch (`pitroom review <run>` or `pitroom show <run> --patch`), then `pitroom apply -g NAME`. It applies in order, stops at the first conflict and refuses a patch that deletes files (decide whether the deletion is wanted, then `--allow-delete`); fix that one with `pitroom run --continue <run> "…"` or by hand, then apply the rest.
|
|
74
74
|
- Run the full test suite yourself afterwards, and spot-check: workers make systematic errors.
|
|
75
75
|
|
|
76
76
|
## When things go wrong
|
|
@@ -89,7 +89,7 @@ Adjudicate only at the cap; every adjudication is a note. A silent discard is fo
|
|
|
89
89
|
When the review is clean, or every open finding is parked with a ruling at the cap:
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
|
-
pitroom apply <last run> # checked apply; refuses on conflict
|
|
92
|
+
pitroom apply <last run> # checked apply; refuses on conflict, and on deleted files until you decide they are wanted (--allow-delete)
|
|
93
93
|
<the task's tests, run by you>
|
|
94
94
|
git add <the task's files> && git commit -m "<the plan's commit message>"
|
|
95
95
|
pitroom plan note PLAN "Task N: complete (<base7>..<head7>, review clean)"
|
|
@@ -35,7 +35,7 @@ pitroom run -w "Rename getUserById to findUserById in src/ and update imports. N
|
|
|
35
35
|
|
|
36
36
|
1. Read the report: `FILES CHANGED`, `VERIFICATION`, `OPEN ISSUES`, and the `verify:` line.
|
|
37
37
|
2. `pitroom show <run> --patch`: review the diff as you would a colleague's.
|
|
38
|
-
3. isolate: `pitroom apply <run>` (checked apply; refuses on conflict) or `pitroom discard <run>`. write: keep it, or `pitroom revert <run>`.
|
|
38
|
+
3. isolate: `pitroom apply <run>` (checked apply; refuses on conflict, and on a patch that deletes files until you decide they are wanted: `--allow-delete`) or `pitroom discard <run>`. write: keep it, or `pitroom revert <run>`.
|
|
39
39
|
4. Run the relevant tests yourself after applying.
|
|
40
40
|
5. Needs another pass? `pitroom run --continue <run> "Also handle the refresh-token path."` (same session and copy; the patch accumulates).
|
|
41
41
|
|
|
@@ -63,4 +63,7 @@ Workers can take minutes. Start long work with `--bg` and keep working; follow i
|
|
|
63
63
|
- Worker output is draft work and a worker's report is a claim: verify what you rely on (`pitroom-verification`).
|
|
64
64
|
- You apply patches and commit; workers never commit or push. Push, merge and pull requests happen only after the user asks.
|
|
65
65
|
- Keep the decisions: delegate the reading and typing, not the architecture.
|
|
66
|
+
- You set a worker's permissions when you create it, from the task and from how much autonomy the user gave you in this session (for example auto mode): read-only by default, `-i` (an isolated copy) for changes, `-w` (edits in place) when the user wants that, `--web` only when the task needs the web. A worker never widens its own permissions.
|
|
67
|
+
- Pitroom keeps a fixed floor that no flag lifts: no git history changes, no `sudo`, no publishing, no secrets, no killing processes. Everything above that floor is your call.
|
|
68
|
+
- Deletions are your decision, made as the user's agent. `pitroom apply` refuses a patch that deletes files unless you pass `--allow-delete`. If removing files is what the user asked for or an obvious part of it, apply with the flag and tell them which files went; if the worker deleted something the user did not ask for, ask first, or discard the run.
|
|
66
69
|
- If Pitroom fails, carry on yourself; if setup is broken, tell the user what `pitroom doctor` says.
|