fix(daemon): keep lifecycle operations on the selected instance

Restart reconstructed launch inputs and address fallback could redirect a home-selected shutdown to another daemon. Let supervisors publish bound endpoints, retain their worker restart contract, and share captured local lifecycle ownership between CLI and Desktop.
This commit is contained in:
Mohamed Boudra
2026-09-09 14:09:53 +02:00
parent fdf3b4b47f
commit 264276880e
166 changed files with 3824 additions and 4467 deletions
+12 -1
View File
@@ -1,3 +1,4 @@
import { renderError, toCommandError, defaultOutputOptions } from "./output/render.js";
import { createCli } from "./cli.js";
import { classifyInvocation } from "./classify.js";
import { openDesktopWithProject } from "./commands/open.js";
@@ -48,6 +49,16 @@ export async function runCli(argv: string[], options: RunCliOptions = {}): Promi
}
const program = createCli();
await program.parseAsync(parseArgv, { from: "node" });
try {
await program.parseAsync(parseArgv, { from: "node" });
} catch (error) {
process.stderr.write(
renderError(toCommandError(error), {
...defaultOutputOptions,
format: argv.includes("--json") ? "json" : "table",
}) + "\n",
);
return 1;
}
return typeof process.exitCode === "number" ? process.exitCode : 0;
}