@dawn0608/dsh-skill-manager 0.1.6 → 0.2.0
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.
- package/README.md +5 -29
- package/README.zh.md +5 -29
- package/lib/THIRD_PARTY_NOTICES.md +0 -28
- package/lib/client.js +106 -102
- package/lib/client.js.map +4 -4
- package/lib/index.js +44 -179
- package/lib/index.js.map +4 -4
- package/package.json +3 -7
- package/lib/install-sync.js +0 -7693
- package/lib/install-sync.js.map +0 -7
- package/lib/sync-daemon.js +0 -8804
- package/lib/sync-daemon.js.map +0 -7
package/README.md
CHANGED
|
@@ -12,44 +12,20 @@ In Desktop, open **Plugins → Add plugin** and enter `@dawn0608/dsh-skill-manag
|
|
|
12
12
|
dsh plugin --profile <profile> add @dawn0608/dsh-skill-manager
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Upgrade through the Harness plugin manager and restart if prompted.
|
|
16
|
-
|
|
17
|
-
### Install or upgrade optional macOS shared sync
|
|
18
|
-
|
|
19
|
-
Install or upgrade the service directly from npm.
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npx --yes --package @dawn0608/dsh-skill-manager@0.1.6 dsh-skill-sync-install
|
|
23
|
-
```
|
|
15
|
+
Upgrade through the Harness plugin manager and restart if prompted.
|
|
24
16
|
|
|
25
17
|
## Usage and configuration
|
|
26
18
|
|
|
27
19
|
- Manage imported copies: use the switch to enable or disable a copy and the detail action to uninstall it. Bundles are stored under `$DSH_HOME/skill-manager/bundles`, activated in `$DSH_HOME/skills`.
|
|
28
20
|
- Shared skill provenance lives in `$DSH_AGENTS_HOME/skills/.provenance.json` (default `~/.agents/skills/.provenance.json`). Keys are relative paths such as `my-skill/SKILL.md`; `origin` is `self` or `third-party`. An optional credential-free HTTPS `repository` is shown for third-party skills. Unconfirmed origins appear under Third-party.
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
### Configure shared sync
|
|
32
|
-
|
|
33
|
-
The installer honors `DSH_HOME`, `DSH_AGENTS_HOME`, `CODEX_HOME`, and `CLAUDE_CONFIG_DIR`, including `~/`. Defaults are `~/.dsh`, `~/.agents`, `~/.codex`, and `~/.claude`. Set the same variables for Harness and the installer. `DSH_SKILL_SYNC_CODEX` can select the Codex executable. The installer copies a bundled, self-contained daemon into `$DSH_HOME/skill-manager/shared-sync/runtime`, installs `local.dsh-skill-sync` as a user LaunchAgent, and adds Claude Code `SessionStart` / `CwdChanged` hooks. It checks the new service identity before reporting success; it maintains only hooks confirmed to belong to this service and preserves unrelated hooks. Restart Harness and reopen Claude Code sessions to register workspaces.
|
|
34
|
-
|
|
35
|
-
The service runs at login and synchronizes even while Harness is closed. Harness **Skills**, Codex **Skills**, and Claude Code `/skills` can toggle shared skills. Claude Code synchronization covers fully on/off states. Each destination's confirmed state is saved separately; failed writes retry against that baseline. A newer opposite external choice is preserved and reported as a conflict, which remains until an explicit Harness choice resolves it. Name collisions remain conflicts. Failures retain the last disabled Harness policy. The Skills page shows service failure or staleness. An already open Codex window may need restarting to reload its settings.
|
|
36
|
-
|
|
37
|
-
### Stop and recover shared sync
|
|
38
|
-
|
|
39
|
-
Uninstalling the plugin does **not** stop the independent daemon. Stop it explicitly:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
launchctl bootout "gui/$(id -u)" "$HOME/Library/LaunchAgents/local.dsh-skill-sync.plist"
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Remove that plist to prevent login startup, and remove only this service's exact command from Claude Code `SessionStart` / `CwdChanged` hooks. Keep unrelated hooks. Stopping synchronization leaves current enablement settings in place; restarting the service is done by rerunning the npm installer.
|
|
46
|
-
|
|
47
|
-
Every install prints a private backup directory under `$DSH_HOME/skill-manager/shared-sync/backup-*`, with a manifest of original paths/existence, Claude and Codex settings, state, the previous runtime and plist when present. If startup/readiness fails, the installer restores its changed files and reloads the previously loaded service. Concurrent edits are preserved and reported for manual recovery. For manual recovery, stop the service first, inspect that manifest, and restore only the intended backup files; do not blindly overwrite newer settings. Existing disabled state is retained on sync failures. The daemon log is `$DSH_HOME/skill-manager/shared-sync/error.log`.
|
|
21
|
+
- Directory skills, including `~/.agents/skills`, are discovered and loaded by Harness. This plugin displays its catalog and details; only plugin-owned imported copies can be enabled, disabled, or uninstalled here.
|
|
22
|
+
- `DSH_HOME` and `DSH_AGENTS_HOME` default to `~/.dsh` and `~/.agents`; absolute paths and `~/` are supported. The plugin does not manage other applications’ skills or configuration.
|
|
48
23
|
|
|
49
24
|
## Requirements and limitations
|
|
50
25
|
|
|
51
26
|
- Requires DeepSeek Harness `>=0.2.2-rc.1 <0.3.0` and Node.js 24 or later.
|
|
52
|
-
-
|
|
27
|
+
- Supports Windows, macOS, and Linux filesystem operations. Imported copies use directory junctions on Windows and directory symlinks elsewhere; no administrator privileges or Developer Mode are required.
|
|
28
|
+
- No Python, Codex, Claude Code, or background service is required. Filesystem conflicts or files held open by another process may require resolving the conflict before retrying.
|
|
53
29
|
|
|
54
30
|
## Development
|
|
55
31
|
|
package/README.zh.md
CHANGED
|
@@ -12,44 +12,20 @@
|
|
|
12
12
|
dsh plugin --profile <profile> add @dawn0608/dsh-skill-manager
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
通过 Harness
|
|
16
|
-
|
|
17
|
-
### 安装或升级可选 macOS 共享同步服务
|
|
18
|
-
|
|
19
|
-
通过 npm 直接安装或升级服务。
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npx --yes --package @dawn0608/dsh-skill-manager@0.1.6 dsh-skill-sync-install
|
|
23
|
-
```
|
|
15
|
+
通过 Harness 插件管理器升级,提示时重启。
|
|
24
16
|
|
|
25
17
|
## 使用与配置
|
|
26
18
|
|
|
27
19
|
- 管理导入副本:用开关启停,在详情中卸载。副本存放在 `$DSH_HOME/skill-manager/bundles`,通过 `$DSH_HOME/skills` 激活。
|
|
28
20
|
- 共享技能来源记录在 `$DSH_AGENTS_HOME/skills/.provenance.json`,默认 `~/.agents/skills/.provenance.json`。键为 `my-skill/SKILL.md` 等相对路径,`origin` 为 `self` 或 `third-party`。第三方可填写不含凭据的 HTTPS `repository`,用于展示原仓库链接。来源未确认的技能归入第三方。
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
### 配置共享同步
|
|
32
|
-
|
|
33
|
-
安装器支持 `DSH_HOME`、`DSH_AGENTS_HOME`、`CODEX_HOME`、`CLAUDE_CONFIG_DIR` 以及 `~/` 展开,默认分别为 `~/.dsh`、`~/.agents`、`~/.codex`、`~/.claude`。Harness 与安装器应使用同一组变量。可通过 `DSH_SKILL_SYNC_CODEX` 指定 Codex 可执行文件。安装器将已打包且自包含的 daemon 复制到 `$DSH_HOME/skill-manager/shared-sync/runtime`,配置用户 LaunchAgent `local.dsh-skill-sync` 和 Claude Code 的 `SessionStart` / `CwdChanged` hooks,并在新服务身份验证成功后报告完成。仅维护可确认属于本服务的 hooks,保留其他 hooks。重启 Harness 并重新打开 Claude Code 会话,以登记工作目录。
|
|
34
|
-
|
|
35
|
-
服务随登录启动,Harness 关闭后仍会同步。可在 Harness **技能**、Codex **Skills** 或 Claude Code `/skills` 切换共享技能。Claude Code 同步涵盖完全开启或停用状态。各端确认成功后分别保存状态,失败重试前核对基线;保留外部新作出的反向选择并报告冲突,直到在 Harness 中显式选择解决。同名冲突保持可见。同步失败不会解除原有 Harness 停用策略。技能页提示服务异常或过期状态。已打开的 Codex 窗口可能需要重启才会重新读取设置。
|
|
36
|
-
|
|
37
|
-
### 停止与恢复共享同步
|
|
38
|
-
|
|
39
|
-
卸载插件**不会**停止独立 daemon。请显式停止:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
launchctl bootout "gui/$(id -u)" "$HOME/Library/LaunchAgents/local.dsh-skill-sync.plist"
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
移除该 plist 可阻止下次登录启动;在 Claude Code 的 `SessionStart` / `CwdChanged` hooks 中仅移除本服务的准确命令,保留其他 hooks。停止同步会保留当前启停设置,重新运行 npm 安装器即可恢复服务。
|
|
46
|
-
|
|
47
|
-
每次安装均输出 `$DSH_HOME/skill-manager/shared-sync/backup-*` 下的私有备份目录,包括原路径及是否存在的清单,以及原有 Claude/Codex 设置、同步状态、runtime 和 plist。启动或就绪检查失败时,安装器恢复本次改动的文件并重新加载原先正在运行的服务;并发修改会保留并提示人工恢复。手动恢复前先停服务、检查清单,仅恢复选定备份,不要直接覆盖更新的设置。同步失败时保留已有停用状态。daemon 日志位于 `$DSH_HOME/skill-manager/shared-sync/error.log`。
|
|
21
|
+
- 目录技能(包括 `~/.agents/skills`)由 Harness 原生发现和加载。插件展示宿主目录与详情,仅允许启停和卸载本插件拥有的导入副本。
|
|
22
|
+
- `DSH_HOME` 和 `DSH_AGENTS_HOME` 默认分别为 `~/.dsh` 和 `~/.agents`,支持绝对路径与 `~/`。插件不管理其他应用的技能或配置。
|
|
48
23
|
|
|
49
24
|
## 环境要求与限制
|
|
50
25
|
|
|
51
26
|
- 要求 DeepSeek Harness `>=0.2.2-rc.1 <0.3.0` 和 Node.js 24 或更高版本。
|
|
52
|
-
-
|
|
27
|
+
- 文件操作适配 Windows、macOS 和 Linux。导入副本在 Windows 使用目录 junction,在其他平台使用目录软链接,不需要管理员权限或开发者模式。
|
|
28
|
+
- 不需要 Python、Codex、Claude Code 或后台服务。路径冲突或其他进程占用文件时,需要排除冲突后重试。
|
|
53
29
|
|
|
54
30
|
## 开发
|
|
55
31
|
|
|
@@ -2155,34 +2155,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
2155
2155
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
2156
2156
|
|
|
2157
2157
|
|
|
2158
|
-
## smol-toml@1.9.1 (BSD-3-Clause)
|
|
2159
|
-
|
|
2160
|
-
Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
2161
|
-
|
|
2162
|
-
Redistribution and use in source and binary forms, with or without
|
|
2163
|
-
modification, are permitted provided that the following conditions are met:
|
|
2164
|
-
|
|
2165
|
-
1. Redistributions of source code must retain the above copyright notice, this
|
|
2166
|
-
list of conditions and the following disclaimer.
|
|
2167
|
-
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
2168
|
-
this list of conditions and the following disclaimer in the
|
|
2169
|
-
documentation and/or other materials provided with the distribution.
|
|
2170
|
-
3. Neither the name of the copyright holder nor the names of its contributors
|
|
2171
|
-
may be used to endorse or promote products derived from this software without
|
|
2172
|
-
specific prior written permission.
|
|
2173
|
-
|
|
2174
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
2175
|
-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
2176
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
2177
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
2178
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
2179
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
2180
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
2181
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
2182
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
2183
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
2158
|
## space-separated-tokens@2.0.2 (MIT)
|
|
2187
2159
|
|
|
2188
2160
|
(The MIT License)
|