From a089781beedba43869b9b9ebbc19dbfba9d5eab9 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Thu, 19 Nov 2026 10:40:56 +1100 Subject: [PATCH] fix(plugins): normalize component identities and creation guidance Remove .Plugin from RecompCatalog and MQTT entry projects, packages and assemblies while preserving persistent IDs. Document explicit package replacement and advance versions without modifying published artifacts. Align canonical repository metadata and add creation skills plus registry and packaged-loader guards. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../skills/create-launcher-plugin/SKILL.md | 100 ++++++++++++++++++ .github/skills/create-server-plugin/SKILL.md | 96 +++++++++++++++++ .github/skills/plugin-maintenance/SKILL.md | 11 +- .../repository-skill-authoring/SKILL.md | 11 ++ CONTRIBUTING.md | 21 ++-- Directory.Build.props | 2 +- LANCommander.Community.slnx | 4 +- README.md | 2 + RELEASES.md | 45 ++++++-- eng/PluginRelease.psm1 | 18 +++- eng/Publish-GitHubPackage.ps1 | 4 +- eng/Publish-NuGetPackage.ps1 | 2 +- eng/Publish-Release.ps1 | 2 +- eng/Test-GitHubPackages.ps1 | 32 +++--- eng/Test-LauncherPackage.ps1 | 8 +- eng/Test-NuGetPackage.ps1 | 2 +- eng/Test-NuGetPublication.ps1 | 8 +- eng/Test-Recomp-Package.ps1 | 17 ++- eng/Test-ReleaseSelection.ps1 | 32 ++++-- eng/Test-Repository.ps1 | 43 +++++++- eng/Validate-Plugin.ps1 | 6 +- eng/plugins.json | 14 +-- plugins/Launcher.MQTT/CHANGELOG.md | 11 ++ plugins/Launcher.MQTT/README.md | 60 ++++++----- plugins/Launcher.MQTT/examples/TEST-GUIDE.md | 18 ++-- .../HomeAssistantDiscovery.cs | 2 +- .../HomeAssistantLauncherPlugin.cs | 0 .../HomeAssistantPluginSettings.cs | 0 .../HomeAssistantRuntime.cs | 0 .../HomeAssistantSettingsExtension.cs | 0 ...NCommander.Community.Launcher.MQTT.csproj} | 6 +- .../LANCommanderGameLaunchHost.cs | 0 .../homeassistant.example.json | 0 ...nity.Launcher.MQTT.HostLoader.Tests.csproj | 2 +- .../PluginLoadContextTests.cs | 4 +- .../PluginPackageTests.cs | 2 +- plugins/Launcher.MQTT/version.txt | 2 +- plugins/Server.Mcp/CHANGELOG.md | 10 ++ plugins/Server.Mcp/README.md | 6 +- plugins/Server.Mcp/eng/Test-Package.ps1 | 14 +++ .../LANCommander.Community.Server.Mcp.csproj | 4 +- .../McpHttpTests.cs | 3 +- plugins/Server.Mcp/version.txt | 2 +- plugins/Server.Quake3/CHANGELOG.md | 8 ++ ...ANCommander.Community.Server.Quake3.csproj | 2 +- plugins/Server.Quake3/version.txt | 2 +- plugins/Server.RecompCatalog/CHANGELOG.md | 10 ++ .../CatalogImportSafetyTests.cs | 2 +- .../HostContractTests.cs | 60 ++++++++++- ...ommunity.Server.RecompCatalog.Tests.csproj | 2 +- .../PluginServiceRegistrationTests.cs | 2 +- .../RomRedistributableTests.cs | 2 +- ...mander.Community.Server.RecompCatalog.slnx | 2 +- .../CatalogHostIntegration.cs | 2 +- .../CatalogImportGate.cs | 2 +- .../CatalogImportWorkflow.cs | 2 +- .../CatalogRomHost.cs | 2 +- .../Components/RomManager.razor | 0 .../InlineProgress.cs | 2 +- ...der.Community.Server.RecompCatalog.csproj} | 10 +- .../Pages/Index.razor | 0 .../RecompCatalogPlugin.cs | 4 +- .../RecompCatalogServices.cs | 2 +- .../ServerExtensions.cs | 2 +- .../_Imports.razor | 4 +- plugins/Server.RecompCatalog/README.md | 38 +++++-- plugins/Server.RecompCatalog/version.txt | 2 +- 67 files changed, 630 insertions(+), 160 deletions(-) create mode 100644 .github/skills/create-launcher-plugin/SKILL.md create mode 100644 .github/skills/create-server-plugin/SKILL.md rename plugins/Launcher.MQTT/src/{LANCommander.Community.Launcher.MQTT.Plugin => LANCommander.Community.Launcher.MQTT}/HomeAssistantLauncherPlugin.cs (100%) rename plugins/Launcher.MQTT/src/{LANCommander.Community.Launcher.MQTT.Plugin => LANCommander.Community.Launcher.MQTT}/HomeAssistantPluginSettings.cs (100%) rename plugins/Launcher.MQTT/src/{LANCommander.Community.Launcher.MQTT.Plugin => LANCommander.Community.Launcher.MQTT}/HomeAssistantRuntime.cs (100%) rename plugins/Launcher.MQTT/src/{LANCommander.Community.Launcher.MQTT.Plugin => LANCommander.Community.Launcher.MQTT}/HomeAssistantSettingsExtension.cs (100%) rename plugins/Launcher.MQTT/src/{LANCommander.Community.Launcher.MQTT.Plugin/LANCommander.Community.Launcher.MQTT.Plugin.csproj => LANCommander.Community.Launcher.MQTT/LANCommander.Community.Launcher.MQTT.csproj} (95%) rename plugins/Launcher.MQTT/src/{LANCommander.Community.Launcher.MQTT.Plugin => LANCommander.Community.Launcher.MQTT}/LANCommanderGameLaunchHost.cs (100%) rename plugins/Launcher.MQTT/src/{LANCommander.Community.Launcher.MQTT.Plugin => LANCommander.Community.Launcher.MQTT}/homeassistant.example.json (100%) rename plugins/Server.RecompCatalog/{LANCommander.Community.Server.RecompCatalog.Plugin => LANCommander.Community.Server.RecompCatalog}/CatalogHostIntegration.cs (99%) rename plugins/Server.RecompCatalog/{LANCommander.Community.Server.RecompCatalog.Plugin => LANCommander.Community.Server.RecompCatalog}/CatalogImportGate.cs (96%) rename plugins/Server.RecompCatalog/{LANCommander.Community.Server.RecompCatalog.Plugin => LANCommander.Community.Server.RecompCatalog}/CatalogImportWorkflow.cs (98%) rename plugins/Server.RecompCatalog/{LANCommander.Community.Server.RecompCatalog.Plugin => LANCommander.Community.Server.RecompCatalog}/CatalogRomHost.cs (99%) rename plugins/Server.RecompCatalog/{LANCommander.Community.Server.RecompCatalog.Plugin => LANCommander.Community.Server.RecompCatalog}/Components/RomManager.razor (100%) rename plugins/Server.RecompCatalog/{LANCommander.Community.Server.RecompCatalog.Plugin => LANCommander.Community.Server.RecompCatalog}/InlineProgress.cs (78%) rename plugins/Server.RecompCatalog/{LANCommander.Community.Server.RecompCatalog.Plugin/LANCommander.Community.Server.RecompCatalog.Plugin.csproj => LANCommander.Community.Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.csproj} (86%) rename plugins/Server.RecompCatalog/{LANCommander.Community.Server.RecompCatalog.Plugin => LANCommander.Community.Server.RecompCatalog}/Pages/Index.razor (100%) rename plugins/Server.RecompCatalog/{LANCommander.Community.Server.RecompCatalog.Plugin => LANCommander.Community.Server.RecompCatalog}/RecompCatalogPlugin.cs (96%) rename plugins/Server.RecompCatalog/{LANCommander.Community.Server.RecompCatalog.Plugin => LANCommander.Community.Server.RecompCatalog}/RecompCatalogServices.cs (95%) rename plugins/Server.RecompCatalog/{LANCommander.Community.Server.RecompCatalog.Plugin => LANCommander.Community.Server.RecompCatalog}/ServerExtensions.cs (93%) rename plugins/Server.RecompCatalog/{LANCommander.Community.Server.RecompCatalog.Plugin => LANCommander.Community.Server.RecompCatalog}/_Imports.razor (69%) diff --git a/.github/skills/create-launcher-plugin/SKILL.md b/.github/skills/create-launcher-plugin/SKILL.md new file mode 100644 index 0000000..ffc7611 --- /dev/null +++ b/.github/skills/create-launcher-plugin/SKILL.md @@ -0,0 +1,100 @@ +--- +name: create-launcher-plugin +description: Use when creating or scaffolding a new LANCommander.Community launcher plugin, including source-pinned host integration, projects, packaging, loader tests and registry integration. +--- + +# Create a launcher plugin + +Create one launcher component using verified host contracts. Shared requirements +come from [CONTRIBUTING.md](../../../CONTRIBUTING.md), +[plugin maintenance](../plugin-maintenance/SKILL.md) and +[RELEASES.md](../../../RELEASES.md); the existing +[MQTT README](../../../plugins/Launcher.MQTT/README.md) is evidence for launcher +packaging/storage, not a requirement to add MQTT or Home Assistant. + +## Establish identity and host evidence + +1. Inspect remote/status, fetch canonical + `LANCommander/LANCommander.Community` main, and use a separate feature branch + based on current main (an existing clean isolated task branch is sufficient). + Preserve unrelated changes; stop if the base/worktree conflicts with the + task. Use app branch tooling in an app-managed worktree. +2. Read [eng/plugins.json](../../../eng/plugins.json), + [root defaults](../../../Directory.Build.props), + [central packages](../../../Directory.Packages.props) and the + [MQTT entry project](../../../plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/LANCommander.Community.Launcher.MQTT.csproj). + Check published package availability and inspect actual APIs before choosing + dependencies. Current launcher service contracts are source-coupled: use + [eng/lancommander-source.json](../../../eng/lancommander-source.json) and + `eng\Prepare-LANCommanderSource.ps1`, preserving `LANCOMMANDER_SOURCE_ROOT` + and the explicit `LANCommanderSourceRoot` override. Never substitute a + mutable checkout or fabricate NuGet adapters for missing contracts. +3. Choose key `Launcher.` and root + `LANCommander.Community.Launcher.`. Under `plugins\Launcher.`, + use `src\\.csproj`; directory, project basename, explicit + `PackageId`, `AssemblyName`, `RootNamespace` all equal the root with exact + casing and **no `.Plugin` suffix**. Put host-independent logic and transports + in suffixed helper projects only when needed; keep helpers/tests non-packable. +4. Follow MQTT's component `Directory.Build.props` import/version-file pattern. + Use central dependency versions, initial independent full SemVer, matching + non-empty changelog, README and required license/third-party notices. + +## Implement the launcher boundary + +- Inspect the + [entry point](../../../plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/HomeAssistantLauncherPlugin.cs) + and pinned host lifecycle/DI/settings APIs. Implement `IPlugin` and the + assembly `LANCommanderPlugin` attribute with `PluginHost.Launcher`, a unique + stable semantic ID (matching `IPlugin.Id`) and informational version reporting. + Source-coupled MQTT has exact min/max host bounds; do not claim a wider range + for a new adapter without evidence and loader tests. +- Separate GUI-only behavior from other host modes and clean up background work + on host shutdown. Keep service scopes alive across asynchronous operations; + use the authenticated user's visible resources and normal host services, not + direct database changes or bypasses of host action/install checks. UI must + remain usable when config is missing/invalid; fail operations visibly. +- Store writable settings/journals in the host-preserved `Data` directory under + the plugin directory (or the verified context data API), never at package + root. Ship only blank examples; mask credentials in UI and never log secrets. + Preserve semantic IDs, data/config keys and external protocol/entity IDs for + existing behavior. A new package ID is **not** an in-place upgrade: document + stopped-host backup, removal of old entry DLLs and explicit transfer of `Data`. + Same-ID updates preserve only `Data`; uninstall deletes it too. +- Declare `LANCommander.Plugin;LANCommander.Plugin.Launcher` package types plus + tags. Reference host projects with `Private="false"` and `PrivateAssets="all"` + as in MQTT, retaining exclusions for host-provided runtime/native payloads. + Stage only verified private assemblies, `.deps.json` and blank examples under + `lib/net10.0` for the current target. Suppress NuGet dependencies: the installer + does not restore them. Do not package a ZIP wrapper or the host build output. + +## Register and validate the deliverable + +Add the solution entry, registry project/tests/identities/host bounds/version and +independent tag prefix, artifact format and explicit feed eligibility. Update +all explicit allowlists/counts in `eng\PluginRelease.psm1`, +`eng\Build-Plugin.ps1`, `eng\Validate-Plugin.ps1`, `eng\Test-NuGetPackage.ps1`, +repository/selection/destination/publication tests, and CI/release matrices, +dispatch options, tag filters and component jobs. Update root navigation and +release documentation. Do not copy MQTT-specific HA/template validation into a +generic launcher component. + +Add focused host-independent tests and source-pinned host-loader tests. Adapt +[Test-LauncherPackage.ps1](../../../eng/Test-LauncherPackage.ps1) and +[package tests](../../../plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests/PluginPackageTests.cs) +for the new component, not by weakening MQTT's checks. Validate the actual +extracted nupkg: correct-host discovery, wrong-host/version rejection, entry +assembly/private dependencies and shared host type identity, installation and +same-ID update preservation of `Data`. Wire this into component validation. + +Run the repository checks from RELEASES.md and, after adding the new selection: + +```powershell +pwsh .\eng\Validate-Plugin.ps1 -Plugin Launcher. -OutputDirectory .\artifacts\new-launcher-validation +``` + +Use fresh output. Install extra test dependencies only if that component needs +them. Report untested real GUI/installation/integration behavior separately from +automated loader tests. Stop for unavailable source/packages, unknown storage +or auth contracts, or unverified compatibility. Creation is not authorization +to open a PR, publish packages, push release tags, change credentials/permissions +or migrate installed identities. diff --git a/.github/skills/create-server-plugin/SKILL.md b/.github/skills/create-server-plugin/SKILL.md new file mode 100644 index 0000000..228c883 --- /dev/null +++ b/.github/skills/create-server-plugin/SKILL.md @@ -0,0 +1,96 @@ +--- +name: create-server-plugin +description: Use when creating or scaffolding a new LANCommander.Community server plugin, including its projects, host contracts, packaging, tests and registry integration. +--- + +# Create a server plugin + +Create one installable server component, not a new host or an independent release +pipeline. Follow [CONTRIBUTING.md](../../../CONTRIBUTING.md), +[plugin maintenance](../plugin-maintenance/SKILL.md) and +[RELEASES.md](../../../RELEASES.md) for shared conventions. + +## Establish the component + +1. Inspect remote/status and fetch current canonical `main` from + `LANCommander/LANCommander.Community`. Start on a separate feature branch + based on that main; an existing clean, isolated task branch is sufficient. + Never discard unrelated changes or rebase a dirty/unrelated branch silently. + In an app-managed worktree, use the app's branch tooling. +2. Read [eng/plugins.json](../../../eng/plugins.json), + [root build defaults](../../../Directory.Build.props), + [central packages](../../../Directory.Packages.props), and the + [Quake3 project](../../../plugins/Server.Quake3/LANCommander.Community.Server.Quake3/LANCommander.Community.Server.Quake3.csproj) + and [entry point](../../../plugins/Server.Quake3/LANCommander.Community.Server.Quake3/Quake3Plugin.cs). + Inspect the actual published SDK/Server.Plugins/UI APIs for the chosen + baseline and verify package availability before adding references. + Source evidence can be obtained from the immutable + [host pin](../../../eng/lancommander-source.json) using + `eng\Prepare-LANCommanderSource.ps1`; do not assume unreleased APIs exist. +3. Use component key `Server.` and root + `LANCommander.Community.Server.` with exact casing. Put the entry + project below `plugins\Server.` (a `src` directory is optional, as + existing components demonstrate). Its directory, `.csproj` basename, + explicit `PackageId`, `AssemblyName` and `RootNamespace` must all equal that + root: **no `.Plugin` suffix**. Helpers/tests append descriptive suffixes + to the same root and remain non-packable. +4. Add component `Directory.Build.props` importing the root defaults and + reading `version.txt` for `Version`/`PackageVersion`, following Quake3. + Keep dependencies centrally versioned; only the entry project is packable. + Add a README, license/notices where required, initial full SemVer and a + non-empty changelog section for that exact version. + +## Implement the server boundary + +- Implement the verified `IPlugin` lifecycle and assembly + `LANCommanderPlugin` attribute with `PluginHost.Server`, deliberate compatible + host bounds, a unique stable semantic ID and informational version reporting. + Keep the attribute and `IPlugin.Id` consistent. IDs are not package names: + preserve semantic IDs, data IDs, config keys and protocols when replacing or + extracting existing behavior. A package rename requires a new version/feed + identity and explicit replacement instructions, never an overwritten package. +- Reuse host DI contracts for game/import/storage behavior; do not write host + database rows through guessed schemas. Keep mutable plugin state in + `PluginContext.DataDirectory`, not shipped output. Do not copy secrets into + examples or log credentials. +- For UI, use verified route/navigation extensions and server UI controls. + Inspect [Quake3](../../../plugins/Server.Quake3/README.md) and + [RecompCatalog](../../../plugins/Server.RecompCatalog/README.md) for relevant + patterns. Navigation visibility is not authorization: enforce page + `PluginAccess` and endpoint/service authorization on the server. Test denied + access as well as allowed behavior. Register host services with appropriate + lifetimes and report initialization/operation failures explicitly. +- Declare `LANCommander.Plugin;LANCommander.Plugin.Server` package types and + supplemental tags. Host package references use `ExcludeAssets="runtime"` + and `PrivateAssets="all"`; never bundle SDK, Server.Plugins, Server.UI or + host UI binaries. Bundle the complete private dependency payload under the + target `lib` folder; suppress NuGet dependencies because the installer does + not restore them. Follow existing package targets, not `dotnet publish` output. + +## Integrate and verify + +Update the root solution and registry with project/test paths, canonical +identities, independent version/tag prefix, host bounds, artifact format and +explicit feed eligibility. Inspect and update **all** explicit allowlists/counts: +`eng\PluginRelease.psm1`, `eng\Build-Plugin.ps1`, `eng\Validate-Plugin.ps1`, +`eng\Test-NuGetPackage.ps1`, selection/repository/destination/publication tests, +and CI/release workflow matrices, dispatch options, tag filters and component +jobs. Update README navigation and the release table; adding a project alone +does not make it selectable or releasable. + +Add focused behavior/auth tests and a private-only package inventory check, +plus isolated loading of the **actual packaged entry assembly** with shared host +contract/UI identity (see Quake3's package and host-loader tests). Wire those +checks into `Build-Plugin.ps1`/`Validate-Plugin.ps1`. +Run the repository checks listed in RELEASES.md, then: + +```powershell +pwsh .\eng\Validate-Plugin.ps1 -Plugin Server. -OutputDirectory .\artifacts\new-server-validation +``` + +Use a fresh output directory. Verify emitted nuspec ID/version/types/repository, +assembly names, payload and loadability, not just filenames. Report live-host +behavior not exercised. Stop for unavailable contracts/packages, uncertain +authorization/data semantics or incompatible host bounds rather than inventing +adapters. Creation does not authorize pushing release tags, publishing packages, +changing feed permissions, opening a PR or migrating installed identities. diff --git a/.github/skills/plugin-maintenance/SKILL.md b/.github/skills/plugin-maintenance/SKILL.md index ed1a540..5bb139c 100644 --- a/.github/skills/plugin-maintenance/SKILL.md +++ b/.github/skills/plugin-maintenance/SKILL.md @@ -13,10 +13,10 @@ support it. - Canonical component metadata is in `eng/plugins.json`; release versions live in each component's `version.txt` and changelog. -- Use `LANCommander.Community.Server.Mcp`, - `LANCommander.Community.Server.RecompCatalog.*`, and - `LANCommander.Community.Launcher.MQTT.*` for project names, paths, and C# - namespaces. Use exact `LANCommander` casing for source-owned names. +- Use `LANCommander.Community..` for the installable + project, package, assembly and root namespace, with no `.Plugin` suffix. + Helpers/tests append suffixes to that root and stay non-packable. Use exact + `LANCommander` casing for source-owned names. - Set each owned `AssemblyName` and `PackageId` to the exact current project name with `LANCommander` casing; do not keep legacy pre-monorepo names as active build or package outputs. Preserve semantic plugin IDs, persisted/config @@ -69,3 +69,6 @@ support it. For release preparation and automatic GitHub Release behavior, follow [`RELEASES.md`](../../../RELEASES.md) and the [`plugin-release` skill](../plugin-release/SKILL.md). + +For new components, start with [server creation](../create-server-plugin/SKILL.md) +or [launcher creation](../create-launcher-plugin/SKILL.md). diff --git a/.github/skills/repository-skill-authoring/SKILL.md b/.github/skills/repository-skill-authoring/SKILL.md index 4cf35fe..dfee54b 100644 --- a/.github/skills/repository-skill-authoring/SKILL.md +++ b/.github/skills/repository-skill-authoring/SKILL.md @@ -9,6 +9,17 @@ Create focused, discoverable guidance for a recurring repository task. Keep the repository's canonical docs and scripts as the source of truth; a skill should route an agent to them, not copy a long procedure that will drift. +## Existing task boundaries + +- [Server plugin creation](../create-server-plugin/SKILL.md): new server components. +- [Launcher plugin creation](../create-launcher-plugin/SKILL.md): new launcher components. +- [Plugin maintenance](../plugin-maintenance/SKILL.md): changes to existing components. +- [Plugin release preparation](../plugin-release/SKILL.md): validation and release gates. + +Skills are discovered from `.github/skills//SKILL.md`; there is no separate +skill registry. Link new skills from the relevant guides and +[CONTRIBUTING.md](../../../CONTRIBUTING.md). + ## Authoring workflow 1. Choose one task boundary and a short kebab-case directory name under diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 751378e..967e4ab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,14 +1,20 @@ # Contributing -Use the component-focused project and namespace hierarchy: +Use `LANCommander.Community..` for every installable +entry project, `PackageId`, `AssemblyName` and root namespace, with exact +`LANCommander` casing and no `.Plugin` suffix. Helpers/tests may append +`.Core`, `.Infrastructure`, `.Providers`, `.Transport` or `.Tests` (including +more focused test suffixes) to that component root and must remain non-packable. +Current component roots are: - `LANCommander.Community.Server.Mcp` -- `LANCommander.Community.Server.RecompCatalog.*` +- `LANCommander.Community.Server.RecompCatalog` - `LANCommander.Community.Server.Quake3` and its `.Core` / test projects -- `LANCommander.Community.Launcher.MQTT.*` +- `LANCommander.Community.Launcher.MQTT` -Keep the historical deployed package/assembly/plugin/configuration identities -stable unless a separately reviewed migration is explicitly authorized. Keep +Keep semantic plugin IDs, data IDs, configuration keys and protocol identities +stable. A package/assembly rename is a new feed identity and needs a new version +and explicit replacement instructions; never rewrite published versions. Keep Home Assistant discovery as the HA-specific integration layer; Launcher.MQTT's command/state protocol is usable by other MQTT clients too. @@ -16,7 +22,10 @@ Before submitting changes, run the repository checks and the validation command(s) for affected components from the root [README](README.md#build-and-validate). See [Plugin releases](RELEASES.md) for versioning, packaging, and release procedures. Repository-local agent guidance is under -[`.github/skills`](.github/skills/): plugin maintenance, +[`.github/skills`](.github/skills/): +[creating server plugins](.github/skills/create-server-plugin/SKILL.md), +[creating launcher plugins](.github/skills/create-launcher-plugin/SKILL.md), +[plugin maintenance](.github/skills/plugin-maintenance/SKILL.md), [release preparation](.github/skills/plugin-release/SKILL.md), and [authoring more skills](.github/skills/repository-skill-authoring/SKILL.md). diff --git a/Directory.Build.props b/Directory.Build.props index cf672a3..7a3f8bf 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -10,7 +10,7 @@ true true false - https://github.com/aaronpowell/LANCommander.Community + https://github.com/LANCommander/LANCommander.Community git LANCommander Community contributors false diff --git a/LANCommander.Community.slnx b/LANCommander.Community.slnx index 7aeb3c4..23f1a05 100644 --- a/LANCommander.Community.slnx +++ b/LANCommander.Community.slnx @@ -7,12 +7,12 @@ - + - + diff --git a/README.md b/README.md index 43270dd..676619d 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,8 @@ focused build, test, and installation instructions. - [Plugin release procedure](RELEASES.md) — versioning, validation, and component release workflow. - [Repository agent skills](.github/skills/) — focused `SKILL.md` guidance for + [creating server plugins](.github/skills/create-server-plugin/SKILL.md), + [creating launcher plugins](.github/skills/create-launcher-plugin/SKILL.md), plugin maintenance, release preparation, and authoring more skills. The community repository is independent and is not an official LANCommander diff --git a/RELEASES.md b/RELEASES.md index 3bd210e..52fd89d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -18,9 +18,9 @@ metadata when changing a component. | Component key | Version file | Changelog | Tag format | GitHub Release asset | NuGet feeds | | --- | --- | --- | --- | --- | --- | | `Server.Mcp` | `plugins/Server.Mcp/version.txt` | `plugins/Server.Mcp/CHANGELOG.md` | `server-mcp-v` | `LANCommander.Community.Server.Mcp..nupkg` | GitHub Packages; NuGet.org if `NUGET_API_KEY` is set | -| `Server.RecompCatalog` | `plugins/Server.RecompCatalog/version.txt` | `plugins/Server.RecompCatalog/CHANGELOG.md` | `server-recompcatalog-v` | `LANCommander.Community.Server.RecompCatalog.Plugin..nupkg` | GitHub Packages; NuGet.org if `NUGET_API_KEY` is set | +| `Server.RecompCatalog` | `plugins/Server.RecompCatalog/version.txt` | `plugins/Server.RecompCatalog/CHANGELOG.md` | `server-recompcatalog-v` | `LANCommander.Community.Server.RecompCatalog..nupkg` | GitHub Packages; NuGet.org if `NUGET_API_KEY` is set | | `Server.Quake3` | `plugins/Server.Quake3/version.txt` | `plugins/Server.Quake3/CHANGELOG.md` | `server-quake3-v` | `LANCommander.Community.Server.Quake3..nupkg` | GitHub Packages; NuGet.org if `NUGET_API_KEY` is set | -| `Launcher.MQTT` | `plugins/Launcher.MQTT/version.txt` | `plugins/Launcher.MQTT/CHANGELOG.md` | `launcher-mqtt-v` | `LANCommander.Community.Launcher.MQTT.Plugin..nupkg` | GitHub Packages; NuGet.org if `NUGET_API_KEY` is set | +| `Launcher.MQTT` | `plugins/Launcher.MQTT/version.txt` | `plugins/Launcher.MQTT/CHANGELOG.md` | `launcher-mqtt-v` | `LANCommander.Community.Launcher.MQTT..nupkg` | GitHub Packages; NuGet.org if `NUGET_API_KEY` is set | Use complete SemVer in `version.txt`, including prerelease identifiers when applicable. The tag must contain that exact version, and the changelog must @@ -29,6 +29,33 @@ replace a published release asset; choose a new version and matching changelog entry for subsequent changes. Values in the files alone do not mean a version has been published. +### Package identity normalization + +The next RecompCatalog release is 0.4.4 under +`LANCommander.Community.Server.RecompCatalog`; the next MQTT release is 0.2.2 +under `LANCommander.Community.Launcher.MQTT`. The published +`LANCommander.Community.Server.RecompCatalog.Plugin` 0.4.2/0.4.3 packages and +`LANCommander.Community.Launcher.MQTT.Plugin` 0.2.1 package (plus the 0.2.0 ZIP) +remain immutable, including their tags/assets. These are **new feed identities**, +not new versions of the old IDs; no feed redirect or automatic installed-folder +migration is implemented. Follow the [RecompCatalog replacement guide](plugins/Server.RecompCatalog/README.md#replacing-the-old-package-identity-044) +or [MQTT replacement guide](plugins/Launcher.MQTT/README.md#install--upgrade) +to back up data, remove the old entry assembly and transfer `Data` while stopped. +Never install both identities concurrently: their semantic plugin IDs stay +unchanged, as do configuration and persistent data/protocol IDs. + +After review/merge, release only the new versions through the normal tag gates. +Scope any NuGet.org key to the new canonical IDs in the table; maintainers must +check availability/access for each new feed identity. The repository has moved +to `LANCommander/LANCommander.Community`; old package ownership/feed visibility +is not assumed to transfer or redirect. Nothing here republishes or deletes an +old package, configures a feed, or authorizes a release. + +MCP 0.2.3 and Quake3 0.1.0-beta.2 retain their existing canonical package IDs +and normal same-ID upgrade paths. Their versions advance only because the +canonical repository metadata changes; published MCP 0.2.2 and Quake3 +0.1.0-beta.1 must not be rebuilt and republished with that change. + All current components target LANCommander `2.2.0-beta.4`. Server components use the matching published NuGet packages. Launcher.MQTT is source-coupled to the host and uses the pinned source snapshot in `eng/lancommander-source.json` @@ -94,8 +121,8 @@ runtime exclusions and loader-identity checks. `version.txt`: ```powershell - git tag -a server-mcp-v0.2.2 -m "Server.Mcp 0.2.2" - git push origin server-mcp-v0.2.2 + git tag -a server-mcp-v0.2.3 -m "Server.Mcp 0.2.3" + git push origin server-mcp-v0.2.3 ``` The example is illustrative; check the current version file and release @@ -113,7 +140,7 @@ existing tag, component version, and `main` ancestry and then uses the normal build, release, and feed jobs. Do not move or recreate the tag. For example: ```powershell -gh workflow run release.yml --repo aaronpowell/LANCommander.Community --ref main -f tag=server-mcp-v0.2.2 +gh workflow run release.yml --repo LANCommander/LANCommander.Community --ref main -f tag=server-mcp-v0.2.3 ``` For a run that successfully built the package but failed later, pass that run's @@ -122,7 +149,7 @@ This matters when the GitHub Release already exists: changed rebuild bytes are rejected by immutable release checks. Example: ```powershell -gh workflow run release.yml --repo aaronpowell/LANCommander.Community --ref main ` +gh workflow run release.yml --repo LANCommander/LANCommander.Community --ref main ` -f tag=server-mcp-v0.2.1 -f artifact_run_id= -f artifact_run_attempt=1 ``` @@ -176,9 +203,9 @@ IDs, give it an expiry, and store it as the repository Actions secret named `NUGET_API_KEY`: - `LANCommander.Community.Server.Mcp` -- `LANCommander.Community.Server.RecompCatalog.Plugin` +- `LANCommander.Community.Server.RecompCatalog` - `LANCommander.Community.Server.Quake3` -- `LANCommander.Community.Launcher.MQTT.Plugin` +- `LANCommander.Community.Launcher.MQTT` Do not use a personal account-wide key or commit the secret. No API key, NuGet.org account, trusted publisher, or external service is configured by @@ -196,7 +223,7 @@ The NuGet.org publisher has `contents: read` and receives the optional API key only for its push step. The GitHub Release job has `contents: write`. `RepositoryUrl` in the plugin packages points to -`https://github.com/aaronpowell/LANCommander.Community`, linking packages to +`https://github.com/LANCommander/LANCommander.Community`, linking packages to the repository. After a first authorized GitHub Packages publication, maintainers should review package visibility and repository access settings; new packages may default to private, and public distribution must be diff --git a/eng/PluginRelease.psm1 b/eng/PluginRelease.psm1 index 4cf8657..155633d 100644 --- a/eng/PluginRelease.psm1 +++ b/eng/PluginRelease.psm1 @@ -1,3 +1,16 @@ +function Assert-PluginComponentIdentity { + param([Parameter(Mandatory)] $Plugin) + + $expected = "LANCommander.Community.$($Plugin.key)" + if ($Plugin.key -cnotmatch '^(Server|Launcher)\.[A-Za-z][A-Za-z0-9]*$' -or + $Plugin.host -cne $Plugin.key.Split('.')[0] -or + [IO.Path]::GetFileNameWithoutExtension($Plugin.project) -cne $expected -or + $Plugin.packageId -cne $expected -or $Plugin.assemblyName -cne $expected -or + $Plugin.rootNamespace -cne $expected) { + throw "Component '$($Plugin.key)' must use '$expected' for its entry project, package, assembly and namespace (no .Plugin suffix)." + } +} + function Get-PluginRegistry { $path = Join-Path (Split-Path $PSScriptRoot -Parent) 'eng\plugins.json' $registry = Get-Content -LiteralPath $path -Raw | ConvertFrom-Json @@ -9,6 +22,9 @@ function Get-PluginRegistry { if (@($keys | Select-Object -Unique).Count -ne $keys.Count) { throw 'Plugin registry contains duplicate keys.' } + foreach ($plugin in $registry.plugins) { + Assert-PluginComponentIdentity $plugin + } return $registry.plugins } @@ -139,4 +155,4 @@ function Resolve-PluginSelection { return @($selected.ToArray()) } -Export-ModuleMember -Function Assert-ReleaseSourceCheckout, Assert-ReleaseWorkflowContext, Get-PluginRegistry, Get-PluginVersion, Resolve-PluginSelection, Test-PluginSemVer +Export-ModuleMember -Function Assert-PluginComponentIdentity, Assert-ReleaseSourceCheckout, Assert-ReleaseWorkflowContext, Get-PluginRegistry, Get-PluginVersion, Resolve-PluginSelection, Test-PluginSemVer diff --git a/eng/Publish-GitHubPackage.ps1 b/eng/Publish-GitHubPackage.ps1 index 06337b2..9c90bc6 100644 --- a/eng/Publish-GitHubPackage.ps1 +++ b/eng/Publish-GitHubPackage.ps1 @@ -52,8 +52,8 @@ if ($component.artifactFormat -cne 'nupkg' -or $component.githubPackagesEligible throw "$Plugin does not produce a GitHub Packages-eligible NuGet package." } if ($Owner -notmatch '^[A-Za-z0-9-]+$' -or - $Repository -cne 'aaronpowell/LANCommander.Community' -or $Owner -cne 'aaronpowell') { - throw 'GitHub Packages publication is restricted to the canonical aaronpowell/LANCommander.Community repository.' + $Repository -cne 'LANCommander/LANCommander.Community' -or $Owner -cne 'LANCommander') { + throw 'GitHub Packages publication is restricted to the canonical LANCommander/LANCommander.Community repository.' } $artifactRoot = [IO.Path]::GetFullPath($ArtifactDirectory) diff --git a/eng/Publish-NuGetPackage.ps1 b/eng/Publish-NuGetPackage.ps1 index 9a3a72c..b2f14e3 100644 --- a/eng/Publish-NuGetPackage.ps1 +++ b/eng/Publish-NuGetPackage.ps1 @@ -117,7 +117,7 @@ if ([string]::IsNullOrWhiteSpace($env:NUGET_API_KEY)) { throw 'NuGet publication was explicitly requested, but NUGET_API_KEY is missing.' } Assert-ReleaseWorkflowContext -Tag $Tag -Repository $env:GITHUB_REPOSITORY ` - -ExpectedRepository 'aaronpowell/LANCommander.Community' -Actions $env:GITHUB_ACTIONS ` + -ExpectedRepository 'LANCommander/LANCommander.Community' -Actions $env:GITHUB_ACTIONS ` -EventName $env:GITHUB_EVENT_NAME -Ref $env:GITHUB_REF $headCommit = (& git -C $repositoryRoot rev-parse HEAD).Trim() diff --git a/eng/Publish-Release.ps1 b/eng/Publish-Release.ps1 index 922017c..eed06d3 100644 --- a/eng/Publish-Release.ps1 +++ b/eng/Publish-Release.ps1 @@ -5,7 +5,7 @@ param( [string] $Plugin, [Parameter(Mandatory)][string] $Tag, [Parameter(Mandatory)][string] $ArtifactDirectory, - [string] $Repository = 'aaronpowell/LANCommander.Community', + [string] $Repository = 'LANCommander/LANCommander.Community', [switch] $PlanOnly ) diff --git a/eng/Test-GitHubPackages.ps1 b/eng/Test-GitHubPackages.ps1 index 720dc5f..60bfad4 100644 --- a/eng/Test-GitHubPackages.ps1 +++ b/eng/Test-GitHubPackages.ps1 @@ -27,7 +27,7 @@ function New-TestPackage { Test package LANCommander plugin server mcp - + "@ @@ -144,15 +144,15 @@ try { throw 'Component releases must provide scoped caller permissions, optional NuGet.org secret forwarding, and exact-artifact main-only recovery dispatch.' } - Assert-ReleaseWorkflowContext -Tag $testTag -Repository 'aaronpowell/LANCommander.Community' ` - -ExpectedRepository 'aaronpowell/LANCommander.Community' -Actions 'true' ` + Assert-ReleaseWorkflowContext -Tag $testTag -Repository 'LANCommander/LANCommander.Community' ` + -ExpectedRepository 'LANCommander/LANCommander.Community' -Actions 'true' ` -EventName 'push' -Ref "refs/tags/$testTag" - Assert-ReleaseWorkflowContext -Tag $testTag -Repository 'aaronpowell/LANCommander.Community' ` - -ExpectedRepository 'aaronpowell/LANCommander.Community' -Actions 'true' ` + Assert-ReleaseWorkflowContext -Tag $testTag -Repository 'LANCommander/LANCommander.Community' ` + -ExpectedRepository 'LANCommander/LANCommander.Community' -Actions 'true' ` -EventName 'workflow_dispatch' -Ref 'refs/heads/main' Assert-Fails { - Assert-ReleaseWorkflowContext -Tag $testTag -Repository 'aaronpowell/LANCommander.Community' ` - -ExpectedRepository 'aaronpowell/LANCommander.Community' -Actions 'true' ` + Assert-ReleaseWorkflowContext -Tag $testTag -Repository 'LANCommander/LANCommander.Community' ` + -ExpectedRepository 'LANCommander/LANCommander.Community' -Actions 'true' ` -EventName 'workflow_dispatch' -Ref 'refs/heads/feature' } 'main-branch recovery dispatch' 'Non-main recovery dispatch' @@ -176,32 +176,32 @@ try { sourceCommit = '0000000000000000000000000000000000000000' } | ConvertTo-Json -Depth 5 | Set-Content -LiteralPath (Join-Path $artifactDirectory 'release-manifest.json') - $disabledOutput = (& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $testTag -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community 2>&1) -join "`n" + $disabledOutput = (& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $testTag -ArtifactDirectory $artifactDirectory -Owner LANCommander -Repository LANCommander/LANCommander.Community 2>&1) -join "`n" if ($disabledOutput -notmatch 'publishing is disabled') { throw 'The default GitHub Packages path did not remain disabled.' } - $planOutput = (& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $testTag -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community -Publish -PlanOnly 2>&1) -join "`n" + $planOutput = (& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $testTag -ArtifactDirectory $artifactDirectory -Owner LANCommander -Repository LANCommander/LANCommander.Community -Publish -PlanOnly 2>&1) -join "`n" $planLine = @($planOutput -split "\r?\n" | Where-Object { $_ -match '^\{"component"' }) | Select-Object -Last 1 $plan = $planLine | ConvertFrom-Json if ($plan.component -cne 'Server.Mcp' -or $plan.packageId -cne 'LANCommander.Community.Server.Mcp' -or - $plan.owner -cne 'aaronpowell' -or - $plan.feedUrl -cne 'https://nuget.pkg.github.com/aaronpowell/index.json' -or + $plan.owner -cne 'LANCommander' -or + $plan.feedUrl -cne 'https://nuget.pkg.github.com/LANCommander/index.json' -or $plan.publishRequested -ne $true) { throw 'The GitHub Packages plan did not preserve component, identity, version, owner, and feed.' } Remove-Item Env:GITHUB_TOKEN -ErrorAction SilentlyContinue Assert-Fails { - & (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $testTag -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community -Publish + & (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $testTag -ArtifactDirectory $artifactDirectory -Owner LANCommander -Repository LANCommander/LANCommander.Community -Publish } 'GITHUB_TOKEN is unavailable' 'Missing GitHub Packages credential' Assert-Fails { - & (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $wrongTag -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community -Publish -PlanOnly + & (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $wrongTag -ArtifactDirectory $artifactDirectory -Owner LANCommander -Repository LANCommander/LANCommander.Community -Publish -PlanOnly } 'does not match' 'Release tag selection' $manifestPath = Join-Path $artifactDirectory 'release-manifest.json' $manifestText = Get-Content -LiteralPath $manifestPath -Raw try { Set-Content -LiteralPath $manifestPath -Value ($manifestText.Replace('"nupkg"', '"zip"')) Assert-Fails { - & (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $testTag -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community -Publish -PlanOnly + & (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $testTag -ArtifactDirectory $artifactDirectory -Owner LANCommander -Repository LANCommander/LANCommander.Community -Publish -PlanOnly } 'manifest does not match' 'ZIP artifact rejected by NuGet publisher' } finally { Set-Content -LiteralPath $manifestPath -Value $manifestText } @@ -233,9 +233,9 @@ try { } 'duplicate path' 'Duplicate archive entry' $serviceIndex = @' -{"resources":[{"@id":"https://nuget.pkg.github.com/aaronpowell/download/","@type":"PackageBaseAddress/3.0.0"}]} +{"resources":[{"@id":"https://nuget.pkg.github.com/LANCommander/download/","@type":"PackageBaseAddress/3.0.0"}]} '@ | ConvertFrom-Json - if ((Get-GitHubNuGetPackageBaseAddress -ServiceIndex $serviceIndex) -cne 'https://nuget.pkg.github.com/aaronpowell/download') { + if ((Get-GitHubNuGetPackageBaseAddress -ServiceIndex $serviceIndex) -cne 'https://nuget.pkg.github.com/LANCommander/download') { throw 'GitHub Packages flat-container resource was not selected.' } diff --git a/eng/Test-LauncherPackage.ps1 b/eng/Test-LauncherPackage.ps1 index 81626a4..3d1f8cd 100644 --- a/eng/Test-LauncherPackage.ps1 +++ b/eng/Test-LauncherPackage.ps1 @@ -9,8 +9,8 @@ $repositoryRoot = Split-Path $PSScriptRoot -Parent & (Join-Path $PSScriptRoot 'Test-NuGetPackage.ps1') -Plugin Launcher.MQTT -PackagePath $PackagePath -ExpectedVersion $ExpectedVersion -RequireRepositoryUrl $root = 'lib/net10.0/' $required = @( - "${root}LANCommander.Community.Launcher.MQTT.Plugin.dll", - "${root}LANCommander.Community.Launcher.MQTT.Plugin.deps.json", + "${root}LANCommander.Community.Launcher.MQTT.dll", + "${root}LANCommander.Community.Launcher.MQTT.deps.json", "${root}LANCommander.Community.Launcher.MQTT.Core.dll", "${root}LANCommander.Community.Launcher.MQTT.Transport.dll", "${root}MQTTnet.dll", @@ -39,12 +39,12 @@ try { try { $example = $reader.ReadToEnd() | ConvertFrom-Json } finally { $reader.Dispose() } if ($example.BrokerUsername -or $example.BrokerPassword) { throw 'Launcher package contains populated credentials.' } New-Item -ItemType Directory -Path $temporary | Out-Null - $pluginDirectory = Join-Path $temporary 'LANCommander.Community.Launcher.MQTT.Plugin' + $pluginDirectory = Join-Path $temporary 'LANCommander.Community.Launcher.MQTT' New-Item -ItemType Directory -Path $pluginDirectory | Out-Null foreach ($name in $required) { [IO.Compression.ZipFileExtensions]::ExtractToFile($archive.GetEntry($name), (Join-Path $pluginDirectory ($name.Substring($root.Length)))) } - $env:LANCOMMANDER_MQTT_PLUGIN_PATH = Join-Path $pluginDirectory 'LANCommander.Community.Launcher.MQTT.Plugin.dll' + $env:LANCOMMANDER_MQTT_PLUGIN_PATH = Join-Path $pluginDirectory 'LANCommander.Community.Launcher.MQTT.dll' $env:LANCOMMANDER_MQTT_PACKAGE_PATH = (Get-Item -LiteralPath $PackagePath).FullName $env:LANCOMMANDER_MQTT_PACKAGE_TEST_ROOT = $temporary $env:LANCOMMANDER_MQTT_PACKAGE_VERSION = $ExpectedVersion diff --git a/eng/Test-NuGetPackage.ps1 b/eng/Test-NuGetPackage.ps1 index 567a7ac..a50f068 100644 --- a/eng/Test-NuGetPackage.ps1 +++ b/eng/Test-NuGetPackage.ps1 @@ -64,7 +64,7 @@ try { $repositoryElement = $metadataFields['repository'] $repositoryUrl = if ($repositoryElement) { $repositoryElement.Attribute('url') } if (-not $repositoryUrl -or - [string]$repositoryUrl.Value -cne 'https://github.com/aaronpowell/LANCommander.Community') { + [string]$repositoryUrl.Value -cne 'https://github.com/LANCommander/LANCommander.Community') { throw "Package $($package.Name) must identify the canonical LANCommander.Community repository." } } diff --git a/eng/Test-NuGetPublication.ps1 b/eng/Test-NuGetPublication.ps1 index 58bd4ce..9478e3c 100644 --- a/eng/Test-NuGetPublication.ps1 +++ b/eng/Test-NuGetPublication.ps1 @@ -156,12 +156,12 @@ try { $skipJob -notmatch 'NUGET_API_KEY repository secret is not configured') { throw 'NuGet.org must be automatically selected only for eligible packages with a configured API key, or report its intentional skip; recovery uses the main publisher commit.' } - Assert-ReleaseWorkflowContext -Tag $testTag -Repository 'aaronpowell/LANCommander.Community' ` - -ExpectedRepository 'aaronpowell/LANCommander.Community' -Actions 'true' ` + Assert-ReleaseWorkflowContext -Tag $testTag -Repository 'LANCommander/LANCommander.Community' ` + -ExpectedRepository 'LANCommander/LANCommander.Community' -Actions 'true' ` -EventName 'workflow_dispatch' -Ref 'refs/heads/main' Assert-Fails { - Assert-ReleaseWorkflowContext -Tag $testTag -Repository 'aaronpowell/LANCommander.Community' ` - -ExpectedRepository 'aaronpowell/LANCommander.Community' -Actions 'true' ` + Assert-ReleaseWorkflowContext -Tag $testTag -Repository 'LANCommander/LANCommander.Community' ` + -ExpectedRepository 'LANCommander/LANCommander.Community' -Actions 'true' ` -EventName 'workflow_dispatch' -Ref 'refs/heads/feature' } 'main-branch recovery dispatch' 'Non-main NuGet recovery dispatch' Assert-ReleaseSourceCheckout -Tag $testTag -TagCommit 'abc' -HeadCommit 'abc' ` diff --git a/eng/Test-Recomp-Package.ps1 b/eng/Test-Recomp-Package.ps1 index 7f067b2..9edbf44 100644 --- a/eng/Test-Recomp-Package.ps1 +++ b/eng/Test-Recomp-Package.ps1 @@ -8,11 +8,11 @@ $ErrorActionPreference = 'Stop' $package = Get-Item -LiteralPath $PackagePath $archive = [System.IO.Compression.ZipFile]::OpenRead($package.FullName) try { - $packageId = 'LANCommander.Community.Server.RecompCatalog.Plugin' + $packageId = 'LANCommander.Community.Server.RecompCatalog' $expected = @( 'LANCommander.Community.Server.RecompCatalog.Core.dll', 'LANCommander.Community.Server.RecompCatalog.Infrastructure.dll', - 'LANCommander.Community.Server.RecompCatalog.Plugin.dll', + 'LANCommander.Community.Server.RecompCatalog.dll', 'LANCommander.Community.Server.RecompCatalog.Providers.dll' ) | ForEach-Object { "lib/net10.0/$_" } $actual = @($archive.Entries | Where-Object { $_.FullName.StartsWith('lib/') -and $_.Name } | @@ -24,7 +24,7 @@ try { foreach ($assemblyName in @( 'LANCommander.Community.Server.RecompCatalog.Core', 'LANCommander.Community.Server.RecompCatalog.Infrastructure', - 'LANCommander.Community.Server.RecompCatalog.Plugin', + 'LANCommander.Community.Server.RecompCatalog', 'LANCommander.Community.Server.RecompCatalog.Providers' )) { $entry = $archive.GetEntry("lib/net10.0/$assemblyName.dll") @@ -66,3 +66,14 @@ try { finally { $archive.Dispose() } + +$previousPackage = $env:RECOMPCATALOG_TEST_PACKAGE +try { + $env:RECOMPCATALOG_TEST_PACKAGE = $package.FullName + & dotnet test (Join-Path $PSScriptRoot '../plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/LANCommander.Community.Server.RecompCatalog.Tests.csproj') ` + -c Release --nologo --filter 'FullyQualifiedName~LoadsCanonicalEntryAssemblyWithSharedHostContracts' + if ($LASTEXITCODE -ne 0) { throw 'Packaged Recomp Catalog loader contract check failed.' } +} +finally { + $env:RECOMPCATALOG_TEST_PACKAGE = $previousPackage +} diff --git a/eng/Test-ReleaseSelection.ps1 b/eng/Test-ReleaseSelection.ps1 index fc6e59a..e828fe2 100644 --- a/eng/Test-ReleaseSelection.ps1 +++ b/eng/Test-ReleaseSelection.ps1 @@ -16,23 +16,23 @@ function Assert-Fails { $single = @(Resolve-PluginSelection -Plugins @('Server.Mcp')) Assert-Equal 'Server.Mcp' $single[0].key 'Single-component selection' -Assert-Equal '0.2.2' $single[0].version 'Single-component version' +Assert-Equal '0.2.3' $single[0].version 'Single-component version' -$tag = @(Resolve-PluginSelection -Tag 'launcher-mqtt-v0.2.1') +$tag = @(Resolve-PluginSelection -Tag 'launcher-mqtt-v0.2.2') Assert-Equal 'Launcher.MQTT' $tag[0].key 'Component-tag selection' -Assert-Equal '0.2.1' $tag[0].version 'Component-tag SemVer' +Assert-Equal '0.2.2' $tag[0].version 'Component-tag SemVer' -$quake = @(Resolve-PluginSelection -Tag 'server-quake3-v0.1.0-beta.1') +$quake = @(Resolve-PluginSelection -Tag 'server-quake3-v0.1.0-beta.2') Assert-Equal 'Server.Quake3' $quake[0].key 'Quake component-tag selection' -Assert-Equal '0.1.0-beta.1' $quake[0].version 'Quake independent prerelease' +Assert-Equal '0.1.0-beta.2' $quake[0].version 'Quake independent prerelease' Assert-Equal 4 @(Get-PluginRegistry).Count 'Complete component registry' $batch = @(Resolve-PluginSelection -Plugins @('Server.Mcp', 'Server.RecompCatalog', 'Launcher.MQTT')) Assert-Equal @('Server.Mcp', 'Server.RecompCatalog', 'Launcher.MQTT') @($batch | ForEach-Object key) 'Coordinated LC batch' -Assert-Equal @('0.2.2', '0.4.3', '0.2.1') @($batch | ForEach-Object version) 'Independent batch versions' +Assert-Equal @('0.2.3', '0.4.4', '0.2.2') @($batch | ForEach-Object version) 'Independent batch versions' $all = @(Resolve-PluginSelection -Plugins @('Server.Mcp', 'Server.RecompCatalog', 'Launcher.MQTT', 'Server.Quake3')) -Assert-Equal @('0.2.2', '0.4.3', '0.2.1', '0.1.0-beta.1') @($all | ForEach-Object version) 'Four-component independent versions' +Assert-Equal @('0.2.3', '0.4.4', '0.2.2', '0.1.0-beta.2') @($all | ForEach-Object version) 'Four-component independent versions' $quakeMetadata = @(Get-PluginRegistry | Where-Object key -CEQ 'Server.Quake3')[0] Assert-Equal '2.2.0-beta.4' $quakeMetadata.minimumHostVersion 'Published Quake host API baseline' Assert-Equal '2.2.0-beta.4' $quakeMetadata.hostPackageVersion 'Quake package host baseline' @@ -55,6 +55,24 @@ $sourcePin = Get-Content -LiteralPath (Join-Path $PSScriptRoot 'lancommander-sou Assert-Equal "v$hostVersion" $sourcePin.tag 'Launcher source tag matches package baseline' Assert-Equal '675befe0673c03aded2b45995694661ce454ba95' $sourcePin.commit 'Released beta.4 launcher source' +foreach ($key in @('Server.RecompCatalog', 'Launcher.MQTT')) { + $component = @(Get-PluginRegistry | Where-Object key -CEQ $key)[0] + foreach ($field in @('project', 'packageId', 'assemblyName', 'rootNamespace')) { + $invalid = $component | ConvertTo-Json -Depth 5 | ConvertFrom-Json + $invalid.$field = if ($field -eq 'project') { + "plugins/$key/LANCommander.Community.$key.Plugin/LANCommander.Community.$key.Plugin.csproj" + } else { "LANCommander.Community.$key.Plugin" } + Assert-Fails { Assert-PluginComponentIdentity $invalid } "$key rejects legacy $field" + } + $wrongHost = $component | ConvertTo-Json -Depth 5 | ConvertFrom-Json + $wrongHost.host = if ($component.host -ceq 'Server') { 'Launcher' } else { 'Server' } + Assert-Fails { Assert-PluginComponentIdentity $wrongHost } "$key rejects mismatched host" +} +Assert-Fails { Resolve-PluginSelection -Tag 'server-recompcatalog-v0.4.3' } 'Published old Recomp version cannot select renamed output' +Assert-Fails { Resolve-PluginSelection -Tag 'launcher-mqtt-v0.2.1' } 'Published old launcher version cannot select renamed output' +Assert-Fails { Resolve-PluginSelection -Tag 'server-mcp-v0.2.2' } 'Published MCP version cannot select changed metadata' +Assert-Fails { Resolve-PluginSelection -Tag 'server-quake3-v0.1.0-beta.1' } 'Published Quake version cannot select changed metadata' + foreach ($version in @('1.2.3', '0.3.0-beta.1', '1.2.3-rc.2+build.7')) { if (-not (Test-PluginSemVer $version)) { throw "Valid SemVer was rejected: $version" } } diff --git a/eng/Test-Repository.ps1 b/eng/Test-Repository.ps1 index f374127..4bde140 100644 --- a/eng/Test-Repository.ps1 +++ b/eng/Test-Repository.ps1 @@ -16,6 +16,10 @@ foreach ($plugin in $plugins) { $packageId = $pluginProjectXml.Project.PropertyGroup.PackageId $rootNamespace = $pluginProjectXml.Project.PropertyGroup.RootNamespace $projectName = [IO.Path]::GetFileNameWithoutExtension($plugin.project) + $componentName = "LANCommander.Community.$($plugin.key)" + if ($rootNamespace -cne $componentName) { + throw "$($plugin.key) entry project and root namespace must be '$componentName' (no .Plugin suffix)." + } if ($plugin.assemblyName -cne $projectName -or $assemblyName -cne $projectName -or $plugin.packageId -cne $projectName -or $packageId -cne $projectName) { throw "$($plugin.key) assembly and package IDs must match its project name '$projectName'." @@ -49,7 +53,7 @@ foreach ($plugin in $plugins) { throw "$($plugin.key) package-feed eligibility must be explicit bools and only nupkg artifacts may be eligible." } if (($plugin.githubPackagesEligible -or $plugin.nugetOrgEligible) -and - [string]$pluginProjectXml.Project.PropertyGroup.RepositoryUrl -cne 'https://github.com/aaronpowell/LANCommander.Community') { + [string]$pluginProjectXml.Project.PropertyGroup.RepositoryUrl -cne 'https://github.com/LANCommander/LANCommander.Community') { throw "$($plugin.key) must link package feeds to the canonical LANCommander.Community repository." } } @@ -60,6 +64,18 @@ foreach ($project in $allProjects) { $projectName = [IO.Path]::GetFileNameWithoutExtension($project.Name) $assemblyName = [string]$projectXml.Project.PropertyGroup.AssemblyName $packageId = [string]$projectXml.Project.PropertyGroup.PackageId + $relative = [IO.Path]::GetRelativePath((Join-Path $repositoryRoot 'plugins'), $project.FullName) + $componentKey = ($relative -split '[/\\]')[0] + $component = @($plugins | Where-Object key -CEQ $componentKey) + $componentRoot = "LANCommander.Community.$componentKey" + if ($component.Count -ne 1 -or + ($projectName -cne $componentRoot -and -not $projectName.StartsWith("$componentRoot.", [StringComparison]::Ordinal)) -or + [string]$projectXml.Project.PropertyGroup.RootNamespace -cne $projectName) { + throw "Project '$($project.FullName)' must use its registered component root and matching namespace." + } + if ($projectName -cne $componentRoot -and $projectXml.Project.PropertyGroup.IsPackable -eq 'true') { + throw "Helper/test project '$projectName' must not be packable." + } if ($assemblyName -and $assemblyName -cne $projectName) { throw "Project '$($project.FullName)' overrides AssemblyName '$assemblyName'; expected '$projectName'." } @@ -82,13 +98,13 @@ foreach ($path in $requiredFiles) { } } -$example = Get-Content -LiteralPath (Join-Path $repositoryRoot 'plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/homeassistant.example.json') -Raw | +$example = Get-Content -LiteralPath (Join-Path $repositoryRoot 'plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/homeassistant.example.json') -Raw | ConvertFrom-Json if ($example.BrokerUsername -or $example.BrokerPassword -or $example.UseTls) { throw 'The launcher example must contain blank credentials and retain the plaintext default.' } -$launcherIds = Get-Content -LiteralPath (Join-Path $repositoryRoot 'plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/HomeAssistantLauncherPlugin.cs') -Raw +$launcherIds = Get-Content -LiteralPath (Join-Path $repositoryRoot 'plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/HomeAssistantLauncherPlugin.cs') -Raw if ($launcherIds -notmatch 'Id = "com\.aaronpowell\.lancommander\.homeassistant"') { throw 'The existing launcher plugin ID changed.' } @@ -96,7 +112,7 @@ $mcpIds = Get-Content -LiteralPath (Join-Path $repositoryRoot 'plugins/Server.Mc if ($mcpIds -notmatch 'io\.github\.aaronpowell\.lancommander\.mcp') { throw 'The existing MCP plugin ID changed.' } -$recompIds = Get-Content -LiteralPath (Join-Path $repositoryRoot 'plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/RecompCatalogPlugin.cs') -Raw +$recompIds = Get-Content -LiteralPath (Join-Path $repositoryRoot 'plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/RecompCatalogPlugin.cs') -Raw if ($recompIds -notmatch 'dev\.aaronpowell\.lancommander\.recompcatalog') { throw 'The existing Recomp Catalog plugin ID changed.' } @@ -117,4 +133,21 @@ if ($trackedConfigs.Count -gt 0) { throw 'A populated launcher homeassistant.json must not be tracked; only the blank example belongs in source control.' } -Write-Output "Repository checks passed for $($plugins.Count) components." +$skills = @(Get-ChildItem -LiteralPath (Join-Path $repositoryRoot '.github/skills') -Filter SKILL.md -Recurse -File) +foreach ($skill in $skills) { + $content = Get-Content -LiteralPath $skill.FullName -Raw + $frontmatter = [regex]::Match($content, '\A---\r?\nname: (?[a-z0-9-]+)\r?\ndescription: (?[^\r\n]+)\r?\n---(?:\r?\n|$)') + if (-not $frontmatter.Success -or $frontmatter.Groups['name'].Value -cne $skill.Directory.Name -or + $frontmatter.Groups['description'].Value -notmatch '^Use when ') { + throw "Skill '$($skill.FullName)' requires matching name and a 'Use when' description in YAML frontmatter." + } + foreach ($link in [regex]::Matches($content, '\[[^\]]+\]\((?[^)]+)\)')) { + $target = $link.Groups['target'].Value + if ($target -match '^(https?://|#)') { continue } + $relativePath = ($target -split '#', 2)[0] + if (-not (Test-Path -LiteralPath (Join-Path $skill.Directory.FullName $relativePath))) { + throw "Skill '$($skill.Name)' in '$($skill.Directory.Name)' has a broken link: $target" + } + } +} +Write-Output "Repository checks passed for $($plugins.Count) components and $($skills.Count) skills." diff --git a/eng/Validate-Plugin.ps1 b/eng/Validate-Plugin.ps1 index 6c90f49..c8a7e19 100644 --- a/eng/Validate-Plugin.ps1 +++ b/eng/Validate-Plugin.ps1 @@ -20,7 +20,7 @@ if ($Plugin -eq 'Launcher.MQTT') { $hostSource = Join-Path $repositoryRoot '.cache/lancommander-beta4' & (Join-Path $PSScriptRoot 'Prepare-LANCommanderSource.ps1') -Destination $hostSource | Out-Null $env:LANCOMMANDER_SOURCE_ROOT = $hostSource - $env:LANCOMMANDER_MQTT_PLUGIN_PATH = Join-Path $repositoryRoot 'plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/bin/Release/net10.0/plugin-package/LANCommander.Community.Launcher.MQTT.Plugin.dll' + $env:LANCOMMANDER_MQTT_PLUGIN_PATH = Join-Path $repositoryRoot 'plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/bin/Release/net10.0/plugin-package/LANCommander.Community.Launcher.MQTT.dll' $env:LANCOMMANDER_HA_TEMPLATE_EXPORT = Join-Path ([IO.Path]::GetTempPath()) "lancommander-ha-discovery-$PID.json" } @@ -59,8 +59,8 @@ if ($Plugin -eq 'Launcher.MQTT') { PlanOnly = $true } if ($publisher -eq 'Publish-GitHubPackage.ps1') { - $arguments.Owner = 'aaronpowell' - $arguments.Repository = 'aaronpowell/LANCommander.Community' + $arguments.Owner = 'LANCommander' + $arguments.Repository = 'LANCommander/LANCommander.Community' } $output = & (Join-Path $PSScriptRoot $publisher) @arguments $plans = @($output | Where-Object { $_ -match '^\{"component"' }) diff --git a/eng/plugins.json b/eng/plugins.json index 03af766..2d8a8c7 100644 --- a/eng/plugins.json +++ b/eng/plugins.json @@ -64,13 +64,13 @@ "key": "Server.RecompCatalog", "tagPrefix": "server-recompcatalog", "versionFile": "plugins/Server.RecompCatalog/version.txt", - "project": "plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/LANCommander.Community.Server.RecompCatalog.Plugin.csproj", + "project": "plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.csproj", "tests": [ "plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/LANCommander.Community.Server.RecompCatalog.Tests.csproj" ], - "rootNamespace": "LANCommander.Community.Server.RecompCatalog.Plugin", - "packageId": "LANCommander.Community.Server.RecompCatalog.Plugin", - "assemblyName": "LANCommander.Community.Server.RecompCatalog.Plugin", + "rootNamespace": "LANCommander.Community.Server.RecompCatalog", + "packageId": "LANCommander.Community.Server.RecompCatalog", + "assemblyName": "LANCommander.Community.Server.RecompCatalog", "packageTypes": [ "LANCommander.Plugin", "LANCommander.Plugin.Server" @@ -93,14 +93,14 @@ "key": "Launcher.MQTT", "tagPrefix": "launcher-mqtt", "versionFile": "plugins/Launcher.MQTT/version.txt", - "project": "plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/LANCommander.Community.Launcher.MQTT.Plugin.csproj", + "project": "plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/LANCommander.Community.Launcher.MQTT.csproj", "tests": [ "plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.Core.Tests/LANCommander.Community.Launcher.MQTT.Core.Tests.csproj", "plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests.csproj" ], "rootNamespace": "LANCommander.Community.Launcher.MQTT", - "packageId": "LANCommander.Community.Launcher.MQTT.Plugin", - "assemblyName": "LANCommander.Community.Launcher.MQTT.Plugin", + "packageId": "LANCommander.Community.Launcher.MQTT", + "assemblyName": "LANCommander.Community.Launcher.MQTT", "packageTypes": [ "LANCommander.Plugin", "LANCommander.Plugin.Launcher" diff --git a/plugins/Launcher.MQTT/CHANGELOG.md b/plugins/Launcher.MQTT/CHANGELOG.md index 4f5b55d..001f497 100644 --- a/plugins/Launcher.MQTT/CHANGELOG.md +++ b/plugins/Launcher.MQTT/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## 0.2.2 + +- Rename the entry project, assembly and NuGet package to + `LANCommander.Community.Launcher.MQTT` (remove `.Plugin`); its root namespace + already uses that name. +- Treat the published `.Plugin` 0.2.1 package and 0.2.0 ZIP as immutable. + This new feed identity requires the README's stopped-host replacement and + explicit transfer of `Data`; the updater does not migrate across package IDs. + Preserve runtime plugin ID, settings, MQTT topics/client ID and HA entities. +- Link package metadata to the transferred LANCommander community repository. + ## 0.2.1 Package the launcher as `LANCommander.Community.Launcher.MQTT.Plugin` diff --git a/plugins/Launcher.MQTT/README.md b/plugins/Launcher.MQTT/README.md index 4d5583e..029089c 100644 --- a/plugins/Launcher.MQTT/README.md +++ b/plugins/Launcher.MQTT/README.md @@ -5,12 +5,12 @@ A Windows LANCommander GUI Launcher plugin that publishes bounded command/state The source projects and namespaces use `LANCommander.Community.Launcher.MQTT.*`; the deployed assemblies and plugin folder now use their project names, including -`Plugins/LANCommander.Community.Launcher.MQTT.Plugin`. The persistent plugin ID -and `homeassistant.json` configuration identity remain unchanged. Version 0.2.1 -is the first NuGet release, following the original 0.2.0 ZIP prototype; the -published ZIP and tag remain unchanged. +`Plugins/LANCommander.Community.Launcher.MQTT`. The persistent plugin ID +and `homeassistant.json` configuration identity remain unchanged. Version 0.2.2 +removes `.Plugin` from the package/project/assembly identity. The published +`.Plugin` 0.2.1 NuGet and 0.2.0 ZIP releases and tags remain unchanged. -## Current version (0.2.1) +## Current version (0.2.2) Open **Launcher settings > Home Assistant MQTT** to configure broker address/port, username, masked password, optional TLS, stable client ID and topic prefix. @@ -98,7 +98,7 @@ and bounded reconnect/replay behavior. Only Home Assistant discovery uses the ## Install / upgrade The release artifact is now a real -`LANCommander.Community.Launcher.MQTT.Plugin..nupkg`, not a ZIP wrapped +`LANCommander.Community.Launcher.MQTT..nupkg`, not a ZIP wrapped in NuGet. Its package types are `LANCommander.Plugin` and `LANCommander.Plugin.Launcher`. The full private runtime payload is under `lib/net10.0`; dependencies supplied by the host are excluded. Search tags @@ -114,31 +114,41 @@ Installation is staged until restart. Releases use GitHub Packages automatically NuGet.org is used only if the release workflow has `NUGET_API_KEY`. Feed visibility/authentication is configured by the user/maintainer, not this plugin. The existing 0.2.0 ZIP is immutable and is not retroactively published -as NuGet. Version 0.2.1 uses the beta.4 host baseline. +as NuGet. Versions 0.2.1 and 0.2.2 use the beta.4 host baseline. -**Existing ZIP installations require preparation before a NuGet upgrade.** -The host updater replaces the plugin folder and preserves **only `Data`**. -The new plugin cannot rescue root files after the installer has removed them. +**Replacing the old identity requires a stopped-host data transfer.** +`LANCommander.Community.Launcher.MQTT.Plugin` 0.2.1 was already published. +Version 0.2.2 is a new feed ID, not an update to that package. The updater +preserves **only `Data` within the same package folder**, not across IDs. +Existing ZIP installations also require preparation; the new plugin cannot +rescue root files after an installer removes them. 1. Exit the Launcher completely. Find its existing data/config root (not necessarily the executable directory) and back up the entire installed MQTT plugin folder to a secure location outside `Plugins`. -2. In `Plugins\LANCommander.Community.Launcher.MQTT.Plugin`, create `Data`. +2. In the **old** plugin folder (normally + `Plugins\LANCommander.Community.Launcher.MQTT.Plugin`, or + `Plugins\LanCommander.HomeAssistant.Plugin` for the older prototype), create `Data`. Move your populated `homeassistant.json` and `discovery-topics.json` into `Data` before reopening the Launcher or staging installation. If either destination already exists, back up both copies and reconcile them; never overwrite settings or the owned-topic journal blindly. -3. If the old folder is `Plugins\LanCommander.HomeAssistant.Plugin`, with the - Launcher stopped, rename **only that folder** to - `LANCommander.Community.Launcher.MQTT.Plugin` after preparing `Data`. If - the destination also exists, stop and reconcile the duplicate installations - from backups rather than loading both. Leave other plugin folders untouched. +3. Keep the secured backup including `Data`, then remove the old plugin folder + from `Plugins` with the Launcher stopped. Do not copy/rename the old entry + DLL into the new folder: only the new entry assembly may be loaded. + If the new folder already exists, stop and reconcile duplicates from backups. + Leave other plugin folders untouched. 4. Open the Launcher, install the `.nupkg` through its plugin manager, then - restart. Check the same broker, client ID/topic prefix, exposed games and - retained discovery. Do not use uninstall/reinstall to upgrade: uninstall - deletes `Data` too. - -Normal subsequent NuGet upgrades preserve `Data/homeassistant.json` and + stop the Launcher completely again before activation and restore the saved + `Data` under `Plugins\LANCommander.Community.Launcher.MQTT\Data`. Reconcile + existing files instead of overwriting them blindly. Restart and check that + only one MQTT plugin is loaded, with the same broker, client ID/topic prefix, + exposed games and retained discovery. Uninstall deletes `Data` too; do not + use it as a substitute for backup and transfer. + +For rollback, stop the Launcher and restore the old folder and backup instead +of loading both identities. No automatic cross-ID migration is provided. +Normal subsequent upgrades of the canonical NuGet ID preserve `Data/homeassistant.json` and `Data/discovery-topics.json`. The plugin also moves legacy root files into `Data` when started after a manual drop-in update, but fails visibly if both copies exist. This fallback does **not** replace preparation before the first @@ -147,13 +157,13 @@ settings UI or copy it to `Data/homeassistant.json` for manual configuration. For manual installation without the manager, extract **only** the contents of `lib/net10.0` to -`\Plugins\LANCommander.Community.Launcher.MQTT.Plugin` +`\Plugins\LANCommander.Community.Launcher.MQTT` while the Launcher is stopped. Preserve its `Data` directory; do not copy the whole archive, `lib` wrapper, or any host DLLs into `Plugins`. ## Configure and build the source-pinned plugin -1. Install through the Launcher plugin manager (see above and the [test guide](examples/TEST-GUIDE.md)), restart the GUI and configure it in Launcher settings. Alternatively copy `src\LANCommander.Community.Launcher.MQTT.Plugin\homeassistant.example.json` to the plugin's `Data/homeassistant.json` and fill it in locally. `ExposureMode` is `"selected"` (default; `Favorites` is the UUID/title allowlist, now unlimited) or `"all"` (the authenticated visible library). An empty selection safely exposes no games. +1. Install through the Launcher plugin manager (see above and the [test guide](examples/TEST-GUIDE.md)), restart the GUI and configure it in Launcher settings. Alternatively copy `src\LANCommander.Community.Launcher.MQTT\homeassistant.example.json` to the plugin's `Data/homeassistant.json` and fill it in locally. `ExposureMode` is `"selected"` (default; `Favorites` is the UUID/title allowlist, now unlimited) or `"all"` (the authenticated visible library). An empty selection safely exposes no games. 2. Set `UseTls` to `false` for plaintext MQTT (usually port `1883`), or `true` for TLS (usually port `8883`). Use the port configured on your broker; it is not changed automatically. Certificate errors are ignored when TLS is enabled. Existing configurations must add `BrokerUsername` and `BrokerPassword`; no Credential Manager entry is read. 3. Use the repository validation command to materialize the pinned LANCommander `v2.2.0-beta.4` source commit and run the core/loader/template tests: @@ -199,7 +209,7 @@ host-loader checks against the actual artifact: ```powershell $env:LANCOMMANDER_SOURCE_ROOT = "C:\path\to\LANCommander" -pwsh .\eng\Test-LauncherPackage.ps1 -PackagePath "C:\path\to\LANCommander.Community.Launcher.MQTT.Plugin.0.2.1.nupkg" -ExpectedVersion 0.2.1 +pwsh .\eng\Test-LauncherPackage.ps1 -PackagePath "C:\path\to\LANCommander.Community.Launcher.MQTT.0.2.2.nupkg" -ExpectedVersion 0.2.2 ``` To render the discovery template exported by the **actual packaged assembly** and @@ -208,7 +218,7 @@ packages in `tests\ha-template-requirements.txt`): ```powershell $env:LANCOMMANDER_HA_TEMPLATE_EXPORT = Join-Path $env:TEMP "lancommander-ha-discovery.json" -pwsh .\eng\Test-LauncherPackage.ps1 -PackagePath "C:\path\to\LANCommander.Community.Launcher.MQTT.Plugin.0.2.1.nupkg" -ExpectedVersion 0.2.1 +pwsh .\eng\Test-LauncherPackage.ps1 -PackagePath "C:\path\to\LANCommander.Community.Launcher.MQTT.0.2.2.nupkg" -ExpectedVersion 0.2.2 python plugins\Launcher.MQTT\tools\Test-HaTemplates.py "$env:LANCOMMANDER_HA_TEMPLATE_EXPORT" --script plugins\Launcher.MQTT\examples\home-assistant-launch-game.yaml ``` diff --git a/plugins/Launcher.MQTT/examples/TEST-GUIDE.md b/plugins/Launcher.MQTT/examples/TEST-GUIDE.md index b08366c..a7cde33 100644 --- a/plugins/Launcher.MQTT/examples/TEST-GUIDE.md +++ b/plugins/Launcher.MQTT/examples/TEST-GUIDE.md @@ -1,4 +1,4 @@ -# Launcher test package 0.2.1 +# Launcher test package 0.2.2 Actual Windows GUI Launcher plugin targeting **LANCommander v2.2.0-beta.4**, source commit `675befe0673c03aded2b45995694661ce454ba95`, .NET 10. @@ -8,26 +8,28 @@ Its new GUI and real install workflow still require your smoke test. ## Install / upgrade -1. For an existing ZIP install, exit the Launcher and follow the +1. For an existing ZIP or `.Plugin` NuGet install, exit the Launcher and follow the [README migration steps](../README.md#install--upgrade) **before** installing the NuGet package. Back up settings and journal securely outside `Plugins`, - then move them to `Data` within the normalized plugin folder. The host - updater cannot preserve root files; uninstall deletes `Data` as well. + prepare legacy root files in the old folder's `Data`, and transfer the saved + `Data` into the new canonical folder after replacement. Remove old entry + assemblies; never load both identities. The host updater does not transfer + data across package IDs or preserve root files; uninstall deletes `Data` too. 2. Locate the existing Launcher **data/config root**, not just the executable directory. `LANCOMMANDER_DATA_DIR`, if set, is the exact root; otherwise it is normally `Data` beneath the Launcher's working directory. Protected locations can use local application data instead. Use the existing configuration/DB root. 3. Use the Launcher's plugin manager to install - `LANCommander.Community.Launcher.MQTT.Plugin.0.2.1.nupkg` from a local file + `LANCommander.Community.Launcher.MQTT.0.2.2.nupkg` from a local file or configured feed, and restart to apply the staged install. The resulting layout is: ```text \ Plugins\ - LANCommander.Community.Launcher.MQTT.Plugin\ - LANCommander.Community.Launcher.MQTT.Plugin.dll - LANCommander.Community.Launcher.MQTT.Plugin.deps.json + LANCommander.Community.Launcher.MQTT\ + LANCommander.Community.Launcher.MQTT.dll + LANCommander.Community.Launcher.MQTT.deps.json LANCommander.Community.Launcher.MQTT.Core.dll LANCommander.Community.Launcher.MQTT.Transport.dll MQTTnet.dll diff --git a/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Transport/HomeAssistantDiscovery.cs b/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Transport/HomeAssistantDiscovery.cs index 5ac5b41..7d34292 100644 --- a/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Transport/HomeAssistantDiscovery.cs +++ b/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Transport/HomeAssistantDiscovery.cs @@ -40,7 +40,7 @@ public static IReadOnlyList Create( { name = "LANCommander Home Assistant plugin", sw = PluginVersion, - url = "https://github.com/aaronpowell/LANCommander.Community/tree/main/plugins/Launcher.MQTT" + url = "https://github.com/LANCommander/LANCommander.Community/tree/main/plugins/Launcher.MQTT" }; var availabilityTopic = $"{topicPrefix}/availability"; var stateTopic = $"{topicPrefix}/state"; diff --git a/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/HomeAssistantLauncherPlugin.cs b/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/HomeAssistantLauncherPlugin.cs similarity index 100% rename from plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/HomeAssistantLauncherPlugin.cs rename to plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/HomeAssistantLauncherPlugin.cs diff --git a/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/HomeAssistantPluginSettings.cs b/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/HomeAssistantPluginSettings.cs similarity index 100% rename from plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/HomeAssistantPluginSettings.cs rename to plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/HomeAssistantPluginSettings.cs diff --git a/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/HomeAssistantRuntime.cs b/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/HomeAssistantRuntime.cs similarity index 100% rename from plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/HomeAssistantRuntime.cs rename to plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/HomeAssistantRuntime.cs diff --git a/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/HomeAssistantSettingsExtension.cs b/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/HomeAssistantSettingsExtension.cs similarity index 100% rename from plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/HomeAssistantSettingsExtension.cs rename to plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/HomeAssistantSettingsExtension.cs diff --git a/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/LANCommander.Community.Launcher.MQTT.Plugin.csproj b/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/LANCommander.Community.Launcher.MQTT.csproj similarity index 95% rename from plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/LANCommander.Community.Launcher.MQTT.Plugin.csproj rename to plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/LANCommander.Community.Launcher.MQTT.csproj index f6938b7..830b525 100644 --- a/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/LANCommander.Community.Launcher.MQTT.Plugin.csproj +++ b/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/LANCommander.Community.Launcher.MQTT.csproj @@ -1,14 +1,14 @@ LANCommander.Community.Launcher.MQTT - LANCommander.Community.Launcher.MQTT.Plugin - LANCommander.Community.Launcher.MQTT.Plugin + LANCommander.Community.Launcher.MQTT + LANCommander.Community.Launcher.MQTT net10.0 enable enable true Generic MQTT command and state integration for the LANCommander GUI Launcher, with Home Assistant discovery. - https://github.com/aaronpowell/LANCommander.Community + https://github.com/LANCommander/LANCommander.Community LANCommander.Plugin;LANCommander.Plugin.Launcher LANCommander;plugin;launcher;mqtt;homeassistant README.md diff --git a/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/LANCommanderGameLaunchHost.cs b/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/LANCommanderGameLaunchHost.cs similarity index 100% rename from plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/LANCommanderGameLaunchHost.cs rename to plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/LANCommanderGameLaunchHost.cs diff --git a/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/homeassistant.example.json b/plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/homeassistant.example.json similarity index 100% rename from plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT.Plugin/homeassistant.example.json rename to plugins/Launcher.MQTT/src/LANCommander.Community.Launcher.MQTT/homeassistant.example.json diff --git a/plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests.csproj b/plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests.csproj index 8ae6f53..bc7a201 100644 --- a/plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests.csproj +++ b/plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests.csproj @@ -23,7 +23,7 @@ - + diff --git a/plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests/PluginLoadContextTests.cs b/plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests/PluginLoadContextTests.cs index 1d1c279..1ac6362 100644 --- a/plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests/PluginLoadContextTests.cs +++ b/plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests/PluginLoadContextTests.cs @@ -55,7 +55,7 @@ public void Plugin_entrypoint_and_host_service_types_bind_to_host_assemblies() var pluginDirectory = Path.GetDirectoryName(pluginPath!)!; Assert.NotNull(manifest); - Assert.Equal("LANCommander.Community.Launcher.MQTT.Plugin", pluginAssembly.GetName().Name); + Assert.Equal("LANCommander.Community.Launcher.MQTT", pluginAssembly.GetName().Name); Assert.Equal("2.2.0-beta.4", manifest.MinHostVersion); Assert.Equal("2.2.0-beta.4", manifest.MaxHostVersion); Assert.True(typeof(IPlugin).IsAssignableFrom(manifest!.EntryPoint)); @@ -96,7 +96,7 @@ public void Plugin_entrypoint_and_host_service_types_bind_to_host_assemblies() new[] { "LANCommander.Community.Launcher.MQTT.Core.dll", - "LANCommander.Community.Launcher.MQTT.Plugin.dll", + "LANCommander.Community.Launcher.MQTT.dll", "LANCommander.Community.Launcher.MQTT.Transport.dll", "MQTTnet.dll" }, diff --git a/plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests/PluginPackageTests.cs b/plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests/PluginPackageTests.cs index 45aba3b..651dacc 100644 --- a/plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests/PluginPackageTests.cs +++ b/plugins/Launcher.MQTT/tests/LANCommander.Community.Launcher.MQTT.HostLoader.Tests/PluginPackageTests.cs @@ -26,7 +26,7 @@ public async Task Actual_package_is_discoverable_installs_loads_and_preserves_da var search = await feeds.SearchAsync("", PluginPackageTypes.Launcher); Assert.Empty(search.Errors); var listed = Assert.Single(search.Packages); - Assert.Equal("LANCommander.Community.Launcher.MQTT.Plugin", listed.Id); + Assert.Equal("LANCommander.Community.Launcher.MQTT", listed.Id); Assert.Equal(expectedVersion, listed.Version); Assert.Empty((await feeds.SearchAsync("", PluginPackageTypes.Server)).Packages); var staging = new PluginStaging(root, Path.Combine(root, ".staging")); diff --git a/plugins/Launcher.MQTT/version.txt b/plugins/Launcher.MQTT/version.txt index 0c62199..ee1372d 100644 --- a/plugins/Launcher.MQTT/version.txt +++ b/plugins/Launcher.MQTT/version.txt @@ -1 +1 @@ -0.2.1 +0.2.2 diff --git a/plugins/Server.Mcp/CHANGELOG.md b/plugins/Server.Mcp/CHANGELOG.md index b3c53ad..a01b91b 100644 --- a/plugins/Server.Mcp/CHANGELOG.md +++ b/plugins/Server.Mcp/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 0.2.3 + +- Link package/project metadata to the transferred + `LANCommander/LANCommander.Community` repository. The canonical project, + package and assembly name remains `LANCommander.Community.Server.Mcp`. +- Keep the published 0.2.2 package immutable; runtime plugin ID and host + compatibility are unchanged. +- Exercise the isolated host loader and HTTP contracts against the extracted + NuGet payload as well as local build output. + ## 0.2.2 - Update host packages and minimum host version to LANCommander 2.2.0-beta.4. diff --git a/plugins/Server.Mcp/README.md b/plugins/Server.Mcp/README.md index 72106cb..41920e9 100644 --- a/plugins/Server.Mcp/README.md +++ b/plugins/Server.Mcp/README.md @@ -29,7 +29,7 @@ pwsh .\eng\Validate-Plugin.ps1 -Plugin Server.Mcp -OutputDirectory "$env:TEMP\se ``` The selected package is written to the output directory as -`LANCommander.Community.Server.Mcp.0.2.2.nupkg`. Upload it through the server's plugin +`LANCommander.Community.Server.Mcp.0.2.3.nupkg`. Upload it through the server's plugin package installer, then restart LANCommander. The package declares `LANCommander.Plugin` and `LANCommander.Plugin.Server` and bundles its private dependencies and dependency manifest under `lib/net10.0`. Host-owned LANCommander @@ -53,8 +53,8 @@ runtime assembly name, and project name now match; the persistent plugin ID is unchanged. Do not copy just the main DLL. Use either manual installation or the package installer, not both. -The published `0.2.0` and `0.2.1` packages are historical and are not replaced -by version `0.2.2`. See the repository's +The published `0.2.0`, `0.2.1` and `0.2.2` packages are historical and are not replaced +by version `0.2.3`. See the repository's [plugin release procedure](../../RELEASES.md) for the current tag, workflow, and publication behavior. diff --git a/plugins/Server.Mcp/eng/Test-Package.ps1 b/plugins/Server.Mcp/eng/Test-Package.ps1 index 3b29720..3ac28a5 100644 --- a/plugins/Server.Mcp/eng/Test-Package.ps1 +++ b/plugins/Server.Mcp/eng/Test-Package.ps1 @@ -98,3 +98,17 @@ try { finally { $archive.Dispose() } + +$temporary = Join-Path ([IO.Path]::GetTempPath()) "mcp-package-$([Guid]::NewGuid().ToString('N'))" +$previousPlugin = $env:LANCOMMANDER_MCP_PLUGIN_PATH +try { + [IO.Compression.ZipFile]::ExtractToDirectory($package.FullName, $temporary) + $env:LANCOMMANDER_MCP_PLUGIN_PATH = Join-Path $temporary 'lib/net10.0/LANCommander.Community.Server.Mcp.dll' + & dotnet test (Join-Path $PSScriptRoot '../tests/LANCommander.Community.Server.Mcp.Tests/LANCommander.Community.Server.Mcp.Tests.csproj') ` + -c Release --nologo --filter 'FullyQualifiedName~McpHttpTests' + if ($LASTEXITCODE -ne 0) { throw 'Packaged MCP loader/HTTP contract checks failed.' } +} +finally { + $env:LANCOMMANDER_MCP_PLUGIN_PATH = $previousPlugin + if (Test-Path -LiteralPath $temporary) { Remove-Item -LiteralPath $temporary -Recurse -Force } +} diff --git a/plugins/Server.Mcp/src/LANCommander.Community.Server.Mcp/LANCommander.Community.Server.Mcp.csproj b/plugins/Server.Mcp/src/LANCommander.Community.Server.Mcp/LANCommander.Community.Server.Mcp.csproj index e304fdb..ee55c4a 100644 --- a/plugins/Server.Mcp/src/LANCommander.Community.Server.Mcp/LANCommander.Community.Server.Mcp.csproj +++ b/plugins/Server.Mcp/src/LANCommander.Community.Server.Mcp/LANCommander.Community.Server.Mcp.csproj @@ -11,8 +11,8 @@ aaronpowell Administrator-only MCP catalog management for LANCommander servers. MIT - https://github.com/aaronpowell/LANCommander.Community - https://github.com/aaronpowell/LANCommander.Community/tree/main/plugins/Server.Mcp + https://github.com/LANCommander/LANCommander.Community + https://github.com/LANCommander/LANCommander.Community/tree/main/plugins/Server.Mcp README.md LANCommander;plugin;server;mcp LANCommander.Plugin;LANCommander.Plugin.Server diff --git a/plugins/Server.Mcp/tests/LANCommander.Community.Server.Mcp.Tests/McpHttpTests.cs b/plugins/Server.Mcp/tests/LANCommander.Community.Server.Mcp.Tests/McpHttpTests.cs index fb71883..c754703 100644 --- a/plugins/Server.Mcp/tests/LANCommander.Community.Server.Mcp.Tests/McpHttpTests.cs +++ b/plugins/Server.Mcp/tests/LANCommander.Community.Server.Mcp.Tests/McpHttpTests.cs @@ -46,7 +46,8 @@ public async Task InitializeAsync() builder.Services.AddScoped(_ => _redistributables.Object); builder.Services.AddScoped(_ => _servers.Object); builder.Services.AddScoped(_ => _metadata.Object); - var pluginPath = Path.Combine(AppContext.BaseDirectory, "plugin", "LANCommander.Community.Server.Mcp.dll"); + var pluginPath = Environment.GetEnvironmentVariable("LANCOMMANDER_MCP_PLUGIN_PATH") + ?? Path.Combine(AppContext.BaseDirectory, "plugin", "LANCommander.Community.Server.Mcp.dll"); var loadContext = new PluginLoadContext(pluginPath); var assembly = loadContext.LoadFromAssemblyPath(pluginPath); var pluginAttribute = Assert.Single(assembly.GetCustomAttributes(typeof(LANCommanderPluginAttribute), false) diff --git a/plugins/Server.Mcp/version.txt b/plugins/Server.Mcp/version.txt index ee1372d..7179039 100644 --- a/plugins/Server.Mcp/version.txt +++ b/plugins/Server.Mcp/version.txt @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/plugins/Server.Quake3/CHANGELOG.md b/plugins/Server.Quake3/CHANGELOG.md index 22857c1..a780335 100644 --- a/plugins/Server.Quake3/CHANGELOG.md +++ b/plugins/Server.Quake3/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-beta.2 + +- Link package metadata to the transferred + `LANCommander/LANCommander.Community` repository. The canonical project, + package and assembly name remains `LANCommander.Community.Server.Quake3`. +- Keep the published 0.1.0-beta.1 package immutable; runtime plugin ID, + persisted server state and host compatibility are unchanged. + ## 0.1.0-beta.1 - Update host packages and minimum host version to LANCommander 2.2.0-beta.4. diff --git a/plugins/Server.Quake3/LANCommander.Community.Server.Quake3/LANCommander.Community.Server.Quake3.csproj b/plugins/Server.Quake3/LANCommander.Community.Server.Quake3/LANCommander.Community.Server.Quake3.csproj index faad1a0..2dff768 100644 --- a/plugins/Server.Quake3/LANCommander.Community.Server.Quake3/LANCommander.Community.Server.Quake3.csproj +++ b/plugins/Server.Quake3/LANCommander.Community.Server.Quake3/LANCommander.Community.Server.Quake3.csproj @@ -7,7 +7,7 @@ Quake 3 Server Manager for LANCommander. README.md MIT - https://github.com/aaronpowell/LANCommander.Community + https://github.com/LANCommander/LANCommander.Community LANCommander.Plugin;LANCommander.Plugin.Server LANCommander;plugin;server;quake3 true diff --git a/plugins/Server.Quake3/version.txt b/plugins/Server.Quake3/version.txt index 4ab2ff6..b1b57dd 100644 --- a/plugins/Server.Quake3/version.txt +++ b/plugins/Server.Quake3/version.txt @@ -1 +1 @@ -0.1.0-beta.1 +0.1.0-beta.2 diff --git a/plugins/Server.RecompCatalog/CHANGELOG.md b/plugins/Server.RecompCatalog/CHANGELOG.md index a2344a6..d59dbac 100644 --- a/plugins/Server.RecompCatalog/CHANGELOG.md +++ b/plugins/Server.RecompCatalog/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 0.4.4 + +- Rename the entry project, namespace, assembly and NuGet package to + `LANCommander.Community.Server.RecompCatalog` (remove `.Plugin`). +- This is a new feed identity, not an update to the published + `LANCommander.Community.Server.RecompCatalog.Plugin` 0.4.2/0.4.3 packages. + Follow the README's stopped-host replacement procedure; the runtime plugin + ID, catalog/game/ROM IDs, configuration and imported data are unchanged. +- Link package metadata to the transferred LANCommander community repository. + ## 0.4.3 - Update host packages and minimum host version to LANCommander 2.2.0-beta.4. diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/CatalogImportSafetyTests.cs b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/CatalogImportSafetyTests.cs index 6b2c0bc..465fd5c 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/CatalogImportSafetyTests.cs +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/CatalogImportSafetyTests.cs @@ -1,5 +1,5 @@ using LANCommander.Community.Server.RecompCatalog.Core; -using LANCommander.Community.Server.RecompCatalog.Plugin; +using LANCommander.Community.Server.RecompCatalog; using Microsoft.Extensions.DependencyInjection; namespace LANCommander.Community.Server.RecompCatalog.Tests; diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/HostContractTests.cs b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/HostContractTests.cs index 9645ff5..5cbdec5 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/HostContractTests.cs +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/HostContractTests.cs @@ -1,11 +1,15 @@ using System.Reflection; +using System.IO.Compression; +using System.Runtime.Loader; using LANCommander.Community.Server.RecompCatalog.Core; using LANCommander.Community.Server.RecompCatalog.Infrastructure; using LANCommander.Community.Server.RecompCatalog.Providers; -using LANCommander.Community.Server.RecompCatalog.Plugin; +using LANCommander.Community.Server.RecompCatalog; using LANCommander.SDK.Enums; using LANCommander.SDK.Plugins; using LANCommander.Server.Plugins; +using Microsoft.AspNetCore.Components; +using Microsoft.Extensions.DependencyInjection; using ManifestGame = LANCommander.SDK.Models.Manifest.Game; using ManifestGenre = LANCommander.SDK.Models.Manifest.Genre; @@ -14,6 +18,60 @@ namespace LANCommander.Community.Server.RecompCatalog.Tests; /// Exercises the plugin's host adapters against the published LANCommander.Server.Plugins contracts. public class HostContractTests { + [Fact] + public void LoadsCanonicalEntryAssemblyWithSharedHostContracts() + { + var context = new PackageLoadContext(Environment.GetEnvironmentVariable("RECOMPCATALOG_TEST_PACKAGE")); + try + { + var assembly = context.LoadPrivateAssembly("LANCommander.Community.Server.RecompCatalog"); + Assert.NotSame(typeof(RecompCatalogPlugin).Assembly, assembly); + Assert.Equal("LANCommander.Community.Server.RecompCatalog", assembly.GetName().Name); + var attribute = assembly.GetCustomAttribute(); + Assert.NotNull(attribute); + Assert.Equal(PluginHost.Server, attribute.Hosts); + var pluginType = Assert.Single(assembly.GetTypes(), + type => typeof(IPlugin).IsAssignableFrom(type) && !type.IsAbstract); + var plugin = Assert.IsAssignableFrom(Activator.CreateInstance(pluginType)); + Assert.Equal("dev.aaronpowell.lancommander.recompcatalog", plugin.Id); + var services = new ServiceCollection(); + plugin.ConfigureServices(services); + using var provider = services.BuildServiceProvider(); + Assert.Equal("/Plugins/RecompCatalog", + Assert.Single(provider.GetServices()).Href); + var page = Assert.Single(assembly.GetTypes(), type => typeof(ComponentBase).IsAssignableFrom(type) + && type.GetCustomAttribute()?.Template == "/Plugins/RecompCatalog"); + Assert.Equal(PluginAccessPolicy.Administrator, + page.GetCustomAttribute()!.Policy); + } + finally { context.Unload(); } + } + + private sealed class PackageLoadContext(string? packagePath) : AssemblyLoadContext(isCollectible: true) + { + public Assembly LoadPrivateAssembly(string name) + { + using var archive = packagePath is null ? null : ZipFile.OpenRead(packagePath); + using var stream = archive is null + ? File.OpenRead(Path.Combine(Path.GetDirectoryName(typeof(RecompCatalogPlugin).Assembly.Location)!, $"{name}.dll")) + : (archive.GetEntry($"lib/net10.0/{name}.dll") + ?? throw new InvalidDataException($"Missing packaged private assembly {name}.")).Open(); + using var assemblyBytes = new MemoryStream(); + stream.CopyTo(assemblyBytes); + assemblyBytes.Position = 0; + return LoadFromStream(assemblyBytes); + } + + protected override Assembly? Load(AssemblyName name) + { + if (name.Name is null) return null; + if (name.Name == "LANCommander.Community.Server.RecompCatalog" + || name.Name.StartsWith("LANCommander.Community.Server.RecompCatalog.", StringComparison.Ordinal)) + return LoadPrivateAssembly(name.Name); + return Default.LoadFromAssemblyName(name); + } + } + [Fact] public void DeclaresMinimumHostVersionForPublishedContracts() { diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/LANCommander.Community.Server.RecompCatalog.Tests.csproj b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/LANCommander.Community.Server.RecompCatalog.Tests.csproj index f79d438..815c2dd 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/LANCommander.Community.Server.RecompCatalog.Tests.csproj +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/LANCommander.Community.Server.RecompCatalog.Tests.csproj @@ -25,7 +25,7 @@ - + diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/PluginServiceRegistrationTests.cs b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/PluginServiceRegistrationTests.cs index 2d82249..6ac479b 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/PluginServiceRegistrationTests.cs +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/PluginServiceRegistrationTests.cs @@ -1,5 +1,5 @@ using LANCommander.Community.Server.RecompCatalog.Core; -using LANCommander.Community.Server.RecompCatalog.Plugin; +using LANCommander.Community.Server.RecompCatalog; using LANCommander.Server.Plugins; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/RomRedistributableTests.cs b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/RomRedistributableTests.cs index f2ebdd2..40b627e 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/RomRedistributableTests.cs +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Tests/RomRedistributableTests.cs @@ -2,7 +2,7 @@ using System.Security.Cryptography; using LANCommander.Community.Server.RecompCatalog.Core; using LANCommander.Community.Server.RecompCatalog.Infrastructure; -using LANCommander.Community.Server.RecompCatalog.Plugin; +using LANCommander.Community.Server.RecompCatalog; using LANCommander.SDK.Enums; using LANCommander.SDK.Helpers; using LANCommander.SDK.Models.Manifest; diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.slnx b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.slnx index 75c439d..67bf7d5 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.slnx +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.slnx @@ -3,5 +3,5 @@ - + diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/CatalogHostIntegration.cs b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/CatalogHostIntegration.cs similarity index 99% rename from plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/CatalogHostIntegration.cs rename to plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/CatalogHostIntegration.cs index fc3ae48..2d95c77 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/CatalogHostIntegration.cs +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/CatalogHostIntegration.cs @@ -3,7 +3,7 @@ using System.Text.Json; using ManifestGame = LANCommander.SDK.Models.Manifest.Game; -namespace LANCommander.Community.Server.RecompCatalog.Plugin; +namespace LANCommander.Community.Server.RecompCatalog; public interface ICatalogHostIntegration { diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/CatalogImportGate.cs b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/CatalogImportGate.cs similarity index 96% rename from plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/CatalogImportGate.cs rename to plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/CatalogImportGate.cs index feb01df..f70bd2e 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/CatalogImportGate.cs +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/CatalogImportGate.cs @@ -1,6 +1,6 @@ using LANCommander.Community.Server.RecompCatalog.Core; -namespace LANCommander.Community.Server.RecompCatalog.Plugin; +namespace LANCommander.Community.Server.RecompCatalog; internal sealed class CatalogImportGate : IDisposable { diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/CatalogImportWorkflow.cs b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/CatalogImportWorkflow.cs similarity index 98% rename from plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/CatalogImportWorkflow.cs rename to plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/CatalogImportWorkflow.cs index ff5e2dc..efdf341 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/CatalogImportWorkflow.cs +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/CatalogImportWorkflow.cs @@ -3,7 +3,7 @@ using LANCommander.SDK.Enums; using LANCommander.Server.Plugins; -namespace LANCommander.Community.Server.RecompCatalog.Plugin; +namespace LANCommander.Community.Server.RecompCatalog; internal sealed record PreparedImportArtifact( NormalizedArtifact Artifact, diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/CatalogRomHost.cs b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/CatalogRomHost.cs similarity index 99% rename from plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/CatalogRomHost.cs rename to plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/CatalogRomHost.cs index 1e10fbc..570a62e 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/CatalogRomHost.cs +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/CatalogRomHost.cs @@ -4,7 +4,7 @@ using LANCommander.Server.Plugins; using System.Text.Json; -namespace LANCommander.Community.Server.RecompCatalog.Plugin; +namespace LANCommander.Community.Server.RecompCatalog; /// Host operations for ROM redistributables created by this plugin. public interface ICatalogRomHost diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/Components/RomManager.razor b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/Components/RomManager.razor similarity index 100% rename from plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/Components/RomManager.razor rename to plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/Components/RomManager.razor diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/InlineProgress.cs b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/InlineProgress.cs similarity index 78% rename from plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/InlineProgress.cs rename to plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/InlineProgress.cs index 67a5fde..37d04ba 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/InlineProgress.cs +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/InlineProgress.cs @@ -1,4 +1,4 @@ -namespace LANCommander.Community.Server.RecompCatalog.Plugin; +namespace LANCommander.Community.Server.RecompCatalog; // Progress posts reports asynchronously, so a late report could overwrite a final status message. internal sealed class InlineProgress(Action report) : IProgress diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/LANCommander.Community.Server.RecompCatalog.Plugin.csproj b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.csproj similarity index 86% rename from plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/LANCommander.Community.Server.RecompCatalog.Plugin.csproj rename to plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.csproj index a273758..7dc0c8f 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/LANCommander.Community.Server.RecompCatalog.Plugin.csproj +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.csproj @@ -2,17 +2,17 @@ net10.0 - LANCommander.Community.Server.RecompCatalog.Plugin - LANCommander.Community.Server.RecompCatalog.Plugin + LANCommander.Community.Server.RecompCatalog + LANCommander.Community.Server.RecompCatalog enable enable true true - LANCommander.Community.Server.RecompCatalog.Plugin + LANCommander.Community.Server.RecompCatalog Aaron Powell Independent Quiver-compatible recompilation catalog browser and game importer for LANCommander Server. - https://github.com/aaronpowell/LANCommander.Community/tree/main/plugins/Server.RecompCatalog - https://github.com/aaronpowell/LANCommander.Community + https://github.com/LANCommander/LANCommander.Community/tree/main/plugins/Server.RecompCatalog + https://github.com/LANCommander/LANCommander.Community git LICENSE README.md diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/Pages/Index.razor b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/Pages/Index.razor similarity index 100% rename from plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/Pages/Index.razor rename to plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/Pages/Index.razor diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/RecompCatalogPlugin.cs b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/RecompCatalogPlugin.cs similarity index 96% rename from plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/RecompCatalogPlugin.cs rename to plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/RecompCatalogPlugin.cs index cc919cd..631a125 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/RecompCatalogPlugin.cs +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/RecompCatalogPlugin.cs @@ -1,7 +1,7 @@ using System.Reflection; using LANCommander.Community.Server.RecompCatalog.Core; using LANCommander.Community.Server.RecompCatalog.Infrastructure; -using LANCommander.Community.Server.RecompCatalog.Plugin; +using LANCommander.Community.Server.RecompCatalog; using LANCommander.Community.Server.RecompCatalog.Providers; using LANCommander.SDK.Plugins; using LANCommander.Server.Plugins; @@ -15,7 +15,7 @@ MinHostVersion = "2.2.0-beta.4", Hosts = PluginHost.Server)] -namespace LANCommander.Community.Server.RecompCatalog.Plugin; +namespace LANCommander.Community.Server.RecompCatalog; /// /// Server plugin entry point for browsing compatible recompilation catalogs and importing diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/RecompCatalogServices.cs b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/RecompCatalogServices.cs similarity index 95% rename from plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/RecompCatalogServices.cs rename to plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/RecompCatalogServices.cs index d062dec..32da4da 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/RecompCatalogServices.cs +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/RecompCatalogServices.cs @@ -2,7 +2,7 @@ using LANCommander.Community.Server.RecompCatalog.Infrastructure; using Microsoft.Extensions.Configuration; -namespace LANCommander.Community.Server.RecompCatalog.Plugin; +namespace LANCommander.Community.Server.RecompCatalog; internal sealed record RecompCatalogSettings(string? FeedUrl) { diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/ServerExtensions.cs b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/ServerExtensions.cs similarity index 93% rename from plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/ServerExtensions.cs rename to plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/ServerExtensions.cs index a0aafdf..364c35b 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/ServerExtensions.cs +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/ServerExtensions.cs @@ -1,7 +1,7 @@ using System.Reflection; using LANCommander.Server.Plugins; -namespace LANCommander.Community.Server.RecompCatalog.Plugin; +namespace LANCommander.Community.Server.RecompCatalog; /// Exposes this assembly's routable Razor components to the server's router. internal sealed record RecompCatalogRouteAssemblyExtension(Assembly Assembly) : IServerRouteAssemblyExtension; diff --git a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/_Imports.razor b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/_Imports.razor similarity index 69% rename from plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/_Imports.razor rename to plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/_Imports.razor index 54462a9..cb11071 100644 --- a/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog.Plugin/_Imports.razor +++ b/plugins/Server.RecompCatalog/LANCommander.Community.Server.RecompCatalog/_Imports.razor @@ -3,7 +3,7 @@ @using Microsoft.AspNetCore.Components @using Microsoft.AspNetCore.Components.Web @using LANCommander.Community.Server.RecompCatalog.Core -@using LANCommander.Community.Server.RecompCatalog.Plugin -@using LANCommander.Community.Server.RecompCatalog.Plugin.Components +@using LANCommander.Community.Server.RecompCatalog +@using LANCommander.Community.Server.RecompCatalog.Components @using LANCommander.Server.Plugins @using LANCommander.Server.UI.Controls diff --git a/plugins/Server.RecompCatalog/README.md b/plugins/Server.RecompCatalog/README.md index 15b977e..a58b723 100644 --- a/plugins/Server.RecompCatalog/README.md +++ b/plugins/Server.RecompCatalog/README.md @@ -39,11 +39,11 @@ LANCommander server build that carries the plugin contracts described under [Build](#build) and the [host load-context prerequisite](#host-load-context-prerequisite). 1. Download the NuGet package and its `.sha256` file from the - [community releases page](https://github.com/aaronpowell/LANCommander.Community/releases), and + [community releases page](https://github.com/LANCommander/LANCommander.Community/releases), and verify the hash: ```powershell - $package = 'LANCommander.Community.Server.RecompCatalog.Plugin.0.4.3.nupkg' + $package = 'LANCommander.Community.Server.RecompCatalog.0.4.4.nupkg' $expected = (Get-Content "$package.sha256").Split(' ')[0] (Get-FileHash $package -Algorithm SHA256).Hash.ToLowerInvariant() -eq $expected ``` @@ -81,7 +81,7 @@ Standard `dotnet pack` also produces the same package layout; the script adds va checksum. Host assemblies are compile-time references, not bundled dependencies. ```powershell -dotnet pack .\plugins\Server.RecompCatalog\LANCommander.Community.Server.RecompCatalog.Plugin\LANCommander.Community.Server.RecompCatalog.Plugin.csproj -c Release -o artifacts +dotnet pack .\plugins\Server.RecompCatalog\LANCommander.Community.Server.RecompCatalog\LANCommander.Community.Server.RecompCatalog.csproj -c Release -o artifacts ``` Pull request CI validates all components. A component tag publishes this @@ -108,7 +108,7 @@ dotnet test .\plugins\Server.RecompCatalog\LANCommander.Community.Server.RecompC ## Server plugin -`LANCommander.Community.Server.RecompCatalog.Plugin` is the server-side plugin. It registers an +`LANCommander.Community.Server.RecompCatalog` is the server-side plugin. It registers an `IServerRouteAssemblyExtension` and an `IServerNavigationExtension`, and serves an administrator-only catalog browser at `/Plugins/RecompCatalog`. @@ -268,11 +268,31 @@ never writes game/archive rows directly. The imported package carries the catalog identity, exact release identity, and serialized update policy so later catalog refreshes can classify existing games without title matching. -When replacing an earlier manual install, stop the server, remove the old -`Plugins\LANCommander.RecompCatalog.Plugin` folder, and install the new package -or complete output under `Plugins\LANCommander.Community.Server.RecompCatalog.Plugin`. -Imported games, archives, and package scripts live in LANCommander's data store, -not the plugin folder; keep the same plugin ID when replacing the plugin. +### Replacing the old package identity (0.4.4) + +`LANCommander.Community.Server.RecompCatalog.Plugin` 0.4.2 and 0.4.3 were +published. They and their tags/assets remain immutable. Version 0.4.4 uses the +new feed ID `LANCommander.Community.Server.RecompCatalog`; package managers +do not discover it as a newer version of the old ID. + +Stop the server and securely back up the old plugin directory outside `Plugins`, +including any `Data` directory. Remove the old +`Plugins\LANCommander.Community.Server.RecompCatalog.Plugin` directory (or +`Plugins\LANCommander.RecompCatalog.Plugin` for older manual installs), then +install the new package through **Settings > Plugins** and stop the server +again before activation. Restore any saved `Data` to +`Plugins\LANCommander.Community.Server.RecompCatalog\Data`, reconciling conflicts +rather than overwriting them. For manual installation, extract only +`lib/net10.0` contents into the new plugin directory. +Never leave both old and new entry DLLs/directories installed: they declare +the same runtime plugin ID. Restart and confirm a single Recomp Catalog plugin. +For rollback, stop the server and restore the old directory/backup instead of +loading both. + +The semantic plugin ID, configuration keys, deterministic catalog/game/ROM IDs +and custom fields are unchanged. Imported games, archives and package scripts +live in LANCommander's data store, not the plugin folder. No data migration or +automatic cross-package upgrade is introduced. The host packages (`LANCommander.SDK`, `LANCommander.Server.Plugins`, and `LANCommander.Server.UI`) are referenced with `ExcludeAssets="runtime"` and `PrivateAssets="all"`, diff --git a/plugins/Server.RecompCatalog/version.txt b/plugins/Server.RecompCatalog/version.txt index 17b2ccd..6f2743d 100644 --- a/plugins/Server.RecompCatalog/version.txt +++ b/plugins/Server.RecompCatalog/version.txt @@ -1 +1 @@ -0.4.3 +0.4.4