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/README.md +352 -182
- package/package.json +1 -1
- package/skills/conductor-onboarding/SKILL.md +43 -50
- package/skills/conductor-update/SKILL.md +15 -165
- package/src/board.ts +734 -0
- package/src/brief-upgrade.ts +102 -19
- package/src/briefs/orchestrator.md +32 -16
- package/src/briefs/worker.md +7 -2
- package/src/cli.ts +138 -53
- package/src/config.ts +22 -6
- package/src/daemon.ts +673 -126
- package/src/fleet.ts +64 -6
- package/src/graph-health.ts +296 -0
- package/src/graph.ts +6 -6
- package/src/omp.ts +15 -4
- package/src/orchestrator-tick.ts +157 -10
- package/src/orchestrator.ts +8 -1
- package/src/plugin.ts +173 -45
- package/src/release-policy.ts +202 -0
- package/src/setup-host.ts +285 -0
- package/src/setup.ts +24 -20
- package/src/store.ts +373 -13
- package/src/tracker/github.ts +171 -3
- package/src/transcript.ts +45 -0
- package/src/types.ts +145 -2
- package/src/unblock.ts +26 -14
- package/src/upgrade.ts +537 -0
- package/src/worker.ts +67 -30
- package/src/worktree.ts +66 -0
- package/systemd/omp-conductor.service.example +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omp-conductor",
|
|
3
|
-
"version": "0.3.
|
|
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
|
-
|
|
560
|
-
|
|
561
|
-
- **The dry run is the point.** Before
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
- **
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
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
|
|
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
|
|
6
|
+
# Update conductor
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
the
|
|
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
|
|
12
|
+
omp-conductor upgrade
|
|
140
13
|
```
|
|
141
14
|
|
|
142
|
-
|
|
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
|
|
18
|
+
omp-conductor upgrade --to X.Y.Z
|
|
173
19
|
```
|
|
174
20
|
|
|
175
|
-
|
|
176
|
-
|
|
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
|
-
|
|
179
|
-
|
|
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.
|