consciousness/src/agent
Kent Overstreet 2c401e24d6 Parser consumes stream directly, yields tool calls via channel
ResponseParser::run() spawns a task that reads StreamTokens, parses
into the AST (locking context per token), and sends PendingToolCalls
through a channel. Returns (tool_rx, JoinHandle<Result>) — the turn
loop dispatches tool calls and awaits the handle for error checking.

Token IDs from vLLM are accumulated alongside text and stored directly
on AST leaves — no local re-encoding on the response path.

The turn loop no longer matches on individual stream events. It just
reads tool calls and dispatches them.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
2026-04-08 16:32:00 -04:00
..
api Parser consumes stream directly, yields tool calls via channel 2026-04-08 16:32:00 -04:00
tools WIP: Agent/AgentState — 36 errors remaining, all .lock() → .state.lock() or .context.lock() 2026-04-08 15:40:36 -04:00
context.rs Parser consumes stream directly, yields tool calls via channel 2026-04-08 16:32:00 -04:00
mod.rs Parser consumes stream directly, yields tool calls via channel 2026-04-08 16:32:00 -04:00
oneshot.rs Agent/AgentState split complete — separate context and state locks 2026-04-08 15:47:21 -04:00
tokenizer.rs WIP: Rename context_new → context, delete old files, fix UI layer 2026-04-08 15:20:26 -04:00