//#region src/runtime.d.ts type ProjectRuntimeDatabase = { host: string; port: number; database: string; user: string; password: string; searchPath: string; organizationId: string; /** @deprecated Per-project workers only — org workers omit this. */ projectId?: string; }; type OrgProjectDeploy = { projectId: string; name: string; artifactId: string; artifactStorageKey: string; artifactVersion: number; /** Require an affirmative artifact-specific health record before promotion. */ requiresArtifactHealth?: boolean; }; type OrgArtifactSpec = { projectId: string; artifactStorageKey: string; artifactId: string; /** Monotonic per-project artifact version from the platform database. */ artifactVersion: number; }; type ProjectRuntimeHosting = { appName: string; }; type ProjectRuntimeInput = { organizationId: string; projects: OrgProjectDeploy[]; database: ProjectRuntimeDatabase; hosting?: ProjectRuntimeHosting; /** Extra env merged into the project server launch spec (e.g. from an llmProxy plugin). */ env?: Record; /** Previous runtime to retire after a successful cutover. */ previousRuntimeId?: string | null; }; /** Builds base64 `KEYSTROKE_ORG_ARTIFACTS` payload for org worker containers. */ declare function encodeOrgArtifacts(artifacts: OrgArtifactSpec[]): string; declare function parseOrgArtifactsFromEnv(env?: NodeJS.ProcessEnv): OrgArtifactSpec[] | undefined; type ProjectRuntimeDestroyInput = { runtimeId: string; hosting?: ProjectRuntimeHosting; }; type ProjectRuntimeReconcileInput = { organizationId: string; /** The runtime to keep — every other runtime belonging to this org should be destroyed. */ keepRuntimeId: string; hosting?: ProjectRuntimeHosting; }; type ProjectRuntimeResult = { runtimeId: string; baseUrl: string; }; type ProjectRuntimeSleepInput = { runtimeId: string; hosting?: ProjectRuntimeHosting; }; type ProjectRuntimeWakeInput = { runtimeId: string; hosting?: ProjectRuntimeHosting; }; type ProjectRuntime = { start(input: ProjectRuntimeInput): Promise; destroy?(input: ProjectRuntimeDestroyInput): Promise; /** * Sweep away every runtime for this org except `keepRuntimeId`, retrying * transient failures instead of giving up after one attempt. This catches * orphans that a single {@link destroy} call missed (e.g. a previous deploy's * destroy failed silently), not just the one runtime recorded as "previous." */ reconcile?(input: ProjectRuntimeReconcileInput): Promise; /** * Put an existing runtime to sleep without destroying it (e.g. Docker stop, * Fly suspend). Provider-specific; omit when unsupported. */ sleep?(input: ProjectRuntimeSleepInput): Promise; /** * Resume a sleeping runtime. May return a fresh {@link ProjectRuntimeResult} * when the base URL can change (e.g. Docker host port remap). */ wake?(input: ProjectRuntimeWakeInput): Promise; }; type ProjectPingTarget = { baseUrl: string | null; runtimeId: string | null; }; //#endregion export { ProjectRuntimeDatabase as a, ProjectRuntimeInput as c, ProjectRuntimeSleepInput as d, ProjectRuntimeWakeInput as f, ProjectRuntime as i, ProjectRuntimeReconcileInput as l, parseOrgArtifactsFromEnv as m, OrgProjectDeploy as n, ProjectRuntimeDestroyInput as o, encodeOrgArtifacts as p, ProjectPingTarget as r, ProjectRuntimeHosting as s, OrgArtifactSpec as t, ProjectRuntimeResult as u }; //# sourceMappingURL=runtime-Cp906goK.d.mts.map