/** * Where this host keeps a run. * * A run's file name is the SHA-256 of its public run id, so an id containing a * separator, a leading dot, or a character this filesystem cannot spell still * names exactly one file directly beneath the authorized root. Hashing is also * what removes the need for a second registry: discovery is arithmetic on the * id, and there is no index to disagree with the files. * * The root and the path it produces are host arrangement, not identity. A run * moved to another root is the same run, which is why the run id is also stored * inside the database and checked against the one that was asked for. */ /** The lowercase hexadecimal SHA-256 of a run id's UTF-8 bytes. */ export declare function hashRunId(runId: string): string; /** The file a run id names beneath `root`. */ export declare function workflowRunPath(root: string, runId: string): string; /** * Where a fork is built while it is being proved. * * A suffix in the same namespace as the lock, and a candidate pattern of * `.sqlite` exactly excludes it: nothing discovers it, nothing lists it, * and no run id resolves to it. That is what lets a fork be assembled in full — * schema, run, inherited prefix, retained roots and a restored Workspace — and * replayed against its own filesystem before any storage the host would * recognize as the new run exists. * * It is scratch. Whoever creates it removes it, and one left behind by an * interrupted attempt is replaced rather than resumed. */ export declare function workflowForkStaging(root: string, runId: string): string; /** * The advisory lock one run's executor holds. * * A suffix rather than a subdirectory, so every path a run occupies is derived * from one hash and inspection's candidate pattern — `.sqlite` exactly — * excludes it by construction. It is not retained run state: it is how one host * arranges ownership, and it may remain, empty, after the run is deleted. */ export declare function workflowRunLock(root: string, runId: string): string;