sptos-types
No-std kernel interface types for the SPTOS Cognition Kernel
Overview
sptos-types defines all shared kernel interface types for SPTOS. It has zero external dependencies and is fully no_std compatible, making it safe to use in both kernel code and SPF component code. Every other sptos-* crate depends on this one.
Key Features
- Six kernel primitives — Task, Capability, Region, Queue, Timer, and Proof types map directly to the ADR-087 specification
- Zero dependencies — Pure Rust types with no external crates, keeping the kernel type surface minimal
no_std/allocfeature gates — Usable in bare-metal, alloc-only, or full std environments- Proof cache types — Includes both standard and optimized proof cache implementations for Reflex-tier caching
- Vector and graph handles — First-class kernel object types for AI-native vector stores and knowledge graphs
Dependencies
None. This is the leaf crate of the SPTOS dependency tree.
Usage
rust
use sptos_types::{
TaskHandle, TaskPriority, CapHandle, CapRights,
RegionHandle, RegionPolicy, QueueHandle, ProofToken,
VectorKey, GraphHandle,
};
let task = TaskHandle::new(1, 0);
let cap = CapHandle::null();API Reference
Core Types
| Type | Description |
|---|---|
TaskHandle | Handle identifying a unit of concurrent execution |
Capability | Unforgeable typed token granting access to a resource |
CapHandle | Lightweight handle referencing a capability slot |
CapRights | Bitmap of access rights (READ, WRITE, PROVE, GRANT, etc.) |
RegionHandle | Handle to a contiguous memory region |
RegionPolicy | Memory policy: Immutable, AppendOnly, or Slab |
QueueHandle | Handle to a ring buffer IPC queue |
ProofToken | Cryptographic proof token with tier, nonce, and payload |
ProofTier | Proof tier enum: Reflex, Standard, or Deep |
VectorKey | Key identifying a vector in a kernel vector store |
GraphHandle | Handle to a kernel-resident graph store |
KernelError | Unified error type for all kernel operations |
TimerSpec | Deadline-driven scheduling primitive specification |
ProofCache | Fixed-size cache for Reflex-tier proof entries |