feat: Add callbacks command for handling agent messages (gt-eph-5c8)
Implements `gt callbacks process` for Mayor/Deacon patrol to handle callbacks from agents: - POLECAT_DONE: Log polecat completion - MERGE_COMPLETED: Close source issue, log merge - MERGE_REJECTED: Log rejection reason - HELP/ESCALATION: Forward to overseer - SLING_REQUEST: Log sling request for spawn - WITNESS_REPORT: Log rig health status - REFINERY_REPORT: Log queue status Also adds EventCallback to townlog for callback processing 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:
@@ -27,6 +27,8 @@ const (
|
||||
EventCrash EventType = "crash"
|
||||
// EventKill indicates an agent was killed intentionally.
|
||||
EventKill EventType = "kill"
|
||||
// EventCallback indicates a callback was processed during patrol.
|
||||
EventCallback EventType = "callback"
|
||||
)
|
||||
|
||||
// Event represents a single agent lifecycle event.
|
||||
@@ -143,6 +145,12 @@ func formatLogLine(e Event) string {
|
||||
} else {
|
||||
detail = "killed"
|
||||
}
|
||||
case EventCallback:
|
||||
if e.Context != "" {
|
||||
detail = fmt.Sprintf("callback: %s", e.Context)
|
||||
} else {
|
||||
detail = "callback processed"
|
||||
}
|
||||
default:
|
||||
detail = string(e.Type)
|
||||
if e.Context != "" {
|
||||
|
||||
Reference in New Issue
Block a user