Skip to content

Add native installers that launch Kady in the browser - #50

Draft
timothykassis wants to merge 14 commits into
mainfrom
feat/installable-distributions
Draft

timothykassis wants to merge 14 commits into
mainfrom
feat/installable-distributions

Conversation

@timothykassis

@timothykassis timothykassis commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Kady currently requires a source checkout and locally installed build tools. This adds native installers that start the local services and open the app in the default browser: macOS DMGs for Apple Silicon and Intel, a per-user Windows installer, and Linux DEB/RPM/portable archives.

The launcher bundles Node, uv, Git, ripgrep and fd, chooses available loopback ports, authenticates the browser with a per-launch token, and reuses an existing instance. Projects and configuration live outside the application directory. Settings provides scientific-preview setup, logs, shutdown, update downloads and selection of an existing source installation. Shutdown waits for run accounting, provenance and extension cleanup before terminating owned processes.

The release workflow builds and tests every target, verifies installer payloads, requires macOS/Windows signing for public releases, and publishes all six installers with checksums and provenance attestations. Branch builds produce unsigned previews. The application version remains 0.14.2; no public release is made by this PR. Apple and Windows signing credentials still need to be configured as described in the packaging guide.

Validation at 8ed1f4d:

  • All four native distribution jobs passed: backend/frontend tests and typechecks, launcher race tests, production builds, real Pi lead/specialist tool execution using a local model fixture, browser authentication, private command-line tools, scientific previews, active-run shutdown accounting, restart persistence and crash recovery. Each DMG, Windows installer and Linux package/archive also passed its payload check. Windows additionally exercised silent installation and uninstallation.
  • All source test jobs passed on Node 22, including Windows/Linux backend and frontend suites and the source launcher checks on all three operating systems.
  • Local macOS QA verified the native app opening Chrome and stopping through Settings. QA notes describe coverage and limits. Tests use isolated data/auth directories; root-level Vitest discovery and backend configuration reject accidental use of the checkout's projects directory.

Signing/notarization still requires validation with production credentials. Linux package contents were exercised on Ubuntu 22.04; this does not establish package-manager installation on every RPM distribution.

timothykassis and others added 14 commits September 30, 2026 17:17
Converting backslashes before the absolute-path check let `rm \user_data/a.csv` (which bash runs as `rm user_data/a.csv`) through on every platform. Backslashes are now separators only beside a Windows sandbox, and a lone leading one is never a root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Dispose a session after a 5s grace period when a session_shutdown handler never settles.
- Point lead sessions at the private Git Bash through Pi's shellPath setting, and build the child tool with the settings' command prefix; a user shellPath still wins.
- Key cached previews to the installed helper environment and its ready marker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Use a port only when it is free on 127.0.0.1 and ::1, and hold ::1 as a forwarder so localhost cannot reach another program.
- Keep PORT/HOSTNAME/NODE_ENV out of the environment agent shells inherit.
- Own kady.log in the supervisor, rotate it at 10 MB, and tail it for `kady logs`.
- Signal only processes whose PID and start time were recorded; on Windows rely on the job object and Go's process handle instead of taskkill, and stop closing the job early so startup errors reach the log.
- Keep waiting while a simultaneous launch holds the instance lock.
- Ship a console kady.exe for the CLI and a windowless kadyw.exe for shortcuts.
- Remove the previous resources directory on Windows upgrades, and allow the bundled node to load third-party native addons on macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A version bump again creates the tag and GitHub release when no signing secrets exist; unsigned installers are never published, and a partial secret set fails the job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
timothykassis added a commit that referenced this pull request Oct 2, 2026
Port the test and runtime fixes from the installer branch (#50) so main's
Tests workflow passes again.

Runtime fixes the CI matrix exposed:
- Subagents: fetch the meter endpoint with undici's own fetch. Node 22's
  built-in fetch rejects an undici 8 Agent ("invalid onRequestStart
  method"), so every metered child model request failed on Node 22/24.
- Raw-data guard: recognise Windows drive, UNC and Git Bash absolute paths
  (case-insensitively) and keep a leading shell escape relative, in both
  bash-classifier copies.
- Watchdog diff scope: compare native realpaths, since Windows 8.3 short
  names never match the path Git reports. Upgrade an exact older seam in
  place instead of failing as a local modification.
- Session release waits for session_shutdown handlers (bounded at 5s)
  before disposal, and a refused run drains its provenance probes before
  completing, so Windows can remove the project directory afterwards.

CI and test fixes:
- Install the helper Python environment in CI from a committed uv.lock
  that resolves for every shipped platform (Office preview tests).
- Retry temp-dir removal on Windows, mock host environment probes in
  fake-session tests, await completion instead of fixed delays, arm the
  Modal upload fault before submission, accept the Windows shell's
  missing-command message, and narrow slow jsdom queries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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