aidevops 3.32.115 → 3.32.116

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.115-blue.svg)](https://github.com/marcusquinn/aidevops/releases)
63
+ [![Version](https://img.shields.io/badge/Version-3.32.116-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.115
1
+ 3.32.116
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.115
8
+ # Version: 3.32.116
9
9
 
10
10
  set -euo pipefail
11
11
 
@@ -269,22 +269,34 @@ cmd_update() {
269
269
 
270
270
  if check_dir "$INSTALL_DIR/.git"; then
271
271
  cd "$INSTALL_DIR" || exit 1
272
+ if ! git diff --quiet 2>/dev/null || ! git diff --cached --quiet 2>/dev/null; then
273
+ print_error "Refusing to update: tracked local changes exist in $INSTALL_DIR"
274
+ git status --short
275
+ print_info "Commit or stash these changes, then rerun aidevops update."
276
+ return 1
277
+ fi
272
278
  local current_branch
273
279
  current_branch=$(git branch --show-current 2>/dev/null || echo "")
274
- [[ "$current_branch" != "main" ]] && {
280
+ if [[ "$current_branch" != "main" ]]; then
275
281
  print_info "Switching to main branch..."
276
- git checkout main --quiet 2>/dev/null || git checkout -b main origin/main --quiet 2>/dev/null || true
277
- }
278
- if ! git diff --quiet 2>/dev/null || ! git diff --cached --quiet 2>/dev/null; then
279
- print_info "Cleaning up stale working tree changes..."
280
- git reset HEAD -- . 2>/dev/null || true
281
- git checkout -- . 2>/dev/null || true
282
+ if ! git checkout main --quiet 2>/dev/null && ! git checkout -b main origin/main --quiet 2>/dev/null; then
283
+ print_error "Failed to switch to main; refusing to update the active '$current_branch' branch."
284
+ return 1
285
+ fi
286
+ fi
287
+ if ! git fetch origin main --tags --quiet; then
288
+ print_error "Failed to fetch origin/main; no update was applied."
289
+ return 1
282
290
  fi
283
- git fetch origin main --tags --quiet
284
291
  local local_hash
285
- local_hash=$(git rev-parse HEAD)
292
+ local_hash=$(git rev-parse HEAD) || return 1
286
293
  local remote_hash
287
- remote_hash=$(git rev-parse origin/main)
294
+ remote_hash=$(git rev-parse origin/main) || return 1
295
+ if [[ "$local_hash" != "$remote_hash" ]] && git merge-base --is-ancestor "$remote_hash" "$local_hash" 2>/dev/null; then
296
+ print_error "Refusing to update: local commits exist on main."
297
+ print_info "Preserve or reconcile the local history in $INSTALL_DIR, then rerun aidevops update."
298
+ return 1
299
+ fi
288
300
  if [[ "$local_hash" == "$remote_hash" ]]; then
289
301
  print_success "Framework already up to date!"
290
302
  local repo_version deployed_version
@@ -328,24 +340,24 @@ cmd_update() {
328
340
  fi
329
341
  fi
330
342
  fi
331
- git checkout -- . 2>/dev/null || true
332
343
  else
333
- print_info "Pulling latest changes..."
344
+ print_info "Applying latest changes..."
334
345
  local old_hash
335
346
  old_hash=$(git rev-parse HEAD)
336
- if git pull --ff-only origin main --quiet; then
347
+ if git merge --ff-only "$remote_hash" --quiet; then
337
348
  :
338
349
  else
339
- print_warning "Fast-forward pull failed resetting to origin/main..."
340
- git reset --hard origin/main --quiet 2>/dev/null || {
341
- print_error "Failed to reset to origin/main"
342
- print_info "Try: cd $INSTALL_DIR && git fetch origin && git reset --hard origin/main"
343
- return 1
344
- }
350
+ print_error "Fast-forward update failed; preserving local history."
351
+ print_info "Review $INSTALL_DIR, resolve the divergence, then rerun aidevops update."
352
+ return 1
345
353
  fi
346
354
  local new_version new_hash
347
355
  new_version=$(get_version)
348
356
  new_hash=$(git rev-parse HEAD)
357
+ if [[ "$new_hash" != "$remote_hash" ]]; then
358
+ print_error "Updated HEAD does not match the fetched origin/main commit; refusing to run setup."
359
+ return 1
360
+ fi
349
361
  if [[ "$old_hash" != "$new_hash" ]]; then
350
362
  if _update_repo_verify_files_changed "$old_hash" "$new_hash"; then reconcile_repo_verify=true; fi
351
363
  local total_commits
@@ -367,7 +379,6 @@ cmd_update() {
367
379
  print_info "Running incremental setup to apply changes (falls back to full setup if needed)..."
368
380
  local setup_exit=0
369
381
  _run_update_setup "$update_output_mode" || setup_exit=$?
370
- git checkout -- . 2>/dev/null || true
371
382
  local repo_version deployed_version
372
383
  repo_version=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown")
373
384
  deployed_version=$(cat "$HOME/.aidevops/agents/VERSION" 2>/dev/null || echo "none")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "3.32.115",
3
+ "version": "3.32.116",
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
@@ -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.32.115
20
+ # Version: 3.32.116
21
21
  #
22
22
  # Quick Install:
23
23
  # npm install -g aidevops && aidevops update (recommended)