@dawn0608/dsh-skill-manager 0.1.1 → 0.1.2
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 +39 -17
- package/README.zh.md +38 -16
- package/lib/THIRD_PARTY_NOTICES.md +2588 -0
- package/lib/client.js +40349 -159
- package/lib/client.js.map +4 -4
- package/lib/index.js +18 -9
- package/lib/index.js.map +3 -3
- package/lib/install-sync.js +7693 -0
- package/lib/install-sync.js.map +7 -0
- package/lib/sync-daemon.js +8807 -0
- package/lib/sync-daemon.js.map +7 -0
- package/package.json +29 -25
package/README.md
CHANGED
|
@@ -2,35 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Features
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Open **Skills** below **Plugins** in the DeepSeek Harness sidebar. Search the global catalog, inspect rendered `SKILL.md`, and see provenance or the original repository. Built-in, Self-authored, and Third-party groups use the existing Harness controls. This plugin does not add another management page.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- For shared skills, record provenance in `~/.agents/skills/.provenance.json` (or under `$DSH_AGENTS_HOME/skills`). Use the instruction file path relative to the skills root, such as `my-skill/SKILL.md`, as the key. Set `origin` to `self` or `third-party`. For a third-party skill, an optional credential-free HTTPS `repository` URL appears as a link in the detail view.
|
|
11
|
-
- For a copy previously imported and managed by the plugin, use the switch in the list or detail view to enable or disable it, or uninstall it from the detail view. Managed copies live under `$DSH_HOME/skill-manager/bundles` and are activated in `$DSH_HOME/skills` for profiles using that home.
|
|
9
|
+
## Installation
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Requires DeepSeek Harness `>=0.2.2-rc.1 <0.3.0`. In Desktop, open **Plugins → Add plugin** and enter `@dawn0608/dsh-skill-manager`. You can also install it with the CLI.
|
|
11
|
+
In Desktop, open **Plugins → Add plugin** and enter `@dawn0608/dsh-skill-manager`, or run this command for your profile.
|
|
16
12
|
|
|
17
13
|
```bash
|
|
18
14
|
dsh plugin --profile <profile> add @dawn0608/dsh-skill-manager
|
|
19
15
|
```
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
Upgrade through the Harness plugin manager and restart if prompted. To switch from a checkout, remove its installation before adding the npm package. Plugin installation does **not** install the optional background service. No postinstall script runs it.
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
### Install or upgrade optional macOS shared sync
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
Install or upgrade the service directly from npm.
|
|
26
22
|
|
|
27
23
|
```bash
|
|
28
|
-
|
|
29
|
-
cd dsh-plugins
|
|
30
|
-
npm ci
|
|
31
|
-
node scripts/install-skill-sync.mjs
|
|
24
|
+
npx --yes --package @dawn0608/dsh-skill-manager@0.1.2 dsh-skill-sync-install
|
|
32
25
|
```
|
|
33
26
|
|
|
34
|
-
|
|
27
|
+
## Usage and configuration
|
|
28
|
+
|
|
29
|
+
- Previously imported copies remain supported: use the switch to enable or disable a copy and the detail action to uninstall it. Bundles remain under `$DSH_HOME/skill-manager/bundles`, activated in `$DSH_HOME/skills`.
|
|
30
|
+
- 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.
|
|
31
|
+
- Shared skills use `$DSH_AGENTS_HOME/skills/<name>/SKILL.md`, with matching folder and skill names. The optional service manages Claude Code links, but only deletes links it created whose stored filesystem identity still matches. Preexisting links and older ownership claims without identity are preserved.
|
|
32
|
+
|
|
33
|
+
### Configure shared sync
|
|
34
|
+
|
|
35
|
+
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; existing unrelated hooks remain intact and only exact hooks proven by the previous owned LaunchAgent are migrated. Restart Harness and reopen Claude Code sessions to register workspaces.
|
|
36
|
+
|
|
37
|
+
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/staleness and the last successful synchronization time. An already open Codex window may need restarting to reload its settings.
|
|
38
|
+
|
|
39
|
+
### Stop and recover shared sync
|
|
40
|
+
|
|
41
|
+
Uninstalling the plugin does **not** stop the independent daemon. Stop it explicitly:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
launchctl bootout "gui/$(id -u)" "$HOME/Library/LaunchAgents/local.dsh-skill-sync.plist"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
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.
|
|
48
|
+
|
|
49
|
+
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`.
|
|
50
|
+
|
|
51
|
+
## Compatibility and limitations
|
|
52
|
+
|
|
53
|
+
- Requires DeepSeek Harness `>=0.2.2-rc.1 <0.3.0` and Node.js 24 or later.
|
|
54
|
+
- Optional shared sync requires macOS and an installed `codex` CLI on PATH. Validate integration with launchd and your Codex and Claude Code sessions in your environment.
|
|
55
|
+
|
|
56
|
+
## Development
|
|
35
57
|
|
|
36
|
-
|
|
58
|
+
From the repository root, run `npm test -w @dawn0608/dsh-skill-manager` for the plugin tests and `npm run verify` for the full repository check.
|
package/README.zh.md
CHANGED
|
@@ -2,35 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 功能
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- 目录按内置技能、自建技能和第三方技能分组。归属待确认的技能暂列第三方。
|
|
10
|
-
- 共享技能的归属记录在 `~/.agents/skills/.provenance.json`(或 `$DSH_AGENTS_HOME/skills` 下)。以说明文件相对技能根目录的路径为键,例如 `my-skill/SKILL.md`,将 `origin` 设为 `self` 或 `third-party`。第三方技能可填写不含凭据的 HTTPS `repository` 地址,详情页会将其显示为链接。
|
|
11
|
-
- 此前由插件导入的受管副本可在列表或详情页启停,也可在详情页卸载。受管副本保存在 `$DSH_HOME/skill-manager/bundles`,通过 `$DSH_HOME/skills` 为使用同一主目录的 Harness profile 启用。
|
|
7
|
+
从 DeepSeek Harness 侧边栏 **插件** 下方打开 **技能**,搜索全局技能目录、阅读渲染后的 `SKILL.md`,查看来源标记或原仓库。内置、自建、第三方分组复用 Harness 现有控件,不另加管理页面。
|
|
12
8
|
|
|
13
9
|
## 安装
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
在 Desktop **插件 → 添加插件** 中输入 `@dawn0608/dsh-skill-manager`,或在 CLI 中为指定 profile 执行以下命令。
|
|
16
12
|
|
|
17
13
|
```bash
|
|
18
14
|
dsh plugin --profile <profile> add @dawn0608/dsh-skill-manager
|
|
19
15
|
```
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
通过 Harness 插件管理器升级,提示时重启。由源码目录切换到 npm 时,先移除旧目录安装。安装插件**不会**安装可选后台服务,也没有自动运行服务的 postinstall 脚本。
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
### 安装或升级可选 macOS 共享同步服务
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
通过 npm 直接安装或升级服务。
|
|
26
22
|
|
|
27
23
|
```bash
|
|
28
|
-
|
|
29
|
-
cd dsh-plugins
|
|
30
|
-
npm ci
|
|
31
|
-
node scripts/install-skill-sync.mjs
|
|
24
|
+
npx --yes --package @dawn0608/dsh-skill-manager@0.1.2 dsh-skill-sync-install
|
|
32
25
|
```
|
|
33
26
|
|
|
34
|
-
|
|
27
|
+
## 使用与配置
|
|
28
|
+
|
|
29
|
+
- 保留已有导入副本的管理能力:用开关启停,在详情中卸载。副本仍位于 `$DSH_HOME/skill-manager/bundles`,通过 `$DSH_HOME/skills` 激活。
|
|
30
|
+
- 共享技能来源记录在 `$DSH_AGENTS_HOME/skills/.provenance.json`,默认 `~/.agents/skills/.provenance.json`。键为 `my-skill/SKILL.md` 等相对路径,`origin` 为 `self` 或 `third-party`。第三方可填写不含凭据的 HTTPS `repository`,用于展示原仓库链接。来源未确认的技能归入第三方。
|
|
31
|
+
- 共享技能放在 `$DSH_AGENTS_HOME/skills/<name>/SKILL.md`,文件夹名与技能名一致。可选服务维护 Claude Code 链接,仅删除自己创建且文件系统身份仍吻合的链接;保留预先存在的链接及缺少身份凭据的旧所有权记录。
|
|
32
|
+
|
|
33
|
+
### 配置共享同步
|
|
34
|
+
|
|
35
|
+
安装器支持 `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 保留,仅精准迁移由旧自有 LaunchAgent 证明归属的命令。重启 Harness 并重新打开 Claude Code 会话,以登记工作目录。
|
|
36
|
+
|
|
37
|
+
服务随登录启动,Harness 关闭后仍会同步。可在 Harness **技能**、Codex **Skills** 或 Claude Code `/skills` 切换共享技能。Claude Code 同步涵盖完全开启或停用状态。各端确认成功后分别保存状态,失败重试前核对基线;保留外部新作出的反向选择并报告冲突,直到在 Harness 中显式选择解决。同名冲突保持可见。同步失败不会解除原有 Harness 停用策略。技能页提示服务异常或过期状态以及上次同步成功时间。已打开的 Codex 窗口可能需要重启才会重新读取设置。
|
|
38
|
+
|
|
39
|
+
### 停止与恢复共享同步
|
|
40
|
+
|
|
41
|
+
卸载插件**不会**停止独立 daemon。请显式停止:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
launchctl bootout "gui/$(id -u)" "$HOME/Library/LaunchAgents/local.dsh-skill-sync.plist"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
移除该 plist 可阻止下次登录启动;在 Claude Code 的 `SessionStart` / `CwdChanged` hooks 中仅移除本服务的准确命令,保留其他 hooks。停止同步会保留当前启停设置,重新运行 npm 安装器即可恢复服务。
|
|
48
|
+
|
|
49
|
+
每次安装均输出 `$DSH_HOME/skill-manager/shared-sync/backup-*` 下的私有备份目录,包括原路径及是否存在的清单,以及原有 Claude/Codex 设置、同步状态、runtime 和 plist。启动或就绪检查失败时,安装器恢复本次改动的文件并重新加载原先正在运行的服务;并发修改会保留并提示人工恢复。手动恢复前先停服务、检查清单,仅恢复选定备份,不要直接覆盖更新的设置。同步失败时保留已有停用状态。daemon 日志位于 `$DSH_HOME/skill-manager/shared-sync/error.log`。
|
|
50
|
+
|
|
51
|
+
## 兼容与限制
|
|
52
|
+
|
|
53
|
+
- 要求 DeepSeek Harness `>=0.2.2-rc.1 <0.3.0` 和 Node.js 24 或更高版本。
|
|
54
|
+
- 可选共享同步要求 macOS,且 PATH 中有可用的 `codex` CLI。请在实际环境中验收 launchd 与 Codex 和 Claude Code 会话的联动。
|
|
55
|
+
|
|
56
|
+
## 开发
|
|
35
57
|
|
|
36
|
-
|
|
58
|
+
在仓库根目录运行 `npm test -w @dawn0608/dsh-skill-manager` 检查本插件,或运行 `npm run verify` 验证整个仓库。
|