aidevops 3.1.117 → 3.1.119

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.1.117
1
+ 3.1.119
package/aidevops.sh CHANGED
@@ -3,7 +3,7 @@
3
3
  # AI DevOps Framework CLI
4
4
  # Usage: aidevops <command> [options]
5
5
  #
6
- # Version: 3.1.117
6
+ # Version: 3.1.119
7
7
 
8
8
  set -euo pipefail
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "3.1.117",
3
+ "version": "3.1.119",
4
4
  "description": "AI DevOps Framework - AI-assisted development workflows, code quality, and deployment automation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,167 @@
1
+ #!/usr/bin/env bash
2
+ # Post-setup functions: auto-update enablement, final instructions, onboarding prompt.
3
+ # Part of aidevops setup.sh modularization (GH#5793)
4
+
5
+ # Shell safety baseline
6
+ set -Eeuo pipefail
7
+ IFS=$'\n\t'
8
+ # shellcheck disable=SC2154 # rc is assigned by $? in the trap string
9
+ trap 'rc=$?; echo "[ERROR] ${BASH_SOURCE[0]}:${LINENO} exit $rc" >&2' ERR
10
+ shopt -s inherit_errexit 2>/dev/null || true
11
+
12
+ # Enable auto-update if not already enabled.
13
+ # Check both launchd (macOS) and cron (Linux) for existing installation.
14
+ # Respects config: aidevops config set updates.auto_update false
15
+ setup_auto_update() {
16
+ local auto_update_script="$HOME/.aidevops/agents/scripts/auto-update-helper.sh"
17
+ if ! [[ -x "$auto_update_script" ]] || ! is_feature_enabled auto_update 2>/dev/null; then
18
+ return 0
19
+ fi
20
+
21
+ local _auto_update_installed=false
22
+ if _scheduler_detect_installed \
23
+ "Auto-update" \
24
+ "com.aidevops.aidevops-auto-update" \
25
+ "com.aidevops.auto-update" \
26
+ "aidevops-auto-update" \
27
+ "$auto_update_script" \
28
+ "enable" \
29
+ "aidevops auto-update enable"; then
30
+ _auto_update_installed=true
31
+ fi
32
+ if [[ "$_auto_update_installed" == "false" ]]; then
33
+ if [[ "$NON_INTERACTIVE" == "true" ]]; then
34
+ # Non-interactive: enable silently
35
+ bash "$auto_update_script" enable >/dev/null 2>&1 || true
36
+ print_info "Auto-update enabled (every 10 min). Disable: aidevops auto-update disable"
37
+ else
38
+ echo ""
39
+ echo "Auto-update keeps aidevops current by checking every 10 minutes."
40
+ echo "Safe to run while AI sessions are active."
41
+ echo ""
42
+ read -r -p "Enable auto-update? [Y/n]: " enable_auto
43
+ if [[ "$enable_auto" =~ ^[Yy]?$ ]]; then
44
+ bash "$auto_update_script" enable
45
+ else
46
+ print_info "Skipped. Enable later: aidevops auto-update enable"
47
+ fi
48
+ fi
49
+ fi
50
+ return 0
51
+ }
52
+
53
+ # Print final setup instructions and feature summary.
54
+ print_final_instructions() {
55
+ echo ""
56
+ echo "CLI Command:"
57
+ echo " aidevops init - Initialize aidevops in a project"
58
+ echo " aidevops features - List available features"
59
+ echo " aidevops status - Check installation status"
60
+ echo " aidevops update - Update to latest version"
61
+ echo " aidevops update-tools - Check for and update installed tools"
62
+ echo " aidevops uninstall - Remove aidevops"
63
+ echo ""
64
+ echo "Deployed to:"
65
+ echo " ~/.aidevops/agents/ - Agent files (main agents, subagents, scripts)"
66
+ echo " ~/.aidevops/*-backups/ - Backups with rotation (keeps last $BACKUP_KEEP_COUNT)"
67
+ echo ""
68
+ echo "Next steps:"
69
+ echo "1. Review config templates in configs/ (keep as placeholders — never store real credentials there)"
70
+ echo "2. Setup Git CLI tools and authentication (shown during setup)"
71
+ echo "3. Setup API keys: bash ~/.aidevops/agents/scripts/setup-local-api-keys.sh setup"
72
+ echo "4. Test access: bash ~/.aidevops/agents/scripts/servers-helper.sh list"
73
+ echo "5. Enable orchestration: see runners.md 'Pulse Scheduler Setup' (autonomous task dispatch)"
74
+ echo "6. Read documentation: ~/.aidevops/agents/AGENTS.md"
75
+ echo ""
76
+ echo "For development on aidevops framework itself:"
77
+ echo " See ~/Git/aidevops/AGENTS.md"
78
+ echo ""
79
+ echo "OpenCode Primary Agents (12 total, Tab to switch):"
80
+ echo "• Plan+ - Enhanced planning with context tools (read-only)"
81
+ echo "• Build+ - Enhanced build with context tools (full access)"
82
+ echo "• Accounts, AI-DevOps, Content, Health, Legal, Marketing,"
83
+ echo " Research, Sales, SEO, WordPress"
84
+ echo ""
85
+ echo "Agent Skills (SKILL.md):"
86
+ echo "• 21 SKILL.md files generated in ~/.aidevops/agents/"
87
+ echo "• Skills include: wordpress, seo, aidevops, build-mcp, and more"
88
+ echo ""
89
+ echo "MCP Integrations (OpenCode):"
90
+ echo "• Augment Context Engine - Cloud semantic codebase retrieval"
91
+ echo "• Context7 - Real-time library documentation"
92
+ echo "• GSC - Google Search Console (MCP + OAuth2)"
93
+ echo "• Google Analytics - Analytics data (shared GSC credentials)"
94
+ echo ""
95
+ echo "SEO Integrations (curl subagents - no MCP overhead):"
96
+ echo "• DataForSEO - Comprehensive SEO data APIs"
97
+ echo "• Serper - Google Search API"
98
+ echo "• Ahrefs - Backlink and keyword data"
99
+ echo ""
100
+ echo "DSPy & DSPyGround Integration:"
101
+ echo "• ./.agents/scripts/dspy-helper.sh - DSPy prompt optimization toolkit"
102
+ echo "• ./.agents/scripts/dspyground-helper.sh - DSPyGround playground interface"
103
+ echo "• python-env/dspy-env/ - Python virtual environment for DSPy"
104
+ echo "• data/dspy/ - DSPy projects and datasets"
105
+ echo "• data/dspyground/ - DSPyGround projects and configurations"
106
+ echo ""
107
+ echo "Task Management:"
108
+ echo "• Beads CLI (bd) - Task graph visualization"
109
+ echo "• beads-sync-helper.sh - Sync TODO.md/PLANS.md with Beads"
110
+ echo "• todo-ready.sh - Show tasks with no open blockers"
111
+ echo "• Run: aidevops init beads - Initialize Beads in a project"
112
+ echo ""
113
+ echo "Autonomous Orchestration:"
114
+ echo "• Supervisor pulse - Dispatches workers, merges PRs, evaluates results"
115
+ echo "• Auto-pickup - Workers claim #auto-dispatch tasks from TODO.md"
116
+ echo "• Cross-repo visibility - Manages tasks across all repos in repos.json"
117
+ echo "• Strategic review (opus) - 4-hourly queue health, root cause analysis"
118
+ echo "• Model routing - Cost-aware: local>haiku>flash>sonnet>pro>opus"
119
+ echo "• Budget tracking - Per-provider spend limits, subscription-aware"
120
+ echo "• Session miner - Extracts learning from past sessions"
121
+ echo "• Circuit breaker - Pauses dispatch on consecutive failures"
122
+ echo ""
123
+ echo " Supervisor pulse (autonomous orchestration) requires explicit consent."
124
+ echo " Enable: aidevops config set orchestration.supervisor_pulse true && ./setup.sh"
125
+ echo ""
126
+ echo " Run /onboarding in your AI assistant to configure services interactively."
127
+ echo ""
128
+ echo "Security reminders:"
129
+ echo "- Never commit configuration files with real credentials"
130
+ echo "- Use strong passwords and enable MFA on all accounts"
131
+ echo "- Regularly rotate API tokens and SSH keys"
132
+ echo ""
133
+ echo "Happy server managing! 🚀"
134
+ echo ""
135
+ return 0
136
+ }
137
+
138
+ # Offer to launch onboarding for new users (only if not running inside OpenCode
139
+ # and not non-interactive).
140
+ # Respects config: aidevops config set ui.onboarding_prompt false
141
+ setup_onboarding_prompt() {
142
+ if [[ "$NON_INTERACTIVE" != "true" ]] && [[ -z "${OPENCODE_SESSION:-}" ]] && is_feature_enabled onboarding_prompt 2>/dev/null && command -v opencode &>/dev/null; then
143
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
144
+ echo ""
145
+ echo "Ready to configure your services?"
146
+ echo ""
147
+ echo "Launch OpenCode with the onboarding wizard to:"
148
+ echo " - See which services are already configured"
149
+ echo " - Get personalized recommendations based on your work"
150
+ echo " - Set up API keys and credentials interactively"
151
+ echo ""
152
+ read -r -p "Launch OpenCode with /onboarding now? [Y/n]: " launch_onboarding
153
+ if [[ "$launch_onboarding" =~ ^[Yy]?$ ]]; then
154
+ echo ""
155
+ echo "Starting OpenCode with onboarding wizard..."
156
+ # Launch with /onboarding prompt only — don't use --agent flag because
157
+ # the "Onboarding" agent only exists after generate-opencode-agents.sh
158
+ # writes to opencode.json, which requires opencode.json to already exist.
159
+ # On first run it won't, so --agent "Onboarding" causes a fatal error.
160
+ opencode --prompt "/onboarding"
161
+ else
162
+ echo ""
163
+ echo "You can run /onboarding anytime in OpenCode to configure services."
164
+ fi
165
+ fi
166
+ return 0
167
+ }