aidevops 3.8.59 → 3.8.61

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.8.59
1
+ 3.8.61
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.8.59
8
+ # Version: 3.8.61
9
9
 
10
10
  set -euo pipefail
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "3.8.59",
3
+ "version": "3.8.61",
4
4
  "description": "AI DevOps Framework - AI-assisted development workflows, code quality, and deployment automation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -19,19 +19,26 @@ IFS=$'\n\t'
19
19
  # auto-restart mechanism exists, we start it manually.
20
20
  #######################################
21
21
  _restart_pulse_if_running() {
22
- if ! pgrep -f pulse-wrapper.sh >/dev/null; then
22
+ # Anchor the pattern so it only matches the running script, not editors or
23
+ # grep commands that happen to contain "pulse-wrapper.sh" in their argv.
24
+ local pattern="(^|/)pulse-wrapper\\.sh( |$)"
25
+
26
+ if ! pgrep -f "$pattern" >/dev/null; then
23
27
  # Not running, nothing to do
24
28
  return 0
25
29
  fi
26
30
 
27
31
  local old_pid
28
- old_pid=$(pgrep -f pulse-wrapper.sh | head -1)
32
+ old_pid=$(pgrep -f "$pattern" | tail -1)
33
+ if [[ -z "$old_pid" ]]; then
34
+ return 0
35
+ fi
29
36
  print_info "Restarting pulse (PID $old_pid) to load updated scripts..."
30
- pkill -f pulse-wrapper.sh || true
37
+ pkill -f "$pattern" || true
31
38
 
32
39
  # Wait for it to die
33
40
  local wait_count=0
34
- while pgrep -f pulse-wrapper.sh >/dev/null && [[ "$wait_count" -lt 10 ]]; do
41
+ while pgrep -f "$pattern" >/dev/null && [[ "$wait_count" -lt 10 ]]; do
35
42
  sleep 1
36
43
  wait_count=$((wait_count + 1))
37
44
  done
@@ -39,12 +46,15 @@ _restart_pulse_if_running() {
39
46
  # Give launchd/cron a moment to restart it
40
47
  sleep 5
41
48
 
42
- # Check if it auto-restarted
43
- if pgrep -f pulse-wrapper.sh >/dev/null; then
49
+ # Check if it auto-restarted with a different PID (guards against false
50
+ # success if the old process failed to terminate).
51
+ if pgrep -f "$pattern" >/dev/null; then
44
52
  local new_pid
45
- new_pid=$(pgrep -f pulse-wrapper.sh | head -1)
46
- print_success "Pulse restarted (new PID $new_pid)"
47
- return 0
53
+ new_pid=$(pgrep -f "$pattern" | tail -1)
54
+ if [[ -n "$new_pid" ]] && [[ "$new_pid" != "$old_pid" ]]; then
55
+ print_success "Pulse restarted (new PID $new_pid)"
56
+ return 0
57
+ fi
48
58
  fi
49
59
 
50
60
  # No auto-restart — start it manually
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.8.59
15
+ # Version: 3.8.61
16
16
  #
17
17
  # Quick Install:
18
18
  # npm install -g aidevops && aidevops update (recommended)