fix(agents): update gemini ACP flag and claude-agent-acp package org (#482)
This commit is contained in:
@@ -277,7 +277,7 @@ type InferenceConfig struct {
|
||||
// Supported indicates the agent can do one-shot inference.
|
||||
Supported bool
|
||||
// Command is the ACP command for one-shot inference.
|
||||
// e.g., ["npx", "-y", "@zed-industries/claude-agent-acp"]
|
||||
// e.g., ["npx", "-y", "@agentclientprotocol/claude-agent-acp"]
|
||||
Command Command
|
||||
// ModelFlag is the flag template for specifying the model (e.g., ["--model", "{model}"]).
|
||||
ModelFlag Param
|
||||
|
||||
@@ -14,7 +14,7 @@ var claudeACPLogoLight []byte
|
||||
//go:embed logos/claude_code_dark.svg
|
||||
var claudeACPLogoDark []byte
|
||||
|
||||
const claudeACPPkg = "@zed-industries/claude-agent-acp"
|
||||
const claudeACPPkg = "@agentclientprotocol/claude-agent-acp"
|
||||
|
||||
var (
|
||||
_ Agent = (*ClaudeACP)(nil)
|
||||
@@ -22,7 +22,7 @@ var (
|
||||
_ InferenceAgent = (*ClaudeACP)(nil)
|
||||
)
|
||||
|
||||
// ClaudeACP implements Agent for the Zed Industries claude-agent-acp package.
|
||||
// ClaudeACP implements Agent for the agentclientprotocol claude-agent-acp package.
|
||||
// It speaks the ACP protocol (JSON-RPC 2.0 over stdin/stdout) and wraps the
|
||||
// Claude Agent SDK. Used for A/B comparison against the stream-json Claude Code agent.
|
||||
type ClaudeACP struct {
|
||||
@@ -52,7 +52,7 @@ func (a *ClaudeACP) ID() string { return "claude-acp" }
|
||||
func (a *ClaudeACP) Name() string { return "Claude ACP Agent" }
|
||||
func (a *ClaudeACP) DisplayName() string { return "Claude" }
|
||||
func (a *ClaudeACP) Description() string {
|
||||
return "Anthropic Claude coding agent using the ACP protocol via the Zed Industries bridge."
|
||||
return "Anthropic Claude coding agent using the ACP protocol via the agentclientprotocol bridge."
|
||||
}
|
||||
func (a *ClaudeACP) Enabled() bool { return true }
|
||||
func (a *ClaudeACP) DisplayOrder() int { return 1 }
|
||||
|
||||
@@ -90,7 +90,7 @@ func (a *Gemini) ListModels(ctx context.Context) (*ModelList, error) {
|
||||
}
|
||||
|
||||
func (a *Gemini) BuildCommand(opts CommandOptions) Command {
|
||||
return Cmd("npx", "-y", geminiPkg, "--experimental-acp").
|
||||
return Cmd("npx", "-y", geminiPkg, "--acp").
|
||||
Model(NewParam("--model", "{model}"), opts.Model).
|
||||
Settings(geminiPermSettings, opts.PermissionValues).
|
||||
Build()
|
||||
@@ -99,7 +99,7 @@ func (a *Gemini) BuildCommand(opts CommandOptions) Command {
|
||||
func (a *Gemini) Runtime() *RuntimeConfig {
|
||||
canRecover := false
|
||||
return &RuntimeConfig{
|
||||
Cmd: Cmd("npx", "-y", geminiPkg, "--experimental-acp").Build(),
|
||||
Cmd: Cmd("npx", "-y", geminiPkg, "--acp").Build(),
|
||||
WorkingDir: "{workspace}",
|
||||
Env: map[string]string{},
|
||||
ResourceLimits: ResourceLimits{MemoryMB: 4096, CPUCores: 2.0, Timeout: time.Hour},
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
// geminiCommand is the CLI command for Google Gemini in ACP mode.
|
||||
// Derived from internal/agent/agents/gemini.go.
|
||||
const geminiCommand = "npx -y @google/gemini-cli --experimental-acp"
|
||||
const geminiCommand = "npx -y @google/gemini-cli --acp"
|
||||
|
||||
func TestGemini_BasicPrompt(t *testing.T) {
|
||||
result := RunAgent(t, AgentSpec{
|
||||
|
||||
@@ -25,7 +25,7 @@ type PromptRequest struct {
|
||||
// InferenceConfigDTO is the inference configuration passed from backend to agentctl.
|
||||
type InferenceConfigDTO struct {
|
||||
// Command is the ACP command for one-shot inference.
|
||||
// e.g., ["npx", "-y", "@zed-industries/claude-agent-acp"]
|
||||
// e.g., ["npx", "-y", "@agentclientprotocol/claude-agent-acp"]
|
||||
Command []string `json:"command"`
|
||||
// ModelFlag is the flag template for specifying the model.
|
||||
ModelFlag []string `json:"model_flag,omitempty"`
|
||||
|
||||
@@ -138,7 +138,7 @@ func NewMyAgent() *MyAgent {
|
||||
|
||||
Key implementation notes:
|
||||
|
||||
- **`BuildCommand()`** returns the CLI command for structured protocol mode (the agent communicates via stdin/stdout with a protocol adapter). Include the protocol flag here (e.g. `--experimental-acp`, `--stream-json`).
|
||||
- **`BuildCommand()`** returns the CLI command for structured protocol mode (the agent communicates via stdin/stdout with a protocol adapter). Include the protocol flag here (e.g. `--acp`, `--stream-json`).
|
||||
- **`Runtime()`** returns configuration used when running the agent in Docker or as a standalone process. Set `Protocol` to tell the adapter factory which transport to use.
|
||||
- **`IsInstalled()`** uses the `Detect()` helper with `WithFileExists()` to check for known installation paths. Set `SupportsMCP` and `MCPConfigPaths` on the result.
|
||||
- **`ListModels()`** can return a static list or dynamically query the CLI. Use `execAndParse()` from `helpers.go` for dynamic model discovery.
|
||||
|
||||
Reference in New Issue
Block a user