@1presence/bridge 0.92.0 → 0.94.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/README.md CHANGED
@@ -55,11 +55,11 @@ On startup the bridge makes one request to the public npm registry (`registry.np
55
55
 
56
56
  ## Model
57
57
 
58
- **Every start** the bridge asks which Claude model to use — the choice is held in memory for that run only and nothing is written to disk, so restarting always asks again. Pick "Use Claude Code default" to defer to your local Claude Code default, or pin one of the latest models per family: `claude-opus-5`, `claude-fable-5`, `claude-sonnet-5`, `claude-haiku-4-5`. If the prompt times out it auto-selects "Use Claude Code default", which tracks whatever model Claude Code serves for your plan.
58
+ **Every start** the bridge asks which Claude model to use — the choice is held in memory for that run only and nothing is written to disk, so restarting always asks again. Pick "Use Claude Code default" to defer to your local Claude Code default, or pin one of the latest models per family: `claude-opus-5`, `claude-fable-5-1`, `claude-sonnet-5`, `claude-haiku-4-5`. If the prompt times out it auto-selects "Use Claude Code default", which tracks whatever model Claude Code serves for your plan.
59
59
 
60
60
  **Press `Esc` at any time** to change model without restarting — no signing in again, and nothing in flight is lost. The new model applies to your next message; a reply already being written finishes on the one it started with. `Esc` again closes the menu without changing anything. While the bridge is running it also takes `Ctrl+C` to stop and `Ctrl+Z` to suspend.
61
61
 
62
- Superseded versions (`claude-opus-4-8`, `claude-sonnet-4-6`, …) are deliberately not listed. If you need something other than the latest, use "Use Claude Code default" and set the model in Claude Code itself.
62
+ Superseded versions (`claude-opus-4-8`, `claude-fable-5`, `claude-sonnet-4-6`, …) are deliberately not listed. If you need something other than the latest, use "Use Claude Code default" and set the model in Claude Code itself.
63
63
 
64
64
  Every reply prints the model, the account it ran for, and your context/cost usage, so you can always see what is running — and if the model that answered isn't the one you pinned, the bridge says so explicitly. Note that only **one bridge per account** serves your turns: start a second one and the older process exits, because otherwise your turns could be answered by a terminal you aren't watching, on the model *it* pinned.
65
65
 
package/dist/claude.js CHANGED
@@ -137,6 +137,9 @@ const PERMISSION_TRANSPORT_DEAD_RE = /Tool permission request failed/i;
137
137
  export function isPermissionTransportFailure(text) {
138
138
  return PERMISSION_TRANSPORT_DEAD_RE.test(text);
139
139
  }
140
+ export function isLiveTurnResult(result, producedRealOutput) {
141
+ return producedRealOutput || result.is_error === true;
142
+ }
140
143
  const MCP_TOOL_UNREGISTERED_RE = new RegExp(`No such tool available:\\s*(?:${MCP_TOOL_PREFIX}|${LEGACY_MCP_TOOL_PREFIX})`, 'i');
141
144
  export function shouldReconnectRemoteMcp(args) {
142
145
  const { toolName, isError, text } = args;
@@ -679,7 +682,7 @@ export function spawnClaude(params) {
679
682
  };
680
683
  if (handleEvent(event))
681
684
  onEvent(event);
682
- if (producedRealOutput) {
685
+ if (isLiveTurnResult(rm, producedRealOutput)) {
683
686
  clearTimeout(inputReleaseTimer);
684
687
  input.release();
685
688
  }
package/dist/config.js CHANGED
@@ -55,7 +55,7 @@ function detectClaudeDefaultModel() {
55
55
  const MODEL_OPTIONS = [
56
56
  { num: 1, model: null, label: 'Use Claude Code default' },
57
57
  { num: 2, model: 'claude-opus-5', label: 'claude-opus-5' },
58
- { num: 3, model: 'claude-fable-5', label: 'claude-fable-5' },
58
+ { num: 3, model: 'claude-fable-5-1', label: 'claude-fable-5-1' },
59
59
  { num: 4, model: 'claude-sonnet-5', label: 'claude-sonnet-5' },
60
60
  { num: 5, model: 'claude-haiku-4-5', label: 'claude-haiku-4-5' },
61
61
  ];
package/dist/index.js CHANGED
@@ -527,8 +527,10 @@ function connect(auth, retryDelay = 1000) {
527
527
  }
528
528
  if (msg.type === 'cancel' && msg.conversationId) {
529
529
  const cancelled = cancelConversation(msg.conversationId);
530
- if (cancelled)
531
- console.log(`[bridge] ✕ stopped conversation ${msg.conversationId}`);
530
+ if (cancelled) {
531
+ const elapsed = stopTurnTimer();
532
+ console.log(`[bridge] ✕ stopped conversation ${msg.conversationId} (${formatElapsed(elapsed)})`);
533
+ }
532
534
  return;
533
535
  }
534
536
  if (msg.type === 'doc_recon_request') {
package/dist/timer.js CHANGED
@@ -23,8 +23,11 @@ export function formatElapsed(seconds) {
23
23
  return `${h}h ${m.toString().padStart(2, '0')}m`;
24
24
  }
25
25
  export function startTurnTimer() {
26
- if (intervalId !== null)
26
+ if (intervalId !== null) {
27
+ startedAt = Date.now();
28
+ draw();
27
29
  return;
30
+ }
28
31
  startedAt = Date.now();
29
32
  originalLog = console.log;
30
33
  originalError = console.error;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1presence/bridge",
3
- "version": "0.92.0",
3
+ "version": "0.94.0",
4
4
  "description": "Run 1Presence on your Mac and use your Claude.ai Pro subscription from any device",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",