@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/dist/index.d.ts CHANGED
@@ -165,6 +165,7 @@ export type RoverInit = {
165
165
  };
166
166
  mascot?: {
167
167
  disabled?: boolean;
168
+ imageUrl?: string;
168
169
  mp4Url?: string;
169
170
  webmUrl?: string;
170
171
  soundEnabled?: boolean;
@@ -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;
@@ -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(bootConfig)});`,
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 : '';