claude-flow
Version:
Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration
27 lines • 1.16 kB
TypeScript
/**
* GAIA Tool: pdf_read — ADR-138 iter 54
*
* Extracts text content from a PDF file using a Python subprocess.
* GAIA L1 has ~20-30% of questions with PDF attachments; without this,
* ruflo is functionally blind on those questions.
*
* Extraction chain (tries in order, returns first success):
* 1. pdfminer.six — best quality, handles most text PDFs
* 2. pdfplumber — good alternative, especially for tables
* 3. PyPDF2/pypdf — fallback, lower quality but widely available
* 4. pdftotext — CLI tool (poppler-utils), if installed
* 5. Stub — returns a note that extraction failed
*
* For image-only (scanned) PDFs, all text extractors return empty.
* In that case we return a note so the agent can try describe_image.
*
* Refs: ADR-138, #2156, iter 54
*/
import { GaiaTool, ToolDefinition } from './types.js';
export declare class PdfReadTool implements GaiaTool {
readonly name = "pdf_read";
readonly definition: ToolDefinition;
execute(input: Record<string, unknown>): Promise<string>;
}
export declare function createPdfReadTool(): PdfReadTool;
//# sourceMappingURL=pdf_read.d.ts.map