@lmzhen/dsh-evolution-commands 0.3.8 → 0.3.9

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 (2) hide show
  1. package/lib/index.js +3 -26
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createUserMessage } from "@deepseek-ai/dsh-llm";
2
- import { SkillLibrary, appendEvolutionEvent, buildLearnPrompt, eventsFile, parseFrontmatter, usageObserved } from "@lmzhen/dsh-evolution-core";
3
- import { buildMaintainFacts, runMaintain, snapshotFromLibrary } from "@lmzhen/dsh-evolution-maintenance";
2
+ import { SkillLibrary, appendEvolutionEvent, buildLearnPrompt, eventsFile } from "@lmzhen/dsh-evolution-core";
3
+ import { buildEnrichment, buildMaintainFacts, runMaintain, snapshotFromLibrary } from "@lmzhen/dsh-evolution-maintenance";
4
4
  import { homedir } from "node:os";
5
5
  import { join } from "node:path";
6
6
  //#region lib/types/index.js
@@ -8,31 +8,8 @@ import { join } from "node:path";
8
8
  * Human commands for the evolution family: /evolution learn|pending|curator|restore|consolidate.
9
9
  * @module @lmzhen/dsh-evolution-commands
10
10
  */
11
+ /** Enrichment maps shared by the full scan and the `--facts` preview (v12). */
11
12
  const name = "evolution-commands";
12
- async function buildEnrichment(ctx, library) {
13
- const skillUsage = ctx.get("skillUsage");
14
- const usageMap = skillUsage?.report ? await skillUsage.report() : void 0;
15
- const usageObservedValue = usageMap ? usageObserved(usageMap) : void 0;
16
- const descriptions = /* @__PURE__ */ new Map();
17
- const supportFiles = /* @__PURE__ */ new Map();
18
- const quality = /* @__PURE__ */ new Map();
19
- for (const entry of await library.list()) {
20
- const body = await library.read(entry.name);
21
- if (body === null) continue;
22
- const description = parseFrontmatter(body)?.frontmatter.description;
23
- if (typeof description === "string" && description.trim().length > 0) descriptions.set(entry.name, description);
24
- const files = await library.listSupportFiles(entry.name);
25
- if (files.length > 0) supportFiles.set(entry.name, files);
26
- const record = usageMap?.get(entry.name);
27
- if (typeof record?.quality_score === "number") quality.set(entry.name, record.quality_score);
28
- }
29
- return {
30
- descriptions,
31
- supportFiles,
32
- quality,
33
- usageObservedValue
34
- };
35
- }
36
13
  function apply(ctx, rawConfig = {}) {
37
14
  const config = rawConfig;
38
15
  let lastMaintainAt = 0;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-commands",
3
3
  "description": "Human commands for the evolution family (community build)",
4
- "version": "0.3.8",
4
+ "version": "0.3.9",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -33,8 +33,8 @@
33
33
  "license": "MIT",
34
34
  "dependencies": {
35
35
  "@deepseek-ai/schemastery": "^3.18.1",
36
- "@lmzhen/dsh-evolution-core": "^0.3.8",
37
- "@lmzhen/dsh-evolution-maintenance": "^0.3.8"
36
+ "@lmzhen/dsh-evolution-core": "^0.3.9",
37
+ "@lmzhen/dsh-evolution-maintenance": "^0.3.9"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@deepseek-ai/cordis": "^4.0.1",