Consume lsp-tools-mcp as submodule#3
Merged
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
There was a problem hiding this comment.
2 issues found across 136 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".mcp.json">
<violation number="1" location=".mcp.json:5">
P1: Point `.mcp.json` at the packaged root CLI, not the submodule path that is excluded from the published tarball.</violation>
</file>
<file name="package.json">
<violation number="1" location="package.json:49">
P1: This `file:` dependency will be omitted from the published tarball, so installs of the released package will fail resolving `packages/lsp-tools-mcp`.</violation>
</file>
Note: This PR contains a large number of files. cubic only reviews up to 100 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.
Re-trigger cubic
| "lsp": { | ||
| "command": "node", | ||
| "args": ["./dist/cli.js", "mcp"], | ||
| "args": ["./packages/lsp-tools-mcp/dist/cli.js", "mcp"], |
There was a problem hiding this comment.
P1: Point .mcp.json at the packaged root CLI, not the submodule path that is excluded from the published tarball.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .mcp.json, line 5:
<comment>Point `.mcp.json` at the packaged root CLI, not the submodule path that is excluded from the published tarball.</comment>
<file context>
@@ -2,7 +2,7 @@
"lsp": {
"command": "node",
- "args": ["./dist/cli.js", "mcp"],
+ "args": ["./packages/lsp-tools-mcp/dist/cli.js", "mcp"],
"cwd": "."
}
</file context>
Suggested change
| "args": ["./packages/lsp-tools-mcp/dist/cli.js", "mcp"], | |
| "args": ["./dist/cli.js", "mcp"], |
| "check": "tsc --noEmit && biome check src test && npm run build" | ||
| }, | ||
| "dependencies": { | ||
| "@code-yeongyu/lsp-tools-mcp": "file:./packages/lsp-tools-mcp" |
There was a problem hiding this comment.
P1: This file: dependency will be omitted from the published tarball, so installs of the released package will fail resolving packages/lsp-tools-mcp.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At package.json, line 49:
<comment>This `file:` dependency will be omitted from the published tarball, so installs of the released package will fail resolving `packages/lsp-tools-mcp`.</comment>
<file context>
@@ -36,13 +36,17 @@
+ "check": "tsc --noEmit && biome check src test && npm run build"
+ },
+ "dependencies": {
+ "@code-yeongyu/lsp-tools-mcp": "file:./packages/lsp-tools-mcp"
},
"devDependencies": {
</file context>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract the LSP runtime and stdio MCP server into the new upstream repository at https://github.com/code-yeongyu/lsp-tools-mcp and consume it here as a git submodule pinned to
ff2c5145.Why
The LSP/MCP code is also needed by oh-my-openagent (OpenCode plugin). Maintaining two copies is bad. The upstream now serves as the single source of truth for the LSP runtime and the stdio MCP server.
What stays in codex-lsp
src/cli.ts- routes Codexhook post-tool-uselocally, forwardsmcpto the upstreamsrc/codex-hook.ts- Codex-specific PostToolUse diagnostics hook.codex-plugin/,.mcp.json,skills/,hooks/)What moved to upstream
src/mcp.tsandsrc/tools.tssrc/lsp/*(21 files)test/mcp.test.ts,test/manager.test.ts,test/process.test.ts,test/directory-diagnostics.test.ts,test/server-definitions.test.ts,test/json-rpc-connection.test.ts,test/config-loader.test.ts,test/utils.test.ts)Build chain
submodules: recursivenpm installtriggerspreparescript which installs submodule depsnpm run buildchains submodule install + build beforetsc -p tsconfig.build.jsonnpm testchains submodule install + build before vitestVerification
Local results:
npm run checkpassesnpm testpasses (2 files, 7 tests)npm pack --dry-runships 17 files, 8.5 kBtools/listreturns 7 LSP toolspost-tool-usefixture produces blocking diagnostics outputVersion bumped to 0.2.0 (architectural change).
Summary by cubic
Consume the LSP runtime and stdio MCP server from
@code-yeongyu/lsp-tools-mcpvia a git submodule. Codex routesmcpto the upstream runtime; no behavior changes. CI now explicitly bootstraps the submodule to avoid Windows prepare recursion.Refactors
packages/lsp-tools-mcpsubmodule and.gitmodules; CLI andcodex-hookimport from@code-yeongyu/lsp-tools-mcp.src/cli.ts,src/codex-hook.ts, and plugin metadata..mcp.jsonto run./packages/lsp-tools-mcp/dist/cli.js mcp.submodules: recursiveand add a bootstrap step (npm ci && npm run buildinpackages/lsp-tools-mcp) before root install.0.2.0.Migration
git submodule update --init --recursiveafter checkout (CI already configured).Written for commit 6629268. Summary will update on new commits. Review in cubic