feat: 完善两阶段 Agent 自进化 Pipeline、Skills 与 Benchmark (#129)

This commit is contained in:
Jingzhe Xu
2026-07-30 15:59:58 +08:00
committed by GitHub
parent 3bd0a7208a
commit 081fe2d172
34 changed files with 2093 additions and 763 deletions
@@ -45,6 +45,9 @@ describe("workspace-files-service", () => {
const file = await svc.read(ws, "sub/c.md");
expect(file.data.toString()).toBe("# md");
expect(file.contentType).toContain("markdown");
const preview = await svc.read(ws, "sub/c.md", { maxBytes: 2 });
expect(preview.data.toString()).toBe("# ");
expect(preview.truncated).toBe(true);
await expect(svc.read(ws, "sub")).rejects.toMatchObject({ status: 400 });
await expect(svc.read(ws, "nope.txt")).rejects.toMatchObject({ status: 404 });
});
@@ -86,6 +89,8 @@ describe("workspace-files-service", () => {
it("symlink escape: reads and writes are both rejected when the link points outside the Workspace", async () => {
await fs.symlink(outside, path.join(ws, "link-out"));
const root = await svc.list(ws, "");
expect(root.entries.map((entry) => entry.name)).not.toContain("link-out");
await expect(svc.list(ws, "link-out")).rejects.toMatchObject({ status: 400 });
await expect(svc.read(ws, "link-out/secret.txt")).rejects.toMatchObject({ status: 400 });
// Writing outside via a directory symlink: caught by the parent-directory realpath check.