# Run on a selection or project

Apply a Block to selected assets, shots, a scene, or current project media.

The Step workspace's **Apply to** control can run a Block with a primary
image/video/audio/asset input on selected assets, one scene, selected shots, or all
compatible current project media (up to 100 per batch). Selections are saved with
the Step's existing project document. Scene/shot membership uses explicit source-document
production metadata; it is never inferred from image content. Reference roles
are preserved, and a Block requiring a semantic role only receives matching
assets. Uploaded audio is correctly typed as audio.

Sources are pinned by asset/version, processed sequentially in sandbox workers,
and never overwritten. A changed source or revoked edit access stops the batch;
completed results remain available. Choose one result explicitly to continue a
single-asset sequence. The project retains the latest 200 batch previews.

New batch previews also retain the host-assigned item number and total, the input
digest, and bounded captured input identities. The explicitly selected primary
asset is recorded as project input; it does not inherit the connection replaced
by that selection. Private text, answers, media addresses and pixels are not
included in the inspection evidence. Sensitive ports remain redacted.

Flow history includes retained batch items. Selecting a result preserves its
original execution identity and captured inputs alongside the new semantic
selection reference. Older previews without recorded inputs show history as
unavailable. The Flow snapshot reads at most the last 100 batch previews and
returns the newest 30 combined history entries, with incomplete history labeled.

For trusted hosted capability Blocks, each completed item is acknowledged in the
saved project before its request recovery slot is released and the next item
can start. If the response or save is interrupted, **Check submitted run** reads
the original request. A recovered batch item is retained for explicit selection;
it is never automatically applied as the Block's current output. Repeating a
recovery check recognizes an already-retained provider result. Older recoveries
without the bound batch selection receipt are kept as unused results for review.

The platform helpers `batchCandidates`, `batchTargets`, and `runBatch` are included
in the downloadable SDK. `batchTargets(manifest, assets, scope)` accepts:

```js
{kind: 'all-assets'}
{kind: 'selected-assets', assetIds: ['asset-1']}
{kind: 'scene', sceneId: 'scene_1'}
{kind: 'selected-shots', shotIds: ['shot-1', 'shot-2']}
```

Asset references may carry explicit `sceneId`, `shotId`, `label`, and `role`.
Missing or incompatible selections fail before execution. These are interactive
batches over the shared project media index. A separate durable background runner
supports future saved versions from Canvas, Panels, White Board Motion, voiceover
and the editor, using the same identities and scoped context described above.
