@sjawhar/opencode-legion-envoy 3.11.1 → 3.11.2
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/dist/src/server.js +7937 -2099
- package/package.json +1 -1
- package/skills/envoy/SKILL.md +9 -5
- package/skills/legion-worker/SKILL.md +16 -0
package/package.json
CHANGED
package/skills/envoy/SKILL.md
CHANGED
|
@@ -28,7 +28,10 @@ NATS `>` matches **one or more** trailing tokens, so it does not match the lifec
|
|
|
28
28
|
subject and its child events.
|
|
29
29
|
|
|
30
30
|
For a typical push, this receives `pr.42` with `synchronize`, then any comments or reviews, then
|
|
31
|
-
one `pr.42.checks` event when that head's checks settle.
|
|
31
|
+
one `pr.42.checks` event when that head's checks settle. A settlement is published for every
|
|
32
|
+
commit of the pull request whose checks settle, the current head or not (a head pushed with
|
|
33
|
+
GitHub's `skip-checks` trailer runs none, so the commit before it settles for it), and its `sha`
|
|
34
|
+
names the commit: compare it with the head you are waiting on. The family is `pr.42` (lifecycle),
|
|
32
35
|
`pr.42.comment`, `pr.42.review`, `pr.42.mention`, and `pr.42.checks`. A closed lifecycle payload
|
|
33
36
|
carries `merged`, `merge_commit_sha`, `merged_by`, and `head_sha`.
|
|
34
37
|
|
|
@@ -147,13 +150,14 @@ advertises.
|
|
|
147
150
|
## Waiting for CI or a merge
|
|
148
151
|
|
|
149
152
|
Subscribe to `notifications.github.example-org.example-repo.pr.42.>` and end the turn. The single
|
|
150
|
-
`pr.42.checks` event
|
|
153
|
+
`pr.42.checks` event whose `sha` is the current head wakes you when it settles (an earlier
|
|
154
|
+
commit's settlement can arrive first); a `pr.42` `closed` event with
|
|
151
155
|
`merged: true` tells you the PR merged. Do not create `gh` pollers.
|
|
152
|
-
Settlement waits for the
|
|
156
|
+
Settlement waits for the commit to be quiet for a few seconds, every reported check run to finish,
|
|
153
157
|
and every recorded GitHub check suite to be `completed`. It covers those reported checks and suites
|
|
154
|
-
for
|
|
158
|
+
for that commit, not GitHub's required-checks set; until then, a silent subscription is normal.
|
|
155
159
|
|
|
156
|
-
Check settlement is at-least-once: a settlement can be followed by a `superseded_settlement: "true"` payload. Every settlement carries its attempt set `check_runs` — the latest GitHub check-run id per check name, sorted by name — plus the listener's `generation` (the record's state version) and `snapshot` (the record's hash). Consumers order
|
|
160
|
+
Check settlement is at-least-once: a settlement can be followed by a `superseded_settlement: "true"` payload. Every settlement carries its attempt set `check_runs` — the latest GitHub check-run id per check name, sorted by name — plus the listener's `generation` (the record's state version) and `snapshot` (the record's hash). Consumers order settlements of one commit by the attempt set, compared per shared name: no id lower and some id higher (or a new name — a new name counts as higher) is newer; every shared id equal and no new name is the same set; no id higher, no new name, and some id lower is older; anything else (a higher or new alongside a lower) is a mixed view and is dropped as a conflict (names only in the stored set are ignored — a check can vanish from GitHub's view, and a record recreated after the seven-day KV TTL starts sparse). Within one producer record per-name ids never decrease, and a consumer's fence is the per-name maximum over every view it has accepted — an accepted set merges into the fence, nothing is pruned — so the fence never decreases either: a newer attempt is newer whatever its completion time, no timestamps take part in ordering, and a name an incomplete view omitted cannot later reappear as new. At the same set the listener's `generation` orders its own settlements: lower is stale; equal is a duplicate when the `snapshot` matches and otherwise a conflict (an equal pair with a different snapshot cannot occur within one record's lifetime; a recreated record may reuse one and is dropped). A live settlement is a possibly incomplete view of the head (a missed webhook, a record recreated after the KV TTL): it decides the outcome of every name it reports — at any id the ordering accepted, including the same run observed in place — and says nothing about the rest: a known failure among them stands (the consumer keeps failure names, not a per-name status map), and the head is red while any failure remains. A consumer that reconciles a verdict from GitHub's rollup compares the rollup's attempt set the same way, but GitHub's read is complete: its failing check runs and failing commit statuses replace the stored ones wholesale. Statuses have no check run and the listener never sees them, so a consumer keeps them apart from check-run failures: a check run that shares a status's name cannot retire it — only GitHub does (likewise a deleted check's failure). A newer rollup set merges into the fence and takes the identity (no listener generation); the same set applies GitHub's verdict and keeps the listener identity for duplicate detection; an older, mixed, or empty-over-fenced set is ignored. A terminal read (green or red) then holds the tie at that set: a live settlement at the same set is accepted only if its effective outcome — the check-run failures it reports plus the stored ones it omits and the stored commit-status failures — agrees with the reconciled verdict, refreshing the listener identity without releasing GitHub's authority; a disagreeing one is stale whatever its generation until the set advances; a pending or cancelled-only read uncertifies a green head, leaves a red one untouched, and holds nothing — it releases any authority held at that set — so the terminal live settlement that follows applies at once, subject to the ordinary generation and duplicate rules (a replay or a lower generation still does not apply). Pending is therefore not a commutative join: a pending read after a live green uncertifies it until the next terminal view. Two remainders. An in-place conclusion change on an existing run id: GitHub's view stands and the listener's is recovered by the next successful, non-skipped read at that set — the dropped delivery is not replayed. A check whose highest run is deleted on GitHub: the fence keeps that id, so a rollup reporting a lower run under the same name is older until a newer run appears. A consumer that orders head changes by the PR's `updated_at` (GitHub's second resolution) accepts a read of a different head at an equal clock — a stale read returning the previous head within the same second as its replacement rewinds that consumer until its next accurate, non-skipped read. A head publishes only when at least one check has a positive run id; legacy checks without one remain in the status groups and failing names but not in `check_runs`. A legacy in-progress check whose completion is never observed holds the head unsettled until it reruns; rerun the affected check to release it.
|
|
157
161
|
|
|
158
162
|
## When a subscription is silent
|
|
159
163
|
|
|
@@ -145,6 +145,22 @@ Anything else, stop and send the owning architect the `jj -R "$LEGION_WORKSPACE"
|
|
|
145
145
|
evidence; the architect decides, and an operator performs any operation-log restore with every
|
|
146
146
|
other tree paused.
|
|
147
147
|
|
|
148
|
+
**Filesystem and process safety:** Your pane runs as the operator's own user, so one mistaken
|
|
149
|
+
path can destroy the machine every agent shares (on 2026-09-13 a probe script's leftover
|
|
150
|
+
`rm -rf "$work" "$HOME"` deleted the operator's SSH and signing keys and stopped every worker).
|
|
151
|
+
The extension refuses, before it runs, a `bash` command, `eval` code, or `hub` process start
|
|
152
|
+
(yours or a `task` subagent's) that would delete, move, truncate, overwrite an existing file by
|
|
153
|
+
redirection or `tee`, or `chmod -R`/`chown -R` anything outside `$LEGION_WORKSPACE` and any
|
|
154
|
+
directory below `/tmp` except `/tmp` itself, a glob over it, and its tmux and ssh socket
|
|
155
|
+
directories. It cannot tell which allowed `/tmp` directory belongs to your pane. It follows
|
|
156
|
+
`$HOME`, `~`, variables, `cd`, and the scripts a command runs. A target with no proven path prefix
|
|
157
|
+
is refused; an unknown trailing component under a prefix already proven inside your workspace or
|
|
158
|
+
permitted `/tmp` remains allowed. `pkill` and `killall` are refused, and `kill` only reaches a
|
|
159
|
+
process you started (a descendant of your Oh My Pi process): stop your own long-running processes
|
|
160
|
+
through the hub tool. The refusal names the target and the rule; do not rewrite a script just to
|
|
161
|
+
silence it. This is a mistake-guard rather than a sandbox. What it cannot read, a compiled program
|
|
162
|
+
or code whose paths are only known at run time, is still yours to keep inside the workspace.
|
|
163
|
+
|
|
148
164
|
## Phase work
|
|
149
165
|
|
|
150
166
|
Specifications written into Dispatch follow `skill://dispatch`'s [Writing a spec](../dispatch/SKILL.md#writing-a-spec).
|