singularity-forge/packages
mastertyko 43b1de6d59 fix: signal malformed tool arguments in toolcall_end event (#2647)
When the API stream is truncated mid-tool-call, PartialMessageBuilder
emits a toolcall_end event with { _raw: "<broken json>" } in the
arguments — but the event looks identical to a healthy tool completion.
Downstream consumers (error classifiers, tool handlers, activity log)
have no way to distinguish a truncated call from a completed one.

Add a malformedArguments: boolean flag to the toolcall_end event variant
in AssistantMessageEvent. The flag is set to true only in the JSON parse
catch path, so existing consumers (which do not check for it) are
unaffected. New consumers like classifyProviderError can use it to
handle truncated tool calls appropriately.

Closes #2574
2026-03-26 08:15:16 -06:00
..
native fix: use Array.from instead of Buffer.from for native processStreamChunk state (#2348) 2026-03-25 00:08:11 -06:00
pi-agent-core Merge pull request #2173 from frizynn/fix/race-conditions 2026-03-25 22:15:29 -06:00
pi-ai fix: signal malformed tool arguments in toolcall_end event (#2647) 2026-03-26 08:15:16 -06:00
pi-coding-agent Merge pull request #2624 from gsd-build/feat/ecosystem-skills-directory-merge 2026-03-26 00:01:11 -06:00
pi-tui fix: render tool calls above text response for external providers 2026-03-25 14:38:39 -06:00