@loamly/tracker 1.6.0 → 1.7.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/src/types.ts CHANGED
@@ -59,6 +59,24 @@ export interface AIDetectionResult {
59
59
  method: 'referrer' | 'timing' | 'behavioral' | 'temporal' | 'unknown'
60
60
  }
61
61
 
62
+ /**
63
+ * Behavioral ML classification result
64
+ */
65
+ export interface BehavioralMLResult {
66
+ /** Classification result */
67
+ classification: 'human' | 'ai_influenced' | 'uncertain'
68
+ /** Probability of human behavior (0-1) */
69
+ humanProbability: number
70
+ /** Probability of AI-influenced behavior (0-1) */
71
+ aiProbability: number
72
+ /** Confidence in classification */
73
+ confidence: number
74
+ /** Behavioral signals detected */
75
+ signals: string[]
76
+ /** Session duration when classified */
77
+ sessionDurationMs: number
78
+ }
79
+
62
80
  export interface LoamlyTracker {
63
81
  /** Initialize the tracker with configuration */
64
82
  init: (config: LoamlyConfig) => void
@@ -87,6 +105,9 @@ export interface LoamlyTracker {
87
105
  /** Get navigation timing analysis */
88
106
  getNavigationTiming: () => NavigationTiming | null
89
107
 
108
+ /** Get behavioral ML classification result */
109
+ getBehavioralML: () => BehavioralMLResult | null
110
+
90
111
  /** Check if tracker is initialized */
91
112
  isInitialized: () => boolean
92
113