asaihost-nodejs 0.0.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 (76) hide show
  1. package/README.md +518 -0
  2. package/dist/InterventionLog-25EHE4QR.cjs +30 -0
  3. package/dist/InterventionLog-25EHE4QR.cjs.map +1 -0
  4. package/dist/InterventionLog-R6CCPU2B.es.js +30 -0
  5. package/dist/InterventionLog-R6CCPU2B.es.js.map +1 -0
  6. package/dist/LogStore-ECXX34WC.es.js +54 -0
  7. package/dist/LogStore-ECXX34WC.es.js.map +1 -0
  8. package/dist/LogStore-M2AUBNGO.cjs +54 -0
  9. package/dist/LogStore-M2AUBNGO.cjs.map +1 -0
  10. package/dist/asaihost-nodejs.cjs +6761 -0
  11. package/dist/asaihost-nodejs.cjs.map +1 -0
  12. package/dist/asaihost-nodejs.d.cts +406 -0
  13. package/dist/asaihost-nodejs.d.ts +406 -0
  14. package/dist/asaihost-nodejs.es.js +6761 -0
  15. package/dist/asaihost-nodejs.es.js.map +1 -0
  16. package/dist/chunk-4WJDC4M4.es.js +311 -0
  17. package/dist/chunk-4WJDC4M4.es.js.map +1 -0
  18. package/dist/chunk-6U2I5EON.es.js +12 -0
  19. package/dist/chunk-6U2I5EON.es.js.map +1 -0
  20. package/dist/chunk-DROOHKB3.es.js +87 -0
  21. package/dist/chunk-DROOHKB3.es.js.map +1 -0
  22. package/dist/chunk-E7V3EBDB.es.js +435 -0
  23. package/dist/chunk-E7V3EBDB.es.js.map +1 -0
  24. package/dist/chunk-EOGZPRML.es.js +740 -0
  25. package/dist/chunk-EOGZPRML.es.js.map +1 -0
  26. package/dist/chunk-G4WVDUBH.cjs +463 -0
  27. package/dist/chunk-G4WVDUBH.cjs.map +1 -0
  28. package/dist/chunk-HHPGUJ75.cjs +162 -0
  29. package/dist/chunk-HHPGUJ75.cjs.map +1 -0
  30. package/dist/chunk-KOFCBB3N.cjs +87 -0
  31. package/dist/chunk-KOFCBB3N.cjs.map +1 -0
  32. package/dist/chunk-KUZQ36IJ.es.js +162 -0
  33. package/dist/chunk-KUZQ36IJ.es.js.map +1 -0
  34. package/dist/chunk-LOMSUPPU.es.js +1202 -0
  35. package/dist/chunk-LOMSUPPU.es.js.map +1 -0
  36. package/dist/chunk-MCMADJQR.es.js +463 -0
  37. package/dist/chunk-MCMADJQR.es.js.map +1 -0
  38. package/dist/chunk-NLBFIRDB.cjs +105 -0
  39. package/dist/chunk-NLBFIRDB.cjs.map +1 -0
  40. package/dist/chunk-O6LVLSNB.cjs +40 -0
  41. package/dist/chunk-O6LVLSNB.cjs.map +1 -0
  42. package/dist/chunk-QWVR2HNT.cjs +435 -0
  43. package/dist/chunk-QWVR2HNT.cjs.map +1 -0
  44. package/dist/chunk-SMVZ3ZDJ.cjs +12 -0
  45. package/dist/chunk-SMVZ3ZDJ.cjs.map +1 -0
  46. package/dist/chunk-UTKVJE7N.es.js +40 -0
  47. package/dist/chunk-UTKVJE7N.es.js.map +1 -0
  48. package/dist/chunk-VLMM735Q.cjs +1202 -0
  49. package/dist/chunk-VLMM735Q.cjs.map +1 -0
  50. package/dist/chunk-W7DVKGX5.cjs +311 -0
  51. package/dist/chunk-W7DVKGX5.cjs.map +1 -0
  52. package/dist/chunk-X7VHW2TD.cjs +740 -0
  53. package/dist/chunk-X7VHW2TD.cjs.map +1 -0
  54. package/dist/chunk-XBIN4C2V.es.js +105 -0
  55. package/dist/chunk-XBIN4C2V.es.js.map +1 -0
  56. package/dist/intervention-hooks-FI4EHOL5.es.js +21 -0
  57. package/dist/intervention-hooks-FI4EHOL5.es.js.map +1 -0
  58. package/dist/intervention-hooks-LE6X4C6N.cjs +21 -0
  59. package/dist/intervention-hooks-LE6X4C6N.cjs.map +1 -0
  60. package/dist/log-alert-GLCULMQP.es.js +51 -0
  61. package/dist/log-alert-GLCULMQP.es.js.map +1 -0
  62. package/dist/log-alert-LAJ6VSAG.cjs +51 -0
  63. package/dist/log-alert-LAJ6VSAG.cjs.map +1 -0
  64. package/dist/log-formats-FKFMQKNO.cjs +31 -0
  65. package/dist/log-formats-FKFMQKNO.cjs.map +1 -0
  66. package/dist/log-formats-I5E32H5F.es.js +31 -0
  67. package/dist/log-formats-I5E32H5F.es.js.map +1 -0
  68. package/dist/password-63OY27RX.es.js +20 -0
  69. package/dist/password-63OY27RX.es.js.map +1 -0
  70. package/dist/password-NZ5EGDWG.cjs +20 -0
  71. package/dist/password-NZ5EGDWG.cjs.map +1 -0
  72. package/dist/user-store-J7LWEXSW.es.js +12 -0
  73. package/dist/user-store-J7LWEXSW.es.js.map +1 -0
  74. package/dist/user-store-SX4N6PQ4.cjs +12 -0
  75. package/dist/user-store-SX4N6PQ4.cjs.map +1 -0
  76. package/package.json +79 -0
@@ -0,0 +1,406 @@
1
+ import * as ws from 'ws';
2
+
3
+ /** HTTP/WS Userinfo 解密(us##lv##tk,依赖 AsCode + asaisn) */
4
+ declare function deUserInfoWithAsai(userinfo: string[] | null | undefined, $asai: any): string[] | null;
5
+
6
+ /** WebSocket Mock — api 单次响应 / listen 定时推送 */
7
+ declare function wsMock($asai: any): {
8
+ getKeyByData: (reqdata: any, hostdir?: string) => string;
9
+ wsWorkApi: (workopt: any) => void;
10
+ wsWorkMock: (workopt: any) => void;
11
+ wsWorkListen: (workopt: any, reqkey: any) => void;
12
+ getMockDb: (workopt: any) => any;
13
+ };
14
+
15
+ declare const index_deUserInfoWithAsai: typeof deUserInfoWithAsai;
16
+ declare const index_wsMock: typeof wsMock;
17
+ declare namespace index {
18
+ export { index_deUserInfoWithAsai as deUserInfoWithAsai, index_wsMock as wsMock };
19
+ }
20
+
21
+ declare const _default$1: {
22
+ ServerApi: ($asai: any, opt?: any) => {
23
+ apiWork: (req: any, res: any, hostdir: string) => any;
24
+ };
25
+ ServerWs: ($asai: any, opt?: any) => {
26
+ wsWork: (msg: any, ws: any, hostdir: string, req: any) => void;
27
+ commandwork: ($asai: any) => {
28
+ commandwork: () => void;
29
+ };
30
+ };
31
+ ServerSys: ($asai: any, opt?: any) => {
32
+ sysWork: (req: any, res: any, hostdir: string) => void;
33
+ };
34
+ WsClient: ($asai: any, wsname: string) => {
35
+ clientwsInit: () => Promise<unknown>;
36
+ clientwsSend: (message: string) => void;
37
+ clientwsApi: (messageData: any) => Promise<unknown>;
38
+ clientwsWatch: (messageData: any, cb: any) => void;
39
+ clientwsWatchOff: (messageData: any) => void;
40
+ };
41
+ };
42
+
43
+ declare const _default: ($asai: any) => void;
44
+
45
+ /** 启动前归一化 host 配置 */
46
+ declare function normalizeHostConfig(cfg: Record<string, any>): Record<string, any>;
47
+ /** 启动时合并 security 默认值(向后兼容:未配置时等同旧行为) */
48
+ declare function normalizeSecurityConfig(cfg: Record<string, any>): void;
49
+ declare function validateHostConfig(cfg: Record<string, any>): string[];
50
+ /** IEC 62443-4-2 — 生产环境强制安全配置(开发环境不校验) */
51
+ declare function validateProductionSecurity(cfg: Record<string, any>): string[];
52
+
53
+ /**
54
+ * syscom 通信配置 — tcp / grpc / rs485 统一读取、归一化与重连参数
55
+ *
56
+ * 配置结构(推荐):
57
+ * hostconfig.syscom.{tcp|grpc|rs485}.default
58
+ * 兼容旧版顶层 tcp/grpc/rs485/serial485/1tcp 等键名。
59
+ */
60
+ type TransportKind = 'tcp' | 'grpc' | 'rs485';
61
+ interface ReconnectOptions {
62
+ enabled?: boolean;
63
+ maxRetries?: number;
64
+ initialDelay?: number;
65
+ maxDelay?: number;
66
+ factor?: number;
67
+ }
68
+ declare function getTransportBlock(cfg: any, kind: TransportKind): Record<string, any> | null;
69
+ declare function getTransportDefault(cfg: any, kind: TransportKind): Record<string, any> | null;
70
+ declare function hasTransportDefault(cfg: any, kind: TransportKind): boolean;
71
+ /** 默认连接 ID(来自配置 default.id,否则各传输内置默认值) */
72
+ declare function getDefaultConnId(cfg: any, kind: TransportKind): string;
73
+ /** 是否在启动时自动 connect(default.autoConnect !== false 时为 true) */
74
+ declare function shouldAutoConnect(def: Record<string, any> | null | undefined): boolean;
75
+ /** 解析重连参数:default.reconnect > 传输默认值 > tm.maxtry */
76
+ declare function resolveReconnectOptions(def: Record<string, any> | null | undefined, kind: TransportKind, cfg?: Record<string, any>): ReconnectOptions;
77
+
78
+ interface AsaiSecrets {
79
+ password: string;
80
+ asaisn: string;
81
+ aesKeyBase64: string;
82
+ sessionSecret: string;
83
+ httpsKey?: string;
84
+ httpsCert?: string;
85
+ wssecToken?: string;
86
+ siemToken?: string;
87
+ }
88
+ interface SecretsLoadResult {
89
+ secrets: AsaiSecrets;
90
+ strippedFromJson: string[];
91
+ sources: string[];
92
+ }
93
+ /** 轻量 .env 解析(不引入 dotenv 依赖) */
94
+ declare function loadDotEnvFile(envPath: string): Promise<Record<string, string>>;
95
+ /**
96
+ * 从 asaihost.json 剥离敏感字段(禁止落盘/进仓库)。
97
+ * 返回被剥离的字段路径列表,供安全审计。
98
+ */
99
+ declare function stripForbiddenSecretsFromHostConfig(cfg: Record<string, any>): string[];
100
+ declare function loadAsaiSecrets(serverRoot: string): Promise<SecretsLoadResult>;
101
+ /** 将已加载的密钥合并进运行时 hostconfig(仅内存,不写回 JSON) */
102
+ declare function applySecretsToHostConfig(cfg: Record<string, any>, secrets: AsaiSecrets): void;
103
+ declare function resolveHttpsCertFromPaths(serverRoot: string, cfg: Record<string, any>): Promise<void>;
104
+ declare function validateAsaiSecrets(secrets: AsaiSecrets, opts?: {
105
+ isProduction?: boolean;
106
+ }): string[];
107
+ declare function isDevDefaultPassword(password: string): boolean;
108
+
109
+ declare class WsRouteIndex {
110
+ private routes;
111
+ rebuild(keys: string[]): void;
112
+ matchTy(ty: string | undefined): string | undefined;
113
+ matchString(msg: string): string | undefined;
114
+ }
115
+
116
+ /**
117
+ * 统一 API / WS 路由注册 — 同步 $lib 与 hostserver*,避免双写遗漏
118
+ */
119
+
120
+ type RouteFactory$1 = ($asai: any) => Record<string, unknown>;
121
+ declare function syncApiRouteKeys($asai: any): void;
122
+ declare function syncWsRouteKeys($asai: any): void;
123
+ /** 注册 API:同时写入 $lib.api 与 hostserverapi(若已初始化) */
124
+ declare function registerApi($asai: any, key: string, factory: RouteFactory$1): void;
125
+ /** 注册 WS:同时写入 $lib.ws 与 hostserverws(若已初始化) */
126
+ declare function registerWs($asai: any, key: string, factory: RouteFactory$1): void;
127
+ /** 初始化 hostserverapi(work 层启动时调用) */
128
+ declare function initHostserverApi($asai: any, extra?: Record<string, RouteFactory$1>): void;
129
+ /** 初始化 hostserverws(work 层启动时调用) */
130
+ declare function initHostserverWs($asai: any, extra?: Record<string, RouteFactory$1>): any;
131
+
132
+ interface TransportBridgeOptions {
133
+ $asai: any;
134
+ manager: any;
135
+ managerKey: string;
136
+ serversKey: string;
137
+ transport: TransportKind;
138
+ buildDefaultConfig: (def: Record<string, any>) => Record<string, any>;
139
+ apiRoute: string;
140
+ apiHandler: any;
141
+ wsRoute: string;
142
+ wsHandler: any;
143
+ }
144
+ /** 初始化传输管理器:挂 $asai、可选默认连接、注册 API/WS 路由 */
145
+ declare function initTransportBridge(opts: TransportBridgeOptions): any;
146
+ /** 首次 API/WS 调用时再建立默认连接(autoConnect: false 时) */
147
+ declare function ensureDefaultConnection($asai: any, transport: TransportKind): string | null;
148
+ /** 标准 DATA 事件:JSON 解析 + watch 匹配 / WS 广播 */
149
+ declare function createTransportDataHandler($asai: any, manager: any): (event: any) => void;
150
+ /** 连接状态日志(ERROR 由各 manager 内部输出,避免重复) */
151
+ declare function wireTransportConnectionLogs(manager: any, events: {
152
+ CONNECTED: string;
153
+ DISCONNECTED: string;
154
+ ERROR?: string;
155
+ }, logPrefix: string): void;
156
+
157
+ type RouteFactory = ($asai: AsaiRuntime) => Record<string, unknown>;
158
+ /** IEC 62443-4-2 安全策略(默认全关,不影响现有行为) */
159
+ interface SecurityConfig {
160
+ /** 1=强制 HTTP Userinfo 鉴权;0=关闭(默认) */
161
+ requireAuth?: number;
162
+ /** 1=启用 Content-Security-Policy */
163
+ csp?: number;
164
+ /** 自定义 CSP 策略字符串 */
165
+ cspPolicy?: string;
166
+ /** 1=记录安全审计事件(默认开启) */
167
+ auditLog?: number;
168
+ /** 鉴权白名单路径(支持 * 后缀前缀匹配) */
169
+ authSkipPaths?: string[];
170
+ /** 最低用户等级(requireAuth=1 时生效) */
171
+ minUserLevel?: number;
172
+ /** 0=禁止开放注册(生产推荐) */
173
+ allowRegister?: number;
174
+ lockoutMaxFails?: number;
175
+ lockoutMinutes?: number;
176
+ sessionTtlHours?: number;
177
+ passwordMinLength?: number;
178
+ /** CR 1.12 登录前系统使用通知 */
179
+ banner?: {
180
+ enabled?: number;
181
+ text?: string;
182
+ };
183
+ /** CR 1.7 口令强度策略 */
184
+ passwordPolicy?: {
185
+ minLength?: number;
186
+ requireUpper?: number;
187
+ requireLower?: number;
188
+ requireDigit?: number;
189
+ requireSpecial?: number;
190
+ maxAgeDays?: number;
191
+ historyCount?: number;
192
+ };
193
+ /** CR 2.5 会话空闲锁定(分钟,0=关闭) */
194
+ sessionIdleMinutes?: number;
195
+ /** CR 2.1 SL-2 角色定义 */
196
+ roles?: Array<{
197
+ name: string;
198
+ minLv: number;
199
+ permissions?: string[];
200
+ }>;
201
+ /** CR 3.1 SL-2 生产强制 WSS */
202
+ forceWss?: number;
203
+ quota?: {
204
+ enabled?: number;
205
+ maxApiConcurrent?: number;
206
+ maxApiPerIp?: number;
207
+ maxApiPerIpPerMin?: number;
208
+ maxWsPerIp?: number;
209
+ maxLoginSessions?: number;
210
+ maxSessionsPerUser?: number;
211
+ onUserSessionOverflow?: string;
212
+ };
213
+ }
214
+ interface HostConfig {
215
+ website?: {
216
+ title?: string;
217
+ ver?: string;
218
+ };
219
+ password?: string;
220
+ security?: SecurityConfig;
221
+ ip?: string;
222
+ index?: string;
223
+ oncors?: number;
224
+ asaiport?: number[];
225
+ guardtm?: ReturnType<typeof setTimeout> | null;
226
+ hosts?: Record<string, HostSiteConfig>;
227
+ proxyhosts?: Record<string, ProxySiteConfig>;
228
+ logger?: LoggerConfig;
229
+ mimetypes?: Record<string, string>;
230
+ aes?: {
231
+ lv?: number;
232
+ keybase64?: string;
233
+ aad?: string;
234
+ };
235
+ path?: {
236
+ mock?: string;
237
+ ip?: string;
238
+ };
239
+ tm?: {
240
+ c?: number;
241
+ d?: number;
242
+ maxtry?: number;
243
+ };
244
+ pkg?: {
245
+ type?: number;
246
+ };
247
+ [key: string]: unknown;
248
+ }
249
+ interface HostSiteConfig {
250
+ close?: number;
251
+ port?: number;
252
+ ws?: number;
253
+ ckhttp?: number;
254
+ ckws?: number;
255
+ maxhttp?: number;
256
+ maxws?: number;
257
+ maxonline?: number;
258
+ oncors?: number;
259
+ wstype?: string;
260
+ httptype?: string;
261
+ hostdirs?: string[];
262
+ weburls?: {
263
+ rewrite?: boolean;
264
+ webdir?: string;
265
+ keys?: string[];
266
+ };
267
+ mimetypes?: Record<string, string>;
268
+ cors?: string[];
269
+ [key: string]: unknown;
270
+ }
271
+ interface ProxySiteConfig {
272
+ url?: string;
273
+ port?: number;
274
+ proxyport?: number;
275
+ httptype?: string;
276
+ proxyhttptype?: string;
277
+ [key: string]: unknown;
278
+ }
279
+ interface LoggerConfig {
280
+ lv?: {
281
+ view?: number;
282
+ record?: number;
283
+ };
284
+ path?: {
285
+ maxsize?: number;
286
+ client?: string;
287
+ server?: string;
288
+ };
289
+ /** 采样率 0~1,如 { "REQ_OTHER": 0.05 } */
290
+ sample?: Record<string, number>;
291
+ /** 不写日志的请求路径(精确匹配;以 * 结尾为前缀匹配) */
292
+ skip?: string[];
293
+ /** IEC 62443-4-2 干预日志(CEF 格式,留存≥5年) */
294
+ intervention?: {
295
+ path?: string;
296
+ retentionYears?: number;
297
+ /** 演示/自动化测试触发的干预动作专用存储目录,与生产留存数据完全隔离,不计入合规审计留存 */
298
+ testPath?: string;
299
+ };
300
+ }
301
+ type WorkHandler = (req: unknown, res: unknown, hostdir: string) => void;
302
+ type WsWorkHandler = (msg: unknown, ws: unknown, hostdir: string, req: unknown) => void;
303
+ interface AsaiHostOptions {
304
+ sysWork: WorkHandler;
305
+ apiWork: WorkHandler;
306
+ wsWork: WsWorkHandler;
307
+ jsonpWork: WorkHandler;
308
+ }
309
+ /** 运行时主对象(与 app.ts 中 $asai 结构一致) */
310
+ interface AsaiRuntime {
311
+ $lib: Record<string, unknown>;
312
+ hostconfig: HostConfig;
313
+ asaizip?: unknown;
314
+ dataserver?: unknown;
315
+ asaihost?: Record<string, unknown>;
316
+ asaimock?: Record<string, unknown>;
317
+ connectionshttp: Record<string, Set<unknown>>;
318
+ connectionsws: Record<string, Record<string, unknown>>;
319
+ taskshttp: Record<string, unknown>;
320
+ tasksws: Record<string, unknown>;
321
+ servershttp: Record<string, unknown>;
322
+ serversws: Record<string, unknown>;
323
+ hostserverapi?: Record<string, RouteFactory>;
324
+ hostserverapis?: string[];
325
+ hostserverws?: Record<string, RouteFactory>;
326
+ hostserverwss?: string[];
327
+ hostserversys?: Record<string, RouteFactory>;
328
+ hostserversyss?: string[];
329
+ wsRouteIndex?: WsRouteIndex;
330
+ registerApi?: (key: string, factory: RouteFactory) => void;
331
+ registerWs?: (key: string, factory: RouteFactory) => void;
332
+ setAppend?: (src: string, logstr: string) => Promise<void>;
333
+ getHost?: (hostdir: string) => HostSiteConfig;
334
+ getHostIP?: (ip?: string | null) => string;
335
+ startHTTPServer?: (hostdir: string) => unknown;
336
+ $log?: (...args: unknown[]) => void | Promise<void>;
337
+ command?: Record<string, unknown>;
338
+ tmpdata: Record<string, unknown>;
339
+ tm: number;
340
+ [key: string]: unknown;
341
+ }
342
+ /** npm 包标识(与 package.json name 一致) */
343
+ declare const PLUGIN_NAME: "asaihost-nodejs";
344
+ /** `fn($asai, opt)` 返回值:启动函数 + ws 模块引用 */
345
+ interface HostBootResult {
346
+ StartAsaiHost: () => void;
347
+ asaiWs: typeof ws;
348
+ }
349
+ /** 宿主插件对外 API 形状(具体方法签名见默认导出推断类型 AsaiNodejsHostPlugin) */
350
+ interface AsaiNodejsHostPlugin {
351
+ readonly name: typeof PLUGIN_NAME;
352
+ fn: (runtime: AsaiRuntime, options: AsaiHostOptions) => HostBootResult;
353
+ sysserver: (runtime: AsaiRuntime) => void;
354
+ AsaiCommon: Record<string, unknown>;
355
+ AsaiUtils: Record<string, unknown>;
356
+ [key: string]: unknown;
357
+ }
358
+
359
+ declare function secureCompare(a: unknown, b: unknown): boolean;
360
+
361
+ /**
362
+ * 路径安全 — 禁止目录穿越,仅允许落在白名单根目录内(OWASP Path Traversal)
363
+ */
364
+
365
+ declare function resolvePathUnderRoots(requestedPath: string, allowedRoots: string[]): string;
366
+ /** 从 hostconfig 推导允许读写的根目录 */
367
+ declare function getHostAllowedRoots(hostconfig: any): string[];
368
+
369
+ /**
370
+ * IEC 62443-4-2 CR 6.2 — 安全审计事件记录
371
+ * 与 GDPR 行为日志分离,专用于鉴权失败、访问拒绝等安全事件。
372
+ */
373
+ type SecurityEventType = 'AUTH_FAIL' | 'AUTH_MISSING' | 'ACCESS_DENIED' | 'INPUT_REJECTED' | 'RATE_LIMIT' | 'CONFIG_WARN';
374
+ interface SecurityAuditEvent {
375
+ type: SecurityEventType;
376
+ path?: string;
377
+ method?: string;
378
+ user?: string;
379
+ level?: string | number;
380
+ detail?: string;
381
+ ip?: string;
382
+ }
383
+ declare function logSecurityEvent($asai: any, event: SecurityAuditEvent): void;
384
+
385
+ declare function sanitizeString(value: unknown, maxLen?: number): string;
386
+
387
+ interface AuthCheckResult {
388
+ ok: boolean;
389
+ code?: number;
390
+ message?: string;
391
+ }
392
+ /** 校验 Userinfo 头(us##lv##tk),仅在 requireAuth=1 时由路由层调用 */
393
+ declare function validateHttpAuth(req: any, $asai: any, pathname: string): AuthCheckResult;
394
+
395
+ /**
396
+ * 统一数据存储注册表 — file / sqlite / mysql 自由切换,全库数据读写经此入口
397
+ */
398
+
399
+ type StoreDomain = 'user' | 'log' | (string & {});
400
+
401
+ declare const initAsaiHost: AsaiNodejsHostPlugin;
402
+
403
+ /** 构建时注入的版本号(与 package.json version 同步) */
404
+ declare const PLUGIN_VERSION: string;
405
+
406
+ export { _default$1 as AsaiCommon, type AsaiHostOptions, type AsaiNodejsHostPlugin, type AsaiRuntime, type AsaiSecrets, index as AsaiUtils, type AuthCheckResult, type HostBootResult, type HostConfig, type HostSiteConfig, type LoggerConfig, PLUGIN_NAME, PLUGIN_VERSION, type ProxySiteConfig, type ReconnectOptions, type RouteFactory, type SecurityAuditEvent, type SecurityConfig, type SecurityEventType, type StoreDomain, type TransportKind, type WorkHandler, type WsWorkHandler, applySecretsToHostConfig, createTransportDataHandler, initAsaiHost as default, ensureDefaultConnection, getDefaultConnId, getHostAllowedRoots, getTransportBlock, getTransportDefault, hasTransportDefault, initAsaiHost, initHostserverApi, initHostserverWs, initTransportBridge, isDevDefaultPassword, loadAsaiSecrets, loadDotEnvFile, logSecurityEvent, normalizeHostConfig, normalizeSecurityConfig, registerApi, registerWs, resolveHttpsCertFromPaths, resolvePathUnderRoots, resolveReconnectOptions, sanitizeString, secureCompare, shouldAutoConnect, stripForbiddenSecretsFromHostConfig, syncApiRouteKeys, syncWsRouteKeys, _default as sysserver, validateAsaiSecrets, validateHostConfig, validateHttpAuth, validateProductionSecurity, wireTransportConnectionLogs };