@emend-ai/utim 1.46.5 → 1.46.7

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 (2) hide show
  1. package/bin/utim.js +13 -25
  2. package/package.json +1 -1
package/bin/utim.js CHANGED
@@ -123,35 +123,23 @@ function runPip(python, extraFlags) {
123
123
  }
124
124
  }
125
125
 
126
- // ── Install UTIM engine — tries multiple strategies ───────────────────────────
127
126
  function installEngine(python) {
128
- // Termux: install prebuilt system packages first to skip pydantic-core compilation
127
+ // Termux: install prebuilt system cryptography package to bypass heavy rust compile
128
+ let termuxFlags = [];
129
129
  if (isTermux) {
130
130
  process.stderr.write(
131
- '\n💡 Termux: adding Termux User Repository (tur-repo) to find prebuilt python-pydantic...\n\n'
131
+ '\n💡 Termux: installing prebuilt system cryptography package...\n\n'
132
132
  );
133
- // Register tur-repo first (contains prebuilt python-pydantic)
134
- spawnSync('pkg', ['install', '-y', 'tur-repo'], { stdio: 'inherit', shell: false });
135
-
136
- process.stderr.write(
137
- '\n💡 Termux: installing prebuilt system cryptography and pydantic packages...\n\n'
138
- );
139
- const r1 = spawnSync('pkg', ['install', '-y', 'python-cryptography', 'python-pydantic'], {
133
+ spawnSync('pkg', ['install', '-y', 'python-cryptography'], {
140
134
  stdio: 'inherit',
141
135
  shell: false,
142
136
  });
143
137
 
144
- // Fallback: If prebuilt system packages fail to install, install Rust compiler toolchain
145
- // so pip can compile pydantic-core and cryptography from source
146
- if (r1.status !== 0) {
147
- process.stderr.write(
148
- '\n💡 Prebuilt package setup failed. Installing build dependencies (rust, clang) to compile from source...\n\n'
149
- );
150
- spawnSync('pkg', ['install', '-y', 'clang', 'rust', 'make', 'libffi', 'openssl'], {
151
- stdio: 'inherit',
152
- shell: false,
153
- });
154
- }
138
+ // Use Android-specific pre-compiled wheel indexes for pydantic and other Rust dependencies
139
+ termuxFlags = [
140
+ '--extra-index-url', 'https://eutalix.github.io/android-pydantic-core/',
141
+ '--extra-index-url', 'https://termux-user-repository.github.io/pypi/'
142
+ ];
155
143
 
156
144
  spawnSync(python, ['-m', 'pip', 'install', '--upgrade', 'pip', 'setuptools', 'wheel'], {
157
145
  stdio: 'pipe',
@@ -164,19 +152,19 @@ function installEngine(python) {
164
152
  spinner.stop('\n⚙ Installing UTIM Python engine...\n');
165
153
 
166
154
  // Strategy 1: standard install
167
- if (runPip(python, [])) return true;
155
+ if (runPip(python, termuxFlags)) return true;
168
156
 
169
157
  // Strategy 2: --user (needed on systems where global site-packages is read-only)
170
158
  process.stderr.write('\n Retrying with --user flag...\n\n');
171
- if (runPip(python, ['--user'])) return true;
159
+ if (runPip(python, [...termuxFlags, '--user'])) return true;
172
160
 
173
161
  // Strategy 3: upgrade pip first, then retry both
174
162
  process.stderr.write('\n Upgrading pip and retrying...\n\n');
175
163
  spawnSync(python, ['-m', 'pip', 'install', '--upgrade', 'pip'], {
176
164
  stdio: 'pipe', shell: isWin, windowsHide: true, timeout: 60000,
177
165
  });
178
- if (runPip(python, [])) return true;
179
- if (runPip(python, ['--user'])) return true;
166
+ if (runPip(python, termuxFlags)) return true;
167
+ if (runPip(python, [...termuxFlags, '--user'])) return true;
180
168
 
181
169
  return false;
182
170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emend-ai/utim",
3
- "version": "1.46.5",
3
+ "version": "1.46.7",
4
4
  "description": "UTIM – Universal Terminal Intelligence Manager. An agentic AI coding assistant for your terminal.",
5
5
  "keywords": [
6
6
  "ai",