Commit Graph

9 Commits

Author SHA1 Message Date
Dash
8599e2d25d docs(host): 清单单列同步与回执通道,C 类按处理方式细分,给出要 Host 做的总数
- S 同步通道(AST 识别给 event.returnValue 赋值的处理函数,14 个)从 A 中单列:
  S·本地 7(界面设置,窗口本地读 profile)、S·镜像 7(6 个 ghosts:* 与登录提示,
  数据归 Host,需窗口缓存镜像或改界面为异步,放进插件那一小批单独设计)。
- R 回执通道 6 个(model-favorites:host-*、setup-migration:host-*、
  app-preferences:reply):主进程向界面要数据,先标出、不排期。
- C 按审查定的四种细分:C-后台 32、C-两段式 39、C-窗口本地 11、C-专项设计 4。
- update-relaunch:* 归 A 的“升级与交接”领域,注明归交接任务。
- 总口径:真正要 Host 做的 = A + C-后台 + C-两段式 = 918 + 32 + 39 = 989,巡检实际
  调用 133 个;窗口类 385 个中客户端模式已注册 371、未注册 12。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 03:23:52 +13:00
Dash
462c16045f docs(host): 通道清单按 A/B/C 归属分类并核对 B 类在客户端模式的行为
清单脚本给每个未代理通道标归属:A 必须由后台处理、B 永久留在窗口、C 待定(写明
原因)。判定写在脚本的 OWNERSHIP_RULES(通道名/注册模块)里,再加依赖判定:处理
函数及其调用的两层桌面函数用到窗口 API 时,后台领域改判 C;发送方校验与发给单个
窗口的推送不计。结果:A 941、B 363、C 87;夹具巡检实际调用 A 144 个(782 次)。

调用计数报告附带写入时的主进程处理者快照(仅源码运行且设了 CINDY_IPC_USAGE_FILE),
对照客户端模式登录页与普通模式巡检两份快照:B 类 347 个窗口本地照常处理,14 个在
客户端模式被误拒(电脑控制与浏览器状态等),只记录、不改行为。巡检脚本改为按无查询
参数的地址识别主窗口。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 02:54:28 +13:00
Dash
664d86d4bd docs(host): 生成桌面 IPC 通道的 Host 覆盖清单与真实使用排行
scripts/host-channel-coverage.mjs 用 TypeScript 类型检查器解析桌面主进程全部
ipcMain 注册(含常量、模板、循环与包装函数),按“已在合同 / 客户端自有 /
只属于窗口 / Host 还没接”分类,生成 docs/host/channel-coverage.md。
host-client-usage-tour.mjs 在隔离 --mock 沙箱里走一遍界面夹具,调用计数存为
docs/host/evidence/channel-usage-mock-tour.json,清单按它给未接通道排序。

当前:1454 个通道,合同 61、窗口 362、Host 未接 1029;夹具巡检实际调用 253 个,
其中 150 个 Host 还没接。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 02:06:34 +13:00
Dash
2c230ea21f WIP: share headless runtime services with desktop adapters
Preserve the implemented task, Device Link, plugin and model runtime work locally before integrating main. Full multi-client, automation and platform acceptance remains incomplete.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-10 11:11:41 +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
f5945c0092 feat(host): add a sanitized status command
cindy-host status [--json] prints only authenticated/realm from the adopted
session record, so the operator and scripts can confirm login state without
handling tokens.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 16:55:48 +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
CHEYAN
cbaec6fa39 docs(host): add the host documentation index and quick start
Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 14:36:32 +09:00