import type { NLIContext, NLIResourceRef, UserPattern } from '../types/index.js';
/**
 * Create a fresh NLIContext for a new session.
 */
export declare function createNLIContext(projectId: string): NLIContext;
/** Set the active spec, moving the previous one into lastSpecs history. */
export declare function setActiveSpec(ctx: NLIContext, specId: string): NLIContext;
/** Update the last referenced resource. */
export declare function setLastResource(ctx: NLIContext, ref: NLIResourceRef): NLIContext;
/** Record a tool usage, keeping the most recent MAX_TOOL_HISTORY entries. */
export declare function recordToolUsage(ctx: NLIContext, toolName: string): NLIContext;
/** Set the detected language from the latest input. */
export declare function setDetectedLanguage(ctx: NLIContext, lang: string): NLIContext;
/** Append a message to conversation memory, trimming to MAX_MEMORY_ENTRIES. */
export declare function appendMemory(ctx: NLIContext, message: string): NLIContext;
/**
 * Learn a user pattern: add it to the context, incrementing frequency
 * if the same phrase+tool already exists.
 */
export declare function learnPattern(ctx: NLIContext, pattern: UserPattern): NLIContext;
/** Resolve a single token to a concrete ID using the session context. */
export declare function resolvePronoun(token: string, ctx: NLIContext): {
    resolvedId: string;
    resolvedLabel: string;
} | null;
/**
 * Scan input text and replace pronoun tokens with resolved IDs.
 * Multi-word pronouns are checked before single words.
 */
export declare function resolvePronounsInText(input: string, ctx: NLIContext): {
    resolved: string;
    wasResolved: boolean;
};
//# sourceMappingURL=nli-context.d.ts.map