import { CatalogTransform } from '../catalog.transform.js'; import { Tool } from '../../tool.js'; import { ExecutionContext } from '../../types.js'; import { SessionVisibilityStore } from './session-store.js'; export declare class VisibilityResolutionError extends Error { readonly code = -32601; constructor(message: string); } /** * Session visibility. * * A missing session id is not an authorization decision: hidden tools stay * hidden, and every other tool stays visible. The modern adapter rejects * `tools/list` and `tools/call` that do not present a session id this process * minted, including on the `auto` protocol. * * `disableTools` on a visible tool is a per-session workflow gate for anonymous * callers. A new anonymous session starts with an empty deny list, so a tool * that must stay unreachable until an explicit grant has to be created with * `visibility: 'hidden'`. For a verified subject the same `disableTools` call * also writes a subject deny, and that deny applies on later session ids. */ export declare class VisibilityTransform extends CatalogTransform { readonly store: SessionVisibilityStore; readonly name = "visibility"; constructor(store?: SessionVisibilityStore); /** * `withBypass` exists so search and code mode do not rebuild while a tool * lists the catalog. It is not permission to reveal hidden tools. */ protected honorsBypass(): boolean; /** * Filters the raw tool catalog down to tools authorized for the current session. */ protected applyTransform(tools: Tool[], context?: ExecutionContext): Promise; /** * Intercepts direct tool calls (tools/call). * Guards against calls to hidden or revoked tools by throwing JSON-RPC -32601. */ resolveTool(name: string, next: (name: string, ctx?: ExecutionContext) => Promise, context?: ExecutionContext): Promise; } //# sourceMappingURL=visibility.transform.d.ts.map