Add isolated SIP call tool, optional debug capture and split interface schemas

This commit is contained in:
2026-10-08 12:44:45 +08:00
parent 98b3fd469d
commit 385bda0822
49 changed files with 3688 additions and 28 deletions
+24
View File
@@ -0,0 +1,24 @@
package main
import "testing"
func TestDebugFlagIsExplicitAndAgentOnly(t *testing.T) {
for _, flag := range []string{"--debug", "-D"} {
command := newAgentCommand()
if err := command.ParseFlags([]string{flag}); err != nil {
t.Fatal(err)
}
enabled, err := command.Flags().GetBool("debug")
if err != nil || !enabled {
t.Fatalf("%s: %v %v", flag, enabled, err)
}
if err := newDispatcherCommand().ParseFlags([]string{flag}); err == nil {
t.Fatal("Dispatcher must not silently accept an Agent capture flag")
}
}
command := newAgentCommand()
enabled, err := command.Flags().GetBool("debug")
if err != nil || enabled {
t.Fatal("capture must be disabled by default")
}
}