import type { Environment } from '../../core/environment.js'; import type { Config } from '../../core/linter.js'; export interface DsrOptions { /** Path to the Unix domain socket. Defaults to /tmp/designlint-kernel.sock */ socketPath?: string; /** Port for the HTTP fallback transport. Defaults to 7341. */ httpPort?: number; /** Timeout in milliseconds for the initial connection attempt. Defaults to 5000. */ connectTimeoutMs?: number; /** * Optional async hook invoked by DsrTokenProvider immediately before * connecting to the kernel socket. Programmatic callers (LSP, MCP, scripts) * can use this to auto-start the kernel when no socket is present, without * depending on the CLI's prepareEnvironment helper. * * @example * ```ts * createNodeEnvironment(config, { * dsr: { * socketPath: '/tmp/designlint-kernel.sock', * beforeConnect: async () => { * if (!existsSync('/tmp/designlint-kernel.sock')) { * kernelStart({ socketPath: '/tmp/designlint-kernel.sock' }); * } * }, * }, * }); * ``` */ beforeConnect?: () => Promise; } export interface CreateNodeEnvironmentOptions { cacheLocation?: string; configPath?: string; patterns?: string[]; /** * DSR kernel connection options. Required in v8 — the kernel is the only * authoritative token source. The caller must ensure the kernel is running * before constructing the environment. */ dsr: DsrOptions; } /** * Construct the Node.js runtime environment for design-lint. * * In v8 the DSR kernel is the single token source. `options.dsr` is required; * callers are responsible for starting the kernel before calling this function. */ export declare function createNodeEnvironment(_config: Config, options: CreateNodeEnvironmentOptions): Environment; //# sourceMappingURL=environment.d.ts.map