daily-question 1.0.6 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -14
- package/client.js +128 -400
- package/lib/routes.js +14 -14
- package/package.json +2 -2
- package/vendor/mathjax/LICENSE +202 -0
- package/vendor/mathjax/tex-svg.js +34 -0
- package/assets/LICENSE-latin-modern-math.txt +0 -93
- package/assets/latinmodern-math.otf +0 -0
package/README.md
CHANGED
|
@@ -30,22 +30,22 @@
|
|
|
30
30
|
区分报名年份与实际考试日期:2028 考研 = 2027 年 12 月初试。已公布的用官方日期(不带「约」);未公布的以上一年同一考试的官方日期推后一年估算,并在三行倒计时里都标「约」;查不到依据就明确写「尚未核实」,不编日期。页面上的「核验日期」会联网只采信 `moe.gov.cn` / `chsi.com.cn` / `neea.edu.cn`。
|
|
31
31
|
|
|
32
32
|
**渲染**
|
|
33
|
-
题干、选项、答案、解析均支持 Markdown:标题、列表、引用、表格、代码块(保留缩进与换行)、图片、行内与独立 LaTeX
|
|
33
|
+
题干、选项、答案、解析均支持 Markdown:标题、列表、引用、表格、代码块(保留缩进与换行)、图片、行内与独立 LaTeX 公式。公式由 **MathJax 3** 渲染(SVG 输出、随包分发、完全离线):可拉伸根号、矩阵定界符、`\boxed`、`\begin{aligned}`、`\ce{}` 化学式都原生支持,覆盖范围跟随 MathJax 的宏列表。公式块里的裸 `\\` 换行会自动包一层 `\displaylines`(MathJax 3 的要求,与 Typora 的处理一致)。引擎加载完成前先显示 TeX 原文,渲染失败时降级为红字提示,不会让整块内容静默消失。
|
|
34
34
|
|
|
35
35
|
## 安装
|
|
36
36
|
|
|
37
37
|
需要可用的 DeepSeek Harness,以及一个能用的默认模型(在线出题要用)。
|
|
38
38
|
|
|
39
39
|
> 装插件需要 git 或 npm 其中一条通路。**没有 git 的机器**请用下面第 1 种(仓库自带的
|
|
40
|
-
> `dist/daily-question-1.0.
|
|
40
|
+
> `dist/daily-question-1.1.0.tgz`)或发到 npm 之后的包名,这两种都不调用 git。
|
|
41
41
|
|
|
42
42
|
### 1. 用仓库自带的 tgz(不需要 git、不需要联网装依赖)
|
|
43
43
|
|
|
44
|
-
仓库里带了一个已打包好的插件:`dist/daily-question-1.0.
|
|
44
|
+
仓库里带了一个已打包好的插件:`dist/daily-question-1.1.0.tgz`。
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
47
|
# 下载仓库后(ZIP 或 git clone 都行),用本地文件安装
|
|
48
|
-
dsh plugin --profile web add ./dist/daily-question-1.0.
|
|
48
|
+
dsh plugin --profile web add ./dist/daily-question-1.1.0.tgz
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
DSH Desktop 上:插件页的安装输入框填**这个 tgz 的绝对路径**,或把路径交给 Agent 用
|
|
@@ -65,14 +65,14 @@ profile 名就是你启动 DSH 时用的那个:跑 `dsh web` 就是 `--profile
|
|
|
65
65
|
**从 npm 装**(最省事,不需要 git):
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
dsh plugin --profile web add daily-question@1.0
|
|
68
|
+
dsh plugin --profile web add daily-question@1.1.0
|
|
69
69
|
dsh plugin --profile web add daily-question # 跟随最新版
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
**从 GitHub 装**(需要本机有 git):
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
|
-
dsh plugin --profile web add github:Scienmicroit/Daily-Question#v1.0
|
|
75
|
+
dsh plugin --profile web add github:Scienmicroit/Daily-Question#v1.1.0
|
|
76
76
|
dsh plugin --profile web add github:Scienmicroit/Daily-Question # 不写 #tag 取默认分支最新提交
|
|
77
77
|
```
|
|
78
78
|
|
|
@@ -92,8 +92,8 @@ dsh plugin --profile web add ./Daily-Question
|
|
|
92
92
|
已经装好 DSH 的话,把下面任一 target 交给 Agent,让它调用 `plugin_manager` 的 `install_bundle`:
|
|
93
93
|
|
|
94
94
|
- 本地目录或 tgz 的绝对路径(不需要 git)
|
|
95
|
-
- `daily-question@1.0
|
|
96
|
-
- `github:Scienmicroit/Daily-Question#v1.0
|
|
95
|
+
- `daily-question@1.1.0`(发布到 npm 之后)
|
|
96
|
+
- `github:Scienmicroit/Daily-Question#v1.1.0`(本机有 git 时)
|
|
97
97
|
|
|
98
98
|
### 升级与卸载
|
|
99
99
|
|
|
@@ -144,10 +144,10 @@ lib/tutor.js 追问回复(严格限定当前题目)
|
|
|
144
144
|
lib/bank.js 题库解析(题干 / 选项 / 答案 / 解析 / 知识点 / 难度)
|
|
145
145
|
lib/pdf.js 纯 JS 的 PDF 文本提取(文本型 PDF,含 ToUnicode CMap)
|
|
146
146
|
lib/exam-dates.js 考研日期口径、估算规则、倒计时、官方日期联网核验
|
|
147
|
-
lib/routes.js 同源 HTTP 接口 +
|
|
147
|
+
lib/routes.js 同源 HTTP 接口 + 公式引擎静态资源
|
|
148
148
|
lib/subjects.js 科目目录、题型、大纲提示
|
|
149
149
|
lib/llm-json.js 模型调用与 JSON 容错解析
|
|
150
|
-
|
|
150
|
+
vendor/mathjax/ MathJax 3 单文件 bundle 及其许可(Apache-2.0)
|
|
151
151
|
test/ 离线单元/集成测试(不需要模型与网络)
|
|
152
152
|
```
|
|
153
153
|
|
|
@@ -165,17 +165,19 @@ node test/pdf-check.mjs <某个文本型 PDF 的路径> # PDF 提取与题库
|
|
|
165
165
|
## 已知限制
|
|
166
166
|
|
|
167
167
|
- **PDF 只支持文本型**:纯 JS 实现,不 OCR;扫描件、图片型 PDF 与带权限加密的 PDF 会明确拒绝并提示改用 Markdown,不会伪装成导入成功。
|
|
168
|
-
-
|
|
168
|
+
- **公式用的是 MathJax 3**:不支持的命令会显示成红色错误标记(MathJax 的标准行为),不会再退化成原文;TikZ 之类的绘图命令不在支持范围。
|
|
169
169
|
- **导入题库的答案一律标「待核验」**,系统不会自动核验;只有「修订」流程会做独立校验。
|
|
170
170
|
- 主观题不做自动判分(按考试要求由你自己判定)。
|
|
171
171
|
- 暂未实现按知识点/难度筛选、学习统计与连续天数、题目质量反馈。
|
|
172
172
|
|
|
173
|
-
##
|
|
173
|
+
## 公式引擎许可
|
|
174
174
|
|
|
175
|
-
`
|
|
175
|
+
`vendor/mathjax/tex-svg.js` 是 MathJax 3.2.2 的官方单文件 bundle(TeX 输入 + SVG 输出,含全部 TeX 扩展),版权归 MathJax Consortium,按 **Apache License 2.0** 发布,允许自由使用与再分发。许可原文见 `vendor/mathjax/LICENSE`。
|
|
176
|
+
|
|
177
|
+
SVG 输出自带字形路径,所以不再需要单独分发数学字体文件(1.0.x 里的 Latin Modern Math OTF 已移除)。
|
|
176
178
|
|
|
177
179
|
## License
|
|
178
180
|
|
|
179
181
|
本插件代码以 **MIT** 许可发布,见仓库根目录的 [LICENSE](LICENSE)。
|
|
180
182
|
|
|
181
|
-
`
|
|
183
|
+
`vendor/mathjax/` 不适用 MIT:MathJax 按 Apache License 2.0 发布,许可原文见 `vendor/mathjax/LICENSE`。
|