chore: 统一对外接口规范目录为 hose-open-api

将 specs/openapi 迁移为 specs/hose-open-api,与内部接口规范目录命名对齐。
同步 README、规范打包、版本更新与版本一致性检查,以及发布验证夹具。

验证:929 项测试通过,类型检查和版本检查通过;打包 JSON 字节内容不变。
This commit is contained in:
gitea committed 2026-10-30 14:11:17 +08:00
1 parent 3d35fca558
commit b1e9c7eed3
13 files changed
+11 -11

No files matched your search

+4 -4
View File
@@ -37,7 +37,7 @@ export function bumpVersion(ROOT: string, input: string, rebuild = () => {
if (git(["tag", "--list", `v${nextVersion}`])) throw new Error(`Tag v${nextVersion} already exists`);
// Read all versioned sources before writing any of them.
for (const file of ["README.md", "skills/hose-use/SKILL.md"]) readFileSync(join(ROOT, file), "utf8");
for (const file of ["specs/openapi/openapi.yaml", ".zcode-plugin/plugin.json"]) {
for (const file of ["specs/hose-open-api/openapi.yaml", ".zcode-plugin/plugin.json"]) {
if (existsSync(join(ROOT, file))) {
const content = readFileSync(join(ROOT, file), "utf8");
if (file.endsWith(".json")) JSON.parse(content);
@@ -68,13 +68,13 @@ export function bumpVersion(ROOT: string, input: string, rebuild = () => {
writeFileSync(skillPath, skillContent);
console.log("✓ Updated skills/hose-use/SKILL.md");
// 4. specs/openapi/openapi.yaml
const openapiPath = join(ROOT, "specs", "openapi", "openapi.yaml");
// 4. specs/hose-open-api/openapi.yaml
const openapiPath = join(ROOT, "specs", "hose-open-api", "openapi.yaml");
if (existsSync(openapiPath)) {
let openapiContent = readFileSync(openapiPath, "utf-8");
openapiContent = openapiContent.replace(/version: \d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?/g, `version: ${nextVersion}`);
writeFileSync(openapiPath, openapiContent);
console.log("✓ Updated specs/openapi/openapi.yaml");
console.log("✓ Updated specs/hose-open-api/openapi.yaml");
}
// 4.5 .zcode-plugin/plugin.json