MCPcopy Create free account
hub / github.com/astercloud/aster / OnAgentRegistered

Method OnAgentRegistered

pkg/asteros/interfaces/a2a.go:83–95  ·  view source on GitHub ↗

OnAgentRegistered Agent 注册事件

(ag *agent.Agent)

Source from the content-addressed store, hash-verified

81
82// OnAgentRegistered Agent 注册事件
83func (i *A2AInterface) OnAgentRegistered(ag *agent.Agent) error {
84 i.mu.Lock()
85 defer i.mu.Unlock()
86
87 i.agents[ag.ID()] = ag
88
89 if i.opts.EnableLogging {
90 fmt.Printf(" [A2A] Agent registered: %s\n", ag.ID())
91 fmt.Printf(" → Available for Agent-to-Agent communication\n")
92 }
93
94 return nil
95}
96
97// OnRoomRegistered Room 注册事件
98func (i *A2AInterface) OnRoomRegistered(r *core.Room) error {

Callers

nothing calls this directly

Calls 2

PrintfMethod · 0.80
IDMethod · 0.65

Tested by

no test coverage detected