import { type CliError } from "../../_utils/cli-error.js"; import { readCredentials } from "../../_utils/credentials.js"; import { httpJson } from "../../_utils/http.js"; import { type Result } from "../../_utils/result.js"; import { readState } from "../../_utils/state.js"; import { stagedSession } from "./_utils/staged-session.js"; import { takeoverPayload } from "./takeover.schema.js"; type Prepared = Extract, { ok: true; }>["value"]; type AdapterResult = Awaited>; type Dependencies = { readonly readCredentials: typeof readCredentials; readonly readState: typeof readState; readonly httpJson: typeof httpJson; readonly adapterFor: (target: Prepared["targetAgent"], payload: Prepared, workspace: string) => Promise; readonly cwd: () => string; readonly launchOutput: (message: string) => void; }; declare const takeover: (code: string, overrides?: Partial) => Promise>; export { takeover };