Instrument gt commands to emit events to activity feed (gt-7aw1m)
Add events.LogFeed calls to the following gt commands: - nudge.go: Log TypeNudge events when nudging agents - unsling.go: Log TypeUnhook events when removing work from hooks - up.go: Log TypeBoot events when starting Gas Town services - down.go: Log TypeHalt events when stopping Gas Town services - stop.go: Log TypeKill events when stopping polecat sessions - polecat_spawn.go: Log TypeSpawn events when spawning polecats Also add helper functions to events package: - UnhookPayload: Creates payload for unhook events - KillPayload: Creates payload for kill events - HaltPayload: Creates payload for halt events 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -246,3 +246,26 @@ func EscalationPayload(rig, target, to, reason string) map[string]interface{} {
|
||||
"reason": reason,
|
||||
}
|
||||
}
|
||||
|
||||
// UnhookPayload creates a payload for unhook events.
|
||||
func UnhookPayload(beadID string) map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"bead": beadID,
|
||||
}
|
||||
}
|
||||
|
||||
// KillPayload creates a payload for kill events.
|
||||
func KillPayload(rig, target, reason string) map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"rig": rig,
|
||||
"target": target,
|
||||
"reason": reason,
|
||||
}
|
||||
}
|
||||
|
||||
// HaltPayload creates a payload for halt events.
|
||||
func HaltPayload(services []string) map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"services": services,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user