@sjawhar/claude-envoy 5.6.1 → 5.8.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.6.1"
5
+ "version": "5.8.0"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-envoy",
3
- "version": "5.6.1",
3
+ "version": "5.8.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/README.md CHANGED
@@ -264,8 +264,23 @@ codex plugin marketplace add cybermonklabs/legion
264
264
  codex plugin add codex-envoy@legion-plugins
265
265
  ```
266
266
 
267
+ The package's `bin/dispatch` is the `dispatch` command for a terminal of your own, and its npm
268
+ `bin`. Run there what the plugin's `dispatch` tool cannot hold: the tool ends a command after
269
+ 120 s, and the device login of a machine with no identity of its own,
270
+ `dispatch login --device --person <address>`, waits until that person approves its code. Run it
271
+ from the installed plugin, or from npm:
272
+
273
+ ```bash
274
+ "${CODEX_HOME:-$HOME/.codex}"/plugins/cache/legion-plugins/codex-envoy/<version>/bin/dispatch login --device --person <address>
275
+ npx --package @sjawhar/codex-envoy dispatch login --device --person <address>
276
+ ```
277
+
278
+ It runs `dist/dispatch.js` with `bun`, as the plugin's server does, and follows the link npm
279
+ makes for a package `bin` to find it.
280
+
267
281
  `bun scripts/build.ts --codex-out <dir>` builds it from this tree into a directory outside the
268
- repository: `codex/`'s manifests, hooks and README, this package's skills and a fresh `dist/`.
282
+ repository: `codex/`'s manifests, hooks, README and `bin/dispatch`, this package's skills and a
283
+ fresh `dist/`.
269
284
  A skill that sets `disable-model-invocation: true`, which Codex's validator refuses, is shipped
270
285
  with Codex's own form of it, an `agents/openai.yaml` whose `policy.allow_implicit_invocation`
271
286
  is `false`: the skill stays out of the model's context until a person names it as `$<skill>`.
package/bin/dispatch CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/bin/sh
2
2
  # The dispatch CLI, bundled into this plugin's dist/ by its build.
3
- here=$(cd "$(dirname "$0")" && pwd)
3
+ here=$(CDPATH='' cd "$(dirname "$0")" && pwd)
4
4
  cli="$here/../dist/dispatch.js"
5
5
  [ -f "$cli" ] || { echo "dispatch: $cli is missing; the published @sjawhar/claude-envoy carries it, or build a copy with bun scripts/build.ts --out <dir>" >&2; exit 2; }
6
6
  exec bun "$cli" "$@"
@@ -13786,6 +13786,7 @@ var ProjectSchema = strictObject({
13786
13786
  name: string2(),
13787
13787
  open_asks: number2().int().optional(),
13788
13788
  gated_steps: array(_enum2(GATED_STEPS)).optional(),
13789
+ default_repo: string2().optional(),
13789
13790
  created_at: string2()
13790
13791
  }).readonly();
13791
13792
  var RepoProjectSchema = strictObject({
@@ -14372,7 +14373,7 @@ var dispatchToolSpecs = [
14372
14373
  example: { project: "DSP", title: "Native workspace" },
14373
14374
  description: "Create a native Dispatch issue for newly tracked work. Search first with dispatch search; if potentially duplicate issues exist, this returns 409 POSSIBLE_DUPLICATE unless --force is set after reading them, or, when the refusal cannot be recorded, creates the issue and names the near copy to read in the result. " + "Where the spec is large, or changed in a way you cannot check alone, a fresh read-only reader can find its gaps and check its factual claims; a Legion architect can use `plan-gap-analyst` and `plan-reviewer`. " + "A spec holding an ask block whose body breaks its content rule (one or more question paragraphs, then at most one bullet list of options, last) is refused with 400 INVALID_ASK_BLOCK. " + `${CI_CHECK_RULE} ` + "Create a project only when a person asks for one; work that spans projects goes in the project that owns most of it. " + `${RELATED_CHECK_RESULT} With --force, the result also names each issue whose title you forced past. ` + `Do not use it when an existing issue already covers the work; read or update that issue instead. ${ISSUE_REFERENCE}`,
14374
14375
  arguments: (z) => ({
14375
- project: z.string().describe("Project key for the new issue."),
14376
+ project: z.string({ min: 1 }).describe("Project key for the new issue. Every create needs one, also a create that names external."),
14376
14377
  title: z.string({ max: ISSUE_TITLE_MAX }).describe("Concise issue title, at most 1,000 characters."),
14377
14378
  parent: z.string().describe("Optional parent issue.").optional(),
14378
14379
  blocked_by: z.array(z.string({ min: 1 }), { max: MAX_ISSUE_BLOCKERS }).describe("Issue keys this issue waits on; a key of any project, so work tracked elsewhere can be named. Dispatch refuses a dependency cycle.").optional(),
@@ -18731,7 +18732,7 @@ var INSTANCE_PATTERN = "[A-Za-z0-9*?._\\[\\]-]{1,100}";
18731
18732
  var NUMBER = "[0-9]{1,6}";
18732
18733
  var CLAIM = "[A-Za-z0-9_.:-]{1,64}";
18733
18734
  var URI = "[A-Za-z0-9:/._-]{1,200}";
18734
- var SESSION_RULE = "a session name is printable, carries no whitespace, and is at most [0-9]{1,4} bytes";
18735
+ var SESSION_RULE = "a session name is printable, carries no whitespace, '\\*' or '>', and is at most [0-9]{1,4} bytes";
18735
18736
  function escapeRegExp(text) {
18736
18737
  return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
18737
18738
  }
package/dist/dispatch.js CHANGED
@@ -14386,6 +14386,7 @@ var ProjectSchema = strictObject({
14386
14386
  name: string2(),
14387
14387
  open_asks: number2().int().optional(),
14388
14388
  gated_steps: array(_enum2(GATED_STEPS)).optional(),
14389
+ default_repo: string2().optional(),
14389
14390
  created_at: string2()
14390
14391
  }).readonly();
14391
14392
  var RepoProjectSchema = strictObject({
@@ -14972,7 +14973,7 @@ var dispatchToolSpecs = [
14972
14973
  example: { project: "DSP", title: "Native workspace" },
14973
14974
  description: "Create a native Dispatch issue for newly tracked work. Search first with dispatch search; if potentially duplicate issues exist, this returns 409 POSSIBLE_DUPLICATE unless --force is set after reading them, or, when the refusal cannot be recorded, creates the issue and names the near copy to read in the result. " + "Where the spec is large, or changed in a way you cannot check alone, a fresh read-only reader can find its gaps and check its factual claims; a Legion architect can use `plan-gap-analyst` and `plan-reviewer`. " + "A spec holding an ask block whose body breaks its content rule (one or more question paragraphs, then at most one bullet list of options, last) is refused with 400 INVALID_ASK_BLOCK. " + `${CI_CHECK_RULE} ` + "Create a project only when a person asks for one; work that spans projects goes in the project that owns most of it. " + `${RELATED_CHECK_RESULT} With --force, the result also names each issue whose title you forced past. ` + `Do not use it when an existing issue already covers the work; read or update that issue instead. ${ISSUE_REFERENCE}`,
14974
14975
  arguments: (z) => ({
14975
- project: z.string().describe("Project key for the new issue."),
14976
+ project: z.string({ min: 1 }).describe("Project key for the new issue. Every create needs one, also a create that names external."),
14976
14977
  title: z.string({ max: ISSUE_TITLE_MAX }).describe("Concise issue title, at most 1,000 characters."),
14977
14978
  parent: z.string().describe("Optional parent issue.").optional(),
14978
14979
  blocked_by: z.array(z.string({ min: 1 }), { max: MAX_ISSUE_BLOCKERS }).describe("Issue keys this issue waits on; a key of any project, so work tracked elsewhere can be named. Dispatch refuses a dependency cycle.").optional(),
@@ -19058,7 +19059,7 @@ var INSTANCE_PATTERN = "[A-Za-z0-9*?._\\[\\]-]{1,100}";
19058
19059
  var NUMBER = "[0-9]{1,6}";
19059
19060
  var CLAIM = "[A-Za-z0-9_.:-]{1,64}";
19060
19061
  var URI = "[A-Za-z0-9:/._-]{1,200}";
19061
- var SESSION_RULE = "a session name is printable, carries no whitespace, and is at most [0-9]{1,4} bytes";
19062
+ var SESSION_RULE = "a session name is printable, carries no whitespace, '\\*' or '>', and is at most [0-9]{1,4} bytes";
19062
19063
  function escapeRegExp(text) {
19063
19064
  return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
19064
19065
  }
@@ -36586,6 +36586,7 @@ var ProjectSchema = strictObject({
36586
36586
  name: string2(),
36587
36587
  open_asks: number2().int().optional(),
36588
36588
  gated_steps: array(_enum2(GATED_STEPS)).optional(),
36589
+ default_repo: string2().optional(),
36589
36590
  created_at: string2()
36590
36591
  }).readonly();
36591
36592
  var RepoProjectSchema = strictObject({
@@ -37172,7 +37173,7 @@ var dispatchToolSpecs = [
37172
37173
  example: { project: "DSP", title: "Native workspace" },
37173
37174
  description: "Create a native Dispatch issue for newly tracked work. Search first with dispatch search; if potentially duplicate issues exist, this returns 409 POSSIBLE_DUPLICATE unless --force is set after reading them, or, when the refusal cannot be recorded, creates the issue and names the near copy to read in the result. " + "Where the spec is large, or changed in a way you cannot check alone, a fresh read-only reader can find its gaps and check its factual claims; a Legion architect can use `plan-gap-analyst` and `plan-reviewer`. " + "A spec holding an ask block whose body breaks its content rule (one or more question paragraphs, then at most one bullet list of options, last) is refused with 400 INVALID_ASK_BLOCK. " + `${CI_CHECK_RULE} ` + "Create a project only when a person asks for one; work that spans projects goes in the project that owns most of it. " + `${RELATED_CHECK_RESULT} With --force, the result also names each issue whose title you forced past. ` + `Do not use it when an existing issue already covers the work; read or update that issue instead. ${ISSUE_REFERENCE}`,
37174
37175
  arguments: (z) => ({
37175
- project: z.string().describe("Project key for the new issue."),
37176
+ project: z.string({ min: 1 }).describe("Project key for the new issue. Every create needs one, also a create that names external."),
37176
37177
  title: z.string({ max: ISSUE_TITLE_MAX }).describe("Concise issue title, at most 1,000 characters."),
37177
37178
  parent: z.string().describe("Optional parent issue.").optional(),
37178
37179
  blocked_by: z.array(z.string({ min: 1 }), { max: MAX_ISSUE_BLOCKERS }).describe("Issue keys this issue waits on; a key of any project, so work tracked elsewhere can be named. Dispatch refuses a dependency cycle.").optional(),
@@ -42606,7 +42607,7 @@ var INSTANCE_PATTERN = "[A-Za-z0-9*?._\\[\\]-]{1,100}";
42606
42607
  var NUMBER = "[0-9]{1,6}";
42607
42608
  var CLAIM = "[A-Za-z0-9_.:-]{1,64}";
42608
42609
  var URI = "[A-Za-z0-9:/._-]{1,200}";
42609
- var SESSION_RULE = "a session name is printable, carries no whitespace, and is at most [0-9]{1,4} bytes";
42610
+ var SESSION_RULE = "a session name is printable, carries no whitespace, '\\*' or '>', and is at most [0-9]{1,4} bytes";
42610
42611
  function escapeRegExp(text) {
42611
42612
  return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
42612
42613
  }
@@ -60889,7 +60890,7 @@ var import_nats5 = __toESM(require_mod4(), 1);
60889
60890
 
60890
60891
  // package.json
60891
60892
  var name2 = "@sjawhar/claude-envoy";
60892
- var version2 = "5.6.1";
60893
+ var version2 = "5.8.0";
60893
60894
  var legion = {
60894
60895
  daemonApiVersion: 213
60895
60896
  };
@@ -13990,6 +13990,7 @@ var ProjectSchema = strictObject({
13990
13990
  name: string2(),
13991
13991
  open_asks: number2().int().optional(),
13992
13992
  gated_steps: array(_enum2(GATED_STEPS)).optional(),
13993
+ default_repo: string2().optional(),
13993
13994
  created_at: string2()
13994
13995
  }).readonly();
13995
13996
  var RepoProjectSchema = strictObject({
@@ -14576,7 +14577,7 @@ var dispatchToolSpecs = [
14576
14577
  example: { project: "DSP", title: "Native workspace" },
14577
14578
  description: "Create a native Dispatch issue for newly tracked work. Search first with dispatch search; if potentially duplicate issues exist, this returns 409 POSSIBLE_DUPLICATE unless --force is set after reading them, or, when the refusal cannot be recorded, creates the issue and names the near copy to read in the result. " + "Where the spec is large, or changed in a way you cannot check alone, a fresh read-only reader can find its gaps and check its factual claims; a Legion architect can use `plan-gap-analyst` and `plan-reviewer`. " + "A spec holding an ask block whose body breaks its content rule (one or more question paragraphs, then at most one bullet list of options, last) is refused with 400 INVALID_ASK_BLOCK. " + `${CI_CHECK_RULE} ` + "Create a project only when a person asks for one; work that spans projects goes in the project that owns most of it. " + `${RELATED_CHECK_RESULT} With --force, the result also names each issue whose title you forced past. ` + `Do not use it when an existing issue already covers the work; read or update that issue instead. ${ISSUE_REFERENCE}`,
14578
14579
  arguments: (z) => ({
14579
- project: z.string().describe("Project key for the new issue."),
14580
+ project: z.string({ min: 1 }).describe("Project key for the new issue. Every create needs one, also a create that names external."),
14580
14581
  title: z.string({ max: ISSUE_TITLE_MAX }).describe("Concise issue title, at most 1,000 characters."),
14581
14582
  parent: z.string().describe("Optional parent issue.").optional(),
14582
14583
  blocked_by: z.array(z.string({ min: 1 }), { max: MAX_ISSUE_BLOCKERS }).describe("Issue keys this issue waits on; a key of any project, so work tracked elsewhere can be named. Dispatch refuses a dependency cycle.").optional(),
@@ -18732,7 +18733,7 @@ var INSTANCE_PATTERN = "[A-Za-z0-9*?._\\[\\]-]{1,100}";
18732
18733
  var NUMBER = "[0-9]{1,6}";
18733
18734
  var CLAIM = "[A-Za-z0-9_.:-]{1,64}";
18734
18735
  var URI = "[A-Za-z0-9:/._-]{1,200}";
18735
- var SESSION_RULE = "a session name is printable, carries no whitespace, and is at most [0-9]{1,4} bytes";
18736
+ var SESSION_RULE = "a session name is printable, carries no whitespace, '\\*' or '>', and is at most [0-9]{1,4} bytes";
18736
18737
  function escapeRegExp(text) {
18737
18738
  return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
18738
18739
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "5.6.1",
3
+ "version": "5.8.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",
package/scripts/build.ts CHANGED
@@ -404,13 +404,16 @@ async function buildOut(out: string): Promise<void> {
404
404
  }
405
405
 
406
406
  /** What the Codex plugin, `@sjawhar/codex-envoy`, takes from `codex/`: its npm
407
- * manifest, its plugin manifest, its hooks and its README. It is a package of its own because
408
- * Codex's plugin rules and Claude Code's cannot both hold in one directory: Codex's validator
409
- * (`validate_plugin.py` of the `plugin-creator` skill Codex installs) refuses a manifest that
410
- * names its hooks file, so its hooks must sit at `hooks/hooks.json`, which is also where Claude
411
- * Code reads its own, and an npm install of a plugin reads the package's root, never a
412
- * subdirectory. Measured on Codex CLI 0.154.0 and Claude Code 2.1.325. */
413
- const CODEX_SOURCES = [".codex-plugin", "hooks", "package.json", "README.md"] as const
407
+ * manifest, its plugin manifest, its hooks, its README, and `bin/dispatch`, the `dispatch`
408
+ * command a terminal runs (the manifest's npm `bin`), since the plugin's `dispatch` tool ends a
409
+ * command after 120 s and `dispatch login --device` waits longer for a person's approval. It is
410
+ * a package of its own because Codex's plugin rules and Claude Code's cannot both hold in one
411
+ * directory: Codex's validator (`validate_plugin.py` of the `plugin-creator` skill Codex
412
+ * installs) refuses a manifest that names its hooks file, so its hooks must sit at
413
+ * `hooks/hooks.json`, which is also where Claude Code reads its own, and an npm install of a
414
+ * plugin reads the package's root, never a subdirectory. Measured on Codex CLI 0.154.0 and
415
+ * Claude Code 2.1.325. */
416
+ const CODEX_SOURCES = [".codex-plugin", "bin", "hooks", "package.json", "README.md"] as const
414
417
 
415
418
  /** Each skill Claude Code may not load on its own (`disable-model-invocation: true`) and what
416
419
  * Codex shows for it. Codex's validator refuses that field; Codex's own form of it is the skill's
@@ -69,7 +69,7 @@ trap cleanup EXIT INT TERM
69
69
  # scratch directory (`scripts/build.ts --out`), since a pull request's tree carries no fresh
70
70
  # `dist/` or `legion/`.
71
71
  if [[ -n "${CLAUDE_PLUGIN_DIR:-}" ]]; then
72
- plugin_dir="$(cd "$CLAUDE_PLUGIN_DIR" && pwd)"
72
+ plugin_dir="$(CDPATH='' cd "$CLAUDE_PLUGIN_DIR" && pwd)"
73
73
  else
74
74
  plugin_dir="${workdir}/claude-envoy"
75
75
  bun "$(dirname "${BASH_SOURCE[0]}")/build.ts" --out "$plugin_dir" >/dev/null ||
@@ -35,7 +35,7 @@ readonly chosen_name="eeny meeny"
35
35
  readonly renamed="miny moe"
36
36
  readonly register_timeout=30
37
37
 
38
- package_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
38
+ package_dir="$(CDPATH='' cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
39
39
  readonly package_dir
40
40
  repo_root="$(cd "${package_dir}/../.." && pwd)"
41
41
  readonly repo_root
@@ -47,12 +47,12 @@ set -euo pipefail
47
47
  }
48
48
  tar_file=$1
49
49
 
50
- package_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)
50
+ package_dir=$(CDPATH='' cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)
51
51
  repo_root=$(cd "$package_dir/../.." && pwd -P)
52
52
 
53
53
  # <tar>, made absolute from the caller's directory, must sit outside the repository, where jj
54
54
  # would record it.
55
- tar_dir=$(cd "$(dirname -- "$tar_file")" 2>/dev/null && pwd -P) || {
55
+ tar_dir=$(CDPATH='' cd "$(dirname -- "$tar_file")" 2>/dev/null && pwd -P) || {
56
56
  echo "::error::verify-build.sh: the directory of $tar_file does not exist" >&2
57
57
  exit 2
58
58
  }