@cotal-ai/cli 0.171.5 → 0.172.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/command.d.ts.map +1 -1
- package/dist/command.js +46 -19
- package/dist/command.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +19 -6
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/ext.d.ts +1 -1
- package/dist/commands/ext.d.ts.map +1 -1
- package/dist/commands/ext.js +37 -8
- package/dist/commands/ext.js.map +1 -1
- package/dist/commands/help.js +2 -2
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/space-registration.d.ts.map +1 -1
- package/dist/commands/space-registration.js +9 -3
- package/dist/commands/space-registration.js.map +1 -1
- package/dist/commands/space.d.ts.map +1 -1
- package/dist/commands/space.js +34 -25
- package/dist/commands/space.js.map +1 -1
- package/dist/commands/stack-down.d.ts.map +1 -1
- package/dist/commands/stack-down.js +5 -4
- package/dist/commands/stack-down.js.map +1 -1
- package/dist/commands/stack-up.d.ts +5 -0
- package/dist/commands/stack-up.d.ts.map +1 -1
- package/dist/commands/stack-up.js +46 -20
- package/dist/commands/stack-up.js.map +1 -1
- package/dist/commands/status.d.ts +2 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +44 -22
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/up.d.ts +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +34 -22
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/update.d.ts +5 -5
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +175 -34
- package/dist/commands/update.js.map +1 -1
- package/dist/lib/broker-service.d.ts +6 -4
- package/dist/lib/broker-service.d.ts.map +1 -1
- package/dist/lib/broker-service.js +36 -6
- package/dist/lib/broker-service.js.map +1 -1
- package/dist/lib/restore.d.ts +3 -2
- package/dist/lib/restore.d.ts.map +1 -1
- package/dist/lib/restore.js +12 -10
- package/dist/lib/restore.js.map +1 -1
- package/dist/lib/service-systemd.d.ts +3 -3
- package/dist/lib/service-systemd.d.ts.map +1 -1
- package/dist/lib/service-systemd.js +6 -6
- package/dist/lib/service-systemd.js.map +1 -1
- package/dist/lib/up-report.d.ts.map +1 -1
- package/dist/lib/up-report.js +9 -6
- package/dist/lib/up-report.js.map +1 -1
- package/dist/lib/update-pending.d.ts +1 -0
- package/dist/lib/update-pending.d.ts.map +1 -1
- package/dist/lib/update-pending.js +4 -3
- package/dist/lib/update-pending.js.map +1 -1
- package/dist/lib/version.d.ts +1 -0
- package/dist/lib/version.d.ts.map +1 -1
- package/dist/lib/version.js +2 -2
- package/dist/lib/version.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAIA,OAAO,EAuBL,KAAK,UAAU,EAGhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAYL,KAAK,aAAa,EAoElB,KAAK,WAAW,EAEhB,KAAK,SAAS,EACd,KAAK,UAAU,EAGf,KAAK,MAAM,EAOZ,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAoD,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAKzG,OAAO,EAAoK,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACxN,OAAO,EAA8H,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACvM,OAAO,EAAiD,KAAK,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAc1H,OAAO,EAAE,2BAA2B,EAA0B,MAAM,+BAA+B,CAAC;AACpG,OAAO,EAAE,kBAAkB,EAAoB,MAAM,6BAA6B,CAAC;AAGnF,OAAO,EAAE,yBAAyB,EAA4B,MAAM,iCAAiC,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AsBN,oEAAoE;AACpE,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAiB9D;AAED,8FAA8F;AAC9F,wBAAsB,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA8I5D;AAioBD,KAAK,eAAe,GAAG,UAAU,GAAG,eAAe,GAAG,WAAW,CAAC;AAClE,KAAK,kBAAkB,GAAG;IAAE,QAAQ,EAAE,eAAe,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AA6D7E;kGACkG;AAClG,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAEpD;AA8lCD;yCACyC;AACzC,wBAAgB,UAAU,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,UAAQ,EAAE,IAAI,UAAQ,EAAE,EAAE,WAAmB,EAAE,eAAe,EAAE,IAAI,EAAE,QAAwC,EAAE,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAO,GAAG,MAAM,CAYrS;AA6VD,gGAAgG;AAChG,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAEvD"}
|
package/dist/commands/status.js
CHANGED
|
@@ -2,8 +2,8 @@ import { accessSync, constants, existsSync, lstatSync, statSync } from "node:fs"
|
|
|
2
2
|
import { drainAndClose } from "@cotal-ai/core";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
-
import { CotalEndpoint, agentFilePath, dialerFor, EpEnvelopeError, formatAge, isReachable, isStreamNotFound, mintCreds, mintLifecycleUid, resolveService, realDirNoSymlink, invokeRepairingSplit, standaloneConnectOpts, newIdentity, idFromCreds, principalKey, DEV_OWNER, unansweredRequest, resolveAuthProvider, personaDir, } from "@cotal-ai/core";
|
|
6
|
-
import { stoppedLoopbackListener, stackRunsUnderOtherHome, accountInventory, authDir, isCommandFailure, readMaintenanceJournal, recordsElsewhereError, recordsElsewhereText, restoreRolledBackRuns, targetErrorSpace, brokerAddressForDisplay, brokerCheck, brokerUrlKey, canonicalRoot, CLI_USER_ACTOR, codeSpan, credentialFileExposure, CommandFailure, deliveryCredsKey, DELIVERY_PIDFILE, extensionsDir, findCotalRoot, folderSpaceOverSelection, meshesForRoot, resolveReadsLiveness, stoppedStack, unsettledStackOperation, withdrawOperationNote, hasUserAuthState, homeCotalDir, installationWriter, cachedPreferences, loadLaunchPersonaFile, resolvePreference, isMeshRegistryError, isWorkspaceTargetError, jsonFlag, loadManagerInstanceIdentity, loadSoleSpaceAuth, localProcessPath, localProcessVisible, MANAGER_PIDFILE, NATS_PIDFILE, OFFICIAL_CONNECTORS, oneLine, spaceKey, PREFERENCE_KEYS, plainFlag, preflightTarget, preparedNeverStarted, presentationOf, principalFromBearer, verifyIdentityPin, probeWebReadiness, readCurrent, readMeshRegistry, readPidfile, preparedRecordSkipped, readPreparedSpaces, stackJournalPath, readRenewalRecord, recordOperationSpace, resolveMeshTarget, serverFlag, spaceFlag, userAuthStateDir, WEB_PIDFILE, workspaceSecretStore, displayWidth, terminalWidth, wrapWords, writeResult, workspaceErrorParts, preferencesPath, preferencesFolderWarning, cotalDirLink, movedProject, spaceStreamsAbsent, spaceStreamsExpected, resolveControlTarget, } from "@cotal-ai/workspace";
|
|
5
|
+
import { CotalEndpoint, agentFilePath, dialerFor, EpEnvelopeError, formatAge, globalConfigDir, isReachable, isStreamNotFound, mintCreds, mintLifecycleUid, resolveService, realDirNoSymlink, invokeRepairingSplit, standaloneConnectOpts, newIdentity, idFromCreds, principalKey, DEV_OWNER, unansweredRequest, resolveAuthProvider, personaDir, } from "@cotal-ai/core";
|
|
6
|
+
import { stoppedLoopbackListener, UnreadableConnectorSelection, stackRunsUnderOtherHome, accountInventory, authDir, isCommandFailure, readMaintenanceJournal, recordsElsewhereError, recordsElsewhereText, restoreRolledBackRuns, targetErrorSpace, brokerAddressForDisplay, brokerCheck, brokerUrlKey, canonicalRoot, CLI_USER_ACTOR, codeSpan, credentialFileExposure, CommandFailure, deliveryCredsKey, DELIVERY_PIDFILE, extensionsDir, findCotalRoot, folderSpaceOverSelection, meshesForRoot, resolveReadsLiveness, stoppedStack, unsettledStackOperation, withdrawOperationNote, hasUserAuthState, homeCotalDir, installationWriter, cachedPreferences, loadLaunchPersonaFile, resolvePreference, isMeshRegistryError, isWorkspaceTargetError, jsonFlag, loadManagerInstanceIdentity, loadSoleSpaceAuth, localProcessPath, localProcessVisible, MANAGER_PIDFILE, NATS_PIDFILE, OFFICIAL_CONNECTORS, oneLine, spaceKey, PREFERENCE_KEYS, plainFlag, preflightTarget, preparedNeverStarted, presentationOf, principalFromBearer, verifyIdentityPin, probeWebReadiness, readCurrent, readMeshRegistry, readPidfile, preparedRecordSkipped, readPreparedSpaces, stackJournalPath, readRenewalRecord, recordOperationSpace, resolveMeshTarget, serverFlag, spaceFlag, userAuthStateDir, WEB_PIDFILE, workspaceSecretStore, displayWidth, terminalWidth, wrapWords, writeResult, workspaceErrorParts, preferencesPath, preferencesFolderWarning, cotalDirLink, movedProject, spaceStreamsAbsent, spaceStreamsExpected, resolveControlTarget, } from "@cotal-ai/workspace";
|
|
7
7
|
import { localProcessSurface } from "../ext-loader.js";
|
|
8
8
|
import { cliVersion, cliProvenance, readExtensionVersions } from "../lib/version.js";
|
|
9
9
|
import { agentSkillsSkew } from "../lib/agent-skills.js";
|
|
@@ -15,6 +15,7 @@ import { deliveryResponderFromLease, deliveryResponderState, deliveryRowSuffix,
|
|
|
15
15
|
import { brokerStoreWrite, storeFull, storeWriteRepair } from "../lib/broker-store-health.js";
|
|
16
16
|
import { chatStreamGone, stackState } from "../lib/space-streams.js";
|
|
17
17
|
import { pidfileState } from "./down.js";
|
|
18
|
+
import { stoppedStackAddressProblem } from "./stack-up.js";
|
|
18
19
|
import { selectResetTarget } from "./reset-store-apply.js";
|
|
19
20
|
import { displayCmd, displayRemedy } from "../lib/self-exec.js";
|
|
20
21
|
import { shellWord } from "../lib/endpoint-errors.js";
|
|
@@ -181,9 +182,11 @@ export async function status(args) {
|
|
|
181
182
|
seed = cursor;
|
|
182
183
|
}
|
|
183
184
|
catch (error) {
|
|
184
|
-
const path = reconcileCursorPath();
|
|
185
185
|
const code = error.code;
|
|
186
|
-
|
|
186
|
+
if (!(error instanceof UnreadableConnectorSelection)) {
|
|
187
|
+
const path = reconcileCursorPath();
|
|
188
|
+
gaps.add("EXTENSIONS_UNREADABLE", `the connector seed cursor at ${path} could not be read${code ? ` (${code})` : ""}`, { path });
|
|
189
|
+
}
|
|
187
190
|
}
|
|
188
191
|
const skewedExtensions = extensions.items?.filter((item) => item.package.startsWith("@cotal-ai/") && item.version !== machine.version) ?? [];
|
|
189
192
|
const extensionWarnings = skewedExtensions.length ? [{
|
|
@@ -216,8 +219,10 @@ export async function status(args) {
|
|
|
216
219
|
}
|
|
217
220
|
}
|
|
218
221
|
const meshes = await readMeshes(cwd, selected, Boolean(values.all), gaps, offline, preflight);
|
|
219
|
-
const
|
|
220
|
-
|
|
222
|
+
const { maintenance, sourceMissing } = blocked
|
|
223
|
+
? { maintenance: { root, space: null, state: "unreadable", attemptId: null, next: null }, sourceMissing: false }
|
|
224
|
+
: readMaintenance(root, gaps);
|
|
225
|
+
const recovery = backupRecovery(maintenance, sourceMissing);
|
|
221
226
|
const selectedHints = [];
|
|
222
227
|
const target = await readSelected(selected, responder, folder, gaps, selectedHints, preflight);
|
|
223
228
|
// Do not offer the conditional store reset when this folder needs a channel seed repair first,
|
|
@@ -229,12 +234,15 @@ export async function status(args) {
|
|
|
229
234
|
? `if the stored JetStream state is stale: \`${cmd} reset store ${resetSpace}\`, then \`up\` with your usual flags`
|
|
230
235
|
: `if the stored JetStream state is stale: \`${cmd} clean store --force\`, then \`up\` with your usual flags (\`clean all\` also resets identity)`);
|
|
231
236
|
}
|
|
232
|
-
// A held backup
|
|
237
|
+
// A held backup or missing preserved store blocks startup. Keep the selection's diagnostics,
|
|
233
238
|
// but replace its ordinary restart advice with the journal's recovery step.
|
|
234
239
|
if (recovery)
|
|
235
240
|
hints.unshift(recovery);
|
|
236
|
-
|
|
241
|
+
const recoveringOtherSpace = sourceMissing && maintenance !== null && (target.space !== maintenance.space || target.root !== undefined && !sameDir(target.root, maintenance.root));
|
|
242
|
+
if (!recovery || recoveringOtherSpace)
|
|
237
243
|
hints.push(...selectedHints);
|
|
244
|
+
if (sourceMissing && maintenance?.space)
|
|
245
|
+
withdrawOperationNote("FOLDER_SPACE_NOT_RUNNING", maintenance.space);
|
|
238
246
|
if (!blocked)
|
|
239
247
|
readStackStoreWarnings(root, gaps, hints);
|
|
240
248
|
if (selected.ok && selected.target.origin === "up" && !sameDir(root, selected.target.root))
|
|
@@ -291,6 +299,7 @@ export async function status(args) {
|
|
|
291
299
|
preparedHarness: !selected.ok && isWorkspaceTargetError(selected.error) && selected.error.code === "not-started" && preparedNeverStarted(selected.error.details)
|
|
292
300
|
? preferences.spaces[selected.error.details.space]?.harness : undefined,
|
|
293
301
|
seed,
|
|
302
|
+
recovery,
|
|
294
303
|
}));
|
|
295
304
|
if (values.components)
|
|
296
305
|
await printComponentHealth(selected, store);
|
|
@@ -316,13 +325,14 @@ function readMaintenance(root, gaps) {
|
|
|
316
325
|
try {
|
|
317
326
|
const journal = readMaintenanceJournal(root);
|
|
318
327
|
if (!journal)
|
|
319
|
-
return null;
|
|
328
|
+
return { maintenance: null, sourceMissing: false };
|
|
320
329
|
const rolledBack = "restore" in journal ? restoreRolledBackRuns(journal) : undefined;
|
|
321
|
-
|
|
330
|
+
const { attemptId, next, sourceMissing = false } = maintenanceNextStep(root, journal);
|
|
331
|
+
return { maintenance: { root, space: journal.space, state: journal.state, attemptId, next, ...(rolledBack?.runs.length ? { rolledBackRuns: rolledBack.runs, ...(rolledBack.more ? { rolledBackRunsMore: rolledBack.more } : {}) } : {}) }, sourceMissing };
|
|
322
332
|
}
|
|
323
333
|
catch {
|
|
324
334
|
gaps.add("MAINTENANCE_JOURNAL_UNREADABLE", "this folder's maintenance journal could not be read; no absent or settled state was inferred", { root });
|
|
325
|
-
return { root, space: null, state: "unreadable", attemptId: null, next: null };
|
|
335
|
+
return { maintenance: { root, space: null, state: "unreadable", attemptId: null, next: null }, sourceMissing: false };
|
|
326
336
|
}
|
|
327
337
|
}
|
|
328
338
|
/** Local boot and additive intents are recovery coordinates, not evidence of native state. */
|
|
@@ -511,10 +521,22 @@ function readSkills(gaps) {
|
|
|
511
521
|
* installed", which is ambiguous on a fresh binary before its first seed. Versions are the manifest
|
|
512
522
|
* pin (add-time), not a live on-disk/host-compat check. */
|
|
513
523
|
function readExtensions(gaps) {
|
|
524
|
+
let root;
|
|
525
|
+
try {
|
|
526
|
+
root = extensionsDir();
|
|
527
|
+
}
|
|
528
|
+
catch (error) {
|
|
529
|
+
if (!(error instanceof UnreadableConnectorSelection))
|
|
530
|
+
throw error;
|
|
531
|
+
// The existing result requires a path. Use the containing config directory, not an invented
|
|
532
|
+
// extension prefix, and leave the inventory explicitly unknown.
|
|
533
|
+
gaps.add("EXTENSIONS_UNREADABLE", error.message);
|
|
534
|
+
return { root: globalConfigDir(), items: null };
|
|
535
|
+
}
|
|
514
536
|
const { versions, unreadable } = readExtensionVersions();
|
|
515
537
|
if (unreadable !== undefined)
|
|
516
538
|
gaps.add("EXTENSIONS_UNREADABLE", `the extensions manifest could not be read: ${unreadable}`);
|
|
517
|
-
return { root
|
|
539
|
+
return { root, items: unreadable === undefined ? versions.map((e) => ({ package: e.pkg, label: e.label, version: e.version })) : null };
|
|
518
540
|
}
|
|
519
541
|
/** The lease `holder` the delivery daemon THIS WORKSPACE launched would write, or `undefined` when it
|
|
520
542
|
* cannot be known (#1576, and the reason is #837).
|
|
@@ -1291,8 +1313,9 @@ async function readSelected(selected, responder, folder, gaps, hints, preflight)
|
|
|
1291
1313
|
// A copy or a moved folder is reported under the space its records name, as the commands run here
|
|
1292
1314
|
// refuse under it, and says what the folder holds; Next gives the step they name.
|
|
1293
1315
|
const elsewhere = e.code === "not-started" ? recordsElsewhereText(d) : undefined;
|
|
1316
|
+
const held = e.code === "not-started" && d.stopped && !d.unsettled && d.root && d.space ? await stoppedStackAddressProblem(d.root, d.space) : undefined;
|
|
1294
1317
|
const result = {
|
|
1295
|
-
resolved: false, code: e.code, message: elsewhere ?? message,
|
|
1318
|
+
resolved: false, code: e.code, message: elsewhere ?? (held ? `${message}; ${held.message}` : message),
|
|
1296
1319
|
...(e.code === "not-started" && d.space !== undefined && d.root !== undefined && !d.rootMissing ? { space: d.space, root: d.root } : {}),
|
|
1297
1320
|
...(elsewhere !== undefined ? { space: targetErrorSpace(d), recordedRoot: d.recordedRoot } : {}),
|
|
1298
1321
|
};
|
|
@@ -1324,10 +1347,10 @@ async function readSelected(selected, responder, folder, gaps, hints, preflight)
|
|
|
1324
1347
|
hints.push(`Restart blocked: ${block.message}. ${block.remedy}`);
|
|
1325
1348
|
}
|
|
1326
1349
|
else
|
|
1327
|
-
hints.push(remedy === undefined ? message : displayRemedy(remedy, cmd));
|
|
1350
|
+
hints.push(held?.remedy ?? (remedy === undefined ? message : displayRemedy(remedy, cmd)));
|
|
1328
1351
|
}
|
|
1329
1352
|
else if (!d.unsettled || !servedStack(folder, result)) {
|
|
1330
|
-
hints.push(remedy === undefined ? message : displayRemedy(remedy, cmd));
|
|
1353
|
+
hints.push(held?.remedy ?? (remedy === undefined ? message : displayRemedy(remedy, cmd)));
|
|
1331
1354
|
}
|
|
1332
1355
|
else if (!folder.stackBlock && !folder.stackUnfinished)
|
|
1333
1356
|
hints.push(`start it with ${codeSpan(`${cmd} up`)} in ${d.root}`);
|
|
@@ -2061,17 +2084,16 @@ function stackLines(folder) {
|
|
|
2061
2084
|
function roleList(roles) {
|
|
2062
2085
|
return roles.length > 1 ? `${roles.slice(0, -1).join(", ")} and ${roles.at(-1)}` : roles[0] ?? "";
|
|
2063
2086
|
}
|
|
2064
|
-
/** Pre-commit backup claims
|
|
2065
|
-
function backupRecovery(maintenance) {
|
|
2066
|
-
return maintenance
|
|
2087
|
+
/** Pre-commit backup claims and ready cuts with a missing source block ordinary startup. */
|
|
2088
|
+
function backupRecovery(maintenance, sourceMissing = false) {
|
|
2089
|
+
return maintenance && (maintenance.state === "claimed" || maintenance.state === "restore-ready" || sourceMissing) ? maintenance.next : null;
|
|
2067
2090
|
}
|
|
2068
|
-
function nextActions(r, seedFailed, interactive, preparedHarness) {
|
|
2091
|
+
function nextActions(r, seedFailed, interactive, recovery, preparedHarness) {
|
|
2069
2092
|
if (seedFailed)
|
|
2070
2093
|
return {
|
|
2071
2094
|
title: "Next",
|
|
2072
2095
|
blocks: [{ kind: "lines", lines: r.hints.flatMap(hint => hint.split("\n").map(line => cell(line, "hint"))) }],
|
|
2073
2096
|
};
|
|
2074
|
-
const recovery = backupRecovery(r.maintenance);
|
|
2075
2097
|
if (recovery)
|
|
2076
2098
|
return { title: "Next", blocks: [...new Set([recovery, ...r.hints])].map((hint) => ({ kind: "lines", lines: [cell(hint, "hint")] })) };
|
|
2077
2099
|
const cmd = displayCmd();
|
|
@@ -2282,7 +2304,7 @@ function maintenanceOverview(maintenance) {
|
|
|
2282
2304
|
}
|
|
2283
2305
|
/** The approved screen hierarchy; record-level diagnostics are opt-in. `wide` reports every row in
|
|
2284
2306
|
* full, as `--all` and `--wide` ask. */
|
|
2285
|
-
export function statusView(r, verbose = false, wide = false, { interactive = false, preparedHarness, seed } = {}) {
|
|
2307
|
+
export function statusView(r, verbose = false, wide = false, { interactive = false, preparedHarness, seed, recovery = backupRecovery(r.maintenance) } = {}) {
|
|
2286
2308
|
const selected = selectedOverview(r);
|
|
2287
2309
|
// This folder's own stack under another selection, with the lines it has when it is selected.
|
|
2288
2310
|
const held = folderStack(r.folder, r.selected), heldLines = held ? stackLines(r.folder) : [];
|
|
@@ -2293,7 +2315,7 @@ export function statusView(r, verbose = false, wide = false, { interactive = fal
|
|
|
2293
2315
|
const sections = [machineOverview(r, wide, interactive, seed), spacesOverview(r, wide, Boolean(seed)), ...(selected ? [selected] : []), ...(heldSection ? [heldSection] : []), ...(maintenance ? [maintenance] : []), ...(attempts ? [attempts] : []), ...(owned ? [owned] : [])];
|
|
2294
2316
|
if (verbose)
|
|
2295
2317
|
sections.push(machineSection(r.machine), extensionsSection(r.extensions), folderSection(r.folder, r.selected), ...meshesSections(r.meshes), selectedSection(r.selected, r.folder, stackDeliveryPid(r), r.store?.state === "full"));
|
|
2296
|
-
sections.push(nextActions(r, Boolean(seed), interactive, preparedHarness));
|
|
2318
|
+
sections.push(nextActions(r, Boolean(seed), interactive, recovery, preparedHarness));
|
|
2297
2319
|
return { sections };
|
|
2298
2320
|
}
|
|
2299
2321
|
function section(name) {
|