aidevops 3.13.54 → 3.13.55
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 +3 -1
- package/package.json +1 -1
- package/setup-modules/agent-runtime.sh +35 -0
- package/setup-modules/plugins.sh +30 -17
- package/setup-modules/schedulers-platform.sh +19 -16
- package/setup.sh +5 -2
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.13.
|
|
1
|
+
3.13.55
|
package/aidevops.sh
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# AI DevOps Framework CLI
|
|
6
6
|
# Usage: aidevops <command> [options]
|
|
7
7
|
#
|
|
8
|
-
# Version: 3.13.
|
|
8
|
+
# Version: 3.13.55
|
|
9
9
|
|
|
10
10
|
set -euo pipefail
|
|
11
11
|
|
|
@@ -1658,6 +1658,7 @@ _help_commands() {
|
|
|
1658
1658
|
echo " repos [cmd] Manage registered projects (list/add/remove/clean)"
|
|
1659
1659
|
echo " model-accounts-pool OAuth account pool (list/check/diagnose/add/rotate/reset-cooldowns)"
|
|
1660
1660
|
echo " client-format Client request format alignment (extract/check/canary/monitor)"
|
|
1661
|
+
echo " opencode-db <cmd> OpenCode SQLite maintenance (check/report/maintain/window/status/install)"
|
|
1661
1662
|
echo " opencode-sandbox Test OpenCode versions in isolation (install/run/check/clean)"
|
|
1662
1663
|
echo " approve <cmd> Cryptographic issue/PR approval (setup/issue/pr/verify/status)"
|
|
1663
1664
|
echo " circuit-breaker Supervisor circuit breaker (status/reset/check/trip) — alias: cb"
|
|
@@ -2208,6 +2209,7 @@ main() {
|
|
|
2208
2209
|
ip-check | ip_check) _dispatch_helper "ip-reputation-helper.sh" "ip-reputation-helper.sh" "$@" ;;
|
|
2209
2210
|
model-accounts-pool | map) _dispatch_helper "oauth-pool-helper.sh" "oauth-pool-helper.sh" "$@" ;;
|
|
2210
2211
|
client-format) _cmd_client_format "$@" ;;
|
|
2212
|
+
opencode-db | oc-db) _dispatch_helper "opencode-db-maintenance-helper.sh" "opencode-db-maintenance-helper.sh" "$@" ;;
|
|
2211
2213
|
opencode-sandbox | oc-sandbox) _dispatch_helper "opencode-sandbox-helper.sh" "opencode-sandbox-helper.sh" "$@" ;;
|
|
2212
2214
|
review-gate | review_gate) _dispatch_helper "review-gate-config-helper.sh" "review-gate-config-helper.sh" "$@" ;;
|
|
2213
2215
|
secret | secrets) _dispatch_helper "secret-helper.sh" "secret-helper.sh" "$@" ;;
|
package/package.json
CHANGED
|
@@ -249,3 +249,38 @@ deploy_agents_to_runtimes() {
|
|
|
249
249
|
|
|
250
250
|
return 0
|
|
251
251
|
}
|
|
252
|
+
|
|
253
|
+
# _deploy_agents_to_runtimes_bounded: time-bounded wrapper for deploy_agents_to_runtimes.
|
|
254
|
+
#
|
|
255
|
+
# deploy_agents_to_runtimes is a shell function (not an external script), so it
|
|
256
|
+
# cannot be passed directly to the `timeout` binary. Instead we run it in a
|
|
257
|
+
# background subshell and poll for completion with a configurable wall-clock
|
|
258
|
+
# deadline. When the deadline expires the subshell is killed with SIGTERM then
|
|
259
|
+
# SIGKILL and setup continues without this non-critical step.
|
|
260
|
+
#
|
|
261
|
+
# Configurable via AIDEVOPS_DEPLOY_RUNTIMES_TIMEOUT (default 120s).
|
|
262
|
+
_deploy_agents_to_runtimes_bounded() {
|
|
263
|
+
local timeout_s="${AIDEVOPS_DEPLOY_RUNTIMES_TIMEOUT:-120}"
|
|
264
|
+
local _start_s=$SECONDS
|
|
265
|
+
local _pid=""
|
|
266
|
+
local _rc=0
|
|
267
|
+
|
|
268
|
+
deploy_agents_to_runtimes &
|
|
269
|
+
_pid=$!
|
|
270
|
+
|
|
271
|
+
while kill -0 "$_pid" 2>/dev/null; do
|
|
272
|
+
if (( SECONDS - _start_s >= timeout_s )); then
|
|
273
|
+
kill -TERM "$_pid" 2>/dev/null || true
|
|
274
|
+
sleep 2
|
|
275
|
+
kill -KILL "$_pid" 2>/dev/null || true
|
|
276
|
+
wait "$_pid" 2>/dev/null || true
|
|
277
|
+
print_warning "Runtime agent deployment exceeded ${timeout_s}s — skipping (non-critical)"
|
|
278
|
+
return 1
|
|
279
|
+
fi
|
|
280
|
+
sleep 1
|
|
281
|
+
done
|
|
282
|
+
|
|
283
|
+
wait "$_pid" 2>/dev/null
|
|
284
|
+
_rc=$?
|
|
285
|
+
return "$_rc"
|
|
286
|
+
}
|
package/setup-modules/plugins.sh
CHANGED
|
@@ -224,29 +224,42 @@ generate_agent_skills() {
|
|
|
224
224
|
local success_msg="Agent Skills SKILL.md files generated"
|
|
225
225
|
local generate_rc=0
|
|
226
226
|
|
|
227
|
-
if [[ -f "$skills_script" ]]; then
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
227
|
+
if [[ ! -f "$skills_script" ]]; then
|
|
228
|
+
print_warning "Agent Skills generator not found at $skills_script"
|
|
229
|
+
return 1
|
|
230
|
+
fi
|
|
231
|
+
|
|
232
|
+
if command -v timeout >/dev/null 2>&1; then
|
|
233
|
+
timeout "$timeout_seconds" bash "$skills_script" 2>/dev/null
|
|
234
|
+
generate_rc=$?
|
|
235
|
+
else
|
|
236
|
+
# Portable fallback for macOS and other systems without GNU coreutils.
|
|
237
|
+
# Run the generator in the background; poll every 5s; kill on overrun.
|
|
238
|
+
bash "$skills_script" 2>/dev/null &
|
|
239
|
+
local _gen_pid=$!
|
|
240
|
+
local _elapsed=0
|
|
241
|
+
while kill -0 "$_gen_pid" 2>/dev/null && [[ "$_elapsed" -lt "$timeout_seconds" ]]; do
|
|
242
|
+
sleep 5
|
|
243
|
+
_elapsed=$((_elapsed + 5))
|
|
244
|
+
done
|
|
245
|
+
if kill -0 "$_gen_pid" 2>/dev/null; then
|
|
246
|
+
kill "$_gen_pid" 2>/dev/null
|
|
247
|
+
wait "$_gen_pid" 2>/dev/null || true
|
|
248
|
+
generate_rc=124
|
|
238
249
|
else
|
|
239
|
-
|
|
240
|
-
print_success "$success_msg"
|
|
241
|
-
return 0
|
|
242
|
-
fi
|
|
250
|
+
wait "$_gen_pid" 2>/dev/null || true
|
|
243
251
|
generate_rc=$?
|
|
244
252
|
fi
|
|
253
|
+
fi
|
|
245
254
|
|
|
246
|
-
|
|
255
|
+
if [[ "$generate_rc" -eq 0 ]]; then
|
|
256
|
+
print_success "$success_msg"
|
|
257
|
+
return 0
|
|
258
|
+
elif [[ "$generate_rc" -eq 124 ]]; then
|
|
259
|
+
print_warning "Agent Skills generation exceeded ${timeout_seconds}s — continuing without skill symlink refresh"
|
|
247
260
|
return 1
|
|
248
261
|
else
|
|
249
|
-
print_warning "Agent Skills
|
|
262
|
+
print_warning "Agent Skills generation encountered issues (non-critical)"
|
|
250
263
|
return 1
|
|
251
264
|
fi
|
|
252
265
|
}
|
|
@@ -306,9 +306,13 @@ setup_complexity_scan() {
|
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
# Install the dedicated merge-pass launchd plist (macOS).
|
|
309
|
-
#
|
|
309
|
+
# Uses the timeout-protected pulse-merge-routine.sh path (t3378). The older
|
|
310
|
+
# t21247 pulse-wrapper.sh --merge-only path had no hard ceiling; a hung merge
|
|
311
|
+
# pass could leave green PRs unmerged until manual intervention.
|
|
312
|
+
# Supersedes the t2862 sh.aidevops.pulse-merge-routine label while keeping the
|
|
313
|
+
# timeout-protected helper implementation:
|
|
310
314
|
# - Label: com.aidevops.aidevops-supervisor-merge
|
|
311
|
-
# - Script: pulse-
|
|
315
|
+
# - Script: pulse-merge-routine.sh run
|
|
312
316
|
# - Interval: 60s (down from 120s) — targets <=90s PR-green-to-merged latency
|
|
313
317
|
# - Log: pulse-merge.log (isolated from main pulse log)
|
|
314
318
|
#
|
|
@@ -348,7 +352,7 @@ _install_pulse_merge_routine_launchd() {
|
|
|
348
352
|
<array>
|
|
349
353
|
<string>${_xml_bash_bin}</string>
|
|
350
354
|
<string>${_xml_pmr_script}</string>
|
|
351
|
-
<string
|
|
355
|
+
<string>run</string>
|
|
352
356
|
</array>
|
|
353
357
|
<key>StartInterval</key>
|
|
354
358
|
<integer>60</integer>
|
|
@@ -382,7 +386,7 @@ PMR_PLIST
|
|
|
382
386
|
)
|
|
383
387
|
|
|
384
388
|
if _launchd_install_if_changed "$pmr_label" "$pmr_plist" "$pmr_plist_content"; then
|
|
385
|
-
print_info "Pulse merge pass enabled (launchd, every 60s via
|
|
389
|
+
print_info "Pulse merge pass enabled (launchd, every 60s via pulse-merge-routine.sh)"
|
|
386
390
|
else
|
|
387
391
|
print_warning "Failed to load pulse merge pass LaunchAgent"
|
|
388
392
|
fi
|
|
@@ -390,8 +394,8 @@ PMR_PLIST
|
|
|
390
394
|
}
|
|
391
395
|
|
|
392
396
|
# Install the dedicated merge-pass scheduler via systemd or cron (Linux).
|
|
393
|
-
#
|
|
394
|
-
# - Command: pulse-
|
|
397
|
+
# Uses timeout-protected pulse-merge-routine.sh (t3378).
|
|
398
|
+
# - Command: pulse-merge-routine.sh run
|
|
395
399
|
# - Interval: every 60s (cron * * * * *, systemd OnUnitActiveSec=60)
|
|
396
400
|
# - Log: pulse-merge.log
|
|
397
401
|
# Args: $1=wrapper_script $2=log_dir
|
|
@@ -413,13 +417,13 @@ _install_pulse_merge_routine_linux() {
|
|
|
413
417
|
|
|
414
418
|
_install_scheduler_linux \
|
|
415
419
|
"$pmr_systemd" \
|
|
416
|
-
"aidevops: pulse-merge
|
|
420
|
+
"aidevops: pulse-merge-routine" \
|
|
417
421
|
"* * * * *" \
|
|
418
|
-
"\"${pmr_script}\"
|
|
422
|
+
"\"${pmr_script}\" run" \
|
|
419
423
|
"60" \
|
|
420
424
|
"${_pmr_log_dir}/pulse-merge.log" \
|
|
421
425
|
"" \
|
|
422
|
-
"Pulse merge pass enabled (every 60s via
|
|
426
|
+
"Pulse merge pass enabled (every 60s via pulse-merge-routine.sh)" \
|
|
423
427
|
"Failed to install pulse merge pass scheduler" \
|
|
424
428
|
"true" \
|
|
425
429
|
"true"
|
|
@@ -428,18 +432,17 @@ _install_pulse_merge_routine_linux() {
|
|
|
428
432
|
|
|
429
433
|
# Setup the dedicated merge-pass scheduler (t21247, GH#21247).
|
|
430
434
|
#
|
|
431
|
-
# Supersedes t2862/GH#20919
|
|
432
|
-
# approach runs pulse-
|
|
435
|
+
# Supersedes t2862/GH#20919's legacy label/120s interval. The current
|
|
436
|
+
# approach runs pulse-merge-routine.sh every 60s so green PRs merge
|
|
433
437
|
# within <=90s of CI completion regardless of dispatch-cycle length (~23 min
|
|
434
|
-
# average). The
|
|
435
|
-
#
|
|
436
|
-
# overlap with the main dispatch cycle lock.
|
|
438
|
+
# average). The routine has its own hard timeout and lockdir so a hung merge
|
|
439
|
+
# pass cannot starve the backlog.
|
|
437
440
|
#
|
|
438
|
-
# Requires: pulse-
|
|
441
|
+
# Requires: pulse-merge-routine.sh must be installed and executable.
|
|
439
442
|
# The in-cycle merge pass in pulse-wrapper.sh is kept as defense-in-depth —
|
|
440
443
|
# it short-circuits when a merge pass ran within the last 60s.
|
|
441
444
|
setup_pulse_merge_routine() {
|
|
442
|
-
local pmr_wrapper="$HOME/.aidevops/agents/scripts/pulse-
|
|
445
|
+
local pmr_wrapper="$HOME/.aidevops/agents/scripts/pulse-merge-routine.sh"
|
|
443
446
|
local pmr_label="com.aidevops.aidevops-supervisor-merge"
|
|
444
447
|
if ! [[ -x "$pmr_wrapper" ]]; then
|
|
445
448
|
return 0
|
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.13.
|
|
15
|
+
# Version: 3.13.55
|
|
16
16
|
#
|
|
17
17
|
# Quick Install:
|
|
18
18
|
# npm install -g aidevops && aidevops update (recommended)
|
|
@@ -1318,7 +1318,10 @@ _setup_run_non_interactive() {
|
|
|
1318
1318
|
wait "$_pid_scan" 2>/dev/null || print_warning "Skill security scan encountered issues (non-critical)"
|
|
1319
1319
|
|
|
1320
1320
|
_time_step "inject_agents_reference" inject_agents_reference
|
|
1321
|
-
|
|
1321
|
+
# Use the bounded wrapper so a slow file-system traversal across many agent
|
|
1322
|
+
# files does not consume the remaining postflight budget and trip the outer
|
|
1323
|
+
# timeout (GH#22087). AIDEVOPS_DEPLOY_RUNTIMES_TIMEOUT controls the deadline.
|
|
1324
|
+
_time_step "deploy_agents_to_runtimes" _deploy_agents_to_runtimes_bounded
|
|
1322
1325
|
_time_step "update_opencode_config" update_opencode_config
|
|
1323
1326
|
_time_step "update_claude_config" update_claude_config
|
|
1324
1327
|
_time_step "update_codex_config" update_codex_config
|