claude-phone-local 2.0.1 → 2.0.3
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/cli/bin/cli-main.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
3
4
|
import { setupCommand } from '../lib/commands/setup.js';
|
|
4
5
|
import { startCommand } from '../lib/commands/start.js';
|
|
5
6
|
import { stopCommand } from '../lib/commands/stop.js';
|
|
@@ -20,12 +21,15 @@ import { uninstallCommand } from '../lib/commands/uninstall.js';
|
|
|
20
21
|
import { registerMcpServerWithOutput, mcpServerPath } from '../lib/mcp-register.js';
|
|
21
22
|
import { loadConfig as _loadCfgForMcp } from '../lib/config.js';
|
|
22
23
|
|
|
24
|
+
const require = createRequire(import.meta.url);
|
|
25
|
+
const pkg = require('../../package.json');
|
|
26
|
+
|
|
23
27
|
const program = new Command();
|
|
24
28
|
|
|
25
29
|
program
|
|
26
30
|
.name('claude-phone')
|
|
27
31
|
.description('Voice interface for Claude Code via SIP - Call your AI, and your AI can call you')
|
|
28
|
-
.version(
|
|
32
|
+
.version(pkg.version);
|
|
29
33
|
|
|
30
34
|
program
|
|
31
35
|
.command('setup')
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { execSync } from 'child_process';
|
|
1
|
+
import { execSync, execFileSync } from 'child_process';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Check disk space availability
|
|
@@ -80,6 +80,34 @@ function getDiskSpace(platform) {
|
|
|
80
80
|
const availableKB = parseInt(parts[3], 10);
|
|
81
81
|
return availableKB * 1024; // Convert KB to bytes
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (platform.os === 'win32') {
|
|
88
|
+
// Check the drive the CLI's config directory (~/.claude-phone) lives on,
|
|
89
|
+
// since that's where the ./data volume actually gets written - not
|
|
90
|
+
// necessarily the same drive as the OS install.
|
|
91
|
+
const driveLetter = (process.env.USERPROFILE || process.env.HOMEDRIVE || 'C:')
|
|
92
|
+
.slice(0, 2)
|
|
93
|
+
.toUpperCase();
|
|
94
|
+
|
|
95
|
+
// wmic is deprecated but still present on every supported Windows
|
|
96
|
+
// release; avoids a PowerShell startup cost on every prereq check.
|
|
97
|
+
// execFileSync (argument array, no shell) - driveLetter is untrusted
|
|
98
|
+
// env-derived input, so it must not be interpolated into a shell string.
|
|
99
|
+
const output = execFileSync(
|
|
100
|
+
'wmic',
|
|
101
|
+
['logicaldisk', 'where', `DeviceID='${driveLetter}'`, 'get', 'FreeSpace', '/value'],
|
|
102
|
+
{ encoding: 'utf-8', stdio: 'pipe' }
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
const match = output.match(/FreeSpace=(\d+)/);
|
|
106
|
+
if (match) {
|
|
107
|
+
return parseInt(match[1], 10);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return null;
|
|
83
111
|
}
|
|
84
112
|
|
|
85
113
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-phone-local",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Local/offline fork of NetworkChuck's claude-phone: talk to Claude Code over 3CX/SIP with faster-whisper STT + Piper TTS in one Docker container.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
[STARTUP] Loaded environment with 87 variables
|
|
2
|
-
[STARTUP] PATH includes: C, \Users\DCHOUGALE\bin;C, \Program Files\Git\mingw64\bin;C, \Program Files\Git\usr\local\bin;C, \Program Files\Git\usr\bin;C ...
|
|
3
|
-
[STARTUP] API keys loaded: CLAUDE_CODE_MESSAGING_TOKEN, PAI_DIR
|
|
4
|
-
================================================================
|
|
5
|
-
Claude HTTP API Server
|
|
6
|
-
================================================================
|
|
7
|
-
|
|
8
|
-
Listening on: http://0.0.0.0:3333
|
|
9
|
-
Health check: http://localhost:3333/health
|
|
10
|
-
|
|
11
|
-
Ready to receive Claude queries from voice interface.
|
|
12
|
-
|
|
13
|
-
[2026-08-31T15:44:15.730Z] GET /health
|