Skip to main content

checkRunLimits

@totemsdk/agent-policy


@totemsdk/agent-policy / checkRunLimits

Function: checkRunLimits()

checkRunLimits(profile, action, state): BoundaryFailure | undefined

Evaluate run limits for a prepared action's verified effects. All ceilings are per-profile; a broader mandate is never needed.

Parameters

profile

AutonomyProfile

action

CanonicalAgentAction

state

abortedSteps

number

committedSteps

number

feesByToken

Record<string, string>

now

number

outstandingByToken

Record<string, string>

reservedSteps

number

spentByToken

Record<string, string>

startedAt

number

stepSpendByToken

Record<string, string>

Returns

BoundaryFailure | undefined