fix: make Eino exit and transfer work on AgenticMessage state

Official ExitTool still writes classic Message react state, which breaks supervisor delivery on the Agentic path.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ed1s0nZandCursor committed 2026-09-22 10:44:34 +08:00
1 parent 8da3c8c51b
commit 3aa9274675
7 files changed
+338 -10

No files matched your search

+1 -9
View File
@@ -55,15 +55,7 @@ func hitlClearReturnDirectlyIfTransfer(ctx context.Context, toolName string) {
if !strings.EqualFold(strings.TrimSpace(toolName), adk.TransferToAgentToolName) {
return
}
_ = compose.ProcessState[*adk.State](ctx, func(_ context.Context, st *adk.State) error {
if st == nil {
return nil
}
st.ReturnDirectlyToolCallID = ""
st.HasReturnDirectly = false
st.ReturnDirectlyEvent = nil
return nil
})
_ = clearADKReturnDirectly(ctx)
}
func hitlEditedArgumentsNotice(original, edited string) string {