fc644ecd6e
Reemplaza el scaffold del echobot por la plataforma completa de bots traida desde ~/DataProyects/Github/agents_and_robots tras la operacion Matrix-out: los bots ya no hablan por Matrix sino por el bus unibus (modelo todo-rooms + E2E via shell/transportunibus sobre github.com/enmanuel/unibus/pkg/client). - go.mod: replace de unibus -> ../unibus y de fn-registry -> ../../../.. (paths relativos reajustados a la nueva ubicacion dentro de fn_registry). - app.md: bump a 0.2.0, descripcion + arquitectura + comandos + gotchas reales. - modulo Go conservado como github.com/enmanuel/agents (sin reescribir imports). agents_and_robots queda archivado como museo de la era Matrix.
21 lines
613 B
Go
21 lines
613 B
Go
package agents
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/enmanuel/agents/pkg/command"
|
|
)
|
|
|
|
// Runner is the common interface that both Agent and Robot satisfy.
|
|
// The launcher uses this to manage agents and robots uniformly.
|
|
type Runner interface {
|
|
// Run starts the Matrix sync loop. Blocks until ctx is cancelled.
|
|
Run(ctx context.Context) error
|
|
// Stop cancels the runner's internal context, causing Run to return.
|
|
Stop()
|
|
// Done returns a channel closed when Run has returned.
|
|
Done() <-chan struct{}
|
|
// RegisterCommand adds a custom command handler.
|
|
RegisterCommand(spec command.Spec, handler CommandHandler)
|
|
}
|