import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { type BridgeConfig } from '../config/tiers.js'; import type { JobRegistry } from '../jobs/registry.js'; import type { JobRunner } from '../jobs/runner.js'; import type { ProgressCaptureExtra } from '../jobs/progress-capture.js'; /** Loose-typed handler stored in the toolHandlers Map for the runner to invoke * on async-job execution. ProgressCaptureExtra is a structural subset of the * SDK's RequestHandlerExtra; handlers access only the fields it provides. */ export type CapturedToolHandler = (args: any, extra: ProgressCaptureExtra) => Promise; export interface BridgeServerOptions { config?: BridgeConfig; name?: string; version?: string; /** * Override whether prompt-injection defense (F4) is enabled. * Default: true. When true, Layer 1 (Spotlighting + NFKC) and Layer 2 * (@stackone/defender Tier 1) run on every untrusted text input. * Tier 2 (MiniLM ONNX) additionally requires OMCP_DEFENDER_TIER2=1. */ defendUntrusted?: boolean; /** When provided alongside jobRunner, registers the async-job MCP tools * (enqueue-job, wait_for_job, read_job_result, check_progress). */ jobRegistry?: JobRegistry; /** Workhorse for actually running enqueued jobs. Pair with jobRegistry. */ jobRunner?: JobRunner; /** Optional pre-built Map for the runner's ToolInvoker. If omitted, a fresh * Map is created and populated during tool registration. Tests can pass * their own to inspect. */ toolHandlers?: Map; } /** Routing knob for image-vs-text source resolution. */ export type Modality = 'auto' | 'image' | 'text'; export declare function buildBridgeServer(options?: BridgeServerOptions): McpServer; export declare function runBridgeServerStdio(options?: BridgeServerOptions): Promise; //# sourceMappingURL=server.d.ts.map