juno-code 1.0.10 → 1.0.13

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.
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # Usage: ./clean_logs_folder.sh
13
13
  #
14
- # Created by: juno-task-ts init command
14
+ # Created by: juno-code init command
15
15
  # Date: Auto-generated during project initialization
16
16
 
17
17
  set -euo pipefail # Exit on error, undefined variable, or pipe failure
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ echo "## User Feedback" > .juno_task/USER_FEEDBACK.md
@@ -2,18 +2,23 @@
2
2
 
3
3
  # install_requirements.sh
4
4
  #
5
- # Purpose: Install Python dependencies required for juno-task-ts
5
+ # Purpose: Install Python dependencies required for juno-code
6
6
  #
7
7
  # This script:
8
- # 1. Checks if 'uv' (ultrafast Python package manager) is installed
9
- # 2. Falls back to 'pip' if 'uv' is not available
10
- # 3. Installs required packages: juno-kanban, roundtable-ai
11
- # 4. Reports if requirements are already satisfied
12
- # 5. Shows error if neither 'uv' nor 'pip' is available
8
+ # 1. Checks if 'pipx' (recommended for app installations) is installed
9
+ # 2. Falls back to 'uv' (ultrafast Python package manager) if 'pipx' not available
10
+ # 3. Falls back to 'pip' if neither 'pipx' nor 'uv' is available
11
+ # 4. Detects externally managed Python (PEP 668) on Ubuntu/Debian systems
12
+ # 5. Handles installation based on environment:
13
+ # - If inside venv: installs into venv
14
+ # - If externally managed Python detected: uses pipx or creates temporary venv
15
+ # - If outside venv (non-managed): uses --system flag for system-wide installation
16
+ # 6. Installs required packages: juno-kanban, roundtable-ai
17
+ # 7. Reports if requirements are already satisfied
13
18
  #
14
19
  # Usage: ./install_requirements.sh
15
20
  #
16
- # Created by: juno-task-ts init command
21
+ # Created by: juno-code init command
17
22
  # Date: Auto-generated during project initialization
18
23
 
19
24
  set -euo pipefail # Exit on error, undefined variable, or pipe failure
@@ -75,15 +80,113 @@ check_all_requirements_satisfied() {
75
80
  fi
76
81
  }
77
82
 
78
- # Function to install packages using uv
83
+ # Function to check if we're inside a virtual environment
84
+ is_in_virtualenv() {
85
+ # Check for VIRTUAL_ENV environment variable (most common indicator)
86
+ if [ -n "${VIRTUAL_ENV:-}" ]; then
87
+ return 0 # Inside venv
88
+ fi
89
+
90
+ # Check for CONDA_DEFAULT_ENV (conda environments)
91
+ if [ -n "${CONDA_DEFAULT_ENV:-}" ]; then
92
+ return 0 # Inside conda env
93
+ fi
94
+
95
+ # Check if sys.prefix != sys.base_prefix (Python way to detect venv)
96
+ if command -v python3 &> /dev/null; then
97
+ if python3 -c "import sys; exit(0 if sys.prefix != sys.base_prefix else 1)" 2>/dev/null; then
98
+ return 0 # Inside venv
99
+ fi
100
+ fi
101
+
102
+ return 1 # Not inside venv
103
+ }
104
+
105
+ # Function to check if Python is externally managed (PEP 668)
106
+ # This is common on Ubuntu 23.04+, Debian, and other modern Linux distros
107
+ is_externally_managed_python() {
108
+ # Check for EXTERNALLY-MANAGED marker file
109
+ local python_cmd="python3"
110
+ if ! command -v python3 &> /dev/null; then
111
+ if command -v python &> /dev/null; then
112
+ python_cmd="python"
113
+ else
114
+ return 1 # Python not found, can't determine
115
+ fi
116
+ fi
117
+
118
+ # Get the stdlib directory and check for EXTERNALLY-MANAGED file
119
+ local stdlib_dir
120
+ stdlib_dir=$($python_cmd -c "import sysconfig; print(sysconfig.get_path('stdlib'))" 2>/dev/null || echo "")
121
+
122
+ if [ -n "$stdlib_dir" ] && [ -f "$stdlib_dir/EXTERNALLY-MANAGED" ]; then
123
+ return 0 # Externally managed
124
+ fi
125
+
126
+ return 1 # Not externally managed
127
+ }
128
+
129
+ # Function to install packages using pipx
130
+ install_with_pipx() {
131
+ log_info "Installing packages using 'pipx' (recommended for Python applications)..."
132
+
133
+ local failed_packages=()
134
+
135
+ for package in "${REQUIRED_PACKAGES[@]}"; do
136
+ log_info "Installing: $package"
137
+ if pipx install "$package" --force &>/dev/null || pipx install "$package" &>/dev/null; then
138
+ log_success "Successfully installed: $package"
139
+ else
140
+ log_error "Failed to install: $package"
141
+ failed_packages+=("$package")
142
+ fi
143
+ done
144
+
145
+ if [ ${#failed_packages[@]} -gt 0 ]; then
146
+ log_error "Failed to install ${#failed_packages[@]} package(s): ${failed_packages[*]}"
147
+ return 1
148
+ fi
149
+
150
+ return 0
151
+ }
152
+
153
+ # Function to install packages using uv with externally managed Python handling
79
154
  install_with_uv() {
80
155
  log_info "Installing packages using 'uv' (ultrafast Python package manager)..."
81
156
 
157
+ local uv_flags="--quiet"
158
+
159
+ if is_in_virtualenv; then
160
+ log_info "Detected virtual environment - installing into venv"
161
+ elif is_externally_managed_python; then
162
+ log_warning "Detected externally managed Python (PEP 668) - Ubuntu/Debian system"
163
+ log_info "Creating temporary virtual environment for installation..."
164
+
165
+ # Create a project-local venv if it doesn't exist
166
+ local venv_path=".juno_venv"
167
+ if [ ! -d "$venv_path" ]; then
168
+ if ! python3 -m venv "$venv_path" 2>/dev/null; then
169
+ log_error "Failed to create virtual environment"
170
+ log_info "Please install python3-venv: sudo apt install python3-venv python3-full"
171
+ return 1
172
+ fi
173
+ log_success "Created virtual environment at $venv_path"
174
+ fi
175
+
176
+ # Activate the venv for this script
177
+ # shellcheck disable=SC1091
178
+ source "$venv_path/bin/activate"
179
+ log_success "Activated virtual environment"
180
+ else
181
+ log_info "Not in a virtual environment - using --system flag for system-wide installation"
182
+ uv_flags="--quiet --system"
183
+ fi
184
+
82
185
  local failed_packages=()
83
186
 
84
187
  for package in "${REQUIRED_PACKAGES[@]}"; do
85
188
  log_info "Installing: $package"
86
- if uv pip install "$package" --quiet; then
189
+ if uv pip install "$package" $uv_flags; then
87
190
  log_success "Successfully installed: $package"
88
191
  else
89
192
  log_error "Failed to install: $package"
@@ -99,7 +202,7 @@ install_with_uv() {
99
202
  return 0
100
203
  }
101
204
 
102
- # Function to install packages using pip
205
+ # Function to install packages using pip with externally managed Python handling
103
206
  install_with_pip() {
104
207
  log_info "Installing packages using 'pip'..."
105
208
 
@@ -114,6 +217,29 @@ install_with_pip() {
114
217
  fi
115
218
  fi
116
219
 
220
+ # Handle externally managed Python
221
+ if ! is_in_virtualenv && is_externally_managed_python; then
222
+ log_warning "Detected externally managed Python (PEP 668) - Ubuntu/Debian system"
223
+ log_info "Creating temporary virtual environment for installation..."
224
+
225
+ # Create a project-local venv if it doesn't exist
226
+ local venv_path=".juno_venv"
227
+ if [ ! -d "$venv_path" ]; then
228
+ if ! $python_cmd -m venv "$venv_path" 2>/dev/null; then
229
+ log_error "Failed to create virtual environment"
230
+ log_info "Please install python3-venv: sudo apt install python3-venv python3-full"
231
+ return 1
232
+ fi
233
+ log_success "Created virtual environment at $venv_path"
234
+ fi
235
+
236
+ # Activate the venv for this script
237
+ # shellcheck disable=SC1091
238
+ source "$venv_path/bin/activate"
239
+ log_success "Activated virtual environment"
240
+ python_cmd="python" # Use the venv's python
241
+ fi
242
+
117
243
  local failed_packages=()
118
244
 
119
245
  for package in "${REQUIRED_PACKAGES[@]}"; do
@@ -160,28 +286,50 @@ main() {
160
286
  # Step 2: Determine which package manager to use
161
287
  local installer=""
162
288
 
163
- if command -v uv &> /dev/null; then
289
+ # Check if Python is externally managed (Ubuntu/Debian PEP 668)
290
+ local is_ext_managed=false
291
+ if is_externally_managed_python && ! is_in_virtualenv; then
292
+ is_ext_managed=true
293
+ log_warning "Detected externally managed Python environment (Ubuntu/Debian PEP 668)"
294
+ fi
295
+
296
+ # Prioritize pipx for externally managed systems
297
+ if [ "$is_ext_managed" = true ] && command -v pipx &> /dev/null; then
298
+ log_success "'pipx' found - using pipx (recommended for externally managed Python)"
299
+ installer="pipx"
300
+ elif command -v uv &> /dev/null; then
164
301
  log_success "'uv' found - using ultrafast Python package manager"
165
302
  installer="uv"
166
303
  elif command -v pip3 &> /dev/null || command -v pip &> /dev/null; then
167
304
  log_success "'pip' found - using standard Python package installer"
168
305
  installer="pip"
169
306
  else
170
- # Neither uv nor pip found
171
- log_error "Neither 'uv' nor 'pip' package manager found!"
307
+ # No package manager found
308
+ log_error "No suitable package manager found!"
172
309
  echo ""
173
310
  log_info "Please install one of the following:"
174
311
  echo ""
175
- echo " Option 1: Install 'uv' (recommended - ultrafast)"
312
+ if [ "$is_ext_managed" = true ]; then
313
+ echo " Option 1: Install 'pipx' (RECOMMENDED for Ubuntu/Debian)"
314
+ echo " sudo apt install pipx"
315
+ echo " pipx ensurepath"
316
+ echo ""
317
+ fi
318
+ echo " Option 2: Install 'uv' (ultrafast Python package manager)"
176
319
  echo " curl -LsSf https://astral.sh/uv/install.sh | sh"
177
320
  echo " OR"
178
321
  echo " brew install uv (macOS)"
179
322
  echo ""
180
- echo " Option 2: Install 'pip' (standard Python package manager)"
323
+ echo " Option 3: Install 'pip' (standard Python package manager)"
181
324
  echo " python3 -m ensurepip --upgrade"
182
325
  echo " OR"
183
326
  echo " curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py"
184
327
  echo ""
328
+ if [ "$is_ext_managed" = true ]; then
329
+ log_info "Note: On Ubuntu/Debian with externally managed Python, 'pipx' is recommended"
330
+ log_info "Alternatively, install python3-venv: sudo apt install python3-venv python3-full"
331
+ fi
332
+ echo ""
185
333
  exit 1
186
334
  fi
187
335
 
@@ -190,10 +338,25 @@ main() {
190
338
  log_info "Installing required packages: ${REQUIRED_PACKAGES[*]}"
191
339
  echo ""
192
340
 
193
- if [ "$installer" = "uv" ]; then
341
+ if [ "$installer" = "pipx" ]; then
342
+ if install_with_pipx; then
343
+ echo ""
344
+ log_success "All packages installed successfully using 'pipx'!"
345
+ log_info "Packages installed in isolated environments and added to PATH"
346
+ echo ""
347
+ exit 0
348
+ else
349
+ log_error "Some packages failed to install with 'pipx'"
350
+ exit 1
351
+ fi
352
+ elif [ "$installer" = "uv" ]; then
194
353
  if install_with_uv; then
195
354
  echo ""
196
355
  log_success "All packages installed successfully using 'uv'!"
356
+ if [ -d ".juno_venv" ]; then
357
+ log_info "Packages installed in virtual environment: .juno_venv"
358
+ log_info "To use them, activate the venv: source .juno_venv/bin/activate"
359
+ fi
197
360
  echo ""
198
361
  exit 0
199
362
  else
@@ -204,6 +367,10 @@ main() {
204
367
  if install_with_pip; then
205
368
  echo ""
206
369
  log_success "All packages installed successfully using 'pip'!"
370
+ if [ -d ".juno_venv" ]; then
371
+ log_info "Packages installed in virtual environment: .juno_venv"
372
+ log_info "To use them, activate the venv: source .juno_venv/bin/activate"
373
+ fi
207
374
  echo ""
208
375
  exit 0
209
376
  else
@@ -0,0 +1,19 @@
1
+ #!/bin/bash
2
+ #
3
+ # Kanban Wrapper Script
4
+ #
5
+ # This script ensures juno-kanban always executes from the project root directory,
6
+ # maintaining a single consistent database location regardless of where this script is called from.
7
+ #
8
+ # Usage: ./.juno_task/scripts/kanban.sh [juno-kanban arguments]
9
+ # Example: ./.juno_task/scripts/kanban.sh list --limit 5
10
+ #
11
+
12
+ # Get the directory where this script is located
13
+ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
14
+
15
+ # Navigate to project root (parent of scripts directory)
16
+ PROJECT_ROOT="$( cd "$SCRIPT_DIR/../.." && pwd )"
17
+
18
+ # Change to project root and execute juno-kanban with all passed arguments
19
+ cd "$PROJECT_ROOT" && juno-kanban "$@"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "juno-code",
3
- "version": "1.0.10",
4
- "description": "AI Subagent Orchestration CLI - Code-focused package for juno-task-ts providing Claude Code integration and MCP server orchestration",
3
+ "version": "1.0.13",
4
+ "description": "AI Subagent Orchestration CLI - Professional TypeScript CLI for AI-powered code intelligence, MCP server orchestration, and subagent collaboration",
5
5
  "keywords": [
6
6
  "ai",
7
7
  "code",
@@ -61,12 +61,12 @@
61
61
  },
62
62
  "repository": {
63
63
  "type": "git",
64
- "url": "https://github.com/owner/juno-task-ts.git"
64
+ "url": "https://github.com/owner/juno-code.git"
65
65
  },
66
66
  "bugs": {
67
- "url": "https://github.com/owner/juno-task-ts/issues"
67
+ "url": "https://github.com/owner/juno-code/issues"
68
68
  },
69
- "homepage": "https://github.com/owner/juno-task-ts#readme",
69
+ "homepage": "https://github.com/owner/juno-code#readme",
70
70
  "license": "MIT",
71
71
  "author": {
72
72
  "name": "Development Team",