tdem-web-sdk 1.0.6 → 1.0.9

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 CHANGED
@@ -49,7 +49,7 @@ const tdem = new TDEM({
49
49
  | `click` | `boolean \| ClickMonitorConfig` | 否 | `false` | 点击行为监控配置 |
50
50
  | `console` | `boolean \| ConsoleMonitorConfig` | 否 | `false` | Console 日志采集配置 |
51
51
  | `bridge` | `boolean \| BridgeMonitorConfig` | 否 | `false` | JSBridge 监控配置 |
52
- | `sessionReplay` | `boolean \| SessionReplayConfig` | 否 | `false` | 会话回放配置 |
52
+ | `sessionReplay` | `boolean \| SessionReplayConfig` | 否 | `false` | 会话回放。本地三旋钮:`sessionSampleRate`(体验流,可被远程 `replay_sample_rate` 覆盖)、`errorTraceback`(错误回溯开关,本期仅本地)、`errorSampleRate`(错误命中率,本期仅本地)。详见 [接入文档.md](../../接入文档.md) |
53
53
  | `reportRetry` | `boolean \| WebReportRetryConfig` | 否 | `false` | 上报重试配置 |
54
54
  | `delay` | `number` | 否 | `1000` | 上报节流时间(ms) |
55
55
  | `repeat` | `number` | 否 | `60` | 重复事件限制次数 |
@@ -58,6 +58,28 @@ const tdem = new TDEM({
58
58
  | `beforeRequest` | `Function` | 否 | - | 请求发出前钩子 |
59
59
  | `afterRequest` | `Function` | 否 | - | 请求完成后钩子 |
60
60
 
61
+ ### SessionReplayConfig 会话回放配置
62
+
63
+ ```typescript
64
+ interface SessionReplayConfig {
65
+ enabled?: boolean; // 是否启用,默认 false;与远程 enabled 做 AND
66
+ sessionSampleRate?: number; // 体验流采样率 (0-1),默认 0.1;可被远程 replay_sample_rate 覆盖
67
+ errorTraceback?: boolean; // 错误回溯开关,默认 true;本期仅本地
68
+ errorSampleRate?: number; // 错误命中率 (0-1),默认 1.0;仅 errorTraceback=true 时生效;本期仅本地
69
+ // ... 其他配置见 types.ts
70
+ }
71
+ ```
72
+
73
+ **三情况(产品语义)**:
74
+
75
+ | 情况 | 配置要点 | 会上报回放的会话 |
76
+ | --- | --- | --- |
77
+ | 纯错误回溯 | `sessionSampleRate=0` + `errorTraceback=true` | 仅含错误的会话(按 `errorSampleRate`) |
78
+ | 体验流 ∪ 错误回溯 | `sessionSampleRate>0` + `errorTraceback=true` | 抽中的体验流 ∪ 错误回溯会话 |
79
+ | 只看体验流 | `errorTraceback=false` | 只按 `sessionSampleRate`;错误不再开后门 |
80
+
81
+ > 未命中体验流且开启回溯时,SDK 内部用 buffer 攒数据;**无错误不因生命周期 flush**。远程本期仅 `enabled` / `tdem_sample_rate` / `replay_sample_rate`(后者覆盖体验流)。详见 [接入文档.md](../../接入文档.md)。
82
+
61
83
  ## 实例方法
62
84
 
63
85
  ### 自定义事件
@@ -1,5 +1,5 @@
1
1
  import { InterfaceEventEmitter } from './util';
2
- import { InternalConfig, Environment, SendOption, SendSuccess, SendFail, SpeedLog, BridgeLog, SendType, TDEMEvent, ReportFormSubmitResultParams, ReportStruggleParams, TrackOptions, MeasureOptions, CaptureOptions, SetPageOptions, ReportPageViewOptions } from './interface';
2
+ import { InternalConfig, Environment, SendOption, SendSuccess, SendFail, SpeedLog, BridgeLog, SendType, TDEMEvent, ReportFormSubmitResultParams, ReportStruggleParams, TrackOptions, MeasureOptions, CaptureOptions, SetPageOptions, ReportPageViewOptions, InternalSdkOptions, Transport, TransportRequest, TransportResult, TransportCallbacks, RetrySchedule } from './interface';
3
3
  import Plugin from './plugin';
4
4
  import { Pipe } from './pipes';
5
5
  /**
@@ -16,6 +16,8 @@ export default class Core {
16
16
  static instances: Core[];
17
17
  static environment: typeof Environment;
18
18
  static installedPlugins: Plugin[];
19
+ sdkName: string;
20
+ sdkVersion: string;
19
21
  /**
20
22
  * 使用插件
21
23
  * @param plugin
@@ -35,6 +37,8 @@ export default class Core {
35
37
  [key: string]: string | number | boolean;
36
38
  };
37
39
  sendNow: boolean;
40
+ protected internalTransport?: Transport;
41
+ protected internalRetrySchedule: RetrySchedule;
38
42
  _customPageUrl: string | null;
39
43
  tdemEventPipeline: import("./pipes").Pipeline<any, any>;
40
44
  private timeMap;
@@ -43,7 +47,12 @@ export default class Core {
43
47
  * 构造函数
44
48
  * @param config
45
49
  */
46
- constructor(_config: InternalConfig);
50
+ constructor(_config: InternalConfig, options?: InternalSdkOptions);
51
+ getInternalTransport(): Transport | undefined;
52
+ setInternalTransport(transport: Transport): void;
53
+ getInternalRetrySchedule(): RetrySchedule;
54
+ transportRequest(request: TransportRequest, callbacks?: TransportCallbacks): Promise<TransportResult>;
55
+ transportHandoff(request: TransportRequest, callbacks?: TransportCallbacks): Promise<TransportResult>;
47
56
  /**
48
57
  * 初始化方法,用于记录用户传入参数和初始化 SDK 所有插件
49
58
  * @param config
@@ -3,7 +3,7 @@ import Core from './core';
3
3
  import Plugin from './plugin';
4
4
  export { Plugin };
5
5
  export default Core;
6
- export { SpeedLog, BridgeLog, StaticAssetsLog, PagePerformanceLog, PagePerformanceLogForHippy3, HippyPagePerformanceLog, Config, InternalConfig, CoreApiConfig, SendOption, SendSuccess, SendFail, SendType, PlatTypeNum, NetworkTypeNum, PagePerformanceStruct, EventType, EventCategory, BaseEvent, ExceptionStack, ExceptionFrame, FormSubmitStatus, NavigationType, StruggleStatus, StruggleOwnerType, StruggleEventName, JSErrorEvent, PromiseErrorEvent, ResourceErrorEvent, APIErrorEvent, PageLoadEvent, ResourceLoadEvent, APICallEvent, WebVitalsEvent, EventContextData, BehaviorContextData, FormEventData, ClickEvent, PageViewEvent, FormFocusEvent, FormBlurEvent, FormChangeEvent, FormSubmitEvent, FormSubmitResultEvent, StruggleEvent, CustomEvent, CustomTimeEvent, LogEvent, TDEMEvent, ReportStruggleParams, ReportFormSubmitResultParams, EventOptions, TrackOptions, MeasureOptions, CaptureOptions, SetPageOptions, ReportPageViewOptions, generateEventId, parseErrorStack, } from './interface';
6
+ export { SpeedLog, BridgeLog, StaticAssetsLog, PagePerformanceLog, PagePerformanceLogForHippy3, HippyPagePerformanceLog, Config, InternalConfig, CoreApiConfig, SendOption, SendSuccess, SendFail, SendType, Transport, TransportRequest, TransportResult, TransportCallbacks, TransportMethod, TransportBody, RetryDelayResolver, RetrySchedule, DEFAULT_TRANSPORT_RETRY_SCHEDULE, InternalSdkOptions, PlatTypeNum, NetworkTypeNum, PagePerformanceStruct, EventType, EventCategory, BaseEvent, ExceptionStack, ExceptionFrame, FormSubmitStatus, NavigationType, StruggleStatus, StruggleOwnerType, StruggleEventName, JSErrorEvent, PromiseErrorEvent, ResourceErrorEvent, APIErrorEvent, PageLoadEvent, ResourceLoadEvent, APICallEvent, WebVitalsEvent, EventContextData, BehaviorContextData, FormEventData, ClickEvent, PageViewEvent, FormFocusEvent, FormBlurEvent, FormChangeEvent, FormSubmitEvent, FormSubmitResultEvent, StruggleEvent, CustomEvent, CustomTimeEvent, LogEvent, TDEMEvent, ReportStruggleParams, ReportFormSubmitResultParams, EventOptions, TrackOptions, MeasureOptions, CaptureOptions, SetPageOptions, ReportPageViewOptions, generateEventId, parseErrorStack, } from './interface';
7
7
  export { getDefaultConfig, setConfigUrl, globalAny, REPORT_TIMEOUT, MAX_FROM_LENGTH, ERROR_MSG_IGNORE, URL_SPEED_IGNORE, RESOURCE_TYPE_FETCH, RESOURCE_TYPE_STATIC, UNKNOWN, RESOURCE_TYPE, MAX_PROMISE_ERROR_MSG_LENGTH, } from './constant';
8
8
  export * from './pipes';
9
9
  export * from './util';
@@ -67,6 +67,11 @@ export interface EventContext {
67
67
  session_id: string;
68
68
  user_id?: string;
69
69
  platform: string;
70
+ runtime?: string;
71
+ process_type?: string;
72
+ window_id?: string;
73
+ web_contents_id?: string;
74
+ app_version?: string;
70
75
  user_agent?: string;
71
76
  screen_resolution?: string;
72
77
  language?: string;
@@ -1,5 +1,6 @@
1
1
  export { Config, InternalConfig, CoreApiConfig, PagePerformanceStruct } from './config';
2
2
  export { SpeedLog, BridgeLog, StaticAssetsLog, PagePerformanceLog, PagePerformanceLogForHippy3, HippyPagePerformanceLog, PlatTypeNum, NetworkTypeNum, } from './log';
3
3
  export { SendOption, SendSuccess, SendFail, SendType, } from './send';
4
+ export { Transport, TransportRequest, TransportResult, TransportCallbacks, TransportMethod, TransportBody, RetryDelayResolver, RetrySchedule, DEFAULT_TRANSPORT_RETRY_SCHEDULE, InternalSdkOptions, } from './transport';
4
5
  export { Environment, } from './env';
5
6
  export { EventType, EventCategory, BaseEvent, EventContext, SDKInfo, AppInfo, CollectEventsRequest, ExceptionStack, ExceptionFrame, FormSubmitStatus, NavigationType, StruggleStatus, StruggleOwnerType, StruggleEventName, JSErrorEvent, PromiseErrorEvent, ResourceErrorEvent, APIErrorEvent, PageLoadEvent, ResourceLoadEvent, APICallEvent, WebVitalsEvent, EventContextData, BehaviorContextData, FormEventData, ClickEvent, PageViewEvent, FormFocusEvent, FormBlurEvent, FormChangeEvent, FormSubmitEvent, FormSubmitResultEvent, StruggleEvent, CustomEvent, CustomTimeEvent, LogEvent, TDEMEvent, ReportStruggleParams, ReportFormSubmitResultParams, EventOptions, TrackOptions, MeasureOptions, CaptureOptions, SetPageOptions, ReportPageViewOptions, generateEventId, parseErrorStack, } from './event';
@@ -0,0 +1,48 @@
1
+ import type { SendFail, SendOption, SendSuccess } from './send';
2
+ export declare type TransportMethod = 'GET' | 'POST' | 'get' | 'post';
3
+ export declare type TransportBody = string | ArrayBuffer | ArrayBufferView | Record<string, any> | null | undefined;
4
+ export interface TransportRequest {
5
+ readonly id?: string;
6
+ readonly kind?: 'config' | 'events' | 'replay' | 'custom' | string;
7
+ readonly url: string;
8
+ readonly method?: TransportMethod;
9
+ readonly headers?: Record<string, string>;
10
+ readonly contentType?: string;
11
+ readonly body?: TransportBody;
12
+ readonly data?: any;
13
+ readonly sendBeacon?: boolean;
14
+ readonly handoff?: boolean;
15
+ readonly timeout?: number;
16
+ readonly retry?: boolean;
17
+ readonly source?: SendOption;
18
+ }
19
+ export interface TransportResult {
20
+ readonly ok: boolean;
21
+ readonly status?: number;
22
+ readonly statusText?: string;
23
+ readonly headers?: Record<string, string>;
24
+ readonly body?: any;
25
+ readonly error?: any;
26
+ readonly request?: TransportRequest;
27
+ readonly handoffAccepted?: boolean;
28
+ }
29
+ export interface TransportCallbacks {
30
+ readonly success?: SendSuccess;
31
+ readonly fail?: SendFail;
32
+ readonly final?: (result: TransportResult) => void;
33
+ }
34
+ export interface Transport {
35
+ request(request: TransportRequest, callbacks?: TransportCallbacks): Promise<TransportResult> | TransportResult | void;
36
+ handoff?(request: TransportRequest, callbacks?: TransportCallbacks): Promise<TransportResult> | TransportResult | void;
37
+ dispose?(): void;
38
+ }
39
+ export declare type RetryDelayResolver = (attempt: number, error?: any, request?: TransportRequest) => number;
40
+ export interface RetrySchedule {
41
+ readonly maxAttempts: number;
42
+ readonly delays: ReadonlyArray<number> | RetryDelayResolver;
43
+ }
44
+ export declare const DEFAULT_TRANSPORT_RETRY_SCHEDULE: RetrySchedule;
45
+ export interface InternalSdkOptions {
46
+ readonly transport?: Transport;
47
+ readonly retrySchedule?: RetrySchedule;
48
+ }
@@ -13,8 +13,18 @@ export declare const MAX_REPLAY_DURATION: number;
13
13
  export declare const MIN_REPLAY_DURATION: number;
14
14
  /** 事件缓冲区最大大小 (5MB) */
15
15
  export declare const MAX_BUFFER_SIZE: number;
16
- /** 单个 Segment 上报最大大小 (3MB),需小于后端 maxEventsSizeBytes(5MB) */
16
+ /** 单个 Segment 上报最大大小 (3MB),需小于后端 maxEventsSizeBytes(5MB),仅用于 fetch 上报路径 */
17
17
  export declare const MAX_SEGMENT_SIZE: number;
18
+ /**
19
+ * sendBeacon 单个分片最大大小 (50KB)。
20
+ * navigator.sendBeacon 与带 keepalive 的 fetch 共享浏览器强制的 64KB 排队上限
21
+ * (Fetch 规范定义,Chrome/Safari 均严格执行,超出直接同步返回 false,请求根本不会发出)。
22
+ * 这里按 events 字段压缩前的原始 JSON 长度计算,留出安全余量给:
23
+ * 1. 上报体里 project_key/session_id/replay_id 等其它字段的开销(约几百字节);
24
+ * 2. events 字段即使开启 gzip+base64 压缩,也不保证压缩后一定比原始尺寸小很多;
25
+ * 仅用于 unload 时的 sendBeacon 上报路径,不影响常规 fetch 上报路径的 MAX_SEGMENT_SIZE。
26
+ */
27
+ export declare const BEACON_MAX_CHUNK_SIZE: number;
18
28
  /** 默认 flush 间隔 (20秒) */
19
29
  export declare const DEFAULT_FLUSH_INTERVAL: number;
20
30
  /** 最小 flush 事件数量 (至少10个事件才上报) */
@@ -23,6 +33,8 @@ export declare const MIN_FLUSH_EVENT_COUNT = 10;
23
33
  export declare const SESSION_CHECKOUT_EVERY_NMS: number;
24
34
  /** buffer 模式 checkout 间隔 (2分钟) */
25
35
  export declare const BUFFER_CHECKOUT_EVERY_NMS: number;
36
+ /** buffer/错误回溯默认开启(errorTraceback / error_traceback) */
37
+ export declare const DEFAULT_ERROR_TRACEBACK = true;
26
38
  /** 默认会话采样率 (10%) */
27
39
  export declare const DEFAULT_SESSION_SAMPLE_RATE = 0.1;
28
40
  /** 默认错误采样率 (100%) */
@@ -18,5 +18,12 @@ export { ClickDetector } from './click-detector';
18
18
  export * from './types';
19
19
  export * from './constants';
20
20
  export * from './privacy';
21
+ export * from './replay-policy';
22
+ /**
23
+ * 检查事件闸门 + 回放策略是否允许上报回放数据。
24
+ * Replay 走独立通道,不经过 tdemEventPipeline。
25
+ * 体验流采样由 SamplerManager 决定,不再把远程 replay_sample_rate 当作独立总闸门。
26
+ */
27
+ export declare function isTDEMSampled(tdem: Core): boolean;
21
28
  declare let plugin: Plugin<Core>;
22
29
  export default plugin;
@@ -0,0 +1,39 @@
1
+ import type { SessionReplayConfig } from './types';
2
+ /** 远程 config.data 中与回放相关的字段(均可选;后两项为预留,本期后端不下发) */
3
+ export interface RemoteReplayConfig {
4
+ enabled?: boolean;
5
+ replay_sample_rate?: number;
6
+ /** @future 本期远程协议无此键,仅本地 errorTraceback */
7
+ error_traceback?: boolean;
8
+ /** @future 本期远程协议无此键,仅本地 errorSampleRate */
9
+ error_sample_rate?: number;
10
+ }
11
+ /** 生效回放策略(本地量纲) */
12
+ export interface EffectiveReplayPolicy {
13
+ enabled: boolean;
14
+ sessionSampleRate: number;
15
+ errorSampleRate: number;
16
+ /** 错误回溯开关 */
17
+ errorTraceback: boolean;
18
+ }
19
+ /** 远程 0–100 → 本地 0–1 */
20
+ export declare function remoteRateToLocal(remoteRate: number): number;
21
+ /**
22
+ * 从本地 sessionReplay 配置提取策略初值
23
+ */
24
+ export declare function localPolicyFromConfig(config: SessionReplayConfig | boolean | undefined): {
25
+ enabled: boolean;
26
+ sessionSampleRate: number;
27
+ errorSampleRate: number;
28
+ errorTraceback: boolean;
29
+ };
30
+ /**
31
+ * 合并本地与远程策略
32
+ * @param local 本地 sessionReplay 原始配置
33
+ * @param remote 远程 data(可为 null/undefined 表示无远程)
34
+ */
35
+ export declare function mergeReplayPolicy(local: SessionReplayConfig | boolean | undefined, remote?: RemoteReplayConfig | null): EffectiveReplayPolicy;
36
+ /**
37
+ * 将生效策略叠到 SessionReplayConfig(保留其它字段)
38
+ */
39
+ export declare function applyPolicyToConfig(config: SessionReplayConfig, policy: EffectiveReplayPolicy): SessionReplayConfig;
@@ -52,6 +52,10 @@ export declare class SamplerManager {
52
52
  * @returns 是否升级成功
53
53
  */
54
54
  upgradeToSessionMode(): boolean;
55
+ /**
56
+ * 更新采样率配置(远程合并后调用;不影响已做出的 mode 决策,仅影响后续 onError 骰子)
57
+ */
58
+ updateRates(sessionSampleRate?: number, errorSampleRate?: number): void;
55
59
  /**
56
60
  * 强制设置采样模式(用于测试或特殊场景)
57
61
  */
@@ -1,6 +1,9 @@
1
1
  import { Session, SamplingMode } from './types';
2
2
  export interface SessionManagerConfig {
3
- /** 保留兼容配置;新口径下不再从 sessionStorage 恢复 replay_id */
3
+ /**
4
+ * @deprecated 已废弃,构造函数不再读取此字段,不产生任何效果。
5
+ * 保留仅为兼容旧调用方传参不报错。
6
+ */
4
7
  stickySession?: boolean;
5
8
  }
6
9
  export declare class SessionManager {
@@ -3,15 +3,37 @@
3
3
  */
4
4
  import type { eventWithTime } from '@rrweb/types';
5
5
  import type { recordOptions } from 'rrweb';
6
+ import type { Transport } from "../../../../core/src";
6
7
  /** 会话回放插件配置 */
7
8
  export interface SessionReplayConfig {
8
- /** 是否启用 */
9
+ /** 是否启用(与远程 enabled 做 AND) */
9
10
  enabled?: boolean;
10
- /** 会话采样率 (0-1) */
11
+ /**
12
+ * 体验流采样率 (0-1)
13
+ * 远程键:replay_sample_rate(0–100,换算 /100)
14
+ */
11
15
  sessionSampleRate?: number;
12
- /** 错误采样率 (0-1) */
16
+ /**
17
+ * 错误回溯命中率 (0-1):首次错误是否触发回溯
18
+ * 仅当 errorTraceback=true 时生效
19
+ * 本期仅本地配置;远程暂无对应键
20
+ */
13
21
  errorSampleRate?: number;
14
- /** 是否使用 sticky session(跨页面保持会话) */
22
+ /**
23
+ * 错误回溯开关
24
+ * true:未命中体验流时可进 buffer,错误按 errorSampleRate 回溯;无错误不因生命周期上报
25
+ * false:仅体验流;errorSampleRate 忽略;错误不开后门
26
+ * 本期仅本地配置;远程暂无对应键(预留 error_traceback)
27
+ * @default true
28
+ */
29
+ errorTraceback?: boolean;
30
+ /**
31
+ * @deprecated 已废弃,不再产生任何效果。
32
+ * 旧口径下用于控制是否从 sessionStorage 恢复 replay_id;
33
+ * 现在会话共享改为基于 Cookie 的站点级 sessionId 机制(见 shared-session.ts),
34
+ * SessionManager 构造函数已不再读取此字段(见 session-manager.ts 的 SessionManagerConfig)。
35
+ * 保留此字段仅为兼容旧调用方传参不报错,计划在下一个大版本移除。
36
+ */
15
37
  stickySession?: boolean;
16
38
  /** 隐私配置 */
17
39
  privacy?: PrivacyConfig;
@@ -227,6 +249,8 @@ export interface UploaderConfig {
227
249
  onError?: (error: Error) => void;
228
250
  /** 是否启用 events 字段级 gzip+base64 压缩 */
229
251
  eventsCompression?: boolean;
252
+ /** SDK 内部 Transport(不属于公开配置) */
253
+ transport?: Transport;
230
254
  }
231
255
  /** Replay ID 生成器 */
232
256
  export declare class ReplayIdGenerator {
@@ -5,8 +5,8 @@
5
5
  * 1. SDK 启动时异步获取远程采样率配置
6
6
  * 2. 结合 localStorage 缓存实现降级策略
7
7
  * 3. 执行基于 Session 的采样决策(通过闸门管道)
8
- * 4. 执行录制回放采样决策(结果挂载到实例,供 Session Replay 插件读取)
9
- * 5. 监听 Session 续期事件,重新执行采样决策
8
+ * 4. 合并回放策略(体验流 / 错误回溯),挂到实例供 sessionReplay 使用
9
+ * 5. 监听 Session 续期事件,重新执行事件采样决策
10
10
  */
11
11
  import Core, { Plugin } from "../../../core/src";
12
12
  declare const tdemConfigPlugin: Plugin<Core>;
@@ -1,4 +1,4 @@
1
- import Core, { SendOption, SendSuccess, SendFail } from "../../core/src";
1
+ import Core, { SendOption, SendSuccess, SendFail, InternalSdkOptions } from "../../core/src";
2
2
  import { MarkDoms, InternalWebConfig } from './interface';
3
3
  export default class TDEM extends Core {
4
4
  static sessionID: string;
@@ -19,7 +19,7 @@ export default class TDEM extends Core {
19
19
  * 临时方案:先拉远程配置,enabled 时才初始化插件,确保发布初期稳定可控
20
20
  */
21
21
  _sdkInitialized: boolean;
22
- constructor(config: InternalWebConfig);
22
+ constructor(config: InternalWebConfig, internalOptions?: InternalSdkOptions);
23
23
  /**
24
24
  * 初始化启动入口。
25
25
  *
@@ -47,7 +47,11 @@ export default class TDEM extends Core {
47
47
  */
48
48
  private _prefetchConfigAndInit;
49
49
  private _buildPrefetchConfigUrl;
50
- private _loadEnabledFromCache;
50
+ /**
51
+ * 从 localStorage 恢复与 /api/v1/config data 同形的预取数据。
52
+ * 供 prefetch 网络失败时注入,保证插件初始化前就有远程策略。
53
+ */
54
+ private _loadPrefetchDataFromCache;
51
55
  /**
52
56
  * 临时方案下的初始化收口:
53
57
  * setConfig + setConfigUrl 已在 _bootstrapInit 中提前执行过,
@@ -0,0 +1,11 @@
1
+ import type { Transport, TransportCallbacks, TransportRequest, TransportResult } from "../../../core/src";
2
+ export declare class BrowserTransport implements Transport {
3
+ request(request: TransportRequest, callbacks?: TransportCallbacks): Promise<TransportResult>;
4
+ /**
5
+ * 是否对请求体做 eval → evaI 敏感词替换。
6
+ * 仅适用于明文 JSON/表单;压缩或字段级 gzip_base64 载荷必须跳过。
7
+ */
8
+ private shouldSanitizeEvalKeyword;
9
+ handoff(request: TransportRequest, callbacks?: TransportCallbacks): Promise<TransportResult>;
10
+ private applyHeaders;
11
+ }
@@ -30,7 +30,7 @@ export declare function getOrCreateSharedSession(source: 'aegis' | 'tdem', gener
30
30
  export declare function getSharedSessionId(): string | null;
31
31
  /**
32
32
  * 当 session 刷新时更新共享对象并通知其他 SDK
33
- * 同时更新 Cookie 和 sessionStorage 缓存
33
+ * 同时更新 Cookie
34
34
  */
35
35
  export declare function updateSharedSession(newSessionId: string, source: 'aegis' | 'tdem'): void;
36
36
  /**