Sandbox plug-in tutorial
Workshop sandbox plug-ins are not the same runtime as local plug-ins. Index → Workshop SDK.
sources:provide / sources:direct expose author-owned HTTP(S) direct links only — not Netease, Spotify, or similar platforms. Legal boundary → Download and plug-in source policy.
Plug-in project layout
Section titled “Plug-in project layout”my-plugin/├── content/│ ├── echo.workshop.json│ └── community.echo # generated by check/sync — do not hand-edit├── src/│ └── plugin.js # main entry└── .echo-sdk/echo-workshop-plugin.d.tsWalkthrough A: hello plug-in
Section titled “Walkthrough A: hello plug-in”node .\bin\echo-workshop-sdk.mjs example hello-plugin .\my-hellothencd .\my-hello- Read
src/plugin.js— one command,playback:readonly. - To call
echo.library.*, firstnpm run add -- --permission library:read - After every edit:
npm run check(syncs intocommunity.echo) npm run dev— undeclaredecho.*calls fail with capability-denied
Users enable via Workshop Use, then open Plugins at the bottom right → Steam Workshop.
Walkthrough B: source catalog
Section titled “Walkthrough B: source catalog”init .\my-catalog --recipe source-catalognpm run add -- --permission network:requestif calling the network- Declare networkHosts (bare domain, no protocol/port) in the outer manifest
- Implement
search/browse/listCollection/resolve—resolvereturns one playable http(s) URL npm run check— mock rejects undeclared hosts and custom ports
Presets
Section titled “Presets”| Preset / recipe | Includes |
|---|---|
basic / hello | One command |
complete / plugin-complete | Commands, panel, agent, providers |
catalog / source-catalog | Direct-link catalog + panel |
lyrics / lyrics-source | Lyrics provider + panel |
Look up permissions:
node .\bin\echo-workshop-sdk.mjs api echo.queue.moveItemnode .\bin\echo-workshop-sdk.mjs api errorsPackage limits
Section titled “Package limits”32 files max, 512 KiB per UTF-8 file, 2 MiB serialized. Inner apiVersion must match outer compatibility.pluginApiVersion (2 for new items).
Do not port local plug-in folders directly — re-init with the SDK.
Advanced: metadata, lyrics, listen-together
Section titled “Advanced: metadata, lyrics, listen-together”- Metadata / cover —
examples/metadata-provider/; user selects candidates only. - Lyrics provider —
lyrics-sourcerecipe +lyrics-providersnippet. - Listen-together —
playback:share+ declared upload host; seeexamples/listen-together/.