validate_script
Statically validate Synthesizer scripts without executing them. Detect syntax errors, missing imports, invalid attributes, and unavailable grids before running.
Instructions
Statically validate a Synthesizer script.
The script is parsed, never run. Checks run least invasive first: syntax, import availability by specification lookup only, referenced Synthesizer attributes and keyword arguments, and locally available grids.
Args: source: Python source text.
Returns:
A mapping with ok (no error-level diagnostics),
script_was_run (always False), a summary sentence,
diagnostics (a list of {severity, code, line, message}
capped at 100) with diagnostics_truncated recording whether
that cap bit, imports as {found, missing} lists of
top-level module names, notes explaining any check that was
skipped, and suggested_commands the host may choose to run
itself. grids with {requested, local} grid names is
present only when the script builds a Grid and the local grid
listing is available, and error is present only when
validation itself failed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||