Skip to content

Commit 7938000

Browse files
authored
refactor(plugin-sdk): remove test-only facades (#122807)
1 parent 468dc55 commit 7938000

15 files changed

Lines changed: 25 additions & 418 deletions

‎config/knip.config.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -665,10 +665,7 @@ const config = {
665665
},
666666
[`${BUNDLED_PLUGIN_ROOT_DIR}/amazon-bedrock-mantle`]: bundledPluginWorkspace(),
667667
[`${BUNDLED_PLUGIN_ROOT_DIR}/amazon-bedrock`]: bundledPluginWorkspace(),
668-
[`${BUNDLED_PLUGIN_ROOT_DIR}/anthropic`]: bundledPluginWorkspace([
669-
// The plugin-SDK anthropic-cli facade resolves this shipped artifact by basename.
670-
"cli-api.ts!",
671-
]),
668+
[`${BUNDLED_PLUGIN_ROOT_DIR}/anthropic`]: bundledPluginWorkspace(),
672669
[`${BUNDLED_PLUGIN_ROOT_DIR}/anthropic-vertex`]: bundledPluginWorkspace(),
673670
[`${BUNDLED_PLUGIN_ROOT_DIR}/acpx`]: bundledPluginWorkspace([
674671
// Copied as executable runtime internals by the package artifact manifest.

‎extensions/anthropic/cli-api.ts‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎src/agents/cli-runner.spawn.test.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,6 @@ vi.mock("../gateway/mcp-http.loopback-runtime.js", async (importOriginal) => {
8484
};
8585
});
8686

87-
vi.mock("../plugin-sdk/anthropic-cli.js", () => ({
88-
CLAUDE_CLI_BACKEND_ID: "claude-cli",
89-
isClaudeCliProvider: (providerId: string) => providerId === "claude-cli",
90-
}));
91-
9287
function emitClaudeInputStarted(stdout: ((chunk: string) => void) | undefined, data: string): void {
9388
const event = createClaudeInputStartedEvent(data);
9489
if (event) {

‎src/agents/cli-runner/claude-live-background-tasks.test.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ import { setCliRunnerExecuteTestDeps } from "./execute.test-support.js";
2222
import { writeCliSystemPromptFile } from "./helpers.js";
2323
import type { PreparedCliRunContext } from "./types.js";
2424

25-
vi.mock("../../plugin-sdk/anthropic-cli.js", () => ({
26-
CLAUDE_CLI_BACKEND_ID: "claude-cli",
27-
isClaudeCliProvider: (providerId: string) => providerId === "claude-cli",
28-
}));
29-
3025
type ProcessSupervisor = ReturnType<typeof getProcessSupervisor>;
3126
type SupervisorSpawnFn = ProcessSupervisor["spawn"];
3227

‎src/agents/cli-runner/claude-live-process-approval.test.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ import { callGatewayTool } from "../tools/gateway.js";
2525
import { resetClaudeLiveSessionsForTest } from "./claude-live-session.test-support.js";
2626
import { executePreparedCliRun } from "./execute.js";
2727

28-
vi.mock("../../plugin-sdk/anthropic-cli.js", () => ({
29-
CLAUDE_CLI_BACKEND_ID: "claude-cli",
30-
isClaudeCliProvider: (providerId: string) => providerId === "claude-cli",
31-
}));
32-
3328
vi.mock("../tools/gateway.js", () => ({
3429
callGatewayTool: vi.fn(),
3530
}));

‎src/agents/cli-runner/claude-live-process.test.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ import { executePreparedCliRun } from "./execute.js";
3131
import { cliBackendLog } from "./log.js";
3232
import type { PreparedCliRunContext } from "./types.js";
3333

34-
vi.mock("../../plugin-sdk/anthropic-cli.js", () => ({
35-
CLAUDE_CLI_BACKEND_ID: "claude-cli",
36-
isClaudeCliProvider: (providerId: string) => providerId === "claude-cli",
37-
}));
38-
3934
vi.mock("../tools/gateway.js", () => ({
4035
callGatewayTool: vi.fn(),
4136
}));

‎src/agents/cli-runner/claude-live-registry.test.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ import { setCliRunnerExecuteTestDeps } from "./execute.test-support.js";
3434
import { writeCliSystemPromptFile } from "./helpers.js";
3535
import { cliBackendLog } from "./log.js";
3636

37-
vi.mock("../../plugin-sdk/anthropic-cli.js", () => ({
38-
CLAUDE_CLI_BACKEND_ID: "claude-cli",
39-
isClaudeCliProvider: (providerId: string) => providerId === "claude-cli",
40-
}));
41-
4237
type ProcessSupervisor = ReturnType<typeof getProcessSupervisor>;
4338
type SupervisorSpawnFn = ProcessSupervisor["spawn"];
4439
const tempDirs = useAutoCleanupTempDirTracker(afterEach);

‎src/commands/onboard-channels.e2e.test.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -519,11 +519,6 @@ vi.mock("../plugins/manifest-registry.js", async () => {
519519
};
520520
});
521521

522-
vi.mock("../plugin-sdk/matrix-deps.js", () => ({
523-
ensureMatrixSdkInstalled: vi.fn(async () => {}),
524-
isMatrixSdkAvailable: vi.fn(() => true),
525-
}));
526-
527522
vi.mock("../channels/plugins/bundled.js", () => ({
528523
getBundledChannelSetupPlugin: (channel: string) =>
529524
channel === "telegram"

‎src/plugin-sdk/anthropic-cli.ts‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎src/plugin-sdk/browser-node-host.test.ts‎

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)