chore: fix clippy warnings, add embedding/omni_patch, update telemetry, and ignore temp files

This commit is contained in:
Riz Ashraf committed 2026-09-29 06:42:29 +01:00
1 parent 495304f3fa
commit 98a1716ac8
23 files changed
+2253 -75

No files matched your search

+14 -3
View File
@@ -25,7 +25,7 @@ The server hosts a rich Single Page Application (SPA) natively on the root route
* `GET /api/stats`: Returns a JSON snapshot of current entity, relation, task, and tech debt counts.
### Git & IDE Integration Endpoints
* `POST /nvim/telemetry`: A one-way webhook that Neovim instances hit on `FocusGained` or `BufEnter` to globally broadcast the user's active file to the UI and Agent.
* `UDP /nvim/telemetry`: A one-way connectionless datagram listener that Neovim instances hit on `FocusGained` or `BufEnter` to globally broadcast the user's active file to the UI and Agent.
* `GET /gate/verify`: A lightweight, deterministic endpoint used by external scripts (like a `git push` wrapper) to verify if an action is authorized based on the current state.
## 3. Client Connections
@@ -127,7 +127,7 @@ eqwest and okio).
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.
A lightweight Lua script (`gemini-integration.lua`) is loaded into Neovim, which fires an asynchronous UDP datagram to `127.0.0.1:3002` (fire-and-forget via native libuv) whenever the user focuses a buffer or moves the cursor. The server then writes this data (including `session_id`, `file`, `line`, and `col`) to both the Windows and WSL `active_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.
@@ -162,4 +162,15 @@ Historically, the project relied on a complex Python testing suite (\pytest\ + \
* **E2E Tests:** Integration and full-system tests run via \stub/tests/e2e.rs\ and \win-nvim/tests/integration_test.rs\, ensuring type safety, faster execution, and eliminating Python environment dependencies.
## 17. Automated Git Context Binding (git2)
Instead of forcing the LLM client to manually run `git rev-parse HEAD` and pass `git_branch` / `git_commit` arguments for every single code change, the server integrates the native **`git2`** C bindings.
When engineering endpoints (`log_code_change`, `log_error_fix`, `log_tech_debt`) are invoked, the server asynchronously discovers the surrounding Git repository, peels the HEAD reference, and automatically injects the current commit hash, commit message, and branch name directly into the stored entities and audit logs. This guarantees airtight VCS traceability without wasting LLM tokens or relying on the agent's memory.
When engineering endpoints (`log_code_change`, `log_error_fix`, `log_tech_debt`) are invoked, the server asynchronously discovers the surrounding Git repository, peels the HEAD reference, and automatically injects the current commit hash, commit message, and branch name directly into the stored entities and audit logs. This guarantees airtight VCS traceability without wasting LLM tokens or relying on the agent's memory.
## 18. Upcoming Enhancements
### A. Vector Embeddings for Semantic Search
The `omni_search` will be upgraded from purely lexical `tantivy` indexing to include a local ONNX embedding model (via `fastembed`). This allows semantic retrieval of `ErrorFix` and `TechDebt` entries even when exact vocabulary does not match.
### B. Passive Terminal Ingestion
A shell hook system (PowerShell/Nushell) will silently POST terminal execution history and exit codes to `/terminal/history`. LLMs can passively read this via the `memory://terminal/recent` resource, eliminating the need for the user to manually copy/paste stack traces.
### C. Graph Summarization & Decay
To prevent context window bloat, the Redb engine will enforce TTLs on ephemeral nodes (`StickyNotes`, minor `Tasks`). Furthermore, an `archive_routine` prompt will allow subagents to automatically compress older `SessionSummaries` into dense milestone retrospectives.