feat: extract Gas Town types from beads core (bd-i54l)

Remove Gas Town-specific issue types (agent, role, rig, convoy, slot)
from beads core. These types are now identified by labels instead:
- gt:agent, gt:role, gt:rig, gt:convoy, gt:slot

Changes:
- internal/types/types.go: Remove TypeAgent, TypeRole, TypeRig, TypeConvoy, TypeSlot constants
- cmd/bd/agent.go: Create agents with TypeTask + gt:agent label
- cmd/bd/merge_slot.go: Create slots with TypeTask + gt:slot label
- internal/storage/sqlite/queries.go, transaction.go: Query convoys by gt:convoy label
- internal/rpc/server_issues_epics.go: Check gt:agent label for role_type/rig label auto-add
- cmd/bd/create.go: Check gt:agent label for role_type/rig label auto-add
- internal/ui/styles.go: Remove agent/role/rig type colors
- cmd/bd/export_obsidian.go: Remove agent/role/rig/convoy type tag mappings
- Update all affected tests

This enables beads to be a generic issue tracker while Gas Town
uses labels for its specific type semantics.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Executed-By: beads/crew/dave
Rig: beads
Role: crew
This commit is contained in:
dave
2026-01-06 22:18:37 -08:00
committed by Steve Yegge
parent b7358f17bf
commit a70c3a8cbe
14 changed files with 139 additions and 93 deletions

View File

@@ -45,11 +45,11 @@ func TestAgentStateWithRouting(t *testing.T) {
rigDBPath := filepath.Join(rigBeadsDir, "beads.db")
rigStore := newTestStoreWithPrefix(t, rigDBPath, "gt")
// Create an agent bead in the rig database
// Create an agent bead in the rig database (using task type with gt:agent label)
agentBead := &types.Issue{
ID: "gt-testrig-polecat-test",
Title: "Agent: gt-testrig-polecat-test",
IssueType: types.TypeAgent,
IssueType: types.TypeTask, // Use task type; gt:agent label marks it as agent
Status: types.StatusOpen,
RoleType: "polecat",
Rig: "testrig",
@@ -57,6 +57,9 @@ func TestAgentStateWithRouting(t *testing.T) {
if err := rigStore.CreateIssue(ctx, agentBead, "test"); err != nil {
t.Fatalf("Failed to create agent bead: %v", err)
}
if err := rigStore.AddLabel(ctx, agentBead.ID, "gt:agent", "test"); err != nil {
t.Fatalf("Failed to add gt:agent label: %v", err)
}
// Create routes.jsonl in town .beads directory
routesContent := `{"prefix":"gt-","path":"rig"}`
@@ -92,8 +95,8 @@ func TestAgentStateWithRouting(t *testing.T) {
t.Error("Expected result.Routed to be true for cross-repo lookup")
}
if result.Issue.IssueType != types.TypeAgent {
t.Errorf("Expected issue type %q, got %q", types.TypeAgent, result.Issue.IssueType)
if result.Issue.IssueType != types.TypeTask {
t.Errorf("Expected issue type %q, got %q", types.TypeTask, result.Issue.IssueType)
}
t.Logf("Successfully resolved agent %s via routing", result.Issue.ID)
@@ -136,11 +139,11 @@ func TestAgentHeartbeatWithRouting(t *testing.T) {
rigDBPath := filepath.Join(rigBeadsDir, "beads.db")
rigStore := newTestStoreWithPrefix(t, rigDBPath, "gt")
// Create an agent bead in the rig database
// Create an agent bead in the rig database (using task type with gt:agent label)
agentBead := &types.Issue{
ID: "gt-test-witness",
Title: "Agent: gt-test-witness",
IssueType: types.TypeAgent,
IssueType: types.TypeTask, // Use task type; gt:agent label marks it as agent
Status: types.StatusOpen,
RoleType: "witness",
Rig: "test",
@@ -148,6 +151,9 @@ func TestAgentHeartbeatWithRouting(t *testing.T) {
if err := rigStore.CreateIssue(ctx, agentBead, "test"); err != nil {
t.Fatalf("Failed to create agent bead: %v", err)
}
if err := rigStore.AddLabel(ctx, agentBead.ID, "gt:agent", "test"); err != nil {
t.Fatalf("Failed to add gt:agent label: %v", err)
}
// Create routes.jsonl
routesContent := `{"prefix":"gt-","path":"rig"}`
@@ -207,11 +213,11 @@ func TestAgentShowWithRouting(t *testing.T) {
rigDBPath := filepath.Join(rigBeadsDir, "beads.db")
rigStore := newTestStoreWithPrefix(t, rigDBPath, "gt")
// Create an agent bead in the rig database
// Create an agent bead in the rig database (using task type with gt:agent label)
agentBead := &types.Issue{
ID: "gt-myrig-crew-alice",
Title: "Agent: gt-myrig-crew-alice",
IssueType: types.TypeAgent,
IssueType: types.TypeTask, // Use task type; gt:agent label marks it as agent
Status: types.StatusOpen,
RoleType: "crew",
Rig: "myrig",
@@ -219,6 +225,9 @@ func TestAgentShowWithRouting(t *testing.T) {
if err := rigStore.CreateIssue(ctx, agentBead, "test"); err != nil {
t.Fatalf("Failed to create agent bead: %v", err)
}
if err := rigStore.AddLabel(ctx, agentBead.ID, "gt:agent", "test"); err != nil {
t.Fatalf("Failed to add gt:agent label: %v", err)
}
// Create routes.jsonl
routesContent := `{"prefix":"gt-","path":"rig"}`
@@ -246,8 +255,8 @@ func TestAgentShowWithRouting(t *testing.T) {
t.Errorf("Expected issue ID %q, got %q", "gt-myrig-crew-alice", result.Issue.ID)
}
if result.Issue.IssueType != types.TypeAgent {
t.Errorf("Expected issue type %q, got %q", types.TypeAgent, result.Issue.IssueType)
if result.Issue.IssueType != types.TypeTask {
t.Errorf("Expected issue type %q, got %q", types.TypeTask, result.Issue.IssueType)
}
t.Logf("Successfully resolved agent %s via routing for show test", result.Issue.ID)