chore(go): audit providers kirocli kiroide opencode

Move Kiro IDE onto managed_runtime.go and shell_command.go, share
cloneJSONObject across providers, make OpenCode status verify the managed
runtime contract instead of any hook.js, propagate script removal errors,
and build the legacy runtime config through buildManagedRuntimeConfig.

Claude-Session: https://claude.ai/code/session_01Agoc9bRVE9KL7mmWtey9Vq
This commit is contained in:
雷电芽衣 committed 2026-09-03 02:32:20 -04:00
1 parent 34ff4c1ea8
commit 96489cd051
20 files changed
+185 -650

No files matched your search

+2 -2
View File
@@ -164,7 +164,7 @@ func TestKiroIdeStatusRequiresUniqueExactPairAndRuntimeIntegrity(t *testing.T) {
document = readKiroIdeObject(t, fixture.configPath)
document["hooks"] = append(
requireArray(t, document["hooks"]),
cloneKiroIdeObject(findKiroIdeHook(t, document, kiroIdeGuardName)),
cloneJSONObject(findKiroIdeHook(t, document, kiroIdeGuardName)),
)
writeKiroIdeJSON(t, fixture.configPath, document)
assertStatus(false, false)
@@ -283,7 +283,7 @@ func TestKiroIdeStatusRejectsExtraOrphanAndStaleRuntimeCommands(t *testing.T) {
name = "node.exe"
}
staleNode := filepath.Join(fixture.homeDir, "old-node", name)
command, err := buildKiroIdeCommand(staleNode, fixture.guardPath)
command, err := buildEncodedCommand("Kiro IDE", staleNode, fixture.guardPath)
if err != nil {
t.Fatalf("build stale Kiro IDE command: %v", err)
}