# V2 Platform Friend List Integration

Phase 72.21.1.9 adds a native platform friend-list integration surface for
showing friends playing Oshun V2, inviting a friend to the current session, and
joining a friend's platform session. `FV2PlatformFriendListIntegrationPolicy`
owns provider route coverage, `FV2PlatformFriendEntry` represents native friend
presence, and `FV2PlatformFriendListPlan` carries the provider-specific command
plan through the V2 platform SDK abstraction.

## Operations

`PlanPlatformFriendListOperation` supports:

- `QueryFriendsPlayingSameGame` filters native friends to valid entries with
  `CurrentGameId` equal to `Oshun.V2`.
- `InviteFriendToSession` queues a native invite only when the target friend is
  present, invitable, and a session or lobby id is available.
- `JoinFriendSession` queues a native join only when the target friend is
  playing Oshun V2, joinable, and the local session policy allows joining.

All operations use `EV2PlatformSdkRequestType::ReadFriends` with
`EV2PlatformSdkFeature::Friends`; invite and join are modeled as route-level
commands because the shared SDK abstraction currently exposes friend-list reads
as the common request type.

## Provider Routes

| Provider             | Native friend surface                | Invite command                                   | Join command                           |
| -------------------- | ------------------------------------ | ------------------------------------------------ | -------------------------------------- |
| Steamworks           | `ISteamFriends/ISteamMatchmaking`    | `ISteamFriends::InviteUserToGame`                | `ISteamMatchmaking::JoinLobby`         |
| Epic Online Services | `EOS_Friends/EOS_Presence/EOS_Lobby` | `EOS_Lobby_SendInvite`                           | `EOS_Lobby_JoinLobby`                  |
| GOG Galaxy           | `galaxy::api::IFriends/IMatchmaking` | `galaxy::api::IMatchmaking::SendLobbyInvitation` | `galaxy::api::IMatchmaking::JoinLobby` |
| PlayStation SDK      | `V2PlayStationPsnFriendsInterface`   | `PsnFriends.Invite`                              | `Activities.SurfaceJoinHint`           |
| Xbox GDK             | `V2XboxGdkXboxLiveFriendsInterface`  | `XboxLiveFriends.Invite`                         | `XboxPresence.JoinSession`             |

Console routes remain public stubs in `V2OnlineServices`. Proprietary
PlayStation and Xbox headers or symbols stay in restricted platform SDK modules.

## Rules

The default policy requires Steamworks, EOS, GOG Galaxy, PlayStation SDK, and
Xbox GDK route coverage. Each route must show friends playing the same game,
support session invites, support join-friend-game, deduplicate publisher and
platform identities, use rich presence session join hints, route through the V2
platform SDK abstraction, and fail closed on platform API failures.

The query plan deduplicates by platform account id and caps same-game results at
50 friends. Invite and join plans report blocking issues such as
`MissingTargetFriend`, `MissingSession`, `FriendNotInvitable`, and
`FriendNotJoinable` instead of queuing a native command.

## Verification

Run:

```bash
python3 V2/ue/Tools/check-v2-platform-friend-list-integration.py
```

The checker validates the C++ API, contract, automation spec, CI workflow, Horde
gate, documentation, and TODO evidence for Section 72.21.1.9.
