feat(32.1-01): publish one MCP scope list and call context

- pact gains MemberTokenScopeCatalog, MCPAdvertisedScopes and MCPCall
- an empty MCP ScopesSupported resolves to the five fixed names including backend
- pier copies advertised scopes and sets MCPCall beside WithDispatch
This commit is contained in:
2026-10-28 14:32:31 +01:00
parent 2cea3127cc
commit 63d05e8acb
11 changed files with 322 additions and 27 deletions

View File

@@ -817,11 +817,14 @@ type HasTokenScopes interface {
// member token screens show. Label and Description are phrase keys
// (containing "::") or literal text. It is the frontend counterpart of
// TokenScope and carries no permission patterns or method filter: the route
// middleware alone decides what a member scope allows.
// middleware is what enforces a member scope. Implies is only "", "read" or
// "write", for a later OAuth MCP check; the zero value means the scope is
// not implied. This package does not perform that check.
type FrontendTokenScope struct {
Name string
Label string
Description string
Implies string
}
// HasFrontendTokenScopes is implemented by plugins that declare member