aidevops 3.12.0 → 3.13.1
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/README.md +17 -0
- package/VERSION +1 -1
- package/aidevops.sh +185 -5
- package/package.json +1 -1
- package/setup-modules/schedulers-linux.sh +386 -0
- package/setup-modules/schedulers-platform.sh +1024 -0
- package/setup-modules/schedulers-pulse.sh +978 -0
- package/setup-modules/schedulers.sh +345 -2330
- package/setup-modules/tool-install.sh +89 -0
- package/setup.sh +139 -48
package/README.md
CHANGED
|
@@ -238,6 +238,23 @@ This creates:
|
|
|
238
238
|
|
|
239
239
|
**Available features:** `planning`, `git-workflow`, `code-quality`, `time-tracking`, `beads`
|
|
240
240
|
|
|
241
|
+
### Per-repo platform setup
|
|
242
|
+
|
|
243
|
+
After `aidevops init` registers a new repo, run `/setup-git` in your AI assistant
|
|
244
|
+
to apply per-repo platform secrets. Most notably, this sets `SYNC_PAT` — a
|
|
245
|
+
GitHub Actions secret that lets `issue-sync.yml` push TODO.md auto-completion
|
|
246
|
+
past branch protection.
|
|
247
|
+
|
|
248
|
+
This is distinct from `/onboarding` (per-account credentials like `gh auth login`):
|
|
249
|
+
GitHub Actions secrets are scoped per-repo, so each repo needs its own. You need
|
|
250
|
+
`gh auth login` to succeed before any per-repo helper can run, so `/onboarding`
|
|
251
|
+
comes first, `/setup-git` second.
|
|
252
|
+
|
|
253
|
+
Run `/setup-git` again whenever you register a new repo with `aidevops repos add`
|
|
254
|
+
or when a `SYNC_PAT` advisory appears in the session greeting toast. If you skip
|
|
255
|
+
this step, `issue-sync.yml` will post a remediation comment when it hits branch
|
|
256
|
+
protection — `/setup-git` walks through the fix.
|
|
257
|
+
|
|
241
258
|
### Upgrade Planning Files
|
|
242
259
|
|
|
243
260
|
When aidevops templates evolve, upgrade existing projects to the latest format:
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.13.1
|
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.
|
|
8
|
+
# Version: 3.13.1
|
|
9
9
|
|
|
10
10
|
set -euo pipefail
|
|
11
11
|
|
|
@@ -557,6 +557,71 @@ _update_verify_signature() {
|
|
|
557
557
|
return 0
|
|
558
558
|
}
|
|
559
559
|
|
|
560
|
+
# One-shot, idempotent migration of supervisor.* → orchestration.* in settings.json (t2946).
|
|
561
|
+
# Safe: reads value from supervisor.* only when orchestration.* key is absent.
|
|
562
|
+
# Logs to ~/.aidevops/logs/settings-migration.log.
|
|
563
|
+
_migrate_settings_supervisor_to_orchestration() {
|
|
564
|
+
local _settings_file="${HOME}/.config/aidevops/settings.json"
|
|
565
|
+
local _log_file="${HOME}/.aidevops/logs/settings-migration.log"
|
|
566
|
+
|
|
567
|
+
if ! command -v jq >/dev/null 2>&1; then
|
|
568
|
+
return 0
|
|
569
|
+
fi
|
|
570
|
+
if [[ ! -f "$_settings_file" ]]; then
|
|
571
|
+
return 0
|
|
572
|
+
fi
|
|
573
|
+
if ! jq . "$_settings_file" >/dev/null 2>&1; then
|
|
574
|
+
return 0
|
|
575
|
+
fi
|
|
576
|
+
|
|
577
|
+
# Check if supervisor.pulse_interval_seconds exists and orchestration.pulse_interval_seconds is absent.
|
|
578
|
+
local _has_sv _has_orch
|
|
579
|
+
_has_sv=$(jq -r 'if .supervisor.pulse_interval_seconds != null then "yes" else "no" end' "$_settings_file" 2>/dev/null)
|
|
580
|
+
_has_orch=$(jq -r 'if .orchestration.pulse_interval_seconds != null then "yes" else "no" end' "$_settings_file" 2>/dev/null)
|
|
581
|
+
|
|
582
|
+
if [[ "$_has_sv" != "yes" ]]; then
|
|
583
|
+
return 0
|
|
584
|
+
fi
|
|
585
|
+
|
|
586
|
+
local _ts
|
|
587
|
+
_ts=$(date -u +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date +%Y-%m-%dT%H:%M:%SZ)
|
|
588
|
+
mkdir -p "$(dirname "$_log_file")" 2>/dev/null || true
|
|
589
|
+
|
|
590
|
+
local _tmp
|
|
591
|
+
_tmp=$(mktemp 2>/dev/null) || return 0
|
|
592
|
+
|
|
593
|
+
if [[ "$_has_orch" == "no" ]]; then
|
|
594
|
+
# Migrate: copy supervisor.pulse_interval_seconds to orchestration.pulse_interval_seconds,
|
|
595
|
+
# then remove supervisor.pulse_interval_seconds.
|
|
596
|
+
local _sv_val
|
|
597
|
+
_sv_val=$(jq -r '.supervisor.pulse_interval_seconds' "$_settings_file" 2>/dev/null)
|
|
598
|
+
if jq --argjson v "$_sv_val" \
|
|
599
|
+
'(.orchestration.pulse_interval_seconds) = $v | del(.supervisor.pulse_interval_seconds)' \
|
|
600
|
+
"$_settings_file" >"$_tmp" 2>/dev/null && [[ -s "$_tmp" ]]; then
|
|
601
|
+
mv "$_tmp" "$_settings_file"
|
|
602
|
+
printf '[%s] migrated supervisor.pulse_interval_seconds=%s → orchestration.pulse_interval_seconds\n' \
|
|
603
|
+
"$_ts" "$_sv_val" >>"$_log_file" 2>/dev/null || true
|
|
604
|
+
print_info "Settings migrated: supervisor.pulse_interval_seconds → orchestration.pulse_interval_seconds ($_sv_val)"
|
|
605
|
+
else
|
|
606
|
+
rm -f "$_tmp"
|
|
607
|
+
fi
|
|
608
|
+
else
|
|
609
|
+
# Both present: orchestration wins, remove the stale supervisor key.
|
|
610
|
+
local _orch_val
|
|
611
|
+
_orch_val=$(jq -r '.orchestration.pulse_interval_seconds' "$_settings_file" 2>/dev/null)
|
|
612
|
+
if jq 'del(.supervisor.pulse_interval_seconds)' \
|
|
613
|
+
"$_settings_file" >"$_tmp" 2>/dev/null && [[ -s "$_tmp" ]]; then
|
|
614
|
+
mv "$_tmp" "$_settings_file"
|
|
615
|
+
printf '[%s] removed stale supervisor.pulse_interval_seconds (orchestration.pulse_interval_seconds=%s wins)\n' \
|
|
616
|
+
"$_ts" "$_orch_val" >>"$_log_file" 2>/dev/null || true
|
|
617
|
+
print_info "Settings cleaned: removed stale supervisor.pulse_interval_seconds (orchestration value $_orch_val kept)"
|
|
618
|
+
else
|
|
619
|
+
rm -f "$_tmp"
|
|
620
|
+
fi
|
|
621
|
+
fi
|
|
622
|
+
return 0
|
|
623
|
+
}
|
|
624
|
+
|
|
560
625
|
# Update/upgrade command
|
|
561
626
|
cmd_update() {
|
|
562
627
|
local skip_project_sync=false
|
|
@@ -693,6 +758,12 @@ cmd_update() {
|
|
|
693
758
|
_update_check_daemon_health
|
|
694
759
|
fi
|
|
695
760
|
|
|
761
|
+
# t2946: one-shot idempotent migration from legacy supervisor.* to canonical
|
|
762
|
+
# orchestration.* namespace in settings.json. Safe: no-op when orchestration.*
|
|
763
|
+
# is already set. Runs even on "already up to date" updates so users who
|
|
764
|
+
# install the fix without a new release still get migrated on next 'aidevops update'.
|
|
765
|
+
_migrate_settings_supervisor_to_orchestration
|
|
766
|
+
|
|
696
767
|
# t2914: ensure pulse is running after every update. The existing
|
|
697
768
|
# restart paths (setup.sh:1329, agent-deploy.sh:601) call
|
|
698
769
|
# pulse-lifecycle-helper.sh restart-if-running which is a silent no-op
|
|
@@ -708,7 +779,7 @@ cmd_update() {
|
|
|
708
779
|
# 'restart-if-running' do). Non-fatal: a pulse start failure should
|
|
709
780
|
# not fail the update.
|
|
710
781
|
if [[ "${AIDEVOPS_SKIP_PULSE_RESTART:-0}" != "1" ]]; then
|
|
711
|
-
local _pulse_helper="${
|
|
782
|
+
local _pulse_helper="${AGENTS_DIR}/scripts/pulse-lifecycle-helper.sh"
|
|
712
783
|
if [[ -x "$_pulse_helper" ]]; then
|
|
713
784
|
"$_pulse_helper" start >/dev/null 2>&1 || print_warning "Pulse start failed (non-fatal)"
|
|
714
785
|
fi
|
|
@@ -1496,6 +1567,7 @@ _help_commands() {
|
|
|
1496
1567
|
echo " client-format Client request format alignment (extract/check/canary/monitor)"
|
|
1497
1568
|
echo " opencode-sandbox Test OpenCode versions in isolation (install/run/check/clean)"
|
|
1498
1569
|
echo " approve <cmd> Cryptographic issue/PR approval (setup/issue/pr/verify/status)"
|
|
1570
|
+
echo " issue <cmd> Interactive issue ownership (claim/release/status/scan-stale)"
|
|
1499
1571
|
echo " security [cmd] Full security assessment (posture + hygiene + supply chain)"
|
|
1500
1572
|
echo " contributions External contributions inbox (bare: status | seed/scan/stop/restart/install/uninstall)"
|
|
1501
1573
|
echo " inbox [cmd] Capture transit zone (bare: status | provision/add/find/digest/help)"
|
|
@@ -1505,6 +1577,7 @@ _help_commands() {
|
|
|
1505
1577
|
echo " secret <cmd> Manage secrets (set/list/run/init/import/status)"
|
|
1506
1578
|
echo " config <cmd> Feature toggles (list/get/set/reset/path/help)"
|
|
1507
1579
|
echo " knowledge <cmd> Knowledge plane management (init/status/provision)"
|
|
1580
|
+
echo " campaign <cmd> Campaign plane P6: launch + promote results/learnings"
|
|
1508
1581
|
echo " stats <cmd> LLM usage analytics (summary/models/projects/costs/trend)"
|
|
1509
1582
|
echo " tabby <cmd> Manage Tabby terminal profiles (sync/status/zshrc/help)"
|
|
1510
1583
|
echo " parent-status <N> Show decomposition state of parent-task issue #N (alias: ps)"
|
|
@@ -1590,6 +1663,15 @@ _help_detailed_sections() {
|
|
|
1590
1663
|
echo " aidevops knowledge init off # Disable knowledge plane"
|
|
1591
1664
|
echo " aidevops knowledge status # Show provisioning state"
|
|
1592
1665
|
echo " aidevops knowledge provision [path] # Re-provision (idempotent)"
|
|
1666
|
+
echo " aidevops knowledge add <file|url> # Ingest file or URL into sources/"
|
|
1667
|
+
echo " aidevops knowledge list [--state s] [--kind k] # List all known sources"
|
|
1668
|
+
echo " aidevops knowledge search <query> # Search sources (grep fallback)"
|
|
1669
|
+
echo ""
|
|
1670
|
+
echo "Campaign Plane (P6 — performance integration + learnings promotion):"
|
|
1671
|
+
echo " aidevops campaign launch <id> # Move active/<id> → launched/, create result/learning templates"
|
|
1672
|
+
echo " aidevops campaign promote <id> --results # Push metrics to _performance/marketing/<id>.md"
|
|
1673
|
+
echo " aidevops campaign promote <id> --learnings # Promote insights to _knowledge/insights/marketing/"
|
|
1674
|
+
echo " aidevops campaign feedback [<id>] # Surface _feedback/ insights for campaign research"
|
|
1593
1675
|
echo ""
|
|
1594
1676
|
echo "LLM Stats:"
|
|
1595
1677
|
echo " aidevops stats # Show usage summary (last 30 days)"
|
|
@@ -1825,9 +1907,24 @@ _cmd_email() {
|
|
|
1825
1907
|
;;
|
|
1826
1908
|
poll)
|
|
1827
1909
|
# Direct poll commands forwarded to email-poll-helper.sh
|
|
1828
|
-
|
|
1910
|
+
local poll_action="${1:-tick}"
|
|
1911
|
+
shift || true
|
|
1912
|
+
_dispatch_helper "$_EPH" "$_EPH" "$poll_action" "$@" ;;
|
|
1913
|
+
thread)
|
|
1914
|
+
# Thread lookup: email thread <message-id> [knowledge-root]
|
|
1915
|
+
local _ETH="email-thread-helper.sh"
|
|
1916
|
+
_dispatch_helper "$_ETH" "$_ETH" thread "$@" ;;
|
|
1917
|
+
build)
|
|
1918
|
+
# Thread rebuild: email build [knowledge-root] [--force]
|
|
1919
|
+
local _ETH2="email-thread-helper.sh"
|
|
1920
|
+
_dispatch_helper "$_ETH2" "$_ETH2" build "$@" ;;
|
|
1921
|
+
filter)
|
|
1922
|
+
# Filter rules: email filter tick|add|test|list [knowledge-root]
|
|
1923
|
+
local _EFH="email-filter-helper.sh"
|
|
1924
|
+
[[ $# -eq 0 ]] && set -- list
|
|
1925
|
+
_dispatch_helper "$_EFH" "$_EFH" "$@" ;;
|
|
1829
1926
|
*)
|
|
1830
|
-
echo "Usage: aidevops email <mailbox|poll> [subcommand]"
|
|
1927
|
+
echo "Usage: aidevops email <mailbox|poll|thread|build|filter> [subcommand]"
|
|
1831
1928
|
echo ""
|
|
1832
1929
|
echo "Email subcommands:"
|
|
1833
1930
|
echo " mailbox add Register a new IMAP mailbox (interactive)"
|
|
@@ -1836,6 +1933,12 @@ _cmd_email() {
|
|
|
1836
1933
|
echo " mailbox remove <id> Un-register a mailbox"
|
|
1837
1934
|
echo " poll tick Poll all mailboxes now (same as routine r044)"
|
|
1838
1935
|
echo " poll backfill <id> Backfill a mailbox from a given date"
|
|
1936
|
+
echo " thread <message-id> Look up thread by message-id"
|
|
1937
|
+
echo " build [--force] Rebuild thread index from email sources"
|
|
1938
|
+
echo " filter list List filter rules"
|
|
1939
|
+
echo " filter add Add a new filter rule (interactive)"
|
|
1940
|
+
echo " filter test <rule> Dry-run rule against last 50 sources"
|
|
1941
|
+
echo " filter tick Run filter pass (routine r045)"
|
|
1839
1942
|
;;
|
|
1840
1943
|
esac
|
|
1841
1944
|
return 0
|
|
@@ -1914,6 +2017,75 @@ main() {
|
|
|
1914
2017
|
pulse) _dispatch_helper "pulse-session-helper.sh" "pulse-session-helper.sh" "$@" ;;
|
|
1915
2018
|
check-workflows | workflows) _dispatch_helper "check-workflows-helper.sh" "check-workflows-helper.sh" "$@" ;;
|
|
1916
2019
|
sync-workflows) _dispatch_helper "sync-workflows-helper.sh" "sync-workflows-helper.sh" "$@" ;;
|
|
2020
|
+
badges)
|
|
2021
|
+
# Badge management: render | check | sync | install (t2975)
|
|
2022
|
+
# Bare 'aidevops badges' with no subcommand shows a usage summary.
|
|
2023
|
+
# Subcommands:
|
|
2024
|
+
# render <slug> — render canonical badge block for a repo
|
|
2025
|
+
# check [--repo SLUG] [--json] [--verbose] — cross-repo drift check
|
|
2026
|
+
# sync [--repo SLUG] [--apply] — inject badge block + install workflow
|
|
2027
|
+
# install [--repo SLUG] [--apply] — install loc-badge caller workflow only
|
|
2028
|
+
local _badges_sub="${1:-help}"
|
|
2029
|
+
local _badges_check_h="badges-check-helper.sh"
|
|
2030
|
+
local _badges_sync_h="badges-sync-helper.sh"
|
|
2031
|
+
case "$_badges_sub" in
|
|
2032
|
+
render)
|
|
2033
|
+
shift
|
|
2034
|
+
local _render_helper
|
|
2035
|
+
_render_helper=$(bash -c '
|
|
2036
|
+
d="$HOME/.aidevops/agents/scripts/readme-badges-helper.sh"
|
|
2037
|
+
l="'"$AGENTS_DIR"'/scripts/readme-badges-helper.sh"
|
|
2038
|
+
[[ -f "$d" ]] && echo "$d" || echo "$l"
|
|
2039
|
+
')
|
|
2040
|
+
if [[ -f "$_render_helper" ]]; then
|
|
2041
|
+
bash "$_render_helper" render "$@"
|
|
2042
|
+
else
|
|
2043
|
+
print_error "readme-badges-helper.sh not found. Run: aidevops update"
|
|
2044
|
+
exit 1
|
|
2045
|
+
fi
|
|
2046
|
+
;;
|
|
2047
|
+
check)
|
|
2048
|
+
shift
|
|
2049
|
+
_dispatch_helper "$_badges_check_h" "$_badges_check_h" "$@"
|
|
2050
|
+
;;
|
|
2051
|
+
sync)
|
|
2052
|
+
shift
|
|
2053
|
+
_dispatch_helper "$_badges_sync_h" "$_badges_sync_h" "$@"
|
|
2054
|
+
;;
|
|
2055
|
+
install)
|
|
2056
|
+
shift
|
|
2057
|
+
_dispatch_helper "$_badges_sync_h" "$_badges_sync_h" --workflow-only "$@"
|
|
2058
|
+
;;
|
|
2059
|
+
help | --help | -h | "")
|
|
2060
|
+
echo ""
|
|
2061
|
+
echo "aidevops badges — README badge block and LOC workflow management (t2975)"
|
|
2062
|
+
echo ""
|
|
2063
|
+
echo "Subcommands:"
|
|
2064
|
+
echo " render <slug> Print canonical badge block for a repo"
|
|
2065
|
+
echo " check [--repo SLUG] [--json] Detect badge drift across managed repos"
|
|
2066
|
+
echo " sync [--repo SLUG] [--apply] Inject badge block + install LOC workflow"
|
|
2067
|
+
echo " install [--repo SLUG] [--apply] Install loc-badge caller workflow only"
|
|
2068
|
+
echo ""
|
|
2069
|
+
echo "Options (check/sync/install):"
|
|
2070
|
+
echo " --repo SLUG Limit to a single repo"
|
|
2071
|
+
echo " --apply Actually perform the sync (default: dry-run)"
|
|
2072
|
+
echo " --json Machine-readable output"
|
|
2073
|
+
echo " --verbose Show diff summaries (check only)"
|
|
2074
|
+
echo ""
|
|
2075
|
+
echo "Examples:"
|
|
2076
|
+
echo " aidevops badges check # scan all repos for badge drift"
|
|
2077
|
+
echo " aidevops badges check --json | jq '.[]' # machine-readable output"
|
|
2078
|
+
echo " aidevops badges render owner/repo # print badge block"
|
|
2079
|
+
echo " aidevops badges sync # dry-run sync across all repos"
|
|
2080
|
+
echo " aidevops badges sync --repo owner/r --apply # apply to a single repo"
|
|
2081
|
+
echo ""
|
|
2082
|
+
;;
|
|
2083
|
+
*)
|
|
2084
|
+
print_error "Unknown badges subcommand: $_badges_sub (try render|check|sync|install|help)"
|
|
2085
|
+
exit 1
|
|
2086
|
+
;;
|
|
2087
|
+
esac
|
|
2088
|
+
;;
|
|
1917
2089
|
security) _cmd_security "$@" ;;
|
|
1918
2090
|
doctor | doc) _dispatch_helper "doctor-helper.sh" "doctor-helper.sh" "$@" ;;
|
|
1919
2091
|
detect | scan) cmd_detect ;;
|
|
@@ -1924,6 +2096,7 @@ main() {
|
|
|
1924
2096
|
review-gate | review_gate) _dispatch_helper "review-gate-config-helper.sh" "review-gate-config-helper.sh" "$@" ;;
|
|
1925
2097
|
secret | secrets) _dispatch_helper "secret-helper.sh" "secret-helper.sh" "$@" ;;
|
|
1926
2098
|
approve) _dispatch_helper "approval-helper.sh" "approval-helper.sh" "$@" ;;
|
|
2099
|
+
issue) _dispatch_helper "interactive-session-helper.sh" "interactive-session-helper.sh" "$@" ;;
|
|
1927
2100
|
signing) _dispatch_helper "signing-setup.sh" "signing-setup.sh" "$@" ;;
|
|
1928
2101
|
contributions | contrib)
|
|
1929
2102
|
# Bare `aidevops contributions` defaults to status (most common use).
|
|
@@ -1939,7 +2112,13 @@ main() {
|
|
|
1939
2112
|
case | cases)
|
|
1940
2113
|
# Bare `aidevops case` defaults to list (most common use).
|
|
1941
2114
|
[[ $# -eq 0 ]] && set -- list
|
|
1942
|
-
|
|
2115
|
+
# alarm-test subcommand routes to case-alarm-helper.sh
|
|
2116
|
+
if [[ "${1:-}" == "alarm-test" ]]; then
|
|
2117
|
+
shift
|
|
2118
|
+
_dispatch_helper "case-alarm-helper.sh" "case-alarm-helper.sh" alarm-test "$@"
|
|
2119
|
+
else
|
|
2120
|
+
_dispatch_helper "case-helper.sh" "case-helper.sh" "$@"
|
|
2121
|
+
fi
|
|
1943
2122
|
;;
|
|
1944
2123
|
email) _cmd_email "$@" ;;
|
|
1945
2124
|
stats | observability) _dispatch_helper "observability-helper.sh" "observability-helper.sh" "$@" ;;
|
|
@@ -1947,6 +2126,7 @@ main() {
|
|
|
1947
2126
|
init-routines) _dispatch_helper "init-routines-helper.sh" "init-routines-helper.sh" "$@" ;;
|
|
1948
2127
|
parent-status | ps) _dispatch_helper "parent-status-helper.sh" "parent-status-helper.sh" "$@" ;;
|
|
1949
2128
|
knowledge) _dispatch_helper "knowledge-helper.sh" "knowledge-helper.sh" "$@" ;;
|
|
2129
|
+
campaign | campaigns) _dispatch_helper "campaign-helper.sh" "campaign-helper.sh" "$@" ;;
|
|
1950
2130
|
config | configure) _dispatch_config "$@" ;;
|
|
1951
2131
|
uninstall | remove) cmd_uninstall ;;
|
|
1952
2132
|
version | v | -v | --version) cmd_version ;;
|