/** * Tool definitions for fork functionality. * * Factory functions that create tool definitions with injected dependencies: * - createForkSessionTool: Create a fork worker session * - createReadSessionTool: Read conversation transcript from a session */ import type { PluginInput, ToolDefinition } from '@opencode-ai/plugin'; import type { SubagentDepthTracker } from '../../utils/subagent-depth'; import type { ForkState } from './state'; export type OpencodeClient = PluginInput['client']; /** * Create the fork_session tool. * * Takes the OpenCode client as a dependency for TUI and session operations. */ export declare function createForkSessionTool(ctx: PluginInput, state: ForkState, depthTracker?: SubagentDepthTracker): ToolDefinition; /** * Create the read_session tool. * * Takes the OpenCode client as a dependency for session.messages() calls. */ export declare function createReadSessionTool(client: OpencodeClient, state: ForkState): ToolDefinition;