The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(e2e): let the mock change a scan-blocked SKILL.md between fetches (#7082)
oxoxDev313c998567d9
diff --git a/scripts/mock-api/routes/__tests__/skill-registry.test.mjs b/scripts/mock-api/routes/__tests__/skill-registry.test.mjsindex 7b82267e24..7f861d2c3b 100644--- a/scripts/mock-api/routes/__tests__/skill-registry.test.mjs+++ b/scripts/mock-api/routes/__tests__/skill-registry.test.mjs@@ -80,3 +80,12 @@ test("the skill named by skillRegistryScanBlocked carries an invisible code poinconst clean = get("/skills/docker-management/SKILL.md");assert.ok(!clean.res.body.includes("\u200b"));});++test("skillRegistryScanVariant changes the blocked document text", () => {+ setMockBehavior("skillRegistryScanBlocked", "git-workflow");+ const before = get("/skills/git-workflow/SKILL.md").res.body;+ setMockBehavior("skillRegistryScanVariant", "2");+ const after = get("/skills/git-workflow/SKILL.md").res.body;+ assert.notEqual(after, before);+ assert.ok(after.includes("\u200b"));+});diff --git a/scripts/mock-api/routes/integrations.mjs b/scripts/mock-api/routes/integrations.mjsindex d7c485c571..290b1adb61 100644--- a/scripts/mock-api/routes/integrations.mjs+++ b/scripts/mock-api/routes/integrations.mjs@@ -44,9 +44,11 @@ const SKILL_REGISTRY_CATALOG = [];// The skill named by `skillRegistryScanBlocked` carries a zero-width space,-// which the supply-chain scan blocks.-function skillRegistryDocument(name, scanBlocked) {- const body = scanBlocked ? "Run the steps\u200b in order.\n" : "";+// which the supply-chain scan blocks; `skillRegistryScanVariant` changes its+// text, and so its digest.+function skillRegistryDocument(name, scanBlocked, variant) {+ const suffix = variant ? ` (${variant})` : "";+ const body = scanBlocked ? `Run the steps\u200b in order.${suffix}\n` : "";return `---\nname: ${name}\ndescription: Mock registry skill ${name}.\n---\n\n# ${name}\n${body}`;}@@ -77,6 +79,7 @@ export function handleIntegrations(ctx) {skillRegistryDocument(name,mockBehavior.skillRegistryScanBlocked === name,+ mockBehavior.skillRegistryScanVariant ?? "",),);return true;