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(telemetry): count every install via /v1/check; telemetry opt-out
enes8beccda8ca68
diff --git a/src/core/check.ts b/src/core/check.tsindex 814c9552f..b7aa0ff72 100644--- a/src/core/check.ts+++ b/src/core/check.ts@@ -1,7 +1,12 @@// Polls the backend /v1/check feed from the main process (so the renderer CSP stays 'self').// Successor to the static announcements.json: returns targeted messages for the announcement-// banner AND the mandatory-update policy for the Update Card. Persists nothing server-side.+// banner AND the mandatory-update policy for the Update Card. It also carries the anonymous+// install id (deviceId + os/arch/version), which the backend upserts into `devices` as a+// passive active-install counter — so the version distribution reflects EVERY install, not only+// the (few) that also opt into the telemetry ping. Nothing personal is sent and the client IP is+// never stored server-side; a hard opt-out is still DO_NOT_TRACK / NODETERM_TELEMETRY_DISABLED.import { platform } from './platform'+import { getDeviceId } from './device-id'import type { Announcement, UpdatePolicy } from '../shared/types'const API_BASE = process.env.NODETERM_API_BASE || 'https://api.nodeterm.dev'@@ -15,8 +20,10 @@ export interface CheckResult {const EMPTY: CheckResult = { messages: [], update: { minSupported: null, mandatory: false } }// Same build + DO_NOT_TRACK gate as telemetry: dev never hits the prod API unless a local-// server is targeted explicitly. Not gated on the telemetry opt-out — this is content delivery-// (the old announcements feed always ran) and /v1/check stores nothing.+// server is targeted explicitly. Deliberately NOT gated on the in-app telemetry toggle: this+// call always runs (content delivery + the anonymous install count), so an install still counts+// even if the user never opts into the detailed telemetry ping. The env kill-switches above are+// the hard off.function allowed(): boolean {if (process.env.DO_NOT_TRACK || process.env.NODETERM_TELEMETRY_DISABLED) return falseif (!platform().isPackaged && !process.env.NODETERM_API_BASE) return false@@ -53,8 +60,10 @@ export async function fetchCheck(): Promise<CheckResult> {if (cache && now - cache.at < CACHE_MS) return cache.datatry {const q = new URLSearchParams({+ deviceId: getDeviceId(),version: platform().appVersion,os: process.platform,+ arch: process.arch,channel: 'stable'})const ctrl = new AbortController()diff --git a/src/main/telemetry.ts b/src/main/telemetry.tsindex 2f9d21d65..c18631880 100644--- a/src/main/telemetry.ts+++ b/src/main/telemetry.ts@@ -1,6 +1,7 @@-// Anonymous, opt-in telemetry (default off; Settings → Privacy). Runs in the main process (like check.ts) so the-// renderer CSP stays 'self'. Sends version/OS on launch and once a day; nothing personal,-// and the client IP is never stored server-side.+// Anonymous, opt-out telemetry (default on; turn off in Settings → Privacy). Runs in the main+// process (like check.ts) so the renderer CSP stays 'self'. Sends version/OS on launch and once a+// day; nothing personal, and the client IP is never stored server-side. Shares the same anonymous+// device-id file as core/check.ts's install counter, so an install is never double-counted.import { promises as fs, readFileSync } from 'fs'import path from 'path'import { randomUUID } from 'crypto'diff --git a/src/renderer/components/settings/sections/PrivacySection.tsx b/src/renderer/components/settings/sections/PrivacySection.tsxindex a37450ddc..ee2b09b25 100644--- a/src/renderer/components/settings/sections/PrivacySection.tsx+++ b/src/renderer/components/settings/sections/PrivacySection.tsx@@ -20,7 +20,7 @@ export function PrivacySection({ isActive }: { isActive: boolean }): React.JSX.E<SearchableRow {...ROWS.telemetry}><FieldRowlabel="Send anonymous usage data (version/OS)"- description="No personal data. Used only to see which versions are in use."+ description="No personal data; client IP is never stored. Used only to see which versions are in use. A lighter anonymous install count runs regardless; fully disable with the DO_NOT_TRACK environment variable."control={<Switchchecked={telemetryEnabled}diff --git a/src/shared/types.ts b/src/shared/types.tsindex 8acf2cd45..653e02532 100644--- a/src/shared/types.ts+++ b/src/shared/types.ts@@ -646,8 +646,10 @@ export interface Settings {* driver runs in `default`). Overridable per project via Project.defaultPermissionMode.* `auto` is version-gated: CLIs below 2.1.71 reject the value, so it degrades to no flag. */claudePermissionMode: AgentPermissionMode- /** Send anonymous usage data (version/OS) to the telemetry backend. Opt-in (default off)- * so we never collect without explicit consent (GDPR). Toggle in Settings → Privacy. */+ /** Send anonymous usage data (version/OS) to the telemetry backend. Opt-OUT (default on):+ * version/OS only, nothing personal, client IP never stored. Turn it off in Settings → Privacy+ * (or hard-disable with DO_NOT_TRACK / NODETERM_TELEMETRY_DISABLED). Note: a lighter anonymous+ * install count also rides the /v1/check call and is NOT gated on this toggle — see core/check.ts. */telemetryEnabled: boolean/** Keep a standing relay host connection so a paired phone can reach this Mac from anywhere* (end-to-end encrypted). Pro-only; default off. Toggle in Settings → Phone. */@@ -701,7 +703,9 @@ export const DEFAULT_SETTINGS: Settings = {// Sessions start in auto mode out of the box. Existing users pick this up on hydrate// (settings hydrate merges over DEFAULT_SETTINGS) — a deliberate behavior change.claudePermissionMode: 'auto',- telemetryEnabled: false,+ // Opt-out (default on). Existing users pick this up on hydrate ONLY if their settings.json has+ // no telemetryEnabled key yet; anyone who already saved settings keeps their stored value.+ telemetryEnabled: true,phoneAccessEnabled: false,mobilePushEnabled: true,mobilePushNeedsYou: true,