feat: update orchestrator for enhanced multi-bot management and room discovery

This commit is contained in:
2026-03-06 17:03:08 +00:00
parent 2f89943511
commit 7176afde0a
8 changed files with 220 additions and 40 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ matrix:
homeserver: "https://matrix-af2f3d.organic-machine.com"
user_id: "@asistente-2:matrix-af2f3d.organic-machine.com"
access_token_env: MATRIX_TOKEN_ASISTENTE_2
device_id: "XUGTSZJYFQ"
device_id: "IVECMVQWNZ"
encryption:
enabled: true
+1 -1
View File
@@ -127,7 +127,7 @@ matrix:
homeserver: "https://matrix-af2f3d.organic-machine.com"
user_id: "@assistant-bot:matrix-af2f3d.organic-machine.com"
access_token_env: MATRIX_TOKEN_ASSISTANT_BOT
device_id: "SMWMRKMHDH"
device_id: "WXAKFKILMR"
encryption:
enabled: true
+11
View File
@@ -10,6 +10,7 @@ import (
"path/filepath"
"sync"
"maunium.net/go/mautrix"
"maunium.net/go/mautrix/event"
"github.com/enmanuel/agents/internal/config"
@@ -197,6 +198,16 @@ func (a *Agent) SetInterceptor(fn matrix.InterceptFunc) {
a.listener.SetInterceptor(fn)
}
// SetMembershipNotify registers a callback for room membership changes.
func (a *Agent) SetMembershipNotify(fn matrix.MembershipNotifyFunc) {
a.listener.SetMembershipNotify(fn)
}
// RawMatrixClient returns the underlying *mautrix.Client for room scanning.
func (a *Agent) RawMatrixClient() *mautrix.Client {
return a.matrix.Raw()
}
// Run starts the agent sync loop. Blocks until ctx is cancelled.
func (a *Agent) Run(ctx context.Context) error {
if a.cryptoStore != nil {
+4 -8
View File
@@ -6,9 +6,9 @@ special:
llm:
primary:
provider: anthropic
model: claude-sonnet-4-6
api_key_env: ANTHROPIC_API_KEY
provider: openai
model: gpt-4o
api_key_env: OPENAI_API_KEY
max_tokens: 512
temperature: 0.2
@@ -16,8 +16,4 @@ orchestration:
max_iterations: 3
quality_threshold: 0.8
delegation_timeout: 30s
rooms:
- room_id: "${MATRIX_ROOM_SHARED}"
participants:
- assistant-bot
- asistente-2
rooms: [] # auto-detected: any room with ≥2 registered bots is managed automatically