mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-02 10:44:52 +01:00
Initialize the operational skill for legacy continuation fixtures, verify task attachment bytes, allow Claude’s optional custom-answer field, and distinguish unstarted dependency-blocked wakes from failed provider executions. Co-Authored-By: Paperclip <noreply@paperclip.ing>
14 lines
915 B
TypeScript
14 lines
915 B
TypeScript
import { expect, it, vi } from "vitest";
|
|
import type { RunnerApi } from "./api.js";
|
|
import { prepareLegacyContinuationSkill } from "./continuation-fixtures.js";
|
|
it("initializes the production library and assigns the operational skill before execution", async () => {
|
|
const post = vi.fn();
|
|
const get = vi.fn(async () => [{ key: "paperclipai/paperclip/paperclip" }]);
|
|
await prepareLegacyContinuationSkill({ get, post } as unknown as RunnerApi, "company", "agent");
|
|
expect(get).toHaveBeenCalledWith("/api/companies/company/skills");
|
|
expect(post).toHaveBeenCalledWith("/api/agents/agent/skills/sync?companyId=company", { desiredSkills: ["paperclipai/paperclip/paperclip"], mode: "add" });
|
|
get.mockResolvedValue([]);
|
|
await expect(prepareLegacyContinuationSkill({ get, post } as unknown as RunnerApi, "company", "agent")).rejects.toThrow("missing the bundled");
|
|
expect(post).toHaveBeenCalledTimes(1);
|
|
});
|