@rtrvr-ai/rover 4.0.0 → 4.0.1
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 +21 -11
- package/dist/embed.js +64 -37
- package/dist/index.d.ts +1 -0
- package/dist/ownerInstall.d.ts +2 -0
- package/dist/ownerInstall.js +19 -2
- package/dist/rover.js +64 -37
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/ownerInstall.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export type RoverOwnerInstallBootConfig = {
|
|
|
14
14
|
allowedDomains?: string[];
|
|
15
15
|
domainScopeMode?: 'host_only' | 'registrable_domain';
|
|
16
16
|
externalNavigationPolicy?: 'open_new_tab_notice' | 'block' | 'allow';
|
|
17
|
+
cloudSandboxEnabled?: boolean;
|
|
17
18
|
sessionScope?: 'shared_site' | 'tab';
|
|
18
19
|
openOnInit?: boolean;
|
|
19
20
|
mode?: 'safe' | 'full';
|
|
@@ -70,6 +71,7 @@ export type RoverOwnerInstallBootConfig = {
|
|
|
70
71
|
};
|
|
71
72
|
mascot?: {
|
|
72
73
|
disabled?: boolean;
|
|
74
|
+
imageUrl?: string;
|
|
73
75
|
mp4Url?: string;
|
|
74
76
|
webmUrl?: string;
|
|
75
77
|
soundEnabled?: boolean;
|
package/dist/ownerInstall.js
CHANGED
|
@@ -203,11 +203,28 @@ function buildQueueStubLines() {
|
|
|
203
203
|
'(function(){ var r = window.rover = window.rover || function(){ (r.q = r.q || []).push(arguments); }; r.l = +new Date(); })();',
|
|
204
204
|
];
|
|
205
205
|
}
|
|
206
|
+
function materializeCloudSandboxBootConfig(bootConfig) {
|
|
207
|
+
if (bootConfig.cloudSandboxEnabled !== true) {
|
|
208
|
+
return bootConfig;
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
...bootConfig,
|
|
212
|
+
tools: {
|
|
213
|
+
...(bootConfig.tools || {}),
|
|
214
|
+
web: {
|
|
215
|
+
...(bootConfig.tools?.web || {}),
|
|
216
|
+
enableExternalWebContext: true,
|
|
217
|
+
scrapeMode: 'on_demand',
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
};
|
|
221
|
+
}
|
|
206
222
|
function buildBootScript(bootConfig) {
|
|
223
|
+
const normalizedBootConfig = materializeCloudSandboxBootConfig(bootConfig);
|
|
207
224
|
const lines = [
|
|
208
225
|
'<script>',
|
|
209
226
|
...buildQueueStubLines().map(line => ` ${line}`),
|
|
210
|
-
` rover('boot', ${indentJson(
|
|
227
|
+
` rover('boot', ${indentJson(normalizedBootConfig)});`,
|
|
211
228
|
'</script>',
|
|
212
229
|
];
|
|
213
230
|
return lines.join('\n');
|
|
@@ -239,7 +256,7 @@ function buildRoverBookAttachScript(config, options) {
|
|
|
239
256
|
].join('\n');
|
|
240
257
|
}
|
|
241
258
|
export function createRoverOwnerInstallBundle(input) {
|
|
242
|
-
const bootConfig = input.bootConfig;
|
|
259
|
+
const bootConfig = materializeCloudSandboxBootConfig(input.bootConfig);
|
|
243
260
|
const discoveryConfig = discoveryEnabled(input.discovery) ? input.discovery : null;
|
|
244
261
|
const publishedAgentCardUrl = discoveryConfig ? text(discoveryConfig.agentCardUrl) || DEFAULT_AGENT_CARD_PATH : '';
|
|
245
262
|
const publishedRoverSiteUrl = discoveryConfig ? text(discoveryConfig.roverSiteUrl) || DEFAULT_ROVER_SITE_PATH : '';
|