mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-14 04:13:18 +08:00
重构主控编排与运行时预热链路,统一工作区提示词/专家调度协议并补齐 wiki 记忆注入与写回闭环。
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。 Made-with: Cursor
This commit is contained in:
parent
4a23b715a2
commit
dbbe3add6a
14438 changed files with 2693620 additions and 2546 deletions
65
openclaw/scripts/changelog-add-unreleased.ts
Normal file
65
openclaw/scripts/changelog-add-unreleased.ts
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
import { readFileSync, writeFileSync } from "node:fs";
|
||||
import { resolve } from "node:path";
|
||||
import { appendUnreleasedChangelogEntry } from "../src/infra/changelog-unreleased.js";
|
||||
|
||||
type SectionArg = "breaking" | "changes" | "fixes";
|
||||
|
||||
function parseArgs(argv: string[]): {
|
||||
changelogPath: string;
|
||||
section: "Breaking" | "Changes" | "Fixes";
|
||||
entry: string;
|
||||
} {
|
||||
let changelogPath = resolve("CHANGELOG.md");
|
||||
let section: SectionArg | undefined;
|
||||
const entryParts: string[] = [];
|
||||
|
||||
for (let index = 0; index < argv.length; index += 1) {
|
||||
const arg = argv[index];
|
||||
if (arg === "--file") {
|
||||
const next = argv[index + 1];
|
||||
if (!next) {
|
||||
throw new Error("Missing value for --file.");
|
||||
}
|
||||
changelogPath = resolve(next);
|
||||
index += 1;
|
||||
continue;
|
||||
}
|
||||
if (arg === "--section") {
|
||||
const next = argv[index + 1] as SectionArg | undefined;
|
||||
if (!next || !["breaking", "changes", "fixes"].includes(next)) {
|
||||
throw new Error("Missing or invalid value for --section.");
|
||||
}
|
||||
section = next;
|
||||
index += 1;
|
||||
continue;
|
||||
}
|
||||
entryParts.push(arg);
|
||||
}
|
||||
|
||||
if (!section) {
|
||||
throw new Error("Missing required --section <breaking|changes|fixes>.");
|
||||
}
|
||||
const entry = entryParts.join(" ").trim();
|
||||
if (!entry) {
|
||||
throw new Error("Missing changelog entry text.");
|
||||
}
|
||||
|
||||
return {
|
||||
changelogPath,
|
||||
section: section === "breaking" ? "Breaking" : section === "changes" ? "Changes" : "Fixes",
|
||||
entry,
|
||||
};
|
||||
}
|
||||
|
||||
if (import.meta.main) {
|
||||
const { changelogPath, section, entry } = parseArgs(process.argv.slice(2));
|
||||
const content = readFileSync(changelogPath, "utf8");
|
||||
const next = appendUnreleasedChangelogEntry(content, {
|
||||
section,
|
||||
entry,
|
||||
});
|
||||
if (next !== content) {
|
||||
writeFileSync(changelogPath, next);
|
||||
}
|
||||
console.log(`Updated ${changelogPath} (${section}).`);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue