Skip to content

TD-5228: the Mac app ships agent-desktop beside tstd - #114

Merged
captcrock merged 1 commit into
mainfrom
td/5228-agent-desktop-macos
Nov 3, 2026
Merged

captcrock merged 1 commit into
mainfrom
td/5228-agent-desktop-macos

Conversation

@captcrock

Copy link
Copy Markdown
Contributor

What

TD-5221 step 2. The macOS app (Apple silicon and Intel) now carries the pinned agent-desktop 1.0.2 CLI and agent-desktop-macos-helper beside tstd, fetched at build time by URL and pinned digest the same way the Linux packages are. So desktop_windows, desktop_snapshot, desktop_act and desktop_launch work in the packaged Mac app with computer_use.accessibility.binary empty. computer_use.accessibility.enabled stays off by default.

  • fetch_agent_desktop.py: both macOS archives pinned (digests copied from the release's checksums.txt), both helpers pinned (hashed from the checked archives), named members only, any mismatch fails and writes nothing.
  • build_sidecar.py fetches on macOS hosts too.
  • shell/tauri.macos.conf.json: externalBin (repeats tstd, since Tauri's merge patch replaces the list) plus the licence files.
  • Tauri's bundler signs every externalBin with the app's identity; install-macos.sh refuses a bundle where either file is not certificate-signed. The package workflow's macOS smoke checks both files, their signatures, version = 1.0.2 and the licences.
  • Decision recorded in DECISIONS.md.

Tests

  • test_fetch_agent_desktop.py: every fetch test runs for Linux and macOS; new tests for the macOS helper pin, per-platform helper names, the platform configs and --if-missing. Each new test was shown to fail with its piece broken.
  • Real fetch on an Apple silicon Mac wrote both files with their pinned digests; agent-desktop version from there reports 1.0.2. The Intel pins match the real Intel archive.
  • Core: ruff, format and mypy tstd clean. Full pytest: two runs, each with timing-only failures (two worktree polling tests in one run, the session_start_large_repo benchmark in the other) that pass on rerun; no tstd code changes here.
  • cargo check and cargo clippy -- -D warnings on macOS with the new platform config.

Not yet verified

The signed-build and live criteria (the four tools from the packaged app, Accessibility attributed to TST Desk with no separate prompt) are checked after merge against a local build from main.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HUthoCdmzg2hy89ssk2cSF

The TD-5220 desktop tools (desktop_windows, desktop_snapshot, desktop_act,
desktop_launch) only worked on a Mac when the user installed the
agent-desktop CLI and set computer_use.accessibility.binary. This is
TD-5221 step 2: the macOS app now carries the pinned 1.0.2 CLI and its
agent-desktop-macos-helper beside tstd, the same way the Linux packages
do. computer_use.accessibility.enabled stays off by default.

- fetch_agent_desktop.py pins the aarch64 and x86_64 macOS archives
  (digests copied from the release's checksums.txt) and both helpers
  (hashed from those archives); the CLI digests were already in
  ax_cli.PINNED_SHA256. The helper name now follows the platform. Only the
  two named members are read, each must be a regular file, and any
  mismatch fails the build and writes nothing.
- build_sidecar.py fetches them on macOS hosts too, in normal and
  --if-missing modes. As on Linux, a cargo build of shell/ on a Mac now
  needs both files in shell/binaries/ (empty files do for clippy).
- shell/tauri.macos.conf.json lists tstd, the CLI and the helper as
  externalBin (the merge patch replaces the shared list) and ships
  licenses/LICENSE and licenses/NOTICE.
- Tauri's macOS bundler drops the triple and signs every externalBin with
  the app's identity before the app, so both files carry the app's
  certificate signature under their own identifiers. TCC charges a child
  process's Accessibility use to the app that started it, so no separate
  grant is expected. install-macos.sh refuses a bundle where either file
  is not certificate-signed; the package workflow and
  smoke_macos_bundle.sh check both files, their signatures, the CLI's
  version and the licence files.
- Signing changes the bytes, so the bundled CLI never matches the release
  digest; TD-5222's packaged-copy rule already covers that.

Tests: every fetch test now runs for macOS as well as Linux, plus a
helper-mismatch test, the per-platform helper name and packaged names, a
macOS platform-config test beside the Linux one, and build_sidecar tests
for macOS in both modes. Each was shown to fail with its piece broken.

Docs: backlog TD-5228 (the live packaged-app check stays open), TD-5221
step 2 points at it, a DECISIONS.md entry, configuration.md and NOTICE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HUthoCdmzg2hy89ssk2cSF
@captcrock
captcrock force-pushed the td/5228-agent-desktop-macos branch from 49b4476 to ba853ef Compare November 3, 2026 16:42
@captcrock
captcrock merged commit 4d774d3 into main Nov 3, 2026
4 checks passed
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.

1 participant