@dreamboard-games/sdk 0.5.0-alpha.32 → 0.5.0-alpha.34

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.
@@ -1,10 +1,16 @@
1
- import { aB as ReducerContractVersion, Q as InitializeRequest, R as InitializeResult, D as DispatchRequest, y as DispatchResult, av as ProjectRequest, aY as SeatProjectionBundle } from './extract-Bi6_tzUr.js';
1
+ import { aM as ReducerContractVersion, s as BotStrategyMetadata, aB as PluginGameplayFrame, r as BotDecision, X as InitializeRequest, Y as InitializeResult, G as DispatchRequest, H as DispatchResult, aG as ProjectRequest, b8 as SeatProjectionBundle } from './extract-CNUw9Q8C.js';
2
2
 
3
3
  /** Exact worker ABI version; hosts must reject mismatched bundles. */
4
4
  declare const REDUCER_CONTRACT_VERSION: "0.11.0";
5
5
  type MaybePromise<T> = T | Promise<T>;
6
6
  interface ReducerBundleContract {
7
7
  readonly reducerContractVersion: ReducerContractVersion;
8
+ /** Optional capability on the existing ABI. Legacy bundles omit both fields. */
9
+ readonly botStrategies?: readonly BotStrategyMetadata[];
10
+ decideBot?(input: {
11
+ strategyId: string;
12
+ frame: PluginGameplayFrame;
13
+ }): BotDecision;
8
14
  initialize(input: InitializeRequest): MaybePromise<InitializeResult>;
9
15
  dispatch(input: DispatchRequest): MaybePromise<DispatchResult>;
10
16
  project(input: ProjectRequest): SeatProjectionBundle;
@@ -1,3 +1,4 @@
1
+ import { Store } from '@tanstack/store';
1
2
  import * as z from 'zod';
2
3
  import { z as z$1 } from 'zod';
3
4
  import { Point } from 'honeycomb-grid';
@@ -837,6 +838,49 @@ declare const InteractionDescriptorSchema: z.ZodObject<{
837
838
  }, z.core.$strict>>>;
838
839
  kind: z.ZodLiteral<"action">;
839
840
  }, z.core.$strict>;
841
+ declare const ZoneInteractionRefsSchema: z.ZodObject<{
842
+ tiles: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
843
+ disclosure: z.ZodLiteral<"visible">;
844
+ ref: z.core.$ZodBranded<z.ZodString, "SeatTileRef", "out">;
845
+ tileTypeId: z.ZodString;
846
+ name: z.ZodString;
847
+ frontImage: z.ZodOptional<z.ZodString>;
848
+ ownerId: z.ZodNullable<z.ZodString>;
849
+ fields: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
850
+ properties: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
851
+ }, z.core.$strict>, z.ZodObject<{
852
+ disclosure: z.ZodLiteral<"concealed">;
853
+ ref: z.core.$ZodBranded<z.ZodString, "SeatTileRef", "out">;
854
+ appearance: z.ZodDiscriminatedUnion<[z.ZodObject<{
855
+ layout: z.ZodLiteral<"hex">;
856
+ cells: z.ZodArray<z.ZodObject<{
857
+ q: z.ZodInt;
858
+ r: z.ZodInt;
859
+ }, z.core.$strict>>;
860
+ backImage: z.ZodOptional<z.ZodString>;
861
+ }, z.core.$strict>, z.ZodObject<{
862
+ layout: z.ZodLiteral<"square">;
863
+ cells: z.ZodArray<z.ZodObject<{
864
+ col: z.ZodInt;
865
+ row: z.ZodInt;
866
+ }, z.core.$strict>>;
867
+ backImage: z.ZodOptional<z.ZodString>;
868
+ }, z.core.$strict>], "layout">;
869
+ }, z.core.$strict>], "disclosure">>;
870
+ cardIds: z.ZodArray<z.ZodString>;
871
+ cardViewsById: z.ZodRecord<z.ZodString, z.ZodObject<{
872
+ id: z.ZodString;
873
+ cardType: z.ZodString;
874
+ name: z.ZodOptional<z.ZodString>;
875
+ text: z.ZodOptional<z.ZodString>;
876
+ frontImage: z.ZodOptional<z.ZodString>;
877
+ backImage: z.ZodOptional<z.ZodString>;
878
+ properties: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
879
+ }, z.core.$strict>>;
880
+ cardBacksById: z.ZodRecord<z.ZodString, z.ZodString>;
881
+ playableByCardId: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
882
+ shuffled: z.ZodOptional<z.ZodLiteral<true>>;
883
+ }, z.core.$strict>;
840
884
  type DeepReadonly<T> = T extends string | number | boolean | null | undefined ? T : T extends readonly (infer Item)[] ? readonly DeepReadonly<Item>[] : T extends object ? {
841
885
  readonly [K in keyof T]: DeepReadonly<T[K]>;
842
886
  } : T;
@@ -849,7 +893,7 @@ type InteractionInputDescriptor = Readonly<Omit<z.infer<typeof InteractionInputD
849
893
  };
850
894
  type InteractionAvailability = DeepReadonly<z.infer<typeof InteractionAvailabilitySchema>>;
851
895
  type DescriptorData = z.infer<typeof InteractionDescriptorSchema>;
852
- type InteractionDescriptor = Readonly<Omit<DescriptorData, "inputs" | "step" | "zoneIds" | "reasons">> & {
896
+ type InteractionDescriptor$1 = Readonly<Omit<DescriptorData, "inputs" | "step" | "zoneIds" | "reasons">> & {
853
897
  readonly inputs: readonly InteractionInputDescriptor[];
854
898
  readonly zoneIds?: readonly string[];
855
899
  readonly reasons?: readonly Readonly<NonNullable<DescriptorData["reasons"]>[number]>[];
@@ -857,7 +901,8 @@ type InteractionDescriptor = Readonly<Omit<DescriptorData, "inputs" | "step" | "
857
901
  readonly selected: Readonly<NonNullable<DescriptorData["step"]>["selected"]>;
858
902
  };
859
903
  };
860
- type InteractionDiagnosticReason = NonNullable<InteractionDescriptor["reasons"]>[number];
904
+ type InteractionDiagnosticReason = NonNullable<InteractionDescriptor$1["reasons"]>[number];
905
+ type ZoneInteractionRefs = DeepReadonly<z.infer<typeof ZoneInteractionRefsSchema>>;
861
906
 
862
907
  declare const FieldSchemaJsonSchema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
863
908
  declare const ZoneVisibilitySchema: z.ZodEnum<{
@@ -2532,6 +2577,21 @@ declare const GameInputInteractionSchema: z.ZodObject<{
2532
2577
  interactionId: z.ZodString;
2533
2578
  params: z.ZodJSONSchema;
2534
2579
  }, z.core.$strict>;
2580
+ /** Strategies choose the same interaction and params as a seated player. */
2581
+ declare const BotDecisionSchema: z.ZodNullable<z.ZodObject<{
2582
+ params: z.ZodJSONSchema;
2583
+ interactionId: z.ZodString;
2584
+ }, z.core.$strict>>;
2585
+ declare const BotStrategyMetadataSchema: z.ZodObject<{
2586
+ id: z.ZodString;
2587
+ name: z.ZodString;
2588
+ description: z.ZodString;
2589
+ }, z.core.$strict>;
2590
+ declare const BotStrategyCatalogSchema: z.ZodArray<z.ZodObject<{
2591
+ id: z.ZodString;
2592
+ name: z.ZodString;
2593
+ description: z.ZodString;
2594
+ }, z.core.$strict>>;
2535
2595
  declare const GameInputCancelSchema: z.ZodObject<{
2536
2596
  kind: z.ZodLiteral<"interaction.cancel">;
2537
2597
  basis: z.ZodObject<{
@@ -4438,6 +4498,9 @@ declare const ProjectRequestSchema: z.ZodObject<{
4438
4498
 
4439
4499
  declare const runtimeSchema_AuthoredViewSchema: typeof AuthoredViewSchema;
4440
4500
  declare const runtimeSchema_BoardProjectionSchema: typeof BoardProjectionSchema;
4501
+ declare const runtimeSchema_BotDecisionSchema: typeof BotDecisionSchema;
4502
+ declare const runtimeSchema_BotStrategyCatalogSchema: typeof BotStrategyCatalogSchema;
4503
+ declare const runtimeSchema_BotStrategyMetadataSchema: typeof BotStrategyMetadataSchema;
4441
4504
  declare const runtimeSchema_DispatchRequestSchema: typeof DispatchRequestSchema;
4442
4505
  declare const runtimeSchema_DispatchResultAcceptSchema: typeof DispatchResultAcceptSchema;
4443
4506
  declare const runtimeSchema_DispatchResultRejectSchema: typeof DispatchResultRejectSchema;
@@ -4493,7 +4556,7 @@ declare const runtimeSchema_SimultaneousPhaseProjectionSchema: typeof Simultaneo
4493
4556
  declare const runtimeSchema_SystemActionEventSchema: typeof SystemActionEventSchema;
4494
4557
  declare const runtimeSchema_TransitionRecordSchema: typeof TransitionRecordSchema;
4495
4558
  declare namespace runtimeSchema {
4496
- export { runtimeSchema_AuthoredViewSchema as AuthoredViewSchema, runtimeSchema_BoardProjectionSchema as BoardProjectionSchema, runtimeSchema_DispatchRequestSchema as DispatchRequestSchema, runtimeSchema_DispatchResultAcceptSchema as DispatchResultAcceptSchema, runtimeSchema_DispatchResultRejectSchema as DispatchResultRejectSchema, runtimeSchema_DispatchResultSchema as DispatchResultSchema, runtimeSchema_DispatchTraceAcceptedClientInputSchema as DispatchTraceAcceptedClientInputSchema, runtimeSchema_DispatchTracePhaseEnteredSchema as DispatchTracePhaseEnteredSchema, runtimeSchema_DispatchTraceRngConsumptionSchema as DispatchTraceRngConsumptionSchema, runtimeSchema_DispatchTraceSchema as DispatchTraceSchema, runtimeSchema_EventAudienceSchema as EventAudienceSchema, runtimeSchema_GameEventDetailSchema as GameEventDetailSchema, runtimeSchema_GameEventSchema as GameEventSchema, runtimeSchema_GameInputCancelSchema as GameInputCancelSchema, runtimeSchema_GameInputInteractionSchema as GameInputInteractionSchema, runtimeSchema_GameInputSchema as GameInputSchema, runtimeSchema_GameOutcomeReasonSchema as GameOutcomeReasonSchema, runtimeSchema_GameOutcomeSchema as GameOutcomeSchema, runtimeSchema_GameplayBasisSchema as GameplayBasisSchema, runtimeSchema_InitializeRequestSchema as InitializeRequestSchema, runtimeSchema_InitializeResultSchema as InitializeResultSchema, runtimeSchema_OutcomeResultSchema as OutcomeResultSchema, runtimeSchema_OutcomeScoreComponentSchema as OutcomeScoreComponentSchema, runtimeSchema_OutcomeStandingSchema as OutcomeStandingSchema, runtimeSchema_OutcomeTieBreakSchema as OutcomeTieBreakSchema, runtimeSchema_ProjectRequestSchema as ProjectRequestSchema, runtimeSchema_ProjectedGameEventDetailSchema as ProjectedGameEventDetailSchema, runtimeSchema_ProjectedGameEventSchema as ProjectedGameEventSchema, runtimeSchema_ProjectionTimingMetadataSchema as ProjectionTimingMetadataSchema, runtimeSchema_ReducerContractVersionSchema as ReducerContractVersionSchema, runtimeSchema_ReducerDomainStateSchema as ReducerDomainStateSchema, runtimeSchema_ReducerFlowStateSchema as ReducerFlowStateSchema, runtimeSchema_ReducerRuntimeLogEntryAcceptedClientInputSchema as ReducerRuntimeLogEntryAcceptedClientInputSchema, runtimeSchema_ReducerRuntimeLogEntryPhaseEnteredSchema as ReducerRuntimeLogEntryPhaseEnteredSchema, runtimeSchema_ReducerRuntimeLogEntryRngConsumptionSchema as ReducerRuntimeLogEntryRngConsumptionSchema, runtimeSchema_ReducerRuntimeLogEntrySchema as ReducerRuntimeLogEntrySchema, runtimeSchema_ReducerRuntimeLogEntryStateCommitSchema as ReducerRuntimeLogEntryStateCommitSchema, runtimeSchema_ReducerRuntimeStateSchema as ReducerRuntimeStateSchema, runtimeSchema_ReducerSessionStateSchema as ReducerSessionStateSchema, runtimeSchema_ReferenceBasisSchema as ReferenceBasisSchema, runtimeSchema_RngDrawSchema as RngDrawSchema, runtimeSchema_RngOperationParameterSchema as RngOperationParameterSchema, runtimeSchema_RngOperationSchema as RngOperationSchema, runtimeSchema_RngStateSchema as RngStateSchema, runtimeSchema_RuntimePendingInteractionSchema as RuntimePendingInteractionSchema, runtimeSchema_RuntimeSimultaneousCurrentSchema as RuntimeSimultaneousCurrentSchema, runtimeSchema_RuntimeSimultaneousStateSchema as RuntimeSimultaneousStateSchema, runtimeSchema_RuntimeSimultaneousSubmissionSchema as RuntimeSimultaneousSubmissionSchema, runtimeSchema_SchedulerContinuationDependencySchema as SchedulerContinuationDependencySchema, runtimeSchema_SchedulerFlowAuthorityProjectionSchema as SchedulerFlowAuthorityProjectionSchema, runtimeSchema_SeatProjectionBundleSchema as SeatProjectionBundleSchema, runtimeSchema_SeatProjectionSchema as SeatProjectionSchema, runtimeSchema_ShuffledZoneSchema as ShuffledZoneSchema, runtimeSchema_SimultaneousPhaseProjectionSchema as SimultaneousPhaseProjectionSchema, runtimeSchema_SystemActionEventSchema as SystemActionEventSchema, runtimeSchema_TransitionRecordSchema as TransitionRecordSchema };
4559
+ export { runtimeSchema_AuthoredViewSchema as AuthoredViewSchema, runtimeSchema_BoardProjectionSchema as BoardProjectionSchema, runtimeSchema_BotDecisionSchema as BotDecisionSchema, runtimeSchema_BotStrategyCatalogSchema as BotStrategyCatalogSchema, runtimeSchema_BotStrategyMetadataSchema as BotStrategyMetadataSchema, runtimeSchema_DispatchRequestSchema as DispatchRequestSchema, runtimeSchema_DispatchResultAcceptSchema as DispatchResultAcceptSchema, runtimeSchema_DispatchResultRejectSchema as DispatchResultRejectSchema, runtimeSchema_DispatchResultSchema as DispatchResultSchema, runtimeSchema_DispatchTraceAcceptedClientInputSchema as DispatchTraceAcceptedClientInputSchema, runtimeSchema_DispatchTracePhaseEnteredSchema as DispatchTracePhaseEnteredSchema, runtimeSchema_DispatchTraceRngConsumptionSchema as DispatchTraceRngConsumptionSchema, runtimeSchema_DispatchTraceSchema as DispatchTraceSchema, runtimeSchema_EventAudienceSchema as EventAudienceSchema, runtimeSchema_GameEventDetailSchema as GameEventDetailSchema, runtimeSchema_GameEventSchema as GameEventSchema, runtimeSchema_GameInputCancelSchema as GameInputCancelSchema, runtimeSchema_GameInputInteractionSchema as GameInputInteractionSchema, runtimeSchema_GameInputSchema as GameInputSchema, runtimeSchema_GameOutcomeReasonSchema as GameOutcomeReasonSchema, runtimeSchema_GameOutcomeSchema as GameOutcomeSchema, runtimeSchema_GameplayBasisSchema as GameplayBasisSchema, runtimeSchema_InitializeRequestSchema as InitializeRequestSchema, runtimeSchema_InitializeResultSchema as InitializeResultSchema, runtimeSchema_OutcomeResultSchema as OutcomeResultSchema, runtimeSchema_OutcomeScoreComponentSchema as OutcomeScoreComponentSchema, runtimeSchema_OutcomeStandingSchema as OutcomeStandingSchema, runtimeSchema_OutcomeTieBreakSchema as OutcomeTieBreakSchema, runtimeSchema_ProjectRequestSchema as ProjectRequestSchema, runtimeSchema_ProjectedGameEventDetailSchema as ProjectedGameEventDetailSchema, runtimeSchema_ProjectedGameEventSchema as ProjectedGameEventSchema, runtimeSchema_ProjectionTimingMetadataSchema as ProjectionTimingMetadataSchema, runtimeSchema_ReducerContractVersionSchema as ReducerContractVersionSchema, runtimeSchema_ReducerDomainStateSchema as ReducerDomainStateSchema, runtimeSchema_ReducerFlowStateSchema as ReducerFlowStateSchema, runtimeSchema_ReducerRuntimeLogEntryAcceptedClientInputSchema as ReducerRuntimeLogEntryAcceptedClientInputSchema, runtimeSchema_ReducerRuntimeLogEntryPhaseEnteredSchema as ReducerRuntimeLogEntryPhaseEnteredSchema, runtimeSchema_ReducerRuntimeLogEntryRngConsumptionSchema as ReducerRuntimeLogEntryRngConsumptionSchema, runtimeSchema_ReducerRuntimeLogEntrySchema as ReducerRuntimeLogEntrySchema, runtimeSchema_ReducerRuntimeLogEntryStateCommitSchema as ReducerRuntimeLogEntryStateCommitSchema, runtimeSchema_ReducerRuntimeStateSchema as ReducerRuntimeStateSchema, runtimeSchema_ReducerSessionStateSchema as ReducerSessionStateSchema, runtimeSchema_ReferenceBasisSchema as ReferenceBasisSchema, runtimeSchema_RngDrawSchema as RngDrawSchema, runtimeSchema_RngOperationParameterSchema as RngOperationParameterSchema, runtimeSchema_RngOperationSchema as RngOperationSchema, runtimeSchema_RngStateSchema as RngStateSchema, runtimeSchema_RuntimePendingInteractionSchema as RuntimePendingInteractionSchema, runtimeSchema_RuntimeSimultaneousCurrentSchema as RuntimeSimultaneousCurrentSchema, runtimeSchema_RuntimeSimultaneousStateSchema as RuntimeSimultaneousStateSchema, runtimeSchema_RuntimeSimultaneousSubmissionSchema as RuntimeSimultaneousSubmissionSchema, runtimeSchema_SchedulerContinuationDependencySchema as SchedulerContinuationDependencySchema, runtimeSchema_SchedulerFlowAuthorityProjectionSchema as SchedulerFlowAuthorityProjectionSchema, runtimeSchema_SeatProjectionBundleSchema as SeatProjectionBundleSchema, runtimeSchema_SeatProjectionSchema as SeatProjectionSchema, runtimeSchema_ShuffledZoneSchema as ShuffledZoneSchema, runtimeSchema_SimultaneousPhaseProjectionSchema as SimultaneousPhaseProjectionSchema, runtimeSchema_SystemActionEventSchema as SystemActionEventSchema, runtimeSchema_TransitionRecordSchema as TransitionRecordSchema };
4497
4560
  }
4498
4561
 
4499
4562
  type ReducerContractVersion = z$1.infer<typeof ReducerContractVersionSchema>;
@@ -4509,6 +4572,8 @@ type TransitionRecord = z$1.infer<typeof TransitionRecordSchema>;
4509
4572
  type ReducerRuntimeState = z$1.infer<typeof ReducerRuntimeStateSchema>;
4510
4573
  type ReducerDomainState = z$1.infer<typeof ReducerDomainStateSchema>;
4511
4574
  type ReducerSessionState = z$1.infer<typeof ReducerSessionStateSchema>;
4575
+ type BotDecision = z$1.infer<typeof BotDecisionSchema>;
4576
+ type BotStrategyMetadata = z$1.infer<typeof BotStrategyMetadataSchema>;
4512
4577
  type GameInputInteraction = z$1.infer<typeof GameInputInteractionSchema>;
4513
4578
  type GameInput = z$1.infer<typeof GameInputSchema>;
4514
4579
  type GameOutcomeReason = z$1.infer<typeof GameOutcomeReasonSchema>;
@@ -4546,12 +4611,14 @@ type RuntimePendingInteraction = z$1.infer<typeof RuntimePendingInteractionSchem
4546
4611
  type GameInputCancel = z$1.infer<typeof GameInputCancelSchema>;
4547
4612
  type AuthoredView = z$1.infer<typeof AuthoredViewSchema>;
4548
4613
  type ReferenceBasis = z$1.infer<typeof ReferenceBasisSchema>;
4549
- type GameplayBasis = z$1.infer<typeof GameplayBasisSchema>;
4614
+ type GameplayBasis$1 = z$1.infer<typeof GameplayBasisSchema>;
4550
4615
  type ProjectedGameEvent$1 = z$1.infer<typeof ProjectedGameEventSchema>;
4551
4616
  type EventAudience = z$1.infer<typeof EventAudienceSchema>;
4552
4617
  type ProjectedGameEventDetail$1 = z$1.infer<typeof ProjectedGameEventDetailSchema>;
4553
4618
 
4554
4619
  type runtimeTypes_AuthoredView = AuthoredView;
4620
+ type runtimeTypes_BotDecision = BotDecision;
4621
+ type runtimeTypes_BotStrategyMetadata = BotStrategyMetadata;
4555
4622
  type runtimeTypes_DispatchRequest = DispatchRequest;
4556
4623
  type runtimeTypes_DispatchResult = DispatchResult;
4557
4624
  type runtimeTypes_DispatchResultAccept = DispatchResultAccept;
@@ -4565,7 +4632,6 @@ type runtimeTypes_GameInput = GameInput;
4565
4632
  type runtimeTypes_GameInputCancel = GameInputCancel;
4566
4633
  type runtimeTypes_GameInputInteraction = GameInputInteraction;
4567
4634
  type runtimeTypes_GameOutcomeReason = GameOutcomeReason;
4568
- type runtimeTypes_GameplayBasis = GameplayBasis;
4569
4635
  type runtimeTypes_InitializeRequest = InitializeRequest;
4570
4636
  type runtimeTypes_InitializeResult = InitializeResult;
4571
4637
  type runtimeTypes_ProjectRequest = ProjectRequest;
@@ -4594,7 +4660,7 @@ type runtimeTypes_SeatProjectionBundle = SeatProjectionBundle;
4594
4660
  type runtimeTypes_SimultaneousPhaseProjection = SimultaneousPhaseProjection;
4595
4661
  type runtimeTypes_TransitionRecord = TransitionRecord;
4596
4662
  declare namespace runtimeTypes {
4597
- export type { runtimeTypes_AuthoredView as AuthoredView, runtimeTypes_DispatchRequest as DispatchRequest, runtimeTypes_DispatchResult as DispatchResult, runtimeTypes_DispatchResultAccept as DispatchResultAccept, runtimeTypes_DispatchResultReject as DispatchResultReject, runtimeTypes_DispatchTrace as DispatchTrace, runtimeTypes_DispatchTraceAcceptedClientInput as DispatchTraceAcceptedClientInput, runtimeTypes_DispatchTracePhaseEntered as DispatchTracePhaseEntered, runtimeTypes_DispatchTraceRngConsumption as DispatchTraceRngConsumption, runtimeTypes_EventAudience as EventAudience, GameEvent$1 as GameEvent, GameEventDetail$1 as GameEventDetail, runtimeTypes_GameInput as GameInput, runtimeTypes_GameInputCancel as GameInputCancel, runtimeTypes_GameInputInteraction as GameInputInteraction, GameOutcome$1 as GameOutcome, runtimeTypes_GameOutcomeReason as GameOutcomeReason, runtimeTypes_GameplayBasis as GameplayBasis, runtimeTypes_InitializeRequest as InitializeRequest, runtimeTypes_InitializeResult as InitializeResult, OutcomeResult$1 as OutcomeResult, OutcomeScoreComponent$1 as OutcomeScoreComponent, OutcomeStanding$1 as OutcomeStanding, OutcomeTieBreak$1 as OutcomeTieBreak, runtimeTypes_ProjectRequest as ProjectRequest, ProjectedGameEvent$1 as ProjectedGameEvent, ProjectedGameEventDetail$1 as ProjectedGameEventDetail, runtimeTypes_ProjectionTimingMetadata as ProjectionTimingMetadata, runtimeTypes_ReducerContractVersion as ReducerContractVersion, runtimeTypes_ReducerDomainState as ReducerDomainState, runtimeTypes_ReducerFlowState as ReducerFlowState, runtimeTypes_ReducerRuntimeLogEntry as ReducerRuntimeLogEntry, runtimeTypes_ReducerRuntimeLogEntryAcceptedClientInput as ReducerRuntimeLogEntryAcceptedClientInput, runtimeTypes_ReducerRuntimeLogEntryPhaseEntered as ReducerRuntimeLogEntryPhaseEntered, runtimeTypes_ReducerRuntimeLogEntryRngConsumption as ReducerRuntimeLogEntryRngConsumption, runtimeTypes_ReducerRuntimeLogEntryStateCommit as ReducerRuntimeLogEntryStateCommit, runtimeTypes_ReducerRuntimeState as ReducerRuntimeState, runtimeTypes_ReducerSessionState as ReducerSessionState, runtimeTypes_ReferenceBasis as ReferenceBasis, runtimeTypes_RngDraw as RngDraw, runtimeTypes_RngOperation as RngOperation, runtimeTypes_RngOperationParameter as RngOperationParameter, runtimeTypes_RngState as RngState, runtimeTypes_RuntimePendingInteraction as RuntimePendingInteraction, runtimeTypes_RuntimeSimultaneousCurrent as RuntimeSimultaneousCurrent, RuntimeSimultaneousState$1 as RuntimeSimultaneousState, RuntimeSimultaneousSubmission$1 as RuntimeSimultaneousSubmission, runtimeTypes_SchedulerContinuationDependency as SchedulerContinuationDependency, runtimeTypes_SchedulerFlowAuthorityProjection as SchedulerFlowAuthorityProjection, runtimeTypes_SeatProjection as SeatProjection, runtimeTypes_SeatProjectionBundle as SeatProjectionBundle, runtimeTypes_SimultaneousPhaseProjection as SimultaneousPhaseProjection, SystemActionEvent$1 as SystemActionEvent, runtimeTypes_TransitionRecord as TransitionRecord };
4663
+ export type { runtimeTypes_AuthoredView as AuthoredView, runtimeTypes_BotDecision as BotDecision, runtimeTypes_BotStrategyMetadata as BotStrategyMetadata, runtimeTypes_DispatchRequest as DispatchRequest, runtimeTypes_DispatchResult as DispatchResult, runtimeTypes_DispatchResultAccept as DispatchResultAccept, runtimeTypes_DispatchResultReject as DispatchResultReject, runtimeTypes_DispatchTrace as DispatchTrace, runtimeTypes_DispatchTraceAcceptedClientInput as DispatchTraceAcceptedClientInput, runtimeTypes_DispatchTracePhaseEntered as DispatchTracePhaseEntered, runtimeTypes_DispatchTraceRngConsumption as DispatchTraceRngConsumption, runtimeTypes_EventAudience as EventAudience, GameEvent$1 as GameEvent, GameEventDetail$1 as GameEventDetail, runtimeTypes_GameInput as GameInput, runtimeTypes_GameInputCancel as GameInputCancel, runtimeTypes_GameInputInteraction as GameInputInteraction, GameOutcome$1 as GameOutcome, runtimeTypes_GameOutcomeReason as GameOutcomeReason, GameplayBasis$1 as GameplayBasis, runtimeTypes_InitializeRequest as InitializeRequest, runtimeTypes_InitializeResult as InitializeResult, OutcomeResult$1 as OutcomeResult, OutcomeScoreComponent$1 as OutcomeScoreComponent, OutcomeStanding$1 as OutcomeStanding, OutcomeTieBreak$1 as OutcomeTieBreak, runtimeTypes_ProjectRequest as ProjectRequest, ProjectedGameEvent$1 as ProjectedGameEvent, ProjectedGameEventDetail$1 as ProjectedGameEventDetail, runtimeTypes_ProjectionTimingMetadata as ProjectionTimingMetadata, runtimeTypes_ReducerContractVersion as ReducerContractVersion, runtimeTypes_ReducerDomainState as ReducerDomainState, runtimeTypes_ReducerFlowState as ReducerFlowState, runtimeTypes_ReducerRuntimeLogEntry as ReducerRuntimeLogEntry, runtimeTypes_ReducerRuntimeLogEntryAcceptedClientInput as ReducerRuntimeLogEntryAcceptedClientInput, runtimeTypes_ReducerRuntimeLogEntryPhaseEntered as ReducerRuntimeLogEntryPhaseEntered, runtimeTypes_ReducerRuntimeLogEntryRngConsumption as ReducerRuntimeLogEntryRngConsumption, runtimeTypes_ReducerRuntimeLogEntryStateCommit as ReducerRuntimeLogEntryStateCommit, runtimeTypes_ReducerRuntimeState as ReducerRuntimeState, runtimeTypes_ReducerSessionState as ReducerSessionState, runtimeTypes_ReferenceBasis as ReferenceBasis, runtimeTypes_RngDraw as RngDraw, runtimeTypes_RngOperation as RngOperation, runtimeTypes_RngOperationParameter as RngOperationParameter, runtimeTypes_RngState as RngState, runtimeTypes_RuntimePendingInteraction as RuntimePendingInteraction, runtimeTypes_RuntimeSimultaneousCurrent as RuntimeSimultaneousCurrent, RuntimeSimultaneousState$1 as RuntimeSimultaneousState, RuntimeSimultaneousSubmission$1 as RuntimeSimultaneousSubmission, runtimeTypes_SchedulerContinuationDependency as SchedulerContinuationDependency, runtimeTypes_SchedulerFlowAuthorityProjection as SchedulerFlowAuthorityProjection, runtimeTypes_SeatProjection as SeatProjection, runtimeTypes_SeatProjectionBundle as SeatProjectionBundle, runtimeTypes_SimultaneousPhaseProjection as SimultaneousPhaseProjection, SystemActionEvent$1 as SystemActionEvent, runtimeTypes_TransitionRecord as TransitionRecord };
4598
4664
  }
4599
4665
 
4600
4666
  type GameEventDetail = Readonly<GameEventDetail$1>;
@@ -4618,6 +4684,127 @@ type GameOutcome<Player extends string = string> = {
4618
4684
  readonly standings: readonly OutcomeStanding<Player>[];
4619
4685
  };
4620
4686
 
4687
+ type PlayerId$1 = string;
4688
+ interface GameplayBasis {
4689
+ readonly sessionId: string;
4690
+ readonly version: number;
4691
+ readonly actionSetVersion: string;
4692
+ readonly perspectivePlayerId: PlayerId$1;
4693
+ }
4694
+ interface PluginPlayerSummary {
4695
+ readonly playerId: PlayerId$1;
4696
+ readonly displayName: string;
4697
+ readonly color?: string;
4698
+ }
4699
+ interface PluginSessionDescriptor {
4700
+ readonly sessionId: string;
4701
+ /** Fixed display metadata; may omit seats. Frames own membership and turn order. */
4702
+ readonly players: readonly PluginPlayerSummary[];
4703
+ /**
4704
+ * Game image files by manifest path, such as `assets/cards/front.webp`.
4705
+ * Sources replace card `frontImage` and `backImage` paths with object URLs.
4706
+ */
4707
+ readonly assets?: Readonly<Record<string, Blob>>;
4708
+ }
4709
+
4710
+ type InteractionDescriptor<Interaction extends string = string> = Omit<InteractionDescriptor$1, "interactionKey"> & {
4711
+ readonly interactionKey: Interaction;
4712
+ };
4713
+ type ActionInteractionDescriptor<Interaction extends string = string> = InteractionDescriptor<Interaction>;
4714
+ interface ZoneHandlesSnapshot<Interaction extends string = string> {
4715
+ readonly tiles: readonly ProjectedTile[];
4716
+ readonly cardIds: readonly string[];
4717
+ /** Complete views of the cards the seat can see, by card id. */
4718
+ readonly cardViewsById: ReadonlyProjection<Record<string, ViewCard>>;
4719
+ /** Back image paths of the cards hidden from the seat, by positional id. */
4720
+ readonly cardBacksById: Readonly<Record<string, string>>;
4721
+ readonly playableByCardId: Readonly<Record<string, readonly InteractionDescriptor<Interaction>[]>>;
4722
+ /** The operation that produced this frame shuffled the zone. */
4723
+ readonly shuffled?: true;
4724
+ }
4725
+ type ReadonlyProjection<Value> = Value extends string | number | boolean | null | undefined ? Value : Value extends readonly (infer Item)[] ? readonly ReadonlyProjection<Item>[] : Value extends object ? {
4726
+ readonly [Key in keyof Value]: ReadonlyProjection<Value[Key]>;
4727
+ } : Value;
4728
+ type SimultaneousPhaseSnapshot = ReadonlyProjection<SimultaneousPhaseProjection>;
4729
+
4730
+ interface PluginGameplayFrame<View = unknown, Phase extends string = string, Interaction extends string = string> {
4731
+ /** Canonical player IDs in reducer seat/turn order. */
4732
+ readonly players: readonly PlayerId$1[];
4733
+ /** Client action that caused this committed frame, when known. */
4734
+ readonly causedBy?: string;
4735
+ /** Latest committed display-event batch admitted for this seat. Reading a snapshot does not replay notifications. */
4736
+ readonly events: readonly ProjectedGameEvent[];
4737
+ readonly basis: GameplayBasis;
4738
+ readonly view: View | null;
4739
+ readonly flow: {
4740
+ readonly currentPhase: Phase | null;
4741
+ readonly activePlayers: readonly PlayerId$1[];
4742
+ readonly simultaneousPhase: SimultaneousPhaseSnapshot | null;
4743
+ };
4744
+ readonly availableInteractions: ReadonlyArray<InteractionDescriptor<Interaction>>;
4745
+ readonly zones: Readonly<Record<string, Readonly<Record<string, ZoneHandlesSnapshot<Interaction>>>>>;
4746
+ }
4747
+ type ReducerSeatProjectionBundle = ReadonlyProjection<SeatProjectionBundle>;
4748
+
4749
+ interface SourceSnapshot {
4750
+ readonly causedBy?: string;
4751
+ readonly me: string;
4752
+ readonly players: readonly PluginPlayerSummary[];
4753
+ readonly frame: Omit<PluginGameplayFrame, "basis">;
4754
+ readonly version: number;
4755
+ }
4756
+ type SubmitResult = {
4757
+ readonly accepted: true;
4758
+ } | {
4759
+ readonly accepted: false;
4760
+ readonly errorCode: string;
4761
+ readonly message?: string;
4762
+ };
4763
+ interface SourceRequest {
4764
+ readonly clientActionId: string;
4765
+ readonly interactionId: string;
4766
+ readonly operation: "submit" | "cancel";
4767
+ }
4768
+ type SourceState = {
4769
+ readonly connection: "connecting";
4770
+ readonly snapshot: null;
4771
+ readonly request: null;
4772
+ readonly failure: null;
4773
+ } | {
4774
+ readonly connection: "ready";
4775
+ readonly snapshot: SourceSnapshot;
4776
+ readonly request: SourceRequest | null;
4777
+ readonly failure: null;
4778
+ } | {
4779
+ readonly connection: "recovering";
4780
+ readonly snapshot: SourceSnapshot | null;
4781
+ readonly request: SourceRequest | null;
4782
+ readonly failure: null;
4783
+ } | {
4784
+ readonly connection: "failed";
4785
+ readonly snapshot: SourceSnapshot | null;
4786
+ readonly request: null;
4787
+ /** Terminal diagnostic, retained locally. */
4788
+ readonly failure: Readonly<Error>;
4789
+ } | {
4790
+ readonly connection: "closed";
4791
+ readonly snapshot: SourceSnapshot | null;
4792
+ readonly request: null;
4793
+ readonly failure: null;
4794
+ };
4795
+ interface GameSource {
4796
+ readonly store: Pick<Store<SourceState>, "get" | "subscribe">;
4797
+ dispose(): void;
4798
+ }
4799
+ interface CommandSource extends GameSource {
4800
+ submit(interactionId: string, params: RuntimeJson): Promise<SubmitResult>;
4801
+ cancel(interactionId: string): Promise<SubmitResult>;
4802
+ }
4803
+ /** Testing-owned sources can add local actions without widening hosted sources. */
4804
+ interface ApplySource<Action, Result = void> extends GameSource {
4805
+ apply(action: Action): Result;
4806
+ }
4807
+
4621
4808
  /** A space addressed by its canonical runtime board instance. */
4622
4809
  type BoardSpaceTarget<BoardId extends string = string, SpaceId extends string = string> = {
4623
4810
  readonly boardId: BoardId;
@@ -6896,4 +7083,4 @@ type OptionsSchemaOfContract<Contract> = Contract extends {
6896
7083
  } ? Schema : SchemaLike<Record<string, never>>;
6897
7084
  type OptionsOfContract<Contract> = z$1.infer<OptionsSchemaOfContract<Contract>>;
6898
7085
 
6899
- export { type InteractionCommitPolicy$1 as $, type AnyReducerGameDefinition as A, type BaseGameStateOfContract as B, type CardIdOfManifest as C, type DispatchRequest as D, type ErrorCodeOfContract as E, type FieldSchema as F, type FieldsOutput as G, FrameworkErrorCodes as H, type GameEvent as I, type GameEventDetail as J, type GameInput as K, type GameOutcome as L, type GameOutcome$1 as M, type GameStateOf as N, type GameTopologyManifest as O, type HiddenCardId as P, type InitializeRequest as Q, type InitializeResult as R, type InputCollector as S, type InputCollectorOfDefinition as T, type InputDomain as U, InputDomainSchema as V, type InputSelection as W, type InputSelectionDescriptor as X, type InteractionAvailability as Y, InteractionAvailabilitySchema as Z, type InteractionChoiceOption as _, type AuthoredManifest as a, type SimultaneousPhaseProjection as a$, InteractionCommitPolicySchema as a0, type InteractionDescriptor as a1, InteractionDescriptorSchema as a2, type InteractionDiagnosticReason as a3, type InteractionIdOfDefinitionPhase as a4, type InteractionInputDescriptor as a5, InteractionInputDescriptorSchema as a6, type InteractionMap as a7, type InteractionRule as a8, type InteractionSpec as a9, type ReadonlyRuntimeData as aA, type ReducerContractVersion as aB, type ReducerGameContract as aC, type ReducerGameContractLike as aD, type ReducerGameDefinition as aE, type ReducerGameDefinitionInput as aF, type ReducerManifestContract as aG, type ReducerManifestContractLike as aH, type ReducerSessionState as aI, type ReducerTransaction as aJ, type ReducerTransactionOutcome as aK, type ReducerValidationResult as aL, type ResourceMapDomainDescriptor as aM, type RotateZoneArgs as aN, type RuntimeIdsFromCount as aO, type RuntimeJson as aP, RuntimeJsonSchema as aQ, type RuntimeQueryTable as aR, type RuntimeRecord as aS, type RuntimeTableRecord as aT, type SchemaAuthoring as aU, type SchemaLike as aV, type ScopedPhaseState as aW, type SeatBoardTopology as aX, type SeatProjectionBundle as aY, type SeatSpaceRef as aZ, type SeatTileRef as a_, type InteractionSpecByNameOfDefinitionPhase as aa, InteractionSteps as ab, type ManifestContractOf as ac, type ManifestCountValidation as ad, type ManifestIdSchema as ae, type ManifestIdsOf as af, type ManifestTable as ag, type OptionsOfContract as ah, type OutcomeResult as ai, type OutcomeScoreComponent as aj, type OutcomeStanding as ak, type OutcomeTieBreak as al, type PerPlayerInstanceFamily as am, type PerPlayerInstanceId as an, type PhaseDefinition as ao, type PhaseMapOf as ap, type PhaseNamesOfDefinition as aq, type PlayerId as ar, type PlayerIdOfState as as, type PositionTarget as at, PositionTargetSchema as au, type ProjectRequest as av, type ProjectedGameEvent as aw, type ProjectedGameEventDetail as ax, type ProjectedTile as ay, type PublicTileAppearance as az, type AuthoredOf as b, type SpaceIdOfTable as b0, type SquareBoardSpec as b1, type StateDefinition as b2, type SystemActionEvent as b3, type TableOfManifest as b4, type TableQueries as b5, type TableQueriesOfState as b6, type TileDisclosure as b7, type TileFaceAudience as b8, type TileIdOfTable as b9, perPlayerInstanceId as bA, ref as bB, runtimeSchema as bC, runtimeTypes as bD, tileSpaceId as bE, type TileSeedSpec as ba, type TileSpaceId as bb, type TileSpaceIds as bc, type TileTypeSpec as bd, type TiledBoardIdOfTable as be, type TiledEdgeIdOfTable as bf, type TiledVertexIdOfTable as bg, type TopologyDefinitions as bh, type ValidatedManifest as bi, type ValidationIssue as bj, type ViewCard as bk, type ViewCardOfTable as bl, ViewCardSchema as bm, type ViewData as bn, type ViewDefinition as bo, type ViewOfContract as bp, type ViewOfDefinition as bq, type ZoneDefinitions as br, type ZoneIdOfTable as bs, type ZoneVisibility as bt, asPlayerId as bu, boardSpaceHostId as bv, isPlayerId as bw, parseBoardSpaceHostId as bx, parsePerPlayerInstanceId as by, parseTileSpaceId as bz, type AuthoredTileDisclosure as c, type AuthoredTileFaceAudience as d, type BoardEdge as e, type BoardEdgeId as f, type BoardEdgeRef as g, type BoardIdOfTable as h, type BoardSpaceHostId as i, type BoardSpaceTarget as j, type BoardStateOfTable as k, type BoardTopologyOf as l, type BoardVertex as m, type BoardVertexId as n, type BoardVertexRef as o, type BoundedNumberDomainDescriptor as p, type ChoiceDomainDescriptor as q, type ChoiceListDomainDescriptor as r, type ClientParamsOfInteractionOfDefinition as s, type CollectorState as t, type CollectorValueOf as u, type CollectorValueWitness as v, type CompiledManifest as w, type CompiledManifestWitness as x, type DispatchResult as y, type FieldsInput as z };
7086
+ export { type InputDomain as $, type ActionInteractionDescriptor as A, type BaseGameStateOfContract as B, type CardIdOfManifest as C, type CommandSource as D, type CompiledManifest as E, type CompiledManifestWitness as F, type DispatchRequest as G, type DispatchResult as H, type ErrorCodeOfContract as I, type FieldSchema as J, type FieldsInput as K, type FieldsOutput as L, FrameworkErrorCodes as M, type GameEvent as N, type GameEventDetail as O, type GameInput as P, type GameOutcome as Q, type GameOutcome$1 as R, type GameSource as S, type GameStateOf as T, type GameTopologyManifest as U, type GameplayBasis as V, type HiddenCardId as W, type InitializeRequest as X, type InitializeResult as Y, type InputCollector as Z, type InputCollectorOfDefinition as _, type AnyReducerGameDefinition as a, type RuntimeJson as a$, InputDomainSchema as a0, type InputSelection as a1, type InputSelectionDescriptor as a2, type InteractionAvailability as a3, InteractionAvailabilitySchema as a4, type InteractionChoiceOption as a5, type InteractionCommitPolicy$1 as a6, InteractionCommitPolicySchema as a7, type InteractionDescriptor as a8, InteractionDescriptorSchema as a9, type PlayerIdOfState as aA, type PluginGameplayFrame as aB, type PluginPlayerSummary as aC, type PluginSessionDescriptor as aD, type PositionTarget as aE, PositionTargetSchema as aF, type ProjectRequest as aG, type ProjectedGameEvent as aH, type ProjectedGameEventDetail as aI, type ProjectedTile as aJ, type PublicTileAppearance as aK, type ReadonlyRuntimeData as aL, type ReducerContractVersion as aM, type ReducerGameContract as aN, type ReducerGameContractLike as aO, type ReducerGameDefinition as aP, type ReducerGameDefinitionInput as aQ, type ReducerManifestContract as aR, type ReducerManifestContractLike as aS, type ReducerSeatProjectionBundle as aT, type ReducerSessionState as aU, type ReducerTransaction as aV, type ReducerTransactionOutcome as aW, type ReducerValidationResult as aX, type ResourceMapDomainDescriptor as aY, type RotateZoneArgs as aZ, type RuntimeIdsFromCount as a_, type InteractionDiagnosticReason as aa, type InteractionIdOfDefinitionPhase as ab, type InteractionInputDescriptor as ac, InteractionInputDescriptorSchema as ad, type InteractionMap as ae, type InteractionRule as af, type InteractionSpec as ag, type InteractionSpecByNameOfDefinitionPhase as ah, InteractionSteps as ai, type ManifestContractOf as aj, type ManifestCountValidation as ak, type ManifestIdSchema as al, type ManifestIdsOf as am, type ManifestTable as an, type OptionsOfContract as ao, type OutcomeResult as ap, type OutcomeScoreComponent as aq, type OutcomeStanding as ar, type OutcomeTieBreak as as, type PerPlayerInstanceFamily as at, type PerPlayerInstanceId as au, type PhaseDefinition as av, type PhaseMapOf as aw, type PhaseNamesOfDefinition as ax, type PlayerId$1 as ay, type PlayerId as az, type ApplySource as b, RuntimeJsonSchema as b0, type RuntimeQueryTable as b1, type RuntimeRecord as b2, type RuntimeTableRecord as b3, type SchemaAuthoring as b4, type SchemaLike as b5, type ScopedPhaseState as b6, type SeatBoardTopology as b7, type SeatProjectionBundle as b8, type SeatSpaceRef as b9, type ViewCard as bA, type ViewCardOfTable as bB, ViewCardSchema as bC, type ViewData as bD, type ViewDefinition as bE, type ViewOfContract as bF, type ViewOfDefinition as bG, type ZoneDefinitions as bH, type ZoneHandlesSnapshot as bI, type ZoneIdOfTable as bJ, type ZoneInteractionRefs as bK, type ZoneVisibility as bL, asPlayerId as bM, boardSpaceHostId as bN, isPlayerId as bO, parseBoardSpaceHostId as bP, parsePerPlayerInstanceId as bQ, parseTileSpaceId as bR, perPlayerInstanceId as bS, ref as bT, runtimeSchema as bU, runtimeTypes as bV, tileSpaceId as bW, type SeatTileRef as ba, type SimultaneousPhaseSnapshot as bb, type SourceRequest as bc, type SourceSnapshot as bd, type SourceState as be, type SpaceIdOfTable as bf, type SquareBoardSpec as bg, type StateDefinition as bh, type SubmitResult as bi, type SystemActionEvent as bj, type TableOfManifest as bk, type TableQueries as bl, type TableQueriesOfState as bm, type TileDisclosure as bn, type TileFaceAudience as bo, type TileIdOfTable as bp, type TileSeedSpec as bq, type TileSpaceId as br, type TileSpaceIds as bs, type TileTypeSpec as bt, type TiledBoardIdOfTable as bu, type TiledEdgeIdOfTable as bv, type TiledVertexIdOfTable as bw, type TopologyDefinitions as bx, type ValidatedManifest as by, type ValidationIssue as bz, type AuthoredManifest as c, type AuthoredOf as d, type AuthoredTileDisclosure as e, type AuthoredTileFaceAudience as f, type BoardEdge as g, type BoardEdgeId as h, type BoardEdgeRef as i, type BoardIdOfTable as j, type BoardSpaceHostId as k, type BoardSpaceTarget as l, type BoardStateOfTable as m, type BoardTopologyOf as n, type BoardVertex as o, type BoardVertexId as p, type BoardVertexRef as q, type BotDecision as r, type BotStrategyMetadata as s, type BoundedNumberDomainDescriptor as t, type ChoiceDomainDescriptor as u, type ChoiceListDomainDescriptor as v, type ClientParamsOfInteractionOfDefinition as w, type CollectorState as x, type CollectorValueOf as y, type CollectorValueWitness as z };