Skip to content

[CLI] Add binary-safe output mode for actions execute #77

@ameet

Description

@ameet

Summary

one --agent actions execute needs a binary-safe way to return non-JSON payloads such as exported files, downloads, or raw byte responses.

Problem

Some actions return raw bytes instead of JSON. In --agent mode, that currently forces agent callers to infer whether stdout should be treated as text, bytes, or some custom envelope.

That creates a few avoidable failure modes:

  • binary responses can be corrupted if written through a text path
  • callers have to guess from the action docs whether a response is binary
  • there is no obvious one-command path to save the result directly to disk

Requested behavior

A good solution could be any of the following:

  • add --output <path> to actions execute so binary/text responses can be streamed directly to a file
  • include explicit response metadata in --agent mode such as contentType, isBinary, and encoding
  • for binary responses in --agent mode, return a documented envelope instead of raw stdout bytes

Why this would help

This would make file export/download actions much safer to automate from agents, especially for platforms like cloud storage, docs, spreadsheets, or media APIs.

It also lowers the chance that agent authors silently corrupt files by handling a byte response as UTF-8 text.

Nice-to-have

If --output is added, it would be helpful if actions knowledge could clearly indicate that an action is expected to return raw bytes so the agent can choose the right execution mode up front.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions