Expand description
Asset filename resolution for the plugin manager.
With the v0.2.0 component model migration, plugin artefacts are
platform-independent .wasm files — no per-OS / per-arch suffix.
The default template is {name}.wasm and the legacy {os} /
{arch} / {ext} tokens are rejected with a migration message
(the plugin author must republish a single .wasm asset).
See docs/superpowers/specs/2026-04-27-wasm-plugin-runtime-design.md
§7 for the rationale.
Constants§
- DEFAULT_
TEMPLATE - Default asset filename template. v0.2.0+: a single platform-independent
.wasmfile per plugin.
Functions§
- asset_
filename - Get the resolved asset filename for a plugin, using custom or default
template. The custom template, if provided, must already have passed
check_asset_template. - check_
asset_ template - Reject templates that reference platform-specific tokens. Plugins are
distributed as single platform-independent
.wasmfiles in v0.2.0+. - normalize_
name - Convert plugin name to a form suitable for library names: hyphens
become underscores. Kept for backwards-compatibility with existing
templates; new
.wasmartefacts typically use the plugin name as-is. - resolve_
template - Resolve an asset template by replacing
{name}. Other historical tokens ({os},{arch},{ext}) are no longer supported and the caller should have rejected them viacheck_asset_template; for safety we still treat them as plain text here.