/** * Edit delivery for the core (W2 design section 2.2, D11): given the circuit * a core is running and the circuit the host wants next, decide whether the * edit can be delivered as live parameter changes (`CoreEngine.setParams`, * which keeps every piece of state exactly) or needs a reload (which carries * state across by component id, W2c). * * `liveParamDiff` returns the live changes, an empty list when nothing the * program depends on changed, or `null` when anything else changed: a * component added, removed or retyped, a pin list, a wire, the net ids those * wires produce, the environment, or any param that is not live. `null` is * the safe answer: it only ever costs a reload, while a wrong list would drop * an edit on the floor. So every comparison below errs toward `null`. * * Why component order and net ids are compared: the compiled device list, and * the driver ids derived from it, follow component order, so any reorder is a * different program and returns `null` even when no wire or net id moved. * `buildNets` also numbers nets by wire order and, for floating pins, by * component order, and picks ground from the first source return; readouts * are keyed by net id, so the same net id must name the same pins. */ import type { SimCircuit } from "../sim/engine/sim-engine.js"; import type { CoreParamChange } from "./engine.js"; /** * `voltage_source`'s `voltage` is live (W2c, ruling R57 D12 (a): a set is a * source edge on the fixed node in Rust). `LIVE_PARAM_SPECS` and * `CORE_RECORD_SHAPES` carry it now, so the generic path answers and this * flag no longer decides anything; it stays `true`, exported as it was. */ export declare const VOLTAGE_SOURCE_V_LIVE = true; export interface LiveParamDiffOptions { /** Overrides {@link VOLTAGE_SOURCE_V_LIVE} (tests exercise the pending state both ways). */ readonly voltageSourceLive?: boolean; } export declare function liveParamDiff(prev: SimCircuit, next: SimCircuit, options?: LiveParamDiffOptions): CoreParamChange[] | null;