/** * `.mcp.json` idempotent upsert per v0.6 Step 4.4 (Q4.0.10 + Q4.4.5 + * Q4.4.6 locks at Step 4.0 + Step 4.4 design adjudications). Auto- * registers contextatlas as an MCP server in repo-root `.mcp.json`. * * Idempotent behavior: * - File absent → create with single contextatlas entry (status: * "registered") * - File exists with contextatlas server entry → leave as-is * (status: "preserved"); does NOT overwrite path even if differs * (user may have customized) * - File exists without contextatlas entry → merge into existing * mcpServers preserving other entries (status: "merged") * - Existing JSON malformed → throw with actionable error */ export type McpRegistrationResult = { readonly status: "registered"; readonly path: string; } | { readonly status: "preserved"; readonly path: string; } | { readonly status: "merged"; readonly path: string; }; export interface McpRegistrationOptions { readonly configRoot: string; /** Test seam: override binary path resolution per Q4.4.7 lock. */ readonly binaryPathOverride?: string; } /** * Resolve absolute path to dist/index.js by walking up from this * module's __dirname to find package.json (mirrors src/index.ts:50-55 * readPackageVersion pattern; analogous to * resolveContextatlasCommitSha pattern from cli-runner.ts:286-308). * * Per Q4.4.6 lock at Step 4.4 design adjudications. No exists-check * on resolved path per Q4.4 Point 7 lock (cohort installs built * package; v0.6 cohort scope acceptable; Q11-style refinement at * Step 4.5 if cohort feedback warrants). * * Falls back to `process.execPath` (node binary) when package walk * fails (atypical install layout); preserves init flow. */ export declare function resolveContextAtlasBinary(): string; /** * Idempotent upsert of contextatlas server entry into repo-root * `.mcp.json` per Q4.0.10 lock. */ export declare function upsertMcpRegistration(opts: McpRegistrationOptions): McpRegistrationResult; //# sourceMappingURL=mcp-registration.d.ts.map