overlord-cli 0.2608211014.0 → 0.2608211706.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/dist/connectors/adapters/antigravity/skills/overlord-mission/SKILL.md +1 -1
- package/dist/connectors/adapters/claude/skills/overlord-mission/SKILL.md +1 -1
- package/dist/connectors/adapters/codex/skills/overlord-mission/SKILL.md +1 -1
- package/dist/connectors/adapters/cursor/skills/overlord-mission/SKILL.md +1 -1
- package/dist/connectors/adapters/pi/skills/overlord-mission/SKILL.md +1 -1
- package/dist/connectors/core/overlord-mission/SKILL.md +2 -2
- package/dist/index.js +177 -47
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: overlord-mission
|
|
3
|
-
description:
|
|
3
|
+
description: Use for the shared Overlord workflow whenever the user refers to an Overlord mission or ticket.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Overlord Mission
|
|
7
7
|
|
|
8
|
-
Use this core whenever an agent connector needs to work with Overlord, whether the session was launched by Overlord Desktop/CLI or the user asks from chat to engage with Overlord.
|
|
8
|
+
Use this core whenever an agent connector needs to work with Overlord, whether the session was launched by Overlord Desktop/CLI or the user asks from chat to engage with Overlord. Treat **ticket** as a user-facing synonym for **mission**: invoke this `overlord-mission` skill for either term. There is no separate `overlord-ticket` skill.
|
|
9
9
|
|
|
10
10
|
Connector adapters may add harness-specific commands, hooks, MCP tools, or launch flags, but they must not replace the lifecycle rules in this core.
|
|
11
11
|
|
package/dist/index.js
CHANGED
|
@@ -3311,6 +3311,48 @@ var init_terminal_launch_chord = __esm({
|
|
|
3311
3311
|
}
|
|
3312
3312
|
});
|
|
3313
3313
|
|
|
3314
|
+
// src/launch-settings.ts
|
|
3315
|
+
function launchSettingsPath(workspaceId, suffix = "") {
|
|
3316
|
+
const id = workspaceId?.trim();
|
|
3317
|
+
return id ? `/api/workspaces/${encodeURIComponent(id)}/launch-settings${suffix}` : `/api/launch-settings${suffix}`;
|
|
3318
|
+
}
|
|
3319
|
+
async function resolveLaunchSettingsWorkspaceId({
|
|
3320
|
+
backend,
|
|
3321
|
+
workspaceId
|
|
3322
|
+
}) {
|
|
3323
|
+
const explicit = workspaceId?.trim();
|
|
3324
|
+
if (explicit) return explicit;
|
|
3325
|
+
const cached = cachedWorkspaceIds.get(backend);
|
|
3326
|
+
if (cached !== void 0) return cached;
|
|
3327
|
+
let resolved = null;
|
|
3328
|
+
try {
|
|
3329
|
+
const workspaces = await backend.get("/api/workspaces");
|
|
3330
|
+
const rows = Array.isArray(workspaces) ? workspaces : [];
|
|
3331
|
+
const ids = rows.map((row) => typeof row.id === "string" && row.id.trim() ? row.id.trim() : null).filter((id) => id !== null);
|
|
3332
|
+
const active = rows.find((row) => row.isActive === true);
|
|
3333
|
+
const activeId = active && typeof active.id === "string" && active.id.trim() ? active.id.trim() : null;
|
|
3334
|
+
resolved = activeId ?? (ids.length === 1 ? ids[0] ?? null : null);
|
|
3335
|
+
} catch {
|
|
3336
|
+
resolved = null;
|
|
3337
|
+
}
|
|
3338
|
+
cachedWorkspaceIds.set(backend, resolved);
|
|
3339
|
+
return resolved;
|
|
3340
|
+
}
|
|
3341
|
+
async function fetchLaunchSettings({
|
|
3342
|
+
backend,
|
|
3343
|
+
workspaceId
|
|
3344
|
+
}) {
|
|
3345
|
+
const resolved = await resolveLaunchSettingsWorkspaceId({ backend, workspaceId });
|
|
3346
|
+
return backend.get(launchSettingsPath(resolved));
|
|
3347
|
+
}
|
|
3348
|
+
var cachedWorkspaceIds;
|
|
3349
|
+
var init_launch_settings = __esm({
|
|
3350
|
+
"src/launch-settings.ts"() {
|
|
3351
|
+
"use strict";
|
|
3352
|
+
cachedWorkspaceIds = /* @__PURE__ */ new WeakMap();
|
|
3353
|
+
}
|
|
3354
|
+
});
|
|
3355
|
+
|
|
3314
3356
|
// src/terminal-profile-types.js
|
|
3315
3357
|
var DEFAULT_TERMINAL_PROFILE, EMPTY_TERMINAL_PROFILE;
|
|
3316
3358
|
var init_terminal_profile_types = __esm({
|
|
@@ -3350,9 +3392,10 @@ function readLegacyTerminalProfileFromToml() {
|
|
|
3350
3392
|
};
|
|
3351
3393
|
}
|
|
3352
3394
|
async function fetchTerminalProfile({
|
|
3353
|
-
backend
|
|
3395
|
+
backend,
|
|
3396
|
+
workspaceId
|
|
3354
3397
|
}) {
|
|
3355
|
-
const response = await backend
|
|
3398
|
+
const response = await fetchLaunchSettings({ backend, workspaceId });
|
|
3356
3399
|
const profile = terminalProfileFromResponse(response);
|
|
3357
3400
|
return {
|
|
3358
3401
|
...profile,
|
|
@@ -3362,10 +3405,12 @@ async function fetchTerminalProfile({
|
|
|
3362
3405
|
}
|
|
3363
3406
|
async function saveTerminalProfile({
|
|
3364
3407
|
backend,
|
|
3365
|
-
profile
|
|
3408
|
+
profile,
|
|
3409
|
+
workspaceId
|
|
3366
3410
|
}) {
|
|
3411
|
+
const resolved = await resolveLaunchSettingsWorkspaceId({ backend, workspaceId });
|
|
3367
3412
|
const response = await backend.patch({
|
|
3368
|
-
path: "/
|
|
3413
|
+
path: launchSettingsPath(resolved, "/terminal-profile"),
|
|
3369
3414
|
body: profile
|
|
3370
3415
|
});
|
|
3371
3416
|
const saved = terminalProfileFromResponse(response);
|
|
@@ -3388,6 +3433,7 @@ var init_terminal_profile = __esm({
|
|
|
3388
3433
|
"use strict";
|
|
3389
3434
|
init_dist();
|
|
3390
3435
|
init_config();
|
|
3436
|
+
init_launch_settings();
|
|
3391
3437
|
init_terminal_launch_chord();
|
|
3392
3438
|
init_terminal_profile_types();
|
|
3393
3439
|
}
|
|
@@ -17263,6 +17309,8 @@ function readBinaryMtimeMs(resolvedPath) {
|
|
|
17263
17309
|
}
|
|
17264
17310
|
}
|
|
17265
17311
|
function isLatchDiscoveryCacheFresh({ entry, resolvePath = resolveLatchExecutablePath }) {
|
|
17312
|
+
if (entry.supportedProtocolVersion !== SUPPORTED_LATCH_PROTOCOL_VERSION)
|
|
17313
|
+
return false;
|
|
17266
17314
|
const { result } = entry;
|
|
17267
17315
|
if (result.state === "not_installed") {
|
|
17268
17316
|
return resolvePath(result.executable) === null;
|
|
@@ -17277,15 +17325,15 @@ function isLatchDiscoveryCacheFresh({ entry, resolvePath = resolveLatchExecutabl
|
|
|
17277
17325
|
}
|
|
17278
17326
|
function readLatchDiscoveryCacheFile(filePath) {
|
|
17279
17327
|
if (!existsSync16(filePath))
|
|
17280
|
-
return { version:
|
|
17328
|
+
return { version: 2, entries: {} };
|
|
17281
17329
|
try {
|
|
17282
17330
|
const parsed = JSON.parse(readFileSync15(filePath, "utf8"));
|
|
17283
|
-
if (parsed.version !==
|
|
17284
|
-
return { version:
|
|
17331
|
+
if (parsed.version !== 2 || !parsed.entries || typeof parsed.entries !== "object") {
|
|
17332
|
+
return { version: 2, entries: {} };
|
|
17285
17333
|
}
|
|
17286
|
-
return { version:
|
|
17334
|
+
return { version: 2, entries: parsed.entries };
|
|
17287
17335
|
} catch {
|
|
17288
|
-
return { version:
|
|
17336
|
+
return { version: 2, entries: {} };
|
|
17289
17337
|
}
|
|
17290
17338
|
}
|
|
17291
17339
|
function writeLatchDiscoveryCacheFile({ filePath, cache: cache2 }) {
|
|
@@ -17305,6 +17353,7 @@ function discoverLatchForExecutionTarget({ executionTargetId, executable = DEFAU
|
|
|
17305
17353
|
const binaryMtimeMs = result.state === "not_installed" ? null : readBinaryMtimeMs(result.resolvedPath);
|
|
17306
17354
|
cache2.entries[key] = {
|
|
17307
17355
|
result,
|
|
17356
|
+
supportedProtocolVersion: SUPPORTED_LATCH_PROTOCOL_VERSION,
|
|
17308
17357
|
binaryMtimeMs,
|
|
17309
17358
|
cachedAt: result.checkedAt
|
|
17310
17359
|
};
|
|
@@ -19137,12 +19186,14 @@ var init_branch_preparation = __esm({
|
|
|
19137
19186
|
// src/discover-project-local.ts
|
|
19138
19187
|
import path22 from "node:path";
|
|
19139
19188
|
async function resolvePreferredExecutionTargetId({
|
|
19140
|
-
backend
|
|
19189
|
+
backend,
|
|
19190
|
+
workspaceId
|
|
19141
19191
|
}) {
|
|
19142
19192
|
try {
|
|
19143
|
-
const launchSettings = await
|
|
19144
|
-
|
|
19145
|
-
|
|
19193
|
+
const launchSettings = await fetchLaunchSettings({
|
|
19194
|
+
backend,
|
|
19195
|
+
workspaceId
|
|
19196
|
+
});
|
|
19146
19197
|
return typeof launchSettings.executionTargetId === "string" ? launchSettings.executionTargetId : null;
|
|
19147
19198
|
} catch {
|
|
19148
19199
|
return null;
|
|
@@ -19330,6 +19381,7 @@ var init_discover_project_local = __esm({
|
|
|
19330
19381
|
"use strict";
|
|
19331
19382
|
init_project_metadata();
|
|
19332
19383
|
init_errors();
|
|
19384
|
+
init_launch_settings();
|
|
19333
19385
|
}
|
|
19334
19386
|
});
|
|
19335
19387
|
|
|
@@ -20933,8 +20985,9 @@ add-objectives:
|
|
|
20933
20985
|
--auto-advance / --no-auto-advance
|
|
20934
20986
|
Default auto-advance for items that omit "autoAdvance". Defaults to off.
|
|
20935
20987
|
Notes:
|
|
20936
|
-
Each item is { "objective": "...", "title": "...", "
|
|
20937
|
-
"
|
|
20988
|
+
Each item is { "objective": "...", "title": "...", "agent": "codex",
|
|
20989
|
+
"model": "gpt-5.6-terra", "autoAdvance": true|false, "resourceKey": "..." }.
|
|
20990
|
+
model requires agent. Per-item autoAdvance wins over the flag.
|
|
20938
20991
|
|
|
20939
20992
|
update-objective:
|
|
20940
20993
|
Purpose:
|
|
@@ -22843,12 +22896,15 @@ var init_session_key = __esm({
|
|
|
22843
22896
|
var commands_exports = {};
|
|
22844
22897
|
__export(commands_exports, {
|
|
22845
22898
|
firstObjectiveId: () => firstObjectiveId,
|
|
22899
|
+
launchFailureMessage: () => launchFailureMessage,
|
|
22846
22900
|
queueableObjectiveId: () => queueableObjectiveId,
|
|
22847
22901
|
resolveActiveObjectiveId: () => resolveActiveObjectiveId,
|
|
22848
22902
|
resolveProtocolFileInputs: () => resolveProtocolFileInputs,
|
|
22849
22903
|
runManagementCommand: () => runManagementCommand,
|
|
22850
22904
|
runProtocolCommand: () => runProtocolCommand,
|
|
22851
|
-
runRunnerOnce: () => runRunnerOnce
|
|
22905
|
+
runRunnerOnce: () => runRunnerOnce,
|
|
22906
|
+
sanitizeRunnerFailureMessage: () => sanitizeRunnerFailureMessage,
|
|
22907
|
+
shouldRefuseInlineRunnerLaunch: () => shouldRefuseInlineRunnerLaunch
|
|
22852
22908
|
});
|
|
22853
22909
|
import { existsSync as existsSync29, readFileSync as readFileSync24 } from "node:fs";
|
|
22854
22910
|
import os6 from "node:os";
|
|
@@ -23149,30 +23205,27 @@ function repeatedLaunchFlags(args, name) {
|
|
|
23149
23205
|
}
|
|
23150
23206
|
async function resolveTerminalLaunchSettings({
|
|
23151
23207
|
runtime,
|
|
23152
|
-
flags
|
|
23208
|
+
flags,
|
|
23209
|
+
workspaceId
|
|
23153
23210
|
}) {
|
|
23154
23211
|
if (flagBoolean(flags, "--no-terminal")) {
|
|
23155
23212
|
return { terminalLauncher: null };
|
|
23156
23213
|
}
|
|
23157
23214
|
const override = flagValue(flags, "--terminal");
|
|
23158
|
-
if (override) {
|
|
23159
|
-
try {
|
|
23160
|
-
const profile = await fetchTerminalProfile({ backend: runtime.backend });
|
|
23161
|
-
return {
|
|
23162
|
-
terminalLauncher: override,
|
|
23163
|
-
terminalLaunchPlacement: profile.placement,
|
|
23164
|
-
terminalLaunchChord: profile.chord,
|
|
23165
|
-
terminalLaunchBackground: profile.background ?? false
|
|
23166
|
-
};
|
|
23167
|
-
} catch {
|
|
23168
|
-
return { terminalLauncher: override };
|
|
23169
|
-
}
|
|
23170
|
-
}
|
|
23171
23215
|
try {
|
|
23172
|
-
const profile = await fetchTerminalProfile({ backend: runtime.backend });
|
|
23173
|
-
return terminalProfileToLaunchSettings(profile);
|
|
23174
|
-
|
|
23175
|
-
|
|
23216
|
+
const profile = await fetchTerminalProfile({ backend: runtime.backend, workspaceId });
|
|
23217
|
+
if (!override) return terminalProfileToLaunchSettings(profile);
|
|
23218
|
+
return {
|
|
23219
|
+
terminalLauncher: override,
|
|
23220
|
+
terminalLaunchPlacement: profile.placement,
|
|
23221
|
+
terminalLaunchChord: profile.chord,
|
|
23222
|
+
terminalLaunchBackground: profile.background ?? false
|
|
23223
|
+
};
|
|
23224
|
+
} catch (error) {
|
|
23225
|
+
console.error(
|
|
23226
|
+
`[overlord] Could not read your terminal profile (${error instanceof Error ? error.message : String(error)}). ${override ? `Launching with --terminal ${override} and default placement.` : "The agent will run inline in this process instead of a new terminal window/tab."}`
|
|
23227
|
+
);
|
|
23228
|
+
return override ? { terminalLauncher: override } : { terminalLauncher: null };
|
|
23176
23229
|
}
|
|
23177
23230
|
}
|
|
23178
23231
|
function asRecord5(value) {
|
|
@@ -23189,11 +23242,17 @@ function parseLaunchEnvVarsValue(value) {
|
|
|
23189
23242
|
}
|
|
23190
23243
|
return vars;
|
|
23191
23244
|
}
|
|
23192
|
-
async function readWorktreeBranchAutomationEnabled(runtime) {
|
|
23245
|
+
async function readWorktreeBranchAutomationEnabled(runtime, workspaceId) {
|
|
23193
23246
|
try {
|
|
23194
|
-
const settings = await
|
|
23247
|
+
const settings = await fetchLaunchSettings({
|
|
23248
|
+
backend: runtime.backend,
|
|
23249
|
+
workspaceId
|
|
23250
|
+
});
|
|
23195
23251
|
return settings.worktreeBranchAutomationEnabled === true;
|
|
23196
|
-
} catch {
|
|
23252
|
+
} catch (error) {
|
|
23253
|
+
console.error(
|
|
23254
|
+
`[overlord] Could not read launch settings (${error instanceof Error ? error.message : String(error)}); continuing with worktree branch automation disabled.`
|
|
23255
|
+
);
|
|
23197
23256
|
return false;
|
|
23198
23257
|
}
|
|
23199
23258
|
}
|
|
@@ -23869,13 +23928,16 @@ async function runManagementCommand({
|
|
|
23869
23928
|
`/api/missions/${encodeURIComponent(missionId)}`
|
|
23870
23929
|
);
|
|
23871
23930
|
const scopedRuntime = runtime;
|
|
23931
|
+
const missionWorkspaceId = typeof asRecord5(mission).workspaceId === "string" ? asRecord5(mission).workspaceId : null;
|
|
23872
23932
|
const terminal = await resolveTerminalLaunchSettings({
|
|
23873
23933
|
runtime: scopedRuntime,
|
|
23874
|
-
flags: parsed.flags
|
|
23934
|
+
flags: parsed.flags,
|
|
23935
|
+
workspaceId: missionWorkspaceId
|
|
23875
23936
|
});
|
|
23876
23937
|
const objectiveId = objectiveRef ? objectiveIdForRef(mission, objectiveRef) : resolveActiveObjectiveId(mission);
|
|
23877
23938
|
const executionTargetId = await resolvePreferredExecutionTargetId({
|
|
23878
|
-
backend: scopedRuntime.backend
|
|
23939
|
+
backend: scopedRuntime.backend,
|
|
23940
|
+
workspaceId: missionWorkspaceId
|
|
23879
23941
|
});
|
|
23880
23942
|
const missionProjectId = asRecord5(mission).projectId;
|
|
23881
23943
|
const projectLaunchSettings = typeof missionProjectId === "string" ? await scopedRuntime.backend.get(`/api/projects/${encodeURIComponent(missionProjectId)}`).then((project) => ({
|
|
@@ -23893,7 +23955,10 @@ async function runManagementCommand({
|
|
|
23893
23955
|
missionId,
|
|
23894
23956
|
workingDirectory,
|
|
23895
23957
|
objectiveId: objectiveId ?? void 0,
|
|
23896
|
-
workspaceAutomationEnabled: await readWorktreeBranchAutomationEnabled(
|
|
23958
|
+
workspaceAutomationEnabled: await readWorktreeBranchAutomationEnabled(
|
|
23959
|
+
scopedRuntime,
|
|
23960
|
+
missionWorkspaceId
|
|
23961
|
+
),
|
|
23897
23962
|
dryRun,
|
|
23898
23963
|
overrideBranch: flagValue(parsed.flags, "--branch"),
|
|
23899
23964
|
noWorktree: flagBoolean(parsed.flags, "--no-worktree")
|
|
@@ -23926,7 +23991,13 @@ async function runManagementCommand({
|
|
|
23926
23991
|
printJson({ plan: result.plan, status: result.status, signal: result.signal });
|
|
23927
23992
|
}
|
|
23928
23993
|
if (result.status && result.status !== 0) {
|
|
23929
|
-
throw new CliError({
|
|
23994
|
+
throw new CliError({
|
|
23995
|
+
message: launchFailureMessage({
|
|
23996
|
+
status: result.status,
|
|
23997
|
+
execution: result.plan.execution,
|
|
23998
|
+
terminal
|
|
23999
|
+
})
|
|
24000
|
+
});
|
|
23930
24001
|
}
|
|
23931
24002
|
return;
|
|
23932
24003
|
}
|
|
@@ -24173,10 +24244,32 @@ async function runManagementCommand({
|
|
|
24173
24244
|
throw new CliError({ message: `Unknown command: ${command}` });
|
|
24174
24245
|
}
|
|
24175
24246
|
}
|
|
24247
|
+
function sanitizeRunnerFailureMessage(value) {
|
|
24248
|
+
const redacted = redactSecrets(value);
|
|
24249
|
+
return redacted.length <= MAX_RUNNER_FAILURE_MESSAGE_LENGTH ? redacted : `${redacted.slice(0, MAX_RUNNER_FAILURE_MESSAGE_LENGTH)}\u2026 [truncated]`;
|
|
24250
|
+
}
|
|
24251
|
+
function launchFailureMessage({
|
|
24252
|
+
status,
|
|
24253
|
+
execution,
|
|
24254
|
+
terminal
|
|
24255
|
+
}) {
|
|
24256
|
+
const where = execution.terminal ? `in ${execution.terminal}${terminal.terminalLaunchPlacement ? ` (${terminal.terminalLaunchPlacement})` : ""}` : "inline (no terminal launcher resolved for this device)";
|
|
24257
|
+
return sanitizeRunnerFailureMessage(
|
|
24258
|
+
`Launch command exited with status ${status ?? "unknown"} running ${where}: ${execution.display}`
|
|
24259
|
+
);
|
|
24260
|
+
}
|
|
24176
24261
|
function isNoExecutionTargetRegisteredError(error) {
|
|
24177
24262
|
const message = error instanceof Error ? error.message : String(error);
|
|
24178
24263
|
return message.includes("(no_execution_target_registered)");
|
|
24179
24264
|
}
|
|
24265
|
+
function shouldRefuseInlineRunnerLaunch({
|
|
24266
|
+
dryRun,
|
|
24267
|
+
terminalLauncher,
|
|
24268
|
+
executionProvider,
|
|
24269
|
+
stdoutIsTTY
|
|
24270
|
+
}) {
|
|
24271
|
+
return !dryRun && !terminalLauncher && executionProvider !== "latch" && !stdoutIsTTY;
|
|
24272
|
+
}
|
|
24180
24273
|
async function runRunnerOnce({
|
|
24181
24274
|
runtime,
|
|
24182
24275
|
parsed,
|
|
@@ -24248,7 +24341,12 @@ The runner will not register a target for you \u2014 declare this machine first,
|
|
|
24248
24341
|
});
|
|
24249
24342
|
}
|
|
24250
24343
|
const launchConfig = asRecord5(requestRecord.launchConfig);
|
|
24251
|
-
const
|
|
24344
|
+
const requestWorkspaceId = typeof requestRecord.workspaceId === "string" ? requestRecord.workspaceId : null;
|
|
24345
|
+
const terminal = await resolveTerminalLaunchSettings({
|
|
24346
|
+
runtime,
|
|
24347
|
+
flags: parsed.flags,
|
|
24348
|
+
workspaceId: requestWorkspaceId
|
|
24349
|
+
});
|
|
24252
24350
|
const missionId = String(requestRecord.missionId);
|
|
24253
24351
|
const dryRun = flagBoolean(parsed.flags, "--dry-run");
|
|
24254
24352
|
const prepared = await prepareMissionBranch({
|
|
@@ -24257,7 +24355,10 @@ The runner will not register a target for you \u2014 declare this machine first,
|
|
|
24257
24355
|
missionId,
|
|
24258
24356
|
workingDirectory: String(requestRecord.workingDirectory ?? process.cwd()),
|
|
24259
24357
|
objectiveId: String(requestRecord.objectiveId ?? ""),
|
|
24260
|
-
workspaceAutomationEnabled: await readWorktreeBranchAutomationEnabled(
|
|
24358
|
+
workspaceAutomationEnabled: await readWorktreeBranchAutomationEnabled(
|
|
24359
|
+
runtime,
|
|
24360
|
+
requestWorkspaceId
|
|
24361
|
+
),
|
|
24261
24362
|
dryRun,
|
|
24262
24363
|
overrideBranch: flagValue(parsed.flags, "--branch"),
|
|
24263
24364
|
noWorktree: flagBoolean(parsed.flags, "--no-worktree")
|
|
@@ -24270,6 +24371,16 @@ The runner will not register a target for you \u2014 declare this machine first,
|
|
|
24270
24371
|
branchAutomation: prepared.branchAutomation
|
|
24271
24372
|
});
|
|
24272
24373
|
const launchSession = launchSessionSnapshotFromMetadata(asRecord5(requestRecord.metadata));
|
|
24374
|
+
if (shouldRefuseInlineRunnerLaunch({
|
|
24375
|
+
dryRun,
|
|
24376
|
+
terminalLauncher: terminal.terminalLauncher,
|
|
24377
|
+
executionProvider: launchSession?.executionProvider.kind,
|
|
24378
|
+
stdoutIsTTY: process.stdout.isTTY
|
|
24379
|
+
})) {
|
|
24380
|
+
throw new CliError({
|
|
24381
|
+
message: `Refusing to launch ${requestedAgent} inline: this runner has no TTY and no terminal launcher is configured for this device, so the agent would have nowhere to run. Set a terminal in Settings \u2192 Terminal & IDE (or run \`ovld setup\`), or select the Latch execution provider for this target, then re-run the objective.`
|
|
24382
|
+
});
|
|
24383
|
+
}
|
|
24273
24384
|
const result = await launchAgent({
|
|
24274
24385
|
runtime,
|
|
24275
24386
|
options: {
|
|
@@ -24299,7 +24410,13 @@ The runner will not register a target for you \u2014 declare this machine first,
|
|
|
24299
24410
|
console.error(`[overlord] ${result.viewerOpen.warning}`);
|
|
24300
24411
|
}
|
|
24301
24412
|
if (result.status && result.status !== 0) {
|
|
24302
|
-
throw new CliError({
|
|
24413
|
+
throw new CliError({
|
|
24414
|
+
message: launchFailureMessage({
|
|
24415
|
+
status: result.status,
|
|
24416
|
+
execution: result.plan.execution,
|
|
24417
|
+
terminal
|
|
24418
|
+
})
|
|
24419
|
+
});
|
|
24303
24420
|
}
|
|
24304
24421
|
await runtime.backend.post({
|
|
24305
24422
|
path: `/api/runner/requests/${requestId}/launched`,
|
|
@@ -24322,7 +24439,9 @@ The runner will not register a target for you \u2014 declare this machine first,
|
|
|
24322
24439
|
try {
|
|
24323
24440
|
await runtime.backend.post({
|
|
24324
24441
|
path: `/api/runner/requests/${requestId}/failed`,
|
|
24325
|
-
body: {
|
|
24442
|
+
body: {
|
|
24443
|
+
error: sanitizeRunnerFailureMessage(error instanceof Error ? error.message : error)
|
|
24444
|
+
}
|
|
24326
24445
|
});
|
|
24327
24446
|
} catch {
|
|
24328
24447
|
}
|
|
@@ -24379,7 +24498,15 @@ async function runRunnerCommand({
|
|
|
24379
24498
|
const intervalMs = Number.parseInt(flagValue(parsed.flags, "--poll-interval-ms") ?? "3000", 10);
|
|
24380
24499
|
if (!json) console.log(`Runner started. Polling every ${intervalMs}ms for execution requests.`);
|
|
24381
24500
|
while (true) {
|
|
24382
|
-
|
|
24501
|
+
let result = { launched: false, longPoll: false };
|
|
24502
|
+
try {
|
|
24503
|
+
result = await runOnce();
|
|
24504
|
+
} catch (error) {
|
|
24505
|
+
if (isNoExecutionTargetRegisteredError(error)) throw error;
|
|
24506
|
+
console.error(
|
|
24507
|
+
`[overlord] Runner poll failed: ${error instanceof Error ? error.message : String(error)}`
|
|
24508
|
+
);
|
|
24509
|
+
}
|
|
24383
24510
|
if (!result.longPoll) await new Promise((resolve) => setTimeout(resolve, intervalMs));
|
|
24384
24511
|
}
|
|
24385
24512
|
}
|
|
@@ -24528,7 +24655,7 @@ Note: ${reinstallHint}`);
|
|
|
24528
24655
|
message: "Usage: ovld runner service <install|start|stop|restart|status|uninstall> [--no-start] [--json]"
|
|
24529
24656
|
});
|
|
24530
24657
|
}
|
|
24531
|
-
var PROTOCOL_FILE_FLAGS, SESSION_KEY_SUBCOMMANDS, OBJECTIVE_SCOPED_SUBCOMMANDS;
|
|
24658
|
+
var PROTOCOL_FILE_FLAGS, SESSION_KEY_SUBCOMMANDS, OBJECTIVE_SCOPED_SUBCOMMANDS, MAX_RUNNER_FAILURE_MESSAGE_LENGTH;
|
|
24532
24659
|
var init_commands = __esm({
|
|
24533
24660
|
"src/commands.ts"() {
|
|
24534
24661
|
"use strict";
|
|
@@ -24545,12 +24672,14 @@ var init_commands = __esm({
|
|
|
24545
24672
|
init_errors();
|
|
24546
24673
|
init_launch();
|
|
24547
24674
|
init_launch_bootstrap();
|
|
24675
|
+
init_launch_settings();
|
|
24548
24676
|
init_native_session();
|
|
24549
24677
|
init_org_setup();
|
|
24550
24678
|
init_output();
|
|
24551
24679
|
init_project_tmp();
|
|
24552
24680
|
init_protocol_help();
|
|
24553
24681
|
init_record_touched();
|
|
24682
|
+
init_redact_secrets();
|
|
24554
24683
|
init_resource_observations();
|
|
24555
24684
|
init_runner_identity();
|
|
24556
24685
|
init_runner_service();
|
|
@@ -24604,6 +24733,7 @@ var init_commands = __esm({
|
|
|
24604
24733
|
"update-artifact",
|
|
24605
24734
|
"write-context"
|
|
24606
24735
|
]);
|
|
24736
|
+
MAX_RUNNER_FAILURE_MESSAGE_LENGTH = 1200;
|
|
24607
24737
|
}
|
|
24608
24738
|
});
|
|
24609
24739
|
|