import { LogWatchRegistry } from './tools/diagnostics/log-watch-registry.js'; import { MrtLogWatchRegistry } from './tools/diagnostics/mrt-log-watch-registry.js'; import { DebugSessionRegistry } from './tools/diagnostics/session-registry.js'; /** * Server-scoped persistent state that lives for the lifetime of the MCP * server process. Holds registries for stateful resources (debug sessions, * log watches) that need to span multiple tool invocations. * * ## Multi-agent / shared-state caveats * * One `ServerContext` is created per MCP server process. With the default * stdio transport, each MCP client connection spawns its own server * subprocess, so this state is naturally isolated per client/agent. * * If this server is ever wired up to a shared transport (e.g. HTTP with * multiple connected clients), `ServerContext` state would be shared * across all connected clients. Sub-agents that run within the same MCP * client would also share the same context. Tools that mutate registries * (like the debug tools) should not assume single-tenant access. * * The registries dedup on a stable key (host:client_id for debug, hostname for * SFCC log watches, project/environment/origin for MRT log watches), so * multi-agent use is functional but agents may see each other's * sessions/watches via list tools. */ export declare class ServerContext { readonly debugSessions: DebugSessionRegistry; readonly logWatches: LogWatchRegistry; readonly mrtLogWatches: MrtLogWatchRegistry; constructor(); destroyAll(): Promise; }