import { type ContextBudgetItem, type ContextBudgetPiece } from '@mnemonik/shared/context-budget'; export * from '@mnemonik/shared/context-budget'; /** Claude Code's per-value inline `additionalContext` cap. */ export declare const CLAUDE_INLINE_CONTEXT_CAP_CHARS = 10000; /** Fit target with safety headroom under the host cap. */ export declare const COMPOSED_CONTEXT_BUDGET_CHARS = 9900; /** * Belt-and-braces fallback for a value that cannot be represented within the * configured budget, such as a future oversized reserved marker. Ordinary * composition remains inline through the shared natural-unit fitter. */ export declare const PERSISTED_OUTPUT_RECOVERY_INSTRUCTION: string; export interface ComposedContextParts { /** JIT envelope and bus injections, in their existing priority order. */ lead: ContextBudgetPiece[]; /** Rendered recall body, or already-identified memory items. */ ambient: ContextBudgetPiece | readonly ContextBudgetItem[] | null; /** Session and cwd-binding markers, reserved exactly as before. */ tail: ContextBudgetPiece[]; } export interface ComposedContextFit { /** The `additionalContext` value to emit. */ value: string; /** Ambient memory items not delivered in full (a partial item counts). */ ambientItemsDropped: number; /** True when no ambient content unit was delivered. */ ambientDropped: boolean; /** True when the over-cap recovery instruction was prepended. */ recoveryInstructionPrepended: boolean; } /** Fit a composed `additionalContext` value under the Claude host limit. */ export declare function fitComposedContext(parts: ComposedContextParts, opts?: { budgetChars?: number; capChars?: number; }): ComposedContextFit;