@mobileai/react-native 0.9.25 → 0.9.27
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 +10 -10
- package/bin/generate-map.cjs +511 -120
- package/lib/module/components/AIAgent.js +25 -3
- package/lib/module/components/AgentChatBar.js +3 -3
- package/lib/module/config/endpoints.js +1 -1
- package/lib/module/core/AgentRuntime.js +89 -23
- package/lib/module/core/FiberTreeWalker.js +312 -34
- package/lib/module/core/systemPrompt.js +30 -19
- package/lib/module/services/MobileAIKnowledgeRetriever.js +1 -1
- package/lib/module/services/telemetry/MobileAI.js +1 -1
- package/lib/module/tools/tapTool.js +77 -6
- package/lib/typescript/src/core/AgentRuntime.d.ts +8 -1
- package/lib/typescript/src/core/types.d.ts +2 -1
- package/lib/typescript/src/services/MobileAIKnowledgeRetriever.d.ts +1 -1
- package/lib/typescript/src/tools/tapTool.d.ts +3 -2
- package/lib/typescript/test-tree.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -256,7 +256,7 @@ Your app becomes MCP-compatible with one prop. Connect any AI — Antigravity, C
|
|
|
256
256
|
<AIAgent
|
|
257
257
|
showChatBar={false}
|
|
258
258
|
mcpServerUrl="ws://localhost:3101"
|
|
259
|
-
|
|
259
|
+
analyticsKey="mobileai_pub_xxx"
|
|
260
260
|
navRef={navRef}
|
|
261
261
|
>
|
|
262
262
|
<App />
|
|
@@ -403,12 +403,12 @@ export default function App() {
|
|
|
403
403
|
|
|
404
404
|
return (
|
|
405
405
|
<AIAgent
|
|
406
|
-
//
|
|
407
|
-
|
|
406
|
+
// Your MobileAI Dashboard ID — instantly enables cloud intelligence
|
|
407
|
+
analyticsKey="mobileai_pub_xxxxxxxx"
|
|
408
408
|
|
|
409
|
-
//
|
|
410
|
-
|
|
411
|
-
|
|
409
|
+
// Route all traffic through the secure MobileAI Cloud proxies
|
|
410
|
+
proxyUrl="https://mobileai.cloud/api/v1/hosted-proxy/text"
|
|
411
|
+
voiceProxyUrl="wss://mobileai.cloud/ws/hosted-proxy/voice"
|
|
412
412
|
|
|
413
413
|
navRef={navRef}
|
|
414
414
|
screenMap={screenMap} // optional but recommended
|
|
@@ -435,7 +435,9 @@ export default function RootLayout() {
|
|
|
435
435
|
|
|
436
436
|
return (
|
|
437
437
|
<AIAgent
|
|
438
|
-
|
|
438
|
+
analyticsKey="mobileai_pub_xxxxxxxx"
|
|
439
|
+
proxyUrl="https://mobileai.cloud/api/v1/hosted-proxy/text"
|
|
440
|
+
voiceProxyUrl="wss://mobileai.cloud/ws/hosted-proxy/voice"
|
|
439
441
|
navRef={navRef}
|
|
440
442
|
screenMap={screenMap}
|
|
441
443
|
>
|
|
@@ -485,7 +487,7 @@ The agent operates in **copilot mode** by default. It navigates, scrolls, types,
|
|
|
485
487
|
|
|
486
488
|
```tsx
|
|
487
489
|
// Default — copilot mode, zero extra config:
|
|
488
|
-
<AIAgent
|
|
490
|
+
<AIAgent analyticsKey="mobileai_pub_xxx" navRef={navRef}>
|
|
489
491
|
<App />
|
|
490
492
|
</AIAgent>
|
|
491
493
|
```
|
|
@@ -551,7 +553,6 @@ Transform the AI agent into a production-grade support system. The AI resolves i
|
|
|
551
553
|
import { SupportGreeting, buildSupportPrompt, createEscalateTool } from '@mobileai/react-native';
|
|
552
554
|
|
|
553
555
|
<AIAgent
|
|
554
|
-
apiKey="..."
|
|
555
556
|
analyticsKey="mobileai_pub_xxx" // required for MobileAI escalation
|
|
556
557
|
instructions={{
|
|
557
558
|
system: buildSupportPrompt({
|
|
@@ -1068,7 +1069,6 @@ Just add `analyticsKey` — every button tap, screen navigation, and session is
|
|
|
1068
1069
|
|
|
1069
1070
|
```tsx
|
|
1070
1071
|
<AIAgent
|
|
1071
|
-
apiKey="YOUR_KEY"
|
|
1072
1072
|
analyticsKey="mobileai_pub_abc123" // ← enables full auto-capture
|
|
1073
1073
|
navRef={navRef}
|
|
1074
1074
|
>
|