@lmzhen/dsh-evolution-skill-catalog 0.3.83 → 0.4.1

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.
Files changed (3) hide show
  1. package/README.md +21 -24
  2. package/lib/index.js +1 -1
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -1,33 +1,30 @@
1
1
  # @lmzhen/dsh-evolution-skill-catalog
2
2
 
3
- Native ctx.skills provider for the evolution-managed skill tree
3
+ Native `ctx.skills` provider for the evolution-managed skill tree — read-only; mutations go
4
+ through `tool-skill-manage`.
4
5
 
6
+ ## Model surface
5
7
 
6
- ## Model Experience
8
+ - **Model-visible:** nothing of its own: no prompt and no tool schema; it supplies the read-only native `ctx.skills` catalog, and consumers own the model-visible effects.
9
+ - **Prompt prefix / KV cache:** independent of request-prefix construction; it does not alter the assembled prompt or tool list; family-level rules: `packages/README.md` §"Model-visible prompt prefix and the KV cache".
10
+ - **Mount it?** yes — the `evolution-skill-catalog` row, carried by the `evolution-all` and one-click `evolution-preset` bundles and by the Evolution agent preset delta.
7
11
 
8
- ### Indirect model surface
12
+ ## Known limitations
9
13
 
10
- #### What the model sees
11
-
12
- `@lmzhen/dsh-evolution-skill-catalog` registers no direct prompt or tool schema itself. Model-visible effects are owned by the packages that consume this service.
13
-
14
- #### Token effect
15
-
16
- Zero direct token effect from this package; consumers add any model-visible tokens.
17
-
18
- #### KV Cache effect
19
-
20
- Independent of request-prefix construction. This package does not alter the assembled prompt or tool list.
21
-
22
- ## Known Limitations and Deferred Work
23
-
24
-
25
- - Read-only native `ctx.skills` catalog. Skill mutations still happen through `tool-skill-manage`.
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
- - **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
- - **`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`).
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.
14
+ - **Out-of-band edits need a refresh.** 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).
15
+ - **Upstream-invalid entries are filtered, not published.** `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.
16
+ - **Invocation frontmatter: canonical keys first, legacy keys honored conservatively.** The per-skill `disable-model-invocation` / `user-invocable` keys are parsed from the same frontmatter the platform reads and take priority; a file that sets neither falls back to the ROW default (`modelInvocable: true`). Upstream THROWS on the legacy camelCase keys (`disableModelInvocation` / `modelInvocable` / `userInvocable`) and drops the whole file; this shadow warns once and keeps the entry, in the AUTHOR's direction: the mere PRESENCE of `disableModelInvocation` publishes `modelInvocable: false` whatever its value (a misspelled value no longer falls back to the row default and re-enables the skill), and a legacy `modelInvocable` / `userInvocable` is honored as written when it parses (`false` stays `false`) and falls back to the conservative `false` when it does not. Both legacy directions are pinned in `tests/catalog.spec.ts`.
17
+ - **`whenToUse` is published, `metadata` is not.** 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.
18
+ - **`content` is the BODY, not the file.** 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`).
19
+ - **Protection markers are best-effort per entry.** 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.
31
20
 
32
21
  **Runtime invariant:** No companion is published. The platform auto-assembles nothing and the family mounts no `<pkg>/invariant` cordis row, so a companion here would never execute (v37 S2.1 / I-3).
33
22
 
23
+ ## Notes and history
24
+
25
+ - **Out-of-band edits need a refresh (0.3.18, E-71).**
26
+ - **Upstream-invalid entries are filtered, not published (P1-1, v18).**
27
+ - **Invocation frontmatter: canonical keys first, legacy keys honored conservatively (OPT-10; P2-30 / P2-9, 0.3.83).**
28
+ - **`whenToUse` is published, `metadata` is not (E-11, v18).**
29
+ - **`content` is the BODY, not the file (V27 G5.3).**
30
+ - **Protection markers are best-effort per entry (A1-17, v18).**
package/lib/index.js CHANGED
@@ -128,7 +128,7 @@ function apply(ctx, rawConfig = {}) {
128
128
  const stamp = await libraryStamp();
129
129
  if (summariesCache !== null && (stamp === null || summariesStamp === stamp)) return {
130
130
  summaries: summariesCache,
131
- complete: true
131
+ complete: stamp !== null
132
132
  };
133
133
  if (summariesCache !== null && stamp !== null) control?.invalidate();
134
134
  const epochAtScanStart = summariesEpoch;
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.83",
4
+ "version": "0.4.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,16 +27,16 @@
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
29
  "@deepseek-ai/schemastery": "^3.18.1",
30
- "@lmzhen/dsh-evolution-core": "^0.3.83"
30
+ "@lmzhen/dsh-evolution-core": "^0.4.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@deepseek-ai/cordis": "^4.0.1",
34
34
  "@deepseek-ai/dsh-skill": "^0.1.5-rc.2",
35
- "@lmzhen/dsh-evolution-io": "^0.3.83"
35
+ "@lmzhen/dsh-evolution-io": "^0.4.1"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@deepseek-ai/dsh-skill": "^0.1.5-rc.2",
39
- "@lmzhen/dsh-evolution-core": "^0.3.83",
40
- "@lmzhen/dsh-evolution-io": "^0.3.83"
39
+ "@lmzhen/dsh-evolution-core": "^0.4.1",
40
+ "@lmzhen/dsh-evolution-io": "^0.4.1"
41
41
  }
42
42
  }