Safety commit so the 94 uncommitted files in the working tree (in-flight Account/Mac/Tip work plus the feature-preview recording tooling) survive the move onto cursor/cloud-agent-1787824905651-vxuwc. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2.6 KiB
2.6 KiB
Typing Keyboard Baseline (Phase 0)
文档状态:Phase 0 冻结基线(历史快照,2026-08-03)。它记录当时的选型依据, 不随版本更新。当前权威的依赖版本与许可以
NOTICE-TYPING.md和OSGKeyboard/Resources/Typing/Rime/manifest.json为准;实施进展见docs/keyboard-accuracy-plan.md。
Frozen reference for NanoMouse × OSGKeyboard fusion.
NanoMouse reference
| Field | Value |
|---|---|
| Repo | https://github.com/xjwhnxjwhn/nanomouse |
| Frozen commit | a6177d898a01662ce551b43a01cf82a9f84ca54c (2026-07-29 tip at clone) |
| Local clone (gitignored) | .refs/nanomouse/ |
KeyboardKit / key shell
NanoMouse does not SPM-pin upstream KeyboardKit Pro. It vendors an MIT KeyboardKit tree inside:
ios/Packages/HamsterKeyboardKit/Sources/KeyboardKit/ (see that folder’s LICENSE).
OSG ships a lean SwiftUI key shell in-repo (OSGKeyboardExt/Typing/)
behind TypingLayoutProviding; KeyboardKit is not linked.
KeyboardKit Pro is not used.
Chinese schema / lexicon
| Choice | Detail |
|---|---|
| Product intent | Full pinyin + Microsoft/Sogou double pinyin + opt-in fuzzy pairs |
| Engine | librime 1.17.0 via static XCFramework (BSD-3-Clause) |
| Binary package | ghostflyby/librime-xcframework 1.17.0-pack.1, checksum 0f0fc13b…1164 |
| Baseline | rime-pinyin-simp (Apache-2.0) |
| Modern words | Jieba frequencies + phrase-pinyin-data + pinyin-data (MIT) |
| Generated lexicon | Resources/Typing/Rime/osg_pinyin.dict.yaml (~365K entries) |
| User learning | librime userdb in App Group |
| Explicitly excluded | rime-ice / rime-double-pinyin (GPL), Luna / Essay (LGPL) |
The dictionary is rebuilt deterministically by
Scripts/typing/build_rime_dictionary.py; manifest.json pins every source
commit and SHA-256.
Memory / height budget
| Mode | Target height | Memory notes |
|---|---|---|
| Voice | 281 pt (KeyboardRootView.totalHeight) |
Matches typing height; no typing engine loaded |
| Typing | 281 pt (TypingRootView.totalHeight) |
Host-prebuilt Rime data; extension opens one session |
| RSS goal | Typing peak < 50 MB | Session closes on voice switch / memory warning |
Success criteria (Phase 1)
- Top-right tab switches voice ↔ typing; recording/processing locks voice.
- English QWERTY + 123 / basic symbols.
- Full pinyin and Microsoft/Sogou double pinyin produce phrase candidates.
- Fuzzy pairs default off and are enabled individually in Settings.
- No GPL/LGPL input data in the app; NOTICE lists exact source licenses.