feat(web-search): wire hosted plugin composition

This commit is contained in:
brother7 committed 2026-09-01 02:41:59 +08:00
1 parent 68cb2e73be
commit 60e6a8eeb3
9 files changed
+361 -6

No files matched your search

+11 -1
View File
@@ -29,6 +29,8 @@ const MARKETPLACE_ARTIFACT_TEXT = [
'makelore-plugin-release.v1', 'skill_only', 'platform_hosted',
'plugin_signature_invalid', 'signing key is not trusted',
'makelore.game-resource', '/api/plugins/v1/hosted/game-resource/generations',
'makelore.web-search', '/api/plugins/v1/hosted/web-search/searches',
'plugin_receipt_unavailable', 'receipt_unavailable',
'/api/coding/plugin-marketplace',
'plugin-marketplace\\/install\\/', 'plugin-marketplace\\/update\\/',
'effectiveSkillIds', 'pluginReleaseIds',
@@ -215,6 +217,7 @@ describe('final Pi product artifact verification', () => {
schema2SkillOnly: true,
schema2PlatformHosted: true,
legacyMeowaClientAuthorityAbsent: true,
webSearchProviderAuthorityAbsent: true,
productionTrust: 'official-key-absent-fail-closed',
libraryInstallAndEffectiveRoutes: true,
rendererAssets: true,
@@ -238,7 +241,12 @@ describe('final Pi product artifact verification', () => {
expect(() => verifyMarketplaceClientArtifact(
Buffer.from(`${MARKETPLACE_ARTIFACT_TEXT}\nMEOWA_API_KEY`),
`${emptyTrust}\nmakelore.plugin-trust.code-owned.v1`,
)).toThrow('legacy Meowa client authority');
)).toThrow('provider authority');
expect(() => verifyMarketplaceClientArtifact(
Buffer.from(`${MARKETPLACE_ARTIFACT_TEXT}\nWEB_SEARCH_OPENAI_API_KEY`),
`${emptyTrust}\nmakelore.plugin-trust.code-owned.v1`,
)).toThrow('provider authority');
});
it('proves Marketplace trust from the packaged app.asar rather than checkout source', async () => {
@@ -320,6 +328,8 @@ describe('final Pi product artifact verification', () => {
await writeFile(path.join(source, 'dist', 'assets', 'plugin-marketplace.js'), [
'makelore-plugin-release.v1 skill_only platform_hosted plugin_signature_invalid signing key is not trusted',
'makelore.game-resource /api/plugins/v1/hosted/game-resource/generations',
'makelore.web-search /api/plugins/v1/hosted/web-search/searches',
'plugin_receipt_unavailable receipt_unavailable',
'/api/coding/plugin-marketplace plugin-marketplace\\/install\\/ plugin-marketplace\\/update\\/',
'effectiveSkillIds pluginReleaseIds',
'/api/coding/plugin-marketplace/catalog /api/coding/plugin-marketplace/library 免费获取 我的插件',