messages

Solid

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

AI & Automation 4,819 stars 466 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 message type to the safe-output messages system so it works in frontmatter, compiler parsing, JavaScript, and bundling. ## Overview The messages system lets workflow authors customize safe-output messages. Message flow: 1. **Frontmatter** (YAML) → 2. **JSON Schema** → 3. **Go Compiler** → 4. **JavaScript Modules** → 5. **Bundler** ## 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 (e.g., `my-new-message`) - Document all available placeholders in the description - Provide helpful examples - Run `make build` after changes (schema is embedded in binary) ## Step 2: Update Go Struct Add the new field to `SafeOutputMessagesConfig` in `pkg/workflow/compiler.go`: ```go type SafeOutputMessagesConfig struct { // ... existing fields ... MyNewMessage string `yaml:"my-new-message,omitempty" json:"myNewMessage,omitempty"` // Description of the message } ``` **Key points:** - Use `CamelCase` for Go field name - Use `kebab-case` for YAML tag (matches frontmatte...

Details

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

Similar Skills

Semantically similar based on skill content — not just same category