holy-agents-kits 0.2.0 → 0.2.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 +3 -0
  2. package/bin/cli.js +17 -4
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -7,6 +7,9 @@
7
7
  npx holy-agents-kits list
8
8
  npx holy-agents-kits install jenkins-cli
9
9
  ```
10
+ # skills运行时
11
+ - skills运行时新增 `.agents/.env` 的优先级的概念
12
+ -
10
13
 
11
14
  ## 技能一览
12
15
 
package/bin/cli.js CHANGED
@@ -35,15 +35,28 @@ function skillNames() {
35
35
  .sort();
36
36
  }
37
37
 
38
+ function readDescription(frontmatter) {
39
+ const lines = frontmatter.split(/\r?\n/);
40
+ const start = lines.findIndex((line) => line.startsWith("description:"));
41
+ if (start < 0) return "";
42
+ const inline = lines[start].slice("description:".length).trim();
43
+ if (inline && !["|", "|-", ">", ">-"].includes(inline)) return inline;
44
+ const parts = [];
45
+ for (let i = start + 1; i < lines.length; i++) {
46
+ if (!/^\s+\S/.test(lines[i])) break;
47
+ parts.push(lines[i].trim());
48
+ }
49
+ return parts.join(" ");
50
+ }
51
+
38
52
  function summarize(name) {
39
53
  const text = fs.readFileSync(path.join(SKILLS_DIR, name, "SKILL.md"), "utf8");
40
54
  const frontmatter = text.match(/^---\r?\n([\s\S]*?)\r?\n---/);
41
55
  if (!frontmatter) return "";
42
- const line = frontmatter[1].match(/^description:\s*(.+)$/m);
43
- if (!line) return "";
44
- const desc = line[1].trim();
56
+ const desc = readDescription(frontmatter[1]);
45
57
  const end = desc.indexOf("。");
46
- return end > 0 ? desc.slice(0, end) : desc.slice(0, 100);
58
+ const summary = end > 0 ? desc.slice(0, end) : desc;
59
+ return summary.length > 100 ? summary.slice(0, 100) + "…" : summary;
47
60
  }
48
61
 
49
62
  function copyDir(src, dest) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "holy-agents-kits",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Agent Skills 合集:Jenkins 流水线、Jenkins 控制器、Skill 开发与校验。一条命令装进你的 agent。",
5
5
  "bin": {
6
6
  "holy-agents-kits": "bin/cli.js"