claude-phone-local 2.3.3 → 2.3.4
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.
|
@@ -73,9 +73,6 @@
|
|
|
73
73
|
"cpu": [
|
|
74
74
|
"arm64"
|
|
75
75
|
],
|
|
76
|
-
"libc": [
|
|
77
|
-
"glibc"
|
|
78
|
-
],
|
|
79
76
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
80
77
|
"optional": true,
|
|
81
78
|
"os": [
|
|
@@ -89,9 +86,6 @@
|
|
|
89
86
|
"cpu": [
|
|
90
87
|
"arm64"
|
|
91
88
|
],
|
|
92
|
-
"libc": [
|
|
93
|
-
"musl"
|
|
94
|
-
],
|
|
95
89
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
96
90
|
"optional": true,
|
|
97
91
|
"os": [
|
|
@@ -105,9 +99,6 @@
|
|
|
105
99
|
"cpu": [
|
|
106
100
|
"x64"
|
|
107
101
|
],
|
|
108
|
-
"libc": [
|
|
109
|
-
"glibc"
|
|
110
|
-
],
|
|
111
102
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
112
103
|
"optional": true,
|
|
113
104
|
"os": [
|
|
@@ -121,9 +112,6 @@
|
|
|
121
112
|
"cpu": [
|
|
122
113
|
"x64"
|
|
123
114
|
],
|
|
124
|
-
"libc": [
|
|
125
|
-
"musl"
|
|
126
|
-
],
|
|
127
115
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
128
116
|
"optional": true,
|
|
129
117
|
"os": [
|
|
@@ -118,17 +118,6 @@ function buildClaudeEnvironment() {
|
|
|
118
118
|
|
|
119
119
|
// Pre-build the environment once at startup
|
|
120
120
|
const claudeEnv = buildClaudeEnvironment();
|
|
121
|
-
console.log('[STARTUP] Loaded environment with', Object.keys(claudeEnv).length, 'variables');
|
|
122
|
-
console.log('[STARTUP] PATH includes:', claudeEnv.PATH.split(':').slice(0, 5).join(', '), '...');
|
|
123
|
-
|
|
124
|
-
// Log which API keys are available (without showing values)
|
|
125
|
-
const apiKeys = Object.keys(claudeEnv).filter(k =>
|
|
126
|
-
k.includes('API_KEY') || k.includes('TOKEN') || k.includes('SECRET') || k === 'PAI_DIR'
|
|
127
|
-
);
|
|
128
|
-
console.log('[STARTUP] API keys loaded:', apiKeys.join(', '));
|
|
129
|
-
console.log('[STARTUP] Claude model:', CLAUDE_MODEL || 'default (Claude Code / OmniRoute)');
|
|
130
|
-
console.log('[STARTUP] ANTHROPIC_BASE_URL:', claudeEnv.ANTHROPIC_BASE_URL || '(not set — subscription auth)');
|
|
131
|
-
console.log('[STARTUP] ANTHROPIC_API_KEY:', claudeEnv.ANTHROPIC_API_KEY ? 'kept (proxy auth)' : 'stripped (subscription auth)');
|
|
132
121
|
|
|
133
122
|
// Every phone turn used to spawn a fresh CLI process. Without
|
|
134
123
|
// --strict-mcp-config it tries to connect to every configured MCP server
|
|
@@ -148,9 +137,10 @@ const STRICT_MCP = process.env.PHONE_ENABLE_MCP !== '1';
|
|
|
148
137
|
* Request bodies may also pass `model` to override per-call.
|
|
149
138
|
*/
|
|
150
139
|
function resolveClaudeModel(requestModel) {
|
|
140
|
+
const fallback = (process.env.ANTHROPIC_BASE_URL || process.env.CLAUDE_USE_API_KEY) ? 'default' : 'claude-sonnet-5';
|
|
151
141
|
const raw = (requestModel !== undefined && requestModel !== null && String(requestModel).trim() !== '')
|
|
152
142
|
? String(requestModel).trim()
|
|
153
|
-
: (process.env.CLAUDE_MODEL !== undefined ? process.env.CLAUDE_MODEL :
|
|
143
|
+
: (process.env.CLAUDE_MODEL !== undefined ? process.env.CLAUDE_MODEL : fallback);
|
|
154
144
|
const value = String(raw).trim();
|
|
155
145
|
if (!value || value.toLowerCase() === 'default' || value.toLowerCase() === 'none') {
|
|
156
146
|
return null; // omit --model / SDK model option
|
|
@@ -160,6 +150,18 @@ function resolveClaudeModel(requestModel) {
|
|
|
160
150
|
|
|
161
151
|
const CLAUDE_MODEL = resolveClaudeModel();
|
|
162
152
|
|
|
153
|
+
console.log('[STARTUP] Loaded environment with', Object.keys(claudeEnv).length, 'variables');
|
|
154
|
+
console.log('[STARTUP] PATH includes:', claudeEnv.PATH.split(':').slice(0, 5).join(', '), '...');
|
|
155
|
+
|
|
156
|
+
// Log which API keys are available (without showing values)
|
|
157
|
+
const apiKeys = Object.keys(claudeEnv).filter(k =>
|
|
158
|
+
k.includes('API_KEY') || k.includes('TOKEN') || k.includes('SECRET') || k === 'PAI_DIR'
|
|
159
|
+
);
|
|
160
|
+
console.log('[STARTUP] API keys loaded:', apiKeys.join(', '));
|
|
161
|
+
console.log('[STARTUP] Claude model:', CLAUDE_MODEL || 'default (Claude Code / OmniRoute)');
|
|
162
|
+
console.log('[STARTUP] ANTHROPIC_BASE_URL:', claudeEnv.ANTHROPIC_BASE_URL || '(not set — subscription auth)');
|
|
163
|
+
console.log('[STARTUP] ANTHROPIC_API_KEY:', claudeEnv.ANTHROPIC_API_KEY ? 'kept (proxy auth)' : 'stripped (subscription auth)');
|
|
164
|
+
|
|
163
165
|
/**
|
|
164
166
|
* Voice Context - Prepended to all voice queries
|
|
165
167
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-phone-local",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
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": {
|