fix(plugins): load official hosted plugins from bundled resources

This commit is contained in:
2026-09-01 18:20:24 +08:00
parent 52e2a97a12
commit 1530ac7740
23 changed files with 835 additions and 48 deletions

View File

@@ -101,6 +101,28 @@ export const DATA_SERVICE_ADAPTER_ID = 'data-service' as const;
export const DATA_SERVICE_PROJECT_SETTINGS_SURFACE = 'data-service' as const;
export const DATA_SERVICE_PREVIEW_RUNTIME_SURFACE = 'data-service-v1' as const;
export const GAME_RESOURCE_PLUGIN_ID = 'makelore.game-resource' as const;
export const GAME_RESOURCE_BUNDLED_RELEASE_ID = '00000000-0000-4000-8000-000000000105' as const;
export const WEB_SEARCH_PLUGIN_ID = 'makelore.web-search' as const;
export const WEB_SEARCH_BUNDLED_RELEASE_ID = '00000000-0000-4000-8000-000000000204' as const;
export const CODE_OWNED_OPTIONAL_BUNDLED_RELEASES = Object.freeze({
[GAME_RESOURCE_PLUGIN_ID]: Object.freeze({
releaseId: GAME_RESOURCE_BUNDLED_RELEASE_ID,
version: '1.0.0',
channel: 'stable' as const,
}),
[WEB_SEARCH_PLUGIN_ID]: Object.freeze({
releaseId: WEB_SEARCH_BUNDLED_RELEASE_ID,
version: '1.0.0',
channel: 'stable' as const,
}),
});
export function isCodeOwnedOptionalBundledPluginId(pluginId: string): boolean {
return Object.prototype.hasOwnProperty.call(CODE_OWNED_OPTIONAL_BUNDLED_RELEASES, pluginId);
}
export const DATA_SERVICE_CAPABILITY_IDS = Object.freeze([
'data-service.control',
'data-service.documents',