From a8bedd2172d51ac50a9229f718e7c4d2f75f9980 Mon Sep 17 00:00:00 2001 From: aleiby Date: Wed, 21 Jan 2026 19:11:43 -0800 Subject: [PATCH] fix(costs): add event to BeadsCustomTypes constant (#731) * fix(costs): add event to BeadsCustomTypes constant The gt costs record command creates beads with --type=event, but "event" was missing from the BeadsCustomTypes constant. This caused stop hooks to fail with "invalid issue type: event" errors. Also fixes gt doctor --fix to properly register the event type when running on existing installations. Co-Authored-By: Claude Opus 4.5 * fix(types): add message, molecule, gate, merge-request to BeadsCustomTypes Extends PR #731 to include all custom types used by Gas Town: - message: Mail system (gt mail send, mailbox, router) - molecule: Work decomposition (patrol checks, gt swarm) - gate: Async coordination (bd gate wait, park/resume) - merge-request: Refinery MR processing (gt done, refinery) Root cause: gt mail send was failing with "invalid issue type: message" because message was never added to BeadsCustomTypes. Also documents the origin/usage of each custom type in the constant. Co-Authored-By: Claude Opus 4.5 Executed-By: mayor Role: mayor --------- Co-authored-by: Claude Opus 4.5 --- internal/constants/constants.go | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/internal/constants/constants.go b/internal/constants/constants.go index 136a2533..597bf7d3 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -83,12 +83,25 @@ const ( // BeadsCustomTypes is the comma-separated list of custom issue types that // Gas Town registers with beads. These types were extracted from beads core // in v0.46.0 and now require explicit configuration. - BeadsCustomTypes = "agent,role,rig,convoy,slot,queue" + // + // Type origins: + // agent - Agent identity beads (gt install, rig init) + // role - Agent role definitions (gt doctor role checks) + // rig - Rig identity beads (gt rig init) + // convoy - Cross-project work tracking + // slot - Exclusive access / merge slots + // queue - Message queue routing (gt mail queue) + // event - Session/cost events (gt costs record) + // message - Mail system (gt mail send, mailbox, router) + // molecule - Work decomposition (patrol checks, gt swarm) + // gate - Async coordination (bd gate wait, park/resume) + // merge-request - Refinery MR processing (gt done, refinery) + BeadsCustomTypes = "agent,role,rig,convoy,slot,queue,event,message,molecule,gate,merge-request" ) // BeadsCustomTypesList returns the custom types as a slice. func BeadsCustomTypesList() []string { - return []string{"agent", "role", "rig", "convoy", "slot", "queue"} + return []string{"agent", "role", "rig", "convoy", "slot", "queue", "event", "message", "molecule", "gate", "merge-request"} } // Git branch names.