internal/

directory
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2026 License: Apache-2.0

Directories

Path Synopsis
adapters
agecrypt
Package agecrypt is lore's encryption boundary for portable artifacts: it wraps a whole serialized artifact byte stream in an age envelope (and reverses it), so the exported file is encrypted at rest and in transit.
Package agecrypt is lore's encryption boundary for portable artifacts: it wraps a whole serialized artifact byte stream in an age envelope (and reverses it), so the exported file is encrypted at rest and in transit.
cache
Package cache provides a caching decorator around an app.Generator: it serves a previously synthesized answer from an app.AnswerCache when the same question is asked over the same grounding, skipping the LLM round-trip.
Package cache provides a caching decorator around an app.Generator: it serves a previously synthesized answer from an app.AnswerCache when the same question is asked over the same grounding, skipping the LLM round-trip.
docx
Package docx is an Extractor for Word .docx files.
Package docx is an Extractor for Word .docx files.
extract
Package extract turns supported raw content into plain text for chunking.
Package extract turns supported raw content into plain text for chunking.
fs
Package fs is a filesystem Source: it walks a path (file or directory) and yields each regular, non-hidden file as a SourceItem whose content type is detected from the extension.
Package fs is a filesystem Source: it walks a path (file or directory) and yields each regular, non-hidden file as a SourceItem whose content type is detected from the extension.
httpjson
Package httpjson is the shared HTTP-JSON plumbing for lore's provider adapters (the OpenAI-compatible embed/chat client and the Cohere-style reranker): a POST of a JSON body, decode of a 2xx JSON response, bearer or api-key auth, and automatic retry of transient 429/503 responses honoring Retry-After.
Package httpjson is the shared HTTP-JSON plumbing for lore's provider adapters (the OpenAI-compatible embed/chat client and the Cohere-style reranker): a POST of a JSON body, decode of a 2xx JSON response, bearer or api-key auth, and automatic retry of transient 429/503 responses honoring Retry-After.
memstore
Package memstore provides in-memory reference implementations of the persistence ports.
Package memstore provides in-memory reference implementations of the persistence ports.
openai
Package openai adapts the Embedder and Generator ports to any OpenAI-compatible HTTP API (OpenAI, Ollama's /v1, vLLM, LM Studio, OpenRouter).
Package openai adapts the Embedder and Generator ports to any OpenAI-compatible HTTP API (OpenAI, Ollama's /v1, vLLM, LM Studio, OpenRouter).
pdf
Package pdf is an Extractor for PDF files, backed by the pure-Go github.com/ledongthuc/pdf (no cgo, so the static-binary and cross-compile goals hold).
Package pdf is an Extractor for PDF files, backed by the pure-Go github.com/ledongthuc/pdf (no cgo, so the static-binary and cross-compile goals hold).
rerank
Package rerank adapts the app.RerankProvider port to a Cohere-style rerank HTTP API (POST /rerank with {model, query, documents, top_n} → {results: [{index, relevance_score}]}), the de-facto standard that Cohere, Jina, Voyage, and others conform to.
Package rerank adapts the app.RerankProvider port to a Cohere-style rerank HTTP API (POST /rerank with {model, query, documents, top_n} → {results: [{index, relevance_score}]}), the de-facto standard that Cohere, Jina, Voyage, and others conform to.
sqlite
Package sqlite is a persistent backend: one SQLite database file holding all collections, documents, chunks, and vectors.
Package sqlite is a persistent backend: one SQLite database file holding all collections, documents, chunks, and vectors.
tiktoken
Package tiktoken is the TokenCounter adapter: it counts tokens with a pure-Go, offline tiktoken BPE codec (o200k_base — the encoding text-embedding-3 and gpt-4o use).
Package tiktoken is the TokenCounter adapter: it counts tokens with a pure-Go, offline tiktoken BPE codec (o200k_base — the encoding text-embedding-3 and gpt-4o use).
xlsx
Package xlsx is an Extractor for Excel .xlsx files.
Package xlsx is an Extractor for Excel .xlsx files.
Package app contains the use cases and defines the ports (interfaces) they consume.
Package app contains the use cases and defines the ports (interfaces) they consume.
Package artifact defines lore's portable corpus format: a single, versioned, self-contained byte stream holding one collection — its embedding-space and chunker pins, metadata, documents, chunks, and vectors — so a collection can be exported to a file and reconstructed elsewhere with its invariants intact.
Package artifact defines lore's portable corpus format: a single, versioned, self-contained byte stream holding one collection — its embedding-space and chunker pins, metadata, documents, chunks, and vectors — so a collection can be exported to a file and reconstructed elsewhere with its invariants intact.
Package cli is lore's driving adapter: it translates cobra commands into use case calls and renders results.
Package cli is lore's driving adapter: it translates cobra commands into use case calls and renders results.
Package config loads lore's typed configuration with the precedence flags > env (LORE_*) > file (TOML) > defaults, and builds the slog logger.
Package config loads lore's typed configuration with the precedence flags > env (LORE_*) > file (TOML) > defaults, and builds the slog logger.
Package conformance contains executable contracts for the ports defined in internal/app.
Package conformance contains executable contracts for the ports defined in internal/app.
Package limitio provides bounded reads that fail loudly when an input exceeds a byte cap.
Package limitio provides bounded reads that fail loudly when an input exceeds a byte cap.
Package mcp is lore's MCP (Model Context Protocol) driving adapter: it exposes lore's grounded retrieval and Q&A use cases as MCP tools so any MCP client (Claude Desktop, editors, agent frameworks) can call a private corpus and get back cited answers.
Package mcp is lore's MCP (Model Context Protocol) driving adapter: it exposes lore's grounded retrieval and Q&A use cases as MCP tools so any MCP client (Claude Desktop, editors, agent frameworks) can call a private corpus and get back cited answers.
Package secret resolves a secret by running a command and reading its stdout, so a passphrase or key never lands in a flag value, in argv, or on disk.
Package secret resolves a secret by running a command and reading its stdout, so a passphrase or key never lands in a flag value, in argv, or on disk.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL