import type { ProviderRouteId } from './provider-platform/types.js'; import type { ActiveTransport, VideoExecutionCancelResult, VideoExecutionPayload, VideoExecutionPollResult } from './types.js'; /** * Filename of the readiness marker `bootstrap/import_cookies.py` writes INSIDE * the Higgsfield browser session directory after a successful, signed-in cookie * import. Only the cookie import can write it, because only the cookie import * proves a sign-in. */ export declare const FREE_SEEDANCE_ENGINE_MARKER = ".vclaw-engine-ready.json"; /** * Whether the operator has explicitly asked for the PAID Seedance API * (`api.xskill.ai`, `SUTUI_API_KEY`) on `seedance-direct`. * * One helper, read by the readiness verdict, the transport precedence and * `vclaw video providers`, because the whole point of the flag is that those * three must agree on when money is authorised. The accepted spellings match * `isTruthyEnv` in provider-platform/route-capabilities.ts, which reads the * same variable for the paid transport's 15s duration cap: before this, an * unset-by-`=0` shell counted as a paid pin here and as no pin there. */ export declare function explicitPaidSeedanceTransport(env: NodeJS.ProcessEnv): boolean; /** Why the vendored free Seedance engine is (or is not) usable on this machine. */ export interface FreeSeedanceEngineDescription { ready: boolean; /** One line naming the failing check and the command that fixes it. Absent when ready. */ reason?: string; venvPath: string; profilePath: string; markerPath: string; } export interface FreeSeedanceEngineProbeOptions { /** * Engine directory to probe. Tests point this at a temp layout: the real * `engines/seedance-direct/` is set up on real machines and its profile * directory holds a live, secret Higgsfield browser session, so a test that * read it would pass or fail on who ran it. */ engineDir?: string; } /** * The readiness of the vendored free Seedance engine, as a verdict PLUS the * reason — one function so a probe and an operator-facing hint cannot disagree. * * Presence alone is not readiness. This used to check only that * `.venv/bin/python` and the profile directory EXIST, which an empty directory * and an empty file satisfy: the CI setup action creates exactly those stubs, * so any machine that mimicked it (or any half-finished bootstrap) reported * `seedance-direct: available` on `in-tree-engine` with nothing configured, and * a `--confirm-spend` render would have launched a broken engine instead of * refusing. The marker is the one artifact that cannot be faked by `mkdir`. */ export declare function describeFreeInTreeSeedanceEngine(env: NodeJS.ProcessEnv, options?: FreeSeedanceEngineProbeOptions): FreeSeedanceEngineDescription; /** Whether the vendored free Seedance engine is fully bootstrapped and enabled. */ export declare function hasFreeInTreeSeedanceEngine(env: NodeJS.ProcessEnv, options?: FreeSeedanceEngineProbeOptions): boolean; /** The two credential paths `reapi-seedance` can bill through; chosen explicitly. */ export declare const REAPI_SEEDANCE_PATHS: readonly ["treg", "direct"]; export type ReapiSeedancePath = (typeof REAPI_SEEDANCE_PATHS)[number]; /** * Which credential path `VCLAW_REAPI_SEEDANCE_VIA` names, or `null` when it * names neither. Read by the transport precedence (a `null` is `blocked`), by * `vclaw video providers`, and by the native transport itself, so the refusal * and the report cannot disagree. The path is never inferred from which key * happens to be set: `treg` bills a treg balance, `direct` a reAPI account. */ export declare function explicitReapiSeedancePath(env: NodeJS.ProcessEnv): ReapiSeedancePath | null; export declare function resolveActiveTransport(routeId: ProviderRouteId, env: NodeJS.ProcessEnv, /** * Injectable engine probe. The real one stats the vendored venv + browser * profile, so a caller that has already probed passes its own answer in and * the two cannot disagree; tests pass a fixed one. Default = the real probe. */ probeFreeSeedanceEngine?: (env: NodeJS.ProcessEnv) => boolean): ActiveTransport; /** * The submit contract's adapter-command hash, bound into a Cinema quote and * checked again at authorization. It asks the SUBMIT question deliberately, so * a blocked route refuses to be quoted rather than being quoted for a transport * that will not run. */ export declare function executionAdapterCommandHash(routeId: ProviderRouteId, env?: NodeJS.ProcessEnv): string; export declare function submitExecutionPayload(payload: VideoExecutionPayload, options?: { env?: NodeJS.ProcessEnv; }): Promise<{ adapterCommand: string; externalJobId: string | null; rawResult: unknown; }>; export declare function pollExecutionPayload(input: { projectSlug: string; routeId: ProviderRouteId; externalJobId: string; outputDir: string; workspaceRoot: string; }, options?: { env?: NodeJS.ProcessEnv; }): Promise; export declare function lookupExecutionSubmission(input: { payload: VideoExecutionPayload; submissionKey: string; }, options?: { env?: NodeJS.ProcessEnv; }): Promise<{ state: 'not-found' | 'accepted' | 'processing' | 'completed' | 'failed' | 'unknown'; authoritative: boolean; externalJobId: string | null; providerStatus: string; outputs: VideoExecutionPollResult['outputs']; issues: string[]; rawResult: unknown; }>; export declare function cancelExecutionPayload(input: { projectSlug: string; routeId: ProviderRouteId; externalJobId: string; outputDir: string; workspaceRoot: string; }, options?: { env?: NodeJS.ProcessEnv; }): Promise; //# sourceMappingURL=execution-adapter.d.ts.map