docs: fix incorrect field naming restrictions in base-action/action.yml

Fixed outdated documentation that incorrectly stated field naming
restrictions that don't exist in the implementation.

Changes:
- Removed incorrect claim about field naming requirements (letter/underscore start)
- Removed incorrect claim about special character sanitization
- Clarified that field names can use any valid JSON property name
- Updated access pattern to show fromJSON() usage
- Clarified 1MB limit applies to entire structured_output string, not per-field

The implementation simply does JSON.stringify(result.structured_output)
without any sanitization, so any valid JSON property name works (including
hyphens like "test-result", as validated by integration tests).

Addresses review comment: https://github.com/anthropics/claude-code-action/pull/683#discussion_r2539749593

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
inigo
2025-11-18 14:22:44 -08:00
parent f551cdf070
commit bf8f85ca9d

View File

@@ -74,14 +74,14 @@ inputs:
json_schema: json_schema:
description: | description: |
JSON schema for structured output validation. Claude must return JSON matching this schema JSON schema for structured output validation. Claude must return JSON matching this schema
or the action will fail. Outputs are automatically set for each field. or the action will fail. All fields are returned in a single structured_output JSON string.
Access outputs via: steps.<step-id>.outputs.<field_name> Access outputs via: fromJSON(steps.<step-id>.outputs.structured_output).<field_name>
Limitations: Limitations:
- Field names must start with letter or underscore (A-Z, a-z, _) - All fields are returned in a single structured_output JSON string
- Special characters in field names are replaced with underscores - Field names can use any valid JSON property name (including hyphens, special characters, etc.)
- Each output is limited to 1MB - The entire structured_output string is limited to 1MB
required: false required: false
default: "" default: ""