dsh-thesis 1.0.0 → 1.0.1
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/DESIGN.md +27 -1
- package/LICENSE +21 -21
- package/README.md +64 -185
- package/docs/host-api.md +692 -640
- package/lib/codewalk/host-types.d.ts +4 -2
- package/lib/gates/messages.d.ts +7 -3
- package/lib/gates/messages.js +7 -4
- package/lib/intake/gate-rules.d.ts +6 -5
- package/lib/intake/gate-rules.js +6 -2
- package/lib/paper/lib/docx.js +70 -70
- package/lib/paper/lib/layout.js +371 -371
- package/lib/paper/lib/lit-cache.js +7 -7
- package/lib/paper/tools/decision.js +5 -5
- package/lib/paper/tools/lit.js +32 -32
- package/package.json +10 -5
|
@@ -57,13 +57,13 @@ export function mergeRecords(cache, records) {
|
|
|
57
57
|
next[record.id] = record;
|
|
58
58
|
return { version: 1, records: next };
|
|
59
59
|
}
|
|
60
|
-
const RECORD_HEADER = `# 文献检索记录
|
|
61
|
-
|
|
62
|
-
> 每次检索留痕:哪个库、什么关键词、命中多少、收录哪些。
|
|
63
|
-
> 这是"零假文献"的审计证据。
|
|
64
|
-
|
|
65
|
-
| 日期 | 动作 | 数据库 | 关键词/文献 | 命中 | 备注 |
|
|
66
|
-
|---|---|---|---|---|---|
|
|
60
|
+
const RECORD_HEADER = `# 文献检索记录
|
|
61
|
+
|
|
62
|
+
> 每次检索留痕:哪个库、什么关键词、命中多少、收录哪些。
|
|
63
|
+
> 这是"零假文献"的审计证据。
|
|
64
|
+
|
|
65
|
+
| 日期 | 动作 | 数据库 | 关键词/文献 | 命中 | 备注 |
|
|
66
|
+
|---|---|---|---|---|---|
|
|
67
67
|
`;
|
|
68
68
|
export async function appendLitRecord(fs, root, row, signal) {
|
|
69
69
|
const path = nodePath.join(root, LIT_RECORD_REL);
|
|
@@ -7,11 +7,11 @@ import * as nodePath from 'node:path';
|
|
|
7
7
|
import { describeReadFailure, isMissingError } from "../../shared/fs-errors.js";
|
|
8
8
|
import { appendDecision, countDecisions } from "../lib/ledger.js";
|
|
9
9
|
import { DECISION_REL, findThesisRoot } from "../lib/project.js";
|
|
10
|
-
const DECISION_HEADER = `# 决定日志
|
|
11
|
-
|
|
12
|
-
> 每个关键决定的留痕:内容、理由、备选。答辩时它是"我为什么这么写"的证据。
|
|
13
|
-
> 由 thesis_decide 工具或 /thesis-decide 命令追加。
|
|
14
|
-
|
|
10
|
+
const DECISION_HEADER = `# 决定日志
|
|
11
|
+
|
|
12
|
+
> 每个关键决定的留痕:内容、理由、备选。答辩时它是"我为什么这么写"的证据。
|
|
13
|
+
> 由 thesis_decide 工具或 /thesis-decide 命令追加。
|
|
14
|
+
|
|
15
15
|
`;
|
|
16
16
|
function deriveTitle(content) {
|
|
17
17
|
const firstLine = content.split('\n')[0].trim();
|
package/lib/paper/tools/lit.js
CHANGED
|
@@ -12,10 +12,10 @@ import { searchLiterature, LIT_SOURCES, } from "../lib/lit-api.js";
|
|
|
12
12
|
import { appendLitRecord, loadCache, mergeRecords, NOTES_DIR_REL, REFS_BIB_REL, saveCache, saveRow, searchRow, } from "../lib/lit-cache.js";
|
|
13
13
|
import { bibKeyFor, buildBibtex, dedupeKey, parseBibDois, parseBibKeys } from "../lib/bibtex.js";
|
|
14
14
|
import { findThesisRoot } from "../lib/project.js";
|
|
15
|
-
const BIB_HEADER = `% 文献库(BibTeX)。
|
|
16
|
-
% 红线:本文件只收录真实检索到的文献(由 thesis_lit_search/save 写入)。
|
|
17
|
-
% 每条必须含 DOI 或 URL。引用格式遵循 GB/T 7714-2015(顺序编码制)。
|
|
18
|
-
|
|
15
|
+
const BIB_HEADER = `% 文献库(BibTeX)。
|
|
16
|
+
% 红线:本文件只收录真实检索到的文献(由 thesis_lit_search/save 写入)。
|
|
17
|
+
% 每条必须含 DOI 或 URL。引用格式遵循 GB/T 7714-2015(顺序编码制)。
|
|
18
|
+
|
|
19
19
|
`;
|
|
20
20
|
async function thesisRoot(fs, cwd, signal) {
|
|
21
21
|
const root = await findThesisRoot(fs, cwd, signal);
|
|
@@ -129,34 +129,34 @@ function noteTemplate(record, bibKey) {
|
|
|
129
129
|
meta.push(`URL:${record.url}`);
|
|
130
130
|
if (record.citationCount !== undefined)
|
|
131
131
|
meta.push(`被引 ${record.citationCount} 次`);
|
|
132
|
-
return `# ${record.title}(${authorText},${record.year ?? '年份未知'},${record.venue || '出处未知'})
|
|
133
|
-
|
|
134
|
-
> ${meta.join(';')}
|
|
135
|
-
> 笔记模板见技能 thesis-literature;写论文时从这里取"可用引用句"。
|
|
136
|
-
|
|
137
|
-
## 这篇解决什么问题
|
|
138
|
-
|
|
139
|
-
(待补)
|
|
140
|
-
|
|
141
|
-
## 方法/技术要点(3-5 条,用自己的话)
|
|
142
|
-
|
|
143
|
-
(待补)
|
|
144
|
-
|
|
145
|
-
## 实验与结论(数据集/指标/结果)
|
|
146
|
-
|
|
147
|
-
(待补)
|
|
148
|
-
|
|
149
|
-
## 与我课题的关系
|
|
150
|
-
|
|
151
|
-
(待补:借鉴什么 / 对比什么 / 差异在哪)
|
|
152
|
-
|
|
153
|
-
## 可用引用句
|
|
154
|
-
|
|
155
|
-
(待补:1-2 句,注明放哪一章)
|
|
156
|
-
|
|
157
|
-
## 摘要(原始)
|
|
158
|
-
|
|
159
|
-
${record.abstract ?? '(检索记录无摘要;请从原文自行摘录)'}
|
|
132
|
+
return `# ${record.title}(${authorText},${record.year ?? '年份未知'},${record.venue || '出处未知'})
|
|
133
|
+
|
|
134
|
+
> ${meta.join(';')}
|
|
135
|
+
> 笔记模板见技能 thesis-literature;写论文时从这里取"可用引用句"。
|
|
136
|
+
|
|
137
|
+
## 这篇解决什么问题
|
|
138
|
+
|
|
139
|
+
(待补)
|
|
140
|
+
|
|
141
|
+
## 方法/技术要点(3-5 条,用自己的话)
|
|
142
|
+
|
|
143
|
+
(待补)
|
|
144
|
+
|
|
145
|
+
## 实验与结论(数据集/指标/结果)
|
|
146
|
+
|
|
147
|
+
(待补)
|
|
148
|
+
|
|
149
|
+
## 与我课题的关系
|
|
150
|
+
|
|
151
|
+
(待补:借鉴什么 / 对比什么 / 差异在哪)
|
|
152
|
+
|
|
153
|
+
## 可用引用句
|
|
154
|
+
|
|
155
|
+
(待补:1-2 句,注明放哪一章)
|
|
156
|
+
|
|
157
|
+
## 摘要(原始)
|
|
158
|
+
|
|
159
|
+
${record.abstract ?? '(检索记录无摘要;请从原文自行摘录)'}
|
|
160
160
|
`;
|
|
161
161
|
}
|
|
162
162
|
/** 从 refs.bib 中按 key 提取最小记录(供 note 在缓存缺失时使用)。 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-thesis",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "论文与答辩全流程助手(DeepSeek Harness 插件):材料摄取 → 逐题追问 → 文献检索 → 逐章写作与评审 → 原创性自查与合规 → Word/答辩幻灯生产,全流程留痕,并跨会话记住学校规范与导师要求。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -64,16 +64,21 @@
|
|
|
64
64
|
"prepublishOnly": "node scripts/prepublish-guard.mjs"
|
|
65
65
|
},
|
|
66
66
|
"engines": {
|
|
67
|
-
"node": ">=22.16"
|
|
67
|
+
"node": ">=22.16",
|
|
68
|
+
"dsh": ">=0.2.0-rc.2 <0.3.0-0"
|
|
68
69
|
},
|
|
69
70
|
"peerDependencies": {
|
|
70
71
|
"@deepseek-ai/schemastery": "^3.18.2",
|
|
71
72
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
72
|
-
"@deepseek-ai/dsh-tools": "
|
|
73
|
+
"@deepseek-ai/dsh-tools": ">=0.2.0-rc.2 <0.3.0-0"
|
|
73
74
|
},
|
|
74
75
|
"peerDependenciesMeta": {
|
|
75
|
-
"@deepseek-ai/cordis": {
|
|
76
|
-
|
|
76
|
+
"@deepseek-ai/cordis": {
|
|
77
|
+
"optional": true
|
|
78
|
+
},
|
|
79
|
+
"@deepseek-ai/dsh-tools": {
|
|
80
|
+
"optional": true
|
|
81
|
+
}
|
|
77
82
|
},
|
|
78
83
|
"devDependencies": {
|
|
79
84
|
"@deepseek-ai/schemastery": "^3.18.2",
|