/** * Turns what the machine found into a refusal the caller can act on * * A refusal that only says "no" gets worked around; a refusal that asks "are * you sure" gets answered without reading. This one says what stands behind * the target — name, age, what it is carrying — because that is the thing the * caller did not know when writing the command. * * Going ahead means naming the targets, and the names are checked against * what the command actually reaches. A confirmation that names something else * is refused too: it says the caller and the machine disagree about the target. */ import type { PreviewedTarget, StrikePreview } from './strike-preview-parse.js'; /** Confirmation that carries the names, not just the intent */ export declare const KILL_MARKER = "# CONFIRMED-KILL:"; /** The name the caller would write in the confirmation */ export declare function nameOf(target: PreviewedTarget): string; /** * The same pattern, rewritten so it no longer matches the command carrying it. * * One character becomes a class of itself: `relay` reads as `[r]elay`, which * still matches `relay` in the target but not the literal `[r]elay` written * here. Null when the first character cannot stand inside a class. */ export declare function shieldPattern(pattern: string | null): string | null; /** The names a confirmation carries, or null when there is no confirmation */ export declare function readConfirmedNames(command: string): string[] | null; /** * Judge what came back from the machine. * * Returns the refusal, or null when every strike named its targets and the * names match. Three ways to fail are kept apart on purpose: nothing could be * asked, the expansion reached nothing, and the expansion reached something * the caller did not name. */ export declare function judgeStrikes(previews: StrikePreview[], confirmed: string[] | null): string | null;