From 61a449cced49914e7ee12b50c85924bea5e3f7e6 Mon Sep 17 00:00:00 2001 From: contr Date: Fri, 23 Oct 2026 22:22:15 +0300 Subject: [PATCH] feat: add kit version and release update guide --- CHANGELOG.md | 13 ++++++++++++ README.md | 10 +++++++-- docs/UPDATING.md | 52 +++++++++++++++++++++++++++++++++++++++++++++ scripts/mcsource.py | 2 ++ 4 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 docs/UPDATING.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..1f8f26d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +## v0.1.0 — Unreleased + +The first release is being prepared and has not been published. + +- Adds a local workflow for preparing and binding Minecraft client source references. Full preparation has been validated for Minecraft 26.2 on Windows with JDK 25; this does not establish support for other versions or platforms. +- Blocks source preparation for known unnamed clients; the 1.21.1 official client was verified and correctly rejected. Remapping is not implemented. +- Provides provenance checks against Mojang's official client metadata. Verification is explicit and required when `--verify-official` is selected. +- Uses pinned decompiler tools with integrity checks, with optional conservative recovery for reported CFR failures. +- Provides project checks and binding resolution for review. Setup and binding do not write to the target mod project. +- Adds `python scripts/mcsource.py --version` to identify the checked-out kit version. The kit does not update itself. +- Licenses the kit's original code and documentation under `GPL-3.0-only`. diff --git a/README.md b/README.md index 2c4252b..1fea6ec 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A local, agent-guided workflow for reading the Minecraft version you actually target. -**Status: early development.** Current validation covers a local Minecraft 26.2 client JAR on Windows with JDK 25. Read-only target checks and binding were also exercised against a real 26.2 Fabric mod; see [validation results](docs/VALIDATION.md). The 1.21.1 client has negative-path validation only: official verification succeeds, but named-source preparation rejects it. Other versions, mappings, and full preparation on other operating systems are not yet verified. +**Status: early development; preparing the first `v0.1.0` release.** Current validation covers a local Minecraft 26.2 client JAR on Windows with JDK 25. Read-only target checks and binding were also exercised against a real 26.2 Fabric mod; see [validation results](docs/VALIDATION.md). The 1.21.1 client has negative-path validation only: official verification succeeds, but named-source preparation rejects it. Other versions, mappings, and full preparation on other operating systems are not yet verified. The kit prepares a source reference beside your mod project. It does not edit mod code, build files, dependencies, or project instructions during setup. No MCP server, hosted service, or Python packages are required. @@ -14,13 +14,19 @@ Source preparation currently targets named (unobfuscated) client JARs; full sour Requirements: Python 3.10+, Git, and a full JDK (9 or newer; 17+ for Vineflower recovery) capable of reading the input bytecode (`java`, `javac`, `jar`, and `javap`). -1. Clone this kit outside your mod project. +1. Clone this kit outside your mod project. See [installation and updates](docs/UPDATING.md) for release selection and in-place upgrades. 2. Place your Minecraft client JAR in `.local/inputs/`, or keep it elsewhere and provide its path. 3. Open your coding agent with access to this kit and your mod project. 4. Ask: **Read this kit's AGENTS.md and docs/AGENT_GUIDE.md. Set up a local Minecraft source reference for my project at , using . Do not modify my project during setup.** The agent checks the project target, inspects your JAR, prepares the reference, and reports any mismatch or decompiler limitations. You do not need to install an agent skill. +## Versions and updates + +Run `python scripts/mcsource.py --version` to print the kit version without inspecting a JAR or downloading tools. The version string identifies the release line; use `git describe --tags --always` to identify the checkout revision during development. + +Published releases will use tags such as `v0.1.0` and matching GitHub Releases. Until the first release is published, `main` is a development checkout. Updates are explicit and performed in the existing Git checkout; they do not automatically regenerate sources. Follow [the update guide](docs/UPDATING.md) and review [CHANGELOG.md](CHANGELOG.md). + ## Commands Run commands from the kit root; the agent chooses the needed steps. `prepare --verify-official` already verifies the input, so a separate `verify` call is only needed for standalone diagnostics: diff --git a/docs/UPDATING.md b/docs/UPDATING.md new file mode 100644 index 0000000..9131a1b --- /dev/null +++ b/docs/UPDATING.md @@ -0,0 +1,52 @@ +# Updating the kit + +The first release, `v0.1.0`, is being prepared and is not published yet. Wait until it appears in the [upstream Releases page](https://github.com/Lightre/minecraft-source-kit/releases) before using the release install command below. + +## Install a published release + +Clone the kit outside your mod project, then switch to the published tag: + +```text +git clone https://github.com/Lightre/minecraft-source-kit.git +cd minecraft-source-kit +git fetch --tags origin +git switch --detach v0.1.0 +``` + +Replace `v0.1.0` with another published release tag when choosing a later release. To use current development code instead, clone or update the repository's `main` branch; it may change between releases. + +## Update an existing checkout + +Update inside the existing kit directory. Do not reclone over the kit or delete `.local`; it contains local inputs, tools, references, and project bindings. + +1. Check the kit version with `python scripts/mcsource.py --version`. Older development checkouts may not have this flag; use the Git revision instead. +2. Confirm `git status --short` shows no tracked-file changes. Preserve any other untracked files too; stop if a checkout would overwrite them. Ignored files in `.local` are expected and may remain. +3. Record the current revision with `git describe --tags --always`. +4. Fetch tags: `git fetch --tags origin`. +5. Review the upstream release notes for the chosen, known published tag (for example, `v0.1.0`). +6. Switch the existing checkout: `git switch --detach v0.1.0`. +7. Resolve each project binding again before using its reference: + + ```text + python scripts/mcsource.py resolve --project "" + ``` + +Investigate any `stale` or `binding_missing` result and review the project and reference before rebinding. Do not blindly rebind or decompile again. Updating the kit does not write to the mod project. A pinned tool may be fetched when preparation or repair actually needs it. + +The kit does not overwrite an existing generated reference, and it currently has no option to force a new generation for the same input. If a new generation is needed, stop and preserve the existing output; make an explicit archive plan before proceeding. Do not invent an overwrite or cleanup command. + +To return to the prior code revision, switch to the tag or commit recorded before updating. Review local data and schema compatibility first. Switching code does not roll back data. + +## Version policy + +Tags use `vMAJOR.MINOR.PATCH` and identify fixed release commits; published tags must not be moved. During `0.x` development, minor releases may change commands or local data formats, while patch releases are intended for compatible fixes. Release notes must identify migration requirements. A version string alone does not prove a pristine checkout or broader Minecraft compatibility. + +For maintainers: finalize the changelog date, CLI version, support scope, and release notes in a reviewed PR before tagging its merged commit. Publish a matching GitHub Release after required checks complete. Do not include Minecraft inputs, reconstructed sources, or local tool caches. + +## Agent update request + +> Read docs/UPDATING.md in my existing kit directory. Update this checkout to the published release after reviewing its release notes and current local changes. Preserve my inputs, references, tools, and bindings. Resolve my project bindings afterward and report anything requiring review. Do not modify my mod projects or regenerate sources automatically. + +## ZIP installs + +Git checkouts are the recommended update method. The kit does not guarantee that extracting a ZIP over an existing install is safe. If you choose that migration, keep a complete copy of the old kit and `.local` data, preserve original paths, and check bindings against those paths. Do not rely on automatic replacement or deletion. diff --git a/scripts/mcsource.py b/scripts/mcsource.py index 9c5782d..693e8f0 100644 --- a/scripts/mcsource.py +++ b/scripts/mcsource.py @@ -16,6 +16,7 @@ from official_metadata import verify_official from vineflower_fallback import repair_reference, scan_failures +VERSION = "0.1.0" ROOT = Path(__file__).resolve().parents[1] CFR_COMMIT = "c4145259dfcd8ad3e99004e4d9ecb0aed55dcc5a" CFR_REPO = "https://github.com/leibnitz27/cfr.git" @@ -183,6 +184,7 @@ def prepare(path, project=None, official=False, repair=False): def main(): parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--version", action="version", version=f"Minecraft Source Kit {VERSION}") parser.add_argument("command", choices=("inspect", "verify", "check-project", "prepare", "repair", "bind", "resolve")) parser.add_argument("--jar", type=Path, help="Input JAR (required except for bind and resolve)") parser.add_argument("--project", type=Path, help="Mod project directory (required for check-project, bind, resolve; optional for prepare)")