messages

Featured

Add new safe-output message types and wire validation/rendering.

AI & Automation 5,125 stars 539 forks Updated today MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Adding New Message Types Guide Use this guide to add a new safe-output message type so it works in the current gh-aw pipeline: frontmatter → schema → Go compiler → JavaScript modules → action/workflow build output. ## Overview The messages system lets workflow authors customize safe-output messages. The current architecture does not rely on the old `pkg/workflow/js.go` embedding registry for runtime shipping. Current flow: 1. **Frontmatter** (YAML) 2. **JSON Schema** 3. **Go Compiler** 4. **JavaScript module** under `pkg/workflow/js/` or `actions/setup/js/` 5. **Action/workflow bundle generation** via `make actions-build` or the relevant workflow build path ## Step 1: Update JSON Schema Add the new message field to `pkg/parser/schemas/main_workflow_schema.json` in the `messages` object: ```json { "messages": { "properties": { "my-new-message": { "type": "string", "description": "Description of when this message is used. Available placeholders: {placeholder1}, {placeholder2}.", "examples": [ "Example message with {placeholder1}" ] } } } } ``` **Key points:** - Use `kebab-case` for the YAML field name (for example `my-new-message`) - Document placeholders in the description - Provide helpful examples - Rebuild the schema-backed binary or run the relevant compile checks after changes ## Step 2: Update Go Struct Add the field to `SafeOutputMessagesConfig` in `pkg/workflow/compiler.go`: ```go type SafeOutputMessagesConfig...

Details

Author
github
Repository
github/gh-aw
Created
1 years ago
Last Updated
today
Language
Go
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category