Repository navigation
Labels
enhancementNew feature or request
Description
Problem
The AWF config file schema is currently defined only as a TypeScript interface (AwfFileConfig in src/config-file.ts) with ad-hoc runtime validation. This has several drawbacks:
- No external linkability — consumers like the
gh-awcompiler cannot reference or validate config passed to AWF without duplicating the schema definition. - No IDE support — users writing
.awf.ymlor.awf.jsonconfig files get no autocomplete or inline validation because there is no published$schemaURL. - No versioning contract — when new fields are added (e.g.,
apiProxy.modelsfor model aliasing), downstream tools have no way to detect feature availability or validate against a specific AWF version.
Proposal
Publish a JSON Schema for the AWF config file that is:
- Versioned — each AWF release publishes a schema at a stable URL (e.g.,
https://github.com/github/gh-aw-firewall/releases/download/v0.X.Y/awf-config.schema.json) - Generated from source — derived from the
AwfFileConfiginterface to stay in sync (e.g., usingtypescript-json-schemaorzod-to-json-schema) - Linkable via
$schema— users can add"$schema": "https://..."to their config for IDE validation - Consumable by gh-aw — the compiler can fetch the schema at compile time to validate the
sandbox.configblock in workflow frontmatter against the target AWF version
Implementation Notes
- Consider generating from the existing
AwfFileConfiginterface insrc/config-file.ts:5-67 - The schema should include descriptions for each field (currently only in JSDoc on
WrapperConfiginsrc/types.ts) - Publish as a release asset and/or at a
latestURL for convenience - The
$schemafield is already allowed in the interface (line 6) but points nowhere today gh-awcould use this to validatesandbox.configat compile time, catching typos and unsupported fields before runtime
Benefits
- gh-aw compiler integration: validate config at compile time instead of failing at runtime
- IDE autocomplete: VS Code, JetBrains, etc. pick up JSON Schema for
.json/.yamlfiles - Documentation: schema serves as machine-readable API docs for the config surface
- Breaking change detection: diff schemas between versions to identify incompatibilities
Reacted by Copilot
Metadata
Metadata
Labels
enhancementNew feature or request
Activity
github-actions commentedon May 1, 2026
👋 Hello! I noticed this issue might be related to an existing issue:
Issue #2017 explicitly included a JSON Schema (
docs/awf-config.schema.json) as one of its deliverables, along with$schemaURL support for IDE autocomplete — which overlaps significantly with what this issue proposes.It's possible the JSON Schema deliverable from #2017 was already implemented (the issue is closed as completed), or it may have been deferred. If the schema wasn't published as part of that work, this issue makes sense as a follow-up focused specifically on versioning and
gh-awcompiler integration. You may want to reference #2017 for prior context.This is an automated message from the issue duplication detector.
feat: validate config files against published JSON Schema at runtime (#…