@rtrvr-ai/rover 3.0.1 → 4.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 +110 -12
- package/dist/agentDiscovery.d.ts +304 -0
- package/dist/agentDiscovery.js +1040 -0
- package/dist/embed.js +3707 -1565
- package/dist/index.d.ts +15 -2
- package/dist/ownerInstall.d.ts +150 -0
- package/dist/ownerInstall.js +340 -0
- package/dist/previewBootstrap.d.ts +9 -0
- package/dist/previewBootstrap.js +72 -2
- package/dist/rover.js +3707 -1565
- package/dist/worker/rover-worker.js +11 -11
- package/package.json +13 -1
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ Common patterns:
|
|
|
76
76
|
- `allowedDomains: ['example.com']` with `registrable_domain` allows `example.com` and all subdomains.
|
|
77
77
|
- `allowedDomains: ['*.example.com']` allows subdomains only, not the apex host.
|
|
78
78
|
- `allowedDomains: ['app.example.com']` with `registrable_domain` allows `app.example.com` and its subdomains, but not sibling hosts.
|
|
79
|
-
- `allowedDomains: ['example.com']` with `host_only` allows only the exact host `example.com
|
|
79
|
+
- `allowedDomains: ['example.com']` with `host_only` allows only the exact host `example.com`; sibling subdomains are blocked unless you explicitly list them.
|
|
80
80
|
|
|
81
81
|
## Preview Helpers
|
|
82
82
|
|
|
@@ -85,8 +85,12 @@ The SDK also exports generic helper utilities for live demos and previews:
|
|
|
85
85
|
```ts
|
|
86
86
|
import {
|
|
87
87
|
attachLaunch,
|
|
88
|
+
createRoverAgentCardJson,
|
|
89
|
+
createRoverAgentDiscoveryTags,
|
|
88
90
|
createRoverBookmarklet,
|
|
89
91
|
createRoverConsoleSnippet,
|
|
92
|
+
createRoverOwnerInstallBundle,
|
|
93
|
+
createRoverServiceDescLinkHeader,
|
|
90
94
|
createRoverScriptTagSnippet,
|
|
91
95
|
} from '@rtrvr-ai/rover';
|
|
92
96
|
```
|
|
@@ -116,6 +120,10 @@ Before you use any of these helpers on another website:
|
|
|
116
120
|
Best for quick one-click demos across many pages, with the same current-page limitations as manual injection.
|
|
117
121
|
- `createRoverScriptTagSnippet(...)`
|
|
118
122
|
Best for generating an actual snippet from known config values such as Workspace `siteId` and `publicKey`.
|
|
123
|
+
- `createRoverOwnerInstallBundle(...)`
|
|
124
|
+
Best for canonical owner-facing install output when you need a body-safe runtime snippet plus separate head discovery HTML, `rover-site.json`, `agent-card.json`, and optional `llms.txt`.
|
|
125
|
+
- `createRoverAgentCardJson(...)`, `createRoverAgentDiscoveryTags(...)`, `createRoverServiceDescLinkHeader(...)`
|
|
126
|
+
Best for publishing source-visible discovery metadata so arbitrary agents can find Rover skills before falling back to DOM automation.
|
|
119
127
|
- `attachLaunch(...)`
|
|
120
128
|
Best when you already created a launch elsewhere and want Rover to attach to it after boot.
|
|
121
129
|
|
|
@@ -167,6 +175,38 @@ const snippet = createRoverScriptTagSnippet({
|
|
|
167
175
|
});
|
|
168
176
|
```
|
|
169
177
|
|
|
178
|
+
### Example: canonical owner install bundle
|
|
179
|
+
|
|
180
|
+
```ts
|
|
181
|
+
import { createRoverOwnerInstallBundle } from '@rtrvr-ai/rover';
|
|
182
|
+
|
|
183
|
+
const bundle = createRoverOwnerInstallBundle({
|
|
184
|
+
bootConfig: {
|
|
185
|
+
siteId: 'site_123',
|
|
186
|
+
publicKey: 'pk_site_123',
|
|
187
|
+
siteKeyId: 'key_123',
|
|
188
|
+
allowedDomains: ['example.com'],
|
|
189
|
+
domainScopeMode: 'registrable_domain',
|
|
190
|
+
},
|
|
191
|
+
discovery: {
|
|
192
|
+
siteId: 'site_123',
|
|
193
|
+
siteUrl: 'https://example.com/',
|
|
194
|
+
siteName: 'Example Store',
|
|
195
|
+
roverSiteUrl: '/.well-known/rover-site.json',
|
|
196
|
+
agentCardUrl: '/.well-known/agent-card.json',
|
|
197
|
+
llmsUrl: '/llms.txt',
|
|
198
|
+
},
|
|
199
|
+
emitLlmsTxt: true,
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
bundle.bodyInstallHtml; // paste before </body>
|
|
203
|
+
bundle.headDiscoveryHtml; // place in <head> or managed head custom code
|
|
204
|
+
bundle.roverSiteJson; // publish at /.well-known/rover-site.json
|
|
205
|
+
bundle.agentCardJson; // publish at /.well-known/agent-card.json
|
|
206
|
+
bundle.serviceDescLinkHeader;
|
|
207
|
+
bundle.llmsTxt;
|
|
208
|
+
```
|
|
209
|
+
|
|
170
210
|
### Example: attach a pre-created launch
|
|
171
211
|
|
|
172
212
|
```ts
|
|
@@ -210,6 +250,52 @@ If you want a public extension that can use either config source, see the Previe
|
|
|
210
250
|
- [https://github.com/rtrvr-ai/rover/tree/main/apps/preview-helper](https://github.com/rtrvr-ai/rover/tree/main/apps/preview-helper)
|
|
211
251
|
- [https://www.rtrvr.ai/rover/docs/instant-preview-api](https://www.rtrvr.ai/rover/docs/instant-preview-api)
|
|
212
252
|
|
|
253
|
+
### Agent Discovery Publishing
|
|
254
|
+
|
|
255
|
+
Use the new discovery helpers when you want generic agents to see explicit Rover skills before they start clicking through the DOM:
|
|
256
|
+
|
|
257
|
+
```ts
|
|
258
|
+
import {
|
|
259
|
+
createRoverAgentCardJson,
|
|
260
|
+
createRoverAgentDiscoveryTags,
|
|
261
|
+
createRoverServiceDescLinkHeader,
|
|
262
|
+
} from '@rtrvr-ai/rover';
|
|
263
|
+
|
|
264
|
+
const agentCardJson = createRoverAgentCardJson({
|
|
265
|
+
siteUrl: 'https://example.com/',
|
|
266
|
+
siteName: 'Example Store',
|
|
267
|
+
shortcuts: [
|
|
268
|
+
{
|
|
269
|
+
id: 'start_checkout',
|
|
270
|
+
label: 'Start Checkout',
|
|
271
|
+
prompt: 'start checkout',
|
|
272
|
+
description: 'Launch the checkout flow directly.',
|
|
273
|
+
tags: ['checkout', 'commerce'],
|
|
274
|
+
examples: ['Start checkout for the current cart.'],
|
|
275
|
+
sideEffect: 'transactional',
|
|
276
|
+
requiresConfirmation: true,
|
|
277
|
+
},
|
|
278
|
+
],
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
const discoveryTags = createRoverAgentDiscoveryTags({
|
|
282
|
+
siteUrl: 'https://example.com/',
|
|
283
|
+
siteName: 'Example Store',
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
const linkHeader = createRoverServiceDescLinkHeader({
|
|
287
|
+
agentCardUrl: '/.well-known/agent-card.json',
|
|
288
|
+
llmsUrl: '/llms.txt',
|
|
289
|
+
});
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Recommended rollout:
|
|
293
|
+
|
|
294
|
+
1. Serve `roverSiteJson` at `/.well-known/rover-site.json`.
|
|
295
|
+
2. Serve `agentCardJson` at `/.well-known/agent-card.json`.
|
|
296
|
+
3. Add `discoveryTags` near the Rover snippet in page source.
|
|
297
|
+
4. Add the `Link` header generated by `createRoverServiceDescLinkHeader(...)`.
|
|
298
|
+
|
|
213
299
|
### Hosted preview handoff behavior
|
|
214
300
|
|
|
215
301
|
The open-source helper extension understands hosted preview handoff URLs that include:
|
|
@@ -327,7 +413,7 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
|
|
|
327
413
|
| `visitor` | `{ name?: string; email?: string }` | — | Optional visitor profile for greeting personalization. Recommended flow is async updates via `identify(...)` after login/user hydration. |
|
|
328
414
|
| `apiBase` | `string` | `https://agent.rtrvr.ai` | Optional API base override. Rover uses `/v2/rover/*` under this base. |
|
|
329
415
|
| `allowedDomains` | `string[]` | `[]` | Hostnames or patterns where Rover may operate. In `registrable_domain`, plain `example.com` covers the apex host and subdomains. |
|
|
330
|
-
| `domainScopeMode` | `'registrable_domain' \| 'host_only'` | `'registrable_domain'` | How Rover interprets plain `allowedDomains` entries: `registrable_domain` = apex + subdomains, `host_only` = exact host only. |
|
|
416
|
+
| `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. |
|
|
331
417
|
| `externalNavigationPolicy` | `'open_new_tab_notice' \| 'block' \| 'allow'` | `'open_new_tab_notice'` | External navigation policy |
|
|
332
418
|
| `navigation.crossHostPolicy` | `'same_tab' \| 'open_new_tab'` | `'same_tab'` | In-scope cross-host navigation policy |
|
|
333
419
|
| `mode` | `'full' \| 'safe'` | `'full'` | Runtime mode |
|
|
@@ -416,11 +502,12 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
|
|
|
416
502
|
| `ui.mascot.disabled` | `boolean` | `false` | Disable mascot video |
|
|
417
503
|
| `ui.mascot.mp4Url` | `string` | default | Custom mascot MP4 URL |
|
|
418
504
|
| `ui.mascot.webmUrl` | `string` | default | Custom mascot WebM URL |
|
|
419
|
-
| `ui.
|
|
505
|
+
| `ui.mascot.soundEnabled` | `boolean` | `false` | Owner gate for mascot sound. Rover keeps mascot audio unavailable unless this is explicitly `true`. |
|
|
506
|
+
| `ui.muted` | `boolean` | `true` | Initial mute state only when mascot sound is enabled. Visitor preference is stored per Rover site after they toggle sound. |
|
|
420
507
|
| `ui.thoughtStyle` | `'concise_cards' \| 'minimal'` | `'concise_cards'` | Thought rendering style |
|
|
421
508
|
| `ui.panel.resizable` | `boolean` | `true` | Enables desktop freeform resizing plus phone/tablet snap-height resizing with per-device memory |
|
|
422
509
|
| `ui.showTaskControls` | `boolean` | `true` | Show new/end task controls |
|
|
423
|
-
| `ui.shortcuts` | `RoverShortcut[]` | `[]` | Suggested journeys (max 100 stored, max 12 rendered by default; lower site-key policy caps are enforced) |
|
|
510
|
+
| `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`. |
|
|
424
511
|
| `ui.greeting` | `{ text?, delay?, duration?, disabled? }` | — | Greeting bubble config (`{name}` token supported) |
|
|
425
512
|
| `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. |
|
|
426
513
|
|
|
@@ -433,7 +520,8 @@ const RoverWidget = dynamic(() => import('./RoverWidget'), { ssr: false });
|
|
|
433
520
|
| `tools.web.scrapeMode` | `'off' \| 'on_demand'` | `'off'` | On-demand external tab scrape mode |
|
|
434
521
|
| `tools.web.allowDomains` | `string[]` | `[]` | External context allowlist |
|
|
435
522
|
| `tools.web.denyDomains` | `string[]` | `[]` | External context denylist |
|
|
436
|
-
| `tools.client` | `ClientToolDefinition[]` | `[]` | Runtime-registered client tools |
|
|
523
|
+
| `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. |
|
|
524
|
+
| `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. |
|
|
437
525
|
| `pageConfig` | `RoverPageCaptureConfig` | — | Optional per-site page-capture overrides such as `disableAutoScroll`, settle timing, and sparse-tree retry settings |
|
|
438
526
|
|
|
439
527
|
### AI-Callable URLs (Deep Links)
|
|
@@ -442,7 +530,7 @@ Rover can be triggered via URL query parameters, turning any page into an AI-cal
|
|
|
442
530
|
|
|
443
531
|
| Option | Type | Default | Description |
|
|
444
532
|
|---|---|---|---|
|
|
445
|
-
| `deepLink.enabled` | `boolean` | `false` |
|
|
533
|
+
| `deepLink.enabled` | `boolean` | derived from `siteConfig.aiAccess.enabled` when available, otherwise `false` | Advanced manual override for URL-triggered Rover |
|
|
446
534
|
| `deepLink.promptParam` | `string` | `'rover'` | Query parameter for natural-language prompts |
|
|
447
535
|
| `deepLink.shortcutParam` | `string` | `'rover_shortcut'` | Query parameter for shortcut IDs |
|
|
448
536
|
| `deepLink.consume` | `boolean` | `true` | Strip deep link params from URL after reading |
|
|
@@ -461,9 +549,9 @@ https://example.com?rover_shortcut=checkout_flow
|
|
|
461
549
|
|
|
462
550
|
For AI or CLI-triggered entrypoints, prefer exact shortcut IDs for repeatable flows.
|
|
463
551
|
|
|
464
|
-
When a site key or session token is used, Rover fetches cloud site config via `/v2/rover/session/open` (shortcuts +
|
|
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`).
|
|
465
553
|
If the same field exists in both cloud config and boot config, boot config wins.
|
|
466
|
-
`
|
|
554
|
+
`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.
|
|
467
555
|
|
|
468
556
|
If you enable `tools.web.scrapeMode: 'on_demand'`, use a site key capability profile that includes cloud scrape support.
|
|
469
557
|
|
|
@@ -484,13 +572,22 @@ The source-visible marker is optional but recommended:
|
|
|
484
572
|
<script type="application/agent+json">{"task":"https://agent.rtrvr.ai/v1/tasks"}</script>
|
|
485
573
|
```
|
|
486
574
|
|
|
575
|
+
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
|
+
|
|
487
577
|
```http
|
|
488
578
|
POST https://agent.rtrvr.ai/v1/tasks
|
|
489
579
|
Content-Type: application/json
|
|
490
580
|
|
|
491
|
-
{
|
|
581
|
+
{
|
|
582
|
+
"url": "https://www.rtrvr.ai",
|
|
583
|
+
"goal": "Get me the latest blog post",
|
|
584
|
+
"capabilityId": "latest_blog_post",
|
|
585
|
+
"accept": { "modes": ["text", "json"] }
|
|
586
|
+
}
|
|
492
587
|
```
|
|
493
588
|
|
|
589
|
+
Compatibility aliases such as `{ "url": "...", "prompt": "..." }` and `{ "url": "...", "shortcutId": "..." }` still work, but the richer task envelope is the canonical contract.
|
|
590
|
+
|
|
494
591
|
Callers may also provide structured visiting-agent metadata:
|
|
495
592
|
|
|
496
593
|
```http
|
|
@@ -499,7 +596,7 @@ Content-Type: application/json
|
|
|
499
596
|
|
|
500
597
|
{
|
|
501
598
|
"url": "https://www.rtrvr.ai",
|
|
502
|
-
"
|
|
599
|
+
"goal": "Get me the latest blog post",
|
|
503
600
|
"agent": {
|
|
504
601
|
"key": "gpt-5.4-demo-agent",
|
|
505
602
|
"name": "GPT-5.4 Demo Agent",
|
|
@@ -539,13 +636,13 @@ Rover deep links like `?rover=` and `?rover_shortcut=` remain the simple browser
|
|
|
539
636
|
|
|
540
637
|
Rover normalizes visiting-agent attribution in this order:
|
|
541
638
|
|
|
542
|
-
1. verified signal
|
|
639
|
+
1. verified signed signal
|
|
543
640
|
2. explicit `agent` object on public task creation or handoffs
|
|
544
641
|
3. heuristic headers such as `User-Agent`, `Signature-Agent`, `Signature`, `Signature-Input`, and `X-RTRVR-Client-Id`
|
|
545
642
|
4. advanced local fallbacks such as RoverBook `identityResolver`
|
|
546
643
|
5. anonymous fallback
|
|
547
644
|
|
|
548
|
-
|
|
645
|
+
Trust tiers are `verified_signed`, `signed_directory_only`, `self_reported`, `heuristic`, and `anonymous`. Unsigned headers never escalate above `heuristic`.
|
|
549
646
|
|
|
550
647
|
### Cross-site workflows and handoffs
|
|
551
648
|
|
|
@@ -620,6 +717,7 @@ rover.send('Hello');
|
|
|
620
717
|
| `newTask(options?)` | Start a new task, clearing context |
|
|
621
718
|
| `endTask(options?)` | End the current task |
|
|
622
719
|
| `getState()` | Get current runtime state |
|
|
720
|
+
| `getAgentCard()` | Build the current Rover capability card from live shortcuts, client tools, and WebMCP metadata |
|
|
623
721
|
| `update(config)` | Update configuration without rebooting |
|
|
624
722
|
| `registerTool(def, handler)` | Register a client-side tool |
|
|
625
723
|
| `requestSigned(url, init?)` | Issue a fetch signed with the current Rover session token and site/session headers |
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import type { RoverShortcut } from '@rover/ui';
|
|
2
|
+
import { createRoverAgentDiscoverySnapshot } from '@rover/shared/lib/agent-discovery.js';
|
|
3
|
+
import type { RoverAgentDiscoverySnapshot } from '@rover/shared/lib/types/index.js';
|
|
4
|
+
export declare const DEFAULT_AGENT_CARD_PATH = "/.well-known/agent-card.json";
|
|
5
|
+
export declare const DEFAULT_ROVER_SITE_PATH = "/.well-known/rover-site.json";
|
|
6
|
+
export declare const DEFAULT_LLMS_PATH = "/llms.txt";
|
|
7
|
+
export declare const ROVER_WEBMCP_DISCOVERY_GLOBAL = "__ROVER_WEBMCP_TOOL_DEFS__";
|
|
8
|
+
export declare const ROVER_DISCOVERY_ACTION_SHEET_MAX_ACTIONS = 3;
|
|
9
|
+
type JsonSchema = Record<string, any>;
|
|
10
|
+
export type RoverDiscoveryExecutionPreference = 'auto' | 'browser' | 'cloud';
|
|
11
|
+
export type RoverDiscoverySurfaceMode = 'silent' | 'beacon' | 'integrated' | 'debug';
|
|
12
|
+
export type RoverDiscoverySurfaceBranding = 'site' | 'co' | 'rover';
|
|
13
|
+
export type RoverDiscoveryHostSurface = 'auto' | 'existing-assistant' | 'floating-corner' | 'inline-primary';
|
|
14
|
+
export type RoverDiscoveryActionReveal = 'click' | 'focus' | 'keyboard' | 'agent-handshake';
|
|
15
|
+
export type RoverCapabilityResultMode = 'text' | 'markdown' | 'json' | 'observation' | 'artifacts';
|
|
16
|
+
export type RoverSkillSideEffect = 'none' | 'read' | 'write' | 'transactional';
|
|
17
|
+
export type RoverSkillInterface = 'task' | 'shortcut' | 'client_tool' | 'webmcp';
|
|
18
|
+
export type RoverDiscoverySurfacePolicy = {
|
|
19
|
+
mode?: RoverDiscoverySurfaceMode;
|
|
20
|
+
branding?: RoverDiscoverySurfaceBranding;
|
|
21
|
+
hostSurface?: RoverDiscoveryHostSurface;
|
|
22
|
+
actionReveal?: RoverDiscoveryActionReveal;
|
|
23
|
+
beaconLabel?: string;
|
|
24
|
+
agentModeEntryHints?: string[];
|
|
25
|
+
};
|
|
26
|
+
export type RoverToolAnnotations = {
|
|
27
|
+
category?: string;
|
|
28
|
+
tags?: string[];
|
|
29
|
+
examples?: string[];
|
|
30
|
+
whenToUse?: string;
|
|
31
|
+
whyUse?: string;
|
|
32
|
+
sideEffect?: RoverSkillSideEffect;
|
|
33
|
+
requiresConfirmation?: boolean;
|
|
34
|
+
preferredInterface?: RoverSkillInterface;
|
|
35
|
+
priority?: 'primary' | 'secondary';
|
|
36
|
+
};
|
|
37
|
+
export type RoverAgentDiscoveryToolDefinition = {
|
|
38
|
+
name: string;
|
|
39
|
+
title?: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
parameters?: Record<string, any>;
|
|
42
|
+
required?: string[];
|
|
43
|
+
schema?: JsonSchema;
|
|
44
|
+
outputSchema?: JsonSchema;
|
|
45
|
+
llmCallable?: boolean;
|
|
46
|
+
annotations?: RoverToolAnnotations | Record<string, any>;
|
|
47
|
+
};
|
|
48
|
+
export type RoverPublicSkillDefinition = {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
description: string;
|
|
52
|
+
tags?: string[];
|
|
53
|
+
examples?: string[];
|
|
54
|
+
inputSchema?: JsonSchema;
|
|
55
|
+
outputSchema?: JsonSchema;
|
|
56
|
+
sideEffect?: RoverSkillSideEffect;
|
|
57
|
+
requiresConfirmation?: boolean;
|
|
58
|
+
preferredInterface?: RoverSkillInterface;
|
|
59
|
+
category?: 'primary' | 'secondary';
|
|
60
|
+
rover?: {
|
|
61
|
+
shortcutId?: string;
|
|
62
|
+
prompt?: string;
|
|
63
|
+
routing?: 'auto' | 'act' | 'planner';
|
|
64
|
+
toolName?: string;
|
|
65
|
+
task?: {
|
|
66
|
+
endpoint: string;
|
|
67
|
+
payload: Record<string, unknown>;
|
|
68
|
+
preferExecution: RoverDiscoveryExecutionPreference;
|
|
69
|
+
};
|
|
70
|
+
deepLink?: string;
|
|
71
|
+
source?: 'shortcut' | 'client_tool' | 'webmcp' | 'additional';
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export type RoverCapabilityRecord = {
|
|
75
|
+
capabilityId: string;
|
|
76
|
+
version: string;
|
|
77
|
+
label: string;
|
|
78
|
+
description: string;
|
|
79
|
+
inputSchema?: JsonSchema;
|
|
80
|
+
outputSchema?: JsonSchema;
|
|
81
|
+
sideEffect?: RoverSkillSideEffect;
|
|
82
|
+
requiresConfirmation?: boolean;
|
|
83
|
+
preferredInterface?: RoverSkillInterface;
|
|
84
|
+
allowedExecutionModes: RoverDiscoveryExecutionPreference[];
|
|
85
|
+
resultModes: RoverCapabilityResultMode[];
|
|
86
|
+
pageScope?: string[];
|
|
87
|
+
analyticsTags?: string[];
|
|
88
|
+
rover?: RoverPublicSkillDefinition['rover'];
|
|
89
|
+
};
|
|
90
|
+
export type RoverPageDefinition = {
|
|
91
|
+
pageId: string;
|
|
92
|
+
route?: string;
|
|
93
|
+
label?: string;
|
|
94
|
+
capabilityIds?: string[];
|
|
95
|
+
entityHints?: string[];
|
|
96
|
+
formHints?: string[];
|
|
97
|
+
visibleCueLabel?: string;
|
|
98
|
+
beaconLabel?: string;
|
|
99
|
+
discoveryMode?: RoverDiscoverySurfaceMode;
|
|
100
|
+
hostSurface?: RoverDiscoveryHostSurface;
|
|
101
|
+
actionReveal?: RoverDiscoveryActionReveal;
|
|
102
|
+
agentModeEntryHints?: string[];
|
|
103
|
+
capabilitySummary?: string[];
|
|
104
|
+
};
|
|
105
|
+
export type RoverSiteProfile = {
|
|
106
|
+
identity: {
|
|
107
|
+
siteId?: string;
|
|
108
|
+
name: string;
|
|
109
|
+
description: string;
|
|
110
|
+
siteUrl: string;
|
|
111
|
+
version: string;
|
|
112
|
+
};
|
|
113
|
+
actions: RoverCapabilityRecord[];
|
|
114
|
+
pages: RoverPageDefinition[];
|
|
115
|
+
policies: {
|
|
116
|
+
preferredExecution: RoverDiscoveryExecutionPreference;
|
|
117
|
+
promptLaunchEnabled: boolean;
|
|
118
|
+
shortcutLaunchEnabled: boolean;
|
|
119
|
+
cloudBrowserAllowed: boolean;
|
|
120
|
+
delegatedHandoffs: boolean;
|
|
121
|
+
};
|
|
122
|
+
auth: {
|
|
123
|
+
taskEndpoint: string;
|
|
124
|
+
workflowEndpoint: string;
|
|
125
|
+
acceptsHttpMessageSignatures: boolean;
|
|
126
|
+
supportsUnsignedSelfReportedIdentity: boolean;
|
|
127
|
+
};
|
|
128
|
+
analytics: {
|
|
129
|
+
layer: 'roverbook';
|
|
130
|
+
taskIdField: 'taskId';
|
|
131
|
+
workflowIdField: 'workflowId';
|
|
132
|
+
capabilityIdField: 'capabilityId';
|
|
133
|
+
pageIdField: 'pageId';
|
|
134
|
+
};
|
|
135
|
+
currentPage?: RoverPageDefinition;
|
|
136
|
+
display: {
|
|
137
|
+
mode: RoverDiscoverySurfaceMode;
|
|
138
|
+
branding: RoverDiscoverySurfaceBranding;
|
|
139
|
+
hostSurface: RoverDiscoveryHostSurface;
|
|
140
|
+
actionReveal: RoverDiscoveryActionReveal;
|
|
141
|
+
beaconLabel?: string;
|
|
142
|
+
agentModeEntryHints: string[];
|
|
143
|
+
compactActionMaxActions: number;
|
|
144
|
+
};
|
|
145
|
+
artifacts: {
|
|
146
|
+
agentCardUrl: string;
|
|
147
|
+
roverSiteUrl: string;
|
|
148
|
+
llmsUrl?: string;
|
|
149
|
+
siteUrl: string;
|
|
150
|
+
};
|
|
151
|
+
interfaces?: RoverAgentCard['interfaces'];
|
|
152
|
+
};
|
|
153
|
+
export type RoverAgentCard = {
|
|
154
|
+
name: string;
|
|
155
|
+
description: string;
|
|
156
|
+
url: string;
|
|
157
|
+
version: string;
|
|
158
|
+
defaultInputModes: string[];
|
|
159
|
+
defaultOutputModes: string[];
|
|
160
|
+
capabilities: {
|
|
161
|
+
streaming: boolean;
|
|
162
|
+
publicTasks: boolean;
|
|
163
|
+
stateTransitions: boolean;
|
|
164
|
+
delegatedHandoffs: boolean;
|
|
165
|
+
webmcp: boolean;
|
|
166
|
+
};
|
|
167
|
+
skills: RoverPublicSkillDefinition[];
|
|
168
|
+
interfaces?: Array<{
|
|
169
|
+
type: 'task' | 'workflow' | 'site' | 'deep_link' | 'webmcp';
|
|
170
|
+
url: string;
|
|
171
|
+
description?: string;
|
|
172
|
+
available?: boolean;
|
|
173
|
+
}>;
|
|
174
|
+
extensions?: {
|
|
175
|
+
rover: {
|
|
176
|
+
siteId?: string;
|
|
177
|
+
siteUrl: string;
|
|
178
|
+
taskEndpoint: string;
|
|
179
|
+
workflowEndpoint: string;
|
|
180
|
+
serviceDescUrl: string;
|
|
181
|
+
roverSiteUrl: string;
|
|
182
|
+
llmsUrl?: string;
|
|
183
|
+
preferredExecution: RoverDiscoveryExecutionPreference;
|
|
184
|
+
promptLaunchEnabled: boolean;
|
|
185
|
+
shortcutLaunchEnabled: boolean;
|
|
186
|
+
cloudBrowserAllowed: boolean;
|
|
187
|
+
delegatedHandoffs: boolean;
|
|
188
|
+
instructions: string[];
|
|
189
|
+
capabilitiesGraph: RoverCapabilityRecord[];
|
|
190
|
+
pages: RoverPageDefinition[];
|
|
191
|
+
currentPage?: RoverPageDefinition;
|
|
192
|
+
discoverySurface: {
|
|
193
|
+
mode: RoverDiscoverySurfaceMode;
|
|
194
|
+
branding: RoverDiscoverySurfaceBranding;
|
|
195
|
+
hostSurface: RoverDiscoveryHostSurface;
|
|
196
|
+
actionReveal: RoverDiscoveryActionReveal;
|
|
197
|
+
beaconLabel?: string;
|
|
198
|
+
agentModeEntryHints: string[];
|
|
199
|
+
compactActionMaxActions: number;
|
|
200
|
+
};
|
|
201
|
+
shortcuts: Array<{
|
|
202
|
+
id: string;
|
|
203
|
+
label: string;
|
|
204
|
+
description?: string;
|
|
205
|
+
prompt: string;
|
|
206
|
+
routing?: 'auto' | 'act' | 'planner';
|
|
207
|
+
}>;
|
|
208
|
+
webmcp: {
|
|
209
|
+
available: boolean;
|
|
210
|
+
tools: string[];
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
export type RoverAgentDiscoveryConfig = {
|
|
216
|
+
enabled?: boolean;
|
|
217
|
+
siteUrl: string;
|
|
218
|
+
siteId?: string;
|
|
219
|
+
apiBase?: string;
|
|
220
|
+
siteName?: string;
|
|
221
|
+
description?: string;
|
|
222
|
+
version?: string;
|
|
223
|
+
agentCardUrl?: string;
|
|
224
|
+
roverSiteUrl?: string;
|
|
225
|
+
llmsUrl?: string;
|
|
226
|
+
visibleCue?: boolean;
|
|
227
|
+
discoverySurface?: RoverDiscoverySurfacePolicy;
|
|
228
|
+
hostSurfaceSelector?: string;
|
|
229
|
+
preferExecution?: RoverDiscoveryExecutionPreference;
|
|
230
|
+
shortcuts?: RoverShortcut[];
|
|
231
|
+
tools?: RoverAgentDiscoveryToolDefinition[];
|
|
232
|
+
webmcpTools?: RoverAgentDiscoveryToolDefinition[];
|
|
233
|
+
additionalSkills?: RoverPublicSkillDefinition[];
|
|
234
|
+
capabilities?: RoverCapabilityRecord[];
|
|
235
|
+
pages?: RoverPageDefinition[];
|
|
236
|
+
pageContext?: Omit<RoverPageDefinition, 'capabilityIds'> & {
|
|
237
|
+
capabilityIds?: string[];
|
|
238
|
+
};
|
|
239
|
+
aiAccess?: {
|
|
240
|
+
enabled?: boolean;
|
|
241
|
+
allowPromptLaunch?: boolean;
|
|
242
|
+
allowShortcutLaunch?: boolean;
|
|
243
|
+
allowCloudBrowser?: boolean;
|
|
244
|
+
allowDelegatedHandoffs?: boolean;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
export type RoverAgentDiscoveryRuntimeConfig = Omit<RoverAgentDiscoveryConfig, 'siteUrl'> & {
|
|
248
|
+
siteUrl?: string;
|
|
249
|
+
};
|
|
250
|
+
export declare function sanitizeRoverAgentDiscoveryRuntimeConfig(raw: unknown): RoverAgentDiscoveryRuntimeConfig | undefined;
|
|
251
|
+
export declare function createRoverAgentCard(config: RoverAgentDiscoveryConfig): RoverAgentCard;
|
|
252
|
+
export declare function createRoverSiteProfile(config: RoverAgentDiscoveryConfig): RoverSiteProfile;
|
|
253
|
+
export declare function buildRoverAgentDiscoveryPayloads(config: RoverAgentDiscoveryConfig): {
|
|
254
|
+
card: RoverAgentCard;
|
|
255
|
+
cardJson: string;
|
|
256
|
+
serviceDescHref: string;
|
|
257
|
+
roverSite: RoverSiteProfile;
|
|
258
|
+
roverSiteJson: string;
|
|
259
|
+
roverSiteHref: string;
|
|
260
|
+
pageManifest: RoverPageDefinition;
|
|
261
|
+
pageManifestJson: string;
|
|
262
|
+
llmsUrl?: string;
|
|
263
|
+
marker: {
|
|
264
|
+
task?: string;
|
|
265
|
+
card: string;
|
|
266
|
+
roverSite: string;
|
|
267
|
+
site?: string;
|
|
268
|
+
workflow?: string;
|
|
269
|
+
page?: string;
|
|
270
|
+
preferExecution?: RoverDiscoveryExecutionPreference;
|
|
271
|
+
discoveryMode?: RoverDiscoverySurfaceMode;
|
|
272
|
+
hostSurface?: RoverDiscoveryHostSurface;
|
|
273
|
+
actionReveal?: RoverDiscoveryActionReveal;
|
|
274
|
+
beaconLabel?: string;
|
|
275
|
+
skills: Array<{
|
|
276
|
+
id: string;
|
|
277
|
+
name: string;
|
|
278
|
+
}>;
|
|
279
|
+
capabilities: Array<{
|
|
280
|
+
capabilityId: string;
|
|
281
|
+
label: string;
|
|
282
|
+
}>;
|
|
283
|
+
};
|
|
284
|
+
markerJson: string;
|
|
285
|
+
};
|
|
286
|
+
export declare function createRoverAgentCardJson(config: RoverAgentDiscoveryConfig, options?: {
|
|
287
|
+
pretty?: boolean;
|
|
288
|
+
}): string;
|
|
289
|
+
export declare function createRoverWellKnownAgentCard(config: RoverAgentDiscoveryConfig, options?: {
|
|
290
|
+
pretty?: boolean;
|
|
291
|
+
}): string;
|
|
292
|
+
export declare function createRoverSiteProfileJson(config: RoverAgentDiscoveryConfig, options?: {
|
|
293
|
+
pretty?: boolean;
|
|
294
|
+
}): string;
|
|
295
|
+
export declare function createRoverWellKnownSiteProfile(config: RoverAgentDiscoveryConfig, options?: {
|
|
296
|
+
pretty?: boolean;
|
|
297
|
+
}): string;
|
|
298
|
+
export declare function createRoverServiceDescLinkHeader(config: {
|
|
299
|
+
agentCardUrl?: string;
|
|
300
|
+
llmsUrl?: string;
|
|
301
|
+
}): string;
|
|
302
|
+
export declare function createRoverAgentDiscoveryTags(config: RoverAgentDiscoveryConfig): string;
|
|
303
|
+
export { createRoverAgentDiscoverySnapshot };
|
|
304
|
+
export type { RoverAgentDiscoverySnapshot };
|