Why: N1 WP2/WP3 host side - the kernel ask loop must reach the HITL
confirm card, and tool gating should run through the typed Policy with
the session-allow store port instead of a hand-built Request.
Evidence: go vet clean; go test ./... all packages ok, including new
TestConvAllowStoreKeysByName, TestPermissionAskRoutesToHITL, and
permissionAskOf tests. Nested agent-native pin at 9758a8d (PR #17).
Impact: runmgr.ExecuteTool decides via agentpolicy.Policy with
convAllowStore (keying unchanged: conversation x tool name);
runCtx.PermissionAsk routes kernel asks to the shared toolConfirmCard
HITL; direct and subagent loops pass PermissionAsk into the kernel
config (nil for hosts without the method, preserving legacy ask=reject).
Refs: Documents proposal 2026-10-07-agent-stack-n1q1i1-plans.md WP2/WP3; Agent-Native PR #17
Why: Library PR #17 landed on agent-native main as c2befaf; backend
compiles with the merged combination, not the pre-merge branch head.
Evidence: go vet and full go test run next; native main ancestry of
9758a8d verified before the pin bump.
Impact: Nested agent-native pin only.
weichen
merged commit fe0c5a4f1b into main2026-10-07 04:38:53 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
N1 增量二:ask 端口接 HITL 与 Policy 对象化(WP2/WP3 宿主侧)
按 Documents 提案
2026-10-07-agent-stack-n1q1i1-plans.md§2.2 落地 WP2/WP3 的 Backend 部分。嵌套deps/agent-native推进到 Agent-Native PR #17 的分支头9758a8d。改动
runmgr.ExecuteTool的权限判定改走agentpolicy.Policy(Mode +convAllowStore会话放行端口)。键控口径不变:会话 × 工具名,同名调用不再询问——TestConvAllowStoreKeysByName钉死这个行为(含「换参数仍放行」)。runCtx.PermissionAsk,把内核钩子的 ask 决策路由到 HITL 确认卡;卡片抽出toolConfirmCard共享形态,ExecuteTool 画像确认与内核端口两条路径完全同卡。选项沿用三键:执行 / 本会话始终允许(落会话放行表)/ 取消(返回可读理由)。llm_direct.go)与子代理(sub_loop.go)的nruntime.Config均接permissionAskOf(rc)——宿主实现该可选接口则接线,否则传 nil、内核保持「ask 按拒绝处理」旧行为。子代理经同一 runCtx 类型自动获得 HITL 能力。范围裁定
验证
go vet ./...通过;go test -count=1 ./...全部包 ok(22 包)。TestConvAllowStoreKeysByName、TestPermissionAskRoutesToHITL(yes/session/no 三分支,session 落表)、TestPermissionAskOfOptional/TestPermissionAskOfWired。TestPlanModeRejectsWriteAndKeepsRead、TestDefaultModeStillRunsWrite、HITL 超时、子代理、小队适配等。合入顺序
先合 Agent-Native PR #17,再合本 PR(本 PR 的嵌套 pin 指向其分支头;#17 以 merge commit 合入后该 SHA 即在组件 main 祖先链上)。
主任务:Dev 仓
feature/agent-stack-n1(任务卡随 Dev 分支携带,含两增量证据)。