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:
@@ -1,15 +1,5 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
export interface BoundaryNode {
|
||||
"callbackUrl"?: string;
|
||||
"enforcement"?: "client" | "server";
|
||||
"enteredAt"?: string;
|
||||
"nodeId"?: string;
|
||||
"sourceHandle"?: string;
|
||||
"sourceNodeId"?: string;
|
||||
"waitDeadline"?: string;
|
||||
}
|
||||
|
||||
export interface ErrorResponse {
|
||||
"code"?: "early_completion" | "forbidden" | "level_not_reached" | "node_not_active" | "objectives_incomplete" | "run_expired" | "run_not_active" | "scenario_not_active" | "unknown_run";
|
||||
"error"?: string;
|
||||
@@ -18,32 +8,6 @@ export interface ErrorResponse {
|
||||
"requestId"?: string;
|
||||
}
|
||||
|
||||
export interface ExecutionPlan {
|
||||
"boundaryNodes"?: BoundaryNode[];
|
||||
"context"?: { [key: string]: unknown };
|
||||
"edges"?: PlanEdge[];
|
||||
"nodes"?: ExecutionPlanNode[];
|
||||
"planId"?: string;
|
||||
"runId"?: string;
|
||||
"scenarioId"?: string;
|
||||
"startNodeId"?: string;
|
||||
"userId"?: string;
|
||||
}
|
||||
|
||||
export interface ExecutionPlanNode {
|
||||
"data"?: { [key: string]: unknown };
|
||||
"id"?: string;
|
||||
"type"?: string;
|
||||
}
|
||||
|
||||
export interface PlanEdge {
|
||||
"id"?: string;
|
||||
"source"?: string;
|
||||
"sourceHandle"?: string;
|
||||
"target"?: string;
|
||||
"targetHandle"?: string;
|
||||
}
|
||||
|
||||
export interface Reward {
|
||||
"amount"?: number;
|
||||
"currency"?: string;
|
||||
|
||||
Reference in New Issue
Block a user