refactor(packages): rename @snowluma/bridge → @snowluma/protocol

The package previously named "bridge" houses the protocol-byte layer
(OIDB cmds, msg-push decoders, highway uploaders, element-builder,
event bus). The name "bridge" suggested transport/lifecycle, which it
isn't — that role lives in core/hook and core/bridge/manager. Rename
to match what's actually inside.

This is a pure rename: zero logic changes, all 73 import sites updated
mechanically and TS-verified. core/onebot dependencies key updated.
ESLint override path adjusted for the moved oidb-services directory.

Rename detection threshold: git log --find-renames=20% recommended
when following history across this commit — content-replacement
(@snowluma/bridge → @snowluma/protocol) dropped per-file similarity
below git's default 50% on import-heavy files.
This commit is contained in:
DrSmoothl committed 2026-05-23 23:31:03 +08:00
1 parent 98296fcec5
commit c16064d7e3
238 files changed
+247 -284

No files matched your search

@@ -13,7 +13,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { protobuf_encode } from '@snowluma/proton';
import { subscribeLogs, type LogEntry } from '@snowluma/common/logger';
vi.mock('@snowluma/bridge/highway', () => ({
vi.mock('@snowluma/protocol/highway', () => ({
fetchHighwaySession: vi.fn(async () => ({ sessionId: 'fake-session' })),
uploadHighwayHttp: vi.fn(async () => undefined),
buildHighwayExtend: vi.fn(() => new Uint8Array([0xAA, 0xBB])),
@@ -24,12 +24,12 @@ vi.mock('@snowluma/bridge/highway', () => ({
import {
runNtv2Upload,
type MediaSubFileUpload,
} from '@snowluma/bridge/highway/pipeline';
} from '@snowluma/protocol/highway/pipeline';
import type { OidbBase } from '@snowluma/proto-defs/oidb';
import type { NTV2UploadRichMediaResp } from '@snowluma/proto-defs/highway';
import { MsgPushRegistry } from '@snowluma/bridge/msg-push/registry';
import type { MsgPushContext } from '@snowluma/bridge/msg-push/context';
import { decodeEvent0x2DC } from '@snowluma/bridge/msg-push/decoders/event-0x2dc';
import { MsgPushRegistry } from '@snowluma/protocol/msg-push/registry';
import type { MsgPushContext } from '@snowluma/protocol/msg-push/context';
import { decodeEvent0x2DC } from '@snowluma/protocol/msg-push/decoders/event-0x2dc';
function encodeOidbResponse(body: unknown): Buffer {
return Buffer.from(protobuf_encode<OidbBase<NTV2UploadRichMediaResp>>({