@rtrvr-ai/rover 1.3.2 → 1.3.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
@@ -21,7 +21,7 @@ Add this snippet before `</body>` on any page:
21
21
 
22
22
  rover('boot', {
23
23
  siteId: 'YOUR_SITE_ID',
24
- apiKey: 'YOUR_API_KEY',
24
+ publicKey: 'pk_site_YOUR_PUBLIC_KEY',
25
25
  allowedDomains: ['yourdomain.com'],
26
26
  });
27
27
  </script>
@@ -33,7 +33,7 @@ Or use the single-tag shorthand with data attributes:
33
33
  ```html
34
34
  <script src="https://rover.rtrvr.ai/embed.js"
35
35
  data-site-id="YOUR_SITE_ID"
36
- data-api-key="YOUR_API_KEY"
36
+ data-public-key="pk_site_YOUR_PUBLIC_KEY"
37
37
  data-allowed-domains="yourdomain.com">
38
38
  </script>
39
39
  ```
@@ -49,7 +49,7 @@ import { boot, shutdown } from '@rtrvr-ai/rover';
49
49
 
50
50
  boot({
51
51
  siteId: 'YOUR_SITE_ID',
52
- apiKey: 'YOUR_API_KEY',
52
+ publicKey: 'pk_site_YOUR_PUBLIC_KEY',
53
53
  allowedDomains: ['yourdomain.com'],
54
54
  });
55
55
  ```
@@ -64,7 +64,7 @@ export function RoverWidget() {
64
64
  useEffect(() => {
65
65
  boot({
66
66
  siteId: 'YOUR_SITE_ID',
67
- apiKey: 'YOUR_API_KEY',
67
+ publicKey: 'pk_site_YOUR_PUBLIC_KEY',
68
68
  allowedDomains: ['yourdomain.com'],
69
69
  });
70
70
 
@@ -101,23 +101,26 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
101
101
  | Option | Type | Default | Description |
102
102
  |---|---|---|---|
103
103
  | `siteId` | `string` | *required* | Site identifier |
104
- | `apiKey` | `string` | — | API key from Rover Workspace |
104
+ | `publicKey` | `string` | — | Public embeddable site key (`pk_site_*`) from Rover Workspace |
105
+ | `sessionToken` | `string` | — | Optional short-lived Rover session token (`rvrsess_*`). |
105
106
  | `siteKeyId` | `string` | — | Site key ID from Workspace |
106
- | `authToken` | `string` | — | Optional bearer token override (takes precedence over `apiKey` when both are set) |
107
107
  | `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. Workspace snippets keep the managed default; code integrations can pass a custom base directly (no `/extensionRouter` suffix required). |
108
+ | `apiBase` | `string` | `https://extensionrouter.rtrvr.ai` | Optional API base override. Rover uses `/v1/rover/*` under this base. |
109
109
  | `allowedDomains` | `string[]` | `[]` | Hostnames where Rover may operate |
110
110
  | `domainScopeMode` | `'registrable_domain' \| 'host_only'` | `'registrable_domain'` | Domain matching strategy |
111
111
  | `externalNavigationPolicy` | `'open_new_tab_notice' \| 'block' \| 'allow'` | `'open_new_tab_notice'` | External navigation policy |
112
- | `navigation.crossHostPolicy` | `'same_tab' \| 'open_new_tab'` | `'same_tab'` | Behavior for in-scope host changes (for example, `app.example.com` to `www.example.com`) |
112
+ | `navigation.crossHostPolicy` | `'same_tab' \| 'open_new_tab'` | `'same_tab'` | In-scope cross-host navigation policy |
113
113
  | `mode` | `'full' \| 'safe'` | `'full'` | Runtime mode |
114
114
  | `allowActions` | `boolean` | `true` | Enable or disable action tools |
115
115
  | `openOnInit` | `boolean` | `false` | Open panel immediately on boot |
116
116
  | `sessionScope` | `'shared_site' \| 'tab'` | `'shared_site'` | Session sharing across tabs |
117
117
  | `taskRouting.mode` | `'auto' \| 'act' \| 'planner'` | `'act'` | Task routing strategy |
118
- | `taskRouting.plannerOnActError` | `boolean` | `true` | Retry planner when ACT fails |
118
+ | `taskRouting.plannerOnActError` | `boolean` | `true` | In `auto` mode, retry planner only when ACT does not produce a usable outcome |
119
119
  | `taskRouting.actHeuristicThreshold` | `number` | `5` (auto mode) | Auto-routing threshold |
120
- | `checkpointing.enabled` | `boolean` | `false` | Enable cloud checkpoint sync |
120
+ | `task.followup.mode` | `'heuristic_same_window'` | `'heuristic_same_window'` | Heuristic follow-up chat-cue carryover mode |
121
+ | `task.followup.ttlMs` | `number` | `120000` | Max age (ms) of prior completed/ended task eligible for follow-up chat cues |
122
+ | `task.followup.minLexicalOverlap` | `number` | `0.18` | Minimum lexical overlap ratio to attach follow-up chat cues |
123
+ | `checkpointing.enabled` | `boolean` | `true` | Cloud checkpoint sync is enabled by default in v1. Set to `false` to disable. |
121
124
  | `checkpointing.autoVisitorId` | `boolean` | `true` | Auto-generate visitor ID when needed |
122
125
  | `checkpointing.ttlHours` | `number` | `1` | Checkpoint TTL in hours |
123
126
  | `checkpointing.onStateChange` | `(payload) => void` | — | Checkpoint lifecycle updates (`active`, `paused_auth`) |
@@ -127,7 +130,7 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
127
130
  | `telemetry.flushIntervalMs` | `number` | `12000` | Flush cadence for buffered telemetry events |
128
131
  | `telemetry.maxBatchSize` | `number` | `30` | Maximum number of telemetry events sent per flush request |
129
132
  | `telemetry.includePayloads` | `boolean` | `false` | Include richer per-event payload details (debug/tool context). Increases telemetry volume and may include sensitive runtime content. |
130
- | `apiMode` | `boolean` | auto (`true` when `apiKey` exists) | Force API execution mode |
133
+ | `apiMode` | `boolean` | auto (`true` when `publicKey` or `sessionToken` exists) | Force API execution mode |
131
134
  | `apiToolsConfig.mode` | `'allowlist' \| 'profile' \| 'none'` | `'none'` | API additional tool exposure mode |
132
135
  | `tools.web.enableExternalWebContext` | `boolean` | `false` | External tab cloud context fallback |
133
136
  | `tools.web.scrapeMode` | `'off' \| 'on_demand'` | `'off'` | On-demand external tab scrape mode |
@@ -146,13 +149,43 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
146
149
  | `ui.shortcuts` | `RoverShortcut[]` | `[]` | Suggested journeys (max 100 stored, max 12 rendered by default; lower site-key policy caps are enforced) |
147
150
  | `ui.greeting` | `{ text?, delay?, duration?, disabled? }` | — | Greeting bubble config (`{name}` token supported) |
148
151
 
149
- When a site key is used, Rover also fetches cloud site config via `roverGetSiteConfig` (shortcuts + greeting).
152
+ When a site key or session token is used, Rover fetches cloud site config via `/v1/rover/session/start` (shortcuts + greeting).
150
153
  If the same field exists in both cloud config and boot config, boot config wins.
151
154
 
152
155
  If you enable `tools.web.scrapeMode: 'on_demand'`, use a site key capability profile that includes cloud scrape support.
153
156
 
154
157
  See [full configuration reference](https://github.com/rtrvr-ai/rover/blob/main/docs/INTEGRATION.md#configuration-reference).
155
158
 
159
+ ## Rover V1 Runtime Endpoints
160
+
161
+ Browser runtime calls target `https://extensionrouter.rtrvr.ai/v1/rover/*`:
162
+
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 /context/external`
172
+ - `POST /telemetry/ingest`
173
+
174
+ Runtime contract notes:
175
+
176
+ - Server is authoritative (`sessionId + runId + epoch + seq`).
177
+ - `taskRouting.mode` maps to `requestedMode` in `POST /run/input`.
178
+ - `plannerOnActError` applies only in `auto` mode and only when ACT has no usable outcome.
179
+ - 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.
183
+ - Any normal user send starts a fresh task boundary (fresh `prevSteps`, fresh run-scoped tab order/scope).
184
+ - `ask_user` answer submissions are the only continuation path and keep the same task boundary.
185
+ - `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.
187
+ - Runtime does not use legacy browser checkpoint routes (`roverSessionCheckpointGet/Upsert`).
188
+
156
189
  ## API Methods
157
190
 
158
191
  All methods are available as both command-style and method-style calls:
@@ -206,6 +239,9 @@ rover.on('error', (err) => console.error(err));
206
239
  | `task_ended` | `{ reason }` | Task ended |
207
240
  | `checkpoint_state` | `{ state, reason?, action?, code?, message? }` | Checkpoint sync state updates |
208
241
  | `checkpoint_error` | `{ action, code?, message, ... }` | Checkpoint request failure details |
242
+ | `tab_event_conflict_retry` | `{ runId, conflict?, ... }` | One stale seq/epoch tab-event conflict was recovered by silent retry |
243
+ | `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 |
209
245
 
210
246
  ## Content Security Policy (CSP)
211
247
 
@@ -244,7 +280,7 @@ For environments that cannot allow external domains:
244
280
  ```javascript
245
281
  rover('boot', {
246
282
  siteId: 'YOUR_SITE_ID',
247
- apiKey: 'YOUR_API_KEY',
283
+ publicKey: 'pk_site_YOUR_PUBLIC_KEY',
248
284
  workerUrl: '/assets/rover-worker.js',
249
285
  });
250
286
  ```