@my-swu/simulator-client 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +1 -1
  2. package/dist/connection.js +2 -3
  3. package/dist/generated/index.d.ts +10 -0
  4. package/dist/generated/schemas.d.ts +1 -1
  5. package/dist/generated/schemas.js +466 -59
  6. package/dist/generated/types/admin-match-debug-bundle.d.ts +1 -0
  7. package/dist/generated/types/admin-match-debug-bundle.js +2 -0
  8. package/dist/generated/types/admin-match-list-response.d.ts +1 -0
  9. package/dist/generated/types/admin-match-list-response.js +2 -0
  10. package/dist/generated/types/admin-match-replay-response.d.ts +1 -0
  11. package/dist/generated/types/admin-match-replay-response.js +2 -0
  12. package/dist/generated/types/common.d.ts +143 -15
  13. package/dist/generated/types/create-match-history-replay-share-request.d.ts +1 -0
  14. package/dist/generated/types/create-match-history-replay-share-request.js +2 -0
  15. package/dist/generated/types/create-match-history-replay-share-response.d.ts +1 -0
  16. package/dist/generated/types/create-match-history-replay-share-response.js +2 -0
  17. package/dist/generated/types/inactive-match-recovery-request.d.ts +1 -0
  18. package/dist/generated/types/inactive-match-recovery-request.js +2 -0
  19. package/dist/generated/types/inactive-match-recovery-response.d.ts +1 -0
  20. package/dist/generated/types/inactive-match-recovery-response.js +2 -0
  21. package/dist/generated/types/match-access-recovery-request.d.ts +1 -0
  22. package/dist/generated/types/match-access-recovery-request.js +2 -0
  23. package/dist/generated/types/match-access-recovery-response.d.ts +1 -0
  24. package/dist/generated/types/match-access-recovery-response.js +2 -0
  25. package/dist/generated/types/match-recovery-request.d.ts +1 -0
  26. package/dist/generated/types/match-recovery-request.js +2 -0
  27. package/dist/generated/types/match-recovery-response.d.ts +1 -0
  28. package/dist/generated/types/match-recovery-response.js +2 -0
  29. package/dist/generated/types/shared-match-history-replay-response.d.ts +1 -0
  30. package/dist/generated/types/shared-match-history-replay-response.js +2 -0
  31. package/dist/generated/version.d.ts +1 -1
  32. package/dist/generated/version.js +1 -1
  33. package/dist/index.d.ts +3 -3
  34. package/dist/internal/match-history.d.ts +5 -0
  35. package/dist/internal/match-history.js +8 -0
  36. package/dist/local/engine.d.ts +2 -0
  37. package/dist/local/server/http-router.js +10 -0
  38. package/dist/local/wasm-engine.d.ts +1 -0
  39. package/dist/local/wasm-engine.js +1 -0
  40. package/dist/match-session/controller.d.ts +2 -0
  41. package/dist/match-session/controller.js +59 -17
  42. package/dist/match-session/methods.d.ts +8 -0
  43. package/dist/match-session/session-state.d.ts +5 -1
  44. package/dist/match-session/types.d.ts +3 -1
  45. package/dist/match-session.d.ts +1 -1
  46. package/dist/resources/admin.d.ts +14 -1
  47. package/dist/resources/admin.js +21 -0
  48. package/dist/resources/lobby-types.d.ts +4 -4
  49. package/dist/resources/match-history.d.ts +14 -1
  50. package/dist/resources/match-history.js +16 -0
  51. package/dist/resources/match-types.d.ts +11 -2
  52. package/dist/resources/matches.js +10 -0
  53. package/dist/validators.d.ts +11 -1
  54. package/package.json +1 -1
  55. package/schema/add-lobby-ai-player-request.schema.json +7 -0
  56. package/schema/admin-match-debug-bundle.schema.json +48 -0
  57. package/schema/admin-match-list-response.schema.json +23 -0
  58. package/schema/admin-match-replay-response.schema.json +14 -0
  59. package/schema/common.schema.json +176 -27
  60. package/schema/create-limited-event-request.schema.json +2 -4
  61. package/schema/create-lobby-request.schema.json +4 -8
  62. package/schema/create-match-history-replay-share-request.schema.json +22 -0
  63. package/schema/create-match-history-replay-share-response.schema.json +15 -0
  64. package/schema/create-match-request.schema.json +2 -3
  65. package/schema/create-tournament-room-request.schema.json +4 -8
  66. package/schema/limited-event-preflight-response.schema.json +1 -3
  67. package/schema/manifest.json +11 -1
  68. package/schema/match-access-recovery-request.schema.json +17 -0
  69. package/schema/match-access-recovery-response.schema.json +36 -0
  70. package/schema/match-access-response.schema.json +1 -3
  71. package/schema/match-history-entry.schema.json +1 -3
  72. package/schema/match-recovery-request.schema.json +33 -0
  73. package/schema/match-recovery-response.schema.json +36 -0
  74. package/schema/route-manifest.json +92 -0
  75. package/schema/shared-match-history-replay-response.schema.json +14 -0
@@ -0,0 +1 @@
1
+ export type { AbilityTarget, AbilityWindow, ActionAbilitySource, ActionAbilityView, ActiveEffectDescriptionView, ActiveEffectView, AdminMatchDebugBundle, AdminMatchSummary, AiDifficulty, AiOpponentConfig, AiTrilogyFormatMode, AttachmentMode, AttackChoiceView, AttackTarget, AvailableAttackView, CaptureOptionsView, CaptureSelection, CapturedUnitView, CardArena, CardChoiceResourcePaymentOptionView, CardDrawSource, CardInstanceView, ConstructedFormat, CurrentAttackStateView, CurrentAttackView, DeckInput, DeckPlacement, DeckRegistrationView, DelayedEffectDescriptionView, DelayedEffectOrderChoiceView, DelayedEffectOrderOptionView, DelayedEffectTimingView, DelayedEffectView, DistributionAssignment, DistributionDamageKindView, DistributionItemView, DistributionTargetView, DistributionTokenKindView, DynamicPowerLimit, EffectCardScopeView, EffectDurationView, EffectResolutionDraftStepView, EffectResolutionDraftView, EffectRestrictionView, EffectSequenceOrder, EffectSequenceView, EffectSourceView, EffectTargetView, ExploitOptionsView, FormatSeatView, FormatSetupInput, GameEvent, GameState, GameTimerActiveClockView, GameTimerReserveView, GameTimerStateView, HiddenCardChoiceMode, HiddenZoneKind, HistorySection, HistoryStatus, InitiativeChoiceReason, InitiativeState, InstructedAttackView, LeaderActionView, LeaderDeployActionView, LeaderDeployCostView, LeaderDeployMode, LeaderDeployThresholdBonus, LeaderStateView, LimitedEventView, LimitedSideboardPoolView, MatchEndReason, MatchFormat, MatchHistoryDeckSummary, MatchHistoryPlayerSummary, MatchHistoryReplayArchive, MatchPhase, MatchResult, MatchSavePayload, MatchSaveSeat, MatchSeriesView, MatchStatus, MctsConfigOverride, ModeChoiceView, NamedCardEffectDescriptionView, NullableDistributionTokenKindView, NullableSeatView, PendingAbilityAspectChoiceView, PendingAbilityAttackChoiceView, PendingAbilityCardChoiceView, PendingAbilityFamily, PendingAbilityModeChoiceInputKind, PendingAbilityModeChoiceView, PendingAbilityNameChoiceView, PendingAbilityOrderAbilityView, PendingAbilityOrderChoiceView, PendingAbilityOrderGroupView, PendingAbilityView, PendingChoiceView, PendingDistributionView, PendingUndoRequest, PlayActionView, PlayCardSourceView, PlayCardZone, PlayerTargetPattern, PresenceFilter, PromptProvenanceView, PromptState, RejectedPlayView, RelationFilter, ResourceCardView, ResourcePaymentOptionView, Seat, SeatDirection, SeatOfferIntent, SeatState, SelectionScope, SeriesEndReason, SeriesGameRecord, SeriesResultView, SharedCounterState, SimulatorReportResponse, SmuggleActionView, SmuggleKind, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TriggerWindowView, TurnPassSource, TwinSunsCounter, TwinSunsCountersView, UndoCancelReason, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitCopiedCardEntry, UnitDefeatCause, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable */
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { AdminMatchListResponse, AdminMatchSummary, HistorySection, HistoryStatus, MatchFormat, MatchHistoryDeckSummary, MatchHistoryPlayerSummary, Seat, } from './common.js';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable */
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { AbilityTarget, AbilityWindow, ActionAbilitySource, ActionAbilityView, ActiveEffectDescriptionView, ActiveEffectView, AdminMatchReplayResponse, AttachmentMode, AttackChoiceView, AttackTarget, AvailableAttackView, CaptureOptionsView, CaptureSelection, CapturedUnitView, CardArena, CardChoiceResourcePaymentOptionView, CardDrawSource, CardInstanceView, ConstructedFormat, CurrentAttackStateView, CurrentAttackView, DeckInput, DeckPlacement, DeckRegistrationView, DelayedEffectDescriptionView, DelayedEffectOrderChoiceView, DelayedEffectOrderOptionView, DelayedEffectTimingView, DelayedEffectView, DistributionAssignment, DistributionDamageKindView, DistributionItemView, DistributionTargetView, DistributionTokenKindView, DynamicPowerLimit, EffectCardScopeView, EffectDurationView, EffectResolutionDraftStepView, EffectResolutionDraftView, EffectRestrictionView, EffectSequenceOrder, EffectSequenceView, EffectSourceView, EffectTargetView, ExploitOptionsView, FormatSeatView, GameEvent, GameState, GameTimerActiveClockView, GameTimerReserveView, GameTimerStateView, HiddenCardChoiceMode, HiddenZoneKind, InitiativeChoiceReason, InitiativeState, InstructedAttackView, LeaderActionView, LeaderDeployActionView, LeaderDeployCostView, LeaderDeployMode, LeaderDeployThresholdBonus, LeaderStateView, LimitedEventView, LimitedSideboardPoolView, MatchEndReason, MatchFormat, MatchHistoryReplayArchive, MatchPhase, MatchResult, MatchSeriesView, MatchStatus, ModeChoiceView, NamedCardEffectDescriptionView, NullableDistributionTokenKindView, NullableSeatView, PendingAbilityAspectChoiceView, PendingAbilityAttackChoiceView, PendingAbilityCardChoiceView, PendingAbilityFamily, PendingAbilityModeChoiceInputKind, PendingAbilityModeChoiceView, PendingAbilityNameChoiceView, PendingAbilityOrderAbilityView, PendingAbilityOrderChoiceView, PendingAbilityOrderGroupView, PendingAbilityView, PendingChoiceView, PendingDistributionView, PendingUndoRequest, PlayActionView, PlayCardSourceView, PlayCardZone, PlayerTargetPattern, PresenceFilter, PromptProvenanceView, PromptState, RejectedPlayView, RelationFilter, ResourceCardView, ResourcePaymentOptionView, Seat, SeatDirection, SeatOfferIntent, SeatState, SelectionScope, SeriesEndReason, SeriesGameRecord, SeriesResultView, SharedCounterState, SmuggleActionView, SmuggleKind, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TriggerWindowView, TurnPassSource, TwinSunsCounter, TwinSunsCountersView, UndoCancelReason, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitDefeatCause, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable */
2
+ export {};
@@ -224,6 +224,10 @@ export interface ActiveEffectView {
224
224
  targets: EffectTargetView[];
225
225
  }
226
226
  export interface AddLobbyAiPlayerRequest {
227
+ /**
228
+ * Signed app account proof required to create a server-controlled AI.
229
+ */
230
+ accountToken?: (string | null);
227
231
  deck: DeckInput;
228
232
  deckId?: (string | null);
229
233
  deckSource?: (string | null);
@@ -233,6 +237,47 @@ export interface AddLobbyAiPlayerRequest {
233
237
  playerToken: string;
234
238
  trilogyFormatMode: AiTrilogyFormatMode;
235
239
  }
240
+ /**
241
+ * Complete durable diagnostics for one match, excluding restore credentials.
242
+ */
243
+ export interface AdminMatchDebugBundle {
244
+ exportVersion: number;
245
+ exportedAtMs: number;
246
+ game: AdminMatchSummary;
247
+ replay?: (MatchHistoryReplayArchive | null);
248
+ reports: SimulatorReportResponse[];
249
+ save: MatchSavePayload;
250
+ }
251
+ /**
252
+ * Cursor-paginated durable match list for simulator administrators.
253
+ */
254
+ export interface AdminMatchListResponse {
255
+ games: AdminMatchSummary[];
256
+ nextCursor?: (string | null);
257
+ }
258
+ /**
259
+ * Completed replay archive returned to an authenticated simulator administrator.
260
+ */
261
+ export interface AdminMatchReplayResponse {
262
+ archive: MatchHistoryReplayArchive;
263
+ }
264
+ /**
265
+ * Compact durable match data safe for an administrator list view.
266
+ */
267
+ export interface AdminMatchSummary {
268
+ completedAtMs?: (number | null);
269
+ createdAtMs: number;
270
+ format: MatchFormat;
271
+ historyId: string;
272
+ players: MatchHistoryPlayerSummary[];
273
+ replayAvailable: boolean;
274
+ result?: unknown;
275
+ section: HistorySection;
276
+ series: unknown;
277
+ sourceMatchId: string;
278
+ status: HistoryStatus;
279
+ updatedAtMs: number;
280
+ }
236
281
  /**
237
282
  * Public difficulty presets. Internal tuning (iteration counts, time
238
283
  * budgets) lives in `crate::r#match::registry::ai_factory` so it can be
@@ -543,7 +588,7 @@ export interface CreateLimitedEventRequest {
543
588
  /**
544
589
  * Optional deterministic seed for generated boosters and draft leaders.
545
590
  */
546
- seed?: (number | null);
591
+ seed?: (string | null);
547
592
  /**
548
593
  * Set code used for booster generation.
549
594
  */
@@ -571,16 +616,32 @@ export interface CreateLobbyRequest {
571
616
  /**
572
617
  * Optional deterministic seed reused for limited duel matches.
573
618
  */
574
- matchSeed?: (number | null);
619
+ matchSeed?: (string | null);
575
620
  /**
576
621
  * Optional deterministic seed for limited pack/leader generation.
577
622
  */
578
- packSeed?: (number | null);
623
+ packSeed?: (string | null);
579
624
  /**
580
625
  * Whether the lobby should appear in public browsing surfaces.
581
626
  */
582
627
  visibility: LobbyVisibility;
583
628
  }
629
+ /**
630
+ * Participant-authorized request to create one permanent replay-share link.
631
+ */
632
+ export interface CreateMatchHistoryReplayShareRequest {
633
+ identities: HistoryIdentityInput[];
634
+ /**
635
+ * Whether this capability may retrieve post-match private-zone views.
636
+ */
637
+ includeHiddenInformation: boolean;
638
+ }
639
+ /**
640
+ * Opaque capability returned after a participant creates a replay share.
641
+ */
642
+ export interface CreateMatchHistoryReplayShareResponse {
643
+ shareToken: string;
644
+ }
584
645
  export interface CreateMatchRequest {
585
646
  /**
586
647
  * Explicit AI-driven seats. In a two-player match use seat Two; Twin
@@ -645,7 +706,7 @@ export interface CreateMatchRequest {
645
706
  /**
646
707
  * Optional deterministic match seed.
647
708
  */
648
- seed?: (number | null);
709
+ seed?: (string | null);
649
710
  }
650
711
  /**
651
712
  * Request to create a simulator-owned ranked meta window.
@@ -679,11 +740,11 @@ export interface CreateTournamentRoomRequest {
679
740
  /**
680
741
  * Optional deterministic seed reused for every duel table match.
681
742
  */
682
- matchSeed?: (number | null);
743
+ matchSeed?: (string | null);
683
744
  /**
684
745
  * Optional deterministic seed for limited pack/leader generation.
685
746
  */
686
- packSeed?: (number | null);
747
+ packSeed?: (string | null);
687
748
  /**
688
749
  * Enables the per-pick countdown with auto-pick on timeout (draft only).
689
750
  */
@@ -2053,15 +2114,18 @@ export type HistoryRestoreEligibility = ({
2053
2114
  /**
2054
2115
  * Why one history row cannot currently create a fresh live match.
2055
2116
  */
2056
- export type HistoryRestoreUnavailableReason = ("completedSeries" | "unsupportedSection" | "learnScenario" | "invalidAiTopology" | "incompatibleSaveVersion" | "invalidSave" | "policyRefreshPending");
2117
+ export type HistoryRestoreUnavailableReason = ("completedSeries" | "abandoned" | "unsupportedSection" | "learnScenario" | "invalidAiTopology" | "incompatibleSaveVersion" | "invalidSave" | "policyRefreshPending");
2057
2118
  /**
2058
2119
  * Simulator setup section that owns a match-history entry.
2059
2120
  */
2060
2121
  export type HistorySection = ("solo" | "multiplayer");
2061
2122
  /**
2062
2123
  * Durable history entry status.
2124
+ *
2125
+ * Lives here rather than the `server-protocol`-gated history module because
2126
+ * `MatchRuntimeRecord` embeds it in every build, including wasm and bench.
2063
2127
  */
2064
- export type HistoryStatus = ("saved" | "result");
2128
+ export type HistoryStatus = ("saved" | "result" | "abandoned");
2065
2129
  /**
2066
2130
  * Why this seat is choosing the player who begins with initiative.
2067
2131
  */
@@ -2430,7 +2494,7 @@ export interface LimitedEventPreflightResponse {
2430
2494
  /**
2431
2495
  * Deterministic seed used by successful creation after this check.
2432
2496
  */
2433
- seed: number;
2497
+ seed: string;
2434
2498
  }
2435
2499
  /**
2436
2500
  * Response body for limited event fetches and commands.
@@ -2920,12 +2984,12 @@ export interface LobbySnapshot {
2920
2984
  /**
2921
2985
  * Fixed match seed when configured.
2922
2986
  */
2923
- matchSeed?: (number | null);
2987
+ matchSeed?: (string | null);
2924
2988
  matchmaking?: (LobbyMatchmakingView | null);
2925
2989
  /**
2926
2990
  * Fixed limited pack/leader seed when configured.
2927
2991
  */
2928
- packSeed?: (number | null);
2992
+ packSeed?: (string | null);
2929
2993
  players: LobbyPlayerView[];
2930
2994
  requiredPlayerCount: number;
2931
2995
  spectators?: LobbySpectatorView[];
@@ -2986,12 +3050,34 @@ export interface MaintenanceStatus {
2986
3050
  */
2987
3051
  updatedAtMs?: (number | null);
2988
3052
  }
3053
+ /**
3054
+ * Ownership proof used to recover current access for one live Solo-versus-AI
3055
+ * match when browser-stored seat credentials are stale.
3056
+ */
3057
+ export interface MatchAccessRecoveryRequest {
3058
+ identities: HistoryIdentityInput[];
3059
+ }
3060
+ /**
3061
+ * Result of recovering current private access for a live Solo-versus-AI match.
3062
+ *
3063
+ * `Unavailable` deliberately combines unknown, unauthorized, inactive, and
3064
+ * ineligible matches so this endpoint cannot be used to probe match state.
3065
+ */
3066
+ export type MatchAccessRecoveryResponse = ({
3067
+ /**
3068
+ * Current private host capability for the existing live runtime.
3069
+ */
3070
+ access: MatchAccessResponse;
3071
+ kind: "recovered";
3072
+ } | {
3073
+ kind: "unavailable";
3074
+ });
2989
3075
  export interface MatchAccessResponse {
2990
3076
  matchId: string;
2991
3077
  /**
2992
3078
  * Resolved seed for a private solo-vs-AI match. Never projected in live state.
2993
3079
  */
2994
- replaySeed?: number;
3080
+ replaySeed?: string;
2995
3081
  seat: Seat;
2996
3082
  seatToken: string;
2997
3083
  snapshot: GameState;
@@ -3108,7 +3194,7 @@ export interface MatchHistoryEntry {
3108
3194
  restoreEligibility: HistoryRestoreEligibility;
3109
3195
  result?: unknown;
3110
3196
  section: HistorySection;
3111
- seed: number;
3197
+ seed: string;
3112
3198
  series: unknown;
3113
3199
  sourceMatchId: string;
3114
3200
  status: HistoryStatus;
@@ -3230,6 +3316,37 @@ export type MatchPhase = ("lobby" | "setup" | "action" | "regroup" | "completed"
3230
3316
  * read them in their own language.
3231
3317
  */
3232
3318
  export type MatchQuickPhrase = ("greetings" | "goodLuck" | "wellPlayed" | "thinking" | "oops" | "goodGame");
3319
+ /**
3320
+ * Request to restore an unfinished Solo-versus-AI match whose original live
3321
+ * runtime is no longer available.
3322
+ */
3323
+ export interface MatchRecoveryRequest {
3324
+ identities: HistoryIdentityInput[];
3325
+ /**
3326
+ * Stable browser-generated id that makes recovery retries idempotent.
3327
+ */
3328
+ restoreRequestId: string;
3329
+ section: HistorySection;
3330
+ /**
3331
+ * Id of the original runtime, never a public history id.
3332
+ */
3333
+ sourceMatchId: string;
3334
+ }
3335
+ /**
3336
+ * Result of looking up a lost-runtime recovery source.
3337
+ *
3338
+ * `Unavailable` intentionally combines unknown, unauthorized, live, and
3339
+ * ineligible sources so callers cannot probe match lifecycle metadata.
3340
+ */
3341
+ export type MatchRecoveryResponse = ({
3342
+ /**
3343
+ * Fresh host capability for the restored runtime.
3344
+ */
3345
+ access: MatchAccessResponse;
3346
+ kind: "restored";
3347
+ } | {
3348
+ kind: "unavailable";
3349
+ });
3233
3350
  export interface MatchResult {
3234
3351
  reason: MatchEndReason;
3235
3352
  winner?: (Seat | null);
@@ -3509,6 +3626,11 @@ export interface PendingAbilityAttackChoiceView {
3509
3626
  * Structural purpose of choosing an attacker through this specialized prompt.
3510
3627
  */
3511
3628
  purpose?: (TargetGroupPurpose | null);
3629
+ /**
3630
+ * Publicly revealed cards which caused this instructed attack. Omitted
3631
+ * for ordinary attacks and intentionally projected only to chooser.
3632
+ */
3633
+ revealedCardIds?: number[];
3512
3634
  sourceCardId: number;
3513
3635
  }
3514
3636
  export interface PendingAbilityCardChoiceView {
@@ -4471,6 +4593,12 @@ export interface SharedCounterState {
4471
4593
  available: boolean;
4472
4594
  controller?: (Seat | null);
4473
4595
  }
4596
+ /**
4597
+ * Replay archive resolved from an opaque, publicly usable share capability.
4598
+ */
4599
+ export interface SharedMatchHistoryReplayResponse {
4600
+ archive: MatchHistoryReplayArchive;
4601
+ }
4474
4602
  /**
4475
4603
  * Admin status payload combining drain mode and live counters.
4476
4604
  */
@@ -4942,11 +5070,11 @@ export interface TournamentRoomSnapshot {
4942
5070
  /**
4943
5071
  * Fixed duel match seed when configured.
4944
5072
  */
4945
- matchSeed?: (number | null);
5073
+ matchSeed?: (string | null);
4946
5074
  /**
4947
5075
  * Fixed limited pack/leader seed when configured.
4948
5076
  */
4949
- packSeed?: (number | null);
5077
+ packSeed?: (string | null);
4950
5078
  players: TournamentRoomPlayerView[];
4951
5079
  requiredPlayerCount: number;
4952
5080
  roomId: string;
@@ -0,0 +1 @@
1
+ export type { CreateMatchHistoryReplayShareRequest, HistoryIdentityInput, } from './common.js';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable */
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { CreateMatchHistoryReplayShareResponse, } from './common.js';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable */
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { HistoryIdentityInput, HistorySection, InactiveMatchRecoveryRequest, } from './common.js';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable */
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { AbilityTarget, AbilityWindow, ActionAbilitySource, ActionAbilityView, ActiveEffectDescriptionView, ActiveEffectView, AttachmentMode, AttackChoiceView, AttackTarget, AvailableAttackView, CaptureOptionsView, CaptureSelection, CapturedUnitView, CardArena, CardChoiceResourcePaymentOptionView, CardInstanceView, ConstructedFormat, CurrentAttackStateView, CurrentAttackView, DeckInput, DeckRegistrationView, DelayedEffectDescriptionView, DelayedEffectOrderChoiceView, DelayedEffectOrderOptionView, DelayedEffectTimingView, DelayedEffectView, DistributionAssignment, DistributionDamageKindView, DistributionItemView, DistributionTargetView, DistributionTokenKindView, DynamicPowerLimit, EffectCardScopeView, EffectDurationView, EffectResolutionDraftStepView, EffectResolutionDraftView, EffectRestrictionView, EffectSequenceOrder, EffectSequenceView, EffectSourceView, EffectTargetView, ExploitOptionsView, FormatSeatView, GameState, GameTimerActiveClockView, GameTimerReserveView, GameTimerStateView, HiddenCardChoiceMode, HiddenZoneKind, InactiveMatchRecoveryResponse, InitiativeChoiceReason, InitiativeState, InstructedAttackView, LeaderActionView, LeaderDeployActionView, LeaderDeployCostView, LeaderDeployMode, LeaderDeployThresholdBonus, LeaderStateView, LimitedEventView, LimitedSideboardPoolView, MatchAccessResponse, MatchEndReason, MatchFormat, MatchPhase, MatchResult, MatchSeriesView, MatchStatus, ModeChoiceView, NamedCardEffectDescriptionView, NullableDistributionTokenKindView, NullableSeatView, PendingAbilityAspectChoiceView, PendingAbilityAttackChoiceView, PendingAbilityCardChoiceView, PendingAbilityFamily, PendingAbilityModeChoiceInputKind, PendingAbilityModeChoiceView, PendingAbilityNameChoiceView, PendingAbilityOrderAbilityView, PendingAbilityOrderChoiceView, PendingAbilityOrderGroupView, PendingAbilityView, PendingChoiceView, PendingDistributionView, PendingUndoRequest, PlayActionView, PlayCardSourceView, PlayCardZone, PlayerTargetPattern, PresenceFilter, PromptProvenanceView, PromptState, RejectedPlayView, RelationFilter, ResourceCardView, ResourcePaymentOptionView, Seat, SeatDirection, SeatOfferIntent, SeatState, SelectionScope, SeriesEndReason, SeriesGameRecord, SeriesResultView, SharedCounterState, SmuggleActionView, SmuggleKind, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TriggerWindowView, TwinSunsCounter, TwinSunsCountersView, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable */
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { HistoryIdentityInput, MatchAccessRecoveryRequest, } from './common.js';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable */
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { AbilityTarget, AbilityWindow, ActionAbilitySource, ActionAbilityView, ActiveEffectDescriptionView, ActiveEffectView, AttachmentMode, AttackChoiceView, AttackTarget, AvailableAttackView, CaptureOptionsView, CaptureSelection, CapturedUnitView, CardArena, CardChoiceResourcePaymentOptionView, CardInstanceView, ConstructedFormat, CurrentAttackStateView, CurrentAttackView, DeckInput, DeckRegistrationView, DelayedEffectDescriptionView, DelayedEffectOrderChoiceView, DelayedEffectOrderOptionView, DelayedEffectTimingView, DelayedEffectView, DistributionAssignment, DistributionDamageKindView, DistributionItemView, DistributionTargetView, DistributionTokenKindView, DynamicPowerLimit, EffectCardScopeView, EffectDurationView, EffectResolutionDraftStepView, EffectResolutionDraftView, EffectRestrictionView, EffectSequenceOrder, EffectSequenceView, EffectSourceView, EffectTargetView, ExploitOptionsView, FormatSeatView, GameState, GameTimerActiveClockView, GameTimerReserveView, GameTimerStateView, HiddenCardChoiceMode, HiddenZoneKind, InitiativeChoiceReason, InitiativeState, InstructedAttackView, LeaderActionView, LeaderDeployActionView, LeaderDeployCostView, LeaderDeployMode, LeaderDeployThresholdBonus, LeaderStateView, LimitedEventView, LimitedSideboardPoolView, MatchAccessRecoveryResponse, MatchAccessResponse, MatchEndReason, MatchFormat, MatchPhase, MatchResult, MatchSeriesView, MatchStatus, ModeChoiceView, NamedCardEffectDescriptionView, NullableDistributionTokenKindView, NullableSeatView, PendingAbilityAspectChoiceView, PendingAbilityAttackChoiceView, PendingAbilityCardChoiceView, PendingAbilityFamily, PendingAbilityModeChoiceInputKind, PendingAbilityModeChoiceView, PendingAbilityNameChoiceView, PendingAbilityOrderAbilityView, PendingAbilityOrderChoiceView, PendingAbilityOrderGroupView, PendingAbilityView, PendingChoiceView, PendingDistributionView, PendingUndoRequest, PlayActionView, PlayCardSourceView, PlayCardZone, PlayerTargetPattern, PresenceFilter, PromptProvenanceView, PromptState, RejectedPlayView, RelationFilter, ResourceCardView, ResourcePaymentOptionView, Seat, SeatDirection, SeatOfferIntent, SeatState, SelectionScope, SeriesEndReason, SeriesGameRecord, SeriesResultView, SharedCounterState, SmuggleActionView, SmuggleKind, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TriggerWindowView, TwinSunsCounter, TwinSunsCountersView, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable */
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { HistoryIdentityInput, HistorySection, MatchRecoveryRequest, } from './common.js';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable */
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { AbilityTarget, AbilityWindow, ActionAbilitySource, ActionAbilityView, ActiveEffectDescriptionView, ActiveEffectView, AttachmentMode, AttackChoiceView, AttackTarget, AvailableAttackView, CaptureOptionsView, CaptureSelection, CapturedUnitView, CardArena, CardChoiceResourcePaymentOptionView, CardInstanceView, ConstructedFormat, CurrentAttackStateView, CurrentAttackView, DeckInput, DeckRegistrationView, DelayedEffectDescriptionView, DelayedEffectOrderChoiceView, DelayedEffectOrderOptionView, DelayedEffectTimingView, DelayedEffectView, DistributionAssignment, DistributionDamageKindView, DistributionItemView, DistributionTargetView, DistributionTokenKindView, DynamicPowerLimit, EffectCardScopeView, EffectDurationView, EffectResolutionDraftStepView, EffectResolutionDraftView, EffectRestrictionView, EffectSequenceOrder, EffectSequenceView, EffectSourceView, EffectTargetView, ExploitOptionsView, FormatSeatView, GameState, GameTimerActiveClockView, GameTimerReserveView, GameTimerStateView, HiddenCardChoiceMode, HiddenZoneKind, InitiativeChoiceReason, InitiativeState, InstructedAttackView, LeaderActionView, LeaderDeployActionView, LeaderDeployCostView, LeaderDeployMode, LeaderDeployThresholdBonus, LeaderStateView, LimitedEventView, LimitedSideboardPoolView, MatchAccessResponse, MatchEndReason, MatchFormat, MatchPhase, MatchRecoveryResponse, MatchResult, MatchSeriesView, MatchStatus, ModeChoiceView, NamedCardEffectDescriptionView, NullableDistributionTokenKindView, NullableSeatView, PendingAbilityAspectChoiceView, PendingAbilityAttackChoiceView, PendingAbilityCardChoiceView, PendingAbilityFamily, PendingAbilityModeChoiceInputKind, PendingAbilityModeChoiceView, PendingAbilityNameChoiceView, PendingAbilityOrderAbilityView, PendingAbilityOrderChoiceView, PendingAbilityOrderGroupView, PendingAbilityView, PendingChoiceView, PendingDistributionView, PendingUndoRequest, PlayActionView, PlayCardSourceView, PlayCardZone, PlayerTargetPattern, PresenceFilter, PromptProvenanceView, PromptState, RejectedPlayView, RelationFilter, ResourceCardView, ResourcePaymentOptionView, Seat, SeatDirection, SeatOfferIntent, SeatState, SelectionScope, SeriesEndReason, SeriesGameRecord, SeriesResultView, SharedCounterState, SmuggleActionView, SmuggleKind, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TriggerWindowView, TwinSunsCounter, TwinSunsCountersView, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable */
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { AbilityTarget, AbilityWindow, ActionAbilitySource, ActionAbilityView, ActiveEffectDescriptionView, ActiveEffectView, AttachmentMode, AttackChoiceView, AttackTarget, AvailableAttackView, CaptureOptionsView, CaptureSelection, CapturedUnitView, CardArena, CardChoiceResourcePaymentOptionView, CardDrawSource, CardInstanceView, ConstructedFormat, CurrentAttackStateView, CurrentAttackView, DeckInput, DeckPlacement, DeckRegistrationView, DelayedEffectDescriptionView, DelayedEffectOrderChoiceView, DelayedEffectOrderOptionView, DelayedEffectTimingView, DelayedEffectView, DistributionAssignment, DistributionDamageKindView, DistributionItemView, DistributionTargetView, DistributionTokenKindView, DynamicPowerLimit, EffectCardScopeView, EffectDurationView, EffectResolutionDraftStepView, EffectResolutionDraftView, EffectRestrictionView, EffectSequenceOrder, EffectSequenceView, EffectSourceView, EffectTargetView, ExploitOptionsView, FormatSeatView, GameEvent, GameState, GameTimerActiveClockView, GameTimerReserveView, GameTimerStateView, HiddenCardChoiceMode, HiddenZoneKind, InitiativeChoiceReason, InitiativeState, InstructedAttackView, LeaderActionView, LeaderDeployActionView, LeaderDeployCostView, LeaderDeployMode, LeaderDeployThresholdBonus, LeaderStateView, LimitedEventView, LimitedSideboardPoolView, MatchEndReason, MatchFormat, MatchHistoryReplayArchive, MatchPhase, MatchResult, MatchSeriesView, MatchStatus, ModeChoiceView, NamedCardEffectDescriptionView, NullableDistributionTokenKindView, NullableSeatView, PendingAbilityAspectChoiceView, PendingAbilityAttackChoiceView, PendingAbilityCardChoiceView, PendingAbilityFamily, PendingAbilityModeChoiceInputKind, PendingAbilityModeChoiceView, PendingAbilityNameChoiceView, PendingAbilityOrderAbilityView, PendingAbilityOrderChoiceView, PendingAbilityOrderGroupView, PendingAbilityView, PendingChoiceView, PendingDistributionView, PendingUndoRequest, PlayActionView, PlayCardSourceView, PlayCardZone, PlayerTargetPattern, PresenceFilter, PromptProvenanceView, PromptState, RejectedPlayView, RelationFilter, ResourceCardView, ResourcePaymentOptionView, Seat, SeatDirection, SeatOfferIntent, SeatState, SelectionScope, SeriesEndReason, SeriesGameRecord, SeriesResultView, SharedCounterState, SharedMatchHistoryReplayResponse, SmuggleActionView, SmuggleKind, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TriggerWindowView, TurnPassSource, TwinSunsCounter, TwinSunsCountersView, UndoCancelReason, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitDefeatCause, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable */
2
+ export {};
@@ -13,4 +13,4 @@
13
13
  *
14
14
  * @see https://simulator-sdk.my-swu.com/guide/versioning
15
15
  */
16
- export declare const schemaVersion: "ab26122fba623256a421399b458338eb67af059d2240ba7b1594c6116d6fc030";
16
+ export declare const schemaVersion: "e4a6c8c3043fdb5779d215ad8f673458da5a45bd6d196f0dbd5cc721aa189045";
@@ -13,4 +13,4 @@
13
13
  *
14
14
  * @see https://simulator-sdk.my-swu.com/guide/versioning
15
15
  */
16
- export const schemaVersion = "ab26122fba623256a421399b458338eb67af059d2240ba7b1594c6116d6fc030";
16
+ export const schemaVersion = "e4a6c8c3043fdb5779d215ad8f673458da5a45bd6d196f0dbd5cc721aa189045";
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export type { CloseTournamentRoomRequest, CreateTournamentRoomRequest, CreateTou
6
6
  export { canDeployAnyLeader, flattenTargetGroups, getDeployableLeaderIndices, getLeaderDeployCommands, isSingleTargetPlan, leaderDeployCommand, targetGroupsOf, } from './actionable.js';
7
7
  export type { TargetingActionView } from './actionable.js';
8
8
  export type { SimulatorClient, SimulatorClientOptions } from './client.js';
9
- export type { AbandonMatchRequest, AbandonMatchResponse, ApiErrorResponse, AiStatusPayload, CardsResponse, CardCatalogRefreshResponse, ClientMessage, CreateLimitedEventRequest, CreateMetaWindowRequest, CreateMatchRequest, ErrorPayload, FormatEventResponse, FormatEventRequest, GameCommand, GameEvent, GameState, GetMatchResponse, HealthResponse, JoinLimitedEventRequest, JoinMatchRequest, LeaveMatchRequest, LeaveMatchResponse, LimitedEventAccessResponse, LimitedEventCommandRequest, LimitedEventPreflightResponse, LimitedEventResponse, ListActiveAiMatchesRequest, ListActiveAiMatchesResponse, MatchAccessResponse, MatchChatLookupResponse, MatchConnectionRole, MatchHistoryDeckStatsRequest, MatchHistoryDeckStatsResponse, MatchHistoryListRequest, MatchHistoryListResponse, MatchHistoryReplayRequest, MatchHistoryReplayResponse, MatchHistoryRestoreRequest, RestoreHistoryResponse, MatchSavePayload, MatchSpectatorAccessResponse, MetaWindow, MetaWindowsResponse, ResolveCardIdsRequest, ResolveCardIdsResponse, RankedAdminStatus, RankedLeaderboardEntry, RankedLeaderboardQuery, RankedLeaderboardResponse, RankedMatchmakingView, RankedProfileRequest, RankedProfileResponse, RankedQueue, RematchMatchRequest, RematchMatchResponse, RestoreMatchSaveRequest, RestoreMatchSaveResponse, SaveMatchRequest, ServerMessage, SetAiPausedRequest, SetRankedAdmissionRequest, SetSimulatorMaintenanceRequest, SimulatorAdminStatusResponse, SimulatorAvailabilityResponse, SpectateMatchRequest, SubmitMatchDeckRequest, SubmitMatchDeckResponse, UndoMatchRequest, UndoMatchResponse, UndoRespondMatchRequest, WelcomePayload, } from './generated/index.js';
9
+ export type { AbandonMatchRequest, AbandonMatchResponse, ApiErrorResponse, AiStatusPayload, CardsResponse, CardCatalogRefreshResponse, ClientMessage, CreateLimitedEventRequest, CreateMetaWindowRequest, CreateMatchRequest, ErrorPayload, FormatEventResponse, FormatEventRequest, GameCommand, GameEvent, GameState, GetMatchResponse, HealthResponse, JoinLimitedEventRequest, JoinMatchRequest, LeaveMatchRequest, LeaveMatchResponse, LimitedEventAccessResponse, LimitedEventCommandRequest, LimitedEventPreflightResponse, LimitedEventResponse, ListActiveAiMatchesRequest, ListActiveAiMatchesResponse, MatchAccessResponse, MatchChatLookupResponse, MatchConnectionRole, MatchHistoryDeckStatsRequest, MatchHistoryDeckStatsResponse, MatchHistoryListRequest, MatchHistoryListResponse, MatchHistoryReplayRequest, MatchHistoryReplayResponse, MatchHistoryRestoreRequest, MatchRecoveryRequest, MatchRecoveryResponse, RestoreHistoryResponse, MatchSavePayload, MatchSpectatorAccessResponse, MetaWindow, MetaWindowsResponse, ResolveCardIdsRequest, ResolveCardIdsResponse, RankedAdminStatus, RankedLeaderboardEntry, RankedLeaderboardQuery, RankedLeaderboardResponse, RankedMatchmakingView, RankedProfileRequest, RankedProfileResponse, RankedQueue, RematchMatchRequest, RematchMatchResponse, RestoreMatchSaveRequest, RestoreMatchSaveResponse, SaveMatchRequest, ServerMessage, SetAiPausedRequest, SetRankedAdmissionRequest, SetSimulatorMaintenanceRequest, SimulatorAdminStatusResponse, SimulatorAvailabilityResponse, SpectateMatchRequest, SubmitMatchDeckRequest, SubmitMatchDeckResponse, UndoMatchRequest, UndoMatchResponse, UndoRespondMatchRequest, WelcomePayload, } from './generated/index.js';
10
10
  export type { UndoCancelReason } from './generated/types/game-event.js';
11
11
  export type { LimitedSideboardPoolView } from './generated/types/game-state.js';
12
12
  export type { HistoryIdentityInput, HistorySection, HistoryStatus, } from './generated/types/match-history-list-request.js';
@@ -27,11 +27,11 @@ export type { CardInteractionCue, CardInteractionCueKind, CardInteractionCueStat
27
27
  export type { CardIdResolution, CardMetadata, CardReferenceInput, CardReferenceType, DeckInput, DeckJson, DeckJsonCard, } from './resources/card-types.js';
28
28
  export type { CardsResource } from './resources/card-resource.js';
29
29
  export type { LimitedEventAccess, LimitedEventAccessInput, LimitedEventCommand, LimitedEventPreflight, LimitedEventReference, LimitedEventSnapshot, LimitedEventsResource, } from './resources/limited-events.js';
30
- export type { MatchHistoryResource, MatchHistoryReplayInput, MatchHistoryRestoreInput, } from './resources/match-history.js';
30
+ export type { MatchHistoryResource, MatchRecoveryInput, MatchHistoryReplayInput, MatchHistoryRestoreInput, } from './resources/match-history.js';
31
31
  export type { MatchAccess, MatchAccessInput, MatchConnectionAccessInput, MatchReference, MatchSpectatorAccess, MatchSpectatorAccessInput, MatchesResource, } from './resources/matches.js';
32
32
  export type { SessionResource } from './resources/session.js';
33
33
  export type { SystemResource } from './resources/system.js';
34
- export type { MatchSeat, MatchSession, MatchSessionAccess, MatchSessionAutoReconnectOptions, MatchSessionAutoReconnectPolicy, MatchSessionConnectOptions, MatchSessionEvents, MatchSessionHeartbeatOptions, MatchSessionHeartbeatPolicy, MatchSessionOptions, MatchSessionReconnectState, MatchSessionSnapshotPredicate, MatchSessionState, MatchSessionWaitOptions, } from './match-session.js';
34
+ export type { MatchSeat, MatchSession, MatchSessionAccess, MatchSessionAutoReconnectOptions, MatchSessionAutoReconnectPolicy, MatchSessionConnectOptions, MatchSessionEvents, MatchSessionHeartbeatOptions, MatchSessionHeartbeatPolicy, MatchSessionOptions, MatchSessionReconnectState, MatchSessionTerminalCause, MatchSessionSnapshotPredicate, MatchSessionState, MatchSessionWaitOptions, } from './match-session.js';
35
35
  export type { ConnectionState, PongPayload } from './session.js';
36
36
  export { createSchemaValidator, parseSchema } from './validators.js';
37
37
  export type { SchemaTypeMap } from './validators.js';
@@ -0,0 +1,5 @@
1
+ import type { MatchHistoryFeedEntry } from '../generated/types/server-message.js';
2
+ /**
3
+ * Replaces a re-delivered entry and retains only recent match history.
4
+ */
5
+ export declare function upsertMatchHistoryEntry(history: readonly MatchHistoryFeedEntry[], entry: MatchHistoryFeedEntry): MatchHistoryFeedEntry[];
@@ -0,0 +1,8 @@
1
+ import { DEFAULT_MATCH_HISTORY_LIMIT } from './limits.js';
2
+ /**
3
+ * Replaces a re-delivered entry and retains only recent match history.
4
+ */
5
+ export function upsertMatchHistoryEntry(history, entry) {
6
+ const withoutDuplicate = history.filter(existing => existing.id !== entry.id);
7
+ return [...withoutDuplicate, entry].slice(-DEFAULT_MATCH_HISTORY_LIMIT);
8
+ }
@@ -19,6 +19,8 @@ export interface LocalAiTick {
19
19
  export interface LocalEngineMatch {
20
20
  matchId: string;
21
21
  seatToken: string;
22
+ /** Current private `MatchAccessResponse` JSON for this viewer. */
23
+ access: () => string;
22
24
  /** `ServerMessage[]` handshake for a fresh connection. */
23
25
  connect: () => unknown[];
24
26
  /** Applies one `ClientMessage` JSON string; returns ordered batches. */
@@ -92,6 +92,16 @@ export function routeHttpRequest(engine, registry, method, path, body, nowMs) {
92
92
  if (segments.length === 3 && method === 'GET') {
93
93
  return { status: 200, body: JSON.stringify({ snapshot: JSON.parse(match.snapshot()) }) };
94
94
  }
95
+ if (segments[3] === 'access' && method === 'POST') {
96
+ if (body == null) {
97
+ return jsonError(400, 'invalidRequest', 'missing access request body');
98
+ }
99
+ const request = JSON.parse(body);
100
+ if (request.seatToken !== match.seatToken) {
101
+ return jsonError(403, 'invalidSeatToken', 'invalid seat token');
102
+ }
103
+ return { status: 200, body: match.access() };
104
+ }
95
105
  if (segments[3] === 'ai' && segments[4] === 'pause' && method === 'POST') {
96
106
  if (body == null) {
97
107
  return jsonError(400, 'invalidRequest', 'missing pause request body');
@@ -45,6 +45,7 @@ interface WasmCreatedLocalMatch {
45
45
  accessJson: () => string;
46
46
  }
47
47
  interface WasmLocalMatch {
48
+ access: () => string;
48
49
  connect: () => string;
49
50
  handleMessage: (seatToken: string, messageJson: string, nowMs: number) => string;
50
51
  aiHasWork: () => boolean;
@@ -12,6 +12,7 @@ function wrapMatch(inner) {
12
12
  return {
13
13
  matchId: inner.matchId(),
14
14
  seatToken,
15
+ access: () => inner.access(),
15
16
  connect: () => JSON.parse(inner.connect()),
16
17
  handleMessage: (token, messageJson, nowMs) => JSON.parse(inner.handleMessage(token, messageJson, nowMs)),
17
18
  aiHasWork: () => inner.aiHasWork(),
@@ -37,6 +37,7 @@ export declare class MatchSessionController implements MatchSession {
37
37
  get errorMessages(): readonly string[];
38
38
  get matchId(): string | undefined;
39
39
  get reconnectState(): MatchSessionReconnectState;
40
+ get snapshotRevision(): number;
40
41
  get snapshot(): GameState | undefined;
41
42
  get seat(): MatchSeat | undefined;
42
43
  get state(): MatchSessionState;
@@ -47,6 +48,7 @@ export declare class MatchSessionController implements MatchSession {
47
48
  spectateMatch(match: string | MatchReference, request: SpectateMatchRequest, options?: MatchSessionConnectOptions): Promise<MatchSpectatorAccess>;
48
49
  close(): void;
49
50
  reconnect(options?: MatchSessionConnectOptions): Promise<MatchSession>;
51
+ recoverNow(): void;
50
52
  ready(): void;
51
53
  undo(): void;
52
54
  respondUndo(approve: boolean): void;