import { fetchPullRequestDetails, fetchPullRequestDiff, fetchPullRequestReviewActivity } from "../../github-review/dist/index.js"; import { type SpawnResult } from "../../agent-spawn/dist/index.js"; import type { CodeReviewDraft } from "./review-state.js"; import { CodeReviewYamlStore } from "./review-store.js"; export declare const CODE_REVIEW_AGENT_MCP_ROLES: readonly ["agent", "orchestrator", "subagent"]; export type CodeReviewAgentMcpRole = (typeof CODE_REVIEW_AGENT_MCP_ROLES)[number]; export interface CodeReviewAgentMcpContext { role: CodeReviewAgentMcpRole; session: string; actor: string; cwd: string; draftStore?: string; agent: string; profiles?: string[]; profileDirectories?: string[]; } export interface CodeReviewAgentMcpConfig { transport: "stdio"; command: string; args: string[]; } export interface CodeReviewAgentMcpDependencies { store?: CodeReviewYamlStore; now?: () => Date; fetchPr?: typeof fetchPullRequestDetails; fetchDiff?: typeof fetchPullRequestDiff; fetchComments?: typeof fetchPullRequestReviewActivity; spawnAgent?: (agent: string, prompt: string, options: { cwd: string; mcpServers: Record; }) => Promise; } export declare function parseCodeReviewAgentMcpArgs(argv: string[]): CodeReviewAgentMcpContext; export declare function createCodeReviewAgentMcpConfig(context: CodeReviewAgentMcpContext): CodeReviewAgentMcpConfig; export declare function createCodeReviewAgentMcpGroup(context: CodeReviewAgentMcpContext, dependencies?: CodeReviewAgentMcpDependencies): import("../../toolcraft/dist/index.js").Group<{ [x: string]: never; }> & { readonly __agentKitGroupTypeInfo: import("../../toolcraft/dist/index.js").GroupTypeInfo<{ [x: string]: never; }, "code_review_agent", ((import("../../toolcraft/dist/index.js").Command<{ [x: string]: never; }, import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; }>, undefined, Record> & { readonly __agentKitCommandTypeInfo: import("../../toolcraft/dist/index.js").CommandTypeInfo<"code_review_pr_view", import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; }>, Record, "mcp"[], undefined>; }) | (import("../../toolcraft/dist/index.js").Command<{ [x: string]: never; }, import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; }>, undefined, string> & { readonly __agentKitCommandTypeInfo: import("../../toolcraft/dist/index.js").CommandTypeInfo<"code_review_pr_diff", import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; }>, string, "mcp"[], undefined>; }) | (import("../../toolcraft/dist/index.js").Command<{ [x: string]: never; }, import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; }>, undefined, Record> & { readonly __agentKitCommandTypeInfo: import("../../toolcraft/dist/index.js").CommandTypeInfo<"code_review_pr_comments", import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; }>, Record, "mcp"[], undefined>; }) | (import("../../toolcraft/dist/index.js").Command<{ [x: string]: never; }, import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; readonly body: import("../../toolcraft/dist/index.js").StringSchema; readonly decision: import("../../toolcraft/dist/index.js").OptionalSchema>; readonly comments: import("../../toolcraft/dist/index.js").OptionalSchema>>; }>, undefined, { ok: boolean; dry_run: boolean; actor: string; draft: CodeReviewDraft | undefined; }> & { readonly __agentKitCommandTypeInfo: import("../../toolcraft/dist/index.js").CommandTypeInfo<"code_review_create_draft", import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; readonly body: import("../../toolcraft/dist/index.js").StringSchema; readonly decision: import("../../toolcraft/dist/index.js").OptionalSchema>; readonly comments: import("../../toolcraft/dist/index.js").OptionalSchema>>; }>, { ok: boolean; dry_run: boolean; actor: string; draft: CodeReviewDraft | undefined; }, "mcp"[], undefined>; }) | (import("../../toolcraft/dist/index.js").Command<{ [x: string]: never; }, import("../../toolcraft/dist/index.js").ObjectSchema<{}>, undefined, import("./assets.js").CodeReviewProfile[]> & { readonly __agentKitCommandTypeInfo: import("../../toolcraft/dist/index.js").CommandTypeInfo<"code_review_profile_list", import("../../toolcraft/dist/index.js").ObjectSchema<{}>, import("./assets.js").CodeReviewProfile[], "mcp"[], undefined>; }) | (import("../../toolcraft/dist/index.js").Command<{ [x: string]: never; }, import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; readonly profile: import("../../toolcraft/dist/index.js").StringSchema; readonly agent: import("../../toolcraft/dist/index.js").OptionalSchema; }>, undefined, { actor: string; agent: string; status: string; reused: boolean; } | { actor: string; agent: string; status: string; reused?: undefined; }> & { readonly __agentKitCommandTypeInfo: import("../../toolcraft/dist/index.js").CommandTypeInfo<"code_review_agent_spawn", import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; readonly profile: import("../../toolcraft/dist/index.js").StringSchema; readonly agent: import("../../toolcraft/dist/index.js").OptionalSchema; }>, { actor: string; agent: string; status: string; reused: boolean; } | { actor: string; agent: string; status: string; reused?: undefined; }, "mcp"[], undefined>; }) | (import("../../toolcraft/dist/index.js").Command<{ [x: string]: never; }, import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; }>, undefined, Record> & { readonly __agentKitCommandTypeInfo: import("../../toolcraft/dist/index.js").CommandTypeInfo<"code_review_agent_status", import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; }>, Record, "mcp"[], undefined>; }) | (import("../../toolcraft/dist/index.js").Command<{ [x: string]: never; }, import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; }>, undefined, { raw_reviews: Record; merged_review: CodeReviewDraft | null; }> & { readonly __agentKitCommandTypeInfo: import("../../toolcraft/dist/index.js").CommandTypeInfo<"code_review_list_drafts", import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; }>, { raw_reviews: Record; merged_review: CodeReviewDraft | null; }, "mcp"[], undefined>; }) | (import("../../toolcraft/dist/index.js").Command<{ [x: string]: never; }, import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; readonly index: import("../../toolcraft/dist/index.js").NumberSchema; readonly path: import("../../toolcraft/dist/index.js").StringSchema; readonly line: import("../../toolcraft/dist/index.js").NumberSchema; readonly body: import("../../toolcraft/dist/index.js").StringSchema; }>, undefined, { ok: boolean; dry_run: boolean; merged_review: CodeReviewDraft | undefined; }> & { readonly __agentKitCommandTypeInfo: import("../../toolcraft/dist/index.js").CommandTypeInfo<"code_review_edit_inline_comment", import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; readonly index: import("../../toolcraft/dist/index.js").NumberSchema; readonly path: import("../../toolcraft/dist/index.js").StringSchema; readonly line: import("../../toolcraft/dist/index.js").NumberSchema; readonly body: import("../../toolcraft/dist/index.js").StringSchema; }>, { ok: boolean; dry_run: boolean; merged_review: CodeReviewDraft | undefined; }, "mcp"[], undefined>; }) | (import("../../toolcraft/dist/index.js").Command<{ [x: string]: never; }, import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; readonly index: import("../../toolcraft/dist/index.js").NumberSchema; }>, undefined, { ok: boolean; dry_run: boolean; merged_review: CodeReviewDraft | undefined; }> & { readonly __agentKitCommandTypeInfo: import("../../toolcraft/dist/index.js").CommandTypeInfo<"code_review_delete_inline_comment", import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; readonly index: import("../../toolcraft/dist/index.js").NumberSchema; }>, { ok: boolean; dry_run: boolean; merged_review: CodeReviewDraft | undefined; }, "mcp"[], undefined>; }) | (import("../../toolcraft/dist/index.js").Command<{ [x: string]: never; }, import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; }>, undefined, { ok: boolean; dry_run: boolean; merged_review: null; }> & { readonly __agentKitCommandTypeInfo: import("../../toolcraft/dist/index.js").CommandTypeInfo<"code_review_discard_draft", import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; }>, { ok: boolean; dry_run: boolean; merged_review: null; }, "mcp"[], undefined>; }) | (import("../../toolcraft/dist/index.js").Command<{ [x: string]: never; }, import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; }>, undefined, { ok: boolean; dry_run: boolean; would_publish: CodeReviewDraft | CodeReviewDraft[]; }> & { readonly __agentKitCommandTypeInfo: import("../../toolcraft/dist/index.js").CommandTypeInfo<"code_review_commit_drafts", import("../../toolcraft/dist/index.js").ObjectSchema<{ readonly pr: import("../../toolcraft/dist/index.js").StringSchema; }>, { ok: boolean; dry_run: boolean; would_publish: CodeReviewDraft | CodeReviewDraft[]; }, "mcp"[], undefined>; }))[], undefined, undefined>; }; export declare function runCodeReviewAgentMcp(context: CodeReviewAgentMcpContext): Promise;