pub struct KernelHandle {Show 13 fields
pub state: StateApi,
pub agents: AgentApi,
pub security: SecurityApi,
pub persona: PersonaApi,
pub extensions: ExtensionApi,
pub mcp: McpApi,
pub infra: InfraApi,
pub spaces: SpaceApi,
pub exec: ExecApi,
pub browser: BrowserApi,
pub a2a: A2aApi,
pub knowledge: Arc<KnowledgeBase>,
pub knowledge_lens: Arc<KnowledgeLens>,
}Expand description
Oxios kernel System Call API — composed of 12 domain Facades.
Each Facade groups related system calls:
StateApi— data persistence, sessionsAgentApi— agent lifecycle, budgets, memorySecurityApi— auth, audit trail, RBAC, approvalsPersonaApi— multi-persona managementExtensionApi— programs, skills, host toolsMcpApi— MCP server bridgeSpaceApi— Space management, knowledge flowExecApi— execution config, access managementBrowserApi— browser backendA2aApi— agent-to-agent communication- [
KnowledgeBase] — markdown note management (kernel-free, via oxios-markdown)
Fields§
§state: StateApiState management: save/load/sessions.
agents: AgentApiAgent management: lifecycle/budgets/memory.
security: SecurityApiSecurity: auth/audit/RBAC/approvals.
persona: PersonaApiPersona management.
extensions: ExtensionApiExtensions: programs/skills/host tools.
mcp: McpApiMCP server bridge.
infra: InfraApiInfrastructure: Git/scheduler/cron/resources/events/system.
spaces: SpaceApiSpace management: context partitioning, knowledge flow.
exec: ExecApiExecution: config + access management.
browser: BrowserApiBrowser backend (zero-sized when browser feature is disabled).
a2a: A2aApiAgent-to-agent communication.
knowledge: Arc<KnowledgeBase>Knowledge base: markdown notes (direct access, no kernel dependency).
knowledge_lens: Arc<KnowledgeLens>Semantic knowledge overlay (HNSW index + agent recall).
Implementations§
Source§impl KernelHandle
impl KernelHandle
Sourcepub fn new(
state: StateApi,
agents: AgentApi,
security: SecurityApi,
persona: PersonaApi,
extensions: ExtensionApi,
mcp: McpApi,
infra: InfraApi,
spaces: SpaceApi,
exec: ExecApi,
browser: BrowserApi,
a2a: A2aApi,
knowledge: Arc<KnowledgeBase>,
knowledge_lens: Arc<KnowledgeLens>,
) -> Self
pub fn new( state: StateApi, agents: AgentApi, security: SecurityApi, persona: PersonaApi, extensions: ExtensionApi, mcp: McpApi, infra: InfraApi, spaces: SpaceApi, exec: ExecApi, browser: BrowserApi, a2a: A2aApi, knowledge: Arc<KnowledgeBase>, knowledge_lens: Arc<KnowledgeLens>, ) -> Self
Create a new KernelHandle from 12 domain Facades.
Each Facade is assembled independently in kernel.rs and passed here.
This enables testing individual Facades without the full kernel.
Sourcepub fn from_subsystems(
state_store: Arc<StateStore>,
event_bus: EventBus,
supervisor: Arc<dyn Supervisor>,
scheduler: Arc<AgentScheduler>,
memory_manager: Arc<MemoryManager>,
git_layer: Arc<GitLayer>,
audit_trail: Arc<AuditTrail>,
budget_manager: Arc<BudgetManager>,
resource_monitor: Arc<ResourceMonitor>,
cron_scheduler: Arc<CronScheduler>,
program_manager: Arc<ProgramManager>,
skill_store: Arc<SkillStore>,
persona_manager: Arc<PersonaManager>,
mcp_bridge: Arc<McpBridge>,
auth_manager: Arc<Mutex<AuthManager>>,
access_manager: Arc<Mutex<AccessManager>>,
host_tool_validator: Arc<HostToolValidator>,
config: OxiosConfig,
start_time: Instant,
space_manager: Arc<SpaceManager>,
) -> Self
👎Deprecated: Use KernelHandle::new() with pre-built Facades instead
pub fn from_subsystems( state_store: Arc<StateStore>, event_bus: EventBus, supervisor: Arc<dyn Supervisor>, scheduler: Arc<AgentScheduler>, memory_manager: Arc<MemoryManager>, git_layer: Arc<GitLayer>, audit_trail: Arc<AuditTrail>, budget_manager: Arc<BudgetManager>, resource_monitor: Arc<ResourceMonitor>, cron_scheduler: Arc<CronScheduler>, program_manager: Arc<ProgramManager>, skill_store: Arc<SkillStore>, persona_manager: Arc<PersonaManager>, mcp_bridge: Arc<McpBridge>, auth_manager: Arc<Mutex<AuthManager>>, access_manager: Arc<Mutex<AccessManager>>, host_tool_validator: Arc<HostToolValidator>, config: OxiosConfig, start_time: Instant, space_manager: Arc<SpaceManager>, ) -> Self
Use KernelHandle::new() with pre-built Facades instead
Build a KernelHandle from raw subsystem parameters.
Prefer KernelHandle::new() which takes pre-built Facades.
Sourcepub async fn save_and_commit<T: Serialize>(
&self,
category: &str,
name: &str,
data: &T,
) -> Result<()>
pub async fn save_and_commit<T: Serialize>( &self, category: &str, name: &str, data: &T, ) -> Result<()>
Save data and commit to git (State + Infra).
Sourcepub async fn save_markdown_and_commit(
&self,
category: &str,
name: &str,
content: &str,
) -> Result<()>
pub async fn save_markdown_and_commit( &self, category: &str, name: &str, content: &str, ) -> Result<()>
Save markdown and commit to git (State + Infra).
Sourcepub async fn delete_and_commit(
&self,
category: &str,
name: &str,
) -> Result<bool>
pub async fn delete_and_commit( &self, category: &str, name: &str, ) -> Result<bool>
Delete a file and commit the removal to git (State + Infra).
Sourcepub fn commit_all(&self, message: &str) -> Result<Option<CommitInfo>>
pub fn commit_all(&self, message: &str) -> Result<Option<CommitInfo>>
Commit all current changes to git.
Sourcepub fn flush_audit(&self) -> Result<()>
pub fn flush_audit(&self) -> Result<()>
Flush audit trail and commit to git (Security + Infra).
Sourcepub async fn schedule(
&self,
cron_expr: &str,
task: &str,
persona: Option<&str>,
) -> Result<String>
pub async fn schedule( &self, cron_expr: &str, task: &str, persona: Option<&str>, ) -> Result<String>
Schedule a cron job by expression (convenience wrapper).
Sourcepub async fn unschedule(&self, job_id: &str) -> Result<bool>
pub async fn unschedule(&self, job_id: &str) -> Result<bool>
Unschedule a cron job by string ID (convenience wrapper).
Sourcepub fn list_schedules(&self) -> Vec<CronJob>
pub fn list_schedules(&self) -> Vec<CronJob>
List cron jobs (convenience wrapper).
Sourcepub async fn load_json<T: DeserializeOwned>(
&self,
category: &str,
name: &str,
) -> Result<Option<T>>
pub async fn load_json<T: DeserializeOwned>( &self, category: &str, name: &str, ) -> Result<Option<T>>
Load JSON from state store.
Sourcepub fn start_time(&self) -> Instant
pub fn start_time(&self) -> Instant
Get kernel start time.
Sourcepub async fn activate_space(&self, id: &str) -> Result<()>
pub async fn activate_space(&self, id: &str) -> Result<()>
Activate a Space.
Note: Knowledge base is global (~/.oxios/knowledge/), not Space-scoped.
Space activation only switches the agent’s execution context and memory graph.
Auto Trait Implementations§
impl !Freeze for KernelHandle
impl !RefUnwindSafe for KernelHandle
impl Send for KernelHandle
impl Sync for KernelHandle
impl Unpin for KernelHandle
impl UnsafeUnpin for KernelHandle
impl !UnwindSafe for KernelHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.