@rtrvr-ai/rover 4.0.1 → 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/dist/index.d.ts CHANGED
@@ -45,7 +45,6 @@ export type RoverInit = {
45
45
  pageConfig?: RoverPageCaptureConfig;
46
46
  allowedDomains?: string[];
47
47
  domainScopeMode?: 'host_only' | 'registrable_domain';
48
- externalNavigationPolicy?: 'open_new_tab_notice' | 'block' | 'allow';
49
48
  tabPolicy?: {
50
49
  observerByDefault?: boolean;
51
50
  actionLeaseMs?: number;
@@ -55,9 +54,6 @@ export type RoverInit = {
55
54
  actHeuristicThreshold?: number;
56
55
  plannerOnActError?: boolean;
57
56
  };
58
- navigation?: {
59
- crossHostPolicy?: 'open_new_tab' | 'same_tab';
60
- };
61
57
  timing?: {
62
58
  /** Delay (ms) before same-tab navigation executes, allowing state persistence. Default: 80 */
63
59
  navigationDelayMs?: number;
@@ -211,7 +207,7 @@ export type ClientToolDefinition = {
211
207
  annotations?: Record<string, any>;
212
208
  llmCallable?: boolean;
213
209
  };
214
- export type RoverEventName = 'ready' | 'updated' | 'status' | 'run_started' | 'run_state_transition' | 'run_completed' | 'tool_start' | 'tool_result' | 'error' | 'auth_required' | 'navigation_guardrail' | 'mode_change' | 'task_started' | 'task_ended' | 'task_suggested_reset' | 'context_restored' | 'checkpoint_state' | 'checkpoint_error' | 'tab_event_conflict_retry' | 'tab_event_conflict_exhausted' | 'checkpoint_token_missing' | 'open' | 'close';
210
+ export type RoverEventName = 'ready' | 'updated' | 'status' | 'visit_started' | 'visit_ended' | 'run_started' | 'run_state_transition' | 'run_completed' | 'tool_start' | 'tool_result' | 'error' | 'auth_required' | 'navigation_guardrail' | 'mode_change' | 'task_suggested_reset' | 'context_restored' | 'checkpoint_state' | 'checkpoint_error' | 'tab_event_conflict_retry' | 'tab_event_conflict_exhausted' | 'checkpoint_token_missing' | 'open' | 'close';
215
211
  export type RoverEventHandler = (payload?: any) => void;
216
212
  export type RoverPromptContextEntry = {
217
213
  role?: 'model';
@@ -267,7 +263,7 @@ declare function buildPublicRunStartedPayload(msg: any): Record<string, unknown>
267
263
  declare function buildPublicRunLifecyclePayload(msg: any, completionState: ReturnType<typeof normalizeRunCompletionState>): Record<string, unknown>;
268
264
  export declare function getAgentCard(): RoverAgentCard | null;
269
265
  declare function normalizeRunCompletionState(msg: any): {
270
- taskComplete: boolean;
266
+ runComplete: boolean;
271
267
  needsUserInput: boolean;
272
268
  terminalState: 'waiting_input' | 'in_progress' | 'completed' | 'failed';
273
269
  contextResetRecommended: boolean;
@@ -13,7 +13,6 @@ export type RoverOwnerInstallBootConfig = {
13
13
  workerUrl?: string;
14
14
  allowedDomains?: string[];
15
15
  domainScopeMode?: 'host_only' | 'registrable_domain';
16
- externalNavigationPolicy?: 'open_new_tab_notice' | 'block' | 'allow';
17
16
  cloudSandboxEnabled?: boolean;
18
17
  sessionScope?: 'shared_site' | 'tab';
19
18
  openOnInit?: boolean;
@@ -26,9 +25,6 @@ export type RoverOwnerInstallBootConfig = {
26
25
  consume?: boolean;
27
26
  };
28
27
  pageConfig?: RoverPageCaptureConfig | null;
29
- navigation?: {
30
- crossHostPolicy?: 'open_new_tab' | 'same_tab';
31
- };
32
28
  tabPolicy?: {
33
29
  observerByDefault?: boolean;
34
30
  actionLeaseMs?: number;
@@ -135,8 +135,10 @@ function llmsEnabled(input, config) {
135
135
  return input.emitLlmsTxt === true || !!text(config.llmsUrl);
136
136
  }
137
137
  function buildOwnerMarker(card, publishedAgentCardUrl) {
138
+ const runEndpoint = card.extensions?.rover.runEndpoint;
138
139
  return {
139
- task: card.extensions?.rover.taskEndpoint,
140
+ a2w: runEndpoint,
141
+ run: runEndpoint,
140
142
  card: publishedAgentCardUrl,
141
143
  roverSite: card.extensions?.rover.roverSiteUrl,
142
144
  site: card.extensions?.rover.siteUrl,
@@ -167,9 +169,9 @@ function buildDefaultLlmsTxt(card, options) {
167
169
  '',
168
170
  card.description,
169
171
  '',
170
- 'Prefer Rover shortcuts, explicit site tools, and public task flows over raw DOM automation when they match the requested outcome.',
171
- `Primary task endpoint: ${text(card.extensions?.rover.taskEndpoint || card.url)}`,
172
- `Workflow endpoint: ${text(card.extensions?.rover.workflowEndpoint)}`,
172
+ 'Prefer Rover shortcuts, explicit site tools, and A2W runs over raw DOM automation when they match the requested outcome.',
173
+ `Primary A2W run endpoint: ${text(card.extensions?.rover.runEndpoint || card.url)}`,
174
+ `A2W workflow endpoint: ${text(card.extensions?.rover.workflowEndpoint)}`,
173
175
  `Capability card: ${options.agentCardUrl}`,
174
176
  ];
175
177
  const skills = card.skills
@@ -177,7 +179,7 @@ function buildDefaultLlmsTxt(card, options) {
177
179
  id: text(skill.id),
178
180
  name: text(skill.name),
179
181
  description: text(skill.description),
180
- interface: text(skill.preferredInterface || skill.rover?.source || 'task'),
182
+ interface: text(skill.preferredInterface || skill.rover?.source || 'run'),
181
183
  }))
182
184
  .filter(skill => skill.id && skill.name);
183
185
  if (skills.length > 0) {
@@ -21,7 +21,6 @@ export type RoverPreviewBootstrapConfig = {
21
21
  workerUrl?: string;
22
22
  allowedDomains?: string[];
23
23
  domainScopeMode?: 'host_only' | 'registrable_domain';
24
- externalNavigationPolicy?: 'open_new_tab_notice' | 'block' | 'allow';
25
24
  sessionScope?: 'shared_site' | 'tab';
26
25
  openOnInit?: boolean;
27
26
  mode?: 'safe' | 'full';
@@ -98,8 +98,6 @@ function buildBootstrapPayload(config) {
98
98
  payload.allowedDomains = normalized.allowedDomains;
99
99
  if (normalized.domainScopeMode)
100
100
  payload.domainScopeMode = normalized.domainScopeMode;
101
- if (normalized.externalNavigationPolicy)
102
- payload.externalNavigationPolicy = normalized.externalNavigationPolicy;
103
101
  if (normalized.sessionScope)
104
102
  payload.sessionScope = normalized.sessionScope;
105
103
  if (typeof normalized.openOnInit === 'boolean')
@@ -182,8 +180,6 @@ export function createRoverScriptTagSnippet(config) {
182
180
  attrs.push(`data-allowed-domains="${escapeHtmlAttr(normalized.allowedDomains.join(','))}"`);
183
181
  if (normalized.domainScopeMode)
184
182
  attrs.push(`data-domain-scope-mode="${escapeHtmlAttr(normalized.domainScopeMode)}"`);
185
- if (normalized.externalNavigationPolicy)
186
- attrs.push(`data-external-navigation-policy="${escapeHtmlAttr(normalized.externalNavigationPolicy)}"`);
187
183
  if (normalized.sessionScope)
188
184
  attrs.push(`data-session-scope="${escapeHtmlAttr(normalized.sessionScope)}"`);
189
185
  if (typeof normalized.openOnInit === 'boolean')
@@ -198,8 +194,8 @@ export function createRoverScriptTagSnippet(config) {
198
194
  attrs.push(`data-voice-language="${escapeHtmlAttr(normalized.ui.voice.language)}"`);
199
195
  if (typeof normalized.ui?.voice?.autoStopMs === 'number')
200
196
  attrs.push(`data-voice-auto-stop-ms="${escapeHtmlAttr(String(normalized.ui.voice.autoStopMs))}"`);
201
- const taskEndpoint = `${toStringValue(normalized.apiBase) || DEFAULT_AGENT_BASE}/v1/tasks`;
202
- const markerJson = escapeScriptJson(JSON.stringify({ task: taskEndpoint }));
197
+ const runEndpoint = `${toStringValue(normalized.apiBase) || DEFAULT_AGENT_BASE}/v1/a2w/runs`;
198
+ const markerJson = escapeScriptJson(JSON.stringify({ a2w: runEndpoint, run: runEndpoint, task: runEndpoint }));
203
199
  return [
204
200
  `<script type="application/agent+json" data-rover-agent-discovery="marker">${markerJson}</script>`,
205
201
  '<link rel="service-desc" href="/.well-known/agent-card.json" type="application/json" data-rover-agent-discovery="service-desc" />',
@@ -239,10 +235,6 @@ export function readRoverScriptDataAttributes(scriptEl) {
239
235
  if (domainScopeMode === 'host_only' || domainScopeMode === 'registrable_domain') {
240
236
  config.domainScopeMode = domainScopeMode;
241
237
  }
242
- const externalNavigationPolicy = toStringValue(scriptEl.getAttribute('data-external-navigation-policy'));
243
- if (externalNavigationPolicy === 'open_new_tab_notice' || externalNavigationPolicy === 'block' || externalNavigationPolicy === 'allow') {
244
- config.externalNavigationPolicy = externalNavigationPolicy;
245
- }
246
238
  const sessionScope = toStringValue(scriptEl.getAttribute('data-session-scope'));
247
239
  if (sessionScope === 'shared_site' || sessionScope === 'tab') {
248
240
  config.sessionScope = sessionScope;