Emit prompt build + hydration trace events

t-549.1·WorkTask·
·
·
Parent:t-549·Created2 weeks ago·Updated2 weeks ago

Description

Edit

Emit prompt-build + hydration trace events for Haskell agent runs.

Scope:

  • Add new AgentEvent variants for prompt build start/section/end + hydration stats.
  • Capture section metadata: name/source/token count/content preview.
  • Capture hydration stats: memory counts, bytes/tokens per source, section sizes.
  • Log these events to events.jsonl via Omni.Agent.Events.

Touch points:

  • Omni/Agent/Prompt/Hydrate
  • Omni/Agent/Prompt/Compile
  • Omni/Agent/Interpreter/Sequential or OpBridge
  • Omni/Agent/Trace/Events

Out of scope: CLI/debugger UI.

Timeline (4)

🔄[human]Open → InProgress2 weeks ago
💬[human]2 weeks ago

Emitted prompt build trace events in Sequential interpreter (prompt_build_start/section/end + hydration_stats), added section metadata payloads, and forwarded custom Trace events through OpBridge into Engine EventCustom. Tests: lint Omni/Agent/Interpreter/Sequential.hs Omni/Agent/Op/Bridge.hs; bild --test Omni/Agent/Interpreter/Sequential.hs

🔄[human]InProgress → Done2 weeks ago