diff --git a/config/knip.config.ts b/config/knip.config.ts index b942eb9c2f1e..66606e6a1270 100644 --- a/config/knip.config.ts +++ b/config/knip.config.ts @@ -101,6 +101,8 @@ const rootEntries = [ "openclaw.mjs!", "src/index.ts!", "src/entry.ts!", + // Shipped compatibility facade for statusCommand and getStatusSummary. + "src/commands/status.ts!", "src/cli/daemon-cli.ts!", "src/agents/code-mode.worker.ts!", // Worker-thread and script entrypoints import contracts that production Knip cannot trace. diff --git a/src/commands/status.public-api.test.ts b/src/commands/status.public-api.test.ts new file mode 100644 index 000000000000..c96d257194a7 --- /dev/null +++ b/src/commands/status.public-api.test.ts @@ -0,0 +1,9 @@ +import { describe, expect, it } from "vitest"; +import { getStatusSummary as getStatusSummaryFromOwner } from "../status/summary.js"; +import { getStatusSummary as getStatusSummaryFromCommandFacade } from "./status.js"; + +describe("status command public API", () => { + it("preserves the shipped summary builder export", () => { + expect(getStatusSummaryFromCommandFacade).toBe(getStatusSummaryFromOwner); + }); +}); diff --git a/src/commands/status.ts b/src/commands/status.ts index b1647601dae8..dbe83e48ab31 100644 --- a/src/commands/status.ts +++ b/src/commands/status.ts @@ -1,4 +1,5 @@ // Public status command barrel. -// Exposes CLI orchestration without importing owner implementation details. +// Keeps the shipped command facade while owner implementations live outside commands. export { statusCommand } from "./status.command.js"; +export { getStatusSummary } from "../status/summary.js";