@sanqianx/project-knowledge 5.0.15-rc.2 → 5.0.15-rc.4
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/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +12 -0
- package/_modules/knowledge-engine/README.md +1 -0
- package/_modules/knowledge-engine/package.json +1 -1
- package/_modules/knowledge-engine/src/retrieval.js +4 -1
- package/_modules/knowledge-engine/src/runtime/knowledge-promotion.js +10 -1
- package/module-runtime-manifest.json +3 -3
- package/package.json +1 -1
- package/plugins/project-knowledge/.claude-plugin/plugin.json +1 -1
- package/plugins/project-knowledge/.codex-plugin/plugin.json +1 -1
- package/plugins/project-knowledge/.mcp.json +1 -1
- package/vendor-manifest.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.0.15-rc.4] - 2026-10-13
|
|
4
|
+
|
|
5
|
+
- 修复知识晋升校验把 UI 的 `placeholder=` 属性及有正文解释的源码示例误判为未完成内容的问题;真实未完成标记、空正文、越界及哈希校验继续拦截。
|
|
6
|
+
- 保留失败记录及项目 FIFO,不升级后自动重做失败提交;用户可通过运行详情显式重试。
|
|
7
|
+
- 保留 rc.3 的检索与离线接线修复;重新进行 npm 安装版验收,暂不提升 latest。
|
|
8
|
+
|
|
9
|
+
## [5.0.15-rc.3] - 2026-10-13
|
|
10
|
+
|
|
11
|
+
- 当前项目没有维护历史但已有其他知识时,最近进度检索明确显示“本次无可靠匹配”,不误报整个项目知识为空。
|
|
12
|
+
- 增加用户原句“我想知道我当前向量库存储的位置在哪”的回归与现有知识文件只读验收;存储规则引用与当前设备实际路径分别核验。
|
|
13
|
+
- 保留 rc.2 的片段校验、中文排序、跨项目范围隔离和离线插件接入;候选版不更新 latest。
|
|
14
|
+
|
|
3
15
|
## [5.0.15-rc.2] - 2026-10-13
|
|
4
16
|
|
|
5
17
|
- Windows 路径边界校验改用原生规范化,保留中文/空格、缺失末级目录和目录联接越界检查。
|
|
@@ -90,6 +90,7 @@ node src/bin.js serve [--port 5790] [--host 127.0.0.1] [--data DIR]
|
|
|
90
90
|
- 无头分析在隔离进程中运行,只读冻结证据,只写本次 staging。产物必须通过路径、内容 hash 和依据校验,只有晋升路径写最终项目知识。
|
|
91
91
|
- 归档对话和检索内容只作证据,不能覆盖后台维护指令。SDK 返回成功文字但未生成 manifest 时,记录 `ANALYSIS_OUTPUT_MISSING` 并保留证据供重试,不误报晋升完成。
|
|
92
92
|
- 空知识库是正常首用状态。输出合同明确 UTF-8、一级标题和非空正文;仅缺标题的非空文档在 staging 中确定性补齐并重新封印哈希,空正文、非法路径、占位内容或不匹配哈希仍拒绝晋升。
|
|
93
|
+
- 占位检测区分未完成正文与源码示例:HTML 的 `placeholder=` 属性、行内代码和有正文解释的围栏代码不被误判为未完成知识;只有标题或仅用代码包裹未完成标记的文档仍拒绝。校验不改写有效原文。
|
|
93
94
|
- 具体失败原因、失败步骤和提交依据进入运行详情及 `log/v2` 诊断。受外壳守护时通过 IPC 交给外壳现有日志系统;独立运行保存在 `<data>/logs/`,不写模型凭据和原始证据。升级不会重新运行已失败提交,用户可显式重试失败阶段。
|
|
94
95
|
- 数据目录有单实例租约,目标知识目录有写入锁。关闭或超时等待子进程实际退出,再释放写入锁。
|
|
95
96
|
- 晋升与索引分别记录。索引失败保留已晋升知识并显示待修复,不重新调用模型。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanqianx/ai-coding-knowledge-engine",
|
|
3
|
-
"version": "0.2.7-rc.
|
|
3
|
+
"version": "0.2.7-rc.4",
|
|
4
4
|
"description": "Knowledge engine module for project-knowledge: commit-boundary triggered knowledge analysis/generation (trigger plane) and retrieval for development assistants (retrieval plane).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "src/server.js",
|
|
@@ -181,7 +181,10 @@ class EngineRetrieval extends KnowledgeRetrievalService {
|
|
|
181
181
|
const knownCommits = this.signalSet({ primaryTexts: [String(input.query || '')] }).commitPrefixes;
|
|
182
182
|
if (selectedIntent === 'recent' && !knownCommits?.length) {
|
|
183
183
|
const history = await this.history(input);
|
|
184
|
-
|
|
184
|
+
const hasKnowledge = listMarkdownFiles(registration.knowledgePath).length > 0;
|
|
185
|
+
const currentProjectStatus = { hasKnowledge, matchedCount: history.results.length, note: history.results.length ? '已匹配当前项目的维护变更。' : hasKnowledge ? '本次没有匹配到当前项目的维护变更;已有知识仍然保留,不代表知识为空。' : '当前项目尚无可读取的已维护知识。' };
|
|
186
|
+
return { ...history, query: input.query, intent: 'recent', rankingVersion: ranking.VERSION, currentProjectStatus,
|
|
187
|
+
matchStatus: history.results.length ? 'matched' : hasKnowledge ? 'no-reliable-match' : 'knowledge-empty',
|
|
185
188
|
health: { index: 'not-requested' }, results: history.results.slice(0, Math.max(1, Math.min(30, Number(input.limit) || 8))).map((r, i) => ({ ...r,
|
|
186
189
|
record_id: `project:${registration.projectId}:${r.entry_id}:history`, space_id: `project:${registration.projectId}`, chunk_id: `${r.entry_id}:history`,
|
|
187
190
|
scope_project_id: registration.projectId, scope_reason: 'primary', projectId: registration.projectId, projectName: registration.name, path: r.entry_id,
|
|
@@ -50,7 +50,16 @@ function validateMarkdown(content, relativePath) {
|
|
|
50
50
|
throw new DomainError('INVALID_ARGUMENT', `Staged Markdown contains disallowed control characters: ${relativePath}.`);
|
|
51
51
|
}
|
|
52
52
|
if (!content.trim() || !/^#\s+\S+/m.test(content)) throw new DomainError('INVALID_ARGUMENT', `Staged Markdown must contain a title: ${relativePath}.`);
|
|
53
|
-
|
|
53
|
+
// UI attributes and quoted source examples describe real changes; they are
|
|
54
|
+
// not unfinished prose. Still reject a document containing only a quoted
|
|
55
|
+
// unfinished marker, so fencing a placeholder cannot make it valid knowledge.
|
|
56
|
+
const marker = /(?:\[TODO:|\bTODO:\s|\bTBD\b|\bPLACEHOLDER\b(?!\s*=))/i;
|
|
57
|
+
const prose = content.replace(/^---\r?\n[\s\S]*?\r?\n---(?:\r?\n|$)/, '')
|
|
58
|
+
.replace(/^[ \t]*(`{3,}|~{3,})[^\n]*\n[\s\S]*?^[ \t]*\1[ \t]*(?:\n|$)/gm, '')
|
|
59
|
+
.replace(/(`+)[^\n]*?\1/g, '');
|
|
60
|
+
if (marker.test(prose) || !prose.replace(/^#{1,6}[ \t]+.*$/gm, '').trim() && marker.test(content)) {
|
|
61
|
+
throw new DomainError('INVALID_ARGUMENT', `Placeholder knowledge is not allowed: ${relativePath}.`);
|
|
62
|
+
}
|
|
54
63
|
const fences = content.match(/^```/gm) || [];
|
|
55
64
|
if (fences.length % 2 !== 0) throw new DomainError('INVALID_ARGUMENT', `Markdown code fences are unbalanced: ${relativePath}.`);
|
|
56
65
|
if (content.startsWith('---\n') && !/^---\n[\s\S]*?\n---\n/.test(content)) {
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"plugins/project-knowledge/hooks/claude.json": "d61510327e3e1facbb4c645228e9f50cad05a88b33d80c4c22e5ba9f8b9f5359",
|
|
9
9
|
"plugins/project-knowledge/hooks/codex.json": "216e03c07295606ef6ebb2c4f669ad0d790b5e7c4f3f34600488033db75e4239",
|
|
10
10
|
"plugins/project-knowledge/scripts/context-hook.cjs": "da666153ad5723592cce42d25337ae649f7d93e43fab76b3c6d1263933de063f",
|
|
11
|
-
"plugins/project-knowledge/.claude-plugin/plugin.json": "
|
|
12
|
-
"plugins/project-knowledge/.codex-plugin/plugin.json": "
|
|
13
|
-
"plugins/project-knowledge/.mcp.json": "
|
|
11
|
+
"plugins/project-knowledge/.claude-plugin/plugin.json": "273d9e5d3f90ab5fd7716e83af672d8e6f7b2a596a74f1bdd52a25c040295518",
|
|
12
|
+
"plugins/project-knowledge/.codex-plugin/plugin.json": "7a3cd85679b339e524a72ddbacba0b19121311a5aeebf630d2b7470ee2adeeee",
|
|
13
|
+
"plugins/project-knowledge/.mcp.json": "5db42cda48e15903e04d1b8b04ea3e162ca620bf848322a4dd73666080f9e397"
|
|
14
14
|
},
|
|
15
15
|
"modules": {
|
|
16
16
|
"terminal": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanqianx/project-knowledge",
|
|
3
|
-
"version": "5.0.15-rc.
|
|
3
|
+
"version": "5.0.15-rc.4",
|
|
4
4
|
"description": "Knowledge base manager with Git integration, AI-driven analysis, and bilingual (zh-CN/en-US) knowledge output",
|
|
5
5
|
"main": "_site/server.js",
|
|
6
6
|
"scripts": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
|
|
3
3
|
"name": "project-knowledge",
|
|
4
4
|
"hooks": "./hooks/claude.json",
|
|
5
|
-
"version": "5.0.15-rc.
|
|
5
|
+
"version": "5.0.15-rc.4",
|
|
6
6
|
"description": "Read durable project decisions and implementation history from Project Knowledge.",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "SanQianX",
|
package/vendor-manifest.json
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
"modules": {
|
|
4
4
|
"knowledge-engine": {
|
|
5
5
|
"name": "@sanqianx/ai-coding-knowledge-engine",
|
|
6
|
-
"version": "0.2.7-rc.
|
|
6
|
+
"version": "0.2.7-rc.4",
|
|
7
7
|
"root": "_modules/knowledge-engine",
|
|
8
8
|
"files": {
|
|
9
|
-
"README.md": "
|
|
10
|
-
"package.json": "
|
|
9
|
+
"README.md": "e55d09671139a97825bb59b1ce2e594cf82a51d392205442bc4f09c4cf42708c",
|
|
10
|
+
"package.json": "1faf25907fd3382dddc68c1a3e92e767c268e5e55715ba6579a33507583759c1",
|
|
11
11
|
"src/analysis-contract.js": "913a63b63fb4a4a9df071f95bbeb8f8c40ef87e2f8445ab0742086ced70ffbf7",
|
|
12
12
|
"src/analysis-output.js": "95a3c19dcc9ab85d1dba7fee5b9aec80f9c000dfba89da3fd0be25a81e2fb680",
|
|
13
13
|
"src/analysis-worker.js": "a105cabe6e1573b2d986b1e7a5aaf615e2fb53524156fc8e4e2c0a71f2c97e55",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"src/memories.js": "bba8e19380e906a80fd3e5d2a7f809d940466924578c8187d1f376f906f10f2b",
|
|
23
23
|
"src/retrieval-policy.json": "3205fb4eb114a839a74f902e6fae6a61e1460958e5a9d7e29add32b60ba4e05a",
|
|
24
24
|
"src/retrieval-ranking.js": "422c068ea995d4f8c7e1ffb64b4b72921017862add74da8996b1827c6c64c23d",
|
|
25
|
-
"src/retrieval.js": "
|
|
25
|
+
"src/retrieval.js": "57480d4eedf10314d3cfa543b6e6f7b57ad69e29a1a2983fdf9ccec74e276d2e",
|
|
26
26
|
"src/runtime/README.md": "9be676eca76a7857b34d7357194e6f0ee733c22e61d962d53984715dbec7f673",
|
|
27
27
|
"src/runtime/atomic-file.js": "9846b4b69db5ded811acf19a1181ef93615d93efaa542b858e552a7f3124ad23",
|
|
28
28
|
"src/runtime/automation-config.js": "6498c5397be12b155829740595a1553d4dcd6eaa7db6ced3ef88fdc60218f00e",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"src/runtime/conversation-store.js": "644318f9c04376a3317ced240dd94afa99a79631f0ecc394c5aa298ae2bc0474",
|
|
37
37
|
"src/runtime/evidence-bundle.js": "33d4614849d5e1d69aba8b75c3a43c18b7b6f94e5c78654c82ef631331cc94cc",
|
|
38
38
|
"src/runtime/git-runner.js": "b74fe197bd4dcf3e70635ef7b1f2615edf965c1d9a3ffe5406aabd41b76d74a9",
|
|
39
|
-
"src/runtime/knowledge-promotion.js": "
|
|
39
|
+
"src/runtime/knowledge-promotion.js": "3bf9de68e8604adeb197fe8437012c3688fb3ddac884d4321ec132218df10935",
|
|
40
40
|
"src/runtime/knowledge-retrieval-service.js": "75444f495a9ad0720af0e57b8d27d7ac1325c78a768f4f68ebd86ebc2524945e",
|
|
41
41
|
"src/runtime/layout.js": "e47fe54c605218493ce46f6289798d9db2a3ecec95089d288ed03d3b75cf871a",
|
|
42
42
|
"src/runtime/markdown-knowledge-indexer.js": "4d6b5b955849d274ca0614ef030c94526da7c39ab0874f02c168d0681f5b1406",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"ui/app.js": "33a2ba38f0dafbbb2e30a1eb3fc93476bfcaf528e124e1a9b2edd2fb69221e9e",
|
|
48
48
|
"ui/index.html": "ce3565cfefd4838b11d37a91a906ef26ca5a1834844fe3f7c897b56851a3c418"
|
|
49
49
|
},
|
|
50
|
-
"sourceCommit": "
|
|
50
|
+
"sourceCommit": "5c07a801aae1e0a79698763cbe161575bcda0578"
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
}
|