fix(mail): prevent message type failures (#960)

This commit is contained in:
Artem Bambalov
2026-01-26 04:05:11 +02:00
committed by GitHub
parent 0ff092ae9f
commit 0e0547b3e1
3 changed files with 35 additions and 12 deletions

View File

@@ -11,9 +11,9 @@ import (
"github.com/spf13/cobra"
"github.com/steveyegge/gastown/internal/beads"
"github.com/steveyegge/gastown/internal/constants"
"github.com/steveyegge/gastown/internal/claude"
"github.com/steveyegge/gastown/internal/config"
"github.com/steveyegge/gastown/internal/constants"
"github.com/steveyegge/gastown/internal/deps"
"github.com/steveyegge/gastown/internal/formula"
"github.com/steveyegge/gastown/internal/shell"
@@ -408,11 +408,8 @@ func initTownBeads(townPath string) error {
// Configure custom types for Gas Town (agent, role, rig, convoy, slot).
// These were extracted from beads core in v0.46.0 and now require explicit config.
configCmd := exec.Command("bd", "config", "set", "types.custom", constants.BeadsCustomTypes)
configCmd.Dir = townPath
if configOutput, configErr := configCmd.CombinedOutput(); configErr != nil {
// Non-fatal: older beads versions don't need this, newer ones do
fmt.Printf(" %s Could not set custom types: %s\n", style.Dim.Render("⚠"), strings.TrimSpace(string(configOutput)))
if err := beads.EnsureCustomTypes(beadsDir); err != nil {
return fmt.Errorf("ensuring custom types: %w", err)
}
// Configure allowed_prefixes for convoy beads (hq-cv-* IDs).