juno-code 1.0.49 → 1.0.51

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 (33) hide show
  1. package/README.md +508 -202
  2. package/dist/bin/cli.d.mts +1 -1
  3. package/dist/bin/cli.d.ts +1 -1
  4. package/dist/bin/cli.js +3332 -1421
  5. package/dist/bin/cli.js.map +1 -1
  6. package/dist/bin/cli.mjs +3316 -1405
  7. package/dist/bin/cli.mjs.map +1 -1
  8. package/dist/bin/feedback-collector.js.map +1 -1
  9. package/dist/bin/feedback-collector.mjs.map +1 -1
  10. package/dist/index.d.mts +56 -19
  11. package/dist/index.d.ts +56 -19
  12. package/dist/index.js +240 -36
  13. package/dist/index.js.map +1 -1
  14. package/dist/index.mjs +240 -36
  15. package/dist/index.mjs.map +1 -1
  16. package/dist/templates/scripts/install_requirements.sh +55 -5
  17. package/dist/templates/scripts/kanban.sh +11 -0
  18. package/dist/templates/services/README.md +23 -4
  19. package/dist/templates/services/__pycache__/pi.cpython-313.pyc +0 -0
  20. package/dist/templates/services/pi.py +1933 -262
  21. package/dist/templates/skills/claude/kanban-workflow/SKILL.md +138 -0
  22. package/dist/templates/skills/claude/plan-kanban-tasks/SKILL.md +1 -1
  23. package/dist/templates/skills/claude/ralph-loop/scripts/kanban.sh +11 -0
  24. package/dist/templates/skills/claude/understand-project/SKILL.md +1 -1
  25. package/dist/templates/skills/codex/kanban-workflow/SKILL.md +139 -0
  26. package/dist/templates/skills/codex/plan-kanban-tasks/SKILL.md +32 -0
  27. package/dist/templates/skills/codex/ralph-loop/scripts/kanban.sh +11 -0
  28. package/dist/templates/skills/codex/understand-project/SKILL.md +46 -0
  29. package/dist/templates/skills/pi/kanban-workflow/SKILL.md +139 -0
  30. package/dist/templates/skills/pi/plan-kanban-tasks/SKILL.md +1 -1
  31. package/dist/templates/skills/pi/ralph-loop/SKILL.md +4 -0
  32. package/dist/templates/skills/pi/understand-project/SKILL.md +1 -1
  33. package/package.json +7 -5
@@ -13,7 +13,7 @@
13
13
  # - If inside venv: installs into venv
14
14
  # - If externally managed Python detected: uses pipx or creates temporary venv
15
15
  # - If outside venv (non-managed): uses --system flag for system-wide installation
16
- # 6. Installs required packages: juno-kanban, roundtable-ai
16
+ # 6. Installs required packages: juno-kanban
17
17
  # 7. Reports if requirements are already satisfied
18
18
  #
19
19
  # Usage: ./install_requirements.sh
@@ -54,13 +54,13 @@ NC='\033[0m' # No Color
54
54
  # Required packages
55
55
  # Note: requests and python-dotenv are required by github.py
56
56
  # slack_sdk is required by Slack integration scripts (slack_fetch.py, slack_respond.py)
57
- REQUIRED_PACKAGES=("juno-kanban" "roundtable-ai" "requests" "python-dotenv" "slack_sdk")
57
+ REQUIRED_PACKAGES=("juno-kanban" "requests" "python-dotenv" "slack_sdk")
58
58
 
59
59
  # Version check cache configuration
60
60
  # This ensures we don't check PyPI on every run (performance optimization per Task RTafs5)
61
61
  VERSION_CHECK_CACHE_DIR="${HOME}/.juno_code"
62
62
  VERSION_CHECK_CACHE_FILE="${VERSION_CHECK_CACHE_DIR}/.version_check_cache"
63
- VERSION_CHECK_INTERVAL_HOURS=24 # Check for updates once per day
63
+ VERSION_CHECK_INTERVAL_HOURS="${VERSION_CHECK_INTERVAL_HOURS:-24}" # Check for updates once per day (override via env var)
64
64
 
65
65
  # Logging functions
66
66
  log_info() {
@@ -276,10 +276,22 @@ check_all_for_updates() {
276
276
  log_info "Performing periodic version check..."
277
277
 
278
278
  for package in "${REQUIRED_PACKAGES[@]}"; do
279
- check_and_upgrade_package "$package" "true"
280
- local result=$?
279
+ local result=0
280
+
281
+ # check_and_upgrade_package can return 2 when an update is available.
282
+ # With `set -e`, calling it directly would abort the script before we
283
+ # can process that status. Wrap it in an if/else so we can capture and
284
+ # handle non-zero return codes intentionally.
285
+ if check_and_upgrade_package "$package" "true"; then
286
+ result=0
287
+ else
288
+ result=$?
289
+ fi
290
+
281
291
  if [ $result -eq 2 ]; then
282
292
  packages_needing_upgrade+=("$package")
293
+ elif [ $result -ne 0 ]; then
294
+ log_warning "Skipping upgrade decision for $package due to check error"
283
295
  fi
284
296
  done
285
297
 
@@ -402,6 +414,38 @@ is_externally_managed_python() {
402
414
  return 1 # Not externally managed
403
415
  }
404
416
 
417
+ # Function to upgrade pip to latest version inside the active venv
418
+ # Why: venv ships with the pip version bundled in the Python distribution,
419
+ # which can be months/years behind. Old pip may fail to resolve modern
420
+ # dependency metadata or miss security fixes. Upgrading pip is fast (<2s)
421
+ # and prevents hard-to-debug install failures downstream.
422
+ upgrade_pip_in_venv() {
423
+ if ! is_in_virtualenv; then
424
+ return 0 # Only upgrade pip inside a venv
425
+ fi
426
+
427
+ log_info "Upgrading pip to latest version in venv..."
428
+
429
+ # Prefer uv for speed, fall back to pip itself
430
+ if command -v uv &>/dev/null; then
431
+ if uv pip install --upgrade pip --quiet 2>/dev/null; then
432
+ local pip_ver
433
+ pip_ver=$(python3 -m pip --version 2>/dev/null | awk '{print $2}' || echo "unknown")
434
+ log_success "pip upgraded to v$pip_ver (via uv)"
435
+ return 0
436
+ fi
437
+ fi
438
+
439
+ # Fall back to pip self-upgrade
440
+ if python3 -m pip install --upgrade pip --quiet 2>/dev/null; then
441
+ local pip_ver
442
+ pip_ver=$(python3 -m pip --version 2>/dev/null | awk '{print $2}' || echo "unknown")
443
+ log_success "pip upgraded to v$pip_ver"
444
+ else
445
+ log_warning "Could not upgrade pip (non-fatal, continuing with current version)"
446
+ fi
447
+ }
448
+
405
449
  # Function to install packages using pipx
406
450
  install_with_pipx() {
407
451
  log_info "Installing packages using 'pipx' (recommended for Python applications)..."
@@ -492,6 +536,9 @@ install_with_uv() {
492
536
  log_error "Virtual environment activation script not found"
493
537
  return 1
494
538
  fi
539
+
540
+ # Upgrade pip to latest version in venv
541
+ upgrade_pip_in_venv
495
542
  fi
496
543
 
497
544
  local failed_packages=()
@@ -562,6 +609,9 @@ install_with_pip() {
562
609
  source "$venv_path/bin/activate"
563
610
  log_success "Activated virtual environment"
564
611
  python_cmd="python" # Use the venv's python
612
+
613
+ # Upgrade pip to latest version in venv
614
+ upgrade_pip_in_venv
565
615
  fi
566
616
 
567
617
  local failed_packages=()
@@ -190,6 +190,17 @@ fi
190
190
  # Change to project root
191
191
  cd "$PROJECT_ROOT"
192
192
 
193
+ # Export JUNO_TASK_ROOT so juno-kanban resolves .juno_task paths from project root,
194
+ # not from wherever the calling agent happens to be. Respects existing override.
195
+ export JUNO_TASK_ROOT="${JUNO_TASK_ROOT:-$PROJECT_ROOT}"
196
+
197
+ # Prefer local juno_kanban source when available (monorepo development).
198
+ # This keeps wrapper behavior aligned with working-tree changes without requiring
199
+ # immediate reinstall from PyPI between local iterations.
200
+ if [[ -d "$PROJECT_ROOT/juno_kanban/src" ]]; then
201
+ export PYTHONPATH="$PROJECT_ROOT/juno_kanban/src${PYTHONPATH:+:$PYTHONPATH}"
202
+ fi
203
+
193
204
  # Arrays to store normalized arguments (declared at script level for proper handling)
194
205
  declare -a NORMALIZED_GLOBAL_FLAGS=()
195
206
  declare -a NORMALIZED_COMMAND_ARGS=()
@@ -239,15 +239,17 @@ npm install -g @mariozechner/pi-coding-agent
239
239
  #### Features
240
240
 
241
241
  - Multi-provider support (Anthropic, OpenAI, Google, Groq, xAI, etc.)
242
- - Model shorthand aliases (`:pi`, `:sonnet`, `:opus`, `:gpt-5`, `:gemini-pro`, etc.)
242
+ - Model shorthand aliases (`:pi`, `:sonnet`, `:opus`, `:gpt-5`, `:api-codex`, `:gemini-pro`, etc.)
243
243
  - Support for inline prompts or prompt files
244
- - JSON/text output normalization
244
+ - Headless JSON mode (default) for structured automation output
245
+ - Live interactive mode via `--live` (Pi TUI + auto-exit on non-aborted `agent_end`)
246
+ - Temporary live extension capture (`JUNO_SUBAGENT_CAPTURE_PATH`) for iteration summaries/cost
245
247
  - Verbose mode for debugging
246
248
 
247
249
  #### Usage
248
250
 
249
251
  ```bash
250
- # Basic usage with Anthropic model
252
+ # Basic headless JSON-mode usage with Anthropic model
251
253
  ~/.juno_code/services/pi.py -p "Write a hello world function" -m :sonnet
252
254
 
253
255
  # Use with OpenAI model
@@ -256,6 +258,9 @@ npm install -g @mariozechner/pi-coding-agent
256
258
  # Use with Gemini model
257
259
  ~/.juno_code/services/pi.py -p "Add tests" -m :gemini-pro
258
260
 
261
+ # Live interactive mode (Pi TUI + auto-exit extension on non-aborted completion)
262
+ ~/.juno_code/services/pi.py --live -p "Summarize this repo" -m :api-codex
263
+
259
264
  # Specify project directory
260
265
  ~/.juno_code/services/pi.py -p "Fix bugs" --cd /path/to/project
261
266
 
@@ -269,18 +274,32 @@ npm install -g @mariozechner/pi-coding-agent
269
274
  - `-pp, --prompt-file <path>`: Path to prompt file (required if no --prompt)
270
275
  - `--cd <path>`: Project path (default: current directory)
271
276
  - `-m, --model <name>`: Model name (supports shorthand aliases)
277
+ - `--live`: Run Pi in interactive mode (no `--mode json`, prompt passed positionally)
278
+ - `--no-extensions`: Disable Pi extensions (incompatible with `--live`)
272
279
  - `--verbose`: Enable verbose output
273
280
 
274
281
  #### Via juno-code
275
282
 
276
283
  ```bash
277
- # Run Pi through juno-code
284
+ # Run Pi through juno-code (headless default)
278
285
  juno-code -b shell -s pi -m :sonnet -i 1 -v -p "your task"
279
286
 
287
+ # Run Pi in live interactive mode (auto-exits on non-aborted completion)
288
+ juno-code pi --live -p '/skill:ralph-loop' -i 1
289
+
290
+ # If :pi default model is unavailable in your provider config, set an explicit model
291
+ juno-code pi --live -m :api-codex -p "your task" -i 1
292
+
280
293
  # Quick shortcut
281
294
  juno-code pi "your task"
282
295
  ```
283
296
 
297
+ Notes:
298
+ - `--live` is Pi-only and expects an interactive terminal for clean TUI rendering.
299
+ - Esc interruptions do not auto-exit Pi: interrupted (`stopReason=aborted`) turns keep the live session open.
300
+ - To manually exit Pi and return control to juno-code, use Pi's normal exit keys (for example `Ctrl+C` twice quickly or `Ctrl+D` on an empty editor).
301
+ - Pi TUI should run on a modern Node runtime (Node 20+ recommended).
302
+
284
303
  ## Customization
285
304
 
286
305
  All service scripts installed in `~/.juno_code/services/` can be modified to suit your needs. This directory is designed for user customization.