yaver-cli 1.99.167 → 1.99.168

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yaver-cli",
3
- "version": "1.99.167",
3
+ "version": "1.99.168",
4
4
  "mcpName": "io.github.kivanccakmak/yaver",
5
5
  "description": "Unified npm bootstrap for the Yaver agent, SDK injection, and local-first developer runtime",
6
6
  "bin": {
@@ -497,13 +497,13 @@ async function fetchRemoteAsset(platform, goArch) {
497
497
  downloadName: asset.name,
498
498
  archiveType: 'exe',
499
499
  url: asset.browser_download_url,
500
- version: release.tag_name.replace(/^v/, ''),
500
+ version: stripCliTagPrefix(release.tag_name),
501
501
  };
502
502
  }
503
503
 
504
504
  if (platform === 'darwin' || platform === 'linux') {
505
505
  const release = await fetchLatestRelease(DEFAULT_REPO);
506
- const version = release.tag_name.replace(/^v/, '');
506
+ const version = stripCliTagPrefix(release.tag_name);
507
507
  const asset = findReleaseAsset(release, [
508
508
  `yaver-v${version}-${platform}-${goArch}.tar.gz`,
509
509
  `yaver-${platform}-${goArch}.tar.gz`,
@@ -525,6 +525,19 @@ async function fetchRemoteAsset(platform, goArch) {
525
525
  throw new Error(`unsupported platform for npm bootstrap: ${platform}`);
526
526
  }
527
527
 
528
+ // Strip the CLI release tag prefix and return the bare semver — or
529
+ // null if this isn't a CLI release at all. Tags now live in per-surface
530
+ // namespaces: `cli/v1.99.167`, `mobile/v1.18.91`, `web/v1.1.131`, etc.
531
+ // Pre-1.99.124 releases were just `v1.99.149`. Only those two shapes
532
+ // belong to the CLI; mobile/web/relay tags must NOT pass through, or
533
+ // `findReleaseAsset` will look for a yaver-linux-arm64 tarball on a
534
+ // mobile release and silently fail. Returning null here lets
535
+ // `semver.valid(stripCliTagPrefix(...))` filter non-CLI tags out.
536
+ function stripCliTagPrefix(tag) {
537
+ const match = String(tag || '').match(/^(?:cli\/)?v(.+)$/);
538
+ return match ? match[1] : null;
539
+ }
540
+
528
541
  async function fetchLatestRelease(repo) {
529
542
  const response = await request(`https://api.github.com/repos/${repo}/releases?per_page=20`, {
530
543
  headers: {
@@ -545,7 +558,7 @@ async function fetchLatestRelease(repo) {
545
558
  }
546
559
 
547
560
  const latest = Array.isArray(releases)
548
- ? releases.find((release) => !release.draft && !release.prerelease && semver.valid(String(release.tag_name || '').replace(/^v/, '')))
561
+ ? releases.find((release) => !release.draft && !release.prerelease && semver.valid(stripCliTagPrefix(String(release.tag_name || ''))))
549
562
  : null;
550
563
 
551
564
  if (!latest || !latest.tag_name) {