This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 9/16/2026.
Bridge.run
~import std/bridge.runKoru Standard Library: the `run` part of bridge.kz.
bridge.run.kz · 1 tors
Koru Standard Library: the `run` part of bridge.kz. · 19 more lines
Koru Standard Library: the `run` part of bridge.kz.
Joined via `~part run` in bridge.kz; merged into the bridge module at load.
RUN - Execute a turn against the session's resources
The verb the bridge existed without: `std/runtime:run` takes a `handle_pool`
and a `scope`, and a bridge is exactly that pairing outliving a single turn.
The branch set MIRRORS `std/runtime:run` plus ONE bridge-only branch below.
`?partial` is where the mirror ends: sequencing is the agent channel's
demand (frag-partial-programs), not `runtime:run`'s contract, which stays
single (orisha's endpoint depends on it). A multi-item turn reports here,
always, even fully green — one shape for "a turn ran steps".
Two of that tor's parameters are deliberately not forwarded:
- `budget` — metering is PARKED. It earns its keep on a public-facing API.
- `auto_discharge` — always false, and it must be. A bridge-managed pool
outlives the run BY DESIGN; `close` is what releases.
// Koru Standard Library: the `run` part of bridge.kz.
// Joined via `~part run` in bridge.kz; merged into the bridge module at load.
//
// RUN - Execute a turn against the session's resources
//
// The verb the bridge existed without: `std/runtime:run` takes a `handle_pool`
// and a `scope`, and a bridge is exactly that pairing outliving a single turn.
//
// The branch set MIRRORS `std/runtime:run` plus ONE bridge-only branch below.
// `?partial` is where the mirror ends: sequencing is the agent channel's
// demand (frag-partial-programs), not `runtime:run`'s contract, which stays
// single (orisha's endpoint depends on it). A multi-item turn reports here,
// always, even fully green — one shape for "a turn ran steps".
//
// Two of that tor's parameters are deliberately not forwarded:
//
// - `budget` — metering is PARKED. It earns its keep on a public-facing API.
// - `auto_discharge` — always false, and it must be. A bridge-managed pool
// outlives the run BY DESIGN; `close` is what releases.
~pub tor run { br: *Bridge, source: string }
| result {
value: @import("root").koru_std.koru_interpreter.Value,
used: u64,
handles: u32
}
| defined string
| unhandled-branch { branch: string, payload: string, handles: string }
| exhausted { used: u64, last_event: string, handles: u32 }
| parse-error { message: string, line: u32, column: u32 }
| validation-error string
| shape-error { branch: string, field: ?string, message: string }
| event-denied string
| dispatch-error { event_name: string, message: string }
| ?partial { ran: u32, total: u32, used: u64, handles: u32, report: string }
| scope-not-found string