dsh-aha-tutor 1.6.0 → 1.7.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.
- package/CHANGELOG.md +22 -0
- package/README.en.md +3 -2
- package/README.md +3 -2
- package/docs/guide.zh-CN.md +18 -5
- package/lib/agent.js +1 -1
- package/lib/client.js +103 -31
- package/lib/index.js +276 -13
- package/lib/{runtime-B6zUpJjA.js → runtime-DfoeKFPj.js} +245 -151
- package/package.json +1 -1
- package/samples/bayes-thinking.aha-course.json +62 -56
- package/samples/harmonic-motion.aha-course.json +70 -63
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "aha-tutor.coursepack",
|
|
3
3
|
"version": 1,
|
|
4
|
-
"exportedAt": "2026-10-
|
|
4
|
+
"exportedAt": "2026-10-22T07:38:00.034Z",
|
|
5
5
|
"app": {
|
|
6
6
|
"name": "dsh-aha-tutor",
|
|
7
7
|
"version": "sample"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"goal": "适合高中到大一的学习者。从“为什么会来回振动”出发,建立回复力、周期、相位的直觉,再推出单摆公式,最后用自己测的数据验证它。",
|
|
17
17
|
"units": [
|
|
18
18
|
{
|
|
19
|
-
"id": "
|
|
19
|
+
"id": "unt_mvj8b7q337vxfe",
|
|
20
20
|
"title": "振动从哪里来",
|
|
21
21
|
"summary": "回复力让物体来回运动;一个旋转的圆告诉我们它的样子。",
|
|
22
22
|
"objectives": [
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
],
|
|
26
26
|
"lectures": [
|
|
27
27
|
{
|
|
28
|
-
"id": "
|
|
28
|
+
"id": "lec_mvj8b7q357t7qj",
|
|
29
29
|
"title": "回复力",
|
|
30
30
|
"summary": "",
|
|
31
31
|
"lessons": [
|
|
32
32
|
{
|
|
33
|
-
"id": "
|
|
33
|
+
"id": "les_mvj8b7pxmz62bq",
|
|
34
34
|
"title": "回复力:为什么会来回振动",
|
|
35
35
|
"summary": "从弹簧振子出发认识回复力与胡克定律。",
|
|
36
36
|
"objectives": [
|
|
@@ -39,19 +39,20 @@
|
|
|
39
39
|
],
|
|
40
40
|
"concepts": [
|
|
41
41
|
{
|
|
42
|
-
"id": "
|
|
42
|
+
"id": "cpt_mvj8b7q3dujcjs",
|
|
43
43
|
"name": "回复力"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
"id": "
|
|
46
|
+
"id": "cpt_mvj8b7q395r5c8",
|
|
47
47
|
"name": "胡克定律"
|
|
48
48
|
}
|
|
49
49
|
],
|
|
50
50
|
"estMinutes": 12,
|
|
51
|
-
"kind": "lesson"
|
|
51
|
+
"kind": "lesson",
|
|
52
|
+
"depth": "intuition"
|
|
52
53
|
},
|
|
53
54
|
{
|
|
54
|
-
"id": "
|
|
55
|
+
"id": "les_mvj8b7q3p6427y",
|
|
55
56
|
"title": "振幅、周期与频率",
|
|
56
57
|
"summary": "描述振动的三个基本量。",
|
|
57
58
|
"objectives": [
|
|
@@ -60,26 +61,27 @@
|
|
|
60
61
|
],
|
|
61
62
|
"concepts": [
|
|
62
63
|
{
|
|
63
|
-
"id": "
|
|
64
|
+
"id": "cpt_mvj8b7q3dek4v4",
|
|
64
65
|
"name": "振幅"
|
|
65
66
|
},
|
|
66
67
|
{
|
|
67
|
-
"id": "
|
|
68
|
+
"id": "cpt_mvj8b7q3gs2nno",
|
|
68
69
|
"name": "周期与频率"
|
|
69
70
|
}
|
|
70
71
|
],
|
|
71
72
|
"estMinutes": 12,
|
|
72
|
-
"kind": "lesson"
|
|
73
|
+
"kind": "lesson",
|
|
74
|
+
"depth": "definition"
|
|
73
75
|
}
|
|
74
76
|
]
|
|
75
77
|
},
|
|
76
78
|
{
|
|
77
|
-
"id": "
|
|
79
|
+
"id": "lec_mvj8b7q34rai2h",
|
|
78
80
|
"title": "运动的样子",
|
|
79
81
|
"summary": "",
|
|
80
82
|
"lessons": [
|
|
81
83
|
{
|
|
82
|
-
"id": "
|
|
84
|
+
"id": "les_mvj8b7q3qxdad8",
|
|
83
85
|
"title": "从圆周运动看简谐运动",
|
|
84
86
|
"summary": "简谐运动是匀速圆周运动的“影子”。",
|
|
85
87
|
"objectives": [
|
|
@@ -88,19 +90,20 @@
|
|
|
88
90
|
],
|
|
89
91
|
"concepts": [
|
|
90
92
|
{
|
|
91
|
-
"id": "
|
|
93
|
+
"id": "cpt_mvj8b7q3txx0am",
|
|
92
94
|
"name": "参考圆"
|
|
93
95
|
},
|
|
94
96
|
{
|
|
95
|
-
"id": "
|
|
97
|
+
"id": "cpt_mvj8b7q37jafdw",
|
|
96
98
|
"name": "角频率"
|
|
97
99
|
}
|
|
98
100
|
],
|
|
99
101
|
"estMinutes": 15,
|
|
100
|
-
"kind": "lesson"
|
|
102
|
+
"kind": "lesson",
|
|
103
|
+
"depth": "intuition"
|
|
101
104
|
},
|
|
102
105
|
{
|
|
103
|
-
"id": "
|
|
106
|
+
"id": "les_mvj8b7q3i0ljh2",
|
|
104
107
|
"title": "位移、速度与加速度的相位关系",
|
|
105
108
|
"summary": "三个量依次相差四分之一个周期。",
|
|
106
109
|
"objectives": [
|
|
@@ -109,23 +112,24 @@
|
|
|
109
112
|
],
|
|
110
113
|
"concepts": [
|
|
111
114
|
{
|
|
112
|
-
"id": "
|
|
115
|
+
"id": "cpt_mvj8b7q3fruh8b",
|
|
113
116
|
"name": "相位"
|
|
114
117
|
},
|
|
115
118
|
{
|
|
116
|
-
"id": "
|
|
119
|
+
"id": "cpt_mvj8b7q3klo0vd",
|
|
117
120
|
"name": "速度与加速度"
|
|
118
121
|
}
|
|
119
122
|
],
|
|
120
123
|
"estMinutes": 15,
|
|
121
|
-
"kind": "lesson"
|
|
124
|
+
"kind": "lesson",
|
|
125
|
+
"depth": "derivation"
|
|
122
126
|
}
|
|
123
127
|
]
|
|
124
128
|
}
|
|
125
129
|
]
|
|
126
130
|
},
|
|
127
131
|
{
|
|
128
|
-
"id": "
|
|
132
|
+
"id": "unt_mvj8b7q3l20pi0",
|
|
129
133
|
"title": "单摆与能量",
|
|
130
134
|
"summary": "把方法用到单摆上,并从能量的角度再看一次振动。",
|
|
131
135
|
"objectives": [
|
|
@@ -134,12 +138,12 @@
|
|
|
134
138
|
],
|
|
135
139
|
"lectures": [
|
|
136
140
|
{
|
|
137
|
-
"id": "
|
|
141
|
+
"id": "lec_mvj8b7q323dsd5",
|
|
138
142
|
"title": "单摆",
|
|
139
143
|
"summary": "",
|
|
140
144
|
"lessons": [
|
|
141
145
|
{
|
|
142
|
-
"id": "
|
|
146
|
+
"id": "les_mvj8b7q3llye25",
|
|
143
147
|
"title": "小角度近似:单摆为什么是简谐运动",
|
|
144
148
|
"summary": "sin θ ≈ θ 让单摆满足回复力的形式。",
|
|
145
149
|
"objectives": [
|
|
@@ -148,19 +152,20 @@
|
|
|
148
152
|
],
|
|
149
153
|
"concepts": [
|
|
150
154
|
{
|
|
151
|
-
"id": "
|
|
155
|
+
"id": "cpt_mvj8b7q3sfbbgm",
|
|
152
156
|
"name": "小角度近似"
|
|
153
157
|
},
|
|
154
158
|
{
|
|
155
|
-
"id": "
|
|
159
|
+
"id": "cpt_mvj8b7q3e16b3o",
|
|
156
160
|
"name": "单摆的回复力"
|
|
157
161
|
}
|
|
158
162
|
],
|
|
159
163
|
"estMinutes": 15,
|
|
160
|
-
"kind": "lesson"
|
|
164
|
+
"kind": "lesson",
|
|
165
|
+
"depth": "derivation"
|
|
161
166
|
},
|
|
162
167
|
{
|
|
163
|
-
"id": "
|
|
168
|
+
"id": "les_mvj8b7q3xaunkn",
|
|
164
169
|
"title": "周期公式与测量重力加速度",
|
|
165
170
|
"summary": "T = 2π√(L/g),以及如何用它测出 g。",
|
|
166
171
|
"objectives": [
|
|
@@ -169,26 +174,27 @@
|
|
|
169
174
|
],
|
|
170
175
|
"concepts": [
|
|
171
176
|
{
|
|
172
|
-
"id": "
|
|
177
|
+
"id": "cpt_mvj8b7q35g6roy",
|
|
173
178
|
"name": "单摆周期"
|
|
174
179
|
},
|
|
175
180
|
{
|
|
176
|
-
"id": "
|
|
181
|
+
"id": "cpt_mvj8b7q327awdr",
|
|
177
182
|
"name": "重力加速度"
|
|
178
183
|
}
|
|
179
184
|
],
|
|
180
185
|
"estMinutes": 12,
|
|
181
|
-
"kind": "lesson"
|
|
186
|
+
"kind": "lesson",
|
|
187
|
+
"depth": "application"
|
|
182
188
|
}
|
|
183
189
|
]
|
|
184
190
|
},
|
|
185
191
|
{
|
|
186
|
-
"id": "
|
|
192
|
+
"id": "lec_mvj8b7q3b3ya6r",
|
|
187
193
|
"title": "能量视角",
|
|
188
194
|
"summary": "",
|
|
189
195
|
"lessons": [
|
|
190
196
|
{
|
|
191
|
-
"id": "
|
|
197
|
+
"id": "les_mvj8b7q3td0sow",
|
|
192
198
|
"title": "动能与势能的来回交换",
|
|
193
199
|
"summary": "振动的过程就是能量在两种形式之间流动。",
|
|
194
200
|
"objectives": [
|
|
@@ -197,16 +203,17 @@
|
|
|
197
203
|
],
|
|
198
204
|
"concepts": [
|
|
199
205
|
{
|
|
200
|
-
"id": "
|
|
206
|
+
"id": "cpt_mvj8b7q3ffw9gg",
|
|
201
207
|
"name": "机械能守恒"
|
|
202
208
|
},
|
|
203
209
|
{
|
|
204
|
-
"id": "
|
|
210
|
+
"id": "cpt_mvj8b7q33redu7",
|
|
205
211
|
"name": "振动的能量"
|
|
206
212
|
}
|
|
207
213
|
],
|
|
208
214
|
"estMinutes": 12,
|
|
209
|
-
"kind": "lesson"
|
|
215
|
+
"kind": "lesson",
|
|
216
|
+
"depth": "extension"
|
|
210
217
|
}
|
|
211
218
|
]
|
|
212
219
|
}
|
|
@@ -215,7 +222,7 @@
|
|
|
215
222
|
],
|
|
216
223
|
"projects": [
|
|
217
224
|
{
|
|
218
|
-
"id": "
|
|
225
|
+
"id": "prj_mvj8b7q4ahltlv",
|
|
219
226
|
"title": "用一根绳子测出重力加速度",
|
|
220
227
|
"kind": "code",
|
|
221
228
|
"brief": "用手机秒表和一根绳子做一个单摆,测出不同摆长下的周期,再用 Python 画出 T² 与 L 的关系,从直线斜率求出你所在地的重力加速度 g,并和 9.8 m/s² 比较、分析误差来源。",
|
|
@@ -286,12 +293,12 @@
|
|
|
286
293
|
"content": "import csv\nimport math\n\n# 读取数据\nrows = list(csv.DictReader(open(\"data.csv\", encoding=\"utf-8\")))\nL = [float(r[\"length_m\"]) for r in rows]\nT = [float(r[\"time_10_s\"]) / 10 for r in rows]\n\n# TODO 1:计算每个摆长对应的 T 的平方\nT2 = []\n\n# TODO 2:对 T2 关于 L 做最小二乘线性拟合,求斜率 k\n# 提示:k = Σ(L - L̄)(T2 - T̄2) / Σ(L - L̄)²\nk = None\n\n# TODO 3:由 T² = (4π²/g)·L 求 g\ng = None\n\nprint(\"g =\", g)\n"
|
|
287
294
|
}
|
|
288
295
|
],
|
|
289
|
-
"unitId": "
|
|
296
|
+
"unitId": "unt_mvj8b7q3l20pi0"
|
|
290
297
|
}
|
|
291
298
|
]
|
|
292
299
|
},
|
|
293
300
|
"boards": {
|
|
294
|
-
"
|
|
301
|
+
"les_mvj8b7pxmz62bq": {
|
|
295
302
|
"title": "回复力:为什么会来回振动",
|
|
296
303
|
"steps": [
|
|
297
304
|
{
|
|
@@ -402,7 +409,7 @@
|
|
|
402
409
|
"hints": [],
|
|
403
410
|
"difficulty": 2,
|
|
404
411
|
"conceptIds": [
|
|
405
|
-
"
|
|
412
|
+
"cpt_mvj8b7q3dujcjs"
|
|
406
413
|
],
|
|
407
414
|
"options": [
|
|
408
415
|
{
|
|
@@ -530,7 +537,7 @@
|
|
|
530
537
|
"hints": [],
|
|
531
538
|
"difficulty": 2,
|
|
532
539
|
"conceptIds": [
|
|
533
|
-
"
|
|
540
|
+
"cpt_mvj8b7q395r5c8"
|
|
534
541
|
],
|
|
535
542
|
"answer": 4,
|
|
536
543
|
"tolerance": 0.01,
|
|
@@ -560,8 +567,8 @@
|
|
|
560
567
|
"hints": [],
|
|
561
568
|
"difficulty": 2,
|
|
562
569
|
"conceptIds": [
|
|
563
|
-
"
|
|
564
|
-
"
|
|
570
|
+
"cpt_mvj8b7q3dujcjs",
|
|
571
|
+
"cpt_mvj8b7q395r5c8"
|
|
565
572
|
],
|
|
566
573
|
"options": [
|
|
567
574
|
{
|
|
@@ -585,9 +592,9 @@
|
|
|
585
592
|
}
|
|
586
593
|
}
|
|
587
594
|
],
|
|
588
|
-
"lessonId": "
|
|
595
|
+
"lessonId": "les_mvj8b7pxmz62bq"
|
|
589
596
|
},
|
|
590
|
-
"
|
|
597
|
+
"les_mvj8b7q3qxdad8": {
|
|
591
598
|
"title": "从圆周运动看简谐运动",
|
|
592
599
|
"steps": [
|
|
593
600
|
{
|
|
@@ -654,7 +661,7 @@
|
|
|
654
661
|
"hints": [],
|
|
655
662
|
"difficulty": 2,
|
|
656
663
|
"conceptIds": [
|
|
657
|
-
"
|
|
664
|
+
"cpt_mvj8b7q3txx0am"
|
|
658
665
|
],
|
|
659
666
|
"options": [
|
|
660
667
|
{
|
|
@@ -728,7 +735,7 @@
|
|
|
728
735
|
"hints": [],
|
|
729
736
|
"difficulty": 2,
|
|
730
737
|
"conceptIds": [
|
|
731
|
-
"
|
|
738
|
+
"cpt_mvj8b7q37jafdw"
|
|
732
739
|
],
|
|
733
740
|
"answer": 10,
|
|
734
741
|
"tolerance": 0.01,
|
|
@@ -1434,8 +1441,8 @@
|
|
|
1434
1441
|
"hints": [],
|
|
1435
1442
|
"difficulty": 2,
|
|
1436
1443
|
"conceptIds": [
|
|
1437
|
-
"
|
|
1438
|
-
"
|
|
1444
|
+
"cpt_mvj8b7q37jafdw",
|
|
1445
|
+
"cpt_mvj8b7q3txx0am"
|
|
1439
1446
|
],
|
|
1440
1447
|
"options": [
|
|
1441
1448
|
{
|
|
@@ -1459,12 +1466,12 @@
|
|
|
1459
1466
|
}
|
|
1460
1467
|
}
|
|
1461
1468
|
],
|
|
1462
|
-
"lessonId": "
|
|
1469
|
+
"lessonId": "les_mvj8b7q3qxdad8"
|
|
1463
1470
|
}
|
|
1464
1471
|
},
|
|
1465
1472
|
"practice": {
|
|
1466
|
-
"
|
|
1467
|
-
"lessonId": "
|
|
1473
|
+
"les_mvj8b7pxmz62bq": {
|
|
1474
|
+
"lessonId": "les_mvj8b7pxmz62bq",
|
|
1468
1475
|
"items": [
|
|
1469
1476
|
{
|
|
1470
1477
|
"id": "i1",
|
|
@@ -1476,7 +1483,7 @@
|
|
|
1476
1483
|
],
|
|
1477
1484
|
"difficulty": 1,
|
|
1478
1485
|
"conceptIds": [
|
|
1479
|
-
"
|
|
1486
|
+
"cpt_mvj8b7q3dujcjs"
|
|
1480
1487
|
],
|
|
1481
1488
|
"options": [
|
|
1482
1489
|
{
|
|
@@ -1508,7 +1515,7 @@
|
|
|
1508
1515
|
],
|
|
1509
1516
|
"difficulty": 1,
|
|
1510
1517
|
"conceptIds": [
|
|
1511
|
-
"
|
|
1518
|
+
"cpt_mvj8b7q395r5c8"
|
|
1512
1519
|
],
|
|
1513
1520
|
"answer": 5,
|
|
1514
1521
|
"tolerance": 0.01,
|
|
@@ -1524,7 +1531,7 @@
|
|
|
1524
1531
|
],
|
|
1525
1532
|
"difficulty": 1,
|
|
1526
1533
|
"conceptIds": [
|
|
1527
|
-
"
|
|
1534
|
+
"cpt_mvj8b7q395r5c8"
|
|
1528
1535
|
],
|
|
1529
1536
|
"answer": [
|
|
1530
1537
|
"-kx",
|
|
@@ -1544,7 +1551,7 @@
|
|
|
1544
1551
|
],
|
|
1545
1552
|
"difficulty": 2,
|
|
1546
1553
|
"conceptIds": [
|
|
1547
|
-
"
|
|
1554
|
+
"cpt_mvj8b7q3dujcjs"
|
|
1548
1555
|
],
|
|
1549
1556
|
"options": [
|
|
1550
1557
|
{
|
|
@@ -1574,7 +1581,7 @@
|
|
|
1574
1581
|
"hints": [],
|
|
1575
1582
|
"difficulty": 2,
|
|
1576
1583
|
"conceptIds": [
|
|
1577
|
-
"
|
|
1584
|
+
"cpt_mvj8b7q3dujcjs"
|
|
1578
1585
|
],
|
|
1579
1586
|
"answer": "到达平衡位置时回复力为零但速度最大,由于惯性会冲过平衡位置;冲过之后回复力反向,使它减速并被拉回,如此往复。",
|
|
1580
1587
|
"rubric": [
|
|
@@ -1585,8 +1592,8 @@
|
|
|
1585
1592
|
}
|
|
1586
1593
|
]
|
|
1587
1594
|
},
|
|
1588
|
-
"
|
|
1589
|
-
"lessonId": "
|
|
1595
|
+
"les_mvj8b7q3qxdad8": {
|
|
1596
|
+
"lessonId": "les_mvj8b7q3qxdad8",
|
|
1590
1597
|
"items": [
|
|
1591
1598
|
{
|
|
1592
1599
|
"id": "i1",
|
|
@@ -1596,7 +1603,7 @@
|
|
|
1596
1603
|
"hints": [],
|
|
1597
1604
|
"difficulty": 1,
|
|
1598
1605
|
"conceptIds": [
|
|
1599
|
-
"
|
|
1606
|
+
"cpt_mvj8b7q3txx0am"
|
|
1600
1607
|
],
|
|
1601
1608
|
"options": [
|
|
1602
1609
|
{
|
|
@@ -1628,7 +1635,7 @@
|
|
|
1628
1635
|
],
|
|
1629
1636
|
"difficulty": 1,
|
|
1630
1637
|
"conceptIds": [
|
|
1631
|
-
"
|
|
1638
|
+
"cpt_mvj8b7q37jafdw"
|
|
1632
1639
|
],
|
|
1633
1640
|
"answer": 12.566,
|
|
1634
1641
|
"tolerance": 0.06,
|
|
@@ -1642,7 +1649,7 @@
|
|
|
1642
1649
|
"hints": [],
|
|
1643
1650
|
"difficulty": 1,
|
|
1644
1651
|
"conceptIds": [
|
|
1645
|
-
"
|
|
1652
|
+
"cpt_mvj8b7q3txx0am"
|
|
1646
1653
|
],
|
|
1647
1654
|
"options": [
|
|
1648
1655
|
{
|
|
@@ -1674,7 +1681,7 @@
|
|
|
1674
1681
|
],
|
|
1675
1682
|
"difficulty": 2,
|
|
1676
1683
|
"conceptIds": [
|
|
1677
|
-
"
|
|
1684
|
+
"cpt_mvj8b7q37jafdw"
|
|
1678
1685
|
],
|
|
1679
1686
|
"answer": 1.2566,
|
|
1680
1687
|
"tolerance": 0.01,
|
|
@@ -1688,7 +1695,7 @@
|
|
|
1688
1695
|
"hints": [],
|
|
1689
1696
|
"difficulty": 2,
|
|
1690
1697
|
"conceptIds": [
|
|
1691
|
-
"
|
|
1698
|
+
"cpt_mvj8b7q37jafdw"
|
|
1692
1699
|
],
|
|
1693
1700
|
"options": [
|
|
1694
1701
|
{
|