/** * Resolve the list of changed knowledge-entry .md files for a gate run. * * Argument semantics: * - If `args` has entries, treat them as file paths (relative or absolute) * and use them directly. Operators pass explicit files when iterating * locally; the workflow passes them when GitHub's "changed files" API * surface is more convenient than re-running `git diff`. * - Otherwise fall back to `git diff --name-only origin/main...HEAD`, * filtering to `content/knowledge/**\/*.md` so callers can run the CLI * on a feature branch without flag plumbing. * * Returns absolute paths so callers can `fs.readFileSync` directly. */ export interface ResolveOptions { /** * Read the file list from a JSON file (must be an array of strings). Used * by the CI workflow to avoid shell-interpolating PR-controlled filenames * (round-2 F-001) — a PR could add a content/knowledge path containing * shell metacharacters that would `$()`-execute inside the workflow's * bash. Reading from a JSON file lets us validate each entry on the Node * side without ever touching bash. */ filesFrom?: string; } export declare function resolveTargetFiles(args: string[], cwd: string, opts?: ResolveOptions): string[]; /** * Read the operator opt-out list for link-checking from * `.scaffold/observability.yaml` under `knowledge_freshness.link_check.skip`. * Empty list when the file or key is missing — the default is "no opt-outs" * per the task spec ("no opt-outs" if no list exists). */ export declare function loadLinkCheckSkip(projectRoot: string): string[]; /** * Produce a unified diff for a SPECIFIC set of files. * * Round-2 F-003: this used to diff `origin/main...HEAD`, which produced an * empty diff in both deployment shapes: * - PR gate workflow: HEAD of the base checkout IS origin/main (since the * PR head's content/knowledge/ is OVERLAID, not merged). So * `origin/main...HEAD` returns nothing even when the overlay added * thousands of lines. * - Cron inline gates: audit-apply edits on disk WITHOUT committing, * so HEAD is still main and the diff is empty. * * Diffing the working tree (no commit ranges, just `git diff -- `) * captures both uncommitted edits AND overlaid files. That's the right * shape for every gate-execution context we use. * * Returns an empty string when there are no changes. */ export declare function gitDiffForFiles(cwd: string, files: string[]): string; //# sourceMappingURL=changed-files.d.ts.map