aidevops 3.1.56 → 3.1.58
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 +109 -10
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.1.
|
|
1
|
+
3.1.58
|
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.58
|
|
14
14
|
#
|
|
15
15
|
# Quick Install:
|
|
16
16
|
# npm install -g aidevops && aidevops update (recommended)
|
|
@@ -22,7 +22,6 @@ GREEN='\033[0;32m'
|
|
|
22
22
|
BLUE='\033[0;34m'
|
|
23
23
|
YELLOW='\033[1;33m'
|
|
24
24
|
RED='\033[0;31m'
|
|
25
|
-
GRAY='\033[0;90m'
|
|
26
25
|
NC='\033[0m' # No Color
|
|
27
26
|
|
|
28
27
|
# Global flags
|
|
@@ -1514,13 +1513,120 @@ ST_PLIST
|
|
|
1514
1513
|
fi
|
|
1515
1514
|
fi
|
|
1516
1515
|
|
|
1516
|
+
# Contribution watch — monitors external issues/PRs for new activity (t1554).
|
|
1517
|
+
# Auto-seeds on first run (discovers authored/commented issues/PRs), then installs
|
|
1518
|
+
# a launchd/cron job to scan periodically. Requires gh CLI authenticated.
|
|
1519
|
+
# No consent needed — this is passive monitoring (read-only notifications API),
|
|
1520
|
+
# not autonomous action. Comment bodies are never processed by LLM in automated context.
|
|
1521
|
+
# Respects config: aidevops config set orchestration.contribution_watch false
|
|
1522
|
+
local cw_script="$HOME/.aidevops/agents/scripts/contribution-watch-helper.sh"
|
|
1523
|
+
local cw_label="sh.aidevops.contribution-watch"
|
|
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"
|
|
1527
|
+
|
|
1528
|
+
# Auto-seed on first run (populates state file with existing contributions)
|
|
1529
|
+
if [[ ! -f "$cw_state" ]]; then
|
|
1530
|
+
print_info "Discovering external contributions for contribution watch..."
|
|
1531
|
+
if bash "$cw_script" seed >/dev/null 2>&1; then
|
|
1532
|
+
print_info "Contribution watch seeded (external issues/PRs discovered)"
|
|
1533
|
+
else
|
|
1534
|
+
print_warning "Contribution watch seed failed (non-fatal, will retry on next run)"
|
|
1535
|
+
fi
|
|
1536
|
+
fi
|
|
1537
|
+
|
|
1538
|
+
# Install/update scheduled scanner
|
|
1539
|
+
if [[ "$(uname -s)" == "Darwin" ]]; then
|
|
1540
|
+
local cw_plist="$HOME/Library/LaunchAgents/${cw_label}.plist"
|
|
1541
|
+
|
|
1542
|
+
local _xml_cw_script _xml_cw_home
|
|
1543
|
+
_xml_cw_script=$(_xml_escape "$cw_script")
|
|
1544
|
+
_xml_cw_home=$(_xml_escape "$HOME")
|
|
1545
|
+
|
|
1546
|
+
local cw_plist_content
|
|
1547
|
+
cw_plist_content=$(
|
|
1548
|
+
cat <<CW_PLIST
|
|
1549
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
1550
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
1551
|
+
<plist version="1.0">
|
|
1552
|
+
<dict>
|
|
1553
|
+
<key>Label</key>
|
|
1554
|
+
<string>${cw_label}</string>
|
|
1555
|
+
<key>ProgramArguments</key>
|
|
1556
|
+
<array>
|
|
1557
|
+
<string>/bin/bash</string>
|
|
1558
|
+
<string>${_xml_cw_script}</string>
|
|
1559
|
+
<string>scan</string>
|
|
1560
|
+
</array>
|
|
1561
|
+
<key>StartInterval</key>
|
|
1562
|
+
<integer>3600</integer>
|
|
1563
|
+
<key>StandardOutPath</key>
|
|
1564
|
+
<string>${_xml_cw_home}/.aidevops/logs/contribution-watch.log</string>
|
|
1565
|
+
<key>StandardErrorPath</key>
|
|
1566
|
+
<string>${_xml_cw_home}/.aidevops/logs/contribution-watch.log</string>
|
|
1567
|
+
<key>EnvironmentVariables</key>
|
|
1568
|
+
<dict>
|
|
1569
|
+
<key>PATH</key>
|
|
1570
|
+
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
|
|
1571
|
+
<key>HOME</key>
|
|
1572
|
+
<string>${_xml_cw_home}</string>
|
|
1573
|
+
</dict>
|
|
1574
|
+
<key>RunAtLoad</key>
|
|
1575
|
+
<false/>
|
|
1576
|
+
<key>KeepAlive</key>
|
|
1577
|
+
<false/>
|
|
1578
|
+
<key>ProcessType</key>
|
|
1579
|
+
<string>Background</string>
|
|
1580
|
+
<key>LowPriorityBackgroundIO</key>
|
|
1581
|
+
<true/>
|
|
1582
|
+
<key>Nice</key>
|
|
1583
|
+
<integer>10</integer>
|
|
1584
|
+
</dict>
|
|
1585
|
+
</plist>
|
|
1586
|
+
CW_PLIST
|
|
1587
|
+
)
|
|
1588
|
+
|
|
1589
|
+
if _launchd_install_if_changed "$cw_label" "$cw_plist" "$cw_plist_content"; then
|
|
1590
|
+
print_info "Contribution watch enabled (launchd, hourly scan)"
|
|
1591
|
+
else
|
|
1592
|
+
print_warning "Failed to load contribution watch LaunchAgent"
|
|
1593
|
+
fi
|
|
1594
|
+
else
|
|
1595
|
+
# Linux: cron entry (hourly)
|
|
1596
|
+
local _cron_cw_script
|
|
1597
|
+
_cron_cw_script=$(_cron_escape "$cw_script")
|
|
1598
|
+
(
|
|
1599
|
+
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"
|
|
1601
|
+
) | crontab - 2>/dev/null || true
|
|
1602
|
+
if crontab -l 2>/dev/null | grep -qF "aidevops: contribution-watch" 2>/dev/null; then
|
|
1603
|
+
print_info "Contribution watch enabled (cron, hourly scan)"
|
|
1604
|
+
else
|
|
1605
|
+
print_warning "Failed to install contribution watch cron entry"
|
|
1606
|
+
fi
|
|
1607
|
+
fi
|
|
1608
|
+
fi
|
|
1609
|
+
|
|
1610
|
+
# Draft responses — private repo for reviewing AI-drafted replies to external
|
|
1611
|
+
# contributions (t1555). Auto-creates the repo on first setup. Requires both
|
|
1612
|
+
# contribution_watch and draft_responses to be enabled, plus gh CLI authenticated.
|
|
1613
|
+
# Respects config: aidevops config set orchestration.draft_responses false
|
|
1614
|
+
local dr_script="$HOME/.aidevops/agents/scripts/draft-response-helper.sh"
|
|
1615
|
+
if [[ -x "$dr_script" ]] && is_feature_enabled draft_responses 2>/dev/null && is_feature_enabled contribution_watch 2>/dev/null && command -v gh &>/dev/null && gh auth status &>/dev/null 2>&1; then
|
|
1616
|
+
# Init is idempotent — skips if repo already exists
|
|
1617
|
+
if bash "$dr_script" init >/dev/null 2>&1; then
|
|
1618
|
+
print_info "Draft responses repo ready (private, for contribution reply approval)"
|
|
1619
|
+
else
|
|
1620
|
+
print_warning "Draft responses repo setup failed (non-fatal)"
|
|
1621
|
+
fi
|
|
1622
|
+
fi
|
|
1623
|
+
|
|
1517
1624
|
# Profile README — auto-create repo and seed README if not already set up.
|
|
1518
1625
|
# Requires gh CLI authenticated. Creates username/username repo, seeds README
|
|
1519
1626
|
# with stat markers, registers in repos.json with priority: "profile".
|
|
1520
1627
|
local pr_script="$HOME/.aidevops/agents/scripts/profile-readme-helper.sh"
|
|
1521
1628
|
local pr_label="sh.aidevops.profile-readme-update"
|
|
1522
1629
|
local repos_json="$HOME/.config/aidevops/repos.json"
|
|
1523
|
-
local has_profile_repo="false"
|
|
1524
1630
|
if [[ -x "$pr_script" ]] && command -v gh &>/dev/null && gh auth status &>/dev/null; then
|
|
1525
1631
|
# Initialize profile repo if not already set up.
|
|
1526
1632
|
# Verify the entry is valid: local dir exists AND README has stat markers.
|
|
@@ -1540,23 +1646,16 @@ ST_PLIST
|
|
|
1540
1646
|
[[ -f "${profile_path}/README.md" ]] &&
|
|
1541
1647
|
grep -q '<!-- STATS-START -->' "${profile_path}/README.md" 2>/dev/null; then
|
|
1542
1648
|
profile_needs_init="false"
|
|
1543
|
-
has_profile_repo="true"
|
|
1544
1649
|
fi
|
|
1545
1650
|
fi
|
|
1546
1651
|
if [[ "$profile_needs_init" == "true" ]]; then
|
|
1547
1652
|
print_info "Setting up GitHub profile README..."
|
|
1548
1653
|
if bash "$pr_script" init; then
|
|
1549
|
-
has_profile_repo="true"
|
|
1550
1654
|
print_info "Profile README created. Visit your profile repo and click 'Show on profile'."
|
|
1551
1655
|
else
|
|
1552
1656
|
print_warning "Profile README setup failed (non-fatal, skipping)"
|
|
1553
1657
|
fi
|
|
1554
1658
|
fi
|
|
1555
|
-
elif [[ -f "$repos_json" ]] && command -v jq &>/dev/null; then
|
|
1556
|
-
# No gh CLI but check if profile repo already registered
|
|
1557
|
-
if jq -e '.initialized_repos[]? | select(.priority == "profile")' "$repos_json" >/dev/null 2>&1; then
|
|
1558
|
-
has_profile_repo="true"
|
|
1559
|
-
fi
|
|
1560
1659
|
fi
|
|
1561
1660
|
|
|
1562
1661
|
# Profile README auto-update scheduled job.
|