@rtrvr-ai/rover 1.1.0 → 1.1.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
@@ -1,9 +1,17 @@
1
+ import { type RoverCloudCheckpointState } from './cloudCheckpoint.js';
1
2
  export type RoverWebToolsConfig = {
2
3
  enableExternalWebContext?: boolean;
3
4
  allowDomains?: string[];
4
5
  denyDomains?: string[];
5
6
  scrapeMode?: 'off' | 'on_demand';
6
7
  };
8
+ export type RoverTelemetryConfig = {
9
+ enabled?: boolean;
10
+ sampleRate?: number;
11
+ flushIntervalMs?: number;
12
+ maxBatchSize?: number;
13
+ includePayloads?: boolean;
14
+ };
7
15
  export type RoverInit = {
8
16
  siteId: string;
9
17
  apiBase?: string;
@@ -25,7 +33,6 @@ export type RoverInit = {
25
33
  allowedDomains?: string[];
26
34
  domainScopeMode?: 'host_only' | 'registrable_domain';
27
35
  externalNavigationPolicy?: 'open_new_tab_notice' | 'block' | 'allow';
28
- crossDomainPolicy?: 'block_new_tab' | 'allow';
29
36
  tabPolicy?: {
30
37
  observerByDefault?: boolean;
31
38
  actionLeaseMs?: number;
@@ -48,7 +55,23 @@ export type RoverInit = {
48
55
  pullIntervalMs?: number;
49
56
  minFlushIntervalMs?: number;
50
57
  ttlHours?: number;
58
+ onStateChange?: (payload: {
59
+ state: RoverCloudCheckpointState;
60
+ reason?: string;
61
+ action?: 'roverSessionCheckpointUpsert' | 'roverSessionCheckpointGet';
62
+ code?: string;
63
+ message?: string;
64
+ }) => void;
65
+ onError?: (payload: {
66
+ action: 'roverSessionCheckpointUpsert' | 'roverSessionCheckpointGet';
67
+ state: RoverCloudCheckpointState;
68
+ code?: string;
69
+ message: string;
70
+ status?: number;
71
+ paused: boolean;
72
+ }) => void;
51
73
  };
74
+ telemetry?: RoverTelemetryConfig;
52
75
  apiMode?: boolean;
53
76
  apiToolsConfig?: {
54
77
  mode?: 'allowlist' | 'profile' | 'none';
@@ -84,7 +107,7 @@ export type ClientToolDefinition = {
84
107
  schema?: any;
85
108
  llmCallable?: boolean;
86
109
  };
87
- export type RoverEventName = 'ready' | 'updated' | 'status' | 'tool_start' | 'tool_result' | 'error' | 'auth_required' | 'navigation_guardrail' | 'mode_change' | 'task_started' | 'task_ended' | 'task_suggested_reset' | 'context_restored' | 'open' | 'close';
110
+ export type RoverEventName = 'ready' | 'updated' | 'status' | 'tool_start' | 'tool_result' | 'error' | 'auth_required' | 'navigation_guardrail' | 'mode_change' | 'task_started' | 'task_ended' | 'task_suggested_reset' | 'context_restored' | 'checkpoint_state' | 'checkpoint_error' | 'open' | 'close';
88
111
  export type RoverEventHandler = (payload?: any) => void;
89
112
  export type RoverInstance = {
90
113
  boot: (cfg: RoverInit) => RoverInstance;