@naarang/ccc 3.3.0-beta.16 → 3.3.0-beta.18

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.
@@ -525,22 +525,19 @@ for (const { name, target, outfile, ptyLib, ngrokLib, ngrokPkg } of selectedTarg
525
525
 
526
526
  // Build the binary (bun-pty and ngrok are now bundled via the generated loaders).
527
527
  //
528
- // --bytecode is disabled across all targets Bun 1.3.13 has
529
- // multiple regressions when combined with --compile:
530
- // - Windows panics: "Internal assertion failure:
531
- // total_insertions != output_files.items.len"
532
- // (oven-sh/bun#23490)
533
- // - Linux ARM64 binary loads but throws on first import:
534
- // "TypeError: Expected CommonJS module to have a function
535
- // wrapper" bytecode mangles CJS-shaped deps (some of
536
- // pi-coding-agent's transitive deps are CJS).
537
- // The startup speedup isn't worth shipping a broken binary on
538
- // any platform. Re-enable per-target when Bun's bytecode +
539
- // CJS interop stabilizes.
528
+ // --bytecode enabled on Linux/macOS only. Windows triggers an
529
+ // unrelated Bun compile-linker panic ("Internal assertion
530
+ // failure: total_insertions != output_files.items.len"
531
+ // oven-sh/bun#23490) at BUILD time even after dropping the
532
+ // dynamic-import intermediate. Verified locally: bun panics
533
+ // regardless of import structure on Windows. Linux ARM64 is
534
+ // the platform we care about most and gets the speedup.
535
+ const useBytecode = !target.startsWith('bun-windows');
540
536
  const buildArgs = [
541
537
  'build',
542
538
  '--compile',
543
539
  '--minify',
540
+ ...(useBytecode ? ['--bytecode'] : []),
544
541
  `--target=${target}`,
545
542
  '--define',
546
543
  `BUILD_VERSION="${VERSION}"`,
@@ -11,7 +11,7 @@
11
11
  * and `bun run` it next to the installed backend.
12
12
  */
13
13
 
14
- import { loadPiSdk } from '../src/services/pi-agent/sdk-loader';
14
+ import * as piSdk from '@earendil-works/pi-coding-agent';
15
15
  import * as fs from 'node:fs';
16
16
  import * as path from 'node:path';
17
17
  import * as os from 'node:os';
@@ -24,8 +24,7 @@ function header(label: string): void {
24
24
 
25
25
  async function main(): Promise<void> {
26
26
  header('1. Pi SDK source');
27
- const resolved = await loadPiSdk();
28
- console.log('install path:', resolved.installPath);
27
+ console.log('install path: bundled');
29
28
 
30
29
  header('2. What does ~/.pi/agent/auth.json look like?');
31
30
  const authPath = path.join(os.homedir(), '.pi', 'agent', 'auth.json');
@@ -51,7 +50,6 @@ async function main(): Promise<void> {
51
50
  }
52
51
 
53
52
  header('3. What does AuthStorage.list() return?');
54
- const { piSdk } = resolved;
55
53
  const authStorage = piSdk.AuthStorage.create();
56
54
  console.log('list():', authStorage.list());
57
55
  for (const provider of authStorage.list()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naarang/ccc",
3
- "version": "3.3.0-beta.16",
3
+ "version": "3.3.0-beta.18",
4
4
  "description": "Code Chat Connect - Control Claude Code from your mobile device",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -525,22 +525,19 @@ for (const { name, target, outfile, ptyLib, ngrokLib, ngrokPkg } of selectedTarg
525
525
 
526
526
  // Build the binary (bun-pty and ngrok are now bundled via the generated loaders).
527
527
  //
528
- // --bytecode is disabled across all targets Bun 1.3.13 has
529
- // multiple regressions when combined with --compile:
530
- // - Windows panics: "Internal assertion failure:
531
- // total_insertions != output_files.items.len"
532
- // (oven-sh/bun#23490)
533
- // - Linux ARM64 binary loads but throws on first import:
534
- // "TypeError: Expected CommonJS module to have a function
535
- // wrapper" bytecode mangles CJS-shaped deps (some of
536
- // pi-coding-agent's transitive deps are CJS).
537
- // The startup speedup isn't worth shipping a broken binary on
538
- // any platform. Re-enable per-target when Bun's bytecode +
539
- // CJS interop stabilizes.
528
+ // --bytecode enabled on Linux/macOS only. Windows triggers an
529
+ // unrelated Bun compile-linker panic ("Internal assertion
530
+ // failure: total_insertions != output_files.items.len"
531
+ // oven-sh/bun#23490) at BUILD time even after dropping the
532
+ // dynamic-import intermediate. Verified locally: bun panics
533
+ // regardless of import structure on Windows. Linux ARM64 is
534
+ // the platform we care about most and gets the speedup.
535
+ const useBytecode = !target.startsWith('bun-windows');
540
536
  const buildArgs = [
541
537
  'build',
542
538
  '--compile',
543
539
  '--minify',
540
+ ...(useBytecode ? ['--bytecode'] : []),
544
541
  `--target=${target}`,
545
542
  '--define',
546
543
  `BUILD_VERSION="${VERSION}"`,
@@ -11,7 +11,7 @@
11
11
  * and `bun run` it next to the installed backend.
12
12
  */
13
13
 
14
- import { loadPiSdk } from '../src/services/pi-agent/sdk-loader';
14
+ import * as piSdk from '@earendil-works/pi-coding-agent';
15
15
  import * as fs from 'node:fs';
16
16
  import * as path from 'node:path';
17
17
  import * as os from 'node:os';
@@ -24,8 +24,7 @@ function header(label: string): void {
24
24
 
25
25
  async function main(): Promise<void> {
26
26
  header('1. Pi SDK source');
27
- const resolved = await loadPiSdk();
28
- console.log('install path:', resolved.installPath);
27
+ console.log('install path: bundled');
29
28
 
30
29
  header('2. What does ~/.pi/agent/auth.json look like?');
31
30
  const authPath = path.join(os.homedir(), '.pi', 'agent', 'auth.json');
@@ -51,7 +50,6 @@ async function main(): Promise<void> {
51
50
  }
52
51
 
53
52
  header('3. What does AuthStorage.list() return?');
54
- const { piSdk } = resolved;
55
53
  const authStorage = piSdk.AuthStorage.create();
56
54
  console.log('list():', authStorage.list());
57
55
  for (const provider of authStorage.list()) {