aidevops 3.1.76 → 3.1.77

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/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.76
1
+ 3.1.77
package/aidevops.sh CHANGED
@@ -3,7 +3,7 @@
3
3
  # AI DevOps Framework CLI
4
4
  # Usage: aidevops <command> [options]
5
5
  #
6
- # Version: 3.1.76
6
+ # Version: 3.1.77
7
7
 
8
8
  set -euo pipefail
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "3.1.76",
3
+ "version": "3.1.77",
4
4
  "description": "AI DevOps Framework - AI-assisted development workflows, code quality, and deployment automation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1418,17 +1418,56 @@ setup_nodejs() {
1418
1418
  setup_opencode_cli() {
1419
1419
  print_info "Setting up OpenCode CLI..."
1420
1420
 
1421
+ # PINNED VERSION: OpenCode >1.2.27 breaks OAuth token injection.
1422
+ # See install_pkg comment below for details.
1423
+ local pinned_version="1.2.27"
1424
+
1421
1425
  # Check if OpenCode is already installed
1422
1426
  if command -v opencode >/dev/null 2>&1; then
1423
1427
  local oc_version
1424
1428
  oc_version=$(opencode --version 2>/dev/null | head -1 || echo "unknown")
1429
+
1430
+ # Check if installed version is newer than pinned (needs downgrade)
1431
+ if [[ "$oc_version" != "unknown" ]] && [[ "$oc_version" != "$pinned_version" ]]; then
1432
+ # Compare versions: if installed > pinned, downgrade
1433
+ local installed_major installed_minor installed_patch
1434
+ IFS='.' read -r installed_major installed_minor installed_patch <<<"$oc_version"
1435
+ local pinned_major pinned_minor pinned_patch
1436
+ IFS='.' read -r pinned_major pinned_minor pinned_patch <<<"$pinned_version"
1437
+ installed_patch="${installed_patch%%[^0-9]*}"
1438
+ pinned_patch="${pinned_patch%%[^0-9]*}"
1439
+
1440
+ local needs_downgrade="false"
1441
+ if [[ "${installed_major:-0}" -gt "${pinned_major:-0}" ]]; then
1442
+ needs_downgrade="true"
1443
+ elif [[ "${installed_major:-0}" -eq "${pinned_major:-0}" ]] && [[ "${installed_minor:-0}" -gt "${pinned_minor:-0}" ]]; then
1444
+ needs_downgrade="true"
1445
+ elif [[ "${installed_major:-0}" -eq "${pinned_major:-0}" ]] && [[ "${installed_minor:-0}" -eq "${pinned_minor:-0}" ]] && [[ "${installed_patch:-0}" -gt "${pinned_patch:-0}" ]]; then
1446
+ needs_downgrade="true"
1447
+ fi
1448
+
1449
+ if [[ "$needs_downgrade" == "true" ]]; then
1450
+ print_warning "OpenCode $oc_version has an OAuth regression — downgrading to $pinned_version"
1451
+ if npm_global_install "opencode-ai@${pinned_version}"; then
1452
+ print_success "OpenCode downgraded to $pinned_version (OAuth working)"
1453
+ else
1454
+ print_warning "Downgrade failed — run manually: npm install -g opencode-ai@${pinned_version}"
1455
+ fi
1456
+ return 0
1457
+ fi
1458
+ fi
1459
+
1425
1460
  print_success "OpenCode already installed: $oc_version"
1426
1461
  return 0
1427
1462
  fi
1428
1463
 
1429
1464
  # Need either bun or npm to install
1430
1465
  local installer=""
1431
- local install_pkg="opencode-ai@latest"
1466
+ # PINNED: OpenCode >1.2.27 has a regression where the built-in anthropic
1467
+ # provider ignores OAuth tokens from auth.json, causing "API key missing"
1468
+ # errors for all OAuth users. Pin to 1.2.27 until the upstream fix lands.
1469
+ # Track: https://github.com/marcusquinn/aidevops/issues/5546
1470
+ local install_pkg="opencode-ai@1.2.27"
1432
1471
 
1433
1472
  if command -v bun >/dev/null 2>&1; then
1434
1473
  installer="bun"
package/setup.sh CHANGED
@@ -10,7 +10,7 @@ shopt -s inherit_errexit 2>/dev/null || true
10
10
  # AI Assistant Server Access Framework Setup Script
11
11
  # Helps developers set up the framework for their infrastructure
12
12
  #
13
- # Version: 3.1.76
13
+ # Version: 3.1.77
14
14
  #
15
15
  # Quick Install:
16
16
  # npm install -g aidevops && aidevops update (recommended)