Rebuild network from a spec
rebuild_networkReconstruct a node network inside a COMP from a JSON spec, creating nodes, applying parameters, and wiring inputs in one pass. Handles errors with warnings for partial recovery.
Instructions
Reconstruct a live network inside a COMP from a serialize_network spec — the REBUILD half of a git-diffable round-trip. Takes a JSON spec of nodes (name, operator type, parameters as constants/expressions/binds, inbound wires by name, optional x/y) and, in one pass, creates every node, applies its parameters and expressions, then wires inputs by resolving each from reference to the freshly created node. Fail-forward: an unknown operator type, missing parameter, or unresolved wire becomes a warning and the rest still build, so a partial reconstruction still returns useful results. Set clear_existing to delete the parent's current children first (destructive). Set auto_layout to auto-position every node by dependency (longest-path columns, left→right) from the spec's inputs graph, overriding any manual x/y. Returns the created node names, wire count, parameters set, and any warnings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | A serialize_network spec to reconstruct. | |
| auto_layout | No | Auto-position every node by dependency (longest-path columns, left→right) from the spec's `inputs` graph, overriding any per-node x/y. False (default) honors manual x/y only. | |
| parent_path | Yes | COMP to rebuild the network inside. | |
| clear_existing | No | Delete existing children of parent_path first (destructive). |