SMOODEV-2717: Carry structured tool details on AgentEvent::ToolCallComplete (held) - #101
Open
brentrager wants to merge 1 commit into
Open
SMOODEV-2717: Carry structured tool details on AgentEvent::ToolCallComplete (held)#101brentrager wants to merge 1 commit into
brentrager wants to merge 1 commit into
Conversation
…mplete The event only carries `result` — the tool's LLM-facing text, truncated to 500 chars. The structured `ToolResult.details` (the UI-facing payload: trace ids, counts, table rows) is dropped, so a downstream SEP server can only re-emit truncated prose and can't render real artifact cards. Add an optional `details: Option<serde_json::Value>` to the event, populated un-truncated from `ToolResult.details` at both send sites. `#[serde(default, skip_serializing_if = "Option::is_none")]` keeps the wire byte-identical when absent, so older runners/clients are unaffected. Held for a core release (no changeset/publish), pairs with: - the smooth-operator server runner forwarding it into `stream_chunk` state (`state.rawResponse.toolResult.data`), and - the SMOODEV-2717 web renderer (smooai monorepo), which upgrades from linkifying the answer prose to rendering artifact cards from that data. Rust-only for now; Go/TS/dotnet/Python engine parity is a follow-up (the field is additive and back-compat, so cross-engine wire stays compatible). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018tRq2Rge3gGHCjJdNx6xDD
|
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.
Held for Brent's release — pairs with the llm_metadata seam (#100)
Ride this on the same core release as #100 so the full SMOODEV-2717 "interactive analyst answers → real artifact cards" version can turn on immediately after, with no second release cycle.
What & why
AgentEvent::ToolCallCompletecarriesresult— the tool's LLM-facing text, truncated to 500 chars (result.content.chars().take(500)). The structuredToolResult.details(the UI-facing payload: trace ids, error counts, table rows that the observability tools already attach) is dropped. So a downstream SEP server can only re-emit truncated prose — it can't render real artifact cards.This adds an optional
details: Option<serde_json::Value>to the event, populated un-truncated fromToolResult.detailsat both send sites.default+skip_serializing_ifkeeps the wire byte-identical when absent, so older runners/clients are unaffected.Tests
tool_call_complete_details_omitted_when_none—Noneserializes nodetailskey (proves wire-identical to pre-change).tool_call_complete_details_forwarded_verbatim_when_some—Some(v)round-trips verbatim.cargo test(agent suite),cargo fmt --check,cargo clippyall clean (the 2 clippy warnings are pre-existing incheckpoint.rs, untouched here).After this publishes (follow-ups, NOT in this PR)
ToolCallCompletearm threadsdetailsinto thestream_chunkstate asstate.rawResponse.toolResult.data(3 lines; can't compile until this core version publishes — the workspace pinssmooai-smooth-operator-core = "0.16.2").event.data.state.rawResponse.toolResult.data.ToolResult.detailsin the copilot's tool provider where a tool returns structured data but doesn't yet attach it, and Go/TS/dotnet/Python engine parity (additive + back-compat, so cross-engine wire stays compatible).🤖 Generated with Claude Code
https://claude.ai/code/session_018tRq2Rge3gGHCjJdNx6xDD