#6 was the "API层挂到ctx" item — Core side delivered the 13 typed
Api classes back in the e8d1af4...f4c6838 commit series; this turn
finished the OneBot side via the 4 ctx slim-down commits
(cb698d2 / 4c4ce60 / 8bf2ff3 / d983635).
ApiActionContext shrank from 90+ fields → ~30. Removed surfaces:
- groupAdmin / groupFile / groupAlbum / friend / interaction /
message / profile / web — all moved to direct
`ctx.bridge.apis.<area>.method()` invocations.
Kept surfaces (real composition, not pass-through):
- instance state: bridge / getLoginInfo / isOnline / getMessage*
- module helpers: sendXxxMessage / sendXxxForwardMsg / forwardSingle /
deleteMessage / setEssenceMsg / setMsgEmojiLike / handleGroupRequest
- cache-backed reads: getFriendList / getGroupList / getGroupInfo
/Member* / getStrangerInfo / getGroupFiles / get*MsgHistory /
handleGetGroupSystemMsg / getDownloadRKeys
- media store reads: getImageInfo / getRecordInfo
Full NapCat class-per-action conversion (TypeBox schemas / actionName
enum / auto-register decorator / 170 single-file classes) deliberately
not pursued — the metadata-driven design is meaningful only with
downstream doc/test tooling that consumes it, which SnowLuma doesn't
ship today. Marked as a follow-up under the same item if/when that
tooling appears.
- #2 (Proton ts+map fallback for unbundled debug) — landed in
`994633e feat(proton): resolve bare specifiers via TypeScript module
resolution` + `6c7e56d refactor(proto-defs)`. Bare specifiers like
`@snowluma/proto-defs/oidb` now resolve to the original `.ts` source
through `ts.resolveModuleName` (Bundler mode), so tsx/node + vite
share the same import surface.
- #4 (proto definitions in their own package) — landed in
`6c7e56d refactor(proto-defs)`. Moved 13 proto `.ts` files (~3.3k
LOC) into the new `@snowluma/proto-defs` workspace package with
per-file subpath exports; 44 call sites across core/tests rewritten.
- #6 (NapCat-style Api on ctx) — half done. Core side fully landed
through 13 sequential commits (3e5dca1 → f4c6838) — `bridge.apis.<
area>.method()` covers all 13 areas, `BridgeInterface` is gone, the
`actions/*` directory is deleted. OneBot side is NOT done: actions
still receive an `ApiActionContext` (a flat bag of functions) and
call `ctx.bridge.apis.*` directly rather than going through a
dedicated OneBot Api class layer.
Update the debug optimization item to specify a Proton fallback plan: implement unpackaged debug with correct data directory and use TypeScript + map-based type extraction for tsx and Node.js, which will be stripped during normal Vite builds.
Remove the '测试要求' testing section from README.md and add a new RoadMap.md containing planned V2.0.0 tasks (unify Uid/Uin service with SQLite persistence, improve debug experience with no-packaging debug and correct data dir). This separates roadmap details from the README for clarity and future tracking.