/** * Harness color design system + glyph tables for the party/raid frames widget * (agent-frames-widget capability, design D1/D2). * * Two-channel encoding rule: COLOR always answers "what harness is this?"; * lifecycle STATUS is carried by glyph, brightness, and (in party frames) the * terminal-state overlay text. The channels never swap roles. * * Host-neutral: no pi imports. Color EMISSION (truecolor pass-through vs * nearest-256 downgrade) lives in `src/widget-style.ts`, which also owns the * bar palettes — this module keeps the identity tokens, glyph tables, and * ANSI-stripping utilities. */ export interface HarnessColorToken { /** Truecolor identity hex. */ hex: string; /** Whether a harness implementation exists or the token is a reservation. */ status: "implemented" | "reserved"; } /** * The harness identity color table. Reserved tokens are design-system * reservations for future harnesses — defined here so the palette stays * coherent, with NO implementation behind them. */ export declare const HARNESS_COLOR_TOKENS: Record; /** Neutral gray fallback for unknown harness ids. */ export declare const NEUTRAL_HARNESS_COLOR = "#8a8a8a"; /** Publish a harness's declared identity into the overlay (composition root). */ export declare function registerHarnessIdentity(harnessId: string, identity: { colorHex: string; sigil: string; }): void; /** Clear the overlay — for test hygiene between cases. */ export declare function clearHarnessIdentityOverlay(): void; /** * Resolve a harness id to its identity color hex. * Precedence: declared overlay > core token map > neutral fallback. */ export declare function harnessColorHex(harnessId?: string): string; export declare const ANSI_RESET = "\u001B[0m"; /** Parse `#rrggbb` into [r, g, b]. Returns [138,138,138] (neutral) on malformed input. */ export declare function hexToRgb(hex: string): [number, number, number]; export declare function stripAnsi(text: string): string; /** * Terminal DISPLAY WIDTH of a single Unicode code point (widget-frame-fixes * D3). A pragmatic East-Asian-width classification — full grapheme-cluster * segmentation is out of scope for the glyph set in use: * - combining marks → 0 columns * - wide / fullwidth ranges (CJK, Hangul, fullwidth forms, emoji) → 2 columns * - {@link WIDE_SYMBOL_OVERRIDES} (BMP symbols empirically verified to render * emoji-wide under tmux's wcwidth) → 2 columns * - everything else (incl. East-Asian *ambiguous* glyphs like `π`, `●`, `✓`, * and every harness sigil/role/buff glyph in use — all verified width-1 under * tmux) → 1 column */ export declare function charWidth(cp: number): 0 | 1 | 2; /** * BMP symbol code points that render as two display columns under tmux's * wcwidth, despite an "ambiguous"/"neutral" East-Asian-width property. Every * {@link HARNESS_SIGILS} entry (incl. the cmd `⌘`) plus the role/buff glyphs * were measured via a bare-pane cursor-position probe (`#{cursor_x}` after * printing the glyph at column 0) and ALL render width-1 — so this set is * empty. It is kept as the extension point should a future sigil measure wide. * (The original cmd-sigil misalignment was NOT a glyph-width issue — see the * display-column layout math in `agent-frames.ts`.) */ export declare const WIDE_SYMBOL_OVERRIDES: ReadonlySet; /** Terminal display width of a string (sum of per-code-point {@link charWidth}). */ export declare function displayWidth(str: string): number; /** Visible display width (ANSI-stripped, display-column-accurate) of a rendered string. */ export declare function visibleLength(text: string): number; /** * Per-harness sigil — the raid cell's top-left indicator, reinforcing the * color channel with a shape channel at cell scale (design D3). */ export declare const HARNESS_SIGILS: Record; /** Fallback sigil for unknown harness ids. */ export declare const NEUTRAL_SIGIL = "\u25CF"; /** * Resolve a harness id to its sigil. * Precedence: declared overlay > core sigil map > neutral fallback. */ export declare function harnessSigil(harnessId?: string): string; /** Default portrait glyph for roles matching no keyword. */ export declare const DEFAULT_ROLE_GLYPH = "\u25C8"; export declare function roleGlyph(role?: string): string; //# sourceMappingURL=harness-colors.d.ts.map