agent-relay 10.6.6 → 11.0.0
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/README.md +8 -0
- package/dist/cli/bootstrap.d.ts.map +1 -1
- package/dist/cli/bootstrap.js +2 -0
- package/dist/cli/bootstrap.js.map +1 -1
- package/dist/cli/commands/local-agent.d.ts +3 -10
- package/dist/cli/commands/local-agent.d.ts.map +1 -1
- package/dist/cli/commands/local-agent.js +104 -35
- package/dist/cli/commands/local-agent.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +3 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/lib/attach-native.d.ts +27 -0
- package/dist/cli/lib/attach-native.d.ts.map +1 -0
- package/dist/cli/lib/attach-native.js +266 -0
- package/dist/cli/lib/attach-native.js.map +1 -0
- package/dist/cli/lib/client-factory.d.ts +9 -0
- package/dist/cli/lib/client-factory.d.ts.map +1 -1
- package/dist/cli/lib/client-factory.js +35 -1
- package/dist/cli/lib/client-factory.js.map +1 -1
- package/dist/cli/lib/node-version.d.ts +4 -0
- package/dist/cli/lib/node-version.d.ts.map +1 -0
- package/dist/cli/lib/node-version.js +9 -0
- package/dist/cli/lib/node-version.js.map +1 -0
- package/dist/cli/lib/project-workspace-key.d.ts +1 -21
- package/dist/cli/lib/project-workspace-key.d.ts.map +1 -1
- package/dist/cli/lib/project-workspace-key.js +3 -83
- package/dist/cli/lib/project-workspace-key.js.map +1 -1
- package/dist/cli/lib/sdk-client.d.ts +2 -1
- package/dist/cli/lib/sdk-client.d.ts.map +1 -1
- package/dist/cli/lib/sdk-client.js +7 -29
- package/dist/cli/lib/sdk-client.js.map +1 -1
- package/dist/index.cjs +339 -1
- package/package.json +9 -8
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { createInterface } from 'node:readline';
|
|
2
|
+
import { randomUUID } from 'node:crypto';
|
|
3
|
+
import { defaultStateDir, readConnectionFileFromDisk, resolveBrokerConnection, } from './broker-connection.js';
|
|
4
|
+
import { createBrokerClient } from './attach-broker.js';
|
|
5
|
+
export function renderAgentEvent(envelope, options = {}) {
|
|
6
|
+
if (envelope.event.kind.startsWith('reasoning.') && !options.reasoning)
|
|
7
|
+
return null;
|
|
8
|
+
if (options.json)
|
|
9
|
+
return `${JSON.stringify({ kind: 'agent_event', ...envelope })}\n`;
|
|
10
|
+
const event = envelope.event;
|
|
11
|
+
switch (event.kind) {
|
|
12
|
+
case 'text.delta':
|
|
13
|
+
return typeof event.delta === 'string' ? event.delta : null;
|
|
14
|
+
case 'text.finished':
|
|
15
|
+
return '\n';
|
|
16
|
+
case 'reasoning.delta':
|
|
17
|
+
return options.reasoning && typeof event.delta === 'string' ? event.delta : null;
|
|
18
|
+
case 'activity.changed': {
|
|
19
|
+
const reason = typeof event.reason === 'string' && event.reason ? ` (${event.reason})` : '';
|
|
20
|
+
return `\n[activity] ${String(event.activity ?? 'unknown')}${reason}\n`;
|
|
21
|
+
}
|
|
22
|
+
case 'tool.called':
|
|
23
|
+
return `\n[tool] ${String(event.tool ?? event.name ?? 'tool')} started\n`;
|
|
24
|
+
case 'tool.completed':
|
|
25
|
+
return `[tool] ${String(event.tool ?? event.name ?? 'tool')} finished\n`;
|
|
26
|
+
case 'tool.failed':
|
|
27
|
+
return `[tool] ${String(event.tool ?? event.name ?? 'tool')} failed: ${String(event.error ?? 'unknown error')}\n`;
|
|
28
|
+
case 'tool.approval.requested':
|
|
29
|
+
return `[waiting] approval required for ${String(event.tool ?? 'tool')} (${String(event.approvalId ?? '')})\n`;
|
|
30
|
+
case 'tool.approval.resolved':
|
|
31
|
+
return `[approval] ${event.approved === true ? 'approved' : 'rejected'}\n`;
|
|
32
|
+
case 'file.changed':
|
|
33
|
+
return `[file] ${String(event.operation ?? 'updated')} ${String(event.path ?? '')}\n`;
|
|
34
|
+
case 'usage.updated':
|
|
35
|
+
return `[usage] ${JSON.stringify(event.usage ?? {})}\n`;
|
|
36
|
+
case 'warning':
|
|
37
|
+
return `[warning] ${String(event.message ?? '')}\n`;
|
|
38
|
+
case 'error':
|
|
39
|
+
case 'session.failed':
|
|
40
|
+
return `[error] ${String(event.message ?? event.error ?? 'native harness failed')}\n`;
|
|
41
|
+
default:
|
|
42
|
+
if (event.kind.startsWith('session.'))
|
|
43
|
+
return `[session] ${event.kind.slice('session.'.length)}\n`;
|
|
44
|
+
if (event.kind === 'context.compacted')
|
|
45
|
+
return '[context] compacted\n';
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export function renderNativeHarnessDiagnostic(envelope, options = {}) {
|
|
50
|
+
if (!options.diagnostics)
|
|
51
|
+
return null;
|
|
52
|
+
if (options.json)
|
|
53
|
+
return `${JSON.stringify({ kind: 'native_harness_diagnostic', ...envelope })}\n`;
|
|
54
|
+
return `[diagnostic:${envelope.diagnostic.level}] ${envelope.diagnostic.message}\n`;
|
|
55
|
+
}
|
|
56
|
+
function defaultDependencies(options) {
|
|
57
|
+
void options;
|
|
58
|
+
return {
|
|
59
|
+
connect: (resolved) => createBrokerClient(resolved),
|
|
60
|
+
output: {
|
|
61
|
+
stdout: (text) => process.stdout.write(text),
|
|
62
|
+
stderr: (text) => process.stderr.write(text),
|
|
63
|
+
},
|
|
64
|
+
createReadline: () => createInterface({
|
|
65
|
+
input: process.stdin,
|
|
66
|
+
output: process.stdout,
|
|
67
|
+
terminal: Boolean(process.stdin.isTTY),
|
|
68
|
+
}),
|
|
69
|
+
onSignal: (handler) => {
|
|
70
|
+
process.once('SIGINT', handler);
|
|
71
|
+
return () => process.off('SIGINT', handler);
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export async function attachNative(name, mode, options, overrides = {}) {
|
|
76
|
+
if (mode === 'passthrough') {
|
|
77
|
+
(overrides.output?.stderr ?? ((text) => process.stderr.write(text)))('Error: native harnesses do not expose a terminal byte stream; use --mode view or --mode drive.\n');
|
|
78
|
+
return 1;
|
|
79
|
+
}
|
|
80
|
+
const connection = resolveBrokerConnection(options, {
|
|
81
|
+
readConnectionFile: readConnectionFileFromDisk,
|
|
82
|
+
getDefaultStateDir: defaultStateDir,
|
|
83
|
+
env: process.env,
|
|
84
|
+
});
|
|
85
|
+
if (!connection) {
|
|
86
|
+
(overrides.output?.stderr ?? ((text) => process.stderr.write(text)))('Error: could not locate broker connection.\n');
|
|
87
|
+
return 1;
|
|
88
|
+
}
|
|
89
|
+
const deps = { ...defaultDependencies(options), ...overrides };
|
|
90
|
+
const client = deps.connect(connection);
|
|
91
|
+
// Capture a global broker cursor before subscribing. The broker replays
|
|
92
|
+
// everything after this cursor while the agent-event history request runs,
|
|
93
|
+
// closing the history/live race even when the WebSocket opens slowly.
|
|
94
|
+
let brokerCursor;
|
|
95
|
+
try {
|
|
96
|
+
brokerCursor = await client.currentEventSeq();
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
deps.output.stderr(`Error: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
100
|
+
client.disconnect();
|
|
101
|
+
return 1;
|
|
102
|
+
}
|
|
103
|
+
const stream = client.subscribeAgentEvents(name, { sinceSequence: 0, sinceBrokerSeq: brokerCursor });
|
|
104
|
+
const iterator = stream[Symbol.asyncIterator]();
|
|
105
|
+
let highWater = 0;
|
|
106
|
+
let stopped = false;
|
|
107
|
+
let disconnected = false;
|
|
108
|
+
let iteratorClosed = false;
|
|
109
|
+
let resolveStop;
|
|
110
|
+
const stopSignal = new Promise((resolve) => {
|
|
111
|
+
resolveStop = resolve;
|
|
112
|
+
});
|
|
113
|
+
let readline;
|
|
114
|
+
const pendingCommands = new Set();
|
|
115
|
+
let commandChain = Promise.resolve();
|
|
116
|
+
const render = (event) => {
|
|
117
|
+
if (event.sequence <= highWater)
|
|
118
|
+
return;
|
|
119
|
+
highWater = event.sequence;
|
|
120
|
+
const text = renderAgentEvent(event, options);
|
|
121
|
+
if (text !== null)
|
|
122
|
+
deps.output.stdout(text);
|
|
123
|
+
};
|
|
124
|
+
const unsubscribeDiagnostics = client.onEvent((event) => {
|
|
125
|
+
if (event.kind !== 'native_harness_diagnostic' || event.name !== name)
|
|
126
|
+
return;
|
|
127
|
+
const text = renderNativeHarnessDiagnostic(event, options);
|
|
128
|
+
if (text !== null)
|
|
129
|
+
deps.output.stdout(text);
|
|
130
|
+
});
|
|
131
|
+
const disconnect = () => {
|
|
132
|
+
if (disconnected)
|
|
133
|
+
return;
|
|
134
|
+
disconnected = true;
|
|
135
|
+
client.disconnect();
|
|
136
|
+
};
|
|
137
|
+
const closeIterator = () => {
|
|
138
|
+
if (iteratorClosed)
|
|
139
|
+
return;
|
|
140
|
+
iteratorClosed = true;
|
|
141
|
+
void Promise.resolve(iterator.return?.()).catch(() => undefined);
|
|
142
|
+
};
|
|
143
|
+
const stop = () => {
|
|
144
|
+
if (stopped)
|
|
145
|
+
return;
|
|
146
|
+
stopped = true;
|
|
147
|
+
readline?.close();
|
|
148
|
+
// Close the broker before iterator cleanup and resolve our own stop signal.
|
|
149
|
+
// An idle adapter stream is not required to unblock iterator.next()/return().
|
|
150
|
+
disconnect();
|
|
151
|
+
closeIterator();
|
|
152
|
+
resolveStop();
|
|
153
|
+
};
|
|
154
|
+
const removeSignal = deps.onSignal(stop);
|
|
155
|
+
try {
|
|
156
|
+
const history = await client.getAgentEventHistory(name, 0);
|
|
157
|
+
if (history.gap) {
|
|
158
|
+
const gap = {
|
|
159
|
+
kind: 'agent_event_replay_gap',
|
|
160
|
+
name,
|
|
161
|
+
oldest_available_sequence: history.oldest_available_sequence,
|
|
162
|
+
};
|
|
163
|
+
if (options.json)
|
|
164
|
+
deps.output.stdout(`${JSON.stringify(gap)}\n`);
|
|
165
|
+
else
|
|
166
|
+
deps.output.stderr('[attach] agent-event history was truncated; showing retained events.\n');
|
|
167
|
+
}
|
|
168
|
+
for (const event of history.events)
|
|
169
|
+
render(event);
|
|
170
|
+
if (mode === 'drive') {
|
|
171
|
+
readline = deps.createReadline();
|
|
172
|
+
const showPrompt = () => {
|
|
173
|
+
if (stopped || options.json || !readline?.terminal)
|
|
174
|
+
return;
|
|
175
|
+
readline.setPrompt('> ');
|
|
176
|
+
readline.prompt();
|
|
177
|
+
};
|
|
178
|
+
readline.on('line', (line) => {
|
|
179
|
+
const text = line.trim();
|
|
180
|
+
if (!text)
|
|
181
|
+
return;
|
|
182
|
+
if (text === '/detach') {
|
|
183
|
+
stop();
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
const approval = text.match(/^\/(approve|reject)\s+(.+)$/);
|
|
187
|
+
const kind = approval
|
|
188
|
+
? approval[1] === 'approve'
|
|
189
|
+
? 'approve_tool'
|
|
190
|
+
: 'reject_tool'
|
|
191
|
+
: text === '/interrupt'
|
|
192
|
+
? 'interrupt'
|
|
193
|
+
: 'submit_user_message';
|
|
194
|
+
const commandText = kind === 'submit_user_message' ? line : undefined;
|
|
195
|
+
const approvalId = approval?.[2]?.trim();
|
|
196
|
+
const pendingCommand = commandChain
|
|
197
|
+
.then(() => client.sendNativeHarnessCommand(name, {
|
|
198
|
+
kind,
|
|
199
|
+
idempotency_key: randomUUID(),
|
|
200
|
+
...(commandText === undefined ? {} : { text: commandText }),
|
|
201
|
+
...(commandText === undefined ? {} : { mode: 'auto' }),
|
|
202
|
+
...(approvalId ? { approval_id: approvalId } : {}),
|
|
203
|
+
}))
|
|
204
|
+
.then((ack) => {
|
|
205
|
+
if (!ack.accepted) {
|
|
206
|
+
deps.output.stderr(`Input rejected: ${ack.error?.message ?? 'native harness rejected input'}\n`);
|
|
207
|
+
}
|
|
208
|
+
else if (options.json) {
|
|
209
|
+
deps.output.stdout(`${JSON.stringify({ kind: 'native_harness_command_ack', name, ...ack })}\n`);
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
deps.output.stderr(ack.duplicate ? '[input] already accepted\n' : '[input] accepted\n');
|
|
213
|
+
}
|
|
214
|
+
})
|
|
215
|
+
.catch((error) => {
|
|
216
|
+
deps.output.stderr(`Input failed: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
217
|
+
})
|
|
218
|
+
.then(() => undefined);
|
|
219
|
+
commandChain = pendingCommand.catch(() => undefined);
|
|
220
|
+
pendingCommands.add(pendingCommand);
|
|
221
|
+
void pendingCommand.finally(() => {
|
|
222
|
+
pendingCommands.delete(pendingCommand);
|
|
223
|
+
showPrompt();
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
showPrompt();
|
|
227
|
+
}
|
|
228
|
+
while (!stopped) {
|
|
229
|
+
const next = await Promise.race([
|
|
230
|
+
iterator.next(),
|
|
231
|
+
stopSignal.then(() => ({ done: true, value: undefined })),
|
|
232
|
+
]);
|
|
233
|
+
if (next.done)
|
|
234
|
+
break;
|
|
235
|
+
render(next.value);
|
|
236
|
+
}
|
|
237
|
+
await Promise.allSettled(pendingCommands);
|
|
238
|
+
return 0;
|
|
239
|
+
}
|
|
240
|
+
catch (error) {
|
|
241
|
+
deps.output.stderr(`Error: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
242
|
+
return 1;
|
|
243
|
+
}
|
|
244
|
+
finally {
|
|
245
|
+
stopped = true;
|
|
246
|
+
removeSignal();
|
|
247
|
+
unsubscribeDiagnostics();
|
|
248
|
+
readline?.close();
|
|
249
|
+
disconnect();
|
|
250
|
+
closeIterator();
|
|
251
|
+
resolveStop();
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
export async function isNativeHarness(name, options, fetchFn = globalThis.fetch) {
|
|
255
|
+
const connection = resolveBrokerConnection(options, {
|
|
256
|
+
readConnectionFile: readConnectionFileFromDisk,
|
|
257
|
+
getDefaultStateDir: defaultStateDir,
|
|
258
|
+
env: process.env,
|
|
259
|
+
});
|
|
260
|
+
if (!connection)
|
|
261
|
+
return false;
|
|
262
|
+
const client = createBrokerClient(connection, fetchFn);
|
|
263
|
+
const agent = (await client.listAgents()).find((candidate) => candidate.name === name);
|
|
264
|
+
return agent?.runtime_kind === 'native';
|
|
265
|
+
}
|
|
266
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DriverClient, type BrokerInitArgs } from '@agent-relay/harness-driver';
|
|
2
|
+
import { type HarnessRuntime, type SelectedHarnessRuntime } from '@agent-relay/harnesses';
|
|
2
3
|
export interface CreateRuntimeClientOptions {
|
|
3
4
|
cwd: string;
|
|
4
5
|
channels?: string[];
|
|
@@ -25,7 +26,15 @@ export interface ClientSpawnOptions {
|
|
|
25
26
|
shadowMode?: 'subagent' | 'process';
|
|
26
27
|
spawnMode?: 'interactive' | 'task_exit' | 'task-exit' | 'single_shot' | 'single-shot';
|
|
27
28
|
exitAfterTask?: boolean;
|
|
29
|
+
/** Harness execution runtime. `auto` preserves each adapter's rollout default. */
|
|
30
|
+
runtime?: HarnessRuntime;
|
|
28
31
|
}
|
|
32
|
+
/** Bun standalone executables must re-enter the bundled CLI to run embedded sidecar code. */
|
|
33
|
+
export declare function nativeSidecarLaunch(argv?: readonly string[], execPath?: string): {
|
|
34
|
+
command: string;
|
|
35
|
+
args: string[];
|
|
36
|
+
} | undefined;
|
|
37
|
+
export declare function resolvedSpawnRuntime(options: Pick<ClientSpawnOptions, 'cli' | 'runtime'>): SelectedHarnessRuntime;
|
|
29
38
|
export declare function createRuntimeClient(options: CreateRuntimeClientOptions): Promise<HarnessDriverClient>;
|
|
30
39
|
export declare function spawnAgentWithClient(client: HarnessDriverClient, options: ClientSpawnOptions): Promise<void>;
|
|
31
40
|
//# sourceMappingURL=client-factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-factory.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/client-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"client-factory.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/client-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAG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,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,CAMjD;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,KAAK,GAAG,SAAS,CAAC,GACnD,sBAAsB,CAExB;AAED,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAiC3G;AAED,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,IAAI,CAAC,CA6Bf"}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import { HarnessDriverClient } from '@agent-relay/harness-driver';
|
|
2
|
+
import { createNativeHarnessLaunch, resolveHarnessRuntime, } from '@agent-relay/harnesses';
|
|
3
|
+
const NATIVE_SIDECAR_COMMAND = '__ai-sdk-sidecar';
|
|
4
|
+
/** Bun standalone executables must re-enter the bundled CLI to run embedded sidecar code. */
|
|
5
|
+
export function nativeSidecarLaunch(argv = process.argv, execPath = process.execPath) {
|
|
6
|
+
const bundledEntrypoint = argv[1] ?? '';
|
|
7
|
+
if (argv[0] === 'bun' && bundledEntrypoint.startsWith('/$bunfs/root/')) {
|
|
8
|
+
return { command: execPath, args: [NATIVE_SIDECAR_COMMAND] };
|
|
9
|
+
}
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
export function resolvedSpawnRuntime(options) {
|
|
13
|
+
return resolveHarnessRuntime(options.cli, options.runtime);
|
|
14
|
+
}
|
|
2
15
|
export async function createRuntimeClient(options) {
|
|
3
16
|
const { cwd, channels = ['general'], binaryPath = process.env.AGENT_RELAY_BIN, binaryArgs, brokerName, env = process.env, preferConnect = false, onStderr, onStep, } = options;
|
|
4
17
|
if (preferConnect) {
|
|
@@ -23,6 +36,27 @@ export async function createRuntimeClient(options) {
|
|
|
23
36
|
});
|
|
24
37
|
}
|
|
25
38
|
export async function spawnAgentWithClient(client, options) {
|
|
26
|
-
|
|
39
|
+
const runtime = resolvedSpawnRuntime(options);
|
|
40
|
+
if (runtime === 'pty') {
|
|
41
|
+
const { runtime: _runtime, ...ptyOptions } = options;
|
|
42
|
+
await client.spawnPty(ptyOptions);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (options.spawnMode && options.spawnMode !== 'interactive') {
|
|
46
|
+
throw new Error('Native harnesses currently support only interactive spawn mode');
|
|
47
|
+
}
|
|
48
|
+
if (options.exitAfterTask) {
|
|
49
|
+
throw new Error('Native harnesses do not currently support --exit-after-task');
|
|
50
|
+
}
|
|
51
|
+
const launch = createNativeHarnessLaunch(options.cli, {
|
|
52
|
+
runtime: 'native',
|
|
53
|
+
name: options.name,
|
|
54
|
+
channels: options.channels,
|
|
55
|
+
task: options.task,
|
|
56
|
+
model: options.model,
|
|
57
|
+
cwd: options.cwd,
|
|
58
|
+
}, nativeSidecarLaunch());
|
|
59
|
+
const { transport: _transport, ...headlessInput } = launch;
|
|
60
|
+
await client.spawnHeadless(headlessInput);
|
|
27
61
|
}
|
|
28
62
|
//# sourceMappingURL=client-factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-factory.js","sourceRoot":"","sources":["../../../src/cli/lib/client-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAuB,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"client-factory.js","sourceRoot":"","sources":["../../../src/cli/lib/client-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAuB,MAAM,6BAA6B,CAAC;AACvF,OAAO,EACL,yBAAyB,EACzB,qBAAqB,GAGtB,MAAM,wBAAwB,CAAC;AAiChC,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAElD,6FAA6F;AAC7F,MAAM,UAAU,mBAAmB,CACjC,OAA0B,OAAO,CAAC,IAAI,EACtC,QAAQ,GAAG,OAAO,CAAC,QAAQ;IAE3B,MAA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+
/** Fail before CLI initialization when Relay is run on an unsupported Node release. */
|
|
3
|
+
export function assertSupportedNodeVersion(version = process.versions.node) {
|
|
4
|
+
const major = Number.parseInt(version.split('.')[0] ?? '', 10);
|
|
5
|
+
if (!Number.isInteger(major) || major < MINIMUM_NODE_MAJOR) {
|
|
6
|
+
throw new Error(`Agent Relay requires Node.js ${MINIMUM_NODE_MAJOR} or newer (found ${version}). Upgrade Node.js before running agent-relay.`);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=node-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-version.js","sourceRoot":"","sources":["../../../src/cli/lib/node-version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAErC,uFAAuF;AACvF,MAAM,UAAU,0BAA0B,CAAC,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI;IACxE,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/D,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,kBAAkB,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CACb,gCAAgC,kBAAkB,oBAAoB,OAAO,gDAAgD,CAC9H,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function projectWorkspaceKeyPath(dataDir: string): string;
|
|
3
|
-
/**
|
|
4
|
-
* Read the workspace key recorded for this project's data dir. A missing or
|
|
5
|
-
* malformed file (or a blank key) reads as `undefined` — the caller falls
|
|
6
|
-
* through to the next resolution source rather than failing.
|
|
7
|
-
*/
|
|
8
|
-
export declare function readProjectWorkspaceKey(dataDir: string): string | undefined;
|
|
9
|
-
/**
|
|
10
|
-
* Persist the workspace key for this project's data dir with owner-only
|
|
11
|
-
* permissions (matching `connection.json`). A blank key is ignored so a broker
|
|
12
|
-
* that never resolved a key does not clobber a previously recorded one.
|
|
13
|
-
*
|
|
14
|
-
* The write is atomic and symlink-safe: the payload is written to a fresh,
|
|
15
|
-
* exclusively-created temp file (so a pre-planted symlink at the temp path
|
|
16
|
-
* cannot redirect it) and then `rename`d over the destination. `rename` never
|
|
17
|
-
* follows a symlink at the destination and is atomic on POSIX, so a concurrent
|
|
18
|
-
* reader sees either the old or the new complete file — never a truncated one,
|
|
19
|
-
* and never an attacker-chosen target.
|
|
20
|
-
*/
|
|
21
|
-
export declare function writeProjectWorkspaceKey(dataDir: string, workspaceKey: string | undefined): void;
|
|
1
|
+
export { projectWorkspaceKeyPath, readProjectWorkspaceKey, writeProjectWorkspaceKey, } from '@agent-relay/cloud/workspace-key';
|
|
22
2
|
//# sourceMappingURL=project-workspace-key.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-workspace-key.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/project-workspace-key.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project-workspace-key.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/project-workspace-key.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,kCAAkC,CAAC"}
|
|
@@ -1,84 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Project-local record of the workspace key the broker in this directory was
|
|
5
|
-
* started with. `agent-relay up` writes it into the project data dir
|
|
6
|
-
* (`.agentworkforce/relay/`, the same git-excluded directory that holds
|
|
7
|
-
* `connection.json`) so that later SDK-backed commands run in the same CWD
|
|
8
|
-
* (`fleet nodes`, `node …`, etc.) resolve the workspace the local broker
|
|
9
|
-
* actually joined — rather than falling through to the machine-global active
|
|
10
|
-
* workspace, which may point at a different workspace.
|
|
11
|
-
*/
|
|
12
|
-
const PROJECT_WORKSPACE_KEY_FILENAME = 'workspace-key.json';
|
|
13
|
-
/** Absolute path to the project-local workspace-key file within `dataDir`. */
|
|
14
|
-
export function projectWorkspaceKeyPath(dataDir) {
|
|
15
|
-
return path.join(dataDir, PROJECT_WORKSPACE_KEY_FILENAME);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Read the workspace key recorded for this project's data dir. A missing or
|
|
19
|
-
* malformed file (or a blank key) reads as `undefined` — the caller falls
|
|
20
|
-
* through to the next resolution source rather than failing.
|
|
21
|
-
*/
|
|
22
|
-
export function readProjectWorkspaceKey(dataDir) {
|
|
23
|
-
try {
|
|
24
|
-
const raw = fs.readFileSync(projectWorkspaceKeyPath(dataDir), 'utf-8');
|
|
25
|
-
const parsed = JSON.parse(raw);
|
|
26
|
-
const key = typeof parsed.workspaceKey === 'string' ? parsed.workspaceKey.trim() : '';
|
|
27
|
-
return key || undefined;
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
return undefined;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Persist the workspace key for this project's data dir with owner-only
|
|
35
|
-
* permissions (matching `connection.json`). A blank key is ignored so a broker
|
|
36
|
-
* that never resolved a key does not clobber a previously recorded one.
|
|
37
|
-
*
|
|
38
|
-
* The write is atomic and symlink-safe: the payload is written to a fresh,
|
|
39
|
-
* exclusively-created temp file (so a pre-planted symlink at the temp path
|
|
40
|
-
* cannot redirect it) and then `rename`d over the destination. `rename` never
|
|
41
|
-
* follows a symlink at the destination and is atomic on POSIX, so a concurrent
|
|
42
|
-
* reader sees either the old or the new complete file — never a truncated one,
|
|
43
|
-
* and never an attacker-chosen target.
|
|
44
|
-
*/
|
|
45
|
-
export function writeProjectWorkspaceKey(dataDir, workspaceKey) {
|
|
46
|
-
const key = workspaceKey?.trim();
|
|
47
|
-
if (!key)
|
|
48
|
-
return;
|
|
49
|
-
fs.mkdirSync(dataDir, { recursive: true, mode: 0o700 });
|
|
50
|
-
const file = projectWorkspaceKeyPath(dataDir);
|
|
51
|
-
const tmp = `${file}.tmp.${process.pid}`;
|
|
52
|
-
const payload = { workspaceKey: key };
|
|
53
|
-
const data = `${JSON.stringify(payload, null, 2)}\n`;
|
|
54
|
-
// 'wx' == O_CREAT | O_EXCL: create a brand-new regular file, failing (rather
|
|
55
|
-
// than following a symlink or truncating an existing file) if anything is
|
|
56
|
-
// already at the temp path. A stale temp from a crashed run is removed first.
|
|
57
|
-
let fd;
|
|
58
|
-
try {
|
|
59
|
-
fd = fs.openSync(tmp, 'wx', 0o600);
|
|
60
|
-
}
|
|
61
|
-
catch (err) {
|
|
62
|
-
if (err.code !== 'EEXIST')
|
|
63
|
-
throw err;
|
|
64
|
-
fs.rmSync(tmp, { force: true });
|
|
65
|
-
fd = fs.openSync(tmp, 'wx', 0o600);
|
|
66
|
-
}
|
|
67
|
-
try {
|
|
68
|
-
try {
|
|
69
|
-
fs.writeSync(fd, data);
|
|
70
|
-
}
|
|
71
|
-
finally {
|
|
72
|
-
fs.closeSync(fd);
|
|
73
|
-
}
|
|
74
|
-
// openSync's mode is masked by umask; enforce owner-only before publishing.
|
|
75
|
-
fs.chmodSync(tmp, 0o600);
|
|
76
|
-
fs.renameSync(tmp, file);
|
|
77
|
-
}
|
|
78
|
-
catch (err) {
|
|
79
|
-
// Never leave a partial temp file behind, whichever step failed.
|
|
80
|
-
fs.rmSync(tmp, { force: true });
|
|
81
|
-
throw err;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
1
|
+
// Compatibility re-export for existing CLI-local imports. The public cloud
|
|
2
|
+
// package owns this contract so SDK consumers and the CLI cannot drift.
|
|
3
|
+
export { projectWorkspaceKeyPath, readProjectWorkspaceKey, writeProjectWorkspaceKey, } from '@agent-relay/cloud/workspace-key';
|
|
84
4
|
//# sourceMappingURL=project-workspace-key.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-workspace-key.js","sourceRoot":"","sources":["../../../src/cli/lib/project-workspace-key.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"project-workspace-key.js","sourceRoot":"","sources":["../../../src/cli/lib/project-workspace-key.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,wEAAwE;AACxE,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,kCAAkC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AgentRelay, type AgentRelayAgent } from '@agent-relay/sdk';
|
|
2
|
+
import { type WorkspaceKeySource } from '@agent-relay/cloud/workspace-key';
|
|
2
3
|
/** Options shared by the SDK-backed (Relaycast) CLI command groups. */
|
|
3
4
|
export interface SdkClientOptions {
|
|
4
5
|
workspaceKey?: string;
|
|
@@ -7,7 +8,7 @@ export interface SdkClientOptions {
|
|
|
7
8
|
env?: NodeJS.ProcessEnv;
|
|
8
9
|
}
|
|
9
10
|
/** Where a resolved workspace key came from, in precedence order. */
|
|
10
|
-
export type WorkspaceKeySource
|
|
11
|
+
export type { WorkspaceKeySource };
|
|
11
12
|
/**
|
|
12
13
|
* Resolve the workspace key and report which source it came from. Precedence:
|
|
13
14
|
* explicit flag → `RELAY_WORKSPACE_KEY`/`RELAY_API_KEY` env → the key the local
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-client.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/sdk-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"sdk-client.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/sdk-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,kCAAkC,CAAC;AAE1C,uEAAuE;AACvE,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAWD,qEAAqE;AACrE,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,GAAE,gBAAqB,GAAG;IAC7E,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,kBAAkB,CAAC;CAC5B,CASA;AAED,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,gBAAqB,GAAG,MAAM,CAE1E;AAED,wBAAgB,cAAc,CAAC,OAAO,GAAE,gBAAqB,GAAG,MAAM,GAAG,SAAS,CAEjF;AAED,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,gBAAqB,GAAG,MAAM,GAAG,SAAS,CAEpF;AAED,gDAAgD;AAChD,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,gBAAqB,GAAG,UAAU,CAE/E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,gBAAqB,GAAG,eAAe,CAOhF"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { AgentRelay } from '@agent-relay/sdk';
|
|
2
|
-
import {
|
|
3
|
-
import { activeWorkspaceKey } from './workspace-store.js';
|
|
4
|
-
import { readProjectWorkspaceKey } from './project-workspace-key.js';
|
|
2
|
+
import { resolveWorkspaceKeyWithSource as resolveCloudWorkspaceKeyWithSource, } from '@agent-relay/cloud/workspace-key';
|
|
5
3
|
function env(options) {
|
|
6
4
|
return options.env ?? process.env;
|
|
7
5
|
}
|
|
@@ -17,37 +15,17 @@ function trimOrUndefined(value) {
|
|
|
17
15
|
* project broker rather than named explicitly.
|
|
18
16
|
*/
|
|
19
17
|
export function resolveWorkspaceKeyWithSource(options = {}) {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return { key: envKey, source: 'env' };
|
|
27
|
-
const project = trimOrUndefined(projectWorkspaceKey());
|
|
28
|
-
if (project)
|
|
29
|
-
return { key: project, source: 'project' };
|
|
30
|
-
const store = trimOrUndefined(activeWorkspaceKey(e));
|
|
31
|
-
if (store)
|
|
32
|
-
return { key: store, source: 'store' };
|
|
18
|
+
const resolved = resolveCloudWorkspaceKeyWithSource({
|
|
19
|
+
workspaceKey: options.workspaceKey,
|
|
20
|
+
env: env(options),
|
|
21
|
+
});
|
|
22
|
+
if (resolved)
|
|
23
|
+
return resolved;
|
|
33
24
|
throw new Error('No workspace key found. Pass --workspace-key, set RELAY_WORKSPACE_KEY, or run `relay workspace set_key <name> <key>`.');
|
|
34
25
|
}
|
|
35
26
|
export function resolveWorkspaceKey(options = {}) {
|
|
36
27
|
return resolveWorkspaceKeyWithSource(options).key;
|
|
37
28
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Read the workspace key recorded by `relay up` for the current project
|
|
40
|
-
* directory, or `undefined` when there is none / the project root cannot be
|
|
41
|
-
* resolved. Never throws — a resolution failure just falls through.
|
|
42
|
-
*/
|
|
43
|
-
function projectWorkspaceKey() {
|
|
44
|
-
try {
|
|
45
|
-
return readProjectWorkspaceKey(getProjectPaths().dataDir);
|
|
46
|
-
}
|
|
47
|
-
catch {
|
|
48
|
-
return undefined;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
29
|
export function resolveBaseUrl(options = {}) {
|
|
52
30
|
return trimOrUndefined(options.baseUrl) ?? trimOrUndefined(env(options).RELAY_BASE_URL);
|
|
53
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-client.js","sourceRoot":"","sources":["../../../src/cli/lib/sdk-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwB,MAAM,kBAAkB,CAAC;AACpE,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