@wipcomputer/wip-ldm-os 0.4.16 → 0.4.18
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/SKILL.md +1 -1
- package/bin/ldm.js +45 -3
- package/lib/deploy.mjs +2 -2
- package/package.json +1 -1
package/SKILL.md
CHANGED
package/bin/ldm.js
CHANGED
|
@@ -52,6 +52,7 @@ if (existsSync(VERSION_PATH)) {
|
|
|
52
52
|
const v = JSON.parse(readFileSync(VERSION_PATH, 'utf8'));
|
|
53
53
|
if (v.version && v.version !== PKG_VERSION) {
|
|
54
54
|
v.version = PKG_VERSION;
|
|
55
|
+
v.installed = new Date().toISOString(); // #86: update install date on CLI upgrade
|
|
55
56
|
v.updated = new Date().toISOString();
|
|
56
57
|
writeFileSync(VERSION_PATH, JSON.stringify(v, null, 2) + '\n');
|
|
57
58
|
}
|
|
@@ -783,6 +784,50 @@ async function cmdInstallCatalog() {
|
|
|
783
784
|
const totalUpdates = npmUpdates.length;
|
|
784
785
|
|
|
785
786
|
if (DRY_RUN) {
|
|
787
|
+
// Summary block (#80)
|
|
788
|
+
const cliLatest = (() => {
|
|
789
|
+
try {
|
|
790
|
+
return execSync('npm view @wipcomputer/wip-ldm-os version 2>/dev/null', {
|
|
791
|
+
encoding: 'utf8', timeout: 10000,
|
|
792
|
+
}).trim();
|
|
793
|
+
} catch { return null; }
|
|
794
|
+
})();
|
|
795
|
+
|
|
796
|
+
const agentDirs = (() => {
|
|
797
|
+
try {
|
|
798
|
+
return readdirSync(join(LDM_ROOT, 'agents'), { withFileTypes: true })
|
|
799
|
+
.filter(d => d.isDirectory() && d.name !== '_trash').map(d => d.name);
|
|
800
|
+
} catch { return []; }
|
|
801
|
+
})();
|
|
802
|
+
|
|
803
|
+
const totalExtensions = Object.keys(reconciled).length;
|
|
804
|
+
const majorBumps = npmUpdates.filter(e => {
|
|
805
|
+
const curMajor = parseInt(e.currentVersion.split('.')[0], 10);
|
|
806
|
+
const latMajor = parseInt(e.latestVersion.split('.')[0], 10);
|
|
807
|
+
return latMajor > curMajor;
|
|
808
|
+
});
|
|
809
|
+
|
|
810
|
+
console.log('');
|
|
811
|
+
console.log(' Summary');
|
|
812
|
+
console.log(' ────────────────────────────────────');
|
|
813
|
+
if (cliLatest && cliLatest !== PKG_VERSION) {
|
|
814
|
+
console.log(` LDM OS CLI v${PKG_VERSION} -> v${cliLatest} (run: npm install -g @wipcomputer/wip-ldm-os@${cliLatest})`);
|
|
815
|
+
} else {
|
|
816
|
+
console.log(` LDM OS CLI v${PKG_VERSION} (latest)`);
|
|
817
|
+
}
|
|
818
|
+
if (npmUpdates.length > 0) {
|
|
819
|
+
console.log(` Extensions ${totalExtensions} installed, ${npmUpdates.length} update(s)`);
|
|
820
|
+
} else {
|
|
821
|
+
console.log(` Extensions ${totalExtensions} installed, all up to date`);
|
|
822
|
+
}
|
|
823
|
+
for (const m of majorBumps) {
|
|
824
|
+
console.log(` Major bump ${m.name} v${m.currentVersion} -> v${m.latestVersion}`);
|
|
825
|
+
}
|
|
826
|
+
if (agentDirs.length > 0) {
|
|
827
|
+
console.log(` Agents ${agentDirs.join(', ')} (no change)`);
|
|
828
|
+
}
|
|
829
|
+
console.log(` Data crystal.db, agent files, secrets (never touched)`);
|
|
830
|
+
|
|
786
831
|
if (npmUpdates.length > 0) {
|
|
787
832
|
// Table output
|
|
788
833
|
const nameW = Math.max(10, ...npmUpdates.map(e => e.name.length));
|
|
@@ -802,10 +847,7 @@ async function cmdInstallCatalog() {
|
|
|
802
847
|
console.log(` ${pad(e.name, nameW)} │ ${pad('v' + e.currentVersion, curW)} │ ${pad('v' + e.latestVersion, latW)} │ ${pad(e.catalogNpm, pkgW)}`);
|
|
803
848
|
}
|
|
804
849
|
console.log('');
|
|
805
|
-
console.log(' No data (crystal.db, agent files) would be touched.');
|
|
806
850
|
console.log(' Old versions would be moved to ~/.ldm/_trash/ (never deleted).');
|
|
807
|
-
} else {
|
|
808
|
-
console.log(' Everything is up to date. No changes needed.');
|
|
809
851
|
}
|
|
810
852
|
|
|
811
853
|
console.log('');
|
package/lib/deploy.mjs
CHANGED
|
@@ -572,9 +572,9 @@ function installClaudeCodeHook(repoPath, door) {
|
|
|
572
572
|
const extDir = join(LDM_EXTENSIONS, toolName);
|
|
573
573
|
const installedGuard = join(extDir, 'guard.mjs');
|
|
574
574
|
|
|
575
|
-
// Deploy guard.mjs to ~/.ldm/extensions/{toolName}/
|
|
575
|
+
// Deploy guard.mjs to ~/.ldm/extensions/{toolName}/ (#85: always update, not just when missing)
|
|
576
576
|
const srcGuard = join(repoPath, 'guard.mjs');
|
|
577
|
-
if (
|
|
577
|
+
if (existsSync(srcGuard)) {
|
|
578
578
|
try {
|
|
579
579
|
if (!existsSync(extDir)) mkdirSync(extDir, { recursive: true });
|
|
580
580
|
copyFileSync(srcGuard, installedGuard);
|