refactor(agent): runtimeAvailable uses core/process primitive
Replace os/exec.LookPath with process.Program.Find() — keeps dispatch runtime detection in line with the repo's process-execution convention and removes the os/exec import from pkg/agentic/dispatch.go. Convergence-pass from spark-medium — no new features found on this sample, confirms core/agent and go-store RFC parity is complete. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
5ef2aba27b
commit
30cc4239d8
1 changed files with 2 additions and 6 deletions
|
|
@ -4,7 +4,6 @@ package agentic
|
|||
|
||||
import (
|
||||
"context"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
|
|
@ -256,11 +255,8 @@ func runtimeAvailable(name string) bool {
|
|||
default:
|
||||
return false
|
||||
}
|
||||
binary := containerRuntimeBinary(name)
|
||||
if _, err := exec.LookPath(binary); err == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
program := process.Program{Name: containerRuntimeBinary(name)}
|
||||
return program.Find() == nil
|
||||
}
|
||||
|
||||
// resolveContainerRuntime returns the concrete runtime identifier for the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue