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

@@ -0,0 +1,20 @@
package api
import (
"net/http"
)
// viaMCP reports whether r is an MCP tool call.
func viaMCP(r *http.Request) bool { return false }
// includeBody reports whether r asks for the material body.
func includeBody(r *http.Request) bool { return false }
// materialView is the answer of GET /materials/{id} for r.
func materialView(r *http.Request, d materialDetailJSON) any { return d }
// managedMaterialView is a managed material for r.
func managedMaterialView(r *http.Request, m managedMaterialJSON, write bool) any { return m }
// managedMaterialDetailView is a managed material with its files for r.
func managedMaterialDetailView(r *http.Request, d managedMaterialDetailJSON, write bool) any { return d }