@jbkjr/relay 1.3.0 → 1.3.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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "relay",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Reach coding agents of other families (Codex from Claude Code, Claude from Codex) through the relay MCP server: delegate, consult, discuss, review."
5
5
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "relay",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Reach coding agents of other families (Codex from Claude Code, Claude from Codex) through the relay MCP server: delegate, consult, discuss, review.",
5
5
  "skills": "./skills/"
6
6
  }
package/codex-pin.json CHANGED
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "relay": {
8
8
  "scheme": "relay-build-v2",
9
- "version": "1.3.0",
10
- "sha256": "056b063aa2455292ffb3e69517caac404a47c38702a18c0a0ae0801d6fb8f7a5"
9
+ "version": "1.3.1",
10
+ "sha256": "0d919bdf0e3f3a012936ba1c008cc814cc7be61b1a58b0c8cf607b04fe359b44"
11
11
  }
12
12
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "commit": "0a0af2da17643a6d59e4794954977a7afcb4d09f",
2
+ "commit": "b7b5c85ebc23777c8c5cdf77e59ba0b3af443808",
3
3
  "dirty": false,
4
- "built_at": "2026-11-21T01:10:04.663Z"
4
+ "built_at": "2026-11-22T09:22:06.999Z"
5
5
  }
@@ -6,7 +6,7 @@
6
6
  * It judges nothing; probe.ts does. Node built-ins only, so it starts fast; the few system calls
7
7
  * Node has no binding for go through osascript's JavaScript bridge (NativeCheck), in one process.
8
8
  *
9
- * usage: node canary.js '<plan JSON>'
9
+ * usage: node canary.js '<plan JSON>' [deadline ms]
10
10
  */
11
11
  import { execFileSync, spawn } from "node:child_process";
12
12
  import dgram from "node:dgram";
@@ -375,6 +375,21 @@ const names = [
375
375
  ...Object.keys(plan).filter((n) => plan[n].kind !== "exec" && plan[n].kind !== "native"),
376
376
  ];
377
377
  const nativeChecks = Object.fromEntries(Object.entries(plan).flatMap(([n, s]) => (s.kind === "native" ? [[n, s.check]] : [])));
378
- const [outcomes, nativeOutcomes] = await Promise.all([Promise.all(names.map((n) => step(plan[n]))), native(nativeChecks)]);
379
- process.stdout.write(JSON.stringify({ ...Object.fromEntries(names.map((n, i) => [n, outcomes[i]])), ...nativeOutcomes }) + "\n");
380
- process.exit(0);
378
+ // The canary's own deadline (argv[3], ms; relay sets it below its limit for the whole run): a step
379
+ // still unsettled then is reported as "timeout", which no probe accepts as a denial, and every step
380
+ // that did settle is still reported. One stalled step then refuses the launch under its own name,
381
+ // and an escape elsewhere is still seen, instead of the whole run timing out with no results.
382
+ const deadlineMs = Number(process.argv[3]);
383
+ const got = {};
384
+ const settled = Promise.all([
385
+ Promise.all(names.map((n) => step(plan[n]).then((o) => void (got[n] = o)))),
386
+ native(nativeChecks).then((o) => void Object.assign(got, o)),
387
+ ]);
388
+ if (Number.isFinite(deadlineMs) && deadlineMs > 0)
389
+ await Promise.race([settled, new Promise((r) => setTimeout(r, deadlineMs))]);
390
+ else
391
+ await settled;
392
+ for (const n of [...names, ...Object.keys(nativeChecks)])
393
+ got[n] ??= "timeout";
394
+ // Exit once the line is written: on macOS a pipe's writes are asynchronous, and exiting at once can lose it.
395
+ process.stdout.write(JSON.stringify(got) + "\n", () => process.exit(0));
@@ -23,6 +23,13 @@ import { isGroupSignalRefusal, sendGroupSignal } from "../core/procs.js";
23
23
  const CANARY = path.join(path.dirname(fileURLToPath(import.meta.url)), "canary.js");
24
24
  /** The whole canary run may take this long before the launch is refused. It takes about half a second when idle; a short limit refused turns on a busy Mac. */
25
25
  const CANARY_TIMEOUT_MS = 30000;
26
+ /**
27
+ * The canary's own deadline, well inside CANARY_TIMEOUT_MS: by then it reports what every step got,
28
+ * a step still running as "timeout". A stalled step then refuses the launch under its own name, and
29
+ * an escape elsewhere is still reported, rather than the whole run timing out with no results (seen
30
+ * once on GitHub's macOS runners, 2026-11-21).
31
+ */
32
+ const CANARY_DEADLINE_MS = 20000;
26
33
  /** How long a connect or a lookup the sandbox should refuse at once may hang before it counts as not refused. */
27
34
  const STEP_TIMEOUT_MS = 1000;
28
35
  /** Never routed (TEST-NET-1): a connect there is refused by the sandbox at once, or it hangs. */
@@ -747,7 +754,7 @@ opts = {}) {
747
754
  const stopped = () => new ConfinementRefused("stopped", "the turn was stopped while relay was probing its sandbox, so it does not launch the harness");
748
755
  /** Runs the canary with `plan` under `l`'s confinement; what each step got. */
749
756
  const canary = async (l, plan) => {
750
- const run = l.rewrap(process.execPath, [CANARY, JSON.stringify(plan)]);
757
+ const run = l.rewrap(process.execPath, [CANARY, JSON.stringify(plan), String(CANARY_DEADLINE_MS)]);
751
758
  if (opts.signal?.aborted)
752
759
  throw stopped();
753
760
  const outcome = await new Promise((resolve) => {
@@ -952,7 +959,8 @@ opts = {}) {
952
959
  fs.rmSync(scratchDir, { recursive: true, force: true });
953
960
  await unsems;
954
961
  }
955
- const failed = results.find((r) => !r.ok);
962
+ // An escape outranks an inconclusive result (a timeout, say): it is the finding that matters.
963
+ const failed = results.find((r) => !r.ok && r.expect === "deny" && r.got.startsWith("allowed")) ?? results.find((r) => !r.ok);
956
964
  return { ok: !failed, profile: launch.fingerprint, relay: VERSION, os: osBuild(), ms: Math.round(performance.now() - started), results, ...(failed ? { failed } : {}) };
957
965
  }
958
966
  /** The kernel release and the OS build (kern.osversion), asked every time: an update between turns shows. */
@@ -1099,7 +1107,7 @@ function launchdListed(label) {
1099
1107
  return false;
1100
1108
  }
1101
1109
  }
1102
- /** Throws ConfinementRefused naming the first failed probe. */
1110
+ /** Throws ConfinementRefused naming the failed probe (ProbeReport.failed). */
1103
1111
  export function assertProbes(report) {
1104
1112
  const f = report.failed;
1105
1113
  if (!f)
package/docs/UPGRADING.md CHANGED
@@ -106,6 +106,19 @@ What restoring loses: the registry's record of whatever ran under the newer rele
106
106
  Newest first. Relay 1.1.4 and earlier came before the first public release; their notes are kept
107
107
  because later notes and the reference docs point into them.
108
108
 
109
+ ## Relay 1.3.1
110
+
111
+ A fix release. No config or registry migration is needed (the registry stays at schema 5), and Codex
112
+ pins in your store keep working.
113
+
114
+ - **A sandbox check that stalls no longer hides an escape.** Before a confined launch, relay runs a
115
+ canary inside the sandbox that tries what the sandbox must refuse. On a heavily loaded Mac one of
116
+ its steps could hang until relay's 30-second limit, and the launch was then refused as "canary"
117
+ with no results, so a step that did get through went unnamed. The canary now reports at its own
118
+ 20-second deadline: a step still running then counts as "timeout", which is never taken as a
119
+ refusal, and every other step's result is kept. When one step escaped, the refusal names that step
120
+ first. A stalled step still refuses the launch, as before.
121
+
109
122
  ## Relay 1.3.0
110
123
 
111
124
  Rooms: a new `room` tool and `relay room` commands that let two conversations you already have
@@ -109,7 +109,7 @@ the maintainer's qualification of one Codex release with exactly that relay buil
109
109
  {
110
110
  "format": "relay-shipped-codex-pin-v1",
111
111
  "codex": { "version": "0.169.0", "npmIntegrity": "sha512-…" },
112
- "relay": { "scheme": "relay-build-v2", "version": "1.3.0", "sha256": "…" }
112
+ "relay": { "scheme": "relay-build-v2", "version": "1.3.1", "sha256": "…" }
113
113
  }
114
114
  ```
115
115
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@jbkjr/relay",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@jbkjr/relay",
9
- "version": "1.3.0",
9
+ "version": "1.3.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@modelcontextprotocol/sdk": "1.32.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbkjr/relay",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Lets coding agents of different model families (Claude Code, OpenAI Codex CLI) call each other: delegate, consult, discuss and review across families, over one MCP server",
5
5
  "license": "MIT",
6
6
  "author": "Jack Koch",
@@ -254,7 +254,7 @@ test("stable surfaces: CLI usage, version aliases and misuse status", () => {
254
254
  for (const alias of ["--version", "-v", "version"]) {
255
255
  const r = spawnSync(process.execPath, [CLI, alias], { encoding: "utf8" });
256
256
  assert.equal(r.status, 0);
257
- assert.equal(r.stdout, "relay 1.3.0\n");
257
+ assert.equal(r.stdout, "relay 1.3.1\n");
258
258
  }
259
259
  const bad = spawnSync(process.execPath, [CLI, "unknown-command"], { encoding: "utf8" });
260
260
  assert.equal(bad.status, 2);