Skip to content

修复委派任务的权限策略继承#29

Open
Lixtt wants to merge 1 commit into
AI45Lab:mainfrom
Lixtt:fix/task-agent-permissions
Open

修复委派任务的权限策略继承#29
Lixtt wants to merge 1 commit into
AI45Lab:mainfrom
Lixtt:fix/task-agent-permissions

Conversation

@Lixtt
Copy link
Copy Markdown
Contributor

@Lixtt Lixtt commented May 13, 2026

修复 #28

变更内容

  • task / parallel_task 创建子运行时,将被委派 agent 的非默认权限策略写入子 AgentConfig.permission_checker
  • 将正常 agent binding 路径里的权限判断改为识别完整的非默认 PermissionPolicy,覆盖 default_decision = Allow 这类没有 allow/deny 列表但仍然显式配置的策略。
  • 增加单元测试,覆盖 allow-list 权限和 default-allow 权限在委派子运行中的继承行为。

验证

  • cargo fmt
  • cargo test -p a3s-code-core --lib
  • cargo test -p a3s-code-core --lib tools::task::tests
  • cargo test -p a3s-code-core --lib agent_api::agent_binding::tests

补充说明:不带 --libcargo test -p a3s-code-core <filter> 会编译 integration tests,目前 main 上已有的 core/tests/test_web_search_headless.rs 存在 Option<SearchConfig>Option<Arc<SearchConfig>> 类型不匹配问题,会阻断该命令;这个问题不是本 PR 引入的。

@Lixtt Lixtt closed this May 13, 2026
@Lixtt Lixtt changed the title Fix delegated task permission propagation 修复委派任务的权限策略继承 May 13, 2026
@Lixtt Lixtt reopened this May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant