Repository navigation
fix(core,harness): backport progressive tool call events to 2.0.x (#4429) - #4430
Merged
Merged
Conversation
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
Contributor
Author
|
This was referenced Nov 27, 2026
Merged
Use original tool results for foreground settlement and hand off the acting batch once at timeout. Route lifecycle execution through existing Toolkit overrides and cover both offload timings.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.0.6-SNAPSHOT (targeting
2.0.x)Description
Fixes #4429
Backports #3712 (
db0b67eb8, addressing #3223) frommainto2.0.xas a fix release, with2.0.xcompatibility adaptations and anAsyncToolMiddlewareregression fix.Changes
agentscope-core:ToolExecutionCallback(onStart,onProgress,onResult) andToolkit.callToolsWithCallback(...)while keeping existingcallTools(...)overloads compatible.ToolExecutorto emitonStartat subscription/turn arrival andonResultbefore ordered batch aggregation (outside retry, preservingisTimeoutManaged()), and deferredToolExecutor.execute(...)withMono.defer(...)soNoopTracerdoes not evaluateexecuteCore(...)eagerly at assembly time.ReActAgentto emit tool start/delta/end events progressively via per-batchToolResultCallbackwhile keepingPostActing, context settlement, and the next reasoning step synchronized at the batch boundary. Preserved2.0.xevent compatibility (chunkedToolIdssuppression forToolEmitterchunks andToolResultEndEvent(RUNNING)for suspended external tools; no fix(core): carry tool progress on its own event type #3331 / fix(core): stop fabricating tool results for suspended external tool calls #3435 / feature flag).ToolResultStartEventbefore synthetic error deltas/end.agentscope-harness:AsyncToolMiddlewareso tools that complete beforeoffloadTimeoutkeep their real result in agent context in original call order, do not emit duplicate placeholder events, and are excluded fromAsyncToolRegistryregistration/completion/failure and background inbox notifications.ToolExecutionCallbackTestandProgressiveToolResultTest; updatedReActAgentToolkitConcurrencyTestandAsyncToolMiddlewareTest(including an end-to-endReActAgent + AsyncToolMiddlewareregression test).docs/v2/{en,zh}/docs/building-blocks/{message-and-event.md,tool.md}to reflect2.0.xprogressive tool event behavior.Verification
mvn -T1C -pl agentscope-core,agentscope-harness spotless:checkpassed.agentscope-coretests (ToolExecutionCallbackTest,ProgressiveToolResultTest,ReActAgentToolkitConcurrencyTest,ReActAgentNewLoopReplyTest,ToolExecutorTest,ToolkitCallToolIdentityTest): 313/313 passed.agentscope-harnesstest (AsyncToolMiddlewareTest): 5/5 passed.agentscope-extensions-agui(551),agentscope-extensions-studio(91),agentscope-extensions-a2a-client(144),agentscope-extensions-a2a-server(133) passed.npm test,npm run validate,npm run broken-links) passed.JsonFileAgentStateStoreTest.sessionOperationsShareLocksThroughRootSymlink(8 errors) andMemoryFlushSandboxIndependenceTest.hostMemoryRejectsNamespacePrefixAndEscapingInternalSymlinks(1 failure) failed due to/tmp//varsymlink behavior; please check Linux/Windows CI results on the PR.Checklist
Please check the following items before code is ready to be reviewed.
mvn spotless:applymvn test)