@dibssoftware/dibs 0.0.178 → 0.0.179
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +48 -197
- package/bin/dibs.mjs +46 -24
- package/docs/machines.md +1 -1
- package/docs/questions.md +1 -1
- package/docs/reference.md +157 -0
- package/docs/releasing.md +8 -6
- package/docs/scheduling.md +2 -2
- package/package.json +2 -1
- package/skills/dibs/SKILL.md +104 -83
- package/src/acquire.mjs +11 -8
- package/src/alerts.mjs +100 -38
- package/src/answers.mjs +2 -2
- package/src/board.mjs +2 -2
- package/src/commands.mjs +14 -5
- package/src/config.mjs +6 -2
- package/src/diskwarn.mjs +28 -35
- package/src/events.mjs +3 -1
- package/src/files.mjs +27 -4
- package/src/guard.mjs +31 -1
- package/src/hogs.mjs +18 -5
- package/src/news.mjs +101 -0
- package/src/notes.mjs +171 -0
- package/src/notices.mjs +52 -13
- package/src/ondemand.mjs +1 -1
- package/src/override.mjs +22 -13
- package/src/plain.mjs +5 -2
- package/src/preempt.mjs +3 -3
- package/src/primer.mjs +43 -15
- package/src/proc.mjs +4 -3
- package/src/progress.mjs +33 -4
- package/src/schedule.mjs +46 -21
- package/src/serve.mjs +6 -0
- package/src/talk.mjs +199 -20
- package/src/version.mjs +1 -1
- package/src/web.mjs +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
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.179
|
|
6
|
+
- 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
|
+
- 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.
|
|
8
|
+
- A failed job leaves the plain board after 30 minutes, and a job stopped on purpose never shows there. A message handed over as you stop now arrives as hook feedback, not as a "Stop hook blocking error".
|
|
9
|
+
- New for the person: the page's Schedule gives jobs that ran at once lanes of their own instead of drawing one bar over another, and merges one agent's back-to-back runs into one bar.
|
|
10
|
+
- A job sent `--on` an on-demand machine that dibs already knows can't wake runs on the machine that sent it, saying why, instead of being refused; before, the answer depended on which side of the check it landed.
|
|
11
|
+
- Start `dibs listen` with run_in_background now, and keep it armed: start it again every time it exits. Its exit wakes you, even while you sit idle waiting on others, when a message, an answer in words or a notice about your jobs arrives (it prints everything queued at that moment), when dibs on this machine is updated (it prints what changed for you), or when a newer dibs is out (the person upgrades with `curl -fsSL https://dibs.cc/install.sh | sh`; don't upgrade it yourself). Without it, a message waits for a tool call you'll never make. Exit 3 means nothing came in 60 minutes (`--for 30m` sets it): start it again. Messages that arrive while you work still come with your next tool call; none is lost or handed over twice. One per agent; a newer one replaces the old. If you end a turn after yours ended without starting it again, the hook keeps you going once to do it. The board and `dibs tell` say who is listening.
|
|
12
|
+
- `dibs tell <name>` reaches the running session with that name, the most recently active one if two share it, never an old thread or a dead session that had it. It now says when that agent is idle and not listening: it won't see the message until it next works.
|
|
13
|
+
- `dibs boost <id> -m "why"` with no priority now means high (it said so on stderr) instead of a usage error, and the priority may come before the id. With no priority and no reason, dibs says what's missing. `dibs help` now lists `tell` and `boost`.
|
|
14
|
+
- `dibs say --to <agent> "..."` now sends that agent a message, the same as `dibs tell <agent> "..."`, instead of exiting 2. `--to person` is still the desk's reply to the person.
|
|
15
|
+
- `dibs progress list` shows your session's open tasks (every agent in it): owner, state, ETA and last post. `--all` for every session's, `--json` for data. Close one with `--done`, as before.
|
|
16
|
+
- A job paused for low disk (or for someone's urgent work, or by hand) now says plainly what happened: its processes were stopped and continue where they were when it resumes; a request waiting on a server meanwhile may have timed out on the far side, so check its output for timeouts.
|
|
17
|
+
- In your own session's scratchpad, the hook now lets you delete cache and build folders (Cache, Code Cache, GPUCache, DerivedData, .build, build, dist, .next, .turbo, .cache, node_modules/.cache) whoever made them, and lets the main thread delete what a subagent made once that subagent has finished. Other sessions' folders are still off limits.
|
|
18
|
+
- What every agent is told first is now short: what to wrap, what needs no dibs (long jobs that mostly wait on the network and use little CPU, memory or disk: crawlers, pollers, HTTP checks; the hook leaves them alone too), `dibs listen`, keep waiting on memory and disk, exit 75 and 74, ask only before what you can't undo, post progress. Everything else (holds, file leases, every exit code, other machines, later, questions, the page and MCP) is reference in the dibs skill and dibs.md under "When you need it". Read it there when you need it.
|
|
19
|
+
- dibs now leaves its instructions where you look first: the install writes `dibs.md` (the same text as the dibs skill) into the folder dibs is installed in, and adds a short note between `<!-- dibs:start -->` and `<!-- dibs:end -->` to `~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md` and the current repo's `CLAUDE.md` and `AGENTS.md`, pointing at it. If you see that note, read the dibs.md it names before builds, tests, simulators or deploys. Don't edit between the markers: every upgrade rewrites those lines. `dibs init` writes them by hand, `dibs init --repo` also adds the note to a repo with no CLAUDE.md, `dibs init --remove` takes them out.
|
|
20
|
+
- The quick lane: a command that runs in under 15 seconds starts at once. Wrap it with `--quick` (or pass `--est 10s`) the first time; after that dibs knows from its runs. It goes past the line, full test or browser slots, high (not critical) memory pressure, swap and the load cool-down; the disk floor, critical pressure, file holds and other agents' holds still stop it. On the simulator it goes to the front of the line rather than alongside; a quick deploy starts beside another repo's deploy, and goes to the front behind its own repo's. At most 2 run at once, and they never pause anyone. The board shows them as quick. A run that takes longer loses the pass until it runs under 15 s again, and dibs tells you: don't put `--quick` on anything longer.
|
|
21
|
+
|
|
5
22
|
## 0.0.178
|
|
6
23
|
- Deploys are one at a time per project now, not per machine. A deploy from another repo starts beside one that's running (up to 3 projects at once); a second deploy of the same repo still waits its turn. The project is the repo's origin URL (the same in every clone and worktree), or the folder outside git. Keep wrapping deploys in `dibs run deploy`: nobody needs to go around dibs for a quick deploy stuck behind another project's long upload.
|
|
7
24
|
- dibs says out loud what goes wrong, to the person, not only to the agent whose job it is: the board, `dibs --json` (`alerts`), the dibs page and the Mac app (with a notification, at most one per cause every 30 minutes) show each problem with its cause and the one fix, until it resolves, then when it did. `dibs alerts` lists them; `dibs alerts dismiss <id>` closes one for a day. The causes: a job waiting past 10 minutes and three times its usual wait (worst when it's high, urgent or has `--by`), memory pressure or swap holding jobs back for 10 minutes (with the five biggest memory users on the machine, apps dibs didn't start included, and what to close), a slot held by a job that has used no CPU for 20 minutes while others wait, jobs that failed, were stopped, or were lost on another machine (exit 76 or 77), dibs's own crashes (exit 70), a service that's down or that launchd restarted, the Claude Code hook failing, and free disk under the floor. Nothing for you to do, except: don't dismiss alerts the person should see.
|
package/README.md
CHANGED
|
@@ -1,235 +1,86 @@
|
|
|
1
1
|
# dibs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Air traffic control for your coding agents.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
You run several AI coding agents at once (Claude Code, Codex, Cursor, Gemini CLI) on one computer. They don't know about each other. One reinstalls an app in the iPhone simulator while another is halfway through testing it, and four builds at once run the machine out of memory. dibs makes them take turns on the things only one of them can use at a time, lets them message each other and you, and only asks you the questions that can't be undone.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<picture>
|
|
8
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/dibs-page-dark.png">
|
|
9
|
+
<img alt="The dibs page: every agent's running and waiting jobs, their progress posts, and what needs you" src="https://raw.githubusercontent.com/dibssoftware/dibs/main/docs/images/dibs-page.png">
|
|
10
|
+
</picture>
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
## Install
|
|
10
13
|
|
|
11
14
|
```bash
|
|
12
|
-
curl -fsSL https://dibs.cc/install.sh | sh
|
|
15
|
+
curl -fsSL https://dibs.cc/install.sh | sh # or: npm i -g @dibssoftware/dibs
|
|
16
|
+
dibs guard install # Claude Code agents use dibs without being told
|
|
13
17
|
```
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
macOS and Linux, with Node 22.23.4 or newer. No sudo and no dependencies. The install also tells your agents dibs is there: it writes their instructions to `~/.dibs-cli/dibs.md` and adds a short note pointing at it to `~/.claude/CLAUDE.md` and Codex's `AGENTS.md`.
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
## What your agents do with it
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
An agent puts `dibs run` in front of anything that would collide. It waits for its turn and hands it on the moment the command ends, however it ends. Everything else still runs at once.
|
|
20
24
|
|
|
21
25
|
```bash
|
|
22
|
-
dibs run
|
|
23
|
-
dibs run
|
|
24
|
-
dibs
|
|
25
|
-
dibs
|
|
26
|
-
dibs
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
The board reads like this:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
2 running, 1 waiting. Next up: api-refactor for the simulator, as soon as ios-checkout finishes.
|
|
33
|
-
|
|
34
|
-
Simulator ios-checkout has reserved it, up to 15 min left
|
|
35
|
-
Next: api-refactor
|
|
36
|
-
Xcode builds web-app is building, about 1 min left
|
|
37
|
-
Free Private simulators, Browser tests, Test runs, Deploys, Heavy jobs
|
|
38
|
-
|
|
39
|
-
This machine quiet: 42% of memory free, 31 GB of disk free
|
|
26
|
+
dibs run test -- npm test # wait for a turn at the test runner, then run the tests
|
|
27
|
+
dibs run sim -- ./ui-test.sh # the iPhone simulator, one agent at a time
|
|
28
|
+
dibs # the board: who has what, who's next, how much memory is left
|
|
29
|
+
dibs tell web-app "use the staging database" # a message that reaches that agent on its next step
|
|
30
|
+
dibs question "Ship build 123?" --options yes,no --recommend yes --one-way "testers get it at once"
|
|
40
31
|
```
|
|
41
32
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
## Who goes next
|
|
33
|
+
The last line is the only kind of question that reaches you. Agents decide anything that can be undone themselves, and dibs keeps a record of who did what.
|
|
45
34
|
|
|
46
|
-
|
|
35
|
+
With `dibs guard install`, an agent that forgets gets turned away with the exact `dibs run` line to use instead. Nothing is approved on your behalf.
|
|
47
36
|
|
|
48
|
-
|
|
37
|
+
## What you get
|
|
49
38
|
|
|
50
|
-
**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
dibs
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/plugin marketplace add dibssoftware/dibs
|
|
60
|
-
/plugin install dibs@dibs
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
The guard rewrites a bare `xcodebuild` or `npm test` into `dibs run ...` only in bypass-permissions sessions, where the agent already runs everything without asking. In every other session it blocks the command and tells the agent the exact `dibs run` line to use, so the retry goes through your normal permission prompt. It never approves anything for you, and if it can't parse a command or hits an error, it lets the command through. The same hook turns away edits to files another agent has leased, starts each new session and subagent with a few lines on how to use dibs, and hands each agent your messages and dibs's notices about its own jobs (one looks stuck, used far more memory than it asked for, or was paused) on its next tool call. If you set `agents.slots` in `~/.dibs/config.json`, it also caps how many subagents run at once across every session; there's no cap until you do. Details: [docs/guard.md](docs/guard.md).
|
|
64
|
-
|
|
65
|
-
If you run one agent at a time, you don't need this.
|
|
66
|
-
|
|
67
|
-
**Upgrade** by running the install line again. It swaps `~/.dibs-cli` in one step, and your queue and settings in `~/.dibs` stay. Then `dibs guard install` again, from Terminal, so the hook has every event the new version listens to. A plugin install updates with `claude plugin update dibs@dibs` in Terminal, or in Claude Code from `/plugin`, Installed, dibs, Update now. Run `/reload-plugins` to load it in a session that's already open.
|
|
68
|
-
|
|
69
|
-
**Uninstall**, from Terminal:
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
dibs guard remove # or claude plugin uninstall dibs@dibs for a plugin install
|
|
73
|
-
dibs service remove serve worker throttle # only if you installed services
|
|
74
|
-
rm -rf ~/.dibs-cli ~/.local/bin/dibs ~/.dibs # ~/.dibs is the queue, history and settings
|
|
75
|
-
```
|
|
39
|
+
- **The board.** Plain `dibs` says who has what and who's next, in sentences.
|
|
40
|
+
- **A page for you.** Every agent's jobs, progress posts, questions and alerts, live, at `http://127.0.0.1:7421` (`dibs web`). You can move a job up, pause, resume or stop it from there.
|
|
41
|
+
- **On your phone.** `dibs connect` opens the same page on a phone or any browser, end to end encrypted, or through a dibs account that sees all your machines.
|
|
42
|
+
- **Messages.** One thread per agent. You write to an agent and it reads it on its next step; agents write to each other the same way. `dibs listen` wakes an idle agent the moment a message arrives.
|
|
43
|
+
- **Questions only when it can't be undone.** An agent asks with its recommendation and keeps working. You answer from the page, the Mac app or the terminal.
|
|
44
|
+
- **Alerts with the fix.** When something goes wrong (a long wait, a stuck job, memory holding work back, a full disk), dibs says what and the one thing to do about it.
|
|
45
|
+
- **Your own Claude can see it.** The page is also an MCP server, so you can ask Claude "what are my agents doing?".
|
|
46
|
+
- **More than one machine.** Add another computer with `dibs connect --machine`, and agents send work to whichever machine is free.
|
|
47
|
+
- **A Mac app.** The board in your menu bar: [dibs.cc/mac](https://dibs.cc/mac).
|
|
76
48
|
|
|
77
|
-
##
|
|
78
|
-
|
|
79
|
-
Paste this into your `CLAUDE.md` or `AGENTS.md` (the Claude Code plugin ships the same thing as a skill):
|
|
80
|
-
|
|
81
|
-
```markdown
|
|
82
|
-
## dibs (shared machine resources)
|
|
83
|
-
Other agents share this machine. Wrap anything that collides in dibs; plain reads, edits and small commands need nothing.
|
|
84
|
-
- `dibs run <resource> -m "why" -- <cmd>`: `test` (`npm test`, vitest, `node --test`), `xcode-build`, `sim` (the shared simulator), `sim-own` (a private one, udid in `$SIM`: `sh -c '... "$SIM"'`), `playwright --port WEB` (use `$WEB`), `deploy`, `heavy`. Need two? `dibs run sim,xcode-build -- <cmd>`, never one while holding the other.
|
|
85
|
-
- Across several tool calls: `dibs hold sim --for 20m -m "why"`, keep wrapping each command in `dibs run sim -- ...` (it starts at once under your hold), and `dibs release sim` when done.
|
|
86
|
-
- In Claude Code a `dibs run` waits as long as it takes. A tool call that moved to the background is still waiting: don't run it again (dibs refuses the copy, exit 2).
|
|
87
|
-
- Before editing files other agents may touch: `dibs hold 'files:src/auth/**' -m "why"` (from the git root; quote the glob). If your edit is refused, wait or message the holder; don't write the file another way.
|
|
88
|
-
- Post progress as often as you commit: `dibs progress "what you just did or found, with numbers" --task <name> --eta 30m`, then `--blocked` or `--done`. The person reads it live. An overdue task gets you a notice: post a new `--eta` or `--done`.
|
|
89
|
-
- Decide two-way doors yourself. Ask the person only what can't be undone: `dibs question "Delete the old bucket?" --options yes,no --recommend yes -m "nothing reads it" --one-way "the 4,210 files are gone for good"`, keep working, then the same command with `--wait` prints only the answer. Exit 75 there means no answer: don't do the step.
|
|
90
|
-
- `dibs say "done: tests pass"` leaves the person an FYI. A line starting `Message from the person:` is really theirs: act on it, and reply with `dibs say`.
|
|
91
|
-
- A wait on memory, swap or disk protects the machine: keep waiting, never lower `--mem` or raise `-p` to get past it. A line from dibs about one of your jobs (stuck, over its memory, paused, a task overdue) is about your own work: act on it.
|
|
92
|
-
- You may boost, pause, resume or stop any job (`--owner <its session>` when it isn't yours); dibs records who did it. Raise to high or urgent with `-m` only when a person is waiting now or something is broken. A job "stopped by" someone was ended on purpose: find out why before running it again.
|
|
93
|
-
- Other machines: `dibs run test --anywhere -- <cmd>` or `--on <machine>`. Later: `dibs later test --at 02:00 -m "why" -- <cmd>`.
|
|
94
|
-
- Exit codes: 75 gave up waiting, never ran (rerun the same command within 2 minutes), 74 not enough disk, 76 lost before it started (send again), 77 lost after it started (it may have run: check first), 70 dibs crashed.
|
|
95
|
-
- `dibs` shows the board, `dibs help all` every command. Something wrong with dibs: `dibs ask "..."`.
|
|
96
|
-
```
|
|
49
|
+
## Learn more
|
|
97
50
|
|
|
98
|
-
|
|
51
|
+
- [dibs.cc](https://dibs.cc)
|
|
52
|
+
- [docs/reference.md](docs/reference.md): every command, the rules to paste into your agents' instructions, exit codes, settings
|
|
53
|
+
- [docs/](docs/): how turns are decided, the guard, questions, scheduled runs, private simulators, file locks, more machines, the relay
|
|
99
54
|
|
|
100
|
-
|
|
101
|
-
dibs run sim,xcode-build -- ./build-and-install.sh # everything you need, at once
|
|
102
|
-
dibs run playwright --port WEB --port API -- npx playwright test # free ports in $WEB and $API
|
|
103
|
-
dibs run test -p high -m "release blocker" --by 23:30 -- npm test
|
|
104
|
-
dibs run test --after #42 -- npm run e2e # joins the line once your job #42 has ended
|
|
105
|
-
dibs hold sim --for 20m -m "screenshot pass" # across several tool calls; again to extend
|
|
106
|
-
dibs release sim
|
|
107
|
-
dibs hold 'files:src/auth/**' -m "auth refactor" # other agents' edits there are turned away
|
|
108
|
-
dibs run quota:asc --cost 3 -- ./upload.sh # share an API's rate limit between scripts
|
|
109
|
-
dibs when sim # when you'd get it, without joining the line
|
|
110
|
-
dibs who sim # who holds it, until when, who's next
|
|
111
|
-
dibs why # where you are, when you start, what you're waiting for (--detail: the math)
|
|
112
|
-
dibs mine sim # exit 0 if you hold it, 1 if not
|
|
113
|
-
dibs yield web-app # let another agent go first
|
|
114
|
-
dibs pace quiet # how hard dibs drives this machine: quiet, normal or max
|
|
115
|
-
dibs sims # the private simulator pool
|
|
116
|
-
dibs setup scratch # the admin commands for a capped scratch volume for build output (macOS)
|
|
117
|
-
dibs changes # what changed in recent versions
|
|
118
|
-
dibs question "Ship 123 now?" --options yes,no --recommend yes -m "tests pass" --one-way "testers get it at once" --wait # only one-way doors reach the person
|
|
119
|
-
dibs questions # what agents are asking you, with what they recommend; dibs answer <id> <option, or your own words>
|
|
120
|
-
dibs hours 09:00-23:00 # outside your hours, questions below urgent wait for the morning
|
|
121
|
-
dibs threads # one thread per agent: its notes and questions, your messages; dibs threads read <agent>
|
|
122
|
-
dibs tell web-app "use the staging database" # reaches the agent on its next tool call, or as it finishes its turn
|
|
123
|
-
dibs tell desk "why is my build waiting?" # the agent config.json names as "desk" answers you with dibs say --to person
|
|
124
|
-
dibs alerts # what's wrong and the one fix for each: long waits, memory holding work back (and what to close), stuck jobs, failed or lost jobs, dibs itself, a full disk
|
|
125
|
-
dibs alerts dismiss <id> # close one for a day; it comes back if its cause is still there
|
|
126
|
-
dibs history # the last 7 days: busy time, waits and who waited, by resource, agent and hour
|
|
127
|
-
dibs stats # waits against run times, today and the last 7 days: the share of jobs that waited longer than they ran
|
|
128
|
-
dibs stats --me # your own: jobs, run and wait time, failures by exit code, what held you back, top commands, ETAs met (--agent <name>, --since 30d, --json)
|
|
129
|
-
dibs later sim --at 02:00 -m "snapshot suite" -- ./snapshots.sh # run it tonight; returns at once with its id
|
|
130
|
-
dibs later test --after web-app:deploy -- npm run smoke # when that agent's deploy ends (--after-ok: only if it passed)
|
|
131
|
-
dibs later list # scheduled, waiting, running, and how the finished ones ended; dibs later cancel <id>
|
|
132
|
-
```
|
|
55
|
+
## Details
|
|
133
56
|
|
|
134
|
-
|
|
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`.
|
|
135
58
|
|
|
136
|
-
|
|
59
|
+
**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.
|
|
137
60
|
|
|
138
|
-
|
|
61
|
+
**Your agents' notes.** The install writes `~/.dibs-cli/dibs.md` (the agent instructions for this version) and a short marked note pointing at it to `~/.claude/CLAUDE.md`, to `~/.codex/AGENTS.md` if you use Codex, and to the `CLAUDE.md` and `AGENTS.md` of the git repo you ran it in, if those exist. The note sits between `<!-- dibs:start -->` and `<!-- dibs:end -->`, and an upgrade rewrites only those lines. `dibs init` does it by hand (`--repo` also makes this repo's `CLAUDE.md`), `dibs init --remove` takes it out, and `DIBS_NO_AGENT_NOTES=1` before the install line skips it.
|
|
139
62
|
|
|
140
|
-
|
|
141
|
-
{ "waits": "fat" }
|
|
142
|
-
```
|
|
63
|
+
**The Claude Code plugin.** Instead of `dibs guard install`, in a Claude Code session: `/plugin marketplace add dibssoftware/dibs`, then `/plugin install dibs@dibs`. Codex reads the same plugin ([docs/guard.md](docs/guard.md)).
|
|
143
64
|
|
|
144
|
-
|
|
65
|
+
**Upgrade** by running the install line again (or `npm i -g @dibssoftware/dibs`), then `dibs guard install` again. Your queue and settings in `~/.dibs` stay.
|
|
145
66
|
|
|
146
|
-
|
|
67
|
+
**Uninstall:**
|
|
147
68
|
|
|
148
69
|
```bash
|
|
149
|
-
dibs
|
|
150
|
-
dibs
|
|
70
|
+
dibs init --remove # dibs.md, and the dibs note in CLAUDE.md and AGENTS.md
|
|
71
|
+
dibs guard remove
|
|
72
|
+
dibs service remove serve worker throttle web # only the ones you installed
|
|
73
|
+
rm -rf ~/.dibs-cli ~/.local/bin/dibs ~/.dibs # ~/.dibs is the queue, history and settings
|
|
151
74
|
```
|
|
152
75
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
- **Now**: alerts first: anything wrong, why, and the one fix, until it resolves (then when it did). Then every agent's running and waiting jobs on a timeline that spans only the time something is in, file locks, tasks with their ETAs, and every `dibs progress` post, live. Click a job to make it go first, give it back its normal place, let others go first, pause, resume or stop it (stop asks twice). Pick an agent to hold all its jobs back (`dibs cap`).
|
|
156
|
-
- **Questions**: what agents asked you at one-way doors. Answer with an option or your own words, or say not now.
|
|
157
|
-
- **Messages**: one thread per agent. What you send reaches the agent with its next tool call.
|
|
158
|
-
- **Stats**: run and wait time by agent and by resource, how often jobs waited longer than they ran, failures by exit code, what held jobs back, top commands, ETAs met, a daily trend, a day-by-hour heatmap, and the machine's load, memory and disk over time. Agents get the same numbers from `dibs stats --me`.
|
|
159
|
-
- **Scheduled**: `dibs later` runs coming up and ended this week; cancel one.
|
|
160
|
-
- **History**: `dibs history` for the past day, week or 30 days, and every override with who made it.
|
|
161
|
-
- **Settings**: the speed (`dibs pace`), your hours, and the Claude Code hook.
|
|
162
|
-
|
|
163
|
-
Every change on the page runs the same CLI command you would, as you, so `dibs history` and the board name you, and the CLI's own rules apply. Changes need the page's sign-in; nothing else can make them.
|
|
164
|
-
|
|
165
|
-
The same server is an MCP server at `http://127.0.0.1:7421/mcp`, so your own Claude can answer "what are my agents doing?". Add it to Claude Code with `claude mcp add --transport http dibs http://127.0.0.1:7421/mcp`; the client opens a sign-in page in your browser, and you type a code from `dibs pair`. With a plain `dibs pair` code it gets read-only tools: `board`, `agents`, `agent`, `progress`, `stats`, `questions`, `history`, `resource`, `machines` and `messages`. A code from `dibs pair --allow-actions` adds tools that act: post progress, answer questions, message agents and you, hold and release, and boost, pause, resume and stop jobs. It acts as an agent named after the client (`mcp-<name>`), never as you, so agents treat its messages as a peer's. A model reads text agents wrote, and text can steer a model, so give actions only to a client you'd trust with them. A code from `dibs pair --allow-commands` also lets a client signed in here (never through mcp.dibs.cc) queue commands to run on this Mac with `queue_run`, the way `dibs later` does. `dibs pair --list` shows what's signed in and `dibs pair --revoke <id|all>` signs it out.
|
|
166
|
-
|
|
167
|
-
It answers only on 127.0.0.1 unless you pass `--bind <address>` (your Tailscale address, say), and only to requests that name that address, so a web page can't reach it by DNS rebinding. Codes and tokens are stored hashed in `~/.dibs/web.json`. After 10 wrong codes in 10 minutes every try is refused until the window passes; open codes stay good. To let claude.ai or another Claude account read your board, `dibs relay mcp on` serves it at `https://mcp.dibs.cc/mcp` through the relay (docs/relay.md).
|
|
168
|
-
|
|
169
|
-
## Mac app
|
|
170
|
-
|
|
171
|
-
`app/` builds a Mac app (macOS 26) over the same commands: the live board with boost, pause, stop and cap buttons, agents' questions to answer, the week's history, and the pace, in a window and the menu bar. It runs the `dibs` on your PATH and reads nothing else. A signed download will be at https://dibs.cc/mac/; until then, build it yourself. To build it yourself you need Xcode 26 and xcodegen (`brew install xcodegen`): [app/README.md](app/README.md) has the steps.
|
|
172
|
-
|
|
173
|
-
Priority is `-p urgent|high|normal|low|idle`. `urgent` and `high` need `-m` and everyone sees them. `low` and `idle` run at background priority, and may be paused while urgent work borrows their slot. `--est 5m` tells dibs how long a new job takes, so short jobs can move up. `--by 23:30` moves you up as a deadline gets close.
|
|
174
|
-
|
|
175
|
-
Agents show up by their Claude Code session name. Anywhere else, dibs names them after the folder they run in; set `DIBS_AGENT=name` to pick your own.
|
|
76
|
+
**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.
|
|
176
77
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
Agents branch on these, so they don't change.
|
|
180
|
-
|
|
181
|
-
| code | meaning |
|
|
182
|
-
|---|---|
|
|
183
|
-
| the command's own | it ran |
|
|
184
|
-
| 75 | dibs stopped waiting in line. The command never started and did not fail. Run the same command again within 2 minutes to keep your place. For `dibs question --wait`: no answer (timed out or dismissed), nothing was decided |
|
|
185
|
-
| 74 | not enough free disk, and nothing running would free it. Other sessions' `/private/tmp/claude-*` folders are off limits for making room |
|
|
186
|
-
| 76 | lost the coordinator or the other machine before a remote job started. Nothing ran there: sending it again is safe |
|
|
187
|
-
| 77 | lost the other machine after a remote job started. It may have run, or may still be running: check before running it again |
|
|
188
|
-
| 127 | the command didn't start |
|
|
189
|
-
| 2 | bad usage, a job asking more memory or cores than the machine ever hands out (it says the most it can ask), a resource name close to a real one (`simulator` for `sim`), an agent's high or urgent boost without `-m`, `--on` on a machine that isn't in a group, or a `dibs run` you already have waiting or running (wait for that one) |
|
|
190
|
-
| 1 | nothing matched: `mine` with nothing held (the clean result after a release), `release` with nothing to give back |
|
|
191
|
-
| 70 | dibs itself crashed: a bug in dibs, not your command. Report it with `dibs ask "..."`. If your command already ran, you get its code instead |
|
|
192
|
-
|
|
193
|
-
Inside Claude Code, `dibs run` waits as long as it takes: when the tool call hits its timeout, Claude Code moves it to the background and tells the agent when it ends. Everywhere else (Codex, scripts, a terminal) dibs gives up after 8 minutes with exit 75, which fits a 10-minute tool call. `--wait` lifts the limit, `--max-wait 20m` sets your own.
|
|
194
|
-
|
|
195
|
-
## Resources
|
|
196
|
-
|
|
197
|
-
| name | slots | memory | cores | free disk | pausable |
|
|
198
|
-
|---|---|---|---|---|---|
|
|
199
|
-
| sim | 1 | 3G | 1 | 8G | no |
|
|
200
|
-
| sim-own | 4 on 16 GB (RAM / 4G, at most 4), and only as many as free memory fits | 3G | 2 | 6G | no |
|
|
201
|
-
| xcode-build | 2 | 4G | 4 | 4G | no |
|
|
202
|
-
| playwright | 2 | 3G | 2 | 3G | yes |
|
|
203
|
-
| test | 3 | 2G | 3 | | yes |
|
|
204
|
-
| deploy | 1 per project (its repo's origin, or the folder outside git), up to 3 projects at once (`exclusiveBy: "repo"`, `across: 3`) | 0.5G | 1 | | no |
|
|
205
|
-
| heavy | 1 | 4G | 4 | 10G | yes |
|
|
206
|
-
| any other name | 1 | 1G | 1 | | no |
|
|
207
|
-
| `files:<path or glob>` | one holder per path | 0 | 0 | | no |
|
|
208
|
-
| `quota:<name>` | a token bucket from config | 0 | 0 | | no |
|
|
209
|
-
|
|
210
|
-
A name close to a real one (`simulator`, `tests`, `xcode`) is refused with exit 2 and the right name, since two agents slipping differently would both get the real thing at once. A name of your own that looks like none of them starts a queue of its own.
|
|
211
|
-
|
|
212
|
-
Running jobs share a budget of 8 GB and 6 cores while the machine is busy, so light jobs run side by side and heavy ones take turns. The cores count what running jobs are measured using, not what they asked for. dibs measures what each job really uses, failed and killed runs included, and plans the next run of the same command at that, when it's more than asked (a command it hasn't measured yet goes by the same program on the same resource, so a new Playwright spec starts at what the others used); `--mem` and `--cpu` say what you need up front. Override any of it in `~/.dibs/config.json`; you only need the keys you change. State lives in `~/.dibs`. A resource you make up can have a name people read on the board: `"resources": { "gpu": { "slots": 1, "label": "The GPU" } }` (a quota takes `"label"` too).
|
|
213
|
-
|
|
214
|
-
## More
|
|
215
|
-
|
|
216
|
-
- [docs/scheduling.md](docs/scheduling.md): how a turn is decided, what a lease guarantees, nested runs, measuring what jobs use, rate-limit quotas, pausing low-priority work, `dibs pace`, running jobs side by side, resetting a resource after each use, throttling
|
|
217
|
-
- [docs/files.md](docs/files.md): file leases, and which edits the guard turns away
|
|
218
|
-
- [docs/questions.md](docs/questions.md): agents queuing questions for the person, `--wait`, working hours
|
|
219
|
-
- [app/README.md](app/README.md): the Mac app
|
|
220
|
-
- [docs/simulators.md](docs/simulators.md): `sim-own`, the pool of private simulators
|
|
221
|
-
- [docs/guard.md](docs/guard.md): the hook, what it matches, the subagent limit, installing it for Claude Code and Codex, your own rules
|
|
222
|
-
- [docs/machines.md](docs/machines.md): sending jobs to other machines, adding one (`dibs pair --machine` on the coordinator, `dibs join <code>` on the new machine), tokens, and keeping a project's code on the machines you name
|
|
223
|
-
- [AGENTS.md](AGENTS.md): working on dibs itself
|
|
224
|
-
|
|
225
|
-
Platforms: CI runs the full suite on macOS and Ubuntu on every push. Linux uses the same code paths (`ps`, process groups, `/proc/pressure/memory`). Windows support exists and is untested.
|
|
78
|
+
**Platforms.** macOS and Linux run the full suite in CI on every push. Windows support exists and is untested.
|
|
226
79
|
|
|
227
80
|
## License
|
|
228
81
|
|
|
229
82
|
dibs is free to use, change and share under the [GNU Affero General Public License v3](LICENSE) (AGPL-3.0-only), at home or at work. If you ship a changed dibs, or run one for other people over a network, the AGPL says you share your changes under the same license.
|
|
230
83
|
|
|
231
|
-
If your company can't use AGPL software, or you want to build dibs into something you don't open source, a commercial license
|
|
232
|
-
|
|
233
|
-
## Contributing
|
|
84
|
+
If your company can't use AGPL software, or you want to build dibs into something you don't open source, buy a commercial license from Creayo LLC: licensing@dibs.cc.
|
|
234
85
|
|
|
235
|
-
|
|
86
|
+
Contributions are welcome: [CONTRIBUTING.md](CONTRIBUTING.md). Before your first pull request is merged you sign a contributor license agreement, which lets Creayo LLC offer your change under both licenses.
|
package/bin/dibs.mjs
CHANGED
|
@@ -12,13 +12,14 @@ import path from 'node:path';
|
|
|
12
12
|
import { fileURLToPath } from 'node:url';
|
|
13
13
|
import { loadConfig, paths, profiled } from '../src/config.mjs';
|
|
14
14
|
import { identity } from '../src/proc.mjs';
|
|
15
|
+
import { changelog, seenBy, markSeen, newer } from '../src/news.mjs';
|
|
15
16
|
import { PRIORITY_SHIFT, PRIORITIES, priority } from '../src/schedule.mjs';
|
|
16
17
|
import { VERSION } from '../src/version.mjs';
|
|
17
18
|
import { run, notifyOnExit, hold, release, when, why, mine, who, yieldTo, ask, requests, status, freePort, pace, checkNames, nearest } from '../src/commands.mjs';
|
|
18
19
|
import { remoteRun, join, machines } from '../src/remote.mjs';
|
|
19
20
|
import { sims } from '../src/simpool.mjs';
|
|
20
21
|
import { question, questions, answer, hoursCmd } from '../src/questions.mjs';
|
|
21
|
-
import { say, tell, threads, noticesFor } from '../src/talk.mjs';
|
|
22
|
+
import { say, tell, threads, noticesFor, listen } from '../src/talk.mjs';
|
|
22
23
|
import { bytes, ms, deadline, die, noSpace, fullDisk, setCaller, lastDie, lastDieCode } from '../src/util.mjs';
|
|
23
24
|
import { event } from '../src/events.mjs';
|
|
24
25
|
import { fileRes, isFiles, resList } from '../src/files.mjs';
|
|
@@ -41,6 +42,7 @@ Wait your turn
|
|
|
41
42
|
(no wait under your hold); give it back: dibs release sim
|
|
42
43
|
dibs hold 'files:src/auth/**' -m "why" keep other agents' edits off these files
|
|
43
44
|
dibs run test --anywhere -- <command> on whichever machine in the group starts it soonest (--on <machine>: that one)
|
|
45
|
+
dibs run deploy --quick -- ./ship.sh a command over in under 15 s starts at once (or --est 10s; dibs learns it after)
|
|
44
46
|
|
|
45
47
|
Tell the person
|
|
46
48
|
dibs progress "what you did or found" --task <name> --eta 30m as often as you commit; then --blocked or --done
|
|
@@ -48,6 +50,10 @@ Tell the person
|
|
|
48
50
|
only one-way doors reach the person; the same command plus --wait reads the answer
|
|
49
51
|
dibs say "done: tests pass" an FYI in your thread, no question
|
|
50
52
|
|
|
53
|
+
Other agents and their jobs
|
|
54
|
+
dibs tell <agent> "..." a message that reaches it with its next tool call (or dibs say --to <agent>)
|
|
55
|
+
dibs boost <id> high -m "why" move a job up (urgent|high|normal|low|idle); --owner <its session> if not yours
|
|
56
|
+
|
|
51
57
|
Look around
|
|
52
58
|
dibs what each resource is doing and who's next
|
|
53
59
|
dibs why where you are in the queue and what you're waiting for
|
|
@@ -58,6 +64,7 @@ Look around
|
|
|
58
64
|
Set up
|
|
59
65
|
dibs pace quiet|normal|max how hard dibs drives this machine
|
|
60
66
|
dibs guard install make Claude Code agents use dibs when they forget
|
|
67
|
+
dibs init point your agents' CLAUDE.md and AGENTS.md at dibs.md (install does it)
|
|
61
68
|
dibs machines other machines in the group
|
|
62
69
|
|
|
63
70
|
Priority: -p urgent|high|normal|low|idle (urgent and high need -m "why"). Due by a time: --by 23:30.
|
|
@@ -114,13 +121,15 @@ ask the person (one-way doors only)
|
|
|
114
121
|
dibs questions dismiss <id> dismiss one; its waiting agent gets exit 75
|
|
115
122
|
dibs hours [09:00-23:00|off] [--json] the person's hours: outside them, questions below urgent wait for morning
|
|
116
123
|
dibs say "..." [--as label] [--to person] an FYI to the person in your thread: progress, done, blocked on X.
|
|
117
|
-
--to person: a reply to what they said (the desk's answers)
|
|
124
|
+
--to person: a reply to what they said (the desk's answers); --to <agent>: a message to that agent,
|
|
125
|
+
the same as dibs tell
|
|
118
126
|
|
|
119
127
|
progress (post as often as you commit)
|
|
120
128
|
dibs progress "..." [--task <name>] [--eta 30m|17:30] [--done|--blocked]
|
|
121
129
|
what you just did, found or decided, in a sentence or a paragraph. The person
|
|
122
130
|
reads every post live; other agents read them too. Post at each step, not at the end
|
|
123
131
|
dibs progress [--agent <name>] [-n 50] [--json] recent posts
|
|
132
|
+
dibs progress list [--all] [--json] your session's open tasks (--all: every session's), owner, state, ETA, last post
|
|
124
133
|
|
|
125
134
|
the person's page and MCP server
|
|
126
135
|
dibs web [--port 7421] [--bind <address>] every agent's jobs, tasks and posts at http://127.0.0.1:7421, and the same as
|
|
@@ -152,6 +161,9 @@ talk with your agents
|
|
|
152
161
|
dibs tell <agent> "..." a message for that agent: it gets it with its next tool call, or as it
|
|
153
162
|
finishes its turn (needs dibs guard install). From an agent, it says which agent sent it
|
|
154
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
|
|
166
|
+
a session and again each time it exits: its exit wakes you even while idle
|
|
155
167
|
|
|
156
168
|
several machines
|
|
157
169
|
dibs run <res> --anywhere -- <cmd> run it on whichever machine would start it soonest (maybe this one)
|
|
@@ -191,6 +203,9 @@ other
|
|
|
191
203
|
dibs setup scratch [--size 40G] print the one-time commands for a capped volume for build output (--check: how full)
|
|
192
204
|
dibs changes what changed in recent versions
|
|
193
205
|
dibs guard install|remove|status|check a Claude Code hook that runs heavy commands through dibs when an agent forgets
|
|
206
|
+
dibs init [--repo] [--remove] write dibs.md (the agent instructions) and a note pointing at it in ~/.claude/CLAUDE.md,
|
|
207
|
+
~/.codex/AGENTS.md and this repo's CLAUDE.md and AGENTS.md (install does it; --repo makes
|
|
208
|
+
this repo's CLAUDE.md; --remove takes it all out; DIBS_NO_AGENT_NOTES=1 skips it)
|
|
194
209
|
|
|
195
210
|
flags
|
|
196
211
|
-m "why" shown to everyone (required with urgent and high)
|
|
@@ -203,6 +218,10 @@ flags
|
|
|
203
218
|
low and idle runs may be paused (not killed) for urgent or high work, or under memory pressure
|
|
204
219
|
--by 23:30|20m deadline: as it nears you move up the queue (up to an hour), and you're warned if it's at risk
|
|
205
220
|
--est 5m how long the job takes, when dibs has no history for it. Short jobs move up a little
|
|
221
|
+
--quick it takes under 15 s (quickUnder): it starts at once, past the line and full slots, at most 2 at a time.
|
|
222
|
+
On the simulator, or a deploy of the same repo, it goes to the front of the line instead. Trusted the
|
|
223
|
+
first time; a run that goes over loses the pass until it runs under again. A command dibs has seen run
|
|
224
|
+
under 15 s gets it without the flag
|
|
206
225
|
--cost 3 tokens a quota:<name> job takes from its bucket (default 1)
|
|
207
226
|
--mem 4G memory the job needs (default from the resource). dibs measures what it really uses
|
|
208
227
|
and plans the next run at that when it's more
|
|
@@ -241,7 +260,7 @@ same command again within 2 minutes to keep your place), 74 not enough disk,
|
|
|
241
260
|
76 lost the coordinator or the other machine before the job started (safe to send again),
|
|
242
261
|
77 lost it after the job started on another machine (it may have run: check before running it again),
|
|
243
262
|
127 command didn't start, 2 bad usage (also: you already have this exact command waiting or running),
|
|
244
|
-
1 nothing matched (mine, release), 70 dibs itself crashed (a bug in dibs; report it: dibs ask "...").
|
|
263
|
+
1 nothing matched (mine, release), 3 dibs listen heard nothing in time, 70 dibs itself crashed (a bug in dibs; report it: dibs ask "...").
|
|
245
264
|
A job sent to another machine takes the git working copy (tracked files plus new ones git doesn't ignore;
|
|
246
265
|
outside git, the folder minus build output). .env files, keys and certificates never leave this machine.
|
|
247
266
|
Config: ${paths.config}`;
|
|
@@ -256,6 +275,7 @@ function parse(argv) {
|
|
|
256
275
|
else if (a === '-p' || a === '--priority') { o.prio = priority(next()); if (!(o.prio in PRIORITY_SHIFT)) die(`priority is one of ${PRIORITIES.join(', ')} (or 1-5)`); }
|
|
257
276
|
else if (a === '--by') o.by = deadline(next());
|
|
258
277
|
else if (a === '--est') o.est = ms(next());
|
|
278
|
+
else if (a === '--quick') o.quick = true;
|
|
259
279
|
else if (a === '--cost') { o.cost = Number(next()); if (!(o.cost > 0)) die('--cost takes a number of tokens above 0'); }
|
|
260
280
|
else if (a === '--mem') o.mem = bytes(next());
|
|
261
281
|
else if (a === '--cpu') { o.cpu = Number(next()); if (!(o.cpu >= 0)) die('--cpu takes a number of cores'); }
|
|
@@ -295,14 +315,6 @@ function parse(argv) {
|
|
|
295
315
|
return o;
|
|
296
316
|
}
|
|
297
317
|
|
|
298
|
-
// The changelog's sections, newest first: [{ version, body }].
|
|
299
|
-
function changelog() {
|
|
300
|
-
try {
|
|
301
|
-
return fs.readFileSync(path.join(ROOT, 'CHANGELOG.md'), 'utf8').split(/^## /m).slice(1)
|
|
302
|
-
.map(sec => ({ version: sec.split(/\s/)[0], body: sec.slice(sec.indexOf('\n') + 1).trim() }));
|
|
303
|
-
} catch { return []; }
|
|
304
|
-
}
|
|
305
|
-
|
|
306
318
|
// The first time each agent session runs a new version, one line pointing at
|
|
307
319
|
// what changed. Only for an agent that ran an older one here: a brand-new
|
|
308
320
|
// install, or a session that never ran dibs before, has nothing to compare.
|
|
@@ -310,19 +322,26 @@ function changelog() {
|
|
|
310
322
|
function announce() {
|
|
311
323
|
const id = identity();
|
|
312
324
|
const key = String(id.spid || id.who);
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
try {
|
|
319
|
-
const tmp = `${paths.seen}.${process.pid}`;
|
|
320
|
-
fs.writeFileSync(tmp, JSON.stringify(seen));
|
|
321
|
-
fs.renameSync(tmp, paths.seen);
|
|
322
|
-
} catch {}
|
|
325
|
+
const before = seenBy(key);
|
|
326
|
+
// Already heard of this one, or of a newer one (a dibs listen told it of an update this older
|
|
327
|
+
// process hasn't been replaced by yet): nothing to say, and never move it back.
|
|
328
|
+
if (before === VERSION || (before && newer(before, VERSION))) return;
|
|
329
|
+
markSeen(key, VERSION);
|
|
323
330
|
if (before) process.stderr.write(`dibs was updated to ${VERSION}: see \`dibs changes\`\n`);
|
|
324
331
|
}
|
|
325
332
|
|
|
333
|
+
// An npm install has no install script (the package runs none, by design), so the first
|
|
334
|
+
// command after an install or upgrade writes dibs.md and the agents' notes (src/notes.mjs).
|
|
335
|
+
// Only from node_modules: a checkout or install.sh's folder has dibs init and install.sh.
|
|
336
|
+
async function npmNotes() {
|
|
337
|
+
if (!ROOT.split(path.sep).includes('node_modules')) return;
|
|
338
|
+
try {
|
|
339
|
+
const notes = await lazy('notes');
|
|
340
|
+
if (!notes.stale()) return;
|
|
341
|
+
for (const f of notes.write()) process.stderr.write(`dibs: wrote ${f}\n`);
|
|
342
|
+
} catch (e) { process.stderr.write(`dibs: couldn't write dibs.md or the agents' notes (${e.message}). dibs init tries again\n`); }
|
|
343
|
+
}
|
|
344
|
+
|
|
326
345
|
// A caller with no hook to hand it notices (outside Claude Code) gets them here.
|
|
327
346
|
function notices() {
|
|
328
347
|
if (process.env.CLAUDE_CODE_SESSION_ID) return;
|
|
@@ -334,8 +353,8 @@ function notices() {
|
|
|
334
353
|
const ALIASES = { done: 'release', renew: 'hold', news: 'changes', cool: 'throttle', ls: 'status', board: 'status' };
|
|
335
354
|
const VERBS = new Set(['run', 'hold', 'release', 'when', 'why', 'mine', 'who', 'yield', 'ask', 'requests', 'port', 'throttle', 'changes', 'status', 'help',
|
|
336
355
|
'machines', 'serve', 'join', 'leave', 'worker', 'service', 'invite', 'kick', 'limit', 'guard', 'sims', 'pace', 'setup', 'history', 'stats',
|
|
337
|
-
'question', 'questions', 'answer', 'hours', 'say', 'tell', 'threads', 'boost', 'pause', 'resume', 'stop', 'cap', 'later',
|
|
338
|
-
'progress', 'web', 'pair', 'relay', 'connect', 'alerts']);
|
|
356
|
+
'question', 'questions', 'answer', 'hours', 'say', 'tell', 'threads', 'listen', 'boost', 'pause', 'resume', 'stop', 'cap', 'later',
|
|
357
|
+
'progress', 'web', 'pair', 'relay', 'connect', 'alerts', 'init']);
|
|
339
358
|
|
|
340
359
|
// A job sent from another machine ends when the worker that started it does,
|
|
341
360
|
// even if the worker was killed outright and couldn't say so.
|
|
@@ -401,7 +420,8 @@ async function main() {
|
|
|
401
420
|
// Services, jobs sent from another machine and scheduled ones have nobody to read the notes.
|
|
402
421
|
// A thin waiter's turn has had them already, when it got in line.
|
|
403
422
|
const lease = argv.slice(0, argv.indexOf('--') >>> 0).includes('--lease');
|
|
404
|
-
if (!process.env.DIBS_REMOTE_JOB && !process.env.DIBS_LATER_JOB && !lease && !['serve', 'worker', 'service', 'relay'].includes(verb)) { announce(); notices(); }
|
|
423
|
+
if (!process.env.DIBS_REMOTE_JOB && !process.env.DIBS_LATER_JOB && !lease && !['serve', 'worker', 'service', 'relay', 'init'].includes(verb)) { announce(); notices(); }
|
|
424
|
+
if (verb !== 'init') await npmNotes();
|
|
405
425
|
// `dibs sim -- cmd` (no verb) means run; a bare `dibs` or `dibs --json` is the board.
|
|
406
426
|
// `dibs -m why sim -- cmd` is a run too: anything with a command after -- is.
|
|
407
427
|
if (!verb || (verb.startsWith('-') && verb !== '--' && !argv.includes('--'))) return status(parse(argv), cfg);
|
|
@@ -467,9 +487,11 @@ async function main() {
|
|
|
467
487
|
case 'web': return (await lazy('web')).web(rest);
|
|
468
488
|
case 'pair': return (await lazy('web')).pair(rest);
|
|
469
489
|
case 'connect': return (await lazy('connect')).connect(rest);
|
|
490
|
+
case 'init': return (await lazy('notes')).init(rest);
|
|
470
491
|
case 'relay': return (await lazy('relay')).relay(rest);
|
|
471
492
|
case 'tell': return tell(rest);
|
|
472
493
|
case 'threads': return threads(rest);
|
|
494
|
+
case 'listen': return listen(rest);
|
|
473
495
|
case 'boost': return boost(rest, cfg);
|
|
474
496
|
case 'pause': return pause(rest, cfg);
|
|
475
497
|
case 'resume': return resume(rest);
|
package/docs/machines.md
CHANGED
|
@@ -124,7 +124,7 @@ Jobs pack onto the VM while what's sent there fits its memory, less 1 GB. Jobs h
|
|
|
124
124
|
|
|
125
125
|
**Nothing kept.** Treat everything on the VM as gone after a stop: each job's copy there is deleted when the job ends, after `--bring` has sent back what you asked for. Node and dibs stay installed between wakes, since installing them again costs about 30 billed seconds. `.dibs.json` `stayOn` and machine limits apply as for any machine.
|
|
126
126
|
|
|
127
|
-
**When boat says no.** Before waking or making a VM, dibs reads `boat limits --json` (at most once a minute). With no starts left for the day or the hour, or `canStart` false, it doesn't try. A wake that fails anyway (a 429, say) is handled the same way: the jobs sent there go back to the machine that sent them when it takes jobs, and are lost (76) only when there's nowhere to go. The VM is marked `can't wake` with the reason and a time to try again: an hour for a quota or a 429, 5 minutes for anything else. Until then `dibs machines` shows `can't wake: <reason>`, `--anywhere` and jobs dibs ships on its own skip it, and `--on` it
|
|
127
|
+
**When boat says no.** Before waking or making a VM, dibs reads `boat limits --json` (at most once a minute). With no starts left for the day or the hour, or `canStart` false, it doesn't try. A wake that fails anyway (a 429, say) is handled the same way: the jobs sent there go back to the machine that sent them when it takes jobs, and are lost (76) only when there's nowhere to go. The VM is marked `can't wake` with the reason and a time to try again: an hour for a quota or a 429, 5 minutes for anything else. Until then `dibs machines` shows `can't wake: <reason>`, `--anywhere` and jobs dibs ships on its own skip it, and a job sent `--on` it runs on the machine that sent it, saying why.
|
|
128
128
|
|
|
129
129
|
### A VM made for a job too big for it
|
|
130
130
|
|
package/docs/questions.md
CHANGED
|
@@ -69,7 +69,7 @@ dibs tell web-app/Explore "check the tests" # a subagent's thread is <session n
|
|
|
69
69
|
How a message reaches the agent, with `dibs guard install` (or the plugin):
|
|
70
70
|
|
|
71
71
|
- On the agent's next Bash, edit or Agent tool call, the hook adds it next to the call as `additionalContext` ("Message from the person: ..."). The call itself goes through unchanged, through the normal permission checks. If the guard turns that call away (a heavy command outside dibs, a file another agent leased), the message waits for the next one.
|
|
72
|
-
- If the agent is ending its turn instead, the Stop hook (SubagentStop for a subagent) answers with
|
|
72
|
+
- If the agent is ending its turn instead, the Stop hook (SubagentStop for a subagent) answers with the message as `additionalContext`, so it keeps going and reads it as hook feedback (a `decision: "block"` would read as a hook error). Each message is handed over once, and a stop that's already a stop hook's continuation (`stop_hook_active`) never gets another, so this can't loop.
|
|
73
73
|
- 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
74
|
- Without the guard, the agent gets queued messages the next time it runs `dibs say`.
|
|
75
75
|
|