Interface: PreflightResult

Defined in: context/types.ts:91

Result of a pre-flight context check

Call canAddContent() before adding content to check if action is needed.

Properties

action?

optional action?: "compact" | "summarize" | "reject";

Defined in: context/types.ts:105

Recommended action to take

allowed

allowed: boolean;

Defined in: context/types.ts:95

Whether the content can be added without issues

budgetRemaining

budgetRemaining: number;

Defined in: context/types.ts:120

Tokens remaining in the target category budget

category?

optional category?: ContextCategory;

Defined in: context/types.ts:110

Which category needs action (for compact)

estimatedTokens

estimatedTokens: number;

Defined in: context/types.ts:115

Estimated tokens for the content to add

recommendation?

optional recommendation?: string;

Defined in: context/types.ts:125

Human-readable recommendation

requiresAction

requiresAction: boolean;

Defined in: context/types.ts:100

Whether an action is required before adding