@emend-ai/utim 1.46.14 → 1.46.15

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 +37 -6
  2. package/package.json +1 -1
package/bin/utim.js CHANGED
@@ -144,13 +144,44 @@ function installEngine(python) {
144
144
  shell: false,
145
145
  });
146
146
 
147
- // Step 2: Install pydantic-core using the Eutalix community shell installer script.
148
- // This is the only bulletproof way to download the pre-compiled Android aarch64 wheel
149
- // for Python 3.13+ without triggering compiling from Rust source.
150
- process.stderr.write('\n⚙ Running precompiled pydantic-core Android wheel installer...\n\n');
147
+ // Step 2: Install pydantic-core using an inline python script.
148
+ // This is 100% reliable as it uses pure python to fetch the latest eutalix release wheel and install it,
149
+ // avoiding dependencies on curl/wget/bash which might not be installed by default on Termux.
150
+ process.stderr.write('\n⚙ Downloading and installing pre-compiled pydantic-core wheel...\n\n');
151
+ const installScript = `
152
+ import sys, urllib.request, json, subprocess, os, platform
153
+ try:
154
+ arch = platform.machine().lower()
155
+ plat_map = {'aarch64': 'aarch64', 'armv7l': 'armv7l', 'armv8l': 'armv7l', 'x86_64': 'x86_64', 'i686': 'i686', 'i386': 'i686', 'amd64': 'x86_64'}
156
+ plat = plat_map.get(arch, arch)
157
+ py_tag = f"cp{sys.version_info.major}{sys.version_info.minor}"
158
+ url = "https://api.github.com/repos/Eutalix/android-pydantic-core/releases/latest"
159
+ req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'})
160
+ with urllib.request.urlopen(req) as r:
161
+ data = json.loads(r.read().decode())
162
+ wheel_url = None
163
+ for asset in data.get('assets', []):
164
+ name = asset.get('name', '')
165
+ if name.endswith('.whl') and py_tag in name and plat in name:
166
+ wheel_url = asset.get('browser_download_url')
167
+ break
168
+ if wheel_url:
169
+ print("[+] Found wheel:", wheel_url)
170
+ urllib.request.urlretrieve(wheel_url, "pydantic_core_tmp.whl")
171
+ subprocess.run([sys.executable, "-m", "pip", "install", "--force-reinstall", "pydantic_core_tmp.whl"], check=True)
172
+ if os.path.exists("pydantic_core_tmp.whl"):
173
+ os.remove("pydantic_core_tmp.whl")
174
+ print("[+] Successfully installed pydantic-core!")
175
+ else:
176
+ print("[-] No matching wheel found for", py_tag, plat)
177
+ sys.exit(1)
178
+ except Exception as e:
179
+ print("[-] Failed to download/install pydantic-core wheel:", e)
180
+ sys.exit(1)
181
+ `;
151
182
  spawnSync(
152
- 'sh',
153
- ['-c', 'curl -sL https://raw.githubusercontent.com/Eutalix/android-pydantic-core/main/install_pydantic_core.sh | bash'],
183
+ python,
184
+ ['-c', installScript],
154
185
  { stdio: 'inherit', shell: false, timeout: 180000 }
155
186
  );
156
187
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emend-ai/utim",
3
- "version": "1.46.14",
3
+ "version": "1.46.15",
4
4
  "description": "UTIM – Universal Terminal Intelligence Manager. An agentic AI coding assistant for your terminal.",
5
5
  "keywords": [
6
6
  "ai",