- 1
//! vak-context: the context engine (docs/design/68-context-engine.md). - 2
//! - 3
//! Everything that decides *what one request carries* for the model in - 4
//! front of it, as pure functions over the session ledger: - 5
//! - 6
//! - [`capacity`] — `CapacityProfile`: the measured capacity of one model on - 7
//! one provider (window, usable instruction horizon, tokens per char, - 8
//! prefill rate, cache behaviour), probed at bind time and revised from - 9
//! every receipt. Nothing in a request is sized from a declared number. - 10
//! - [`planner`] — `WorkingSetPlanner`: which closed turns ride along at - 11
//! `Full`, `Card` or `Packet` fidelity for this request, chosen against - 12
//! the measured budget by `max(recency, relevance, anaphora)`. A turn is - 13
//! never split; nothing model-visible is cut by a character count. - 14
//! - [`assemble`] — the request assembler: the byte-stable prefix and its - 15
//! digest, the per-turn tail attached to the last user message, cache - 16
//! breakpoints per §10, char accounting that feeds the profile, and the - 17
//! summariser request behind a compaction packet. - 18
//! - 19
//! The ledger itself — `TurnIndex`, `TurnCard`, `derive_with_plan`, the - 20
//! range-keyed packets and `recall` — lives in `vak-session`: that is the - 21
//! one rich original every projection is computed from, and this crate - 22
//! only reads it. The agent loop (`vak-agent`) and the host (`vak-core`) - 23
//! own the I/O: probing, the summariser call, and writing what came back. - 24
//! Nothing here performs network or disk I/O. - 25
- 26
pub mod assemble; - 27
pub mod capacity; - 28
pub mod planner; - 29
- 30
pub use assemble::TailInput; - 31
pub use capacity::{CapacityProfile, ProfileKey}; - 32
pub use planner::{PlanInput, plan, plan_for_session}; - 33
pub use vak_session::{Fidelity, WorkingSetPlan}; - 34
source · Rust
Lib
crates/vak-context/src/lib.rs1.7 KB34 linesSnapshot ed4ab258