@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.
- package/README.md +49 -11
- package/dist/authoring/index.d.ts +6 -14
- package/dist/authoring/index.js +11 -547
- package/dist/authoring/index.js.map +1 -1
- package/dist/authoring-compiler.d.ts +27 -0
- package/dist/authoring-compiler.js +11 -0
- package/dist/authoring-compiler.js.map +1 -0
- package/dist/authoring-materialize-cli.d.ts +1 -0
- package/dist/authoring-materialize-cli.js +45 -0
- package/dist/authoring-materialize-cli.js.map +1 -0
- package/dist/browser-interaction.d.ts +22 -22
- package/dist/{chunk-3BLN5POZ.js → chunk-2GQIALJL.js} +51 -15
- package/dist/chunk-2GQIALJL.js.map +1 -0
- package/dist/chunk-533O7C4L.js +7095 -0
- package/dist/chunk-533O7C4L.js.map +1 -0
- package/dist/{chunk-44N3T2A5.js → chunk-6LMESVGT.js} +9 -28
- package/dist/chunk-6LMESVGT.js.map +1 -0
- package/dist/{chunk-ZYONCTZ2.js → chunk-DQS2EG5E.js} +3 -3
- package/dist/{chunk-ZYONCTZ2.js.map → chunk-DQS2EG5E.js.map} +1 -1
- package/dist/chunk-EOEA3I64.js +1864 -0
- package/dist/chunk-EOEA3I64.js.map +1 -0
- package/dist/{chunk-B2YBS3SG.js → chunk-FL67RDID.js} +41 -13
- package/dist/chunk-FL67RDID.js.map +1 -0
- package/dist/{chunk-2TAKLJJD.js → chunk-HIH6Y4FA.js} +222 -1267
- package/dist/chunk-HIH6Y4FA.js.map +1 -0
- package/dist/chunk-HUK4234C.js +166 -0
- package/dist/chunk-HUK4234C.js.map +1 -0
- package/dist/chunk-KGV2EUNN.js +532 -0
- package/dist/chunk-KGV2EUNN.js.map +1 -0
- package/dist/{chunk-VTK4TIXC.js → chunk-KRJPRYEA.js} +49 -4
- package/dist/chunk-KRJPRYEA.js.map +1 -0
- package/dist/chunk-KWHOFBDM.js +9 -0
- package/dist/chunk-KWHOFBDM.js.map +1 -0
- package/dist/{chunk-UC2UXAC6.js → chunk-LMHCGCA6.js} +2 -2
- package/dist/{chunk-XV27IQHA.js → chunk-N33CGX2F.js} +15 -85
- package/dist/chunk-N33CGX2F.js.map +1 -0
- package/dist/chunk-TXELBVTG.js +32 -0
- package/dist/chunk-TXELBVTG.js.map +1 -0
- package/dist/{chunk-2TRZSZGD.js → chunk-VRRR6QZT.js} +9 -12
- package/dist/chunk-VRRR6QZT.js.map +1 -0
- package/dist/chunk-VWTKGIYF.js +90 -0
- package/dist/chunk-VWTKGIYF.js.map +1 -0
- package/dist/{chunk-IYX5OO2K.js → chunk-XFMSLL3P.js} +133 -61
- package/dist/chunk-XFMSLL3P.js.map +1 -0
- package/dist/{chunk-YGQTL63W.js → chunk-ZSTCUJKZ.js} +4 -4
- package/dist/chunk-ZSTCUJKZ.js.map +1 -0
- package/dist/codegen.js +1 -1
- package/dist/{components-BTwSIjXj.d.ts → components-CNAt5J1p.d.ts} +1 -1
- package/dist/definitions-bZSBaPjj.d.ts +300 -0
- package/dist/{diagnostics-1BWjRo6-.d.ts → diagnostics-DIi3ina7.d.ts} +2 -1
- package/dist/digest.d.ts +8 -0
- package/dist/{index-CFTjJIXd.d.ts → index-CR69MyWr.d.ts} +2 -2
- package/dist/{index.d-C0PKOVbh.d.ts → index.d-Bw8AOcgp.d.ts} +532 -225
- package/dist/index.js +2 -2
- package/dist/package-set.d.ts +2 -2
- package/dist/package-set.js +2 -2
- package/dist/plugin-runtime-contract.d.ts +17 -0
- package/dist/plugin-runtime-contract.js +94 -0
- package/dist/plugin-runtime-contract.js.map +1 -0
- package/dist/{protocol-nS2ojsGr.d.ts → protocol-CVaSqPgX.d.ts} +54 -47
- package/dist/reducer/advanced.d.ts +5 -4
- package/dist/reducer/advanced.js +14 -108
- package/dist/reducer/advanced.js.map +1 -1
- package/dist/reducer-contract.d.ts +1 -1
- package/dist/reducer-contract.js +6 -4
- package/dist/reducer.d.ts +20 -98
- package/dist/reducer.js +28 -6050
- package/dist/reducer.js.map +1 -1
- package/dist/reference-games/index.d.ts +6 -198
- package/dist/reference-games/index.js +18 -200
- package/dist/reference-games/index.js.map +1 -1
- package/dist/runtime/primitives.d.ts +3 -3
- package/dist/runtime/primitives.js +5 -5
- package/dist/runtime/runtime-api.d.ts +1 -1
- package/dist/runtime/workspace-contract.d.ts +343 -11
- package/dist/runtime/workspace-contract.js +12 -6
- package/dist/{runtime-Dkfm1x2r.d.ts → runtime-C7Z2acNU.d.ts} +67 -31
- package/dist/{runtime-api-C6aWo9c0.d.ts → runtime-api-CgPuEVeF.d.ts} +4 -13
- package/dist/runtime.d.ts +7 -7
- package/dist/runtime.js +15 -11
- package/dist/runtime.js.map +1 -1
- package/dist/schema.d.ts +405 -0
- package/dist/{stale-contract-artifact-error-C5AaZPJ8.d.ts → stale-contract-artifact-error-XLaweZtF.d.ts} +1 -1
- package/dist/testing-compiler.d.ts +37 -0
- package/dist/testing-compiler.js +272 -0
- package/dist/testing-compiler.js.map +1 -0
- package/dist/testing-runtime.d.ts +98 -21
- package/dist/testing-runtime.js +154 -95
- package/dist/testing-runtime.js.map +1 -1
- package/dist/testing.d.ts +197 -156
- package/dist/testing.js +660 -372
- package/dist/testing.js.map +1 -1
- package/dist/types-DN4O7kH_.d.ts +122 -0
- package/dist/{types-CTeN_QAk.d.ts → types-q1Guidm5.d.ts} +4 -5
- package/dist/types.d.ts +0 -1
- package/dist/ui/components.d.ts +3 -2
- package/dist/ui/components.js +1 -1
- package/dist/ui/plugin-styles.css +1 -1
- package/dist/{ui-contract-Ue6SywvO.d.ts → ui-contract-BC4JpysE.d.ts} +2 -6
- package/dist/ui.d.ts +4 -3
- package/dist/ui.js +2 -2
- package/dist/{views-Qx-EHBP8.d.ts → views-D2Cfzr3h.d.ts} +17 -5
- package/package.json +41 -22
- package/REFERENCE.md +0 -22884
- package/dist/chunk-2TAKLJJD.js.map +0 -1
- package/dist/chunk-2TRZSZGD.js.map +0 -1
- package/dist/chunk-3BLN5POZ.js.map +0 -1
- package/dist/chunk-3OZMHZK3.js +0 -40
- package/dist/chunk-3OZMHZK3.js.map +0 -1
- package/dist/chunk-44N3T2A5.js.map +0 -1
- package/dist/chunk-5CQIJHGF.js +0 -663
- package/dist/chunk-5CQIJHGF.js.map +0 -1
- package/dist/chunk-B2YBS3SG.js.map +0 -1
- package/dist/chunk-IYX5OO2K.js.map +0 -1
- package/dist/chunk-VTK4TIXC.js.map +0 -1
- package/dist/chunk-VTNEWMWJ.js +0 -12
- package/dist/chunk-VTNEWMWJ.js.map +0 -1
- package/dist/chunk-XV27IQHA.js.map +0 -1
- package/dist/chunk-YGQTL63W.js.map +0 -1
- package/dist/types-B_3pObUV.d.ts +0 -192
- /package/dist/{chunk-UC2UXAC6.js.map → chunk-LMHCGCA6.js.map} +0 -0
package/dist/testing.d.ts
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { R as ReducerDiagnosticEvent
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import {
|
|
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-
|
|
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-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
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:
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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 =
|
|
464
|
-
type UIFixtureProtocolStep =
|
|
465
|
-
type PluginProtocolTape =
|
|
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
|
|
632
|
+
readonly version: number;
|
|
521
633
|
readonly actionSetVersion: string;
|
|
522
|
-
readonly perspectivePlayerId: string
|
|
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" | "
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
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 };
|