@sjawhar/claude-envoy 1.3.0 → 1.3.1

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.
@@ -2,5 +2,5 @@
2
2
  "name": "claude-envoy",
3
3
  "description": "Deliver Envoy events as Claude Code channel notifications and expose Envoy MCP tools.",
4
4
  "mcpServers": "./.mcp.json",
5
- "version": "1.3.0"
5
+ "version": "1.3.1"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-envoy",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Deliver Envoy events as Claude Code channel notifications and expose Envoy MCP tools.",
5
5
  "mcpServers": {}
6
6
  }
@@ -54336,7 +54336,7 @@ var import_nats2 = __toESM(require_mod4(), 1);
54336
54336
 
54337
54337
  // package.json
54338
54338
  var name = "@sjawhar/claude-envoy";
54339
- var version2 = "1.3.0";
54339
+ var version2 = "1.3.1";
54340
54340
  var legion = {
54341
54341
  daemonApiVersion: 51
54342
54342
  };
@@ -102,7 +102,8 @@ The daemon keeps this order from its fixed table; you start none of its steps:
102
102
  4. The merger quotes what sits above the approved head
103
103
  (`jj diff --from <approved-sha> --to <tip-sha> --summary`) in READY and sends the READY packet
104
104
  with its completion. The daemon refuses a head carrying anything above the approved head but a
105
- commit that changes only `docs/solutions/` and the handoff import's removal of `.legion/` files
105
+ commit that changes only `docs/solutions/` and a change whose every path is under `.legion/`,
106
+ which nothing writes or reads now, so nobody reviews one
106
107
  (`READY_UNREVIEWED_CHANGE`). It
107
108
  posts `READY #<n> at <current sha> (approved at <approved sha>) for <KEY> (<pr url>)` on the
108
109
  Dispatch issue, publishes it to the project's merge queue role when one is set, and submits the
@@ -127,7 +128,7 @@ from `accepting` you send an issue back only to `implementing` or `testing`.
127
128
  ## A conflicting head
128
129
 
129
130
  What returns the tree to review is a changed diff: a commit above the approved head that touches
130
- anything outside `docs/solutions/`, other than the handoff import's removal of `.legion/` files, or
131
+ anything outside `docs/solutions/`, other than a change whose every path is under `.legion/`, or
131
132
  a conflict-resolution merge whose fingerprint (the unchanged-diff check,
132
133
  `skill://legion-worker/references/conflicts-and-rewrites.md`) differs from the approved head's.
133
134
  A merge forced by a GitHub-reported conflict whose fingerprint is unchanged does
@@ -125,11 +125,10 @@ an approval of a document that is not the root's primary one.
125
125
  - It only questions the work: a question, a doubt about the premise, a request for changes that
126
126
  only asks why. Leave it parked and answer the question in one reply:
127
127
  - Answer from the record when it holds the answer: the issue and its spec (`dispatch read`,
128
- `dispatch doc-read`), its handoffs (`.legion/<KEY>/<phase>.json` on the branch
129
- `legion/<KEY>`, read with `gh api` as `skill://legion-architect` reads a child's) and its
130
- pull request. Write `Parked decision read: <ref> by <login> asks <the question in a few
131
- words>.`, then the answer and where in the record it is, then `The tree stays parked. Set
132
- <root> to todo to run it.`
128
+ `dispatch doc-read`), its handoffs (`dispatch handoff-read --issue <KEY> --phase <word>`)
129
+ and its pull request. Write `Parked decision read: <ref> by <login> asks <the question in
130
+ a few words>.`, then the answer and where in the record it is, then `The tree stays parked.
131
+ Set <root> to todo to run it.`
133
132
  - When the record does not answer it, write `Parked decision read: <ref> by <login> asks
134
133
  <the question in a few words>. The record does not answer it, and <root> is parked, so
135
134
  its architect cannot answer either. Set <root> to todo to bring its architect back to
@@ -22,9 +22,10 @@ The head the merger names is the head the reviewer approved.
22
22
  - **A change after the approved head** (`READY_UNREVIEWED_CHANGE`): the
23
23
  daemon diffs the reviewer's approved head against the head on GitHub, and the issue goes back to
24
24
  the reviewer for another review. READY still lets through a commit that changes only
25
- `docs/solutions/`, which no role writes any more, and a file under `.legion/` that GitHub lists
26
- as removed: the commit `legion handoffs import` makes, never one of yours. Since retro commits
27
- nothing, an ordinary head carries neither.
25
+ `docs/solutions/`, which no role writes any more, and a change whose every path is under
26
+ `.legion/`, where handoffs lived before they moved to the Dispatch issue and which nothing
27
+ writes or reads now, so nobody reviews a path there. Since retro commits nothing, an ordinary
28
+ head carries neither.
28
29
  - `READY_UNREVIEWED_CHANGE` has more causes than a path outside retro's own. Every one of them
29
30
  sends the head back to review and none is an error to retry; the complete list, with each
30
31
  remedy, is the merger's own role prompt part.
@@ -38,7 +38,7 @@ Read each by its `skill://` link: a read by path stops at 300 lines.
38
38
  | You write or edit the PR body, record a result against a check, read another phase's results, or run the simplify pass | `skill://legion-worker/references/pr-body.md` |
39
39
  | Before a push, to check your commits' App identity | `skill://legion-worker/references/default-branch-check.md` |
40
40
  | You reply on, list or resolve review threads, or judge a bot's finding | `skill://legion-worker/references/review-threads.md` |
41
- | A conflict, a need only the base meets, a retarget, a parent's last round, comparing heads after a forward merge, a push refused after the handoff import moved the branch, or rewriting a pushed commit | `skill://legion-worker/references/conflicts-and-rewrites.md` |
41
+ | A conflict, a need only the base meets, a retarget, a parent's last round, comparing heads after a forward merge, or rewriting a pushed commit | `skill://legion-worker/references/conflicts-and-rewrites.md` |
42
42
  | You review or approve, build READY, or run the production check | `skill://legion-worker/references/merge-gate.md` |
43
43
  | The issue renames a repository, package, or URL across the codebase | `skill://legion-worker/references/systematic-rename.md` |
44
44
  | The issue deletes code, a command, or documentation | `skill://legion-worker/references/cleanup-deletion.md` |
@@ -51,7 +51,6 @@ Read each by its `skill://` link: a read by path stops at 300 lines.
51
51
  - Before a push, read `jj -R "$LEGION_WORKSPACE" log -r 'ancestors(@, 5)'` (earlier phases' commits in it are expected) and run the identity check (`skill://legion-worker/references/default-branch-check.md`). Add no attribution trailer: the pane's jj adds `Omp-Session:`.
52
52
  - Only work is pushed: code, red tests, a forward merge, a rewrite, and the empty commit that carries the pull request onto the commit you pushed (the bullet below). No commit message carries a line or bracket keyword that stops GitHub's workflows (`[skip ci]` and its kin), since every head needs its own checks and a base that requires a check will not merge a head whose checks never ran. Retro pushes nothing: it records what the work taught with `dispatch comment` on the issue.
53
53
  - **After a push, read the pull request's head and check that it is your commit.** A branch and a pull request are two objects on GitHub: the push moves the branch, and GitHub then moves the pull request onto the new commit, which is what starts its checks. Twice on 2026-11-05 it did not, and the newer commit got no checks while Legion read, tested and would have merged the older one. The step applies once the branch has an open pull request, whose number your task's `Pull request:` line names (`gh pr list --repo <the issue's repository> --head legion/<KEY> --state open --json number --jq '.[0].number'` when it names none): run `gh pr view <n> --repo <the issue's repository> --json headRefOid --jq .headRefOid` about ten seconds after your push, again about ten seconds later, and a last time about thirty seconds after that, with a read that gives the pushed commit ending the step there and only the last read deciding a mismatch, and compare each answer with the commit you pushed, which `jj -R "$LEGION_WORKSPACE" log -r legion/<KEY>@origin --no-graph -T commit_id` prints in the 40 characters `headRefOid` answers in. This read is of the pull request's own head and of no check, so the wait it makes is not a wait on CI (`skill://legion-worker/references/pr-body.md#never-waiting-on-ci`). When the last read still is not your commit, carry the pull request with a commit of its own, an empty one when your work is complete and an empty one just as much when `@` holds work of yours, since a push of a commit the branch already holds moves no ref; the push section of your role prompt gives the one `jj` recipe, which leaves `@` and everything in it where it is. A new head makes every result recorded at the old head older, so record each `before_merge` check again at the new head. When that second push does not carry the pull request either, tell your architect the commit you pushed, the head each read gave and the time of each, and end the turn with a WAITING line naming that answer rather than completing: a phase completed here hands the next role a commit the pull request does not name. The push you make to answer an update task is the exception: that task has you answer the daemon and end the turn at once, so make this read in your next turn, before your phase completes. The merger pushes nothing, so this step never falls to it; it reports a mismatch it sees to the architect.
54
- - A push refused because `legion handoffs import` moved `legion/<KEY>@origin` (its commit's message is `chore(legion): <KEY>'s handoffs are on its Dispatch issue now`) is cured by `jj -R "$LEGION_WORKSPACE" git fetch`, a forward merge with `legion/<KEY>@origin`, and the push (`skill://legion-worker/references/conflicts-and-rewrites.md`, *After the handoff import moved the branch*): never a rewrite.
55
54
  - A planner whose issue moved back from implementing starts on the remote tip, `jj -R "$LEGION_WORKSPACE" new legion/<KEY>@origin`, so a commit it makes never sits on the implementer's unpushed commits.
56
55
 
57
56
  ## PR body, review, and the merge gate
@@ -2,9 +2,8 @@
2
2
 
3
3
  Part of `skill://legion-worker`. Read it when GitHub reports the pull request `CONFLICTING`, the
4
4
  controller asks you to resolve a conflict, the change needs something only the base has, the pull
5
- request is retargeted to a new base, you compare two heads after such a merge, a push is refused
6
- because the handoff import moved the branch, or you are about to rewrite a commit you already
7
- pushed.
5
+ request is retargeted to a new base, you compare two heads after such a merge, or you are about to
6
+ rewrite a commit you already pushed.
8
7
  Every path it cites is in cybermonklabs/legion.
9
8
 
10
9
  ## Reintegrating the base
@@ -65,13 +64,6 @@ Every path it cites is in cybermonklabs/legion.
65
64
  pushes its own commits* in `skill://legion-worker`; a merge is a code push like any other): the
66
65
  merge descends from both the bookmark's old position and the destination, so it is a genuine
67
66
  fast-forward and *Rewriting pushed commits* never applies.
68
- - **After the handoff import moved the branch.** `legion handoffs import` moves `legion/<KEY>`
69
- once, with a commit whose message is `chore(legion): <KEY>'s handoffs are on its Dispatch issue
70
- now`, which removes the `.legion/` directory where handoffs lived before they moved to Dispatch.
71
- A push it refuses as a moved branch is cured forward: `jj -R "$LEGION_WORKSPACE" git fetch`,
72
- then `jj -R "$LEGION_WORKSPACE" new @- legion/<KEY>@origin -m "merge: legion/<KEY>@origin after
73
- the handoff import"` (from `@-`, your own described tip, since your local bookmark may now
74
- disagree with the remote one), `jj -R "$LEGION_WORKSPACE" new`, and the push — never a rewrite.
75
67
  - **After a retarget.** Retargeting a pull request to a new base does not re-run Tests. Read
76
68
  `base` again and merge the bookmark onto it in one command
77
69
  (`base=$(gh pr view <n> -R <owner>/<repo> --json baseRefName -q '.baseRefName | @json') && jj -R "$LEGION_WORKSPACE" new legion/<KEY> "${base}@origin" -m "<message>"`) and push it the
@@ -105,7 +97,8 @@ fingerprint=$(set -o pipefail; jj -R "$LEGION_WORKSPACE" diff --from "fork_point
105
97
  on a merge) and `index` lines (blob ids move when the base's copy of a file changed). What
106
98
  is left is exactly the added and removed lines per file.
107
99
  - The single fileset `'~(.legion | docs/solutions)'` leaves out `.legion/`, where handoffs lived
108
- before they moved to Dispatch (the handoff import's commit removes it), and retro's learnings:
100
+ before they moved to Dispatch and which nothing writes or reads now, so nobody reviews a path
101
+ there, and retro's learnings:
109
102
  paths the merge gate lets through above an approval
110
103
  (`skill://legion-worker/references/merge-gate.md`), which change
111
104
  between one role's verified head and the next without changing the product. This is what lets
@@ -9,9 +9,10 @@ architect's acceptance, in `accepting` → retro → the merger's READY → the
9
9
  issue → the implementer's production check, after the close. Every handoff is a record on the
10
10
  Dispatch issue, never a commit, so the head that merges carries none. Retro commits nothing
11
11
  (*Retro*, below), so the approved head is the head that merges. READY still lets a commit that
12
- changes only `docs/solutions/` stand, and a file under `.legion/` that GitHub's compare lists as
13
- removed, the commit `legion handoffs import` makes to remove the directory where handoffs lived
14
- before they moved to Dispatch. A conflict-forced merge goes back to the reviewer for a
12
+ changes only `docs/solutions/` stand, and a change whose every path is under `.legion/`, where
13
+ handoffs lived before they moved to the Dispatch issue and which nothing writes or reads now, so
14
+ nobody reviews a path there, whatever GitHub's compare says the change did to it.
15
+ A conflict-forced merge goes back to the reviewer for a
15
16
  confirmation or a new round, as the fingerprint decides (*The reviewer*, below, and
16
17
  `skill://legion-worker/references/conflicts-and-rewrites.md`), unless READY refused it, and any
17
18
  other change to the head voids it.
@@ -110,8 +111,8 @@ other change to the head voids it.
110
111
  `REQUEST_CHANGES` when the code is at fault, and your own commit to fix when your prose broke
111
112
  it. The architect reads your prose commits at its acceptance (*The architect's acceptance*,
112
113
  below), and that read is no new round. A round after a READY refusal is the one exception. Its
113
- approval needs the tester's results to be current at the head, or at an ancestor with only files
114
- under `.legion/` removed since. So there you fix no prose yourself, and you name each prose
114
+ approval needs the tester's results to be current at the head, or at an ancestor with only paths
115
+ under `.legion/` changed since. So there you fix no prose yourself, and you name each prose
115
116
  finding in a `REQUEST_CHANGES`.
116
117
 
117
118
  A reviewer's phase ends with its completion, not with its review. Every round records a handoff
@@ -162,7 +163,7 @@ reviewing until you finish.
162
163
  `dispatch comment` on the issue for the skill librarian, brings the PR body up to date and
163
164
  completes (`skill://legion-retro` gives the steps), so the approved head is the head READY
164
165
  names. Anything above the approved
165
- head voids the approval, except the handoff import's removal of `.legion/` files and a commit
166
+ head voids the approval, except a change whose every path is under `.legion/` and a commit
166
167
  that changes only `docs/solutions/`, which READY still lets through: READY is refused
167
168
  `READY_UNREVIEWED_CHANGE`, naming the paths, and the merger tells the architect, who has it send
168
169
  the head back to review instead of completing, the move's reason naming the refusal's code and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code channel plugin for Legion's Envoy bus",
6
6
  "type": "module",