docs: update chat log docs for chat.raw stream and tool/bypass visibility
Add Phase 41 (live chat.raw stream vs log.raw snapshot) and Phase 42 (tool call / output / bypass rendering in log and chat) to evolution.md, with the phase chart. Clarify the log/chat row descriptions in architecture-9p.md and the chat.go role in architecture-core.md.
This commit is contained in:
parent
6211a6cdee
commit
4e1961200a
|
|
@ -87,10 +87,10 @@ echo "name=coding cwd=$PWD" | ollie-9p write session/myproj/agent/new
|
|||
| `agent/idx` | r | Agent index: `session-id\tagent-id\tagent-name\tparent-id\tdepth\tstate`. |
|
||||
| `agent/{aname}/prompt` | w | Queue a user turn. |
|
||||
| `agent/{aname}/fifo` | r/w | Prompt queue. |
|
||||
| `agent/{aname}/log` | r | Filtered text conversation snapshot (last 64KB). |
|
||||
| `agent/{aname}/log` | r | Rendered text conversation snapshot (last 64KB): user/assistant text, tool calls, tool output, bypass notices; reasoning/context hidden. |
|
||||
| `agent/{aname}/log.raw` | r | Full JSONL conversation snapshot of finalized blocks (one-shot read). |
|
||||
| `agent/{aname}/chat.raw` | r | Live JSONL stream: finalized history then live deltas (blocking). |
|
||||
| `agent/{aname}/chat` | r | Filtered text conversation stream (blocking). |
|
||||
| `agent/{aname}/chat` | r | Rendered text conversation stream (blocking). Same rendering as `log`. |
|
||||
| `agent/{aname}/block` | rdwr | Lookup block by ID (write ID, read JSON). |
|
||||
| `agent/{aname}/state` | r | Current agent state (idle, calling, thinking, paused). |
|
||||
| `agent/{aname}/plan` | r/w | Persistent planning scratch space. |
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ The agent package is organized by concern:
|
|||
| `cache.go` | Tool result caching with file staleness |
|
||||
| `retry.go` | Error tracking, transient retry logic |
|
||||
| `state.go` | State management, signals, WaitChange |
|
||||
| `chat.go` | Chat log, streaming output |
|
||||
| `chat.go` | Chat logs: finalized JSONL snapshot (`log.raw`), live JSONL stream (`chat.raw`), rendered text (`log`/`chat`); partials broadcast but not persisted |
|
||||
| `peer.go` | Peer agent management |
|
||||
| `subagent.go` | Sub-agent depth tracking |
|
||||
|
||||
|
|
|
|||
|
|
@ -102,6 +102,8 @@ gantt
|
|||
Streaming rdwr + event filters :done, 2026-08-22, 1d
|
||||
Bypass coordination + state UI :done, 2026-10-06, 1d
|
||||
JSONL chat log format :done, 2026-10-07, 1d
|
||||
Live chat stream (chat.raw) :done, 2026-10-10, 1d
|
||||
Tool/bypass text visibility :done, 2026-10-10, 1d
|
||||
```
|
||||
|
||||
## Current Size (Oct 6)
|
||||
|
|
@ -2359,3 +2361,22 @@ agent/chatlog.go ±1 flushPartial -> SetPartial
|
|||
fs/spec.go +7 chat.raw StreamRaw file
|
||||
ollie9pclient.cpp ±1 stream chat.raw, not log.raw
|
||||
```
|
||||
|
||||
## Phase 42: Tool and Bypass Visibility in Text Views (Oct 10)
|
||||
|
||||
The rendered text views (`log`, `chat`) existed for clients without a JSONL parser or event stream — the TUI and the `o` script. But `RenderBlock` hid every `call` and `tool` block, so those views showed only user and assistant prose: no indication a tool ran, what it returned, or that a sandbox-bypass request was waiting for approval. Bypass requests were published solely as `event` topics, invisible to anyone reading `chat`.
|
||||
|
||||
### Changes
|
||||
|
||||
- **`format/block.go`**: `RenderBlock` now surfaces `call` (`→ name args`), `tool` (output), `bypass` (`⚠ bypass requested (needs approval): ...`), and `bypass-resolved` (`bypass approved`/`denied`) blocks. `reasoning` and `context` stay hidden; partials still render empty.
|
||||
- **`session.go`**: `SetBypassPending` and `ResolveBypass` locate the requesting agent via `FindAgent(req.Env["OLLIE_UNAME"])` and append `bypass`/`bypass-resolved` chat blocks, so the pending-approval state and its outcome appear in `log`/`chat` alongside the existing `bypass.request`/`bypass.resolved` events. GUI clients, which read `chat.raw`, also receive these as plain-text blocks in addition to their dedicated approval dialog.
|
||||
|
||||
### Source changes
|
||||
|
||||
```text
|
||||
format/block.go +12 render call/tool/bypass/bypass-resolved
|
||||
format/block_test.go +72 new RenderBlock coverage
|
||||
session.go +20 emit bypass chat blocks on request/resolve
|
||||
agent/chat_test.go ±6 call content now expected in rendered log
|
||||
AGENTS.md ±1 log/chat filtering description
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in New Issue