UNPKG

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

35 lines 1.48 kB
/** * GAIA Tool: file_read — ADR-133-PR2 / iter-53b attachment-tools * * Reads a file from the local filesystem and returns its contents as a * UTF-8 string. Performs content-type dispatch based on extension + * magic bytes: * * Supported extraction formats (iter-53b): * - Plain text, JSON, CSV, XML, HTML, Markdown, JS/TS, Python, shell, YAML * - XLSX — openpyxl subprocess (cell values + fill colours) * - PPTX — python-pptx subprocess (per-slide text) * - PNG / JPEG / GIF / WebP — returns IMAGE_BASE64 marker for vision API * - MP3 / WAV — OpenAI Whisper (tiny model) subprocess transcript * - .py source file — returned as UTF-8 text (no execution) * * For PDF / DOCX / other binary: descriptive stub (PR-4 deferred). * * IMAGE_BASE64 marker format: * [IMAGE_BASE64:{"mediaType":"image/png","base64":"...","path":"/abs/path"}] * * The agent loop in gaia-agent.ts must parse this marker when it appears * in a tool_result and convert it to an Anthropic vision content block. * * Maximum file size: 5 MB. Paths must be absolute. * * Refs: ADR-133, #2156, iter-53b */ import { GaiaTool, ToolDefinition } from './types.js'; export declare class FileReadTool implements GaiaTool { readonly name = "file_read"; readonly definition: ToolDefinition; execute(input: Record<string, unknown>): Promise<string>; } export declare function createFileReadTool(): FileReadTool; //# sourceMappingURL=file_read.d.ts.map