thinkpool-pair 0.7.156 → 0.7.157

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/bridge.mjs +12 -0
  2. package/package.json +1 -1
package/bridge.mjs CHANGED
@@ -506,6 +506,13 @@ if (process.stdin.isTTY && !headless && process.env.THINKPOOL_PAIR_AUTOUPDATE !=
506
506
  }
507
507
  }
508
508
  const name = process.env.TP_NAME || os.userInfo().username || 'host'
509
+ // host: this machine's short label — os.hostname() with any DNS/domain suffix
510
+ // stripped and capped ~24 chars. A /code room can be served by different bridges
511
+ // over time (Max's Mac vs Conrad's Linux box); the client uses this to show WHICH
512
+ // machine currently serves the room and attribute dormant terminals to their home
513
+ // box. Distinct from `name` (the driver's username). Announced additively —
514
+ // top-level only (one bridge per announce); older clients ignore the unknown key.
515
+ const host = (os.hostname() || 'host').split('.')[0].slice(0, 24)
509
516
 
510
517
  // Repo awareness — the room shows which project this machine is sharing.
511
518
  // Cheap reads, no subprocess: directory name + .git/HEAD.
@@ -788,6 +795,11 @@ const announce = () =>
788
795
  // cwd + version: the host's working dir + thinkpool-pair version, shown in
789
796
  // the room's welcome banner. Re-sent per announce so late joiners get them.
790
797
  cwd, version: VERSION,
798
+ // host: short machine label (see const `host`) so the room shows which box
799
+ // currently serves it + attributes dormant terminals to their home machine.
800
+ // Additive top-level field; consumed by src/pages/code/room.jsx onAnnounce in
801
+ // a later lane. Older clients ignore it.
802
+ host,
791
803
  // provider: the LLM endpoint this bridge drives Claude Code through —
792
804
  // 'anthropic' (the default, the host's regular Claude login) or 'custom'
793
805
  // (any Anthropic-compatible base url: GLM/Z.ai, OpenRouter, a proxy). Shown
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thinkpool-pair",
3
- "version": "0.7.156",
3
+ "version": "0.7.157",
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": {