refactor(mac): make app node a CLI capability superset (#105642)

* refactor(mac): reuse CLI node-host runtime

* fix(mac): prefer checkout CLI in debug builds

* chore: leave release notes to release automation

* chore(mac): sync native string inventory

* chore(mac): refresh native locale artifacts

* fix(node): satisfy native and deadcode gates
This commit is contained in:
Peter Steinberger
2026-07-12 13:16:07 -07:00
committed by GitHub
parent f15a5e566b
commit d287c9b414
62 changed files with 2195 additions and 3130 deletions

View File

@@ -301,6 +301,16 @@ export const cliCommandCatalog: readonly CliCommandCatalogEntry[] = [
commandPath: ["node"],
policy: { networkProxy: "bypass" },
},
{
commandPath: ["node", "worker"],
exact: true,
policy: {
hideBanner: true,
loadPlugins: "never",
ownsProtocolStdout: true,
networkProxy: "bypass",
},
},
{
commandPath: ["node", "run"],
exact: true,

View File

@@ -240,6 +240,14 @@ describe("command-startup-policy", () => {
expect(resolvePolicy({ commandPath: ["mcp", "serve"] }).suppressDoctorStdout).toBe(true);
});
it("reserves stdout for the node worker protocol", () => {
const policy = resolvePolicy({ commandPath: ["node", "worker"] });
expect(policy.hideBanner).toBe(true);
expect(policy.loadPlugins).toBe(false);
expect(policy.suppressDoctorStdout).toBe(true);
});
it("suppresses startup stdout for the bare acp protocol", () => {
expect(resolvePolicy({ commandPath: ["acp"] }).suppressDoctorStdout).toBe(true);
});

View File

@@ -5,6 +5,7 @@ import { formatDocsLink } from "../../../packages/terminal-core/src/links.js";
import { theme } from "../../../packages/terminal-core/src/theme.js";
import { loadNodeHostConfig } from "../../node-host/config.js";
import { runNodeHost } from "../../node-host/runner.js";
import { runNodeHostWorker } from "../../node-host/worker.js";
import { defaultRuntime } from "../../runtime.js";
import { parsePort } from "../daemon-cli/shared.js";
import { formatInvalidPortOption } from "../error-format.js";
@@ -46,6 +47,13 @@ export function registerNodeCli(program: Command) {
])}\n\n${theme.muted("Docs:")} ${formatDocsLink("/cli/node", "docs.openclaw.ai/cli/node")}\n`,
);
node
.command("worker", { hidden: true })
.description("Run the private macOS app node-host worker")
.action(async () => {
await runNodeHostWorker();
});
node
.command("run")
.description("Run the headless node host (foreground)")