@my-swu/simulator-client 0.1.1 → 0.1.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 +1 -1
- package/dist/connection.js +2 -3
- package/dist/generated/index.d.ts +10 -0
- package/dist/generated/schemas.d.ts +1 -1
- package/dist/generated/schemas.js +659 -103
- package/dist/generated/types/admin-match-debug-bundle.d.ts +1 -0
- package/dist/generated/types/admin-match-debug-bundle.js +2 -0
- package/dist/generated/types/admin-match-list-response.d.ts +1 -0
- package/dist/generated/types/admin-match-list-response.js +2 -0
- package/dist/generated/types/admin-match-replay-response.d.ts +1 -0
- package/dist/generated/types/admin-match-replay-response.js +2 -0
- package/dist/generated/types/common.d.ts +182 -15
- package/dist/generated/types/create-match-history-replay-share-request.d.ts +1 -0
- package/dist/generated/types/create-match-history-replay-share-request.js +2 -0
- package/dist/generated/types/create-match-history-replay-share-response.d.ts +1 -0
- package/dist/generated/types/create-match-history-replay-share-response.js +2 -0
- package/dist/generated/types/format-event-response.d.ts +1 -1
- package/dist/generated/types/game-state.d.ts +1 -1
- package/dist/generated/types/get-match-response.d.ts +1 -1
- package/dist/generated/types/inactive-match-recovery-request.d.ts +1 -0
- package/dist/generated/types/inactive-match-recovery-request.js +2 -0
- package/dist/generated/types/inactive-match-recovery-response.d.ts +1 -0
- package/dist/generated/types/inactive-match-recovery-response.js +2 -0
- package/dist/generated/types/list-active-ai-matches-response.d.ts +1 -1
- package/dist/generated/types/lobby-access-response.d.ts +1 -1
- package/dist/generated/types/lobby-server-message.d.ts +1 -1
- package/dist/generated/types/match-access-recovery-request.d.ts +1 -0
- package/dist/generated/types/match-access-recovery-request.js +2 -0
- package/dist/generated/types/match-access-recovery-response.d.ts +1 -0
- package/dist/generated/types/match-access-recovery-response.js +2 -0
- package/dist/generated/types/match-access-response.d.ts +1 -1
- package/dist/generated/types/match-history-replay-response.d.ts +1 -1
- package/dist/generated/types/match-recovery-request.d.ts +1 -0
- package/dist/generated/types/match-recovery-request.js +2 -0
- package/dist/generated/types/match-recovery-response.d.ts +1 -0
- package/dist/generated/types/match-recovery-response.js +2 -0
- package/dist/generated/types/match-spectator-access-response.d.ts +1 -1
- package/dist/generated/types/rematch-match-response.d.ts +1 -1
- package/dist/generated/types/restore-history-response.d.ts +1 -1
- package/dist/generated/types/restore-match-save-response.d.ts +1 -1
- package/dist/generated/types/server-message.d.ts +1 -1
- package/dist/generated/types/shared-match-history-replay-response.d.ts +1 -0
- package/dist/generated/types/shared-match-history-replay-response.js +2 -0
- package/dist/generated/types/submit-match-deck-response.d.ts +1 -1
- package/dist/generated/types/tournament-room-access-response.d.ts +1 -1
- package/dist/generated/types/tournament-room-server-message.d.ts +1 -1
- package/dist/generated/types/undo-match-response.d.ts +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/internal/match-history.d.ts +5 -0
- package/dist/internal/match-history.js +8 -0
- package/dist/local/engine.d.ts +2 -0
- package/dist/local/server/http-router.js +10 -0
- package/dist/local/wasm-engine.d.ts +2 -0
- package/dist/local/wasm-engine.js +1 -0
- package/dist/local/worker-boot.d.ts +2 -0
- package/dist/local/worker-boot.js +1 -0
- package/dist/match-session/controller.d.ts +1 -0
- package/dist/match-session/controller.js +107 -18
- package/dist/match-session/heartbeat.d.ts +33 -0
- package/dist/match-session/heartbeat.js +70 -0
- package/dist/match-session/methods.d.ts +8 -0
- package/dist/match-session/session-state.d.ts +19 -1
- package/dist/match-session/types.d.ts +1 -1
- package/dist/match-session.d.ts +1 -1
- package/dist/resources/admin.d.ts +14 -1
- package/dist/resources/admin.js +21 -0
- package/dist/resources/lobby-types.d.ts +4 -4
- package/dist/resources/match-history.d.ts +14 -1
- package/dist/resources/match-history.js +16 -0
- package/dist/resources/match-types.d.ts +11 -2
- package/dist/resources/matches.js +10 -0
- package/dist/validators.d.ts +11 -1
- package/package.json +1 -1
- package/schema/add-lobby-ai-player-request.schema.json +7 -0
- package/schema/admin-match-debug-bundle.schema.json +48 -0
- package/schema/admin-match-list-response.schema.json +23 -0
- package/schema/admin-match-replay-response.schema.json +14 -0
- package/schema/common.schema.json +295 -27
- package/schema/create-limited-event-request.schema.json +2 -4
- package/schema/create-lobby-request.schema.json +4 -8
- package/schema/create-match-history-replay-share-request.schema.json +22 -0
- package/schema/create-match-history-replay-share-response.schema.json +15 -0
- package/schema/create-match-request.schema.json +2 -3
- package/schema/create-tournament-room-request.schema.json +4 -8
- package/schema/game-command.schema.json +22 -0
- package/schema/game-event.schema.json +8 -0
- package/schema/limited-event-preflight-response.schema.json +1 -3
- package/schema/manifest.json +11 -1
- package/schema/match-access-recovery-request.schema.json +17 -0
- package/schema/match-access-recovery-response.schema.json +36 -0
- package/schema/match-access-response.schema.json +1 -3
- package/schema/match-history-entry.schema.json +1 -3
- package/schema/match-recovery-request.schema.json +33 -0
- package/schema/match-recovery-response.schema.json +36 -0
- package/schema/route-manifest.json +92 -0
- package/schema/shared-match-history-replay-response.schema.json +14 -0
|
@@ -1 +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, 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, 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, RestoreHistoryResponse, 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';
|
|
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, 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, RestoreHistoryResponse, 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';
|
|
@@ -1 +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, 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, 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, RestoreMatchSaveResponse, 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';
|
|
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, 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, RestoreMatchSaveResponse, 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';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { AbilityTarget, AbilityWindow, ActionAbilitySource, ActionAbilityView, ActiveEffectDescriptionView, ActiveEffectView, AiSeatStatusPayload, AiStatusPayload, AiTrilogyFormatMode, AttachmentMode, AttackChoiceView, AttackTarget, AvailableAttackView, CaptureOptionsView, CaptureSelection, CapturedUnitView, CardArena, CardChoiceResourcePaymentOptionView, CardDrawSource, CardInstanceView, CardInteractionCue, CardInteractionCueKind, CardInteractionCueState, CardInteractionDragOffset, ConstructedFormat, CurrentAttackStateView, CurrentAttackView, DeckInput, DeckPlacement, DeckRegistrationView, DelayedEffectDescriptionView, DelayedEffectTimingView, DelayedEffectView, DistributionAssignment, DistributionDamageKindView, DistributionItemView, DistributionTargetView, DistributionTokenKindView, DynamicPowerLimit, EffectCardScopeView, EffectDurationView, EffectResolutionDraftStepView, EffectResolutionDraftView, EffectRestrictionView, EffectSequenceOrder, EffectSequenceView, EffectSourceView, EffectTargetView, ErrorPayload, ExploitOptionsView, FormatSeatView, GameEvent, GameState, GameTimerActiveClockView, GameTimerReserveView, GameTimerStateView, HiddenCardChoiceMode, HiddenZoneKind, InitiativeChoiceReason, InitiativeState, InstructedAttackView, LeaderActionView, LeaderDeployActionView, LeaderDeployCostView, LeaderDeployMode, LeaderDeployThresholdBonus, LeaderStateView, LimitedEventView, LimitedSideboardPoolView, MatchChatMessage, MatchConnectionRole, MatchEndReason, MatchFormat, MatchHistoryFeedEntry, MatchHistoryFeedEntry1, MatchHistorySnapshot, MatchPhase, MatchQuickPhrase, MatchResult, MatchSeriesView, MatchStatus, ModeChoiceView, NamedCardEffectDescriptionView, NullableDistributionTokenKindView, NullableSeatView, PendingAbilityAspectChoiceView, PendingAbilityAttackChoiceView, PendingAbilityCardChoiceView, PendingAbilityFamily, PendingAbilityModeChoiceInputKind, PendingAbilityModeChoiceView, PendingAbilityNameChoiceView, PendingAbilityOrderAbilityView, PendingAbilityOrderChoiceView, PendingAbilityOrderGroupView, PendingAbilityView, PendingChoiceView, PendingDistributionView, PendingUndoRequest, PlayActionView, PlayCardSourceView, PlayCardZone, PlayerPresenceStatus, PlayerTargetPattern, PresenceFilter, PromptProvenanceView, PromptState, RejectedPlayView, RelationFilter, ResourceCardView, ResourcePaymentOptionView, Seat, SeatDirection, SeatOfferIntent, SeatState, SelectionScope, SeriesEndReason, SeriesGameRecord, SeriesResultView, ServerMessage, SharedCounterState, SmuggleActionView, SmuggleKind, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TriggerWindowView, TurnPassSource, TwinSunsCounter, TwinSunsCountersView, UndoCancelReason, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitDefeatCause, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, WelcomePayload, } from './common.js';
|
|
1
|
+
export type { AbilityTarget, AbilityWindow, ActionAbilitySource, ActionAbilityView, ActiveEffectDescriptionView, ActiveEffectView, AiSeatStatusPayload, AiStatusPayload, AiTrilogyFormatMode, AttachmentMode, AttackChoiceView, AttackTarget, AvailableAttackView, CaptureOptionsView, CaptureSelection, CapturedUnitView, CardArena, CardChoiceResourcePaymentOptionView, CardDrawSource, CardInstanceView, CardInteractionCue, CardInteractionCueKind, CardInteractionCueState, CardInteractionDragOffset, 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, ErrorPayload, ExploitOptionsView, FormatSeatView, GameEvent, GameState, GameTimerActiveClockView, GameTimerReserveView, GameTimerStateView, HiddenCardChoiceMode, HiddenZoneKind, InitiativeChoiceReason, InitiativeState, InstructedAttackView, LeaderActionView, LeaderDeployActionView, LeaderDeployCostView, LeaderDeployMode, LeaderDeployThresholdBonus, LeaderStateView, LimitedEventView, LimitedSideboardPoolView, MatchChatMessage, MatchConnectionRole, MatchEndReason, MatchFormat, MatchHistoryFeedEntry, MatchHistoryFeedEntry1, MatchHistorySnapshot, MatchPhase, MatchQuickPhrase, MatchResult, MatchSeriesView, MatchStatus, ModeChoiceView, NamedCardEffectDescriptionView, NullableDistributionTokenKindView, NullableSeatView, PendingAbilityAspectChoiceView, PendingAbilityAttackChoiceView, PendingAbilityCardChoiceView, PendingAbilityFamily, PendingAbilityModeChoiceInputKind, PendingAbilityModeChoiceView, PendingAbilityNameChoiceView, PendingAbilityOrderAbilityView, PendingAbilityOrderChoiceView, PendingAbilityOrderGroupView, PendingAbilityView, PendingChoiceView, PendingDistributionView, PendingUndoRequest, PlayActionView, PlayCardSourceView, PlayCardZone, PlayerPresenceStatus, PlayerTargetPattern, PresenceFilter, PromptProvenanceView, PromptState, RejectedPlayView, RelationFilter, ResourceCardView, ResourcePaymentOptionView, Seat, SeatDirection, SeatOfferIntent, SeatState, SelectionScope, SeriesEndReason, SeriesGameRecord, SeriesResultView, ServerMessage, SharedCounterState, SmuggleActionView, SmuggleKind, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TriggerWindowView, TurnPassSource, TwinSunsCounter, TwinSunsCountersView, UndoCancelReason, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitDefeatCause, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, WelcomePayload, } from './common.js';
|
|
@@ -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';
|
|
@@ -1 +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, 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, 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, SubmitMatchDeckResponse, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TriggerWindowView, TwinSunsCounter, TwinSunsCountersView, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
|
|
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, 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, SubmitMatchDeckResponse, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TriggerWindowView, TwinSunsCounter, TwinSunsCountersView, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
|
|
@@ -1 +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, DelayedEffectTimingView, DelayedEffectView, DistributionAssignment, DistributionDamageKindView, DistributionItemView, DistributionTargetView, DistributionTokenKindView, DraftRoundConfig, 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, LimitedCardSlot, LimitedCardTreatment, LimitedDeckSourceView, LimitedEventAccessResponse, LimitedEventKind, LimitedEventPhaseView, LimitedEventSeatView, LimitedEventSnapshot, LimitedEventView, LimitedEventViewerView, LimitedPackCardView, LimitedSideboardPoolView, LobbyChatMessage, LobbyDeckPreview, LobbyDeckSetPreview, LobbyVisibility, 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, PlayerPresenceStatus, PlayerTargetPattern, PresenceFilter, PromptProvenanceView, PromptState, RejectedPlayView, RelationFilter, ResourceCardView, ResourcePaymentOptionView, RoomPlayerPresenceEvent, Seat, SeatDirection, SeatOfferIntent, SeatState, SelectionScope, SeriesEndReason, SeriesGameRecord, SeriesResultView, SharedCounterState, SmuggleActionView, SmuggleKind, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TournamentRoomAccessResponse, TournamentRoomPlayerView, TournamentRoomPrivateView, TournamentRoomSnapshot, TournamentRoomStatus, TournamentTableStatus, TournamentTableView, TriggerWindowView, TwinSunsCounter, TwinSunsCountersView, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
|
|
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, DraftRoundConfig, 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, LimitedCardSlot, LimitedCardTreatment, LimitedDeckSourceView, LimitedEventAccessResponse, LimitedEventKind, LimitedEventPhaseView, LimitedEventSeatView, LimitedEventSnapshot, LimitedEventView, LimitedEventViewerView, LimitedPackCardView, LimitedSideboardPoolView, LobbyChatMessage, LobbyDeckPreview, LobbyDeckSetPreview, LobbyVisibility, 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, PlayerPresenceStatus, PlayerTargetPattern, PresenceFilter, PromptProvenanceView, PromptState, RejectedPlayView, RelationFilter, ResourceCardView, ResourcePaymentOptionView, RoomPlayerPresenceEvent, Seat, SeatDirection, SeatOfferIntent, SeatState, SelectionScope, SeriesEndReason, SeriesGameRecord, SeriesResultView, SharedCounterState, SmuggleActionView, SmuggleKind, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TournamentRoomAccessResponse, TournamentRoomPlayerView, TournamentRoomPrivateView, TournamentRoomSnapshot, TournamentRoomStatus, TournamentTableStatus, TournamentTableView, TriggerWindowView, TwinSunsCounter, TwinSunsCountersView, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
|
|
@@ -1 +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, DelayedEffectTimingView, DelayedEffectView, DistributionAssignment, DistributionDamageKindView, DistributionItemView, DistributionTargetView, DistributionTokenKindView, DraftRoundConfig, DynamicPowerLimit, EffectCardScopeView, EffectDurationView, EffectResolutionDraftStepView, EffectResolutionDraftView, EffectRestrictionView, EffectSequenceOrder, EffectSequenceView, EffectSourceView, EffectTargetView, ErrorPayload, ExploitOptionsView, FormatSeatView, GameState, GameTimerActiveClockView, GameTimerReserveView, GameTimerStateView, HiddenCardChoiceMode, HiddenZoneKind, InitiativeChoiceReason, InitiativeState, InstructedAttackView, LeaderActionView, LeaderDeployActionView, LeaderDeployCostView, LeaderDeployMode, LeaderDeployThresholdBonus, LeaderStateView, LimitedCardSlot, LimitedCardTreatment, LimitedDeckSourceView, LimitedEventKind, LimitedEventPhaseView, LimitedEventSeatView, LimitedEventSnapshot, LimitedEventView, LimitedEventViewerView, LimitedPackCardView, LimitedSideboardPoolView, LobbyChatMessage, LobbyDeckPreview, LobbyDeckSetPreview, LobbyVisibility, 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, PlayerPresenceStatus, PlayerTargetPattern, PresenceFilter, PromptProvenanceView, PromptState, RejectedPlayView, RelationFilter, ResourceCardView, ResourcePaymentOptionView, RoomPlayerPresenceEvent, Seat, SeatDirection, SeatOfferIntent, SeatState, SelectionScope, SeriesEndReason, SeriesGameRecord, SeriesResultView, SharedCounterState, SmuggleActionView, SmuggleKind, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TournamentRoomMatchReadyPayload, TournamentRoomPlayerView, TournamentRoomServerMessage, TournamentRoomSnapshot, TournamentRoomStatus, TournamentRoomWelcomePayload, TournamentTableStatus, TournamentTableView, TriggerWindowView, TwinSunsCounter, TwinSunsCountersView, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
|
|
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, DraftRoundConfig, DynamicPowerLimit, EffectCardScopeView, EffectDurationView, EffectResolutionDraftStepView, EffectResolutionDraftView, EffectRestrictionView, EffectSequenceOrder, EffectSequenceView, EffectSourceView, EffectTargetView, ErrorPayload, ExploitOptionsView, FormatSeatView, GameState, GameTimerActiveClockView, GameTimerReserveView, GameTimerStateView, HiddenCardChoiceMode, HiddenZoneKind, InitiativeChoiceReason, InitiativeState, InstructedAttackView, LeaderActionView, LeaderDeployActionView, LeaderDeployCostView, LeaderDeployMode, LeaderDeployThresholdBonus, LeaderStateView, LimitedCardSlot, LimitedCardTreatment, LimitedDeckSourceView, LimitedEventKind, LimitedEventPhaseView, LimitedEventSeatView, LimitedEventSnapshot, LimitedEventView, LimitedEventViewerView, LimitedPackCardView, LimitedSideboardPoolView, LobbyChatMessage, LobbyDeckPreview, LobbyDeckSetPreview, LobbyVisibility, 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, PlayerPresenceStatus, PlayerTargetPattern, PresenceFilter, PromptProvenanceView, PromptState, RejectedPlayView, RelationFilter, ResourceCardView, ResourcePaymentOptionView, RoomPlayerPresenceEvent, Seat, SeatDirection, SeatOfferIntent, SeatState, SelectionScope, SeriesEndReason, SeriesGameRecord, SeriesResultView, SharedCounterState, SmuggleActionView, SmuggleKind, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TournamentRoomMatchReadyPayload, TournamentRoomPlayerView, TournamentRoomServerMessage, TournamentRoomSnapshot, TournamentRoomStatus, TournamentRoomWelcomePayload, TournamentTableStatus, TournamentTableView, TriggerWindowView, TwinSunsCounter, TwinSunsCountersView, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
|
|
@@ -1 +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, 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, 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, UndoMatchResponse, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
|
|
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, 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, UndoMatchResponse, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @see https://simulator-sdk.my-swu.com/guide/versioning
|
|
15
15
|
*/
|
|
16
|
-
export declare const schemaVersion: "
|
|
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 = "
|
|
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, 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
|
+
}
|
package/dist/local/engine.d.ts
CHANGED
|
@@ -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');
|
|
@@ -9,6 +9,7 @@ import type { LocalSimulatorEngine } from './engine.js';
|
|
|
9
9
|
export interface SwuWasmModule {
|
|
10
10
|
install_card_catalog: (bytes: Uint8Array) => void;
|
|
11
11
|
apply_catalog_sync: (catalogSyncJson: string) => void;
|
|
12
|
+
setLocalAiSearchTimeUnlimited: (enabled: boolean) => void;
|
|
12
13
|
cards_get: (idsJson: string) => string;
|
|
13
14
|
limited_events_preflight: (requestJson: string) => string;
|
|
14
15
|
offline_difficulties: () => string;
|
|
@@ -44,6 +45,7 @@ interface WasmCreatedLocalMatch {
|
|
|
44
45
|
accessJson: () => string;
|
|
45
46
|
}
|
|
46
47
|
interface WasmLocalMatch {
|
|
48
|
+
access: () => string;
|
|
47
49
|
connect: () => string;
|
|
48
50
|
handleMessage: (seatToken: string, messageJson: string, nowMs: number) => string;
|
|
49
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(),
|
|
@@ -10,6 +10,8 @@ import type { WorkerLike } from './protocol.js';
|
|
|
10
10
|
export interface LocalEngineWorkerBootOptions {
|
|
11
11
|
/** The worker global scope. */
|
|
12
12
|
port: WorkerLike;
|
|
13
|
+
/** Removes the MCTS wall-clock deadline for development workers only. */
|
|
14
|
+
localAiSearchTimeUnlimited?: boolean;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* Attaches the buffering listener and boots the engine on the `init` frame.
|
|
@@ -28,6 +28,7 @@ export function bootLocalEngineWorker(options) {
|
|
|
28
28
|
})
|
|
29
29
|
.then((wasmModule) => {
|
|
30
30
|
scope.removeEventListener('message', bufferListener);
|
|
31
|
+
wasmModule.setLocalAiSearchTimeUnlimited(options.localAiSearchTimeUnlimited === true);
|
|
31
32
|
createLocalEngineServer({ engine: createWasmEngine(wasmModule), port });
|
|
32
33
|
for (const bufferedEvent of buffered.splice(0)) {
|
|
33
34
|
scope.dispatchEvent(new MessageEvent('message', { data: bufferedEvent.data }));
|
|
@@ -47,6 +47,7 @@ export declare class MatchSessionController implements MatchSession {
|
|
|
47
47
|
spectateMatch(match: string | MatchReference, request: SpectateMatchRequest, options?: MatchSessionConnectOptions): Promise<MatchSpectatorAccess>;
|
|
48
48
|
close(): void;
|
|
49
49
|
reconnect(options?: MatchSessionConnectOptions): Promise<MatchSession>;
|
|
50
|
+
recoverNow(): void;
|
|
50
51
|
ready(): void;
|
|
51
52
|
undo(): void;
|
|
52
53
|
respondUndo(approve: boolean): void;
|
|
@@ -2,7 +2,9 @@ import { MatchConnection } from '../connection.js';
|
|
|
2
2
|
import { TypedEmitter } from '../internal/emitter.js';
|
|
3
3
|
import { formatErrorMessages } from '../internal/errors.js';
|
|
4
4
|
import { DEFAULT_ERROR_HISTORY_LIMIT, DEFAULT_MATCH_HISTORY_LIMIT } from '../internal/limits.js';
|
|
5
|
+
import { upsertMatchHistoryEntry } from '../internal/match-history.js';
|
|
5
6
|
import { nonNegativeNumber, normalizeReconnectBackoff, reconnectDelayMs, } from '../internal/reconnect-backoff.js';
|
|
7
|
+
import { createMatchSessionHeartbeat } from './heartbeat.js';
|
|
6
8
|
import { hasAccessSnapshot, matchReferenceFrom } from './access.js';
|
|
7
9
|
import { errorPayloadFromUnknown } from './errors.js';
|
|
8
10
|
const DEFAULT_EVENT_HISTORY_LIMIT = 50;
|
|
@@ -10,6 +12,8 @@ const DEFAULT_RECONNECT_INITIAL_DELAY_MS = 250;
|
|
|
10
12
|
const DEFAULT_RECONNECT_MAX_DELAY_MS = 5_000;
|
|
11
13
|
const DEFAULT_RECONNECT_MAX_RETRIES = 5;
|
|
12
14
|
const DEFAULT_RECONNECT_BACKOFF_FACTOR = 2;
|
|
15
|
+
const DEFAULT_HEARTBEAT_INTERVAL_MS = 10_000;
|
|
16
|
+
const DEFAULT_HEARTBEAT_TIMEOUT_MS = 10_000;
|
|
13
17
|
/** SDK-owned live match session implementation. */
|
|
14
18
|
export class MatchSessionController {
|
|
15
19
|
/**
|
|
@@ -26,6 +30,7 @@ export class MatchSessionController {
|
|
|
26
30
|
#matches;
|
|
27
31
|
#openConnection;
|
|
28
32
|
#autoReconnect;
|
|
33
|
+
#heartbeat;
|
|
29
34
|
#access;
|
|
30
35
|
#connection;
|
|
31
36
|
#connectionState = 'idle';
|
|
@@ -50,6 +55,13 @@ export class MatchSessionController {
|
|
|
50
55
|
...(options.options?.handshakeTimeoutMs == null ? {} : { handshakeTimeoutMs: options.options.handshakeTimeoutMs }),
|
|
51
56
|
};
|
|
52
57
|
this.#autoReconnect = normalizeAutoReconnect(options.options?.autoReconnect);
|
|
58
|
+
if (this.#autoReconnect.heartbeat != null) {
|
|
59
|
+
this.#heartbeat = createMatchSessionHeartbeat({
|
|
60
|
+
config: this.#autoReconnect.heartbeat,
|
|
61
|
+
sendPing: nonce => this.#heartbeatPing(nonce),
|
|
62
|
+
onTimeout: () => this.#heartbeatTimedOut(),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
53
65
|
this.#maxEventHistory = options.options?.maxEventHistory ?? DEFAULT_EVENT_HISTORY_LIMIT;
|
|
54
66
|
this.#maxErrorHistory = options.options?.maxErrorHistory ?? DEFAULT_ERROR_HISTORY_LIMIT;
|
|
55
67
|
if (options.access != null) {
|
|
@@ -196,6 +208,21 @@ export class MatchSessionController {
|
|
|
196
208
|
reconnect(options = {}) {
|
|
197
209
|
return this.connect(undefined, options);
|
|
198
210
|
}
|
|
211
|
+
recoverNow() {
|
|
212
|
+
if (this.#manualClose || !this.#autoReconnect.enabled || this.#access == null) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
this.#reconnectGeneration += 1;
|
|
216
|
+
if (this.#reconnectTimer != null) {
|
|
217
|
+
clearTimeout(this.#reconnectTimer);
|
|
218
|
+
this.#reconnectTimer = undefined;
|
|
219
|
+
}
|
|
220
|
+
// Detach before close so this intentional foreground replacement cannot
|
|
221
|
+
// schedule a duplicate close-driven retry.
|
|
222
|
+
this.#closeActiveConnection();
|
|
223
|
+
this.#setConnectionState('closed');
|
|
224
|
+
void this.#runAutoReconnectAttempt(1, this.#reconnectGeneration);
|
|
225
|
+
}
|
|
199
226
|
ready() {
|
|
200
227
|
this.#activeConnection().ready();
|
|
201
228
|
}
|
|
@@ -258,7 +285,10 @@ export class MatchSessionController {
|
|
|
258
285
|
connection.on('aiStatus', status => this.#setAiStatus(status)),
|
|
259
286
|
connection.on('error', error => this.#recordError(error)),
|
|
260
287
|
connection.on('message', message => this.#emitter.emit('message', message)),
|
|
261
|
-
connection.on('pong', pong =>
|
|
288
|
+
connection.on('pong', pong => {
|
|
289
|
+
this.#heartbeat?.acknowledge(pong.nonce);
|
|
290
|
+
this.#emitter.emit('pong', pong);
|
|
291
|
+
}),
|
|
262
292
|
];
|
|
263
293
|
}
|
|
264
294
|
#detachActiveConnection() {
|
|
@@ -273,6 +303,21 @@ export class MatchSessionController {
|
|
|
273
303
|
this.#connection = undefined;
|
|
274
304
|
activeConnection?.close();
|
|
275
305
|
}
|
|
306
|
+
/** Send one watchdog ping through the current live raw connection. */
|
|
307
|
+
#heartbeatPing(nonce) {
|
|
308
|
+
const connection = this.#connection;
|
|
309
|
+
if (connection == null || connection.connectionState !== 'open') {
|
|
310
|
+
throw new Error('match connection is not open');
|
|
311
|
+
}
|
|
312
|
+
connection.ping(nonce);
|
|
313
|
+
}
|
|
314
|
+
/** Close a silent socket so its existing abnormal-close recovery takes over. */
|
|
315
|
+
#heartbeatTimedOut() {
|
|
316
|
+
if (this.#connectionState !== 'open') {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
this.#connection?.close();
|
|
320
|
+
}
|
|
276
321
|
#cancelAutoReconnect() {
|
|
277
322
|
this.#reconnectGeneration += 1;
|
|
278
323
|
if (this.#reconnectTimer != null) {
|
|
@@ -304,8 +349,7 @@ export class MatchSessionController {
|
|
|
304
349
|
this.#emitChange();
|
|
305
350
|
}
|
|
306
351
|
#recordHistoryEntry(entry) {
|
|
307
|
-
|
|
308
|
-
this.#history = [...withoutDuplicate, entry].slice(-DEFAULT_MATCH_HISTORY_LIMIT);
|
|
352
|
+
this.#history = upsertMatchHistoryEntry(this.#history, entry);
|
|
309
353
|
this.#emitter.emit('historyEntry', entry);
|
|
310
354
|
this.#emitChange();
|
|
311
355
|
}
|
|
@@ -339,15 +383,18 @@ export class MatchSessionController {
|
|
|
339
383
|
}
|
|
340
384
|
#scheduleAutoReconnect(attempt, generation) {
|
|
341
385
|
if (attempt > this.#autoReconnect.maxRetries) {
|
|
386
|
+
const error = {
|
|
387
|
+
code: 'sdk_session_error',
|
|
388
|
+
message: 'automatic reconnect exhausted',
|
|
389
|
+
};
|
|
342
390
|
this.#setReconnectState({
|
|
343
|
-
phase: '
|
|
391
|
+
phase: 'terminal',
|
|
344
392
|
attempts: this.#autoReconnect.maxRetries,
|
|
345
393
|
maxAttempts: this.#autoReconnect.maxRetries,
|
|
394
|
+
cause: 'retriesExhausted',
|
|
395
|
+
error,
|
|
346
396
|
});
|
|
347
|
-
this.#recordError(
|
|
348
|
-
code: 'sdk_session_error',
|
|
349
|
-
message: 'automatic reconnect exhausted',
|
|
350
|
-
});
|
|
397
|
+
this.#recordError(error);
|
|
351
398
|
return;
|
|
352
399
|
}
|
|
353
400
|
const delayMs = reconnectDelayMs(this.#autoReconnect, attempt);
|
|
@@ -389,17 +436,23 @@ export class MatchSessionController {
|
|
|
389
436
|
if (generation !== this.#reconnectGeneration || this.#manualClose) {
|
|
390
437
|
return;
|
|
391
438
|
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
439
|
+
const payload = errorPayloadFromUnknown(error);
|
|
440
|
+
const cause = terminalCauseForError(payload);
|
|
441
|
+
if (cause != null || attempt >= this.#autoReconnect.maxRetries) {
|
|
442
|
+
const terminalError = cause == null
|
|
443
|
+
? {
|
|
444
|
+
code: 'sdk_session_error',
|
|
445
|
+
message: 'automatic reconnect exhausted',
|
|
446
|
+
}
|
|
447
|
+
: payload;
|
|
398
448
|
this.#setReconnectState({
|
|
399
|
-
phase: '
|
|
449
|
+
phase: 'terminal',
|
|
400
450
|
attempts: attempt,
|
|
401
451
|
maxAttempts: this.#autoReconnect.maxRetries,
|
|
452
|
+
cause: cause ?? 'retriesExhausted',
|
|
453
|
+
error: terminalError,
|
|
402
454
|
});
|
|
455
|
+
this.#recordError(terminalError);
|
|
403
456
|
this.#setConnectionState('closed');
|
|
404
457
|
return;
|
|
405
458
|
}
|
|
@@ -431,6 +484,12 @@ export class MatchSessionController {
|
|
|
431
484
|
return;
|
|
432
485
|
}
|
|
433
486
|
this.#connectionState = state;
|
|
487
|
+
if (state === 'open') {
|
|
488
|
+
this.#heartbeat?.start();
|
|
489
|
+
}
|
|
490
|
+
else {
|
|
491
|
+
this.#heartbeat?.stop();
|
|
492
|
+
}
|
|
434
493
|
this.#emitter.emit('connectionState', state);
|
|
435
494
|
this.#emitChange();
|
|
436
495
|
}
|
|
@@ -487,9 +546,24 @@ function normalizeAutoReconnect(options) {
|
|
|
487
546
|
const optionPolicy = options === true || options === false || options == null ? {} : options;
|
|
488
547
|
return {
|
|
489
548
|
...policy,
|
|
549
|
+
heartbeat: policy.enabled ? normalizeHeartbeat(optionPolicy.heartbeat) : undefined,
|
|
490
550
|
maxRetries: Math.max(0, Math.floor(nonNegativeNumber(optionPolicy.maxRetries, DEFAULT_RECONNECT_MAX_RETRIES))),
|
|
491
551
|
};
|
|
492
552
|
}
|
|
553
|
+
/** Normalize an enabled heartbeat without allowing zero-delay timer loops. */
|
|
554
|
+
function normalizeHeartbeat(options) {
|
|
555
|
+
if (options === false)
|
|
556
|
+
return undefined;
|
|
557
|
+
const policy = options === true || options == null ? {} : options;
|
|
558
|
+
return {
|
|
559
|
+
intervalMs: positiveInteger(policy.intervalMs, DEFAULT_HEARTBEAT_INTERVAL_MS),
|
|
560
|
+
timeoutMs: positiveInteger(policy.timeoutMs, DEFAULT_HEARTBEAT_TIMEOUT_MS),
|
|
561
|
+
};
|
|
562
|
+
}
|
|
563
|
+
/** Keep timer settings finite and strictly positive after user configuration. */
|
|
564
|
+
function positiveInteger(value, fallback) {
|
|
565
|
+
return Math.max(1, Math.floor(nonNegativeNumber(value, fallback)));
|
|
566
|
+
}
|
|
493
567
|
function sameReconnectState(left, right) {
|
|
494
568
|
if (left.phase !== right.phase) {
|
|
495
569
|
return false;
|
|
@@ -506,9 +580,24 @@ function sameReconnectState(left, right) {
|
|
|
506
580
|
return right.phase === 'connecting'
|
|
507
581
|
&& left.attempt === right.attempt
|
|
508
582
|
&& left.maxAttempts === right.maxAttempts;
|
|
509
|
-
case '
|
|
510
|
-
return right.phase === '
|
|
583
|
+
case 'terminal':
|
|
584
|
+
return right.phase === 'terminal'
|
|
511
585
|
&& left.attempts === right.attempts
|
|
512
|
-
&& left.maxAttempts === right.maxAttempts
|
|
586
|
+
&& left.maxAttempts === right.maxAttempts
|
|
587
|
+
&& left.cause === right.cause
|
|
588
|
+
&& left.error.code === right.error.code
|
|
589
|
+
&& left.error.message === right.error.message;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
/** Maps definitive server rejections to terminal causes without parsing text. */
|
|
593
|
+
function terminalCauseForError(error) {
|
|
594
|
+
switch (error.code) {
|
|
595
|
+
case 'match_not_found':
|
|
596
|
+
return 'matchNotFound';
|
|
597
|
+
case 'invalid_seat_token':
|
|
598
|
+
case 'invalid_spectator_token':
|
|
599
|
+
return 'invalidCredentials';
|
|
600
|
+
default:
|
|
601
|
+
return undefined;
|
|
513
602
|
}
|
|
514
603
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Normalized timing configuration for one session heartbeat. */
|
|
2
|
+
export interface MatchSessionHeartbeatConfig {
|
|
3
|
+
/** Delay between a valid pong and the next ping. */
|
|
4
|
+
intervalMs: number;
|
|
5
|
+
/** Maximum wait for a pong matching the outstanding ping. */
|
|
6
|
+
timeoutMs: number;
|
|
7
|
+
}
|
|
8
|
+
/** Dependencies owned by the match-session controller. */
|
|
9
|
+
export interface MatchSessionHeartbeatOptions {
|
|
10
|
+
/** Normalized timing configuration. */
|
|
11
|
+
config: MatchSessionHeartbeatConfig;
|
|
12
|
+
/** Sends a transport ping carrying the supplied nonce. */
|
|
13
|
+
sendPing: (nonce: string) => void;
|
|
14
|
+
/** Replaces the active connection after a matching pong never arrives. */
|
|
15
|
+
onTimeout: () => void;
|
|
16
|
+
}
|
|
17
|
+
/** Small liveness timer for one already-open match socket. */
|
|
18
|
+
export interface MatchSessionHeartbeat {
|
|
19
|
+
/** Starts a new heartbeat generation. */
|
|
20
|
+
start: () => void;
|
|
21
|
+
/** Cancels all timers and ignores late callbacks from this generation. */
|
|
22
|
+
stop: () => void;
|
|
23
|
+
/** Accepts the pong only when it acknowledges the active ping. */
|
|
24
|
+
acknowledge: (nonce: string | null | undefined) => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Create a ping/pong watchdog for a match session.
|
|
28
|
+
*
|
|
29
|
+
* One nonce is outstanding at most once. Every start and stop increments a
|
|
30
|
+
* generation, preventing a timer from a replaced socket from closing its
|
|
31
|
+
* successor.
|
|
32
|
+
*/
|
|
33
|
+
export declare function createMatchSessionHeartbeat(options: MatchSessionHeartbeatOptions): MatchSessionHeartbeat;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a ping/pong watchdog for a match session.
|
|
3
|
+
*
|
|
4
|
+
* One nonce is outstanding at most once. Every start and stop increments a
|
|
5
|
+
* generation, preventing a timer from a replaced socket from closing its
|
|
6
|
+
* successor.
|
|
7
|
+
*/
|
|
8
|
+
export function createMatchSessionHeartbeat(options) {
|
|
9
|
+
let generation = 0;
|
|
10
|
+
let nonceIndex = 0;
|
|
11
|
+
let pendingNonce;
|
|
12
|
+
let pingTimer;
|
|
13
|
+
let timeoutTimer;
|
|
14
|
+
function clearTimers() {
|
|
15
|
+
if (pingTimer !== undefined)
|
|
16
|
+
clearTimeout(pingTimer);
|
|
17
|
+
if (timeoutTimer !== undefined)
|
|
18
|
+
clearTimeout(timeoutTimer);
|
|
19
|
+
pingTimer = undefined;
|
|
20
|
+
timeoutTimer = undefined;
|
|
21
|
+
}
|
|
22
|
+
function schedulePing(expectedGeneration) {
|
|
23
|
+
pingTimer = setTimeout(() => {
|
|
24
|
+
pingTimer = undefined;
|
|
25
|
+
if (expectedGeneration !== generation)
|
|
26
|
+
return;
|
|
27
|
+
const nonce = `match-session-heartbeat:${++nonceIndex}`;
|
|
28
|
+
pendingNonce = nonce;
|
|
29
|
+
timeoutTimer = setTimeout(() => {
|
|
30
|
+
timeoutTimer = undefined;
|
|
31
|
+
if (expectedGeneration !== generation || pendingNonce !== nonce)
|
|
32
|
+
return;
|
|
33
|
+
pendingNonce = undefined;
|
|
34
|
+
options.onTimeout();
|
|
35
|
+
}, options.config.timeoutMs);
|
|
36
|
+
try {
|
|
37
|
+
options.sendPing(nonce);
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
if (expectedGeneration !== generation || pendingNonce !== nonce)
|
|
41
|
+
return;
|
|
42
|
+
clearTimeout(timeoutTimer);
|
|
43
|
+
timeoutTimer = undefined;
|
|
44
|
+
pendingNonce = undefined;
|
|
45
|
+
options.onTimeout();
|
|
46
|
+
}
|
|
47
|
+
}, options.config.intervalMs);
|
|
48
|
+
}
|
|
49
|
+
function stop() {
|
|
50
|
+
generation += 1;
|
|
51
|
+
pendingNonce = undefined;
|
|
52
|
+
clearTimers();
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
start: () => {
|
|
56
|
+
stop();
|
|
57
|
+
schedulePing(generation);
|
|
58
|
+
},
|
|
59
|
+
stop,
|
|
60
|
+
acknowledge: (nonce) => {
|
|
61
|
+
if (nonce == null || nonce !== pendingNonce)
|
|
62
|
+
return;
|
|
63
|
+
pendingNonce = undefined;
|
|
64
|
+
if (timeoutTimer !== undefined)
|
|
65
|
+
clearTimeout(timeoutTimer);
|
|
66
|
+
timeoutTimer = undefined;
|
|
67
|
+
schedulePing(generation);
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -159,6 +159,14 @@ export interface MatchSessionMethods {
|
|
|
159
159
|
* @see https://simulator-sdk.my-swu.com/guide/reconnect
|
|
160
160
|
*/
|
|
161
161
|
reconnect(options?: MatchSessionConnectOptions): Promise<MatchSession>;
|
|
162
|
+
/**
|
|
163
|
+
* Immediately starts session-owned automatic recovery using stored access.
|
|
164
|
+
*
|
|
165
|
+
* This is intended for foreground restoration: it preserves automatic
|
|
166
|
+
* backoff after a failed dial instead of turning recovery into a one-shot
|
|
167
|
+
* manual reconnect.
|
|
168
|
+
*/
|
|
169
|
+
recoverNow(): void;
|
|
162
170
|
/**
|
|
163
171
|
* Sends one ready message for the current seat.
|
|
164
172
|
*
|