import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent"; import { FABRIC_THINKING_ENTRY_TYPE, type FabricThinking, type FabricThinkingBounds, type FabricThinkingModel } from "./thinking.js"; export { FABRIC_THINKING_ENTRY_TYPE }; export declare const MAX_THINKING_OVERRIDE_TURNS = 20; export declare const MAX_THINKING_REASON_CHARS = 256; export type FabricThinkingScope = "turn" | "turns" | "session"; export interface FabricThinkingOverride { level: FabricThinking; scope: FabricThinkingScope; /** `turns` scope only: agent_end events left before reverting. */ remainingTurns?: number; reason?: string; setAt: number; } export interface FabricThinkingStatus { level: FabricThinking; /** Model-supported levels inside the effective bounds. */ available: FabricThinking[]; /** Effective inclusive bounds; unbounded ends resolve to the model's levels. */ bounds: { min: FabricThinking; max: FabricThinking; }; /** Level restored when the override ends (the current level without one). */ baseline: FabricThinking; override?: FabricThinkingOverride; } export interface FabricThinkingSetResult extends FabricThinkingStatus { clamped?: true; requested?: FabricThinking; } export interface FabricThinkingSetInput { level: FabricThinking; scope?: FabricThinkingScope; turns?: number; reason?: string; } type ThinkingHost = Pick; type ThinkingContext = Pick & { model?: FabricThinkingModel | undefined; }; export declare class FabricThinkingController { #private; private readonly host; private readonly bounds; constructor(host: ThinkingHost, bounds: () => FabricThinkingBounds); /** Session switch or tree navigation: replay the branch on next use. */ invalidate(): void; status(context: ThinkingContext): FabricThinkingStatus; set(input: FabricThinkingSetInput, context: ThinkingContext): FabricThinkingSetResult; reset(context: ThinkingContext): FabricThinkingStatus; /** * agent_end boundary: count down `turns`, end `turn`. If someone else changed * the level since Fabric applied it (user, another extension), the override * ends without restoring the baseline: Fabric never fights for the setting. */ agentEnded(context: ThinkingContext): void; /** * Child sessions: move a level that lies outside the inherited bounds back * inside them. Pi's own model clamp may otherwise overshoot a parent's max. */ enforceBounds(context: ThinkingContext): void; } //# sourceMappingURL=thinking-control.d.ts.map