feat(coding): add model tools and device packages

This commit is contained in:
2026-09-02 18:35:26 +08:00
parent 841273b433
commit 664b8823a0
60 changed files with 3847 additions and 2068 deletions

View File

@@ -21,7 +21,6 @@ import {
const PACKAGE_ROOT = path.resolve('resources/coding-plugins/data-service');
const GAME_RESOURCE_ROOT = path.resolve('resources/coding-plugins/game-resource');
const WEB_SEARCH_ROOT = path.resolve('resources/coding-plugins/web-search');
async function packageManifests(): Promise<{ root: Record<string, unknown>; capability: Record<string, unknown> }> {
return {
@@ -34,13 +33,12 @@ describe('bundled coding plugin manifests', () => {
it('loads the fixed Data Service package and immutable declarations', async () => {
const definitions = await loadBundledCodingPluginDefinitions(path.resolve('resources/coding-plugins'));
const startupDefinitions = loadBundledCodingPluginDefinitionsSync(path.resolve('resources/coding-plugins'));
expect(BUNDLED_CODING_PLUGIN_ROOTS).toEqual(['data-service', 'game-resource', 'web-search']);
expect(BUNDLED_CODING_PLUGIN_ROOTS).toEqual(['data-service', 'game-resource']);
expect(resolveBundledCodingPluginRootPaths(path.resolve('resources/coding-plugins'))).toEqual([
PACKAGE_ROOT,
GAME_RESOURCE_ROOT,
WEB_SEARCH_ROOT,
]);
expect(definitions).toHaveLength(3);
expect(definitions).toHaveLength(2);
expect(definitions[0]).toMatchObject({
id: 'makelore.data-service',
adapterId: 'data-service',
@@ -56,12 +54,6 @@ describe('bundled coding plugin manifests', () => {
provenance: { source: 'bundled', packageRoot: 'game-resource' },
skills: [{ id: 'game-resource', entryPath: 'skills/game-resource/SKILL.md' }],
},
{
id: 'makelore.web-search', version: '1.0.0', runtimeKind: 'platform_hosted',
acquisitionMode: 'user_acquired', releaseId: '00000000-0000-4000-8000-000000000204',
provenance: { source: 'bundled', packageRoot: 'web-search' },
skills: [{ id: 'makelore-web-search', entryPath: 'skills/makelore-web-search/SKILL.md' }],
},
]);
expect(startupDefinitions).toEqual(definitions);
expect(Object.isFrozen(startupDefinitions)).toBe(true);
@@ -136,7 +128,6 @@ describe('bundled coding plugin manifests', () => {
expect(resolveBundledCodingPluginRootPaths(path.resolve('tmp'))).toEqual([
path.resolve('tmp/data-service'),
path.resolve('tmp/game-resource'),
path.resolve('tmp/web-search'),
]);
});