Repository navigation
Conversation
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
4 tasks
Buktal
marked this pull request as draft
October 27, 2026 06:02
Buktal
force-pushed
the
codex/tool-contracts
branch
from
October 27, 2026 06:21
621ddb0 to
7106f79
Compare
Buktal
marked this pull request as ready for review
October 27, 2026 06:21
4 tasks done
Collaborator
|
May be overlap: #3332 |
jujn
pushed a commit
that referenced
this pull request
Oct 28, 2026
## Description Refs #3794, tool-feedback review unit. Successful void calls can yield ambiguous empty/null feedback, PostActing block replacements can miss stored/model-visible history, and Anthropic tool-result formatting can lose explicit failure states. ## Summary ```text tool invocation -> await declared-void completion -> explicit acknowledgement PostActing replacement -> resulting message -> stored / next-request feedback Anthropic client-tool result -> explicit failure state -> is_error ``` - Acknowledge successful `void`/`Void`, `Mono<Void>`, and `CompletableFuture<Void>` calls with `(completed with no output)`. Conversion runs after completion; ordinary null returns, non-void empty completion, errors, and cancellation retain their contracts. - Propagate `PostActingEvent.setToolResult` into the resulting message unless the hook explicitly replaces that message. Cover non-streaming, streaming, and stop behavior; already emitted deltas and `returnDirect` retain their contracts. - Map Anthropic ERROR/DENIED/INTERRUPTED client-tool results to `is_error`, preserving IDs/output blocks and the separate server-tool conversion path. - Update English and Chinese tool/middleware documentation. MCP registration/result conversion is covered by #3796.
# Conflicts: # agentscope-harness/src/test/java/io/agentscope/harness/agent/tools/McpServerRegistrarTest.java # docs/v2/en/docs/harness/workspace.md # docs/v2/zh/docs/harness/workspace.md
This branch has not been deployed
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.
AgentScope-Java Version
2.1.0-SNAPSHOT
Description
Refs #3794, MCP review unit. MCP registration can silently overwrite an existing tool, while prefixed names can violate provider constraints. Result conversion can also lose structured or non-text error diagnostics.
Summary
isError, structured JSON, supported non-text content, and resource-link name/URI/description. Protocol_metais not exposed to the model.Evidence
After:
McpNamespacedToolTest,McpContentConverterTest, andMcpServerRegistrarTestcover normalization, original execution/filter names, atomic conflict rejection, concurrent registration, and model-visible error content.mvn -B -T1C clean verifypassed across all 99 modules: 11,321 tests, 0 failures/errors, 242 skipped, including Spotless without skip flags. Docs tests (13/13), static checks (432 pages, 584 redirects), and Mintlify validation passed.npm run broken-linksstill reports 2,218 links across 326 files, matching the previous counts; individual links were not baseline-attributed.my_skill->my-skillfixture correction required by fix(skill): block path traversal in skill materialization and disambiguate skillId #3787/fix(skill): move blocking skill reload off reactive event-loop threads #3792. Existing thread/cache assertions and production validation are retained.WeixinChannelLoopbackTest; its standalone two-test rerun passed. The complete check was then rerun for this snapshot.Merge Danger
Door: two-way
MCP duplicate-name handling changes compatibility: registration fails instead of overwriting, including with prefixing disabled. Use distinct prefixes or server-level
enableTools/disableToolsfilters to resolve conflicts. Global allow/deny runs after registration. Optional servers report failure and bootstrap continues; required servers abort bootstrap.Blast Radius: MCP
No state migration. Addresses the MCP portion of #3328; local-to-local replacement semantics remain separate.
Checklist