Enable NFKC folding in the squad intent gate (I1 WP4) #19

Merged
weichen merged 1 commits from feature/agent-stack-i1 into main 2026-10-07 07:44:15 +00:00
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -33,11 +33,13 @@ type Options struct {
// NewFromOverlay 从 JSON overlay 构造闸门,并把 guard 域标成受保护域。
// 命令行用它,这样命令本身不必 import agent-intent。
// NFKC 开启:全角/兼容等价输入与词条同形折叠(与 backend intentgate 一致)。
func NewFromOverlay(ctx context.Context, fsys fs.FS, roots ...string) (*Gate, error) {
return New(ctx, Options{
IntentOptions: intent.Options{
GuardDomains: []string{"guard"},
ProtectedDomains: []string{"guard"},
NFKC: true,
},
FS: fsys,
Roots: roots,