/** * Stable references for plugin secret settings. * * A settings response never carries a secret's value. Every secret leaf is a * marker instead: * * - `{ "$secret": "sec_…", "set": true }` — a stored secret, referenced by a * stable opaque id. Send the marker back unchanged to keep the stored value. * - `null` — nothing stored at that position. * - `{ "$secret": null, "locked": true }` — the effective value comes from the * environment and is never written back. * * On save each secret leaf accepts the reference, a plain string (a new value), * or `null` (clear). Payloads carry `secret_format: "ref"` so a `null` reads as * a deliberate clear rather than the deprecated "unchanged" placeholder. */ /** Reserved marker key that references a stored secret. */ export declare const PLUGIN_SECRET_REF_KEY = "$secret"; /** Reserved payload key declaring which secret wire format a client speaks. */ export declare const PLUGIN_SECRET_FORMAT_KEY = "secret_format"; /** Wire format published and understood by this SDK. */ export declare const PLUGIN_SECRET_FORMAT_REF = "ref"; /** One `$secret` marker as published by a settings response. */ export interface PluginSecretRef { $secret: string | null; set?: boolean; locked?: boolean; } /** What a settings form should tell the user about one secret field. */ export type PluginSecretState = 'set' | 'unset' | 'environment'; /** Return whether one settings value is a `$secret` reference marker. */ export declare function isPluginSecretRef(value: unknown): value is PluginSecretRef; /** Return the stored secret id behind a marker, or `null` when nothing is stored. */ export declare function pluginSecretId(value: unknown): string | null; /** Classify one secret field for display: stored, unset, or environment-provided. */ export declare function pluginSecretState(value: unknown): PluginSecretState; /** Human label for one secret field's state. */ export declare function pluginSecretLabel(value: unknown): string; /** Whether a secret field is read-only because the environment supplies it. */ export declare function isPluginSecretLocked(value: unknown): boolean; /** * Value to submit for an untouched secret field: the reference, unchanged. * * A locked marker round-trips too, which is how the platform keeps a stored * value that an environment variable currently hides. */ export declare function keepPluginSecret(current: unknown): PluginSecretRef | null; /** Value to submit when the user typed a new secret. */ export declare function setPluginSecret(value: string): string; /** Value to submit when the user cleared a secret. */ export declare function clearPluginSecret(): null; /** Whether a settings response declares the `$secret` reference wire format. */ export declare function usesPluginSecretReferences(response: unknown): boolean;