capix-code 1.3.0 → 1.4.0

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.
package/README.md CHANGED
@@ -102,6 +102,8 @@ The default config (`config/defaults.json`) registers:
102
102
  | Base URL | `CAPIX_BASE_URL` env var (defaults to `https://capix.network/api/v1`) |
103
103
  | API Key | `CAPIX_API_KEY` env var |
104
104
  | Default Model | `CAPIX_MODEL` env var (defaults to `capix/auto` — smart route) |
105
+ | Preferred Route | `CAPIX_PREFERRED_PROVIDER` (`auto` mixes OpenRouter + UsePod with failover) |
106
+ | Preferred Auto Model | `CAPIX_PREFERRED_MODEL` (optional; empty keeps task-aware model selection) |
105
107
  | Smart Route: Classifier | `capix/supergemma-gemma3-4b` via Capix gateway (cached per session) |
106
108
  | Smart Route: Reasoning | Live catalog (keyword + memory-matched), fallback `capix/supergemma-gemma3-27b` |
107
109
  | Smart Route: Coding | Live catalog (keyword + memory-matched), fallback `capix/supergemma-gemma3-4b` |
@@ -111,6 +113,17 @@ The default config (`config/defaults.json`) registers:
111
113
 
112
114
  Override anything in `~/.config/capix-code/capix-code.json` or the project-level `capix-code.json`.
113
115
 
116
+ The default `auto` route mixes OpenRouter and UsePod by live price and availability.
117
+ An explicit route is a preference, not a hard lock: Capix tries it first and falls back
118
+ to another enabled route. Surplus is temporarily paused in production, so a
119
+ saved Surplus preference safely falls through. Example:
120
+
121
+ ```bash
122
+ export CAPIX_PREFERRED_PROVIDER=openrouter
123
+ export CAPIX_PREFERRED_MODEL=google/gemini-2.5-flash-lite
124
+ capix-code
125
+ ```
126
+
114
127
  ## Contributing
115
128
 
116
129
  See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, commit conventions, and PR workflow.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capix-code",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Capix Code \u2014 decentralized AI coding agent with GPU marketplace",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -30,7 +30,7 @@
30
30
  "resolve-version": "node scripts/resolve-version.mjs",
31
31
  "prepack": "node scripts/prepare-npm-meta.mjs",
32
32
  "pack:npm-platform": "node scripts/prepare-npm-platform.mjs",
33
- "postinstall": "node scripts/postinstall.js"
33
+ "postinstall": "node scripts/postinstall.cjs"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@ai-sdk/provider": "3.0.8",
@@ -60,11 +60,11 @@
60
60
  ]
61
61
  },
62
62
  "optionalDependencies": {
63
- "@capix-code/darwin-arm64": "1.2.7",
64
- "@capix-code/darwin-x64": "1.2.7",
65
- "@capix-code/linux-arm64": "1.2.7",
66
- "@capix-code/linux-x64": "1.2.7",
67
- "@capix-code/windows-x64": "1.2.7"
63
+ "@capix-code/darwin-arm64": "1.4.0",
64
+ "@capix-code/darwin-x64": "1.4.0",
65
+ "@capix-code/linux-arm64": "1.4.0",
66
+ "@capix-code/linux-x64": "1.4.0",
67
+ "@capix-code/windows-x64": "1.4.0"
68
68
  },
69
69
  "keywords": [
70
70
  "ai",
@@ -4,10 +4,16 @@ const fs = require('fs');
4
4
  const path = require('path');
5
5
  const os = require('os');
6
6
 
7
+ // Skip in CI environments
8
+ if (process.env.CI || process.env.GITHUB_ACTIONS) {
9
+ console.log('Skipping binary download in CI environment.');
10
+ process.exit(0);
11
+ }
12
+
7
13
  const PLATFORM = process.platform === 'darwin' ? 'darwin' : 'linux';
8
14
  const ARCH = process.arch === 'arm64' ? 'arm64' : 'x64';
9
15
  const VERSION = '1.3.0';
10
- const RELEASE = `https://github.com/CapIX-Protocol/CapIX-Code/releases/download/v${VERSION}`;
16
+ const RELEASE = 'https://github.com/CapIX-Protocol/CapIX-Code/releases/download/v' + VERSION;
11
17
 
12
18
  const installDir = path.join(os.homedir(), '.capix-code');
13
19
  const binDir = path.join(installDir, 'bin');
@@ -18,16 +24,13 @@ fs.mkdirSync(engineDir, { recursive: true });
18
24
 
19
25
  try {
20
26
  console.log('Downloading capix-code binary...');
21
- execSync(`curl -fsSL ${RELEASE}/capix-code -o ${binDir}/capix-code`, { stdio: 'inherit' });
27
+ execSync('curl -fsSL ' + RELEASE + '/capix-code -o ' + binDir + '/capix-code', { stdio: 'inherit' });
22
28
  fs.chmodSync(path.join(binDir, 'capix-code'), 0o755);
23
-
24
- console.log('Downloading capix-engine (this may take a minute)...');
25
- execSync(`curl -fsSL ${RELEASE}/capix-engine -o ${engineDir}/capix-engine`, { stdio: 'inherit', timeout: 300000 });
26
- fs.chmodSync(path.join(engineDir, 'capix-engine'), 0o755);
27
-
28
29
  console.log('✓ Capix Code installed to ' + installDir);
29
30
  console.log('Run: capix-code --version');
30
31
  } catch (err) {
31
32
  console.warn('⚠ Binary download failed. Download manually from:');
32
33
  console.warn(' https://github.com/CapIX-Protocol/CapIX-Code/releases');
34
+ // Don't fail the install
35
+ process.exit(0);
33
36
  }