/**
 * Tiny shared getter for the live `McpExtensionState`.
 *
 * Set by the MCP adapter extension factory (`mcp/index.ts`) on construction
 * so `serve.ts` can read the current state snapshot without importing the
 * full adapter module. Separated into a standalone file so neither side
 * picks up the other's transitive dependencies.
 */
/**
 * Current getter, injected by `mcp/index.ts` at adapter construction time.
 * `null` means the adapter hasn't loaded yet or hasn't run `session_start`.
 */
let _getter = null;
/** Read the live MCP state. Returns null until the adapter is constructed. */
export function getLiveMcpState() {
    return _getter?.() ?? null;
}
/** Set by the MCP adapter factory at construction time. */
export function setLiveMcpStateGetter(getter) {
    _getter = getter;
}
