Forked clean from public hackathon repo (Starfire-AgentTeam, BSL 1.1) with full rebrand to Molecule AI under github.com/Molecule-AI/molecule-monorepo. Brand: Starfire → Molecule AI. Slug: starfire / agent-molecule → molecule. Env vars: STARFIRE_* → MOLECULE_*. Go module: github.com/agent-molecule/platform → github.com/Molecule-AI/molecule-monorepo/platform. Python packages: starfire_plugin → molecule_plugin, starfire_agent → molecule_agent. DB: agentmolecule → molecule. History truncated; see public repo for prior commits and contributor attribution. Verified green: go test -race ./... (platform), pytest (workspace-template 1129 + sdk 132), vitest (canvas 352), build (mcp). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
26 lines
699 B
Go
26 lines
699 B
Go
package channels
|
|
|
|
// Registry of all available channel adapters.
|
|
// To add a new platform: implement ChannelAdapter, register here.
|
|
var adapters = map[string]ChannelAdapter{
|
|
"telegram": &TelegramAdapter{},
|
|
}
|
|
|
|
// GetAdapter returns the adapter for a channel type.
|
|
func GetAdapter(channelType string) (ChannelAdapter, bool) {
|
|
a, ok := adapters[channelType]
|
|
return a, ok
|
|
}
|
|
|
|
// ListAdapters returns metadata about all available adapters.
|
|
func ListAdapters() []map[string]string {
|
|
result := make([]map[string]string, 0, len(adapters))
|
|
for _, a := range adapters {
|
|
result = append(result, map[string]string{
|
|
"type": a.Type(),
|
|
"display_name": a.DisplayName(),
|
|
})
|
|
}
|
|
return result
|
|
}
|