feat(app): 대화 screen to read what people said, Jarvis's answers and how each answer was made
The management app reads the worker's history store (read only) and shows people's words, Jarvis's answers and the answer traces in time order, with filters for kind, place, person, channel, day and text, live follow, older items on demand and expandable traces (records given, tools offered, plan, model thinking, tool calls and results). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -68,6 +68,30 @@ Setting `since` (default none, meaning the whole history) drops records older th
|
||||
A record that is a match is not repeated in the recent block. Returns the two blocks separately
|
||||
so the prompt can label them.
|
||||
|
||||
## Traces
|
||||
|
||||
How each answer was made, for the management app's 대화 screen (`app/src/admin.spec.md`,
|
||||
"Conversations"). A trace is never a record: no read above returns it and it never reaches a prompt.
|
||||
|
||||
- `add_trace(via, channel_id, user_id, question, answer, steps, ms, ts)`: one per `reply` the brain
|
||||
ran (`via` `voice`, `chat` or `task`; `channel_id` where it was asked, none for a task; `answer`
|
||||
empty when the brain gave none; `ts` when it was ready; `ms` how long it took). `steps` is a JSON
|
||||
list in the order they happened:
|
||||
- `{"kind": "records", "recent": [...], "matches": [...], "notes": n}`: the history lines and the
|
||||
number of personal notes the brain was given (the voice worker adds it first),
|
||||
- `{"kind": "tools", "names": [...]}`: the tools the turn was offered after routing,
|
||||
- `{"kind": "plan", "steps": [...]}`: the planner's steps, when it ran,
|
||||
- `{"kind": "think", "text": "..."}`: the model's thinking in one round, when thinking is on
|
||||
(at most 8,000 characters),
|
||||
- `{"kind": "tool", "name", "args", "ok", "result"}`: a tool call and the start of its result or
|
||||
error (at most 2,000 characters), or `"skipped": "not_allowed" | "duplicate"` with `ok` false
|
||||
for a call the engine refused.
|
||||
The engine writes them through `turn_state.trace` (`reply/turn_state.py`), which does nothing when
|
||||
no trace list was set (v1, evals).
|
||||
- `traces_of(person)`: the person's traces, oldest first. `forget_person` deletes them too.
|
||||
- `purge_traces_older_than(ts)`: the voice worker keeps traces 30 days (`TRACE_KEEP_DAYS`) and
|
||||
removes older ones when it starts. `purge_older_than` removes old traces with the records.
|
||||
|
||||
## Writes and maintenance
|
||||
|
||||
- `add_voice`, `add_reply`, `add_chat`, `edit_chat`, `delete_chat`.
|
||||
|
||||
Reference in New Issue
Block a user