@_xtribe/cli 1.0.55 → 1.0.57

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/install-tribe.js CHANGED
@@ -654,7 +654,8 @@ async function installTribeCLI() {
654
654
  let downloadUrl = '';
655
655
 
656
656
  try {
657
- spinner.text = 'Fetching latest release information from GitHub...';
657
+ const versionChannel = global.versionChannel || 'latest';
658
+ spinner.text = `Fetching ${versionChannel} release information from GitHub...`;
658
659
  const response = await fetch(`https://api.github.com/repos/${githubRepo}/releases`, {
659
660
  headers: {
660
661
  'User-Agent': 'TRIBE-Installer',
@@ -670,26 +671,50 @@ async function installTribeCLI() {
670
671
  throw new Error('No releases found');
671
672
  }
672
673
 
674
+ // Filter releases based on version channel
675
+ let filteredReleases = releases.filter(r => !r.draft);
676
+
677
+ if (versionChannel === 'beta') {
678
+ // For beta, look for releases with 'beta' in tag name
679
+ filteredReleases = filteredReleases.filter(r => r.tag_name.includes('beta'));
680
+ spinner.text = 'Looking for beta releases...';
681
+ } else if (versionChannel === 'latest') {
682
+ // For latest, exclude beta releases
683
+ filteredReleases = filteredReleases.filter(r => !r.tag_name.includes('beta'));
684
+ spinner.text = 'Looking for stable releases...';
685
+ } else {
686
+ // For specific version, look for exact match
687
+ filteredReleases = filteredReleases.filter(r => r.tag_name === versionChannel);
688
+ spinner.text = `Looking for version ${versionChannel}...`;
689
+ }
690
+
691
+ if (filteredReleases.length === 0) {
692
+ throw new Error(`No releases found for channel: ${versionChannel}`);
693
+ }
694
+
673
695
  // Find a release with the binary we need
674
696
  let foundRelease = null;
675
697
  const assetName = `tribe-${platform}-${arch}`;
676
698
 
677
- for (const release of releases) {
678
- if (release.draft) continue;
699
+ for (const release of filteredReleases) {
679
700
  const asset = release.assets?.find(a => a.name === assetName || a.name === `${assetName}.exe`);
680
701
  if (asset) {
681
702
  foundRelease = release;
682
703
  downloadUrl = asset.browser_download_url;
683
- spinner.text = `Found binary in release: ${release.tag_name}`;
704
+ spinner.text = `Found binary in ${versionChannel} release: ${release.tag_name}`;
684
705
  break;
685
706
  }
686
707
  }
687
708
 
688
709
  if (!foundRelease) {
689
- // No release has the binary, try constructing URL from latest release
690
- const latestRelease = releases[0];
691
- downloadUrl = `https://github.com/${githubRepo}/releases/download/${latestRelease.tag_name}/tribe-${platform}-${arch}`;
692
- spinner.text = `Trying release: ${latestRelease.tag_name}`;
710
+ // No release has the binary, try constructing URL from first filtered release
711
+ const firstRelease = filteredReleases[0];
712
+ if (firstRelease) {
713
+ downloadUrl = `https://github.com/${githubRepo}/releases/download/${firstRelease.tag_name}/tribe-${platform}-${arch}`;
714
+ spinner.text = `Trying ${versionChannel} release: ${firstRelease.tag_name}`;
715
+ } else {
716
+ throw new Error(`No suitable release found for channel: ${versionChannel}`);
717
+ }
693
718
  }
694
719
  } catch (error) {
695
720
  log.warning(`Failed to get release info: ${error.message}`);
@@ -712,8 +737,8 @@ async function installTribeCLI() {
712
737
  }
713
738
  }
714
739
 
715
- // Check if there's a local build available
716
- const localBuildPath = path.join(__dirname, '..', '..', '..', 'sdk', 'cmd', 'cli-gui', 'tribe');
740
+ // Check if there's a local build available (use tribe-new, not cli-gui)
741
+ const localBuildPath = path.join(__dirname, '..', '..', '..', 'sdk', 'cmd', 'tribe-new', 'tribe');
717
742
  const hasLocalBuild = fs.existsSync(localBuildPath);
718
743
 
719
744
  const sources = isTestEnv ? [isTestEnv] : [
@@ -1903,16 +1928,43 @@ if (!global.fetch) {
1903
1928
  if (require.main === module) {
1904
1929
  const args = process.argv.slice(2);
1905
1930
 
1931
+ // Parse version/channel flags
1932
+ let versionChannel = 'latest'; // default to latest stable
1933
+ const versionArg = args.find(arg => arg.startsWith('--version='));
1934
+ const channelArg = args.find(arg => arg.startsWith('--channel='));
1935
+
1936
+ if (versionArg) {
1937
+ versionChannel = versionArg.split('=')[1];
1938
+ } else if (channelArg) {
1939
+ versionChannel = channelArg.split('=')[1];
1940
+ } else if (args.includes('--beta')) {
1941
+ versionChannel = 'beta';
1942
+ } else if (args.includes('--latest')) {
1943
+ versionChannel = 'latest';
1944
+ }
1945
+
1946
+ // Store globally for use in download functions
1947
+ global.versionChannel = versionChannel;
1948
+
1906
1949
  if (args.includes('--help') || args.includes('-h')) {
1907
1950
  console.log(chalk.bold.blue('TRIBE CLI Installer\n'));
1908
1951
  console.log('Usage: npx @_xtribe/cli [options]\n');
1909
1952
  console.log('Options:');
1910
- console.log(' --help, -h Show this help message');
1911
- console.log(' --verify Only verify existing installation');
1912
- console.log(' --dry-run Show what would be installed');
1913
- console.log(' --skip-cluster Skip cluster deployment (for testing)');
1914
- console.log(' --no-start Alias for --skip-cluster (for CI environments)');
1915
- console.log(' --force Force clean installation (removes existing installations)');
1953
+ console.log(' --help, -h Show this help message');
1954
+ console.log(' --verify Only verify existing installation');
1955
+ console.log(' --dry-run Show what would be installed');
1956
+ console.log(' --skip-cluster Skip cluster deployment (for testing)');
1957
+ console.log(' --no-start Alias for --skip-cluster (for CI environments)');
1958
+ console.log(' --force Force clean installation (removes existing installations)');
1959
+ console.log(' --latest Install latest stable release (default)');
1960
+ console.log(' --beta Install latest beta release');
1961
+ console.log(' --version=TAG Install specific version tag');
1962
+ console.log(' --channel=CHANNEL Install from specific channel (latest/beta)');
1963
+ console.log('\nVersion Examples:');
1964
+ console.log(' npx @_xtribe/cli@latest # Latest stable (equivalent to --latest)');
1965
+ console.log(' npx @_xtribe/cli@beta # Latest beta');
1966
+ console.log(' npx @_xtribe/cli --beta # Latest beta (flag version)');
1967
+ console.log(' npx @_xtribe/cli --version=v1.2.3 # Specific version');
1916
1968
  console.log('\nThis installer sets up the complete TRIBE development environment:');
1917
1969
 
1918
1970
  if (platform === 'darwin') {
@@ -1945,6 +1997,7 @@ if (require.main === module) {
1945
1997
  console.log(chalk.bold.blue('🔍 TRIBE CLI Installation Preview\n'));
1946
1998
  log.info(`Platform: ${platform} (${arch})`);
1947
1999
  log.info(`Install directory: ${binDir}`);
2000
+ log.info(`Version channel: ${versionChannel}`);
1948
2001
  console.log('\nWould install:');
1949
2002
  console.log('• Colima - Container runtime with Kubernetes (macOS only)');
1950
2003
  console.log('• kubectl - Kubernetes CLI');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@_xtribe/cli",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
4
4
  "description": "TRIBE multi-agent development system - Zero to productive with one command",
5
5
  "main": "install-tribe.js",
6
6
  "bin": {
@@ -8,6 +8,14 @@
8
8
  # - tribexal/tribe:latest-claude-agent
9
9
  #
10
10
  # DO NOT change these to local image names for the npm package!
11
+ # ⚠️ CRITICAL WARNING: DATA PROTECTION ⚠️
12
+ # BEFORE APPLYING THIS MANIFEST:
13
+ # 1. Run: /Users/almorris/TRIBE/0zen/scripts/data-safety-check.sh
14
+ # 2. Check for existing PVCs: kubectl get pvc -n tribe-system
15
+ # 3. NEVER delete PVCs - they contain your data!
16
+ #
17
+ # This manifest will CREATE resources if they don't exist
18
+ # or UPDATE them if they do. PVCs are NEVER deleted.
11
19
  ---
12
20
  apiVersion: v1
13
21
  kind: Namespace
@@ -313,7 +321,7 @@ spec:
313
321
  args:
314
322
  - |
315
323
  echo "Waiting for services..."
316
- until nc -z taskmaster 5000; do echo waiting for taskmaster; sleep 2; done
324
+ until nc -z taskmaster 8080; do echo waiting for taskmaster; sleep 2; done
317
325
  until nc -z gitea 3000; do echo waiting for gitea; sleep 2; done
318
326
  echo "All services ready!"
319
327
  containers:
@@ -332,7 +340,7 @@ spec:
332
340
  cpu: "1"
333
341
  env:
334
342
  - name: TASKMASTER_URL
335
- value: http://taskmaster:5000
343
+ value: http://taskmaster:8080
336
344
  - name: GITEA_URL
337
345
  value: http://gitea:3000
338
346
  - name: GITEA_ADMIN_USER
@@ -387,7 +395,7 @@ spec:
387
395
  spec:
388
396
  containers:
389
397
  - name: claude-agent
390
- image: claude-agent:latest
398
+ image: claude-agent:authenticated
391
399
  imagePullPolicy: IfNotPresent
392
400
  ports:
393
401
  - containerPort: 9090
@@ -403,7 +411,7 @@ spec:
403
411
  - name: ROLE
404
412
  value: worker
405
413
  - name: TASKMASTER_URL
406
- value: http://taskmaster:5000
414
+ value: http://taskmaster:8080
407
415
  - name: GITEA_URL
408
416
  value: http://gitea:3000
409
417
  - name: GITEA_USER
@@ -746,7 +754,7 @@ spec:
746
754
  echo "Updating services with token..."
747
755
 
748
756
  # Update taskmaster if it has a config endpoint
749
- curl -X POST http://taskmaster:5000/api/config \
757
+ curl -X POST http://taskmaster:8080/api/config \
750
758
  -H "Content-Type: application/json" \
751
759
  -d "{\"gitea_token\":\"$TOKEN\"}" || echo "Taskmaster config update skipped"
752
760