Commit Graph
100 Commits
Author SHA1 Message Date
Riz Ashraf 14db90acbf fix(nvim): remove unused mut variables 2026-09-23 05:00:35 +01:00
Riz Ashraf e5d4002b38 docs: update instructions to enforce usage of auto-spawning headless neovim instance 2026-09-23 04:55:11 +01:00
Riz Ashraf 914cecbaf2 feat(nvim): implement auto-spawning headless instance and interactive preemption 2026-09-23 04:53:09 +01:00
Riz Ashraf 7d783d2f37 docs: update tool prefixes in root instructions.md 2026-09-23 04:32:28 +01:00
Riz Ashraf da98391ef9 docs(nvim): update instructions.md with correct tool names and new window tools 2026-09-23 04:30:38 +01:00
Riz Ashraf 4cae55bab3 refactor(justfile): decouple build and deploy steps 2026-09-23 04:22:02 +01:00
Riz Ashraf e0eeb4b0a6 chore(justfile): add 'all' recipe that builds and deploys everything 2026-09-23 04:18:51 +01:00
Riz Ashraf be9ad8127a chore(server): correct startup log message 2026-09-23 04:14:53 +01:00
Riz Ashraf 7729b4ae5a fix(nvim): resolve idle zombie connection lock and adjust RPC timeout
- Remove the arbitrary 60-second read timeout on the Neovim socket that caused the read task to exit during idle periods, permanently locking the connection state.
- Automatically clear the connection state variable when the read loop breaks (e.g. true EOF), allowing get_nvim_connection() to correctly auto-reconnect on the next call.
- Increase the Neovim RPC call timeout from 10s to 30s to accommodate heavier operations (e.g., massive Lua regex substitutions) without falsely dropping the connection.
2026-09-23 04:09:09 +01:00
Riz Ashraf ab1d209c1d feat(nvim): complete window management symmetry
- Add
vim_close_window to unsplit active layout without destroying underlying buffer.
- Add
vim_list_windows to discover active splits.
- Add
vim_get_active_window and
vim_set_active_window to programmatically navigate windows.
2026-09-23 04:05:39 +01:00
Riz Ashraf 6a89f50cf2 feat(nvim-core): implement nvim_set_extmark for rich virtual text UI feedback
- Added nvim_set_extmark tool schema and handler
- Implemented lua bridge using vim.api.nvim_buf_set_extmark to dynamically overlay ghost text and highlight groups onto active buffers
2026-09-22 22:34:06 +01:00
Riz Ashraf ea735003e2 feat(nvim-core): implement bidirectional event streaming and real-time shadow buffer
- Created global thread-safe NvimState to shadow Neovim context.
- Injected Lua autocmds (CursorMoved, TextChanged) on connection to stream events back to MCP.
- Upgraded msgpack RPC loop to intercept and parse 'mcp_event' notifications alongside standard responses.
- Optimized nvim_get_cursor to pull instantly from the local shadow buffer, bypassing RPC round-trips.
2026-09-22 22:32:37 +01:00
Riz Ashraf 61b03bc6e3 perf(nvim-core): implement zero-copy BytesMut stream buffer and DashMap for lock contention 2026-09-22 22:26:00 +01:00
Riz Ashraf 37003be620 refactor: apply rust best practices and fix memory optimizations
- Optimized memory allocation in router.rs by offloading JSON serialization to spawn_blocking and using references.
- Prevented full graph duplication on startup in state.rs index rebuild.
- Eliminated massive String allocations in QueryGraphPathHandler BFS loops.
- Avoided temporary Strings in VisualizeGraphHandler via inline writing.
- Fixed O(N) full-graph deduplication in MergeEntitiesHandler to scale efficiently.
2026-09-22 22:01:38 +01:00
Riz Ashraf 251757f8fc feat(mcp): implement Prompts capability, Resources, and clean up daemon architecture 2026-09-22 21:41:17 +01:00
Riz Ashraf 9b9b403ef2 fix(build): cleanly terminate all mcp binaries on deploy and supply bearer token to shutdown 2026-09-22 06:58:38 +01:00
Riz Ashraf d8285a41c7 feat(server): embed LLM handshake instructions in MCP initialization 2026-09-22 06:51:08 +01:00
Riz Ashraf 27aba454e2 perf(server): fix broadcast loops, avoid locking db on index, eliminate O(N*M) search, and fix db loss 2026-09-22 06:33:32 +01:00
Riz Ashraf 1e39122e05 fix: remove potential panic on initialize result serialization in nvim-core 2026-09-22 06:16:06 +01:00
Riz Ashraf b2f15de58c style: fix clippy collapsible_if warnings in nvim-core 2026-09-22 06:07:50 +01:00
Riz Ashraf 148025c5a7 fix: replace pending_requests Mutex unwrap with unwrap_or_else to prevent poison panics 2026-09-22 06:00:54 +01:00
Riz Ashraf dd4a71d44d build: upgrade all workspace crates to rust edition 2024 2026-09-22 05:58:30 +01:00
Riz Ashraf b8070de38c refactor: deduplicate lua execution match blocks in nvim-core using handle_lua_result macro 2026-09-22 05:57:50 +01:00
Riz Ashraf 02f40604e1 perf: fix slice boundary panics, eliminate string allocation in stdio reader, fix lua table nesting bug, and optimize nvim socket chunk size 2026-09-22 05:51:15 +01:00
Riz Ashraf e215720416 chore: remove unused dependencies discovered by cargo-machete 2026-09-22 05:44:09 +01:00
Riz Ashraf 961a5a9e1b chore: strip unused rustls configurations to drastically speed up compilation 2026-09-22 05:40:11 +01:00
Riz Ashraf 0db94da646 Merge branch 'master' of ssh://gitea.rizaz.com:222/riz/mcp-memory 2026-09-22 05:08:54 +01:00
Riz Ashraf c8f8ff8997 chore: update major dependencies and fix API breakages 2026-09-22 05:08:42 +01:00
Riz Ashraf 8adef5e216 perf(nvim-core): eliminate heavy string allocations for JSON-RPC msgids in internal request mapping 2026-09-22 04:50:30 +01:00
Riz Ashraf 05672cc884 perf(nvim-core): eliminate JSON serialization overhead and potential Lua injection across all tools by passing arguments directly to nvim_exec_lua 2026-09-22 04:46:29 +01:00
Riz Ashraf 78e94c6aea chore: remove unused variables and tracing dependency in nvim-core 2026-09-22 04:41:14 +01:00
Riz Ashraf f76d8ccce8 perf: fix memory leaks, optimize tracing logs, fix networking eof fragmentation bug in nvim-core and stub, and deduplicate json-rpc handlers 2026-09-22 04:31:50 +01:00
Riz Ashraf ce88bef45e chore(server): remove dead scratch scripts, temporary files, and unused legacy modules 2026-09-22 03:34:13 +01:00
Riz Ashraf 1069096a29 fix(tasks): eliminate target_id string clone during dependency mapping in UpdateTaskStatusHandler 2026-09-22 03:29:28 +01:00
Riz Ashraf 478655698e fix(server): safely drop detached tokio join handles and refactor timestamp boilerplate 2026-09-22 03:19:51 +01:00
Riz Ashraf 13c7eca4c2 perf(server): eliminate O(N) heap cloning across standup, snippet, and graph handlers 2026-09-21 20:27:33 +01:00
Riz Ashraf 9d7cd347c6 style(server): collapse nested if conditions via clippy 2026-09-21 20:13:38 +01:00
Riz Ashraf f37a2f8313 style(server): remove unused get_full_graph method to clear clippy warning 2026-09-21 20:12:25 +01:00
Riz Ashraf da1b7cdc9d fix(mcp): wrap websocket activity broadcasts in JSON-RPC notifications
Fixes a critical bug where the Antigravity MCP client would crash with 'invalid message version tag' during long-running tool executions. The server was broadcasting raw JSON activity objects ({'type': 'activity', 'data': ...}) over the WebSocket connection without wrapping them in the required JSON-RPC 2.0 Notification envelope, violating the protocol expectation on the proxy stub.
2026-09-21 19:56:03 +01:00
Riz Ashraf 208c5d448f perf(api): eliminate expensive heap allocations and memory clones by serializing axum response payloads directly from store read locks 2026-09-21 19:33:06 +01:00
Riz Ashraf af2c4ab046 fix(search): prevent memory leaks and duplication in tantivy search index by explicitly deleting prior terms during updates and syncing store deletions 2026-09-21 19:16:55 +01:00
Riz Ashraf 7dc0c329ad fix(core): remove all unwraps, fix unpolled futures, and fix search index memory leak on restart 2026-09-21 18:54:19 +01:00
Riz Ashraf ae0ea9ab22 feat(server): persist activity history on the server and expose it to the dashboard UI via /api/activity instead of relying on fragile localStorage 2026-09-21 18:01:21 +01:00
Riz Ashraf bf7bf48163 fix(server): gracefully ignore MCP notifications (e.g. notifications/roots/list_changed) instead of returning a Method Not Found error that causes JSON-RPC clients to drop connections 2026-09-21 17:47:48 +01:00
Riz Ashraf d3fce30ca5 perf(search): eliminate full struct clones when indexing documents into tantivy by building documents on the dispatch thread before crossing the spawn_blocking boundary 2026-09-21 17:20:01 +01:00
Riz Ashraf 58ad2e76a3 style(server): fix all clippy warnings including derivable traits, redundant locals, collapsible blocks and needless borrows 2026-09-21 17:08:57 +01:00
Riz Ashraf 4c4150a042 perf(tasks): refactor update and delete task handlers to eliminate string clones when mapping task relationships by relying on reference closures and index queues 2026-09-21 16:55:06 +01:00
Riz Ashraf 42d3638cf8 fix(server): remove rwlock unwraps to prevent panic on lock poison and optimize omni search to serialize inner loops without allocations 2026-09-21 16:49:21 +01:00
Riz Ashraf 1af21b3aec perf(search): eliminate full database cloning during tantivy index rebuilds by moving iteration into a synchronized blocking thread 2026-09-21 16:42:14 +01:00
Riz Ashraf 8934857635 perf(graph): eliminate heavy allocations by substituting KnowledgeGraph clones with BorrowedGraph for json serialization 2026-09-21 16:33:48 +01:00
Riz Ashraf 1d5e4bd00d perf(server): eliminate implicit full-collection clones by removing Store::read() in favor of read_with() 2026-09-21 16:25:57 +01:00
Riz Ashraf 84ad64156c docs(server): modify tool_def to extract rich descriptions from struct docstrings via schemars instead of using hardcoded generic names 2026-09-21 16:09:08 +01:00
Riz Ashraf 075bc50645 docs(nvim): enrich mcp tools/list schema description to explicitly enforce AST and autosave rules 2026-09-21 16:04:17 +01:00
Riz Ashraf 891bd481b9 feat(nvim): bake in strict interactive AST blocks for win-nvim to prevent headless deadlock 2026-09-21 15:59:49 +01:00
Riz Ashraf 1f40e6d32b fix(stub): resolve TCP socket leak on target server disconnect and hanging connection attempt 2026-09-21 15:47:33 +01:00
Riz Ashraf 8e10950fc0 fix(nvim): resolve concurrent msgid clashes and eliminate continuous buffer memory leak 2026-09-21 15:39:15 +01:00
Riz Ashraf f8d98a77fd perf: remove totally redundant and highly allocating .to_lowercase() calls from search endpoints 2026-09-21 15:33:35 +01:00
Riz Ashraf 9476bcd649 perf: completely eradicate large vector allocations and state locking double-clones in main, meta, env, workspaces, and notes modules 2026-09-21 15:22:44 +01:00
Riz Ashraf 6b37799cc5 perf: fix lifetime issues and optimize remaining string allocations in graph traversal endpoints 2026-09-21 13:47:09 +01:00
Riz Ashraf 3c31aeec1f perf: replace inefficient memory cloning vectors with fast zero-allocation read iterators 2026-09-21 12:51:26 +01:00
Riz Ashraf 5da422d23a fix: apply automatic clippy fixes across workspace 2026-09-21 11:41:55 +01:00
Riz Ashraf 73ab5037d8 fix(search): replace unsafe unwrap on mutex locks 2026-09-21 11:37:22 +01:00
Riz Ashraf 8afbf97b11 refactor: apply zero-unwrap policy and optimize locks in store.rs and handlers 2026-09-21 11:34:21 +01:00
Riz Ashraf 9f24e66d88 refactor: deduplicate simple list tool handlers via handle_list_with_namespace macro 2026-09-21 09:51:39 +01:00
Riz Ashraf d237f5c5ad perf: remove redundant clone of json args in every tool handler 2026-09-21 09:48:36 +01:00
Riz Ashraf dc59aa9238 perf: eliminate loop string allocations and proxy mem spikes 2026-09-21 09:40:37 +01:00
Riz Ashraf d5a05f8416 perf: fix store mem leak, batch DB flushes, and remove double-clones 2026-09-21 09:32:16 +01:00
Riz Ashraf 2c5953e4f5 perf: fix NVIM_CONN deadlock and unoptimized lock across await point 2026-09-21 09:25:22 +01:00
Riz Ashraf 5715625220 perf: eliminate tokio::sync::Mutex across async boundaries in stub and nvim-core 2026-09-21 08:32:13 +01:00
Riz Ashraf 573c9586fd fix: memory leaks and unoptimized websocket broadcasts 2026-09-21 08:22:25 +01:00
Riz Ashraf 9b349e6459 Optimize handlers to avoid deep clones of KnowledgeGraph, and fix database write concurrency issues 2026-09-21 06:53:32 +01:00
Riz Ashraf 7a48fa5d34 Fix unawaited Tokio spawn locks by moving macro clones and formatting allocations to blocking executor 2026-09-21 06:32:06 +01:00
Riz Ashraf e098c257c2 Optimize Store persistence by eliminating deep clone of internal lock, and optimize relation merging by using retain deduplication. 2026-09-21 06:22:05 +01:00
Riz Ashraf a9885a65d7 Optimize full graph rebuilds with batch indexing to prevent thread exhaustion, and fix adr/snippet search availability before restart 2026-09-21 05:56:58 +01:00
Riz Ashraf 84672a00b9 Fix task memory leak in nvim-core pending request cleanup loop 2026-09-21 05:51:38 +01:00
Riz Ashraf ed42f738f1 Optimize graph relation filtering and fix concurrent connection storms 2026-09-21 05:44:34 +01:00
Riz Ashraf cbd3d5801c Resolve blocking commit deadlock and clippy warnings 2026-09-21 05:05:45 +01:00
Riz Ashraf afc7cbdad5 Address compiler warnings and fix send_text_result macro 2026-09-21 04:45:36 +01:00
Riz Ashraf 2191ea5ce7 Fix memory leak in nvim-core by sweeping timed-out pending requests 2026-09-21 04:38:41 +01:00
Riz Ashraf 9ce5c84d9c Fix tokio blocking write in server startup error handler 2026-09-21 04:28:16 +01:00
Riz Ashraf 2ce4fa6720 Fix tokio blocking deadlock in search indexing by offloading add_document to spawn_blocking 2026-09-21 04:26:11 +01:00
Riz Ashraf 9870626045 Fix Neovim connection deadlock by dropping NVIM_CONN lock across await boundary 2026-09-21 04:04:32 +01:00
Riz Ashraf b98f95d9d8 perf(server): Resolve tokio executor starvation and optimize broadcast loops
- Offloaded the blocking idx.commit() inside index_committer_worker to 	okio::task::spawn_blocking to prevent the tokio async thread from being starved by blocking I/O.
- Removed expensive full HashMap .clone() operations during UI client websocket broadcasts in both handle_socket and
vim_telemetry_handler, filtering and collecting only the Sender handles.
- Migrated blocking std::fs::write calls across the WSL 9P boundary in
vim_telemetry_handler over to asynchronous 	okio::fs::write().await to prevent severe async thread blockages on native file I/O delays.
2026-09-21 03:33:57 +01:00
Riz Ashraf b9e44e1fa3 fix(server): Fix memory leak in handle_socket on abrupt disconnects
- Used a SessionCleanup Drop guard (RAII pattern) to guarantee that the websocket session is evicted from the global clients map and background read/write tasks are forcibly aborted even when Axum terminates the handler mid-execution due to a TCP connection loss.
2026-09-20 23:08:40 +01:00
Riz Ashraf acf5ea8ebe fix(stub): Prevent infinite reconnect loop causing port exhaustion
- Added a break statement when send_task exits (STDIN closed).
- Increased reconnect delay from 50ms to 1 second to prevent ephemeral port exhaustion when the server repeatedly drops connections.
2026-09-20 23:02:55 +01:00
Riz Ashraf cb8447224f chore: persist activity feed history and improve build versioning 2026-09-20 06:41:12 +01:00
Riz Ashraf e72af4f877 chore: Remove unused imports and dead code causing compiler warnings 2026-09-19 07:58:42 +01:00
Riz Ashraf cddd97dc9f fix(server): Add missing descriptions to MCP tools in list handler
- Added missing tool descriptions to generate_standup_report, get_environment_details, and list_context_workspaces so the LLM correctly parses them during MCP handshake.
2026-09-19 07:53:51 +01:00
Riz Ashraf 2a25f17a32 refactor(server): Resolve bottlenecks and duplications
- Removed heavy Tantivy index rebuild loop that ran every 5 seconds and rewrote entire graph to disk
- Converted polling worker to lightweight IndexWriter committer
- Fixed 67+ instances of unnecessary clone and string parsing overhead in tool return results
- Deduplicated state graph modification methods
2026-09-19 07:48:51 +01:00
Riz Ashraf 4fe6ed7791 test: Fix broken mcp-stdio module imports in unit tests 2026-09-19 07:21:37 +01:00
Riz Ashraf 368f28e593 style: Optimize stub proxy logging and cleanup nvim-core JSON-RPC response boilerplate 2026-09-19 07:17:57 +01:00
Riz Ashraf 6011da95f6 perf: Replace stateless Neovim sockets with a persistent multiplexed connection pool 2026-09-19 07:12:08 +01:00
Riz Ashraf 9009f127a9 refactor: Extract shared MCP Stdio NDJSON parsing loop into mcp-stdio library 2026-09-19 07:06:14 +01:00
Riz Ashraf f8c0d58415 perf: Remove blocking std::fs IO from nvim socket locator 2026-09-19 07:01:34 +01:00
Riz Ashraf c9ba5e79dd feat: Make stub proxy target derive from MCP_PORT env var 2026-09-19 06:15:35 +01:00
Riz Ashraf ce17ffcf42 feat: Require UUID token authorization for /shutdown endpoint 2026-09-19 06:02:02 +01:00
Riz Ashraf 53dce890ec Reapply "docs: Remove graceful shutdown instructions"
This reverts commit 1f530fa689.
2026-09-19 05:51:37 +01:00
Riz Ashraf 1f530fa689 Revert "docs: Remove graceful shutdown instructions"
This reverts commit a996e7152b.
2026-09-19 05:49:51 +01:00
Riz Ashraf a996e7152b docs: Remove graceful shutdown instructions 2026-09-19 05:48:20 +01:00
Riz Ashraf 28761ceb41 fix: Replace silent panics on bind and index creation with daemon_error.log writes 2026-09-19 05:20:11 +01:00