Drop unused expandHome and standardizeJSONC, share the runtime base URL validator between the guard and audit templates, and trim comments. Claude-Session: https://claude.ai/code/session_01Agoc9bRVE9KL7mmWtey9Vq
66 lines
2.5 KiB
Go
66 lines
2.5 KiB
Go
package plugins
|
|
|
|
// AgentRegistryEntry describes a supported agent integration.
|
|
type AgentRegistryEntry struct {
|
|
Name string
|
|
ConfigDir string // ~ means home dir; no ~ means project-relative
|
|
ConfigFile string
|
|
}
|
|
|
|
// SupportedAgents is the canonical registry of all supported agent integrations.
|
|
var SupportedAgents = map[string]AgentRegistryEntry{
|
|
"augment": {Name: "Augment Code CLI", ConfigDir: "~/.augment", ConfigFile: "settings.json"},
|
|
"claudecode": {Name: "Claude Code", ConfigDir: "$CLAUDE_CONFIG_DIR", ConfigFile: "settings.json"},
|
|
"codex": {Name: "OpenAI Codex", ConfigDir: "~/.codex", ConfigFile: "hooks.json"},
|
|
"cline": {Name: "Cline", ConfigDir: "~/.cline/hooks", ConfigFile: "PreToolUse.mjs"},
|
|
"cursor": {Name: "Cursor", ConfigDir: "~/.cursor", ConfigFile: "hooks.json"},
|
|
"droid": {Name: "Factory Droid", ConfigDir: "~/.factory", ConfigFile: "hooks.json"},
|
|
"gemini": {Name: "Gemini CLI", ConfigDir: "~/.gemini", ConfigFile: "settings.json"},
|
|
"grok": {Name: "Grok Build", ConfigDir: "~/.grok/hooks", ConfigFile: "elydora-audit.json"},
|
|
"kirocli": {Name: "Kiro CLI", ConfigDir: "~/.kiro/hooks", ConfigFile: "elydora-audit.json"},
|
|
"kiroide": {Name: "Kiro IDE", ConfigDir: ".kiro/hooks", ConfigFile: "elydora-audit.json"},
|
|
"kimi": {Name: "Kimi Code", ConfigDir: "~/.kimi-code", ConfigFile: "config.toml"},
|
|
"opencode": {Name: "OpenCode", ConfigDir: "~/.config/opencode/plugins", ConfigFile: "elydora-audit.mjs"},
|
|
"copilot": {Name: "GitHub Copilot CLI", ConfigDir: "~/.copilot/hooks", ConfigFile: "elydora-audit.json"},
|
|
"letta": {Name: "Letta Code", ConfigDir: "~/.letta", ConfigFile: "settings.json"},
|
|
"qwen": {Name: "Qwen Code", ConfigDir: "~/.qwen", ConfigFile: "settings.json"},
|
|
}
|
|
|
|
// NewPlugin returns the plugin for an agent name, or nil when unsupported.
|
|
func NewPlugin(agentName string) AgentPlugin {
|
|
switch agentName {
|
|
case "augment":
|
|
return &AugmentPlugin{}
|
|
case "claudecode":
|
|
return &ClaudeCodePlugin{}
|
|
case "codex":
|
|
return &CodexPlugin{}
|
|
case "cline":
|
|
return &ClinePlugin{}
|
|
case "cursor":
|
|
return &CursorPlugin{}
|
|
case "droid":
|
|
return &DroidPlugin{}
|
|
case "gemini":
|
|
return &GeminiPlugin{}
|
|
case "grok":
|
|
return &GrokPlugin{}
|
|
case "kirocli":
|
|
return &KiroCliPlugin{}
|
|
case "kiroide":
|
|
return &KiroIdePlugin{}
|
|
case "kimi":
|
|
return &KimiPlugin{}
|
|
case "opencode":
|
|
return &OpenCodePlugin{}
|
|
case "copilot":
|
|
return &CopilotPlugin{}
|
|
case "letta":
|
|
return &LettaPlugin{}
|
|
case "qwen":
|
|
return &QwenPlugin{}
|
|
default:
|
|
return nil
|
|
}
|
|
}
|