UNPKG

gepa-spo

Version:

Genetic-Pareto prompt optimizer to evolve system prompts from a few rollouts with modular support and intelligent crossover

33 lines (32 loc) 1.13 kB
/** * Simple colored logger with high-level step logging. * No external deps; ANSI colors via constants only. */ export type LogLevel = 'silent' | 'error' | 'warn' | 'info' | 'debug'; /** ANSI color constants (do not hardcode colors elsewhere). */ export declare const COLORS: { readonly reset: "\u001B[0m"; readonly dim: "\u001B[2m"; readonly bold: "\u001B[1m"; readonly gray: "\u001B[90m"; readonly red: "\u001B[31m"; readonly green: "\u001B[32m"; readonly yellow: "\u001B[33m"; readonly blue: "\u001B[34m"; readonly magenta: "\u001B[35m"; readonly cyan: "\u001B[36m"; readonly white: "\u001B[37m"; }; export interface Logger { enabled: boolean; level: LogLevel; info(message: string): void; warn(message: string): void; error(message: string): void; debug(message: string): void; /** Step update for visual progress (high signal). */ step(title: string, detail?: string): void; } export declare function createLogger(enabled: boolean, level?: LogLevel): Logger; /** A no-op logger you can use as default. */ export declare const silentLogger: Logger;