@sjawhar/claude-envoy 6.12.10 → 6.14.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.12.10"
5
+ "version": "6.14.0"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-envoy",
3
- "version": "6.12.10",
3
+ "version": "6.14.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
  }
@@ -13950,7 +13950,9 @@ var replyBlockFields = {
13950
13950
  text: string2(),
13951
13951
  removed: boolean2(),
13952
13952
  edited_at: string2().optional(),
13953
- deleted_at: string2().optional()
13953
+ deleted_at: string2().optional(),
13954
+ quote: string2().optional(),
13955
+ occurrence: number2().int().optional()
13954
13956
  };
13955
13957
  var DocumentActorSchema = object({
13956
13958
  kind: string2(),
@@ -14453,6 +14455,11 @@ var COMMENT_ARGUMENT = "Comment id (uuid), or a dispatch://KEY/comment/<id> or "
14453
14455
  var MESSAGE_ARGUMENT = "Message id (uuid), or a dispatch://KEY/message/<id> reference; a reference accepts an " + "8+ character id prefix that is unique on its owner.";
14454
14456
  var ASK_BOUND_RULE = "Dispatch bounds an ask's question and its options together, refuses a longer one and names " + "the bound, and `dispatch limits` prints it. An ask is short and asks one thing; its reasoning " + "goes in the document, not in the question.";
14455
14457
  var DISPATCH_HANDOFF_BODY_MAX = 262144;
14458
+ var STEP_RESULTS = ["passed", "failed", "stopped"];
14459
+ var PLANNED_STEP_STATES = ["not started", "running", ...STEP_RESULTS];
14460
+ var STEP_TASK_MAX = 64;
14461
+ var STEP_TASK_PATTERN = new RegExp(`^[a-z0-9][a-z0-9-]{0,${STEP_TASK_MAX - 1}}$`);
14462
+ var STEP_TASK_RULE_WORDS = `lowercase letters, digits and hyphens, starting with a letter or a digit, at most ${STEP_TASK_MAX} bytes`;
14456
14463
  var HANDOFF_PHASE_PATTERN = /^[a-z][a-z0-9-]{0,31}$/;
14457
14464
  var HANDOFF_PHASE_RULE_WORDS = "a lowercase letter, then up to 31 lowercase letters, digits or hyphens, such as implement";
14458
14465
  var HANDOFF_PHASE_RULE = `phase is not a handoff phase: ${HANDOFF_PHASE_RULE_WORDS}`;
@@ -15308,7 +15315,7 @@ var dispatchToolSpecs = [
15308
15315
  {
15309
15316
  name: "dispatch_steps",
15310
15317
  example: { issue: "DSP-1" },
15311
- description: "Print each step that ran on an 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 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. Then each run of a step prints one line, task by task, in the order " + "each task first ran: `<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 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}`,
15318
+ 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}`,
15312
15319
  arguments: (z) => ({
15313
15320
  issue: z.string().describe(ISSUE_REFERENCE)
15314
15321
  }),
@@ -32988,6 +32995,11 @@ function stepLine(record) {
32988
32995
  ...record.ended_at === null ? ["running", "running"] : [record.ended_at, orDash(record.result)]
32989
32996
  ].join(" ");
32990
32997
  }
32998
+ function taskLine(task, needs, planned) {
32999
+ const states = planned.map((step) => `${step.step} ${step.name} ${step.state}`);
33000
+ const needed = needs === null ? "-" : `[${needs.join(",")}]`;
33001
+ return `task ${task} needs ${needed}: ${states.join(", ")}`;
33002
+ }
32991
33003
  function variantLines(records) {
32992
33004
  const newest = Math.max(...records.map((record) => record.generation));
32993
33005
  const named = records.find((record) => record.generation === newest && record.experiment != null && record.variant != null);
@@ -32996,13 +33008,20 @@ function variantLines(records) {
32996
33008
  async function stepsCommand(context) {
32997
33009
  const { client, issue } = context;
32998
33010
  const read = await client.listSteps(issue());
32999
- const tasks = (read.tasks ?? []).map((task) => ({ task: task.task, steps: task.steps ?? [] }));
33011
+ const tasks = (read.tasks ?? []).map((task) => ({ ...task, steps: task.steps ?? [] }));
33000
33012
  const records = tasks.flatMap((task) => task.steps);
33013
+ const lines = tasks.flatMap((task) => {
33014
+ const runs = task.steps.map(stepLine);
33015
+ const planned = task.planned ?? [];
33016
+ if (planned.length === 0)
33017
+ return runs;
33018
+ return [taskLine(task.task, task.needs ?? null, planned), ...runs];
33019
+ });
33001
33020
  return {
33002
33021
  text: [
33003
33022
  `${read.issue}: ${records.length} steps in ${tasks.length} tasks`,
33004
33023
  ...variantLines(records),
33005
- ...records.map(stepLine)
33024
+ ...lines
33006
33025
  ].join(`
33007
33026
  `),
33008
33027
  details: { issue: read.issue, tasks }
package/dist/dispatch.js CHANGED
@@ -14550,7 +14550,9 @@ var replyBlockFields = {
14550
14550
  text: string2(),
14551
14551
  removed: boolean2(),
14552
14552
  edited_at: string2().optional(),
14553
- deleted_at: string2().optional()
14553
+ deleted_at: string2().optional(),
14554
+ quote: string2().optional(),
14555
+ occurrence: number2().int().optional()
14554
14556
  };
14555
14557
  var DocumentActorSchema = object({
14556
14558
  kind: string2(),
@@ -15053,6 +15055,11 @@ var COMMENT_ARGUMENT = "Comment id (uuid), or a dispatch://KEY/comment/<id> or "
15053
15055
  var MESSAGE_ARGUMENT = "Message id (uuid), or a dispatch://KEY/message/<id> reference; a reference accepts an " + "8+ character id prefix that is unique on its owner.";
15054
15056
  var ASK_BOUND_RULE = "Dispatch bounds an ask's question and its options together, refuses a longer one and names " + "the bound, and `dispatch limits` prints it. An ask is short and asks one thing; its reasoning " + "goes in the document, not in the question.";
15055
15057
  var DISPATCH_HANDOFF_BODY_MAX = 262144;
15058
+ var STEP_RESULTS = ["passed", "failed", "stopped"];
15059
+ var PLANNED_STEP_STATES = ["not started", "running", ...STEP_RESULTS];
15060
+ var STEP_TASK_MAX = 64;
15061
+ var STEP_TASK_PATTERN = new RegExp(`^[a-z0-9][a-z0-9-]{0,${STEP_TASK_MAX - 1}}$`);
15062
+ var STEP_TASK_RULE_WORDS = `lowercase letters, digits and hyphens, starting with a letter or a digit, at most ${STEP_TASK_MAX} bytes`;
15056
15063
  var HANDOFF_PHASE_PATTERN = /^[a-z][a-z0-9-]{0,31}$/;
15057
15064
  var HANDOFF_PHASE_RULE_WORDS = "a lowercase letter, then up to 31 lowercase letters, digits or hyphens, such as implement";
15058
15065
  var HANDOFF_PHASE_RULE = `phase is not a handoff phase: ${HANDOFF_PHASE_RULE_WORDS}`;
@@ -15908,7 +15915,7 @@ var dispatchToolSpecs = [
15908
15915
  {
15909
15916
  name: "dispatch_steps",
15910
15917
  example: { issue: "DSP-1" },
15911
- description: "Print each step that ran on an 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 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. Then each run of a step prints one line, task by task, in the order " + "each task first ran: `<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 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}`,
15918
+ 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}`,
15912
15919
  arguments: (z) => ({
15913
15920
  issue: z.string().describe(ISSUE_REFERENCE)
15914
15921
  }),
@@ -39094,6 +39101,11 @@ function stepLine(record) {
39094
39101
  ...record.ended_at === null ? ["running", "running"] : [record.ended_at, orDash(record.result)]
39095
39102
  ].join(" ");
39096
39103
  }
39104
+ function taskLine(task, needs, planned) {
39105
+ const states = planned.map((step) => `${step.step} ${step.name} ${step.state}`);
39106
+ const needed = needs === null ? "-" : `[${needs.join(",")}]`;
39107
+ return `task ${task} needs ${needed}: ${states.join(", ")}`;
39108
+ }
39097
39109
  function variantLines(records) {
39098
39110
  const newest = Math.max(...records.map((record) => record.generation));
39099
39111
  const named = records.find((record) => record.generation === newest && record.experiment != null && record.variant != null);
@@ -39102,13 +39114,20 @@ function variantLines(records) {
39102
39114
  async function stepsCommand(context) {
39103
39115
  const { client, issue } = context;
39104
39116
  const read = await client.listSteps(issue());
39105
- const tasks = (read.tasks ?? []).map((task) => ({ task: task.task, steps: task.steps ?? [] }));
39117
+ const tasks = (read.tasks ?? []).map((task) => ({ ...task, steps: task.steps ?? [] }));
39106
39118
  const records = tasks.flatMap((task) => task.steps);
39119
+ const lines = tasks.flatMap((task) => {
39120
+ const runs = task.steps.map(stepLine);
39121
+ const planned = task.planned ?? [];
39122
+ if (planned.length === 0)
39123
+ return runs;
39124
+ return [taskLine(task.task, task.needs ?? null, planned), ...runs];
39125
+ });
39107
39126
  return {
39108
39127
  text: [
39109
39128
  `${read.issue}: ${records.length} steps in ${tasks.length} tasks`,
39110
39129
  ...variantLines(records),
39111
- ...records.map(stepLine)
39130
+ ...lines
39112
39131
  ].join(`
39113
39132
  `),
39114
39133
  details: { issue: read.issue, tasks }
@@ -36750,7 +36750,9 @@ var replyBlockFields = {
36750
36750
  text: string2(),
36751
36751
  removed: boolean2(),
36752
36752
  edited_at: string2().optional(),
36753
- deleted_at: string2().optional()
36753
+ deleted_at: string2().optional(),
36754
+ quote: string2().optional(),
36755
+ occurrence: number2().int().optional()
36754
36756
  };
36755
36757
  var DocumentActorSchema = object({
36756
36758
  kind: string2(),
@@ -37253,6 +37255,11 @@ var COMMENT_ARGUMENT = "Comment id (uuid), or a dispatch://KEY/comment/<id> or "
37253
37255
  var MESSAGE_ARGUMENT = "Message id (uuid), or a dispatch://KEY/message/<id> reference; a reference accepts an " + "8+ character id prefix that is unique on its owner.";
37254
37256
  var ASK_BOUND_RULE = "Dispatch bounds an ask's question and its options together, refuses a longer one and names " + "the bound, and `dispatch limits` prints it. An ask is short and asks one thing; its reasoning " + "goes in the document, not in the question.";
37255
37257
  var DISPATCH_HANDOFF_BODY_MAX = 262144;
37258
+ var STEP_RESULTS = ["passed", "failed", "stopped"];
37259
+ var PLANNED_STEP_STATES = ["not started", "running", ...STEP_RESULTS];
37260
+ var STEP_TASK_MAX = 64;
37261
+ var STEP_TASK_PATTERN = new RegExp(`^[a-z0-9][a-z0-9-]{0,${STEP_TASK_MAX - 1}}$`);
37262
+ var STEP_TASK_RULE_WORDS = `lowercase letters, digits and hyphens, starting with a letter or a digit, at most ${STEP_TASK_MAX} bytes`;
37256
37263
  var HANDOFF_PHASE_PATTERN = /^[a-z][a-z0-9-]{0,31}$/;
37257
37264
  var HANDOFF_PHASE_RULE_WORDS = "a lowercase letter, then up to 31 lowercase letters, digits or hyphens, such as implement";
37258
37265
  var HANDOFF_PHASE_RULE = `phase is not a handoff phase: ${HANDOFF_PHASE_RULE_WORDS}`;
@@ -38108,7 +38115,7 @@ var dispatchToolSpecs = [
38108
38115
  {
38109
38116
  name: "dispatch_steps",
38110
38117
  example: { issue: "DSP-1" },
38111
- description: "Print each step that ran on an 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 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. Then each run of a step prints one line, task by task, in the order " + "each task first ran: `<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 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}`,
38118
+ 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}`,
38112
38119
  arguments: (z) => ({
38113
38120
  issue: z.string().describe(ISSUE_REFERENCE)
38114
38121
  }),
@@ -60379,6 +60386,11 @@ function stepLine(record) {
60379
60386
  ...record.ended_at === null ? ["running", "running"] : [record.ended_at, orDash(record.result)]
60380
60387
  ].join(" ");
60381
60388
  }
60389
+ function taskLine(task, needs, planned) {
60390
+ const states = planned.map((step) => `${step.step} ${step.name} ${step.state}`);
60391
+ const needed = needs === null ? "-" : `[${needs.join(",")}]`;
60392
+ return `task ${task} needs ${needed}: ${states.join(", ")}`;
60393
+ }
60382
60394
  function variantLines(records) {
60383
60395
  const newest = Math.max(...records.map((record) => record.generation));
60384
60396
  const named = records.find((record) => record.generation === newest && record.experiment != null && record.variant != null);
@@ -60387,13 +60399,20 @@ function variantLines(records) {
60387
60399
  async function stepsCommand(context) {
60388
60400
  const { client, issue } = context;
60389
60401
  const read = await client.listSteps(issue());
60390
- const tasks = (read.tasks ?? []).map((task) => ({ task: task.task, steps: task.steps ?? [] }));
60402
+ const tasks = (read.tasks ?? []).map((task) => ({ ...task, steps: task.steps ?? [] }));
60391
60403
  const records = tasks.flatMap((task) => task.steps);
60404
+ const lines = tasks.flatMap((task) => {
60405
+ const runs = task.steps.map(stepLine);
60406
+ const planned = task.planned ?? [];
60407
+ if (planned.length === 0)
60408
+ return runs;
60409
+ return [taskLine(task.task, task.needs ?? null, planned), ...runs];
60410
+ });
60392
60411
  return {
60393
60412
  text: [
60394
60413
  `${read.issue}: ${records.length} steps in ${tasks.length} tasks`,
60395
60414
  ...variantLines(records),
60396
- ...records.map(stepLine)
60415
+ ...lines
60397
60416
  ].join(`
60398
60417
  `),
60399
60418
  details: { issue: read.issue, tasks }
@@ -66856,7 +66875,7 @@ var import_nats5 = __toESM(require_mod4(), 1);
66856
66875
 
66857
66876
  // package.json
66858
66877
  var name2 = "@sjawhar/claude-envoy";
66859
- var version2 = "6.12.10";
66878
+ var version2 = "6.14.0";
66860
66879
  var package_default = {
66861
66880
  name: name2,
66862
66881
  version: version2,
@@ -17537,7 +17537,9 @@ var replyBlockFields = {
17537
17537
  text: string2(),
17538
17538
  removed: boolean2(),
17539
17539
  edited_at: string2().optional(),
17540
- deleted_at: string2().optional()
17540
+ deleted_at: string2().optional(),
17541
+ quote: string2().optional(),
17542
+ occurrence: number2().int().optional()
17541
17543
  };
17542
17544
  var DocumentActorSchema = object({
17543
17545
  kind: string2(),
@@ -18040,6 +18042,11 @@ var COMMENT_ARGUMENT = "Comment id (uuid), or a dispatch://KEY/comment/<id> or "
18040
18042
  var MESSAGE_ARGUMENT = "Message id (uuid), or a dispatch://KEY/message/<id> reference; a reference accepts an " + "8+ character id prefix that is unique on its owner.";
18041
18043
  var ASK_BOUND_RULE = "Dispatch bounds an ask's question and its options together, refuses a longer one and names " + "the bound, and `dispatch limits` prints it. An ask is short and asks one thing; its reasoning " + "goes in the document, not in the question.";
18042
18044
  var DISPATCH_HANDOFF_BODY_MAX = 262144;
18045
+ var STEP_RESULTS = ["passed", "failed", "stopped"];
18046
+ var PLANNED_STEP_STATES = ["not started", "running", ...STEP_RESULTS];
18047
+ var STEP_TASK_MAX = 64;
18048
+ var STEP_TASK_PATTERN = new RegExp(`^[a-z0-9][a-z0-9-]{0,${STEP_TASK_MAX - 1}}$`);
18049
+ var STEP_TASK_RULE_WORDS = `lowercase letters, digits and hyphens, starting with a letter or a digit, at most ${STEP_TASK_MAX} bytes`;
18043
18050
  var HANDOFF_PHASE_PATTERN = /^[a-z][a-z0-9-]{0,31}$/;
18044
18051
  var HANDOFF_PHASE_RULE_WORDS = "a lowercase letter, then up to 31 lowercase letters, digits or hyphens, such as implement";
18045
18052
  var HANDOFF_PHASE_RULE = `phase is not a handoff phase: ${HANDOFF_PHASE_RULE_WORDS}`;
@@ -18895,7 +18902,7 @@ var dispatchToolSpecs = [
18895
18902
  {
18896
18903
  name: "dispatch_steps",
18897
18904
  example: { issue: "DSP-1" },
18898
- description: "Print each step that ran on an 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 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. Then each run of a step prints one line, task by task, in the order " + "each task first ran: `<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 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}`,
18905
+ 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}`,
18899
18906
  arguments: (z) => ({
18900
18907
  issue: z.string().describe(ISSUE_REFERENCE)
18901
18908
  }),
@@ -35892,6 +35899,11 @@ function stepLine(record) {
35892
35899
  ...record.ended_at === null ? ["running", "running"] : [record.ended_at, orDash(record.result)]
35893
35900
  ].join(" ");
35894
35901
  }
35902
+ function taskLine(task, needs, planned) {
35903
+ const states = planned.map((step) => `${step.step} ${step.name} ${step.state}`);
35904
+ const needed = needs === null ? "-" : `[${needs.join(",")}]`;
35905
+ return `task ${task} needs ${needed}: ${states.join(", ")}`;
35906
+ }
35895
35907
  function variantLines(records) {
35896
35908
  const newest = Math.max(...records.map((record) => record.generation));
35897
35909
  const named = records.find((record) => record.generation === newest && record.experiment != null && record.variant != null);
@@ -35900,13 +35912,20 @@ function variantLines(records) {
35900
35912
  async function stepsCommand(context) {
35901
35913
  const { client, issue } = context;
35902
35914
  const read = await client.listSteps(issue());
35903
- const tasks = (read.tasks ?? []).map((task) => ({ task: task.task, steps: task.steps ?? [] }));
35915
+ const tasks = (read.tasks ?? []).map((task) => ({ ...task, steps: task.steps ?? [] }));
35904
35916
  const records = tasks.flatMap((task) => task.steps);
35917
+ const lines = tasks.flatMap((task) => {
35918
+ const runs = task.steps.map(stepLine);
35919
+ const planned = task.planned ?? [];
35920
+ if (planned.length === 0)
35921
+ return runs;
35922
+ return [taskLine(task.task, task.needs ?? null, planned), ...runs];
35923
+ });
35905
35924
  return {
35906
35925
  text: [
35907
35926
  `${read.issue}: ${records.length} steps in ${tasks.length} tasks`,
35908
35927
  ...variantLines(records),
35909
- ...records.map(stepLine)
35928
+ ...lines
35910
35929
  ].join(`
35911
35930
  `),
35912
35931
  details: { issue: read.issue, tasks }
@@ -46,8 +46,10 @@ So on a task with no reviewer step and no `acceptance:owner`, such a check holds
46
46
 
47
47
  ## What Legion refuses
48
48
 
49
- `register_plan` answers `409 PLAN_REFUSED` with `reasons: [{task, reason}]`, one reason for each cause, its `task` empty for a cause of the whole plan.
50
- Fix each reason and give a new version.
49
+ `register_plan` answers `409 PLAN_REFUSED` with `reasons: [{task, reason}]`, a reason for each cause, its `task` empty for a cause of the whole plan.
50
+ Past the first reasons of one kind, it counts the rest of that kind in one more reason, of the whole plan.
51
+ Give each task block an id of lowercase letters, digits and hyphens, starting with a letter or a digit, at most 64 bytes: Legion refuses any other id, since Dispatch records no step of such a task.
52
+ Fix each reason and give a new version; the next refusal names what is left.
51
53
  A reason that ends `This release of Legion does not carry it out yet.` names a plan a later release takes: write it again within the table above.
52
54
 
53
55
  An issue whose experiment's group runs the project's default steps takes no plan: give it none, and it runs the default steps.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "6.12.10",
3
+ "version": "6.14.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",