Add witness activity events to gt feed (gt-nfdyl)
Implement activity event emission for witness patrol operations: - patrol_started: When witness begins patrol cycle - polecat_checked: When witness checks a polecat - polecat_nudged: When witness nudges a stuck polecat - escalation_sent: When witness escalates to Mayor/Deacon - patrol_complete: When patrol cycle finishes Also adds refinery merge queue events for future use: - merge_started, merge_complete, merge_failed, queue_processed New command: `gt activity emit <event-type>` allows agents to emit events from CLI. Events write to ~/gt/.events.jsonl for gt feed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,13 @@ const (
|
||||
EventKill EventType = "kill"
|
||||
// EventCallback indicates a callback was processed during patrol.
|
||||
EventCallback EventType = "callback"
|
||||
|
||||
// Witness patrol events
|
||||
EventPatrolStarted EventType = "patrol_started"
|
||||
EventPolecatChecked EventType = "polecat_checked"
|
||||
EventPolecatNudged EventType = "polecat_nudged"
|
||||
EventEscalationSent EventType = "escalation_sent"
|
||||
EventPatrolComplete EventType = "patrol_complete"
|
||||
)
|
||||
|
||||
// Event represents a single agent lifecycle event.
|
||||
@@ -151,6 +158,36 @@ func formatLogLine(e Event) string {
|
||||
} else {
|
||||
detail = "callback processed"
|
||||
}
|
||||
case EventPatrolStarted:
|
||||
if e.Context != "" {
|
||||
detail = fmt.Sprintf("started patrol (%s)", e.Context)
|
||||
} else {
|
||||
detail = "started patrol"
|
||||
}
|
||||
case EventPolecatChecked:
|
||||
if e.Context != "" {
|
||||
detail = fmt.Sprintf("checked polecat %s", e.Context)
|
||||
} else {
|
||||
detail = "checked polecat"
|
||||
}
|
||||
case EventPolecatNudged:
|
||||
if e.Context != "" {
|
||||
detail = fmt.Sprintf("nudged polecat (%s)", e.Context)
|
||||
} else {
|
||||
detail = "nudged polecat"
|
||||
}
|
||||
case EventEscalationSent:
|
||||
if e.Context != "" {
|
||||
detail = fmt.Sprintf("escalated (%s)", e.Context)
|
||||
} else {
|
||||
detail = "escalated"
|
||||
}
|
||||
case EventPatrolComplete:
|
||||
if e.Context != "" {
|
||||
detail = fmt.Sprintf("patrol complete (%s)", e.Context)
|
||||
} else {
|
||||
detail = "patrol complete"
|
||||
}
|
||||
default:
|
||||
detail = string(e.Type)
|
||||
if e.Context != "" {
|
||||
|
||||
Reference in New Issue
Block a user