@sqlrooms/room-store / invokeCommandWithPolicy
Function: invokeCommandWithPolicy()
invokeCommandWithPolicy<
RS>(store,commandId,input,invocation,policy?):Promise<RoomCommandResult>
Invoke a room command through the shared risk/confirmation guard.
Invocation surfaces must use this entry point when they can be driven by an agent or external client. It deliberately evaluates the current descriptor immediately before execution so disabled and confirmation-gated commands fail closed.
Type Parameters
| Type Parameter |
|---|
RS extends BaseRoomStoreState |
Parameters
| Parameter | Type |
|---|---|
store | StoreApi<RS> |
commandId | string |
input | unknown |
invocation | RoomCommandInvocationOptions |
policy? | CommandInvocationPolicyOptions |
Returns
Promise<RoomCommandResult>