@_xtribe/cli 1.0.46 → 1.0.47

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/install-tribe.js +31 -4
  2. package/package.json +1 -1
package/install-tribe.js CHANGED
@@ -639,13 +639,19 @@ async function installTribeCLI() {
639
639
  // Multiple sources for reliability
640
640
  // For testing, use a direct URL to our releases folder
641
641
  const isTestEnv = process.env.TRIBE_TEST_BINARY_URL;
642
- const githubRepo = process.env.TRIBE_INSTALLER_REPO || 'TRIBE-INC/releases';
642
+ const githubRepo = process.env.TRIBE_INSTALLER_REPO || 'TRIBE-INC/0zen';
643
643
 
644
644
  let downloadUrl = '';
645
645
 
646
646
  try {
647
647
  spinner.text = 'Fetching latest release information from GitHub...';
648
- const response = await fetch(`https://api.github.com/repos/${githubRepo}/releases`);
648
+ const response = await fetch(`https://api.github.com/repos/${githubRepo}/releases`, {
649
+ headers: {
650
+ 'User-Agent': 'TRIBE-Installer',
651
+ // Add token if available in environment
652
+ ...(process.env.GITHUB_TOKEN ? { 'Authorization': `token ${process.env.GITHUB_TOKEN}` } : {})
653
+ }
654
+ });
649
655
  if (!response.ok) {
650
656
  throw new Error(`GitHub API returned ${response.status}`);
651
657
  }
@@ -653,6 +659,7 @@ async function installTribeCLI() {
653
659
  if (!releases || releases.length === 0) {
654
660
  throw new Error('No releases found');
655
661
  }
662
+ // Get the first release (latest, including pre-releases)
656
663
  const latestRelease = releases[0];
657
664
  const assetName = `tribe-${platform}-${arch}`;
658
665
  const asset = latestRelease.assets.find(a => a.name === assetName);
@@ -664,8 +671,24 @@ async function installTribeCLI() {
664
671
  downloadUrl = asset.browser_download_url;
665
672
  spinner.text = `Found latest release: ${latestRelease.tag_name}`;
666
673
  } catch (error) {
667
- spinner.fail(`Failed to get release info: ${error.message}`);
668
- // Fallback to other methods if the API fails
674
+ log.warning(`Failed to get release info: ${error.message}`);
675
+ // Try to get the latest release tag directly
676
+ try {
677
+ const tagResponse = await fetch(`https://api.github.com/repos/${githubRepo}/releases`, {
678
+ headers: { 'User-Agent': 'TRIBE-Installer' }
679
+ });
680
+ if (tagResponse.ok) {
681
+ const releases = await tagResponse.json();
682
+ if (releases && releases.length > 0) {
683
+ const tag = releases[0].tag_name;
684
+ // Construct direct download URL
685
+ downloadUrl = `https://github.com/${githubRepo}/releases/download/${tag}/tribe-${platform}-${arch}`;
686
+ spinner.text = `Using direct download for release: ${tag}`;
687
+ }
688
+ }
689
+ } catch (e) {
690
+ // Ignore and use fallback URLs
691
+ }
669
692
  }
670
693
 
671
694
  // Check if there's a local build available
@@ -993,6 +1016,9 @@ async function verifyInstallation() {
993
1016
  results[tool] = await checkCommand(tool);
994
1017
  }
995
1018
 
1019
+ // Store results globally for later use
1020
+ global.installationChecks = results;
1021
+
996
1022
  // Special check for container runtime
997
1023
  let containerWorking = false;
998
1024
  if (platform === 'darwin') {
@@ -1825,6 +1851,7 @@ async function main() {
1825
1851
  }
1826
1852
 
1827
1853
  // Auto-launch handling (only for successful installations)
1854
+ const checks = global.installationChecks || {};
1828
1855
  if (checks.kubectl && checks.tribe) {
1829
1856
  try {
1830
1857
  const autoLaunch = require('./install-tribe-autolaunch.js');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@_xtribe/cli",
3
- "version": "1.0.46",
3
+ "version": "1.0.47",
4
4
  "description": "TRIBE multi-agent development system - Zero to productive with one command",
5
5
  "main": "install-tribe.js",
6
6
  "bin": {