Add Codync as an ADE that opens in a terminal

LE
3h ago
+520-28

What

Adds Codync as an ADE on macOS and Windows. Codync runs coding agents (Claude Code, Codex and others) as persistent bots you message from a phone, a desktop app or a terminal. Its host, codync-host, runs on the sandbox. Like Amp, nothing of Codync runs on this computer: InstaADE installs the host on the sandbox and opens Codync's terminal UI there in the user's terminal over SSH. No app here gets an SSH token.

  • Install Codync wakes the sandbox and runs one setup command. It reads the version of Codync's latest release from the release's codync-host-compat.json. When the sandbox has no codync-host, or one older than that release, it runs Codync's install script for that release (packaging/install.sh --host-only), which puts the host in ~/.local/bin, checks its SHA-256 and restarts a service that runs that file. A host as new as the release or newer (a dev build) stays, and so does any host when the version cannot be read. The setup then uses that one host (~/.local/bin, else the one on the PATH) for the service, codync-tui and the version it prints, and links it as /usr/local/bin/codync-host when nothing is there. It writes /usr/local/bin/codync-tui, since the SSH session runs one plain word, and turns on lingering.
  • With no codync-host service yet, codync-host install writes and starts a systemd user service from a login shell, so the service keeps the PATH where the agents are. With the service there, it only starts it, so Reconnect restarts bots at work only to update an older host.
  • Another user's Codync host can already hold port 19222 (a Codync cloud computer runs one as codync-agent). Then the service goes on the next free port, codync-tui reads the port from the service as systemd reports it, and the host counts as started only once it takes this user's token, not when anything answers on the port.
  • Reading the host's version stops after 10 s, the release's version after 20 s, the download after 60 s, the install script after 5 min, and the host must answer within 30 s. A failure shows the last 3 lines and one plain line, such as Codync's install script failed.
  • Then it prints codync-host --version. Without a version, the sandbox does not get codync in its mark.
  • Open in Codync opens the terminal with ssh -t instabox-<name> codync-tui. It runs no setup on the sandbox.
  • README, docs/ades.md, DEVELOPMENT.md and CONTRIBUTING.md list Codync as a Terminal ADE.

Install to Open

  1. Codync in the ADE switcher, as a Terminal ADE that needs only OpenSSH here.
  2. Connect on a paused sandbox with no ADE: InstaADE wakes it, then runs the setup (Installing Codync, then opening).
  3. Done: the sandbox runs, with Codync connected.
1. Switcher2. Waking2. Installing3. Installed
01-ade-switcher02a-waking-sandbox02-install-codync03-installed
  1. Open in Codync: Terminal runs ssh -t instabox-<name> codync-tui, and Codync's terminal UI on the sandbox shows its host's bot.
04-open-in-codync-tui

The title bar of the Terminal window is cut off: the SSH user there is the sandbox's SSH token. The account in the popover's footer is blacked out.

How I checked

In InstaADE built from this branch at 0b76dcb (bun tauri dev), before the last two commits, on macOS 27.0.1, signed in:

  • On a paused sandbox with no ADE connected, Connect in Codync mode showed Waking sandbox, then Installing Codync, then opening, then the sandbox running with Codync connected. It then opened Terminal with ssh -t … codync-tui.
  • On the sandbox after the setup: it had kept the codync-host 2.24.0 it already had in ~/.local/bin, which is why the setup now updates an older host. systemctl --user is-active codync-host printed active, the service ran codync-host serve --port 19222, and the terminal UI ran codync-host tui --port 19222.
  • Before Open, I updated the host on the sandbox to Codync's current dev build (2.58.1): the terminal UI in step 4 runs that build.
  • Open in Codync from the sandbox's menu opened Terminal again, and the terminal UI listed the sandbox's bot Codync, with no invalid token.
  • The last commit's version check and release parsing run in ade::codync::tests::setup_updates_only_a_host_older_than_the_release: 2.24.0 and 2.9.0 are older than 2.57.2 and 2.10.0; 2.57.2 and 2.58.1 are not older than 2.57.2. ade::codync::tests::the_terminal_ui_runs_the_setups_host_on_the_services_port runs codync-tui with a fake systemctl and host. sh -n and bash -n pass on the setup.
  • bun run typecheck, bun run test (247 passed).
  • cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test: 986 passed. ade::paradev::tests::the_installed_paradev_cli_has_hosts_add fails on this Mac: it runs the Paradev CLI installed in /Applications, which this change does not touch.

Not verified

  • The last two commits on a sandbox: the update of an older host, the download, and a service that runs another file. The run above was before them, and that sandbox's host was already in ~/.local/bin.
  • The port move: nothing held 19222 on this sandbox.
  • Windows.

šŸ¤– Generated with Claude Code


Proof this PR
Open in [code]smith Ā· Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds Codync as a Terminal ADE, like Herdr and Amp: Codync's host runs on the sandbox, and Open in Codync opens its terminal UI in the user's terminal over SSH. Nothing of Codync runs on the computer, which needs only the OpenSSH client.

Behavior

  • Install Codync reads the latest release's version from codync-host-compat.json and installs or updates codync-host via Codync's install script, then runs it as a systemd user service with lingering and writes codync-tui for the SSH session.
  • The setup uses one host throughout (~/.local/bin or the PATH), for the service, codync-tui and the version print; a service that runs another file is installed again on its port, and any host at or after the release stays.
  • When another user's Codync host holds port 19222, the service moves to the next free port; codync-tui and the setup read the port from the service as systemd reports it (systemctl --user cat), and the host counts as started only once it takes this user's token.
  • Open in Codync runs ssh -t instabox-<name> codync-tui with no setup on the sandbox; reading the host's version stops after 10 s.
  • Adds the logo, switcher entry, preview fixtures and docs across the README, docs/ades.md, DEVELOPMENT.md and CONTRIBUTING.md.