This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 9/16/2026.
Runtime.affordances
~import std/runtime.affordancesKoru Standard Library: the possession-shaped callable surface.
runtime.affordances.kz · 1 tors
Koru Standard Library: the possession-shaped callable surface. · 22 more lines
Koru Standard Library: the possession-shaped callable surface.
Joined via `~part affordances` in runtime.kz; merged into the runtime
module at load.
SCOPE-AFFORDANCES - the callable surface, possession-shaped (HATEOAS rooms)
`scope-vocabulary` is the static surface: everything the scope declares.
This is the live half: what may be called GIVEN the resource types the
caller holds. An event is callable now iff every discharge-kind phantom it
consumes (`!open`) names a held type; events with no possession requirement
are always callable. `held` is a comma-separated list of resource-type
names (the `created_by_event` segments of the caller's live handles). The
render uses the same signature spelling as scope-vocabulary, so the
callable subset and the static vocabulary are the same bytes filtered.
The projection is structural — it reads the scope's declared input fields
and phantoms, never a rendered string — so the filter and the enforcement
cannot drift (same contract as scope-manifest).
@retain: scope_affordances_event is referenced from generated Zig code in
bridge pipelines (std/bridge:affordances compiles to
scope_affordances_event.handler).
// Koru Standard Library: the possession-shaped callable surface.
// Joined via `~part affordances` in runtime.kz; merged into the runtime
// module at load.
//
// SCOPE-AFFORDANCES - the callable surface, possession-shaped (HATEOAS rooms)
//
// `scope-vocabulary` is the static surface: everything the scope declares.
// This is the live half: what may be called GIVEN the resource types the
// caller holds. An event is callable now iff every discharge-kind phantom it
// consumes (`!open`) names a held type; events with no possession requirement
// are always callable. `held` is a comma-separated list of resource-type
// names (the `created_by_event` segments of the caller's live handles). The
// render uses the same signature spelling as scope-vocabulary, so the
// callable subset and the static vocabulary are the same bytes filtered.
//
// The projection is structural — it reads the scope's declared input fields
// and phantoms, never a rendered string — so the filter and the enforcement
// cannot drift (same contract as scope-manifest).
//
// @retain: scope_affordances_event is referenced from generated Zig code in
// bridge pipelines (std/bridge:affordances compiles to
// scope_affordances_event.handler).
~[retain] pub tor scope-affordances { name: string, held: string }
| ok string
| not-found