Skip to content

Commit 3ff45ab

Browse files
authored
Merge pull request #268 from dgageot/remove-dead-code-2
Remove dead code
2 parents a904d5c + 7fc45db commit 3ff45ab

6 files changed

Lines changed: 0 additions & 355 deletions

File tree

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69
135135
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
136136
github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4=
137137
github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
138-
github.com/mark3labs/mcp-go v0.40.0 h1:M0oqK412OHBKut9JwXSsj4KanSmEKpzoW8TcxoPOkAU=
139-
github.com/mark3labs/mcp-go v0.40.0/go.mod h1:T7tUa2jO6MavG+3P25Oy/jR7iCeJPHImCZHRymCn39g=
140138
github.com/mark3labs/mcp-go v0.40.1-0.20250919152514-dd0058cb6537 h1:bI/2B+eDqHiwO0pPZCjTGfyQGGvsyNEONOHOlFOynNw=
141139
github.com/mark3labs/mcp-go v0.40.1-0.20250919152514-dd0058cb6537/go.mod h1:T7tUa2jO6MavG+3P25Oy/jR7iCeJPHImCZHRymCn39g=
142140
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=

pkg/oci/build.go

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"time"
1515

1616
"github.com/docker/cagent/pkg/config"
17-
v2 "github.com/docker/cagent/pkg/config/v2"
1817
)
1918

2019
//go:embed Dockerfile.template
@@ -40,31 +39,6 @@ func BuildDockerImage(ctx context.Context, agentFilePath, dockerImageName string
4039
return err
4140
}
4241

43-
// Collect information about MCP servers
44-
servers := Servers{
45-
MCPServers: map[string]Server{},
46-
}
47-
48-
// Make sure the config is compatible with `cagent build`
49-
for _, agent := range cfg.Agents {
50-
for i := range agent.Toolsets {
51-
toolSet := agent.Toolsets[i]
52-
if toolSet.Type != "mcp" {
53-
continue
54-
}
55-
56-
if toolSet.Command != "" {
57-
return fmt.Errorf("toolset with command \"%s\" can't be used in `cagent build`", toolSet.Command)
58-
}
59-
60-
server, err := mcpToolSetToServer(ctx, &toolSet)
61-
if err != nil {
62-
return err
63-
}
64-
servers.MCPServers[toolSet.Ref] = server
65-
}
66-
}
67-
6842
// Analyze the config to find which secrets are needed
6943
modelNames := config.GatherModelNames(cfg)
7044
mcpServers := config.GatherMCPServerReferences(cfg)
@@ -121,21 +95,3 @@ func BuildDockerImage(ctx context.Context, agentFilePath, dockerImageName string
12195

12296
return buildCmd.Run()
12397
}
124-
125-
func mcpToolSetToServer(ctx context.Context, toolSet *v2.Toolset) (Server, error) {
126-
args, err := mcpServerArgs(ctx, toolSet.Ref, toolSet.Config)
127-
if err != nil {
128-
return Server{}, err
129-
}
130-
131-
// TODO(dga): support the config part (probably by appending to the args or by adding env variables)
132-
// - type: mcp
133-
// ref: docker:ast-grep
134-
// config:
135-
// path: .
136-
// TODO(dga): What's the actual command?
137-
return Server{
138-
Command: "docker",
139-
Args: args,
140-
}, nil
141-
}

pkg/oci/build_test.go

Lines changed: 0 additions & 80 deletions
This file was deleted.

pkg/oci/catalog.go

Lines changed: 0 additions & 113 deletions
This file was deleted.

pkg/oci/image.go

Lines changed: 0 additions & 14 deletions
This file was deleted.

pkg/oci/servers.go

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
 (0)