aidevops 3.1.84 → 3.1.85
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 +2 -2
- package/package.json +1 -1
- package/setup.sh +81 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.1.
|
|
1
|
+
3.1.85
|
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.
|
|
6
|
+
# Version: 3.1.85
|
|
7
7
|
|
|
8
8
|
set -euo pipefail
|
|
9
9
|
|
|
@@ -3660,7 +3660,7 @@ cmd_help() {
|
|
|
3660
3660
|
echo " aidevops model-accounts-pool add cursor # Add Cursor Pro account"
|
|
3661
3661
|
echo " aidevops model-accounts-pool import claude-cli # Import from Claude CLI auth"
|
|
3662
3662
|
echo " aidevops model-accounts-pool assign-pending <provider># Assign stranded token"
|
|
3663
|
-
echo " aidevops model-accounts-pool remove <
|
|
3663
|
+
echo " aidevops model-accounts-pool remove <provider> <email># Remove an account"
|
|
3664
3664
|
echo ""
|
|
3665
3665
|
echo " Auth recovery (run these in order if model is broken):"
|
|
3666
3666
|
echo " aidevops model-accounts-pool status # 1. Check pool health"
|
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.85
|
|
14
14
|
#
|
|
15
15
|
# Quick Install:
|
|
16
16
|
# npm install -g aidevops && aidevops update (recommended)
|
|
@@ -1753,6 +1753,86 @@ PR_PLIST
|
|
|
1753
1753
|
fi
|
|
1754
1754
|
fi
|
|
1755
1755
|
|
|
1756
|
+
# OAuth token refresh scheduled job.
|
|
1757
|
+
# Refreshes expired/expiring tokens every 30 min so sessions never hit
|
|
1758
|
+
# "invalid x-api-key". Also runs at load to catch tokens that expired
|
|
1759
|
+
# while the machine was off.
|
|
1760
|
+
local tr_script="$HOME/.aidevops/agents/scripts/oauth-pool-helper.sh"
|
|
1761
|
+
local tr_label="sh.aidevops.token-refresh"
|
|
1762
|
+
if [[ -x "$tr_script" ]] && [[ -f "$HOME/.aidevops/oauth-pool.json" ]]; then
|
|
1763
|
+
mkdir -p "$HOME/.aidevops/.agent-workspace/logs"
|
|
1764
|
+
|
|
1765
|
+
if [[ "$(uname -s)" == "Darwin" ]]; then
|
|
1766
|
+
local tr_plist="$HOME/Library/LaunchAgents/${tr_label}.plist"
|
|
1767
|
+
|
|
1768
|
+
local _xml_tr_script _xml_tr_home
|
|
1769
|
+
_xml_tr_script=$(_xml_escape "$tr_script")
|
|
1770
|
+
_xml_tr_home=$(_xml_escape "$HOME")
|
|
1771
|
+
|
|
1772
|
+
local tr_plist_content
|
|
1773
|
+
tr_plist_content=$(
|
|
1774
|
+
cat <<TR_PLIST
|
|
1775
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
1776
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
1777
|
+
<plist version="1.0">
|
|
1778
|
+
<dict>
|
|
1779
|
+
<key>Label</key>
|
|
1780
|
+
<string>${tr_label}</string>
|
|
1781
|
+
<key>ProgramArguments</key>
|
|
1782
|
+
<array>
|
|
1783
|
+
<string>/bin/bash</string>
|
|
1784
|
+
<string>-c</string>
|
|
1785
|
+
<string>${_xml_tr_script} refresh anthropic; ${_xml_tr_script} refresh openai</string>
|
|
1786
|
+
</array>
|
|
1787
|
+
<key>StartInterval</key>
|
|
1788
|
+
<integer>1800</integer>
|
|
1789
|
+
<key>StandardOutPath</key>
|
|
1790
|
+
<string>${_xml_tr_home}/.aidevops/.agent-workspace/logs/token-refresh.log</string>
|
|
1791
|
+
<key>StandardErrorPath</key>
|
|
1792
|
+
<string>${_xml_tr_home}/.aidevops/.agent-workspace/logs/token-refresh.log</string>
|
|
1793
|
+
<key>EnvironmentVariables</key>
|
|
1794
|
+
<dict>
|
|
1795
|
+
<key>PATH</key>
|
|
1796
|
+
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
|
|
1797
|
+
<key>HOME</key>
|
|
1798
|
+
<string>${_xml_tr_home}</string>
|
|
1799
|
+
</dict>
|
|
1800
|
+
<key>RunAtLoad</key>
|
|
1801
|
+
<true/>
|
|
1802
|
+
<key>KeepAlive</key>
|
|
1803
|
+
<false/>
|
|
1804
|
+
<key>ProcessType</key>
|
|
1805
|
+
<string>Background</string>
|
|
1806
|
+
<key>LowPriorityBackgroundIO</key>
|
|
1807
|
+
<true/>
|
|
1808
|
+
<key>Nice</key>
|
|
1809
|
+
<integer>10</integer>
|
|
1810
|
+
</dict>
|
|
1811
|
+
</plist>
|
|
1812
|
+
TR_PLIST
|
|
1813
|
+
)
|
|
1814
|
+
|
|
1815
|
+
if _launchd_install_if_changed "$tr_label" "$tr_plist" "$tr_plist_content"; then
|
|
1816
|
+
print_info "OAuth token refresh enabled (launchd, every 30 min)"
|
|
1817
|
+
else
|
|
1818
|
+
print_warning "Failed to load token refresh LaunchAgent"
|
|
1819
|
+
fi
|
|
1820
|
+
else
|
|
1821
|
+
# Linux: cron entry (every 30 min)
|
|
1822
|
+
local _cron_tr_script
|
|
1823
|
+
_cron_tr_script=$(_cron_escape "$tr_script")
|
|
1824
|
+
(
|
|
1825
|
+
crontab -l 2>/dev/null | grep -v 'aidevops: token-refresh'
|
|
1826
|
+
echo "*/30 * * * * /bin/bash ${_cron_tr_script} refresh anthropic >> \"\$HOME/.aidevops/.agent-workspace/logs/token-refresh.log\" 2>&1; /bin/bash ${_cron_tr_script} refresh openai >> \"\$HOME/.aidevops/.agent-workspace/logs/token-refresh.log\" 2>&1 # aidevops: token-refresh"
|
|
1827
|
+
) | crontab - 2>/dev/null || true
|
|
1828
|
+
if crontab -l 2>/dev/null | grep -qF "aidevops: token-refresh" 2>/dev/null; then
|
|
1829
|
+
print_info "OAuth token refresh enabled (cron, every 30 min)"
|
|
1830
|
+
else
|
|
1831
|
+
print_warning "Failed to install token refresh cron entry"
|
|
1832
|
+
fi
|
|
1833
|
+
fi
|
|
1834
|
+
fi
|
|
1835
|
+
|
|
1756
1836
|
echo ""
|
|
1757
1837
|
echo "CLI Command:"
|
|
1758
1838
|
echo " aidevops init - Initialize aidevops in a project"
|