aidevops 3.13.89 → 3.13.91

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 CHANGED
@@ -1 +1 @@
1
- 3.13.89
1
+ 3.13.91
@@ -207,6 +207,33 @@ _plugin_validate_ns() {
207
207
  _plugin_field() {
208
208
  local pf="$1" n="$2" f="$3"
209
209
  jq -r --arg n "$n" --arg f "$f" '.plugins[] | select(.name == $n) | .[$f] // empty' "$pf" 2>/dev/null || echo ""
210
+ return 0
211
+ }
212
+
213
+ _plugin_regenerate_discovery_index() {
214
+ local ad="$1"
215
+ local runtime_generator="$ad/scripts/generate-runtime-config.sh"
216
+ local index_helper="$ad/scripts/subagent-index-helper.sh"
217
+
218
+ if [[ -x "$runtime_generator" ]]; then
219
+ if bash "$runtime_generator" all >/dev/null 2>&1; then
220
+ print_success "Runtime config and subagent index regenerated"
221
+ return 0
222
+ fi
223
+ print_warning "Runtime config regeneration encountered issues; trying subagent index only"
224
+ fi
225
+
226
+ if [[ -x "$index_helper" ]]; then
227
+ if bash "$index_helper" generate >/dev/null 2>&1; then
228
+ print_success "Subagent index regenerated"
229
+ return 0
230
+ fi
231
+ print_warning "Subagent index regeneration encountered issues"
232
+ return 1
233
+ fi
234
+
235
+ print_warning "Subagent index helper not found; run 'aidevops update' to regenerate discovery"
236
+ return 1
210
237
  }
211
238
 
212
239
  _plugin_add() {
@@ -287,6 +314,7 @@ _plugin_add() {
287
314
  '.plugins += [{"name": $name, "repo": $repo, "branch": $branch, "namespace": $ns, "enabled": true}]' "$pf" >"$tmp" && mv "$tmp" "$pf"
288
315
  local loader="$ad/scripts/plugin-loader-helper.sh"
289
316
  [[ -f "$loader" ]] && bash "$loader" hooks "$namespace" init 2>/dev/null || true
317
+ _plugin_regenerate_discovery_index "$ad" || true
290
318
  print_success "Plugin '$plugin_name' installed to $clone_dir"
291
319
  echo ""
292
320
  echo " Agents available at: ~/.aidevops/agents/$namespace/"
@@ -336,6 +364,7 @@ _plugin_update() {
336
364
  if git clone --branch "$bn" --depth 1 "$repo" "$cd2" 2>&1; then
337
365
  rm -rf "$cd2/.git"
338
366
  print_success "Plugin '$target' updated"
367
+ _plugin_regenerate_discovery_index "$ad" || true
339
368
  else
340
369
  print_error "Failed to update plugin '$target'"
341
370
  return 1
@@ -371,6 +400,7 @@ _plugin_update() {
371
400
  return 1
372
401
  }
373
402
  print_success "All plugins updated"
403
+ _plugin_regenerate_discovery_index "$ad" || true
374
404
  fi
375
405
  return 0
376
406
  }
@@ -397,6 +427,7 @@ _plugin_toggle() {
397
427
  }
398
428
  local loader="$ad/scripts/plugin-loader-helper.sh"
399
429
  [[ -f "$loader" ]] && bash "$loader" hooks "$tns" init 2>/dev/null || true
430
+ _plugin_regenerate_discovery_index "$ad" || true
400
431
  print_success "Plugin '$tn' enabled"
401
432
  else
402
433
  local tns
@@ -410,6 +441,7 @@ _plugin_toggle() {
410
441
  local tmp="${pf}.tmp"
411
442
  jq --arg n "$tn" '(.plugins[] | select(.name == $n)).enabled = false' "$pf" >"$tmp" && mv "$tmp" "$pf"
412
443
  [[ -d "$ad/${tns:?}" ]] && rm -rf "$ad/${tns:?}"
444
+ _plugin_regenerate_discovery_index "$ad" || true
413
445
  print_success "Plugin '$tn' disabled (config preserved)"
414
446
  fi
415
447
  return 0
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.89
8
+ # Version: 3.13.91
9
9
 
10
10
  set -euo pipefail
11
11
 
@@ -747,6 +747,7 @@ _help_commands() {
747
747
  echo " update Update aidevops to the latest version (alias: upgrade)"
748
748
  echo " upgrade Alias for update"
749
749
  echo " pulse <cmd> Session-based pulse control (start/stop/status)"
750
+ echo " launch-worker Manually launch headless workers for GitHub issues"
750
751
  echo " auto-update <cmd> Manage automatic update polling (enable/disable/status)"
751
752
  echo " repo-sync <cmd> Daily git pull for repos in parent dirs (enable/disable/status/dirs)"
752
753
  echo " update-tools Check for outdated tools (--update to auto-update)"
@@ -975,6 +976,7 @@ cmd_help() {
975
976
  echo " aidevops doctor --fix # Interactively remove duplicates"
976
977
  echo " aidevops update # Update framework + check projects"
977
978
  echo " aidevops repos # List registered projects"
979
+ echo " aidevops launch-worker 22259 marcusquinn/aidevops --dry-run"
978
980
  echo " aidevops repos add # Register current project"
979
981
  echo " aidevops detect # Find unregistered projects"
980
982
  echo " aidevops update-tools # Check for outdated tools"
@@ -1028,6 +1030,171 @@ _dispatch_config() {
1028
1030
  return 0
1029
1031
  }
1030
1032
 
1033
+ _launch_worker_usage() {
1034
+ cat <<'EOF'
1035
+ Usage: aidevops launch-worker <issue|issue,issue> [owner/repo] [options]
1036
+ aidevops launch-worker --batch <issue,issue> [owner/repo] [options]
1037
+ aidevops launch-worker status <issue> [owner/repo]
1038
+
1039
+ Launch one or more headless workers manually without waiting for the pulse.
1040
+
1041
+ Options:
1042
+ --model <id> Override model (for example, anthropic/claude-opus-4-7).
1043
+ --agent <name> Worker agent name (default: Build+).
1044
+ --batch <list> Comma-separated issue numbers to launch.
1045
+ --dry-run Print the planned dispatch without launching.
1046
+ --no-ceremony Skip status/origin/assignee ceremony (debug only).
1047
+ -h, --help Show this help.
1048
+
1049
+ Output includes the worker PID, worktree path, log path, session key, and a
1050
+ status command for each launched issue.
1051
+ EOF
1052
+ return 0
1053
+ }
1054
+
1055
+ _launch_worker_default_repo() {
1056
+ local remote_url=""
1057
+ remote_url=$(git remote get-url origin 2>/dev/null || true)
1058
+ if [[ "$remote_url" =~ github\.com[:/]([^/]+/[^/.]+)(\.git)?$ ]]; then
1059
+ printf '%s\n' "${BASH_REMATCH[1]}"
1060
+ return 0
1061
+ fi
1062
+ return 1
1063
+ }
1064
+
1065
+ _launch_worker_helper_path() {
1066
+ local source_dir helper_path
1067
+ source_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1068
+ helper_path="$source_dir/.agents/scripts/dispatch-single-issue-helper.sh"
1069
+ [[ ! -f "$helper_path" ]] && helper_path="$INSTALL_DIR/.agents/scripts/dispatch-single-issue-helper.sh"
1070
+ [[ ! -f "$helper_path" ]] && helper_path="$AGENTS_DIR/scripts/dispatch-single-issue-helper.sh"
1071
+ if [[ ! -f "$helper_path" ]]; then
1072
+ print_error "dispatch-single-issue-helper.sh not found. Run: aidevops update"
1073
+ return 1
1074
+ fi
1075
+ printf '%s\n' "$helper_path"
1076
+ return 0
1077
+ }
1078
+
1079
+ _launch_worker_status() {
1080
+ local status_issue="${1:-}"
1081
+ local status_repo="${2:-}"
1082
+ if [[ -z "$status_issue" ]]; then
1083
+ print_error "launch-worker status requires <issue> [owner/repo]"
1084
+ return 2
1085
+ fi
1086
+ if [[ -z "$status_repo" ]]; then
1087
+ status_repo=$(_launch_worker_default_repo) || {
1088
+ print_error "Could not infer owner/repo from git remote; pass it explicitly"
1089
+ return 2
1090
+ }
1091
+ fi
1092
+ local status_helper_path
1093
+ status_helper_path=$(_launch_worker_helper_path) || return 1
1094
+ bash "$status_helper_path" status "$status_issue" "$status_repo"
1095
+ return 0
1096
+ }
1097
+
1098
+ cmd_launch_worker() {
1099
+ local sub_or_issue="${1:-}"
1100
+ if [[ -z "$sub_or_issue" || "$sub_or_issue" == "help" || "$sub_or_issue" == "--help" || "$sub_or_issue" == "-h" ]]; then
1101
+ _launch_worker_usage
1102
+ return 0
1103
+ fi
1104
+
1105
+ if [[ "$sub_or_issue" == "status" ]]; then
1106
+ shift || true
1107
+ _launch_worker_status "$@"
1108
+ return $?
1109
+ fi
1110
+
1111
+ local issue_spec=""
1112
+ local repo_slug=""
1113
+ local batch_spec=""
1114
+ local -a helper_opts=()
1115
+ while [[ $# -gt 0 ]]; do
1116
+ local arg="$1"
1117
+ case "$arg" in
1118
+ --batch)
1119
+ if [[ $# -lt 2 || -z "${2:-}" || "${2:-}" == --* ]]; then
1120
+ print_error "--batch requires a comma-separated issue list"
1121
+ return 2
1122
+ fi
1123
+ batch_spec="${2}"
1124
+ shift 2
1125
+ ;;
1126
+ --model | --agent)
1127
+ if [[ $# -lt 2 || -z "${2:-}" || "${2:-}" == --* ]]; then
1128
+ print_error "$arg requires a value"
1129
+ return 2
1130
+ fi
1131
+ helper_opts+=("$arg" "${2}")
1132
+ shift 2
1133
+ ;;
1134
+ --dry-run | --no-ceremony)
1135
+ helper_opts+=("$arg")
1136
+ shift
1137
+ ;;
1138
+ --help | -h)
1139
+ _launch_worker_usage
1140
+ return 0
1141
+ ;;
1142
+ --*)
1143
+ print_error "Unknown launch-worker flag: $arg"
1144
+ return 2
1145
+ ;;
1146
+ *)
1147
+ if [[ -z "$issue_spec" ]]; then
1148
+ issue_spec="$arg"
1149
+ elif [[ -z "$repo_slug" ]]; then
1150
+ repo_slug="$arg"
1151
+ else
1152
+ print_error "Unexpected launch-worker argument: $arg"
1153
+ return 2
1154
+ fi
1155
+ shift
1156
+ ;;
1157
+ esac
1158
+ done
1159
+
1160
+ [[ -n "$batch_spec" ]] && issue_spec="$batch_spec"
1161
+ if [[ -z "$issue_spec" ]]; then
1162
+ print_error "launch-worker requires an issue number or --batch list"
1163
+ return 2
1164
+ fi
1165
+ if [[ -z "$repo_slug" ]]; then
1166
+ repo_slug=$(_launch_worker_default_repo) || {
1167
+ print_error "Could not infer owner/repo from git remote; pass it explicitly"
1168
+ return 2
1169
+ }
1170
+ fi
1171
+ if [[ ! "$repo_slug" =~ ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ ]]; then
1172
+ print_error "Repo slug must be owner/repo format: $repo_slug"
1173
+ return 2
1174
+ fi
1175
+
1176
+ local old_ifs="$IFS"
1177
+ IFS=','
1178
+ local -a issues=()
1179
+ read -r -a issues <<<"$issue_spec"
1180
+ IFS="$old_ifs"
1181
+
1182
+ local helper_path
1183
+ helper_path=$(_launch_worker_helper_path) || return 1
1184
+
1185
+ local issue rc=0
1186
+ for issue in "${issues[@]}"; do
1187
+ if [[ ! "$issue" =~ ^[0-9]+$ ]]; then
1188
+ print_error "Issue number must be numeric: $issue"
1189
+ rc=2
1190
+ continue
1191
+ fi
1192
+ bash "$helper_path" dispatch "$issue" "$repo_slug" "${helper_opts[@]}" || rc=$?
1193
+ echo "Status: aidevops launch-worker status $issue $repo_slug"
1194
+ done
1195
+ return "$rc"
1196
+ }
1197
+
1031
1198
  # Emit tip if the current directory has aidevops but isn't registered
1032
1199
  _main_check_unregistered() {
1033
1200
  local command="$1"
@@ -1229,6 +1396,7 @@ main() {
1229
1396
  sources | agent-sources) _dispatch_helper "agent-sources-helper.sh" "agent-sources-helper.sh" "$@" ;;
1230
1397
  plugin | plugins) cmd_plugin "$@" ;;
1231
1398
  pulse) _dispatch_helper "pulse-session-helper.sh" "pulse-session-helper.sh" "$@" ;;
1399
+ launch-worker | launch_worker) cmd_launch_worker "$@" ;;
1232
1400
  check-workflows | workflows) _dispatch_helper "check-workflows-helper.sh" "check-workflows-helper.sh" "$@" ;;
1233
1401
  sync-workflows) _dispatch_helper "sync-workflows-helper.sh" "sync-workflows-helper.sh" "$@" ;;
1234
1402
  badges)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "3.13.89",
3
+ "version": "3.13.91",
4
4
  "description": "AI DevOps Framework - AI-assisted development workflows, code quality, and deployment automation",
5
5
  "type": "module",
6
6
  "bin": {
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.89
15
+ # Version: 3.13.91
16
16
  #
17
17
  # Quick Install:
18
18
  # npm install -g aidevops && aidevops update (recommended)