Add host fetch capability and public plugin export bindings - #7
Merged
Merged
Conversation
Implements the add-host-fetch-capability OpenSpec change. Adds a `host` WIT interface (`fetch`, reusing errors.network-failure) and wires it into `world plugin` as an import alongside the existing `export data-provider`, so a plugin component can no longer instantiate without a host that supplies network access. Bumps INTERFACE_VERSION to 2.0 accordingly. Re-exports the generated `Guest` trait and `export!` macro for the data-provider interface (via wit-bindgen's pub_export_macro option), and adds a `host_fetch` wrapper around the generated fetch import, so a downstream plugin can implement and export the world using this crate's own canonical types instead of regenerating an incompatible copy from a vendored WIT file. BREAKING CHANGE: world plugin now imports `host.fetch`; any component built against the previous world requires rebuilding, and INTERFACE_VERSION 1.x manifests are no longer accepted. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn
…ates wit-bindgen's single-arg export!($ty) expands to self::export!($ty with_types_in self), which only resolves inside this crate. Verified by cross-compiling a scratch crate against this one for wasm32-wasip2: the with_types_in form is required downstream, and it in turn needs the generated exports::fulltime::plugin_api module tree reachable at the crate root, not just the Guest trait alias pulled out of it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn
paulyhedral
marked this pull request as ready for review
July 20, 2026 12:52
paulyhedral
added a commit
that referenced
this pull request
Jul 20, 2026
* Post-merge docs, trusted publishing, and archive define-league-data-contract (#5) * docs: add badges, CONTRIBUTING, CODE_OF_CONDUCT, and RELEASING Adds crates.io/docs.rs/CI/license badges to README, a CONTRIBUTING.md covering dev setup, branching, commit conventions, and the WIT-contract change process, the org's standard Citizen Code of Conduct, and a RELEASING.md documenting the prepare-release/tag-release/release pipeline built earlier (including the CRATES_API_KEY-to-trusted-publishing follow-up). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn * chore: switch to crates.io trusted publishing Trusted publishing is now configured for fulltime-plugin-api on crates.io (bootstrapped by the v0.1.0 token-based publish). Flips release.yaml to trusted-publishing: true and updates RELEASING.md; CRATES_API_KEY is no longer used by the workflow. Marks task 5.2 complete - v0.1.0 is published. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn * chore: archive define-league-data-contract, sync baseline specs All 16 tasks complete: canonical schema, WIT interface, manifest format implemented and v0.1.0 published to crates.io. Archives the change to openspec/changes/archive/2026-07-19-define-league-data-contract and syncs its three delta specs into openspec/specs/ as the initial baseline. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn * fix: drop static CHANGELOG title to match git-cliff --prepend behavior git-cliff --prepend inserts at byte offset 0, ahead of any static content already in the file — with a hand-written "# Changelog" title at the top, the v0.1.0 release landed above that title instead of under it, and the release also lacked a version heading since cliff.toml's body template didn't render one. Adds the version heading to the body template and drops the static title (README's CHANGELOG link doesn't need one), matching dtrpg-sdk.rs's title-less convention, which doesn't hit this because it never had competing static content at the top to displace. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> * chore: remove local copies of skills/commands available globally in ~/.claude/ Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn * Add host fetch capability and public plugin export bindings (#7) * feat!: add host fetch capability and public plugin export bindings Implements the add-host-fetch-capability OpenSpec change. Adds a `host` WIT interface (`fetch`, reusing errors.network-failure) and wires it into `world plugin` as an import alongside the existing `export data-provider`, so a plugin component can no longer instantiate without a host that supplies network access. Bumps INTERFACE_VERSION to 2.0 accordingly. Re-exports the generated `Guest` trait and `export!` macro for the data-provider interface (via wit-bindgen's pub_export_macro option), and adds a `host_fetch` wrapper around the generated fetch import, so a downstream plugin can implement and export the world using this crate's own canonical types instead of regenerating an incompatible copy from a vendored WIT file. BREAKING CHANGE: world plugin now imports `host.fetch`; any component built against the previous world requires rebuilding, and INTERFACE_VERSION 1.x manifests are no longer accepted. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn * fix: re-export the exports module so export! works from downstream crates wit-bindgen's single-arg export!($ty) expands to self::export!($ty with_types_in self), which only resolves inside this crate. Verified by cross-compiling a scratch crate against this one for wasm32-wasip2: the with_types_in form is required downstream, and it in turn needs the generated exports::fulltime::plugin_api module tree reachable at the crate root, not just the Guest trait alias pulled out of it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> * chore(release): 0.1.0 --------- Co-authored-by: Paul Schifferer <paul@schifferers.net> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: psw-ci[bot] <300730600+psw-ci[bot]@users.noreply.github.com>
paulyhedral
added a commit
that referenced
this pull request
Jul 20, 2026
* Post-merge docs, trusted publishing, and archive define-league-data-contract (#5) * docs: add badges, CONTRIBUTING, CODE_OF_CONDUCT, and RELEASING Adds crates.io/docs.rs/CI/license badges to README, a CONTRIBUTING.md covering dev setup, branching, commit conventions, and the WIT-contract change process, the org's standard Citizen Code of Conduct, and a RELEASING.md documenting the prepare-release/tag-release/release pipeline built earlier (including the CRATES_API_KEY-to-trusted-publishing follow-up). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn * chore: switch to crates.io trusted publishing Trusted publishing is now configured for fulltime-plugin-api on crates.io (bootstrapped by the v0.1.0 token-based publish). Flips release.yaml to trusted-publishing: true and updates RELEASING.md; CRATES_API_KEY is no longer used by the workflow. Marks task 5.2 complete - v0.1.0 is published. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn * chore: archive define-league-data-contract, sync baseline specs All 16 tasks complete: canonical schema, WIT interface, manifest format implemented and v0.1.0 published to crates.io. Archives the change to openspec/changes/archive/2026-07-19-define-league-data-contract and syncs its three delta specs into openspec/specs/ as the initial baseline. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn * fix: drop static CHANGELOG title to match git-cliff --prepend behavior git-cliff --prepend inserts at byte offset 0, ahead of any static content already in the file — with a hand-written "# Changelog" title at the top, the v0.1.0 release landed above that title instead of under it, and the release also lacked a version heading since cliff.toml's body template didn't render one. Adds the version heading to the body template and drops the static title (README's CHANGELOG link doesn't need one), matching dtrpg-sdk.rs's title-less convention, which doesn't hit this because it never had competing static content at the top to displace. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> * chore: remove local copies of skills/commands available globally in ~/.claude/ Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn * Add host fetch capability and public plugin export bindings (#7) * feat!: add host fetch capability and public plugin export bindings Implements the add-host-fetch-capability OpenSpec change. Adds a `host` WIT interface (`fetch`, reusing errors.network-failure) and wires it into `world plugin` as an import alongside the existing `export data-provider`, so a plugin component can no longer instantiate without a host that supplies network access. Bumps INTERFACE_VERSION to 2.0 accordingly. Re-exports the generated `Guest` trait and `export!` macro for the data-provider interface (via wit-bindgen's pub_export_macro option), and adds a `host_fetch` wrapper around the generated fetch import, so a downstream plugin can implement and export the world using this crate's own canonical types instead of regenerating an incompatible copy from a vendored WIT file. BREAKING CHANGE: world plugin now imports `host.fetch`; any component built against the previous world requires rebuilding, and INTERFACE_VERSION 1.x manifests are no longer accepted. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn * fix: re-export the exports module so export! works from downstream crates wit-bindgen's single-arg export!($ty) expands to self::export!($ty with_types_in self), which only resolves inside this crate. Verified by cross-compiling a scratch crate against this one for wasm32-wasip2: the with_types_in form is required downstream, and it in turn needs the generated exports::fulltime::plugin_api module tree reachable at the crate root, not just the Guest trait alias pulled out of it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117XhibDRjfkbNdmmxzqhHn --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> * chore(release): 0.1.1 --------- Co-authored-by: Paul Schifferer <paul@schifferers.net> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: psw-ci[bot] <300730600+psw-ci[bot]@users.noreply.github.com>
paulyhedral
added a commit
that referenced
this pull request
Jul 20, 2026
PR #7's squash merge dropped the feat!: prefix, which git-cliff never saw, so the automated release under-bumped 0.1.1 instead of a proper minor/major version and produced an empty changelog section for it.
paulyhedral
added a commit
that referenced
this pull request
Jul 21, 2026
Sync the data-provider-plugin-api delta (downstream implementation bindings, versioning policy update) into the main spec, add the new host-fetch-capability spec, and archive the completed change now that PR #7 has merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the add-host-fetch-capability OpenSpec change.
interface host { fetch: func(url: string) -> result<list<u8>, network-failure>; }and wiresimport host;intoworld plugin.INTERFACE_VERSIONto2.0(breaking — see design.md for the major-vs-minor reasoning).Guesttrait andexport!macro fordata-provider(via wit-bindgen'spub_export_macro), and adds ahost_fetchwrapper around the generatedfetchimport.docs/plugin-authoring.md,README.md,CHANGELOG.md.Closes #6
All local checks pass:
cargo build/test --all-features --workspace/test --no-default-features/clippy --all-targets --all-features -- -D warnings/fmt --all -- --check/doc --no-deps(RUSTDOCFLAGS=-D warnings).No crates.io release needed for
Plugins/Bundesligato consume this — a git dependency on this branch is sufficient until this is reviewed, merged, and released as0.2.0.OpenSpec change:
openspec/changes/add-host-fetch-capability/proposal.md