@sanqianx/project-knowledge 5.0.9-rc.17 → 5.0.9-rc.18
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 +10 -0
- package/_site/_test/mcp-server-test.js +1 -1
- package/_site/_test/vector-storage-root-test.js +16 -0
- package/_site/lib/knowledge-tool-runtime.js +1 -1
- 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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.0.9-rc.18] - 2026-10-12
|
|
4
|
+
|
|
5
|
+
- Project resolution for MCP and CLI now reports the vector-hub storage root
|
|
6
|
+
selected in settings, not the retired shell database path. A running tool
|
|
7
|
+
rereads root changes; resolution does not move files or rebuild indexes.
|
|
8
|
+
- Preserve the reproduced rc.17 diagnostic mismatch and add Node 22/24
|
|
9
|
+
coverage for configured, changed and unset roots and MCP output.
|
|
10
|
+
- Retain existing v5 data and all accepted module pins. Publish to next;
|
|
11
|
+
stable latest remains behind official-package and actual-user acceptance.
|
|
12
|
+
|
|
3
13
|
## [5.0.9-rc.17] - 2026-10-11
|
|
4
14
|
|
|
5
15
|
- Pin Workbench 0.13.2-rc.6. Repeated embedded notifications for the current
|
|
@@ -113,7 +113,7 @@ async function createMcpClient() {
|
|
|
113
113
|
let response = await client.request('tools/call', { name: 'project_knowledge_resolve', arguments: { repoPath: repo } });
|
|
114
114
|
assert.strictEqual(response.result.structuredContent.projectId, 'project-demo');
|
|
115
115
|
assert.strictEqual(response.result.structuredContent.knowledgePath, markdownKb);
|
|
116
|
-
assert.strictEqual(response.result.structuredContent.indexPath, layout.
|
|
116
|
+
assert.strictEqual(response.result.structuredContent.indexPath, layout.getVectorRootPath(settingsStore.read()));
|
|
117
117
|
|
|
118
118
|
response = await client.request('tools/call', { name: 'project_knowledge_search', arguments: { projectId: 'project-demo', query: 'refresh tokens' } });
|
|
119
119
|
assert.strictEqual(response.result.structuredContent.source, 'knowledge-retrieval-service');
|
|
@@ -3,11 +3,27 @@ const assert = require('node:assert/strict');
|
|
|
3
3
|
const path = require('node:path');
|
|
4
4
|
const { StorageLayout } = require('../lib/storage-layout');
|
|
5
5
|
const { ModuleBridge } = require('../lib/module-bridge');
|
|
6
|
+
const { KnowledgeToolRuntime } = require('../lib/knowledge-tool-runtime');
|
|
6
7
|
const root = path.resolve('D:/knowledge storage 中文');
|
|
7
8
|
const layout = new StorageLayout({ dataDir: path.resolve('D:/metadata') });
|
|
8
9
|
assert.equal(layout.getVectorRootPath({ knowledge: { rootPath: root } }), path.join(root, '.indexes'));
|
|
9
10
|
assert.equal(layout.getVectorRootPath({ knowledge: { rootPath: '' } }), path.join(layout.getDataDir(), 'vectorhub'));
|
|
10
11
|
const settingsStore = { read: () => ({ knowledge: { rootPath: root }, brain: { id: 'brain-default', domains: [] } }) };
|
|
12
|
+
let knowledgeRoot = root;
|
|
13
|
+
const tools = new KnowledgeToolRuntime({
|
|
14
|
+
layout,
|
|
15
|
+
settingsStore: { read: () => ({ knowledge: { rootPath: knowledgeRoot } }) },
|
|
16
|
+
registryStore: { listIds: () => ['project-storage'] },
|
|
17
|
+
projectStore: {
|
|
18
|
+
readConfig: () => ({ displayName: 'Storage', repoPath: path.join(root, 'repo'), knowledgePath: path.join(root, 'project') }),
|
|
19
|
+
readState: () => ({ index: { generation: 3 } }),
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
assert.equal(tools.resolveProject({ projectId: 'project-storage' }).indexPath, path.join(root, '.indexes'), 'MCP/CLI resolution must report the vector-hub location, not the retired shell database');
|
|
23
|
+
knowledgeRoot = path.join(root, 'changed root');
|
|
24
|
+
assert.equal(tools.resolveProject({ projectId: 'project-storage' }).indexPath, path.join(knowledgeRoot, '.indexes'), 'a running MCP process must reread the selected knowledge root');
|
|
25
|
+
knowledgeRoot = '';
|
|
26
|
+
assert.equal(tools.resolveProject({ projectId: 'project-storage' }).indexPath, path.join(layout.getDataDir(), 'vectorhub'));
|
|
11
27
|
const bridge = new ModuleBridge({ settingsStore, dataDir: layout.getDataDir() });
|
|
12
28
|
const spec = bridge._supervisedSpecs().find(spec => spec.name === 'vector-hub');
|
|
13
29
|
assert.equal(spec.env.VECTOR_HUB_ROOT, path.join(root, '.indexes'));
|
|
@@ -163,7 +163,7 @@ class KnowledgeToolRuntime {
|
|
|
163
163
|
repoPath: path.resolve(resolvedRepoPath || config.repoPath),
|
|
164
164
|
knowledgePath: path.resolve(config.knowledgePath),
|
|
165
165
|
kbPath: path.resolve(config.knowledgePath),
|
|
166
|
-
indexPath: this.layout.
|
|
166
|
+
indexPath: this.layout.getVectorRootPath(this.settingsStore.read({ allowMissing: true })),
|
|
167
167
|
primarySpaceId: `project:${projectId}`,
|
|
168
168
|
relatedProjectIds: Array.isArray(config.relatedProjectIds) ? [...config.relatedProjectIds] : [],
|
|
169
169
|
index: { ...state.index },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanqianx/project-knowledge",
|
|
3
|
-
"version": "5.0.9-rc.
|
|
3
|
+
"version": "5.0.9-rc.18",
|
|
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.
|
|
4
|
+
"version": "5.0.9-rc.18",
|
|
5
5
|
"description": "Read durable project decisions and implementation history from Project Knowledge.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "SanQianX",
|