Skip to content

Latest commit

 

History

History
49 lines (39 loc) · 1.35 KB

File metadata and controls

49 lines (39 loc) · 1.35 KB

Plugin SDK

xfetch-plugin-api provides the public types and helpers that plugin authors are expected to use.

Core Types

  • AnimationFrame
  • PluginKind
  • EmptyArgs
  • LogoAnimationArgs
  • LogoAnimationRequest
  • LogoAnimationResponse
  • InfoPluginRequest
  • InfoPluginResponse

Entrypoints

  • read_logo_animation_request()
  • read_info_plugin_request<T>()
  • read_info_plugin_args_or_default<T>()
  • write_logo_animation_frames()
  • write_info_lines()

Error Handling

The crate exposes PluginApiError for invalid protocol versions, unexpected plugin kinds, invalid typed arguments, and malformed responses.

Plugins should write these errors to stderr and exit with a non-zero code.

Design Notes

  • The crate owns the shared wire protocol, not end-user config files.
  • Higher-level helpers validate requests before plugin logic runs.
  • Official plugins are expected to use the same public SDK as third-party plugins.