@cotal-ai/cli 0.172.2 → 0.174.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 +32 -16
- package/dist/command.js.map +1 -1
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +22 -11
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/backup.d.ts.map +1 -1
- package/dist/commands/backup.js +15 -10
- package/dist/commands/backup.js.map +1 -1
- package/dist/commands/channel-members.d.ts.map +1 -1
- package/dist/commands/channel-members.js +29 -2
- package/dist/commands/channel-members.js.map +1 -1
- package/dist/commands/channels.d.ts.map +1 -1
- package/dist/commands/channels.js +12 -2
- package/dist/commands/channels.js.map +1 -1
- package/dist/commands/clean.d.ts +1 -0
- package/dist/commands/clean.d.ts.map +1 -1
- package/dist/commands/clean.js +20 -5
- package/dist/commands/clean.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +36 -14
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/down-preserve.d.ts +74 -0
- package/dist/commands/down-preserve.d.ts.map +1 -0
- package/dist/commands/down-preserve.js +626 -0
- package/dist/commands/down-preserve.js.map +1 -0
- package/dist/commands/down.d.ts +2 -61
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +10 -621
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/ext.d.ts.map +1 -1
- package/dist/commands/ext.js +22 -5
- package/dist/commands/ext.js.map +1 -1
- package/dist/commands/help.d.ts +1 -1
- package/dist/commands/help.js +1 -1
- package/dist/commands/history.d.ts +10 -2
- package/dist/commands/history.d.ts.map +1 -1
- package/dist/commands/history.js +21 -9
- package/dist/commands/history.js.map +1 -1
- package/dist/commands/join.js +5 -1
- package/dist/commands/join.js.map +1 -1
- package/dist/commands/meshes-add.d.ts +2 -3
- package/dist/commands/meshes-add.d.ts.map +1 -1
- package/dist/commands/meshes-add.js +3 -19
- package/dist/commands/meshes-add.js.map +1 -1
- package/dist/commands/mint-endpoint-caller.d.ts.map +1 -1
- package/dist/commands/mint-endpoint-caller.js +13 -2
- package/dist/commands/mint-endpoint-caller.js.map +1 -1
- package/dist/commands/mint.d.ts.map +1 -1
- package/dist/commands/mint.js +10 -2
- package/dist/commands/mint.js.map +1 -1
- package/dist/commands/persona.js +3 -3
- package/dist/commands/persona.js.map +1 -1
- package/dist/commands/personas.js +1 -1
- package/dist/commands/personas.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +10 -6
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +17 -1
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/space-registration.d.ts.map +1 -1
- package/dist/commands/space-registration.js +8 -8
- package/dist/commands/space-registration.js.map +1 -1
- package/dist/commands/space.d.ts.map +1 -1
- package/dist/commands/space.js +16 -6
- package/dist/commands/space.js.map +1 -1
- package/dist/commands/spawn-managed-launch.d.ts.map +1 -1
- package/dist/commands/spawn-managed-launch.js +6 -4
- package/dist/commands/spawn-managed-launch.js.map +1 -1
- package/dist/commands/spawn-preview.d.ts.map +1 -1
- package/dist/commands/spawn-preview.js +8 -5
- package/dist/commands/spawn-preview.js.map +1 -1
- package/dist/commands/spawn.d.ts.map +1 -1
- package/dist/commands/spawn.js +3 -3
- package/dist/commands/spawn.js.map +1 -1
- package/dist/commands/stack-up.d.ts +3 -1
- package/dist/commands/stack-up.d.ts.map +1 -1
- package/dist/commands/stack-up.js +50 -16
- package/dist/commands/stack-up.js.map +1 -1
- package/dist/commands/status-delivery.d.ts +9 -0
- package/dist/commands/status-delivery.d.ts.map +1 -0
- package/dist/commands/status-delivery.js +19 -0
- package/dist/commands/status-delivery.js.map +1 -0
- package/dist/commands/status-legacy.d.ts +7 -0
- package/dist/commands/status-legacy.d.ts.map +1 -0
- package/dist/commands/status-legacy.js +35 -0
- package/dist/commands/status-legacy.js.map +1 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +45 -86
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/team-agent-apply.js +11 -11
- package/dist/commands/team-agent-apply.js.map +1 -1
- package/dist/commands/team-deploy-apply.d.ts.map +1 -1
- package/dist/commands/team-deploy-apply.js +2 -4
- package/dist/commands/team-deploy-apply.js.map +1 -1
- package/dist/commands/team.js +12 -19
- package/dist/commands/team.js.map +1 -1
- package/dist/commands/up-pending.d.ts +24 -0
- package/dist/commands/up-pending.d.ts.map +1 -0
- package/dist/commands/up-pending.js +5 -0
- package/dist/commands/up-pending.js.map +1 -0
- package/dist/commands/up.d.ts +3 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +56 -80
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/update-continuity.d.ts +47 -0
- package/dist/commands/update-continuity.d.ts.map +1 -0
- package/dist/commands/update-continuity.js +430 -0
- package/dist/commands/update-continuity.js.map +1 -0
- package/dist/commands/update-process.d.ts +26 -0
- package/dist/commands/update-process.d.ts.map +1 -0
- package/dist/commands/update-process.js +283 -0
- package/dist/commands/update-process.js.map +1 -0
- package/dist/commands/update-release.d.ts +32 -0
- package/dist/commands/update-release.d.ts.map +1 -0
- package/dist/commands/update-release.js +232 -0
- package/dist/commands/update-release.js.map +1 -0
- package/dist/commands/update.d.ts +6 -54
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +25 -949
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/use.d.ts.map +1 -1
- package/dist/commands/use.js +4 -7
- package/dist/commands/use.js.map +1 -1
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +5 -2
- package/dist/commands/watch.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +3 -2
- package/dist/commands/whoami.js.map +1 -1
- package/dist/console/commands.js +2 -2
- package/dist/console/commands.js.map +1 -1
- package/dist/help.d.ts +1 -1
- package/dist/help.d.ts.map +1 -1
- package/dist/help.js +5 -1
- package/dist/help.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/choose-target.d.ts +2 -0
- package/dist/lib/choose-target.d.ts.map +1 -1
- package/dist/lib/choose-target.js +28 -10
- package/dist/lib/choose-target.js.map +1 -1
- package/dist/lib/credential-authority.d.ts +1 -1
- package/dist/lib/credential-authority.d.ts.map +1 -1
- package/dist/lib/credential-authority.js +8 -3
- package/dist/lib/credential-authority.js.map +1 -1
- package/dist/lib/endpoint-errors.d.ts.map +1 -1
- package/dist/lib/endpoint-errors.js +9 -2
- package/dist/lib/endpoint-errors.js.map +1 -1
- package/dist/lib/foreground-hold.d.ts +2 -0
- package/dist/lib/foreground-hold.d.ts.map +1 -1
- package/dist/lib/foreground-hold.js +47 -1
- package/dist/lib/foreground-hold.js.map +1 -1
- package/dist/lib/mint-renewal.d.ts +5 -0
- package/dist/lib/mint-renewal.d.ts.map +1 -0
- package/dist/lib/mint-renewal.js +60 -0
- package/dist/lib/mint-renewal.js.map +1 -0
- package/dist/lib/persona-files.d.ts +1 -1
- package/dist/lib/persona-files.d.ts.map +1 -1
- package/dist/lib/persona-files.js +6 -7
- package/dist/lib/persona-files.js.map +1 -1
- package/dist/lib/restore-streams.d.ts +18 -0
- package/dist/lib/restore-streams.d.ts.map +1 -0
- package/dist/lib/restore-streams.js +275 -0
- package/dist/lib/restore-streams.js.map +1 -0
- package/dist/lib/restore.d.ts +2 -0
- package/dist/lib/restore.d.ts.map +1 -1
- package/dist/lib/restore.js +5 -273
- package/dist/lib/restore.js.map +1 -1
- package/dist/lib/self-exec.d.ts +5 -2
- package/dist/lib/self-exec.d.ts.map +1 -1
- package/dist/lib/self-exec.js +6 -3
- package/dist/lib/self-exec.js.map +1 -1
- package/dist/lib/spawn-defaults.d.ts +2 -0
- package/dist/lib/spawn-defaults.d.ts.map +1 -1
- package/dist/lib/spawn-defaults.js +11 -0
- package/dist/lib/spawn-defaults.js.map +1 -1
- package/dist/lib/stack-journal.d.ts +3 -1
- package/dist/lib/stack-journal.d.ts.map +1 -1
- package/dist/lib/stack-journal.js +20 -1
- package/dist/lib/stack-journal.js.map +1 -1
- package/dist/lib/store-dir.d.ts +3 -1
- package/dist/lib/store-dir.d.ts.map +1 -1
- package/dist/lib/store-dir.js +20 -4
- package/dist/lib/store-dir.js.map +1 -1
- package/dist/lib/team-deploy-inspection.d.ts +2 -1
- package/dist/lib/team-deploy-inspection.d.ts.map +1 -1
- package/dist/lib/team-deploy-inspection.js +6 -1
- package/dist/lib/team-deploy-inspection.js.map +1 -1
- package/dist/lib/update-connector-config.d.ts +2 -0
- package/dist/lib/update-connector-config.d.ts.map +1 -1
- package/dist/lib/update-connector-config.js +15 -1
- package/dist/lib/update-connector-config.js.map +1 -1
- package/dist/lib/update-managers.d.ts.map +1 -1
- package/dist/lib/update-managers.js +11 -3
- package/dist/lib/update-managers.js.map +1 -1
- package/dist/lib/update-recovery-state.d.ts +7 -0
- package/dist/lib/update-recovery-state.d.ts.map +1 -1
- package/dist/lib/update-recovery-state.js +55 -2
- package/dist/lib/update-recovery-state.js.map +1 -1
- package/dist/lib/update-snapshot.d.ts.map +1 -1
- package/dist/lib/update-snapshot.js +14 -7
- package/dist/lib/update-snapshot.js.map +1 -1
- package/dist/seed/launch.d.ts +1 -1
- package/dist/seed/launch.d.ts.map +1 -1
- package/dist/seed/launch.js +3 -3
- package/dist/seed/launch.js.map +1 -1
- package/dist/seed/lock.d.ts +1 -1
- package/dist/seed/lock.d.ts.map +1 -1
- package/dist/seed/lock.js +3 -2
- package/dist/seed/lock.js.map +1 -1
- package/dist/telemetry.d.ts +6 -0
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +6 -3
- package/dist/telemetry.js.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MeshTarget, Tone } from "@cotal-ai/workspace";
|
|
2
|
+
import { type DeliveryResponderState } from "../lib/delivery-responder.js";
|
|
3
|
+
/** The delivery responder row shared by compact and verbose status. An open mesh with no lease
|
|
4
|
+
* does not use a delivery daemon. */
|
|
5
|
+
export declare function responderText(state: DeliveryResponderState | null, mode: MeshTarget["mode"], stackBlocked?: boolean, deliveryPid?: number, storeFull?: boolean): {
|
|
6
|
+
text: string;
|
|
7
|
+
tone: Tone;
|
|
8
|
+
} | undefined;
|
|
9
|
+
//# sourceMappingURL=status-delivery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-delivery.d.ts","sourceRoot":"","sources":["../../src/commands/status-delivery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAuD,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAGhI;sCACsC;AACtC,wBAAgB,aAAa,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,UAAQ,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GAAG,SAAS,CAWrM"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RESPONDER_STALE_TEXT, RESPONDER_UNBOUND_CONSEQUENCE } from "../lib/delivery-responder.js";
|
|
2
|
+
import { displayCmd } from "../lib/self-exec.js";
|
|
3
|
+
/** The delivery responder row shared by compact and verbose status. An open mesh with no lease
|
|
4
|
+
* does not use a delivery daemon. */
|
|
5
|
+
export function responderText(state, mode, stackBlocked = false, deliveryPid, storeFull = false) {
|
|
6
|
+
if (state === null && mode === "open")
|
|
7
|
+
return { text: "not used - an open mesh runs no delivery daemon", tone: "hint" };
|
|
8
|
+
// `up` starts no second daemon beside a running delivery member.
|
|
9
|
+
if (state === "unbound" && deliveryPid !== undefined)
|
|
10
|
+
return { text: `no lease · stack-delivery pid ${deliveryPid} is alive but holds no lease, so it is starting or not responding`, tone: "failed" };
|
|
11
|
+
if (state === "unbound")
|
|
12
|
+
return { text: `NOT BOUND - ${RESPONDER_UNBOUND_CONSEQUENCE} · ${stackBlocked ? `\`${displayCmd()} up\` refuses until the stack block is cleared, as Next shows` : storeFull ? `the full store refuses its lease, so \`${displayCmd()} up\` starts it only once there is room, as Next shows` : `start it with \`${displayCmd()} up\``}`, tone: "failed" };
|
|
13
|
+
if (state === "stale")
|
|
14
|
+
return { text: `NOT BOUND - ${RESPONDER_STALE_TEXT} · \`${displayCmd()} up\` restarts it, after waiting out the lease`, tone: "failed" };
|
|
15
|
+
if (state === "bound")
|
|
16
|
+
return { text: "bound", tone: "ok" };
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=status-delivery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-delivery.js","sourceRoot":"","sources":["../../src/commands/status-delivery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAA+B,MAAM,8BAA8B,CAAC;AAChI,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;sCACsC;AACtC,MAAM,UAAU,aAAa,CAAC,KAAoC,EAAE,IAAwB,EAAE,YAAY,GAAG,KAAK,EAAE,WAAoB,EAAE,SAAS,GAAG,KAAK;IACzJ,IAAI,KAAK,KAAK,IAAI,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,EAAE,IAAI,EAAE,iDAAiD,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxH,iEAAiE;IACjE,IAAI,KAAK,KAAK,SAAS,IAAI,WAAW,KAAK,SAAS;QAClD,OAAO,EAAE,IAAI,EAAE,iCAAiC,WAAW,mEAAmE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IACnJ,IAAI,KAAK,KAAK,SAAS;QACrB,OAAO,EAAE,IAAI,EAAE,eAAe,6BAA6B,MAAM,YAAY,CAAC,CAAC,CAAC,KAAK,UAAU,EAAE,+DAA+D,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,0CAA0C,UAAU,EAAE,wDAAwD,CAAC,CAAC,CAAC,mBAAmB,UAAU,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC7V,IAAI,KAAK,KAAK,OAAO;QACnB,OAAO,EAAE,IAAI,EAAE,eAAe,oBAAoB,QAAQ,UAAU,EAAE,gDAAgD,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC3I,IAAI,KAAK,KAAK,OAAO;QAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5D,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type MeshTarget } from "@cotal-ai/workspace";
|
|
2
|
+
/** The local registration supplies the space of an open broker with no space-scoped pidfiles.
|
|
3
|
+
* Named runtime records take precedence, and a different address supplies no local evidence. */
|
|
4
|
+
export declare function statusRuntimeSpace(root: string, target?: MeshTarget): string;
|
|
5
|
+
/** Whether this legacy broker start had a manager that has exited, rather than omitting it. */
|
|
6
|
+
export declare function legacyManagerStopped(root: string, space: string, id: string | undefined): boolean;
|
|
7
|
+
//# sourceMappingURL=status-legacy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-legacy.d.ts","sourceRoot":"","sources":["../../src/commands/status-legacy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmG,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGvJ;gGACgG;AAChG,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,CAM5E;AAED,+FAA+F;AAC/F,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAUjG"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { statSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { brokerUrlKey, canonicalRoot, NATS_PIDFILE, recordedRuntimeSpaces, resolveRuntimeSpace, spaceKey } from "@cotal-ai/workspace";
|
|
4
|
+
import { managerLogPath } from "../lib/manager-proc.js";
|
|
5
|
+
/** The local registration supplies the space of an open broker with no space-scoped pidfiles.
|
|
6
|
+
* Named runtime records take precedence, and a different address supplies no local evidence. */
|
|
7
|
+
export function statusRuntimeSpace(root, target) {
|
|
8
|
+
if (target?.mode === "open" && target.origin === "up" && canonicalRoot(target.root) === canonicalRoot(root)
|
|
9
|
+
&& (target.source !== "flag-server" && target.source !== "flag-space-override"
|
|
10
|
+
|| target.recordedServer !== undefined && brokerUrlKey(target.recordedServer) === brokerUrlKey(target.server))
|
|
11
|
+
&& recordedRuntimeSpaces(root).length === 0)
|
|
12
|
+
return target.space;
|
|
13
|
+
return resolveRuntimeSpace(root);
|
|
14
|
+
}
|
|
15
|
+
/** Whether this legacy broker start had a manager that has exited, rather than omitting it. */
|
|
16
|
+
export function legacyManagerStopped(root, space, id) {
|
|
17
|
+
if (id === undefined)
|
|
18
|
+
return false;
|
|
19
|
+
let brokerMtime;
|
|
20
|
+
try {
|
|
21
|
+
brokerMtime = statSync(join(root, ".cotal", NATS_PIDFILE), { bigint: true }).mtimeNs;
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
for (const path of [managerLogPath(space, root), join(root, ".cotal", `manager-execution.${spaceKey(space)}.${id}.json`)]) {
|
|
27
|
+
try {
|
|
28
|
+
if (statSync(path, { bigint: true }).mtimeNs >= brokerMtime)
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
catch { /* absent or unreadable candidate */ }
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=status-legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-legacy.js","sourceRoot":"","sources":["../../src/commands/status-legacy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,QAAQ,EAAmB,MAAM,qBAAqB,CAAC;AACvJ,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;gGACgG;AAChG,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,MAAmB;IAClE,IAAI,MAAM,EAAE,IAAI,KAAK,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,IAAI,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,aAAa,CAAC,IAAI,CAAC;WACtG,CAAC,MAAM,CAAC,MAAM,KAAK,aAAa,IAAI,MAAM,CAAC,MAAM,KAAK,qBAAqB;eACzE,MAAM,CAAC,cAAc,KAAK,SAAS,IAAI,YAAY,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;WAC7G,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC;IACnE,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,+FAA+F;AAC/F,MAAM,UAAU,oBAAoB,CAAC,IAAY,EAAE,KAAa,EAAE,EAAsB;IACtF,IAAI,EAAE,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACnC,IAAI,WAAmB,CAAC;IACxB,IAAI,CAAC;QAAC,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC;IAAC,CAAC;IAC7F,MAAM,CAAC;QAAC,OAAO,KAAK,CAAC;IAAC,CAAC;IACvB,KAAK,MAAM,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,qBAAqB,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;QAC1H,IAAI,CAAC;YAAC,IAAI,QAAQ,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,IAAI,WAAW;gBAAE,OAAO,IAAI,CAAC;QAAC,CAAC;QACjF,MAAM,CAAC,CAAC,oCAAoC,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,EAA+I,KAAK,aAAa,EAAE,MAAM,kBAAkB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|
-
import { accessSync, constants, existsSync, lstatSync
|
|
1
|
+
import { accessSync, constants, existsSync, lstatSync } 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
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, isGenuineSpace, 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,
|
|
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, isGenuineSpace, 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, 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";
|
|
10
|
-
import { managerHasDeliveryMarker
|
|
10
|
+
import { managerHasDeliveryMarker } from "../lib/manager-proc.js";
|
|
11
11
|
import { MANAGER_OMITTED } from "../lib/delivery-proc.js";
|
|
12
12
|
import { signedInSpace } from "../lib/conversation-identity.js";
|
|
13
|
-
import { connectorHarnesses, connectorStatusRows, machineStatus, recordedWebUrl,
|
|
14
|
-
import {
|
|
13
|
+
import { connectorHarnesses, connectorStatusRows, machineStatus, recordedWebUrl, webBoundAddress, webInstalled, webSessionSource } from "../lib/status.js";
|
|
14
|
+
import { legacyManagerStopped, statusRuntimeSpace } from "./status-legacy.js";
|
|
15
|
+
import { deliveryResponderFromLease, deliveryResponderState, deliveryRowSuffix, RESPONDER_UNBOUND_CONSEQUENCE } from "../lib/delivery-responder.js";
|
|
15
16
|
import { brokerStoreWrite, storeFull, storeWriteRepair } from "../lib/broker-store-health.js";
|
|
16
17
|
import { chatStreamGone, stackState } from "../lib/space-streams.js";
|
|
17
18
|
import { pidfileState } from "./down.js";
|
|
@@ -32,7 +33,7 @@ import { readinessAddressSurvivors } from "../lib/service-process.js";
|
|
|
32
33
|
import { freshTeamAttemptSettled, listFreshTeamAttempts, listFreshTeamSummaries } from "../lib/team-fresh.js";
|
|
33
34
|
import { additiveTeamRecordedState, listAdditiveTeamAttempts } from "../lib/team-additive-attempt.js";
|
|
34
35
|
import { maintenanceNextStep, rolledBackNotes } from "../lib/restore.js";
|
|
35
|
-
import { journalRecordedElsewhere, readStackJournal, serviceHeldRecords, STACK_ADAPTER, STACK_DEFINITION, stackStartedWithoutManager, stackOperationBlock, stackRootGone, unfinishedStackOperation, } from "../lib/stack-journal.js";
|
|
36
|
+
import { journalRecordedElsewhere, readStackJournal, serviceHeldRecords, STACK_ADAPTER, STACK_DEFINITION, stackStartedWithoutManager, stackOperationBlock, stackRootGone, unfinishedStackOperation, unusableStackJournal, } from "../lib/stack-journal.js";
|
|
36
37
|
import { cotalLinkHere, homeHoldsStack, linkedCotalRemedy } from "../lib/paths.js";
|
|
37
38
|
import { channelSeedRestartBlock } from "../lib/channel-seed.js";
|
|
38
39
|
import { rootStoreProblem } from "../lib/store-dir.js";
|
|
@@ -42,6 +43,7 @@ import { askManager } from "@cotal-ai/workspace/control";
|
|
|
42
43
|
import { readCursor } from "../seed/lock.js";
|
|
43
44
|
import { reconcileCursorPath } from "../seed/paths.js";
|
|
44
45
|
import { managerStopImpactFacts } from "./status-stop-impact.js";
|
|
46
|
+
import { responderText } from "./status-delivery.js";
|
|
45
47
|
/** `--components` is the fail-loud health pass with a machine-readable EXIT DISPOSITION. Bare
|
|
46
48
|
* `status` is a broad, recovery-oriented report: it exits 0, or 4 when it could not read part of what
|
|
47
49
|
* it reports; this explicit mode is for an operator or monitor that needs a component state per
|
|
@@ -184,7 +186,7 @@ export async function status(args) {
|
|
|
184
186
|
const blocked = folderReadProblem(root);
|
|
185
187
|
if (blocked) {
|
|
186
188
|
gaps.add("FOLDER_UNREADABLE", `this folder ${root} cannot be read by this account (${blocked}), so nothing in it was read`, { root });
|
|
187
|
-
hints.push(`make it readable by you, for example with chmod u+rx ${root}`);
|
|
189
|
+
hints.push(`make it readable by you, for example with chmod u+rx ${shellWord(root)}`);
|
|
188
190
|
}
|
|
189
191
|
// Every command warns about a preferences folder another account could write; status also lists its fix.
|
|
190
192
|
const preferencesFolder = preferencesFolderWarning();
|
|
@@ -324,7 +326,7 @@ export async function status(args) {
|
|
|
324
326
|
recovery,
|
|
325
327
|
}));
|
|
326
328
|
if (values.components)
|
|
327
|
-
await printComponentHealth(selected, store);
|
|
329
|
+
await printComponentHealth(selected, store, target.resolved && target.connection === "unreachable");
|
|
328
330
|
}
|
|
329
331
|
/** Why this account cannot list or search `root`, or undefined when it can. */
|
|
330
332
|
function folderReadProblem(root) {
|
|
@@ -750,7 +752,7 @@ async function readFolder(root, selected, values, responder, gaps, hints) {
|
|
|
750
752
|
// report that state and stop rather than crashing in the recovery command that names it.
|
|
751
753
|
let space;
|
|
752
754
|
try {
|
|
753
|
-
space = auth?.space ??
|
|
755
|
+
space = auth?.space ?? statusRuntimeSpace(root, selected.ok ? selected.target : undefined);
|
|
754
756
|
}
|
|
755
757
|
catch (e) {
|
|
756
758
|
hints.push(e.message);
|
|
@@ -823,7 +825,7 @@ async function readFolder(root, selected, values, responder, gaps, hints) {
|
|
|
823
825
|
const managerIndex = !unusable && !controllerStack && (nats?.liveness === "alive" || nats?.liveness === "dead")
|
|
824
826
|
? processes.findIndex((row) => row.name === "manager" && row.state === "stopped" && row.pid === null)
|
|
825
827
|
: -1;
|
|
826
|
-
if (managerIndex !== -1 && legacyManagerStopped(root, space))
|
|
828
|
+
if (managerIndex !== -1 && legacyManagerStopped(root, space, localManagerInstanceId(root, space)))
|
|
827
829
|
processes[managerIndex] = { ...processes[managerIndex], detail: "stopped" };
|
|
828
830
|
const noManager = journal !== undefined && controllerStack && stackStartedWithoutManager(journal);
|
|
829
831
|
// An operation cut off with no recorded outcome can keep up and down from settling it; status names
|
|
@@ -1068,28 +1070,6 @@ function localManagerInstanceId(root, space) {
|
|
|
1068
1070
|
return undefined;
|
|
1069
1071
|
}
|
|
1070
1072
|
}
|
|
1071
|
-
/** Whether the legacy stack whose broker pidfile is in `root` started a manager that has since
|
|
1072
|
-
* exited and removed its pidfile (as SIGTERM does), rather than running with `--no-manager`. */
|
|
1073
|
-
function legacyManagerStopped(root, space) {
|
|
1074
|
-
const id = localManagerInstanceId(root, space);
|
|
1075
|
-
if (id === undefined)
|
|
1076
|
-
return false;
|
|
1077
|
-
let brokerMtime;
|
|
1078
|
-
try {
|
|
1079
|
-
brokerMtime = statSync(join(root, ".cotal", NATS_PIDFILE), { bigint: true }).mtimeNs;
|
|
1080
|
-
}
|
|
1081
|
-
catch {
|
|
1082
|
-
return false;
|
|
1083
|
-
}
|
|
1084
|
-
for (const path of [managerLogPath(space, root), join(root, ".cotal", `manager-execution.${spaceKey(space)}.${id}.json`)]) {
|
|
1085
|
-
try {
|
|
1086
|
-
if (statSync(path, { bigint: true }).mtimeNs >= brokerMtime)
|
|
1087
|
-
return true;
|
|
1088
|
-
}
|
|
1089
|
-
catch { /* absent or unreadable candidate */ }
|
|
1090
|
-
}
|
|
1091
|
-
return false;
|
|
1092
|
-
}
|
|
1093
1073
|
/** User-mode manager status goes through the same control call `cotal spawn` uses. `instanceId`
|
|
1094
1074
|
* pins that call to this machine's manager. Without it, the exchange may select another live
|
|
1095
1075
|
* manager of the same owner. */
|
|
@@ -1285,17 +1265,6 @@ function readStackStoreWarnings(root, gaps, hints, space) {
|
|
|
1285
1265
|
// A copied or moved journal is diagnosed by the folder and selection readers.
|
|
1286
1266
|
}
|
|
1287
1267
|
}
|
|
1288
|
-
/** The refusal of the stack journal at `root` when it is one no command can use, as `up` and `down`
|
|
1289
|
-
* refuse it. Undefined when it reads or is absent. */
|
|
1290
|
-
function unusableStackJournal(root) {
|
|
1291
|
-
try {
|
|
1292
|
-
readStackJournal(root);
|
|
1293
|
-
return undefined;
|
|
1294
|
-
}
|
|
1295
|
-
catch (error) {
|
|
1296
|
-
return isCommandFailure(error) && (error.code === "SCHEMA_INVALID" || error.code === "PERMISSION_DENIED") ? error : undefined;
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
1268
|
/** The refusal of `space`'s service instance records when one is a record no command can use, as
|
|
1300
1269
|
* `up` and `down` refuse it. Undefined when they read. */
|
|
1301
1270
|
function unusableServiceInstances(space) {
|
|
@@ -1737,30 +1706,6 @@ function meshesSections(m) {
|
|
|
1737
1706
|
sections.push({ title: "Space Catalog Accounts", blocks: [{ kind: "lines", lines: m.catalogs.map((r) => `${r.idp} ${r.state}${r.error ? `: ${r.error}` : ""}`) }] });
|
|
1738
1707
|
return sections;
|
|
1739
1708
|
}
|
|
1740
|
-
/** The selected space's delivery responder (#1576). Bare status and the verbose mesh section both
|
|
1741
|
-
* state it, so an operator on a manager host away from the broker's folder still sees it. An open
|
|
1742
|
-
* mesh runs no delivery daemon, so with no lease recorded its row says the responder is not used
|
|
1743
|
-
* rather than unbound. */
|
|
1744
|
-
function responderText(state, mode, stackBlocked = false, deliveryPid, storeFull = false) {
|
|
1745
|
-
if (state === null && mode === "open")
|
|
1746
|
-
return { text: "not used - an open mesh runs no delivery daemon", tone: "hint" };
|
|
1747
|
-
// A running delivery member with no lease is starting or not responding. Status cannot ask it which,
|
|
1748
|
-
// and `up` starts no second daemon beside it.
|
|
1749
|
-
if (state === "unbound" && deliveryPid !== undefined)
|
|
1750
|
-
return { text: `no lease · stack-delivery pid ${deliveryPid} is alive but holds no lease, so it is starting or not responding`, tone: "failed" };
|
|
1751
|
-
// While this folder's stack is blocked, `up` refuses, so the row names the block Next clears. A full
|
|
1752
|
-
// store refuses the daemon's lease as every other write, so `up` starts it only once there is room.
|
|
1753
|
-
if (state === "unbound")
|
|
1754
|
-
return { text: `NOT BOUND - ${RESPONDER_UNBOUND_CONSEQUENCE} · ${stackBlocked ? `\`${displayCmd()} up\` refuses until the stack block is cleared, as Next shows` : storeFull ? `the full store refuses its lease, so \`${displayCmd()} up\` starts it only once there is room, as Next shows` : `start it with \`${displayCmd()} up\``}`, tone: "failed" };
|
|
1755
|
-
// A stale record is NOT BOUND with a different next move: the slot is occupied by a corpse, so
|
|
1756
|
-
// starting a daemon now loses the single-flight CAS. Say that, rather than sending the operator
|
|
1757
|
-
// into a refusal they will read as a second failure.
|
|
1758
|
-
if (state === "stale")
|
|
1759
|
-
return { text: `NOT BOUND - ${RESPONDER_STALE_TEXT} · \`${displayCmd()} up\` restarts it, after waiting out the lease`, tone: "failed" };
|
|
1760
|
-
if (state === "bound")
|
|
1761
|
-
return { text: "bound", tone: "ok" };
|
|
1762
|
-
return undefined;
|
|
1763
|
-
}
|
|
1764
1709
|
/** The pid of the selected space's running stack delivery member, from its owned service record. */
|
|
1765
1710
|
function stackDeliveryPid(r) {
|
|
1766
1711
|
return r.services?.instances?.find((item) => item.definition === STACK_DEFINITION.delivery && item.observedProcess === "running")?.pid ?? undefined;
|
|
@@ -2139,6 +2084,7 @@ function nextActions(r, seedFailed, interactive, recovery, preparedHarness) {
|
|
|
2139
2084
|
const cmd = displayCmd();
|
|
2140
2085
|
const items = [];
|
|
2141
2086
|
const extra = [];
|
|
2087
|
+
let restartBlock;
|
|
2142
2088
|
const noApplication = !setUpApplications(r.machine).length;
|
|
2143
2089
|
if (!r.selected.resolved && !r.meshes.items.length && !r.meshes.unreadable.length) {
|
|
2144
2090
|
items.push({ command: `${cmd} login`, description: "Sign in to Cotal Cloud" });
|
|
@@ -2159,17 +2105,17 @@ function nextActions(r, seedFailed, interactive, recovery, preparedHarness) {
|
|
|
2159
2105
|
if (r.selected.resolved) {
|
|
2160
2106
|
const s = r.selected;
|
|
2161
2107
|
const reachable = s.connection === "ok" || s.connection === "reachable";
|
|
2162
|
-
|
|
2108
|
+
const scope = { space: s.source === "flag-server" ? undefined : s.space, server: s.source === "flag-server" || s.source === "flag-space-override" ? s.server : undefined };
|
|
2163
2109
|
if (!noApplication) {
|
|
2164
2110
|
if (s.personas.default !== "missing" && s.personas.default !== "valid")
|
|
2165
|
-
items.push({ command: `${cmd} persona show default
|
|
2166
|
-
else if (reachable)
|
|
2167
|
-
items.push({ command: `${cmd} spawn`, description: s.personas.default === "missing" ? "Open your default agent; creates the shipped default persona" : "Open your default agent" });
|
|
2111
|
+
items.push({ command: onRerun(`${cmd} persona show default`, scope), description: "See what is wrong with the default persona" });
|
|
2112
|
+
else if (reachable && s.deliveryResponder !== "unbound" && s.deliveryResponder !== "stale")
|
|
2113
|
+
items.push({ command: onRerun(`${cmd} spawn`, scope), description: s.personas.default === "missing" ? "Open your default agent; creates the shipped default persona" : "Open your default agent" });
|
|
2168
2114
|
}
|
|
2169
2115
|
if (reachable)
|
|
2170
|
-
items.push({ command: `${cmd} who`, description: "See the live roster" });
|
|
2116
|
+
items.push({ command: onRerun(`${cmd} who`, scope), description: "See the live roster" });
|
|
2171
2117
|
if (r.stackManager?.endpoint === "answered" || r.outsideStackManager?.endpoint === "answered")
|
|
2172
|
-
items.push({ command: `${cmd} ps`, description: "List managed agents" });
|
|
2118
|
+
items.push({ command: onRerun(`${cmd} ps`, scope), description: "List managed agents" });
|
|
2173
2119
|
}
|
|
2174
2120
|
if (r.selected.resolved || !noApplication) {
|
|
2175
2121
|
items.push({ command: `${cmd} space`, description: "List the spaces on this machine" });
|
|
@@ -2196,12 +2142,10 @@ function nextActions(r, seedFailed, interactive, recovery, preparedHarness) {
|
|
|
2196
2142
|
// This folder's own stack is blocked the same way under another selection, and its block leads too.
|
|
2197
2143
|
const blocked = stack ?? folderStack(r.folder, r.selected);
|
|
2198
2144
|
const block = blocked ? r.folder.stackBlock : undefined;
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
const
|
|
2203
|
-
&& !["manual", "catalog"].includes(r.meshes.items.find((m) => m.space === r.selected.space)?.origin ?? "up");
|
|
2204
|
-
const exited = local ? (r.folder.processes ?? []).filter((row) => (row.name === "nats" || row.name === "manager") && row.state === "stopped" && (row.pid !== null || row.detail === "stopped")).map((row) => row.name) : [];
|
|
2145
|
+
const origin = r.meshes.items.find((m) => m.space === dialed?.space)?.origin;
|
|
2146
|
+
const legacy = dialed && !r.folder.controllerStack && r.folder.root === dialed.root && r.folder.processSpace === dialed.space;
|
|
2147
|
+
const local = legacy && dialed.mode === "auth" && !["manual", "catalog"].includes(origin ?? "up");
|
|
2148
|
+
const exited = legacy ? (r.folder.processes ?? []).filter((row) => (row.name === "nats" || row.name === "manager") && row.state === "stopped" && (row.pid !== null || row.detail === "stopped")).map((row) => row.name) : [];
|
|
2205
2149
|
const storeBlocked = !elsewhere && r.selected.resolved && r.selected.connection === "unreachable" && rootStoreProblem(r.selected.root) !== undefined;
|
|
2206
2150
|
if (r.selected.resolved && r.selected.connection === "broker-stopped")
|
|
2207
2151
|
items.unshift({ command: `kill -CONT ${r.selected.brokerPid}`, description: "Resume the stopped broker process so it answers again" });
|
|
@@ -2239,7 +2183,12 @@ function nextActions(r, seedFailed, interactive, recovery, preparedHarness) {
|
|
|
2239
2183
|
const held = r.folder.heldServices ?? [], space = r.selected.space;
|
|
2240
2184
|
items.unshift(...held.map((row) => ({ command: `${cmd} svc stop ${row.definition} --instance ${row.instanceId} --space ${shellWord(space)} --yes`, description: `Stop the ${row.definition} service, which runs this root's ${row.record} (pid ${row.pid}) outside the stack` })), { command: `${cmd} up --root ${shellWord(r.selected.root)}${r.folder.noManager ? " --no-manager" : ""}`, description: held.length ? "Then restart this stack's stopped members from its recorded inputs" : "Restart this stack's stopped members from its recorded inputs" });
|
|
2241
2185
|
}
|
|
2242
|
-
else if (!
|
|
2186
|
+
else if (!elsewhere && legacy && dialed.mode === "open" && origin === "up" && exited.includes("manager") && r.folder.processes?.some((row) => row.name === "nats" && row.state === "running")) {
|
|
2187
|
+
restartBlock = channelSeedRestartBlock(dialed.root);
|
|
2188
|
+
if (!restartBlock)
|
|
2189
|
+
items.unshift({ command: `${cmd} down --yes`, description: "Stop this folder's broker so the exited manager can be restarted" }, { command: `${cmd} up --foreground`, description: "Then start the stack with its manager" });
|
|
2190
|
+
}
|
|
2191
|
+
else if (!storeBlocked && !seedBlocksRestart && local && exited.length) {
|
|
2243
2192
|
const broker = exited.includes("nats"), manager = exited.includes("manager");
|
|
2244
2193
|
const notes = [...(broker ? ["up reopens the recorded store"] : []), ...(manager ? ["pass --runtime again if the manager ran on one"] : [])];
|
|
2245
2194
|
items.unshift({ command: `${cmd} up`, description: `Restart this folder's ${broker && manager ? "broker and manager" : broker ? "broker" : "manager"}, which exited; ${notes.join("; ")}` });
|
|
@@ -2249,6 +2198,11 @@ function nextActions(r, seedFailed, interactive, recovery, preparedHarness) {
|
|
|
2249
2198
|
// bare `up` that starts it again on its recorded address and store comes first.
|
|
2250
2199
|
items.unshift({ command: `${cmd} up`, description: "Start this folder's stopped stack again; pass --runtime again if the manager ran on one" });
|
|
2251
2200
|
}
|
|
2201
|
+
else if (!seedBlocksRestart && !elsewhere && local && r.selected.resolved && r.selected.connection === "ok" && r.store?.state !== "full" && r.store?.state !== "write-failed"
|
|
2202
|
+
&& (r.selected.deliveryResponder === "unbound" || r.selected.deliveryResponder === "stale")
|
|
2203
|
+
&& r.folder.processes?.some((row) => row.name === "delivery" && row.state === "stopped")) {
|
|
2204
|
+
items.unshift({ command: `${cmd} up`, description: "Restore the delivery responder" });
|
|
2205
|
+
}
|
|
2252
2206
|
// A stack whose folder was deleted stops only from this machine's records.
|
|
2253
2207
|
if (r.selected.resolved && r.selected.rootGone)
|
|
2254
2208
|
items.unshift({ command: `${cmd} down --space ${shellWord(r.selected.space)} --yes`, description: "Stop the stack whose folder is gone and free its name" });
|
|
@@ -2286,7 +2240,8 @@ function nextActions(r, seedFailed, interactive, recovery, preparedHarness) {
|
|
|
2286
2240
|
// The broker keeps serving a store it found damage in, from what it can still read there.
|
|
2287
2241
|
if (r.store?.state === "damaged" && r.selected.resolved && r.services?.instances?.some((row) => row.definition === STACK_DEFINITION.broker))
|
|
2288
2242
|
items.unshift({ command: `${cmd} service logs stack-broker${own ? "" : ` --space ${shellWord(r.selected.space)}`}`, description: "Read what the broker logged about the damage it found in its store; history holds only what it could still read" });
|
|
2289
|
-
|
|
2243
|
+
const first = restartBlock ? [{ kind: "lines", lines: [cell(`Restart blocked: ${restartBlock.message}. ${restartBlock.remedy}`, "hint")] }] : [];
|
|
2244
|
+
return { title: "Next", blocks: [...first, { kind: "commands", items }, ...[...extra, ...r.hints].map((hint) => ({ kind: "lines", lines: [cell(hint, "hint")] }))] };
|
|
2290
2245
|
}
|
|
2291
2246
|
function ownedServicesOverview(services) {
|
|
2292
2247
|
if (!services || services.state === "not-checked")
|
|
@@ -2657,7 +2612,7 @@ export function deliveryLeaseAbsent(e) {
|
|
|
2657
2612
|
/** Delivery owns two answers: its ready lease is its liveness/control surface; its latest explicit
|
|
2658
2613
|
* adoption report is the renewal record it writes through the manager-owned renewal pass. The
|
|
2659
2614
|
* latter is intentionally not inferred from credential mtime or process output. */
|
|
2660
|
-
async function deliveryHealth(target, context, credential) {
|
|
2615
|
+
async function deliveryHealth(target, context, credential, brokerOffline) {
|
|
2661
2616
|
const record = processRecord(DELIVERY_PIDFILE, context);
|
|
2662
2617
|
const facts = pidFacts(record);
|
|
2663
2618
|
const stopped = processVerdict(record);
|
|
@@ -2678,6 +2633,8 @@ async function deliveryHealth(target, context, credential) {
|
|
|
2678
2633
|
facts.push(renewal.adoption.ok ? "renewal adoption accepted" : `renewal adoption refused${renewal.adoption.error ? `: ${renewal.adoption.error}` : ""}`);
|
|
2679
2634
|
const renewalRefused = renewal?.adoption?.ok === false;
|
|
2680
2635
|
if (target.mode === "open" && record.kind === "absent" && !renewalRefused) {
|
|
2636
|
+
if (brokerOffline)
|
|
2637
|
+
return { name: "delivery", verdict: "not-started", facts: ["not used on an open mesh"] };
|
|
2681
2638
|
if (credential.kind === "unavailable")
|
|
2682
2639
|
return { name: "delivery", verdict: "refused", facts: [credential.reason] };
|
|
2683
2640
|
try {
|
|
@@ -2875,11 +2832,13 @@ async function brokerHealth(target, store) {
|
|
|
2875
2832
|
return { name: "broker", verdict: "refused", facts: [`registered ${address}`, `probe refused: ${e.message}`] };
|
|
2876
2833
|
}
|
|
2877
2834
|
}
|
|
2878
|
-
async function printComponentHealth(selected, store) {
|
|
2835
|
+
async function printComponentHealth(selected, store, brokerUnreachable) {
|
|
2879
2836
|
section("Component Health");
|
|
2880
2837
|
if (!selected.ok) {
|
|
2881
|
-
const
|
|
2882
|
-
|
|
2838
|
+
const error = selected.error;
|
|
2839
|
+
const e = isWorkspaceTargetError(error) && error.code === "not-started" && error.details.root !== undefined && !error.details.rootMissing
|
|
2840
|
+
? unusableStackJournal(error.details.root) ?? error : error;
|
|
2841
|
+
if (isCommandFailure(e) && (e.code === "SCHEMA_INVALID" || e.code === "PERMISSION_DENIED")) {
|
|
2883
2842
|
printComponent({ name: "target", verdict: "refused", facts: [e.code, e.message, ...(e.remedy ? [e.remedy] : [])] });
|
|
2884
2843
|
process.exitCode = COMPONENT_EXIT.refused;
|
|
2885
2844
|
return;
|
|
@@ -2912,7 +2871,7 @@ async function printComponentHealth(selected, store) {
|
|
|
2912
2871
|
const broker = await brokerHealth(target, store);
|
|
2913
2872
|
const components = await Promise.all([
|
|
2914
2873
|
managerHealth(target, context, credential, broker),
|
|
2915
|
-
deliveryHealth(target, context, credential),
|
|
2874
|
+
deliveryHealth(target, context, credential, brokerUnreachable && broker.verdict === "absent"),
|
|
2916
2875
|
webHealth(context),
|
|
2917
2876
|
broker,
|
|
2918
2877
|
]);
|