@sjawhar/claude-envoy 6.30.1 → 6.31.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": "6.30.1"
5
+ "version": "6.31.0"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-envoy",
3
- "version": "6.30.1",
3
+ "version": "6.31.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
  }
@@ -15413,7 +15413,7 @@ var dispatchToolSpecs = [
15413
15413
  {
15414
15414
  name: "dispatch_steps",
15415
15415
  example: { issue: "DSP-1" },
15416
- description: "Print each task of an issue's plan and each step that ran on the issue, as the Legion " + "daemon recorded it at the step's start and at its end, and the experiment and the " + "variant the issue was drawn into, where its records name one. The first line is " + "`<KEY>: <n> steps in <m> tasks`, where m counts each task listed, a task of the plan " + "with no run included. Where the records of the issue's newest run name an experiment, " + "the next line is `Experiment <experiment>: variant <variant>.`, and an issue whose " + "newest run's records name none prints no such line. The tasks of the issue's newest " + "plan come first, in the plan's order, then each other task with a run, in the order " + "each first ran. A task of the plan prints `task <task> needs <needs>: <place> <step> " + "<state>, ...`: needs is the tasks it needs as a list, [a,b], [] where it needs none, " + "and - where its plan node recorded none, then each step the plan gives it, where state " + "is where Dispatch says it stands among the records of the plan's own run: not started, " + "running, or the result of its newest run there. Then each run of a step of the task " + "prints one line: `<task> " + "<step> <kind> <role> <type> attempt <attempt> <agent> <model> <started_at> <ended_at> " + "<result>`. kind is step, retro or merge. step is the step's place in its task, from 1, " + "and 0 for a retro or a merge. attempt counts the runs of the same task, step and kind, " + "from 1. agent is the claim of the role that ran the step, and model is the model that " + "answered it, as provider/model. result is passed, failed or stopped. A field with no " + "value prints -, and a run that has not ended prints running for its end and its result. " + "A closed issue's steps read too. An issue that no step ran on and that has no plan prints " + "0 steps in 0 tasks, and a key Dispatch does not hold fails as dispatch read fails for it, " + `NOT_FOUND: not found. ${ISSUE_REFERENCE}`,
15416
+ description: "Print each task of an issue's plan and each step that ran on the issue, as the Legion " + "daemon recorded it at the step's start and at its end, and the experiment and the " + "variant the issue was drawn into, where its records name one. The first line is " + "`<KEY>: <n> steps in <m> tasks`, where m counts each task listed, a task of the plan " + "with no run included. Where the records of the issue's newest run name an experiment, " + "the next line is `Experiment <experiment>: variant <variant>.`, and an issue whose " + "newest run's records name none prints no such line. The tasks of the issue's newest " + "plan come first, in the plan's order, then each other task with a run, in the order " + "each first ran. A task of the plan prints `task <task> needs <needs>: <place> <step> " + "<state>, ...`: needs is the tasks it needs as a list, [a,b], [] where it needs none, " + "and - where its plan node recorded none, then each step the plan gives it, where state " + "is where Dispatch says it stands among the records of the plan's own run: not started, " + "running, or the result of its newest run there. Then each run of a step of the task " + "prints one line: `<task> " + "<step> <kind> <role> <type> attempt <attempt> <agent> <model> <started_at> <ended_at> " + "<result>`. kind is step, retro or merge. step is the step's place in its task, from 1, " + "and 0 for a retro or a merge. attempt counts the runs of the same task, step and kind, " + "from 1. agent is the claim of the role that ran the step, and model is the model that " + "answered last, as provider/model. result is passed, failed or stopped. After the result " + "each line prints set and the model the role was set to, or - for none. Then it prints " + "answered and each model with its calls and its share of the step's calls in whole " + "percent, as anthropic/claude-opus-5-5=41(93%). It prints running for a run not yet " + "ended, unknown where Legion does not know the counts, and none for a step with no call. " + "A field with no value prints -, and a run that has not ended prints running for its end " + "and its result. A closed issue's steps read too. An issue that no step ran on and that " + "has no plan prints 0 steps in 0 tasks, and a key Dispatch does not hold fails as dispatch " + `read fails for it, NOT_FOUND: not found. ${ISSUE_REFERENCE}`,
15417
15417
  arguments: (z) => ({
15418
15418
  issue: z.string().describe(ISSUE_REFERENCE)
15419
15419
  }),
@@ -15422,7 +15422,7 @@ var dispatchToolSpecs = [
15422
15422
  {
15423
15423
  name: "dispatch_plans",
15424
15424
  example: { project: "INFRA" },
15425
- description: "Print each finished issue of a project, newest close first, with the plan Legion ran it " + "from, the rating each retro gave that plan with its reason, its time, its count of " + "failed steps, and the experiment and the variant it was drawn into, where its records " + "name one. An issue is finished when its status is done and Dispatch closed it. The " + "first line is `<PROJECT>: <n> finished issues`. Then each issue prints one line: `<KEY> " + "closed <closed_at> plan <source> (<n> tasks: <steps of the first task>) ratings " + `<rating>/${LEGION_PLAN_RATING_MOST} "<reason>"[, <rating>/${LEGION_PLAN_RATING_MOST} "<reason>" ...] time <h>h<m>m failed steps <n>[ variant <experiment>/<variant>]\`. ` + "The line ends with variant <experiment>/<variant> where the records of the issue's " + "newest run name an experiment, and at failed steps <n> where they name none. " + "source is default (Legion's default steps) or owner (the plan the issue's owner wrote), " + `and the plan is the one of the issue's newest run. A rating is ${LEGION_PLAN_RATING_LEAST} (the plan cost the ` + `work) to ${LEGION_PLAN_RATING_MOST} (the plan fit the work), one for each retro in the order the retros ran, and ` + "its reason prints as a JSON string. time runs from the first start of the issue's steps " + "to the last end, in whole hours and minutes rounded down. failed steps counts the runs " + "of a step that failed, retros and merges left out. An issue with no plan prints plan " + "none, one with no rating prints ratings none, and one whose time is not known prints " + "time -: an issue Legion never ran prints all three. since and until, each an RFC 3339 " + "time, keep the issues closed at or after since and before until.",
15425
+ description: "Print each finished issue of a project, newest close first, with the plan Legion ran it " + "from, the rating each retro gave that plan with its reason, its time, its count of " + "failed steps, and the experiment and the variant it was drawn into, where its records " + "name one. An issue is finished when its status is done and Dispatch closed it. The " + "first line is `<PROJECT>: <n> finished issues`. Then each issue prints one line: `<KEY> " + "closed <closed_at> plan <source> (<n> tasks: <steps of the first task>) ratings " + `<rating>/${LEGION_PLAN_RATING_MOST} "<reason>"[, <rating>/${LEGION_PLAN_RATING_MOST} "<reason>" ...] time <h>h<m>m failed steps <n> on set model <n> off <n> unknown <n>[ variant <experiment>/<variant>]\`. ` + "The line ends with variant <experiment>/<variant> where the records of the issue's " + "newest run name an experiment, and at unknown <n> where they name none. " + "source is default (Legion's default steps) or owner (the plan the issue's owner wrote), " + `and the plan is the one of the issue's newest run. A rating is ${LEGION_PLAN_RATING_LEAST} (the plan cost the ` + `work) to ${LEGION_PLAN_RATING_MOST} (the plan fit the work), one for each retro in the order the retros ran, and ` + "its reason prints as a JSON string. time runs from the first start of the issue's steps " + "to the last end, in whole hours and minutes rounded down. failed steps counts the runs " + "of a step that failed, retros and merges left out. on set model counts the issue's step " + "records that name an agent and a set model, know their counts and name no other model. " + "off counts the records with an agent that name a set model, know their counts and name " + "another model. unknown counts every other step record that names an agent. Each of the " + "three prints - where the Dispatch server is older than these counts. An issue with no " + "plan prints plan none, one with no rating prints ratings none, and one whose time is not " + "known prints time -: an issue Legion never ran prints all three. since and until, each an " + "RFC 3339 time, keep the issues closed at or after since and before until.",
15426
15426
  arguments: (z) => ({
15427
15427
  project: z.string().describe("Project key whose finished issues to list, such as INFRA."),
15428
15428
  since: z.string().describe("Optional RFC 3339 time; only issues closed at or after it.").optional(),
@@ -19784,6 +19784,22 @@ function canonicalRepo(owner, repo) {
19784
19784
  }
19785
19785
  // ../contracts/src/slack.ts
19786
19786
  var SLACK_POST_TEXT_MAX = 4000;
19787
+ // ../contracts/src/step-answers.ts
19788
+ function setModelText(record) {
19789
+ const setModel = record.set_model ?? "";
19790
+ return setModel === "" ? null : setModel;
19791
+ }
19792
+ function answeredText(record) {
19793
+ if (record.ended_at === null)
19794
+ return "running";
19795
+ const answers = record.answers ?? null;
19796
+ if (answers === null)
19797
+ return "unknown";
19798
+ if (answers.length === 0)
19799
+ return "none";
19800
+ const calls = answers.reduce((sum, answer) => sum + answer.calls, 0);
19801
+ return answers.map((answer) => `${answer.model}=${answer.calls}(${Math.round(100 * answer.calls / calls)}%)`).join(",");
19802
+ }
19787
19803
  // ../contracts/src/subject-project.ts
19788
19804
  var EXCEPTION_PREFIX = "notifications.envoy.exceptions.";
19789
19805
  var KEPT_PREFIX = "notifications.envoy.kept.";
@@ -33671,6 +33687,11 @@ function timeText(seconds) {
33671
33687
  const minutes = Math.floor(seconds / 60);
33672
33688
  return `time ${Math.floor(minutes / 60)}h${minutes % 60}m`;
33673
33689
  }
33690
+ function setModelStepsText(counts) {
33691
+ if (counts === undefined)
33692
+ return "on set model - off - unknown -";
33693
+ return `on set model ${counts.on} off ${counts.off} unknown ${counts.unknown}`;
33694
+ }
33674
33695
  function issueLine(issue) {
33675
33696
  return [
33676
33697
  issue.issue,
@@ -33681,6 +33702,7 @@ function issueLine(issue) {
33681
33702
  timeText(issue.duration_seconds),
33682
33703
  "failed steps",
33683
33704
  issue.failed_steps,
33705
+ setModelStepsText(issue.set_model_steps),
33684
33706
  ...issue.experiment == null || issue.variant == null ? [] : [`variant ${issue.experiment}/${issue.variant}`]
33685
33707
  ].join(" ");
33686
33708
  }
@@ -34825,7 +34847,11 @@ function stepLine(record) {
34825
34847
  orDash(record.agent),
34826
34848
  orDash(record.model),
34827
34849
  orDash(record.started_at),
34828
- ...record.ended_at === null ? ["running", "running"] : [record.ended_at, orDash(record.result)]
34850
+ ...record.ended_at === null ? ["running", "running"] : [record.ended_at, orDash(record.result)],
34851
+ "set",
34852
+ orDash(setModelText(record)),
34853
+ "answered",
34854
+ answeredText(record)
34829
34855
  ].join(" ");
34830
34856
  }
34831
34857
  function taskLine(task, needs, planned) {
package/dist/dispatch.js CHANGED
@@ -16013,7 +16013,7 @@ var dispatchToolSpecs = [
16013
16013
  {
16014
16014
  name: "dispatch_steps",
16015
16015
  example: { issue: "DSP-1" },
16016
- description: "Print each task of an issue's plan and each step that ran on the issue, as the Legion " + "daemon recorded it at the step's start and at its end, and the experiment and the " + "variant the issue was drawn into, where its records name one. The first line is " + "`<KEY>: <n> steps in <m> tasks`, where m counts each task listed, a task of the plan " + "with no run included. Where the records of the issue's newest run name an experiment, " + "the next line is `Experiment <experiment>: variant <variant>.`, and an issue whose " + "newest run's records name none prints no such line. The tasks of the issue's newest " + "plan come first, in the plan's order, then each other task with a run, in the order " + "each first ran. A task of the plan prints `task <task> needs <needs>: <place> <step> " + "<state>, ...`: needs is the tasks it needs as a list, [a,b], [] where it needs none, " + "and - where its plan node recorded none, then each step the plan gives it, where state " + "is where Dispatch says it stands among the records of the plan's own run: not started, " + "running, or the result of its newest run there. Then each run of a step of the task " + "prints one line: `<task> " + "<step> <kind> <role> <type> attempt <attempt> <agent> <model> <started_at> <ended_at> " + "<result>`. kind is step, retro or merge. step is the step's place in its task, from 1, " + "and 0 for a retro or a merge. attempt counts the runs of the same task, step and kind, " + "from 1. agent is the claim of the role that ran the step, and model is the model that " + "answered it, as provider/model. result is passed, failed or stopped. A field with no " + "value prints -, and a run that has not ended prints running for its end and its result. " + "A closed issue's steps read too. An issue that no step ran on and that has no plan prints " + "0 steps in 0 tasks, and a key Dispatch does not hold fails as dispatch read fails for it, " + `NOT_FOUND: not found. ${ISSUE_REFERENCE}`,
16016
+ description: "Print each task of an issue's plan and each step that ran on the issue, as the Legion " + "daemon recorded it at the step's start and at its end, and the experiment and the " + "variant the issue was drawn into, where its records name one. The first line is " + "`<KEY>: <n> steps in <m> tasks`, where m counts each task listed, a task of the plan " + "with no run included. Where the records of the issue's newest run name an experiment, " + "the next line is `Experiment <experiment>: variant <variant>.`, and an issue whose " + "newest run's records name none prints no such line. The tasks of the issue's newest " + "plan come first, in the plan's order, then each other task with a run, in the order " + "each first ran. A task of the plan prints `task <task> needs <needs>: <place> <step> " + "<state>, ...`: needs is the tasks it needs as a list, [a,b], [] where it needs none, " + "and - where its plan node recorded none, then each step the plan gives it, where state " + "is where Dispatch says it stands among the records of the plan's own run: not started, " + "running, or the result of its newest run there. Then each run of a step of the task " + "prints one line: `<task> " + "<step> <kind> <role> <type> attempt <attempt> <agent> <model> <started_at> <ended_at> " + "<result>`. kind is step, retro or merge. step is the step's place in its task, from 1, " + "and 0 for a retro or a merge. attempt counts the runs of the same task, step and kind, " + "from 1. agent is the claim of the role that ran the step, and model is the model that " + "answered last, as provider/model. result is passed, failed or stopped. After the result " + "each line prints set and the model the role was set to, or - for none. Then it prints " + "answered and each model with its calls and its share of the step's calls in whole " + "percent, as anthropic/claude-opus-5-5=41(93%). It prints running for a run not yet " + "ended, unknown where Legion does not know the counts, and none for a step with no call. " + "A field with no value prints -, and a run that has not ended prints running for its end " + "and its result. A closed issue's steps read too. An issue that no step ran on and that " + "has no plan prints 0 steps in 0 tasks, and a key Dispatch does not hold fails as dispatch " + `read fails for it, NOT_FOUND: not found. ${ISSUE_REFERENCE}`,
16017
16017
  arguments: (z) => ({
16018
16018
  issue: z.string().describe(ISSUE_REFERENCE)
16019
16019
  }),
@@ -16022,7 +16022,7 @@ var dispatchToolSpecs = [
16022
16022
  {
16023
16023
  name: "dispatch_plans",
16024
16024
  example: { project: "INFRA" },
16025
- description: "Print each finished issue of a project, newest close first, with the plan Legion ran it " + "from, the rating each retro gave that plan with its reason, its time, its count of " + "failed steps, and the experiment and the variant it was drawn into, where its records " + "name one. An issue is finished when its status is done and Dispatch closed it. The " + "first line is `<PROJECT>: <n> finished issues`. Then each issue prints one line: `<KEY> " + "closed <closed_at> plan <source> (<n> tasks: <steps of the first task>) ratings " + `<rating>/${LEGION_PLAN_RATING_MOST} "<reason>"[, <rating>/${LEGION_PLAN_RATING_MOST} "<reason>" ...] time <h>h<m>m failed steps <n>[ variant <experiment>/<variant>]\`. ` + "The line ends with variant <experiment>/<variant> where the records of the issue's " + "newest run name an experiment, and at failed steps <n> where they name none. " + "source is default (Legion's default steps) or owner (the plan the issue's owner wrote), " + `and the plan is the one of the issue's newest run. A rating is ${LEGION_PLAN_RATING_LEAST} (the plan cost the ` + `work) to ${LEGION_PLAN_RATING_MOST} (the plan fit the work), one for each retro in the order the retros ran, and ` + "its reason prints as a JSON string. time runs from the first start of the issue's steps " + "to the last end, in whole hours and minutes rounded down. failed steps counts the runs " + "of a step that failed, retros and merges left out. An issue with no plan prints plan " + "none, one with no rating prints ratings none, and one whose time is not known prints " + "time -: an issue Legion never ran prints all three. since and until, each an RFC 3339 " + "time, keep the issues closed at or after since and before until.",
16025
+ description: "Print each finished issue of a project, newest close first, with the plan Legion ran it " + "from, the rating each retro gave that plan with its reason, its time, its count of " + "failed steps, and the experiment and the variant it was drawn into, where its records " + "name one. An issue is finished when its status is done and Dispatch closed it. The " + "first line is `<PROJECT>: <n> finished issues`. Then each issue prints one line: `<KEY> " + "closed <closed_at> plan <source> (<n> tasks: <steps of the first task>) ratings " + `<rating>/${LEGION_PLAN_RATING_MOST} "<reason>"[, <rating>/${LEGION_PLAN_RATING_MOST} "<reason>" ...] time <h>h<m>m failed steps <n> on set model <n> off <n> unknown <n>[ variant <experiment>/<variant>]\`. ` + "The line ends with variant <experiment>/<variant> where the records of the issue's " + "newest run name an experiment, and at unknown <n> where they name none. " + "source is default (Legion's default steps) or owner (the plan the issue's owner wrote), " + `and the plan is the one of the issue's newest run. A rating is ${LEGION_PLAN_RATING_LEAST} (the plan cost the ` + `work) to ${LEGION_PLAN_RATING_MOST} (the plan fit the work), one for each retro in the order the retros ran, and ` + "its reason prints as a JSON string. time runs from the first start of the issue's steps " + "to the last end, in whole hours and minutes rounded down. failed steps counts the runs " + "of a step that failed, retros and merges left out. on set model counts the issue's step " + "records that name an agent and a set model, know their counts and name no other model. " + "off counts the records with an agent that name a set model, know their counts and name " + "another model. unknown counts every other step record that names an agent. Each of the " + "three prints - where the Dispatch server is older than these counts. An issue with no " + "plan prints plan none, one with no rating prints ratings none, and one whose time is not " + "known prints time -: an issue Legion never ran prints all three. since and until, each an " + "RFC 3339 time, keep the issues closed at or after since and before until.",
16026
16026
  arguments: (z) => ({
16027
16027
  project: z.string().describe("Project key whose finished issues to list, such as INFRA."),
16028
16028
  since: z.string().describe("Optional RFC 3339 time; only issues closed at or after it.").optional(),
@@ -20384,6 +20384,22 @@ function canonicalRepo(owner, repo) {
20384
20384
  }
20385
20385
  // ../contracts/src/slack.ts
20386
20386
  var SLACK_POST_TEXT_MAX = 4000;
20387
+ // ../contracts/src/step-answers.ts
20388
+ function setModelText(record) {
20389
+ const setModel = record.set_model ?? "";
20390
+ return setModel === "" ? null : setModel;
20391
+ }
20392
+ function answeredText(record) {
20393
+ if (record.ended_at === null)
20394
+ return "running";
20395
+ const answers = record.answers ?? null;
20396
+ if (answers === null)
20397
+ return "unknown";
20398
+ if (answers.length === 0)
20399
+ return "none";
20400
+ const calls = answers.reduce((sum, answer) => sum + answer.calls, 0);
20401
+ return answers.map((answer) => `${answer.model}=${answer.calls}(${Math.round(100 * answer.calls / calls)}%)`).join(",");
20402
+ }
20387
20403
  // ../contracts/src/subject-project.ts
20388
20404
  var EXCEPTION_PREFIX = "notifications.envoy.exceptions.";
20389
20405
  var KEPT_PREFIX = "notifications.envoy.kept.";
@@ -39878,6 +39894,11 @@ function timeText(seconds) {
39878
39894
  const minutes = Math.floor(seconds / 60);
39879
39895
  return `time ${Math.floor(minutes / 60)}h${minutes % 60}m`;
39880
39896
  }
39897
+ function setModelStepsText(counts) {
39898
+ if (counts === undefined)
39899
+ return "on set model - off - unknown -";
39900
+ return `on set model ${counts.on} off ${counts.off} unknown ${counts.unknown}`;
39901
+ }
39881
39902
  function issueLine(issue) {
39882
39903
  return [
39883
39904
  issue.issue,
@@ -39888,6 +39909,7 @@ function issueLine(issue) {
39888
39909
  timeText(issue.duration_seconds),
39889
39910
  "failed steps",
39890
39911
  issue.failed_steps,
39912
+ setModelStepsText(issue.set_model_steps),
39891
39913
  ...issue.experiment == null || issue.variant == null ? [] : [`variant ${issue.experiment}/${issue.variant}`]
39892
39914
  ].join(" ");
39893
39915
  }
@@ -41032,7 +41054,11 @@ function stepLine(record) {
41032
41054
  orDash(record.agent),
41033
41055
  orDash(record.model),
41034
41056
  orDash(record.started_at),
41035
- ...record.ended_at === null ? ["running", "running"] : [record.ended_at, orDash(record.result)]
41057
+ ...record.ended_at === null ? ["running", "running"] : [record.ended_at, orDash(record.result)],
41058
+ "set",
41059
+ orDash(setModelText(record)),
41060
+ "answered",
41061
+ answeredText(record)
41036
41062
  ].join(" ");
41037
41063
  }
41038
41064
  function taskLine(task, needs, planned) {
@@ -38213,7 +38213,7 @@ var dispatchToolSpecs = [
38213
38213
  {
38214
38214
  name: "dispatch_steps",
38215
38215
  example: { issue: "DSP-1" },
38216
- description: "Print each task of an issue's plan and each step that ran on the issue, as the Legion " + "daemon recorded it at the step's start and at its end, and the experiment and the " + "variant the issue was drawn into, where its records name one. The first line is " + "`<KEY>: <n> steps in <m> tasks`, where m counts each task listed, a task of the plan " + "with no run included. Where the records of the issue's newest run name an experiment, " + "the next line is `Experiment <experiment>: variant <variant>.`, and an issue whose " + "newest run's records name none prints no such line. The tasks of the issue's newest " + "plan come first, in the plan's order, then each other task with a run, in the order " + "each first ran. A task of the plan prints `task <task> needs <needs>: <place> <step> " + "<state>, ...`: needs is the tasks it needs as a list, [a,b], [] where it needs none, " + "and - where its plan node recorded none, then each step the plan gives it, where state " + "is where Dispatch says it stands among the records of the plan's own run: not started, " + "running, or the result of its newest run there. Then each run of a step of the task " + "prints one line: `<task> " + "<step> <kind> <role> <type> attempt <attempt> <agent> <model> <started_at> <ended_at> " + "<result>`. kind is step, retro or merge. step is the step's place in its task, from 1, " + "and 0 for a retro or a merge. attempt counts the runs of the same task, step and kind, " + "from 1. agent is the claim of the role that ran the step, and model is the model that " + "answered it, as provider/model. result is passed, failed or stopped. A field with no " + "value prints -, and a run that has not ended prints running for its end and its result. " + "A closed issue's steps read too. An issue that no step ran on and that has no plan prints " + "0 steps in 0 tasks, and a key Dispatch does not hold fails as dispatch read fails for it, " + `NOT_FOUND: not found. ${ISSUE_REFERENCE}`,
38216
+ description: "Print each task of an issue's plan and each step that ran on the issue, as the Legion " + "daemon recorded it at the step's start and at its end, and the experiment and the " + "variant the issue was drawn into, where its records name one. The first line is " + "`<KEY>: <n> steps in <m> tasks`, where m counts each task listed, a task of the plan " + "with no run included. Where the records of the issue's newest run name an experiment, " + "the next line is `Experiment <experiment>: variant <variant>.`, and an issue whose " + "newest run's records name none prints no such line. The tasks of the issue's newest " + "plan come first, in the plan's order, then each other task with a run, in the order " + "each first ran. A task of the plan prints `task <task> needs <needs>: <place> <step> " + "<state>, ...`: needs is the tasks it needs as a list, [a,b], [] where it needs none, " + "and - where its plan node recorded none, then each step the plan gives it, where state " + "is where Dispatch says it stands among the records of the plan's own run: not started, " + "running, or the result of its newest run there. Then each run of a step of the task " + "prints one line: `<task> " + "<step> <kind> <role> <type> attempt <attempt> <agent> <model> <started_at> <ended_at> " + "<result>`. kind is step, retro or merge. step is the step's place in its task, from 1, " + "and 0 for a retro or a merge. attempt counts the runs of the same task, step and kind, " + "from 1. agent is the claim of the role that ran the step, and model is the model that " + "answered last, as provider/model. result is passed, failed or stopped. After the result " + "each line prints set and the model the role was set to, or - for none. Then it prints " + "answered and each model with its calls and its share of the step's calls in whole " + "percent, as anthropic/claude-opus-5-5=41(93%). It prints running for a run not yet " + "ended, unknown where Legion does not know the counts, and none for a step with no call. " + "A field with no value prints -, and a run that has not ended prints running for its end " + "and its result. A closed issue's steps read too. An issue that no step ran on and that " + "has no plan prints 0 steps in 0 tasks, and a key Dispatch does not hold fails as dispatch " + `read fails for it, NOT_FOUND: not found. ${ISSUE_REFERENCE}`,
38217
38217
  arguments: (z) => ({
38218
38218
  issue: z.string().describe(ISSUE_REFERENCE)
38219
38219
  }),
@@ -38222,7 +38222,7 @@ var dispatchToolSpecs = [
38222
38222
  {
38223
38223
  name: "dispatch_plans",
38224
38224
  example: { project: "INFRA" },
38225
- description: "Print each finished issue of a project, newest close first, with the plan Legion ran it " + "from, the rating each retro gave that plan with its reason, its time, its count of " + "failed steps, and the experiment and the variant it was drawn into, where its records " + "name one. An issue is finished when its status is done and Dispatch closed it. The " + "first line is `<PROJECT>: <n> finished issues`. Then each issue prints one line: `<KEY> " + "closed <closed_at> plan <source> (<n> tasks: <steps of the first task>) ratings " + `<rating>/${LEGION_PLAN_RATING_MOST} "<reason>"[, <rating>/${LEGION_PLAN_RATING_MOST} "<reason>" ...] time <h>h<m>m failed steps <n>[ variant <experiment>/<variant>]\`. ` + "The line ends with variant <experiment>/<variant> where the records of the issue's " + "newest run name an experiment, and at failed steps <n> where they name none. " + "source is default (Legion's default steps) or owner (the plan the issue's owner wrote), " + `and the plan is the one of the issue's newest run. A rating is ${LEGION_PLAN_RATING_LEAST} (the plan cost the ` + `work) to ${LEGION_PLAN_RATING_MOST} (the plan fit the work), one for each retro in the order the retros ran, and ` + "its reason prints as a JSON string. time runs from the first start of the issue's steps " + "to the last end, in whole hours and minutes rounded down. failed steps counts the runs " + "of a step that failed, retros and merges left out. An issue with no plan prints plan " + "none, one with no rating prints ratings none, and one whose time is not known prints " + "time -: an issue Legion never ran prints all three. since and until, each an RFC 3339 " + "time, keep the issues closed at or after since and before until.",
38225
+ description: "Print each finished issue of a project, newest close first, with the plan Legion ran it " + "from, the rating each retro gave that plan with its reason, its time, its count of " + "failed steps, and the experiment and the variant it was drawn into, where its records " + "name one. An issue is finished when its status is done and Dispatch closed it. The " + "first line is `<PROJECT>: <n> finished issues`. Then each issue prints one line: `<KEY> " + "closed <closed_at> plan <source> (<n> tasks: <steps of the first task>) ratings " + `<rating>/${LEGION_PLAN_RATING_MOST} "<reason>"[, <rating>/${LEGION_PLAN_RATING_MOST} "<reason>" ...] time <h>h<m>m failed steps <n> on set model <n> off <n> unknown <n>[ variant <experiment>/<variant>]\`. ` + "The line ends with variant <experiment>/<variant> where the records of the issue's " + "newest run name an experiment, and at unknown <n> where they name none. " + "source is default (Legion's default steps) or owner (the plan the issue's owner wrote), " + `and the plan is the one of the issue's newest run. A rating is ${LEGION_PLAN_RATING_LEAST} (the plan cost the ` + `work) to ${LEGION_PLAN_RATING_MOST} (the plan fit the work), one for each retro in the order the retros ran, and ` + "its reason prints as a JSON string. time runs from the first start of the issue's steps " + "to the last end, in whole hours and minutes rounded down. failed steps counts the runs " + "of a step that failed, retros and merges left out. on set model counts the issue's step " + "records that name an agent and a set model, know their counts and name no other model. " + "off counts the records with an agent that name a set model, know their counts and name " + "another model. unknown counts every other step record that names an agent. Each of the " + "three prints - where the Dispatch server is older than these counts. An issue with no " + "plan prints plan none, one with no rating prints ratings none, and one whose time is not " + "known prints time -: an issue Legion never ran prints all three. since and until, each an " + "RFC 3339 time, keep the issues closed at or after since and before until.",
38226
38226
  arguments: (z) => ({
38227
38227
  project: z.string().describe("Project key whose finished issues to list, such as INFRA."),
38228
38228
  since: z.string().describe("Optional RFC 3339 time; only issues closed at or after it.").optional(),
@@ -42584,6 +42584,22 @@ function canonicalRepo(owner, repo) {
42584
42584
  }
42585
42585
  // ../contracts/src/slack.ts
42586
42586
  var SLACK_POST_TEXT_MAX = 4000;
42587
+ // ../contracts/src/step-answers.ts
42588
+ function setModelText(record) {
42589
+ const setModel = record.set_model ?? "";
42590
+ return setModel === "" ? null : setModel;
42591
+ }
42592
+ function answeredText(record) {
42593
+ if (record.ended_at === null)
42594
+ return "running";
42595
+ const answers = record.answers ?? null;
42596
+ if (answers === null)
42597
+ return "unknown";
42598
+ if (answers.length === 0)
42599
+ return "none";
42600
+ const calls = answers.reduce((sum, answer) => sum + answer.calls, 0);
42601
+ return answers.map((answer) => `${answer.model}=${answer.calls}(${Math.round(100 * answer.calls / calls)}%)`).join(",");
42602
+ }
42587
42603
  // ../contracts/src/subject-project.ts
42588
42604
  var EXCEPTION_PREFIX = "notifications.envoy.exceptions.";
42589
42605
  var KEPT_PREFIX = "notifications.envoy.kept.";
@@ -61172,6 +61188,11 @@ function timeText(seconds) {
61172
61188
  const minutes = Math.floor(seconds / 60);
61173
61189
  return `time ${Math.floor(minutes / 60)}h${minutes % 60}m`;
61174
61190
  }
61191
+ function setModelStepsText(counts) {
61192
+ if (counts === undefined)
61193
+ return "on set model - off - unknown -";
61194
+ return `on set model ${counts.on} off ${counts.off} unknown ${counts.unknown}`;
61195
+ }
61175
61196
  function issueLine(issue) {
61176
61197
  return [
61177
61198
  issue.issue,
@@ -61182,6 +61203,7 @@ function issueLine(issue) {
61182
61203
  timeText(issue.duration_seconds),
61183
61204
  "failed steps",
61184
61205
  issue.failed_steps,
61206
+ setModelStepsText(issue.set_model_steps),
61185
61207
  ...issue.experiment == null || issue.variant == null ? [] : [`variant ${issue.experiment}/${issue.variant}`]
61186
61208
  ].join(" ");
61187
61209
  }
@@ -62326,7 +62348,11 @@ function stepLine(record) {
62326
62348
  orDash(record.agent),
62327
62349
  orDash(record.model),
62328
62350
  orDash(record.started_at),
62329
- ...record.ended_at === null ? ["running", "running"] : [record.ended_at, orDash(record.result)]
62351
+ ...record.ended_at === null ? ["running", "running"] : [record.ended_at, orDash(record.result)],
62352
+ "set",
62353
+ orDash(setModelText(record)),
62354
+ "answered",
62355
+ answeredText(record)
62330
62356
  ].join(" ");
62331
62357
  }
62332
62358
  function taskLine(task, needs, planned) {
@@ -69042,7 +69068,7 @@ var import_nats5 = __toESM(require_mod4(), 1);
69042
69068
 
69043
69069
  // package.json
69044
69070
  var name2 = "@sjawhar/claude-envoy";
69045
- var version2 = "6.30.1";
69071
+ var version2 = "6.31.0";
69046
69072
  var package_default = {
69047
69073
  name: name2,
69048
69074
  version: version2,
@@ -15431,7 +15431,7 @@ var dispatchToolSpecs = [
15431
15431
  {
15432
15432
  name: "dispatch_steps",
15433
15433
  example: { issue: "DSP-1" },
15434
- description: "Print each task of an issue's plan and each step that ran on the issue, as the Legion " + "daemon recorded it at the step's start and at its end, and the experiment and the " + "variant the issue was drawn into, where its records name one. The first line is " + "`<KEY>: <n> steps in <m> tasks`, where m counts each task listed, a task of the plan " + "with no run included. Where the records of the issue's newest run name an experiment, " + "the next line is `Experiment <experiment>: variant <variant>.`, and an issue whose " + "newest run's records name none prints no such line. The tasks of the issue's newest " + "plan come first, in the plan's order, then each other task with a run, in the order " + "each first ran. A task of the plan prints `task <task> needs <needs>: <place> <step> " + "<state>, ...`: needs is the tasks it needs as a list, [a,b], [] where it needs none, " + "and - where its plan node recorded none, then each step the plan gives it, where state " + "is where Dispatch says it stands among the records of the plan's own run: not started, " + "running, or the result of its newest run there. Then each run of a step of the task " + "prints one line: `<task> " + "<step> <kind> <role> <type> attempt <attempt> <agent> <model> <started_at> <ended_at> " + "<result>`. kind is step, retro or merge. step is the step's place in its task, from 1, " + "and 0 for a retro or a merge. attempt counts the runs of the same task, step and kind, " + "from 1. agent is the claim of the role that ran the step, and model is the model that " + "answered it, as provider/model. result is passed, failed or stopped. A field with no " + "value prints -, and a run that has not ended prints running for its end and its result. " + "A closed issue's steps read too. An issue that no step ran on and that has no plan prints " + "0 steps in 0 tasks, and a key Dispatch does not hold fails as dispatch read fails for it, " + `NOT_FOUND: not found. ${ISSUE_REFERENCE}`,
15434
+ description: "Print each task of an issue's plan and each step that ran on the issue, as the Legion " + "daemon recorded it at the step's start and at its end, and the experiment and the " + "variant the issue was drawn into, where its records name one. The first line is " + "`<KEY>: <n> steps in <m> tasks`, where m counts each task listed, a task of the plan " + "with no run included. Where the records of the issue's newest run name an experiment, " + "the next line is `Experiment <experiment>: variant <variant>.`, and an issue whose " + "newest run's records name none prints no such line. The tasks of the issue's newest " + "plan come first, in the plan's order, then each other task with a run, in the order " + "each first ran. A task of the plan prints `task <task> needs <needs>: <place> <step> " + "<state>, ...`: needs is the tasks it needs as a list, [a,b], [] where it needs none, " + "and - where its plan node recorded none, then each step the plan gives it, where state " + "is where Dispatch says it stands among the records of the plan's own run: not started, " + "running, or the result of its newest run there. Then each run of a step of the task " + "prints one line: `<task> " + "<step> <kind> <role> <type> attempt <attempt> <agent> <model> <started_at> <ended_at> " + "<result>`. kind is step, retro or merge. step is the step's place in its task, from 1, " + "and 0 for a retro or a merge. attempt counts the runs of the same task, step and kind, " + "from 1. agent is the claim of the role that ran the step, and model is the model that " + "answered last, as provider/model. result is passed, failed or stopped. After the result " + "each line prints set and the model the role was set to, or - for none. Then it prints " + "answered and each model with its calls and its share of the step's calls in whole " + "percent, as anthropic/claude-opus-5-5=41(93%). It prints running for a run not yet " + "ended, unknown where Legion does not know the counts, and none for a step with no call. " + "A field with no value prints -, and a run that has not ended prints running for its end " + "and its result. A closed issue's steps read too. An issue that no step ran on and that " + "has no plan prints 0 steps in 0 tasks, and a key Dispatch does not hold fails as dispatch " + `read fails for it, NOT_FOUND: not found. ${ISSUE_REFERENCE}`,
15435
15435
  arguments: (z) => ({
15436
15436
  issue: z.string().describe(ISSUE_REFERENCE)
15437
15437
  }),
@@ -15440,7 +15440,7 @@ var dispatchToolSpecs = [
15440
15440
  {
15441
15441
  name: "dispatch_plans",
15442
15442
  example: { project: "INFRA" },
15443
- description: "Print each finished issue of a project, newest close first, with the plan Legion ran it " + "from, the rating each retro gave that plan with its reason, its time, its count of " + "failed steps, and the experiment and the variant it was drawn into, where its records " + "name one. An issue is finished when its status is done and Dispatch closed it. The " + "first line is `<PROJECT>: <n> finished issues`. Then each issue prints one line: `<KEY> " + "closed <closed_at> plan <source> (<n> tasks: <steps of the first task>) ratings " + `<rating>/${LEGION_PLAN_RATING_MOST} "<reason>"[, <rating>/${LEGION_PLAN_RATING_MOST} "<reason>" ...] time <h>h<m>m failed steps <n>[ variant <experiment>/<variant>]\`. ` + "The line ends with variant <experiment>/<variant> where the records of the issue's " + "newest run name an experiment, and at failed steps <n> where they name none. " + "source is default (Legion's default steps) or owner (the plan the issue's owner wrote), " + `and the plan is the one of the issue's newest run. A rating is ${LEGION_PLAN_RATING_LEAST} (the plan cost the ` + `work) to ${LEGION_PLAN_RATING_MOST} (the plan fit the work), one for each retro in the order the retros ran, and ` + "its reason prints as a JSON string. time runs from the first start of the issue's steps " + "to the last end, in whole hours and minutes rounded down. failed steps counts the runs " + "of a step that failed, retros and merges left out. An issue with no plan prints plan " + "none, one with no rating prints ratings none, and one whose time is not known prints " + "time -: an issue Legion never ran prints all three. since and until, each an RFC 3339 " + "time, keep the issues closed at or after since and before until.",
15443
+ description: "Print each finished issue of a project, newest close first, with the plan Legion ran it " + "from, the rating each retro gave that plan with its reason, its time, its count of " + "failed steps, and the experiment and the variant it was drawn into, where its records " + "name one. An issue is finished when its status is done and Dispatch closed it. The " + "first line is `<PROJECT>: <n> finished issues`. Then each issue prints one line: `<KEY> " + "closed <closed_at> plan <source> (<n> tasks: <steps of the first task>) ratings " + `<rating>/${LEGION_PLAN_RATING_MOST} "<reason>"[, <rating>/${LEGION_PLAN_RATING_MOST} "<reason>" ...] time <h>h<m>m failed steps <n> on set model <n> off <n> unknown <n>[ variant <experiment>/<variant>]\`. ` + "The line ends with variant <experiment>/<variant> where the records of the issue's " + "newest run name an experiment, and at unknown <n> where they name none. " + "source is default (Legion's default steps) or owner (the plan the issue's owner wrote), " + `and the plan is the one of the issue's newest run. A rating is ${LEGION_PLAN_RATING_LEAST} (the plan cost the ` + `work) to ${LEGION_PLAN_RATING_MOST} (the plan fit the work), one for each retro in the order the retros ran, and ` + "its reason prints as a JSON string. time runs from the first start of the issue's steps " + "to the last end, in whole hours and minutes rounded down. failed steps counts the runs " + "of a step that failed, retros and merges left out. on set model counts the issue's step " + "records that name an agent and a set model, know their counts and name no other model. " + "off counts the records with an agent that name a set model, know their counts and name " + "another model. unknown counts every other step record that names an agent. Each of the " + "three prints - where the Dispatch server is older than these counts. An issue with no " + "plan prints plan none, one with no rating prints ratings none, and one whose time is not " + "known prints time -: an issue Legion never ran prints all three. since and until, each an " + "RFC 3339 time, keep the issues closed at or after since and before until.",
15444
15444
  arguments: (z) => ({
15445
15445
  project: z.string().describe("Project key whose finished issues to list, such as INFRA."),
15446
15446
  since: z.string().describe("Optional RFC 3339 time; only issues closed at or after it.").optional(),
@@ -19802,6 +19802,22 @@ function canonicalRepo(owner, repo) {
19802
19802
  }
19803
19803
  // ../contracts/src/slack.ts
19804
19804
  var SLACK_POST_TEXT_MAX = 4000;
19805
+ // ../contracts/src/step-answers.ts
19806
+ function setModelText(record) {
19807
+ const setModel = record.set_model ?? "";
19808
+ return setModel === "" ? null : setModel;
19809
+ }
19810
+ function answeredText(record) {
19811
+ if (record.ended_at === null)
19812
+ return "running";
19813
+ const answers = record.answers ?? null;
19814
+ if (answers === null)
19815
+ return "unknown";
19816
+ if (answers.length === 0)
19817
+ return "none";
19818
+ const calls = answers.reduce((sum, answer) => sum + answer.calls, 0);
19819
+ return answers.map((answer) => `${answer.model}=${answer.calls}(${Math.round(100 * answer.calls / calls)}%)`).join(",");
19820
+ }
19805
19821
  // ../contracts/src/subject-project.ts
19806
19822
  var EXCEPTION_PREFIX = "notifications.envoy.exceptions.";
19807
19823
  var KEPT_PREFIX = "notifications.envoy.kept.";
@@ -36588,6 +36604,11 @@ function timeText(seconds) {
36588
36604
  const minutes = Math.floor(seconds / 60);
36589
36605
  return `time ${Math.floor(minutes / 60)}h${minutes % 60}m`;
36590
36606
  }
36607
+ function setModelStepsText(counts) {
36608
+ if (counts === undefined)
36609
+ return "on set model - off - unknown -";
36610
+ return `on set model ${counts.on} off ${counts.off} unknown ${counts.unknown}`;
36611
+ }
36591
36612
  function issueLine(issue) {
36592
36613
  return [
36593
36614
  issue.issue,
@@ -36598,6 +36619,7 @@ function issueLine(issue) {
36598
36619
  timeText(issue.duration_seconds),
36599
36620
  "failed steps",
36600
36621
  issue.failed_steps,
36622
+ setModelStepsText(issue.set_model_steps),
36601
36623
  ...issue.experiment == null || issue.variant == null ? [] : [`variant ${issue.experiment}/${issue.variant}`]
36602
36624
  ].join(" ");
36603
36625
  }
@@ -37742,7 +37764,11 @@ function stepLine(record) {
37742
37764
  orDash(record.agent),
37743
37765
  orDash(record.model),
37744
37766
  orDash(record.started_at),
37745
- ...record.ended_at === null ? ["running", "running"] : [record.ended_at, orDash(record.result)]
37767
+ ...record.ended_at === null ? ["running", "running"] : [record.ended_at, orDash(record.result)],
37768
+ "set",
37769
+ orDash(setModelText(record)),
37770
+ "answered",
37771
+ answeredText(record)
37746
37772
  ].join(" ");
37747
37773
  }
37748
37774
  function taskLine(task, needs, planned) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "6.30.1",
3
+ "version": "6.31.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",