capix-code 2.1.4 → 2.2.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/rebrand.sh +0 -64
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capix-code",
3
- "version": "2.1.4",
3
+ "version": "2.2.0",
4
4
  "description": "Capix Code — decentralized AI coding agent with GPU marketplace",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -243,69 +243,5 @@ fi
243
243
 
244
244
  echo "✓ Rebrand complete. Only the binary name, config dirs, and env vars are rebranded."
245
245
  echo " Runtime plugin/provider are staged by scripts/build.sh and verified fail-closed."
246
- # ── Standalone binary integration ──────────────────────────────────────
247
- # Copy our source files into the upstream's capix-code package so they
248
- # are compiled INTO the binary by Bun. This makes the binary truly
249
- # standalone — no external .ts files, tsconfig, or typescript needed
250
- # for the core provider.
251
-
252
- echo "▸ Integrating Capix provider into upstream source tree…"
253
-
254
- # Copy our src/*.ts files into the upstream's capix-code/src/
255
- # Only copy files that DON'T import from local subdirectories that
256
- # don't exist in the upstream tree. plugin.ts and native-bridge.ts
257
- # load EXTERNALLY at runtime (they need packages not in the upstream).
258
- for file in \
259
- ai-sdk-provider.ts broker.ts capix-provider.ts credential-constants.ts \
260
- logger.ts url-builder.ts; do
261
- if [ -f "$DIR/src/$file" ]; then
262
- cp "$DIR/src/$file" "$CAPIX_CODE_DIR/packages/capix-code/src/$file"
263
- fi
264
- done
265
-
266
-
267
- # Copy our runtime-provider package
268
- mkdir -p "$CAPIX_CODE_DIR/packages/runtime-provider/src"
269
- cp "$DIR/packages/runtime-provider/package.json" "$CAPIX_CODE_DIR/packages/runtime-provider/package.json"
270
- cp "$DIR/packages/runtime-provider/src/index.ts" "$CAPIX_CODE_DIR/packages/runtime-provider/src/index.ts"
271
-
272
- # Add @capix/runtime-provider to the upstream's workspace
273
- UPSTREAM_PKG="$CAPIX_CODE_DIR/package.json"
274
- if [ -f "$UPSTREAM_PKG" ]; then
275
- if ! grep -q "runtime-provider" "$UPSTREAM_PKG"; then
276
- sed -i.bak 's|"packages/capix-code"|"packages/capix-code",\n "packages/runtime-provider"|' "$UPSTREAM_PKG"
277
- rm -f "$UPSTREAM_PKG.bak"
278
- fi
279
- fi
280
-
281
- # Add @capix/runtime-provider to BUNDLED_PROVIDERS in provider.ts
282
- PROVIDER_TS="$CAPIX_CODE_DIR/packages/capix-code/src/provider/provider.ts"
283
- if [ -f "$PROVIDER_TS" ] && ! grep -q "capix/runtime-provider" "$PROVIDER_TS"; then
284
- sed -i.bak 's|const BUNDLED_PROVIDERS: Record<string, () => Promise<(opts: any) => BundledSDK>> = {|const BUNDLED_PROVIDERS: Record<string, () => Promise<(opts: any) => BundledSDK>> = {\n "@capix/runtime-provider": () => import("@capix/runtime-provider").then((m) => m.createCapix),|' "$PROVIDER_TS"
285
- rm -f "$PROVIDER_TS.bak"
286
- fi
287
-
288
- # The @ai-sdk/provider import in runtime-provider needs to resolve
289
- # from the upstream's node_modules. Add it to the workspace deps.
290
- RT_PKG="$CAPIX_CODE_DIR/packages/runtime-provider/package.json"
291
- if [ -f "$RT_PKG" ]; then
292
- # Change export path to work from upstream context
293
- cat > "$RT_PKG" << 'RTPKG'
294
- {
295
- "name": "@capix/runtime-provider",
296
- "version": "0.1.0",
297
- "private": true,
298
- "type": "module",
299
- "exports": "./src/index.ts",
300
- "dependencies": {
301
- "@ai-sdk/provider": "3.0.8"
302
- }
303
- }
304
- RTPKG
305
- fi
306
-
307
- echo " ✓ Capix provider integrated into source tree"
308
-
309
- # ── End standalone integration ────────────────────────────────────────
310
246
 
311
247
  "$DIR/scripts/assert-upstream-brand.sh" "$CAPIX_CODE_DIR"