fix: enforce directory param in skill resolution, replace legacy k2p5 model ID
- Make directory required in SkillLoadOptions, getAllSkills, and async skill template resolvers to prevent unsafe process.cwd() fallback - Remove dead skill export and process.cwd() fallback in skill tool - Replace kimi-for-coding/k2p5 with kimi-for-coding/kimi-k2.5 in council-members-generator
This commit is contained in:
@@ -185,7 +185,7 @@ describe("resolveMultipleSkillsAsync", () => {
|
||||
const skillNames = ["playwright", "git-master"]
|
||||
|
||||
// when: resolving multiple skills async
|
||||
const result = await resolveMultipleSkillsAsync(skillNames)
|
||||
const result = await resolveMultipleSkillsAsync(skillNames, { directory: process.cwd() })
|
||||
|
||||
// then: all builtin skills resolved
|
||||
expect(result.resolved.size).toBe(2)
|
||||
@@ -199,7 +199,7 @@ describe("resolveMultipleSkillsAsync", () => {
|
||||
const skillNames = ["playwright", "nonexistent-skill-12345"]
|
||||
|
||||
// when: resolving multiple skills async
|
||||
const result = await resolveMultipleSkillsAsync(skillNames)
|
||||
const result = await resolveMultipleSkillsAsync(skillNames, { directory: process.cwd() })
|
||||
|
||||
// then: existing skills resolved, non-existing in notFound
|
||||
expect(result.resolved.size).toBe(1)
|
||||
@@ -289,7 +289,7 @@ describe("resolveMultipleSkillsAsync", () => {
|
||||
const skillNames = ["git-master"]
|
||||
|
||||
// when: resolving without any gitMasterConfig
|
||||
const result = await resolveMultipleSkillsAsync(skillNames)
|
||||
const result = await resolveMultipleSkillsAsync(skillNames, { directory: process.cwd() })
|
||||
|
||||
// then: watermark is injected (default is ON)
|
||||
expect(result.resolved.size).toBe(1)
|
||||
@@ -363,7 +363,7 @@ describe("resolveMultipleSkillsAsync", () => {
|
||||
const skillNames: string[] = []
|
||||
|
||||
// when: resolving multiple skills async
|
||||
const result = await resolveMultipleSkillsAsync(skillNames)
|
||||
const result = await resolveMultipleSkillsAsync(skillNames, { directory: process.cwd() })
|
||||
|
||||
// then: empty results
|
||||
expect(result.resolved.size).toBe(0)
|
||||
|
||||
Reference in New Issue
Block a user