chore(go): audit providers claudecode codex cursor gemini

Add managed_runtime.go (paths, config validation, identity, runtime file
changes, status checks) and shell_command.go (quoting, PowerShell
encoding, command parsing) and move the four providers onto them.

Claude-Session: https://claude.ai/code/session_01Agoc9bRVE9KL7mmWtey9Vq
This commit is contained in:
雷电芽衣 committed 2026-09-03 01:42:27 -04:00
1 parent c1caed3d42
commit a7fc75bf6b
39 files changed
+914 -2018

No files matched your search

+5 -4
View File
@@ -10,8 +10,7 @@ type GeminiPlugin struct {
rename renameFunc
}
// ManagesGuardRuntime reports that Gemini commits both generated runtimes and
// the user settings document through one transaction.
// ManagesGuardRuntime reports that the guard is committed with the audit runtime.
func (p *GeminiPlugin) ManagesGuardRuntime() bool {
return true
}
@@ -92,13 +91,14 @@ func (p *GeminiPlugin) Install(config InstallConfig) error {
if err != nil {
return err
}
if err := writeGeminiChanges(
if err := writeManagedChanges(
changes,
"Install Gemini CLI hooks",
p.rename,
paths.runtimeRoot,
paths.agentDirectory,
filepath.Dir(document.filePath),
"Gemini CLI configuration directory",
); err != nil {
return err
}
@@ -120,13 +120,14 @@ func (p *GeminiPlugin) Uninstall(agentID string) error {
if err != nil {
return err
}
return writeGeminiChanges(
return writeManagedChanges(
[]*fileChange{change},
"Uninstall Gemini CLI hooks",
p.rename,
"",
"",
filepath.Dir(document.filePath),
"Gemini CLI configuration directory",
)
}