Commit Graph

4 Commits

Author SHA1 Message Date
Dash
6e11d2dc35 feat(host): separate background lifecycle and desktop platform execution
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 02:14:03 +13:00
Dash
cc99b6b059 fix(host): harden browser pairing, credentials and task execution for the experimental web client
Address the open review findings on the Host web client without changing how
the desktop starts: the desktop no longer auto-discovers and joins a running
Host (only an explicit CINDY_HOST_API does).

- pairing: one-time pairing exchanges for a session cookie; the home page no
  longer issues credentials or embeds the API token; Host/Origin checks,
  session expiry closes event streams, logout clears cookies.
- credentials/accounts: provider keys are scoped by account/provider/engine and
  never fall back to the gateway key; model catalog cache is isolated per
  account; logout reuses the desktop saved-account tombstone policy; macOS and
  Windows credentials go through a private Electron safeStorage helper.
- execution: input queue claims its slot before async preparation, keeps input on
  failure, stops cleanly while preserving streamed output, pauses on save
  failure, and deleting a task stops and clears it; SDK session context is
  restored after refresh and Host restart.
- web shim: unsupported actions fail instead of reporting success.
- desktop explicit Host mode: auth, interaction and input-queue events reach the
  existing channels; shared storage cores (project aliases, recent workdirs,
  ghost snapshot worker) are used by both desktop and Host.
- CI: Host regression matrix on macOS, Windows and Linux; fix the task tag
  migration test to use the new migration config.

Out of scope here: a windowless Electron helper and custom MCP storage
extraction. Simulated OS tests do not replace real keychain/DPAPI or
three-platform validation; see docs/host/pr-9246-completion.md.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-08 00:31:13 +13:00
CHEYAN
9c115af55e fix(host): resolve the renderer bundle per request
A desktop build removes .vite/renderer, which left a running host serving 404
until restarted. The web root is now resolved per request, and the dev launcher
builds the bundle when it is missing.

Verified: host started without a bundle answers 404, then 200 once the bundle
appears, with no restart.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 18:38:40 +09:00
CHEYAN
a8e9b17382 feat: discover the profile owner and add a dev launcher that keeps a host running
The host now adopts the only account database in a profile instead of requiring
CINDY_HOST_OWNER (multiple accounts are refused rather than guessed). pnpm
dev:host reuses a running host or starts one before launching the desktop, so the
default dev path never falls back to the embedded runtime.

Verified: pnpm dev:host reused the running host and the desktop entered client
mode with the host serving every runtime channel.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 16:52:37 +09:00