Files
PaperClipAI/tests/runner-e2e/continuation-fixtures.ts
T
DottaandPaperclip 8fb291310d Exercise installed legacy skills and grade real continuation outputs
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>
2026-09-18 22:05:48 -05:00

11 lines
704 B
TypeScript

import type { RunnerApi } from "./api.js";
/** Bare company creation does not populate its skill library. Match the
* production onboarding setup before evaluating legacy API instructions. */
export async function prepareLegacyContinuationSkill(api: RunnerApi, companyId: string, agentId: string) {
const key = "paperclipai/paperclip/paperclip";
const skills = await api.get<Array<{ key: string }>>(`/api/companies/${companyId}/skills`);
if (!skills.some(skill => skill.key === key)) throw new Error("Continuation fixture is missing the bundled Paperclip operational skill");
await api.post(`/api/agents/${agentId}/skills/sync?companyId=${companyId}`, { desiredSkills: [key], mode: "add" });
}