@nnepoch/dtc-sdk 3.0.4 → 3.0.6

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.
@@ -47,427 +47,6 @@ interface SignallingAllocateResponse {
47
47
  status?: string;
48
48
  }
49
49
  //#endregion
50
- //#region src/types/common.d.ts
51
- type ApiCallback<T> = (result: T) => void;
52
- type EngineLogLevel = 'silent' | 'error' | 'warn' | 'info' | 'debug';
53
- type EngineViewMode = 'bs' | 'cs';
54
- /**
55
- * 引擎状态详情结构,与 sdk2 的 EngineStatusInfo 字段语义保持一致。
56
- */
57
- interface EngineStatusInfo {
58
- CameraHeight: string;
59
- FPS: string;
60
- Width: string;
61
- Height: string;
62
- runTime: string;
63
- bytePerSecond: string;
64
- lostPacketsRate: string;
65
- delayTime: string;
66
- Codec: string;
67
- }
68
- interface EngineConfig {
69
- /** 鉴权服务器地址 */
70
- centerIP?: string;
71
- /** 信令服务 HTTP 基地址,SDK 会基于该地址调用 `/api/v1/allocate` 获取最终 ws 播放地址 */
72
- signalingServer?: string;
73
- sceneName?: string;
74
- token?: string;
75
- dom?: HTMLDivElement;
76
- showProgressBar?: boolean;
77
- codec?: string;
78
- viewMode?: EngineViewMode;
79
- /** TURN 服务器地址 */
80
- turnServer?: string;
81
- /** TURN 用户名 */
82
- turnUser?: string;
83
- /** TURN 密码 */
84
- turnPwd?: string;
85
- /** 私有密钥 */
86
- privateKey?: string;
87
- engineUuid?: string;
88
- mapType?: string;
89
- operationType?: string;
90
- freeCheckInterval?: number;
91
- /** PixelStreaming initialSettings */
92
- initialSettings?: Record<string, unknown>;
93
- /** 日志级别,默认值为 info */
94
- logger?: EngineLogLevel;
95
- /** 从指定级别开始附加业务调用栈,默认值为 warn;silent 表示关闭 */
96
- includeStack?: EngineLogLevel;
97
- /** Pixel Streaming 依赖日志级别,默认值为 warn */
98
- pixelStreamingLogger?: EngineLogLevel;
99
- }
100
- interface ApiRequestEnvelope<T = unknown> {
101
- AssemblyName: string;
102
- fn: string;
103
- ClassName: string;
104
- FunctionName: string;
105
- Value?: any;
106
- ts: number;
107
- }
108
- interface ApiResponseEnvelope<T = unknown> {
109
- requestId: string;
110
- success: boolean;
111
- code: string;
112
- message: string;
113
- params?: any;
114
- errorMsg?: string;
115
- data?: T;
116
- ts: number;
117
- }
118
- interface ResolvedEngineConfig {
119
- centerIP: string;
120
- signalingServer?: string;
121
- sceneName: string;
122
- token: string;
123
- dom: HTMLDivElement;
124
- showProgressBar: boolean;
125
- codec: string;
126
- viewMode: EngineViewMode;
127
- turnServer?: string;
128
- turnUser?: string;
129
- turnPwd?: string;
130
- privateKey: string;
131
- engineUuid?: string;
132
- mapType: string;
133
- operationType: string;
134
- freeCheckInterval: number;
135
- initialSettings: Record<string, unknown>;
136
- logger: EngineLogLevel;
137
- includeStack: EngineLogLevel;
138
- pixelStreamingLogger: EngineLogLevel;
139
- centerHeartbeatIntervalMs: number;
140
- centerHeartbeatTimeoutMs: number;
141
- }
142
- //#endregion
143
- //#region src/types/enums.d.ts
144
- /**
145
- * Dlss.setDlssQuality 参数。
146
- */
147
- declare const DlssQuality: {
148
- /** 关闭 DLSS。默认值。 */
149
- readonly Off: 0;
150
- /** Auto 模式会根据系统性能自动选择最合适的 DLSS 质量档位,提供更智能的画质与性能平衡方案。 */
151
- readonly Auto: 1;
152
- /** 2倍效果 */
153
- readonly DLAA: 2;
154
- /** 超高质量。 */
155
- readonly UltraQuality: 3;
156
- /** 高质量。 */
157
- readonly Quality: 4;
158
- /** 平衡。 */
159
- readonly Balanced: 5;
160
- /** 性能。 */
161
- readonly Performance: 6;
162
- /** 超高性能。 */
163
- readonly UltraPerformance: 7;
164
- };
165
- type DlssQuality = typeof DlssQuality[keyof typeof DlssQuality];
166
- /**
167
- * Screen.setSceneRenderBitrate 参数。
168
- */
169
- declare const ScreenRenderBitratePreset: {
170
- /** 自动。 */
171
- readonly Auto: "auto";
172
- /** 标清。 */
173
- readonly Low: "low";
174
- /** 高清。 */
175
- readonly High: "high";
176
- /** 超清。 */
177
- readonly Super: "super";
178
- /** 蓝光。 */
179
- readonly Blue: "blue";
180
- };
181
- type ScreenRenderBitratePreset = typeof ScreenRenderBitratePreset[keyof typeof ScreenRenderBitratePreset];
182
- declare const ScreenRenderBitratePresetOptions: readonly [{
183
- readonly label: "自动";
184
- readonly type: "auto";
185
- readonly value: 12000000;
186
- }, {
187
- readonly label: "标清";
188
- readonly type: "low";
189
- readonly value: 4000000;
190
- }, {
191
- readonly label: "高清";
192
- readonly type: "high";
193
- readonly value: 8000000;
194
- }, {
195
- readonly label: "超清";
196
- readonly type: "super";
197
- readonly value: 12000000;
198
- }, {
199
- readonly label: "蓝光";
200
- readonly type: "blue";
201
- readonly value: 24000000;
202
- }];
203
- declare const ScreenRenderBitratePresetValueMap: {
204
- readonly auto: 12000000;
205
- readonly low: 4000000;
206
- readonly high: 8000000;
207
- readonly super: 12000000;
208
- readonly blue: 24000000;
209
- };
210
- /**
211
- * 视频解码器类别
212
- */
213
- declare enum VideoCodeType {
214
- /** VP8 */
215
- VP8 = "VP8",
216
- /** VP9 */
217
- VP9 = "VP9",
218
- /** AV1 */
219
- AV1 = "AV1",
220
- /** H264 */
221
- H264 = "H264"
222
- }
223
- /**
224
- * Layer.addLayer 图层类别。
225
- */
226
- declare enum LayerEnum {
227
- /** 模型图层。 */
228
- Model = "MODEL",
229
- /** POI 图层。 */
230
- POI = "POI"
231
- }
232
- /**
233
- * WeatherSystem.changeSeason 参数。
234
- */
235
- declare const Season: {
236
- /** 春季。 */
237
- readonly Spring: 0;
238
- /** 夏季。 */
239
- readonly Summer: 1;
240
- /** 秋季。 */
241
- readonly Autumn: 2;
242
- /** 冬季。 */
243
- readonly Winter: 3;
244
- };
245
- type Season = typeof Season[keyof typeof Season];
246
- /**
247
- * ModelTransform 移动方式。
248
- */
249
- declare enum ModelTransformType {
250
- Linear = 0,
251
- EaseInQuad = 1,
252
- EaseOutQuad = 2,
253
- EaseInOutQuad = 3,
254
- EaseOutInQuad = 4,
255
- EaseInCubic = 5,
256
- EaseOutCubic = 6,
257
- EaseInOutCubic = 7,
258
- EaseOutInCubic = 8,
259
- EaseInQuart = 9,
260
- EaseOutQuart = 10,
261
- EaseInOutQuart = 11,
262
- EaseOutInQuart = 12,
263
- EaseInQuint = 13,
264
- EaseOutQuint = 14,
265
- EaseInOutQuint = 15,
266
- EaseOutInQuint = 16,
267
- EaseInSine = 17,
268
- EaseOutSine = 18,
269
- EaseInOutSine = 19,
270
- EaseOutInSine = 20,
271
- EaseInExpo = 21,
272
- EaseOutExpo = 22,
273
- EaseInOutExpo = 23,
274
- EaseOutInExpo = 24,
275
- EaseInCirc = 25,
276
- EaseOutCirc = 26,
277
- EaseInOutCirc = 27,
278
- EaseOutInCirc = 28,
279
- EaseInElastic = 29,
280
- EaseOutElastic = 30,
281
- EaseInOutElastic = 31,
282
- EaseOutInElastic = 32,
283
- EaseInBack = 33,
284
- EaseOutBack = 34,
285
- EaseInOutBack = 35,
286
- EaseOutInBack = 36,
287
- EaseInBounce = 37,
288
- EaseOutBounce = 38,
289
- EaseInOutBounce = 39,
290
- EaseOutInBounce = 40
291
- }
292
- /**
293
- * Model.setVisibleByAttibute 过滤模式。
294
- */
295
- declare enum FilterMode {
296
- /** 宽松过滤:只处理属性匹配的对象,不符合条件不理会。 */
297
- Loose = 0,
298
- /** 严格过滤:属性匹配的对象按 visible 控制,其它包含相同属性名但属性值不同的对象按 otherVisible 控制。 */
299
- Strict = 1
300
- }
301
- //#endregion
302
- //#region src/types/network.d.ts
303
- /**
304
- * 弱网自适应档位。
305
- */
306
- type NetworkAdaptationLevel = 'Normal' | 'Mild' | 'Moderate' | 'Severe' | 'Recovering';
307
- /**
308
- * 弱网自适应运行模式:
309
- * - auto: 自动策略决策
310
- * - manual: 手动接管档位
311
- */
312
- type NetworkAdaptationMode = 'auto' | 'manual';
313
- /**
314
- * 媒体链路实时指标快照。
315
- */
316
- interface NetworkMetricsSnapshot {
317
- ts: number;
318
- connected: boolean;
319
- fps?: number;
320
- bitrateKbps?: number;
321
- packetLossRate?: number;
322
- jitterMs?: number;
323
- rttMs?: number;
324
- frameWidth?: number;
325
- frameHeight?: number;
326
- }
327
- /**
328
- * 弱网状态变更事件载荷。
329
- */
330
- interface NetworkAdaptationState {
331
- from: NetworkAdaptationLevel;
332
- to: NetworkAdaptationLevel;
333
- mode: NetworkAdaptationMode;
334
- reason: string;
335
- ts: number;
336
- metrics?: NetworkMetricsSnapshot;
337
- }
338
- /**
339
- * 策略动作类型。
340
- */
341
- type NetworkAdaptationActionType = 'SetSceneRenderBitrate' | 'SetSceneFPS' | 'SetScreenResolution';
342
- /**
343
- * 单步策略动作执行结果。
344
- */
345
- interface NetworkAdaptationActionStep {
346
- type: NetworkAdaptationActionType;
347
- payload: Record<string, number>;
348
- success: boolean;
349
- error?: string;
350
- }
351
- /**
352
- * 策略动作执行事件。
353
- */
354
- interface NetworkAdaptationActionResult {
355
- level: Exclude<NetworkAdaptationLevel, 'Recovering'>;
356
- mode: NetworkAdaptationMode;
357
- success: boolean;
358
- skipped: boolean;
359
- reason: string;
360
- ts: number;
361
- steps: NetworkAdaptationActionStep[];
362
- }
363
- /**
364
- * 策略决策轨迹条目,用于诊断面板回放。
365
- */
366
- interface NetworkDecisionTrace {
367
- ts: number;
368
- mode: NetworkAdaptationMode;
369
- currentLevel: NetworkAdaptationLevel;
370
- measuredLevel: Exclude<NetworkAdaptationLevel, 'Recovering'>;
371
- targetLevel?: NetworkAdaptationLevel;
372
- outcome: 'hold' | 'downgrade' | 'recover' | 'manual' | 'skip_hysteresis' | 'skip_cooldown';
373
- reason: string;
374
- metrics?: NetworkMetricsSnapshot;
375
- }
376
- /**
377
- * 诊断面板快照数据。
378
- */
379
- interface NetworkDiagnosticsSnapshot {
380
- ts: number;
381
- visible: boolean;
382
- mode: NetworkAdaptationMode;
383
- currentLevel: NetworkAdaptationLevel;
384
- connected: boolean;
385
- lastMetrics?: NetworkMetricsSnapshot;
386
- lastAction?: NetworkAdaptationActionResult;
387
- traces: NetworkDecisionTrace[];
388
- }
389
- //#endregion
390
- //#region src/types/qos.d.ts
391
- /**
392
- * QoS 事件阶段定义。
393
- */
394
- type QosStage = 'auth' | 'center' | 'webrtc' | 'media' | 'ue_api' | 'session';
395
- /**
396
- * QoS 事件状态定义。
397
- */
398
- type QosStatus = 'start' | 'success' | 'failed' | 'update' | 'end';
399
- /**
400
- * QoS 事件日志等级(仅用于事件严重程度标记)。
401
- */
402
- type QosLevel = 'info' | 'warn' | 'error';
403
- /**
404
- * QoS V1 事件名集合。
405
- */
406
- declare const QOS_EVENT_NAMES: readonly ["session_start", "auth_start", "auth_success", "auth_failed", "center_connect_start", "center_connected", "center_disconnected", "center_message_received", "webrtc_connect_start", "webrtc_connected", "webrtc_disconnected", "first_frame_rendered", "media_stats_sample", "ue_request_sent", "ue_response_received", "session_end"];
407
- /**
408
- * QoS V1 事件名类型。
409
- *
410
- * 注意:V1 明确不包含 `ue_request_timeout`。
411
- */
412
- type QosEventName = (typeof QOS_EVENT_NAMES)[number];
413
- /**
414
- * 会话维度上下文。
415
- */
416
- interface QosSessionContext {
417
- sessionId: string;
418
- traceId: string;
419
- runMode: string;
420
- viewMode: string;
421
- }
422
- /**
423
- * 运行环境上下文。
424
- */
425
- interface QosRuntimeContext {
426
- appId?: string;
427
- env?: string;
428
- pageUrl?: string;
429
- userAgent?: string;
430
- }
431
- /**
432
- * warn/error 聚合统计指标。
433
- */
434
- interface QosWarnErrorSummary {
435
- logWarnCount: number;
436
- logErrorCount: number;
437
- logErrorByStage: Partial<Record<QosStage, number>>;
438
- logErrorTopCodes: Array<{
439
- code: string;
440
- count: number;
441
- }>;
442
- }
443
- /**
444
- * QoS 事件结构。
445
- */
446
- interface QosEvent {
447
- eventName: QosEventName;
448
- stage: QosStage;
449
- status: QosStatus;
450
- ts: number;
451
- level: QosLevel;
452
- durationMs?: number;
453
- errorCode?: string;
454
- errorMessage?: string;
455
- attrs?: Record<string, unknown>;
456
- metrics?: Record<string, unknown>;
457
- }
458
- /**
459
- * QoS 批量上报载荷。
460
- */
461
- interface QosReportingPayload {
462
- schemaVersion: '1.0.0';
463
- source: 'enginesdk3';
464
- sdkVersion: string;
465
- sentAt: number;
466
- session: QosSessionContext;
467
- context: QosRuntimeContext;
468
- events: QosEvent[];
469
- }
470
- //#endregion
471
50
  //#region src/math/Vector2.d.ts
472
51
  /**
473
52
  * 二维向量坐标及计算方法
@@ -1250,6 +829,165 @@ declare class Vector3 {
1250
829
  changeEPSGType(EPSGType: string): this | undefined;
1251
830
  }
1252
831
  //#endregion
832
+ //#region src/types/enums.d.ts
833
+ /**
834
+ * Dlss.setDlssQuality 参数。
835
+ */
836
+ declare const DlssQuality: {
837
+ /** 关闭 DLSS。默认值。 */
838
+ readonly Off: 0;
839
+ /** Auto 模式会根据系统性能自动选择最合适的 DLSS 质量档位,提供更智能的画质与性能平衡方案。 */
840
+ readonly Auto: 1;
841
+ /** 2倍效果 */
842
+ readonly DLAA: 2;
843
+ /** 超高质量。 */
844
+ readonly UltraQuality: 3;
845
+ /** 高质量。 */
846
+ readonly Quality: 4;
847
+ /** 平衡。 */
848
+ readonly Balanced: 5;
849
+ /** 性能。 */
850
+ readonly Performance: 6;
851
+ /** 超高性能。 */
852
+ readonly UltraPerformance: 7;
853
+ };
854
+ type DlssQuality = typeof DlssQuality[keyof typeof DlssQuality];
855
+ /**
856
+ * Screen.setSceneRenderBitrate 参数。
857
+ */
858
+ declare const ScreenRenderBitratePreset: {
859
+ /** 自动。 */
860
+ readonly Auto: "auto";
861
+ /** 标清。 */
862
+ readonly Low: "low";
863
+ /** 高清。 */
864
+ readonly High: "high";
865
+ /** 超清。 */
866
+ readonly Super: "super";
867
+ /** 蓝光。 */
868
+ readonly Blue: "blue";
869
+ };
870
+ type ScreenRenderBitratePreset = typeof ScreenRenderBitratePreset[keyof typeof ScreenRenderBitratePreset];
871
+ declare const ScreenRenderBitratePresetOptions: readonly [{
872
+ readonly label: "自动";
873
+ readonly type: "auto";
874
+ readonly value: 12000000;
875
+ }, {
876
+ readonly label: "标清";
877
+ readonly type: "low";
878
+ readonly value: 4000000;
879
+ }, {
880
+ readonly label: "高清";
881
+ readonly type: "high";
882
+ readonly value: 8000000;
883
+ }, {
884
+ readonly label: "超清";
885
+ readonly type: "super";
886
+ readonly value: 12000000;
887
+ }, {
888
+ readonly label: "蓝光";
889
+ readonly type: "blue";
890
+ readonly value: 24000000;
891
+ }];
892
+ declare const ScreenRenderBitratePresetValueMap: {
893
+ readonly auto: 12000000;
894
+ readonly low: 4000000;
895
+ readonly high: 8000000;
896
+ readonly super: 12000000;
897
+ readonly blue: 24000000;
898
+ };
899
+ /**
900
+ * 视频解码器类别
901
+ */
902
+ declare enum VideoCodeType {
903
+ /** VP8 */
904
+ VP8 = "VP8",
905
+ /** VP9 */
906
+ VP9 = "VP9",
907
+ /** AV1 */
908
+ AV1 = "AV1",
909
+ /** H264 */
910
+ H264 = "H264"
911
+ }
912
+ /**
913
+ * Layer.addLayer 图层类别。
914
+ */
915
+ declare enum LayerEnum {
916
+ /** 模型图层。 */
917
+ Model = "MODEL",
918
+ /** POI 图层。 */
919
+ POI = "POI"
920
+ }
921
+ /**
922
+ * WeatherSystem.changeSeason 参数。
923
+ */
924
+ declare const Season: {
925
+ /** 春季。 */
926
+ readonly Spring: 0;
927
+ /** 夏季。 */
928
+ readonly Summer: 1;
929
+ /** 秋季。 */
930
+ readonly Autumn: 2;
931
+ /** 冬季。 */
932
+ readonly Winter: 3;
933
+ };
934
+ type Season = typeof Season[keyof typeof Season];
935
+ /**
936
+ * ModelTransform 移动方式。
937
+ */
938
+ declare enum ModelTransformType {
939
+ Linear = 0,
940
+ EaseInQuad = 1,
941
+ EaseOutQuad = 2,
942
+ EaseInOutQuad = 3,
943
+ EaseOutInQuad = 4,
944
+ EaseInCubic = 5,
945
+ EaseOutCubic = 6,
946
+ EaseInOutCubic = 7,
947
+ EaseOutInCubic = 8,
948
+ EaseInQuart = 9,
949
+ EaseOutQuart = 10,
950
+ EaseInOutQuart = 11,
951
+ EaseOutInQuart = 12,
952
+ EaseInQuint = 13,
953
+ EaseOutQuint = 14,
954
+ EaseInOutQuint = 15,
955
+ EaseOutInQuint = 16,
956
+ EaseInSine = 17,
957
+ EaseOutSine = 18,
958
+ EaseInOutSine = 19,
959
+ EaseOutInSine = 20,
960
+ EaseInExpo = 21,
961
+ EaseOutExpo = 22,
962
+ EaseInOutExpo = 23,
963
+ EaseOutInExpo = 24,
964
+ EaseInCirc = 25,
965
+ EaseOutCirc = 26,
966
+ EaseInOutCirc = 27,
967
+ EaseOutInCirc = 28,
968
+ EaseInElastic = 29,
969
+ EaseOutElastic = 30,
970
+ EaseInOutElastic = 31,
971
+ EaseOutInElastic = 32,
972
+ EaseInBack = 33,
973
+ EaseOutBack = 34,
974
+ EaseInOutBack = 35,
975
+ EaseOutInBack = 36,
976
+ EaseInBounce = 37,
977
+ EaseOutBounce = 38,
978
+ EaseInOutBounce = 39,
979
+ EaseOutInBounce = 40
980
+ }
981
+ /**
982
+ * Model.setVisibleByAttibute 过滤模式。
983
+ */
984
+ declare enum FilterMode {
985
+ /** 宽松过滤:只处理属性匹配的对象,不符合条件不理会。 */
986
+ Loose = 0,
987
+ /** 严格过滤:属性匹配的对象按 visible 控制,其它包含相同属性名但属性值不同的对象按 otherVisible 控制。 */
988
+ Strict = 1
989
+ }
990
+ //#endregion
1253
991
  //#region src/types/request.d.ts
1254
992
  interface Vector3JsonInput {
1255
993
  x: number;
@@ -1292,6 +1030,8 @@ interface CameraFlyToTargetRequest {
1292
1030
  point?: Vector3Input;
1293
1031
  /** 飞行过程中看向目标点。 */
1294
1032
  target?: Vector3Input;
1033
+ /** Horizontal field of view in degrees (10–150), default 60. */
1034
+ fov?: number;
1295
1035
  /** 飞行时长(秒)。 */
1296
1036
  time?: number;
1297
1037
  }
@@ -2043,376 +1783,771 @@ interface ScreenSetVideoDecodeRequest {
2043
1783
  decode: VideoCodeType;
2044
1784
  }
2045
1785
  /**
2046
- * Dlss.setDlssEnable 参数。
1786
+ * Dlss.setDlssEnable 参数。
1787
+ */
1788
+ interface DlssSetEnableRequest {
1789
+ /**
1790
+ * 是否开启 DLSS。
1791
+ * 默认值 `true`。
1792
+ */
1793
+ enable?: boolean;
1794
+ /**
1795
+ * DLSS 质量档位。
1796
+ * 默认值 `DlssQuality.Balanced`。
1797
+ */
1798
+ quality?: DlssQuality;
1799
+ }
1800
+ /**
1801
+ * Dlss.setDlssQuality 参数。
1802
+ */
1803
+ interface DlssSetQualityRequest {
1804
+ /**
1805
+ * DLSS 质量档位。
1806
+ * 默认值 `DlssQuality.Balanced`。
1807
+ */
1808
+ quality?: DlssQuality;
1809
+ }
1810
+ /**
1811
+ * ModelTransform.startMoveByNodes 参数。
1812
+ */
1813
+ interface ModelTransformStartMoveRequest {
1814
+ /** 父节点 ID,可以为空。 */
1815
+ parentId?: string;
1816
+ /** 移动对象编号。 */
1817
+ id: string;
1818
+ /** 移动轨迹点集合。 */
1819
+ nodes: Vector3Input[];
1820
+ /** 移动速度。默认 `1`。 */
1821
+ speed?: number;
1822
+ /** 移动方式,参见 `ModelTransformType` 枚举,默认 -1(引擎默认)。 */
1823
+ linear?: number;
1824
+ /** 是否看向移动的目标点。默认 `true`。 */
1825
+ isLookAtTarget?: boolean;
1826
+ /** 是否需要朝移动方向转向。默认 `true`。 */
1827
+ needDirection?: boolean;
1828
+ }
1829
+ /**
1830
+ * ModelTransform.pauseMove / resumeMove / endMove / endRotate / endScale 参数。
1831
+ */
1832
+ interface ModelTransformNodeRequest {
1833
+ /** 父节点 ID,可以为空。 */
1834
+ parentId?: string;
1835
+ /** 对象编号。 */
1836
+ id: string;
1837
+ }
1838
+ /**
1839
+ * ModelTransform.restoreMove / restoreRotate / restoreScale 参数。
1840
+ */
1841
+ interface ModelTransformRestoreRequest {
1842
+ /** 父节点 ID,可以为空。 */
1843
+ parentId?: string;
1844
+ /** 需要恢复的对象 ID 列表。 */
1845
+ ids: string[];
1846
+ }
1847
+ /**
1848
+ * ModelTransform.rotate / continuedRotate 参数。
1849
+ */
1850
+ interface ModelTransformRotateRequest {
1851
+ /** 父节点 ID,可以为空。 */
1852
+ parentId?: string;
1853
+ /** 对象编号。 */
1854
+ id: string;
1855
+ /** 对象绕 x/y/z 轴旋转的值,不旋转填写为 0。 */
1856
+ rotate: Vector3;
1857
+ }
1858
+ /**
1859
+ * ModelTransform.rotateByTarget 参数。
1860
+ */
1861
+ interface ModelTransformRotateByTargetRequest {
1862
+ /** 父节点 ID,可以为空。 */
1863
+ parentId?: string;
1864
+ /** 对象编号。 */
1865
+ id: string;
1866
+ /** 场景中参照位置的父级对象编号。 */
1867
+ parentTargetId?: string;
1868
+ /** 围绕的目标对象名称。 */
1869
+ targetID: string;
1870
+ /** 中心点;targetID 为空时为绕中心点,否则为相对 targetID 的偏移值。 */
1871
+ point: Vector3;
1872
+ /** 为正数则绕 x 轴旋转。默认 `0`。 */
1873
+ axisX?: number;
1874
+ /** 为正数则绕 y 轴旋转。默认 `0`。 */
1875
+ axisY?: number;
1876
+ /** 为正数则绕 z 轴旋转。默认 `0`。 */
1877
+ axisZ?: number;
1878
+ /** 旋转度数。默认 `0`。 */
1879
+ angle?: number;
1880
+ /** 是否持续旋转。默认 `false`。 */
1881
+ isPersistence?: boolean;
1882
+ }
1883
+ /**
1884
+ * ModelTransform.setScale 参数。
1885
+ */
1886
+ interface ModelTransformScaleRequest {
1887
+ /** 父节点 ID,可以为空。 */
1888
+ parentId?: string;
1889
+ /** 对象编号。 */
1890
+ id: string;
1891
+ /** 目标缩放值。 */
1892
+ scale: Vector3;
1893
+ /** 缩放时长(秒)。默认 `0.5`。 */
1894
+ duration?: number;
1895
+ }
1896
+ /**
1897
+ * HighLighterEffect.setHighLightModel 参数。
1898
+ */
1899
+ interface HighLighterSetHighLightModelRequest {
1900
+ /** 对象组的父对象,可以为空。 */
1901
+ parentId?: string;
1902
+ /** 需要添加高光的对象编号数组。 */
1903
+ ids: string[];
1904
+ /** 是否高亮模型背面。 */
1905
+ showBack: boolean;
1906
+ }
1907
+ interface HighLighterEnableRequest {
1908
+ /** 是否启用高亮效果。 */
1909
+ enable: boolean;
1910
+ }
1911
+ /**
1912
+ * HighLighterEffect.removeHighLightModel 参数。
1913
+ */
1914
+ interface HighLighterRemoveHighLightModelRequest {
1915
+ /** 对象组的父对象,可以为空。 */
1916
+ parentId?: string;
1917
+ /** 需要移除高光的对象名称数组。 */
1918
+ ids: string[];
1919
+ }
1920
+ /**
1921
+ * PathPatrol 时间序列节点。
1922
+ */
1923
+ interface TimeSerialNode {
1924
+ /** 路径点坐标。 */
1925
+ node: Vector3Input;
1926
+ /** 时间节点,格式为 "2025-09-10 00:05:00"。 */
1927
+ time: string;
1928
+ }
1929
+ /**
1930
+ * PathPatrol.add 参数。
1931
+ */
1932
+ interface PathPatrolAddRequest {
1933
+ /** 模型对象父对象编号。 */
1934
+ parentId?: string;
1935
+ /** 场景的模型对象编号。 */
1936
+ id: string;
1937
+ /** 场景的模型路径,可为空;为空时根据 id 到场景中寻找模型对象。 */
1938
+ assetPath?: string;
1939
+ /** 模型缩放的大小。 */
1940
+ scale: Vector3Input;
1941
+ /** 是否显示巡逻轨迹,默认 `true`。 */
1942
+ showPath?: boolean;
1943
+ /** 巡逻过的路径的显示颜色,默认 `#ffffff`。 */
1944
+ passedColor?: string;
1945
+ /** 未巡逻路径的颜色,默认 `#00ff00`。 */
1946
+ lineColor?: string;
1947
+ /** 线路的宽度。 */
1948
+ lineWidth: number;
1949
+ /** 全程所需时间。 */
1950
+ duration?: number;
1951
+ /** 路径点的集合,至少需要 2 个节点。 */
1952
+ nodes?: Vector3Input[];
1953
+ /** 路径点时间序列的集合。 */
1954
+ timeNodes?: TimeSerialNode[];
1955
+ /** 线的图层,如 TransparentFX。 */
1956
+ lineLayer?: string;
1957
+ /** 是否后渲染,默认 `false`;`true` 后渲染(渲染不会阻挡),`false` 前渲染。 */
1958
+ afterRender?: boolean;
1959
+ /** 是否自动清除,默认 `true`。 */
1960
+ isAutoClear?: boolean;
1961
+ }
1962
+ /**
1963
+ * PathPatrol.update 参数。
1964
+ */
1965
+ interface PathPatrolUpdateRequest {
1966
+ /** 模型对象父对象编号。 */
1967
+ parentId?: string;
1968
+ /** 巡逻轨迹编号。 */
1969
+ id: string;
1970
+ /** 巡逻轨迹的颜色。 */
1971
+ lineColor?: string;
1972
+ /** 巡逻路线的宽度。 */
1973
+ lineWidth?: number;
1974
+ /** 巡逻过的路径的显示颜色。 */
1975
+ passedColor?: string;
1976
+ /** 调整速度,不能小于 0。 */
1977
+ speed?: number;
1978
+ }
1979
+ /**
1980
+ * PathPatrol.setTimeNode 参数。
1981
+ */
1982
+ interface PathPatrolSetTimeNodeRequest {
1983
+ /** 模型对象父对象编号。 */
1984
+ parentId?: string;
1985
+ /** 巡逻对象编号。 */
1986
+ id: string;
1987
+ /** 时间节点,格式为 "2025-09-10 00:05:00"。`timeStart` 与 `startNodeIndex` 只能有一个不为空。 */
1988
+ timeStart?: string;
1989
+ /** 开始节点索引,不能小于 0。`timeStart` 与 `startNodeIndex` 只能有一个不为空。 */
1990
+ startNodeIndex?: string;
1991
+ }
1992
+ /**
1993
+ * PathPatrol.pause / resume / stop 参数。
1994
+ */
1995
+ interface PathPatrolNodeRequest {
1996
+ /** 模型对象父对象编号。 */
1997
+ parentId?: string;
1998
+ /** 巡逻对象编号。 */
1999
+ id: string;
2000
+ }
2001
+ /**
2002
+ * 单个热力点数据(地理坐标 + 热度值)。
2003
+ */
2004
+ interface HeatMapPointRequest {
2005
+ /** 点位置(地理坐标,默认 EPSG4326)。 */
2006
+ position: Vector3Input;
2007
+ /** 该点的热度值(0~1),默认 1。 */
2008
+ value?: number;
2009
+ }
2010
+ /**
2011
+ * HeatMap.create 参数。
2012
+ */
2013
+ interface HeatMapCreateRequest {
2014
+ /** 热力图所属父节点 ID,可选。 */
2015
+ parentId?: string;
2016
+ /** 热力图 ID;重复创建相同 ID 会更新该热力图数据,可空。 */
2017
+ id?: string;
2018
+ /** 热力图纹理尺寸(像素),默认 256x256;地理数据模式下由坐标范围自动计算。 */
2019
+ textureSize?: Vector2Input;
2020
+ /** 热力图在地图中的尺寸(厘米),默认 1000x1000;地理数据模式下由坐标范围自动计算。 */
2021
+ mapSize?: Vector2Input;
2022
+ /** 单个热力点的影响范围(像素),默认 50。 */
2023
+ influenceSize?: number;
2024
+ /** 热力点数据列表,支持 `{ position, value }` 对象数组或 `Vector3Input` 位置数组(热度值默认 1)。 */
2025
+ points: HeatMapPointRequest[] | Vector3Input[];
2026
+ /** 材质透明度,默认 0.7。 */
2027
+ opacity?: number;
2028
+ /** 高度缩放,默认 2500。 */
2029
+ heightScale?: number;
2030
+ /** 颜色过渡比例,默认 2.5。 */
2031
+ lerpScale?: number;
2032
+ /** 是否添加到场景中,默认 false */
2033
+ isAddAsset?: boolean;
2034
+ }
2035
+ /**
2036
+ * HeatMap.remove 参数。
2047
2037
  */
2048
- interface DlssSetEnableRequest {
2049
- /**
2050
- * 是否开启 DLSS。
2051
- * 默认值 `true`。
2052
- */
2053
- enable?: boolean;
2054
- /**
2055
- * DLSS 质量档位。
2056
- * 默认值 `DlssQuality.Balanced`。
2057
- */
2058
- quality?: DlssQuality;
2038
+ interface HeatMapRemoveRequest {
2039
+ /** 热力图所属父节点 ID,可选。 */
2040
+ parentId?: string;
2041
+ /** 热力图 ID;为空时移除全部热力图。 */
2042
+ id?: string;
2059
2043
  }
2060
2044
  /**
2061
- * Dlss.setDlssQuality 参数。
2045
+ * HeatMap.setConfig 参数。
2062
2046
  */
2063
- interface DlssSetQualityRequest {
2064
- /**
2065
- * DLSS 质量档位。
2066
- * 默认值 `DlssQuality.Balanced`。
2067
- */
2068
- quality?: DlssQuality;
2047
+ interface HeatMapConfigRequest {
2048
+ /** 热力图所属父节点 ID,可选。 */
2049
+ parentId?: string;
2050
+ /** 热力图 ID;为空时作用于最近创建的热力图。 */
2051
+ id?: string;
2052
+ /** 材质透明度,默认 0.7。 */
2053
+ opacity?: number;
2054
+ /** 高度缩放,默认 2500。 */
2055
+ heightScale?: number;
2056
+ /** 颜色过渡比例,默认 2.5。 */
2057
+ lerpScale?: number;
2058
+ /**影响范围 */
2059
+ influenceSize?: number;
2069
2060
  }
2070
2061
  /**
2071
- * ModelTransform.startMoveByNodes 参数。
2062
+ * Navigation.startMeshNav / getMeshNavDistance 参数。
2072
2063
  */
2073
- interface ModelTransformStartMoveRequest {
2074
- /** 父节点 ID,可以为空。 */
2064
+ interface NavigationMeshNavRequest {
2065
+ /** 对象组的父对象,可以为空。 */
2075
2066
  parentId?: string;
2076
- /** 移动对象编号。 */
2067
+ /** 对象名称数组集合。 */
2077
2068
  id: string;
2078
- /** 移动轨迹点集合。 */
2079
- nodes: Vector3Input[];
2080
- /** 移动速度。默认 `1`。 */
2069
+ /** 路径节点数组集合,与 `targetIds` 二选一。 */
2070
+ nodes?: Vector3Input[];
2071
+ /** 路径节点经过的目标对象名称数组集合,与 `nodes` 二选一;需保证场景中各编号对象唯一存在。 */
2072
+ targetIds?: string[];
2073
+ /** 物体移动的速度,默认 1。 */
2081
2074
  speed?: number;
2082
- /** 移动方式,参见 `ModelTransformType` 枚举,默认 -1(引擎默认)。 */
2083
- linear?: number;
2084
- /** 是否看向移动的目标点。默认 `true`。 */
2085
- isLookAtTarget?: boolean;
2086
- /** 是否需要朝移动方向转向。默认 `true`。 */
2087
- needDirection?: boolean;
2075
+ /** 是否作为导航缓存路径点,默认 `true`;`true` 表示将节点加入缓存路径,下次修改时前置节点仍会经过,`false` 表示按新路径导航。 */
2076
+ isCache?: boolean;
2077
+ /** 导航规划路径颜色。 */
2078
+ planColor?: string;
2079
+ /** 导航已走过的路径颜色。 */
2080
+ passColor?: string;
2081
+ /** 导航规划线的宽度,默认 1。 */
2082
+ lineWidth?: number;
2083
+ /** 是否自动播放,默认 `true`。 */
2084
+ isAutoPlay?: boolean;
2085
+ /** 场景的模型路径,可为空;为空时根据 id 到场景中寻找模型对象。 */
2086
+ assetPath?: string;
2087
+ /** 模型缩放比例,默认 1。 */
2088
+ scale?: Vector3Input;
2089
+ /** 是否自动清除,默认 `true`。 */
2090
+ isAutoClear?: boolean;
2091
+ offSetZ?: number;
2088
2092
  }
2089
2093
  /**
2090
- * ModelTransform.pauseMove / resumeMove / endMove / endRotate / endScale 参数。
2094
+ * Navigation.pauseMeshNav / resumeMeshNav / stopMeshNav / pauseNavPath / resumeNavPath / stopNavPath 参数。
2091
2095
  */
2092
- interface ModelTransformNodeRequest {
2093
- /** 父节点 ID,可以为空。 */
2096
+ interface NavigationNodeRequest {
2097
+ /** 对象组的父对象,可以为空。 */
2094
2098
  parentId?: string;
2095
- /** 对象编号。 */
2099
+ /** 对象名称数组集合。 */
2096
2100
  id: string;
2097
2101
  }
2098
2102
  /**
2099
- * ModelTransform.restoreMove / restoreRotate / restoreScale 参数。
2103
+ * Navigation.updateMeshNav 参数。
2100
2104
  */
2101
- interface ModelTransformRestoreRequest {
2102
- /** 父节点 ID,可以为空。 */
2105
+ interface NavigationUpdateMeshNavRequest {
2106
+ /** 对象组的父对象,可以为空。 */
2103
2107
  parentId?: string;
2104
- /** 需要恢复的对象 ID 列表。 */
2105
- ids: string[];
2108
+ /** 对象名称数组集合。 */
2109
+ id: string;
2110
+ /** 物体移动的速度,默认 -1(不改变速度)。 */
2111
+ speed?: number;
2112
+ /** 导航规划路径颜色。 */
2113
+ planColor?: string;
2114
+ /** 导航已走过的路径颜色。 */
2115
+ passColor?: string;
2106
2116
  }
2107
- /**
2108
- * ModelTransform.rotate / continuedRotate 参数。
2109
- */
2110
- interface ModelTransformRotateRequest {
2111
- /** 父节点 ID,可以为空。 */
2117
+ interface NavigationUpdateSpeedRequest {
2118
+ /** 对象组的父对象,可以为空。 */
2112
2119
  parentId?: string;
2113
- /** 对象编号。 */
2120
+ /** 对象名称数组集合。 */
2114
2121
  id: string;
2115
- /** 对象绕 x/y/z 轴旋转的值,不旋转填写为 0。 */
2116
- rotate: Vector3;
2122
+ /** 物体移动的速度,默认 -1(不改变速度)。 */
2123
+ speed?: number;
2117
2124
  }
2118
2125
  /**
2119
- * ModelTransform.rotateByTarget 参数。
2126
+ * Navigation.startNavByPath 参数。
2120
2127
  */
2121
- interface ModelTransformRotateByTargetRequest {
2122
- /** 父节点 ID,可以为空。 */
2128
+ interface NavigationNavByPathRequest {
2129
+ /** 对象组的父对象,可以为空。 */
2123
2130
  parentId?: string;
2124
- /** 对象编号。 */
2125
- id: string;
2126
- /** 场景中参照位置的父级对象编号。 */
2127
- parentTargetId?: string;
2128
- /** 围绕的目标对象名称。 */
2129
- targetID: string;
2130
- /** 中心点;targetID 为空时为绕中心点,否则为相对 targetID 的偏移值。 */
2131
- point: Vector3;
2132
- /** 为正数则绕 x 轴旋转。默认 `0`。 */
2133
- axisX?: number;
2134
- /** 为正数则绕 y 轴旋转。默认 `0`。 */
2135
- axisY?: number;
2136
- /** 为正数则绕 z 轴旋转。默认 `0`。 */
2137
- axisZ?: number;
2138
- /** 旋转度数。默认 `0`。 */
2139
- angle?: number;
2140
- /** 是否持续旋转。默认 `false`。 */
2141
- isPersistence?: boolean;
2131
+ /** 对象名称数组集合。 */
2132
+ id: string[];
2133
+ /** 路径节点数组集合。 */
2134
+ nodes: Vector3Input[];
2135
+ /** 是否作为导航缓存路径点,默认 `true`。 */
2136
+ isCache?: boolean;
2137
+ /** 导航轨迹总时间(秒),默认 10。 */
2138
+ duration?: number;
2139
+ /** 导航规划路径颜色。 */
2140
+ planColor?: string;
2141
+ /** 导航已走过的路径颜色。 */
2142
+ passColor?: string;
2142
2143
  }
2143
2144
  /**
2144
- * ModelTransform.setScale 参数。
2145
+ * Navigation.updateNavPath 参数。
2145
2146
  */
2146
- interface ModelTransformScaleRequest {
2147
- /** 父节点 ID,可以为空。 */
2147
+ interface NavigationUpdateNavPathRequest {
2148
+ /** 对象组的父对象,可以为空。 */
2148
2149
  parentId?: string;
2149
- /** 对象编号。 */
2150
- id: string;
2151
- /** 目标缩放值。 */
2152
- scale: Vector3;
2153
- /** 缩放时长(秒)。默认 `0.5`。 */
2150
+ /** 对象名称数组集合。 */
2151
+ id: string[];
2152
+ /** 导航轨迹总时间(秒),默认 -1(不改变时长)。 */
2154
2153
  duration?: number;
2154
+ /** 导航规划路径颜色。 */
2155
+ planColor?: string;
2156
+ /** 导航已走过的路径颜色。 */
2157
+ passColor?: string;
2155
2158
  }
2156
2159
  /**
2157
- * HighLighterEffect.setHighLightModel 参数。
2160
+ * SpatialQuery.layerQueryByModel 参数。
2158
2161
  */
2159
- interface HighLighterSetHighLightModelRequest {
2160
- /** 对象组的父对象,可以为空。 */
2162
+ interface SpatialQueryLayerByModelRequest {
2163
+ /** 场景查询位置的对象上级编号,可以为空。 */
2161
2164
  parentId?: string;
2162
- /** 需要添加高光的对象编号数组。 */
2163
- ids: string[];
2164
- /** 是否高亮模型背面。 */
2165
- showBack: boolean;
2165
+ /** 查询参照的位置对象唯一编号。 */
2166
+ id?: string;
2167
+ /** 查询的半径,单位米,默认 50。 */
2168
+ queryRadius?: number;
2169
+ /** 查询的最小高度,默认 0;值不能大于最大高度。 */
2170
+ queryMinHeight?: number;
2171
+ /** 查询的最大高度,默认 20;值不能小于最小高度。 */
2172
+ queryMaxHeight?: number;
2173
+ /** 查询的图层组编号集合,至少一个。 */
2174
+ queryParentIds: string[];
2175
+ }
2176
+ /**
2177
+ * SpatialQuery.layerQueryByPosition 参数。
2178
+ */
2179
+ interface SpatialQueryLayerByPositionRequest {
2180
+ /** 查询的中心位置。 */
2181
+ queryPosition?: Vector3Input;
2182
+ /** 查询的半径,单位米,默认 50。 */
2183
+ queryRadius?: number;
2184
+ /** 查询的最小高度,默认 0;值不能大于最大高度。 */
2185
+ queryMinHeight?: number;
2186
+ /** 查询的最大高度,默认 20;值不能小于最小高度。 */
2187
+ queryMaxHeight?: number;
2188
+ /** 查询的图层组编号集合,至少一个。 */
2189
+ queryParentIds: string[];
2190
+ }
2191
+ /**
2192
+ * SpatialQuery.layerQueryByModelBox 参数。
2193
+ */
2194
+ interface SpatialQueryLayerByModelBoxRequest {
2195
+ /** 场景查询位置的对象上级编号,可以为空。 */
2196
+ parentId?: string;
2197
+ /** 查询参照的位置对象唯一编号。 */
2198
+ id?: string;
2199
+ /** 查询的图层组编号集合,至少一个。 */
2200
+ queryParentIds: string[];
2201
+ }
2202
+ //#endregion
2203
+ //#region src/types/buildingFloor.d.ts
2204
+ /** 建筑楼层固定视角。 */
2205
+ interface BuildingFloorViewPoint {
2206
+ /** 相机位置。 */
2207
+ position: Vector3Input;
2208
+ /** 相机看向的目标点。 */
2209
+ target: Vector3Input;
2210
+ /** 水平视场角。 */
2211
+ fov?: number;
2212
+ /** 相机飞行时长(秒)。 */
2213
+ time?: number;
2214
+ }
2215
+ /** 对象形式的楼层注册项。 */
2216
+ interface BuildingFloorItem {
2217
+ /** UE 楼层节点 ID。 */
2218
+ id: string;
2219
+ /** 该楼层的可选固定视角。 */
2220
+ viewPoint?: BuildingFloorViewPoint;
2221
+ /** 切换到该楼层后显示的附属对象。 */
2222
+ objects?: string[];
2223
+ }
2224
+ /** 楼层既可使用节点 ID,也可使用带固定视角的对象。 */
2225
+ type BuildingFloorInput = string | BuildingFloorItem;
2226
+ /** 建筑整栋视图配置。 */
2227
+ interface BuildingFloorOverview {
2228
+ /** 仅在整栋视图中显示的附属对象。 */
2229
+ objects?: string[];
2230
+ /** 整栋视图的可选固定视角。 */
2231
+ viewPoint?: BuildingFloorViewPoint;
2232
+ }
2233
+ /** 单栋建筑的楼层注册配置。 */
2234
+ interface BuildingFloorRegistration {
2235
+ /** SDK 内唯一的建筑标识。 */
2236
+ buildingId: string;
2237
+ /** 楼层模型共同所属的 UE 父节点。 */
2238
+ parentId: string;
2239
+ /** 从低到高排列的楼层配置。 */
2240
+ floors: BuildingFloorInput[];
2241
+ /** 整栋视图配置。 */
2242
+ overview?: BuildingFloorOverview;
2243
+ }
2244
+ /** 建筑注册结果。 */
2245
+ interface BuildingFloorRegistrationResult {
2246
+ buildingIds: string[];
2247
+ }
2248
+ /** 楼层切换参数。 */
2249
+ interface BuildingFloorSwitchOptions {
2250
+ buildingId: string;
2251
+ floorId: string;
2252
+ /** 是否在楼层动画结束后调整相机,默认 false。 */
2253
+ focus?: boolean;
2254
+ }
2255
+ /** 恢复整栋视图参数。 */
2256
+ interface BuildingFloorOverviewOptions {
2257
+ buildingId: string;
2258
+ /** 是否在楼层动画结束后调整相机,默认 false。 */
2259
+ focus?: boolean;
2260
+ }
2261
+ /** 取消楼层切换参数。 */
2262
+ interface BuildingFloorCancelOptions {
2263
+ buildingId: string;
2264
+ }
2265
+ /** 查询楼层状态参数。 */
2266
+ interface BuildingFloorStateOptions {
2267
+ buildingId: string;
2268
+ }
2269
+ type BuildingFloorRuntimeStatus = 'overview' | 'switching' | 'floor' | 'cancelled';
2270
+ type BuildingFloorTransitionStatus = 'completed' | 'cancelled';
2271
+ type BuildingFloorFocusMode = 'none' | 'viewPoint' | 'bounds';
2272
+ /** 楼层切换结果。 */
2273
+ interface BuildingFloorTransitionResult {
2274
+ buildingId: string;
2275
+ floorId?: string;
2276
+ status: BuildingFloorTransitionStatus;
2277
+ visibleFloorIds: string[];
2278
+ focusMode: BuildingFloorFocusMode;
2279
+ /** 当前版本按 SDK 预计时间完成收口,尚未获得 UE 动画完成事件确认。 */
2280
+ completion: 'estimated';
2281
+ }
2282
+ /** 指定建筑的楼层运行状态快照。 */
2283
+ interface BuildingFloorState {
2284
+ buildingId: string;
2285
+ status: BuildingFloorRuntimeStatus;
2286
+ currentFloorId?: string;
2287
+ visibleFloorIds: string[];
2288
+ transitionId: number;
2289
+ }
2290
+ //#endregion
2291
+ //#region src/types/common.d.ts
2292
+ type ApiCallback<T> = (result: T) => void;
2293
+ type EngineLogLevel = 'silent' | 'error' | 'warn' | 'info' | 'debug';
2294
+ type EngineViewMode = 'bs' | 'cs';
2295
+ /**
2296
+ * 引擎状态详情结构,与 sdk2 的 EngineStatusInfo 字段语义保持一致。
2297
+ */
2298
+ interface EngineStatusInfo {
2299
+ CameraHeight: string;
2300
+ FPS: string;
2301
+ Width: string;
2302
+ Height: string;
2303
+ runTime: string;
2304
+ bytePerSecond: string;
2305
+ lostPacketsRate: string;
2306
+ delayTime: string;
2307
+ Codec: string;
2308
+ }
2309
+ interface EngineConfig {
2310
+ /** 鉴权服务器地址 */
2311
+ centerIP?: string;
2312
+ /** 信令服务 HTTP 基地址,SDK 会基于该地址调用 `/api/v1/allocate` 获取最终 ws 播放地址 */
2313
+ signalingServer?: string;
2314
+ sceneName?: string;
2315
+ token?: string;
2316
+ dom?: HTMLDivElement;
2317
+ showProgressBar?: boolean;
2318
+ codec?: string;
2319
+ viewMode?: EngineViewMode;
2320
+ /** TURN 服务器地址 */
2321
+ turnServer?: string;
2322
+ /** TURN 用户名 */
2323
+ turnUser?: string;
2324
+ /** TURN 密码 */
2325
+ turnPwd?: string;
2326
+ /** 私有密钥 */
2327
+ privateKey?: string;
2328
+ engineUuid?: string;
2329
+ mapType?: string;
2330
+ operationType?: string;
2331
+ freeCheckInterval?: number;
2332
+ /** PixelStreaming initialSettings */
2333
+ initialSettings?: Record<string, unknown>;
2334
+ /** 日志级别,默认值为 info */
2335
+ logger?: EngineLogLevel;
2336
+ /** 从指定级别开始附加业务调用栈,默认值为 warn;silent 表示关闭 */
2337
+ includeStack?: EngineLogLevel;
2338
+ /** Pixel Streaming 依赖日志级别,默认值为 warn */
2339
+ pixelStreamingLogger?: EngineLogLevel;
2340
+ }
2341
+ interface ApiRequestEnvelope<T = unknown> {
2342
+ AssemblyName: string;
2343
+ fn: string;
2344
+ ClassName: string;
2345
+ FunctionName: string;
2346
+ Value?: any;
2347
+ ts: number;
2166
2348
  }
2167
- interface HighLighterEnableRequest {
2168
- /** 是否启用高亮效果。 */
2169
- enable: boolean;
2349
+ interface ApiResponseEnvelope<T = unknown> {
2350
+ requestId: string;
2351
+ success: boolean;
2352
+ code: string;
2353
+ message: string;
2354
+ params?: any;
2355
+ errorMsg?: string;
2356
+ data?: T;
2357
+ ts: number;
2170
2358
  }
2171
- /**
2172
- * HighLighterEffect.removeHighLightModel 参数。
2173
- */
2174
- interface HighLighterRemoveHighLightModelRequest {
2175
- /** 对象组的父对象,可以为空。 */
2176
- parentId?: string;
2177
- /** 需要移除高光的对象名称数组。 */
2178
- ids: string[];
2359
+ interface ResolvedEngineConfig {
2360
+ centerIP: string;
2361
+ signalingServer?: string;
2362
+ sceneName: string;
2363
+ token: string;
2364
+ dom: HTMLDivElement;
2365
+ showProgressBar: boolean;
2366
+ codec: string;
2367
+ viewMode: EngineViewMode;
2368
+ turnServer?: string;
2369
+ turnUser?: string;
2370
+ turnPwd?: string;
2371
+ privateKey: string;
2372
+ engineUuid?: string;
2373
+ mapType: string;
2374
+ operationType: string;
2375
+ freeCheckInterval: number;
2376
+ initialSettings: Record<string, unknown>;
2377
+ logger: EngineLogLevel;
2378
+ includeStack: EngineLogLevel;
2379
+ pixelStreamingLogger: EngineLogLevel;
2380
+ centerHeartbeatIntervalMs: number;
2381
+ centerHeartbeatTimeoutMs: number;
2179
2382
  }
2383
+ //#endregion
2384
+ //#region src/types/network.d.ts
2180
2385
  /**
2181
- * PathPatrol 时间序列节点。
2386
+ * 弱网自适应档位。
2182
2387
  */
2183
- interface TimeSerialNode {
2184
- /** 路径点坐标。 */
2185
- node: Vector3Input;
2186
- /** 时间节点,格式为 "2025-09-10 00:05:00"。 */
2187
- time: string;
2188
- }
2388
+ type NetworkAdaptationLevel = 'Normal' | 'Mild' | 'Moderate' | 'Severe' | 'Recovering';
2189
2389
  /**
2190
- * PathPatrol.add 参数。
2390
+ * 弱网自适应运行模式:
2391
+ * - auto: 自动策略决策
2392
+ * - manual: 手动接管档位
2191
2393
  */
2192
- interface PathPatrolAddRequest {
2193
- /** 模型对象父对象编号。 */
2194
- parentId?: string;
2195
- /** 场景的模型对象编号。 */
2196
- id: string;
2197
- /** 场景的模型路径,可为空;为空时根据 id 到场景中寻找模型对象。 */
2198
- assetPath?: string;
2199
- /** 模型缩放的大小。 */
2200
- scale: Vector3Input;
2201
- /** 是否显示巡逻轨迹,默认 `true`。 */
2202
- showPath?: boolean;
2203
- /** 巡逻过的路径的显示颜色,默认 `#ffffff`。 */
2204
- passedColor?: string;
2205
- /** 未巡逻路径的颜色,默认 `#00ff00`。 */
2206
- lineColor?: string;
2207
- /** 线路的宽度。 */
2208
- lineWidth: number;
2209
- /** 全程所需时间。 */
2210
- duration?: number;
2211
- /** 路径点的集合,至少需要 2 个节点。 */
2212
- nodes?: Vector3Input[];
2213
- /** 路径点时间序列的集合。 */
2214
- timeNodes?: TimeSerialNode[];
2215
- /** 线的图层,如 TransparentFX。 */
2216
- lineLayer?: string;
2217
- /** 是否后渲染,默认 `false`;`true` 后渲染(渲染不会阻挡),`false` 前渲染。 */
2218
- afterRender?: boolean;
2219
- /** 是否自动清除,默认 `true`。 */
2220
- isAutoClear?: boolean;
2221
- }
2394
+ type NetworkAdaptationMode = 'auto' | 'manual';
2222
2395
  /**
2223
- * PathPatrol.update 参数。
2396
+ * 媒体链路实时指标快照。
2224
2397
  */
2225
- interface PathPatrolUpdateRequest {
2226
- /** 模型对象父对象编号。 */
2227
- parentId?: string;
2228
- /** 巡逻轨迹编号。 */
2229
- id: string;
2230
- /** 巡逻轨迹的颜色。 */
2231
- lineColor?: string;
2232
- /** 巡逻路线的宽度。 */
2233
- lineWidth?: number;
2234
- /** 巡逻过的路径的显示颜色。 */
2235
- passedColor?: string;
2236
- /** 调整速度,不能小于 0。 */
2237
- speed?: number;
2398
+ interface NetworkMetricsSnapshot {
2399
+ ts: number;
2400
+ connected: boolean;
2401
+ fps?: number;
2402
+ bitrateKbps?: number;
2403
+ packetLossRate?: number;
2404
+ jitterMs?: number;
2405
+ rttMs?: number;
2406
+ frameWidth?: number;
2407
+ frameHeight?: number;
2238
2408
  }
2239
2409
  /**
2240
- * PathPatrol.setTimeNode 参数。
2410
+ * 弱网状态变更事件载荷。
2241
2411
  */
2242
- interface PathPatrolSetTimeNodeRequest {
2243
- /** 模型对象父对象编号。 */
2244
- parentId?: string;
2245
- /** 巡逻对象编号。 */
2246
- id: string;
2247
- /** 时间节点,格式为 "2025-09-10 00:05:00"。`timeStart` 与 `startNodeIndex` 只能有一个不为空。 */
2248
- timeStart?: string;
2249
- /** 开始节点索引,不能小于 0。`timeStart` 与 `startNodeIndex` 只能有一个不为空。 */
2250
- startNodeIndex?: string;
2412
+ interface NetworkAdaptationState {
2413
+ from: NetworkAdaptationLevel;
2414
+ to: NetworkAdaptationLevel;
2415
+ mode: NetworkAdaptationMode;
2416
+ reason: string;
2417
+ ts: number;
2418
+ metrics?: NetworkMetricsSnapshot;
2251
2419
  }
2252
2420
  /**
2253
- * PathPatrol.pause / resume / stop 参数。
2421
+ * 策略动作类型。
2254
2422
  */
2255
- interface PathPatrolNodeRequest {
2256
- /** 模型对象父对象编号。 */
2257
- parentId?: string;
2258
- /** 巡逻对象编号。 */
2259
- id: string;
2260
- }
2423
+ type NetworkAdaptationActionType = 'SetSceneRenderBitrate' | 'SetSceneFPS' | 'SetScreenResolution';
2261
2424
  /**
2262
- * 单个热力点数据(地理坐标 + 热度值)。
2425
+ * 单步策略动作执行结果。
2263
2426
  */
2264
- interface HeatMapPointRequest {
2265
- /** 点位置(地理坐标,默认 EPSG4326)。 */
2266
- position: Vector3Input;
2267
- /** 该点的热度值(0~1),默认 1。 */
2268
- value?: number;
2427
+ interface NetworkAdaptationActionStep {
2428
+ type: NetworkAdaptationActionType;
2429
+ payload: Record<string, number>;
2430
+ success: boolean;
2431
+ error?: string;
2269
2432
  }
2270
2433
  /**
2271
- * HeatMap.create 参数。
2434
+ * 策略动作执行事件。
2272
2435
  */
2273
- interface HeatMapCreateRequest {
2274
- /** 热力图所属父节点 ID,可选。 */
2275
- parentId?: string;
2276
- /** 热力图 ID;重复创建相同 ID 会更新该热力图数据,可空。 */
2277
- id?: string;
2278
- /** 热力图纹理尺寸(像素),默认 256x256;地理数据模式下由坐标范围自动计算。 */
2279
- textureSize?: Vector2Input;
2280
- /** 热力图在地图中的尺寸(厘米),默认 1000x1000;地理数据模式下由坐标范围自动计算。 */
2281
- mapSize?: Vector2Input;
2282
- /** 单个热力点的影响范围(像素),默认 50。 */
2283
- influenceSize?: number;
2284
- /** 热力点数据列表,支持 `{ position, value }` 对象数组或 `Vector3Input` 位置数组(热度值默认 1)。 */
2285
- points: HeatMapPointRequest[] | Vector3Input[];
2286
- /** 材质透明度,默认 0.7。 */
2287
- opacity?: number;
2288
- /** 高度缩放,默认 2500。 */
2289
- heightScale?: number;
2290
- /** 颜色过渡比例,默认 2.5。 */
2291
- lerpScale?: number;
2292
- /** 是否添加到场景中,默认 false */
2293
- isAddAsset?: boolean;
2436
+ interface NetworkAdaptationActionResult {
2437
+ level: Exclude<NetworkAdaptationLevel, 'Recovering'>;
2438
+ mode: NetworkAdaptationMode;
2439
+ success: boolean;
2440
+ skipped: boolean;
2441
+ reason: string;
2442
+ ts: number;
2443
+ steps: NetworkAdaptationActionStep[];
2294
2444
  }
2295
2445
  /**
2296
- * HeatMap.remove 参数。
2446
+ * 策略决策轨迹条目,用于诊断面板回放。
2297
2447
  */
2298
- interface HeatMapRemoveRequest {
2299
- /** 热力图所属父节点 ID,可选。 */
2300
- parentId?: string;
2301
- /** 热力图 ID;为空时移除全部热力图。 */
2302
- id?: string;
2448
+ interface NetworkDecisionTrace {
2449
+ ts: number;
2450
+ mode: NetworkAdaptationMode;
2451
+ currentLevel: NetworkAdaptationLevel;
2452
+ measuredLevel: Exclude<NetworkAdaptationLevel, 'Recovering'>;
2453
+ targetLevel?: NetworkAdaptationLevel;
2454
+ outcome: 'hold' | 'downgrade' | 'recover' | 'manual' | 'skip_hysteresis' | 'skip_cooldown';
2455
+ reason: string;
2456
+ metrics?: NetworkMetricsSnapshot;
2303
2457
  }
2304
2458
  /**
2305
- * HeatMap.setConfig 参数。
2459
+ * 诊断面板快照数据。
2306
2460
  */
2307
- interface HeatMapConfigRequest {
2308
- /** 热力图所属父节点 ID,可选。 */
2309
- parentId?: string;
2310
- /** 热力图 ID;为空时作用于最近创建的热力图。 */
2311
- id?: string;
2312
- /** 材质透明度,默认 0.7。 */
2313
- opacity?: number;
2314
- /** 高度缩放,默认 2500。 */
2315
- heightScale?: number;
2316
- /** 颜色过渡比例,默认 2.5。 */
2317
- lerpScale?: number;
2318
- /**影响范围 */
2319
- influenceSize?: number;
2461
+ interface NetworkDiagnosticsSnapshot {
2462
+ ts: number;
2463
+ visible: boolean;
2464
+ mode: NetworkAdaptationMode;
2465
+ currentLevel: NetworkAdaptationLevel;
2466
+ connected: boolean;
2467
+ lastMetrics?: NetworkMetricsSnapshot;
2468
+ lastAction?: NetworkAdaptationActionResult;
2469
+ traces: NetworkDecisionTrace[];
2320
2470
  }
2471
+ //#endregion
2472
+ //#region src/types/qos.d.ts
2321
2473
  /**
2322
- * Navigation.startMeshNav / getMeshNavDistance 参数。
2323
- */
2324
- interface NavigationMeshNavRequest {
2325
- /** 对象组的父对象,可以为空。 */
2326
- parentId?: string;
2327
- /** 对象名称数组集合。 */
2328
- id: string;
2329
- /** 路径节点数组集合,与 `targetIds` 二选一。 */
2330
- nodes?: Vector3Input[];
2331
- /** 路径节点经过的目标对象名称数组集合,与 `nodes` 二选一;需保证场景中各编号对象唯一存在。 */
2332
- targetIds?: string[];
2333
- /** 物体移动的速度,默认 1。 */
2334
- speed?: number;
2335
- /** 是否作为导航缓存路径点,默认 `true`;`true` 表示将节点加入缓存路径,下次修改时前置节点仍会经过,`false` 表示按新路径导航。 */
2336
- isCache?: boolean;
2337
- /** 导航规划路径颜色。 */
2338
- planColor?: string;
2339
- /** 导航已走过的路径颜色。 */
2340
- passColor?: string;
2341
- /** 导航规划线的宽度,默认 1。 */
2342
- lineWidth?: number;
2343
- /** 是否自动播放,默认 `true`。 */
2344
- isAutoPlay?: boolean;
2345
- /** 场景的模型路径,可为空;为空时根据 id 到场景中寻找模型对象。 */
2346
- assetPath?: string;
2347
- /** 是否自动清除,默认 `true`。 */
2348
- isAutoClear?: boolean;
2349
- offSetZ?: number;
2350
- }
2474
+ * QoS 事件阶段定义。
2475
+ */
2476
+ type QosStage = 'auth' | 'center' | 'webrtc' | 'media' | 'ue_api' | 'session';
2351
2477
  /**
2352
- * Navigation.pauseMeshNav / resumeMeshNav / stopMeshNav / pauseNavPath / resumeNavPath / stopNavPath 参数。
2478
+ * QoS 事件状态定义。
2353
2479
  */
2354
- interface NavigationNodeRequest {
2355
- /** 对象组的父对象,可以为空。 */
2356
- parentId?: string;
2357
- /** 对象名称数组集合。 */
2358
- id: string;
2480
+ type QosStatus = 'start' | 'success' | 'failed' | 'update' | 'end';
2481
+ /**
2482
+ * QoS 事件日志等级(仅用于事件严重程度标记)。
2483
+ */
2484
+ type QosLevel = 'info' | 'warn' | 'error';
2485
+ /**
2486
+ * QoS V1 事件名集合。
2487
+ */
2488
+ declare const QOS_EVENT_NAMES: readonly ["session_start", "auth_start", "auth_success", "auth_failed", "center_connect_start", "center_connected", "center_disconnected", "center_message_received", "webrtc_connect_start", "webrtc_connected", "webrtc_disconnected", "first_frame_rendered", "media_stats_sample", "ue_request_sent", "ue_response_received", "session_end"];
2489
+ /**
2490
+ * QoS V1 事件名类型。
2491
+ *
2492
+ * 注意:V1 明确不包含 `ue_request_timeout`。
2493
+ */
2494
+ type QosEventName = (typeof QOS_EVENT_NAMES)[number];
2495
+ /**
2496
+ * 会话维度上下文。
2497
+ */
2498
+ interface QosSessionContext {
2499
+ sessionId: string;
2500
+ traceId: string;
2501
+ runMode: string;
2502
+ viewMode: string;
2359
2503
  }
2360
2504
  /**
2361
- * Navigation.updateMeshNav 参数。
2505
+ * 运行环境上下文。
2362
2506
  */
2363
- interface NavigationUpdateMeshNavRequest {
2364
- /** 对象组的父对象,可以为空。 */
2365
- parentId?: string;
2366
- /** 对象名称数组集合。 */
2367
- id: string;
2368
- /** 物体移动的速度,默认 -1(不改变速度)。 */
2369
- speed?: number;
2370
- /** 导航规划路径颜色。 */
2371
- planColor?: string;
2372
- /** 导航已走过的路径颜色。 */
2373
- passColor?: string;
2507
+ interface QosRuntimeContext {
2508
+ appId?: string;
2509
+ env?: string;
2510
+ pageUrl?: string;
2511
+ userAgent?: string;
2374
2512
  }
2375
- interface NavigationUpdateSpeedRequest {
2376
- /** 对象组的父对象,可以为空。 */
2377
- parentId?: string;
2378
- /** 对象名称数组集合。 */
2379
- id: string;
2380
- /** 物体移动的速度,默认 -1(不改变速度)。 */
2381
- speed?: number;
2513
+ /**
2514
+ * warn/error 聚合统计指标。
2515
+ */
2516
+ interface QosWarnErrorSummary {
2517
+ logWarnCount: number;
2518
+ logErrorCount: number;
2519
+ logErrorByStage: Partial<Record<QosStage, number>>;
2520
+ logErrorTopCodes: Array<{
2521
+ code: string;
2522
+ count: number;
2523
+ }>;
2382
2524
  }
2383
2525
  /**
2384
- * Navigation.startNavByPath 参数。
2526
+ * QoS 事件结构。
2385
2527
  */
2386
- interface NavigationNavByPathRequest {
2387
- /** 对象组的父对象,可以为空。 */
2388
- parentId?: string;
2389
- /** 对象名称数组集合。 */
2390
- id: string[];
2391
- /** 路径节点数组集合。 */
2392
- nodes: Vector3Input[];
2393
- /** 是否作为导航缓存路径点,默认 `true`。 */
2394
- isCache?: boolean;
2395
- /** 导航轨迹总时间(秒),默认 10。 */
2396
- duration?: number;
2397
- /** 导航规划路径颜色。 */
2398
- planColor?: string;
2399
- /** 导航已走过的路径颜色。 */
2400
- passColor?: string;
2528
+ interface QosEvent {
2529
+ eventName: QosEventName;
2530
+ stage: QosStage;
2531
+ status: QosStatus;
2532
+ ts: number;
2533
+ level: QosLevel;
2534
+ durationMs?: number;
2535
+ errorCode?: string;
2536
+ errorMessage?: string;
2537
+ attrs?: Record<string, unknown>;
2538
+ metrics?: Record<string, unknown>;
2401
2539
  }
2402
2540
  /**
2403
- * Navigation.updateNavPath 参数。
2541
+ * QoS 批量上报载荷。
2404
2542
  */
2405
- interface NavigationUpdateNavPathRequest {
2406
- /** 对象组的父对象,可以为空。 */
2407
- parentId?: string;
2408
- /** 对象名称数组集合。 */
2409
- id: string[];
2410
- /** 导航轨迹总时间(秒),默认 -1(不改变时长)。 */
2411
- duration?: number;
2412
- /** 导航规划路径颜色。 */
2413
- planColor?: string;
2414
- /** 导航已走过的路径颜色。 */
2415
- passColor?: string;
2543
+ interface QosReportingPayload {
2544
+ schemaVersion: '1.0.0';
2545
+ source: 'enginesdk3';
2546
+ sdkVersion: string;
2547
+ sentAt: number;
2548
+ session: QosSessionContext;
2549
+ context: QosRuntimeContext;
2550
+ events: QosEvent[];
2416
2551
  }
2417
2552
  //#endregion
2418
2553
  //#region src/types/response.d.ts
@@ -2452,6 +2587,7 @@ declare class PixelStreamingAdapter {
2452
2587
  private readonly modeStrategy;
2453
2588
  private readonly psConfig;
2454
2589
  private readonly streamerAssignedListeners;
2590
+ private readonly videoElementParent?;
2455
2591
  /**
2456
2592
  * 使用 SDK 提供的配置创建并初始化 PixelStreaming 运行时。
2457
2593
  */
@@ -2508,6 +2644,8 @@ declare class PixelStreamingAdapter {
2508
2644
  * 返回底层运行时是否处于重连状态。
2509
2645
  */
2510
2646
  isReconnecting(): boolean;
2647
+ private readonly handlePoiCursorResponse;
2648
+ private setVideoCursor;
2511
2649
  /**
2512
2650
  * 设置 DTC 多 streamer 架构的 streamerAssigned 监听器。
2513
2651
  * 当信令服务器分配 streamer 后,自动设置 StreamerId 到配置中。
@@ -4464,22 +4602,22 @@ declare class PathPatrol extends BaseApi {
4464
4602
  */
4465
4603
  add(payload: PathPatrolAddRequest, callback?: StreamRequestCallback<unknown>): StreamRequestPromise<unknown>;
4466
4604
  /**
4467
- * 修改巡逻路径的样式。
4468
- * @param payload - 巡逻样式参数。
4469
- * @param callback - 可选回调函数。
4470
- * @returns Promise 形式的接口响应。
4471
- * @agentSideEffects write
4472
- * @agentPreconditions DTCEngine 已完成鉴权并建立 WebRTC 连接
4473
- * @agentRiskLevel low
4474
- * @agentExample { parentId: 'patrolLayer', id: 'patrolMan', lineColor: '#ff00ff', lineWidth: 3.5 }
4475
- * @example
4476
- * ```ts
4477
- * dtcEngine.PathPatrol.update(
4478
- * { parentId: 'patrolLayer', id: 'patrolMan', lineColor: '#ff00ff', lineWidth: 3.5 },
4479
- * (result) => { console.log(result); }
4480
- * );
4481
- * ```
4482
- */
4605
+ * 修改巡逻路径的样式。
4606
+ * @param payload - 巡逻样式参数。
4607
+ * @param callback - 可选回调函数。
4608
+ * @returns Promise 形式的接口响应。
4609
+ * @agentSideEffects write
4610
+ * @agentPreconditions DTCEngine 已完成鉴权并建立 WebRTC 连接
4611
+ * @agentRiskLevel low
4612
+ * @agentExample { parentId: 'patrolLayer', id: 'patrolMan', lineColor: '#ff00ff', lineWidth: 3.5 }
4613
+ * @example
4614
+ * ```ts
4615
+ dtcEngine.PathPatrol.update(
4616
+ { parentId: 'patrolLayer', id: 'patrolMan', lineColor: '#ff00ff', lineWidth: 3.5 },
4617
+ (result) => { console.log(result); }
4618
+ );
4619
+ * ```
4620
+ */
4483
4621
  update(payload: PathPatrolUpdateRequest, callback?: ApiCallback<ApiResponseEnvelope<unknown>>): Promise<ApiResponseEnvelope<unknown>>;
4484
4622
  /**
4485
4623
  * 设置巡逻开始的时间节点或是节点索引。
@@ -4568,6 +4706,73 @@ declare class PathPatrol extends BaseApi {
4568
4706
  stop(payload: PathPatrolNodeRequest, callback?: ApiCallback<ApiResponseEnvelope<unknown>>): Promise<ApiResponseEnvelope<unknown>>;
4569
4707
  }
4570
4708
  //#endregion
4709
+ //#region src/api/PointIcon.d.ts
4710
+ interface PointIconVisibilityResult {
4711
+ requestedCount: number;
4712
+ affectedCount: number;
4713
+ notFoundIds: string[];
4714
+ }
4715
+ interface PointIconIdsRequest {
4716
+ ids: string[];
4717
+ }
4718
+ type PointIconIdsInput = string[] | PointIconIdsRequest;
4719
+ type PointIconResponse = ApiResponseEnvelope<PointIconVisibilityResult>;
4720
+ /**
4721
+ * 设备点位图标显隐控制 API。
4722
+ * @agentTitle 设备点位图标
4723
+ * @agentCapabilities 指定点位显隐, 分组点位显隐, 全部点位显隐
4724
+ * @hideconstructor
4725
+ */
4726
+ declare class PointIcon extends BaseApi {
4727
+ constructor(bridge: ApiBridge, runtimeOptions?: BaseApiRuntimeOptions);
4728
+ /**
4729
+ * 显示指定设备点位的图标。
4730
+ * @agentSideEffects write
4731
+ * @agentPreconditions DTCEngine 已完成鉴权并建立 WebRTC 连接
4732
+ * @agentRiskLevel low
4733
+ * @agentExample { ids: ['point-001', 'point-002'] }
4734
+ */
4735
+ show(payload: PointIconIdsInput, callback?: ApiCallback<PointIconResponse>): Promise<PointIconResponse>;
4736
+ /**
4737
+ * 隐藏指定设备点位的图标。
4738
+ * @agentSideEffects write
4739
+ * @agentPreconditions DTCEngine 已完成鉴权并建立 WebRTC 连接
4740
+ * @agentRiskLevel low
4741
+ * @agentExample { ids: ['point-001', 'point-002'] }
4742
+ */
4743
+ hide(payload: PointIconIdsInput, callback?: ApiCallback<PointIconResponse>): Promise<PointIconResponse>;
4744
+ /**
4745
+ * 显示指定分组及其子分组内的设备点位图标。
4746
+ * @agentSideEffects write
4747
+ * @agentPreconditions DTCEngine 已完成鉴权并建立 WebRTC 连接
4748
+ * @agentRiskLevel low
4749
+ * @agentExample { ids: ['group-f1'] }
4750
+ */
4751
+ showByGroup(payload: PointIconIdsInput, callback?: ApiCallback<PointIconResponse>): Promise<PointIconResponse>;
4752
+ /**
4753
+ * 隐藏指定分组及其子分组内的设备点位图标。
4754
+ * @agentSideEffects write
4755
+ * @agentPreconditions DTCEngine 已完成鉴权并建立 WebRTC 连接
4756
+ * @agentRiskLevel low
4757
+ * @agentExample { ids: ['group-f1'] }
4758
+ */
4759
+ hideByGroup(payload: PointIconIdsInput, callback?: ApiCallback<PointIconResponse>): Promise<PointIconResponse>;
4760
+ /**
4761
+ * 显示全部设备点位图标。
4762
+ * @agentSideEffects write
4763
+ * @agentPreconditions DTCEngine 已完成鉴权并建立 WebRTC 连接
4764
+ * @agentRiskLevel low
4765
+ */
4766
+ showAll(callback?: ApiCallback<PointIconResponse>): Promise<PointIconResponse>;
4767
+ /**
4768
+ * 隐藏全部设备点位图标。
4769
+ * @agentSideEffects write
4770
+ * @agentPreconditions DTCEngine 已完成鉴权并建立 WebRTC 连接
4771
+ * @agentRiskLevel low
4772
+ */
4773
+ hideAll(callback?: ApiCallback<PointIconResponse>): Promise<PointIconResponse>;
4774
+ }
4775
+ //#endregion
4571
4776
  //#region src/api/HeatMap.d.ts
4572
4777
  /**
4573
4778
  * 热力图 API,支持热力图创建(地理热力点数据)、移除、清空与参数设置。
@@ -5390,6 +5595,97 @@ declare class WebView extends BaseApi {
5390
5595
  updateWebView(payload: WebViewUpdateRequest, callback?: ApiCallback<ApiResponseEnvelope<unknown>>): Promise<ApiResponseEnvelope<unknown>>;
5391
5596
  }
5392
5597
  //#endregion
5598
+ //#region src/api/SpatialQuery.d.ts
5599
+ /**
5600
+ * 场景缓冲空间查询 API,支持三种查询方式:
5601
+ * 1. 根据场景模型当前的位置进行空间查询;
5602
+ * 2. 根据场景坐标位置进行空间查询;
5603
+ * 3. 根据场景模型的边界框进行空间查询。
5604
+ * @agentTitle 空间查询
5605
+ * @agentCapabilities 模型空间查询, 坐标空间查询, 模型包围盒空间查询
5606
+ * @hideconstructor
5607
+ */
5608
+ declare class SpatialQuery extends BaseApi {
5609
+ constructor(bridge: ApiBridge, runtimeOptions?: BaseApiRuntimeOptions);
5610
+ /**
5611
+ * 模型空间查询:根据场景模型当前的位置进行空间查询。
5612
+ * 默认值:`queryRadius=50`、`queryMinHeight=0`、`queryMaxHeight=20`。
5613
+ * `queryParentIds` 不能为空,至少指定一个查询的图层组编号。
5614
+ * @param payload - 空间查询参数。
5615
+ * @param callback - 可选回调函数。
5616
+ * @returns Promise 形式的接口响应。
5617
+ * @agentSideEffects write
5618
+ * @agentPreconditions DTCEngine 已完成鉴权并建立 WebRTC 连接
5619
+ * @agentRiskLevel low
5620
+ * @agentExample { parentId: '', id: 'LayerSearchCore', queryRadius: 10, queryMinHeight: 0, queryMaxHeight: 50, queryParentIds: ['SM_B8_XueShenSuShe', 'daoZha'] }
5621
+ * @example
5622
+ * ```ts
5623
+ dtcEngine.SpatialQuery.layerQueryByModel(
5624
+ {
5625
+ parentId: '',
5626
+ id: 'LayerSearchCore',
5627
+ queryRadius: 10,
5628
+ queryMinHeight: 0,
5629
+ queryMaxHeight: 50,
5630
+ queryParentIds: ['SM_B8_XueShenSuShe', 'daoZha']
5631
+ },
5632
+ (result) => { console.log(result); }
5633
+ );
5634
+ * ```
5635
+ */
5636
+ layerQueryByModel(payload: SpatialQueryLayerByModelRequest, callback?: ApiCallback<ApiResponseEnvelope<unknown>>): Promise<ApiResponseEnvelope<unknown>>;
5637
+ /**
5638
+ * 坐标空间查询:根据场景坐标位置进行空间查询。
5639
+ * 默认值:`queryRadius=50`、`queryMinHeight=0`、`queryMaxHeight=20`。
5640
+ * `queryParentIds` 不能为空,至少指定一个查询的图层组编号。
5641
+ * @param payload - 空间查询参数。
5642
+ * @param callback - 可选回调函数。
5643
+ * @returns Promise 形式的接口响应。
5644
+ * @agentSideEffects write
5645
+ * @agentPreconditions DTCEngine 已完成鉴权并建立 WebRTC 连接
5646
+ * @agentRiskLevel low
5647
+ * @agentExample { queryPosition: { x: 120.40284254780221, y: 30.830451474524036, z: 10, ePSGType: '4326' }, queryRadius: 20, queryMinHeight: 0, queryMaxHeight: 50, queryParentIds: ['SM_B8_XueShenSuShe', 'daoZha'] }
5648
+ * @example
5649
+ * ```ts
5650
+ dtcEngine.SpatialQuery.layerQueryByPosition(
5651
+ {
5652
+ queryPosition: new dtcEngine.Type.Vector3(120.2076273621342, 30.372304875047895, 16.01983620418444),
5653
+ queryRadius: 20,
5654
+ queryMinHeight: 0,
5655
+ queryMaxHeight: 50,
5656
+ queryParentIds: ['SM_B8_XueShenSuShe', 'daoZha']
5657
+ }, (res) => {
5658
+ console.log(res);
5659
+ }
5660
+ );
5661
+ * ```
5662
+ */
5663
+ layerQueryByPosition(payload: SpatialQueryLayerByPositionRequest, callback?: ApiCallback<ApiResponseEnvelope<unknown>>): Promise<ApiResponseEnvelope<unknown>>;
5664
+ /**
5665
+ * 模型包围盒空间查询:根据场景模型的边界框进行空间查询。
5666
+ * `queryParentIds` 不能为空,至少指定一个查询的图层组编号。
5667
+ * @param payload - 空间查询参数。
5668
+ * @param callback - 可选回调函数。
5669
+ * @returns Promise 形式的接口响应。
5670
+ * @agentSideEffects write
5671
+ * @agentPreconditions DTCEngine 已完成鉴权并建立 WebRTC 连接
5672
+ * @agentRiskLevel low
5673
+ * @agentExample { parentId: '', id: 'LayerSearchCore', queryParentIds: ['JianKong_QiangJiTest', 'daoZha'] }
5674
+ * @example
5675
+ * ```ts
5676
+ dtcEngine.SpatialQuery.layerQueryByModelBox(
5677
+ {
5678
+ parentId: '',
5679
+ id: 'LayerSearchCore',
5680
+ queryParentIds: ['JianKong_QiangJiTest', 'daoZha']
5681
+ },
5682
+ (result) => { console.log(result); }
5683
+ );
5684
+ * ```
5685
+ */
5686
+ layerQueryByModelBox(payload: SpatialQueryLayerByModelBoxRequest, callback?: ApiCallback<ApiResponseEnvelope<unknown>>): Promise<ApiResponseEnvelope<unknown>>;
5687
+ }
5688
+ //#endregion
5393
5689
  //#region src/api/validationSchemas.d.ts
5394
5690
  /**
5395
5691
  * 未覆盖模块的校验占位清单:
@@ -5525,6 +5821,7 @@ interface ApiInstanceMap {
5525
5821
  ModelTransform: ModelTransform;
5526
5822
  Navigation: Navigation;
5527
5823
  PathPatrol: PathPatrol;
5824
+ pointIcon: PointIcon;
5528
5825
  HeatMap: HeatMap;
5529
5826
  HighlighterEffect: HighLighterEffect;
5530
5827
  Popup: Popup;
@@ -5532,6 +5829,7 @@ interface ApiInstanceMap {
5532
5829
  TimeLine: TimeLine;
5533
5830
  WeatherSystem: WeatherSystem;
5534
5831
  WebView: WebView;
5832
+ SpatialQuery: SpatialQuery;
5535
5833
  }
5536
5834
  type ApiModuleKey = keyof ApiInstanceMap;
5537
5835
  /**
@@ -5630,6 +5928,67 @@ interface AgentBridgeRuntimeSnapshot {
5630
5928
  metadata?: Record<string, string>;
5631
5929
  engine?: AgentBridgeRuntimeEngineSnapshot;
5632
5930
  }
5931
+ type AgentBridgeBusinessProgramPermissionMode = 'query' | 'stage' | 'stream';
5932
+ interface AgentBridgeBusinessProgramManifest {
5933
+ schemaVersion: 1;
5934
+ programId: string;
5935
+ version: string;
5936
+ entry: {
5937
+ file: string;
5938
+ sha256: string;
5939
+ };
5940
+ data: Array<{
5941
+ name: string;
5942
+ file: string;
5943
+ sha256: string;
5944
+ }>;
5945
+ inputSchema: Record<string, unknown>;
5946
+ permissions: {
5947
+ methods: Array<{
5948
+ module: string;
5949
+ method: string;
5950
+ mode: AgentBridgeBusinessProgramPermissionMode;
5951
+ }>;
5952
+ };
5953
+ limits: {
5954
+ timeoutMs: number;
5955
+ maxSdkCalls: number;
5956
+ maxStageActions: number;
5957
+ maxTotalDelayMs: number;
5958
+ maxEventCount: number;
5959
+ maxBundleBytes: number;
5960
+ maxDataBytes: number;
5961
+ };
5962
+ risk: 'low' | 'medium' | 'high';
5963
+ }
5964
+ interface AgentBridgeLoadProgramRequest {
5965
+ capsuleHash: string;
5966
+ manifest: AgentBridgeBusinessProgramManifest;
5967
+ bundle: string;
5968
+ data: Record<string, string>;
5969
+ }
5970
+ interface AgentBridgeStartProgramRequest {
5971
+ executionId: string;
5972
+ capsuleHash: string;
5973
+ inputs: unknown;
5974
+ traceId: string;
5975
+ }
5976
+ interface AgentBridgeCancelProgramRequest {
5977
+ executionId: string;
5978
+ reason?: string;
5979
+ }
5980
+ interface AgentBridgeProgramEventPayload {
5981
+ executionId: string;
5982
+ traceId: string;
5983
+ event: {
5984
+ type: 'started' | 'progress' | 'action' | 'completed' | 'failed' | 'cancelled';
5985
+ phase?: string;
5986
+ message?: string;
5987
+ data?: unknown;
5988
+ };
5989
+ terminal: boolean;
5990
+ state?: 'running' | 'completed' | 'failed' | 'cancelled';
5991
+ }
5633
5992
  /** API 方法副作用描述,用于帮助 Agent 判断调用风险。 */
5634
5993
  type AgentBridgeMethodSideEffect = 'read' | 'write' | 'connection' | 'stream';
5635
5994
  /** API 的响应模式;与副作用风险是两个独立维度。 */
@@ -5686,7 +6045,7 @@ interface AgentBridgeMethodSchemaMetadata {
5686
6045
  responseMode: AgentBridgeMethodResponseMode;
5687
6046
  }
5688
6047
  /** bridge 统一错误码。 */
5689
- type AgentBridgeErrorCode = 'API_NOT_FOUND' | 'API_NOT_EXPOSED' | 'METHOD_SCHEMA_NOT_FOUND' | 'SDK_NOT_READY' | 'INVALID_PAYLOAD' | 'API_EXECUTION_FAILED' | 'API_NOT_STREAMING' | 'STREAM_INVOKE_REQUIRED' | 'PROTOCOL_ERROR' | 'BRIDGE_NOT_CONNECTED';
6048
+ type AgentBridgeErrorCode = 'API_NOT_FOUND' | 'API_NOT_EXPOSED' | 'METHOD_SCHEMA_NOT_FOUND' | 'SDK_NOT_READY' | 'INVALID_PAYLOAD' | 'API_EXECUTION_FAILED' | 'API_NOT_STREAMING' | 'STREAM_INVOKE_REQUIRED' | 'PROTOCOL_ERROR' | 'BRIDGE_NOT_CONNECTED' | 'PROGRAM_INVALID' | 'PROGRAM_EXECUTION_FAILED';
5690
6049
  /**
5691
6050
  * bridge 结构化错误。
5692
6051
  */
@@ -5717,6 +6076,23 @@ interface AgentBridgeInvokeRequest {
5717
6076
  methodName: string;
5718
6077
  payload?: unknown;
5719
6078
  }
6079
+ /** 通用 Action Plan 在真正执行前提交给页面侧进行真实 schema 校验。 */
6080
+ interface AgentBridgeValidateAction extends AgentBridgeInvokeRequest {
6081
+ id: string;
6082
+ responseMode: 'single';
6083
+ }
6084
+ interface AgentBridgeValidateActionsRequest {
6085
+ actions: AgentBridgeValidateAction[];
6086
+ }
6087
+ interface AgentBridgeValidateActionItem {
6088
+ id: string;
6089
+ valid: boolean;
6090
+ error?: AgentBridgeStructuredError;
6091
+ }
6092
+ interface AgentBridgeValidateActionsResult {
6093
+ valid: boolean;
6094
+ items: AgentBridgeValidateActionItem[];
6095
+ }
5720
6096
  /** 启动流式 API 请求。streamId 由 MCP server 创建,用于跨进程关联事件。 */
5721
6097
  interface AgentBridgeStreamStartRequest extends AgentBridgeInvokeRequest {
5722
6098
  streamId: string;
@@ -5762,10 +6138,15 @@ interface AgentBridgeRuntimeAdapter {
5762
6138
  listModules(): AgentBridgeModuleCatalogItem[];
5763
6139
  listMethods(moduleName: string): AgentBridgeOperationResult<AgentBridgeMethodCatalogItem[]>;
5764
6140
  getMethodSchema(moduleName: string, methodName: string): AgentBridgeOperationResult<AgentBridgeMethodSchemaMetadata>;
6141
+ validateActions(request: AgentBridgeValidateActionsRequest): AgentBridgeOperationResult<AgentBridgeValidateActionsResult>;
5765
6142
  invoke(request: AgentBridgeInvokeRequest): Promise<AgentBridgeOperationResult<unknown>>;
5766
6143
  startStream(request: AgentBridgeStreamStartRequest, onEvent: AgentBridgeStreamEventListener): Promise<AgentBridgeOperationResult<AgentBridgeStreamStartResult>>;
5767
6144
  closeStream(request: AgentBridgeStreamCloseRequest): Promise<AgentBridgeOperationResult<AgentBridgeStreamCloseResult>>;
6145
+ loadProgram(request: AgentBridgeLoadProgramRequest): Promise<AgentBridgeOperationResult<unknown>>;
6146
+ startProgram(request: AgentBridgeStartProgramRequest, onEvent: (payload: AgentBridgeProgramEventPayload) => void): Promise<AgentBridgeOperationResult<unknown>>;
6147
+ cancelProgram(request: AgentBridgeCancelProgramRequest): Promise<AgentBridgeOperationResult<unknown>>;
5768
6148
  closeAllStreams?(reason?: string): void;
6149
+ cancelAllPrograms?(reason?: string): void;
5769
6150
  }
5770
6151
  /** createBridgeRuntime 内部保存的浏览器流句柄。 */
5771
6152
  interface AgentBridgeActiveStream {
@@ -5780,7 +6161,7 @@ declare const AGENT_BRIDGE_PROTOCOL_VERSION = "sdk3-agent-bridge/v1";
5780
6161
  /**
5781
6162
  * 浏览器侧 bridge 与 MCP 服务端之间的协议消息类型。
5782
6163
  */
5783
- type AgentBridgeMessageType = 'register' | 'unregister' | 'heartbeat' | 'catalog' | 'schema' | 'invoke' | 'stream-start' | 'stream-close' | 'stream-event' | 'result';
6164
+ type AgentBridgeMessageType = 'register' | 'unregister' | 'heartbeat' | 'catalog' | 'schema' | 'validate-actions' | 'invoke' | 'stream-start' | 'stream-close' | 'stream-event' | 'load-program' | 'start-program' | 'cancel-program' | 'program-event' | 'result';
5784
6165
  /**
5785
6166
  * 所有协议消息的基础信封。
5786
6167
  */
@@ -5789,6 +6170,7 @@ interface AgentBridgeMessageEnvelope<TPayload = unknown> {
5789
6170
  protocolVersion: typeof AGENT_BRIDGE_PROTOCOL_VERSION;
5790
6171
  bridgeId?: string;
5791
6172
  callId?: string;
6173
+ traceId?: string;
5792
6174
  ts: number;
5793
6175
  payload: TPayload;
5794
6176
  }
@@ -5798,8 +6180,11 @@ interface AgentBridgeRegisterPayload extends AgentBridgeRuntimeSnapshot {
5798
6180
  capabilities: {
5799
6181
  catalog: true;
5800
6182
  schema: true;
6183
+ validateActions: true;
5801
6184
  invoke: true;
5802
6185
  stream: true;
6186
+ businessPrograms: true;
6187
+ businessProgramProtocolVersion: 1;
5803
6188
  };
5804
6189
  }
5805
6190
  /** 关闭消息携带的原因。 */
@@ -5823,16 +6208,21 @@ interface AgentBridgeSchemaRequestPayload {
5823
6208
  }
5824
6209
  /** invoke 请求。 */
5825
6210
  type AgentBridgeInvokeRequestPayload = AgentBridgeInvokeRequest;
6211
+ type AgentBridgeValidateActionsRequestPayload = AgentBridgeValidateActionsRequest;
5826
6212
  /** 流式 invoke 与关闭请求。 */
5827
6213
  type AgentBridgeStreamStartRequestPayload = AgentBridgeStreamStartRequest;
5828
6214
  type AgentBridgeStreamCloseRequestPayload = AgentBridgeStreamCloseRequest;
6215
+ type AgentBridgeLoadProgramRequestPayload = AgentBridgeLoadProgramRequest;
6216
+ type AgentBridgeStartProgramRequestPayload = AgentBridgeStartProgramRequest;
6217
+ type AgentBridgeCancelProgramRequestPayload = AgentBridgeCancelProgramRequest;
5829
6218
  /** result 消息。 */
5830
6219
  interface AgentBridgeResultPayload<TData = unknown> {
5831
- requestType: 'catalog' | 'schema' | 'invoke' | 'stream-start' | 'stream-close';
6220
+ requestType: 'catalog' | 'schema' | 'validate-actions' | 'invoke' | 'stream-start' | 'stream-close' | 'load-program' | 'start-program' | 'cancel-program';
5832
6221
  result: AgentBridgeOperationResult<TData>;
6222
+ traceId?: string;
5833
6223
  }
5834
- type AgentBridgeInboundMessage = AgentBridgeMessageEnvelope<AgentBridgeCatalogRequestPayload> | AgentBridgeMessageEnvelope<AgentBridgeSchemaRequestPayload> | AgentBridgeMessageEnvelope<AgentBridgeInvokeRequestPayload> | AgentBridgeMessageEnvelope<AgentBridgeStreamStartRequestPayload> | AgentBridgeMessageEnvelope<AgentBridgeStreamCloseRequestPayload>;
5835
- type AgentBridgeOutboundMessage = AgentBridgeMessageEnvelope<AgentBridgeRegisterPayload> | AgentBridgeMessageEnvelope<AgentBridgeUnregisterPayload> | AgentBridgeMessageEnvelope<AgentBridgeHeartbeatPayload> | AgentBridgeMessageEnvelope<AgentBridgeStreamEventPayload> | AgentBridgeMessageEnvelope<AgentBridgeResultPayload>;
6224
+ type AgentBridgeInboundMessage = AgentBridgeMessageEnvelope<AgentBridgeCatalogRequestPayload> | AgentBridgeMessageEnvelope<AgentBridgeSchemaRequestPayload> | AgentBridgeMessageEnvelope<AgentBridgeValidateActionsRequestPayload> | AgentBridgeMessageEnvelope<AgentBridgeInvokeRequestPayload> | AgentBridgeMessageEnvelope<AgentBridgeStreamStartRequestPayload> | AgentBridgeMessageEnvelope<AgentBridgeStreamCloseRequestPayload> | AgentBridgeMessageEnvelope<AgentBridgeLoadProgramRequestPayload> | AgentBridgeMessageEnvelope<AgentBridgeStartProgramRequestPayload> | AgentBridgeMessageEnvelope<AgentBridgeCancelProgramRequestPayload>;
6225
+ type AgentBridgeOutboundMessage = AgentBridgeMessageEnvelope<AgentBridgeRegisterPayload> | AgentBridgeMessageEnvelope<AgentBridgeUnregisterPayload> | AgentBridgeMessageEnvelope<AgentBridgeHeartbeatPayload> | AgentBridgeMessageEnvelope<AgentBridgeStreamEventPayload> | AgentBridgeMessageEnvelope<AgentBridgeProgramEventPayload> | AgentBridgeMessageEnvelope<AgentBridgeResultPayload>;
5836
6226
  //#endregion
5837
6227
  //#region src/agentBridge/AgentRuntimeBridge.d.ts
5838
6228
  interface AgentBridgeSocket {
@@ -5884,11 +6274,21 @@ declare class AgentRuntimeBridge {
5884
6274
  private clearHeartbeat;
5885
6275
  private handleMessage;
5886
6276
  private sendStreamEvent;
6277
+ private sendProgramEvent;
5887
6278
  private sendResult;
5888
6279
  private send;
5889
6280
  private clearSocketHandlers;
5890
6281
  }
5891
6282
  //#endregion
6283
+ //#region src/agentBridge/businessProgram/BusinessProgramRuntime.d.ts
6284
+ interface BusinessProgramWorker {
6285
+ onmessage: ((event: MessageEvent) => void) | null;
6286
+ onerror: ((event: ErrorEvent) => void) | null;
6287
+ postMessage(message: unknown): void;
6288
+ terminate(): void;
6289
+ }
6290
+ type BusinessProgramWorkerFactory = (source: string) => BusinessProgramWorker;
6291
+ //#endregion
5892
6292
  //#region src/agentBridge/createBridgeRuntime.d.ts
5893
6293
  interface AgentBridgeRuntimeFactoryOptions {
5894
6294
  bridgeId?: string;
@@ -5900,11 +6300,14 @@ interface AgentBridgeRuntimeFactoryOptions {
5900
6300
  getAuthSnapshot?: () => AuthSessionSnapshot;
5901
6301
  mockInvoke?: boolean;
5902
6302
  }
6303
+ interface AgentBridgeRuntimeFactoryDependencies {
6304
+ businessProgramWorkerFactory?: BusinessProgramWorkerFactory;
6305
+ }
5903
6306
  /**
5904
6307
  * 将 DTCEngine 适配为 bridge 可消费的运行时接口。
5905
6308
  * 这里负责权限、ready 状态和 API 调用收口,WebSocket 协议由 AgentRuntimeBridge 处理。
5906
6309
  */
5907
- declare function createBridgeRuntime(engine: DTCEngine, options?: AgentBridgeRuntimeFactoryOptions): AgentBridgeRuntimeAdapter;
6310
+ declare function createBridgeRuntime(engine: DTCEngine, options?: AgentBridgeRuntimeFactoryOptions, dependencies?: AgentBridgeRuntimeFactoryDependencies): AgentBridgeRuntimeAdapter;
5908
6311
  //#endregion
5909
6312
  //#region src/agentBridge/metadataGenerator/buildAgentBridgeMetadata.d.ts
5910
6313
  interface AgentBridgeGeneratedMethodMetadata extends AgentBridgeMethodCatalogItem {
@@ -5931,6 +6334,66 @@ declare function listAgentBridgeModules(expose?: AgentBridgeExposeConfig): Agent
5931
6334
  declare function listAgentBridgeMethods(moduleName: ApiModuleKey, expose?: AgentBridgeExposeConfig): AgentBridgeMethodCatalogItem[];
5932
6335
  declare function getAgentBridgeMethodSchema(moduleName: ApiModuleKey, methodName: string, expose?: AgentBridgeExposeConfig): AgentBridgeMethodSchemaMetadata | undefined;
5933
6336
  //#endregion
6337
+ //#region src/orchestration/BuildingFloor.d.ts
6338
+ type BuildingFloorErrorCode = 'INVALID_REGISTRATION' | 'BUILDING_ALREADY_REGISTERED' | 'BUILDING_NOT_REGISTERED' | 'FLOOR_NOT_FOUND' | 'MODEL_INFO_INVALID';
6339
+ /** 建筑楼层 API 配置或运行状态错误。 */
6340
+ declare class BuildingFloorError extends Error {
6341
+ readonly code: BuildingFloorErrorCode;
6342
+ readonly buildingId?: string | undefined;
6343
+ readonly floorId?: string | undefined;
6344
+ readonly name = "BuildingFloorError";
6345
+ constructor(code: BuildingFloorErrorCode, message: string, buildingId?: string | undefined, floorId?: string | undefined);
6346
+ }
6347
+ interface BuildingFloorDependencies {
6348
+ model: Pick<Model, 'getModelInfo' | 'setVisible'>;
6349
+ modelTransform: Pick<ModelTransform, 'startMoveByNodes' | 'endMove'>;
6350
+ camera: Pick<Camera, 'flyToTarget' | 'lookAt'>;
6351
+ }
6352
+ interface BuildingFloorRuntimeOptions {
6353
+ logger?: ModuleLogger;
6354
+ }
6355
+ /**
6356
+ * 建筑楼层高级编排 API。
6357
+ *
6358
+ * 组合模型查询、模型显隐、模型移动和相机定位能力,为项目提供统一的楼层切换状态机。
6359
+ */
6360
+ declare class BuildingFloor {
6361
+ private readonly dependencies;
6362
+ private readonly buildings;
6363
+ private readonly logger;
6364
+ constructor(dependencies: BuildingFloorDependencies, runtimeOptions?: BuildingFloorRuntimeOptions);
6365
+ register(building: BuildingFloorRegistration): Promise<BuildingFloorRegistrationResult>;
6366
+ register(buildings: BuildingFloorRegistration[]): Promise<BuildingFloorRegistrationResult>;
6367
+ switchTo(options: BuildingFloorSwitchOptions): Promise<BuildingFloorTransitionResult>;
6368
+ showOverview(options: BuildingFloorOverviewOptions): Promise<BuildingFloorTransitionResult>;
6369
+ cancel(options: BuildingFloorCancelOptions): Promise<void>;
6370
+ getState(options: BuildingFloorStateOptions): BuildingFloorState;
6371
+ private normalizeRegistrations;
6372
+ private normalizeFloor;
6373
+ private normalizeObjectIds;
6374
+ private validateViewPoint;
6375
+ private requireNonEmptyString;
6376
+ private assertBuildingsRemainAvailable;
6377
+ private measureFloorPositions;
6378
+ private extractPosition;
6379
+ private requireBuilding;
6380
+ private transition;
6381
+ private schedule;
6382
+ private scheduleCompletion;
6383
+ private completeTransition;
6384
+ private focusTarget;
6385
+ private failTransition;
6386
+ private settleTransition;
6387
+ private stopActiveTransition;
6388
+ private stopActiveMoves;
6389
+ private createResult;
6390
+ private getHideOffset;
6391
+ private getAccessoryObjectIds;
6392
+ private getBatchDurationMs;
6393
+ private getMotionSpeed;
6394
+ private positionAtZ;
6395
+ }
6396
+ //#endregion
5934
6397
  //#region src/application/DTCEngine.d.ts
5935
6398
  /**
5936
6399
  * DTCEngine 对外构造参数。
@@ -6099,8 +6562,12 @@ declare class DTCEngine {
6099
6562
  readonly ModelPOI: ApiInstanceMap['ModelPOI'];
6100
6563
  /** 模型变换模块。 */
6101
6564
  readonly ModelTransform: ApiInstanceMap['ModelTransform'];
6565
+ /** 建筑楼层分层控制模块。 */
6566
+ readonly BuildingFloor: BuildingFloor;
6102
6567
  /** 路径巡逻模块。 */
6103
6568
  readonly PathPatrol: ApiInstanceMap['PathPatrol'];
6569
+ /** 设备点位图标显隐控制模块。 */
6570
+ readonly pointIcon: ApiInstanceMap['pointIcon'];
6104
6571
  /** 高亮效果模块。 */
6105
6572
  readonly HighlighterEffect: ApiInstanceMap['HighlighterEffect'];
6106
6573
  /** 前端 Popup 模块。 */
@@ -6318,4 +6785,4 @@ declare class SDKValidationError extends Error {
6318
6785
  toJSON(): Record<string, unknown>;
6319
6786
  }
6320
6787
  //#endregion
6321
- export { AGENT_BRIDGE_API_METADATA, type AGENT_BRIDGE_PROTOCOL_VERSION, API_MODULE_KEYS, type AgentBridgeActiveStream, type AgentBridgeCatalogRequestPayload, type AgentBridgeErrorCode, type AgentBridgeExposeConfig, type AgentBridgeHeartbeatPayload, type AgentBridgeInboundMessage, type AgentBridgeInvokeRequest, type AgentBridgeInvokeRequestPayload, type AgentBridgeMessageEnvelope, type AgentBridgeMessageType, type AgentBridgeMethodCatalogItem, type AgentBridgeMethodResponseMode, type AgentBridgeMethodSchemaMetadata, type AgentBridgeMethodSideEffect, type AgentBridgeModuleCatalogItem, type AgentBridgeOperationResult, type AgentBridgeOutboundMessage, type AgentBridgeReconnectOptions, type AgentBridgeRegisterPayload, type AgentBridgeResultPayload, type AgentBridgeRuntimeAdapter, type AgentBridgeRuntimeEngineSnapshot, type AgentBridgeRuntimeFactoryOptions, type AgentBridgeRuntimeSnapshot, type AgentBridgeSchemaEnumOption, type AgentBridgeSchemaField, type AgentBridgeSchemaFieldType, type AgentBridgeSchemaRequestPayload, type AgentBridgeSocket, type AgentBridgeSocketFactory, type AgentBridgeStreamCloseRequest, type AgentBridgeStreamCloseRequestPayload, type AgentBridgeStreamCloseResult, type AgentBridgeStreamEventListener, type AgentBridgeStreamEventPayload, type AgentBridgeStreamStartRequest, type AgentBridgeStreamStartRequestPayload, type AgentBridgeStreamStartResult, type AgentBridgeStreamTerminalReason, type AgentBridgeStructuredError, type AgentBridgeUnregisterPayload, AgentRuntimeBridge, type AgentRuntimeBridgeDependencies, Animation, type AnimationGetLengthRequest, type AnimationPlayRequest, type AnimationSetSpeedRequest, type AnimationStartLoopRequest, type AnimationStopLoopRequest, type AnimationStopRequest, type ApiCallback, type ApiFacade, type ApiInstanceMap, type ApiModuleFactory, type ApiModuleKey, type ApiRegistry, type ApiRegistryContext, ApiRegistryError, type ApiRequestEnvelope, type ApiResponseEnvelope, type AuthErrorInfo, type AuthSessionSnapshot, type AuthWorkflowState, Camera, type CameraFlyByPathRequest, type CameraFlyToTargetRequest, type CameraLookAtRequest, type CameraObjFollowRequest, type CameraSetFlySpeedRequest, type CameraSetFovRequest, type CameraSetPositionAndRotationRequest, type CenterConnectResult, type CenterEnvelope, type CenterServiceInfo, type CenterTokenAuthorizeResult, Connect, DTCEngine, type DTCEngineAgentBridgeOptions, Dlss, DlssQuality, type DlssSetEnableRequest, type DlssSetQualityRequest, type EngineConfig, type EngineLogLevel, type EngineStatusInfo, type EngineViewMode, type FeatureToggleRequest, FilterMode, type GetWeatherTypeRequest, HeatMap, type HeatMapConfigRequest, type HeatMapCreateRequest, type HeatMapPointRequest, type HeatMapRemoveRequest, HighLighterEffect, type HighLighterEnableRequest, type HighLighterRemoveHighLightModelRequest, type HighLighterSetHighLightModelRequest, Layer, type LayerAddRequest, type LayerChildElementRequest, LayerEnum, type LayerModelAddRequest, type LayerModelRemoveRequest, type LayerPOIAddRequest, type LayerSelectorRequest, type LayerShowUIPopRequest, type LayerSwitchModelRequest, Model, type ModelAddRequest, type ModelBoundsRequest, ModelPOI, type ModelPOIAddRequest, type ModelPOIDeleteByGroupRequest, type ModelPOIDeleteByIdRequest, type ModelPOIGetInfoRequest, type ModelPOIUpdateRequest, type ModelPOIVisibleByGroupRequest, type ModelRemoveRequest, type ModelSelectorRequest, type ModelSetVisibleByAttributeRequest, type ModelSetVisibleByTagsRequest, type ModelSetVisibleRequest, ModelTransform, type ModelTransformNodeRequest, type ModelTransformRestoreRequest, type ModelTransformRotateByTargetRequest, type ModelTransformRotateRequest, type ModelTransformScaleRequest, type ModelTransformStartMoveRequest, ModelTransformType, Navigation, type NavigationMeshNavRequest, type NavigationNavByPathRequest, type NavigationNodeRequest, type NavigationUpdateMeshNavRequest, type NavigationUpdateNavPathRequest, type NavigationUpdateSpeedRequest, type NetworkAdaptationActionResult, type NetworkAdaptationActionStep, type NetworkAdaptationActionType, type NetworkAdaptationLevel, type NetworkAdaptationMode, type NetworkAdaptationState, type NetworkDecisionTrace, type NetworkDiagnosticsSnapshot, type NetworkMetricsSnapshot, PathPatrol, type PathPatrolAddRequest, type PathPatrolNodeRequest, type PathPatrolSetTimeNodeRequest, type PathPatrolUpdateRequest, PendingValidationSchemaMap, Popup, type PopupAddRequest, type PopupDelayRequest, type PopupItemRequest, type PopupRemoveRequest, type PopupShowDistanceRequest, type PopupShowRequest, type PopupSyncInfoRequest, type QOS_EVENT_NAMES, type QosEvent, type QosEventName, type QosLevel, type QosReportingPayload, type QosRuntimeContext, type QosSessionContext, type QosStage, type QosStatus, type QosWarnErrorSummary, type ResolvedEngineConfig, SDKValidationError, Scene, type SceneListenCompassRequest, type SceneSwitchRequest, Screen, ScreenRenderBitratePreset, ScreenRenderBitratePresetOptions, type ScreenRenderBitratePresetValueMap, type ScreenSetSceneFPSRequest, type ScreenSetSceneRenderBitrateRequest, type ScreenSetScreenResolutionRequest, type ScreenSetVideoDecodeRequest, Season, type SignallingAllocateResponse, type StandardResponse, TimeLine, type TimeSerialNode, type TimelineNodeRequest, type TimelinePlayRequest, type TimelineSetSpeedRequest, type TimelineStopRequest, UIPOI, type UIPOIAddRequest, type UIPOIDeleteByGroupRequest, type UIPOIDeleteByIdRequest, type UIPOIEnableOverlapRequest, type UIPOIShowDistanceRequest, type UIPOIUpdateRequest, type UIPOIUpdateStateRequest, type Vector2Input, type Vector2JsonInput, type Vector3Input, type Vector3JsonInput, VideoCodeType, type WeatherChangeSeasonRequest, type WeatherOpenCameraFogRequest, type WeatherSetAnimateTimeOfDayRequest, type WeatherSetDayAndNightRequest, type WeatherSetSceneTimeRequest, type WeatherSetTimeSyncRequest, WeatherSystem, type WeatherTypeRequest, WebView, type WebViewUpdateRequest, apiRegistry, createAgentBridgeMetadata, createApiFacade, createBridgeRuntime, getAgentBridgeMethodSchema, isAgentBridgeMethodExposed, isAgentBridgeModuleExposed, isAgentBridgeModuleName, listAgentBridgeMethods, listAgentBridgeModules, resolveAgentBridgeExposeConfig };
6788
+ export { AGENT_BRIDGE_API_METADATA, type AGENT_BRIDGE_PROTOCOL_VERSION, API_MODULE_KEYS, type AgentBridgeActiveStream, type AgentBridgeBusinessProgramManifest, type AgentBridgeBusinessProgramPermissionMode, type AgentBridgeCancelProgramRequest, type AgentBridgeCancelProgramRequestPayload, type AgentBridgeCatalogRequestPayload, type AgentBridgeErrorCode, type AgentBridgeExposeConfig, type AgentBridgeHeartbeatPayload, type AgentBridgeInboundMessage, type AgentBridgeInvokeRequest, type AgentBridgeInvokeRequestPayload, type AgentBridgeLoadProgramRequest, type AgentBridgeLoadProgramRequestPayload, type AgentBridgeMessageEnvelope, type AgentBridgeMessageType, type AgentBridgeMethodCatalogItem, type AgentBridgeMethodResponseMode, type AgentBridgeMethodSchemaMetadata, type AgentBridgeMethodSideEffect, type AgentBridgeModuleCatalogItem, type AgentBridgeOperationResult, type AgentBridgeOutboundMessage, type AgentBridgeProgramEventPayload, type AgentBridgeReconnectOptions, type AgentBridgeRegisterPayload, type AgentBridgeResultPayload, type AgentBridgeRuntimeAdapter, type AgentBridgeRuntimeEngineSnapshot, type AgentBridgeRuntimeFactoryOptions, type AgentBridgeRuntimeSnapshot, type AgentBridgeSchemaEnumOption, type AgentBridgeSchemaField, type AgentBridgeSchemaFieldType, type AgentBridgeSchemaRequestPayload, type AgentBridgeSocket, type AgentBridgeSocketFactory, type AgentBridgeStartProgramRequest, type AgentBridgeStartProgramRequestPayload, type AgentBridgeStreamCloseRequest, type AgentBridgeStreamCloseRequestPayload, type AgentBridgeStreamCloseResult, type AgentBridgeStreamEventListener, type AgentBridgeStreamEventPayload, type AgentBridgeStreamStartRequest, type AgentBridgeStreamStartRequestPayload, type AgentBridgeStreamStartResult, type AgentBridgeStreamTerminalReason, type AgentBridgeStructuredError, type AgentBridgeUnregisterPayload, type AgentBridgeValidateAction, type AgentBridgeValidateActionItem, type AgentBridgeValidateActionsRequest, type AgentBridgeValidateActionsRequestPayload, type AgentBridgeValidateActionsResult, AgentRuntimeBridge, type AgentRuntimeBridgeDependencies, Animation, type AnimationGetLengthRequest, type AnimationPlayRequest, type AnimationSetSpeedRequest, type AnimationStartLoopRequest, type AnimationStopLoopRequest, type AnimationStopRequest, type ApiCallback, type ApiFacade, type ApiInstanceMap, type ApiModuleFactory, type ApiModuleKey, type ApiRegistry, type ApiRegistryContext, ApiRegistryError, type ApiRequestEnvelope, type ApiResponseEnvelope, type AuthErrorInfo, type AuthSessionSnapshot, type AuthWorkflowState, BuildingFloor, type BuildingFloorCancelOptions, type BuildingFloorDependencies, BuildingFloorError, type BuildingFloorErrorCode, type BuildingFloorFocusMode, type BuildingFloorInput, type BuildingFloorItem, type BuildingFloorOverview, type BuildingFloorOverviewOptions, type BuildingFloorRegistration, type BuildingFloorRegistrationResult, type BuildingFloorRuntimeOptions, type BuildingFloorRuntimeStatus, type BuildingFloorState, type BuildingFloorStateOptions, type BuildingFloorSwitchOptions, type BuildingFloorTransitionResult, type BuildingFloorTransitionStatus, type BuildingFloorViewPoint, Camera, type CameraFlyByPathRequest, type CameraFlyToTargetRequest, type CameraLookAtRequest, type CameraObjFollowRequest, type CameraSetFlySpeedRequest, type CameraSetFovRequest, type CameraSetPositionAndRotationRequest, type CenterConnectResult, type CenterEnvelope, type CenterServiceInfo, type CenterTokenAuthorizeResult, Connect, DTCEngine, type DTCEngineAgentBridgeOptions, Dlss, DlssQuality, type DlssSetEnableRequest, type DlssSetQualityRequest, type EngineConfig, type EngineLogLevel, type EngineStatusInfo, type EngineViewMode, type FeatureToggleRequest, FilterMode, type GetWeatherTypeRequest, HeatMap, type HeatMapConfigRequest, type HeatMapCreateRequest, type HeatMapPointRequest, type HeatMapRemoveRequest, HighLighterEffect, type HighLighterEnableRequest, type HighLighterRemoveHighLightModelRequest, type HighLighterSetHighLightModelRequest, Layer, type LayerAddRequest, type LayerChildElementRequest, LayerEnum, type LayerModelAddRequest, type LayerModelRemoveRequest, type LayerPOIAddRequest, type LayerSelectorRequest, type LayerShowUIPopRequest, type LayerSwitchModelRequest, Model, type ModelAddRequest, type ModelBoundsRequest, ModelPOI, type ModelPOIAddRequest, type ModelPOIDeleteByGroupRequest, type ModelPOIDeleteByIdRequest, type ModelPOIGetInfoRequest, type ModelPOIUpdateRequest, type ModelPOIVisibleByGroupRequest, type ModelRemoveRequest, type ModelSelectorRequest, type ModelSetVisibleByAttributeRequest, type ModelSetVisibleByTagsRequest, type ModelSetVisibleRequest, ModelTransform, type ModelTransformNodeRequest, type ModelTransformRestoreRequest, type ModelTransformRotateByTargetRequest, type ModelTransformRotateRequest, type ModelTransformScaleRequest, type ModelTransformStartMoveRequest, ModelTransformType, Navigation, type NavigationMeshNavRequest, type NavigationNavByPathRequest, type NavigationNodeRequest, type NavigationUpdateMeshNavRequest, type NavigationUpdateNavPathRequest, type NavigationUpdateSpeedRequest, type NetworkAdaptationActionResult, type NetworkAdaptationActionStep, type NetworkAdaptationActionType, type NetworkAdaptationLevel, type NetworkAdaptationMode, type NetworkAdaptationState, type NetworkDecisionTrace, type NetworkDiagnosticsSnapshot, type NetworkMetricsSnapshot, PathPatrol, type PathPatrolAddRequest, type PathPatrolNodeRequest, type PathPatrolSetTimeNodeRequest, type PathPatrolUpdateRequest, PendingValidationSchemaMap, PointIcon, type PointIconIdsInput, type PointIconIdsRequest, type PointIconVisibilityResult, Popup, type PopupAddRequest, type PopupDelayRequest, type PopupItemRequest, type PopupRemoveRequest, type PopupShowDistanceRequest, type PopupShowRequest, type PopupSyncInfoRequest, type QOS_EVENT_NAMES, type QosEvent, type QosEventName, type QosLevel, type QosReportingPayload, type QosRuntimeContext, type QosSessionContext, type QosStage, type QosStatus, type QosWarnErrorSummary, type ResolvedEngineConfig, SDKValidationError, Scene, type SceneListenCompassRequest, type SceneSwitchRequest, Screen, ScreenRenderBitratePreset, ScreenRenderBitratePresetOptions, type ScreenRenderBitratePresetValueMap, type ScreenSetSceneFPSRequest, type ScreenSetSceneRenderBitrateRequest, type ScreenSetScreenResolutionRequest, type ScreenSetVideoDecodeRequest, Season, type SignallingAllocateResponse, SpatialQuery, type SpatialQueryLayerByModelBoxRequest, type SpatialQueryLayerByModelRequest, type SpatialQueryLayerByPositionRequest, type StandardResponse, TimeLine, type TimeSerialNode, type TimelineNodeRequest, type TimelinePlayRequest, type TimelineSetSpeedRequest, type TimelineStopRequest, UIPOI, type UIPOIAddRequest, type UIPOIDeleteByGroupRequest, type UIPOIDeleteByIdRequest, type UIPOIEnableOverlapRequest, type UIPOIShowDistanceRequest, type UIPOIUpdateRequest, type UIPOIUpdateStateRequest, type Vector2Input, type Vector2JsonInput, type Vector3Input, type Vector3JsonInput, VideoCodeType, type WeatherChangeSeasonRequest, type WeatherOpenCameraFogRequest, type WeatherSetAnimateTimeOfDayRequest, type WeatherSetDayAndNightRequest, type WeatherSetSceneTimeRequest, type WeatherSetTimeSyncRequest, WeatherSystem, type WeatherTypeRequest, WebView, type WebViewUpdateRequest, apiRegistry, createAgentBridgeMetadata, createApiFacade, createBridgeRuntime, getAgentBridgeMethodSchema, isAgentBridgeMethodExposed, isAgentBridgeModuleExposed, isAgentBridgeModuleName, listAgentBridgeMethods, listAgentBridgeModules, resolveAgentBridgeExposeConfig };