@wipcomputer/wip-ldm-os 0.4.5 → 0.4.6

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.
Files changed (3) hide show
  1. package/SKILL.md +8 -8
  2. package/bin/ldm.js +40 -5
  3. package/package.json +1 -1
package/SKILL.md CHANGED
@@ -5,7 +5,7 @@ license: MIT
5
5
  interface: [cli, skill]
6
6
  metadata:
7
7
  display-name: "LDM OS"
8
- version: "0.4.5"
8
+ version: "0.4.6"
9
9
  homepage: "https://github.com/wipcomputer/wip-ldm-os"
10
10
  author: "Parker Todd Brooks"
11
11
  category: infrastructure
@@ -149,18 +149,18 @@ No manual configuration needed. Point it at a repo and it figures out the rest.
149
149
 
150
150
  ## Update
151
151
 
152
- If LDM OS is already installed, check for updates BEFORE presenting the summary to the user:
152
+ If LDM OS is already installed, run `ldm status` BEFORE presenting the summary to the user:
153
153
 
154
154
  ```bash
155
- ldm --version # CLI version
156
- ldm install --dry-run 2>&1 # shows extension update count
155
+ ldm status 2>&1
157
156
  ```
158
157
 
159
- Parse the dry-run output to count how many extensions would update. Include this in your summary:
160
- - "22 extensions registered. 13 have updates available." (if updates exist)
161
- - "22 extensions registered. All up to date." (if no updates)
158
+ `ldm status` checks both the CLI and all extensions against npm. It shows:
159
+ - CLI version and whether a newer version exists
160
+ - Extension count and how many have updates available
161
+ - Specific version diffs for each outdated extension
162
162
 
163
- **Do not say "up to date" if extensions have pending updates.** The CLI version can be current while extensions are behind. Always check both.
163
+ **Use the output of `ldm status` as your summary.** Do not say "up to date" if `ldm status` shows updates available. Do not make your own summary without running `ldm status` first.
164
164
 
165
165
  When the user wants to update:
166
166
  ```bash
package/bin/ldm.js CHANGED
@@ -983,18 +983,53 @@ function cmdStatus() {
983
983
  return;
984
984
  }
985
985
 
986
+ // Check CLI version against npm
987
+ let cliUpdate = null;
988
+ try {
989
+ const latest = execSync('npm view @wipcomputer/wip-ldm-os version 2>/dev/null', {
990
+ encoding: 'utf8', timeout: 10000,
991
+ }).trim();
992
+ if (latest && latest !== PKG_VERSION) cliUpdate = latest;
993
+ } catch {}
994
+
995
+ // Check extensions against npm
996
+ const updates = [];
997
+ for (const [name, info] of Object.entries(registry?.extensions || {})) {
998
+ const extPkgPath = join(LDM_EXTENSIONS, name, 'package.json');
999
+ const extPkg = readJSON(extPkgPath);
1000
+ const npmPkg = extPkg?.name;
1001
+ if (!npmPkg || !npmPkg.startsWith('@')) continue;
1002
+ const currentVersion = extPkg.version || info.version;
1003
+ if (!currentVersion) continue;
1004
+ try {
1005
+ const latest = execSync(`npm view ${npmPkg} version 2>/dev/null`, {
1006
+ encoding: 'utf8', timeout: 10000,
1007
+ }).trim();
1008
+ if (latest && latest !== currentVersion) {
1009
+ updates.push({ name, current: currentVersion, latest, npm: npmPkg });
1010
+ }
1011
+ } catch {}
1012
+ }
1013
+
986
1014
  console.log('');
987
- console.log(` LDM OS v${version.version}`);
1015
+ console.log(` LDM OS v${version.version}${cliUpdate ? ` (v${cliUpdate} available)` : ' (latest)'}`);
988
1016
  console.log(` Installed: ${version.installed?.split('T')[0]}`);
989
1017
  console.log(` Updated: ${version.updated?.split('T')[0]}`);
990
- console.log(` Extensions: ${extCount}`);
1018
+ console.log(` Extensions: ${extCount}${updates.length > 0 ? `, ${updates.length} update(s) available` : ', all up to date'}`);
991
1019
  console.log(` Root: ${LDM_ROOT}`);
992
1020
 
993
- if (extCount > 0) {
1021
+ if (updates.length > 0) {
994
1022
  console.log('');
995
- for (const [name, info] of Object.entries(registry.extensions)) {
996
- console.log(` ${name} v${info.version || '?'} (${(info.interfaces || []).join(', ')})`);
1023
+ console.log(' Updates available:');
1024
+ for (const u of updates) {
1025
+ console.log(` ${u.name}: v${u.current} -> v${u.latest} (${u.npm})`);
997
1026
  }
1027
+ console.log('');
1028
+ console.log(' Run: ldm install');
1029
+ }
1030
+
1031
+ if (cliUpdate) {
1032
+ console.log(` CLI update: npm install -g @wipcomputer/wip-ldm-os@${cliUpdate}`);
998
1033
  }
999
1034
 
1000
1035
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-ldm-os",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "type": "module",
5
5
  "description": "LDM OS: identity, memory, and sovereignty infrastructure for AI agents",
6
6
  "main": "src/boot/boot-hook.mjs",