Return shape for "may I do this?" predicate hooks — the canonical
Witness can* veto signature dispatched by the chokepoint Apis
(ContainmentApi.move, Mobile.traverse, ConnectionApi.transfer,
StuffApi.destruct).
{ ok: true } lets the operation proceed; { ok: false, reason }
vetos with a human-readable explanation. The chokepoint Api wraps
the reason into the appropriate error type for its layer
(ContainmentError, DestructError, etc.).
Hooks that don't care return undefined (the optional method
isn't implemented at all) — the dispatcher treats that as
"no opinion."
Return shape for "may I do this?" predicate hooks — the canonical Witness
can*veto signature dispatched by the chokepoint Apis (ContainmentApi.move,Mobile.traverse,ConnectionApi.transfer,StuffApi.destruct).{ ok: true }lets the operation proceed;{ ok: false, reason }vetos with a human-readable explanation. The chokepoint Api wraps the reason into the appropriate error type for its layer (ContainmentError,DestructError, etc.).Hooks that don't care return
undefined(the optional method isn't implemented at all) — the dispatcher treats that as "no opinion."