aidevops 3.8.69 → 3.8.70
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-modules/schedulers.sh +56 -0
- package/setup.sh +5 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.8.
|
|
1
|
+
3.8.70
|
package/aidevops.sh
CHANGED
package/package.json
CHANGED
|
@@ -1866,6 +1866,62 @@ setup_oauth_token_refresh() {
|
|
|
1866
1866
|
return 0
|
|
1867
1867
|
}
|
|
1868
1868
|
|
|
1869
|
+
# Setup opencode DB maintenance scheduler (r913, t2183).
|
|
1870
|
+
# Runs weekly (Sun 04:00 local) to checkpoint/optimize/vacuum opencode.db.
|
|
1871
|
+
# The helper self-noops on missing DB, so installing unconditionally is safe —
|
|
1872
|
+
# a non-opencode machine wakes up weekly, sees no DB, exits 0 silently.
|
|
1873
|
+
#
|
|
1874
|
+
# Platform split (mirrors the pattern for token-refresh):
|
|
1875
|
+
# macOS — helper owns its plist generation via cmd_install (Approach B).
|
|
1876
|
+
# Linux — _install_scheduler_linux with cron `0 4 * * 0` + systemd
|
|
1877
|
+
# OnCalendar `Sun *-*-* 04:00:00` for accurate wall-clock firing.
|
|
1878
|
+
# Windows — TODO(t2183-followup): opencode on Windows is rare and the
|
|
1879
|
+
# helper self-noops on missing DB, so leaving unscheduled is
|
|
1880
|
+
# low-risk for this iteration.
|
|
1881
|
+
setup_opencode_db_maintenance() {
|
|
1882
|
+
local ocdbm_script="$HOME/.aidevops/agents/scripts/opencode-db-maintenance-helper.sh"
|
|
1883
|
+
if ! [[ -x "$ocdbm_script" ]]; then
|
|
1884
|
+
return 0
|
|
1885
|
+
fi
|
|
1886
|
+
|
|
1887
|
+
local ocdbm_log_dir="$HOME/.aidevops/.agent-workspace/logs"
|
|
1888
|
+
mkdir -p "$ocdbm_log_dir"
|
|
1889
|
+
|
|
1890
|
+
if [[ "$(uname -s)" == "Darwin" ]]; then
|
|
1891
|
+
# Helper owns its own plist generation (Approach B, like repo-sync).
|
|
1892
|
+
# Quiet the helper's multi-line output and emit one consolidated line
|
|
1893
|
+
# to match the style of setup_profile_readme / setup_oauth_token_refresh.
|
|
1894
|
+
if bash "$ocdbm_script" install >/dev/null 2>&1; then
|
|
1895
|
+
print_info "OpenCode DB maintenance enabled (launchd, weekly Sun 04:00)"
|
|
1896
|
+
else
|
|
1897
|
+
print_warning "Failed to install opencode DB maintenance LaunchAgent"
|
|
1898
|
+
fi
|
|
1899
|
+
elif _is_windows; then
|
|
1900
|
+
# Windows scheduling deferred — helper self-noops on missing DB so
|
|
1901
|
+
# the cost of leaving unscheduled is ~0 until opencode lands on
|
|
1902
|
+
# Windows in quantity.
|
|
1903
|
+
return 0
|
|
1904
|
+
else
|
|
1905
|
+
# Linux / WSL: prefer systemd user timer, fall back to cron.
|
|
1906
|
+
# Weekly Sunday 04:00 local — cron: `0 4 * * 0`; systemd OnCalendar
|
|
1907
|
+
# ensures wall-clock firing even across suspends/reboots.
|
|
1908
|
+
_install_scheduler_linux \
|
|
1909
|
+
"aidevops-opencode-db-maintenance" \
|
|
1910
|
+
"aidevops: opencode-db-maintenance" \
|
|
1911
|
+
"0 4 * * 0" \
|
|
1912
|
+
"\"${ocdbm_script}\" auto" \
|
|
1913
|
+
"604800" \
|
|
1914
|
+
"${ocdbm_log_dir}/opencode-db-maintenance.log" \
|
|
1915
|
+
"" \
|
|
1916
|
+
"OpenCode DB maintenance enabled (weekly Sun 04:00)" \
|
|
1917
|
+
"Failed to install opencode DB maintenance scheduler" \
|
|
1918
|
+
"false" \
|
|
1919
|
+
"true" \
|
|
1920
|
+
"Sun *-*-* 04:00:00"
|
|
1921
|
+
fi
|
|
1922
|
+
return 0
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1869
1925
|
# Setup repo-sync scheduler if not already installed.
|
|
1870
1926
|
# Keeps local git repos up to date with daily ff-only pulls.
|
|
1871
1927
|
# Respects config: aidevops config set orchestration.repo_sync false
|
package/setup.sh
CHANGED
|
@@ -12,7 +12,7 @@ shopt -s inherit_errexit 2>/dev/null || true
|
|
|
12
12
|
# AI Assistant Server Access Framework Setup Script
|
|
13
13
|
# Helps developers set up the framework for their infrastructure
|
|
14
14
|
#
|
|
15
|
-
# Version: 3.8.
|
|
15
|
+
# Version: 3.8.70
|
|
16
16
|
#
|
|
17
17
|
# Quick Install:
|
|
18
18
|
# npm install -g aidevops && aidevops update (recommended)
|
|
@@ -1131,6 +1131,9 @@ _setup_post_setup_steps() {
|
|
|
1131
1131
|
if _should_setup_noninteractive_scheduler "OAuth token refresh" "sh.aidevops.token-refresh" "aidevops: token-refresh" "aidevops-token-refresh"; then
|
|
1132
1132
|
setup_oauth_token_refresh
|
|
1133
1133
|
fi
|
|
1134
|
+
# opencode DB maintenance (r913, t2183). Helper self-noops on missing
|
|
1135
|
+
# DB — safe to install unconditionally in non-interactive mode too.
|
|
1136
|
+
setup_opencode_db_maintenance
|
|
1134
1137
|
# Migrate cron entries to systemd after schedulers are installed (GH#17695 Finding D)
|
|
1135
1138
|
migrate_cron_to_systemd
|
|
1136
1139
|
setup_tabby
|
|
@@ -1150,6 +1153,7 @@ _setup_post_setup_steps() {
|
|
|
1150
1153
|
setup_draft_responses
|
|
1151
1154
|
setup_profile_readme
|
|
1152
1155
|
setup_oauth_token_refresh
|
|
1156
|
+
setup_opencode_db_maintenance
|
|
1153
1157
|
# Migrate cron entries to systemd after schedulers are installed (GH#17695 Finding D)
|
|
1154
1158
|
migrate_cron_to_systemd
|
|
1155
1159
|
setup_tabby
|