@deepseek-ai/dsh-skill-filesystem 0.2.0-rc.2 → 0.2.1-alpha.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.i18n.yaml CHANGED
@@ -42,8 +42,8 @@
42
42
  en: 8529fb4c1989d5fc
43
43
  zh: 115372aaa959dc6c
44
44
  /deepseek-ai-dsh-skill-filesystem/understand-the-implementation/source-map:
45
- en: 1b1bc2d6b523f308
46
- zh: f7d0c0e0ab1adcf0
45
+ en: f9d3b4bdedb897a6
46
+ zh: 962f7638d30741fd
47
47
  /deepseek-ai-dsh-skill-filesystem/understand-the-implementation/discovery-flow:
48
48
  en: 7e26750408a63587
49
49
  zh: 9eed631a7bdf00ae
package/README.md CHANGED
@@ -103,7 +103,6 @@ The provider is built on two separations. First, catalog versus body: discovery
103
103
  | File | Role |
104
104
  |---|---|
105
105
  | [`src/index.ts`](src/index.ts) | Plugin entry, provider, root resolution, frontmatter parsing, watch manager |
106
- | — | No runtime invariant companion is published; this package exposes no independent event sequence or mutable data relation beyond contracts enforced at its owning seam. |
107
106
 
108
107
  ### Discovery flow
109
108
 
package/README.zh.md CHANGED
@@ -103,7 +103,6 @@ skill 可以是被扫描根目录顶层的目录 bundle `<name>/SKILL.md`,也
103
103
  | 文件 | 职责 |
104
104
  |---|---|
105
105
  | [`src/index.ts`](src/index.ts) | 插件入口、提供方、根解析、frontmatter 解析、监视管理器 |
106
- | — | 不发布运行时不变式伴生入口;本包没有独立事件序列或可变数据关系,相关约定在所属 seam 强制执行。 |
107
106
 
108
107
  ### 发现流程
109
108
 
package/lib/index.js CHANGED
@@ -1,11 +1,10 @@
1
1
  import { access, lstat, readFile, readdir, realpath, stat } from "node:fs/promises";
2
2
  import { unwatchFile, watchFile } from "node:fs";
3
3
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
4
- import { homedir } from "node:os";
5
4
  import chokidar from "chokidar";
6
5
  import z from "@deepseek-ai/schemastery";
7
6
  import { parse } from "yaml";
8
- import { canonicalizeWatchPath, resolveDshHome } from "@deepseek-ai/dsh-home-paths";
7
+ import { canonicalizeWatchPath, resolveAgentsHome, resolveDshHome } from "@deepseek-ai/dsh-home-paths";
9
8
  import { BUNDLED_SKILL_RANK, isSkillName } from "@deepseek-ai/dsh-skill";
10
9
  //#region lib/types/index.js
11
10
  /**
@@ -75,7 +74,7 @@ var FileSystemSkillProvider = class {
75
74
  this.name = config.providerName ?? "filesystem";
76
75
  this.includeDefaultRoots = config.includeDefaultRoots ?? true;
77
76
  this.dshHome = resolveDshHome(config.dshHome);
78
- this.agentsHome = resolve(config.agentsHome ?? process.env.DSH_AGENTS_HOME ?? join(homedir(), ".agents"));
77
+ this.agentsHome = resolveAgentsHome(config.agentsHome);
79
78
  this.customSkillDirs = (config.customSkillDirs ?? []).map((root) => resolve(root));
80
79
  this.watchManager = new SkillWatchManager(ctx, control.invalidate, resolveWatchConfig(config));
81
80
  control.signal.addEventListener("abort", () => {
@@ -382,13 +381,24 @@ var SkillWatchManager = class {
382
381
  usePolling: this.config.usePolling,
383
382
  interval: this.config.pollIntervalMs
384
383
  });
385
- const handle = {
386
- mode,
387
- close: () => watcher.close()
388
- };
389
384
  let ready = false;
390
385
  const readiness = Promise.withResolvers();
391
386
  const signal = this.lifecycle.signal;
387
+ const onError = (error) => {
388
+ if (!ready) {
389
+ readiness.reject(error);
390
+ return;
391
+ }
392
+ this.handleWatcherError(state, error);
393
+ };
394
+ const handle = {
395
+ mode,
396
+ close: () => {
397
+ const closing = watcher.close();
398
+ watcher.on("error", onError);
399
+ return closing;
400
+ }
401
+ };
392
402
  if (signal.aborted) {
393
403
  await this.closeWatcher(handle);
394
404
  signal.throwIfAborted();
@@ -397,13 +407,6 @@ var SkillWatchManager = class {
397
407
  readiness.reject(signal.reason);
398
408
  };
399
409
  signal.addEventListener("abort", onAbort, { once: true });
400
- const onError = (error) => {
401
- if (!ready) {
402
- readiness.reject(error);
403
- return;
404
- }
405
- this.handleWatcherError(state, error);
406
- };
407
410
  watcher.on("error", onError);
408
411
  watcher.once("ready", () => {
409
412
  ready = true;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-skill-filesystem",
3
3
  "description": "Local filesystem skill provider for the DeepSeek Harness",
4
- "version": "0.2.0-rc.2",
4
+ "version": "0.2.1-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,20 +27,20 @@
27
27
  ],
28
28
  "license": "MIT",
29
29
  "peerDependencies": {
30
- "@deepseek-ai/dsh-fs": "0.2.0-rc.2",
31
- "@deepseek-ai/dsh-skill": "0.2.0-rc.2",
32
- "@deepseek-ai/cordis": "~4.0.4",
33
- "@deepseek-ai/dsh-home-paths": "0.2.0-rc.2"
30
+ "@deepseek-ai/dsh-fs": "0.2.1-alpha.2",
31
+ "@deepseek-ai/dsh-home-paths": "0.2.1-alpha.2",
32
+ "@deepseek-ai/dsh-skill": "0.2.1-alpha.2",
33
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1"
34
34
  },
35
35
  "dependencies": {
36
36
  "chokidar": "^5.0.0",
37
- "yaml": "^2.4.2",
38
- "@deepseek-ai/schemastery": "~3.18.4"
37
+ "@deepseek-ai/schemastery": "~3.18.5-alpha.1",
38
+ "yaml": "^2.4.2"
39
39
  },
40
40
  "devDependencies": {
41
- "@deepseek-ai/dsh-fs": "0.2.0-rc.2",
42
- "@deepseek-ai/dsh-home-paths": "0.2.0-rc.2",
43
- "@deepseek-ai/dsh-skill": "0.2.0-rc.2",
44
- "@deepseek-ai/cordis": "~4.0.4"
41
+ "@deepseek-ai/dsh-fs": "0.2.1-alpha.2",
42
+ "@deepseek-ai/dsh-home-paths": "0.2.1-alpha.2",
43
+ "@deepseek-ai/dsh-skill": "0.2.1-alpha.2",
44
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1"
45
45
  }
46
46
  }