Expand description
§Omega Cognitive Kernel
Training-free online strategy adaptation for auditable agents and adaptive applications.
Omega Cognitive Kernel changes a bounded, structured policy surface instead of updating model weights or executing arbitrary code. It observes a task, predicts and chooses an action, learns from the result, optionally applies a reversible policy patch, measures the consequence, and records the complete transition.
Patch. Remember. Measure. Roll back.
World (L0) -> Reflect & patch (L1) -> Meta-modulate (L2) -> bias next L0§5-Minute Quickstart (Python)
Use Omega as an auditable, bounded strategy-adaptation guardrail for rate-limited APIs, gateways, or agent tool loops:
pip install omega-cognitive-kernelimport omega_cognitive_kernel_python as ok
# Start in safe Shadow mode (AdaptiveGuard.shadow) or opt into Active mode:
with ok.AdaptiveGuard.active({"max_concurrency": 4.0, "retry_backoff_ms": 40.0}) as guard:
step = guard.propose_and_apply({"max_concurrency": 2.0, "retry_backoff_ms": 65.0})
params = guard.params() # applied snapshot (unchanged in shadow mode)
guard.record_outcome(step["proposal_id"], reward=0.75, error_delta=0.05)
recovery = guard.recommend_recovery() # monotonic rollback advice to baselineUsing Rust? Run cargo add omega-cognitive-kernel and see examples/adaptive_v1_host.rs or docs/INTEGRATING.md. For an end-to-end local HTTP 429 rate-limit guardrail comparison (Shadow vs Active), run examples/python/http_rate_limit_guard.py (see reports/http-rate-limit-guard-2026-12-01.md). To see repository skills/*/SKILL.md workflows governed end-to-end by AdaptiveGuard across a restart, run examples/python/skill_guarded_agent.py.
§Which API should I use?
| API Surface | Best For | Mode / Safety Default | Empirical Status |
|---|---|---|---|
AdaptiveGuard (Python) | Fastest drop-in guardrail for rate-limited APIs, gateways, or agent tool loops (auto IDs + native dict returns) | Explicit keep, shadow, or active | Backed by Adaptive Protocol v1 (reports/adaptive-v1-eval-2026-11-30.md, reports/http-rate-limit-guard-2026-12-01.md) |
DurableAdaptiveSession / AdaptiveSession (Rust / Python) | Production host integration needing caller-supplied idempotency keys, exact full-snapshot receipts, and schema v7 persistence | Keep / Shadow by default; Active requires opt-in | Stable v1 protocol contract (docs/ADAPTIVE_V1.md) |
ClosedLoopSession (Rust / Python) | Preset-driven external telemetry loop (PolicySchema multi-parameter clamping + checkpoint rollback) | Preset-configured (steady_prior, control_plane, etc.) | Verified by tests/closed_loop_matrix.rs |
Kernel<O, D, E> (Rust / Python) | Research & custom embedded L0/L1/L2 observer/decision/executor simulations (no_std / wasm32) | L1 disabled by default; L2 opt-out | Ordinary L2 bandit benchmark has not shown reproducible gain (reports/l2-gain-matrix-2026-11-28.md) |
§Why Omega?
Adaptive systems often require retraining/fine-tuning or allow unrestricted code changes that are difficult to inspect and reverse. Omega takes a narrower approach: online adaptation is expressed as bounded RuleEffect data and validated L2Policy snapshots, persisted as cognitive state, and exposed through audit and replay surfaces.
The current stable release is v1.3.0, published across GitHub Releases, crates.io, and PyPI. Check the linked package registries and Releases page for platform artifacts and checksums.
§Core concepts
§L0: world interaction
L0WorldLayer connects an observer, predictor, decision maker, executor, memory facade, and learner. Each step follows this sequence:
observe
-> retrieve cases, strategies, CAS state, and current RuleEffect
-> predict
-> decide under constraints
-> execute
-> compute prediction error
-> update case/strategy/CAS memoryThe default implementation uses MultiModalObserver, ModelBasedPredictor, ConstrainedDecisionMaker, and SandboxedExecutor. Integrators can inject custom observer, decision maker, and executor implementations through Kernel<O, D, E>. BanditKernel and Kernel::with_bandit_ucb(path) provide a standard UCB decision maker for two-armed bandit tasks; see docs/STANDARD_BANDIT.md.
§L1: discrete cognitive patches
L1 distills a trajectory and reflects a candidate CognitivePatch. When self_modify_enabled is enabled, the candidate is sanitized, validated by CodeSandbox, committed to the versioned store, and installed as the active RuleEffect. A cooldown prevents immediate repeated patching.
L1 is disabled by default. The patch metadata may contain descriptive code and expected-effect text, but the behavior-changing surface is the structured RuleEffect, not executable patch code.
CodeSandbox performs only static rule checks, forbidden-keyword checks, and RuleEffect bound checks (it does not compile or execute arbitrary code). When l1_shadow_mode is enabled, L1 runs dry-run validation (validating and emitting patch_id without mutating cognitive_effect). When L2 is in active intervention, defensive mode, or rollback cooldown, L2 holds write arbitration priority (blocks_l1_write). In addition, OmegaOrchestrator::run_once integrates L1 consequence observation and automatic rollback.
§L2: bounded meta-modulation
L2 evaluates meta-metrics and can detect a fixed-point regime. When its alignment score, cooldown, defensive-mode, and consequence-stability checks allow a commit, it queues an immutable L2Policy expert/KL prior for the next L0 decision. L0 dwell, margin, and safety checks still apply. L2 also retains rollback/consequence state and accepts reward/error/risk feedback through observe_l2_consequence.
L2 is an independent channel and enabled by default; L1 self-modification remains disabled. To freeze all policy mutation, disable both gates. Use set_l2_enabled(false) for a monitoring-only baseline and set_l2_enabled(true) to re-enable bounded interventions. Benchmark results do not by themselves establish effectiveness across other tasks. See docs/L2_BENCHMARK.md.
§Installation
§Use the Rust library
For the published Rust library, use:
cargo add omega-cognitive-kernelThis resolves the latest registry release, which may not expose the current checkout’s API. To use the source in this repository, add a path dependency while developing locally:
[dependencies]
omega-cognitive-kernel = { path = "/path/to/omega-cognitive-kernel" }§Install the CLI from a checkout
Run from the repository root:
cargo install --path . --locked
cargo install --path . --locked --features gui --bin omega-dashboardFor a reproducible remote source installation, use --git <repository-url> --rev <verified-full-commit> rather than an unpublished tag. Check the Releases page for published binaries and the crates.io package for the latest published library version.
§Python bindings
python -m pip install omega-cognitive-kernelThe Python bindings support CPython 3.10–3.15; each version is included in the CI and release wheel matrices. The package minimum remains Python 3.10.
The local binding module exposes Kernel, ClosedLoopSession, AdaptiveSession, AuditLog, and CheckpointStore through PyO3. See bindings/python/PYTHON_README.md for development and testing instructions.
§Choosing a closed-loop preset
All 7 (L0, L1, L2) closed-loop presets can be selected via CLI (--preset) or Python (ClosedLoopSession):
Preset (CLI / Python) | (L0, L1, L2) | Best For |
|---|---|---|
deterministic | (1, 0, 0) | Baseline control group / deterministic edge runtime |
hot-patcher / hot_patcher | (0, 1, 0) | External service hot-patcher without meta-layer overhead |
meta-guard / meta_guard | (0, 0, 1) | Macro regime supervisor / safety monitor for external systems |
fast-adapt / fast_adapt | (1, 1, 0) | Lightweight local fast-adaptation experiments |
steady-prior / steady_prior | (1, 0, 1) | Production default for stable adaptive agents |
control-plane / control_plane | (0, 1, 1) | External LLM agent / microservice policy control plane |
full-kernel / full_kernel | (1, 1, 1) | Autonomous end-to-end adaptive kernel |
See the 7-mode benchmark protocol and behavioral matrix for verified invariants and reproducible benchmark-loops commands, and explore runnable examples: examples/python/llm_agent_guard.py, examples/python/service_policy_adapter.py, and examples/external_control_plane.rs.
§Adaptive Kernel Protocol v1 (Stable v1)
For hosts requiring strict request idempotency, full-snapshot application receipts, outcome attribution, and monotonic recovery versions, use DurableAdaptiveSession (Rust, src/adaptive/) or AdaptiveSession (Python). Defaults remain Keep (non-mutating), Shadow proposals are non-executable, and Active requires explicit opt-in. See docs/ADAPTIVE_V1.md, docs/ADAPTIVE_V1_STABILIZATION_REVIEW.md, reports/adaptive-v1-eval-2026-11-30.md, and reference hosts examples/adaptive_v1_host.rs / examples/python/adaptive_v1_host.py.
§Quick start
The following commands run the default CLI from a checkout. The demo uses an isolated temporary state directory; normal runtime commands use .omega/state.json unless an explicit state path is supplied.
# Run an isolated demonstration.
cargo run --release --bin omega-kernel -- demo
# Run 20 steps against the default state path.
cargo run --release --bin omega-kernel -- run --steps 20
# Inspect human-readable or machine-readable status.
cargo run --release --bin omega-kernel -- status
cargo run --release --bin omega-kernel -- status --json
# Inspect the append-only audit log.
cargo run --release --bin omega-kernel -- audit --summary
# Replay the last 15 trajectory rows without re-running the world.
cargo run --release --bin omega-kernel -- replay --tail 15
# Run the L2 benchmark and emit JSON.
cargo run --release --bin omega-kernel -- benchmark-l2 --runs 20 --json
# Independent L0 / L1-only / L2-only / L1+L2 factorial comparison
cargo run --release --bin omega-kernel -- benchmark-l1l2 --runs 20 --json
# Fixed four-scenario L2 gain matrix with discovery and validation seeds
cargo run --release --bin omega-kernel -- benchmark-l2-gain --json
# Fast mechanism-only matrix preflight (not effectiveness evidence)
cargo run --release --bin omega-kernel -- benchmark-l2-gain --smoke --json
# Run a single external-telemetry closed-loop step with a preset.
cargo run --release --bin omega-kernel -- --preset control-plane step-external --step-id 1 --error 0.55 --risk 0.20 --json
# Dry-run an external step without saving state (--no-save).
omega-kernel --preset control-plane step-external --step-id 1 --error 0.55 --risk 0.20 --no-save --json
# Run the 7-combination closed-loop comparison benchmark.
omega-kernel benchmark-loops --scenario shift --steps 24 --json
# Start the optional operator dashboard.
cargo run --release --features gui --bin omega-dashboard§Rust API
The default kernel persists state, audit events, and trajectory data under the state path. Kernel::open(None) resumes an existing state file when present or creates a new kernel otherwise.
use omega_cognitive_kernel::Kernel;
fn main() -> omega_cognitive_kernel::Result<()> {
let mut kernel = Kernel::open(None)?;
let report = kernel.run("maintain coherent self-model", 10)?;
println!(
"error {:.3} -> {:.3}; decreased={}",
report.early_avg_err,
report.final_avg_err,
report.error_decreased
);
let replay = kernel.replay_trajectory(10)?;
println!(
"trajectory rows={}, accepted patches={}",
replay.rows,
replay.patches
);
kernel.save()?;
Ok(())
}Useful product-facing methods include:
| Method | Purpose |
|---|---|
step / run | Execute one or multiple goal-driven cycles |
status | Return operational metrics and safety state |
save / load | Persist or restore the schema-versioned snapshot |
checkpoint / rollback | Create or restore a full recovery snapshot |
audit_summary / audit_tail | Inspect append-only audit events |
replay_trajectory | Summarize trajectory JSONL without world re-execution |
set_trajectory_max_bytes | Set the maximum size for new trajectory rows |
set_event_hook | Receive events after durable audit append |
set_l2_enabled | Enable or disable L2 interventions (default on) |
observe_l2_consequence | Feed reward/error/risk feedback to L2 |
set_strategy_weight | Apply an operator strategy-weight nudge |
For custom world integration, implement the public Observer, DecisionMaker, and Executor traits and construct the kernel with Kernel::with_adapters(observer, executor, decision) or Kernel::with_adapters_and_path(observer, executor, decision, path).
§Configuration and safety defaults
KernelConfig can be loaded from TOML with Kernel::from_config_path. Its important defaults are:
| Setting | Default | Meaning |
|---|---|---|
state_path | .omega/state.json | Snapshot location |
autosave | true | Save after successful steps |
auto_checkpoint_on_patch | true | Capture pre-step state for patch recovery |
dump_trajectory | true | Append a trajectory row for each step |
privacy.redact_user_content | false | Replace known user goal/task/checkpoint-label text in kernel-owned persistence |
error_threshold | 0.30 | L1 mean-error threshold |
min_steps_between_patches | 3 | L1 patch cooldown |
max_risk | 0.65 | L0 decision constraint |
self_modify_enabled | false | L1 discrete patch gate |
l1_shadow_mode | false | L1 dry-run validation without mutating RuleEffect |
l2.enabled | true | L2 bounded-modulation gate |
Example configuration:
state_path = ".omega/agent-state.json"
autosave = true
auto_checkpoint_on_patch = true
dump_trajectory = true
error_threshold = 0.30
min_steps_between_patches = 3
max_risk = 0.65
self_modify_enabled = false
l1_shadow_mode = false
[privacy]
redact_user_content = false§Persistence, audit, and replay
Given a state path such as .omega/state.json, the runtime stores:
.omega/
├── state.json # schema-versioned KernelSnapshot
├── audit.jsonl # append-only AuditRecord stream
├── trajectory.jsonl # optional per-step replay source
└── checkpoints/ # full rollback snapshotsThe current on-disk schema is version 7. It persists total steps, biases, constraints, CAS metrics, cases, strategies, active modules, patch history, L1 safety state, UCB decision state, the resident L2 controller, bounded cache, Dayan residual, pending/applied policy snapshots, a per-instance case-replay cursor, and optional durable Adaptive Kernel Protocol v1 state (adaptive_state). Older snapshots (v0–v6) migrate forward with safe defaults (never granting active adaptation permission implicitly); newer unsupported schema versions are rejected.
The optional sqlite feature uses the advisory-fixed rusqlite 0.43 / libsqlite3-sys 0.40 line and links to a system SQLite library instead of bundling SQLite. Building it requires the system SQLite development library and headers; the linked runtime must be version 3.54.0 or newer. SqliteStateStore checks the linked version before opening or creating a database and rejects older versions under RUSTSEC-2026-0459. If your environment does not ship SQLite 3.54.0+ system headers, enable sqlite-bundled instead to compile the bundled SQLite from libsqlite3-sys 0.40 while keeping the same runtime version check.
Rust applications can import omega_cognitive_kernel::AsyncStateStore when both Cargo features std and async are enabled (for example, --features "std,async"). This root re-export is gated on std + async and is unavailable in no-std or non-async builds.
External closed-loop mode supports cross-process persistence (ExternalLoopState, compatible with schema v7), structured audit events (ExternalStep, ExternalRollback, ExternalStepDuplicate), and real L2MetaLayer engine bridging.
State writes serialize to a same-directory temporary file, call sync_all, and atomically rename the file. Audit append, trajectory writes, and autosave failures are returned to the caller instead of being silently ignored. These failures do not roll back an external action that an executor already performed; custom executors need their own timeout, idempotency, and recovery policy.
In v0.17.1, external closed-loop control adds a BTreeMap-backed multi-dimensional bounded parameter space (PolicySchema / ParameterSpec) that automatically dispatches and rolls back parameter tables across processes via ControlDirective::active_params, unifies ClosedLoopSession errors under OmegaError, and introduces a pluggable StateStore trait (FileStateStore / MemoryStateStore).
New kernels cap trajectory.jsonl at 64 MiB by default. Rust and Python callers can change the per-kernel limit with set_trajectory_max_bytes; an append that would exceed it fails the step instead of truncating or rotating history. Existing oversized files remain replayable, but new rows are rejected until the limit is raised. Set dump_trajectory = false to disable trajectory writes.
On Unix, newly created persistence directories request mode 0700 and files request 0600; existing sidecar files and directories are not chmod’d. State is atomically replaced on save and therefore adopts the private file mode on its next save. Windows uses the current user’s default ACL/inheritance. The opt-in redaction scope, exact paths, old-file behavior, and limitations are documented in docs/persistence-privacy.md.
The audit stream includes Step, PatchAccepted, PatchRejected, Checkpoint, Rollback, TaskEpisode, tool allow/deny events, fixed-point transitions, and L2 modulation proposal/commit events. set_event_hook is invoked only after the related audit record has been appended successfully. Reading, summarizing, or polling malformed complete JSONL records returns an error with the path, line, and byte offset instead of silently dropping events. Polling retains an incomplete trailing line for a later read.
Trajectory replay reads JSONL and reports row count, accepted patch count, first/last average error, action counts, and a selectable tail. It does not re-execute the world.
§Repository layout
src/
├── adaptive/ # Adaptive Kernel Protocol v1 (types, no_std state machine, durable session, eval)
├── api/ # public Kernel API (mod, metrics, trajectory, journal, closed_loop; tests in api_tests.rs)
├── orchestrator.rs # L0/L1/L2 composition and one-cycle execution
├── types.rs # Observation, Action, Trajectory, RuleEffect, patches
├── l0/ # observers, predictors, decisions, executors, hybrid predictor
├── l1/ # abstraction, reflection, sandbox, versioned store
├── l2/ # resident controller, fixed-point, L2Policy, spectral diagnostics
├── memory/ # cases, strategies, CAS, MemoryFacade, weights
├── body/goals/ # independently exported body-channel and goal utilities
├── planning/reactor/ # proposal/scheduling helpers outside the default Kernel loop
├── llm/introspect/ # proposal validation and entropy observation helpers
├── critic.rs # bounded reward/trial utilities
├── persist.rs # KernelSnapshot, migration, atomic save
├── audit.rs # append-only events and polling
└── safety/ # default decision constraints, crypto, token book, and vault primitives
bindings/python/ # PyO3 bindings
examples/ # integration and adapter examples
tests/ # integration tests
portable/ # no-std and WASM probes
docs/ # API, integration, dashboard, portability, roadmap
memory-bank/ # persistent project context for contributors/agents§Development and verification
Core and non-GUI targets require Rust 1.89 (earlier v0.14.x releases supported Rust 1.74) so the optional SQLite feature uses the fixed dependency chain for RUSTSEC-2026-0459. Common checks are:
The optional gui feature uses eframe 0.37 and requires Rust 1.95. This is feature-specific: the core and non-GUI feature set retains the Rust 1.89 MSRV. CI validates the core compatibility subset on Rust 1.89 and the GUI feature on Rust 1.95.
cargo test
cargo test --all-features
bash scripts/test-no-std.sh
bash scripts/test-wasm-runtime.shRelevant behavior is covered by unit and integration tests for orchestration, rule preferences, patch cooldown, fixed-point transitions, event hooks, schema migration, atomic replacement, audit polling, and intervention policy. The repository also includes Python integration tests and release/portability workflows.
Before changing behavior, start at Kernel::step in src/api/mod.rs, then follow src/orchestrator.rs and the affected layer. Treat RuleEffect::sanitize, the independent L1/L2 gates, KernelSnapshot::migrate, audit event compatibility, and persistence ordering as compatibility-sensitive surfaces.
§Documentation map
Current behavior is documented in the files below. docs/releases/RELEASE_NOTES_v*.md, docs/archive/*.md, dated experiment results, and weekly reports are historical snapshots rather than current-default references.
| Document | Focus |
|---|---|
ARCHITECTURE.md | Layer model, safety gates, and persistence design |
docs/INTEGRATING.md | Current Rust API usage, adapters, configuration, and embedding |
docs/persistence-privacy.md | Persisted data scope, opt-in redaction, and file permissions |
docs/CLOSED_LOOP.md | Safety switches and trajectory behavior |
docs/DASHBOARD.md | Operator dashboard workflows |
docs/PORTABILITY.md | 中文可移植性摘要;权威矩阵见 docs/HOST_PORTABILITY.md |
docs/EXPERIMENTS.md | 实验方法、预注册判据及结果(中文) |
docs/HOST_PORTABILITY.md | Host/no_std/WASM and snapshot verification matrix |
docs/L2_BENCHMARK.md | Reproducible L2 baseline comparison |
docs/TROUBLESHOOTING.md | Installation and runtime troubleshooting |
CHANGELOG.md | Release history and unreleased changes |
memory-bank/ | Source-grounded project continuity context |
ROADMAP.md | Next development phases, priorities, and exit criteria |
§Roadmap and project boundaries
The 0.5 line shipped schema/replay, event hooks, strategy weights, dashboard workspaces, CLI parity, and status JSON. Version 0.6.0 adds generic decision makers and UCB-based bandit composition alongside the safety and persistence work in this release. A full multi-tenant control plane, workspace multi-kernel orchestration service, and possible additional docs.rs feature-flag polish remain deferred.
The public core is released under the MIT License. See LICENSE and NOTICE for licensing, trademark, and open-core details. Hosted services, managed policy packs, and enterprise control-plane features are not assumed to be part of the public MIT core.
§License
This project is released under the MIT License. The names “Omega”, “Omega Kernel”, and “Omega Cognitive Kernel” and related branding are trademarks of the copyright holder(s); source-code licensing does not grant trademark rights.
Omega Cognitive Kernel — patch, remember, measure, roll back.
Re-exports§
pub use adaptive::Bridge;pub use adaptive::Experience;pub use adaptive::Memory;pub use adaptive::Signal;pub use adaptive::SignalHandler;pub use adaptive::Training;pub use api::replay_trajectory_file;stdpub use api::Kernel;stdpub use api::KernelMetricsSnapshot;stdpub use api::KernelStatus;stdpub use api::RunReport;stdpub use api::TrajectoryReplayRow;stdpub use api::TrajectoryReplaySummary;stdpub use api::DEFAULT_MAX_TRAJECTORY_BYTES;stdpub use audit::AuditEvent;stdpub use audit::AuditLog;stdpub use audit::AuditRecord;stdpub use audit::AuditSummary;stdpub use audit::KernelEvent;stdpub use config::InterventionLevel;stdpub use config::InterventionMode;stdpub use config::InterventionPolicy;stdpub use config::KernelConfig;stdpub use config::L2Config;stdpub use config::PrivacyConfig;stdpub use orchestrator::OmegaOrchestrator;pub use orchestrator::StepResult;pub use persist::KernelSnapshot;stdpub use persist::CURRENT_SCHEMA_VERSION;stdpub use persist::DEFAULT_STATE_PATH;stdpub use task::run_bandit_task;stdpub use task::run_l1_l2_factorial_benchmark;stdpub use task::run_l2_benchmark;stdpub use task::run_l2_benchmark_scenario;stdpub use task::run_l2_benchmark_scenario_with_gate;stdpub use task::run_l2_gain_matrix;stdpub use task::BanditReport;stdpub use task::FactorialArm;stdpub use task::FactorialBenchmarkReport;stdpub use task::FactorialEffect;stdpub use task::FactorialRun;stdpub use task::L2BenchmarkAggregate;stdpub use task::L2BenchmarkReport;stdpub use task::L2GainAssessment;stdpub use task::L2GainMatrixReport;stdpub use task::L2GainScenarioAssessment;stdpub use task::L2GainSeedSet;stdpub use task::L2PairedRun;stdpub use task::PairedMeanDifference;stdpub use task::L2_GAIN_DEFAULT_EPISODES;stdpub use task::L2_GAIN_DEFAULT_RUNS;stdpub use task::L2_GAIN_DEFAULT_STEPS;stdpub use task::L2_GAIN_DISCOVERY_SEED;stdpub use task::L2_GAIN_SCENARIOS;stdpub use task::L2_GAIN_VALIDATION_SEED;stdpub use l0::bandit_decision::BanditUcbDecisionMaker;pub use l0::bandit_decision::BanditUcbSnapshot;pub use l0::decision::ConstrainedDecisionMaker;pub use l0::decision::DecisionMaker;pub use l0::executor::Executor;pub use l0::executor::SandboxedExecutor;pub use l0::executor::LoggingExecutor;stdpub use l0::executor::ToolGateExecutor;stdpub use l0::hybrid_predictor::HybridWorldModel;pub use l0::hybrid_predictor::HybridWorldPredictor;pub use l0::hybrid_predictor::TinyAttentionPredictor;pub use l0::observer::DirSnapshotObserver;stdpub use l0::observer::FileObserver;stdpub use l0::observer::HttpObserver;stdpub use l0::observer::MultiModalObserver;pub use l0::observer::Observer;pub use l0::predictor::ModelBasedPredictor;pub use l0::predictor::Predictor;pub use l1::L1SpectralReflector;pub use l1::SpectralBin;pub use l1::SpectralPatch;pub use l2::CognitiveRealm;pub use l2::KernelStepOutput;pub use l2::L2CognitiveGate;pub use l2::L2Decision;pub use l2::L2State;pub use l2::SpectralGateConfig;pub use memory::export_weights;pub use memory::migrate_payload;pub use memory::squash_delta_history;pub use memory::verify_weights;pub use memory::WeightsPayload;pub use memory::WEIGHTS_MAGIC;pub use memory::WEIGHTS_VERSION;pub use safety::ActionBoundary;pub use safety::AuthorizationToken;pub use safety::TokenBook;pub use safety::StorageLock;stdpub use safety::Vault;stdpub use types::*;
Modules§
- adaptive
- Adaptive Kernel Protocol v1 contract types and pure
no_stdstate machine. Adaptive Kernel Protocol v1 contract types and pure state machine. - api
std - Public product API (S2 + S3 hardening + adapter injection + config).
- audit
std - Append-only audit log (S3 hardening).
- checkpoint
std - Named checkpoints for rollback (S3).
- config
std - TOML configuration for product-facing Kernel knobs.
- config_
toml stdandtoml - TOML configuration support (requires
tomlfeature). - l0
- World-interaction layer for observation, prediction, decision-making, and execution.
- l1
- Cognitive reflection, learning, and safely bounded policy-patching layer.
- l2
- Meta-cognitive control, stability monitoring, and policy-gating layer.
- memory
- Memory stores and utilities for cases, strategies, and serialized weights.
- orchestrator
- Coordinates the L0, L1, and L2 layers for each kernel step.
- persist
std - Disk persistence for kernel state (S2 product surface).
- safety
- Authorization, action-boundary, and storage-protection APIs.
- task
std - Minimal task environment: nonstationary 2-armed bandit and L2/closed-loop benchmarks. External reward is written back into strategy memory so the task loop is closed.
- types
- Shared domain and state types used by the public kernel API.
Structs§
- BodyBus
- Named in-memory channels for sensors and actuators.
- Body
Channel Info - Channel metadata snapshot returned by
BodyBus::list_channels. - Body
Command Proposal - Structured actuator command proposal emitted before token-gated execution.
- Body
Packet - Packet returned by every
BodyBusoperation. - Body
Summary - Aggregate observability summary for
BodyBus. - Critic
- Entropy
Report - Entropy
Watchdog - Goal
Node - Goal
Tree - Goal
Tree Summary - Intrinsic
Motivation - Intrinsic
Signal - LlmBridge
- LlmProposal
- Plan
- Plan
Step - Priority
Reactor - Reactor
Task - Reflection
Report - Reward
Signal - Schema
Result - Short
Horizon Planner - Trial
Budget
Enums§
- Body
Packet Status - Lifecycle status returned in
BodyPacket. - Channel
Kind - Supported channel directions on
BodyBus. - Goal
Status - Omega
Error - Error returned by the kernel’s public operations.
Functions§
- new_
uuid - Generates process-local identifiers without requiring an OS random source. Host applications can replace this with an external identity source when globally unique IDs are required; the core only needs stable instance IDs.
- now_utc
- Returns the current UTC time, or the Unix epoch when built without
std. - now_
utc_ string std - Returns the current UTC time as RFC 3339, or the Unix epoch without
std. - parse_
suggestion_ json
Type Aliases§
- Result
- Result type used by the kernel’s public APIs.