import type { AgentTool } from '@earendil-works/pi-agent-core'; import type { ToolDefinition } from '@earendil-works/pi-coding-agent'; export type ApplyPatchEnvelopeError = { code: 'invalid_patch_envelope'; field: 'patch'; issue: 'missing_patch' | 'first_line' | 'control_line' | 'last_line'; expected: string; received?: string; retryHint: string; }; export declare function validateApplyPatchEnvelope(params: unknown): ApplyPatchEnvelopeError | null; /** Map xopc {@link AgentTool} instances to pi-coding-agent {@link ToolDefinition}s for `createAgentSession`. */ export declare function xopcToolsToDefinitions(tools: AgentTool[]): ToolDefinition[];