feat(config): declare imgur and flickr credentials in the manifest

Merged
MP
4mo ago
+73-5

Summary

MAT-134 R-01: plugin_api.rs already reads imgur_client_id and flickr_api_key through get_config, but the manifest never declared them, so the host had nothing to validate or persist. This declares both keys with empty-string defaults and bumps the plugin to 1.1.0.

Changes

  • plugin.toml: imgur_client_id and flickr_api_key under [config], version 1.1.0
  • Cargo.toml / Cargo.lock: version 1.1.0
  • CHANGELOG.md: created, backfilled 1.0.0 from the tag date

Testing

  • tests/manifest_config.rs (new): every config key read via get_config must be declared in plugin.toml
  • tests/wasm_smoke.rs: the get_config stub now answers per-key, and the Imgur HTTP stub rejects any request whose Authorization header isn't Client-ID <configured id> — proving the credential travels through the ABI into the provider request
  • clippy clean, WASM release build ok, 64 native tests pass

Companion PR wires gallery expansion into the host: mpiton/vortex#173

MAT-134


Summary by cubic

Declare imgur_client_id and flickr_api_key in plugin.toml so the host can validate and persist credentials. Satisfies MAT-134 R-01 and bumps the plugin to 1.1.0.

  • Bug Fixes
    • Added both keys under [config] with empty defaults, plus a test that every get_config key has a [config] declaration; scoped the check to the [config] section and matched the left-hand key to avoid false positives.
    • Extended the WASM smoke test to assert the Imgur Authorization: Client-ID <id> header is set from get_config.
    • Updated Cargo.toml/Cargo.lock and added CHANGELOG.md for 1.1.0.

Summary by CodeRabbit

  • New Features

    • Added configuration options for Imgur client ID and Flickr API access.
    • Updated the release to version 1.1.0.
  • Documentation

    • Updated release history covering versions 1.0.0 and 1.1.0.
  • Tests

    • Added checks to ensure all required configuration keys are declared in the manifest.
    • Added a smoke test that verifies the configured Imgur client ID is sent in the outgoing Authorization header.