feat: relay streamed reasoning, render tool params, add execute tool #35
No reviewers
Labels
No labels
code-review
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
sam/brainless!35
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/relay-streamed-reasoning"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces #34 (closed; head branch renamed to a conventional name). Review findings from #34 are resolved in
2d5571con top of the original work.Fixes three operator-visible gaps in brainless:
Read params were invisible in the timeline. The ACP tool-call payload carried the model's
head/tailargs and{"output": ...}results, but clients render a read fromrawInput.offset/limitand result text from acontentkey, so the Paseo timeline showed a barereadwith no line range and no content. Built-in read calls now mirror head/tail as offset/limit (plus the standard locations entry) and all built-in tool results carry acontentkey alongsideoutput. Model-facing schemas are unchanged.Reasoning blocks never rendered.
Promptskipped every partial event, and reasoning models (melious's Responses path) deliver thinking only as streamed deltas — the terminal response omits it — so reasoning was dropped entirely. Thought deltas are now relayed live asagent_thought_chunkupdates (Paseo coalesces consecutive chunks into one block). Answer-text deltas stay buffered until the round's final event confirms the turn survived, preserving the budget-crossing guarantee (no partially delivered answer marked cancelled).No built-in command tool. Added an always-visible
execute(command, cwd?, timeout?)tool: runssh -cin the session working directory, returns combined output + exit code as data, caps output at 100 KiB, and bounds runtime (default 30s, max 300s) by killing the whole process group so orphaned grandchildren can't holdWaitopen.Tests: new e2e coverage for streamed reasoning (
TestACPPromptStreamsReasoningDeltas) and read param rendering (TestACPToolCallReadParamsRenderable), plus an execute-tool suite.go test -race ./...andgolangci-lint runare clean.Known limitation (deliberately out of scope): the chat-completions fallback path still cannot surface reasoning — ADK's openaimodel reads chat-completions responses for text/refusals/tool calls only, and
reasoning_contentisn't in openai-go's types. The primary Responses path is fixed.