aidevops 3.32.30 → 3.32.32

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.30-blue.svg)](https://github.com/marcusquinn/aidevops/releases)
63
+ [![Version](https://img.shields.io/badge/Version-3.32.32-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.30
1
+ 3.32.32
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.30
8
+ # Version: 3.32.32
9
9
 
10
10
  set -euo pipefail
11
11
 
@@ -54,8 +54,18 @@ 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
71
  AGENTS_DIR="$_AIDEVOPS_REAL_HOME/.aidevops/agents"
@@ -63,7 +73,7 @@ CONFIG_DIR="$_AIDEVOPS_REAL_HOME/.config/aidevops"
63
73
  REPOS_FILE="$CONFIG_DIR/repos.json"
64
74
  # shellcheck disable=SC2034 # Used in fresh install fallback
65
75
  REPO_URL="https://github.com/marcusquinn/aidevops.git"
66
- VERSION_FILE="$INSTALL_DIR/VERSION"
76
+ VERSION_FILE="$_AIDEVOPS_CLI_ROOT/VERSION"
67
77
 
68
78
  # Portable sed in-place edit (macOS BSD sed vs GNU sed)
69
79
  sed_inplace() { if [[ "$(uname)" == "Darwin" ]]; then sed -i '' "$@"; else sed -i "$@"; fi; }
@@ -181,12 +191,11 @@ ensure_trailing_newline() {
181
191
  return 0
182
192
  }
183
193
 
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"
194
+ # Source CLI implementation modules from the coherent canonical or deployed
195
+ # tree selected above. The launcher executes the deployed orchestrator as a
196
+ # regular file, while local development and package snapshots use .agents/.
197
+ AIDEVOPS_CLI_MODULES_DIR="${_AIDEVOPS_CLI_ROOT}/${_AIDEVOPS_CLI_MODULES_SUBDIR}"
198
+ unset _AIDEVOPS_CLI_ROOT _AIDEVOPS_CLI_MODULES_SUBDIR
190
199
  # shellcheck source=.agents/scripts/aidevops-cli/aidevops-repos-lib.sh
191
200
  # shellcheck disable=SC1091 # module path resolved at runtime via $INSTALL_DIR
192
201
  source "${AIDEVOPS_CLI_MODULES_DIR}/aidevops-repos-lib.sh"
package/bin/aidevops CHANGED
@@ -13,9 +13,24 @@
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.
@@ -30,7 +45,7 @@ fi
30
45
 
31
46
  # 3. Git repo not found — bootstrap it automatically
32
47
  # 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.
48
+ # After this, step 1 will always match and the deployed copy runs directly.
34
49
  if command -v git >/dev/null 2>&1; then
35
50
  echo "[aidevops] First run — cloning git repo to $REPO_DIR for transparent updates..."
36
51
  mkdir -p "$(dirname "$REPO_DIR")"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "3.32.30",
3
+ "version": "3.32.32",
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
@@ -12,7 +12,7 @@ shopt -s inherit_errexit 2>/dev/null || true
12
12
  # AI Assistant Server Access Framework Setup Script
13
13
  # Helps developers set up the framework for their infrastructure
14
14
  #
15
- # Version: 3.32.30
15
+ # Version: 3.32.32
16
16
  #
17
17
  # Quick Install:
18
18
  # npm install -g aidevops && aidevops update (recommended)
@@ -68,7 +68,8 @@ REPO_URL="https://github.com/marcusquinn/aidevops.git"
68
68
  # INSTALL_DIR: resolve from the directory where setup.sh is executed (supports worktrees)
69
69
  # For bootstrap (curl install), this will be /dev/fd/NN and trigger re-exec after clone
70
70
  INSTALL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
71
- export REPO_URL INSTALL_DIR
71
+ AGENTS_DIR="${AIDEVOPS_AGENTS_DIR:-${HOME:+$HOME/.aidevops/agents}}"
72
+ export REPO_URL INSTALL_DIR AGENTS_DIR
72
73
 
73
74
  # Source modular setup functions (t316.2)
74
75
  # These modules are sourced only when setup.sh is run from the repo directory
@@ -1620,7 +1621,6 @@ _setup_run_interactive() {
1620
1621
  confirm_step "Setup SSH key" && setup_ssh_key
1621
1622
  confirm_step "Setup configuration files" && setup_configs
1622
1623
  confirm_step "Set secure permissions on config files" && set_permissions
1623
- confirm_step "Install aidevops CLI command" && install_aidevops_cli
1624
1624
  confirm_step "Setup shell aliases" && setup_aliases
1625
1625
  confirm_step "Setup terminal title integration" && setup_terminal_title
1626
1626
  confirm_step "Deploy AI templates to home directories" && deploy_ai_templates
@@ -1640,6 +1640,9 @@ _setup_run_interactive() {
1640
1640
  confirm_step "Extract OpenCode prompts" && extract_opencode_prompts
1641
1641
  confirm_step "Check OpenCode prompt drift" && check_opencode_prompt_drift
1642
1642
  confirm_step "Deploy aidevops agents to ~/.aidevops/agents/" && { deploy_aidevops_agents; _deploy_hotfix_config; }
1643
+ # Launcher verification reads the deployed VERSION, so it must follow agent
1644
+ # deployment on first-run interactive setup as it already does non-interactively.
1645
+ confirm_step "Install and verify aidevops CLI command" && install_aidevops_cli
1643
1646
  confirm_step "Sync agents from private repositories" && sync_agent_sources
1644
1647
  confirm_step "Set up routines repo (private repo for recurring operational jobs)" && setup_routines
1645
1648
  is_feature_enabled safety_hooks 2>/dev/null && confirm_step "Install Claude Code safety hooks (block destructive commands)" && setup_safety_hooks
@@ -1902,6 +1905,11 @@ main() {
1902
1905
  fi
1903
1906
 
1904
1907
  if [[ "$NON_INTERACTIVE" == "true" ]]; then
1908
+ # Full-loop release deployment uses this mutex. It remains held through
1909
+ # deploy_aidevops_agents and install_aidevops_cli, so agent and CLI
1910
+ # convergence are one serialized non-interactive deployment interval.
1911
+ # Direct interactive setup is intentionally outside this guarantee: holding
1912
+ # the mutex across prompts can block unattended full-loop deployments.
1905
1913
  _setup_acquire_noninteractive_setup_lock "$@" || exit $?
1906
1914
  fi
1907
1915