/** * Stdout discipline for `scai mcp serve`. * * The stdio transport reserves stdout exclusively for JSON-RPC frames. * Anything else that lands there breaks the protocol. The library code * under scai is generally well-behaved (consola defaults to stderr, * spinners and the Logger respect SITECOREAI_QUIET/JSON), but * `installMcpStdoutDiscipline()` is the belt-and-braces guard: * * 1. Sets `SITECOREAI_MCP_SERVE=1`, `SITECOREAI_JSON=1`, * `SITECOREAI_QUIET=1`, `SITECOREAI_NON_INTERACTIVE=1` BEFORE any * other scai module loads. These suppress spinners, banners, and * stdout JSON dumps in the existing task runners. * 2. Honors `--no-telemetry`: when telemetry is disabled for the * session it sets `SITECOREAI_TELEMETRY=false`. Otherwise it leaves * the env var untouched so normal resolution applies — telemetry is * on by default and `DO_NOT_TRACK` still wins. * 3. Installs a consola reporter that pipes every log line to stderr, * regardless of consola's default level/destination behaviour. * * Call this at the very top of the `mcp serve` command action, before * importing any other scai-internal module that might write to stdout * during initialization. */ export declare const installMcpStdoutDiscipline: (options?: { telemetry?: boolean; }) => void; export declare const writeStartupLine: (message: string) => void;