import type { Condition } from "../types.ts"; import type { FnState } from "./runtime-state.ts"; import type { ArtifactStore } from "./artifact-store.ts"; export interface CondEnv { sessionID: string; fnName: string; state: FnState; artifacts: ArtifactStore; requiredEvidence: string[]; userMessagedThisTurn: boolean; workspaceDir: string; } export declare function evaluateCondition(cond: Condition | undefined, env: CondEnv): boolean; /** Known condition names, derived from NAMED_CONDITIONS keys. * Includes both built-in conditions and any registered via registerCondition(). */ export declare const KNOWN_CONDITIONS: Set; /** * Refresh KNOWN_CONDITIONS to include any dynamically registered conditions. * Called after registerCondition() adds new entries. */ export declare function refreshKnownConditions(): void; /** * Register a custom named condition at runtime. * If the name already exists, logs a warning and overwrites. * @param name Condition name (used in frontmatter gate/transition/continue_until) * @param handler Function that evaluates the condition given an arg string and CondEnv */ export declare function registerCondition(name: string, handler: (arg: string, env: CondEnv) => boolean): void; //# sourceMappingURL=conditions.d.ts.map