agent-relay 3.2.17 → 3.2.21
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/bin/agent-relay-broker-darwin-arm64 +0 -0
- package/bin/agent-relay-broker-darwin-x64 +0 -0
- package/bin/agent-relay-broker-linux-arm64 +0 -0
- package/bin/agent-relay-broker-linux-x64 +0 -0
- package/dist/index.cjs +86 -43
- package/dist/src/cli/commands/cloud.d.ts +1 -9
- package/dist/src/cli/commands/cloud.d.ts.map +1 -1
- package/dist/src/cli/commands/cloud.js +326 -323
- package/dist/src/cli/commands/cloud.js.map +1 -1
- package/dist/src/cli/commands/connect.d.ts.map +1 -1
- package/dist/src/cli/commands/connect.js +6 -10
- package/dist/src/cli/commands/connect.js.map +1 -1
- package/package.json +16 -10
- package/packages/acp-bridge/package.json +2 -2
- package/packages/brand/README.md +36 -0
- package/packages/brand/brand.css +226 -0
- package/packages/brand/package.json +20 -0
- package/packages/cloud/dist/api-client.d.ts +33 -0
- package/packages/cloud/dist/api-client.d.ts.map +1 -0
- package/packages/cloud/dist/api-client.js +123 -0
- package/packages/cloud/dist/api-client.js.map +1 -0
- package/packages/cloud/dist/auth.d.ts +13 -0
- package/packages/cloud/dist/auth.d.ts.map +1 -0
- package/packages/cloud/dist/auth.js +248 -0
- package/packages/cloud/dist/auth.js.map +1 -0
- package/packages/cloud/dist/index.d.ts +5 -0
- package/packages/cloud/dist/index.d.ts.map +1 -0
- package/packages/cloud/dist/index.js +5 -0
- package/packages/cloud/dist/index.js.map +1 -0
- package/packages/cloud/dist/types.d.ts +73 -0
- package/packages/cloud/dist/types.d.ts.map +1 -0
- package/packages/cloud/dist/types.js +19 -0
- package/packages/cloud/dist/types.js.map +1 -0
- package/packages/cloud/dist/workflows.d.ts +34 -0
- package/packages/cloud/dist/workflows.d.ts.map +1 -0
- package/packages/cloud/dist/workflows.js +389 -0
- package/packages/cloud/dist/workflows.js.map +1 -0
- package/packages/cloud/package.json +44 -0
- package/packages/cloud/src/api-client.ts +169 -0
- package/packages/cloud/src/auth.ts +314 -0
- package/packages/cloud/src/index.ts +41 -0
- package/packages/cloud/src/types.ts +97 -0
- package/packages/cloud/src/workflows.ts +539 -0
- package/packages/cloud/tsconfig.json +21 -0
- package/packages/config/package.json +1 -1
- package/packages/hooks/package.json +4 -4
- package/packages/memory/package.json +2 -2
- package/packages/openclaw/package.json +2 -2
- package/packages/policy/package.json +2 -2
- package/packages/sdk/dist/workflows/__tests__/e2big-and-verify.test.d.ts +2 -0
- package/packages/sdk/dist/workflows/__tests__/e2big-and-verify.test.d.ts.map +1 -0
- package/packages/sdk/dist/workflows/__tests__/e2big-and-verify.test.js +62 -0
- package/packages/sdk/dist/workflows/__tests__/e2big-and-verify.test.js.map +1 -0
- package/packages/sdk/dist/workflows/runner.d.ts +4 -0
- package/packages/sdk/dist/workflows/runner.d.ts.map +1 -1
- package/packages/sdk/dist/workflows/runner.js +76 -39
- package/packages/sdk/dist/workflows/runner.js.map +1 -1
- package/packages/sdk/package.json +2 -2
- package/packages/sdk/src/__tests__/workflow-runner.test.ts +73 -2
- package/packages/sdk/src/workflows/__tests__/e2big-and-verify.test.ts +117 -0
- package/packages/sdk/src/workflows/runner.ts +105 -38
- package/packages/sdk-py/pyproject.toml +1 -1
- package/packages/sdk-swift/Sources/AgentRelaySDK/RelayObserver.swift +2 -0
- 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/package.json +2 -2
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.cjs
CHANGED
|
@@ -9318,11 +9318,11 @@ __export(base_exports, {
|
|
|
9318
9318
|
setCwd: () => setCwd,
|
|
9319
9319
|
synchronizedOutput: () => synchronizedOutput
|
|
9320
9320
|
});
|
|
9321
|
-
var import_node_process,
|
|
9321
|
+
var import_node_process, import_node_os9, ESC, OSC, BEL, SEP, isTerminalApp, isWindows2, isTmux, cwdFunction, wrapOsc, cursorTo, cursorMove, cursorUp, cursorDown, cursorForward, cursorBackward, cursorLeft, cursorSavePosition, cursorRestorePosition, cursorGetPosition, cursorNextLine, cursorPrevLine, cursorHide, cursorShow, eraseLines, eraseEndLine, eraseStartLine, eraseLine, eraseDown, eraseUp, eraseScreen, scrollUp, scrollDown, clearScreen, clearViewport, isOldWindows, clearTerminal, enterAlternativeScreen, exitAlternativeScreen, beginSynchronizedOutput, endSynchronizedOutput, synchronizedOutput, beep, link, image, iTerm, ConEmu, setCwd;
|
|
9322
9322
|
var init_base = __esm({
|
|
9323
9323
|
"node_modules/ansi-escapes/base.js"() {
|
|
9324
9324
|
import_node_process = __toESM(require("node:process"), 1);
|
|
9325
|
-
|
|
9325
|
+
import_node_os9 = __toESM(require("node:os"), 1);
|
|
9326
9326
|
init_environment();
|
|
9327
9327
|
ESC = "\x1B[";
|
|
9328
9328
|
OSC = "\x1B]";
|
|
@@ -9402,7 +9402,7 @@ var init_base = __esm({
|
|
|
9402
9402
|
if (isBrowser || !isWindows2) {
|
|
9403
9403
|
return false;
|
|
9404
9404
|
}
|
|
9405
|
-
const parts =
|
|
9405
|
+
const parts = import_node_os9.default.release().split(".");
|
|
9406
9406
|
const major = Number(parts[0]);
|
|
9407
9407
|
const build = Number(parts[2] ?? 0);
|
|
9408
9408
|
if (major < 10) {
|
|
@@ -41321,6 +41321,7 @@ var import_node_child_process4 = require("node:child_process");
|
|
|
41321
41321
|
var import_node_crypto5 = require("node:crypto");
|
|
41322
41322
|
var import_node_fs9 = require("node:fs");
|
|
41323
41323
|
var import_promises5 = require("node:fs/promises");
|
|
41324
|
+
var import_node_os8 = require("node:os");
|
|
41324
41325
|
var import_node_path12 = __toESM(require("node:path"), 1);
|
|
41325
41326
|
var import_chalk = __toESM(require_source(), 1);
|
|
41326
41327
|
var import_yaml2 = __toESM(require_dist(), 1);
|
|
@@ -43465,6 +43466,8 @@ var WorkflowRunner = class _WorkflowRunner {
|
|
|
43465
43466
|
activeReviewers = /* @__PURE__ */ new Map();
|
|
43466
43467
|
/** Structured CLI session reports captured during the current run, keyed by step name. */
|
|
43467
43468
|
agentReports = /* @__PURE__ */ new Map();
|
|
43469
|
+
static PTY_TASK_ARG_SIZE_LIMIT = 2 * 1024 * 1024;
|
|
43470
|
+
// 2 MB
|
|
43468
43471
|
constructor(options = {}) {
|
|
43469
43472
|
this.db = options.db ?? new InMemoryWorkflowDb();
|
|
43470
43473
|
this.workspaceId = options.workspaceId ?? "local";
|
|
@@ -45887,6 +45890,7 @@ ${resolvedTask}`;
|
|
|
45887
45890
|
let ownerOutput;
|
|
45888
45891
|
let ownerElapsed;
|
|
45889
45892
|
let completionReason;
|
|
45893
|
+
let promptTaskText;
|
|
45890
45894
|
if (usesDedicatedOwner) {
|
|
45891
45895
|
const result = await this.executeSupervisedAgentStep(step, { specialist: effectiveSpecialist, owner: effectiveOwner, reviewer: reviewDef }, resolvedTask, timeoutMs);
|
|
45892
45896
|
specialistOutput = result.specialistOutput;
|
|
@@ -45919,13 +45923,14 @@ ${resolvedTask}`;
|
|
|
45919
45923
|
} : void 0
|
|
45920
45924
|
});
|
|
45921
45925
|
const output = typeof spawnResult === "string" ? spawnResult : spawnResult.output;
|
|
45926
|
+
promptTaskText = typeof spawnResult === "string" ? effectiveOwner.interactive === false ? void 0 : ownerTask : spawnResult.promptTaskText ?? ownerTask;
|
|
45922
45927
|
lastExitCode = typeof spawnResult === "string" ? void 0 : spawnResult.exitCode;
|
|
45923
45928
|
lastExitSignal = typeof spawnResult === "string" ? void 0 : spawnResult.exitSignal;
|
|
45924
45929
|
ownerElapsed = Date.now() - ownerStartTime;
|
|
45925
45930
|
this.log(`[${step.name}] Owner "${effectiveOwner.name}" exited`);
|
|
45926
45931
|
if (usesOwnerFlow) {
|
|
45927
45932
|
try {
|
|
45928
|
-
const completionDecision = this.resolveOwnerCompletionDecision(step, output, output, ownerTask,
|
|
45933
|
+
const completionDecision = this.resolveOwnerCompletionDecision(step, output, output, promptTaskText ?? ownerTask, promptTaskText ?? ownerTask);
|
|
45929
45934
|
completionReason = completionDecision.completionReason;
|
|
45930
45935
|
} catch (error48) {
|
|
45931
45936
|
const canUseVerificationFallback = !usesDedicatedOwner && step.verification && error48 instanceof WorkflowCompletionError && error48.completionReason === "failed_no_evidence";
|
|
@@ -45950,7 +45955,7 @@ ${resolvedTask}`;
|
|
|
45950
45955
|
}
|
|
45951
45956
|
}
|
|
45952
45957
|
if (step.verification && (!usesOwnerFlow || !usesDedicatedOwner) && !completionReason) {
|
|
45953
|
-
const verificationResult = this.runVerification(step.verification, specialistOutput, step.name,
|
|
45958
|
+
const verificationResult = this.runVerification(step.verification, specialistOutput, step.name, promptTaskText);
|
|
45954
45959
|
completionReason = verificationResult.completionReason;
|
|
45955
45960
|
}
|
|
45956
45961
|
if (completionReason === "retry_requested_by_owner") {
|
|
@@ -46186,7 +46191,7 @@ WORKER COMPLETION CONTRACT:
|
|
|
46186
46191
|
detail: `Worker ${workerRuntimeName} exited`,
|
|
46187
46192
|
raw: { worker: workerRuntimeName, exitCode: result.exitCode, exitSignal: result.exitSignal }
|
|
46188
46193
|
});
|
|
46189
|
-
if (step.verification?.type === "output_contains" && result.output
|
|
46194
|
+
if (step.verification?.type === "output_contains" && this.outputContainsVerificationToken(result.output, step.verification.value, result.promptTaskText)) {
|
|
46190
46195
|
this.log(`[${step.name}] Verification gate observed: output contains ${JSON.stringify(step.verification.value)}`);
|
|
46191
46196
|
}
|
|
46192
46197
|
}).catch((error48) => {
|
|
@@ -46228,8 +46233,9 @@ WORKER COMPLETION CONTRACT:
|
|
|
46228
46233
|
const ownerElapsed = Date.now() - ownerStartTime;
|
|
46229
46234
|
const ownerOutput = ownerResultObj.output;
|
|
46230
46235
|
this.log(`[${step.name}] Owner "${supervised.owner.name}" exited`);
|
|
46231
|
-
const
|
|
46232
|
-
const
|
|
46236
|
+
const workerResultObj = await workerPromise;
|
|
46237
|
+
const specialistOutput = workerResultObj.output;
|
|
46238
|
+
const completionDecision = this.resolveOwnerCompletionDecision(step, ownerOutput, specialistOutput, ownerResultObj.promptTaskText ?? supervisorTask, workerResultObj.promptTaskText ?? specialistTask);
|
|
46233
46239
|
return {
|
|
46234
46240
|
specialistOutput,
|
|
46235
46241
|
ownerOutput,
|
|
@@ -46417,6 +46423,10 @@ WORKER COMPLETION CONTRACT:
|
|
|
46417
46423
|
}
|
|
46418
46424
|
hasOwnerCompletionMarker(step, output, injectedTaskText) {
|
|
46419
46425
|
const marker = `STEP_COMPLETE:${step.name}`;
|
|
46426
|
+
const strippedOutput = this.stripInjectedTaskEcho(output, injectedTaskText);
|
|
46427
|
+
if (strippedOutput.includes(marker)) {
|
|
46428
|
+
return true;
|
|
46429
|
+
}
|
|
46420
46430
|
const taskHasMarker = injectedTaskText.includes(marker);
|
|
46421
46431
|
const first = output.indexOf(marker);
|
|
46422
46432
|
if (first === -1) {
|
|
@@ -46463,6 +46473,49 @@ WORKER COMPLETION CONTRACT:
|
|
|
46463
46473
|
stripEchoedPromptLines(output, patterns) {
|
|
46464
46474
|
return output.split("\n").map((line) => line.trim()).filter(Boolean).filter((line) => patterns.every((pattern) => !pattern.test(line))).join("\n");
|
|
46465
46475
|
}
|
|
46476
|
+
stripInjectedTaskEcho(output, injectedTaskText) {
|
|
46477
|
+
if (!injectedTaskText) {
|
|
46478
|
+
return output;
|
|
46479
|
+
}
|
|
46480
|
+
const candidates = [
|
|
46481
|
+
injectedTaskText,
|
|
46482
|
+
injectedTaskText.replace(/\r\n/g, "\n"),
|
|
46483
|
+
injectedTaskText.replace(/\n/g, "\r\n")
|
|
46484
|
+
].filter((candidate, index, all) => candidate.length > 0 && all.indexOf(candidate) === index);
|
|
46485
|
+
for (const candidate of candidates) {
|
|
46486
|
+
const start = output.indexOf(candidate);
|
|
46487
|
+
if (start !== -1) {
|
|
46488
|
+
return output.slice(0, start) + output.slice(start + candidate.length);
|
|
46489
|
+
}
|
|
46490
|
+
}
|
|
46491
|
+
return output;
|
|
46492
|
+
}
|
|
46493
|
+
outputContainsVerificationToken(output, token, injectedTaskText) {
|
|
46494
|
+
if (!token) {
|
|
46495
|
+
return false;
|
|
46496
|
+
}
|
|
46497
|
+
return this.stripInjectedTaskEcho(output, injectedTaskText).includes(token);
|
|
46498
|
+
}
|
|
46499
|
+
prepareInteractiveSpawnTask(agentName, taskText) {
|
|
46500
|
+
if (Buffer.byteLength(taskText, "utf8") <= _WorkflowRunner.PTY_TASK_ARG_SIZE_LIMIT) {
|
|
46501
|
+
return {
|
|
46502
|
+
spawnTaskText: taskText,
|
|
46503
|
+
promptTaskText: taskText
|
|
46504
|
+
};
|
|
46505
|
+
}
|
|
46506
|
+
const taskTmpDir = (0, import_node_fs9.mkdtempSync)(import_node_path12.default.join((0, import_node_os8.tmpdir)(), "relay-pty-task-"));
|
|
46507
|
+
const taskTmpFile = import_node_path12.default.join(taskTmpDir, `${agentName}-${Date.now()}.txt`);
|
|
46508
|
+
(0, import_node_fs9.writeFileSync)(taskTmpFile, taskText, { encoding: "utf8", mode: 384, flag: "wx" });
|
|
46509
|
+
const promptTaskText = `TASK_FILE:${taskTmpFile}
|
|
46510
|
+
Read that file completely before taking any action.
|
|
46511
|
+
Treat the file contents as the full workflow task and follow them exactly.
|
|
46512
|
+
Do not ask for the task again.`;
|
|
46513
|
+
return {
|
|
46514
|
+
spawnTaskText: promptTaskText,
|
|
46515
|
+
promptTaskText,
|
|
46516
|
+
taskTmpFile
|
|
46517
|
+
};
|
|
46518
|
+
}
|
|
46466
46519
|
firstMeaningfulLine(output) {
|
|
46467
46520
|
return output.split("\n").map((line) => line.trim()).find(Boolean);
|
|
46468
46521
|
}
|
|
@@ -47000,6 +47053,7 @@ DO NOT:
|
|
|
47000
47053
|
const delegationGuidance = isHub || !isHubPattern ? this.buildDelegationGuidance(agentDef.cli, timeoutMs) : "";
|
|
47001
47054
|
const relayRegistrationNote = this.buildRelayRegistrationNote(agentDef.cli, agentName);
|
|
47002
47055
|
const taskWithExit = step.task + (relayRegistrationNote ? "\n\n" + relayRegistrationNote : "") + (delegationGuidance ? "\n\n" + delegationGuidance + "\n" : "") + '\n\n---\nIMPORTANT: When you have fully completed this task, you MUST self-terminate by either: (a) calling remove_agent(name: "<your-agent-name>", reason: "task completed") \u2014 preferred, or (b) outputting the exact text "/exit" on its own line as a fallback. Do not wait for further input \u2014 terminate immediately after finishing. Do NOT spawn sub-agents unless the task explicitly requires it.';
|
|
47056
|
+
const preparedTask = this.prepareInteractiveSpawnTask(agentName, taskWithExit);
|
|
47003
47057
|
this.ptyOutputBuffers.set(agentName, []);
|
|
47004
47058
|
const logsDir = this.getWorkerLogsDir();
|
|
47005
47059
|
const logStream = (0, import_node_fs9.createWriteStream)(import_node_path12.default.join(logsDir, `${agentName}.log`), { flags: "a" });
|
|
@@ -47029,7 +47083,7 @@ DO NOT:
|
|
|
47029
47083
|
model: agentDef.constraints?.model,
|
|
47030
47084
|
args: interactiveSpawnPolicy.args,
|
|
47031
47085
|
channels: agentChannels,
|
|
47032
|
-
task:
|
|
47086
|
+
task: preparedTask.spawnTaskText,
|
|
47033
47087
|
idleThresholdSecs: agentDef.constraints?.idleThresholdSecs,
|
|
47034
47088
|
cwd: agentCwd
|
|
47035
47089
|
});
|
|
@@ -47097,13 +47151,13 @@ DO NOT:
|
|
|
47097
47151
|
}
|
|
47098
47152
|
this.log(`[${step.name}] Assigned to ${agent.name}`);
|
|
47099
47153
|
this.activeAgentHandles.set(agentName, agent);
|
|
47100
|
-
exitResult = await this.waitForExitWithIdleNudging(agent, agentDef, step, timeoutMs, options.preserveOnIdle ?? this.shouldPreserveIdleSupervisor(agentDef, step, options.evidenceRole));
|
|
47154
|
+
exitResult = await this.waitForExitWithIdleNudging(agent, agentDef, step, timeoutMs, preparedTask.promptTaskText, options.preserveOnIdle ?? this.shouldPreserveIdleSupervisor(agentDef, step, options.evidenceRole));
|
|
47101
47155
|
stopHeartbeat?.();
|
|
47102
47156
|
if (exitResult === "timeout") {
|
|
47103
47157
|
let timeoutRecovered = false;
|
|
47104
47158
|
if (step.verification) {
|
|
47105
47159
|
const ptyOutput = (this.ptyOutputBuffers.get(agentName) ?? []).join("");
|
|
47106
|
-
const verificationResult = this.runVerification(step.verification, ptyOutput, step.name,
|
|
47160
|
+
const verificationResult = this.runVerification(step.verification, ptyOutput, step.name, preparedTask.promptTaskText, { allowFailure: true });
|
|
47107
47161
|
if (verificationResult.passed) {
|
|
47108
47162
|
this.log(`[${step.name}] Agent timed out but verification passed \u2014 treating as complete`);
|
|
47109
47163
|
this.postToChannel(`**[${step.name}]** Agent idle after completing work \u2014 verification passed, releasing`);
|
|
@@ -47147,6 +47201,9 @@ DO NOT:
|
|
|
47147
47201
|
this.unregisterWorker(agentName);
|
|
47148
47202
|
this.supervisedRuntimeAgents.delete(agentName);
|
|
47149
47203
|
this.runtimeStepAgents.delete(agentName);
|
|
47204
|
+
if (preparedTask.taskTmpFile) {
|
|
47205
|
+
await (0, import_promises5.unlink)(preparedTask.taskTmpFile).catch(() => void 0);
|
|
47206
|
+
}
|
|
47150
47207
|
}
|
|
47151
47208
|
let output;
|
|
47152
47209
|
if (ptyChunks.length > 0) {
|
|
@@ -47165,7 +47222,8 @@ DO NOT:
|
|
|
47165
47222
|
return {
|
|
47166
47223
|
output,
|
|
47167
47224
|
exitCode: agent?.exitCode,
|
|
47168
|
-
exitSignal: agent?.exitSignal
|
|
47225
|
+
exitSignal: agent?.exitSignal,
|
|
47226
|
+
promptTaskText: preparedTask.promptTaskText
|
|
47169
47227
|
};
|
|
47170
47228
|
}
|
|
47171
47229
|
// ── Idle nudging ────────────────────────────────────────────────────────
|
|
@@ -47210,7 +47268,7 @@ DO NOT:
|
|
|
47210
47268
|
* Wait for agent exit with idle detection and nudging.
|
|
47211
47269
|
* If no idle nudge config is set, falls through to simple waitForExit.
|
|
47212
47270
|
*/
|
|
47213
|
-
async waitForExitWithIdleNudging(agent, agentDef, step, timeoutMs, preserveIdleSupervisor = false) {
|
|
47271
|
+
async waitForExitWithIdleNudging(agent, agentDef, step, timeoutMs, promptTaskText, preserveIdleSupervisor = false) {
|
|
47214
47272
|
const nudgeConfig = this.currentConfig?.swarm.idleNudge;
|
|
47215
47273
|
if (!nudgeConfig) {
|
|
47216
47274
|
if (preserveIdleSupervisor) {
|
|
@@ -47232,15 +47290,7 @@ DO NOT:
|
|
|
47232
47290
|
if (step.verification && step.verification.type === "output_contains") {
|
|
47233
47291
|
const token = step.verification.value;
|
|
47234
47292
|
const ptyOutput = (this.ptyOutputBuffers.get(agent.name) ?? []).join("");
|
|
47235
|
-
const
|
|
47236
|
-
const taskHasToken = taskText.includes(token);
|
|
47237
|
-
let verificationPassed = true;
|
|
47238
|
-
if (taskHasToken) {
|
|
47239
|
-
const first = ptyOutput.indexOf(token);
|
|
47240
|
-
verificationPassed = first !== -1 && ptyOutput.includes(token, first + token.length);
|
|
47241
|
-
} else {
|
|
47242
|
-
verificationPassed = ptyOutput.includes(token);
|
|
47243
|
-
}
|
|
47293
|
+
const verificationPassed = this.outputContainsVerificationToken(ptyOutput, token, promptTaskText);
|
|
47244
47294
|
if (!verificationPassed) {
|
|
47245
47295
|
this.log(`[${step.name}] Agent "${agent.name}" went idle but verification not yet passed \u2014 waiting for more output`);
|
|
47246
47296
|
const idleGraceSecs = 15;
|
|
@@ -47389,14 +47439,7 @@ DO NOT:
|
|
|
47389
47439
|
switch (check2.type) {
|
|
47390
47440
|
case "output_contains": {
|
|
47391
47441
|
const token = check2.value;
|
|
47392
|
-
|
|
47393
|
-
if (taskHasToken) {
|
|
47394
|
-
const first = output.indexOf(token);
|
|
47395
|
-
const hasSecond = first !== -1 && output.includes(token, first + token.length);
|
|
47396
|
-
if (!hasSecond) {
|
|
47397
|
-
return fail(`Verification failed for "${stepName}": output does not contain "${token}" (token found only in task injection \u2014 agent must output it explicitly)`);
|
|
47398
|
-
}
|
|
47399
|
-
} else if (!output.includes(token)) {
|
|
47442
|
+
if (!this.outputContainsVerificationToken(output, token, injectedTaskText)) {
|
|
47400
47443
|
return fail(`Verification failed for "${stepName}": output does not contain "${token}"`);
|
|
47401
47444
|
}
|
|
47402
47445
|
break;
|
|
@@ -50487,13 +50530,13 @@ function getRepoFullNameFromPath(workingDirectory) {
|
|
|
50487
50530
|
var import_node_fs14 = __toESM(require("node:fs"), 1);
|
|
50488
50531
|
var import_node_path16 = __toESM(require("node:path"), 1);
|
|
50489
50532
|
var import_node_https = __toESM(require("node:https"), 1);
|
|
50490
|
-
var
|
|
50533
|
+
var import_node_os10 = __toESM(require("node:os"), 1);
|
|
50491
50534
|
var import_compare_versions = __toESM(require_umd(), 1);
|
|
50492
50535
|
var PACKAGE_NAME = "agent-relay";
|
|
50493
50536
|
var CHECK_INTERVAL_MS = 60 * 60 * 1e3;
|
|
50494
50537
|
var NPM_REGISTRY_URL = `https://registry.npmjs.org/${PACKAGE_NAME}/latest`;
|
|
50495
50538
|
function getCachePath() {
|
|
50496
|
-
const cacheDir = import_node_path16.default.join(
|
|
50539
|
+
const cacheDir = import_node_path16.default.join(import_node_os10.default.homedir(), ".agent-relay");
|
|
50497
50540
|
return import_node_path16.default.join(cacheDir, "update-cache.json");
|
|
50498
50541
|
}
|
|
50499
50542
|
function readCache() {
|
|
@@ -50794,7 +50837,7 @@ function validateModelForCli(cli, model) {
|
|
|
50794
50837
|
|
|
50795
50838
|
// packages/utils/dist/relay-pty-path.js
|
|
50796
50839
|
var import_node_fs15 = __toESM(require("node:fs"), 1);
|
|
50797
|
-
var
|
|
50840
|
+
var import_node_os11 = __toESM(require("node:os"), 1);
|
|
50798
50841
|
var import_node_path17 = __toESM(require("node:path"), 1);
|
|
50799
50842
|
var SUPPORTED_PLATFORMS = {
|
|
50800
50843
|
darwin: {
|
|
@@ -50807,13 +50850,13 @@ var SUPPORTED_PLATFORMS = {
|
|
|
50807
50850
|
}
|
|
50808
50851
|
};
|
|
50809
50852
|
function getPlatformBinaryName() {
|
|
50810
|
-
const platform2 =
|
|
50811
|
-
const arch =
|
|
50853
|
+
const platform2 = import_node_os11.default.platform();
|
|
50854
|
+
const arch = import_node_os11.default.arch();
|
|
50812
50855
|
return SUPPORTED_PLATFORMS[platform2]?.[arch] ?? null;
|
|
50813
50856
|
}
|
|
50814
50857
|
function isPlatformSupported() {
|
|
50815
|
-
const platform2 =
|
|
50816
|
-
const arch =
|
|
50858
|
+
const platform2 = import_node_os11.default.platform();
|
|
50859
|
+
const arch = import_node_os11.default.arch();
|
|
50817
50860
|
return SUPPORTED_PLATFORMS[platform2]?.[arch] !== void 0;
|
|
50818
50861
|
}
|
|
50819
50862
|
function getSupportedPlatforms() {
|
|
@@ -50933,7 +50976,7 @@ function isPlatformCompatibleBinary(filePath) {
|
|
|
50933
50976
|
return false;
|
|
50934
50977
|
}
|
|
50935
50978
|
const magic = header.readUInt32BE(0);
|
|
50936
|
-
const platform2 =
|
|
50979
|
+
const platform2 = import_node_os11.default.platform();
|
|
50937
50980
|
if (platform2 === "darwin") {
|
|
50938
50981
|
return isMachOBinary(magic);
|
|
50939
50982
|
}
|
|
@@ -51568,7 +51611,7 @@ var import_node_child_process7 = require("node:child_process");
|
|
|
51568
51611
|
var import_node_crypto13 = __toESM(require("node:crypto"), 1);
|
|
51569
51612
|
var import_node_path18 = __toESM(require("node:path"), 1);
|
|
51570
51613
|
var import_node_fs16 = __toESM(require("node:fs"), 1);
|
|
51571
|
-
var
|
|
51614
|
+
var import_node_os12 = __toESM(require("node:os"), 1);
|
|
51572
51615
|
function getGlobalBaseDir2() {
|
|
51573
51616
|
if (process.env.AGENT_RELAY_DATA_DIR) {
|
|
51574
51617
|
return process.env.AGENT_RELAY_DATA_DIR;
|
|
@@ -51577,7 +51620,7 @@ function getGlobalBaseDir2() {
|
|
|
51577
51620
|
if (xdgDataHome) {
|
|
51578
51621
|
return import_node_path18.default.join(xdgDataHome, "agent-relay");
|
|
51579
51622
|
}
|
|
51580
|
-
return import_node_path18.default.join(
|
|
51623
|
+
return import_node_path18.default.join(import_node_os12.default.homedir(), ".agent-relay");
|
|
51581
51624
|
}
|
|
51582
51625
|
var GLOBAL_BASE_DIR2 = getGlobalBaseDir2();
|
|
51583
51626
|
var PROJECT_DATA_DIR2 = ".agent-relay";
|
|
@@ -51620,10 +51663,10 @@ function getProjectPaths2(projectRoot) {
|
|
|
51620
51663
|
// packages/config/dist/trajectory-config.js
|
|
51621
51664
|
var import_node_fs17 = require("node:fs");
|
|
51622
51665
|
var import_node_path19 = require("node:path");
|
|
51623
|
-
var
|
|
51666
|
+
var import_node_os13 = require("node:os");
|
|
51624
51667
|
var import_node_crypto14 = require("node:crypto");
|
|
51625
51668
|
function getAgentRelayConfigDir() {
|
|
51626
|
-
return process.env.AGENT_RELAY_CONFIG_DIR ?? (0, import_node_path19.join)((0,
|
|
51669
|
+
return process.env.AGENT_RELAY_CONFIG_DIR ?? (0, import_node_path19.join)((0, import_node_os13.homedir)(), ".config", "agent-relay");
|
|
51627
51670
|
}
|
|
51628
51671
|
var configCache = null;
|
|
51629
51672
|
function getRelayConfigPath(_projectRoot) {
|
|
@@ -51667,7 +51710,7 @@ function getProjectHash(projectRoot) {
|
|
|
51667
51710
|
}
|
|
51668
51711
|
function getUserTrajectoriesDir(projectRoot) {
|
|
51669
51712
|
const projectHash = getProjectHash(projectRoot);
|
|
51670
|
-
const configDir = process.env.XDG_CONFIG_HOME || (0, import_node_path19.join)((0,
|
|
51713
|
+
const configDir = process.env.XDG_CONFIG_HOME || (0, import_node_path19.join)((0, import_node_os13.homedir)(), ".config");
|
|
51671
51714
|
return (0, import_node_path19.join)(configDir, "agent-relay", "trajectories", projectHash);
|
|
51672
51715
|
}
|
|
51673
51716
|
function getRepoTrajectoriesDir(projectRoot) {
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
-
import { type CloudApiClient, type CloudAgent } from '../lib/cloud-client.js';
|
|
3
2
|
type ExitFn = (code: number) => never;
|
|
4
|
-
export type { CloudApiClient, CloudAgent };
|
|
5
3
|
export interface CloudDependencies {
|
|
6
|
-
createApiClient: () => CloudApiClient;
|
|
7
|
-
getDataDir: () => string;
|
|
8
|
-
getHostname: () => string;
|
|
9
|
-
randomHex: (bytes: number) => string;
|
|
10
|
-
now: () => Date;
|
|
11
|
-
openExternal: (url: string) => Promise<void>;
|
|
12
|
-
prompt: (question: string) => Promise<string>;
|
|
13
4
|
log: (...args: unknown[]) => void;
|
|
14
5
|
error: (...args: unknown[]) => void;
|
|
15
6
|
exit: ExitFn;
|
|
16
7
|
}
|
|
17
8
|
export declare function registerCloudCommands(program: Command, overrides?: Partial<CloudDependencies>): void;
|
|
9
|
+
export {};
|
|
18
10
|
//# sourceMappingURL=cloud.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/cloud.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/cloud.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAwB,MAAM,WAAW,CAAC;AAwB1D,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC;AAEtC,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpC,IAAI,EAAE,MAAM,CAAC;CACd;AAyFD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,SAAS,GAAE,OAAO,CAAC,iBAAiB,CAAM,GACzC,IAAI,CAsYN"}
|