aidevops 3.5.594 → 3.5.600
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 +83 -0
- package/setup.sh +11 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.5.
|
|
1
|
+
3.5.600
|
package/aidevops.sh
CHANGED
package/package.json
CHANGED
|
@@ -195,6 +195,8 @@ setup_supervisor_pulse() {
|
|
|
195
195
|
|
|
196
196
|
if [[ "$_os" == "Darwin" ]]; then
|
|
197
197
|
_install_pulse_launchd "$pulse_label" "$wrapper_script" "$opencode_bin" "$_pulse_installed"
|
|
198
|
+
elif _systemd_user_available; then
|
|
199
|
+
_install_pulse_systemd "aidevops-supervisor-pulse" "$wrapper_script"
|
|
198
200
|
else
|
|
199
201
|
_install_pulse_cron "$wrapper_script"
|
|
200
202
|
fi
|
|
@@ -406,6 +408,78 @@ _install_pulse_cron() {
|
|
|
406
408
|
return 0
|
|
407
409
|
}
|
|
408
410
|
|
|
411
|
+
# Check if systemd user services are available on this Linux system.
|
|
412
|
+
# Returns 0 if systemd --user is functional, 1 otherwise.
|
|
413
|
+
_systemd_user_available() {
|
|
414
|
+
command -v systemctl >/dev/null 2>&1 || return 1
|
|
415
|
+
systemctl --user status >/dev/null 2>&1 || return 1
|
|
416
|
+
return 0
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
# Install supervisor pulse via systemd user service (Linux with systemd)
|
|
420
|
+
# Args: $1=service_name (e.g. "aidevops-supervisor-pulse"), $2=wrapper_script
|
|
421
|
+
_install_pulse_systemd() {
|
|
422
|
+
local service_name="$1"
|
|
423
|
+
local wrapper_script="$2"
|
|
424
|
+
local service_dir="$HOME/.config/systemd/user"
|
|
425
|
+
local service_file="${service_dir}/${service_name}.service"
|
|
426
|
+
local timer_file="${service_dir}/${service_name}.timer"
|
|
427
|
+
|
|
428
|
+
mkdir -p "$service_dir"
|
|
429
|
+
|
|
430
|
+
# Build environment overrides for the service
|
|
431
|
+
local _env_lines=""
|
|
432
|
+
local _configured_headless_models _configured_pulse_model
|
|
433
|
+
_configured_headless_models=$(_resolve_headless_models_override)
|
|
434
|
+
_configured_pulse_model=$(_resolve_pulse_model_override)
|
|
435
|
+
if [[ -n "$_configured_headless_models" ]]; then
|
|
436
|
+
_env_lines+="Environment=AIDEVOPS_HEADLESS_MODELS=${_configured_headless_models}\n"
|
|
437
|
+
fi
|
|
438
|
+
if [[ -n "$_configured_pulse_model" ]]; then
|
|
439
|
+
_env_lines+="Environment=PULSE_MODEL=${_configured_pulse_model}\n"
|
|
440
|
+
fi
|
|
441
|
+
if [[ -n "${AIDEVOPS_HEADLESS_PROVIDER_ALLOWLIST:-}" ]]; then
|
|
442
|
+
_env_lines+="Environment=AIDEVOPS_HEADLESS_PROVIDER_ALLOWLIST=${AIDEVOPS_HEADLESS_PROVIDER_ALLOWLIST}\n"
|
|
443
|
+
fi
|
|
444
|
+
_env_lines+="Environment=PULSE_DIR=${HOME}/.aidevops/.agent-workspace\n"
|
|
445
|
+
_env_lines+="Environment=HOME=${HOME}\n"
|
|
446
|
+
|
|
447
|
+
# Write the service unit
|
|
448
|
+
printf '%s' "[Unit]
|
|
449
|
+
Description=aidevops Supervisor Pulse
|
|
450
|
+
After=network.target
|
|
451
|
+
|
|
452
|
+
[Service]
|
|
453
|
+
Type=oneshot
|
|
454
|
+
ExecStart=/bin/bash ${wrapper_script}
|
|
455
|
+
${_env_lines}StandardOutput=append:${HOME}/.aidevops/logs/pulse-wrapper.log
|
|
456
|
+
StandardError=append:${HOME}/.aidevops/logs/pulse-wrapper.log
|
|
457
|
+
" >"$service_file"
|
|
458
|
+
|
|
459
|
+
# Write the timer unit (every 2 minutes)
|
|
460
|
+
printf '%s' "[Unit]
|
|
461
|
+
Description=aidevops Supervisor Pulse Timer
|
|
462
|
+
|
|
463
|
+
[Timer]
|
|
464
|
+
OnBootSec=2min
|
|
465
|
+
OnUnitActiveSec=2min
|
|
466
|
+
Persistent=true
|
|
467
|
+
|
|
468
|
+
[Install]
|
|
469
|
+
WantedBy=timers.target
|
|
470
|
+
" >"$timer_file"
|
|
471
|
+
|
|
472
|
+
systemctl --user daemon-reload 2>/dev/null || true
|
|
473
|
+
if systemctl --user enable --now "${service_name}.timer" 2>/dev/null; then
|
|
474
|
+
print_info "Supervisor pulse enabled (systemd user timer, every 2 min)"
|
|
475
|
+
print_info "Disable: systemctl --user disable --now ${service_name}.timer"
|
|
476
|
+
else
|
|
477
|
+
print_warning "Failed to enable systemd timer — falling back to cron"
|
|
478
|
+
_install_pulse_cron "$wrapper_script"
|
|
479
|
+
fi
|
|
480
|
+
return 0
|
|
481
|
+
}
|
|
482
|
+
|
|
409
483
|
# Uninstall supervisor pulse (user explicitly disabled)
|
|
410
484
|
_uninstall_pulse() {
|
|
411
485
|
local _os="$1"
|
|
@@ -418,6 +492,15 @@ _uninstall_pulse() {
|
|
|
418
492
|
pkill -f 'Supervisor Pulse' 2>/dev/null || true
|
|
419
493
|
print_info "Supervisor pulse disabled (launchd agent removed per config)"
|
|
420
494
|
fi
|
|
495
|
+
elif _systemd_user_available; then
|
|
496
|
+
local service_name="aidevops-supervisor-pulse"
|
|
497
|
+
if systemctl --user is-enabled "${service_name}.timer" >/dev/null 2>&1; then
|
|
498
|
+
systemctl --user disable --now "${service_name}.timer" 2>/dev/null || true
|
|
499
|
+
rm -f "$HOME/.config/systemd/user/${service_name}.service"
|
|
500
|
+
rm -f "$HOME/.config/systemd/user/${service_name}.timer"
|
|
501
|
+
systemctl --user daemon-reload 2>/dev/null || true
|
|
502
|
+
print_info "Supervisor pulse disabled (systemd timer removed per config)"
|
|
503
|
+
fi
|
|
421
504
|
else
|
|
422
505
|
if crontab -l 2>/dev/null | grep -qF "pulse-wrapper"; then
|
|
423
506
|
crontab -l 2>/dev/null | grep -v 'aidevops: supervisor-pulse' | crontab - || true
|
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.5.
|
|
13
|
+
# Version: 3.5.599
|
|
14
14
|
#
|
|
15
15
|
# Quick Install:
|
|
16
16
|
# npm install -g aidevops && aidevops update (recommended)
|
|
@@ -40,6 +40,15 @@ PLATFORM_MACOS=$([[ "$(uname -s)" == "Darwin" ]] && echo true || echo false)
|
|
|
40
40
|
PLATFORM_ARM64=$([[ "$(uname -m)" == "arm64" || "$(uname -m)" == "aarch64" ]] && echo true || echo false)
|
|
41
41
|
export PLATFORM_MACOS PLATFORM_ARM64
|
|
42
42
|
readonly PLATFORM_MACOS PLATFORM_ARM64
|
|
43
|
+
# Extended platform detection (t1748: Linux/WSL2 support).
|
|
44
|
+
# Sources platform-detect.sh when available to export AIDEVOPS_PLATFORM,
|
|
45
|
+
# AIDEVOPS_SCHEDULER, AIDEVOPS_CLIPBOARD_COPY, etc.
|
|
46
|
+
_platform_detect_script="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.agents/scripts/platform-detect.sh"
|
|
47
|
+
if [[ -f "$_platform_detect_script" ]]; then
|
|
48
|
+
# shellcheck disable=SC1090 # dynamic path, exists at runtime
|
|
49
|
+
source "$_platform_detect_script"
|
|
50
|
+
fi
|
|
51
|
+
unset _platform_detect_script
|
|
43
52
|
# Repo constants — exported; consumed by setup-modules/core.sh, agent-deploy.sh
|
|
44
53
|
REPO_URL="https://github.com/marcusquinn/aidevops.git"
|
|
45
54
|
# INSTALL_DIR: resolve from the directory where setup.sh is executed (supports worktrees)
|
|
@@ -826,6 +835,7 @@ _setup_run_interactive() {
|
|
|
826
835
|
confirm_step "Check optional dependencies (bun, node, python)" && check_optional_deps
|
|
827
836
|
confirm_step "Check Python version (recommend upgrade if outdated)" && check_python_upgrade_available
|
|
828
837
|
confirm_step "Setup recommended tools (Tabby, Zed, etc.)" && setup_recommended_tools
|
|
838
|
+
confirm_step "Setup PIM tools (Reminders, Calendar, Contacts)" && setup_pim_tools
|
|
829
839
|
confirm_step "Setup MiniSim (iOS/Android emulator launcher)" && setup_minisim
|
|
830
840
|
confirm_step "Setup ClaudeBar (AI quota monitor in menu bar)" && setup_claudebar
|
|
831
841
|
confirm_step "Setup Git CLIs (gh, glab, tea)" && setup_git_clis
|