/** * File reference parsing and synthetic file parts for subtask sessions. * * Handles extraction of @file references from subtask prompts and * building synthetic text parts that match OpenCode's Read tool output * format. */ import type { TextPartInput } from '@opencode-ai/sdk'; /** * File reference regex matching OpenCode's internal pattern. * Matches @file references like @src/plugin.ts */ export declare const FILE_REGEX: RegExp; export declare function cleanFileReference(ref: string): string; /** * Parse @file references from text. * * @param text - Text to search for @file references * @returns Set of file paths referenced in the text */ export declare function parseFileReferences(text: string): Set; /** * Build synthetic text parts matching OpenCode's Read tool output. * * Creates two synthetic text parts for each file: * 1. Header describing the Read tool call * 2. Formatted file content with line numbers * * @param directory - Project directory to resolve relative paths against * @param refs - Set of file path references to check * @returns Array of synthetic text parts (non-existent and binary files are * skipped) */ export declare function buildSyntheticFileParts(directory: string, refs: Set): Promise;