Skip to content

Commit b49bb4b

Browse files
authored
Merge pull request #178 from dgageot/unsupported-agent-file
Add error for unsupported agent files
2 parents 7017138 + cff375a commit b49bb4b

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

pkg/oci/build.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ func BuildDockerImage(ctx context.Context, agentFilePath, dockerImageName string
3232
return err
3333
}
3434

35+
// Make sure the config is compatible with `cagent build`
36+
for _, agent := range cfg.Agents {
37+
for i := range agent.Toolsets {
38+
toolSet := agent.Toolsets[i]
39+
40+
if toolSet.Type == "mcp" && toolSet.Command != "" {
41+
return fmt.Errorf("toolset with command \"%s\" can't be used in `cagent build`", toolSet.Command)
42+
}
43+
}
44+
}
45+
3546
// Analyze the config to find which secrets are needed
3647
modelNames := config.GatherModelNames(cfg)
3748
mcpServers := config.GatherMCPServerReferences(cfg)

0 commit comments

Comments
 (0)