feat(plugins): merge Skill management into plugins
This commit is contained in:
1 parent
bb8a19eecf
commit
ab9f889233
49 files changed
+461
-1218
No files matched your search
@@ -93,7 +93,6 @@ async function bundledResourceFixture({ schemaVersion = 1, includeSdkAssets = tr
|
||||
};
|
||||
await mkdir(path.join(pluginRoot, 'com.makelore'), { recursive: true });
|
||||
await mkdir(path.join(pluginRoot, 'skills', 'example'), { recursive: true });
|
||||
await mkdir(path.join(sourceResources, 'coding-skills', 'agent-browser'), { recursive: true });
|
||||
await writeFile(path.join(pluginRoot, 'plugin.json'), JSON.stringify({
|
||||
name: 'example.plugin',
|
||||
version: '1.0.0',
|
||||
@@ -106,7 +105,6 @@ async function bundledResourceFixture({ schemaVersion = 1, includeSdkAssets = tr
|
||||
await writeFile(path.join(pluginRoot, 'skills', 'example', 'assets', 'sdk.ts'), 'export {};\n');
|
||||
await writeFile(path.join(pluginRoot, 'skills', 'example', 'assets', 'sdk.js'), 'export {};\n');
|
||||
}
|
||||
await writeFile(path.join(sourceResources, 'coding-skills', 'agent-browser', 'SKILL.md'), '# Browser\n');
|
||||
const resourcesDirectory = path.join(root, 'packaged');
|
||||
await cp(sourceResources, path.join(resourcesDirectory, 'resources'), { recursive: true });
|
||||
return {
|
||||
@@ -192,7 +190,7 @@ describe('final Pi product artifact verification', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('proves bundled plugin manifests, Skills, SDK assets, catalog, and core resources', async () => {
|
||||
it('proves bundled plugin manifests, Skills, SDK assets, and the absence of standalone Skill resources', async () => {
|
||||
const fixture = await bundledResourceFixture();
|
||||
await expect(verifyBundledCodingPluginResources(fixture)).resolves.toMatchObject({
|
||||
root: 'resources/coding-plugins',
|
||||
@@ -209,11 +207,27 @@ describe('final Pi product artifact verification', () => {
|
||||
tools: ['example_read'],
|
||||
}],
|
||||
catalog: { adapters: ['example-adapter'], tools: ['example_read'], packagedInAsar: true },
|
||||
coreResources: { root: 'resources/coding-skills', skills: ['agent-browser'] },
|
||||
coreResources: { root: null, files: [], skills: [] },
|
||||
result: 'pass',
|
||||
});
|
||||
});
|
||||
|
||||
it('rejects any source or packaged standalone Skill directory', async () => {
|
||||
const sourceFixture = await bundledResourceFixture();
|
||||
await mkdir(path.join(sourceFixture.projectRoot, 'resources', 'coding-skills', 'legacy'), {
|
||||
recursive: true,
|
||||
});
|
||||
await expect(verifyBundledCodingPluginResources(sourceFixture))
|
||||
.rejects.toThrow('Standalone coding Skill resources must not be bundled');
|
||||
|
||||
const packagedFixture = await bundledResourceFixture();
|
||||
await mkdir(path.join(packagedFixture.resourcesDirectory, 'resources', 'coding-skills'), {
|
||||
recursive: true,
|
||||
});
|
||||
await expect(verifyBundledCodingPluginResources(packagedFixture))
|
||||
.rejects.toThrow('Standalone coding Skill resources must not be bundled');
|
||||
});
|
||||
|
||||
it('accepts schema-2 hosted plugins whose implementation has no client SDK assets', async () => {
|
||||
const fixture = await bundledResourceFixture({ schemaVersion: 2, includeSdkAssets: false });
|
||||
await expect(verifyBundledCodingPluginResources(fixture)).resolves.toMatchObject({
|
||||
|
||||
Reference in new issue
Block a user