@sjawhar/claude-envoy 2.18.0 → 2.19.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.
@@ -42396,6 +42396,7 @@ function hasErrnoCode(error, code) {
42396
42396
  var STDIN = "-";
42397
42397
  var BARE_WORD = /^[A-Za-z0-9_./:@%+=,-]+$/;
42398
42398
  var OPTION_SEPARATOR = ": ";
42399
+ var LOCAL_FILE_FIELD = { tool: "dispatch_artifact", field: "path" };
42399
42400
  function commandName(tool) {
42400
42401
  return tool.replace(/^dispatch_/, "").replaceAll("_", "-");
42401
42402
  }
@@ -42648,6 +42649,7 @@ function parseCommand(argv, io) {
42648
42649
  const args = {};
42649
42650
  const setBy = new Map;
42650
42651
  const problems = [];
42652
+ const bareDashes = new Set;
42651
42653
  let help = false;
42652
42654
  let dryRun = false;
42653
42655
  let stdinFlag;
@@ -42764,6 +42766,10 @@ function parseCommand(argv, io) {
42764
42766
  const parsed = info.kind === "number" ? number(flag, value) : value;
42765
42767
  if (claimed && parsed !== undefined)
42766
42768
  args[field] = parsed;
42769
+ if (info.kind === "string" && value === STDIN && !(tool === LOCAL_FILE_FIELD.tool && field === LOCAL_FILE_FIELD.field) && !bareDashes.has(flag)) {
42770
+ bareDashes.add(flag);
42771
+ problems.push(`${flag} - sends the one character "-". ${flag}-file <path> reads ${flag} from a file, and ${flag}-file - reads it from stdin. One flag of a call may read stdin.`);
42772
+ }
42767
42773
  break;
42768
42774
  }
42769
42775
  case "file": {
@@ -42795,8 +42801,9 @@ function parseCommand(argv, io) {
42795
42801
  }
42796
42802
  if (help)
42797
42803
  return { kind: "help", tool };
42798
- if (problems.length > 0)
42799
- return { kind: "refused", tool, problems };
42804
+ if (problems.length > 0) {
42805
+ return problems.length === bareDashes.size ? { kind: "refused", tool, problems, aboutAFlag: false } : { kind: "refused", tool, problems };
42806
+ }
42800
42807
  return { kind: "call", tool, args, dryRun };
42801
42808
  }
42802
42809
  function appendedItem(kind, flag, value, number) {
@@ -53953,6 +53960,19 @@ function pushedBranch(bookmark) {
53953
53960
  return `remote_bookmarks(exact:${JSON.stringify(bookmark)}, exact:"origin")`;
53954
53961
  }
53955
53962
  var STANDING = ["log", "-r", "@-", "--no-graph", "-T", "commit_id"];
53963
+ var RECORD_HEAD = /^[0-9a-f]{40}$/;
53964
+ function recordHead(body) {
53965
+ let parsed;
53966
+ try {
53967
+ parsed = JSON.parse(body);
53968
+ } catch {
53969
+ return;
53970
+ }
53971
+ if (parsed === null || typeof parsed !== "object" || !("head" in parsed))
53972
+ return;
53973
+ const head = parsed.head;
53974
+ return typeof head === "string" && RECORD_HEAD.test(head) ? head : undefined;
53975
+ }
53956
53976
  async function findPushedBranchHead(input) {
53957
53977
  const { env } = input;
53958
53978
  const jj = input.jj ?? pathJj;
@@ -53961,35 +53981,70 @@ async function findPushedBranchHead(input) {
53961
53981
  const { bookmark } = issueBranch(env, purpose);
53962
53982
  return jj(["log", "-r", pushedBranch(bookmark), "--no-graph", "-T", "commit_id"], workspace);
53963
53983
  }
53984
+ function completedPhase(role, at) {
53985
+ switch (role) {
53986
+ case "planner":
53987
+ return "planning";
53988
+ case "tester":
53989
+ return "testing";
53990
+ case "reviewer":
53991
+ return "reviewing";
53992
+ case "merger":
53993
+ return "merging";
53994
+ case "implementer":
53995
+ if (at === "implementing" || at === "retro")
53996
+ return at;
53997
+ return at === "merging" ? "retro" : "implementing";
53998
+ case "architect":
53999
+ return at;
54000
+ }
54001
+ }
54002
+ async function standingReport(env, jj) {
54003
+ return { commit: await jj(STANDING, requiredVariable(env, "LEGION_WORKSPACE", FOR_HANDOFF)) };
54004
+ }
53964
54005
  async function findHandoffReport(input) {
53965
- const { phase, role, env } = input;
54006
+ const { role, env } = input;
53966
54007
  const jj = input.jj ?? pathJj;
53967
- const handoff = FILE_BACKED[phase];
53968
- if (handoff === undefined || handoff.role !== role) {
53969
- return { commit: await jj(STANDING, requiredVariable(env, "LEGION_WORKSPACE", FOR_HANDOFF)) };
53970
- }
54008
+ const of = completedPhase(role, input.phase);
54009
+ const handoff = FILE_BACKED[of];
54010
+ if (handoff === undefined || handoff.role !== role)
54011
+ return standingReport(env, jj);
54012
+ const works = of === input.phase;
53971
54013
  const { issue, bookmark } = issueBranch(env, FOR_HANDOFF);
53972
54014
  let record;
53973
54015
  try {
53974
54016
  record = await input.latestHandoff(issue, handoff.word);
53975
54017
  } catch (error) {
53976
54018
  if (error instanceof DispatchServiceError && error.fromDispatch && error.code === "HANDOFF_NOT_FOUND") {
54019
+ if (!works)
54020
+ return standingReport(env, jj);
53977
54021
  throw new Error(`${issue} has no ${handoff.word} handoff in Dispatch: write it with \`dispatch handoff-write --issue ${issue} --phase ${handoff.word} --body-file <file>\`, then complete again`);
53978
54022
  }
53979
54023
  const answer = error instanceof DispatchServiceError && error.fromDispatch ? `${error.status} ${error.code}: ${error.message}` : messageFor(error);
53980
54024
  throw new Error(`handoff_complete could not read ${issue}'s newest ${handoff.word} handoff from Dispatch: ${answer}; complete again once Dispatch answers`);
53981
54025
  }
53982
54026
  const report = { handoffId: record.id, handoffVersion: record.version };
53983
- if (role !== "implementer")
53984
- return report;
54027
+ const head = recordHead(record.body);
54028
+ if (role !== "implementer" || !works) {
54029
+ if (head !== undefined)
54030
+ return { commit: head, ...report };
54031
+ if (role !== "implementer")
54032
+ return report;
54033
+ return standingReport(env, jj);
54034
+ }
54035
+ if (head === undefined) {
54036
+ throw new Error(`the newest ${handoff.word} handoff of ${issue} (version ${record.version}) names no head: write the handoff again with \`head\` set to the 40-character lower-case commit you pushed as \`@-\`, as \`jj -R "$LEGION_WORKSPACE" log -r @- --no-graph -T commit_id\` prints it once the push succeeded (\`dispatch handoff-write --issue ${issue} --phase ${handoff.word} --body-file <file>\`), then complete again`);
54037
+ }
53985
54038
  const workspace = requiredVariable(env, "LEGION_WORKSPACE", FOR_HANDOFF);
53986
- const remote = pushedBranch(bookmark);
53987
54039
  const stands = await jj(STANDING, workspace);
53988
- const tip = await jj(["log", "-r", `${remote} & ${stands}::`, "--no-graph", "-T", "commit_id"], workspace);
54040
+ const tip = await jj(["log", "-r", `${pushedBranch(bookmark)} & ${stands}::`, "--no-graph", "-T", "commit_id"], workspace);
53989
54041
  if (tip === "") {
53990
- throw new Error(`the commit this workspace stands on, ${stands}, is not on ${bookmark}@origin: push it with \`jj bookmark set ${bookmark} -r @- && jj git push --bookmark ${bookmark}\`, then complete again`);
54042
+ throw new Error(`the commit this workspace stands on, ${stands}, is not on ${bookmark}@origin: push it with \`jj bookmark set ${bookmark} -r @- && jj git push --bookmark ${bookmark}\`; the handoff's \`head\` must name that pushed commit, and the newest ${handoff.word} handoff of ${issue} (version ${record.version}) names ${head}, so when that is another commit, write the handoff again with \`head\` set to ${stands} (\`dispatch handoff-write --issue ${issue} --phase ${handoff.word} --body-file <file>\`); then complete again`);
54043
+ }
54044
+ if (head !== stands) {
54045
+ throw new Error(`the newest ${handoff.word} handoff of ${issue} (version ${record.version}) names ${head} as its head, not the commit this workspace stands on, ${stands}, which ${bookmark}@origin carries: write the handoff again with \`head\` set to ${stands} (\`dispatch handoff-write --issue ${issue} --phase ${handoff.word} --body-file <file>\`), then complete again`);
53991
54046
  }
53992
- return { commit: tip, ...report };
54047
+ return { commit: head, ...report };
53993
54048
  }
53994
54049
  // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
53995
54050
  function isZ4Schema(s) {
@@ -56348,9 +56403,9 @@ var import_nats2 = __toESM(require_mod4(), 1);
56348
56403
 
56349
56404
  // package.json
56350
56405
  var name = "@sjawhar/claude-envoy";
56351
- var version2 = "2.18.0";
56406
+ var version2 = "2.19.1";
56352
56407
  var legion = {
56353
- daemonApiVersion: 111
56408
+ daemonApiVersion: 123
56354
56409
  };
56355
56410
 
56356
56411
  // ../pi-shared/src/agent-stream.ts
@@ -58647,7 +58702,7 @@ var PHASE_OP_SENTENCES = {
58647
58702
  };
58648
58703
  var STALE_ENTRY_INSTRUCTION = "End this turn without completing. The task of the entry the phase is on is owed to this claim, and the daemon sends it by itself. " + "That task is work of its own: do what it asks at the head it names and complete it with a handoff of its own, never this completion's " + "record, commit or verdict";
58649
58704
  function legionToolDescription(host) {
58650
- return "Perform the workflow operation the Legion daemon assigned this role. The daemon advances phases; this tool cannot spawn workers. " + (host.before ?? "") + "handoff_complete (phase workers and sub-architects; the daemon accepts a completion only from the role working the issue's current phase, " + "and the checking role's report on a look of its closed issue's production check) reports this phase complete: `summary` (two sentences for the " + "architect), `verdict` pass|fail from the tester alone on a phase completion (the daemon refuses a verdict from " + "any other role there) and pass|pending|fail on a production check report (pending: production does not carry the merge " + "yet). A planning, implementing, testing or reviewing phase ends with a handoff record on the " + "Dispatch issue: write it with `dispatch handoff-write --issue <issue> --phase <plan|implement|test|review> --body-file <file>` before " + "calling. This call reads the phase's newest record from Dispatch and reports it; the implementer's round also reports the commit " + "`legion/<issue>@origin` names, so push the branch first; retro and the merger's completion report the commit the workspace stands on. It " + "refuses, posting nothing, a phase with no record, a Dispatch that does not answer, or an implementer's `@-` not yet on " + "`legion/<issue>@origin`, each naming the remedy. A production check report " + "(the task whose first line is `Production check of <KEY>`, handed once the merge closed the issue to the role the check records) needs no " + "handoff and no commit: it carries its verdict and summary alone. A pending report also names `wake_at`, an RFC 3339 time: when you want the " + "next look. A pass, a fail, and a pending on the check's last look end the check, so none of them carries `wake_at` " + "(CHECK_WAKE_UNEXPECTED), and a pending on any other look is refused without one (CHECK_WAKE_REQUIRED). A report on an issue whose check is " + "closed or never opened is refused (CHECK_NOT_OPEN), and so is one from a role the check does not record (CHECK_ROLE_MISMATCH). " + "The daemon refuses " + "HANDOFF_SESSION_MISMATCH (another session wrote the record), HANDOFF_NOT_NEW (the record is the one you named for your previous phase: " + "write this phase's handoff), " + "HANDOFF_STALE_ENTRY (this completion is of a phase entry behind the one your role's phases row names, because the phase was entered " + `again while your turn ran, and nothing was recorded. ${STALE_ENTRY_INSTRUCTION}), the implementer's completion of implementing with no open ` + "pull request on `legion/<issue>` and none recorded " + "merged (HANDOFF_NO_PULL_REQUEST: open it; one naming a closed pull request is the architect's to decide); a refused completion changed " + "nothing, so fix what it names and complete again. " + "ready_for_update answers the daemon's update message on this issue's pod: `round` is the round id that message names, and the " + "daemon takes your answer for that round alone. Push every commit you want kept to the issue branch " + "first. The daemon replaces the pod and its disk when the round ends: at the moment the message names, or earlier when every " + "role has answered and no turn runs. No answer delays that moment, and the end of a turn is no answer. The call ends no phase. The " + "daemon holds your next task until your process comes back on the new pod, in this same session. " + (host.after ?? "") + `What a later phase needs goes in your handoff; a question for another live role goes to its role topic with ${host.envoyPublish}.`;
58705
+ return "Perform the workflow operation the Legion daemon assigned this role. The daemon advances phases; this tool cannot spawn workers. " + (host.before ?? "") + "handoff_complete (phase workers and sub-architects; the daemon accepts a completion only from the role working the issue's current phase, " + "or a role's first completion of the phase it left, which it records and which moves nothing, " + "and the checking role's report on a look of its closed issue's production check) reports this phase complete: `summary` (two sentences for the " + "architect), `verdict` pass|fail from the tester alone on a phase completion (the daemon refuses a verdict from " + "any other role there) and pass|pending|fail on a production check report (pending: production does not carry the merge " + "yet). A planning, implementing, testing or reviewing phase ends with a handoff record on the " + "Dispatch issue: write it with `dispatch handoff-write --issue <issue> --phase <plan|implement|test|review> --body-file <file>` before " + "calling. This call reads from Dispatch the newest record of the phase your role works or, once the issue has moved on, of the phase it left, " + "and reports it with `commit`, the head that record's body names " + "(`head`, the 40-character lower-case commit the work it reports was done against); in implementing, the implementer's must be the commit its " + "workspace stands on, `@-`, pushed to `legion/<issue>@origin`, so push the branch first; retro, the merger's completion and a phase you left with no record, or with an implement record naming no head, report the commit the workspace stands on. It " + "refuses, posting nothing, a phase you work with no record, a Dispatch that does not answer, and, in implementing, an implement record naming no head, an " + "implementer's `@-` not yet on `legion/<issue>@origin`, or an implement record whose head is not that pushed `@-`, each naming the remedy. A production check report " + "(the task whose first line is `Production check of <KEY>`, handed once the merge closed the issue to the role the check records) needs no " + "handoff and no commit: it carries its verdict and summary alone. A pending report also names `wake_at`, an RFC 3339 time: when you want the " + "next look. A pass, a fail, and a pending on the check's last look end the check, so none of them carries `wake_at` " + "(CHECK_WAKE_UNEXPECTED), and a pending on any other look is refused without one (CHECK_WAKE_REQUIRED). A report on an issue whose check is " + "closed or never opened is refused (CHECK_NOT_OPEN), and so is one from a role the check does not record (CHECK_ROLE_MISMATCH). " + "The daemon refuses " + "HANDOFF_SESSION_MISMATCH (another session wrote the record), HANDOFF_NOT_NEW (the record is the one you named for your previous phase: " + "write this phase's handoff), " + "HANDOFF_STALE_ENTRY (this completion is of a phase entry behind the one your role's phases row names, because the phase was entered " + `again while your turn ran, and nothing was recorded. ${STALE_ENTRY_INSTRUCTION}), the implementer's completion of implementing with no open ` + "pull request on `legion/<issue>` and none recorded " + "merged (HANDOFF_NO_PULL_REQUEST: open it; one naming a closed pull request is the architect's to decide); a refused completion changed " + "nothing, so fix what it names and complete again. " + "ready_for_update answers the daemon's update message on this issue's pod: `round` is the round id that message names, and the " + "daemon takes your answer for that round alone. Push every commit you want kept to the issue branch " + "first. The daemon replaces the pod and its disk when the round ends: at the moment the message names, or earlier when every " + "role has answered and no turn runs. No answer delays that moment, and the end of a turn is no answer. The call ends no phase. The " + "daemon holds your next task until your process comes back on the new pod, in this same session. " + (host.after ?? "") + `What a later phase needs goes in your handoff; a question for another live role goes to its role topic with ${host.envoyPublish}.`;
58651
58706
  }
58652
58707
  async function mintClaimGrant(daemon, claim) {
58653
58708
  const { grantId } = await daemon.grant({
@@ -16767,6 +16767,7 @@ function hasErrnoCode(error, code) {
16767
16767
  var STDIN = "-";
16768
16768
  var BARE_WORD = /^[A-Za-z0-9_./:@%+=,-]+$/;
16769
16769
  var OPTION_SEPARATOR = ": ";
16770
+ var LOCAL_FILE_FIELD = { tool: "dispatch_artifact", field: "path" };
16770
16771
  function commandName(tool) {
16771
16772
  return tool.replace(/^dispatch_/, "").replaceAll("_", "-");
16772
16773
  }
@@ -17019,6 +17020,7 @@ function parseCommand(argv, io) {
17019
17020
  const args = {};
17020
17021
  const setBy = new Map;
17021
17022
  const problems = [];
17023
+ const bareDashes = new Set;
17022
17024
  let help = false;
17023
17025
  let dryRun = false;
17024
17026
  let stdinFlag;
@@ -17135,6 +17137,10 @@ function parseCommand(argv, io) {
17135
17137
  const parsed = info.kind === "number" ? number(flag, value) : value;
17136
17138
  if (claimed && parsed !== undefined)
17137
17139
  args[field] = parsed;
17140
+ if (info.kind === "string" && value === STDIN && !(tool === LOCAL_FILE_FIELD.tool && field === LOCAL_FILE_FIELD.field) && !bareDashes.has(flag)) {
17141
+ bareDashes.add(flag);
17142
+ problems.push(`${flag} - sends the one character "-". ${flag}-file <path> reads ${flag} from a file, and ${flag}-file - reads it from stdin. One flag of a call may read stdin.`);
17143
+ }
17138
17144
  break;
17139
17145
  }
17140
17146
  case "file": {
@@ -17166,8 +17172,9 @@ function parseCommand(argv, io) {
17166
17172
  }
17167
17173
  if (help)
17168
17174
  return { kind: "help", tool };
17169
- if (problems.length > 0)
17170
- return { kind: "refused", tool, problems };
17175
+ if (problems.length > 0) {
17176
+ return problems.length === bareDashes.size ? { kind: "refused", tool, problems, aboutAFlag: false } : { kind: "refused", tool, problems };
17177
+ }
17171
17178
  return { kind: "call", tool, args, dryRun };
17172
17179
  }
17173
17180
  function appendedItem(kind, flag, value, number) {
@@ -15,6 +15,7 @@ You work one phase of one issue in a jj workspace every role of the issue shares
15
15
  2. **Commit only your phase's work**, with `jj -R "$LEGION_WORKSPACE" split -m "<message>" <paths…>`, each commit holding only your phase's paths, so the next phase sees what you changed.
16
16
  3. **Put back what you copied in.** Before you write the handoff, run `jj -R "$LEGION_WORKSPACE" status` and remove or restore every file you copied or fetched in that is not your phase's work, such as another branch's test rig. With jj the working copy is the commit: the next role's first commit builds on what you left, and its push ships it.
17
17
  4. **Write the handoff** your role prompt names, with the `write` tool to `$TMPDIR/<issue>-<word>.json`, outside the workspace (jj snapshots every file in the workspace into the working-copy commit), then record it with `dispatch handoff-write --issue <issue> --phase <word> --body-file "$TMPDIR/<issue>-<word>.json"`. A handoff is never a commit, and no handoff carries the evidence: what you ran is a result you record against one of the issue's checks with `dispatch result`, and `skill://legion-worker/references/pr-body.md#what-a-result-is` defines a check and a result. To change a handoff already recorded, read it with `dispatch handoff-read`, edit the body, and record it whole again: each `dispatch handoff-write` adds a version, and `handoff_complete` reports the newest.
18
+ Every handoff body holds `head`, the 40-character lower-case commit the work it reports was done against — the commit the planner's workspace stood on, the commit the implementer pushed as `@-`, the commit the tester's recorded results name (the `--commit` it gave `dispatch result`), the `commit_id` of the review the reviewer submits — and your completion carries that head to the daemon, which takes a completion of an earlier entry of your phase only at the head the record holds. The tester and the reviewer never fill it with a read of the pull request's head made when they write the handoff: a push that landed while they worked names a head their work was not done against.
18
19
  5. **Push any work, then complete**, as the push section below says. `handoff_complete` is your only way to end a phase: add no label, keep no status of your own and run no loop of your own, since the daemon owns the issue's state and the architect its decomposition and gates.
19
20
 
20
21
  ## Stop rules
@@ -99,8 +99,11 @@ spec; nothing else decides what must be proved.
99
99
 
100
100
  **A result** is one run of one check, recorded with
101
101
  `dispatch result --issue <issue> --check <block id> --role <your role> --verdict pass --commit <sha>`,
102
- with `--surface`, `--run`, `--observed` and `--negative-control` as the check asks for them. The
103
- command prints the pull request body's line for it, and that line goes into the body unchanged.
102
+ with `--surface`, `--run`, `--observed` and `--negative-control` as the check asks for them. Each
103
+ of these flags takes text and refuses a bare `-`. Text from a file or from stdin goes in
104
+ `--run-file`, `--observed-file` or `--negative-control-file`. Only one of them per call may read
105
+ stdin (`-`). The command prints the pull request body's line for it, and that line goes into the
106
+ body unchanged.
104
107
  The surface is **production-like** — the repository's real-process test harness and fixtures, a
105
108
  sandbox repository, a real browser, a devN stack, staging, or a local stack with real migrations,
106
109
  one that has the resource the change touches — and `--run` or `--observed` carries a **link** to
@@ -159,6 +162,8 @@ and decides there, the only gate on such an issue.
159
162
  PR body, because the reviewer and the merger verify facts on GitHub and never from a handoff.
160
163
  The `implement` handoff carries none: Dispatch holds them, and the tester reads them with
161
164
  `dispatch results`.
165
+ What a handoff does carry is `head`, the 40-character lower-case commit its work was done
166
+ against, which the completion sends to the daemon.
162
167
  - **The tester judges the implementer's results and records its own.** It runs and records no
163
168
  check with `ci_check`, whose result `dispatch results` derives. A derived fail, or a run that
164
169
  concluded `skipped`, `neutral` or `cancelled`, is a test failure. A run still going, or GitHub
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "2.18.0",
3
+ "version": "2.19.1",
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": 111
22
+ "daemonApiVersion": 123
23
23
  },
24
24
  "repository": {
25
25
  "type": "git",
@@ -8,7 +8,7 @@ description: "Use before your first dispatch command in a session: a message, co
8
8
  Dispatch is a record for the people who decide, never a log of your work.
9
9
 
10
10
  - Use the `dispatch` command; the HTTP API only for what no command does. `dispatch <command> --help` gives its rules and an example.
11
- - Put long text on stdin: `--<field>-file -` with a quoted here-document (`<<'EOF'`); give object and list fields as JSON.
11
+ - Put long text on stdin, one flag per call: `--<field>-file -` with `<<'EOF'`; objects and lists take JSON.
12
12
  - Exit 1 is a refusal, 2 a usage error. A refusal lists every problem: fix all, call once.
13
13
  - Never work around a hard-to-use command, or one storing or losing something wrongly: open an issue in the owning project and tell its controller. A Legion role tells its architect (`skill://legion-worker/references/findings.md`).
14
14
 
@@ -33,9 +33,13 @@ export interface LegionToolRuntime {
33
33
  readonly daemon: LegionDaemonClient
34
34
  /** The pane's registered claim, or undefined while its boot is still registering. */
35
35
  readonly claim: () => ClaimCapability | undefined
36
- /** What a completion of `phase` by `role` reports beside its summary (`findHandoffReport` with
37
- * the pane's environment and Dispatch): throws naming the remedy when the phase has no handoff
38
- * record, Dispatch does not answer, or the implementer's work is not pushed. */
36
+ /** What a completion by `role` reports beside its summary while the issue stands at `phase`
37
+ * (`findHandoffReport` with the pane's environment and Dispatch): the newest record of the
38
+ * phase the role works or, once the issue has moved on, of the phase it left, or `@-` alone where
39
+ * that left phase has none or the implementer's left record names no head. Throws naming the remedy when the phase the role works has no
40
+ * handoff record, Dispatch does not answer, or, while the issue stands in implementing, the
41
+ * implementer's record names no head, the commit its workspace stands on is not pushed, or its
42
+ * record's head is not that pushed commit. */
39
43
  readonly handoffReport: (phase: LegionPhase, role: LegionRole) => Promise<HandoffReport>
40
44
  /** The head of `legion/<issue>@origin` a `ready_for_update` signal reports
41
45
  * (`findPushedBranchHead` with the pane's environment): `""` when the branch is not there. */