forked from EduCraft/curriculum-project-hub
feat: add curated curriculum agent skills
This commit is contained in:
@@ -62,6 +62,9 @@ describe("real Claude SDK sandbox boundary", () => {
|
||||
writeFile(join(sibling, "secret.txt"), "sibling-secret\n"),
|
||||
writeFile(serviceSecret, "platform-secret\n"),
|
||||
]);
|
||||
const untrustedSkill = join(workspace, ".claude", "skills", "untrusted");
|
||||
await mkdir(untrustedSkill, { recursive: true });
|
||||
await writeFile(join(untrustedSkill, "SKILL.md"), "---\nname: untrusted\ndescription: must never load\n---\n");
|
||||
// macOS tmpdir is reached through /var -> /private/var. Exercise the
|
||||
// sandbox with canonical paths, matching the canonical cwd returned by
|
||||
// createAgentSecurityPolicy rather than relying on a host symlink alias.
|
||||
@@ -146,6 +149,11 @@ describe("real Claude SDK sandbox boundary", () => {
|
||||
[result.error, sdkStderr.join(""), JSON.stringify(streamEvents)].filter(Boolean).join("\n"),
|
||||
).toBe("completed");
|
||||
expect(stub.requestCount()).toBeGreaterThanOrEqual(3);
|
||||
expect(new Set(result.initializedSkillIds)).toEqual(new Set([
|
||||
"cph-curated:outline",
|
||||
"cph-curated:lesson-project",
|
||||
"cph-curated:data-processing-spec",
|
||||
]));
|
||||
const toolResults = streamEvents.filter((event) => event.type === "tool-result");
|
||||
expect(toolResults).toHaveLength(2);
|
||||
const rejectedOptOut = toolResults[0];
|
||||
|
||||
Reference in New Issue
Block a user