loki-mode 7.5.16 → 7.5.27

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.
Files changed (47) hide show
  1. package/README.md +10 -9
  2. package/SKILL.md +14 -14
  3. package/VERSION +1 -1
  4. package/autonomy/completion-council.sh +38 -9
  5. package/autonomy/lib/claude-flags.sh +132 -0
  6. package/autonomy/lib/mcp-config.sh +160 -0
  7. package/autonomy/lib/project-graph.sh +675 -0
  8. package/autonomy/lib/voter-agents.sh +356 -0
  9. package/autonomy/loki +72 -100
  10. package/autonomy/run.sh +95 -186
  11. package/bin/loki +10 -0
  12. package/dashboard/__init__.py +1 -1
  13. package/dashboard/requirements.txt +13 -8
  14. package/dashboard/server.py +53 -22
  15. package/dashboard/static/index.html +298 -299
  16. package/docs/INSTALLATION.md +54 -21
  17. package/docs/retrospectives/v7.5.15-fleet-postmortem.md +325 -0
  18. package/docs/retrospectives/v7.5.15-honesty-audit.md +136 -0
  19. package/docs/retrospectives/v7.5.15-llm-failure-modes.md +49 -0
  20. package/loki-ts/data/finding-schema.json +74 -0
  21. package/loki-ts/data/model-pricing.json +12 -0
  22. package/loki-ts/dist/loki.js +109 -108
  23. package/mcp/__init__.py +1 -1
  24. package/mcp/lsp_proxy.py +713 -0
  25. package/mcp/requirements.txt +9 -3
  26. package/mcp/tests/__init__.py +0 -0
  27. package/mcp/tests/test_lsp_proxy.py +377 -0
  28. package/memory/app_graph.py +153 -0
  29. package/memory/storage.py +6 -1
  30. package/memory/tests/test_app_graph.py +134 -0
  31. package/package.json +4 -3
  32. package/providers/claude.sh +115 -4
  33. package/providers/codex.sh +2 -2
  34. package/providers/loader.sh +4 -4
  35. package/providers/model_catalog.json +0 -9
  36. package/providers/models.sh +1 -2
  37. package/references/multi-provider.md +26 -35
  38. package/references/prompt-repetition.md +1 -1
  39. package/references/quality-control.md +1 -1
  40. package/skills/00-index.md +3 -3
  41. package/skills/model-selection.md +11 -14
  42. package/skills/providers.md +17 -57
  43. package/skills/quality-gates.md +2 -2
  44. package/skills/troubleshooting.md +1 -1
  45. package/src/integrations/github/action-handler.js +3 -2
  46. package/src/protocols/tools/start-project.js +1 -1
  47. package/providers/gemini.sh +0 -343
package/autonomy/loki CHANGED
@@ -479,7 +479,7 @@ show_help() {
479
479
  echo " help Show this help"
480
480
  echo ""
481
481
  echo "Options for 'start':"
482
- echo " --provider NAME AI provider: claude (default), codex, gemini, cline, aider"
482
+ echo " --provider NAME AI provider: claude (default), codex, cline, aider"
483
483
  echo " --parallel Enable parallel mode with git worktrees"
484
484
  echo " --bg, --background Run in background mode"
485
485
  echo " --simple Force simple complexity tier (3 phases)"
@@ -497,7 +497,7 @@ show_help() {
497
497
  echo " --dry-run Preview generated PRD without starting"
498
498
  echo " --no-start Generate PRD but don't start execution"
499
499
  echo " --output FILE Save PRD to custom path"
500
- echo " --provider NAME AI provider: claude (default), codex, gemini, cline, aider"
500
+ echo " --provider NAME AI provider: claude (default), codex, cline, aider"
501
501
  echo " --parallel Enable parallel mode with git worktrees"
502
502
  echo " --budget USD Set cost budget limit"
503
503
  echo ""
@@ -666,7 +666,7 @@ cmd_start() {
666
666
  echo " --issue URL|NUM Force issue mode with URL or number"
667
667
  echo ""
668
668
  echo "Options:"
669
- echo " --provider NAME AI provider: claude (default), codex, gemini, cline, aider"
669
+ echo " --provider NAME AI provider: claude (default), codex, cline, aider"
670
670
  echo " --parallel Enable parallel mode with git worktrees"
671
671
  echo " --bg, --background Run in background mode"
672
672
  echo " --simple Force simple complexity tier (3 phases)"
@@ -733,7 +733,7 @@ cmd_start() {
733
733
  args+=("--provider" "$provider")
734
734
  shift 2
735
735
  else
736
- echo -e "${RED}--provider requires a value (claude, codex, gemini, cline, aider)${NC}"
736
+ echo -e "${RED}--provider requires a value (claude, codex, cline, aider)${NC}"
737
737
  exit 1
738
738
  fi
739
739
  ;;
@@ -1446,7 +1446,7 @@ cmd_start() {
1446
1446
  --action "provider_selection" \
1447
1447
  --key "provider" \
1448
1448
  --value "$provider" \
1449
- --rejected '["'"$([ "$provider" != "claude" ] && echo "claude" || echo "codex")'", "'"$([ "$provider" != "gemini" ] && echo "gemini" || echo "codex")'"]' \
1449
+ --rejected '["'"$([ "$provider" != "claude" ] && echo "claude" || echo "codex")'", "'"$([ "$provider" != "cline" ] && echo "cline" || echo "aider")'"]' \
1450
1450
  --confidence 0.95
1451
1451
  fi
1452
1452
 
@@ -1467,7 +1467,6 @@ cmd_start() {
1467
1467
  case "$effective_provider" in
1468
1468
  claude) echo " npm install -g @anthropic-ai/claude-code" ;;
1469
1469
  codex) echo " npm install -g @openai/codex" ;;
1470
- gemini) echo " npm install -g @google/gemini-cli" ;;
1471
1470
  cline) echo " npm install -g @anthropic-ai/cline" ;;
1472
1471
  aider) echo " pip install aider-chat" ;;
1473
1472
  *) echo " Check the provider documentation for installation." ;;
@@ -1485,6 +1484,18 @@ cmd_start() {
1485
1484
  sleep 2
1486
1485
  fi
1487
1486
 
1487
+ # Phase F (v7.5.23): cross-project context discovery. Walks ONE parent
1488
+ # level looking for sibling repos sharing a `.loki/app.json` marker.
1489
+ # Exports LOKI_PROJECT_GRAPH_{ROOT,APP_ID,MEMBERS} which survive exec
1490
+ # into run.sh. Silent no-op when no graph is found (backward compat).
1491
+ local _pg_helper="$SKILL_DIR/autonomy/lib/project-graph.sh"
1492
+ if [ -f "$_pg_helper" ]; then
1493
+ # shellcheck disable=SC1090
1494
+ . "$_pg_helper"
1495
+ local _pg_target="${LOKI_TARGET_DIR:-$(pwd)}"
1496
+ loki_project_graph_discover "$_pg_target" || true
1497
+ fi
1498
+
1488
1499
  exec "$RUN_SH" "${args[@]}"
1489
1500
  }
1490
1501
 
@@ -2044,7 +2055,7 @@ cmd_status() {
2044
2055
  # Show provider with capability
2045
2056
  local capability="full features"
2046
2057
  case "$current_provider" in
2047
- codex|gemini|aider)
2058
+ codex|aider)
2048
2059
  capability="degraded mode"
2049
2060
  ;;
2050
2061
  cline)
@@ -2052,7 +2063,7 @@ cmd_status() {
2052
2063
  ;;
2053
2064
  esac
2054
2065
  echo -e "${CYAN}Provider:${NC} $current_provider ($capability)"
2055
- echo -e "${DIM} Switch with: loki provider set <claude|codex|gemini|cline|aider>${NC}"
2066
+ echo -e "${DIM} Switch with: loki provider set <claude|codex|cline|aider>${NC}"
2056
2067
  echo ""
2057
2068
 
2058
2069
  # Show running sessions (v6.4.0 - concurrent session support)
@@ -2709,7 +2720,7 @@ cmd_provider() {
2709
2720
  echo " loki provider set claude"
2710
2721
  echo " loki provider set codex"
2711
2722
  echo " loki provider list"
2712
- echo " loki provider info gemini"
2723
+ echo " loki provider info codex"
2713
2724
  echo " loki provider models"
2714
2725
  ;;
2715
2726
  esac
@@ -2737,7 +2748,7 @@ cmd_provider_show() {
2737
2748
  cline)
2738
2749
  echo -e "${GREEN}Status:${NC} Near-full mode (subagents, MCP, 12+ providers)"
2739
2750
  ;;
2740
- codex|gemini|aider)
2751
+ codex|aider)
2741
2752
  echo -e "${YELLOW}Status:${NC} Degraded mode (sequential only)"
2742
2753
  ;;
2743
2754
  esac
@@ -2758,17 +2769,22 @@ cmd_provider_set() {
2758
2769
 
2759
2770
  if [ -z "$new_provider" ]; then
2760
2771
  echo -e "${RED}Error: Provider name required${NC}"
2761
- echo "Usage: loki provider set <claude|codex|gemini|cline|aider>"
2772
+ echo "Usage: loki provider set <claude|codex|cline|aider>"
2762
2773
  exit 1
2763
2774
  fi
2764
2775
 
2765
2776
  # Validate provider
2766
2777
  case "$new_provider" in
2767
- claude|codex|gemini|cline|aider)
2778
+ gemini)
2779
+ echo -e "${RED}Error: Provider 'gemini' is deprecated as of v7.5.18 and has been removed.${NC}"
2780
+ echo "Active providers: claude, codex, cline, aider"
2781
+ exit 1
2782
+ ;;
2783
+ claude|codex|cline|aider)
2768
2784
  ;;
2769
2785
  *)
2770
2786
  echo -e "${RED}Error: Invalid provider '$new_provider'${NC}"
2771
- echo "Valid providers: claude, codex, gemini, cline, aider"
2787
+ echo "Valid providers: claude, codex, cline, aider"
2772
2788
  exit 1
2773
2789
  ;;
2774
2790
  esac
@@ -2784,9 +2800,6 @@ cmd_provider_set() {
2784
2800
  codex)
2785
2801
  echo "Install: npm install -g @openai/codex"
2786
2802
  ;;
2787
- gemini)
2788
- echo "Install: npm install -g @google/gemini-cli"
2789
- ;;
2790
2803
  cline)
2791
2804
  echo "Install: npm install -g cline"
2792
2805
  ;;
@@ -2821,7 +2834,6 @@ cmd_provider_list() {
2821
2834
  # Check which CLIs are installed
2822
2835
  local claude_status="${RED}not installed${NC}"
2823
2836
  local codex_status="${RED}not installed${NC}"
2824
- local gemini_status="${RED}not installed${NC}"
2825
2837
  local cline_status="${RED}not installed${NC}"
2826
2838
  local aider_status="${RED}not installed${NC}"
2827
2839
 
@@ -2831,9 +2843,6 @@ cmd_provider_list() {
2831
2843
  if command -v codex &> /dev/null; then
2832
2844
  codex_status="${GREEN}installed${NC}"
2833
2845
  fi
2834
- if command -v gemini &> /dev/null; then
2835
- gemini_status="${GREEN}installed${NC}"
2836
- fi
2837
2846
  if command -v cline &> /dev/null; then
2838
2847
  cline_status="${GREEN}installed${NC}"
2839
2848
  fi
@@ -2850,10 +2859,6 @@ cmd_provider_list() {
2850
2859
  [ "$current" = "codex" ] && marker=" ${CYAN}(current)${NC}"
2851
2860
  echo -e " codex - Codex CLI (OpenAI) $codex_status$marker"
2852
2861
 
2853
- marker=""
2854
- [ "$current" = "gemini" ] && marker=" ${CYAN}(current)${NC}"
2855
- echo -e " gemini - Gemini CLI (Google) $gemini_status$marker"
2856
-
2857
2862
  marker=""
2858
2863
  [ "$current" = "cline" ] && marker=" ${CYAN}(current)${NC}"
2859
2864
  echo -e " cline - Cline (multi-provider) $cline_status$marker"
@@ -2899,18 +2904,6 @@ cmd_provider_info() {
2899
2904
  echo ""
2900
2905
  echo "Status: Degraded mode"
2901
2906
  ;;
2902
- gemini)
2903
- echo "Name: Gemini CLI"
2904
- echo "Vendor: Google"
2905
- echo "CLI: gemini"
2906
- echo "Flag: --approval-mode=yolo"
2907
- echo ""
2908
- echo "Features:"
2909
- echo " - Autonomous mode"
2910
- echo " - Sequential only (no subagents)"
2911
- echo ""
2912
- echo "Status: Degraded mode"
2913
- ;;
2914
2907
  cline)
2915
2908
  echo "Name: Cline CLI (Multi-Provider)"
2916
2909
  echo "Vendor: Cline (supports 12+ providers)"
@@ -2954,7 +2947,7 @@ cmd_provider_models() {
2954
2947
  echo -e "${BOLD}Model Configuration (resolved):${NC}"
2955
2948
  echo ""
2956
2949
 
2957
- local providers=("claude" "codex" "gemini" "cline" "aider")
2950
+ local providers=("claude" "codex" "cline" "aider")
2958
2951
  for provider in "${providers[@]}"; do
2959
2952
  local provider_file="$script_dir/providers/${provider}.sh"
2960
2953
  [ -f "$provider_file" ] || continue
@@ -3002,7 +2995,7 @@ cmd_provider_models() {
3002
2995
  fi
3003
2996
  fi
3004
2997
  else
3005
- # Multi-tier providers (claude, gemini): check provider-specific per-tier, then generic
2998
+ # Multi-tier providers (claude): check provider-specific per-tier, then generic
3006
2999
  local provider_var="LOKI_${provider_upper}_MODEL_${tier_upper}"
3007
3000
  local generic_var="LOKI_MODEL_${tier_upper}"
3008
3001
 
@@ -3034,14 +3027,6 @@ cmd_provider_models() {
3034
3027
  effort_d=$(bash -c "source '$provider_file' 2>/dev/null; echo \$PROVIDER_EFFORT_DEVELOPMENT")
3035
3028
  effort_f=$(bash -c "source '$provider_file' 2>/dev/null; echo \$PROVIDER_EFFORT_FAST")
3036
3029
  echo " Effort: planning=$effort_p, development=$effort_d, fast=$effort_f"
3037
- elif [ "$provider" = "gemini" ]; then
3038
- local think_p think_d think_f fb
3039
- think_p=$(bash -c "source '$provider_file' 2>/dev/null; echo \$PROVIDER_THINKING_PLANNING")
3040
- think_d=$(bash -c "source '$provider_file' 2>/dev/null; echo \$PROVIDER_THINKING_DEVELOPMENT")
3041
- think_f=$(bash -c "source '$provider_file' 2>/dev/null; echo \$PROVIDER_THINKING_FAST")
3042
- fb=$(bash -c "source '$provider_file' 2>/dev/null; echo \$PROVIDER_MODEL_FALLBACK")
3043
- echo " Thinking: planning=$think_p, development=$think_d, fast=$think_f"
3044
- echo " Fallback: $fb"
3045
3030
  fi
3046
3031
  echo ""
3047
3032
  done
@@ -4533,7 +4518,7 @@ cmd_run() {
4533
4518
  echo " --dry-run Preview generated PRD without starting"
4534
4519
  echo " --no-start Generate PRD but don't start execution"
4535
4520
  echo " --output FILE Save PRD to custom path"
4536
- echo " --provider NAME AI provider: claude (default), codex, gemini, cline, aider"
4521
+ echo " --provider NAME AI provider: claude (default), codex, cline, aider"
4537
4522
  echo " --parallel Enable parallel mode with git worktrees"
4538
4523
  echo " --bg, --background Run in background mode"
4539
4524
  echo " --simple Force simple complexity tier"
@@ -5021,7 +5006,7 @@ cmd_issue() {
5021
5006
  echo " --output FILE Save PRD to custom path (default: .loki/prd-issue-N.md)"
5022
5007
  echo ""
5023
5008
  echo "Options passed to 'start' (when --start is used):"
5024
- echo " --provider NAME AI provider: claude (default), codex, gemini, cline, aider"
5009
+ echo " --provider NAME AI provider: claude (default), codex, cline, aider"
5025
5010
  echo " --parallel Enable parallel mode with git worktrees"
5026
5011
  echo " --bg, --background Run in background mode"
5027
5012
  echo ""
@@ -5883,7 +5868,7 @@ cmd_config() {
5883
5868
  echo " model.planning Model for planning tier"
5884
5869
  echo " model.development Model for development tier"
5885
5870
  echo " model.fast Model for fast tier"
5886
- echo " provider Default AI provider: claude, codex, gemini, cline, aider"
5871
+ echo " provider Default AI provider: claude, codex, cline, aider"
5887
5872
  echo " issue.provider Default issue provider: github, gitlab, jira, azure_devops"
5888
5873
  echo " blind_validation Blind validation mode: true, false (default: true)"
5889
5874
  echo " adversarial_testing Adversarial testing: true, false (default: true)"
@@ -5942,8 +5927,12 @@ cmd_config_set() {
5942
5927
  ;;
5943
5928
  provider)
5944
5929
  case "$value" in
5945
- claude|codex|gemini|cline|aider) ;;
5946
- *) echo -e "${RED}Invalid provider: $value (expected: claude, codex, gemini, cline, aider)${NC}"; return 1 ;;
5930
+ gemini)
5931
+ echo -e "${RED}Invalid provider: 'gemini' is deprecated as of v7.5.18. Active providers: claude, codex, cline, aider${NC}"
5932
+ return 1
5933
+ ;;
5934
+ claude|codex|cline|aider) ;;
5935
+ *) echo -e "${RED}Invalid provider: $value (expected: claude, codex, cline, aider)${NC}"; return 1 ;;
5947
5936
  esac
5948
5937
  ;;
5949
5938
  issue.provider)
@@ -6268,7 +6257,6 @@ cmd_setup_skill() {
6268
6257
  local skill_targets=(
6269
6258
  "$HOME/.claude/skills/loki-mode:Claude Code"
6270
6259
  "$HOME/.codex/skills/loki-mode:Codex CLI"
6271
- "$HOME/.gemini/skills/loki-mode:Gemini CLI"
6272
6260
  "$HOME/.cline/skills/loki-mode:Cline CLI"
6273
6261
  "$HOME/.aider/skills/loki-mode:Aider CLI"
6274
6262
  )
@@ -6552,7 +6540,7 @@ cmd_doctor() {
6552
6540
  echo " --json Output machine-readable JSON"
6553
6541
  echo ""
6554
6542
  echo "Checks: node, python3, jq, git, curl, bash version,"
6555
- echo " claude/codex/gemini CLIs, and disk space."
6543
+ echo " claude/codex CLIs, and disk space."
6556
6544
  return 0
6557
6545
  ;;
6558
6546
  *)
@@ -6627,9 +6615,6 @@ cmd_doctor() {
6627
6615
  codex)
6628
6616
  version=$(codex --version 2>/dev/null | head -1 | sed 's/[^0-9.]//g' | head -1)
6629
6617
  ;;
6630
- gemini)
6631
- version=$(gemini --version 2>/dev/null | head -1 | sed 's/[^0-9.]//g' | head -1)
6632
- ;;
6633
6618
  cline)
6634
6619
  version=$(cline --version 2>/dev/null | head -1 | sed 's/[^0-9.]//g' | head -1)
6635
6620
  ;;
@@ -6680,13 +6665,12 @@ cmd_doctor() {
6680
6665
  echo -e "${CYAN}AI Providers:${NC}"
6681
6666
  doctor_check "Claude CLI" claude optional || true
6682
6667
  doctor_check "Codex CLI" codex optional || true
6683
- doctor_check "Gemini CLI" gemini optional || true
6684
6668
  doctor_check "Cline CLI" cline optional || true
6685
6669
  doctor_check "Aider CLI" aider optional || true
6686
6670
 
6687
6671
  # Check if at least one provider is installed
6688
6672
  local _any_provider=false
6689
- for _dp in claude codex gemini cline aider; do
6673
+ for _dp in claude codex cline aider; do
6690
6674
  command -v "$_dp" &>/dev/null && _any_provider=true && break
6691
6675
  done
6692
6676
  if ! $_any_provider; then
@@ -6711,19 +6695,12 @@ cmd_doctor() {
6711
6695
  elif command -v codex &>/dev/null; then
6712
6696
  echo -e " ${DIM} -- ${NC} OPENAI_API_KEY not set (Codex CLI uses its own login)"
6713
6697
  fi
6714
- if [ -n "${GOOGLE_API_KEY:-${GEMINI_API_KEY:-}}" ]; then
6715
- echo -e " ${GREEN}PASS${NC} GOOGLE_API_KEY is set"
6716
- pass_count=$((pass_count + 1))
6717
- elif command -v gemini &>/dev/null; then
6718
- echo -e " ${DIM} -- ${NC} GOOGLE_API_KEY not set (Gemini CLI uses its own login)"
6719
- fi
6720
6698
  echo ""
6721
6699
 
6722
6700
  echo -e "${CYAN}Skills:${NC}"
6723
6701
  local skill_dirs=(
6724
6702
  "$HOME/.claude/skills/loki-mode:Claude Code"
6725
6703
  "$HOME/.codex/skills/loki-mode:Codex CLI"
6726
- "$HOME/.gemini/skills/loki-mode:Gemini CLI"
6727
6704
  "$HOME/.cline/skills/loki-mode:Cline CLI"
6728
6705
  "$HOME/.aider/skills/loki-mode:Aider CLI"
6729
6706
  )
@@ -6952,7 +6929,6 @@ checks.append(check_tool('bash', 'bash', 'recommended', '4.0'))
6952
6929
  checks.append(check_tool('Bun', 'bun', 'recommended', '1.3'))
6953
6930
  checks.append(check_tool('Claude CLI', 'claude', 'optional'))
6954
6931
  checks.append(check_tool('Codex CLI', 'codex', 'optional'))
6955
- checks.append(check_tool('Gemini CLI', 'gemini', 'optional'))
6956
6932
  checks.append(check_tool('Cline CLI', 'cline', 'optional'))
6957
6933
  checks.append(check_tool('Aider CLI', 'aider', 'optional'))
6958
6934
 
@@ -7052,9 +7028,10 @@ cmd_sentrux() {
7052
7028
  case "$sub" in
7053
7029
  baseline)
7054
7030
  if ! sentrux_available; then
7055
- echo -e "${YELLOW}sentrux not installed.${NC} Install via:" >&2
7031
+ echo -e "${YELLOW}sentrux not installed.${NC} Install with one of:" >&2
7056
7032
  echo " brew install sentrux/tap/sentrux" >&2
7057
- echo " or download from https://github.com/sentrux/sentrux/releases" >&2
7033
+ echo " curl -fsSL https://raw.githubusercontent.com/sentrux/sentrux/main/install.sh | sh" >&2
7034
+ echo " See also: https://github.com/sentrux/sentrux" >&2
7058
7035
  return 2
7059
7036
  fi
7060
7037
  if sentrux_baseline_save "$target"; then
@@ -7068,7 +7045,10 @@ cmd_sentrux() {
7068
7045
  ;;
7069
7046
  gate)
7070
7047
  if ! sentrux_available; then
7071
- echo -e "${YELLOW}sentrux not installed.${NC} Run 'loki sentrux baseline' for setup hints." >&2
7048
+ echo -e "${YELLOW}sentrux not installed.${NC} Install with one of:" >&2
7049
+ echo " brew install sentrux/tap/sentrux" >&2
7050
+ echo " curl -fsSL https://raw.githubusercontent.com/sentrux/sentrux/main/install.sh | sh" >&2
7051
+ echo " See also: https://github.com/sentrux/sentrux" >&2
7072
7052
  return 2
7073
7053
  fi
7074
7054
  local diff verdict before after
@@ -7097,7 +7077,10 @@ cmd_sentrux() {
7097
7077
  status)
7098
7078
  if ! sentrux_available; then
7099
7079
  echo "sentrux: not installed (optional)"
7100
- echo "install: brew install sentrux/tap/sentrux"
7080
+ echo "install with one of:"
7081
+ echo " brew install sentrux/tap/sentrux"
7082
+ echo " curl -fsSL https://raw.githubusercontent.com/sentrux/sentrux/main/install.sh | sh"
7083
+ echo " See also: https://github.com/sentrux/sentrux"
7101
7084
  return 0
7102
7085
  fi
7103
7086
  local v
@@ -8191,7 +8174,6 @@ QPRDEOF
8191
8174
  case "$_quick_provider" in
8192
8175
  claude) echo " npm install -g @anthropic-ai/claude-code" ;;
8193
8176
  codex) echo " npm install -g @openai/codex" ;;
8194
- gemini) echo " npm install -g @google/gemini-cli" ;;
8195
8177
  cline) echo " npm install -g @anthropic-ai/cline" ;;
8196
8178
  aider) echo " pip install aider-chat" ;;
8197
8179
  *) echo " Check the provider documentation for installation." ;;
@@ -8436,7 +8418,7 @@ INSTRUCTIONS:
8436
8418
  echo -e "${CYAN}[AI] Analyzing $svc_name failure with ${LOKI_PROVIDER:-claude}...${NC}"
8437
8419
 
8438
8420
  # 4. LET AI FIX: Run loki quick with the AI prompt
8439
- # The AI provider (claude/codex/gemini/ollama) decides what to fix
8421
+ # The AI provider (claude/codex/ollama) decides what to fix
8440
8422
  fix_count=$((fix_count + 1))
8441
8423
  echo -e "${CYAN}[FIX] Attempt $fix_count/$max_fixes${NC}"
8442
8424
 
@@ -8961,7 +8943,7 @@ ENDGITIGNORE
8961
8943
 
8962
8944
  # Check if an AI provider CLI is available
8963
8945
  local _has_provider=false
8964
- for _pcli in claude codex gemini cline aider; do
8946
+ for _pcli in claude codex cline aider; do
8965
8947
  if command -v "$_pcli" &>/dev/null; then
8966
8948
  _has_provider=true
8967
8949
  break
@@ -8973,7 +8955,6 @@ ENDGITIGNORE
8973
8955
  echo " Install at least one before running 'loki start':"
8974
8956
  echo " npm install -g @anthropic-ai/claude-code (recommended)"
8975
8957
  echo " npm install -g @openai/codex"
8976
- echo " npm install -g @google/gemini-cli"
8977
8958
  echo ""
8978
8959
  echo " Then verify your setup: ${BOLD}loki doctor${NC}"
8979
8960
  fi
@@ -9844,9 +9825,6 @@ except Exception: pass
9844
9825
  codex)
9845
9826
  (cd "$codebase_path" && codex exec --full-auto "$phase_prompt" 2>&1) || phase_exit=$?
9846
9827
  ;;
9847
- gemini)
9848
- (cd "$codebase_path" && gemini --approval-mode=yolo "$phase_prompt" 2>&1) || phase_exit=$?
9849
- ;;
9850
9828
  cline)
9851
9829
  (cd "$codebase_path" && cline -y "$phase_prompt" 2>&1) || phase_exit=$?
9852
9830
  ;;
@@ -9857,7 +9835,7 @@ except Exception: pass
9857
9835
  (cd "$codebase_path" && aider --message "$phase_prompt" --yes-always --no-auto-commits --model "$aider_model" $aider_flags 2>&1) || phase_exit=$?
9858
9836
  ;;
9859
9837
  *)
9860
- echo -e "${RED}Error: Unknown provider '${provider_name}'. Supported: claude, codex, gemini, cline, aider${NC}"
9838
+ echo -e "${RED}Error: Unknown provider '${provider_name}'. Supported: claude, codex, cline, aider${NC}"
9861
9839
  phase_exit=1
9862
9840
  ;;
9863
9841
  esac
@@ -10014,9 +9992,6 @@ except Exception: pass
10014
9992
  codex)
10015
9993
  (cd "$codebase_path" && codex exec --full-auto "$doc_prompt" 2>&1) || doc_exit=$?
10016
9994
  ;;
10017
- gemini)
10018
- (cd "$codebase_path" && gemini --approval-mode=yolo "$doc_prompt" 2>&1) || doc_exit=$?
10019
- ;;
10020
9995
  cline)
10021
9996
  (cd "$codebase_path" && cline -y "$doc_prompt" 2>&1) || doc_exit=$?
10022
9997
  ;;
@@ -10524,9 +10499,6 @@ except Exception: pass
10524
10499
  codex)
10525
10500
  (cd "$codebase_path" && codex exec --full-auto "$heal_prompt" 2>&1) || heal_exit=$?
10526
10501
  ;;
10527
- gemini)
10528
- (cd "$codebase_path" && gemini --approval-mode=yolo "$heal_prompt" 2>&1) || heal_exit=$?
10529
- ;;
10530
10502
  cline)
10531
10503
  (cd "$codebase_path" && cline -y "$heal_prompt" 2>&1) || heal_exit=$?
10532
10504
  ;;
@@ -10539,7 +10511,7 @@ except Exception: pass
10539
10511
  # BUG-HEAL-003: Unknown provider should error, not silently succeed
10540
10512
  *)
10541
10513
  echo -e "${RED}Error: Unknown provider: $provider${NC}"
10542
- echo "Supported providers: claude, codex, gemini, cline, aider"
10514
+ echo "Supported providers: claude, codex, cline, aider"
10543
10515
  return 1
10544
10516
  ;;
10545
10517
  esac
@@ -11305,12 +11277,12 @@ PYEOF
11305
11277
  mkdir -p "$loki_dir/state"
11306
11278
  local current_provider
11307
11279
  current_provider=$(cat "$loki_dir/state/provider" 2>/dev/null || echo "claude")
11308
- local chain="${LOKI_FAILOVER_CHAIN:-claude,codex,gemini}"
11280
+ local chain="${LOKI_FAILOVER_CHAIN:-claude,codex,cline}"
11309
11281
 
11310
11282
  cat > "$failover_file" << FEOF
11311
11283
  {
11312
11284
  "enabled": true,
11313
- "chain": $(printf '%s' "$chain" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read().strip().split(",")))' 2>/dev/null || echo '["claude","codex","gemini"]'),
11285
+ "chain": $(printf '%s' "$chain" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read().strip().split(",")))' 2>/dev/null || echo '["claude","codex","cline"]'),
11314
11286
  "currentProvider": "$current_provider",
11315
11287
  "primaryProvider": "$current_provider",
11316
11288
  "lastFailover": null,
@@ -11348,7 +11320,7 @@ with open('$failover_file', 'w') as f: json.dump(d, f, indent=2)
11348
11320
  local IFS=','
11349
11321
  for p in $new_chain; do
11350
11322
  case "$p" in
11351
- claude|codex|gemini|cline|aider) ;;
11323
+ claude|codex|cline|aider) ;;
11352
11324
  *) echo -e "${RED}Error: invalid provider '$p' in chain${NC}"; return 1 ;;
11353
11325
  esac
11354
11326
  done
@@ -11376,9 +11348,9 @@ with open('$failover_file', 'w') as f: json.dump(d, f, indent=2)
11376
11348
  source "$script_dir/../providers/loader.sh"
11377
11349
  fi
11378
11350
 
11379
- local chain_providers="claude,codex,gemini"
11351
+ local chain_providers="claude,codex,cline"
11380
11352
  if [ -f "$failover_file" ]; then
11381
- chain_providers=$(_FAILOVER_FILE="$failover_file" python3 -c "import json, os; print(','.join(json.load(open(os.environ['_FAILOVER_FILE'])).get('chain', ['claude','codex','gemini'])))" 2>/dev/null || echo "claude,codex,gemini")
11353
+ chain_providers=$(_FAILOVER_FILE="$failover_file" python3 -c "import json, os; print(','.join(json.load(open(os.environ['_FAILOVER_FILE'])).get('chain', ['claude','codex','cline'])))" 2>/dev/null || echo "claude,codex,cline")
11382
11354
  fi
11383
11355
 
11384
11356
  local IFS=','
@@ -11404,7 +11376,6 @@ with open('$failover_file', 'w') as f: json.dump(d, f, indent=2)
11404
11376
  case "$p" in
11405
11377
  claude) [ -n "${ANTHROPIC_API_KEY:-}" ] && has_key=true ;;
11406
11378
  codex) [ -n "${OPENAI_API_KEY:-}" ] && has_key=true ;;
11407
- gemini) [ -n "${GOOGLE_API_KEY:-${GEMINI_API_KEY:-}}" ] && has_key=true ;;
11408
11379
  cline|aider) has_key=true ;; # Key check varies
11409
11380
  esac
11410
11381
 
@@ -11445,7 +11416,7 @@ with open('$failover_file', 'w') as f: json.dump(d, f, indent=2)
11445
11416
  echo " (no args) Show failover status and health"
11446
11417
  echo " --enable Enable auto-failover"
11447
11418
  echo " --disable Disable auto-failover"
11448
- echo " --chain X,Y,Z Set failover chain (e.g., claude,codex,gemini)"
11419
+ echo " --chain X,Y,Z Set failover chain (e.g., claude,codex,cline)"
11449
11420
  echo " --test Test all providers in chain"
11450
11421
  echo " --reset Reset failover state to defaults"
11451
11422
  echo " --help, -h Show this help"
@@ -11809,7 +11780,7 @@ if integration_count > 3 or complexity in ('complex', 'enterprise'):
11809
11780
  recommended_provider = 'Claude'
11810
11781
  provider_reason = 'Full feature support needed (subagents, parallel, MCP)'
11811
11782
  elif complexity == 'simple' and endpoint_count == 0:
11812
- recommended_provider = 'Any (Claude/Codex/Gemini)'
11783
+ recommended_provider = 'Any (Claude/Codex/Cline)'
11813
11784
  provider_reason = 'Simple project works with all providers'
11814
11785
  else:
11815
11786
  recommended_provider = 'Claude'
@@ -12076,6 +12047,14 @@ maybe_show_auto_plan() {
12076
12047
 
12077
12048
  # Main command dispatcher
12078
12049
  main() {
12050
+ # v7.5.18: early guard -- LOKI_PROVIDER=gemini is no longer supported.
12051
+ if [ "${LOKI_PROVIDER:-}" = "gemini" ]; then
12052
+ echo -e "${RED}Error: Provider 'gemini' is deprecated as of v7.5.18 and has been removed.${NC}" >&2
12053
+ echo "Active providers: claude, codex, cline, aider" >&2
12054
+ echo "Unset LOKI_PROVIDER or use: LOKI_PROVIDER=claude" >&2
12055
+ exit 1
12056
+ fi
12057
+
12079
12058
  if [ $# -eq 0 ]; then
12080
12059
  show_help
12081
12060
  exit 0
@@ -17864,9 +17843,6 @@ USER TASK: ${prompt}"
17864
17843
  codex)
17865
17844
  codex exec --full-auto "$full_prompt" 2>&1 || agent_exit=$?
17866
17845
  ;;
17867
- gemini)
17868
- gemini --approval-mode=yolo "$full_prompt" 2>&1 || agent_exit=$?
17869
- ;;
17870
17846
  cline)
17871
17847
  cline -y "$full_prompt" 2>&1 || agent_exit=$?
17872
17848
  ;;
@@ -17975,7 +17951,6 @@ $diff"
17975
17951
  case "$provider" in
17976
17952
  claude) claude -p "$review_prompt" 2>&1 ;;
17977
17953
  codex) codex exec --full-auto "$review_prompt" 2>&1 ;;
17978
- gemini) gemini --approval-mode=yolo "$review_prompt" 2>&1 ;;
17979
17954
  cline) cline -y "$review_prompt" 2>&1 ;;
17980
17955
  *) echo -e "${RED}Unknown provider: $provider${NC}"; return 1 ;;
17981
17956
  esac
@@ -19568,9 +19543,6 @@ _docs_invoke_provider() {
19568
19543
  codex)
19569
19544
  result=$($t_prefix codex exec --full-auto "$prompt" 2>/dev/null) || exit_code=$?
19570
19545
  ;;
19571
- gemini)
19572
- result=$($t_prefix gemini --approval-mode=yolo "$prompt" 2>/dev/null) || exit_code=$?
19573
- ;;
19574
19546
  cline)
19575
19547
  result=$($t_prefix cline -y "$prompt" 2>/dev/null) || exit_code=$?
19576
19548
  ;;