Skip to main content
Dotset CLI API Documentation / tollgate / PolicyDecision

Interface: PolicyDecision

Defined in: src/tollgate/policy/types.ts:347 The result of policy evaluation for a tool call. A PolicyDecision represents the resolved action after evaluating all applicable policies. The ‘smart’ action is always resolved to a concrete action (allow, deny, or prompt) before returning.

Properties

action

action: "allow" | "prompt" | "deny";
Defined in: src/tollgate/policy/types.ts:349 The resolved action (never ‘smart’, always concrete)

analysis?

optional analysis: {
  analyzer: string;
  risk: RiskLevel;
  triggers?: string[];
};
Defined in: src/tollgate/policy/types.ts:361 Analysis metadata when smart analysis was used

analyzer

analyzer: string;
Which analyzer processed the request

risk

risk: RiskLevel;
Determined risk level

triggers?

optional triggers: string[];
Patterns or keywords that triggered the risk level

matchedRule?

optional matchedRule: string;
Defined in: src/tollgate/policy/types.ts:358 The policy rule that matched (for debugging)

message?

optional message: string;
Defined in: src/tollgate/policy/types.ts:355 Custom message for approval prompts

reason?

optional reason: string;
Defined in: src/tollgate/policy/types.ts:352 Human-readable reason for the decision