@rtrvr-ai/rover 2.0.0 → 2.0.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.
- package/README.md +127 -17
- package/dist/embed.js +202 -60
- package/dist/index.d.ts +14 -2
- package/dist/rover.js +202 -60
- package/dist/worker/rover-worker.js +13 -13
- package/package.json +33 -1
package/README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# @rtrvr-ai/rover
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Turn any web interface into an AI agent — with one line of code.**
|
|
4
|
+
|
|
5
|
+
Rover is an open-source, DOM-native agent SDK that reads the real DOM,
|
|
6
|
+
plans actions, and executes them directly in the browser. Clicks, form fills,
|
|
7
|
+
navigation, data extraction — sub-second, no screenshots, no remote VMs.
|
|
8
|
+
Embed on websites, browser extensions, Electron apps, or any DOM environment.
|
|
9
|
+
|
|
10
|
+
[GitHub](https://github.com/rtrvr-ai/rover) · [Website](https://www.rtrvr.ai/rover) · [Docs](https://www.rtrvr.ai/rover/docs) · [Discord](https://rtrvr.ai/discord)
|
|
4
11
|
|
|
5
12
|
## Prerequisites
|
|
6
13
|
|
|
@@ -23,6 +30,7 @@ Add this snippet before `</body>` on any page:
|
|
|
23
30
|
siteId: 'YOUR_SITE_ID',
|
|
24
31
|
publicKey: 'pk_site_YOUR_PUBLIC_KEY',
|
|
25
32
|
allowedDomains: ['yourdomain.com'],
|
|
33
|
+
domainScopeMode: 'registrable_domain',
|
|
26
34
|
});
|
|
27
35
|
</script>
|
|
28
36
|
<script src="https://rover.rtrvr.ai/embed.js" async></script>
|
|
@@ -34,10 +42,13 @@ Or use the single-tag shorthand with data attributes:
|
|
|
34
42
|
<script src="https://rover.rtrvr.ai/embed.js"
|
|
35
43
|
data-site-id="YOUR_SITE_ID"
|
|
36
44
|
data-public-key="pk_site_YOUR_PUBLIC_KEY"
|
|
37
|
-
data-allowed-domains="yourdomain.com"
|
|
45
|
+
data-allowed-domains="yourdomain.com"
|
|
46
|
+
data-domain-scope-mode="registrable_domain">
|
|
38
47
|
</script>
|
|
39
48
|
```
|
|
40
49
|
|
|
50
|
+
Use `data-domain-scope-mode="host_only"` to require exact host matches. Plain entries such as `example.com` become exact-host rules in `host_only` mode, while `registrable_domain` continues to allow subdomains.
|
|
51
|
+
|
|
41
52
|
## npm Install
|
|
42
53
|
|
|
43
54
|
```bash
|
|
@@ -51,6 +62,7 @@ boot({
|
|
|
51
62
|
siteId: 'YOUR_SITE_ID',
|
|
52
63
|
publicKey: 'pk_site_YOUR_PUBLIC_KEY',
|
|
53
64
|
allowedDomains: ['yourdomain.com'],
|
|
65
|
+
domainScopeMode: 'registrable_domain',
|
|
54
66
|
});
|
|
55
67
|
```
|
|
56
68
|
|
|
@@ -66,6 +78,7 @@ export function RoverWidget() {
|
|
|
66
78
|
siteId: 'YOUR_SITE_ID',
|
|
67
79
|
publicKey: 'pk_site_YOUR_PUBLIC_KEY',
|
|
68
80
|
allowedDomains: ['yourdomain.com'],
|
|
81
|
+
domainScopeMode: 'registrable_domain',
|
|
69
82
|
});
|
|
70
83
|
|
|
71
84
|
return () => {
|
|
@@ -98,6 +111,8 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
|
|
|
98
111
|
|
|
99
112
|
## Configuration
|
|
100
113
|
|
|
114
|
+
### Core
|
|
115
|
+
|
|
101
116
|
| Option | Type | Default | Description |
|
|
102
117
|
|---|---|---|---|
|
|
103
118
|
| `siteId` | `string` | *required* | Site identifier |
|
|
@@ -114,44 +129,136 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
|
|
|
114
129
|
| `allowActions` | `boolean` | `true` | Enable or disable action tools |
|
|
115
130
|
| `openOnInit` | `boolean` | `false` | Open panel immediately on boot |
|
|
116
131
|
| `sessionScope` | `'shared_site' \| 'tab'` | `'shared_site'` | Session sharing across tabs |
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
|
|
132
|
+
| `workerUrl` | `string` | auto | Custom worker URL for self-hosting |
|
|
133
|
+
| `apiMode` | `boolean` | auto (`true` when `publicKey` or `sessionToken` exists) | Force API execution mode |
|
|
134
|
+
|
|
135
|
+
### Timing
|
|
136
|
+
|
|
137
|
+
| Option | Type | Default | Description |
|
|
138
|
+
|---|---|---|---|
|
|
139
|
+
| `timing.navigationDelayMs` | `number` | `80` | Delay (ms) before same-tab navigation executes, allowing state persistence |
|
|
140
|
+
| `timing.actionTimeoutMs` | `number` | `30000` | Timeout (ms) for bridge RPC calls from the worker |
|
|
141
|
+
| `timing.domSettleDebounceMs` | `number` | `24` | Adaptive DOM settle debounce before a11y tree capture |
|
|
142
|
+
| `timing.domSettleMaxWaitMs` | `number` | `220` | Adaptive DOM settle max wait before a11y tree capture |
|
|
143
|
+
| `timing.domSettleRetries` | `number` | `0` | Adaptive DOM settle bounded retries before capture |
|
|
144
|
+
| `timing.sparseTreeRetryDelayMs` | `number` | `35` | Additional delay before sparse-tree retry capture |
|
|
145
|
+
| `timing.sparseTreeRetryMaxAttempts` | `number` | `1` | Number of sparse-tree retries when roots are too sparse |
|
|
146
|
+
|
|
147
|
+
### Tab Indicators
|
|
148
|
+
|
|
149
|
+
| Option | Type | Default | Description |
|
|
150
|
+
|---|---|---|---|
|
|
151
|
+
| `ui.tabIndicator.titlePrefix` | `boolean` | `true` | Prepend "[Rover] " to document.title during task execution |
|
|
152
|
+
| `ui.tabIndicator.faviconBadge` | `boolean` | `false` | Overlay a colored dot on the favicon (opt-in due to CORS) |
|
|
153
|
+
| `ui.tabIndicator.widgetTabBar` | `boolean` | `true` | Show in-widget tab bar of agent-controlled tabs |
|
|
154
|
+
|
|
155
|
+
### Tab Policy
|
|
156
|
+
|
|
157
|
+
| Option | Type | Default | Description |
|
|
158
|
+
|---|---|---|---|
|
|
159
|
+
| `tabPolicy.observerByDefault` | `boolean` | — | Start tabs in observer mode by default |
|
|
160
|
+
| `tabPolicy.actionLeaseMs` | `number` | — | Action lease duration in milliseconds |
|
|
161
|
+
|
|
162
|
+
### Task Management
|
|
163
|
+
|
|
164
|
+
| Option | Type | Default | Description |
|
|
165
|
+
|---|---|---|---|
|
|
166
|
+
| `task.singleActiveScope` | `'host_session'` | — | Scope for single active task enforcement |
|
|
167
|
+
| `task.tabScope` | `'task_touched_only'` | — | Tab scope strategy |
|
|
168
|
+
| `task.maxConcurrentWorkers` | `number` | `2` | Maximum concurrent Web Workers (max: 3) |
|
|
169
|
+
| `task.maxQueuedTasks` | `number` | `5` | Maximum queued tasks waiting for a worker |
|
|
170
|
+
| `task.maxArchivedTasks` | `number` | `10` | Maximum archived (terminal) tasks to keep |
|
|
171
|
+
| `task.resume.mode` | `'crash_only'` | — | Resume behavior mode |
|
|
172
|
+
| `task.resume.ttlMs` | `number` | — | Resume TTL in milliseconds |
|
|
173
|
+
| `task.autoResumePolicy` | `'auto' \| 'confirm' \| 'never'` | `'confirm'` | Pending-run resume behavior: auto-resume immediately, require Resume/Cancel confirmation, or always cancel pending interrupted run. |
|
|
120
174
|
| `task.followup.mode` | `'heuristic_same_window'` | `'heuristic_same_window'` | Heuristic follow-up chat-cue carryover mode |
|
|
121
175
|
| `task.followup.ttlMs` | `number` | `120000` | Max age (ms) of prior completed/ended task eligible for follow-up chat cues |
|
|
122
176
|
| `task.followup.minLexicalOverlap` | `number` | `0.18` | Minimum lexical overlap ratio to attach follow-up chat cues |
|
|
123
|
-
|
|
177
|
+
|
|
178
|
+
### Task Routing
|
|
179
|
+
|
|
180
|
+
| Option | Type | Default | Description |
|
|
181
|
+
|---|---|---|---|
|
|
182
|
+
| `taskRouting.mode` | `'auto' \| 'act' \| 'planner'` | `'act'` | Task routing strategy |
|
|
183
|
+
| `taskRouting.plannerOnActError` | `boolean` | `true` | In `auto` mode, retry planner only when ACT does not produce a usable outcome |
|
|
184
|
+
| `taskRouting.actHeuristicThreshold` | `number` | `5` (auto mode) | Auto-routing threshold |
|
|
185
|
+
|
|
186
|
+
### Checkpointing
|
|
187
|
+
|
|
188
|
+
| Option | Type | Default | Description |
|
|
189
|
+
|---|---|---|---|
|
|
124
190
|
| `checkpointing.enabled` | `boolean` | `true` | Cloud checkpoint sync is enabled by default in v1. Set to `false` to disable. |
|
|
125
191
|
| `checkpointing.autoVisitorId` | `boolean` | `true` | Auto-generate visitor ID when needed |
|
|
126
192
|
| `checkpointing.ttlHours` | `number` | `1` | Checkpoint TTL in hours |
|
|
127
193
|
| `checkpointing.onStateChange` | `(payload) => void` | — | Checkpoint lifecycle updates (`active`, `paused_auth`) |
|
|
128
194
|
| `checkpointing.onError` | `(payload) => void` | — | Checkpoint request error callback |
|
|
195
|
+
|
|
196
|
+
### Telemetry
|
|
197
|
+
|
|
198
|
+
| Option | Type | Default | Description |
|
|
199
|
+
|---|---|---|---|
|
|
129
200
|
| `telemetry.enabled` | `boolean` | `true` | Enable runtime telemetry batching |
|
|
130
201
|
| `telemetry.sampleRate` | `number` | `1` | Sampling ratio (`1` = all events, `0.1` ≈ 10%) |
|
|
131
202
|
| `telemetry.flushIntervalMs` | `number` | `12000` | Flush cadence for buffered telemetry events |
|
|
132
203
|
| `telemetry.maxBatchSize` | `number` | `30` | Maximum number of telemetry events sent per flush request |
|
|
133
204
|
| `telemetry.includePayloads` | `boolean` | `false` | Include richer per-event payload details (debug/tool context). Increases telemetry volume and may include sensitive runtime content. |
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
|
138
|
-
|
|
139
|
-
| `tools.web.denyDomains` | `string[]` | `[]` | External context denylist |
|
|
140
|
-
| `tools.client` | `ClientToolDefinition[]` | `[]` | Runtime-registered client tools |
|
|
141
|
-
| `workerUrl` | `string` | auto | Custom worker URL for self-hosting |
|
|
205
|
+
|
|
206
|
+
### UI
|
|
207
|
+
|
|
208
|
+
| Option | Type | Default | Description |
|
|
209
|
+
|---|---|---|---|
|
|
142
210
|
| `ui.agent.name` | `string` | `'Rover'` | Custom assistant name |
|
|
143
211
|
| `ui.mascot.disabled` | `boolean` | `false` | Disable mascot video |
|
|
144
212
|
| `ui.mascot.mp4Url` | `string` | default | Custom mascot MP4 URL |
|
|
145
213
|
| `ui.mascot.webmUrl` | `string` | default | Custom mascot WebM URL |
|
|
146
|
-
| `ui.muted` | `boolean` | `
|
|
214
|
+
| `ui.muted` | `boolean` | `true` | Start with audio muted on first load; stored browser preference wins after the user toggles sound |
|
|
147
215
|
| `ui.thoughtStyle` | `'concise_cards' \| 'minimal'` | `'concise_cards'` | Thought rendering style |
|
|
148
|
-
| `ui.panel.resizable` | `boolean` | `true` |
|
|
216
|
+
| `ui.panel.resizable` | `boolean` | `true` | Enables desktop freeform resizing plus phone/tablet snap-height resizing with per-device memory |
|
|
149
217
|
| `ui.showTaskControls` | `boolean` | `true` | Show new/end task controls |
|
|
150
218
|
| `ui.shortcuts` | `RoverShortcut[]` | `[]` | Suggested journeys (max 100 stored, max 12 rendered by default; lower site-key policy caps are enforced) |
|
|
151
219
|
| `ui.greeting` | `{ text?, delay?, duration?, disabled? }` | — | Greeting bubble config (`{name}` token supported) |
|
|
220
|
+
| `ui.voice` | `{ enabled?: boolean; language?: string; autoStopMs?: number }` | — | Browser dictation for supported Chromium browsers. Rover fills the draft live, waits for post-speech silence before stopping, and the user still sends manually. |
|
|
221
|
+
|
|
222
|
+
### Web Tools
|
|
223
|
+
|
|
224
|
+
| Option | Type | Default | Description |
|
|
225
|
+
|---|---|---|---|
|
|
226
|
+
| `apiToolsConfig.mode` | `'allowlist' \| 'profile' \| 'none'` | `'none'` | API additional tool exposure mode |
|
|
227
|
+
| `tools.web.enableExternalWebContext` | `boolean` | `false` | External tab cloud context fallback |
|
|
228
|
+
| `tools.web.scrapeMode` | `'off' \| 'on_demand'` | `'off'` | On-demand external tab scrape mode |
|
|
229
|
+
| `tools.web.allowDomains` | `string[]` | `[]` | External context allowlist |
|
|
230
|
+
| `tools.web.denyDomains` | `string[]` | `[]` | External context denylist |
|
|
231
|
+
| `tools.client` | `ClientToolDefinition[]` | `[]` | Runtime-registered client tools |
|
|
232
|
+
| `pageConfig` | `RoverPageCaptureConfig` | — | Optional per-site page-capture overrides such as `disableAutoScroll`, settle timing, and sparse-tree retry settings |
|
|
233
|
+
|
|
234
|
+
### AI-Callable URLs (Deep Links)
|
|
235
|
+
|
|
236
|
+
Rover can be triggered via URL query parameters, turning any page into an AI-callable endpoint.
|
|
237
|
+
|
|
238
|
+
| Option | Type | Default | Description |
|
|
239
|
+
|---|---|---|---|
|
|
240
|
+
| `deepLink.enabled` | `boolean` | `false` | Enable URL-triggered Rover |
|
|
241
|
+
| `deepLink.promptParam` | `string` | `'rover'` | Query parameter for natural-language prompts |
|
|
242
|
+
| `deepLink.shortcutParam` | `string` | `'rover_shortcut'` | Query parameter for shortcut IDs |
|
|
243
|
+
| `deepLink.consume` | `boolean` | `true` | Strip deep link params from URL after reading |
|
|
244
|
+
|
|
245
|
+
**Prompt deep link** — pass a natural-language instruction:
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
https://example.com?rover=book%20a%20flight
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Shortcut deep link** — invoke a pre-defined flow by ID:
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
https://example.com?rover_shortcut=checkout_flow
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
For AI or CLI-triggered entrypoints, prefer exact shortcut IDs for repeatable flows.
|
|
152
258
|
|
|
153
|
-
When a site key or session token is used, Rover fetches cloud site config via `/v2/rover/session/open` (shortcuts + greeting).
|
|
259
|
+
When a site key or session token is used, Rover fetches cloud site config via `/v2/rover/session/open` (shortcuts + greeting + voice + pageConfig).
|
|
154
260
|
If the same field exists in both cloud config and boot config, boot config wins.
|
|
261
|
+
`deepLink` is boot/runtime only and is not persisted in cloud site config.
|
|
155
262
|
|
|
156
263
|
If you enable `tools.web.scrapeMode: 'on_demand'`, use a site key capability profile that includes cloud scrape support.
|
|
157
264
|
|
|
@@ -294,6 +401,9 @@ Load your self-hosted `embed.js` instead of the CDN version:
|
|
|
294
401
|
|
|
295
402
|
## Links
|
|
296
403
|
|
|
404
|
+
- [GitHub](https://github.com/rtrvr-ai/rover)
|
|
297
405
|
- [Integration Guide](https://github.com/rtrvr-ai/rover/blob/main/docs/INTEGRATION.md)
|
|
298
406
|
- [Rover Workspace](https://rover.rtrvr.ai/workspace) — generate site keys and install snippets
|
|
299
407
|
- [Website](https://www.rtrvr.ai/rover)
|
|
408
|
+
- [Documentation](https://www.rtrvr.ai/rover/docs)
|
|
409
|
+
- [Discord](https://rtrvr.ai/discord)
|