@khorsheed/dsh-library 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.en.md +49 -0
  3. package/README.i18n.yaml +6 -0
  4. package/README.md +48 -2
  5. package/cordis.patch.yml +17 -0
  6. package/lib/client.js +66276 -0
  7. package/lib/index.js +3318 -0
  8. package/lib/profiles-BXM8xNUf.js +1608 -0
  9. package/lib/profiles-BrbeM-bi.js +1635 -0
  10. package/lib/profiles-CFrPQdfO.js +1692 -0
  11. package/lib/profiles-DxtzIUvd.js +1632 -0
  12. package/lib/profiles-O0ddEit3.js +1631 -0
  13. package/lib/profiles-Oj-zBAY9.js +1692 -0
  14. package/lib/profiles-gIEviEuO.js +1610 -0
  15. package/lib/store-CIcZgTsg.js +1456 -0
  16. package/lib/store-DfYOmS44.js +1418 -0
  17. package/lib/tool.js +1597 -0
  18. package/lib/typert.host.d.ts +3 -0
  19. package/lib/typert.host.js +3811 -0
  20. package/lib/typert.remote-client.d.ts +137 -0
  21. package/lib/typert.remote-client.js +3077 -0
  22. package/lib/types/cards.d.ts +41 -0
  23. package/lib/types/cards.js +111 -0
  24. package/lib/types/client/LibraryPane.d.ts +26 -0
  25. package/lib/types/client/LibraryPane.js +117 -0
  26. package/lib/types/client/bind/BindChip.d.ts +33 -0
  27. package/lib/types/client/bind/BindChip.js +102 -0
  28. package/lib/types/client/contract.d.ts +164 -0
  29. package/lib/types/client/contract.js +1 -0
  30. package/lib/types/client/covers.d.ts +36 -0
  31. package/lib/types/client/covers.js +66 -0
  32. package/lib/types/client/definition.d.ts +27 -0
  33. package/lib/types/client/definition.js +32 -0
  34. package/lib/types/client/icons-local.d.ts +41 -0
  35. package/lib/types/client/icons-local.js +25 -0
  36. package/lib/types/client/icons.d.ts +27 -0
  37. package/lib/types/client/icons.js +11 -0
  38. package/lib/types/client/index.d.ts +35 -0
  39. package/lib/types/client/index.js +219 -0
  40. package/lib/types/client/judge.d.ts +70 -0
  41. package/lib/types/client/judge.js +262 -0
  42. package/lib/types/client/locales.d.ts +553 -0
  43. package/lib/types/client/locales.js +1076 -0
  44. package/lib/types/client/look.d.ts +63 -0
  45. package/lib/types/client/look.js +64 -0
  46. package/lib/types/client/math.d.ts +24 -0
  47. package/lib/types/client/math.js +47 -0
  48. package/lib/types/client/mistakes.d.ts +21 -0
  49. package/lib/types/client/mistakes.js +28 -0
  50. package/lib/types/client/preset-visibility.d.ts +109 -0
  51. package/lib/types/client/preset-visibility.js +123 -0
  52. package/lib/types/client/quiz-drafts.d.ts +29 -0
  53. package/lib/types/client/quiz-drafts.js +50 -0
  54. package/lib/types/client/store.d.ts +109 -0
  55. package/lib/types/client/store.js +44 -0
  56. package/lib/types/client/titles.d.ts +17 -0
  57. package/lib/types/client/titles.js +23 -0
  58. package/lib/types/client/ui.d.ts +96 -0
  59. package/lib/types/client/ui.js +124 -0
  60. package/lib/types/client/views/book.d.ts +57 -0
  61. package/lib/types/client/views/book.js +164 -0
  62. package/lib/types/client/views/cards.d.ts +17 -0
  63. package/lib/types/client/views/cards.js +53 -0
  64. package/lib/types/client/views/home.d.ts +26 -0
  65. package/lib/types/client/views/home.js +263 -0
  66. package/lib/types/client/views/lesson.d.ts +42 -0
  67. package/lib/types/client/views/lesson.js +146 -0
  68. package/lib/types/client/views/path.d.ts +32 -0
  69. package/lib/types/client/views/path.js +64 -0
  70. package/lib/types/client/views/quiz.d.ts +42 -0
  71. package/lib/types/client/views/quiz.js +366 -0
  72. package/lib/types/client/views/station-quiz.d.ts +43 -0
  73. package/lib/types/client/views/station-quiz.js +203 -0
  74. package/lib/types/client/views/station.d.ts +18 -0
  75. package/lib/types/client/views/station.js +142 -0
  76. package/lib/types/image-refs.d.ts +35 -0
  77. package/lib/types/image-refs.js +71 -0
  78. package/lib/types/index.d.ts +51 -0
  79. package/lib/types/index.js +31 -0
  80. package/lib/types/mastery.d.ts +81 -0
  81. package/lib/types/mastery.js +110 -0
  82. package/lib/types/profiles.d.ts +31 -0
  83. package/lib/types/profiles.js +25 -0
  84. package/lib/types/remote.d.ts +355 -0
  85. package/lib/types/remote.js +332 -0
  86. package/lib/types/service/assess.d.ts +144 -0
  87. package/lib/types/service/assess.js +773 -0
  88. package/lib/types/service/bindings.d.ts +92 -0
  89. package/lib/types/service/bindings.js +198 -0
  90. package/lib/types/service/cards.d.ts +85 -0
  91. package/lib/types/service/cards.js +320 -0
  92. package/lib/types/service/core.d.ts +124 -0
  93. package/lib/types/service/core.js +169 -0
  94. package/lib/types/service/pages.d.ts +60 -0
  95. package/lib/types/service/pages.js +125 -0
  96. package/lib/types/service/roadmap.d.ts +99 -0
  97. package/lib/types/service/roadmap.js +284 -0
  98. package/lib/types/service/rules.d.ts +63 -0
  99. package/lib/types/service/rules.js +245 -0
  100. package/lib/types/service/shelf.d.ts +136 -0
  101. package/lib/types/service/shelf.js +422 -0
  102. package/lib/types/service.d.ts +42 -0
  103. package/lib/types/service.js +41 -0
  104. package/lib/types/store.d.ts +257 -0
  105. package/lib/types/store.js +1376 -0
  106. package/lib/types/tool-definition.d.ts +49 -0
  107. package/lib/types/tool-definition.js +49 -0
  108. package/lib/types/tool.d.ts +71 -0
  109. package/lib/types/tool.js +174 -0
  110. package/lib/types/tools/assess.d.ts +11 -0
  111. package/lib/types/tools/assess.js +82 -0
  112. package/lib/types/tools/binding.d.ts +11 -0
  113. package/lib/types/tools/binding.js +46 -0
  114. package/lib/types/tools/cards.d.ts +11 -0
  115. package/lib/types/tools/cards.js +100 -0
  116. package/lib/types/tools/kit.d.ts +215 -0
  117. package/lib/types/tools/kit.js +281 -0
  118. package/lib/types/tools/notes.d.ts +11 -0
  119. package/lib/types/tools/notes.js +40 -0
  120. package/lib/types/tools/page.d.ts +11 -0
  121. package/lib/types/tools/page.js +59 -0
  122. package/lib/types/tools/project.d.ts +11 -0
  123. package/lib/types/tools/project.js +67 -0
  124. package/lib/types/tools/quiz.d.ts +11 -0
  125. package/lib/types/tools/quiz.js +74 -0
  126. package/lib/types/tools/read.d.ts +11 -0
  127. package/lib/types/tools/read.js +127 -0
  128. package/lib/types/tools/resource.d.ts +11 -0
  129. package/lib/types/tools/resource.js +147 -0
  130. package/lib/types/tools/roadmap.d.ts +11 -0
  131. package/lib/types/tools/roadmap.js +102 -0
  132. package/lib/types/types.d.ts +752 -0
  133. package/lib/types/types.js +159 -0
  134. package/locale/en.json +6 -0
  135. package/locale/zh.json +6 -0
  136. package/package.json +135 -3
package/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ # 变更记录
2
+
3
+ ## 0.1.0(2026-10-26)
4
+
5
+ 首个公开发布:图书馆——让 agent 当你的读书教练,帮你排进度、记笔记、出题,还盯着你把错题订正对。随「学习套件」安装,只在学习模式的会话里出现。
6
+
7
+ - **说清读什么就能开始**:书名和版本说清楚就够,不用上传整本书;只说想学的领域也行,教练照你的底子挑知识点和教材。
8
+ - **路线你点头才算**:教练照目录起草学习路线,你点「采用」才生效。路线是一条竖排的课程轨道,每一站是一课(3–5 个考点),标着状态和考点进度;没有哪一站上锁,可以跟着走,也可以挑感兴趣的先学。
9
+ - **每站一份讲义**:从站点导引的「开始学这一站」打开讲义页,讲义就是这一课本身(参考资料放在最后),覆盖这一站的每个考点;进站时才写,旧版本保留。
10
+ - **拍一页就能记笔记**:读到哪页拍一下,划线和页边批注自动整理成卡片。
11
+ - **学完一站就测**:每一站都是一套带考点的小测,题目从你划过、问过、做错的内容里出;选择填空当场出分,问答题教练来批;过关后教练问你下一站学什么。
12
+ - **错题不翻篇**:答错的题进「待订正」,订正对了才算掌握这个考点;「今日」把待订正的题和该复习的卡片列好。
13
+ - **书和项目页一目了然**:封面、干净的书名、分段进度条,目录默认折叠;删除前用宿主的确认框按类列出会删掉什么。
14
+ - **教练的工具面精简**:工具描述和提示词大幅瘦身(工具约 23.9k → 10.7k 字符,提示约 2.8k → 1.2k),结果更短并附下一步;讲义放错位置时直接告诉它怎么改。
package/README.en.md ADDED
@@ -0,0 +1,49 @@
1
+ # @khorsheed/dsh-library
2
+
3
+ English | [中文](README.md)
4
+
5
+ Let an agent be your reading coach: it plans your pace, takes your notes, writes your quizzes, and keeps after you until every wrong answer is fixed.
6
+
7
+ The hard part of teaching yourself a book is that nobody keeps you on track: you plan the pace, copy the notes, write the questions, and the ones you got wrong are forgotten by next time. With the library, tell the coach which book you're reading and it drafts a study path first; snap a page as you read and your highlights and margin notes become cards; take a short quiz after each chapter, and the questions you missed stay around until you get them right.
8
+
9
+ <img src="https://raw.githubusercontent.com/Khorsheed/dsh-basic/main/docs/screenshots/learning-1.png" width="560" alt="A learning-mode session: the coach's grading table on the left; on the right, the Library's Today page with your projects, today's retakes and recent changes">
10
+
11
+ ## What it does
12
+
13
+ - **Say what you're reading and start**: the title and edition are enough; no need to upload the book. Or just name a field ("calculus from zero, pick the textbook for me") and it picks the topics and textbooks for your level.
14
+ - **It drafts the path, you say yes**: it plans a study path from the table of contents; nothing counts until you press "Adopt as this textbook’s path". Then follow it station by station, or jump to whichever station interests you first.
15
+ - **Snap a page, get your notes**: photograph the page you're on and your highlights and margin notes turn into cards; no copying by hand.
16
+ - **Finish a chapter, take a quiz**: questions come from what you highlighted, asked about, and got wrong; multiple choice and fill-in are marked on the spot, the coach marks the open questions.
17
+ - **Wrong answers don't get dropped**: missed questions go to "To retake", and a topic only counts as learned once you get them right.
18
+ - **A review list every day**: the Today page lists the questions to retake and the cards due, so you know what to do the moment you open it.
19
+
20
+ <img src="https://raw.githubusercontent.com/Khorsheed/dsh-basic/main/docs/screenshots/learning-2.png" width="560" alt="A textbook's path page: a 14-station study path with stations passed and points mastered at the top, and Retake 7 and Continue on the current station">
21
+
22
+ <img src="https://raw.githubusercontent.com/Khorsheed/dsh-basic/main/docs/screenshots/learning-3.png" width="560" alt="A retake paper: the missed questions one by one, each with an answer box and Submit, Approach and Broken buttons">
23
+
24
+ ## Install
25
+
26
+ In DSH, open Plugins → Add plugin, enter this package name, and press Install:
27
+
28
+ ```
29
+ @khorsheed/dsh-learning-suite
30
+ ```
31
+
32
+ The library comes with the Learning Suite. Then start a new session, pick "学习模式" (learning mode), and tell the coach what you want to read.
33
+
34
+ The library only appears in "学习模式" (learning mode) sessions. Its tools only make sense in learning mode, so they are handed only to learning mode sessions and other modes don't get tools and buttons they can't use. That is also why it should be installed with its suite rather than on its own — installed alone it doesn't show up.
35
+
36
+ ## Known limitations
37
+
38
+ - It doesn't read ebook files (EPUB, PDF); it records the title and table of contents only.
39
+ - Photos you take are sent into the session as a message, and the coach reads them there.
40
+
41
+ ## Compatibility
42
+
43
+ Needs DSH 0.1.7 or later; verified on 0.2.1.
44
+
45
+ ## For developers
46
+
47
+ - Entry points: `src/index.ts` (service and sidebar) and `src/tool.ts` (the coach's model tools); each tool's usage is in its own description.
48
+ - You can install this package alone (`dsh plugin --profile web add @khorsheed/dsh-library`), but its model tools must be granted by a mode, so on its own the sidebar does not appear.
49
+ - Part of [dsh-plugins](https://github.com/Khorsheed/dsh-plugins); open issues and contributions there. Changes: [CHANGELOG.md](CHANGELOG.md).
@@ -0,0 +1,6 @@
1
+ # Bilingual-pair consistency record: the git blob hash of each side as of the
2
+ # last confirmed-consistent state. Both languages carry equal authority; after
3
+ # editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write packages/library/README.en.md
5
+ packages/library/README.en.md: 2c0c4917eb346335dc489156c65c8abd17555f2e
6
+ packages/library/README.md: c1a2eac3d86c90c2c01f4479fa5c7c68f695ddb0
package/README.md CHANGED
@@ -1,3 +1,49 @@
1
- # Temporary Holding Version
1
+ # @khorsheed/dsh-library
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [English](README.en.md) | 中文
4
+
5
+ 让 agent 当你的读书教练:帮你排进度、记笔记、出题,还盯着你把错题订正对。
6
+
7
+ 自学一本书,最烦的是没人管:进度自己排,笔记自己抄,题自己出,错题下次还没人提醒。装上图书馆,告诉教练你在读哪本书,它会先帮你排一版学习路线;读的时候拍一页书,划线和页边批注会自动整理成卡片;每学完一章做套小测,错题会一直留着,直到你订正对为止。
8
+
9
+ <img src="https://raw.githubusercontent.com/Khorsheed/dsh-basic/main/docs/screenshots/learning-1.png" width="560" alt="学习模式的会话:左边是教练给出的判分结果表,右栏图书馆的今日页列出各个学习项目、今日复习里待订正的题和最近的变化">
10
+
11
+ ## 能做什么
12
+
13
+ - **告诉它读什么就能开始**:书名和版本说清楚就够,不用上传整本书;只说想学的领域也行(「从零学微积分,教材你帮我挑」),它照你的底子挑知识点和教材。
14
+ - **路线它先排,你点头才算**:它会照目录起草一版学习路线,你看着合适点「采用」才生效;之后可以跟着路线一站站过关,也可以挑感兴趣的站先学。
15
+ - **拍一页就能记笔记**:读到哪页拍一下,划线和页边批注自动变成卡片,不用手抄。
16
+ - **学完一章就测**:题目从你划过的、问过的、做错的内容里出;选择填空当场出分,问答题教练来批。
17
+ - **错题不翻篇**:答错的题进「待订正」,订正对了才算掌握这个知识点。
18
+ - **每天照着清单复习**:今日页把要订正的题、该复习的卡片列好,打开就知道干什么。
19
+
20
+ <img src="https://raw.githubusercontent.com/Khorsheed/dsh-basic/main/docs/screenshots/learning-2.png" width="560" alt="一本教材的路线页:14 站的学习路线,顶部是站过关和考点掌握进度,当前一站有「去订正 7 题」和「接着学这一站」">
21
+
22
+ <img src="https://raw.githubusercontent.com/Khorsheed/dsh-basic/main/docs/screenshots/learning-3.png" width="560" alt="订正页:错题逐题列出,每题下面是作答框和「提交」「讲讲思路」「题有问题」">
23
+
24
+ ## 安装
25
+
26
+ 在 DSH 的「插件 → 添加插件」里输入下面的包名,点安装:
27
+
28
+ ```
29
+ @khorsheed/dsh-learning-suite
30
+ ```
31
+
32
+ 图书馆会跟着「学习套件」一起装好。装完开一个新会话,选「学习模式」,告诉教练你想读什么书。
33
+
34
+ 图书馆只在学习模式的会话里出现。它的工具只对学习模式有用,所以只交给学习模式的会话,其它模式不会多出用不上的工具和按钮;这也是要连同套件一起装、不要只装本包的原因——单独装时它不会出现。
35
+
36
+ ## 已知限制
37
+
38
+ - 不读取书的电子文件(EPUB、PDF),只登记书名和目录。
39
+ - 拍的照片会作为一条消息发进会话,由教练来识别。
40
+
41
+ ## Compatibility
42
+
43
+ 需要 DSH 0.1.7 或更新版本,已在 0.2.1 上验证。
44
+
45
+ ## 给开发者
46
+
47
+ - 入口:`src/index.ts`(服务与侧栏)、`src/tool.ts`(教练用的模型工具);工具的用法写在各自的描述里。
48
+ - 也可以单独安装本包(`dsh plugin --profile web add @khorsheed/dsh-library`),但它的模型工具要由某个模式授予,单装时侧栏不会出现。
49
+ - 隶属 [dsh-plugins](https://github.com/Khorsheed/dsh-plugins),问题与贡献请到该仓库;变更见 [CHANGELOG.md](CHANGELOG.md)。
@@ -0,0 +1,17 @@
1
+ # @khorsheed/dsh-library bundle patch: inserts the library row into the
2
+ # composing profile, so `dsh plugin --profile <name> add @khorsheed/dsh-library`
3
+ # reconciles it into the bundles layer. The row is a bare mount — the host half
4
+ # provides the `library` service core and mounts its thin Remote face; the
5
+ # browser half is discovered through the package.json `dsh.client` block. The
6
+ # model face (library_read + library_<名词> 写工具 + library_assess + the coach prompt
7
+ # section + the library skill) is NOT this row: it is the `./tool` composition
8
+ # entry, which an agent preset names (the evaluation-family fold pattern) — a
9
+ # profile-root tool row would grant every session.
10
+ #
11
+ # NOTE: a composition must mount this row id exactly once. Official images
12
+ # mount no library row, so plugin-adding this package is the install path
13
+ # there; a composition that already mounts the id by other means must NOT also
14
+ # add it — a duplicate loader entry id fails boot.
15
+ - insert:
16
+ - id: library
17
+ name: "@khorsheed/dsh-library"