@sjawhar/claude-envoy 5.20.0 → 5.22.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": "5.20.0"
5
+ "version": "5.22.0"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-envoy",
3
- "version": "5.20.0",
3
+ "version": "5.22.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
  }
@@ -14321,7 +14321,7 @@ function handoffProblem(value) {
14321
14321
  if (typeof body !== "string")
14322
14322
  return;
14323
14323
  if (!isJsonObjectText(body)) {
14324
- return 'body is not one JSON object: a handoff body is a JSON object such as {"schemaVersion":1}';
14324
+ return 'body is not one JSON object: a handoff body is a JSON object such as {"head":"<the commit your phase ended at>","note":"<one paragraph for the next role>"}';
14325
14325
  }
14326
14326
  return;
14327
14327
  }
@@ -14978,7 +14978,7 @@ var dispatchToolSpecs = [
14978
14978
  {
14979
14979
  name: "dispatch_whoami",
14980
14980
  example: {},
14981
- description: "Who Dispatch takes this session for: {session, owner, service, project}. session is the session Dispatch records your writes as. It is the session your credential proved, and the tool says so when that is not the session you run in. owner is the lowercase email of the person you act for, and is the first choice of assignee for issues you create. owner is null under the shared token and under a broker token that names a service and no person. With a null owner, a create with no assignee falls back to the parent's assignee, when the parent is in the issue's own project, and then to the project's default assignee, which every project names, so every issue you create has an assignee. A question on an issue reaches the person it was handed to, else the issue's assignee, else the project's default assignee. service is the subject of the verified service-account token that authenticated you, or the fleet a broker token naming no person belongs to, or null. A broker token that names a service may read and is refused every write with SIGN_IN_REQUIRED, which names the command a person signs in on that machine with. project is the one project key your credential may write, or null when it names none.",
14981
+ description: "Who Dispatch takes this session for: {session, owner, service, project}. session is the session Dispatch records your writes as. It is the session your credential proved, and the tool says so when that is not the session you run in. owner is the lowercase email of the person you act for, and is the first choice of assignee for issues you create. owner is null under the shared token and under a broker token that names a service and no person. With a null owner, a create with no assignee falls back to the parent's assignee, when the parent is in the issue's own project, and then to the project's default assignee, which every project names, so every issue you create has an assignee. A question on an issue reaches the person it was handed to, else the issue's assignee, else the project's default assignee. service is the subject of the verified service-account token that authenticated you, or, for a broker token naming no person, the fleet its machine belongs to or the Kubernetes account an exchange entry lists, or null. A machine's broker token that names a service may read and is refused every write with SIGN_IN_REQUIRED, which names the command a person signs in on that machine with; an exchange entry's broker token that names its account writes, recorded under that account. project is the one project key your credential may write, or null when it names none.",
14982
14982
  arguments: () => ({}),
14983
14983
  strict: true
14984
14984
  },
@@ -14994,7 +14994,7 @@ var dispatchToolSpecs = [
14994
14994
  example: {
14995
14995
  issue: "DSP-1",
14996
14996
  phase: "implement",
14997
- body: '{"schemaVersion":1,"phase":"implement","issue":"DSP-1"}'
14997
+ body: '{"head":"0123456789abcdef0123456789abcdef01234567","note":"Run the checks with bun test src/x.test.ts in packages/x."}'
14998
14998
  },
14999
14999
  description: "Record this session's handoff for one phase of an issue: the body, one JSON object, is " + "stored on the issue exactly as sent, under this session, and read back byte for byte. Each " + "write is the next version (1, 2, ...) of that phase's handoff; earlier versions stay. Write " + "the body to a file outside your workspace and pass it with --body-file (- reads stdin). A " + "closed issue refuses it with 409 ISSUE_CLOSED, and a body over " + `${DISPATCH_HANDOFF_BODY_MAX} bytes with 413 CAP_EXCEEDED. Read it back with dispatch ` + `handoff-read. ${ISSUE_REFERENCE}`,
15000
15000
  arguments: (z) => ({
@@ -28939,7 +28939,8 @@ async function whoamiCommand(context) {
28939
28939
  const project = identity.kind === "agent" ? identity.project ?? null : null;
28940
28940
  const session = proved ?? sessionId;
28941
28941
  const unowned = "no owner, so an issue you create without an assignee takes its parent's assignee when the parent is in the same project, else the project's default assignee, which every project names, so the issue always has one.";
28942
- const signInNeeded = owner === null && service !== null && proved !== null;
28942
+ const answered = identity.kind === "agent" ? identity.sign_in_required : undefined;
28943
+ const signInNeeded = answered ?? (owner === null && service !== null && proved !== null);
28943
28944
  const acting = owner !== null ? `Session ${session} acts for ${owner}: issues you create without an assignee are assigned to ${owner}.` : service !== null ? signInNeeded ? `Session ${session} runs as service ${serviceSubjectLabel(service)} and no person, so it may read but Dispatch refuses every write it makes: run \`agent-secrets login\` on this machine to write as yourself.` : `Session ${session} runs as service ${serviceSubjectLabel(service)}: ${unowned}` : `Session ${session} runs under the shared token: ${unowned}`;
28944
28945
  const elsewhere = proved !== null && proved !== sessionId ? ` Your credential names session ${proved}, which is not this host session (${sessionId}): Dispatch records every write you make as ${proved}.` : "";
28945
28946
  const writable = project !== null ? ` It may write project ${project} and no other.` : "";
package/dist/dispatch.js CHANGED
@@ -14925,7 +14925,7 @@ function handoffProblem(value) {
14925
14925
  if (typeof body !== "string")
14926
14926
  return;
14927
14927
  if (!isJsonObjectText(body)) {
14928
- return 'body is not one JSON object: a handoff body is a JSON object such as {"schemaVersion":1}';
14928
+ return 'body is not one JSON object: a handoff body is a JSON object such as {"head":"<the commit your phase ended at>","note":"<one paragraph for the next role>"}';
14929
14929
  }
14930
14930
  return;
14931
14931
  }
@@ -15582,7 +15582,7 @@ var dispatchToolSpecs = [
15582
15582
  {
15583
15583
  name: "dispatch_whoami",
15584
15584
  example: {},
15585
- description: "Who Dispatch takes this session for: {session, owner, service, project}. session is the session Dispatch records your writes as. It is the session your credential proved, and the tool says so when that is not the session you run in. owner is the lowercase email of the person you act for, and is the first choice of assignee for issues you create. owner is null under the shared token and under a broker token that names a service and no person. With a null owner, a create with no assignee falls back to the parent's assignee, when the parent is in the issue's own project, and then to the project's default assignee, which every project names, so every issue you create has an assignee. A question on an issue reaches the person it was handed to, else the issue's assignee, else the project's default assignee. service is the subject of the verified service-account token that authenticated you, or the fleet a broker token naming no person belongs to, or null. A broker token that names a service may read and is refused every write with SIGN_IN_REQUIRED, which names the command a person signs in on that machine with. project is the one project key your credential may write, or null when it names none.",
15585
+ description: "Who Dispatch takes this session for: {session, owner, service, project}. session is the session Dispatch records your writes as. It is the session your credential proved, and the tool says so when that is not the session you run in. owner is the lowercase email of the person you act for, and is the first choice of assignee for issues you create. owner is null under the shared token and under a broker token that names a service and no person. With a null owner, a create with no assignee falls back to the parent's assignee, when the parent is in the issue's own project, and then to the project's default assignee, which every project names, so every issue you create has an assignee. A question on an issue reaches the person it was handed to, else the issue's assignee, else the project's default assignee. service is the subject of the verified service-account token that authenticated you, or, for a broker token naming no person, the fleet its machine belongs to or the Kubernetes account an exchange entry lists, or null. A machine's broker token that names a service may read and is refused every write with SIGN_IN_REQUIRED, which names the command a person signs in on that machine with; an exchange entry's broker token that names its account writes, recorded under that account. project is the one project key your credential may write, or null when it names none.",
15586
15586
  arguments: () => ({}),
15587
15587
  strict: true
15588
15588
  },
@@ -15598,7 +15598,7 @@ var dispatchToolSpecs = [
15598
15598
  example: {
15599
15599
  issue: "DSP-1",
15600
15600
  phase: "implement",
15601
- body: '{"schemaVersion":1,"phase":"implement","issue":"DSP-1"}'
15601
+ body: '{"head":"0123456789abcdef0123456789abcdef01234567","note":"Run the checks with bun test src/x.test.ts in packages/x."}'
15602
15602
  },
15603
15603
  description: "Record this session's handoff for one phase of an issue: the body, one JSON object, is " + "stored on the issue exactly as sent, under this session, and read back byte for byte. Each " + "write is the next version (1, 2, ...) of that phase's handoff; earlier versions stay. Write " + "the body to a file outside your workspace and pass it with --body-file (- reads stdin). A " + "closed issue refuses it with 409 ISSUE_CLOSED, and a body over " + `${DISPATCH_HANDOFF_BODY_MAX} bytes with 413 CAP_EXCEEDED. Read it back with dispatch ` + `handoff-read. ${ISSUE_REFERENCE}`,
15604
15604
  arguments: (z) => ({
@@ -33884,7 +33884,8 @@ async function whoamiCommand(context) {
33884
33884
  const project = identity.kind === "agent" ? identity.project ?? null : null;
33885
33885
  const session = proved ?? sessionId;
33886
33886
  const unowned = "no owner, so an issue you create without an assignee takes its parent's assignee when the parent is in the same project, else the project's default assignee, which every project names, so the issue always has one.";
33887
- const signInNeeded = owner === null && service !== null && proved !== null;
33887
+ const answered = identity.kind === "agent" ? identity.sign_in_required : undefined;
33888
+ const signInNeeded = answered ?? (owner === null && service !== null && proved !== null);
33888
33889
  const acting = owner !== null ? `Session ${session} acts for ${owner}: issues you create without an assignee are assigned to ${owner}.` : service !== null ? signInNeeded ? `Session ${session} runs as service ${serviceSubjectLabel(service)} and no person, so it may read but Dispatch refuses every write it makes: run \`agent-secrets login\` on this machine to write as yourself.` : `Session ${session} runs as service ${serviceSubjectLabel(service)}: ${unowned}` : `Session ${session} runs under the shared token: ${unowned}`;
33889
33890
  const elsewhere = proved !== null && proved !== sessionId ? ` Your credential names session ${proved}, which is not this host session (${sessionId}): Dispatch records every write you make as ${proved}.` : "";
33890
33891
  const writable = project !== null ? ` It may write project ${project} and no other.` : "";
@@ -37121,7 +37121,7 @@ function handoffProblem(value) {
37121
37121
  if (typeof body !== "string")
37122
37122
  return;
37123
37123
  if (!isJsonObjectText(body)) {
37124
- return 'body is not one JSON object: a handoff body is a JSON object such as {"schemaVersion":1}';
37124
+ return 'body is not one JSON object: a handoff body is a JSON object such as {"head":"<the commit your phase ended at>","note":"<one paragraph for the next role>"}';
37125
37125
  }
37126
37126
  return;
37127
37127
  }
@@ -37778,7 +37778,7 @@ var dispatchToolSpecs = [
37778
37778
  {
37779
37779
  name: "dispatch_whoami",
37780
37780
  example: {},
37781
- description: "Who Dispatch takes this session for: {session, owner, service, project}. session is the session Dispatch records your writes as. It is the session your credential proved, and the tool says so when that is not the session you run in. owner is the lowercase email of the person you act for, and is the first choice of assignee for issues you create. owner is null under the shared token and under a broker token that names a service and no person. With a null owner, a create with no assignee falls back to the parent's assignee, when the parent is in the issue's own project, and then to the project's default assignee, which every project names, so every issue you create has an assignee. A question on an issue reaches the person it was handed to, else the issue's assignee, else the project's default assignee. service is the subject of the verified service-account token that authenticated you, or the fleet a broker token naming no person belongs to, or null. A broker token that names a service may read and is refused every write with SIGN_IN_REQUIRED, which names the command a person signs in on that machine with. project is the one project key your credential may write, or null when it names none.",
37781
+ description: "Who Dispatch takes this session for: {session, owner, service, project}. session is the session Dispatch records your writes as. It is the session your credential proved, and the tool says so when that is not the session you run in. owner is the lowercase email of the person you act for, and is the first choice of assignee for issues you create. owner is null under the shared token and under a broker token that names a service and no person. With a null owner, a create with no assignee falls back to the parent's assignee, when the parent is in the issue's own project, and then to the project's default assignee, which every project names, so every issue you create has an assignee. A question on an issue reaches the person it was handed to, else the issue's assignee, else the project's default assignee. service is the subject of the verified service-account token that authenticated you, or, for a broker token naming no person, the fleet its machine belongs to or the Kubernetes account an exchange entry lists, or null. A machine's broker token that names a service may read and is refused every write with SIGN_IN_REQUIRED, which names the command a person signs in on that machine with; an exchange entry's broker token that names its account writes, recorded under that account. project is the one project key your credential may write, or null when it names none.",
37782
37782
  arguments: () => ({}),
37783
37783
  strict: true
37784
37784
  },
@@ -37794,7 +37794,7 @@ var dispatchToolSpecs = [
37794
37794
  example: {
37795
37795
  issue: "DSP-1",
37796
37796
  phase: "implement",
37797
- body: '{"schemaVersion":1,"phase":"implement","issue":"DSP-1"}'
37797
+ body: '{"head":"0123456789abcdef0123456789abcdef01234567","note":"Run the checks with bun test src/x.test.ts in packages/x."}'
37798
37798
  },
37799
37799
  description: "Record this session's handoff for one phase of an issue: the body, one JSON object, is " + "stored on the issue exactly as sent, under this session, and read back byte for byte. Each " + "write is the next version (1, 2, ...) of that phase's handoff; earlier versions stay. Write " + "the body to a file outside your workspace and pass it with --body-file (- reads stdin). A " + "closed issue refuses it with 409 ISSUE_CLOSED, and a body over " + `${DISPATCH_HANDOFF_BODY_MAX} bytes with 413 CAP_EXCEEDED. Read it back with dispatch ` + `handoff-read. ${ISSUE_REFERENCE}`,
37800
37800
  arguments: (z) => ({
@@ -56167,7 +56167,8 @@ async function whoamiCommand(context) {
56167
56167
  const project = identity.kind === "agent" ? identity.project ?? null : null;
56168
56168
  const session = proved ?? sessionId;
56169
56169
  const unowned = "no owner, so an issue you create without an assignee takes its parent's assignee when the parent is in the same project, else the project's default assignee, which every project names, so the issue always has one.";
56170
- const signInNeeded = owner === null && service !== null && proved !== null;
56170
+ const answered = identity.kind === "agent" ? identity.sign_in_required : undefined;
56171
+ const signInNeeded = answered ?? (owner === null && service !== null && proved !== null);
56171
56172
  const acting = owner !== null ? `Session ${session} acts for ${owner}: issues you create without an assignee are assigned to ${owner}.` : service !== null ? signInNeeded ? `Session ${session} runs as service ${serviceSubjectLabel(service)} and no person, so it may read but Dispatch refuses every write it makes: run \`agent-secrets login\` on this machine to write as yourself.` : `Session ${session} runs as service ${serviceSubjectLabel(service)}: ${unowned}` : `Session ${session} runs under the shared token: ${unowned}`;
56172
56173
  const elsewhere = proved !== null && proved !== sessionId ? ` Your credential names session ${proved}, which is not this host session (${sessionId}): Dispatch records every write you make as ${proved}.` : "";
56173
56174
  const writable = project !== null ? ` It may write project ${project} and no other.` : "";
@@ -62783,7 +62784,7 @@ var import_nats5 = __toESM(require_mod4(), 1);
62783
62784
 
62784
62785
  // package.json
62785
62786
  var name2 = "@sjawhar/claude-envoy";
62786
- var version2 = "5.20.0";
62787
+ var version2 = "5.22.0";
62787
62788
  var legion = {
62788
62789
  daemonApiVersion: 232
62789
62790
  };
@@ -17771,7 +17771,7 @@ function handoffProblem(value) {
17771
17771
  if (typeof body !== "string")
17772
17772
  return;
17773
17773
  if (!isJsonObjectText(body)) {
17774
- return 'body is not one JSON object: a handoff body is a JSON object such as {"schemaVersion":1}';
17774
+ return 'body is not one JSON object: a handoff body is a JSON object such as {"head":"<the commit your phase ended at>","note":"<one paragraph for the next role>"}';
17775
17775
  }
17776
17776
  return;
17777
17777
  }
@@ -18428,7 +18428,7 @@ var dispatchToolSpecs = [
18428
18428
  {
18429
18429
  name: "dispatch_whoami",
18430
18430
  example: {},
18431
- description: "Who Dispatch takes this session for: {session, owner, service, project}. session is the session Dispatch records your writes as. It is the session your credential proved, and the tool says so when that is not the session you run in. owner is the lowercase email of the person you act for, and is the first choice of assignee for issues you create. owner is null under the shared token and under a broker token that names a service and no person. With a null owner, a create with no assignee falls back to the parent's assignee, when the parent is in the issue's own project, and then to the project's default assignee, which every project names, so every issue you create has an assignee. A question on an issue reaches the person it was handed to, else the issue's assignee, else the project's default assignee. service is the subject of the verified service-account token that authenticated you, or the fleet a broker token naming no person belongs to, or null. A broker token that names a service may read and is refused every write with SIGN_IN_REQUIRED, which names the command a person signs in on that machine with. project is the one project key your credential may write, or null when it names none.",
18431
+ description: "Who Dispatch takes this session for: {session, owner, service, project}. session is the session Dispatch records your writes as. It is the session your credential proved, and the tool says so when that is not the session you run in. owner is the lowercase email of the person you act for, and is the first choice of assignee for issues you create. owner is null under the shared token and under a broker token that names a service and no person. With a null owner, a create with no assignee falls back to the parent's assignee, when the parent is in the issue's own project, and then to the project's default assignee, which every project names, so every issue you create has an assignee. A question on an issue reaches the person it was handed to, else the issue's assignee, else the project's default assignee. service is the subject of the verified service-account token that authenticated you, or, for a broker token naming no person, the fleet its machine belongs to or the Kubernetes account an exchange entry lists, or null. A machine's broker token that names a service may read and is refused every write with SIGN_IN_REQUIRED, which names the command a person signs in on that machine with; an exchange entry's broker token that names its account writes, recorded under that account. project is the one project key your credential may write, or null when it names none.",
18432
18432
  arguments: () => ({}),
18433
18433
  strict: true
18434
18434
  },
@@ -18444,7 +18444,7 @@ var dispatchToolSpecs = [
18444
18444
  example: {
18445
18445
  issue: "DSP-1",
18446
18446
  phase: "implement",
18447
- body: '{"schemaVersion":1,"phase":"implement","issue":"DSP-1"}'
18447
+ body: '{"head":"0123456789abcdef0123456789abcdef01234567","note":"Run the checks with bun test src/x.test.ts in packages/x."}'
18448
18448
  },
18449
18449
  description: "Record this session's handoff for one phase of an issue: the body, one JSON object, is " + "stored on the issue exactly as sent, under this session, and read back byte for byte. Each " + "write is the next version (1, 2, ...) of that phase's handoff; earlier versions stay. Write " + "the body to a file outside your workspace and pass it with --body-file (- reads stdin). A " + "closed issue refuses it with 409 ISSUE_CLOSED, and a body over " + `${DISPATCH_HANDOFF_BODY_MAX} bytes with 413 CAP_EXCEEDED. Read it back with dispatch ` + `handoff-read. ${ISSUE_REFERENCE}`,
18450
18450
  arguments: (z) => ({
@@ -31739,7 +31739,8 @@ async function whoamiCommand(context) {
31739
31739
  const project = identity.kind === "agent" ? identity.project ?? null : null;
31740
31740
  const session = proved ?? sessionId;
31741
31741
  const unowned = "no owner, so an issue you create without an assignee takes its parent's assignee when the parent is in the same project, else the project's default assignee, which every project names, so the issue always has one.";
31742
- const signInNeeded = owner === null && service !== null && proved !== null;
31742
+ const answered = identity.kind === "agent" ? identity.sign_in_required : undefined;
31743
+ const signInNeeded = answered ?? (owner === null && service !== null && proved !== null);
31743
31744
  const acting = owner !== null ? `Session ${session} acts for ${owner}: issues you create without an assignee are assigned to ${owner}.` : service !== null ? signInNeeded ? `Session ${session} runs as service ${serviceSubjectLabel(service)} and no person, so it may read but Dispatch refuses every write it makes: run \`agent-secrets login\` on this machine to write as yourself.` : `Session ${session} runs as service ${serviceSubjectLabel(service)}: ${unowned}` : `Session ${session} runs under the shared token: ${unowned}`;
31744
31745
  const elsewhere = proved !== null && proved !== sessionId ? ` Your credential names session ${proved}, which is not this host session (${sessionId}): Dispatch records every write you make as ${proved}.` : "";
31745
31746
  const writable = project !== null ? ` It may write project ${project} and no other.` : "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "5.20.0",
3
+ "version": "5.22.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",