@rtrvr-ai/rover 2.2.0 → 3.0.0

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
@@ -37,6 +37,13 @@ Add this snippet before `</body>` on any page:
37
37
  <script src="https://rover.rtrvr.ai/embed.js" async></script>
38
38
  ```
39
39
 
40
+ If RoverBook is enabled for the site in Rover Workspace, the generated install snippet also includes `https://rover.rtrvr.ai/roverbook.js` plus an inline attach block that calls `window.RoverBook.enableRoverBook(window.rover, ...)`. Copy the Workspace snippet as-is for production installs.
41
+
42
+ Workspace also controls site mode:
43
+
44
+ - `Full Rover agent`: action-capable Rover runtime
45
+ - `RoverBook analytics-only`: embed-oriented RoverBook deployment with action tools disabled
46
+
40
47
  Get `siteId`, `publicKey` (`pk_site_*`), and optional `siteKeyId` from Rover Workspace:
41
48
 
42
49
  - `https://rover.rtrvr.ai/workspace`
@@ -281,7 +288,7 @@ If you enable `tools.web.scrapeMode: 'on_demand'`, use a site key capability pro
281
288
 
282
289
  See [full configuration reference](https://github.com/rtrvr-ai/rover/blob/main/docs/INTEGRATION.md#configuration-reference).
283
290
 
284
- ## Public Agent Tasks
291
+ ## Public Agent Tasks (ATP)
285
292
 
286
293
  Rover-enabled sites expose two public entrypoints:
287
294
 
@@ -303,6 +310,26 @@ Content-Type: application/json
303
310
  { "url": "https://www.rtrvr.ai", "prompt": "get me the latest blog post" }
304
311
  ```
305
312
 
313
+ Callers may also provide structured visiting-agent metadata:
314
+
315
+ ```http
316
+ POST https://agent.rtrvr.ai/v1/tasks
317
+ Content-Type: application/json
318
+
319
+ {
320
+ "url": "https://www.rtrvr.ai",
321
+ "prompt": "get me the latest blog post",
322
+ "agent": {
323
+ "key": "gpt-5.4-demo-agent",
324
+ "name": "GPT-5.4 Demo Agent",
325
+ "vendor": "OpenAI",
326
+ "model": "gpt-5.4",
327
+ "version": "2026-03",
328
+ "homepage": "https://openai.com"
329
+ }
330
+ }
331
+ ```
332
+
306
333
  Anonymous AI callers do **not** need `siteId`, `publicKey`, or `siteKeyId`.
307
334
 
308
335
  The returned task URL is the canonical resource:
@@ -312,6 +339,7 @@ The returned task URL is the canonical resource:
312
339
  - `GET` + `Accept: application/x-ndjson` for CLI-friendly streaming
313
340
  - `POST { "input": "..." }` for continuation when the task asks for more input
314
341
  - `DELETE` to cancel
342
+ - a `workflow` URL when the task belongs to an aggregated multi-site workflow
315
343
 
316
344
  Task creation may also return browser handoff URLs:
317
345
 
@@ -320,13 +348,40 @@ Task creation may also return browser handoff URLs:
320
348
 
321
349
  The task URL remains canonical; receipt links are only a browser handoff layer over that same task.
322
350
 
323
- The response also includes an `open` URL for browser attach.
324
-
325
351
  - `Prefer: execution=browser` keeps execution browser-first
326
352
  - `Prefer: execution=cloud` is the explicit browserless path today
327
353
  - `Prefer: execution=auto` prefers browser attach first; delayed cloud auto-promotion is a follow-up robustness phase
328
354
 
329
- Rover deep links like `?rover=` and `?rover_shortcut=` remain the simple browser-first entrypoints; `/v1/tasks` is the machine-oriented protocol.
355
+ Rover deep links like `?rover=` and `?rover_shortcut=` remain the simple browser-first entrypoints; `/v1/tasks` is the machine-oriented protocol. Cross-site workflows and handoffs extend that same public contract rather than replacing it.
356
+
357
+ ### Agent identity attribution
358
+
359
+ Rover normalizes visiting-agent attribution in this order:
360
+
361
+ 1. verified signal
362
+ 2. explicit `agent` object on public task creation or handoffs
363
+ 3. heuristic headers such as `User-Agent`, `Signature-Agent`, `Signature`, `Signature-Input`, and `X-RTRVR-Client-Id`
364
+ 4. advanced local fallbacks such as RoverBook `identityResolver`
365
+ 5. anonymous fallback
366
+
367
+ Current launch behavior emits `self_reported`, `heuristic`, and `anonymous`. `verified` remains reserved for a real verifier and is not inferred from plain headers alone.
368
+
369
+ ### Cross-site workflows and handoffs
370
+
371
+ Public tasks can delegate to Rover on another Rover-enabled site without leaving the same protocol surface.
372
+
373
+ - `POST /v1/tasks/{id}/handoffs` creates a child task on another site
374
+ - `GET /v1/workflows/{id}` returns aggregated workflow state or stream
375
+ - child tasks inherit the same workflow lineage as the parent
376
+
377
+ Handoff creation also accepts the optional `agent` object so a child task can inherit or explicitly override visiting-agent attribution.
378
+
379
+ Receiving sites must explicitly opt in through Workspace/site config:
380
+
381
+ - `aiAccess.enabled = true`
382
+ - `aiAccess.allowDelegatedHandoffs = true`
383
+
384
+ By default, handoffs carry a structured summary rather than the full transcript or tool trace.
330
385
 
331
386
  ## Rover V2 Runtime Endpoints
332
387
 
@@ -386,6 +441,8 @@ rover.send('Hello');
386
441
  | `getState()` | Get current runtime state |
387
442
  | `update(config)` | Update configuration without rebooting |
388
443
  | `registerTool(def, handler)` | Register a client-side tool |
444
+ | `requestSigned(url, init?)` | Issue a fetch signed with the current Rover session token and site/session headers |
445
+ | `registerPromptContextProvider(provider)` | Inject bounded prompt context before a fresh Rover task/run |
389
446
  | `identify(visitor)` | Update visitor profile after boot (for async login/user hydration) |
390
447
  | `on(event, handler)` | Subscribe to events (returns unsubscribe fn) |
391
448
 
@@ -409,12 +466,17 @@ rover.on('error', (err) => console.error(err));
409
466
  | `navigation_guardrail` | `{ url, policy }` | Out-of-scope navigation intercepted |
410
467
  | `task_started` | `{ reason }` | New task started |
411
468
  | `task_ended` | `{ reason }` | Task ended |
469
+ | `run_started` | `{ taskId, runId, taskBoundaryId, state, taskComplete, needsUserInput, summary? }` | Public run lifecycle start event |
470
+ | `run_state_transition` | `{ taskId, runId, taskBoundaryId, state, taskComplete, needsUserInput, summary?, error? }` | Public run lifecycle transition |
471
+ | `run_completed` | `{ taskId, runId, taskBoundaryId, state, taskComplete, needsUserInput, summary?, error? }` | Terminal public run lifecycle event |
412
472
  | `checkpoint_state` | `{ state, reason?, action?, code?, message? }` | Checkpoint sync state updates |
413
473
  | `checkpoint_error` | `{ action, code?, message, ... }` | Checkpoint request failure details |
414
474
  | `tab_event_conflict_retry` | `{ runId, conflict?, ... }` | One stale seq/epoch tab-event conflict was recovered by silent retry |
415
475
  | `tab_event_conflict_exhausted` | `{ runId, conflict?, ... }` | Tab-event stale conflict retry exhausted (non-fatal; projection sync follows) |
416
476
  | `checkpoint_token_missing` | `{ action, status }` | Legacy checkpoint browser path blocked |
417
477
 
478
+ `requestSigned(...)` and `registerPromptContextProvider(...)` are the main extension points RoverBook uses for signed analytics writes and memory injection.
479
+
418
480
  ## Content Security Policy (CSP)
419
481
 
420
482
  If your site sets a CSP header, add these directives: