24 lines
917 B
Go
24 lines
917 B
Go
package agent
|
|
|
|
func init() { Register(&claude{}) }
|
|
|
|
// claude integrates Anthropic's Claude Code CLI (npm package
|
|
// `@anthropic-ai/claude-code` → `claude` on PATH). MCP config is
|
|
// passed via --mcp-config <path> in the canonical `.mcp.json` shape
|
|
// (`{"mcpServers": ...}`) — same shape Copilot uses.
|
|
//
|
|
// We also forbid ANTHROPIC_API_KEY in the child env so an
|
|
// inadvertently-set personal key can't override the broker-managed
|
|
// session. (Phase 2 will surface a proper Anthropic auth grant.)
|
|
//
|
|
// The per-CLI quirks (flag shape, env scrubbing) live in the shared
|
|
// "claude" backend; this type is just the built-in registration.
|
|
type claude struct{}
|
|
|
|
func (claude) Name() string { return "claude" }
|
|
func (claude) Description() string { return "Anthropic Claude Code CLI" }
|
|
|
|
func (c claude) Spawn(ctx Context, args []string) error {
|
|
return backends["claude"].spawn(c.Name(), "claude", ctx, args)
|
|
}
|