Plumb RoleSpec execution config into agent-native requests and fix leader parity
Why: RoleSpec.Tools/Skills were dead fields, BashPermission only gated an HITL prompt with nothing to enforce, leader turns dropped process events and tool profile, and the HTTP API could not start leader mode. Evidence: go vet ./... clean; go test ./... 6 packages ok. New cases: step requests carry ToolAllowlist/Skills/SessionScope/ExecutionID and a step-wide shared deadline; buildAgentNativeOptions bash gating (deny/unset get no exec tools even when configured, ask/allow do, missing model fails closed); Derive inheriting tool_profile/tools/ skills/bash_permission with request overrides; role-level HitlPolicy making a bash=ask step fail under auto instead of holding; leader requests fully assembled with detail events bridged to the sink; HTTP createRun accepting mode/leader_role/max_leader_turns (engine-driven repro of the plan-validation precondition included). Impact: RegisterAgentNative keeps its signature and delegates to a new RegisterAgentNativeFull(AgentNativeConfig); nested agent-native gitlink pinned to f9ab2ef (full-agent batch); llm planner derive schema gains tool_profile/tools/skills/bash_permission. Refs: Dev task feature/full-agent-r1 batch B9; agent-native PR #3.
This commit is contained in:
@@ -54,6 +54,14 @@ git submodule update --init --recursive
|
||||
注册工厂),产品也可注册 `pi-agent` 等外部智能体工厂。`Model`/`ToolProfile`/`Skills`
|
||||
角色级注入——即每个角色可以用不同的智能体、不同的模型。
|
||||
|
||||
执行配置贯通(full-agent-r1 起):`ToolProfile`/`Tools`(工具白名单,支持
|
||||
`mcp__server__*` 命名空间通配)/`Skills`/`BashPermission`/`Model` 全部随步骤请求
|
||||
下发到 agent-native(`Tools`/`Skills` 原为死字段);`BashPermission=deny`(默认)
|
||||
的角色不装配执行工具,`ask` 由 permission 挂起点先行把关,`allow` 直接放行
|
||||
(工厂层显式 allow/ask 才装配,派生构造同样兜底)。`RegisterAgentNativeFull`
|
||||
接受 `AgentNativeConfig`(搜索/取回/执行/MCP/技能根/委派/压缩)由组合根注入;
|
||||
步骤重试与首试共享同一截止时刻(agent-execution 标准的共享预算语义)。
|
||||
|
||||
角色来源三种(`RoleSource`):
|
||||
- **registered**:配置文件(`roles.d/*.json`)/ HTTP API / CLI 手动注册;
|
||||
- **derived**:规划器或用户按 `base_role` 基线现场派生(领域特化专员);
|
||||
@@ -76,7 +84,8 @@ git submodule update --init --recursive
|
||||
|
||||
## Leader-Delegation 编排模式(机制参考 Multica Squad Leader,原创实现)
|
||||
|
||||
除标准模式(一次性计划顺序执行)外,支持事件驱动的增量委派循环
|
||||
除标准模式(一次性计划顺序执行)外,支持事件驱动的增量委派循环(HTTP API
|
||||
`POST /v1/runs` 亦支持 `mode`/`leader_role`/`max_leader_turns`,与 CLI 等价)
|
||||
(`--mode leader --leader-role <role>`):leader 是注册表中的普通角色,每轮被
|
||||
引擎激活——读目标/黑板/委派历史,产出结构化决策 `delegation.json`:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user