aidevops 3.1.56 → 3.1.57

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.56
1
+ 3.1.57
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.56
6
+ # Version: 3.1.57
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.56",
3
+ "version": "3.1.57",
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.56
13
+ # Version: 3.1.57
14
14
  #
15
15
  # Quick Install:
16
16
  # npm install -g aidevops && aidevops update (recommended)
@@ -1514,6 +1514,100 @@ ST_PLIST
1514
1514
  fi
1515
1515
  fi
1516
1516
 
1517
+ # Contribution watch — monitors external issues/PRs for new activity (t1554).
1518
+ # Auto-seeds on first run (discovers authored/commented issues/PRs), then installs
1519
+ # a launchd/cron job to scan periodically. Requires gh CLI authenticated.
1520
+ # No consent needed — this is passive monitoring (read-only notifications API),
1521
+ # not autonomous action. Comment bodies are never processed by LLM in automated context.
1522
+ # Respects config: aidevops config set orchestration.contribution_watch false
1523
+ local cw_script="$HOME/.aidevops/agents/scripts/contribution-watch-helper.sh"
1524
+ local cw_label="sh.aidevops.contribution-watch"
1525
+ local cw_state="$HOME/.aidevops/cache/contribution-watch.json"
1526
+ 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
1527
+ mkdir -p "$HOME/.aidevops/cache" "$HOME/.aidevops/logs"
1528
+
1529
+ # Auto-seed on first run (populates state file with existing contributions)
1530
+ if [[ ! -f "$cw_state" ]]; then
1531
+ print_info "Discovering external contributions for contribution watch..."
1532
+ if bash "$cw_script" seed >/dev/null 2>&1; then
1533
+ print_info "Contribution watch seeded (external issues/PRs discovered)"
1534
+ else
1535
+ print_warning "Contribution watch seed failed (non-fatal, will retry on next run)"
1536
+ fi
1537
+ fi
1538
+
1539
+ # Install/update scheduled scanner
1540
+ if [[ "$(uname -s)" == "Darwin" ]]; then
1541
+ local cw_plist="$HOME/Library/LaunchAgents/${cw_label}.plist"
1542
+
1543
+ local _xml_cw_script _xml_cw_home
1544
+ _xml_cw_script=$(_xml_escape "$cw_script")
1545
+ _xml_cw_home=$(_xml_escape "$HOME")
1546
+
1547
+ local cw_plist_content
1548
+ cw_plist_content=$(
1549
+ cat <<CW_PLIST
1550
+ <?xml version="1.0" encoding="UTF-8"?>
1551
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
1552
+ <plist version="1.0">
1553
+ <dict>
1554
+ <key>Label</key>
1555
+ <string>${cw_label}</string>
1556
+ <key>ProgramArguments</key>
1557
+ <array>
1558
+ <string>/bin/bash</string>
1559
+ <string>${_xml_cw_script}</string>
1560
+ <string>scan</string>
1561
+ </array>
1562
+ <key>StartInterval</key>
1563
+ <integer>3600</integer>
1564
+ <key>StandardOutPath</key>
1565
+ <string>${_xml_cw_home}/.aidevops/logs/contribution-watch.log</string>
1566
+ <key>StandardErrorPath</key>
1567
+ <string>${_xml_cw_home}/.aidevops/logs/contribution-watch.log</string>
1568
+ <key>EnvironmentVariables</key>
1569
+ <dict>
1570
+ <key>PATH</key>
1571
+ <string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
1572
+ <key>HOME</key>
1573
+ <string>${_xml_cw_home}</string>
1574
+ </dict>
1575
+ <key>RunAtLoad</key>
1576
+ <false/>
1577
+ <key>KeepAlive</key>
1578
+ <false/>
1579
+ <key>ProcessType</key>
1580
+ <string>Background</string>
1581
+ <key>LowPriorityBackgroundIO</key>
1582
+ <true/>
1583
+ <key>Nice</key>
1584
+ <integer>10</integer>
1585
+ </dict>
1586
+ </plist>
1587
+ CW_PLIST
1588
+ )
1589
+
1590
+ if _launchd_install_if_changed "$cw_label" "$cw_plist" "$cw_plist_content"; then
1591
+ print_info "Contribution watch enabled (launchd, hourly scan)"
1592
+ else
1593
+ print_warning "Failed to load contribution watch LaunchAgent"
1594
+ fi
1595
+ else
1596
+ # Linux: cron entry (hourly)
1597
+ local _cron_cw_script
1598
+ _cron_cw_script=$(_cron_escape "$cw_script")
1599
+ (
1600
+ crontab -l 2>/dev/null | grep -v 'aidevops: contribution-watch'
1601
+ echo "0 * * * * /bin/bash ${_cron_cw_script} scan >> \"\$HOME/.aidevops/logs/contribution-watch.log\" 2>&1 # aidevops: contribution-watch"
1602
+ ) | crontab - 2>/dev/null || true
1603
+ if crontab -l 2>/dev/null | grep -qF "aidevops: contribution-watch" 2>/dev/null; then
1604
+ print_info "Contribution watch enabled (cron, hourly scan)"
1605
+ else
1606
+ print_warning "Failed to install contribution watch cron entry"
1607
+ fi
1608
+ fi
1609
+ fi
1610
+
1517
1611
  # Profile README — auto-create repo and seed README if not already set up.
1518
1612
  # Requires gh CLI authenticated. Creates username/username repo, seeds README
1519
1613
  # with stat markers, registers in repos.json with priority: "profile".