/** * Display Module for PraisonAI TypeScript SDK * * Python parity with praisonaiagents/display module * * Provides: * - Display callback system * - Console output helpers * - Flow display utilities */ /** * Display callback function type. */ export type DisplayCallback = (message: string, context?: DisplayContext) => void; /** * Async display callback function type. */ export type AsyncDisplayCallback = (message: string, context?: DisplayContext) => Promise; /** * Display context for callbacks. */ export interface DisplayContext { agentName?: string; toolName?: string; level?: 'info' | 'warning' | 'error' | 'debug' | 'trace'; timestamp?: Date; metadata?: Record; } /** * Register a display callback. * Python parity: praisonaiagents/display */ export declare function registerDisplayCallback(callback: DisplayCallback | AsyncDisplayCallback, async?: boolean): void; /** * Get sync display callbacks. * Python parity: praisonaiagents/display */ export declare function syncDisplayCallbacks(): DisplayCallback[]; /** * Get async display callbacks. * Python parity: praisonaiagents/display */ export declare function asyncDisplayCallbacks(): AsyncDisplayCallback[]; /** * Clear all display callbacks. */ export declare function clearDisplayCallbacks(): void; /** * Display an error message. * Python parity: praisonaiagents/display */ export declare function displayError(message: string, context?: DisplayContext): void; /** * Display a generating message. * Python parity: praisonaiagents/display */ export declare function displayGenerating(agentName: string, context?: DisplayContext): void; /** * Display an instruction. * Python parity: praisonaiagents/display */ export declare function displayInstruction(instruction: string, context?: DisplayContext): void; /** * Display an interaction. * Python parity: praisonaiagents/display */ export declare function displayInteraction(agentName: string, input: string, output: string, context?: DisplayContext): void; /** * Display self-reflection. * Python parity: praisonaiagents/display */ export declare function displaySelfReflection(agentName: string, reflection: string, context?: DisplayContext): void; /** * Display a tool call. * Python parity: praisonaiagents/display */ export declare function displayToolCall(toolName: string, args: Record, result?: any, context?: DisplayContext): void; /** * Flow display configuration. */ export interface FlowDisplayConfig { showTimestamps?: boolean; showAgentNames?: boolean; showToolCalls?: boolean; colorize?: boolean; maxWidth?: number; } /** * Flow display class for visualizing agent workflows. * Python parity: praisonaiagents/display */ export declare class FlowDisplay { private config; private steps; constructor(config?: FlowDisplayConfig); /** * Add an agent step. */ addAgentStep(agentName: string, message: string): void; /** * Add a tool step. */ addToolStep(toolName: string, message: string): void; /** * Add a message step. */ addMessageStep(message: string): void; /** * Render the flow as text. */ render(): string; /** * Clear all steps. */ clear(): void; /** * Get step count. */ get stepCount(): number; } declare const _errorLogs: Array<{ message: string; timestamp: Date; context?: DisplayContext; }>; /** * Get error logs. * Python parity: praisonaiagents/display */ export declare function errorLogs(): typeof _errorLogs; /** * Log an error. */ export declare function logError(message: string, context?: DisplayContext): void; /** * Clear error logs. */ export declare function clearErrorLogs(): void; export {};