daemon.process() branches on ContainerPool != nil: sandboxed tasks publish a taskrun.Request to archie.taskrun.<id> and await the response via the new runViaAgent method, instead of running workflow.Route/workflow.Run locally. Non-container mode is unchanged. Every durable side effect (Store, Forge, git push) already landed via the storerpc/forgerpc/ worktreerpc proxies during archie-agent's run by the time runViaAgent returns — it only parks the task itself on transport/setup failure, never duplicating a terminal state archie-agent's own workflow.Run already recorded. Also fixes a real correctness gap: with concurrent multi-task dispatch (archie-core-u64/g1l) plus containerized archie-agent, a shared queue-group subscription could let one container answer a sibling's taskrun message while having a *different* task's worktree mounted. archie-agent now reads its boot-time task.json and subscribes to its own exact per-task subject when present, falling back to the shared queue group only in dev/pool mode (no task.json). Adds agentexec.ProvidersFromConfig, deduped from cmd/archied's former executionProviders. Closes the archie-core-5zh epic: archie-agent runs an entire task's workflow per invocation instead of one stage per round trip, with all credentials staying daemon-side throughout.
15 lines
559 B
Go
15 lines
559 B
Go
package agentexec
|
|
|
|
import "github.com/samcharles93/archie-core/internal/config"
|
|
|
|
// ProvidersFromConfig converts the daemon's configured LLM providers into
|
|
// the wire-safe Provider map sent to an agent runner. It carries only
|
|
// class/env-var-name/base-URL — never the resolved API key.
|
|
func ProvidersFromConfig(providers map[string]config.Provider) map[string]Provider {
|
|
out := make(map[string]Provider, len(providers))
|
|
for name, p := range providers {
|
|
out[name] = Provider{Class: p.Class, APIKeyEnv: p.APIKeyEnv, BaseURL: p.BaseURL}
|
|
}
|
|
return out
|
|
}
|