claude-ide-bridge 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +263 -0
- package/dist/activityLog.d.ts +26 -0
- package/dist/activityLog.js +76 -0
- package/dist/activityLog.js.map +1 -0
- package/dist/bridge.d.ts +19 -0
- package/dist/bridge.js +277 -0
- package/dist/bridge.js.map +1 -0
- package/dist/config.d.ts +22 -0
- package/dist/config.js +221 -0
- package/dist/config.js.map +1 -0
- package/dist/errors.d.ts +16 -0
- package/dist/errors.js +20 -0
- package/dist/errors.js.map +1 -0
- package/dist/extensionClient.d.ts +193 -0
- package/dist/extensionClient.js +698 -0
- package/dist/extensionClient.js.map +1 -0
- package/dist/fileLock.d.ts +12 -0
- package/dist/fileLock.js +30 -0
- package/dist/fileLock.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/lockfile.d.ts +12 -0
- package/dist/lockfile.js +127 -0
- package/dist/lockfile.js.map +1 -0
- package/dist/logger.d.ts +16 -0
- package/dist/logger.js +68 -0
- package/dist/logger.js.map +1 -0
- package/dist/probe.d.ts +22 -0
- package/dist/probe.js +45 -0
- package/dist/probe.js.map +1 -0
- package/dist/server.d.ts +25 -0
- package/dist/server.js +265 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/activityLog.d.ts +39 -0
- package/dist/tools/activityLog.js +49 -0
- package/dist/tools/activityLog.js.map +1 -0
- package/dist/tools/aiComments.d.ts +26 -0
- package/dist/tools/aiComments.js +196 -0
- package/dist/tools/aiComments.js.map +1 -0
- package/dist/tools/bridgeStatus.d.ts +21 -0
- package/dist/tools/bridgeStatus.js +41 -0
- package/dist/tools/bridgeStatus.js.map +1 -0
- package/dist/tools/checkDocumentDirty.d.ts +28 -0
- package/dist/tools/checkDocumentDirty.js +61 -0
- package/dist/tools/checkDocumentDirty.js.map +1 -0
- package/dist/tools/clipboard.d.ts +50 -0
- package/dist/tools/clipboard.js +82 -0
- package/dist/tools/clipboard.js.map +1 -0
- package/dist/tools/closeTabs.d.ts +49 -0
- package/dist/tools/closeTabs.js +77 -0
- package/dist/tools/closeTabs.js.map +1 -0
- package/dist/tools/debug.d.ts +154 -0
- package/dist/tools/debug.js +248 -0
- package/dist/tools/debug.js.map +1 -0
- package/dist/tools/decorations.d.ts +92 -0
- package/dist/tools/decorations.js +150 -0
- package/dist/tools/decorations.js.map +1 -0
- package/dist/tools/diffDebugger.d.ts +62 -0
- package/dist/tools/diffDebugger.js +245 -0
- package/dist/tools/diffDebugger.js.map +1 -0
- package/dist/tools/editText.d.ts +80 -0
- package/dist/tools/editText.js +274 -0
- package/dist/tools/editText.js.map +1 -0
- package/dist/tools/fileOperations.d.ts +111 -0
- package/dist/tools/fileOperations.js +280 -0
- package/dist/tools/fileOperations.js.map +1 -0
- package/dist/tools/fileWatcher.d.ts +54 -0
- package/dist/tools/fileWatcher.js +100 -0
- package/dist/tools/fileWatcher.js.map +1 -0
- package/dist/tools/findFiles.d.ts +31 -0
- package/dist/tools/findFiles.js +119 -0
- package/dist/tools/findFiles.js.map +1 -0
- package/dist/tools/fixAllLintErrors.d.ts +29 -0
- package/dist/tools/fixAllLintErrors.js +114 -0
- package/dist/tools/fixAllLintErrors.js.map +1 -0
- package/dist/tools/flowGuardian.d.ts +61 -0
- package/dist/tools/flowGuardian.js +311 -0
- package/dist/tools/flowGuardian.js.map +1 -0
- package/dist/tools/formatDocument.d.ts +30 -0
- package/dist/tools/formatDocument.js +132 -0
- package/dist/tools/formatDocument.js.map +1 -0
- package/dist/tools/formatFile.d.ts +28 -0
- package/dist/tools/formatFile.js +110 -0
- package/dist/tools/formatFile.js.map +1 -0
- package/dist/tools/getBufferContent.d.ts +38 -0
- package/dist/tools/getBufferContent.js +100 -0
- package/dist/tools/getBufferContent.js.map +1 -0
- package/dist/tools/getCurrentSelection.d.ts +43 -0
- package/dist/tools/getCurrentSelection.js +75 -0
- package/dist/tools/getCurrentSelection.js.map +1 -0
- package/dist/tools/getDiagnostics.d.ts +38 -0
- package/dist/tools/getDiagnostics.js +204 -0
- package/dist/tools/getDiagnostics.js.map +1 -0
- package/dist/tools/getDocumentSymbols.d.ts +27 -0
- package/dist/tools/getDocumentSymbols.js +133 -0
- package/dist/tools/getDocumentSymbols.js.map +1 -0
- package/dist/tools/getFileTree.d.ts +36 -0
- package/dist/tools/getFileTree.js +111 -0
- package/dist/tools/getFileTree.js.map +1 -0
- package/dist/tools/getGitDiff.d.ts +34 -0
- package/dist/tools/getGitDiff.js +57 -0
- package/dist/tools/getGitDiff.js.map +1 -0
- package/dist/tools/getGitLog.d.ts +30 -0
- package/dist/tools/getGitLog.js +65 -0
- package/dist/tools/getGitLog.js.map +1 -0
- package/dist/tools/getGitStatus.d.ts +26 -0
- package/dist/tools/getGitStatus.js +95 -0
- package/dist/tools/getGitStatus.js.map +1 -0
- package/dist/tools/getOpenEditors.d.ts +21 -0
- package/dist/tools/getOpenEditors.js +84 -0
- package/dist/tools/getOpenEditors.js.map +1 -0
- package/dist/tools/getProjectInfo.d.ts +20 -0
- package/dist/tools/getProjectInfo.js +315 -0
- package/dist/tools/getProjectInfo.js.map +1 -0
- package/dist/tools/getToolCapabilities.d.ts +23 -0
- package/dist/tools/getToolCapabilities.js +249 -0
- package/dist/tools/getToolCapabilities.js.map +1 -0
- package/dist/tools/getWorkspaceFolders.d.ts +21 -0
- package/dist/tools/getWorkspaceFolders.js +47 -0
- package/dist/tools/getWorkspaceFolders.js.map +1 -0
- package/dist/tools/gitHistory.d.ts +78 -0
- package/dist/tools/gitHistory.js +151 -0
- package/dist/tools/gitHistory.js.map +1 -0
- package/dist/tools/gitWrite.d.ts +335 -0
- package/dist/tools/gitWrite.js +859 -0
- package/dist/tools/gitWrite.js.map +1 -0
- package/dist/tools/github/actions.d.ts +67 -0
- package/dist/tools/github/actions.js +155 -0
- package/dist/tools/github/actions.js.map +1 -0
- package/dist/tools/github/index.d.ts +4 -0
- package/dist/tools/github/index.js +5 -0
- package/dist/tools/github/index.js.map +1 -0
- package/dist/tools/github/issues.d.ts +140 -0
- package/dist/tools/github/issues.js +279 -0
- package/dist/tools/github/issues.js.map +1 -0
- package/dist/tools/github/pr.d.ts +101 -0
- package/dist/tools/github/pr.js +215 -0
- package/dist/tools/github/pr.js.map +1 -0
- package/dist/tools/github/review.d.ts +101 -0
- package/dist/tools/github/review.js +292 -0
- package/dist/tools/github/review.js.map +1 -0
- package/dist/tools/github/shared.d.ts +4 -0
- package/dist/tools/github/shared.js +12 -0
- package/dist/tools/github/shared.js.map +1 -0
- package/dist/tools/github.d.ts +308 -0
- package/dist/tools/github.js +656 -0
- package/dist/tools/github.js.map +1 -0
- package/dist/tools/hoverAtCursor.d.ts +22 -0
- package/dist/tools/hoverAtCursor.js +51 -0
- package/dist/tools/hoverAtCursor.js.map +1 -0
- package/dist/tools/httpClient.d.ts +83 -0
- package/dist/tools/httpClient.js +335 -0
- package/dist/tools/httpClient.js.map +1 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/index.js +246 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/inlayHints.d.ts +38 -0
- package/dist/tools/inlayHints.js +56 -0
- package/dist/tools/inlayHints.js.map +1 -0
- package/dist/tools/linters/biome.d.ts +2 -0
- package/dist/tools/linters/biome.js +44 -0
- package/dist/tools/linters/biome.js.map +1 -0
- package/dist/tools/linters/cargo.d.ts +2 -0
- package/dist/tools/linters/cargo.js +45 -0
- package/dist/tools/linters/cargo.js.map +1 -0
- package/dist/tools/linters/eslint.d.ts +2 -0
- package/dist/tools/linters/eslint.js +59 -0
- package/dist/tools/linters/eslint.js.map +1 -0
- package/dist/tools/linters/govet.d.ts +2 -0
- package/dist/tools/linters/govet.js +37 -0
- package/dist/tools/linters/govet.js.map +1 -0
- package/dist/tools/linters/pyright.d.ts +2 -0
- package/dist/tools/linters/pyright.js +34 -0
- package/dist/tools/linters/pyright.js.map +1 -0
- package/dist/tools/linters/ruff.d.ts +2 -0
- package/dist/tools/linters/ruff.js +30 -0
- package/dist/tools/linters/ruff.js.map +1 -0
- package/dist/tools/linters/types.d.ts +16 -0
- package/dist/tools/linters/types.js +2 -0
- package/dist/tools/linters/types.js.map +1 -0
- package/dist/tools/linters/typescript.d.ts +2 -0
- package/dist/tools/linters/typescript.js +38 -0
- package/dist/tools/linters/typescript.js.map +1 -0
- package/dist/tools/lsp.d.ts +310 -0
- package/dist/tools/lsp.js +684 -0
- package/dist/tools/lsp.js.map +1 -0
- package/dist/tools/notebook.d.ts +95 -0
- package/dist/tools/notebook.js +144 -0
- package/dist/tools/notebook.js.map +1 -0
- package/dist/tools/openDiff.d.ts +41 -0
- package/dist/tools/openDiff.js +116 -0
- package/dist/tools/openDiff.js.map +1 -0
- package/dist/tools/openFile.d.ts +34 -0
- package/dist/tools/openFile.js +102 -0
- package/dist/tools/openFile.js.map +1 -0
- package/dist/tools/organizeImports.d.ts +29 -0
- package/dist/tools/organizeImports.js +64 -0
- package/dist/tools/organizeImports.js.map +1 -0
- package/dist/tools/planPersistence.d.ts +196 -0
- package/dist/tools/planPersistence.js +437 -0
- package/dist/tools/planPersistence.js.map +1 -0
- package/dist/tools/replaceBlock.d.ts +40 -0
- package/dist/tools/replaceBlock.js +105 -0
- package/dist/tools/replaceBlock.js.map +1 -0
- package/dist/tools/runCommand.d.ts +43 -0
- package/dist/tools/runCommand.js +141 -0
- package/dist/tools/runCommand.js.map +1 -0
- package/dist/tools/runTests.d.ts +32 -0
- package/dist/tools/runTests.js +160 -0
- package/dist/tools/runTests.js.map +1 -0
- package/dist/tools/saveDocument.d.ts +28 -0
- package/dist/tools/saveDocument.js +58 -0
- package/dist/tools/saveDocument.js.map +1 -0
- package/dist/tools/searchAndReplace.d.ts +50 -0
- package/dist/tools/searchAndReplace.js +203 -0
- package/dist/tools/searchAndReplace.js.map +1 -0
- package/dist/tools/searchWorkspace.d.ts +52 -0
- package/dist/tools/searchWorkspace.js +159 -0
- package/dist/tools/searchWorkspace.js.map +1 -0
- package/dist/tools/setActiveWorkspaceFolder.d.ts +28 -0
- package/dist/tools/setActiveWorkspaceFolder.js +32 -0
- package/dist/tools/setActiveWorkspaceFolder.js.map +1 -0
- package/dist/tools/tasks.d.ts +56 -0
- package/dist/tools/tasks.js +89 -0
- package/dist/tools/tasks.js.map +1 -0
- package/dist/tools/terminal.d.ts +241 -0
- package/dist/tools/terminal.js +539 -0
- package/dist/tools/terminal.js.map +1 -0
- package/dist/tools/testRunners/cargoTest.d.ts +2 -0
- package/dist/tools/testRunners/cargoTest.js +123 -0
- package/dist/tools/testRunners/cargoTest.js.map +1 -0
- package/dist/tools/testRunners/goTest.d.ts +2 -0
- package/dist/tools/testRunners/goTest.js +106 -0
- package/dist/tools/testRunners/goTest.js.map +1 -0
- package/dist/tools/testRunners/pytest.d.ts +2 -0
- package/dist/tools/testRunners/pytest.js +133 -0
- package/dist/tools/testRunners/pytest.js.map +1 -0
- package/dist/tools/testRunners/types.d.ts +18 -0
- package/dist/tools/testRunners/types.js +2 -0
- package/dist/tools/testRunners/types.js.map +1 -0
- package/dist/tools/testRunners/vitestJest.d.ts +3 -0
- package/dist/tools/testRunners/vitestJest.js +178 -0
- package/dist/tools/testRunners/vitestJest.js.map +1 -0
- package/dist/tools/typeHierarchy.d.ts +45 -0
- package/dist/tools/typeHierarchy.js +65 -0
- package/dist/tools/typeHierarchy.js.map +1 -0
- package/dist/tools/utils.d.ts +54 -0
- package/dist/tools/utils.js +267 -0
- package/dist/tools/utils.js.map +1 -0
- package/dist/tools/vscodeCommands.d.ts +59 -0
- package/dist/tools/vscodeCommands.js +108 -0
- package/dist/tools/vscodeCommands.js.map +1 -0
- package/dist/tools/watchDiagnostics.d.ts +32 -0
- package/dist/tools/watchDiagnostics.js +87 -0
- package/dist/tools/watchDiagnostics.js.map +1 -0
- package/dist/tools/workspaceSettings.d.ts +67 -0
- package/dist/tools/workspaceSettings.js +102 -0
- package/dist/tools/workspaceSettings.js.map +1 -0
- package/dist/tools/workspaceSnapshots.d.ts +174 -0
- package/dist/tools/workspaceSnapshots.js +474 -0
- package/dist/tools/workspaceSnapshots.js.map +1 -0
- package/dist/transport.d.ts +57 -0
- package/dist/transport.js +417 -0
- package/dist/transport.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/dist/wsUtils.d.ts +9 -0
- package/dist/wsUtils.js +54 -0
- package/dist/wsUtils.js.map +1 -0
- package/package.json +69 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Oolab Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
# Claude IDE Bridge
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/claude-ide-bridge)
|
|
4
|
+
[](https://github.com/Oolab-labs/claude-ide-bridge/actions/workflows/ci.yml)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
7
|
+
A standalone MCP bridge that gives [Claude Code](https://claude.ai/code) full IDE integration — **115+ tools** for LSP, debugging, terminals, Git, GitHub, diagnostics, and more. Works with any VS Code-compatible editor (VS Code, Windsurf, Cursor) and pairs with a companion extension for real-time editor state.
|
|
8
|
+
|
|
9
|
+
## How It Works
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Your Phone / Laptop Your Computer
|
|
13
|
+
┌──────────────┐ ┌─────────────────────────────┐
|
|
14
|
+
│ Claude Code │───── SSH/local ─────│ Bridge Server │
|
|
15
|
+
│ (CLI) │ │ ↕ WebSocket │
|
|
16
|
+
└──────────────┘ │ IDE Extension (VS Code) │
|
|
17
|
+
│ ↕ Real-time state │
|
|
18
|
+
│ Your Code & Editor │
|
|
19
|
+
└─────────────────────────────┘
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Claude Code connects to the bridge, which connects to your IDE extension. Claude can then open files, run tests, set breakpoints, check diagnostics, commit to Git, create PRs — everything a developer at the keyboard can do.
|
|
23
|
+
|
|
24
|
+
**Use it from your phone**: SSH into your dev machine, run Claude Code, and control your full IDE from the couch. Watch files change in real-time on your monitor.
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install -g claude-ide-bridge
|
|
30
|
+
|
|
31
|
+
# Start the bridge
|
|
32
|
+
claude-ide-bridge --workspace /path/to/your-project
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Or from source:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git clone https://github.com/Oolab-labs/claude-ide-bridge.git
|
|
39
|
+
cd claude-ide-bridge
|
|
40
|
+
npm install && npm run build
|
|
41
|
+
npm start -- --workspace /path/to/your-project
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Install the VS Code extension for full capabilities:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
cd vscode-extension
|
|
48
|
+
npm install && npm run build && npm run package
|
|
49
|
+
# Install the .vsix in your editor
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Then start Claude Code and connect:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
claude
|
|
56
|
+
# The bridge MCP server will be available
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Full Orchestrator
|
|
60
|
+
|
|
61
|
+
The `start-all` script launches everything in a tmux session (bridge + Claude Code + remote control):
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm run start-all -- --workspace /path/to/your-project
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Claude Code Plugin
|
|
68
|
+
|
|
69
|
+
The bridge ships as a **Claude Code plugin** with 6 skills, 3 subagents, and 3 hooks:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Load the plugin
|
|
73
|
+
claude --plugin-dir ./claude-ide-bridge-plugin
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Skills
|
|
77
|
+
|
|
78
|
+
| Skill | Description |
|
|
79
|
+
|-------|-------------|
|
|
80
|
+
| `/ide-debug` | Full debug cycle: run tests, set breakpoints, evaluate expressions, fix, verify |
|
|
81
|
+
| `/ide-review` | Deep PR review using LSP code intelligence + GitHub tools |
|
|
82
|
+
| `/ide-quality` | Multi-language lint sweep + auto-fix + format + optional commit |
|
|
83
|
+
| `/ide-refactor` | Safe refactoring with snapshot checkpoints and auto-rollback |
|
|
84
|
+
| `/ide-explore` | Codebase exploration using LSP (runs in isolated Explore agent) |
|
|
85
|
+
| `/ide-monitor` | Continuous monitoring for diagnostics, tests, or terminal output |
|
|
86
|
+
|
|
87
|
+
### Subagents
|
|
88
|
+
|
|
89
|
+
| Agent | Description |
|
|
90
|
+
|-------|-------------|
|
|
91
|
+
| `ide-code-reviewer` | Evidence-based code review using LSP tools, with persistent memory |
|
|
92
|
+
| `ide-debugger` | Autonomous debug cycles with breakpoints and expression evaluation |
|
|
93
|
+
| `ide-test-runner` | Runs tests, categorizes failures, applies fixes |
|
|
94
|
+
|
|
95
|
+
### Hooks
|
|
96
|
+
|
|
97
|
+
| Event | What it does |
|
|
98
|
+
|-------|-------------|
|
|
99
|
+
| `PostToolUse` on Edit/Write | Reminds Claude to check diagnostics after file edits |
|
|
100
|
+
| `SessionStart` | Reports bridge status, connection, and tool count |
|
|
101
|
+
| `SubagentStart` | Verifies bridge is alive before IDE subagents run |
|
|
102
|
+
|
|
103
|
+
## 115+ MCP Tools
|
|
104
|
+
|
|
105
|
+
### File Operations (7)
|
|
106
|
+
`openFile` · `openDiff` · `saveDocument` · `close_tab` · `closeAllDiffTabs` · `checkDocumentDirty` · `getOpenEditors`
|
|
107
|
+
|
|
108
|
+
### LSP / Code Intelligence (12)
|
|
109
|
+
`goToDefinition` · `findReferences` · `getHover` · `getCodeActions` · `applyCodeAction` · `renameSymbol` · `searchSymbols` · `getDocumentSymbols` · `getCallHierarchy` · `getTypeHierarchy` · `getImplementations` · `getInlayHints`
|
|
110
|
+
|
|
111
|
+
### Debugging (5)
|
|
112
|
+
`setDebugBreakpoints` · `startDebugging` · `evaluateInDebugger` · `getDebugState` · `stopDebugging`
|
|
113
|
+
|
|
114
|
+
### Terminal (7)
|
|
115
|
+
`createTerminal` · `runInTerminal` · `waitForTerminalOutput` · `getTerminalOutput` · `listTerminals` · `sendTerminalInput` · `closeTerminal`
|
|
116
|
+
|
|
117
|
+
### Git (15)
|
|
118
|
+
`gitStatus` · `gitDiff` · `gitLog` · `gitAdd` · `gitCommit` · `gitPush` · `gitPull` · `gitBranch` · `gitCheckout` · `gitStash` · `gitBlame` · `gitMerge` · `gitRebase` · `gitTag` · `gitRemote`
|
|
119
|
+
|
|
120
|
+
### GitHub (11)
|
|
121
|
+
`githubCreatePR` · `githubViewPR` · `githubGetPRDiff` · `githubPostPRReview` · `githubListPRs` · `githubMergePR` · `githubCreateIssue` · `githubListIssues` · `githubViewIssue` · `githubListReleases` · `githubCreateRelease`
|
|
122
|
+
|
|
123
|
+
### Diagnostics & Testing (3)
|
|
124
|
+
`getDiagnostics` · `runTests` · `diffDebug`
|
|
125
|
+
|
|
126
|
+
### Code Quality (3)
|
|
127
|
+
`fixAllLintErrors` · `formatDocument` · `organizeImports`
|
|
128
|
+
|
|
129
|
+
### Snapshots & Plans (10)
|
|
130
|
+
`createSnapshot` · `restoreSnapshot` · `diffSnapshot` · `listSnapshots` · `deleteSnapshot` · `createPlan` · `updatePlan` · `getPlan` · `listPlans` · `deletePlan`
|
|
131
|
+
|
|
132
|
+
### Editor State (7)
|
|
133
|
+
`getCurrentSelection` · `getLatestSelection` · `getOpenEditors` · `getActiveEditor` · `getVisibleRange` · `revealRange` · `showMessage`
|
|
134
|
+
|
|
135
|
+
### And More
|
|
136
|
+
Text editing · Workspace management · HTTP requests · File watchers · Notebooks · Decorations · VS Code commands
|
|
137
|
+
|
|
138
|
+
| Category | Count | Extension Required |
|
|
139
|
+
|----------|------:|:-:|
|
|
140
|
+
| File Operations | 7 | No |
|
|
141
|
+
| Git | 15 | No |
|
|
142
|
+
| GitHub | 11 | No (requires `gh`) |
|
|
143
|
+
| LSP / Code Intelligence | 12 | Yes (with fallbacks) |
|
|
144
|
+
| Editor State | 7 | Yes |
|
|
145
|
+
| Text Editing | 5 | Yes |
|
|
146
|
+
| Terminal | 7 | Yes |
|
|
147
|
+
| Diagnostics & Testing | 3 | Mixed |
|
|
148
|
+
| Code Quality | 3 | Yes |
|
|
149
|
+
| Debug | 5 | Yes |
|
|
150
|
+
| Decorations | 2 | Yes |
|
|
151
|
+
| Workspace Management | 4 | No |
|
|
152
|
+
| Snapshots & Plans | 10 | No |
|
|
153
|
+
| HTTP | 2 | No |
|
|
154
|
+
| VS Code Integration | 8 | Yes |
|
|
155
|
+
| Notebooks | 3 | Yes |
|
|
156
|
+
| **Total** | **~115** | |
|
|
157
|
+
|
|
158
|
+
## Headless / CI Usage
|
|
159
|
+
|
|
160
|
+
Use with `claude -p` for automation:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# Fix all lint errors
|
|
164
|
+
claude -p "Use getDiagnostics to find all errors, then fix them" \
|
|
165
|
+
--mcp-config ./mcp-bridge.json
|
|
166
|
+
|
|
167
|
+
# Run tests and fix failures
|
|
168
|
+
claude -p "Run tests with runTests, fix any failures, and commit" \
|
|
169
|
+
--mcp-config ./mcp-bridge.json
|
|
170
|
+
|
|
171
|
+
# Generate architecture overview
|
|
172
|
+
claude -p "Map the project using getFileTree, getDocumentSymbols, and getCallHierarchy" \
|
|
173
|
+
--mcp-config ./mcp-bridge.json --output-format json
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Supported Editors
|
|
177
|
+
|
|
178
|
+
| Editor | Status |
|
|
179
|
+
|--------|--------|
|
|
180
|
+
| VS Code | Supported |
|
|
181
|
+
| Windsurf | Supported |
|
|
182
|
+
| Cursor | Supported |
|
|
183
|
+
| Google Antigravity | Supported |
|
|
184
|
+
|
|
185
|
+
Install the extension in any supported editor:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
bash scripts/install-extension.sh --ide <name>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## CLI Options
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
--workspace <path> Workspace folder (default: cwd)
|
|
195
|
+
--ide-name <name> IDE name shown to Claude (default: auto-detect)
|
|
196
|
+
--editor <cmd> Editor CLI command (default: auto-detect)
|
|
197
|
+
--port <number> Force specific port (default: random)
|
|
198
|
+
--linter <name> Enable specific linter (repeatable; default: auto-detect)
|
|
199
|
+
--allow-command <cmd> Add command to execution allowlist (repeatable)
|
|
200
|
+
--timeout <ms> Command timeout in ms (default: 30000, max: 120000)
|
|
201
|
+
--max-result-size <KB> Max output size in KB (default: 512, max: 4096)
|
|
202
|
+
--verbose Enable debug logging
|
|
203
|
+
--help Show this help
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Architecture
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
claude-ide-bridge/
|
|
210
|
+
src/
|
|
211
|
+
bridge.ts Main orchestrator
|
|
212
|
+
server.ts HTTP/WebSocket server
|
|
213
|
+
transport.ts MCP transport layer
|
|
214
|
+
extensionClient.ts Extension WebSocket client
|
|
215
|
+
config.ts CLI args & config
|
|
216
|
+
tools/ 115+ MCP tool implementations
|
|
217
|
+
vscode-extension/
|
|
218
|
+
src/extension.ts VS Code extension
|
|
219
|
+
src/connection.ts WebSocket connection management
|
|
220
|
+
src/handlers/ Request handlers (terminal, lsp, debug, ...)
|
|
221
|
+
claude-ide-bridge-plugin/
|
|
222
|
+
skills/ 6 slash commands
|
|
223
|
+
agents/ 3 specialized subagents
|
|
224
|
+
hooks/ 3 lifecycle automations
|
|
225
|
+
.mcp.json MCP server config
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Connection Hardening
|
|
229
|
+
|
|
230
|
+
Production-grade reliability:
|
|
231
|
+
- WebSocket heartbeat (20s) with automatic reconnect
|
|
232
|
+
- Sleep/wake detection via heartbeat gap monitoring
|
|
233
|
+
- Circuit breaker with exponential backoff for timeout cascades
|
|
234
|
+
- Generation counter preventing stale handler responses
|
|
235
|
+
- Extension-required tool filtering when extension disconnects
|
|
236
|
+
- 601 tests across bridge and extension
|
|
237
|
+
|
|
238
|
+
## Building
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
# Bridge
|
|
242
|
+
npm run build # TypeScript compilation
|
|
243
|
+
npm run dev # Development with tsx
|
|
244
|
+
npm test # Run 359 bridge tests
|
|
245
|
+
|
|
246
|
+
# Extension
|
|
247
|
+
cd vscode-extension
|
|
248
|
+
npm run build # esbuild bundle
|
|
249
|
+
npm run package # Create .vsix
|
|
250
|
+
npm test # Run 242 extension tests
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Contributing
|
|
254
|
+
|
|
255
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, code style, and how to add new tools.
|
|
256
|
+
|
|
257
|
+
## Support
|
|
258
|
+
|
|
259
|
+
If Claude IDE Bridge saves you time, consider [sponsoring the project](https://github.com/sponsors/Oolab-labs).
|
|
260
|
+
|
|
261
|
+
## License
|
|
262
|
+
|
|
263
|
+
MIT
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ActivityEntry {
|
|
2
|
+
id: number;
|
|
3
|
+
timestamp: string;
|
|
4
|
+
tool: string;
|
|
5
|
+
durationMs: number;
|
|
6
|
+
status: "success" | "error";
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class ActivityLog {
|
|
10
|
+
private entries;
|
|
11
|
+
private nextId;
|
|
12
|
+
private maxEntries;
|
|
13
|
+
constructor(maxEntries?: number);
|
|
14
|
+
record(tool: string, durationMs: number, status: "success" | "error", errorMessage?: string): void;
|
|
15
|
+
query(opts?: {
|
|
16
|
+
tool?: string;
|
|
17
|
+
status?: string;
|
|
18
|
+
last?: number;
|
|
19
|
+
}): ActivityEntry[];
|
|
20
|
+
toPrometheus(): string;
|
|
21
|
+
stats(): Record<string, {
|
|
22
|
+
count: number;
|
|
23
|
+
avgDurationMs: number;
|
|
24
|
+
errors: number;
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
function escapeLabelValue(s) {
|
|
2
|
+
return s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n");
|
|
3
|
+
}
|
|
4
|
+
export class ActivityLog {
|
|
5
|
+
entries = [];
|
|
6
|
+
nextId = 1;
|
|
7
|
+
maxEntries;
|
|
8
|
+
constructor(maxEntries = 500) {
|
|
9
|
+
this.maxEntries = maxEntries;
|
|
10
|
+
}
|
|
11
|
+
record(tool, durationMs, status, errorMessage) {
|
|
12
|
+
this.entries.push({
|
|
13
|
+
id: this.nextId++,
|
|
14
|
+
timestamp: new Date().toISOString(),
|
|
15
|
+
tool,
|
|
16
|
+
durationMs,
|
|
17
|
+
status,
|
|
18
|
+
errorMessage,
|
|
19
|
+
});
|
|
20
|
+
if (this.entries.length > this.maxEntries * 1.2) {
|
|
21
|
+
// Batch eviction: drop the oldest 20% instead of shift() on every insert
|
|
22
|
+
this.entries = this.entries.slice(-this.maxEntries);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
query(opts) {
|
|
26
|
+
let result = this.entries;
|
|
27
|
+
if (opts?.tool)
|
|
28
|
+
result = result.filter((e) => e.tool === opts.tool);
|
|
29
|
+
if (opts?.status)
|
|
30
|
+
result = result.filter((e) => e.status === opts.status);
|
|
31
|
+
const last = Math.min(opts?.last ?? 50, 200);
|
|
32
|
+
return result.slice(-last);
|
|
33
|
+
}
|
|
34
|
+
toPrometheus() {
|
|
35
|
+
const s = this.stats();
|
|
36
|
+
const lines = [];
|
|
37
|
+
lines.push("# HELP bridge_tool_calls_total Total tool calls by tool name and status");
|
|
38
|
+
lines.push("# TYPE bridge_tool_calls_total counter");
|
|
39
|
+
for (const [tool, data] of Object.entries(s)) {
|
|
40
|
+
const t = escapeLabelValue(tool);
|
|
41
|
+
lines.push(`bridge_tool_calls_total{tool="${t}",status="success"} ${data.count - data.errors}`);
|
|
42
|
+
lines.push(`bridge_tool_calls_total{tool="${t}",status="error"} ${data.errors}`);
|
|
43
|
+
}
|
|
44
|
+
lines.push("# HELP bridge_tool_duration_ms_avg Average tool duration in milliseconds");
|
|
45
|
+
lines.push("# TYPE bridge_tool_duration_ms_avg gauge");
|
|
46
|
+
for (const [tool, data] of Object.entries(s)) {
|
|
47
|
+
const t = escapeLabelValue(tool);
|
|
48
|
+
lines.push(`bridge_tool_duration_ms_avg{tool="${t}"} ${data.avgDurationMs}`);
|
|
49
|
+
}
|
|
50
|
+
lines.push("# HELP bridge_uptime_seconds Process uptime in seconds");
|
|
51
|
+
lines.push("# TYPE bridge_uptime_seconds gauge");
|
|
52
|
+
lines.push(`bridge_uptime_seconds ${Math.floor(process.uptime())}`);
|
|
53
|
+
return `${lines.join("\n")}\n`;
|
|
54
|
+
}
|
|
55
|
+
stats() {
|
|
56
|
+
const map = new Map();
|
|
57
|
+
for (const entry of this.entries) {
|
|
58
|
+
const s = map.get(entry.tool) ?? { count: 0, totalMs: 0, errors: 0 };
|
|
59
|
+
s.count++;
|
|
60
|
+
s.totalMs += entry.durationMs;
|
|
61
|
+
if (entry.status === "error")
|
|
62
|
+
s.errors++;
|
|
63
|
+
map.set(entry.tool, s);
|
|
64
|
+
}
|
|
65
|
+
const result = {};
|
|
66
|
+
for (const [tool, s] of map) {
|
|
67
|
+
result[tool] = {
|
|
68
|
+
count: s.count,
|
|
69
|
+
avgDurationMs: Math.round(s.totalMs / s.count),
|
|
70
|
+
errors: s.errors,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=activityLog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activityLog.js","sourceRoot":"","sources":["../src/activityLog.ts"],"names":[],"mappings":"AASA,SAAS,gBAAgB,CAAC,CAAS;IACjC,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,OAAO,WAAW;IACd,OAAO,GAAoB,EAAE,CAAC;IAC9B,MAAM,GAAG,CAAC,CAAC;IACX,UAAU,CAAS;IAE3B,YAAY,UAAU,GAAG,GAAG;QAC1B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED,MAAM,CACJ,IAAY,EACZ,UAAkB,EAClB,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EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;YACrE,CAAC,CAAC,KAAK,EAAE,CAAC;YACV,CAAC,CAAC,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC;YAC9B,IAAI,KAAK,CAAC,MAAM,KAAK,OAAO;gBAAE,CAAC,CAAC,MAAM,EAAE,CAAC;YACzC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACzB,CAAC;QACD,MAAM,MAAM,GAGR,EAAE,CAAC;QACP,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;YAC5B,MAAM,CAAC,IAAI,CAAC,GAAG;gBACb,KAAK,EAAE,CAAC,CAAC,KAAK;gBACd,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC;gBAC9C,MAAM,EAAE,CAAC,CAAC,MAAM;aACjB,CAAC;QACJ,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
package/dist/bridge.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Config } from "./config.js";
|
|
2
|
+
export declare class Bridge {
|
|
3
|
+
private config;
|
|
4
|
+
private logger;
|
|
5
|
+
private lockFile;
|
|
6
|
+
private server;
|
|
7
|
+
private extensionClient;
|
|
8
|
+
private activityLog;
|
|
9
|
+
private authToken;
|
|
10
|
+
private sessions;
|
|
11
|
+
private fileLock;
|
|
12
|
+
private probes;
|
|
13
|
+
private stopped;
|
|
14
|
+
private listChangedTimer;
|
|
15
|
+
constructor(config: Config);
|
|
16
|
+
private cleanupSession;
|
|
17
|
+
start(): Promise<void>;
|
|
18
|
+
stop(): Promise<void>;
|
|
19
|
+
}
|