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
+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 {