import type { EffortLevel } from "./types.js"; /** * Per-turn effort trigger phrases ("think" → high, "extra think" → xhigh, * "ultra think" → max), matched case-insensitively on word boundaries anywhere * in a message. Escalation-only: a matched phrase raises the turn's effort but * never lowers it, so the comparison against the otherwise-resolved effort must * use `effortRank`/`maxEffortLevel` with strict-increase semantics. * * The `\s*` between the modifier and "think" makes the fused forms * ("ultrathink"/"extrathink") hit their own trigger instead of degrading to the * bare `\bthink\b` one, which is why the triggers must stay in descending * effort order — every stronger phrase also contains a standalone "think". */ export interface EffortKeywordTrigger { /** Effort the phrase escalates to. Triggers never emit `ultra`; Pi uses LOW only with reasoning, otherwise OFF. */ readonly effort: Extract; readonly pattern: RegExp; /** Canonical phrase for docs and log lines. */ readonly label: string; } export declare const EFFORT_KEYWORD_TRIGGERS: readonly EffortKeywordTrigger[]; export interface EffortKeywordMatch { readonly effort: EffortLevel; /** The exact substring that matched, for log lines. */ readonly keyword: string; } /** First trigger (descending effort) whose phrase appears in the text, or undefined. */ export declare function detectEffortKeyword(text: string): EffortKeywordMatch | undefined; /** * Position of a level in `EFFORT_LEVELS` (`none` 0 … `max` 6, `ultra` 7); * unknown or missing values rank -1, below every real level. NOTE the `ultra` * trap: the enum ranks it ABOVE `max` so escalation never touches an * explicitly configured `ultra`, but nothing should ever EMIT it — the pi * runtime maps `ultra` to low only for reasoning-capable models and returns * off before effort mapping for models without reasoning (`thinkingLevelForEffort`). */ export declare function effortRank(level: string | undefined): number; /** `candidate` only on a STRICT rank increase over `current`, else `current` — escalation, never a downgrade or a same-level rewrite. */ export declare function maxEffortLevel(current: string | undefined, candidate: EffortLevel): string; //# sourceMappingURL=effort-keywords.d.ts.map