agent-relay-server 0.10.8 → 0.10.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 +1 -1
- package/src/cli.ts +2 -2
- package/src/routes.ts +2 -1
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -244,11 +244,11 @@ async function handleProviderCommand(args: string[]): Promise<void> {
|
|
|
244
244
|
if ((action !== "wrap" && action !== "unwrap") || (provider !== "claude" && provider !== "codex")) {
|
|
245
245
|
throw new Error("Usage: agent-relay provider <wrap|unwrap> <claude|codex>");
|
|
246
246
|
}
|
|
247
|
-
const dir = join(homedir(), ".agent-relay", "bin");
|
|
247
|
+
const dir = join(process.env.HOME || homedir(), ".agent-relay", "bin");
|
|
248
248
|
const shim = join(dir, provider);
|
|
249
249
|
if (action === "wrap") {
|
|
250
250
|
mkdirSync(dir, { recursive: true });
|
|
251
|
-
writeFileSync(shim, `#!/usr/bin/env bash\nexec ${provider}-relay -- "$@"\n`, "utf8");
|
|
251
|
+
writeFileSync(shim, `#!/usr/bin/env bash\nexec ${provider}-relay ${provider} -- "$@"\n`, "utf8");
|
|
252
252
|
chmodSync(shim, 0o755);
|
|
253
253
|
console.log(`Wrapped ${provider}: ${shim}`);
|
|
254
254
|
console.log(`Ensure ${dir} is before the provider binary on PATH.`);
|
package/src/routes.ts
CHANGED
|
@@ -1384,11 +1384,12 @@ const postOrchestrator: Handler = async (req) => {
|
|
|
1384
1384
|
}
|
|
1385
1385
|
}
|
|
1386
1386
|
const envKeys = cleanStringArray(parsed.body.envKeys, "envKeys");
|
|
1387
|
+
const apiUrl = cleanString(parsed.body.apiUrl, "apiUrl", { max: 500 });
|
|
1387
1388
|
const version = cleanString(parsed.body.version, "version", { max: 80 });
|
|
1388
1389
|
const gitSha = cleanString(parsed.body.gitSha, "gitSha", { max: 80 });
|
|
1389
1390
|
const protocolVersion = cleanProtocolVersion(parsed.body.protocolVersion);
|
|
1390
1391
|
const meta = cleanMeta(parsed.body.meta);
|
|
1391
|
-
const orch = upsertOrchestrator({ id, hostname, providers: providers ?? ["claude", "codex"], baseDir, envKeys, version, protocolVersion, gitSha, meta });
|
|
1392
|
+
const orch = upsertOrchestrator({ id, hostname, providers: providers ?? ["claude", "codex"], baseDir, apiUrl, envKeys, version, protocolVersion, gitSha, meta });
|
|
1392
1393
|
auditEvent({
|
|
1393
1394
|
clientId: "server-orchestrator-register-" + id + "-" + Date.now(),
|
|
1394
1395
|
kind: "state",
|