@elisym/mcp 0.7.1 → 0.8.0
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/dist/index.js +14 -19
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1815,7 +1815,6 @@ ${text}`);
|
|
|
1815
1815
|
}
|
|
1816
1816
|
})
|
|
1817
1817
|
];
|
|
1818
|
-
var LAST_SEEN_ONLINE_WINDOW_SECS = 10 * 60;
|
|
1819
1818
|
var SEARCH_PING_TIMEOUT_MS = 3e3;
|
|
1820
1819
|
var STOP_WORDS = /* @__PURE__ */ new Set([
|
|
1821
1820
|
"a",
|
|
@@ -1982,24 +1981,20 @@ var discoveryTools = [
|
|
|
1982
1981
|
)
|
|
1983
1982
|
);
|
|
1984
1983
|
}
|
|
1985
|
-
if (!include_offline) {
|
|
1986
|
-
const
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
}
|
|
2000
|
-
});
|
|
2001
|
-
filtered = survivors;
|
|
2002
|
-
}
|
|
1984
|
+
if (!include_offline && filtered.length > 0) {
|
|
1985
|
+
const probes = await Promise.allSettled(
|
|
1986
|
+
filtered.map(
|
|
1987
|
+
(candidate) => agent.client.ping.pingAgent(candidate.pubkey, SEARCH_PING_TIMEOUT_MS)
|
|
1988
|
+
)
|
|
1989
|
+
);
|
|
1990
|
+
const survivors = [];
|
|
1991
|
+
filtered.forEach((candidate, index) => {
|
|
1992
|
+
const probe = probes[index];
|
|
1993
|
+
if (probe?.status === "fulfilled" && probe.value.online) {
|
|
1994
|
+
survivors.push(candidate);
|
|
1995
|
+
}
|
|
1996
|
+
});
|
|
1997
|
+
filtered = survivors;
|
|
2003
1998
|
}
|
|
2004
1999
|
if (query) {
|
|
2005
2000
|
const isAscii = /^[\u0000-\u007F]*$/.test(query);
|