test: guard against sf mcp server regression

This commit is contained in:
Mikael Hugo 2026-05-07 04:46:09 +02:00
parent ffde54e05a
commit 59cfc4f7c3
2 changed files with 23 additions and 1 deletions

View file

@ -578,7 +578,7 @@ SF ships with 24 extensions, all loaded automatically:
| **Subagent** | Delegated tasks with isolated context windows |
| **GitHub** | Full-suite GitHub issues and PR management via `/gh` command |
| **Mac Tools** | macOS native app automation via Accessibility APIs |
| **MCP Client** | Native MCP server integration via @modelcontextprotocol/sdk |
| **MCP Client** | Client-side connections to external MCP tool servers via @modelcontextprotocol/sdk; SF does not expose its workflow as MCP |
| **Voice** | Real-time speech-to-text transcription (macOS, Linux — Ubuntu 22.04+) |
| **Slash Commands** | Custom command creation |
| **Ask User Questions** | Structured user input with single/multi-select |

View file

@ -0,0 +1,22 @@
import assert from "node:assert/strict";
import { existsSync } from "node:fs";
import { join } from "node:path";
import { test } from "vitest";
const repoRoot = join(import.meta.dirname, "../../../../..");
test("sfMcpServer_when_removed_stays_absent", () => {
const forbiddenPaths = [
"packages/mcp-server",
"src/mcp-server.ts",
"src/resources/extensions/sf/mcp-server.js",
];
for (const relativePath of forbiddenPaths) {
assert.equal(
existsSync(join(repoRoot, relativePath)),
false,
`${relativePath} must not be recreated; SF is an MCP client only`,
);
}
});