@rtrvr-ai/rover 1.3.3 → 2.0.1

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
@@ -23,6 +23,7 @@ Add this snippet before `</body>` on any page:
23
23
  siteId: 'YOUR_SITE_ID',
24
24
  publicKey: 'pk_site_YOUR_PUBLIC_KEY',
25
25
  allowedDomains: ['yourdomain.com'],
26
+ domainScopeMode: 'registrable_domain',
26
27
  });
27
28
  </script>
28
29
  <script src="https://rover.rtrvr.ai/embed.js" async></script>
@@ -34,10 +35,13 @@ Or use the single-tag shorthand with data attributes:
34
35
  <script src="https://rover.rtrvr.ai/embed.js"
35
36
  data-site-id="YOUR_SITE_ID"
36
37
  data-public-key="pk_site_YOUR_PUBLIC_KEY"
37
- data-allowed-domains="yourdomain.com">
38
+ data-allowed-domains="yourdomain.com"
39
+ data-domain-scope-mode="registrable_domain">
38
40
  </script>
39
41
  ```
40
42
 
43
+ 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.
44
+
41
45
  ## npm Install
42
46
 
43
47
  ```bash
@@ -51,6 +55,7 @@ boot({
51
55
  siteId: 'YOUR_SITE_ID',
52
56
  publicKey: 'pk_site_YOUR_PUBLIC_KEY',
53
57
  allowedDomains: ['yourdomain.com'],
58
+ domainScopeMode: 'registrable_domain',
54
59
  });
55
60
  ```
56
61
 
@@ -66,6 +71,7 @@ export function RoverWidget() {
66
71
  siteId: 'YOUR_SITE_ID',
67
72
  publicKey: 'pk_site_YOUR_PUBLIC_KEY',
68
73
  allowedDomains: ['yourdomain.com'],
74
+ domainScopeMode: 'registrable_domain',
69
75
  });
70
76
 
71
77
  return () => {
@@ -105,7 +111,7 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
105
111
  | `sessionToken` | `string` | — | Optional short-lived Rover session token (`rvrsess_*`). |
106
112
  | `siteKeyId` | `string` | — | Site key ID from Workspace |
107
113
  | `visitor` | `{ name?: string; email?: string }` | — | Optional visitor profile for greeting personalization. Recommended flow is async updates via `identify(...)` after login/user hydration. |
108
- | `apiBase` | `string` | `https://extensionrouter.rtrvr.ai` | Optional API base override. Rover uses `/v1/rover/*` under this base. |
114
+ | `apiBase` | `string` | `https://extensionrouter.rtrvr.ai` | Optional API base override. Rover uses `/v2/rover/*` under this base. |
109
115
  | `allowedDomains` | `string[]` | `[]` | Hostnames where Rover may operate |
110
116
  | `domainScopeMode` | `'registrable_domain' \| 'host_only'` | `'registrable_domain'` | Domain matching strategy |
111
117
  | `externalNavigationPolicy` | `'open_new_tab_notice' \| 'block' \| 'allow'` | `'open_new_tab_notice'` | External navigation policy |
@@ -120,6 +126,7 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
120
126
  | `task.followup.mode` | `'heuristic_same_window'` | `'heuristic_same_window'` | Heuristic follow-up chat-cue carryover mode |
121
127
  | `task.followup.ttlMs` | `number` | `120000` | Max age (ms) of prior completed/ended task eligible for follow-up chat cues |
122
128
  | `task.followup.minLexicalOverlap` | `number` | `0.18` | Minimum lexical overlap ratio to attach follow-up chat cues |
129
+ | `task.autoResumePolicy` | `'auto' \| 'confirm' \| 'never'` | `'confirm'` | Pending-run resume behavior: auto-resume immediately, require Resume/Cancel confirmation, or always cancel pending interrupted run. |
123
130
  | `checkpointing.enabled` | `boolean` | `true` | Cloud checkpoint sync is enabled by default in v1. Set to `false` to disable. |
124
131
  | `checkpointing.autoVisitorId` | `boolean` | `true` | Auto-generate visitor ID when needed |
125
132
  | `checkpointing.ttlHours` | `number` | `1` | Checkpoint TTL in hours |
@@ -142,48 +149,49 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
142
149
  | `ui.mascot.disabled` | `boolean` | `false` | Disable mascot video |
143
150
  | `ui.mascot.mp4Url` | `string` | default | Custom mascot MP4 URL |
144
151
  | `ui.mascot.webmUrl` | `string` | default | Custom mascot WebM URL |
145
- | `ui.muted` | `boolean` | `false` | Start with audio muted |
152
+ | `ui.muted` | `boolean` | `true` | Start with audio muted on first load; stored browser preference wins after the user toggles sound |
146
153
  | `ui.thoughtStyle` | `'concise_cards' \| 'minimal'` | `'concise_cards'` | Thought rendering style |
147
154
  | `ui.panel.resizable` | `boolean` | `true` | Panel resizable preference |
148
155
  | `ui.showTaskControls` | `boolean` | `true` | Show new/end task controls |
149
156
  | `ui.shortcuts` | `RoverShortcut[]` | `[]` | Suggested journeys (max 100 stored, max 12 rendered by default; lower site-key policy caps are enforced) |
150
157
  | `ui.greeting` | `{ text?, delay?, duration?, disabled? }` | — | Greeting bubble config (`{name}` token supported) |
158
+ | `pageConfig` | `RoverPageCaptureConfig` | — | Optional per-site page-capture overrides such as `disableAutoScroll`, settle timing, and sparse-tree retry settings |
151
159
 
152
- When a site key or session token is used, Rover fetches cloud site config via `/v1/rover/session/start` (shortcuts + greeting).
160
+ When a site key or session token is used, Rover fetches cloud site config via `/v2/rover/session/open` (shortcuts + greeting + pageConfig).
153
161
  If the same field exists in both cloud config and boot config, boot config wins.
154
162
 
155
163
  If you enable `tools.web.scrapeMode: 'on_demand'`, use a site key capability profile that includes cloud scrape support.
156
164
 
157
165
  See [full configuration reference](https://github.com/rtrvr-ai/rover/blob/main/docs/INTEGRATION.md#configuration-reference).
158
166
 
159
- ## Rover V1 Runtime Endpoints
167
+ ## Rover V2 Runtime Endpoints
160
168
 
161
- Browser runtime calls target `https://extensionrouter.rtrvr.ai/v1/rover/*`:
169
+ Browser runtime calls target `https://extensionrouter.rtrvr.ai/v2/rover/*`:
162
170
 
163
- - `POST /session/start`
164
- - `POST /session/refresh`
165
- - `POST /run/input`
166
- - `POST /run/control`
167
- - `POST /tab/event`
168
- - `GET /events` (SSE)
169
- - `GET /session/projection`
170
- - `POST /session/snapshot`
171
+ - `POST /session/open`
172
+ - `POST /command` (`RUN_INPUT`, `RUN_CONTROL`, `TAB_EVENT`, `ASK_USER_ANSWER`)
173
+ - `GET /stream` (SSE)
174
+ - `GET /state`
175
+ - `POST /snapshot`
171
176
  - `POST /context/external`
172
177
  - `POST /telemetry/ingest`
173
178
 
174
179
  Runtime contract notes:
175
180
 
176
181
  - Server is authoritative (`sessionId + runId + epoch + seq`).
177
- - `taskRouting.mode` maps to `requestedMode` in `POST /run/input`.
182
+ - `taskRouting.mode` maps to `requestedMode` in `POST /command` payloads with `type='RUN_INPUT'`.
178
183
  - `plannerOnActError` applies only in `auto` mode and only when ACT has no usable outcome.
179
184
  - Typed conflicts: `stale_seq`, `stale_epoch`, `active_run_exists`.
180
- - `POST /tab/event` stale/missing run is non-fatal (`decision='stale_run'`).
181
- - Cross-registrable navigation preflight is resilient: if `/tab/event` is unavailable, Rover falls back to local policy (in-scope targets follow `navigation.crossHostPolicy`, default `same_tab`; out-of-scope targets follow `externalNavigationPolicy`).
182
- - External intent routing: `/context/external` uses `read_context` (read/navigation-context prompts) or `act` (mutation prompts). Navigation-only external opens are represented by `/tab/event` + external placeholder tab handling.
185
+ - `POST /command` stale/missing run is non-fatal for tab navigation decisions (`decision='stale_run'`).
186
+ - Cross-registrable navigation preflight is resilient: if command-tab decision checks are unavailable, Rover falls back to local policy (in-scope targets follow `navigation.crossHostPolicy`, default `same_tab`; out-of-scope targets follow `externalNavigationPolicy`).
187
+ - External intent routing: `/context/external` uses `read_context` (read/navigation-context prompts) or `act` (mutation prompts). Navigation-only external opens are represented by `POST /command` with `type='TAB_EVENT'` plus external placeholder tab handling.
183
188
  - Any normal user send starts a fresh task boundary (fresh `prevSteps`, fresh run-scoped tab order/scope).
184
189
  - `ask_user` answer submissions are the only continuation path and keep the same task boundary.
185
190
  - `task.followup` is operative heuristic carryover for chat cues only (`user` + `model` summary pair); it never carries previous task state/tab scope.
186
- - Auto-resume only runs for validated handoff/reload contexts with a ready `rvrsess_*` token; otherwise resume is safely blocked and cleared.
191
+ - `task.autoResumePolicy` is enforced at runtime: `auto` resumes, `confirm` shows explicit Resume/Cancel suggestion, `never` cancels pending resume.
192
+ - Resume blocked/declined/never paths terminalize the local task to `cancelled`, clear local running indicators, and schedule backend cancel repair (`RUN_CONTROL cancel`) unless a live remote controller owns that run.
193
+ - Server projection never re-adopts locally ignored run IDs; ignored projected active runs trigger cancel repair retry.
194
+ - Same-domain/subdomain continuity is preserved when a live controller tab owns the active run; reopening tabs stay observer-safe and do not force-cancel that run.
187
195
  - Runtime does not use legacy browser checkpoint routes (`roverSessionCheckpointGet/Upsert`).
188
196
 
189
197
  ## API Methods
@@ -241,7 +249,7 @@ rover.on('error', (err) => console.error(err));
241
249
  | `checkpoint_error` | `{ action, code?, message, ... }` | Checkpoint request failure details |
242
250
  | `tab_event_conflict_retry` | `{ runId, conflict?, ... }` | One stale seq/epoch tab-event conflict was recovered by silent retry |
243
251
  | `tab_event_conflict_exhausted` | `{ runId, conflict?, ... }` | Tab-event stale conflict retry exhausted (non-fatal; projection sync follows) |
244
- | `legacy_checkpoint_blocked` | `{ action, status }` | Legacy checkpoint browser path blocked in Rover V1 |
252
+ | `checkpoint_token_missing` | `{ action, status }` | Legacy checkpoint browser path blocked |
245
253
 
246
254
  ## Content Security Policy (CSP)
247
255