md4ai 0.8.6 → 0.8.8

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.
@@ -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.8.6" : "0.0.0-dev";
1265
+ CURRENT_VERSION = true ? "0.8.8" : "0.0.0-dev";
1266
1266
  }
1267
1267
  });
1268
1268
 
@@ -1770,7 +1770,15 @@ function buildRows(configs, httpResults, cdpStatus) {
1770
1770
  error_detail: cdpDetail
1771
1771
  });
1772
1772
  } else {
1773
+ const byTty = /* @__PURE__ */ new Map();
1773
1774
  for (const match of matches) {
1775
+ const key = match.tty || "__none__";
1776
+ const existing = byTty.get(key);
1777
+ if (!existing || match.memoryMb > existing.memoryMb) {
1778
+ byTty.set(key, match);
1779
+ }
1780
+ }
1781
+ for (const match of byTty.values()) {
1774
1782
  rows.push({
1775
1783
  server_name: config.name,
1776
1784
  config_source: config.source,
@@ -1913,13 +1921,19 @@ async function mcpWatchCommand() {
1913
1921
  ]);
1914
1922
  const rows = buildRows(configs, httpResults, cdpStatus);
1915
1923
  const now = (/* @__PURE__ */ new Date()).toISOString();
1916
- await supabase.from("mcp_server_status").delete().eq("device_id", deviceId);
1924
+ const { error: deleteError } = await supabase.from("mcp_server_status").delete().eq("device_id", deviceId);
1925
+ if (deleteError) {
1926
+ console.error(chalk18.red(` [debug] Failed to delete old status: ${deleteError.message}`));
1927
+ }
1917
1928
  if (rows.length > 0) {
1918
- await supabase.from("mcp_server_status").insert(rows.map((row) => ({
1929
+ const { error: insertError } = await supabase.from("mcp_server_status").insert(rows.map((row) => ({
1919
1930
  device_id: deviceId,
1920
1931
  ...row,
1921
1932
  checked_at: now
1922
1933
  })));
1934
+ if (insertError) {
1935
+ console.error(chalk18.red(` [debug] Failed to write MCP status: ${insertError.message}`));
1936
+ }
1923
1937
  }
1924
1938
  await supabase.from("mcp_watchers").update({ last_heartbeat: now }).eq("device_id", deviceId).eq("pid", myPid);
1925
1939
  printTable(rows, deviceName, myPid);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md4ai",
3
- "version": "0.8.6",
3
+ "version": "0.8.8",
4
4
  "description": "CLI for MD4AI — scan Claude projects and sync to your dashboard",
5
5
  "type": "module",
6
6
  "bin": {