@dreamboard-games/sdk 0.5.0-alpha.2 → 0.5.0-alpha.3
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 +136 -45
- package/dist/chunk-DMFVAZI2.js +16 -0
- package/dist/chunk-DMFVAZI2.js.map +1 -0
- package/dist/chunk-FMM5LVJW.js +833 -0
- package/dist/chunk-FMM5LVJW.js.map +1 -0
- package/dist/{chunk-S2JEDVWH.js → chunk-LRILEVKC.js} +6113 -6489
- package/dist/chunk-LRILEVKC.js.map +1 -0
- package/dist/chunk-SP234IY4.js +1363 -0
- package/dist/chunk-SP234IY4.js.map +1 -0
- package/dist/chunk-VUWNJXLJ.js +52 -0
- package/dist/chunk-VUWNJXLJ.js.map +1 -0
- package/dist/chunk-ZPRKWPEP.js +511 -0
- package/dist/chunk-ZPRKWPEP.js.map +1 -0
- package/dist/definition-BaHNPZol.d.ts +4639 -0
- package/dist/diagnostics-B0lgnuZ6.d.ts +65 -0
- package/dist/index.d.ts +3553 -1
- package/dist/index.js +1045 -6
- package/dist/index.js.map +1 -1
- package/dist/model-BHro6yXu.d.ts +288 -0
- package/dist/react.d.ts +32 -0
- package/dist/react.js +80 -0
- package/dist/react.js.map +1 -0
- package/dist/reducer.d.ts +1194 -79
- package/dist/reducer.js +4326 -121
- package/dist/reducer.js.map +1 -1
- package/dist/testing.d.ts +518 -564
- package/dist/testing.js +2448 -915
- package/dist/testing.js.map +1 -1
- package/dist/types-DimqnJBq.d.ts +86 -0
- package/package.json +26 -131
- package/dist/HandView-Bi2lxzQP.d.ts +0 -79
- package/dist/ResourceCounter-BFxJknqp.d.ts +0 -98
- package/dist/ThemeProvider-CElaL2ik.d.ts +0 -99
- package/dist/attributes-DbvyMbXw.d.ts +0 -68
- package/dist/browser-interaction.d.ts +0 -910
- package/dist/browser-interaction.js +0 -119
- package/dist/browser-interaction.js.map +0 -1
- package/dist/chunk-32PFKDV7.js +0 -11705
- package/dist/chunk-32PFKDV7.js.map +0 -1
- package/dist/chunk-3BAD4VC2.js +0 -263
- package/dist/chunk-3BAD4VC2.js.map +0 -1
- package/dist/chunk-3SKDNDPG.js +0 -104
- package/dist/chunk-3SKDNDPG.js.map +0 -1
- package/dist/chunk-5YV2WHJ4.js +0 -25
- package/dist/chunk-5YV2WHJ4.js.map +0 -1
- package/dist/chunk-ANRB4XKA.js +0 -90
- package/dist/chunk-ANRB4XKA.js.map +0 -1
- package/dist/chunk-BI4G3PM2.js +0 -1864
- package/dist/chunk-BI4G3PM2.js.map +0 -1
- package/dist/chunk-EVCLTY4Q.js +0 -935
- package/dist/chunk-EVCLTY4Q.js.map +0 -1
- package/dist/chunk-GDPKTBUR.js +0 -564
- package/dist/chunk-GDPKTBUR.js.map +0 -1
- package/dist/chunk-H6VDGFL5.js +0 -2903
- package/dist/chunk-H6VDGFL5.js.map +0 -1
- package/dist/chunk-LR3ZTWQF.js +0 -5960
- package/dist/chunk-LR3ZTWQF.js.map +0 -1
- package/dist/chunk-PF7L4BMG.js +0 -117
- package/dist/chunk-PF7L4BMG.js.map +0 -1
- package/dist/chunk-PN5O6GG2.js +0 -32
- package/dist/chunk-PN5O6GG2.js.map +0 -1
- package/dist/chunk-PZ5AY32C.js +0 -10
- package/dist/chunk-PZ5AY32C.js.map +0 -1
- package/dist/chunk-S2JEDVWH.js.map +0 -1
- package/dist/chunk-T3ZKNUZ7.js +0 -1
- package/dist/chunk-T3ZKNUZ7.js.map +0 -1
- package/dist/chunk-UGH54WZ2.js +0 -223
- package/dist/chunk-UGH54WZ2.js.map +0 -1
- package/dist/chunk-VCDWP5VL.js +0 -746
- package/dist/chunk-VCDWP5VL.js.map +0 -1
- package/dist/chunk-VDXOF4FW.js +0 -69
- package/dist/chunk-VDXOF4FW.js.map +0 -1
- package/dist/chunk-WHR5UW3F.js +0 -1988
- package/dist/chunk-WHR5UW3F.js.map +0 -1
- package/dist/chunk-Y75CFE77.js +0 -17
- package/dist/chunk-Y75CFE77.js.map +0 -1
- package/dist/chunk-Z7QCREWI.js +0 -3435
- package/dist/chunk-Z7QCREWI.js.map +0 -1
- package/dist/chunk-ZZGN2ATS.js +0 -1941
- package/dist/chunk-ZZGN2ATS.js.map +0 -1
- package/dist/components-gAbIz7hK.d.ts +0 -1284
- package/dist/definitions-BgmV_GhC.d.ts +0 -300
- package/dist/diagnostics-DIi3ina7.d.ts +0 -50
- package/dist/digest.d.ts +0 -8
- package/dist/game-CsZScpcn.d.ts +0 -763
- package/dist/hex-board-view-aKkblDp6.d.ts +0 -1228
- package/dist/index-CcT9Q7N7.d.ts +0 -193
- package/dist/index.d-DjzoK7zn.d.ts +0 -2101
- package/dist/package-set.d.ts +0 -13
- package/dist/package-set.js +0 -12
- package/dist/package-set.js.map +0 -1
- package/dist/player-state-Cqpyeql0.d.ts +0 -371
- package/dist/plugin-runtime-contract.d.ts +0 -17
- package/dist/plugin-runtime-contract.js +0 -92
- package/dist/plugin-runtime-contract.js.map +0 -1
- package/dist/primitive-props-BNHDkgd7.d.ts +0 -16
- package/dist/protocol-dYgafTYY.d.ts +0 -314
- package/dist/reducer/advanced.d.ts +0 -82
- package/dist/reducer/advanced.js +0 -51
- package/dist/reducer/advanced.js.map +0 -1
- package/dist/reducer-contract.d.ts +0 -11
- package/dist/reducer-contract.js +0 -16
- package/dist/reducer-contract.js.map +0 -1
- package/dist/reference-games/index.d.ts +0 -31
- package/dist/reference-games/index.js +0 -48
- package/dist/reference-games/index.js.map +0 -1
- package/dist/runtime/primitives.d.ts +0 -250
- package/dist/runtime/primitives.js +0 -189
- package/dist/runtime/primitives.js.map +0 -1
- package/dist/runtime/runtime-api.d.ts +0 -2
- package/dist/runtime/runtime-api.js +0 -1
- package/dist/runtime/runtime-api.js.map +0 -1
- package/dist/runtime/workspace-contract.d.ts +0 -392
- package/dist/runtime/workspace-contract.js +0 -28
- package/dist/runtime/workspace-contract.js.map +0 -1
- package/dist/runtime-RJ5orDJU.d.ts +0 -1699
- package/dist/runtime-api-Bz5pwNU_.d.ts +0 -296
- package/dist/runtime-json-CQ9QbLZ5.d.ts +0 -5
- package/dist/runtime.d.ts +0 -83
- package/dist/runtime.js +0 -242
- package/dist/runtime.js.map +0 -1
- package/dist/schema.d.ts +0 -379
- package/dist/stale-contract-artifact-error-XLaweZtF.d.ts +0 -18
- package/dist/testing-compiler.d.ts +0 -37
- package/dist/testing-compiler.js +0 -272
- package/dist/testing-compiler.js.map +0 -1
- package/dist/testing-runtime.d.ts +0 -119
- package/dist/testing-runtime.js +0 -212
- package/dist/testing-runtime.js.map +0 -1
- package/dist/types-DJj5MJkl.d.ts +0 -256
- package/dist/types-DR7DoB1x.d.ts +0 -28
- package/dist/types-JWCYHmu7.d.ts +0 -122
- package/dist/types.d.ts +0 -1958
- package/dist/types.js +0 -14
- package/dist/types.js.map +0 -1
- package/dist/ui/components.d.ts +0 -17
- package/dist/ui/components.js +0 -216
- package/dist/ui/components.js.map +0 -1
- package/dist/ui/defaults.d.ts +0 -19
- package/dist/ui/defaults.js +0 -104
- package/dist/ui/defaults.js.map +0 -1
- package/dist/ui/player-state.d.ts +0 -2
- package/dist/ui/player-state.js +0 -1
- package/dist/ui/player-state.js.map +0 -1
- package/dist/ui/plugin-styles.css +0 -2
- package/dist/ui-contract-GTUPkf8z.d.ts +0 -1168
- package/dist/ui.d.ts +0 -317
- package/dist/ui.js +0 -277
- package/dist/ui.js.map +0 -1
- package/dist/views-BpuWcOyN.d.ts +0 -1641
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/testing/scenario-projection-digest.ts","../src/testing-runtime.ts"],"sourcesContent":["import { digestScenarioJson } from \"./canonical.js\";\nimport { interactionDomainEligibleCount } from \"../reducer/bundle/trusted/interaction-domain-metadata.js\";\nimport type { InspectNode, Sha256Digest } from \"./inspection/types.js\";\n\nexport type ScenarioProjectionInteractionInput = {\n readonly key: string;\n readonly kind: string;\n readonly domain: unknown;\n};\n\n/** Shared SDK normalization for inspect DTOs and backend parity projections. */\nexport function scenarioProjectionInputMetadata(\n input: ScenarioProjectionInteractionInput,\n): {\n readonly key: string;\n readonly kind: string;\n readonly eligibleCount: number | \"lazy\";\n} {\n return {\n key: input.key,\n kind: input.kind,\n eligibleCount: interactionDomainEligibleCount(input.domain),\n };\n}\n\nexport type ScenarioProjectionParity = {\n readonly perspective: \"spectator\" | { readonly seat: number };\n readonly flow: {\n readonly phase: string;\n readonly step: string | null;\n readonly activeSeats: readonly number[];\n readonly pendingSeats: readonly number[];\n readonly continuationWaiterSeats: readonly number[];\n readonly blockedBy: readonly {\n readonly actorSeat: number;\n readonly blockerSeats: readonly number[];\n }[];\n };\n readonly view: unknown;\n readonly interactions: readonly {\n readonly actorSeat: number;\n readonly interactionId: string;\n readonly availability: {\n readonly status: string;\n readonly code?: string;\n readonly reason?: string;\n };\n readonly inputs: readonly {\n readonly key: string;\n readonly kind: string;\n readonly eligibleCount: number | \"lazy\";\n }[];\n }[];\n};\n\n/**\n * Canonical local/backend parity authority. It deliberately excludes raw\n * reducer public/private state, interaction explanations, entropy, and trace:\n * backend gameplay frames expose the selected projection, not reducer state.\n */\nexport function scenarioProjectionParityFromInspectNode(\n node: InspectNode,\n): ScenarioProjectionParity {\n return {\n perspective:\n node.perspective.kind === \"spectator\"\n ? \"spectator\"\n : { seat: node.perspective.actor.seat },\n flow: {\n phase: node.flow.phase,\n step: node.flow.step,\n activeSeats: node.flow.activeActors.map(({ seat }) => seat),\n pendingSeats: node.flow.pendingActors.map(({ seat }) => seat),\n continuationWaiterSeats: node.flow.continuationWaiters.map(\n ({ seat }) => seat,\n ),\n blockedBy: node.flow.blockedBy.map(({ actor, blockers }) => ({\n actorSeat: actor.seat,\n blockerSeats: blockers.map(({ seat }) => seat),\n })),\n },\n view: node.view,\n interactions: node.interactions.map(\n ({ actor, interactionId, availability, inputs }) => ({\n actorSeat: actor.seat,\n interactionId,\n availability,\n inputs,\n }),\n ),\n };\n}\n\nexport function digestScenarioProjection(\n projection: ScenarioProjectionParity,\n): Sha256Digest {\n return digestScenarioJson({\n digestVersion: \"scenario-projection@1\",\n projection,\n });\n}\n","import type { DispatchTraceSummaryEntry } from \"./reducer/diagnostics.js\";\nimport {\n ScenarioReplayError,\n type ScenarioDefinition,\n} from \"./testing/definitions.js\";\nimport type { ScenarioDefinitionGameLike } from \"./testing/scenario-definition-validation.js\";\nimport { assertScenario, replayScenario } from \"./testing/scenario-replay.js\";\n\nexport {\n materializeScenarioRuntimeCheckpoint,\n type ScenarioRuntimeCheckpointMaterialization,\n} from \"./testing/scenario-replay.js\";\n\n// Internal published seam for CLI scenario loading and backend parity. These\n// helpers intentionally do not appear on the author-facing `/testing` facade.\nexport { resolveScenarioCommandParams } from \"./testing/scenario-player-refs.js\";\nexport {\n digestScenarioProjection,\n scenarioProjectionInputMetadata,\n scenarioProjectionParityFromInspectNode,\n type ScenarioProjectionInteractionInput,\n type ScenarioProjectionParity,\n} from \"./testing/scenario-projection-digest.js\";\n\nexport type CandidateVerificationScenario<\n Game extends ScenarioDefinitionGameLike,\n> = ScenarioDefinition<Game>;\n\nexport type CandidateVerificationInput<\n Game extends ScenarioDefinitionGameLike,\n> = {\n /** The authored reducer game definition used by production dispatch. */\n readonly reducer: Game;\n readonly scenarios:\n | Readonly<Record<string, CandidateVerificationScenario<Game>>>\n | readonly CandidateVerificationScenario<Game>[];\n readonly maxScenarios?: number;\n readonly maxStepsPerScenario?: number;\n};\n\nexport type CandidateVerificationReplayDiagnostic = {\n readonly kind: \"replay\";\n readonly message: string;\n readonly scenarioId?: string;\n readonly segment?: \"given\" | \"when\";\n readonly index?: number;\n readonly interactionId?: string;\n readonly errorCode?: string;\n readonly reducerMessage?: string;\n readonly trace?: readonly DispatchTraceSummaryEntry[];\n};\n\nexport type CandidateVerificationAssertionDiagnostic = {\n readonly kind: \"assertion\";\n readonly message: string;\n};\n\nexport type CandidateVerificationLimitDiagnostic = {\n readonly kind: \"limit\";\n readonly message: string;\n readonly actualSteps: number;\n readonly maxStepsPerScenario: number;\n};\n\nexport type CandidateVerificationScenarioResult = {\n readonly id: string;\n readonly status: \"passed\" | \"failed\";\n readonly diagnostic?:\n | CandidateVerificationReplayDiagnostic\n | CandidateVerificationAssertionDiagnostic\n | CandidateVerificationLimitDiagnostic;\n};\n\nexport type CandidateVerificationResult = {\n readonly status: \"passed\" | \"failed\";\n readonly scenarioSummary: {\n readonly total: number;\n readonly passed: number;\n readonly failed: number;\n readonly scenarios: readonly CandidateVerificationScenarioResult[];\n };\n};\n\nconst CANDIDATE_INPUT_FIELDS = new Set([\n \"reducer\",\n \"scenarios\",\n \"maxScenarios\",\n \"maxStepsPerScenario\",\n]);\nconst MAX_DIAGNOSTIC_MESSAGE_LENGTH = 2_000;\nconst MAX_DIAGNOSTIC_TRACE_ENTRIES = 100;\n\nexport async function runCandidateVerification<\n const Game extends ScenarioDefinitionGameLike,\n>(\n input: CandidateVerificationInput<Game>,\n): Promise<CandidateVerificationResult> {\n assertCandidateInputFields(input);\n const scenarios = normalizeScenarios(input.scenarios);\n if (scenarios.length === 0) {\n throw new Error(\"Candidate verification requires at least one scenario.\");\n }\n\n const maxScenarios = input.maxScenarios ?? scenarios.length;\n assertPositiveInteger(maxScenarios, \"maxScenarios\");\n if (scenarios.length > maxScenarios) {\n throw new Error(\n `Candidate verification contains ${scenarios.length} scenarios, exceeding limit ${maxScenarios}.`,\n );\n }\n\n const maxStepsPerScenario = input.maxStepsPerScenario ?? 1_000;\n assertPositiveInteger(maxStepsPerScenario, \"maxStepsPerScenario\");\n\n const results: CandidateVerificationScenarioResult[] = [];\n for (const scenario of scenarios) {\n results.push(\n await runScenario({\n reducer: input.reducer,\n scenario,\n maxStepsPerScenario,\n }),\n );\n }\n\n const failed = results.filter((result) => result.status === \"failed\").length;\n return {\n status: failed === 0 ? \"passed\" : \"failed\",\n scenarioSummary: {\n total: results.length,\n passed: results.length - failed,\n failed,\n scenarios: results,\n },\n };\n}\n\nasync function runScenario<Game extends ScenarioDefinitionGameLike>(input: {\n readonly reducer: Game;\n readonly scenario: CandidateVerificationScenario<Game>;\n readonly maxStepsPerScenario: number;\n}): Promise<CandidateVerificationScenarioResult> {\n const actualSteps = input.scenario.given.length + input.scenario.when.length;\n if (actualSteps > input.maxStepsPerScenario) {\n return {\n id: input.scenario.id,\n status: \"failed\",\n diagnostic: {\n kind: \"limit\",\n message:\n `Scenario contains ${actualSteps} replay steps, exceeding ` +\n `maxStepsPerScenario limit ${input.maxStepsPerScenario}.`,\n actualSteps,\n maxStepsPerScenario: input.maxStepsPerScenario,\n },\n };\n }\n\n let replay;\n try {\n replay = await replayScenario({\n game: input.reducer,\n scenario: input.scenario,\n });\n } catch (error) {\n return {\n id: input.scenario.id,\n status: \"failed\",\n diagnostic: replayDiagnostic(error),\n };\n }\n\n try {\n await assertScenario({ replay, assertion: input.scenario.then });\n return { id: input.scenario.id, status: \"passed\" };\n } catch (error) {\n return {\n id: input.scenario.id,\n status: \"failed\",\n diagnostic: {\n kind: \"assertion\",\n message: boundedMessage(error),\n },\n };\n }\n}\n\nfunction assertCandidateInputFields(input: object): void {\n for (const field of Object.keys(input)) {\n if (!CANDIDATE_INPUT_FIELDS.has(field)) {\n throw new Error(\n `Candidate verification input contains unsupported field '${field}'.`,\n );\n }\n }\n}\n\nfunction assertPositiveInteger(value: number, field: string): void {\n if (!Number.isSafeInteger(value) || value < 1) {\n throw new Error(`${field} must be a positive safe integer.`);\n }\n}\n\nfunction normalizeScenarios<Game extends ScenarioDefinitionGameLike>(\n input:\n | Readonly<Record<string, CandidateVerificationScenario<Game>>>\n | readonly CandidateVerificationScenario<Game>[],\n): CandidateVerificationScenario<Game>[] {\n if (typeof input !== \"object\" || input === null) {\n throw new Error(\n \"Candidate verification scenarios must be an array or record.\",\n );\n }\n const scenarios = Array.isArray(input) ? [...input] : Object.values(input);\n const seenIds = new Set<string>();\n for (const scenario of scenarios) {\n if (typeof scenario?.id !== \"string\" || scenario.id.length === 0) {\n throw new Error(\"Candidate verification scenario id is required.\");\n }\n if (seenIds.has(scenario.id)) {\n throw new Error(\n `Candidate verification scenario id '${scenario.id}' is duplicated.`,\n );\n }\n seenIds.add(scenario.id);\n }\n return scenarios;\n}\n\nfunction replayDiagnostic(\n error: unknown,\n): CandidateVerificationReplayDiagnostic {\n if (error instanceof ScenarioReplayError) {\n return {\n kind: \"replay\",\n message: boundedMessage(error),\n scenarioId: error.scenarioId,\n segment: error.segment,\n index: error.index,\n interactionId: error.interactionId,\n errorCode: error.errorCode,\n ...(error.reducerMessage === undefined\n ? {}\n : { reducerMessage: boundedText(error.reducerMessage) }),\n trace: error.trace.slice(0, MAX_DIAGNOSTIC_TRACE_ENTRIES),\n };\n }\n return { kind: \"replay\", message: boundedMessage(error) };\n}\n\nfunction boundedMessage(error: unknown): string {\n return boundedText(error instanceof Error ? error.message : String(error));\n}\n\nfunction boundedText(value: string): string {\n return value.slice(0, MAX_DIAGNOSTIC_MESSAGE_LENGTH);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAWO,SAAS,gCACd,OAKA;AACA,SAAO;AAAA,IACL,KAAK,MAAM;AAAA,IACX,MAAM,MAAM;AAAA,IACZ,eAAe,+BAA+B,MAAM,MAAM;AAAA,EAC5D;AACF;AAqCO,SAAS,wCACd,MAC0B;AAC1B,SAAO;AAAA,IACL,aACE,KAAK,YAAY,SAAS,cACtB,cACA,EAAE,MAAM,KAAK,YAAY,MAAM,KAAK;AAAA,IAC1C,MAAM;AAAA,MACJ,OAAO,KAAK,KAAK;AAAA,MACjB,MAAM,KAAK,KAAK;AAAA,MAChB,aAAa,KAAK,KAAK,aAAa,IAAI,CAAC,EAAE,KAAK,MAAM,IAAI;AAAA,MAC1D,cAAc,KAAK,KAAK,cAAc,IAAI,CAAC,EAAE,KAAK,MAAM,IAAI;AAAA,MAC5D,yBAAyB,KAAK,KAAK,oBAAoB;AAAA,QACrD,CAAC,EAAE,KAAK,MAAM;AAAA,MAChB;AAAA,MACA,WAAW,KAAK,KAAK,UAAU,IAAI,CAAC,EAAE,OAAO,SAAS,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,KAAK,CAAC;AAC3E;AAEA,SAAS,YAAY,OAAuB;AAC1C,SAAO,MAAM,MAAM,GAAG,6BAA6B;AACrD;","names":[]}
|
package/dist/types-DJj5MJkl.d.ts
DELETED
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
declare const DREAMBOARD_BROWSER_INTERACTION_PROTOCOL_NAME: "dreamboard-browser-interaction";
|
|
2
|
-
declare const DREAMBOARD_BROWSER_INTERACTION_PROTOCOL_VERSION: "3.0.0";
|
|
3
|
-
declare const BROWSER_INTERACTION_ATTRIBUTES: {
|
|
4
|
-
readonly protocol: "data-dreamboard-browser-protocol";
|
|
5
|
-
readonly surface: "data-dreamboard-browser-surface";
|
|
6
|
-
readonly scope: "data-dreamboard-browser-scope";
|
|
7
|
-
readonly role: "data-dreamboard-browser-role";
|
|
8
|
-
readonly intent: "data-dreamboard-browser-intent";
|
|
9
|
-
readonly interactionKey: "data-dreamboard-interaction-key";
|
|
10
|
-
readonly interactionId: "data-dreamboard-interaction-id";
|
|
11
|
-
readonly descriptorDigest: "data-dreamboard-descriptor-digest";
|
|
12
|
-
readonly draftDigest: "data-dreamboard-draft-digest";
|
|
13
|
-
readonly readiness: "data-dreamboard-readiness";
|
|
14
|
-
readonly inputKey: "data-dreamboard-input-key";
|
|
15
|
-
readonly candidateValue: "data-dreamboard-candidate-value";
|
|
16
|
-
readonly candidateState: "data-dreamboard-candidate-state";
|
|
17
|
-
readonly actuatorKind: "data-dreamboard-actuator-kind";
|
|
18
|
-
readonly enabled: "data-dreamboard-actuator-enabled";
|
|
19
|
-
readonly actuatorId: "data-dreamboard-actuator-id";
|
|
20
|
-
readonly pointerTargetId: "data-dreamboard-pointer-target-id";
|
|
21
|
-
readonly pointerTargetEnabled: "data-dreamboard-pointer-target-enabled";
|
|
22
|
-
readonly semanticEffects: "data-dreamboard-semantic-effects";
|
|
23
|
-
readonly acceptedEffectPatterns: "data-dreamboard-accepted-effect-patterns";
|
|
24
|
-
readonly preparationPatterns: "data-dreamboard-preparation-patterns";
|
|
25
|
-
readonly preparesIntent: "data-dreamboard-prepares-intent";
|
|
26
|
-
readonly preparesInputKey: "data-dreamboard-prepares-input-key";
|
|
27
|
-
readonly preparesCandidateValue: "data-dreamboard-prepares-candidate-value";
|
|
28
|
-
readonly preparesActuatorKind: "data-dreamboard-prepares-actuator-kind";
|
|
29
|
-
readonly diagnostic: "data-dreamboard-browser-diagnostic";
|
|
30
|
-
};
|
|
31
|
-
declare const BROWSER_INTERACTION_RECORD_ROLES: readonly ["interaction", "actuator", "pointer-target"];
|
|
32
|
-
declare const GAMEPLAY_BROWSER_INTERACTION_SURFACE: "gameplay";
|
|
33
|
-
declare const GAMEPLAY_BROWSER_INTERACTION_INTENTS: readonly ["arm", "reveal", "invoke", "select", "toggle", "increment", "decrement", "fill", "submit"];
|
|
34
|
-
declare const GAMEPLAY_BROWSER_INTERACTION_EFFECT_KINDS: readonly ["setCandidate", "adjustResource", "setScalar", "commit", "invoke"];
|
|
35
|
-
declare const BROWSER_INTERACTION_READINESS_VALUES: readonly ["ready", "blocked", "unavailable"];
|
|
36
|
-
declare const BROWSER_INTERACTION_CANDIDATE_STATES: readonly ["selected", "unselected", "mixed"];
|
|
37
|
-
declare const BROWSER_INTERACTION_ACTUATOR_KINDS: readonly ["click", "fill", "keyboard", "pointer"];
|
|
38
|
-
|
|
39
|
-
type CanonicalBrowserInteractionValue = null | boolean | number | string | readonly CanonicalBrowserInteractionValue[] | {
|
|
40
|
-
readonly [key: string]: CanonicalBrowserInteractionValue;
|
|
41
|
-
};
|
|
42
|
-
declare function encodeCanonicalCandidateValue(value: unknown): string;
|
|
43
|
-
declare function decodeCanonicalCandidateValue(encoded: string): CanonicalBrowserInteractionValue;
|
|
44
|
-
declare function compareStableJson(a: unknown, b: unknown): number;
|
|
45
|
-
|
|
46
|
-
type BrowserInteractionSurface = string;
|
|
47
|
-
type BrowserInteractionIntent = string;
|
|
48
|
-
type GameplayBrowserInteractionSurface = typeof GAMEPLAY_BROWSER_INTERACTION_SURFACE;
|
|
49
|
-
type GameplayBrowserInteractionIntent = (typeof GAMEPLAY_BROWSER_INTERACTION_INTENTS)[number];
|
|
50
|
-
type GameplayBrowserInteractionEffectKind = (typeof GAMEPLAY_BROWSER_INTERACTION_EFFECT_KINDS)[number];
|
|
51
|
-
type BrowserInteractionReadiness = (typeof BROWSER_INTERACTION_READINESS_VALUES)[number];
|
|
52
|
-
type BrowserInteractionCandidateState = (typeof BROWSER_INTERACTION_CANDIDATE_STATES)[number];
|
|
53
|
-
type BrowserInteractionActuatorKind = (typeof BROWSER_INTERACTION_ACTUATOR_KINDS)[number];
|
|
54
|
-
interface BrowserInteractionProtocolIdentity {
|
|
55
|
-
readonly name: "dreamboard-browser-interaction";
|
|
56
|
-
readonly version: "3.0.0";
|
|
57
|
-
}
|
|
58
|
-
type BrowserInteractionSurfaceEffect = {
|
|
59
|
-
readonly kind: string;
|
|
60
|
-
readonly [key: string]: CanonicalBrowserInteractionValue;
|
|
61
|
-
};
|
|
62
|
-
interface BrowserInteractionScalarPattern {
|
|
63
|
-
readonly field: string;
|
|
64
|
-
readonly min?: number;
|
|
65
|
-
readonly max?: number;
|
|
66
|
-
readonly integer?: boolean;
|
|
67
|
-
}
|
|
68
|
-
type BrowserInteractionEffectPattern<Effect extends BrowserInteractionSurfaceEffect = BrowserInteractionSurfaceEffect> = {
|
|
69
|
-
readonly kind: "exact";
|
|
70
|
-
readonly effect: Effect;
|
|
71
|
-
} | {
|
|
72
|
-
readonly kind: "match";
|
|
73
|
-
readonly effectKind: Effect["kind"] & string;
|
|
74
|
-
readonly fields?: Readonly<Record<string, CanonicalBrowserInteractionValue>>;
|
|
75
|
-
readonly scalar?: BrowserInteractionScalarPattern;
|
|
76
|
-
};
|
|
77
|
-
type GameplaySemanticEffect = {
|
|
78
|
-
readonly kind: "setCandidate";
|
|
79
|
-
readonly inputKey: string;
|
|
80
|
-
readonly candidateValue: CanonicalBrowserInteractionValue;
|
|
81
|
-
readonly beforeSelected: boolean;
|
|
82
|
-
readonly afterSelected: boolean;
|
|
83
|
-
} | {
|
|
84
|
-
readonly kind: "adjustResource";
|
|
85
|
-
readonly inputKey: string;
|
|
86
|
-
readonly resourceKey: CanonicalBrowserInteractionValue;
|
|
87
|
-
readonly delta: -1 | 1;
|
|
88
|
-
} | {
|
|
89
|
-
readonly kind: "setScalar";
|
|
90
|
-
readonly inputKey: string;
|
|
91
|
-
readonly value: number;
|
|
92
|
-
} | {
|
|
93
|
-
readonly kind: "commit";
|
|
94
|
-
} | {
|
|
95
|
-
readonly kind: "invoke";
|
|
96
|
-
};
|
|
97
|
-
type GameplaySemanticEffectPattern = BrowserInteractionEffectPattern<GameplaySemanticEffect>;
|
|
98
|
-
interface BrowserInteractionDiagnostic {
|
|
99
|
-
readonly code: "ambiguous-actuator" | "ambiguous-effect-match" | "ambiguous-pointer-target" | "ambiguous-preparation-pattern" | "disabled-effect-actuator" | "disabled-pointer-target" | "duplicate-accepted-effect-pattern-match" | "duplicate-enabled-actuator" | "duplicate-enabled-effect-actuator" | "duplicate-enabled-pointer-target" | "effect-actuator-kind-incompatibility" | "effect-intent-incompatibility" | "invalid-candidate" | "invalid-effect-payload" | "invalid-effect-pattern" | "invalid-protocol" | "invalid-record" | "invalid-scalar-argument" | "missing-effect" | "orphan-actuator" | "orphan-pointer-target" | "preparation-cycle" | "surface-intent-collision" | "unknown-surface-effect" | "unknown-intent" | "unknown-surface" | "unavailable-actuator";
|
|
100
|
-
readonly severity: "error" | "warning";
|
|
101
|
-
readonly message: string;
|
|
102
|
-
readonly surface?: BrowserInteractionSurface;
|
|
103
|
-
readonly scopeId?: string;
|
|
104
|
-
readonly interactionKey?: string;
|
|
105
|
-
readonly intent?: BrowserInteractionIntent;
|
|
106
|
-
readonly actuatorId?: string;
|
|
107
|
-
readonly targetId?: string;
|
|
108
|
-
}
|
|
109
|
-
interface BrowserInteractionRawRecord {
|
|
110
|
-
readonly attributes: Readonly<Record<string, string | boolean | null | undefined>>;
|
|
111
|
-
}
|
|
112
|
-
interface BrowserInteractionPreparationTarget {
|
|
113
|
-
readonly intent: BrowserInteractionIntent;
|
|
114
|
-
readonly inputKey?: string;
|
|
115
|
-
readonly candidateValue?: CanonicalBrowserInteractionValue;
|
|
116
|
-
readonly candidateValueKey?: string;
|
|
117
|
-
readonly actuatorKind?: BrowserInteractionActuatorKind;
|
|
118
|
-
}
|
|
119
|
-
interface BrowserInteractionActuator {
|
|
120
|
-
readonly actuatorId: string;
|
|
121
|
-
readonly intent: BrowserInteractionIntent;
|
|
122
|
-
readonly descriptorDigest?: string;
|
|
123
|
-
readonly draftDigest?: string;
|
|
124
|
-
readonly inputKey?: string;
|
|
125
|
-
readonly candidateValue?: CanonicalBrowserInteractionValue;
|
|
126
|
-
readonly candidateValueKey?: string;
|
|
127
|
-
readonly candidateState?: BrowserInteractionCandidateState;
|
|
128
|
-
readonly enabled: boolean;
|
|
129
|
-
readonly actuatorKind: BrowserInteractionActuatorKind;
|
|
130
|
-
readonly semanticEffects: readonly BrowserInteractionSurfaceEffect[];
|
|
131
|
-
readonly acceptedEffectPatterns: readonly BrowserInteractionEffectPattern[];
|
|
132
|
-
readonly preparationPatterns: readonly BrowserInteractionEffectPattern[];
|
|
133
|
-
readonly prepares?: BrowserInteractionPreparationTarget;
|
|
134
|
-
readonly diagnostics: readonly BrowserInteractionDiagnostic[];
|
|
135
|
-
}
|
|
136
|
-
interface BrowserInteractionPointerTarget {
|
|
137
|
-
readonly targetId: string;
|
|
138
|
-
readonly enabled: boolean;
|
|
139
|
-
readonly acceptedEffectPatterns: readonly BrowserInteractionEffectPattern[];
|
|
140
|
-
readonly descriptorDigest?: string;
|
|
141
|
-
readonly diagnostics: readonly BrowserInteractionDiagnostic[];
|
|
142
|
-
}
|
|
143
|
-
interface BrowserInteractionEntity {
|
|
144
|
-
readonly interactionKey: string;
|
|
145
|
-
readonly interactionId: string;
|
|
146
|
-
readonly descriptorDigest?: string;
|
|
147
|
-
readonly draftDigest?: string;
|
|
148
|
-
readonly readiness: BrowserInteractionReadiness;
|
|
149
|
-
readonly actuators: readonly BrowserInteractionActuator[];
|
|
150
|
-
readonly pointerTargets: readonly BrowserInteractionPointerTarget[];
|
|
151
|
-
readonly diagnostics: readonly BrowserInteractionDiagnostic[];
|
|
152
|
-
}
|
|
153
|
-
type BrowserGameplayInteraction = BrowserInteractionEntity;
|
|
154
|
-
interface BrowserInteractionSemanticSurfaceSnapshot<Surface extends BrowserInteractionSurface = BrowserInteractionSurface> {
|
|
155
|
-
readonly surface: Surface;
|
|
156
|
-
readonly scopeId: string;
|
|
157
|
-
readonly interactions: readonly BrowserInteractionEntity[];
|
|
158
|
-
readonly diagnostics: readonly BrowserInteractionDiagnostic[];
|
|
159
|
-
}
|
|
160
|
-
interface BrowserGameplaySurfaceSnapshot {
|
|
161
|
-
readonly surface: GameplayBrowserInteractionSurface;
|
|
162
|
-
readonly scopeId: string;
|
|
163
|
-
readonly interactions: readonly BrowserGameplayInteraction[];
|
|
164
|
-
readonly diagnostics: readonly BrowserInteractionDiagnostic[];
|
|
165
|
-
}
|
|
166
|
-
interface BrowserInteractionUnknownSurfaceSnapshot {
|
|
167
|
-
readonly surface: BrowserInteractionSurface;
|
|
168
|
-
readonly scopeId: string;
|
|
169
|
-
readonly interactions?: never;
|
|
170
|
-
readonly diagnostics: readonly BrowserInteractionDiagnostic[];
|
|
171
|
-
}
|
|
172
|
-
type BrowserInteractionSurfaceSnapshot = BrowserGameplaySurfaceSnapshot | BrowserInteractionSemanticSurfaceSnapshot | BrowserInteractionUnknownSurfaceSnapshot;
|
|
173
|
-
interface BrowserInteractionSnapshot {
|
|
174
|
-
readonly protocol: BrowserInteractionProtocolIdentity;
|
|
175
|
-
readonly surfaces: readonly BrowserInteractionSurfaceSnapshot[];
|
|
176
|
-
readonly diagnostics: readonly BrowserInteractionDiagnostic[];
|
|
177
|
-
}
|
|
178
|
-
interface BrowserInteractionSurfaceDefinition<Surface extends BrowserInteractionSurface = BrowserInteractionSurface, Intent extends BrowserInteractionIntent = BrowserInteractionIntent, EffectKind extends string = string> {
|
|
179
|
-
readonly surface: Surface;
|
|
180
|
-
readonly intents: readonly Intent[];
|
|
181
|
-
readonly effectKinds?: readonly EffectKind[];
|
|
182
|
-
}
|
|
183
|
-
interface BrowserInteractionRegistry {
|
|
184
|
-
readonly surfaces: ReadonlyMap<BrowserInteractionSurface, BrowserInteractionSurfaceDefinition>;
|
|
185
|
-
}
|
|
186
|
-
interface BrowserInteractionIntentRequest {
|
|
187
|
-
readonly surface: BrowserInteractionSurface;
|
|
188
|
-
readonly scopeId?: string;
|
|
189
|
-
readonly interactionKey?: string;
|
|
190
|
-
readonly interactionId?: string;
|
|
191
|
-
readonly intent: BrowserInteractionIntent;
|
|
192
|
-
readonly inputKey?: string;
|
|
193
|
-
readonly candidateValue?: unknown;
|
|
194
|
-
readonly candidateValueKey?: string;
|
|
195
|
-
readonly actuatorKind?: BrowserInteractionActuatorKind;
|
|
196
|
-
readonly allowDisabled?: boolean;
|
|
197
|
-
}
|
|
198
|
-
interface BrowserInteractionEffectRequest<Effect extends BrowserInteractionSurfaceEffect = BrowserInteractionSurfaceEffect> {
|
|
199
|
-
readonly surface: BrowserInteractionSurface;
|
|
200
|
-
readonly scopeId?: string;
|
|
201
|
-
readonly interactionKey?: string;
|
|
202
|
-
readonly interactionId?: string;
|
|
203
|
-
readonly effect: Effect;
|
|
204
|
-
readonly allowDisabled?: boolean;
|
|
205
|
-
}
|
|
206
|
-
type GameplayBrowserInteractionEffectRequest = BrowserInteractionEffectRequest<GameplaySemanticEffect>;
|
|
207
|
-
interface BrowserInteractionResolutionSuccess {
|
|
208
|
-
readonly ok: true;
|
|
209
|
-
readonly actuator: BrowserInteractionActuator;
|
|
210
|
-
readonly surface: BrowserInteractionSurface;
|
|
211
|
-
readonly scopeId: string;
|
|
212
|
-
readonly interactionKey: string;
|
|
213
|
-
readonly diagnostics: readonly BrowserInteractionDiagnostic[];
|
|
214
|
-
}
|
|
215
|
-
interface BrowserInteractionResolutionFailure {
|
|
216
|
-
readonly ok: false;
|
|
217
|
-
readonly code: "ambiguous" | "invalid-snapshot" | "not-found" | "preparation-required" | "unavailable";
|
|
218
|
-
readonly diagnostics: readonly BrowserInteractionDiagnostic[];
|
|
219
|
-
readonly preparation?: readonly BrowserInteractionActuator[];
|
|
220
|
-
}
|
|
221
|
-
type BrowserInteractionResolution = BrowserInteractionResolutionSuccess | BrowserInteractionResolutionFailure;
|
|
222
|
-
interface BrowserInteractionEffectResolutionSuccess {
|
|
223
|
-
readonly ok: true;
|
|
224
|
-
readonly actuator: BrowserInteractionActuator;
|
|
225
|
-
readonly surface: BrowserInteractionSurface;
|
|
226
|
-
readonly scopeId: string;
|
|
227
|
-
readonly interactionKey: string;
|
|
228
|
-
readonly match: "exact" | "accepted-pattern";
|
|
229
|
-
readonly effect: BrowserInteractionSurfaceEffect;
|
|
230
|
-
readonly diagnostics: readonly BrowserInteractionDiagnostic[];
|
|
231
|
-
}
|
|
232
|
-
interface BrowserInteractionPointerTargetResolutionSuccess {
|
|
233
|
-
readonly ok: true;
|
|
234
|
-
readonly pointerTarget: BrowserInteractionPointerTarget;
|
|
235
|
-
readonly surface: BrowserInteractionSurface;
|
|
236
|
-
readonly scopeId: string;
|
|
237
|
-
readonly interactionKey: string;
|
|
238
|
-
readonly match: "accepted-pattern";
|
|
239
|
-
readonly effect: BrowserInteractionSurfaceEffect;
|
|
240
|
-
readonly diagnostics: readonly BrowserInteractionDiagnostic[];
|
|
241
|
-
}
|
|
242
|
-
interface BrowserInteractionPointerTargetResolutionFailure {
|
|
243
|
-
readonly ok: false;
|
|
244
|
-
readonly code: "ambiguous" | "invalid-effect" | "invalid-snapshot" | "not-found" | "unavailable";
|
|
245
|
-
readonly diagnostics: readonly BrowserInteractionDiagnostic[];
|
|
246
|
-
}
|
|
247
|
-
type BrowserInteractionPointerTargetResolution = BrowserInteractionPointerTargetResolutionSuccess | BrowserInteractionPointerTargetResolutionFailure;
|
|
248
|
-
interface BrowserInteractionEffectResolutionFailure {
|
|
249
|
-
readonly ok: false;
|
|
250
|
-
readonly code: "ambiguous" | "invalid-effect" | "invalid-snapshot" | "not-found" | "preparation-required" | "unavailable";
|
|
251
|
-
readonly diagnostics: readonly BrowserInteractionDiagnostic[];
|
|
252
|
-
readonly preparation?: readonly BrowserInteractionActuator[];
|
|
253
|
-
}
|
|
254
|
-
type BrowserInteractionEffectResolution = BrowserInteractionEffectResolutionSuccess | BrowserInteractionEffectResolutionFailure;
|
|
255
|
-
|
|
256
|
-
export { encodeCanonicalCandidateValue as $, type BrowserInteractionRegistry as A, BROWSER_INTERACTION_ACTUATOR_KINDS as B, type BrowserInteractionResolution as C, type BrowserInteractionResolutionFailure as D, type BrowserInteractionResolutionSuccess as E, type BrowserInteractionScalarPattern as F, type BrowserInteractionSemanticSurfaceSnapshot as G, type BrowserInteractionSnapshot as H, type BrowserInteractionSurface as I, type BrowserInteractionSurfaceDefinition as J, type BrowserInteractionSurfaceEffect as K, type BrowserInteractionSurfaceSnapshot as L, type BrowserInteractionUnknownSurfaceSnapshot as M, type CanonicalBrowserInteractionValue as N, DREAMBOARD_BROWSER_INTERACTION_PROTOCOL_NAME as O, DREAMBOARD_BROWSER_INTERACTION_PROTOCOL_VERSION as P, GAMEPLAY_BROWSER_INTERACTION_EFFECT_KINDS as Q, GAMEPLAY_BROWSER_INTERACTION_INTENTS as R, GAMEPLAY_BROWSER_INTERACTION_SURFACE as S, type GameplayBrowserInteractionEffectKind as T, type GameplayBrowserInteractionEffectRequest as U, type GameplayBrowserInteractionIntent as V, type GameplayBrowserInteractionSurface as W, type GameplaySemanticEffect as X, type GameplaySemanticEffectPattern as Y, compareStableJson as Z, decodeCanonicalCandidateValue as _, BROWSER_INTERACTION_ATTRIBUTES as a, BROWSER_INTERACTION_CANDIDATE_STATES as b, BROWSER_INTERACTION_READINESS_VALUES as c, BROWSER_INTERACTION_RECORD_ROLES as d, type BrowserGameplayInteraction as e, type BrowserGameplaySurfaceSnapshot as f, type BrowserInteractionActuator as g, type BrowserInteractionActuatorKind as h, type BrowserInteractionCandidateState as i, type BrowserInteractionDiagnostic as j, type BrowserInteractionEffectPattern as k, type BrowserInteractionEffectRequest as l, type BrowserInteractionEffectResolution as m, type BrowserInteractionEffectResolutionFailure as n, type BrowserInteractionEffectResolutionSuccess as o, type BrowserInteractionEntity as p, type BrowserInteractionIntent as q, type BrowserInteractionIntentRequest as r, type BrowserInteractionPointerTarget as s, type BrowserInteractionPointerTargetResolution as t, type BrowserInteractionPointerTargetResolutionFailure as u, type BrowserInteractionPointerTargetResolutionSuccess as v, type BrowserInteractionPreparationTarget as w, type BrowserInteractionProtocolIdentity as x, type BrowserInteractionRawRecord as y, type BrowserInteractionReadiness as z };
|
package/dist/types-DR7DoB1x.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { E, v, H, J } from './protocol-dYgafTYY.js';
|
|
2
|
-
|
|
3
|
-
interface RuntimeClock {
|
|
4
|
-
now(): number;
|
|
5
|
-
}
|
|
6
|
-
interface RuntimeIdFactory {
|
|
7
|
-
nextId(prefix: string): string;
|
|
8
|
-
}
|
|
9
|
-
interface PluginTransport {
|
|
10
|
-
start(onMessage: (message: H) => void): () => void;
|
|
11
|
-
send(message: J): void;
|
|
12
|
-
}
|
|
13
|
-
interface PluginRuntimeClient {
|
|
14
|
-
getSession(): E | null;
|
|
15
|
-
subscribeSession(listener: () => void): () => void;
|
|
16
|
-
getFrame(): v | null;
|
|
17
|
-
subscribeFrame(listener: () => void): () => void;
|
|
18
|
-
submitInteraction(interactionId: string, params: unknown): Promise<void>;
|
|
19
|
-
disconnect(): void;
|
|
20
|
-
}
|
|
21
|
-
interface PluginRuntimeClientOptions {
|
|
22
|
-
transport: PluginTransport;
|
|
23
|
-
idFactory?: RuntimeIdFactory;
|
|
24
|
-
clock?: RuntimeClock;
|
|
25
|
-
requestTimeoutMs?: number;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type { PluginRuntimeClient as P, RuntimeClock as R, PluginRuntimeClientOptions as a, PluginTransport as b, RuntimeIdFactory as c };
|
package/dist/types-JWCYHmu7.d.ts
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { w as wire } from './index.d-DjzoK7zn.js';
|
|
2
|
-
import { h as ScenarioCheckpoint, o as ScenarioDefinitionGameLike, d as ReplayScenarioOptions, A as AssertScenarioOptions, w as ScenarioReplay, l as ScenarioCommandOf, v as ScenarioProbeResult, F as ScenarioSetup, c as InteractionExplanationLike } from './definitions-BgmV_GhC.js';
|
|
3
|
-
|
|
4
|
-
declare function replayScenario<const Game extends ScenarioDefinitionGameLike>(options: ReplayScenarioOptions<Game>): Promise<ScenarioReplay<Game>>;
|
|
5
|
-
type ScenarioRuntimeCheckpointMaterialization = {
|
|
6
|
-
readonly checkpoint: ScenarioCheckpoint;
|
|
7
|
-
readonly checkpointDigest: string;
|
|
8
|
-
readonly playerIds: readonly string[];
|
|
9
|
-
readonly state: wire.ReducerSessionState;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Trusted tool-side materialization for CLI, Workbench, and backend adapters.
|
|
13
|
-
* The returned reducer snapshot must never cross a player/browser boundary.
|
|
14
|
-
*/
|
|
15
|
-
declare function materializeScenarioRuntimeCheckpoint<const Game extends ScenarioDefinitionGameLike>(options: ReplayScenarioOptions<Game>): Promise<ScenarioRuntimeCheckpointMaterialization>;
|
|
16
|
-
declare function assertScenario<Game>(options: AssertScenarioOptions<Game>): Promise<void>;
|
|
17
|
-
declare function probeScenarioCommand<Game>(options: {
|
|
18
|
-
readonly replay: ScenarioReplay<Game>;
|
|
19
|
-
readonly command: ScenarioCommandOf<Game>;
|
|
20
|
-
}): Promise<ScenarioProbeResult<Game>>;
|
|
21
|
-
|
|
22
|
-
type Sha256Digest = `sha256:${string}`;
|
|
23
|
-
type ScenarioIdentity = {
|
|
24
|
-
readonly id: string;
|
|
25
|
-
readonly path: string;
|
|
26
|
-
readonly sourceDigest: Sha256Digest;
|
|
27
|
-
};
|
|
28
|
-
type ActorRef = {
|
|
29
|
-
readonly seat: number;
|
|
30
|
-
readonly playerId: string;
|
|
31
|
-
};
|
|
32
|
-
type PerspectiveRef = {
|
|
33
|
-
readonly kind: "player";
|
|
34
|
-
readonly actor: ActorRef;
|
|
35
|
-
} | {
|
|
36
|
-
readonly kind: "spectator";
|
|
37
|
-
};
|
|
38
|
-
type PerspectiveSelector = {
|
|
39
|
-
readonly kind: "player";
|
|
40
|
-
readonly seat: number;
|
|
41
|
-
} | {
|
|
42
|
-
readonly kind: "spectator";
|
|
43
|
-
};
|
|
44
|
-
type FlowDiagnostic = {
|
|
45
|
-
readonly phase: string;
|
|
46
|
-
readonly step: string | null;
|
|
47
|
-
readonly activeActors: readonly ActorRef[];
|
|
48
|
-
readonly pendingActors: readonly ActorRef[];
|
|
49
|
-
readonly continuationWaiters: readonly ActorRef[];
|
|
50
|
-
readonly blockedBy: readonly {
|
|
51
|
-
readonly actor: ActorRef;
|
|
52
|
-
readonly blockers: readonly ActorRef[];
|
|
53
|
-
readonly source: "scheduler";
|
|
54
|
-
}[];
|
|
55
|
-
};
|
|
56
|
-
type InspectInteractionInput = {
|
|
57
|
-
readonly key: string;
|
|
58
|
-
readonly kind: string;
|
|
59
|
-
readonly eligibleCount: number | "lazy";
|
|
60
|
-
};
|
|
61
|
-
type InspectInteraction = {
|
|
62
|
-
readonly actor: ActorRef;
|
|
63
|
-
readonly interactionId: string;
|
|
64
|
-
readonly availability: {
|
|
65
|
-
readonly status: "available" | "notYourTurn" | "insufficientResources" | "blocked";
|
|
66
|
-
readonly code?: string;
|
|
67
|
-
readonly reason?: string;
|
|
68
|
-
};
|
|
69
|
-
readonly inputs: readonly InspectInteractionInput[];
|
|
70
|
-
readonly explanation: InteractionExplanationLike;
|
|
71
|
-
};
|
|
72
|
-
type InspectAction = {
|
|
73
|
-
readonly actor: ActorRef;
|
|
74
|
-
readonly interactionId: string;
|
|
75
|
-
readonly inputs: readonly InspectInteractionInput[];
|
|
76
|
-
readonly explanation: InteractionExplanationLike;
|
|
77
|
-
readonly hasConcreteCommand: true;
|
|
78
|
-
};
|
|
79
|
-
type ScenarioDispatchTraceEntry = {
|
|
80
|
-
readonly kind: "acceptedCommand";
|
|
81
|
-
readonly actor: ActorRef;
|
|
82
|
-
readonly interactionId: string;
|
|
83
|
-
} | {
|
|
84
|
-
readonly kind: "appliedInstruction";
|
|
85
|
-
readonly instructionKind: string;
|
|
86
|
-
} | {
|
|
87
|
-
readonly kind: "entropyDraw";
|
|
88
|
-
readonly drawIndex: number;
|
|
89
|
-
};
|
|
90
|
-
type InspectEntropy = {
|
|
91
|
-
readonly seed: number;
|
|
92
|
-
readonly draws: readonly {
|
|
93
|
-
readonly index: number;
|
|
94
|
-
readonly cursorBefore: number;
|
|
95
|
-
readonly cursorAfter: number;
|
|
96
|
-
readonly operation: {
|
|
97
|
-
readonly kind: string;
|
|
98
|
-
readonly parameters: Readonly<Record<string, string | number | boolean>>;
|
|
99
|
-
};
|
|
100
|
-
}[];
|
|
101
|
-
};
|
|
102
|
-
type InspectNode = {
|
|
103
|
-
readonly checkpoint: ScenarioCheckpoint;
|
|
104
|
-
readonly checkpointDigest: Sha256Digest;
|
|
105
|
-
readonly setup: ScenarioSetup;
|
|
106
|
-
readonly flow: FlowDiagnostic;
|
|
107
|
-
readonly perspective: PerspectiveRef;
|
|
108
|
-
readonly publicState: unknown;
|
|
109
|
-
readonly view: unknown;
|
|
110
|
-
readonly interactions: readonly InspectInteraction[];
|
|
111
|
-
readonly actions: readonly InspectAction[];
|
|
112
|
-
readonly entropy: InspectEntropy;
|
|
113
|
-
readonly dispatchTrace: readonly ScenarioDispatchTraceEntry[];
|
|
114
|
-
};
|
|
115
|
-
type InspectScenarioResult = {
|
|
116
|
-
readonly schemaVersion: 1;
|
|
117
|
-
readonly scenario: ScenarioIdentity;
|
|
118
|
-
readonly node: InspectNode;
|
|
119
|
-
readonly seedSource: "scenario" | "override";
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
export { type ActorRef as A, type FlowDiagnostic as F, type InspectAction as I, type PerspectiveRef as P, type ScenarioDispatchTraceEntry as S, type InspectEntropy as a, type InspectInteraction as b, type InspectInteractionInput as c, type InspectNode as d, type InspectScenarioResult as e, type PerspectiveSelector as f, type ScenarioIdentity as g, type ScenarioRuntimeCheckpointMaterialization as h, type Sha256Digest as i, assertScenario as j, materializeScenarioRuntimeCheckpoint as m, probeScenarioCommand as p, replayScenario as r };
|