mamabuku/dsh-cindy-next ↗★ 0

dsh-cindy-next

Cindy 手机客户端连接 DSH 的 Host 侧插件:会话、消息、审批、todo、goal 的手机通道,以及配套的设置卡片。

包名
dsh-cindy-next
兼容性
待验证
Harness 依赖范围
0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-alpha.2 || 0.2.2-rc.1
版本
0.1.14
许可证
MIT
最近更新
2026年11月11日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:mamabuku/dsh-cindy-next

dsh-cindy-next

把 Cindy 手机客户端接到这台电脑的 DeepSeek Harness 上。

装上这个插件,DSH 就是一台可通过 Cindy DeviceLink 被控的 Host:在手机上接着电脑上的会话继续干活——看历史、 发指令、回答审批、管 todo 和 goal、传图片和文件,不用走回电脑前。

设置页

它解决什么

DSH 跑在桌面,Cindy 跑在手机。两边都在,却没有一条路让手机接管桌面上的任务。这个插件补的就是那一段: 它在 DSH Host 侧实现 Cindy 的 DeviceLink 通道,让手机把 DSH 当成自己的一个设备。

能做什么

方面能力
会话列表、详情、消息历史分页、实时流、后台任务状态
输入发送、排队、编辑、中断、继续
审批与提问手机端回答 DSH 的审批和提问
计划todo 与 goal 的读写
模型与权限provider / model 切换、权限模式、计划模式
文件附件读取、缩略图、文件浏览器、导出下载
项目项目排序与显示名(中文项目名同步到手机)
提醒schedule 的增删改查
子代理只读查看子代理运行与结果

怎么工作

Cindy 手机 ── DeviceLink ──▶ Cindy relay ──▶ 本插件(DSH Host)──▶ DSH 会话服务

插件不复制会话、不另存数据,只做协议适配与授权:谁在控制、能做什么、能不能碰这个文件,都在本机判断。

安装

dsh plugin --profile 
 add ./dsh-cindy-next-0.1.14.tgz

或从 DSH 插件市场安装。装完 重启 DSH 才生效。

第一次连接

  1. 设置 → Cindy 手机连接 → 打开「连接手机」;
  2. 扫码登录 Cindy(账号和区域要和手机一致);
  3. 手机上打开 Cindy,设备列表里出现这台 Host,即可接管。

未登录时这一页就是登录入口:

未登录

兼容与依赖

  • DSH 0.2.1-rc.3 ~ 0.2.2-rc.1(peer 范围,随 DSH 版本滚动验证);
  • Node.js ≥ 22.16(DSH 0.2.2 自身要求 ≥ 24.9);
  • 凭据只进系统钥匙串(macOS Keychain / Linux Secret Service / Windows DPAPI 密文),不写入设置、不进日志。

安全边界

  • 连接开关在本机,关掉即断;谁被允许发指令由 relay 鉴权 + 本机策略共同决定;
  • 文件访问有敏感路径拒绝表、大小上限和目录越界检查,拒绝优先于猜测;
  • 设备身份被 Cindy 账号移除时,插件会清掉旧句柄并要求重新登录,不会无限重连。

更多

实现细节、协议边界、发布与验收流程见 doc/(doc/cindy-phone-link.md、doc/publishing.md、doc/releasing.md)。


以下为技术维护文档。

0.1.41: DSH 0.2.2 RC compatibility

Accepts the exact RC Agent, Session and Settings SDKs, Cordis 4.1 and Schemastery 3.19. Historical ordinary forks can retain parentSession/parentSessionId; only origin: 'subagent' classifies delegated sessions. The correction covers discovery, active reads, direct lookup and creation pushes. Cindy's handshake identity remains unchanged. See verification details for candidate checks and the earlier local prototype's limits.

0.1.36: interruption controls

The existing Cindy acknowledgement/dismissal actions update owner-scoped display preferences, not failure or completion facts. Manual continuation is a new human input; it verifies the current native tail and effective plan-mode off rather than retrying old tool calls. These changes are Host-only: Cindy is a read-only protocol/test dependency. See the diagnostic protocol and limitations for persistence, concurrency and current-client boundaries. Source contracts do not establish live-handset acceptance.

0.1.32: credentials without keytar

No native npm credential module or C++ build toolchain is required. Linux uses secret-tool with an unlocked Secret Service (headless sessions need their own DBus/keyring setup); macOS uses the system Keychain through /usr/bin/security. Both keep the existing DSH Cindy Host service and installation-specific account.

Windows uses built-in Windows PowerShell/.NET DPAPI (CurrentUser), then stores only encrypted ciphertext in DSH’s native credentials record service. DSH owns the private file, atomic writes and record removal; tokens never enter settings, child-process arguments or logs. No Cindy/Electron integration is required. DSH without the record API, blocked PowerShell, a locked keychain, missing secret-tool, or damaged ciphertext produces a storage error, not a missing login or a plaintext fallback.

Windows users upgrading from keytar may need to sign in once through the DSH settings card. Old Windows Credential Manager entries are not automatically read or deleted; rollback can still see them, and users can remove them manually after confirming the new login. Windows standalone npm run login/logout/host has no DSH credential context: use the settings card instead. Linux/macOS standalone commands keep using the same system keychain. Different DSH homes remain isolated. DPAPI ciphertext is not a portable backup: another OS user/machine generally cannot decrypt it.

Native Windows persistence smoke (fake credentials and an isolated temporary DSH document only):

node tools/credential-store-native-smoke.mjs --runtime 

The runtime root must contain compiled DSH SDK packages under node_modules. This checks real DPAPI encryption, native DSH atomic persistence, fresh-context restore, renewal and logout without accessing a daily profile. Linux/macOS command adapters have mock-contract tests; live keychain acceptance must run on those operating systems.

0.1.32: DSH 0.2.2-alpha.2 compatibility

  • Accept the exact alpha session/settings carrier and @deepseek-ai/schemastery@3.18.6-alpha.1 without installing another DSH runtime as a dependency.
  • Draft skill discovery uses agentPresets.acquireScope() and releases the revision after success or failure. Live Agents prefer their isolated preset skill service; older standing-key carriers retain their fallback.
  • Isolated alpha core-contract smoke exercises the real compatibility evaluator, Cordis Loader, Session message folding, and preset-scoped skill discovery. It also checks controller/settings/archive method presence. This is not full Web/profile-persistence/relay/handset acceptance; those remain unverified on alpha. No daily profile is modified or restarted.

Reproduce without installing into a DSH profile:

npm install --prefix  --ignore-scripts \
  @deepseek-ai/dsh-sdk-minimal@0.2.2-alpha.2 \
  @deepseek-ai/dsh-api-session-controller@0.2.2-alpha.2 \
  @deepseek-ai/dsh-settings@0.2.2-alpha.2 \
  @deepseek-ai/dsh-agent-preset-registry@0.2.2-alpha.2 \
  @deepseek-ai/dsh-skill@0.2.2-alpha.2 \
  @deepseek-ai/dsh-workspace@0.2.2-alpha.2 \
  @deepseek-ai/dsh-home-paths@0.2.2-alpha.2 ws@8.21.3 werift@0.24.4

Unpack npm pack output beneath that npm project's directory, so its imports use the alpha peers, then run (the smoke asserts that resolution):

node tools/dsh-compat-smoke.mjs --runtime  --plugin 

For a full alpha-dependency regression, additionally copy the repository's test-only test, tools, fixtures directories and the root lockfile into that unpacked package and run node --test from it. These fixtures are intentionally not distributed in the npm tarball.

0.1.31: merged main, native rootless media fetch

Absorbs the main branch on top of the 0.2.1 carrier. The one behavioral change that came from it: media and file-peer fetch now accept Cindy's native URL shape, where a project-folder export sends only path plus an optional v and no directory roots. Directory containment is therefore enforced only when the controller actually names roots; the never-serve denylist, the regular-file check, the 25 MiB cap and the separate authenticated-controller policy are unchanged. Also carried over: the native-contract fixture matrix (15 extensions × POSIX/Windows), the repository/docs snapshot, and a test that pins the rootless file-peer transfer end to end.

0.1.29: reproducible repository release

Runtime behavior is unchanged from the phone- and desktop-accepted 0.1.28. This release synchronizes the verified source, dependency lock and offline native-client contract fixtures into Git. The pinned third-party fixtures are test-only and excluded from the npm package.

0.1.28: busy enqueue confirmation

A real DSH pending inbox occurrence remains in pendingQueue (or steeringQueueClientIds) in enqueue replies, pushes and polling until it is actually claimed or committed. Handing input to DSH is not delivery to the user turn. This fixes 0.1.27 empty follow-up projections overwriting the busy-queue acknowledgment on Android and desktop. Regression tests execute the current Android parser and stale-ACK authority handling, not just the durable outbox state machine.

Current durable input delivery

  • Implements input-delivery v1, not a legacy history-only fallback. Complete text and attachment bytes are held in a private, FULL-synchronous SQLite ledger before enqueue acknowledgment.
  • Provides per-clientId pending/accepted/removed/unknown receipts and real chronological around/around-client-id history. Accepted means a real user event was flushed and verified through public persistent storage, not an empty inbox or an in-memory event.
  • Serializes delivery and mutation, persists cancellation fences and clear boundaries, and keeps edited payloads recoverable. Existing editable Host names and the plain-text desktop queue fix remain.
  • Lost acknowledgments and same-process reloads cannot blindly replay an uncertain admission. A verified dead-process recovery may rebuild missing input; cold inbox wake-up requires verified ownership and preserved FIFO. Mixed/uncertain recovery remains pending with diagnostics rather than fabricating success or duplicate input.
  • The latest upstream mobile outbox implementation is exercised against Host RPC and SQLite, including same-session FIFO, ACK loss, cancellation, and its mandatory history-cache gate. This is not a claim of live handset acceptance.

The ledger lives under the active DSH profile state directory. Pending payloads and attachments are retained until persistent user-history verification or sealed cancellation; terminal identity fences do not expire silently. Do not delete state to repair an uncertain send. Back up that state before rollback: older Host releases cannot replay this ledger.

All changes are Host-only: no Cindy or DSH core patch is required. The handshake compatibility stamp is separate from the actual plugin version and explicit v1 capability. Unsupported optional features are refused; this is not a promise of all native Cindy features or exactly-once external tool effects.

Apple, enterprise SSO and regional login (0.1.33)

In Settings → Cindy 手机连接, choose the same Mainland China / Global account region as the phone, then load sign-in options. The Host discovers enabled providers from that region: Apple/social browser authorization, phone/email codes and enterprise SSO follow Cindy's official protocol. Provider availability is server-controlled; the same Apple ID does not merge accounts across regions. The browser opens the official Cindy authorization page; return to DSH for membership selection, required contact binding or extra SSO verification. Secrets and tickets stay in the Host, not settings or browser storage.

Organization ID/slug/domain and email discovery check both regions. A found organization in the other region requires explicit confirmation; ambiguous or partly failed discovery never silently picks a region. Cancel/start-over fences late browser, code and vault-write results. Login while the phone-connection switch is off saves only; it does not enable transport. Account/region changes rebuild the whole runtime so relay, device directory, media staging and ICE remain in the credential's region. Existing encrypted credentials are preserved; failures never erase them.

CAPTCHA browser limitation: when a region requires it for code delivery, open the official verification page, solve it, then copy its complete successful URL (including #cindy-captcha=ok.…) into the DSH form. The standard browser cannot read the cross-origin result automatically. The verification proof is sensitive and short-lived: do not share it. The Host validates its official origin and forwards only the proof to the requested auth action; it does not bypass verification or proxy/inject the challenge page. Apple/SSO browser authorization does not use this manual code-delivery step.

This feature ships in 0.1.33; installation and runtime activation are verified separately. Tests cover protocol, real local callbacks, settings-panel state, credential races and both regions' actual runtime URL routing with fake credentials. Real Apple/enterprise identity providers and iOS discovery/file round trips still require an authorized test account after deployment. See authentication flow notes. The new browser flow is exposed by the settings page; the older interactive CLI is not a replacement for that UI on Windows.

Tool work titles on Cindy mobile (0.1.38)

The Host projects run_code calls with a non-empty string description as run_code · in Cindy’s collapsed tool row. Titles are normalized to one line and limited to a 120-code-point preview; the original input, code and full description remain in expanded details. Calls without a valid title and all other tool names keep their existing mapping. Live events and history use the same projection, and results remain paired by toolUseId. This is a Host-only display alias, not a renamed DSH execution tool. Reload an updated Host to apply it; existing phone-cached history may need reloading. Handset rendering has not been acceptance-tested.

Thinking content on Cindy mobile (0.1.33)

The Host sends DSH-provided public reasoning text/summaries as native structured thinking content ({ text }), not ordinary prose strings. Expand the work/activity group, then its thinking row, to read it. No Cindy or DSH core patch is needed. Models that expose no reasoning text still have nothing to show; signatures and provider-private replay metadata are never forwarded.

During generation, assistant/chunk reasoning deltas are displayed as temporary thinking rows. Pushes coalesce over 100 ms; the work-grouped history uses the existing coalesced view refresh. Opening a session mid-generation reconstructs the current prefix from the log. The final assistant message replaces the preview, including interrupted prefixes, without duplicating it. Temporary rows do not become durable message-count/grouping evidence, and timers are cleared on Host disconnect.

This ships in 0.1.33; handset acceptance is separate from package checks and local Host activation. Offline regressions execute the pinned real Cindy mobile thinking normalizer; live phone/network acceptance remains separate.

Questions on DSH and Cindy

While the Host bridge is enabled, questions are registered before presentation, even if no phone has opened that session. DSH's native question UI and the existing Cindy card can both answer; the first accepted answer settles the shared pending entry and dismisses the other surface. Session open/reconnect replays pending cards with the same request IDs. Temporary relay loss does not cancel questions.

Questions have no extra Host timeout. The caller's stop/cancel and DSH's own timed-question lifecycle still apply; explicit Host switch-off/unload cancels outstanding bridge waits. Permission cards retain their existing ownership and deadline. No Cindy/DSH patch or phone protocol upgrade is needed. This does not add cross-process recovery or mobile late-answer support after DSH has continued a timed call.

Run the focused regressions with:

node --test test/user-question-bridge.test.js test/host-approvals.test.js test/dsh-plugin.test.js

The opt-in installed-runtime suite additionally exercises real Cordis, userQuestions and Gateway event delivery/replay/cancellation. Point DSH_TEST_NATIVE_MODULES at a built DSH node_modules directory, then run node --test --test-isolation=none test/user-question-native.test.js. For an Electron asar installation use the installed executable with ELECTRON_RUN_AS_NODE=1. These checks use isolated contexts and do not reload the running GUI; real-handset acceptance is separate.

Model switching follows DSH

When native sessionController.selectModel is composed, the Host tells Cindy to delegate model-window decisions to DSH. Users may select another model during a running turn and select the original model again. DSH validates the provider/model/effort and records the selection for the next model request; an already-issued request is not interrupted. DSH owns context preparation and compaction, not Cindy's legacy 90%-window precheck or a