chore(release): 更新项目与 CLI 名称为 hose-use,升级到 v0.2.0,增加二进制构建与 GitHub Actions Release 工作流,集成 Agent Skill
🚀 Release / 🚀 Build & Publish Multi-Platform Binaries (push) Has been cancelled

This commit is contained in:
gitea committed 2026-08-27 11:09:18 +08:00
1 parent b7a3bf2c03
commit dbeb422aeb
13 files changed
+653 -37

No files matched your search

+50
View File
@@ -0,0 +1,50 @@
import { existsSync, mkdirSync, writeFileSync, readFileSync } from "node:fs";
import { homedir } from "node:os";
import { dirname, join } from "node:path";
import skillMain from "../../skills/hose-use/SKILL.md" with { type: "text" };
export const EMBEDDED_SKILL_FILES: Record<string, string> = {
"SKILL.md": skillMain,
};
export function getSkillContent(): string {
return EMBEDDED_SKILL_FILES["SKILL.md"] || "";
}
export function getDefaultGlobalSkillDir(): string {
return join(homedir(), ".agents", "skills", "hose-use");
}
export function getAgentSkillCandidates(): string[] {
return [
join(homedir(), ".agents", "skills", "hose-use"),
join(homedir(), ".gemini", "antigravity", "skills", "hose-use"),
join(homedir(), ".codex", "skills", "hose-use"),
];
}
export function installSkillFiles(targetDir: string = getDefaultGlobalSkillDir()): {
targetDir: string;
files: string[];
} {
mkdirSync(targetDir, { recursive: true });
const installed: string[] = [];
for (const [relPath, content] of Object.entries(EMBEDDED_SKILL_FILES)) {
const fullPath = join(targetDir, relPath);
mkdirSync(dirname(fullPath), { recursive: true });
writeFileSync(fullPath, content, "utf8");
installed.push(relPath);
}
return {
targetDir,
files: installed,
};
}
export function syncGlobalSkillIfPresent(): { synced: boolean; targetDir?: string } {
const globalDir = getDefaultGlobalSkillDir();
installSkillFiles(globalDir);
return { synced: true, targetDir: globalDir };
}