@@ -39,6 +39,7 @@ public class PluginLifecycleService {
3939 private final PluginSandboxService sandboxService ;
4040 private final PluginPerformanceMetrics performanceMetrics ;
4141 private final McpServerRegistry mcpServerRegistry ;
42+ private final SkillsBundleRegistry skillsBundleRegistry ;
4243
4344 public PluginLifecycleService (
4445 PluginRepository pluginRepository ,
@@ -50,7 +51,8 @@ public PluginLifecycleService(
5051 PluginDependencyResolver dependencyResolver ,
5152 PluginSandboxService sandboxService ,
5253 PluginPerformanceMetrics performanceMetrics ,
53- McpServerRegistry mcpServerRegistry
54+ McpServerRegistry mcpServerRegistry ,
55+ SkillsBundleRegistry skillsBundleRegistry
5456 ) {
5557 this .pluginRepository = pluginRepository ;
5658 this .validator = validator ;
@@ -62,6 +64,7 @@ public PluginLifecycleService(
6264 this .sandboxService = sandboxService ;
6365 this .performanceMetrics = performanceMetrics ;
6466 this .mcpServerRegistry = mcpServerRegistry ;
67+ this .skillsBundleRegistry = skillsBundleRegistry ;
6568 }
6669
6770 @ Transactional
@@ -90,14 +93,14 @@ private Plugin doInstall(Map<String, Object> rawManifest) {
9093 plugin .setStatus (Plugin .PluginStatus .installed );
9194 plugin .setManifest (rawManifest );
9295 plugin .setStorageTier (
93- manifest .type () == Plugin . PluginType . mcp
96+ isDeclarative ( manifest .type ())
9497 ? Plugin .StorageTier .system
9598 : Plugin .StorageTier .staging
9699 );
97100 plugin .setLoaderState (Plugin .LoaderState .UNLOADED );
98101 plugin .setTrustTier (detectTrustTier (rawManifest ));
99- plugin .setSandboxEnabled (manifest .type () != Plugin . PluginType . mcp );
100- if (manifest .type () == Plugin . PluginType . mcp ) {
102+ plugin .setSandboxEnabled (! isDeclarative ( manifest .type ()) );
103+ if (isDeclarative ( manifest .type ()) ) {
101104 plugin .setScanClean (true );
102105 }
103106
@@ -142,6 +145,11 @@ private Plugin doInstall(Map<String, Object> rawManifest) {
142145
143146 if (manifest .type () == Plugin .PluginType .mcp ) {
144147 mcpServerRegistry .register (manifest );
148+ } else if (
149+ manifest .type () == Plugin .PluginType .skill ||
150+ manifest .type () == Plugin .PluginType .skill_bundle
151+ ) {
152+ skillsBundleRegistry .register (manifest );
145153 }
146154
147155 logService .log (
@@ -233,6 +241,12 @@ public void uninstall(String id) {
233241 Plugin plugin = pluginRepository .findById (id ).orElse (null );
234242 if (plugin != null && plugin .getType () == Plugin .PluginType .mcp ) {
235243 mcpServerRegistry .unregister (id );
244+ } else if (
245+ plugin != null &&
246+ (plugin .getType () == Plugin .PluginType .skill ||
247+ plugin .getType () == Plugin .PluginType .skill_bundle )
248+ ) {
249+ skillsBundleRegistry .unregister (id );
236250 }
237251
238252 storageService .deleteJar (id + ".jar" );
@@ -264,6 +278,12 @@ private Plugin.TrustTier detectTrustTier(Map<String, Object> rawManifest) {
264278 return Plugin .TrustTier .COMMUNITY ;
265279 }
266280
281+ private boolean isDeclarative (Plugin .PluginType type ) {
282+ return type == Plugin .PluginType .mcp ||
283+ type == Plugin .PluginType .skill ||
284+ type == Plugin .PluginType .skill_bundle ;
285+ }
286+
267287 @ Transactional (readOnly = true )
268288 @ Cacheable (value = "plugin-metadata" , key = "'installed-plugins'" )
269289 public List <Plugin > findAll () {
0 commit comments