aidevops 3.13.92 → 3.13.93

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.13.92
1
+ 3.13.93
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.13.92
8
+ # Version: 3.13.93
9
9
 
10
10
  set -euo pipefail
11
11
 
@@ -1542,7 +1542,7 @@ main() {
1542
1542
  parent-status | ps) _dispatch_helper "parent-status-helper.sh" "parent-status-helper.sh" "$@" ;;
1543
1543
  knowledge) _dispatch_helper "knowledge-helper.sh" "knowledge-helper.sh" "$@" ;;
1544
1544
  campaign | campaigns)
1545
- # P1 provisioning: init/provision/ls → campaigns-provision-helper.sh
1545
+ # P1 provisioning: init/provision/status/ls → campaigns-provision-helper.sh
1546
1546
  # P4 asset binary: asset → campaign-asset-helper.sh
1547
1547
  # P2+P6: all other subcommands → campaign-helper.sh
1548
1548
  local _camp_cmd="${1:-help}"
@@ -1550,6 +1550,13 @@ main() {
1550
1550
  init | provision | ls)
1551
1551
  _dispatch_helper "campaigns-provision-helper.sh" "campaigns-provision-helper.sh" "$@"
1552
1552
  ;;
1553
+ status)
1554
+ if [[ $# -le 1 || -d "${2:-}" || "${2:-}" == .* || "${2:-}" == /* || "${2:-}" == ~* ]]; then
1555
+ _dispatch_helper "campaigns-provision-helper.sh" "campaigns-provision-helper.sh" "$@"
1556
+ else
1557
+ _dispatch_helper "campaign-helper.sh" "campaign-helper.sh" "$@"
1558
+ fi
1559
+ ;;
1553
1560
  asset | assets)
1554
1561
  shift
1555
1562
  _dispatch_helper "campaign-asset-helper.sh" "campaign-asset-helper.sh" "$@"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "3.13.92",
3
+ "version": "3.13.93",
4
4
  "description": "AI DevOps Framework - AI-assisted development workflows, code quality, and deployment automation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -554,6 +554,11 @@ PR_PLIST
554
554
  )
555
555
 
556
556
  if _launchd_install_if_changed "$pr_label" "$pr_plist" "$pr_plist_content"; then
557
+ if _launchd_kickstart_and_recover "$pr_label" "$pr_plist"; then
558
+ print_info "Profile README update kickstart verified"
559
+ else
560
+ print_warning "Profile README update LaunchAgent loaded but kickstart verification failed"
561
+ fi
557
562
  print_info "Profile README update enabled (launchd, hourly)"
558
563
  else
559
564
  print_warning "Failed to load profile README update LaunchAgent"
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.13.92
15
+ # Version: 3.13.93
16
16
  #
17
17
  # Quick Install:
18
18
  # npm install -g aidevops && aidevops update (recommended)
@@ -253,6 +253,74 @@ _launchd_has_agent() {
253
253
  return $?
254
254
  }
255
255
 
256
+ _launchd_agent_state() {
257
+ local label="$1"
258
+ local state=""
259
+ state=$(launchctl print "gui/$(id -u)/${label}" 2>/dev/null | awk -F'= ' '/state =/ { print $2; exit }' || true)
260
+ printf '%s\n' "$state"
261
+ return 0
262
+ }
263
+
264
+ _launchd_bootout_bootstrap() {
265
+ local label="$1"
266
+ local plist_path="$2"
267
+ local domain
268
+ domain="gui/$(id -u)"
269
+
270
+ launchctl bootout "${domain}/${label}" 2>/dev/null || true
271
+ launchctl bootstrap "$domain" "$plist_path" 2>/dev/null
272
+ return $?
273
+ }
274
+
275
+ _launchd_recover_xpcproxy_if_stuck() {
276
+ local label="$1"
277
+ local plist_path="$2"
278
+ local state
279
+ state=$(_launchd_agent_state "$label")
280
+ if [[ "$state" != "xpcproxy" ]]; then
281
+ return 0
282
+ fi
283
+
284
+ print_warning "LaunchAgent $label stuck in xpcproxy; reloading with bootout/bootstrap"
285
+ if ! _launchd_bootout_bootstrap "$label" "$plist_path"; then
286
+ return 1
287
+ fi
288
+
289
+ state=$(_launchd_agent_state "$label")
290
+ if [[ "$state" == "xpcproxy" ]]; then
291
+ print_warning "LaunchAgent $label still stuck in xpcproxy after recovery"
292
+ return 1
293
+ fi
294
+ return 0
295
+ }
296
+
297
+ _launchd_load_agent() {
298
+ local label="$1"
299
+ local plist_path="$2"
300
+
301
+ if launchctl load "$plist_path" 2>/dev/null; then
302
+ _launchd_recover_xpcproxy_if_stuck "$label" "$plist_path" || return 1
303
+ return 0
304
+ fi
305
+
306
+ if _launchd_bootout_bootstrap "$label" "$plist_path"; then
307
+ _launchd_recover_xpcproxy_if_stuck "$label" "$plist_path" || return 1
308
+ return 0
309
+ fi
310
+ return 1
311
+ }
312
+
313
+ _launchd_kickstart_and_recover() {
314
+ local label="$1"
315
+ local plist_path="$2"
316
+ local domain
317
+ domain="gui/$(id -u)"
318
+
319
+ launchctl kickstart -k "${domain}/${label}" 2>/dev/null || return 1
320
+ _launchd_recover_xpcproxy_if_stuck "$label" "$plist_path"
321
+ return $?
322
+ }
323
+
256
324
  # Install a launchd plist only if its content has changed.
257
325
  # Avoids unnecessary unload/reload which resets StartInterval timers.
258
326
  # Usage: _launchd_install_if_changed <label> <plist_path> <new_content>
@@ -269,7 +337,9 @@ _launchd_install_if_changed() {
269
337
  if [[ "$existing_content" == "$new_content" ]]; then
270
338
  # Ensure it's loaded even if content unchanged
271
339
  if ! _launchd_has_agent "$label"; then
272
- launchctl load "$plist_path" 2>/dev/null || return 1
340
+ _launchd_load_agent "$label" "$plist_path" || return 1
341
+ else
342
+ _launchd_recover_xpcproxy_if_stuck "$label" "$plist_path" || return 1
273
343
  fi
274
344
  return 0
275
345
  fi
@@ -305,7 +375,7 @@ _launchd_install_if_changed() {
305
375
  rm -f "$tmp_plist"
306
376
  return 1
307
377
  fi
308
- launchctl load "$plist_path" 2>/dev/null || return 1
378
+ _launchd_load_agent "$label" "$plist_path" || return 1
309
379
  return 0
310
380
  }
311
381