protocol/package.json 有 273 行专给 91 个 oidb-service(每个 3 行 1:1);加一个 service 忘改 package.json → build 期解析失败。把所有严格 1:1 的目录组折叠成通配符 (moduleResolution:"bundler" 原生支持),消除永久手同步负担。 - protocol:./oidb-services/*(91) + ./highway/*(7) + ./web/*(7) + ./msg-push/*(3); bare ./msg-push / ./highway(exact)与单文件 export 原样保留。 - proto-defs:./oidb-actions/*(10)。 - 净 -467/+15 行;两包均 private:true,通配新暴露的少量内部文件无害(exports 只 gate 跨包解析、无外部消费者、无副作用)。 零源码/import 改动。全套工具链验证:12 包 typecheck Done、protocol/onebot(516)/ core(467)/mcp(22) 测试全绿;对抗性 Agent 端到端解析 136 个真实深导入全部命中、 确认 exact/wildcard 共存正确。
75 lines
2.3 KiB
JSON
75 lines
2.3 KiB
JSON
{
|
|
"license": "SEE LICENSE IN LICENSE",
|
|
"name": "@snowluma/proto-defs",
|
|
"version": "1.11.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "SnowLuma QQ/Lagrange wire-protobuf type definitions. Pure TypeScript interfaces with proton's `pb<N, T>` marker types — `@snowluma/proton`'s vite plugin compiles them into zero-runtime encoder/decoder functions at the call sites in `@snowluma/core` (and any downstream consumer). Exposed as per-file subpaths (`@snowluma/proto-defs/oidb`, `@snowluma/proto-defs/message`, …) so the import-site shape mirrors the legacy `bridge/proto/proton/*` layout and avoids name collisions across files (notably `highway.ts` and `oidb-actions/media.ts` share NTV2-prefixed names).",
|
|
"main": "./src/index.ts",
|
|
"types": "./src/index.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./src/index.ts",
|
|
"default": "./src/index.ts"
|
|
},
|
|
"./action": {
|
|
"types": "./src/action.ts",
|
|
"default": "./src/action.ts"
|
|
},
|
|
"./element": {
|
|
"types": "./src/element.ts",
|
|
"default": "./src/element.ts"
|
|
},
|
|
"./highway": {
|
|
"types": "./src/highway.ts",
|
|
"default": "./src/highway.ts"
|
|
},
|
|
"./longmsg": {
|
|
"types": "./src/longmsg.ts",
|
|
"default": "./src/longmsg.ts"
|
|
},
|
|
"./message": {
|
|
"types": "./src/message.ts",
|
|
"default": "./src/message.ts"
|
|
},
|
|
"./get-group-msg": {
|
|
"types": "./src/get-group-msg.ts",
|
|
"default": "./src/get-group-msg.ts"
|
|
},
|
|
"./get-c2c-msg": {
|
|
"types": "./src/get-c2c-msg.ts",
|
|
"default": "./src/get-c2c-msg.ts"
|
|
},
|
|
"./notify": {
|
|
"types": "./src/notify.ts",
|
|
"default": "./src/notify.ts"
|
|
},
|
|
"./ptt-trans": {
|
|
"types": "./src/ptt-trans.ts",
|
|
"default": "./src/ptt-trans.ts"
|
|
},
|
|
"./oidb": {
|
|
"types": "./src/oidb.ts",
|
|
"default": "./src/oidb.ts"
|
|
},
|
|
"./oidb-action": {
|
|
"types": "./src/oidb-action.ts",
|
|
"default": "./src/oidb-action.ts"
|
|
},
|
|
"./oidb-actions/*": {
|
|
"types": "./src/oidb-actions/*.ts",
|
|
"default": "./src/oidb-actions/*.ts"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@snowluma/proton": "workspace:*"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^24.12.2",
|
|
"typescript": "catalog:"
|
|
}
|
|
}
|