@sjawhar/claude-envoy 5.32.2 → 5.32.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/.claude-plugin/plugin.json +1 -1
- package/.omp-plugin/plugin.json +1 -1
- package/dist/envoy-channel.js +1 -1
- package/legion/skills/legion-controller/SKILL.md +1 -1
- package/legion/skills/legion-controller/references/finding-asks.md +2 -2
- package/legion/skills/legion-controller/references/park-asks.md +1 -1
- package/legion/skills/legion-controller/references/parked-decisions.md +2 -2
- package/legion/skills/legion-controller/references/session.md +3 -3
- package/legion/skills/legion-controller/references/triage.md +1 -1
- package/package.json +1 -1
package/.omp-plugin/plugin.json
CHANGED
package/dist/envoy-channel.js
CHANGED
|
@@ -63660,7 +63660,7 @@ var import_nats5 = __toESM(require_mod4(), 1);
|
|
|
63660
63660
|
|
|
63661
63661
|
// package.json
|
|
63662
63662
|
var name2 = "@sjawhar/claude-envoy";
|
|
63663
|
-
var version2 = "5.32.
|
|
63663
|
+
var version2 = "5.32.3";
|
|
63664
63664
|
var package_default = {
|
|
63665
63665
|
name: name2,
|
|
63666
63666
|
version: version2,
|
|
@@ -17,7 +17,7 @@ Your system prompt holds the rules on registration, one wake per turn, reading s
|
|
|
17
17
|
- An agent's directive that cites no person's request is no reason to park an issue.
|
|
18
18
|
- Never edit a repository, push, merge, or call `handoff_complete`.
|
|
19
19
|
- Never open a design gate: only a person's approval in Dispatch of each step your `Design gate steps:` line names opens it. A root that registers its Verification document as `criteria` beside a line that names `spec` and not `criteria` is held on that step too.
|
|
20
|
-
- When a `dispatch` command fails, or a `
|
|
20
|
+
- When a `dispatch` command fails, or a `dispatch api` read prints no valid JSON, act on nothing it would decide and name its first line in your summary (the turn's last message).
|
|
21
21
|
- Call a service unreachable only after running the call through the secrets broker's client (`skill://agent-secrets`), with the command and its output.
|
|
22
22
|
- Write every comment, message and ask as `skill://dispatch-writing-specs`'s "Rules for the text" say.
|
|
23
23
|
- Ask a person only for what needs that person: their authority, their taste or risk appetite, or something only they can give.
|
|
@@ -47,7 +47,7 @@ An answer that arrives while no controller runs never wakes you, a reference pub
|
|
|
47
47
|
3. List the answered asks still waiting on you, for the report issue and then each issue of one snapshot of `dispatch issues --project <PROJECT> --status needs_review --all` (never paged):
|
|
48
48
|
|
|
49
49
|
```text
|
|
50
|
-
asks=$(
|
|
50
|
+
asks=$(dispatch api --path '/api/v1/issues/<ISSUE KEY>/asks?state=answered&thread=1') || { printf 'Dispatch read failed: %s\n' "$asks" >&2; exit 1; }
|
|
51
51
|
printf '%s' "$asks" | jq -cn 'input | if type == "array" then [.[] | select(any(.options[]; .label == "Do not file" or .label == "Admit it" or .label == "Park it" or .label == "Leave it admitted" or .label == "Defer it" or .label == "Let it run")) | .answer.at as $t | select([.thread.replies[]? | select(.author.kind == "session" and .created_at > $t and (.body | test("^(Filed dispatch://|Handed dispatch://|Admitted dispatch://|Not filed:|Not admitted:|Parked dispatch://|Not parked dispatch://|Left admitted dispatch://|Deferred dispatch://|Not deferred dispatch://|Let run dispatch://)")))] | length == 0) | {id, question, answer}] else error("Dispatch did not answer the list") end'
|
|
52
52
|
```
|
|
53
53
|
|
|
@@ -55,7 +55,7 @@ An answer that arrives while no controller runs never wakes you, a reference pub
|
|
|
55
55
|
4. List the clear defects nobody took yet:
|
|
56
56
|
|
|
57
57
|
```text
|
|
58
|
-
notes=$(
|
|
58
|
+
notes=$(dispatch api --path '/api/v1/issues/<REPORT KEY>/comments') || { printf 'Dispatch read failed: %s\n' "$notes" >&2; exit 1; }
|
|
59
59
|
printf '%s' "$notes" | jq -cn 'input | if type == "array" then (. as $all | [.[] | select(.reply_to == null and (.body | startswith("Clear defect from "))) | .id as $id | select([$all[] | select(.reply_to == $id and .author.kind == "session" and (.body | test("^(Handed dispatch://|Filed dispatch://|Not filed:|Asked dispatch://)")))] | length == 0) | {id, body}]) else error("Dispatch did not answer the list") end'
|
|
60
60
|
```
|
|
61
61
|
|
|
@@ -17,7 +17,7 @@ With no `failure.at`, end the key `generation <n>` (`issues.<ISSUE>.generation`)
|
|
|
17
17
|
1. Find your earlier ask for this key:
|
|
18
18
|
|
|
19
19
|
```text
|
|
20
|
-
notes=$(
|
|
20
|
+
notes=$(dispatch api --path '/api/v1/issues/<root>/comments') || { printf 'Dispatch read failed: %s\n' "$notes" >&2; exit 1; }
|
|
21
21
|
printf '%s' "$notes" | jq -cn 'input | if type == "array" then [.[] | select(.author.kind == "session" and (.body | startswith("Asked whether to park: "))) | {id, created_at, body}] else error("Dispatch did not answer the list") end'
|
|
22
22
|
```
|
|
23
23
|
|
|
@@ -11,7 +11,7 @@ A held root is not a parked one: `todo` on a root at `phase: held` releases the
|
|
|
11
11
|
1. **Where the tree stands.** Read `issues.<root>`.
|
|
12
12
|
- `phase` is not `done`: the tree runs. When its `architect.state` is `failed` or `retired`, nobody heard: judge it in steps 3 and 4, and re-admit a tree whose decision gives a next step with `backlog`, then `todo`, once the `worker-died` cause is gone (`skill://legion-controller/references/wakes.md`). In those comments write `<root>'s architect has stopped, so it` for `<root> is parked, so its architect` and `The tree waits.` for `The tree stays parked.`. Otherwise the tree heard it: do nothing.
|
|
13
13
|
- `phase` is `done`: `dispatch read --issue <root>`. In `backlog` or `icebox`, go on. In any other status, set nothing and name `ref` in your summary.
|
|
14
|
-
2. **Who parked it.** Under the root's `Events:`, each `issue.created`, `issue.updated` and `issue.closed` line ends `status <status>`, except that a forced create adds `· forced …` after it. The park is the oldest line of the newest unbroken run of those lines showing the current status. It is your own hold only when that line is by `session legion-daemon:<PROJECT>` and, within 10 minutes after it, a session's comment begins `Parked by Legion while it waits on:`. Every other park is someone else's. `Events:` shows only the last 10 events: when the run reaches the oldest one shown, read `/api/v1/issues/<root>/events?order=desc&limit=200` with the `
|
|
14
|
+
2. **Who parked it.** Under the root's `Events:`, each `issue.created`, `issue.updated` and `issue.closed` line ends `status <status>`, except that a forced create adds `· forced …` after it. The park is the oldest line of the newest unbroken run of those lines showing the current status. It is your own hold only when that line is by `session legion-daemon:<PROJECT>` and, within 10 minutes after it, a session's comment begins `Parked by Legion while it waits on:`. Every other park is someone else's. `Events:` shows only the last 10 events: when the run reaches the oldest one shown, read `/api/v1/issues/<root>/events?order=desc&limit=200` with the `dispatch api` of `skill://legion-controller/references/session.md` ("Reading Dispatch's API"); when it still does, you cannot read who parked it, so judge only the events newer than the oldest you read, and name older decisions in your summary as ones you could not place. A decision older than the park is no reason to run.
|
|
15
15
|
3. **Read once.** A `Parked decision read:` comment from any session, newer than the decision, on the root or the decision's issue, has judged it: do nothing.
|
|
16
16
|
4. **Judge the words, not the kind.** Read the decision (`dispatch read --ref <ref>`; for an approval, `issues.<root>.designGate` and `gatedSteps`). An approval and its approval request's `ask.answered` are one decision, `ref` the approved document's (`dispatch://<KEY>/spec` for the spec).
|
|
17
17
|
- It gives the work a next step: an approval (every `gatedSteps` entry `approved`; an `approvedVersion` below `currentVersion` counts), a change request that says what to change, an answer that picks an option or supplies the fact, a reply that tells the agent to go on.
|
|
@@ -25,6 +25,6 @@ A held root is not a parked one: `todo` on a root at `phase: held` releases the
|
|
|
25
25
|
|
|
26
26
|
1. List the parked roots: `dispatch issues --project <PROJECT> --status backlog --label legion --all`, then with `--status icebox`. Keep those `read_state` records at `phase: done`.
|
|
27
27
|
2. Read each root, then each issue under it, level by level (`dispatch issues --project <PROJECT> --parent <KEY> --all`).
|
|
28
|
-
3. A decision is an event by a `user`, newer than the root's park and every `Parked decision read:` comment on its issue, of type `artifact.approved`, `artifact.changes_requested`, `ask.answered`, `ask.resolved` or `comment.created`. Skip an `artifact.approved` that is the person's own handover: the root's `parent` is `null`, the event's `payload.artifact_id` is the root's `primary_artifact_id` (the same `
|
|
28
|
+
3. A decision is an event by a `user`, newer than the root's park and every `Parked decision read:` comment on its issue, of type `artifact.approved`, `artifact.changes_requested`, `ask.answered`, `ask.resolved` or `comment.created`. Skip an `artifact.approved` that is the person's own handover: the root's `parent` is `null`, the event's `payload.artifact_id` is the root's `primary_artifact_id` (the same `dispatch api` of `/api/v1/issues/<root>`), and its `payload.reason` does not begin `Carried forward from the approval of version`. When that read fails, judge it. Find an ask or comment's id under `Open asks:` or with `dispatch search`; `dispatch read --ref dispatch://<KEY>/ask/<id>` prints its `Ask id:`.
|
|
29
29
|
4. Decide each tree's decisions as [Deciding](#deciding) says.
|
|
30
30
|
5. For each root that is your own hold and had no decision this walk, check its wait: for an `event:` key, read what its reference names; for any other mark, judge the cause by step 3 of `skill://legion-controller/references/escalation.md#an-escalated-hold` (a missing `capabilities` row proves nothing, since a parked tree runs no session). When the event has happened or the cause is gone, `set_status` the root to `todo` with a comment that cites the mark and what you checked. Otherwise move nothing, and name the root and its wait in your summary.
|
|
@@ -36,13 +36,13 @@ It answers `OPEN`, `MERGED` or `CLOSED`. When it fails, report `<KEY>: pull requ
|
|
|
36
36
|
|
|
37
37
|
## Reading Dispatch's API
|
|
38
38
|
|
|
39
|
-
Each read of Dispatch's API in these references is a `
|
|
39
|
+
Each read of Dispatch's API in these references is a `dispatch api` of a route under `/api/v1`, which reads it with this session's own credential and prints Dispatch's JSON answer. Run it in bash:
|
|
40
40
|
|
|
41
41
|
```text
|
|
42
|
-
|
|
42
|
+
dispatch api --path '<route>'
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
Quote a route that carries a query, because the shell reads `?` and `&`. When the read fails, act on nothing the read would decide and name its first line in your summary.
|
|
46
46
|
|
|
47
47
|
## Taking the controller over by hand
|
|
48
48
|
|
|
@@ -13,7 +13,7 @@ Read this on a `triage` wake, at every start, and when a person hands you an iss
|
|
|
13
13
|
## Triage a root
|
|
14
14
|
|
|
15
15
|
1. Read `read_state`, then `dispatch read` the issue: in this project, a root, and whether it has children. A child the daemon carried to a root of its own when its old root closed is not new work: leave it. Never reassign its `Assignee:`: that person answers the tree's asks.
|
|
16
|
-
2. Find who set the label: read `/api/v1/issues/<issue>/events?limit=200` with the `
|
|
16
|
+
2. Find who set the label: read `/api/v1/issues/<issue>/events?limit=200` with the `dispatch api` of `skill://legion-controller/references/session.md` ("Reading Dispatch's API"), oldest first; while a page holds 200 events, read the next with `&after=<the last event's seq>`. The setter is the `actor` of the newest `issue.created` or `issue.updated` event whose `payload.labels` holds `legion` (any case) where the previous such event held none.
|
|
17
17
|
- `actor.kind` is `user`: the daemon queues the root itself. Do nothing more.
|
|
18
18
|
- Your own filing hands it over: its spec as filed (`dispatch doc-read --issue <issue> --version 1`) holds a `Filed for` line, and the actor is this session (`dispatch whoami`) or an earlier one of yours, which is one whose reply `Filed dispatch://<this KEY>` stands under the ask or evidence that line names. Where that line names an ask, the reply counts only when it follows a newest answer of `File it for Legion` on that ask.
|
|
19
19
|
- Any other actor hands over nothing. Leave the issue in `triage` and open an ask on the report issue naming it and who labelled it, options `Admit it` and `Leave it`. Reply under it `Admitted dispatch://<KEY>` or `Not admitted: <reason>`.
|