@1presence/bridge 0.70.0 → 0.72.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
@@ -53,7 +53,7 @@ Your OAuth tokens and vault data stay server-side — nothing sensitive is store
53
53
 
54
54
  ## Model
55
55
 
56
- On first run the bridge asks which Claude model you want it to use. Pick "Use Claude Code default" to defer to your local Claude Code default, or choose a specific model id to pin it (e.g. `claude-opus-4-8[1m]`, `claude-opus-4-8`, `claude-sonnet-4-6`, `claude-haiku-4-5`). The default selection (auto-chosen if the prompt times out) is `claude-opus-4-8[1m]`the latest Opus with a 1M-token context window. The choice is saved to `~/.1presence/config.json` and reused on every subsequent run.
56
+ On first run the bridge asks which Claude model you want it to use. Pick "Use Claude Code default" to defer to your local Claude Code default, or choose a specific model id to pin it (e.g. `claude-opus-5`, `claude-opus-4-8`, `claude-sonnet-5`, `claude-haiku-4-5`). The default selection (auto-chosen if the prompt times out) is "Use Claude Code default" it tracks whatever model Claude Code serves for your plan. The choice is saved to `~/.1presence/config.json` and reused on every subsequent run.
57
57
 
58
58
  The first reply each session prints the model and credential source so you can confirm what's running. To change your pick later, edit or delete `~/.1presence/config.json` — the bridge will prompt again on the next start.
59
59
 
package/dist/config.js CHANGED
@@ -94,12 +94,13 @@ function detectClaudeDefaultModel() {
94
94
  // actually a tool-schema bug that hit every model — see vault/Bugs.md.)
95
95
  const MODEL_OPTIONS = [
96
96
  { num: 1, model: null, label: 'Use Claude Code default' },
97
- { num: 2, model: 'claude-opus-4-8', label: 'claude-opus-4-8' },
98
- { num: 3, model: 'claude-opus-4-7', label: 'claude-opus-4-7' },
99
- { num: 4, model: 'claude-fable-5', label: 'claude-fable-5' },
100
- { num: 5, model: 'claude-sonnet-5', label: 'claude-sonnet-5' },
101
- { num: 6, model: 'claude-sonnet-4-6', label: 'claude-sonnet-4-6' },
102
- { num: 7, model: 'claude-haiku-4-5', label: 'claude-haiku-4-5' },
97
+ { num: 2, model: 'claude-opus-5', label: 'claude-opus-5' },
98
+ { num: 3, model: 'claude-opus-4-8', label: 'claude-opus-4-8' },
99
+ { num: 4, model: 'claude-opus-4-7', label: 'claude-opus-4-7' },
100
+ { num: 5, model: 'claude-fable-5', label: 'claude-fable-5' },
101
+ { num: 6, model: 'claude-sonnet-5', label: 'claude-sonnet-5' },
102
+ { num: 7, model: 'claude-sonnet-4-6', label: 'claude-sonnet-4-6' },
103
+ { num: 8, model: 'claude-haiku-4-5', label: 'claude-haiku-4-5' },
103
104
  ];
104
105
  const PROMPT_TIMEOUT_MS = 10_000;
105
106
  // Default to option 1 ("Use Claude Code default") — the dynamic choice that
package/dist/index.js CHANGED
@@ -67,16 +67,19 @@ const MAX_AUTH_REJECTIONS = 3;
67
67
  // 5h/7d subscription rate-limit windows it also shows are deliberately absent —
68
68
  // those ride in the API's rate-limit response HEADERS, which the bridge (a
69
69
  // consumer of the CLI's stream-json stdout only) never sees. Display only.
70
- // Raw model id (claude-opus-4-7, claude-sonnet-4-6-20250101) to friendly "Opus
71
- // 4.7". Regex-based so new dated snapshots format without a table edit; an
72
- // unrecognised shape falls back to the raw id rather than guessing.
70
+ // Raw model id (claude-opus-5, claude-opus-4-7, claude-sonnet-4-6-20250101) to
71
+ // friendly "Opus 5" / "Opus 4.7". Regex-based so new dated snapshots format
72
+ // without a table edit; an unrecognised shape falls back to the raw id rather
73
+ // than guessing. The minor version is capped at 2 digits so a dated snapshot on
74
+ // a single-number id (claude-opus-5-20260724) reads "Opus 5", not "Opus 5.2026…".
73
75
  function friendlyModelName(model) {
74
76
  if (!model)
75
77
  return 'unknown';
76
- const m = /claude-(opus|sonnet|haiku)-(\d+)-(\d+)/i.exec(model);
78
+ const m = /claude-(opus|sonnet|haiku|fable|mythos)-(\d+)(?:-(\d{1,2})(?!\d))?/i.exec(model);
77
79
  if (!m)
78
80
  return model;
79
- return `${m[1].charAt(0).toUpperCase()}${m[1].slice(1)} ${m[2]}.${m[3]}`;
81
+ const family = `${m[1].charAt(0).toUpperCase()}${m[1].slice(1)}`;
82
+ return m[3] ? `${family} ${m[2]}.${m[3]}` : `${family} ${m[2]}`;
80
83
  }
81
84
  // Context window (tokens) per model, for the context-fill estimate. Keyed by a
82
85
  // family regex against the raw model id; first match wins, and an unrecognised
@@ -90,6 +93,10 @@ function friendlyModelName(model) {
90
93
  // else. (The percentage is of the raw window — local Claude's own gauge also
91
94
  // reserves output headroom, so its reading runs a few points higher near full.)
92
95
  const CONTEXT_WINDOWS = [
96
+ // 5-generation Opus/Sonnet + Mythos-class ship with a 1M window as the
97
+ // DEFAULT (not an opt-in beta), so the bridge's print mode gets it too.
98
+ // Haiku is deliberately excluded (4.5 is 200k and falls to the baseline).
99
+ { match: /claude-(opus|sonnet|fable|mythos)-5/i, tokens: 1_000_000 },
93
100
  { match: /claude-(opus|sonnet|haiku)-4/i, tokens: 200_000 },
94
101
  ];
95
102
  const DEFAULT_CONTEXT_WINDOW = 200_000;
@@ -621,7 +628,8 @@ function connect(auth, retryDelay = 1000) {
621
628
  // A clean connection means whatever token we hold is accepted — clear the
622
629
  // 4001 refresh-retry budget so a future expiry gets the full allowance.
623
630
  authRejections = 0;
624
- console.log('✓ Bridge connected. Local Mode active on all your devices.\n');
631
+ const who = auth.email ? ` as ${auth.email}` : '';
632
+ console.log(`✓ Bridge connected${who}. Local Mode active on all your devices.\n`);
625
633
  startPing();
626
634
  // Drain any save records left behind by an earlier crashed/dropped session.
627
635
  // Fire-and-forget — the network is up, the gateway is reachable, and we
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1presence/bridge",
3
- "version": "0.70.0",
3
+ "version": "0.72.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",