Merge pull request #50 from yunyingk/chore/embed-approval-skill-reference

chore(skill): embed references/approval.md into embedded skill assets
This commit is contained in:
yunyingk authored and GitHub committed 2026-09-07 14:26:20 +08:00
commit f2b0f15a6e
2 files changed
+7 -1

No files matched your search

+5 -1
View File
@@ -27,6 +27,9 @@ describe("embedded-skill - 多文件内嵌 Skill 体系", () => {
expect(EMBEDDED_SKILL_FILES["references/contact.md"]).toBeDefined();
expect(EMBEDDED_SKILL_FILES["references/contact.md"]).toContain("contact search");
expect(EMBEDDED_SKILL_FILES["references/approval.md"]).toBeDefined();
expect(EMBEDDED_SKILL_FILES["references/approval.md"]).toContain("hose-aipro");
});
test("installSkillFiles 递归保留层级结构并落盘到目标目录", () => {
@@ -34,10 +37,11 @@ describe("embedded-skill - 多文件内嵌 Skill 体系", () => {
try {
const res = installSkillFiles(tmp);
expect(res.targetDir).toBe(tmp);
expect(res.files.length).toBe(11);
expect(res.files.length).toBe(12);
expect(existsSync(join(tmp, "SKILL.md"))).toBe(true);
expect(existsSync(join(tmp, "agents", "openai.yaml"))).toBe(true);
expect(existsSync(join(tmp, "references", "auth.md"))).toBe(true);
expect(existsSync(join(tmp, "references", "approval.md"))).toBe(true);
expect(existsSync(join(tmp, "references", "bill.md"))).toBe(true);
expect(existsSync(join(tmp, "references", "contact.md"))).toBe(true);
expect(existsSync(join(tmp, "references", "role.md"))).toBe(true);
+2
View File
@@ -13,11 +13,13 @@ import refTask from "../../skills/hose-use/references/task.md" with { type: "tex
import refMessage from "../../skills/hose-use/references/message.md" with { type: "text" };
import refDimension from "../../skills/hose-use/references/dimension.md" with { type: "text" };
import refRole from "../../skills/hose-use/references/role.md" with { type: "text" };
import refApproval from "../../skills/hose-use/references/approval.md" with { type: "text" };
export const EMBEDDED_SKILL_FILES: Record<string, string> = {
"SKILL.md": skillMain,
"agents/openai.yaml": agentOpenAi,
"references/auth.md": refAuth,
"references/approval.md": refApproval,
"references/bill.md": refBill,
"references/contact.md": refContact,
"references/task.md": refTask,