Object-shaped inputs like data, parser-options, llm-options, and executor-options currently need to be provided as JSON strings:
with:
data: |
{
"input": "hello",
"count": 3
}
This works, but it feels awkward inside GitHub Actions YAML and makes simple examples look more technical than they need to be.
Proposal: accept YAML-formatted object strings for the same inputs, while keeping JSON support unchanged.
with:
data: |
input: hello
count: 3
This would still be parsed from a string, because GitHub Actions with: inputs are scalar strings. It would not support true nested with: maps like:
Suggested behavior:
- Empty input still defaults to
{}.
- Valid JSON object strings continue to work.
- Valid YAML object strings also work.
- Arrays/scalars are rejected with a clear error.
- Applies consistently to
data, parser-options, llm-options, and executor-options.
Why:
- Makes the action feel more native to GitHub Actions.
- Improves copy/paste ergonomics for non-expert users.
- Supports the fast setup value prop without breaking existing workflows.
- Runtime impact should be negligible because the YAML parser is bundled into the action and input parsing is tiny compared with the LLM call.
Implementation sketch:
- Add an explicit YAML parser dependency, likely
js-yaml.
- Replace
readJsonObject with readObjectInput.
- Try
JSON.parse first, then YAML parse.
- Keep the existing plain-object validation.
- Add tests for JSON, YAML object strings, empty defaults, and rejected arrays/scalars.
- Update README examples to prefer YAML blocks while noting JSON is also supported.
Object-shaped inputs like
data,parser-options,llm-options, andexecutor-optionscurrently need to be provided as JSON strings:This works, but it feels awkward inside GitHub Actions YAML and makes simple examples look more technical than they need to be.
Proposal: accept YAML-formatted object strings for the same inputs, while keeping JSON support unchanged.
This would still be parsed from a string, because GitHub Actions
with:inputs are scalar strings. It would not support true nestedwith:maps like:Suggested behavior:
{}.data,parser-options,llm-options, andexecutor-options.Why:
Implementation sketch:
js-yaml.readJsonObjectwithreadObjectInput.JSON.parsefirst, then YAML parse.