feat(crew): add crew configuration to rigs.json for cross-machine sync
Some checks failed
CI / Check for .beads changes (push) Has been skipped
CI / Check embedded formulas (push) Failing after 20s
CI / Test (push) Failing after 1m26s
CI / Lint (push) Failing after 22s
CI / Integration Tests (push) Successful in 1m11s
CI / Coverage Report (push) Has been cancelled
Windows CI / Windows Build and Unit Tests (push) Has been cancelled

Add CrewRegistryConfig to RigEntry allowing crew members to be defined
in rigs.json and synced across machines. The new `gt crew sync` command
creates missing crew members from the configuration.

Configuration example:
  "rigs": {
    "gastown": {
      "crew": {
        "theme": "mad-max",
        "members": ["diesel", "chrome", "nitro"]
      }
    }
  }

Closes: gt-tu4
This commit is contained in:
nux
2026-01-24 16:48:51 -08:00
committed by John Ogle
parent eb901708b6
commit 93b4d929b8
2 changed files with 221 additions and 4 deletions

View File

@@ -157,10 +157,11 @@ type RigsConfig struct {
// RigEntry represents a single rig in the registry.
type RigEntry struct {
GitURL string `json:"git_url"`
LocalRepo string `json:"local_repo,omitempty"`
AddedAt time.Time `json:"added_at"`
BeadsConfig *BeadsConfig `json:"beads,omitempty"`
GitURL string `json:"git_url"`
LocalRepo string `json:"local_repo,omitempty"`
AddedAt time.Time `json:"added_at"`
BeadsConfig *BeadsConfig `json:"beads,omitempty"`
Crew *CrewRegistryConfig `json:"crew,omitempty"`
}
// BeadsConfig represents beads configuration for a rig.
@@ -169,6 +170,18 @@ type BeadsConfig struct {
Prefix string `json:"prefix"` // issue prefix
}
// CrewRegistryConfig represents crew configuration for a rig in rigs.json.
// This enables cross-machine sync of crew member definitions.
type CrewRegistryConfig struct {
// Theme selects the naming theme for crew members (e.g., "mad-max", "minerals").
// Used when displaying crew member names and for consistency across machines.
Theme string `json:"theme,omitempty"`
// Members lists the crew member names to create on this rig.
// Use `gt crew sync` to create missing members from this list.
Members []string `json:"members,omitempty"`
}
// CurrentTownVersion is the current schema version for TownConfig.
// Version 2: Added Owner and PublicName fields for federation identity.
const CurrentTownVersion = 2