Split the QQ NT client lifecycle / hook injection layer out of @snowluma/core into its own self-contained package. The new bridge package owns: - native hook addon loader (injector) - HookManager + per-PID HookSession orchestration - PipeWatcher for QQ process discovery - QqHookClient pipe protocol - qq-port-probe for early UIN sniffing The hook layer used to type its main collaborator as `BridgeManager` directly. To keep the new package free of any dependency on @snowluma/core, the cross-package coupling is now expressed via a 3-method `BridgeManagerSink` interface that lives in the bridge package. BridgeManager (in core) satisfies the interface structurally with no source changes; the top-level app/webui still inject it the same way. Pure file relocation otherwise: git mv preserves history at 100% on every file, the only logic edit is the interface introduction in hook-manager.ts and an updated `nativeSearchDirs()` offset (one fewer `..` since hook now lives at packages/bridge/src instead of packages/core/src/hook).
61 lines
1.9 KiB
JSON
61 lines
1.9 KiB
JSON
{
|
|
"name": "@snowluma/bridge",
|
|
"version": "1.9.1",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "SnowLuma bridge — QQ NT desktop client lifecycle: hook injection (via native addon), per-PID HookSession orchestration, pipe-watcher for process discovery, and the BridgeManagerSink interface that lets the hook layer call back into a UIN-keyed session router without depending on @snowluma/core. Consumed by the top-level app entry (which constructs the BridgeManager from @snowluma/core and injects it as the sink) and by the WebUI server (read-only HookProcessInfo views).",
|
|
"main": "./src/index.ts",
|
|
"types": "./src/index.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./src/index.ts",
|
|
"default": "./src/index.ts"
|
|
},
|
|
"./hook-manager": {
|
|
"types": "./src/hook-manager.ts",
|
|
"default": "./src/hook-manager.ts"
|
|
},
|
|
"./hook-session": {
|
|
"types": "./src/hook-session.ts",
|
|
"default": "./src/hook-session.ts"
|
|
},
|
|
"./hook-packet-client": {
|
|
"types": "./src/hook-packet-client.ts",
|
|
"default": "./src/hook-packet-client.ts"
|
|
},
|
|
"./injector": {
|
|
"types": "./src/injector.ts",
|
|
"default": "./src/injector.ts"
|
|
},
|
|
"./pipe-watcher": {
|
|
"types": "./src/pipe-watcher.ts",
|
|
"default": "./src/pipe-watcher.ts"
|
|
},
|
|
"./qq-hook-client": {
|
|
"types": "./src/qq-hook-client.ts",
|
|
"default": "./src/qq-hook-client.ts"
|
|
},
|
|
"./qq-port-probe": {
|
|
"types": "./src/qq-port-probe.ts",
|
|
"default": "./src/qq-port-probe.ts"
|
|
},
|
|
"./types": {
|
|
"types": "./src/types.ts",
|
|
"default": "./src/types.ts"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"test": "vitest run",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@snowluma/common": "workspace:*"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^24.12.2",
|
|
"typescript": "catalog:",
|
|
"vite": "catalog:",
|
|
"vitest": "^4.1.4"
|
|
}
|
|
}
|