comet-dsh-plugin 0.0.0-stage → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.en.md +176 -0
  3. package/README.md +152 -2
  4. package/client.js +349 -0
  5. package/cordis.patch.yml +4 -0
  6. package/icon.png +0 -0
  7. package/index.js +183 -0
  8. package/locale/en.json +7 -0
  9. package/locale/zh.json +7 -0
  10. package/package.json +57 -4
  11. package/rules/comet-workflow-guard.md +63 -0
  12. package/rules/migration-assets.json +218 -0
  13. package/server/comet-plugin-setup.mjs +192 -0
  14. package/skills/comet/SKILL.md +37 -0
  15. package/skills/comet/agents/openai.yaml +3 -0
  16. package/skills/comet/reference/change-walkthrough.md +77 -0
  17. package/skills/comet/reference/edit-review.md +26 -0
  18. package/skills/comet/reference/host-check.md +11 -0
  19. package/skills/comet/reference/platform-execution.md +34 -0
  20. package/skills/comet/reference/task-learning.md +39 -0
  21. package/skills/comet/runtime/classic/checks.yaml +6 -0
  22. package/skills/comet/runtime/classic/guardrails.yaml +13 -0
  23. package/skills/comet/runtime/classic/skill.yaml +122 -0
  24. package/skills/comet/scripts/comet-archive.mjs +310 -0
  25. package/skills/comet/scripts/comet-check.mjs +179 -0
  26. package/skills/comet/scripts/comet-entry-runtime.mjs +151 -0
  27. package/skills/comet/scripts/comet-env.mjs +15 -0
  28. package/skills/comet/scripts/comet-guard.mjs +335 -0
  29. package/skills/comet/scripts/comet-handoff.mjs +289 -0
  30. package/skills/comet/scripts/comet-hook-guard.mjs +294 -0
  31. package/skills/comet/scripts/comet-hook-router-guard.mjs +628 -0
  32. package/skills/comet/scripts/comet-hook-router.mjs +17 -0
  33. package/skills/comet/scripts/comet-intent.mjs +181 -0
  34. package/skills/comet/scripts/comet-plugin-hook.mjs +213 -0
  35. package/skills/comet/scripts/comet-resume-probe.mjs +205 -0
  36. package/skills/comet/scripts/comet-runtime.mjs +571 -0
  37. package/skills/comet/scripts/comet-state.mjs +381 -0
  38. package/skills/comet/scripts/comet-yaml-validate.mjs +182 -0
  39. package/skills/comet-any/SKILL.md +47 -0
  40. package/skills/comet-any/agents/openai.yaml +5 -0
  41. package/skills/comet-any/reference/sdk-creation.md +100 -0
  42. package/skills/comet-archive/SKILL.md +28 -0
  43. package/skills/comet-archive/agents/openai.yaml +5 -0
  44. package/skills/comet-archive/reference/compat.md +188 -0
  45. package/skills/comet-build/SKILL.md +35 -0
  46. package/skills/comet-build/agents/openai.yaml +5 -0
  47. package/skills/comet-build/reference/compat.md +191 -0
  48. package/skills/comet-classic/SKILL.md +98 -0
  49. package/skills/comet-classic/agents/openai.yaml +3 -0
  50. package/skills/comet-classic/reference/auto-transition.md +34 -0
  51. package/skills/comet-classic/reference/classic-layout.md +36 -0
  52. package/skills/comet-classic/reference/comet-yaml-fields.md +82 -0
  53. package/skills/comet-classic/reference/context-recovery.md +128 -0
  54. package/skills/comet-classic/reference/debug-gate.md +30 -0
  55. package/skills/comet-classic/reference/decision-point.md +109 -0
  56. package/skills/comet-classic/reference/dirty-worktree.md +59 -0
  57. package/skills/comet-classic/reference/file-structure.md +32 -0
  58. package/skills/comet-classic/reference/intent-frame.md +132 -0
  59. package/skills/comet-classic/reference/scripts.md +144 -0
  60. package/skills/comet-classic/reference/sdk-methods.md +136 -0
  61. package/skills/comet-classic/reference/subagent-dispatch.md +75 -0
  62. package/skills/comet-classic/reference/workspace.md +23 -0
  63. package/skills/comet-design/SKILL.md +25 -0
  64. package/skills/comet-design/agents/openai.yaml +5 -0
  65. package/skills/comet-design/reference/compat.md +191 -0
  66. package/skills/comet-hotfix/SKILL.md +46 -0
  67. package/skills/comet-hotfix/agents/openai.yaml +5 -0
  68. package/skills/comet-hotfix/reference/compat.md +240 -0
  69. package/skills/comet-memory/SKILL.md +68 -0
  70. package/skills/comet-memory/agents/openai.yaml +5 -0
  71. package/skills/comet-native/SKILL.md +139 -0
  72. package/skills/comet-native/agents/openai.yaml +3 -0
  73. package/skills/comet-native/reference/artifacts.md +118 -0
  74. package/skills/comet-native/reference/clarification.md +120 -0
  75. package/skills/comet-native/reference/commands.md +321 -0
  76. package/skills/comet-native/reference/edit-review.md +26 -0
  77. package/skills/comet-native/reference/recovery.md +64 -0
  78. package/skills/comet-native/reference/workspace.md +70 -0
  79. package/skills/comet-native/scripts/comet-native-archive.mjs +475 -0
  80. package/skills/comet-native/scripts/comet-native-cancel.mjs +461 -0
  81. package/skills/comet-native/scripts/comet-native-doctor.mjs +475 -0
  82. package/skills/comet-native/scripts/comet-native-hook-guard.mjs +470 -0
  83. package/skills/comet-native/scripts/comet-native-init.mjs +465 -0
  84. package/skills/comet-native/scripts/comet-native-new.mjs +478 -0
  85. package/skills/comet-native/scripts/comet-native-next.mjs +464 -0
  86. package/skills/comet-native/scripts/comet-native-root.mjs +472 -0
  87. package/skills/comet-native/scripts/comet-native-runtime.mjs +525 -0
  88. package/skills/comet-native/scripts/comet-native-select.mjs +468 -0
  89. package/skills/comet-native/scripts/comet-native-show.mjs +462 -0
  90. package/skills/comet-native/scripts/comet-native-spec.mjs +468 -0
  91. package/skills/comet-native/scripts/comet-native-status.mjs +467 -0
  92. package/skills/comet-native/scripts/comet-native-transfer.mjs +466 -0
  93. package/skills/comet-open/SKILL.md +265 -0
  94. package/skills/comet-open/agents/openai.yaml +5 -0
  95. package/skills/comet-open/reference/batch-changes.md +51 -0
  96. package/skills/comet-review/SKILL.md +121 -0
  97. package/skills/comet-review/agents/openai.yaml +5 -0
  98. package/skills/comet-tweak/SKILL.md +49 -0
  99. package/skills/comet-tweak/agents/openai.yaml +5 -0
  100. package/skills/comet-tweak/reference/compat.md +232 -0
  101. package/skills/comet-verify/SKILL.md +30 -0
  102. package/skills/comet-verify/agents/openai.yaml +5 -0
  103. package/skills/comet-verify/reference/compat.md +202 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 rpamis
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md ADDED
@@ -0,0 +1,176 @@
1
+ # Comet DeepSeek Harness plugin
2
+
3
+ Comet is a resumable long-running workflow and Skill platform for agents. It helps you move
4
+ from requirements through implementation, verification and archiving. Task state stays in
5
+ the project, so work can continue in a new session or after an interruption.
6
+
7
+ - **Native and Classic**: Native lets the agent choose planning, implementation, testing and review methods while the Runtime checks state, verifies results and archives the work. Classic retains the complete OpenSpec and Superpowers phase workflow.
8
+ - **Comet Any and SDK**: Combine Skills, tools, user confirmations and acceptance steps into runnable, resumable workflows.
9
+ - **Personal memory and project knowledge**: Retain collaboration preferences, project structure and verified experience to reduce repeated explanations and exploration.
10
+ - **Comet Eval**: Use Rubric, Pass@k and Pass^k to record evaluation evidence and compare Skills or complete workflows. Evaluations start only when the user explicitly requests them.
11
+ - **Dashboard**: Open Comet from the DSH sidebar to view the current project, workflow progress, change details, artifacts and evaluation records. The Dashboard can also open in the right sidebar.
12
+
13
+ The plugin includes Comet Skill, workflow guards, the local Dashboard and a matching CLI.
14
+ It registers Comet Skill in DeepSeek Harness and adds a Comet sidebar entry that opens the
15
+ current session workspace's Dashboard in the main column. An npm or private-registry
16
+ install brings the matching Comet CLI and exposes `comet` in the current DSH process;
17
+ without a bundled copy, it uses the CLI on PATH. Activation mounts the official Hook
18
+ bridge without requiring a manual `comet init`. Classic dependencies follow the project
19
+ configuration.
20
+
21
+ Source, documentation and issue tracker: [https://github.com/rpamis/comet](https://github.com/rpamis/comet)
22
+
23
+ ## Prepare the execution environment
24
+
25
+ Installing the plugin from npm or a private registry installs `@rpamis/comet` as a plugin
26
+ dependency at the same version, so no global CLI install is needed:
27
+
28
+ ```text
29
+ dsh plugin --profile <profile> add <package name or directory>
30
+ ```
31
+
32
+ On activation the plugin adds its bundled CLI's temporary entry to the current DSH
33
+ process's PATH. Skills run `comet` directly, without rewriting commands or changing the
34
+ system or user's permanent PATH. Disabling the plugin removes only its own entry and
35
+ preserves other PATH entries. Persistent shells opened before activation need a new
36
+ session or restart to inherit the environment. Without a bundled copy — a
37
+ development install that uses `link:` to a local build directory, where pnpm does not
38
+ install the linked package's dependencies — the plugin keeps using `comet` from PATH:
39
+
40
+ ```text
41
+ npm install -g @rpamis/comet
42
+ comet --version
43
+ ```
44
+
45
+ The CLI version must match the plugin. If that version is not published yet, run
46
+ `pnpm build` on the source branch and install it with
47
+ `npm install -g <absolute source repository path>`; never describe an older npm install as
48
+ the matching version.
49
+
50
+ ## Build
51
+
52
+ From the source repository:
53
+
54
+ ```text
55
+ pnpm build:dsh-plugin
56
+ ```
57
+
58
+ The command prints the plugin directory, archive and version; the default output is
59
+ `dist/dsh-plugin/<version>-zh/comet-dsh-plugin/`. Use `--output-root <directory>` for
60
+ another location; existing output is never overwritten. `--language en` packages the
61
+ English Skills. `--cli-spec <pnpm spec>` overrides the CLI version or source in the
62
+ dependency and defaults to the plugin version; for local checks it can point at a
63
+ published version or a `file:` path.
64
+
65
+ ## Publish to npm
66
+
67
+ `comet-dsh-plugin` and `@rpamis/comet` are separate npm packages and must be published
68
+ separately. Confirm that the matching `@rpamis/comet` version exists on public npm,
69
+ then run `pnpm build:dsh-plugin`. The source template keeps `private: true` to prevent
70
+ publishing placeholder metadata; the built package removes that flag and targets public
71
+ npm. After package tests and release-file checks pass, publish the build directory,
72
+ not the source template:
73
+
74
+ ```text
75
+ npm publish dist/dsh-plugin/<version>-zh/comet-dsh-plugin --access public --dry-run
76
+ npm publish dist/dsh-plugin/<version>-zh/comet-dsh-plugin --access public
77
+ npm view comet-dsh-plugin@<version> version --registry=https://registry.npmjs.org/
78
+ ```
79
+
80
+ Use `npm pack comet-dsh-plugin@<version>` afterward to confirm it can be downloaded.
81
+ A package version can only be published once. Local and private builds can still be
82
+ installed from their directory as described below.
83
+
84
+ ## Install and uninstall
85
+
86
+ The plugin is an npm/Cordis bundle, so installing it makes it a bundle of that profile and
87
+ affects every session in the profile. Install the plugin directory by its absolute path
88
+ through the DSH Plugin Manager, or with the DSH CLI:
89
+
90
+ ```text
91
+ dsh plugin --profile <profile> add comet-dsh-plugin --ignore-scripts
92
+ ```
93
+
94
+ For local build checks, replace the package name with the absolute plugin directory.
95
+ Use `comet-dsh-plugin@<version>` to install a specific version. The public npm package
96
+ includes Chinese Skills by default.
97
+
98
+ The desktop app owns its own profile (`desktop` by default). Manage that profile with the
99
+ Desktop's own `dsh plugin` or the desktop Plugins page; a successful `--profile web`
100
+ install does not prove the desktop profile changed. Confirm Comet on the Plugins page and
101
+ select the Comet entry in the sidebar from an open conversation. Without HMR, a restart
102
+ may be needed before it appears.
103
+
104
+ Uninstalling removes only the plugin; it keeps Comet changes, Runs, Specs, knowledge and
105
+ personal memory in projects:
106
+
107
+ ```text
108
+ dsh plugin --profile <profile> remove comet-dsh-plugin
109
+ ```
110
+
111
+ ## Dashboard startup and ownership
112
+
113
+ Selecting the sidebar Comet entry makes the Host run the resolved Comet CLI (the bundled
114
+ copy first, then PATH) for the current session's workspace:
115
+
116
+ ```text
117
+ comet dashboard <absolute workspace path> --no-open
118
+ ```
119
+
120
+ The plugin reads the actual address from the command output (default
121
+ `http://localhost:4321`, changing when the port is taken), starts a loopback reverse proxy
122
+ that belongs to this plugin only, and shows that proxy address in an iframe in the main
123
+ column. The proxy fills in the Host the Dashboard requires and drops the browser's Origin
124
+ and Sec-Fetch-* headers, so the Dashboard's own same-origin checks are not loosened; pages,
125
+ static assets and `/api/dashboard/...` requests all go through the same proxy. The
126
+ toolbar's **Refresh** reloads the current Dashboard, and **Open in sidebar** switches to
127
+ the Harness right Sidebar browser tab for the same service and URL.
128
+
129
+ One workspace reuses its service and proxy within one Harness process; different
130
+ workspaces start their own. Stopping or uninstalling the plugin terminates the Dashboard
131
+ processes it started and closes the proxies, so the next open starts them again; a Harness
132
+ restart does not adopt old processes and may start a new service. Refreshing, navigating
133
+ and closing a right Sidebar browser tab belong to the Harness Browser panel, and closing
134
+ the tab does not stop the service. Without an open conversation the entry reports that a
135
+ conversation is required.
136
+
137
+ A missing CLI, an unavailable workspace or a failed Dashboard start is reported in the
138
+ main column instead of failing silently. Viewing the Dashboard grants no Eval run.
139
+
140
+ ## Existing file-based installs
141
+
142
+ Installation also brings the official `@deepseek-ai/dsh-hooks-claude-code` bridge and
143
+ its runtime dependencies. Activation mounts `SessionStart` and `PreToolUse` for this
144
+ profile: new sessions receive the workflow rules and writes use the existing Comet
145
+ Router. No manual `comet init` is required. Private configuration lives under
146
+ `DSH_HOME/comet-plugin/` (default `~/.dsh/comet-plugin/`); the plugin does not rewrite
147
+ profile patches or copy project rules. Disabling or uninstalling it disposes the bridge.
148
+ The `integration` field in `/comet-plugin/status` reports preparation failures.
149
+
150
+ Only after the new Hook actually executes does it remove old Comet-owned Router/Guard
151
+ definitions from the current Git project's Hook file, preserving other user Hooks.
152
+ An existing session snapshot may run an old definition once more; start a new session
153
+ to receive updated rules.
154
+
155
+ `comet init` installs Skills into the project's `.dsh/skills` or the user directory. The
156
+ plugin registers runtime Skills; under the DSH precedence rules, same-name Skills in the
157
+ project directory win. When the new Hook executes, it backs up and removes recognized
158
+ legacy `SKILL.md` entry points from discovery so the plugin can take over. Content hashes
159
+ cover unmodified known releases from 0.4.0 through 0.5.2 and current-build definitions. Runtime, references, shared
160
+ Skills, project data and other platforms remain. Customized or unknown entries are kept
161
+ and reported. Only Comet-owned Hook definitions and matching `COMET:DSH` rule blocks are
162
+ migrated; user content outside them remains. Repeated migration is safe and no global CLI
163
+ uninstall is needed.
164
+
165
+ Backups and reports live under `DSH_HOME/comet-plugin/migration-backups/` and
166
+ `migration-reports/`. Use a new session or restart to load the updated Skill inventory.
167
+ For rollback, disable the plugin, review each receipt's `source` and `backup`, then restore
168
+ the entry. Merge Comet portions of mixed configuration instead of overwriting later edits.
169
+
170
+ ## Updates
171
+
172
+ Update the plugin through its current installation channel and reinstall the built output;
173
+ a bundled CLI updates with the plugin version, while a PATH CLI is updated through its own
174
+ npm channel. Rebuild into a new directory and install the new package through the same
175
+ channel; restart DSH if the page does not update. Check Skills, CLI versions and bridge
176
+ status in a new session. Updates preserve file-based Skills and the user's profile patch.
package/README.md CHANGED
@@ -1,3 +1,153 @@
1
- # Temporary Holding Version
1
+ # Comet DeepSeek Harness 插件
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Comet 是一个面向 Agent 的可恢复长程任务工作流与 Skill 平台,帮助你从需求推进到实现、
4
+ 验收和归档。任务状态保存在项目中,换会话或中断后可以继续。
5
+
6
+ - **Native 与 Classic**:Native 让 Agent 自主选择计划、实现、测试和审查方法,由 Runtime 检查状态、验收和归档;Classic 保留 OpenSpec 与 Superpowers 的完整阶段流程。
7
+ - **Comet Any 与 SDK**:将 Skill、工具、用户确认和验收步骤组合成可运行、可恢复的工作流。
8
+ - **个人记忆与项目知识**:保留协作偏好、项目结构和经过验证的经验,减少重复交代与探索。
9
+ - **Comet Eval**:用 Rubric、Pass@k 和 Pass^k 记录评估证据,比较 Skill 与完整工作流的表现;仅在用户明确要求时启动。
10
+ - **Dashboard**:从 DSH 左侧的 Comet 入口查看当前项目、工作流进度、变更详情、产物和评估记录,也可在右侧栏打开面板。
11
+
12
+ 插件包含 Comet Skill、工作流 Guard、本地 Dashboard 和配套 CLI。Comet Skill 注册到
13
+ DeepSeek Harness 的技能目录;左侧的 Comet 入口在主内容区打开当前会话工作区的 Dashboard。
14
+ 从 npm 或私有包安装时,插件会一并安装匹配版本的 Comet CLI,并在当前 DSH 进程中提供
15
+ `comet` 命令;没有自带副本时使用 PATH 中已有的 CLI。启用时自动接入官方 Hook 桥接,
16
+ 无需先手动运行 `comet init`。Classic 依赖沿用项目配置。
17
+
18
+ 源码、文档与问题反馈:[https://github.com/rpamis/comet](https://github.com/rpamis/comet)
19
+
20
+ ## 准备执行环境
21
+
22
+ 从 npm 或私有包安装插件时,`@rpamis/comet` 会作为插件依赖一起安装,版本与插件一致,
23
+ 不需要再全局安装 CLI:
24
+
25
+ ```text
26
+ dsh plugin --profile <profile> add <插件包名或目录> --ignore-scripts
27
+ ```
28
+
29
+ 插件启动时会把自带 CLI 的临时入口加入当前 DSH 进程的 PATH。Skills 直接执行 `comet`,
30
+ 无需改写命令;这不会修改系统或用户的永久 PATH。禁用插件时,只移除它自己的入口,
31
+ 保留其他 PATH 项。启用前已存在的持久 Shell 需要新开会话或重启后继承环境。
32
+ 没有自带副本时(例如用 `link:` 指向本地构建目录的开发安装,
33
+ pnpm 不会安装被链接包的依赖),继续使用 PATH 中的 `comet`:
34
+
35
+ ```text
36
+ npm install -g @rpamis/comet
37
+ comet --version
38
+ ```
39
+
40
+ CLI 版本必须与插件一致。若该版本尚未发布,先在对应源码分支运行 `pnpm build`,再执行
41
+ `npm install -g <源码仓库绝对路径>` 使用本地构建;不要把 npm 的旧版安装写成已匹配版本。
42
+
43
+ ## 构建
44
+
45
+ 源码仓库中执行:
46
+
47
+ ```text
48
+ pnpm build:dsh-plugin
49
+ ```
50
+
51
+ 命令输出插件目录、归档和版本号;默认生成在 `dist/dsh-plugin/<版本>-zh/comet-dsh-plugin/`。
52
+ 需要另一目录时使用 `--output-root <新目录>`;已有输出不会被覆盖。`--language en` 使用
53
+ 英文 Skills。`--cli-spec <pnpm 规格>` 覆盖依赖里的 CLI 版本/来源,默认与插件版本相同;
54
+ 本地验证时可以指向已发布版本或 `file:` 路径。
55
+
56
+ ## 发布到 npm
57
+
58
+ `comet-dsh-plugin` 与 `@rpamis/comet` 是两个独立的 npm 包,需要分别发布。
59
+ 先确认公共 npm 中已有匹配版本的 `@rpamis/comet`,再运行 `pnpm build:dsh-plugin`。
60
+ 源码模板的 `private: true` 防止误发占位版本;正式构建包会移除此标记,并指定公共 npm。
61
+ 在完成打包测试与发布文件检查后,从构建目录发布,不直接发布源码模板:
62
+
63
+ ```text
64
+ npm publish dist/dsh-plugin/<版本>-zh/comet-dsh-plugin --access public --dry-run
65
+ npm publish dist/dsh-plugin/<版本>-zh/comet-dsh-plugin --access public
66
+ npm view comet-dsh-plugin@<版本> version --registry=https://registry.npmjs.org/
67
+ ```
68
+
69
+ 发布后使用 `npm pack comet-dsh-plugin@<版本>` 确认用户可以拉取。
70
+ 同名同版本只能发布一次;本地或私有构建仍可使用前述目录安装方式。
71
+
72
+ ## 安装与卸载
73
+
74
+ 插件是 npm/Cordis bundle,安装后作为该 profile 的 bundle 生效,影响该 profile 的所有
75
+ 会话。通过 DSH 的 Plugin Manager 安装插件目录的绝对路径;也可以使用 DSH CLI:
76
+
77
+ ```text
78
+ dsh plugin --profile <profile> add comet-dsh-plugin --ignore-scripts
79
+ ```
80
+
81
+ 本地构建验证时,将包名替换为插件目录绝对路径。安装指定版本时使用
82
+ `comet-dsh-plugin@<版本>`;公开 npm 包默认包含中文 Skills。
83
+
84
+ 桌面端有自己的 profile(默认 `desktop`)。用 Desktop 自带的 `dsh plugin` 管理该
85
+ profile,或从桌面 Plugins 页面安装;`--profile web` 安装成功不代表桌面已生效。
86
+ 安装后在 Plugins 页面确认 Comet,并在一个已打开的会话中点击左侧栏的 Comet 入口。
87
+ 若环境没有 HMR,可能需要重启后再验证。
88
+
89
+ CLI 命令安装 npm 依赖后,还需在 Plugins 页面确认 bundle 已启用。DSH 使用的 pnpm
90
+ 可能因依赖的安装脚本而返回 `ERR_PNPM_IGNORED_BUILDS`;上面的 `--ignore-scripts`
91
+ 只跳过本次安装的生命周期脚本,不更改全局信任设置。Comet 已包含构建产物,自己的
92
+ postinstall 只输出初始化提示;使用插件自带 CLI 不依赖这个脚本。不要将退出失败
93
+ 或仅安装依赖视为桌面插件已经加载,须核对 Comet 入口与技能注册状态。
94
+
95
+ 卸载只移除插件本身,不删除项目中的 Comet change、Run、Spec、知识或个人记忆:
96
+
97
+ ```text
98
+ dsh plugin --profile <profile> remove comet-dsh-plugin
99
+ ```
100
+
101
+ ## Dashboard 的启动与归属
102
+
103
+ 选中左侧栏的 Comet 入口时,Host 会用解析到的 Comet CLI(插件自带优先,否则 PATH)为当前
104
+ 会话的工作区执行一次:
105
+
106
+ ```text
107
+ comet dashboard <工作区绝对路径> --no-open
108
+ ```
109
+
110
+ 插件从命令输出读取实际监听地址(默认 `http://localhost:4321`,端口冲突时会变化),并在
111
+ 本机回环地址上开一个只属于本插件的反向代理,再把主内容区设为这个代理地址的 iframe。
112
+ 反代会替浏览器请求补齐 Dashboard 要求的 Host,并去掉浏览器带来的 Origin 与
113
+ Sec-Fetch-* 头,因此不需要放宽 Dashboard 自身的同源校验;Dashboard 的页面、静态资源和
114
+ `/api/dashboard/...` 请求都经同一代理转发。页面顶部的「刷新」重载当前 Dashboard,
115
+ 「在右侧栏打开」改用 Harness 的右侧栏 Browser 标签(同一服务、同一 URL)。
116
+
117
+ 同一个工作区在同一个 Harness 进程内复用已启动的服务和代理;不同工作区各自启动。插件
118
+ 停止或卸载时,它会终止自己启动的这些 Dashboard 进程并关闭代理,因此再次打开会重新启动;
119
+ Harness 重启后不会认领旧进程,可能再启动一个新服务。右侧栏 Browser 标签的刷新、导航和
120
+ 关闭由 Harness 的 Browser 面板负责,关闭标签不会停止服务。没有打开会话时,入口页会提示
121
+ 先打开一个会话。
122
+
123
+ CLI 缺失、工作区不可用或 Dashboard 启动失败时,主内容区会显示原因,不会静默失败。
124
+ 查看 Dashboard 不授权启动 Eval。
125
+
126
+ ## 既有文件式安装
127
+
128
+ 插件安装时一并安装官方 `@deepseek-ai/dsh-hooks-claude-code`,启用后为当前 profile
129
+ 自动挂载 `SessionStart` 与 `PreToolUse`。规则通过新会话事件提供,写入交由原有 Router
130
+ 检查;配置位于 `DSH_HOME/comet-plugin/`(默认 `~/.dsh/comet-plugin/`)的独立目录,
131
+ 不向项目复制 Rule,也不改写用户的 profile patch。禁用或卸载插件会解除桥接。
132
+ `/comet-plugin/status` 的 `integration` 字段报告准备结果;失败会保留原因,不视为保护已生效。
133
+
134
+ 新 Hook 实际执行后,会移除当前 Git 项目里旧的 Comet Router/Guard 定义,保留其他用户
135
+ Hook;已有会话快照可能再执行一次旧定义。新会话会收到最新规则。
136
+
137
+ `comet init` 会把 Skills 安装到项目的 `.dsh/skills` 或用户目录。插件注册的是运行时
138
+ Skills;按 DSH 的层级规则,项目目录中的同名 Skills 优先。新 Hook 执行时会识别旧安装,
139
+ 将内容匹配 0.4.0 至 0.5.2 的已知发布版本或当前构建的旧 `SKILL.md` 备份后移出发现位置,由插件接管。
140
+ Runtime、引用文件、共享 Skills、项目数据和其他平台安装保留;自定义或未知版本入口保留,
141
+ 并在会话规则中提示迁移记录。已识别的旧 Hook 只移除 Comet 定义,旧 Rule 只移除匹配的
142
+ `COMET:DSH` 片段,保留片段外的用户内容。迁移可重复执行,不要求卸载全局 CLI。
143
+
144
+ 备份及记录位于 `DSH_HOME/comet-plugin/migration-backups/` 与 `migration-reports/`。
145
+ 已有会话需要新开会话或重启后使用新清单。回退时先禁用插件,按记录中的 `source` 与
146
+ `backup` 核对并恢复原入口;混合配置须合并恢复 Comet 部分,避免覆盖后续用户设置。
147
+
148
+ ## 更新
149
+
150
+ 更新插件按当前安装渠道重新安装构建输出;自带 CLI 随插件版本一起更新,使用 PATH 中的
151
+ CLI 时按对应 npm 安装渠道单独更新。重新构建到新目录,再按原渠道安装新包;
152
+ 若页面没有更新则重启 DSH。新会话中核对技能、CLI 版本和桥接状态。插件更新不会删除
153
+ 文件式 Skills,也不改写用户的 profile patch。