import type { McpServerChange } from "@kenkaiiii/gg-engine/internal/core/agent-session.js"; import { probeMcp, type McpWireRow } from "./mcp-rows.js"; import { type ShellRunEnd } from "./shell-runs.js"; import type { SessionRouteContext } from "./route-context.js"; /** * `!claude mcp …` / `!ggcoder mcp …` typed in the app's input. Handled here * instead of in a shell so the line pasted from an MCP server's docs manages * GG Coder's own servers (the same files as the MCP modal), not Claude Code's. */ export declare function isMcpShellCommand(command: string): boolean; export interface McpShellDeps { cwd: string; listRows: (cwd: string) => Promise; probe: typeof probeMcp; clearOAuth: (name: string) => Promise; /** A project-scope server was added: the user trusts this project's servers. */ trustProject: (cwd: string) => Promise; onAdded: () => void; /** Keep a pre-registered OAuth client (and secret) for sign-in. */ saveOAuthClient: (name: string, clientId: string, secret?: string) => Promise; /** Load the saved change into open windows: this one's result, and how many others took it. */ sync: (name: string) => Promise<{ here: McpServerChange | null; others: number; }>; } export interface McpShellOutcome { exitCode: number; /** Output with error lines wrapped in the stderr marks, like a shell run. */ output: string; } export declare function runMcpShellCommand(command: string, deps: McpShellDeps): Promise; /** The command as saved and shown to the agent: env, header and client-secret values hidden. */ export declare function maskMcpCommand(command: string): string; /** Run one `!… mcp …` line for a window and finish it like any other command. */ export declare function runMcpShell(ctx: SessionRouteContext, runId: string, command: string, finish: (ctx: SessionRouteContext, run: ShellRunEnd) => void): Promise;