@mearl/client 2.22.0 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +43 -52
  3. package/dist/actionTimeouts.js +1 -1
  4. package/dist/artifacts.d.ts +1 -1
  5. package/dist/autoUpdate.js +1 -2
  6. package/dist/browserRegistry.d.ts +1 -1
  7. package/dist/check.d.ts +1 -1
  8. package/dist/check.js +4 -3
  9. package/dist/commands.d.ts +12 -12
  10. package/dist/commands.js +15 -14
  11. package/dist/index.d.ts +4 -7
  12. package/dist/index.js +1 -1
  13. package/dist/local.d.ts +3 -1
  14. package/dist/local.js +2 -1
  15. package/dist/nativeHost.d.ts +2 -2
  16. package/dist/nativeHost.js +2 -4
  17. package/dist/pageEvalArguments.d.ts +1 -1
  18. package/dist/pageEvalArguments.js +1 -1
  19. package/dist/plugin.d.ts +1 -0
  20. package/dist/plugin.js +1 -0
  21. package/dist/pluginModelSessionWorker.d.ts +2 -2
  22. package/dist/plugins/clients/pluginHostConnection.d.ts +1 -1
  23. package/dist/plugins/clients/pluginHostConnection.js +1 -1
  24. package/dist/plugins/clients/pluginModels.d.ts +3 -3
  25. package/dist/plugins/clients/pluginPages.d.ts +2 -2
  26. package/dist/plugins/clients/pluginState.d.ts +2 -2
  27. package/dist/plugins/clients/pluginTasks.d.ts +3 -3
  28. package/dist/plugins/clients/pluginTasks.js +1 -1
  29. package/dist/plugins/officialPluginCatalog.d.ts +18 -21
  30. package/dist/plugins/officialPluginCatalog.js +120 -24
  31. package/dist/plugins/officialPluginInstaller.js +6 -1
  32. package/dist/plugins/pluginRegistry.d.ts +1 -1
  33. package/dist/plugins/pluginRegistry.js +2 -2
  34. package/dist/plugins/pluginTaskProtocol.d.ts +1 -1
  35. package/dist/plugins/runtime/pluginDiagnostics.d.ts +3 -3
  36. package/dist/plugins/runtime/pluginDiagnostics.js +2 -2
  37. package/dist/plugins/runtime/pluginExecution.d.ts +2 -2
  38. package/dist/plugins/runtime/pluginExecutor.d.ts +1 -1
  39. package/dist/plugins/runtime/pluginExecutorProtocol.d.ts +2 -2
  40. package/dist/plugins/runtime/pluginHost.d.ts +2 -2
  41. package/dist/plugins/runtime/pluginHostServer.js +1 -1
  42. package/dist/plugins/runtime/pluginModelCatalog.d.ts +1 -1
  43. package/dist/plugins/runtime/pluginPageManager.d.ts +3 -3
  44. package/dist/plugins/runtime/pluginPageManager.js +2 -2
  45. package/dist/plugins/runtime/pluginRevision.js +2 -1
  46. package/dist/plugins/runtime/pluginStateManager.d.ts +1 -1
  47. package/dist/plugins/runtime/pluginStateStore.d.ts +1 -1
  48. package/dist/plugins/runtime/pluginTaskManager.d.ts +10 -10
  49. package/dist/plugins/runtime/pluginTaskManager.js +1 -1
  50. package/dist/plugins/runtime/pluginTaskStore.d.ts +3 -3
  51. package/dist/plugins/runtime/pluginTaskStore.js +1 -1
  52. package/dist/plugins/runtime/pythonPlugin.d.ts +1 -1
  53. package/dist/plugins/sdk/plugin.d.ts +9 -12
  54. package/dist/plugins/sdk/plugin.js +4 -7
  55. package/dist/plugins/sdk/pluginAppProfiles.d.ts +1 -1
  56. package/dist/plugins/sdk/pluginAppProfiles.js +1 -1
  57. package/dist/plugins/sdk/pluginModelDefinition.d.ts +1 -1
  58. package/dist/plugins/sdk/pluginPageDefinition.d.ts +1 -1
  59. package/dist/plugins/sdk/pluginPageDefinition.js +1 -1
  60. package/dist/plugins/sdk/pluginRecoveryDefinition.d.ts +1 -1
  61. package/dist/plugins/sdk/pluginStateDefinition.d.ts +2 -2
  62. package/dist/plugins/skillManifest.d.ts +10 -0
  63. package/dist/plugins/skillManifest.js +56 -0
  64. package/dist/socket.d.ts +2 -0
  65. package/dist/socket.js +13 -3
  66. package/dist/unified.d.ts +1 -1
  67. package/dist/unified.js +1 -1
  68. package/package.json +14 -8
  69. package/dist/generated/app-profile-definition.d.ts +0 -130
  70. package/dist/generated/app-profile-definition.js +0 -458
  71. package/dist/generated/app-profile-runtime-types.d.ts +0 -213
  72. package/dist/generated/app-profile-runtime-types.js +0 -1
  73. package/dist/generated/browser-action-protocol.d.ts +0 -1147
  74. package/dist/generated/browser-action-protocol.js +0 -283
  75. package/dist/generated/plugin-diagnostics.d.ts +0 -110
  76. package/dist/generated/plugin-diagnostics.js +0 -1
  77. package/dist/generated/plugin-execution.d.ts +0 -27
  78. package/dist/generated/plugin-execution.js +0 -1
  79. package/dist/generated/plugin-models.d.ts +0 -64
  80. package/dist/generated/plugin-models.js +0 -1
  81. package/dist/generated/plugin-pages.d.ts +0 -76
  82. package/dist/generated/plugin-pages.js +0 -59
  83. package/dist/generated/plugin-recovery.d.ts +0 -32
  84. package/dist/generated/plugin-recovery.js +0 -1
  85. package/dist/generated/plugin-state.d.ts +0 -50
  86. package/dist/generated/plugin-state.js +0 -1
  87. package/dist/generated/plugin-tasks.d.ts +0 -74
  88. package/dist/generated/plugin-tasks.js +0 -7
  89. package/dist/generated/toolbox-icon.d.ts +0 -10
  90. package/dist/generated/toolbox-icon.js +0 -37
@@ -1,213 +0,0 @@
1
- import type { AppProfileBinding, AppProfilePolicies, AppProfileSetting } from './app-profile-definition.js';
2
- import type { BrowserDevicePresetName } from './browser-action-protocol.js';
3
- type DeviceCutout = 'none' | 'dynamic-island' | 'notch' | 'side-camera';
4
- /** 桥调用风格,与页面适配器使用的端内调用约定一一对应。 */
5
- export type AppBridgeStyle = 'windvane' | 'fliggy' | 'alipay' | 'callback' | 'btrip' | 'invoke' | 'callHandler' | 'amap' | 'didi' | 'easybikeNative' | 'mega' | 'wechat' | 'wechatMiniProgram';
6
- export interface AppBridgeSpec {
7
- global: string;
8
- style: AppBridgeStyle;
9
- /** 页面脚本重设全局对象时仍保留桥叶子,同时接纳页面对象上的其他 API。 */
10
- persistent?: boolean;
11
- }
12
- export type AppBridgeBehavior = 'navigate' | 'closeAll' | 'closeBackData' | 'postMessage' | 'notifySubscribe' | 'notifyUnsubscribe' | 'notifyPost' | 'sharedFileRead' | 'sharedFileWrite' | 'sharedDataGet' | 'sharedDataSet' | 'legacyBroadcastCreate' | 'legacyBroadcastPost' | 'legacyBroadcastClose' | 'memoryGet' | 'memorySet' | 'memoryDelete' | 'availabilityMap' | 'userInfo' | 'authCode' | 'networkInfo' | 'geolocation' | 'permission' | 'imagePicker' | 'prefetch' | 'fptTrack' | 'mtopStream' | 'previewFile' | 'toast' | 'unsupportedNativeInput' | 'payment' | 'userTrack' | 'calendar' | 'networkQualityMonitor' | 'beaconRequest' | 'voiceRecognition';
13
- /** 桥方法名到标准化动作的映射。WindVane 风格使用 `Class.method`,其余使用 api 名。 */
14
- export interface BridgeActionMap {
15
- open: string[];
16
- close: string[];
17
- title: string[];
18
- navigationBar?: string[];
19
- statusBar?: string[];
20
- systemInfo: string[];
21
- mtop: string[];
22
- kvGet?: string[];
23
- kvSet?: string[];
24
- kvDelete?: string[];
25
- pageContext?: string[];
26
- responses?: Record<string, unknown>;
27
- behaviors?: Record<string, AppBridgeBehavior>;
28
- noop: string[];
29
- silent?: string[];
30
- }
31
- export interface AppSchemeRule {
32
- match: string;
33
- /** 规则仅在目标或当前页面 host 命中这些根域时生效。 */
34
- hostSuffixes?: string[];
35
- param?: string;
36
- /** 将参数解出的 H5 地址保留 path/query/hash,并投影到当前页面 origin。 */
37
- useCurrentOrigin?: boolean;
38
- targetPath?: string;
39
- targetHostPrefix?: string;
40
- targetParams?: Record<string, string>;
41
- }
42
- export interface AppMiniProgramPaymentRoute {
43
- /** 小程序支付中转页 pathname。 */
44
- pathname: string;
45
- /** 限制业务根域,避免同名小程序路由被其他项目接管。 */
46
- hostSuffixes?: string[];
47
- /** JSON 字符串形式的支付桥入参。 */
48
- paymentParamsParam: string;
49
- /** 按顺序读取的支付成功回跳参数,前者为空时使用后者。 */
50
- successUrlParams: string[];
51
- /** 按顺序读取的支付失败或取消回跳参数。 */
52
- failureUrlParams: string[];
53
- /** 支付成功结果写入回跳 URL 的参数名。 */
54
- successResultParam?: string;
55
- /** 从支付页路由透传到回跳 URL 的默认参数。 */
56
- forwardParams?: string[];
57
- /** 将回跳 H5 的 path/query/hash 投影到当前页面 origin。 */
58
- useCurrentOrigin?: boolean;
59
- }
60
- export type AppMiniProgramMessageAction = 'stageBackData' | 'closeAll';
61
- export interface AppMiniProgramMessageRule {
62
- /** H5 通过 wx.miniProgram.postMessage 发送的 type。 */
63
- type: string;
64
- /** 容器只提供有限的页面栈动作,业务消息名由档案映射。 */
65
- action: AppMiniProgramMessageAction;
66
- /** 限制发送消息的 H5 根域。 */
67
- hostSuffixes?: string[];
68
- }
69
- export type AppMiniProgramNativeAction = 'navigateMiniProgram' | 'subscribeMessage';
70
- export interface AppMiniProgramNativeRoute {
71
- /** 承接微信原生能力的小程序页面 pathname。 */
72
- pathname: string;
73
- /** 该页面允许模拟的固定原生动作,动作名读取 URL 的 action 参数。 */
74
- actions: AppMiniProgramNativeAction[];
75
- /** 限制业务根域,避免其他小程序的同名页面被接管。 */
76
- hostSuffixes?: string[];
77
- }
78
- /** 微信小程序容器相关规则统一收口,避免为每种业务页增加顶层配置。 */
79
- export interface AppMiniProgramConfig {
80
- paymentRoutes?: AppMiniProgramPaymentRoute[];
81
- nativeRoutes?: AppMiniProgramNativeRoute[];
82
- messageRules?: AppMiniProgramMessageRule[];
83
- }
84
- export interface AppImagePickerConfig {
85
- schemes: string[];
86
- api: string;
87
- version: string;
88
- fcId: string;
89
- fcGroup: string;
90
- uploadUrlFunction: string;
91
- prefix: string;
92
- region: string;
93
- }
94
- export interface AppOverlayConfig {
95
- /** 半弹层最大 CSS 像素宽度,仍受所在视口和 maxWidth 比例参数约束。 */
96
- maxWidthPx?: number;
97
- /** 最大宽度限制开始生效的客户端版本,未设置时适用于所有版本。 */
98
- maxWidthMinAppVersion?: string;
99
- enabledParam: string;
100
- topRatioParam: string;
101
- /** 弹层高度占屏比例参数,与 topRatioParam 二选一即可。 */
102
- heightRatioParam?: string;
103
- radiusParam: string;
104
- maskAlphaParam: string;
105
- tapCloseParam: string;
106
- /** 蒙层关闭时优先触发当前 WebView 内的关闭控件,以复用页面定义的回传逻辑。 */
107
- tapCloseSelectors?: string[];
108
- /** 蒙层点击只退出当前 WebView,不调用页面关闭控件或打开回调。 */
109
- silentTapClose?: boolean;
110
- defaultTopRatio: number;
111
- defaultRadius: number;
112
- defaultMaskAlpha: number;
113
- defaultTapClose: boolean;
114
- }
115
- export interface AppNativeBackConfig {
116
- /** 原生返回键触发的 document 事件。 */
117
- event?: string;
118
- /** 返回 true 时由页面接管返回,再分发 event。 */
119
- controlFunction?: string;
120
- /** 原生返回键直接调用的 window 函数。 */
121
- handler?: string;
122
- }
123
- export interface AppLayerUrlProxyConfig {
124
- sourceHostPrefix: string;
125
- pathPrefix: string;
126
- targetHostSuffixes: string[];
127
- defaultTargetHost?: string;
128
- }
129
- export interface AppTitleBarConfig {
130
- navigationBarHeight: number;
131
- backgroundColor: string;
132
- textColor: string;
133
- hiddenPathnames?: string[];
134
- statusBarBackgroundColors?: Record<string, string>;
135
- hostStyles?: AppTitleBarHostStyle[];
136
- }
137
- export interface AppTitleBarHostStyle {
138
- /** 同时匹配该 host 与其全部子域,配置值不含前导点。 */
139
- hostSuffix: string;
140
- titleBarBackgroundColor?: string;
141
- statusBarBackgroundColor?: string;
142
- }
143
- export interface AppSafeAreaInsets {
144
- top: number;
145
- right: number;
146
- bottom: number;
147
- left: number;
148
- }
149
- /** App 运行时使用的设备外观快照,避免通过机型字符串反推物理特征。 */
150
- export interface AppDeviceAppearance {
151
- preset: BrowserDevicePresetName;
152
- orientation: 'portrait' | 'landscape';
153
- cutout: DeviceCutout;
154
- }
155
- export interface AppRootContainerCookie {
156
- name: string;
157
- value: string;
158
- domain?: string;
159
- path?: string;
160
- }
161
- export interface AppRootContainerConfig {
162
- enabled: boolean;
163
- initialCookies?: AppRootContainerCookie[];
164
- /** 横屏设备外壳中保留根页面,并将后续业务 WebView 呈现在右半屏。 */
165
- splitScreen?: boolean;
166
- }
167
- /** 注入页内的运行时配置,可经 Server-Timing 或 CDP new-document 脚本传输。 */
168
- export interface InjectedAppProfileConfig {
169
- binding?: AppProfileBinding;
170
- policies?: AppProfilePolicies;
171
- settings?: AppProfileSetting[];
172
- profile: string;
173
- label: string;
174
- globals: Record<string, string>;
175
- bridges: AppBridgeSpec[];
176
- activeEvents: string[];
177
- maxTouchPoints: number;
178
- statusBarHeight: number;
179
- safeAreaInsets?: AppSafeAreaInsets;
180
- /** 可选,以兼容未携带设备外观快照的持久化配置。 */
181
- deviceAppearance?: AppDeviceAppearance;
182
- userAgent: string;
183
- navigatorPlatform: string;
184
- platform: string;
185
- systemVersion: string;
186
- clientType: string;
187
- language: string;
188
- actions: BridgeActionMap;
189
- schemes: AppSchemeRule[];
190
- miniProgram?: AppMiniProgramConfig;
191
- imagePicker?: AppImagePickerConfig;
192
- /** 原生定位返回地址时使用的逆地理编码服务,复用容器的 MTop 传输。 */
193
- geolocation?: {
194
- reverseGeocodeApi: string;
195
- version: string;
196
- };
197
- overlay?: AppOverlayConfig;
198
- /** URL 参数为真时以新 WebView 替换当前业务层。 */
199
- popBeforeOpenParam?: string;
200
- /** 跨 WebView 消息抵达 opener 时分发的 document 事件。 */
201
- messageEvent?: string;
202
- nativeBack?: AppNativeBackConfig;
203
- layerUrlProxy?: AppLayerUrlProxyConfig;
204
- urlSyncHostSuffixes?: string[];
205
- animationMs?: number;
206
- forceH5Mtop?: boolean;
207
- titleBar?: AppTitleBarConfig;
208
- rootContainer?: AppRootContainerConfig;
209
- simulateSystemBars?: boolean;
210
- /** 物理状态栏与底部操作区由独立设备运行时渲染;本运行时只保留客户端导航栏。 */
211
- externalDeviceChrome?: boolean;
212
- }
213
- export {};
@@ -1 +0,0 @@
1
- export {};