overlord-cli 0.2610081212.0 → 0.2610130851.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/index.js +44 -5
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39260,6 +39260,8 @@ Environment fallback:
|
|
|
39260
39260
|
--session-key <- SESSION_KEY printed on stderr after attach/connect/prompt/resume-follow-up
|
|
39261
39261
|
--mission-id <- mission display id (e.g. coo:8) or UUID
|
|
39262
39262
|
--objective-id <- OVERLORD_OBJECTIVE_ID (objective display id, e.g. coo:8.k7xm)
|
|
39263
|
+
Read commands inherit it only with no explicit mission or a matching
|
|
39264
|
+
parent mission display id; explicit objective flags are always validated.
|
|
39263
39265
|
backend URL <- overlord.toml backend_url, OVERLORD_BACKEND_URL, or dev OVERLORD_BACKEND_URL_DEV
|
|
39264
39266
|
auth token <- OVERLORD_USER_TOKEN, OVLD_USER_TOKEN, or USER_TOKEN
|
|
39265
39267
|
|
|
@@ -39354,6 +39356,11 @@ connect:
|
|
|
39354
39356
|
load-context:
|
|
39355
39357
|
Purpose:
|
|
39356
39358
|
Read mission details without creating a session.
|
|
39359
|
+
An explicit mission (flag or positional) ignores an inherited objective unless
|
|
39360
|
+
its parent mission display id matches. This also applies to read-context and
|
|
39361
|
+
attachment reads, including bootstrap fallback. For UUID selectors, explicitly
|
|
39362
|
+
pass the objective to pin the read. Explicit objective/mission pairs retain
|
|
39363
|
+
validation. Reads never change the active execution binding or update/delivery target.
|
|
39357
39364
|
Required:
|
|
39358
39365
|
--mission-id <id> Or --objective-id with a display id
|
|
39359
39366
|
Optional:
|
|
@@ -39931,6 +39938,7 @@ hook-event:
|
|
|
39931
39938
|
read-context:
|
|
39932
39939
|
Purpose:
|
|
39933
39940
|
Read persistent shared context written by earlier sessions.
|
|
39941
|
+
Explicit mission selection ignores a different inherited objective (see load-context).
|
|
39934
39942
|
Required:
|
|
39935
39943
|
--mission-id <id>
|
|
39936
39944
|
Optional:
|
|
@@ -39989,6 +39997,7 @@ attachment-list:
|
|
|
39989
39997
|
with --objective-id).
|
|
39990
39998
|
Each entry includes id, filename, mimeType, sizeBytes, status, storageKey, and url.
|
|
39991
39999
|
The url field is a server-relative path; prepend the backend base URL to download.
|
|
40000
|
+
Explicit mission selection ignores a different inherited objective (see load-context).
|
|
39992
40001
|
Required:
|
|
39993
40002
|
--mission-id <id>
|
|
39994
40003
|
Optional:
|
|
@@ -39998,6 +40007,7 @@ attachment-download-url:
|
|
|
39998
40007
|
Purpose:
|
|
39999
40008
|
Return the authenticated download URL for a specific attachment, or save it
|
|
40000
40009
|
to a new file using the CLI's existing authentication.
|
|
40010
|
+
Explicit mission selection ignores a different inherited objective (see load-context).
|
|
40001
40011
|
Required:
|
|
40002
40012
|
--mission-id <id>
|
|
40003
40013
|
--attachment-id <id> (use the id from attachment-list output)
|
|
@@ -41164,6 +41174,25 @@ function missionDisplayId(mission) {
|
|
|
41164
41174
|
const record2 = asRecord5(mission);
|
|
41165
41175
|
return typeof record2.displayId === "string" ? record2.displayId : typeof record2.id === "string" ? record2.id : "unknown";
|
|
41166
41176
|
}
|
|
41177
|
+
function createdObjectiveLines(mission) {
|
|
41178
|
+
const objectives = asRecord5(mission).objectives;
|
|
41179
|
+
if (!Array.isArray(objectives)) return [];
|
|
41180
|
+
return objectives.map((entry, index) => {
|
|
41181
|
+
const objective = asRecord5(entry);
|
|
41182
|
+
const identifier = typeof objective.displayId === "string" && objective.displayId || typeof objective.id === "string" && objective.id || `#${index + 1}`;
|
|
41183
|
+
const assignedAgent = typeof objective.assignedAgent === "string" ? objective.assignedAgent : "project default";
|
|
41184
|
+
const model = typeof objective.model === "string" ? objective.model : "project default";
|
|
41185
|
+
const resource = typeof objective.resourceKey === "string" ? objective.resourceKey : "project default";
|
|
41186
|
+
const fields = [
|
|
41187
|
+
`agent=${assignedAgent}`,
|
|
41188
|
+
`model=${model}`,
|
|
41189
|
+
`resource=${resource}`,
|
|
41190
|
+
`autoAdvance=${objective.autoAdvance === true}`
|
|
41191
|
+
];
|
|
41192
|
+
const title = typeof objective.title === "string" && objective.title.trim();
|
|
41193
|
+
return ` Objective ${identifier}${title ? ` (${title})` : ""}: ${fields.join(", ")}`;
|
|
41194
|
+
});
|
|
41195
|
+
}
|
|
41167
41196
|
function appendDeclaredOutputPaths({
|
|
41168
41197
|
flags,
|
|
41169
41198
|
active,
|
|
@@ -41272,6 +41301,8 @@ Run \`${primaryCommand} protocol help\` for usage.`
|
|
|
41272
41301
|
rejectOversizedInlineJson({ flags: parsed.flags });
|
|
41273
41302
|
const workingDirectory = process.cwd();
|
|
41274
41303
|
const flags = Object.fromEntries(parsed.flags);
|
|
41304
|
+
const explicitMissionId = flagValue(parsed.flags, "--mission-id") ?? parsed.positional[0];
|
|
41305
|
+
const mayInheritObjective = (objectiveId) => !READ_ONLY_MISSION_SUBCOMMANDS.has(subcommand) || explicitMissionId === void 0 || missionDisplayIdFromObjectiveRef(objectiveId) === explicitMissionId.trim();
|
|
41275
41306
|
const retiredFlags = RETIRED_CHANGE_TRACKING_FLAGS[subcommand] ?? [];
|
|
41276
41307
|
const suppliedRetiredFlags = retiredFlags.filter((flag) => flag in flags);
|
|
41277
41308
|
if (suppliedRetiredFlags.length > 0) {
|
|
@@ -41282,10 +41313,9 @@ Run \`${primaryCommand} protocol help\` for usage.`
|
|
|
41282
41313
|
if (subcommand === "attach" && typeof flags["--execution-request-id"] !== "string" && process.env.OVERLORD_EXECUTION_REQUEST_ID) {
|
|
41283
41314
|
flags["--execution-request-id"] = process.env.OVERLORD_EXECUTION_REQUEST_ID;
|
|
41284
41315
|
}
|
|
41285
|
-
if (OBJECTIVE_SCOPED_SUBCOMMANDS.has(subcommand) && typeof flags["--objective-id"] !== "string" && process.env.OVERLORD_OBJECTIVE_ID) {
|
|
41316
|
+
if (OBJECTIVE_SCOPED_SUBCOMMANDS.has(subcommand) && typeof flags["--objective-id"] !== "string" && process.env.OVERLORD_OBJECTIVE_ID && mayInheritObjective(process.env.OVERLORD_OBJECTIVE_ID)) {
|
|
41286
41317
|
flags["--objective-id"] = process.env.OVERLORD_OBJECTIVE_ID;
|
|
41287
41318
|
}
|
|
41288
|
-
const explicitMissionId = flagValue(parsed.flags, "--mission-id") ?? parsed.positional[0];
|
|
41289
41319
|
if (subcommand === "attach" || OBJECTIVE_SCOPED_SUBCOMMANDS.has(subcommand)) {
|
|
41290
41320
|
const needsChannelId = subcommand === "attach" && typeof flags["--session-channel-id"] !== "string";
|
|
41291
41321
|
const needsExecutionRequestId = subcommand === "attach" && typeof flags["--execution-request-id"] !== "string";
|
|
@@ -41306,7 +41336,7 @@ Run \`${primaryCommand} protocol help\` for usage.`
|
|
|
41306
41336
|
if (needsExecutionRequestId && recovered.executionRequestId) {
|
|
41307
41337
|
flags["--execution-request-id"] = recovered.executionRequestId;
|
|
41308
41338
|
}
|
|
41309
|
-
if (needsObjectiveId && recovered.objectiveId) {
|
|
41339
|
+
if (needsObjectiveId && recovered.objectiveId && mayInheritObjective(recovered.objectiveId)) {
|
|
41310
41340
|
flags["--objective-id"] = recovered.objectiveId;
|
|
41311
41341
|
}
|
|
41312
41342
|
}
|
|
@@ -41864,7 +41894,10 @@ async function runManagementCommand({
|
|
|
41864
41894
|
}
|
|
41865
41895
|
}
|
|
41866
41896
|
if (json2) printJson(mission);
|
|
41867
|
-
else
|
|
41897
|
+
else {
|
|
41898
|
+
console.log(`Created mission ${missionDisplayId(mission)}`);
|
|
41899
|
+
for (const line of createdObjectiveLines(mission)) console.log(line);
|
|
41900
|
+
}
|
|
41868
41901
|
return;
|
|
41869
41902
|
}
|
|
41870
41903
|
case "attach":
|
|
@@ -42655,7 +42688,7 @@ Note: ${reinstallHint}`);
|
|
|
42655
42688
|
message: "Usage: ovld runner service <install|start|stop|restart|status|uninstall> [--no-start] [--json]"
|
|
42656
42689
|
});
|
|
42657
42690
|
}
|
|
42658
|
-
var SYNC_CHANGE_EVIDENCE_KEYS, OBJECTIVE_DISPLAY_ID_RE, PROTOCOL_FILE_FLAGS, SESSION_KEY_SUBCOMMANDS, OBJECTIVE_SCOPED_SUBCOMMANDS, RETIRED_CHANGE_TRACKING_FLAGS, MAX_CHANGES_HEALTH_ENTRIES, MAX_DECLARED_OUTPUT_PATHS, MAX_RUNNER_FAILURE_MESSAGE_LENGTH;
|
|
42691
|
+
var SYNC_CHANGE_EVIDENCE_KEYS, OBJECTIVE_DISPLAY_ID_RE, PROTOCOL_FILE_FLAGS, SESSION_KEY_SUBCOMMANDS, OBJECTIVE_SCOPED_SUBCOMMANDS, READ_ONLY_MISSION_SUBCOMMANDS, RETIRED_CHANGE_TRACKING_FLAGS, MAX_CHANGES_HEALTH_ENTRIES, MAX_DECLARED_OUTPUT_PATHS, MAX_RUNNER_FAILURE_MESSAGE_LENGTH;
|
|
42659
42692
|
var init_commands = __esm({
|
|
42660
42693
|
"src/commands.ts"() {
|
|
42661
42694
|
"use strict";
|
|
@@ -42748,6 +42781,12 @@ var init_commands = __esm({
|
|
|
42748
42781
|
"update-artifact",
|
|
42749
42782
|
"write-context"
|
|
42750
42783
|
]);
|
|
42784
|
+
READ_ONLY_MISSION_SUBCOMMANDS = /* @__PURE__ */ new Set([
|
|
42785
|
+
"load-context",
|
|
42786
|
+
"read-context",
|
|
42787
|
+
"attachment-list",
|
|
42788
|
+
"attachment-download-url"
|
|
42789
|
+
]);
|
|
42751
42790
|
RETIRED_CHANGE_TRACKING_FLAGS = {
|
|
42752
42791
|
update: ["--track-changed-files", "--changed-files-json", "--changed-files-file"],
|
|
42753
42792
|
deliver: [
|