aidevops 3.39.108 → 3.39.110

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
@@ -25,7 +25,7 @@ token efficiency, and quality control built in.**
25
25
  [![Maintainability](https://qlty.sh/gh/marcusquinn/projects/aidevops/maintainability.svg)](https://qlty.sh/gh/marcusquinn/projects/aidevops)
26
26
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/2b1adbd66c454dae92234341e801b984)](https://app.codacy.com/gh/marcusquinn/aidevops/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
27
27
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
28
- [![Version](https://img.shields.io/badge/Version-3.39.108-blue.svg)](https://github.com/marcusquinn/aidevops/releases)
28
+ [![Version](https://img.shields.io/badge/Version-3.39.110-blue.svg)](https://github.com/marcusquinn/aidevops/releases)
29
29
  [![npm version](https://img.shields.io/npm/v/aidevops)](https://www.npmjs.com/package/aidevops)
30
30
  [![Homebrew](https://img.shields.io/badge/homebrew-marcusquinn%2Ftap-orange)](https://github.com/marcusquinn/homebrew-tap)
31
31
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 3.39.108
1
+ 3.39.110
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.39.108
8
+ # Version: 3.39.110
9
9
 
10
10
  set -euo pipefail
11
11
 
@@ -279,12 +279,39 @@ _run_update_setup_transaction() {
279
279
  local output_mode="$1"
280
280
  local expected_sha="$2"
281
281
  local setup_exit=0
282
- _run_update_setup "$output_mode" || setup_exit=$?
282
+ local rollback_receipt=""
283
+ rollback_receipt=$(mktemp) || return 1
284
+ AIDEVOPS_UPDATE_ROLLBACK_RECEIPT="$rollback_receipt" _run_update_setup "$output_mode" || setup_exit=$?
283
285
  if [[ "$setup_exit" -ne 0 ]]; then
286
+ rm -f "$rollback_receipt"
284
287
  print_error "Agent deployment failed: setup exited with code $setup_exit"
285
288
  return 1
286
289
  fi
287
- _update_verify_deployment_state "$expected_sha" || return 1
290
+ if ! _update_verify_deployment_state "$expected_sha"; then
291
+ # Load deployment helpers only in the recovery subprocess, keeping the
292
+ # CLI's already-sourced runtime and global state unchanged.
293
+ if [[ -s "$rollback_receipt" ]]; then
294
+ (
295
+ if ! declare -F _runtime_bundle_rollback >/dev/null; then
296
+ # shellcheck source=.agents/scripts/setup/modules/agent-deploy.sh
297
+ source "$INSTALL_DIR/.agents/scripts/setup/modules/agent-deploy.sh" || exit 1
298
+ fi
299
+ if ! declare -F aidevops_runtime_transition_lock_acquire >/dev/null; then
300
+ # shellcheck source=.agents/scripts/setup/modules/agent-runtime.sh
301
+ source "$INSTALL_DIR/.agents/scripts/setup/modules/agent-runtime.sh" || exit 1
302
+ fi
303
+ {
304
+ IFS= read -r _AIDEVOPS_ACTIVE_BUNDLE_ROOT &&
305
+ IFS= read -r _AIDEVOPS_PREVIOUS_BUNDLE_ROOT &&
306
+ IFS= read -r _AIDEVOPS_PREVIOUS_DEPLOYED_SHA
307
+ } <"$rollback_receipt" || exit 1
308
+ _runtime_bundle_rollback "$_AIDEVOPS_REAL_HOME/.aidevops/agents"
309
+ ) || print_error "Failed to roll back the runtime bundle after convergence failure"
310
+ fi
311
+ rm -f "$rollback_receipt"
312
+ return 1
313
+ fi
314
+ rm -f "$rollback_receipt"
288
315
  _update_adopt_deployed_version
289
316
  return 0
290
317
  }
@@ -460,7 +487,7 @@ _update_already_current() {
460
487
  deployed_sha=$(tr -d '[:space:]' <"$stamp_file" 2>/dev/null) || deployed_sha=""
461
488
  [[ -n "$deployed_sha" && "$deployed_sha" != "$local_hash" ]] || return 0
462
489
  if _update_repo_verify_files_changed "$deployed_sha" "$local_hash"; then _AIDEVOPS_UPDATE_RECONCILE_REPO_VERIFY=true; fi
463
- if git -C "$INSTALL_DIR" diff --name-only "$deployed_sha" "$local_hash" -- .agents/scripts/ .agents/agents/ .agents/workflows/ .agents/prompts/ .agents/hooks/ setup.sh .agents/scripts/setup/modules/ aidevops.sh 2>/dev/null | grep -q .; then
490
+ if git -C "$INSTALL_DIR" diff --name-only "$deployed_sha" "$local_hash" -- .agents/scripts/ .agents/agents/ .agents/workflows/ .agents/prompts/ .agents/hooks/ .agents/worker-lifecycle/ setup.sh .agents/scripts/setup/modules/ aidevops.sh 2>/dev/null | grep . >/dev/null; then
464
491
  print_warning "Deployed scripts drifted (${deployed_sha:0:7}→${local_hash:0:7})"
465
492
  print_info "Re-running incremental setup to deploy latest scripts..."
466
493
  _run_update_setup_transaction "$update_output_mode" "$local_hash" || return 1
@@ -1256,7 +1283,7 @@ _help_commands() {
1256
1283
  echo " github auth <cmd> Repository auth routes, App profiles, checks and local usage"
1257
1284
  echo " github-app-auth GitHub App auth setup/status and API route decisions"
1258
1285
  echo " source-access <cmd> Session-bound, sudo-signed source-read approvals"
1259
- echo " secret <cmd> Manage secrets (set/list/run/init/import/status)"
1286
+ echo " secret <cmd> Manage secrets (set/rm/list/run/init/import/status)"
1260
1287
  echo " vault <cmd> Local encrypted Vault broker (init/unlock/lock/status/read/update)"
1261
1288
  echo " config <cmd> Feature toggles (list/get/set/reset/path/help)"
1262
1289
  echo " knowledge <cmd> Knowledge plane management (init/status/provision)"
@@ -1341,6 +1368,7 @@ _help_detailed_sections_content() {
1341
1368
  _help_security_sections
1342
1369
  echo "Secrets:"
1343
1370
  echo " aidevops secret set NAME # Store a secret (hidden input)"
1371
+ echo " aidevops secret rm NAME # Remove from gopass + plaintext (confirm or --yes)"
1344
1372
  echo " aidevops secret list # List secret names (never values)"
1345
1373
  echo " aidevops secret run CMD # Run with secrets injected + redacted"
1346
1374
  echo " aidevops secret init # Initialize gopass encrypted store"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "3.39.108",
3
+ "version": "3.39.110",
4
4
  "description": "AI DevOps Framework - AI-assisted development workflows, code quality, and deployment automation",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.3.11",
package/setup.sh CHANGED
@@ -17,7 +17,7 @@ fi
17
17
  # AI Assistant Server Access Framework Setup Script
18
18
  # Helps developers set up the framework for their infrastructure
19
19
  #
20
- # Version: 3.39.108
20
+ # Version: 3.39.110
21
21
  #
22
22
  # Quick Install:
23
23
  # npm install -g aidevops && aidevops update (recommended)
@@ -1401,8 +1401,12 @@ _setup_ai_session_verify_deploy() {
1401
1401
  "$INSTALL_DIR" \
1402
1402
  "$expected_sha" \
1403
1403
  "$HOME/.aidevops/agents" \
1404
- "$HOME/.aidevops/.deployed-sha"
1405
- return $?
1404
+ "$HOME/.aidevops/.deployed-sha" || {
1405
+ _runtime_bundle_rollback "$HOME/.aidevops/agents" ||
1406
+ print_error "Failed to roll back the runtime bundle after convergence failure"
1407
+ return 1
1408
+ }
1409
+ return 0
1406
1410
  }
1407
1411
 
1408
1412
  # OpenCode DB archive (daily) and maintenance (weekly) schedulers keep the