Expand description
Native effect handlers, dispatched at runtime through the VM’s
EffectHandler trait. The handler also re-checks the runtime policy
per spec §7.4 (the static check is necessary but not sufficient: a fn
declared [fs_read("/data")] that’s allowed at startup still has to
pass the path check at the point of dispatch).
Structs§
- Captured
Sink - Default
Handler - Null
Approval Sink - Default sink:
approval.requestis granted by the type/effect system but there’s no operator to ask, so every call is refused. Embedders that want the effect to actually work must callwith_approval_sink— an unconfigured sink silently no-op’ing as “approved” would defeat the point of the effect. - Stdin
Approval Sink - Interactive sink for
lex run: prints the reason to stdout, blocks on a stdin line. Empty input or a leadingn/Ndenies; anything else is the approved answer text. - Stdout
Sink - TlsConfig
- Blocks the calling thread, accepts incoming HTTP requests on
127.0.0.1:port, and dispatches each through the named Lex stage. Each request gets a freshVm; the program and policy are shared.
Constants§
- NO_EXIT
requested_exit’s “nothing requested” value. Outside thei32range on purpose, so no real exit status can collide with it.
Traits§
- Approval
Sink - Host boundary for the
[approval]effect.requestblocks until an operator answers —Ok(answer)on approve,Err(reason)on deny or timeout. Implementations decide what “blocks” means (a stdin prompt, an HTTP long-poll against a dashboard, …); the effect handler only needs the synchronous result. - IoSink
- Output sink used by
io.print. Tests inject a buffer; production prints to stdout.
Type Aliases§
- Stream
Registry agent.cloud_streamregistry: per-handle producer iterators keyed by opaque handle id (#305 slice 3).