shire Docs
Docs/Plugin API/Migration guide

Migration Guide

Current baseline

  • Shire product: 1.14
  • Plugin API: 1.0
  • Transport: Windows named pipe, newline-delimited JSON-RPC 2.0
  • Manifest apiVersion: 1.x

A plugin built for API 1.0 works on every Shire 1.x Host that reports API 1.x in api.info.

From a private/bespoke Shire build

Older custom builds may call game offsets directly. That code is not portable and is not part of the public API. To migrate:

  1. List each operation the old build performed.
  2. Map it to a public method in api-reference.md.
  3. For reads, use player.getPosition, world.getScene, entities.list or map.getMarkers; do not read game memory.
  4. For movement, use teleport.to; the Host validates coordinates and the teleport method.
  5. For UI, send declarative components instead of drawing ImGui.
  6. For settings, use the host storage instead of writing Shire's config files.
  7. If an operation has no public adapter, it is not available yet. Request a new native operation; do not ship offset-dependent code.

Host and plugin version negotiation

  • The handshake reports api_version, capabilities, permissions, granted, events and ui_types.
  • Compare the major API version; refuse to run if it does not match.
  • Check capabilities before calling optional methods.
  • Handle -32002 not_available as a graceful degradation path.
  • Declare only permissions the plugin needs; new permissions require a new user approval.

Compatibility policy

  • Additive methods, fields and events: minor API version.
  • Renamed/removed methods or changed semantics: major API version + a migration note.
  • Host product updates and Genshin patches do not change the public method names; adapters live behind the Host.
  • SDKs are version-marked and should call api.info at startup when they need a feature not present in their compile-time constants.

Old .shiremod packages

  • Stored ZIP entries are required in 1.0; repack deflated packages with shire-plugin pack.
  • Reinstall to refresh the package hash and grant newly declared permissions.
  • The Host keeps approved permissions that are still declared; removed permissions are discarded.

SDK updates

  • Python: replace shire_sdk.py; the wire contract is unchanged within 1.x.
  • TypeScript/Node: update shire-sdk.js and shire-sdk.d.ts.
  • C++: update shire_sdk.hpp/shire_json.hpp.
  • Rust: update the shire-sdk crate.
  • C#: update ShireSdk.cs.

Always rerun shire-plugin validate and the contract tests after an SDK update.

Shire Plugin API 1.0 · Written in English. Documentation home · API status · Changelog

Independent project. Not affiliated with HoYoverse. Never put secrets in a plugin, manifest or package.