Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
feat(license): Pro includes 3 free team seats; extra seats $5/seat/mo
enes23194f2efe39
diff --git a/src/core/license.test.ts b/src/core/license.test.tsindex c655e41bc..cb0ef7134 100644--- a/src/core/license.test.ts+++ b/src/core/license.test.ts@@ -215,15 +215,25 @@ describe('license seats entitlement', () => {expect(licensedSeats()).toBe(5)})- it('a premium token with no seats field defaults to 1 seat (backward compat)', async () => {+ it('a premium token with no seats field defaults to the 3 free Pro seats', async () => {storeToken(mint(7 * 24 * 60 * 60))const { initLicense, licensedSeats } = await import('./license')initLicense()await flush()const status = (await fake.handlers[IPC.licenseStatus]()) as LicenseStatusexpect(status.active).toBe(true)- expect(status.seats).toBe(1)- expect(licensedSeats()).toBe(1)+ expect(status.seats).toBe(3) // Pro includes 3 seats; existing tokens get them with no re-mint+ expect(licensedSeats()).toBe(3)+ })++ it('a premium token below the free baseline is floored to the 3 free Pro seats', async () => {+ storeToken(mint(7 * 24 * 60 * 60, 'test-device', 2))+ const { initLicense, licensedSeats } = await import('./license')+ initLicense()+ await flush()+ const status = (await fake.handlers[IPC.licenseStatus]()) as LicenseStatus+ expect(status.seats).toBe(3) // never fewer than the 3 included with Pro+ expect(licensedSeats()).toBe(3)})it('an absent / non-premium token has 0 seats', async () => {diff --git a/src/core/license.ts b/src/core/license.tsindex 9c28b82eb..44e0f85aa 100644--- a/src/core/license.ts+++ b/src/core/license.ts@@ -59,10 +59,16 @@ interface Payload {licenseId: stringexp: number/** Seat cap for the relay host (Team Access). Rides the same signed token; an old token- * lacks it, in which case it resolves to 1 seat. See `seatsFrom`. */+ * lacks it, in which case it resolves to the free baseline (PRO_FREE_SEATS). See `seatsFrom`. */seats?: number}+/** Every Pro plan includes this many collaborator seats for free — the token carries a `seats`+ * value only when a plan buys MORE than this (extra seats are $5/seat/month). The server omits+ * `seats` at/below this baseline, so existing Pro tokens (no `seats` field) grant it automatically+ * with no re-mint. Kept in sync with the server's PRO_FREE_SEATS (nodeterm-server entitlement). */+export const PRO_FREE_SEATS = 3+// Offline verification of our compact Ed25519 token: base64url(payload).base64url(sig).// Beyond the signature, the token must be minted for THIS machine (a copied license.json// from another install must not validate), and its expiry is checked against the largest@@ -88,10 +94,12 @@ function verify(token: string | undefined): Payload | null {}// Resolve the seat cap from a (possibly null) verified payload — the single source of truth so-// statusFrom() and licensedSeats() can't drift: premium token → its seats ?? 1 (a premium token-// with no seats field = today's single-peer behavior), inactive/free/invalid → 0.+// statusFrom() and licensedSeats() can't drift. Every Pro plan grants at least the free baseline:+// a premium token resolves to max(PRO_FREE_SEATS, its seats) — so a token with no seats field (or a+// smaller/misconfigured value) still yields the 3 free seats, and a bought-up plan yields its higher+// count. Inactive/free/invalid → 0.function seatsFrom(p: Payload | null): number {- return p ? p.seats ?? 1 : 0+ return p ? Math.max(PRO_FREE_SEATS, p.seats ?? PRO_FREE_SEATS) : 0}function statusFrom(token: string | undefined, error: string | null = null): LicenseStatus {@@ -102,9 +110,9 @@ function statusFrom(token: string | undefined, error: string | null = null): Lic}/**- * The seat cap the current stored entitlement grants: premium → its `seats` (absent → 1), else 0.- * The relay host reads this to enforce how many devices may connect at once. Kept consistent with- * `statusFrom` by sharing `seatsFrom`/`verify` — do not reimplement the resolution here.+ * The seat cap the current stored entitlement grants: premium → max(PRO_FREE_SEATS, its `seats`),+ * else 0. The relay host reads this to enforce how many devices may connect at once. Kept consistent+ * with `statusFrom` by sharing `seatsFrom`/`verify` — do not reimplement the resolution here.*/export function licensedSeats(): number {return seatsFrom(verify(load().token))diff --git a/src/renderer/components/UpgradeDialog.tsx b/src/renderer/components/UpgradeDialog.tsxindex 9d3310460..fb063a5c3 100644--- a/src/renderer/components/UpgradeDialog.tsx+++ b/src/renderer/components/UpgradeDialog.tsx@@ -17,8 +17,8 @@ export function UpgradeDialog() {<p className="confirm__msg">{feature} is a Pro feature</p><p className="confirm__msg">Pro unlocks unlimited remote access from your phone (free plan: 5 connections/month),- Team Access, and nodeterm mobile Pro. Complete your purchase in the browser — Pro- unlocks here automatically.+ 3 team seats to share this Mac, and nodeterm mobile Pro. Complete your purchase in the+ browser — Pro unlocks here automatically.</p><div className="confirm__actions"><button className="confirm__btn" onClick={hide}>diff --git a/src/renderer/components/settings/nav.ts b/src/renderer/components/settings/nav.tsindex 95d273e5c..1460609b6 100644--- a/src/renderer/components/settings/nav.ts+++ b/src/renderer/components/settings/nav.ts@@ -64,7 +64,7 @@ export const SETTINGS_GROUPS: SettingsGroup[] = [sections: [{ id: 'phone', title: 'Phone' },{ id: 'remote', title: 'Remote access' },- { id: 'team-access', title: 'Team Access' },+ { id: 'team-access', title: 'Team seats' },{ id: 'ssh', title: 'Remote (SSH)' }]},diff --git a/src/renderer/components/settings/sections/ProCompare.tsx b/src/renderer/components/settings/sections/ProCompare.tsxindex b4836e590..3d86bdb09 100644--- a/src/renderer/components/settings/sections/ProCompare.tsx+++ b/src/renderer/components/settings/sections/ProCompare.tsx@@ -12,7 +12,7 @@ const PRO = ['Unlimited remote access from your phone','Standing phone host (reachable anywhere)','nodeterm mobile Pro included',- 'Team Access seats'+ '3 team seats included (extra seats $5/seat/mo)']/** Core vs Pro comparison + the live free-tier remote-access meter. */diff --git a/src/renderer/components/settings/sections/TeamAccessSection.tsx b/src/renderer/components/settings/sections/TeamAccessSection.tsxindex 4075c02ff..b2da88dc7 100644--- a/src/renderer/components/settings/sections/TeamAccessSection.tsx+++ b/src/renderer/components/settings/sections/TeamAccessSection.tsx@@ -80,8 +80,8 @@ export function TeamAccessSection({return (<SettingsSectionid="team-access"- title="Team Access"- description="Share this Mac with your team — one seat per teammate, $5/seat/month."+ title="Team seats"+ description="Share this Mac with your team — Pro includes 3 seats, extra seats $5/seat/month."isActive={isActive}searchEntries={ENTRIES}>@@ -93,6 +93,7 @@ export function TeamAccessSection({<div><h4 className="text-[13px] font-medium text-text">Seats</h4><p className="text-sm text-muted">{view.counterText}</p>+ <p className="text-xs text-muted">3 included with Pro · extra seats $5/seat/month</p></div><Button onClick={() => void ent.upgrade()}>Add seats</Button></div>@@ -181,11 +182,12 @@ export function TeamAccessSection({) : (<div className="space-y-3"><h4 className="text-[13px] font-medium text-text">- Share this Mac with your team+ Upgrade to Pro — 3 collaborator seats included</h4><p className="text-sm text-muted">- One seat per teammate, $5/seat/month. Each teammate connects from their own device- over the end-to-end encrypted relay.+ Pro comes with 3 seats to share this Mac with your team. Need more? Extra seats are+ $5/seat/month. Each teammate connects from their own device over the end-to-end+ encrypted relay.</p><p className="text-sm text-muted">A seat grants shell access: a teammate on a seat can run commands on this Mac — the@@ -193,7 +195,7 @@ export function TeamAccessSection({pairing code you compare together.</p><Button variant="primary" onClick={() => void ent.upgrade()}>- Get Team Access+ Upgrade to Pro — get 3 free seats</Button></div>)}diff --git a/src/renderer/state/entitlement.ts b/src/renderer/state/entitlement.tsindex 7fa693324..ab96863ff 100644--- a/src/renderer/state/entitlement.ts+++ b/src/renderer/state/entitlement.ts@@ -5,8 +5,8 @@ interface EntitlementState {status: LicenseStatus/** True when an active Pro entitlement is present — features gate on this. */isPremium: boolean- /** Team Access seat cap (premium → N, premium-no-field → 1, free/inactive → 0). Mirrors- * `status.seats` so the Team Access section can select it directly. */+ /** Team seat cap (premium → max(3, N), premium-no-field → 3 = Pro's free seats, free/inactive+ * → 0). Mirrors `status.seats` so the Team seats section can select it directly. */seats: numberhydrate(): Promise<void>/** Open Stripe checkout for this device; Pro arrives via onChange when the purchase lands. */