Raxol.Playground.Demos.HarnessToolBlocksDemo (Raxol v2.6.1)

View Source

Playground demo: agent-harness tool-call/tool-result blocks + taint badge.

Exercises the three Raxol.UI.Components.Harness modules directly (real init/1 + render/2, and handle_event/3 for the collapsible result):

  • A ToolCallBlock that transitions :running -> :done on a tick subscription (spinner glyph while running, green check on completion; [r] replays it).
  • A trusted ToolResultBlock with short output (not collapsible).
  • A tainted ToolResultBlock -- content fetched from an untrusted source (simulated: a fetched web page carrying a prompt-injection attempt) -- showing the TaintBadge and a collapsed long body. [space] toggles collapse, forwarded straight to the component's own handle_event/3.

See docs/proposals/in-flight/harness-spec-protocol.md sec 3 for the item_started/item_completed event shapes these blocks are the render-dual of.

Summary

Functions

subscribe_interval(interval, msg)

subscribe_to_events(events)