/** * Race-free output-path writability preflight (neutral, surface-agnostic). * * Used by every CLI surface that supports `--output ` to verify the * target path is writable BEFORE doing any side-effecting work (spawning a * child process, loading an issuer key, signing, etc.). A record-producing * wrapper must never do that work only to discover the record cannot be * persisted. * * The preflight is deliberately non-invasive on the final target path: * - if the final target exists, open it for append/write check and * close it; never unlink the existing target * - if the final target does NOT exist, create a uniquely-named * sibling temp file in the parent directory with O_EXCL and * immediately unlink that temp file; the final target path is * not created or touched until the actual write step * * Result: between preflight and the eventual write, the CLI has NOT * created or modified the final output path. Concurrent observers cannot * race against a transient zero-byte target file produced by the preflight. */ /** * Verify that `--output ` will be writable. Returns null on * success; otherwise an error message suitable for pairing with * `cli.output_write_failed`. */ export declare function preflightOutputWritable(output: string): string | null; //# sourceMappingURL=output-preflight.d.ts.map