feat(core,tooling): Windows support — shell selection, install.ps1, win-x64 release package, Windows CI (#79)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Yaowei Zheng
2026-07-27 22:17:35 +08:00
committed by GitHub
parent c23f0bc2f0
commit c369e089a7
46 changed files with 1315 additions and 217 deletions
+13 -9
View File
@@ -514,15 +514,19 @@ describe("edit_file — review follow-ups", () => {
describe("write_file — review follow-ups", () => {
const tool = () => createWriteFileTool(def(WRITE_FILE_NAME, "rw"));
it("preserves the permission bits of an overwritten file (atomic rename)", async () => {
const file = path.join(tmp, "mode.txt");
await writeFile(file, "old");
await chmod(file, 0o600);
const { result } = await run(tool(), { file_path: "mode.txt", content: "new" }, tmp);
expect(result?.stopReason).toBeUndefined();
expect((await stat(file)).mode & 0o777).toBe(0o600);
expect(await readFile(file, "utf8")).toBe("new");
});
// POSIX-only: Windows has no owner-only mode bits to preserve (chmod maps to the read-only attribute).
it.skipIf(process.platform === "win32")(
"preserves the permission bits of an overwritten file (atomic rename)",
async () => {
const file = path.join(tmp, "mode.txt");
await writeFile(file, "old");
await chmod(file, 0o600);
const { result } = await run(tool(), { file_path: "mode.txt", content: "new" }, tmp);
expect(result?.stopReason).toBeUndefined();
expect((await stat(file)).mode & 0o777).toBe(0o600);
expect(await readFile(file, "utf8")).toBe("new");
},
);
it("writes atomically: no temp files are left behind", async () => {
await run(tool(), { file_path: "fresh.txt", content: "x" }, tmp);