@naarang/ccc 3.3.0-beta.17 → 3.3.0-beta.19

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,19 +525,21 @@ 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 enabled on Linux/macOS where it works cleanly
529
- // after the pi-bootstrap fix unblocked Pi's package.json read.
530
- // Windows triggers an unrelated Bun compile-linker panic
531
- // ("Internal assertion failure: total_insertions != output_files
532
- // .items.len" oven-sh/bun#23490) at BUILD time, so skip it
533
- // there. The Pi (linux-arm64) is the platform we care about
534
- // most and gets the startup speedup.
535
- const useBytecode = !target.startsWith('bun-windows');
528
+ // --bytecode is disabled everywhere. Two independent Bun bugs
529
+ // hit us regardless of code structure (verified with static
530
+ // and dynamic imports of Pi):
531
+ // - Windows: compile-linker panic at BUILD time
532
+ // ("Internal assertion failure: total_insertions !=
533
+ // output_files.items.len" oven-sh/bun#23490)
534
+ // - Linux ARM64: runtime crash at first import
535
+ // ("Expected CommonJS module to have a function wrapper")
536
+ // from Pi 0.74's CJS transitive deps
537
+ // Revisit when Bun fixes the linker/CJS interop or Pi goes
538
+ // pure ESM. Startup cost without bytecode is ~50-100ms.
536
539
  const buildArgs = [
537
540
  'build',
538
541
  '--compile',
539
542
  '--minify',
540
- ...(useBytecode ? ['--bytecode'] : []),
541
543
  `--target=${target}`,
542
544
  '--define',
543
545
  `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.17",
3
+ "version": "3.3.0-beta.19",
4
4
  "description": "Code Chat Connect - Control Claude Code from your mobile device",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -525,19 +525,21 @@ 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 enabled on Linux/macOS where it works cleanly
529
- // after the pi-bootstrap fix unblocked Pi's package.json read.
530
- // Windows triggers an unrelated Bun compile-linker panic
531
- // ("Internal assertion failure: total_insertions != output_files
532
- // .items.len" oven-sh/bun#23490) at BUILD time, so skip it
533
- // there. The Pi (linux-arm64) is the platform we care about
534
- // most and gets the startup speedup.
535
- const useBytecode = !target.startsWith('bun-windows');
528
+ // --bytecode is disabled everywhere. Two independent Bun bugs
529
+ // hit us regardless of code structure (verified with static
530
+ // and dynamic imports of Pi):
531
+ // - Windows: compile-linker panic at BUILD time
532
+ // ("Internal assertion failure: total_insertions !=
533
+ // output_files.items.len" oven-sh/bun#23490)
534
+ // - Linux ARM64: runtime crash at first import
535
+ // ("Expected CommonJS module to have a function wrapper")
536
+ // from Pi 0.74's CJS transitive deps
537
+ // Revisit when Bun fixes the linker/CJS interop or Pi goes
538
+ // pure ESM. Startup cost without bytecode is ~50-100ms.
536
539
  const buildArgs = [
537
540
  'build',
538
541
  '--compile',
539
542
  '--minify',
540
- ...(useBytecode ? ['--bytecode'] : []),
541
543
  `--target=${target}`,
542
544
  '--define',
543
545
  `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()) {