@sjawhar/claude-envoy 5.6.0 → 5.7.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.
- package/.claude-plugin/plugin.json +1 -1
- package/.omp-plugin/plugin.json +1 -1
- package/README.md +16 -1
- package/bin/dispatch +1 -1
- package/dist/codex-hook.js +2 -1
- package/dist/dispatch.js +2 -1
- package/dist/envoy-channel.js +3 -2
- package/dist/session-hook.js +2 -1
- package/package.json +1 -1
- package/scripts/build.ts +10 -7
- package/scripts/smoke-clear-rebind.sh +1 -1
- package/scripts/smoke-session-title.sh +1 -1
- package/scripts/verify-build.sh +2 -2
package/.omp-plugin/plugin.json
CHANGED
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
|
|
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" "$@"
|
package/dist/codex-hook.js
CHANGED
|
@@ -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(),
|
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(),
|
package/dist/envoy-channel.js
CHANGED
|
@@ -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(),
|
|
@@ -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.
|
|
60893
|
+
var version2 = "5.7.0";
|
|
60893
60894
|
var legion = {
|
|
60894
60895
|
daemonApiVersion: 213
|
|
60895
60896
|
};
|
package/dist/session-hook.js
CHANGED
|
@@ -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(),
|
package/package.json
CHANGED
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
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
*
|
|
412
|
-
*
|
|
413
|
-
|
|
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
|
package/scripts/verify-build.sh
CHANGED
|
@@ -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
|
}
|