package server import ( "context" "git.a-wan.net/alan/pipelines/internal/protocol" ) // handleChatBackends lists the installed chat harnesses. Older servers answer // with the empty field, which clients treat as OpenCode-only. func handleChatBackends(request protocol.Message, broker chatBroker, write func(protocol.Message) error) { backends := []string{"opencode"} if lister, ok := broker.(interface{ Backends() []string }); ok { backends = lister.Backends() } _ = write(protocol.Message{Type: protocol.ChatBackends, ID: request.ID, ChatBackends: backends}) } // chatCreateBackend is the optional create-with-backend surface implemented by // the multi-harness manager. A single-broker installation keeps using Create. type chatCreateBackend interface { CreateBackend(ctx context.Context, title, directory, backend string) (protocol.ChatSession, error) }