import { r as KlawConfig } from "./types.klaw-xKUw_Rz7.js"; import { s as AuthProfileStore } from "./types-ox6Zbtju.js"; import { s as VideoGenerationProvider } from "./types-COw2PPSK.js"; import { execFileSync } from "node:child_process"; import { ServerResponse } from "node:http"; import { vi } from "vitest"; //#region src/media-understanding/audio.test-helpers.d.ts declare function installPinnedHostnameTestHooks(): void; declare function createAuthCaptureJsonFetch(responseBody: unknown): { fetchFn: ((_input: RequestInfo | URL, init?: RequestInit) => Promise) & { preconnect: (url: string | URL, options?: { dns?: boolean; tcp?: boolean; http?: boolean; https?: boolean; }) => void; __klawAcceptsDispatcher: true; }; getAuthHeader: () => string | null; }; declare function createRequestCaptureJsonFetch(responseBody: unknown): { fetchFn: ((input: RequestInfo | URL, init?: RequestInit) => Promise) & { preconnect: (url: string | URL, options?: { dns?: boolean; tcp?: boolean; http?: boolean; https?: boolean; }) => void; __klawAcceptsDispatcher: true; }; getRequest: () => { url: string | null; init: RequestInit | undefined; }; }; //#endregion //#region src/agents/live-test-helpers.d.ts declare function isLiveTestEnabled(extraEnvVars?: readonly string[], env?: NodeJS.ProcessEnv): boolean; declare function isLiveProfileKeyModeEnabled(env?: NodeJS.ProcessEnv): boolean; declare function createSingleUserPromptMessage(content?: string): { role: "user"; content: string; timestamp: number; }[]; declare function extractNonEmptyAssistantText(content: Array<{ type?: string; text?: string; }>): string; //#endregion //#region src/agents/live-auth-keys.d.ts type CollectProviderApiKeysOptions = { env?: NodeJS.ProcessEnv; providerEnvVars?: readonly string[]; }; declare function collectProviderApiKeys(provider: string, options?: CollectProviderApiKeysOptions): string[]; //#endregion //#region src/test-utils/generation-live-test-helpers.d.ts declare function maybeLoadShellEnvForGenerationProviders(providerIds: string[]): void; //#endregion //#region src/infra/shell-env.d.ts declare function getShellEnvAppliedKeys(): string[]; //#endregion //#region src/media-generation/live-test-helpers.d.ts declare function redactLiveApiKey(value: string | undefined): string; declare function parseLiveCsvFilter(raw?: string, options?: { lowercase?: boolean; }): Set | null; declare function parseProviderModelMap(raw?: string): Map; //#endregion //#region src/music-generation/live-test-helpers.d.ts declare const DEFAULT_LIVE_MUSIC_MODELS: Record; declare function resolveConfiguredLiveMusicModels(cfg: KlawConfig): Map; declare function resolveLiveMusicAuthStore(params: { requireProfileKeys: boolean; hasLiveKeys: boolean; }): AuthProfileStore | undefined; //#endregion //#region src/video-generation/live-test-helpers.d.ts declare const DEFAULT_LIVE_VIDEO_MODELS: Record; declare function resolveLiveVideoResolution(params: { providerId: string; modelRef: string; }): "480P" | "720P" | "768P" | "1080P"; declare function resolveConfiguredLiveVideoModels(cfg: KlawConfig): Map; declare function canRunBufferBackedVideoToVideoLiveLane(params: { providerId: string; modelRef: string; }): boolean; declare function canRunBufferBackedImageToVideoLiveLane(params: { providerId: string; modelRef: string; }): boolean; declare function resolveLiveVideoAuthStore(params: { requireProfileKeys: boolean; hasLiveKeys: boolean; }): AuthProfileStore | undefined; //#endregion //#region src/video-generation/duration-support.d.ts declare function normalizeVideoGenerationDuration(params: { provider?: VideoGenerationProvider; model?: string; durationSeconds?: number; inputImageCount?: number; inputVideoCount?: number; }): number | undefined; //#endregion //#region src/test-helpers/http.d.ts declare function jsonResponse(body: unknown, status?: number): Response; declare function requestUrl(input: string | URL | Request): string; declare function requestBodyText(body: BodyInit | null | undefined): string; //#endregion //#region src/test-helpers/ssrf.d.ts declare function mockPinnedHostnameResolution(addresses?: string[]): { mockRestore: () => void; }; //#endregion //#region src/test-helpers/windows-cmd-shim.d.ts declare function createWindowsCmdShimFixture(params: { shimPath: string; scriptPath: string; shimLine: string; }): Promise; //#endregion //#region src/test-utils/provider-usage-fetch.d.ts type UsageFetchInput = string | Request | URL; type UsageFetchHandler = (url: string, init?: RequestInit) => Promise | Response; type UsageFetchMock = ReturnType Promise>>; declare function makeResponse(status: number, body: unknown): Response; declare function createProviderUsageFetch(handler: UsageFetchHandler): typeof fetch & UsageFetchMock; //#endregion //#region src/test-helpers/state-dir-env.d.ts declare function withStateDirEnv(prefix: string, fn: (ctx: { tempRoot: string; stateDir: string; }) => Promise): Promise; //#endregion //#region src/test-utils/env.d.ts declare function captureEnv(keys: string[]): { restore(): void; }; declare function withEnv(env: Record, fn: () => T): T; declare function withEnvAsync(env: Record, fn: () => Promise): Promise; //#endregion //#region src/test-utils/fetch-mock.d.ts type FetchMock = (input: RequestInfo | URL, init?: RequestInit) => Promise; type FetchPreconnectOptions = { dns?: boolean; tcp?: boolean; http?: boolean; https?: boolean; }; type FetchWithPreconnect = { preconnect: (url: string | URL, options?: FetchPreconnectOptions) => void; __klawAcceptsDispatcher: true; }; declare function withFetchPreconnect(fn: T): T & FetchWithPreconnect; declare function withFetchPreconnect(fn: T): T & FetchWithPreconnect & typeof fetch; //#endregion //#region src/test-utils/mock-http-response.d.ts declare function createMockServerResponse(): ServerResponse & { body?: string; }; //#endregion //#region src/test-utils/temp-home.d.ts type TempHomeEnv = { home: string; restore: () => Promise; }; declare function createTempHomeEnv(prefix: string): Promise; //#endregion //#region src/test-utils/temp-dir.d.ts declare function withTempDir(prefix: string, run: (dir: string) => Promise): Promise; //#endregion //#region src/test-utils/frozen-time.d.ts declare function useFrozenTime(at: string | number | Date): void; declare function useRealTime(): void; //#endregion export { parseLiveCsvFilter as A, createAuthCaptureJsonFetch as B, canRunBufferBackedVideoToVideoLiveLane as C, DEFAULT_LIVE_MUSIC_MODELS as D, resolveLiveVideoResolution as E, collectProviderApiKeys as F, installPinnedHostnameTestHooks as H, createSingleUserPromptMessage as I, extractNonEmptyAssistantText as L, redactLiveApiKey as M, getShellEnvAppliedKeys as N, resolveConfiguredLiveMusicModels as O, maybeLoadShellEnvForGenerationProviders as P, isLiveProfileKeyModeEnabled as R, canRunBufferBackedImageToVideoLiveLane as S, resolveLiveVideoAuthStore as T, createRequestCaptureJsonFetch as V, jsonResponse as _, createTempHomeEnv as a, normalizeVideoGenerationDuration as b, withFetchPreconnect as c, withEnvAsync as d, withStateDirEnv as f, mockPinnedHostnameResolution as g, createWindowsCmdShimFixture as h, TempHomeEnv as i, parseProviderModelMap as j, resolveLiveMusicAuthStore as k, captureEnv as l, makeResponse as m, useRealTime as n, createMockServerResponse as o, createProviderUsageFetch as p, withTempDir as r, FetchMock as s, useFrozenTime as t, withEnv as u, requestBodyText as v, resolveConfiguredLiveVideoModels as w, DEFAULT_LIVE_VIDEO_MODELS as x, requestUrl as y, isLiveTestEnabled as z };