openclaw/scripts/lib/runtime-artifact-contract.ts
Vincent Koc f26303d702
fix(tooling): join canceled artifact ownership waits (#160057)
Join signal-aware artifact waits and release ownership won after cancellation. Preserve the published updater native wait contract.

Validated cancellation races, published updater lock handoff, and exact-head CI.
2026-09-28 12:08:42 +08:00

16 lines
481 B
TypeScript

// Shared callable contract for compiled callers loading source-checkout writers.
type PreparedBundledPluginRuntime = {
changed: boolean;
publish(assertCurrent: () => void | Promise<void>): Promise<void>;
cleanup(): Promise<void>;
};
export type PrepareBundledPluginRuntime = (params: {
repoRoot: string;
}) => PreparedBundledPluginRuntime;
export type WithDistArtifactOwnership = <T>(
rootDir: string,
run: () => Promise<T>,
signal?: AbortSignal,
) => Promise<T>;