@sjawhar/claude-envoy 1.41.0 → 1.42.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.
@@ -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": "1.41.0"
5
+ "version": "1.42.1"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-envoy",
3
- "version": "1.41.0",
3
+ "version": "1.42.1",
4
4
  "description": "Put Envoy events into the Claude Code session's own conversation and expose Envoy MCP tools.",
5
5
  "mcpServers": {}
6
6
  }
@@ -55498,7 +55498,7 @@ var import_nats2 = __toESM(require_mod4(), 1);
55498
55498
 
55499
55499
  // package.json
55500
55500
  var name = "@sjawhar/claude-envoy";
55501
- var version2 = "1.41.0";
55501
+ var version2 = "1.42.1";
55502
55502
  var legion = {
55503
55503
  daemonApiVersion: 68
55504
55504
  };
@@ -57775,17 +57775,23 @@ var requiredString = (op, field) => {
57775
57775
  var rfc3339String = (op, field, message) => requiredString(op, field).refine((value) => value.trim() === "" || LegionInstant.safeParse(value).success, { error: message });
57776
57776
  var windowStart = rfc3339String("read_release_records", "since", "read_release_records' since is an RFC 3339 time, as 2026-11-02T09:00:00Z is");
57777
57777
  var nextLook = rfc3339String("handoff_complete", "wake_at", "handoff_complete's wake_at is an RFC 3339 time, as 2026-11-02T09:00:00Z is");
57778
+ var unknownFieldsRefusal = (op, refused, takes) => [
57779
+ ...refused.map((field) => `${op} does not accept field "${field}"`),
57780
+ `it takes ${takes.length === 0 ? "none" : takes.join(", ")}`
57781
+ ].join("; ");
57778
57782
  var operation = (op, shape) => strictObject({ op: literal(op), ...shape }, {
57779
- error: (issue) => issue.code === "unrecognized_keys" ? issue.keys.map((key) => `${op} does not accept field "${key}"`).join("; ") : undefined
57783
+ error: (issue) => issue.code === "unrecognized_keys" ? unknownFieldsRefusal(op, issue.keys, Object.keys(shape)) : undefined
57780
57784
  });
57781
57785
  var PhaseOpArguments = discriminatedUnion("op", [
57782
- operation("read_record", { issue: string2().optional() }),
57786
+ operation("read_record", {
57787
+ issue: string2({ error: "read_record's issue is an issue key, as LEGION-208 is" }).optional()
57788
+ }),
57783
57789
  operation("read_release_records", {
57784
57790
  since: windowStart
57785
57791
  }),
57786
57792
  operation("handoff_complete", {
57787
57793
  summary: requiredString("handoff_complete", "summary"),
57788
- issue: string2().optional(),
57794
+ issue: string2({ error: "handoff_complete's issue is an issue key, as LEGION-208 is" }).optional(),
57789
57795
  verdict: _enum2(["pass", "pending", "fail"], {
57790
57796
  error: "handoff_complete's verdict is pass, pending or fail"
57791
57797
  }).optional(),
@@ -57793,7 +57799,7 @@ var PhaseOpArguments = discriminatedUnion("op", [
57793
57799
  wake_at: nextLook.optional()
57794
57800
  }),
57795
57801
  operation("request_backward_move", {
57796
- issue: string2().optional(),
57802
+ issue: string2({ error: "request_backward_move's issue is an issue key, as LEGION-208 is" }).optional(),
57797
57803
  to: _enum2(LEGION_PHASE_BACKWARD_TARGETS, {
57798
57804
  error: (issue) => typeof issue.input === "string" && issue.input.trim() !== "" ? `request_backward_move's to is one of ${LEGION_PHASE_BACKWARD_TARGETS.join(", ")}` : "request_backward_move requires to"
57799
57805
  }),
@@ -57867,7 +57873,8 @@ async function executePhaseOp(runtime, input) {
57867
57873
  const args = parsed.data;
57868
57874
  switch (args.op) {
57869
57875
  case "read_record": {
57870
- const issue = args.issue !== undefined && args.issue.trim() !== "" ? args.issue : claim.issue;
57876
+ const named = args.issue?.trim() ?? "";
57877
+ const issue = named !== "" ? named : claim.issue;
57871
57878
  return { record: recordFrom(await daemon.state(), issue) };
57872
57879
  }
57873
57880
  case "read_release_records":
@@ -57882,12 +57889,16 @@ async function executePhaseOp(runtime, input) {
57882
57889
  case "request_backward_move": {
57883
57890
  let issue;
57884
57891
  if (claim.role === "architect") {
57885
- if (args.issue === undefined || args.issue.trim() === "") {
57892
+ const named = args.issue?.trim() ?? "";
57893
+ if (named === "") {
57886
57894
  throw new Error("request_backward_move requires issue");
57887
57895
  }
57888
- issue = args.issue;
57889
- } else if (args.issue !== undefined && args.issue !== claim.issue) {
57890
- throw new Error(`a phase worker moves only its own issue ${claim.issue}, not ${args.issue}`);
57896
+ issue = named;
57897
+ } else {
57898
+ const named = args.issue?.trim() ?? "";
57899
+ if (named !== "" && named !== claim.issue) {
57900
+ throw new Error(`a phase worker moves only its own issue ${claim.issue}, not ${named}`);
57901
+ }
57891
57902
  }
57892
57903
  await daemon.phaseBackward({
57893
57904
  grantId: await mintClaimGrant(daemon, claim),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "1.41.0",
3
+ "version": "1.42.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",