DeepSeek Harness plugin

dsh-companion-hytime

DSH Companion 鲸鱼 Skill/CLI 插件前端(dual-face Cordis 插件)

Jump to install

Source facts

Repository
hytime/dsh-companion
Latest update
Aug 22, 2026
Category
UI Enhancements
GitHub stars
2
Format
plugin
Package path
packages/dsh-companion
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
packages/dsh-companion/package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/hytime/dsh-companion/tree/HEAD/packages/dsh-companion
Plugin: dsh-companion-hytime
Author: hytime

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer2 files
README.mdSource · read only

@hytime/dsh-companion

DSH Companion 鲸鱼 Skill/CLI 前端插件(dual-face Cordis 插件),发布到 npm 公共 registry。

默认在 DSH 右下角显示鲸鱼(二次元娘)悬浮按钮,用户继续使用 DSH 当前对话框输入;DSH Skill 调用 hyc CLI,本插件接收 Host 投影的 CLI 状态并把鲸鱼回复反馈到当前 DSH 对话。

数据流

DSH 当前对话框 ──用户输入──▶ Skill 触发
                              │
                              ▼
                    DSH Host 调用 Go CLI(hyc)
                    (凭据 / 超时 / 取消 / 结构化结果)
                              │
                              ▼
                    结构化结果(text / emotion / status)
                              │
          ┌───────────────────┴───────────────────┐
          ▼                                       ▼
   当前 DSH 对话展示最终文本              鲸鱼悬浮窗反馈状态
   (唯一输出位置)                    (idle/connecting/thinking/
                                        replying/success/error/cancelled
                                         + 表情帧切换)

本插件不负责 Token、CLI 执行和最终对话消息持久化;不创建第二个聊天输入框,不维护独立 SSE 会话。

安装前置条件(必须按序满足)

安装/激活本插件前,必须先满足:

1. hyc CLI 可用command -v hyc 命中(系统入口 ~/.local/bin/hyc)。 2. DSH 技能已安装$DSH_HOME/skills/ 下存在 hy-companionhy-companion-*(先安装 CLI,再执行技能安装器写入 $DSH_HOME/skills)。

任一缺失时按顺序先补齐(先 CLI、再技能、再插件),不得跳步。完整顺序与验证命令见根 README「安装前置依赖」一节。

安装

发布后

本插件发布到 npm 公共 registry,直接添加:

dsh plugin add @hytime/dsh-companion

本地开发(tarball)

本地开发使用 tarball 安装,避免 link: 目录安装带来的双实例 / 产物目录变化 / 可复现性差问题:

# 1) 构建插件产物(生成 lib/ 与鲸鱼帧资源)
pnpm --filter @hytime/dsh-companion run build
#    或监听模式:
pnpm --filter @hytime/dsh-companion run watch

# 2) 打成 tarball
pnpm --filter @hytime/dsh-companion run pack
#    产物:packages/dsh-companion/hytime-dsh-companion-0.1.0.tgz

# 3) 装进 DSH(把 *.tgz 替换为实际文件名)
dsh plugin add ./packages/dsh-companion/hytime-dsh-companion-0.1.0.tgz

# 4) 重启 DSH 使插件生效

> 发布包名为 @hytime/dsh-companion(scope 已定型,无需再作替换)。仅当整体更换 scope 时,才运行根目录的 node scripts/rename-package.mjs <新scope> 全局替换。

开发命令

pnpm --filter @hytime/dsh-companion run typecheck
pnpm --filter @hytime/dsh-companion run lint
pnpm --filter @hytime/dsh-companion run test
pnpm --filter @hytime/dsh-companion run build      # library build → lib/
pnpm --filter @hytime/dsh-companion run pack

公开 API

  • WhaleFloatingWidget(props:statusemotion?lastError?companionName?

buddyTitle?buddyMessage?onReply?onClose?frameSrc?

  • createSkillStatusAdapter(source, onChange?)SkillStatusSource 接口
  • 纯 JSON 类型与函数:TravelNoteSkillInputTravelNoteCLIResultSkillStatus

CompanionEmotionCharacterActivityparseTravelNoteCLIResultnormalizeSkillStatusnormalizeCompanionEmotionskillStatusToActivityEMOTION_TO_FRAMEresolveWhaleFrame

  • 样式:由组件内联注入(CSS Modules,构建时编译进 lib/client.js

不导出 mock、CLI 执行器或 DSH live 对象。

表情与 Phaser 对齐

CompanionEmotion(idle/thinking/talking/happy/shy/surprised)、CharacterActivity (idle/listening/thinking/speaking)与既有 Companion 的 Phaser 角色状态机 (COMPANION_EMOTIONSCHARACTER_EMOTION_MAPEXPRESSION_TO_FRAME)逐项一致; 鲸鱼娘形象帧位于 public/deepseek-girl-phaser/(atlas + frames/*.png), build 时由 scripts/copy-assets.mjs 拷贝到 lib/deepseek-girl-phaser/(host 半 defaultAssetRoot() 据此提供静态路由);resolveWhaleFrame(status, emotion) 负责选择当前表情帧。

运行环境

  • React 19(peer dependency),TypeScript 5.6,Vite 6,Vitest 3 + Testing Library。
  • 仅浏览器环境;不依赖 Next.js、SSR 或 App Router。