@sjawhar/claude-envoy 5.7.0 → 5.9.0

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": "Put Envoy events into the Claude Code session's own conversation and expose Envoy MCP tools.",
4
4
  "mcpServers": "./.mcp.json",
5
- "version": "5.7.0"
5
+ "version": "5.9.0"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-envoy",
3
- "version": "5.7.0",
3
+ "version": "5.9.0",
4
4
  "description": "Put Envoy events into the Claude Code session's own conversation and expose Envoy MCP tools.",
5
5
  "mcpServers": {}
6
6
  }
@@ -18732,7 +18732,7 @@ var INSTANCE_PATTERN = "[A-Za-z0-9*?._\\[\\]-]{1,100}";
18732
18732
  var NUMBER = "[0-9]{1,6}";
18733
18733
  var CLAIM = "[A-Za-z0-9_.:-]{1,64}";
18734
18734
  var URI = "[A-Za-z0-9:/._-]{1,200}";
18735
- var SESSION_RULE = "a session name is printable, carries no whitespace, and is at most [0-9]{1,4} bytes";
18735
+ var SESSION_RULE = "a session name is printable, carries no whitespace, '\\*' or '>', and is at most [0-9]{1,4} bytes";
18736
18736
  function escapeRegExp(text) {
18737
18737
  return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
18738
18738
  }
package/dist/dispatch.js CHANGED
@@ -19059,7 +19059,7 @@ var INSTANCE_PATTERN = "[A-Za-z0-9*?._\\[\\]-]{1,100}";
19059
19059
  var NUMBER = "[0-9]{1,6}";
19060
19060
  var CLAIM = "[A-Za-z0-9_.:-]{1,64}";
19061
19061
  var URI = "[A-Za-z0-9:/._-]{1,200}";
19062
- var SESSION_RULE = "a session name is printable, carries no whitespace, and is at most [0-9]{1,4} bytes";
19062
+ var SESSION_RULE = "a session name is printable, carries no whitespace, '\\*' or '>', and is at most [0-9]{1,4} bytes";
19063
19063
  function escapeRegExp(text) {
19064
19064
  return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
19065
19065
  }
@@ -42607,7 +42607,7 @@ var INSTANCE_PATTERN = "[A-Za-z0-9*?._\\[\\]-]{1,100}";
42607
42607
  var NUMBER = "[0-9]{1,6}";
42608
42608
  var CLAIM = "[A-Za-z0-9_.:-]{1,64}";
42609
42609
  var URI = "[A-Za-z0-9:/._-]{1,200}";
42610
- var SESSION_RULE = "a session name is printable, carries no whitespace, and is at most [0-9]{1,4} bytes";
42610
+ var SESSION_RULE = "a session name is printable, carries no whitespace, '\\*' or '>', and is at most [0-9]{1,4} bytes";
42611
42611
  function escapeRegExp(text) {
42612
42612
  return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
42613
42613
  }
@@ -60890,7 +60890,7 @@ var import_nats5 = __toESM(require_mod4(), 1);
60890
60890
 
60891
60891
  // package.json
60892
60892
  var name2 = "@sjawhar/claude-envoy";
60893
- var version2 = "5.7.0";
60893
+ var version2 = "5.9.0";
60894
60894
  var legion = {
60895
60895
  daemonApiVersion: 213
60896
60896
  };
@@ -18733,7 +18733,7 @@ var INSTANCE_PATTERN = "[A-Za-z0-9*?._\\[\\]-]{1,100}";
18733
18733
  var NUMBER = "[0-9]{1,6}";
18734
18734
  var CLAIM = "[A-Za-z0-9_.:-]{1,64}";
18735
18735
  var URI = "[A-Za-z0-9:/._-]{1,200}";
18736
- var SESSION_RULE = "a session name is printable, carries no whitespace, and is at most [0-9]{1,4} bytes";
18736
+ var SESSION_RULE = "a session name is printable, carries no whitespace, '\\*' or '>', and is at most [0-9]{1,4} bytes";
18737
18737
  function escapeRegExp(text) {
18738
18738
  return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
18739
18739
  }
@@ -19,8 +19,8 @@ Read, against the goal, every check and every requirement:
19
19
  3. the reviewer's approval of the head its Legion footer names, never its `commit_id`
20
20
  (`skill://legion-worker/references/merge-gate.md`);
21
21
  4. each claim of the reviewer's prose, against the code at that head;
22
- 5. `gh pr view <n> --json mergeable,mergeStateStatus`: a `CONFLICTING` head gets no CI
23
- (*A conflicting head*, below).
22
+ 5. `gh pr view <n> --json mergeable,mergeStateStatus`: a `CONFLICTING` head whose checks passed
23
+ is accepted as any other, and the merger merges the base forward (*A conflicting head*, below).
24
24
 
25
25
  - `sign_off` works only in `accepting`, where the Dispatch status reads `needs_review`; your
26
26
  `handoff_complete` there is refused (`ACCEPTANCE_IS_SIGN_OFF`).
@@ -66,29 +66,31 @@ Retro runs, then the merger merges the approved head under the repository's own
66
66
  none of it. A person's request after your sign-off is a requirement of this issue: the role that
67
67
  holds the phase makes the `request_backward_move`. When the merger reports:
68
68
 
69
- - a failed verification: tell it to move the issue back with `request_backward_move`, naming what
70
- failed;
69
+ - the issue moved back with `request_backward_move`: its reason says why the fix is a change to
70
+ the change's own logic that no merge of the base resolves; you start nothing;
71
71
  - a merge GitHub refuses for a repository setting or an App permission: open a `dispatch ask`
72
72
  naming the pull request, the head and GitHub's refusal, and never bypass a rule;
73
73
  - a squash into a base other than the default branch: tell the implementer of each open pull
74
74
  request of the tree built on that branch whose issue is yours and still in `implementing` to
75
75
  merge that base forward in its implementing round. Past `implementing`, the daemon asks for that
76
- merge itself (*A conflicting head*, below).
76
+ merge itself, and past the review the merger makes it (*A conflicting head*, below).
77
77
 
78
78
  ## A conflicting head
79
79
 
80
- A head that conflicts with its base keeps the issue in its phase. The daemon asks the implementer
81
- to merge the base forward only when the next step needs a mergeable head (*The daemon's ask* in
82
- `skill://legion-worker/references/conflicts-and-rewrites.md`). A conflict it does not act on yet
83
- is recorded: the tester and the reviewer go on at that head, an approval of it ends the review
84
- round, and the daemon acts when the issue enters `accepting`. When it asks outside
85
- `implementing`, it tells you once by `checks-red`, naming the phase the issue stays in, the head,
86
- the base and why; in `implementing` no notice comes. You start nothing for the merge.
80
+ A head that conflicts with its base keeps the issue in its phase. Before the review the daemon asks
81
+ the implementer to merge the base forward only when the next step needs a mergeable head (*The
82
+ daemon's ask* in `skill://legion-worker/references/conflicts-and-rewrites.md`). A conflict it does
83
+ not act on yet is recorded: the tester and the reviewer go on at that head, and an approval of it
84
+ ends the review round. Past the review the merge is the merger's: in `accepting` and `retro` the
85
+ conflict waits, so accept the head as any other, and once the issue enters `merging` the daemon
86
+ asks the merger to merge the base forward; a check the base's newer code breaks is the merger's to
87
+ fix in that merge too. When it asks, the daemon tells you once by `checks-red`, naming the phase the
88
+ issue stays in, the role asked, the head, the base and why; in `implementing` no notice comes. You
89
+ start nothing for the merge.
87
90
 
88
91
  Past review, the daemon also asks the reviewer to read the merge and approve the new head by its
89
- SHA, or request changes. In `accepting`, wait for that approval of the new head before
90
- `sign_off`, and send the issue back with `request_backward_move` when the reviewer requests
91
- changes.
92
+ SHA, or request changes; the merger merges the new head only once that approval is on the pull
93
+ request.
92
94
 
93
95
  ## A review thread GitHub will not resolve
94
96
 
@@ -15,7 +15,7 @@ sends the question to the architect above it.
15
15
  | `carried-gate-opened` | The gate this root carried opened. Start nothing and release nothing for it. |
16
16
  | `phase-finished` | The next phase already started. Read the finished handoff (`dispatch handoff-read --issue <issue> --phase <word>`) and tell the working role of any gap. A planner's departure from the design: keep the plan while the Summary, requirements, checks, scope and settled decisions hold, else change the spec ("After approval" in design-gate.md). A reviewer's `APPROVED`: section 6. A worker reporting that no surface reaches the changed path: build the surface in this tree, then tell it to continue. |
17
17
  | `pr-blocked` | The review round cap is reached: decide in this turn, as "A capped pull request" below says. |
18
- | `checks-red` | The daemon asked the implementer to merge the base forward; the issue stays in the phase the notice names. Start nothing; in `accepting`, wait for the reviewer's approval of the new head ("A conflicting head" in `skill://legion-architect/references/acceptance.md`). |
18
+ | `checks-red` | The daemon asked the implementer, or in `merging` the merger, to merge the base forward; the issue stays in the phase the notice names. Start nothing ("A conflicting head" in `skill://legion-architect/references/acceptance.md`). |
19
19
  | `review-stuck` | No review decides the round, or the approval is of other code: tell the reviewer on the notice's `topic` to approve the head or request changes; ask a person when it answers again with no review. GitHub will not merge the head: no `topic`, and its `reason` names the merge state, each check run with its conclusion and each commit status with its state; sort it as your role prompt says. |
20
20
  | `pr-merged` | Merged, not closed: it waits to reach `merging`, or for the issues beneath it. Start nothing. |
21
21
  | `pr-closed-unmerged` | Decide whether the work reopens, restarts or ends, and give the reason. A phase worker makes the repository change. |
@@ -40,9 +40,12 @@ with a WAITING line naming the defect and the answer you wait on.
40
40
  read. Send a name that no run answers (`absent`) to the architect as a finding, since the
41
41
  check's words are wrong, and the same for a check whose `run` is a whole test suite. Neither
42
42
  wait nor that finding moves the issue back.
43
+ - A `ci_check` check whose derived result is a fail is the merger's: the change is accepted,
44
+ and the merger decides at the merge whether the base or the change broke it. Name it in your
45
+ retro message and complete.
43
46
  - Any other check with no pass standing, or a check with no `ci_check` whose only evidence is a
44
- unit suite: `request_backward_move` with `to: implementing` for the implementer's result or a
45
- `ci_check` check, or `to: testing` for the tester's, its `reason` naming the check's block id.
47
+ unit suite: `request_backward_move` with `to: implementing` for the implementer's result, or
48
+ `to: testing` for the tester's, its `reason` naming the check's block id.
46
49
  2. **Get a second reading.** First list in your session the constraints the issue did not state,
47
50
  choices between two working options, abandoned approaches and reusable code. Then run
48
51
  `task(agent="oracle")` with the issue, the pull request body and the diff, asking for reusable
@@ -4,7 +4,7 @@ Read it when GitHub reports the pull request `CONFLICTING`, the daemon's merge-f
4
4
 
5
5
  ## Reintegrating the base
6
6
 
7
- The implementer merges the base into the issue branch only when GitHub reports it `CONFLICTING`, the daemon's merge-forward message asks it (*The daemon's ask*, below), the controller asks because of a conflict, the architect's backward move names a parent's last round, the change needs something only the base has, or the pull request was retargeted. Never to refresh CI or pick up the default branch: each merge is a new head that reruns CI and can void a review. Never with `jj rebase`, which rewrites pushed commits (*A wrong pushed commit*, below).
7
+ The implementer merges the base into the issue branch only when GitHub reports it `CONFLICTING`, the daemon's merge-forward message asks it (*The daemon's ask*, below), the controller asks because of a conflict, the architect's backward move names a parent's last round, the change needs something only the base has, or the pull request was retargeted. Past the review the merger merges the base forward when it merges, for a conflict or for a check the base's newer code breaks (its role prompt, "A head that conflicts with its base"), so the implementer merges then only when the daemon's merge-forward message or the merger asks it. Never to refresh CI or pick up the default branch: each merge is a new head that reruns CI and can void a review. Never with `jj rebase`, which rewrites pushed commits (*A wrong pushed commit*, below).
8
8
 
9
9
  Before you race another tree's pull request on shared files, `envoy_publish` to its implementer's role topic, ask when its next push lands, and merge once, after it.
10
10
 
@@ -18,7 +18,7 @@ Before you race another tree's pull request on shared files, `envoy_publish` to
18
18
  Write `<message>` in the repository's own commit convention (its commit-lint configuration, else its recent commits on the base), such as `chore(<scope>): merge <base> into <branch>`, or `Merge <base> into <branch>` where none shows. `@` after a split is an empty commit with no description, which `jj git push` refuses.
19
19
  2. Resolve any conflict in that one commit, then `jj -R "$LEGION_WORKSPACE" new` to move off it.
20
20
  3. A merge brings instances from the base that the branch's own diff never shows, so before you push the merge search its head for the class of every finding of every earlier review round.
21
- 4. Push the merge as any code push, build the branch, and record the issue's checks again at the merge head, each check with no `ci_check` (a check carrying one is read again from its CI run), even with no text conflict.
21
+ 4. Push the merge as any code push, build the branch, and record the issue's checks again at the merge head, each check with no `ci_check` (a check carrying one is read again from its CI run), even with no text conflict. The merger records none itself: it asks the implementer and the tester to record theirs at the merge head (its role prompt, "A head that conflicts with its base").
22
22
  5. Post one PR comment with the Legion footer: `forward merge <old-tip-sha> → <new-tip-sha>; <the condition it meets>`, with each class search beside it. In a parent's last round, end it with `parent's last round: full test round`.
23
23
 
24
24
  After a retarget, do the same merge onto the new base, and cite the new head's run in the PR body. Recover a jj mistake forward (`jj new`, `jj restore <paths>`), never with `jj undo`, `jj abandon` or `jj op restore`, which rewrite the shared operation log.
@@ -32,10 +32,10 @@ Every role reads a merge of the base the same way:
32
32
 
33
33
  ## The daemon's ask
34
34
 
35
- A head that conflicts with its base keeps the issue in its phase. The daemon reads GitHub twice, at least a minute apart, and acts only on a conflict both reads report, and only when the next step needs a mergeable head: the issue stands in `accepting`, `retro` or `merging`; a check the base requires has no green result on the head, since GitHub runs no check on a conflicting head; the base requires a pull request to be current with it; or the daemon could not read the base's rules.
35
+ A head that conflicts with its base keeps the issue in its phase. The daemon reads GitHub twice, at least a minute apart, and acts only on a conflict both reads report, and only when the next step needs a mergeable head: the issue stands in `merging`; a check the base requires has no green result on the head, since GitHub runs no check on a conflicting head; the base requires a pull request to be current with it; or the daemon could not read the base's rules. In `accepting` and `retro` the conflict waits for the merger.
36
36
 
37
- - The implementer gets a merge-forward message on its role topic. Merge the base forward in `$LEGION_WORKSPACE`, the one workspace every role of the issue shares, so another role's work can sit in it: before this merge's `jj new`, run the two path lists of step 2 of `skill://legion-worker` again, even when this turn already ran a `jj new`, and read `skill://legion-worker/references/foreign-path.md` for any path you did not write. Then merge as *Reintegrating the base* says and push the issue branch, with no handoff and no completion for the merge. In `implementing` and `retro` the phase is the implementer's, and its assignment and its completion stand.
38
- - In `testing`, `reviewing` and `merging`, the phase's worker is told to stop writing the workspace: stop at once, complete nothing at the old head (the merger merges and enqueues nothing), and keep your turn and its jobs. When the push lands you are told the new head: read the merge as above and go on at that head.
37
+ - Before `merging` the implementer gets a merge-forward message on its role topic, and in `merging` the merger does. Merge the base forward in `$LEGION_WORKSPACE`, the one workspace every role of the issue shares, so another role's work can sit in it: before this merge's `jj new`, run the two path lists of step 2 of `skill://legion-worker` again, even when this turn already ran a `jj new`, and read `skill://legion-worker/references/foreign-path.md` for any path you did not write. Then merge as *Reintegrating the base* says and push the issue branch, with no handoff and no completion for the merge. In `implementing` the phase is the implementer's, and its assignment and its completion stand.
38
+ - In `testing` and `reviewing`, the phase's worker is told to stop writing the workspace: stop at once, complete nothing at the old head, and keep your turn and its jobs. When the push lands you are told the new head: read the merge as above and go on at that head.
39
39
 
40
40
  ## A wrong pushed commit
41
41
 
@@ -35,7 +35,7 @@ A `code_scanning` rule requires an analysis that no status-check list names. A r
35
35
 
36
36
  Never approve a head while a required item has no run. Sort it, in this order. Cases 2, 3, 4 and 6 end: tell the architect, do not approve, and wait with a `WAITING` line naming what you wait on.
37
37
 
38
- 1. Read `gh pr view <n> --repo <o>/<r> --json mergeable,mergeStateStatus` first. `DIRTY` takes a forward merge, which is the implementer's: the daemon asks for it and tells you the new head when it lands. `UNKNOWN`: read again each minute for up to five minutes, then report it to the architect as a refused read.
38
+ 1. Read `gh pr view <n> --repo <o>/<r> --json mergeable,mergeStateStatus` first. `DIRTY` takes a forward merge, which is the implementer's before the review and the merger's in `merging`: the daemon asks for it and tells you the new head when it lands. `UNKNOWN`: read again each minute for up to five minutes, then report it to the architect as a refused read.
39
39
  2. A fork head whose runs stand `action_required` waits on a maintainer. Never close and reopen it.
40
40
  3. A check only a commit status reports, or a workflow another repository defines: nothing here starts it. Never close and reopen it.
41
41
  4. A required workflow whose `paths` or `paths-ignore` filter, as the base holds it, skips every file of the change: a reopen sends the same event, so the head or the workflow must change.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "5.7.0",
3
+ "version": "5.9.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",