/** * Host-owned general artifact write seam. */ import { type Logger } from '@opensip-cli/core'; /** Options for {@link createWriteArtifactSeam}. */ export interface WriteArtifactSeamOptions { /** * Resolves the number of per-tool run-dirs to retain under * `.runtime/artifacts//` (`cli.artifacts.keep`). Evaluated at * write/prune time so `--cwd` runs read the entered scope's project config. * Undefined → {@link DEFAULT_ARTIFACT_RETENTION_KEEP}. The host prunes the * store after each write whose target lives inside it. */ readonly retentionKeep?: () => number | undefined; } /** * Build the public `cli.ensureArtifactDir(artifactPath)` implementation * (ADR-0091; External Tool Adapter A1/A7). * * Creates `dirname(artifactPath)` recursively at {@link ARTIFACT_DIR_MODE}. This * is the HOST seam a tool calls BEFORE handing the path to an external scanner as * its output target, so the per-run dir exists for a scanner that does a bare * `open(path, 'w')`. Idempotent (`recursive: true`); a pre-existing dir keeps its * mode (only freshly-created dirs get `0o700`, which is exactly the per-run dir). */ export declare function createEnsureArtifactDirSeam(logger?: Logger): (artifactPath: string) => Promise; /** Build the public `cli.writeArtifact(path, bytes)` implementation. */ export declare function createWriteArtifactSeam(logger?: Logger, options?: WriteArtifactSeamOptions): (path: string, bytes: string) => Promise; //# sourceMappingURL=artifact-seams.d.ts.map