@dreamboard-games/sdk 0.4.0-alpha.8 → 0.5.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/README.md +49 -11
  2. package/dist/authoring/index.d.ts +6 -14
  3. package/dist/authoring/index.js +11 -547
  4. package/dist/authoring/index.js.map +1 -1
  5. package/dist/authoring-compiler.d.ts +27 -0
  6. package/dist/authoring-compiler.js +11 -0
  7. package/dist/authoring-compiler.js.map +1 -0
  8. package/dist/authoring-materialize-cli.d.ts +1 -0
  9. package/dist/authoring-materialize-cli.js +45 -0
  10. package/dist/authoring-materialize-cli.js.map +1 -0
  11. package/dist/browser-interaction.d.ts +22 -22
  12. package/dist/{chunk-3BLN5POZ.js → chunk-2GQIALJL.js} +51 -15
  13. package/dist/chunk-2GQIALJL.js.map +1 -0
  14. package/dist/chunk-533O7C4L.js +7095 -0
  15. package/dist/chunk-533O7C4L.js.map +1 -0
  16. package/dist/{chunk-44N3T2A5.js → chunk-6LMESVGT.js} +9 -28
  17. package/dist/chunk-6LMESVGT.js.map +1 -0
  18. package/dist/{chunk-ZYONCTZ2.js → chunk-DQS2EG5E.js} +3 -3
  19. package/dist/{chunk-ZYONCTZ2.js.map → chunk-DQS2EG5E.js.map} +1 -1
  20. package/dist/chunk-EOEA3I64.js +1864 -0
  21. package/dist/chunk-EOEA3I64.js.map +1 -0
  22. package/dist/{chunk-B2YBS3SG.js → chunk-FL67RDID.js} +41 -13
  23. package/dist/chunk-FL67RDID.js.map +1 -0
  24. package/dist/{chunk-2TAKLJJD.js → chunk-HIH6Y4FA.js} +222 -1267
  25. package/dist/chunk-HIH6Y4FA.js.map +1 -0
  26. package/dist/chunk-HUK4234C.js +166 -0
  27. package/dist/chunk-HUK4234C.js.map +1 -0
  28. package/dist/chunk-KGV2EUNN.js +532 -0
  29. package/dist/chunk-KGV2EUNN.js.map +1 -0
  30. package/dist/{chunk-VTK4TIXC.js → chunk-KRJPRYEA.js} +49 -4
  31. package/dist/chunk-KRJPRYEA.js.map +1 -0
  32. package/dist/chunk-KWHOFBDM.js +9 -0
  33. package/dist/chunk-KWHOFBDM.js.map +1 -0
  34. package/dist/{chunk-UC2UXAC6.js → chunk-LMHCGCA6.js} +2 -2
  35. package/dist/{chunk-XV27IQHA.js → chunk-N33CGX2F.js} +15 -85
  36. package/dist/chunk-N33CGX2F.js.map +1 -0
  37. package/dist/chunk-TXELBVTG.js +32 -0
  38. package/dist/chunk-TXELBVTG.js.map +1 -0
  39. package/dist/{chunk-2TRZSZGD.js → chunk-VRRR6QZT.js} +9 -12
  40. package/dist/chunk-VRRR6QZT.js.map +1 -0
  41. package/dist/chunk-VWTKGIYF.js +90 -0
  42. package/dist/chunk-VWTKGIYF.js.map +1 -0
  43. package/dist/{chunk-IYX5OO2K.js → chunk-XFMSLL3P.js} +133 -61
  44. package/dist/chunk-XFMSLL3P.js.map +1 -0
  45. package/dist/{chunk-YGQTL63W.js → chunk-ZSTCUJKZ.js} +4 -4
  46. package/dist/chunk-ZSTCUJKZ.js.map +1 -0
  47. package/dist/codegen.js +1 -1
  48. package/dist/{components-BTwSIjXj.d.ts → components-CNAt5J1p.d.ts} +1 -1
  49. package/dist/definitions-bZSBaPjj.d.ts +300 -0
  50. package/dist/{diagnostics-1BWjRo6-.d.ts → diagnostics-DIi3ina7.d.ts} +2 -1
  51. package/dist/digest.d.ts +8 -0
  52. package/dist/{index-CFTjJIXd.d.ts → index-CR69MyWr.d.ts} +2 -2
  53. package/dist/{index.d-C0PKOVbh.d.ts → index.d-Bw8AOcgp.d.ts} +532 -225
  54. package/dist/index.js +2 -2
  55. package/dist/package-set.d.ts +2 -2
  56. package/dist/package-set.js +2 -2
  57. package/dist/plugin-runtime-contract.d.ts +17 -0
  58. package/dist/plugin-runtime-contract.js +94 -0
  59. package/dist/plugin-runtime-contract.js.map +1 -0
  60. package/dist/{protocol-nS2ojsGr.d.ts → protocol-CVaSqPgX.d.ts} +54 -47
  61. package/dist/reducer/advanced.d.ts +5 -4
  62. package/dist/reducer/advanced.js +14 -108
  63. package/dist/reducer/advanced.js.map +1 -1
  64. package/dist/reducer-contract.d.ts +1 -1
  65. package/dist/reducer-contract.js +6 -4
  66. package/dist/reducer.d.ts +20 -98
  67. package/dist/reducer.js +28 -6050
  68. package/dist/reducer.js.map +1 -1
  69. package/dist/reference-games/index.d.ts +6 -198
  70. package/dist/reference-games/index.js +18 -200
  71. package/dist/reference-games/index.js.map +1 -1
  72. package/dist/runtime/primitives.d.ts +3 -3
  73. package/dist/runtime/primitives.js +5 -5
  74. package/dist/runtime/runtime-api.d.ts +1 -1
  75. package/dist/runtime/workspace-contract.d.ts +343 -11
  76. package/dist/runtime/workspace-contract.js +12 -6
  77. package/dist/{runtime-Dkfm1x2r.d.ts → runtime-C7Z2acNU.d.ts} +67 -31
  78. package/dist/{runtime-api-C6aWo9c0.d.ts → runtime-api-CgPuEVeF.d.ts} +4 -13
  79. package/dist/runtime.d.ts +7 -7
  80. package/dist/runtime.js +15 -11
  81. package/dist/runtime.js.map +1 -1
  82. package/dist/schema.d.ts +405 -0
  83. package/dist/{stale-contract-artifact-error-C5AaZPJ8.d.ts → stale-contract-artifact-error-XLaweZtF.d.ts} +1 -1
  84. package/dist/testing-compiler.d.ts +37 -0
  85. package/dist/testing-compiler.js +272 -0
  86. package/dist/testing-compiler.js.map +1 -0
  87. package/dist/testing-runtime.d.ts +98 -21
  88. package/dist/testing-runtime.js +154 -95
  89. package/dist/testing-runtime.js.map +1 -1
  90. package/dist/testing.d.ts +197 -156
  91. package/dist/testing.js +660 -372
  92. package/dist/testing.js.map +1 -1
  93. package/dist/types-DN4O7kH_.d.ts +122 -0
  94. package/dist/{types-CTeN_QAk.d.ts → types-q1Guidm5.d.ts} +4 -5
  95. package/dist/types.d.ts +0 -1
  96. package/dist/ui/components.d.ts +3 -2
  97. package/dist/ui/components.js +1 -1
  98. package/dist/ui/plugin-styles.css +1 -1
  99. package/dist/{ui-contract-Ue6SywvO.d.ts → ui-contract-BC4JpysE.d.ts} +2 -6
  100. package/dist/ui.d.ts +4 -3
  101. package/dist/ui.js +2 -2
  102. package/dist/{views-Qx-EHBP8.d.ts → views-D2Cfzr3h.d.ts} +17 -5
  103. package/package.json +41 -22
  104. package/REFERENCE.md +0 -22884
  105. package/dist/chunk-2TAKLJJD.js.map +0 -1
  106. package/dist/chunk-2TRZSZGD.js.map +0 -1
  107. package/dist/chunk-3BLN5POZ.js.map +0 -1
  108. package/dist/chunk-3OZMHZK3.js +0 -40
  109. package/dist/chunk-3OZMHZK3.js.map +0 -1
  110. package/dist/chunk-44N3T2A5.js.map +0 -1
  111. package/dist/chunk-5CQIJHGF.js +0 -663
  112. package/dist/chunk-5CQIJHGF.js.map +0 -1
  113. package/dist/chunk-B2YBS3SG.js.map +0 -1
  114. package/dist/chunk-IYX5OO2K.js.map +0 -1
  115. package/dist/chunk-VTK4TIXC.js.map +0 -1
  116. package/dist/chunk-VTNEWMWJ.js +0 -12
  117. package/dist/chunk-VTNEWMWJ.js.map +0 -1
  118. package/dist/chunk-XV27IQHA.js.map +0 -1
  119. package/dist/chunk-YGQTL63W.js.map +0 -1
  120. package/dist/types-B_3pObUV.d.ts +0 -192
  121. /package/dist/{chunk-UC2UXAC6.js.map → chunk-LMHCGCA6.js.map} +0 -0
package/dist/testing.d.ts CHANGED
@@ -1,16 +1,20 @@
1
- import { n as SnapshotMatcherHandler, E as ExpectFn, d as InteractionExplanationLike, C as CreateReducerScenarioRunnerOptions, i as ReducerScenarioRunner, j as ReducerScenarioTrace } from './types-B_3pObUV.js';
2
- export { B as BaseContext, a as BaseDefinition, b as ExpectMatchers, I as InteractionAvailabilityLike, c as InteractionDescriptorLike, R as ReducerScenarioBundle, e as ReducerScenarioDiagnostic, f as ReducerScenarioExchange, g as ReducerScenarioFrame, h as ReducerScenarioOperation, k as ReducerScenarioViewer, l as RejectionExpectation, S as ScenarioDefinition, m as SharedScenarioContext, T as TestRunner, o as defineBase, p as defineScenario } from './types-B_3pObUV.js';
3
- import { R as ReducerDiagnosticEvent, D as DispatchTraceSummaryEntry } from './diagnostics-1BWjRo6-.js';
4
- import { w as wire, a as ReducerBundleContract } from './index.d-C0PKOVbh.js';
5
- import { p, w, v, t, u } from './protocol-nS2ojsGr.js';
6
- import { R as RuntimeAPI, V as ValidationResult } from './runtime-api-C6aWo9c0.js';
1
+ import { G as SnapshotMatcherHandler, E as ExpectFn, o as ScenarioDefinitionGameLike, x as ScenarioReplayDefinition, h as ScenarioCheckpoint, k as ScenarioCommand } from './definitions-bZSBaPjj.js';
2
+ export { A as AssertScenarioOptions, a as ExpectMatchers, I as InteractionAvailabilityLike, b as InteractionDescriptorLike, c as InteractionExplanationLike, R as RejectionExpectation, d as ReplayScenarioOptions, e as RuntimeParamsOfScenarioCommand, S as ScenarioActor, f as ScenarioAssertionContext, g as ScenarioAuthoring, i as ScenarioCheckpointId, j as ScenarioCheckpointSelector, l as ScenarioCommandOf, m as ScenarioCommandTraceEntry, n as ScenarioDefinition, p as ScenarioDefinitionValidationCode, q as ScenarioDefinitionValidationError, r as ScenarioDiagnostics, s as ScenarioFlowDiagnostics, t as ScenarioProbeAccepted, u as ScenarioProbeRejected, v as ScenarioProbeResult, w as ScenarioReplay, y as ScenarioReplayError, z as ScenarioReplayErrorOptions, B as ScenarioReplaySegment, C as ScenarioSchemaOutput, D as ScenarioSeatRef, F as ScenarioSetup, H as createScenarioAuthoring, J as resolveScenarioCheckpoint, K as toScenarioReplayDefinition } from './definitions-bZSBaPjj.js';
3
+ import { R as ReducerDiagnosticEvent } from './diagnostics-DIi3ina7.js';
4
+ import { g as ScenarioIdentity, f as PerspectiveSelector, e as InspectScenarioResult, P as PerspectiveRef, d as InspectNode, i as Sha256Digest, F as FlowDiagnostic, A as ActorRef, a as InspectEntropy, S as ScenarioDispatchTraceEntry } from './types-DN4O7kH_.js';
5
+ export { I as InspectAction, b as InspectInteraction, c as InspectInteractionInput, j as assertScenario, p as probeScenarioCommand, r as replayScenario } from './types-DN4O7kH_.js';
6
+ import { w as wire, a as ReducerBundleContract } from './index.d-Bw8AOcgp.js';
7
7
  import { R as RuntimeJson } from './runtime-json-CQ9QbLZ5.js';
8
+ import { B, y, z as z$1, v, E } from './protocol-CVaSqPgX.js';
8
9
  import { z } from 'zod';
9
10
  import { r as BrowserInteractionIntentRequest, l as BrowserInteractionEffectRequest } from './types-DJj5MJkl.js';
10
- import { b as PluginTransport, P as PluginRuntimeClient } from './types-CTeN_QAk.js';
11
+ import { b as PluginTransport, P as PluginRuntimeClient } from './types-q1Guidm5.js';
11
12
  import * as react_jsx_runtime from 'react/jsx-runtime';
12
13
  import react__default from 'react';
13
- export { S as StaleContractArtifactError, a as StaleContractArtifactErrorOptions, b as StaleContractArtifactKind, i as isStaleContractArtifactError } from './stale-contract-artifact-error-C5AaZPJ8.js';
14
+ export { S as StaleContractArtifactError, a as StaleContractArtifactErrorOptions, b as StaleContractArtifactKind, i as isStaleContractArtifactError } from './stale-contract-artifact-error-XLaweZtF.js';
15
+ import './views-D2Cfzr3h.js';
16
+ import './runtime-C7Z2acNU.js';
17
+ import './types.js';
14
18
 
15
19
  type CreateExpectApiOptions = {
16
20
  matchSnapshot?: SnapshotMatcherHandler;
@@ -20,95 +24,203 @@ type CreateExpectApiOptions = {
20
24
  };
21
25
  declare function createExpectApi(options?: CreateExpectApiOptions): ExpectFn;
22
26
 
23
- type ReducerBundleLike = Pick<ReducerBundleContract, "projectSeatsDynamic" | "validateInput" | "dispatch"> & {
24
- explainInteraction?: (input: {
25
- state: wire.ReducerSessionState;
26
- playerId: string;
27
- interactionId: string;
28
- }) => InteractionExplanationLike;
27
+ /** A failed SDK matcher or probe expectation authored in `scenario.then`. */
28
+ declare class ScenarioAssertionError extends Error {
29
+ readonly code: "SCENARIO_ASSERTION_FAILED";
30
+ constructor(message: string);
31
+ }
32
+
33
+ type InspectScenarioOptions<Game extends ScenarioDefinitionGameLike> = {
34
+ readonly game: Game;
35
+ readonly scenario: ScenarioReplayDefinition<Game>;
36
+ readonly identity: ScenarioIdentity;
37
+ readonly perspective: PerspectiveSelector;
38
+ readonly at?: ScenarioCheckpoint;
39
+ readonly seed?: number;
29
40
  };
30
- type DeepReadonly<T> = T extends (...args: readonly unknown[]) => unknown ? T : T extends readonly (infer Item)[] ? readonly DeepReadonly<Item>[] : T extends object ? {
31
- readonly [Key in keyof T]: DeepReadonly<T[Key]>;
32
- } : T;
33
- type BaseStateArtifact = {
34
- snapshot: DeepReadonly<wire.ReducerSessionState>;
35
- fingerprint: {
36
- players: number;
37
- contractFingerprint?: string;
41
+ declare function inspectScenario<const Game extends ScenarioDefinitionGameLike>(options: InspectScenarioOptions<Game>): Promise<InspectScenarioResult>;
42
+
43
+ type ExploreTransitionResult = {
44
+ readonly schemaVersion: 1;
45
+ readonly mode: "transitions";
46
+ readonly scenario: ScenarioIdentity;
47
+ readonly perspective: PerspectiveRef;
48
+ readonly node: InspectNode;
49
+ readonly candidates: readonly {
50
+ readonly ordinal: number;
51
+ readonly command: ScenarioCommand;
52
+ readonly after: {
53
+ readonly checkpointDigest: Sha256Digest;
54
+ readonly flow: FlowDiagnostic;
55
+ readonly publicStateDigest: Sha256Digest;
56
+ readonly viewDigest: Sha256Digest;
57
+ readonly actions: readonly {
58
+ readonly actor: ActorRef;
59
+ readonly interactionId: string;
60
+ }[];
61
+ readonly entropy: InspectEntropy;
62
+ readonly dispatchTrace: readonly ScenarioDispatchTraceEntry[];
63
+ };
64
+ }[];
65
+ readonly omissions: readonly {
66
+ readonly actor: ActorRef;
67
+ readonly interactionId: string;
68
+ readonly code: "INPUT_DOMAIN_NOT_ENUMERABLE" | "INPUT_DOMAIN_BUDGET";
69
+ readonly inputKey?: string;
70
+ }[];
71
+ readonly page: {
72
+ readonly limit: number;
73
+ readonly evaluated: number;
74
+ readonly truncated: boolean;
75
+ readonly nextCursor: string | null;
38
76
  };
39
77
  };
40
- type CreateTestRuntimeOptions = {
41
- baseId: string;
42
- baseStates: Record<string, BaseStateArtifact>;
43
- bundle: ReducerBundleLike;
44
- phase?: string;
45
- playerIds?: readonly string[];
46
- sessionId?: string;
47
- userId?: string | null;
48
- gameId?: string;
49
- displayNameByPlayerId?: Record<string, string>;
50
- contractFingerprint?: string;
51
- expectedBaseStateFingerprint?: string;
78
+ type ExploreSeedResult = {
79
+ readonly schemaVersion: 1;
80
+ readonly mode: "seeds";
81
+ readonly scenario: ScenarioIdentity;
82
+ readonly perspective: PerspectiveRef;
83
+ readonly checkpoint: ScenarioCheckpoint;
84
+ readonly variants: readonly {
85
+ readonly seed: number;
86
+ readonly status: "replayed" | "rejected";
87
+ readonly checkpointDigest?: Sha256Digest;
88
+ readonly entropy?: InspectEntropy;
89
+ readonly observable?: {
90
+ readonly publicState: unknown;
91
+ readonly view: unknown;
92
+ };
93
+ readonly signature?: {
94
+ readonly phase: string;
95
+ readonly step: string | null;
96
+ readonly actions: readonly {
97
+ readonly seat: number;
98
+ readonly interactionId: string;
99
+ readonly concreteOptionCount: number | "lazy";
100
+ }[];
101
+ };
102
+ readonly rejection?: {
103
+ readonly segment: "given" | "when";
104
+ readonly sourceIndex: number;
105
+ readonly interactionId: string;
106
+ readonly errorCode: string;
107
+ };
108
+ }[];
109
+ };
110
+ type ExploreScenarioResult = ExploreTransitionResult | ExploreSeedResult;
111
+
112
+ type SeedRange = {
113
+ readonly start: number;
114
+ readonly end: number;
115
+ };
116
+ type ExploreScenarioOptions<Game extends ScenarioDefinitionGameLike> = Omit<InspectScenarioOptions<Game>, "seed"> & {
117
+ readonly seed?: number;
118
+ readonly seedRange?: SeedRange;
119
+ readonly limit?: number;
120
+ readonly maxEvaluations?: number;
121
+ readonly cursor?: string;
52
122
  };
53
- type CreatedTestRuntime = {
54
- runtime: RuntimeAPI;
55
- getFrame(): p;
56
- getSessionDescriptor(): w;
57
- players(): readonly string[];
58
- seat(index: number): string;
59
- submit(playerId: string, interactionId: string, params?: unknown): Promise<void>;
60
- validate(playerId: string, interactionId: string, params?: unknown): Promise<ValidationResult>;
61
- explain(playerId: string, interactionId: string): InteractionExplanationLike;
62
- diagnostics: {
63
- readonly events: readonly ReducerDiagnosticEvent[];
64
- readonly lastDispatch: {
65
- submissionId: string;
66
- trace: readonly DispatchTraceSummaryEntry[];
67
- } | null;
68
- clear(): void;
123
+ declare function exploreScenario<const Game extends ScenarioDefinitionGameLike>(options: ExploreScenarioOptions<Game>): Promise<ExploreScenarioResult>;
124
+
125
+ type ReducerScenarioBundle = Pick<ReducerBundleContract, "project" | "dispatch" | "boardStatic">;
126
+ interface ReducerScenarioViewer {
127
+ readonly seatId: string;
128
+ readonly playerId: string;
129
+ }
130
+ interface ReducerScenarioFrame {
131
+ readonly id: string;
132
+ readonly reducerState: wire.ReducerSessionState;
133
+ readonly dynamicProjection: wire.SeatProjectionBundle;
134
+ readonly staticProjection?: wire.BoardStaticProjection | null;
135
+ readonly gameVersion: number;
136
+ readonly actionSetVersion: string;
137
+ readonly projectionDigest: string;
138
+ }
139
+ interface ReducerScenarioTrace {
140
+ readonly scenarioId: string;
141
+ readonly gameId: string;
142
+ readonly viewer: ReducerScenarioViewer;
143
+ readonly frames: readonly ReducerScenarioFrame[];
144
+ readonly exchanges: readonly ReducerScenarioExchange[];
145
+ }
146
+ type ReducerScenarioExchange = {
147
+ readonly id: string;
148
+ readonly operation: "validate";
149
+ readonly fromFrameId: string;
150
+ readonly input: wire.GameInput;
151
+ readonly result: wire.ReducerInputValidationResult;
152
+ } | {
153
+ readonly id: string;
154
+ readonly operation: "submit";
155
+ readonly fromFrameId: string;
156
+ readonly input: wire.GameInput;
157
+ readonly result: {
158
+ readonly kind: "accepted";
159
+ readonly toFrameId: string;
160
+ } | {
161
+ readonly kind: "rejected";
162
+ readonly diagnostics: readonly ReducerScenarioDiagnostic[];
69
163
  };
70
164
  };
71
- declare function createTestRuntime(options: CreateTestRuntimeOptions): CreatedTestRuntime;
165
+ interface ReducerScenarioDiagnostic {
166
+ readonly code: string;
167
+ readonly message: string;
168
+ }
169
+ type ReducerScenarioOperation = {
170
+ readonly id: string;
171
+ readonly operation: "validate";
172
+ readonly input: wire.GameInput;
173
+ } | {
174
+ readonly id: string;
175
+ readonly operation: "submit";
176
+ readonly input: wire.GameInput;
177
+ };
178
+ interface CreateReducerScenarioRunnerOptions {
179
+ readonly scenarioId: string;
180
+ readonly gameId: string;
181
+ readonly initialState: wire.ReducerSessionState;
182
+ readonly bundle: ReducerScenarioBundle;
183
+ readonly viewer: ReducerScenarioViewer;
184
+ readonly playerIds: readonly string[];
185
+ readonly initialGameVersion?: number;
186
+ }
187
+ interface ReducerScenarioRunner {
188
+ run(operations: readonly ReducerScenarioOperation[]): Promise<ReducerScenarioTrace>;
189
+ }
72
190
 
73
191
  declare function createReducerScenarioRunner(options: CreateReducerScenarioRunnerOptions): ReducerScenarioRunner;
74
192
 
75
193
  declare const UI_SCENARIO_FIXTURE_SCHEMA_VERSION = 2;
76
194
  declare const UI_SCENARIO_FIXTURE_BUNDLE_SCHEMA_VERSION = 2;
77
195
  declare const UI_SCENARIO_FIXTURE_SUPPORTED_BROWSER_PROTOCOL_MAJOR = 3;
78
- declare const UI_SCENARIO_FIXTURE_PLUGIN_RUNTIME_PROTOCOL: 3;
196
+ declare const UI_SCENARIO_FIXTURE_PLUGIN_RUNTIME_PROTOCOL: 4;
79
197
  declare const uiFixtureFrameSchema: z.ZodObject<{
80
198
  id: z.ZodString;
81
- frame: z.ZodType<p<unknown, string, string, string>, unknown, z.core.$ZodTypeInternals<p<unknown, string, string, string>, unknown>>;
199
+ frame: z.ZodType<v<unknown, string, string, string>, unknown, z.core.$ZodTypeInternals<v<unknown, string, string, string>, unknown>>;
82
200
  projectionDigest: z.ZodString;
83
201
  }, z.core.$strict>;
84
202
  declare const uiFixtureProtocolStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
85
203
  id: z.ZodString;
86
204
  kind: z.ZodLiteral<"host.frame">;
87
205
  frameId: z.ZodString;
88
- }, z.core.$strict>, z.ZodObject<{
89
- id: z.ZodString;
90
- kind: z.ZodLiteral<"client.validate">;
91
- fromFrameId: z.ZodString;
92
- requestDigest: z.ZodString;
93
- response: z.ZodObject<{
94
- valid: z.ZodBoolean;
95
- errorCode: z.ZodOptional<z.ZodString>;
96
- message: z.ZodOptional<z.ZodString>;
97
- }, z.core.$strict>;
98
206
  }, z.core.$strict>, z.ZodObject<{
99
207
  id: z.ZodString;
100
208
  kind: z.ZodLiteral<"client.submit">;
101
209
  fromFrameId: z.ZodString;
102
210
  requestDigest: z.ZodString;
103
211
  response: z.ZodDiscriminatedUnion<[z.ZodObject<{
212
+ type: z.ZodLiteral<"interaction.result">;
213
+ clientActionId: z.ZodString;
104
214
  accepted: z.ZodLiteral<true>;
105
215
  }, z.core.$strict>, z.ZodObject<{
216
+ type: z.ZodLiteral<"interaction.result">;
217
+ clientActionId: z.ZodString;
106
218
  accepted: z.ZodLiteral<false>;
107
219
  errorCode: z.ZodString;
108
220
  message: z.ZodOptional<z.ZodString>;
109
221
  }, z.core.$strict>], "accepted">;
110
222
  }, z.core.$strict>], "kind">;
111
- declare const pluginProtocolTapeSchema: z.ZodType<v, unknown, z.core.$ZodTypeInternals<v, unknown>>;
223
+ declare const pluginProtocolTapeSchema: z.ZodType<B, unknown, z.core.$ZodTypeInternals<B, unknown>>;
112
224
  declare const uiReplayRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
113
225
  surface: z.ZodString;
114
226
  scopeId: z.ZodOptional<z.ZodString>;
@@ -120,9 +232,9 @@ declare const uiReplayRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
120
232
  candidateValueKey: z.ZodOptional<z.ZodString>;
121
233
  actuatorKind: z.ZodOptional<z.ZodEnum<{
122
234
  fill: "fill";
123
- pointer: "pointer";
124
- keyboard: "keyboard";
125
235
  click: "click";
236
+ keyboard: "keyboard";
237
+ pointer: "pointer";
126
238
  }>>;
127
239
  allowDisabled: z.ZodOptional<z.ZodBoolean>;
128
240
  }, z.core.$strict>, z.ZodObject<{
@@ -186,9 +298,9 @@ declare const portableSemanticReplayStepSchema: z.ZodObject<{
186
298
  candidateValueKey: z.ZodOptional<z.ZodString>;
187
299
  actuatorKind: z.ZodOptional<z.ZodEnum<{
188
300
  fill: "fill";
189
- pointer: "pointer";
190
- keyboard: "keyboard";
191
301
  click: "click";
302
+ keyboard: "keyboard";
303
+ pointer: "pointer";
192
304
  }>>;
193
305
  allowDisabled: z.ZodOptional<z.ZodBoolean>;
194
306
  }, z.core.$strict>, z.ZodObject<{
@@ -253,9 +365,9 @@ declare const uiScenarioReplayStepSchema: z.ZodUnion<readonly [z.ZodObject<{
253
365
  candidateValueKey: z.ZodOptional<z.ZodString>;
254
366
  actuatorKind: z.ZodOptional<z.ZodEnum<{
255
367
  fill: "fill";
256
- pointer: "pointer";
257
- keyboard: "keyboard";
258
368
  click: "click";
369
+ keyboard: "keyboard";
370
+ pointer: "pointer";
259
371
  }>>;
260
372
  allowDisabled: z.ZodOptional<z.ZodBoolean>;
261
373
  }, z.core.$strict>, z.ZodObject<{
@@ -321,7 +433,7 @@ declare const uiScenarioReplayStepSchema: z.ZodUnion<readonly [z.ZodObject<{
321
433
  declare const uiScenarioFixtureSchema: z.ZodObject<{
322
434
  schemaVersion: z.ZodLiteral<2>;
323
435
  browserInteractionProtocol: z.ZodLiteral<"3.0.0">;
324
- pluginRuntimeProtocol: z.ZodLiteral<3>;
436
+ pluginRuntimeProtocol: z.ZodLiteral<4>;
325
437
  id: z.ZodString;
326
438
  title: z.ZodString;
327
439
  gameId: z.ZodString;
@@ -351,7 +463,7 @@ declare const uiScenarioFixtureSchema: z.ZodObject<{
351
463
  phone: "phone";
352
464
  }>>;
353
465
  }, z.core.$strict>;
354
- protocol: z.ZodType<v, unknown, z.core.$ZodTypeInternals<v, unknown>>;
466
+ protocol: z.ZodType<B, unknown, z.core.$ZodTypeInternals<B, unknown>>;
355
467
  replay: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
356
468
  stepId: z.ZodString;
357
469
  requestDigest: z.ZodString;
@@ -366,9 +478,9 @@ declare const uiScenarioFixtureSchema: z.ZodObject<{
366
478
  candidateValueKey: z.ZodOptional<z.ZodString>;
367
479
  actuatorKind: z.ZodOptional<z.ZodEnum<{
368
480
  fill: "fill";
369
- pointer: "pointer";
370
- keyboard: "keyboard";
371
481
  click: "click";
482
+ keyboard: "keyboard";
483
+ pointer: "pointer";
372
484
  }>>;
373
485
  allowDisabled: z.ZodOptional<z.ZodBoolean>;
374
486
  }, z.core.$strict>, z.ZodObject<{
@@ -442,7 +554,7 @@ declare const uiScenarioFixtureBundleIndexSchema: z.ZodObject<{
442
554
  schemaVersion: z.ZodLiteral<2>;
443
555
  bundleId: z.ZodString;
444
556
  sdkCommit: z.ZodString;
445
- pluginRuntimeProtocol: z.ZodLiteral<3>;
557
+ pluginRuntimeProtocol: z.ZodLiteral<4>;
446
558
  browserInteractionProtocol: z.ZodLiteral<"3.0.0">;
447
559
  fixtures: z.ZodArray<z.ZodObject<{
448
560
  id: z.ZodString;
@@ -460,9 +572,9 @@ type UIStepExpectation = z.infer<typeof uiStepExpectationSchema>;
460
572
  type UIResolvedReplayIdentity = z.infer<typeof uiResolvedReplayIdentitySchema>;
461
573
  type PortableSemanticReplayStep = z.infer<typeof portableSemanticReplayStepSchema>;
462
574
  type UIScenarioReplayStep = z.infer<typeof uiScenarioReplayStepSchema>;
463
- type UIFixtureFrame = t;
464
- type UIFixtureProtocolStep = u;
465
- type PluginProtocolTape = v;
575
+ type UIFixtureFrame = y;
576
+ type UIFixtureProtocolStep = z$1;
577
+ type PluginProtocolTape = B;
466
578
  type UIScenarioFixture = Omit<z.infer<typeof uiScenarioFixtureSchema>, "protocol" | "replay"> & {
467
579
  readonly protocol: PluginProtocolTape;
468
580
  readonly replay: readonly UIScenarioReplayStep[];
@@ -517,9 +629,9 @@ declare function digestUIFixtureRequest(request: UIReplayRequest): string;
517
629
  declare function digestUIFixtureTransportRequest(request: {
518
630
  readonly operation: "validate" | "submit";
519
631
  readonly basis?: {
520
- readonly gameVersion: number;
632
+ readonly version: number;
521
633
  readonly actionSetVersion: string;
522
- readonly perspectivePlayerId: string | null;
634
+ readonly perspectivePlayerId: string;
523
635
  };
524
636
  readonly interactionId?: string;
525
637
  readonly payload?: unknown;
@@ -529,81 +641,10 @@ declare function canonicalizeUIScenarioFixture(fixture: UIScenarioFixture): UISc
529
641
  declare function serializeUIScenarioFixture(fixture: UIScenarioFixture): string;
530
642
  declare function digestUIScenarioFixture(fixture: UIScenarioFixture): string;
531
643
 
532
- interface UIParityViewport {
533
- readonly width: number;
534
- readonly height: number;
535
- }
536
- interface UIParityObservationEnvironmentV1 {
537
- readonly project: string;
538
- readonly viewport: UIParityViewport;
539
- }
540
- interface UIParityDiagnosticV1 {
541
- readonly code: string;
542
- readonly message: string;
543
- }
544
- interface UIParityObservationCheckpointV1 {
545
- readonly stepId: string;
546
- readonly interactionKey?: string;
547
- readonly interactionId?: string;
548
- readonly actuatorId?: string;
549
- readonly descriptorDigest?: string;
550
- readonly draftDigest?: string;
551
- readonly gameVersion: number;
552
- readonly actionSetVersion: string;
553
- readonly perspectivePlayerId: string | null;
554
- readonly projectionDigest: string;
555
- readonly semanticDigest: string;
556
- readonly submissionDigest?: string;
557
- readonly screenshot?: string;
558
- }
559
- interface UIParityObservationProvenanceV1 {
560
- readonly kind: "fixture-expectation" | "source-workbench" | "packed-real-host";
561
- readonly evidence?: string;
562
- }
563
- interface UIParityObservationV1 {
564
- readonly schemaVersion: 1;
565
- readonly scenarioId: string;
566
- readonly fixtureDigest: string;
567
- readonly sdkCandidateDigest: string;
568
- readonly pluginRuntimeProtocol: 3;
569
- readonly browserInteractionProtocol: string;
570
- readonly environment: UIParityObservationEnvironmentV1;
571
- readonly provenance: UIParityObservationProvenanceV1;
572
- readonly checkpoints: readonly UIParityObservationCheckpointV1[];
573
- readonly diagnostics: readonly UIParityDiagnosticV1[];
574
- }
575
- type UIParityFailureCode = "candidate-mismatch" | "fixture-source-mismatch" | "protocol-mismatch" | "interaction-resolution-mismatch" | "preparation-mismatch" | "draft-mismatch" | "submission-mismatch" | "projection-mismatch" | "semantic-snapshot-mismatch" | "visual-mismatch" | "host-setup-failure";
576
- interface UIParityComparisonFailure {
577
- readonly code: UIParityFailureCode;
578
- readonly message: string;
579
- readonly path: string;
580
- readonly expected: unknown;
581
- readonly actual: unknown;
582
- readonly checkpointIndex?: number;
583
- readonly stepId?: string;
584
- }
585
- type UIParityComparisonResult = {
586
- readonly ok: true;
587
- } | {
588
- readonly ok: false;
589
- readonly failure: UIParityComparisonFailure;
590
- };
591
- interface CreateUIParityObservationFromFixtureOptions {
592
- readonly fixture: UIScenarioFixture;
593
- readonly sdkCandidateDigest: string;
594
- readonly environment: UIParityObservationEnvironmentV1;
595
- readonly fixtureDigest?: string;
596
- readonly screenshotsByStepId?: Readonly<Record<string, string>>;
597
- readonly diagnostics?: readonly UIParityDiagnosticV1[];
598
- }
599
- declare function createUIParityObservationFromFixture({ fixture, sdkCandidateDigest, environment, fixtureDigest, screenshotsByStepId, diagnostics, }: CreateUIParityObservationFromFixtureOptions): UIParityObservationV1;
600
- declare function parseUIParityObservationV1(value: unknown): UIParityObservationV1;
601
- declare function compareUIParityObservations(expected: UIParityObservationV1, actual: UIParityObservationV1): UIParityComparisonResult;
602
-
603
644
  interface FixtureHostEvent {
604
645
  readonly sequence: number;
605
646
  readonly atMs: number;
606
- readonly kind: "frame-sent" | "validate-received" | "submit-received" | "ack-received" | "ready-received" | "diagnostic";
647
+ readonly kind: "frame-sent" | "submit-received" | "ack-received" | "ready-received" | "diagnostic";
607
648
  readonly requestDigest?: string;
608
649
  readonly frameId?: string;
609
650
  readonly projectionDigest?: string;
@@ -611,7 +652,7 @@ interface FixtureHostEvent {
611
652
  }
612
653
  interface FixtureHostHarness {
613
654
  readonly transport: PluginTransport;
614
- readonly tape: v;
655
+ readonly tape: B;
615
656
  reset(): void;
616
657
  flush(): Promise<void>;
617
658
  advanceHost(): Promise<void>;
@@ -620,7 +661,7 @@ interface FixtureHostHarness {
620
661
  assertConsumed(): void;
621
662
  }
622
663
  interface CreateFixtureHostHarnessOptions {
623
- readonly tape: v;
664
+ readonly tape: B;
624
665
  readonly strict?: boolean;
625
666
  readonly latencyMs?: number;
626
667
  readonly channelId?: string;
@@ -637,7 +678,7 @@ declare function FixturePluginRuntime({ harness, runtime, children, }: {
637
678
 
638
679
  interface CompilePluginProtocolTapeOptions {
639
680
  readonly trace: ReducerScenarioTrace;
640
- readonly session: w;
681
+ readonly session: E;
641
682
  }
642
683
  declare function compilePluginProtocolTape(options: CompilePluginProtocolTapeOptions): PluginProtocolTape;
643
684
 
@@ -698,4 +739,4 @@ declare function drag(options: DragReplayStepOptions): UIScenarioReplayStep;
698
739
  declare function submit(options: ReplayStepOptions): UIScenarioReplayStep;
699
740
  declare function assertStep(stepId: string, expect: UIStepExpectation): UIScenarioReplayStep;
700
741
 
701
- export { type CompilePluginProtocolTapeOptions, type CompileUIScenarioFixtureOptions, type CreateFixtureHostHarnessOptions, CreateReducerScenarioRunnerOptions, type CreateTestRuntimeOptions, type CreatedTestRuntime, type DeterministicIdFactory, ExpectFn, type FixtureEnvironmentInit, type FixtureHostEvent, type FixtureHostHarness, FixturePluginRuntime, InteractionExplanationLike, type PluginProtocolTape, type PortableSemanticReplayStep, type ProtocolUIScenarioAuthority, ReducerScenarioRunner, ReducerScenarioTrace, type ReducerUIScenarioAuthority, SnapshotMatcherHandler, type UIFixtureFrame, type UIFixtureProtocolStep, type UIReplayExecution, type UIReplayIdentityCandidate, type UIReplayRequest, type UIResolvedReplayIdentity, type UIScenarioAuthority, type UIScenarioAuthorityKind, type UIScenarioDefinition, type UIScenarioEnvironmentDefinition, type UIScenarioFixture, type UIScenarioFixtureBundleIndex, type UIScenarioReplayStep, type UIStepExpectation, UI_SCENARIO_FIXTURE_BUNDLE_SCHEMA_VERSION, UI_SCENARIO_FIXTURE_PLUGIN_RUNTIME_PROTOCOL, UI_SCENARIO_FIXTURE_SCHEMA_VERSION, UI_SCENARIO_FIXTURE_SUPPORTED_BROWSER_PROTOCOL_MAJOR, activate, assertDeterministicUIScenarioFixture, assertStep, assertSupportedBrowserInteractionProtocol, assertUIStepExpectationSatisfied, assertUniqueReplayIdentity, canonicalUIFixtureJson, canonicalizeUIFixtureJson, canonicalizeUIScenarioFixture, compareUIParityObservations, compilePluginProtocolTape, compileUIScenarioFixture, createDeterministicIdFactory, createExpectApi, createFixtureHostHarness, createReducerScenarioRunner, createTestRuntime, createUIParityObservationFromFixture, defaultFixtureEnvironmentInit, defineUIScenario, digestPluginProtocolTape, digestUIFixtureJson, digestUIFixtureRequest, digestUIFixtureTransportRequest, digestUIScenarioFixture, drag, fill, fixtureEnvironmentInitFor, isSha256Digest, parseUIParityObservationV1, parseUIScenarioFixture, parseUIScenarioFixtureBundleIndex, pluginProtocolTapeSchema, portableSemanticReplayStepSchema, press, serializeUIScenarioFixture, submit, uiFixtureFrameSchema, uiFixtureProtocolStepSchema, uiReplayExecutionSchema, uiReplayRequestSchema, uiResolvedReplayIdentitySchema, uiScenarioFixtureBundleIndexSchema, uiScenarioFixtureSchema, uiScenarioReplayStepSchema, uiStepExpectationSchema };
742
+ export { ActorRef, type CompilePluginProtocolTapeOptions, type CompileUIScenarioFixtureOptions, type CreateFixtureHostHarnessOptions, type CreateReducerScenarioRunnerOptions, type DeterministicIdFactory, ExpectFn, type ExploreScenarioOptions, type ExploreScenarioResult, type ExploreSeedResult, type ExploreTransitionResult, type FixtureEnvironmentInit, type FixtureHostEvent, type FixtureHostHarness, FixturePluginRuntime, FlowDiagnostic, InspectEntropy, InspectNode, type InspectScenarioOptions, InspectScenarioResult, PerspectiveRef, PerspectiveSelector, type PluginProtocolTape, type PortableSemanticReplayStep, type ProtocolUIScenarioAuthority, type ReducerScenarioBundle, type ReducerScenarioDiagnostic, type ReducerScenarioExchange, type ReducerScenarioFrame, type ReducerScenarioOperation, type ReducerScenarioRunner, type ReducerScenarioTrace, type ReducerScenarioViewer, type ReducerUIScenarioAuthority, ScenarioAssertionError, ScenarioCheckpoint, ScenarioCommand, ScenarioDispatchTraceEntry, ScenarioIdentity, ScenarioReplayDefinition, Sha256Digest, SnapshotMatcherHandler, type UIFixtureFrame, type UIFixtureProtocolStep, type UIReplayExecution, type UIReplayIdentityCandidate, type UIReplayRequest, type UIResolvedReplayIdentity, type UIScenarioAuthority, type UIScenarioAuthorityKind, type UIScenarioDefinition, type UIScenarioEnvironmentDefinition, type UIScenarioFixture, type UIScenarioFixtureBundleIndex, type UIScenarioReplayStep, type UIStepExpectation, UI_SCENARIO_FIXTURE_BUNDLE_SCHEMA_VERSION, UI_SCENARIO_FIXTURE_PLUGIN_RUNTIME_PROTOCOL, UI_SCENARIO_FIXTURE_SCHEMA_VERSION, UI_SCENARIO_FIXTURE_SUPPORTED_BROWSER_PROTOCOL_MAJOR, activate, assertDeterministicUIScenarioFixture, assertStep, assertSupportedBrowserInteractionProtocol, assertUIStepExpectationSatisfied, assertUniqueReplayIdentity, canonicalUIFixtureJson, canonicalizeUIFixtureJson, canonicalizeUIScenarioFixture, compilePluginProtocolTape, compileUIScenarioFixture, createDeterministicIdFactory, createExpectApi, createFixtureHostHarness, createReducerScenarioRunner, defaultFixtureEnvironmentInit, defineUIScenario, digestPluginProtocolTape, digestUIFixtureJson, digestUIFixtureRequest, digestUIFixtureTransportRequest, digestUIScenarioFixture, drag, exploreScenario, fill, fixtureEnvironmentInitFor, inspectScenario, isSha256Digest, parseUIScenarioFixture, parseUIScenarioFixtureBundleIndex, pluginProtocolTapeSchema, portableSemanticReplayStepSchema, press, serializeUIScenarioFixture, submit, uiFixtureFrameSchema, uiFixtureProtocolStepSchema, uiReplayExecutionSchema, uiReplayRequestSchema, uiResolvedReplayIdentitySchema, uiScenarioFixtureBundleIndexSchema, uiScenarioFixtureSchema, uiScenarioReplayStepSchema, uiStepExpectationSchema };