Repository navigation
feat(desktop): Computer History for macOS, Windows, and Linux - #6579
sheehanmunim wants to merge 81 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Reviewed the changed TypeScript for the Effect service conventions. Five findings, all in new server/desktop code: a hidden process.env dependency channel between two layers, a compatibility re-export shim, module-global daemon state consumed from Effect, and a layer export name.
Posted via Macroscope — Effect Service Conventions
There was a problem hiding this comment.
Pull request overview
Adds an opt-in “Computer History” feature (accessibility-driven interaction event capture, local segment storage, periodic summarization into memory markdown, and optional Codex Skysight mirroring) and wires it through desktop IPC, server/provider context injection, and the web Settings UI alongside updated approval kinds for tool/permission gating.
Changes:
- Extend contracts/runtime ingestion + web UI to support new approval kinds (
tool,permissions) and surface them consistently. - Add Computer History shared store/summarization utilities, server-side summarization loop + provider injection, and desktop IPC + daemon management.
- Update desktop build/artifact staging to bundle the desktop MCP server across platforms (Swift on macOS; Rust on Windows/Linux) and include required macOS Info.plist usage strings.
Reviewed changes
Copilot reviewed 86 out of 102 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | Restricts staged formatter glob to file types vp fmt can handle. |
| scripts/build-desktop-artifact.ts | Stages desktop MCP binaries (Swift/Rust) into desktop artifacts and adds macOS Apple Events usage description. |
| scripts/build-desktop-artifact.test.ts | Adds tests for desktop MCP executable naming/targets and macOS Apple Events metadata. |
| packages/shared/src/computerHistory/events.ts | Defines Computer History event/control/status file shapes and filter helpers. |
| packages/shared/src/computerHistory/paths.ts | Adds filesystem layout helpers for Computer History + Codex Skysight mirror paths. |
| packages/shared/src/computerHistory/summarize.ts | Implements summarization + markdown rendering + Skysight instruction text. |
| packages/shared/src/computerHistory/store.ts | Implements segment reading, summarization passes, mirroring, timeline, deletion, and context rendering. |
| packages/shared/src/computerHistory/store.test.ts | Unit tests for filters, summarization markdown, timeline/mirroring/clearing, and memory writes. |
| packages/shared/src/computerHistory/index.ts | Exports Computer History module surface. |
| packages/shared/package.json | Exposes ./computerHistory subpath export. |
| packages/contracts/src/computerHistory.ts | Adds contract schemas for status/timeline/clear scope/suggestions. |
| packages/contracts/src/index.ts | Exports new computerHistory contracts. |
| packages/contracts/src/settings.ts | Adds desktopControl and computerHistory settings + patch schema support. |
| packages/contracts/src/providerRuntime.ts | Adds canonical request types for tool/permissions approvals. |
| packages/contracts/src/orchestration.ts | Extends provider request kinds to include tool and permissions. |
| packages/contracts/src/ipc.ts | Extends desktop bridge IPC types for Computer Use permissions + Computer History operations. |
| packages/effect-codex-app-server/src/errors.ts | Adds new identifier purposes for approval request types. |
| packages/effect-codex-app-server/src/client.ts | Adds fiber-local CurrentServerRequestId for correlating concurrent server requests. |
| package.json | Adds build:desktop-mcp script for macOS Swift build. |
| native/t3-desktop-mcp/Package.swift | Defines SwiftPM package for macOS desktop MCP server. |
| native/t3-desktop-mcp/.gitignore | Ignores SwiftPM build output. |
| native/t3-desktop-mcp/Sources/ComputerHistory.swift | Adds macOS Computer History daemon recording AX + frontmost sampling to JSONL + status/control files. |
| native/t3-desktop-mcp/Sources/BrowserBridge.swift | Adds Chrome native messaging bridge via Unix socket + native-host mode. |
| native/t3-desktop-mcp-rs/Cargo.toml | Adds Rust crate for Windows/Linux desktop MCP server. |
| native/t3-desktop-mcp-rs/.gitignore | Ignores Rust target/ build output. |
| native/t3-desktop-mcp-rs/src/platform/mod.rs | Adds platform abstraction/types and shared formatting + tests. |
| native/t3-desktop-mcp-rs/src/capture.rs | Adds guarded capture + Wayland/X11 handling + PNG scaling with tests. |
| native/t3-desktop-mcp-rs/src/apps.rs | Adds window-based app discovery + pid resolution with tests. |
| native/t3-desktop-mcp-rs/linux-ch-smoke/Dockerfile | Adds Linux Xvfb/Openbox-ish smoke harness build image for CH sampling. |
| native/t3-desktop-mcp-rs/linux-ch-smoke/run.sh | Adds Linux smoke script validating daemon writes status/events. |
| native/t3-chrome-extension/manifest.json | Adds MV3 extension manifest for desktop control bridge. |
| native/t3-chrome-extension/wake.js | Adds navigation wake-up ping for MV3 service worker. |
| native/t3-chrome-extension/install.sh | Adds macOS/Linux native host registration script for Chrome/Chromium profiles. |
| native/t3-chrome-extension/install.ps1 | Adds Windows native host registration (registry + wrapper) for Chrome/Chromium. |
| apps/server/src/server.ts | Installs Computer History runtime layer into background layer. |
| apps/server/src/computerHistory/service.ts | Adds server helpers for CH context injection + control sync + periodic summarization loop. |
| apps/server/src/desktopControl/desktopMcpBinary.ts | Adds resolver for bundled/dev desktop MCP binary path. |
| apps/server/src/desktopControl/desktopMcpBinary.test.ts | Tests desktop MCP path resolution behavior across platforms. |
| apps/server/src/desktopControl/desktopMcpLaunch.ts | Adds settings-gated resolver that emits env flags for desktop MCP launch. |
| apps/server/src/desktopControl/desktopMcpLaunch.test.ts | Tests settings gating + env flags + fail-closed behavior for desktop MCP injection. |
| apps/server/src/desktopControl/resolveEnabledDesktopMcp.ts | Compatibility re-export for the new desktop MCP resolution API. |
| apps/server/src/provider/Layers/ClaudeAdapter.ts | Injects desktop MCP server into Claude sessions when enabled/resolved. |
| apps/server/src/provider/Layers/CursorAdapter.ts | Injects desktop MCP server into Cursor sessions when enabled/resolved. |
| apps/server/src/provider/Layers/GrokAdapter.ts | Injects desktop MCP server into Grok sessions when enabled/resolved. |
| apps/server/src/provider/Layers/GrokAdapter.test.ts | Updates test layer wiring to include server settings service. |
| apps/server/src/provider/Layers/CodexProvider.ts | Advertises Codex form-elicitation capability. |
| apps/server/src/provider/Layers/CodexProvider.test.ts | Tests Codex initialize capabilities include form elicitation. |
| apps/server/src/provider/Layers/CodexSessionRuntime.ts | Adds permissions + MCP elicitation approval handling; injects Computer History context into Codex turn start. |
| apps/server/src/provider/Layers/CodexSessionRuntime.test.ts | Adds tests for permissions response + MCP approval kind detection/mapping. |
| apps/server/src/provider/Layers/CodexAdapter.ts | Maps new approval kinds; injects desktop MCP into Codex via app server args/env. |
| apps/server/src/provider/Layers/CodexAdapter.test.ts | Adds lifecycle tests for mapping permissions/tool approvals into canonical events. |
| apps/server/src/provider/CodexDeveloperInstructions.ts | Allows appending Computer History context into Codex developer instructions. |
| apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts | Preserves tool/permissions approvals into activities with correct summaries. |
| apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.approval.test.ts | Adds tests ensuring tool/permissions approvals are preserved for clients. |
| apps/web/src/session-logic.ts | Extends requestKind derivation/extraction for tool + permissions approvals. |
| apps/web/src/session-logic.test.ts | Adds tests for deriving/preserving tool + permissions approvals. |
| apps/web/src/components/chat/ComposerPendingApprovalPanel.tsx | Adds UI labels for tool vs permission approvals. |
| apps/web/src/components/chat/ComposerPendingApprovalPanel.test.tsx | Tests new approval label behavior. |
| apps/web/src/routeTree.gen.ts | Adds settings routes for Computer Use and Computer History. |
| apps/web/src/routes/settings.computer-use.tsx | Adds Settings route entry for Computer Use page. |
| apps/web/src/routes/settings.computer-history.tsx | Adds Settings route entry for Computer History page. |
| apps/web/src/components/settings/SettingsSidebarNav.tsx | Adds sidebar icons for Computer Use and Computer History sections. |
| apps/web/src/components/settings/settingsSearch.ts | Adds settings search entries/labels for Computer Use + Computer History. |
| apps/web/src/components/settings/ComputerHistorySettings.tsx | Adds Settings UI for enabling/pausing/mirroring CH and viewing/clearing timeline. |
| apps/web/src/components/settings/browserBrandIcons.tsx | Adds brand icons + agent cursor icon component for Computer Use UI. |
| apps/web/src/assets/computer-use/google-chrome.svg | Adds Chrome icon asset for settings UI. |
| apps/web/src/assets/computer-use/edge.svg | Adds Edge icon asset for settings UI. |
| apps/web/src/assets/computer-use/brave.svg | Adds Brave icon asset for settings UI. |
| apps/desktop/src/preload.ts | Exposes new IPC methods for Computer Use permissions + Computer History actions to renderer. |
| apps/desktop/src/ipc/channels.ts | Adds IPC channel constants for Computer Use + Computer History. |
| apps/desktop/src/ipc/methods/computerUse.ts | Adds IPC handlers for reading permissions and opening macOS privacy panes. |
| apps/desktop/src/ipc/methods/computerHistory.ts | Adds IPC handlers for status/timeline/patch/clear/reveal/delete for CH. |
| apps/desktop/src/ipc/DesktopIpcHandlers.ts | Registers new Computer Use + Computer History IPC handlers. |
| apps/desktop/src/computerUse/permissions.ts | Adds permission and Chrome extension/native host readiness detection + privacy pane open. |
| apps/desktop/src/computerUse/permissions.test.ts | Adds tests for permissions state computation and privacy pane open behavior. |
| apps/desktop/src/computerHistory/resolveBinary.ts | Adds sync resolver for desktop MCP binary path in Electron main. |
| apps/desktop/src/computerHistory/manager.ts | Adds daemon lifecycle management + status/timeline/clear/delete/reveal plumbing for CH. |
| apps/desktop/scripts/electron-launcher.mjs | Bumps launcher version and adds NSAppleEventsUsageDescription to dev bundle Info.plist. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ApprovabilityVerdict: Needs human review Diff is too large for automated approval analysis. A human reviewer should evaluate this PR. You can customize Macroscope's approvability policy. Learn more. |
There was a problem hiding this comment.
Effect service conventions review of the Computer History / Computer Use changes. The desktop ComputerHistoryManager service is the main concern: its implementation drives a fresh Effect runtime (Effect.runPromise) from inside the service constructor and exposes an error-free interface that turns real failures into defects. Two smaller items: make is not exported and a dead re-export was left in the new server module.
Posted via Macroscope — Effect Service Conventions
Tag extension disconnect sentinels with connection generation, preserve AT-SPI ambiguity errors in resolve_pid, reject non-representable click coordinates, and use the shared icon-xs ghost chip remove control. Co-authored-by: Cursor <cursoragent@cursor.com>
Force Macroscope UI Consistency to re-evaluate the Computer Use Collapsible against the shared disclosure pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
One convention issue found in the Computer History bootstrap path. The rest of the new Effect service code (apps/desktop/src/computerHistory/manager.ts, apps/server/src/computerHistory/service.ts, apps/server/src/desktopControl/desktopMcp*.ts) follows the module layout, make/layer, typed-error and environment-acquisition conventions.
Posted via Macroscope — Effect Service Conventions
Keep under-point clicks on the resolved app PID, reject off-window coordinate fallbacks, sample browser disconnect generation under lock, and use Effect.catchTags for Computer History bootstrap recovery. Co-authored-by: Cursor <cursoragent@cursor.com>
Prefer result tab IDs in select/close confirmations, only constrain under-point clicks when `app` is explicit, and surface not-visible element errors from resolvePoint for right-click and drag. Co-authored-by: Cursor <cursoragent@cursor.com>
Skip T3AgentCursor when resolving the window under a click/drag point, and route coordinate-only drags through that under-point window instead of the last inspected Registry.targetPid. Co-authored-by: Cursor <cursoragent@cursor.com>
Look up args.app via resolveApp instead of resolveTargetPid, and reject any drag whose under-point destination is not the source window. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
There are 7 total unresolved issues (including 6 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d06518e. Configure here.
Keep cross-window rejection for endpoints outside the source frame, but do not use frontmost-under-point alone — that falsely rejects in-window background drags covered by another app. Co-authored-by: Cursor <cursoragent@cursor.com>
…ives Move exclusion chips and the privacy dialog into their own module using SettingIconAction and outline Cancel, and align More browsers with the shared CollapsibleContent disclosure pattern so Macroscope re-evaluates. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Macroscope UI Consistency is still failing against retained findings from
Please re-run UI Consistency against current HEAD. |
|
Temporarily closing to force Macroscope UI Consistency to re-evaluate against current HEAD (retained findings from e1f85f3 no longer match). |
Force Macroscope UI Consistency to re-scan settings files that already use SettingIconAction / outline Cancel in PrivacyControls. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@macroscope-app review Please fully re-evaluate UI Consistency against current HEAD ( Those three items are already fixed on HEAD:
The check has been re-running with a stale summary that still claims only |
|
Sorry, I'm unable to act on this request because you do not have permissions within this repository. |
Give Macroscope UI Consistency a real web-settings delta so retained findings from e1f85f3 are re-evaluated against fixed primitives. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Closing to replace with a fresh PR — Macroscope UI Consistency is stuck retaining findings from |

Summary
Depends on #6537 (
mac/computer-use). This branch is stacked on that work — for a Computer History–only diff, compare againstmac/computer-use.Test plan
running; events collected; summaries + Codex mirrorsample.frontmostevents; memory written; Dev coexists with Nightly (phase=running, events continuing)t3-desktop-mcp; Xvfb + Openbox recordssample.frontmostfor XTerm (reconfirmed after PR open)packages/shared/src/computerHistory/store.test.ts(6/6 passing)Note
Add Computer History recording and Computer Use settings for macOS, Windows, and Linux
t3-desktop-mcp) in Rust for Windows/Linux (alongside the existing Swift binary for macOS) that exposes desktop control tools over stdio JSON-RPC, including acomputer-historydaemon mode that writes structured JSONL activity segments.ComputerHistoryManagerin Electron main that spawns/stops the daemon, syncs acontrol.jsonwith enable/pause/filter settings, and exposes status, timeline, clear, and reveal operations via new IPC channels andwindow.desktopBridgemethods.native/t3-chrome-extension) with a native messaging bridge to relay browser events to the MCP server, plus install scripts for macOS/Linux and Windows.t3-desktopMCP server into all provider adapters (Claude, Codex, Cursor, Grok) alongside the existingt3-codeHTTP server, re-resolving per session so settings changes apply without restart./settings/computer-use,/settings/computer-history) with permission status display, privacy pane openers, and exclusion list management.item/permissions/requestApprovalandmcpServer/elicitation/requestevents, mapping them to canonicalpermissions_approval/tool_approvalrequest kinds with distinct UI icons and labels.enabled: false), but when enabled it continuously writes activity segments to disk and syncs a control file every minute via a new background server loop.Macroscope summarized e4775dc.
Note
High Risk
Spawns native binaries with desktop automation, continuous local activity recording when enabled, and broad provider/MCP integration across auth-adjacent approval flows.
Overview
Computer Use and Computer History are wired end-to-end: settings pages, desktop IPC, a spawned
t3-desktop-mcprecorder daemon, and optional injection of recent history into agent turns.Computer Use adds settings for enabling desktop control, agent cursor overlay, and Chrome browser control. The desktop app exposes macOS accessibility/screen-recording status and Chrome extension detection via IPC. When enabled, Claude, Codex, Cursor, and Grok sessions attach a stdio
t3-desktopMCP server (alongside existingt3-code), resolved per session fromdesktopControlsettings. Codex advertises form elicitation; the runtime maps MCP permission and generic tool approvals intopermissions_approval/tool_approvalwith matching UI in the composer and timeline. macOSInfo.plistgainsNSAppleEventsUsageDescriptionso Automation prompts work for spawned MCP tools.Computer History adds a
ComputerHistoryManagerthat writescontrol.json, spawnscomputer-historyon the desktop MCP binary at bootstrap (if already enabled) and stops it cleanly on quit. Server-side background work syncs control and summarizes segments every minute; Codex turns can append loaded history to developer instructions. Settings cover enable/pause, Codex mirror, privacy exclusions, timeline clear/reveal/delete, with status polls that do not respawn the daemon after disable.Reviewed by Cursor Bugbot for commit e4775dc. Bugbot is set up for automated code reviews on this repo. Configure here.