@cotal-ai/cli 0.169.0 → 0.170.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 +15 -6
- package/dist/command.js.map +1 -1
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +23 -2
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +19 -5
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +66 -5
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/join.d.ts.map +1 -1
- package/dist/commands/join.js +10 -6
- package/dist/commands/join.js.map +1 -1
- package/dist/commands/mint.d.ts.map +1 -1
- package/dist/commands/mint.js +15 -2
- package/dist/commands/mint.js.map +1 -1
- package/dist/commands/persona.d.ts.map +1 -1
- package/dist/commands/persona.js +2 -13
- package/dist/commands/persona.js.map +1 -1
- package/dist/commands/personas.js +3 -1
- package/dist/commands/personas.js.map +1 -1
- package/dist/commands/service-actions.d.ts.map +1 -1
- package/dist/commands/service-actions.js +6 -1
- package/dist/commands/service-actions.js.map +1 -1
- package/dist/commands/stack-gone.d.ts.map +1 -1
- package/dist/commands/stack-gone.js +2 -2
- package/dist/commands/stack-gone.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +111 -59
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/team.d.ts.map +1 -1
- package/dist/commands/team.js +4 -1
- package/dist/commands/team.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +5 -4
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/update.js +10 -3
- package/dist/commands/update.js.map +1 -1
- package/dist/help.d.ts.map +1 -1
- package/dist/help.js +29 -27
- package/dist/help.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/self-exec.d.ts +1 -1
- package/dist/lib/self-exec.d.ts.map +1 -1
- package/dist/lib/self-exec.js +16 -11
- package/dist/lib/self-exec.js.map +1 -1
- package/dist/lib/stack-journal.d.ts +4 -0
- package/dist/lib/stack-journal.d.ts.map +1 -1
- package/dist/lib/stack-journal.js +13 -0
- package/dist/lib/stack-journal.js.map +1 -1
- package/dist/lib/store-dir.d.ts +2 -0
- package/dist/lib/store-dir.d.ts.map +1 -1
- package/dist/lib/store-dir.js +16 -0
- package/dist/lib/store-dir.js.map +1 -1
- package/package.json +4 -4
package/dist/commands/up.js
CHANGED
|
@@ -51,7 +51,7 @@ import { assertUserStackTransport, preflightUserStack } from "./stack-user-auth.
|
|
|
51
51
|
import { stackDown } from "./stack-down.js";
|
|
52
52
|
import { assertControllerCoupling, assertControllerMembersLive, assertControllerResumeEligible, beginControllerResume, bindControllerBroker, controllerAttemptBrokerInstance, currentControllerAttempt, managerResumeAttempt, relaunchCommittedManager, settleControllerResume, startControllerMember, startControllerMembers, } from "../lib/controller-resume.js";
|
|
53
53
|
import { removeRetiredBrokerInstance } from "../lib/controller-restore.js";
|
|
54
|
-
import { acquireStackOperationLock,
|
|
54
|
+
import { acquireStackOperationLock, knownStackRecoveryHost, admittedStackRestore, readStackJournal, refuseControllerCut, STACK_DEFINITION, STACK_ROLES } from "../lib/stack-journal.js";
|
|
55
55
|
import { observeServiceProcess, serviceInstances } from "../lib/service-instances.js";
|
|
56
56
|
import { serviceDefinitionStore } from "../lib/service-definitions.js";
|
|
57
57
|
import { MissingFlags } from "../lib/missing-flags.js";
|
|
@@ -1629,7 +1629,7 @@ async function runUp(args, inheritedLock, onAdopt, freshTeamBoot = false, restor
|
|
|
1629
1629
|
// that journals, give it `heldLock` and hand it down from here; do not audit by call-site shape.
|
|
1630
1630
|
// The one caller that does NOT pass it is the prepare-failure path above, where the lock has
|
|
1631
1631
|
// genuinely not been taken yet in this frame and the helper is meant to take its own.
|
|
1632
|
-
let startupLock = inheritedLock ?? acquireStackOperationLock(cotalRoot());
|
|
1632
|
+
let startupLock = inheritedLock ?? acquireStackOperationLock(cotalRoot(), values.detach ? undefined : "foreground up");
|
|
1633
1633
|
onAdopt?.(); // from here the release below owns it, inherited or not
|
|
1634
1634
|
const releaseStartupLock = () => {
|
|
1635
1635
|
if (!startupLock)
|
|
@@ -2265,7 +2265,6 @@ async function runUp(args, inheritedLock, onAdopt, freshTeamBoot = false, restor
|
|
|
2265
2265
|
const child = spawnBroker(bin, natsArgs, { cwd: cotalRoot(), stdio: "inherit", detached: process.platform !== "win32" });
|
|
2266
2266
|
let activationFinished = !resumeAttempt;
|
|
2267
2267
|
await recordSpawnedListener(child, listenerStartedAt, boundListener);
|
|
2268
|
-
releaseStartupLock();
|
|
2269
2268
|
child.on("error", (err) => {
|
|
2270
2269
|
console.error(c.red(`Failed to start nats-server: ${err.message}`));
|
|
2271
2270
|
if (!resumeAttempt)
|
|
@@ -2459,6 +2458,7 @@ async function runUp(args, inheritedLock, onAdopt, freshTeamBoot = false, restor
|
|
|
2459
2458
|
await completeResumeActivation(resumeAttempt, controlPlane !== undefined && authService, !authService ? "normal listener started but the user-auth service is unavailable" : "normal listener started but the control plane is degraded", server, startupLock);
|
|
2460
2459
|
activationFinished = true;
|
|
2461
2460
|
}
|
|
2461
|
+
releaseStartupLock();
|
|
2462
2462
|
await new Promise(() => { });
|
|
2463
2463
|
}
|
|
2464
2464
|
finally {
|
|
@@ -4475,7 +4475,8 @@ function recordOurMesh(m, provenance, quietBoot = false) {
|
|
|
4475
4475
|
if (pin.kind === "match")
|
|
4476
4476
|
nativeMembers.push({ role, process: pin.record });
|
|
4477
4477
|
}
|
|
4478
|
-
const
|
|
4478
|
+
const nativeHost = nativeMembers.length ? knownStackRecoveryHost() : undefined;
|
|
4479
|
+
const recorded = { ...m, origin, ...(nativeHost !== undefined ? { nativeMembers, nativeHost } : {}) };
|
|
4479
4480
|
recordMesh(provenance === "refresh" ? { ...prior, ...recorded } : recorded);
|
|
4480
4481
|
removePreparedSpace(m.space); // started: the registration is its record now
|
|
4481
4482
|
if (!usableCurrent) {
|