@naarang/ccc 1.2.0-beta.9 → 2.0.0-alpha.1

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 (42) hide show
  1. package/README.md +136 -569
  2. package/bin/ccc.cjs +76 -0
  3. package/dist/index.js +2640 -1
  4. package/dist/ngrok.win32-x64-msvc-zjj4rz8c.node +0 -0
  5. package/dist/scripts/postinstall.cjs +84 -0
  6. package/package.json +32 -25
  7. package/scripts/postinstall.cjs +84 -0
  8. package/LICENSE +0 -44
  9. package/bin/ccc.js +0 -45
  10. package/dist/claude/manager.js +0 -1
  11. package/dist/claude/project-setup.js +0 -1
  12. package/dist/claude/session-manager.js +0 -1
  13. package/dist/claude/session-message-parser.js +0 -1
  14. package/dist/claude/session.js +0 -1
  15. package/dist/claude/stream-parser.js +0 -1
  16. package/dist/firebase/admin.js +0 -1
  17. package/dist/hooks/notification_hook.js +0 -306
  18. package/dist/hooks/package-lock.json +0 -550
  19. package/dist/hooks/package.json +0 -16
  20. package/dist/hooks/permissions_hook.js +0 -657
  21. package/dist/mdns/service.js +0 -1
  22. package/dist/mqtt/client.js +0 -1
  23. package/dist/mqtt-broker.js +0 -1
  24. package/dist/ngrok/manager.js +0 -1
  25. package/dist/notifications/handlers.js +0 -1
  26. package/dist/notifications/index.js +0 -1
  27. package/dist/notifications/manager.js +0 -1
  28. package/dist/notifications/preferences-manager.js +0 -1
  29. package/dist/notifications/preferences-storage.js +0 -1
  30. package/dist/notifications/sender.js +0 -1
  31. package/dist/notifications/storage.js +0 -1
  32. package/dist/notifications/types.js +0 -1
  33. package/dist/proxy/router.js +0 -1
  34. package/dist/public/terminal.html +0 -250
  35. package/dist/qr/generator.js +0 -1
  36. package/dist/terminal/server.js +0 -1
  37. package/dist/types/index.js +0 -1
  38. package/dist/utils/auto-update.js +0 -1
  39. package/dist/utils/logger.js +0 -1
  40. package/dist/utils/version.js +0 -1
  41. package/scripts/check-pty.js +0 -142
  42. package/scripts/obfuscate.js +0 -77
package/bin/ccc.cjs ADDED
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * CCC - Code Chat Connect v2
5
+ *
6
+ * Global CLI to start the Code Chat Connect backend server.
7
+ * Control Claude Code from your mobile device.
8
+ *
9
+ * Usage: ccc [options]
10
+ *
11
+ * REQUIRES: Bun runtime (https://bun.sh)
12
+ */
13
+
14
+ const { existsSync } = require('fs');
15
+ const { join } = require('path');
16
+ const { spawn } = require('child_process');
17
+
18
+ const distPath = join(__dirname, '..', 'dist', 'index.js');
19
+ const packageJson = require(join(__dirname, '..', 'package.json'));
20
+
21
+ // Check if Bun is available
22
+ function checkBun() {
23
+ return new Promise((resolve) => {
24
+ const result = spawn('bun', ['--version'], { stdio: 'pipe' });
25
+ result.on('close', (code) => resolve(code === 0));
26
+ result.on('error', () => resolve(false));
27
+ });
28
+ }
29
+
30
+ async function main() {
31
+ // Check if Bun is installed
32
+ const hasBun = await checkBun();
33
+
34
+ if (!hasBun) {
35
+ console.error(`
36
+ ╔═══════════════════════════════════════════════════════════╗
37
+ ║ ║
38
+ ║ CCC - Code Chat Connect v${packageJson.version.padEnd(30)}║
39
+ ║ ║
40
+ ║ ERROR: Bun runtime is required but not installed. ║
41
+ ║ ║
42
+ ║ Install Bun: ║
43
+ ║ Windows: powershell -c "irm bun.sh/install.ps1|iex" ║
44
+ ║ macOS: curl -fsSL https://bun.sh/install | bash ║
45
+ ║ Linux: curl -fsSL https://bun.sh/install | bash ║
46
+ ║ ║
47
+ ║ Learn more: https://bun.sh ║
48
+ ║ ║
49
+ ╚═══════════════════════════════════════════════════════════╝
50
+ `);
51
+ process.exit(1);
52
+ }
53
+
54
+ // Check if dist exists
55
+ if (!existsSync(distPath)) {
56
+ console.error('Error: Build files not found. Please reinstall the package.');
57
+ process.exit(1);
58
+ }
59
+
60
+ // Run with Bun
61
+ const bunProcess = spawn('bun', ['run', distPath].concat(process.argv.slice(2)), {
62
+ stdio: 'inherit',
63
+ env: process.env,
64
+ });
65
+
66
+ bunProcess.on('close', (code) => {
67
+ process.exit(code || 0);
68
+ });
69
+
70
+ bunProcess.on('error', (err) => {
71
+ console.error('Failed to start:', err.message);
72
+ process.exit(1);
73
+ });
74
+ }
75
+
76
+ main();