mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
auto generated tools docs, added stdio transport, added additional mcp config and permissions
This commit is contained in:
@@ -116,12 +116,14 @@ export class ModuleHelper {
|
||||
|
||||
async throwUnlessGranted(
|
||||
permission: Permission | string,
|
||||
c: { context: ModuleBuildContextMcpContext; request: Request },
|
||||
c: { context: ModuleBuildContextMcpContext; raw?: unknown },
|
||||
) {
|
||||
invariant(c.context.app, "app is not available in mcp context");
|
||||
invariant(c.request instanceof Request, "request is not available in mcp context");
|
||||
invariant(c.raw instanceof Request, "request is not available in mcp context");
|
||||
|
||||
const user = await c.context.app.module.auth.authenticator.resolveAuthFromRequest(c.request);
|
||||
const user = await c.context.app.module.auth.authenticator.resolveAuthFromRequest(
|
||||
c.raw as Request,
|
||||
);
|
||||
|
||||
if (!this.ctx.guard.granted(permission, user)) {
|
||||
throw new Exception(
|
||||
|
||||
Reference in New Issue
Block a user