Files
memona-plugin-signature/README.md
T
Danny Kim 3cd0997156
Agents / agent (pull_request) Successful in 5m17s
Say the scaffold is a WebDAV folder that does not sign yet
2026-09-26 01:45:11 +09:00

2.8 KiB

Memona signature plugin

Opens a WebDAV server as a folder inside Memona. It is the foundation for signing Markdown files with an ENS name as they are saved, writing signer and signature into each file's frontmatter so anyone can check who wrote it against the name's current ENSv2 records, using the md-ens-signature library. This version is the WebDAV folder alone; signing is not in it yet.

The plugin is a WASI component: it speaks no sockets of its own and makes every request through the host's HTTP interface, under the connection's permissions. It registers one provider, signature, for the signed-webdav scheme.

Connecting

Field Meaning
Server address The folder's address, for example https://dav.example.com/files/
Username Optional account name for HTTP basic authentication
Password Optional password, stored as a secret

Listing, reading, writing, creating directories, renaming and deleting behave as in the WebDAV plugin: reads and writes stream in pieces of at most 1 MiB, conditional writes use If-Match and If-None-Match, change polling is not supported, a rename never replaces an existing target, and a folder with contents is refused rather than removed whole.

Building

rustup target add wasm32-wasip2
cargo build --locked --release --target wasm32-wasip2
cargo test --locked --lib

The component lands at target/wasm32-wasip2/release/memona_plugin_signature.wasm.

wit/filesystem.wit is a copy of the canonical Memona filesystem contract, and src/sdk.rs generates the guest bindings from it, so this repository builds without a Memona checkout. Refresh the copy from plugin_system/sdk/wit in the Memona repository when the contract moves, and keep apiVersion in manifest.json in step.

Packaging for the plugin store

A .memona-plugin package is a ZIP archive with the files at its root, never inside a directory:

cargo build --locked --release --target wasm32-wasip2
cp target/wasm32-wasip2/release/memona_plugin_signature.wasm plugin.wasm
zip memona-plugin-signature.memona-plugin \
  manifest.json plugin.wasm README.md LICENSE

manifest.json and plugin.wasm are required; README.md becomes the guide on the plugin's public page and LICENSE is shown beside it.

Attribution

The WebDAV code in src/lib.rs, src/dav.rs and src/sdk.rs is copied from the MIT-licensed Memona WebDAV plugin at commit 3d69750. That crate keeps its provider, reader and writer private and exports the component's entry points itself, so it cannot be wrapped as a dependency without forking it; the copy stays as close to the original as the signing hook allows, so fixes there carry over with a plain diff.