chore(mcp): move lsp submodule under packages
This commit is contained in:
+2
-2
@@ -1,3 +1,3 @@
|
||||
[submodule "vendor/lsp-tools-mcp"]
|
||||
path = vendor/lsp-tools-mcp
|
||||
[submodule "packages/lsp-tools-mcp"]
|
||||
path = packages/lsp-tools-mcp
|
||||
url = https://github.com/code-yeongyu/lsp-tools-mcp
|
||||
|
||||
@@ -31,7 +31,7 @@ oh-my-opencode/
|
||||
│ ├── generated/ # model-capabilities.generated.json (refreshed via build:model-capabilities)
|
||||
│ └── testing/ # Test utilities + `create-plugin-module.ts` (extracted plugin entry factory, 182 LOC)
|
||||
├── web/ # Marketing site (Next.js 15 + Cloudflare Workers, deployed to ohmyopenagent.com via opennextjs-cloudflare). Independent package with own bun.lock — see web/AGENTS.md
|
||||
├── packages/ # 11 platform-specific compiled binary packages (darwin/linux/windows, AVX2 + baseline)
|
||||
├── packages/ # 11 platform-specific binary packages + lsp-tools-mcp submodule
|
||||
├── bin/ # Platform-detection JS shim (oh-my-opencode + oh-my-openagent)
|
||||
├── script/ # Build/publish automation (singular, not scripts/)
|
||||
├── docs/ # User-facing docs (guide/, reference/, examples/, legal/, manifesto.md, superpowers/, troubleshooting/)
|
||||
@@ -87,7 +87,7 @@ pluginModule.server(input, options)
|
||||
|
||||
**Always on (20):** `lsp_goto_definition`, `lsp_find_references`, `lsp_symbols`, `lsp_diagnostics`, `lsp_prepare_rename`, `lsp_rename`, `grep`, `glob`, `ast_grep_search`, `ast_grep_replace`, `session_list`, `session_read`, `session_search`, `session_info`, `background_output`, `background_cancel`, `call_omo_agent`, `task` (delegate), `skill`, `skill_mcp`.
|
||||
|
||||
> Note: `lsp_*` tool names are now served by built-in MCP server `lsp` (via `vendor/lsp-tools-mcp`), preserving existing names through OpenCode MCP namespacing.
|
||||
> Note: `lsp_*` tool names are now served by built-in MCP server `lsp` (via `packages/lsp-tools-mcp`), preserving existing names through OpenCode MCP namespacing.
|
||||
|
||||
**Conditional:** `look_at` (+1, multimodal-looker not disabled), `interactive_bash` (+1, `tmux` binary available on PATH via `isInteractiveBashEnabled()`), `task_create`/`task_get`/`task_list`/`task_update` (+4, `experimental.task_system`), `edit` (+1, `hashline_edit`), `team_create`/`team_delete`/`team_shutdown_request`/`team_approve_shutdown`/`team_reject_shutdown`/`team_send_message`/`team_task_create`/`team_task_list`/`team_task_update`/`team_task_get`/`team_status`/`team_list` (+12, `team_mode.enabled`).
|
||||
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
[test]
|
||||
preload = ["./test-setup.ts"]
|
||||
pathIgnorePatterns = ["web/**", "vendor/**"]
|
||||
pathIgnorePatterns = ["web/**", "packages/lsp-tools-mcp/**"]
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
"dist",
|
||||
"bin",
|
||||
"postinstall.mjs",
|
||||
"vendor/lsp-tools-mcp/dist"
|
||||
"packages/lsp-tools-mcp/dist"
|
||||
],
|
||||
"exports": {
|
||||
".": {
|
||||
@@ -24,7 +24,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi --external zod && bun run build:node-require-shim && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi && bun run build:schema",
|
||||
"build:lsp-tools-mcp": "npm ci --prefix vendor/lsp-tools-mcp && npm run build --prefix vendor/lsp-tools-mcp",
|
||||
"build:lsp-tools-mcp": "npm --prefix packages/lsp-tools-mcp ci && npm --prefix packages/lsp-tools-mcp run build",
|
||||
"build:node-require-shim": "bun run script/patch-node-require-shim.ts",
|
||||
"build:all": "bun run build && bun run build:binaries",
|
||||
"build:binaries": "bun run script/build-binaries.ts",
|
||||
|
||||
@@ -61,7 +61,7 @@ describe("getInstalledLspServers", () => {
|
||||
// given
|
||||
const userConfigDirectory = createTemporaryDirectory("omo-tools-lsp-user-")
|
||||
const workspaceDirectory = createTemporaryDirectory("omo-tools-lsp-enabled-")
|
||||
const lspCliDirectory = join(workspaceDirectory, "vendor", "lsp-tools-mcp", "dist")
|
||||
const lspCliDirectory = join(workspaceDirectory, "packages", "lsp-tools-mcp", "dist")
|
||||
mkdirSync(lspCliDirectory, { recursive: true })
|
||||
writeFileSync(join(lspCliDirectory, "cli.js"), "#!/usr/bin/env node\n", "utf-8")
|
||||
process.env.OPENCODE_CONFIG_DIR = userConfigDirectory
|
||||
|
||||
+3
-3
@@ -13,11 +13,11 @@ Tier 1 of the three-tier MCP system. Built-ins are created by `createBuiltinMcps
|
||||
| **websearch** | remote | `mcp.exa.ai` (default) or `mcp.tavily.com` | `EXA_API_KEY` (optional), `TAVILY_API_KEY` (if tavily) | Web search |
|
||||
| **context7** | remote | `mcp.context7.com/mcp` | `CONTEXT7_API_KEY` (optional) | Library documentation |
|
||||
| **grep_app** | remote | `mcp.grep.app` | None | GitHub code search |
|
||||
| **lsp** | local (stdio, node) | `node vendor/lsp-tools-mcp/dist/cli.js mcp` | `LSP_TOOLS_MCP_PROJECT_CONFIG=.opencode/lsp.json` | `status`, diagnostics, goto definition, references, symbols, prepare_rename, rename |
|
||||
| **lsp** | local (stdio, node) | `node packages/lsp-tools-mcp/dist/cli.js mcp` | `LSP_TOOLS_MCP_PROJECT_CONFIG=.opencode/lsp.json` | `status`, diagnostics, goto definition, references, symbols, prepare_rename, rename |
|
||||
|
||||
## SUBMODULE ARCHITECTURE
|
||||
|
||||
- The local `lsp` MCP is vendored as a git submodule at `vendor/lsp-tools-mcp/`.
|
||||
- The local `lsp` MCP is a git submodule at `packages/lsp-tools-mcp/`.
|
||||
- Upstream project: https://github.com/code-yeongyu/lsp-tools-mcp
|
||||
- OMO resolves the CLI path dynamically in `src/mcp/lsp.ts` so both `src/` and `dist/` runtime layouts work.
|
||||
|
||||
@@ -38,4 +38,4 @@ Tier 1 of the three-tier MCP system. Built-ins are created by `createBuiltinMcps
|
||||
| `websearch.ts` | Exa/Tavily provider with config |
|
||||
| `context7.ts` | Context7 with optional auth header |
|
||||
| `grep-app.ts` | Grep.app (no auth) |
|
||||
| `lsp.ts` | Local stdio MCP config for vendored `lsp-tools-mcp` |
|
||||
| `lsp.ts` | Local stdio MCP config for packaged `lsp-tools-mcp` |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { existsSync } from "node:fs"
|
||||
import { resolve } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
const SUBMODULE_REL = "vendor/lsp-tools-mcp"
|
||||
const SUBMODULE_REL = "packages/lsp-tools-mcp"
|
||||
const CLI_REL = "dist/cli.js"
|
||||
const PROJECT_LSP_CONFIG = ".opencode/lsp.json"
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ Tools registered via [`createToolRegistry()`](file:///Users/yeongyu/local-worksp
|
||||
| **Delegation** (2) | `task` (delegate, full skill+category support), `call_omo_agent` (named agent only: explore, librarian) |
|
||||
| **Skills/MCP** (2) | `skill` (load skill or invoke command), `skill_mcp` (call skill-embedded MCP tool/resource/prompt) |
|
||||
|
||||
> LSP tools are now provided by built-in MCP server `lsp` (Tier-1 stdio), backed by `vendor/lsp-tools-mcp/`. OpenCode-compatible aliases remain available (`lsp_status`, `lsp_diagnostics`, `lsp_goto_definition`, `lsp_find_references`, `lsp_symbols`, `lsp_prepare_rename`, `lsp_rename`).
|
||||
> LSP tools are now provided by built-in MCP server `lsp` (Tier-1 stdio), backed by `packages/lsp-tools-mcp/`. OpenCode-compatible aliases remain available (`lsp_status`, `lsp_diagnostics`, `lsp_goto_definition`, `lsp_find_references`, `lsp_symbols`, `lsp_prepare_rename`, `lsp_rename`).
|
||||
|
||||
### Conditional (up to +19 native tools)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user