import { LAUNCHER_PACKAGE_SPEC } from "@jam-mcp/launcher"; /** * The canonical jam entry for a project's `.mcp.json`. * * Goes through the launcher rather than naming a JAM install directly, so the * file says only "this project uses JAM" - which build actually runs is the * reader's own choice, in their own ~/.jam/config.yaml. That is what makes * this line safe to commit and share across machines. * * Pinned to an exact version. A floating tag would silently change what a * teammate's editor launches. */ export { LAUNCHER_PACKAGE_SPEC }; export declare const JAM_MCP_ENTRY: { readonly command: "npx"; readonly args: readonly ["--yes", "@jam-mcp/launcher@1.8.0", "serve"]; }; /** * Recognise wiring from before the launcher existed: a hard-coded `node` path * to one machine's checkout. That works only where it was written, which is * why `--migrate` exists. * * A bare `jam` is deliberately NOT legacy any more. It is what a persistent * install (`npm install -g @jam-mcp/launcher@`) provides, and on a * machine whose package runner is broken it is the entry that still works — * a real Windows npm was seen failing to start `npx` children at all. Someone * who registered it chose it; `--migrate` must not silently rewrite that * choice back into the very path that fails there. */ export declare function isLegacyJamEntry(entry: unknown): boolean; export type McpMergeResult = { path: string; /** "created" | "added" | "unchanged" - what actually happened to the file. */ action: "created" | "added" | "unchanged"; }; export type McpInspection = { path: string; exists: boolean; /** True when the file exists but is not valid JSON - callers must not overwrite it blindly. */ unreadable: boolean; hasJamEntry: boolean; /** Entry names other than "jam", which must survive any mutation. */ otherServers: string[]; jamEntry?: unknown; }; /** * Read `.mcp.json` without touching it. This is what lets `setup plan` report * what it *would* do: the decision is made here once, and apply only writes. */ export declare function inspectMcpConfig(root: string): McpInspection; /** * Write a jam entry into `.mcp.json`, preserving every other server verbatim. * * Unconditional by design - the caller decides *whether* to write; this only * decides *how*, so that "should I touch this file" lives in exactly one place. */ export declare function writeJamMcpEntry(root: string, entry?: unknown): string; /** * Merge the launcher entry into `.mcp.json`, preserving everything else. * * Deliberately records neither an absolute path to a JAM checkout nor a bare * `jam` - the first breaks the moment a teammate clones somewhere else, and * the second assumes an optional global install every teammate would have to * have made. `npx` at an exact launcher version assumes only npm. */ export declare function mergeMcpConfig(root: string): McpMergeResult;