@chatbi-v/core 3.0.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{adapter → adapters}/index.cjs +12 -8
- package/dist/{adapter → adapters}/index.mjs +1 -1
- package/dist/chunk-6ZN23KJA.mjs +60 -0
- package/dist/chunk-AAKBSVX6.mjs +220 -0
- package/dist/{chunk-BOR237QK.mjs → chunk-K6BVKKI6.mjs} +8 -4
- package/dist/index.cjs +510 -214
- package/dist/index.d.cts +32 -1160
- package/dist/index.d.ts +32 -1160
- package/dist/index.mjs +493 -405
- package/dist/manifest/index.cjs +253 -0
- package/dist/manifest/index.d.cts +56 -0
- package/dist/manifest/index.d.ts +56 -0
- package/dist/manifest/index.mjs +20 -0
- package/dist/plugin-port-CHRPxDOi.d.cts +1092 -0
- package/dist/plugin-port-CHRPxDOi.d.ts +1092 -0
- package/dist/semver/index.cjs +449 -0
- package/dist/semver/index.d.cts +192 -0
- package/dist/semver/index.d.ts +192 -0
- package/dist/semver/index.mjs +355 -0
- package/package.json +21 -9
- /package/dist/{adapter → adapters}/index.d.cts +0 -0
- /package/dist/{adapter → adapters}/index.d.ts +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,1098 +1,12 @@
|
|
|
1
|
+
import { S as StoragePort, a as StorageItemSchema, P as Plugin, b as PluginContext, c as PluginManifest, d as PluginCapabilities, e as SlotPosition, f as PluginExtension, R as RouteConfig, A as ApiAdapter, g as ApiRequestConfig, h as StreamCallbacks, i as ApiEndpointConfig, j as ApiInterceptor, k as ApiConfig, l as RequestOptions, D as Dependency } from './plugin-port-CHRPxDOi.cjs';
|
|
2
|
+
export { F as ApiPort, y as ApiResponseContext, M as BasePlugin, Q as Command, U as CommandHandler, V as CommandType, W as Compatibility, a4 as EXTENSION_TYPES, X as Entry, E as ErrorStrategy, z as EventBusPort, Y as Extension, Z as ExtensionType, _ as HookType, H as HttpMethod, $ as OnActivateHandler, a0 as OnDeactivateHandler, a1 as OnErrorHandler, B as PLUGIN_TYPES, m as Permission, n as PermissionAction, o as PermissionScope, p as PermissionType, J as PluginConfigItem, u as PluginId, v as PluginIdSchema, L as PluginLifecycle, a3 as PluginManifestSchema, O as PluginMetadata, K as PluginStorage, C as PluginType, a5 as RENDER_MODES, a2 as RenderMode, G as Slot, w as SlotKey, x as SlotKeySchema, I as SlotType, T as TypedStorage, q as createPluginId, r as createSlotKey, N as definePlugin, s as isPluginId, t as isSlotKey } from './plugin-port-CHRPxDOi.cjs';
|
|
1
3
|
import { z } from 'zod';
|
|
2
|
-
import * as
|
|
4
|
+
import * as zustand_vanilla from 'zustand/vanilla';
|
|
3
5
|
import * as zustand_middleware from 'zustand/middleware';
|
|
4
|
-
export {
|
|
6
|
+
export { ValidationResult, assertManifest, extractManifestFromPlugin, normalizePluginManifest, validateManifest } from './manifest/index.cjs';
|
|
7
|
+
export { AdapterFactory, AdapterRegistry, AdapterState, AdapterStatus, BaseAdapter, TransformOptions, UIAdapter, adapterRegistry } from './adapters/index.cjs';
|
|
5
8
|
import dayjs from 'dayjs';
|
|
6
9
|
|
|
7
|
-
/**
|
|
8
|
-
* @file branded.ts
|
|
9
|
-
* @description 品牌类型 (Branded Types) - 用于创建防错的标识符类型
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 创建品牌类型的工具类型
|
|
14
|
-
* @description 使用 string literal type 作为 Brand,实现编译时类型区分
|
|
15
|
-
*/
|
|
16
|
-
type brand<T, Brand extends string> = T & {
|
|
17
|
-
__brand: Brand;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* PluginId 品牌类型
|
|
21
|
-
* @description 用于标识插件的唯一 ID,通过编译时类型防止字符串类型混淆
|
|
22
|
-
*/
|
|
23
|
-
type PluginId = brand<string, 'PluginId'>;
|
|
24
|
-
/**
|
|
25
|
-
* SlotKey 品牌类型
|
|
26
|
-
* @description 用于标识插槽位置的唯一键,通过编译时类型防止字符串类型混淆
|
|
27
|
-
*/
|
|
28
|
-
type SlotKey = brand<string, 'SlotKey'>;
|
|
29
|
-
/**
|
|
30
|
-
* PluginId 的 Zod 验证 Schema
|
|
31
|
-
*/
|
|
32
|
-
declare const PluginIdSchema: z.ZodString;
|
|
33
|
-
/**
|
|
34
|
-
* SlotKey 的 Zod 验证 Schema
|
|
35
|
-
*/
|
|
36
|
-
declare const SlotKeySchema: z.ZodString;
|
|
37
|
-
/**
|
|
38
|
-
* 创建类型安全的 PluginId
|
|
39
|
-
* @param id - 插件 ID 字符串
|
|
40
|
-
* @returns 带品牌标记的 PluginId 类型
|
|
41
|
-
*/
|
|
42
|
-
declare function createPluginId(id: string): PluginId;
|
|
43
|
-
/**
|
|
44
|
-
* 创建类型安全的 SlotKey
|
|
45
|
-
* @param key - 插槽键字符串
|
|
46
|
-
* @returns 带品牌标记的 SlotKey 类型
|
|
47
|
-
*/
|
|
48
|
-
declare function createSlotKey(key: string): SlotKey;
|
|
49
|
-
/**
|
|
50
|
-
* 类型守卫:检查是否为有效的 PluginId
|
|
51
|
-
* @param value - 要检查的值
|
|
52
|
-
* @returns 是否为 PluginId 类型
|
|
53
|
-
*/
|
|
54
|
-
declare function isPluginId(value: unknown): value is PluginId;
|
|
55
|
-
/**
|
|
56
|
-
* 类型守卫:检查是否为有效的 SlotKey
|
|
57
|
-
* @param value - 要检查的值
|
|
58
|
-
* @returns 是否为 SlotKey 类型
|
|
59
|
-
*/
|
|
60
|
-
declare function isSlotKey(value: unknown): value is SlotKey;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Plugin Manifest Schema 定义
|
|
64
|
-
* @description 使用 Zod 定义声明式插件元数据 Schema,支持扩展点声明
|
|
65
|
-
*/
|
|
66
|
-
|
|
67
|
-
/** 扩展点类型 */
|
|
68
|
-
declare const EXTENSION_TYPES: readonly ["slot", "hook", "command", "service"];
|
|
69
|
-
type ExtensionType = typeof EXTENSION_TYPES[number];
|
|
70
|
-
/**
|
|
71
|
-
* 扩展点渲染模式
|
|
72
|
-
* @description 定义插槽内容的渲染方式
|
|
73
|
-
*/
|
|
74
|
-
declare const RENDER_MODES: readonly ["replace", "append", "prepend"];
|
|
75
|
-
type RenderMode = typeof RENDER_MODES[number];
|
|
76
|
-
/**
|
|
77
|
-
* 扩展点 Schema
|
|
78
|
-
* @description 定义插件提供的扩展能力
|
|
79
|
-
*/
|
|
80
|
-
declare const ExtensionSchema: z.ZodObject<{
|
|
81
|
-
/** 扩展点名称/标识符 */
|
|
82
|
-
name: z.ZodString;
|
|
83
|
-
/** 扩展点类型 */
|
|
84
|
-
type: z.ZodEnum<["slot", "hook", "command", "service"]>;
|
|
85
|
-
/** 扩展点描述 */
|
|
86
|
-
description: z.ZodOptional<z.ZodString>;
|
|
87
|
-
/** 对于 slot 类型,指定插槽位置 */
|
|
88
|
-
slot: z.ZodOptional<z.ZodString>;
|
|
89
|
-
/** 扩展点的配置选项 */
|
|
90
|
-
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
91
|
-
/**
|
|
92
|
-
* 渲染模式
|
|
93
|
-
* @description 定义插槽内容的渲染方式:replace(替换)、append(追加)、prepend(前置)
|
|
94
|
-
*/
|
|
95
|
-
renderMode: z.ZodOptional<z.ZodEnum<["replace", "append", "prepend"]>>;
|
|
96
|
-
/**
|
|
97
|
-
* 条件渲染配置
|
|
98
|
-
* @description 用于条件渲染,如 requiresAuth: true 表示需要认证
|
|
99
|
-
*/
|
|
100
|
-
condition: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
101
|
-
}, "strip", z.ZodTypeAny, {
|
|
102
|
-
name: string;
|
|
103
|
-
type: "slot" | "hook" | "command" | "service";
|
|
104
|
-
slot?: string | undefined;
|
|
105
|
-
description?: string | undefined;
|
|
106
|
-
config?: Record<string, any> | undefined;
|
|
107
|
-
renderMode?: "replace" | "append" | "prepend" | undefined;
|
|
108
|
-
condition?: Record<string, any> | undefined;
|
|
109
|
-
}, {
|
|
110
|
-
name: string;
|
|
111
|
-
type: "slot" | "hook" | "command" | "service";
|
|
112
|
-
slot?: string | undefined;
|
|
113
|
-
description?: string | undefined;
|
|
114
|
-
config?: Record<string, any> | undefined;
|
|
115
|
-
renderMode?: "replace" | "append" | "prepend" | undefined;
|
|
116
|
-
condition?: Record<string, any> | undefined;
|
|
117
|
-
}>;
|
|
118
|
-
/**
|
|
119
|
-
* 依赖项 Schema
|
|
120
|
-
* @description 定义插件依赖的其他插件
|
|
121
|
-
*/
|
|
122
|
-
declare const DependencySchema: z.ZodObject<{
|
|
123
|
-
/** 依赖插件 ID */
|
|
124
|
-
id: z.ZodString;
|
|
125
|
-
/** 依赖版本范围 (SemVer) */
|
|
126
|
-
version: z.ZodString;
|
|
127
|
-
/** 是否为可选依赖 */
|
|
128
|
-
optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
129
|
-
}, "strip", z.ZodTypeAny, {
|
|
130
|
-
id: string;
|
|
131
|
-
version: string;
|
|
132
|
-
optional: boolean;
|
|
133
|
-
}, {
|
|
134
|
-
id: string;
|
|
135
|
-
version: string;
|
|
136
|
-
optional?: boolean | undefined;
|
|
137
|
-
}>;
|
|
138
|
-
/** 插件类型 */
|
|
139
|
-
declare const PLUGIN_TYPES: readonly ["business", "functional", "view", "theme", "renderer", "system"];
|
|
140
|
-
type PluginType = typeof PLUGIN_TYPES[number];
|
|
141
|
-
/**
|
|
142
|
-
* 入口点 Schema
|
|
143
|
-
* @description 定义插件入口文件位置
|
|
144
|
-
*/
|
|
145
|
-
declare const EntrySchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
146
|
-
/** 入口文件 URL */
|
|
147
|
-
url: z.ZodString;
|
|
148
|
-
/** 共享作用域 (用于模块联邦) */
|
|
149
|
-
shareScope: z.ZodOptional<z.ZodString>;
|
|
150
|
-
}, "strip", z.ZodTypeAny, {
|
|
151
|
-
url: string;
|
|
152
|
-
shareScope?: string | undefined;
|
|
153
|
-
}, {
|
|
154
|
-
url: string;
|
|
155
|
-
shareScope?: string | undefined;
|
|
156
|
-
}>]>;
|
|
157
|
-
/**
|
|
158
|
-
* 兼容性 Schema
|
|
159
|
-
* @description 定义插件兼容的宿主环境版本
|
|
160
|
-
*/
|
|
161
|
-
declare const CompatibilitySchema: z.ZodObject<{
|
|
162
|
-
/** 最低宿主版本 */
|
|
163
|
-
minVersion: z.ZodOptional<z.ZodString>;
|
|
164
|
-
/** 最高宿主版本 */
|
|
165
|
-
maxVersion: z.ZodOptional<z.ZodString>;
|
|
166
|
-
/** 兼容的宿主版本列表 */
|
|
167
|
-
supportedVersions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
168
|
-
}, "strip", z.ZodTypeAny, {
|
|
169
|
-
minVersion?: string | undefined;
|
|
170
|
-
maxVersion?: string | undefined;
|
|
171
|
-
supportedVersions?: string[] | undefined;
|
|
172
|
-
}, {
|
|
173
|
-
minVersion?: string | undefined;
|
|
174
|
-
maxVersion?: string | undefined;
|
|
175
|
-
supportedVersions?: string[] | undefined;
|
|
176
|
-
}>;
|
|
177
|
-
/** 权限动作类型 */
|
|
178
|
-
declare const PERMISSION_ACTIONS: readonly ["read", "write", "execute", "admin"];
|
|
179
|
-
type PermissionAction = typeof PERMISSION_ACTIONS[number];
|
|
180
|
-
/** 权限作用域类型 */
|
|
181
|
-
declare const PERMISSION_SCOPES: readonly ["plugin", "global", "user"];
|
|
182
|
-
type PermissionScope = typeof PERMISSION_SCOPES[number];
|
|
183
|
-
/**
|
|
184
|
-
* Plugin Manifest Schema - 声明式插件元数据
|
|
185
|
-
* @description 定义插件的静态属性,用于插件市场展示、权限校验和内核加载
|
|
186
|
-
*/
|
|
187
|
-
declare const PluginManifestSchema: z.ZodObject<{
|
|
188
|
-
/** 插件唯一 ID (推荐反向域名格式) */
|
|
189
|
-
id: z.ZodString;
|
|
190
|
-
/** 插件版本号 (SemVer) */
|
|
191
|
-
version: z.ZodEffects<z.ZodString, string, string>;
|
|
192
|
-
/** 插件显示名称 */
|
|
193
|
-
name: z.ZodString;
|
|
194
|
-
/** 插件入口 */
|
|
195
|
-
entry: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
196
|
-
/** 入口文件 URL */
|
|
197
|
-
url: z.ZodString;
|
|
198
|
-
/** 共享作用域 (用于模块联邦) */
|
|
199
|
-
shareScope: z.ZodOptional<z.ZodString>;
|
|
200
|
-
}, "strip", z.ZodTypeAny, {
|
|
201
|
-
url: string;
|
|
202
|
-
shareScope?: string | undefined;
|
|
203
|
-
}, {
|
|
204
|
-
url: string;
|
|
205
|
-
shareScope?: string | undefined;
|
|
206
|
-
}>]>;
|
|
207
|
-
/** 插件类型 */
|
|
208
|
-
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["business", "functional", "view", "theme", "renderer", "system"]>>>;
|
|
209
|
-
/** 插件功能描述 */
|
|
210
|
-
description: z.ZodOptional<z.ZodString>;
|
|
211
|
-
/** 插件作者 */
|
|
212
|
-
author: z.ZodOptional<z.ZodString>;
|
|
213
|
-
/** 插件图标 */
|
|
214
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
215
|
-
/** 兼容性要求 */
|
|
216
|
-
compatibility: z.ZodOptional<z.ZodObject<{
|
|
217
|
-
/** 最低宿主版本 */
|
|
218
|
-
minVersion: z.ZodOptional<z.ZodString>;
|
|
219
|
-
/** 最高宿主版本 */
|
|
220
|
-
maxVersion: z.ZodOptional<z.ZodString>;
|
|
221
|
-
/** 兼容的宿主版本列表 */
|
|
222
|
-
supportedVersions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
223
|
-
}, "strip", z.ZodTypeAny, {
|
|
224
|
-
minVersion?: string | undefined;
|
|
225
|
-
maxVersion?: string | undefined;
|
|
226
|
-
supportedVersions?: string[] | undefined;
|
|
227
|
-
}, {
|
|
228
|
-
minVersion?: string | undefined;
|
|
229
|
-
maxVersion?: string | undefined;
|
|
230
|
-
supportedVersions?: string[] | undefined;
|
|
231
|
-
}>>;
|
|
232
|
-
/** 插件依赖 */
|
|
233
|
-
dependencies: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
234
|
-
/** 依赖插件 ID */
|
|
235
|
-
id: z.ZodString;
|
|
236
|
-
/** 依赖版本范围 (SemVer) */
|
|
237
|
-
version: z.ZodString;
|
|
238
|
-
/** 是否为可选依赖 */
|
|
239
|
-
optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
240
|
-
}, "strip", z.ZodTypeAny, {
|
|
241
|
-
id: string;
|
|
242
|
-
version: string;
|
|
243
|
-
optional: boolean;
|
|
244
|
-
}, {
|
|
245
|
-
id: string;
|
|
246
|
-
version: string;
|
|
247
|
-
optional?: boolean | undefined;
|
|
248
|
-
}>, "many">>>;
|
|
249
|
-
/** 扩展点声明 */
|
|
250
|
-
extensions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
251
|
-
/** 扩展点名称/标识符 */
|
|
252
|
-
name: z.ZodString;
|
|
253
|
-
/** 扩展点类型 */
|
|
254
|
-
type: z.ZodEnum<["slot", "hook", "command", "service"]>;
|
|
255
|
-
/** 扩展点描述 */
|
|
256
|
-
description: z.ZodOptional<z.ZodString>;
|
|
257
|
-
/** 对于 slot 类型,指定插槽位置 */
|
|
258
|
-
slot: z.ZodOptional<z.ZodString>;
|
|
259
|
-
/** 扩展点的配置选项 */
|
|
260
|
-
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
261
|
-
/**
|
|
262
|
-
* 渲染模式
|
|
263
|
-
* @description 定义插槽内容的渲染方式:replace(替换)、append(追加)、prepend(前置)
|
|
264
|
-
*/
|
|
265
|
-
renderMode: z.ZodOptional<z.ZodEnum<["replace", "append", "prepend"]>>;
|
|
266
|
-
/**
|
|
267
|
-
* 条件渲染配置
|
|
268
|
-
* @description 用于条件渲染,如 requiresAuth: true 表示需要认证
|
|
269
|
-
*/
|
|
270
|
-
condition: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
271
|
-
}, "strip", z.ZodTypeAny, {
|
|
272
|
-
name: string;
|
|
273
|
-
type: "slot" | "hook" | "command" | "service";
|
|
274
|
-
slot?: string | undefined;
|
|
275
|
-
description?: string | undefined;
|
|
276
|
-
config?: Record<string, any> | undefined;
|
|
277
|
-
renderMode?: "replace" | "append" | "prepend" | undefined;
|
|
278
|
-
condition?: Record<string, any> | undefined;
|
|
279
|
-
}, {
|
|
280
|
-
name: string;
|
|
281
|
-
type: "slot" | "hook" | "command" | "service";
|
|
282
|
-
slot?: string | undefined;
|
|
283
|
-
description?: string | undefined;
|
|
284
|
-
config?: Record<string, any> | undefined;
|
|
285
|
-
renderMode?: "replace" | "append" | "prepend" | undefined;
|
|
286
|
-
condition?: Record<string, any> | undefined;
|
|
287
|
-
}>, "many">>>;
|
|
288
|
-
/** 能力声明 */
|
|
289
|
-
capabilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
290
|
-
/** 配置项定义 */
|
|
291
|
-
configuration: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
292
|
-
key: z.ZodString;
|
|
293
|
-
type: z.ZodEnum<["string", "number", "boolean", "select"]>;
|
|
294
|
-
label: z.ZodString;
|
|
295
|
-
description: z.ZodOptional<z.ZodString>;
|
|
296
|
-
default: z.ZodOptional<z.ZodAny>;
|
|
297
|
-
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
298
|
-
label: z.ZodString;
|
|
299
|
-
value: z.ZodAny;
|
|
300
|
-
}, "strip", z.ZodTypeAny, {
|
|
301
|
-
label: string;
|
|
302
|
-
value?: any;
|
|
303
|
-
}, {
|
|
304
|
-
label: string;
|
|
305
|
-
value?: any;
|
|
306
|
-
}>, "many">>;
|
|
307
|
-
}, "strip", z.ZodTypeAny, {
|
|
308
|
-
type: "string" | "number" | "boolean" | "select";
|
|
309
|
-
key: string;
|
|
310
|
-
label: string;
|
|
311
|
-
options?: {
|
|
312
|
-
label: string;
|
|
313
|
-
value?: any;
|
|
314
|
-
}[] | undefined;
|
|
315
|
-
description?: string | undefined;
|
|
316
|
-
default?: any;
|
|
317
|
-
}, {
|
|
318
|
-
type: "string" | "number" | "boolean" | "select";
|
|
319
|
-
key: string;
|
|
320
|
-
label: string;
|
|
321
|
-
options?: {
|
|
322
|
-
label: string;
|
|
323
|
-
value?: any;
|
|
324
|
-
}[] | undefined;
|
|
325
|
-
description?: string | undefined;
|
|
326
|
-
default?: any;
|
|
327
|
-
}>, "many">>;
|
|
328
|
-
/** 存储定义 */
|
|
329
|
-
storage: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
330
|
-
/** 路由定义 (仅供展示,实际路由在运行时注册) */
|
|
331
|
-
routes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
332
|
-
path: z.ZodString;
|
|
333
|
-
}, "strip", z.ZodTypeAny, {
|
|
334
|
-
path: string;
|
|
335
|
-
}, {
|
|
336
|
-
path: string;
|
|
337
|
-
}>, "many">>;
|
|
338
|
-
/** 权限声明 */
|
|
339
|
-
permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
340
|
-
action: z.ZodEnum<["read", "write", "execute", "admin"]>;
|
|
341
|
-
scope: z.ZodEnum<["plugin", "global", "user"]>;
|
|
342
|
-
resource: z.ZodString;
|
|
343
|
-
}, "strip", z.ZodTypeAny, {
|
|
344
|
-
action: "read" | "write" | "execute" | "admin";
|
|
345
|
-
scope: "plugin" | "global" | "user";
|
|
346
|
-
resource: string;
|
|
347
|
-
}, {
|
|
348
|
-
action: "read" | "write" | "execute" | "admin";
|
|
349
|
-
scope: "plugin" | "global" | "user";
|
|
350
|
-
resource: string;
|
|
351
|
-
}>, "many">>;
|
|
352
|
-
/** 插件优先级 */
|
|
353
|
-
priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
354
|
-
}, "strip", z.ZodTypeAny, {
|
|
355
|
-
name: string;
|
|
356
|
-
type: "business" | "functional" | "view" | "theme" | "renderer" | "system";
|
|
357
|
-
id: string;
|
|
358
|
-
version: string;
|
|
359
|
-
entry: string | {
|
|
360
|
-
url: string;
|
|
361
|
-
shareScope?: string | undefined;
|
|
362
|
-
};
|
|
363
|
-
dependencies: {
|
|
364
|
-
id: string;
|
|
365
|
-
version: string;
|
|
366
|
-
optional: boolean;
|
|
367
|
-
}[];
|
|
368
|
-
extensions: {
|
|
369
|
-
name: string;
|
|
370
|
-
type: "slot" | "hook" | "command" | "service";
|
|
371
|
-
slot?: string | undefined;
|
|
372
|
-
description?: string | undefined;
|
|
373
|
-
config?: Record<string, any> | undefined;
|
|
374
|
-
renderMode?: "replace" | "append" | "prepend" | undefined;
|
|
375
|
-
condition?: Record<string, any> | undefined;
|
|
376
|
-
}[];
|
|
377
|
-
priority: number;
|
|
378
|
-
description?: string | undefined;
|
|
379
|
-
author?: string | undefined;
|
|
380
|
-
icon?: string | undefined;
|
|
381
|
-
compatibility?: {
|
|
382
|
-
minVersion?: string | undefined;
|
|
383
|
-
maxVersion?: string | undefined;
|
|
384
|
-
supportedVersions?: string[] | undefined;
|
|
385
|
-
} | undefined;
|
|
386
|
-
capabilities?: Record<string, boolean> | undefined;
|
|
387
|
-
configuration?: {
|
|
388
|
-
type: "string" | "number" | "boolean" | "select";
|
|
389
|
-
key: string;
|
|
390
|
-
label: string;
|
|
391
|
-
options?: {
|
|
392
|
-
label: string;
|
|
393
|
-
value?: any;
|
|
394
|
-
}[] | undefined;
|
|
395
|
-
description?: string | undefined;
|
|
396
|
-
default?: any;
|
|
397
|
-
}[] | undefined;
|
|
398
|
-
storage?: any[] | undefined;
|
|
399
|
-
routes?: {
|
|
400
|
-
path: string;
|
|
401
|
-
}[] | undefined;
|
|
402
|
-
permissions?: {
|
|
403
|
-
action: "read" | "write" | "execute" | "admin";
|
|
404
|
-
scope: "plugin" | "global" | "user";
|
|
405
|
-
resource: string;
|
|
406
|
-
}[] | undefined;
|
|
407
|
-
}, {
|
|
408
|
-
name: string;
|
|
409
|
-
id: string;
|
|
410
|
-
version: string;
|
|
411
|
-
entry: string | {
|
|
412
|
-
url: string;
|
|
413
|
-
shareScope?: string | undefined;
|
|
414
|
-
};
|
|
415
|
-
type?: "business" | "functional" | "view" | "theme" | "renderer" | "system" | undefined;
|
|
416
|
-
description?: string | undefined;
|
|
417
|
-
author?: string | undefined;
|
|
418
|
-
icon?: string | undefined;
|
|
419
|
-
compatibility?: {
|
|
420
|
-
minVersion?: string | undefined;
|
|
421
|
-
maxVersion?: string | undefined;
|
|
422
|
-
supportedVersions?: string[] | undefined;
|
|
423
|
-
} | undefined;
|
|
424
|
-
dependencies?: {
|
|
425
|
-
id: string;
|
|
426
|
-
version: string;
|
|
427
|
-
optional?: boolean | undefined;
|
|
428
|
-
}[] | undefined;
|
|
429
|
-
extensions?: {
|
|
430
|
-
name: string;
|
|
431
|
-
type: "slot" | "hook" | "command" | "service";
|
|
432
|
-
slot?: string | undefined;
|
|
433
|
-
description?: string | undefined;
|
|
434
|
-
config?: Record<string, any> | undefined;
|
|
435
|
-
renderMode?: "replace" | "append" | "prepend" | undefined;
|
|
436
|
-
condition?: Record<string, any> | undefined;
|
|
437
|
-
}[] | undefined;
|
|
438
|
-
capabilities?: Record<string, boolean> | undefined;
|
|
439
|
-
configuration?: {
|
|
440
|
-
type: "string" | "number" | "boolean" | "select";
|
|
441
|
-
key: string;
|
|
442
|
-
label: string;
|
|
443
|
-
options?: {
|
|
444
|
-
label: string;
|
|
445
|
-
value?: any;
|
|
446
|
-
}[] | undefined;
|
|
447
|
-
description?: string | undefined;
|
|
448
|
-
default?: any;
|
|
449
|
-
}[] | undefined;
|
|
450
|
-
storage?: any[] | undefined;
|
|
451
|
-
routes?: {
|
|
452
|
-
path: string;
|
|
453
|
-
}[] | undefined;
|
|
454
|
-
permissions?: {
|
|
455
|
-
action: "read" | "write" | "execute" | "admin";
|
|
456
|
-
scope: "plugin" | "global" | "user";
|
|
457
|
-
resource: string;
|
|
458
|
-
}[] | undefined;
|
|
459
|
-
priority?: number | undefined;
|
|
460
|
-
}>;
|
|
461
|
-
type PluginManifest = z.infer<typeof PluginManifestSchema>;
|
|
462
|
-
type Extension = z.infer<typeof ExtensionSchema>;
|
|
463
|
-
type Dependency = z.infer<typeof DependencySchema>;
|
|
464
|
-
type Entry = z.infer<typeof EntrySchema>;
|
|
465
|
-
type Compatibility = z.infer<typeof CompatibilitySchema>;
|
|
466
|
-
/**
|
|
467
|
-
* 权限定义
|
|
468
|
-
* @description 定义插件需要的权限声明
|
|
469
|
-
*/
|
|
470
|
-
interface Permission {
|
|
471
|
-
/** 权限动作 */
|
|
472
|
-
action: PermissionAction;
|
|
473
|
-
/** 权限作用域 */
|
|
474
|
-
scope: PermissionScope;
|
|
475
|
-
/** 权限资源标识 */
|
|
476
|
-
resource: string;
|
|
477
|
-
}
|
|
478
|
-
/** 权限类型 - 权限声明数组 */
|
|
479
|
-
type PermissionType = Permission[];
|
|
480
|
-
/**
|
|
481
|
-
* 命令处理器类型
|
|
482
|
-
*/
|
|
483
|
-
type CommandHandler = (payload?: any) => void | Promise<void>;
|
|
484
|
-
/**
|
|
485
|
-
* 命令定义
|
|
486
|
-
* @description 定义插件可以注册的命令
|
|
487
|
-
*/
|
|
488
|
-
interface Command {
|
|
489
|
-
/** 命令唯一标识符 */
|
|
490
|
-
id: string;
|
|
491
|
-
/** 命令显示名称 */
|
|
492
|
-
name: string;
|
|
493
|
-
/** 命令描述 */
|
|
494
|
-
description?: string;
|
|
495
|
-
/** 命令参数 Schema */
|
|
496
|
-
payloadSchema?: z.ZodType<any>;
|
|
497
|
-
/** 命令处理函数 */
|
|
498
|
-
handler: CommandHandler;
|
|
499
|
-
}
|
|
500
|
-
/**
|
|
501
|
-
* 命令类型 (TypeScript 类型)
|
|
502
|
-
*/
|
|
503
|
-
type CommandType = Command;
|
|
504
|
-
/**
|
|
505
|
-
* 插件激活钩子
|
|
506
|
-
* @description 插件被激活时调用
|
|
507
|
-
*/
|
|
508
|
-
type OnActivateHandler = (context: PluginContext) => void | Promise<void>;
|
|
509
|
-
/**
|
|
510
|
-
* 插件停用钩子
|
|
511
|
-
* @description 插件被停用时调用
|
|
512
|
-
*/
|
|
513
|
-
type OnDeactivateHandler = (context: PluginContext) => void | Promise<void>;
|
|
514
|
-
/**
|
|
515
|
-
* 插件错误处理钩子
|
|
516
|
-
* @description 插件发生错误时调用
|
|
517
|
-
*/
|
|
518
|
-
type OnErrorHandler = (error: Error, context: PluginContext) => void;
|
|
519
|
-
/**
|
|
520
|
-
* 扩展的生命周期钩子类型
|
|
521
|
-
* @description 扩展插件生命周期管理
|
|
522
|
-
*/
|
|
523
|
-
interface HookType {
|
|
524
|
-
/**
|
|
525
|
-
* 插件激活时
|
|
526
|
-
* @description 插件被激活/启用时触发
|
|
527
|
-
*/
|
|
528
|
-
onActivate?: OnActivateHandler;
|
|
529
|
-
/**
|
|
530
|
-
* 插件停用时
|
|
531
|
-
* @description 插件被停用/禁用时触发
|
|
532
|
-
*/
|
|
533
|
-
onDeactivate?: OnDeactivateHandler;
|
|
534
|
-
/**
|
|
535
|
-
* 插件错误处理
|
|
536
|
-
* @description 插件发生错误时触发
|
|
537
|
-
*/
|
|
538
|
-
onError?: OnErrorHandler;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* HTTP 请求方法
|
|
543
|
-
*/
|
|
544
|
-
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
545
|
-
/**
|
|
546
|
-
* 错误处理策略
|
|
547
|
-
*/
|
|
548
|
-
type ErrorStrategy = 'reject' | 'resolve' | 'silent';
|
|
549
|
-
/**
|
|
550
|
-
* API 接口端点配置
|
|
551
|
-
*/
|
|
552
|
-
interface ApiEndpointConfig {
|
|
553
|
-
/** 接口路径 (支持 :param 语法) */
|
|
554
|
-
url: string;
|
|
555
|
-
/** 请求方法 */
|
|
556
|
-
method: HttpMethod;
|
|
557
|
-
/** 接口描述 */
|
|
558
|
-
desc?: string;
|
|
559
|
-
/** Mock 响应数据结构定义 */
|
|
560
|
-
responseSchema?: any;
|
|
561
|
-
/** 错误处理策略 */
|
|
562
|
-
errorStrategy?: ErrorStrategy;
|
|
563
|
-
/** 是否携带凭据 (跨域配置) */
|
|
564
|
-
withCredentials?: boolean;
|
|
565
|
-
}
|
|
566
|
-
/**
|
|
567
|
-
* API 请求配置
|
|
568
|
-
*/
|
|
569
|
-
interface ApiRequestConfig {
|
|
570
|
-
/** 请求 URL */
|
|
571
|
-
url: string;
|
|
572
|
-
/** 请求方法 */
|
|
573
|
-
method: HttpMethod;
|
|
574
|
-
/** 请求体数据 (POST/PUT 等) */
|
|
575
|
-
data?: any;
|
|
576
|
-
/** 查询参数 (GET 等) */
|
|
577
|
-
params?: any;
|
|
578
|
-
/** 请求头 */
|
|
579
|
-
headers?: any;
|
|
580
|
-
/** 用于取消请求的信号对象 */
|
|
581
|
-
signal?: AbortSignal;
|
|
582
|
-
/** 是否携带凭据 (跨域配置) */
|
|
583
|
-
withCredentials?: boolean;
|
|
584
|
-
}
|
|
585
|
-
/**
|
|
586
|
-
* 流式响应回调函数接口
|
|
587
|
-
*/
|
|
588
|
-
interface StreamCallbacks {
|
|
589
|
-
/** 收到消息片段时的回调 */
|
|
590
|
-
onMessage?: (data: any) => void;
|
|
591
|
-
/** 发生错误时的回调 */
|
|
592
|
-
onError?: (error: any) => void;
|
|
593
|
-
/** 请求完成时的回调 */
|
|
594
|
-
onFinish?: () => void;
|
|
595
|
-
/** 收到 HTTP 响应头部信息的回调,返回 true 表示劫持并中止流 */
|
|
596
|
-
onResponse?: (response: any) => Promise<boolean> | boolean;
|
|
597
|
-
}
|
|
598
|
-
/**
|
|
599
|
-
* API 适配器端口接口
|
|
600
|
-
* @description 所有底层请求引擎(如 Fetch, Axios, Mock)都必须实现此接口,以确保内核对具体通信库的解耦。
|
|
601
|
-
*/
|
|
602
|
-
interface ApiAdapter {
|
|
603
|
-
/**
|
|
604
|
-
* 发起普通 HTTP 请求
|
|
605
|
-
* @param config - 请求配置
|
|
606
|
-
* @param endpointConfig - 接口端点定义的元数据配置
|
|
607
|
-
* @returns 响应数据的 Promise
|
|
608
|
-
*/
|
|
609
|
-
request<T = any>(config: ApiRequestConfig, endpointConfig?: ApiEndpointConfig): Promise<T>;
|
|
610
|
-
/**
|
|
611
|
-
* 发起流式请求 (SSE 或 Chunked Transfer)
|
|
612
|
-
* @param config - 请求配置
|
|
613
|
-
* @param callbacks - 流式处理的回调函数集合
|
|
614
|
-
* @param endpointConfig - 接口端点定义的元数据配置
|
|
615
|
-
*/
|
|
616
|
-
stream?(config: ApiRequestConfig, callbacks: StreamCallbacks, endpointConfig?: ApiEndpointConfig): Promise<void>;
|
|
617
|
-
}
|
|
618
|
-
/**
|
|
619
|
-
* API 配置集合 (按模块和动作分组)
|
|
620
|
-
*/
|
|
621
|
-
interface ApiConfig {
|
|
622
|
-
/** 模块名称 */
|
|
623
|
-
[module: string]: {
|
|
624
|
-
/** 动作/接口名称 */
|
|
625
|
-
[action: string]: ApiEndpointConfig;
|
|
626
|
-
};
|
|
627
|
-
}
|
|
628
|
-
/**
|
|
629
|
-
* 业务侧发起请求时的选项
|
|
630
|
-
*/
|
|
631
|
-
interface RequestOptions extends Partial<ApiRequestConfig> {
|
|
632
|
-
/** 是否跳过全局错误处理逻辑 */
|
|
633
|
-
skipErrorHandler?: boolean;
|
|
634
|
-
/** 路径参数集合 (将替换 url 中的 :param 占位符) */
|
|
635
|
-
params?: any;
|
|
636
|
-
/** 流式响应:收到数据片段的回调 */
|
|
637
|
-
onMessage?: (data: any) => void;
|
|
638
|
-
/** 流式响应:发生错误的回调 */
|
|
639
|
-
onError?: (error: any) => void;
|
|
640
|
-
/** 流式响应:正常结束的回调 */
|
|
641
|
-
onFinish?: () => void;
|
|
642
|
-
/** 允许透传其他底层适配器所需的属性 (例如 axios 的特定配置) */
|
|
643
|
-
[key: string]: any;
|
|
644
|
-
}
|
|
645
|
-
/**
|
|
646
|
-
* API 响应拦截上下文对象
|
|
647
|
-
*/
|
|
648
|
-
interface ApiResponseContext {
|
|
649
|
-
/** 原始响应对象 (例如 AxiosResponse 或 Fetch Response) */
|
|
650
|
-
response: any;
|
|
651
|
-
/** HTTP 响应状态码 */
|
|
652
|
-
status: number;
|
|
653
|
-
/** 响应头集合 */
|
|
654
|
-
headers: Record<string, string>;
|
|
655
|
-
/** 解析后的业务数据体 */
|
|
656
|
-
data: any;
|
|
657
|
-
/** 对应的原始请求配置 */
|
|
658
|
-
config: ApiRequestConfig;
|
|
659
|
-
}
|
|
660
|
-
/**
|
|
661
|
-
* API 拦截器定义
|
|
662
|
-
*/
|
|
663
|
-
interface ApiInterceptor {
|
|
664
|
-
/**
|
|
665
|
-
* 请求发送前的拦截逻辑
|
|
666
|
-
* @param config - 原始请求配置
|
|
667
|
-
* @returns 修改后的请求配置,或其 Promise
|
|
668
|
-
*/
|
|
669
|
-
interceptRequest?: (config: ApiRequestConfig) => ApiRequestConfig | Promise<ApiRequestConfig>;
|
|
670
|
-
/**
|
|
671
|
-
* 响应接收后的拦截逻辑
|
|
672
|
-
* @param context - 响应上下文信息
|
|
673
|
-
* @returns 如果返回 true,表示该拦截器已接管并处理了响应,后续拦截器及业务回调将不再触发
|
|
674
|
-
*/
|
|
675
|
-
interceptResponse?: (context: ApiResponseContext) => boolean | Promise<boolean>;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
/**
|
|
679
|
-
* 事件总线端口接口
|
|
680
|
-
* @description 定义应用内部事件通信的标准契约,支持发布订阅模式。
|
|
681
|
-
*/
|
|
682
|
-
interface EventBusPort {
|
|
683
|
-
/**
|
|
684
|
-
* 订阅事件
|
|
685
|
-
* @param event - 事件名称
|
|
686
|
-
* @param callback - 事件触发时的回调函数
|
|
687
|
-
* @returns 取消订阅的函数
|
|
688
|
-
*/
|
|
689
|
-
on(event: string, callback: (...args: unknown[]) => unknown): () => void;
|
|
690
|
-
/**
|
|
691
|
-
* 取消订阅事件
|
|
692
|
-
* @param event - 事件名称
|
|
693
|
-
* @param callback - 之前注册的回调函数
|
|
694
|
-
*/
|
|
695
|
-
off(event: string, callback: (...args: unknown[]) => unknown): void;
|
|
696
|
-
/**
|
|
697
|
-
* 触发事件 (发布)
|
|
698
|
-
* @param event - 事件名称
|
|
699
|
-
* @param args - 传递给回调函数的参数列表
|
|
700
|
-
*/
|
|
701
|
-
emit(event: string, ...args: unknown[]): void;
|
|
702
|
-
/**
|
|
703
|
-
* 订阅一次性事件
|
|
704
|
-
* @description 事件触发一次后会自动取消订阅
|
|
705
|
-
* @param event - 事件名称
|
|
706
|
-
* @param callback - 事件触发时的回调函数
|
|
707
|
-
*/
|
|
708
|
-
once(event: string, callback: (...args: unknown[]) => unknown): void;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
/**
|
|
712
|
-
* 存储端口接口
|
|
713
|
-
* @description 定义数据持久化的标准契约,兼容 Web Storage API。
|
|
714
|
-
*/
|
|
715
|
-
interface StoragePort {
|
|
716
|
-
/**
|
|
717
|
-
* 获取存储项
|
|
718
|
-
* @param key - 键名
|
|
719
|
-
* @returns 对应的值,如果不存在则返回 null
|
|
720
|
-
*/
|
|
721
|
-
getItem(key: string): string | null;
|
|
722
|
-
/**
|
|
723
|
-
* 设置存储项
|
|
724
|
-
* @param key - 键名
|
|
725
|
-
* @param value - 键值 (字符串)
|
|
726
|
-
*/
|
|
727
|
-
setItem(key: string, value: string): void;
|
|
728
|
-
/**
|
|
729
|
-
* 移除指定的存储项
|
|
730
|
-
* @param key - 键名
|
|
731
|
-
*/
|
|
732
|
-
removeItem(key: string): void;
|
|
733
|
-
/**
|
|
734
|
-
* 清空所有存储项
|
|
735
|
-
*/
|
|
736
|
-
clear(): void;
|
|
737
|
-
/**
|
|
738
|
-
* 返回存储对象中当前存储的数据项总数
|
|
739
|
-
*/
|
|
740
|
-
readonly length: number;
|
|
741
|
-
/**
|
|
742
|
-
* 根据索引返回存储中对应键的名称
|
|
743
|
-
* @param index - 数值索引
|
|
744
|
-
* @returns 键名,如果索引超出范围则返回 null
|
|
745
|
-
*/
|
|
746
|
-
key(index: number): string | null;
|
|
747
|
-
}
|
|
748
|
-
/**
|
|
749
|
-
* 类型化存储接口
|
|
750
|
-
* @description 提供泛型支持的存储访问能力,自动处理序列化
|
|
751
|
-
*/
|
|
752
|
-
interface TypedStorage {
|
|
753
|
-
/** 获取存储数据 */
|
|
754
|
-
get: <T = any>(key: string) => T | null;
|
|
755
|
-
/** 设置存储数据 */
|
|
756
|
-
set: <T = any>(key: string, value: T) => void;
|
|
757
|
-
/** 移除存储数据 */
|
|
758
|
-
remove: (key: string) => void;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
/**
|
|
762
|
-
* API 端口接口
|
|
763
|
-
* @description 插件使用 API 能力的入口,包含请求适配器和 API 配置注册功能
|
|
764
|
-
*/
|
|
765
|
-
interface ApiPort extends ApiAdapter {
|
|
766
|
-
/**
|
|
767
|
-
* 注册 API 配置
|
|
768
|
-
* @param config - API 配置对象
|
|
769
|
-
*/
|
|
770
|
-
register?: (config: ApiConfig) => void;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
/**
|
|
774
|
-
* 路由配置
|
|
775
|
-
*/
|
|
776
|
-
interface RouteConfig {
|
|
777
|
-
path: string;
|
|
778
|
-
component: any;
|
|
779
|
-
meta?: Record<string, any>;
|
|
780
|
-
}
|
|
781
|
-
/**
|
|
782
|
-
* 插件插槽位置
|
|
783
|
-
* @description 定义插件可以注入 UI 的标准位置
|
|
784
|
-
*/
|
|
785
|
-
declare const Slot: {
|
|
786
|
-
readonly Sidebar: "sidebar";
|
|
787
|
-
readonly SidebarPanel: "sidebar-panel";
|
|
788
|
-
readonly Header: "header";
|
|
789
|
-
readonly StatusBar: "status-bar";
|
|
790
|
-
readonly Settings: "settings";
|
|
791
|
-
readonly MessageRenderer: "message-renderer";
|
|
792
|
-
readonly MessageContentRenderer: "message-content-renderer";
|
|
793
|
-
readonly SidebarSystem: "sidebar-system";
|
|
794
|
-
readonly SidebarBottom: "sidebar-bottom";
|
|
795
|
-
readonly RootLayout: "root-layout";
|
|
796
|
-
readonly Custom: "custom";
|
|
797
|
-
};
|
|
798
|
-
type SlotType = typeof Slot[keyof typeof Slot];
|
|
799
|
-
type SlotPosition = SlotType | string;
|
|
800
|
-
/**
|
|
801
|
-
* 插件扩展 (插槽注入配置)
|
|
802
|
-
*/
|
|
803
|
-
interface PluginExtension {
|
|
804
|
-
/** 插槽位置标识符 */
|
|
805
|
-
slot: SlotPosition;
|
|
806
|
-
/** 要注入的 React 等框架组件 */
|
|
807
|
-
component: any;
|
|
808
|
-
/** 排序权重,数值越小越靠前 */
|
|
809
|
-
order?: number;
|
|
810
|
-
/** @internal 插件 ID,由系统在加载时自动注入,用于溯源 */
|
|
811
|
-
_pluginId?: string;
|
|
812
|
-
/** 扩展的元数据信息 */
|
|
813
|
-
meta?: {
|
|
814
|
-
/** 显示图标 */
|
|
815
|
-
icon?: any;
|
|
816
|
-
/** 显示标签文本 */
|
|
817
|
-
label?: string;
|
|
818
|
-
/** 详细描述 */
|
|
819
|
-
description?: string;
|
|
820
|
-
/** 唯一标识符,用于某些特定插槽的索引 */
|
|
821
|
-
key?: string;
|
|
822
|
-
/** 允许其他自定义属性 */
|
|
823
|
-
[key: string]: any;
|
|
824
|
-
};
|
|
825
|
-
}
|
|
826
|
-
/**
|
|
827
|
-
* 插件配置项定义
|
|
828
|
-
*/
|
|
829
|
-
interface PluginConfigItem {
|
|
830
|
-
/** 配置键名 */
|
|
831
|
-
key: string;
|
|
832
|
-
/** 配置类型 */
|
|
833
|
-
type: 'string' | 'number' | 'boolean' | 'select';
|
|
834
|
-
/** 配置显示的标签 */
|
|
835
|
-
label: string;
|
|
836
|
-
/** 配置描述信息 */
|
|
837
|
-
description?: string;
|
|
838
|
-
/** 默认值 */
|
|
839
|
-
default?: any;
|
|
840
|
-
/** 当类型为 select 时的选项列表 */
|
|
841
|
-
options?: {
|
|
842
|
-
label: string;
|
|
843
|
-
value: any;
|
|
844
|
-
}[];
|
|
845
|
-
/** 选择模式:支持多选或标签模式 (AntD 风格) */
|
|
846
|
-
mode?: 'multiple' | 'tags';
|
|
847
|
-
/** 最小值 (针对 number 类型) */
|
|
848
|
-
min?: number;
|
|
849
|
-
/** 最大值 (针对 number 类型) */
|
|
850
|
-
max?: number;
|
|
851
|
-
/**
|
|
852
|
-
* 是否为私有配置
|
|
853
|
-
* @description 如果为 true,则该配置不会通过自动配置服务暴露给其他插件
|
|
854
|
-
* @default false
|
|
855
|
-
*/
|
|
856
|
-
private?: boolean;
|
|
857
|
-
}
|
|
858
|
-
/**
|
|
859
|
-
* 插件能力定义 (Behavioral Capabilities)
|
|
860
|
-
* @description 定义插件的行为特征。注意:路由(routes)和扩展(extensions)属于结构化能力,直接通过 metadata 字段声明,不在此列。
|
|
861
|
-
*/
|
|
862
|
-
interface PluginCapabilities {
|
|
863
|
-
/**
|
|
864
|
-
* 是否支持配置设置
|
|
865
|
-
* @default false (如果 metadata.configuration 存在,则可能被隐式视为 true,建议显式声明)
|
|
866
|
-
*/
|
|
867
|
-
configurable?: boolean;
|
|
868
|
-
/**
|
|
869
|
-
* 是否可嵌入其他页面
|
|
870
|
-
* @description 声明该插件是否可以作为 Widget 被其他插件引用
|
|
871
|
-
*/
|
|
872
|
-
embeddable?: boolean;
|
|
873
|
-
/**
|
|
874
|
-
* 是否支持多实例
|
|
875
|
-
* @description 默认为 false (单例)。如果在聊天窗口中每个会话都需要独立状态,则设为 true
|
|
876
|
-
*/
|
|
877
|
-
multiInstance?: boolean;
|
|
878
|
-
/**
|
|
879
|
-
* 是否需要后台运行
|
|
880
|
-
* @description 如果为 true,即使 UI 不可见,插件也不会被卸载
|
|
881
|
-
*/
|
|
882
|
-
background?: boolean;
|
|
883
|
-
[key: string]: boolean | undefined;
|
|
884
|
-
}
|
|
885
|
-
/**
|
|
886
|
-
* 存储项数据结构定义 (Schema)
|
|
887
|
-
*/
|
|
888
|
-
interface StorageItemSchema {
|
|
889
|
-
/** 存储键名 */
|
|
890
|
-
key: string;
|
|
891
|
-
/** 数据类型 */
|
|
892
|
-
type: 'string' | 'number' | 'boolean' | 'object' | 'array';
|
|
893
|
-
/** 默认值 */
|
|
894
|
-
default?: any;
|
|
895
|
-
/** 描述信息 */
|
|
896
|
-
description?: string;
|
|
897
|
-
/**
|
|
898
|
-
* 作用域
|
|
899
|
-
* @description 'plugin' 表示仅当前插件可见(带插件 ID 前缀),'shared' 表示全局共享
|
|
900
|
-
*/
|
|
901
|
-
scope?: 'plugin' | 'shared';
|
|
902
|
-
}
|
|
903
|
-
/**
|
|
904
|
-
* 插件存储接口
|
|
905
|
-
* @description 包含私有存储和共享存储访问能力
|
|
906
|
-
*/
|
|
907
|
-
interface PluginStorage extends TypedStorage {
|
|
908
|
-
/** 获取插件私有存储数据 */
|
|
909
|
-
get: TypedStorage['get'];
|
|
910
|
-
/** 设置插件私有存储数据 */
|
|
911
|
-
set: TypedStorage['set'];
|
|
912
|
-
/** 移除插件私有存储数据 */
|
|
913
|
-
remove: TypedStorage['remove'];
|
|
914
|
-
/** 全局共享存储访问 */
|
|
915
|
-
shared: TypedStorage & {
|
|
916
|
-
/** 获取全局共享存储数据 */
|
|
917
|
-
get: TypedStorage['get'];
|
|
918
|
-
/** 设置全局共享存储数据 */
|
|
919
|
-
set: TypedStorage['set'];
|
|
920
|
-
/** 移除全局共享存储数据 */
|
|
921
|
-
remove: TypedStorage['remove'];
|
|
922
|
-
};
|
|
923
|
-
}
|
|
924
|
-
/**
|
|
925
|
-
* 插件生命周期 Hooks
|
|
926
|
-
* @description 插件可以在不同的生命周期阶段执行特定的逻辑
|
|
927
|
-
* @template T - 插件清单类型,默认为 PluginManifest
|
|
928
|
-
*/
|
|
929
|
-
interface PluginLifecycle<T extends PluginManifest = PluginManifest> {
|
|
930
|
-
/**
|
|
931
|
-
* 插件加载时调用
|
|
932
|
-
* @description 在插件被扫描并注入内核时触发。用于初始化内部状态、注册服务、设置拦截器等。此时 UI 尚未挂载。
|
|
933
|
-
* @param context - 插件上下文对象,提供核心能力的访问
|
|
934
|
-
*/
|
|
935
|
-
onLoad?: (context: PluginContext<T>) => void | Promise<void>;
|
|
936
|
-
/**
|
|
937
|
-
* 插件挂载到 UI 时调用
|
|
938
|
-
* @description 当插件的 UI 组件(如有)被 React 挂载到 DOM 时触发。
|
|
939
|
-
* @param context - 插件上下文对象
|
|
940
|
-
*/
|
|
941
|
-
onMount?: (context: PluginContext<T>) => void;
|
|
942
|
-
/**
|
|
943
|
-
* 插件从 UI 卸载时调用
|
|
944
|
-
* @description 当插件的 UI 组件被销毁时触发。用于清理定时器、取消订阅等。
|
|
945
|
-
* @param context - 插件上下文对象
|
|
946
|
-
*/
|
|
947
|
-
onUnmount?: (context: PluginContext<T>) => void;
|
|
948
|
-
/**
|
|
949
|
-
* 插件配置发生变化时调用
|
|
950
|
-
* @description 当用户通过配置中心修改插件设置时触发。
|
|
951
|
-
* @param newConfig - 变更后的新配置对象
|
|
952
|
-
* @param oldConfig - 变更前的旧配置对象
|
|
953
|
-
*/
|
|
954
|
-
onConfigChange?: (newConfig: any, oldConfig: any) => void;
|
|
955
|
-
/**
|
|
956
|
-
* 插件错误处理
|
|
957
|
-
* @description 当插件发生错误时触发,用于统一错误处理和日志记录
|
|
958
|
-
* @param error - 错误对象
|
|
959
|
-
* @param context - 插件上下文对象
|
|
960
|
-
*/
|
|
961
|
-
onError?: (error: Error, context: PluginContext<T>) => void;
|
|
962
|
-
}
|
|
963
|
-
/**
|
|
964
|
-
* 插件上下文
|
|
965
|
-
* @description 传递给插件生命周期钩子的核心对象,是插件访问宿主环境能力的唯一入口。
|
|
966
|
-
* @template T - 插件清单类型,默认为 PluginManifest
|
|
967
|
-
*/
|
|
968
|
-
interface PluginContext<T extends PluginManifest = PluginManifest> {
|
|
969
|
-
/** 当前插件的唯一标识符 */
|
|
970
|
-
pluginId: PluginId;
|
|
971
|
-
/** 插件清单 */
|
|
972
|
-
manifest: T;
|
|
973
|
-
/** API 请求能力入口 */
|
|
974
|
-
api: ApiPort;
|
|
975
|
-
/** 事件总线能力入口 */
|
|
976
|
-
events: EventBusPort;
|
|
977
|
-
/** 存储管理能力入口 */
|
|
978
|
-
storage: PluginStorage;
|
|
979
|
-
/** 日志输出工具,自动携带插件 ID 前缀 */
|
|
980
|
-
logger: {
|
|
981
|
-
debug: (...args: any[]) => void;
|
|
982
|
-
info: (...args: any[]) => void;
|
|
983
|
-
warn: (...args: any[]) => void;
|
|
984
|
-
error: (...args: any[]) => void;
|
|
985
|
-
};
|
|
986
|
-
/**
|
|
987
|
-
* 访问其他插件提供的服务
|
|
988
|
-
* @param serviceName - 服务注册名称
|
|
989
|
-
* @returns 服务实例,如果不存在则返回 undefined
|
|
990
|
-
*/
|
|
991
|
-
getService: <T = unknown>(serviceName: string) => T | undefined;
|
|
992
|
-
/**
|
|
993
|
-
* 注册当前插件的服务供他人使用
|
|
994
|
-
* @param serviceName - 唯一服务名称
|
|
995
|
-
* @param service - 服务实现对象
|
|
996
|
-
*/
|
|
997
|
-
registerService: <T = unknown>(serviceName: string, service: T) => void;
|
|
998
|
-
/** 宿主环境 Window 的代理对象 (用于沙箱隔离) */
|
|
999
|
-
window: WindowProxy;
|
|
1000
|
-
}
|
|
1001
|
-
/**
|
|
1002
|
-
* 完整的插件对象定义
|
|
1003
|
-
*/
|
|
1004
|
-
interface Plugin extends PluginLifecycle {
|
|
1005
|
-
/**
|
|
1006
|
-
* 插件唯一标识符
|
|
1007
|
-
* @description 必须与 metadata.id 一致,通常为只读。
|
|
1008
|
-
*/
|
|
1009
|
-
readonly id: string;
|
|
1010
|
-
/** 插件元数据配置 */
|
|
1011
|
-
metadata: PluginMetadata;
|
|
1012
|
-
/** 插件提供的功能组件集合 (可选) */
|
|
1013
|
-
components?: Record<string, any>;
|
|
1014
|
-
/** 插件提供的工具函数集合 (可选) */
|
|
1015
|
-
utils?: Record<string, any>;
|
|
1016
|
-
/** 插件的初始默认配置 (可选) */
|
|
1017
|
-
defaultConfig?: Record<string, any>;
|
|
1018
|
-
}
|
|
1019
|
-
/**
|
|
1020
|
-
* 插件基础类
|
|
1021
|
-
* @deprecated 建议统一使用工厂模式 definePlugin() 定义插件,以消除类与对象定义的歧义。
|
|
1022
|
-
* @description 解决插件定义时 id 与 metadata.id 重复定义的问题,并提供基础生命周期管理
|
|
1023
|
-
*/
|
|
1024
|
-
declare abstract class BasePlugin implements Plugin {
|
|
1025
|
-
abstract metadata: PluginMetadata;
|
|
1026
|
-
/**
|
|
1027
|
-
* 插件 ID
|
|
1028
|
-
* @description 自动从 metadata.id 获取
|
|
1029
|
-
*/
|
|
1030
|
-
get id(): string;
|
|
1031
|
-
onLoad?(context: PluginContext): void | Promise<void>;
|
|
1032
|
-
onMount?(context: PluginContext): void;
|
|
1033
|
-
onUnmount?(context: PluginContext): void;
|
|
1034
|
-
onConfigChange?(newConfig: any, oldConfig: any): void;
|
|
1035
|
-
}
|
|
1036
|
-
/**
|
|
1037
|
-
* 辅助函数:定义插件并自动从 metadata.id 注入顶级 id
|
|
1038
|
-
* @description 解决插件定义时 id 与 metadata.id 重复定义的问题,提高代码优雅度
|
|
1039
|
-
* @param plugin 插件定义(不包含顶级 id)
|
|
1040
|
-
* @returns 完整的插件对象
|
|
1041
|
-
*/
|
|
1042
|
-
declare function definePlugin(plugin: Omit<Plugin, 'id'>): Plugin;
|
|
1043
|
-
/**
|
|
1044
|
-
* 插件元数据定义
|
|
1045
|
-
* @description 描述插件的静态属性,用于插件市场展示、权限校验和内核加载参考。
|
|
1046
|
-
*/
|
|
1047
|
-
interface PluginMetadata {
|
|
1048
|
-
/** 插件唯一 ID (推荐反向域名格式,如 com.company.plugin) */
|
|
1049
|
-
id: string;
|
|
1050
|
-
/** 插件显示名称 */
|
|
1051
|
-
name: string;
|
|
1052
|
-
/** 插件版本号 (符合 SemVer 规范) */
|
|
1053
|
-
version: string;
|
|
1054
|
-
/** 插件类型 */
|
|
1055
|
-
type: PluginType;
|
|
1056
|
-
/** 插件功能描述 */
|
|
1057
|
-
description?: string;
|
|
1058
|
-
/** 插件作者信息 */
|
|
1059
|
-
author?: string;
|
|
1060
|
-
/** 插件图标 */
|
|
1061
|
-
icon?: any;
|
|
1062
|
-
/** 插件依赖的其他插件 ID 列表 */
|
|
1063
|
-
dependencies?: string[];
|
|
1064
|
-
/** 路由配置集合,用于在主应用中注册页面 */
|
|
1065
|
-
routes?: RouteConfig[];
|
|
1066
|
-
/** 插槽扩展集合,用于在主应用 UI 预留位注入组件 */
|
|
1067
|
-
extensions?: PluginExtension[];
|
|
1068
|
-
/** 插件所需调用的 API 接口配置 */
|
|
1069
|
-
api?: ApiConfig;
|
|
1070
|
-
/** 插件行为能力声明 */
|
|
1071
|
-
capabilities?: PluginCapabilities;
|
|
1072
|
-
/** 插件的可配置项定义 */
|
|
1073
|
-
configuration?: PluginConfigItem[];
|
|
1074
|
-
/** 插件所需的存储结构定义 */
|
|
1075
|
-
storage?: StorageItemSchema[];
|
|
1076
|
-
/**
|
|
1077
|
-
* 插件优先级
|
|
1078
|
-
* @description 数值越小优先级越高,用于插件加载顺序和插槽渲染顺序
|
|
1079
|
-
* @default 100
|
|
1080
|
-
*/
|
|
1081
|
-
priority?: number;
|
|
1082
|
-
/**
|
|
1083
|
-
* 系统状态自动绑定
|
|
1084
|
-
* @description 将插件的配置项自动同步到系统的全局状态中 (如主题色、身份认证等)
|
|
1085
|
-
*/
|
|
1086
|
-
systemStateBindings?: {
|
|
1087
|
-
/** 插件配置中的键名 */
|
|
1088
|
-
configKey: string;
|
|
1089
|
-
/** 系统全局状态中的键名 */
|
|
1090
|
-
stateKey: string;
|
|
1091
|
-
/** 预设的转换逻辑名称 */
|
|
1092
|
-
transform?: 'theme-mode' | 'identity';
|
|
1093
|
-
}[];
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
10
|
/**
|
|
1097
11
|
* @file template-literals.ts
|
|
1098
12
|
* @description 模板字面量类型 - 用于精确类型检查
|
|
@@ -1542,7 +456,7 @@ interface AIState {
|
|
|
1542
456
|
clearCurrentSession: () => void;
|
|
1543
457
|
streamMessage: (content: string, onChunk: (chunk: string) => void) => Promise<void>;
|
|
1544
458
|
}
|
|
1545
|
-
declare const
|
|
459
|
+
declare const aiStore: zustand_vanilla.StoreApi<AIState>;
|
|
1546
460
|
declare function createAIStore(apiKey: string, defaultModel?: string): void;
|
|
1547
461
|
|
|
1548
462
|
/**
|
|
@@ -1898,6 +812,12 @@ declare class StorageManager {
|
|
|
1898
812
|
* @param schema - 存储项定义列表
|
|
1899
813
|
*/
|
|
1900
814
|
registerSchema(pluginId: string, schema: StorageItemSchema[]): void;
|
|
815
|
+
/**
|
|
816
|
+
* 删除插件的所有存储数据
|
|
817
|
+
* @description 包括插件私有存储、上下文存储、注册 Schema 及内存缓存
|
|
818
|
+
* @param pluginId - 插件 ID
|
|
819
|
+
*/
|
|
820
|
+
deletePluginStorage(pluginId: string): void;
|
|
1901
821
|
/**
|
|
1902
822
|
* 内部校验方法:检查键名是否在 Schema 中声明
|
|
1903
823
|
* @param pluginId - 插件 ID
|
|
@@ -2436,6 +1356,21 @@ declare class PluginManager {
|
|
|
2436
1356
|
* @param enabled - 目标状态
|
|
2437
1357
|
*/
|
|
2438
1358
|
togglePlugin(pluginId: string, enabled: boolean): void;
|
|
1359
|
+
/**
|
|
1360
|
+
* 删除插件及其所有关联状态
|
|
1361
|
+
* @description 完整清理流程:禁用 -> 卸载运行时 -> 清理存储 -> 清理配置 -> 清理状态 -> 通知
|
|
1362
|
+
* @param pluginId - 插件 ID
|
|
1363
|
+
* @param cleanupStorage - 是否清理存储(默认 true)
|
|
1364
|
+
*/
|
|
1365
|
+
deletePlugin(pluginId: string, cleanupStorage?: boolean): Promise<void>;
|
|
1366
|
+
/**
|
|
1367
|
+
* 更新插件元数据和包地址
|
|
1368
|
+
* @description 更新流程:禁用旧版本 -> 卸载 -> 更新元数据 -> 重新加载并激活
|
|
1369
|
+
* @param pluginId - 插件 ID
|
|
1370
|
+
* @param newManifest - 新的插件清单
|
|
1371
|
+
* @param newBundleUrl - 新的包地址(可选,如果不改变则传 undefined)
|
|
1372
|
+
*/
|
|
1373
|
+
updatePlugin(pluginId: string, newManifest: Partial<PluginManifest>, newBundleUrl?: string): Promise<void>;
|
|
2439
1374
|
/**
|
|
2440
1375
|
* 设置插件的显示排序权重
|
|
2441
1376
|
* @param pluginId - 插件 ID
|
|
@@ -2674,7 +1609,7 @@ declare function evaluateRules$1(rules: FeatureRule[], context: {
|
|
|
2674
1609
|
userId?: string;
|
|
2675
1610
|
env?: string;
|
|
2676
1611
|
}): boolean;
|
|
2677
|
-
declare const
|
|
1612
|
+
declare const featureFlagsStore: Omit<zustand_vanilla.StoreApi<FeatureRegistryState>, "setState" | "persist"> & {
|
|
2678
1613
|
setState(partial: FeatureRegistryState | Partial<FeatureRegistryState> | ((state: FeatureRegistryState) => FeatureRegistryState | Partial<FeatureRegistryState>), replace?: false | undefined): unknown;
|
|
2679
1614
|
setState(state: FeatureRegistryState | ((state: FeatureRegistryState) => FeatureRegistryState), replace: true): unknown;
|
|
2680
1615
|
persist: {
|
|
@@ -2686,7 +1621,7 @@ declare const useFeatureFlags: zustand.UseBoundStore<Omit<zustand.StoreApi<Featu
|
|
|
2686
1621
|
onFinishHydration: (fn: (state: FeatureRegistryState) => void) => () => void;
|
|
2687
1622
|
getOptions: () => Partial<zustand_middleware.PersistOptions<FeatureRegistryState, unknown, unknown>>;
|
|
2688
1623
|
};
|
|
2689
|
-
}
|
|
1624
|
+
};
|
|
2690
1625
|
|
|
2691
1626
|
/**
|
|
2692
1627
|
* 规则引擎
|
|
@@ -2733,69 +1668,6 @@ declare function createEnvironmentRule(env: string): FeatureRule;
|
|
|
2733
1668
|
*/
|
|
2734
1669
|
declare function createUserRule(userId: string): FeatureRule;
|
|
2735
1670
|
|
|
2736
|
-
interface UseFeatureResult {
|
|
2737
|
-
isEnabled: boolean;
|
|
2738
|
-
config: FeatureConfig | undefined;
|
|
2739
|
-
}
|
|
2740
|
-
/**
|
|
2741
|
-
* 特性门控 Hook
|
|
2742
|
-
* @param flagName 特性名称
|
|
2743
|
-
* @param context 评估上下文
|
|
2744
|
-
* @returns 特性状态和配置
|
|
2745
|
-
*/
|
|
2746
|
-
declare function useFeature(flagName: string, context?: RuleContext): UseFeatureResult;
|
|
2747
|
-
|
|
2748
|
-
/**
|
|
2749
|
-
* 验证结果类型
|
|
2750
|
-
*/
|
|
2751
|
-
interface ValidationResult {
|
|
2752
|
-
/** 是否有效 */
|
|
2753
|
-
valid: boolean;
|
|
2754
|
-
/** 验证通过时的数据 */
|
|
2755
|
-
data?: PluginManifest;
|
|
2756
|
-
/** 验证失败时的错误 */
|
|
2757
|
-
errors?: {
|
|
2758
|
-
/** 错误消息 */
|
|
2759
|
-
message: string;
|
|
2760
|
-
/** 错误路径 */
|
|
2761
|
-
path: string[];
|
|
2762
|
-
/** 具体错误类型 */
|
|
2763
|
-
type: string;
|
|
2764
|
-
}[];
|
|
2765
|
-
}
|
|
2766
|
-
/**
|
|
2767
|
-
* 验证 Manifest
|
|
2768
|
-
* @param raw - 待验证的原始数据
|
|
2769
|
-
* @returns 验证结果
|
|
2770
|
-
*/
|
|
2771
|
-
declare function validateManifest(raw: unknown): ValidationResult;
|
|
2772
|
-
/**
|
|
2773
|
-
* 验证 Manifest 并抛出错误
|
|
2774
|
-
* @param raw - 待验证的原始数据
|
|
2775
|
-
* @returns 验证通过的 Manifest 数据
|
|
2776
|
-
* @throws ZodError 当验证失败时
|
|
2777
|
-
*/
|
|
2778
|
-
declare function assertManifest(raw: unknown): PluginManifest;
|
|
2779
|
-
|
|
2780
|
-
/**
|
|
2781
|
-
* Manifest 向后兼容包装器
|
|
2782
|
-
* @description 支持旧版 definePlugin 格式自动转换为 Manifest 格式
|
|
2783
|
-
*/
|
|
2784
|
-
|
|
2785
|
-
/**
|
|
2786
|
-
* 从 Plugin 对象提取 Manifest
|
|
2787
|
-
* @param plugin - 插件对象
|
|
2788
|
-
* @returns 提取的 Manifest 对象
|
|
2789
|
-
*/
|
|
2790
|
-
declare function extractManifestFromPlugin(plugin: Plugin | Record<string, unknown>): Partial<PluginManifest>;
|
|
2791
|
-
/**
|
|
2792
|
-
* 规范化插件 Manifest
|
|
2793
|
-
* @param input - Plugin 对象、definePlugin 结果或纯对象
|
|
2794
|
-
* @returns 规范化后的 Manifest
|
|
2795
|
-
* @throws 当输入无效且无法转换时
|
|
2796
|
-
*/
|
|
2797
|
-
declare function normalizePluginManifest(input: Plugin | Record<string, unknown> | unknown): ValidationResult;
|
|
2798
|
-
|
|
2799
1671
|
/**
|
|
2800
1672
|
* 核心状态 Store 接口
|
|
2801
1673
|
*/
|
|
@@ -2816,8 +1688,8 @@ interface CoreState {
|
|
|
2816
1688
|
/**
|
|
2817
1689
|
* 创建 Vanilla Store 实例
|
|
2818
1690
|
*/
|
|
2819
|
-
declare const coreStore:
|
|
2820
|
-
declare const coreStoreApi:
|
|
1691
|
+
declare const coreStore: zustand_vanilla.StoreApi<CoreState>;
|
|
1692
|
+
declare const coreStoreApi: zustand_vanilla.StoreApi<CoreState>;
|
|
2821
1693
|
|
|
2822
1694
|
/**
|
|
2823
1695
|
* 浏览器本地存储 (LocalStorage) 适配器
|
|
@@ -3771,4 +2643,4 @@ declare class NpmRegistry {
|
|
|
3771
2643
|
*/
|
|
3772
2644
|
declare function getDefaultRegistry(): NpmRegistry;
|
|
3773
2645
|
|
|
3774
|
-
export { type AIChunk, type AIMessage, type AIProvider, type AITool,
|
|
2646
|
+
export { type AIChunk, type AIMessage, type AIProvider, type AITool, ApiAdapter, ApiConfig, ApiEndpointConfig, ApiEngine, ApiInterceptor, ApiRequestConfig, AxiosAdapter, type BaseResponse, type CacheEntry, type CacheOptions, type ChatOptions, ConfigEvents, type ConfigItemDefinition, ConfigManager, type ConflictResolution, ConflictResolver, CoreError, CoreErrorCode, CoreErrorStrategy, type CoreState, CycleDetector, type CycleDetectorInput, type CycleWarning, DEFAULT_PERFORMANCE_SETTINGS, type DeepReadonly, DefaultEventBus, Dependency, type DependencyEdge, DependencyGraph, type DependencyNode, type DeprecationInfo, type DeprecationWarning, type DiscoveryRule, type ErrorHandlerOptions, type EventBus, type EventCallback, FEATURE_NAMESPACE_PREFIX, type FeatureConfig, type FeatureRegistryState, type FeatureRule, type FunctionCallResult, type LifecycleMetric, LifecycleMonitor, type LifecyclePhase, type LoadError, type LoadResult, LocalStorageAdapter, LogLevel, Logger, type MigrationWarning, MockAIProvider, type NpmPackageMeta, NpmRegistry, OpenAIProvider, PerformanceCollector, type PerformanceData, type PerformanceSettings, PerformanceStorage, PerformanceTimer, Plugin, PluginCapabilities, PluginContext, type PluginDependencyInput, PluginError, PluginErrorType, PluginEvents, PluginExtension, PluginManager, PluginManifest, type PluginManifestType, type PluginRegistry, PluginRuntime, PluginSandbox, ProxySandbox, RemoteCache, RemoteLoader, type RemotePluginSource, type RemoteSourceOptions, RequestOptions, type RetryOptions, RetryStrategy, RouteConfig, type RoutePath, RoutePathSchema, type RuleContext, type RuleType, type RuntimeMetric, STORAGE_KEY, SUCCESS_CODE, type SafePluginConfig, type SandboxOptions, type Scene, ScopedStorageAdapter, type SemVer, SemVerSchema, ServiceRegistry, type Session, SessionLocalStorageAdapter, SessionManager, type SessionManagerInterface, type SessionStorage, type SharedDependencyResult, SharedDepsDetector, SlotPosition, StorageItemSchema, StorageManager, StoragePort, StreamCallbacks, type ToolCall, ToolRegistry, type VersionInfo, aiStore, apiEngine, cleanUrlParams, configManager, coreStore, coreStoreApi, createAIStore, createEnvironmentRule, createLifecycleMonitor, createLogger, createPercentageRule, createPerformanceMonitor, createRoutePath, createSemVer, createUserRule, dateUtils, evaluateRules as evaluateFeatureRules, evaluateRule, evaluateRules$1 as evaluateRules, featureFlagsStore, getDefaultRegistry, handleError, simpleHash as hashString, isMockMode, isPluginManifest, isRoutePath, isSemVer, logger, normalizeParams, pluginManager, resolveApiModules, resolvePluginRegistry, serviceRegistry, simpleHash$1 as simpleHash, version };
|