magector 2.16.3 → 2.16.4
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/package.json +5 -5
- package/src/mcp-server.js +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magector",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.4",
|
|
4
4
|
"description": "Semantic code search for Magento 2 — index, search, MCP server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/mcp-server.js",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"ruvector": "^0.1.96"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@magector/cli-darwin-arm64": "2.16.
|
|
37
|
-
"@magector/cli-linux-x64": "2.16.
|
|
38
|
-
"@magector/cli-linux-arm64": "2.16.
|
|
39
|
-
"@magector/cli-win32-x64": "2.16.
|
|
36
|
+
"@magector/cli-darwin-arm64": "2.16.4",
|
|
37
|
+
"@magector/cli-linux-x64": "2.16.4",
|
|
38
|
+
"@magector/cli-linux-arm64": "2.16.4",
|
|
39
|
+
"@magector/cli-win32-x64": "2.16.4"
|
|
40
40
|
},
|
|
41
41
|
"keywords": [
|
|
42
42
|
"magento",
|
package/src/mcp-server.js
CHANGED
|
@@ -1000,6 +1000,15 @@ async function rustSearchAsync(query, limit = 10) {
|
|
|
1000
1000
|
await Promise.race([serveReadyPromise, new Promise(r => setTimeout(() => r(false), 10000))]);
|
|
1001
1001
|
}
|
|
1002
1002
|
|
|
1003
|
+
// Secondary instance: retry socket if not connected (primary may have (re)started serve)
|
|
1004
|
+
if (!serveProcess && !globalServeQuery) {
|
|
1005
|
+
const reconnected = await tryConnectSocket();
|
|
1006
|
+
if (reconnected) {
|
|
1007
|
+
logToFile('INFO', 'rustSearchAsync: reconnected to serve socket');
|
|
1008
|
+
searchCache.clear(); // clear stale empty results before using new serve
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1003
1012
|
// Try socket proxy (secondary instance) or local serve process (primary)
|
|
1004
1013
|
const queryFn = globalServeQuery || ((serveProcess && serveReady) ? serveQuery : null);
|
|
1005
1014
|
if (queryFn) {
|