md4ai 0.15.0 → 0.16.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.
@@ -122,7 +122,7 @@ var CURRENT_VERSION;
122
122
  var init_check_update = __esm({
123
123
  "dist/check-update.js"() {
124
124
  "use strict";
125
- CURRENT_VERSION = true ? "0.15.0" : "0.0.0-dev";
125
+ CURRENT_VERSION = true ? "0.16.0" : "0.0.0-dev";
126
126
  }
127
127
  });
128
128
 
@@ -1769,6 +1769,51 @@ async function discoverSkills(installPath) {
1769
1769
  skills.sort((a, b) => a.name.localeCompare(b.name));
1770
1770
  return skills;
1771
1771
  }
1772
+ async function checkPluginLatestVersions(plugins) {
1773
+ const results = [];
1774
+ for (const plugin of plugins) {
1775
+ let latestVersion = null;
1776
+ if (plugin.homepageUrl && plugin.homepageUrl.includes("github.com") && !plugin.homepageUrl.includes("/tree/main/plugins/")) {
1777
+ try {
1778
+ const match = plugin.homepageUrl.match(/github\.com\/([^/]+\/[^/]+)/);
1779
+ if (match) {
1780
+ const ownerRepo = match[1];
1781
+ const controller = new AbortController();
1782
+ const timeout = setTimeout(() => controller.abort(), 3e3);
1783
+ let res = await fetch(`https://api.github.com/repos/${ownerRepo}/releases/latest`, {
1784
+ signal: controller.signal,
1785
+ headers: { Accept: "application/vnd.github.v3+json" }
1786
+ });
1787
+ clearTimeout(timeout);
1788
+ if (res.ok) {
1789
+ const data = await res.json();
1790
+ latestVersion = data.tag_name?.replace(/^v/, "") ?? null;
1791
+ } else {
1792
+ const controller2 = new AbortController();
1793
+ const timeout2 = setTimeout(() => controller2.abort(), 3e3);
1794
+ res = await fetch(`https://api.github.com/repos/${ownerRepo}/tags?per_page=1`, {
1795
+ signal: controller2.signal,
1796
+ headers: { Accept: "application/vnd.github.v3+json" }
1797
+ });
1798
+ clearTimeout(timeout2);
1799
+ if (res.ok) {
1800
+ const data = await res.json();
1801
+ latestVersion = data[0]?.name?.replace(/^v/, "") ?? null;
1802
+ }
1803
+ }
1804
+ }
1805
+ } catch {
1806
+ }
1807
+ }
1808
+ results.push({
1809
+ pluginName: plugin.pluginName,
1810
+ installedVersion: plugin.version,
1811
+ latestVersion,
1812
+ checkedAt: (/* @__PURE__ */ new Date()).toISOString()
1813
+ });
1814
+ }
1815
+ return results;
1816
+ }
1772
1817
  var init_marketplace_scanner = __esm({
1773
1818
  "dist/scanner/marketplace-scanner.js"() {
1774
1819
  "use strict";
@@ -2056,6 +2101,7 @@ async function scanProject(projectRoot, folderId) {
2056
2101
  brokenRefs.sort((a, b) => a.depth - b.depth || a.from.localeCompare(b.from));
2057
2102
  const scanData = JSON.stringify({ graph, orphans, brokenRefs, skills, staleFiles, toolings, envManifest, marketplacePlugins, doppler: doppler2 });
2058
2103
  const dataHash = createHash("sha256").update(scanData).digest("hex");
2104
+ const pluginVersions = await checkPluginLatestVersions(marketplacePlugins);
2059
2105
  return {
2060
2106
  graph,
2061
2107
  orphans,
@@ -2066,6 +2112,7 @@ async function scanProject(projectRoot, folderId) {
2066
2112
  envManifest,
2067
2113
  doppler: doppler2,
2068
2114
  marketplacePlugins,
2115
+ pluginVersions,
2069
2116
  scannedAt: (/* @__PURE__ */ new Date()).toISOString(),
2070
2117
  dataHash
2071
2118
  };
@@ -2586,6 +2633,7 @@ ${proposedFiles.length} file(s) proposed for deletion:
2586
2633
  env_manifest_json: result.envManifest,
2587
2634
  doppler_json: result.doppler,
2588
2635
  marketplace_plugins_json: result.marketplacePlugins,
2636
+ plugin_versions_json: result.pluginVersions,
2589
2637
  data_hash: result.dataHash,
2590
2638
  scanned_at: result.scannedAt,
2591
2639
  cli_version: CURRENT_VERSION
@@ -2706,6 +2754,7 @@ ${proposedFiles.length} file(s) proposed for deletion:
2706
2754
  env_manifest_json: result.envManifest,
2707
2755
  doppler_json: result.doppler,
2708
2756
  marketplace_plugins_json: result.marketplacePlugins,
2757
+ plugin_versions_json: result.pluginVersions,
2709
2758
  data_hash: result.dataHash,
2710
2759
  scanned_at: result.scannedAt,
2711
2760
  cli_version: CURRENT_VERSION
@@ -2819,6 +2868,7 @@ async function syncCommand(options) {
2819
2868
  stale_files_json: result.staleFiles,
2820
2869
  broken_refs_json: result.brokenRefs,
2821
2870
  env_manifest_json: result.envManifest,
2871
+ plugin_versions_json: result.pluginVersions,
2822
2872
  data_hash: result.dataHash,
2823
2873
  scanned_at: result.scannedAt,
2824
2874
  cli_version: CURRENT_VERSION
@@ -2882,6 +2932,7 @@ async function syncCommand(options) {
2882
2932
  skills_table_json: result.skills,
2883
2933
  stale_files_json: result.staleFiles,
2884
2934
  broken_refs_json: result.brokenRefs,
2935
+ plugin_versions_json: result.pluginVersions,
2885
2936
  data_hash: result.dataHash,
2886
2937
  scanned_at: result.scannedAt,
2887
2938
  cli_version: CURRENT_VERSION
@@ -4099,6 +4150,7 @@ Linking "${folder.name}" to this device...
4099
4150
  env_manifest_json: result.envManifest,
4100
4151
  doppler_json: result.doppler,
4101
4152
  marketplace_plugins_json: result.marketplacePlugins,
4153
+ plugin_versions_json: result.pluginVersions,
4102
4154
  data_hash: result.dataHash,
4103
4155
  scanned_at: result.scannedAt,
4104
4156
  cli_version: CURRENT_VERSION
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md4ai",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "CLI for MD4AI — scan Claude projects and sync to your dashboard",
5
5
  "type": "module",
6
6
  "bin": {