import type { EventBus } from "../../core/event-bus.ts"; import { type ReleaseBlocker, type ReleaseCommand, type ReleaseReadiness, type ReleaseReadinessCommand, type StopAllBackgroundCommand, type StopAllBackgroundItem } from "../../core/release-rpc.ts"; import type { RpcObservationScope } from "../../core/subagent-rpc.ts"; import type { RpcResponse } from "./rpc-types.ts"; /** Shared by `release_readiness`, `release` and `stop_all_background`: version 1, no unknown keys, bounded single-line id. Returns the error text, if any. */ export declare function validateReleaseCommand(command: ReleaseReadinessCommand | ReleaseCommand | StopAllBackgroundCommand): string | undefined; /** * Collects release blockers from every extension listener on one host binding. Synchronous and fail closed: * malformed or throwing contributors become `contributor_error` blockers, never silent "safe". */ export declare class RpcReleaseBridge { private disposed; private bus; private scope; constructor(bus: EventBus | undefined, scope: RpcObservationScope); request(command: ReleaseReadinessCommand, coreBlockers?: ReleaseBlocker[]): RpcResponse; /** * Atomic release decision (`release`): validates like `request`, collects readiness and, only when it permits release * (`decideRelease`), calls `commit` before returning. Everything here is synchronous, so nothing can interleave between the * check and the commitment; the caller's `commit` must therefore also be synchronous (set the "releasing" flag). * Not releasable: nothing is committed and the process keeps running. */ release(command: ReleaseCommand, coreBlockers: ReleaseBlocker[], commit: (readiness: ReleaseReadiness) => void): RpcResponse; /** * Kill switch (`stop_all_background`). Validates like `request`, then starts the core stop and broadcasts * `STOP_ALL_BACKGROUND_EVENT` so every extension starts its own stop synchronously, and awaits all of them under ONE total * budget (`timeoutMs`). A contributor that throws, rejects or is still running at the deadline becomes an `ok:false` item; * it never prevents the others from running or the response from being sent. `remaining` is the readiness collected AFTER * the stop. `success:false` only for a malformed request or a disposed binding. */ stopAll(command: StopAllBackgroundCommand, coreStop: () => StopAllBackgroundItem[] | PromiseLike, coreBlockers: () => ReleaseBlocker[], timeoutMs?: number): Promise; /** Validation error text, or the collected readiness. */ private collect; dispose(): void; }