Skip to content

feat(server): verified Cua Driver 0.37.0 lifecycle with telemetry off - #665

Merged
lidge-jun merged 10 commits into
devfrom
feat/cua-driver-server
Oct 21, 2026
Merged

lidge-jun merged 10 commits into
devfrom
feat/cua-driver-server

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

GOAT has no computer use. Upstream T3 Code has an open, unmerged Cua Driver stack by Julius Marminge (rebuilt from his #16527) that adds verified distribution, an opt‑in server lifecycle, an Electron host, and packaging, and attaches nothing to agents. This PR ports its server half, pingdotgg/t3code#21694 at frozen head b8569ac92 and #21695 at dc307c8a7, pins Cua Driver 0.37.0, and forces the driver's telemetry and update check off. Computer use stays off by default (enableCua: false), and no provider or UI uses it yet.

The first two commits are the upstream PRs applied as diffs, authored by Julius with the upstream commit list in each message. Desktop hosting and packaging follow in the stacked PR feat/cua-driver-desktop.

GOAT deltas from upstream

  • Pin 0.37.0 (upstream pins 0.34.1). @trycua/cua-driver on npm stops at 0.37.0, and the SDK and executable must share a version. Archive names, byte sizes and SHA‑256 come from the official cua-driver-rs-v0.37.0 SHA256SUMS (re‑downloaded and compared). All six platform/arch entries match the downloaded archives and contain every required companion file. The 0.37.0 embedded host API is identical to 0.34.1's, so no ported logic changed.
  • Telemetry and update check off at the daemon. The host is built with EmbeddedCuaDriverHost.withOptions(cuaDriverHostOptions(...)), passing CUA_DRIVER_RS_TELEMETRY_ENABLED=false, CUA_TELEMETRY_ENABLED=false and CUA_DRIVER_RS_UPDATE_CHECK=false. The 0.37.0 host clears the daemon environment and rejects names outside its allowlist (allowed_environment_name in cua-driver-sdk/src/embedded.rs), so DO_NOT_TRACK and CUA_TELEMETRY cannot be passed there; trying makes host construction fail. This differs from plan D4's four‑variable list on purpose.
  • Opt‑outs on the agent path. The MCP descriptor that providers will spawn (cua-driver mcp --embedded …) is a separate driver process outside that allowlist, and upstream returns it with an empty environment. CuaDriver.acquire now adds all five opt‑outs (withCuaDriverPrivacyEnvironment), overriding any value the native descriptor carries.
  • Renames via node scripts/goat-rename.ts --apply: @goat/* imports, GOAT_CUA_DRIVER_PATH, goat/cua/* service keys, temp prefix. The standalone host identity is si.goat.server (upstream com.t3tools.t3code.server; os-identities keeps com.t3tools only for installed OS services).
  • server.ts: the runtime layer pipe already had 20 steps, its maximum, so layerCuaDriver joins the existing ProjectStore/ThreadSearch merge. Upstream's separate step fails typecheck in GOAT (TS2554).
  • Merged with dev 881757889 (after the upstream chase chase(t3): merge upstream main 4f651cb10 #658). server.ts, packages/shared/package.json and third-party-licenses.config.json take dev's versions plus this PR's additions. pnpm-lock.yaml differs from dev only in @trycua/@ubjs entries, and vp i --frozen-lockfile passes.
  • Docs: ADR‑0020 (structure/decisions/ADR-0020-cua-driver-computer-use.md), a "Computer use" section in structure/server.md, the shared export row, manifest and INDEX rows, and fork‑delta area cua-driver (devlog/_chase/scan.sh --delta ok).

Verification

Real macOS 26 (arm64), official 0.37.0 universal binary:

  • Daemon env. I started the host through the SDK using the shared options, with a hostile parent env (CUA_DRIVER_RS_TELEMETRY_ENABLED=true, CUA_DRIVER_RS_UPDATE_CHECK=true) and an isolated HOME. ps -E on the live daemon showed all three switches =false and --host-bundle-id si.goat.server. Under that env, cua-driver telemetry status --json reports enabled: false, source: environment (baseline without overrides: enabled: true, source: default). The isolated HOME held no installation ID or telemetry markers afterwards. 0.37.0's get_config does not report telemetry state, so this check relies on the process env plus telemetry status.
  • Agent path. I spawned the MCP proxy from the published descriptor: 62 tools listed over stdio (same count as upstream's Linux run), proxy env holds all five opt‑outs, and telemetry status under them reports source: do_not_track.
  • Production standalone path. makeCuaDriverInstallation + FetchHttpClient downloaded the 0.37.0 darwin archive from GitHub, verified size and SHA‑256, and published tools/cua-driver/0.37.0 with exactly the five expected files in 1.6 s; cache reuse took 1 ms. makeStandaloneHostFactory with the real SDK then started and stopped the host. Upstream only qualified this path on Linux. This was a temporary test file, not committed.
  • vp test run src/cua src/resourceTelemetry (apps/server): 80/81. The one failure, HostResources publishes load and disk, is darwin‑only on dev: diskPathForPlatform("darwin") returns $HOME while the test expects /; neither file differs from dev, and CI runs Linux. vp test run src/telemetry (apps/desktop): 5/5. vp test run src/settings src/resourceTelemetry (packages/contracts): 198/198.
  • Red→green: emptying the host option environment fails starts an explicit driver path with telemetry and update checks off; restoring it passes. The existing lifecycle tests now assert the exact five‑variable descriptor, with a hostile CUA_TELEMETRY=1 in the native fixture.
  • Typecheck exits 0 for apps/server, apps/desktop, packages/shared and packages/contracts (only pre‑existing Effect suggestions remain). Targeted vp lint and vp fmt --check pass on touched files; server.ts:944 has a pre‑existing warning.

Platform notes (re‑verified from 0.37.0)

  • Windows UAC. cua-driver.exe and cua-driver-uia.exe embed requestedExecutionLevel level="asInvoker", so neither prompts on launch. install.ps1 installs under %LOCALAPPDATA% without elevation and prompts only for its optional -AutoStart scheduled task, which GOAT never uses. Unelevated, the driver refuses elevated targets and may see truncated UWP/AppContainer UIA trees. Not run on a real Windows host (win was unreachable).

  • Linux arm64. Ships native aarch64 builds of the driver and SDK library (glibc ≥ 2.30, same floor as x64). The installer maps Linux-aarch64, and the release notes label all Linux builds "preview". A read‑only probe of an arm64 Ubuntu 24.04 host (glibc 2.39) found it compatible, but it is headless; I did not run the driver there.

  • goat-ci on head 5ef6fbc (after merging dev 10 commits past 8817578, including chore: drop leftover T3 tooling names and unused root folders #661): pull_request run 39591463869 and full dispatch run 39591455467, both 18/18 jobs with goat-ci-result success. The previous head a1340bf was green on both runs (39574338635, 39574407950).

Not run / open

Review

Independent read-only review by Codex gpt-6.1-sol. Round 1 returned MUST-FIX with three findings: unrelated lockfile peer re-resolution, docs describing the desktop host as current at this layer, and the ADR commit citation. All three are fixed in 8573ccbfb. Round 2 returned PASS. Neither round found a runtime defect.

Implementation: anthropic/claude-opus-5-5 via the Codex harness in GOAT (lane 1 of the Cua Driver program). Upstream implementation credit: Julius Marminge (pingdotgg/t3code #16527, #21694, #21695).

juliusmarminge and others added 6 commits October 21, 2026 16:58
Port of pingdotgg/t3code#21694 at frozen head b8569ac92 by Julius
Marminge, rebuilt from his #16527. Upstream commits:
1f46cce27 feat(server): verify and cache Cua Driver releases
37f04d8d2 fix(server): defer Cua SDK dependency to its consumer
b8569ac92 fix(server): keep Cua Driver installation details private

Applied as one diff of 1451e7c..b8569ac92; the only conflict was the
packages/shared export map, resolved by keeping GOAT's ssh exports.
Port of pingdotgg/t3code#21695 at frozen head dc307c8a7 by Julius
Marminge, rebuilt from his #16527. Upstream commits:
ff5f586d2 feat(server): manage opt-in Cua Driver lifecycle
98a57893c fix(server): preserve Cua hosting in executable and stale telemetry
fe9e89197 fix(server): declare Cua SDK with lifecycle consumer
fe06f033e fix(server): preserve Cua Driver exit failures
817274756 fix(server): prevent enabling retired desktop Cua hosts
dc307c8a7 fix(server): limit Cua startup after preparation

Applied as one diff of b8569ac92..dc307c8a7. apps/server/package.json
kept GOAT's dependency list plus the SDK; pnpm-lock.yaml is regenerated
in the following GOAT commit.
GOAT deltas on top of the #21694/#21695 port:

- Pin driver archives and the @trycua/cua-driver catalog SDK to 0.37.0,
  the newest version published for both halves of the private protocol
  (npm has no 0.38.0). Sizes and SHA-256 come from the official
  cua-driver-rs-v0.37.0 SHA256SUMS; the 0.37.0 archives keep the file
  layout the installer requires and the embedded host API is unchanged.
- Start the host through EmbeddedCuaDriverHost.withOptions with
  CUA_DRIVER_RS_TELEMETRY_ENABLED, CUA_TELEMETRY_ENABLED and
  CUA_DRIVER_RS_UPDATE_CHECK set to false. The host clears the daemon's
  environment and rejects names outside its allowlist, so DO_NOT_TRACK
  and CUA_TELEMETRY cannot be passed there.
- Add all five opt-outs to every MCP descriptor the service returns; the
  provider-spawned cua-driver mcp proxy runs outside that allowlist.
- Apply goat-rename to the port (package scope, GOAT_CUA_DRIVER_PATH,
  service keys) and identify standalone hosts as si.goat.server.
- Fold the Cua layer into an existing merge in server.ts: the runtime
  pipe already had 20 steps, its maximum.
- Regenerate pnpm-lock.yaml.

Co-authored-by: Julius Marminge <[email protected]>
Adds ADR-0020 (port upstream, 0.37.0 pin, MIT-only parts, telemetry
and update check off, default-off setting), the server "Computer use"
section, the shared cuaDriverRelease export, manifest and index rows,
and the cua-driver fork delta area.
Restore unrelated peer resolutions that a full re-resolve changed in
pnpm-lock.yaml (vp i --frozen-lockfile accepts the result), say that
the Electron shell does not host a driver at this layer, and cite the
GOAT decision commit in ADR-0020. From the independent review of #665.
# Conflicts:
#	apps/server/src/server.ts
#	packages/shared/package.json
#	third-party-licenses.config.json
@lidge-jun

Copy link
Copy Markdown
Contributor Author

Merge manager: run 39599647928 attempt 2 passed every job except goat-test-ssh: the tunnel.facts timeouts that dev had before #708/#702. Since that run, dev also changed apps/server/src/server.ts (layer wiring, #694/#674), packages/shared/package.json and third-party-licenses.config.json (#659). Merged dev into the branch with update-branch (no force) so goat-ci reruns on the combined tree, ssh fix included.

@lidge-jun
lidge-jun merged commit d63d6e8 into dev Oct 21, 2026
18 checks passed
lidge-jun added a commit that referenced this pull request Oct 21, 2026
Rebased onto dev after #665 merged: the 1b delta from 3b88912..25a1d88 re-applied on dev b001943. Ports pingdotgg/t3code#21696 and #21697 (Julius Marminge, rebuilt from #16527).

Co-authored-by: Julius Marminge <[email protected]>
lidge-jun added a commit that referenced this pull request Oct 21, 2026
Rebased onto dev after #665 merged: the 1b delta from 3b88912..25a1d88 re-applied on dev b001943. Ports pingdotgg/t3code#21696 and #21697 (Julius Marminge, rebuilt from #16527).

Co-authored-by: Julius Marminge <[email protected]>
lidge-jun added a commit that referenced this pull request Oct 21, 2026
…d, and checks each host's screen

Replays #691 (provider attachment), #681 (first-run prompt, any-host settings, macOS verification), #701 (safety guard) and #697 (remote host capability) onto dev 75b229c after #665 and #667 merged. Upper-stack delta 25a1d88..0afdc1b. Conflicts kept both sides: Handoffs imports, HostStatusMcpService computerUse + opencodex parity read, hostStatus quotaPool + computerUse, agent surface count 176; the HandoffCard grant tests moved into HandoffCard.browser.test.tsx with full fake timers.

Co-authored-by: Julius Marminge <[email protected]>
lidge-jun added a commit that referenced this pull request Oct 21, 2026
…d, and checks each host's screen

Replays #691 (provider attachment), #681 (first-run prompt, any-host settings, macOS verification), #701 (safety guard) and #697 (remote host capability) onto dev 75b229c after #665 and #667 merged. Upper-stack delta 25a1d88..0afdc1b. Conflicts kept both sides: Handoffs imports, HostStatusMcpService computerUse + opencodex parity read, hostStatus quotaPool + computerUse, agent surface count 176; the HandoffCard grant tests moved into HandoffCard.browser.test.tsx with full fake timers.

Co-authored-by: Julius Marminge <[email protected]>
lidge-jun added a commit that referenced this pull request Oct 21, 2026
…d, and checks each host's screen (#697)

Replays #691 (provider attachment), #681 (first-run prompt, any-host settings, macOS verification), #701 (safety guard) and #697 (remote host capability) onto dev 75b229c after #665 and #667 merged. Upper-stack delta 25a1d88..0afdc1b. Conflicts kept both sides: Handoffs imports, HostStatusMcpService computerUse + opencodex parity read, hostStatus quotaPool + computerUse, agent surface count 176; the HandoffCard grant tests moved into HandoffCard.browser.test.tsx with full fake timers.

Co-authored-by: Julius Marminge <[email protected]>
@lidge-jun
lidge-jun deleted the feat/cua-driver-server branch October 30, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants