@cotal-ai/cli 0.171.4 → 0.171.5

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.
Files changed (41) hide show
  1. package/dist/command.d.ts.map +1 -1
  2. package/dist/command.js +10 -4
  3. package/dist/command.js.map +1 -1
  4. package/dist/commands/ext.d.ts.map +1 -1
  5. package/dist/commands/ext.js +35 -7
  6. package/dist/commands/ext.js.map +1 -1
  7. package/dist/commands/service-actions.d.ts.map +1 -1
  8. package/dist/commands/service-actions.js +22 -12
  9. package/dist/commands/service-actions.js.map +1 -1
  10. package/dist/commands/space.d.ts.map +1 -1
  11. package/dist/commands/space.js +8 -6
  12. package/dist/commands/space.js.map +1 -1
  13. package/dist/commands/spawn.js +1 -1
  14. package/dist/commands/spawn.js.map +1 -1
  15. package/dist/commands/status.d.ts.map +1 -1
  16. package/dist/commands/status.js +9 -9
  17. package/dist/commands/status.js.map +1 -1
  18. package/dist/commands/update.d.ts +1 -0
  19. package/dist/commands/update.d.ts.map +1 -1
  20. package/dist/commands/update.js +122 -21
  21. package/dist/commands/update.js.map +1 -1
  22. package/dist/commands/whoami.d.ts.map +1 -1
  23. package/dist/commands/whoami.js +2 -1
  24. package/dist/commands/whoami.js.map +1 -1
  25. package/dist/lib/extension-stage.d.ts +1 -1
  26. package/dist/lib/extension-stage.d.ts.map +1 -1
  27. package/dist/lib/extension-stage.js +26 -11
  28. package/dist/lib/extension-stage.js.map +1 -1
  29. package/dist/lib/self-exec.d.ts +2 -0
  30. package/dist/lib/self-exec.d.ts.map +1 -1
  31. package/dist/lib/self-exec.js +5 -1
  32. package/dist/lib/self-exec.js.map +1 -1
  33. package/dist/lib/service-preset-target.d.ts +2 -1
  34. package/dist/lib/service-preset-target.d.ts.map +1 -1
  35. package/dist/lib/service-preset-target.js +11 -2
  36. package/dist/lib/service-preset-target.js.map +1 -1
  37. package/dist/seed/reconcile.d.ts +2 -0
  38. package/dist/seed/reconcile.d.ts.map +1 -1
  39. package/dist/seed/reconcile.js +30 -11
  40. package/dist/seed/reconcile.js.map +1 -1
  41. package/package.json +4 -4
@@ -3,7 +3,7 @@ import { drainAndClose } from "@cotal-ai/core";
3
3
  import { homedir } from "node:os";
4
4
  import { join } from "node:path";
5
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, renderWorkspaceError, resolveMeshTarget, serverFlag, spaceFlag, userAuthStateDir, WEB_PIDFILE, workspaceSecretStore, displayWidth, terminalWidth, wrapWords, writeResult, workspaceErrorParts, preferencesPath, preferencesFolderWarning, cotalDirLink, movedProject, spaceStreamsAbsent, spaceStreamsExpected, resolveControlTarget, } from "@cotal-ai/workspace";
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";
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";
@@ -16,7 +16,7 @@ import { brokerStoreWrite, storeFull, storeWriteRepair } from "../lib/broker-sto
16
16
  import { chatStreamGone, stackState } from "../lib/space-streams.js";
17
17
  import { pidfileState } from "./down.js";
18
18
  import { selectResetTarget } from "./reset-store-apply.js";
19
- import { displayCmd } from "../lib/self-exec.js";
19
+ import { displayCmd, displayRemedy } from "../lib/self-exec.js";
20
20
  import { shellWord } from "../lib/endpoint-errors.js";
21
21
  import { readPersonas } from "../lib/personas.js";
22
22
  import { c } from "../ui.js";
@@ -1324,14 +1324,13 @@ async function readSelected(selected, responder, folder, gaps, hints, preflight)
1324
1324
  hints.push(`Restart blocked: ${block.message}. ${block.remedy}`);
1325
1325
  }
1326
1326
  else
1327
- hints.push(remedy ?? message);
1327
+ hints.push(remedy === undefined ? message : displayRemedy(remedy, cmd));
1328
1328
  }
1329
1329
  else if (!d.unsettled || !servedStack(folder, result)) {
1330
- const step = remedy ?? message;
1331
- hints.push(e.code === "no-meshes" && d.root === undefined ? step.replaceAll("`cotal ", () => `\`${cmd} `) : step);
1330
+ hints.push(remedy === undefined ? message : displayRemedy(remedy, cmd));
1332
1331
  }
1333
1332
  else if (!folder.stackBlock && !folder.stackUnfinished)
1334
- hints.push(`start it with \`cotal up\` in ${d.root}`);
1333
+ hints.push(`start it with ${codeSpan(`${cmd} up`)} in ${d.root}`);
1335
1334
  return result;
1336
1335
  }
1337
1336
  const target = selected.target;
@@ -1417,11 +1416,11 @@ async function readSelected(selected, responder, folder, gaps, hints, preflight)
1417
1416
  else if (seedBlock)
1418
1417
  hints.push(`${message}. Restart blocked: ${seedBlock.message}. ${seedBlock.remedy}`);
1419
1418
  else
1420
- hints.push(remedy === undefined ? message : `${message}; ${remedy}`);
1419
+ hints.push(remedy === undefined ? message : `${message}; ${displayRemedy(remedy, cmd)}`);
1421
1420
  }
1422
1421
  if (preflight.kind === "non-nats-listener" || preflight.kind === "auth-unsupported" || preflight.kind === "jetstream-unsupported") {
1423
1422
  const { message, remedy } = workspaceErrorParts({ kind: "preflight", failure: preflight.kind, target, pruned: false });
1424
- hints.push(remedy === undefined ? message : `${message}; ${remedy}`);
1423
+ hints.push(remedy === undefined ? message : `${message}; ${displayRemedy(remedy, cmd)}`);
1425
1424
  }
1426
1425
  return { ...base, connection: preflight.kind, ...(seedBlock ? { channelSeedBlocksRestart: true } : {}), ...(preflight.pid === undefined ? {} : { brokerPid: preflight.pid }), staleRecord: preflight.prune && !offline, snapshot: { state: "skipped", reason: "broker not connected" } };
1427
1426
  }
@@ -2854,7 +2853,8 @@ async function printComponentHealth(selected, store) {
2854
2853
  }
2855
2854
  if (isWorkspaceTargetError(e)) {
2856
2855
  const verdict = e.code === "not-started" ? "absent" : "refused";
2857
- printComponent({ name: "target", verdict, facts: [e.code, renderWorkspaceError({ kind: "target", error: e }).replace(/^✗ /, "")] });
2856
+ const { message, remedy } = workspaceErrorParts({ kind: "target", error: e });
2857
+ printComponent({ name: "target", verdict, facts: [e.code, remedy === undefined ? message : `${message} - ${displayRemedy(remedy)}`] });
2858
2858
  process.exitCode = COMPONENT_EXIT[verdict];
2859
2859
  return;
2860
2860
  }