/** * execute-post-bailout-bootstrap — post-bailout phases 5–9 (ADR-0052). * * Side effects after the bailout window: per-run logger, scope build/enter, * host start effects, and tool preflight. Injectable deps support table-driven * phase-order tests without Commander. */ import { createRunLogger, enterScope, type Logger, type RunScope } from '@opensip-cli/core'; import { startProfiling } from '../telemetry/profiling.js'; import { checkForUpdate } from '../update-notifier.js'; import { buildInspectionOnlyScope, buildPerRunScope } from './build-per-run-scope.js'; import { maintainEphemeralCache } from './ephemeral-cache-maintenance.js'; import { loadOwningToolCapabilities } from './load-tool-capabilities.js'; import { maybeInitializeOwningTool, resolveOwningTool } from './owning-tool-init.js'; import type { PreActionBootstrapPlan } from './plan-pre-action-bootstrap.js'; import type { PreActionRuntime } from './pre-action-runtime.js'; import type { RuntimeLeaseLifecycle, SafeRuntimeLeaseEventBuffer } from '../commands/host-runtime-access.js'; /** Recorded phase transitions for ordering tests. */ export type PhaseRecorder = (phase: string) => void; export interface PostBailoutBootstrapInput { readonly plan: PreActionBootstrapPlan; readonly runtime: PreActionRuntime; readonly version: string; readonly noCloud: boolean; readonly apiKey?: string; readonly runtimeLeaseLifecycle?: RuntimeLeaseLifecycle; readonly leaseEvents?: SafeRuntimeLeaseEventBuffer; } export interface PostBailoutBootstrapDeps { readonly recordPhase?: PhaseRecorder; readonly createRunLogger?: typeof createRunLogger; readonly buildPerRunScope?: typeof buildPerRunScope; readonly buildInspectionOnlyScope?: typeof buildInspectionOnlyScope; readonly enterScope?: typeof enterScope; readonly isScopeEntered?: () => boolean; readonly checkForUpdate?: typeof checkForUpdate; readonly startProfiling?: typeof startProfiling; readonly maybeInitializeOwningTool?: typeof maybeInitializeOwningTool; readonly loadOwningToolCapabilities?: typeof loadOwningToolCapabilities; readonly resolveOwningTool?: typeof resolveOwningTool; readonly maintainEphemeralCache?: typeof maintainEphemeralCache; } export interface PostBailoutBootstrapResult { readonly scope: RunScope; readonly runLogger: Logger; } /** * Run post-bailout bootstrap phases. Returns the entered scope and its * per-run logger (ADR-0053). * * @throws {Error} When runtime acquisition, scope construction, or a required * bootstrap invariant fails; the constructed scope is disposed before the * error propagates. */ export declare function executePostBailoutBootstrap(input: PostBailoutBootstrapInput, deps?: PostBailoutBootstrapDeps): Promise; //# sourceMappingURL=execute-post-bailout-bootstrap.d.ts.map