apply_operations
Apply a batch of edit operations to an Aseprite sprite in a single atomic process. Operations run in order and roll back on failure.
Instructions
Apply a list of edit operations to a sprite in one atomic, single-process batch.
Each operation is `{"op": "<name>", "args": {...}}`. Supported ops (v1):
add_layer, rename_layer, set_layer_visible, set_layer_opacity, remove_layer,
add_frame, duplicate_frame, set_frame_duration, add_tag, remove_tag, set_pixel,
draw_line, draw_rectangle, fill_rectangle, draw_ellipse, fill_ellipse, fill_layer,
clear_layer, add_slice, remove_slice, replace_color. Ops run **in order against the
same open sprite**, so later ops see earlier ones (e.g. add a layer then draw on it).
Atomic: if any op fails the whole batch is rolled back and nothing is saved; the
error names the failing op index. `dry_run=True` validates the op list and returns
the plan **without launching Aseprite** (shape checks only — runtime issues like a
missing layer surface on a real run).
Returns a `workflow_manifest.v1` (kind "batch") with a per-op `operations` list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| filename | Yes | ||
| operations | Yes |