dsh-plugin-capabilities 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
@@ -13,6 +13,8 @@
13
13
 
14
14
  如果机器上存在 Claude Code 或 Codex 的技能目录(`~/.claude/skills`、`~/.codex/skills`),它们会作为额外的扫描根自动进入目录。文件不会被复制,改动留在原地,两边实时同步。
15
15
 
16
+ 本插件还自带两条只读技能:skill-creator(创建与迭代改进技能,来自 [anthropics/skills](https://github.com/anthropics/skills),Apache-2.0)与 find-skills(发现并安装社区技能,来自 [vercel-labs/skills](https://github.com/vercel-labs/skills),MIT)。它们随插件进入扫描目录,设置页里来源显示为「自定义」,会话中可直接调用;升级插件即更新、卸载插件即移除,不向 `DSH_HOME` 写入任何文件。
17
+
16
18
  ## MCP
17
19
 
18
20
  ![「MCP」标签页](docs/images/screenshot-mcp.png)
package/lib/index.js CHANGED
@@ -1,3 +1,8 @@
1
+ // src/index.ts
2
+ import { existsSync as existsSync4 } from "node:fs";
3
+ import { dirname as dirname2, join as join5 } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+
1
6
  // src/agents.ts
2
7
  import { existsSync, readFileSync } from "node:fs";
3
8
  import { homedir } from "node:os";
@@ -1358,6 +1363,9 @@ function mountCapabilitiesRoutes(host, config) {
1358
1363
 
1359
1364
  // src/index.ts
1360
1365
  var name = "dsh-plugin-capabilities";
1366
+ function packagedSkillsDir() {
1367
+ return join5(dirname2(fileURLToPath(import.meta.url)), "..", "skills");
1368
+ }
1361
1369
  var inject = ["webServer", "skills"];
1362
1370
  function apply(ctx, config) {
1363
1371
  const profile = config?.profile ?? argvProfile() ?? "web";
@@ -1366,7 +1374,7 @@ function apply(ctx, config) {
1366
1374
  try {
1367
1375
  const mod = await import("@deepseek-ai/dsh-skill-filesystem");
1368
1376
  const plugin = mod.default ?? mod;
1369
- const roots = agentSkillRoots();
1377
+ const roots = [packagedSkillsDir(), ...agentSkillRoots()].filter((dir) => existsSync4(dir));
1370
1378
  hostCtx.plugin(plugin, roots.length > 0 ? { customSkillDirs: roots } : {});
1371
1379
  } catch {
1372
1380
  }
@@ -1380,7 +1388,8 @@ function apply(ctx, config) {
1380
1388
  export {
1381
1389
  apply,
1382
1390
  inject,
1383
- name
1391
+ name,
1392
+ packagedSkillsDir
1384
1393
  };
1385
1394
  /*! Bundled license information:
1386
1395