From 46372b51d5e41a092c386c963954ae1ebdd85f34 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Mon, 16 Nov 2026 12:04:41 +1100 Subject: [PATCH] feat(runs,ui): the trail shows each model request and response, connector calls and delivery attempts The run trail exposes the model request the journal recorded and its finish reason. Each model and tool step opens a Request and a Response, and each decision lists the connector calls behind it. The composer lists each delivery attempt with its outcome and response. --- modules/runs/trail.go | 16 ++++++--- ui/src/archie/ActionTrailView.vue | 20 +++++++++++ ui/src/archie/ComposerView.vue | 15 ++++++++ ui/src/archie/RunView.vue | 57 ++++++++++++++++++++++++------- ui/src/archie/api.ts | 25 ++++++++++++++ 5 files changed, 115 insertions(+), 18 deletions(-) diff --git a/modules/runs/trail.go b/modules/runs/trail.go index 7880576e3..d3977b880 100644 --- a/modules/runs/trail.go +++ b/modules/runs/trail.go @@ -101,11 +101,16 @@ type TrailEntry struct { Reasoning string `json:"reasoning,omitzero"` ToolCalls []ToolCallView `json:"tool_calls,omitzero"` Usage *chat.Usage `json:"usage,omitzero"` - Input string `json:"input,omitzero"` - Output string `json:"output,omitzero"` - Value jsontext.Value `json:"value,omitzero"` - Error string `json:"error,omitzero"` - Unknown bool `json:"unknown,omitzero"` + // Request is the model request exactly as it was sent: the messages, the + // tools offered and the sampling settings. + Request jsontext.Value `json:"request,omitzero"` + // FinishReason is the wire finish reason of a model call. + FinishReason string `json:"finish_reason,omitzero"` + Input string `json:"input,omitzero"` + Output string `json:"output,omitzero"` + Value jsontext.Value `json:"value,omitzero"` + Error string `json:"error,omitzero"` + Unknown bool `json:"unknown,omitzero"` } // ToolCallView is a tool call a model asked for. @@ -331,6 +336,7 @@ func entry(s store.Recorded) TrailEntry { if je.Kind == agentloop.EntryCompact { e.Kind = "compaction" } + e.Request, e.FinishReason = je.Request, je.FinishReason usage := je.Usage e.Usage = &usage if je.Message != nil { diff --git a/ui/src/archie/ActionTrailView.vue b/ui/src/archie/ActionTrailView.vue index 520d736be..52558e020 100644 --- a/ui/src/archie/ActionTrailView.vue +++ b/ui/src/archie/ActionTrailView.vue @@ -52,6 +52,26 @@ const ceilingTone = (v: Verdict): Tone => (v.failed ? "warn" : "secondary"); {{ json(decision.action.input) }} +
+ Connector calls +
+
+ {{ c.connector }} {{ c.method }} + Request + + {{ json(c.request) }} + + + {{ c.error }} +
+
+
+