writetrack 0.9.0 → 0.10.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/README.md CHANGED
@@ -4,7 +4,7 @@ Detect AI-generated and pasted text through keystroke dynamics.
4
4
 
5
5
  WriteTrack analyzes _how_ text was entered, not what was written. Human typing has natural variation in timing, rhythm, and corrections. Pasted or AI-generated text arrives all at once with no behavioral fingerprint. WriteTrack captures the difference.
6
6
 
7
- - **~115KB** gzipped (17KB JS + 94KB WASM)
7
+ - **~118KB** gzipped (18KB JS + 100KB WASM)
8
8
  - **0** runtime dependencies
9
9
  - **<1ms** per keystroke
10
10
  - **100%** client-side
@@ -114,6 +114,7 @@ interface WriteTrackOptions {
114
114
  wasmUrl?: string; // Custom URL for the WASM analysis binary
115
115
  persist?: boolean; // Enable IndexedDB persistence (requires contentId)
116
116
  cursorPositionProvider?: () => number; // Custom cursor position for rich-text editors
117
+ inputSourceProvider?: () => InputSource | undefined; // Input source classification (set by editor integrations)
117
118
  }
118
119
  ```
119
120
 
@@ -143,6 +144,13 @@ interface WriteTrackOptions {
143
144
  | `isTargetDetached()` | `boolean` | Whether the target element was removed |
144
145
  | `clearPersistedData()` | `Promise<void>` | Clear IndexedDB persisted session |
145
146
 
147
+ ### Static Methods
148
+
149
+ | Method | Returns | Description |
150
+ | ------------------------------------------------ | --------------------------------- | ---------------------------------------- |
151
+ | `WriteTrack.listPersistedSessions()` | `Promise<PersistedSessionInfo[]>` | List all persisted sessions in IndexedDB |
152
+ | `WriteTrack.deletePersistedSession(key, field?)` | `Promise<void>` | Delete persisted session data |
153
+
146
154
  ### Properties
147
155
 
148
156
  | Property | Type | Description |
@@ -169,7 +177,7 @@ Full type definitions are included in the package:
169
177
 
170
178
  **Functions:** `analyzeEvents`, `createSessionReport`, `formatIndicator`, `getHighResolutionTime`
171
179
 
172
- **Types:** `KeystrokeEvent`, `ClipboardEvent`, `SelectionEvent`, `UndoRedoEvent`, `CompositionEvent`, `ProgrammaticInsertionEvent`, `ModifierState`, `WriteTrackDataSchema`, `DataQualityMetrics`, `SessionMetadata`, `SessionAnalysis`, `SessionReport`, `IndicatorOutput`, `AnalyzeEventsOptions`, `WriteTrackSink`
180
+ **Types:** `WriteTrackOptions`, `PersistedSessionInfo`, `KeystrokeEvent`, `ClipboardEvent`, `SelectionEvent`, `UndoRedoEvent`, `CompositionEvent`, `ProgrammaticInsertionEvent`, `ModifierState`, `InputSource`, `WriteTrackDataSchema`, `DataQualityMetrics`, `SessionMetadata`, `SessionAnalysis`, `SessionReport`, `IndicatorOutput`, `ContentOriginAnalysis`, `TimingAuthenticityAnalysis`, `SessionContinuityAnalysis`, `PhysicalPlausibilityAnalysis`, `RevisionBehaviorAnalysis`, `TemporalPatternsAnalysis`, `AnalyzeEventsOptions`, `WriteTrackSink`, `WebhookOptions`, `DatadogOptions`, `DatadogClient`, `SegmentOptions`, `SegmentClient`, `OpenTelemetryOptions`, `OTelTracer`, `OTelSpan`
173
181
 
174
182
  ## Browser Support
175
183