#[non_exhaustive]pub struct SpaceConfig { /* private fields */ }Expand description
What a host decides when it mounts scripts: where they live and the ceiling it allows each
one. Built with SpaceConfig::new and handed to space.
Who a request comes from is not configured here: it is the principal the request’s
capability names (urn:cap:principal:<iri>), which the host’s door mints with
Capability::with_principal (see authority::principal_of).
There is no default backend and no default ceiling, on purpose: both are the host’s decision, and a library that guessed either would be guessing about authority.
Implementations§
Source§impl SpaceConfig
impl SpaceConfig
Sourcepub fn new(backend: Arc<dyn Backend>, ceiling: CeilingPolicy) -> SpaceConfig
pub fn new(backend: Arc<dyn Backend>, ceiling: CeilingPolicy) -> SpaceConfig
Scripts kept in backend, each run under the ceiling ceiling answers for it.
Sourcepub fn sparql(self, door: SparqlDoor) -> SpaceConfig
pub fn sparql(self, door: SparqlDoor) -> SpaceConfig
Accept SPARQL scripts, evaluated through door (the store’s graph-scoped doors).
Without it, publishing language=sparql is refused: which store a query runs
against is the host’s decision, as the evaluator a Lisp script reaches is.
Sourcepub fn on_change(self, hook: ChangeHook) -> SpaceConfig
pub fn on_change(self, hook: ChangeHook) -> SpaceConfig
Run hook with the script’s name after every publish or retire through this crate.
★ Wire it to kernel.cut(ikigai_core::BINDINGS_THREAD). A published SPARQL
script is its own entry in the catalog and the action manifold (…:result and
…:runs with ITS parameters as arguments), and the kernel caches every description
and Meta answer under urn:kernel:bindings, which it cannot know a publish changed.
The library holds no kernel and an endpoint may not cut that thread without
urn:cap:kernel:cut, so the host, which holds both, makes the cut. Unwired, a new
query is runnable at once but the catalog, MCP and the engine’s argument routing
describe the old set until something else cuts the thread.