# V2 Platform SDK Abstraction

Phase 72 task 72.21.1.1 is implemented by the
[platform SDK abstraction contract](../../ue/Content/V2/Online/PlatformSdkAbstraction_V2_Contract.json)
and the `V2OnlineServices` API surface. The abstraction keeps platform SDK
headers out of gameplay modules while exposing one request/result model for
achievements, friends, presence, overlay, cloud saves, voice chat, store, and
entitlements.

## Runtime Boundary

`FV2PlatformSdkAbstractionSpec` is the source of truth for runtime feature
coverage. It contains one `FV2PlatformSdkProviderBinding` per launch provider:

| Provider             | Platform    | Account provider | Subsystem                  | SDK path                                                    |
| -------------------- | ----------- | ---------------- | -------------------------- | ----------------------------------------------------------- |
| Steamworks           | PC          | Steam            | `V2PlatformSDKSteamworks`  | `Plugins/Online/PlatformSDK/Steamworks`                     |
| Epic Online Services | PC          | Epic Games       | `V2PlatformSDKEOS`         | `Plugins/Online/PlatformSDK/EpicOnlineServices`             |
| GOG Galaxy           | PC          | GOG              | `V2PlatformSDKGOGGalaxy`   | `Plugins/Online/PlatformSDK/GOGGalaxy`                      |
| PlayStation SDK      | PlayStation | PSN              | `V2PlatformSDKPlayStation` | `Restricted/NotForLicensees/Online/PlatformSDK/PlayStation` |
| Xbox GDK             | Xbox        | Xbox Live        | `V2PlatformSDKXboxGDK`     | `Restricted/NotForLicensees/Online/PlatformSDK/XboxGDK`     |
| Nintendo SDK         | Switch      | Nintendo Account | `V2PlatformSDKNintendo`    | `Restricted/NotForLicensees/Online/PlatformSDK/Nintendo`    |

Every binding must expose all required feature capabilities. If a provider does
not provide a native voice surface for the launch target, the binding must use
`V2PlatformVoiceBridge`; the validator rejects silent feature gaps.

## Request Model

`FV2PlatformSdkRequest` carries the local account, platform, provider, feature,
request type, target id, and payload JSON. `ResolvePlatformSdkRequest` validates
the request, finds the matching provider binding, verifies feature support, and
returns an `FV2PlatformSdkResult` with structured evidence.

Overlay and store requests require both `bUserInitiated` and `bAllowOverlay`.
The resolver rejects those requests before reaching platform SDK code when the
gesture or overlay permission is missing.

## Isolation Rules

Console provider bindings are marked `bNdaIsolated` and `bCertificationScoped`.
Their SDK paths are restricted and the shared runtime only references
abstraction structs. The validator requires `bNoSdkHeadersInGameplayModules`,
`bNdaSdkCodeBehindPlatformModules`, and `bFallbacksFailClosed` so
platform-specific code cannot leak into gameplay modules or silently downgrade
unsupported features.

## Verification

Run the local gate with:

```bash
python3 V2/ue/Tools/check-v2-platform-sdk-abstraction.py
```

The checker validates the JSON contract, C++ source surface, automation spec, CI
workflow wiring, Horde gate metadata, and this document.
