@kya-os/cli
Version:
CLI for MCP-I setup and management
69 lines • 1.7 kB
TypeScript
/**
* Effect Runner
* Orchestrates terminal effects with proper management
*/
import { Effect, EffectConfig } from "./types.js";
/**
* Options for running an effect
*/
export interface RunEffectOptions {
/** Effect instance to run */
effect: Effect;
/** Text to animate */
text: string;
/** Effect-specific configuration */
config?: Partial<EffectConfig>;
/** Callback when effect completes */
onComplete?: () => void;
/** Callback on error */
onError?: (error: Error) => void;
/** Custom output stream */
outputStream?: NodeJS.WriteStream;
/** Skip the "Press any key to exit" prompt */
skipExitPrompt?: boolean;
/** Keep text visible after effect (no alternate screen buffer) */
persistent?: boolean;
}
/**
* Effect runner for executing terminal effects
*/
export declare class EffectRunner {
private terminalState;
private isRunning;
private currentEffect;
private animationHandle;
constructor();
/**
* Run an effect
*/
run(options: RunEffectOptions): Promise<void>;
/**
* Stop the currently running effect
*/
stop(): Promise<void>;
/**
* Check if terminal supports effects
*/
private supportsEffects;
/**
* Setup terminal for effect rendering
*/
private setupTerminal;
/**
* Run the animation loop
*/
private runAnimation;
/**
* Clean up terminal state
*/
private cleanup;
/**
* Check if an effect is currently running
*/
isEffectRunning(): boolean;
/**
* Get current effect info
*/
getCurrentEffect(): Effect | null;
}
//# sourceMappingURL=effect-runner.d.ts.map