import type { Scenario } from './builder/scenario.ts'; import { MetricCollector, SimulationEngine, SimulationStatus } from './engine/index.ts'; import type { SimComponent } from './types/components.ts'; import type { MetricSnapshot, TimeSeriesPoint } from './types/metrics.ts'; export interface RunOptions { /** Simulation seconds between snapshots. Use 0 or null for final-only. */ snapshotInterval?: number | null; /** Trailing simulation-time window used for latency percentiles. */ latencyWindow?: number; /** Safety guard against scenarios that schedule events without advancing. */ maxEvents?: number; /** Invoked for each collected periodic snapshot and the final snapshot. */ onSnapshot?: (snapshot: MetricSnapshot) => void; } export interface SimulationResult { status: SimulationStatus; simTime: number; eventsProcessed: number; snapshots: MetricSnapshot[]; finalSnapshot: MetricSnapshot; } export interface SnapshotOptions { latencyWindow?: number; } /** A synchronous, deterministic execution of one synthesized Scenario. */ export declare class Simulation { #private; constructor(scenario: Scenario); static fromJSON(input: string | unknown): Simulation; get currentTime(): number; get status(): SimulationStatus; get queueSize(): number; /** Advanced access to the extracted discrete-event engine. */ get engine(): SimulationEngine; /** Advanced access to the metric collector. */ get metrics(): MetricCollector; getComponent(id: string): SimComponent | undefined; /** Process exactly one queued event. Returns true when complete. */ step(): boolean; run(options?: RunOptions): SimulationResult; snapshot(options?: SnapshotOptions): MetricSnapshot; getTimeSeries(componentId: string, metricName: string): TimeSeriesPoint[]; reset(): this; } //# sourceMappingURL=simulation.d.ts.map