/** * CLI blocking checkpoint mechanism. * * Prints the checkpoint id + artifact summary + an `a/r/e` prompt to stderr, * blocks on stdin via readline until valid input is received, and: * - 'a' / 'approve' → { approved: true } * - 'r' / 'reject' → prompts for feedback, returns { approved: false, feedback } * - 'e' / 'edit' → opens $EDITOR with artifact text, reads back on save, * returns { edit: true, editDelta: { before, after } } * * Falls back to the noop mechanism (auto-approve) when stdin is not a TTY, * and writes a warning to stderr. * * Sprint 8 — colocated in mechanisms/ per Sprint 7 precedent. */ import type { Readable } from "node:stream"; import type { CheckpointArtifact, CheckpointId, CheckpointMechanism, CheckpointOutcome } from "../types.js"; export declare class CliCheckpointMechanism implements CheckpointMechanism { private readonly fallback; private readonly stdin; private readonly editor?; /** * @param fallback - Injected noop-like mechanism used when stdin is not a TTY. * Defaults to a fresh NoopCheckpointMechanism instance. * Injecting allows tests to spy on the fallback path. * @param stdin - Readable stream to read user input from. * Defaults to process.stdin; inject a pre-stuffed Readable * for performance benchmarks / non-TTY unit tests. * @param editor - Editor command override ($EDITOR env var is used when * this is not supplied; falls back to "nano"). */ constructor(fallback?: CheckpointMechanism, stdin?: Readable, editor?: string | undefined); request(checkpoint: CheckpointId, artifact: CheckpointArtifact): Promise; } //# sourceMappingURL=cli.d.ts.map