/** * Ticket-ready bodies for support findings, in the structure: Summary → Impact → * Issue → Observed evidence → Environment → Requested fix → Acceptance criteria. * * - escalation / improvement → EXTERNAL, sent to IT / security / a platform * team. TOOL-NEUTRAL by contract: never name this harness or its commands. * They describe the failed INTERNAL configuration the recipient must fix at * the system level — not a tool to approve. Evidence / affected-area / * acceptance are canned per code (no guessed free text); the live detail * rides along as supporting evidence. * - self-fix → INTERNAL developer note; may reference harness commands. * * Pure functions over {@link lines}; NO wall-clock — `runId`/`timestamp` arrive * via {@link SupportContext} so output is deterministic. * * CONTRACT: every {@link SupportContext} string and every `finding.details` entry * MUST be pre-redacted by the caller (home-dir scrub, key-aware argv masking). */ import { type SupportFinding } from "./findings.js"; /** Per-run facts woven into every template. All strings are caller-redacted. */ export interface SupportContext { projectName: string; /** Workspace path — self-fix note only; never rendered in an external ticket. */ root: string; /** The command that surfaced the finding — self-fix note only. */ command: string; contextDir: string; /** Target AI CLIs, comma-joined — self-fix note only. */ targets: string; platform: string; /** Opaque correlation id, rendered as "Reference" (no tool name implied). */ runId: string; /** ISO timestamp, supplied by the caller (never read from the clock here). */ timestamp: string; /** Why a correct environment matters for THIS project — from SETUP.md, optional. */ projectContext?: string; /** * Real routing metadata (assignment group, ticket prefix, …) IF the project's * setup files provide it. Rendered verbatim in the Environment block. NEVER * invented — absent means absent. */ routing?: string; /** * SETUP.md instruction to adapt the message to corporate language. Surfaced by * the integration layer as a terminal note to the author, NOT embedded in the * ticket body (which stays clean and ready to paste). */ corporateGuidance?: string; } /** EXTERNAL escalation — a failing internal-configuration check (Summary → … → Acceptance). */ export declare function escalationBody(finding: SupportFinding, ctx: SupportContext): string; /** EXTERNAL improvement — a non-blocking configuration gap. */ export declare function improvementBody(finding: SupportFinding, ctx: SupportContext): string; /** INTERNAL developer self-fix note — terse, runnable, may name harness commands. */ export declare function selfFixBody(finding: SupportFinding, ctx: SupportContext): string; /** * Guard for the tool-neutrality contract: an EXTERNAL body/subject must never name * the harness. Exposed so the integration layer (and tests) can assert it before * anything is written. Returns true when `text` is safe to send externally. */ export declare function isToolNeutral(text: string): boolean; /** Which findings render as tool-neutral external messages (vs internal self-fix). */ export declare function isExternalFinding(finding: SupportFinding): boolean;