md4ai 0.16.3 → 0.17.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 +12 -101
- package/package.json +1 -1
package/dist/index.bundled.js
CHANGED
|
@@ -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.
|
|
125
|
+
CURRENT_VERSION = true ? "0.17.0" : "0.0.0-dev";
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
128
|
|
|
@@ -2616,35 +2616,11 @@ ${proposedFiles.length} file(s) proposed for deletion:
|
|
|
2616
2616
|
}
|
|
2617
2617
|
let storedManifest = null;
|
|
2618
2618
|
if (!result.envManifest) {
|
|
2619
|
-
const { data: stored, error: fetchErr } = await supabase.from("
|
|
2619
|
+
const { data: stored, error: fetchErr } = await supabase.from("device_scans").select("env_manifest_json").eq("folder_id", folder_id).eq("device_id", deviceId).maybeSingle();
|
|
2620
2620
|
if (!fetchErr && stored?.env_manifest_json) {
|
|
2621
2621
|
storedManifest = stored.env_manifest_json;
|
|
2622
2622
|
}
|
|
2623
2623
|
}
|
|
2624
|
-
const updatePayload = {
|
|
2625
|
-
graph_json: result.graph,
|
|
2626
|
-
orphans_json: result.orphans,
|
|
2627
|
-
broken_refs_json: result.brokenRefs,
|
|
2628
|
-
skills_table_json: result.skills,
|
|
2629
|
-
stale_files_json: result.staleFiles,
|
|
2630
|
-
marketplace_plugins_json: result.marketplacePlugins,
|
|
2631
|
-
last_scanned: result.scannedAt,
|
|
2632
|
-
data_hash: result.dataHash
|
|
2633
|
-
};
|
|
2634
|
-
if (result.envManifest) {
|
|
2635
|
-
updatePayload.env_manifest_json = result.envManifest;
|
|
2636
|
-
}
|
|
2637
|
-
if (result.doppler) {
|
|
2638
|
-
updatePayload.doppler_json = result.doppler;
|
|
2639
|
-
}
|
|
2640
|
-
try {
|
|
2641
|
-
const { error } = await supabase.from("claude_folders").update(updatePayload).eq("id", folder_id);
|
|
2642
|
-
if (error) {
|
|
2643
|
-
console.log(chalk12.dim(`Debug: claude_folders update skipped (${error.message})`));
|
|
2644
|
-
}
|
|
2645
|
-
} catch (err) {
|
|
2646
|
-
console.log(chalk12.dim(`Debug: claude_folders update skipped (${err instanceof Error ? err.message : String(err)})`));
|
|
2647
|
-
}
|
|
2648
2624
|
if (deviceId) {
|
|
2649
2625
|
await supabase.from("device_scans").upsert({
|
|
2650
2626
|
folder_id,
|
|
@@ -2747,25 +2723,6 @@ ${proposedFiles.length} file(s) proposed for deletion:
|
|
|
2747
2723
|
path: projectRoot,
|
|
2748
2724
|
last_synced: (/* @__PURE__ */ new Date()).toISOString()
|
|
2749
2725
|
}, { onConflict: "folder_id,device_name" });
|
|
2750
|
-
try {
|
|
2751
|
-
const { error: inlineFolderErr } = await sb.from("claude_folders").update({
|
|
2752
|
-
graph_json: result.graph,
|
|
2753
|
-
orphans_json: result.orphans,
|
|
2754
|
-
broken_refs_json: result.brokenRefs,
|
|
2755
|
-
skills_table_json: result.skills,
|
|
2756
|
-
stale_files_json: result.staleFiles,
|
|
2757
|
-
env_manifest_json: result.envManifest,
|
|
2758
|
-
doppler_json: result.doppler,
|
|
2759
|
-
marketplace_plugins_json: result.marketplacePlugins,
|
|
2760
|
-
last_scanned: result.scannedAt,
|
|
2761
|
-
data_hash: result.dataHash
|
|
2762
|
-
}).eq("id", folderId);
|
|
2763
|
-
if (inlineFolderErr) {
|
|
2764
|
-
console.log(chalk12.dim(`Debug: claude_folders update skipped (${inlineFolderErr.message})`));
|
|
2765
|
-
}
|
|
2766
|
-
} catch (err) {
|
|
2767
|
-
console.log(chalk12.dim(`Debug: claude_folders update skipped (${err instanceof Error ? err.message : String(err)})`));
|
|
2768
|
-
}
|
|
2769
2726
|
if (inlineDeviceId) {
|
|
2770
2727
|
await sb.from("device_scans").upsert({
|
|
2771
2728
|
folder_id: folderId,
|
|
@@ -2866,23 +2823,6 @@ async function syncCommand(options) {
|
|
|
2866
2823
|
const result = await scanProject(device.path, device.folder_id);
|
|
2867
2824
|
const { data: allDeviceRow } = await supabase.from("devices").select("id").eq("user_id", userId).eq("device_name", device.device_name).single();
|
|
2868
2825
|
const allDeviceId = allDeviceRow?.id;
|
|
2869
|
-
try {
|
|
2870
|
-
const { error: allFolderErr } = await supabase.from("claude_folders").update({
|
|
2871
|
-
graph_json: result.graph,
|
|
2872
|
-
orphans_json: result.orphans,
|
|
2873
|
-
broken_refs_json: result.brokenRefs,
|
|
2874
|
-
skills_table_json: result.skills,
|
|
2875
|
-
stale_files_json: result.staleFiles,
|
|
2876
|
-
env_manifest_json: result.envManifest,
|
|
2877
|
-
last_scanned: result.scannedAt,
|
|
2878
|
-
data_hash: result.dataHash
|
|
2879
|
-
}).eq("id", device.folder_id);
|
|
2880
|
-
if (allFolderErr) {
|
|
2881
|
-
console.log(chalk15.dim(` Debug: claude_folders update skipped (${allFolderErr.message})`));
|
|
2882
|
-
}
|
|
2883
|
-
} catch (folderErr) {
|
|
2884
|
-
console.log(chalk15.dim(` Debug: claude_folders update skipped (${folderErr instanceof Error ? folderErr.message : String(folderErr)})`));
|
|
2885
|
-
}
|
|
2886
2826
|
if (allDeviceId) {
|
|
2887
2827
|
await supabase.from("device_scans").upsert({
|
|
2888
2828
|
folder_id: device.folder_id,
|
|
@@ -2932,22 +2872,6 @@ async function syncCommand(options) {
|
|
|
2932
2872
|
const result = await scanProject(device.path, device.folder_id);
|
|
2933
2873
|
const { data: singleDeviceRow } = await supabase.from("devices").select("id").eq("user_id", userId).eq("device_name", device.device_name).single();
|
|
2934
2874
|
const singleDeviceId = singleDeviceRow?.id;
|
|
2935
|
-
try {
|
|
2936
|
-
const { error: singleFolderErr } = await supabase.from("claude_folders").update({
|
|
2937
|
-
graph_json: result.graph,
|
|
2938
|
-
orphans_json: result.orphans,
|
|
2939
|
-
broken_refs_json: result.brokenRefs,
|
|
2940
|
-
skills_table_json: result.skills,
|
|
2941
|
-
stale_files_json: result.staleFiles,
|
|
2942
|
-
last_scanned: result.scannedAt,
|
|
2943
|
-
data_hash: result.dataHash
|
|
2944
|
-
}).eq("id", device.folder_id);
|
|
2945
|
-
if (singleFolderErr) {
|
|
2946
|
-
console.log(chalk15.dim(`Debug: claude_folders update skipped (${singleFolderErr.message})`));
|
|
2947
|
-
}
|
|
2948
|
-
} catch (err) {
|
|
2949
|
-
console.log(chalk15.dim(`Debug: claude_folders update skipped (${err instanceof Error ? err.message : String(err)})`));
|
|
2950
|
-
}
|
|
2951
2875
|
if (singleDeviceId) {
|
|
2952
2876
|
await supabase.from("device_scans").upsert({
|
|
2953
2877
|
folder_id: device.folder_id,
|
|
@@ -3635,7 +3559,7 @@ async function mcpWatchCommand() {
|
|
|
3635
3559
|
if (hash === lastEnvHash)
|
|
3636
3560
|
return;
|
|
3637
3561
|
lastEnvHash = hash;
|
|
3638
|
-
await supabase.from("
|
|
3562
|
+
await supabase.from("device_scans").update({ env_manifest_json: envManifest }).eq("folder_id", state.lastFolderId).eq("device_id", deviceId);
|
|
3639
3563
|
}
|
|
3640
3564
|
await envCycle();
|
|
3641
3565
|
envInterval = setInterval(envCycle, ENV_POLL_INTERVAL_MS);
|
|
@@ -3679,15 +3603,21 @@ async function checkPendingRescans(supabase, deviceId, deviceName) {
|
|
|
3679
3603
|
continue;
|
|
3680
3604
|
try {
|
|
3681
3605
|
const result = await scanProject(dp.path);
|
|
3682
|
-
await supabase.from("
|
|
3606
|
+
await supabase.from("device_scans").upsert({
|
|
3607
|
+
folder_id: folder.id,
|
|
3608
|
+
device_id: deviceId,
|
|
3609
|
+
user_id: (await supabase.auth.getUser()).data.user.id,
|
|
3683
3610
|
graph_json: result.graph,
|
|
3684
3611
|
orphans_json: result.orphans,
|
|
3685
|
-
broken_refs_json: result.brokenRefs,
|
|
3686
3612
|
skills_table_json: result.skills,
|
|
3687
3613
|
stale_files_json: result.staleFiles,
|
|
3614
|
+
broken_refs_json: result.brokenRefs,
|
|
3688
3615
|
env_manifest_json: result.envManifest,
|
|
3689
|
-
last_scanned: result.scannedAt,
|
|
3690
3616
|
data_hash: result.dataHash,
|
|
3617
|
+
scanned_at: result.scannedAt,
|
|
3618
|
+
cli_version: CURRENT_VERSION
|
|
3619
|
+
}, { onConflict: "folder_id,device_id" });
|
|
3620
|
+
await supabase.from("claude_folders").update({
|
|
3691
3621
|
rescan_requested_at: null
|
|
3692
3622
|
}).eq("id", folder.id);
|
|
3693
3623
|
await pushToolings(supabase, folder.id, result.toolings, deviceId);
|
|
@@ -4146,25 +4076,6 @@ Linking "${folder.name}" to this device...
|
|
|
4146
4076
|
console.log(` Env Vars: ${result.envManifest?.variables.length ?? 0} (${result.envManifest ? "manifest found" : "no manifest"})`);
|
|
4147
4077
|
console.log(` Doppler: ${result.doppler ? `${result.doppler.configs.length} config(s) \u2014 ${result.doppler.project}` : "see above"}`);
|
|
4148
4078
|
console.log(` Plugins: ${result.marketplacePlugins.length} (${result.marketplacePlugins.reduce((n, p) => n + p.skills.length, 0)} skills)`);
|
|
4149
|
-
try {
|
|
4150
|
-
const { error: scanErr } = await supabase.from("claude_folders").update({
|
|
4151
|
-
graph_json: result.graph,
|
|
4152
|
-
orphans_json: result.orphans,
|
|
4153
|
-
broken_refs_json: result.brokenRefs,
|
|
4154
|
-
skills_table_json: result.skills,
|
|
4155
|
-
stale_files_json: result.staleFiles,
|
|
4156
|
-
env_manifest_json: result.envManifest,
|
|
4157
|
-
doppler_json: result.doppler,
|
|
4158
|
-
marketplace_plugins_json: result.marketplacePlugins,
|
|
4159
|
-
last_scanned: result.scannedAt,
|
|
4160
|
-
data_hash: result.dataHash
|
|
4161
|
-
}).eq("id", folder.id);
|
|
4162
|
-
if (scanErr) {
|
|
4163
|
-
console.log(chalk16.dim(`Debug: claude_folders update skipped (${scanErr.message})`));
|
|
4164
|
-
}
|
|
4165
|
-
} catch (err) {
|
|
4166
|
-
console.log(chalk16.dim(`Debug: claude_folders update skipped (${err instanceof Error ? err.message : String(err)})`));
|
|
4167
|
-
}
|
|
4168
4079
|
await supabase.from("device_scans").upsert({
|
|
4169
4080
|
folder_id: folder.id,
|
|
4170
4081
|
device_id: deviceId,
|