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

+4 -4
View File
@@ -48,16 +48,16 @@ func buildKiroIdeCommand(runtimePath, scriptPath string) (string, error) {
)
}
if runtime.GOOS == "windows" {
return codexWindowsCommand(runtimePath, scriptPath), nil
return encodedWindowsCommand(runtimePath, scriptPath), nil
}
return quotePOSIXArgument(runtimePath) + " " + quotePOSIXArgument(scriptPath), nil
}
func parseKiroIdeCommand(command string) (string, string, bool) {
if runtime.GOOS == "windows" {
return parseCodexWindowsCommand(command)
return parseEncodedWindowsCommand(command)
}
return parseCodexPOSIXCommand(command)
return parsePOSIXCommand(command)
}
func kiroIdeRuntimeReferenceForCommand(
@@ -66,7 +66,7 @@ func kiroIdeRuntimeReferenceForCommand(
) (*kiroIdeRuntimeReference, error) {
runtimePath, scriptPath, ok := parseKiroIdeCommand(command)
if !ok || !filepath.IsAbs(runtimePath) || !filepath.IsAbs(scriptPath) ||
!isCodexNodeExecutable(runtimePath) ||
!isNodeExecutable(runtimePath) ||
!sameKiroIdeFileName(filepath.Base(scriptPath), scriptName) {
return nil, nil
}