feat(remote): surface a script delivery failure on every caller surface

Merged
TH
13h ago
+563-15

Part of #4564; batch step delivery moves to #4595.

An action that records a remote script version keeps its success when that version cannot reach the caller file. The wire already answered scriptDeliveryFailure; nothing above it passed the field on, so a caller read a stale file as current.

readScriptDeliveryFailure in the kernel reads the field from a response, and readScriptDeliveryDisclosure pairs it with the warning written beside it. Every result that can carry a script version now spreads both: the SDK open, sessions.close, apps.close, snapshot and screenshot results, the CLI human output and --json payload, and the MCP tool text and structured content. The SDK close also keeps the response's warnings, which the CLI human output prints.

remote_script_batch_close_unsupported stands unchanged: a batch delivers no script versions from its steps, so closing an armed remote recording inside one stays refused until #4595 gives the daemon one receipt to deliver from.

Tests: a table covers each serializer, including that plain input yields neither field, and the provider scenario discloses a failed final download on the SDK result, the CLI --json and MCP. Production code is 9 files, +131/-7.

🤖 Generated with Claude Code