#[non_exhaustive]pub struct SpaceConfig { /* private fields */ }Expand description
What a host decides when it mounts scripts: where they live, the ceiling it allows each
one, and who a request comes from. Built with SpaceConfig::new and handed to
space.
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 principal(self, stamper: PrincipalStamper) -> SpaceConfig
pub fn principal(self, stamper: PrincipalStamper) -> SpaceConfig
How the principal recorded on every publish and run is decided: by the HOST, from
the invocation. The default records authority::UNSTAMPED.
It also decides who sees a draft: a version never published is visible only to the
principal stamped when it was written (and to root), so under the default, which
cannot tell callers apart, a draft is root’s alone. See authority::is_identity.
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.