/** * ollama_artifact_prune — safe cleanup of pack artifacts on disk (no-LLM). * * Dry-run by default — re-runs that accidentally ship with the wrong filter * don't silently nuke hand-kept artifacts. Caller must opt in to real delete * with `dry_run: false`. * * Scans the canonical artifact root (or INTERN_ARTIFACT_DIR) and matches on * `older_than_days` (against file mtime) and `pack_type` (which subdir). * Matching files always come in .md + .json pairs — both get deleted together. */ import { z } from "zod"; import type { Envelope } from "../envelope.js"; import type { RunContext } from "../runContext.js"; export declare const artifactPruneSchema: z.ZodObject<{ older_than_days: z.ZodOptional; pack_type: z.ZodOptional>; dry_run: z.ZodOptional; }, z.core.$strip>; export type ArtifactPruneInput = z.infer; export interface PruneMatch { pack: "incident" | "change" | "repo"; slug: string; age_days: number; bytes: number; } export interface ArtifactPruneResult { matched: PruneMatch[]; total_matched: number; total_bytes: number; dry_run: boolean; deleted: boolean; artifact_root: string; /** * Files under a scanned pack dir that were NOT deleted because they don't * parse as a known pack artifact (a hand-parked notes.json, another tool's * output, malformed JSON). Reported so a caller can see prune left them alone. */ skipped: Array<{ path: string; reason: string; }>; } export declare function handleArtifactPrune(input: ArtifactPruneInput, ctx: RunContext): Promise>; //# sourceMappingURL=artifactPrune.d.ts.map