diff --git a/packages/adapter-multiplayer-firebase/src/multiplayer-adapter.ts b/packages/adapter-multiplayer-firebase/src/multiplayer-adapter.ts index 40f3cd9..b6cf5fb 100644 --- a/packages/adapter-multiplayer-firebase/src/multiplayer-adapter.ts +++ b/packages/adapter-multiplayer-firebase/src/multiplayer-adapter.ts @@ -1,13 +1,13 @@ /** * Local, structural mirror of the jsPsych multiplayer *adapter* contract. * - * The real types live in jsPsych core (`packages/jspsych/src/modules/plugin-api/MultiplayerAPI.ts`), + * The real types live in jsPsych core (`packages/jspsych/src/modules/multiplayer/index.ts`), * shipped via https://github.com/jspsych/jsPsych/pull/3694, which is not yet released — so the * published `jspsych` package does not export `MultiplayerAdapter` / `GroupSessionData` / * `Unsubscribe` yet. Rather than take a build-time dependency on an unmerged fork, this adapter - * implements the interface declared here, copied verbatim from that PR's `MultiplayerAPI.ts`. It is - * the single seam to re-verify once #3694 lands: at that point `implements MultiplayerAdapter` from - * `jspsych` should typecheck against this same shape. + * implements the interface declared here, copied verbatim from that PR's + * `modules/multiplayer/index.ts`. It is the single seam to re-verify once #3694 lands: at that + * point `implements MultiplayerAdapter` from `jspsych` should typecheck against this same shape. */ /** A group-session snapshot: participantId -> that participant's pushed data. */ diff --git a/packages/adapter-multiplayer-jatos/src/multiplayer-adapter.ts b/packages/adapter-multiplayer-jatos/src/multiplayer-adapter.ts index 40f3cd9..b6cf5fb 100644 --- a/packages/adapter-multiplayer-jatos/src/multiplayer-adapter.ts +++ b/packages/adapter-multiplayer-jatos/src/multiplayer-adapter.ts @@ -1,13 +1,13 @@ /** * Local, structural mirror of the jsPsych multiplayer *adapter* contract. * - * The real types live in jsPsych core (`packages/jspsych/src/modules/plugin-api/MultiplayerAPI.ts`), + * The real types live in jsPsych core (`packages/jspsych/src/modules/multiplayer/index.ts`), * shipped via https://github.com/jspsych/jsPsych/pull/3694, which is not yet released — so the * published `jspsych` package does not export `MultiplayerAdapter` / `GroupSessionData` / * `Unsubscribe` yet. Rather than take a build-time dependency on an unmerged fork, this adapter - * implements the interface declared here, copied verbatim from that PR's `MultiplayerAPI.ts`. It is - * the single seam to re-verify once #3694 lands: at that point `implements MultiplayerAdapter` from - * `jspsych` should typecheck against this same shape. + * implements the interface declared here, copied verbatim from that PR's + * `modules/multiplayer/index.ts`. It is the single seam to re-verify once #3694 lands: at that + * point `implements MultiplayerAdapter` from `jspsych` should typecheck against this same shape. */ /** A group-session snapshot: participantId -> that participant's pushed data. */ diff --git a/packages/adapter-multiplayer-local/CHANGELOG.md b/packages/adapter-multiplayer-local/CHANGELOG.md index 83a875f..73dc95a 100644 --- a/packages/adapter-multiplayer-local/CHANGELOG.md +++ b/packages/adapter-multiplayer-local/CHANGELOG.md @@ -6,6 +6,6 @@ - [#22](https://github.com/jspsych/jspsych-multiplayer/pull/22) [`2adafca`](https://github.com/jspsych/jspsych-multiplayer/commit/2adafcabe316cbbf588e9ba92805d52f9f09e417) Thanks [@htsukamoto5](https://github.com/htsukamoto5)! - Add `adapter-multiplayer-local`, a zero-infrastructure multiplayer adapter backed by `localStorage` and signalled cross-tab. - Swap it in for the JATOS adapter (`pluginAPI.connect(new LocalAdapter())`) to run multiplayer experiments by opening two browser tabs — no server, no account. It is a development/demo/tutorial/CI tool only: `localStorage` and its cross-tab signalling are same-origin, same-browser, same-machine, so it cannot cross devices, browsers, or machines and must not be used to collect real data. + Swap it in for the JATOS adapter (`jsPsych.multiplayer.connect(new LocalAdapter())`) to run multiplayer experiments by opening two browser tabs — no server, no account. It is a development/demo/tutorial/CI tool only: `localStorage` and its cross-tab signalling are same-origin, same-browser, same-machine, so it cannot cross devices, browsers, or machines and must not be used to collect real data. It implements the same local `MultiplayerAdapter` mirror the JATOS adapter uses (no build-time dependency on the unreleased jsPsych#3694). The store is one key per participant (`mp::`), reproducing JATOS's REPLACE-the-whole-slot semantics so plugins behave identically across adapters; a fresh session id per run (carried in the `?mp_session=` URL) namespaces keys to avoid stale "ghost" participants; and `push` self-notifies on a microtask so a tab's own waits resolve without reentrancy. diff --git a/packages/adapter-multiplayer-local/src/multiplayer-adapter.ts b/packages/adapter-multiplayer-local/src/multiplayer-adapter.ts index 40f3cd9..b6cf5fb 100644 --- a/packages/adapter-multiplayer-local/src/multiplayer-adapter.ts +++ b/packages/adapter-multiplayer-local/src/multiplayer-adapter.ts @@ -1,13 +1,13 @@ /** * Local, structural mirror of the jsPsych multiplayer *adapter* contract. * - * The real types live in jsPsych core (`packages/jspsych/src/modules/plugin-api/MultiplayerAPI.ts`), + * The real types live in jsPsych core (`packages/jspsych/src/modules/multiplayer/index.ts`), * shipped via https://github.com/jspsych/jsPsych/pull/3694, which is not yet released — so the * published `jspsych` package does not export `MultiplayerAdapter` / `GroupSessionData` / * `Unsubscribe` yet. Rather than take a build-time dependency on an unmerged fork, this adapter - * implements the interface declared here, copied verbatim from that PR's `MultiplayerAPI.ts`. It is - * the single seam to re-verify once #3694 lands: at that point `implements MultiplayerAdapter` from - * `jspsych` should typecheck against this same shape. + * implements the interface declared here, copied verbatim from that PR's + * `modules/multiplayer/index.ts`. It is the single seam to re-verify once #3694 lands: at that + * point `implements MultiplayerAdapter` from `jspsych` should typecheck against this same shape. */ /** A group-session snapshot: participantId -> that participant's pushed data. */