useGatedAction
useGatedAction<
A,R>(action,fn,context?,options?):GatedAction<A,R>
The React analog of the headless rt.gate(action, fn) (plan 144 TASK-14 /
REQ-21, AC-11). run delegates to sdk.gate, so it emits the same active
gate sequence — gate_attempted, then gate_allowed or gate_denied — rather
than forking it. When allowed, the action runs wrapped in tracked-action
telemetry (${action}_started → _completed / _failed) and its return value
is preserved. Without a provider, run is a safe no-op that reports denied
(AC-13).
Type Parameters
Section titled “Type Parameters”A extends unknown[]
R
Parameters
Section titled “Parameters”action
Section titled “action”string
(…args) => R | Promise<R>
context?
Section titled “context?”RevTurbineEntitlementContext
options?
Section titled “options?”Returns
Section titled “Returns”GatedAction<A, R>