/** * v1.3.0 Part C (P1) — artifact filing. Long Chief outputs (reports, plans, * specs) are saved to `/artifacts/` and surfaced in chat as a card + file * attachment instead of being dumped as a wall of 1900-char chunks. The file is * git-versioned by the per-turn snapshot (git-snapshot.ts tracks `artifacts/`). * * Pure helpers here (no Discord deps) so they're unit-testable; the adapter * (`discord-adapter.ts`) calls `saveArtifact` then uploads the file. */ /** * Replies at or above this length are filed as artifacts rather than posted * inline. ~1500 chars ≈ a screenful; below it, an inline reply reads fine. */ export declare const ARTIFACT_MIN_CHARS = 1500; /** Does this reply warrant filing instead of an inline post? */ export declare function isArtifactWorthy(text: string): boolean; /** `/artifacts/` directory. */ export declare function artifactsDir(orgCwd: string): string; /** * Derive a human title from the content: the first markdown heading, else the * first non-empty line. Capped to 70 chars. */ export declare function deriveArtifactTitle(text: string): string; export interface SaveArtifactInput { /** Human title — drives the slug + card heading. */ title: string; /** Full content to persist. */ content: string; /** File extension without the dot. Default "md". */ ext?: string; } export interface SavedArtifact { /** Absolute path on disk. */ absPath: string; /** Bare filename (used as the upload name). */ fileName: string; /** Path relative to the org dir (for display / links). */ relPath: string; } /** * Persist an artifact under `/artifacts/-.` and return its * paths. `now` is injectable for deterministic tests. */ export declare function saveArtifact(orgCwd: string, input: SaveArtifactInput, now?: Date): SavedArtifact;