thinkpool-pair 0.7.15 → 0.7.16

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/account.mjs +8 -3
  2. package/package.json +1 -1
package/account.mjs CHANGED
@@ -13,7 +13,7 @@ import path from 'node:path'
13
13
  import fs from 'node:fs'
14
14
  import { createClient } from '@supabase/supabase-js'
15
15
  import os from 'node:os'
16
- import { saveAuth, loadAuth, clearAuth, loadDirs, bindDir } from './auth-store.mjs'
16
+ import { saveAuth, loadAuth, loadDirs, bindDir } from './auth-store.mjs'
17
17
 
18
18
  const VERSION = (() => { try { return JSON.parse(fs.readFileSync(new URL('./package.json', import.meta.url), 'utf8')).version } catch { return null } })()
19
19
 
@@ -78,8 +78,13 @@ export function runBind(room, dir) {
78
78
  export async function runAccount(SUPABASE_URL, SUPABASE_ANON) {
79
79
  const auth = await authedClient(SUPABASE_URL, SUPABASE_ANON)
80
80
  if (!auth) {
81
- clearAuth()
82
- console.error('\n Not linked (or the link expired). Run:\n\n npx thinkpool-pair login\n')
81
+ // Do NOT delete auth.json here. A refresh can fail transiently (offline) or
82
+ // lose a refresh-token rotation race with another bridge sharing this login
83
+ // wiping the file on that destroys a still-valid login. Leave it: only an
84
+ // explicit `login` should ever replace the token (saveAuth overwrites it).
85
+ // (2026-06-17: a second account supervisor raced the token and the old
86
+ // clearAuth() here deleted a live Pro login mid-session.)
87
+ console.error('\n ◇ Couldn\'t refresh your account session (offline, or another bridge\n may be using this login). Your saved login was left in place.\n If this keeps happening, re-link: npx thinkpool-pair login\n')
83
88
  process.exit(1)
84
89
  }
85
90
  const { sb, session } = auth
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thinkpool-pair",
3
- "version": "0.7.15",
3
+ "version": "0.7.16",
4
4
  "description": "Share a local coding-agent CLI (Claude Code, Codex, Gemini, Aider, …) into a ThinkPool Code room, live.",
5
5
  "type": "module",
6
6
  "bin": {