Skip to content

feat(mcp): surface a bounded progress_tail in working task responses#441

Merged
LikiosSedo merged 1 commit into
feat/a2a-mcp-caller-guidancefrom
feat/mcp-progress-tail
Jul 22, 2026
Merged

feat(mcp): surface a bounded progress_tail in working task responses#441
LikiosSedo merged 1 commit into
feat/a2a-mcp-caller-guidancefrom
feat/mcp-progress-tail

Conversation

@LikiosSedo

@LikiosSedo LikiosSedo commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

What

Working responses from the five Siclaw MCP tools deliberately withheld the partial report for compactness, leaving pollers with only progress_chars and 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_tail in working responses (both the text block and structuredContent), preserving the compactness property:

  • the tail is bounded regardless of report size;
  • terminal responses and task listings are unchanged;
  • the siclaw_wait_task description is updated to advertise the excerpt.

Also aligns progress_chars to 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_chars is 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/mcp endpoint.

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.

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).
@LikiosSedo
LikiosSedo marked this pull request as draft July 22, 2026 13:52
@LikiosSedo
LikiosSedo merged commit 51db8c9 into feat/a2a-mcp-caller-guidance Jul 22, 2026
@LikiosSedo
LikiosSedo deleted the feat/mcp-progress-tail branch July 22, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant