agent-relay-orchestrator 0.129.9 → 0.129.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-relay-orchestrator",
3
- "version": "0.129.9",
3
+ "version": "0.129.10",
4
4
  "description": "Agent Relay orchestrator — manages agent lifecycle across hosts",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "agent-relay-providers": "0.104.5",
20
- "agent-relay-sdk": "0.2.127",
20
+ "agent-relay-sdk": "0.2.128",
21
21
  "callmux": "0.24.2"
22
22
  },
23
23
  "devDependencies": {
@@ -3,6 +3,7 @@ import { existsSync, writeFileSync } from "node:fs";
3
3
  import { homedir } from "node:os";
4
4
  import { getAllManifests } from "agent-relay-providers";
5
5
  import { gitCheckoutArtifactPaths, prepareGitCheckoutArtifact, rollbackRuntimeSymlink, swapRuntimeSymlink, type GitCheckoutArtifact } from "agent-relay-sdk/git-checkout-artifact";
6
+ import { assertRegistryOnlyRuntimeManifest } from "agent-relay-sdk/npm-runtime";
6
7
  import { runInstallWithRetry } from "agent-relay-sdk";
7
8
  import { shellQuote } from "agent-relay-sdk/shell-utils";
8
9
  import type { OrchestratorConfig } from "./config";
@@ -207,6 +208,20 @@ export async function handleSelfUpgrade(
207
208
  return;
208
209
  }
209
210
 
211
+ // Option-4 fail-fast guard (#1435). The npm-reuse RPC install is in-place and additive —
212
+ // it must not drop the relay server co-installed in the same prefix — so it stays an
213
+ // `npm install --prefix <runtimePrefix>` rather than a staging+promote (that hardening is
214
+ // the CLI's job, and the RPC would need the same complete-managed-set + crash-safe swap the
215
+ // CLI has). Crucially, this prefix is NEVER the symlinked source checkout that triggers
216
+ // #1435: detectRuntimePrefix() derives it from THIS process's own module path (the segment
217
+ // before `/node_modules/`), so on a git-checkout host — where the orchestrator runs from
218
+ // source with no `/node_modules/` ancestor — it is undefined and buildInstallCommand()
219
+ // delegates to the `agent-relay upgrade` CLI (which installs into a fresh staging prefix).
220
+ // The prefix is set ONLY on clean-npm hosts, where it is a real dir with a registry-only
221
+ // manifest. This guard is the SAFE FLOOR: if a symlink-to-source prefix ever did reach here,
222
+ // refuse it with a clear, actionable error instead of npm's opaque EUNSUPPORTEDPROTOCOL.
223
+ if (plan.runtimePrefix) assertRegistryOnlyRuntimeManifest(plan.runtimePrefix);
224
+
210
225
  const install = await runInstallWithRetry(plan.installCmd, runner.run.bind(runner), {
211
226
  sleep: opts.sleep,
212
227
  retries: opts.installRetries,