Fix runtime skill injection across adapters
This commit is contained in:
@@ -39,7 +39,8 @@ describe("codex local skill sync", () => {
|
||||
|
||||
const before = await listCodexSkills(ctx);
|
||||
expect(before.mode).toBe("persistent");
|
||||
expect(before.desiredSkills).toEqual(["paperclip"]);
|
||||
expect(before.desiredSkills).toContain("paperclip");
|
||||
expect(before.entries.find((entry) => entry.name === "paperclip")?.required).toBe(true);
|
||||
expect(before.entries.find((entry) => entry.name === "paperclip")?.state).toBe("missing");
|
||||
|
||||
const after = await syncCodexSkills(ctx, ["paperclip"]);
|
||||
@@ -47,7 +48,7 @@ describe("codex local skill sync", () => {
|
||||
expect((await fs.lstat(path.join(codexHome, "skills", "paperclip"))).isSymbolicLink()).toBe(true);
|
||||
});
|
||||
|
||||
it("removes stale managed Paperclip skills when the desired set is emptied", async () => {
|
||||
it("keeps required bundled Paperclip skills installed even when the desired set is emptied", async () => {
|
||||
const codexHome = await makeTempDir("paperclip-codex-skill-prune-");
|
||||
cleanupDirs.add(codexHome);
|
||||
|
||||
@@ -80,8 +81,8 @@ describe("codex local skill sync", () => {
|
||||
} as const;
|
||||
|
||||
const after = await syncCodexSkills(clearedCtx, []);
|
||||
expect(after.desiredSkills).toEqual([]);
|
||||
expect(after.entries.find((entry) => entry.name === "paperclip")?.state).toBe("available");
|
||||
await expect(fs.lstat(path.join(codexHome, "skills", "paperclip"))).rejects.toThrow();
|
||||
expect(after.desiredSkills).toContain("paperclip");
|
||||
expect(after.entries.find((entry) => entry.name === "paperclip")?.state).toBe("installed");
|
||||
expect((await fs.lstat(path.join(codexHome, "skills", "paperclip"))).isSymbolicLink()).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user