aidevops 2.100.3 → 2.100.5
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.sh +74 -34
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.100.
|
|
1
|
+
2.100.5
|
package/aidevops.sh
CHANGED
package/package.json
CHANGED
package/setup.sh
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# AI Assistant Server Access Framework Setup Script
|
|
4
4
|
# Helps developers set up the framework for their infrastructure
|
|
5
5
|
#
|
|
6
|
-
# Version: 2.100.
|
|
6
|
+
# Version: 2.100.5
|
|
7
7
|
#
|
|
8
8
|
# Quick Install (one-liner):
|
|
9
9
|
# bash <(curl -fsSL https://aidevops.dev/install)
|
|
@@ -28,6 +28,23 @@ print_success() { echo -e "${GREEN}[SUCCESS]${NC} $1"; }
|
|
|
28
28
|
print_warning() { echo -e "${YELLOW}[WARNING]${NC} $1"; }
|
|
29
29
|
print_error() { echo -e "${RED}[ERROR]${NC} $1"; }
|
|
30
30
|
|
|
31
|
+
# Find OpenCode config file (checks multiple possible locations)
|
|
32
|
+
# Returns: path to config file, or empty string if not found
|
|
33
|
+
find_opencode_config() {
|
|
34
|
+
local candidates=(
|
|
35
|
+
"$HOME/.config/opencode/opencode.json" # XDG standard (Linux, some macOS)
|
|
36
|
+
"$HOME/.opencode/opencode.json" # Alternative location
|
|
37
|
+
"$HOME/Library/Application Support/opencode/opencode.json" # macOS standard
|
|
38
|
+
)
|
|
39
|
+
for candidate in "${candidates[@]}"; do
|
|
40
|
+
if [[ -f "$candidate" ]]; then
|
|
41
|
+
echo "$candidate"
|
|
42
|
+
return 0
|
|
43
|
+
fi
|
|
44
|
+
done
|
|
45
|
+
return 1
|
|
46
|
+
}
|
|
47
|
+
|
|
31
48
|
# Find best python3 binary (prefer Homebrew/pyenv over system)
|
|
32
49
|
find_python3() {
|
|
33
50
|
local candidates=(
|
|
@@ -174,7 +191,8 @@ cleanup_deprecated_paths() {
|
|
|
174
191
|
# Remove deprecated MCP entries from opencode.json
|
|
175
192
|
# These MCPs have been replaced by curl-based subagents (zero context cost)
|
|
176
193
|
cleanup_deprecated_mcps() {
|
|
177
|
-
local opencode_config
|
|
194
|
+
local opencode_config
|
|
195
|
+
opencode_config=$(find_opencode_config) || return 0
|
|
178
196
|
|
|
179
197
|
if [[ ! -f "$opencode_config" ]]; then
|
|
180
198
|
return 0
|
|
@@ -309,7 +327,8 @@ cleanup_deprecated_mcps() {
|
|
|
309
327
|
# - google-analytics-mcp: ~800 tokens - enable via @google-analytics subagent
|
|
310
328
|
# - context7: ~800 tokens - enable via @context7 subagent (for library docs lookup)
|
|
311
329
|
disable_ondemand_mcps() {
|
|
312
|
-
local opencode_config
|
|
330
|
+
local opencode_config
|
|
331
|
+
opencode_config=$(find_opencode_config) || return 0
|
|
313
332
|
|
|
314
333
|
if [[ ! -f "$opencode_config" ]]; then
|
|
315
334
|
return 0
|
|
@@ -505,8 +524,9 @@ bootstrap_repo() {
|
|
|
505
524
|
# Detect if running from curl (no script directory context)
|
|
506
525
|
local script_path="${BASH_SOURCE[0]}"
|
|
507
526
|
|
|
508
|
-
# If script_path is empty or
|
|
509
|
-
|
|
527
|
+
# If script_path is empty, stdin, bash, or /dev/fd/* (process substitution), we're running from curl
|
|
528
|
+
# bash <(curl ...) produces paths like /dev/fd/63
|
|
529
|
+
if [[ -z "$script_path" || "$script_path" == "/dev/stdin" || "$script_path" == "bash" || "$script_path" == /dev/fd/* ]]; then
|
|
510
530
|
print_info "Remote install detected - bootstrapping repository..."
|
|
511
531
|
|
|
512
532
|
# Check for git
|
|
@@ -978,11 +998,16 @@ setup_worktrunk() {
|
|
|
978
998
|
|
|
979
999
|
# Install shell integration
|
|
980
1000
|
print_info "Installing shell integration..."
|
|
981
|
-
|
|
1001
|
+
local wt_shell_output
|
|
1002
|
+
if wt_shell_output=$(wt config shell install 2>&1); then
|
|
982
1003
|
print_success "Shell integration installed"
|
|
983
1004
|
print_info "Restart your terminal or source your shell config"
|
|
984
1005
|
else
|
|
1006
|
+
# Show the actual error for debugging
|
|
985
1007
|
print_warning "Shell integration failed - run manually: wt config shell install"
|
|
1008
|
+
if [[ -n "$wt_shell_output" ]]; then
|
|
1009
|
+
echo "$wt_shell_output" | head -3 | sed 's/^/ /'
|
|
1010
|
+
fi
|
|
986
1011
|
fi
|
|
987
1012
|
|
|
988
1013
|
echo ""
|
|
@@ -1363,10 +1388,10 @@ setup_configs() {
|
|
|
1363
1388
|
set_permissions() {
|
|
1364
1389
|
print_info "Setting proper file permissions..."
|
|
1365
1390
|
|
|
1366
|
-
# Make scripts executable
|
|
1367
|
-
chmod +x ./*.sh
|
|
1368
|
-
chmod +x .agent/scripts/*.sh
|
|
1369
|
-
chmod +x ssh/*.sh
|
|
1391
|
+
# Make scripts executable (suppress errors for missing paths)
|
|
1392
|
+
chmod +x ./*.sh 2>/dev/null || true
|
|
1393
|
+
chmod +x .agent/scripts/*.sh 2>/dev/null || true
|
|
1394
|
+
chmod +x ssh/*.sh 2>/dev/null || true
|
|
1370
1395
|
|
|
1371
1396
|
# Secure configuration files
|
|
1372
1397
|
chmod 600 configs/*.json 2>/dev/null || true
|
|
@@ -2047,13 +2072,14 @@ inject_agents_reference() {
|
|
|
2047
2072
|
update_opencode_config() {
|
|
2048
2073
|
print_info "Updating OpenCode configuration..."
|
|
2049
2074
|
|
|
2050
|
-
local opencode_config
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
print_info "OpenCode config not found at $opencode_config - skipping"
|
|
2075
|
+
local opencode_config
|
|
2076
|
+
if ! opencode_config=$(find_opencode_config); then
|
|
2077
|
+
print_info "OpenCode config not found (checked ~/.config/opencode/, ~/.opencode/, ~/Library/Application Support/opencode/) - skipping"
|
|
2054
2078
|
return 0
|
|
2055
2079
|
fi
|
|
2056
2080
|
|
|
2081
|
+
print_info "Found OpenCode config at: $opencode_config"
|
|
2082
|
+
|
|
2057
2083
|
# Create backup (with rotation)
|
|
2058
2084
|
create_backup_with_rotation "$opencode_config" "opencode"
|
|
2059
2085
|
|
|
@@ -2318,7 +2344,8 @@ resolve_mcp_binary_path() {
|
|
|
2318
2344
|
# Update opencode.json MCP commands to use full binary paths
|
|
2319
2345
|
# This ensures MCPs start regardless of PATH configuration
|
|
2320
2346
|
update_mcp_paths_in_opencode() {
|
|
2321
|
-
local opencode_config
|
|
2347
|
+
local opencode_config
|
|
2348
|
+
opencode_config=$(find_opencode_config) || return 0
|
|
2322
2349
|
|
|
2323
2350
|
if [[ ! -f "$opencode_config" ]]; then
|
|
2324
2351
|
return 0
|
|
@@ -2617,16 +2644,28 @@ setup_beads_ui() {
|
|
|
2617
2644
|
|
|
2618
2645
|
local installed_count=0
|
|
2619
2646
|
|
|
2620
|
-
# beads_viewer (Python)
|
|
2621
|
-
if command -v pip3 &> /dev/null || command -v pip &> /dev/null; then
|
|
2647
|
+
# beads_viewer (Python) - use pipx for isolated install
|
|
2648
|
+
if command -v pipx &> /dev/null || command -v pip3 &> /dev/null || command -v pip &> /dev/null; then
|
|
2622
2649
|
read -r -p " Install beads_viewer (Python TUI with graph analytics)? (y/n): " install_viewer
|
|
2623
2650
|
if [[ "$install_viewer" == "y" ]]; then
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2651
|
+
if command -v pipx &> /dev/null; then
|
|
2652
|
+
print_info "Installing beads_viewer via pipx..."
|
|
2653
|
+
if pipx install beads-viewer 2>/dev/null; then
|
|
2654
|
+
print_success "beads_viewer installed (run: beads-viewer)"
|
|
2655
|
+
((installed_count++))
|
|
2656
|
+
else
|
|
2657
|
+
print_warning "Failed to install beads_viewer"
|
|
2658
|
+
print_info "Try manually: pipx install beads-viewer"
|
|
2659
|
+
fi
|
|
2628
2660
|
else
|
|
2629
|
-
|
|
2661
|
+
print_info "Installing beads_viewer..."
|
|
2662
|
+
if pip3 install --user beads-viewer 2>/dev/null || pip install --user beads-viewer 2>/dev/null; then
|
|
2663
|
+
print_success "beads_viewer installed"
|
|
2664
|
+
((installed_count++))
|
|
2665
|
+
else
|
|
2666
|
+
print_warning "Failed to install beads_viewer"
|
|
2667
|
+
print_info "On macOS, install pipx first: brew install pipx && pipx ensurepath"
|
|
2668
|
+
fi
|
|
2630
2669
|
fi
|
|
2631
2670
|
fi
|
|
2632
2671
|
fi
|
|
@@ -2760,11 +2799,14 @@ setup_browser_tools() {
|
|
|
2760
2799
|
|
|
2761
2800
|
if [[ "$install_playwright" == "y" ]]; then
|
|
2762
2801
|
print_info "Installing Playwright browsers..."
|
|
2763
|
-
|
|
2802
|
+
# Use -y to auto-confirm npx install, suppress the "install without dependencies" warning
|
|
2803
|
+
# Use PIPESTATUS to check npx exit code, not grep's exit code
|
|
2804
|
+
npx -y playwright@latest install 2>&1 | grep -v "WARNING: It looks like you are running"
|
|
2805
|
+
if [[ ${PIPESTATUS[0]} -eq 0 ]]; then
|
|
2764
2806
|
print_success "Playwright browsers installed"
|
|
2765
2807
|
else
|
|
2766
2808
|
print_warning "Playwright browser installation failed"
|
|
2767
|
-
print_info "Run manually: npx playwright install"
|
|
2809
|
+
print_info "Run manually: npx -y playwright@latest install"
|
|
2768
2810
|
fi
|
|
2769
2811
|
else
|
|
2770
2812
|
print_info "Skipped Playwright installation"
|
|
@@ -2887,8 +2929,6 @@ add_opencode_plugin() {
|
|
|
2887
2929
|
setup_opencode_plugins() {
|
|
2888
2930
|
print_info "Setting up OpenCode plugins..."
|
|
2889
2931
|
|
|
2890
|
-
local opencode_config="$HOME/.config/opencode/opencode.json"
|
|
2891
|
-
|
|
2892
2932
|
# Check if OpenCode is installed
|
|
2893
2933
|
if ! command -v opencode &> /dev/null; then
|
|
2894
2934
|
print_warning "OpenCode not found - plugin setup skipped"
|
|
@@ -2897,8 +2937,9 @@ setup_opencode_plugins() {
|
|
|
2897
2937
|
fi
|
|
2898
2938
|
|
|
2899
2939
|
# Check if config exists
|
|
2900
|
-
|
|
2901
|
-
|
|
2940
|
+
local opencode_config
|
|
2941
|
+
if ! opencode_config=$(find_opencode_config); then
|
|
2942
|
+
print_warning "OpenCode config not found - plugin setup skipped"
|
|
2902
2943
|
return 0
|
|
2903
2944
|
fi
|
|
2904
2945
|
|
|
@@ -2940,8 +2981,6 @@ setup_opencode_plugins() {
|
|
|
2940
2981
|
setup_oh_my_opencode() {
|
|
2941
2982
|
print_info "Setting up Oh-My-OpenCode plugin..."
|
|
2942
2983
|
|
|
2943
|
-
local opencode_config="$HOME/.config/opencode/opencode.json"
|
|
2944
|
-
|
|
2945
2984
|
# Check if OpenCode is installed
|
|
2946
2985
|
if ! command -v opencode &> /dev/null; then
|
|
2947
2986
|
print_warning "OpenCode not found - Oh-My-OpenCode setup skipped"
|
|
@@ -2949,7 +2988,8 @@ setup_oh_my_opencode() {
|
|
|
2949
2988
|
fi
|
|
2950
2989
|
|
|
2951
2990
|
# Check if config exists
|
|
2952
|
-
|
|
2991
|
+
local opencode_config
|
|
2992
|
+
if ! opencode_config=$(find_opencode_config); then
|
|
2953
2993
|
print_warning "OpenCode config not found - Oh-My-OpenCode setup skipped"
|
|
2954
2994
|
return 0
|
|
2955
2995
|
fi
|
|
@@ -3085,12 +3125,12 @@ setup_seo_mcps() {
|
|
|
3085
3125
|
setup_google_analytics_mcp() {
|
|
3086
3126
|
print_info "Setting up Google Analytics MCP..."
|
|
3087
3127
|
|
|
3088
|
-
local opencode_config="$HOME/.config/opencode/opencode.json"
|
|
3089
3128
|
local gsc_creds="$HOME/.config/aidevops/gsc-credentials.json"
|
|
3090
3129
|
|
|
3091
3130
|
# Check if opencode.json exists
|
|
3092
|
-
|
|
3093
|
-
|
|
3131
|
+
local opencode_config
|
|
3132
|
+
if ! opencode_config=$(find_opencode_config); then
|
|
3133
|
+
print_warning "OpenCode config not found - skipping Google Analytics MCP"
|
|
3094
3134
|
return 0
|
|
3095
3135
|
fi
|
|
3096
3136
|
|