Skip to content

Commit 98936b6

Browse files
committed
Rename cagent to docker-agent
Signed-off-by: David Gageot <david.gageot@docker.com>
1 parent 54977e9 commit 98936b6

4 files changed

Lines changed: 9 additions & 10 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ jobs:
125125
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
126126
with:
127127
images: |
128-
docker/cagent
129128
docker/docker-agent
130129
tags: |
131130
type=semver,pattern={{version}}

‎pkg/a2a/adapter.go‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717
"github.com/docker/cagent/pkg/team"
1818
)
1919

20-
// newCAgentAdapter creates a new ADK agent adapter from a docker agent team and agent name
21-
func newCAgentAdapter(t *team.Team, agentName string) (agent.Agent, error) {
20+
// newDockerAgentAdapter creates a new ADK agent adapter from a docker agent team and agent name
21+
func newDockerAgentAdapter(t *team.Team, agentName string) (agent.Agent, error) {
2222
a, err := t.Agent(agentName)
2323
if err != nil {
2424
return nil, fmt.Errorf("failed to get agent %s: %w", agentName, err)
@@ -30,13 +30,13 @@ func newCAgentAdapter(t *team.Team, agentName string) (agent.Agent, error) {
3030
Name: agentName,
3131
Description: desc,
3232
Run: func(ctx agent.InvocationContext) iter.Seq2[*adksession.Event, error] {
33-
return runCAgent(ctx, t, agentName, a)
33+
return runDockerAgent(ctx, t, agentName, a)
3434
},
3535
})
3636
}
3737

38-
// runCAgent executes a docker agent and returns ADK session events
39-
func runCAgent(ctx agent.InvocationContext, t *team.Team, agentName string, a *dagent.Agent) iter.Seq2[*adksession.Event, error] {
38+
// runDockerAgent executes a docker agent and returns ADK session events
39+
func runDockerAgent(ctx agent.InvocationContext, t *team.Team, agentName string, a *dagent.Agent) iter.Seq2[*adksession.Event, error] {
4040
return func(yield func(*adksession.Event, error) bool) {
4141
// Extract user message from the ADK context
4242
userContent := ctx.UserContent()

‎pkg/a2a/adapter_test.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/docker/cagent/pkg/teamloader"
1212
)
1313

14-
func TestNewCAgentAdapter(t *testing.T) {
14+
func TestNewDockerAgentAdapter(t *testing.T) {
1515
t.Setenv("OPENAI_API_KEY", "DUMMY")
1616

1717
agentSource, err := config.Resolve("testdata/basic.yaml", nil)
@@ -23,7 +23,7 @@ func TestNewCAgentAdapter(t *testing.T) {
2323
require.NoError(t, team.StopToolSets(t.Context()))
2424
}()
2525

26-
adapter, err := newCAgentAdapter(team, "root")
26+
adapter, err := newDockerAgentAdapter(team, "root")
2727

2828
require.NoError(t, err)
2929
assert.Equal(t, "root", adapter.Name())
@@ -42,7 +42,7 @@ func TestNewCAgentAdapter_NonExistent(t *testing.T) {
4242
require.NoError(t, team.StopToolSets(t.Context()))
4343
}()
4444

45-
_, err = newCAgentAdapter(team, "nonexistent")
45+
_, err = newDockerAgentAdapter(team, "nonexistent")
4646

4747
assert.Contains(t, err.Error(), "failed to get agent")
4848
}

‎pkg/a2a/server.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func Run(ctx context.Context, agentFilename, agentName string, runConfig *config
5454
}
5555
}()
5656

57-
adkAgent, err := newCAgentAdapter(t, agentName)
57+
adkAgent, err := newDockerAgentAdapter(t, agentName)
5858
if err != nil {
5959
return fmt.Errorf("failed to create ADK agent adapter: %w", err)
6060
}

0 commit comments

Comments
 (0)