juno-code 1.0.12 → 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
@@ -2,21 +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. Detects virtual environment and installs accordingly:
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:
11
13
  # - If inside venv: installs into venv
12
- # - If outside venv: uses --system flag for system-wide installation
13
- # 4. Installs required packages: juno-kanban, roundtable-ai
14
- # 5. Reports if requirements are already satisfied
15
- # 6. Shows error if neither 'uv' nor 'pip' is available
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
16
18
  #
17
19
  # Usage: ./install_requirements.sh
18
20
  #
19
- # Created by: juno-task-ts init command
21
+ # Created by: juno-code init command
20
22
  # Date: Auto-generated during project initialization
21
23
 
22
24
  set -euo pipefail # Exit on error, undefined variable, or pipe failure
@@ -100,17 +102,84 @@ is_in_virtualenv() {
100
102
  return 1 # Not inside venv
101
103
  }
102
104
 
103
- # Function to install packages using uv
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
104
154
  install_with_uv() {
105
155
  log_info "Installing packages using 'uv' (ultrafast Python package manager)..."
106
156
 
107
- # Determine if we need --system flag
108
157
  local uv_flags="--quiet"
109
- if ! is_in_virtualenv; then
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
110
181
  log_info "Not in a virtual environment - using --system flag for system-wide installation"
111
182
  uv_flags="--quiet --system"
112
- else
113
- log_info "Detected virtual environment - installing into venv"
114
183
  fi
115
184
 
116
185
  local failed_packages=()
@@ -133,7 +202,7 @@ install_with_uv() {
133
202
  return 0
134
203
  }
135
204
 
136
- # Function to install packages using pip
205
+ # Function to install packages using pip with externally managed Python handling
137
206
  install_with_pip() {
138
207
  log_info "Installing packages using 'pip'..."
139
208
 
@@ -148,6 +217,29 @@ install_with_pip() {
148
217
  fi
149
218
  fi
150
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
+
151
243
  local failed_packages=()
152
244
 
153
245
  for package in "${REQUIRED_PACKAGES[@]}"; do
@@ -194,28 +286,50 @@ main() {
194
286
  # Step 2: Determine which package manager to use
195
287
  local installer=""
196
288
 
197
- 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
198
301
  log_success "'uv' found - using ultrafast Python package manager"
199
302
  installer="uv"
200
303
  elif command -v pip3 &> /dev/null || command -v pip &> /dev/null; then
201
304
  log_success "'pip' found - using standard Python package installer"
202
305
  installer="pip"
203
306
  else
204
- # Neither uv nor pip found
205
- log_error "Neither 'uv' nor 'pip' package manager found!"
307
+ # No package manager found
308
+ log_error "No suitable package manager found!"
206
309
  echo ""
207
310
  log_info "Please install one of the following:"
208
311
  echo ""
209
- 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)"
210
319
  echo " curl -LsSf https://astral.sh/uv/install.sh | sh"
211
320
  echo " OR"
212
321
  echo " brew install uv (macOS)"
213
322
  echo ""
214
- echo " Option 2: Install 'pip' (standard Python package manager)"
323
+ echo " Option 3: Install 'pip' (standard Python package manager)"
215
324
  echo " python3 -m ensurepip --upgrade"
216
325
  echo " OR"
217
326
  echo " curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py"
218
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 ""
219
333
  exit 1
220
334
  fi
221
335
 
@@ -224,10 +338,25 @@ main() {
224
338
  log_info "Installing required packages: ${REQUIRED_PACKAGES[*]}"
225
339
  echo ""
226
340
 
227
- 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
228
353
  if install_with_uv; then
229
354
  echo ""
230
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
231
360
  echo ""
232
361
  exit 0
233
362
  else
@@ -238,6 +367,10 @@ main() {
238
367
  if install_with_pip; then
239
368
  echo ""
240
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
241
374
  echo ""
242
375
  exit 0
243
376
  else
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "juno-code",
3
- "version": "1.0.12",
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",