From bf5b210bd1843d2c02bea7584847321b376f89a1 Mon Sep 17 00:00:00 2001 From: weichen Date: Wed, 7 Oct 2026 05:07:37 +0000 Subject: [PATCH 1/2] Point the nested agent-native pin at the N1 spec and guardrails increment Why: Library PR #18 landed AgentSpec, guardrails, subagent events and the GateOptions.PermissionAsk field; squad's register mapping needs that field, and check-pins requires the same combination. Evidence: native main head is the #18 merge; squad suites run next. Impact: Nested pin only. --- deps/agent-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/agent-native b/deps/agent-native index c2befaf..c5b9dca 160000 --- a/deps/agent-native +++ b/deps/agent-native @@ -1 +1 @@ -Subproject commit c2befaf17ebd0d22486d00c8248658171264e41d +Subproject commit c5b9dca44622eb10b11f89929e107c3aacaacbfd -- 2.54.0 From ef14bda11ffa4693585ed3f5472386d5180bb50a Mon Sep 17 00:00:00 2001 From: weichen Date: Wed, 7 Oct 2026 05:08:42 +0000 Subject: [PATCH 2/2] Pass the permission ask port through the native register Config Why: Squad members must reach the host's HITL verdict when a kernel hook answers ask - the new native GateOptions.PermissionAsk field carries it; nil preserves the legacy ask=reject behavior. Evidence: go vet clean in all five modules; go test ok everywhere. Impact: Additive Config field plus its buildOptions mapping. --- adapters/native/register.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/adapters/native/register.go b/adapters/native/register.go index f7ac60b..2b064c8 100644 --- a/adapters/native/register.go +++ b/adapters/native/register.go @@ -47,6 +47,9 @@ type Config struct { Trace func(name string, attrs map[string]string) func() CodeOrchestration bool Ask func(ctx context.Context, question string) (string, error) + // PermissionAsk 把内核钩子的 ask 决策转交宿主裁决(nil = 内核保持 + // ask 按拒绝处理的旧行为)。经 nativexec.GateOptions 透传。 + PermissionAsk func(ctx context.Context, call llm.ToolCall) runtime.AskVerdict } // Register 把 "agent-native" 工厂注册进解析器。 @@ -92,7 +95,7 @@ func buildOptions(cfg Config, role squad.RoleSpec) (nativexec.Options, error) { GateOptions: nativexec.GateOptions{ BeforeTool: cfg.BeforeTool, AfterTool: cfg.AfterTool, Stop: cfg.Stop, Reminders: cfg.Reminders, RepeatGuard: cfg.RepeatGuard, Hooks: cfg.Hooks, - Ask: cfg.Ask, + Ask: cfg.Ask, PermissionAsk: cfg.PermissionAsk, }, } if cfg.Client != nil { -- 2.54.0