@sjawhar/claude-envoy 1.28.2 → 1.30.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": "1.28.2"
5
+ "version": "1.30.0"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-envoy",
3
- "version": "1.28.2",
3
+ "version": "1.30.0",
4
4
  "description": "Put Envoy events into the Claude Code session's own conversation and expose Envoy MCP tools.",
5
5
  "mcpServers": {}
6
6
  }
package/dist/dispatch.js CHANGED
@@ -14632,6 +14632,17 @@ var IDEMPOTENCY_KEY_TTL_MS = 24 * 60 * 60 * 1000;
14632
14632
  var IDEMPOTENCY_LEASE_MS = 60 * 1000;
14633
14633
  var DELIVERY_DUPLICATE_WINDOW_MS = 72 * 60 * 60 * 1000;
14634
14634
  var SEARCH_DEGRADED_EMBEDDER_UNAVAILABLE = "embedder_unavailable";
14635
+ var SEARCH_MEMBERS_EVERY_BUILD_READS = [
14636
+ "q",
14637
+ "project",
14638
+ "limit",
14639
+ "offset",
14640
+ "session"
14641
+ ];
14642
+ function everyBuildReadsSearch(request) {
14643
+ const read = SEARCH_MEMBERS_EVERY_BUILD_READS;
14644
+ return Object.entries(request).every(([member, value]) => value === undefined || read.includes(member));
14645
+ }
14635
14646
  var IssueDeployedEventPayloadSchema = strictObject({
14636
14647
  repo: string2(),
14637
14648
  number: number2().int().positive(),
@@ -18073,7 +18084,9 @@ class DispatchClient {
18073
18084
  ]);
18074
18085
  }
18075
18086
  async search(query, options = {}) {
18076
- return this.#json("GET", ["api", "v1", "search"], undefined, { q: query, ...options });
18087
+ const request = { q: query, ...options };
18088
+ const path = everyBuildReadsSearch(request) ? ["api", "v1", "search"] : ["api", "v1", "search", "results"];
18089
+ return this.#json("GET", path, undefined, request);
18077
18090
  }
18078
18091
  async related(project, input) {
18079
18092
  return this.#json("POST", ["api", "v1", "projects", project, "related"], input);
@@ -18600,7 +18613,7 @@ class DispatchClient {
18600
18613
  const url = new URL(`${path.map((segment) => encodeURIComponent(segment)).join("/")}`, `${this.#baseUrl}/`);
18601
18614
  if (query) {
18602
18615
  for (const [name, value] of Object.entries(query)) {
18603
- if (typeof value === "string" || typeof value === "number") {
18616
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
18604
18617
  url.searchParams.set(name, String(value));
18605
18618
  } else if (Array.isArray(value)) {
18606
18619
  for (const item of value)
@@ -36281,6 +36281,17 @@ var IDEMPOTENCY_KEY_TTL_MS = 24 * 60 * 60 * 1000;
36281
36281
  var IDEMPOTENCY_LEASE_MS = 60 * 1000;
36282
36282
  var DELIVERY_DUPLICATE_WINDOW_MS = 72 * 60 * 60 * 1000;
36283
36283
  var SEARCH_DEGRADED_EMBEDDER_UNAVAILABLE = "embedder_unavailable";
36284
+ var SEARCH_MEMBERS_EVERY_BUILD_READS = [
36285
+ "q",
36286
+ "project",
36287
+ "limit",
36288
+ "offset",
36289
+ "session"
36290
+ ];
36291
+ function everyBuildReadsSearch(request) {
36292
+ const read = SEARCH_MEMBERS_EVERY_BUILD_READS;
36293
+ return Object.entries(request).every(([member, value]) => value === undefined || read.includes(member));
36294
+ }
36284
36295
  var IssueDeployedEventPayloadSchema = strictObject({
36285
36296
  repo: string2(),
36286
36297
  number: number2().int().positive(),
@@ -42558,7 +42569,9 @@ class DispatchClient {
42558
42569
  ]);
42559
42570
  }
42560
42571
  async search(query, options = {}) {
42561
- return this.#json("GET", ["api", "v1", "search"], undefined, { q: query, ...options });
42572
+ const request = { q: query, ...options };
42573
+ const path = everyBuildReadsSearch(request) ? ["api", "v1", "search"] : ["api", "v1", "search", "results"];
42574
+ return this.#json("GET", path, undefined, request);
42562
42575
  }
42563
42576
  async related(project, input) {
42564
42577
  return this.#json("POST", ["api", "v1", "projects", project, "related"], input);
@@ -43085,7 +43098,7 @@ class DispatchClient {
43085
43098
  const url = new URL(`${path.map((segment) => encodeURIComponent(segment)).join("/")}`, `${this.#baseUrl}/`);
43086
43099
  if (query) {
43087
43100
  for (const [name, value] of Object.entries(query)) {
43088
- if (typeof value === "string" || typeof value === "number") {
43101
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
43089
43102
  url.searchParams.set(name, String(value));
43090
43103
  } else if (Array.isArray(value)) {
43091
43104
  for (const item of value)
@@ -55391,7 +55404,7 @@ var import_nats2 = __toESM(require_mod4(), 1);
55391
55404
 
55392
55405
  // package.json
55393
55406
  var name = "@sjawhar/claude-envoy";
55394
- var version2 = "1.28.2";
55407
+ var version2 = "1.30.0";
55395
55408
  var legion = {
55396
55409
  daemonApiVersion: 59
55397
55410
  };
@@ -13631,6 +13631,17 @@ var IDEMPOTENCY_KEY_TTL_MS = 24 * 60 * 60 * 1000;
13631
13631
  var IDEMPOTENCY_LEASE_MS = 60 * 1000;
13632
13632
  var DELIVERY_DUPLICATE_WINDOW_MS = 72 * 60 * 60 * 1000;
13633
13633
  var SEARCH_DEGRADED_EMBEDDER_UNAVAILABLE = "embedder_unavailable";
13634
+ var SEARCH_MEMBERS_EVERY_BUILD_READS = [
13635
+ "q",
13636
+ "project",
13637
+ "limit",
13638
+ "offset",
13639
+ "session"
13640
+ ];
13641
+ function everyBuildReadsSearch(request) {
13642
+ const read = SEARCH_MEMBERS_EVERY_BUILD_READS;
13643
+ return Object.entries(request).every(([member, value]) => value === undefined || read.includes(member));
13644
+ }
13634
13645
  var IssueDeployedEventPayloadSchema = strictObject({
13635
13646
  repo: string2(),
13636
13647
  number: number2().int().positive(),
@@ -17077,7 +17088,9 @@ class DispatchClient {
17077
17088
  ]);
17078
17089
  }
17079
17090
  async search(query, options = {}) {
17080
- return this.#json("GET", ["api", "v1", "search"], undefined, { q: query, ...options });
17091
+ const request = { q: query, ...options };
17092
+ const path = everyBuildReadsSearch(request) ? ["api", "v1", "search"] : ["api", "v1", "search", "results"];
17093
+ return this.#json("GET", path, undefined, request);
17081
17094
  }
17082
17095
  async related(project, input) {
17083
17096
  return this.#json("POST", ["api", "v1", "projects", project, "related"], input);
@@ -17604,7 +17617,7 @@ class DispatchClient {
17604
17617
  const url = new URL(`${path.map((segment) => encodeURIComponent(segment)).join("/")}`, `${this.#baseUrl}/`);
17605
17618
  if (query) {
17606
17619
  for (const [name, value] of Object.entries(query)) {
17607
- if (typeof value === "string" || typeof value === "number") {
17620
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
17608
17621
  url.searchParams.set(name, String(value));
17609
17622
  } else if (Array.isArray(value)) {
17610
17623
  for (const item of value)
@@ -11,7 +11,7 @@ You work one phase of one issue in a jj workspace every role of the issue shares
11
11
 
12
12
  ## Every phase, in this order
13
13
 
14
- 1. **Read first.** Read the issue, then each handoff before your phase with `dispatch handoff-read --issue <issue> --phase <word>`, in order: `plan`, `implement`, `test`, `review` (a phase with no handoff answers `HANDOFF_NOT_FOUND`). Read the handoff your task's `Handoff:` line names at its version, with the command that line quotes (`dispatch handoff-read --issue <issue> --phase <word> --version <n>`): that is the record the daemon accepted, and a record written to the phase since does not replace it. Where one disagrees with your memory or a transcript, the record wins: it is the copy that survived. At each later assignment read them again, your own included, since other phases may have recorded since. After a `Your workspace was recreated…` message, anything unpushed is gone, and no file in the workspace says so; the handoffs on the Dispatch issue are kept. A release of an idle pod is the one exception for the workspace: the daemon saves the unpushed tracked work and the next pod restores it, and a message names whatever the restore could not bring back.
14
+ 1. **Read first.** Read the issue, then each handoff before your phase with `dispatch handoff-read --issue <issue> --phase <word>`, in order: `plan`, `implement`, `test`, `review` (a phase with no handoff answers `HANDOFF_NOT_FOUND`). Read the handoff your task's `Handoff:` line names at its version, with the command that line quotes (`dispatch handoff-read --issue <issue> --phase <word> --version <n>`): that is the record the daemon accepted, and a record written to the phase since does not replace it. Where a record disagrees with your memory or a transcript, the record wins: it is the copy that survived. At each later assignment read them again, your own included, since other phases may have recorded since. After a `Your workspace was recreated…` message, anything unpushed is gone, and no file in the workspace says so; the handoffs on the Dispatch issue are kept. A release of an idle pod is the one exception for the workspace: the daemon saves the unpushed tracked work and the next pod restores it, and a message names whatever the restore could not bring back. That version rule holds for the `implement`, `test` and `review` records, which are one round's own and must not move under a reader. The plan is the exception to it, and the rest of this item is for the roles that work from the plan: the implementer, the tester and the reviewer. The plan is the issue's `plan.md` document, and its planner goes on writing that document after the planning phase ends, so your task's `Handoff: plan version <n>` line is the receipt for the record the daemon accepted rather than the plan. The plan you build from is `plan.md` at the newest version the plan review approved: the version that the `Approval:` line of `dispatch read --issue <issue> --artifact plan-md` names (`approved v<n>`, and `approved v<n> … changed since` names that same version). `dispatch doc-read --issue <issue> --artifact plan-md --version <n>` prints the text of one version, and with no `--version` the newest. A newer version that the `Approval:` line does not name is a revision the plan review has not approved: build from the approved version and not from that one, and tell the planner what the newer version means for your work with `envoy_publish` to its role topic (your own topic with the trailing `-<role>` replaced by `-planner`), going on with the approved version while you wait. Read `plan.md` again before each task of the plan you begin and before you write your handoff, because a version approved while you work is the plan now. When the issue has no `plan.md`, or `dispatch read` prints no `Approval:` line for it, the plan is the `plan` record the daemon accepted: the `legion` tool's `read_record` gives its version as `workers.planner.handoffRecord.version`, and `dispatch handoff-read --issue <issue> --phase plan --version <n>` reads it. When that line reads `changes requested on v<n>`, it is the newest review alone and an older approval may still stand, which no command lists: ask the planner on that same topic which approved version stands, build from the accepted `plan` record until it answers, and build from the version it names once it has.
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "1.28.2",
3
+ "version": "1.30.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",