feat(agentexec,workflow): surface tool calls on the task timeline
archie-core-467 wired tool-call visibility into the interactive chat gateway, but a workflow task's own transcript never showed what its tools actually did -- only stage/agent-finish events existed, so there was no way to confirm an agent's summary matched what it really ran. Adds a ToolCallReporter, invoked once per completed call from toolExecute (the single choke point every tool call passes through before reaching a model), reported via a new ToolSetOptions.OnToolCall hook. Runner.Run grows a report parameter to carry it in: InProcessRunner wires it through, since it executes in the same process as its tools; SubprocessRunner and NATSRunner accept and ignore it, since their tool calls happen in a different process with nothing here to observe them. The workflow engine turns each report into a tool_call event on the task's own Bus (agent.go, implement.go), riding the same NATS event-forwarding archie-core-518 already built to get container events onto the daemon's timeline. Scoped to the central tool registry (read/write/edit/grep/shell/...) built via BuildToolSet; capture tools (structured finish output) and run_go_script build their ToolSet entries directly and are not yet covered.
This commit is contained in:
1 parent
8f73c1febb
commit
39d8b067ec
18 files changed
+250
-42
No files matched your search
@@ -26,7 +26,9 @@ type SubprocessRunner struct {
|
||||
Providers map[string]Provider
|
||||
}
|
||||
|
||||
func (r *SubprocessRunner) Run(ctx context.Context, workspace string, req Request) (Result, error) {
|
||||
// Run ignores report: the subprocess executes tools in its own process, so
|
||||
// there is nothing here to observe a call as it happens.
|
||||
func (r *SubprocessRunner) Run(ctx context.Context, workspace string, req Request, _ ToolCallReporter) (Result, error) {
|
||||
providerName, _, ok := strings.Cut(req.Model, "/")
|
||||
if !ok || providerName == "" {
|
||||
return Result{}, fmt.Errorf("agent model %q must be provider/model", req.Model)
|
||||
|
||||
Reference in new issue
Block a user