agent-relay 2.1.0 → 2.1.2
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/dist/index.cjs +193 -63
- package/dist/src/cli/index.d.ts +11 -1
- package/dist/src/cli/index.d.ts.map +1 -1
- package/dist/src/cli/index.js +112 -110
- package/dist/src/cli/index.js.map +1 -1
- package/package.json +18 -18
- package/packages/api-types/package.json +1 -1
- package/packages/benchmark/package.json +4 -4
- package/packages/bridge/package.json +8 -8
- package/packages/cli-tester/package.json +1 -1
- package/packages/config/package.json +2 -2
- package/packages/continuity/package.json +2 -2
- package/packages/daemon/dist/connection.d.ts +5 -0
- package/packages/daemon/dist/connection.d.ts.map +1 -1
- package/packages/daemon/dist/connection.js +19 -1
- package/packages/daemon/dist/connection.js.map +1 -1
- package/packages/daemon/dist/server.js +2 -2
- package/packages/daemon/dist/server.js.map +1 -1
- package/packages/daemon/package.json +12 -12
- package/packages/daemon/src/connection.ts +22 -1
- package/packages/daemon/src/router.test.ts +32 -0
- package/packages/daemon/src/server.ts +2 -2
- package/packages/hooks/package.json +4 -4
- package/packages/mcp/package.json +3 -3
- package/packages/memory/package.json +2 -2
- package/packages/policy/package.json +2 -2
- package/packages/protocol/dist/types.d.ts +5 -0
- package/packages/protocol/dist/types.d.ts.map +1 -1
- package/packages/protocol/package.json +1 -1
- package/packages/protocol/src/types.ts +5 -0
- package/packages/resiliency/package.json +1 -1
- package/packages/sdk/dist/client.d.ts +6 -0
- package/packages/sdk/dist/client.d.ts.map +1 -1
- package/packages/sdk/dist/client.js +1 -0
- package/packages/sdk/dist/client.js.map +1 -1
- package/packages/sdk/package.json +2 -2
- package/packages/sdk/src/client.ts +7 -0
- package/packages/spawner/package.json +1 -1
- package/packages/state/package.json +1 -1
- package/packages/storage/package.json +2 -2
- package/packages/telemetry/package.json +1 -1
- package/packages/trajectory/package.json +2 -2
- package/packages/user-directory/package.json +2 -2
- package/packages/utils/dist/cjs/relay-pty-path.js +111 -55
- package/packages/utils/dist/relay-pty-path.d.ts +17 -12
- package/packages/utils/dist/relay-pty-path.d.ts.map +1 -1
- package/packages/utils/dist/relay-pty-path.js +144 -94
- package/packages/utils/dist/relay-pty-path.js.map +1 -1
- package/packages/utils/package.json +2 -2
- package/packages/utils/src/relay-pty-path.test.ts +373 -0
- package/packages/utils/src/relay-pty-path.ts +182 -91
- package/packages/wrapper/dist/base-wrapper.d.ts +5 -0
- package/packages/wrapper/dist/base-wrapper.d.ts.map +1 -1
- package/packages/wrapper/dist/base-wrapper.js +14 -1
- package/packages/wrapper/dist/base-wrapper.js.map +1 -1
- package/packages/wrapper/dist/shared.d.ts +36 -0
- package/packages/wrapper/dist/shared.d.ts.map +1 -1
- package/packages/wrapper/dist/shared.js +123 -2
- package/packages/wrapper/dist/shared.js.map +1 -1
- package/packages/wrapper/dist/tmux-wrapper.js +1 -1
- package/packages/wrapper/dist/tmux-wrapper.js.map +1 -1
- package/packages/wrapper/package.json +6 -6
- package/packages/wrapper/src/base-wrapper.ts +15 -0
- package/packages/wrapper/src/shared.test.ts +156 -11
- package/packages/wrapper/src/shared.ts +154 -2
- package/packages/wrapper/src/tmux-wrapper.ts +1 -1
|
@@ -32,20 +32,42 @@ __export(relay_pty_path_exports, {
|
|
|
32
32
|
findRelayPtyBinary: () => findRelayPtyBinary,
|
|
33
33
|
getCachedRelayPtyPath: () => getCachedRelayPtyPath,
|
|
34
34
|
getLastSearchPaths: () => getLastSearchPaths,
|
|
35
|
-
|
|
35
|
+
getSupportedPlatforms: () => getSupportedPlatforms,
|
|
36
|
+
hasRelayPtyBinary: () => hasRelayPtyBinary,
|
|
37
|
+
isPlatformSupported: () => isPlatformSupported
|
|
36
38
|
});
|
|
37
39
|
module.exports = __toCommonJS(relay_pty_path_exports);
|
|
38
40
|
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
39
41
|
var import_node_os = __toESM(require("node:os"), 1);
|
|
40
42
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
43
|
+
const SUPPORTED_PLATFORMS = {
|
|
44
|
+
darwin: {
|
|
45
|
+
arm64: "relay-pty-darwin-arm64",
|
|
46
|
+
x64: "relay-pty-darwin-x64"
|
|
47
|
+
},
|
|
48
|
+
linux: {
|
|
49
|
+
arm64: "relay-pty-linux-arm64",
|
|
50
|
+
x64: "relay-pty-linux-x64"
|
|
51
|
+
}
|
|
52
|
+
};
|
|
41
53
|
function getPlatformBinaryName() {
|
|
42
54
|
const platform = import_node_os.default.platform();
|
|
43
55
|
const arch = import_node_os.default.arch();
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
56
|
+
return SUPPORTED_PLATFORMS[platform]?.[arch] ?? null;
|
|
57
|
+
}
|
|
58
|
+
function isPlatformSupported() {
|
|
59
|
+
const platform = import_node_os.default.platform();
|
|
60
|
+
const arch = import_node_os.default.arch();
|
|
61
|
+
return SUPPORTED_PLATFORMS[platform]?.[arch] !== void 0;
|
|
62
|
+
}
|
|
63
|
+
function getSupportedPlatforms() {
|
|
64
|
+
const platforms = [];
|
|
65
|
+
for (const [os2, archs] of Object.entries(SUPPORTED_PLATFORMS)) {
|
|
66
|
+
for (const arch of Object.keys(archs)) {
|
|
67
|
+
platforms.push(`${os2}-${arch}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return platforms.join(", ");
|
|
49
71
|
}
|
|
50
72
|
let cachedBinaryPath;
|
|
51
73
|
let cacheChecked = false;
|
|
@@ -55,70 +77,102 @@ function getLastSearchPaths() {
|
|
|
55
77
|
}
|
|
56
78
|
function findRelayPtyBinary(callerDirname) {
|
|
57
79
|
const envOverride = process.env.RELAY_PTY_BINARY;
|
|
58
|
-
if (envOverride &&
|
|
80
|
+
if (envOverride && isExecutable(envOverride)) {
|
|
59
81
|
lastSearchPaths = [envOverride];
|
|
60
82
|
return envOverride;
|
|
61
83
|
}
|
|
62
|
-
let packageRoot;
|
|
63
|
-
if (callerDirname.includes("node_modules/@agent-relay/")) {
|
|
64
|
-
packageRoot = import_node_path.default.join(callerDirname, "..", "..", "..", "..");
|
|
65
|
-
} else if (callerDirname.includes("node_modules/agent-relay")) {
|
|
66
|
-
packageRoot = import_node_path.default.join(callerDirname, "..", "..", "..");
|
|
67
|
-
} else {
|
|
68
|
-
packageRoot = import_node_path.default.join(callerDirname, "..", "..", "..");
|
|
69
|
-
}
|
|
70
|
-
let nodeModulesRoot = null;
|
|
71
|
-
const nodeModulesMatch = callerDirname.match(/^(.+?\/node_modules)\/@agent-relay\//);
|
|
72
|
-
if (nodeModulesMatch) {
|
|
73
|
-
nodeModulesRoot = nodeModulesMatch[1];
|
|
74
|
-
}
|
|
75
84
|
const platformBinary = getPlatformBinaryName();
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
import_node_path.default.join(
|
|
82
|
-
// Local build in cwd (for development)
|
|
83
|
-
import_node_path.default.join(process.cwd(), "relay-pty", "target", "release", "relay-pty"),
|
|
84
|
-
// Docker container (CI tests)
|
|
85
|
-
"/app/bin/relay-pty",
|
|
86
|
-
// Installed globally
|
|
87
|
-
"/usr/local/bin/relay-pty",
|
|
88
|
-
// In node_modules (when installed as local dependency)
|
|
89
|
-
import_node_path.default.join(process.cwd(), "node_modules", "agent-relay", "bin", "relay-pty"),
|
|
90
|
-
// Global npm install (nvm) - root package
|
|
91
|
-
import_node_path.default.join(process.env.HOME || "", ".nvm", "versions", "node", process.version, "lib", "node_modules", "agent-relay", "bin", "relay-pty")
|
|
92
|
-
];
|
|
93
|
-
if (nodeModulesRoot) {
|
|
94
|
-
candidates.push(import_node_path.default.join(nodeModulesRoot, "agent-relay", "bin", "relay-pty"));
|
|
85
|
+
const normalizedCaller = callerDirname.replace(/\\/g, "/");
|
|
86
|
+
const packageRoots = [];
|
|
87
|
+
const scopedMatch = normalizedCaller.match(/^(.+?\/node_modules)\/@agent-relay\//);
|
|
88
|
+
const directMatch = normalizedCaller.match(/^(.+?\/node_modules\/agent-relay)/);
|
|
89
|
+
if (scopedMatch) {
|
|
90
|
+
packageRoots.push(import_node_path.default.join(scopedMatch[1], "agent-relay"));
|
|
95
91
|
}
|
|
96
|
-
if (
|
|
97
|
-
|
|
98
|
-
candidates.push(import_node_path.default.join("/opt/homebrew/lib/node_modules", "agent-relay", "bin", "relay-pty"));
|
|
99
|
-
candidates.push(import_node_path.default.join(process.env.HOME, ".local", "share", "pnpm", "global", "node_modules", "agent-relay", "bin", "relay-pty"));
|
|
92
|
+
if (directMatch) {
|
|
93
|
+
packageRoots.push(directMatch[1]);
|
|
100
94
|
}
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
95
|
+
if (!normalizedCaller.includes("node_modules")) {
|
|
96
|
+
packageRoots.push(import_node_path.default.join(callerDirname, "..", "..", ".."));
|
|
97
|
+
}
|
|
98
|
+
const home = process.env.HOME || process.env.USERPROFILE || "";
|
|
99
|
+
if (home) {
|
|
100
|
+
const npxCacheBase = import_node_path.default.join(home, ".npm", "_npx");
|
|
101
|
+
if (import_node_fs.default.existsSync(npxCacheBase)) {
|
|
102
|
+
try {
|
|
103
|
+
const entries = import_node_fs.default.readdirSync(npxCacheBase);
|
|
104
|
+
for (const entry of entries) {
|
|
105
|
+
const npxPackage = import_node_path.default.join(npxCacheBase, entry, "node_modules", "agent-relay");
|
|
106
|
+
if (import_node_fs.default.existsSync(npxPackage)) {
|
|
107
|
+
packageRoots.push(npxPackage);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
} catch {
|
|
111
|
+
}
|
|
107
112
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
113
|
+
}
|
|
114
|
+
packageRoots.push(import_node_path.default.join(process.cwd(), "node_modules", "agent-relay"));
|
|
115
|
+
if (home) {
|
|
116
|
+
packageRoots.push(
|
|
117
|
+
import_node_path.default.join(home, ".nvm", "versions", "node", process.version, "lib", "node_modules", "agent-relay")
|
|
118
|
+
);
|
|
119
|
+
packageRoots.push(
|
|
120
|
+
import_node_path.default.join(home, ".volta", "tools", "image", "packages", "agent-relay", "lib", "node_modules", "agent-relay")
|
|
121
|
+
);
|
|
122
|
+
packageRoots.push(
|
|
123
|
+
import_node_path.default.join(home, ".fnm", "node-versions", process.version, "installation", "lib", "node_modules", "agent-relay")
|
|
124
|
+
);
|
|
125
|
+
packageRoots.push(
|
|
126
|
+
import_node_path.default.join(home, "n", "lib", "node_modules", "agent-relay")
|
|
127
|
+
);
|
|
128
|
+
packageRoots.push(
|
|
129
|
+
import_node_path.default.join(home, ".asdf", "installs", "nodejs", process.version.replace("v", ""), "lib", "node_modules", "agent-relay")
|
|
130
|
+
);
|
|
131
|
+
packageRoots.push(
|
|
132
|
+
import_node_path.default.join(home, ".local", "share", "pnpm", "global", "node_modules", "agent-relay")
|
|
133
|
+
);
|
|
134
|
+
packageRoots.push(
|
|
135
|
+
import_node_path.default.join(home, ".config", "yarn", "global", "node_modules", "agent-relay")
|
|
136
|
+
);
|
|
137
|
+
packageRoots.push(
|
|
138
|
+
import_node_path.default.join(home, ".yarn", "global", "node_modules", "agent-relay")
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
packageRoots.push("/usr/local/lib/node_modules/agent-relay");
|
|
142
|
+
packageRoots.push("/opt/homebrew/lib/node_modules/agent-relay");
|
|
143
|
+
packageRoots.push("/usr/lib/node_modules/agent-relay");
|
|
144
|
+
const candidates = [];
|
|
145
|
+
for (const root of packageRoots) {
|
|
146
|
+
if (platformBinary) {
|
|
147
|
+
candidates.push(import_node_path.default.join(root, "bin", platformBinary));
|
|
112
148
|
}
|
|
149
|
+
candidates.push(import_node_path.default.join(root, "bin", "relay-pty"));
|
|
150
|
+
}
|
|
151
|
+
const devRoot = normalizedCaller.includes("node_modules") ? null : import_node_path.default.join(callerDirname, "..", "..", "..");
|
|
152
|
+
if (devRoot) {
|
|
153
|
+
candidates.push(import_node_path.default.join(devRoot, "relay-pty", "target", "release", "relay-pty"));
|
|
154
|
+
candidates.push(import_node_path.default.join(devRoot, "relay-pty", "target", "debug", "relay-pty"));
|
|
113
155
|
}
|
|
156
|
+
candidates.push(import_node_path.default.join(process.cwd(), "relay-pty", "target", "release", "relay-pty"));
|
|
157
|
+
candidates.push("/app/bin/relay-pty");
|
|
158
|
+
candidates.push("/usr/local/bin/relay-pty");
|
|
159
|
+
candidates.push("/usr/bin/relay-pty");
|
|
114
160
|
lastSearchPaths = candidates;
|
|
115
161
|
for (const candidate of candidates) {
|
|
116
|
-
if (
|
|
162
|
+
if (isExecutable(candidate)) {
|
|
117
163
|
return candidate;
|
|
118
164
|
}
|
|
119
165
|
}
|
|
120
166
|
return null;
|
|
121
167
|
}
|
|
168
|
+
function isExecutable(filePath) {
|
|
169
|
+
try {
|
|
170
|
+
import_node_fs.default.accessSync(filePath, import_node_fs.default.constants.X_OK);
|
|
171
|
+
return true;
|
|
172
|
+
} catch {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
122
176
|
function hasRelayPtyBinary(callerDirname) {
|
|
123
177
|
if (!cacheChecked) {
|
|
124
178
|
cachedBinaryPath = findRelayPtyBinary(callerDirname);
|
|
@@ -139,5 +193,7 @@ function clearBinaryCache() {
|
|
|
139
193
|
findRelayPtyBinary,
|
|
140
194
|
getCachedRelayPtyPath,
|
|
141
195
|
getLastSearchPaths,
|
|
142
|
-
|
|
196
|
+
getSupportedPlatforms,
|
|
197
|
+
hasRelayPtyBinary,
|
|
198
|
+
isPlatformSupported
|
|
143
199
|
});
|
|
@@ -5,12 +5,22 @@
|
|
|
5
5
|
* - packages/bridge/src/spawner.ts (AgentSpawner)
|
|
6
6
|
* - packages/wrapper/src/relay-pty-orchestrator.ts (RelayPtyOrchestrator)
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* Supports all installation scenarios:
|
|
9
|
+
* - npx agent-relay (no postinstall, uses platform-specific binary)
|
|
10
|
+
* - npm install -g agent-relay (nvm, volta, fnm, n, asdf, Homebrew, system)
|
|
11
|
+
* - npm install agent-relay (local project)
|
|
12
|
+
* - pnpm/yarn global
|
|
13
|
+
* - Development (monorepo with Rust builds)
|
|
14
|
+
* - Docker containers
|
|
13
15
|
*/
|
|
16
|
+
/**
|
|
17
|
+
* Check if the current platform is supported.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isPlatformSupported(): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Get a human-readable description of supported platforms.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getSupportedPlatforms(): string;
|
|
14
24
|
/**
|
|
15
25
|
* Get the paths that were checked in the last binary search.
|
|
16
26
|
* Useful for debugging when the binary is not found.
|
|
@@ -19,13 +29,8 @@ export declare function getLastSearchPaths(): string[];
|
|
|
19
29
|
/**
|
|
20
30
|
* Find the relay-pty binary.
|
|
21
31
|
*
|
|
22
|
-
* Search order
|
|
23
|
-
*
|
|
24
|
-
* 2. bin/relay-pty in package root (installed by postinstall)
|
|
25
|
-
* 3. relay-pty/target/release/relay-pty (local Rust build)
|
|
26
|
-
* 4. /usr/local/bin/relay-pty (global install)
|
|
27
|
-
* 5. In node_modules when installed as dependency
|
|
28
|
-
* 6. Global npm installs (nvm) - both scoped and root packages
|
|
32
|
+
* Search order prioritizes platform-specific binaries FIRST because npx doesn't run postinstall.
|
|
33
|
+
* This ensures `npx agent-relay up` works without requiring global installation.
|
|
29
34
|
*
|
|
30
35
|
* @param callerDirname - The __dirname of the calling module (needed to resolve relative paths)
|
|
31
36
|
* @returns Path to relay-pty binary, or null if not found
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relay-pty-path.d.ts","sourceRoot":"","sources":["../src/relay-pty-path.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"relay-pty-path.d.ts","sourceRoot":"","sources":["../src/relay-pty-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgCH;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAI7C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAQ9C;AASD;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAuJvE;AAeD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAMhE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,IAAI,GAAG,SAAS,CAEjE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAGvC"}
|
|
@@ -5,15 +5,31 @@
|
|
|
5
5
|
* - packages/bridge/src/spawner.ts (AgentSpawner)
|
|
6
6
|
* - packages/wrapper/src/relay-pty-orchestrator.ts (RelayPtyOrchestrator)
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* Supports all installation scenarios:
|
|
9
|
+
* - npx agent-relay (no postinstall, uses platform-specific binary)
|
|
10
|
+
* - npm install -g agent-relay (nvm, volta, fnm, n, asdf, Homebrew, system)
|
|
11
|
+
* - npm install agent-relay (local project)
|
|
12
|
+
* - pnpm/yarn global
|
|
13
|
+
* - Development (monorepo with Rust builds)
|
|
14
|
+
* - Docker containers
|
|
13
15
|
*/
|
|
14
16
|
import fs from 'node:fs';
|
|
15
17
|
import os from 'node:os';
|
|
16
18
|
import path from 'node:path';
|
|
19
|
+
/**
|
|
20
|
+
* Supported platforms and their binary names.
|
|
21
|
+
* Windows is not supported (relay-pty requires PTY which doesn't work on Windows).
|
|
22
|
+
*/
|
|
23
|
+
const SUPPORTED_PLATFORMS = {
|
|
24
|
+
darwin: {
|
|
25
|
+
arm64: 'relay-pty-darwin-arm64',
|
|
26
|
+
x64: 'relay-pty-darwin-x64',
|
|
27
|
+
},
|
|
28
|
+
linux: {
|
|
29
|
+
arm64: 'relay-pty-linux-arm64',
|
|
30
|
+
x64: 'relay-pty-linux-x64',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
17
33
|
/**
|
|
18
34
|
* Get the platform-specific binary name for the current system.
|
|
19
35
|
* Returns null if the platform is not supported.
|
|
@@ -21,16 +37,27 @@ import path from 'node:path';
|
|
|
21
37
|
function getPlatformBinaryName() {
|
|
22
38
|
const platform = os.platform();
|
|
23
39
|
const arch = os.arch();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
40
|
+
return SUPPORTED_PLATFORMS[platform]?.[arch] ?? null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Check if the current platform is supported.
|
|
44
|
+
*/
|
|
45
|
+
export function isPlatformSupported() {
|
|
46
|
+
const platform = os.platform();
|
|
47
|
+
const arch = os.arch();
|
|
48
|
+
return SUPPORTED_PLATFORMS[platform]?.[arch] !== undefined;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Get a human-readable description of supported platforms.
|
|
52
|
+
*/
|
|
53
|
+
export function getSupportedPlatforms() {
|
|
54
|
+
const platforms = [];
|
|
55
|
+
for (const [os, archs] of Object.entries(SUPPORTED_PLATFORMS)) {
|
|
56
|
+
for (const arch of Object.keys(archs)) {
|
|
57
|
+
platforms.push(`${os}-${arch}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return platforms.join(', ');
|
|
34
61
|
}
|
|
35
62
|
/** Cached result of relay-pty binary check */
|
|
36
63
|
let cachedBinaryPath;
|
|
@@ -47,13 +74,8 @@ export function getLastSearchPaths() {
|
|
|
47
74
|
/**
|
|
48
75
|
* Find the relay-pty binary.
|
|
49
76
|
*
|
|
50
|
-
* Search order
|
|
51
|
-
*
|
|
52
|
-
* 2. bin/relay-pty in package root (installed by postinstall)
|
|
53
|
-
* 3. relay-pty/target/release/relay-pty (local Rust build)
|
|
54
|
-
* 4. /usr/local/bin/relay-pty (global install)
|
|
55
|
-
* 5. In node_modules when installed as dependency
|
|
56
|
-
* 6. Global npm installs (nvm) - both scoped and root packages
|
|
77
|
+
* Search order prioritizes platform-specific binaries FIRST because npx doesn't run postinstall.
|
|
78
|
+
* This ensures `npx agent-relay up` works without requiring global installation.
|
|
57
79
|
*
|
|
58
80
|
* @param callerDirname - The __dirname of the calling module (needed to resolve relative paths)
|
|
59
81
|
* @returns Path to relay-pty binary, or null if not found
|
|
@@ -61,97 +83,125 @@ export function getLastSearchPaths() {
|
|
|
61
83
|
export function findRelayPtyBinary(callerDirname) {
|
|
62
84
|
// Check for explicit environment variable override first
|
|
63
85
|
const envOverride = process.env.RELAY_PTY_BINARY;
|
|
64
|
-
if (envOverride &&
|
|
86
|
+
if (envOverride && isExecutable(envOverride)) {
|
|
65
87
|
lastSearchPaths = [envOverride];
|
|
66
88
|
return envOverride;
|
|
67
89
|
}
|
|
68
|
-
//
|
|
69
|
-
|
|
70
|
-
// -
|
|
71
|
-
|
|
72
|
-
//
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
//
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
// Direct dependency: node_modules/agent-relay/packages/{package}/dist/
|
|
83
|
-
// dist/ -> {package}/ -> packages/ -> agent-relay/
|
|
84
|
-
packageRoot = path.join(callerDirname, '..', '..', '..');
|
|
90
|
+
// Get platform-specific binary name (critical for npx where postinstall doesn't run)
|
|
91
|
+
const platformBinary = getPlatformBinaryName();
|
|
92
|
+
// Normalize path separators for cross-platform regex matching
|
|
93
|
+
const normalizedCaller = callerDirname.replace(/\\/g, '/');
|
|
94
|
+
// Collect all possible package root locations
|
|
95
|
+
const packageRoots = [];
|
|
96
|
+
// Find node_modules root from caller path
|
|
97
|
+
// Matches: /path/to/node_modules/@agent-relay/bridge/dist/
|
|
98
|
+
// Or: /path/to/node_modules/agent-relay/dist/src/cli/
|
|
99
|
+
const scopedMatch = normalizedCaller.match(/^(.+?\/node_modules)\/@agent-relay\//);
|
|
100
|
+
const directMatch = normalizedCaller.match(/^(.+?\/node_modules\/agent-relay)/);
|
|
101
|
+
if (scopedMatch) {
|
|
102
|
+
// Running from @agent-relay/* package - binary is in sibling agent-relay package
|
|
103
|
+
packageRoots.push(path.join(scopedMatch[1], 'agent-relay'));
|
|
85
104
|
}
|
|
86
|
-
|
|
87
|
-
//
|
|
88
|
-
|
|
105
|
+
if (directMatch) {
|
|
106
|
+
// Running from agent-relay package directly
|
|
107
|
+
packageRoots.push(directMatch[1]);
|
|
89
108
|
}
|
|
90
|
-
//
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
// Use non-greedy match (.+?) to get the FIRST node_modules, not the last
|
|
94
|
-
let nodeModulesRoot = null;
|
|
95
|
-
const nodeModulesMatch = callerDirname.match(/^(.+?\/node_modules)\/@agent-relay\//);
|
|
96
|
-
if (nodeModulesMatch) {
|
|
97
|
-
nodeModulesRoot = nodeModulesMatch[1];
|
|
109
|
+
// Development: packages/{package}/dist/ -> project root
|
|
110
|
+
if (!normalizedCaller.includes('node_modules')) {
|
|
111
|
+
packageRoots.push(path.join(callerDirname, '..', '..', '..'));
|
|
98
112
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
];
|
|
118
|
-
// Add candidate for root agent-relay package when running from scoped @agent-relay/* packages
|
|
119
|
-
if (nodeModulesRoot) {
|
|
120
|
-
candidates.push(path.join(nodeModulesRoot, 'agent-relay', 'bin', 'relay-pty'));
|
|
113
|
+
const home = process.env.HOME || process.env.USERPROFILE || '';
|
|
114
|
+
// npx cache locations - npm stores packages here when running via npx
|
|
115
|
+
if (home) {
|
|
116
|
+
const npxCacheBase = path.join(home, '.npm', '_npx');
|
|
117
|
+
if (fs.existsSync(npxCacheBase)) {
|
|
118
|
+
try {
|
|
119
|
+
const entries = fs.readdirSync(npxCacheBase);
|
|
120
|
+
for (const entry of entries) {
|
|
121
|
+
const npxPackage = path.join(npxCacheBase, entry, 'node_modules', 'agent-relay');
|
|
122
|
+
if (fs.existsSync(npxPackage)) {
|
|
123
|
+
packageRoots.push(npxPackage);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
catch {
|
|
128
|
+
// Ignore read errors
|
|
129
|
+
}
|
|
130
|
+
}
|
|
121
131
|
}
|
|
122
|
-
//
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
132
|
+
// Add cwd-based paths for local installs
|
|
133
|
+
packageRoots.push(path.join(process.cwd(), 'node_modules', 'agent-relay'));
|
|
134
|
+
// Global install locations - support ALL major Node version managers
|
|
135
|
+
if (home) {
|
|
136
|
+
// nvm (most common)
|
|
137
|
+
packageRoots.push(path.join(home, '.nvm', 'versions', 'node', process.version, 'lib', 'node_modules', 'agent-relay'));
|
|
138
|
+
// volta (increasingly popular)
|
|
139
|
+
packageRoots.push(path.join(home, '.volta', 'tools', 'image', 'packages', 'agent-relay', 'lib', 'node_modules', 'agent-relay'));
|
|
140
|
+
// fnm (fast Node manager)
|
|
141
|
+
packageRoots.push(path.join(home, '.fnm', 'node-versions', process.version, 'installation', 'lib', 'node_modules', 'agent-relay'));
|
|
142
|
+
// n (simple Node version manager)
|
|
143
|
+
packageRoots.push(path.join(home, 'n', 'lib', 'node_modules', 'agent-relay'));
|
|
144
|
+
// asdf (universal version manager)
|
|
145
|
+
packageRoots.push(path.join(home, '.asdf', 'installs', 'nodejs', process.version.replace('v', ''), 'lib', 'node_modules', 'agent-relay'));
|
|
127
146
|
// pnpm global
|
|
128
|
-
|
|
147
|
+
packageRoots.push(path.join(home, '.local', 'share', 'pnpm', 'global', 'node_modules', 'agent-relay'));
|
|
148
|
+
// yarn global (yarn 1.x)
|
|
149
|
+
packageRoots.push(path.join(home, '.config', 'yarn', 'global', 'node_modules', 'agent-relay'));
|
|
150
|
+
// yarn global (alternative location)
|
|
151
|
+
packageRoots.push(path.join(home, '.yarn', 'global', 'node_modules', 'agent-relay'));
|
|
129
152
|
}
|
|
130
|
-
//
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if (
|
|
141
|
-
candidates.push(path.join(
|
|
142
|
-
candidates.push(path.join('/opt/homebrew/lib/node_modules', 'agent-relay', 'bin', platformBinary));
|
|
143
|
-
candidates.push(path.join(process.env.HOME, '.local', 'share', 'pnpm', 'global', 'node_modules', 'agent-relay', 'bin', platformBinary));
|
|
153
|
+
// Homebrew npm (macOS)
|
|
154
|
+
packageRoots.push('/usr/local/lib/node_modules/agent-relay');
|
|
155
|
+
packageRoots.push('/opt/homebrew/lib/node_modules/agent-relay');
|
|
156
|
+
// Linux system-wide npm
|
|
157
|
+
packageRoots.push('/usr/lib/node_modules/agent-relay');
|
|
158
|
+
// Build candidates list - PRIORITIZE platform-specific binaries
|
|
159
|
+
// This is critical for npx since postinstall doesn't run
|
|
160
|
+
const candidates = [];
|
|
161
|
+
for (const root of packageRoots) {
|
|
162
|
+
// Platform-specific binary FIRST (works without postinstall)
|
|
163
|
+
if (platformBinary) {
|
|
164
|
+
candidates.push(path.join(root, 'bin', platformBinary));
|
|
144
165
|
}
|
|
166
|
+
// Generic binary (requires postinstall to have run)
|
|
167
|
+
candidates.push(path.join(root, 'bin', 'relay-pty'));
|
|
145
168
|
}
|
|
169
|
+
// Development: local Rust builds
|
|
170
|
+
const devRoot = normalizedCaller.includes('node_modules')
|
|
171
|
+
? null
|
|
172
|
+
: path.join(callerDirname, '..', '..', '..');
|
|
173
|
+
if (devRoot) {
|
|
174
|
+
candidates.push(path.join(devRoot, 'relay-pty', 'target', 'release', 'relay-pty'));
|
|
175
|
+
candidates.push(path.join(devRoot, 'relay-pty', 'target', 'debug', 'relay-pty'));
|
|
176
|
+
}
|
|
177
|
+
candidates.push(path.join(process.cwd(), 'relay-pty', 'target', 'release', 'relay-pty'));
|
|
178
|
+
// Docker container (CI tests)
|
|
179
|
+
candidates.push('/app/bin/relay-pty');
|
|
180
|
+
// System-wide installs
|
|
181
|
+
candidates.push('/usr/local/bin/relay-pty');
|
|
182
|
+
candidates.push('/usr/bin/relay-pty');
|
|
146
183
|
// Store search paths for debugging
|
|
147
184
|
lastSearchPaths = candidates;
|
|
148
185
|
for (const candidate of candidates) {
|
|
149
|
-
if (
|
|
186
|
+
if (isExecutable(candidate)) {
|
|
150
187
|
return candidate;
|
|
151
188
|
}
|
|
152
189
|
}
|
|
153
190
|
return null;
|
|
154
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* Check if a file exists and is executable.
|
|
194
|
+
*/
|
|
195
|
+
function isExecutable(filePath) {
|
|
196
|
+
try {
|
|
197
|
+
fs.accessSync(filePath, fs.constants.X_OK);
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
200
|
+
catch {
|
|
201
|
+
// File doesn't exist or isn't executable
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
155
205
|
/**
|
|
156
206
|
* Check if relay-pty binary is available (cached).
|
|
157
207
|
* Returns true if the binary exists, false otherwise.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relay-pty-path.js","sourceRoot":"","sources":["../src/relay-pty-path.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"relay-pty-path.js","sourceRoot":"","sources":["../src/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name": "@agent-relay/utils",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Shared utilities for agent-relay: logging, name generation, command resolution, update checking",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"vitest": "^3.2.4"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@agent-relay/protocol": "2.1.
|
|
97
|
+
"@agent-relay/protocol": "2.1.2",
|
|
98
98
|
"compare-versions": "^6.1.1"
|
|
99
99
|
},
|
|
100
100
|
"publishConfig": {
|