Merge branch 'main' of github.com:steveyegge/gastown
This commit is contained in:
@@ -91,6 +91,7 @@ func runCrewAt(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
// Set environment (non-fatal: session works without these)
|
||||
_ = t.SetEnvironment(sessionID, "GT_ROLE", "crew")
|
||||
_ = t.SetEnvironment(sessionID, "GT_RIG", r.Name)
|
||||
_ = t.SetEnvironment(sessionID, "GT_CREW", name)
|
||||
|
||||
@@ -120,7 +121,9 @@ func runCrewAt(cmd *cobra.Command, args []string) error {
|
||||
// Use respawn-pane to replace shell with Claude directly
|
||||
// This gives cleaner lifecycle: Claude exits → session ends (no intermediate shell)
|
||||
// Pass "gt prime" as initial prompt so Claude loads context immediately
|
||||
claudeCmd := `claude --dangerously-skip-permissions "gt prime"`
|
||||
// Export GT_ROLE and BD_ACTOR since tmux SetEnvironment only affects new panes
|
||||
bdActor := fmt.Sprintf("%s/crew/%s", r.Name, name)
|
||||
claudeCmd := fmt.Sprintf(`export GT_ROLE=crew GT_RIG=%s GT_CREW=%s BD_ACTOR=%s && claude --dangerously-skip-permissions "gt prime"`, r.Name, name, bdActor)
|
||||
if err := t.RespawnPane(paneID, claudeCmd); err != nil {
|
||||
return fmt.Errorf("starting claude: %w", err)
|
||||
}
|
||||
@@ -143,7 +146,9 @@ func runCrewAt(cmd *cobra.Command, args []string) error {
|
||||
|
||||
// Use respawn-pane to replace shell with Claude directly
|
||||
// Pass "gt prime" as initial prompt so Claude loads context immediately
|
||||
claudeCmd := `claude --dangerously-skip-permissions "gt prime"`
|
||||
// Export GT_ROLE and BD_ACTOR since tmux SetEnvironment only affects new panes
|
||||
bdActor := fmt.Sprintf("%s/crew/%s", r.Name, name)
|
||||
claudeCmd := fmt.Sprintf(`export GT_ROLE=crew GT_RIG=%s GT_CREW=%s BD_ACTOR=%s && claude --dangerously-skip-permissions "gt prime"`, r.Name, name, bdActor)
|
||||
if err := t.RespawnPane(paneID, claudeCmd); err != nil {
|
||||
return fmt.Errorf("restarting claude: %w", err)
|
||||
}
|
||||
|
||||
@@ -221,6 +221,7 @@ func runCrewRestart(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
// Set environment
|
||||
t.SetEnvironment(sessionID, "GT_ROLE", "crew")
|
||||
t.SetEnvironment(sessionID, "GT_RIG", r.Name)
|
||||
t.SetEnvironment(sessionID, "GT_CREW", name)
|
||||
|
||||
@@ -234,7 +235,10 @@ func runCrewRestart(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
// Start claude with skip permissions (crew workers are trusted)
|
||||
if err := t.SendKeys(sessionID, "claude --dangerously-skip-permissions"); err != nil {
|
||||
// Export GT_ROLE and BD_ACTOR since tmux SetEnvironment only affects new panes
|
||||
bdActor := fmt.Sprintf("%s/crew/%s", r.Name, name)
|
||||
claudeCmd := fmt.Sprintf("export GT_ROLE=crew GT_RIG=%s GT_CREW=%s BD_ACTOR=%s && claude --dangerously-skip-permissions", r.Name, name, bdActor)
|
||||
if err := t.SendKeys(sessionID, claudeCmd); err != nil {
|
||||
return fmt.Errorf("starting claude: %w", err)
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ type MoleculeProgressInfo struct {
|
||||
Complete bool `json:"complete"`
|
||||
}
|
||||
|
||||
// MoleculeStatusInfo contains status information for an agent's hook.
|
||||
// MoleculeStatusInfo contains status information for an agent's work.
|
||||
type MoleculeStatusInfo struct {
|
||||
Target string `json:"target"`
|
||||
Role string `json:"role"`
|
||||
|
||||
@@ -102,8 +102,8 @@ func TestRenderRole_Deacon(t *testing.T) {
|
||||
if !strings.Contains(output, "Patrol Executor") {
|
||||
t.Error("output missing role description")
|
||||
}
|
||||
if !strings.Contains(output, "Patrol Execution Protocol") {
|
||||
t.Error("output missing patrol execution section")
|
||||
if !strings.Contains(output, "Startup Protocol: Propulsion") {
|
||||
t.Error("output missing startup protocol section")
|
||||
}
|
||||
if !strings.Contains(output, "mol-deacon-patrol") {
|
||||
t.Error("output missing patrol molecule reference")
|
||||
|
||||
Reference in New Issue
Block a user