# Multiplayer 0.3.0-alpha.12

Binary, AOI-aware transform replication for 150 participants in each exact Environment and Zone partition.

## Immutable release

- Plugin ID: `plg_multiplayer`
- Release ID: `rel_42dcce22-7653-46a4-91b7-880de99c1891`
- Version: `0.3.0-alpha.12`

## Package artifacts

The package import specifier is the Registry-reviewed `packageName`; do not substitute a source-workspace package name. `packageSpec` identifies the exact install bytes.

| Provider | packageName | packageSpec | Integrity |
| --- | --- | --- | --- |
| al_amr | `@al-amr-community/al-amr-technical--multiplayer` | `https://registry.al-amr.com/v1/packages/sha512/7e5b65384b6f80eaf74b717e70c204f083c7a7e3366ac818fb340aa6257cf1b4d07e2077aaa779058025de85943af5b0cea64a0fd10b404f6207e452c2cd559e.tgz` | `sha512-fltlOEtvgOr3S3F+cMIE8IPHp+M2asgY+zQKpiV88bTQfiB3qqd5BYAl3oWUOvWwzqZKD9ELQE9iB+RSws1Vng==` |

## Declare the exact Plugin installation

Run this from an Al-Amr Environment. This command updates the Environment manifest, `al-amr.lock.json`, and the package dependency together. Do not install the npm package directly.

```sh
alamr add al-amr-technical/multiplayer@0.3.0-alpha.12 --integration frontend-adapter --adapter browser --yes --json
alamr add al-amr-technical/multiplayer@0.3.0-alpha.12 --integration frontend-adapter --adapter react --yes --json
```

Run the `installCommand` returned by `alamr add`, then verify the complete declaration:

```sh
alamr validate --json
```

## Trust and compatibility preflight

- Runtime class: `trusted_library` (trusted library code in the host Environment; not a JavaScript sandbox)
- Kind: `full_stack`
- Contracts: `^0.1.0-alpha.1`
- SDK: `^0.1.0-alpha.1`
- Platform permissions: `identity:read`, `profile:read`, `settings:read`, `plugin-grant:request`
- Browser requirements: none declared
- Direct network origins: `https://multiplayer.al-amr.com` — Short-lived Plugin Grant verification and realtime player-state relay.
- Collected data: `pairwise plugin actor`, `authoritative display profile`, `environment`, `scope membership`, `ephemeral movement and animation state`, `connection diagnostics`
- Shared data: none declared
- Retention: Movement and membership are memory-only. Abrupt disconnects retain a resumable replica for at most 10 seconds; explicit leave removes it immediately. Security audit events follow platform policy.
- Privacy policy: [review policy](https://developer.al-amr.com/legal/privacy)

## Machine-readable release artifacts

- Backend Grant OpenAPI: [openapi.json](./openapi.json)
- Reviewed TypeScript declaration: [types.d.ts](./types.d.ts)

## Frontend adapters

| Adapter ID | Runtime | Export path | Exports | Capabilities |
| --- | --- | --- | --- | --- |
| `browser` ([types](./types.d.ts?adapter=browser)) | `vanilla` | `./browser` | `createMultiplayerSession`, `bindLocalReplicaSource`, `createRemoteReplicaSource`, `createMultiplayerActorDirectory`, `createReplicaBuffer`, `sampleReplicaBuffer`, `multiplayerPluginManifest`, `MULTIPLAYER_BACKEND_COMPONENT_ID`, `MULTIPLAYER_PLUGIN_ID`, `MULTIPLAYER_PLUGIN_VERSION`, `MULTIPLAYER_REVIEWED_MAX_MESSAGE_BYTES`, `MULTIPLAYER_REVIEWED_MAX_PARTICIPANTS`, `MULTIPLAYER_REVIEWED_MESSAGES_PER_MINUTE`, `MultiplayerContextSchema`, `MultiplayerMemberSchema`, `MultiplayerScopeSchema`, `decodeClientStateFrame`, `decodeServerStateBatch`, `encodeClientStateFrame`, `encodePreparedServerStateBatch`, `encodeServerStateBatch`, `isNewerMultiplayerSequence`, `prepareMultiplayerStateRecord`, `MultiplayerClientControlMessageSchema`, `MultiplayerServerControlMessageSchema`, `ReplicaMovementModeSchema`, `ReplicaStateSchema`, `resetReplicaBuffer`, `pushReplicaState`, `createRemoteReplicaSample` | `multiplayer:presence`, `multiplayer:transform`, `multiplayer:profile`, `multiplayer:scoped-actor-key` |
| `react` ([types](./types.d.ts?adapter=react)) | `react` | `./react` | `MultiplayerProvider`, `MultiplayerDiagnosticsHud`, `useMultiplayerDiagnostics`, `useRemoteReplicaIds`, `useMultiplayerConnectionState` | `multiplayer:directory-ui`, `multiplayer:diagnostics-ui` |

## Semantic behavior ports

The Environment resolves and owns these bindings. Matching compares interface/version, lifecycle, cardinality, actor-correlation policy, and protocol artifact digest before Plugin code is loaded.

| Direction | Port | Adapter | Interface | Version | Lifecycle | Cardinality | Actor correlation | Binding/export | Protocol |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| provides | `remote-replicas` | `browser` | `spatial.remote-replica-source` | `2.0.0` | `scope` | `one` | `actor_key` | `createRemoteReplicaSource` | `remote-replica-schema` |
| provides | `scoped-actors` | `browser` | `presence.scoped-actor-directory` | `1.0.0` | `scope` | `one` | `actor_key` | `createMultiplayerActorDirectory` | `scoped-actor-schema` |
| requires | `local-replica` | `browser` | `spatial.local-replica-source` | `^2.0.0` | `scope` | `one` | `none` | `localReplicaSource` | `local-replica-schema` |

## Import examples

These imports use the selected Registry artifact package name: `@al-amr-community/al-amr-technical--multiplayer`.

### browser (vanilla)

```ts
import * as PluginAdapter from "@al-amr-community/al-amr-technical--multiplayer/browser";

// Runtime values are available on PluginAdapter. The reviewed declaration
// names (runtime values plus structural TypeScript bindings) are listed above
// and in types.d.ts; type-only declarations do not exist at runtime.
void PluginAdapter;
```

### react (react)

```ts
import * as PluginAdapter from "@al-amr-community/al-amr-technical--multiplayer/react";

// Runtime values are available on PluginAdapter. The reviewed declaration
// names (runtime values plus structural TypeScript bindings) are listed above
// and in types.d.ts; type-only declarations do not exist at runtime.
void PluginAdapter;
```


## Verified protocol artifacts

The Managed Store artifact validator recomputes each digest from package bytes. Registry metadata alone is not integrity evidence.

| ID | Kind | Specification | Package path | SHA-256 digest |
| --- | --- | --- | --- | --- |
| `multiplayer-data-plane` | `asyncapi` | `3.0.0` | `./protocol/multiplayer.asyncapi.json` | `sha256:447e034bc4726147e4e91b75727bb50834bec8bfe06c03fbf3c2667dd599bdf7` |
| `local-replica-schema` | `json_schema` | `2020-12` | `./protocol/local-replica.schema.json` | `sha256:bbdac5411de7f5070ff8a8035f6a590abf5d22ed3e89b9a3fbbb9a2673e7ef7d` |
| `remote-replica-schema` | `json_schema` | `2020-12` | `./protocol/remote-replica.schema.json` | `sha256:246e750e4f9b8a6dda070a55d0770bfd43fadc3ea482ac3c5d6ee846afe1fc7a` |
| `scoped-actor-schema` | `json_schema` | `2020-12` | `./protocol/scoped-actor.schema.json` | `sha256:8288651dd66792239bbb3136918026eecf8ea5e74b50a0aa441e5be5553d16ba` |
