Implement Peft room links and direct joining in this game. First check whether this feature is already implemented. Verify existing behavior against the requirements and acceptance cases below, using tests and available runtime checks. If it already satisfies them, leave working code unchanged and report the verification evidence. If it is partial or broken, implement only the missing behavior or fixes; do not duplicate integrations, callbacks, or state. Report anything you could not verify instead of assuming success. Prerequisite: Peft hosting basics must already work. Inspect the existing implementation first. Implement only this feature, preserve gameplay, networking, and other integrations, and do not replace the networking protocol. If a prerequisite is missing, report it explicitly rather than claiming compatibility. Public URL contract: https://peft.net/games///?&_peft_version=# - Room codes are 1-64 ASCII letters, digits, underscores, or hyphens. Preserve case unless the real networking protocol consistently normalizes it. - Opening a room URL must connect to that exact room, or request only necessary identity/team input. Never require retyping the room code. - Refreshing/reopening must attempt the same room. This feature does not itself guarantee seat recovery or host survival. - After explicit room creation, use the actual code issued by networking, not an unrelated client-generated code. - Show meaningful connecting, connected, full, closed, nonexistent, offline-host, incompatible-version, and disconnected states where applicable. Never silently create a different room after joining fails. Launch context: Peft injects window.PEFT_LAUNCH before game scripts, for example: {game: "my-game", room: "ABC123", version: 2, path: "/games/my-game/ABC123/", query: "team=blue"} - Prefer this object when hosted. Read options with new URLSearchParams(window.PEFT_LAUNCH?.query ?? location.search), room from .room, and canonical path from .path. - An empty .room means show the game's own create/join screen. Peft does not issue or collect room codes. - The iframe's location is a private runtime URL, NOT a public invite. Never expose runtime URLs, capability tokens, or private credentials. - Read the initial forwarded fragment from location.hash. Preserve relevant trailing paths, repeated options, and fragments using URL/URLSearchParams. - Compose hosted invites using the fixed https://peft.net origin, .game, actual room code, and .version as _peft_version. This reserved parameter is excluded from .query; do not discard or repurpose it. - Standalone operation must still work without PEFT_LAUNCH. Parse recognized URL shapes explicitly; index.html or an arbitrary final path segment is not a room. Outer address: - After confirmed hosting, use await window.PEFT.hostRoom(actualRoomCode, optionalPlayerCount); after confirmed participant joining, use await window.PEFT.joinedRoom(actualRoomCode). Guard calls with if (window.PEFT). - These return public invites and update the outer address without reloading gameplay. hostRoom also advertises a table; only an actual host may call it. Call closeRoom when hosting ends. Preserve an existing active-tables implementation. - Do not access the parent DOM or rewrite parent location. Changes to options inside the iframe do not automatically propagate; compose updated canonical invites explicitly. - Handle rejected bridge promises visibly and offer a selectable canonical invite when clipboard access fails. Never pretend a missing bridge succeeded. Add tests for valid/invalid room codes, launch extraction, empty-room launch, repeated options, fragments, version pinning, and safe public invites. Exercise player A creating a real room and player B following its invite without retyping a code. Verify errors do not silently create another room, and standalone launch still works. Report changed files, test commands/results, external requirements, and actual limitations; do not claim live acceptance without exercising it.