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
fix(macos): declare NSLocalNetworkUsageDescription in the production Info.plist
enesd1886e1b3f79
diff --git a/CLAUDE.md b/CLAUDE.mdindex f951fb8c0..6a3b708e4 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -2370,6 +2370,20 @@ on signing: an unsigned auto-update is a downgrade in trust), and thefork's PE-identity polish (electron-builder leaves `OriginalFilename` empty; the fork's`resedit`-based afterSign hook fixes it — cosmetic for NSIS, load-bearing only for Squirrel).+**macOS permission prompts are declared in `build.mac.extendInfo`, and a missing one denies+SILENTLY.** On macOS 15+ a connection to the user's own subnet is gated by Local Network privacy,+and it is attributed to the **responsible process** — for everything nodeterm spawns (the tmux+server, the shell, an agent CLI, the `node` it runs) that is nodeterm.app, not the child. With no+`NSLocalNetworkUsageDescription` there is no string to prompt with, so the system never asks and+**no row appears** under System Settings → Privacy & Security → Local Network for the user to+grant: an agent gets `EHOSTUNREACH` on a LAN address while `/usr/bin/curl` (Apple-signed, exempt)+reaches the same host in the same second — a permission failure wearing a network outage's error+(issue #589). `NSBonjourServices` is the trap that travels with it: it is required only to *browse*+mDNS services, which this app does not do, and declaring service types we never browse is a false+claim to the user and to review — unicast LAN access needs the usage description alone. The key is+what makes the denial grantable; it is not itself proof anyone's access came back. Guarded as an+allowlist-with-reasons by `src/main/info-plist.test.ts`, the sibling of the entitlements guard.+Auto-update uses **electron-updater** (`src/main/updater.ts`, `initUpdater(onBeforeRestart?)` from `index.ts`):runs **only when `app.isPackaged`** (dev = no-op), checks on launch + every 6h, auto-downloads,forwards the lifecycle (`update-available` / `download-progress` / `update-downloaded` / errors)diff --git a/package.json b/package.jsonindex a5d888ca5..45ea24c9e 100644--- a/package.json+++ b/package.json@@ -95,7 +95,8 @@}],"extendInfo": {- "NSMicrophoneUsageDescription": "nodeterm uses the microphone so you can dictate into your terminals."+ "NSMicrophoneUsageDescription": "nodeterm uses the microphone so you can dictate into your terminals.",+ "NSLocalNetworkUsageDescription": "Terminals and agents you run may connect to devices and servers on your local network."},"target": [{diff --git a/src/main/info-plist.test.ts b/src/main/info-plist.test.tsnew file mode 100644index 000000000..ca3475d87--- /dev/null+++ b/src/main/info-plist.test.ts@@ -0,0 +1,96 @@+import { describe, it, expect } from 'vitest'+import fs from 'fs'+import path from 'path'++/**+ * Release guard for the macOS Info.plist usage descriptions the production build+ * ships (package.json `build.mac.extendInfo`, merged into Info.plist by+ * electron-builder). Sibling of `entitlements.test.ts`, same shape: an ALLOWLIST+ * with the reason each key survived review, so an unexplained string cannot+ * appear in a system permission prompt without someone deciding on the wording.+ *+ * WHY NSLocalNetworkUsageDescription EXISTS (issue #589): on macOS 15+ a+ * connection to an address on the user's own subnet is gated by Local Network+ * privacy, and access is attributed to the RESPONSIBLE PROCESS — which for+ * everything nodeterm spawns (the tmux server, the shell, an agent CLI, the+ * `node` binary it runs) is nodeterm.app, not the child. Apple-signed binaries+ * such as `/usr/bin/curl` are exempt; a Homebrew `node` is not. Without this key+ * there is no usage string to show, so the system does not prompt and no row+ * appears under System Settings → Privacy & Security → Local Network: the denial+ * is SILENT and ungrantable, surfacing to the user as `EHOSTUNREACH` from inside+ * their agent session while `curl` to the same host at the same moment succeeds.+ * The key is what turns an invisible denial into a permission the user can grant.+ *+ * WHAT THIS KEY IS NOT: it is not a claim that we fixed anyone's LAN access, and+ * it is not the sandbox lever — the app is not sandboxed (no+ * `com.apple.security.app-sandbox`), so `com.apple.security.network.client`+ * means nothing here and is deliberately absent from the entitlements.+ */+const PKG = path.resolve(__dirname, '../../package.json')++/**+ * Every `NS*UsageDescription` the production build is allowed to declare, with+ * the capability it is paired to. A usage description is a sentence the OS shows+ * the user in a permission prompt, so it is reviewed like an entitlement.+ */+const REVIEWED_USAGE_DESCRIPTIONS: Readonly<Record<string, string>> = {+ NSMicrophoneUsageDescription:+ 'dictation (speech-to-text); paired with the com.apple.security.device.audio-input entitlement',+ NSLocalNetworkUsageDescription:+ 'terminals and agents nodeterm spawns connect to hosts on the local subnet; ' ++ 'macOS attributes that to nodeterm.app as the responsible process (issue #589)'+}++/**+ * Keys that must not appear, with what declaring them would cost. `NSBonjourServices`+ * is the trap that comes attached to the local-network key: it is required only to+ * BROWSE Bonjour/mDNS services, and — measured on this tree — nothing here does+ * (no `NSNetServiceBrowser`, no `dns-sd`, no mDNS dependency, no multicast socket).+ * Declaring service types we never browse would put a false claim in front of the+ * user and in front of App Review, and it does not widen unicast local-network+ * access, which is the only access this app actually makes.+ */+const FORBIDDEN_INFO_KEYS: Readonly<Record<string, string>> = {+ NSBonjourServices:+ 'declares Bonjour service types the app browses — nodeterm browses none; a unicast ' ++ 'connection to a LAN address needs NSLocalNetworkUsageDescription only'+}++describe('macOS production Info.plist (build.mac.extendInfo)', () => {+ const pkg = JSON.parse(fs.readFileSync(PKG, 'utf8'))+ const extendInfo: Record<string, unknown> = pkg?.build?.mac?.extendInfo ?? {}+ const keys = Object.keys(extendInfo)++ it('declares a local-network usage description', () => {+ const text = extendInfo.NSLocalNetworkUsageDescription+ expect(+ typeof text === 'string' && text.trim().length > 0,+ 'NSLocalNetworkUsageDescription is missing or empty. Without it macOS 15+ denies ' ++ 'local-subnet access to everything nodeterm spawns SILENTLY — no prompt, and no row ' ++ 'in System Settings → Privacy & Security → Local Network for the user to grant (#589).'+ ).toBe(true)+ })++ it('declares only reviewed usage descriptions, each with a non-empty string', () => {+ const usage = keys.filter((k) => k.endsWith('UsageDescription'))+ const unreviewed = usage.filter((k) => !(k in REVIEWED_USAGE_DESCRIPTIONS))+ expect(+ unreviewed,+ 'Unreviewed macOS usage description(s) in the production build. The string is shown to ' ++ 'the user in a system permission prompt — add it to REVIEWED_USAGE_DESCRIPTIONS with ' ++ 'the capability it is paired to, after deciding the app genuinely needs that access.'+ ).toEqual([])+ for (const key of usage) {+ const text = extendInfo[key]+ expect(typeof text === 'string' && text.trim().length > 0, `${key} must be a non-empty string`).toBe(+ true+ )+ }+ })++ it('claims no capability it does not use', () => {+ for (const [key, why] of Object.entries(FORBIDDEN_INFO_KEYS)) {+ expect(keys, `${key} is declared in build.mac.extendInfo: ${why}`).not.toContain(key)+ }+ })+})