@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
24 lines • 1.15 kB
TypeScript
export declare const CONTEXT_REDUCTION_ENTRY_TYPE = "senpi.context-reduction.v1";
export interface ContextReductionState {
engaged: boolean;
cutIndex: number;
prefixHash: string;
/** The cut before the last frontier step; its cache checkpoint stays marked so the prefix bytes never change between steps (senpi#3242). */
checkpointCut?: number;
anchorCount?: number;
anchorCut?: number;
anchorHash?: string;
anchorTokens?: number;
compactionRequired?: boolean;
}
export interface ContextReductionRequest {
count: number;
cut: number;
hash: string;
}
export declare function createContextReductionState(): ContextReductionState;
export declare function snapshotReductionState(state: ContextReductionState): ContextReductionState;
export declare function clearReductionAnchor(state: ContextReductionState): void;
export declare function recordReductionUsage(state: ContextReductionState, request: ContextReductionRequest, tokens: number): void;
export declare function readContextReductionState(data: unknown): ContextReductionState | undefined;
//# sourceMappingURL=context-reduction-state.d.ts.map