@dibssoftware/dibs 0.0.179 → 0.0.181

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 (53) hide show
  1. package/CHANGELOG.md +31 -2
  2. package/README.md +4 -2
  3. package/bin/dibs-guard.mjs +10 -1
  4. package/bin/dibs.mjs +37 -10
  5. package/docs/benchmarks.md +1 -1
  6. package/docs/files.md +1 -1
  7. package/docs/guard.md +6 -0
  8. package/docs/questions.md +6 -2
  9. package/docs/reference.md +4 -4
  10. package/docs/relay.md +24 -9
  11. package/docs/releasing.md +4 -3
  12. package/docs/scheduling.md +4 -4
  13. package/docs/windows.md +14 -0
  14. package/package.json +1 -1
  15. package/skills/dibs/SKILL.md +6 -6
  16. package/src/acquire.mjs +93 -27
  17. package/src/agents.mjs +7 -22
  18. package/src/alerts.mjs +75 -29
  19. package/src/board.mjs +1 -2
  20. package/src/broker.mjs +26 -11
  21. package/src/commands.mjs +37 -14
  22. package/src/config.mjs +21 -4
  23. package/src/cool.mjs +105 -10
  24. package/src/diskwarn.mjs +4 -0
  25. package/src/events.mjs +10 -1
  26. package/src/files.mjs +52 -88
  27. package/src/guard.mjs +76 -30
  28. package/src/guardd.mjs +97 -0
  29. package/src/guardw.mjs +19 -0
  30. package/src/later.mjs +20 -25
  31. package/src/lock.mjs +308 -0
  32. package/src/measure.mjs +27 -7
  33. package/src/ondemand.mjs +5 -2
  34. package/src/override.mjs +39 -2
  35. package/src/plain.mjs +2 -2
  36. package/src/platform.mjs +175 -42
  37. package/src/preempt.mjs +51 -3
  38. package/src/primer.mjs +1 -1
  39. package/src/proc.mjs +45 -5
  40. package/src/questions.mjs +8 -22
  41. package/src/relay.mjs +137 -32
  42. package/src/remote.mjs +12 -8
  43. package/src/schedule.mjs +139 -26
  44. package/src/serve.mjs +16 -3
  45. package/src/service.mjs +9 -4
  46. package/src/state.mjs +139 -47
  47. package/src/stats.mjs +3 -2
  48. package/src/talk.mjs +169 -83
  49. package/src/trust.mjs +7 -1
  50. package/src/util.mjs +28 -2
  51. package/src/version.mjs +1 -1
  52. package/src/web.mjs +17 -26
  53. package/src/worker.mjs +2 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,35 @@
2
2
 
3
3
  Each version's notes are shown once to every Claude session the first time it runs that version, so write them for agents: what to do differently, not how it works inside.
4
4
 
5
+ ## 0.0.181
6
+ - When you end a turn with no `dibs listen` running, the hook asks you to start one. Start it with run_in_background, and again each time it exits: its output now opens with that reminder. Subagents and teammates aren't asked.
7
+ - New for the person: `dibs pair --remote` prints a QR code and a 12-character code (like 7KQM-2XRP-9DHT), and app.dibs.cc has a box to type the code in. The browser and the Mac stay encrypted end to end. If another Mac already holds a code that starts the same way, dibs picks a new one. Never type a code for the person.
8
+ - dibs no longer crashes (exit 70) when whatever reads its output stops reading. It goes quiet on that stream, the job runs on, and dibs exits with the job's code.
9
+ - Plain `dibs` shows the board in about 0.2 s, even on a busy Mac.
10
+ - Windows: dibs finds its own files from any drive, says what command a hung lock holder runs, guards Claude Code's session temp folders, measures what jobs use and tells a job when it used more than it asked, and no longer crashes when a write meets a reader of the state file. The Windows tests now have to pass on every change.
11
+ - Two tests that failed on timing alone (on-demand VM packing, boost on Linux) hold now. Nothing to do.
12
+
13
+ ## 0.0.180
14
+ - Slots are a hard limit again. A session's hold now covers one of its runs per resource at a time, so a second run from the same session or its subagents needs a slot of its own and passes the memory and disk checks. On 11-10 five subagent runs under one playwright hold started at once and froze the Mac. If your subagents share a hold, expect them to queue.
15
+ - dibs no longer crashes (exit 70) or exits 75 with "state lock stuck" when two dibs write at once. Every shared file in ~/.dibs uses one new lock. A slow holder is waited for and never taken over; a dead, zombie or stopped one is. If a live dibs hangs holding the lock for over a minute, `dibs alerts` and the board name it ("dibs is stuck behind pid N") with the fix, and plain `dibs` shows the last state instead of waiting. A stale lock dibs can't remove ends the wait with exit 75 naming the path.
16
+ - Under lasting memory pressure, dibs stops one paused job (lowest priority, then most memory) and puts it back at the front of its line to run again from the start, rather than pausing more: a paused job's memory goes to swap. Only jobs dibs can run again, and never one a person or agent paused.
17
+ - A wait or exit 74 for disk now says which floor holds the job (5 GB, or 3 GB for `-p high`/`urgent`/`--by` with `-m`) and, when you passed a smaller `--disk`, that it doesn't lower it: `--disk` is what the job writes, not the floor. Only a `--disk` of 1 GB or less on test, deploy or a lock (under 100 MB elsewhere) starts below the floor, keeping 1 GB free past it. To get unstuck, free disk.
18
+ - A low or idle job holding a slot that a normal (or higher) job waits for is lifted off background priority until nobody waits on it, so it isn't starved behind a busy machine while others queue for it. The waiter is told; nothing to do.
19
+ - Low disk is a wait now, never a refusal at the start. A `dibs run`, `dibs hold` or `dibs later` job short of disk keeps its place and starts the moment there's room, so stop writing `until df ...` loops before a ship. Exit 74 now means the run needs more than the whole disk, or (outside Claude Code) the wait limit ran out while disk held it.
20
+ - Jobs that write next to nothing start below the 5 GB floor, keeping 1 GB free: a command whose own last runs (two or more) ate under 100 MB, or, before it has runs, one that says so with `--disk` (under 100 MB anywhere; 1 GB or less on test, deploy or a lock of your own: say `--disk 200M` on a test suite that writes nothing). The first run of anything else keeps the floor, since a first `npm ci` or bundling deploy writes gigabytes. A run that eats more takes the exemption away until its runs come back down.
21
+ - A job the person is waiting on (`-p high`, `-p urgent`, or `--by` with `-m`) no longer waits for the room dibs keeps for swap, and may start down to 3 GB free instead of the 5 GB floor, as long as its own need is free. Use those only when a person really waits.
22
+ - Under 1 GB free, the watcher pauses the dibs job writing the most, whatever its priority (a deploy included), and resumes it at 2 GB. Its session gets a notice and the person an alert. Don't end it or run it again: free your own build output and scratch folders.
23
+ - A quick command booked small (its runs used under 512 MB) no longer waits on the memory budget: a one-second test waited 29 minutes for it.
24
+ - A command whose last runs all used 512 MB or less is judged by that, not by its `--mem`: it starts under high (not critical) memory pressure, and other jobs' bookings they don't use no longer hold it. Memory waits name the jobs using the most memory, not the ones booking the most.
25
+ - A running job that has gone well past where its command's own runs reach their peak memory counts at what it uses (plus 1 GB), not its `--mem`, so it no longer holds others on "the machine doesn't have the room". A command that peaks late keeps its booking until then. Runs from before this release don't say when they peaked, so this starts after a command's next few runs.
26
+ - `dibs listen` no longer stops after an hour. It waits until something comes for you, however long that takes, and when your session ends it exits on its own without a word. You don't need to restart it on a timer any more: start it once, and again each time it hands something over. `--for 30m` still sets a limit, with exit 3 when it runs out.
27
+ - Faster: dibs reads the process table, start times and the machine before it takes the state lock, never while holding it, and every dibs shares one machine reading. `dibs service install guard` keeps one process answering the Claude Code hook, so a tool call no longer starts Node; without it the hook works as before.
28
+ - The throttle watcher spots stuck cores (load 5 or more per core while a quarter of the CPU sits idle): it stops lowering processes and, after 5 minutes, alerts the person to restart the Mac. Build and test tools left running for 3 hours with their script deleted get an alert naming them; nothing is killed.
29
+ - Messages: each conversation with the person holds only what the two of you said. What agents tell each other and dibs's own notices are separate streams, never the person's unread. Your messages to another agent are signed with a name a reply reaches. To answer an agent, use `dibs say --to <that agent>`: plain `dibs say` goes to the person, and dibs now says so when you use it right after another agent's message. Outside Claude Code, messages arrive with your next dibs command.
30
+ - After the Mac sleeps, waiters keep their places even when something wrote the state file during the sleep. Nothing to do.
31
+ - Windows: `irm https://dibs.cc/install.ps1 | iex` installs dibs natively, with `dibs.cmd` and a Git Bash `dibs`. It works with gaps (no pausing or measuring yet): docs/windows.md.
32
+ - history.jsonl moves aside at 2 MB like the event log. Nothing to do.
33
+
5
34
  ## 0.0.179
6
35
  - Alerts are only for what the person should know: deploys, high, urgent or `--by` jobs, the same command failing 3 times in a row, lost jobs and crashes. Everything else is in `dibs alerts --all`. Times from another day say which day. Nothing for you to do; don't dismiss alerts the person should see.
7
36
  - Notices about your jobs go only to the session they're about, once per change. dibs no longer prints "used up to N cores, pass --cpu N": it learns that silently. A progress task belongs to the agent that posted it, and its nudge goes to that agent.
@@ -437,8 +466,8 @@ Each version's notes are shown once to every Claude session the first time it ru
437
466
  - A job that ends while the disk is full still hands back its own exit code, and its processes are still killed. dibs says it couldn't record the end; the next dibs command cleans up the lease.
438
467
 
439
468
  ## 0.0.82
440
- - File leases now cover every git worktree of a repo. `dibs hold files:format/SPEC.md` takes the same lease from any worktree, so an agent editing that file from another worktree waits, and the guard refuses its edits. Before, each worktree had its own lease and they never collided.
441
- - When a file is held from another worktree, dibs says so: "format/SPEC.md is leased to alex-d3 in another copy of this repo (wt-trust)". Wait for it the usual way; don't edit it from your own worktree to get around the lease.
469
+ - File leases now cover every git worktree of a repo. `dibs hold files:docs/SPEC.md` takes the same lease from any worktree, so an agent editing that file from another worktree waits, and the guard refuses its edits. Before, each worktree had its own lease and they never collided.
470
+ - When a file is held from another worktree, dibs says so: "docs/SPEC.md is leased to alex-d3 in another copy of this repo (wt-docs)". Wait for it the usual way; don't edit it from your own worktree to get around the lease.
442
471
 
443
472
  ## 0.0.81
444
473
  - dibs no longer starts work on a machine that's already overloaded. Below minDisk nothing starts, urgent work and runs inside your own hold included.
package/README.md CHANGED
@@ -54,7 +54,9 @@ With `dibs guard install`, an agent that forgets gets turned away with the exact
54
54
 
55
55
  ## Details
56
56
 
57
- **Install.** `install.sh` downloads the release from dibs.cc and checks its sha256 before installing anything, puts dibs in `~/.dibs-cli` and links `~/.local/bin/dibs`. If anything fails, it says what and installs nothing. Each release is at `https://dibs.cc/releases/dibs-v<version>.tar.gz`, with its `.sha256` beside it. A pinned version from GitHub: `curl -fsSL https://raw.githubusercontent.com/dibssoftware/dibs/v0.0.179/install.sh | sh`. From a clone: `DIBS_SOURCE=<the clone> sh install.sh`.
57
+ **Install.** `install.sh` downloads the release from dibs.cc and checks its sha256 before installing anything, puts dibs in `~/.dibs-cli` and links `~/.local/bin/dibs`. If anything fails, it says what and installs nothing. Each release is at `https://dibs.cc/releases/dibs-v<version>.tar.gz`, with its `.sha256` beside it. A pinned version from GitHub: `curl -fsSL https://raw.githubusercontent.com/dibssoftware/dibs/v0.0.181/install.sh | sh`. From a clone: `DIBS_SOURCE=<the clone> sh install.sh`.
58
+
59
+ **Windows.** From PowerShell, no admin rights needed: `irm https://dibs.cc/install.ps1 | iex`. It checks the sha256 the same way, puts dibs in `~\.dibs-cli`, and makes `dibs.cmd` (PowerShell and cmd) and `dibs` (Git Bash, where Claude Code runs its commands on Windows) in `~\.local\bin`.
58
60
 
59
61
  **Node.** 22.23.4, 24.22.1, 26.12.1 or newer. Older builds of those lines have the Brotli decoder hole (CVE-2026-111497), and dibs's services refuse to install on them.
60
62
 
@@ -75,7 +77,7 @@ rm -rf ~/.dibs-cli ~/.local/bin/dibs ~/.dibs # ~/.dibs is the queue, history
75
77
 
76
78
  **Words dibs uses.** A *resource* is something agents take turns on: `test`, `sim`, `xcode-build`, `playwright`, `deploy`, `heavy`, or a name you make up. A *turn* lasts exactly as long as the command. A *hold* (`dibs hold sim --for 20m`) keeps a turn across several commands. A *lease* on files (`dibs hold 'files:src/auth/**'`) keeps other agents' edits off them.
77
79
 
78
- **Platforms.** macOS and Linux run the full suite in CI on every push. Windows support exists and is untested.
80
+ **Platforms.** macOS and Linux run the full suite in CI on every push. Windows works, with gaps (no pausing or measuring yet): [the list](docs/windows.md).
79
81
 
80
82
  ## License
81
83
 
@@ -1,4 +1,13 @@
1
- #!/usr/bin/env node
1
+ #!/bin/sh
2
+ ":" //; D=${DIBS_HOME:-$HOME/.dibs}; S=$D/guard.sock; if [ -S "$S" ] && command -v curl >/dev/null 2>&1; then in=$(cat); out=$({ printf '%s\000%s\000' "$PPID" "$PWD"; env -0; printf '\000%s\000' "$in"; } | curl -sf --max-time 2 --unix-socket "$S" --data-binary @- http://guard/ 2>/dev/null); case $out in ok*) r=${out#ok}; r=${r#?}; [ -n "$r" ] && printf '%s\n' "$r"; exit 0;; esac; printf '%s' "$in" | node "$0"; exit $?; fi; exec node "$0"
3
+ // Line 2 is read by sh and ignored by Node (a string, then a comment). As a
4
+ // script it is the hook's fast way in: when the resident guard is running
5
+ // (dibs service install guard, src/guardd.mjs), sh sends the call down its
6
+ // socket, with this hook's parent pid, folder and environment, and prints the
7
+ // answer. With no guard running, no curl, or no "ok" back within 2 s, it runs
8
+ // the hook in Node below, as it always did. Run as `node dibs-guard.mjs` (the
9
+ // plugin, Windows) it is the Node hook straight away.
10
+ //
2
11
  // The Claude Code hook behind `dibs guard`. It loads only the guard and its
3
12
  // file leases (plus the subagent limit, for subagent events, and src/talk.mjs
4
13
  // when the person has a message waiting), so a tool call pays for a few small
package/bin/dibs.mjs CHANGED
@@ -20,7 +20,7 @@ import { remoteRun, join, machines } from '../src/remote.mjs';
20
20
  import { sims } from '../src/simpool.mjs';
21
21
  import { question, questions, answer, hoursCmd } from '../src/questions.mjs';
22
22
  import { say, tell, threads, noticesFor, listen } from '../src/talk.mjs';
23
- import { bytes, ms, deadline, die, noSpace, fullDisk, setCaller, lastDie, lastDieCode } from '../src/util.mjs';
23
+ import { bytes, ms, deadline, die, noSpace, fullDisk, setCaller, lastDie, lastDieCode, lastDieAt } from '../src/util.mjs';
24
24
  import { event } from '../src/events.mjs';
25
25
  import { fileRes, isFiles, resList } from '../src/files.mjs';
26
26
  import { boost, pause, resume, stop, cap } from '../src/override.mjs';
@@ -148,7 +148,7 @@ the person's page and MCP server
148
148
  dibs pair --list | --revoke <id|all> what's signed in (MCP clients: can act or look only; on the coordinator, its machines)
149
149
  dibs pair --machine [--name x] on the coordinator: a one-time code another machine joins with (10 minutes, one use);
150
150
  dibs pair --revoke <machine> removes one that joined
151
- dibs pair --remote [--allow-actions] a one-time link and QR code to pair a phone or any browser with https://app.dibs.cc,
151
+ dibs pair --remote [--allow-actions] a one-time QR code, and a code to type, to pair a phone or any browser with https://app.dibs.cc,
152
152
  end-to-end encrypted through the relay (dibs service install relay keeps it connected).
153
153
  It can only look unless --allow-actions; the hook and hours never change remotely
154
154
  dibs relay [--url wss://app.dibs.cc] the relay connection itself, in the foreground
@@ -161,8 +161,9 @@ talk with your agents
161
161
  dibs tell <agent> "..." a message for that agent: it gets it with its next tool call, or as it
162
162
  finishes its turn (needs dibs guard install). From an agent, it says which agent sent it
163
163
  dibs tell desk "..." to the agent config.json names as "desk": it answers with dibs say --to person
164
- dibs listen [--for 60m] [--json] waits until a message, an answer or a notice is queued for you, prints all of it
165
- and exits 0 (exit 3: none in time). Start it with run_in_background at the start of
164
+ dibs listen [--for 30m] [--json] waits until a message, an answer or a notice is queued for you, prints all of it
165
+ and exits 0; no time limit unless --for (exit 3: none in time), and it ends quietly
166
+ with your session. Start it with run_in_background at the start of
166
167
  a session and again each time it exits: its exit wakes you even while idle
167
168
 
168
169
  several machines
@@ -202,7 +203,7 @@ other
202
203
  dibs throttle [--watch] move CPU hogs running outside dibs to background priority when the machine is hot
203
204
  dibs setup scratch [--size 40G] print the one-time commands for a capped volume for build output (--check: how full)
204
205
  dibs changes what changed in recent versions
205
- dibs guard install|remove|status|check a Claude Code hook that runs heavy commands through dibs when an agent forgets
206
+ dibs guard install|remove|status|check|serve a Claude Code hook that runs heavy commands through dibs when an agent forgets
206
207
  dibs init [--repo] [--remove] write dibs.md (the agent instructions) and a note pointing at it in ~/.claude/CLAUDE.md,
207
208
  ~/.codex/AGENTS.md and this repo's CLAUDE.md and AGENTS.md (install does it; --repo makes
208
209
  this repo's CLAUDE.md; --remove takes it all out; DIBS_NO_AGENT_NOTES=1 skips it)
@@ -256,7 +257,8 @@ A profile is a name for a resource with its ports and sizes, set once in config.
256
257
  files:<path or glob> is a file lease: while you hold it, dibs guard turns away other sessions' edits and writes there.
257
258
  sim is the one shared booted simulator. sim-own boots a private one for your command: its udid is in $SIM, its name in $SIM_NAME.
258
259
  Exit codes: the command's own, or 75 gave up waiting (NOT a failure: your command never started; run the
259
- same command again within 2 minutes to keep your place), 74 not enough disk,
260
+ same command again within 2 minutes to keep your place), 74 this run can't fit on this disk even empty of
261
+ other jobs, or its wait limit ran out on disk (low disk otherwise just means you wait),
260
262
  76 lost the coordinator or the other machine before the job started (safe to send again),
261
263
  77 lost it after the job started on another machine (it may have run: check before running it again),
262
264
  127 command didn't start, 2 bad usage (also: you already have this exact command waiting or running),
@@ -531,18 +533,43 @@ async function readOne(argv) {
531
533
  const CRASHED = 70;
532
534
  const crash = e => die(`dibs itself crashed (a bug in dibs, not in your command; exit ${CRASHED}). Report it: dibs ask "..."\n${e?.stack || String(e)}`, CRASHED);
533
535
  // A full disk is no bug: say what to do, with the exit code agents know (74), not a stack.
534
- const fail = e => (noSpace(e) ? die(fullDisk(e), 74) : crash(e));
536
+ // A lock dibs can't take over (src/lock.mjs LockBroken) is no bug either: the message names what to remove.
537
+ const fail = e => (noSpace(e) ? die(fullDisk(e), 74) : e?.code === 'ELOCKBROKEN' ? die(e.message, 75) : crash(e));
535
538
  process.on('uncaughtException', fail);
539
+ // A caller that stops reading (a `| head`, a closed terminal, a tool call that gave up) closes our
540
+ // stdout or stderr. That's no bug, and the job dibs runs must go on and keep its exit code: from then
541
+ // on dibs says nothing on that stream. On 2026-11-11 a run whose stderr reader went away crashed
542
+ // with EPIPE (exit 70) mid-wait, twice in 8 minutes.
543
+ for (const s of [process.stdout, process.stderr]) s.on('error', e => {
544
+ if (e?.code !== 'EPIPE' && e?.code !== 'ERR_STREAM_DESTROYED') return fail(e);
545
+ s.write = (_c, enc, cb) => { (typeof enc === 'function' ? enc : cb)?.(); return true; };
546
+ });
536
547
 
537
548
  // A job lost on its way to or on another machine (76, 77) and dibs's own crash
538
549
  // (70) go in the event log, so the person hears of them (src/alerts.mjs), not
539
550
  // only the agent whose tool call ended.
540
551
  let calledVerb = '';
552
+ // A crash's error and stack, so the record says which bug it was: the stack used to go only to the
553
+ // terminal or a service's log, and the 2026-11-10 broker crashes left no trace of theirs anywhere.
554
+ const SRC_FRAME = /\/((?:src|bin)\/[\w.]+:\d+)/;
555
+ const crashAt = text => {
556
+ const [, error, ...frames] = text.split('\n');
557
+ const where = frames.map(l => l.match(SRC_FRAME)?.[1]).find(Boolean);
558
+ return error ? { error: error.slice(0, 300), ...(where && { where }), stack: frames.filter(l => /^\s+at /.test(l)).slice(0, 8).map(l => l.trim()).join('\n').slice(0, 1500) } : {};
559
+ };
560
+ // What a long-running dibs (a service, the broker, a listener) was doing when it gave up with 75.
561
+ // Plain runs and holds exit 75 every day when a wait runs out; that's no news.
562
+ const GAVE_UP = new Set(['throttle', 'worker', 'serve', 'web', 'relay', 'listen', '']);
563
+ const gaveUpAt = () => ({ where: lastDieAt.split('\n').slice(2).map(l => l.match(SRC_FRAME)?.[1]).filter(Boolean).slice(0, 4).join(' < ') });
541
564
  process.on('exit', code => {
542
- if (code !== lastDieCode || !(code === CRASHED || ((code === 76 || code === 77) && calledVerb === 'run'))) return;
565
+ if (code !== lastDieCode) return;
566
+ const lost = (code === 76 || code === 77) && calledVerb === 'run';
567
+ const gaveUp = code === 75 && GAVE_UP.has(calledVerb);
568
+ if (code !== CRASHED && !lost && !gaveUp) return;
543
569
  try {
544
- event({ kind: code === CRASHED ? 'crash' : 'lost', code, verb: calledVerb, who: identity().who,
545
- cmd: process.argv.slice(2).join(' ').slice(0, 160), why: lastDie.split('\n')[0].slice(0, 300) });
570
+ event({ kind: code === CRASHED ? 'crash' : gaveUp ? 'gaveup' : 'lost', code, verb: calledVerb, who: identity().who,
571
+ cmd: process.argv.slice(2).join(' ').slice(0, 160), why: lastDie.split('\n')[0].slice(0, 300),
572
+ ...(code === CRASHED ? crashAt(lastDie) : gaveUp ? gaveUpAt() : {}) });
546
573
  } catch {}
547
574
  });
548
575
  main().catch(fail);
@@ -1,6 +1,6 @@
1
1
  # Does dibs speed work up or slow it down?
2
2
 
3
- Measured on 2026-10-14, on the owner's 10-core (4 performance, 6 efficiency), 16 GB Mac, with 0.0.72 and with this branch. Everything here can be rerun: the commands are under each section.
3
+ Measured on 2026-10-14, on a 10-core (4 performance, 6 efficiency), 16 GB Mac, with 0.0.72 and with this branch. Everything here can be rerun: the commands are under each section.
4
4
 
5
5
  ## Short answer
6
6
 
package/docs/files.md CHANGED
@@ -19,7 +19,7 @@ With the guard installed (`dibs guard install`, or the plugin), the hook turns a
19
19
 
20
20
  Claude Code keeps each session's scratch files in `/private/tmp/claude-<uid>/<project folder>/<session id>/`. The guard turns away any delete or write there outside the calling session's own folder, whatever `guard.files` says, because it's the person's rule: another agent may be using those files right now. That covers `rm`, `find -delete` and `find -exec rm`, `xargs rm`, `rsync --delete`, `mv` away, `truncate`, `>` redirects, and Edit or Write. It also covers deleting the root itself, a project folder, or a glob that spans sessions (`/private/tmp/claude-503/*`), under any spelling (`/tmp/...`). Variables set earlier in the same command (`S=/path; find $S ...`, `export S=...`) or in the hook's environment are read, so a path in one is checked like one typed out. A `$VAR` path dibs still can't read is turned away when its literal start names another session's folder. A recursive delete whose whole target is a variable or `$(...)` it can't read (`rm -rf $S`, `rm -rf "$S"/*`, `find $S ... -delete`) is turned away everywhere: write the path out. A literal end (`"$S/build"`) is fine. Reads are fine anywhere, and so are writes and single-file deletes in your own session's folder.
21
21
 
22
- Subagents share their session's folder, so inside it the guard also turns away a recursive delete (`rm -r`, `find -delete`, `find -exec rm`, `find | xargs rm`, `rsync --delete`, `rmdir -p`; a find's filters such as `-mindepth 1` or `-mmin +180` don't change that, since it can still reach everything) of the session folder itself or its `scratchpad`. For each folder at the top of the scratchpad, dibs remembers the first agent that wrote into it (in `~/.dibs/scratch/<session>`, gone once the session's folder is). A recursive delete of one is that agent's alone: another agent of the session is turned away and told who made it. A folder a program makes counts as made by the agent whose command named it before it existed (`xcodebuild -derivedDataPath <scratchpad>/dd`, `--out=<path>`, a relative path run from the scratchpad). A folder older than that record can go if it holds 20 files or fewer, or if the deleting agent's earlier commands named it; otherwise it's turned away, since dibs can't tell whose it is. Deleting a folder whole clears its record. Either way, ask whoever made it, or have the person delete it.
22
+ Subagents share their session's folder, so inside it the guard turns away only a recursive delete (`rm -r`, `find -delete`, `find -exec rm`, `find | xargs rm`, `rsync --delete`, `rmdir -p`; a find's filters such as `-mindepth 1` or `-mmin +180` don't change that, since it can still reach everything) of the session folder itself or its `scratchpad`, or a glob of nothing but wildcards at the scratchpad's top (`scratchpad/*`). Anything inside the scratchpad is the session's own: any agent of the session, the main thread or a teammate, may delete any folder in it, whoever made it and however old it is. dibs still notes which agent first wrote into each folder at the top of the scratchpad (in `~/.dibs/scratch/<session>`, gone once the session's folder is), counting a folder a program makes as made by the agent whose command named it before it existed (`xcodebuild -derivedDataPath <scratchpad>/dd`, `--out=<path>`), so the disk watcher can tell whose folder is filling the disk. Ask a teammate before deleting what it may still be using.
23
23
 
24
24
  Reads are never blocked, and nothing it can't read is blocked either: a path built from `$VAR` or `$(...)`, a script that writes on its own. A refusal means wait or ask the holder, not find another way to write the file.
25
25
 
package/docs/guard.md CHANGED
@@ -61,6 +61,12 @@ dibs guard status # installed? exit 1 if not
61
61
  dibs guard remove
62
62
  ```
63
63
 
64
+ **Faster: the resident guard.** The hook runs on every tool call, and starting Node for each one is most of its time on a busy Mac. `dibs service install guard` keeps one process answering it over `~/.dibs/guard.sock` (macOS and Linux, settings.json installs; the plugin's hook starts Node as before). Each call still runs on its own, with the session's environment, so it answers exactly as before. When the service isn't running, or doesn't answer within 2 seconds, the hook starts Node itself: a stopped service slows the hook down but never breaks a tool call.
65
+
66
+ ```bash
67
+ dibs service install guard
68
+ ```
69
+
64
70
  **Codex.** Codex reads the same marketplace and plugin files:
65
71
 
66
72
  ```bash
package/docs/questions.md CHANGED
@@ -38,7 +38,9 @@ An agent may answer another agent's question with `dibs answer <id> <text>` when
38
38
 
39
39
  ## The person's threads, and the desk
40
40
 
41
- `dibs threads` holds what's for the person: one-way questions, and agents' `dibs say` notes, marked FYI. dibs's own notices to an agent about its jobs (bookings, stuck-job advice, "pass --mem 7G") go only to that agent through the hook, never into the person's threads.
41
+ `dibs threads` holds what's for the person: one-way questions, and agents' `dibs say` notes, marked FYI. dibs's own notices to an agent about its jobs (bookings, stuck-job advice, "pass --mem 7G") go only to that agent through the hook, never into the person's threads. Neither do the notes dibs writes in an agent's name (how a `dibs later` run ended), or one agent's `dibs tell` to another.
42
+
43
+ `dibs threads --json` keeps those apart for the page and the Mac app: `between` lists what agents told each other (`from`, `to`, delivery state), and `fromDibs` lists dibs's notices and notes to agents. Each thread's `reach` says how a message sent now would get to its agent: `listening` (within seconds), `working` (its next tool call), `idle` (not until it works again), `ended`, or `command` (not a Claude Code session). A message the person sent carries `deliveredAt` and `via` (`tool`, `stop`, `listen`, `say`, `command`) once it's handed over.
42
44
 
43
45
  Set `"desk": "<agent name>"` in `~/.dibs/config.json` to give the person one agent to talk to. `dibs tell desk "..."` (and the Mac app's chat) reaches that agent through the hook, and it answers with `dibs say --to person "..."`. `dibs threads --json` names it (`desk`), marks its thread `desk: true`, and its answers `reply: true`.
44
46
 
@@ -73,6 +75,8 @@ How a message reaches the agent, with `dibs guard install` (or the plugin):
73
75
  - An agent that's idle, waiting for its person to type, gets it on its next tool call. A session that has ended keeps the message queued, shown as not delivered, in case it's resumed.
74
76
  - Without the guard, the agent gets queued messages the next time it runs `dibs say`.
75
77
 
76
- dibs leaves notices of its own in an agent's thread, as lines from dibs: a job of the agent's that has used no CPU for 20 minutes while others wait for it, one that used far more memory than it asked for (with the `--mem` to pass next time), and one paused for low disk or memory (it resumes by itself). Each is said once and handed over the same way as your messages, beside the next tool call, with "dibs has a notice about your jobs". A notice never keeps an agent from stopping, and one nobody picked up expires after an hour. Outside Claude Code, notices arrive on stderr with the agent's next dibs command.
78
+ dibs leaves notices of its own in an agent's thread, as lines from dibs: a job of the agent's that has used no CPU for 20 minutes while others wait for it, one that used far more memory than it asked for (with the `--mem` to pass next time), and one paused for low disk or memory (it resumes by itself). Each is said once and handed over the same way as your messages, beside the next tool call, with "dibs has a notice about your jobs". A notice never keeps an agent from stopping, and one nobody picked up expires after an hour. Outside Claude Code (Codex, opencode, a terminal), notices and messages arrive on stderr with the agent's next dibs command, or at once while it runs `dibs listen`.
79
+
80
+ A message from another agent names it by the name it answers to, with the way back: `To answer alex-2e, run: dibs say --to alex-2e "..."`. Plain `dibs say` goes to the person, so use `--to` when the message came from an agent.
77
81
 
78
82
  Plain `dibs` counts unread notes with the questions: `2 questions and 1 note are waiting for you: dibs threads` (`dibs --detail`: `2 questions and 1 note for you: dibs threads`), and `dibs --json` has a `notes` count. Agents may run `dibs tell` and `dibs threads read` too, as they may `dibs answer`: a message from an agent reaches its reader marked as another agent's, never the person's. Threads keep 7 days and at most 200 lines each, in `~/.dibs/messages.json`.
package/docs/reference.md CHANGED
@@ -14,7 +14,7 @@ dibs runs on this machine. Agents take turns through it on the simulator, Xcode
14
14
  - No dibs for reads, edits, small commands, or long jobs that mostly wait on the network and use little CPU, memory or disk (crawlers, pollers, HTTP checks). The hook leaves those alone too.
15
15
  - Start `dibs listen` with run_in_background now, and again each time it exits: it wakes you when the person or dibs has something for you.
16
16
  - Waiting is normal. A call moved to the background is still waiting: don't run it again. A wait on memory, swap or disk protects the machine: keep waiting, and never lower `--mem` or raise `-p` to get past it.
17
- - Exit 75: it gave up waiting and your command never ran; run the same command again. Exit 74: not enough free disk; free your own build output, or tell the person.
17
+ - 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.
18
18
  - Decide what you can undo yourself. Ask the person only before something you can't undo (`dibs question ... --one-way`). Lines starting "Message from the person:" are theirs: act on them.
19
19
  - Post progress as you work: `dibs progress "what you did or found" --task <name> --eta 30m`, then `--done`.
20
20
  - The rest (holding across tool calls, file leases, other machines, every exit code, overriding jobs, questions) is in the dibs skill and in `dibs help`.
@@ -49,7 +49,7 @@ dibs tell web-app "use the staging database" # reaches the agent on its next t
49
49
  dibs tell desk "why is my build waiting?" # the agent config.json names as "desk" answers you with dibs say --to person
50
50
  dibs alerts # what's wrong and the one fix for each: long waits, memory holding work back (and what to close), stuck jobs, failed or lost jobs, dibs itself, a full disk
51
51
  dibs alerts dismiss <id> # close one for a day; it comes back if its cause is still there
52
- dibs listen # an agent waits for a message (run_in_background); exit 3 after 60m with none
52
+ dibs listen # an agent waits for a message (run_in_background), as long as its session lives
53
53
  dibs history # the last 7 days: busy time, waits and who waited, by resource, agent and hour
54
54
  dibs stats # waits against run times, today and the last 7 days: the share of jobs that waited longer than they ran
55
55
  dibs stats --me # your own: jobs, run and wait time, failures by exit code, what held you back, top commands, ETAs met (--agent <name>, --since 30d, --json)
@@ -111,12 +111,12 @@ Agents branch on these, so they don't change.
111
111
  |---|---|
112
112
  | the command's own | it ran |
113
113
  | 75 | dibs stopped waiting in line. The command never started and did not fail. Run the same command again within 2 minutes to keep your place. For `dibs question --wait`: no answer (timed out or dismissed), nothing was decided |
114
- | 74 | not enough free disk, and nothing running would free it. Other sessions' `/private/tmp/claude-*` folders are off limits for making room |
114
+ | 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 while disk held it. Low disk otherwise just means you wait. Other sessions' `/private/tmp/claude-*` folders are off limits for making room |
115
115
  | 76 | lost the coordinator or the other machine before a remote job started. Nothing ran there: sending it again is safe |
116
116
  | 77 | lost the other machine after a remote job started. It may have run, or may still be running: check before running it again |
117
117
  | 127 | the command didn't start |
118
118
  | 2 | bad usage, a job asking more memory or cores than the machine ever hands out (it says the most it can ask), a resource name close to a real one (`simulator` for `sim`), an agent's high or urgent boost without `-m`, `--on` on a machine that isn't in a group, or a `dibs run` you already have waiting or running (wait for that one) |
119
- | 3 | `dibs listen` heard nothing in its time (`--for`, 60m by default). Run it again to keep listening |
119
+ | 3 | `dibs listen --for <time>` heard nothing in that time (without `--for` it has no limit). Run it again to keep listening |
120
120
  | 1 | nothing matched: `mine` with nothing held (the clean result after a release), `release` with nothing to give back |
121
121
  | 70 | dibs itself crashed: a bug in dibs, not your command. Report it with `dibs ask "..."`. If your command already ran, you get its code instead |
122
122
 
package/docs/relay.md CHANGED
@@ -6,7 +6,7 @@ Turn it on:
6
6
 
7
7
  ```bash
8
8
  dibs service install relay # keeps the outbound connection up, with backoff; off until you do this
9
- dibs pair --remote # prints a one-time link and a QR code; open it on the phone. That browser can only look
9
+ dibs pair --remote # shows a QR code and a code; scan it with the phone or type the code at app.dibs.cc. That browser can only look
10
10
  dibs pair --remote --allow-actions # the same, and that browser may also boost, pause, resume and stop jobs, cap an agent, set the pace and cancel scheduled runs
11
11
  dibs pair --list # local sign-ins and remote devices
12
12
  dibs pair --revoke <id|all> # a revoked device's open session ends within 25 seconds
@@ -45,6 +45,18 @@ The fragment never goes in a request, and the page removes it from the address b
45
45
 
46
46
  So pairing needs the secret (256 bits, one use, ten minutes; there's nothing to brute force), and a relay that swaps either key is caught: the device key by the HMAC and the device's own signature, the Mac's key by the fingerprint and the HMAC.
47
47
 
48
+ ### The typed code
49
+
50
+ Beside the QR code, `dibs pair --remote` shows a code to type at app.dibs.cc instead, like `7KQM-2XRP-9DHT`: 12 Crockford base32 characters (no I, L, O or U; the page reads O as 0 and I and L as 1). The first 4 are a drop name `R`, the other 8 are `K`, 40 random bits that never leave the Mac or the person's eyes.
51
+
52
+ The Mac seals the link's fragment, `<mid>.<secret>.<fp>`, with AES-256-GCM under PBKDF2-SHA256(`K`, salt "dibs-code-v1" ‖ `R`, 600,000 iterations), a random 12-byte nonce and the salt as associated data, and sends the box to the relay as `{t: "drops", d: [{r, b, exp}]}` over its authenticated socket, the whole list of its open links' boxes each time it changes. The relay's code index keeps each box under `R` for the machine that sent it, until the link's ten minutes run out or the Mac stops listing it: when the link is used, revoked, or replaced past five open links.
53
+
54
+ A name another machine already holds stays theirs. The relay answers every drops message with `{t: "drops-res", ok, taken}`, the names it now holds for this Mac and the ones another machine holds, and `dibs pair --remote` waits up to 5 seconds for that answer before printing its code. A taken name gets the same link sealed again under a fresh code (three tries, then no code, only the QR code); no answer prints the code with a warning that it may not work yet. So the code it prints is one the relay took.
55
+
56
+ The page sends `R` to `POST /pair/code`, same origin only, and gets the box back, at most 3 times per box. A name nobody holds, an expired box and one already handed out 3 times all get the same 404. It derives the key from `K`, opens the box, and pairs with the link inside exactly as if the QR code had been scanned. A wrong `K` fails in the page, which keeps the box, so retyping never fetches again.
57
+
58
+ The relay never sees `K`. Whoever holds a box (the relay, or someone who guessed a live `R` out of 1,048,576 within the per-address limits) has 2^40 keys to try at 600,000 PBKDF2 rounds each: 3.3e17 HMAC-SHA256 calls on average. A top-end GPU does about 9e9 a second, so opening one box inside its ten minutes takes some 60,000 of them, and what's inside is worthless once those ten minutes are up or the link is used. The worst a guesser can do cheaply is spend a live box's 3 fetches; the person then runs `dibs pair --remote` again.
59
+
48
60
  ## A session
49
61
 
50
62
  Every connection, including the first right after pairing:
@@ -56,7 +68,7 @@ Every connection, including the first right after pairing:
56
68
 
57
69
  Keys: `salt = SHA-256(tx("dibs-hs-keys-v1", TH, sigM, sigD))`; from the X25519 shared secret, HKDF-SHA-256 with that salt gives `k_b2m` (info "dibs-relay-v1 key b2m"), `k_m2b` ("... key m2b") and the session id `sid` ("... sid"). Both ephemeral private keys are dropped after the exchange, so a later theft of the long-term keys reveals no recorded session (forward secrecy). Both sides signed the same transcript (mutual authentication); a replayed hello3 fails because the Mac's `em` and `nm` are new every time.
58
70
 
59
- 4. **ready**: the Mac's first encrypted frame. The page sends no call before it decrypts this (key confirmation).
71
+ 4. **ready**: the Mac's first encrypted frame (key confirmation). The page may send its first call right behind hello3, sealed under keys bound to the Mac's signed ephemeral key, so only that Mac can read it; it reads no answer before it decrypts this, and a session without it dies with every call on it. The Mac handles hello3 before the next frame, so the call finds the keys in place.
60
72
 
61
73
  ## Frames
62
74
 
@@ -68,7 +80,7 @@ AAD = "dibs-frame-v1" | sid | direction (1 = browser to Mac, 2 = Mac to browse
68
80
 
69
81
  Each side's `seq` starts at 0, and the receiver accepts only exactly the next one. A replayed, dropped, reordered, altered or cross-session frame fails, and any failure closes the session (the page reconnects with new keys). Plaintext is a 4-byte length, the JSON, and zeros up to the next bucket of 1, 4, 16, 64, 256 KiB, 1 or 4 MiB; requests are capped at 64 KiB. Messages: `{t: "req", id, method, path, body}` from the page, `{t: "res", id, status, json}` from the Mac. The Mac runs a request only after it decrypts, only for `/api/...` paths, only if the device is still in `relay.json` at that moment, and only if the device may. Remote calls go through an allow-list, checked in the relay connector and again in `api()`, on the path as `api()` parses it (so `/api/x/../hook` is `/api/hook`):
70
82
 
71
- - any paired device: GET `/api/board`, `/api/questions`, `/api/threads`, `/api/later`, `/api/history`, `/api/stats`, `/api/settings`;
83
+ - any paired device: GET `/api/board` (with `?posts=0` the day's posts stay apart, for `/api/posts`), `/api/posts`, `/api/questions`, `/api/threads`, `/api/later`, `/api/history`, `/api/stats`, `/api/settings`;
72
84
  - a device paired with `--allow-actions`, also: POST `/api/jobs/<id>/boost|pause|resume|stop`, `/api/cap`, `/api/pace`, `/api/later/<id>/cancel`;
73
85
  - everything else is 403, a route added later included, so new routes are local-only until someone decides otherwise. That covers messaging an agent, marking a thread read, answering or dismissing an agent's question (all of which reach agents as "Message from the person", which agents act on, shell commands included), installing the hook (it edits `~/.claude/settings.json`) and setting the hours (they decide when the person gets asked).
74
86
 
@@ -80,8 +92,9 @@ Errors before a session exists (`{t: "err", code}`) are unauthenticated, so the
80
92
 
81
93
  | path | who | what the relay does |
82
94
  |---|---|---|
83
- | `wss://app.dibs.cc/ws/m/<mid>` | the Mac (also sends `{t: "tokens", h, p}`: the hashes of its paired browsers' relay tokens and of its open links' pairing tickets, within a second of any change in `relay.json`) | sends a 32-byte challenge; the Mac answers with its relay public key and `Sign_R(tx("dibs-relay-auth-v1", mid, challenge, host))`. The relay checks that the key hashes to `<mid>` and the signature; then routes. The newest authenticated connection replaces the old one |
95
+ | `wss://app.dibs.cc/ws/m/<mid>` | the Mac (also sends `{t: "tokens", h, p}`: the hashes of its paired browsers' relay tokens and of its open links' pairing tickets, and `{t: "drops", d}`, its open links' sealed code boxes, within a second of any change in `relay.json`) | sends a 32-byte challenge; the Mac answers with its relay public key and `Sign_R(tx("dibs-relay-auth-v1", mid, challenge, host))`. The relay checks that the key hashes to `<mid>` and the signature; then routes. The newest authenticated connection replaces the old one |
84
96
  | `wss://app.dibs.cc/ws/b/<mid>` | a browser tab | only from the page's own Origin. A tab gets a slot only by proving it's paired: its first message is `{t: "hello", rt}`, and the relay admits it if the hash of `rt` is one the Mac registered (compared in constant time), or `{t: "pair", ticket}` with a ticket whose hash the Mac registered for an open link, into a pool of 2 with a 30 s deadline that ends when the Mac admits it. A wrong ticket and no open link get the same answer, so the relay's answers say nothing about whether a link is open, and nobody without the link can take the pairing pool. Anything else (a byte, a made-up token, silence for 5 s) closes it. An admitted tab gets a random channel id; its binary messages go to the Mac prefixed with the id, and the Mac's go back by id. Text from the relay: `{t: "mac", up}`, and `{t: "refused", why: "unpaired" or "no-pairing"}`, which the page turns into its own words |
97
+ | `https://app.dibs.cc/pair/code` | the page (`POST {r}`, same Origin only) | a typed code's sealed box by its drop name (see "The typed code"), 3 times per box at most; the Worker's limit of 20 a minute per address and the code index's own count apply |
85
98
  | `https://app.dibs.cc/` | anyone | the page, with the headers below |
86
99
  | `https://dibs.cc/app`, `https://dibs.cc/app/*` | anyone | a 301 to `https://app.dibs.cc/`, which keeps the fragment. Exactly these two route patterns, so `/apple-touch-icon.png` and the like stay the waitlist's |
87
100
 
@@ -152,11 +165,13 @@ An account remembers your Macs, so any browser you sign in with opens all of the
152
165
 
153
166
  ### Signing in
154
167
 
155
- - **Email link.** The address is typed on a page at `https://mcp.dibs.cc/email`, not on app.dibs.cc: it runs Cloudflare Turnstile, whose script changes without notice and so can't be pinned, and app.dibs.cc runs no script it didn't ship, since AK is in its storage. The relay checks the Turnstile token with Cloudflare (for that host and action, once) before it sends anything. It keeps HMAC-SHA-256 under `ACCOUNT_SECRET` of the trimmed, lowercased address (so it can find the account an address signs in to, and can't list addresses), and sends `https://app.dibs.cc/account#signin=<token>` through Cloudflare Email Sending from no-reply@mail.dibs.cc. The token is 32 random bytes, works once, for 15 minutes, and is in the fragment, so it never lands in a server log or a referrer. The relay stores only its SHA-256. The answer is the same whether or not the address has an account. A first sign-in makes the account.
168
+ - **Email code (and link).** The address is typed on app.dibs.cc/account. The person check is Cloudflare Turnstile, invisible, on an origin of its own: `https://human.dibs.cc`, which the account page frames out of sight as soon as the email step shows (Turnstile's script changes without notice and so can't be pinned; app.dibs.cc runs no script it didn't ship, since AK is in its storage, and mcp.dibs.cc, whose origin the Mac trusts for MCP sign-in, runs none either). Only app.dibs.cc may frame it, it posts its token to that origin only, and it stores nothing. Only the person's click on Send code sends the token with the address; the relay checks the token with Cloudflare (for human.dibs.cc and this action, once) before it sends anything. `https://mcp.dibs.cc/email`, the old email page, redirects to the account page. It keeps HMAC-SHA-256 under `ACCOUNT_SECRET` of the trimmed, lowercased address (so it can find the account an address signs in to, and can't list addresses), and mails, through Cloudflare Email Sending from no-reply@mail.dibs.cc, a 6-digit code (never in the subject, which lock screens show) and a link, `https://app.dibs.cc/account#signin=<token>`, saying which browser asked and roughly where (Cloudflare's city and country for the request). The page that asked gets a request id (16 random bytes) and the person types the code there; the link is for another device. Either one, once, within 10 minutes, spends both. The code is uniform over 000000 to 999999, stored only as HMAC-SHA-256 under `ACCOUNT_SECRET` with its request id, compared in constant time, and gone after 5 wrong tries (a 1 in 200,000 chance per request, each request behind Turnstile, a click, and the limits below). The token is 32 random bytes in the fragment, so no request line, log or mail scanner's prefetch carries it; the relay stores only its SHA-256. For a mail wrapper that drops fragments, the page also takes `?signin=<token>`: loading it spends nothing (the page is served `no-store`, sends no referrer, takes the token out of the address bar at once and redeems it from script, which a scanner's prefetch doesn't run). Guesses at one code are checked one at a time, each against the tries the last one left, and an address takes at most 10 wrong codes a day across its requests; after that only its links sign in. The answer is the same whether or not the address has an account. A first sign-in makes the account, and the page then asks to add a passkey (skipping takes a second click that says what it costs).
156
169
  - **Passkey.** WebAuthn, checked by hand in the Worker (relay/src/webauthn.js): CBOR, COSE ES256 and EdDSA, attestation "none", the challenge, origin, relying party (app.dibs.cc), user presence, and a sign count that must go up (a copy of a passkey with an older count is refused as a possible clone). User verification (a PIN or biometrics) is required to add one, and a sign-in without it gets a session but not the wrapped AK. Challenges are stateless: the time, 16 random bytes and an HMAC under `ACCOUNT_SECRET` over them, the kind and the account, good for 5 minutes; the relay stores one only once it's been used, so asking for challenges costs it nothing. It stores each passkey's id and public key. The account page lists them and removes one.
157
170
  - **PRF.** When the browser supports the WebAuthn PRF extension, adding a passkey wraps AK under HKDF of its PRF output (AES-256-GCM, "dibs-ak-v1"), and the relay stores the wrapped AK. Signing in with that passkey anywhere it's synced opens AK there and then. The relay never sees the PRF output.
158
171
  - **A session** is 32 random bytes the browser sends as a bearer header (never a cookie, so a WebSocket upgrade doesn't carry it and the relay can't tie a session to the Macs it opens), good for 30 days; the relay stores its SHA-256, and drops it the first time it's shown for an account that's gone. "Sign out everywhere else" ends every session made before it (the relay stores the time) and gives the asking browser a new one.
159
- - **Limits:** sign-in links 3 an hour per address from one IP, 20 an hour per address from anywhere (so strangers can't lock a person out), 10 an hour per IP and 300 an hour in all, every request counting toward all four, behind Turnstile, and counted in the object's storage by the clock hour (keyed by the address's and IP's keyed hashes), so an eviction doesn't reset them; sign-in attempts 10 in 10 minutes per IP; 30 account requests a minute per IP (Workers rate limiting); 10 passkeys and 50 Macs per account (a 51st is refused; a Mac joining again replaces its own entry). Expired entries are swept by the object's alarm, 128 keys per kind at a time, never during a request.
172
+ - **Passkeys only.** With a passkey on the account, the account key's proof can switch email sign-in off: an email code or link then gives a recovery session, which reads nothing (not even the sealed keyring) and can only ask a Mac for AK. Once a Mac approves it (`dibs connect --approve`), the browser holds AK and proves it like any other. That's the way back for someone who lost every passkey.
173
+ - **Passkey first.** A browser that signed in with or added a passkey leads with "Sign in with passkey" next time; the email field also offers this site's passkeys in its autofill (WebAuthn conditional mediation).
174
+ - **Limits:** sign-in codes and links 3 an hour per address from one IP, 20 an hour per address from anywhere (so strangers can't lock a person out), 10 an hour per IP and 300 an hour in all, every request counting toward all four, behind Turnstile, and counted in the object's storage by the clock hour (keyed by the address's and IP's keyed hashes), so an eviction doesn't reset them; sign-in attempts 10 in 10 minutes per IP; 30 account requests a minute per IP (Workers rate limiting); 10 passkeys and 50 Macs per account (a 51st is refused; a Mac joining again replaces its own entry). Expired entries are swept by the object's alarm, 128 keys per kind at a time, never during a request.
160
175
 
161
176
  ### A new browser without the key
162
177
 
@@ -172,7 +187,7 @@ Everything the relay lists is its word, so the Mac pins what it saw in step 2: t
172
187
 
173
188
  ### What the relay sees and keeps, for accounts
174
189
 
175
- - **Keeps:** the email hash, the account id, the hash of AK's proof, passkey ids and public keys and sign counts, AK wrapped under each PRF passkey, the sealed keyring and its version, the hashes of member Macs' account secrets and their machine ids, when sessions were last ended, and for 15 minutes, 30 days, 5 minutes and 10 minutes the hashes of link tokens, sessions, used challenges and approval requests.
190
+ - **Keeps:** the email hash, the account id, the hash of AK's proof, passkey ids and public keys and sign counts, AK wrapped under each PRF passkey, the sealed keyring and its version, the hashes of member Macs' account secrets and their machine ids, when sessions were last ended, whether email may sign in, and for 10 minutes, 30 days, 5 minutes and 10 minutes the hashes of link tokens and codes (with their request ids' hashes), sessions, used challenges and approval requests.
176
191
  - **Sees in transit:** the email address while it sends the link (TLS ends at Cloudflare), the link and session tokens, the public keys and commitments of approvals, IPs and times, and the size of the keyring.
177
192
  - **Never sees:** AK, a PRF output, the keyring's contents (which Macs, their keys, the device key), or any frame between a browser and a Mac.
178
193
  - **Can infer:** which Macs a signed-in browser then opens, from timing and IP, since those WebSockets carry no session.
@@ -183,8 +198,8 @@ Everything the relay lists is its word, so the Mac pins what it saw in step 2: t
183
198
  - **The code index is one place every bare-host sign-in goes through.** It holds only code hashes and machine ids, and only for ten minutes, but it's a single object: a big enough flood can slow it, and while the global budget is spent, a person who mistypes their code has to wait a minute to try again (their first try always gets through). The per-machine URL, `https://mcp.dibs.cc/<machine id>/mcp`, doesn't use the index at all.
184
199
  - **The relay holds one secret, `REG_SECRET`.** It signs bare-host client ids and nothing else. Whoever has it can mint a client id with any redirect, which is no more than anyone can do by registering; it can't sign anyone in, since that still takes the person's code.
185
200
  - **An account is as safe as its key.** Whoever holds AK opens every Mac of the account (as the account device). It's in each signed-in browser's IndexedDB, on each member Mac, and wrapped under each PRF passkey. A stolen synced passkey with PRF, or a browser profile, gives it; so does a person approving the wrong browser at a Mac (the code is there to stop that). `dibs connect --remove <id>` takes a Mac off the account (its account device and key go); signing out clears a browser. There is no way yet to change AK without starting a new account.
186
- - **Email is only as safe as the inbox.** A sign-in link gives a session, not AK, so a stolen inbox alone opens no Mac and changes nothing on the account; it can still ask a Mac for approval, which is why both codes must match.
187
- - **Turnstile runs Cloudflare's script on mcp.dibs.cc/email.** It sees the address typed there and could, if changed, send it elsewhere or ask for links; it can't reach app.dibs.cc's storage or AK, and mcp.dibs.cc keeps nothing in the browser.
201
+ - **Email is only as safe as the inbox.** A sign-in code or link gives a session, not AK, so a stolen inbox alone opens no Mac and changes nothing on the account; it can still ask a Mac for approval, which is why both codes must match.
202
+ - **Turnstile runs Cloudflare's script on human.dibs.cc.** It never sees the address (that's typed on app.dibs.cc and sent from there), and it can't reach app.dibs.cc's storage or AK, or act as mcp.dibs.cc. If changed, it could hand the account page a bad token (the relay refuses it) or none (no code gets sent, passkeys still work).
188
203
  - **The account's first write sets its proof.** Whoever writes the keyring first sets it. That's the browser that made the account, at once; an attacker would need the account's first sign-in link before the person used it. An account that got a keyring before proofs existed (2026-11-02, before the accounts CLI shipped, so with no Mac on it) takes no first proof from anyone and can't be changed.
189
204
  - **The relay sees remote MCP traffic in transit.** With `dibs relay mcp on`, whatever an MCP client reads (the board, agents' posts and tasks, stats) passes through Cloudflare decrypted, as do the sign-in codes and OAuth tokens on their way. It's never stored, but whoever controls the relay could read or change it, or keep a token and use it until it expires (access tokens last a day) or is revoked. Changing it can't do more than that client's code allowed: read, or with `dibs pair --allow-actions`, act as its `mcp-` agent. `queue_run` never goes through the relay. The page's own channel isn't affected. Leave remote MCP off unless a client elsewhere needs it.
190
205
  - **The relay sees each tab's relay token.** A tab presents it so the relay can admit it; the relay keeps only hashes (in the Mac socket's state, gone when it disconnects). The token grants a tab slot and nothing else: it opens no session and decrypts nothing. Someone who steals it from the browser can occupy one of that device's slots until it's revoked.
package/docs/releasing.md CHANGED
@@ -7,12 +7,13 @@ How a version reaches people: dibs.cc, npm, GitHub and the plugin marketplaces.
7
7
  | where | what | how people get it |
8
8
  |---|---|---|
9
9
  | `https://dibs.cc/install.sh` | install.sh with the release's sha256 written in | `curl -fsSL https://dibs.cc/install.sh \| sh` |
10
- | `https://dibs.cc/releases/` | `dibs-vX.tar.gz`, `dibs-vX.tar.gz.sha256`, `install-vX.sh` | install.sh downloads the tarball and always checks its sum |
10
+ | `https://dibs.cc/install.ps1` | install.ps1, the same for native Windows | `irm https://dibs.cc/install.ps1 \| iex` |
11
+ | `https://dibs.cc/releases/` | `dibs-vX.tar.gz`, `dibs-vX.tar.gz.sha256`, `install-vX.sh`, `install-vX.ps1` | install.sh and install.ps1 download the tarball and always check its sum |
11
12
  | `https://dibs.cc/mac/` | the signed, notarized `dibs-X.dmg` and `latest.json` | `/mac/` redirects to the newest DMG; the app checks `latest.json` daily |
12
13
  | npm | `@dibssoftware/dibs` | `npm i -g @dibssoftware/dibs` |
13
14
  | GitHub | the tag, and a release with GitHub's own tarball (`.github/workflows/release.yml`) | the repo, and the Claude Code and Codex plugin marketplaces |
14
15
 
15
- The dibs.cc files live in the R2 bucket `dibs-releases`; the `dibs-waitlist` Worker serves `/install.sh`, `/releases/*` and `/mac/*` from it.
16
+ The dibs.cc files live in the R2 bucket `dibs-releases`; the `dibs-waitlist` Worker serves `/install.sh`, `/install.ps1`, `/releases/*` and `/mac/*` from it.
16
17
 
17
18
  ## Steps
18
19
 
@@ -20,7 +21,7 @@ From the public repo, after the AGENTS.md steps and with the version bumped ever
20
21
 
21
22
  1. Each change in the release lands in the public repo as a commit of its own, with its own message, authored and committed by `dibs maintainers <licensing@dibs.cc>`. Never one squashed commit per release, and never a rewrite of what's already public. `release.sh` refuses a tag with any other author since the last tag.
22
23
  2. `git tag vX && git push origin main vX`. The release workflow runs the suite on macOS and Linux, makes the GitHub release, and publishes `@dibssoftware/dibs` to npm through trusted publishing: no npm token anywhere, and npm shows the package's provenance as that workflow run. package.json has no dependencies and no scripts, so nothing runs on anyone's machine at install.
23
- 3. `sh release.sh` uploads the tarball, its sum and install.sh to dibs.cc, then downloads each back and compares bytes. `DIBS_DRY_RUN=1` builds and checks without uploading.
24
+ 3. `sh release.sh` uploads the tarball, its sum, install.sh and install.ps1 to dibs.cc, then downloads each back and compares bytes. `DIBS_DRY_RUN=1` builds and checks without uploading.
24
25
  4. The Mac app: `dibs run xcode-build -m "mac release" -- app/release.sh`, then `sh release.sh --mac` to upload the DMG and, last, `latest.json`.
25
26
  5. Plugin users get the new version once the `version` in `.claude-plugin/plugin.json` changes and their marketplace refreshes (`claude plugin marketplace update dibs`).
26
27
 
@@ -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. 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 and runs inside your own hold included. The machine isn't short on memory right now: while the OS reports memory pressure at warning or critical, or swap is over `maxSwap` (4G), grew by more than 512 MB in the last 5 minutes and is still growing over the last minute and a half, work below `urgent` waits while anything else is running. The OS's free-memory reading counts compressed and cached memory as free and can say 60% while the Mac pages gigabytes to disk, and on macOS swap grows on the startup disk. Swap alone doesn't count: macOS keeps it allocated for hours after a crunch ends. dibs keeps a swap reading every 30 seconds in `~/.dibs/swap.json` to see the growth. With nothing else running, one job starts, since waiting can't help then. `"maxSwap": null` turns the swap check off; memory pressure still counts. Swap needs free disk to grow into, so while swap is growing or memory pressure is above normal, work below `urgent` also keeps `swapRoom` (3G) free on top of what it needs (8 GB with the stock `minDisk`), and while free disk falls more than 3 GB in 5 minutes, fast enough to be under that within 10 minutes, it waits for it to hold steady (a disk with plenty free that two builds are writing to holds nobody up); in both cases one job still starts with nothing else running. If the swap, pressure and disk-for-swap waits keep every job out for 10 minutes, counting only starts that went through them (not runs inside your own hold, not urgent work), the smallest and shortest waiter they hold back starts anyway, one at a time until its memory has held steady for 2 minutes, while free disk is over `minDisk` and pressure isn't critical. `"swapRoom": null` turns the room off, and `"minDisk": null` the floor. For jobs of 2 GB or more, the OS also reports at least 15% of memory free. If free disk can't be read, the board says `disk unknown` and `dibs run` says the disk check is off.
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.
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).
@@ -37,7 +37,7 @@ Run times come from history (the median of the last 10 runs of the same command
37
37
  - **Something always runs.** dibs never leaves every job paused. Each pause it makes on its own (for urgent work, memory pressure or low disk) is refused if it would leave no job running, counting a run nested in a paused one as paused too. If every running job is paused anyway, because the one still going ended, the next dibs call that changes the state (and the watcher every 10 seconds) resumes the paused job closest to done, and `~/.dibs/cool.log` says so. dibs also never pauses a job about to finish: under 2 minutes left, or in the last tenth of its usual run. With nothing running at all, a small job (2 GB or less) that's urgent or known to take under 2 minutes may start past memory the paused jobs and idle holds still book, unless memory pressure is critical. Only the person's own `dibs pause` may leave every job paused. A job dibs stops and requeues for the disk (below) isn't paused: it gives back all its memory, so stopping it may leave nothing running, and that's meant.
38
38
  - **Agents know each other by name.** dibs reads the Claude session name from `~/.claude/sessions`, the same name `SendMessage` uses.
39
39
 
40
- Exit codes: the command's own, or 75 gave up waiting in line (not a failure: the command never started), 1 nothing matched (`mine`, `release`), 74 not enough disk with nothing running that would free it, 76 lost the coordinator or the other machine before a remote job started (safe to send again), 77 lost it after the job started (it may have run: check first), 127 the command didn't start, 2 bad usage (including a resource name close to a real one, an agent's high or urgent `dibs boost` without `-m`, and a `dibs run` you already have waiting or running), 70 dibs itself crashed (a bug in dibs; report it with `dibs ask`).
40
+ Exit codes: the command's own, or 75 gave up waiting in line (not a failure: the command never started), 1 nothing matched (`mine`, `release`), 74 not enough disk (the run needs more than the whole disk, or the wait limit ran out while disk held it; low disk is otherwise a wait), 76 lost the coordinator or the other machine before a remote job started (safe to send again), 77 lost it after the job started (it may have run: check first), 127 the command didn't start, 2 bad usage (including a resource name close to a real one, an agent's high or urgent `dibs boost` without `-m`, and a `dibs run` you already have waiting or running), 70 dibs itself crashed (a bug in dibs; report it with `dibs ask`).
41
41
 
42
42
  ## Measuring what jobs use
43
43
 
@@ -82,7 +82,7 @@ A profile sets `res` (one name, a comma list or an array), `ports`, `mem`, `cpu`
82
82
  Anyone may `dibs boost`, `pause`, `resume`, `stop` and `cap` any job: the person, or any agent, its own session's work or another's. Each change is kept on the job with who made it (`owner.by`, the pause's `by`, `stopBy`; none means the person), shown on the board (`[boosted by web-app: release blocked]`, `[paused by web-app]`) and logged in `dibs history` as an `override` event with `by` and `byAgent`.
83
83
 
84
84
  - An agent raising a job to `high` or `urgent` passes `-m`, as it does on `dibs run -p`, so everyone sees why.
85
- - An agent's urgent gets what the person's does: past the swap and disk-room waits (only urgent work starts during those), past paused jobs' booked memory, and pausing low runs for a slot. The hard limits hold for everyone: below `minDisk` nothing starts, the memory budget holds unless the machine really has room, critical memory pressure stops the small-job exceptions, and dibs never pauses every job on its own.
85
+ - An agent's urgent gets what the person's does: past the swap and disk-room waits (only urgent work starts during those), past paused jobs' booked memory, and pausing low runs for a slot. The hard limits hold for everyone: below `minDisk` nothing starts but jobs that write next to nothing, the memory budget holds unless the machine really has room, critical memory pressure stops the small-job exceptions, and dibs never pauses every job on its own.
86
86
  - A job that was stopped tells its agent who stopped it and to find out why before running it again.
87
87
 
88
88
  ## Pausing low-priority work
@@ -0,0 +1,14 @@
1
+ # dibs on Windows
2
+
3
+ dibs works on Windows, with gaps. The full test suite runs on windows-latest in CI on every change; the tests that can't run there say why (`posixOnly` and `windowsGap` in test/helpers.mjs).
4
+
5
+ Install from PowerShell with `install.ps1`, or use WSL, where dibs is the Linux one and `install.sh` works as on any Linux machine (with a Linux Node inside WSL). Claude Code on Windows runs its commands in Git Bash, so `install.ps1` puts a `dibs` for Git Bash beside `dibs.cmd`.
6
+
7
+ ## What's missing
8
+
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
+ - **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
+ - **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
+ - **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.** 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.179",
3
+ "version": "0.0.181",
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": {