Files
gastown/internal/cmd/dnd_test.go
dementus b5ac9a2e55 feat(dnd): Add notification level control (gt-xmsme)
Implements Do Not Disturb mode for Gas Town agents:

- Add notification_level to agent bead schema (verbose, normal, muted)
- gt dnd [on|off|status] - quick toggle for DND mode
- gt notify [verbose|normal|muted] - fine-grained control
- gt nudge checks target DND status, skips if muted
- --force flag on nudge to override DND

This allows agents (especially Mayor) to mute notifications
during focused work like swarm coordination.

Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 18:54:36 -08:00

34 lines
791 B
Go

package cmd
import (
"testing"
)
func TestAddressToAgentBeadID(t *testing.T) {
tests := []struct {
address string
expected string
}{
{"mayor", "gt-mayor"},
{"deacon", "gt-deacon"},
{"gastown/witness", "gt-gastown-witness"},
{"gastown/refinery", "gt-gastown-refinery"},
{"gastown/alpha", "gt-gastown-polecat-alpha"},
{"gastown/crew/max", "gt-gastown-crew-max"},
{"beads/witness", "gt-beads-witness"},
{"beads/beta", "gt-beads-polecat-beta"},
// Invalid addresses should return empty string
{"invalid", ""},
{"", ""},
}
for _, tt := range tests {
t.Run(tt.address, func(t *testing.T) {
got := addressToAgentBeadID(tt.address)
if got != tt.expected {
t.Errorf("addressToAgentBeadID(%q) = %q, want %q", tt.address, got, tt.expected)
}
})
}
}