@aura3d/scripting 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/AnimationVisualNodes.d.ts +1 -1
  2. package/dist/Behavior.d.ts +1 -1
  3. package/dist/BehaviorHost.d.ts +1 -1
  4. package/dist/BehaviorRegistry.d.ts +1 -1
  5. package/dist/BehaviorSystem.d.ts +2 -2
  6. package/dist/HTN.d.ts +1 -1
  7. package/dist/ScriptContext.d.ts +1 -1
  8. package/dist/StateMachine.d.ts +1 -1
  9. package/dist/UtilityAI.d.ts +1 -1
  10. package/dist/VisualGraph.d.ts +2 -2
  11. package/dist/VisualGraphExecutor.d.ts +2 -2
  12. package/dist/VisualNodeCatalog.d.ts +1 -1
  13. package/dist/index.d.ts +37 -37
  14. package/package.json +1 -1
  15. package/dist/AdaptiveDifficultyFixtures.d.ts +0 -58
  16. package/dist/AdaptiveDifficultyFixtures.d.ts.map +0 -1
  17. package/dist/AdaptiveDifficultyFixtures.js +0 -228
  18. package/dist/AdaptiveDifficultyFixtures.js.map +0 -1
  19. package/dist/AnalyticsPrivacyFixtures.d.ts +0 -63
  20. package/dist/AnalyticsPrivacyFixtures.d.ts.map +0 -1
  21. package/dist/AnalyticsPrivacyFixtures.js +0 -120
  22. package/dist/AnalyticsPrivacyFixtures.js.map +0 -1
  23. package/dist/CartoonNodeCategories.d.ts +0 -3
  24. package/dist/CartoonNodeCategories.d.ts.map +0 -1
  25. package/dist/CartoonNodeCategories.js +0 -9
  26. package/dist/CartoonNodeCategories.js.map +0 -1
  27. package/dist/CartoonVisualNodes.d.ts +0 -3
  28. package/dist/CartoonVisualNodes.d.ts.map +0 -1
  29. package/dist/CartoonVisualNodes.js +0 -41
  30. package/dist/CartoonVisualNodes.js.map +0 -1
  31. package/dist/CloudServiceFixtures.d.ts +0 -81
  32. package/dist/CloudServiceFixtures.d.ts.map +0 -1
  33. package/dist/CloudServiceFixtures.js +0 -144
  34. package/dist/CloudServiceFixtures.js.map +0 -1
  35. package/dist/CulturalBehaviorFixtures.d.ts +0 -75
  36. package/dist/CulturalBehaviorFixtures.d.ts.map +0 -1
  37. package/dist/CulturalBehaviorFixtures.js +0 -180
  38. package/dist/CulturalBehaviorFixtures.js.map +0 -1
  39. package/dist/LearningAgentFixtures.d.ts +0 -60
  40. package/dist/LearningAgentFixtures.d.ts.map +0 -1
  41. package/dist/LearningAgentFixtures.js +0 -122
  42. package/dist/LearningAgentFixtures.js.map +0 -1
  43. package/dist/NetworkReplicationFixtures.d.ts +0 -82
  44. package/dist/NetworkReplicationFixtures.d.ts.map +0 -1
  45. package/dist/NetworkReplicationFixtures.js +0 -330
  46. package/dist/NetworkReplicationFixtures.js.map +0 -1
  47. package/dist/PlayerBehaviorTelemetryFixtures.d.ts +0 -74
  48. package/dist/PlayerBehaviorTelemetryFixtures.d.ts.map +0 -1
  49. package/dist/PlayerBehaviorTelemetryFixtures.js +0 -189
  50. package/dist/PlayerBehaviorTelemetryFixtures.js.map +0 -1
  51. package/dist/ProceduralContentAdaptationFixtures.d.ts +0 -52
  52. package/dist/ProceduralContentAdaptationFixtures.d.ts.map +0 -1
  53. package/dist/ProceduralContentAdaptationFixtures.js +0 -149
  54. package/dist/ProceduralContentAdaptationFixtures.js.map +0 -1
@@ -1,3 +1,3 @@
1
- import type { VisualNodeDefinition } from "./VisualNodeCatalog";
1
+ import type { VisualNodeDefinition } from "./VisualNodeCatalog.js";
2
2
  export declare const animationVisualNodeDefinitions: readonly VisualNodeDefinition[];
3
3
  //# sourceMappingURL=AnimationVisualNodes.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { ScriptContext } from "./ScriptContext";
1
+ import type { ScriptContext } from "./ScriptContext.js";
2
2
  export interface Behavior {
3
3
  enabled?: boolean;
4
4
  onStart?(context: ScriptContext): void | Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { Behavior } from "./Behavior";
1
+ import type { Behavior } from "./Behavior.js";
2
2
  export interface BehaviorHostOptions {
3
3
  readonly target?: unknown;
4
4
  }
@@ -1,4 +1,4 @@
1
- import type { Behavior } from "./Behavior";
1
+ import type { Behavior } from "./Behavior.js";
2
2
  export type BehaviorFactory<T extends Behavior = Behavior> = () => T;
3
3
  export declare class BehaviorRegistry {
4
4
  private readonly factories;
@@ -1,5 +1,5 @@
1
- import type { Behavior, BehaviorPhase } from "./Behavior";
2
- import type { BehaviorHost } from "./BehaviorHost";
1
+ import type { Behavior, BehaviorPhase } from "./Behavior.js";
2
+ import type { BehaviorHost } from "./BehaviorHost.js";
3
3
  export interface BehaviorError {
4
4
  readonly phase: BehaviorPhase;
5
5
  readonly behavior: Behavior;
package/dist/HTN.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { WorldState, type GOAPStateShape } from "./GOAP";
1
+ import { WorldState, type GOAPStateShape } from "./GOAP.js";
2
2
  export type HTNTaskResult = "success" | "running" | "failure";
3
3
  export type HTNTaskType = "primitive" | "compound";
4
4
  export interface HTNTaskMethod {
@@ -1,4 +1,4 @@
1
- import type { BehaviorPhase } from "./Behavior";
1
+ import type { BehaviorPhase } from "./Behavior.js";
2
2
  export interface ScriptContextOptions {
3
3
  readonly phase: BehaviorPhase;
4
4
  readonly deltaSeconds?: number;
@@ -1,4 +1,4 @@
1
- import { Blackboard, type BlackboardValue } from "./BehaviorTree";
1
+ import { Blackboard, type BlackboardValue } from "./BehaviorTree.js";
2
2
  export type StateTransitionCondition = (blackboard: Blackboard) => boolean;
3
3
  export interface StateTransition {
4
4
  readonly targetState: string;
@@ -1,4 +1,4 @@
1
- import type { Blackboard } from "./BehaviorTree";
1
+ import type { Blackboard } from "./BehaviorTree.js";
2
2
  export type UtilityCurve = "linear" | "inverse" | "quadratic" | "cubic" | "boolean" | "logistic";
3
3
  export type UtilityScoring = "multiply" | "average" | "min" | "max" | "sum";
4
4
  export interface UtilityContext {
@@ -1,5 +1,5 @@
1
- import { type VisualNode } from "./VisualNode";
2
- import { type VisualGraphValidationOptions } from "./VisualGraphContext";
1
+ import { type VisualNode } from "./VisualNode.js";
2
+ import { type VisualGraphValidationOptions } from "./VisualGraphContext.js";
3
3
  export interface VisualEdge {
4
4
  readonly fromNode: string;
5
5
  readonly fromPort: string;
@@ -1,5 +1,5 @@
1
- import { type VisualGraph } from "./VisualGraph";
2
- import { type VisualGraphDiagnostic, type VisualGraphExecutionContext, type VisualGraphSideEffect } from "./VisualGraphContext";
1
+ import { type VisualGraph } from "./VisualGraph.js";
2
+ import { type VisualGraphDiagnostic, type VisualGraphExecutionContext, type VisualGraphSideEffect } from "./VisualGraphContext.js";
3
3
  export interface VisualExecutionResult {
4
4
  readonly values: ReadonlyMap<string, unknown>;
5
5
  readonly executionOrder: readonly string[];
@@ -1,4 +1,4 @@
1
- import { type VisualNode, type VisualPort } from "./VisualNode";
1
+ import { type VisualNode, type VisualPort } from "./VisualNode.js";
2
2
  export type VisualNodeCategory = "value" | "math" | "logic" | "flow" | "debug" | "runtime" | "input" | "animation" | "physics" | "combat" | "scene" | "dialogue" | "audio" | "timing" | "publishing" | "camera" | "evidence";
3
3
  export interface VisualNodeDefinition {
4
4
  readonly kind: string;
package/dist/index.d.ts CHANGED
@@ -1,38 +1,38 @@
1
- export type { Behavior, BehaviorPhase } from "./Behavior";
2
- export { BehaviorAction, BehaviorCondition, BehaviorSelector, BehaviorSequence, BehaviorTree, BehaviorTreeNode, Blackboard } from "./BehaviorTree";
3
- export type { BehaviorTreeContext, BehaviorTreeStatus, BehaviorTreeTickResult, BlackboardChange, BlackboardValue } from "./BehaviorTree";
4
- export { PerceptionSensor } from "./Perception";
5
- export type { PerceptionHit, PerceptionMemory, PerceptionPoint, PerceptionSensorOptions, PerceptionSnapshot, PerceptionTarget } from "./Perception";
6
- export { UtilityAI, UtilityAction, UtilityConsideration } from "./UtilityAI";
7
- export type { UtilityActionOptions, UtilityActionScore, UtilityConsiderationOptions, UtilityContext, UtilityCurve, UtilityScoring } from "./UtilityAI";
8
- export { State, StateMachine } from "./StateMachine";
9
- export type { StateMachineSnapshot, StateTransition, StateTransitionCondition } from "./StateMachine";
10
- export { GOAPAction, GOAPPlanner, WorldState } from "./GOAP";
11
- export type { GOAPActionOptions, GOAPPlan, GOAPPlannerOptions, GOAPStateShape, GOAPValue } from "./GOAP";
12
- export { HTNPlanner, HTNTask } from "./HTN";
13
- export type { HTNCompoundTaskOptions, HTNPlan, HTNPlannerOptions, HTNPrimitiveTaskOptions, HTNTaskMethod, HTNTaskResult, HTNTaskType } from "./HTN";
14
- export { DecisionTree } from "./DecisionTree";
15
- export type { DecisionAction, DecisionCondition, DecisionTreeContext, DecisionTreeDecision, DecisionTreeNode, DecisionTreeNodeType, DecisionTreeStats } from "./DecisionTree";
16
- export { sampleFpsEnemyTactics, sampleFpsHudOverlay, sampleFpsLevelLayout, sampleFpsWeaponCycle, samplePowerUpEffect, sampleSpaceShooterWave, sampleWeaponBurst } from "./WeaponSystem";
17
- export type { FpsEnemyTacticalState, FpsEnemyTacticsInput, FpsEnemyTacticsSample, FpsFiringMode, FpsHudOverlayInput, FpsHudOverlaySample, FpsLevelCorridor, FpsLevelLayoutInput, FpsLevelLayoutSample, FpsLevelPickup, FpsLevelPoint, FpsLevelRoom, FpsPickupType, FpsWeaponCycleInput, FpsWeaponCycleSample, FpsWeaponType, PowerUpEffectInput, PowerUpEffectSample, SpaceShooterEnemyType, SpaceShooterFormation, SpaceShooterPowerUpType, SpaceShooterSpawn, SpaceShooterWaveInput, SpaceShooterWaveSample, WeaponBurst, WeaponBurstInput, WeaponKind, WeaponProjectile } from "./WeaponSystem";
18
- export { BehaviorHost } from "./BehaviorHost";
19
- export type { BehaviorHostOptions } from "./BehaviorHost";
20
- export { BehaviorRegistry } from "./BehaviorRegistry";
21
- export type { BehaviorFactory } from "./BehaviorRegistry";
22
- export { BehaviorSystem } from "./BehaviorSystem";
23
- export type { BehaviorError, BehaviorSystemUpdateOptions } from "./BehaviorSystem";
24
- export { ScriptContext } from "./ScriptContext";
25
- export type { ScriptContextOptions } from "./ScriptContext";
26
- export { deserializeGraph, serializeGraph, validateGraph } from "./VisualGraph";
27
- export type { SerializedVisualGraph, VisualEdge, VisualGraph } from "./VisualGraph";
28
- export { VisualGraphExecutor } from "./VisualGraphExecutor";
29
- export type { VisualExecutionResult } from "./VisualGraphExecutor";
30
- export type { VisualAnimationControllerState, VisualAnimationEvent, VisualCameraState, VisualCollisionEvent, VisualCombatEvent, VisualGraphDiagnostic, VisualGraphExecutionContext, VisualGraphSideEffect, VisualGraphValidationOptions, VisualInputSet, VisualInputSnapshot, VisualOverlapResult, VisualPhysicsBodyState, VisualRaycastHit, VisualRuntimeNodeState, VisualStateCollection, VisualVector3 } from "./VisualGraphContext";
31
- export { createVisualNode, getVisualNodeDefinition, listVisualNodeDefinitions } from "./VisualNodeCatalog";
32
- export type { VisualNodeCategory, VisualNodeDefinition } from "./VisualNodeCatalog";
33
- export { animationNodeCategories } from "./AnimationNodeCategories";
34
- export type { AnimationNodeCategory } from "./AnimationNodeCategories";
35
- export { animationVisualNodeDefinitions } from "./AnimationVisualNodes";
36
- export { validateNode } from "./VisualNode";
37
- export type { VisualNode, VisualPort, VisualPortDirection, VisualPortType } from "./VisualNode";
1
+ export type { Behavior, BehaviorPhase } from "./Behavior.js";
2
+ export { BehaviorAction, BehaviorCondition, BehaviorSelector, BehaviorSequence, BehaviorTree, BehaviorTreeNode, Blackboard } from "./BehaviorTree.js";
3
+ export type { BehaviorTreeContext, BehaviorTreeStatus, BehaviorTreeTickResult, BlackboardChange, BlackboardValue } from "./BehaviorTree.js";
4
+ export { PerceptionSensor } from "./Perception.js";
5
+ export type { PerceptionHit, PerceptionMemory, PerceptionPoint, PerceptionSensorOptions, PerceptionSnapshot, PerceptionTarget } from "./Perception.js";
6
+ export { UtilityAI, UtilityAction, UtilityConsideration } from "./UtilityAI.js";
7
+ export type { UtilityActionOptions, UtilityActionScore, UtilityConsiderationOptions, UtilityContext, UtilityCurve, UtilityScoring } from "./UtilityAI.js";
8
+ export { State, StateMachine } from "./StateMachine.js";
9
+ export type { StateMachineSnapshot, StateTransition, StateTransitionCondition } from "./StateMachine.js";
10
+ export { GOAPAction, GOAPPlanner, WorldState } from "./GOAP.js";
11
+ export type { GOAPActionOptions, GOAPPlan, GOAPPlannerOptions, GOAPStateShape, GOAPValue } from "./GOAP.js";
12
+ export { HTNPlanner, HTNTask } from "./HTN.js";
13
+ export type { HTNCompoundTaskOptions, HTNPlan, HTNPlannerOptions, HTNPrimitiveTaskOptions, HTNTaskMethod, HTNTaskResult, HTNTaskType } from "./HTN.js";
14
+ export { DecisionTree } from "./DecisionTree.js";
15
+ export type { DecisionAction, DecisionCondition, DecisionTreeContext, DecisionTreeDecision, DecisionTreeNode, DecisionTreeNodeType, DecisionTreeStats } from "./DecisionTree.js";
16
+ export { sampleFpsEnemyTactics, sampleFpsHudOverlay, sampleFpsLevelLayout, sampleFpsWeaponCycle, samplePowerUpEffect, sampleSpaceShooterWave, sampleWeaponBurst } from "./WeaponSystem.js";
17
+ export type { FpsEnemyTacticalState, FpsEnemyTacticsInput, FpsEnemyTacticsSample, FpsFiringMode, FpsHudOverlayInput, FpsHudOverlaySample, FpsLevelCorridor, FpsLevelLayoutInput, FpsLevelLayoutSample, FpsLevelPickup, FpsLevelPoint, FpsLevelRoom, FpsPickupType, FpsWeaponCycleInput, FpsWeaponCycleSample, FpsWeaponType, PowerUpEffectInput, PowerUpEffectSample, SpaceShooterEnemyType, SpaceShooterFormation, SpaceShooterPowerUpType, SpaceShooterSpawn, SpaceShooterWaveInput, SpaceShooterWaveSample, WeaponBurst, WeaponBurstInput, WeaponKind, WeaponProjectile } from "./WeaponSystem.js";
18
+ export { BehaviorHost } from "./BehaviorHost.js";
19
+ export type { BehaviorHostOptions } from "./BehaviorHost.js";
20
+ export { BehaviorRegistry } from "./BehaviorRegistry.js";
21
+ export type { BehaviorFactory } from "./BehaviorRegistry.js";
22
+ export { BehaviorSystem } from "./BehaviorSystem.js";
23
+ export type { BehaviorError, BehaviorSystemUpdateOptions } from "./BehaviorSystem.js";
24
+ export { ScriptContext } from "./ScriptContext.js";
25
+ export type { ScriptContextOptions } from "./ScriptContext.js";
26
+ export { deserializeGraph, serializeGraph, validateGraph } from "./VisualGraph.js";
27
+ export type { SerializedVisualGraph, VisualEdge, VisualGraph } from "./VisualGraph.js";
28
+ export { VisualGraphExecutor } from "./VisualGraphExecutor.js";
29
+ export type { VisualExecutionResult } from "./VisualGraphExecutor.js";
30
+ export type { VisualAnimationControllerState, VisualAnimationEvent, VisualCameraState, VisualCollisionEvent, VisualCombatEvent, VisualGraphDiagnostic, VisualGraphExecutionContext, VisualGraphSideEffect, VisualGraphValidationOptions, VisualInputSet, VisualInputSnapshot, VisualOverlapResult, VisualPhysicsBodyState, VisualRaycastHit, VisualRuntimeNodeState, VisualStateCollection, VisualVector3 } from "./VisualGraphContext.js";
31
+ export { createVisualNode, getVisualNodeDefinition, listVisualNodeDefinitions } from "./VisualNodeCatalog.js";
32
+ export type { VisualNodeCategory, VisualNodeDefinition } from "./VisualNodeCatalog.js";
33
+ export { animationNodeCategories } from "./AnimationNodeCategories.js";
34
+ export type { AnimationNodeCategory } from "./AnimationNodeCategories.js";
35
+ export { animationVisualNodeDefinitions } from "./AnimationVisualNodes.js";
36
+ export { validateNode } from "./VisualNode.js";
37
+ export type { VisualNode, VisualPort, VisualPortDirection, VisualPortType } from "./VisualNode.js";
38
38
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aura3d/scripting",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,58 +0,0 @@
1
- export type AdaptiveDifficultyMetricType = "win-rate" | "death-rate" | "completion-time" | "damage-taken" | "damage-dealt" | "accuracy" | "resource-efficiency" | "progression-rate" | "retry-count";
2
- export type AdaptiveDifficultyStrategy = "gradual" | "immediate" | "predictive" | "manual";
3
- export type AdaptiveDifficultyChangeType = "enemy-health" | "enemy-damage" | "enemy-count" | "resource-drop-rate" | "experience-multiplier" | "timer-multiplier" | "checkpoint-frequency";
4
- export interface AdaptiveDifficultyFixtureOptions {
5
- readonly strategy?: AdaptiveDifficultyStrategy;
6
- readonly recentDeaths?: number;
7
- readonly completionTimeSeconds?: number;
8
- readonly accuracy?: number;
9
- readonly resourceEfficiency?: number;
10
- readonly progressionRate?: number;
11
- readonly playerSkill?: number;
12
- readonly seed?: number;
13
- }
14
- export interface AdaptiveDifficultyMetricSummary {
15
- readonly type: AdaptiveDifficultyMetricType;
16
- readonly count: number;
17
- readonly mean: number;
18
- readonly median: number;
19
- readonly standardDeviation: number;
20
- readonly min: number;
21
- readonly max: number;
22
- readonly recentTrend: "improving" | "stable" | "declining";
23
- }
24
- export interface AdaptiveDifficultyTriggeredRule {
25
- readonly id: string;
26
- readonly metric: AdaptiveDifficultyMetricType;
27
- readonly strategy: AdaptiveDifficultyStrategy;
28
- readonly changeType: AdaptiveDifficultyChangeType;
29
- readonly target: number;
30
- readonly threshold: number;
31
- readonly rawMultiplier: number;
32
- readonly appliedMultiplier: number;
33
- readonly cooldownSeconds: number;
34
- readonly reason: string;
35
- }
36
- export interface AdaptiveDifficultyAdjustment {
37
- readonly enemyHealth: number;
38
- readonly enemyDamage: number;
39
- readonly enemyCount: number;
40
- readonly resourceDropRate: number;
41
- readonly experienceMultiplier: number;
42
- readonly timerMultiplier: number;
43
- readonly checkpointMultiplier: number;
44
- }
45
- export interface AdaptiveDifficultyFixture {
46
- readonly id: "external-parity-old-branch-adaptive-difficulty-fixture";
47
- readonly source: "origin-master-ai-balancing-smart-difficulty-adapted";
48
- readonly strategy: AdaptiveDifficultyStrategy;
49
- readonly metrics: readonly AdaptiveDifficultyMetricSummary[];
50
- readonly triggeredRules: readonly AdaptiveDifficultyTriggeredRule[];
51
- readonly adjustment: AdaptiveDifficultyAdjustment;
52
- readonly appliedChangeCount: number;
53
- readonly blockedClaims: readonly string[];
54
- readonly hash: string;
55
- readonly claimBoundary: string;
56
- }
57
- export declare function sampleAdaptiveDifficultyFixture(options?: AdaptiveDifficultyFixtureOptions): AdaptiveDifficultyFixture;
58
- //# sourceMappingURL=AdaptiveDifficultyFixtures.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AdaptiveDifficultyFixtures.d.ts","sourceRoot":"","sources":["../../../../packages/scripting/src/AdaptiveDifficultyFixtures.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,4BAA4B,GACpC,UAAU,GACV,YAAY,GACZ,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,UAAU,GACV,qBAAqB,GACrB,kBAAkB,GAClB,aAAa,CAAC;AAElB,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE3F,MAAM,MAAM,4BAA4B,GACpC,cAAc,GACd,cAAc,GACd,aAAa,GACb,oBAAoB,GACpB,uBAAuB,GACvB,kBAAkB,GAClB,sBAAsB,CAAC;AAE3B,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,QAAQ,CAAC,EAAE,0BAA0B,CAAC;IAC/C,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,IAAI,EAAE,4BAA4B,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB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CAAC;IAC9C,QAAQ,CAAC,OAAO,EAAE,SAAS,+BAA+B,EAAE,CAAC;IAC7D,QAAQ,CAAC,cAAc,EAAE,SAAS,+BAA+B,EAAE,CAAC;IACpE,QAAQ,CAAC,UAAU,EAAE,4BAA4B,CAAC;IAClD,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AA4ED,wBAAgB,+BAA+B,CAAC,OAAO,GAAE,gCAAqC,GAAG,yBAAyB,CAoDzH"}
@@ -1,228 +0,0 @@
1
- const rules = [
2
- {
3
- id: "death-rate-relief",
4
- metric: "death-rate",
5
- changeType: "enemy-damage",
6
- direction: "above",
7
- threshold: 0.34,
8
- multiplier: 0.82,
9
- target: 0.18,
10
- reason: "Recent deaths exceed the bounded comfort threshold, so incoming damage is softened."
11
- },
12
- {
13
- id: "slow-completion-timer",
14
- metric: "completion-time",
15
- changeType: "timer-multiplier",
16
- direction: "above",
17
- threshold: 92,
18
- multiplier: 1.18,
19
- target: 72,
20
- reason: "Completion time is above target, so objective timers are relaxed."
21
- },
22
- {
23
- id: "low-accuracy-resource-support",
24
- metric: "accuracy",
25
- changeType: "resource-drop-rate",
26
- direction: "below",
27
- threshold: 0.46,
28
- multiplier: 1.22,
29
- target: 0.58,
30
- reason: "Accuracy is below target, so health/ammo resource availability is raised."
31
- },
32
- {
33
- id: "high-skill-enemy-presence",
34
- metric: "win-rate",
35
- changeType: "enemy-count",
36
- direction: "above",
37
- threshold: 0.72,
38
- multiplier: 1.1,
39
- target: 0.58,
40
- reason: "Win rate is above target, so bounded encounter density can increase."
41
- },
42
- {
43
- id: "resource-efficiency-reward",
44
- metric: "resource-efficiency",
45
- changeType: "experience-multiplier",
46
- direction: "above",
47
- threshold: 0.68,
48
- multiplier: 1.08,
49
- target: 0.56,
50
- reason: "Resource efficiency is above target, so reward pacing is slightly increased."
51
- },
52
- {
53
- id: "retry-checkpoint-support",
54
- metric: "retry-count",
55
- changeType: "checkpoint-frequency",
56
- direction: "above",
57
- threshold: 2.4,
58
- multiplier: 1.2,
59
- target: 1.4,
60
- reason: "Retry count is high, so checkpoint spacing is tightened."
61
- }
62
- ];
63
- export function sampleAdaptiveDifficultyFixture(options = {}) {
64
- const strategy = options.strategy ?? "gradual";
65
- const seed = integer(options.seed ?? 0x3d2025, "seed");
66
- const playerSkill = clamp01(finite(options.playerSkill ?? 0.42, "playerSkill"));
67
- const recentDeaths = clamp(finite(options.recentDeaths ?? 3, "recentDeaths"), 0, 12);
68
- const completionTimeSeconds = clamp(finite(options.completionTimeSeconds ?? 108, "completionTimeSeconds"), 15, 420);
69
- const accuracy = clamp01(finite(options.accuracy ?? 0.41, "accuracy"));
70
- const resourceEfficiency = clamp01(finite(options.resourceEfficiency ?? 0.74, "resourceEfficiency"));
71
- const progressionRate = clamp01(finite(options.progressionRate ?? 0.52, "progressionRate"));
72
- const metricSamples = {
73
- "win-rate": sampleSeries(0.34 + playerSkill * 0.44, 0.06, seed, 0),
74
- "death-rate": sampleSeries(recentDeaths / 8, 0.09, seed, 11),
75
- "completion-time": sampleSeries(completionTimeSeconds, 8.5, seed, 23),
76
- "damage-taken": sampleSeries(0.56 + recentDeaths * 0.045, 0.08, seed, 37),
77
- "damage-dealt": sampleSeries(0.42 + accuracy * 0.45, 0.06, seed, 41),
78
- accuracy: sampleSeries(accuracy, 0.045, seed, 53),
79
- "resource-efficiency": sampleSeries(resourceEfficiency, 0.05, seed, 61),
80
- "progression-rate": sampleSeries(progressionRate, 0.07, seed, 71),
81
- "retry-count": sampleSeries(recentDeaths * 0.75, 0.28, seed, 83)
82
- };
83
- const metrics = Object.keys(metricSamples).map((type) => summarizeMetric(type, metricSamples[type]));
84
- const byType = new Map(metrics.map((metric) => [metric.type, metric]));
85
- const triggeredRules = rules
86
- .filter((rule) => ruleTriggered(byType.get(rule.metric), rule))
87
- .map((rule, index) => triggeredRule(rule, strategy, index));
88
- const adjustment = applyRules(triggeredRules);
89
- return {
90
- id: "external-parity-old-branch-adaptive-difficulty-fixture",
91
- source: "origin-master-ai-balancing-smart-difficulty-adapted",
92
- strategy,
93
- metrics,
94
- triggeredRules,
95
- adjustment,
96
- appliedChangeCount: triggeredRules.length,
97
- blockedClaims: [
98
- "production dynamic difficulty adjustment service",
99
- "machine-learning or reinforcement-learning personalization",
100
- "player-profile telemetry backend",
101
- "live economy balancing",
102
- "Unity/Unreal AI middleware parity"
103
- ],
104
- hash: stableHash([
105
- strategy,
106
- ...metrics.map((metric) => `${metric.type}:${metric.mean}:${metric.recentTrend}`),
107
- ...triggeredRules.map((rule) => `${rule.id}:${rule.appliedMultiplier}`),
108
- Object.values(adjustment).join(":")
109
- ].join("|")),
110
- claimBoundary: "Deterministic adaptive-difficulty metric/rule telemetry adapted from old balancing and smart difficulty concepts; this is bounded runtime evidence, not production DDA, ML personalization, telemetry backend, live economy balancing, or Unity/Unreal AI middleware parity."
111
- };
112
- }
113
- function summarizeMetric(type, values) {
114
- const sorted = [...values].sort((left, right) => left - right);
115
- const mean = values.reduce((sum, value) => sum + value, 0) / values.length;
116
- const variance = values.reduce((sum, value) => sum + (value - mean) ** 2, 0) / values.length;
117
- const firstHalf = values.slice(0, Math.max(1, Math.floor(values.length / 2)));
118
- const secondHalf = values.slice(Math.floor(values.length / 2));
119
- const firstMean = firstHalf.reduce((sum, value) => sum + value, 0) / firstHalf.length;
120
- const secondMean = secondHalf.reduce((sum, value) => sum + value, 0) / secondHalf.length;
121
- const trendDelta = secondMean - firstMean;
122
- return {
123
- type,
124
- count: values.length,
125
- mean: round(mean),
126
- median: round(sorted[Math.floor(sorted.length / 2)] ?? mean),
127
- standardDeviation: round(Math.sqrt(variance)),
128
- min: round(sorted[0] ?? mean),
129
- max: round(sorted[sorted.length - 1] ?? mean),
130
- recentTrend: Math.abs(trendDelta) < 0.025 ? "stable" : isLowerBetter(type) ? trendDelta < 0 ? "improving" : "declining" : trendDelta > 0 ? "improving" : "declining"
131
- };
132
- }
133
- function triggeredRule(rule, strategy, index) {
134
- const smoothing = strategy === "immediate" ? 1 : strategy === "predictive" ? 0.72 : strategy === "manual" ? 0 : 0.55;
135
- const appliedMultiplier = strategy === "manual" ? 1 : 1 + (rule.multiplier - 1) * smoothing;
136
- return {
137
- id: rule.id,
138
- metric: rule.metric,
139
- strategy,
140
- changeType: rule.changeType,
141
- target: rule.target,
142
- threshold: rule.threshold,
143
- rawMultiplier: rule.multiplier,
144
- appliedMultiplier: round(appliedMultiplier),
145
- cooldownSeconds: 12 + index * 4,
146
- reason: rule.reason
147
- };
148
- }
149
- function applyRules(triggeredRules) {
150
- const adjustment = {
151
- enemyHealth: 1,
152
- enemyDamage: 1,
153
- enemyCount: 1,
154
- resourceDropRate: 1,
155
- experienceMultiplier: 1,
156
- timerMultiplier: 1,
157
- checkpointMultiplier: 1
158
- };
159
- const mutable = { ...adjustment };
160
- for (const rule of triggeredRules) {
161
- if (rule.changeType === "enemy-health")
162
- mutable.enemyHealth *= rule.appliedMultiplier;
163
- else if (rule.changeType === "enemy-damage")
164
- mutable.enemyDamage *= rule.appliedMultiplier;
165
- else if (rule.changeType === "enemy-count")
166
- mutable.enemyCount *= rule.appliedMultiplier;
167
- else if (rule.changeType === "resource-drop-rate")
168
- mutable.resourceDropRate *= rule.appliedMultiplier;
169
- else if (rule.changeType === "experience-multiplier")
170
- mutable.experienceMultiplier *= rule.appliedMultiplier;
171
- else if (rule.changeType === "timer-multiplier")
172
- mutable.timerMultiplier *= rule.appliedMultiplier;
173
- else
174
- mutable.checkpointMultiplier *= rule.appliedMultiplier;
175
- }
176
- return {
177
- enemyHealth: round(mutable.enemyHealth),
178
- enemyDamage: round(mutable.enemyDamage),
179
- enemyCount: round(mutable.enemyCount),
180
- resourceDropRate: round(mutable.resourceDropRate),
181
- experienceMultiplier: round(mutable.experienceMultiplier),
182
- timerMultiplier: round(mutable.timerMultiplier),
183
- checkpointMultiplier: round(mutable.checkpointMultiplier)
184
- };
185
- }
186
- function ruleTriggered(metric, rule) {
187
- if (!metric)
188
- return false;
189
- return rule.direction === "above" ? metric.mean > rule.threshold : metric.mean < rule.threshold;
190
- }
191
- function sampleSeries(center, amplitude, seed, salt) {
192
- return Array.from({ length: 9 }, (_, index) => {
193
- const wave = Math.sin((seed + salt + index * 17) * 0.37) * amplitude;
194
- const drift = (index - 4) * amplitude * 0.08;
195
- return round(Math.max(0, center + wave + drift));
196
- });
197
- }
198
- function isLowerBetter(type) {
199
- return type === "death-rate" || type === "completion-time" || type === "damage-taken" || type === "retry-count";
200
- }
201
- function stableHash(value) {
202
- let hash = 0x811c9dc5;
203
- for (let index = 0; index < value.length; index += 1) {
204
- hash ^= value.charCodeAt(index);
205
- hash = Math.imul(hash, 0x01000193);
206
- }
207
- return (hash >>> 0).toString(16).padStart(8, "0");
208
- }
209
- function integer(value, label) {
210
- if (!Number.isInteger(value))
211
- throw new RangeError(`Adaptive difficulty fixture ${label} must be an integer.`);
212
- return value;
213
- }
214
- function finite(value, label) {
215
- if (!Number.isFinite(value))
216
- throw new RangeError(`Adaptive difficulty fixture ${label} must be finite.`);
217
- return value;
218
- }
219
- function clamp(value, min, max) {
220
- return Math.max(min, Math.min(max, value));
221
- }
222
- function clamp01(value) {
223
- return clamp(value, 0, 1);
224
- }
225
- function round(value) {
226
- return Number(value.toFixed(4));
227
- }
228
- //# sourceMappingURL=AdaptiveDifficultyFixtures.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AdaptiveDifficultyFixtures.js","sourceRoot":"","sources":["../../../../packages/scripting/src/AdaptiveDifficultyFixtures.ts"],"names":[],"mappings":"AA2FA,MAAM,KAAK,GAA8B;IACvC;QACE,EAAE,EAAE,mBAAmB;QACvB,MAAM,EAAE,YAAY;QACpB,UAAU,EAAE,cAAc;QAC1B,SAAS,EAAE,OAAO;QAClB,SAAS,EAAE,IAAI;QAC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AE,UAAU,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACpD,CAAC;AAED,SAAS,OAAO,CAAC,KAAa,EAAE,KAAa;IAC3C,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,+BAA+B,KAAK,sBAAsB,CAAC,CAAC;IAC/G,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,MAAM,CAAC,KAAa,EAAE,KAAa;IAC1C,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,+BAA+B,KAAK,kBAAkB,CAAC,CAAC;IAC1G,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,KAAK,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW;IACpD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,OAAO,CAAC,KAAa;IAC5B,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5B,CAAC;AAED,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC"}
@@ -1,63 +0,0 @@
1
- export type AnalyticsConsentCategory = "necessary" | "analytics" | "marketing" | "preferences";
2
- export type AnalyticsProviderMode = "console" | "batched-local" | "disabled";
3
- export interface AnalyticsPrivacyFixtureOptions {
4
- readonly seed?: number;
5
- readonly userId?: string;
6
- readonly sessionId?: string;
7
- readonly frameMs?: number;
8
- readonly eventCount?: number;
9
- readonly errorCount?: number;
10
- readonly analyticsConsent?: boolean;
11
- readonly marketingConsent?: boolean;
12
- }
13
- export interface AnalyticsPrivacyFixture {
14
- readonly source: "origin-master-analytics-privacy-adapted";
15
- readonly consent: {
16
- readonly version: "1.0";
17
- readonly explicitRequired: true;
18
- readonly categories: Record<AnalyticsConsentCategory, boolean>;
19
- readonly grantedCount: number;
20
- readonly deniedCount: number;
21
- readonly changeEvents: readonly {
22
- readonly category: AnalyticsConsentCategory;
23
- readonly granted: boolean;
24
- readonly previous: boolean;
25
- }[];
26
- };
27
- readonly anonymization: {
28
- readonly userHash: string;
29
- readonly sessionHash: string;
30
- readonly emailRedacted: true;
31
- readonly tokenRedacted: true;
32
- readonly ipAnonymized: string;
33
- readonly piiPatternHits: number;
34
- };
35
- readonly batching: {
36
- readonly providerMode: AnalyticsProviderMode;
37
- readonly maxBatchSize: number;
38
- readonly queuedEvents: number;
39
- readonly flushedBatches: number;
40
- readonly offlineQueueEnabled: true;
41
- readonly blockedWithoutConsent: number;
42
- };
43
- readonly metrics: {
44
- readonly frameMs: number;
45
- readonly fps: number;
46
- readonly errorCount: number;
47
- readonly errorsPerMinute: number;
48
- readonly loadEvents: number;
49
- readonly customMetricCount: number;
50
- };
51
- readonly productionReadiness: {
52
- readonly consentTelemetry: true;
53
- readonly anonymizationTelemetry: true;
54
- readonly batchingTelemetry: true;
55
- readonly metricsTelemetry: true;
56
- readonly providerBoundaryTelemetry: true;
57
- };
58
- readonly blockedClaims: readonly string[];
59
- readonly claimBoundary: string;
60
- readonly hash: string;
61
- }
62
- export declare function sampleAnalyticsPrivacyFixture(options?: AnalyticsPrivacyFixtureOptions): AnalyticsPrivacyFixture;
63
- //# sourceMappingURL=AnalyticsPrivacyFixtures.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnalyticsPrivacyFixtures.d.ts","sourceRoot":"","sources":["../../../../packages/scripting/src/AnalyticsPrivacyFixtures.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG,WAAW,GAAG,WAAW,GAAG,W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