Files
metin-release-cli/CHANGELOG.md
Jan Nedbal 22f67a0589 docs: document m2pack subcommands
Add a Phase 4 'm2pack commands' section to docs/cli.md with each
subcommand's flags and a pointer at the m2pack-secure repo for
installation. Update README.md with a short m2pack paragraph and
append the Phase 4 entry to the Unreleased CHANGELOG section.
2026-04-14 22:31:16 +02:00

75 lines
3.9 KiB
Markdown

# Changelog
All notable changes to `metin-release-cli` are documented here.
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versions
follow semantic versioning: major for incompatible CLI or JSON contract changes,
minor for new subcommands or additive flags, patch for fixes that preserve the
contract.
## [Unreleased]
### Added
- `metin-release m2pack <build|verify|diff|export-runtime-key>` subcommands that wrap the m2pack-secure binary.
- `m2pack_build`, `m2pack_verify`, `m2pack_diff`, `m2pack_export_runtime_key` MCP tools mirroring the CLI surface.
- `src/metin_release/m2pack_binary.py` binary-discovery helper using `M2PACK_BINARY` env var or `PATH`.
- `metin_release_mcp` package and `metin-release-mcp` console script — a
thin Model Context Protocol stdio server that wraps the Phase 1
`release …` subcommands as eight MCP tools (`release_inspect`,
`release_build_manifest`, `release_sign`, `release_diff_remote`,
`release_upload_blobs`, `release_promote`, `release_verify_public`,
`release_publish`). Each tool's input schema mirrors the CLI's
argparse signature 1:1; the wrapper shells out to
`metin-release <subcommand> --json …` and returns the parsed envelope
verbatim with zero duplicated business logic.
- `[mcp]` optional dependency group pulling in the official `mcp`
Python SDK.
- `docs/mcp.md` — MCP server usage guide.
- `tests/mcp/` — 45 new tests covering the CLI runner (success path,
error-envelope passthrough, unparseable output, missing binary),
tool schemas (mirror checks against each command's argparse), and
dispatch translation (booleans, optionals, paths with spaces).
## [0.1.0] - 2026-04-14
First Phase 1 drop. Implements the minimum asset release path the
`metin-release-cli-plan.md` calls for — everything the launcher contract needs
to publish a signed manifest and content-addressed blob tree.
### Added
- `metin-release` command, `python -m metin_release` module entry, and
`metin-release --version` resolving via `importlib.metadata`
- Top-level and per-subcommand `--json`, `-v`, `-q` flags (both placements work)
- Structured result envelope and exit-code contract (`0/1/2/3/4`) from the plan
- `release inspect` — scan a client source root and report counts + flags
- `release build-manifest` — wrap `make-manifest.py` and report manifest stats
- `release sign` — wrap `sign-manifest.py` and verify 64-byte output
- `release diff-remote` — HEAD blob URLs and report the missing set
- `release upload-blobs` — rsync push blobs + archive to a target, with
`--dry-run` and `--yes`, excluding `manifest.json*` so promote stays atomic
- `release promote` — upload only `manifest.json` and `manifest.json.sig`
- `release verify-public` — fetch + Ed25519-verify the published manifest,
optional `--sample-blobs N` sha256 re-check
- `release publish` — composite of build-manifest → sign → upload-blobs →
promote → verify-public with per-stage timings and short-circuit on failure
- Error hierarchy in `errors.py` mapping each exception class to the right
exit code and a stable `error_code` string for machine parsing
- pytest suite with 18 tests covering dispatch, inspect, build-manifest, sign,
diff-remote (via a local HTTPServer fixture), and the full publish composite
against a local rsync target
- `docs/cli.md` man-page-style reference
### Notes
- Runtime deps pinned to `cryptography` and `requests` only. Dev deps are
`pytest` + `pytest-mock`.
- `make-manifest.py` and `sign-manifest.py` are discovered by convention at
`scripts/make-manifest.py` / `scripts/sign-manifest.py` relative to the CLI
repo, or overridden via `METIN_RELEASE_MAKE_MANIFEST` and
`METIN_RELEASE_SIGN_MANIFEST` env vars.
- Phase 2 (`erp …` subcommands), Phase 3 (MCP wrapper), Phase 4 (`m2pack …`
subcommands) and Phase 5 (`launcher publish`) are explicitly out of scope for
this release and will land in future minors.