feat(feetype): add fee type domain CRUD CLI commands and specifications

This commit is contained in:
gitea committed 2026-09-09 16:25:03 +08:00
1 parent 0be629778f
commit fb700a4c86
16 files changed
+2168 -2

No files matched your search

+4 -1
View File
@@ -30,6 +30,8 @@ describe("embedded-skill - 多文件内嵌 Skill 体系", () => {
expect(EMBEDDED_SKILL_FILES["references/approval.md"]).toBeDefined();
expect(EMBEDDED_SKILL_FILES["references/approval.md"]).toContain("hose-aipro");
expect(EMBEDDED_SKILL_FILES["references/feetype.md"]).toBeDefined();
expect(EMBEDDED_SKILL_FILES["references/feetype.md"]).toContain("feetype");
});
test("installSkillFiles 递归保留层级结构并落盘到目标目录", () => {
@@ -37,13 +39,14 @@ describe("embedded-skill - 多文件内嵌 Skill 体系", () => {
try {
const res = installSkillFiles(tmp);
expect(res.targetDir).toBe(tmp);
expect(res.files.length).toBe(12);
expect(res.files.length).toBe(13);
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", "feetype.md"))).toBe(true);
expect(existsSync(join(tmp, "references", "role.md"))).toBe(true);
expect(existsSync(join(tmp, "references", "workflow.md"))).toBe(true);
expect(existsSync(join(tmp, "references", "service.md"))).toBe(true);
+2
View File
@@ -14,6 +14,7 @@ import refMessage from "../../skills/hose-use/references/message.md" with { type
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" };
import refFeeType from "../../skills/hose-use/references/feetype.md" with { type: "text" };
export const EMBEDDED_SKILL_FILES: Record<string, string> = {
"SKILL.md": skillMain,
@@ -21,6 +22,7 @@ export const EMBEDDED_SKILL_FILES: Record<string, string> = {
"references/auth.md": refAuth,
"references/approval.md": refApproval,
"references/bill.md": refBill,
"references/feetype.md": refFeeType,
"references/contact.md": refContact,
"references/task.md": refTask,
"references/message.md": refMessage,
+7
View File
@@ -20,3 +20,10 @@ export class AuthenticationError extends EkbError {
super(message, "AUTH_FAILED", 401);
}
}
export class BusinessError extends EkbError {
constructor(message: string, code = "BUSINESS_ERROR", status = 400) {
super(message, code, status);
this.name = "BusinessError";
}
}