import { z } from 'zod';
import type { ProviderSettingsDefinition } from '../types.js';
export type OpenCodeBackendMode = 'server' | 'acp';
export declare function normalizeOpenCodeBackendMode(raw: unknown): OpenCodeBackendMode;
export declare function normalizeOpenCodeServerBaseUrl(raw: unknown): string | null;
export declare function normalizeOpenCodeServerBaseUrlExplicit(raw: unknown): boolean;
export declare function readOpenCodeExplicitServerBaseUrl(rawUrl: unknown, rawExplicit: unknown): string | null;
declare function countConfiguredOpenCodeServerBaseUrls(raw: unknown): number;
declare function hasConfiguredOpenCodeServerBaseUrl(rawValue: unknown, record: Readonly<Record<string, unknown>>): boolean;
export declare const OPENCODE_PROVIDER_FIELDS: {
    readonly opencodeBackendMode: {
        readonly schema: z.ZodEnum<{
            acp: "acp";
            server: "server";
        }>;
        readonly default: "server";
        readonly description: "Preferred OpenCode backend mode";
        readonly storageScope: "account";
        readonly analytics: {
            readonly trackCurrentState: true;
            readonly trackChanges: true;
            readonly valueKind: "enum";
            readonly privacy: "safe";
            readonly identityScope: "person";
        };
    };
    readonly opencodeServerBaseUrl: {
        readonly schema: z.ZodString;
        readonly default: "";
        readonly description: "Optional override for a user-managed OpenCode server URL";
        readonly storageScope: "account";
        readonly analytics: {
            readonly trackCurrentState: true;
            readonly trackChanges: true;
            readonly valueKind: "presence";
            readonly privacy: "presence_only";
            readonly identityScope: "person";
            readonly serializeCurrentWithContext: typeof hasConfiguredOpenCodeServerBaseUrl;
        };
    };
    readonly opencodeServerBaseUrlByServerIdV1: {
        readonly schema: z.ZodPipe<z.ZodTransform<{
            [k: string]: string;
        }, unknown>, z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>>;
        readonly default: Record<string, string>;
        readonly description: "Per-server overrides for user-managed OpenCode server URLs";
        readonly storageScope: "account";
        readonly analytics: {
            readonly trackCurrentState: false;
            readonly trackChanges: false;
            readonly valueKind: "count";
            readonly privacy: "count_only";
            readonly identityScope: "person";
            readonly serializeCurrent: typeof countConfiguredOpenCodeServerBaseUrls;
        };
    };
};
export declare const OPENCODE_PROVIDER_SETTINGS_DEFAULTS: Readonly<{
    readonly opencodeBackendMode: "acp" | "server";
    readonly opencodeServerBaseUrl: string;
    readonly opencodeServerBaseUrlByServerIdV1: Record<string, string>;
}>;
export declare function buildOpenCodeProviderSettingsShape(_zod: typeof z): {
    readonly opencodeBackendMode: z.ZodEnum<{
        acp: "acp";
        server: "server";
    }>;
    readonly opencodeServerBaseUrl: z.ZodString;
    readonly opencodeServerBaseUrlByServerIdV1: z.ZodPipe<z.ZodTransform<{
        [k: string]: string;
    }, unknown>, z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>>;
};
export declare const OPENCODE_PROVIDER_SETTINGS_DEFINITION: ProviderSettingsDefinition;
export {};
//# sourceMappingURL=opencode.d.ts.map