test: expect the MCP view of BM answers

- viaMCP, includeBody and the material views (no body unless asked)
- jz.bm.mcp-links: absolute url / *_url under MCP only
- jz.bm.manage keyed per user for dispatched calls
- bm_material and bm_materials in the pinned tool list
Compile-only stubs; the tests fail on their assertions.
This commit is contained in:
2026-10-28 14:34:58 +01:00
parent e106b36a9a
commit 464c74b80f
5 changed files with 344 additions and 2 deletions

View File

@@ -20,9 +20,12 @@ const MiddlewareRealtimeAccess = "jz.bm.realtime-access"
// here without importing that plugin.
const presentationsOwnerGuard = "presentations.realtime-owner"
// Middlewares exports the realtime access guard.
// Middlewares exports the realtime access guard and the MCP link rewriter.
func (p *Plugin) Middlewares() map[string]pact.Middleware {
return map[string]pact.Middleware{MiddlewareRealtimeAccess: p.realtimeAccess}
return map[string]pact.Middleware{
MiddlewareRealtimeAccess: p.realtimeAccess,
MiddlewareMCPLinks: p.mcpLinks,
}
}
// realtimeAccess lets a chat-group member through, otherwise, when