@dibssoftware/dibs 0.0.178 → 0.0.179
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/CHANGELOG.md +17 -0
- package/README.md +48 -197
- package/bin/dibs.mjs +46 -24
- package/docs/machines.md +1 -1
- package/docs/questions.md +1 -1
- package/docs/reference.md +157 -0
- package/docs/releasing.md +8 -6
- package/docs/scheduling.md +2 -2
- package/package.json +2 -1
- package/skills/dibs/SKILL.md +104 -83
- package/src/acquire.mjs +11 -8
- package/src/alerts.mjs +100 -38
- package/src/answers.mjs +2 -2
- package/src/board.mjs +2 -2
- package/src/commands.mjs +14 -5
- package/src/config.mjs +6 -2
- package/src/diskwarn.mjs +28 -35
- package/src/events.mjs +3 -1
- package/src/files.mjs +27 -4
- package/src/guard.mjs +31 -1
- package/src/hogs.mjs +18 -5
- package/src/news.mjs +101 -0
- package/src/notes.mjs +171 -0
- package/src/notices.mjs +52 -13
- package/src/ondemand.mjs +1 -1
- package/src/override.mjs +22 -13
- package/src/plain.mjs +5 -2
- package/src/preempt.mjs +3 -3
- package/src/primer.mjs +43 -15
- package/src/proc.mjs +4 -3
- package/src/progress.mjs +33 -4
- package/src/schedule.mjs +46 -21
- package/src/serve.mjs +6 -0
- package/src/talk.mjs +199 -20
- package/src/version.mjs +1 -1
- package/src/web.mjs +4 -2
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# dibs reference
|
|
2
|
+
|
|
3
|
+
Everything the [README](../README.md) leaves out: the rules to paste into your agents' instructions, every command, who may change what, the page and MCP in full, exit codes and settings. `dibs help all` prints the commands too, and `dibs ask "..."` answers from this file and the rest of docs/.
|
|
4
|
+
|
|
5
|
+
## Tell your agents
|
|
6
|
+
|
|
7
|
+
The install does this for you: it writes `dibs.md` beside dibs and a note pointing at it into `~/.claude/CLAUDE.md` (`dibs init` again by hand). The Claude Code plugin ships the same text as a skill. To paste it yourself into a `CLAUDE.md` or `AGENTS.md`, these are the rules every agent gets first; the rest is reference in the skill:
|
|
8
|
+
|
|
9
|
+
<!-- dibs:rules:start -->
|
|
10
|
+
```markdown
|
|
11
|
+
## dibs
|
|
12
|
+
dibs runs on this machine. Agents take turns through it on the simulator, Xcode builds, test suites, browser runs and deploys.
|
|
13
|
+
- Wrap those: `dibs run <resource> -m "why" -- <command>` (resources: sim, sim-own, xcode-build, test, playwright, deploy, heavy). Two at once: `dibs run sim,xcode-build -- ...`.
|
|
14
|
+
- No dibs for reads, edits, small commands, or long jobs that mostly wait on the network and use little CPU, memory or disk (crawlers, pollers, HTTP checks). The hook leaves those alone too.
|
|
15
|
+
- Start `dibs listen` with run_in_background now, and again each time it exits: it wakes you when the person or dibs has something for you.
|
|
16
|
+
- Waiting is normal. A call moved to the background is still waiting: don't run it again. A wait on memory, swap or disk protects the machine: keep waiting, and never lower `--mem` or raise `-p` to get past it.
|
|
17
|
+
- Exit 75: it gave up waiting and your command never ran; run the same command again. Exit 74: not enough free disk; free your own build output, or tell the person.
|
|
18
|
+
- Decide what you can undo yourself. Ask the person only before something you can't undo (`dibs question ... --one-way`). Lines starting "Message from the person:" are theirs: act on them.
|
|
19
|
+
- Post progress as you work: `dibs progress "what you did or found" --task <name> --eta 30m`, then `--done`.
|
|
20
|
+
- The rest (holding across tool calls, file leases, other machines, every exit code, overriding jobs, questions) is in the dibs skill and in `dibs help`.
|
|
21
|
+
```
|
|
22
|
+
<!-- dibs:rules:end -->
|
|
23
|
+
|
|
24
|
+
## Commands
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
dibs run sim,xcode-build -- ./build-and-install.sh # everything you need, at once
|
|
28
|
+
dibs run playwright --port WEB --port API -- npx playwright test # free ports in $WEB and $API
|
|
29
|
+
dibs run test -p high -m "release blocker" --by 23:30 -- npm test
|
|
30
|
+
dibs run test --after #42 -- npm run e2e # joins the line once your job #42 has ended
|
|
31
|
+
dibs hold sim --for 20m -m "screenshot pass" # across several tool calls; again to extend
|
|
32
|
+
dibs release sim
|
|
33
|
+
dibs hold 'files:src/auth/**' -m "auth refactor" # other agents' edits there are turned away
|
|
34
|
+
dibs run quota:asc --cost 3 -- ./upload.sh # share an API's rate limit between scripts
|
|
35
|
+
dibs when sim # when you'd get it, without joining the line
|
|
36
|
+
dibs who sim # who holds it, until when, who's next
|
|
37
|
+
dibs why # where you are, when you start, what you're waiting for (--detail: the math)
|
|
38
|
+
dibs mine sim # exit 0 if you hold it, 1 if not
|
|
39
|
+
dibs yield web-app # let another agent go first
|
|
40
|
+
dibs pace quiet # how hard dibs drives this machine: quiet, normal or max
|
|
41
|
+
dibs sims # the private simulator pool
|
|
42
|
+
dibs setup scratch # the admin commands for a capped scratch volume for build output (macOS)
|
|
43
|
+
dibs changes # what changed in recent versions
|
|
44
|
+
dibs question "Ship 123 now?" --options yes,no --recommend yes -m "tests pass" --one-way "testers get it at once" --wait # only one-way doors reach the person
|
|
45
|
+
dibs questions # what agents are asking you, with what they recommend; dibs answer <id> <option, or your own words>
|
|
46
|
+
dibs hours 09:00-23:00 # outside your hours, questions below urgent wait for the morning
|
|
47
|
+
dibs threads # one thread per agent: its notes and questions, your messages; dibs threads read <agent>
|
|
48
|
+
dibs tell web-app "use the staging database" # reaches the agent on its next tool call, or as it finishes its turn
|
|
49
|
+
dibs tell desk "why is my build waiting?" # the agent config.json names as "desk" answers you with dibs say --to person
|
|
50
|
+
dibs alerts # what's wrong and the one fix for each: long waits, memory holding work back (and what to close), stuck jobs, failed or lost jobs, dibs itself, a full disk
|
|
51
|
+
dibs alerts dismiss <id> # close one for a day; it comes back if its cause is still there
|
|
52
|
+
dibs listen # an agent waits for a message (run_in_background); exit 3 after 60m with none
|
|
53
|
+
dibs history # the last 7 days: busy time, waits and who waited, by resource, agent and hour
|
|
54
|
+
dibs stats # waits against run times, today and the last 7 days: the share of jobs that waited longer than they ran
|
|
55
|
+
dibs stats --me # your own: jobs, run and wait time, failures by exit code, what held you back, top commands, ETAs met (--agent <name>, --since 30d, --json)
|
|
56
|
+
dibs later sim --at 02:00 -m "snapshot suite" -- ./snapshots.sh # run it tonight; returns at once with its id
|
|
57
|
+
dibs later test --after web-app:deploy -- npm run smoke # when that agent's deploy ends (--after-ok: only if it passed)
|
|
58
|
+
dibs later list # scheduled, waiting, running, and how the finished ones ended; dibs later cancel <id>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`dibs listen` also wakes an agent when dibs on this machine is updated (with what changed) or when a newer release is out, which it learns by asking dibs.cc at most every 6 hours per machine (never from a git checkout). `"updateCheck": false` in `~/.dibs/config.json` turns that ask off.
|
|
62
|
+
|
|
63
|
+
Anyone can override any job, the person or an agent. An agent acting on a job that isn't its own names the owner with `--owner <session>` (or `session/agent`), as the board shows it, or nothing changes (exit 2, with the owner, its `-m` and the command to rerun); the person never needs it. Every answer starts with whose job it was: `boosting #10167: alex-c8 deploy 'shop-api first deploy'`. `dibs boost <id> high -m "why"` (the `#` on `dibs --detail`), `dibs pause <id>` and `dibs resume <id>`, `dibs stop <id>` (kills the job; its agent is told who stopped it), and `dibs cap <agent> low` (that agent never waits or runs above low until `dibs cap <agent> off`). The same goes for `answer`, `questions dismiss`, `hours`, `pace <word>`, `tell`, `threads read`, `join`, `invite`, `pair --machine`, `kick`, `limit`, `service install`/`remove`, `guard install`/`remove` and `serve --force`: nothing is the person's alone.
|
|
64
|
+
|
|
65
|
+
Every one of them is logged with who ran it: `dibs history --json` has an `override` event with `by` (the agent's session name, or `the person`). The board says it too: `[boosted by web-app: release blocked]`, `[paused by web-app]`, `capped: pushy at low (by web-app)`. A message an agent sends with `dibs tell` arrives as `Message from web-app (another agent, not the person)`, and an agent that answers a question is named to the one that asked. An agent raising a job to high or urgent passes `-m`, so everyone sees why. The machine's own limits (memory, swap, disk, and never pausing every job) hold for everyone.
|
|
66
|
+
|
|
67
|
+
A waiting `dibs run` or `dibs hold` is a shell blocked on a FIFO (about 1.5 MB, no CPU), and one broker process decides for every waiter on the machine: it starts when someone waits and exits after a quiet minute. Before 0.0.102 each waiter was a Node process of its own, 35 to 65 MB polling the state every 1.5 seconds, which with dozens waiting came to gigabytes and kept the state lock busy most of the time. To go back to that, in `~/.dibs/config.json` (or `DIBS_THIN=0` for one caller):
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{ "waits": "fat" }
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Nothing changes in how agents call dibs, what it prints, or its exit codes. Jobs other machines send here and `dibs later` jobs wait thin too. `--after` still waits in Node (it waits outside the line until the other job ends), as does a run sent with `--anywhere` or `--on`, whose sender follows it over the network while it waits on the other machine. Anything that goes wrong with a thin wait (a broker that died, got stuck or couldn't start, a wait that fell back to Node, a crash) leaves an event of kind `thin` in `~/.dibs/events.jsonl`: `grep '"kind":"thin"' ~/.dibs/events.jsonl`.
|
|
74
|
+
|
|
75
|
+
## Watching your agents: the page and MCP
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
dibs service install web # or: dibs web (http://127.0.0.1:7421)
|
|
79
|
+
dibs pair # a one-time code, e.g. K7QM-4XNA: one use, 10 minutes
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Open http://127.0.0.1:7421 and type the code. The rail on the left switches between views:
|
|
83
|
+
|
|
84
|
+
- **Now**: alerts first: anything wrong, why, and the one fix, until it resolves (then when it did). Then every agent's running and waiting jobs on a timeline that spans only the time something is in, file locks, tasks with their ETAs, and every `dibs progress` post, live. Click a job to make it go first, give it back its normal place, let others go first, pause, resume or stop it (stop asks twice). Pick an agent to hold all its jobs back (`dibs cap`).
|
|
85
|
+
- **Questions**: what agents asked you at one-way doors. Answer with an option or your own words, or say not now.
|
|
86
|
+
- **Messages**: one thread per agent. What you send reaches the agent with its next tool call.
|
|
87
|
+
- **Stats**: run and wait time by agent and by resource, how often jobs waited longer than they ran, failures by exit code, what held jobs back, top commands, ETAs met, a daily trend, a day-by-hour heatmap, and the machine's load, memory and disk over time. Agents get the same numbers from `dibs stats --me`.
|
|
88
|
+
- **Scheduled**: `dibs later` runs coming up and ended this week; cancel one.
|
|
89
|
+
- **History**: `dibs history` for the past day, week or 30 days, and every override with who made it.
|
|
90
|
+
- **Settings**: the speed (`dibs pace`), your hours, and the Claude Code hook.
|
|
91
|
+
|
|
92
|
+
Every change on the page runs the same CLI command you would, as you, so `dibs history` and the board name you, and the CLI's own rules apply. Changes need the page's sign-in; nothing else can make them.
|
|
93
|
+
|
|
94
|
+
The same server is an MCP server at `http://127.0.0.1:7421/mcp`, so your own Claude can answer "what are my agents doing?". Add it to Claude Code with `claude mcp add --transport http dibs http://127.0.0.1:7421/mcp`; the client opens a sign-in page in your browser, and you type a code from `dibs pair`. With a plain `dibs pair` code it gets read-only tools: `board`, `agents`, `agent`, `progress`, `stats`, `questions`, `history`, `resource`, `machines` and `messages`. A code from `dibs pair --allow-actions` adds tools that act: post progress, answer questions, message agents and you, hold and release, and boost, pause, resume and stop jobs. It acts as an agent named after the client (`mcp-<name>`), never as you, so agents treat its messages as a peer's. A model reads text agents wrote, and text can steer a model, so give actions only to a client you'd trust with them. A code from `dibs pair --allow-commands` also lets a client signed in here (never through mcp.dibs.cc) queue commands to run on this Mac with `queue_run`, the way `dibs later` does. `dibs pair --list` shows what's signed in and `dibs pair --revoke <id|all>` signs it out.
|
|
95
|
+
|
|
96
|
+
It answers only on 127.0.0.1 unless you pass `--bind <address>` (your Tailscale address, say), and only to requests that name that address, so a web page can't reach it by DNS rebinding. Codes and tokens are stored hashed in `~/.dibs/web.json`. After 10 wrong codes in 10 minutes every try is refused until the window passes; open codes stay good. To let claude.ai or another Claude account read your board, `dibs relay mcp on` serves it at `https://mcp.dibs.cc/mcp` through the relay (docs/relay.md).
|
|
97
|
+
|
|
98
|
+
## Mac app
|
|
99
|
+
|
|
100
|
+
`app/` builds a Mac app (macOS 26) over the same commands: the live board with boost, pause, stop and cap buttons, agents' questions to answer, the week's history, and the pace, in a window and the menu bar. It runs the `dibs` on your PATH and reads nothing else. A signed, notarized download is at https://dibs.cc/mac. To build it yourself you need Xcode 26 and xcodegen (`brew install xcodegen`): [app/README.md](../app/README.md) has the steps.
|
|
101
|
+
|
|
102
|
+
Priority is `-p urgent|high|normal|low|idle`. `urgent` and `high` need `-m` and everyone sees them. `low` and `idle` run at background priority, and may be paused while urgent work borrows their slot. `--est 5m` tells dibs how long a new job takes, so short jobs can move up. A command that runs in under 15 seconds goes in the quick lane: wrap it with `--quick` (or `--est 10s`) and it starts at once, past the line and full slots, at most 2 at a time (on the simulator, or a deploy of the same repo, at the front of the line instead); dibs learns it after that, and takes the pass away from a run that goes over. `--by 23:30` moves you up as a deadline gets close.
|
|
103
|
+
|
|
104
|
+
Agents show up by their Claude Code session name. Anywhere else, dibs names them after the folder they run in; set `DIBS_AGENT=name` to pick your own.
|
|
105
|
+
|
|
106
|
+
## Exit codes
|
|
107
|
+
|
|
108
|
+
Agents branch on these, so they don't change.
|
|
109
|
+
|
|
110
|
+
| code | meaning |
|
|
111
|
+
|---|---|
|
|
112
|
+
| the command's own | it ran |
|
|
113
|
+
| 75 | dibs stopped waiting in line. The command never started and did not fail. Run the same command again within 2 minutes to keep your place. For `dibs question --wait`: no answer (timed out or dismissed), nothing was decided |
|
|
114
|
+
| 74 | not enough free disk, and nothing running would free it. Other sessions' `/private/tmp/claude-*` folders are off limits for making room |
|
|
115
|
+
| 76 | lost the coordinator or the other machine before a remote job started. Nothing ran there: sending it again is safe |
|
|
116
|
+
| 77 | lost the other machine after a remote job started. It may have run, or may still be running: check before running it again |
|
|
117
|
+
| 127 | the command didn't start |
|
|
118
|
+
| 2 | bad usage, a job asking more memory or cores than the machine ever hands out (it says the most it can ask), a resource name close to a real one (`simulator` for `sim`), an agent's high or urgent boost without `-m`, `--on` on a machine that isn't in a group, or a `dibs run` you already have waiting or running (wait for that one) |
|
|
119
|
+
| 3 | `dibs listen` heard nothing in its time (`--for`, 60m by default). Run it again to keep listening |
|
|
120
|
+
| 1 | nothing matched: `mine` with nothing held (the clean result after a release), `release` with nothing to give back |
|
|
121
|
+
| 70 | dibs itself crashed: a bug in dibs, not your command. Report it with `dibs ask "..."`. If your command already ran, you get its code instead |
|
|
122
|
+
|
|
123
|
+
Inside Claude Code, `dibs run` waits as long as it takes: when the tool call hits its timeout, Claude Code moves it to the background and tells the agent when it ends. Everywhere else (Codex, scripts, a terminal) dibs gives up after 8 minutes with exit 75, which fits a 10-minute tool call. `--wait` lifts the limit, `--max-wait 20m` sets your own.
|
|
124
|
+
|
|
125
|
+
## Resources
|
|
126
|
+
|
|
127
|
+
| name | slots | memory | cores | free disk | pausable |
|
|
128
|
+
|---|---|---|---|---|---|
|
|
129
|
+
| sim | 1 | 3G | 1 | 8G | no |
|
|
130
|
+
| sim-own | 4 on 16 GB (RAM / 4G, at most 4), and only as many as free memory fits | 3G | 2 | 6G | no |
|
|
131
|
+
| xcode-build | 2 | 4G | 4 | 4G | no |
|
|
132
|
+
| playwright | 2 | 3G | 2 | 3G | yes |
|
|
133
|
+
| test | 3 | 2G | 3 | | yes |
|
|
134
|
+
| deploy | 1 per project (its repo's origin, or the folder outside git), up to 3 projects at once (`exclusiveBy: "repo"`, `across: 3`) | 0.5G | 1 | | no |
|
|
135
|
+
| heavy | 1 | 4G | 4 | 10G | yes |
|
|
136
|
+
| any other name | 1 | 1G | 1 | | no |
|
|
137
|
+
| `files:<path or glob>` | one holder per path | 0 | 0 | | no |
|
|
138
|
+
| `quota:<name>` | a token bucket from config | 0 | 0 | | no |
|
|
139
|
+
|
|
140
|
+
A name close to a real one (`simulator`, `tests`, `xcode`) is refused with exit 2 and the right name, since two agents slipping differently would both get the real thing at once. A name of your own that looks like none of them starts a queue of its own.
|
|
141
|
+
|
|
142
|
+
Running jobs share a budget of 8 GB and 6 cores while the machine is busy, so light jobs run side by side and heavy ones take turns. The cores count what running jobs are measured using, not what they asked for. dibs measures what each job really uses, failed and killed runs included, and plans the next run of the same command at that, when it's more than asked (a command it hasn't measured yet goes by the same program on the same resource, so a new Playwright spec starts at what the others used); `--mem` and `--cpu` say what you need up front. Override any of it in `~/.dibs/config.json`; you only need the keys you change. State lives in `~/.dibs`. A resource you make up can have a name people read on the board: `"resources": { "gpu": { "slots": 1, "label": "The GPU" } }` (a quota takes `"label"` too).
|
|
143
|
+
|
|
144
|
+
## The rest of docs/
|
|
145
|
+
|
|
146
|
+
- [docs/scheduling.md](scheduling.md): how a turn is decided, what a lease guarantees, nested runs, measuring what jobs use, rate-limit quotas, pausing low-priority work, `dibs pace`, running jobs side by side, resetting a resource after each use, throttling
|
|
147
|
+
- [docs/files.md](files.md): file leases, and which edits the guard turns away
|
|
148
|
+
- [docs/questions.md](questions.md): agents queuing questions for the person, `--wait`, working hours
|
|
149
|
+
- [app/README.md](../app/README.md): the Mac app
|
|
150
|
+
- [docs/later.md](later.md): runs scheduled for a time or after something else ends
|
|
151
|
+
- [docs/relay.md](relay.md): the page from a phone or any browser, end to end encrypted, and dibs accounts
|
|
152
|
+
- [docs/simulators.md](simulators.md): `sim-own`, the pool of private simulators
|
|
153
|
+
- [docs/guard.md](guard.md): the hook, what it matches, the subagent limit, installing it for Claude Code and Codex, your own rules
|
|
154
|
+
- [docs/machines.md](machines.md): sending jobs to other machines, adding one (`dibs pair --machine` on the coordinator, `dibs join <code>` on the new machine), tokens, and keeping a project's code on the machines you name
|
|
155
|
+
- [AGENTS.md](../AGENTS.md): working on dibs itself
|
|
156
|
+
|
|
157
|
+
Platforms: macOS is what dibs is tested on. Linux uses the same code paths (`ps`, process groups, `/proc/pressure/memory`) but hasn't had a full test run yet. Windows support exists and is untested.
|
package/docs/releasing.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Releasing
|
|
2
2
|
|
|
3
|
-
How a version reaches people: dibs.cc, GitHub and the plugin marketplaces. The steps in AGENTS.md (suite twice, version bumps, CHANGELOG) come first; this is what happens after.
|
|
3
|
+
How a version reaches people: dibs.cc, npm, GitHub and the plugin marketplaces. The steps in AGENTS.md (suite twice, version bumps, CHANGELOG) come first; this is what happens after.
|
|
4
4
|
|
|
5
5
|
## Where a release goes
|
|
6
6
|
|
|
@@ -8,7 +8,8 @@ How a version reaches people: dibs.cc, GitHub and the plugin marketplaces. The s
|
|
|
8
8
|
|---|---|---|
|
|
9
9
|
| `https://dibs.cc/install.sh` | install.sh with the release's sha256 written in | `curl -fsSL https://dibs.cc/install.sh \| sh` |
|
|
10
10
|
| `https://dibs.cc/releases/` | `dibs-vX.tar.gz`, `dibs-vX.tar.gz.sha256`, `install-vX.sh` | install.sh downloads the tarball and always checks its sum |
|
|
11
|
-
| `https://dibs.cc/mac/` | the signed, notarized `dibs-X.dmg` and `latest.json` | `/mac/` redirects to the newest DMG
|
|
11
|
+
| `https://dibs.cc/mac/` | the signed, notarized `dibs-X.dmg` and `latest.json` | `/mac/` redirects to the newest DMG; the app checks `latest.json` daily |
|
|
12
|
+
| npm | `@dibssoftware/dibs` | `npm i -g @dibssoftware/dibs` |
|
|
12
13
|
| GitHub | the tag, and a release with GitHub's own tarball (`.github/workflows/release.yml`) | the repo, and the Claude Code and Codex plugin marketplaces |
|
|
13
14
|
|
|
14
15
|
The dibs.cc files live in the R2 bucket `dibs-releases`; the `dibs-waitlist` Worker serves `/install.sh`, `/releases/*` and `/mac/*` from it.
|
|
@@ -17,9 +18,10 @@ The dibs.cc files live in the R2 bucket `dibs-releases`; the `dibs-waitlist` Wor
|
|
|
17
18
|
|
|
18
19
|
From the public repo, after the AGENTS.md steps and with the version bumped everywhere (test/version.test.mjs checks):
|
|
19
20
|
|
|
20
|
-
1.
|
|
21
|
-
2. `
|
|
22
|
-
3.
|
|
23
|
-
4.
|
|
21
|
+
1. Each change in the release lands in the public repo as a commit of its own, with its own message, authored and committed by `dibs maintainers <licensing@dibs.cc>`. Never one squashed commit per release, and never a rewrite of what's already public. `release.sh` refuses a tag with any other author since the last tag.
|
|
22
|
+
2. `git tag vX && git push origin main vX`. The release workflow runs the suite on macOS and Linux, makes the GitHub release, and publishes `@dibssoftware/dibs` to npm through trusted publishing: no npm token anywhere, and npm shows the package's provenance as that workflow run. package.json has no dependencies and no scripts, so nothing runs on anyone's machine at install.
|
|
23
|
+
3. `sh release.sh` uploads the tarball, its sum and install.sh to dibs.cc, then downloads each back and compares bytes. `DIBS_DRY_RUN=1` builds and checks without uploading.
|
|
24
|
+
4. The Mac app: `dibs run xcode-build -m "mac release" -- app/release.sh`, then `sh release.sh --mac` to upload the DMG and, last, `latest.json`.
|
|
25
|
+
5. Plugin users get the new version once the `version` in `.claude-plugin/plugin.json` changes and their marketplace refreshes (`claude plugin marketplace update dibs`).
|
|
24
26
|
|
|
25
27
|
The tarball is `git archive` of the tag through `gzip -n`, so the same tag always gives the same bytes and the same sum.
|
package/docs/scheduling.md
CHANGED
|
@@ -7,7 +7,7 @@ The README covers using dibs. This is the detail: who goes next, what a lease gu
|
|
|
7
7
|
A waiter starts when all of these hold:
|
|
8
8
|
|
|
9
9
|
1. **Each resource it names has a free slot**, or the machine has room for one more on top (see "Running side by side" below).
|
|
10
|
-
2. **Nobody ahead of it in line wants the same resource and could use it.** Your own session's hold on a resource covers your runs on it, and so does the `dibs run` you're nested in. "Ahead" means arrival time, shifted by: its run time (what its command has taken, the median of its last ten runs, or `--est` until dibs has seen it, or 2 minutes for one never seen: shorter than 2 minutes moves it up, longer moves it back by the difference, an hour at most, so a 30-second check goes ahead of a 20-minute suite that arrived up to about 19 minutes before it, and no job waits behind quicker work much longer than it runs), heavy use of the same resources by the same agent in the last hour (5 minutes of use costs a minute, up to 10 minutes back, for fair share: an hour of test runs doesn't cost you your turn on the simulator), and priority (`urgent` +2 hours, `high` +1 hour, `normal` 0, `low` -10 minutes, `idle` -60: a high job goes ahead of a normal one unless that has waited an hour longer. `low` and `idle` run at background priority, and `idle` starts only when nobody else is waiting) and by a deadline that's getting close (`--by`: once slack drops under 20 minutes, you move up, by at most an hour). Every shift is bounded, so nobody waits forever. **The
|
|
10
|
+
2. **Nobody ahead of it in line wants the same resource and could use it.** Your own session's hold on a resource covers your runs on it, and so does the `dibs run` you're nested in. "Ahead" means arrival time, shifted by: its run time (what its command has taken, the median of its last ten runs, or `--est` until dibs has seen it, or 2 minutes for one never seen: shorter than 2 minutes moves it up, longer moves it back by the difference, an hour at most, so a 30-second check goes ahead of a 20-minute suite that arrived up to about 19 minutes before it, and no job waits behind quicker work much longer than it runs), heavy use of the same resources by the same agent in the last hour (5 minutes of use costs a minute, up to 10 minutes back, for fair share: an hour of test runs doesn't cost you your turn on the simulator), and priority (`urgent` +2 hours, `high` +1 hour, `normal` 0, `low` -10 minutes, `idle` -60: a high job goes ahead of a normal one unless that has waited an hour longer. `low` and `idle` run at background priority, and `idle` starts only when nobody else is waiting) and by a deadline that's getting close (`--by`: once slack drops under 20 minutes, you move up, by at most an hour). Every shift is bounded, so nobody waits forever. **The quick lane:** a command that takes under `quickUnder` (15 seconds unless set; the middle of its last ten runs, or `--quick` or an `--est` that short before dibs has seen it) starts at once: past the line, the slots of shared and pool resources, warning memory pressure, swap and the load ceiling. The disk floor, critical pressure, file leases and someone else's hold still stop it, and it never pauses anyone. At most 2 run at once. On an exclusive resource it goes to the front of the line instead of alongside, unless the resource says `quickAlongside: "other-repo"` (deploys do) and every job on it is another repo's. A run that goes over `quickUnder` loses the pass for its command until a run comes in under again. The board marks these `quick`. **Pairs that slow each other:** dibs compares each command's runs that spent most of their time beside a kind of work (a resource) with its runs that didn't. If it has taken 1.8 times as long or more beside work running now (three runs of each to go on), or makes that job take that long, it waits for that job to finish, but never longer than its own usual run time since it joined (`blocked by together`). **Backfill:** you may pass someone who can't start yet anyway, if you'll be done before they could have started.
|
|
11
11
|
3. **It fits the budgets.** What jobs book never adds up past the memory budget (8 GB by default), whatever the machine looks like: nothing starts past it. Memory counts what each job was handed (asked for, or raised to what its command has used), or what its whole process tree was last measured using when that's more: a job that outgrows its number still fills the machine. **Booked at what it uses:** a run measured for 3 minutes books its peak so far plus 1 GB instead of its ask, never more than its ask. Once its memory has stopped climbing for 2 minutes, it books what it uses now plus 1 GB, or only what it uses once it has been idle 5 minutes. The gap between asks and use goes to waiters, but a waiter let into it (one that wouldn't fit if every running job used its full ask) also needs the machine to show the room: memory pressure normal, swap not growing, and the job plus 3 GB (or a fifth of the machine's memory, if that's more) free by the OS's reading (`kern.memorystatus_level` on macOS, MemAvailable on Linux). So a job that spikes later can't push the machine into swap. Past the booking too: when what running jobs measure using right now, plus the job, fits the budget and the machine shows that same room, it starts; bookings keep a job's peak for minutes after it falls. Swap that's high but holding still doesn't count against that room; only growing swap and memory pressure do. Cores count what each running job was last measured using (every 10 seconds), and what it asked for until its first measurement: suites and builds ask for their peak and spend most of a run under it, and a few too many busy cores only slows everyone a little, so on a quiet machine the CPU budget steps aside. A job as big as the whole budget runs when nothing else is; your own holds and file leases don't count as something else. A run inside your own hold (or nested in your `dibs run`) uses the memory that hold reserved, so the two count once: at the larger of what the hold reserved and what the runs inside it use. Paused jobs keep their memory but take no cores.
|
|
12
12
|
4. **The machine can take it.** Free disk covers the job's need and stays above `minDisk` (5G): below that nothing starts, `urgent` work and runs inside your own hold included. The machine isn't short on memory right now: while the OS reports memory pressure at warning or critical, or swap is over `maxSwap` (4G), grew by more than 512 MB in the last 5 minutes and is still growing over the last minute and a half, work below `urgent` waits while anything else is running. The OS's free-memory reading counts compressed and cached memory as free and can say 60% while the Mac pages gigabytes to disk, and on macOS swap grows on the startup disk. Swap alone doesn't count: macOS keeps it allocated for hours after a crunch ends. dibs keeps a swap reading every 30 seconds in `~/.dibs/swap.json` to see the growth. With nothing else running, one job starts, since waiting can't help then. `"maxSwap": null` turns the swap check off; memory pressure still counts. Swap needs free disk to grow into, so while swap is growing or memory pressure is above normal, work below `urgent` also keeps `swapRoom` (3G) free on top of what it needs (8 GB with the stock `minDisk`), and while free disk falls more than 3 GB in 5 minutes, fast enough to be under that within 10 minutes, it waits for it to hold steady (a disk with plenty free that two builds are writing to holds nobody up); in both cases one job still starts with nothing else running. If the swap, pressure and disk-for-swap waits keep every job out for 10 minutes, counting only starts that went through them (not runs inside your own hold, not urgent work), the smallest and shortest waiter they hold back starts anyway, one at a time until its memory has held steady for 2 minutes, while free disk is over `minDisk` and pressure isn't critical. `"swapRoom": null` turns the room off, and `"minDisk": null` the floor. For jobs of 2 GB or more, the OS also reports at least 15% of memory free. If free disk can't be read, the board says `disk unknown` and `dibs run` says the disk check is off.
|
|
13
13
|
5. **The load is under the ceiling**, when there is one (`maxLoad`, set by `dibs pace`). `urgent` and `high` work skips this rule, and so does work that already holds a lease (below).
|
|
@@ -90,7 +90,7 @@ Anyone may `dibs boost`, `pause`, `resume`, `stop` and `cap` any job: the person
|
|
|
90
90
|
- **For urgent work.** When an `urgent` or `high` waiter is stuck behind a `low` or `idle` run on a full resource, dibs stops that run's whole process tree (SIGSTOP on every process group it has) and lends the waiter its slot. It pauses only as many runs as it takes, and only if that lets the waiter start right away; if something else would still block it (normal work holding another resource it wants, the memory budget, disk), nothing is paused. The paused run resumes (SIGCONT) the moment the waiter's lease ends, whether it finished, crashed, or was killed: whatever dibs call next reads the state does it.
|
|
91
91
|
- **Under memory pressure.** `dibs throttle --watch` reads the OS memory pressure every 10 seconds (`kern.memorystatus_vm_pressure_level` on macOS, `/proc/pressure/memory` on Linux). After two critical readings in a row it pauses one idle or low run (the one furthest over the memory it was handed first, then idle before low, then the most memory), and another after each further two. After a minute of normal readings it resumes one, lighter first, then waits another minute before the next. A warning reading resets both counts, so nothing flaps while the machine hovers. When the watcher stops, it resumes everything it paused; if it dies, the next dibs call does.
|
|
92
92
|
- **When swap fills the disk.** Holding new starts doesn't stop jobs already running from growing. The same watcher reads free disk every 10 seconds: while it's under `minDisk` (never under 3 GB, whatever `minDisk` says) and swap is still growing (or free disk fell more than 3 GB in 5 minutes), and still is over the last minute and a half, it pauses one more run each pass, two when free disk is falling fast enough to be down to 1 GB within two minutes: a job on top first, then `idle`, `low` and `normal` work, newest first. `urgent` and `high` work and holds are never paused, and nothing is killed. Once free disk has been back over the line it pauses at and steady for a minute, it resumes one, then another a minute later. A paused job's memory stays in swap, so the disk may never come back over the line: after 3 minutes with nothing growing or falling it resumes one anyway, since waiting frees nothing then. Free some space or end a paused job yourself if it keeps happening.
|
|
93
|
-
- **Before the disk runs out.** Under twice `minDisk`, the watcher clears caches that rebuild themselves (npm's and Homebrew's, simulators `simctl` calls unavailable, Xcode DerivedData no build has touched in a day), at most every 30 minutes and again when the disk drops under the floor, and logs what it freed in `~/.dibs/cool.log`. Then
|
|
93
|
+
- **Before the disk runs out.** Under twice `minDisk`, the watcher clears caches that rebuild themselves (npm's and Homebrew's, simulators `simctl` calls unavailable, Xcode DerivedData no build has touched in a day), at most every 30 minutes and again when the disk drops under the floor, and logs what it freed in `~/.dibs/cool.log`. Then each session with something of its own to free (a scratch folder over 2 GB, or running jobs that wrote a gigabyte or more) hears through the hook how much is free, what's growing fastest, whose folder holds the most, what dibs freed, and to free its own build output and scratch. It hears once per band: once under twice the floor and once more under the floor, and again only after the disk has had room (over twice the floor) and falls again. Other sessions hear nothing; the person sees the whole machine in `dibs alerts`. If the throttle watcher isn't running, the coordinator (`dibs serve`) sends the notes and clears the caches instead. Under the floor the note says to save work now, and names each agent's running jobs (they may fail writing) and waiting ones. A job paused for the disk tells its agent through the hook right away.
|
|
94
94
|
- **Who is filling the disk.** While free disk is under `minDisk`, or a waiter is held for its own disk need, the same watcher measures the session folders in Claude Code's temp folder (`/private/tmp/claude-<uid>/<project>/<session>`) every 10 minutes and keeps the three biggest over 2 GB in `~/.dibs/hogs.json`. Each one's agent (the one that made its biggest scratchpad folder, else the session's main thread) hears once per drop, through the hook, how big it is, what fills it (git worktrees, node_modules) and how to free it. A disk wait (`dibs why`, `dibs when`, the wait message) names the biggest folder and whose session it is, so a waiting agent knows whom to ask: only that session, or the person, may delete there. It also names what grew most since the last reading, 10 minutes before (each session folder, swap, simulators, Xcode build output, caches, and dibs's copies of other machines' jobs, read from twice the floor down): `Growing fastest: swap, up 2.5 GB in 10 min`. Under half a gigabyte isn't named. Memory pressure easing doesn't resume what the disk paused. If the watcher stops while the disk is still short, its disk pauses stay for a minute so the restarted watcher takes them over, instead of every paused job resuming at once.
|
|
95
95
|
- **Never all of them.** None of these pauses the last running job, or one about to finish (see What it guarantees).
|
|
96
96
|
- **When the paused jobs themselves fill the disk.** A paused job keeps its memory, and under memory pressure that memory goes to swap, which fills the disk the job is waiting for. So while free disk is under the line and swap is still growing, the watcher stops one disk-paused job each pass, the one using the most memory, instead of pausing another. The job isn't lost: its own `dibs run` puts it back at the front of its line and runs the command again from the start once there's room, in the same call, and its agent hears why through the hook. Only on resources marked `rerun` (test, playwright, xcode-build and heavy by default; never deploy or sim), never a job a person or agent paused, and never one about to finish. The same goes for a job running far past what it booked, paused or not, even the only one running: at least 4 GB over its booking and either twice it or more than all the memory dibs shares out. That job goes back at the front booked at what it really used (up to the budget), what it used goes into the history so later runs are planned at it too, and it starts again only once that much memory is really free and swap holds still. A job stopped this way once isn't stopped for it again.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dibssoftware/dibs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.179",
|
|
4
4
|
"description": "Coding agents on one machine take turns on the simulator, Xcode builds, test suites, browser runs and deploys",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"bin/",
|
|
11
11
|
"src/",
|
|
12
12
|
"docs/",
|
|
13
|
+
"!docs/images/",
|
|
13
14
|
"skills/",
|
|
14
15
|
"CHANGELOG.md",
|
|
15
16
|
"README.md",
|
package/skills/dibs/SKILL.md
CHANGED
|
@@ -1,34 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dibs
|
|
3
|
-
description: How to take turns with other agents on this machine's simulators, Xcode builds, test suites, browser runs, deploys and shared files using the dibs CLI, post progress, and ask the person questions. Use before running xcodebuild, xcrun simctl, swift test, Playwright, jest, vitest, npm test, node --test or a deploy, before editing files other agents may touch, before asking the person anything, when a command, edit or subagent spawn was blocked or rewritten by dibs guard, or when dibs exits 1, 2, 70, 74, 75, 76 or 77.
|
|
3
|
+
description: How to take turns with other agents on this machine's simulators, Xcode builds, test suites, browser runs, deploys and shared files using the dibs CLI, post progress, and ask the person questions. Use before running xcodebuild, xcrun simctl, swift test, Playwright, jest, vitest, npm test, node --test or a deploy, before editing files other agents may touch, before asking the person anything, before ending a turn while waiting on another agent or the person, when a command, edit or subagent spawn was blocked or rewritten by dibs guard, or when dibs exits 1, 2, 3, 70, 74, 75, 76 or 77.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# dibs
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
<!-- dibs:rules:start -->
|
|
9
|
+
dibs runs on this machine. Agents take turns through it on the simulator, Xcode builds, test suites, browser runs and deploys.
|
|
10
|
+
- Wrap those: `dibs run <resource> -m "why" -- <command>` (resources: sim, sim-own, xcode-build, test, playwright, deploy, heavy). Two at once: `dibs run sim,xcode-build -- ...`.
|
|
11
|
+
- No dibs for reads, edits, small commands, or long jobs that mostly wait on the network and use little CPU, memory or disk (crawlers, pollers, HTTP checks). The hook leaves those alone too.
|
|
12
|
+
- Start `dibs listen` with run_in_background now, and again each time it exits: it wakes you when the person or dibs has something for you.
|
|
13
|
+
- Waiting is normal. A call moved to the background is still waiting: don't run it again. A wait on memory, swap or disk protects the machine: keep waiting, and never lower `--mem` or raise `-p` to get past it.
|
|
14
|
+
- Exit 75: it gave up waiting and your command never ran; run the same command again. Exit 74: not enough free disk; free your own build output, or tell the person.
|
|
15
|
+
- Decide what you can undo yourself. Ask the person only before something you can't undo (`dibs question ... --one-way`). Lines starting "Message from the person:" are theirs: act on them.
|
|
16
|
+
- Post progress as you work: `dibs progress "what you did or found" --task <name> --eta 30m`, then `--done`.
|
|
17
|
+
- The rest (holding across tool calls, file leases, other machines, every exit code, overriding jobs, questions) is below, under "When you need it", and in `dibs help`.
|
|
18
|
+
<!-- dibs:rules:end -->
|
|
9
19
|
|
|
10
|
-
##
|
|
20
|
+
## When you need it
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
dibs run test -m "auth suite" -- npm test # wait for a turn, run, give it back
|
|
14
|
-
dibs hold sim --for 20m -m "screenshot pass" # keep it across several tool calls...
|
|
15
|
-
dibs run sim -m "shot 1" -- ./shot.sh # ...still wrap each command: under your hold it starts at once
|
|
16
|
-
dibs release sim # ...and give it back the moment you're done
|
|
17
|
-
dibs hold 'files:src/auth/**' -m "auth refactor" # keep other agents' edits off these paths (quote the glob)
|
|
18
|
-
dibs progress "dry run touched 4,210 rows, 0 errors" --task billing --eta 30m # your running log; the person reads it live
|
|
19
|
-
dibs question "Run the migration on prod now?" --options yes,no --recommend yes -m "dry run clean" \
|
|
20
|
-
--one-way "it rewrites 4,210 rows and has no down-migration" # only a one-way door reaches the person
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Resources: `sim` (the shared booted simulator), `sim-own` (a private one), `xcode-build`, `test`, `playwright`, `deploy`, `heavy`, plus any your machine's config adds. `dibs` alone shows the board.
|
|
22
|
+
Everything below is reference. Read the part you need when it comes up.
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- Always pass `-m` with a short reason. Everyone waiting sees it.
|
|
28
|
-
- Need two resources? Ask for both at once: `dibs run sim,xcode-build -- ...`. Never hold one while waiting for another.
|
|
29
|
-
- If a tool call with `dibs run` or `dibs hold` times out and moves to the background, don't run it again. dibs refuses the copy (exit 2); wait for the first one's result.
|
|
30
|
-
|
|
31
|
-
## Running
|
|
24
|
+
### Running
|
|
32
25
|
|
|
33
26
|
```bash
|
|
34
27
|
dibs run xcode-build -m "why" -- xcodebuild -scheme App build
|
|
@@ -39,24 +32,70 @@ dibs run test --after #42 -- npm run e2e # joins the
|
|
|
39
32
|
dibs run test -- sh -c 'npm run build && npm test' # a shell line goes in sh -c
|
|
40
33
|
```
|
|
41
34
|
|
|
42
|
-
-
|
|
35
|
+
- `sim` is the one shared booted simulator. `sim-own` boots a private one for your command (its udid in `$SIM`) and shuts it down after.
|
|
36
|
+
- `$SIM` and `--port` variables are set inside the run, so put them in single-quoted `sh -c '...'`. Use `$WEB` (or whatever you named the port), never a fixed port.
|
|
37
|
+
- Need two resources? Ask for both in one `dibs run a,b`. Never hold one while waiting for another.
|
|
38
|
+
- The turn lasts exactly as long as the command: when it exits or crashes, the turn is given back and its whole process tree is killed. Don't add keepalives, `timeout` wrappers or lock files of your own.
|
|
43
39
|
- Inside Claude Code, `dibs run` waits as long as it takes. Every run ends with one line on stderr, `dibs: #812 test, waited 2m10s, ran 3m04s, exit 0`; after a compaction, that line is the result.
|
|
40
|
+
- A command over in under 15 seconds (a deploy of a few seconds, a one-file test): add `--quick`, or `--est 10s`. It starts at once, past the line and full slots, at most 2 at a time; on the simulator, or a deploy of the same repo, it goes to the front of the line instead. dibs learns it after that. A run that goes over loses the pass until it runs under again, and you're told.
|
|
44
41
|
- `--est 3m` (a duration like `30s`, `5m`, `1h`) on a job dibs hasn't seen lets short jobs move up. `--mem 6G --cpu 4` the first time you run something heavy dibs hasn't measured; after that it plans at the measured peak, and says so if a job used far more than it asked.
|
|
45
|
-
- Priority: `-p urgent|high|normal|low|idle
|
|
42
|
+
- Priority: `-p urgent|high|normal|low|idle` (or 1-5). `urgent` (something's broken or a person is waiting now) and `high` (critical path) need `-m`, and everyone sees them. `normal` is the default. `low` (nobody waiting) and `idle` (audits, solvers, regenerating things) run at background priority on the cool cores. Pick the true level. `--by 23:30` for a deadline.
|
|
43
|
+
- `--notify <file>` appends a JSON line to that file when dibs exits.
|
|
44
|
+
- A shared API rate budget: `dibs run quota:<name> --cost N -- <cmd>` (the budgets are set in `~/.dibs/config.json` `quotas`).
|
|
45
|
+
- Work that runs outside dibs is moved to the slow cores when the machine runs hot (`dibs throttle`). Wrapping it lets you pick its priority.
|
|
46
46
|
- A resource name close to a real one (`simulator`, `tests`) is refused with exit 2 and the right name. A new name of your own starts its own queue.
|
|
47
47
|
- A suite that takes minutes: `dibs run test --shards 2 -- npx vitest run` splits it across the group's machines and merges the output and exit codes. vitest and `node --test` suites that usually take over 5 minutes split on their own; `--no-shard` keeps one piece.
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
### Listening for messages
|
|
50
|
+
|
|
51
|
+
`dibs listen`, started with run_in_background, waits until something comes for you, prints all of it and exits 0, and that exit wakes you even while you sit idle. Start it at the start of your session and again each time it exits. What wakes it:
|
|
52
|
+
|
|
53
|
+
- a message for you (`dibs tell`, from the person or another agent)
|
|
54
|
+
- the person answering your question in their own words
|
|
55
|
+
- a notice from dibs about your own jobs
|
|
56
|
+
- dibs on this machine was updated: it prints what changed since your last version, once
|
|
57
|
+
- a newer dibs is out on dibs.cc ("dibs X is out (you have Y)"): the person upgrades it; don't upgrade it yourself. Asked at most every 6 hours per machine, never from a git checkout, off with `"updateCheck": false` in config.json.
|
|
58
|
+
|
|
59
|
+
Exit 0 ends with "To keep listening, start dibs listen again with run_in_background." Exit 3 means nothing came within `--for` (60m by default). Either way, start it again. `--json` gives `{ messages }`, `{ updated, changes }` or `{ release }`.
|
|
60
|
+
|
|
61
|
+
One listener per agent: the main agent of a session, and each subagent, separately. A newer one replaces the older, which exits 0 saying another took over. Messages that arrive while you work come with your next tool call instead; none is lost or handed over twice. If you end a turn after your listener exited, the hook keeps you going once with "re-arm: your dibs listen has ended". The board, `dibs threads` and `dibs tell` say who is listening.
|
|
62
|
+
|
|
63
|
+
### Holding across tool calls
|
|
50
64
|
|
|
51
65
|
`dibs hold <res> --for 20m -m "why"` waits for its turn like `dibs run`, then returns. Keep wrapping each command in `dibs run <res> -- ...`: under your hold it starts without waiting. Run the hold again to extend it; an hour is the most it gets at once. `dibs release <res>` when you're done. `dibs mine` lists what you hold and wait for, and exits 1 when that's nothing, which is the clean result after a release.
|
|
52
66
|
|
|
53
67
|
A script running under `dibs run deploy` that calls `dibs run xcode-build` waits only for xcode-build, ahead of waiters holding nothing.
|
|
54
68
|
|
|
55
|
-
|
|
69
|
+
### When dibs holds you back
|
|
70
|
+
|
|
71
|
+
- **Memory, swap or disk** ("waiting for memory pressure to ease", "this machine to stop swapping", "free disk to stop falling"): dibs is protecting the machine. Keep waiting. Don't pass a smaller `--mem` or a higher `-p` to get past it. A memory wait names the jobs holding the most: if one is yours and finished, end it.
|
|
72
|
+
- **Disk at your turn:** a resource that declares a disk need (the simulator asks 8 GB) is refused with exit 74 when that much isn't free and nothing running will free it. If your job needs less, pass `--disk 1G` on the hold and on each `dibs run`. A job whose own past runs ate more disk than is free waits for disk too, even alone. While you wait on something else, the wait message says early when disk will hold you next, so free your own build output then.
|
|
73
|
+
- **Paused** ("paused your job: free disk is low", or for urgent work): leave it, it resumes by itself.
|
|
74
|
+
- **Load** ("waiting for the machine to cool down"): ends within 20 minutes.
|
|
75
|
+
- **A person is waiting on the job now:** run it with `-p high -m "why"`, or send it to another machine with `--on <machine>` (`dibs machines`). That's the only reason to raise it.
|
|
76
|
+
- **Someone ahead of you:** agents appear by session name, the same name SendMessage uses. Message the agent ahead and ask; whoever is ahead runs `dibs yield <your name>`. If someone asks you and their work is more urgent, run `dibs yield <their name>`.
|
|
77
|
+
- **Lines from the dibs hook about your jobs** (stuck with no CPU for 20 minutes while others wait, over its memory, paused, a progress task overdue): they're about your own work. Act on them.
|
|
78
|
+
|
|
79
|
+
### Exit codes
|
|
80
|
+
|
|
81
|
+
| code | meaning | what to do |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| the command's own | it ran | read it as usual |
|
|
84
|
+
| 75 | gave up waiting: your command never started and didn't fail (outside Claude Code, after `--max-wait`, 8m by default), or a question got no answer | rerun the same command within 2 minutes to keep your place, or add `--wait`. On a question: nothing was decided, skip that step |
|
|
85
|
+
| 74 | not enough free disk | the message says how much it needed. Free your own build output, or tell the person; if this run needs less, pass a smaller `--disk` on that `dibs run` (a hold's `--disk` doesn't cover the runs under it). Never delete in another session's `/private/tmp/claude-*` folder |
|
|
86
|
+
| 76 | lost the coordinator or the other machine before the job started | nothing ran there: send it again |
|
|
87
|
+
| 77 | lost the other machine after the job started | it may have run, or still be running: check before running it again, above all a deploy |
|
|
88
|
+
| 70 | dibs itself crashed | a bug in dibs, not your command: `dibs ask "..."` |
|
|
89
|
+
| 127 | the command didn't start | check the command and its path |
|
|
90
|
+
| 2 | bad usage: a near-miss resource name, a high or urgent boost without `-m`, a job bigger than this machine (ask for what it names, or `--anywhere`), `--on` or `dibs machines` outside a group, or a run you already have going | read the message: it names the fix |
|
|
91
|
+
| 1 | nothing matched (`mine` with nothing held, `release` with nothing to give back) | usually the clean result |
|
|
92
|
+
| 3 | `dibs listen` heard nothing within `--for` (60m by default) | start it again with run_in_background |
|
|
93
|
+
|
|
94
|
+
### Files other agents may edit
|
|
56
95
|
|
|
57
96
|
`dibs hold 'files:src/auth/**' -m "why"` (paths from the git root; `**` crosses folders) turns away other agents' edits and writes there, with who holds it and why. Quote the glob, or zsh expands it first and fails with "no matches found". `dibs release 'files:src/auth/**'` gives it back. If your edit is refused: wait (`dibs when files:<path>`) or message the holder. Don't write the file another way. Paths nobody leased need nothing.
|
|
58
97
|
|
|
59
|
-
|
|
98
|
+
### Progress
|
|
60
99
|
|
|
61
100
|
Post as often as you commit. The person reads every post live on their page, the Mac app and their own Claude; other agents read them with `dibs progress`.
|
|
62
101
|
|
|
@@ -65,16 +104,39 @@ dibs progress "Starting billing-migration: script written, dry run next" --task
|
|
|
65
104
|
dibs progress "Dry run touched 4,210 rows, 0 errors. Asking before prod" --task billing-migration --eta 30m
|
|
66
105
|
dibs progress "Blocked: waiting on the person for the prod run (question #3)" --task billing-migration --blocked
|
|
67
106
|
dibs progress "Done: migrated 4,210 rows on prod, checks pass" --task billing-migration --done
|
|
107
|
+
dibs progress list # your session's open tasks, with owner, state, ETA and last post (--all: every session's)
|
|
68
108
|
```
|
|
69
109
|
|
|
70
110
|
- Post when you start (with `--eta`), when you learn something (a test fails, a cause found, a plan changed, with the numbers), when you hand off or wait (`--blocked`), and at the end (`--done`). A task of a minute or two needs just the `--done` post.
|
|
71
111
|
- Keep `--task` the same short name across posts, and move `--eta` (`30m` or `17:30`) when the estimate moves.
|
|
72
|
-
- A task still open past its `--eta` shows as overdue, and
|
|
112
|
+
- A task still open past its `--eta` shows as overdue, and dibs tells you once: post a new `--eta`, or `--done`. You hear once too if an open task goes 45 minutes without a post. Ending a task without finishing it: `--done` with a post that says what isn't done.
|
|
73
113
|
- Posts are for the record. Questions go through `dibs question`; a note the person should see now goes through `dibs say`.
|
|
74
114
|
|
|
75
|
-
|
|
115
|
+
### The guard
|
|
116
|
+
|
|
117
|
+
When dibs's hook sees a heavy command outside `dibs run`, it rewrites it into the `dibs run ...` line (in bypass-permissions sessions) or blocks it and prints that line. Run the line. If the command really builds, boots, tests and deploys nothing, put `DIBS_GUARD=off` in front of it. If the person set a subagent limit (config `agents.slots`), a denied spawn started nothing and isn't a failure: wait for one of yours to report back, then spawn again.
|
|
118
|
+
|
|
119
|
+
### Looking without joining the line
|
|
120
|
+
|
|
121
|
+
`dibs` (the board, whose `Limits` line has memory, disk and swap), `dibs when sim`, `dibs who sim`, `dibs why`, `dibs mine`, `dibs history` (the last 7 days). Every command and flag: `dibs help all`. Something wrong with dibs, or a question about it: `dibs ask "..."`, or SendMessage the maintainer its answer names. When dibs says it was updated, read what changed with `dibs changes` and follow it.
|
|
76
122
|
|
|
77
|
-
|
|
123
|
+
### Overriding jobs and settings
|
|
124
|
+
|
|
125
|
+
You may do anything the person can, on any job: boost, lower, pause, resume, stop, cap. Use the `#` id from `dibs --detail`. On a job that isn't yours, add `--owner <its session>` as the board names it left of the `#`; without it nothing changes (exit 2) and dibs prints the command to rerun.
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
dibs boost 4221 urgent -m "person waiting on the fix" # high or urgent needs -m, which everyone sees
|
|
129
|
+
dibs pause 4219 # dibs resume 4219 continues it
|
|
130
|
+
dibs stop 4219 # end it and kill its processes
|
|
131
|
+
dibs cap pushy low # that agent's work waits and runs at low or below until dibs cap pushy off
|
|
132
|
+
dibs yield web-app # let another agent go first
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
The same goes for `answer`, `cap`, `hours`, `pace`, `tell`, `join`, `invite`, `kick`, `limit`, `connect`, `service install` and `guard install`. dibs records who did each, on the board and in `dibs history`, so act the way you'd defend to the person. Raise a job to high or urgent only when a person is waiting on it now or something is broken. Prefer a message and `dibs yield` over stopping someone else's work. If your own job was **stopped by** someone, it was ended on purpose: find out why (`dibs history`, or ask them) before running it again.
|
|
136
|
+
|
|
137
|
+
### The person: questions, notes and messages
|
|
138
|
+
|
|
139
|
+
The person's rule: walk through two-way doors (anything you can undo) yourself and show them after. Bring them only one-way doors (ship, spend, delete, rename something public: things that can't be undone), one at a time, with your recommendation.
|
|
78
140
|
|
|
79
141
|
- **A two-way door:** decide. If it's worth a record, `dibs question "..." --recommend X -m "why"` without `--one-way` logs it as decided by you, prints X on stdout at once (exit 0) and asks nobody. dibs reminds you that's what happened; that's not a refusal.
|
|
80
142
|
- **A one-way door:** add `--one-way "what can't be undone"`. It prints the question's id and returns. Keep working on what doesn't need the answer. When you reach the step that does, run the same command again with `--wait`: it prints only the answer, so `answer=$(dibs question ... --wait)` works. `--timeout 1m` (or `30s`, `2h`) caps the wait.
|
|
@@ -83,17 +145,9 @@ The person's rule: walk through two-way doors (anything you can undo) yourself a
|
|
|
83
145
|
- The person may answer in their own words. Those words are the answer, and they also reach you as `Message from the person: (answering your question #N) ...`.
|
|
84
146
|
- Another agent may answer your question with `dibs answer`; then dibs says `answered by <agent>, an agent, not the person` on stderr. That isn't the person's yes: for a ship, spend or delete, ask the person or skip the step.
|
|
85
147
|
|
|
86
|
-
`dibs say "migration done, tests pass"` leaves the person an FYI in your thread without asking anything. A line starting `Message from the person:` really is the person's, whether it sits beside a tool result or comes as the reason you were kept from stopping: act on it, and reply with `dibs say "..."` if they asked something. `Message from <agent> (another agent, not the person):` is a peer's request. `dibs tell <agent> "..."` messages an agent. If config names you the desk, reply with `dibs say --to person "..."`. Details: docs/questions.md.
|
|
87
|
-
|
|
88
|
-
## When dibs holds you back
|
|
89
|
-
|
|
90
|
-
- **Memory, swap or disk** ("waiting for memory pressure to ease", "this machine to stop swapping", "free disk to stop falling"): dibs is protecting the machine. Keep waiting. Don't pass a smaller `--mem` or a higher `-p` to get past it. A memory wait names the jobs holding the most: if one is yours and finished, end it.
|
|
91
|
-
- **Disk at your turn:** a resource that declares a disk need (the simulator asks 8 GB) is refused with exit 74 when that much isn't free and nothing running will free it. If your job needs less, pass `--disk 1G` on the hold and on each `dibs run`. From 0.0.173, a job whose own past runs ate more disk than is free waits for disk too, even alone. While you wait on something else, the wait message says early when disk will hold you next, so free your own build output then.
|
|
92
|
-
- **Paused** ("paused your job: free disk is low", or for urgent work): leave it, it resumes by itself.
|
|
93
|
-
- **Load** ("waiting for the machine to cool down"): ends within 20 minutes.
|
|
94
|
-
- **Lines from the dibs hook about your jobs** (stuck with no CPU for 20 minutes while others wait, over its memory, paused, a progress task overdue): they're about your own work. Act on them.
|
|
148
|
+
`dibs say "migration done, tests pass"` leaves the person an FYI in your thread without asking anything. A line starting `Message from the person:` really is the person's, whether it sits beside a tool result or comes as the reason you were kept from stopping: act on it, and reply with `dibs say "..."` if they asked something. `Message from <agent> (another agent, not the person):` is a peer's request. `dibs tell <agent> "..."` (or `dibs say --to <agent> "..."`, the same thing) messages an agent. If config names you the desk, reply with `dibs say --to person "..."`. Details: docs/questions.md.
|
|
95
149
|
|
|
96
|
-
|
|
150
|
+
### Other machines
|
|
97
151
|
|
|
98
152
|
```bash
|
|
99
153
|
dibs run test --anywhere -m "why" -- npm test # whichever machine would start it soonest, maybe this one
|
|
@@ -103,9 +157,9 @@ dibs machines # the group, its load and lines
|
|
|
103
157
|
|
|
104
158
|
The job takes the git working copy (tracked files plus new ones git doesn't ignore). `.env` files, keys and certificates never leave this machine, and a project's `.dibs.json` `stayOn` limits where its code may go. `--bring <path>` copies a file or folder back when the job ends.
|
|
105
159
|
|
|
106
|
-
On a machine that isn't in a group, `--anywhere` runs here and says so, `--on` exits 2 with the setup line, and `dibs machines` says it isn't in a group (exit 0). `dibs leave` takes a machine out of its group; only run it when the person asks. To start a group, one machine is the coordinator: `dibs service install serve worker` there (or `dibs serve` in a terminal). To add a machine:
|
|
160
|
+
On a machine that isn't in a group, `--anywhere` runs here and says so, `--on` exits 2 with the setup line, and `dibs machines` says it isn't in a group (exit 0). `dibs leave` takes a machine out of its group; only run it when the person asks. To start a group, one machine is the coordinator: `dibs service install serve worker` there (or `dibs serve` in a terminal). To add a machine: `dibs connect --machine` on the coordinator prints a one-time code, `dibs join <code>` on the new machine finds the coordinator (same network, Tailscale, or `--at <address>`), and `dibs service install worker` there keeps it taking jobs. `dibs invite <name>` and its join line still work. Details: docs/machines.md.
|
|
107
161
|
|
|
108
|
-
|
|
162
|
+
### Run it later
|
|
109
163
|
|
|
110
164
|
```bash
|
|
111
165
|
dibs later sim --at 02:00 -m "snapshot suite" -- ./snapshots.sh # prints its id (l3) and returns
|
|
@@ -116,47 +170,14 @@ dibs later list # state, exit c
|
|
|
116
170
|
|
|
117
171
|
When it's due it runs as `dibs run --wait` in this folder, with PATH, HOME and LANG (more with `--env NAME`). At most 7 days out. Details: docs/later.md.
|
|
118
172
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
You may do anything the person can, on any job: boost, lower, pause, resume, stop, cap. Use the `#` id from `dibs --detail`. On a job that isn't yours, add `--owner <its session>` as the board names it left of the `#`; without it nothing changes (exit 2) and dibs prints the command to rerun.
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
dibs boost 4221 urgent -m "person waiting on the fix" # high or urgent needs -m, which everyone sees
|
|
125
|
-
dibs pause 4219 # dibs resume 4219 continues it
|
|
126
|
-
dibs stop 4219 # end it and kill its processes
|
|
127
|
-
dibs cap pushy low # that agent's work waits and runs at low or below until dibs cap pushy off
|
|
128
|
-
dibs yield web-app # let another agent go first
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
The same goes for `answer`, `hours`, `pace`, `tell`, `invite`, `pair --machine`, `service install` and `guard install`. dibs records who did each, on the board and in `dibs history`, so act the way you'd defend to the person. Raise a job to high or urgent only when a person is waiting on it now or something is broken. Prefer a message and `dibs yield` over stopping someone else's work. If your own job was **stopped by** someone, it was ended on purpose: find out why (`dibs history`, or ask them) before running it again.
|
|
132
|
-
|
|
133
|
-
## The person's page and MCP
|
|
134
|
-
|
|
135
|
-
If the person asks you to connect something to dibs:
|
|
136
|
-
|
|
137
|
-
- From a phone or any browser: `dibs pair --remote` prints a one-time link to https://app.dibs.cc, end-to-end encrypted through the relay; it can only look unless paired with `--allow-actions`.
|
|
138
|
-
- The page and MCP server: `dibs web` (or `dibs service install web`) at `http://127.0.0.1:7421`, MCP at `/mcp`. Another machine on Tailscale reaches it with `dibs web --bind <tailscale address>`. A claude.ai connector on another account uses `https://mcp.dibs.cc/mcp` after the person runs `dibs relay mcp on`.
|
|
139
|
-
- Sign-in is a one-time code from `dibs pair` (10 minutes, one use), which gives read-only tools. From 0.0.173, a code from `dibs pair --allow-actions` adds tools that act (post progress, answer questions, message agents, hold, boost, pause, stop); the client acts as an agent named `mcp-<name>`, never as the person. A code from `dibs pair --allow-commands` also lets a client signed in at this Mac's own address queue commands, never through mcp.dibs.cc.
|
|
140
|
-
- `dibs pair --list` shows what's signed in and what each may do; `dibs pair --revoke <id|all>` signs it out. Details: README.md and docs/relay.md.
|
|
141
|
-
|
|
142
|
-
## Exit codes
|
|
143
|
-
|
|
144
|
-
| code | meaning | what to do |
|
|
145
|
-
|---|---|---|
|
|
146
|
-
| the command's own | it ran | read it as usual |
|
|
147
|
-
| 75 | gave up waiting: your command never started and didn't fail (outside Claude Code, after `--max-wait`, 8m by default), or a question got no answer | rerun the same command within 2 minutes to keep your place, or add `--wait`. On a question: nothing was decided, skip that step |
|
|
148
|
-
| 74 | not enough free disk | the message says how much it needed. Free your own build output, or tell the person; if this run needs less, pass a smaller `--disk` on that `dibs run` (a hold's `--disk` doesn't cover the runs under it). Never delete in another session's `/private/tmp/claude-*` folder |
|
|
149
|
-
| 76 | lost the coordinator or the other machine before the job started | nothing ran there: send it again |
|
|
150
|
-
| 77 | lost the other machine after the job started | it may have run, or still be running: check before running it again, above all a deploy |
|
|
151
|
-
| 70 | dibs itself crashed | a bug in dibs, not your command: `dibs ask "..."` |
|
|
152
|
-
| 127 | the command didn't start | check the command and its path |
|
|
153
|
-
| 2 | bad usage: a near-miss resource name, a high or urgent boost without `-m`, a job bigger than this machine (ask for what it names, or `--anywhere`), `--on` or `dibs machines` outside a group, or a run you already have going | read the message: it names the fix |
|
|
154
|
-
| 1 | nothing matched (`mine` with nothing held, `release` with nothing to give back) | usually the clean result |
|
|
155
|
-
|
|
156
|
-
## The guard
|
|
173
|
+
### Connecting things to dibs
|
|
157
174
|
|
|
158
|
-
|
|
175
|
+
If the person asks you to connect something to dibs, `dibs connect` is the one way in. On its own it explains each choice and, in a terminal, asks which:
|
|
159
176
|
|
|
160
|
-
|
|
177
|
+
- `dibs connect --browser`: a one-time code for the page at `http://127.0.0.1:7421` (10 minutes, one use).
|
|
178
|
+
- `dibs connect --phone`: a link and QR code for a phone or any browser at https://app.dibs.cc, end-to-end encrypted through the relay.
|
|
179
|
+
- `dibs connect --account`: every browser the person signs in with at app.dibs.cc opens this Mac.
|
|
180
|
+
- `dibs connect --mcp`: another Claude account's connector reads dibs over MCP at `https://mcp.dibs.cc/mcp`.
|
|
181
|
+
- `dibs connect --machine`: another machine joins the group (above).
|
|
161
182
|
|
|
162
|
-
|
|
183
|
+
A browser, phone, account or MCP client can only look unless connected with `--allow-actions`. An MCP client that acts does so as an agent named `mcp-<name>`, never as the person. `dibs pair --allow-commands` also lets a client signed in at this Mac's own address queue commands; never through mcp.dibs.cc. `dibs connect --list` shows everything connected and what each may do; `dibs connect --remove <id>` disconnects one. Details: README.md and docs/relay.md.
|