agent-relay-runner 0.119.11 → 0.120.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.
- package/package.json +2 -2
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/src/config.ts +24 -3
- package/src/index.ts +4 -2
- package/src/relay-mcp.ts +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-relay-runner",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.120.1",
|
|
4
4
|
"description": "Unified provider lifecycle runner for Agent Relay",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"agent-relay-providers": "0.104.3",
|
|
24
|
-
"agent-relay-sdk": "0.2.
|
|
24
|
+
"agent-relay-sdk": "0.2.107",
|
|
25
25
|
"callmux": "0.23.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
package/src/config.ts
CHANGED
|
@@ -81,6 +81,19 @@ function relayUrlFromEnv(): string | undefined {
|
|
|
81
81
|
return process.env.AGENT_RELAY_URL;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
function textEnvOrFile(name: string): string | undefined {
|
|
85
|
+
const inline = process.env[name];
|
|
86
|
+
if (inline) return inline;
|
|
87
|
+
const file = process.env[`${name}_FILE`];
|
|
88
|
+
if (!file) return undefined;
|
|
89
|
+
try {
|
|
90
|
+
const text = readFileSync(file, "utf8");
|
|
91
|
+
return text.length > 0 ? text : undefined;
|
|
92
|
+
} catch {
|
|
93
|
+
return undefined;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
84
97
|
export function relayTokenFromEnv(): string | undefined {
|
|
85
98
|
return process.env.AGENT_RELAY_TOKEN;
|
|
86
99
|
}
|
|
@@ -117,15 +130,23 @@ export function agentProfileNameFromEnv(): string | undefined {
|
|
|
117
130
|
}
|
|
118
131
|
|
|
119
132
|
export function agentProfileJsonFromEnv(): string | undefined {
|
|
120
|
-
return
|
|
133
|
+
return textEnvOrFile("AGENT_RELAY_AGENT_PROFILE_JSON");
|
|
121
134
|
}
|
|
122
135
|
|
|
123
136
|
export function workspaceJsonFromEnv(): string | undefined {
|
|
124
|
-
return
|
|
137
|
+
return textEnvOrFile("AGENT_RELAY_WORKSPACE_JSON");
|
|
125
138
|
}
|
|
126
139
|
|
|
127
140
|
export function relayInjectionEventsJsonFromEnv(): string | undefined {
|
|
128
|
-
return
|
|
141
|
+
return textEnvOrFile("AGENT_RELAY_INJECTION_EVENTS_JSON");
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function promptFromEnv(): string | undefined {
|
|
145
|
+
return textEnvOrFile("AGENT_RELAY_PROMPT");
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function systemPromptAppendFromEnv(): string | undefined {
|
|
149
|
+
return textEnvOrFile("AGENT_RELAY_SYSTEM_PROMPT_APPEND");
|
|
129
150
|
}
|
|
130
151
|
|
|
131
152
|
export function tmuxSessionFromEnv(): string | undefined {
|
package/src/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
loadGlobalConfig,
|
|
13
13
|
loadProviderConfigFromRelay,
|
|
14
14
|
policyNameFromEnv,
|
|
15
|
+
promptFromEnv,
|
|
15
16
|
relayInjectionEventsJsonFromEnv,
|
|
16
17
|
resolveCwd,
|
|
17
18
|
runnerId,
|
|
@@ -19,6 +20,7 @@ import {
|
|
|
19
20
|
runtimeTokenJtiFromEnv,
|
|
20
21
|
runtimeTokenProfileFromEnv,
|
|
21
22
|
spawnRequestIdFromEnv,
|
|
23
|
+
systemPromptAppendFromEnv,
|
|
22
24
|
taskIdFromEnv,
|
|
23
25
|
tmuxSessionFromEnv,
|
|
24
26
|
workspaceJsonFromEnv,
|
|
@@ -109,8 +111,8 @@ export async function main(argv = process.argv): Promise<void> {
|
|
|
109
111
|
profile: opts.profile ?? agentProfileNameFromEnv(),
|
|
110
112
|
agentProfile: parseAgentProfileEnv(agentProfileJsonFromEnv()),
|
|
111
113
|
workspace: parseWorkspaceEnv(workspaceJsonFromEnv()),
|
|
112
|
-
prompt: opts.prompt,
|
|
113
|
-
systemPromptAppend: opts.systemPromptAppend,
|
|
114
|
+
prompt: opts.prompt ?? promptFromEnv(),
|
|
115
|
+
systemPromptAppend: opts.systemPromptAppend ?? systemPromptAppendFromEnv(),
|
|
114
116
|
relayInjectionEvents: parseRelayInjectionEventsEnv(relayInjectionEventsJsonFromEnv()),
|
|
115
117
|
tmuxSession: tmuxSessionFromEnv(),
|
|
116
118
|
tags: opts.tags,
|
package/src/relay-mcp.ts
CHANGED
|
@@ -67,13 +67,16 @@ export function tomlString(value: string): string {
|
|
|
67
67
|
// project-cwd `.mcp.json` is never discovered (its enable modal can't wedge a headless
|
|
68
68
|
// agent). Whatever the assembler decides host mode should keep is injected here explicitly;
|
|
69
69
|
// strict then preserves exactly that set and nothing else.
|
|
70
|
-
import type
|
|
70
|
+
import { SHARED_CALLMUX_TOOL_CALL_TIMEOUT_MS, type ProvisioningMcpServer } from "agent-relay-sdk";
|
|
71
71
|
|
|
72
72
|
// The shared-listener bridge as a provider-neutral stdio server descriptor: a `callmux bridge`
|
|
73
73
|
// child fronting the host's shared listener, with per-agent `--cwd "$WORKTREE"` for session-cwd
|
|
74
74
|
// isolation (#672). It flows through the existing claude/codex stdio injection unchanged.
|
|
75
75
|
export function sharedMcpBridgeServer(url: string, cwd: string): ProvisioningMcpServer {
|
|
76
|
-
return {
|
|
76
|
+
return {
|
|
77
|
+
command: "callmux",
|
|
78
|
+
args: ["bridge", "--url", url, "--cwd", cwd, "--call-timeout", String(SHARED_CALLMUX_TOOL_CALL_TIMEOUT_MS)],
|
|
79
|
+
};
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
function claudeMcpServerEntry(server: ProvisioningMcpServer): Record<string, unknown> {
|