juno-code 1.0.51 → 1.0.53

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.
@@ -342,6 +342,24 @@ is_in_virtualenv() {
342
342
  return 1 # Not inside venv
343
343
  }
344
344
 
345
+ # Function to activate project-local .venv_juno when available.
346
+ # Why: install/check commands often run from non-activated shells, while packages
347
+ # are installed into .venv_juno. Activating it early keeps package detection and
348
+ # periodic update checks aligned with the real install target.
349
+ activate_project_venv_if_available() {
350
+ if is_in_virtualenv; then
351
+ return 0
352
+ fi
353
+
354
+ local venv_path=".venv_juno"
355
+ if [ -f "$venv_path/bin/activate" ]; then
356
+ log_info "Detected project virtual environment at $venv_path; activating for dependency checks"
357
+ # shellcheck disable=SC1091
358
+ source "$venv_path/bin/activate"
359
+ log_success "Activated $venv_path"
360
+ fi
361
+ }
362
+
345
363
  # Function to find the best Python version (3.10-3.13, preferably 3.13)
346
364
  find_best_python() {
347
365
  # Try to find Python in order of preference: 3.13, 3.12, 3.11, 3.10
@@ -660,6 +678,9 @@ main() {
660
678
  log_info "=== Python Requirements Installation ==="
661
679
  echo ""
662
680
 
681
+ # Align all checks with project-local installation target when available.
682
+ activate_project_venv_if_available
683
+
663
684
  # Handle --check-updates: just check and report, don't install
664
685
  if [ "$check_updates_only" = true ]; then
665
686
  log_info "Checking for updates..."
@@ -194,10 +194,14 @@ cd "$PROJECT_ROOT"
194
194
  # not from wherever the calling agent happens to be. Respects existing override.
195
195
  export JUNO_TASK_ROOT="${JUNO_TASK_ROOT:-$PROJECT_ROOT}"
196
196
 
197
- # Prefer local juno_kanban source when available (monorepo development).
197
+ # Prefer local kanban source when available.
198
+ # - Monorepo root: $PROJECT_ROOT/juno_kanban/src
199
+ # - juno_kanban root: $PROJECT_ROOT/src
198
200
  # This keeps wrapper behavior aligned with working-tree changes without requiring
199
201
  # immediate reinstall from PyPI between local iterations.
200
- if [[ -d "$PROJECT_ROOT/juno_kanban/src" ]]; then
202
+ if [[ -d "$PROJECT_ROOT/src/kanban" ]]; then
203
+ export PYTHONPATH="$PROJECT_ROOT/src${PYTHONPATH:+:$PYTHONPATH}"
204
+ elif [[ -d "$PROJECT_ROOT/juno_kanban/src/kanban" ]]; then
201
205
  export PYTHONPATH="$PROJECT_ROOT/juno_kanban/src${PYTHONPATH:+:$PYTHONPATH}"
202
206
  fi
203
207