export interface ServiceScope { readonly service: string; readonly tool?: undefined; } export interface ToolScope { readonly service: string; readonly tool: string; } export type EntitlementScope = ServiceScope | ToolScope; export declare function serviceScope(service: string): ServiceScope; export declare function toolScope(service: string, tool: string): ToolScope; /** * Does the given scope cover a call to `tool` in `service`? * * A service-wide scope covers any tool in the same service. * A tool scope covers only the specific (service, tool) pair. */ export declare function scopeCovers(scope: EntitlementScope, service: string, tool: string): boolean; export interface ServiceResolutionInput { /** A tool's `_stipend.service` field, if present. */ readonly explicitService?: string | undefined; /** The upstream MCP server's `serverInfo.name` from its `initialize` response. */ readonly serverInfoName?: string | undefined; /** Optional host-configured alias for this upstream — wins only over serverInfo.name. */ readonly hostAlias?: string | undefined; } /** * Resolve the service identifier for a tool at runtime, per TDD §3.4. * * Precedence: * 1. Explicit `_stipend.service` override on the tool wins. * 2. Otherwise, the MCP `serverInfo.name` from the upstream. * 3. If a host has configured an alias, that takes the place of (2). */ export declare function resolveService(input: ServiceResolutionInput): string; //# sourceMappingURL=scope.d.ts.map