feat: integrate marketplace plugins with coding runtime
This commit is contained in:
1 parent
1d64b89499
commit
05917a789a
21 files changed
+1921
-29
No files matched your search
@@ -19,6 +19,7 @@ import {
|
||||
createCodingProjectMetadata,
|
||||
} from '../../electron/coding-projects/project-config';
|
||||
import { PiProductTools } from '../../electron/coding-runtime/pi/product-tools';
|
||||
import { DATA_SERVICE_PLUGIN_DEFINITION } from '../../shared/coding-plugins';
|
||||
|
||||
const roots: string[] = [];
|
||||
const conversationId = '11111111-1111-4111-8111-111111111111';
|
||||
@@ -179,6 +180,43 @@ describe('PI-105 product Host composition', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('keeps a resolver-disabled assignment visible without passing it to worker resources', async () => {
|
||||
const root = await configuredProject(['data-service']);
|
||||
const tools = productTools(root, true);
|
||||
const effectiveResolver = {
|
||||
resolve: vi.fn(async () => ({
|
||||
accountSessionId: 'account-a\u00001',
|
||||
projectId: 'project-a',
|
||||
pluginReleaseIds: [],
|
||||
effectiveSkillIds: [],
|
||||
skillEntries: [],
|
||||
toolDefinitions: [],
|
||||
runtimePolicies: [],
|
||||
unavailableReasons: [{
|
||||
pluginId: DATA_SERVICE_PLUGIN_DEFINITION.id,
|
||||
code: 'project_disabled' as const,
|
||||
message: 'Plugin is not enabled for this project',
|
||||
}],
|
||||
})),
|
||||
getSkillSources: vi.fn(async () => []),
|
||||
getPolicyState: vi.fn(() => ({
|
||||
status: 'current' as const, catalog: null, revision: 1, lastVerifiedAt: 1,
|
||||
})),
|
||||
};
|
||||
const host = createCodingProductHost({
|
||||
projects: projectService(root),
|
||||
productTools: tools,
|
||||
effectiveResolver,
|
||||
});
|
||||
|
||||
await expect(host.listSkills('builder')).resolves.toContainEqual(expect.objectContaining({
|
||||
id: 'data-service', selected: true, available: false, effective: false,
|
||||
}));
|
||||
expect(effectiveResolver.resolve).toHaveBeenCalledWith(expect.objectContaining({
|
||||
assignedSkillIds: ['data-service'], role: 'parent',
|
||||
}));
|
||||
});
|
||||
|
||||
it('reads exact-run changes from the same PiProductTools tracker instance', async () => {
|
||||
const root = await configuredProject();
|
||||
await writeFile(path.join(root, 'notes.txt'), 'baseline\n', 'utf8');
|
||||
|
||||
Reference in new issue
Block a user