@rtrvr-ai/rover 4.0.0 → 4.1.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
@@ -20,7 +20,7 @@ Before you test Rover on arbitrary websites, get your site config from Workspace
20
20
  Add this snippet before `</body>` on any page:
21
21
 
22
22
  ```html
23
- <script type="application/agent+json">{"task":"https://agent.rtrvr.ai/v1/tasks"}</script>
23
+ <script type="application/agent+json">{"a2w":"https://agent.rtrvr.ai/v1/a2w/runs","run":"https://agent.rtrvr.ai/v1/a2w/runs"}</script>
24
24
  <script>
25
25
  (function(){
26
26
  var r = window.rover = window.rover || function(){
@@ -39,12 +39,14 @@ Add this snippet before `</body>` on any page:
39
39
  <script src="https://rover.rtrvr.ai/embed.js" async></script>
40
40
  ```
41
41
 
42
- 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.
42
+ If Agent analytics 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.
43
43
 
44
44
  Workspace also controls site mode:
45
45
 
46
- - `Full Rover agent`: action-capable Rover runtime
47
- - `RoverBook analytics-only`: embed-oriented RoverBook deployment with action tools disabled
46
+ - `Rover Agent`: action-capable Rover runtime plus Agent analytics
47
+ - `Agent Analytics`: embed-oriented analytics deployment with action tools disabled
48
+
49
+ Workspace onboarding now also gives site owners a dedicated Journeys step for shortcuts, defaults new production site keys to `No expiry`, and exposes `Cloud sandboxes` as the single owner-facing switch for cloud execution plus approved third-party browsing.
48
50
 
49
51
  Get `siteId`, `publicKey` (`pk_site_*`), and optional `siteKeyId` from Rover Workspace:
50
52
 
@@ -100,7 +102,7 @@ Use `createRoverConsoleSnippet(...)` and `createRoverBookmarklet(...)` to genera
100
102
  Before you use any of these helpers on another website:
101
103
 
102
104
  1. Open Rover Workspace.
103
- 2. Create or rotate a site key so Workspace reveals the full `pk_site_*` value.
105
+ 2. Create a site key. Workspace keeps the full owner-readable `pk_site_*` install material available whenever you reopen Install or Scripts by fetching the canonical owner install material from the backend control plane.
104
106
  3. Copy the **test config JSON** from Workspace.
105
107
  4. Either paste that JSON into the Rover website's "Try on Other Sites" tool, or pass the same values into the SDK helpers below.
106
108
 
@@ -187,6 +189,12 @@ const bundle = createRoverOwnerInstallBundle({
187
189
  siteKeyId: 'key_123',
188
190
  allowedDomains: ['example.com'],
189
191
  domainScopeMode: 'registrable_domain',
192
+ cloudSandboxEnabled: true,
193
+ ui: {
194
+ shortcuts: [
195
+ { id: 'book_demo', label: 'Book demo', prompt: 'Help me book a demo.' },
196
+ ],
197
+ },
190
198
  },
191
199
  discovery: {
192
200
  siteId: 'site_123',
@@ -414,8 +422,6 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
414
422
  | `apiBase` | `string` | `https://agent.rtrvr.ai` | Optional API base override. Rover uses `/v2/rover/*` under this base. |
415
423
  | `allowedDomains` | `string[]` | `[]` | Hostnames or patterns where Rover may operate. In `registrable_domain`, plain `example.com` covers the apex host and subdomains. |
416
424
  | `domainScopeMode` | `'registrable_domain' \| 'host_only'` | `'registrable_domain'` | How Rover interprets plain `allowedDomains` entries: `registrable_domain` = apex + subdomains, `host_only` = exact host only unless you explicitly allow more hosts. |
417
- | `externalNavigationPolicy` | `'open_new_tab_notice' \| 'block' \| 'allow'` | `'open_new_tab_notice'` | External navigation policy |
418
- | `navigation.crossHostPolicy` | `'same_tab' \| 'open_new_tab'` | `'same_tab'` | In-scope cross-host navigation policy |
419
425
  | `mode` | `'full' \| 'safe'` | `'full'` | Runtime mode |
420
426
  | `allowActions` | `boolean` | `true` | Enable or disable action tools |
421
427
  | `openOnInit` | `boolean` | `false` | Open panel immediately on boot |
@@ -499,15 +505,17 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
499
505
  | Option | Type | Default | Description |
500
506
  |---|---|---|---|
501
507
  | `ui.agent.name` | `string` | `'Rover'` | Custom assistant name |
502
- | `ui.mascot.disabled` | `boolean` | `false` | Disable mascot video |
503
- | `ui.mascot.mp4Url` | `string` | default | Custom mascot MP4 URL |
504
- | `ui.mascot.webmUrl` | `string` | default | Custom mascot WebM URL |
505
- | `ui.mascot.soundEnabled` | `boolean` | `false` | Owner gate for mascot sound. Rover keeps mascot audio unavailable unless this is explicitly `true`. |
508
+ | `ui.mascot.disabled` | `boolean` | `false` | Hide mascot media entirely |
509
+ | `ui.mascot.imageUrl` | `string` | default | Custom mascot image URL. Works by itself or as the fallback/poster for custom video mascots |
510
+ | `ui.mascot.mp4Url` | `string` | default | Custom mascot MP4 URL. Video is preferred when MP4 or WebM is provided |
511
+ | `ui.mascot.webmUrl` | `string` | default | Custom mascot WebM URL. Video is preferred when MP4 or WebM is provided |
512
+ | `ui.mascot.soundEnabled` | `boolean` | `false` | Owner gate for mascot sound. Video mascots stay silent unless this is explicitly `true`; image-only mascots remain silent |
506
513
  | `ui.muted` | `boolean` | `true` | Initial mute state only when mascot sound is enabled. Visitor preference is stored per Rover site after they toggle sound. |
507
514
  | `ui.thoughtStyle` | `'concise_cards' \| 'minimal'` | `'concise_cards'` | Thought rendering style |
508
515
  | `ui.panel.resizable` | `boolean` | `true` | Enables desktop freeform resizing plus phone/tablet snap-height resizing with per-device memory |
509
516
  | `ui.showTaskControls` | `boolean` | `true` | Show new/end task controls |
510
517
  | `ui.shortcuts` | `RoverShortcut[]` | `[]` | Suggested journeys (max 100 stored, max 12 rendered by default; lower site-key policy caps are enforced). Shortcuts can also publish agent-facing metadata such as `tags`, `examples`, `inputSchema`, `outputSchema`, `sideEffect`, and `requiresConfirmation`. |
518
+ | `cloudSandboxEnabled` | `boolean` | `false` | Owner-facing shorthand for cloud execution plus approved third-party browsing. When `true`, Rover materializes `tools.web.enableExternalWebContext=true` and `tools.web.scrapeMode='on_demand'`. |
511
519
  | `ui.greeting` | `{ text?, delay?, duration?, disabled? }` | — | Greeting bubble config (`{name}` token supported) |
512
520
  | `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. |
513
521
 
@@ -549,33 +557,33 @@ https://example.com?rover_shortcut=checkout_flow
549
557
 
550
558
  For AI or CLI-triggered entrypoints, prefer exact shortcut IDs for repeatable flows.
551
559
 
552
- When a site key or session token is used, Rover fetches cloud site config via `/v2/rover/session/open` (shortcuts + `businessType` + sparse `experience` overrides + legacy voice compatibility + `aiAccess` + `pageConfig`).
560
+ When a site key or session token is used, Rover fetches cloud site config via `/v2/rover/session/open` (shortcuts + `businessType` + sparse `experience` overrides + voice compatibility + `aiAccess` + `pageConfig`).
553
561
  If the same field exists in both cloud config and boot config, boot config wins.
554
562
  `siteConfig.aiAccess.enabled` is the canonical owner-facing launch switch persisted from Workspace/Webflow. `deepLink` stays boot/runtime only for advanced manual overrides such as custom param names, explicit enable/disable, or disabling URL param consumption.
555
563
 
556
- If you enable `tools.web.scrapeMode: 'on_demand'`, use a site key capability profile that includes cloud scrape support.
564
+ For owner-facing installs, prefer `cloudSandboxEnabled: true` instead of hand-wiring low-level scrape/browser flags. Rover materializes the current runtime fields from that shorthand for you.
557
565
 
558
566
  See [full configuration reference](https://github.com/rtrvr-ai/rover/blob/main/docs/INTEGRATION.md#configuration-reference).
559
567
 
560
- ## Public Agent Tasks (ATP)
568
+ ## Agent-to-Web Protocol (A2W)
561
569
 
562
570
  Rover-enabled sites expose two public entrypoints:
563
571
 
564
572
  - browser-first convenience via `?rover=` and `?rover_shortcut=`
565
- - machine-first task resources via `POST https://agent.rtrvr.ai/v1/tasks`
573
+ - machine-first A2W runs via `POST https://agent.rtrvr.ai/v1/a2w/runs`
566
574
 
567
- Use `/v1/tasks` when you need structured progress, continuation, or the final result back.
575
+ Use `/v1/a2w/runs` when you need structured progress, continuation, or the final result back.
568
576
 
569
577
  The source-visible marker is optional but recommended:
570
578
 
571
579
  ```html
572
- <script type="application/agent+json">{"task":"https://agent.rtrvr.ai/v1/tasks"}</script>
580
+ <script type="application/agent+json">{"a2w":"https://agent.rtrvr.ai/v1/a2w/runs","run":"https://agent.rtrvr.ai/v1/a2w/runs"}</script>
573
581
  ```
574
582
 
575
583
  For stronger pre-task discovery, publish `/.well-known/rover-site.json` as Rover's authoritative rich profile, publish `/.well-known/agent-card.json` as the interop card, add a `Link: </.well-known/agent-card.json>; rel="service-desc"` header, and include inline discovery tags generated by `createRoverAgentDiscoveryTags(...)`.
576
584
 
577
585
  ```http
578
- POST https://agent.rtrvr.ai/v1/tasks
586
+ POST https://agent.rtrvr.ai/v1/a2w/runs
579
587
  Content-Type: application/json
580
588
 
581
589
  {
@@ -586,12 +594,12 @@ Content-Type: application/json
586
594
  }
587
595
  ```
588
596
 
589
- Compatibility aliases such as `{ "url": "...", "prompt": "..." }` and `{ "url": "...", "shortcutId": "..." }` still work, but the richer task envelope is the canonical contract.
597
+ Use the explicit A2W run envelope with `goal` for natural-language instructions and `shortcut` for saved journeys.
590
598
 
591
599
  Callers may also provide structured visiting-agent metadata:
592
600
 
593
601
  ```http
594
- POST https://agent.rtrvr.ai/v1/tasks
602
+ POST https://agent.rtrvr.ai/v1/a2w/runs
595
603
  Content-Type: application/json
596
604
 
597
605
  {
@@ -610,34 +618,34 @@ Content-Type: application/json
610
618
 
611
619
  Anonymous AI callers do **not** need `siteId`, `publicKey`, or `siteKeyId`.
612
620
 
613
- The returned task URL is the canonical resource:
621
+ The returned run URL is the canonical resource:
614
622
 
615
623
  - `GET` + `Accept: application/json` for polling or final result
616
624
  - `GET` + `Accept: text/event-stream` for SSE
617
625
  - `GET` + `Accept: application/x-ndjson` for CLI-friendly streaming
618
626
  - `POST { "input": "..." }` for continuation when the task asks for more input
619
627
  - `DELETE` to cancel
620
- - a `workflow` URL when the task belongs to an aggregated multi-site workflow
628
+ - a `workflow` URL when the run belongs to an aggregated multi-site workflow
621
629
 
622
- Task creation may also return browser handoff URLs:
630
+ Run creation may also return browser handoff URLs:
623
631
 
624
632
  - `open`: clean receipt URL for browser attach
625
633
  - `browserLink`: optional readable alias with visible `?rover=` or `?rover_shortcut=` when it fits the URL budget
626
634
 
627
- The task URL remains canonical; receipt links are only a browser handoff layer over that same task.
635
+ The run URL remains canonical; receipt links are only a browser handoff layer over that same run.
628
636
 
629
637
  - `Prefer: execution=browser` keeps execution browser-first
630
638
  - `Prefer: execution=cloud` is the explicit browserless path today
631
639
  - `Prefer: execution=auto` prefers browser attach first; delayed cloud auto-promotion is a follow-up robustness phase
632
640
 
633
- 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.
641
+ Rover deep links like `?rover=` and `?rover_shortcut=` remain the simple browser-first entrypoints; `/v1/a2w/runs` is the machine-oriented protocol. Cross-site workflows and handoffs extend that same public contract rather than replacing it.
634
642
 
635
643
  ### Agent identity attribution
636
644
 
637
645
  Rover normalizes visiting-agent attribution in this order:
638
646
 
639
647
  1. verified signed signal
640
- 2. explicit `agent` object on public task creation or handoffs
648
+ 2. explicit `agent` object on A2W run creation or handoffs
641
649
  3. heuristic headers such as `User-Agent`, `Signature-Agent`, `Signature`, `Signature-Input`, and `X-RTRVR-Client-Id`
642
650
  4. advanced local fallbacks such as RoverBook `identityResolver`
643
651
  5. anonymous fallback
@@ -646,13 +654,13 @@ Trust tiers are `verified_signed`, `signed_directory_only`, `self_reported`, `he
646
654
 
647
655
  ### Cross-site workflows and handoffs
648
656
 
649
- Public tasks can delegate to Rover on another Rover-enabled site without leaving the same protocol surface.
657
+ A2W runs can delegate to Rover on another Rover-enabled site without leaving the same protocol surface.
650
658
 
651
- - `POST /v1/tasks/{id}/handoffs` creates a child task on another site
652
- - `GET /v1/workflows/{id}` returns aggregated workflow state or stream
653
- - child tasks inherit the same workflow lineage as the parent
659
+ - `POST /v1/a2w/runs/{id}/handoffs` creates a child run on another site
660
+ - `GET /v1/a2w/workflows/{id}` returns aggregated workflow state or stream
661
+ - child runs inherit the same workflow lineage as the parent
654
662
 
655
- Handoff creation also accepts the optional `agent` object so a child task can inherit or explicitly override visiting-agent attribution.
663
+ Handoff creation also accepts the optional `agent` object so a child run can inherit or explicitly override visiting-agent attribution.
656
664
 
657
665
  Receiving sites must explicitly opt in through Workspace/site config:
658
666
 
@@ -680,7 +688,7 @@ Runtime contract notes:
680
688
  - `plannerOnActError` applies only in `auto` mode and only when ACT has no usable outcome.
681
689
  - Typed conflicts: `stale_seq`, `stale_epoch`, `active_run_exists`.
682
690
  - `POST /command` stale/missing run is non-fatal for tab navigation decisions (`decision='stale_run'`).
683
- - 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`).
691
+ - Cross-registrable navigation preflight is resilient: if decision checks are unavailable, Rover falls back to local runtime behavior. Standard installs open outside-domain pages in a new tab with notice and choose the right tab automatically for allowed-host hops.
684
692
  - 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.
685
693
  - Any normal user send starts a fresh task boundary (fresh `prevSteps`, fresh run-scoped tab order/scope).
686
694
  - `ask_user` answer submissions are the only continuation path and keep the same task boundary.
@@ -743,11 +751,9 @@ rover.on('error', (err) => console.error(err));
743
751
  | `close` | — | Panel closed |
744
752
  | `mode_change` | `{ mode }` | Execution mode changed |
745
753
  | `navigation_guardrail` | `{ url, policy }` | Out-of-scope navigation intercepted |
746
- | `task_started` | `{ reason }` | New task started |
747
- | `task_ended` | `{ reason }` | Task ended |
748
- | `run_started` | `{ taskId, runId, taskBoundaryId, state, taskComplete, needsUserInput, summary? }` | Public run lifecycle start event |
749
- | `run_state_transition` | `{ taskId, runId, taskBoundaryId, state, taskComplete, needsUserInput, summary?, error? }` | Public run lifecycle transition |
750
- | `run_completed` | `{ taskId, runId, taskBoundaryId, state, taskComplete, needsUserInput, summary?, error? }` | Terminal public run lifecycle event |
754
+ | `run_started` | `{ runId, executionId, runBoundaryId, state, runComplete, needsUserInput, summary? }` | Public run lifecycle start event |
755
+ | `run_state_transition` | `{ runId, executionId, runBoundaryId, state, runComplete, needsUserInput, summary?, error? }` | Public run lifecycle transition |
756
+ | `run_completed` | `{ runId, executionId, runBoundaryId, state, runComplete, needsUserInput, summary?, error? }` | Terminal public run lifecycle event |
751
757
  | `checkpoint_state` | `{ state, reason?, action?, code?, message? }` | Checkpoint sync state updates |
752
758
  | `checkpoint_error` | `{ action, code?, message, ... }` | Checkpoint request failure details |
753
759
  | `tab_event_conflict_retry` | `{ runId, conflict?, ... }` | One stale seq/epoch tab-event conflict was recovered by silent retry |
@@ -6,6 +6,8 @@ export declare const DEFAULT_ROVER_SITE_PATH = "/.well-known/rover-site.json";
6
6
  export declare const DEFAULT_LLMS_PATH = "/llms.txt";
7
7
  export declare const ROVER_WEBMCP_DISCOVERY_GLOBAL = "__ROVER_WEBMCP_TOOL_DEFS__";
8
8
  export declare const ROVER_DISCOVERY_ACTION_SHEET_MAX_ACTIONS = 3;
9
+ export declare const A2W_RUNS_PATH = "/v1/a2w/runs";
10
+ export declare const A2W_WORKFLOWS_PATH = "/v1/a2w/workflows";
9
11
  type JsonSchema = Record<string, any>;
10
12
  export type RoverDiscoveryExecutionPreference = 'auto' | 'browser' | 'cloud';
11
13
  export type RoverDiscoverySurfaceMode = 'silent' | 'beacon' | 'integrated' | 'debug';
@@ -14,7 +16,7 @@ export type RoverDiscoveryHostSurface = 'auto' | 'existing-assistant' | 'floatin
14
16
  export type RoverDiscoveryActionReveal = 'click' | 'focus' | 'keyboard' | 'agent-handshake';
15
17
  export type RoverCapabilityResultMode = 'text' | 'markdown' | 'json' | 'observation' | 'artifacts';
16
18
  export type RoverSkillSideEffect = 'none' | 'read' | 'write' | 'transactional';
17
- export type RoverSkillInterface = 'task' | 'shortcut' | 'client_tool' | 'webmcp';
19
+ export type RoverSkillInterface = 'run' | 'shortcut' | 'client_tool' | 'webmcp';
18
20
  export type RoverDiscoverySurfacePolicy = {
19
21
  mode?: RoverDiscoverySurfaceMode;
20
22
  branding?: RoverDiscoverySurfaceBranding;
@@ -62,7 +64,7 @@ export type RoverPublicSkillDefinition = {
62
64
  prompt?: string;
63
65
  routing?: 'auto' | 'act' | 'planner';
64
66
  toolName?: string;
65
- task?: {
67
+ run?: {
66
68
  endpoint: string;
67
69
  payload: Record<string, unknown>;
68
70
  preferExecution: RoverDiscoveryExecutionPreference;
@@ -114,20 +116,19 @@ export type RoverSiteProfile = {
114
116
  pages: RoverPageDefinition[];
115
117
  policies: {
116
118
  preferredExecution: RoverDiscoveryExecutionPreference;
117
- promptLaunchEnabled: boolean;
118
- shortcutLaunchEnabled: boolean;
119
+ a2wRunsEnabled: boolean;
119
120
  cloudBrowserAllowed: boolean;
120
121
  delegatedHandoffs: boolean;
121
122
  };
122
123
  auth: {
123
- taskEndpoint: string;
124
+ runEndpoint: string;
124
125
  workflowEndpoint: string;
125
126
  acceptsHttpMessageSignatures: boolean;
126
127
  supportsUnsignedSelfReportedIdentity: boolean;
127
128
  };
128
129
  analytics: {
129
130
  layer: 'roverbook';
130
- taskIdField: 'taskId';
131
+ runIdField: 'runId';
131
132
  workflowIdField: 'workflowId';
132
133
  capabilityIdField: 'capabilityId';
133
134
  pageIdField: 'pageId';
@@ -159,14 +160,14 @@ export type RoverAgentCard = {
159
160
  defaultOutputModes: string[];
160
161
  capabilities: {
161
162
  streaming: boolean;
162
- publicTasks: boolean;
163
+ a2wRuns: boolean;
163
164
  stateTransitions: boolean;
164
165
  delegatedHandoffs: boolean;
165
166
  webmcp: boolean;
166
167
  };
167
168
  skills: RoverPublicSkillDefinition[];
168
169
  interfaces?: Array<{
169
- type: 'task' | 'workflow' | 'site' | 'deep_link' | 'webmcp';
170
+ type: 'run' | 'workflow' | 'site' | 'deep_link' | 'webmcp';
170
171
  url: string;
171
172
  description?: string;
172
173
  available?: boolean;
@@ -175,14 +176,13 @@ export type RoverAgentCard = {
175
176
  rover: {
176
177
  siteId?: string;
177
178
  siteUrl: string;
178
- taskEndpoint: string;
179
+ runEndpoint: string;
179
180
  workflowEndpoint: string;
180
181
  serviceDescUrl: string;
181
182
  roverSiteUrl: string;
182
183
  llmsUrl?: string;
183
184
  preferredExecution: RoverDiscoveryExecutionPreference;
184
- promptLaunchEnabled: boolean;
185
- shortcutLaunchEnabled: boolean;
185
+ a2wRunsEnabled: boolean;
186
186
  cloudBrowserAllowed: boolean;
187
187
  delegatedHandoffs: boolean;
188
188
  instructions: string[];
@@ -238,8 +238,6 @@ export type RoverAgentDiscoveryConfig = {
238
238
  };
239
239
  aiAccess?: {
240
240
  enabled?: boolean;
241
- allowPromptLaunch?: boolean;
242
- allowShortcutLaunch?: boolean;
243
241
  allowCloudBrowser?: boolean;
244
242
  allowDelegatedHandoffs?: boolean;
245
243
  };
@@ -261,7 +259,8 @@ export declare function buildRoverAgentDiscoveryPayloads(config: RoverAgentDisco
261
259
  pageManifestJson: string;
262
260
  llmsUrl?: string;
263
261
  marker: {
264
- task?: string;
262
+ a2w?: string;
263
+ run?: string;
265
264
  card: string;
266
265
  roverSite: string;
267
266
  site?: string;
@@ -6,25 +6,27 @@ export const DEFAULT_ROVER_SITE_PATH = '/.well-known/rover-site.json';
6
6
  export const DEFAULT_LLMS_PATH = '/llms.txt';
7
7
  export const ROVER_WEBMCP_DISCOVERY_GLOBAL = '__ROVER_WEBMCP_TOOL_DEFS__';
8
8
  export const ROVER_DISCOVERY_ACTION_SHEET_MAX_ACTIONS = 3;
9
+ export const A2W_RUNS_PATH = '/v1/a2w/runs';
10
+ export const A2W_WORKFLOWS_PATH = '/v1/a2w/workflows';
9
11
  const ROVER_DISCOVERY_SHORTCUT_PROMPT_MAX_CHARS = 2000;
10
12
  const DEFAULT_SKILL_OUTPUT_SCHEMA = {
11
13
  type: 'object',
12
14
  properties: {
13
15
  status: {
14
16
  type: 'string',
15
- description: 'Task status returned by Rover.',
17
+ description: 'A2W run status returned by Rover.',
16
18
  },
17
19
  summary: {
18
20
  type: 'string',
19
21
  description: 'High-level summary of what Rover completed or observed.',
20
22
  },
21
- task: {
23
+ run: {
22
24
  type: 'string',
23
- description: 'Canonical Rover task URL.',
25
+ description: 'Canonical A2W run URL.',
24
26
  },
25
27
  workflow: {
26
28
  type: 'string',
27
- description: 'Canonical Rover workflow URL when delegation occurs.',
29
+ description: 'Canonical A2W workflow URL when delegation occurs.',
28
30
  },
29
31
  },
30
32
  };
@@ -157,11 +159,11 @@ function defaultAgentModeEntryHints(policy) {
157
159
  if (policy.hostSurface === 'existing-assistant' || policy.mode === 'integrated') {
158
160
  return [
159
161
  'Use the site assistant or chat entrypoint first when it is present on the page.',
160
- 'Prefer Rover task and shortcut surfaces over selector or screenshot guessing once the assistant surface is active.',
162
+ 'Prefer Rover A2W run and shortcut surfaces over selector or screenshot guessing once the assistant surface is active.',
161
163
  ];
162
164
  }
163
165
  return [
164
- 'Use the page beacon or task endpoint before attempting generic DOM automation.',
166
+ 'Use the page beacon or A2W run endpoint before attempting generic DOM automation.',
165
167
  'When Rover is already active, prefer the current-page actions over screenshot loops.',
166
168
  ];
167
169
  }
@@ -323,11 +325,11 @@ function normalizePageDefinition(value, defaults) {
323
325
  capabilitySummary: uniqueStrings(page.capabilitySummary, { max: 12, maxLen: 180 }),
324
326
  };
325
327
  }
326
- function buildTaskEndpoint(apiBase) {
327
- return `${toBaseUrl(apiBase)}/v1/tasks`;
328
+ function buildRunEndpoint(apiBase) {
329
+ return `${toBaseUrl(apiBase)}${A2W_RUNS_PATH}`;
328
330
  }
329
331
  function buildWorkflowEndpoint(apiBase) {
330
- return `${toBaseUrl(apiBase)}/v1/workflows`;
332
+ return `${toBaseUrl(apiBase)}${A2W_WORKFLOWS_PATH}`;
331
333
  }
332
334
  function buildDeepLink(siteUrl, shortcutId) {
333
335
  try {
@@ -472,7 +474,7 @@ function normalizePublishedShortcut(shortcut) {
472
474
  ...(shortcut.routing ? { routing: shortcut.routing } : {}),
473
475
  };
474
476
  }
475
- function buildShortcutSkill(shortcut, config, taskEndpoint) {
477
+ function buildShortcutSkill(shortcut, config, runEndpoint) {
476
478
  const publishedShortcut = normalizePublishedShortcut(shortcut);
477
479
  if (!publishedShortcut)
478
480
  return null;
@@ -498,7 +500,7 @@ function buildShortcutSkill(shortcut, config, taskEndpoint) {
498
500
  whenToUse: annotations.whenToUse
499
501
  || 'Use this when the user wants this exact site outcome and you want a stable path that avoids brittle DOM guessing.',
500
502
  whyUse: annotations.whyUse
501
- || 'Rover shortcuts are explicit site-owned entrypoints with structured task progress and cleaner recovery than generic DOM automation.',
503
+ || 'Rover shortcuts are explicit site-owned entrypoints with structured A2W run progress and cleaner recovery than generic DOM automation.',
502
504
  }, preferredInterface),
503
505
  tags,
504
506
  examples,
@@ -517,8 +519,8 @@ function buildShortcutSkill(shortcut, config, taskEndpoint) {
517
519
  prompt,
518
520
  routing: shortcut.routing,
519
521
  deepLink: buildDeepLink(config.siteUrl, id),
520
- task: {
521
- endpoint: taskEndpoint,
522
+ run: {
523
+ endpoint: runEndpoint,
522
524
  payload: {
523
525
  url: normalizeSiteUrl(config.siteUrl),
524
526
  shortcut: id,
@@ -764,19 +766,17 @@ function buildInlineDataUrl(json) {
764
766
  }
765
767
  export function createRoverAgentCard(config) {
766
768
  const siteUrl = normalizeSiteUrl(config.siteUrl);
767
- const taskEndpoint = buildTaskEndpoint(config.apiBase);
769
+ const runEndpoint = buildRunEndpoint(config.apiBase);
768
770
  const workflowEndpoint = buildWorkflowEndpoint(config.apiBase);
769
771
  const serviceDescUrl = text(config.agentCardUrl) || DEFAULT_AGENT_CARD_PATH;
770
772
  const roverSiteUrl = text(config.roverSiteUrl) || DEFAULT_ROVER_SITE_PATH;
771
773
  const llmsUrl = text(config.llmsUrl);
772
774
  const launchAccess = resolveAiLaunchAccess(config.aiAccess);
773
- const promptLaunchEnabled = launchAccess.promptLaunchEnabled;
774
- const shortcutLaunchEnabled = launchAccess.shortcutLaunchEnabled;
775
- const publicTaskEnabled = promptLaunchEnabled || shortcutLaunchEnabled;
775
+ const publicRunEnabled = launchAccess.enabled;
776
776
  const cloudBrowserAllowed = config.aiAccess?.allowCloudBrowser !== false;
777
777
  const delegatedHandoffs = config.aiAccess?.allowDelegatedHandoffs === true;
778
778
  const shortcutSkills = (config.shortcuts || [])
779
- .map(shortcut => buildShortcutSkill(shortcut, config, taskEndpoint))
779
+ .map(shortcut => buildShortcutSkill(shortcut, config, runEndpoint))
780
780
  .filter((skill) => !!skill);
781
781
  const toolSkills = (config.tools || [])
782
782
  .map(tool => buildToolSkill(tool, 'client_tool'))
@@ -819,29 +819,29 @@ export function createRoverAgentCard(config) {
819
819
  return {
820
820
  name: siteName,
821
821
  description,
822
- url: taskEndpoint,
822
+ url: runEndpoint,
823
823
  version: text(config.version, 80) || '1.0.0',
824
824
  defaultInputModes: ['text/plain', 'application/json'],
825
825
  defaultOutputModes: ['text/plain', 'application/json'],
826
826
  capabilities: {
827
- streaming: publicTaskEnabled,
828
- publicTasks: publicTaskEnabled,
829
- stateTransitions: publicTaskEnabled,
827
+ streaming: publicRunEnabled,
828
+ a2wRuns: publicRunEnabled,
829
+ stateTransitions: publicRunEnabled,
830
830
  delegatedHandoffs,
831
831
  webmcp: webmcpSkills.length > 0,
832
832
  },
833
833
  skills,
834
834
  interfaces: [
835
835
  {
836
- type: 'task',
837
- url: taskEndpoint,
838
- description: 'Canonical Rover ATP task creation endpoint.',
839
- available: promptLaunchEnabled,
836
+ type: 'run',
837
+ url: runEndpoint,
838
+ description: 'Canonical Agent-to-Web Protocol (A2W) run creation endpoint.',
839
+ available: publicRunEnabled,
840
840
  },
841
841
  {
842
842
  type: 'workflow',
843
843
  url: workflowEndpoint,
844
- description: 'Aggregated Rover workflow resource for delegated tasks.',
844
+ description: 'Aggregated Rover workflow resource for delegated runs.',
845
845
  available: true,
846
846
  },
847
847
  {
@@ -854,7 +854,7 @@ export function createRoverAgentCard(config) {
854
854
  type: 'deep_link',
855
855
  url: siteUrl,
856
856
  description: 'Browser-first Rover deep link surface using rover= or rover_shortcut= query params.',
857
- available: publicTaskEnabled,
857
+ available: publicRunEnabled,
858
858
  },
859
859
  {
860
860
  type: 'webmcp',
@@ -867,19 +867,18 @@ export function createRoverAgentCard(config) {
867
867
  rover: {
868
868
  siteId: text(config.siteId, 120) || undefined,
869
869
  siteUrl,
870
- taskEndpoint,
870
+ runEndpoint,
871
871
  workflowEndpoint,
872
872
  serviceDescUrl,
873
873
  roverSiteUrl,
874
874
  ...(llmsUrl ? { llmsUrl } : {}),
875
875
  preferredExecution: config.preferExecution || 'auto',
876
- promptLaunchEnabled,
877
- shortcutLaunchEnabled,
876
+ a2wRunsEnabled: publicRunEnabled,
878
877
  cloudBrowserAllowed,
879
878
  delegatedHandoffs,
880
879
  instructions: [
881
880
  'Prefer exact Rover shortcuts and explicit site tools over raw DOM automation when the user goal matches a published skill.',
882
- 'Use POST /v1/tasks when you need structured progress, continuation input, or a stable final result channel.',
881
+ 'Use POST /v1/a2w/runs when you need structured A2W progress, continuation input, or a stable final result channel.',
883
882
  'Fall back to generic DOM automation only when no matching Rover shortcut or explicit tool exists for the requested outcome.',
884
883
  ],
885
884
  capabilitiesGraph: capabilityGraph.capabilities,
@@ -912,20 +911,19 @@ export function createRoverSiteProfile(config) {
912
911
  pages: rover?.pages || [],
913
912
  policies: {
914
913
  preferredExecution: rover?.preferredExecution || 'auto',
915
- promptLaunchEnabled: rover?.promptLaunchEnabled !== false,
916
- shortcutLaunchEnabled: rover?.shortcutLaunchEnabled !== false,
914
+ a2wRunsEnabled: rover?.a2wRunsEnabled !== false,
917
915
  cloudBrowserAllowed: rover?.cloudBrowserAllowed !== false,
918
916
  delegatedHandoffs: rover?.delegatedHandoffs === true,
919
917
  },
920
918
  auth: {
921
- taskEndpoint: rover?.taskEndpoint || buildTaskEndpoint(config.apiBase),
919
+ runEndpoint: rover?.runEndpoint || buildRunEndpoint(config.apiBase),
922
920
  workflowEndpoint: rover?.workflowEndpoint || buildWorkflowEndpoint(config.apiBase),
923
921
  acceptsHttpMessageSignatures: true,
924
922
  supportsUnsignedSelfReportedIdentity: true,
925
923
  },
926
924
  analytics: {
927
925
  layer: 'roverbook',
928
- taskIdField: 'taskId',
926
+ runIdField: 'runId',
929
927
  workflowIdField: 'workflowId',
930
928
  capabilityIdField: 'capabilityId',
931
929
  pageIdField: 'pageId',
@@ -964,7 +962,8 @@ export function buildRoverAgentDiscoveryPayloads(config) {
964
962
  };
965
963
  const pageManifestJson = JSON.stringify(pageManifest, null, 2);
966
964
  const marker = {
967
- task: card.extensions?.rover.taskEndpoint,
965
+ a2w: card.extensions?.rover.runEndpoint,
966
+ run: card.extensions?.rover.runEndpoint,
968
967
  card: serviceDescHref,
969
968
  roverSite: roverSiteHref,
970
969
  site: card.extensions?.rover.siteUrl,