@detergent-software/conductor 2.2.0-dev.3 → 3.0.0-dev.1

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 (59) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +44 -22
  3. package/build/checkout-sync.js +4 -21
  4. package/build/checkout-sync.js.map +1 -1
  5. package/build/claude.js +6 -2
  6. package/build/claude.js.map +1 -1
  7. package/build/cli.js +32 -25
  8. package/build/cli.js.map +1 -1
  9. package/build/console.js +13 -29
  10. package/build/console.js.map +1 -1
  11. package/build/daemon.js +42 -0
  12. package/build/daemon.js.map +1 -1
  13. package/build/help.js +9 -21
  14. package/build/help.js.map +1 -1
  15. package/build/inbox.js +8 -0
  16. package/build/inbox.js.map +1 -1
  17. package/build/manager.js +74 -3
  18. package/build/manager.js.map +1 -1
  19. package/build/paths.js +2 -0
  20. package/build/paths.js.map +1 -1
  21. package/build/plugin.js +136 -0
  22. package/build/plugin.js.map +1 -0
  23. package/build/profile.js +5 -2
  24. package/build/profile.js.map +1 -1
  25. package/build/project-check.js +21 -9
  26. package/build/project-check.js.map +1 -1
  27. package/build/server.js +11 -0
  28. package/build/server.js.map +1 -1
  29. package/build/upgrade.js +9 -2
  30. package/build/upgrade.js.map +1 -1
  31. package/package.json +8 -8
  32. package/plugin/.claude-plugin/plugin.json +7 -0
  33. package/plugin/README.md +18 -0
  34. package/{mod → plugin}/hooks/model.ts +22 -4
  35. package/{mod → plugin}/hooks/register.tsx +63 -17
  36. package/plugin/skills/conductor-console/SKILL.md +94 -0
  37. package/plugin/skills/create-verification-skill/LICENSE +21 -0
  38. package/plugin/skills/create-verification-skill/README.md +9 -0
  39. package/plugin/skills/create-verification-skill/SKILL.md +44 -0
  40. package/plugin/skills/create-verification-skill/manifest.json +27 -0
  41. package/plugin/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
  42. package/plugin/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
  43. package/plugin/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
  44. package/plugin/skills/maintain-verification-skill/LICENSE +21 -0
  45. package/plugin/skills/maintain-verification-skill/README.md +9 -0
  46. package/plugin/skills/maintain-verification-skill/SKILL.md +39 -0
  47. package/plugin/skills/maintain-verification-skill/manifest.json +23 -0
  48. package/plugin/skills/work-item/SKILL.md +253 -0
  49. package/plugin/skills/work-item/trackers/ado-boards.md +23 -0
  50. package/plugin/skills/work-item/trackers/github-issues.md +23 -0
  51. package/plugin/skills/work-item/trackers/linear.md +21 -0
  52. package/protocol/PROTOCOL.md +1 -1
  53. package/build/mod.js +0 -53
  54. package/build/mod.js.map +0 -1
  55. package/mod/.claude-plugin/marketplace.json +0 -6
  56. package/mod/.claude-plugin/plugin.json +0 -7
  57. package/mod/README.md +0 -19
  58. /package/{mod → plugin}/hooks/hooks.json +0 -0
  59. /package/{mod → plugin}/types/index.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
  Releases are tagged `conductor-v<version>` and staged on npm by `atk-conductor-release` (`pipelines/release-conductor.yml`), which writes each section below. `scripts/check-changelog.mjs` fails when a tag has no section here.
4
4
 
5
+ ## [3.0.0-dev.1](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTconductor-v2.2.0-dev.3&targetVersion=GTconductor-v3.0.0-dev.1) (2026-10-17)
6
+
7
+ ### ⚠ BREAKING CHANGES
8
+
9
+ * **conductor:** conduct install-mod and conduct console --project
10
+ are removed. The console runs in ~/.conductor/console and loads the
11
+ conductor plugin with --plugin-dir.
12
+
13
+ Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
14
+
15
+ ### Features
16
+
17
+ * **conductor:** run the console at machine level and retire install-mod (ATK-525) ([343fa6f](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/343fa6f5edf25d4005de7adfafaec56765ca5475))
18
+ * **conductor:** say when a worker wakes without the plugin (ATK-525) ([9af10be](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/9af10be6025ef32a1c9d5461027bbaedf28d8186))
19
+ * **conductor:** ship the plugin and load it with --plugin-dir (ATK-525) ([7a143de](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/7a143de8301fd982a4f8aca41e94be3563930cb6))
20
+
21
+ ### Bug Fixes
22
+
23
+ * **conductor:** act on the plugin review (ATK-525) ([b349227](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/b349227a5e079d7b7ca71f003c7c93b67920771d))
24
+ * **conductor:** report a worker's plugin to its own daemon (ATK-525) ([f746c2a](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/f746c2a106b41b7c74fa050b9f0bffa07a8e175c))
25
+
26
+ ### Documentation
27
+
28
+ * **conductor:** describe the plugin and the machine-level console (ATK-525) ([4b62b99](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/4b62b99f1a8cc28f5228f3f88e90f99f9e994aab))
29
+ * **conductor:** say only what was seen of the console's trust prompt (ATK-525) ([1baa805](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/1baa8057445cb6ff92ef0a0227accf9def4dd899))
30
+
5
31
  ## [2.2.0-dev.3](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTconductor-v2.2.0-dev.2&targetVersion=GTconductor-v2.2.0-dev.3) (2026-10-17)
6
32
 
7
33
  ### Features
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Conductor
2
2
 
3
- `@detergent-software/conductor`: the local daemon that runs the work loop for every conducted project on this machine, and its `conduct` CLI. The design, decisions and build order are in the Linear document *Conductor: design note* (project *Conductor daemon*). This package has build step 1, the skeleton (ATK-308), step 2, the session manager (ATK-309), step 3, the watchers and `conduct wait` (ATK-310), the daemon's side of step 4, worker protocol v1's `conduct note` (ATK-311), step 5, the inbox with `conduct approve` / `revise` (ATK-312), step 6, the notifier (ATK-313), step 9, the conductor mod for Claude Code in `mod/` (ATK-265), step 8, the scheduler, settings and rules (ATK-315), the daemon's side of step 7, the console (ATK-314), step 12, the port broker (ATK-318), step 13, the ADO Boards tracker (ATK-319), and `conduct brief` for a worker's orient step (ATK-371).
3
+ `@detergent-software/conductor`: the local daemon that runs the work loop for every conducted project on this machine, and its `conduct` CLI. The design, decisions and build order are in the Linear document *Conductor: design note* (project *Conductor daemon*). This package has build step 1, the skeleton (ATK-308), step 2, the session manager (ATK-309), step 3, the watchers and `conduct wait` (ATK-310), the daemon's side of step 4, worker protocol v1's `conduct note` (ATK-311), step 5, the inbox with `conduct approve` / `revise` (ATK-312), step 6, the notifier (ATK-313), step 9, the conductor mod for Claude Code (ATK-265), now part of the conductor plugin in `plugin/` (ATK-525), step 8, the scheduler, settings and rules (ATK-315), the daemon's side of step 7, the console (ATK-314), step 12, the port broker (ATK-318), step 13, the ADO Boards tracker (ATK-319), and `conduct brief` for a worker's orient step (ATK-371).
4
4
 
5
5
  ## Commands
6
6
 
@@ -37,7 +37,7 @@ conduct focus <project> [--slots <n>] [--weight <n>] --until <when>
37
37
  a project's slots or ordering weight, for a while (neither: it goes first)
38
38
  conduct why <event id | item> [--json]
39
39
  the rule behind an action, and the events that led to it
40
- conduct console [--project <name>] [--here]
40
+ conduct console [--here]
41
41
  open the console in a Windows Terminal tab, or in this terminal (see Console)
42
42
  conduct escalations [--json] what rules escalated to the console and it hasn't handled
43
43
  conduct escalations done <id> [--ask] <text>
@@ -88,7 +88,6 @@ conduct events [--since <id>] [--follow] [--console]
88
88
  the event log, one JSON event per line (see API)
89
89
  conduct install-startup start the supervised daemon at logon (Windows Task Scheduler)
90
90
  conduct install-startup --remove remove that logon task
91
- conduct install-mod [--remove] install the conductor mod in Claude Code (see Mod)
92
91
  conduct upgrade [--tag dev|latest] [--allow-downgrade]
93
92
  stop the daemon, npm install the tag's newest version, start it again
94
93
  ```
@@ -101,7 +100,7 @@ A `<worker>` is its item (`ATK-309`) or its name (`probe-ATK-309`).
101
100
 
102
101
  The session manager owns the `claude --bg` sessions it launches, and only those:
103
102
 
104
- - **launch:** the worktree comes first, through the project's `.claude/hooks/worktree-hooks.mjs`. In a repo with `.atk-lock.json`, the profile's work and verify skills must match the lockfile (`atk install` fixes them when it can). Then `claude --bg --worktree <name> -n <name> --disallowedTools EnterPlanMode ExitPlanMode --permission-mode auto -- <prompt>` runs from the main checkout. A profile with `"workers": { "tab": true }` also gets a Windows Terminal tab attached to the session.
103
+ - **launch:** the worktree comes first, through the project's `.claude/hooks/worktree-hooks.mjs`. In a repo with `.atk-lock.json`, the profile's work and verify skills must match the lockfile (`atk install` fixes them when it can). Then `claude --bg --worktree <name> -n <name> --plugin-dir <home>/plugin --disallowedTools EnterPlanMode ExitPlanMode --permission-mode auto -- <prompt>` runs from the main checkout (see Plugin). A work or verify skill named `conductor:<skill>` comes from the plugin, not the lockfile: the launch checks that the plugin holds it. A profile with `"workers": { "tab": true }` also gets a Windows Terminal tab attached to the session.
105
104
  - **park:** a worker with a wait (`POST /waits`) is stopped once `claude agents` shows its turn has ended. Its status becomes `parked`, and its tab closes.
106
105
  - **resume:** when a wait resolves, the daemon lets the stop settle (`sessions.settleSeconds`). It checks the process has exited, then runs `claude --bg --resume <session> -- "[conductor] event: …"`. The session keeps its name, model, permission mode and disallowed tools. A resume of a session that still runs starts a copy; the daemon stops and removes the copy, then tries again.
107
106
  - **compact:** a parked worker with no resolved wait, whose context the rules find too big (the default `compact-on-park`: past `sessions.compactTokens`, 300k), is resumed with `/compact <what to keep>` once its stop has settled (`worker.compacting`). It runs until its transcript shows the compaction's boundary (`worker.compacted`, with the context before it and the conversation it kept), then parks again on its waits, which resume it as usual. Each turn of a session re-reads its whole context from cache, so a worker left to grow pays for it every turn (ATK-454 reached 883k). A resume that starts a copy is tried again on a later sweep (`worker.compact-deferred`), as a resume is. A compaction whose resume fails, or whose turn ends with no boundary 10 minutes on, logs `worker.compact-failed`, which raises a `context` item in the inbox. The worker still parks, and the daemon doesn't try it again until it restarts or the session compacts some other way: any boundary in its transcript, Claude Code's own included, logs `worker.compacted` and resolves that item. A worker whose context is unknown is never compacted, so even a rule with no threshold can't compact it on every park.
@@ -389,12 +388,11 @@ The scheduler moves conduct-atk's tick into the daemon (design note, section 8).
389
388
 
390
389
  ## Skill bumps reach the main checkout
391
390
 
392
- A worker's worktree branches from `origin/<base>` and installs its own pins. The main checkout is different: it keeps the pins it was last pulled at, and the console's skill, the worktree hooks and the skills a new worktree copies all come from there. So the daemon checks each conducted project that has an `.atk-lock.json`, at most every `checkout.intervalMinutes` (10):
391
+ A worker's worktree branches from `origin/<base>` and installs its own pins. The main checkout is different: it keeps the pins it was last pulled at, and the worktree hooks and the skills a new worktree copies come from there. The console's skill doesn't: it comes with the conductor plugin (see Plugin). So the daemon checks each conducted project that has an `.atk-lock.json`, at most every `checkout.intervalMinutes` (10):
393
392
 
394
393
  1. It runs `git fetch origin <base>` in the main checkout and compares the pins (asset type, name and version) at `HEAD` with those at `origin/<base>`. When they match and nothing is left to install, nothing more happens.
395
394
  2. When they differ, it records the pins as pending (a `checkout.pending` event). With the main checkout on `<base>` and no local changes to `.atk-lock.json`, it then runs `git merge --ff-only origin/<base>`.
396
395
  3. Once `HEAD` has the pins, whether by this pull or yours, it runs `atk install` for the pending assets. A `checkout.updated` event lists each `name old → new`. An install that fails or leaves drift stays pending, and the next check tries it again, in this daemon or the next.
397
- 4. When `conductor-console` itself changed, a `operator` inbox item asks you once to restart the console (`/clear`, then `/conductor-console`). Other skills need no restart, because every worker starts fresh.
398
396
 
399
397
  The checkout isn't touched in these cases: it is on another branch, its lockfile has local changes, or git refuses the fast-forward. Instead one `operator` item gives the commands (`git -C <root> pull --ff-only`, `atk install -P <root>`). The same item stays open while an install leaves drift, and it resolves itself once the pins are installed. A worktree create waits for a check that is running, and a check waits while one of the project's workers is launching, so a new worktree never copies a half-updated checkout. A failed fetch is only logged. `checkout.mode` is `update` (the default), `notify` (the item only, with no git or atk run) or `off`.
400
398
 
@@ -614,6 +612,7 @@ Everything lives in `~/.conductor` (`CONDUCTOR_HOME` overrides it):
614
612
  - `GET /console/escalations`: the open escalations, oldest first (see Console).
615
613
  - `POST /console/escalations/:id` with `{ "text": "<finding>", "ask"?: true }`: the console's report on one; 201 with the escalation, the `console.handled` event's id and the inbox item `ask` raised. 404 when the id isn't an escalation, 409 when it is handled already or older than 14 days.
616
614
  - `POST /console/cache` with `{ "action": "warm" | "cold" | "failed", "contextTokens", "usage": { "cacheRead", "cacheWrite", "input", "output" } | null, "warms" }` or `{ "action": "clear", "contextTokens", "reason" }`: the mod's report on the idle console's prompt cache (see Mod); 201 with the `console.cache` event's id.
615
+ - `POST /plugin/seen` with `{ "sessionId", "version"? }`: the mod's report that the conductor plugin loaded in a session (see Plugin); 200 with `{ "worker": <name> | null }`, the worker that session belongs to.
617
616
  - `GET /fleet`: the workers in flight, with session activity, phase, PR, waits and spend (today, total).
618
617
  - `POST /workers` with `{ "item": "ATK-309", "project"?, "probe"?, "prompt"?, "conductor"? }`: launch; answers 202 with the `launching` worker. `GET /workers/:id` shows it with its latest events.
619
618
  - `DELETE /workers/:id` (`?force=true`): retire; 409 with the unfinished work (the worktree's, and each `.scratch/repos` checkout's under `checkouts`) when it refuses.
@@ -672,7 +671,7 @@ Then `conduct project check <name>` says whether the project can be conducted, b
672
671
  - **tracker:** the tracker's login answers, and the queue reads (Linear: the team, and whether any of its projects has a priority; Boards: the saved query; GitHub Issues: the labelled issues).
673
672
  - **code-host** and **ci:** the code host's login answers and the base branch exists; each release's `pipeline` names exactly one of the repo's pipelines.
674
673
  - **worktree:** the launch's first steps on a throwaway `conduct-check-<time>`: the worktree hooks create it, its skills match `.atk-lock.json`, and it is removed, whatever happened. The one check that writes; `--no-worktree` skips it, since the create hook runs `pnpm install`.
675
- - **skills:** in the main checkout, `skills.work` is installed and declares `protocol: 2` in its SKILL.md frontmatter (worker protocol 2), `skills.verify` is installed, and `atk audit` finds both unchanged; a missing alias is a `warn`.
674
+ - **skills:** `skills.work` is there and declares `protocol: 2` in its SKILL.md frontmatter (worker protocol 2), `skills.verify` is there, and `atk audit` finds the installed ones unchanged; a missing alias is a `warn`. A skill named `conductor:<skill>` is read from this package's plugin and isn't audited, and beside a plugin work skill the aliases only name older notes' headings, so they aren't checked; any other is read from the main checkout.
676
675
  - **ports:** the broker has a free slot for a new worktree, up to `ports.maxSlot`, saving nothing.
677
676
  - **health:** each `health` URL answers; a `warn` at most, since an environment can be down.
678
677
 
@@ -710,34 +709,56 @@ To switch from a linked build to the package: `conduct stop`, `npm rm --global @
710
709
 
711
710
  ## Console
712
711
 
713
- The console (design note, section 11) is the one Claude session that stays open beside the daemon. The conductor mod in it does the plumbing in code (see Mod). Its model wakes only for an escalation or for you, and runs the project's console skill (`/conductor-console`, installed by ATK). It has no loop: no Monitor, no heartbeat, no ticks. Everything it knows comes from the daemon, so a new console after a close loses nothing.
712
+ The console (design note, section 11) is the one Claude session that stays open beside the daemon. The conductor mod in it does the plumbing in code (see Plugin). Its model wakes only for an escalation or for you, and runs the plugin's console skill (`/conductor:conductor-console`). It has no loop: no Monitor, no heartbeat, no ticks. Everything it knows comes from the daemon, so a new console after a close loses nothing.
713
+
714
+ The console belongs to the machine, not to a project (design note v2, section 1): it runs in `<home>/console` (`~/.conductor/console`), a folder of the conductor's own, and opens with no project registered. It reads items through the `conduct` verbs, which find the project from the item while the daemon runs, and a subagent that reads a project's code or logs works in that project's checkout, from `conduct status`.
714
715
 
715
716
  ```bash
716
- conduct console # a tab in Windows Terminal (window "conductor"), in the project's main checkout
717
- conduct console --here # the same session in this terminal
718
- conduct console --project cadence # with several projects registered: whose checkout it runs in
717
+ conduct console # a tab in Windows Terminal (window "conductor"), in ~/.conductor/console
718
+ conduct console --here # the same session in this terminal
719
719
  ```
720
720
 
721
- It runs `claude -n conductor --permission-mode auto -- /conductor-console` with `CONDUCTOR_CONSOLE=1`. The skill starts the daemon if it isn't running (`conduct start`, detached, so it doesn't end with the session), then handles what waits.
721
+ It writes the plugin copy if none exists yet (see Plugin), then runs `claude --plugin-dir <home>/plugin -n conductor --permission-mode auto -- /conductor:conductor-console` with `CONDUCTOR_CONSOLE=1`. A background session started in that new folder ran with no trust prompt (ATK-525); the first interactive one may still ask. The skill starts the daemon if it isn't running (`conduct start`, detached, so it doesn't end with the session), then handles what waits.
722
722
 
723
723
  **Escalations.** A rule's `escalate console "<ask>"` appends `console.escalated` (the default `conductor-handoff` does it for a worker's `Handoff · conductor` note). The mod wakes the model with `[conductor] escalation #<id> on <item>: <ask>`. The console does the job and reports back with `conduct escalations done <id> "<what it found or did>"`, which logs `console.handled` with the escalation as its cause, so `conduct why <that event>` leads to the rule. With `--ask`, the finding also goes in the inbox as a `console` item, pushed like any other, for something only you can do. `conduct escalations` lists those not yet handled, from the last 14 days, including the ones raised while no console was open; the console reads it when it starts.
724
724
 
725
725
  **With no console open.** The daemon counts the console's streams of `/events` (the mod's `conduct events --follow --console`). When escalations are open and no console stream has been open for 30 s, it raises one `console` inbox item, "escalations wait for the console and none is open: start one with conduct console", pushed like any other. The 30 s cover a console's own reconnects (the mod restarting `conduct events`, a daemon restart). The item resolves when a console opens or the last escalation is handled. The built-in `focus` profile doesn't push the `console` kind. The daemon never opens a console itself: that would wake a model on every escalation, unattended.
726
726
 
727
- **Moving from conduct-atk.** Stop the conduct-atk session, `conduct upgrade` (the scheduler now launches by default), `atk install` in the main checkout, then `conduct console`. A machine that keeps conduct-atk's loop sets `"scheduler": { "mode": "observe" }` in `config.json`.
727
+ **Moving from conduct-atk.** Stop the conduct-atk session, `conduct upgrade` (the scheduler now launches by default), then `conduct console`. A machine that keeps conduct-atk's loop sets `"scheduler": { "mode": "observe" }` in `config.json`.
728
+
729
+ ## Plugin
730
+
731
+ `plugin/` is the conductor plugin (design note v2, section 4), one Claude Code plugin named `conductor` that holds:
732
+
733
+ - **the mod** (`hooks/`), below;
734
+ - **the console skill**, `/conductor:conductor-console` (see Console);
735
+ - **the reference work skill**, `/conductor:work-item`: a project's profile names it `skills.work: "conductor:work-item"`, and its notes are headed with the bare name, `work-item · `;
736
+ - **the verification-skill pair**, `/conductor:create-verification-skill` and `/conductor:maintain-verification-skill`, vendored from the ATK registry at a pinned version with their pstack MIT `LICENSE`.
737
+
738
+ It loads only into the sessions the conductor starts, the workers and the console: each starts with `--plugin-dir <home>/plugin`, and nothing installs it for the user, so other sessions list none of its skills. Skills of a plugin are namespaced (`/conductor:work-item`; the bare `/work-item` folds to it when nothing else has the name), while the mod's commands stay bare (`/approve`).
739
+
740
+ **The copy in `<home>/plugin`.** Sessions load a copy the daemon keeps, never the package folder, which moves with the Node version under nvm: a resume wakes a session with its saved `--plugin-dir`, and one whose path is gone runs on without the plugin, silently (ATK-522). The daemon refreshes the copy as it starts, and `conduct upgrade` does after npm installs; `conduct console` writes one only where none exists yet, and otherwise leaves the daemon's copy alone. A refresh writes only changed files, each beside itself and renamed over the old one, the hooks module last, and removes files the package no longer ships; it leaves what Claude Code writes into a plugin folder (`.claude-plugin/types/`, `tsconfig.json`). It also writes `conductor.json`, naming this package's `build/cli.js`, which the mod runs, and the daemon's home, which the mod reports to: a `claude --bg` session doesn't see the environment of the process that started it, so the mod can't read `CONDUCTOR_HOME` there. The folder itself is never moved or swapped.
741
+
742
+ **Reach of an update.** A parked worker loads the new plugin on its next wake. A live session reloads the hooks module by itself when the folder changes; skills need `/reload-plugins`.
743
+
744
+ **A worker that woke without it.** The mod reports every session start to `POST /plugin/seen`, a background worker's too. The daemon notes the time before each launch or resume, and a worker whose session hasn't reported within 3 minutes logs `worker.plugin-missing`, which raises a `failed` inbox item naming the plugin folder to check.
745
+
746
+ **The user-scope mod is retired.** `conduct install-mod` is gone. The daemon uninstalls a user-scope `conductor@conductor` and its marketplace on its first start (`plugin.user-install-retired`, which later starts check for), for the machine's own home only.
747
+
748
+ **Vendored skills.** `vendored-skills.json` pins each vendored skill's version and its files' hashes, and a test holds `plugin/skills/<name>` to them, so CI catches an edit without reaching the registry. `node scripts/vendor-skills.mjs <name> <version>` checks a skill out with `atk checkout` and pins it; `node scripts/vendor-skills.mjs --check` compares the pins with the registry (both need `atk` signed in).
728
749
 
729
- ## Mod
750
+ ### Mod
730
751
 
731
- `mod/` is the conductor mod: a Claude Code plugin (a hooks module, code that costs no tokens) that does the console's plumbing. `conduct install-mod` installs it for this user from the package's own `mod/` folder, as a folder marketplace (`claude plugin install conductor --marketplace <package>/mod --scope user`). Claude Code reads a folder marketplace's plugin in place, so `conduct upgrade` replaces the mod along with the daemon; open sessions load the new version with `/reload-plugins`. `--remove` uninstalls it.
752
+ The mod is the plugin's hooks module, code that costs no tokens, which does the console's plumbing.
732
753
 
733
- - **Other sessions** get nothing from it: no status line, and no calls to the daemon.
754
+ - **Every session** sends its plugin report on start, and nothing else: no status line, and no other calls to the daemon.
734
755
  - **The console**, the session started with `CONDUCTOR_CONSOLE=1` (`conduct console` starts it; see Console), reads `GET /fleet`, `GET /inbox` and `GET /notify` every 30 s and gets:
735
756
  - **the band** above the prompt while the inbox has items: one hotkey per item (a plan approves after a second press, `y`, since a digit typed into an empty prompt presses a band button; an npm OTP copies its `npm stage approve` line; the rest open the pane), and `o` for the pane;
736
757
  - **the pane** (`/conductor`, `o`, or opened at the start, docked as a sidebar on a fullscreen terminal of 144 columns or more): the notification profile (a picker; buttons on mobile) and Remote Control's state, the inbox with each item's actions (approve, revise, copy a command, open a link, done; on a Windows terminal, open is a button that opens a web link in the default browser once, since a ctrl+click on a link in a pane opened it twice, ATK-494), the workers by project (each project's rule has [pause] and [focus]), and today's spend. The header counts the workers running and parked and the inbox in words. Each worker is one line in columns that line up across projects, cut to the pane's width so it never wraps: a glyph, the item, its phase, its PR, what it waits on in words (`PR #557 to merge (agentic-toolkit-registry)`, `npm 8.9.0-dev.1 on dev (atk)`, `login (ado)`) or else its activity, and the age. As the pane narrows, the age goes first, then the wait, then the PR and the phase (ATK-521). The glyphs are one cell wide: `●` in a turn, `◌` up between turns, `!` stuck on a prompt, `○` parked, `×` failed or gone, `·` starting. A row expands to attach and why, its tokens today, its whole PR ref and its raw wait keys;
737
758
  - **commands answered in code**, never by the model: `/conductor`, `/inbox`, `/approve <item | #id>`, `/revise <item | #id> <text>`, `/attach <item | worker>`, `/notify [<profile> [--until <when>]]`, `/pause [<project>] [--until <when>]`, `/unpause [<project>]`, `/focus-project <project> [--until <when>]` (puts its items first, until midnight without `--until`; not `/focus`, which is Claude Code's own);
738
- - **a check that `/conductor-console` ran**: a console started without it (by hand, as `claude -n conductor`) shows `console without its skill: run /conductor-console` in the band, and each prompt, Jason's or an escalation's, carries a line telling the model to load the skill before it answers. Running the skill (`/conductor-console`, or the model's Skill tool) clears both, until a `/clear` or a resume starts a conversation without it;
759
+ - **a check that `/conductor:conductor-console` ran**: a console started without it (by hand, as `claude --plugin-dir … -n conductor`) shows `console without its skill: run /conductor:conductor-console` in the band, and each prompt, Jason's or an escalation's, carries a line telling the model to load the skill before it answers. Running the skill (`/conductor:conductor-console`, or the model's Skill tool) clears both, until a `/clear` or a resume starts a conversation without it;
739
760
  - **a warm prompt cache while it idles** (ATK-386). The console's cache lasts an hour after its last use, and a wake after that writes the whole context again. So 55 minutes after the console's last turn, the mod sends one ping (`$.model.fork`, the console's own last request plus a one-word ask, no tools, no turn in the transcript). The API serves the ping from the cache for a tenth of a write's price, and the hour starts over. It pings again every 55 minutes until a turn comes, and each turn starts the timer over. At an idle point it runs `/clear` instead when the context is 150k or more, or after 12 pings in a row (the 13th idle point, about 12 hours after the last turn), and the band says `fresh console (cleared while idle: …)` until the next prompt loads the skill. A ping that read less than half the context from the cache (the cache was gone anyway, as under a 5-minute TTL) stops the pings until the next turn. Each ping and clear goes to `POST /console/cache`, which logs a `console.cache` event with the context size and what the ping cost. A fork isn't in the transcript, so that event is the only place its cost shows;
740
- - **the stream**: it runs `node <package>/build/cli.js events --follow --console` (`--console` tells the daemon a console is open), redraws on each event, toasts each new inbox item, and acts on three events:
761
+ - **the stream**: it runs `node <the cli.js that conductor.json names> events --follow --console` (`--console` tells the daemon a console is open), redraws on each event, toasts each new inbox item, and acts on three events:
741
762
 
742
763
  | Event | Data | The mod |
743
764
  |---|---|---|
@@ -747,7 +768,7 @@ It runs `claude -n conductor --permission-mode auto -- /conductor-console` with
747
768
 
748
769
  The notifier emits `notify.requested` (see Notifications), and the rules' `escalate console` action emits `console.escalated`. Nothing emits `worker.message-requested` yet.
749
770
 
750
- Its checks: `pnpm -C apps/conductor test` runs `mod/tests/*.spec.ts` (the logic, in CI). `pnpm -C apps/conductor typecheck` checks the mod too, in CI: its hooks, `$.state` contract and `*.test.tsx` against Claude Code's plugin API (`tsconfig.mod.json`), and its specs (`tsconfig.mod-specs.json`). CI has no Claude Code to write that API's types, so `mod-types/claude-code.d.ts` holds a copy; its first line names the Claude Code version it came from. After a Claude Code upgrade, load `/plugin-authoring` once in a session (it writes that build's types), then run `node scripts/sync-mod-types.mjs` from `apps/conductor` and `typecheck`. `pnpm -C apps/conductor lint` covers `mod/` as well. `claude plugin validate apps/conductor/mod` and `claude plugin test apps/conductor/mod` (the hooks against the engine, UI on the terminal, desktop, VS Code and mobile surfaces) need Claude Code, so they run locally. To try a change before installing it: `claude --plugin-dir apps/conductor/mod`.
771
+ Its checks: `pnpm -C apps/conductor test` runs `plugin/tests/*.spec.ts` (the logic, in CI). `pnpm -C apps/conductor typecheck` checks the mod too, in CI: its hooks, `$.state` contract and `*.test.tsx` against Claude Code's plugin API (`tsconfig.mod.json`), and its specs (`tsconfig.mod-specs.json`). CI has no Claude Code to write that API's types, so `mod-types/claude-code.d.ts` holds a copy; its first line names the Claude Code version it came from. After a Claude Code upgrade, load `/plugin-authoring` once in a session (it writes that build's types), then run `node scripts/sync-mod-types.mjs` from `apps/conductor` and `typecheck`. `pnpm -C apps/conductor lint` covers `plugin/` as well. `claude plugin validate apps/conductor/plugin` and `claude plugin test apps/conductor/plugin` (the hooks against the engine, UI on the terminal, desktop, VS Code and mobile surfaces) need Claude Code, so they run locally. To try a change in a session of your own: `claude --plugin-dir apps/conductor/plugin`.
751
772
 
752
773
  ## Releases
753
774
 
@@ -757,12 +778,13 @@ Its checks: `pnpm -C apps/conductor test` runs `mod/tests/*.spec.ts` (the logic,
757
778
 
758
779
  ```bash
759
780
  pnpm -C apps/conductor lint
760
- pnpm -C apps/conductor typecheck # src/, and mod/ against mod-types/ (see Mod)
781
+ pnpm -C apps/conductor typecheck # src/, and plugin/ against mod-types/ (see Mod)
761
782
  pnpm -C apps/conductor test
762
783
  pnpm -C apps/conductor build
763
784
  cd apps/conductor && node scripts/check-changelog.mjs
764
785
  pnpm --filter @atk/providers check # the vendored src/lib/providers matches packages/providers
765
786
  pnpm -C packages/providers test
766
- claude plugin validate apps/conductor/mod
767
- claude plugin test apps/conductor/mod
787
+ claude plugin validate apps/conductor/plugin
788
+ claude plugin test apps/conductor/plugin
789
+ node scripts/vendor-skills.mjs --check # from apps/conductor: the vendored skills match the registry
768
790
  ```
@@ -1,7 +1,6 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import { z } from 'zod';
4
- import { CONSOLE_ARGS } from "./console.js";
5
4
  import { link } from "./links.js";
6
5
  import { outputOf, run } from "./run.js";
7
6
  import {} from "./store.js";
@@ -9,9 +8,6 @@ const LOCKFILE = '.atk-lock.json';
9
8
  const FETCH_MS = 60_000;
10
9
  // How often the timer looks for a due project; a check put off by a launch runs on the next look.
11
10
  const POLL_MS = 60_000;
12
- // The console's skill, whose change needs the console restarted to load it.
13
- export const CONSOLE_SKILL = CONSOLE_ARGS[CONSOLE_ARGS.length - 1].replace(/^\//, '');
14
- const RESTART_ASK = `restart the console to load it (/clear, then /${CONSOLE_SKILL})`;
15
11
  const pinChangeSchema = z.object({
16
12
  // Null: the asset is new on origin (from) or gone from it (to).
17
13
  from: z.string().nullable(),
@@ -43,14 +39,13 @@ export function checkoutSync(deps) {
43
39
  throw new Error(`git ${args.join(' ')}: ${result.output}`);
44
40
  return result.stdout;
45
41
  };
46
- // The items this raises for a main checkout carry its path as their link. An ask to bring it up
47
- // to date starts its commands with the pull; a restart ask has no commands and ends with the ask.
42
+ // The items this raises for a main checkout carry its path as their link, and an ask to bring it
43
+ // up to date starts its commands with the pull.
48
44
  const pull = (root) => `git -C "${root}" pull --ff-only`;
49
45
  const ours = (project) => inbox
50
46
  .open()
51
47
  .filter((i) => i.kind === 'operator' && i.item === null && i.project === project.name && i.links[0]?.href === project.root);
52
48
  const stale = (project) => ours(project).filter((i) => i.commands[0] === pull(project.root));
53
- const restarts = (project) => ours(project).filter((i) => i.commands.length === 0 && i.text.endsWith(RESTART_ASK));
54
49
  // One open item per kind of ask: the same text stays, a different one replaces it.
55
50
  const raise = (project, open, text, commands) => {
56
51
  if (open.some((i) => i.text === text))
@@ -97,7 +92,7 @@ export function checkoutSync(deps) {
97
92
  return;
98
93
  const changes = z.array(pinChangeSchema).safeParse(last.data.changes);
99
94
  if (changes.success && changes.data.length > 0)
100
- pending.set(project.name, { changes: changes.data, restartAsked: false });
95
+ pending.set(project.name, { changes: changes.data });
101
96
  };
102
97
  const sync = async (project, base) => {
103
98
  const root = project.root;
@@ -105,10 +100,7 @@ export function checkoutSync(deps) {
105
100
  await git(root, ['fetch', '--quiet', 'origin', base]);
106
101
  const changes = pinChanges(await git(root, ['show', `HEAD:${LOCKFILE}`]), await git(root, ['show', `origin/${base}:${LOCKFILE}`]));
107
102
  if (changes.length > 0) {
108
- const was = pending.get(project.name);
109
- // A console already asked to restart is asked again only for a newer console skill.
110
- const restartAsked = (was?.restartAsked ?? false) && !changes.some((c) => c.name === CONSOLE_SKILL);
111
- remember(project, base, { changes: mergeChanges(was?.changes ?? [], changes), restartAsked });
103
+ remember(project, base, { changes: mergeChanges(pending.get(project.name)?.changes ?? [], changes) });
112
104
  const behind = `origin/${base} pins ${changes.map(describeChange).join(', ')}, and the main checkout doesn't have them yet`;
113
105
  if (mode === 'notify')
114
106
  return askToUpdate(project, behind);
@@ -139,15 +131,6 @@ export function checkoutSync(deps) {
139
131
  const head = (await git(root, ['rev-parse', '--short', 'HEAD'])).trim();
140
132
  const names = [...new Set(todo.changes.flatMap((c) => (c.to === null ? [] : [c.name])))];
141
133
  const problem = names.length === 0 ? null : await ports.checkSkills(root, names);
142
- // The restart ask waits until the console's own skill is installed; another asset's drift
143
- // doesn't hold it back.
144
- const consoleSkill = todo.changes.find((c) => c.name === CONSOLE_SKILL && c.to !== null);
145
- if (consoleSkill &&
146
- !todo.restartAsked &&
147
- (problem === null || (await ports.checkSkills(root, [CONSOLE_SKILL])) === null)) {
148
- raise(project, restarts(project), `${describeChange(consoleSkill)} is installed in the main checkout: ${RESTART_ASK}`, []);
149
- todo.restartAsked = true;
150
- }
151
134
  if (problem !== null)
152
135
  return askToUpdate(project, `pulled to ${head} for ${pins}, but the install didn't take: ${problem}`);
153
136
  store.appendEvent({
@@ -1 +1 @@
1
- {"version":3,"file":"checkout-sync.js","sourceRoot":"","sources":["../src/checkout-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAA4C,MAAM,YAAY,CAAC;AAuCtE,MAAM,QAAQ,GAAG,gBAAgB,CAAC;AAClC,MAAM,QAAQ,GAAG,MAAM,CAAC;AACxB,kGAAkG;AAClG,MAAM,OAAO,GAAG,MAAM,CAAC;AACvB,4EAA4E;AAC5E,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC,YAAY,CAAC,MAAM,GAAG,CA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AAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3E,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,MAAM,CAAC,CAAY,EAAE,CAAY;IACxC,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;AACpF,CAAC;AAED,SAAS,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAoC;IAC7D,OAAO,GAAG,IAAI,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC;AACjC,CAAC"}
package/build/claude.js CHANGED
@@ -61,8 +61,10 @@ export function isStarting(session) {
61
61
  return session.pid === undefined && session.state === 'working';
62
62
  }
63
63
  // The flags a worker starts with. A resume keeps them: `claude --bg --resume` wakes a session
64
- // "with its saved options (-n, --permission-mode, --disallowedTools, --model)" (ATK-309's check).
65
- // Workers get no plan-mode tools: an ExitPlanMode dialog passes on one stray key (ATK-269).
64
+ // "with its saved options (-n, --plugin-dir, --disallowedTools, --permission-mode, --model)"
65
+ // (ATK-309, ATK-522). So the plugin is passed here only: any flag on a background resume starts a
66
+ // copy under a new session id instead. Workers get no plan-mode tools: an ExitPlanMode dialog passes
67
+ // on one stray key (ATK-269).
66
68
  export function launchArgs(request) {
67
69
  return [
68
70
  '--bg',
@@ -70,6 +72,8 @@ export function launchArgs(request) {
70
72
  request.worktree,
71
73
  '-n',
72
74
  request.name,
75
+ '--plugin-dir',
76
+ request.pluginDir,
73
77
  '--disallowedTools',
74
78
  ...request.disallowedTools,
75
79
  '--permission-mode',
@@ -1 +1 @@
1
- {"version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;AACpE,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAqB;IACpD,OAAO,OAAO,CAAC,MAAM,KAAK,SAAS,IAAI,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QACjF,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,IAAI,IAAI,CAAC;QAC9B,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,kGAAkG;AAClG,kGAAkG;AAClG,+FAA+F;AAC/F,4EAA4E;AAC5E,MAAM,UAAU,SAAS,CAAC,OAAqB;IAC7C,OAAO,OAAO,CAAC,GAAG,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,CAAC;AAChE,CAAC;AAED,KAAK,UAAU,SAAS,CAAC,OAAsB,EAAE,MAAc;IAC7D,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IACtD,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO;IAC9B,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;QAAE,MAAM,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;IAChF,MAAM,IAAI,cAAc,CAAC,UAAU,OAAO,SAAS,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAChF,CAAC"}
package/build/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawn } from 'node:child_process';
3
- import { mkdirSync, readFileSync, realpathSync, rmSync, writeFileSync } from 'node:fs';
4
- import { resolve, sep } from 'node:path';
3
+ import { existsSync, mkdirSync, readFileSync, realpathSync, rmSync, writeFileSync } from 'node:fs';
4
+ import { join, resolve, sep } from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import { parseArgs } from 'node:util';
7
7
  import { z } from 'zod';
@@ -10,7 +10,7 @@ import { heldLocks, lockCommand, lockLine, portsCommand } from "./broker-cli.js"
10
10
  import { callApi, NotRunningError, ping, readEndpoint } from "./client.js";
11
11
  import { branchCommand, checkoutCommand, fileCommand, landCommand, modeCommand, prCreateCommand, prThreadsCommand, replyCommand, runsCommand, stateCommand, } from "./code-host-cli.js";
12
12
  import { configSchema, loadConfig } from "./config.js";
13
- import { claimConsole, CONSOLE_ARGS, CONSOLE_WINDOW, consoleProject, consoleTabArgs, escalationLines, escalationSchema, handledSchema, } from "./console.js";
13
+ import { claimConsole, CONSOLE_WINDOW, consoleArgs, consoleTabArgs, escalationLines, escalationSchema, handledSchema, } from "./console.js";
14
14
  import { AlreadyRunningError, logCrashes, startDaemon } from "./daemon.js";
15
15
  import { ConductorError } from "./errors.js";
16
16
  import { eventsCommand } from "./events.js";
@@ -21,12 +21,12 @@ import { parseJsonc } from "./jsonc.js";
21
21
  import { processAlive, readPid } from "./lock.js";
22
22
  import { rotatingLog } from "./log.js";
23
23
  import { fleetWorkerSchema, storedFleet, workerByRef, workerLine } from "./manager.js";
24
- import { installMod, removeMod } from "./mod.js";
25
24
  import { noteCommand } from "./note.js";
26
25
  import { isQuiet, notifyLines, notifyStatusSchema, parseUntil, testResultSchema } from "./notify.js";
27
26
  import { overrideViewSchema, PAUSE } from "./overrides.js";
28
27
  import { packageInfo } from "./package-info.js";
29
28
  import { conductorPaths } from "./paths.js";
29
+ import { refreshConductorPlugin } from "./plugin.js";
30
30
  import { projectCheckCommand } from "./project-check-cli.js";
31
31
  import { noProject } from "./project-check.js";
32
32
  import { pushoverCredential, pushoverSender } from "./pushover.js";
@@ -168,15 +168,29 @@ function brokerIo() {
168
168
  return { cwd: process.cwd(), err: (line) => process.stderr.write(`${line}\n`), out };
169
169
  }
170
170
  // `conduct console`: the console (design note, section 11), the Claude session the conductor mod
171
- // serves, started with CONDUCTOR_CONSOLE=1 in the project's main checkout, where the console skill
172
- // is installed. It keeps no state of its own, so a new one after a close loses nothing. One at a
173
- // time: the daemon refuses the start while another console is open or starting (ATK-393).
171
+ // serves, started with CONDUCTOR_CONSOLE=1 in <CONDUCTOR_HOME>/console with the conductor plugin,
172
+ // which brings the console skill. It belongs to no project, so it opens with none registered, and it
173
+ // keeps no state of its own, so a new one after a close loses nothing. One at a time: the daemon
174
+ // refuses the start while another console is open or starting (ATK-393).
174
175
  async function consoleCommand(paths, options) {
175
- const project = consoleProject(await projectsNow(paths), options.project);
176
+ mkdirSync(paths.console, { recursive: true });
177
+ // The copy is the daemon's, refreshed from its own build as it starts: a console from another
178
+ // build (a linked checkout) leaves it alone, and writes one only where no daemon has run yet.
179
+ if (!existsSync(join(paths.plugin, 'conductor.json'))) {
180
+ try {
181
+ refreshConductorPlugin(paths);
182
+ }
183
+ catch (error) {
184
+ throw new ConductorError(`could not write the conductor plugin to ${paths.plugin}`, [
185
+ error instanceof Error ? error.message : String(error),
186
+ '`conduct start` writes it as the daemon starts',
187
+ ]);
188
+ }
189
+ }
176
190
  if (options.here) {
177
191
  await claimConsole(paths, options.force);
178
- const child = spawn('claude', CONSOLE_ARGS, {
179
- cwd: project.root,
192
+ const child = spawn('claude', consoleArgs(paths.plugin), {
193
+ cwd: paths.console,
180
194
  env: { ...process.env, CONDUCTOR_CONSOLE: '1' },
181
195
  stdio: 'inherit',
182
196
  });
@@ -203,15 +217,15 @@ async function consoleCommand(paths, options) {
203
217
  'run `conduct console --here` in a terminal where it is set',
204
218
  ]);
205
219
  }
206
- const args = consoleTabArgs(project, process.execPath, realpathSync(fileURLToPath(import.meta.url)));
220
+ const args = consoleTabArgs(paths.console, process.execPath, realpathSync(fileURLToPath(import.meta.url)));
207
221
  await claimConsole(paths, options.force);
208
- const result = await openWindowsTerminal(args, project.root);
222
+ const result = await openWindowsTerminal(args, paths.console);
209
223
  if (result.code !== 0)
210
224
  throw new ConductorError('could not open the console tab', [
211
225
  outputOf(result, 500),
212
226
  'run `conduct console --here --force` in a terminal instead',
213
227
  ]);
214
- out(`opened the console in ${project.root} (Windows Terminal window "${CONSOLE_WINDOW}")`);
228
+ out(`opened the console in ${paths.console} (Windows Terminal window "${CONSOLE_WINDOW}")`);
215
229
  }
216
230
  // How `conduct start` and upgrade's restart start the daemon detached from this process.
217
231
  function daemonStarter(paths, cliPath) {
@@ -529,11 +543,9 @@ async function main(argv) {
529
543
  return;
530
544
  }
531
545
  case 'console':
532
- return consoleCommand(paths, {
533
- force: values.force === true,
534
- here: values.here === true,
535
- project: values.project,
536
- });
546
+ if (sub !== undefined || values.project !== undefined)
547
+ throw usageError('console');
548
+ return consoleCommand(paths, { force: values.force === true, here: values.here === true });
537
549
  case 'done':
538
550
  if (sub === undefined)
539
551
  throw usageError('done');
@@ -580,10 +592,6 @@ async function main(argv) {
580
592
  });
581
593
  case 'inbox':
582
594
  return inbox(paths, values.json === true);
583
- case 'install-mod':
584
- return values.remove
585
- ? removeMod(modDeps())
586
- : installMod(fileURLToPath(new URL('../mod', import.meta.url)), modDeps());
587
595
  case 'install-startup':
588
596
  return values.remove ? uninstall() : install();
589
597
  case 'land': {
@@ -770,9 +778,6 @@ async function main(argv) {
770
778
  }
771
779
  }
772
780
  }
773
- function modDeps() {
774
- return { claude: (args) => run('claude', args, { timeoutMs: 120_000 }), out };
775
- }
776
781
  function noInbox() {
777
782
  return olderDaemon('no inbox');
778
783
  }
@@ -1324,6 +1329,8 @@ async function upgradeCommand(paths, tag, allowDowngrade) {
1324
1329
  return found;
1325
1330
  },
1326
1331
  out,
1332
+ // The installed package's plugin: npm put it where this process's own plugin folder was.
1333
+ refreshPlugin: () => void refreshConductorPlugin(paths),
1327
1334
  stopDaemon: () => stopDaemon(paths),
1328
1335
  });
1329
1336
  }