- Go 81.8%
- Makefile 18.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Build plugins / build (pull_request) Successful in 2m46s
Public repo: the checkout fetches without credentials (shell git) or with persist-credentials: false (actions/checkout), so the PR code that runs later in the job (build scripts, tests) cannot read a token from .git/config. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XMf4EHDsxSUaKJC2q1H41t |
||
| .forgejo/workflows | ||
| example | ||
| hostcheck | ||
| .gitignore | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
wanderer-plugins
Standalone home for Wanderer WASM plugins built with the plugin SDK: bespoke plugins that are not upstreamed.
Scope: in wanderer v0.21.2 a plugin is a trail-provider connector (manifest
type: "trails"): it lists and fetches routes or activities from a provider
(list_routes/get_route_detail, list_activities/get_activity_detail) and
may send trails back. Plugins have no UI surface and no analysis hook, so
features such as personal pace (M2) stay fork patches, not plugins. Upstream's
unmerged feat/pluginRouting branch adds a routing plugin type (BRouter and
Valhalla as plugins); this repo will only target it once it is released.
Plugins are Extism/WASM modules compiled with TinyGo that
implement the Wanderer plugin protocol via
github.com/open-wanderer/wanderer/plugins/sdk.
Layout
example/— a minimal, buildable trails plugin. Copy it to start a new one.Makefile— build / install-local / package / hostcheck across all plugins (editPLUGINS).hostcheck/— runs the built bundles inside wanderer's own plugin loader and worker (see below).
Compatibility
| this repo | wanderer | plugin SDK (plugins/sdk) |
manifest |
|---|---|---|---|
| main | v0.21.2 | v0.1.1-0.20261024143509-a241d1b391e2 (upstream commit a241d1b3 = tag v0.21.2) |
manifestVersion 1.0 |
Upstream has published only one SDK tag (plugins/sdk/v0.1.0, 2026-07-03). The
v0.21.2 SDK adds TrailImport.Difficulty and the manifest gained
metadata.information, metadata.homepageUrl and metadata.donationUrl, so the
plugins pin the v0.21.2 commit as a pseudo-version. When wanderer is upgraded, bump
it to the matching release commit, together with WANDERER_TAG/WANDERER_COMMIT
in the Makefile (the host release hostcheck runs against):
cd <plugin> && go get github.com/open-wanderer/wanderer/plugins/sdk@<upstream release commit> && go mod tidy
The homelab instance runs the upstream db image (flomp/wanderer-db:v0.21.2), so the
plugin host there is exactly upstream's.
Prerequisites
- Go 1.26 and TinyGo 0.41.1 (the toolchain upstream wanderer v0.21.x builds with;
the modules still declare
go 1.25.0like upstream's plugins)
Build
make build # builds every plugin in PLUGINS to <plugin>/dist/<id>/
CI (.forgejo/workflows/build.yml) builds, packages and hostchecks every pull request
(same-repository branches only; fork and AGit PRs are skipped) and runs on manual dispatch.
It is the required check on main.
Each build produces dist/<id>/plugin.wasm and a validated dist/<id>/plugin.json.
Check against the wanderer host
make hostcheck # build, install into .hostcheck-data/plugins, then load and call
hostcheck is a small Go program built against db/ of the pinned wanderer
release (checked out sparse into .wanderer/; symlink .wanderer to a local
wanderer checkout to test another version). It:
- installs every bundle the way
install-localdoes and discovers them withpluginsystem.DiscoverLocalPlugins, the loader the db runs on/data/plugins(manifest validation, entrypoint checks); - calls each import capability pair (
list_routes→get_route_detail,list_activities→get_activity_detail) through wanderer's plugin worker with the sync's input shapes, decodes the output strictly into the host's types, and applies the importer's rules (GPX only, base64, parseable, known difficulty); - calls a list export with invalid input and expects the plugin's structured
error. wanderer v0.21.2 turns such errors into a fatal worker error, so the
code is lost (open-wanderer/wanderer#1424, fixed on
devby open-wanderer/wanderer#1425); hostcheck prints a warning for that case instead of failing.
Plugins that declare provider auth are only loaded, not called. Needs Go and TinyGo; CI runs it after packaging.
Install into a running Wanderer instance
Wanderer loads plugins from <data>/plugins/<id>/. Point WANDERER_DATA at your
instance's data directory and run:
make install-local WANDERER_DATA=/path/to/wanderer/data
This copies each dist/<id> bundle into $WANDERER_DATA/plugins/, replacing the
whole bundle (plugin.json + plugin.wasm) as upstream requires. Then restart the
wanderer db (PocketBase) container; the plugin appears on the Plugins settings
page.
On the homelab k3s deployment the directory is the wanderer-plugins PVC mounted
at /data/plugins in wanderer-db (homelab-flux apps/wanderer); copy a bundle in
with kubectl cp <plugin>/dist/<id> default/<wanderer-db pod>:/data/plugins/<id>
and restart the deployment.
Package for distribution
make package # -> plugin_dist/wanderer-plugin-<id>.tar.gz + SHA256SUMS
SDK reference
The SDK is consumed as a normal Go module
(github.com/open-wanderer/wanderer/plugins/sdk); see Compatibility above for the
pinned version. The manifest schema is upstream's plugins/schema/plugin.schema.json,
and make build runs the SDK's manifestcheck on every plugin.json. To develop against a local
Wanderer checkout instead, add a replace to a plugin's go.mod:
replace github.com/open-wanderer/wanderer/plugins/sdk => /path/to/wanderer/plugins/sdk
License
AGPL-3.0-or-later, matching upstream Wanderer. See LICENSE.