Skip to content

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.

fix(license): gate network calls on packaged build + DO_NOT_TRACK (match telemetry/check)

enes8bb062b9b5c2
diff --git a/src/main/license.ts b/src/main/license.ts
index 569b4f2bf..49aa59ac2 100644
--- a/src/main/license.ts
+++ b/src/main/license.ts
@@ -13,6 +13,14 @@ import { ENTITLEMENT_PUBLIC_KEY } from './entitlement-key'
const API_BASE = process.env.NODETERM_API_BASE || 'https://api.nodeterm.dev'
+// Same gate as telemetry/check: never hit the prod API from a dev/unsigned build unless a
+// local server is targeted explicitly, and honor DO_NOT_TRACK / the kill switch.
+function allowed(): boolean {
+ if (process.env.DO_NOT_TRACK || process.env.NODETERM_TELEMETRY_DISABLED) return false
+ if (!app.isPackaged && !process.env.NODETERM_API_BASE) return false
+ return true
+}
+
interface Stored {
key?: string
token?: string
@@ -65,6 +73,7 @@ function statusFrom(token: string | undefined, error: string | null = null): Lic
}
async function call(path: string, body: unknown): Promise<{ token?: string; error?: string }> {
+ if (!allowed()) return { error: 'disabled' }
try {
const ctrl = new AbortController()
const t = setTimeout(() => ctrl.abort(), 8000)