4539 Commits

Author SHA1 Message Date
Deluan
065b076f45 feat: add Webhook Scrobbler plugin in Rust to send HTTP notifications on scrobble events
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:05 -05:00
Deluan
d8cc4d57eb feat: update Python plugin documentation and usage instructions for host function wrappers
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:05 -05:00
Deluan
dfa7e0d9fc feat: add generated host function wrappers for Scheduler and SubsonicAPI services
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:05 -05:00
Deluan
e2ab381cac feat: generate Python client wrappers for various host services
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:05 -05:00
Deluan
8c4d94e64f feat: add Now Playing Logger plugin to showcase calling host functions from Python plugins
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:05 -05:00
Deluan
edaa0dfdaf feat: add trace logging for plugin availability and error handling in agents
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:05 -05:00
Deluan
9132a7c1e2 feat: include plugin capabilities in loading log message
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:05 -05:00
Deluan
ca2b26f9bd feat: update Makefile and README to clarify Go plugin usage
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:05 -05:00
Deluan
f26448fb7c feat: add Cover Art Archive plugin as an example of Python plugin
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:05 -05:00
Deluan
a3a5412741 feat: add help target to Makefile for plugin usage instructions
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:05 -05:00
Deluan
b9fadfe50a refactor: rename fake plugins to test plugins for clarity in integration tests
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:05 -05:00
Deluan
5deedbe341 refactor: error handling in various plugins to convert response.Error to Go errors
- Updated error handling in `nd_host_scheduler.go`, `nd_host_websocket.go`, `nd_host_artwork.go`, `nd_host_cache.go`, and `nd_host_subsonicapi.go` to convert string errors from responses into Go errors.
- Removed redundant error checks in test data plugins for cleaner code.
- Ensured consistent error handling across all plugins to improve reliability and maintainability.
2026-01-12 08:16:05 -05:00
Deluan
693ce7d280 refactor: host function wrappers to use structured request and response types
- Updated the host function signatures in `nd_host_artwork.go`, `nd_host_scheduler.go`, `nd_host_subsonicapi.go`, and `nd_host_websocket.go` to accept a single parameter for JSON requests.
- Introduced structured request and response types for various cache operations in `nd_host_cache.go`.
- Modified cache functions to marshal requests to JSON and unmarshal responses, improving error handling and code clarity.
- Removed redundant memory allocation for string parameters in favor of JSON marshaling.
- Enhanced error handling in WebSocket and cache operations to return structured error responses.
2026-01-12 08:16:05 -05:00
Deluan
dd6a6e6ba7 feat: add Discord Rich Presence example plugin for Navidrome integration
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
f93b3b5709 feat: add Cache service for in-memory TTL-based caching in plugins
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
d2cbe7c6dc refactor: moved public URL builders to avoid import cycles
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
ce7da3f15a feat: implement Artwork service for generating artwork URLs in Navidrome plugins - WIP
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
8207b74dd4 refactor: simplify schedule cloning in Close method and enhance plugin cleanup error handling
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
a3993b52b3 refactor: rename pluginInstance to plugin for consistency across the codebase
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
4dc183fc51 refactor: rename plugin.create() to plugin.instance()
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
c953f33722 fix: use context.Background() in invokeCallback for scheduled tasks
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
aa1cb78a46 feat: add Crypto Ticker example plugin for real-time cryptocurrency price updates via Coinbase WebSocket API
Also add the lifecycle capability

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
23f0d8d77a feat: implement WebSocket service for plugin integration and connection management
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
179bd60460 feat: add WebSocket service definitions for plugin communication
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
2b1f5c8294 refactor: update plugin manager initialization and encapsulate logic
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
59e9917c11 test: add scheduler service isolation test for plugin instances
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
93178ef90b refactor: capabilities registration
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
b85b20a883 refactor(scheduler): replace uuid with id.NewRandom for schedule ID generation
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
88bd0dbe46 feat: rewrite the wikimedia plugin using the XTP CLI
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
547232e280 fix: update wasm build rule to include all Go files in the directory
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
7f055bcba2 docs(scheduler): clarify SchedulerCallback requirement for scheduling functions
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
0c9cb6243b refactor(scheduler): add Close method for resource cleanup on plugin unload
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
e93624b10b refactor(scheduler): streamline scheduling logic and remove unused callback tracking
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
4631d05082 feat(scheduler): add scheduler callback schema and implementation for plugins
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
e4b0e31c85 refactor(manifest): remove unused ConfigPermission from permissions schema
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
c350f8edcb feat(scheduler): implement Scheduler service with one-time and recurring scheduling capabilities
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
9e3f03a3b2 feat(plugins): add WASI build constraints to client wrapper templates, to avoid lint errors
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
dc2ccdc847 feat(scheduler): add Scheduler service interface with host function wrappers for scheduling tasks 2026-01-12 08:16:04 -05:00
Deluan
3faa554935 refactor(generator): remove error handling for response.Error in client templates
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
17b7c0de89 feat(plugins): generate client wrappers for host functions
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
aba6842bfa fix(generator): error-only methods in response handling
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
26bfbb968d feat(plugins): implement SubsonicAPI host function integration with permissions
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
d93b758b16 feat(subsonicapi): update Call method to return JSON string response
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
5769b25add feat(hostgen): add hostgen tool for generating Extism host function wrappers
- Implemented hostgen tool to generate wrappers from annotated Go interfaces.
- Added command-line flags for input/output directories and package name.
- Introduced parsing and code generation logic for host services.
- Created test data for various service interfaces and expected generated code.
- Added documentation for host services and annotations for code generation.
- Implemented SubsonicAPI service with corresponding generated code.
2026-01-12 08:16:04 -05:00
Deluan
d15dc01933 feat(plugins): add metadata agent and scrobbler schemas for bootstrapping plugins
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
64eefa0e28 refactor(plugins): clean up manifest struct and improve plugin loading logic
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
ed3e2cb6b5 feat(plugins): integrate logs
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
2a030b789a feat(plugins): implement scrobbler plugin with authorization and scrobbling capabilities
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
df2b28ed4d feat(plugins): enhance plugin logging and set User-Agent header
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00
Deluan
af89e04bc0 feat(plugins): add Wikimedia plugin for Navidrome to fetch artist metadata
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-12 08:16:04 -05:00