@ansight/react-native 1.0.2-preview.2 → 1.0.2-preview.3

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
@@ -25,8 +25,8 @@ npx react-native run-android
25
25
 
26
26
  This package version expects matching native SDK packages:
27
27
 
28
- - CocoaPods: `Ansight`, `AnsightObjC` version `1.0.2-preview.2`
29
- - Maven: `ai.ansight:ansight-android:1.0.2-preview.2`
28
+ - CocoaPods: `Ansight`, `AnsightObjC` version `1.0.2-preview.3`
29
+ - Maven: `ai.ansight:ansight-android:1.0.2-preview.3`
30
30
 
31
31
  ## Quickstart
32
32
 
@@ -38,6 +38,13 @@ const isDevelopmentOnly = __DEV__;
38
38
  await Ansight.initializeAndActivate({
39
39
  useNativeAllInOneDefaults: isDevelopmentOnly,
40
40
  clientName: "My React Native App",
41
+ hostAutoProbe: {
42
+ enabled: isDevelopmentOnly,
43
+ initialDelayMilliseconds: 1000,
44
+ probeIntervalMilliseconds: 5000,
45
+ reconnectDelayMilliseconds: 10000,
46
+ clientName: "My React Native App",
47
+ },
41
48
  hostConnection: isDevelopmentOnly ? {
42
49
  bundledDeveloperConfigJson: process.env.EXPO_PUBLIC_ANSIGHT_PAIRING_CONFIG_JSON,
43
50
  } : undefined,
@@ -59,6 +66,14 @@ does not infer whether the app is a debug build. Gate it with the app's own
59
66
  condition, such as React Native's `__DEV__`, and configure `toolGuard`, capture
60
67
  options, host auto-probe, and host connection separately.
61
68
 
69
+ Host auto-probe uses the native iOS/Android remembered-host retry behavior.
70
+ When enabled and the runtime is active, it retries previous host connections so
71
+ the app can reconnect after the host disappears and later reappears. Probing
72
+ pauses while a live session is connected and resumes after
73
+ `reconnectDelayMilliseconds` when that session is lost. Use
74
+ `withoutHostAutoProbe()` or set `hostAutoProbe.enabled` to `false` for flows
75
+ where reconnects should only happen after an explicit app action.
76
+
62
77
  > **Important:** Screen capture will result in an FPS drop while native frames
63
78
  > are rendered, encoded, and sent. Use conservative interval, quality, and
64
79
  > max-width settings, and disable `sessionJpegCapture` for performance-focused
@@ -86,7 +101,7 @@ The TypeScript `AnsightOptions` surface mirrors Android `AnsightOptions`, iOS
86
101
  | `lifecycleCapture` | Native lifecycle and screen-view capture options. |
87
102
  | `toolGuard` | `"disabled"`, `"readOnly"`, `"readWrite"`, or `"fullAccess"`. |
88
103
  | `customProperties` | Grouped string properties sent with `session.open`. |
89
- | `hostAutoProbe` | Automatic host reconnect loop settings. |
104
+ | `hostAutoProbe` | Remembered-host retry settings for reconnecting after the host disappears and later reappears. |
90
105
  | `hostConnection` | Saved, bundled, and developer pairing settings. |
91
106
  | `secureStorage` | Compatibility alias for native secure-storage allow-list settings. |
92
107
  | `remoteTools` | Native visual tree, file, database, preferences, reflection, and secure-storage tool options. |
@@ -112,6 +127,9 @@ await Ansight.initializeAndActivate({
112
127
  },
113
128
  hostAutoProbe: {
114
129
  enabled: true,
130
+ initialDelayMilliseconds: 1000,
131
+ probeIntervalMilliseconds: 5000,
132
+ reconnectDelayMilliseconds: 10000,
115
133
  clientName: "My React Native App",
116
134
  },
117
135
  });
@@ -157,6 +175,12 @@ await Ansight.initializeAndActivate(
157
175
  );
158
176
  ```
159
177
 
178
+ `reflect.list_roots` reports a `hostRuntime` descriptor on each root. Current
179
+ React Native reflection roots are hosted by the native iOS or Android runtime;
180
+ future JavaScript reflection roots should report `kind: "javascript"` and
181
+ `bridge: "react-native"` so callers can route reflection requests to the
182
+ correct runtime boundary.
183
+
160
184
  `secureStorage.preferencesName` is Android-specific. `secureStorage.appleService`
161
185
  is iOS-specific. The top-level `secureStorage` option is still accepted as a
162
186
  compatibility alias for `remoteTools.secureStorage`.
@@ -175,7 +199,7 @@ await Ansight.connect(null, {
175
199
  Automatic connection tries:
176
200
 
177
201
  1. `hostConnection.bundledDeveloperConfigJson`
178
- 2. native cached host profiles where implemented
202
+ 2. native remembered host profiles, newest first
179
203
  3. saved pairing config
180
204
  4. `hostConnection.bundledConfigJson`
181
205
 
@@ -66,5 +66,5 @@ repositories {
66
66
 
67
67
  dependencies {
68
68
  implementation("com.facebook.react:react-android")
69
- implementation("ai.ansight:ansight-android:1.0.2-preview.2")
69
+ implementation("ai.ansight:ansight-android:1.0.2-preview.3")
70
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ansight/react-native",
3
- "version": "1.0.2-preview.2",
3
+ "version": "1.0.2-preview.3",
4
4
  "description": "React Native bridge for the Ansight mobile SDK.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",