playlist-data-engine 1.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/README.md +352 -0
- package/dist/__vite-browser-external-DYxpcVy9.js +4 -0
- package/dist/constants/DefaultClasses.d.ts +46 -0
- package/dist/constants/DefaultClasses.d.ts.map +1 -0
- package/dist/constants/DefaultEnchantments.d.ts +337 -0
- package/dist/constants/DefaultEnchantments.d.ts.map +1 -0
- package/dist/constants/DefaultEnemies.d.ts +83 -0
- package/dist/constants/DefaultEnemies.d.ts.map +1 -0
- package/dist/constants/DefaultEquipment.d.ts +23 -0
- package/dist/constants/DefaultEquipment.d.ts.map +1 -0
- package/dist/constants/DefaultFeatures.d.ts +22 -0
- package/dist/constants/DefaultFeatures.d.ts.map +1 -0
- package/dist/constants/DefaultRaces.d.ts +102 -0
- package/dist/constants/DefaultRaces.d.ts.map +1 -0
- package/dist/constants/DefaultSkills.d.ts +26 -0
- package/dist/constants/DefaultSkills.d.ts.map +1 -0
- package/dist/constants/DefaultSpells.d.ts +41 -0
- package/dist/constants/DefaultSpells.d.ts.map +1 -0
- package/dist/constants/EncounterBalance.d.ts +208 -0
- package/dist/constants/EncounterBalance.d.ts.map +1 -0
- package/dist/constants/EnemyEquipment.d.ts +71 -0
- package/dist/constants/EnemyEquipment.d.ts.map +1 -0
- package/dist/constants/EnemyRarity.d.ts +79 -0
- package/dist/constants/EnemyRarity.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Construct.d.ts +63 -0
- package/dist/constants/EnemyTemplates/Construct.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Dragon.d.ts +68 -0
- package/dist/constants/EnemyTemplates/Dragon.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Elemental.d.ts +64 -0
- package/dist/constants/EnemyTemplates/Elemental.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Fiend.d.ts +62 -0
- package/dist/constants/EnemyTemplates/Fiend.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Monstrosity.d.ts +63 -0
- package/dist/constants/EnemyTemplates/Monstrosity.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Undead.d.ts +61 -0
- package/dist/constants/EnemyTemplates/Undead.d.ts.map +1 -0
- package/dist/constants/ItemTemplates.d.ts +40 -0
- package/dist/constants/ItemTemplates.d.ts.map +1 -0
- package/dist/constants/MagicItems.d.ts +30 -0
- package/dist/constants/MagicItems.d.ts.map +1 -0
- package/dist/constants/SpellSlots.d.ts +30 -0
- package/dist/constants/SpellSlots.d.ts.map +1 -0
- package/dist/constants/StatScaling.d.ts +113 -0
- package/dist/constants/StatScaling.d.ts.map +1 -0
- package/dist/core/analysis/AudioAnalyzer.d.ts +599 -0
- package/dist/core/analysis/AudioAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/ColorExtractor.d.ts +64 -0
- package/dist/core/analysis/ColorExtractor.d.ts.map +1 -0
- package/dist/core/analysis/EssentiaPitchDetector.d.ts +282 -0
- package/dist/core/analysis/EssentiaPitchDetector.d.ts.map +1 -0
- package/dist/core/analysis/LevelSerializer.d.ts +265 -0
- package/dist/core/analysis/LevelSerializer.d.ts.map +1 -0
- package/dist/core/analysis/MelodyContourAnalyzer.d.ts +283 -0
- package/dist/core/analysis/MelodyContourAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/MultiBandAnalyzer.d.ts +214 -0
- package/dist/core/analysis/MultiBandAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/MusicClassifier.d.ts +524 -0
- package/dist/core/analysis/MusicClassifier.d.ts.map +1 -0
- package/dist/core/analysis/PitchAnalyzer.d.ts +266 -0
- package/dist/core/analysis/PitchAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/PitchDetector.d.ts +251 -0
- package/dist/core/analysis/PitchDetector.d.ts.map +1 -0
- package/dist/core/analysis/SpectrumScanner.d.ts +52 -0
- package/dist/core/analysis/SpectrumScanner.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatInterpolator.d.ts +477 -0
- package/dist/core/analysis/beat/BeatInterpolator.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatMapGenerator.d.ts +170 -0
- package/dist/core/analysis/beat/BeatMapGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatStream.d.ts +316 -0
- package/dist/core/analysis/beat/BeatStream.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatSubdivider.d.ts +205 -0
- package/dist/core/analysis/beat/BeatSubdivider.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatTracker.d.ts +137 -0
- package/dist/core/analysis/beat/BeatTracker.d.ts.map +1 -0
- package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts +180 -0
- package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/DensityAnalyzer.d.ts +246 -0
- package/dist/core/analysis/beat/DensityAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts +1082 -0
- package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/GrooveAnalyzer.d.ts +192 -0
- package/dist/core/analysis/beat/GrooveAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts +133 -0
- package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts.map +1 -0
- package/dist/core/analysis/beat/PhraseAnalyzer.d.ts +230 -0
- package/dist/core/analysis/beat/PhraseAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/RhythmQuantizer.d.ts +399 -0
- package/dist/core/analysis/beat/RhythmQuantizer.d.ts.map +1 -0
- package/dist/core/analysis/beat/RhythmicBalancer.d.ts +262 -0
- package/dist/core/analysis/beat/RhythmicBalancer.d.ts.map +1 -0
- package/dist/core/analysis/beat/StreamScorer.d.ts +275 -0
- package/dist/core/analysis/beat/StreamScorer.d.ts.map +1 -0
- package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts +256 -0
- package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts.map +1 -0
- package/dist/core/analysis/beat/TempoDetector.d.ts +220 -0
- package/dist/core/analysis/beat/TempoDetector.d.ts.map +1 -0
- package/dist/core/analysis/beat/TransientDetector.d.ts +303 -0
- package/dist/core/analysis/beat/TransientDetector.d.ts.map +1 -0
- package/dist/core/analysis/beat/beatKeyHelpers.d.ts +180 -0
- package/dist/core/analysis/beat/beatKeyHelpers.d.ts.map +1 -0
- package/dist/core/analysis/beat/index.d.ts +41 -0
- package/dist/core/analysis/beat/index.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/audioUtils.d.ts +204 -0
- package/dist/core/analysis/beat/utils/audioUtils.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts +404 -0
- package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts +61 -0
- package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts +33 -0
- package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts.map +1 -0
- package/dist/core/analysis/index.d.ts +18 -0
- package/dist/core/analysis/index.d.ts.map +1 -0
- package/dist/core/combat/AI/AICombatRunner.d.ts +108 -0
- package/dist/core/combat/AI/AICombatRunner.d.ts.map +1 -0
- package/dist/core/combat/AI/CombatAI.d.ts +179 -0
- package/dist/core/combat/AI/CombatAI.d.ts.map +1 -0
- package/dist/core/combat/AI/CombatMetricsTracker.d.ts +30 -0
- package/dist/core/combat/AI/CombatMetricsTracker.d.ts.map +1 -0
- package/dist/core/combat/Analysis/BalanceValidator.d.ts +170 -0
- package/dist/core/combat/Analysis/BalanceValidator.d.ts.map +1 -0
- package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts +231 -0
- package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts.map +1 -0
- package/dist/core/combat/Analysis/DifficultyCalculator.d.ts +203 -0
- package/dist/core/combat/Analysis/DifficultyCalculator.d.ts.map +1 -0
- package/dist/core/combat/Analysis/ParameterSweep.d.ts +201 -0
- package/dist/core/combat/Analysis/ParameterSweep.d.ts.map +1 -0
- package/dist/core/combat/AttackResolver.d.ts +220 -0
- package/dist/core/combat/AttackResolver.d.ts.map +1 -0
- package/dist/core/combat/CombatEngine.d.ts +388 -0
- package/dist/core/combat/CombatEngine.d.ts.map +1 -0
- package/dist/core/combat/DiceRoller.d.ts +115 -0
- package/dist/core/combat/DiceRoller.d.ts.map +1 -0
- package/dist/core/combat/InitiativeRoller.d.ts +62 -0
- package/dist/core/combat/InitiativeRoller.d.ts.map +1 -0
- package/dist/core/combat/PartyAnalyzer.d.ts +215 -0
- package/dist/core/combat/PartyAnalyzer.d.ts.map +1 -0
- package/dist/core/combat/SeededDiceRoller.d.ts +120 -0
- package/dist/core/combat/SeededDiceRoller.d.ts.map +1 -0
- package/dist/core/combat/Simulation/CombatSimulator.d.ts +366 -0
- package/dist/core/combat/Simulation/CombatSimulator.d.ts.map +1 -0
- package/dist/core/combat/SpellCaster.d.ts +113 -0
- package/dist/core/combat/SpellCaster.d.ts.map +1 -0
- package/dist/core/config/index.d.ts +24 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/progressionConfig.d.ts +73 -0
- package/dist/core/config/progressionConfig.d.ts.map +1 -0
- package/dist/core/config/sensorConfig.d.ts +134 -0
- package/dist/core/config/sensorConfig.d.ts.map +1 -0
- package/dist/core/equipment/BoxOpener.d.ts +175 -0
- package/dist/core/equipment/BoxOpener.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentEffectApplier.d.ts +189 -0
- package/dist/core/equipment/EquipmentEffectApplier.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentModifier.d.ts +327 -0
- package/dist/core/equipment/EquipmentModifier.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentSpawnHelper.d.ts +246 -0
- package/dist/core/equipment/EquipmentSpawnHelper.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentValidator.d.ts +173 -0
- package/dist/core/equipment/EquipmentValidator.d.ts.map +1 -0
- package/dist/core/extensions/ExtensionManager.d.ts +517 -0
- package/dist/core/extensions/ExtensionManager.d.ts.map +1 -0
- package/dist/core/extensions/WeightedSelector.d.ts +156 -0
- package/dist/core/extensions/WeightedSelector.d.ts.map +1 -0
- package/dist/core/extensions/index.d.ts +11 -0
- package/dist/core/extensions/index.d.ts.map +1 -0
- package/dist/core/extensions/initializeDefaults.d.ts +170 -0
- package/dist/core/extensions/initializeDefaults.d.ts.map +1 -0
- package/dist/core/features/FeatureEffectApplier.d.ts +102 -0
- package/dist/core/features/FeatureEffectApplier.d.ts.map +1 -0
- package/dist/core/features/FeatureQuery.d.ts +368 -0
- package/dist/core/features/FeatureQuery.d.ts.map +1 -0
- package/dist/core/features/FeatureTypes.d.ts +199 -0
- package/dist/core/features/FeatureTypes.d.ts.map +1 -0
- package/dist/core/features/FeatureValidator.d.ts +149 -0
- package/dist/core/features/FeatureValidator.d.ts.map +1 -0
- package/dist/core/features/index.d.ts +12 -0
- package/dist/core/features/index.d.ts.map +1 -0
- package/dist/core/generation/AbilityScoreCalculator.d.ts +83 -0
- package/dist/core/generation/AbilityScoreCalculator.d.ts.map +1 -0
- package/dist/core/generation/AppearanceGenerator.d.ts +32 -0
- package/dist/core/generation/AppearanceGenerator.d.ts.map +1 -0
- package/dist/core/generation/BeatConverter.d.ts +127 -0
- package/dist/core/generation/BeatConverter.d.ts.map +1 -0
- package/dist/core/generation/ButtonMapper.d.ts +346 -0
- package/dist/core/generation/ButtonMapper.d.ts.map +1 -0
- package/dist/core/generation/ButtonPatternLibrary.d.ts +92 -0
- package/dist/core/generation/ButtonPatternLibrary.d.ts.map +1 -0
- package/dist/core/generation/CRLevelConverter.d.ts +242 -0
- package/dist/core/generation/CRLevelConverter.d.ts.map +1 -0
- package/dist/core/generation/CharacterGenerator.d.ts +194 -0
- package/dist/core/generation/CharacterGenerator.d.ts.map +1 -0
- package/dist/core/generation/ClassSuggester.d.ts +184 -0
- package/dist/core/generation/ClassSuggester.d.ts.map +1 -0
- package/dist/core/generation/EnemyEquipmentGenerator.d.ts +151 -0
- package/dist/core/generation/EnemyEquipmentGenerator.d.ts.map +1 -0
- package/dist/core/generation/EnemyGenerator.d.ts +595 -0
- package/dist/core/generation/EnemyGenerator.d.ts.map +1 -0
- package/dist/core/generation/EquipmentGenerator.d.ts +204 -0
- package/dist/core/generation/EquipmentGenerator.d.ts.map +1 -0
- package/dist/core/generation/LegendaryGenerator.d.ts +213 -0
- package/dist/core/generation/LegendaryGenerator.d.ts.map +1 -0
- package/dist/core/generation/LevelGenerator.d.ts +390 -0
- package/dist/core/generation/LevelGenerator.d.ts.map +1 -0
- package/dist/core/generation/NamingEngine.d.ts +136 -0
- package/dist/core/generation/NamingEngine.d.ts.map +1 -0
- package/dist/core/generation/PitchBeatLinker.d.ts +150 -0
- package/dist/core/generation/PitchBeatLinker.d.ts.map +1 -0
- package/dist/core/generation/RaceSelector.d.ts +58 -0
- package/dist/core/generation/RaceSelector.d.ts.map +1 -0
- package/dist/core/generation/RhythmGenerator.d.ts +597 -0
- package/dist/core/generation/RhythmGenerator.d.ts.map +1 -0
- package/dist/core/generation/SkillAssigner.d.ts +78 -0
- package/dist/core/generation/SkillAssigner.d.ts.map +1 -0
- package/dist/core/generation/SpellManager.d.ts +132 -0
- package/dist/core/generation/SpellManager.d.ts.map +1 -0
- package/dist/core/generation/SpellcastingGenerator.d.ts +255 -0
- package/dist/core/generation/SpellcastingGenerator.d.ts.map +1 -0
- package/dist/core/generation/index.d.ts +41 -0
- package/dist/core/generation/index.d.ts.map +1 -0
- package/dist/core/parser/MetadataExtractor.d.ts +66 -0
- package/dist/core/parser/MetadataExtractor.d.ts.map +1 -0
- package/dist/core/parser/PlaylistParser.d.ts +45 -0
- package/dist/core/parser/PlaylistParser.d.ts.map +1 -0
- package/dist/core/playback/SubdivisionPlaybackController.d.ts +333 -0
- package/dist/core/playback/SubdivisionPlaybackController.d.ts.map +1 -0
- package/dist/core/playback/index.d.ts +5 -0
- package/dist/core/playback/index.d.ts.map +1 -0
- package/dist/core/progression/CharacterUpdater.d.ts +203 -0
- package/dist/core/progression/CharacterUpdater.d.ts.map +1 -0
- package/dist/core/progression/LevelUpProcessor.d.ts +234 -0
- package/dist/core/progression/LevelUpProcessor.d.ts.map +1 -0
- package/dist/core/progression/PrestigeSystem.d.ts +217 -0
- package/dist/core/progression/PrestigeSystem.d.ts.map +1 -0
- package/dist/core/progression/RhythmXPCalculator.d.ts +182 -0
- package/dist/core/progression/RhythmXPCalculator.d.ts.map +1 -0
- package/dist/core/progression/SessionTracker.d.ts +169 -0
- package/dist/core/progression/SessionTracker.d.ts.map +1 -0
- package/dist/core/progression/XPCalculator.d.ts +128 -0
- package/dist/core/progression/XPCalculator.d.ts.map +1 -0
- package/dist/core/progression/stat/StatIncreaseStrategy.d.ts +97 -0
- package/dist/core/progression/stat/StatIncreaseStrategy.d.ts.map +1 -0
- package/dist/core/progression/stat/StatManager.d.ts +179 -0
- package/dist/core/progression/stat/StatManager.d.ts.map +1 -0
- package/dist/core/sensors/EnvironmentalSensors.d.ts +301 -0
- package/dist/core/sensors/EnvironmentalSensors.d.ts.map +1 -0
- package/dist/core/sensors/GamingPlatformSensors.d.ts +162 -0
- package/dist/core/sensors/GamingPlatformSensors.d.ts.map +1 -0
- package/dist/core/sensors/GeolocationProvider.d.ts +156 -0
- package/dist/core/sensors/GeolocationProvider.d.ts.map +1 -0
- package/dist/core/sensors/MotionDetector.d.ts +58 -0
- package/dist/core/sensors/MotionDetector.d.ts.map +1 -0
- package/dist/core/sensors/SteamAPIClient.d.ts +108 -0
- package/dist/core/sensors/SteamAPIClient.d.ts.map +1 -0
- package/dist/core/sensors/WeatherAPIClient.d.ts +360 -0
- package/dist/core/sensors/WeatherAPIClient.d.ts.map +1 -0
- package/dist/core/sensors/schemas/weather.schema.d.ts +144 -0
- package/dist/core/sensors/schemas/weather.schema.d.ts.map +1 -0
- package/dist/core/skills/SkillQuery.d.ts +159 -0
- package/dist/core/skills/SkillQuery.d.ts.map +1 -0
- package/dist/core/skills/SkillTypes.d.ts +233 -0
- package/dist/core/skills/SkillTypes.d.ts.map +1 -0
- package/dist/core/skills/SkillValidator.d.ts +146 -0
- package/dist/core/skills/SkillValidator.d.ts.map +1 -0
- package/dist/core/skills/index.d.ts +11 -0
- package/dist/core/skills/index.d.ts.map +1 -0
- package/dist/core/spells/SpellQuery.d.ts +194 -0
- package/dist/core/spells/SpellQuery.d.ts.map +1 -0
- package/dist/core/spells/SpellTypes.d.ts +71 -0
- package/dist/core/spells/SpellTypes.d.ts.map +1 -0
- package/dist/core/spells/SpellValidator.d.ts +129 -0
- package/dist/core/spells/SpellValidator.d.ts.map +1 -0
- package/dist/core/spells/index.d.ts +11 -0
- package/dist/core/spells/index.d.ts.map +1 -0
- package/dist/core/types/AudioProfile.d.ts +143 -0
- package/dist/core/types/AudioProfile.d.ts.map +1 -0
- package/dist/core/types/BeatMap.d.ts +1825 -0
- package/dist/core/types/BeatMap.d.ts.map +1 -0
- package/dist/core/types/ButtonMapping.d.ts +345 -0
- package/dist/core/types/ButtonMapping.d.ts.map +1 -0
- package/dist/core/types/Character.d.ts +397 -0
- package/dist/core/types/Character.d.ts.map +1 -0
- package/dist/core/types/ChartedBeatMap.d.ts +169 -0
- package/dist/core/types/ChartedBeatMap.d.ts.map +1 -0
- package/dist/core/types/Combat.d.ts +268 -0
- package/dist/core/types/Combat.d.ts.map +1 -0
- package/dist/core/types/CombatAI.d.ts +143 -0
- package/dist/core/types/CombatAI.d.ts.map +1 -0
- package/dist/core/types/Enemy.d.ts +447 -0
- package/dist/core/types/Enemy.d.ts.map +1 -0
- package/dist/core/types/Environmental.d.ts +213 -0
- package/dist/core/types/Environmental.d.ts.map +1 -0
- package/dist/core/types/Equipment.d.ts +309 -0
- package/dist/core/types/Equipment.d.ts.map +1 -0
- package/dist/core/types/ISessionTracker.d.ts +48 -0
- package/dist/core/types/ISessionTracker.d.ts.map +1 -0
- package/dist/core/types/LevelExport.d.ts +366 -0
- package/dist/core/types/LevelExport.d.ts.map +1 -0
- package/dist/core/types/Playlist.d.ts +70 -0
- package/dist/core/types/Playlist.d.ts.map +1 -0
- package/dist/core/types/Prestige.d.ts +94 -0
- package/dist/core/types/Prestige.d.ts.map +1 -0
- package/dist/core/types/Progression.d.ts +214 -0
- package/dist/core/types/Progression.d.ts.map +1 -0
- package/dist/core/types/RhythmXP.d.ts +398 -0
- package/dist/core/types/RhythmXP.d.ts.map +1 -0
- package/dist/core/utils/AbilityConstants.d.ts +31 -0
- package/dist/core/utils/AbilityConstants.d.ts.map +1 -0
- package/dist/core/utils/EffectApplierUtils.d.ts +56 -0
- package/dist/core/utils/EffectApplierUtils.d.ts.map +1 -0
- package/dist/core/utils/ImageValidator.d.ts +66 -0
- package/dist/core/utils/ImageValidator.d.ts.map +1 -0
- package/dist/core/utils/PrerequisiteValidator.d.ts +88 -0
- package/dist/core/utils/PrerequisiteValidator.d.ts.map +1 -0
- package/dist/essentia-wasm.es-BUEnKUts.js +2990 -0
- package/dist/essentia.js-model.es-CGA0xotH.js +306 -0
- package/dist/index.d.ts +176 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/playlist-data-engine.js +124 -0
- package/dist/playlist-data-engine.mjs +49251 -0
- package/dist/utils/EnchantmentLibrary.d.ts +378 -0
- package/dist/utils/EnchantmentLibrary.d.ts.map +1 -0
- package/dist/utils/arweaveGatewayManager.d.ts +485 -0
- package/dist/utils/arweaveGatewayManager.d.ts.map +1 -0
- package/dist/utils/arweaveUtils.d.ts +118 -0
- package/dist/utils/arweaveUtils.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +439 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/equipmentConstants.d.ts +60 -0
- package/dist/utils/equipmentConstants.d.ts.map +1 -0
- package/dist/utils/hash.d.ts +33 -0
- package/dist/utils/hash.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +192 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/magicItemExamples.d.ts +46 -0
- package/dist/utils/magicItemExamples.d.ts.map +1 -0
- package/dist/utils/playlistUtils.d.ts +149 -0
- package/dist/utils/playlistUtils.d.ts.map +1 -0
- package/dist/utils/random.d.ts +34 -0
- package/dist/utils/random.d.ts.map +1 -0
- package/dist/utils/sensorDashboard.d.ts +60 -0
- package/dist/utils/sensorDashboard.d.ts.map +1 -0
- package/dist/utils/validators.d.ts +189 -0
- package/dist/utils/validators.d.ts.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import type { SensorType, SensorPermission, EnvironmentalContext, SensorStatus, SensorFailureLog, SensorRetryConfig, SensorRecoveryNotification, XpModifierBreakdown, SolarInfo } from '../types/Environmental';
|
|
2
|
+
import type { GeolocationSensorConfig, WeatherSensorConfig, XPModifierConfig, RetryConfig } from '../config/sensorConfig.js';
|
|
3
|
+
import { type SevereWeatherAlert } from './WeatherAPIClient';
|
|
4
|
+
import { type DashboardConfig } from '../../utils/sensorDashboard.js';
|
|
5
|
+
/**
|
|
6
|
+
* Environmental sensor integration with error recovery
|
|
7
|
+
*
|
|
8
|
+
* Aggregates data from:
|
|
9
|
+
* - GPS/Geolocation (latitude, longitude, altitude)
|
|
10
|
+
* - Motion sensors (accelerometer, gyroscope, activity detection)
|
|
11
|
+
* - Weather API (temperature, humidity, conditions)
|
|
12
|
+
*
|
|
13
|
+
* Calculates environmental XP modifiers (1.0x - 3.0x) based on activity
|
|
14
|
+
* type, weather conditions, altitude, and time of day.
|
|
15
|
+
*
|
|
16
|
+
* Error Recovery Features:
|
|
17
|
+
* - Retry logic with exponential backoff for failed sensor reads
|
|
18
|
+
* - Sensor health monitoring and status tracking
|
|
19
|
+
* - "Last known good" fallback values when sensors fail
|
|
20
|
+
* - Graceful degradation when individual sensors fail
|
|
21
|
+
* - Failure logging with timestamps
|
|
22
|
+
* - Recovery notifications
|
|
23
|
+
*/
|
|
24
|
+
export declare class EnvironmentalSensors {
|
|
25
|
+
private permissions;
|
|
26
|
+
private geolocation;
|
|
27
|
+
private motion;
|
|
28
|
+
private weather;
|
|
29
|
+
private logger;
|
|
30
|
+
private context;
|
|
31
|
+
private sensorStatuses;
|
|
32
|
+
private failureLog;
|
|
33
|
+
private lastKnownGood;
|
|
34
|
+
private recoveryCallbacks;
|
|
35
|
+
private retryConfig;
|
|
36
|
+
private xpConfig;
|
|
37
|
+
/**
|
|
38
|
+
* Initialize environmental sensors with optional weather API key, retry config, or full config
|
|
39
|
+
*
|
|
40
|
+
* Supports multiple constructor signatures for backward compatibility:
|
|
41
|
+
* - new EnvironmentalSensors(apiKey)
|
|
42
|
+
* - new EnvironmentalSensors(apiKey, retryConfig)
|
|
43
|
+
* - new EnvironmentalSensors({ weather: { apiKey }, retry: {...} })
|
|
44
|
+
*
|
|
45
|
+
* @param {string | { weather?: Partial<WeatherSensorConfig>, geolocation?: Partial<GeolocationSensorConfig>, retry?: Partial<RetryConfig>, xpModifier?: Partial<XPModifierConfig> }} [weatherApiKeyOrConfig] - Weather API key or configuration object
|
|
46
|
+
* @param {Partial<SensorRetryConfig>} [retryConfig] - Optional custom retry configuration
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* const sensors = new EnvironmentalSensors(process.env.WEATHER_API_KEY);
|
|
50
|
+
* const sensors2 = new EnvironmentalSensors({ weather: { apiKey }, retry: { maxRetries: 5 } });
|
|
51
|
+
*/
|
|
52
|
+
constructor(weatherApiKeyOrConfig?: string | {
|
|
53
|
+
weather?: Partial<WeatherSensorConfig>;
|
|
54
|
+
geolocation?: Partial<GeolocationSensorConfig>;
|
|
55
|
+
retry?: Partial<RetryConfig>;
|
|
56
|
+
xpModifier?: Partial<XPModifierConfig>;
|
|
57
|
+
}, retryConfig?: Partial<SensorRetryConfig>);
|
|
58
|
+
/**
|
|
59
|
+
* Initialize sensor statuses to 'unknown' state
|
|
60
|
+
*/
|
|
61
|
+
private initializeSensorStatuses;
|
|
62
|
+
/**
|
|
63
|
+
* Update sensor health status after a success or failure
|
|
64
|
+
*/
|
|
65
|
+
private updateSensorStatus;
|
|
66
|
+
/**
|
|
67
|
+
* Notify registered callbacks of sensor recovery events
|
|
68
|
+
*/
|
|
69
|
+
private notifyRecovery;
|
|
70
|
+
/**
|
|
71
|
+
* Log a sensor failure event
|
|
72
|
+
*/
|
|
73
|
+
private logFailure;
|
|
74
|
+
/**
|
|
75
|
+
* Store last known good value for a sensor
|
|
76
|
+
*/
|
|
77
|
+
private storeLastKnownGood;
|
|
78
|
+
/**
|
|
79
|
+
* Execute a sensor operation with retry logic and exponential backoff
|
|
80
|
+
*/
|
|
81
|
+
private retrySensorOperation;
|
|
82
|
+
/**
|
|
83
|
+
* Delay helper for retry backoff
|
|
84
|
+
*/
|
|
85
|
+
private delay;
|
|
86
|
+
/**
|
|
87
|
+
* Register a callback for sensor recovery notifications
|
|
88
|
+
*
|
|
89
|
+
* @param callback - Function to call when sensor status changes
|
|
90
|
+
* @returns Unsubscribe function
|
|
91
|
+
*/
|
|
92
|
+
onSensorRecovery(callback: (notification: SensorRecoveryNotification) => void): () => void;
|
|
93
|
+
/**
|
|
94
|
+
* Get current status of a specific sensor
|
|
95
|
+
*/
|
|
96
|
+
getSensorStatus(sensorType: SensorType): SensorStatus | null;
|
|
97
|
+
/**
|
|
98
|
+
* Get status of all sensors
|
|
99
|
+
*/
|
|
100
|
+
getAllSensorStatuses(): SensorStatus[];
|
|
101
|
+
/**
|
|
102
|
+
* Get failure log entries
|
|
103
|
+
*
|
|
104
|
+
* @param sensorType - Optional filter by sensor type
|
|
105
|
+
* @param limit - Maximum number of entries to return (default: all)
|
|
106
|
+
*/
|
|
107
|
+
getFailureLog(sensorType?: SensorType, limit?: number): SensorFailureLog[];
|
|
108
|
+
/**
|
|
109
|
+
* Get last known good value for a sensor
|
|
110
|
+
*/
|
|
111
|
+
getLastKnownGood(sensorType: SensorType): any;
|
|
112
|
+
/**
|
|
113
|
+
* Clear failure log
|
|
114
|
+
*/
|
|
115
|
+
clearFailureLog(): void;
|
|
116
|
+
/**
|
|
117
|
+
* Update retry configuration
|
|
118
|
+
*/
|
|
119
|
+
updateRetryConfig(config: Partial<SensorRetryConfig>): void;
|
|
120
|
+
/**
|
|
121
|
+
* Request user permissions for specific sensor types
|
|
122
|
+
*
|
|
123
|
+
* Requests browser/device permissions for GPS, motion, and weather sensors.
|
|
124
|
+
* User must explicitly grant permissions before data can be accessed.
|
|
125
|
+
*
|
|
126
|
+
* @param {SensorType[]} types - Array of sensor types to request ('geolocation' | 'motion' | 'weather')
|
|
127
|
+
* @returns {Promise<SensorPermission[]>} Array of permission results (granted/denied)
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* const permissions = await sensors.requestPermissions(['geolocation', 'motion']);
|
|
131
|
+
*/
|
|
132
|
+
requestPermissions(types: SensorType[]): Promise<SensorPermission[]>;
|
|
133
|
+
/**
|
|
134
|
+
* Start monitoring enabled sensors
|
|
135
|
+
*/
|
|
136
|
+
startMonitoring(callback?: (context: EnvironmentalContext) => void): void;
|
|
137
|
+
/**
|
|
138
|
+
* Stop all monitoring
|
|
139
|
+
*/
|
|
140
|
+
stopMonitoring(): void;
|
|
141
|
+
/**
|
|
142
|
+
* Manually update snapshot of pull-based sensors (Geo, Weather) with retry logic
|
|
143
|
+
*/
|
|
144
|
+
updateSnapshot(): Promise<EnvironmentalContext>;
|
|
145
|
+
/**
|
|
146
|
+
* Calculate XP modifier based on environmental factors
|
|
147
|
+
* Uses last known good values if current readings are unavailable
|
|
148
|
+
* Uses configured max modifier cap (default: 3.0x)
|
|
149
|
+
*/
|
|
150
|
+
calculateXPModifier(): number;
|
|
151
|
+
/**
|
|
152
|
+
* Get detailed breakdown of XP modifier with active bonus sources
|
|
153
|
+
* Uses last known good values if current readings are unavailable
|
|
154
|
+
* @returns XpModifierBreakdown with total, sources, and active bonuses
|
|
155
|
+
*/
|
|
156
|
+
getXpModifierBreakdown(): XpModifierBreakdown;
|
|
157
|
+
/**
|
|
158
|
+
* Calculate XP modifier based on environmental factors including forecast
|
|
159
|
+
* Considers incoming weather for bonus XP
|
|
160
|
+
* Uses configured max modifier cap (default: 3.0x)
|
|
161
|
+
* @param forecastHours Hours ahead to check for incoming weather (default: 12)
|
|
162
|
+
* @returns Promise resolving to XP modifier value
|
|
163
|
+
*/
|
|
164
|
+
calculateXPModifierWithForecast(forecastHours?: number): Promise<number>;
|
|
165
|
+
/**
|
|
166
|
+
* Calculate XP modifier based on environmental factors including severe weather detection
|
|
167
|
+
* Considers current severe weather conditions for maximum XP bonus
|
|
168
|
+
* Uses configured max modifier cap (default: 3.0x)
|
|
169
|
+
* @returns Promise resolving to XP modifier value and any severe weather alert
|
|
170
|
+
*/
|
|
171
|
+
calculateXPModifierWithSevereWeather(): Promise<{
|
|
172
|
+
modifier: number;
|
|
173
|
+
severeWeatherAlert: SevereWeatherAlert | null;
|
|
174
|
+
safetyWarning: string | null;
|
|
175
|
+
}>;
|
|
176
|
+
/**
|
|
177
|
+
* Detect severe weather from current environmental conditions
|
|
178
|
+
* Falls back to last known good weather if current is unavailable
|
|
179
|
+
* @returns Severe weather alert or null if conditions are normal
|
|
180
|
+
*/
|
|
181
|
+
detectSevereWeather(): SevereWeatherAlert | null;
|
|
182
|
+
/**
|
|
183
|
+
* Get safety warning for current severe weather conditions
|
|
184
|
+
* @returns Safety warning message or null if no severe weather
|
|
185
|
+
*/
|
|
186
|
+
getSevereWeatherWarning(): string | null;
|
|
187
|
+
getPermissions(): SensorPermission[];
|
|
188
|
+
checkAvailability(type: SensorType): boolean;
|
|
189
|
+
private requestGeolocationPermission;
|
|
190
|
+
private requestMotionPermission;
|
|
191
|
+
/**
|
|
192
|
+
* Get current activity type with fallback to last known good
|
|
193
|
+
*/
|
|
194
|
+
getCurrentActivity(): 'stationary' | 'walking' | 'running' | 'driving' | 'unknown';
|
|
195
|
+
/**
|
|
196
|
+
* Get comprehensive diagnostic information for troubleshooting
|
|
197
|
+
* Returns structured data about all sensor states, cache statistics, and recent failures
|
|
198
|
+
*
|
|
199
|
+
* @returns Diagnostic report containing sensor statuses, cache stats, performance metrics, and recent errors
|
|
200
|
+
*/
|
|
201
|
+
getDiagnostics(): {
|
|
202
|
+
timestamp: number;
|
|
203
|
+
diagnosticMode: boolean;
|
|
204
|
+
sensors: {
|
|
205
|
+
type: SensorType;
|
|
206
|
+
status: SensorStatus;
|
|
207
|
+
permission: boolean;
|
|
208
|
+
availability: boolean;
|
|
209
|
+
lastKnownGood: any;
|
|
210
|
+
}[];
|
|
211
|
+
cache: {
|
|
212
|
+
geolocation: {
|
|
213
|
+
age: number | null;
|
|
214
|
+
isExpired: boolean;
|
|
215
|
+
stats: {
|
|
216
|
+
hits: number;
|
|
217
|
+
misses: number;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
weather: {
|
|
221
|
+
size: number;
|
|
222
|
+
stats: {
|
|
223
|
+
hits: number;
|
|
224
|
+
misses: number;
|
|
225
|
+
};
|
|
226
|
+
ttl: number;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
performance: {
|
|
230
|
+
weatherApi: {
|
|
231
|
+
average: number;
|
|
232
|
+
min: number;
|
|
233
|
+
max: number;
|
|
234
|
+
totalCalls: number;
|
|
235
|
+
successRate: number;
|
|
236
|
+
p95: number;
|
|
237
|
+
p99: number;
|
|
238
|
+
};
|
|
239
|
+
forecastApi: {
|
|
240
|
+
average: number;
|
|
241
|
+
min: number;
|
|
242
|
+
max: number;
|
|
243
|
+
totalCalls: number;
|
|
244
|
+
successRate: number;
|
|
245
|
+
p95: number;
|
|
246
|
+
p99: number;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
recentFailures: SensorFailureLog[];
|
|
250
|
+
permissions: SensorPermission[];
|
|
251
|
+
context: {
|
|
252
|
+
hasGeolocation: boolean;
|
|
253
|
+
hasMotion: boolean;
|
|
254
|
+
hasWeather: boolean;
|
|
255
|
+
hasBiome: boolean;
|
|
256
|
+
timestamp: number;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* Enable diagnostic mode for enhanced logging and debugging
|
|
261
|
+
* Sets global logger to DEBUG level
|
|
262
|
+
*/
|
|
263
|
+
enableDiagnosticMode(): void;
|
|
264
|
+
/**
|
|
265
|
+
* Disable diagnostic mode and reset to normal logging
|
|
266
|
+
* Resets global logger to INFO level
|
|
267
|
+
*/
|
|
268
|
+
disableDiagnosticMode(): void;
|
|
269
|
+
/**
|
|
270
|
+
* Print a formatted dashboard to the console with sensor status information
|
|
271
|
+
* Useful for debugging and monitoring during development
|
|
272
|
+
*
|
|
273
|
+
* @param config Optional dashboard configuration (colors, compact mode, etc.)
|
|
274
|
+
*
|
|
275
|
+
* @example
|
|
276
|
+
* sensors.printDashboard();
|
|
277
|
+
* sensors.printDashboard({ useColors: false, compact: true });
|
|
278
|
+
*/
|
|
279
|
+
printDashboard(config?: DashboardConfig): void;
|
|
280
|
+
/**
|
|
281
|
+
* Get solar information including sunrise, sunset, and day stage.
|
|
282
|
+
* Works WITHOUT API key using astronomical calculations (NOAA algorithm).
|
|
283
|
+
* Uses current geolocation if available.
|
|
284
|
+
*
|
|
285
|
+
* @param date - Optional date for calculation (defaults to now)
|
|
286
|
+
* @returns SolarInfo object with sunrise, sunset, solar noon, and day stage, or null if no location available
|
|
287
|
+
*/
|
|
288
|
+
getSolarInfo(date?: Date): SolarInfo | null;
|
|
289
|
+
/**
|
|
290
|
+
* Get solar information for specific coordinates.
|
|
291
|
+
* Works WITHOUT API key using astronomical calculations (NOAA algorithm).
|
|
292
|
+
* Use this when you have coordinates from an external source (e.g., persisted React state).
|
|
293
|
+
*
|
|
294
|
+
* @param latitude - Latitude in decimal degrees (-90 to 90)
|
|
295
|
+
* @param longitude - Longitude in decimal degrees (-180 to 180)
|
|
296
|
+
* @param date - Optional date for calculation (defaults to now)
|
|
297
|
+
* @returns SolarInfo object with sunrise, sunset, solar noon, and day stage
|
|
298
|
+
*/
|
|
299
|
+
getSolarInfoForCoords(latitude: number, longitude: number, date?: Date): SolarInfo;
|
|
300
|
+
}
|
|
301
|
+
//# sourceMappingURL=EnvironmentalSensors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentalSensors.d.ts","sourceRoot":"","sources":["../../../src/core/sensors/EnvironmentalSensors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EAEpB,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,0BAA0B,EAK1B,mBAAmB,EACnB,SAAS,EACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAG7H,OAAO,EAAoB,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE/E,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEvF;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,oBAAoB;IAC7B,OAAO,CAAC,WAAW,CAAuC;IAC1D,OAAO,CAAC,WAAW,CAAsB;IACzC,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,OAAO,CAAmB;IAClC,OAAO,CAAC,MAAM,CAAsC;IAEpD,OAAO,CAAC,OAAO,CAEb;IAGF,OAAO,CAAC,cAAc,CAA4C;IAClE,OAAO,CAAC,UAAU,CAA0B;IAC5C,OAAO,CAAC,aAAa,CAIN;IACf,OAAO,CAAC,iBAAiB,CAAsE;IAG/F,OAAO,CAAC,WAAW,CAMjB;IAGF,OAAO,CAAC,QAAQ,CAad;IAEF;;;;;;;;;;;;;;OAcG;gBACS,qBAAqB,CAAC,EAAE,MAAM,GAAG;QAAE,OAAO,CAAC,EAAE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,IAAI,GAAG,SAAS,GAAG,IAAI;IAQ3C;;;;;;;;;OASG;IACH,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS;CAGrF"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import type { GamingContext } from '../types/Progression';
|
|
2
|
+
import type { GamingSensorConfig } from '../config/sensorConfig.js';
|
|
3
|
+
import { type DashboardConfig } from '../../utils/sensorDashboard.js';
|
|
4
|
+
/**
|
|
5
|
+
* GamingPlatformSensors - Unified interface for gaming detection
|
|
6
|
+
* Monitors active games and calculates gaming-based XP bonuses
|
|
7
|
+
*
|
|
8
|
+
* Game detection uses Steam API only.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GamingPlatformSensors {
|
|
11
|
+
private steam;
|
|
12
|
+
private steamUserId?;
|
|
13
|
+
private steamApiKey?;
|
|
14
|
+
private pollIntervalMs;
|
|
15
|
+
private pollingInterval;
|
|
16
|
+
private exponentialBackoff;
|
|
17
|
+
private maxBackoffMs;
|
|
18
|
+
private logger;
|
|
19
|
+
private xpConfig;
|
|
20
|
+
private gamingContext;
|
|
21
|
+
private contextCallback;
|
|
22
|
+
private gameMetadataCache;
|
|
23
|
+
private cacheExpiryMs;
|
|
24
|
+
/**
|
|
25
|
+
* Initialize GamingPlatformSensors with optional Steam configuration
|
|
26
|
+
* Matches specification from specs/001-core-engine/SPEC.md
|
|
27
|
+
*
|
|
28
|
+
* Supports both legacy config format and new GamingSensorConfig format
|
|
29
|
+
*/
|
|
30
|
+
constructor(config?: {
|
|
31
|
+
steam?: {
|
|
32
|
+
apiKey: string;
|
|
33
|
+
steamId?: string;
|
|
34
|
+
pollInterval?: number;
|
|
35
|
+
};
|
|
36
|
+
} | GamingSensorConfig);
|
|
37
|
+
/**
|
|
38
|
+
* Authenticate with Steam
|
|
39
|
+
*/
|
|
40
|
+
authenticate(steamUserId?: string): Promise<boolean>;
|
|
41
|
+
/**
|
|
42
|
+
* Start polling for gaming activity
|
|
43
|
+
*/
|
|
44
|
+
startMonitoring(callback?: (context: GamingContext) => void): void;
|
|
45
|
+
/**
|
|
46
|
+
* Stop monitoring gaming activity
|
|
47
|
+
*/
|
|
48
|
+
stopMonitoring(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Update gaming status from Steam
|
|
51
|
+
* Note: Only Steam API is used for game activity detection.
|
|
52
|
+
*/
|
|
53
|
+
private updateGamingStatus;
|
|
54
|
+
/**
|
|
55
|
+
* Apply exponential backoff for polling on errors
|
|
56
|
+
*/
|
|
57
|
+
private applyExponentialBackoff;
|
|
58
|
+
/**
|
|
59
|
+
* Get cached game metadata or fetch it
|
|
60
|
+
*/
|
|
61
|
+
private getGameMetadata;
|
|
62
|
+
/**
|
|
63
|
+
* Check if currently playing a specific game
|
|
64
|
+
*/
|
|
65
|
+
isPlayingGame(gameName: string): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Calculate gaming XP bonus multiplier
|
|
68
|
+
* Base: +25% for any gaming
|
|
69
|
+
* Genre bonuses: RPG +20%, Action +15%, Strategy +10%
|
|
70
|
+
* Multiplayer: +15% for party size > 1
|
|
71
|
+
* Session duration: up to +20% for 4+ hours
|
|
72
|
+
* Capped at configured max gaming modifier (default: 1.75x)
|
|
73
|
+
*/
|
|
74
|
+
calculateGamingBonus(): number;
|
|
75
|
+
/**
|
|
76
|
+
* Get current gaming context
|
|
77
|
+
*/
|
|
78
|
+
getContext(): GamingContext;
|
|
79
|
+
/**
|
|
80
|
+
* Add game to list of games played while listening
|
|
81
|
+
*/
|
|
82
|
+
recordGameSession(gameName: string, durationMinutes: number): void;
|
|
83
|
+
/**
|
|
84
|
+
* Get comprehensive diagnostic information for troubleshooting
|
|
85
|
+
* Returns structured data about gaming platform connection states, cache, and performance metrics
|
|
86
|
+
*
|
|
87
|
+
* @returns Diagnostic report containing Steam connection state, cache, and API performance
|
|
88
|
+
*/
|
|
89
|
+
getDiagnostics(): {
|
|
90
|
+
timestamp: number;
|
|
91
|
+
steam: {
|
|
92
|
+
isAuthenticated: boolean;
|
|
93
|
+
userId?: string;
|
|
94
|
+
apiKey: boolean;
|
|
95
|
+
};
|
|
96
|
+
gamingContext: GamingContext;
|
|
97
|
+
polling: {
|
|
98
|
+
isActive: boolean;
|
|
99
|
+
intervalMs: number;
|
|
100
|
+
exponentialBackoff: number;
|
|
101
|
+
};
|
|
102
|
+
cache: {
|
|
103
|
+
gameMetadataCacheSize: number;
|
|
104
|
+
cachedGames: string[];
|
|
105
|
+
};
|
|
106
|
+
performance: {
|
|
107
|
+
currentGameApi: {
|
|
108
|
+
average: number;
|
|
109
|
+
min: number;
|
|
110
|
+
max: number;
|
|
111
|
+
totalCalls: number;
|
|
112
|
+
successRate: number;
|
|
113
|
+
p95: number;
|
|
114
|
+
p99: number;
|
|
115
|
+
};
|
|
116
|
+
metadataApi: {
|
|
117
|
+
average: number;
|
|
118
|
+
min: number;
|
|
119
|
+
max: number;
|
|
120
|
+
totalCalls: number;
|
|
121
|
+
successRate: number;
|
|
122
|
+
p95: number;
|
|
123
|
+
p99: number;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Get game schema (achievements, stats) for a Steam app
|
|
129
|
+
* @param appId Steam app ID
|
|
130
|
+
* @returns Game schema containing achievements and player stats, or null if unavailable
|
|
131
|
+
*/
|
|
132
|
+
fetchGameSchema(appId: number): Promise<{
|
|
133
|
+
gameName?: string;
|
|
134
|
+
gameVersion?: string;
|
|
135
|
+
availableGameStats?: {
|
|
136
|
+
achievements?: Array<{
|
|
137
|
+
name: string;
|
|
138
|
+
displayName: string;
|
|
139
|
+
description?: string;
|
|
140
|
+
icon?: string;
|
|
141
|
+
hidden?: number;
|
|
142
|
+
}>;
|
|
143
|
+
stats?: Array<{
|
|
144
|
+
name: string;
|
|
145
|
+
displayName?: string;
|
|
146
|
+
value: number;
|
|
147
|
+
}>;
|
|
148
|
+
};
|
|
149
|
+
} | null>;
|
|
150
|
+
/**
|
|
151
|
+
* Print a formatted dashboard to the console with gaming sensor status information
|
|
152
|
+
* Useful for debugging and monitoring during development
|
|
153
|
+
*
|
|
154
|
+
* @param config Optional dashboard configuration (colors, compact mode, etc.)
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* gamingSensors.printDashboard();
|
|
158
|
+
* gamingSensors.printDashboard({ useColors: false, compact: true });
|
|
159
|
+
*/
|
|
160
|
+
printDashboard(config?: DashboardConfig): void;
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=GamingPlatformSensors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GamingPlatformSensors.d.ts","sourceRoot":"","sources":["../../../src/core/sensors/GamingPlatformSensors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAoB,MAAM,2BAA2B,CAAC;AAGtF,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEvF;;;;;GAKG;AACH,qBAAa,qBAAqB;IAC9B,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,eAAe,CAA+B;IACtD,OAAO,CAAC,kBAAkB,CAAa;IACvC,OAAO,CAAC,YAAY,CAAkB;IACtC,OAAO,CAAC,MAAM,CAAuC;IAGrD,OAAO,CAAC,QAAQ,CAad;IACF,OAAO,CAAC,aAAa,CAMnB;IACF,OAAO,CAAC,eAAe,CAAmD;IAG1E,OAAO,CAAC,iBAAiB,CAAqE;IAC9F,OAAO,CAAC,aAAa,CAAoB;IAEzC;;;;;OAKG;gBACS,MAAM,GAAE;QAChB,KAAK,CAAC,EAAE;YACJ,MAAM,EAAE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CAAC;gBACZ,UAAU,EAAE,MAAM,CAAC;gBACnB,WAAW,EAAE,MAAM,CAAC;gBACpB,GAAG,EAAE,MAAM,CAAC;gBACZ,GAAG,EAAE,MAAM,CAAC;aACf,CAAC;YACF,WAAW,EAAE;gBACT,OAAO,EAAE,MAAM,CAAC;gBAChB,GAAG,EAAE,MAAM,CAAC;gBACZ,GAAG,EAAE,MAAM,CAAC;gBACZ,UAAU,EAAE,MAAM,CAAC;gBACnB,WAAW,EAAE,MAAM,CAAC;gBACpB,GAAG,EAAE,MAAM,CAAC;gBACZ,GAAG,EAAE,MAAM,CAAC;aACf,CAAC;SACL,CAAC;KACL;IAyBD;;;;OAIG;IACG,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,kBAAkB,CAAC,EAAE;YACjB,YAAY,CAAC,EAAE,KAAK,CAAC;gBACjB,IAAI,EAAE,MAAM,CAAC;gBACb,WAAW,EAAE,MAAM,CAAC;gBACpB,WAAW,CAAC,EAAE,MAAM,CAAC;gBACrB,IAAI,CAAC,EAAE,MAAM,CAAC;gBACd,MAAM,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC,CAAC;YACH,KAAK,CAAC,EAAE,KAAK,CAAC;gBACV,IAAI,EAAE,MAAM,CAAC;gBACb,WAAW,CAAC,EAAE,MAAM,CAAC;gBACrB,KAAK,EAAE,MAAM,CAAC;aACjB,CAAC,CAAC;SACN,CAAC;KACL,GAAG,IAAI,CAAC;IAIT;;;;;;;;;OASG;IACH,cAAc,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI;CAGjD"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type { GeolocationData } from '../types/Environmental';
|
|
2
|
+
import type { GeolocationSensorConfig } from '../config/sensorConfig.js';
|
|
3
|
+
interface CacheStatistics {
|
|
4
|
+
hits: number;
|
|
5
|
+
misses: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class GeolocationProvider {
|
|
8
|
+
private cache;
|
|
9
|
+
private cacheTTL;
|
|
10
|
+
private cacheStats;
|
|
11
|
+
private useLocalStorage;
|
|
12
|
+
private logger;
|
|
13
|
+
constructor(cacheTTLMinutes?: number, useLocalStorage?: boolean);
|
|
14
|
+
constructor(config: GeolocationSensorConfig);
|
|
15
|
+
/**
|
|
16
|
+
* Check if localStorage is available
|
|
17
|
+
*/
|
|
18
|
+
private isLocalStorageAvailable;
|
|
19
|
+
/**
|
|
20
|
+
* Load cache from localStorage
|
|
21
|
+
*/
|
|
22
|
+
private loadFromLocalStorage;
|
|
23
|
+
/**
|
|
24
|
+
* Save cache to localStorage
|
|
25
|
+
*/
|
|
26
|
+
private saveToLocalStorage;
|
|
27
|
+
/**
|
|
28
|
+
* Check if a cache entry is still valid
|
|
29
|
+
* @param entry Cache entry to validate
|
|
30
|
+
* @returns True if entry is valid and within TTL
|
|
31
|
+
*/
|
|
32
|
+
private isCacheEntryValid;
|
|
33
|
+
/**
|
|
34
|
+
* Get the age of the cached position in milliseconds
|
|
35
|
+
* @returns Age in milliseconds, or null if no cache exists
|
|
36
|
+
*/
|
|
37
|
+
getCacheAge(): number | null;
|
|
38
|
+
/**
|
|
39
|
+
* Get the current position using the Geolocation API
|
|
40
|
+
* @param forceRefresh If true, bypass cache and fetch fresh position
|
|
41
|
+
* @returns Promise resolving to GeolocationData or null if failed/denied
|
|
42
|
+
*/
|
|
43
|
+
getCurrentPosition(forceRefresh?: boolean): Promise<GeolocationData | null>;
|
|
44
|
+
/**
|
|
45
|
+
* Invalidate all cached geolocation data
|
|
46
|
+
*/
|
|
47
|
+
invalidateCache(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Get cache statistics
|
|
50
|
+
* @returns Cache statistics object
|
|
51
|
+
*/
|
|
52
|
+
getCacheStats(): CacheStatistics;
|
|
53
|
+
/**
|
|
54
|
+
* Reset cache statistics
|
|
55
|
+
*/
|
|
56
|
+
resetCacheStats(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Check if cache is expired
|
|
59
|
+
* @returns True if cache is expired or doesn't exist
|
|
60
|
+
*/
|
|
61
|
+
isCacheExpired(): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Get the cached position without checking TTL
|
|
64
|
+
* @returns Cached position data or null if no cache exists
|
|
65
|
+
*/
|
|
66
|
+
getCachedPosition(): GeolocationData | null;
|
|
67
|
+
/**
|
|
68
|
+
* Calculate the biome based on coordinates (improved with longitude-based detection)
|
|
69
|
+
* In a real app, this would query a GIS service or use a sophisticated map.
|
|
70
|
+
* Here we use simple latitude/longitude heuristics for demonstration.
|
|
71
|
+
*
|
|
72
|
+
* The detection now considers:
|
|
73
|
+
* - Latitude bands (polar, temperate, tropical)
|
|
74
|
+
* - Longitude-based regional characteristics (continental vs coastal, desert belts)
|
|
75
|
+
* - Regional biome patterns based on global geography
|
|
76
|
+
* - Coastal vs inland detection (oceans, seas, islands, peninsulas)
|
|
77
|
+
* - Elevation/altitude when available (mountains, valleys)
|
|
78
|
+
*
|
|
79
|
+
* @param latitude Latitude coordinate
|
|
80
|
+
* @param longitude Longitude coordinate
|
|
81
|
+
* @param altitude Optional altitude in meters (null if unavailable)
|
|
82
|
+
* @returns Biome type string (may include _coastal suffix for coastal variants)
|
|
83
|
+
*/
|
|
84
|
+
getBiome(latitude: number, longitude: number, altitude?: number | null): string;
|
|
85
|
+
/**
|
|
86
|
+
* Determine biome based on elevation/altitude
|
|
87
|
+
*
|
|
88
|
+
* Elevation thresholds (based on common geographical classifications):
|
|
89
|
+
* - High mountain: >3500m (11,500ft) - permanent snow, alpine
|
|
90
|
+
* - Mountain: 1500-3500m (4,900-11,500ft) - mountain ranges
|
|
91
|
+
* - High plateau: 500-1500m (1,600-4,900ft) - transitional
|
|
92
|
+
* - Valley/below sea level: <0m - depressions, rift valleys
|
|
93
|
+
*
|
|
94
|
+
* When altitude data is valid and indicates mountain or valley terrain,
|
|
95
|
+
* return the appropriate biome. Otherwise return null to fall back to
|
|
96
|
+
* coordinate-based detection.
|
|
97
|
+
*
|
|
98
|
+
* @param altitude Altitude in meters
|
|
99
|
+
* @param coastalSuffix The coastal suffix to apply if needed
|
|
100
|
+
* @returns Biome string if elevation indicates mountain/valley, null otherwise
|
|
101
|
+
*/
|
|
102
|
+
private getElevationBiome;
|
|
103
|
+
/**
|
|
104
|
+
* Normalize longitude to 0-360 range for easier region checking
|
|
105
|
+
*/
|
|
106
|
+
private normalizeLongitude;
|
|
107
|
+
/**
|
|
108
|
+
* Check if coordinates fall within jungle regions (dense tropical rainforests)
|
|
109
|
+
* Jungle is a subtype of forest - specifically dense tropical forests
|
|
110
|
+
*/
|
|
111
|
+
private isInJungleRegion;
|
|
112
|
+
/**
|
|
113
|
+
* Check if coordinates fall within swamp/wetland regions
|
|
114
|
+
*/
|
|
115
|
+
private isInSwampRegion;
|
|
116
|
+
/**
|
|
117
|
+
* Check if coordinates fall within taiga (boreal forest) regions
|
|
118
|
+
* Taiga is between 50-70° latitude in northern hemisphere
|
|
119
|
+
*/
|
|
120
|
+
private isInTaigaRegion;
|
|
121
|
+
/**
|
|
122
|
+
* Check if coordinates fall within savanna (tropical grassland) regions
|
|
123
|
+
*/
|
|
124
|
+
private isInSavannaRegion;
|
|
125
|
+
/**
|
|
126
|
+
* Check if coordinates fall within known desert regions
|
|
127
|
+
* Uses latitude bands around 30° N/S and longitude ranges for major deserts
|
|
128
|
+
*/
|
|
129
|
+
private isInDesertRegion;
|
|
130
|
+
/**
|
|
131
|
+
* Check if coordinates are near a coastline (coastal vs inland detection)
|
|
132
|
+
* Uses heuristic patterns based on proximity to oceans and major coastlines
|
|
133
|
+
*
|
|
134
|
+
* This is a simplified heuristic approach. In a production system, this would use:
|
|
135
|
+
* - A GIS service with coastline proximity data
|
|
136
|
+
* - A pre-computed coastline database with distance calculations
|
|
137
|
+
* - Or reverse geocoding to check for "ocean" in location names
|
|
138
|
+
*
|
|
139
|
+
* @param latitude Latitude coordinate
|
|
140
|
+
* @param longitude Longitude coordinate (normalized 0-360)
|
|
141
|
+
* @returns true if the location is likely coastal, false if inland
|
|
142
|
+
*/
|
|
143
|
+
private isCoastal;
|
|
144
|
+
/**
|
|
145
|
+
* Check if coordinates are in a small island region
|
|
146
|
+
* Small islands are always considered coastal
|
|
147
|
+
*/
|
|
148
|
+
private isInSmallIslandRegion;
|
|
149
|
+
/**
|
|
150
|
+
* Check if coordinates are in a narrow landmass (isthmus or peninsula)
|
|
151
|
+
* These regions are typically coastal on at least one side
|
|
152
|
+
*/
|
|
153
|
+
private isInNarrowLandmass;
|
|
154
|
+
}
|
|
155
|
+
export {};
|
|
156
|
+
//# sourceMappingURL=GeolocationProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeolocationProvider.d.ts","sourceRoot":"","sources":["../../../src/core/sensors/GeolocationProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAQzE,UAAU,eAAe;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB;AAWD,qBAAa,mBAAmB;IAC5B,OAAO,CAAC,KAAK,CAA2B;IACxC,OAAO,CAAC,QAAQ,CAAyB;IACzC,OAAO,CAAC,UAAU,CAA2C;IAC7D,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,MAAM,CAAqC;gBAEvC,eAAe,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,OAAO;gBACnD,MAAM,EAAE,uBAAuB;IAiB3C;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAW/B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAiB5B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAY1B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAMzB;;;OAGG;I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