Skip to content

Latest commit

 

History

History
211 lines (110 loc) · 15.1 KB

library-api.md

File metadata and controls

211 lines (110 loc) · 15.1 KB

Library API reference

Area Entry points Details
Graph memory Store, ScopedStore, typed create/read/update requests Ontology
Event capture append_event_batch, import_event_stream Event identity and checkpoints below
Search find_via_digests, event passage search Models
Embedding Embedder, EmbedderRegistration, EventSearchEmbedder Register an embedder
Read-only ConsumerReader, ConsumerGraphView Read without changing a store
Administrative reads owner_control::request_owner Store ownership below
Totals StatusReads Bounded totals below

Events and checkpoints

Append assigns source-stream sequence numbers in draft order.

The same source occurrence derives the same event id on another node.

Context identity participates in the derived event identity.

Repeating identical source occurrences inserts no new events.

Changed content under the same source identity returns SourceEventDiverged.

That divergence rolls back the batch's new event.

A caught-up import hashes the stored prefix without decoding it again.

Rewriting a committed prefix returns SourceHistoryDiverged.

The refusal leaves accepted events unchanged.

An absent opaque binding key resolves to no Context.

Binding the same key to the same Context again is a no-op.

A binding persists across reopen.

A key already attached to another Context returns ContextBindingConflict.

The conflict preserves the binding rows.

The conflict preserves the Context rows.

A failed create-and-bind transaction leaves no new binding.

It rolls back the new Context.

The core preserves opaque namespace/reference pairs.

Context bindings remain SYNC OFF in tenant-bound stores.

Event reads return Store-assigned source sequence order.

An event point read in a different Context returns no event.

Subscriptions

A new-Decision subscription identifies the committed Decision.

Its payload includes served Intention descriptions.

An Outcome-conflict subscription identifies threatened Intentions.

A precedent-match subscription identifies the cited successful Decision.

Its payload includes served Intention descriptions.

An invalidation subscription identifies the affected Decision.

The Decision a new-Decision subscription delivers is readable after the store is reopened.

A rolled-back Observation transaction emits no subscription event.

A redelivered action with a saved receipt skips a second visible handler effect.

The receipt remains single after reopen.

Lost acknowledgement retries the same action identity.

The subscription's uncertain metric counts the loss.

Receiver deduplication preserves one visible effect.

A handler error leaves delivery queued.

Store ownership

An owner request for an unheld store returns typed OwnerNotRunning naming that store.

The request leaves the store bytes unchanged.

It creates no companion files.

An unsupported inspection returns typed OwnerRouteUnsupported.

That refusal is not owner absence.

One writable handle serves owner frames in order.

The same handle embeds each recorded text through its registered embedder.

Bounded totals

A status fold that fails on a later page closes its cursor.

A refused CLI status read reports ok:false.

It does not render unestablished counts.

Budgets: configuration. First write: library quickstart.

Consumer graph reads

ConsumerReader::graph() returns the writable Store's audit answer.

It returns the same Context list.

It returns the same Entity.

It returns the same Intention.

It returns the same Decision with its nested relationships.

It returns the same Observation.

The full graph read set preserves the store bytes.

It preserves companion files and the containing directory.

Paged Observation lists remain complete.

Paged audit trails remain complete.

Outcome audit rows retain their committed times in the typed timestamp column.

The JSON snapshot has no duplicate recorded_at field.

The read-only audit answer matches the writable answer.

An undeclared-table read is refused naming that table.

Joins and subqueries cannot bypass that refusal.

A truthful declaration returns the same rows through the direct and live-owner routes.

A consumer audit read without declared audit_log is refused.

A consumer Context list without declared contexts is refused.

A consumer Entity read without declared entities is refused.

A consumer Intention read without declared intentions is refused.

A consumer Decision read without declared decisions is refused.

A consumer Decision read without declared edges is refused.

A consumer Observation read without declared observations is refused.

A consumer Observation read without declared evidence is refused.

A Decision read without a declared edges table refuses that table.

An Observation read without declared evidence refuses the evidence table.

The reader's inventory exposes only its declared tables.

Library projection workers

A held-Store worker cap of two admits no third overlapping embedding call.

Its projection lease stays live during the calls.

A held-Store worker cap of one serializes embedding calls.

Its projection lease stays live during the call.

Library read budgets

A live-owner read with custom per-instance budgets returns the complete 601-row answer.

A file read with its own budgets also returns the complete answer.

Read session options built with custom memory and active-time budgets keep a five-minute cursor idle ceiling.

They keep a thirty-minute cursor lifetime ceiling.

Projection assessment

Requested projection assessment excludes coverage with the wrong projection identity.

ConsumerReader and Store assessments report equal covered counts.

They report equal pending counts.

Consumer assessment creates no schema, model or projection artifacts.

Event-search slice bound

The default external-embedder slice token-loss bound is None.

Bundled Nomic declares Some(200) for the label User: .

It declares no bound for User: without a trailing space.

Document boundaries equal the cached tokenizer's content offsets.

Those boundaries land on UTF-8 character boundaries.

Splitting at the returned boundaries preserves the complete Unicode source.