feat(scum): add bounded vehicle spawn adapter

This commit is contained in:
npc0-hue
2026-07-29 16:04:26 +08:00
parent 7ae4dbf0b2
commit daa0f330a4
24 changed files with 314 additions and 23 deletions
@@ -0,0 +1,16 @@
package companion
import "testing"
func TestCompanionVehicleHandlerCapabilityIsExplicitAndBounded(t *testing.T) {
base := append([]string(nil), requiredCapabilities...)
if err := validateCapabilities(base); err != nil {
t.Fatalf("base companion profile must remain valid: %v", err)
}
if err := validateCapabilities(append(base, "handler.vehicle.spawn")); err != nil {
t.Fatalf("explicit vehicle handler declaration must be valid: %v", err)
}
if err := validateCapabilities(append(base, "handler.raw.rcon")); err == nil {
t.Fatal("undeclared raw command handler capability must be rejected")
}
}