refactor: DB-driven agent output events with single emission point
DB log chunk insertion is now the sole trigger for agent:output events. Eliminates triple emission (FileTailer, handleStreamEvent, output buffer) in favor of: FileTailer.onRawContent → DB insert → EventBus emit. - createLogChunkCallback emits agent:output after successful DB insert - spawnInternal now wires onRawContent callback (fixes session 1 gap) - Remove eventBus from FileTailer (no longer touches EventBus) - Remove eventBus from ProcessManager constructor (dead parameter) - Remove agent:output emission from handleStreamEvent text_delta - Remove outputBuffers map and all buffer helpers from manager/handler - Remove getOutputBuffer from AgentManager interface and implementations - getAgentOutput tRPC: DB-only, no file fallback - onAgentOutput subscription: no initial buffer yield, events only - AgentOutputViewer: accumulates raw JSONL chunks, parses uniformly
This commit is contained in:
@@ -62,10 +62,10 @@ Each procedure uses `require*Repository(ctx)` helpers that throw `TRPCError(INTE
|
||||
| getAgent | query | Single agent by name or ID |
|
||||
| getAgentResult | query | Execution result |
|
||||
| getAgentQuestions | query | Pending questions |
|
||||
| getAgentOutput | query | Full output (DB chunks or file fallback) |
|
||||
| getAgentOutput | query | Full output from DB log chunks |
|
||||
| getActiveRefineAgent | query | Active refine agent for initiative |
|
||||
| listWaitingAgents | query | Agents waiting for input |
|
||||
| onAgentOutput | subscription | Live output stream + buffered history |
|
||||
| onAgentOutput | subscription | Live raw JSONL output stream via EventBus |
|
||||
|
||||
### Tasks
|
||||
| Procedure | Type | Description |
|
||||
|
||||
Reference in New Issue
Block a user