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:
@@ -9,11 +9,6 @@ import { readArtifact } from './artifact.js';
|
||||
import type { SeedArtifact } from './types.js';
|
||||
|
||||
type RuntimeOptions = {
|
||||
planStateStore?: {
|
||||
state: string | null;
|
||||
load(): Promise<void>;
|
||||
save(state: string | null): Promise<void>;
|
||||
} | null;
|
||||
loginEvent?: string | null;
|
||||
};
|
||||
|
||||
@@ -52,7 +47,7 @@ export function createInMemoryTokenStore(): TokenStore {
|
||||
/** A client with no auth yet (in-memory tokens, no IndexedDB persistence). */
|
||||
export function makeProdClient<TConfig extends RemoteConfigShape = RemoteConfigShape>(
|
||||
artifact: SeedArtifact = loadArtifact(),
|
||||
runtime: RuntimeOptions = { planStateStore: null, loginEvent: null },
|
||||
runtime: RuntimeOptions = { loginEvent: null },
|
||||
): RudderClient<TConfig> {
|
||||
return new RudderClient<TConfig>({
|
||||
baseUrl: artifact.baseUrl,
|
||||
|
||||
Reference in New Issue
Block a user