@sjawhar/claude-envoy 2.4.0 → 2.6.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": "2.4.0"
5
+ "version": "2.6.0"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-envoy",
3
- "version": "2.4.0",
3
+ "version": "2.6.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
  }
package/dist/dispatch.js CHANGED
@@ -15755,7 +15755,7 @@ var dispatchToolSpecs = [
15755
15755
  {
15756
15756
  name: "dispatch_related",
15757
15757
  example: { project: "CORE", title: "Retry failed webhook deliveries" },
15758
- description: "Run the related-item check that dispatch issue, dispatch ask and a new decision block in " + "dispatch doc-edit run on their own write, and write nothing: it lists the three items of " + "one project most like a title and a text (at most one per issue or document, open ones " + "first), each ask with whether it is answered, and a past decision that already answers " + "the same question. Use it to check a draft before filing it. It searches by meaning and by " + "the text's rarest words, and says how it searched; when meaning search cannot run it " + "searches by keywords only and says why. When it could not search at all it says why and " + "names the dispatch search to run instead. exclude_issues leaves each named issue's own " + "items out of the results, at most 50 of them, so a draft under a parent can leave out " + "that parent and its children without changing how rare the text's words are; " + "keywords_only skips meaning search.",
15758
+ description: "Run the related-item check that dispatch issue, dispatch ask and a new decision block in " + "dispatch doc-edit run on their own write, and write nothing: it lists the three items of " + "one project most like a title and a text (at most one per issue or document, open ones " + "first), each ask with whether it is answered. Use it to check a draft before filing it. " + "It calls the POST form of the related route, which is the form that also lists the " + "answered asks of other projects: at most two answered questions of another project, " + "each naming the project it is in, its answer and who gave it, ranked by meaning alone " + "and claiming nothing about whether they answer your question. The GET form of that " + "route, which the dashboard's new-issue dialog calls, lists none of them. " + "It searches by meaning and by the text's rarest words, and says how it searched; when " + "meaning search cannot run it searches by keywords only and says why. When it could not " + "search at all it says why and names the dispatch search to run instead. exclude_issues " + "leaves each named issue's own items out of the results, at most 50 of them, so a draft " + "under a parent can leave out that parent and its children without changing how rare the " + "text's words are; keywords_only skips meaning search.",
15759
15759
  arguments: (z) => ({
15760
15760
  project: z.string().describe("Project key to search within, such as CORE."),
15761
15761
  title: z.string({ max: ISSUE_TITLE_MAX }).describe("Optional title to check, as an issue title; at most 1,000 characters.").optional(),
@@ -20756,12 +20756,11 @@ function relatedCheckLines(suggestions, context) {
20756
20756
  ];
20757
20757
  }
20758
20758
  try {
20759
- const { decision } = suggestions;
20760
- if (decision !== undefined && decision !== null) {
20761
- const when = decision.answered_at === undefined ? "" : ` on ${decision.answered_at}`;
20762
- lines.push(`A past decision may already answer this: ${suggestionLabel(decision)}, answered by ${decision.answered_by}${when} \u2192 ${absoluteHref(decision.href, context.configUrl)}`);
20763
- lines.push(...askLines(decision.ask));
20764
- }
20759
+ lines.push(...otherProjectLines(suggestions, context.configUrl));
20760
+ } catch (error) {
20761
+ lines.push(`The answers of other projects could not be shown: ${messageFor(error)}`);
20762
+ }
20763
+ try {
20765
20764
  const likely = suggestions.likely_duplicate;
20766
20765
  if (likely !== undefined && likely !== null) {
20767
20766
  lines.push(`Likely duplicate: ${likely.key} [${likely.status}] ${likely.title} \u2192 ${absoluteHref(likely.href, context.configUrl)}`);
@@ -20774,7 +20773,7 @@ function relatedCheckLines(suggestions, context) {
20774
20773
  lines.push(`Near copy you forced past: ${match.key} [${match.status}] ${match.title} \u2192 ${absoluteHref(match.href, context.configUrl)}`);
20775
20774
  }
20776
20775
  } catch (error) {
20777
- lines.push(`The check's past decision or near copies could not be shown: ${messageFor(error)}`);
20776
+ lines.push(`The check's near copies could not be shown: ${messageFor(error)}`);
20778
20777
  }
20779
20778
  return lines;
20780
20779
  }
@@ -20833,9 +20832,21 @@ function relatedCheckForm(suggestions, context) {
20833
20832
  form.mode === undefined ? "Related-item check searched and found nothing." : `Related-item check searched (${form.mode}) and found nothing.`
20834
20833
  ];
20835
20834
  }
20836
- function relatedItemLines(item, configUrl) {
20835
+ function otherProjectLines(suggestions, configUrl) {
20836
+ const items = suggestions.other_projects ?? [];
20837
+ if (items.length === 0)
20838
+ return [];
20839
+ return [
20840
+ "Answered questions in other projects:",
20841
+ ...items.flatMap((item) => relatedItemLines(item, configUrl, true))
20842
+ ];
20843
+ }
20844
+ function relatedItemLines(item, configUrl, namesProject = false) {
20837
20845
  try {
20838
- const lines = [`- ${suggestionLabel(item)} \u2192 ${absoluteHref(item.href, configUrl)}`];
20846
+ const label = suggestionLabel(item);
20847
+ const project = item.owner.project;
20848
+ const named = namesProject && item.owner.kind === "issue" && project !== undefined && project !== "" ? `${project}: ${label}` : label;
20849
+ const lines = [`- ${named} \u2192 ${absoluteHref(item.href, configUrl)}`];
20839
20850
  if (item.kind === "ask") {
20840
20851
  lines.push(...askLines(item.ask));
20841
20852
  }
@@ -37395,7 +37395,7 @@ var dispatchToolSpecs = [
37395
37395
  {
37396
37396
  name: "dispatch_related",
37397
37397
  example: { project: "CORE", title: "Retry failed webhook deliveries" },
37398
- description: "Run the related-item check that dispatch issue, dispatch ask and a new decision block in " + "dispatch doc-edit run on their own write, and write nothing: it lists the three items of " + "one project most like a title and a text (at most one per issue or document, open ones " + "first), each ask with whether it is answered, and a past decision that already answers " + "the same question. Use it to check a draft before filing it. It searches by meaning and by " + "the text's rarest words, and says how it searched; when meaning search cannot run it " + "searches by keywords only and says why. When it could not search at all it says why and " + "names the dispatch search to run instead. exclude_issues leaves each named issue's own " + "items out of the results, at most 50 of them, so a draft under a parent can leave out " + "that parent and its children without changing how rare the text's words are; " + "keywords_only skips meaning search.",
37398
+ description: "Run the related-item check that dispatch issue, dispatch ask and a new decision block in " + "dispatch doc-edit run on their own write, and write nothing: it lists the three items of " + "one project most like a title and a text (at most one per issue or document, open ones " + "first), each ask with whether it is answered. Use it to check a draft before filing it. " + "It calls the POST form of the related route, which is the form that also lists the " + "answered asks of other projects: at most two answered questions of another project, " + "each naming the project it is in, its answer and who gave it, ranked by meaning alone " + "and claiming nothing about whether they answer your question. The GET form of that " + "route, which the dashboard's new-issue dialog calls, lists none of them. " + "It searches by meaning and by the text's rarest words, and says how it searched; when " + "meaning search cannot run it searches by keywords only and says why. When it could not " + "search at all it says why and names the dispatch search to run instead. exclude_issues " + "leaves each named issue's own items out of the results, at most 50 of them, so a draft " + "under a parent can leave out that parent and its children without changing how rare the " + "text's words are; keywords_only skips meaning search.",
37399
37399
  arguments: (z) => ({
37400
37400
  project: z.string().describe("Project key to search within, such as CORE."),
37401
37401
  title: z.string({ max: ISSUE_TITLE_MAX }).describe("Optional title to check, as an issue title; at most 1,000 characters.").optional(),
@@ -47578,12 +47578,11 @@ function relatedCheckLines(suggestions, context) {
47578
47578
  ];
47579
47579
  }
47580
47580
  try {
47581
- const { decision } = suggestions;
47582
- if (decision !== undefined && decision !== null) {
47583
- const when = decision.answered_at === undefined ? "" : ` on ${decision.answered_at}`;
47584
- lines.push(`A past decision may already answer this: ${suggestionLabel(decision)}, answered by ${decision.answered_by}${when} \u2192 ${absoluteHref(decision.href, context.configUrl)}`);
47585
- lines.push(...askLines(decision.ask));
47586
- }
47581
+ lines.push(...otherProjectLines(suggestions, context.configUrl));
47582
+ } catch (error) {
47583
+ lines.push(`The answers of other projects could not be shown: ${messageFor(error)}`);
47584
+ }
47585
+ try {
47587
47586
  const likely = suggestions.likely_duplicate;
47588
47587
  if (likely !== undefined && likely !== null) {
47589
47588
  lines.push(`Likely duplicate: ${likely.key} [${likely.status}] ${likely.title} \u2192 ${absoluteHref(likely.href, context.configUrl)}`);
@@ -47596,7 +47595,7 @@ function relatedCheckLines(suggestions, context) {
47596
47595
  lines.push(`Near copy you forced past: ${match.key} [${match.status}] ${match.title} \u2192 ${absoluteHref(match.href, context.configUrl)}`);
47597
47596
  }
47598
47597
  } catch (error) {
47599
- lines.push(`The check's past decision or near copies could not be shown: ${messageFor(error)}`);
47598
+ lines.push(`The check's near copies could not be shown: ${messageFor(error)}`);
47600
47599
  }
47601
47600
  return lines;
47602
47601
  }
@@ -47655,9 +47654,21 @@ function relatedCheckForm(suggestions, context) {
47655
47654
  form.mode === undefined ? "Related-item check searched and found nothing." : `Related-item check searched (${form.mode}) and found nothing.`
47656
47655
  ];
47657
47656
  }
47658
- function relatedItemLines(item, configUrl) {
47657
+ function otherProjectLines(suggestions, configUrl) {
47658
+ const items = suggestions.other_projects ?? [];
47659
+ if (items.length === 0)
47660
+ return [];
47661
+ return [
47662
+ "Answered questions in other projects:",
47663
+ ...items.flatMap((item) => relatedItemLines(item, configUrl, true))
47664
+ ];
47665
+ }
47666
+ function relatedItemLines(item, configUrl, namesProject = false) {
47659
47667
  try {
47660
- const lines = [`- ${suggestionLabel(item)} \u2192 ${absoluteHref(item.href, configUrl)}`];
47668
+ const label = suggestionLabel(item);
47669
+ const project = item.owner.project;
47670
+ const named = namesProject && item.owner.kind === "issue" && project !== undefined && project !== "" ? `${project}: ${label}` : label;
47671
+ const lines = [`- ${named} \u2192 ${absoluteHref(item.href, configUrl)}`];
47661
47672
  if (item.kind === "ask") {
47662
47673
  lines.push(...askLines(item.ask));
47663
47674
  }
@@ -52784,7 +52795,21 @@ var legionSlotView = object({
52784
52795
  });
52785
52796
  var legionWaitingLineView = object({
52786
52797
  place: number2().int().positive(),
52787
- length: number2().int().positive()
52798
+ length: number2().int().positive(),
52799
+ part: _enum2(["returned", "starting"]).optional(),
52800
+ kind: _enum2(["returning", "answered", "queued_root", "first_phase"]).optional(),
52801
+ partPlace: number2().int().positive().optional(),
52802
+ partLength: number2().int().positive().optional(),
52803
+ holdsSlot: boolean2().optional(),
52804
+ since: timestamp.optional(),
52805
+ rootRank: nonEmptyString2.optional(),
52806
+ ownRank: nonEmptyString2.optional(),
52807
+ rootKey: issueKey.optional(),
52808
+ reason: nonEmptyString2.optional()
52809
+ });
52810
+ var legionWhyView = object({
52811
+ state: _enum2(["claim_stopped", "waiting", "blocked", "unlisted"]),
52812
+ reason: nonEmptyString2
52788
52813
  });
52789
52814
  var legionCheckWakeView = object({
52790
52815
  kind: nonEmptyString2,
@@ -52875,6 +52900,7 @@ var legionIssue = object({
52875
52900
  gatedSteps: array(legionGatedStepView).optional(),
52876
52901
  slot: legionSlotView.optional(),
52877
52902
  waitingLine: legionWaitingLineView.optional(),
52903
+ why: legionWhyView.optional(),
52878
52904
  waitingOn: legionWaitingOn.optional(),
52879
52905
  check: legionCheckView.optional(),
52880
52906
  memoryGroup: _enum2(["memory", "none"]).optional(),
@@ -55907,9 +55933,9 @@ var import_nats2 = __toESM(require_mod4(), 1);
55907
55933
 
55908
55934
  // package.json
55909
55935
  var name = "@sjawhar/claude-envoy";
55910
- var version2 = "2.4.0";
55936
+ var version2 = "2.6.0";
55911
55937
  var legion = {
55912
- daemonApiVersion: 75
55938
+ daemonApiVersion: 85
55913
55939
  };
55914
55940
 
55915
55941
  // ../pi-shared/src/agent-stream.ts
@@ -14745,7 +14745,7 @@ var dispatchToolSpecs = [
14745
14745
  {
14746
14746
  name: "dispatch_related",
14747
14747
  example: { project: "CORE", title: "Retry failed webhook deliveries" },
14748
- description: "Run the related-item check that dispatch issue, dispatch ask and a new decision block in " + "dispatch doc-edit run on their own write, and write nothing: it lists the three items of " + "one project most like a title and a text (at most one per issue or document, open ones " + "first), each ask with whether it is answered, and a past decision that already answers " + "the same question. Use it to check a draft before filing it. It searches by meaning and by " + "the text's rarest words, and says how it searched; when meaning search cannot run it " + "searches by keywords only and says why. When it could not search at all it says why and " + "names the dispatch search to run instead. exclude_issues leaves each named issue's own " + "items out of the results, at most 50 of them, so a draft under a parent can leave out " + "that parent and its children without changing how rare the text's words are; " + "keywords_only skips meaning search.",
14748
+ description: "Run the related-item check that dispatch issue, dispatch ask and a new decision block in " + "dispatch doc-edit run on their own write, and write nothing: it lists the three items of " + "one project most like a title and a text (at most one per issue or document, open ones " + "first), each ask with whether it is answered. Use it to check a draft before filing it. " + "It calls the POST form of the related route, which is the form that also lists the " + "answered asks of other projects: at most two answered questions of another project, " + "each naming the project it is in, its answer and who gave it, ranked by meaning alone " + "and claiming nothing about whether they answer your question. The GET form of that " + "route, which the dashboard's new-issue dialog calls, lists none of them. " + "It searches by meaning and by the text's rarest words, and says how it searched; when " + "meaning search cannot run it searches by keywords only and says why. When it could not " + "search at all it says why and names the dispatch search to run instead. exclude_issues " + "leaves each named issue's own items out of the results, at most 50 of them, so a draft " + "under a parent can leave out that parent and its children without changing how rare the " + "text's words are; keywords_only skips meaning search.",
14749
14749
  arguments: (z) => ({
14750
14750
  project: z.string().describe("Project key to search within, such as CORE."),
14751
14751
  title: z.string({ max: ISSUE_TITLE_MAX }).describe("Optional title to check, as an issue title; at most 1,000 characters.").optional(),
@@ -19760,12 +19760,11 @@ function relatedCheckLines(suggestions, context) {
19760
19760
  ];
19761
19761
  }
19762
19762
  try {
19763
- const { decision } = suggestions;
19764
- if (decision !== undefined && decision !== null) {
19765
- const when = decision.answered_at === undefined ? "" : ` on ${decision.answered_at}`;
19766
- lines.push(`A past decision may already answer this: ${suggestionLabel(decision)}, answered by ${decision.answered_by}${when} \u2192 ${absoluteHref(decision.href, context.configUrl)}`);
19767
- lines.push(...askLines(decision.ask));
19768
- }
19763
+ lines.push(...otherProjectLines(suggestions, context.configUrl));
19764
+ } catch (error) {
19765
+ lines.push(`The answers of other projects could not be shown: ${messageFor(error)}`);
19766
+ }
19767
+ try {
19769
19768
  const likely = suggestions.likely_duplicate;
19770
19769
  if (likely !== undefined && likely !== null) {
19771
19770
  lines.push(`Likely duplicate: ${likely.key} [${likely.status}] ${likely.title} \u2192 ${absoluteHref(likely.href, context.configUrl)}`);
@@ -19778,7 +19777,7 @@ function relatedCheckLines(suggestions, context) {
19778
19777
  lines.push(`Near copy you forced past: ${match.key} [${match.status}] ${match.title} \u2192 ${absoluteHref(match.href, context.configUrl)}`);
19779
19778
  }
19780
19779
  } catch (error) {
19781
- lines.push(`The check's past decision or near copies could not be shown: ${messageFor(error)}`);
19780
+ lines.push(`The check's near copies could not be shown: ${messageFor(error)}`);
19782
19781
  }
19783
19782
  return lines;
19784
19783
  }
@@ -19837,9 +19836,21 @@ function relatedCheckForm(suggestions, context) {
19837
19836
  form.mode === undefined ? "Related-item check searched and found nothing." : `Related-item check searched (${form.mode}) and found nothing.`
19838
19837
  ];
19839
19838
  }
19840
- function relatedItemLines(item, configUrl) {
19839
+ function otherProjectLines(suggestions, configUrl) {
19840
+ const items = suggestions.other_projects ?? [];
19841
+ if (items.length === 0)
19842
+ return [];
19843
+ return [
19844
+ "Answered questions in other projects:",
19845
+ ...items.flatMap((item) => relatedItemLines(item, configUrl, true))
19846
+ ];
19847
+ }
19848
+ function relatedItemLines(item, configUrl, namesProject = false) {
19841
19849
  try {
19842
- const lines = [`- ${suggestionLabel(item)} \u2192 ${absoluteHref(item.href, configUrl)}`];
19850
+ const label = suggestionLabel(item);
19851
+ const project = item.owner.project;
19852
+ const named = namesProject && item.owner.kind === "issue" && project !== undefined && project !== "" ? `${project}: ${label}` : label;
19853
+ const lines = [`- ${named} \u2192 ${absoluteHref(item.href, configUrl)}`];
19843
19854
  if (item.kind === "ask") {
19844
19855
  lines.push(...askLines(item.ask));
19845
19856
  }
@@ -14,7 +14,7 @@ You own one issue tree from its first decision to the merge that closes it. The
14
14
  - Act on delivered wakes and the live artifacts they name; build no wait loop, since every wake reaches you.
15
15
  - Check each claim against the code as fetched now (the default branch your addressing line names, or the head under review), never the workspace as it was at admission, and tell every fresh reader you dispatch to do the same: the branch may have moved since.
16
16
  - Before you end a turn that waits on a human, open what they must answer: a decision block, a `dispatch ask` or `dispatch request-approval`. A turn that ends with nothing open asks nobody, and the tree stops. Open an ordinary ask on the root issue itself, never a child: only a question a session of this tree opens on the root starts a wait on a person, so an ask on a child starts no wait and leaves the tree standing still. Once you have handed a root question to the human, end your turn: when nothing else of the tree is at work — no other issue of the tree in a phase, the `legion` label still on, and no person or outside session holding the root's Dispatch claim — the root moves to `awaiting_person`, keeping its admission slot, while this session stays live. Read the human's comments and replies as they arrive. Their answer gives this live claim a task naming what answered and what is still with them. The same holds once you request approval and `register_gate` that version: the registration hands the spec to the human, so end your turn there too, and the human's review, or a newer version once Dispatch shows the request back on your turn, gives you that task.
17
- An answered root stands in the admission line until the pass that resumes it, and nothing is sent to you about that wait: your record's `waitingLine` gives the live place in the line and the line's length, your resume task says what answered the wait, and you act on neither, because that resume takes no further slot and the daemon starts you again by itself.
17
+ An answered root stands in the admission line until the pass that resumes it, and nothing is sent to you about that wait: your record's `waitingLine` gives the live place in the line and the line's length, with the line's own fields beside them — `part` (`returned` for an issue whose work came back, `starting` for one that has not started) and `kind`, `partPlace` of `partLength` inside that part, `holdsSlot`, which is true for your answered root because it has held its slot since its start, the key that placed it (`since` for a `returned` issue, `rootRank`, `ownRank` and `rootKey` for a `starting` one) and `reason`, the daemon's own sentence for that place — and `why` on any issue of your tree that is not working now gives the same answer in one word and one sentence (`claim_stopped`, a claim nothing will wake; `waiting`, this line; `blocked`, a link or an open child; `unlisted`, an issue no list places), your resume task says what answered the wait, and you act on neither your place nor your wait, because that resume takes no further slot and the daemon starts you again by itself.
18
18
  - Deliver every criterion of the root spec in this tree. Work leaves it only when a root splits, as a `dispatch ask` for the rest: work outside has no owner.
19
19
  - A problem outside the tree is a `dispatch ask`, never an issue you file, because a person decides whether it needs one (`skill://legion-worker/references/findings.md`). A clear defect is the exception. Fix one in code this tree touches or depends on in this tree's pull request. Send any other to the controller, which gives it to the tree that owns that code.
20
20
  - Before you write a spec or ask a person anything, read the repository's `STRATEGY.md` when it has one and the design principles where it states them (`AGENTS.md`, in this repository), then use a standard best-practice solution; ask only what neither settles, with one recommendation. A design that crosses a Boundary in `STRATEGY.md` goes to its owner before it is built. Find the standard with a web search and with how two or three well-regarded projects solve the problem. Cite them in a few lines of the spec's `Design`. A design far from the standard is a sign to fix the underlying problem, not to add a workaround.
@@ -241,6 +241,8 @@ Your root keeps its admission slot throughout: it holds the slot the daemon gave
241
241
  So your resume takes no slot and comes however full the cap is, whether or not the gate has ever opened in this generation.
242
242
  The first phase that resume starts needs no slot of its own either, since the root holds one: it waits in the line among the issues whose work came back, oldest first, placed by the moment your gate opened, so it stands behind every issue of that part whose work came back before it.
243
243
  A changes request, or a newer version of the document that hands the request back to you, leaves the gate closed, so your merger's READY waits for a new approval.
244
- While your answered root stands in the line, your record carries `waitingLine`, your place in the line and its length.
244
+ While your answered root stands in the line, your record carries `waitingLine`: your place in the line and its length, your `part` (`returned`) and `kind` (`answered`), your `partPlace` of `partLength` among the issues whose work came back, `holdsSlot` true because your root has held its slot since its start, `since`, the moment your work came back, and `reason`, the daemon's own sentence for that place.
245
+ An issue that has not started carries `rootRank`, `ownRank` and `rootKey` in place of `since`, the two Dispatch ranks that placed it and the key of its tree root.
246
+ `why` beside it says why any issue of your tree is not working now, in one word and one sentence: `claim_stopped`, a claim nothing will wake; `waiting`, this line; `blocked`, a Dispatch link or an open child below it; `unlisted`, an issue the record holds in the workflow that no admission list places.
245
247
  Nothing is sent to you about that wait, and your resume task says what answered it.
246
- Act on neither: the daemon starts you again on the pass that reads the answer.
248
+ Act on neither your place nor your wait: the daemon starts you again on the pass that reads the answer.
@@ -266,9 +266,16 @@ spec stands. Your resume takes no slot, whether or not the gate opened, because
266
266
  one all along: an issue keeps its admission slot from the moment the daemon starts it
267
267
  until it is done, leaves the workflow or waits only for its merge. The answered root stands in
268
268
  the admission line until the pass that resumes it, and nothing is sent to you about that wait:
269
- your record's `waitingLine` gives the live place in the line and the line's length, your resume
270
- task says what answered the wait, and you act on neither, because the daemon starts you again by
271
- itself on that pass.
269
+ your record's `waitingLine` gives the live place in the line and the line's length, and beside
270
+ them the line's own fields — `part` and `kind`, `partPlace` of `partLength` inside that part,
271
+ `holdsSlot`, true for your root, which has held its slot since its start, `since` for an issue
272
+ whose work came back or `rootRank`, `ownRank` and `rootKey` for one that has not started, and
273
+ `reason`, the daemon's own sentence for that place. `why` on any issue of your tree that is
274
+ not working now says the same in one word and one sentence: `claim_stopped`, a claim nothing
275
+ will wake; `waiting`, this line; `blocked`, a Dispatch link or an open child below it;
276
+ `unlisted`, an issue the record holds in the workflow that no admission list places. Your
277
+ resume task says what answered the wait, and you act on neither your place nor your wait,
278
+ because the daemon starts you again by itself on that pass.
272
279
  Release no child until every gated step is open: a delivered wake shows
273
280
  `design-approved` on the root, or a task says its design gate is open, and under more than one
274
281
  step `gatedSteps` in your record shows each one `approved`. The daemon sends a root waiting on a
@@ -150,8 +150,21 @@ daemon counts a slot a waiting issue will take as taken already, and an issue in
150
150
  that holds a slot and waits for a promotion stands in both lists — a root a person answered,
151
151
  a tree's own root at `admitted` under a design gate a person has opened, a root another tree
152
152
  handed over with the slot it held there, and a child the daemon started that a person set back
153
- to `todo` — and subtracting such an issue a second time would hide a slot that is free. Every
154
- move to `todo` you make is one of these:
153
+ to `todo` — and subtracting such an issue a second time would hide a slot that is free.
154
+
155
+ The line has two parts, and reading it as one list makes a right order look like a wrong one.
156
+ First the issues whose work came back, oldest first by the moment it came back; then the issues
157
+ that have not started, by the Dispatch rank of each issue's tree root and then its own. Each
158
+ free slot goes to the first issue of the whole line that needs one, so a P2 root can take the
159
+ slot in front of a P0 root that ranks first: the P2 root's work came back, and the P0 root has
160
+ not started. That is the approved design of dispatch://INFRA-980, which finishes started work
161
+ before it starts new work, and it is no defect to report. A move to `backlog` or `icebox` takes
162
+ an issue out of the line, and a re-rank of the issues ahead of an issue that has not started
163
+ raises that issue inside the second part; neither act moves it ahead of one issue whose work
164
+ came back. `read_state` tells you which part each waiting issue stands in and why
165
+ (`skill://legion-controller/references/admission.md`).
166
+
167
+ Every move to `todo` you make is one of these:
155
168
 
156
169
  - a root you labelled at a person's request or filed for a clear defect no tree owns, at triage (a
157
170
  root a person labelled is queued by the daemon);
@@ -10,7 +10,7 @@ no longer says which trees run: `admission.trees` does.
10
10
  |---|---|---|
11
11
  | The key is in `admission.active` | An issue holding a slot, a root or a child: the daemon has started it and has not finished with it. An issue takes its slot when the daemon starts it and keeps it until it is done, leaves the workflow or waits only for its merge, so this list holds an issue at work, one in `accepting`, one `held`, one `merging` and one waiting on a person alike | Nothing, beyond [trees waiting on a root claim](skill://legion-controller/SKILL.md#trees-waiting-on-a-root-claim) |
12
12
  | The key is in `admission.trees` | The root of a live tree: its lifecycle stands open and it does not linger, or it waits in the line or on a person. A tree is live whether or not any issue of it holds a slot, so this is the list that says which trees run, and `issues.<KEY>.tree` says which tree an issue stands in | Nothing: read it wherever you need the running trees |
13
- | The key is in `admission.waiting` and not in `admission.blocked` | An issue standing in the line, in its own order: first the issues whose work came back, oldest first by when it came back — one owed its worker a start, which holds no slot and waits here for one, and two that hold the slot they were started with: a root a person answered in `awaiting_person`, and a tree's own root at `admitted` whose design gate has opened; then the issues whose first phase can start, by the Dispatch rank of their tree's root and then by their own. A root that left another tree (handed over by its finished tree, or admitted as an orphan) waits here as its own root even under a live tree, the old root's return included: no tree adopts it. Two kinds of that second part may hold a slot already: such a root, with the one it held in the tree it left, and a child the daemon started that a person set back to `todo`, with the one its run took | Nothing: an issue holding a slot is promoted on the next pass whatever the cap says, and one holding none — an issue owed a start among them — waits here for the next free slot and takes it by itself |
13
+ | The key is in `admission.waiting` and not in `admission.blocked` | An issue standing in the line, in its own order: first the issues whose work came back, oldest first by when it came back — one owed its worker a start, which holds no slot and waits here for one, and two that hold the slot they were started with: a root a person answered in `awaiting_person`, and a tree's own root at `admitted` whose design gate has opened; then the issues whose first phase can start, by the Dispatch rank of their tree's root and then by their own. A root that left another tree (handed over by its finished tree, or admitted as an orphan) waits here as its own root even under a live tree, the old root's return included: no tree adopts it. Two kinds of that second part may hold a slot already: such a root, with the one it held in the tree it left, and a child the daemon started that a person set back to `todo`, with the one its run took. `issues.<KEY>.waitingLine` says where that issue stands, in its own fields: `part`, `returned` for an issue whose work came back or `starting` for one that has not started; `kind`, `returning` (a worker is owed a start), `answered` (a person answered the root), `queued_root` or `first_phase`; `partPlace` and `partLength`, its place among the issues of its own part and how many they are; `holdsSlot`, true where it already holds its admission slot and so takes no free one; `since`, the moment a `returned` issue's work came back; `rootRank`, `ownRank` and `rootKey`, the two Dispatch ranks that placed a `starting` issue and the key of its tree root; and `reason`, the daemon's own sentence for where it stands, which you quote in a report rather than write one of your own. Beside it, every issue that is not working now carries `why`, one answer with a `state` and a `reason` sentence: `claim_stopped`, a claim nothing will wake; `waiting`, this line; `blocked`, a Dispatch link or an open child below it; `unlisted`, the record holds it in the workflow and none of the three lists places it. An issue holding an admission slot carries no `why` unless it also stands in `admission.waiting` or `admission.blocked`, or a stranded claim names it: an answered root reads `waiting`, a root whose open children hold its own first phase reads `blocked`, and an issue at work whose worker runs, one `held` and a root whose ask a person has not answered yet, which `waitingOn` answers for, read nothing. Neither does an issue the record does not hold in the workflow (`done`, `backlog`, `icebox`, `triage`). The daemon narrows its answer to the contract the reading pod records: you read `partPlace` and every member above, and `why` with them, once your own pod runs a plugin at contract 85, and you read the `place` and `length` of today until then | Nothing: an issue holding a slot is promoted on the next pass whatever the cap says, and one holding none — an issue owed a start among them — waits here for the next free slot and takes it by itself. Read `reason` before you report an order as wrong: an issue of the second part stands behind every issue whose work came back, however it ranks ([Free slots](skill://legion-controller/SKILL.md#free-slots)) |
14
14
  | `phase: awaiting_person`, `waitingOn` | A root that already ran and now waits only on a person: an answer to its architect's question (`waitingOn.kind` `ask`) or a review of its spec (`gate`). It keeps the slot it took when the daemon started it, its architect stays live to read the person's comments and replies, and its tree stays live. Unanswered, it is in `admission.active` and in no line; `waitingOn.answeredAt` means the daemon has put it in `admission.waiting` as well, among the issues whose work came back, oldest first, where it stands until the pass that resumes it | Nothing: it is not something to admit, label or park, and its wait frees no slot to take ([Free slots](skill://legion-controller/SKILL.md#free-slots)). The daemon delivers the answer task to its architect at that promotion, which takes no further slot, so it happens however full the cap is. If its label goes or a person or outside session claims it on Dispatch, the daemon sends `unslotted` and does not resume work under another owner |
15
15
  | The key is in `admission.blocked` | An issue Legion is waiting to start, with what it waits on: the Dispatch issues of its `blocked_by` links that nobody has finished, or, for a parent, the open children beneath it that children-first holds it for. It takes no slot until they are done, and one that is in the line stands in `admission.waiting` too | Nothing: a link's wait ends when each blocker reaches `done` (a person's close, or the blocker's own merge) or its link is taken off (by a person or the tree's architect), and a children-first wait ends when the last open child leaves the workflow, which is its tree's architect's work. Name the wait in the day's report |
16
16
  | `phase: admitted`, in neither `admission.active` nor `admission.waiting`, and Dispatch shows a `child_of` parent | A child that has not started: it runs or waits with its tree, the root its `child_of` chain reaches. Under a root whose `phase` is `done` it waits with it. A labelled `todo` issue here is not in the line either: one whose recorded parent is in a live tree runs in that tree (the daemon adopted it there), or is held with that parent while the parent itself is held under an unreleased child, and one whose parent is not recorded but sits under a live tree is held under an unreleased child of that tree until its architect releases it or its parent. One a person moved to `todo` beneath an ancestor whose reviewed head the daemon has already accepted is held here until that ancestor closes. The unreleased-child hold is not `admission.blocked`, which names blocked-by links and children-first waits | Leave it to its tree. It runs again when its root does, or as a root of its own once it is `todo` with the `legion` label and no live tree is above it |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "2.4.0",
3
+ "version": "2.6.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",
@@ -19,7 +19,7 @@
19
19
  "AGENTS.md"
20
20
  ],
21
21
  "legion": {
22
- "daemonApiVersion": 75
22
+ "daemonApiVersion": 85
23
23
  },
24
24
  "repository": {
25
25
  "type": "git",