@dawn0608/dsh-skill-manager 0.1.5 → 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 CHANGED
@@ -19,20 +19,20 @@ Upgrade through the Harness plugin manager and restart if prompted. Plugin insta
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.5 dsh-skill-sync-install
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 manages Claude Code links, and only removes links confirmed to have been created by this service whose filesystem identity and target still match. Links with unconfirmed ownership are preserved.
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
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/staleness and the last successful synchronization time. An already open Codex window may need restarting to reload its settings.
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
 
package/README.zh.md CHANGED
@@ -19,20 +19,20 @@ dsh plugin --profile <profile> add @dawn0608/dsh-skill-manager
19
19
  通过 npm 直接安装或升级服务。
20
20
 
21
21
  ```bash
22
- npx --yes --package @dawn0608/dsh-skill-manager@0.1.5 dsh-skill-sync-install
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`,文件夹名与技能名一致。可选服务维护 Claude Code 链接,仅清理可确认由本服务创建、文件系统身份与目标均匹配的链接;无法确认归属的链接不清理。
29
+ - 共享技能放在 `$DSH_AGENTS_HOME/skills/<name>/SKILL.md`,文件夹名与技能名一致。可选服务从有效源码补齐缺失的 Claude Code 链接,保留同名的本地技能。共享源码或客户端配置暂时不可用时,服务保留已有链接和上次同步状态。主动删除或重命名共享技能后,请手动清理对应的旧链接。
30
30
 
31
31
  ### 配置共享同步
32
32
 
33
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 停用策略。技能页提示服务异常或过期状态以及上次同步成功时间。已打开的 Codex 窗口可能需要重启才会重新读取设置。
35
+ 服务随登录启动,Harness 关闭后仍会同步。可在 Harness **技能**、Codex **Skills** 或 Claude Code `/skills` 切换共享技能。Claude Code 同步涵盖完全开启或停用状态。各端确认成功后分别保存状态,失败重试前核对基线;保留外部新作出的反向选择并报告冲突,直到在 Harness 中显式选择解决。同名冲突保持可见。同步失败不会解除原有 Harness 停用策略。技能页提示服务异常或过期状态。已打开的 Codex 窗口可能需要重启才会重新读取设置。
36
36
 
37
37
  ### 停止与恢复共享同步
38
38
 
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, syncHealth: result.syncHealth ?? null, listError: result.syncError ?? null });
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, syncHealth } = state;
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")),