/** * Display Protocol Utilities * * Shared helpers for deterministic MCP tool output formatting. * All gitmem tools use the `display` field pattern so the LLM * echoes pre-formatted output verbatim instead of reformatting JSON. * * Design system: docs/cli-ux-guidelines.md * * Zero dependencies on other gitmem internals — keep this lightweight. */ /** ANSI escape codes — resolve to empty strings when color is disabled. */ export declare const ANSI: { readonly red: "" | "\u001B[31m"; readonly yellow: "" | "\u001B[33m"; readonly green: "" | "\u001B[32m"; readonly bold: "" | "\u001B[1m"; readonly dim: "" | "\u001B[2m"; readonly reset: "" | "\u001B[0m"; }; /** * Wrap formatted content with the display protocol suffix. * * NOTE: When the PostToolUse display hook is active, this suffix is stripped * and the display is routed directly to the terminal. The suffix remains as * a fallback for environments without the hook (e.g. Brain Cloud, DAC). */ export declare function wrapDisplay(content: string): string; /** Ripple mark: dim outer ring, red inner ring, bold center dot. */ export declare const RIPPLE: string; /** * Build the product line: `((●)) gitmem ── [· detail]` * The ripple mark + red "gitmem" form the brand identity. */ export declare function productLine(tool: string, detail?: string): string; /** Severity text indicators with ANSI color */ export declare const SEV: Record; /** Severity indicator without color (for non-display contexts) */ export declare const SEV_PLAIN: Record; /** Learning type labels with ANSI color */ export declare const TYPE: Record; /** Type labels without color */ export declare const TYPE_PLAIN: Record; /** Colored status words */ export declare const STATUS: { readonly ok: "ok" | "ok\u001B[0m" | "\u001B[32mok" | "\u001B[32mok\u001B[0m"; readonly fail: "FAIL" | "FAIL\u001B[0m" | "\u001B[31mFAIL" | "\u001B[31mFAIL\u001B[0m"; readonly warn: "WARN" | "WARN\u001B[0m" | "\u001B[33mWARN" | "\u001B[33mWARN\u001B[0m"; readonly rejected: "REJECTED" | "REJECTED\u001B[0m" | "\u001B[31mREJECTED" | "\u001B[31mREJECTED\u001B[0m"; readonly complete: "COMPLETE" | "COMPLETE\u001B[0m" | "\u001B[32mCOMPLETE" | "\u001B[32mCOMPLETE\u001B[0m"; readonly failed: "FAILED" | "FAILED\u001B[0m" | "\u001B[31mFAILED" | "\u001B[31mFAILED\u001B[0m"; readonly pass: "+" | "+\u001B[0m" | "\u001B[32m+" | "\u001B[32m+\u001B[0m"; readonly miss: "-" | "-\u001B[0m" | "\u001B[31m-" | "\u001B[31m-\u001B[0m"; }; /** * Format a relative time string from a date. * "2m ago", "3h ago", "5d ago", "2w ago" */ export declare function relativeTime(date: string | Date): string; /** * Truncate a string with ellipsis. */ export declare function truncate(str: string, max: number): string; /** * Wrap text with dim ANSI (convenience helper). */ export declare function dimText(str: string): string; /** * Wrap text with bold ANSI (convenience helper). */ export declare function boldText(str: string): string; //# sourceMappingURL=display-protocol.d.ts.map