@1presence/bridge 0.67.0 → 0.69.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.
Files changed (2) hide show
  1. package/dist/config.js +27 -18
  2. package/package.json +1 -1
package/dist/config.js CHANGED
@@ -75,29 +75,38 @@ function detectClaudeDefaultModel() {
75
75
  }
76
76
  // The fixed menu — keep the option count small so the timeout default is easy
77
77
  // to glance at. Option 1's `model: null` means "let Claude Code pick" (no
78
- // `--model` flag passed to the subprocess).
79
- // NB on `[1m]` (1M-context Opus): the bridge always runs on the user's claude.ai
80
- // subscription (it strips ANTHROPIC_API_KEYsee claude.ts), and it is UNCONFIRMED
81
- // whether the 1M context window (a tier-gated API beta) is servable on subscription
82
- // auth. It is the default (see DEFAULT_OPTION_NUM below); if it proves unservable on
83
- // a given plan, the user can arrow to option 2 for the plain variant. (An earlier
84
- // every-turn `400 / "unknown"` was first blamed on this but was actually a tool-schema
85
- // bug that hit every model — see vault/Bugs.md.) `num` must stay contiguous 1..N in
86
- // array order the jump-key handler maps a typed digit `n` to `idx = n - 1`.
78
+ // `--model` flag passed to the subprocess). This is the DYNAMIC default: it
79
+ // tracks whatever model Claude Code actually serves for the user's plan (the
80
+ // probe above surfaces it as a live suffix on most accounts today that's the
81
+ // 1M-context Opus) and self-heals if a pinned id is ever unservable. The
82
+ // remaining rows pin explicit ids for users who want a specific model.
83
+ // `num` must stay contiguous 1..N in array order the jump-key handler maps a
84
+ // typed digit `n` to `idx = n - 1`.
85
+ //
86
+ // NB there is no way to *enumerate* the models available on subscription auth:
87
+ // the `/v1/models` API needs an API key (the bridge strips ANTHROPIC_API_KEY —
88
+ // see claude.ts) and the CLI exposes only the single default via the init event.
89
+ // So this list is hand-maintained — add/remove ids here as the roster changes.
90
+ // (We dropped the standalone `claude-opus-4-8[1m]` row: it duplicated option 1,
91
+ // whose Claude Code default already resolves to the 1M Opus on subscription, and
92
+ // pinning `[1m]` risked a hard failure where the null default degrades gracefully.
93
+ // An earlier every-turn `400 / "unknown"` was once blamed on `[1m]` but was
94
+ // actually a tool-schema bug that hit every model — see vault/Bugs.md.)
87
95
  const MODEL_OPTIONS = [
88
96
  { num: 1, model: null, label: 'Use Claude Code default' },
89
97
  { num: 2, model: 'claude-opus-4-8', label: 'claude-opus-4-8' },
90
- { num: 3, model: 'claude-opus-4-8[1m]', label: 'claude-opus-4-8[1m] (1M context — experimental on subscription)' },
91
- { num: 4, model: 'claude-opus-4-7', label: 'claude-opus-4-7' },
92
- { num: 5, model: 'claude-sonnet-4-6', label: 'claude-sonnet-4-6' },
93
- { num: 6, model: 'claude-haiku-4-5', label: 'claude-haiku-4-5' },
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' },
94
103
  ];
95
104
  const PROMPT_TIMEOUT_MS = 10_000;
96
- // Default to the 1M-context Opus (`claude-opus-4-8[1m]`). The `[1m]` window is a
97
- // tier-gated API beta whose availability on subscription auth is unconfirmed (see
98
- // the NB above), but it's our preferred default anyone can arrow to option 2 for
99
- // the plain variant if `[1m]` proves unservable on their plan.
100
- const DEFAULT_OPTION_NUM = 3;
105
+ // Default to option 1 ("Use Claude Code default") the dynamic choice that
106
+ // follows whatever Claude Code serves for the user's plan (currently the 1M
107
+ // Opus on most accounts) and degrades gracefully rather than pinning a possibly
108
+ // unservable id. Users can arrow to a pinned model if they want one.
109
+ const DEFAULT_OPTION_NUM = 1;
101
110
  function promptForModel(defaultModel) {
102
111
  return new Promise((resolve) => {
103
112
  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.67.0",
3
+ "version": "0.69.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",