@1presence/bridge 0.43.0 → 0.45.0
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/dist/claude.js +11 -0
- package/dist/config.js +5 -4
- package/package.json +2 -2
package/dist/claude.js
CHANGED
|
@@ -292,6 +292,17 @@ export function spawnClaude(params) {
|
|
|
292
292
|
// credentials in the Keychain), not an API key that would bill a separate
|
|
293
293
|
// account. Options.env REPLACES the subprocess env, so spread the rest through.
|
|
294
294
|
const { ANTHROPIC_API_KEY: _stripped, ...safeEnv } = process.env;
|
|
295
|
+
// Raise Claude Code's MCP tool-result token cap (default 25,000). Over the cap,
|
|
296
|
+
// the CLI saves the result to a tool-results/*.txt file and returns a stub that
|
|
297
|
+
// says "read it with Read" — but Local Mode disables every built-in tool
|
|
298
|
+
// (`tools: []` below), so the model has no Read tool and stalls. Hosted mode has
|
|
299
|
+
// no such cap (results go straight to the Anthropic SDK), so a large skill body
|
|
300
|
+
// or vault read breaks Local Mode only — a parity bug. Lifting the cap lets
|
|
301
|
+
// legitimate 1Presence MCP results pass inline, matching hosted. An operator
|
|
302
|
+
// override (env already set) wins. Bounded by the model's context window anyway.
|
|
303
|
+
if (!safeEnv['MAX_MCP_OUTPUT_TOKENS']) {
|
|
304
|
+
safeEnv['MAX_MCP_OUTPUT_TOKENS'] = '200000';
|
|
305
|
+
}
|
|
295
306
|
const pinnedModel = getBridgeModel();
|
|
296
307
|
// Process one translated raw stream-json event: bookkeeping + forward. Mirrors
|
|
297
308
|
// the old CLI stdout parser so the gateway/accumulator see identical shapes.
|
package/dist/config.js
CHANGED
|
@@ -78,12 +78,13 @@ function detectClaudeDefaultModel() {
|
|
|
78
78
|
// `--model` flag passed to the subprocess).
|
|
79
79
|
const MODEL_OPTIONS = [
|
|
80
80
|
{ num: 1, model: null, label: 'Use Claude Code default' },
|
|
81
|
-
{ num: 2, model: 'claude-opus-4-
|
|
82
|
-
{ num: 3, model: 'claude-
|
|
83
|
-
{ num: 4, model: 'claude-
|
|
81
|
+
{ num: 2, model: 'claude-opus-4-8', label: 'claude-opus-4-8' },
|
|
82
|
+
{ num: 3, model: 'claude-opus-4-7', label: 'claude-opus-4-7' },
|
|
83
|
+
{ num: 4, model: 'claude-sonnet-4-6', label: 'claude-sonnet-4-6' },
|
|
84
|
+
{ num: 5, model: 'claude-haiku-4-5', label: 'claude-haiku-4-5' },
|
|
84
85
|
];
|
|
85
86
|
const PROMPT_TIMEOUT_MS = 10_000;
|
|
86
|
-
const DEFAULT_OPTION_NUM =
|
|
87
|
+
const DEFAULT_OPTION_NUM = 2;
|
|
87
88
|
function promptForModel(defaultModel) {
|
|
88
89
|
return new Promise((resolve) => {
|
|
89
90
|
const initialIdx = Math.max(0, MODEL_OPTIONS.findIndex((o) => o.num === DEFAULT_OPTION_NUM));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1presence/bridge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "Run 1Presence on your Mac and use your Claude.ai Pro subscription from any device",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/node": "^20.0.0",
|
|
27
27
|
"@types/ws": "^8.18.1",
|
|
28
|
-
"tsx": "^4.
|
|
28
|
+
"tsx": "^4.22.3",
|
|
29
29
|
"typescript": "^5.5.0"
|
|
30
30
|
}
|
|
31
31
|
}
|