Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 51 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/manabrew-compat/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This guide is the **first thing any agent working on `crates/manabrew-compat/` s

## What this crate does

Translates between phase's engine types and the **ManaBrew wire protocol** (external MTG engine↔client JSON protocol, currently 2.0.0). It is a bidirectional adapter:
Translates between phase's engine types and the **ManaBrew wire protocol** (external MTG engine↔client JSON protocol, currently 3.0.0). It is a bidirectional adapter:

- **Outbound:** `WaitingFor` (engine decision point) → `PromptInput` (protocol prompt), plus `GameAction` → `AvailableActionKind`.
- **Inbound:** `PromptOutput` (client answer) → `GameAction`.
Expand Down Expand Up @@ -57,7 +57,7 @@ rg -o '"(local|upstream)\.[a-z0-9-]+"' crates/manabrew-compat/src/lib.rs | sort

Compare emitted codes against declared entries. Divergence is a defect, not a backlog item.

The registry is now **exhaustive** over emitted codes (83 declared; 69 emitted at live call sites, plus 14 documentary entries that describe a gap without a code path). `no_emitted_capability_code_is_undeclared` scans the production half of `lib.rs` and fails on any new undeclared code, so this no longer needs a manual audit — but re-run the command above if you doubt the test.
The registry is now **exhaustive** over emitted codes (87 declared; 70 emitted at live call sites, plus 17 documentary entries that describe a gap or deliberate divergence without a code path). `local.serum-powder-mulligan-vendor-extension` is the intentional paired-client extension: `MulliganOutput::MulliganUseSerumPowder { card_id }` and `MulliganPutBackInput::excluded_card_id`. It replaces the former upstream-gap entry one-for-one, so the 87 / 70 / 17 totals remain correct. `no_emitted_capability_code_is_undeclared` scans the production half of `lib.rs` and fails on any new undeclared code, so this no longer needs a manual audit — but re-run the command above if you doubt the test.

### 4. A mapping claim must be exhibited by a test, not asserted in prose.

Expand Down
7 changes: 6 additions & 1 deletion crates/manabrew-compat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
name = "manabrew-compat"
version.workspace = true
edition = "2021"
license.workspace = true
# `manabrew-protocol` is AGPL-3.0-or-later, so its copyleft flows downstream.
# This crate must remain a leaf (it has no workspace dependents): a distributed
# binary that links it is AGPL, including the network-use requirement in §13,
# while `engine` remains permissively licensed.
license = "AGPL-3.0-or-later"

[dependencies]
engine = { path = "../engine" }
manabrew-protocol = "3"
serde = { workspace = true }
serde_json = "1"

Expand Down
Loading
Loading