chore(omo-claude): re-sync lsp to cache-safe vendored-mcp path resolution
Upstream lazy-lsp-mcp resolves the lsp server via new URL('../../../mcp/lsp/cli.js',
import.meta.url) -> the vendored plugin/mcp/lsp/cli.js, so the bundled hook boots
from a node_modules-free cache without require.resolve.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { createRequire } from "node:module";
|
|
||||||
import { env, execPath, stderr } from "node:process";
|
import { env, execPath, stderr } from "node:process";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
|
|
||||||
import { LSP_MCP_TOOLS } from "@code-yeongyu/lsp-tools-mcp/dist/tools.js";
|
import { LSP_MCP_TOOLS } from "@code-yeongyu/lsp-tools-mcp/dist/tools.js";
|
||||||
import {
|
import {
|
||||||
@@ -12,7 +12,6 @@ import {
|
|||||||
import { createStdioLazyMcpBackend } from "./lazy-mcp-stdio-backend.js";
|
import { createStdioLazyMcpBackend } from "./lazy-mcp-stdio-backend.js";
|
||||||
import { type LazyMcpLifecycleLog, runLazyMcpStdioServer } from "./lazy-mcp-stdio-server.js";
|
import { type LazyMcpLifecycleLog, runLazyMcpStdioServer } from "./lazy-mcp-stdio-server.js";
|
||||||
|
|
||||||
const require = createRequire(import.meta.url);
|
|
||||||
const BACKEND_CONFIG_ENV = "CODEX_LSP_LAZY_BACKEND";
|
const BACKEND_CONFIG_ENV = "CODEX_LSP_LAZY_BACKEND";
|
||||||
const IDLE_TIMEOUT_ENV = "CODEX_LSP_LAZY_IDLE_TIMEOUT_MS";
|
const IDLE_TIMEOUT_ENV = "CODEX_LSP_LAZY_IDLE_TIMEOUT_MS";
|
||||||
|
|
||||||
@@ -47,7 +46,7 @@ export async function runLazyLspMcpServer(
|
|||||||
export function defaultLazyLspBackendConfig(): LazyMcpBackendProcessConfig {
|
export function defaultLazyLspBackendConfig(): LazyMcpBackendProcessConfig {
|
||||||
return {
|
return {
|
||||||
command: execPath,
|
command: execPath,
|
||||||
args: [require.resolve("@code-yeongyu/lsp-tools-mcp/dist/cli.js"), "mcp"],
|
args: [fileURLToPath(new URL("../../../mcp/lsp/cli.js", import.meta.url)), "mcp"],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user