import type { AuthClient, GloveConfig, ToolCallResult, UpstreamBridge } from './types.js'; /** * GloveServer wraps an upstream MCP server and enforces OpenLeash policy on * every tool call before forwarding to upstream. * * Transparency guarantee: the server name advertised to downstream clients * matches the upstream's logical name (e.g. "office365-outlook"), so agents * perceive no difference when glove is active. */ export declare class GloveServer { private readonly config; private readonly upstream; private readonly auth; constructor(config: GloveConfig, upstream: UpstreamBridge, auth: AuthClient); handleListTools(): Promise<{ tools: unknown[]; }>; /** * Core interception logic for tools/call. * * Decision matrix: * ALLOW → forward to upstream and return result * DENY → structured error, never reach upstream * REQUIRE_APPROVAL → suspend, wait for owner decision, then ALLOW or error * REQUIRE_STEP_UP → treat as DENY for Phase-1 (not supported) * REQUIRE_DEPOSIT → treat as DENY for Phase-1 (not supported) * Auth unavailable → fail-safe DENY for write tools */ handleCallTool(name: string, args: Record): Promise; /** * Starts the glove as an MCP server on stdio. * The server advertises itself as `config.serverName` so the downstream * client perceives no change (transparency requirement). */ start(): Promise; } //# sourceMappingURL=glove.d.ts.map