import { IConfigurationService } from "../../configuration/common/configuration.service.js"; import { IAgentHostConfigurationSync } from "../../configuration/common/configurationRegistry.js"; import { AgentHostResourceIdentity } from "./agentHostResourceService.js"; /** * Resolves the *globally-scoped* value of `settingId`, ignoring any workspace or * folder value. * * The agent host root config is shared by every window connected to a host, so * forwarding a workspace value would let one window's workspace settings leak * into unrelated windows on a last-writer-wins basis. Resolution order mirrors * the platform's own precedence for the layers we keep — policy overrides * everything, then user (local merged with remote), then application. * * A layer whose value does not conform to the setting's declared `type` is * skipped, so a malformed `settings.json` entry falls through to the next layer * and ultimately to the registered default rather than being mirrored verbatim. * This mirrors how `AgentConfigurationService.getEffectiveValue` skips layers * that fail schema validation on the host side. */ export declare function getGlobalConfigurationValue(configurationService: IConfigurationService, settingId: string): T | undefined; /** * Inspects the configured application-wide value of `settingId`, excluding the * registered default and workspace/folder layers. */ export declare function inspectValue(configurationService: IConfigurationService, settingId: string): readonly [ value: T, source: "policyValue" | "userValue" | "applicationValue" ] | undefined; /** * A setting that declares {@link IAgentHostConfigurationSync}, paired with the * setting id it was declared on. */ export interface IAgentHostConfigurationSyncEntry { readonly settingId: string; readonly sync: IAgentHostConfigurationSync; } export declare enum AgentHostConfigurationSyncTarget { Local = 0, RemoteExtensionHost = 1, Remote = 2 } export declare function getAgentHostConfigurationSyncTarget(identity: AgentHostResourceIdentity): AgentHostConfigurationSyncTarget; /** * Returns every setting that declares agent-host mirroring and applies to a host * of this target kind. */ export declare function getAgentHostConfigurationSyncEntries(target: AgentHostConfigurationSyncTarget): IAgentHostConfigurationSyncEntry[]; /** * Reads the current globally-scoped value for `entry` and maps it through the * entry's transform, producing the single-key patch to merge into the agent * host's root config. */ export declare function resolveAgentHostConfigurationSyncValue(configurationService: IConfigurationService, entry: IAgentHostConfigurationSyncEntry): unknown; /** * Renders a mirrored value for logging, redacting anything that could carry * user content. Mirrored settings are registry-driven and may hold paths or * arbitrary strings, so only closed-set values (booleans, numbers, and declared * enum members) are printed verbatim. */ export declare function formatAgentHostConfigurationSyncValueForLog(settingId: string, value: unknown): string; /** * Builds the full root-config patch mirroring every applicable setting. Used on * connect and reconnect, where the host may be a freshly restarted process that * has none of these values. */ export declare function resolveAgentHostConfigurationSyncPatch(configurationService: IConfigurationService, target: AgentHostConfigurationSyncTarget): Record; /** * Writes a mirrored `value` for `entry` into `patch`, including any * {@link IAgentHostConfigurationSync.derivedKeys}. Returns the keys written. */ export declare function addAgentHostConfigurationSyncValue(patch: Record, entry: IAgentHostConfigurationSyncEntry, value: unknown): string[];