aidevops 3.1.61 → 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 CHANGED
@@ -1 +1 @@
1
- 3.1.61
1
+ 3.1.63
package/aidevops.sh CHANGED
@@ -3,7 +3,7 @@
3
3
  # AI DevOps Framework CLI
4
4
  # Usage: aidevops <command> [options]
5
5
  #
6
- # Version: 3.1.61
6
+ # Version: 3.1.63
7
7
 
8
8
  set -euo pipefail
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "3.1.61",
3
+ "version": "3.1.63",
4
4
  "description": "AI DevOps Framework - AI-assisted development workflows, code quality, and deployment automation",
5
5
  "type": "module",
6
6
  "bin": {
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.61
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
- mkdir -p "$HOME/.aidevops/cache" "$HOME/.aidevops/logs"
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>${_xml_cw_home}/.aidevops/logs/contribution-watch.log</string>
1580
+ <string>${_xml_cw_log_dir}/contribution-watch.log</string>
1565
1581
  <key>StandardErrorPath</key>
1566
- <string>${_xml_cw_home}/.aidevops/logs/contribution-watch.log</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 >> \"\$HOME/.aidevops/logs/contribution-watch.log\" 2>&1 # aidevops: contribution-watch"
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)"