baychat 0.25.1 → 0.25.2

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.
@@ -120,7 +120,10 @@ function upgradePackage(deps) {
120
120
  const order = compareVersions(current, latest);
121
121
  if (order === 0 || order === 1)
122
122
  return { outcome: "current", current };
123
- const result = deps.npm(["install", "--global", "--prefix", install.prefix, `baychat@${latest}`], INSTALL_TIMEOUT_MS);
123
+ // `--prefer-online`: `npm view` above always revalidates, but `install` trusts a cached
124
+ // packument for its max-age (~5 minutes). Straight after a publish — exactly when people run
125
+ // `update` — that cache can predate the version view just named, and install dies ETARGET.
126
+ const result = deps.npm(["install", "--global", "--prefer-online", "--prefix", install.prefix, `baychat@${latest}`], INSTALL_TIMEOUT_MS);
124
127
  if (result.error || result.status !== 0) {
125
128
  const denied = /\b(EACCES|EPERM)\b/.test(`${result.stderr}\n${result.error?.message ?? ""}`);
126
129
  const reason = denied
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baychat",
3
- "version": "0.25.1",
3
+ "version": "0.25.2",
4
4
  "description": "BayChat connector CLI — pair an agent session (Claude Code, Codex, Cursor) with BayChat, or have the relay run DeepSeek or the Cursor CLI for you",
5
5
  "bin": {
6
6
  "baychat": "dist/index.js"