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

@@ -218,17 +218,17 @@ describe('PI-105 product Host composition', () => {
}));
});
it('offers an enabled Web Search Skill before its first Agent assignment', async () => {
it('offers an enabled Game Resource Skill before its first Agent assignment', async () => {
const root = await configuredProject(['agent-browser']);
const tools = new PiProductTools({
browser: {} as AgentBrowserModule,
attachments: new CodingAttachmentStore(path.join(root, 'attachments')),
bundledSkillsDir: path.resolve('resources/coding-skills'),
pluginSkillSources: [{
id: 'makelore-web-search',
pluginId: 'makelore.web-search',
id: 'game-resource',
pluginId: 'makelore.game-resource',
directory: path.resolve(
'resources/coding-plugins/web-search/skills/makelore-web-search',
'resources/coding-plugins/game-resource/skills/game-resource',
),
}],
});
@@ -242,7 +242,7 @@ describe('PI-105 product Host composition', () => {
toolDefinitions: [],
runtimePolicies: [],
unavailableReasons: [{
pluginId: 'makelore.web-search',
pluginId: 'makelore.game-resource',
code: 'skill_unassigned' as const,
message: 'Plugin Skill is not assigned',
}],
@@ -256,15 +256,15 @@ describe('PI-105 product Host composition', () => {
projects: projectService(root),
productTools: tools,
effectiveResolver,
getEnabledPluginIds: async () => ['makelore.web-search'],
getEnabledPluginIds: async () => ['makelore.game-resource'],
});
await expect(host.listSkills()).resolves.toContainEqual(expect.objectContaining({
id: 'makelore-web-search', selected: false, available: true, effective: false,
id: 'game-resource', selected: false, available: true, effective: false,
}));
expect(effectiveResolver.resolve).not.toHaveBeenCalled();
await expect(host.listSkills('builder')).resolves.not.toContainEqual(
expect.objectContaining({ id: 'makelore-web-search', available: true }),
expect.objectContaining({ id: 'game-resource', available: true }),
);
});