Merge branch 'refactor/agent' into feat/subturn-poc
This commit is contained in:
commit
7ba8682ac5
1 changed files with 7 additions and 6 deletions
|
|
@ -42,9 +42,8 @@ type AgentLoop struct {
|
||||||
state *state.Manager
|
state *state.Manager
|
||||||
|
|
||||||
// Event system (from Incoming)
|
// Event system (from Incoming)
|
||||||
eventBus *EventBus
|
eventBus *EventBus
|
||||||
hooks *HookManager
|
hooks *HookManager
|
||||||
hookRuntime hookRuntime
|
|
||||||
|
|
||||||
// Runtime state
|
// Runtime state
|
||||||
running atomic.Bool
|
running atomic.Bool
|
||||||
|
|
@ -55,6 +54,7 @@ type AgentLoop struct {
|
||||||
transcriber voice.Transcriber
|
transcriber voice.Transcriber
|
||||||
cmdRegistry *commands.Registry
|
cmdRegistry *commands.Registry
|
||||||
mcp mcpRuntime
|
mcp mcpRuntime
|
||||||
|
hookRuntime hookRuntime
|
||||||
steering *steeringQueue
|
steering *steeringQueue
|
||||||
mu sync.RWMutex
|
mu sync.RWMutex
|
||||||
|
|
||||||
|
|
@ -534,7 +534,7 @@ func (al *AgentLoop) drainBusToSteering(ctx context.Context, activeScope, active
|
||||||
"sender_id": msg.SenderID,
|
"sender_id": msg.SenderID,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transcribe audio if needed before steering, so the agent sees text.
|
// Transcribe audio if needed before steering, so the agent sees text.
|
||||||
|
|
@ -717,11 +717,12 @@ func (al *AgentLoop) emitEvent(kind EventKind, meta EventMeta, payload any) {
|
||||||
Payload: payload,
|
Payload: payload,
|
||||||
}
|
}
|
||||||
|
|
||||||
al.logEvent(evt)
|
|
||||||
|
|
||||||
if al == nil || al.eventBus == nil {
|
if al == nil || al.eventBus == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
al.logEvent(evt)
|
||||||
|
|
||||||
al.eventBus.Emit(evt)
|
al.eventBus.Emit(evt)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue