@emend-ai/utim 1.46.9 → 1.46.10

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 +21 -32
  2. package/package.json +1 -1
package/bin/utim.js CHANGED
@@ -127,52 +127,41 @@ function installEngine(python) {
127
127
  let termuxFlags = [];
128
128
  if (isTermux) {
129
129
  process.stderr.write(
130
- '\nšŸ’” Termux detected. Installing prebuilt system packages...\n\n'
130
+ '\nšŸ’” Termux detected. Preparing Android-compatible dependencies...\n\n'
131
131
  );
132
132
 
133
- // Step 1: install prebuilt system-level cryptography to avoid Rust/C compilation
134
- spawnSync('pkg', ['install', '-y', 'python-cryptography'], {
135
- stdio: 'inherit',
136
- shell: false,
137
- });
138
-
139
- // Step 2: upgrade pip/setuptools/wheel first
140
- spawnSync(python, ['-m', 'pip', 'install', '--upgrade', '--quiet', 'pip', 'setuptools', 'wheel'], {
141
- stdio: 'pipe',
142
- shell: false,
143
- timeout: 60000,
144
- });
133
+ // Step 1: upgrade pkg repo list
134
+ spawnSync('pkg', ['update', '-y'], { stdio: 'pipe', shell: false, timeout: 30000 });
145
135
 
146
- // Step 3: pre-install pydantic-core from the Android pre-built wheel index
147
- // BEFORE installing utim-cli, so pip never tries to compile it from Rust source.
148
- process.stderr.write('\nāš™ Pre-installing pydantic-core (Android prebuilt wheel)...\n\n');
149
- const pydanticInstall = spawnSync(
150
- python,
151
- [
152
- '-m', 'pip', 'install', '--upgrade', '--quiet',
153
- 'pydantic-core',
154
- '--extra-index-url', 'https://eutalix.github.io/android-pydantic-core/',
155
- ],
136
+ // Step 2: install pydantic via Termux's own compiled package.
137
+ // This is the ONLY reliable way to get pydantic-core on Android without
138
+ // a Rust toolchain. pkg ships a prebuilt binary for aarch64-linux-android.
139
+ process.stderr.write('āš™ Installing pydantic via Termux package manager...\n\n');
140
+ const pkgResult = spawnSync(
141
+ 'pkg', ['install', '-y', 'python-pydantic', 'python-cryptography'],
156
142
  { stdio: 'inherit', shell: false, timeout: 120000 }
157
143
  );
158
144
 
159
- if (pydanticInstall.status !== 0) {
145
+ if (pkgResult.status !== 0) {
160
146
  process.stderr.write(
161
- '\n⚠ pydantic-core prebuilt install failed. Will try Termux repository fallback...\n\n'
147
+ '\n⚠ pkg install failed — will try pip with prebuilt wheel index as fallback...\n\n'
162
148
  );
163
- // Fallback: Termux user repository
149
+ // Fallback: Eutalix prebuilt wheels (works for Python 3.11/3.12)
164
150
  spawnSync(
165
151
  python,
166
- [
167
- '-m', 'pip', 'install', '--upgrade', '--quiet',
168
- 'pydantic-core',
169
- '--extra-index-url', 'https://termux-user-repository.github.io/pypi/',
170
- ],
152
+ ['-m', 'pip', 'install', '--upgrade', '--quiet',
153
+ 'pydantic-core', 'pydantic',
154
+ '--extra-index-url', 'https://eutalix.github.io/android-pydantic-core/'],
171
155
  { stdio: 'inherit', shell: false, timeout: 120000 }
172
156
  );
173
157
  }
174
158
 
175
- // Extra index flags for the main utim-cli install (catches any remaining Rust deps)
159
+ // Step 3: upgrade pip/setuptools/wheel
160
+ spawnSync(python, ['-m', 'pip', 'install', '--upgrade', '--quiet', 'pip', 'setuptools', 'wheel'], {
161
+ stdio: 'pipe', shell: false, timeout: 60000,
162
+ });
163
+
164
+ // Extra index as safety net for any remaining Rust-based transitive deps
176
165
  termuxFlags = [
177
166
  '--extra-index-url', 'https://eutalix.github.io/android-pydantic-core/',
178
167
  '--extra-index-url', 'https://termux-user-repository.github.io/pypi/',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emend-ai/utim",
3
- "version": "1.46.9",
3
+ "version": "1.46.10",
4
4
  "description": "UTIM – Universal Terminal Intelligence Manager. An agentic AI coding assistant for your terminal.",
5
5
  "keywords": [
6
6
  "ai",