/** Selector matching and payload reading shared by JSON payloads delivered as experiment treatments. */ import { ILanguageModelChatMetadata } from "./languageModels.js"; export declare const MAX_ID_LENGTH = 64; /** Ids appear in telemetry, so they are restricted to a shape that needs no sanitization. */ export declare const ID_PATTERN: RegExp; export declare function isObject(value: unknown): value is Record; /** * Reads the versioned envelope every treatment payload shares, returning the object or the * reason it was rejected. Never throws, so a malformed treatment cannot break a caller. */ export declare function parseExpPayloadEnvelope(raw: string | undefined, version: number): Record | string; /** Reads a trimmed string, optionally lower-cased and constrained to `pattern`. */ export declare function readText(raw: unknown, maxLength: number, pattern?: RegExp): string | undefined; export declare function normalizeSelector(value: string): string; /** Reads a list of match selectors, normalizing each so authoring casing does not matter. */ export declare function readSelectorList(raw: unknown, path: string): string[] | string; /** * Builds every string a selector may match for a model. * * Identifiers are qualified differently across harnesses. The language model service uses * `//` while agent host sessions use `:`, so a selector is * compared against each segment as well as the whole id. That lets `auto` match both * `copilot/auto` and `agent-host-copilotcli:auto`. */ export declare function expandModelMatchCandidates(modelId: string | undefined, aliases?: readonly string[]): Set; /** The identifiers a selector may name a model by, besides its qualified id. */ export declare function modelSelectorAliases(metadata: ILanguageModelChatMetadata): string[];