mirror of
https://github.com/aaronsb/obsidian-mcp-plugin.git
synced 2026-07-22 16:40:32 +00:00
Reimplemented from PR #126 (djsplice, who also reported #125), reduced to the parts that are verified-clean. The worker-offload half of #126 is split out to a tracking issue (inert as wired + correctness divergences — see PR discussion / the follow-up issue). SSE route deconfliction In @modelcontextprotocol/sdk@1.29.0 (the pinned version), `GET /mcp` is the standalone server->client SSE stream for server-initiated messages — verified in webStandardStreamableHttp.js:handleGetRequest (opens `_GET_stream`, Content-Type text/event-stream, gated on Accept: text/event-stream + session + protocol version). A debug route returning application/json on `GET /mcp` shadowed it, so any client that opens the standalone stream (mcp-remote-class bridges — #128's logs show one in use here) received JSON instead of an SSE stream and treated it as failed. Moved debug to `GET /mcp-info`; `GET /mcp` and `POST /mcp` both reach handleMCPRequest. Unlike #126's `app.all('/mcp')`, GET/POST are registered individually so the existing explicit `app.delete('/mcp')` session-close handler is preserved. Scope note: this restores the server-initiated-notification channel (a real latent defect on its own). It is NOT claimed to fix #128 — per the #190 investigation that is a separate SDK-1.29 compat-init problem — and #125's "SSE reconnection loop" is the reporter's un-reproduced diagnosis. Two-row Levenshtein fuzzy-match.ts rewritten from a full (m+1)x(n+1) matrix to a two-row formulation (O(n) memory, no per-line array-of-arrays allocation) plus length heuristics and a 0.95 early-exit. Pure CPU/memory win on the main-thread edit.window path; behaviour-preserving. Adds the first fuzzy-match tests (classic Levenshtein distances, symmetry, heuristic-preservation). build.yml: PR-status-comment step set continue-on-error so it cannot red an otherwise-green build on fork/limited-token PRs. Co-authored-by: djsplice <barrows.jeff@gmail.com> |
||
|---|---|---|
| .. | ||
| ISSUE_TEMPLATE | ||
| workflows | ||
| dependabot.yml | ||
| FUNDING.yml | ||
| pull_request_template.md | ||