Server-side scenario execution: thin effects client replaces local engine
- engine/ (DagWalker, sessions, IndexedDbPlanStore) deleted; server owns the graph - trigger/callback/counter carry PendingEffect; GET /sdk/v1/scenarios/pending polled (30s jittered heartbeat paused on hidden tab + wait-deadline timers) - client.effects public API unchanged (done/buy/dismiss/end/claim/battlepass/quest) - planStateStore removed; loginEvent kept; reconcile() makes server the source of truth - generated models regenerated; skills/README/CHANGELOG updated
This commit is contained in:
@@ -115,8 +115,11 @@ The scenario runtime is not exposed directly; scenario nodes surface through
|
||||
- `onWait`, `onQuest`, `onBattlePass`, `onBattlePassLevel`
|
||||
- `onScenarioCompleted`, `onScenarioFailed`
|
||||
|
||||
The scenario engine (and its IndexedDB persistence) loads lazily on first
|
||||
login — a client that only reads domains never pulls it into the page.
|
||||
The server executes the scenario graph. The SDK is a thin effects client
|
||||
(trigger, pending poll, callbacks) loaded lazily on first login — a client
|
||||
that only reads domains never pulls it into the page. `onConfigChanged`
|
||||
stays on the surface, but scenario `remote_config_override` nodes are
|
||||
applied server-side and no longer emit that effect.
|
||||
|
||||
Errors thrown inside effect handlers are reported via the `onEffectError`
|
||||
client option (default: `console.error`).
|
||||
|
||||
Reference in New Issue
Block a user