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:
20
controllers/api/mcp_view.go
Normal file
20
controllers/api/mcp_view.go
Normal 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 }
|
||||
Reference in New Issue
Block a user