omp-conductor 0.3.18 → 0.3.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omp-conductor",
3
- "version": "0.3.18",
3
+ "version": "0.3.20",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "A 24/7 dispatcher that takes ready GitHub issues to green, mergeable PRs using omp coding sessions, with tiered escalation first to an orchestrator session and then to a human.",
@@ -556,56 +556,49 @@ authority confirms; the worker model; the Telegram chat id for tier 2; the
556
556
  escalation fallback; whether an orchestrator session already runs elsewhere; the
557
557
  report scope; and finally whether to write `ORCHESTRATOR.md` + `POLICY.md`.
558
558
 
559
- Two things about the end of it that you must not smooth over:
560
-
561
- - **The dry run is the point.** Before the confirm, it reads the tracker through
562
- the same routing code the loop uses and prints exactly what the next tick would
563
- pick up, which repo each issue routes to, the branch it would cut, and every
564
- issue it cannot route. Walk the operator through that output. Unroutable issues
565
- here are the single most useful signal in the whole onboarding: they mean the
566
- labels and the routing config disagree, and it is far cheaper to see it now.
567
- - **Nothing is mutated until they answer.** No label created, no config written,
568
- no state database, no arm. If they decline, the machine is untouched. Never
569
- answer that confirm on their behalf.
570
-
571
- Say yes to writing `ORCHESTRATOR.md` + `POLICY.md`, then **immediately apply the edits you
572
- drafted in Steps 3, 4 and 5** to the file it wrote, and tell them the path. Note
573
- the trap for later: a future `/conductor setup` re-run offers to overwrite that
574
- file, and accepting loses every tailored word. Their brief is now a file worth
575
- keeping a copy of.
576
-
577
- ### Then walk arm, pause, and disarm they are three different things
578
-
579
- Operators conflate these, and the failure modes are not the same.
580
-
581
- - **Arm** is what that final confirm did, and it is exactly two things: create the
582
- state database, and clear the pause flag. It does **not** start the daemon —
583
- `omp-conductor start` does, and it does not report success until the daemon
584
- answers `GET /healthz`. For a first run, take one tick in the foreground and
585
- watch it: `omp-conductor daemon --once`.
586
- - **Pause is maintenance.** `/conductor pause` (or `omp-conductor pause`) writes a
587
- sentinel in the state directory. The dispatch loop checks it first, so no new
588
- work is claimed from the next tick; runs already in flight finish rather than
589
- being killed. The orchestrator heartbeat reads the *same* flag, so pausing the
590
- fleet also silences its heartbeat — one flag, not two. This is the switch for
591
- touching a repo, rotating a credential, a release window, or a holiday.
592
- `resume` undoes it. Nothing is torn down, nothing is forgotten.
593
- - **Disarm is channel teardown, and it is not a subcommand.** It is removing the
594
- `armedFile` that `.conductor-tick.json` names the heartbeat then sends nothing
595
- and the supervising session simply stops being prompted. Be precise about the
596
- asymmetry: **disarming stops the heartbeat, not the dispatch loop.** A disarmed
597
- fleet whose daemon is still up keeps claiming issues with nobody supervising, so
598
- "stop the fleet" is `pause` (or `omp-conductor stop`) disarm is "stop waking
599
- the orchestrator".
600
- - **And the gate that disarms itself.** If `.conductor-tick.json` names an
601
- `accessFile`, every tick re-reads the Telegram bridge's `access.json` and
602
- requires `enabled: true` with exactly **one** paired owner. It fails closed on
603
- everything else: missing, unreadable, not JSON, disabled, nobody paired, or
604
- several paired (it refuses to guess which human is on the hook). Unattended
605
- dispatch is only defensible while a tier-2 escalation can reach a person, so a
606
- channel that goes away disarms the heartbeat whether or not anyone intended it.
607
- **A fleet deploy always sets `accessFile`.** Leaving it unset passes the gate —
608
- that is for ordinary dev sessions, not an off switch.
559
+ The end of the wizard is load-bearing:
560
+
561
+ - **The dry run is the point.** Before consent, setup reads the tracker with the
562
+ daemon's routing code. It shows each routable and unroutable issue. Walk the
563
+ operator through that output. An unroutable issue means that the labels and
564
+ routing configuration disagree.
565
+ - **Nothing changes before consent.** Setup creates no label, file, database, or
566
+ arm marker before the operator agrees. Never answer that consent prompt for
567
+ the operator.
568
+ - **The host plan is part of consent.** For an external orchestrator, setup names
569
+ the heartbeat file and both safety gates. It also names the staged systemd
570
+ unit. An invalid existing heartbeat stops setup before any write.
571
+ - **The smoke is automatic and paused.** After consent, setup holds dispatch,
572
+ runs one daemon tick, proves `/healthz`, reads stored status, and stops the
573
+ temporary daemon. A running daemon is health-checked and safely restarted only
574
+ when no worker is live.
575
+ - **External arming proves the real channel.** Every setup run sends the inbound
576
+ Telegram challenge, even when an arm marker exists. A failed proof leaves
577
+ dispatch paused and prints the recovery commands.
578
+
579
+ Ask the operator to approve the `ORCHESTRATOR.md` and `POLICY.md` write. After
580
+ the wizard completes, apply the edits from Steps 3, 4, and 5 to `POLICY.md`.
581
+ Tell the operator its path. A later wizard run asks before it replaces these files.
582
+
583
+ ### Then explain hold, pause, and disarm
584
+
585
+ These controls have different effects:
586
+
587
+ - **Setup readiness** means that the paused smoke passed. For external
588
+ orchestration, the Telegram arm proof also passed. Setup then clears the
589
+ dispatch pause. It does not install the staged systemd unit. Run the printed
590
+ install commands on systemd, or run `omp-conductor start` on another host.
591
+ - **Hold** (`omp-conductor hold`) pauses claims and disarms ticks. The daemon and
592
+ pane stay active. Use this command for maintenance or an overnight stop.
593
+ - **Pause** (`omp-conductor pause`) stops new claims only. Active workers finish,
594
+ and an armed heartbeat continues its triage and reporting duties.
595
+ - **Disarm** (`omp-conductor disarm`) removes the marker named by
596
+ `.conductor-tick.json`. The heartbeat stops, but the daemon can still claim
597
+ work. Use `hold`, not `disarm`, when no orchestrator can supervise dispatch.
598
+ - **The channel gate can stop ticks.** Every fleet heartbeat config names the
599
+ Telegram `access.json`. Each tick requires `enabled: true` and exactly one
600
+ paired owner. Missing, invalid, disabled, empty, or ambiguous access stops the
601
+ heartbeat.
609
602
 
610
603
  ---
611
604
 
@@ -1,179 +1,29 @@
1
1
  ---
2
2
  name: conductor-update
3
- description: Update an installed conductor fleet through one operator request. Use when the user asks to update, upgrade, refresh, reinstall, or deploy conductor. Pins one npm release across the Bun-global CLI, omp plugin, and Herdr recovery plugin; converts a local Herdr link when needed; pauses claims, reloads processes, verifies the fleet, and restores the operator's prior pause state.
3
+ description: Update an installed conductor fleet through its deterministic one-command lifecycle. Use when the user asks to update, upgrade, refresh, reinstall, or deploy conductor.
4
4
  ---
5
5
 
6
- # Update a conductor fleet
6
+ # Update conductor
7
7
 
8
- The operator interface is one request: **“update conductor.”** Do not hand them
9
- the implementation as a checklist unless execution is blocked.
10
-
11
- One release has three installed surfaces:
12
-
13
- 1. Bun-global `omp-conductor`: CLI and systemd daemon source.
14
- 2. omp npm plugin `omp-conductor`: slash command and heartbeat loaded by sessions.
15
- 3. Herdr plugin `herdr-conductor`: exact-pane recovery, pinned to the npm
16
- release's `gitHead`.
17
-
18
- This skill performs the whole swap. It does not publish npm, merge, tag, edit an
19
- install root, or update unrelated Bun packages.
20
-
21
- ## Safety boundary
22
-
23
- Run from an operator shell or maintenance omp session that is not hosted by the
24
- target `herdr-fleet.service`. If restarting that unit would kill this updater,
25
- move to an external session first. Never print npm, Telegram, or bot credentials.
26
-
27
- The normal update is:
28
-
29
- ```text
30
- inspect → pause claims → drain → pinned installs → reload → verify → restore pause state
31
- ```
32
-
33
- Ticks stay in their existing armed or disarmed state. Do not use `hold`,
34
- `halt --pane`, `disarm`, `arm`, recovery pins, `pkill`, or manual install-root
35
- edits for a healthy update.
36
-
37
- ## 1. Resolve one release and inspect every surface
38
-
39
- Use the registry latest unless the operator names another published version:
40
-
41
- ```bash
42
- version=$(npm view omp-conductor version)
43
- gitHead=$(npm view "omp-conductor@$version" gitHead)
44
- npm view "omp-conductor@$version" version gitHead --json
45
- ```
46
-
47
- Require `$version` to be nonempty and `$gitHead` to be a full commit SHA before
48
- changing state.
49
-
50
- Inspect, without mutating:
51
-
52
- ```bash
53
- omp-conductor --version
54
- omp plugin list --json
55
- herdr --session "$session" plugin list
56
- omp-conductor status [--project NAME]
57
- ```
58
-
59
- Honor the installation's existing Herdr session and `HERDR_CONFIG_PATH`; discover
60
- them from the running unit/config rather than assuming `fleet` or a path.
61
-
62
- Record:
63
-
64
- - Bun-global CLI version;
65
- - omp plugin version;
66
- - Herdr plugin source: GitHub revision, `local:<path>`, or missing;
67
- - initial dispatch state: running, paused, or stopped;
68
- - initial ticks state, which this update must not change;
69
- - active runs and layered health.
70
-
71
- Report “already current” only when **all** of these are true:
72
-
73
- - Bun-global CLI version equals `$version`;
74
- - omp plugin version equals `$version`;
75
- - Herdr source revision equals `$gitHead`;
76
- - layered status is healthy for the fleet's configured topology.
77
-
78
- A current npm version with a linked, missing, or stale Herdr plugin is a partial
79
- update, not a no-op. If all versions match but status is unhealthy, diagnose the
80
- reported layer; never call an unhealthy fleet current.
81
-
82
- ## 2. Pause claims and drain
83
-
84
- If dispatch was running:
85
-
86
- ```bash
87
- omp-conductor pause [--project NAME]
88
- ```
89
-
90
- If it was already paused, preserve that state. If it was stopped, do not start it
91
- later merely because packages were updated.
92
-
93
- Wait for `active runs (none)`. Never kill workers for an update. If a run does not
94
- drain, stop and report it; leave any pause this skill added in place.
95
-
96
- ## 3. Replace all three surfaces with the pinned release
97
-
98
- Use exact versions. A broad `bun update` is prohibited.
99
-
100
- ```bash
101
- bun add -g "omp-conductor@$version"
102
- omp plugin install "omp-conductor@$version"
103
- ```
104
-
105
- For Herdr, inspect the source found in step 1:
106
-
107
- - `local:<path>`: unlink the plugin id first;
108
- - GitHub-managed or missing: do not unlink.
109
-
110
- Then install the exact npm release commit. Herdr requires the source argument
111
- before its options:
112
-
113
- ```bash
114
- herdr plugin unlink herdr-conductor # only when step 1 reported local:<path>
115
- herdr plugin install TerrifiedBug/conductor/herdr --ref "$gitHead" --yes
116
- ```
117
-
118
- If any install fails, do not reload processes and do not restore dispatch.
119
- Leave the fleet paused, report the failed surface, and give the one retry command.
120
- The still-running processes keep their already-loaded code until a successful
121
- reload.
122
-
123
- ## 4. Reload the installed code
124
-
125
- When Herdr is systemd-managed, restart its fleet unit. This reloads the managed
126
- recovery plugin and causes exact-identity recovery to resume the orchestrator pane
127
- with the new omp extension:
128
-
129
- ```bash
130
- systemctl restart herdr-fleet.service
131
- ```
132
-
133
- Wait until Herdr reports its unit active and the exact configured agent live.
134
-
135
- If the dispatch daemon was running or paused initially, restart it so its process
136
- and source-integrity baseline use the new Bun-global package:
8
+ Run the package-owned lifecycle from a shell or maintenance omp session outside
9
+ the target Herdr session:
137
10
 
138
11
  ```bash
139
- omp-conductor restart [--project NAME]
12
+ omp-conductor upgrade
140
13
  ```
141
14
 
142
- Do not substitute `start` when the daemon was initially stopped.
143
-
144
- ## 5. Verify before restoring claims
145
-
146
- Check every surface again:
147
-
148
- ```bash
149
- omp-conductor --version
150
- omp plugin list --json
151
- herdr --session "$session" plugin list
152
- omp-conductor status [--project NAME]
153
- systemctl is-active herdr-fleet.service
154
- ```
155
-
156
- Require:
157
-
158
- - global CLI and omp plugin both equal `$version`;
159
- - Herdr source equals `TerrifiedBug/conductor` at `$gitHead`;
160
- - exact pane is live and recovery is clear;
161
- - Herdr and daemon health are OK when managed;
162
- - ticks equal their initial state;
163
- - active runs remain empty;
164
- - dispatch remains paused if this skill paused it.
165
-
166
- Run status a second time after recovery settles. Any failed check leaves dispatch
167
- paused and is reported as a partial update.
168
-
169
- Only if dispatch was initially running and every check passed:
15
+ If the user requested a published version, run:
170
16
 
171
17
  ```bash
172
- omp-conductor resume [--project NAME]
18
+ omp-conductor upgrade --to X.Y.Z
173
19
  ```
174
20
 
175
- Verify `dispatch running` once more. If dispatch was initially paused or stopped,
176
- preserve that state and report it.
21
+ The command owns the full transaction: release resolution, preflight, pause,
22
+ drain, exact-version installation across the Bun-global CLI, omp plugin, and
23
+ Herdr plugin, managed-brief recomposition, process reload, pane recovery,
24
+ two-pass verification, and restoration of the previous dispatch state.
177
25
 
178
- Finish with one compact result: old new version, all three installed surfaces,
179
- final layered status, and whether the original dispatch state was restored.
26
+ Report the command's result. Do not reproduce its lifecycle as an AI checklist,
27
+ edit installed files, publish npm, or substitute separate install/restart steps.
28
+ If it fails, report the exact error and leave dispatch paused as the command
29
+ requires.