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:
Steve Yegge
2025-12-29 23:40:08 -08:00
parent 070a8be738
commit 2fb616b0b7
3 changed files with 572 additions and 0 deletions

View File

@@ -199,6 +199,8 @@ func printEvent(e townlog.Event) {
typeStr = style.Error.Render("[crash]")
case townlog.EventKill:
typeStr = style.Warning.Render("[kill]")
case townlog.EventCallback:
typeStr = style.Bold.Render("[callback]")
default:
typeStr = fmt.Sprintf("[%s]", e.Type)
}
@@ -245,6 +247,11 @@ func formatEventDetail(e townlog.Event) string {
return fmt.Sprintf("killed (%s)", e.Context)
}
return "killed"
case townlog.EventCallback:
if e.Context != "" {
return fmt.Sprintf("callback: %s", e.Context)
}
return "callback processed"
default:
if e.Context != "" {
return fmt.Sprintf("%s (%s)", e.Type, e.Context)