Documentation
¶
Overview ¶
Package brmcptest provides an in-memory private message fabric so brmcp endpoints (routers, harnesses, bridges) can be exercised end to end without a relay.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Text ¶
func Text(res *mcp.CallToolResult) string
Text concatenates the text content of a tool result.
Types ¶
type Fabric ¶
type Fabric struct {
// contains filtered or unexported fields
}
Fabric delivers private messages between test endpoints the way the relay would: asynchronously, attributed to the sending uid.
func (*Fabric) Attach ¶
Attach registers deliver as the endpoint living at uid. Every PM sent to uid is delivered as deliver(fromUID, text) on its own goroutine. A router's HandlePM is a valid deliver function.
func (*Fabric) Close ¶
func (f *Fabric) Close()
Close stops delivery and closes every fabric-built router.
func (*Fabric) NewRouter ¶
NewRouter builds a router living at uid on this fabric: cfg.Sender is replaced with the fabric's sender for uid and inbound PMs feed the router's HandlePM. The router is closed with the fabric.