import type { MCPServer } from '@openai/agents-core'; import { Context } from '@temporalio/activity'; import type { NativeConnection } from '@temporalio/worker'; export declare function registerCancelShutdown(ctx: Context, dedicatedWorker: { shutdown: () => void; }): void; /** * Stateful MCP server provider. Maintains a persistent MCP connection per * Workflow run via a dedicated in-process Worker on a per-run Task Queue. * * Callers must handle `ApplicationFailure` with type `"DedicatedWorkerFailure"` * if the dedicated Worker fails to start or misses a heartbeat. */ export declare class StatefulMCPServerProvider { private readonly _name; private readonly _servers; private readonly _serverFactory; private readonly _nativeConnection; /** * @param name - The internal name is `${name}-stateful` to avoid colliding with stateless providers using the same base name. * @param serverFactory - Must return a fresh server instance per call (one per Workflow run). * @param nativeConnection - NativeConnection used by the dedicated per-run Worker; typically the same one the main Worker uses. */ constructor(name: string, serverFactory: (factoryArgument?: unknown) => MCPServer, nativeConnection: NativeConnection); get name(): string; _getActivities(): Record Promise>; }