import type { McpRegistrar } from '../../../mcp/registrar.js';
import type { BuildJobDeps } from './build-job.js';
import type { Platform } from './contract.js';
/**
 * Resolve the CLI entry script for the running MCP server (same version as this
 * process, not `@capgo/cli@latest` via npx).
 */
export declare function resolveCurrentCliEntryFromModulePath(modulePath: string, cwd: string): string;
export declare function resolveCurrentCliEntry(cwd: string): string;
/** Command line used to spawn a cloud build child (tested on win32). */
export declare function resolveCapgoBuildSpawnCommand(cwd: string, appId: string, platform: Platform, recordPath: string): {
    command: string;
    args: string[];
};
export declare function quoteSpawnArg(arg: string): string;
export declare function formatSpawnCommand(command: string, args: readonly string[]): string;
/**
 * Production build-job deps: spawn the published CLI's `build request` as a
 * tracked background child streaming to a local log file, read/clear the build
 * record, and drain the log file by byte offset. No cloud cancel in v1 (cancel
 * stops the local watcher; the cloud build may still finish — surfaced in the
 * result). All injectable for tests (test-mcp-build-job covers the manager).
 */
export type ResolveCapgoBuildSpawnCommand = typeof resolveCapgoBuildSpawnCommand;
export declare function buildJobDeps(cwd: string | (() => string), testOverrides?: {
    resolveSpawnCommand?: ResolveCapgoBuildSpawnCommand;
}): BuildJobDeps;
/**
 * Register the build tools onto an MCP server. `getAppId` resolves the current
 * project's Capgo app id; `deps` are the build-job mechanics (production via
 * buildJobDeps; injectable fakes in tests).
 */
export declare function registerBuildTools(server: McpRegistrar, getAppId: () => Promise<string | undefined>, deps: BuildJobDeps): void;
