import { IValidator } from '../../../configuration/common/validator';
export declare enum IncludeLineNumbersOption {
    WithSpaceAfter = "withSpaceAfter",
    WithoutSpace = "withoutSpaceAfter",
    None = "none"
}
export declare enum RecentFileClippingStrategy {
    /** Center clipping around the edit location in each file (greedy budget). */
    AroundEditRange = "aroundEditRange",
    /** Proportionally allocate budget across files, centered on edit locations. */
    Proportional = "proportional"
}
export declare namespace RecentFileClippingStrategy {
    const VALIDATOR: IValidator<RecentFileClippingStrategy>;
}
export type RecentlyViewedDocumentsOptions = {
    readonly nDocuments: number;
    readonly maxTokens: number;
    readonly includeViewedFiles: boolean;
    readonly includeLineNumbers: IncludeLineNumbersOption;
    readonly clippingStrategy: RecentFileClippingStrategy;
};
export declare namespace RecentlyViewedDocumentsOptions {
    const VALIDATOR: IValidator<Partial<RecentlyViewedDocumentsOptions>>;
}
export type LanguageContextLanguages = {
    [languageId: string]: boolean;
};
export type LanguageContextOptions = {
    readonly enabled: boolean;
    readonly maxTokens: number;
    readonly traitPosition: 'before' | 'after';
};
/**
 * Options for including Completions-style neighbor file snippets (Jaccard-ranked)
 * into the recently_viewed_code_snippets section of the prompt.
 */
export type NeighborFilesOptions = {
    readonly enabled: boolean;
    readonly maxTokens: number;
};
export declare namespace NeighborFilesOptions {
    const VALIDATOR: IValidator<Partial<NeighborFilesOptions>>;
}
export type DiffHistoryOptions = {
    readonly nEntries: number;
    readonly maxTokens: number;
    readonly onlyForDocsInPrompt: boolean;
    readonly useRelativePaths: boolean;
};
/**
 * Parts that participate in the global-budget cascade. `currentFile` and lint
 * output are intentionally excluded and continue to use their own per-part caps.
 */
export type GlobalBudgetPart = 'recentlyViewedDocuments' | 'languageContext' | 'neighborFiles' | 'diffHistory';
/**
 * Opt-in global-budget allocation modelled after the cascade in
 * `CascadingPromptFactory` (completions-core): every participating part gets a
 * percentage share of a single `totalTokens` pool, parts are rendered in
 * `order`, and any unused tokens in one part cascade as surplus to the next.
 *
 * When `undefined` (the default), each part uses its own `maxTokens` cap as
 * before and no cross-part budget reuse happens.
 */
export type GlobalBudgetOptions = {
    readonly totalTokens: number;
    /** Cascade order. Earlier parts get budget first; their surplus flows to later parts. */
    readonly order: readonly GlobalBudgetPart[];
    /** Share of `totalTokens` allocated to each part. Must sum to 1 across `order`. */
    readonly shares: Readonly<Record<GlobalBudgetPart, number>>;
};
export declare namespace GlobalBudgetOptions {
    /**
     * Default cascade: language context donates first (often disabled), then
     * recently-viewed documents (always-on, accepts most of the surplus), then
     * neighbor files (must run after recently-viewed because it consults
     * `docsInPrompt` to avoid duplicating recently-viewed documents), then
     * diff history.
     */
    const DEFAULT_ORDER: readonly GlobalBudgetPart[];
    /** Shares matching today's per-part `maxTokens` ratios (volume-neutral baseline). */
    const DEFAULT_SHARES: Readonly<Record<GlobalBudgetPart, number>>;
    const DEFAULT_TOTAL_TOKENS = 6000;
}
export type PagedClipping = {
    pageSize: number;
};
export type CurrentFileOptions = {
    readonly maxTokens: number;
    readonly includeTags: boolean;
    readonly includeLineNumbers: IncludeLineNumbersOption;
    readonly includeCursorTag: boolean;
    readonly prioritizeAboveCursor: boolean;
};
export declare namespace CurrentFileOptions {
    const VALIDATOR: IValidator<Partial<CurrentFileOptions>>;
}
export declare enum LintOptionWarning {
    YES = "yes",
    NO = "no",
    YES_IF_NO_ERRORS = "yesIfNoErrors"
}
export declare enum LintOptionShowCode {
    YES = "yes",
    NO = "no",
    YES_WITH_SURROUNDING = "yesWithSurroundingLines"
}
export type LintOptions = {
    tagName: string;
    warnings: LintOptionWarning;
    showCode: LintOptionShowCode;
    maxLints: number;
    maxLineDistance: number;
    /** When set to a value > 0, also include linter diagnostics from the N most recently edited/viewed files. */
    nRecentFiles: number;
};
/**
 * The raw user-facing aggressiveness setting. Includes `Default` to distinguish
 * "user didn't change" from "user explicitly chose medium".
 */
export declare enum AggressivenessSetting {
    Default = "auto",
    Low = "low",
    Medium = "medium",
    High = "high"
}
/**
 * The resolved aggressiveness level used in prompts and edit-intent filtering.
 * Does not include `Default` — that is resolved before reaching this type.
 */
export declare enum AggressivenessLevel {
    Low = "low",
    Medium = "medium",
    High = "high"
}
/**
 * Controls the scope of the early divergence cancellation check.
 *
 * - `Off`: disable early divergence cancellation checks.
 * - `Cursor`: only check the cursor line for divergence (original behavior).
 * - `EditWindow`: check every line in the edit window for divergence.
 */
export declare enum EarlyDivergenceCancellationMode {
    Cursor = "cursor",
    EditWindow = "editWindow",
    Off = "off"
}
export declare namespace EarlyDivergenceCancellationMode {
    const VALIDATOR: IValidator<EarlyDivergenceCancellationMode>;
}
export declare namespace AggressivenessSetting {
    const VALIDATOR: IValidator<AggressivenessSetting>;
    /** Resolves a non-default setting value to an AggressivenessLevel. Returns undefined for Default. */
    function toLevel(setting: AggressivenessSetting): AggressivenessLevel | undefined;
}
/**
 * EditIntent indicates the model's confidence level for the suggested edit.
 * The model returns this as <|edit_intent|>value<|/edit_intent|> in the response.
 */
export declare enum EditIntent {
    NoEdit = "no_edit",
    Low = "low",
    Medium = "medium",
    High = "high"
}
export declare namespace EditIntent {
    /**
     * Converts a string value to EditIntent enum.
     * Returns High (most permissive) for invalid values.
     */
    function fromString(value: string): EditIntent;
    /**
     * Converts a short name (N, L, M, H) to EditIntent enum.
     * Only uppercase letters are accepted.
     * Returns undefined for invalid values.
     */
    function fromShortName(value: string): EditIntent | undefined;
    /**
     * Determines if the edit should be shown based on the edit intent
     * and the user's aggressiveness level.
     *
     * Filtering logic (edit_intent vs user aggressiveness):
     * - no_edit: Never show the edit
     * - high confidence: Show for all aggressiveness levels (high confidence = always show)
     * - medium confidence: Show only if user aggressiveness is medium or high
     * - low confidence: Show only if user aggressiveness is high
     */
    function shouldShowEdit(editIntent: EditIntent, aggressivenessLevel: AggressivenessLevel): boolean;
}
export type PromptOptions = {
    readonly promptingStrategy: PromptingStrategy | undefined;
    readonly currentFile: CurrentFileOptions;
    readonly pagedClipping: PagedClipping;
    readonly recentlyViewedDocuments: RecentlyViewedDocumentsOptions;
    readonly languageContext: LanguageContextOptions;
    readonly neighborFiles: NeighborFilesOptions;
    readonly diffHistory: DiffHistoryOptions;
    readonly includePostScript: boolean;
    readonly lintOptions: LintOptions | undefined;
    /**
     * When set, parts share a single pool of `totalTokens` and unused budget from
     * earlier parts in `order` cascades to later parts. When `undefined`, each
     * part uses its own per-part `maxTokens` cap (legacy behavior).
     */
    readonly globalBudget?: GlobalBudgetOptions;
};
/**
 * Prompt strategies that tweak prompt in a way that's different from current prod prompting strategy.
 */
export declare enum PromptingStrategy {
    /**
     * Original Xtab unified model prompting strategy.
     */
    CopilotNesXtab = "copilotNesXtab",
    UnifiedModel = "xtabUnifiedModel",
    Codexv21NesUnified = "codexv21nesUnified",
    Nes41Miniv3 = "nes41miniv3",
    SimplifiedSystemPrompt = "simplifiedSystemPrompt",
    Xtab275 = "xtab275",
    XtabAggressiveness = "xtabAggressiveness",
    /**
     * Xtab275 prompt + aggressiveness level tag.
     */
    Xtab275Aggressiveness = "xtab275Aggressiveness",
    PatchBased = "patchBased",
    PatchBased01 = "patchBased01",
    PatchBased02 = "patchBased02",
    /**
     * Xtab275-based strategy with edit intent tag parsing.
     * Response format: <|edit_intent|>low|medium|high|no_edit<|/edit_intent|>
     * followed by the edit window content.
     */
    Xtab275EditIntent = "xtab275EditIntent",
    /**
     * Xtab275-based strategy with short edit intent parsing.
     * Response format: N|L|M|H (single character on first line)
     * followed by the edit window content.
     */
    Xtab275EditIntentShort = "xtab275EditIntentShort"
}
export declare function isPromptingStrategy(value: string): value is PromptingStrategy;
export declare function isAggressivenessStrategy(strategy: PromptingStrategy | undefined): boolean;
export declare enum ResponseFormat {
    CodeBlock = "codeBlock",
    UnifiedWithXml = "unifiedWithXml",
    EditWindowOnly = "editWindowOnly",
    CustomDiffPatch = "customDiffPatch",
    EditWindowWithEditIntent = "editWindowWithEditIntent",
    EditWindowWithEditIntentShort = "editWindowWithEditIntentShort"
}
export declare namespace ResponseFormat {
    function fromPromptingStrategy(strategy: PromptingStrategy | undefined): ResponseFormat;
}
export declare const DEFAULT_OPTIONS: PromptOptions;
export declare const DEFAULT_CURSOR_PREDICTION_LINT_OPTIONS: LintOptions;
export declare const LANGUAGE_CONTEXT_ENABLED_LANGUAGES: LanguageContextLanguages;
export interface ModelConfiguration {
    modelName: string;
    promptingStrategy: PromptingStrategy | undefined;
    includeTagsInCurrentFile: boolean;
    includePostScript?: boolean;
    currentFile?: Partial<CurrentFileOptions>;
    recentlyViewedDocuments?: Partial<RecentlyViewedDocumentsOptions>;
    lintOptions: Partial<LintOptions> | undefined;
    supportsNextCursorLinePrediction?: boolean;
}
export declare const LINT_OPTIONS_VALIDATOR: IValidator<Partial<LintOptions>>;
export declare const MODEL_CONFIGURATION_VALIDATOR: IValidator<ModelConfiguration>;
export declare function parseLintOptionString(optionString: string, defaults: LintOptions): LintOptions;
export interface UserHappinessScoreConfiguration {
    /** Score for accepted actions */
    acceptedScore: number;
    /** Score for rejected actions */
    rejectedScore: number;
    /** Score for ignored/notAccepted actions */
    ignoredScore: number;
    /** Threshold for high aggressiveness level */
    highThreshold: number;
    /** Threshold for medium aggressiveness level */
    mediumThreshold: number;
    /** Whether to include ignored/notAccepted actions in score calculation */
    includeIgnored: boolean;
    /** Maximum number of ignored/notAccepted actions to consider */
    ignoredLimit: number;
    /** Whether to limit consecutive ignored actions */
    limitConsecutiveIgnored: boolean;
    /** Whether to limit total ignored actions */
    limitTotalIgnored: boolean;
}
/**
 * Default configuration for user happiness score calculation. Mimics v1 behavior.
 */
export declare const DEFAULT_USER_HAPPINESS_SCORE_CONFIGURATION: UserHappinessScoreConfiguration;
/**
 * Value checking for happiness config.
 */
export declare const USER_HAPPINESS_SCORE_CONFIGURATION_VALIDATOR: IValidator<UserHappinessScoreConfiguration>;
export declare function parseUserHappinessScoreConfigurationString(optionString: string): UserHappinessScoreConfiguration;
export declare enum SpeculativeRequestsEnablement {
    On = "on",
    Off = "off"
}
export declare namespace SpeculativeRequestsEnablement {
    const VALIDATOR: IValidator<SpeculativeRequestsEnablement>;
}
/**
 * What `XtabCustomDiffPatchResponseHandler` should do when the dedup
 * heuristic detects that a patch's additions duplicate the file content
 * immediately following the deleted range.
 *
 * - `Off`: do not run the detector at all.
 * - `Log`: run the detector and report each detection (tracer + telemetry
 *   callback) but yield the patch unchanged. Lets us measure the
 *   heuristic's firing rate before flipping user-visible behavior.
 * - `DropPatch`: drop just the offending patch and continue processing
 *   the rest of the stream. Use when we want to suppress individual bad
 *   patches but trust the rest of the model's output.
 * - `DropAllRemaining`: drop the offending patch AND every subsequent
 *   patch from the same response. Use when a duplicate inside the stream
 *   is treated as a signal that the response has gone off the rails.
 *   Patches already yielded before the detection are kept.
 * - `TrimDuplicate`: trim just the duplicated lines from the patch's
 *   additions and yield the (possibly shorter) patch. If the trim leaves
 *   the patch with no additions and no removals, the patch is dropped.
 *   This is the most aggressive about salvaging the model's intent.
 */
export declare enum DuplicateAdditionsMode {
    Off = "off",
    Log = "log",
    DropPatch = "dropPatch",
    DropAllRemaining = "dropAllRemaining",
    TrimDuplicate = "trimDuplicate"
}
export declare namespace DuplicateAdditionsMode {
    const VALIDATOR: IValidator<DuplicateAdditionsMode>;
}
export declare enum SpeculativeRequestsCursorPlacement {
    AfterEditApplied = "afterEditApplied",
    AfterEditWindow = "afterEditWindow"
}
export declare namespace SpeculativeRequestsCursorPlacement {
    const VALIDATOR: IValidator<SpeculativeRequestsCursorPlacement>;
}
export declare enum SpeculativeRequestsAutoExpandEditWindowLines {
    Off = "off",
    Smart = "smart",
    Always = "always"
}
export declare namespace SpeculativeRequestsAutoExpandEditWindowLines {
    const VALIDATOR: IValidator<SpeculativeRequestsAutoExpandEditWindowLines>;
}
//# sourceMappingURL=xtabPromptOptions.d.ts.map