import { type AgentEvent, type AgentTool, type AgentToolContext } from "@gajae-code/agent-core"; import type { CursorMcpCall, CursorShellStreamCallbacks, CursorExecHandlers as ICursorExecHandlers, ToolResultMessage } from "@gajae-code/ai/core"; /** * Emitter for events this bridge produces. * * `dispatchedTool` is the tool object the bridge SELECTED and is about to execute — passed * alongside the event, never inside it, so the object never reaches an AgentEvent field, a * serialized payload, or any wire envelope. The handler binds it as provenance (object * identity only) at this producer boundary, because it is the only place that knows which * object actually ran: a consumer re-resolving `toolName` later reads a mutable registry. * Synthetic operations that execute no AgentTool pass nothing and stay unbound. */ type CursorExecEventEmitter = (event: AgentEvent, dispatchedTool?: AgentTool) => void; interface CursorExecBridgeOptions { cwd: string; tools: Map; getEditReplaceTool?: () => AgentTool | undefined; createSearchTool?: (options: { context?: number; totalMatchLimit?: number; }) => AgentTool | undefined; getToolContext?: () => AgentToolContext | undefined; emitEvent?: CursorExecEventEmitter; createEventEmitter?: () => ((event: AgentEvent) => void) | undefined; } export declare class CursorExecHandlers implements ICursorExecHandlers { #private; private options; constructor(options: CursorExecBridgeOptions); read(args: Parameters>[0]): Promise>; ls(args: Parameters>[0]): Promise>; grep(args: Parameters>[0]): Promise>; write(args: Parameters>[0]): Promise>; delete(args: Parameters>[0]): Promise>; shell(args: Parameters>[0]): Promise>; shellStream(args: Parameters>[0], callbacks: CursorShellStreamCallbacks): Promise>; piRead(call: Parameters>[0]): Promise>; piBash(call: Parameters>[0]): Promise>; piEdit(call: Parameters>[0]): Promise>; piWrite(call: Parameters>[0]): Promise>; piGrep(call: Parameters>[0]): Promise>; piFind(call: Parameters>[0]): Promise>; piLs(call: Parameters>[0]): Promise>; diagnostics(args: Parameters>[0]): Promise>; mcp(call: CursorMcpCall): Promise>; } export {};