/** * First-error window extraction for deployment logs — the shared primitive * behind `DeploymentFailure.excerpt` (design § 4). Scans for the first line * matching an anchored error-pattern set, keeps a ±N-line window around it, * and caps the result. Masks BEFORE any slicing (security-standards * "mask before you truncate"); with no anchor it falls back to the TAIL, not * the head — the head of a CDK log is its least informative part. */ /** Lines of context kept either side of the anchor line. */ export declare const ERROR_WINDOW_CONTEXT_LINES = 20; export interface ExtractErrorWindowOptions { /** Hard cap in UTF-16 code units. Default: `DEPLOYMENT_FAILURE_LIMITS.excerpt`. */ maxLength?: number; /** Context lines kept either side of the anchor line. Default: `ERROR_WINDOW_CONTEXT_LINES`. */ contextLines?: number; } /** * Extract a bounded first-error window from a deployment log. Returns the * masked log verbatim when it already fits the cap. */ export declare function extractErrorWindow(log: string, options?: ExtractErrorWindowOptions): string;