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
Merge remote-tracking branch 'origin/main' into tmp/652-doc
enes4a9b0fff5e8b
diff --cc src/core/codex-identity-proxy.tsindex 745e711d8,6a0dbc419..9e380b6fa--- a/src/core/codex-identity-proxy.ts+++ b/src/core/codex-identity-proxy.ts@@@ -776,11 -825,9 +937,12 @@@ if [ "\${1-}" = resume ]; the# live node owns it; two clients on one thread is worse than one plain session, so we fall back.if nt_post 20 --data-urlencode "nodeId=$NODETERM_NODE_ID" --data-urlencode "threadId=\${2-}" \\--data-urlencode "accountId=\${NODETERM_CODEX_ACCOUNT_ID-}" \\+ --data-urlencode "agentId=\${NODETERM_AGENT_ID-}" \\"http://localhost:\${NODETERM_HOOK_PORT-0}/codex-thread/bind" >/dev/null; then- exec codex --remote unix:// "$@"+ nt_bound_thread=$2+ shift 2+ nt_run_shared "$nt_bound_thread" "$@"+ exit $?fint_report_fallback thread-bind-refusedexec codex "$@"diff --cc src/core/codex-launcher-sh.test.tsindex ef221df16,643282c75..8687c0f86--- a/src/core/codex-launcher-sh.test.ts+++ b/src/core/codex-launcher-sh.test.ts@@@ -61,13 -61,12 +61,13 @@@ beforeAll(async () =>resetPlatformForTests()initPlatform(fakePlatform({ userDataDir: dir }))launcher = path.join(dir, 'nodeterm-codex')- // `true` stands in for `codex app-server daemon start`; the "no app-server" case overrides it.- fs.writeFileSync(launcher, buildCodexLauncherScript('true'), { mode: 0o755 })+ // `true` stands in for `codex app-server daemon start`; `false` makes preflight exercise that+ // start rather than calling the fake client as a health probe. Health-specific cases override it.+ fs.writeFileSync(launcher, buildCodexLauncherScript('true', 'false'), { mode: 0o755 })await hookServer.start()hookServer.setNodeAuthSecret(SECRET)- hookServer.setCodexThreadStartHandler(async ({ nodeId, cwd, accountId }) => {- started.push({ nodeId, cwd, accountId })+ hookServer.setCodexThreadStartHandler(async ({ nodeId, cwd, accountId, agent }) => {+ started.push({ nodeId, cwd, accountId, agentId: agent?.agentId })if (startDelayMs) await new Promise((r) => setTimeout(r, startDelayMs))if (!startAnswer) throw new Error('start refused')return startAnswer()diff --cc src/server/handlers/index.tsindex 6f2055422,ad092a714..c87ac2584--- a/src/server/handlers/index.ts+++ b/src/server/handlers/index.ts@@@ -7,7 -7,9 +7,8 @@@ import { GitService } from '../../core/import { generateCommitMessage } from '../../core/commit-message'import { registerFsHandlers } from '../../core/fs-handlers'import { claudeCliCaps, registerClaudeCliIpc } from '../../core/claude-cli'+ import { registerGrokCliIpc } from '../../core/grok-cli'import { registerCodexIdentityIpc } from '../../core/codex-identity-caps'-import { UNKNOWN_CODEX_IDENTITY_CAPS } from '@shared/types'import { startUsageService } from '../../core/usage/usage-service'import { registerClaudeAccountsIpc } from '../../core/claude-accounts-service'import { codexUsageAccounts } from '../../core/codex-accounts-core'@@@ -70,11 -72,28 +71,14 @@@ export function registerCoreHandlers// The browser needs the same `--permission-mode auto` version gate as desktop: the server's own// claude CLI is the one that will run the terminal nodes. Warm it so the first call is cached.registerClaudeCliIpc()+ // Invariant 11 for probes: registered in BOTH shells, or session-id minting silently works on+ // the desktop and not in the browser, with nothing to say which.+ registerGrokCliIpc()void claudeCliCaps()- // ---- Codex shared identity: a DELIBERATE degrade, not an omission ----------------------------- // The Server Edition answers "no shared identity", so every Codex node here launches the bare- // `codex` it always did — a working node with its own app-server, just without the shared one.- //- // The secret question that used to block this is ANSWERED: src/server/index.ts arms- // `hookServer.setNodeAuthSecret(await loadOrCreateNodeAuthSecret())` at boot, which on a headless- // host is raw 0600 bytes in the data dir — a decision taken explicitly, not quietly (see- // src/core/agents/node-auth-secret.ts). As of S6 PR 5 the same boot path also calls- // `setCodexThreadIdentityAuthSecret(secret)`, so a MANAGED Codex account's thread→node→account- // ownership records sign and verify on this headless host instead of throwing "identity- // authentication is unavailable" (the carried PR-2 obligation). What stays deliberately absent- // here is the shared-app-server plumbing (`refreshCodexIdentityCaps()` + the two- // `setCodexThread*Handler` registrations src/main/index.ts makes): the Server Edition answers "no- // shared identity" so its Codex nodes launch the bare `codex` — a working node with its own- // app-server, just without the shared one. Arming the record secret is orthogonal to that- // degrade: it never launches an app-server, it only lets the record layer sign.- registerCodexIdentityIpc(() => UNKNOWN_CODEX_IDENTITY_CAPS)+ // The answer is populated after server node identity is armed. Early browser callers wait for+ // that refresh instead of being pinned to a false "plain Codex" answer for the whole app run.+ registerCodexIdentityIpc()// Managed CLAUDE accounts (issue #313). The lifecycle is core, so a browser-only deployment can// create, log into and remove them exactly as the desktop does — env injection, the transcriptdiff --cc src/server/index.tsindex b34c8e2f8,0d2b11d40..ade8f4e52--- a/src/server/index.ts+++ b/src/server/index.ts@@@ -48,9 -49,9 +49,10 @@@ import { registerLogHandlers } from '..import os from 'os'import { hookServer } from '../core/agents/hook-server'import { serverEditionControlHandler } from './control-unsupported'+ import { initServerCanvasControl, type ServerCanvasControl } from './canvas-control'import { refreshNodeTokens } from '../core/agents/node-token-service'import { armServerNodeIdentity } from './node-identity-arm'+import { wireServerCodexSharedIdentity } from './codex-shared-identity'import {writePendingAnswerLocal,startPendingSweep,