Skip to content

🎧 Your Personal Streaming Service

refactor(plugins): remove non-functional experimental manifest option (#5821)

Deluan Quintãobf79d2f3a2a8
diff --git a/plugins/README.md b/plugins/README.md
index b9118d36f..08ab967f3 100644
--- a/plugins/README.md
+++ b/plugins/README.md
@@ -136,7 +136,7 @@ Every plugin must include a `manifest.json` file. Example:
**Required fields:** `name`, `author`, `version`
-**Optional fields:** `description`, `website`, `config`, `permissions`, `experimental`
+**Optional fields:** `description`, `website`, `config`, `permissions`
#### Config Definition
@@ -160,24 +160,6 @@ The `config` field defines the plugin's configuration schema using [JSON Schema
}
```
-#### Experimental Features
-
-Plugins can opt-in to experimental WebAssembly features that may change or be removed in future versions. Currently supported:
-
-- **`threads`** – Enables WebAssembly threads support (for plugins compiled with multi-threading)
-
-```json
-{
- "experimental": {
- "threads": {
- "reason": "Required for concurrent audio processing"
- }
- }
-}
-```
-
-> **Note:** Experimental features may have compatibility or performance implications. Use only when necessary.
-
---
## Capabilities
diff --git a/plugins/manager_loader.go b/plugins/manager_loader.go
index 675c85e26..0ba5fcf76 100644
--- a/plugins/manager_loader.go
+++ b/plugins/manager_loader.go
@@ -13,8 +13,6 @@ import (
"github.com/navidrome/navidrome/plugins/host"
"github.com/navidrome/navidrome/scheduler"
"github.com/tetratelabs/wazero"
- "github.com/tetratelabs/wazero/api"
- "github.com/tetratelabs/wazero/experimental"
"golang.org/x/sync/errgroup"
)
@@ -377,12 +375,6 @@ func (m *Manager) loadPluginWithConfig(p *model.Plugin) error {
WithCompilationCache(m.cache).
WithCloseOnContextDone(true)
- // Enable experimental threads if requested in manifest
- if pkg.Manifest.HasExperimentalThreads() {
- runtimeConfig = runtimeConfig.WithCoreFeatures(api.CoreFeaturesV2 | experimental.CoreFeaturesThreads)
- log.Debug(ctx, "Enabling experimental threads support")
- }
-
extismConfig := extism.PluginConfig{
EnableWasi: true,
RuntimeConfig: runtimeConfig,
diff --git a/plugins/manifest-schema.json b/plugins/manifest-schema.json
index 29e5d1fc7..28adeed79 100644
--- a/plugins/manifest-schema.json
+++ b/plugins/manifest-schema.json
@@ -34,9 +34,6 @@
"permissions": {
"$ref": "#/$defs/Permissions"
},
- "experimental": {
- "$ref": "#/$defs/Experimental"
- },
"config": {
"$ref": "#/$defs/ConfigDefinition"
}
@@ -58,27 +55,6 @@
}
}
},
- "Experimental": {
- "type": "object",
- "description": "Experimental features that may change or be removed in future versions",
- "additionalProperties": false,
- "properties": {
- "threads": {
- "$ref": "#/$defs/ThreadsFeature"
- }
- }
- },
- "ThreadsFeature": {
- "type": "object",
- "description": "Enable experimental WebAssembly threads support",
- "additionalProperties": false,
- "properties": {
- "reason": {
- "type": "string",
- "description": "Explanation for why threads support is needed"
- }
- }
- },
"Permissions": {
"type": "object",
"description": "Permissions required by the plugin",
diff --git a/plugins/manifest.go b/plugins/manifest.go
index 6bd0e8049..5e144b5c8 100644
--- a/plugins/manifest.go
+++ b/plugins/manifest.go
@@ -117,11 +117,6 @@ func ValidateWithCapabilities(m *Manifest, capabilities []Capability) error {
return nil
}
-// HasExperimentalThreads returns true if the manifest requests experimental threads support.
-func (m *Manifest) HasExperimentalThreads() bool {
- return m.Experimental != nil && m.Experimental.Threads != nil
-}
-
// HasLibraryFilesystemPermission checks if the manifest grants filesystem permission for libraries.
func (m *Manifest) HasLibraryFilesystemPermission() bool {
return m.Permissions != nil &&
diff --git a/plugins/manifest_gen.go b/plugins/manifest_gen.go
index 3599eafc4..c2aa5e298 100644
--- a/plugins/manifest_gen.go
+++ b/plugins/manifest_gen.go
@@ -45,12 +45,6 @@ func (j *ConfigDefinition) UnmarshalJSON(value []byte) error {
return nil
}
-// Experimental features that may change or be removed in future versions
-type Experimental struct {
- // Threads corresponds to the JSON schema field "threads".
- Threads *ThreadsFeature `json:"threads,omitempty" yaml:"threads,omitempty" mapstructure:"threads,omitempty"`
-}
-
// HTTP access permissions for a plugin
type HTTPPermission struct {
// Explanation for why HTTP access is needed
@@ -109,9 +103,6 @@ type Manifest struct {
// A brief description of what the plugin does
Description *string `json:"description,omitempty" yaml:"description,omitempty" mapstructure:"description,omitempty"`
- // Experimental corresponds to the JSON schema field "experimental".
- Experimental *Experimental `json:"experimental,omitempty" yaml:"experimental,omitempty" mapstructure:"experimental,omitempty"`
-
// The display name of the plugin
Name string `json:"name" yaml:"name" mapstructure:"name"`
@@ -242,12 +233,6 @@ func (j *TaskQueuePermission) UnmarshalJSON(value []byte) error {
return nil
}
-// Enable experimental WebAssembly threads support
-type ThreadsFeature struct {
- // Explanation for why threads support is needed
- Reason *string `json:"reason,omitempty" yaml:"reason,omitempty" mapstructure:"reason,omitempty"`
-}
-
// Users service permissions for accessing user information
type UsersPermission struct {
// Explanation for why users access is needed
diff --git a/plugins/manifest_test.go b/plugins/manifest_test.go
index 2a8b0dcfa..32bcbba08 100644
--- a/plugins/manifest_test.go
+++ b/plugins/manifest_test.go
@@ -117,76 +117,6 @@ var _ = Describe("Manifest", func() {
})
})
- Describe("HasExperimentalThreads", func() {
- It("returns false when no experimental section", func() {
- m := &Manifest{}
- Expect(m.HasExperimentalThreads()).To(BeFalse())
- })
-
- It("returns false when experimental section has no threads", func() {
- m := &Manifest{
- Experimental: &Experimental{},
- }
- Expect(m.HasExperimentalThreads()).To(BeFalse())
- })
-
- It("returns true when threads feature is present", func() {
- m := &Manifest{
- Experimental: &Experimental{
- Threads: &ThreadsFeature{},
- },
- }
- Expect(m.HasExperimentalThreads()).To(BeTrue())
- })
-
- It("returns true when threads feature has a reason", func() {
- m := &Manifest{
- Experimental: &Experimental{
- Threads: &ThreadsFeature{
- Reason: new("Required for concurrent processing"),
- },
- },
- }
- Expect(m.HasExperimentalThreads()).To(BeTrue())
- })
-
- It("parses experimental.threads from JSON", func() {
- data := []byte(`{
- "name": "Threaded Plugin",
- "author": "Test Author",
- "version": "1.0.0",
- "experimental": {
- "threads": {
- "reason": "To use multi-threaded WASM module"
- }
- }
- }`)
-
- var m Manifest
- err := json.Unmarshal(data, &m)
- Expect(err).ToNot(HaveOccurred())
- Expect(m.HasExperimentalThreads()).To(BeTrue())
- Expect(m.Experimental.Threads.Reason).ToNot(BeNil())
- Expect(*m.Experimental.Threads.Reason).To(Equal("To use multi-threaded WASM module"))
- })
-
- It("parses experimental.threads without reason from JSON", func() {
- data := []byte(`{
- "name": "Threaded Plugin",
- "author": "Test Author",
- "version": "1.0.0",
- "experimental": {
- "threads": {}
- }
- }`)
-
- var m Manifest
- err := json.Unmarshal(data, &m)
- Expect(err).ToNot(HaveOccurred())
- Expect(m.HasExperimentalThreads()).To(BeTrue())
- })
- })
-
Describe("ParseManifest", func() {
It("parses a valid manifest with users permission", func() {
data := []byte(`{