Skip to content

Commit f7d6a04

Browse files
committed
feat: update API route groups to include versioning in agent, behavior, checkpoint, config, memory, persona, run, skill, tool, and trait handlers
1 parent e7617da commit f7d6a04

12 files changed

Lines changed: 43 additions & 43 deletions

api/agent_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
func (a *API) registerAgentRoutes(router forge.Router) error {
16-
g := router.Group("", forge.WithGroupTags("agents"))
16+
g := router.Group("/v1", forge.WithGroupTags("agents"))
1717

1818
if err := g.POST("/agents", a.createAgent,
1919
forge.WithSummary("Create agent"),

api/behavior_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
func (a *API) registerBehaviorRoutes(router forge.Router) error {
15-
g := router.Group("", forge.WithGroupTags("behaviors"))
15+
g := router.Group("/v1", forge.WithGroupTags("behaviors"))
1616

1717
if err := g.POST("/behaviors", a.createBehavior,
1818
forge.WithSummary("Create behavior"),

api/checkpoint_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
func (a *API) registerCheckpointRoutes(router forge.Router) error {
14-
g := router.Group("", forge.WithGroupTags("checkpoints"))
14+
g := router.Group("/v1", forge.WithGroupTags("checkpoints"))
1515

1616
if err := g.GET("/checkpoints", a.listCheckpoints,
1717
forge.WithSummary("List pending checkpoints"),

api/config_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type UpdateConfigRequest struct {
1919
}
2020

2121
func (a *API) registerConfigRoutes(router forge.Router) error {
22-
g := router.Group("", forge.WithGroupTags("config"))
22+
g := router.Group("/v1", forge.WithGroupTags("config"))
2323

2424
if err := g.GET("/config", a.getConfig,
2525
forge.WithSummary("Get config"),

api/memory_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
func (a *API) registerMemoryRoutes(router forge.Router) error {
14-
g := router.Group("", forge.WithGroupTags("memory"))
14+
g := router.Group("/v1", forge.WithGroupTags("memory"))
1515

1616
if err := g.GET("/agents/:name/memory", a.getConversation,
1717
forge.WithSummary("Get conversation"),

api/persona_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
func (a *API) registerPersonaRoutes(router forge.Router) error {
16-
g := router.Group("", forge.WithGroupTags("personas"))
16+
g := router.Group("/v1", forge.WithGroupTags("personas"))
1717

1818
if err := g.POST("/personas", a.createPersona,
1919
forge.WithSummary("Create persona"),

api/run_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
func (a *API) registerRunRoutes(router forge.Router) error {
14-
g := router.Group("", forge.WithGroupTags("runs"))
14+
g := router.Group("/v1", forge.WithGroupTags("runs"))
1515

1616
if err := g.GET("/runs", a.listRuns,
1717
forge.WithSummary("List runs"),

api/skill_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
func (a *API) registerSkillRoutes(router forge.Router) error {
15-
g := router.Group("", forge.WithGroupTags("skills"))
15+
g := router.Group("/v1", forge.WithGroupTags("skills"))
1616

1717
if err := g.POST("/skills", a.createSkill,
1818
forge.WithSummary("Create skill"),

api/tool_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
func (a *API) registerToolRoutes(router forge.Router) error {
11-
g := router.Group("", forge.WithGroupTags("tools"))
11+
g := router.Group("/v1", forge.WithGroupTags("tools"))
1212

1313
if err := g.GET("/tools", a.listTools,
1414
forge.WithSummary("List tools"),

api/trait_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
func (a *API) registerTraitRoutes(router forge.Router) error {
15-
g := router.Group("", forge.WithGroupTags("traits"))
15+
g := router.Group("/v1", forge.WithGroupTags("traits"))
1616

1717
if err := g.POST("/traits", a.createTrait,
1818
forge.WithSummary("Create trait"),

0 commit comments

Comments
 (0)