import { Simulation } from '../simulation.ts'; import type { ScenarioJSON } from '../types/scenario.ts'; import type { RunOptions, SimulationResult } from '../simulation.ts'; import type { AnyComponent } from './components.ts'; import { Connection } from './connection.ts'; import type { AnyFailure } from './failures.ts'; import type { ValidationIssue } from './validation.ts'; export interface ScenarioOptions { name: string; seed?: number; endTime?: number; metricsWindowSize?: number; } /** * Typed builder for a complete simulation scenario. * * Component and failure objects retain identity, so normal builder code never * needs to pass component or connection IDs around. */ export declare class Scenario { #private; readonly name: string; readonly seed: number; readonly endTime: number; readonly metricsWindowSize: number; constructor(options: ScenarioOptions); get components(): readonly AnyComponent[]; get connections(): readonly Connection[]; get failures(): readonly AnyFailure[]; /** Add a component and return that same typed object for convenient assignment. */ add(component: T): T; /** Add several components in one fluent call. */ addAll(...components: AnyComponent[]): this; /** Add a typed failure object and return it. */ addFailure(failure: T): T; /** Return all semantic validation issues without throwing. */ validate(): readonly ValidationIssue[]; /** Throw ScenarioValidationError unless the scenario is ready to run. */ assertValid(): void; /** Emit the explicit, ID-based document accepted by Scenario.fromJSON(). */ toJSON(): ScenarioJSON; createSimulation(): Simulation; run(options?: RunOptions): SimulationResult; /** Build a typed Scenario from explicit, low-level JSON or a saved app document. */ static fromJSON(input: string | unknown): Scenario; } //# sourceMappingURL=scenario.d.ts.map