refactor(packages): extract @snowluma/bridge (hook + QQ lifecycle)
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).
This commit is contained in:
22 files changed
+161
-30
No files matched your search
Generated
+22
@@ -54,6 +54,25 @@ importers:
|
||||
specifier: ^8.58.2
|
||||
version: 8.58.2([email protected]([email protected]))([email protected])
|
||||
|
||||
packages/bridge:
|
||||
dependencies:
|
||||
'@snowluma/common':
|
||||
specifier: workspace:*
|
||||
version: link:../common
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^24.12.2
|
||||
version: 24.12.2
|
||||
typescript:
|
||||
specifier: 'catalog:'
|
||||
version: 6.0.2
|
||||
vite:
|
||||
specifier: 'catalog:'
|
||||
version: 8.0.8(@types/[email protected])([email protected])([email protected])([email protected])([email protected])
|
||||
vitest:
|
||||
specifier: ^4.1.4
|
||||
version: 4.1.4(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))
|
||||
|
||||
packages/common:
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
@@ -65,6 +84,9 @@ importers:
|
||||
|
||||
packages/core:
|
||||
dependencies:
|
||||
'@snowluma/bridge':
|
||||
specifier: workspace:*
|
||||
version: link:../bridge
|
||||
'@snowluma/common':
|
||||
specifier: workspace:*
|
||||
version: link:../common
|
||||
|
||||
Reference in new issue
Block a user