cotutor 0.2.0 → 0.4.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 (912) hide show
  1. package/LICENSE +249 -21
  2. package/NOTICE +42 -0
  3. package/README.md +115 -20
  4. package/avatars/chinese.webp +0 -0
  5. package/avatars/english.webp +0 -0
  6. package/avatars/math.webp +0 -0
  7. package/bin/cotutor.js +15 -5
  8. package/cards/canvas/card.css +8 -0
  9. package/cards/canvas/card.md +68 -0
  10. package/cards/choice/card.css +18 -0
  11. package/cards/choice/card.md +55 -0
  12. package/cards/code/card.css +5 -0
  13. package/cards/code/card.md +46 -0
  14. package/cards/dictation/card.css +10 -0
  15. package/cards/dictation/card.md +97 -0
  16. package/cards/image/card.css +10 -0
  17. package/cards/image/card.md +52 -0
  18. package/cards/lecture/card.css +9 -0
  19. package/cards/lecture/card.md +69 -0
  20. package/cards/paint/card.css +20 -0
  21. package/cards/paint/card.md +77 -0
  22. package/cards/photo/card.css +22 -0
  23. package/cards/photo/card.md +61 -0
  24. package/cards/read/card.css +6 -0
  25. package/cards/read/card.md +51 -0
  26. package/cards/text/card.css +3 -0
  27. package/cards/text/card.md +69 -0
  28. package/cards/tianzige/card.css +17 -0
  29. package/cards/tianzige/card.md +78 -0
  30. package/cards/tutor/card.css +79 -0
  31. package/cards/tutor/card.md +149 -0
  32. package/cards/word/card.css +24 -0
  33. package/cards/word/card.md +91 -0
  34. package/cards//346/235/277/344/271/246/346/200/216/344/271/210/345/206/231.md +159 -0
  35. package/dist/app/activity-eval-rules.d.ts +62 -0
  36. package/dist/app/activity-eval-rules.js +276 -0
  37. package/dist/app/activity-eval.d.ts +65 -0
  38. package/dist/app/activity-eval.js +159 -0
  39. package/dist/app/build.d.ts +11 -0
  40. package/dist/app/build.js +45 -0
  41. package/dist/app/cli/activities.d.ts +70 -0
  42. package/dist/app/cli/activities.js +196 -0
  43. package/dist/app/cli/cert.d.ts +12 -0
  44. package/dist/app/cli/cert.js +49 -0
  45. package/dist/app/cli/chalk/bake.d.ts +10 -0
  46. package/dist/app/cli/chalk/bake.js +58 -0
  47. package/dist/app/cli/chalk/browser.d.ts +16 -0
  48. package/dist/app/cli/chalk/browser.js +157 -0
  49. package/dist/app/cli/chalk/build.d.ts +14 -0
  50. package/dist/app/cli/chalk/build.js +100 -0
  51. package/dist/app/cli/chalk/dub.d.ts +51 -0
  52. package/dist/app/cli/chalk/dub.js +106 -0
  53. package/dist/app/cli/chalk/load-scene.d.ts +34 -0
  54. package/dist/app/cli/chalk/load-scene.js +117 -0
  55. package/dist/app/cli/chalk/main.d.ts +7 -0
  56. package/dist/app/cli/chalk/main.js +199 -0
  57. package/dist/app/cli/chalk/serve.d.ts +4 -0
  58. package/dist/app/cli/chalk/serve.js +28 -0
  59. package/dist/app/cli/chalk/snap.d.ts +65 -0
  60. package/dist/app/cli/chalk/snap.js +103 -0
  61. package/dist/app/cli/chalk/typecheck.d.ts +7 -0
  62. package/dist/app/cli/chalk/typecheck.js +51 -0
  63. package/dist/app/cli/doctor.d.ts +24 -0
  64. package/dist/app/cli/doctor.js +553 -0
  65. package/dist/app/cli/firewall.d.ts +24 -0
  66. package/dist/app/cli/firewall.js +79 -0
  67. package/dist/app/cli/grades.d.ts +14 -0
  68. package/dist/app/cli/grades.js +44 -0
  69. package/dist/{cli → app/cli}/init.d.ts +3 -1
  70. package/dist/app/cli/init.js +158 -0
  71. package/dist/app/cli/main.js +1038 -0
  72. package/dist/app/cli/migrate.d.ts +49 -0
  73. package/dist/app/cli/migrate.js +195 -0
  74. package/dist/app/cli/port-holder.d.ts +16 -0
  75. package/dist/app/cli/port-holder.js +34 -0
  76. package/dist/app/cli/port.d.ts +37 -0
  77. package/dist/app/cli/port.js +116 -0
  78. package/dist/app/cli/sandbox.d.ts +25 -0
  79. package/dist/app/cli/sandbox.js +166 -0
  80. package/dist/app/cli/serve-log.d.ts +13 -0
  81. package/dist/app/cli/serve-log.js +90 -0
  82. package/dist/app/cli/serve.d.ts +51 -0
  83. package/dist/app/cli/serve.js +168 -0
  84. package/dist/app/cli/service-windows.d.ts +50 -0
  85. package/dist/app/cli/service-windows.js +117 -0
  86. package/dist/app/cli/service.d.ts +138 -0
  87. package/dist/app/cli/service.js +429 -0
  88. package/dist/app/cli/shipped.d.ts +30 -0
  89. package/dist/app/cli/shipped.js +47 -0
  90. package/dist/app/cli/skeleton.d.ts +38 -0
  91. package/dist/app/cli/skeleton.js +161 -0
  92. package/dist/app/cli/skills.d.ts +59 -0
  93. package/dist/app/cli/skills.js +199 -0
  94. package/dist/app/cli/themes.d.ts +52 -0
  95. package/dist/app/cli/themes.js +148 -0
  96. package/dist/app/cli/tray-icons.d.ts +11 -0
  97. package/dist/app/cli/tray-icons.js +87 -0
  98. package/dist/app/cli/tray-ids.d.ts +6 -0
  99. package/dist/app/cli/tray-ids.js +6 -0
  100. package/dist/app/cli/tray-mac.d.ts +8 -0
  101. package/dist/app/cli/tray-mac.js +140 -0
  102. package/dist/app/cli/tray-run.d.ts +1 -0
  103. package/dist/app/cli/tray-run.js +33 -0
  104. package/dist/app/cli/tray-windows.d.ts +5 -0
  105. package/dist/app/cli/tray-windows.js +166 -0
  106. package/dist/app/cli/tray.d.ts +205 -0
  107. package/dist/app/cli/tray.js +618 -0
  108. package/dist/{cli → app/cli}/tutors.d.ts +15 -26
  109. package/dist/{cli → app/cli}/tutors.js +86 -110
  110. package/dist/app/cli/usage.d.ts +2 -0
  111. package/dist/app/cli/usage.js +35 -0
  112. package/dist/app/dictation/recognize.d.ts +18 -0
  113. package/dist/app/dictation/recognize.js +6 -0
  114. package/dist/app/dictation/route.d.ts +52 -0
  115. package/dist/app/dictation/route.js +511 -0
  116. package/dist/app/diff.d.ts +11 -0
  117. package/dist/app/diff.js +71 -0
  118. package/dist/app/http/access.d.ts +62 -0
  119. package/dist/app/http/access.js +180 -0
  120. package/dist/app/http/app.d.ts +241 -0
  121. package/dist/app/http/app.js +1159 -0
  122. package/dist/app/http/avatars.d.ts +17 -0
  123. package/dist/app/http/avatars.js +35 -0
  124. package/dist/app/http/dev-activities.d.ts +115 -0
  125. package/dist/app/http/dev-activities.js +193 -0
  126. package/dist/app/http/dev-overview.d.ts +108 -0
  127. package/dist/app/http/dev-overview.js +209 -0
  128. package/dist/app/http/dev-tutor-files.d.ts +80 -0
  129. package/dist/app/http/dev-tutor-files.js +151 -0
  130. package/dist/app/http/parent-home.d.ts +51 -0
  131. package/dist/app/http/parent-home.js +266 -0
  132. package/dist/app/http/parent-look.d.ts +2 -0
  133. package/dist/app/http/parent-look.js +151 -0
  134. package/dist/app/http/range.d.ts +9 -0
  135. package/dist/app/http/range.js +19 -0
  136. package/dist/app/http/raw-view.d.ts +117 -0
  137. package/dist/app/http/raw-view.js +149 -0
  138. package/dist/app/http/send-file.d.ts +7 -0
  139. package/dist/app/http/send-file.js +29 -0
  140. package/dist/{server → app/http}/stage.d.ts +9 -0
  141. package/dist/{server → app/http}/stage.js +34 -6
  142. package/dist/app/http/theme.d.ts +13 -0
  143. package/dist/app/http/theme.js +41 -0
  144. package/dist/app/http/voice-preview.d.ts +4 -0
  145. package/dist/app/http/voice-preview.js +34 -0
  146. package/dist/app/machine/bailian.d.ts +26 -0
  147. package/dist/app/machine/bailian.js +87 -0
  148. package/dist/app/mock/mock-live.d.ts +16 -0
  149. package/dist/app/mock/mock-live.js +140 -0
  150. package/dist/{server → app/mock}/mock.d.ts +38 -5
  151. package/dist/app/mock/mock.js +1125 -0
  152. package/dist/app/replay.d.ts +94 -0
  153. package/dist/app/replay.js +170 -0
  154. package/dist/app/skills/analyze-doc.d.ts +3 -0
  155. package/dist/app/skills/analyze-doc.js +47 -0
  156. package/dist/app/skills/home-doc.d.ts +5 -0
  157. package/dist/app/skills/home-doc.js +112 -0
  158. package/dist/app/skills/tune-doc.d.ts +3 -0
  159. package/dist/app/skills/tune-doc.js +80 -0
  160. package/dist/app/talk/list.d.ts +11 -0
  161. package/dist/app/talk/list.js +9 -0
  162. package/dist/app/talk/route.d.ts +16 -0
  163. package/dist/app/talk/route.js +142 -0
  164. package/dist/app/workspace.d.ts +63 -0
  165. package/dist/{cli → app}/workspace.js +100 -52
  166. package/dist/app/ws/route.d.ts +31 -0
  167. package/dist/app/ws/route.js +33 -0
  168. package/dist/app/ws/ws.d.ts +31 -0
  169. package/dist/app/ws/ws.js +169 -0
  170. package/dist/board/canvas-chat.d.ts +97 -0
  171. package/dist/board/canvas-chat.js +175 -0
  172. package/dist/board/card-guards.d.ts +15 -0
  173. package/dist/board/card-guards.js +38 -0
  174. package/dist/board/cards/canvas.d.ts +41 -0
  175. package/dist/board/cards/canvas.js +83 -0
  176. package/dist/{cards → board/cards}/choice.js +0 -12
  177. package/dist/{cards → board/cards}/code.js +0 -3
  178. package/dist/board/cards/dictation.d.ts +42 -0
  179. package/dist/board/cards/dictation.js +105 -0
  180. package/dist/board/cards/docs.d.ts +47 -0
  181. package/dist/board/cards/docs.js +152 -0
  182. package/dist/{cards → board/cards}/image.js +1 -10
  183. package/dist/board/cards/index.d.ts +62 -0
  184. package/dist/board/cards/index.js +144 -0
  185. package/dist/{cards → board/cards}/kind.d.ts +10 -4
  186. package/dist/board/cards/kind.js +9 -0
  187. package/dist/board/cards/lecture.d.ts +26 -0
  188. package/dist/board/cards/lecture.js +62 -0
  189. package/dist/board/cards/paint.d.ts +38 -0
  190. package/dist/board/cards/paint.js +85 -0
  191. package/dist/board/cards/photo.d.ts +15 -0
  192. package/dist/board/cards/photo.js +29 -0
  193. package/dist/{cards → board/cards}/read.js +1 -10
  194. package/dist/board/cards/text.d.ts +20 -0
  195. package/dist/board/cards/text.js +59 -0
  196. package/dist/board/cards/tianzige.d.ts +16 -0
  197. package/dist/board/cards/tianzige.js +64 -0
  198. package/dist/board/cards/tutor.d.ts +72 -0
  199. package/dist/board/cards/tutor.js +134 -0
  200. package/dist/board/cards/word.d.ts +20 -0
  201. package/dist/board/cards/word.js +76 -0
  202. package/dist/board/lecture.d.ts +100 -0
  203. package/dist/board/lecture.js +204 -0
  204. package/dist/board/paper.d.ts +20 -0
  205. package/dist/board/paper.js +76 -0
  206. package/dist/board/parse.d.ts +118 -0
  207. package/dist/board/parse.js +324 -0
  208. package/dist/board/presentation.d.ts +289 -0
  209. package/dist/board/presentation.js +613 -0
  210. package/dist/board/sections.d.ts +16 -0
  211. package/dist/board/sections.js +130 -0
  212. package/dist/brain/api-tools.d.ts +8 -0
  213. package/dist/brain/api-tools.js +191 -0
  214. package/dist/brain/api.d.ts +57 -0
  215. package/dist/brain/api.js +394 -0
  216. package/dist/brain/index.d.ts +97 -0
  217. package/dist/brain/index.js +11 -0
  218. package/dist/brain/log.d.ts +5 -0
  219. package/dist/brain/log.js +22 -0
  220. package/dist/brain/runtime.d.ts +30 -0
  221. package/dist/brain/runtime.js +23 -0
  222. package/dist/brain/stream-json.d.ts +16 -0
  223. package/dist/brain/stream-json.js +82 -0
  224. package/dist/brain/stream.d.ts +20 -0
  225. package/dist/brain/stream.js +70 -0
  226. package/dist/brain/transcript.d.ts +45 -0
  227. package/dist/brain/transcript.js +132 -0
  228. package/dist/brain/types.d.ts +99 -0
  229. package/dist/brain/types.js +14 -0
  230. package/dist/chalk/actions.d.ts +37 -0
  231. package/dist/chalk/actions.js +69 -0
  232. package/dist/chalk/bundle.d.ts +26 -0
  233. package/dist/chalk/bundle.js +69 -0
  234. package/dist/chalk/check.d.ts +28 -0
  235. package/dist/chalk/check.js +291 -0
  236. package/dist/chalk/circle.d.ts +64 -0
  237. package/dist/chalk/circle.js +193 -0
  238. package/dist/chalk/clock.d.ts +84 -0
  239. package/dist/chalk/clock.js +84 -0
  240. package/dist/chalk/geometry.d.ts +44 -0
  241. package/dist/chalk/geometry.js +139 -0
  242. package/dist/chalk/glyphs/capitals.d.ts +12 -0
  243. package/dist/chalk/glyphs/capitals.js +264 -0
  244. package/dist/chalk/glyphs/index.d.ts +21 -0
  245. package/dist/chalk/glyphs/index.js +18 -0
  246. package/dist/chalk/glyphs/letters.d.ts +13 -0
  247. package/dist/chalk/glyphs/letters.js +280 -0
  248. package/dist/chalk/glyphs/metrics.d.ts +33 -0
  249. package/dist/chalk/glyphs/metrics.js +28 -0
  250. package/dist/chalk/glyphs/registry.d.ts +7 -0
  251. package/dist/chalk/glyphs/registry.js +8 -0
  252. package/dist/chalk/glyphs/sample.d.ts +32 -0
  253. package/dist/chalk/glyphs/sample.js +102 -0
  254. package/dist/chalk/glyphs/skeleton.d.ts +64 -0
  255. package/dist/chalk/glyphs/skeleton.js +126 -0
  256. package/dist/chalk/glyphs/types.d.ts +58 -0
  257. package/dist/chalk/glyphs/types.js +17 -0
  258. package/dist/chalk/index.d.ts +23 -0
  259. package/dist/chalk/index.js +15 -0
  260. package/dist/chalk/manifest.d.ts +41 -0
  261. package/dist/chalk/manifest.js +6 -0
  262. package/dist/chalk/paint.d.ts +180 -0
  263. package/dist/chalk/paint.js +210 -0
  264. package/dist/chalk/pointer.d.ts +8 -0
  265. package/dist/chalk/pointer.js +21 -0
  266. package/dist/chalk/prepare.d.ts +11 -0
  267. package/dist/chalk/prepare.js +15 -0
  268. package/dist/chalk/scene-schema.d.ts +199 -0
  269. package/dist/chalk/scene-schema.js +91 -0
  270. package/dist/chalk/seed.d.ts +3 -0
  271. package/dist/chalk/seed.js +10 -0
  272. package/dist/chalk/text-metrics.d.ts +8 -0
  273. package/dist/chalk/text-metrics.js +156 -0
  274. package/dist/chalk/timeline.d.ts +47 -0
  275. package/dist/chalk/timeline.js +84 -0
  276. package/dist/chalk/types.d.ts +150 -0
  277. package/dist/chalk/types.js +8 -0
  278. package/dist/lib/index.d.ts +14 -12
  279. package/dist/lib/index.js +14 -12
  280. package/dist/media/draw.d.ts +23 -0
  281. package/dist/media/draw.js +44 -0
  282. package/dist/media/mp3.d.ts +6 -0
  283. package/dist/media/mp3.js +58 -0
  284. package/dist/media/mp4.d.ts +1 -0
  285. package/dist/media/mp4.js +58 -0
  286. package/dist/media/tts-voices.d.ts +18 -0
  287. package/dist/media/tts-voices.js +606 -0
  288. package/dist/media/tts.d.ts +56 -0
  289. package/dist/media/tts.js +174 -0
  290. package/dist/media/vision.d.ts +25 -0
  291. package/dist/media/vision.js +71 -0
  292. package/dist/memory/commit.d.ts +67 -0
  293. package/dist/memory/commit.js +130 -0
  294. package/dist/memory/context.d.ts +86 -0
  295. package/dist/memory/context.js +97 -0
  296. package/dist/memory/diary.d.ts +84 -0
  297. package/dist/memory/diary.js +183 -0
  298. package/dist/memory/grade.d.ts +2 -0
  299. package/dist/memory/grade.js +7 -0
  300. package/dist/{lib → memory}/plan.d.ts +1 -1
  301. package/dist/{lib → memory}/plan.js +1 -1
  302. package/dist/memory/proposals.d.ts +11 -0
  303. package/dist/memory/proposals.js +43 -0
  304. package/dist/memory/retrieval.d.ts +44 -0
  305. package/dist/memory/retrieval.js +157 -0
  306. package/dist/{lib → memory}/timetable.d.ts +0 -3
  307. package/dist/{lib → memory}/timetable.js +0 -11
  308. package/dist/memory/vault-notes.d.ts +165 -0
  309. package/dist/memory/vault-notes.js +359 -0
  310. package/dist/memory/vault.d.ts +70 -0
  311. package/dist/memory/vault.js +169 -0
  312. package/dist/realtime/bailian.d.ts +120 -0
  313. package/dist/realtime/bailian.js +289 -0
  314. package/dist/realtime/cues.d.ts +51 -0
  315. package/dist/realtime/cues.js +94 -0
  316. package/dist/realtime/listen.d.ts +32 -0
  317. package/dist/realtime/listen.js +53 -0
  318. package/dist/realtime/preview.d.ts +23 -0
  319. package/dist/realtime/preview.js +38 -0
  320. package/dist/realtime/prompt.d.ts +8 -0
  321. package/dist/realtime/prompt.js +13 -0
  322. package/dist/realtime/voices.d.ts +21 -0
  323. package/dist/realtime/voices.js +71 -0
  324. package/dist/runtime/activities.d.ts +29 -0
  325. package/dist/runtime/activities.js +72 -0
  326. package/dist/runtime/activity-state.d.ts +22 -0
  327. package/dist/runtime/activity-state.js +83 -0
  328. package/dist/runtime/activity.d.ts +63 -0
  329. package/dist/runtime/activity.js +428 -0
  330. package/dist/runtime/agent-file.d.ts +24 -0
  331. package/dist/runtime/agent-file.js +59 -0
  332. package/dist/runtime/auto-bookkeep.d.ts +30 -0
  333. package/dist/runtime/auto-bookkeep.js +84 -0
  334. package/dist/{lib → runtime/context}/context-pack.d.ts +3 -3
  335. package/dist/runtime/context/context-pack.js +182 -0
  336. package/dist/runtime/context/thread-digest.d.ts +4 -0
  337. package/dist/runtime/context/thread-digest.js +35 -0
  338. package/dist/runtime/context/tutor-rules.d.ts +25 -0
  339. package/dist/runtime/context/tutor-rules.js +47 -0
  340. package/dist/runtime/delivery/delivery.d.ts +94 -0
  341. package/dist/runtime/delivery/delivery.js +145 -0
  342. package/dist/runtime/delivery/playback.d.ts +25 -0
  343. package/dist/runtime/delivery/playback.js +29 -0
  344. package/dist/runtime/delivery/player.d.ts +145 -0
  345. package/dist/runtime/delivery/player.js +221 -0
  346. package/dist/runtime/delivery/queue.d.ts +89 -0
  347. package/dist/runtime/delivery/queue.js +59 -0
  348. package/dist/runtime/home/edit.d.ts +39 -0
  349. package/dist/runtime/home/edit.js +132 -0
  350. package/dist/runtime/home/home.d.ts +191 -0
  351. package/dist/runtime/home/home.js +318 -0
  352. package/dist/runtime/home/store.d.ts +142 -0
  353. package/dist/runtime/home/store.js +455 -0
  354. package/dist/runtime/journal/conversation.d.ts +46 -0
  355. package/dist/runtime/journal/conversation.js +89 -0
  356. package/dist/runtime/journal/events.d.ts +27 -0
  357. package/dist/runtime/journal/events.js +136 -0
  358. package/dist/runtime/journal/kid-log.d.ts +105 -0
  359. package/dist/runtime/journal/kid-log.js +133 -0
  360. package/dist/runtime/journal/ledger.d.ts +17 -0
  361. package/dist/{lib → runtime/journal}/ledger.js +7 -40
  362. package/dist/runtime/journal/mix.d.ts +42 -0
  363. package/dist/runtime/journal/mix.js +129 -0
  364. package/dist/runtime/journal/mouth-index.d.ts +26 -0
  365. package/dist/runtime/journal/mouth-index.js +34 -0
  366. package/dist/runtime/journal/mouth.d.ts +54 -0
  367. package/dist/runtime/journal/mouth.js +102 -0
  368. package/dist/runtime/journal/recorder.d.ts +91 -0
  369. package/dist/runtime/journal/recorder.js +148 -0
  370. package/dist/runtime/journal/store.d.ts +123 -0
  371. package/dist/runtime/journal/store.js +316 -0
  372. package/dist/runtime/kid-input.d.ts +16 -0
  373. package/dist/runtime/kid-input.js +194 -0
  374. package/dist/runtime/kid-view.d.ts +124 -0
  375. package/dist/runtime/kid-view.js +157 -0
  376. package/dist/runtime/lecture.d.ts +86 -0
  377. package/dist/runtime/lecture.js +237 -0
  378. package/dist/runtime/live/call.d.ts +231 -0
  379. package/dist/runtime/live/call.js +1244 -0
  380. package/dist/runtime/live/turns.d.ts +48 -0
  381. package/dist/runtime/live/turns.js +102 -0
  382. package/dist/runtime/runner.d.ts +243 -0
  383. package/dist/runtime/runner.js +777 -0
  384. package/dist/runtime/talk-run.d.ts +21 -0
  385. package/dist/runtime/talk-run.js +34 -0
  386. package/dist/scenes/dictation/match.d.ts +57 -0
  387. package/dist/scenes/dictation/match.js +255 -0
  388. package/dist/scenes/dictation/recognize.d.ts +86 -0
  389. package/dist/scenes/dictation/recognize.js +163 -0
  390. package/dist/scenes/dictation/store.d.ts +112 -0
  391. package/dist/scenes/dictation/store.js +99 -0
  392. package/dist/scenes/look.d.ts +26 -0
  393. package/dist/scenes/look.js +1 -0
  394. package/dist/scenes/paint/painter.d.ts +84 -0
  395. package/dist/scenes/paint/painter.js +171 -0
  396. package/dist/scenes/paint/prompt.d.ts +23 -0
  397. package/dist/scenes/paint/prompt.js +36 -0
  398. package/dist/scenes/talk/en-words.d.ts +8 -0
  399. package/dist/scenes/talk/en-words.js +44 -0
  400. package/dist/scenes/talk/list.d.ts +44 -0
  401. package/dist/scenes/talk/list.js +88 -0
  402. package/dist/scenes/talk/store.d.ts +27 -0
  403. package/dist/scenes/talk/store.js +61 -0
  404. package/dist/scenes/talk/warmup.d.ts +16 -0
  405. package/dist/scenes/talk/warmup.js +39 -0
  406. package/dist/schema/activity.d.ts +149 -0
  407. package/dist/schema/activity.js +113 -0
  408. package/dist/schema/board.d.ts +143 -2
  409. package/dist/schema/board.js +15 -3
  410. package/dist/schema/config.d.ts +339 -103
  411. package/dist/schema/config.js +269 -84
  412. package/dist/schema/context-pack.d.ts +76 -14
  413. package/dist/schema/context-pack.js +91 -10
  414. package/dist/{lib/conversation.d.ts → schema/conversation-files.d.ts} +11 -33
  415. package/dist/schema/conversation-files.js +26 -0
  416. package/dist/schema/conversation.d.ts +391 -49
  417. package/dist/schema/conversation.js +135 -19
  418. package/dist/schema/events.d.ts +138 -0
  419. package/dist/schema/events.js +1 -0
  420. package/dist/schema/home.d.ts +56 -0
  421. package/dist/schema/home.js +35 -0
  422. package/dist/schema/index.d.ts +14 -3
  423. package/dist/schema/index.js +14 -3
  424. package/dist/schema/kid-device.d.ts +20 -0
  425. package/dist/schema/kid-device.js +32 -0
  426. package/dist/schema/ledger.d.ts +8 -63
  427. package/dist/schema/ledger.js +7 -31
  428. package/dist/schema/memory.d.ts +73 -0
  429. package/dist/schema/memory.js +47 -0
  430. package/dist/schema/plan.d.ts +2 -2
  431. package/dist/schema/plan.js +2 -2
  432. package/dist/schema/sections.d.ts +32 -25
  433. package/dist/schema/sections.js +21 -22
  434. package/dist/schema/theme.d.ts +25 -0
  435. package/dist/schema/theme.js +26 -0
  436. package/dist/schema/timetable.d.ts +2 -2
  437. package/dist/schema/timetable.js +2 -2
  438. package/dist/schema/workspace.d.ts +68 -0
  439. package/dist/schema/workspace.js +37 -0
  440. package/dist/shared/default-port.d.ts +2 -0
  441. package/dist/shared/default-port.js +2 -0
  442. package/dist/shared/errors.d.ts +8 -0
  443. package/dist/shared/errors.js +13 -0
  444. package/dist/shared/home.d.ts +2 -0
  445. package/dist/shared/home.js +16 -0
  446. package/dist/shared/human-notes.d.ts +5 -0
  447. package/dist/shared/human-notes.js +7 -0
  448. package/dist/shared/qianwen.d.ts +54 -0
  449. package/dist/shared/qianwen.js +113 -0
  450. package/dist/shared/site-url.d.ts +2 -0
  451. package/dist/shared/site-url.js +5 -0
  452. package/dist/shared/time.d.ts +9 -0
  453. package/dist/shared/time.js +22 -0
  454. package/dist/shared/tokens.d.ts +18 -0
  455. package/dist/shared/tokens.js +11 -0
  456. package/dist/shared/wav.d.ts +10 -0
  457. package/dist/shared/wav.js +50 -0
  458. package/dist/stage/chunk-226TNLQA.js +129 -0
  459. package/dist/stage/chunk-24LGQEKE.js +1 -0
  460. package/dist/stage/chunk-25XV6UY3.js +10 -0
  461. package/dist/stage/chunk-2AZI3NHJ.js +1 -0
  462. package/dist/stage/chunk-2BQZTTBE.js +1 -0
  463. package/dist/stage/chunk-2M7CGY3Y.js +11 -0
  464. package/dist/stage/chunk-2VR4WFQ7.js +10 -0
  465. package/dist/stage/chunk-2ZYXBUWG.js +9 -0
  466. package/dist/stage/chunk-32LAWMGY.js +1 -0
  467. package/dist/stage/chunk-3LEMTSOO.js +11 -0
  468. package/dist/stage/chunk-3QCKGZYE.js +32 -0
  469. package/dist/stage/chunk-44P66WFA.js +1 -0
  470. package/dist/stage/chunk-4AM6FRR6.js +7 -0
  471. package/dist/stage/chunk-4QDE4SUK.js +1 -0
  472. package/dist/stage/chunk-4QESHV3U.js +1 -0
  473. package/dist/stage/chunk-4SG5QPHB.js +2 -0
  474. package/dist/stage/chunk-4T4UVCOC.js +1 -0
  475. package/dist/stage/chunk-4WUEPPG3.js +34 -0
  476. package/dist/stage/chunk-4YCN6UZ5.js +99 -0
  477. package/dist/stage/chunk-5V7ZY2AP.js +1 -0
  478. package/dist/stage/chunk-5VS5Y2VJ.js +6 -0
  479. package/dist/stage/chunk-5W4NO2ZD.js +62 -0
  480. package/dist/stage/chunk-65CRNICM.js +1 -0
  481. package/dist/stage/chunk-66MULO7F.js +5 -0
  482. package/dist/stage/chunk-6COFQTBS.js +162 -0
  483. package/dist/stage/chunk-6VZG3M3I.js +8 -0
  484. package/dist/stage/chunk-7HVDH43T.js +1 -0
  485. package/dist/stage/chunk-7JLJN4EZ.js +8 -0
  486. package/dist/stage/chunk-7QDSP4LN.js +1 -0
  487. package/dist/stage/chunk-7R6OQAO3.js +1 -0
  488. package/dist/stage/chunk-7VTTHZKW.js +7 -0
  489. package/dist/stage/chunk-ATHR5KEN.js +10 -0
  490. package/dist/stage/chunk-B6R5LTP2.js +36 -0
  491. package/dist/stage/chunk-BD4WE264.js +1 -0
  492. package/dist/stage/chunk-BONANU47.js +206 -0
  493. package/dist/stage/chunk-BTVW7OFK.js +89 -0
  494. package/dist/stage/chunk-BUTJIDHG.js +8 -0
  495. package/dist/stage/chunk-C2IPYMML.js +84 -0
  496. package/dist/stage/chunk-C54FTPPV.js +9 -0
  497. package/dist/stage/chunk-C6LOUF2Z.js +90 -0
  498. package/dist/stage/chunk-CFF3PILO.js +339 -0
  499. package/dist/stage/chunk-CI2FQ2JY.js +9 -0
  500. package/dist/stage/chunk-CW5O4RV7.js +12 -0
  501. package/dist/stage/chunk-CYABNQYD.js +1 -0
  502. package/dist/stage/chunk-D7FFA4NS.js +15 -0
  503. package/dist/stage/chunk-DUNNXU6Z.js +8 -0
  504. package/dist/stage/chunk-E3E4Q6JF.js +6 -0
  505. package/dist/stage/chunk-EB3U3LH7.js +9 -0
  506. package/dist/stage/chunk-EGSZ736B.js +8 -0
  507. package/dist/stage/chunk-EOBXW5VQ.js +2 -0
  508. package/dist/stage/chunk-ERZC3B7Y.js +11 -0
  509. package/dist/stage/chunk-ESDOOBIH.js +11 -0
  510. package/dist/stage/chunk-EVU4QAL4.js +178 -0
  511. package/dist/stage/chunk-EVVZI2NY.js +39 -0
  512. package/dist/stage/chunk-FBKAZUKD.js +39 -0
  513. package/dist/stage/chunk-FDVKYQJN.js +1 -0
  514. package/dist/stage/chunk-FGPVYHVR.js +5 -0
  515. package/dist/stage/chunk-FHUD4AZC.js +1 -0
  516. package/dist/stage/chunk-FKUJ2DMY.js +96 -0
  517. package/dist/stage/chunk-FNZGVIJV.js +1 -0
  518. package/dist/stage/chunk-GBYSEGYM.js +78 -0
  519. package/dist/stage/chunk-GCO4TDHX.js +1 -0
  520. package/dist/stage/chunk-GKTML2LG.js +10 -0
  521. package/dist/stage/chunk-GMDIHHXQ.js +11 -0
  522. package/dist/stage/chunk-GOUNACI3.js +10 -0
  523. package/dist/stage/chunk-GXAYATPF.js +3 -0
  524. package/dist/stage/chunk-H2K2DDXV.js +8 -0
  525. package/dist/stage/chunk-H3UJI6ZY.js +13 -0
  526. package/dist/stage/chunk-H6PUGCME.js +7 -0
  527. package/dist/stage/chunk-HNBUIMIG.js +1 -0
  528. package/dist/stage/chunk-HRZY2BJQ.js +10 -0
  529. package/dist/stage/chunk-HSPJGALW.js +30 -0
  530. package/dist/stage/chunk-IBYORHIP.js +25 -0
  531. package/dist/stage/chunk-IHF4EWTY.js +1 -0
  532. package/dist/stage/chunk-ISBRPNKI.js +1 -0
  533. package/dist/stage/chunk-IZ3OI3C2.js +2 -0
  534. package/dist/stage/chunk-JEFZAC2R.js +1 -0
  535. package/dist/stage/chunk-JFIGRDPO.js +1 -0
  536. package/dist/stage/chunk-JFVYBOOC.js +9 -0
  537. package/dist/stage/chunk-JGD4TUTQ.js +1 -0
  538. package/dist/stage/chunk-JO4BEHDH.js +4 -0
  539. package/dist/stage/chunk-JOWBS42C.js +1 -0
  540. package/dist/stage/chunk-JP3TM2TG.js +1 -0
  541. package/dist/stage/chunk-JVK2C52O.js +1 -0
  542. package/dist/stage/chunk-K4I76XBX.js +14 -0
  543. package/dist/stage/chunk-KA6CZZ4M.js +1 -0
  544. package/dist/stage/chunk-KESSJ36M.js +1 -0
  545. package/dist/stage/chunk-LKATEVRU.js +1 -0
  546. package/dist/stage/chunk-LS4EJ2EI.js +1 -0
  547. package/dist/stage/chunk-LUKJQC2X.js +70 -0
  548. package/dist/stage/chunk-LWULR3SM.js +1 -0
  549. package/dist/stage/chunk-LWVRFMKX.js +2 -0
  550. package/dist/stage/chunk-LXC4ZBPZ.js +1 -0
  551. package/dist/stage/chunk-M2UP255H.js +1 -0
  552. package/dist/stage/chunk-MAPPXUZQ.js +231 -0
  553. package/dist/stage/chunk-MBMPW7Z5.js +1 -0
  554. package/dist/stage/chunk-MD3HMMTK.js +1 -0
  555. package/dist/stage/chunk-MLPCUIKR.js +17 -0
  556. package/dist/stage/chunk-MNQIRPDQ.js +8 -0
  557. package/dist/stage/chunk-MRG7MJVS.js +1 -0
  558. package/dist/stage/chunk-MU6EXW72.js +10 -0
  559. package/dist/stage/chunk-MVU2X6LU.js +4 -0
  560. package/dist/stage/chunk-N6UA5CZV.js +36 -0
  561. package/dist/stage/chunk-NLZIT2TJ.js +7 -0
  562. package/dist/stage/chunk-NOJR3J7M.js +1 -0
  563. package/dist/stage/chunk-NT7ARDOL.js +1 -0
  564. package/dist/stage/chunk-NWOGMPZH.js +1 -0
  565. package/dist/stage/chunk-NXE4KMG3.js +40 -0
  566. package/dist/stage/chunk-O4YCZXD2.js +257 -0
  567. package/dist/stage/chunk-OAJZ7HLK.js +1 -0
  568. package/dist/stage/chunk-OCFCFASO.js +1 -0
  569. package/dist/stage/chunk-ODGPG5RY.js +7 -0
  570. package/dist/stage/chunk-ODUEA52Q.js +3 -0
  571. package/dist/stage/chunk-OGDJ3FCI.js +1 -0
  572. package/dist/stage/chunk-OLDJ55TT.js +1 -0
  573. package/dist/stage/chunk-OOCL4ATI.js +2 -0
  574. package/dist/stage/chunk-OQEFDUDV.js +1 -0
  575. package/dist/stage/chunk-OQWVEWG7.js +4 -0
  576. package/dist/stage/chunk-OUIX6BGK.js +1 -0
  577. package/dist/stage/chunk-OV7OZYUO.js +7 -0
  578. package/dist/stage/chunk-PFGDY33O.js +1 -0
  579. package/dist/stage/chunk-PFJDUJB3.js +139 -0
  580. package/dist/stage/chunk-PGEW76ER.js +1 -0
  581. package/dist/stage/chunk-PP76TAQX.js +32 -0
  582. package/dist/stage/chunk-PTBOP4OT.js +2 -0
  583. package/dist/stage/chunk-PX2RVHCK.js +1 -0
  584. package/dist/stage/chunk-Q7K3PNAD.js +1 -0
  585. package/dist/stage/chunk-QDDPLZDB.js +1 -0
  586. package/dist/stage/chunk-QLGLZ77F.js +1 -0
  587. package/dist/stage/chunk-QOPFDFHI.js +1 -0
  588. package/dist/stage/chunk-QXT4KAEJ.js +1 -0
  589. package/dist/stage/chunk-R4YVZCIT.js +1 -0
  590. package/dist/stage/chunk-R6P6EHWA.js +62 -0
  591. package/dist/stage/chunk-RCH3OXBI.js +9 -0
  592. package/dist/stage/chunk-RHPE44I2.js +1 -0
  593. package/dist/stage/chunk-RJ2R4FVC.js +1 -0
  594. package/dist/stage/chunk-RJH2YVTD.js +1 -0
  595. package/dist/stage/chunk-RLWWW5OB.js +6 -0
  596. package/dist/stage/chunk-S3WO35Z7.js +120 -0
  597. package/dist/stage/chunk-S7ZGX6MW.js +1 -0
  598. package/dist/stage/chunk-SIAWX27B.js +1 -0
  599. package/dist/stage/chunk-SLG4X622.js +1 -0
  600. package/dist/stage/chunk-SLJRBC77.js +168 -0
  601. package/dist/stage/chunk-SRORWQJZ.js +1 -0
  602. package/dist/stage/chunk-STZTUIIF.js +2 -0
  603. package/dist/stage/chunk-SVQ6MWNV.js +9 -0
  604. package/dist/stage/chunk-TL3HLL2S.js +132 -0
  605. package/dist/stage/chunk-U3DOE6SF.js +24 -0
  606. package/dist/stage/chunk-UABQIZKW.js +6 -0
  607. package/dist/stage/chunk-UDK3R764.js +1 -0
  608. package/dist/stage/chunk-UFF4E54B.js +41 -0
  609. package/dist/stage/chunk-UFP5Q4AY.js +1 -0
  610. package/dist/stage/chunk-UMH2TSW2.js +72 -0
  611. package/dist/stage/chunk-UTASVNF5.js +10 -0
  612. package/dist/stage/chunk-UW7ML5ML.js +88 -0
  613. package/dist/stage/chunk-V3J7F6OP.js +1 -0
  614. package/dist/stage/chunk-VEHP5B5Q.js +5 -0
  615. package/dist/stage/chunk-VRXWB733.js +9 -0
  616. package/dist/stage/chunk-VVDHBBS5.js +5 -0
  617. package/dist/stage/chunk-VYFOH6FU.js +106 -0
  618. package/dist/stage/chunk-W3VZTLQS.js +3 -0
  619. package/dist/stage/chunk-W7WNRWTZ.js +8 -0
  620. package/dist/stage/chunk-WHUCV53C.js +1 -0
  621. package/dist/stage/chunk-WULMYHIF.js +1 -0
  622. package/dist/stage/chunk-X54EX7AW.js +9 -0
  623. package/dist/stage/chunk-X565ISZM.js +1 -0
  624. package/dist/stage/chunk-XGZMDECB.js +1 -0
  625. package/dist/stage/chunk-XHONC4RF.js +172 -0
  626. package/dist/stage/chunk-XIK4XQ6E.js +24 -0
  627. package/dist/stage/chunk-XJQQWFTE.js +1 -0
  628. package/dist/stage/chunk-XM4WOU3I.js +13 -0
  629. package/dist/stage/chunk-XM7Y5HP5.js +38 -0
  630. package/dist/stage/chunk-XNYYRGD5.js +292 -0
  631. package/dist/stage/chunk-XOYVR3SV.js +1 -0
  632. package/dist/stage/chunk-XQIW5HCE.js +1 -0
  633. package/dist/stage/chunk-YEWL7FUW.js +8 -0
  634. package/dist/stage/chunk-YI55PY3V.js +1 -0
  635. package/dist/stage/chunk-YM63HI6W.js +1 -0
  636. package/dist/stage/chunk-YNLGLU4P.js +9 -0
  637. package/dist/stage/chunk-YTNMNOWP.js +1 -0
  638. package/dist/stage/chunk-YV62XKTC.js +1 -0
  639. package/dist/stage/chunk-YVBA3QW6.js +1 -0
  640. package/dist/stage/chunk-Z2SY2HOC.js +1 -0
  641. package/dist/stage/chunk-ZBTCQEBK.js +10 -0
  642. package/dist/stage/chunk-ZCUFN74D.js +1 -0
  643. package/dist/stage/chunk-ZHOULXEJ.js +11 -0
  644. package/dist/stage/chunk-ZTRZIET2.js +1 -0
  645. package/dist/stage/index.html +1 -0
  646. package/dist/stage/stage.css +1 -1
  647. package/dist/stage/stage.js +1 -4383
  648. package/dist/ui/dev/dev-page.d.ts +1 -0
  649. package/dist/ui/dev/dev-page.js +2021 -0
  650. package/dist/ui/dev/dev-theme.d.ts +6 -0
  651. package/dist/ui/dev/dev-theme.js +67 -0
  652. package/dist/ui/dev/voice-gallery-page.d.ts +1 -0
  653. package/dist/ui/dev/voice-gallery-page.js +121 -0
  654. package/dist/ui/dev/voice-scenes.d.ts +21 -0
  655. package/dist/ui/dev/voice-scenes.js +30 -0
  656. package/dist/ui/dictation/en-box.d.ts +2 -0
  657. package/dist/ui/dictation/en-box.js +86 -0
  658. package/dist/ui/dictation/en-page.d.ts +1 -0
  659. package/dist/ui/dictation/en-page.js +484 -0
  660. package/dist/ui/dictation/page.d.ts +1 -0
  661. package/dist/ui/dictation/page.js +1084 -0
  662. package/dist/ui/dictation/parent-page.d.ts +1 -0
  663. package/dist/ui/dictation/parent-page.js +234 -0
  664. package/dist/ui/dictation/reel-mode.d.ts +1 -0
  665. package/dist/ui/dictation/reel-mode.js +87 -0
  666. package/dist/ui/dictation/reel-page.d.ts +1 -0
  667. package/dist/ui/dictation/reel-page.js +62 -0
  668. package/dist/ui/dictation/reel.d.ts +163 -0
  669. package/dist/ui/dictation/reel.js +436 -0
  670. package/dist/ui/dictation/ui.d.ts +44 -0
  671. package/dist/ui/dictation/ui.js +80 -0
  672. package/dist/ui/dictation/unlock.d.ts +7 -0
  673. package/dist/ui/dictation/unlock.js +16 -0
  674. package/dist/ui/kid/audio-client.d.ts +11 -0
  675. package/dist/ui/kid/audio-client.js +74 -0
  676. package/dist/ui/kid/board-mark-art.d.ts +37 -0
  677. package/dist/ui/kid/board-mark-art.js +5 -0
  678. package/dist/ui/kid/board-mark.d.ts +24 -0
  679. package/dist/ui/kid/board-mark.js +58 -0
  680. package/dist/ui/kid/home-tiles.d.ts +14 -0
  681. package/dist/ui/kid/home-tiles.js +44 -0
  682. package/dist/ui/kid/kid-log.d.ts +15 -0
  683. package/dist/ui/kid/kid-log.js +87 -0
  684. package/dist/ui/kid/kid-nav.d.ts +11 -0
  685. package/dist/ui/kid/kid-nav.js +22 -0
  686. package/dist/ui/kid/kid-page.d.ts +9 -0
  687. package/dist/ui/kid/kid-page.js +3684 -0
  688. package/dist/ui/kid/letters.d.ts +26 -0
  689. package/dist/ui/kid/letters.js +51 -0
  690. package/dist/ui/kid/photo-edit.d.ts +83 -0
  691. package/dist/ui/kid/photo-edit.js +106 -0
  692. package/dist/ui/kid/photo-ui.d.ts +23 -0
  693. package/dist/ui/kid/photo-ui.js +60 -0
  694. package/dist/ui/kid/reel.d.ts +419 -0
  695. package/dist/ui/kid/reel.js +648 -0
  696. package/dist/ui/kid/tianzige.d.ts +8 -0
  697. package/dist/ui/kid/tianzige.js +45 -0
  698. package/dist/ui/kid/tutor-face.d.ts +35 -0
  699. package/dist/ui/kid/tutor-face.js +84 -0
  700. package/dist/ui/kid/voice-ui.d.ts +70 -0
  701. package/dist/ui/kid/voice-ui.js +316 -0
  702. package/dist/ui/kid/voice-view.d.ts +71 -0
  703. package/dist/ui/kid/voice-view.js +75 -0
  704. package/dist/ui/kid/word-draw.d.ts +2 -0
  705. package/dist/ui/kid/word-draw.js +107 -0
  706. package/dist/ui/kid/word-emoji.d.ts +10 -0
  707. package/dist/ui/kid/word-emoji.js +68 -0
  708. package/dist/ui/kid/word-layout.d.ts +25 -0
  709. package/dist/ui/kid/word-layout.js +29 -0
  710. package/dist/ui/parent/parent-home-page.d.ts +1 -0
  711. package/dist/ui/parent/parent-home-page.js +722 -0
  712. package/dist/ui/parent/parent-page.d.ts +2 -0
  713. package/dist/ui/parent/parent-page.js +511 -0
  714. package/dist/ui/parent/parent-settings-page.d.ts +1 -0
  715. package/dist/ui/parent/parent-settings-page.js +133 -0
  716. package/dist/ui/parent/qr-page.d.ts +8 -0
  717. package/dist/ui/parent/qr-page.js +66 -0
  718. package/dist/ui/shared/brand.d.ts +38 -0
  719. package/dist/ui/shared/brand.js +53 -0
  720. package/dist/ui/shared/favicon.d.ts +12 -0
  721. package/dist/ui/shared/favicon.js +96 -0
  722. package/dist/ui/shared/icon.d.ts +9 -0
  723. package/dist/ui/shared/icon.js +35 -0
  724. package/dist/ui/shared/inline-lib.d.ts +1 -0
  725. package/dist/ui/shared/inline-lib.js +28 -0
  726. package/dist/ui/shared/logo.d.ts +31 -0
  727. package/dist/ui/shared/logo.js +43 -0
  728. package/dist/ui/shared/page-dom.d.ts +12 -0
  729. package/dist/ui/shared/page-dom.js +36 -0
  730. package/dist/ui/shared/png.d.ts +1 -0
  731. package/dist/ui/shared/png.js +45 -0
  732. package/dist/ui/shared/qr-svg.d.ts +3 -0
  733. package/dist/ui/shared/qr-svg.js +32 -0
  734. package/dist/ui/shared/qr.d.ts +14 -0
  735. package/dist/ui/shared/qr.js +281 -0
  736. package/dist/ui/shared/reel-dock.d.ts +22 -0
  737. package/dist/ui/shared/reel-dock.js +365 -0
  738. package/dist/ui/shared/tutor-color.d.ts +15 -0
  739. package/dist/ui/shared/tutor-color.js +47 -0
  740. package/dist/ui/talk/page.d.ts +6 -0
  741. package/dist/ui/talk/page.js +294 -0
  742. package/grades/grade-2/README.md +11 -0
  743. package/grades/grade-2/VALIDATION.md +41 -0
  744. package/grades/grade-2/agents/chinese-tutor/activities//344/275/240/350/257/264/346/210/221/347/224/273.md +157 -0
  745. package/grades/grade-2/agents/chinese-tutor/activities//344/275/240/350/257/264/346/210/221/347/224/273./344/276/213/345/255/220.md +78 -0
  746. package/grades/grade-2/agents/chinese-tutor/activities//344/276/213/345/255/220/345/233/276//345/200/237/344/274/236.jpg +0 -0
  747. package/grades/grade-2/agents/chinese-tutor/activities//344/276/213/345/255/220/345/233/276//345/260/217/347/214/264/346/221/230/346/241/203.jpg +0 -0
  748. package/grades/grade-2/agents/chinese-tutor/activities//345/206/231/350/257/235.md +64 -0
  749. package/grades/grade-2/agents/chinese-tutor/activities//345/206/231/350/257/235./344/276/213/345/255/220.md +31 -0
  750. package/grades/grade-2/agents/chinese-tutor/activities//345/220/254/345/206/231.md +48 -0
  751. package/grades/grade-2/agents/chinese-tutor/activities//345/244/215/344/271/240.md +79 -0
  752. package/grades/grade-2/agents/chinese-tutor/activities//345/244/215/344/271/240./344/276/213/345/255/220.md +35 -0
  753. package/grades/grade-2/agents/chinese-tutor/activities//345/260/217/350/257/276/345/240/202.md +53 -0
  754. package/grades/grade-2/agents/chinese-tutor/activities//346/243/200/346/237/245/344/275/234/344/270/232.md +81 -0
  755. package/grades/grade-2/agents/chinese-tutor/activities//346/243/200/346/237/245/344/275/234/344/270/232./344/276/213/345/255/220.md +35 -0
  756. package/grades/grade-2/agents/chinese-tutor/activities//347/234/213/345/233/276/350/257/264/350/257/235.md +94 -0
  757. package/grades/grade-2/agents/chinese-tutor/activities//347/234/213/345/233/276/350/257/264/350/257/235./344/276/213/345/255/220.md +63 -0
  758. package/grades/grade-2/agents/chinese-tutor/activities//351/242/204/344/271/240.md +82 -0
  759. package/grades/grade-2/agents/chinese-tutor/activities//351/242/204/344/271/240./344/276/213/345/255/220.md +35 -0
  760. package/grades/grade-2/agents/chinese-tutor.md +59 -0
  761. package/grades/grade-2/agents/english-tutor/activities//345/217/243/350/257/255/350/257/276.md +149 -0
  762. package/grades/grade-2/agents/english-tutor/activities//345/217/243/350/257/255/350/257/276./344/276/213/345/255/220.md +13 -0
  763. package/grades/grade-2/agents/english-tutor/activities//345/220/254/345/206/231.md +47 -0
  764. package/grades/grade-2/agents/english-tutor/activities//345/244/215/344/271/240.md +78 -0
  765. package/grades/grade-2/agents/english-tutor/activities//345/244/215/344/271/240./344/276/213/345/255/220.md +35 -0
  766. package/grades/grade-2/agents/english-tutor/activities//345/260/217/350/257/276/345/240/202.md +53 -0
  767. package/grades/grade-2/agents/english-tutor/activities//346/243/200/346/237/245/344/275/234/344/270/232.md +80 -0
  768. package/grades/grade-2/agents/english-tutor/activities//346/243/200/346/237/245/344/275/234/344/270/232./344/276/213/345/255/220.md +35 -0
  769. package/grades/grade-2/agents/english-tutor/activities//351/242/204/344/271/240.md +86 -0
  770. package/grades/grade-2/agents/english-tutor/activities//351/242/204/344/271/240./344/276/213/345/255/220.md +35 -0
  771. package/grades/grade-2/agents/english-tutor.md +57 -0
  772. package/grades/grade-2/agents/math-tutor/activities//345/244/215/344/271/240.md +78 -0
  773. package/grades/grade-2/agents/math-tutor/activities//345/244/215/344/271/240./344/276/213/345/255/220.md +35 -0
  774. package/grades/grade-2/agents/math-tutor/activities//345/260/217/350/257/276/345/240/202.md +56 -0
  775. package/grades/grade-2/agents/math-tutor/activities//345/260/217/350/257/276/345/240/202./344/276/213/345/255/220.md +52 -0
  776. package/grades/grade-2/agents/math-tutor/activities//346/243/200/346/237/245/344/275/234/344/270/232.md +80 -0
  777. package/grades/grade-2/agents/math-tutor/activities//346/243/200/346/237/245/344/275/234/344/270/232./344/276/213/345/255/220.md +35 -0
  778. package/grades/grade-2/agents/math-tutor/activities//351/242/204/344/271/240.md +81 -0
  779. package/grades/grade-2/agents/math-tutor/activities//351/242/204/344/271/240./344/276/213/345/255/220.md +35 -0
  780. package/grades/grade-2/agents/math-tutor.md +51 -0
  781. package/grades/grade-2/examples/2026-10-27-pingjunfen/audio/index.json +44 -0
  782. package/grades/grade-2/examples/2026-10-27-pingjunfen/audio/step-1.mp3 +0 -0
  783. package/grades/grade-2/examples/2026-10-27-pingjunfen/audio/step-2.mp3 +0 -0
  784. package/grades/grade-2/examples/2026-10-27-pingjunfen/audio/step-3.mp3 +0 -0
  785. package/grades/grade-2/examples/2026-10-27-pingjunfen/audio/step-4.mp3 +0 -0
  786. package/grades/grade-2/examples/2026-10-27-pingjunfen/audio/step-5.mp3 +0 -0
  787. package/grades/grade-2/examples/2026-10-27-pingjunfen/bake.json +1 -0
  788. package/grades/grade-2/examples/2026-10-27-pingjunfen/manifest.json +63 -0
  789. package/grades/grade-2/examples/2026-10-27-pingjunfen/scene.json +247 -0
  790. package/grades/grade-2/examples/2026-10-27-pingjunfen.md +40 -0
  791. package/grades/grade-2/examples/2026-10-27-pingjunfen.ts +26 -0
  792. package/grades/grade-2/examples//345/271/263/345/235/207/345/210/206./344/276/213/345/255/220.md +24 -0
  793. package/grades/grade-2/examples//346/225/260/345/255/246/345/271/263/345/235/207/345/210/206.md +42 -0
  794. package/grades/grade-2/validation/2026-10-27.json +4410 -0
  795. package/package.json +27 -15
  796. package/skills/chalk-cli/SKILL.md +62 -0
  797. package/skills/chalk-scene/SKILL.md +91 -0
  798. package/skills/chalk-teaching/SKILL.md +82 -0
  799. package/skills/chalk-teaching/models//344/272/244/351/224/231/346/225/260/345/210/227/345/210/206/350/241/214.md +8 -0
  800. package/skills/chalk-teaching/models//345/207/221/345/215/201.md +7 -0
  801. package/skills/chalk-teaching/models//345/221/250/346/234/237/350/247/204/345/276/213.md +6 -0
  802. package/skills/chalk-teaching/models//345/256/236/347/211/251/345/233/276-/345/242/236/345/207/217.md +6 -0
  803. package/skills/chalk-teaching/models//345/256/236/347/211/251/345/233/276-/346/257/224/345/244/232/345/260/221-/346/261/202/345/244/247/346/225/260/346/261/202/345/260/217/346/225/260.md +7 -0
  804. package/skills/chalk-teaching/models//345/256/236/347/211/251/345/233/276-/346/257/224/345/244/232/345/260/221-/346/261/202/345/267/256.md +6 -0
  805. package/skills/chalk-teaching/models//345/260/217/346/243/222/350/277/233/344/275/215/345/212/240.md +7 -0
  806. package/skills/chalk-teaching/models//345/260/217/346/243/222/351/200/200/344/275/215/345/207/217.md +6 -0
  807. package/skills/chalk-teaching/models//346/216/222/351/230/237/347/202/271/351/230/265.md +7 -0
  808. package/skills/chalk-teaching/models//346/227/266/351/227/264/346/225/260/350/275/264.md +6 -0
  809. package/skills/chalk-teaching/models//346/245/274/345/261/202/351/227/264/351/232/224/345/233/276.md +7 -0
  810. package/skills/chalk-teaching/models//347/240/264/345/215/201.md +7 -0
  811. package/skills/chalk-teaching/models//347/253/226/345/274/217/351/200/200/344/275/215.md +6 -0
  812. package/skills/chalk-teaching/models//347/272/277/346/256/265/345/233/276.md +7 -0
  813. package/skills/chalk-teaching/models-index.md +24 -0
  814. package/skills/chalk-teaching/references//350/256/262/350/247/243/346/250/241/346/235/277/344/270/211/346/241/243.md +32 -0
  815. package/skills/chalk-teaching/references//350/257/264/346/230/216/346/226/207/344/273/266.md +102 -0
  816. package/skills/chalk-verify/SKILL.md +57 -0
  817. package/skills/chalk-verify/references//350/257/204/345/210/244/346/240/207/345/207/206.md +69 -0
  818. package/skills/cotutor-analyze/SKILL.md +106 -0
  819. package/skills/cotutor-analyze/references//345/221/275/344/273/244/344/270/216/346/226/207/344/273/266.md +31 -0
  820. package/skills/cotutor-board/SKILL.md +373 -0
  821. package/skills/cotutor-board/references/README.md +38 -0
  822. package/skills/cotutor-board/references/canvas.md +68 -0
  823. package/skills/cotutor-board/references/choice.md +55 -0
  824. package/skills/cotutor-board/references/code.md +46 -0
  825. package/skills/cotutor-board/references/image.md +52 -0
  826. package/skills/cotutor-board/references/lecture.md +69 -0
  827. package/skills/cotutor-board/references/paint.md +77 -0
  828. package/skills/cotutor-board/references/photo.md +61 -0
  829. package/skills/cotutor-board/references/read.md +51 -0
  830. package/skills/cotutor-board/references/text.md +69 -0
  831. package/skills/cotutor-board/references/tianzige.md +78 -0
  832. package/skills/cotutor-board/references/word.md +91 -0
  833. package/skills/cotutor-home/SKILL.md +170 -0
  834. package/skills/cotutor-home/references/dictation.md +97 -0
  835. package/skills/cotutor-home/references/tutor.md +149 -0
  836. package/skills/cotutor-home/references//345/221/275/344/273/244.md +21 -0
  837. package/skills/cotutor-home/references//351/246/226/351/241/265/350/257/255/346/263/225.md +143 -0
  838. package/skills/cotutor-tune/SKILL.md +147 -0
  839. package/skills/cotutor-tune/references//345/255/227/346/256/265.md +53 -0
  840. package/skills/cotutor-tutor/SKILL.md +253 -0
  841. package/skills/cotutor-tutor/references//344/270/212/344/270/213/346/226/207/345/214/205.md +78 -0
  842. package/themes/default/kid.css +86 -0
  843. package/themes/default/theme.json +26 -0
  844. package/agents/chinese-tutor.md +0 -67
  845. package/agents/homework-tutor.md +0 -17
  846. package/agents/math-tutor.md +0 -68
  847. package/agents/planner.md +0 -18
  848. package/agents/reading-tutor.md +0 -65
  849. package/agents/scene-maker.md +0 -41
  850. package/dist/cards/canvas.d.ts +0 -22
  851. package/dist/cards/canvas.js +0 -65
  852. package/dist/cards/fill.d.ts +0 -14
  853. package/dist/cards/fill.js +0 -64
  854. package/dist/cards/index.d.ts +0 -48
  855. package/dist/cards/index.js +0 -115
  856. package/dist/cards/kind.js +0 -7
  857. package/dist/cards/scene.d.ts +0 -24
  858. package/dist/cards/scene.js +0 -67
  859. package/dist/cards/text.d.ts +0 -18
  860. package/dist/cards/text.js +0 -41
  861. package/dist/cli/cert.d.ts +0 -7
  862. package/dist/cli/cert.js +0 -36
  863. package/dist/cli/doctor.d.ts +0 -22
  864. package/dist/cli/doctor.js +0 -355
  865. package/dist/cli/init.js +0 -116
  866. package/dist/cli/main.js +0 -243
  867. package/dist/cli/serve.d.ts +0 -30
  868. package/dist/cli/serve.js +0 -56
  869. package/dist/cli/skeleton.d.ts +0 -39
  870. package/dist/cli/skeleton.js +0 -184
  871. package/dist/cli/skills.d.ts +0 -40
  872. package/dist/cli/skills.js +0 -170
  873. package/dist/cli/workspace.d.ts +0 -69
  874. package/dist/lib/agent-file.d.ts +0 -10
  875. package/dist/lib/agent-file.js +0 -16
  876. package/dist/lib/board.d.ts +0 -15
  877. package/dist/lib/board.js +0 -107
  878. package/dist/lib/context-pack.js +0 -55
  879. package/dist/lib/conversation.js +0 -88
  880. package/dist/lib/kid-board.d.ts +0 -148
  881. package/dist/lib/kid-board.js +0 -294
  882. package/dist/lib/kid-view.d.ts +0 -63
  883. package/dist/lib/kid-view.js +0 -93
  884. package/dist/lib/ledger.d.ts +0 -29
  885. package/dist/lib/run-plan.d.ts +0 -30
  886. package/dist/lib/run-plan.js +0 -32
  887. package/dist/lib/sections.d.ts +0 -12
  888. package/dist/lib/sections.js +0 -151
  889. package/dist/lib/stream.d.ts +0 -15
  890. package/dist/lib/stream.js +0 -69
  891. package/dist/lib/transcript.d.ts +0 -36
  892. package/dist/lib/transcript.js +0 -95
  893. package/dist/server/app.d.ts +0 -74
  894. package/dist/server/app.js +0 -406
  895. package/dist/server/kid-page.d.ts +0 -1
  896. package/dist/server/kid-page.js +0 -768
  897. package/dist/server/mock.js +0 -403
  898. package/dist/server/parent-page.d.ts +0 -8
  899. package/dist/server/parent-page.js +0 -393
  900. package/dist/server/runner.d.ts +0 -64
  901. package/dist/server/runner.js +0 -277
  902. package/dist/server/scene-props.d.ts +0 -16
  903. package/dist/server/scene-props.js +0 -39
  904. package/dist/server/store.d.ts +0 -43
  905. package/dist/server/store.js +0 -210
  906. package/dist/server/tts.d.ts +0 -51
  907. package/dist/server/tts.js +0 -99
  908. /package/dist/{cli → app/cli}/main.d.ts +0 -0
  909. /package/dist/{cards → board/cards}/choice.d.ts +0 -0
  910. /package/dist/{cards → board/cards}/code.d.ts +0 -0
  911. /package/dist/{cards → board/cards}/image.d.ts +0 -0
  912. /package/dist/{cards → board/cards}/read.d.ts +0 -0
package/LICENSE CHANGED
@@ -1,21 +1,249 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 tarslab
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ cotutor License
2
+
3
+ cotutor is licensed under the Apache License, Version 2.0 (the "Apache
4
+ License"), with the following additional conditions. Where these
5
+ conditions and the Apache License conflict, these conditions prevail.
6
+
7
+ Definitions
8
+
9
+ "Workspace" means one directory created by `cotutor init` (or by a
10
+ derivative of it), holding one child's configuration, records and
11
+ vault.
12
+
13
+ "Household" means one family living together.
14
+
15
+ "Brand Marks" means the cotutor logo (two nested letter "C" shapes
16
+ opening to the right), the name "cotutor" and a link to the cotutor
17
+ repository (currently https://github.com/TarsLab/cotutor), as the
18
+ Software displays them.
19
+
20
+ 1. Multi-tenant service. Unless you have written permission from the
21
+ Licensor, you may not use the Software, or any work derived from it,
22
+ to operate a service in which Workspaces belonging to more than one
23
+ Household are run by you or on your infrastructure, or in which the
24
+ Software's functionality is made available to people outside your own
25
+ Household. This applies whether or not you charge for the service.
26
+ Running any number of Workspaces for your own Household is not
27
+ restricted by this condition.
28
+
29
+ 2. Brand Marks. You may not remove, hide, alter or replace the Brand
30
+ Marks in the Software or in any work derived from it. The pages the
31
+ Software provides for parents and its workbench, however they are
32
+ named or arranged, must continue to display them as the Software
33
+ does. You may change themes, tutor names and avatars, and Workspace
34
+ titles.
35
+
36
+ 3. Contributions. By contributing to the Software, you agree that:
37
+ (a) the Licensor may change the license of the Software, including
38
+ your contributions, to be more or less restrictive; and
39
+ (b) your contributions may be used for commercial purposes, including
40
+ services operated by the Licensor.
41
+
42
+ For written permission or a commercial license, open an issue at
43
+ https://github.com/TarsLab/cotutor.
44
+
45
+ Copyright 2026 tarslab
46
+
47
+ ------------------------------------------------------------------------
48
+
49
+ Apache License
50
+ Version 2.0, January 2004
51
+ http://www.apache.org/licenses/
52
+
53
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
54
+
55
+ 1. Definitions.
56
+
57
+ "License" shall mean the terms and conditions for use, reproduction,
58
+ and distribution as defined by Sections 1 through 9 of this document.
59
+
60
+ "Licensor" shall mean the copyright owner or entity authorized by
61
+ the copyright owner that is granting the License.
62
+
63
+ "Legal Entity" shall mean the union of the acting entity and all
64
+ other entities that control, are controlled by, or are under common
65
+ control with that entity. For the purposes of this definition,
66
+ "control" means (i) the power, direct or indirect, to cause the
67
+ direction or management of such entity, whether by contract or
68
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
69
+ outstanding shares, or (iii) beneficial ownership of such entity.
70
+
71
+ "You" (or "Your") shall mean an individual or Legal Entity
72
+ exercising permissions granted by this License.
73
+
74
+ "Source" form shall mean the preferred form for making modifications,
75
+ including but not limited to software source code, documentation
76
+ source, and configuration files.
77
+
78
+ "Object" form shall mean any form resulting from mechanical
79
+ transformation or translation of a Source form, including but
80
+ not limited to compiled object code, generated documentation,
81
+ and conversions to other media types.
82
+
83
+ "Work" shall mean the work of authorship, whether in Source or
84
+ Object form, made available under the License, as indicated by a
85
+ copyright notice that is included in or attached to the work
86
+ (an example is provided in the Appendix below).
87
+
88
+ "Derivative Works" shall mean any work, whether in Source or Object
89
+ form, that is based on (or derived from) the Work and for which the
90
+ editorial revisions, annotations, elaborations, or other modifications
91
+ represent, as a whole, an original work of authorship. For the purposes
92
+ of this License, Derivative Works shall not include works that remain
93
+ separable from, or merely link (or bind by name) to the interfaces of,
94
+ the Work and Derivative Works thereof.
95
+
96
+ "Contribution" shall mean any work of authorship, including
97
+ the original version of the Work and any modifications or additions
98
+ to that Work or Derivative Works thereof, that is intentionally
99
+ submitted to Licensor for inclusion in the Work by the copyright owner
100
+ or by an individual or Legal Entity authorized to submit on behalf of
101
+ the copyright owner. For the purposes of this definition, "submitted"
102
+ means any form of electronic, verbal, or written communication sent
103
+ to the Licensor or its representatives, including but not limited to
104
+ communication on electronic mailing lists, source code control systems,
105
+ and issue tracking systems that are managed by, or on behalf of, the
106
+ Licensor for the purpose of discussing and improving the Work, but
107
+ excluding communication that is conspicuously marked or otherwise
108
+ designated in writing by the copyright owner as "Not a Contribution."
109
+
110
+ "Contributor" shall mean Licensor and any individual or Legal Entity
111
+ on behalf of whom a Contribution has been received by Licensor and
112
+ subsequently incorporated within the Work.
113
+
114
+ 2. Grant of Copyright License. Subject to the terms and conditions of
115
+ this License, each Contributor hereby grants to You a perpetual,
116
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
117
+ copyright license to reproduce, prepare Derivative Works of,
118
+ publicly display, publicly perform, sublicense, and distribute the
119
+ Work and such Derivative Works in Source or Object form.
120
+
121
+ 3. Grant of Patent License. Subject to the terms and conditions of
122
+ this License, each Contributor hereby grants to You a perpetual,
123
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
124
+ (except as stated in this section) patent license to make, have made,
125
+ use, offer to sell, sell, import, and otherwise transfer the Work,
126
+ where such license applies only to those patent claims licensable
127
+ by such Contributor that are necessarily infringed by their
128
+ Contribution(s) alone or by combination of their Contribution(s)
129
+ with the Work to which such Contribution(s) was submitted. If You
130
+ institute patent litigation against any entity (including a
131
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
132
+ or a Contribution incorporated within the Work constitutes direct
133
+ or contributory patent infringement, then any patent licenses
134
+ granted to You under this License for that Work shall terminate
135
+ as of the date such litigation is filed.
136
+
137
+ 4. Redistribution. You may reproduce and distribute copies of the
138
+ Work or Derivative Works thereof in any medium, with or without
139
+ modifications, and in Source or Object form, provided that You
140
+ meet the following conditions:
141
+
142
+ (a) You must give any other recipients of the Work or
143
+ Derivative Works a copy of this License; and
144
+
145
+ (b) You must cause any modified files to carry prominent notices
146
+ stating that You changed the files; and
147
+
148
+ (c) You must retain, in the Source form of any Derivative Works
149
+ that You distribute, all copyright, patent, trademark, and
150
+ attribution notices from the Source form of the Work,
151
+ excluding those notices that do not pertain to any part of
152
+ the Derivative Works; and
153
+
154
+ (d) If the Work includes a "NOTICE" text file as part of its
155
+ distribution, then any Derivative Works that You distribute must
156
+ include a readable copy of the attribution notices contained
157
+ within such NOTICE file, excluding those notices that do not
158
+ pertain to any part of the Derivative Works, in at least one
159
+ of the following places: within a NOTICE text file distributed
160
+ as part of the Derivative Works; within the Source form or
161
+ documentation, if provided along with the Derivative Works; or,
162
+ within a display generated by the Derivative Works, if and
163
+ wherever such third-party notices normally appear. The contents
164
+ of the NOTICE file are for informational purposes only and
165
+ do not modify the License. You may add Your own attribution
166
+ notices within Derivative Works that You distribute, alongside
167
+ or as an addendum to the NOTICE text from the Work, provided
168
+ that such additional attribution notices cannot be construed
169
+ as modifying the License.
170
+
171
+ You may add Your own copyright statement to Your modifications and
172
+ may provide additional or different license terms and conditions
173
+ for use, reproduction, or distribution of Your modifications, or
174
+ for any such Derivative Works as a whole, provided Your use,
175
+ reproduction, and distribution of the Work otherwise complies with
176
+ the conditions stated in this License.
177
+
178
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
179
+ any Contribution intentionally submitted for inclusion in the Work
180
+ by You to the Licensor shall be under the terms and conditions of
181
+ this License, without any additional terms or conditions.
182
+ Notwithstanding the above, nothing herein shall supersede or modify
183
+ the terms of any separate license agreement you may have executed
184
+ with Licensor regarding such Contributions.
185
+
186
+ 6. Trademarks. This License does not grant permission to use the trade
187
+ names, trademarks, service marks, or product names of the Licensor,
188
+ except as required for reasonable and customary use in describing the
189
+ origin of the Work and reproducing the content of the NOTICE file.
190
+
191
+ 7. Disclaimer of Warranty. Unless required by applicable law or
192
+ agreed to in writing, Licensor provides the Work (and each
193
+ Contributor provides its Contributions) on an "AS IS" BASIS,
194
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
195
+ implied, including, without limitation, any warranties or conditions
196
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
197
+ PARTICULAR PURPOSE. You are solely responsible for determining the
198
+ appropriateness of using or redistributing the Work and assume any
199
+ risks associated with Your exercise of permissions under this License.
200
+
201
+ 8. Limitation of Liability. In no event and under no legal theory,
202
+ whether in tort (including negligence), contract, or otherwise,
203
+ unless required by applicable law (such as deliberate and grossly
204
+ negligent acts) or agreed to in writing, shall any Contributor be
205
+ liable to You for damages, including any direct, indirect, special,
206
+ incidental, or consequential damages of any character arising as a
207
+ result of this License or out of the use or inability to use the
208
+ Work (including but not limited to damages for loss of goodwill,
209
+ work stoppage, computer failure or malfunction, or any and all
210
+ other commercial damages or losses), even if such Contributor
211
+ has been advised of the possibility of such damages.
212
+
213
+ 9. Accepting Warranty or Additional Liability. While redistributing
214
+ the Work or Derivative Works thereof, You may choose to offer,
215
+ and charge a fee for, acceptance of support, warranty, indemnity,
216
+ or other liability obligations and/or rights consistent with this
217
+ License. However, in accepting such obligations, You may act only
218
+ on Your own behalf and on Your sole responsibility, not on behalf
219
+ of any other Contributor, and only if You agree to indemnify,
220
+ defend, and hold each Contributor harmless for any liability
221
+ incurred by, or claims asserted against, such Contributor by reason
222
+ of your accepting any such warranty or additional liability.
223
+
224
+ END OF TERMS AND CONDITIONS
225
+
226
+ APPENDIX: How to apply the Apache License to your work.
227
+
228
+ To apply the Apache License to your work, attach the following
229
+ boilerplate notice, with the fields enclosed by brackets "[]"
230
+ replaced with your own identifying information. (Don't include
231
+ the brackets!) The text should be enclosed in the appropriate
232
+ comment syntax for the file format. We also recommend that a
233
+ file or class name and description of purpose be included on the
234
+ same "printed page" as the copyright notice for easier
235
+ identification within third-party archives.
236
+
237
+ Copyright [yyyy] [name of copyright owner]
238
+
239
+ Licensed under the Apache License, Version 2.0 (the "License");
240
+ you may not use this file except in compliance with the License.
241
+ You may obtain a copy of the License at
242
+
243
+ http://www.apache.org/licenses/LICENSE-2.0
244
+
245
+ Unless required by applicable law or agreed to in writing, software
246
+ distributed under the License is distributed on an "AS IS" BASIS,
247
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
248
+ See the License for the specific language governing permissions and
249
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,42 @@
1
+ cotutor
2
+ Copyright 2026 tarslab
3
+
4
+ This product includes code adapted from hanzi-writer 3.7.2
5
+ (https://github.com/chanind/hanzi-writer), the stroke matching in
6
+ src/dictation/lib/match.ts, under the MIT License:
7
+
8
+ Copyright (c) 2014 David Chanin
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a
11
+ copy of this software and associated documentation files (the
12
+ "Software"), to deal in the Software without restriction, including
13
+ without limitation the rights to use, copy, modify, merge, publish,
14
+ distribute, sublicense, and/or sell copies of the Software, and to
15
+ permit persons to whom the Software is furnished to do so, subject to
16
+ the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included
19
+ in all copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
+
29
+ The stroke data used by the tianzige and dictation cards comes from the
30
+ hanzi-writer-data package, which is derived from Make Me a Hanzi and the
31
+ Arphic fonts and is licensed under the Arphic Public License. cotutor does
32
+ not include that data; it reads it at runtime from the installed
33
+ hanzi-writer-data dependency.
34
+
35
+ The subject marks shown on the kid board are glyph outlines baked from these
36
+ fonts, all licensed under the SIL Open Font License, Version 1.1
37
+ (https://openfontlicense.org):
38
+
39
+ Ma Shan Zheng: Copyright 2018 The MaShanZheng Project Authors
40
+ (https://github.com/googlefonts/mashanzheng)
41
+ Noto Serif SC: (c) 2017-2024 Adobe (http://www.adobe.com/)
42
+ Barlow: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow)
package/README.md CHANGED
@@ -1,40 +1,67 @@
1
1
  # cotutor
2
2
 
3
- 家里的 AI 老师团,和家长一起教。几位可以直接对话的老师(数学、语文、朗读、作业老师、规划、画图),孩子在 iPad 上按住说话就能问,家长在自己的页面上看全部过程、管每位老师的性子和规矩。数据全在自家电脑上。
3
+ 家里的 AI 老师团,和家长一起教。几位可以直接对话的老师(数学、语文、英语),孩子在 iPad 上按住说话就能问,家长在自己的页面上看全部过程、管每位老师的性子和规矩。数据全在自家电脑上。
4
4
 
5
- > 现在到 R3 + 板书:家长端与孩子端都能用,老师的回复是一页板书(卡 + 逐句讲稿),画图老师能把一道题做成能播的课包;记账、作业照片、规划在后面的里程碑。iPad 真机试用还没开始。
5
+ > 家长端与孩子端都能用:老师的回复是一页板书(卡 + 逐句讲稿),家长在幕后把要画出来讲的题做成小课堂;学完家长打星记账进 Obsidian 日记,作业照片在学科老师页上拍。
6
6
 
7
7
  ## 五分钟用起来
8
8
 
9
- 需要 Node ≥ 22.18,以及 Claude Code 或 Qwen Code 至少一个(老师是它们跑出来的)。
9
+ 需要一台电脑(Mac 最省事)、Node ≥ 22.18,和一个百炼账号(北京地域,按量付费)。老师的嘴和脑都走百炼,由应用直接调用,不用另装模型客户端:嘴是 `qwen3.8-omni-flash-realtime`,听孩子说、照着讲稿念;脑是 `qwen3.8-max`,写讲稿和板书。
10
10
 
11
11
  ```sh
12
12
  npm i -g cotutor
13
- cotutor init ming --name 小明 # 建 ~/cotutor/ming/:六位老师、四个领域 skill、账本、对话目录、cotutor.json
14
- cotutor doctor # 逐项体检,不过的每条都带修复命令;--live 真起一次老师
15
- cotutor serve # 孩子端 http://<ip>:5180/,家长端 /parent
13
+ cotutor init ming --name 小明 --grade 2 # 建 ~/cotutor/ming/:三位老师、技能、账本、对话目录、cotutor.json
14
+ cotutor service install # 装成这台电脑的后台服务,打印家长端首页的地址,孩子的平板在那里扫码
15
+ cotutor open # 打开家长端,不用记地址
16
16
  ```
17
17
 
18
- `init` 把出厂老师(含画图老师)拷进 `.claude/agents/`,把画图用的四个领域 skill 拷进 `.claude/skills/`;
19
- 画图老师跑的 drawtell 随包装好,不用另外装。要在 iPad 上用(按住说话要 HTTPS):`cotutor cert` 签一张
20
- 自签证书,把根证书装到 iPad,重启 `serve`。
18
+ 后台服务登录后自己起来、崩了自己再起、关了终端照样跑,日志按天落文件:`cotutor service status` 看在不在跑,`cotutor service logs` 看日志,`cotutor service restart` 重起。Mac 上用 launchd,Linux 上用 systemd 用户服务,Windows 上是一条用户自己的登录项(不用管理员、没有黑窗口);第一次起来 Windows 可能弹窗问「允许访问」,点允许,平板才连得进来。要在终端里调试用 `cotutor serve`,先 `cotutor service stop` 让出端口。
19
+
20
+ Mac 和 Windows 上,`service install` 会一起装一个菜单栏(任务栏)图标,不用开终端就能看状态:正常时就是 logo;有事要处理出橙点;后台服务没在跑时 logo 变淡并出红点。状态变差时通知一次。点开图标能看原因、打开家长端、重启服务、看日志。「退出 cotutor」会停掉这台电脑上所有孩子的后台服务,平板打不开,下次登录自动恢复。Windows 的新图标先收在任务栏右下角的 `^` 里。不要图标就 `cotutor tray off`,装服务时加 `--no-tray` 也行。Linux 上没做,用 `cotutor service status` 看。
21
+
22
+ 地址认电脑名,换 Wi-Fi、路由器换 IP 都不用重签证书、不用重扫。端口在 `init` 时选一次写进 `cotutor.json`,以后不变:优先 443,地址里不用写端口(`https://<电脑名>.local/`);443 被占着或系统不让用(Linux 默认不让)就用 8443,再往后 8445、8447;几个孩子各用各的,自动让开。运行时被占只报错说明是谁占着,不会自己换,因为换了端口平板要重新扫码、重加图标。试用(`--sandbox`)的端口永远是真 workspace 的 +1,`cotutor open --sandbox` 打开。
23
+
24
+ 接着三件事:
25
+
26
+ 1. **填百炼**:在这台电脑上打开家长端 `/parent` 的「首页」,填百炼「按量付费」的 API Key 和业务空间 ID,保存前会先试连。API Key 在百炼控制台的「密钥管理」里创建,业务空间 ID 在控制台的业务空间详情里看,以百炼文档为准:[获取与配置 API Key](https://help.aliyun.com/zh/model-studio/get-api-key)、[首次调用千问 API](https://help.aliyun.com/zh/model-studio/first-api-call-to-qwen)(里面讲了业务空间 ID)。Key 跟地域绑定,控制台右上角先选北京。Token Plan 的 `sk-sp-` 不行。没填时孩子端只出「老师们还没到」。
27
+ 2. **填档案**:workspace 里的 `孩子.md` 填 `school_start`(读一年级的年月,如 `2025-09`),老师据此知道现在是几年级哪个学期。想用自己的 Obsidian 库,改 `cotutor.json` 的 `paths.vault`。
28
+ 3. **体检**:`cotutor doctor` 逐项检查,不过的每条都带修复命令。
29
+
30
+ `init` 把出厂老师拷进 `agents/<老师>.md`,把做课包用的四个技能 chalk-* 和五个机器件 cotutor-tutor / cotutor-board / cotutor-analyze / cotutor-tune / cotutor-home 拷进 `.agents/skills/`(Codex、Qwen Code 直接读;Claude Code 读的 `.claude/skills` 是链到它的);
31
+ 做小课堂的课包用 `cotutor chalk`(check / build / bake / snap / dub),烤画面与截图用本机的 Chrome(Windows 上没有 Chrome 就用 Edge)。要在平板上用(按住说话要 HTTPS):`cotutor cert` 签一张
32
+ 自签证书(要 mkcert:Mac 上 `brew install mkcert && mkcert -install`;Windows 上 `winget install FiloSottile.mkcert`,重开终端再 `mkcert -install`),把根证书装到平板并打开信任,`cotutor service restart`(在终端里跑的就重开 `cotutor serve`),扫码打开。iPad 的步骤见 [iPad 与 iPhone](docs/iPad与iPhone.md)。
21
33
 
22
34
  然后在浏览器里:
23
35
 
24
- - **家长端 `/parent`**:和任何一位老师说话,看原始过程;老师团页改人设、政策、老师的性子(老师文件),加新老师;设置页改路径、端口、配音。
25
- - **孩子端 `/`**:一周小路、今天的时段、一排老师头像;点头像进板书页,按住说话或打字。老师的回答是一页板书:卡先铺开(选择题、填空、点读、图、动画课包、画板),讲稿一句句念、笔跟着声音标注,末句问句停下来等孩子。点一张卡进舞台做题,做完「交给老师」。孩子永远看不到工具、报错、评判。
36
+ - **家长端 `/parent`**:「首页」设孩子的首页(按钮、这周的词、老师的先后),扫码打开(孩子的平板一张、家长自己的手机一张),给老师换头像和声音;「设置」定孩子的平板上按住说话那一栏放哪边;「记录」按天看孩子和每位老师的板书(答案不剥)、看录像、打星、记账、删话题,看这天写进 vault 的每一行,不要的一行一行撤回。右上角「工作台 ↗」去工作台。
37
+ - **工作台 `/dev`**:给有技术背景的家长与开发者。和任何一位老师说话、看一轮的原文;老师团页改人设、政策、老师文件,加新老师;设置页改路径、端口。头像与声音只在家长端改。
38
+ - **孩子端 `/`**:首页每位老师一张卡,卡上的按钮是家长排好的(新话题、接着以前的话题、带讲法的开场、先看一堂小课堂);点了进板书页,按住说话或打字。老师的回答是一页板书:卡先铺开(选择题、点读、田字格、单词、图、小课堂、画板、拍照),讲稿一句句念、笔跟着声音标注,末句问句停下来等孩子。点一张卡进舞台做题,做完「交给老师」。孩子永远看不到工具、报错、评判。
26
39
 
27
- 想听老师的声音:装 [voxtell](https://github.com/tarslab/voxtell),给老师填音色;没装就退回浏览器合成的声音。
28
- 不花钱先看孩子端长什么样:`cotutor mock` 起一份模拟接口,不经真实老师。细节见 [docs/家长手册.md](docs/家长手册.md)。
40
+ 实时老师的声音由 realtime 模型提供;点读、单词等卡片的配音也走百炼(同一把 key),出厂三位各有一个缺省的。在家长端「首页」点老师的「样子与声音」,再点「换一个」在弹窗里挑(全部音色都在,能搜,能按男女、口音、中英、年纪、场景筛,能试听)。
41
+ 不花钱先看孩子端长什么样:`cotutor mock` 起一份模拟接口,不经真实老师。
42
+
43
+ ## 年级教学包
44
+
45
+ 面向中国大陆小学一至六年级,当前提供二年级教学包。`cotutor grades` 查看可用年级;新建时未指定 `--grade` 默认二年级,未提供的年级不会自动回退。
46
+
47
+ 出厂文件在 `grades/grade-2/`。三科分别提供预习、检查作业、复习(孩子端老师牌上常驻三块方砖);语文有写话与看图写话,英语有口语课,数学小课堂配合提前做好的课包。家长按教材版本、学期和孩子实际进度设置材料。
48
+
49
+ 孩子当前学期仍由档案决定;升年级不会自动替换家长的老师文件。旧 workspace 执行 `cotutor upgrade` 补记二年级来源,保留自定义内容。贡献其他年级与验证方式见 [年级教学包设计](docs/年级教学包.md)。
29
50
 
30
51
  ## 老师是文件
31
52
 
32
- 每位老师 = 一个 Markdown 文件(frontmatter + 正文即系统提示)+ cotutor.json 里的一条(显示名、头像、音色、开关、政策)+ 自己的目录与对话。出厂六位(数学、语文、朗读、作业、规划、画图)随包发布,init **拷贝**进你的老师们,改了就是你家的;`cotutor upgrade` 只换没改过的,改过的打印差异让你定。再加一位:
53
+ 每位老师 = 一个 Markdown 文件(frontmatter + 正文即系统提示)+ cotutor.json 里的一条(显示名、头像、音色、开关、政策)+ 自己的目录与对话。出厂三位(数学、语文、英语)随包发布,init **拷贝**进你的老师们,改了就是你家的;`cotutor upgrade` 只换没改过的,改过的打印差异让你定。再加一位:
33
54
 
34
55
  ```sh
35
56
  cotutor add science-tutor --display 科学老师 --subject 科学 --avatar 🔬
36
57
  ```
37
58
 
59
+ 名字以 `-tutor` 结尾的是老师(有脸),其余是孩子看不到的工具人。没设头像时,语文、数学、英语老师用包里自带的
60
+ 出厂头像(包根 `avatars/`,三个木钉娃娃),别的老师显示学科首字。头像可以是 emoji,也可以是
61
+ workspace 里的一张图(`avatars/<老师>.png`):用 [figshot](https://github.com/tarslab/figshot)
62
+ `figshot pick --workspace ~/cotutor/<孩子>` 让孩子自己搭一个乐高人仔当老师,存盘直接落到这里。
63
+ `cotutor.json` 里加一行 `"figshot": { "port": 8477 }`,孩子端首页就多一张「给老师们换个样子」,iPad 上点了直接进去(figshot 没开着时这张卡不出现)。
64
+
38
65
  或者家长端老师团页点「新老师」。没有注册表,删掉文件和那条配置就是删老师。
39
66
 
40
67
  `cotutor.json` 首行指向一份 JSON Schema(`.cotutor/cotutor.schema.json`),编辑器里有补全与说明。
@@ -47,14 +74,82 @@ import { deriveKidView, parseSections } from 'cotutor/lib'; // 转
47
74
  import { loadWorkspace } from 'cotutor/workspace'; // 解析链 + 校验
48
75
  ```
49
76
 
50
- ## 开发
77
+ ## 配置模型
78
+
79
+ **缺省:应用直连百炼。** 嘴和脑都用家长端「首页」填的那份百炼按量 API Key 与业务空间 ID,存在本机 `~/.config/cotutor/bailian.json`(几个孩子的 workspace 共用)。老师用哪个模型写在 `cotutor.json` 的 `runtimes` 里:出厂的 `api`(`qwen3.8-max`,三位老师都用它)和 `api-flash`(`qwen3.8-flash`,便宜些;换之前先跑 `cotutor activity eval` 看例子过不过)。卡的配音、听写认字、口语单、画图也用这份 key。
80
+
81
+ **key 只放 `~/.config/cotutor/`**,所有命令(`serve`、`send`、`replay`、`doctor`……)读同一处,环境变量(`DASHSCOPE_API_KEY` 之类)和别的工具的配置都不看:
82
+
83
+ | 文件 | 内容 | 谁写 |
84
+ |---|---|---|
85
+ | `bailian.json` | `{"apiKey": "sk-…", "workspaceId": "llm-…"}`,百炼按量 | 家长端「首页」;没有浏览器的机器照格式手写,或从别的机器拷过来 |
86
+ | `token-plan.json` | `{"apiKey": "sk-sp-…"}`,千问 Token Plan | 订了 Token Plan 的开发者手写;有它,Token Plan 有的模型先走它 |
87
+
88
+ 手写的存成 UTF-8(不带 BOM)。配了什么、通不通看 `cotutor doctor`(`--live` 真连一次)。
89
+
90
+ 换了运行时,之前的话题接不上,也不导入历史:孩子接着说会开新话题;换之前聊的话题不记账,家长端卡上标「换过运行时 · 不记账」,记录照样能看。模型、预算与老师运行时都在 workspace 的 `cotutor.json` 里,编辑器按首行 `$schema` 提供字段说明。
91
+
92
+ `cotutor doctor` 检查缺失配置并给修复建议;`--live` 会实际连接服务。页面上的老师起不来时,先看 doctor 和 `conversations/<老师>/<日期>.<job>.err.log`。家长端与工作台需要访问锁时,运行 `cotutor pin` 设置本机 PIN。
93
+
94
+ ## 数据与升级
95
+
96
+ 默认 workspace 是 `~/cotutor/<孩子>/`:配置在 `cotutor.json`,老师在 `agents/<老师>.md`,activity 在 `agents/<老师>/activities/`,技能在 `.agents/skills/`,对话在 `conversations/`,账本在 `ledger/`,照片在 `captures/`,课包在 `bundles/`,首页在 `home/`。长期档案、记忆和日记在配置的 Obsidian vault,规则见 [obsidian 仓库设计](docs/obsidian仓库设计.md)。备份时保留整个 workspace 与 vault。
51
97
 
52
- 改代码的看 [docs/开发者手册.md](docs/开发者手册.md)(检出、冒烟、iPad 真机)与 [CONTRIBUTING.md](CONTRIBUTING.md);设计与拍板在 [docs/](docs/)(产品规划、agent 层设计、契约草案)。
98
+ ```sh
99
+ cotutor upgrade # 更新未修改的出厂老师、activity、主题与技能
100
+ cotutor upgrade --config --dry-run # 预览 cotutor.json 的迁移
101
+ cotutor upgrade --config # 执行配置迁移
102
+ cotutor doctor
103
+ ```
104
+
105
+ 家长改过的老师与主题保留并显示差异;机器技能会随版本覆盖。配置迁移补缺,并更新未自定义的旧命令模板,保留自定义配置。升级程序后 `cotutor service restart`(在终端里跑的就重开 `serve`);换了 Node 版本、或包装到了别处,再 `cotutor service install` 一次。
106
+
107
+ 2026-10-30 之前建的 workspace,老师在 `.claude/agents/`、技能在 `.claude/skills/`。`cotutor upgrade`(或 `init`)先把它们原样挪到新位置,再照常升级;新位置已有同名的不挪,会点名。`.claude/` 里别的文件不动。
108
+
109
+ ### 旧 workspace 换运行时
110
+
111
+ 2026-11-02 起不再起命令行(Qwen Code;Claude CLI 更早就去掉了),老师只走应用直连百炼。2026-10-31 之前建的 workspace 缺省走 Qwen Code,doctor 会报「命令行运行时不再支持」:先 `cotutor upgrade --config` 补上出厂的 `api` / `api-flash`,把 `runtimes.default` 和 `tutors.*.runtime` 改成 `api`,在家长端「首页」填好百炼,再删掉 `qwen`、`qwen-flash`(或更早的 Claude)条目。换之前聊的话题照上面「配置模型」说的办:记录照样能看,不导入、不记账。旧 `proxy` 字段可删除,对应命令已移除。
112
+
113
+ ### 试用不进孩子的记录
114
+
115
+ 自己手动试功能时,命令加 `--sandbox`:第一次从真 workspace 分出一份到旁边的 `.sandbox/<目录名>/`(`~/cotutor/ray` → `~/cotutor/.sandbox/ray`)。老师、activity、首页、主题、课包照拷,对话、照片、听写、账本不带,vault 拷一份;试的对话、记忆、日记都写在这份里。页面标题前带「试用」,端口是真的那个 +1,可以同时开;自动记账关着(要试记账,家长端点「记账」)。
53
116
 
54
117
  ```sh
55
- pnpm i && pnpm typecheck && pnpm test
56
- node bin/cotutor.js --help # bin 在仓库内直跑 src,零构建
57
- pnpm build && pnpm smoke # 出厂检查:体检要发的那份
118
+ cotutor serve --sandbox # 试用的那份;没有就先分出来
119
+ cotutor send math-tutor 你好 --sandbox
120
+ cotutor serve --sandbox --fresh # 丢掉试过的,从真 workspace 重新分(真的那边改了老师文件、vault 也用这个带过来)
58
121
  ```
59
122
 
60
- MIT。
123
+ ## 开发
124
+
125
+ ```sh
126
+ pnpm i
127
+ pnpm typecheck
128
+ pnpm test
129
+ node bin/cotutor.js --help # 仓库内直跑 src,Node ≥ 22.18
130
+ pnpm build
131
+ pnpm build:stage # build 清空 dist 后重建舞台
132
+ pnpm smoke # 检查待发布内容
133
+ node bin/cotutor.js mock # 假模型接口,查看前端
134
+ ```
135
+
136
+ 改卡片文档或技能生成代码后运行 `pnpm gen:skills`。开发约定与分模块验证见 [AGENTS.md](AGENTS.md) 和 [CONTRIBUTING.md](CONTRIBUTING.md)。
137
+
138
+ 正式文档只保留以下六篇,历史讨论查 Git:
139
+
140
+ - [iPad 与 iPhone](docs/iPad与iPhone.md)
141
+ - [obsidian 仓库设计](docs/obsidian仓库设计.md)
142
+ - [写提示词](docs/写提示词.md)
143
+ - [卡片协议](docs/卡片协议.md)
144
+ - [年级教学包](docs/年级教学包.md)
145
+ - [词表](docs/词表.md)
146
+
147
+ ## 许可
148
+
149
+ cotutor 按 Apache-2.0 加附加条件授权,全文见 [LICENSE](LICENSE)。白话说:
150
+
151
+ - 家里自己用、自己改都行,几个孩子几个 workspace 都算自己家。
152
+ - 替别的家庭或别人运营 cotutor(收不收钱都算),要先拿到书面许可。
153
+ - 家长端页脚和工作台的 cotutor 标记不能去掉(自己家用也一样);主题、老师的名字与头像、标题照常改。
154
+
155
+ 这段只是说明,以 LICENSE 原文为准。要许可或商业授权,到仓库开 issue。
Binary file
Binary file
Binary file
package/bin/cotutor.js CHANGED
@@ -1,16 +1,26 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * 薄壳:仓库内直跑 src/cli/main.ts(Node ≥22.18 原生 type stripping,零构建迭代);
4
- * npm 包不含 src,回退到 dist/cli/main.js(tsc 产物,prepublishOnly 保证已构建)。
3
+ * 薄壳:仓库内直跑 src/app/cli/main.ts(Node ≥22.18 原生 type stripping,零构建迭代);
4
+ * npm 包不含 src,回退到 dist/app/cli/main.js(tsc 产物,prepublishOnly 保证已构建)。
5
5
  */
6
6
  import { existsSync } from 'node:fs';
7
7
  import { fileURLToPath } from 'node:url';
8
8
 
9
- const src = new URL('../src/cli/main.ts', import.meta.url);
10
- const entry = existsSync(fileURLToPath(src)) ? src : new URL('../dist/cli/main.js', import.meta.url);
9
+ // 版本不够先说清楚:不然源码直跑报「Unknown file extension .ts」,npm 装的报「没有 stripTypeScriptTypes」,都带一串栈(Windows 自带的常是 Node 18)
10
+ const [major, minor] = process.versions.node.split('.').map(Number);
11
+ if (major < 22 || (major === 22 && minor < 18)) {
12
+ console.error(`cotutor: 要 Node ≥ 22.18,这台是 ${process.versions.node}。到 https://nodejs.org 装新的 LTS 版,装好重开终端再跑。`);
13
+ process.exit(2);
14
+ }
15
+
16
+ // 托盘进程一直开着,走轻入口:不把所有命令都加载进来(src/app/cli/tray-run.ts)
17
+ const argv = process.argv.slice(2);
18
+ const name = argv[0] === 'tray' && argv[1] === 'run' ? 'tray-run' : 'main';
19
+ const src = new URL(`../src/app/cli/${name}.ts`, import.meta.url);
20
+ const entry = existsSync(fileURLToPath(src)) ? src : new URL(`../dist/app/cli/${name}.js`, import.meta.url);
11
21
  try {
12
22
  const { main } = await import(entry.href);
13
- await main(process.argv.slice(2));
23
+ await main(argv);
14
24
  } catch (err) {
15
25
  console.error(`cotutor: 内部错误:${err?.stack ?? err}`);
16
26
  process.exitCode = 4;
@@ -0,0 +1,8 @@
1
+ /* 画板(cards/canvas/card.md):题目 + 「点开画一画」;交过之后是缩略图;舞台是 iframe 里的工作台 */
2
+ /* 画板 */
3
+ .c.c-canvas { gap:8px; }
4
+ .c.c-canvas .cp { font-weight:600; } .c.c-canvas .cb { border:2px dashed var(--tint-plum-head); border-radius:12px; padding:22px 12px; text-align:center; color:var(--tint-plum-head); background:#fff; white-space:normal; }
5
+ .c.c-canvas .th { position:relative; border-radius:12px; overflow:hidden; background:#fff; border:1px solid var(--tint-plum-line); }
6
+ .c.c-canvas .th img { display:block; width:100%; max-height:240px; object-fit:contain; }
7
+ .c.c-canvas .th.base img { opacity:.7; }
8
+ .c.c-canvas .th .pl { position:absolute; right:10px; bottom:10px; background:#000000aa; color:#fff; border-radius:14px; padding:3px 10px; font-size:13px; }
@@ -0,0 +1,68 @@
1
+ # canvas — 画板
2
+
3
+ ## 是什么
4
+
5
+ 孩子自己在上面画的一块板:笔、橡皮、黑红蓝三色、撤销、清空。可以给一幅底图(课包的终帧、几个骨架元素,或孩子刚拍的作业照片)让孩子在上面标画,也可以空白只给题目。「给老师看」会导出一张 png 给你。
6
+
7
+ ## 什么时候用 / 别用
8
+
9
+ - 用:「画一画」「标出来」「圈出来」这类要孩子动手的题:画高、标直角、圈出错的那步。
10
+ - 用:一节末尾,末句讲稿就是这个要求。
11
+ - 用:上下文包里有 photos 时,把那张照片做底图,让孩子在自己的作业上圈出错的那道、把答案写上去。
12
+ - 别用:答案是一个数或一个词 → 讲稿里问,孩子开口说;能选的 → `choice`。
13
+ - 别用:一节里放两张画板。
14
+
15
+ ## 写法
16
+
17
+ - 第一行是底,后面的行是题目。标签后面的词也可以当题目。
18
+ - 底有四种:
19
+ - 课包 id:那幅图的终帧做底,孩子在上面标画。
20
+ - 一张图的路径:照 `photos:` 里那样的 `captures/…` 相对路径写,照片做底。
21
+ - 一段行内骨架 JSON:`{"skeletons":[…]}`,课包场景的元素写法(chalk),不超过 40 个。
22
+ - 什么底都没有:只写题目,就是空白画板。
23
+
24
+ ## 例子
25
+
26
+ <!-- expect {"kind":"canvas","props":{"base":null,"prompt":"画一个三角形,标出它的一条高。"}} -->
27
+ ```canvas
28
+ 画一个三角形,标出它的一条高。
29
+ ```
30
+
31
+ <!-- expect {"kind":"canvas","props":{"base":{"bundle":"2026-09-10-guilv"},"prompt":"把每次少的那个数圈出来。"}} -->
32
+ ```canvas
33
+ 2026-09-10-guilv
34
+ 把每次少的那个数圈出来。
35
+ ```
36
+
37
+ <!-- expect {"kind":"canvas","props":{"base":{"image":"captures/2026-09-14/1620-1.jpg"},"prompt":"把算错的那道圈出来。"}} -->
38
+ ```canvas
39
+ captures/2026-09-14/1620-1.jpg
40
+ 把算错的那道圈出来。
41
+ ```
42
+
43
+ ## 反例
44
+
45
+ 行内骨架不是合法 JSON,解析不成:
46
+
47
+ <!-- expect {"kind":"text","warning":true} -->
48
+ ```canvas
49
+ {"skeletons": [
50
+ ```
51
+
52
+ ## 孩子看到什么
53
+
54
+ 紫色卡:题目 + 「点开画一画」(照片做底的,卡上先是那张照片的小图)。点开铺满整屏:顶栏是题目一行和「给老师看」;左边一列七个大钮(笔 / 橡皮 / 黑红蓝 / 撤销 / 清空),最底下是你的小头像;你给的底图是灰的。
55
+
56
+ 他画的时候可以按住你的小头像说话,嘴看着画接一句,不交给你。嘴有时也会主动看着画说一句、问一句。轻点「给老师看」是交画;按住它说话,是画和这句话一起交给你。
57
+
58
+ 交过之后卡上就是孩子画的那张图,锁住了,只能看、不能再画;要他再画,出一张新卡。
59
+
60
+ ## 你会收回什么
61
+
62
+ `<job>/<n> canvas「题目」 画了 12 笔(红 8、蓝 4),画了约 3 分钟,清空重画过 1 次,清掉的那几版:/…/captures/2026-09-10/1621-2.jpg(用 Read 看),图:/…/conversations/math-tutor/2026-09-10.1620-1.cards/3.png(用 Read 看)`。没清空过就没有那一段。
63
+
64
+ 图是绝对路径,交了画的那轮有 Read,先看图再回;看不了图就靠笔数。他画的时候说过的话在上下文包 `live:` 的 `draw:` 里。
65
+
66
+ ## 状态的形状
67
+
68
+ `{"ink": [...], "image": "conversations/…/3.png", "cleared": [{"at": …, "from": …, "strokes": 12, "image": "captures/…jpg"}]}` —— 孩子画的元素(画板的 ink 层)、导出的 png 路径(服务端写)、清空过的几版(清空的时刻、那一版第一笔的时刻、几笔、清空前存的图)。
@@ -0,0 +1,18 @@
1
+ /* 选择题(cards/choice/card.md):紧凑态只读的选项行;舞台里的大按钮 .so */
2
+ /* 选择:问题 + 选项;短选项横排成胶囊;选了的紫 */
3
+ .c.c-choice { gap:8px; }
4
+ .ch-q { font-weight:600; }
5
+ .ch-os { display:flex; flex-direction:column; gap:8px; }
6
+ .ch-os.short { flex-direction:row; flex-wrap:wrap; }
7
+ .ch-os.short .ch-o { flex:1 1 auto; min-width:88px; }
8
+ .ch-o { display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:12px; background:#ffffff; border:2px solid #ece8de; font-size:16px; }
9
+ .ch-o i { flex:0 0 auto; width:24px; height:24px; border-radius:50%; border:2px solid #d8d3c6; background:#fff; display:grid; place-items:center; font-style:normal; font-size:12px; font-weight:700; color:var(--dim); }
10
+ .ch-o.on { border-color:var(--tint-plum-head); background:var(--tint-plum-bg); }
11
+ .ch-o.on i { background:var(--tint-plum-head); border-color:var(--tint-plum-head); color:#fff; }
12
+ /* 舞台 */
13
+ .sq { font-size:22px; font-weight:600; line-height:1.5; }
14
+ .so { display:flex; align-items:center; gap:14px; padding:16px 18px; border-radius:16px; background:#ffffff; border:2px solid #ece8de; font-size:20px; text-align:left; width:100%; transition:transform .1s; }
15
+ .so:active { transform:scale(.985); }
16
+ .so i { flex:0 0 auto; width:34px; height:34px; border-radius:50%; border:2px solid #d8d3c6; background:#fff; display:grid; place-items:center; font-style:normal; font-size:15px; font-weight:700; color:var(--dim); }
17
+ .so.on { border-color:var(--tint-plum-head); background:var(--tint-plum-bg); }
18
+ .so.on i { background:var(--tint-plum-head); border-color:var(--tint-plum-head); color:#fff; }