@wipcomputer/wip-ldm-os 0.4.72 → 0.4.73-alpha.1

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 (2) hide show
  1. package/bin/ldm.js +23 -4
  2. package/package.json +1 -1
package/bin/ldm.js CHANGED
@@ -148,6 +148,8 @@ const NONE_FLAG = args.includes('--none');
148
148
  const FIX_FLAG = args.includes('--fix');
149
149
  const CLEANUP_FLAG = args.includes('--cleanup');
150
150
  const CHECK_FLAG = args.includes('--check');
151
+ const ALPHA_FLAG = args.includes('--alpha');
152
+ const BETA_FLAG = args.includes('--beta');
151
153
 
152
154
  function readJSON(path) {
153
155
  try {
@@ -1191,6 +1193,8 @@ async function cmdInstall() {
1191
1193
  --json JSON output
1192
1194
  --yes Auto-accept catalog prompts
1193
1195
  --none Skip catalog prompts
1196
+ --alpha Check @alpha npm tag for updates (prerelease track)
1197
+ --beta Check @beta npm tag for updates (prerelease track)
1194
1198
  `);
1195
1199
  process.exit(0);
1196
1200
  }
@@ -1498,13 +1502,19 @@ async function cmdInstallCatalog() {
1498
1502
  // Self-update: check if CLI itself is outdated. Update first, then re-exec.
1499
1503
  // This breaks the chicken-and-egg: new features in ldm install are always
1500
1504
  // available because the installer upgrades itself before doing anything else.
1505
+ // --alpha and --beta flags check the corresponding npm dist-tag instead of @latest.
1501
1506
  if (!DRY_RUN && !process.env.LDM_SELF_UPDATED) {
1502
1507
  try {
1503
- const latest = execSync('npm view @wipcomputer/wip-ldm-os version 2>/dev/null', {
1508
+ const npmTag = ALPHA_FLAG ? 'alpha' : BETA_FLAG ? 'beta' : 'latest';
1509
+ const trackLabel = npmTag === 'latest' ? '' : ` (${npmTag} track)`;
1510
+ const npmViewCmd = npmTag === 'latest'
1511
+ ? 'npm view @wipcomputer/wip-ldm-os version 2>/dev/null'
1512
+ : `npm view @wipcomputer/wip-ldm-os dist-tags.${npmTag} 2>/dev/null`;
1513
+ const latest = execSync(npmViewCmd, {
1504
1514
  encoding: 'utf8', timeout: 15000,
1505
1515
  }).trim();
1506
1516
  if (latest && latest !== PKG_VERSION) {
1507
- console.log(` LDM OS CLI v${PKG_VERSION} -> v${latest}. Updating first...`);
1517
+ console.log(` LDM OS CLI v${PKG_VERSION} -> v${latest}${trackLabel}. Updating first...`);
1508
1518
  try {
1509
1519
  execSync(`npm install -g @wipcomputer/wip-ldm-os@${latest}`, { stdio: 'inherit', timeout: 60000 });
1510
1520
  console.log(` CLI updated to v${latest}. Re-running with new code...`);
@@ -1819,9 +1829,14 @@ async function cmdInstallCatalog() {
1819
1829
  }
1820
1830
 
1821
1831
  // Check npm for updates (fast, one HTTP call)
1832
+ // --alpha and --beta flags check the corresponding npm dist-tag
1822
1833
  if (npmPkg) {
1823
1834
  try {
1824
- const latestVersion = execSync(`npm view ${npmPkg} version 2>/dev/null`, {
1835
+ const npmTag = ALPHA_FLAG ? 'alpha' : BETA_FLAG ? 'beta' : 'latest';
1836
+ const npmViewCmd = npmTag === 'latest'
1837
+ ? `npm view ${npmPkg} version 2>/dev/null`
1838
+ : `npm view ${npmPkg} dist-tags.${npmTag} 2>/dev/null`;
1839
+ const latestVersion = execSync(npmViewCmd, {
1825
1840
  encoding: 'utf8', timeout: 10000,
1826
1841
  }).trim();
1827
1842
 
@@ -1885,7 +1900,11 @@ async function cmdInstallCatalog() {
1885
1900
  if (!currentVersion) continue;
1886
1901
 
1887
1902
  try {
1888
- const latestVersion = execSync(`npm view ${catalogComp.npm} version 2>/dev/null`, {
1903
+ const npmTag = ALPHA_FLAG ? 'alpha' : BETA_FLAG ? 'beta' : 'latest';
1904
+ const npmViewCmd = npmTag === 'latest'
1905
+ ? `npm view ${catalogComp.npm} version 2>/dev/null`
1906
+ : `npm view ${catalogComp.npm} dist-tags.${npmTag} 2>/dev/null`;
1907
+ const latestVersion = execSync(npmViewCmd, {
1889
1908
  encoding: 'utf8', timeout: 10000,
1890
1909
  }).trim();
1891
1910
  if (latestVersion && latestVersion !== currentVersion) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-ldm-os",
3
- "version": "0.4.72",
3
+ "version": "0.4.73-alpha.1",
4
4
  "type": "module",
5
5
  "description": "LDM OS: identity, memory, and sovereignty infrastructure for AI agents",
6
6
  "engines": {