Skip to content

Conversation

@raphael
Copy link
Member

@raphael raphael commented Dec 8, 2025

Summary

Add interfaces that allow custom expression types to use standard DSL functions, enabling goa-ai and other extensions to reuse Goa's DSL.

New Interfaces

  • TitleHolder - for expressions that can receive a title via Title()
  • VersionHolder - for expressions that can receive a version via Version()
  • URLHolder - for expressions that can receive a URL via URL()
  • DescriptionHolder - for expressions that can receive a description via Description()
  • TimeoutHolder - for expressions that can receive a timeout duration via Timeout()
  • SecurityHolder - for expressions that can receive security requirements via Security()

Updated DSL Functions

  • Title(), Version(), URL() in dsl/api.go
  • Description() in dsl/description.go
  • Timeout() extended to accept an optional duration string argument
  • Security() in dsl/security.go

Use Case

This enables goa-ai to define custom expression types (registries, agents, toolsets) that can use Goa's standard DSL functions instead of defining duplicates.

Add interfaces that allow custom expression types to use standard DSL
functions:

- TitleHolder, VersionHolder, URLHolder in expr/api.go
- DescriptionHolder, TimeoutHolder in expr/api.go
- SecurityHolder in expr/security.go

Update DSL functions to check for these interfaces:
- Title(), Version(), URL() in dsl/api.go
- Description() in dsl/description.go
- Timeout() extended to accept duration string for TimeoutHolder
- Security() in dsl/security.go

This enables goa-ai and other extensions to reuse Goa's DSL functions
for their custom expression types (registries, agents, etc.).
@raphael raphael merged commit 32b39f6 into v3 Dec 8, 2025
6 checks passed
@raphael raphael deleted the feat/dsl-holder-interfaces branch December 8, 2025 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants