thinkpool-pair 0.7.63 → 0.7.65

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/account.mjs CHANGED
@@ -210,19 +210,15 @@ export async function runAccount(SUPABASE_URL, SUPABASE_ANON) {
210
210
  // (code-mockup, whip L16). Refreshed below; pushed to live children on rotation.
211
211
  let currentAccessToken = session.access_token || null
212
212
 
213
- // Owner-gate (Contract C-CODE-2): hosting a code session — spawning the agent and
214
- // burning compute on this machine — requires Pro or Enterprise. This is the layer
215
- // with teeth on cost; the start_code_session RPC gates the web create flow, this
216
- // stops a crafted-row bypass from ever serving. Invited partners don't run a bridge.
217
- let plan = 'free'
218
- try {
219
- const { data } = await sb.from('profiles').select('plan').eq('id', session.user.id).single()
220
- plan = data?.plan || 'free'
221
- } catch { /* transient read — fall through to the gate, fail closed */ }
222
- if (plan !== 'pro' && plan !== 'enterprise') {
223
- process.stderr.write(`\n ◇ ThinkPool Code requires a Pro or Enterprise plan to host a session.\n Your account (${email}) is on the ${plan} plan.\n Upgrade: https://thinkpool.io/pro\n\n (Anyone you invite can still join and steer a Pro host's session for free.)\n`)
224
- process.exit(1)
225
- }
213
+ // No plan-refusal here (Contract C-CODE-2′, spec 2026-06-25-code-free-launch).
214
+ // /code is now a metered free tier, not Pro-only: a free account can legitimately
215
+ // own sessions (within its monthly quota, or during the launch window). The cost
216
+ // brake moved to session CREATION — start_code_session enforces the quota/window
217
+ // server-side, so a row exists iff the owner was entitled to create it. The bridge
218
+ // therefore serves whatever sessions the account legitimately owns (owner-only
219
+ // discovery below, line ~349, still bounds it to the account's OWN rooms). Inference
220
+ // runs on this machine's own Claude login regardless of plan, so hosting costs
221
+ // ThinkPool nothing; there's no cost reason to refuse a free host.
226
222
 
227
223
  const DEFAULT_DIR = process.cwd() // unbound sessions auto-serve here; `bind` overrides per session
228
224
  const svcHint = process.env.THINKPOOL_PAIR_AUTOUPDATE === '1'
package/bridge.mjs CHANGED
@@ -708,6 +708,15 @@ function printLocal(evt) {
708
708
  // first). EVERY event that joins entry.log must go through here so the client's
709
709
  // "drop ≤ seqHi" cursor stays correct (a logged event with no seq would break it).
710
710
  function pushLog(entry, evt) {
711
+ // Single stamp point: guarantee ts+cid on EVERY logged event. echoYou() and the
712
+ // /model,/clear control lines called pushLog WITHOUT a prior stampEvent, so
713
+ // `you`/`control` were logged with a seq but NO ts. On a long session the
714
+ // client's capEvents evicts the agent turns below an old `you` line, leaving it
715
+ // with no lower-seq checkpoint → orderEvents pins the ts-less line to ts 0 and
716
+ // every old user message stacks at the TOP of the timeline (room XE3IQ, 2026-06-25).
717
+ // A real ts makes ordering wall-clock — immune to eviction AND /clear seq resets.
718
+ // stampEvent is idempotent, so the callers that already stamp are unaffected.
719
+ stampEvent(evt)
711
720
  // Only TRANSCRIPT events consume a seq (seqable) — replay-chrome kinds the web
712
721
  // filters out (system/thinking_tokens/effort) ride the log seq-less so they don't
713
722
  // hole the client's applied sequence. See event-id.mjs NO_SEQ_KINDS.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thinkpool-pair",
3
- "version": "0.7.63",
3
+ "version": "0.7.65",
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": {