Fix MCP hangs and add logging
This commit is contained in:
1 parent
75748f0e21
commit
f2582b58be
18 files changed
+1034
-39
No files matched your search
@@ -115,3 +115,29 @@ eqwest and okio).
|
||||
* **Role:** A dedicated, OS-agnostic proxy binary used strictly for routing stdio JSON-RPC traffic over HTTP to a remote Leader. Windows gy clients point directly to this binary to bypass loading the heavy Server daemon into memory.
|
||||
* **WSL Behavior:** Compiled as a Linux native binary (x86_64-unknown-linux-musl). When executed by WSL agy, it acts as a transparent proxy to http://127.0.0.1:3000. It can also execute wake_cmd (e.g., WSL interop) to silently wake the Windows host if the Leader is offline.
|
||||
|
||||
|
||||
|
||||
## 14. Neovim Integration Architecture & "God Mode"
|
||||
To enable seamless pair-programming inside Neovim, the daemon integrates with Neovim using two complementary systems: a Webhook Telemetry pipeline and dedicated MCP binaries.
|
||||
|
||||
### Telemetry Pipeline (Last Focused Wins)
|
||||
A lightweight Lua script (gemini-integration.lua) is loaded into Neovim, which fires an asynchronous curl POST to http://127.0.0.1:3000/nvim/telemetry whenever the user focuses a buffer or moves the cursor. The server then writes this data (including session_id, ile, line, and col) to both the Windows and WSL ctive_nvim.txt files and broadcasts it over WebSockets.
|
||||
|
||||
### Native MCP Binaries (win-nvim & linux-nvim)
|
||||
The project compiles two standalone, highly-performant binaries that implement the MCP JSON-RPC protocol over Stdio and bridge it directly to Neovim's Msgpack-RPC Named Pipes/Sockets. These binaries avoid hardcoding infinite tools by utilizing a "God Mode" escape hatch.
|
||||
|
||||
Exposed Neovim Tools:
|
||||
* **
|
||||
vim_get_active_buffer &
|
||||
vim_get_cursor**: Read file state.
|
||||
* **
|
||||
vim_goto_line &
|
||||
vim_set_diagnostics**: Manipulate IDE state.
|
||||
* **
|
||||
vim_get_visual_selection**: Read exact highlight coordinates (handles mode dynamically).
|
||||
* **
|
||||
vim_list_buffers**: Discover unsaved work and context.
|
||||
* **
|
||||
vim_get_diagnostics**: Read live LSP errors dynamically instead of requiring a compiler.
|
||||
* **
|
||||
vim_execute_lua ("God Mode")**: The ultimate fallback tool. Evaluates raw Lua scripts inside the active Neovim instance and returns JSON. This prevents the need to continuously recompile the Rust server whenever a new Neovim capability is required.
|
||||
Reference in new issue
Block a user