@capgo/cli
Version:
A CLI to upload to capgo servers
26 lines (25 loc) • 1.22 kB
TypeScript
import type { BuildJobDeps } from './build-job.js';
/** Minimal shape of the MCP server's tool registrar (matches McpServer.tool / McpLike). */
interface ToolRegistrar {
tool: (name: string, description: string, schema: Record<string, unknown>, handler: (args: any) => Promise<{
content: Array<{
type: 'text';
text: string;
}>;
}>) => unknown;
}
/**
* 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 declare function buildJobDeps(cwd: string): 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: ToolRegistrar, getAppId: () => Promise<string | undefined>, deps: BuildJobDeps): void;
export {};