@emend-ai/utim 1.46.8 → 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 +33 -13
  2. package/package.json +1 -1
package/bin/utim.js CHANGED
@@ -124,28 +124,48 @@ function runPip(python, extraFlags) {
124
124
  }
125
125
 
126
126
  function installEngine(python) {
127
- // Termux: install prebuilt system cryptography package to bypass heavy rust compile
128
127
  let termuxFlags = [];
129
128
  if (isTermux) {
130
129
  process.stderr.write(
131
- '\nšŸ’” Termux: installing prebuilt system cryptography package...\n\n'
130
+ '\nšŸ’” Termux detected. Preparing Android-compatible dependencies...\n\n'
132
131
  );
133
- spawnSync('pkg', ['install', '-y', 'python-cryptography'], {
134
- stdio: 'inherit',
135
- shell: false,
132
+
133
+ // Step 1: upgrade pkg repo list
134
+ spawnSync('pkg', ['update', '-y'], { stdio: 'pipe', shell: false, timeout: 30000 });
135
+
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'],
142
+ { stdio: 'inherit', shell: false, timeout: 120000 }
143
+ );
144
+
145
+ if (pkgResult.status !== 0) {
146
+ process.stderr.write(
147
+ '\n⚠ pkg install failed — will try pip with prebuilt wheel index as fallback...\n\n'
148
+ );
149
+ // Fallback: Eutalix prebuilt wheels (works for Python 3.11/3.12)
150
+ spawnSync(
151
+ python,
152
+ ['-m', 'pip', 'install', '--upgrade', '--quiet',
153
+ 'pydantic-core', 'pydantic',
154
+ '--extra-index-url', 'https://eutalix.github.io/android-pydantic-core/'],
155
+ { stdio: 'inherit', shell: false, timeout: 120000 }
156
+ );
157
+ }
158
+
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,
136
162
  });
137
163
 
138
- // Use Android-specific pre-compiled wheel indexes for pydantic and other Rust dependencies
164
+ // Extra index as safety net for any remaining Rust-based transitive deps
139
165
  termuxFlags = [
140
166
  '--extra-index-url', 'https://eutalix.github.io/android-pydantic-core/',
141
- '--extra-index-url', 'https://termux-user-repository.github.io/pypi/'
167
+ '--extra-index-url', 'https://termux-user-repository.github.io/pypi/',
142
168
  ];
143
-
144
- spawnSync(python, ['-m', 'pip', 'install', '--upgrade', 'pip', 'setuptools', 'wheel'], {
145
- stdio: 'pipe',
146
- shell: false,
147
- timeout: 60000,
148
- });
149
169
  }
150
170
 
151
171
  const spinner = createSpinner('Setting up UTIM (first run)');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emend-ai/utim",
3
- "version": "1.46.8",
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",