voicecc 1.1.27 → 1.1.28

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/bin/voicecc.js CHANGED
@@ -24,7 +24,20 @@ const PKG_ROOT = join(__dirname, "..");
24
24
  const TSX_BIN = join(PKG_ROOT, "node_modules", ".bin", "tsx");
25
25
  const ENV_PATH = join(PKG_ROOT, ".env");
26
26
 
27
- const VOICECC_DIR = join(homedir(), ".voicecc");
27
+ // When running as root on Linux, use the voicecc user's home directory so
28
+ // both the CLI (root) and the server process (voicecc user) can access the
29
+ // same status/PID files. /root is typically mode 700, so a non-root user
30
+ // cannot traverse it to reach /root/.voicecc.
31
+ let voiceccDir = join(homedir(), ".voicecc");
32
+ if (process.getuid && process.getuid() === 0 && platform() === "linux") {
33
+ try {
34
+ const voiceccHome = execSync(`eval echo ~voicecc`, { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim();
35
+ if (voiceccHome && !voiceccHome.startsWith("~")) {
36
+ voiceccDir = join(voiceccHome, ".voicecc");
37
+ }
38
+ } catch { /* voicecc user doesn't exist yet, use default */ }
39
+ }
40
+ const VOICECC_DIR = voiceccDir;
28
41
  const PID_FILE = join(VOICECC_DIR, "voicecc.pid");
29
42
  const LOG_FILE = join(VOICECC_DIR, "voicecc.log");
30
43
  const STATUS_FILE = join(VOICECC_DIR, "status.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "voicecc",
3
- "version": "1.1.27",
3
+ "version": "1.1.28",
4
4
  "description": "Voice Agent Platform running on Claude Code -- create and deploy conversational voice agents with ElevenLabs STT/TTS and VAD",
5
5
  "type": "module",
6
6
  "bin": {
@@ -140,13 +140,10 @@ async function createTunnel(port: number): Promise<string> {
140
140
  console.log(`[cloudflared] ${data.trim()}`);
141
141
  });
142
142
 
143
- // Log connection-level events for observability
144
- tunnel.on("connected", (conn: { id: string; ip: string; location: string }) => {
145
- console.log(`[cloudflared] Connected: ${conn.location} (${conn.ip})`);
146
- });
147
- tunnel.on("disconnected", (conn: { id: string; ip: string; location: string }) => {
148
- console.log(`[cloudflared] Disconnected: ${conn.location} (${conn.ip})`);
149
- });
143
+ // Note: we intentionally skip tunnel.on("connected"/"disconnected") here.
144
+ // The cloudflared package fires processOutput() on both stdout and stderr,
145
+ // so those events fire twice per connection. The raw stderr handler above
146
+ // already captures connection info from cloudflared's own log lines.
150
147
 
151
148
  // Wait for the tunnel URL or fail
152
149
  const url = await new Promise<string>((resolve, reject) => {