mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-04 17:38:45 +00:00
Per-action streamed labels now cover only the calls whose arguments take real printing time: code execution, text editor, browser evaluate, and call_subordinate with its requested profile. Labels reuse the owning tool classes' verb maps, and the parallel tool names the first of its calls and the remaining count. Validation: pytest tests/test_plugin_tool_step_descriptions.py (52 passed), tests/test_tool_step_description.py (14 passed), tests/test_plain_response_logging.py (18 passed), tests/test_response_stream_cadence.py (3 passed)
1.9 KiB
1.9 KiB
Response Stream Extensions DOX
Purpose
- Own handling of full assistant response stream updates.
Ownership
- Ordered Python files own response logging, include-alias replacement, and live response updates.
Local Contracts
- Keep streaming output synchronized with UI log items.
- The
stepKVP shown beside a streamed tool call comes frombuild_step_description, which seedsUsing <tool name with underscores as spaces>...and then dispatches thetool_step_descriptionhook with a mutablectxholdingtool_name,tool_args, andstep. Plugins contribute label text by rewritingctx["step"]; the core module holds no per-tool formatting. After the hook chain the builder appends the compact serialized tool_args length as(N)to the final step, so argument streaming stays visible for every tool; extensions must not add their own counters. The hook is display-only: a raising hook logs throughPrintStyle.debugand leaves the default step text instead of aborting the remainingresponse_streamextensions or skipping the log update for that chunk. Core extensions in this point labelparallel(Using in parallel <first> and N more tools) andcall_subordinate(Calling subordinate <profile> agent). - Agent.handle_response_stream normalizes complete tool name/argument aliases before these consumers; incomplete snapshots remain partial data. This display normalization does not execute or authorize tools.
- Treat parsed stream snapshots as partial data; nested tool fields may be
Noneuntil their values arrive. - Preserve include-alias replacement semantics where prompts/tools rely on them.
- Do not expose unmasked secrets in live responses.
Work Guidance
- Coordinate stream changes with chunk/end hooks and message rendering.
Verification
- Smoke-test streamed responses, live updates, and include alias replacement after changes.
Child DOX Index
No child DOX files.