react-native-agentic-ai 0.4.1 → 0.4.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 (2) hide show
  1. package/README.md +4 -32
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,10 +16,9 @@ Wrap your navigation with `<AIAgent>`. The AI automatically understands your ent
16
16
 
17
17
  ## ✨ Features
18
18
 
19
- - 🤖 **Zero-config UI understanding** — No annotations, no accessibility labels. The AI reads your entire React Fiber tree automatically.
20
- - 🎯 **Universal component support** — Works with every React Native component (Pressable, Switch, TextInput, custom components) without modification.
21
- - 🖼️ **Media inference** — Detects images and videos on screen, captures their URIs, and infers context from parent component names — enabling Gemini's vision capabilities.
22
- - 📐 **Compact DOM output** — Collapses structural view nesting into flat, token-efficient output. Your 50-level deep navigation bar becomes a single line.
19
+ - 🤖 **Zero-config UI understanding** — No annotations needed. The AI sees and understands your entire screen automatically.
20
+ - 🎯 **Works with every component** Buttons, switches, inputs, custom components all work out of the box.
21
+ - 🖼️ **Sees images & videos** The AI knows what media is on screen and can describe it.
23
22
  - 🧭 **Auto-navigation** — Navigates between screens to complete multi-step tasks.
24
23
  - 🔒 **Production-grade security** — Element gating, content masking, lifecycle hooks, human-in-the-loop confirmation.
25
24
  - 🧩 **Custom actions** — Expose any business logic (checkout, API calls) as AI-callable tools with `useAction`.
@@ -58,33 +57,6 @@ export default function App() {
58
57
 
59
58
  A floating chat bar appears automatically. Ask the AI to navigate, tap buttons, fill forms — it reads your live UI and acts.
60
59
 
61
- ## 🧠 How It Works
62
-
63
- The SDK traverses your **React Fiber tree** at runtime and generates a compact, LLM-friendly representation of everything on screen:
64
-
65
- ```
66
- Account Settings
67
- [image in="SettingsScreen" src="https://randomuser.me/api/portraits/men/32.jpg"]
68
- Demo User
69
- demo@test.com
70
- Profile Information
71
- Full Name
72
- [0]<text-input>Enter your name />
73
- Email Address
74
- [1]<text-input>Enter your email />
75
- Notifications
76
- Email Alerts
77
- [2]<switch value="true"> />
78
- Push Notifications
79
- [3]<switch value="false"> />
80
- ```
81
-
82
- **Key design decisions:**
83
- - **Structural views are transparent** — React Navigation's 50+ nested `<View>` layers are collapsed. Only interactive elements and text content appear.
84
- - **Media is context-aware** — Images emit `[image in="ComponentName" src="url"]`, giving the LLM both *where* the image is and the full URL for Gemini's vision model.
85
- - **State is explicit** — Switch values, check states, and input values are emitted as attributes so the LLM knows the current state.
86
- - **Polymorphic tap** — `tap(index)` works on any component: calls `onPress` for buttons, `onValueChange` for switches, and bubbles up the Fiber tree for custom wrapper components.
87
-
88
60
  ## 🔌 API Reference
89
61
 
90
62
  ### `<AIAgent>` Component
@@ -274,7 +246,7 @@ This starts two servers:
274
246
 
275
247
  | Tool | Description |
276
248
  |------|-------------|
277
- | `tap(index)` | Tap any interactive element. Polymorphic: triggers `onPress` for buttons, `onValueChange` for switches, bubbles up Fiber tree for wrapper components. |
249
+ | `tap(index)` | Tap any interactive element. Works universally on buttons, switches, checkboxes, and custom components. |
278
250
  | `type(index, text)` | Type text into a text-input. |
279
251
  | `navigate(screen)` | Navigate to a screen. |
280
252
  | `done(text)` | Complete the task with a response. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-agentic-ai",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Build autonomous AI agents for React Native and Expo apps. Provides AI-native UI traversal, tool calling, and structured reasoning.",
5
5
  "main": "./lib/module/index.js",
6
6
  "source": "./src/index.ts",