esprit-cli 0.7.10 → 0.7.11

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esprit-cli",
3
- "version": "0.7.10",
3
+ "version": "0.7.11",
4
4
  "description": "AI-powered penetration testing agent",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://esprit.dev",
@@ -107,6 +107,7 @@ function Sync-RuntimeRepo {
107
107
 
108
108
  function Install-PythonRuntime {
109
109
  param([string]$PyBin)
110
+ $packageDir = $null
110
111
 
111
112
  if (-not (Test-Path $INSTALL_ROOT)) {
112
113
  New-Item -ItemType Directory -Path $INSTALL_ROOT -Force | Out-Null
@@ -119,11 +120,19 @@ function Install-PythonRuntime {
119
120
  Invoke-Python $PyBin @('-m', 'venv', $VENV_DIR)
120
121
  }
121
122
 
123
+ if ((Test-Path (Join-Path $RUNTIME_DIR 'pyproject.toml')) -or (Test-Path (Join-Path $RUNTIME_DIR 'setup.py'))) {
124
+ $packageDir = $RUNTIME_DIR
125
+ } elseif ((Test-Path (Join-Path $RUNTIME_DIR 'cli\pyproject.toml')) -or (Test-Path (Join-Path $RUNTIME_DIR 'cli\setup.py'))) {
126
+ $packageDir = Join-Path $RUNTIME_DIR 'cli'
127
+ } else {
128
+ throw "Runtime source does not contain an installable Python package. Expected pyproject.toml at '$RUNTIME_DIR' or '$RUNTIME_DIR\\cli'."
129
+ }
130
+
122
131
  Print-Message 'info' 'Installing Esprit dependencies (this can take a few minutes)...'
123
132
  $venvPip = Join-Path $VENV_DIR 'Scripts\pip.exe'
124
133
  & $venvPython -m pip install --upgrade pip setuptools wheel --quiet
125
134
  if ($LASTEXITCODE -ne 0) { throw 'pip upgrade failed' }
126
- & $venvPip install --upgrade $RUNTIME_DIR --quiet
135
+ & $venvPip install --upgrade $packageDir --quiet
127
136
  if ($LASTEXITCODE -ne 0) { throw 'pip install failed' }
128
137
  Print-Message 'success' '✓ Python runtime installed'
129
138
  }
@@ -116,6 +116,7 @@ sync_runtime_repo() {
116
116
 
117
117
  install_python_runtime() {
118
118
  local py_bin="$1"
119
+ local package_dir=""
119
120
 
120
121
  mkdir -p "$INSTALL_ROOT"
121
122
  if [ "$FORCE" = true ] || [ ! -x "$VENV_DIR/bin/python" ]; then
@@ -124,9 +125,19 @@ install_python_runtime() {
124
125
  "$py_bin" -m venv "$VENV_DIR"
125
126
  fi
126
127
 
128
+ if [ -f "$RUNTIME_DIR/pyproject.toml" ] || [ -f "$RUNTIME_DIR/setup.py" ]; then
129
+ package_dir="$RUNTIME_DIR"
130
+ elif [ -f "$RUNTIME_DIR/cli/pyproject.toml" ] || [ -f "$RUNTIME_DIR/cli/setup.py" ]; then
131
+ package_dir="$RUNTIME_DIR/cli"
132
+ else
133
+ print_message error "Runtime source does not contain an installable Python package."
134
+ print_message error "Expected pyproject.toml at $RUNTIME_DIR or $RUNTIME_DIR/cli."
135
+ exit 1
136
+ fi
137
+
127
138
  print_message info "${MUTED}Installing Esprit dependencies (this can take a few minutes)...${NC}"
128
139
  "$VENV_DIR/bin/python" -m pip install --upgrade pip setuptools wheel >/dev/null
129
- "$VENV_DIR/bin/pip" install --upgrade "$RUNTIME_DIR" >/dev/null
140
+ "$VENV_DIR/bin/pip" install --upgrade "$package_dir" >/dev/null
130
141
  print_message success "✓ Python runtime installed"
131
142
  }
132
143