@dibssoftware/dibs 0.0.0-stage → 0.0.178
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 +577 -0
- package/LICENSE +670 -0
- package/README.md +234 -2
- package/bin/dibs-guard.mjs +7 -0
- package/bin/dibs.mjs +526 -0
- package/docs/benchmarks.md +193 -0
- package/docs/files.md +30 -0
- package/docs/guard.md +91 -0
- package/docs/later.md +43 -0
- package/docs/machines.md +147 -0
- package/docs/questions.md +78 -0
- package/docs/relay.md +196 -0
- package/docs/releasing.md +25 -0
- package/docs/scheduling.md +163 -0
- package/docs/simulators.md +17 -0
- package/package.json +44 -4
- package/skills/dibs/SKILL.md +162 -0
- package/src/acquire.mjs +697 -0
- package/src/admin.mjs +145 -0
- package/src/agents.mjs +145 -0
- package/src/alerts.mjs +437 -0
- package/src/answers.mjs +65 -0
- package/src/board.mjs +202 -0
- package/src/broker.mjs +369 -0
- package/src/commands.mjs +801 -0
- package/src/config.mjs +320 -0
- package/src/connect.mjs +106 -0
- package/src/cool.mjs +160 -0
- package/src/diskwarn.mjs +161 -0
- package/src/events.mjs +94 -0
- package/src/files.mjs +1100 -0
- package/src/guard.mjs +583 -0
- package/src/history.mjs +247 -0
- package/src/hogs.mjs +214 -0
- package/src/later.mjs +487 -0
- package/src/measure.mjs +262 -0
- package/src/nodecheck.mjs +17 -0
- package/src/notices.mjs +121 -0
- package/src/ondemand.mjs +572 -0
- package/src/overlap.mjs +151 -0
- package/src/override.mjs +351 -0
- package/src/owner.mjs +30 -0
- package/src/plain.mjs +467 -0
- package/src/platform.mjs +357 -0
- package/src/preempt.mjs +438 -0
- package/src/primer.mjs +61 -0
- package/src/proc.mjs +98 -0
- package/src/progress.mjs +158 -0
- package/src/qr.mjs +204 -0
- package/src/questions.mjs +389 -0
- package/src/quota.mjs +81 -0
- package/src/reads.mjs +54 -0
- package/src/relay.mjs +779 -0
- package/src/remote.mjs +584 -0
- package/src/reset.mjs +127 -0
- package/src/schedule.mjs +995 -0
- package/src/scratch.mjs +61 -0
- package/src/serve.mjs +736 -0
- package/src/service.mjs +221 -0
- package/src/shard.mjs +59 -0
- package/src/simctl.mjs +42 -0
- package/src/simpool.mjs +258 -0
- package/src/state.mjs +201 -0
- package/src/stats.mjs +328 -0
- package/src/style.mjs +44 -0
- package/src/talk.mjs +523 -0
- package/src/thin.sh +130 -0
- package/src/trust.mjs +152 -0
- package/src/util.mjs +184 -0
- package/src/version.mjs +2 -0
- package/src/web.mjs +1117 -0
- package/src/worker.mjs +318 -0
package/README.md
CHANGED
|
@@ -1,3 +1,235 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dibs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Three coding agents, one Mac, one simulator. One installs its build over the app another is tapping through, a third starts a fourth `xcodebuild`, memory runs out, and the simulator crashes for all of them.
|
|
4
|
+
|
|
5
|
+
dibs makes agents take turns on the things that exist once on your machine (the simulator, Xcode builds, test suites, browser runs, deploys) and lets everything else run in parallel. It's a single Node CLI with no dependencies and no daemon.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
macOS or Linux, Node 22.23.4, 24.22.1 or 26.12.1 or newer. Older builds of those lines have the Brotli decoder bug (CVE-2026-111497), so upgrade Node first if yours is behind. No sudo.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
curl -fsSL https://dibs.cc/install.sh | sh
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
It downloads the release tarball from dibs.cc, checks its sha256, puts dibs in `~/.dibs-cli` and links `~/.local/bin/dibs`. If anything fails, it says what and exits nonzero, having installed nothing. Each release's tarball and sum are at `https://dibs.cc/releases/dibs-v<version>.tar.gz` and `.tar.gz.sha256`.
|
|
16
|
+
|
|
17
|
+
Or a pinned version from GitHub: `curl -fsSL https://raw.githubusercontent.com/dibssoftware/dibs/v0.0.178/install.sh | sh`. Or clone the repo and run `DIBS_SOURCE=<the clone> sh install.sh`.
|
|
18
|
+
|
|
19
|
+
## The first five commands
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
dibs run sim -m "checkout flow" -- ./ui-test.sh # wait for the simulator, run, free it on exit
|
|
23
|
+
dibs run test --est 2m -- npm test # a test suite, side by side with others when there's room
|
|
24
|
+
dibs hold sim --for 20m -m "screenshot pass" # keep it across several commands; dibs release sim gives it back
|
|
25
|
+
dibs # the board: who has what, who's next
|
|
26
|
+
dibs why # where you are in line and what you're waiting for
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The board reads like this:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
2 running, 1 waiting. Next up: api-refactor for the simulator, as soon as ios-checkout finishes.
|
|
33
|
+
|
|
34
|
+
Simulator ios-checkout has reserved it, up to 15 min left
|
|
35
|
+
Next: api-refactor
|
|
36
|
+
Xcode builds web-app is building, about 1 min left
|
|
37
|
+
Free Private simulators, Browser tests, Test runs, Deploys, Heavy jobs
|
|
38
|
+
|
|
39
|
+
This machine quiet: 42% of memory free, 31 GB of disk free
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
A turn lasts exactly as long as the command. When it exits, crashes or gets `kill -9`'d, its whole process tree is killed and the next agent goes. No timeouts to tune, no stale locks.
|
|
43
|
+
|
|
44
|
+
## Who goes next
|
|
45
|
+
|
|
46
|
+
Mostly first come, first served, bent by four things. Short jobs move up: a command that usually takes 30 seconds goes ahead of a 20-minute suite that arrived a few minutes earlier, and one that takes under 15 seconds slips in beside running work. Priority shifts your place (`-p high` is worth an hour, `-p low` costs ten minutes). An agent that has had the same resource for most of the last hour drops back a little. A deadline (`--by 23:30`) pulls you forward as it gets close. Every shift is capped, so nobody waits forever.
|
|
47
|
+
|
|
48
|
+
Then the machine gets a say. dibs measures what each command really uses and books that, keeps running jobs inside a memory and CPU budget, and holds new work while the Mac is swapping or short on disk. One job always gets to run. The whole set of rules, with the numbers, is in [docs/scheduling.md](docs/scheduling.md).
|
|
49
|
+
|
|
50
|
+
**Make agents use it.** Agents forget to wrap commands, so add the guard hook. From Terminal:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
dibs guard install
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Or as a plugin, in a Claude Code session (Codex reads the same plugin; [docs/guard.md](docs/guard.md) has its commands):
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
/plugin marketplace add dibssoftware/dibs
|
|
60
|
+
/plugin install dibs@dibs
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The guard rewrites a bare `xcodebuild` or `npm test` into `dibs run ...` only in bypass-permissions sessions, where the agent already runs everything without asking. In every other session it blocks the command and tells the agent the exact `dibs run` line to use, so the retry goes through your normal permission prompt. It never approves anything for you, and if it can't parse a command or hits an error, it lets the command through. The same hook turns away edits to files another agent has leased, starts each new session and subagent with a few lines on how to use dibs, and hands each agent your messages and dibs's notices about its own jobs (one looks stuck, used far more memory than it asked for, or was paused) on its next tool call. If you set `agents.slots` in `~/.dibs/config.json`, it also caps how many subagents run at once across every session; there's no cap until you do. Details: [docs/guard.md](docs/guard.md).
|
|
64
|
+
|
|
65
|
+
If you run one agent at a time, you don't need this.
|
|
66
|
+
|
|
67
|
+
**Upgrade** by running the install line again. It swaps `~/.dibs-cli` in one step, and your queue and settings in `~/.dibs` stay. Then `dibs guard install` again, from Terminal, so the hook has every event the new version listens to. A plugin install updates with `claude plugin update dibs@dibs` in Terminal, or in Claude Code from `/plugin`, Installed, dibs, Update now. Run `/reload-plugins` to load it in a session that's already open.
|
|
68
|
+
|
|
69
|
+
**Uninstall**, from Terminal:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
dibs guard remove # or claude plugin uninstall dibs@dibs for a plugin install
|
|
73
|
+
dibs service remove serve worker throttle # only if you installed services
|
|
74
|
+
rm -rf ~/.dibs-cli ~/.local/bin/dibs ~/.dibs # ~/.dibs is the queue, history and settings
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Tell your agents
|
|
78
|
+
|
|
79
|
+
Paste this into your `CLAUDE.md` or `AGENTS.md` (the Claude Code plugin ships the same thing as a skill):
|
|
80
|
+
|
|
81
|
+
```markdown
|
|
82
|
+
## dibs (shared machine resources)
|
|
83
|
+
Other agents share this machine. Wrap anything that collides in dibs; plain reads, edits and small commands need nothing.
|
|
84
|
+
- `dibs run <resource> -m "why" -- <cmd>`: `test` (`npm test`, vitest, `node --test`), `xcode-build`, `sim` (the shared simulator), `sim-own` (a private one, udid in `$SIM`: `sh -c '... "$SIM"'`), `playwright --port WEB` (use `$WEB`), `deploy`, `heavy`. Need two? `dibs run sim,xcode-build -- <cmd>`, never one while holding the other.
|
|
85
|
+
- Across several tool calls: `dibs hold sim --for 20m -m "why"`, keep wrapping each command in `dibs run sim -- ...` (it starts at once under your hold), and `dibs release sim` when done.
|
|
86
|
+
- In Claude Code a `dibs run` waits as long as it takes. A tool call that moved to the background is still waiting: don't run it again (dibs refuses the copy, exit 2).
|
|
87
|
+
- Before editing files other agents may touch: `dibs hold 'files:src/auth/**' -m "why"` (from the git root; quote the glob). If your edit is refused, wait or message the holder; don't write the file another way.
|
|
88
|
+
- Post progress as often as you commit: `dibs progress "what you just did or found, with numbers" --task <name> --eta 30m`, then `--blocked` or `--done`. The person reads it live. An overdue task gets you a notice: post a new `--eta` or `--done`.
|
|
89
|
+
- Decide two-way doors yourself. Ask the person only what can't be undone: `dibs question "Delete the old bucket?" --options yes,no --recommend yes -m "nothing reads it" --one-way "the 4,210 files are gone for good"`, keep working, then the same command with `--wait` prints only the answer. Exit 75 there means no answer: don't do the step.
|
|
90
|
+
- `dibs say "done: tests pass"` leaves the person an FYI. A line starting `Message from the person:` is really theirs: act on it, and reply with `dibs say`.
|
|
91
|
+
- A wait on memory, swap or disk protects the machine: keep waiting, never lower `--mem` or raise `-p` to get past it. A line from dibs about one of your jobs (stuck, over its memory, paused, a task overdue) is about your own work: act on it.
|
|
92
|
+
- You may boost, pause, resume or stop any job (`--owner <its session>` when it isn't yours); dibs records who did it. Raise to high or urgent with `-m` only when a person is waiting now or something is broken. A job "stopped by" someone was ended on purpose: find out why before running it again.
|
|
93
|
+
- Other machines: `dibs run test --anywhere -- <cmd>` or `--on <machine>`. Later: `dibs later test --at 02:00 -m "why" -- <cmd>`.
|
|
94
|
+
- Exit codes: 75 gave up waiting, never ran (rerun the same command within 2 minutes), 74 not enough disk, 76 lost before it started (send again), 77 lost after it started (it may have run: check first), 70 dibs crashed.
|
|
95
|
+
- `dibs` shows the board, `dibs help all` every command. Something wrong with dibs: `dibs ask "..."`.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Commands
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
dibs run sim,xcode-build -- ./build-and-install.sh # everything you need, at once
|
|
102
|
+
dibs run playwright --port WEB --port API -- npx playwright test # free ports in $WEB and $API
|
|
103
|
+
dibs run test -p high -m "release blocker" --by 23:30 -- npm test
|
|
104
|
+
dibs run test --after #42 -- npm run e2e # joins the line once your job #42 has ended
|
|
105
|
+
dibs hold sim --for 20m -m "screenshot pass" # across several tool calls; again to extend
|
|
106
|
+
dibs release sim
|
|
107
|
+
dibs hold 'files:src/auth/**' -m "auth refactor" # other agents' edits there are turned away
|
|
108
|
+
dibs run quota:asc --cost 3 -- ./upload.sh # share an API's rate limit between scripts
|
|
109
|
+
dibs when sim # when you'd get it, without joining the line
|
|
110
|
+
dibs who sim # who holds it, until when, who's next
|
|
111
|
+
dibs why # where you are, when you start, what you're waiting for (--detail: the math)
|
|
112
|
+
dibs mine sim # exit 0 if you hold it, 1 if not
|
|
113
|
+
dibs yield web-app # let another agent go first
|
|
114
|
+
dibs pace quiet # how hard dibs drives this machine: quiet, normal or max
|
|
115
|
+
dibs sims # the private simulator pool
|
|
116
|
+
dibs setup scratch # the admin commands for a capped scratch volume for build output (macOS)
|
|
117
|
+
dibs changes # what changed in recent versions
|
|
118
|
+
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
|
|
119
|
+
dibs questions # what agents are asking you, with what they recommend; dibs answer <id> <option, or your own words>
|
|
120
|
+
dibs hours 09:00-23:00 # outside your hours, questions below urgent wait for the morning
|
|
121
|
+
dibs threads # one thread per agent: its notes and questions, your messages; dibs threads read <agent>
|
|
122
|
+
dibs tell web-app "use the staging database" # reaches the agent on its next tool call, or as it finishes its turn
|
|
123
|
+
dibs tell desk "why is my build waiting?" # the agent config.json names as "desk" answers you with dibs say --to person
|
|
124
|
+
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
|
|
125
|
+
dibs alerts dismiss <id> # close one for a day; it comes back if its cause is still there
|
|
126
|
+
dibs history # the last 7 days: busy time, waits and who waited, by resource, agent and hour
|
|
127
|
+
dibs stats # waits against run times, today and the last 7 days: the share of jobs that waited longer than they ran
|
|
128
|
+
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)
|
|
129
|
+
dibs later sim --at 02:00 -m "snapshot suite" -- ./snapshots.sh # run it tonight; returns at once with its id
|
|
130
|
+
dibs later test --after web-app:deploy -- npm run smoke # when that agent's deploy ends (--after-ok: only if it passed)
|
|
131
|
+
dibs later list # scheduled, waiting, running, and how the finished ones ended; dibs later cancel <id>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
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.
|
|
135
|
+
|
|
136
|
+
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.
|
|
137
|
+
|
|
138
|
+
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):
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{ "waits": "fat" }
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
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`.
|
|
145
|
+
|
|
146
|
+
## Watching your agents: the page and MCP
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
dibs service install web # or: dibs web (http://127.0.0.1:7421)
|
|
150
|
+
dibs pair # a one-time code, e.g. K7QM-4XNA: one use, 10 minutes
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Open http://127.0.0.1:7421 and type the code. The rail on the left switches between views:
|
|
154
|
+
|
|
155
|
+
- **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`).
|
|
156
|
+
- **Questions**: what agents asked you at one-way doors. Answer with an option or your own words, or say not now.
|
|
157
|
+
- **Messages**: one thread per agent. What you send reaches the agent with its next tool call.
|
|
158
|
+
- **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`.
|
|
159
|
+
- **Scheduled**: `dibs later` runs coming up and ended this week; cancel one.
|
|
160
|
+
- **History**: `dibs history` for the past day, week or 30 days, and every override with who made it.
|
|
161
|
+
- **Settings**: the speed (`dibs pace`), your hours, and the Claude Code hook.
|
|
162
|
+
|
|
163
|
+
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.
|
|
164
|
+
|
|
165
|
+
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.
|
|
166
|
+
|
|
167
|
+
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).
|
|
168
|
+
|
|
169
|
+
## Mac app
|
|
170
|
+
|
|
171
|
+
`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 download will be at https://dibs.cc/mac/; until then, build it yourself. To build it yourself you need Xcode 26 and xcodegen (`brew install xcodegen`): [app/README.md](app/README.md) has the steps.
|
|
172
|
+
|
|
173
|
+
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. `--by 23:30` moves you up as a deadline gets close.
|
|
174
|
+
|
|
175
|
+
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.
|
|
176
|
+
|
|
177
|
+
## Exit codes
|
|
178
|
+
|
|
179
|
+
Agents branch on these, so they don't change.
|
|
180
|
+
|
|
181
|
+
| code | meaning |
|
|
182
|
+
|---|---|
|
|
183
|
+
| the command's own | it ran |
|
|
184
|
+
| 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 |
|
|
185
|
+
| 74 | not enough free disk, and nothing running would free it. Other sessions' `/private/tmp/claude-*` folders are off limits for making room |
|
|
186
|
+
| 76 | lost the coordinator or the other machine before a remote job started. Nothing ran there: sending it again is safe |
|
|
187
|
+
| 77 | lost the other machine after a remote job started. It may have run, or may still be running: check before running it again |
|
|
188
|
+
| 127 | the command didn't start |
|
|
189
|
+
| 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) |
|
|
190
|
+
| 1 | nothing matched: `mine` with nothing held (the clean result after a release), `release` with nothing to give back |
|
|
191
|
+
| 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 |
|
|
192
|
+
|
|
193
|
+
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.
|
|
194
|
+
|
|
195
|
+
## Resources
|
|
196
|
+
|
|
197
|
+
| name | slots | memory | cores | free disk | pausable |
|
|
198
|
+
|---|---|---|---|---|---|
|
|
199
|
+
| sim | 1 | 3G | 1 | 8G | no |
|
|
200
|
+
| sim-own | 4 on 16 GB (RAM / 4G, at most 4), and only as many as free memory fits | 3G | 2 | 6G | no |
|
|
201
|
+
| xcode-build | 2 | 4G | 4 | 4G | no |
|
|
202
|
+
| playwright | 2 | 3G | 2 | 3G | yes |
|
|
203
|
+
| test | 3 | 2G | 3 | | yes |
|
|
204
|
+
| 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 |
|
|
205
|
+
| heavy | 1 | 4G | 4 | 10G | yes |
|
|
206
|
+
| any other name | 1 | 1G | 1 | | no |
|
|
207
|
+
| `files:<path or glob>` | one holder per path | 0 | 0 | | no |
|
|
208
|
+
| `quota:<name>` | a token bucket from config | 0 | 0 | | no |
|
|
209
|
+
|
|
210
|
+
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.
|
|
211
|
+
|
|
212
|
+
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).
|
|
213
|
+
|
|
214
|
+
## More
|
|
215
|
+
|
|
216
|
+
- [docs/scheduling.md](docs/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
|
|
217
|
+
- [docs/files.md](docs/files.md): file leases, and which edits the guard turns away
|
|
218
|
+
- [docs/questions.md](docs/questions.md): agents queuing questions for the person, `--wait`, working hours
|
|
219
|
+
- [app/README.md](app/README.md): the Mac app
|
|
220
|
+
- [docs/simulators.md](docs/simulators.md): `sim-own`, the pool of private simulators
|
|
221
|
+
- [docs/guard.md](docs/guard.md): the hook, what it matches, the subagent limit, installing it for Claude Code and Codex, your own rules
|
|
222
|
+
- [docs/machines.md](docs/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
|
|
223
|
+
- [AGENTS.md](AGENTS.md): working on dibs itself
|
|
224
|
+
|
|
225
|
+
Platforms: CI runs the full suite on macOS and Ubuntu on every push. Linux uses the same code paths (`ps`, process groups, `/proc/pressure/memory`). Windows support exists and is untested.
|
|
226
|
+
|
|
227
|
+
## License
|
|
228
|
+
|
|
229
|
+
dibs is free to use, change and share under the [GNU Affero General Public License v3](LICENSE) (AGPL-3.0-only), at home or at work. If you ship a changed dibs, or run one for other people over a network, the AGPL says you share your changes under the same license.
|
|
230
|
+
|
|
231
|
+
If your company can't use AGPL software, or you want to build dibs into something you don't open source, a commercial license is available from Creayo LLC: licensing@dibs.cc.
|
|
232
|
+
|
|
233
|
+
## Contributing
|
|
234
|
+
|
|
235
|
+
Bug reports, ideas and pull requests are welcome. Before your first pull request is merged you sign a contributor license agreement, so Creayo LLC can offer your change under both licenses: [CONTRIBUTING.md](CONTRIBUTING.md) says how. [AGENTS.md](AGENTS.md) is how the code is worked on.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// The Claude Code hook behind `dibs guard`. It loads only the guard and its
|
|
3
|
+
// file leases (plus the subagent limit, for subagent events, and src/talk.mjs
|
|
4
|
+
// when the person has a message waiting), so a tool call pays for a few small
|
|
5
|
+
// modules instead of all of dibs.
|
|
6
|
+
import { hook } from '../src/guard.mjs';
|
|
7
|
+
hook();
|