@rine-kit/pubg-intelligence 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/src/analytics.d.ts +176 -0
- package/dist/src/analytics.js +431 -0
- package/dist/src/analytics.js.map +1 -0
- package/dist/src/assistant.d.ts +87 -0
- package/dist/src/assistant.js +310 -0
- package/dist/src/assistant.js.map +1 -0
- package/dist/src/battle.d.ts +280 -0
- package/dist/src/battle.js +1249 -0
- package/dist/src/battle.js.map +1 -0
- package/dist/src/combat-long.d.ts +42 -0
- package/dist/src/combat-long.js +146 -0
- package/dist/src/combat-long.js.map +1 -0
- package/dist/src/combat-quality.d.ts +101 -0
- package/dist/src/combat-quality.js +253 -0
- package/dist/src/combat-quality.js.map +1 -0
- package/dist/src/evaluation-fixtures.d.ts +13 -0
- package/dist/src/evaluation-fixtures.js +144 -0
- package/dist/src/evaluation-fixtures.js.map +1 -0
- package/dist/src/evaluation-replay.d.ts +5 -0
- package/dist/src/evaluation-replay.js +107 -0
- package/dist/src/evaluation-replay.js.map +1 -0
- package/dist/src/evaluation.d.ts +140 -0
- package/dist/src/evaluation.js +180 -0
- package/dist/src/evaluation.js.map +1 -0
- package/dist/src/experiment-store.d.ts +56 -0
- package/dist/src/experiment-store.js +159 -0
- package/dist/src/experiment-store.js.map +1 -0
- package/dist/src/field.d.ts +103 -0
- package/dist/src/field.js +298 -0
- package/dist/src/field.js.map +1 -0
- package/dist/src/fights.d.ts +89 -0
- package/dist/src/fights.js +238 -0
- package/dist/src/fights.js.map +1 -0
- package/dist/src/highlights.d.ts +44 -0
- package/dist/src/highlights.js +153 -0
- package/dist/src/highlights.js.map +1 -0
- package/dist/src/index.d.ts +24 -0
- package/dist/src/index.js +25 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/insights.d.ts +44 -0
- package/dist/src/insights.js +343 -0
- package/dist/src/insights.js.map +1 -0
- package/dist/src/intent.d.ts +40 -0
- package/dist/src/intent.js +119 -0
- package/dist/src/intent.js.map +1 -0
- package/dist/src/landing.d.ts +74 -0
- package/dist/src/landing.js +195 -0
- package/dist/src/landing.js.map +1 -0
- package/dist/src/lobby.d.ts +48 -0
- package/dist/src/lobby.js +209 -0
- package/dist/src/lobby.js.map +1 -0
- package/dist/src/match-insight.d.ts +165 -0
- package/dist/src/match-insight.js +542 -0
- package/dist/src/match-insight.js.map +1 -0
- package/dist/src/match-relative.d.ts +73 -0
- package/dist/src/match-relative.js +145 -0
- package/dist/src/match-relative.js.map +1 -0
- package/dist/src/match-story.d.ts +155 -0
- package/dist/src/match-story.js +636 -0
- package/dist/src/match-story.js.map +1 -0
- package/dist/src/profiles.d.ts +41 -0
- package/dist/src/profiles.js +136 -0
- package/dist/src/profiles.js.map +1 -0
- package/dist/src/raw-telemetry-archive.d.ts +29 -0
- package/dist/src/raw-telemetry-archive.js +340 -0
- package/dist/src/raw-telemetry-archive.js.map +1 -0
- package/dist/src/raw-telemetry-backfill.d.ts +28 -0
- package/dist/src/raw-telemetry-backfill.js +144 -0
- package/dist/src/raw-telemetry-backfill.js.map +1 -0
- package/dist/src/research.d.ts +89 -0
- package/dist/src/research.js +376 -0
- package/dist/src/research.js.map +1 -0
- package/dist/src/rhythm.d.ts +104 -0
- package/dist/src/rhythm.js +260 -0
- package/dist/src/rhythm.js.map +1 -0
- package/dist/src/streaks.d.ts +117 -0
- package/dist/src/streaks.js +367 -0
- package/dist/src/streaks.js.map +1 -0
- package/dist/src/style.d.ts +304 -0
- package/dist/src/style.js +1461 -0
- package/dist/src/style.js.map +1 -0
- package/dist/src/tactics.d.ts +88 -0
- package/dist/src/tactics.js +1221 -0
- package/dist/src/tactics.js.map +1 -0
- package/package.json +49 -3
- package/README.md +0 -3
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { type NormalizedMatch, type TelemetryEventPhase, type TelemetryLocation } from '@rine-kit/pubg-domain';
|
|
2
|
+
export declare const BATTLE_RECONSTRUCTION_SCHEMA_VERSION: 2;
|
|
3
|
+
export declare const BATTLE_RECONSTRUCTION_PARSER_VERSION: "battle-reconstruction-v2";
|
|
4
|
+
export declare const BATTLE_CONTACT_GAP_SECONDS = 28;
|
|
5
|
+
export declare const BATTLE_KNOCK_OUTCOME_WINDOW_SECONDS = 120;
|
|
6
|
+
export declare const BATTLE_POST_KNOCK_RESPONSE_WINDOW_SECONDS = 30;
|
|
7
|
+
export declare const BATTLE_CONTEXT_BEFORE_SECONDS = 5;
|
|
8
|
+
export declare const BATTLE_CONTEXT_AFTER_SECONDS = 28;
|
|
9
|
+
export declare const BATTLE_POSITION_SAMPLE_INTERVAL_SECONDS = 15;
|
|
10
|
+
export type BattleEventType = 'ATTACK' | 'DAMAGE' | 'KNOCK' | 'KILL' | 'REVIVE' | 'POSITION';
|
|
11
|
+
export type BattleTimestampSource = 'absolute' | 'clock' | 'elapsed' | 'unknown';
|
|
12
|
+
export type ObservedPlayerState = 'ACTIVE_OBSERVED' | 'KNOCKED' | 'DEAD' | 'UNKNOWN';
|
|
13
|
+
export type KnockOutcome = 'KILL' | 'REVIVE' | null;
|
|
14
|
+
export interface BattleVector {
|
|
15
|
+
x: number | null;
|
|
16
|
+
y: number | null;
|
|
17
|
+
z: number | null;
|
|
18
|
+
}
|
|
19
|
+
export interface BattleZoneState {
|
|
20
|
+
center: BattleVector | null;
|
|
21
|
+
radius: number | null;
|
|
22
|
+
}
|
|
23
|
+
export interface BattleCircleSample {
|
|
24
|
+
id: string;
|
|
25
|
+
sourceEventId: string;
|
|
26
|
+
timeSeconds: number | null;
|
|
27
|
+
timestampSource: BattleTimestampSource;
|
|
28
|
+
phase: TelemetryEventPhase;
|
|
29
|
+
elapsedSeconds: number | null;
|
|
30
|
+
alivePlayers: number | null;
|
|
31
|
+
aliveTeams: number | null;
|
|
32
|
+
safetyZone: BattleZoneState;
|
|
33
|
+
poisonGasWarningZone: BattleZoneState;
|
|
34
|
+
redZone: BattleZoneState;
|
|
35
|
+
blackZone: BattleZoneState;
|
|
36
|
+
}
|
|
37
|
+
export interface BattleCircleTransition {
|
|
38
|
+
id: string;
|
|
39
|
+
fromSampleId: string;
|
|
40
|
+
toSampleId: string;
|
|
41
|
+
fromSourceEventId: string;
|
|
42
|
+
toSourceEventId: string;
|
|
43
|
+
timeSeconds: number;
|
|
44
|
+
changedZones: Array<'safetyZone' | 'poisonGasWarningZone' | 'redZone' | 'blackZone'>;
|
|
45
|
+
}
|
|
46
|
+
export interface BattleSourceEvent {
|
|
47
|
+
id: string;
|
|
48
|
+
sourceEventId: string;
|
|
49
|
+
type: BattleEventType;
|
|
50
|
+
rawType: string;
|
|
51
|
+
timeSeconds: number | null;
|
|
52
|
+
timestampSource: BattleTimestampSource;
|
|
53
|
+
phase: TelemetryEventPhase;
|
|
54
|
+
actorId: string | null;
|
|
55
|
+
victimId: string | null;
|
|
56
|
+
actorTeamId: string | null;
|
|
57
|
+
victimTeamId: string | null;
|
|
58
|
+
attackId: string | null;
|
|
59
|
+
dbnoId: string | null;
|
|
60
|
+
semanticKey: string;
|
|
61
|
+
damage: number;
|
|
62
|
+
hit: boolean;
|
|
63
|
+
weaponId: string | null;
|
|
64
|
+
/** Optional supplemental telemetry facts used by versioned R2 rules. */
|
|
65
|
+
blueZone?: boolean | null;
|
|
66
|
+
damageReason?: string | null;
|
|
67
|
+
location: TelemetryLocation | null;
|
|
68
|
+
}
|
|
69
|
+
export interface BattleTelemetryDocument {
|
|
70
|
+
schemaVersion: typeof BATTLE_RECONSTRUCTION_SCHEMA_VERSION;
|
|
71
|
+
parserVersion: typeof BATTLE_RECONSTRUCTION_PARSER_VERSION;
|
|
72
|
+
rawEventCount: number;
|
|
73
|
+
domainNormalizedEventCount: number;
|
|
74
|
+
events: BattleSourceEvent[];
|
|
75
|
+
circleSamples: BattleCircleSample[];
|
|
76
|
+
diagnostics: {
|
|
77
|
+
unrecognizedDomainEventCount: number;
|
|
78
|
+
excludedPreMatchEventCount: number;
|
|
79
|
+
excludedPreMatchContactEventCount: number;
|
|
80
|
+
untimedBattleEventCount: number;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export interface BattleTimelineEvent {
|
|
84
|
+
id: string;
|
|
85
|
+
sourceEventId: string;
|
|
86
|
+
type: BattleEventType;
|
|
87
|
+
rawType: string;
|
|
88
|
+
timeSeconds: number;
|
|
89
|
+
timestampSource: BattleTimestampSource;
|
|
90
|
+
actorRef: string | null;
|
|
91
|
+
victimRef: string | null;
|
|
92
|
+
actorTeamRef: string | null;
|
|
93
|
+
victimTeamRef: string | null;
|
|
94
|
+
damage: number | null;
|
|
95
|
+
weapon: string | null;
|
|
96
|
+
location: BattleVector | null;
|
|
97
|
+
}
|
|
98
|
+
export interface BattlePlayerState {
|
|
99
|
+
playerRef: string;
|
|
100
|
+
state: ObservedPlayerState;
|
|
101
|
+
lastObservedAtSeconds: number | null;
|
|
102
|
+
}
|
|
103
|
+
export interface BattleTeamSummary {
|
|
104
|
+
teamRef: string | null;
|
|
105
|
+
memberRefs: string[];
|
|
106
|
+
tracked: boolean;
|
|
107
|
+
lastObserved: {
|
|
108
|
+
active: number;
|
|
109
|
+
knocked: number;
|
|
110
|
+
dead: number;
|
|
111
|
+
unknown: number;
|
|
112
|
+
completeness: 'observed-members-only';
|
|
113
|
+
states: BattlePlayerState[];
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export interface KnockChain {
|
|
117
|
+
knockEventId: string;
|
|
118
|
+
knockedPlayerRef: string | null;
|
|
119
|
+
attackerRef: string | null;
|
|
120
|
+
knockAtSeconds: number;
|
|
121
|
+
outcome: KnockOutcome;
|
|
122
|
+
outcomeEventId: string | null;
|
|
123
|
+
outcomeAtSeconds: number | null;
|
|
124
|
+
elapsedSeconds: number | null;
|
|
125
|
+
windowSeconds: typeof BATTLE_KNOCK_OUTCOME_WINDOW_SECONDS;
|
|
126
|
+
}
|
|
127
|
+
export interface BattlePositionSample {
|
|
128
|
+
sourceEventId: string;
|
|
129
|
+
playerRef: string;
|
|
130
|
+
teamRef: string | null;
|
|
131
|
+
timeSeconds: number;
|
|
132
|
+
location: BattleVector;
|
|
133
|
+
}
|
|
134
|
+
export interface BattleEpisode {
|
|
135
|
+
id: string;
|
|
136
|
+
startSeconds: number;
|
|
137
|
+
endSeconds: number;
|
|
138
|
+
durationSeconds: number;
|
|
139
|
+
contactGapSeconds: typeof BATTLE_CONTACT_GAP_SECONDS;
|
|
140
|
+
participantRefs: string[];
|
|
141
|
+
teams: BattleTeamSummary[];
|
|
142
|
+
firstKnock: {
|
|
143
|
+
sourceEventId: string;
|
|
144
|
+
attackerRef: string | null;
|
|
145
|
+
victimRef: string | null;
|
|
146
|
+
timeSeconds: number;
|
|
147
|
+
} | null;
|
|
148
|
+
knockChains: KnockChain[];
|
|
149
|
+
timeline: BattleTimelineEvent[];
|
|
150
|
+
positions: BattlePositionSample[];
|
|
151
|
+
circleSampleRefs: string[];
|
|
152
|
+
circleTransitionRefs: string[];
|
|
153
|
+
evidenceEventIds: string[];
|
|
154
|
+
diagnostics: {
|
|
155
|
+
conflictingStateTransitions: number;
|
|
156
|
+
unknownTeamContacts: number;
|
|
157
|
+
ambiguousContextEvents: number;
|
|
158
|
+
positionsSuppressedBySampling: number;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
export interface BattleObservedTeamState {
|
|
162
|
+
teamRef: string;
|
|
163
|
+
memberCountObserved: number;
|
|
164
|
+
activeObserved: number;
|
|
165
|
+
knockedObserved: number;
|
|
166
|
+
deadObserved: number;
|
|
167
|
+
unknownObserved: number;
|
|
168
|
+
completeness: 'observed-members-only';
|
|
169
|
+
}
|
|
170
|
+
export interface BattleStateTimelineEntry {
|
|
171
|
+
sourceEventId: string;
|
|
172
|
+
timeSeconds: number;
|
|
173
|
+
type: 'KNOCK' | 'REVIVE' | 'KILL';
|
|
174
|
+
actorRef: string | null;
|
|
175
|
+
victimRef: string | null;
|
|
176
|
+
actorTeamRef: string | null;
|
|
177
|
+
victimTeamRef: string | null;
|
|
178
|
+
states: BattleObservedTeamState[];
|
|
179
|
+
}
|
|
180
|
+
export interface BattleAdvantageWindow {
|
|
181
|
+
teamRefs: [string, string];
|
|
182
|
+
observedLeadTeamRef: string;
|
|
183
|
+
startedAtSeconds: number;
|
|
184
|
+
endedAtSeconds: number;
|
|
185
|
+
durationSeconds: number;
|
|
186
|
+
resolution: 'equalized' | 'reversed' | 'ongoing';
|
|
187
|
+
startEventId: string;
|
|
188
|
+
endEventId: string | null;
|
|
189
|
+
evidenceEventIds: string[];
|
|
190
|
+
assessment: 'observed-knock-balance-only';
|
|
191
|
+
rosterCompleteness: 'observed-members-only';
|
|
192
|
+
}
|
|
193
|
+
export interface BattleAdvantageChange {
|
|
194
|
+
teamRefs: [string, string];
|
|
195
|
+
timeSeconds: number;
|
|
196
|
+
previousLeadTeamRef: string | null;
|
|
197
|
+
nextLeadTeamRef: string | null;
|
|
198
|
+
classification: 'lead' | 'equalized' | 'reversed';
|
|
199
|
+
sourceEventId: string;
|
|
200
|
+
}
|
|
201
|
+
export interface BattleGroup {
|
|
202
|
+
id: string;
|
|
203
|
+
startSeconds: number;
|
|
204
|
+
endSeconds: number;
|
|
205
|
+
durationSeconds: number;
|
|
206
|
+
episodeIds: string[];
|
|
207
|
+
teamRefs: string[];
|
|
208
|
+
bridgeEvidenceEventIds: string[];
|
|
209
|
+
timeline: BattleTimelineEvent[];
|
|
210
|
+
stateTimeline: BattleStateTimelineEntry[];
|
|
211
|
+
advantageWindows: BattleAdvantageWindow[];
|
|
212
|
+
advantageChanges: BattleAdvantageChange[];
|
|
213
|
+
firstKnockAdvantage: BattleAdvantageWindow | null;
|
|
214
|
+
postKnockResponse: {
|
|
215
|
+
status: 'observed' | 'not_observed_in_window' | 'incomplete';
|
|
216
|
+
firstKnockEventId: string | null;
|
|
217
|
+
responseEventId: string | null;
|
|
218
|
+
elapsedSeconds: number | null;
|
|
219
|
+
windowSeconds: 30;
|
|
220
|
+
};
|
|
221
|
+
possibleThirdParty: Array<{
|
|
222
|
+
teamRef: string;
|
|
223
|
+
episodeId: string;
|
|
224
|
+
evidenceEventIds: string[];
|
|
225
|
+
status: 'possible_third_party_contact';
|
|
226
|
+
}>;
|
|
227
|
+
rosterCompleteness: 'observed-members-only';
|
|
228
|
+
}
|
|
229
|
+
export interface BattleReconstructionResult {
|
|
230
|
+
schemaVersion: typeof BATTLE_RECONSTRUCTION_SCHEMA_VERSION;
|
|
231
|
+
parserVersion: typeof BATTLE_RECONSTRUCTION_PARSER_VERSION;
|
|
232
|
+
status: 'available' | 'no_contact_events';
|
|
233
|
+
episodes: BattleEpisode[];
|
|
234
|
+
battles: BattleGroup[];
|
|
235
|
+
circleSamples: BattleCircleSample[];
|
|
236
|
+
circleTransitions: BattleCircleTransition[];
|
|
237
|
+
diagnostics: {
|
|
238
|
+
rawEventCount: number;
|
|
239
|
+
domainNormalizedEventCount: number;
|
|
240
|
+
battleEventCount: number;
|
|
241
|
+
contactEventCount: number;
|
|
242
|
+
episodeCount: number;
|
|
243
|
+
battleGroupCount: number;
|
|
244
|
+
multiTeamBattleCount: number;
|
|
245
|
+
groupedEpisodeCount: number;
|
|
246
|
+
duplicateSourceEventCount: number;
|
|
247
|
+
duplicateTimelineAssignmentCount: number;
|
|
248
|
+
unassignedContactEventCount: number;
|
|
249
|
+
untimedContactEventCount: number;
|
|
250
|
+
preMatchContactEventCount: number;
|
|
251
|
+
noParticipantContactEventCount: number;
|
|
252
|
+
sameTeamContactEventCount: number;
|
|
253
|
+
ineffectiveContactEventCount: number;
|
|
254
|
+
unknownPhaseContactEventCount: number;
|
|
255
|
+
unknownTeamContactEventCount: number;
|
|
256
|
+
unknownPhaseCircleSampleCount: number;
|
|
257
|
+
unresolvedKnockChainCount: number;
|
|
258
|
+
reviveWithoutUniqueKnockCount: number;
|
|
259
|
+
conflictingTeamReferenceCount: number;
|
|
260
|
+
conflictingStateTransitionCount: number;
|
|
261
|
+
ambiguousContextEventCount: number;
|
|
262
|
+
positionsSuppressedBySampling: number;
|
|
263
|
+
overlappingEpisodePairCount: number;
|
|
264
|
+
sharedCircleSampleContextCount: number;
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
export declare function battlePlayerRef(matchId: string, playerId: string): string;
|
|
268
|
+
export declare function battleTeamRef(matchId: string, teamId: string): string;
|
|
269
|
+
export declare function normalizeBattleTelemetry(payload: unknown, match: NormalizedMatch): BattleTelemetryDocument;
|
|
270
|
+
export interface ReconstructBattleOptions {
|
|
271
|
+
match: Pick<NormalizedMatch, 'matchId'>;
|
|
272
|
+
telemetry: BattleTelemetryDocument;
|
|
273
|
+
trackedPlayerIds?: Iterable<string>;
|
|
274
|
+
}
|
|
275
|
+
export declare function reconstructBattleEpisodes(input: ReconstructBattleOptions): BattleReconstructionResult;
|
|
276
|
+
export declare function reconstructBattleMatch(input: {
|
|
277
|
+
match: NormalizedMatch;
|
|
278
|
+
telemetry: unknown;
|
|
279
|
+
trackedPlayerIds?: Iterable<string>;
|
|
280
|
+
}): BattleReconstructionResult;
|