Skip to content

@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

ParameterType
storeStoreApi<RS>
commandIdstring
inputunknown
invocationRoomCommandInvocationOptions
policy?CommandInvocationPolicyOptions

Returns

Promise<RoomCommandResult>