import type { SessionBridge, SessionArtifact } from "./SessionBridge.js"; import type { FeatureRegistry, Feature } from "./FeatureRegistry.js"; import type { WorkspaceCheckpointer } from "./WorkspaceCheckpointer.js"; export interface ContextResetConfig { bridge: SessionBridge; registry: FeatureRegistry; checkpointer?: WorkspaceCheckpointer>; /** Token threshold at which a reset should be triggered (0-1). Default: 0.80 */ autoResetThreshold?: number; /** If true, commits workspace state before reset */ commitBeforeReset?: boolean; /** * Custom orientation steps for the resume prompt. * Replaces the default "first actions" list. If omitted, a generic * set of orientation steps is used (no workspace-specific commands). */ orientationSteps?: string[]; } export interface ResetResult { newSessionId: string; artifact: SessionArtifact; contextSummary: string; } export declare class ContextReset { private readonly config; private readonly autoResetThreshold; constructor(config: ContextResetConfig); /** * Check if a reset should be triggered given current token usage. */ shouldReset(currentTokens: number, maxTokens: number): boolean; /** * Execute the reset: * 1. Optionally commit workspace state * 2. Close current session (writes artifact) * 3. Build context summary for the new agent */ execute(currentProgress: SessionArtifact["progress"], handoffNotes: string): Promise; /** * Returns a system prompt fragment that orients a fresh agent. * Suitable for injection as the first message in a new context. * * All artifact-sourced text is sanitized before injection to prevent * prompt injection from stored content. */ static buildResumePrompt(artifact: SessionArtifact, nextFeature: Feature | null, orientationSteps?: string[]): string; } //# sourceMappingURL=ContextReset.d.ts.map