aidevops 3.32.31 → 3.32.33

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/README.md CHANGED
@@ -60,7 +60,7 @@ The result: an AI operations platform that manages projects across every busines
60
60
  [![Copyright](https://img.shields.io/badge/Copyright-Marcus%20Quinn%202025--2026-blue.svg)](https://github.com/marcusquinn)
61
61
 
62
62
  <!-- Release & Version Info -->
63
- [![Version](https://img.shields.io/badge/Version-3.32.31-blue.svg)](https://github.com/marcusquinn/aidevops/releases)
63
+ [![Version](https://img.shields.io/badge/Version-3.32.33-blue.svg)](https://github.com/marcusquinn/aidevops/releases)
64
64
  [![npm version](https://img.shields.io/npm/v/aidevops)](https://www.npmjs.com/package/aidevops)
65
65
  [![Homebrew](https://img.shields.io/badge/homebrew-marcusquinn%2Ftap-orange)](https://github.com/marcusquinn/homebrew-tap)
66
66
  [![GitHub repository](https://img.shields.io/badge/github-repository-181717.svg?logo=github)](https://github.com/marcusquinn/aidevops)
package/VERSION CHANGED
@@ -1 +1 @@
1
- 3.32.31
1
+ 3.32.33
package/aidevops.sh CHANGED
@@ -5,7 +5,7 @@
5
5
  # AI DevOps Framework CLI
6
6
  # Usage: aidevops <command> [options]
7
7
  #
8
- # Version: 3.32.31
8
+ # Version: 3.32.33
9
9
 
10
10
  set -euo pipefail
11
11
 
@@ -44,7 +44,7 @@ INSTALL_DIR="$_AIDEVOPS_REAL_HOME/Git/aidevops"
44
44
  _AIDEVOPS_SOURCE_PATH="${BASH_SOURCE[0]}"
45
45
  _AIDEVOPS_SOURCE_DIR="${_AIDEVOPS_SOURCE_PATH%/*}"
46
46
  [[ "$_AIDEVOPS_SOURCE_DIR" == "$_AIDEVOPS_SOURCE_PATH" ]] && _AIDEVOPS_SOURCE_DIR="."
47
- _AIDEVOPS_SOURCE_DIR="$(cd "$_AIDEVOPS_SOURCE_DIR" 2>/dev/null && pwd)" || _AIDEVOPS_SOURCE_DIR=""
47
+ _AIDEVOPS_SOURCE_DIR="$(cd "$_AIDEVOPS_SOURCE_DIR" 2>/dev/null && pwd -P)" || _AIDEVOPS_SOURCE_DIR=""
48
48
  if [[ -n "$_AIDEVOPS_SOURCE_DIR" && -L "$_AIDEVOPS_SOURCE_PATH" ]]; then
49
49
  _AIDEVOPS_LINK_TARGET="$(readlink "$_AIDEVOPS_SOURCE_PATH" 2>/dev/null || true)"
50
50
  if [[ -n "$_AIDEVOPS_LINK_TARGET" ]]; then
@@ -54,16 +54,27 @@ if [[ -n "$_AIDEVOPS_SOURCE_DIR" && -L "$_AIDEVOPS_SOURCE_PATH" ]]; then
54
54
  [[ -n "$_AIDEVOPS_LINK_DIR" ]] && _AIDEVOPS_SOURCE_DIR="$_AIDEVOPS_LINK_DIR"
55
55
  fi
56
56
  fi
57
+ _AIDEVOPS_CLI_ROOT="$INSTALL_DIR"
58
+ _AIDEVOPS_CLI_MODULES_SUBDIR=".agents/scripts/aidevops-cli"
57
59
  if [[ -n "$_AIDEVOPS_SOURCE_DIR" && -f "$_AIDEVOPS_SOURCE_DIR/.agents/scripts/aidevops-cli/aidevops-repos-lib.sh" ]]; then
58
60
  INSTALL_DIR="$_AIDEVOPS_SOURCE_DIR"
61
+ _AIDEVOPS_CLI_ROOT="$_AIDEVOPS_SOURCE_DIR"
62
+ elif [[ -n "$_AIDEVOPS_SOURCE_DIR" && -f "$_AIDEVOPS_SOURCE_DIR/scripts/aidevops-cli/aidevops-repos-lib.sh" ]]; then
63
+ # setup.sh deploys the orchestrator at the agents root and its modules under
64
+ # scripts/. Keep repository operations pointed at INSTALL_DIR, but load the
65
+ # CLI and VERSION from this coherent atomic deployment instead of a stale
66
+ # canonical checkout.
67
+ _AIDEVOPS_CLI_ROOT="$_AIDEVOPS_SOURCE_DIR"
68
+ _AIDEVOPS_CLI_MODULES_SUBDIR="scripts/aidevops-cli"
59
69
  fi
60
70
  unset _AIDEVOPS_SOURCE_PATH _AIDEVOPS_SOURCE_DIR _AIDEVOPS_LINK_TARGET _AIDEVOPS_LINK_DIR
61
- AGENTS_DIR="$_AIDEVOPS_REAL_HOME/.aidevops/agents"
71
+ AGENTS_DIR="${AIDEVOPS_AGENTS_DIR:-$_AIDEVOPS_REAL_HOME/.aidevops/agents}"
72
+ export AIDEVOPS_AGENTS_DIR="$AGENTS_DIR"
62
73
  CONFIG_DIR="$_AIDEVOPS_REAL_HOME/.config/aidevops"
63
74
  REPOS_FILE="$CONFIG_DIR/repos.json"
64
75
  # shellcheck disable=SC2034 # Used in fresh install fallback
65
76
  REPO_URL="https://github.com/marcusquinn/aidevops.git"
66
- VERSION_FILE="$INSTALL_DIR/VERSION"
77
+ VERSION_FILE="$_AIDEVOPS_CLI_ROOT/VERSION"
67
78
 
68
79
  # Portable sed in-place edit (macOS BSD sed vs GNU sed)
69
80
  sed_inplace() { if [[ "$(uname)" == "Darwin" ]]; then sed -i '' "$@"; else sed -i "$@"; fi; }
@@ -181,12 +192,11 @@ ensure_trailing_newline() {
181
192
  return 0
182
193
  }
183
194
 
184
- # Source CLI implementation modules from the namespaced module tree.
185
- # INSTALL_DIR is the canonical location of aidevops.sh (set above). Using
186
- # INSTALL_DIR rather than BASH_SOURCE[0] preserves installed symlink support:
187
- # /usr/local/bin/aidevops → $INSTALL_DIR/aidevops.sh would otherwise resolve
188
- # BASH_SOURCE[0] to /usr/local/bin instead of the checkout/deployed tree.
189
- AIDEVOPS_CLI_MODULES_DIR="${INSTALL_DIR}/.agents/scripts/aidevops-cli"
195
+ # Source CLI implementation modules from the coherent canonical or deployed
196
+ # tree selected above. The launcher executes the deployed orchestrator as a
197
+ # regular file, while local development and package snapshots use .agents/.
198
+ AIDEVOPS_CLI_MODULES_DIR="${_AIDEVOPS_CLI_ROOT}/${_AIDEVOPS_CLI_MODULES_SUBDIR}"
199
+ unset _AIDEVOPS_CLI_ROOT _AIDEVOPS_CLI_MODULES_SUBDIR
190
200
  # shellcheck source=.agents/scripts/aidevops-cli/aidevops-repos-lib.sh
191
201
  # shellcheck disable=SC1091 # module path resolved at runtime via $INSTALL_DIR
192
202
  source "${AIDEVOPS_CLI_MODULES_DIR}/aidevops-repos-lib.sh"
package/bin/aidevops CHANGED
@@ -13,14 +13,31 @@
13
13
 
14
14
  set -euo pipefail
15
15
 
16
- REPO_DIR="$HOME/Git/aidevops"
16
+ REAL_HOME="$HOME"
17
+ if [[ -n "${SUDO_USER:-}" && "$(id -u)" -eq 0 ]]; then
18
+ _tmp_real_home=""
19
+ if command -v getent &>/dev/null; then
20
+ _tmp_real_home=$(getent passwd "$SUDO_USER" | cut -d: -f6)
21
+ elif command -v dscl &>/dev/null; then
22
+ _tmp_real_home=$(dscl . -read "/Users/${SUDO_USER}" NFSHomeDirectory 2>/dev/null | awk '{print $2; exit}' || true)
23
+ elif [[ -d "/Users/${SUDO_USER}" ]]; then
24
+ _tmp_real_home="/Users/${SUDO_USER}"
25
+ fi
26
+ if [[ -n "$_tmp_real_home" ]]; then
27
+ REAL_HOME="$_tmp_real_home"
28
+ fi
29
+ fi
30
+
31
+ REPO_DIR="${REAL_HOME:+$REAL_HOME/Git/aidevops}"
17
32
  REPO_URL="https://github.com/marcusquinn/aidevops.git"
18
- DEPLOYED_CLI="$HOME/.aidevops/agents/aidevops.sh"
33
+ DEPLOYED_CLI="${REAL_HOME:+$REAL_HOME/.aidevops/agents/aidevops.sh}"
19
34
 
20
35
  # 1. Prefer the setup-deployed copy. It is released atomically with its modules,
21
36
  # so a stale or dirty canonical checkout cannot split the CLI version from them.
22
37
  if [[ -f "$DEPLOYED_CLI" ]]; then
23
- exec bash "$DEPLOYED_CLI" "$@"
38
+ DEPLOYED_ROOT="$(cd "$(dirname "$DEPLOYED_CLI")" && pwd -P)"
39
+ export AIDEVOPS_AGENTS_DIR="$DEPLOYED_ROOT"
40
+ exec bash "$DEPLOYED_ROOT/aidevops.sh" "$@"
24
41
  fi
25
42
 
26
43
  # 2. Use the git repo for bootstrap and local development.
@@ -30,7 +47,7 @@ fi
30
47
 
31
48
  # 3. Git repo not found — bootstrap it automatically
32
49
  # This runs once on first use after a package manager install (npm/brew/bun).
33
- # After this, step 1 will always match and the git repo runs directly.
50
+ # After this, step 1 will always match and the deployed copy runs directly.
34
51
  if command -v git >/dev/null 2>&1; then
35
52
  echo "[aidevops] First run — cloning git repo to $REPO_DIR for transparent updates..."
36
53
  mkdir -p "$(dirname "$REPO_DIR")"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "3.32.31",
3
+ "version": "3.32.33",
4
4
  "description": "AI DevOps Framework - AI-assisted development workflows, code quality, and deployment automation",
5
5
  "type": "module",
6
6
  "workspaces": [
package/setup.sh CHANGED
@@ -9,10 +9,15 @@ IFS=$'\n\t'
9
9
  trap 'rc=$?; echo "[ERROR] ${BASH_SOURCE[0]}:${LINENO} exit $rc" >&2' ERR
10
10
  shopt -s inherit_errexit 2>/dev/null || true
11
11
 
12
+ if [[ -z "${HOME:-}" ]]; then
13
+ printf '%s\n' '[ERROR] HOME environment variable is unset or empty. setup.sh requires a valid HOME directory.' >&2
14
+ exit 1
15
+ fi
16
+
12
17
  # AI Assistant Server Access Framework Setup Script
13
18
  # Helps developers set up the framework for their infrastructure
14
19
  #
15
- # Version: 3.32.31
20
+ # Version: 3.32.33
16
21
  #
17
22
  # Quick Install:
18
23
  # npm install -g aidevops && aidevops update (recommended)
@@ -68,7 +73,8 @@ REPO_URL="https://github.com/marcusquinn/aidevops.git"
68
73
  # INSTALL_DIR: resolve from the directory where setup.sh is executed (supports worktrees)
69
74
  # For bootstrap (curl install), this will be /dev/fd/NN and trigger re-exec after clone
70
75
  INSTALL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
71
- export REPO_URL INSTALL_DIR
76
+ AGENTS_DIR="${AIDEVOPS_AGENTS_DIR:-$HOME/.aidevops/agents}"
77
+ export REPO_URL INSTALL_DIR AGENTS_DIR
72
78
 
73
79
  # Source modular setup functions (t316.2)
74
80
  # These modules are sourced only when setup.sh is run from the repo directory