@anh3d0nic/qwen-code-termux-ice 16.0.5 → 16.0.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/qwen-ice +23 -7
  2. package/package.json +1 -1
package/bin/qwen-ice CHANGED
@@ -1,15 +1,15 @@
1
1
  #!/data/data/com.termux/files/usr/bin/node
2
2
  /**
3
- * ❄️ Qwen Code ICE v16.0.0 — Main Binary
3
+ * ❄️ Qwen Code ICE v16.0.6 — Main Binary
4
+ * Fixed: Auto-runs postinstall if core dir missing on fresh install
4
5
  */
5
6
 
6
7
  const fs = require('fs');
7
8
  const path = require('path');
8
- const { pathToFileURL } = require('url');
9
9
  const readline = require('readline');
10
10
  const { spawn } = require('child_process');
11
11
 
12
- const VERSION = '16.0.0';
12
+ const VERSION = '16.0.6';
13
13
  const INSTALL_DIR = process.env.HOME + '/.qwen-ice';
14
14
  const CONFIG_DIR = path.join(INSTALL_DIR, 'config');
15
15
  const MEMORY_DIR = path.join(INSTALL_DIR, 'memory');
@@ -281,14 +281,30 @@ function printColdStart() {
281
281
  }
282
282
  }
283
283
 
284
- function processQuery(query) {
284
+ function getLatestIceVersion() {
285
+ // Check if core directory exists, run postinstall if not
286
+ if (!fs.existsSync(CORE_DIR)) {
287
+ const { execSync } = require('child_process');
288
+ execSync('node ' + path.join(__dirname, '../scripts/postinstall.cjs'), { stdio: 'inherit' });
289
+ }
290
+ const versions = fs.readdirSync(CORE_DIR)
291
+ .filter(f => f.startsWith('ice-v') && f.endsWith('.js'))
292
+ .sort();
293
+ if (!versions || versions.length === 0) {
294
+ console.error('ICE core not found. Run: node scripts/postinstall.cjs');
295
+ process.exit(1);
296
+ }
297
+ return versions[versions.length - 1] || 'ice-v15.js';
298
+ }
299
+
300
+ async function processQuery(query) {
285
301
  try {
286
302
  // Dynamically load latest ICE version
287
- const versions = fs.readdirSync(CORE_DIR).filter(f => f.startsWith('ice-v') && f.endsWith('.js')).sort();
288
- const latest = versions[versions.length - 1] || 'ice-v15.js';
303
+ const latest = getLatestIceVersion();
289
304
  const iceModule = require(path.join(CORE_DIR, latest));
290
305
  const IceV16 = iceModule.IceV16 || iceModule.UnifiedPipeline;
291
- const ice = new IceV16({ yolo, model: selectedModel }); return ice.process(query);
306
+ const ice = new IceV16({ yolo, model: selectedModel });
307
+ return ice.process(query);
292
308
  } catch (err) {
293
309
  return { error: true, message: `Failed to process query: ${err.message}` };
294
310
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anh3d0nic/qwen-code-termux-ice",
3
- "version": "16.0.5",
3
+ "version": "16.0.7",
4
4
  "description": "Qwen Code ICE v16.0.5 — Compounding Intelligence with proper npm install structure",
5
5
  "main": "core/ice-v16.js",
6
6
  "bin": {