question-workbench-mcp 0.3.3 → 0.3.5
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 +1 -1
- package/client.js +3 -3
- package/index.js +6 -6
- package/package.json +27 -7
- package/server.js +4 -4
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
2. **② 核对题目**:把回复粘贴进来修改;「已核对」勾选框为**可选**,不再拦下一步。
|
|
23
23
|
3. **③ 分析解题**:思路分析 / 完整解题 / 知识总结 / 一键全流程;「预览」「导出讲义」「打印」。
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
识别提示已简化为两段(【题目】【图形】),不再要求【待确认】;生成讲义时若文本里仍残留【待确认】段,会被自动剥离(传 `skipChecks: false` 可保留)。
|
|
26
26
|
|
|
27
27
|
## 二、MCP 安装
|
|
28
28
|
|
package/client.js
CHANGED
|
@@ -10,7 +10,7 @@ window.__ModuleLoader__.load({
|
|
|
10
10
|
pick: '选择题目图片', optional: '已有题目文字(可选)', recognize: '提交识题',
|
|
11
11
|
sending: '发送中…', sent: '已发送,请在聊天中查看回复', needPhoto: '请先添加至少一张题目图片', needText: '请先粘贴或录入题目内容',
|
|
12
12
|
hint1: '在面板内直接 Ctrl+V 粘贴截图,或点「选择题目图片」;图片会随提示发给当前会话。',
|
|
13
|
-
pasteHint: '
|
|
13
|
+
pasteHint: '把回复中的【题目】【图形】粘贴到这里,删掉多余解释。',
|
|
14
14
|
textLabel: '题目与图形(可编辑)', placeholder: '粘贴识别结果或手工录入…',
|
|
15
15
|
pending: '待确认:', verified: '已核对题目(可选)', pasted: '已粘贴图片', next: '下一步', back: '上一步', toCheck: '下一步:核对题目', verifiedFirst: '请先勾选“我已对照原图核对”', pasteWait: '等模型回复后,把【题目】【图形】【待确认】粘到下面',
|
|
16
16
|
analysis: '思路分析', solve: '完整解题', summary: '知识总结', all: '一键全流程',
|
|
@@ -19,7 +19,7 @@ window.__ModuleLoader__.load({
|
|
|
19
19
|
fail: '发送失败:', noSession: '当前会话不可用,请先打开一个会话',
|
|
20
20
|
sendAsk: '发送', notesLabel: '解答 / 解析', notesPlaceholder: '把模型的思路、解答或总结粘贴到这里;会打印在题目之后', autoFilled: '已自动填入模型回复', waiting: '已发送,等待模型回复后自动填入…', autoFail: '未自动获取到回复,可用「从剪贴板粘贴」手动补充', saved: '文字自动保存在本机浏览器(按会话)', diagramNote: '图形以原图为准:打印默认附原图,文本里的「图形」一行仅作排版提示。', limit: '最多 12 张,单张 ≤15MB',
|
|
21
21
|
src: '已核对题目:\n', rule: '以下内容已由用户对照原图人工核对,直接作为已知条件使用;不要重新质疑,也不要补充未确认的关系。\n\n',
|
|
22
|
-
rec: '
|
|
22
|
+
rec: '只做识别,严格输出两段,不要解释或额外分节:\n【题目】逐字转录印刷文字,保留题号、选项、符号和公式;看不清写[待核实:简短原因],不要猜。\n【图形】每张图一行,≤25字,只写可见关键元素,例如:图1 三角形ABC,P在内部,BM、CN交于P。\n【待确认】最多3条、每条≤15字;没有写“无”。',
|
|
23
23
|
askA: '只给思路,不要完整计算:①考点1行 ②关键思路3-5步。≤200字。',
|
|
24
24
|
askS: '给完整解题过程:分步推导+最终答案,公式简洁。≤400字。',
|
|
25
25
|
askM: '只总结:3-5条知识点与易错点,每条一行。≤150字。',
|
|
@@ -40,7 +40,7 @@ window.__ModuleLoader__.load({
|
|
|
40
40
|
fail: 'Send failed: ', noSession: 'No usable session; open a conversation first',
|
|
41
41
|
sendAsk: 'Send', notesLabel: 'Solution', notesPlaceholder: 'Paste the reasoning or solution here; it prints after the question', autoFilled: 'Model reply filled in automatically', waiting: 'Sent. Waiting for the reply to fill in…', autoFail: 'No reply captured; use "Paste from clipboard"', saved: 'Text is saved in this browser per session', diagramNote: 'The original photo is the diagram source; printing includes it by default. The one-line diagram note is for layout only.', limit: 'Up to 12 photos, 15 MB each',
|
|
42
42
|
src: 'Checked question:\n', rule: 'The user checked the following against the photos; use it as given. Do not re-question it or add unconfirmed relations.\n\n',
|
|
43
|
-
rec: 'Transcribe only. Output exactly
|
|
43
|
+
rec: 'Transcribe only. Output exactly two sections, no extra explanation:\n[Question] literal printed text, keeping numbering, symbols and formulas; write [verify: short reason] instead of guessing.\n[Diagram] one line per figure, ≤25 words, only visible key elements, e.g. Fig.1 triangle ABC, P inside, BM and CN meet at P.\n[Checks] at most 3 items, ≤15 words each; write "none" if none.',
|
|
44
44
|
askA: 'Reasoning only: 1 line of key concepts, then 3-5 steps. ≤200 words.',
|
|
45
45
|
askS: 'Full solution: step-by-step work and final answer, concise formulas. ≤400 words.',
|
|
46
46
|
askM: 'Key points only: 3-5 lines of concepts and common mistakes. ≤150 words.',
|
package/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import path from 'node:path';
|
|
|
4
4
|
|
|
5
5
|
const PROMPTS = {
|
|
6
6
|
zh: {
|
|
7
|
-
recognition: '
|
|
7
|
+
recognition: '只做识别,严格输出两段,不要解释或额外分节:\n【题目】逐字转录印刷文字,保留题号、选项、符号和公式;看不清写[待核实:简短原因],不要猜。\n【图形】每张图一行,≤25字,只写可见关键元素,例如:图1 三角形ABC,P在内部,BM、CN交于P。\n【待确认】最多3条、每条≤15字;没有写“无”。',
|
|
8
8
|
analysis: '以下内容已由用户对照原图人工核对,直接作为已知条件使用;不要重新质疑,也不要补充未确认的关系。\n\n已核对题目:\n{text}\n\n只给思路,不要完整计算:①考点1行 ②关键思路3-5步。≤200字。',
|
|
9
9
|
solution: '以下内容已由用户对照原图人工核对,直接作为已知条件使用;不要重新质疑,也不要补充未确认的关系。\n\n已核对题目:\n{text}\n\n给完整解题过程:分步推导+最终答案,公式简洁。≤400字。',
|
|
10
10
|
summary: '以下内容已由用户对照原图人工核对,直接作为已知条件使用;不要重新质疑,也不要补充未确认的关系。\n\n已核对题目:\n{text}\n\n只总结:3-5条知识点与易错点,每条一行。≤150字。',
|
|
@@ -13,7 +13,7 @@ const PROMPTS = {
|
|
|
13
13
|
solutionLabel: '解答'
|
|
14
14
|
},
|
|
15
15
|
en: {
|
|
16
|
-
recognition: 'Transcribe only. Output exactly
|
|
16
|
+
recognition: 'Transcribe only. Output exactly two sections, no extra explanation:\n[Question] literal printed text, keeping numbering, symbols and formulas; write [verify: short reason] instead of guessing.\n[Diagram] one line per figure, ≤25 words, only visible key elements, e.g. Fig.1 triangle ABC, P inside, BM and CN meet at P.\n[Checks] at most 3 items, ≤15 words each; write "none" if none.',
|
|
17
17
|
analysis: 'The user checked the following against the photos; use it as given. Do not re-question it or add unconfirmed relations.\n\nChecked question:\n{text}\n\nReasoning only: 1 line of key concepts, then 3-5 steps. ≤200 words.',
|
|
18
18
|
solution: 'The user checked the following against the photos; use it as given. Do not re-question it or add unconfirmed relations.\n\nChecked question:\n{text}\n\nFull solution: step-by-step work and final answer, concise formulas. ≤400 words.',
|
|
19
19
|
summary: 'The user checked the following against the photos; use it as given. Do not re-question it or add unconfirmed relations.\n\nChecked question:\n{text}\n\nKey points only: 3-5 lines of concepts and common mistakes. ≤150 words.',
|
|
@@ -80,7 +80,7 @@ export const inject = ['tools'];
|
|
|
80
80
|
export function apply(ctx) {
|
|
81
81
|
ctx.effect(() => ctx.tools.register({
|
|
82
82
|
name: 'question_workbench_prompt',
|
|
83
|
-
description: '题目工作台提示词:recognition
|
|
83
|
+
description: '题目工作台提示词:recognition 生成两段式识图提示;analysis/solution/summary/full 基于已核对题目生成思路/解题/总结/全流程提示,再由模型按该提示作答。',
|
|
84
84
|
parameters: {
|
|
85
85
|
type: 'object',
|
|
86
86
|
additionalProperties: false,
|
|
@@ -103,18 +103,18 @@ export function apply(ctx) {
|
|
|
103
103
|
|
|
104
104
|
ctx.effect(() => ctx.tools.register({
|
|
105
105
|
name: 'question_workbench_worksheet',
|
|
106
|
-
description: '把题目与解答生成 A4 讲义 HTML 并写入文件,返回绝对路径;可用浏览器打开后 Ctrl+P
|
|
106
|
+
description: '把题目与解答生成 A4 讲义 HTML 并写入文件,返回绝对路径;可用浏览器打开后 Ctrl+P 预览分页并打印。(兼容旧输出:自动剥离去【待确认】段)',
|
|
107
107
|
parameters: {
|
|
108
108
|
type: 'object',
|
|
109
109
|
additionalProperties: false,
|
|
110
110
|
properties: {
|
|
111
|
-
text: { type: 'string', description: '
|
|
111
|
+
text: { type: 'string', description: '题目文字(可含已核对的两段式识别结果)。' },
|
|
112
112
|
notes: { type: 'string', description: '可选:思路、解答或总结,打印在题目之后。' },
|
|
113
113
|
title: { type: 'string', description: '讲义标题,默认“题目讲义”。' },
|
|
114
114
|
grade: { type: 'string', description: '可选:学科/年级行。' },
|
|
115
115
|
images: { type: 'array', items: { type: 'string' }, description: '可选:本地图片绝对路径(png/jpg/jpeg/webp/gif),嵌入讲义。' },
|
|
116
116
|
outputPath: { type: 'string', description: '输出 .html 路径,默认为当前工作目录。' },
|
|
117
|
-
skipChecks: { type: 'boolean', description: '
|
|
117
|
+
skipChecks: { type: 'boolean', description: '兼容旧输出:删除残留的【待确认】段,默认 true。' },
|
|
118
118
|
language: { type: 'string', enum: ['zh', 'en'], description: '讲义语言,默认 zh。' }
|
|
119
119
|
},
|
|
120
120
|
required: ['text']
|
package/package.json
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "question-workbench-mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Question workbench: photos in, checked text, reasoning or solutions, A4 worksheet out. One package, two installs: a DeepSeek Harness bundle (UI + agent tools) and an MCP stdio server for Codex, WorkBuddy and other MCP clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"keywords": [
|
|
8
|
-
|
|
7
|
+
"keywords": [
|
|
8
|
+
"dsh",
|
|
9
|
+
"dsh-plugin",
|
|
10
|
+
"deepseek-harness",
|
|
11
|
+
"mcp",
|
|
12
|
+
"worksheet",
|
|
13
|
+
"print",
|
|
14
|
+
"education"
|
|
15
|
+
],
|
|
16
|
+
"bin": {
|
|
17
|
+
"question-workbench-mcp": "./server.js"
|
|
18
|
+
},
|
|
9
19
|
"exports": {
|
|
10
20
|
".": "./index.js",
|
|
11
21
|
"./client": "./client.js",
|
|
@@ -26,9 +36,19 @@
|
|
|
26
36
|
"mcp-config.example.json",
|
|
27
37
|
"workbuddy-mcp.example.json"
|
|
28
38
|
],
|
|
29
|
-
"engines": {
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=18"
|
|
41
|
+
},
|
|
30
42
|
"dsh": {
|
|
31
|
-
"bundle": {
|
|
32
|
-
|
|
43
|
+
"bundle": {
|
|
44
|
+
"patch": "./cordis.patch.yml"
|
|
45
|
+
},
|
|
46
|
+
"client": {
|
|
47
|
+
"platform": "web",
|
|
48
|
+
"immediately": true,
|
|
49
|
+
"inject": [
|
|
50
|
+
"@deepseek-ai/dsh-client-ui-conversation"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
33
53
|
}
|
|
34
|
-
}
|
|
54
|
+
}
|
package/server.js
CHANGED
|
@@ -13,7 +13,7 @@ const PROTOCOLS = ['2024-11-05', '2025-03-26', '2025-06-18'];
|
|
|
13
13
|
|
|
14
14
|
const PROMPTS = {
|
|
15
15
|
zh: {
|
|
16
|
-
recognition: '
|
|
16
|
+
recognition: '只做识别,严格输出两段,不要解释或额外分节:\n【题目】逐字转录印刷文字,保留题号、选项、符号和公式;看不清写[待核实:简短原因],不要猜。\n【图形】每张图一行,≤25字,只写可见关键元素,例如:图1 三角形ABC,P在内部,BM、CN交于P。\n【待确认】最多3条、每条≤15字;没有写“无”。',
|
|
17
17
|
analysis: '以下内容已由用户对照原图人工核对,直接作为已知条件使用;不要重新质疑,也不要补充未确认的关系。\n\n已核对题目:\n{text}\n\n只给思路,不要完整计算:①考点1行 ②关键思路3-5步。≤200字。',
|
|
18
18
|
solution: '以下内容已由用户对照原图人工核对,直接作为已知条件使用;不要重新质疑,也不要补充未确认的关系。\n\n已核对题目:\n{text}\n\n给完整解题过程:分步推导+最终答案,公式简洁。≤400字。',
|
|
19
19
|
summary: '以下内容已由用户对照原图人工核对,直接作为已知条件使用;不要重新质疑,也不要补充未确认的关系。\n\n已核对题目:\n{text}\n\n只总结:3-5条知识点与易错点,每条一行。≤150字。',
|
|
@@ -23,7 +23,7 @@ const PROMPTS = {
|
|
|
23
23
|
labelSolution: '解答'
|
|
24
24
|
},
|
|
25
25
|
en: {
|
|
26
|
-
recognition: 'Transcribe only. Output exactly
|
|
26
|
+
recognition: 'Transcribe only. Output exactly two sections, no extra explanation:\n[Question] literal printed text, keeping numbering, symbols and formulas; write [verify: short reason] instead of guessing.\n[Diagram] one line per figure, ≤25 words, only visible key elements, e.g. Fig.1 triangle ABC, P inside, BM and CN meet at P.\n[Checks] at most 3 items, ≤15 words each; write "none" if none.',
|
|
27
27
|
analysis: 'The user checked the following against the photos; use it as given. Do not re-question it or add unconfirmed relations.\n\nChecked question:\n{text}\n\nReasoning only: 1 line of key concepts, then 3-5 steps. ≤200 words.',
|
|
28
28
|
solution: 'The user checked the following against the photos; use it as given. Do not re-question it or add unconfirmed relations.\n\nChecked question:\n{text}\n\nFull solution: step-by-step work and final answer, concise formulas. ≤400 words.',
|
|
29
29
|
summary: 'The user checked the following against the photos; use it as given. Do not re-question it or add unconfirmed relations.\n\nChecked question:\n{text}\n\nKey points only: 3-5 lines of concepts and common mistakes. ≤150 words.',
|
|
@@ -52,7 +52,7 @@ const TOOLS = [
|
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
name: 'build_worksheet',
|
|
55
|
-
description: 'Write an A4 worksheet HTML file and return its absolute path. By default it embeds the most recent images the user pasted into WorkBuddy (no path needed) and
|
|
55
|
+
description: 'Write an A4 worksheet HTML file and return its absolute path. By default it embeds the most recent images the user pasted into WorkBuddy (no path needed) and strips any leftover 【待确认】 section.',
|
|
56
56
|
inputSchema: {
|
|
57
57
|
type: 'object',
|
|
58
58
|
properties: {
|
|
@@ -65,7 +65,7 @@ const TOOLS = [
|
|
|
65
65
|
maxAgeMinutes: { type: 'number', description: 'How recent a pasted image must be, in minutes; 0 disables the age filter. Defaults to 30.' },
|
|
66
66
|
imageLimit: { type: 'number', description: 'Maximum clipboard images to embed. Defaults to 3.' },
|
|
67
67
|
clipboardDir: { type: 'string', description: 'Advanced: pasted-image folder; defaults to <home>/.workbuddy/clipboard-images or QUESTION_WORKBENCH_CLIPBOARD_DIR.' },
|
|
68
|
-
skipChecks: { type: 'boolean', description: '
|
|
68
|
+
skipChecks: { type: 'boolean', description: 'Strip a leftover 【待确认】/【待核实】 section (legacy output). Defaults to true.' },
|
|
69
69
|
outputPath: { type: 'string', description: 'Destination .html path; defaults to the current working directory.' },
|
|
70
70
|
language: { type: 'string', enum: ['zh', 'en'], description: 'Worksheet language; defaults to zh.' }
|
|
71
71
|
},
|