@quatrain/okf-ingest
v1.0.1
Published
Multi-source document ingestion, multimodal extraction, schema/mermaid transcription, token cost tracking, and OKF v0.2 packaging
Readme
@quatrain/okf-ingest
Multi-source document ingestion, multimodal extraction, visual schema & Mermaid diagram transcription, token cost tracking, and Open Knowledge Format (OKF v0.2) packaging for the Quatrain ecosystem.
Features
- OKF v0.2 Compliant: Native support for the
# --- Open Knowledge Format v0.2 ---specification, includingdescription(1-sentence summary),status,generated: { by, at, tokens }, andsources: [...]. - Text & Multimodal Ingestion: Extracts digital text layers via
pdf-parseand falls back automatically to multimodal Gemini vision for scanned or image-dense documents. - Visual Synthesis & Mermaid Transcription: Instructs Gemini to transcribe process flows, decision trees, and cycles into
mermaidcode blocks, and matrices/comparison charts into Markdown tables. - Accurate Token & Cost Tracking: Computes exact input/output/thinking token usage and USD costs per document.
- Resilient Dedup Cache: SHA-256 hash tracking with persistent token accounting and automatic sync from existing Git knowledge repos.
Installation
yarn add @quatrain/okf-ingest
# or
bun add @quatrain/okf-ingestLicense
AGPL-3.0-only
