Skip to main content

Crate seyk_core

Crate seyk_core 

Source
Expand description

Search, caching and verified evidence, independent of any concrete embedding backend.

With pdf, applications installing a log logger MUST filter pdf_extract to Off. With pdf-render, also filter hayro_interpret, hayro_syntax and hayro_font to Off: upstream diagnostics can contain document bytes. This crate installs no logger. PDF panics become errors via catch_unwind. A permanent dispatcher is installed lazily once; RAII guards suppress and record parser panics only on the parsing thread, delegating other threads to the captured previous hook. Later external hooks replace it and may print; Seyk never removes or overwrites them. First installation is deferred during unwinding, so that parse may also print. With audio, Symphonia probe, construction, packet reads and decode panics likewise become payload-free UnsupportedAudio errors; applications must use a payload-free panic hook for audio. ALAC frame allocations are checked before construction. Unwinding does not contain aborts, OOM, hangs or excessive parser allocations.

Re-exports§

pub use pdf::PdfTextExtractor;
pub use cache::CacheImportMapping;
pub use cache::CacheImportReport;
pub use cache::CacheStats;
pub use cache::EmbeddingCache;
pub use cache::MemoryCache;
pub use cache::ResourceWrite;
pub use cache::SegmentWrite;
pub use cache::SqliteCache;
pub use discovery::DiscoveryOptions;
pub use provider::FsProvider;
pub use provider::ProvidedResource;
pub use provider::ResourceListing;
pub use provider::ResourceProvider;
pub use provider::ResourceScope;
pub use provider::ResourceVersion;
pub use extractor::ExtractedContent;
pub use extractor::Extractor;
pub use extractor::TextExtractor;
pub use extractor::extract_resource;

Modules§

audio
Bounded audio decoding, presentation timing and deterministic 16 kHz windows.
cache
Embedding caches.
discovery
Finding searchable resources under the paths a caller passes in.
embedder
extractor
On-demand readable evidence, independent of models and caches.
index
Nearest-neighbour search over normalised vectors.
lexical
Lexical (keyword) matching, the half of hybrid search that embeddings miss: exact names, identifiers and rare words.
local_content
Opt-in policy for automatic local-content collections on Unix.
pdf
Bounded embedded-text extraction from PDF bytes.
provider
Resource access. Filesystem is the only supported production provider.
segment
Splitting resources into independently searchable segments.
watch
Keep the cache fresh while files change.

Structs§

Dimension
A nonzero embedding width, independent of any model’s supported dimensions.
Embedding
A vector with two explicit construction policies.
EmbeddingRequest
One borrowed input and its embedding purpose.
IndexProgress
Snapshot of a pass, not a durable inventory. Counts reset on rediscovery.
IndexReport
IndexRequest
KindProgress
Counts of discovered resources in the current (or last completed) pass. A mixed PDF is one pdf resource, regardless of its page locator kinds.
MatchReason
Per-leg positions in the candidate lists used to rank a hit. Ranks are one-based; None means the leg did not contribute. These ranks precede fusion and the final result limit, so can exceed that limit.
MatchSignals
Which signals found a hit, with their raw scores.
ModelIdentity
Shared embedding-space configuration used by every modality. Modality-specific weights/preprocessing additionally use Embedder::input_identity.
PageDiagnostic
A page omitted after a parse or preparation failure.
ResourceId
A canonical absolute URI identifying a resource, serialized as a string. File URIs preserve non-UTF-8 Unix path bytes through percent encoding.
ResourceMetadata
Facts about a resource at the time it was embedded.
SearchDegradation
Additive response metadata, shared by library, CLI JSON and MCP.
SearchEngine
Search over provider resources; local files are the default.
SearchEngineBuilder
SearchHit
One ranked match.
SearchRequest
SearchResults
SearchStats
SkippedCount
Number of resources skipped for one typed reason.
SkippedResource
A resource that was found but could not be searched.
SyncStats
What happened while bringing the cache up to date.

Enums§

DegradedMode
DegradedReason
Why a response contains only keyword and filename matches.
EmbeddingTask
The purpose of an embedding. Each backend documents its supported mapping. These are embedding tasks, never instructions to generate answers or summaries.
Error
Errors produced by the search engine and its components.
ImageScan
Experimental image scan. Returned scores always use the retained exact f32 vectors.
LeaseEvent
Test-only observations at the indexing lease boundary.
Modality
The kind of content a resource holds.
ProgressEvent
Progress notifications for long operations.
ResourceInput
A borrowed input to embed. The request selects its task independently.
ResourceLocator
Where inside a resource a hit was found. Deliberately modality-independent.
SearchMode
How results are found and ranked.
SkipCode
Stable classification independent of dependency error messages.

Constants§

PDF_TEXT_VERSION
Embedded PDF text format used by PageText locators, available without PDF extraction.

Traits§

Embedder
Synchronous, task-aware local embedding interface. Successful batches return one result per request, in input order. Async callers can use their executor’s blocking pool.

Functions§

expand_tilde
Expand a leading ~/ to the home directory (the shell does not do this inside quotes).
make_preview
Collapse whitespace, drop leading heading lines and cut at a word boundary.

Type Aliases§

ProgressFn
Called without the cache mutex held. Resource-count and embedding events hold the indexing lease: callbacks may inspect the cache or search with sync(false), but must not synchronously start another indexing pass or call scrub_cache on the same engine, since either would reacquire the indexing lease.
Result