aidevops 3.39.301 → 3.39.303
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 +1 -1
- package/VERSION +1 -1
- package/aidevops.sh +1 -1
- package/package.json +1 -1
- package/setup.sh +52 -39
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ token efficiency, and quality control built in.**
|
|
|
25
25
|
[](https://qlty.sh/gh/marcusquinn/projects/aidevops)
|
|
26
26
|
[](https://app.codacy.com/gh/marcusquinn/aidevops/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
|
27
27
|
[](https://opensource.org/licenses/MIT)
|
|
28
|
-
[](https://github.com/marcusquinn/aidevops/releases)
|
|
29
29
|
[](https://www.npmjs.com/package/aidevops)
|
|
30
30
|
[](https://github.com/marcusquinn/homebrew-tap)
|
|
31
31
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.39.
|
|
1
|
+
3.39.303
|
package/aidevops.sh
CHANGED
package/package.json
CHANGED
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.
|
|
20
|
+
# Version: 3.39.303
|
|
21
21
|
#
|
|
22
22
|
# Quick Install:
|
|
23
23
|
# npm install -g aidevops && aidevops update (recommended)
|
|
@@ -345,6 +345,8 @@ SETUP_IMPL_MODULES_DIR="${SETUP_MODULES_DIR}/modules"
|
|
|
345
345
|
source "${INSTALL_DIR}/.agents/scripts/runtime-bundle-verifier.sh"
|
|
346
346
|
# shellcheck source=.agents/scripts/pulse-runtime-pin.sh
|
|
347
347
|
source "${INSTALL_DIR}/.agents/scripts/pulse-runtime-pin.sh"
|
|
348
|
+
# shellcheck source=.agents/scripts/process-safety-lib.sh
|
|
349
|
+
source "${INSTALL_DIR}/.agents/scripts/process-safety-lib.sh"
|
|
348
350
|
# shellcheck disable=SC1091 # Dynamic path via $SETUP_IMPL_MODULES_DIR
|
|
349
351
|
source "${SETUP_IMPL_MODULES_DIR}/core.sh"
|
|
350
352
|
# shellcheck disable=SC1091
|
|
@@ -716,64 +718,75 @@ _setup_pid_elapsed_seconds() {
|
|
|
716
718
|
|
|
717
719
|
_setup_register_child_pid() {
|
|
718
720
|
local pid="$1"
|
|
719
|
-
|
|
721
|
+
# #aidevops:trust-boundary (GH#40830): only canonical PIDs > 1 enter the list.
|
|
722
|
+
[[ "$pid" =~ ^[1-9][0-9]*$ && "$pid" != "1" ]] || return 0
|
|
723
|
+
case " ${SETUP_NONINTERACTIVE_CHILD_PIDS:-} " in
|
|
724
|
+
*" ${pid} "*) return 0 ;;
|
|
725
|
+
esac
|
|
720
726
|
SETUP_NONINTERACTIVE_CHILD_PIDS="${SETUP_NONINTERACTIVE_CHILD_PIDS}${SETUP_NONINTERACTIVE_CHILD_PIDS:+ }${pid}"
|
|
721
727
|
return 0
|
|
722
728
|
}
|
|
723
729
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
local
|
|
727
|
-
local
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
[[ -n "$child_pid" && "$child_pid" != "$current_pid" ]] || continue
|
|
732
|
-
printf '%s\n' "$child_pid"
|
|
733
|
-
_setup_collect_child_pids "$child_pid"
|
|
730
|
+
# Drop a reaped child so a recycled PID can never be signalled later (GH#40830).
|
|
731
|
+
_setup_unregister_child_pid() {
|
|
732
|
+
local pid="$1"
|
|
733
|
+
local kept="" entry=""
|
|
734
|
+
for entry in ${SETUP_NONINTERACTIVE_CHILD_PIDS:-}; do
|
|
735
|
+
[[ "$entry" == "$pid" ]] && continue
|
|
736
|
+
kept="${kept}${kept:+ }${entry}"
|
|
734
737
|
done
|
|
738
|
+
SETUP_NONINTERACTIVE_CHILD_PIDS="$kept"
|
|
735
739
|
return 0
|
|
736
740
|
}
|
|
737
741
|
|
|
742
|
+
# Wait for a registered background child, then forget its PID.
|
|
743
|
+
_setup_wait_child_pid() {
|
|
744
|
+
local pid="$1"
|
|
745
|
+
local rc=0
|
|
746
|
+
wait "$pid" 2>/dev/null || rc=$?
|
|
747
|
+
_setup_unregister_child_pid "$pid"
|
|
748
|
+
return "$rc"
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
# Signal a setup-owned subtree. #aidevops:trust-boundary (GH#40830): the root
|
|
752
|
+
# must be a live descendant of this setup run ($$) in a fresh process table;
|
|
753
|
+
# PID 1, the caller and its ancestors are always refused by the shared guard.
|
|
738
754
|
_setup_kill_pid_tree() {
|
|
739
755
|
local signal_name="$1"
|
|
740
756
|
local root_pid="$2"
|
|
741
|
-
local
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
for child_pid in $(_setup_collect_child_pids "$root_pid"); do
|
|
745
|
-
kill "-${signal_name}" "$child_pid" 2>/dev/null || true
|
|
746
|
-
done
|
|
747
|
-
kill "-${signal_name}" "$root_pid" 2>/dev/null || true
|
|
757
|
+
local table="${3:-}"
|
|
758
|
+
declare -F aidevops_signal_process_tree >/dev/null 2>&1 || return 0
|
|
759
|
+
aidevops_signal_process_tree "$signal_name" "$root_pid" "$$" "$table"
|
|
748
760
|
return 0
|
|
749
761
|
}
|
|
750
762
|
|
|
763
|
+
# Signal only registered PIDs that are still live descendants of $$; their
|
|
764
|
+
# subtrees are descendants too. Unregistered descendants (helpers that set up
|
|
765
|
+
# their own background work) are also owned by this run and are included.
|
|
751
766
|
_setup_cleanup_noninteractive_children() {
|
|
752
767
|
local pid=""
|
|
753
|
-
local
|
|
768
|
+
local table=""
|
|
769
|
+
local targets=""
|
|
754
770
|
local grace_s="${AIDEVOPS_SETUP_CHILD_TERM_GRACE_S:-2}"
|
|
755
|
-
local has_live_child=false
|
|
756
771
|
[[ "$grace_s" =~ ^[0-9]+$ ]] || grace_s=2
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
772
|
+
declare -F aidevops_proc_descendants >/dev/null 2>&1 || return 0
|
|
773
|
+
table="$(aidevops_proc_table)"
|
|
774
|
+
targets="$(aidevops_proc_descendants "$$" "$table" | tr '\n' ' ')"
|
|
775
|
+
if [[ -n "${targets// /}" ]]; then
|
|
776
|
+
for pid in $targets; do
|
|
777
|
+
_setup_kill_pid_tree TERM "$pid" "$table"
|
|
778
|
+
done
|
|
779
|
+
((grace_s > 0)) && { sleep "$grace_s" 2>/dev/null || true; }
|
|
780
|
+
# Fresh snapshot: survivors must still descend from $$ to be killed.
|
|
781
|
+
table="$(aidevops_proc_table)"
|
|
782
|
+
for pid in $targets; do
|
|
783
|
+
_setup_kill_pid_tree KILL "$pid" "$table"
|
|
784
|
+
done
|
|
768
785
|
fi
|
|
769
|
-
for pid in ${SETUP_NONINTERACTIVE_CHILD_PIDS:-}; do
|
|
770
|
-
if _setup_lock_pid_alive "$pid"; then
|
|
771
|
-
_setup_kill_pid_tree KILL "$pid"
|
|
772
|
-
fi
|
|
773
|
-
done
|
|
774
786
|
for pid in ${SETUP_NONINTERACTIVE_CHILD_PIDS:-}; do
|
|
775
787
|
wait "$pid" 2>/dev/null || true
|
|
776
788
|
done
|
|
789
|
+
SETUP_NONINTERACTIVE_CHILD_PIDS=""
|
|
777
790
|
return 0
|
|
778
791
|
}
|
|
779
792
|
|
|
@@ -795,14 +808,14 @@ _setup_run_noncritical_stage_bounded() {
|
|
|
795
808
|
_setup_kill_pid_tree TERM "$pid"
|
|
796
809
|
sleep "${AIDEVOPS_SETUP_CHILD_TERM_GRACE_S:-2}" 2>/dev/null || true
|
|
797
810
|
_setup_kill_pid_tree KILL "$pid"
|
|
798
|
-
|
|
811
|
+
_setup_wait_child_pid "$pid" || true
|
|
799
812
|
_SETUP_NONCRITICAL_STAGE_TIMED_OUT=true
|
|
800
813
|
print_warning "${stage_label} exceeded ${timeout_s}s — skipping remaining non-critical work"
|
|
801
814
|
return 0
|
|
802
815
|
fi
|
|
803
816
|
sleep 1
|
|
804
817
|
done
|
|
805
|
-
|
|
818
|
+
_setup_wait_child_pid "$pid" || rc=$?
|
|
806
819
|
return "$rc"
|
|
807
820
|
}
|
|
808
821
|
|