@dibssoftware/dibs 0.0.180 → 0.0.195

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.
Files changed (107) hide show
  1. package/CHANGELOG.md +111 -1
  2. package/README.md +10 -8
  3. package/bin/dibs.mjs +379 -74
  4. package/docs/agents.md +303 -0
  5. package/docs/council.md +88 -0
  6. package/docs/files.md +3 -3
  7. package/docs/guard.md +86 -11
  8. package/docs/json.md +211 -0
  9. package/docs/later.md +5 -5
  10. package/docs/machines.md +6 -6
  11. package/docs/questions.md +104 -3
  12. package/docs/reference.md +124 -30
  13. package/docs/relay.md +135 -11
  14. package/docs/releasing.md +7 -1
  15. package/docs/scheduling.md +28 -6
  16. package/docs/secrets.md +53 -0
  17. package/docs/simulators.md +3 -3
  18. package/docs/windows.md +3 -3
  19. package/package.json +1 -1
  20. package/skills/dibs/SKILL.md +79 -149
  21. package/src/about.mjs +341 -0
  22. package/src/acquire.mjs +113 -28
  23. package/src/after.mjs +127 -0
  24. package/src/agents.mjs +2 -1
  25. package/src/alerts.mjs +109 -48
  26. package/src/answers.mjs +2 -2
  27. package/src/board.mjs +21 -16
  28. package/src/broker.mjs +23 -7
  29. package/src/carry.mjs +287 -0
  30. package/src/codex.mjs +132 -0
  31. package/src/commands.mjs +254 -86
  32. package/src/config.mjs +85 -14
  33. package/src/connect.mjs +4 -2
  34. package/src/cool.mjs +28 -12
  35. package/src/council.mjs +482 -0
  36. package/src/cwd.mjs +9 -0
  37. package/src/decisions.mjs +250 -0
  38. package/src/declare.mjs +96 -0
  39. package/src/diskreport.mjs +306 -0
  40. package/src/diskuse.mjs +420 -0
  41. package/src/diskwarn.mjs +68 -13
  42. package/src/doctor.mjs +149 -0
  43. package/src/doors.mjs +547 -0
  44. package/src/durable.mjs +143 -0
  45. package/src/envs.mjs +372 -0
  46. package/src/events.mjs +7 -2
  47. package/src/files.mjs +121 -7
  48. package/src/guard.mjs +288 -105
  49. package/src/guardd.mjs +8 -1
  50. package/src/halt.mjs +63 -0
  51. package/src/handoffs.mjs +362 -0
  52. package/src/history.mjs +34 -4
  53. package/src/hogs.mjs +36 -8
  54. package/src/jobprogress.mjs +283 -0
  55. package/src/later.mjs +21 -10
  56. package/src/lock.mjs +51 -11
  57. package/src/measure.mjs +60 -14
  58. package/src/media.mjs +240 -0
  59. package/src/news.mjs +31 -0
  60. package/src/notes.mjs +49 -8
  61. package/src/notices.mjs +126 -43
  62. package/src/ondemand.mjs +25 -2
  63. package/src/outcome.mjs +163 -0
  64. package/src/overlap.mjs +2 -2
  65. package/src/override.mjs +149 -79
  66. package/src/owner.mjs +15 -2
  67. package/src/people.mjs +236 -0
  68. package/src/pickup.mjs +72 -0
  69. package/src/picture.mjs +321 -0
  70. package/src/plain.mjs +84 -18
  71. package/src/platform.mjs +29 -7
  72. package/src/preempt.mjs +123 -15
  73. package/src/primer.mjs +91 -20
  74. package/src/prints.mjs +99 -0
  75. package/src/proc.mjs +11 -1
  76. package/src/progress.mjs +49 -3
  77. package/src/proof.mjs +102 -0
  78. package/src/push.mjs +271 -0
  79. package/src/questions.mjs +328 -57
  80. package/src/quota.mjs +1 -1
  81. package/src/recap.mjs +205 -0
  82. package/src/relay.mjs +262 -26
  83. package/src/remote.mjs +23 -10
  84. package/src/reviewgate.mjs +268 -0
  85. package/src/reviews.mjs +377 -0
  86. package/src/route.mjs +263 -0
  87. package/src/rules.mjs +216 -0
  88. package/src/schedule.mjs +238 -44
  89. package/src/schema.mjs +62 -0
  90. package/src/scratch.mjs +2 -2
  91. package/src/serve.mjs +3 -2
  92. package/src/service.mjs +5 -1
  93. package/src/signed.mjs +97 -0
  94. package/src/simpool.mjs +46 -1
  95. package/src/spend.mjs +375 -0
  96. package/src/state.mjs +43 -17
  97. package/src/talk.mjs +1082 -134
  98. package/src/thin.sh +2 -0
  99. package/src/trail.mjs +290 -0
  100. package/src/trailnote.mjs +209 -0
  101. package/src/util.mjs +7 -0
  102. package/src/vault.mjs +435 -0
  103. package/src/vendors.mjs +327 -0
  104. package/src/version.mjs +1 -1
  105. package/src/web.mjs +354 -60
  106. package/src/work.mjs +487 -0
  107. package/src/worker.mjs +7 -1
@@ -8,8 +8,8 @@ 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
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
- 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. Each measured run records how far in it reached its peak, and a running job that has gone well past where its command's last 5 runs peaked (a quarter longer, plus 2 minutes, not counting time paused) is done growing: it counts at what it books, not its ask, so a waiter beside it needs only that much of the budget. A command that peaks late, or whose runs don't say when they peak, keeps its ask until then. 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
- 4. **The machine can take it.** Free disk covers the job's need and stays above `minDisk` (5G): below that nothing starts, `urgent` work included (runs inside your own hold go on what the hold got). Low disk is a wait, never a refusal at the start: the job keeps its place, free disk is read again at every poll, and it starts the moment there's room. Only a job that writes next to nothing starts below the floor, keeping 1 GB free: one whose last ten runs (at least two, none run while the watcher cleared caches) ate under 100 MB at the middle, and whose last run did too, on any resource; before that, only one whose `--disk` says so (under 100 MB, or 1 GB or less on resources that declare no disk need: tests, deploys, locks). A job the person waits on (`high`, `urgent`, or `--by` with `-m`) may go down to 3 GB free, the same hard floor the watcher pauses jobs at, and doesn't wait for the room kept for swap. Under 1 GB free the watcher pauses the dibs job writing the most, whatever its priority or resource, one each pass, says so to its session and the person, and resumes it at 2 GB. 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.
11
+ 3. **It fits the budgets.** What jobs book never adds up past the memory budget (70% of the machine's memory by default, 11 GB on 16 GB), 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 a margin instead of its ask, never more than its ask. The margin is a fifth of what it measures, at least 0.25 GB and at most 1 GB. Once its memory has stopped climbing for 2 minutes, it books what it uses now plus that margin, 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. Each measured run records how far in it reached its peak, and a running job that has gone well past where its command's last 5 runs peaked (a quarter longer, plus 2 minutes, not counting time paused) is done growing: it counts at what it books, not its ask, so a waiter beside it needs only that much of the budget. A command that peaks late, or whose runs don't say when they peak, keeps its ask until then. Once a command has run in a repo, its next runs there are planned at what they peaked at (the middle of the last 5) plus the margin, more or less than `--mem` says: `--mem` is the first guess for a command dibs has never seen. 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
+ 4. **The machine can take it.** Free disk covers the job's need and stays above `minDisk` (5G): below that nothing starts, `urgent` work included (runs inside your own hold go on what the hold got). Low disk is a wait, never a refusal at the start: the job keeps its place, free disk is read again at every poll, and it starts the moment there's room. Only a job that writes next to nothing starts below the floor, keeping 1 GB free: one whose last ten runs (at least two, none run while the watcher cleared caches) ate under 100 MB at the middle, and whose last run did too, on any resource; and one whose `--disk` says so (under 100 MB, or 1 GB or less on resources that declare no disk need: tests, deploys, locks), whatever its runs read, unless its last run or the middle of its runs ate 1 GB or more. What a run ate is its share of everything written while it ran, other agents' writes included, so readings of a few hundred megabytes don't overrule a `--disk`. Such a job also starts while free disk is falling fast, since it can't make it fall faster. A command that only gives something back (`xcrun simctl shutdown`, `delete`, `erase`, `runtime delete`, alone and not chained to anything) takes its turn on its resource like any other but never waits on disk, memory, swap or load: those are what it frees. A job the person waits on (`high`, `urgent`, or `--by` with `-m`) may go down to 3 GB free, the same hard floor the watcher pauses jobs at, and doesn't wait for the room kept for swap. Under 1 GB free the watcher pauses the dibs job writing the most, whatever its priority or resource, one each pass, says so to its session and the person, and resumes it at 2 GB. 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. Warning-level pressure has a second way past: a job of 3 GB or less that has waited 10 minutes, or that a person waits on (`high`, `urgent`, `--by` with `-m`), starts when the machine really has it free (free plus what the OS reclaims on demand) with 1 GB to spare, one at a time until its memory holds steady for 2 minutes. Every message that names the disk floor names both numbers: `minDisk`, and `minDisk` plus `swapRoom` while the machine swaps. 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).
14
14
  6. **The last user's `onRelease` has finished** putting the resource back.
15
15
  7. **A quota has the tokens**, for `quota:<name>` (below).
@@ -58,7 +58,7 @@ The board flags a running job past what it was handed by more than 10%: `[over:
58
58
  ```
59
59
 
60
60
  ```bash
61
- dibs run quota:asc --cost 3 -- ./upload-screenshots.sh # takes 3 tokens when it starts
61
+ dibs run quota:asc --cost 3 -m "upload the new App Store screenshots" -- ./upload-screenshots.sh # takes 3 tokens when it starts
62
62
  ```
63
63
 
64
64
  A bucket holds at most `limit` tokens and refills `limit` every `per`, smoothly. A job waits until its bucket has `--cost` tokens (default 1), after anyone ahead of it for the same bucket, so a big request isn't passed forever by small ones. Tokens come back with time, not when a job ends. A quota costs no slots, memory or cores; combine it with a resource (`dibs run quota:asc,deploy -- ...`) when the work needs one. The board lists every bucket and what's left in it.
@@ -72,7 +72,7 @@ A project whose suite always needs the same resource, ports and sizes can name t
72
72
  ```
73
73
 
74
74
  ```bash
75
- dibs run playwright:web -m "e2e" -- npm run e2e # playwright, $WEB and $API set, planned at 3G and 2 cores
75
+ dibs run playwright:web -m "end-to-end tests for checkout" -- npm run e2e # playwright, $WEB and $API set, planned at 3G and 2 cores
76
76
  ```
77
77
 
78
78
  A profile sets `res` (one name, a comma list or an array), `ports`, `mem`, `cpu`, `disk` and `est`. Flags on the command line win over it. `dibs when` and `dibs hold` take profiles too. A profile's name can't be a resource's or start with `files:` or `quota:`, and a bad one fails every call with its key named.
@@ -87,11 +87,16 @@ Anyone may `dibs boost`, `pause`, `resume`, `stop` and `cap` any job: the person
87
87
 
88
88
  ## Pausing low-priority work
89
89
 
90
+ - **Jobs that say `--pausable` (the yield protocol).** A run started with `--pausable` is safe to pause, or to stop at its next checkpoint, at any priority and on any resource. A waiter that's `urgent` or `high` may make one of lower priority yield; a waiter that has waited 20 minutes may make one of its own priority or lower yield. For a full slot, the job is paused as below and resumes when the waiter's lease ends. For memory (the budget, pressure, swap, really free memory) or a slot pausing alone won't free, pausing frees nothing, so dibs picks the fewest such jobs that make the room (lowest priority first, then the most memory), sends each one's process groups SIGUSR1 (`$DIBS_CHECKPOINT_SIGNAL` in its environment, with `$DIBS_PAUSABLE=1`), and continues it if it was paused so it can act on it. The job saves its progress and exits 0; its `dibs run` puts it back in line right behind that waiter and runs the same command again, which should read its checkpoint. It doesn't start again until the waiter has, for at most 10 minutes. One that hasn't exited 2 minutes after the signal is ended (SIGKILL) and put back in line anyway. At most two jobs step aside for one waiter, one round at a time. A job without `--pausable` is never stopped this way. Each yield is a `yield` event naming who stepped aside, for whom, why (`slot`, `memory`, `pressure`, ...), how (`pause` or `checkpoint`) and after how long; `dibs history` lists them under Yields, `dibs why` shows the ones involving your jobs over the last day, and the board shows "stepping aside for ..." while one is under way.
91
+
90
92
  - **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
93
  - **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
94
  - **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 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
- - **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
+ - **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`. That part is quiet. Only when it's urgent, under one and a half times the floor or falling fast enough to reach the floor within the hour, does 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 when it turns urgent 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. Only the note under the floor wakes an agent sitting in `dibs listen`; the one above it comes with its next tool call. A job paused for the disk tells its agent through the hook right away.
96
+ - **Each session's share.** While free disk is under four times `minDisk` (20 GB), the watcher measures every 5 minutes what each agent session fills: its folder in Claude Code's temp folder and the folders it marked with `dibs disk add`. A running session's share is an even split of what's free above `minDisk` plus what the running sessions already fill, never under 1 GB (`"diskShare": "10G"` in config.json fixes it instead). A session that goes over its share hears once, through the hook, what it fills, its share and what to delete; again only after it was back under. One whose use grew 1 GB or more since the last reading hears that too, at most every 30 minutes. `dibs disk` shows the person who fills what (measured again when the last reading is over 10 minutes old), and the disk alert names the biggest.
97
+ - **The biggest users on the machine.** `dibs disk` first lists the biggest folders on the machine, whoever made them: on macOS the simulators, the test run and preview simulators, DerivedData, iOS DeviceSupport, Xcode archives, CoreDevice, app and tool caches, npm's cache, the Trash, dibs's own job copies, Claude Code's temp folder and swap, plus every git worktree of the repositories in your home folder (outside Claude Code's temp folder). Each says what it is, who made it when dibs knows (a folder marked with `dibs disk add`, or the agent whose commits the trail saw there), when it was last used, whether it's safe to delete and the command a person would use. A worktree whose branch is all in main, with nothing uncommitted and no git activity for 3 days, is listed as likely removable; one an agent session or a dibs job is working in never is. dibs deletes none of these. Each folder is measured with `du -x`, so a mount inside it (CoreDevice's DeviceFS is the connected phones' own storage) isn't counted, each du gets 30 seconds and the whole report a minute, and the report is kept for 10 minutes (`--fresh` measures again). Under twice `minDisk` the watcher keeps it current, and the low disk notices and the disk alert name its three biggest.
98
+ - **Folders a session marked disposable.** `dibs disk add <dir>` names a folder the caller's session made (a worktree, build output) that dibs may delete once that session ends. 30 minutes after the end, in case the session is resumed, the watcher (or the next `dibs disk`) deletes it, logs it in `~/.dibs/cool.log` and the event log, and has git forget a worktree (`git worktree prune`; its branch stays). It deletes only a folder that every session that marked it has ended, that no dibs job runs or waits in, that is still the same folder (a folder deleted and made again under the name stays), and that still passes the checks `dibs disk add` makes: inside the home folder, a temp folder or the scratch volume; never Claude Code's temp folders, `~/.dibs`, a home folder's own (Documents, Library, dot folders), anything in `~/Library` but a DerivedData folder, a repository's own checkout (a worktree is fine) or another volume. `dibs disk keep <dir>` takes it off the list; `dibs disk list` shows what's marked and what was deleted.
99
+ - **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`. When swap grew, it also names the three things holding the most memory, since closing those, not deleting files, is what stops it. 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
100
  - **Never all of them.** None of these pauses the last running job, or one about to finish (see What it guarantees).
96
101
  - **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.
97
102
  - **What stays the same.** A paused run keeps its lease and its place. Its clock stops, so time-left estimates and run-time history skip the pause. Its owner sees `paused your job for ...` and `resumed your job after ...` on stderr, and the board says why (`paused so web-app's urgent deploy could go first`; `dibs --detail`: `[paused for <who>]`, `[paused: memory pressure]` or `[paused: disk low]`). High and urgent work is never paused, and neither are holds; normal work only for the disk.
@@ -158,6 +163,23 @@ A resource can name a command that runs after each lease on it ends, so the next
158
163
  - Use `;` between steps rather than `&&`, so one failing step (no simulator booted) doesn't skip the rest.
159
164
  - `booted` means the one booted simulator. While `sim-own` devices are booted too, put the shared simulator's udid in its place (`xcrun simctl list devices booted`).
160
165
 
166
+ ## Environments and accounts
167
+
168
+ Staging, production, a test database, a logged-in browser profile, the App Store Connect key: things that exist once per project. `env:<name>` and `account:<name>` are leases on them with a memory. Without one, two agents both deploy to staging and neither knows what the other put there.
169
+
170
+ - **One holder per project.** `dibs run env:staging -- ./deploy.sh` waits while another agent of the same project has it, by the project's origin URL (as deploys go), and given back when the command ends. Another project's `env:staging` is a different one. Holding one costs no memory or cores; the command run under it is measured like any other. It's never paused or run on top of, and never goes to another machine (`--anywhere`, `--on` and on-demand VMs), since its lease and history live here.
171
+ - **What's on it.** Every lease end is written down in `~/.dibs/envs.json`, however it ended: who, when, the command and its exit code, the commit it started from (`main@1a2b3c4`), and the holder's own words if it left any (`dibs env staging left "migrated to schema 42"`, during the turn or within 30 minutes after it). A run whose dibs was killed reads as lost: it may have stopped half way. A hold whose runs were each written down adds nothing more, unless its holder left a note.
172
+ - **The next holder hears it first.** Before its command starts: `env:staging has "deployed web@1a2b3c" by web-agent, 2h ago (ran ./deploy.sh staging, exit 0, from main@1a2b3c4)`. `dibs env staging` shows who has it now and its last 10 turns; `dibs env` lists the project's; `--all` every project's. The page's Environments view and `/api/envs` (which a look-only paired phone may read) show the same, without an origin URL's credentials.
173
+ - **Naming them.** A project names its own in `.dibs.json` at its root; config.json's `envs` names ones every project has, and the project's file wins. Once any are named, only those can be leased: another name is refused with exit 2, naming the closest one (`env:staging`), since `env:stagin` would be a lease of its own beside the real one. Where none are named, any `env:<name>` or `account:<name>` works:
174
+
175
+ ```json
176
+ { "envs": { "staging": { "about": "https://staging.example.com" },
177
+ "prod": { "oneWay": "deploys reach paying users" },
178
+ "account:asc": { "about": "the App Store Connect key" } } }
179
+ ```
180
+
181
+ - **One-way environments.** `oneWay` (a sentence on what can't be undone, or `true`) makes every lease ask the person first, through `dibs question --one-way`, before it joins the line. The lease needs `-m "why"`, which is what they decide on. Yes: it joins the line. No: exit 78 (refused), and nothing ran. An answer from another agent doesn't count: exit 75, and running it again asks the person. A run under your own hold on it doesn't ask again. Standing rules (`dibs rules`) will answer these where one covers the kind `env-prod`.
182
+
161
183
  ## Throttling
162
184
 
163
185
  `dibs throttle --watch` runs a watcher. When the 1-minute load is over `coolLoad` (8, or what `dibs pace` sets), build and test processes that keep a core hot outside any lease are moved to background priority (the efficiency cores on Apple silicon, nice 10 on Linux). Nothing is killed. The same watcher pauses idle and low runs under heavy memory pressure, and runs below high when swap fills the disk (see above). Moves are logged to `~/.dibs/cool.log`. `dibs throttle` does one pass.
@@ -0,0 +1,53 @@
1
+ # Secrets
2
+
3
+ Agents need credentials: an App Store Connect key, an API token, a database password. Pasted into a chat, a credential ends up in the agent's transcript, the shell's history and whatever file the agent writes next. `dibs secret` lets an agent use one without ever seeing it.
4
+
5
+ ```bash
6
+ dibs secret set ASC_KEY # you: type it (nothing is shown), pipe it in, or --file path
7
+ dibs secret run ASC_KEY -- ./upload.sh # an agent: $ASC_KEY is set for this one command
8
+ dibs secret run ASC_KEY --file -- ./upload.sh # $ASC_KEY is a file holding it, deleted when the command ends
9
+ dibs secret list # names, rules and last use, never values
10
+ dibs secret log ASC_KEY # every use: who, when, which command
11
+ dibs secret rules ASC_KEY --projects poker --ask each
12
+ dibs secret revoke ASC_KEY # deletes the value
13
+ ```
14
+
15
+ `dibs secret run` combines with everything else: `dibs secret run ASC_KEY -- dibs run deploy -- ./ship.sh` takes its turn at deploy with the key set.
16
+
17
+ ## What happens on a use
18
+
19
+ 1. dibs checks the secret's rules: which projects (the repo's origin, or its folder name) and which agents may use it.
20
+ 2. If an agent is asking and the rule says so, dibs asks you: once per session (the default), every time (`--ask each`), or never (`--ask never`). The question is `--needs-you`, so it reaches your phone, where you answer with Face ID. Only your answer counts: if another agent answers for you, the use is refused.
21
+ 3. The command runs with `$NAME` set. Its output comes back with the value replaced by `[secret NAME]`.
22
+ 4. The use goes in the log, refused or not, with who, when and the command. Never the value.
23
+
24
+ A refused use exits 78 and runs nothing. No answer within 30 minutes exits 75, like any wait: run it again to ask again.
25
+
26
+ ## The one thing only you can do
27
+
28
+ Agents may do anything you can in dibs, on the record. Secrets are the exception: **approving a use, loosening a secret's rules and replacing a stored value are yours alone.** An agent that could hand itself a credential would make the rules pointless. Agents may store a new secret (better than leaving it in a chat), tighten the rules, and revoke; one that tries to replace a stored value gets exit 78 and nothing is stored.
29
+
30
+ ## What the guard does
31
+
32
+ With at least one secret stored, the guard looks at every Bash command and file edit before it happens. One that holds a stored value is turned away with the `dibs secret run` line to use instead, so the value doesn't land in the transcript, the shell's history or a file. It also blanks values out of dibs's own event log.
33
+
34
+ It can only spot a value written out as is: a value that's base64-encoded, split up or URL-escaped gets past it. Values shorter than 8 characters aren't looked for at all, since they'd match ordinary text.
35
+
36
+ ## Other machines
37
+
38
+ A secret never leaves this machine. A job sent elsewhere with `dibs run --anywhere` or `--on` from inside `dibs secret run` runs here instead (`--on` another machine is refused), and a job whose command holds a value is refused before anything is sent.
39
+
40
+ ## Where the values live
41
+
42
+ - **macOS:** the login Keychain, through Apple's `security` tool. The value goes in on its standard input, never on a command line another process could read.
43
+ - **Linux and Windows:** `~/.dibs/vault.enc`, encrypted with AES-256-GCM. Its key is in `~/.config/dibs/vault.key` (mode 600), apart from `~/.dibs`, so a copy of `~/.dibs` alone opens nothing.
44
+
45
+ Beside them dibs keeps `~/.dibs/vault.json` (names, rules and the use log) and `~/.dibs/prints.json` (fingerprints, below). Neither holds a value.
46
+
47
+ ## Threat model
48
+
49
+ **It protects against:** a credential ending up in an agent's transcript, a chat, the shell's history, a file in a repo, dibs's own logs or another machine; an agent using a credential outside the projects or agents you allowed; an agent using one without your say, when the rule asks you; and a use nobody can account for afterwards.
50
+
51
+ **It doesn't protect against:** a hostile program running as your user. Such a program can read the Keychain item the same way dibs does (the item trusts Apple's `security` tool), read the key file on Linux, or set the environment variables dibs uses to tell an agent from you. The command you run with a secret also gets the real value, and can do anything with it, including print it in a form the blanking doesn't recognise.
52
+
53
+ **Fingerprints:** to spot values without loading them, `prints.json` keeps each value's length, a keyed rolling hash and a salted SHA-256 cut to 64 bits. The file is readable by you alone, but anyone who can read it can test guesses offline, so a short, guessable value is weakly protected. Real credentials (random keys and tokens) are not at risk from this.
@@ -3,9 +3,9 @@
3
3
  `sim` is the one shared booted simulator, the one other sessions screenshot. `sim-own` gives your command a simulator nobody else touches:
4
4
 
5
5
  ```bash
6
- dibs run sim-own -- sh -c 'xcrun simctl install "$SIM" App.app && xcrun simctl launch "$SIM" com.example.app'
7
- dibs run sim-own,xcode-build -- sh -c 'xcodebuild test -scheme App -destination "id=$SIM"' # single quotes: $SIM is set inside the run, not in your shell
8
- dibs hold sim-own --for 20m # keep one booted across tool calls; it prints the udid
6
+ dibs run sim-own -m "install and open today's build" -- sh -c 'xcrun simctl install "$SIM" App.app && xcrun simctl launch "$SIM" com.example.app'
7
+ dibs run sim-own,xcode-build -m "UI tests for the checkout flow" -- sh -c 'xcodebuild test -scheme App -destination "id=$SIM"' # single quotes: $SIM is set inside the run, not in your shell
8
+ dibs hold sim-own --for 20m -m "try the onboarding flow by hand" # keep one booted across tool calls; it prints the udid
9
9
  dibs sims # the pool: devices, who has them, disk they use
10
10
  dibs sims prune # delete the idle ones
11
11
  ```
package/docs/windows.md CHANGED
@@ -7,8 +7,8 @@ Install from PowerShell with `install.ps1`, or use WSL, where dibs is the Linux
7
7
  ## What's missing
8
8
 
9
9
  - **No pausing.** Windows has no SIGSTOP. dibs never pauses a job there: urgent work waits its turn instead, memory and disk pressure hold new work back but don't freeze running jobs, and `dibs pause` says so and suggests `dibs stop`.
10
- - **No measuring.** dibs doesn't read what jobs use on Windows yet, so there's no "this job used more than it asked for", and sizes aren't learned from past runs. `--mem` and `--cpu` count as given.
10
+ - **Memory is the working set.** dibs measures a job's process tree by its working set and CPU, a few seconds apart, the same way it learns sizes elsewhere.
11
11
  - **No process groups.** dibs ends a job's whole process tree, but a process whose parent already exited can escape it, unless dibs saw it on one of its checks every 3 seconds.
12
12
  - **No signals.** Windows can't deliver SIGTERM or SIGINT to a job: stopping one ends it outright, with no chance to clean up.
13
- - **Slower, and heavy contention.** Each look at the process table is a PowerShell call. Many dibs at once (a dozen on a 4-core machine) can keep one off the state file's lock past its 45-second limit, and that one exits 75.
14
- - **Not tested on Windows:** on-demand VMs (boat) sent from a Windows machine, and Claude Code's temp folders in low-disk notices.
13
+ - **Slower.** Each look at the process table is a PowerShell call, so a dozen dibs at once on a 4-core machine take seconds each to get through the state file's lock.
14
+ - **Not tested on Windows:** on-demand VMs (boat) sent from a Windows machine.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dibssoftware/dibs",
3
- "version": "0.0.180",
3
+ "version": "0.0.195",
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": {
@@ -1,183 +1,113 @@
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, 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.
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 starting or closing shared work (dibs work), 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: it can't fit on this disk, or its wait limit ran out; low disk just means a wait.
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`.
9
+ dibs runs on this machine: agents take turns through it for the simulator, builds, tests, browsers and deploys.
10
+ - Wrap those: `dibs run <resource> -m "<what this does and why>" -- <command>` (resources: sim, sim-own, xcode-build, test, playwright, deploy, heavy). -m is required: plain words for the person, not the command.
11
+ - No dibs for reads, edits, small commands, or long jobs that mostly wait on the network (crawlers, pollers, HTTP checks). An output folder another agent uses: `dibs hold 'files:<dir>/**'` before writing or deleting there.
12
+ - Run `dibs listen --stream` with Monitor if you have it, else `dibs listen` with run_in_background; again when it ends.
13
+ - Waiting is normal, even backgrounded: don't rerun it. A memory, swap or disk wait protects the machine: keep waiting, never raise `-p`. `--mem` is a first guess; dibs learns real use. `--pausable`: it saves and exits 0 on SIGUSR1.
14
+ - Exit 75: it gave up waiting, nothing ran: rerun it. Exit 74: short of disk. Cap runs with `--time-limit 1h`, not `timeout` (counts the wait).
15
+ - Decide what you can undo yourself; ask agents first (`dibs tell --who-knows <topic> "..." --wait 5m`). Ask the person only before something you can't undo (`dibs question ... --one-way --about <kind>`) or before spending (`dibs spend check <amount> --on <what>`). "Message from the person" lines are signed on their phone: act on them.
16
+ - Say your product once: `dibs project <name>` (handoffs follow it). Post progress: `dibs progress "what you did" --task <name> --eta 30m`, then `--done`; a long job reports `dibs progress 40%` from inside, so waiters see a time left. Before merging into main: `dibs review request <branch>`.
17
+ - The rest (holds, file leases, handoffs, work items, machines, exit codes, overrides, secrets) is below, under "When you need it", and in `dibs help`.
18
18
  <!-- dibs:rules:end -->
19
19
 
20
- ## When you need it
20
+ ## What agents get wrong
21
+
22
+ ### Choosing the resource
21
23
 
22
- Everything below is reference. Read the part you need when it comes up.
24
+ | you're running | resource |
25
+ |---|---|
26
+ | an `xcodebuild` build or archive | `xcode-build` |
27
+ | UI tests, or anything you install and drive on a simulator | `sim-own,xcode-build` (your private simulator's udid is in `$SIM`) |
28
+ | a look at the one shared booted simulator | `sim` |
29
+ | jest, vitest, `node --test`, `swift test`, `npm test` | `test` |
30
+ | Playwright | `playwright`, with `--port WEB` and `$WEB` in place of a fixed port |
31
+ | a deploy, upload or release | `deploy` |
32
+ | anything else that keeps several cores or gigabytes busy (a big compile, a model run, a solver) | `heavy` |
23
33
 
24
- ### Running
34
+ Need two? Ask for both in one `dibs run a,b`, never hold one while waiting for another. `$SIM` and port variables are set inside the run, so put them in a single-quoted `sh -c '...'`. A near miss (`tests`) exits 2 with the right name; a name of your own starts its own queue.
25
35
 
26
- ```bash
27
- dibs run xcode-build -m "why" -- xcodebuild -scheme App build
28
- dibs run sim-own -- sh -c 'xcrun simctl install "$SIM" App.app' # $SIM is the private simulator's udid
29
- dibs run sim-own,xcode-build -- sh -c 'xcodebuild test -scheme App -destination "id=$SIM"'
30
- dibs run playwright --port WEB -- npx playwright test # a free port in $WEB
31
- dibs run test --after #42 -- npm run e2e # joins the line once job #42 has ended
32
- dibs run test -- sh -c 'npm run build && npm test' # a shell line goes in sh -c
33
- ```
36
+ ### -m
34
37
 
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.
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.
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.
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
- - 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
- - 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.
38
+ Every `dibs run`, `dibs hold` and `dibs later` needs `-m`: what it does and why, in at least 3 plain words, never the command again. The person reads it on the board, their phone and their Lock Screen instead of your command: `-m "run the login tests after the redirect fix"`, not `-m "npm test"`. Without it dibs exits 2 and prints your command back with `-m "..."` to fill in.
48
39
 
49
- ### Listening for messages
40
+ ### --mem, and how dibs measures memory
50
41
 
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:
42
+ - dibs measures what every running job really uses: the physical footprint of its whole process tree, every 10 seconds. The next run of the same command in the same repo is planned at the peak its runs reached plus a margin, more or less than it asks for.
43
+ - So `--mem` (and `--cpu`) matter the first time dibs sees a heavy command: give its honest peak (`--mem 6G --cpu 4`). After that, leave them off.
44
+ - Asking low doesn't get you in sooner. dibs plans at the measured peak anyway, and under memory pressure the job furthest over its ask is paused first. Asking high makes you wait for room you won't use.
45
+ - A memory, swap or disk wait protects the machine. Keep waiting; never raise `-p` to get past it (a smaller `--mem` changes nothing once dibs has measured the job). The disk floor is 5 GB, 8 GB while the machine swaps. A job bigger than the whole machine exits 2 at once with the most it can ask for here.
52
46
 
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.
47
+ ### Time limits
58
48
 
59
- Exit 0 ends with "To keep listening, start dibs listen again with run_in_background." It has no time limit: it waits until something comes, and when your session ends it exits quietly on its own. `--for 30m` sets a limit; then exit 3 means nothing came in that time, and you start it again. `--json` gives `{ messages }`, `{ updated, changes }` or `{ release }`.
49
+ - To cap how long the command itself may run: `dibs run <res> --time-limit 1h -m "..." -- <cmd>`. The clock starts when the command does, never in line; past it dibs stops the job and exits 124. Never put `timeout` around dibs: its clock counts the wait, and a job that waits its whole limit dies before it starts.
50
+ - Inside Claude Code, `dibs run` waits as long as it takes. Don't wrap it in `timeout`, and don't kill it because the wait is long: a Bash call that reaches its timeout moves to the background and keeps its place.
51
+ - Run after another job: `dibs run test --after #42 -m "..." -- cmd` (`--after-ok` only if it succeeded; a number, an agent, or words from its `-m`). The wait for it counts against no limit; if that job failed or never ran, yours exits 75 and nothing ran.
52
+ - Outside Claude Code it gives up after 8 minutes in line with exit 75 (`--max-wait 30m`, or `--wait` for no limit).
53
+ - The turn lasts exactly as long as your command: nothing to renew, no keepalives or lock files of your own.
54
+ - Tell dibs how long a job takes when it can't know: `--quick` for under 15 seconds (it starts at once), `--est 20m` for a job it hasn't seen.
60
55
 
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.
56
+ ### Long jobs: run them in the background
62
57
 
63
- ### Holding across tool calls
58
+ - Anything over a couple of minutes: start the `dibs run ...` with run_in_background and carry on. You're told when it exits, and its last line on stderr is the result: `dibs: tests passed in 3m04s (waited 2m10s). #812`.
59
+ - A backgrounded run still waits its turn. Don't start it again: a second copy of a run you already have going exits 2. `dibs mine` says where it is, `dibs why` why it waits.
60
+ - A running job may be paused (frozen, not killed): a low or idle one for urgent work, the one furthest over its memory under memory pressure, the biggest writer when the disk runs out. It resumes by itself; leave it.
61
+ - `--pausable` on a long job that can save its progress: urgent work, or work that has waited 20 minutes, may pause it for a slot or, for memory, send it SIGUSR1 (`$DIBS_CHECKPOINT_SIGNAL`). On that signal save your progress and exit 0: dibs runs the same command again behind the job it made room for, so read your checkpoint at start. dibs never stops a job without `--pausable`. `dibs why` and `dibs history` say who stepped aside for whom.
64
62
 
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.
63
+ ### Checkpoints and progress from long jobs
66
64
 
67
- A script running under `dibs run deploy` that calls `dibs run xcode-build` waits only for xcode-build, ahead of waiters holding nothing.
65
+ - A long job can be paused, stopped by someone, or ended with your session. Write results as it goes (each finished piece to its own file, a point to resume from) so a rerun picks up where it stopped instead of starting over.
66
+ - Say how it's going yourself, with numbers: `dibs progress "12 of 40 suites pass, 3 fail in auth" --task suite-fix --eta 20m`, again when you learn something, then `--done` or `--blocked`. A task past its `--eta`, or 45 minutes without a post, gets you a reminder.
67
+ - From inside the job, say how far along it is, so the board and everyone waiting see "40% done, about 2 hr left" instead of "time left unknown": `dibs progress 40%` or `dibs progress 1200/9000 "flops solved"` (dibs run sets `DIBS_LEASE` there; from outside, `--job <id>`). Without it dibs reads progress lines (`[ 40%]`, `[12/300]`, tqdm bars) in output that goes to a file. A job far slower than its own earlier rate or its usual run time, or getting a fraction of its usual CPU, is an alert naming its agent; dibs never stops it.
68
68
 
69
- ### When dibs holds you back
69
+ ### Finding and stopping a job
70
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:** low disk is a wait, like memory: your run or hold stays in line and starts the moment there's room (a person or another job frees it). dibs gives up on it (exit 74) only when it can't fit on this disk even empty of other jobs, or, outside Claude Code, its wait limit runs out. A command whose last runs (two or more) ate under 100 MB starts below the 5 GB floor (only 1 GB has to be free). Before it has runs, only `--disk` says it's small: under 100 MB anywhere, or 1 GB or less on test, deploy or a lock (an honest `--disk 200M` on a suite that writes nothing); its runs overrule it if they eat more. Under 1 GB free, dibs pauses whichever job is writing the most, yours included, and resumes it at 2 GB: free your own build output, don't end it. 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.
71
+ - `dibs mine` lists your holds, waits and runs with their `#` ids (exit 1: you have none). `dibs --detail` shows every job's.
72
+ - `dibs stop <id>` ends a job and kills its processes. Ending the `dibs run` itself (stopping its background task) does the same: the lease ends and its whole process tree is killed.
73
+ - A job of yours "stopped by" someone was ended on purpose: find out why (`dibs history`, or ask them) before running it again.
74
+ - `dibs stop` with nothing after it lists your jobs and your subagents' with their numbers. `dibs stop <id> [<id> ...]` ends anyone's job (its agent is told who stopped it, and the history keeps it); `dibs stop <words>` ends your one job whose `-m` or command has those words; `dibs stop mine` ends all of yours. A number that already ended says how and when. No `--owner` is needed.
78
75
 
79
- ### Exit codes
76
+ ### Exit codes you will hit
80
77
 
81
78
  | code | meaning | what to do |
82
79
  |---|---|---|
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 | this run can't fit on this disk even when it's empty of other jobs, or (outside Claude Code) its wait limit ran out. Low disk otherwise just means you wait | 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 --for <time>` heard nothing in that time (without `--for` it waits as long as your session lives) | start it again with run_in_background |
93
-
94
- ### Files other agents may edit
95
-
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.
97
-
98
- ### Progress
99
-
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`.
101
-
102
- ```bash
103
- dibs progress "Starting billing-migration: script written, dry run next" --task billing-migration --eta 45m
104
- dibs progress "Dry run touched 4,210 rows, 0 errors. Asking before prod" --task billing-migration --eta 30m
105
- dibs progress "Blocked: waiting on the person for the prod run (question #3)" --task billing-migration --blocked
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)
108
- ```
109
-
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.
111
- - Keep `--task` the same short name across posts, and move `--eta` (`30m` or `17:30`) when the estimate moves.
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.
113
- - Posts are for the record. Questions go through `dibs question`; a note the person should see now goes through `dibs say`.
114
-
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.
122
-
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.
80
+ | 75 | gave up waiting: your command never started and didn't fail (outside Claude Code, or a question or `dibs tell --wait` with no answer) | run the same command again within 2 minutes to keep your place, or add `--wait`. On a question: nothing was decided, skip that step |
81
+ | 74 | it can't fit on this disk even empty of other jobs, or (outside Claude Code) its wait limit ran out. Low disk otherwise means you wait | free your own build output, or tell the person. Never delete in another session's `/private/tmp/claude-*` |
82
+ | 78 | refused, nothing ran: `dibs secret run` (a rule, or the person said no), `dibs spend check` over a cap without their yes, a one-way environment (`env:prod`) they said no to, `dibs answer` on a question only they may answer | don't retry it. Ask, or do something else |
126
83
 
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
- ```
84
+ Any other code is your command's own, or in the table under "When you need it".
134
85
 
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.
86
+ ### Shared output folders: file leases
136
87
 
137
- ### The person: questions, notes and messages
88
+ Two agents writing one folder (screenshots, generated code, a build's output) overwrite each other. Lease it first: `dibs hold 'files:out/screens/**' -m "regenerate the App Store screenshots"` (paths from the git root, `**` crosses folders; quote it, or zsh expands it and fails). While you hold it, the guard turns away other agents' edits and writes there. `dibs release 'files:out/screens/**'` when you're done. Refused yourself? Wait (`dibs when files:<path>`) or message the holder; never write it another way.
138
89
 
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.
140
-
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.
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.
143
- - **Exit 75 on a question** means no answer: the person dismissed it, or your wait's `--timeout` passed. Nothing was decided, so don't do the step, and say so in your report. A question you asked first without `--wait` stays open for the person after a wait gives up: run the same command with `--wait` later to collect it. (One asked only with `--wait` stays open 2 minutes after its wait gives up.)
144
- - dibs refuses (exit 2) a question that isn't a short sentence, has no `--recommend` or `-m`, recommends something outside its `--options`, or has a vague `--one-way` ("drops data"): say what's lost, with numbers.
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) ...`.
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.
147
-
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.
149
-
150
- ### Other machines
151
-
152
- ```bash
153
- dibs run test --anywhere -m "why" -- npm test # whichever machine would start it soonest, maybe this one
154
- dibs run test --on mini -m "why" -- npm test # that machine
155
- dibs machines # the group, its load and lines
156
- ```
157
-
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.
159
-
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.
161
-
162
- ### Run it later
163
-
164
- ```bash
165
- dibs later sim --at 02:00 -m "snapshot suite" -- ./snapshots.sh # prints its id (l3) and returns
166
- dibs later test --in 3h -- npm test
167
- dibs later test --after-ok web-app:deploy -m "smoke tests" -- npm run smoke # after that agent's deploy, only if it passed
168
- dibs later list # state, exit code; output in ~/.dibs/later/<id>.log
169
- ```
170
-
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.
172
-
173
- ### Connecting things to dibs
90
+ ## When you need it
174
91
 
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:
92
+ The full reference is `docs/agents.md` in the dibs folder; `dibs help <topic>` has each command's flags, and `dibs ask "..."` answers from the docs.
176
93
 
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).
94
+ - **Holding across tool calls:** `dibs hold <res> --for 20m -m "..."`, then wrap each command in `dibs run <res> -m "..."` as usual: under your hold it starts at once. `dibs release <res>` when done.
95
+ - **Listening:** when `dibs listen` exits, start it again with run_in_background before anything else, unless it says your other one is still running.
96
+ - **Why you wait:** `dibs why`. Someone ahead of you: message them; whoever is ahead runs `dibs yield <name>`. Raise `-p high -m "why"` only when a person is waiting on it now.
97
+ - **Disk you make:** `dibs disk add <dir>` on worktrees and build folders you create; dibs deletes them 30 minutes after your session ends. Told your session is over its share: delete what you don't need.
98
+ - **The person:** decide what you can undo. Before what you can't: `dibs question "..." --recommend X -m "why" --one-way "what can't be undone" --about <kind>`, keep working, and run it again with `--wait` when you need the answer. Notes: `dibs say "..."`. `dibs help question`.
99
+ - **Other agents:** `dibs tell <agent> "..." --wait 5m`, `dibs who knows <path>`, `dibs handoff`, `dibs review request <branch>`: `dibs help agents`. Shared work: `dibs help work`.
100
+ - **Environments** (`env:staging`, `account:asc`): `dibs help env`. **Money:** `dibs spend check` before you commit any: `dibs help money`. **Credentials:** `dibs secret run NAME -- <cmd>`, never pasted.
101
+ - **Other machines:** `--anywhere`, `--on <machine>`: `dibs help machines`. **Later:** `dibs later <res> --at 02:00 -m "..." -- <cmd>`: `dibs help later`.
102
+ - **Other people's jobs:** boost, pause, resume, stop and cap work on any job, on the record (`--owner <session>` when it isn't yours): `dibs help stop`. Prefer a message and `dibs yield`.
103
+ - **The guard** blocked a command: send the `dibs run` line it printed, with your own `-m`. **Connecting** a phone or browser, only when the person asks: `dibs connect`, `dibs pair`.
182
104
 
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.
105
+ | code | meaning | what to do |
106
+ |---|---|---|
107
+ | 76 | lost the coordinator or the other machine before the job started | nothing ran there: send it again |
108
+ | 77 | lost the other machine after the job started | it may have run: check before running it again, above all a deploy |
109
+ | 70 | dibs itself crashed | a bug in dibs, not your command: `dibs ask "..."` |
110
+ | 127 | the command didn't start | check the command and its path |
111
+ | 2 | bad usage: no `-m`, a near-miss name, a job bigger than the machine, a run you already have going | the message names the fix |
112
+ | 1 | nothing matched (`mine` with nothing held, a handoff someone took first) | usually the clean result |
113
+ | 3 | `dibs listen --for <time>` heard nothing in that time | start it again with run_in_background |