@vincemakes/kiso-skills-ext 0.31.0 → 0.32.0

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * kiso (foundation) official skills extension — ⑤: two-tier progressive skills,
2
+ * kiso official skills extension — ⑤: two-tier progressive skills,
3
3
  * kernel untouched.
4
4
  *
5
5
  * Tier 1 (resident): the skills index — every ${KISO_SKILLS_DIR:-~/.kiso/
@@ -41,11 +41,15 @@ export default async function createSkillsExtension() {
41
41
  const { index, broken } = loadIndex(skillsDir);
42
42
  // finding #8: no persistent resources — SKILL.md files are read per call;
43
43
  // nothing is spawned or connected — no dispose is needed, explicitly.
44
- if (index.length === 0 && broken.length === 0) return { name: "skills", tools: [] };
44
+ if (index.length === 0 && broken.length === 0) return { name: "skills", skills: 0, tools: [] };
45
45
  const tools = index.length > 0 ? [readSkillTool(index, broken)] : [];
46
46
  return {
47
47
  name: "skills",
48
48
  tools,
49
+ // §2.5: how many skills THIS load indexed. The CLI's reload line reads
50
+ // it here rather than walking the directory again — one scan, one
51
+ // answer, and no second count free to disagree with this one.
52
+ skills: index.length,
49
53
  systemPrompt: { append: skillsPromptAppend(index, broken) },
50
54
  };
51
55
  }
package/index.d.ts CHANGED
@@ -7,5 +7,11 @@
7
7
  */
8
8
  import type { KisoExtension } from "@vincemakes/kiso-core";
9
9
 
10
- declare const createSkillsExtension: () => KisoExtension | Promise<KisoExtension>;
10
+ /** §2.5: the extension reports how many skills THAT load indexed, so a
11
+ * caller wanting the number does not walk the directory a second time and
12
+ * get a second answer free to disagree with this one. Absent means the
13
+ * load reported none — never a reason to guess. */
14
+ type SkillsExtension = KisoExtension & { readonly skills?: number };
15
+
16
+ declare const createSkillsExtension: () => SkillsExtension | Promise<SkillsExtension>;
11
17
  export default createSkillsExtension;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-skills-ext",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
4
4
  "description": "kiso official skills extension — two-tier progressive skills, kernel untouched",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -23,7 +23,7 @@
23
23
  "test": "vitest run"
24
24
  },
25
25
  "devDependencies": {
26
- "@vincemakes/kiso-core": "0.31.0",
26
+ "@vincemakes/kiso-core": "0.32.0",
27
27
  "@types/node": "^26.1.2",
28
28
  "typescript": "^5.7.2",
29
29
  "vitest": "^3.0.0"