@rtrvr-ai/rover 4.0.1 → 4.2.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(){
@@ -102,7 +102,7 @@ Use `createRoverConsoleSnippet(...)` and `createRoverBookmarklet(...)` to genera
102
102
  Before you use any of these helpers on another website:
103
103
 
104
104
  1. Open Rover Workspace.
105
- 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.
106
106
  3. Copy the **test config JSON** from Workspace.
107
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.
108
108
 
@@ -422,8 +422,6 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
422
422
  | `apiBase` | `string` | `https://agent.rtrvr.ai` | Optional API base override. Rover uses `/v2/rover/*` under this base. |
423
423
  | `allowedDomains` | `string[]` | `[]` | Hostnames or patterns where Rover may operate. In `registrable_domain`, plain `example.com` covers the apex host and subdomains. |
424
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. |
425
- | `externalNavigationPolicy` | `'open_new_tab_notice' \| 'block' \| 'allow'` | `'open_new_tab_notice'` | Advanced / legacy external navigation override. Standard owner-facing installs rely on Rover's default new-tab-with-notice behavior outside allowed scope. |
426
- | `navigation.crossHostPolicy` | `'same_tab' \| 'open_new_tab'` | `'same_tab'` | Advanced / legacy in-scope cross-host override. Standard owner-facing installs let Rover choose the right tab automatically. |
427
425
  | `mode` | `'full' \| 'safe'` | `'full'` | Runtime mode |
428
426
  | `allowActions` | `boolean` | `true` | Enable or disable action tools |
429
427
  | `openOnInit` | `boolean` | `false` | Open panel immediately on boot |
@@ -516,10 +514,17 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
516
514
  | `ui.thoughtStyle` | `'concise_cards' \| 'minimal'` | `'concise_cards'` | Thought rendering style |
517
515
  | `ui.panel.resizable` | `boolean` | `true` | Enables desktop freeform resizing plus phone/tablet snap-height resizing with per-device memory |
518
516
  | `ui.showTaskControls` | `boolean` | `true` | Show new/end task controls |
519
- | `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`. |
517
+ | `ui.shortcuts` | `RoverShortcut[]` | `[]` | Suggested journeys (max 100 stored, max 12 rendered by default; lower site-key policy caps are enforced). Set `runKind: 'guide'` for onboarding/demo journeys that should narrate under the guided default. Shortcuts can also publish agent-facing metadata such as `tags`, `examples`, `inputSchema`, `outputSchema`, `sideEffect`, and `requiresConfirmation`. |
520
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'`. |
521
519
  | `ui.greeting` | `{ text?, delay?, duration?, disabled? }` | — | Greeting bubble config (`{name}` token supported) |
522
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. |
521
+ | `ui.experience.audio.narration.enabled` | `boolean` | `true` | Owner gate for Web Speech step narration. Visitors get a site-scoped speaker toggle when supported. |
522
+ | `ui.experience.audio.narration.defaultMode` | `'guided' \| 'always' \| 'off'` | `'guided'` | Speak guided/demo runs by default, every run, or stay off unless the visitor enables it. |
523
+ | `ui.experience.audio.narration.rate` | `number` | `1` | Web Speech playback rate, clamped to `0.85`-`1.15`. |
524
+ | `ui.experience.audio.narration.language` | `string` | `'en-US'` | Preferred narration language for voice matching. |
525
+ | `ui.experience.audio.narration.voicePreference` | `'auto' \| 'system' \| 'natural'` | `'auto'` | Voice matching preference; `natural` prefers higher-quality browser voices when available. |
526
+ | `ui.experience.motion.actionSpotlight` | `boolean` | `true` | Highlights the element Rover is clicking, typing into, selecting, or scrolling to. |
527
+ | `ui.experience.motion.actionSpotlightColor` | `"#RRGGBB"` | `"#FF4C00"` | Ring and glow color for Action Spotlight. |
523
528
 
524
529
  ### Web Tools
525
530
 
@@ -532,7 +537,7 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
532
537
  | `tools.web.denyDomains` | `string[]` | `[]` | External context denylist |
533
538
  | `tools.client` | `ClientToolDefinition[]` | `[]` | Runtime-registered client tools. Tool definitions can include `title`, `outputSchema`, and `annotations` (`whenToUse`, `whyUse`, `examples`, `sideEffect`, `requiresConfirmation`) to improve model tool selection and discovery-card quality. |
534
539
  | `agentDiscovery` | `{ enabled?, siteName?, description?, version?, siteUrl?, agentCardUrl?, roverSiteUrl?, llmsUrl?, hostSurfaceSelector?, preferExecution?, discoverySurface?, additionalSkills? }` | — | Optional overrides for Rover's generated discovery surfaces. `rover-site.json` is the authoritative rich profile, `agent-card.json` is the interop card, and `discoverySurface.beaconLabel` now feeds the visible seed/presence CTA text in production. Legacy `visibleCue` / `visibleCueLabel` remain compatibility inputs only. |
535
- | `pageConfig` | `RoverPageCaptureConfig` | | Optional per-site page-capture overrides such as `disableAutoScroll`, settle timing, and sparse-tree retry settings |
540
+ | `pageConfig` | `RoverPageCaptureConfig` | `{ disableAutoScroll: true }` for generated installs | Optional per-site page-capture overrides such as `disableAutoScroll`, settle timing, and sparse-tree retry settings. Set `disableAutoScroll: false` only when automatic page-capture scrolling is desired. |
536
541
 
537
542
  ### AI-Callable URLs (Deep Links)
538
543
 
@@ -559,7 +564,7 @@ https://example.com?rover_shortcut=checkout_flow
559
564
 
560
565
  For AI or CLI-triggered entrypoints, prefer exact shortcut IDs for repeatable flows.
561
566
 
562
- 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`).
567
+ 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`).
563
568
  If the same field exists in both cloud config and boot config, boot config wins.
564
569
  `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.
565
570
 
@@ -567,25 +572,25 @@ For owner-facing installs, prefer `cloudSandboxEnabled: true` instead of hand-wi
567
572
 
568
573
  See [full configuration reference](https://github.com/rtrvr-ai/rover/blob/main/docs/INTEGRATION.md#configuration-reference).
569
574
 
570
- ## Public Agent Tasks (ATP)
575
+ ## Agent-to-Web Protocol (A2W)
571
576
 
572
577
  Rover-enabled sites expose two public entrypoints:
573
578
 
574
579
  - browser-first convenience via `?rover=` and `?rover_shortcut=`
575
- - machine-first task resources via `POST https://agent.rtrvr.ai/v1/tasks`
580
+ - machine-first A2W runs via `POST https://agent.rtrvr.ai/v1/a2w/runs`
576
581
 
577
- Use `/v1/tasks` when you need structured progress, continuation, or the final result back.
582
+ Use `/v1/a2w/runs` when you need structured progress, continuation, or the final result back.
578
583
 
579
584
  The source-visible marker is optional but recommended:
580
585
 
581
586
  ```html
582
- <script type="application/agent+json">{"task":"https://agent.rtrvr.ai/v1/tasks"}</script>
587
+ <script type="application/agent+json">{"a2w":"https://agent.rtrvr.ai/v1/a2w/runs","run":"https://agent.rtrvr.ai/v1/a2w/runs"}</script>
583
588
  ```
584
589
 
585
590
  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(...)`.
586
591
 
587
592
  ```http
588
- POST https://agent.rtrvr.ai/v1/tasks
593
+ POST https://agent.rtrvr.ai/v1/a2w/runs
589
594
  Content-Type: application/json
590
595
 
591
596
  {
@@ -596,12 +601,12 @@ Content-Type: application/json
596
601
  }
597
602
  ```
598
603
 
599
- Compatibility aliases such as `{ "url": "...", "prompt": "..." }` and `{ "url": "...", "shortcutId": "..." }` still work, but the richer task envelope is the canonical contract.
604
+ Use the explicit A2W run envelope with `goal` for natural-language instructions and `shortcut` for saved journeys.
600
605
 
601
606
  Callers may also provide structured visiting-agent metadata:
602
607
 
603
608
  ```http
604
- POST https://agent.rtrvr.ai/v1/tasks
609
+ POST https://agent.rtrvr.ai/v1/a2w/runs
605
610
  Content-Type: application/json
606
611
 
607
612
  {
@@ -620,34 +625,34 @@ Content-Type: application/json
620
625
 
621
626
  Anonymous AI callers do **not** need `siteId`, `publicKey`, or `siteKeyId`.
622
627
 
623
- The returned task URL is the canonical resource:
628
+ The returned run URL is the canonical resource:
624
629
 
625
630
  - `GET` + `Accept: application/json` for polling or final result
626
631
  - `GET` + `Accept: text/event-stream` for SSE
627
632
  - `GET` + `Accept: application/x-ndjson` for CLI-friendly streaming
628
633
  - `POST { "input": "..." }` for continuation when the task asks for more input
629
634
  - `DELETE` to cancel
630
- - a `workflow` URL when the task belongs to an aggregated multi-site workflow
635
+ - a `workflow` URL when the run belongs to an aggregated multi-site workflow
631
636
 
632
- Task creation may also return browser handoff URLs:
637
+ Run creation may also return browser handoff URLs:
633
638
 
634
639
  - `open`: clean receipt URL for browser attach
635
640
  - `browserLink`: optional readable alias with visible `?rover=` or `?rover_shortcut=` when it fits the URL budget
636
641
 
637
- The task URL remains canonical; receipt links are only a browser handoff layer over that same task.
642
+ The run URL remains canonical; receipt links are only a browser handoff layer over that same run.
638
643
 
639
644
  - `Prefer: execution=browser` keeps execution browser-first
640
645
  - `Prefer: execution=cloud` is the explicit browserless path today
641
646
  - `Prefer: execution=auto` prefers browser attach first; delayed cloud auto-promotion is a follow-up robustness phase
642
647
 
643
- 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.
648
+ 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.
644
649
 
645
650
  ### Agent identity attribution
646
651
 
647
652
  Rover normalizes visiting-agent attribution in this order:
648
653
 
649
654
  1. verified signed signal
650
- 2. explicit `agent` object on public task creation or handoffs
655
+ 2. explicit `agent` object on A2W run creation or handoffs
651
656
  3. heuristic headers such as `User-Agent`, `Signature-Agent`, `Signature`, `Signature-Input`, and `X-RTRVR-Client-Id`
652
657
  4. advanced local fallbacks such as RoverBook `identityResolver`
653
658
  5. anonymous fallback
@@ -656,13 +661,13 @@ Trust tiers are `verified_signed`, `signed_directory_only`, `self_reported`, `he
656
661
 
657
662
  ### Cross-site workflows and handoffs
658
663
 
659
- Public tasks can delegate to Rover on another Rover-enabled site without leaving the same protocol surface.
664
+ A2W runs can delegate to Rover on another Rover-enabled site without leaving the same protocol surface.
660
665
 
661
- - `POST /v1/tasks/{id}/handoffs` creates a child task on another site
662
- - `GET /v1/workflows/{id}` returns aggregated workflow state or stream
663
- - child tasks inherit the same workflow lineage as the parent
666
+ - `POST /v1/a2w/runs/{id}/handoffs` creates a child run on another site
667
+ - `GET /v1/a2w/workflows/{id}` returns aggregated workflow state or stream
668
+ - child runs inherit the same workflow lineage as the parent
664
669
 
665
- Handoff creation also accepts the optional `agent` object so a child task can inherit or explicitly override visiting-agent attribution.
670
+ Handoff creation also accepts the optional `agent` object so a child run can inherit or explicitly override visiting-agent attribution.
666
671
 
667
672
  Receiving sites must explicitly opt in through Workspace/site config:
668
673
 
@@ -690,7 +695,7 @@ Runtime contract notes:
690
695
  - `plannerOnActError` applies only in `auto` mode and only when ACT has no usable outcome.
691
696
  - Typed conflicts: `stale_seq`, `stale_epoch`, `active_run_exists`.
692
697
  - `POST /command` stale/missing run is non-fatal for tab navigation decisions (`decision='stale_run'`).
693
- - 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; explicit legacy overrides still apply when present.
698
+ - 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.
694
699
  - 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.
695
700
  - Any normal user send starts a fresh task boundary (fresh `prevSteps`, fresh run-scoped tab order/scope).
696
701
  - `ask_user` answer submissions are the only continuation path and keep the same task boundary.
@@ -753,11 +758,9 @@ rover.on('error', (err) => console.error(err));
753
758
  | `close` | — | Panel closed |
754
759
  | `mode_change` | `{ mode }` | Execution mode changed |
755
760
  | `navigation_guardrail` | `{ url, policy }` | Out-of-scope navigation intercepted |
756
- | `task_started` | `{ reason }` | New task started |
757
- | `task_ended` | `{ reason }` | Task ended |
758
- | `run_started` | `{ taskId, runId, taskBoundaryId, state, taskComplete, needsUserInput, summary? }` | Public run lifecycle start event |
759
- | `run_state_transition` | `{ taskId, runId, taskBoundaryId, state, taskComplete, needsUserInput, summary?, error? }` | Public run lifecycle transition |
760
- | `run_completed` | `{ taskId, runId, taskBoundaryId, state, taskComplete, needsUserInput, summary?, error? }` | Terminal public run lifecycle event |
761
+ | `run_started` | `{ runId, executionId, runBoundaryId, state, runComplete, needsUserInput, summary? }` | Public run lifecycle start event |
762
+ | `run_state_transition` | `{ runId, executionId, runBoundaryId, state, runComplete, needsUserInput, summary?, error? }` | Public run lifecycle transition |
763
+ | `run_completed` | `{ runId, executionId, runBoundaryId, state, runComplete, needsUserInput, summary?, error? }` | Terminal public run lifecycle event |
761
764
  | `checkpoint_state` | `{ state, reason?, action?, code?, message? }` | Checkpoint sync state updates |
762
765
  | `checkpoint_error` | `{ action, code?, message, ... }` | Checkpoint request failure details |
763
766
  | `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;
@@ -61,8 +63,9 @@ export type RoverPublicSkillDefinition = {
61
63
  shortcutId?: string;
62
64
  prompt?: string;
63
65
  routing?: 'auto' | 'act' | 'planner';
66
+ runKind?: 'guide' | 'task';
64
67
  toolName?: string;
65
- task?: {
68
+ run?: {
66
69
  endpoint: string;
67
70
  payload: Record<string, unknown>;
68
71
  preferExecution: RoverDiscoveryExecutionPreference;
@@ -114,20 +117,19 @@ export type RoverSiteProfile = {
114
117
  pages: RoverPageDefinition[];
115
118
  policies: {
116
119
  preferredExecution: RoverDiscoveryExecutionPreference;
117
- promptLaunchEnabled: boolean;
118
- shortcutLaunchEnabled: boolean;
120
+ a2wRunsEnabled: boolean;
119
121
  cloudBrowserAllowed: boolean;
120
122
  delegatedHandoffs: boolean;
121
123
  };
122
124
  auth: {
123
- taskEndpoint: string;
125
+ runEndpoint: string;
124
126
  workflowEndpoint: string;
125
127
  acceptsHttpMessageSignatures: boolean;
126
128
  supportsUnsignedSelfReportedIdentity: boolean;
127
129
  };
128
130
  analytics: {
129
131
  layer: 'roverbook';
130
- taskIdField: 'taskId';
132
+ runIdField: 'runId';
131
133
  workflowIdField: 'workflowId';
132
134
  capabilityIdField: 'capabilityId';
133
135
  pageIdField: 'pageId';
@@ -159,14 +161,14 @@ export type RoverAgentCard = {
159
161
  defaultOutputModes: string[];
160
162
  capabilities: {
161
163
  streaming: boolean;
162
- publicTasks: boolean;
164
+ a2wRuns: boolean;
163
165
  stateTransitions: boolean;
164
166
  delegatedHandoffs: boolean;
165
167
  webmcp: boolean;
166
168
  };
167
169
  skills: RoverPublicSkillDefinition[];
168
170
  interfaces?: Array<{
169
- type: 'task' | 'workflow' | 'site' | 'deep_link' | 'webmcp';
171
+ type: 'run' | 'workflow' | 'site' | 'deep_link' | 'webmcp';
170
172
  url: string;
171
173
  description?: string;
172
174
  available?: boolean;
@@ -175,14 +177,13 @@ export type RoverAgentCard = {
175
177
  rover: {
176
178
  siteId?: string;
177
179
  siteUrl: string;
178
- taskEndpoint: string;
180
+ runEndpoint: string;
179
181
  workflowEndpoint: string;
180
182
  serviceDescUrl: string;
181
183
  roverSiteUrl: string;
182
184
  llmsUrl?: string;
183
185
  preferredExecution: RoverDiscoveryExecutionPreference;
184
- promptLaunchEnabled: boolean;
185
- shortcutLaunchEnabled: boolean;
186
+ a2wRunsEnabled: boolean;
186
187
  cloudBrowserAllowed: boolean;
187
188
  delegatedHandoffs: boolean;
188
189
  instructions: string[];
@@ -238,8 +239,6 @@ export type RoverAgentDiscoveryConfig = {
238
239
  };
239
240
  aiAccess?: {
240
241
  enabled?: boolean;
241
- allowPromptLaunch?: boolean;
242
- allowShortcutLaunch?: boolean;
243
242
  allowCloudBrowser?: boolean;
244
243
  allowDelegatedHandoffs?: boolean;
245
244
  };
@@ -261,7 +260,8 @@ export declare function buildRoverAgentDiscoveryPayloads(config: RoverAgentDisco
261
260
  pageManifestJson: string;
262
261
  llmsUrl?: string;
263
262
  marker: {
264
- task?: string;
263
+ a2w?: string;
264
+ run?: string;
265
265
  card: string;
266
266
  roverSite: string;
267
267
  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 {
@@ -412,7 +414,7 @@ function normalizeAnnotations(value) {
412
414
  requiresConfirmation: typeof annotations.requiresConfirmation === 'boolean'
413
415
  ? annotations.requiresConfirmation
414
416
  : undefined,
415
- preferredInterface: annotations.preferredInterface === 'task'
417
+ preferredInterface: annotations.preferredInterface === 'run'
416
418
  || annotations.preferredInterface === 'shortcut'
417
419
  || annotations.preferredInterface === 'client_tool'
418
420
  || annotations.preferredInterface === 'webmcp'
@@ -470,9 +472,10 @@ function normalizePublishedShortcut(shortcut) {
470
472
  prompt,
471
473
  ...(description ? { description } : {}),
472
474
  ...(shortcut.routing ? { routing: shortcut.routing } : {}),
475
+ ...(shortcut.runKind === 'guide' || shortcut.runKind === 'task' ? { runKind: shortcut.runKind } : {}),
473
476
  };
474
477
  }
475
- function buildShortcutSkill(shortcut, config, taskEndpoint) {
478
+ function buildShortcutSkill(shortcut, config, runEndpoint) {
476
479
  const publishedShortcut = normalizePublishedShortcut(shortcut);
477
480
  if (!publishedShortcut)
478
481
  return null;
@@ -498,7 +501,7 @@ function buildShortcutSkill(shortcut, config, taskEndpoint) {
498
501
  whenToUse: annotations.whenToUse
499
502
  || 'Use this when the user wants this exact site outcome and you want a stable path that avoids brittle DOM guessing.',
500
503
  whyUse: annotations.whyUse
501
- || 'Rover shortcuts are explicit site-owned entrypoints with structured task progress and cleaner recovery than generic DOM automation.',
504
+ || 'Rover shortcuts are explicit site-owned entrypoints with structured A2W run progress and cleaner recovery than generic DOM automation.',
502
505
  }, preferredInterface),
503
506
  tags,
504
507
  examples,
@@ -516,9 +519,10 @@ function buildShortcutSkill(shortcut, config, taskEndpoint) {
516
519
  shortcutId: id,
517
520
  prompt,
518
521
  routing: shortcut.routing,
522
+ runKind: shortcut.runKind,
519
523
  deepLink: buildDeepLink(config.siteUrl, id),
520
- task: {
521
- endpoint: taskEndpoint,
524
+ run: {
525
+ endpoint: runEndpoint,
522
526
  payload: {
523
527
  url: normalizeSiteUrl(config.siteUrl),
524
528
  shortcut: id,
@@ -764,19 +768,17 @@ function buildInlineDataUrl(json) {
764
768
  }
765
769
  export function createRoverAgentCard(config) {
766
770
  const siteUrl = normalizeSiteUrl(config.siteUrl);
767
- const taskEndpoint = buildTaskEndpoint(config.apiBase);
771
+ const runEndpoint = buildRunEndpoint(config.apiBase);
768
772
  const workflowEndpoint = buildWorkflowEndpoint(config.apiBase);
769
773
  const serviceDescUrl = text(config.agentCardUrl) || DEFAULT_AGENT_CARD_PATH;
770
774
  const roverSiteUrl = text(config.roverSiteUrl) || DEFAULT_ROVER_SITE_PATH;
771
775
  const llmsUrl = text(config.llmsUrl);
772
776
  const launchAccess = resolveAiLaunchAccess(config.aiAccess);
773
- const promptLaunchEnabled = launchAccess.promptLaunchEnabled;
774
- const shortcutLaunchEnabled = launchAccess.shortcutLaunchEnabled;
775
- const publicTaskEnabled = promptLaunchEnabled || shortcutLaunchEnabled;
777
+ const publicRunEnabled = launchAccess.enabled;
776
778
  const cloudBrowserAllowed = config.aiAccess?.allowCloudBrowser !== false;
777
779
  const delegatedHandoffs = config.aiAccess?.allowDelegatedHandoffs === true;
778
780
  const shortcutSkills = (config.shortcuts || [])
779
- .map(shortcut => buildShortcutSkill(shortcut, config, taskEndpoint))
781
+ .map(shortcut => buildShortcutSkill(shortcut, config, runEndpoint))
780
782
  .filter((skill) => !!skill);
781
783
  const toolSkills = (config.tools || [])
782
784
  .map(tool => buildToolSkill(tool, 'client_tool'))
@@ -819,29 +821,29 @@ export function createRoverAgentCard(config) {
819
821
  return {
820
822
  name: siteName,
821
823
  description,
822
- url: taskEndpoint,
824
+ url: runEndpoint,
823
825
  version: text(config.version, 80) || '1.0.0',
824
826
  defaultInputModes: ['text/plain', 'application/json'],
825
827
  defaultOutputModes: ['text/plain', 'application/json'],
826
828
  capabilities: {
827
- streaming: publicTaskEnabled,
828
- publicTasks: publicTaskEnabled,
829
- stateTransitions: publicTaskEnabled,
829
+ streaming: publicRunEnabled,
830
+ a2wRuns: publicRunEnabled,
831
+ stateTransitions: publicRunEnabled,
830
832
  delegatedHandoffs,
831
833
  webmcp: webmcpSkills.length > 0,
832
834
  },
833
835
  skills,
834
836
  interfaces: [
835
837
  {
836
- type: 'task',
837
- url: taskEndpoint,
838
- description: 'Canonical Rover ATP task creation endpoint.',
839
- available: promptLaunchEnabled,
838
+ type: 'run',
839
+ url: runEndpoint,
840
+ description: 'Canonical Agent-to-Web Protocol (A2W) run creation endpoint.',
841
+ available: publicRunEnabled,
840
842
  },
841
843
  {
842
844
  type: 'workflow',
843
845
  url: workflowEndpoint,
844
- description: 'Aggregated Rover workflow resource for delegated tasks.',
846
+ description: 'Aggregated Rover workflow resource for delegated runs.',
845
847
  available: true,
846
848
  },
847
849
  {
@@ -854,7 +856,7 @@ export function createRoverAgentCard(config) {
854
856
  type: 'deep_link',
855
857
  url: siteUrl,
856
858
  description: 'Browser-first Rover deep link surface using rover= or rover_shortcut= query params.',
857
- available: publicTaskEnabled,
859
+ available: publicRunEnabled,
858
860
  },
859
861
  {
860
862
  type: 'webmcp',
@@ -867,19 +869,18 @@ export function createRoverAgentCard(config) {
867
869
  rover: {
868
870
  siteId: text(config.siteId, 120) || undefined,
869
871
  siteUrl,
870
- taskEndpoint,
872
+ runEndpoint,
871
873
  workflowEndpoint,
872
874
  serviceDescUrl,
873
875
  roverSiteUrl,
874
876
  ...(llmsUrl ? { llmsUrl } : {}),
875
877
  preferredExecution: config.preferExecution || 'auto',
876
- promptLaunchEnabled,
877
- shortcutLaunchEnabled,
878
+ a2wRunsEnabled: publicRunEnabled,
878
879
  cloudBrowserAllowed,
879
880
  delegatedHandoffs,
880
881
  instructions: [
881
882
  '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.',
883
+ 'Use POST /v1/a2w/runs when you need structured A2W progress, continuation input, or a stable final result channel.',
883
884
  'Fall back to generic DOM automation only when no matching Rover shortcut or explicit tool exists for the requested outcome.',
884
885
  ],
885
886
  capabilitiesGraph: capabilityGraph.capabilities,
@@ -912,20 +913,19 @@ export function createRoverSiteProfile(config) {
912
913
  pages: rover?.pages || [],
913
914
  policies: {
914
915
  preferredExecution: rover?.preferredExecution || 'auto',
915
- promptLaunchEnabled: rover?.promptLaunchEnabled !== false,
916
- shortcutLaunchEnabled: rover?.shortcutLaunchEnabled !== false,
916
+ a2wRunsEnabled: rover?.a2wRunsEnabled !== false,
917
917
  cloudBrowserAllowed: rover?.cloudBrowserAllowed !== false,
918
918
  delegatedHandoffs: rover?.delegatedHandoffs === true,
919
919
  },
920
920
  auth: {
921
- taskEndpoint: rover?.taskEndpoint || buildTaskEndpoint(config.apiBase),
921
+ runEndpoint: rover?.runEndpoint || buildRunEndpoint(config.apiBase),
922
922
  workflowEndpoint: rover?.workflowEndpoint || buildWorkflowEndpoint(config.apiBase),
923
923
  acceptsHttpMessageSignatures: true,
924
924
  supportsUnsignedSelfReportedIdentity: true,
925
925
  },
926
926
  analytics: {
927
927
  layer: 'roverbook',
928
- taskIdField: 'taskId',
928
+ runIdField: 'runId',
929
929
  workflowIdField: 'workflowId',
930
930
  capabilityIdField: 'capabilityId',
931
931
  pageIdField: 'pageId',
@@ -964,7 +964,8 @@ export function buildRoverAgentDiscoveryPayloads(config) {
964
964
  };
965
965
  const pageManifestJson = JSON.stringify(pageManifest, null, 2);
966
966
  const marker = {
967
- task: card.extensions?.rover.taskEndpoint,
967
+ a2w: card.extensions?.rover.runEndpoint,
968
+ run: card.extensions?.rover.runEndpoint,
968
969
  card: serviceDescHref,
969
970
  roverSite: roverSiteHref,
970
971
  site: card.extensions?.rover.siteUrl,
@@ -1026,15 +1027,15 @@ export function createRoverAgentDiscoveryTags(config) {
1026
1027
  const escapedRoverSiteJson = escapeScriptJson(roverSiteJson);
1027
1028
  const escapedPageManifestJson = escapeScriptJson(pageManifestJson);
1028
1029
  const lines = [
1029
- `<script type="application/agent+json">${markerJson}</script>`,
1030
- `<link rel="service-desc" href="${escapeHtmlAttr(serviceDescHref)}" type="application/json" />`,
1030
+ `<script type="application/agent+json" data-rover-agent-discovery="marker">${markerJson}</script>`,
1031
+ `<link rel="service-desc" href="${escapeHtmlAttr(serviceDescHref)}" type="application/json" data-rover-agent-discovery="service-desc" />`,
1031
1032
  ];
1032
1033
  if (llmsUrl) {
1033
- lines.push(`<link rel="service-doc" href="${escapeHtmlAttr(llmsUrl)}" type="text/markdown" />`);
1034
+ lines.push(`<link rel="service-doc" href="${escapeHtmlAttr(llmsUrl)}" type="text/markdown" data-rover-agent-discovery="service-doc" />`);
1034
1035
  }
1035
- lines.push(`<script type="application/rover-site+json">${escapedRoverSiteJson}</script>`);
1036
- lines.push(`<script type="application/rover-page+json">${escapedPageManifestJson}</script>`);
1037
- lines.push(`<script type="application/agent-card+json">${escapedCardJson}</script>`);
1036
+ lines.push(`<script type="application/rover-site+json" data-rover-agent-discovery="rover-site">${escapedRoverSiteJson}</script>`);
1037
+ lines.push(`<script type="application/rover-page+json" data-rover-agent-discovery="page">${escapedPageManifestJson}</script>`);
1038
+ lines.push(`<script type="application/agent-card+json" data-rover-agent-discovery="agent-card">${escapedCardJson}</script>`);
1038
1039
  return lines.join('\n');
1039
1040
  }
1040
1041
  export { createRoverAgentDiscoverySnapshot };