export class RollbridgeRuntime { /** @type {"rollbridge"} */ static type: "rollbridge"; /** * @param {Partial} [config] * @param {{wait?: (ms: number) => Promise, now?: () => number}} [dependencies] */ constructor(config?: Partial, dependencies?: { wait?: (ms: number) => Promise; now?: () => number; }); /** @type {true} */ requiresStableState: true; /** @returns {"rollbridge"} */ get type(): "rollbridge"; /** @type {import('#types').RollbridgeRuntimeConfig} */ config: import("#types").RollbridgeRuntimeConfig; wait: (ms: number) => Promise; now: () => number; /** * @returns {string[]} */ plan(): string[]; /** * @param {{releasePath: string, releaseId: string, revision: string}} opts * @param {import('#types').RollbridgeRuntimeConfig} [config] * @returns {string} */ deployCommand({ releasePath, releaseId, revision }: { releasePath: string; releaseId: string; revision: string; }, config?: import("#types").RollbridgeRuntimeConfig): string; /** * @param {import('#types').RollbridgeRuntimeConfig} [config] * @returns {string} */ validateCommand(config?: import("#types").RollbridgeRuntimeConfig): string; /** * @param {import('#types').RollbridgeRuntimeConfig} [config] * @returns {string} */ statusCommand(config?: import("#types").RollbridgeRuntimeConfig): string; /** * @param {import('#types').RollbridgeRuntimeConfig} [config] * @returns {string} */ logsCommand(config?: import("#types").RollbridgeRuntimeConfig): string; /** * @param {{force?: boolean, config?: import('#types').RollbridgeRuntimeConfig}} [opts] * @returns {string} */ recoverCommand({ force, config }?: { force?: boolean; config?: import("#types").RollbridgeRuntimeConfig; }): string; /** * @param {{releasePath: string, releaseId: string, previousReleaseId: string, revision: string}} opts * @param {import('#types').RollbridgeRuntimeConfig} [config] * @returns {string} */ recoverGenerationTransitionCommand({ releasePath, releaseId, previousReleaseId, revision }: { releasePath: string; releaseId: string; previousReleaseId: string; revision: string; }, config?: import("#types").RollbridgeRuntimeConfig): string; /** * Resolves the exact previous release id the daemon's committed generation * transition names. After an earlier deploy wedges the node, the daemon's * retained transition identifies the last successful deploy's previous release, * which can differ from Rampway's tracked active release; recovering with the * active release would be rejected as a stale recovery. * * @param {import('#types').Transport} transport * @param {{targetConfig: import('#types').RollbridgeRuntimeConfig, previousReleaseId: string}} opts * @returns {Promise} */ recoverGenerationTransitionPreviousReleaseId(transport: import("#types").Transport, { targetConfig, previousReleaseId }: { targetConfig: import("#types").RollbridgeRuntimeConfig; previousReleaseId: string; }): Promise; /** * @param {import('#types').RollbridgeRuntimeConfig} [config] * @returns {string} */ shutdownCommand(config?: import("#types").RollbridgeRuntimeConfig): string; /** * Builds Rollbridge's public authenticated owner-retirement request over the * configured control socket. Retirement quiesces the accepted owner and * releases its proxy/control listeners promptly without waiting for * long-draining children, so a serial supervisor's replacement can bind. The * socket round trip carries its own millisecond deadline from the overall * handoff budget: a stalled, truncated, malformed, or non-success response * exits non-zero instead of hanging or reporting success. * * @param {{attestation: string, timeoutMs: number, config?: import('#types').RollbridgeRuntimeConfig}} opts * @returns {string} */ retireOwnerCommand({ attestation, timeoutMs, config }: { attestation: string; timeoutMs: number; config?: import("#types").RollbridgeRuntimeConfig; }): string; /** * @param {import('#types').RollbridgeRuntimeConfig} [config] * @returns {string} */ versionCommand(config?: import("#types").RollbridgeRuntimeConfig): string; /** * @param {import('#types').RollbridgeRuntimeConfig} [config] * @returns {string} */ terminateStuckDaemonCommand(config?: import("#types").RollbridgeRuntimeConfig): string; /** * @param {string} subcommand * @param {string[]} [args] * @param {import('#types').RollbridgeRuntimeConfig} [config] * @returns {string} */ rollbridgeCommand(subcommand: string, args?: string[], config?: import("#types").RollbridgeRuntimeConfig): string; /** * Captures self-contained Rollbridge config bytes under Rampway-owned shared * storage and returns only secret-free activation metadata. * * @param {import('#types').Transport} transport * @param {{releasePath: string, runtimePath: string}} opts * @returns {Promise} */ prepare(transport: import("#types").Transport, { releasePath, runtimePath }: { releasePath: string; runtimePath: string; }): Promise; /** * @param {import('#types').Transport} transport * @param {{releasePath: string, releaseId: string, previousReleaseId?: string, revision: string, currentPath?: string, targetSnapshot?: import('#types').RuntimeSnapshot, currentSnapshot?: import('#types').RuntimeSnapshot, deferCommit?: boolean}} opts * @returns {Promise<{status: string, externalOwnerVerificationRequired?: boolean, daemonRuntime?: any}>} */ deploy(transport: import("#types").Transport, { releasePath, releaseId, previousReleaseId, revision, currentPath, targetSnapshot, currentSnapshot, deferCommit }: { releasePath: string; releaseId: string; previousReleaseId?: string; revision: string; currentPath?: string; targetSnapshot?: import("#types").RuntimeSnapshot; currentSnapshot?: import("#types").RuntimeSnapshot; deferCommit?: boolean; }): Promise<{ status: string; externalOwnerVerificationRequired?: boolean; daemonRuntime?: any; }>; /** * Binds the exact immutable runtime reported by the accepted Rollbridge owner to * Rampway's stable snapshot and stores an authenticated manifest copy beside the * immutable Rollbridge config material. * * @param {import('#types').Transport} transport * @param {{snapshot: import('#types').RuntimeSnapshot, runtimePath: string, runtimeResult: any}} opts * @returns {Promise} */ acceptSnapshot(transport: import("#types").Transport, { snapshot, runtimePath, runtimeResult }: { snapshot: import("#types").RuntimeSnapshot; runtimePath: string; runtimeResult: any; }): Promise; /** * Releases an exact stale foreground owner for a serial supervisor through * Rollbridge's authenticated owner-retirement contract, then waits for the * replacement to attest the accepted boot identity. One overall handoff * deadline starts before retirement is issued and bounds both the retirement * socket round trip and the replacement polling, so a stalled control socket * cannot hang the deploy while it holds handoff ownership. * * @param {import('#types').Transport} transport * @param {{boot: import('#types').RuntimeBootState, snapshot: import('#types').RuntimeSnapshot, runtimeResult: {externalOwnerVerificationRequired?: boolean, daemonRuntime?: any}, persistReferencedReleaseIds: (releaseIds: string[]) => Promise}} opts * @returns {Promise} */ handoffExternalOwner(transport: import("#types").Transport, { boot, snapshot, runtimeResult, persistReferencedReleaseIds }: { boot: import("#types").RuntimeBootState; snapshot: import("#types").RuntimeSnapshot; runtimeResult: { externalOwnerVerificationRequired?: boolean; daemonRuntime?: any; }; persistReferencedReleaseIds: (releaseIds: string[]) => Promise; }): Promise; /** * @param {import('#types').Transport} transport * @param {string} releasePath * @param {import('#types').RuntimeSnapshot} snapshot * @returns {Promise>} */ readStatus(transport: import("#types").Transport, releasePath: string, snapshot: import("#types").RuntimeSnapshot): Promise>; /** * Reads the release directories still owned by Rollbridge so Rampway can pin * them before cleanup. * * @param {import('#types').Transport} transport * @param {{releasePath: string, snapshot: import('#types').RuntimeSnapshot}} opts * @returns {Promise} */ readReferencedReleaseIds(transport: import("#types").Transport, { releasePath, snapshot }: { releasePath: string; snapshot: import("#types").RuntimeSnapshot; }): Promise; /** * @param {import('#types').Transport} transport * @param {{snapshot: import('#types').RuntimeSnapshot}} opts * @returns {Promise} */ commit(transport: import("#types").Transport, { snapshot }: { snapshot: import("#types").RuntimeSnapshot; }): Promise; /** * Reconstructs only an already-accepted publication snapshot and verifies the * live Rollbridge owner against the exact failed-publication relationship. * No runtime lifecycle command or stable-material write is issued here. * * @param {import('#types').Transport} transport * @param {{releasePath: string, releaseId: string, revision: string, currentReleasePath: string, currentReleaseId: string, currentRevision: string, runtimePath: string, snapshot?: import('#types').RuntimeSnapshot}} opts * @returns {Promise<{snapshot: import('#types').RuntimeSnapshot, referencedReleaseIds: string[], runtimeResult: object}>} */ recoverPublication(transport: import("#types").Transport, { releasePath, releaseId, revision, currentReleasePath, currentReleaseId, currentRevision, runtimePath, snapshot }: { releasePath: string; releaseId: string; revision: string; currentReleasePath: string; currentReleaseId: string; currentRevision: string; runtimePath: string; snapshot?: import("#types").RuntimeSnapshot; }): Promise<{ snapshot: import("#types").RuntimeSnapshot; referencedReleaseIds: string[]; runtimeResult: object; }>; /** * Verifies and recovers one exact failed pre-commit generation transition, * then proves that the previous release remains authoritative. * * @param {import('#types').Transport} transport * @param {{releasePath: string, releaseId: string, revision: string, previousReleasePath: string, previousReleaseId: string, previousRevision: string, targetSnapshot: import('#types').RuntimeSnapshot}} opts * @returns {Promise} */ recoverGenerationTransition(transport: import("#types").Transport, { releasePath, releaseId, revision, previousReleasePath, previousReleaseId, previousRevision, targetSnapshot }: { releasePath: string; releaseId: string; revision: string; previousReleasePath: string; previousReleaseId: string; previousRevision: string; targetSnapshot: import("#types").RuntimeSnapshot; }): Promise; /** * Rebuilds the pre-acceptance identity without creating missing material. * * @param {import('#types').Transport} transport * @param {{releasePath: string, runtimePath: string}} opts * @returns {Promise} */ publicationCandidateSnapshot(transport: import("#types").Transport, { releasePath, runtimePath }: { releasePath: string; runtimePath: string; }): Promise; /** * Uses accepted daemon bytes after discovery so the second attestation does * not execute mutable target-release tooling. * * @param {import('#types').Transport} transport * @param {string} releasePath * @param {import('#types').RuntimeSnapshot} snapshot * @returns {Promise>} */ publicationStatus(transport: import("#types").Transport, releasePath: string, snapshot: import("#types").RuntimeSnapshot): Promise>; /** * Computes the exact normalized Rollbridge config authority with the verified * live daemon runtime's exported deterministic contract. * * @param {import('#types').Transport} transport * @param {string} releasePath * @param {import('#types').RuntimeSnapshot} snapshot * @returns {Promise} */ publicationConfigDigest(transport: import("#types").Transport, releasePath: string, snapshot: import("#types").RuntimeSnapshot): Promise; /** * @param {import('#types').RuntimeSnapshot} snapshot * @param {{releasePath: string, releaseId: string, revision: string, acceptedAt: string}} opts * @returns {import('#types').RuntimeBootIdentity|undefined} */ bootIdentity(snapshot: import("#types").RuntimeSnapshot, { releasePath, releaseId, revision, acceptedAt }: { releasePath: string; releaseId: string; revision: string; acceptedAt: string; }): import("#types").RuntimeBootIdentity | undefined; /** * @param {{releasePath: string, releaseId: string, revision: string, configPath: string, bootAttestation?: string, snapshot?: import('#types').RuntimeSnapshot}} identity * @returns {string} */ foregroundBootCommand(identity: { releasePath: string; releaseId: string; revision: string; configPath: string; bootAttestation?: string; snapshot?: import("#types").RuntimeSnapshot; }): string; /** * @param {import('#types').Transport} transport * @param {import('#types').ReadRuntimeBootState} state * @returns {Promise} */ verifyForegroundBootMaterial(transport: import("#types").Transport, state: import("#types").ReadRuntimeBootState): Promise; /** * Starts Rollbridge's foreground daemon contract without supervising it. * * @param {{releasePath: string, releaseId: string, revision: string, configPath: string, configIdentity: string, bootAttestation?: string, snapshot: import('#types').RuntimeSnapshot, onStarted: () => Promise}} identity * @returns {Promise<{code: number}>} */ foregroundBoot(identity: { releasePath: string; releaseId: string; revision: string; configPath: string; configIdentity: string; bootAttestation?: string; snapshot: import("#types").RuntimeSnapshot; onStarted: () => Promise; }): Promise<{ code: number; }>; /** * @param {import('#types').RuntimeSnapshot} snapshot * @param {{configMaterialRequired?: boolean}} [opts] * @returns {void} */ validateSnapshot(snapshot: import("#types").RuntimeSnapshot, { configMaterialRequired }?: { configMaterialRequired?: boolean; }): void; /** * @param {import('#types').RuntimeSnapshot} snapshot * @returns {void} */ validateRollbackTarget(snapshot: import("#types").RuntimeSnapshot): void; /** * @param {import('#types').Transport} transport * @param {{snapshot: import('#types').RuntimeSnapshot, releasePath: string, runtimePath: string}} opts * @returns {Promise} */ prepareRollback(transport: import("#types").Transport, { snapshot, releasePath, runtimePath }: { snapshot: import("#types").RuntimeSnapshot; releasePath: string; runtimePath: string; }): Promise; /** * @param {import('#types').Transport} transport * @param {{snapshot: import('#types').RuntimeSnapshot, runtimePath: string, contract?: boolean, configMaterialRequired?: boolean}} opts * @returns {Promise} */ verifySnapshot(transport: import("#types").Transport, { snapshot, runtimePath, contract, configMaterialRequired }: { snapshot: import("#types").RuntimeSnapshot; runtimePath: string; contract?: boolean; configMaterialRequired?: boolean; }): Promise; /** * Hashes one accepted Rollbridge contract with its exact daemon runtime. * * @param {import('#types').RuntimeSnapshot} snapshot * @param {{format: number, digest: string, path: string, version: string}} daemonRuntime * @returns {string} */ foregroundIdentityDigest(snapshot: import("#types").RuntimeSnapshot, daemonRuntime: { format: number; digest: string; path: string; version: string; }): string; /** * Independently reproduces Rollbridge daemon-runtime format 1's content * digest without executing any bytes from the accepted runtime. * * @param {import('#types').Transport} transport * @param {{format: number, digest: string, path: string, version: string}} daemonRuntime */ verifyReportedDaemonRuntime(transport: import("#types").Transport, daemonRuntime: { format: number; digest: string; path: string; version: string; }): Promise; /** * @param {import('#types').Transport} transport * @param {string} releasePath * @param {import('#types').RollbridgeRuntimeConfig} config * @returns {Promise} */ packageVersion(transport: import("#types").Transport, releasePath: string, config: import("#types").RollbridgeRuntimeConfig): Promise; /** * @param {{config: import('#types').RollbridgeRuntimeConfig, configContent?: string, configName?: string, packageIdentity: string}} opts * @returns {string} */ contractDigest({ config, configContent, configName, packageIdentity }: { config: import("#types").RollbridgeRuntimeConfig; configContent?: string; configName?: string; packageIdentity: string; }): string; /** * @param {string} configName * @param {string} configContent * @returns {string} */ materialDigest(configName: string, configContent: string): string; /** * @param {string} contractDigest * @param {string} rollbackCompatibility * @returns {string} */ rollbackCompatibilityDigest(contractDigest: string, rollbackCompatibility: string): string; /** * @param {import('#types').Transport} transport * @param {{releasePath: string, snapshot?: import('#types').RuntimeSnapshot}} opts * @returns {Promise} */ healthCheck(transport: import("#types").Transport, { releasePath, snapshot }: { releasePath: string; snapshot?: import("#types").RuntimeSnapshot; }): Promise; /** * @param {import('#types').Transport} transport * @param {{releasePath: string, currentPath?: string}} opts * @returns {Promise} */ prepareVersionChange(transport: import("#types").Transport, { releasePath, currentPath }: { releasePath: string; currentPath?: string; }): Promise; /** * @param {import('#types').Transport} transport * @returns {Promise} */ deployedVersion(transport: import("#types").Transport): Promise; /** * @param {import('#types').Transport} transport * @param {{currentPath: string, snapshot?: import('#types').RuntimeSnapshot}} opts * @returns {Promise} */ shutdownChangedVersion(transport: import("#types").Transport, { currentPath, snapshot }: { currentPath: string; snapshot?: import("#types").RuntimeSnapshot; }): Promise; /** * @param {import('#types').Transport} transport * @param {{currentPath: string, snapshot: import('#types').RuntimeSnapshot}} opts * @returns {Promise} */ shutdownKnownGoodDaemon(transport: import("#types").Transport, { currentPath, snapshot }: { currentPath: string; snapshot: import("#types").RuntimeSnapshot; }): Promise; /** * Stops a legacy owner only when its status proves it cannot interrupt a managed release. * * @param {import('#types').Transport} transport * @param {{currentPath: string, snapshot: import('#types').RuntimeSnapshot}} opts * @returns {Promise} */ shutdownInactiveLegacyOwner(transport: import("#types").Transport, { currentPath, snapshot }: { currentPath: string; snapshot: import("#types").RuntimeSnapshot; }): Promise; /** * @param {import('#types').Transport} transport * @param {{releasePath: string, snapshot?: import('#types').RuntimeSnapshot}} opts * @returns {Promise} */ validate(transport: import("#types").Transport, { releasePath, snapshot }: { releasePath: string; snapshot?: import("#types").RuntimeSnapshot; }): Promise; /** * @param {import('#types').Transport} transport * @param {{releasePath: string, snapshot?: import('#types').RuntimeSnapshot}} opts * @returns {Promise} */ status(transport: import("#types").Transport, { releasePath, snapshot }: { releasePath: string; snapshot?: import("#types").RuntimeSnapshot; }): Promise; /** * @param {import('#types').Transport} transport * @param {{releasePath: string, snapshot?: import('#types').RuntimeSnapshot}} opts * @returns {Promise} */ logs(transport: import("#types").Transport, { releasePath, snapshot }: { releasePath: string; snapshot?: import("#types").RuntimeSnapshot; }): Promise; /** * @param {import('#types').Transport} transport * @param {{releasePath: string, force?: boolean, snapshot?: import('#types').RuntimeSnapshot}} opts * @returns {Promise} */ recover(transport: import("#types").Transport, { releasePath, force, snapshot }: { releasePath: string; force?: boolean; snapshot?: import("#types").RuntimeSnapshot; }): Promise; /** * @param {string} cwd * @param {import('#types').RollbridgeRuntimeConfig} [config] * @returns {{cwd: string, env?: Record, secretEnv?: Record}} */ runOptions(cwd: string, config?: import("#types").RollbridgeRuntimeConfig): { cwd: string; env?: Record; secretEnv?: Record; }; /** * @param {string} releasePath * @returns {string} */ sourceConfigPath(releasePath: string): string; /** * @param {import('#types').RuntimeSnapshot} [snapshot] * @returns {import('#types').RollbridgeRuntimeConfig} */ configForSnapshot(snapshot?: import("#types").RuntimeSnapshot): import("#types").RollbridgeRuntimeConfig; } //# sourceMappingURL=rollbridge-runtime.d.ts.map