md4ai 0.8.8 → 0.9.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.bundled.js +22 -8
- package/package.json +1 -1
package/dist/index.bundled.js
CHANGED
|
@@ -1262,7 +1262,7 @@ var CURRENT_VERSION;
|
|
|
1262
1262
|
var init_check_update = __esm({
|
|
1263
1263
|
"dist/check-update.js"() {
|
|
1264
1264
|
"use strict";
|
|
1265
|
-
CURRENT_VERSION = true ? "0.
|
|
1265
|
+
CURRENT_VERSION = true ? "0.9.0" : "0.0.0-dev";
|
|
1266
1266
|
}
|
|
1267
1267
|
});
|
|
1268
1268
|
|
|
@@ -1695,11 +1695,12 @@ async function checkChromeCdp() {
|
|
|
1695
1695
|
try {
|
|
1696
1696
|
const controller = new AbortController();
|
|
1697
1697
|
const timeout = setTimeout(() => controller.abort(), 2e3);
|
|
1698
|
-
await fetch("http://localhost:9222/json/version", { signal: controller.signal });
|
|
1698
|
+
const res = await fetch("http://localhost:9222/json/version", { signal: controller.signal });
|
|
1699
1699
|
clearTimeout(timeout);
|
|
1700
|
-
|
|
1700
|
+
const json = await res.json();
|
|
1701
|
+
return { status: "reachable", browser: json.Browser };
|
|
1701
1702
|
} catch {
|
|
1702
|
-
return "unreachable";
|
|
1703
|
+
return { status: "unreachable" };
|
|
1703
1704
|
}
|
|
1704
1705
|
}
|
|
1705
1706
|
function buildRows(configs, httpResults, cdpStatus) {
|
|
@@ -1750,7 +1751,7 @@ function buildRows(configs, httpResults, cdpStatus) {
|
|
|
1750
1751
|
continue;
|
|
1751
1752
|
}
|
|
1752
1753
|
const isChromeDevtools = config.name === "chrome-devtools" || (config.args ?? []).some((a) => a.includes("chrome-devtools"));
|
|
1753
|
-
const cdpDetail = isChromeDevtools && cdpStatus ? cdpStatus === "reachable" ? "Chrome CDP reachable" : "Chrome not reachable on port 9222" : null;
|
|
1754
|
+
const cdpDetail = isChromeDevtools && cdpStatus ? cdpStatus.status === "reachable" ? "Chrome CDP reachable" : "Chrome not reachable on port 9222" : null;
|
|
1754
1755
|
const matches = findProcessesForConfig(config, processes);
|
|
1755
1756
|
if (matches.length === 0) {
|
|
1756
1757
|
rows.push({
|
|
@@ -1800,12 +1801,25 @@ function buildRows(configs, httpResults, cdpStatus) {
|
|
|
1800
1801
|
}
|
|
1801
1802
|
return rows;
|
|
1802
1803
|
}
|
|
1803
|
-
function printTable(rows, deviceName, watcherPid) {
|
|
1804
|
+
function printTable(rows, deviceName, watcherPid, cdpResult) {
|
|
1804
1805
|
process.stdout.write("\x1B[3J\x1B[2J\x1B[H");
|
|
1805
1806
|
console.log(chalk18.bold.cyan(`
|
|
1806
|
-
MCP Monitor \u2014 ${deviceName}`) + chalk18.dim(` (PID ${watcherPid})`));
|
|
1807
|
+
MCP Monitor v${CURRENT_VERSION} \u2014 ${deviceName}`) + chalk18.dim(` (PID ${watcherPid})`));
|
|
1807
1808
|
console.log(chalk18.dim(` ${(/* @__PURE__ */ new Date()).toLocaleTimeString()} \xB7 refreshes every 30s \xB7 Ctrl+C to stop
|
|
1808
1809
|
`));
|
|
1810
|
+
if (cdpResult) {
|
|
1811
|
+
if (cdpResult.status === "reachable") {
|
|
1812
|
+
const browserInfo = cdpResult.browser ? ` (${cdpResult.browser})` : "";
|
|
1813
|
+
console.log(chalk18.green(" \u2714 Chrome browser connected") + chalk18.dim(browserInfo));
|
|
1814
|
+
console.log(chalk18.dim(" Claude Code can control Chrome via DevTools Protocol on localhost:9222"));
|
|
1815
|
+
} else {
|
|
1816
|
+
console.log(chalk18.red(" \u2717 Chrome browser not connected"));
|
|
1817
|
+
console.log(chalk18.dim(" Claude Code cannot reach Chrome. To fix:"));
|
|
1818
|
+
console.log(chalk18.dim(" 1. Open Chrome with: google-chrome --remote-debugging-port=9222"));
|
|
1819
|
+
console.log(chalk18.dim(" 2. Or add --remote-debugging-port=9222 to your Chrome shortcut"));
|
|
1820
|
+
}
|
|
1821
|
+
console.log("");
|
|
1822
|
+
}
|
|
1809
1823
|
const runningLocal = rows.filter((r) => r.status === "running" && r.server_type !== "http");
|
|
1810
1824
|
const runningHttp = rows.filter((r) => r.status === "running" && r.server_type === "http");
|
|
1811
1825
|
const stopped = rows.filter((r) => r.status === "stopped");
|
|
@@ -1936,7 +1950,7 @@ async function mcpWatchCommand() {
|
|
|
1936
1950
|
}
|
|
1937
1951
|
}
|
|
1938
1952
|
await supabase.from("mcp_watchers").update({ last_heartbeat: now }).eq("device_id", deviceId).eq("pid", myPid);
|
|
1939
|
-
printTable(rows, deviceName, myPid);
|
|
1953
|
+
printTable(rows, deviceName, myPid, cdpStatus);
|
|
1940
1954
|
}
|
|
1941
1955
|
await cycle();
|
|
1942
1956
|
let lastEnvHash = "";
|