@sanqianx/project-knowledge 5.0.9-rc.5 → 5.0.9-rc.7

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.
@@ -9,7 +9,7 @@
9
9
  "plugins": [
10
10
  {
11
11
  "name": "project-knowledge",
12
- "version": "5.0.9-rc.5",
12
+ "version": "5.0.9-rc.7",
13
13
  "source": "./plugins/project-knowledge",
14
14
  "description": "Search durable project decisions and implementation history through MCP."
15
15
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.0.9-rc.7] - 2026-10-11
4
+
5
+ - Vendor engine 0.2.3-rc.3: recognize promoted commit identifiers inside
6
+ natural-language tasks, including short and multiple SHAs. Raw conversation
7
+ mentions cannot replace the current promoted knowledge references.
8
+ - Preserve failed installed Workbench/context checks from rc.6; latest remains
9
+ unchanged until fresh registry runtime and existing-v5 acceptance pass.
10
+
11
+ ## [5.0.9-rc.6] - 2026-10-11
12
+
13
+ - Vendor engine 0.2.3-rc.2. Unassigned projects no longer share an implicit
14
+ domain in retrieval or Workbench task context. Explicit domains and whole
15
+ brain queries retain their inclusive scopes.
16
+ - Keep the failed rc.5 real Workbench acceptance as a separate record. This
17
+ candidate must pass fresh downloaded-runtime checks before promotion.
18
+
3
19
  ## [5.0.9-rc.5] - 2026-10-11
4
20
 
5
21
  - Pin Workbench 0.13.2-rc.3: retain OpenCode final answers across tool rounds,
@@ -76,7 +76,8 @@ node src/bin.js serve [--port 5790] [--host 127.0.0.1] [--data DIR]
76
76
  - 数据目录有单实例租约,目标知识目录有写入锁。关闭或超时等待子进程实际退出,再释放写入锁。
77
77
  - 晋升与索引分别记录。索引失败保留已晋升知识并显示待修复,不重新调用模型。
78
78
  - 索引错误保留兼容的 `INDEX_FAILED` 及可选 `error.details`(类别、HTTP 状态、上游代码/脱敏原因、请求标识、耗时和尝试次数);项目和共享索引均写入 `log/v2`。响应仅解析有界 JSON,不记录原始 body 或认证头。只重试索引保留原分析运行、晋升时间和知识字节。
79
- - 项目、领域、智脑检索使用包含范围。向量只提供排序,显示内容必须来自当前真实文件;索引不可用时降级为文件检索。
79
+ - 项目、领域、智脑检索使用包含范围。未分配领域不是共享领域:领域范围只包含当前项目与智脑共享知识;显式加入同一领域后才包含其他项目。整个智脑范围仍包含全部同智脑项目。向量只提供排序,显示内容必须来自当前真实文件;索引不可用时降级为文件检索。
80
+ - 已晋升提交的 SHA 或短 SHA 在自然语言查询中仍作为标识符匹配,只返回当前文件的晋升依据;仅在原始会话中提到相同 SHA 不构成知识晋升引用。多个提交标识符可以一起查询。
80
81
  - 候选必须有已晋升文件中的引用依据,未确认候选不能进入任务。确认记录原子持久化后写共享记忆文件,派生索引异步更新,索引失败不会撤销有效记忆。
81
82
  - 旧格式不读取、不自动迁移。损坏的正式状态不覆盖、不清空。
82
83
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanqianx/ai-coding-knowledge-engine",
3
- "version": "0.2.3-rc.1",
3
+ "version": "0.2.3-rc.3",
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",
@@ -10,15 +10,17 @@ class EngineRetrieval extends KnowledgeRetrievalService {
10
10
  signalSet(input = {}) {
11
11
  const signals = super.signalSet(input);
12
12
  const query = signals.indexQuery.trim().toLowerCase();
13
- if (/^[a-f0-9]{7,64}$/.test(query) && this.store.listRuns().some(run => run.promotedAt && run.commitSha?.startsWith(query))) signals.commitPrefix = query;
13
+ const promoted = this.store.listRuns().filter(run => run.promotedAt && run.commitSha);
14
+ const identifiers = [...query.matchAll(/(?:^|[^a-z0-9])([a-f0-9]{7,64})(?=$|[^a-z0-9])/g)].map(match => match[1]);
15
+ signals.commitPrefixes = [...new Set(identifiers.filter(id => promoted.some(run => run.commitSha.startsWith(id))))];
14
16
  return signals;
15
17
  }
16
18
  score(candidate, signals) {
17
- if (signals.commitPrefix) {
19
+ if (signals.commitPrefixes?.length) {
18
20
  // A known commit is an identifier, not a semantic topic. Unrelated
19
21
  // vector hits must not crowd its current, provenance-checked files out.
20
22
  const source = this.store.listRuns(candidate.projectId).find(run => run.promotedAt && run.staging?.operations?.some(operation => operation.path === candidate.entryId));
21
- if (!source?.commitSha?.startsWith(signals.commitPrefix)) return { score: 0, selectionSignals: [] };
23
+ if (!signals.commitPrefixes.some(prefix => source?.commitSha?.startsWith(prefix))) return { score: 0, selectionSignals: [] };
22
24
  const result = super.score(candidate, signals);
23
25
  return { score: Math.max(1, result.score), selectionSignals: [...result.selectionSignals, 'exact-commit'] };
24
26
  }
@@ -40,7 +42,7 @@ class EngineRetrieval extends KnowledgeRetrievalService {
40
42
  return [...super.scopes(project), ...this.sharedScopes(registration, 'domain')];
41
43
  }
42
44
  sharedScopes(registration, range) {
43
- return this.store.state.sharedScopes.filter(s => s.brainId === registration.brainId && (s.kind === 'brain' || range === 'brain' || s.domainId === registration.domainId)).map(s => ({ projectId: s.id, spaceId: `${s.kind}:${s.id}`, knowledgePath: s.knowledgePath, weight: s.kind === 'brain' ? 0.6 : 0.75, reason: s.kind }));
45
+ return this.store.state.sharedScopes.filter(s => s.brainId === registration.brainId && (s.kind === 'brain' || range === 'brain' || registration.domainId && s.domainId === registration.domainId)).map(s => ({ projectId: s.id, spaceId: `${s.kind}:${s.id}`, knowledgePath: s.knowledgePath, weight: s.kind === 'brain' ? 0.6 : 0.75, reason: s.kind }));
44
46
  }
45
47
  scanCurrent(scopes) {
46
48
  const ordinary = scopes.filter(s => this.store.getProject(s.projectId));
@@ -92,7 +94,7 @@ class EngineRetrieval extends KnowledgeRetrievalService {
92
94
  let scopes = [{ projectId: project.projectId, spaceId: project.primarySpaceId, knowledgePath: project.knowledgePath, weight: 1, reason: 'primary' }];
93
95
  if (input.scope === 'domain' || input.scope === 'brain') {
94
96
  scopes = this.store.listProjects().filter(p => p.enabled !== false && p.brainId === registration.brainId
95
- && (input.scope === 'brain' || p.domainId === registration.domainId)).map(p => ({ projectId: p.projectId, spaceId: `project:${p.projectId}`, knowledgePath: p.knowledgePath, weight: p.projectId === registration.projectId ? 1 : 0.88, reason: p.projectId === registration.projectId ? 'primary' : input.scope }));
97
+ && (input.scope === 'brain' || p.projectId === registration.projectId || registration.domainId && p.domainId === registration.domainId)).map(p => ({ projectId: p.projectId, spaceId: `project:${p.projectId}`, knowledgePath: p.knowledgePath, weight: p.projectId === registration.projectId ? 1 : 0.88, reason: p.projectId === registration.projectId ? 'primary' : input.scope }));
96
98
  scopes.push(...this.sharedScopes(registration, input.scope));
97
99
  }
98
100
  const result = await super.search({ ...input, project, scopes });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanqianx/project-knowledge",
3
- "version": "5.0.9-rc.5",
3
+ "version": "5.0.9-rc.7",
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": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "project-knowledge",
4
- "version": "5.0.9-rc.5",
4
+ "version": "5.0.9-rc.7",
5
5
  "description": "Read durable project decisions and implementation history from Project Knowledge.",
6
6
  "author": {
7
7
  "name": "SanQianX",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-knowledge",
3
- "version": "5.0.9-rc.5",
3
+ "version": "5.0.9-rc.7",
4
4
  "description": "Read durable project decisions and implementation history from Project Knowledge.",
5
5
  "author": {
6
6
  "name": "SanQianX",
@@ -6,7 +6,7 @@
6
6
  "args": [
7
7
  "-y",
8
8
  "--package",
9
- "@sanqianx/project-knowledge@5.0.9-rc.5",
9
+ "@sanqianx/project-knowledge@5.0.9-rc.7",
10
10
  "project-knowledge-mcp"
11
11
  ]
12
12
  }
@@ -3,11 +3,11 @@
3
3
  "modules": {
4
4
  "knowledge-engine": {
5
5
  "name": "@sanqianx/ai-coding-knowledge-engine",
6
- "version": "0.2.3-rc.1",
6
+ "version": "0.2.3-rc.3",
7
7
  "root": "_modules/knowledge-engine",
8
8
  "files": {
9
- "README.md": "899de4400e5baf2a981fbfeb1b6adef0b64a0c022a0dbf8d11706d58b0c6b277",
10
- "package.json": "a90e49be24b25b526c2325da9a2bf897de3b449b1cfbdb595427fd080484cc9c",
9
+ "README.md": "c367f328a0770bf0c53e80e4cfb7b3f7815589312e793755ec00b677b84e601c",
10
+ "package.json": "6f0dc1fecb5d3bd0da4c1714977cf2e5f767fb49cb54ec92caff08fff1ebec6d",
11
11
  "src/analysis-contract.js": "fee063967d32eefc955cf0729f7dc8cb31bd690b85e22471c9059494a599c77a",
12
12
  "src/analysis-output.js": "95a3c19dcc9ab85d1dba7fee5b9aec80f9c000dfba89da3fd0be25a81e2fb680",
13
13
  "src/analysis-worker.js": "a105cabe6e1573b2d986b1e7a5aaf615e2fb53524156fc8e4e2c0a71f2c97e55",
@@ -18,7 +18,7 @@
18
18
  "src/headless-analyzer.js": "cfe54b392b2aff6e2c5157481dfeb5ccebc4ce83d1d74aa44f28cf2eb923b013",
19
19
  "src/index-request.js": "78f26b872299005499fff4f2d1f9e8f986784f2ff36a5cf2be2b1e7b7c7d9378",
20
20
  "src/memories.js": "0a8667e6daba99fa5022393951a28e96cdadf98af85b6af9a6be96c7f4e896fc",
21
- "src/retrieval.js": "b3ae3f701a007e3d3ff98811bb80db3505e2fcc87f94aaa9e36057edc7eb71c2",
21
+ "src/retrieval.js": "bbb09cefc3c6ed692a51edfeecf6ac50619b8a2afbdf2034e0fdb5e00f4cfa68",
22
22
  "src/runtime/README.md": "9be676eca76a7857b34d7357194e6f0ee733c22e61d962d53984715dbec7f673",
23
23
  "src/runtime/atomic-file.js": "9846b4b69db5ded811acf19a1181ef93615d93efaa542b858e552a7f3124ad23",
24
24
  "src/runtime/automation-config.js": "6498c5397be12b155829740595a1553d4dcd6eaa7db6ced3ef88fdc60218f00e",