aidevops 3.1.62 → 3.1.63
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 +1 -1
- package/aidevops.sh +1 -1
- package/package.json +1 -1
- package/setup.sh +23 -7
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.1.
|
|
1
|
+
3.1.63
|
package/aidevops.sh
CHANGED
package/package.json
CHANGED
package/setup.sh
CHANGED
|
@@ -10,7 +10,7 @@ shopt -s inherit_errexit 2>/dev/null || true
|
|
|
10
10
|
# AI Assistant Server Access Framework Setup Script
|
|
11
11
|
# Helps developers set up the framework for their infrastructure
|
|
12
12
|
#
|
|
13
|
-
# Version: 3.1.
|
|
13
|
+
# Version: 3.1.63
|
|
14
14
|
#
|
|
15
15
|
# Quick Install:
|
|
16
16
|
# npm install -g aidevops && aidevops update (recommended)
|
|
@@ -1522,8 +1522,23 @@ ST_PLIST
|
|
|
1522
1522
|
local cw_script="$HOME/.aidevops/agents/scripts/contribution-watch-helper.sh"
|
|
1523
1523
|
local cw_label="sh.aidevops.contribution-watch"
|
|
1524
1524
|
local cw_state="$HOME/.aidevops/cache/contribution-watch.json"
|
|
1525
|
-
if [[ -x "$cw_script" ]] && is_feature_enabled contribution_watch 2>/dev/null && command -v gh &>/dev/null && gh auth status &>/dev/null 2>&1; then
|
|
1526
|
-
|
|
1525
|
+
if [[ -x "$cw_script" ]] && is_feature_enabled orchestration.contribution_watch 2>/dev/null && command -v gh &>/dev/null && gh auth status &>/dev/null 2>&1; then
|
|
1526
|
+
# Resolve log directory from config (paths.log_dir), expanding ~ to $HOME.
|
|
1527
|
+
# Falls back to the default if config is unavailable or jq is missing.
|
|
1528
|
+
# Validate before expansion to guard against shell metacharacter injection.
|
|
1529
|
+
local _cw_log_dir
|
|
1530
|
+
# shellcheck disable=SC2088 # Tilde is intentionally literal here; expanded below via ${/#\~/$HOME}
|
|
1531
|
+
if type _jsonc_get &>/dev/null; then
|
|
1532
|
+
_cw_log_dir=$(_jsonc_get "paths.log_dir" "~/.aidevops/logs")
|
|
1533
|
+
else
|
|
1534
|
+
_cw_log_dir="~/.aidevops/logs"
|
|
1535
|
+
fi
|
|
1536
|
+
if [[ "$_cw_log_dir" == *['`$']* ]]; then
|
|
1537
|
+
print_error "Invalid characters in paths.log_dir: $_cw_log_dir"
|
|
1538
|
+
return 1
|
|
1539
|
+
fi
|
|
1540
|
+
_cw_log_dir="${_cw_log_dir/#\~/$HOME}"
|
|
1541
|
+
mkdir -p "$HOME/.aidevops/cache" "$_cw_log_dir"
|
|
1527
1542
|
|
|
1528
1543
|
# Auto-seed on first run (populates state file with existing contributions)
|
|
1529
1544
|
if [[ ! -f "$cw_state" ]]; then
|
|
@@ -1539,9 +1554,10 @@ ST_PLIST
|
|
|
1539
1554
|
if [[ "$(uname -s)" == "Darwin" ]]; then
|
|
1540
1555
|
local cw_plist="$HOME/Library/LaunchAgents/${cw_label}.plist"
|
|
1541
1556
|
|
|
1542
|
-
local _xml_cw_script _xml_cw_home
|
|
1557
|
+
local _xml_cw_script _xml_cw_home _xml_cw_log_dir
|
|
1543
1558
|
_xml_cw_script=$(_xml_escape "$cw_script")
|
|
1544
1559
|
_xml_cw_home=$(_xml_escape "$HOME")
|
|
1560
|
+
_xml_cw_log_dir=$(_xml_escape "$_cw_log_dir")
|
|
1545
1561
|
|
|
1546
1562
|
local cw_plist_content
|
|
1547
1563
|
cw_plist_content=$(
|
|
@@ -1561,9 +1577,9 @@ ST_PLIST
|
|
|
1561
1577
|
<key>StartInterval</key>
|
|
1562
1578
|
<integer>3600</integer>
|
|
1563
1579
|
<key>StandardOutPath</key>
|
|
1564
|
-
<string>${
|
|
1580
|
+
<string>${_xml_cw_log_dir}/contribution-watch.log</string>
|
|
1565
1581
|
<key>StandardErrorPath</key>
|
|
1566
|
-
<string>${
|
|
1582
|
+
<string>${_xml_cw_log_dir}/contribution-watch.log</string>
|
|
1567
1583
|
<key>EnvironmentVariables</key>
|
|
1568
1584
|
<dict>
|
|
1569
1585
|
<key>PATH</key>
|
|
@@ -1597,7 +1613,7 @@ CW_PLIST
|
|
|
1597
1613
|
_cron_cw_script=$(_cron_escape "$cw_script")
|
|
1598
1614
|
(
|
|
1599
1615
|
crontab -l 2>/dev/null | grep -v 'aidevops: contribution-watch'
|
|
1600
|
-
echo "0 * * * * /bin/bash ${_cron_cw_script} scan >> \"
|
|
1616
|
+
echo "0 * * * * /bin/bash ${_cron_cw_script} scan >> \"${_cw_log_dir}/contribution-watch.log\" 2>&1 # aidevops: contribution-watch"
|
|
1601
1617
|
) | crontab - 2>/dev/null || true
|
|
1602
1618
|
if crontab -l 2>/dev/null | grep -qF "aidevops: contribution-watch" 2>/dev/null; then
|
|
1603
1619
|
print_info "Contribution watch enabled (cron, hourly scan)"
|