import { Et as BrowserProfileConfig, Tt as BrowserConfig, i as NodmixConfig } from "./types.nodmix-B9QJSty6.js";
import { o as SsrFPolicy } from "./ssrf-skjEI_i5.js";

//#region src/plugin-sdk/browser-profiles.d.ts
declare const DEFAULT_NODMIX_BROWSER_ENABLED = true;
declare const DEFAULT_BROWSER_EVALUATE_ENABLED = true;
declare const DEFAULT_NODMIX_BROWSER_COLOR = "#FF4500";
declare const DEFAULT_NODMIX_BROWSER_PROFILE_NAME = "nodmix";
declare const DEFAULT_BROWSER_DEFAULT_PROFILE_NAME = "nodmix";
declare const DEFAULT_BROWSER_ACTION_TIMEOUT_MS = 60000;
declare const DEFAULT_AI_SNAPSHOT_MAX_CHARS = 80000;
declare const DEFAULT_UPLOAD_DIR: string;
type ResolvedBrowserTabCleanupConfig = {
  enabled: boolean;
  idleMinutes: number;
  maxTabsPerSession: number;
  sweepMinutes: number;
};
type ResolvedBrowserConfig = {
  enabled: boolean;
  evaluateEnabled: boolean;
  controlPort: number;
  cdpPortRangeStart: number;
  cdpPortRangeEnd: number;
  cdpProtocol: "http" | "https";
  cdpHost: string;
  cdpIsLoopback: boolean;
  remoteCdpTimeoutMs: number;
  remoteCdpHandshakeTimeoutMs: number;
  localLaunchTimeoutMs: number;
  localCdpReadyTimeoutMs: number;
  actionTimeoutMs: number;
  color: string;
  executablePath?: string;
  headless: boolean;
  noSandbox: boolean;
  attachOnly: boolean;
  defaultProfile: string;
  profiles: Record<string, BrowserProfileConfig>;
  tabCleanup: ResolvedBrowserTabCleanupConfig;
  ssrfPolicy?: SsrFPolicy;
  extraArgs: string[];
};
type ResolvedBrowserProfile = {
  name: string;
  cdpPort: number;
  cdpUrl: string;
  cdpHost: string;
  cdpIsLoopback: boolean;
  userDataDir?: string;
  color: string;
  driver: "nodmix" | "existing-session";
  headless?: boolean;
  attachOnly: boolean;
};
declare function resolveBrowserConfig(cfg: BrowserConfig | undefined, rootConfig?: NodmixConfig): ResolvedBrowserConfig;
declare function resolveProfile(resolved: ResolvedBrowserConfig, profileName: string): ResolvedBrowserProfile | null;
//#endregion
//#region src/plugin-sdk/browser-cdp.d.ts
declare function parseBrowserHttpUrl(raw: string, label: string): {
  parsed: URL;
  port: number;
  hasExplicitPort: boolean;
  normalized: string;
  normalizedWithPort: string;
};
declare function redactCdpUrl(cdpUrl: string | null | undefined): string | null | undefined;
//#endregion
//#region src/plugin-sdk/browser-control-auth.d.ts
type BrowserControlAuth = {
  token?: string;
  password?: string;
};
type EnsureBrowserControlAuthParams = {
  cfg: NodmixConfig;
  env?: NodeJS.ProcessEnv;
};
type EnsureBrowserControlAuthResult = {
  auth: BrowserControlAuth;
  generatedToken?: string;
};
declare function resolveBrowserControlAuth(cfg?: NodmixConfig, env?: NodeJS.ProcessEnv): BrowserControlAuth;
declare function ensureBrowserControlAuth(params: EnsureBrowserControlAuthParams): Promise<EnsureBrowserControlAuthResult>;
//#endregion
//#region src/plugin-sdk/browser-trash.d.ts
declare function movePathToTrash(...args: any[]): any;
//#endregion
export { type BrowserControlAuth, DEFAULT_AI_SNAPSHOT_MAX_CHARS, DEFAULT_BROWSER_ACTION_TIMEOUT_MS, DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, DEFAULT_BROWSER_EVALUATE_ENABLED, DEFAULT_NODMIX_BROWSER_COLOR, DEFAULT_NODMIX_BROWSER_ENABLED, DEFAULT_NODMIX_BROWSER_PROFILE_NAME, DEFAULT_UPLOAD_DIR, type ResolvedBrowserConfig, type ResolvedBrowserProfile, type ResolvedBrowserTabCleanupConfig, ensureBrowserControlAuth, movePathToTrash, parseBrowserHttpUrl, redactCdpUrl, resolveBrowserConfig, resolveBrowserControlAuth, resolveProfile };