export type ComplexityResult = { /** * - Assessed complexity tier. */ level: "simple" | "medium" | "complex" | "critical"; /** * - Raw heuristic score (100 for a critical override). */ score: number; /** * - false for `simple`, true otherwise — the routing hint. */ needsPlanning: boolean; /** * - Which signals fired, for transparency/debugging. */ signals: string[]; }; /** * @typedef {object} ComplexityResult * @property {'simple'|'medium'|'complex'|'critical'} level - Assessed complexity tier. * @property {number} score - Raw heuristic score (100 for a critical override). * @property {boolean} needsPlanning - false for `simple`, true otherwise — the routing hint. * @property {string[]} signals - Which signals fired, for transparency/debugging. */ /** * Assess the complexity of a goal/prompt from its text alone (no LLM). * @param {string} prompt - The goal to classify. * @returns {ComplexityResult} * @when you want a fast, no-LLM read of how hard a goal is (simple/medium/complex/critical) to decide whether to invoke the Planner * @fails never throws — pure text scoring; non-string/blank input scores lowest. Keyword lists are frozen and a critical-safety override always wins. * @example * const { level, needsPlanning } = assessComplexity(goal); * if (needsPlanning) await planner.plan(goal); */ export function assessComplexity(prompt: string): ComplexityResult; /** * The durable critical-safety floor, standalone. Returns `true` when a goal touches high-stakes * work (security/production/compliance/financial incidents, or a securing action on a sensitive * domain) — the same deterministic override `assessComplexity` applies, exported on its own so a * consumer can gate extra scrutiny (e.g. the Evaluator's adversarial verification, Feature 1) * WITHOUT pulling in the frozen 3-tier scorer. Deterministic, auditable, testable — not a * capability estimate. Normalizes input (trims, length-caps, lowercases) then applies the override; * non-string / blank input is `false`. * @param {string} prompt - The goal to test. * @returns {boolean} * @when you want the durable critical-safety floor alone (security/production/compliance/financial) to gate extra scrutiny, without the full scorer * @fails never throws — deterministic override; non-string/blank input is false. This floor is non-overridable by design. * @example * if (isCritical(goal)) verdict = await evaluator.evaluate(goal, result, { contract }); */ export function isCritical(prompt: string): boolean;