Skip to main content

Crate arabica_runtime

Crate arabica_runtime 

Source
Expand description

Headless runtime core.

Runtime projects session events into ephemeral short memory, resolves workspace-scoped long memory, orchestrates model/tool turns, and normalizes runner execution output into canonical protocol events. Session identity, scheduling, event persistence, and event sequencing belong to arabica-session.

Structs§

AcceptanceCriterion
AcceptanceResult
AcceptanceSpec
AccountingCoverage
Verification metrics regarding billing completeness.
AccountingError
ArchivedMemory
Workspace-scoped durable memory.
AutoHydrationObservation
One exact archive read automatically triggered by a repeated tool call.
AvailableModelCatalog
Catalog of available models for bounded proposal exploration.
BlendEvaluationReport
BlendModelEvaluation
BlendPolicyEvaluation
BlendRoutingPolicy
Deterministic per-run routing rules. Each configured alias must exist in the ModelProvider supplied to this runtime.
BlendToolRoute
A route selected after a completed tool batch.
CallCostBreakdown
Fine-grained token and dollar breakdown for a single model call.
CallCostRecord
Detailed accounting record for one model call.
CandidateAggregateReport
Comprehensive aggregate evaluation metrics for one policy candidate.
CategoryWeights
Predeclared category weights used to aggregate multi-category trial scores.
ContextEvaluationData
ContextEvaluationGroup
ContextEvaluationResult
ContextItemMetrics
ContextPolicy
No policy preserves legacy exposure. An explicit policy selects only its sets and includes; source disables and exclusions always take precedence.
ContextReport
CoreRuntime
CriterionEvaluation
Outcome of evaluating an individual criterion.
DecayRule
DeterministicCompactionProjection
Deterministic, provider-free evidence used by the Tier-A PGC/FBGC benchmark. Production projection code is reused directly; this wrapper only supplies a frozen fallback economic envelope and exposes diagnostics.
DeterministicCompactionTiming
Timings for the benchmark-only deterministic compaction audit path.
EvaluationConfig
EvaluationError
EvaluationEvidence
No prompts, arguments, provider envelopes, results, or failure messages. Run IDs are namespaced by workspace/session to avoid cross-session joins.
EvaluationIdentity
Composite evaluation identity tying checker version, task, and scoring profile.
EvaluationPluginMetadata
EvaluationRegistry
EventBatch
A stable runtime grouping over immutable events.
EventMemoryTraits
Relationship metadata used for precise decay. A completion affects only an older event with the same relation key, such as one matching tool call.
EventTtl
EventVisibilityDecision
Explainable decision for one immutable source event.
EvidenceAcceptanceScorer
FileArchiveStore
Atomic filesystem archive. Each pointer is stored as one JSON envelope beneath root, preserving the normalized memory-id hierarchy.
GateCheckEvaluation
GeneratedPolicyRecord
A policy version candidate or active definition generated by background or offline evaluation.
HistoricalTraceConfig
Configuration for historical offline trace rescoring.
KeyAdmissionPolicy
Hard limits for historical LOAD_KEY materialisation. None is unbounded. Limits apply to UTF-8 key-content bytes, excluding full LOAD_ALL items.
KeyAdmissionSummary
LiveSessionConfig
Configuration for real live interactive session evaluation.
LongMemoryError
LongMemoryManager
ModelEvaluationData
ModelEvaluationGroup
ModelEvaluationResult
ModelPriceRule
A pricing rule for a specific model or model family. Rates are specified per million tokens (standard LLM pricing unit).
ObservedTool
PairedComparison
Paired comparison metrics between a candidate and baseline across matched tasks.
PermissionDecision
A decision about one call.
PermissionRequest
One call awaiting a decision, sent to the host’s approver.
PointerGcAdmissionObservation
One cache-aware PointerGC admission decision made before a Provider call.
PolicyComparisonSummary
PolicyComparisonTrial
PolicyProposal
A bounded candidate proposal derived from evaluated evidence.
PriceCard
Versioned price card mapping models/aliases to billing rules in a given currency.
ProposalEvidenceBasis
Provenance and metrics that justified generating this candidate.
RecommendationGatesConfig
Predeclared gates required to recommend promotion of a candidate over baseline.
RecommendationReport
RunAcceptance
RunCancellation
A cancellation signal for one run, shared between the host and Runtime.
RunControl
Everything a host may attach to one run.
RunCostAccounting
Complete, reproducible run cost and time accounting report.
RunEvaluation
RunEvidenceSnapshot
A bounded projection of already-persisted facts. No live file reads, prompts, command arguments, provider envelopes, or raw tool output enter this snapshot.
RunTiming
RuntimeError
RuntimeSession
ScoringObservation
Observed runtime metrics and evaluator conditions for scoring a task run.
ScoringProfile
Frozen scoring profile with formula version, component weights, and references.
ScoringWeights
Relative weights for scoring formula components summing to 1.0.
ShortMemoryMaterialization
Complete output of short-memory materialisation. The source event slice is never modified; decisions and batches are returned for replay diagnostics.
ShortMemoryPolicy
Declarative, replayable policy for event visibility and batch loading.
ShortMemoryProjector
Pure projection of a Session’s immutable event history for the next model turn. TTL and batch policies alter prompt visibility, never the audit log.
SkillDefinition
A host-loaded immutable instruction bundle. Resource keys are relative names; hosts validate paths and capture content before handing it to Runtime.
SqliteArchiveStore
SQLite archive with an idempotent primary-key contract.
TaskResourceBudget
Resource budget limits for a task trial.
TaskScore
Evaluated task score and components.
TaskSpec
Versioned task specification with criteria, weights, and resource budgets.
TaskTrialScore
A score record for one candidate on a specific task and repetition.
TimeAccounting
Bounded time metrics separating active work from user/permission approval wait.
ToolArgumentPermissionRule
ToolPermissionGate
The permission gate a host attaches to a run.
ToolPermissionPolicy
Which rule applies to each tool, keyed by tool name.
TrajectoryDecisionObservation
TrajectoryRoutingFeedback
Trajectory-level feedback associating run scores with routing decisions.
WorkspaceGateConfig
Configuration for workspace integrity and quality gates on real projects.
WorkspaceGateResult
Result of evaluating real workspace integrity gates.

Enums§

AcceptanceCheck
AcceptanceStatus
ArtifactEvidence
BlendToolMatcher
CallCategory
Behavioral role of a model invocation.
DecayMatch
EvaluationDiagnostic
EvaluationMode
Unified evaluation mode distinguishing live sessions, workspace gates, preset benchmarks, and historical audits.
HistoryProjection
How Runtime represents runs OTHER than the one currently executing.
KeyAdmissionDecision
Explainable outcome of applying the key budget to one batch.
LongMemoryErrorKind
MemoryClass
Small retention taxonomy used by Runtime. Protocol events remain detailed audit facts and are projected into one of these policy classes.
PointerGcAdmissionPolicy
Selects whether PointerGC is admitted by the production profitability gate or by the preregistered mechanism-qualification gate. The qualification mode is explicit evidence-generation configuration; it must not be used for economic-effect estimates.
PolicyLifecycleStatus
Lifecycle state for an immutable routing policy definition.
PolicyParameterDelta
A specific parameter modification within a proposed policy candidate.
RecommendationDecision
RuntimeArchiveStore
RuntimeCompactionStrategy
Runtime-owned context compaction mode.
RuntimeErrorKind
TaskScoreStatus
Scoring outcome status distinguishing completed, pending, incomplete, and fault states.
ToolPermissionRule
What the gate does with a call to one tool.

Constants§

AUTO_COMPLETION_REQUIRED_MESSAGE
CREATE_PLAN_TOOL_NAME
RUNTIME_COMPLETE_TOOL_NAME
UPDATE_PLAN_TOOL_NAME

Traits§

ContextEvaluationStrategy
LongMemoryStore
Durable backing contract for recoverable short-memory pointers.
ModelEvaluationStrategy
PointerGcObservationSink
Optional best-effort telemetry sink for incremental PointerGC decisions.
RunAcceptanceScorer
RuntimeEngine
RuntimeEventLog
SkillSource
Hosts own discovery and I/O; Runtime only pins the returned immutable bundle.

Functions§

account_run_cost_and_time
Compute complete cost and time accounting from an event history and price card. Duplicate/replayed observations are identified and suppressed from billing.
aggregate_candidate_scores
Aggregate candidate scores using predeclared category weights.
calculate_task_score
Pure deterministic calculation of a versioned task score.
compare_policy_trials
Compare actual trials on identical task/specification/repetition sets. Reject duplicate runs, mixed policy versions, and incomparable cohorts.
compute_paired_comparison
Compute matched paired comparisons and cluster-robust standard errors across repetitions.
context_report
evaluate_blend_history
Rebuild call and trajectory measurements from canonical persisted events.
evaluate_live_session
Evaluate a real running session from its evidence snapshot and live configuration.
evaluate_live_session_from_history
Fully evaluate a live session directly from its event history, including automatic snapshot extraction and price-card cost accounting.
evaluate_recommendation
Evaluate candidate against baseline across predeclared recommendation gates.
evolve_blend_policy
Propose an evolved routing policy candidate given historical evaluation evidence and reports. This derives an updated candidate version without mutating currently active or running session policies.
exact_transcript_entries
Reconstruct short memory for every run OTHER than current_run_id by replaying each run’s own typed model exchange and tool-call Events, instead of expanding TTL/batch-projected event batches. This is what crate::HistoryProjection::ExactTranscript substitutes for the short_memory half of ShortMemoryProjector::materialize_for_model_step’s output; the current run’s own exchange is unaffected and continues to be reconstructed separately by exact_run_continuation.
execute_controlled_test
Execute a controlled test command in an isolated, bounded environment.
execute_workspace_gate
Execute workspace integrity checks on a real project workspace.
generate_bounded_proposals
Generate bounded candidate policy proposals informed by evaluation evidence.
mcp_context_identity
JSON tuple encoding avoids ambiguity from separators or sanitized names.
mcp_server_context_id
memory_read_definition
memory_search_definition
plan_tool_definitions
project_compaction_for_benchmark
run_evidence_snapshots
Build snapshots only for terminal runs, stopping at their first terminal event. Later conversation turns cannot change the evidence being graded.
runtime_complete_tool_definition
score_run_evaluation
Score a completed run evaluation against a task specification and profile.
tool_context_identity