@sjawhar/opencode-legion-envoy 3.2.2 → 3.2.3
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
|
@@ -71,9 +71,11 @@ launcher, and started you with `LEGION_CONTROLLER=1` and the same environment a
|
|
|
71
71
|
carries, so nothing changes in how you handle wakes. Under the TypeScript daemon the extension
|
|
72
72
|
claims the role and calls `/controller/ready` exactly as under tmux; under the Go daemon
|
|
73
73
|
(`LEGION_DAEMON_API=go` in your environment) it registers on `/legion/v1/claims/register` with the
|
|
74
|
-
secret,
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
secret, claims the role, then subscribes to `notifications.legion.<project>.controller`, where the
|
|
75
|
+
Go daemon publishes the two Go rows of the wake routing table. The daemon records you as
|
|
76
|
+
`controllerLocator: {runtime, external: true, sessionId, registeredAt}`, `runtime` being the
|
|
77
|
+
daemon's own (`kubernetes`, or `tmux` under the Go daemon). The TypeScript daemon reads your
|
|
78
|
+
liveness from the Envoy role registry (the holder of
|
|
77
79
|
`legion-<project>-controller` and its `last_seen`), not from a pane: keep the session running.
|
|
78
80
|
Exiting it leaves the project without a controller until the operator runs the command again —
|
|
79
81
|
the TypeScript daemon logs `controller not registered; run legion controller start` once per
|
|
@@ -81,6 +83,20 @@ boot-timeout interval and launches nothing itself. `legion state` and `legion st
|
|
|
81
83
|
<status>` work here over `LEGION_DAEMON_URL`. A second `legion controller start` replaces you: it
|
|
82
84
|
mints a new secret, so your grants stop working and the role moves to the new session.
|
|
83
85
|
|
|
86
|
+
### What happened before you started (Go daemon)
|
|
87
|
+
|
|
88
|
+
The Go daemon's controller topic is a wake for a session that is running when it is published.
|
|
89
|
+
Envoy hands an Oh My Pi session no retained copy of a notice published before it subscribed, so a
|
|
90
|
+
hold or a tree architect's failed claim from while no controller ran never arrives as a wake. At
|
|
91
|
+
every start, before anything else, read `legion state --json` and handle each issue whose
|
|
92
|
+
`issues.<KEY>.phase` is `held` (its `issues.<KEY>.holdReason` is `escalated` when its architect
|
|
93
|
+
sent it to you, and absent while the architect is still deciding or while its tree lingers or is
|
|
94
|
+
closed, where the hold waits for the tree's re-admission and needs nothing from you), and each
|
|
95
|
+
tree root whose `issues.<KEY>.architect.state` is `failed` and whose `issues.<KEY>.phase` is not
|
|
96
|
+
`done`, exactly as the matching wake below. A parked tree (root phase `done`: it lingers or is
|
|
97
|
+
closed) needs nothing from you: a failed architect ignores the park and reads `failed` until the
|
|
98
|
+
tree closes. The issue record is the truth; the topic is the wake.
|
|
99
|
+
|
|
84
100
|
## Deployment instructions
|
|
85
101
|
|
|
86
102
|
Deployment instructions, when present, are the operator's standing rules for this repository —
|
|
@@ -116,6 +132,8 @@ quoted here.
|
|
|
116
132
|
| Mention | Slack/GitHub PR @mention text | Answer, or route to the owning issue's architect role |
|
|
117
133
|
| READY packet seen on a Dispatch issue (via issue subscription) | READY line + gate facts | No action: a human merges; the merger has already notified the queue role if the project has one |
|
|
118
134
|
| `worker-recovered` (role `architect`) from the daemon | issue, fromRef | A root architect's tree volume was lost; it restarted as a new session. Verify the tree is active in `legion state` and that the architect posts its next step on the issue within one resync interval; otherwise treat it as an anomaly. |
|
|
135
|
+
| `held on <KEY>` from the Go daemon (payload `{kind: "held", phase, role?, reason?}`) | the held issue, the phase it left, and the role whose claim failed, or `reason: "escalated"` | Verify the hold in `legion state` (the issue's phase is `held`). Without `reason`, a phase worker's launches or prompts ran out and the tree's architect decides retry or escalate: no action. With `reason: "escalated"` (on the record, `issues.<KEY>.holdReason` is `escalated`), the architect sent it to you: handle it as an architect escalation below. Parking the tree is `legion status <root> backlog`; setting the root back to `todo` later re-admits it as a new generation, which starts again from its architect |
|
|
136
|
+
| `worker-died on <KEY>` from the Go daemon with `role: "architect"` | the tree root whose architect's claim failed, and the phase the root was in | The tree's architect ran out of launches or prompts and the daemon relaunches nothing; every other notice of the tree goes to that architect, so nobody inside the tree can act. Verify in `legion state` (`issues.<KEY>.architect.state` is `failed`); if the root's phase is `done`, the tree is already parked: no action. Otherwise re-admit the tree (`legion status <root> backlog`, then `todo`: a new generation, whose architect starts again with fresh budgets) or leave it parked and say why on the issue |
|
|
119
137
|
| Closed-tree activity (comment, review, CI on a closed tree) | issue, root, event summary | Read the artifact; if work should resume, `legion status <root> todo`; otherwise no action — the event is not held or redelivered |
|
|
120
138
|
| Direct user message | — | Always first |
|
|
121
139
|
|