feat(bundles): add editorial bundle plugins

This commit is contained in:
sickn33
2026-03-27 08:48:03 +01:00
parent 8eff08b706
commit dffac91d3b
1052 changed files with 212282 additions and 68 deletions

View File

@@ -5,7 +5,9 @@ const { findProjectRoot } = require("../../lib/project-root");
const projectRoot = findProjectRoot(__dirname);
const marketplacePath = path.join(projectRoot, ".agents", "plugins", "marketplace.json");
const editorialBundlesPath = path.join(projectRoot, "data", "editorial-bundles.json");
const marketplace = JSON.parse(fs.readFileSync(marketplacePath, "utf8"));
const editorialBundles = JSON.parse(fs.readFileSync(editorialBundlesPath, "utf8")).bundles || [];
assert.strictEqual(
marketplace.name,
@@ -19,6 +21,11 @@ assert.strictEqual(
);
assert.ok(Array.isArray(marketplace.plugins), "marketplace.json must define a plugins array");
assert.ok(marketplace.plugins.length > 0, "marketplace.json must contain at least one plugin");
assert.strictEqual(
marketplace.plugins[0]?.name,
"antigravity-awesome-skills",
"full library Codex plugin should remain the first marketplace entry",
);
const pluginEntry = marketplace.plugins.find((plugin) => plugin.name === "antigravity-awesome-skills");
assert.ok(pluginEntry, "marketplace.json must include the antigravity-awesome-skills plugin entry");
@@ -58,4 +65,23 @@ const pluginSkillsPath = path.join(pluginRoot, "skills");
assert.ok(fs.existsSync(pluginSkillsPath), "Codex plugin skills path must exist");
assert.ok(fs.statSync(pluginSkillsPath).isDirectory(), "Codex plugin skills path must be a directory");
for (const bundle of editorialBundles) {
const bundlePluginName = `antigravity-bundle-${bundle.id}`;
const bundleEntry = marketplace.plugins.find((plugin) => plugin.name === bundlePluginName);
assert.ok(bundleEntry, `marketplace.json must include bundle plugin ${bundlePluginName}`);
assert.deepStrictEqual(
bundleEntry.source,
{
source: "local",
path: `./plugins/${bundlePluginName}`,
},
`bundle plugin ${bundlePluginName} should resolve to the expected repo-local directory`,
);
assert.strictEqual(
bundleEntry.category,
bundle.group.replace(/^[^A-Za-z0-9]+/, "").trim(),
`bundle plugin ${bundlePluginName} should derive its category from the bundle group`,
);
}
console.log("ok");