refactor: 收口 workflow caller credential 与 typed tool request#1728
Open
jason-aelf wants to merge 24 commits into
Open
refactor: 收口 workflow caller credential 与 typed tool request#1728jason-aelf wants to merge 24 commits into
jason-aelf wants to merge 24 commits into
Conversation
通过强类型 tool execution port 统一 workflow 直调工具执行路径,避免缺失审批管线时继续裸执行工具。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
覆盖 timeout 与 pending approval 通过执行端口映射 typed status,避免 workflow direct tool_call 回归到绕过审批链路。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tool-call-approval 修复 workflow tool_call 审批中间件旁路
Remove the lossy runtime LLM override mirror so llm_call derives its child request from the workflow ToolContext single source of truth. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
合并 #1664:修复 workflow llm_call ToolContext 传播。 Review-gate: architect/tests/quality 均 approve。 CI: all required checks completed successfully. ⟦AI:AUTO-LOOP⟧
Drop workflow runtime AgentToolExecutionContext storage/forwarding from tool_call and llm_call paths. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts: # src/Aevatar.AI.Abstractions/Middleware/IToolCallMiddleware.cs # src/Aevatar.AI.Core/AIGAgentBase.cs # src/Aevatar.AI.Core/Middleware/ToolApprovalMiddleware.cs # src/Aevatar.Bootstrap.Extensions.AI/ServiceCollectionExtensions.cs # src/workflow/Aevatar.Workflow.Core/Execution/WorkflowExecutionRuntimeContext.cs # src/workflow/Aevatar.Workflow.Core/Execution/WorkflowRequestMetadataRuntimeContextAccess.cs # src/workflow/Aevatar.Workflow.Core/Modules/LLMCallModule.cs # src/workflow/Aevatar.Workflow.Core/Modules/ToolCallModule.cs # src/workflow/Aevatar.Workflow.Core/WorkflowRunGAgent.cs # test/Aevatar.Integration.Tests/WorkflowAdditionalModulesCoverageTests.cs # test/Aevatar.Integration.Tests/WorkflowCoreModulesCoverageTests.cs # test/Aevatar.Integration.Tests/WorkflowGAgentCoverageTests.cs # test/Aevatar.Workflow.Core.Tests/Execution/WorkflowExecutionContextAdapterTests.cs # test/Aevatar.Workflow.Core.Tests/Execution/WorkflowExecutionRuntimeContextTests.cs
通过 workflow-owned connector_http_authorization 将可信 HTTP bearer 传到 llm_call/direct tool_call,并只在 Workflow.Integration.AI 边界转换为 AI tool context,避免 metadata 与公开观察面泄露。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
覆盖 scoped workflow 不把 HTTP bearer 写入 LLM control,以及 role-side typed bearer 进入工具上下文的回归路径,回应 tests reviewer r1 的阻塞意见。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
实现 #1744 workflow NyxID bearer typed 传递
将 workflow-wide bearer carrier 从 connector 命名收口为 WorkflowCallerCredential,并保持 connector/AI 边界映射各自独立,避免 metadata 或 connector context 承载 run 级 caller credential。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
按 review-gate 反馈移除 workflow 内部 NyxID/provider 命名和 HTTP header 形态,只在 connector 边界重建 Bearer header 并保持 AI mapping 在 Integration.AI。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
实现 #1777 WorkflowCallerCredential caller 凭据收口
* 实现 workflow tool typed request 收口 将 workflow tool 执行统一到 WorkflowToolExecutionRequest,避免 direct tool_call 走丢失上下文的 plain path。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 补充 workflow ScopeId 桥接测试 覆盖 WorkflowRunGAgent actor state 到 WorkflowExecutionContextAdapter 的 ScopeId 传播,回应 #1784 review-gate 的测试缺口。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 补充 workflow tool request 覆盖 --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* 实现 workflow caller credential 后续收口 将 workflow-owned raw bearer、route preference 与 AI provider/tool credential 映射边界收口,避免 Workflow 层感知 NyxID 或通用 bag 语义。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 修复 workflow caller credential review 反馈 去除 credential 字段的 invalid sentinel 语义,并补齐应用层 invalid caller credential 短路测试,确保 provider/tool credential 边界保持单一语义。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 补充 workflow caller credential 覆盖 为 PR #1825 的 codecov/patch 缺口补充测试,覆盖 malformed bearer 在 workflow 与 scope endpoint 的短路行为。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 补充 scoped AGUI 路由偏好覆盖 修复 PR #1825 review-gate r2 tests reject,确保 scoped preferred LLM route 进入 AGUI workflow 请求。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
WorkflowCallerCredential替代旧的connector_http_authorization字符串/connector runtime context,并在 proto、application request、run execution context 与 actor state 中统一承载。tool_call执行切到WorkflowToolExecutionRequest,显式携带runId、stepId、executionId、callId、scopeId与 caller credential,避免工具执行走丢失上下文的 plain path。Bearerheader,Workflow.Integration.AI边界再映射为AgentToolExecutionContext,并在 committed state redaction 中清空敏感凭据。ToolCallMiddlewareChainFactory保证 approval middleware 位于工具中间件链首位,并为 denied / timeout / pending / middleware termination 提供ToolCallTerminationKindtyped status。Test plan
gh pr checks 1728changes,fast-gates,host-composition-smoke,projection-provider-e2e,slow-test-guards,coverage-quality,codecov/patch