Expand description
CSpace → Tool Registry mapping.
This module bridges the capability system and the agent’s tool registry.
Given an agent’s CSpace, it walks the capabilities and registers
exactly the set of tools the agent is authorised to use.
§Registration tiers
| Tier | Tools | Condition |
|---|---|---|
| Always-on | ReadTool, WriteTool, EditTool, GrepTool, FindTool, LsTool, WebSearchTool, GetSearchResultsTool | Every agent gets these |
| CSpace-driven | ExecTool, BrowserTool, kernel domain tools, MCP, A2A, etc. | Only if a matching capability with sufficient rights exists |
§Example
ⓘ
use std::sync::Arc;
use oxi_sdk::{ToolRegistry, SearchCache};
use oxios_kernel::capability::template::CapabilityTemplate;
use oxios_kernel::tools::registration::register_tools_from_cspace;
let registry = ToolRegistry::new();
let cspace = CapabilityTemplate::standard().build();
let cache = Arc::new(SearchCache::new());
register_tools_from_cspace(®istry, &kernel, &cspace, cache, agent_id);Functions§
- register_
always_ on - Register the always-on tool set into a
ToolRegistry. - register_
tools_ from_ cspace - Register tools into
registrybased on the agent’sCSpace.