feat(mcp): surface a bounded progress_tail in working task responses#441
Merged
Merged
Conversation
Working responses deliberately withheld the partial report for compactness, which left pollers with only progress_chars and the last tool-event status string — enough to know the task is alive, not enough to relay what the investigation is doing. Expose the last 400 runes of the partial report as progress_tail (text + structuredContent), keeping the compactness property: the tail is bounded regardless of report size and terminal responses are unchanged. Also count progress_chars in code points instead of UTF-16 units so the number matches the sicore HTTP endpoint's rune count on CJK reports. Mirror of sicore feat/a2a-mcp-progress-tail (verbatim-sync contract).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Working responses from the five Siclaw MCP tools deliberately withheld the partial report for compactness, leaving pollers with only
progress_charsand the last tool-event status string (e.g.Finished tool: bash) — enough to know the task is alive, not enough to relay what the investigation is currently doing.This PR exposes the last 400 runes of the partial report as
progress_tailin working responses (both the text block andstructuredContent), preserving the compactness property:siclaw_wait_taskdescription is updated to advertise the excerpt.Also aligns
progress_charsto count Unicode code points (matching the sicore HTTP endpoint's rune count on CJK reports) instead of UTF-16 units.Why
Field feedback from driving the tools as an MCP caller: during a 2–5 minute investigation the only mid-flight signal was a coarse status string, so the calling agent could not tell the user anything meaningful ("正在实测 draco 节点 link_layer" vs "finished bash"). The narrative already exists server-side —
progress_charsis computed from it — so this only exposes a bounded view of data both surfaces already hold.Sync contract
Mirror of sicore
feat/a2a-mcp-progress-tail— tool descriptions and working/terminal response shapes stay verbatim-synced between the stdio adapter and the/api/v1/mcpendpoint.Tests
32 adapter tests green, including new cases: short partial passed through whole, long partial bounded to 401 runes (
…+ 400), terminal responses carry no tail.Stacked on #440 (
feat/a2a-mcp-caller-guidance); base set accordingly.