Retrieval & evidence
Kit · Optional business libraries · Back to layer index
| Symbol | Kind | Purpose |
|---|---|---|
defineEvidenceChecklist | function | Compile a reusable completion checklist over actual observations. A requirement is satisfied when at least one observation satisfies the provider registered for its kind; isComplete requires every requirement to be satisfied, and missing returns those that are not. Hosts define evidence semantics. |
defineEvidenceProjection | function | Compile a projection that keeps only the sources a caller asked to see. No selection retains the complete evidence; a selection narrows registered source-bearing results. Observations whose tool has no provider pass through untouched, so the projection can only ever remove sources it knows how to name. |
defineRetrieval | function | Compile a retrieval runner from its declared ports and effects. Rejected queries stay in the caller's seen set, so a retry is reported as a duplicate instead of silently repeating the adapter call; only successful results increment the query count. |
Evidence | constant | |
EvidenceProjectionDefinition | interface | Projection configuration, keyed by the tool that produced an observation. |
EvidenceProjectionProvider | interface | Describes which sources an observation can cite, and how to narrow it to cited ones. |
EvidenceProvider | interface | Adjudicates one evidence kind against real observations. |
EvidenceRequirement | interface | Requirements describe evidence that must already exist, never a model's assertion of success. |
FusedRank | interface | One fused result with the per-source ranks that produced its score. |
RankedList | interface | One retriever's ordered result, optionally weighted. |
reciprocalRankFusion | function | Fuse ranked lists with one-based reciprocal rank fusion. Raw retriever scores are intentionally not mixed. Ties break on id, so the output is deterministic for a given input. |
Retrieval | constant | |
RetrievalDefinition | type | Retrieval ports specialized to an App operation context. |
RetrievalEffect | interface | One effect applied after a successful query, in declaration order. |
RetrievalPorts | interface | Host ports and policy for one retrieval kind. |
RetrievalReason | type | Lazy rejection wording: a fixed message, a pre-built error, or a factory bound to the query. |
RetrievalReceipt | interface | Facts of one accepted query. |
RetrievalResult | interface | Adapter output for one accepted query; the Kit renames each source before returning it. |
RetrievalRunner | interface | Compiled retrieval runner. |
RetrievalSource | interface | Request-local citation reference; the App may separately carry its content entity id. |
RetrievalState | interface | Request-owned state. Clearing current evidence must not replenish spent budgets or seen keys. |
TextSearch | class | Optional App-side full-text index. No storage, identity, model calls or Core dependencies. Only declared fields are indexed and only storedFields come back with a hit, so a document never leaks extra properties into search results. |
TextSearchHit | interface | One ranked match; terms are post-tokenization and only stored fields are returned. |
TextSearchOptions | interface | App supplies fields, tokenizer and its own schema/tokenizer revision. |
TextSearchQuery | interface | Search input: a hard result limit and an App-owned filter, both required on every query. |
TextSearchSnapshot | interface | Serialized index; the revision pair proves the snapshot matches the current configuration. |
VectorSearch | class | Exact cosine search for a bounded embedded corpus. Identity and metadata are App-owned. Vectors arrive as plain arrays and are stored normalized in Float32Array form, so query time only needs a dot product per candidate. |
VectorSearchHit | interface | One search hit; the document is a cloned snapshot, not the indexed instance. |
VectorSearchQuery | interface | Search options excluding the query vector, which search takes alongside them. |
VectorSearchSpace | interface | Embedding space identity and width; vectors from another space must never be mixed in. |