@dawn0608/dsh-skill-manager 0.1.4 → 0.1.6
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 +7 -7
- package/README.zh.md +7 -7
- package/lib/client.js +2 -10
- package/lib/client.js.map +2 -2
- package/lib/sync-daemon.js +42 -45
- package/lib/sync-daemon.js.map +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,27 +12,27 @@ 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.
|
|
15
|
+
Upgrade through the Harness plugin manager and restart if prompted. Plugin installation does **not** install the optional background service. No postinstall script runs it.
|
|
16
16
|
|
|
17
17
|
### Install or upgrade optional macOS shared sync
|
|
18
18
|
|
|
19
19
|
Install or upgrade the service directly from npm.
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
npx --yes --package @dawn0608/dsh-skill-manager@0.1.
|
|
22
|
+
npx --yes --package @dawn0608/dsh-skill-manager@0.1.6 dsh-skill-sync-install
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## Usage and configuration
|
|
26
26
|
|
|
27
|
-
-
|
|
27
|
+
- 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
28
|
- 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
|
-
- Shared skills use `$DSH_AGENTS_HOME/skills/<name>/SKILL.md`, with matching folder and skill names. The optional service
|
|
29
|
+
- Shared skills use `$DSH_AGENTS_HOME/skills/<name>/SKILL.md`, with matching folder and skill names. The optional service restores missing Claude Code links from valid sources and preserves local skills with the same name. When the shared source or client configuration is temporarily unavailable, the service preserves existing links and the last synchronized state. After intentionally deleting or renaming a shared skill, clean up its old link manually.
|
|
30
30
|
|
|
31
31
|
### Configure shared sync
|
|
32
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;
|
|
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
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
|
|
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
36
|
|
|
37
37
|
### Stop and recover shared sync
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@ Remove that plist to prevent login startup, and remove only this service's exact
|
|
|
46
46
|
|
|
47
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`.
|
|
48
48
|
|
|
49
|
-
##
|
|
49
|
+
## Requirements and limitations
|
|
50
50
|
|
|
51
51
|
- Requires DeepSeek Harness `>=0.2.2-rc.1 <0.3.0` and Node.js 24 or later.
|
|
52
52
|
- 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.
|
package/README.zh.md
CHANGED
|
@@ -12,27 +12,27 @@
|
|
|
12
12
|
dsh plugin --profile <profile> add @dawn0608/dsh-skill-manager
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
通过 Harness
|
|
15
|
+
通过 Harness 插件管理器升级,提示时重启。安装插件**不会**安装可选后台服务,也没有自动运行服务的 postinstall 脚本。
|
|
16
16
|
|
|
17
17
|
### 安装或升级可选 macOS 共享同步服务
|
|
18
18
|
|
|
19
19
|
通过 npm 直接安装或升级服务。
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
npx --yes --package @dawn0608/dsh-skill-manager@0.1.
|
|
22
|
+
npx --yes --package @dawn0608/dsh-skill-manager@0.1.6 dsh-skill-sync-install
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## 使用与配置
|
|
26
26
|
|
|
27
|
-
-
|
|
27
|
+
- 管理导入副本:用开关启停,在详情中卸载。副本存放在 `$DSH_HOME/skill-manager/bundles`,通过 `$DSH_HOME/skills` 激活。
|
|
28
28
|
- 共享技能来源记录在 `$DSH_AGENTS_HOME/skills/.provenance.json`,默认 `~/.agents/skills/.provenance.json`。键为 `my-skill/SKILL.md` 等相对路径,`origin` 为 `self` 或 `third-party`。第三方可填写不含凭据的 HTTPS `repository`,用于展示原仓库链接。来源未确认的技能归入第三方。
|
|
29
|
-
- 共享技能放在 `$DSH_AGENTS_HOME/skills/<name>/SKILL.md
|
|
29
|
+
- 共享技能放在 `$DSH_AGENTS_HOME/skills/<name>/SKILL.md`,文件夹名与技能名一致。可选服务从有效源码补齐缺失的 Claude Code 链接,保留同名的本地技能。共享源码或客户端配置暂时不可用时,服务保留已有链接和上次同步状态。主动删除或重命名共享技能后,请手动清理对应的旧链接。
|
|
30
30
|
|
|
31
31
|
### 配置共享同步
|
|
32
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
|
|
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
34
|
|
|
35
|
-
服务随登录启动,Harness 关闭后仍会同步。可在 Harness **技能**、Codex **Skills** 或 Claude Code `/skills` 切换共享技能。Claude Code 同步涵盖完全开启或停用状态。各端确认成功后分别保存状态,失败重试前核对基线;保留外部新作出的反向选择并报告冲突,直到在 Harness 中显式选择解决。同名冲突保持可见。同步失败不会解除原有 Harness
|
|
35
|
+
服务随登录启动,Harness 关闭后仍会同步。可在 Harness **技能**、Codex **Skills** 或 Claude Code `/skills` 切换共享技能。Claude Code 同步涵盖完全开启或停用状态。各端确认成功后分别保存状态,失败重试前核对基线;保留外部新作出的反向选择并报告冲突,直到在 Harness 中显式选择解决。同名冲突保持可见。同步失败不会解除原有 Harness 停用策略。技能页提示服务异常或过期状态。已打开的 Codex 窗口可能需要重启才会重新读取设置。
|
|
36
36
|
|
|
37
37
|
### 停止与恢复共享同步
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@ launchctl bootout "gui/$(id -u)" "$HOME/Library/LaunchAgents/local.dsh-skill-syn
|
|
|
46
46
|
|
|
47
47
|
每次安装均输出 `$DSH_HOME/skill-manager/shared-sync/backup-*` 下的私有备份目录,包括原路径及是否存在的清单,以及原有 Claude/Codex 设置、同步状态、runtime 和 plist。启动或就绪检查失败时,安装器恢复本次改动的文件并重新加载原先正在运行的服务;并发修改会保留并提示人工恢复。手动恢复前先停服务、检查清单,仅恢复选定备份,不要直接覆盖更新的设置。同步失败时保留已有停用状态。daemon 日志位于 `$DSH_HOME/skill-manager/shared-sync/error.log`。
|
|
48
48
|
|
|
49
|
-
##
|
|
49
|
+
## 环境要求与限制
|
|
50
50
|
|
|
51
51
|
- 要求 DeepSeek Harness `>=0.2.2-rc.1 <0.3.0` 和 Node.js 24 或更高版本。
|
|
52
52
|
- 可选共享同步要求 macOS,且 PATH 中有可用的 `codex` CLI。请在实际环境中验收 launchd 与 Codex 和 Claude Code 会话的联动。
|
package/lib/client.js
CHANGED
|
@@ -40374,7 +40374,6 @@ var DICTS = {
|
|
|
40374
40374
|
sharedConflict: "A shared skill has conflicting settings or a matching name in another location.",
|
|
40375
40375
|
sharedUnavailable: "Shared skill sync is unavailable. Check the background service and its log.",
|
|
40376
40376
|
sharedStopped: "The shared skill background service has stopped or is not responding.",
|
|
40377
|
-
sharedLastSuccess: "Last successful sync: {time}",
|
|
40378
40377
|
"not-found": "This skill could not be found.",
|
|
40379
40378
|
unavailable: "Could not read from or connect to Harness.",
|
|
40380
40379
|
forbidden: "This page does not have permission to perform the action.",
|
|
@@ -40421,7 +40420,6 @@ var DICTS = {
|
|
|
40421
40420
|
sharedConflict: "\u5171\u4EAB\u6280\u80FD\u5B58\u5728\u8BBE\u7F6E\u51B2\u7A81\u6216\u540C\u540D\u6761\u76EE\u3002",
|
|
40422
40421
|
sharedUnavailable: "\u5171\u4EAB\u6280\u80FD\u540C\u6B65\u4E0D\u53EF\u7528\uFF0C\u8BF7\u68C0\u67E5\u540E\u53F0\u670D\u52A1\u53CA\u5176\u65E5\u5FD7\u3002",
|
|
40423
40422
|
sharedStopped: "\u5171\u4EAB\u6280\u80FD\u540E\u53F0\u670D\u52A1\u5DF2\u505C\u6B62\u6216\u672A\u54CD\u5E94\u3002",
|
|
40424
|
-
sharedLastSuccess: "\u4E0A\u6B21\u540C\u6B65\u6210\u529F\uFF1A{time}",
|
|
40425
40423
|
"not-found": "\u627E\u4E0D\u5230\u6B64\u6280\u80FD\u3002",
|
|
40426
40424
|
unavailable: "\u65E0\u6CD5\u8FDE\u63A5 Harness \u6216\u8BFB\u53D6\u6570\u636E\u3002",
|
|
40427
40425
|
forbidden: "\u5F53\u524D\u9875\u9762\u6CA1\u6709\u6267\u884C\u6B64\u64CD\u4F5C\u7684\u6743\u9650\u3002",
|
|
@@ -40491,7 +40489,6 @@ function createCatalog(send = request) {
|
|
|
40491
40489
|
const listeners2 = /* @__PURE__ */ new Set();
|
|
40492
40490
|
let snapshot = {
|
|
40493
40491
|
skills: null,
|
|
40494
|
-
syncHealth: null,
|
|
40495
40492
|
listError: null,
|
|
40496
40493
|
mutationError: null,
|
|
40497
40494
|
busy: false,
|
|
@@ -40526,7 +40523,7 @@ function createCatalog(send = request) {
|
|
|
40526
40523
|
}
|
|
40527
40524
|
if (result.complete) {
|
|
40528
40525
|
hasCompleteCatalog = true;
|
|
40529
|
-
publish({ skills: result.skills,
|
|
40526
|
+
publish({ skills: result.skills, listError: result.syncError ?? null });
|
|
40530
40527
|
} else if (!hasCompleteCatalog) {
|
|
40531
40528
|
publish({ skills: result.skills, listError: "incomplete" });
|
|
40532
40529
|
} else {
|
|
@@ -40889,7 +40886,7 @@ function createPage(locale, controls, createStore = createCatalog) {
|
|
|
40889
40886
|
closeDialog();
|
|
40890
40887
|
setDetail(null);
|
|
40891
40888
|
}
|
|
40892
|
-
const { skills, busy, savingId, listError, mutationError
|
|
40889
|
+
const { skills, busy, savingId, listError, mutationError } = state;
|
|
40893
40890
|
const currentSkill = detail && (skills?.find((skill) => skill.id === detail.id) ?? detail);
|
|
40894
40891
|
return (0, import_react6.createElement)(
|
|
40895
40892
|
"div",
|
|
@@ -40928,11 +40925,6 @@ function createPage(locale, controls, createStore = createCatalog) {
|
|
|
40928
40925
|
})
|
|
40929
40926
|
),
|
|
40930
40927
|
listError && (0, import_react6.createElement)("p", { role: "alert", className: "dshskill_error" }, t(listError)),
|
|
40931
|
-
syncHealth?.lastSuccessAt && (0, import_react6.createElement)(
|
|
40932
|
-
"p",
|
|
40933
|
-
{ className: "dshskill_muted" },
|
|
40934
|
-
t("sharedLastSuccess", { time: syncHealth.lastSuccessAt })
|
|
40935
|
-
),
|
|
40936
40928
|
skills === null ? !listError && (0, import_react6.createElement)("p", { role: "status", className: "dshskill_muted" }, t("loading")) : (0, import_react6.createElement)(CatalogRows, { skills, query, translate: t, busy, savingId, store, openDetail, controls })
|
|
40937
40929
|
),
|
|
40938
40930
|
!confirmRemoval && busy && !savingId && (0, import_react6.createElement)("p", { role: "status", className: "dshskill_muted" }, t("saving")),
|