Wraith.Studio.Transcript (Wraith v0.1.0)

View Source

What the studio shows: a list of entries built from KAS's session/update notifications (and our own lines). Entries are maps:

%{"id", "kind", "text", "at", "status", "tool", "input", "output", "replay"}

kinds: user, agent (streamed text, chunks appended), tool (a tool call; status pending/completed/failed, tool title, input, output), thought, status (one of our lines: VM booting, errors), usage (a turn's credit cost), question, permission.

apply/2 takes the current list (newest last) and one update and returns the new list; consecutive agent chunks of the same turn merge.

Summary

Functions

Close any streaming entry (a turn ended).

Scrub secret-looking values from an entry's input/output (and the text).

Types

entry()

@type entry() :: map()

Functions

apply(entries, u)

@spec apply([entry()], map()) :: [entry()]

close_open(entries)

Close any streaming entry (a turn ended).

new_entry(kind, text, extra \\ %{})

redact(entry)

Scrub secret-looking values from an entry's input/output (and the text).