spt-cognitive-container
Verifiable WASM cognitive container with canonical witness chains
Overview
spt-cognitive-container composes cognitive primitives (graph ingest, min-cut, spectral analysis, evidence accumulation) into a sealed container that produces a tamper-evident witness chain. Each epoch is cryptographically linked to its predecessor, enabling deterministic replay and formal verification of cognitive operations.
Key Features
- Witness Chains --- tamper-evident chain linking every epoch to its predecessor
- Epoch Controller --- phased execution with configurable budgets per epoch
- Arena Allocator --- slab-based memory management for deterministic execution
- Component Masking --- selective activation of cognitive components per tick
- WASM Target --- designed for deterministic execution in WASM sandboxes
Dependencies
Key external dependencies:
serde/serde_json--- serializationthiserror--- typed errorsproptest(dev) --- property-based testing
No internal SPT crate dependencies.
Usage
rust
use spt_cognitive_container::{CognitiveContainer, ContainerConfig, WitnessChain};
let config = ContainerConfig::default();
let mut container = CognitiveContainer::new(config);
let result = container.tick(delta);
// result contains the witness receipt for this epochAPI Reference
Core Types
| Type | Description |
|---|---|
CognitiveContainer | Main container orchestrating cognitive ticks |
ContainerConfig | Configuration for container initialization |
ContainerSnapshot | Serializable snapshot of container state |
TickResult | Output of a single container tick |
Delta | Input delta for a tick |
ComponentMask | Bitmask selecting active components |
Epoch & Witness Types
| Type | Description |
|---|---|
EpochController | Manages epoch phases and budgets |
ContainerEpochBudget | Resource budget per epoch |
Phase | Current epoch phase |
WitnessChain | Chain of tamper-evident witness receipts |
ContainerWitnessReceipt | Single witness receipt for an epoch |
CoherenceDecision | Coherence gating decision |
VerificationResult | Result of witness chain verification |
Memory Types
| Type | Description |
|---|---|
Arena | Slab-based memory arena |
MemoryConfig | Memory configuration |
MemorySlab | Individual memory slab |