@lmzhen/dsh-evolution-skill-catalog 0.3.66 → 0.3.68
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 +1 -0
- package/lib/index.js +13 -6
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -26,5 +26,6 @@ Independent of request-prefix construction. This package does not alter the asse
|
|
|
26
26
|
- **Out-of-band edits need a refresh (0.3.18, E-71).** The catalog invalidates on the in-band `evolution/skill-mutated` event (all writes through SkillLibrary). Edits made outside the family — manual file edit, a git pull, another process — bypass that event and cannot be auto-detected (decision C: no filesystem watcher). A root-mtime probe re-stamps the summaries cache when the provider is re-queried after a structural change (directory add/remove/rename), but the probe only runs when the upstream skill registry actually consults this provider — between refreshes the registry's collect cache answers `list`/`snapshot` without calling providers (the real reason E-71's out-of-band skill stays invisible), while `get` of an already-indexed name still reaches the provider, so an out-of-band CONTENT edit of an existing skill shows fresh content there (description stays stale until refresh). Any out-of-band change is only guaranteed to be visible after `/evolution skills refresh` runs (or the process restarts).
|
|
27
27
|
- **Upstream-invalid entries are filtered, not published (P1-1, v18).** `SkillLibrary.list()` reports an empty description for a 0-byte/malformed SKILL.md (C-14 keeps it visible to the curator), and a tree entry created before the 0.3.64 name tightening can still carry a trailing/consecutive hyphen. Upstream `validateCandidate` throws on either shape, and that throw aborts the whole `ctx.skills` collection (breaking `agent/pre-step` and the `skill` tool for the session). This provider therefore skips (and warns once about) any candidate whose name is not upstream `SKILL_NAME` or whose description is empty. The entry stays visible to the curator/lifecycle; fix the SKILL.md frontmatter (or the directory name) to publish it.
|
|
28
28
|
- **`whenToUse` is published, `metadata` is not (E-11, v18).** A non-empty single-line `whenToUse` from the frontmatter is forwarded to the platform catalog (the upstream filesystem provider does the same, and the host/UI read it for routing hints). `metadata` needs a real YAML parse and stays unpublished by this provider.
|
|
29
|
+
- **`content` is the BODY, not the file (V27 G5.3).** The published `SkillDefinition.content` is the SKILL.md text AFTER the frontmatter block, matching the upstream filesystem provider (`skill-filesystem`: `content: parsed.body.trim()`). This provider shadows that provider for the same skills, so publishing the whole file made the model load a different skill depending on which provider served it. A file whose frontmatter block cannot be read keeps its raw text (the entry stays visible; the audit reports the file through `frontmatterCatalogInvalid`).
|
|
29
30
|
- **Protection markers are best-effort per entry (A1-17, v18).** When the directory listing AND the per-marker probes fail, `SkillSummary.protectionUnknown` is true and consumers (curator, maintenance) treat the entry as protected rather than unprotected.
|
|
30
31
|
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import z from "@deepseek-ai/schemastery";
|
|
2
|
-
import { SKILL_NAME_RE, SkillLibrary, evolutionIoAdapter, resolveSkillsRoot } from "@lmzhen/dsh-evolution-core";
|
|
2
|
+
import { SKILL_NAME_RE, SkillLibrary, evolutionIoAdapter, parseFrontmatter, resolveSkillsRoot } from "@lmzhen/dsh-evolution-core";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
//#region lib/types/index.js
|
|
5
5
|
/**
|
|
@@ -74,15 +74,21 @@ function apply(ctx, rawConfig = {}) {
|
|
|
74
74
|
let control;
|
|
75
75
|
let summariesCache = null;
|
|
76
76
|
let summariesStamp = null;
|
|
77
|
+
let summariesEpoch = 0;
|
|
77
78
|
async function summaries() {
|
|
78
79
|
const stamp = await io.mtime?.(library.root) ?? null;
|
|
79
80
|
if (summariesCache !== null && (stamp === null || summariesStamp === stamp)) return summariesCache;
|
|
80
81
|
if (summariesCache !== null && stamp !== null) control?.invalidate();
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
const epochAtScanStart = summariesEpoch;
|
|
83
|
+
const scanned = await library.list();
|
|
84
|
+
if (epochAtScanStart === summariesEpoch) {
|
|
85
|
+
summariesCache = scanned;
|
|
86
|
+
summariesStamp = stamp;
|
|
87
|
+
}
|
|
88
|
+
return scanned;
|
|
84
89
|
}
|
|
85
90
|
const dropSummariesCache = () => {
|
|
91
|
+
summariesEpoch += 1;
|
|
86
92
|
summariesCache = null;
|
|
87
93
|
control?.invalidate();
|
|
88
94
|
};
|
|
@@ -125,8 +131,9 @@ function apply(ctx, rawConfig = {}) {
|
|
|
125
131
|
warnUnpublishable(summary.name, summary.description);
|
|
126
132
|
return;
|
|
127
133
|
}
|
|
128
|
-
const
|
|
129
|
-
if (
|
|
134
|
+
const raw = await library.read(name);
|
|
135
|
+
if (raw === null) return void 0;
|
|
136
|
+
const content = parseFrontmatter(raw)?.body ?? raw;
|
|
130
137
|
return {
|
|
131
138
|
name,
|
|
132
139
|
description: summary.description,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-skill-catalog",
|
|
3
3
|
"description": "Native ctx.skills provider for the evolution-managed skill tree (community build)",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.68",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
34
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
34
|
+
"@lmzhen/dsh-evolution-core": "^0.3.68"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
38
38
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
39
39
|
"@deepseek-ai/dsh-skill": "^0.1.1-rc.2",
|
|
40
|
-
"@lmzhen/dsh-evolution-io": "^0.3.
|
|
40
|
+
"@lmzhen/dsh-evolution-io": "^0.3.68"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
44
44
|
"@deepseek-ai/dsh-skill": "^0.1.1-rc.2",
|
|
45
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
46
|
-
"@lmzhen/dsh-evolution-io": "^0.3.
|
|
45
|
+
"@lmzhen/dsh-evolution-core": "^0.3.68",
|
|
46
|
+
"@lmzhen/dsh-evolution-io": "^0.3.68"
|
|
47
47
|
}
|
|
48
48
|
}
|