@sanqianx/project-knowledge 5.0.18-rc.1 → 5.0.18-rc.2
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/_site/_test/integration-intent-test.js +18 -0
- package/_site/lib/integration-intent.js +7 -4
- package/module-runtime-manifest.json +3 -3
- package/package.json +108 -108
- 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
|
@@ -48,6 +48,24 @@ const intentPath = dataDir => path.join(dataDir, 'integration-intent.json');
|
|
|
48
48
|
assert.deepEqual(created, { schema: SCHEMA, clients: { codex: 'disconnected' } });
|
|
49
49
|
assert.deepEqual(readIntent(fresh), created, 'bootstrap creates the file when missing');
|
|
50
50
|
}
|
|
51
|
+
// B2 (real-env regression): a mid-flight scan must never be recorded as a
|
|
52
|
+
// removal decision — unsettled clients stay absent so a later settled scan
|
|
53
|
+
// can fill them correctly.
|
|
54
|
+
{
|
|
55
|
+
const midFlight = tmpDataDir();
|
|
56
|
+
const unsettled = bootstrapIntent(midFlight, [
|
|
57
|
+
{ client: 'claude', developmentCapture: { state: 'checking', installed: undefined } },
|
|
58
|
+
{ client: 'codex', developmentCapture: {} },
|
|
59
|
+
{ client: 'zcode', developmentCapture: { state: 'installed', installed: true } },
|
|
60
|
+
]);
|
|
61
|
+
assert.deepEqual(unsettled, { schema: SCHEMA, clients: { zcode: 'connected' } }, 'checking/undefined entries must stay absent');
|
|
62
|
+
const settled = bootstrapIntent(midFlight, [
|
|
63
|
+
{ client: 'claude', developmentCapture: { state: 'installed', installed: true } },
|
|
64
|
+
{ client: 'codex', developmentCapture: { state: 'not-installed', installed: false } },
|
|
65
|
+
]);
|
|
66
|
+
assert.equal(settled.clients.claude, 'connected', 'later settled scan fills the skipped client correctly');
|
|
67
|
+
assert.equal(settled.clients.codex, 'disconnected');
|
|
68
|
+
}
|
|
51
69
|
// C: summarizeClient covers all five states plus precedence rules.
|
|
52
70
|
{
|
|
53
71
|
const failedRepair = { claude: { state: 'failed', at: new Date().toISOString(), error: 'boom' } };
|
|
@@ -56,16 +56,19 @@ function markIntent(dataDir, client, state) {
|
|
|
56
56
|
return writeIntent(dataDir, clients);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
// Migration: fill entries only for clients the file has never seen
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
//
|
|
59
|
+
// Migration: fill entries only for clients the file has never seen AND whose
|
|
60
|
+
// status scan has settled — a mid-flight scan reports installed as undefined,
|
|
61
|
+
// which must never be recorded as a removal decision. A client whose hooks
|
|
62
|
+
// are installed counts as connected (standalone install or pre-upgrade
|
|
63
|
+
// state); settled-but-absent hooks count as disconnected — the store is never
|
|
64
|
+
// allowed to rewrite a decision the user already made.
|
|
63
65
|
function bootstrapIntent(dataDir, clientsStatus) {
|
|
64
66
|
const current = readIntent(dataDir);
|
|
65
67
|
const clients = { ...(current?.clients || {}) };
|
|
66
68
|
let changed = false;
|
|
67
69
|
for (const entry of clientsStatus || []) {
|
|
68
70
|
if (!entry || !entry.client || entry.client in clients) continue;
|
|
71
|
+
if (entry.developmentCapture?.state === 'checking' || entry.developmentCapture?.installed === undefined) continue;
|
|
69
72
|
clients[entry.client] = entry.developmentCapture?.installed === true ? 'connected' : 'disconnected';
|
|
70
73
|
changed = true;
|
|
71
74
|
}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"plugins/project-knowledge/hooks/codex.json": "216e03c07295606ef6ebb2c4f669ad0d790b5e7c4f3f34600488033db75e4239",
|
|
10
10
|
"plugins/project-knowledge/scripts/context-hook.cjs": "da666153ad5723592cce42d25337ae649f7d93e43fab76b3c6d1263933de063f",
|
|
11
11
|
"plugins/project-knowledge/scripts/mcp-launcher.cjs": "7c68830b5c73eb53ef030756a4de33987f7eab6b1a6cc15602835aac3f954893",
|
|
12
|
-
"plugins/project-knowledge/.claude-plugin/plugin.json": "
|
|
13
|
-
"plugins/project-knowledge/.codex-plugin/plugin.json": "
|
|
14
|
-
"plugins/project-knowledge/.mcp.json": "
|
|
12
|
+
"plugins/project-knowledge/.claude-plugin/plugin.json": "ad8cf459af8242236bb71c4a7e98a24b015415404bb44aedb920fbe0fef943ec",
|
|
13
|
+
"plugins/project-knowledge/.codex-plugin/plugin.json": "ee91251067ce65c54001e915c3960672a595045cf6db4f7c3d56ab7101eff4c0",
|
|
14
|
+
"plugins/project-knowledge/.mcp.json": "9bc8e766dbe8893726fef90e9f909cdc04ae22d25e85b26e517ead72ff69d771",
|
|
15
15
|
"ui/live-client.js": "0d81fa894c629bb839e1931fc3c5ebad4d831aae8232d6ce8c0f542e9e3559e8"
|
|
16
16
|
},
|
|
17
17
|
"modules": {
|
package/package.json
CHANGED
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@sanqianx/project-knowledge",
|
|
3
|
-
"version": "5.0.18-rc.
|
|
4
|
-
"description": "Knowledge base manager with Git integration, AI-driven analysis, and bilingual (zh-CN/en-US) knowledge output",
|
|
5
|
-
"main": "_site/server.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"start": "node _site/server.js",
|
|
8
|
-
"test": "node _site/_test/run-all-tests.js",
|
|
9
|
-
"release:sync": "node _site/scripts/sync-release-version.js --web-only",
|
|
10
|
-
"vendor:modules": "node _site/scripts/vendor-modules.js",
|
|
11
|
-
"runtime:verify": "node _site/scripts/verify-module-runtime.js --working-tree",
|
|
12
|
-
"release:verify": "node _site/scripts/sync-release-version.js --check --web-only && node _site/scripts/verify-module-runtime.js && node _site/scripts/verify-product-runtime.js && node _site/_test/integration-adapters-test.js",
|
|
13
|
-
"preversion": "npm run release:verify",
|
|
14
|
-
"version": "node _site/scripts/sync-release-version.js --stage --web-only",
|
|
15
|
-
"postversion": "npm run release:verify"
|
|
16
|
-
},
|
|
17
|
-
"bin": {
|
|
18
|
-
"project-knowledge": "bin/project-knowledge.js",
|
|
19
|
-
"project-knowledge-kb": "bin/project-knowledge-kb.js",
|
|
20
|
-
"project-knowledge-mcp": "bin/project-knowledge-mcp.js",
|
|
21
|
-
"project-knowledge-integrations": "bin/project-knowledge-integrations.js"
|
|
22
|
-
},
|
|
23
|
-
"engines": {
|
|
24
|
-
"node": ">=22"
|
|
25
|
-
},
|
|
26
|
-
"files": [
|
|
27
|
-
"_site/server.js",
|
|
28
|
-
"ui/index.html",
|
|
29
|
-
"ui/product.css",
|
|
30
|
-
"ui/product.js",
|
|
31
|
-
"ui/live-client.js",
|
|
32
|
-
"ui/favicon.svg",
|
|
33
|
-
"_site/lib/",
|
|
34
|
-
"_modules/knowledge-engine/",
|
|
35
|
-
"vendor-manifest.json",
|
|
36
|
-
"module-runtime-manifest.json",
|
|
37
|
-
"_site/scripts/",
|
|
38
|
-
"_site/_test/*.js",
|
|
39
|
-
"_site/_test/fixtures/",
|
|
40
|
-
"_site/start.bat",
|
|
41
|
-
"_site/stop.bat",
|
|
42
|
-
"claude-prompts.json",
|
|
43
|
-
"bin/",
|
|
44
|
-
"plugins/",
|
|
45
|
-
".claude-plugin/",
|
|
46
|
-
".agents/plugins/",
|
|
47
|
-
"templates/",
|
|
48
|
-
"docs/assets/",
|
|
49
|
-
"docs/README.zh-CN.md",
|
|
50
|
-
"docs/project-registry-schema.md",
|
|
51
|
-
"docs/team-knowledge-mode-a-plan.md",
|
|
52
|
-
"docs/testing-strategy.md",
|
|
53
|
-
"docs/leader-glm-workbench-playbook.md",
|
|
54
|
-
"docs/release-5.0.16-acceptance.md",
|
|
55
|
-
"docs/release-5.0.17-acceptance.md",
|
|
56
|
-
"docs/fresh-v5-start.md",
|
|
57
|
-
"README.md",
|
|
58
|
-
"NOTICE",
|
|
59
|
-
"CHANGELOG.md"
|
|
60
|
-
],
|
|
61
|
-
"repository": {
|
|
62
|
-
"type": "git",
|
|
63
|
-
"url": "git+https://github.com/SanQianX/project-knowledge-base.git"
|
|
64
|
-
},
|
|
65
|
-
"keywords": [
|
|
66
|
-
"knowledge-base",
|
|
67
|
-
"git",
|
|
68
|
-
"ai",
|
|
69
|
-
"claude",
|
|
70
|
-
"codex",
|
|
71
|
-
"opencode",
|
|
72
|
-
"mcp",
|
|
73
|
-
"documentation",
|
|
74
|
-
"scanner",
|
|
75
|
-
"context-pack",
|
|
76
|
-
"post-commit-hook"
|
|
77
|
-
],
|
|
78
|
-
"author": "SanQianX",
|
|
79
|
-
"license": "Apache-2.0",
|
|
80
|
-
"dependencies": {
|
|
81
|
-
"@anthropic-ai/claude-agent-sdk": "^0.2.141",
|
|
82
|
-
"@grpc/grpc-js": "^1.14.5",
|
|
83
|
-
"@grpc/proto-loader": "^0.8.1",
|
|
84
|
-
"@huggingface/transformers": "3.8.1",
|
|
85
|
-
"@lancedb/lancedb": "0.31.0",
|
|
86
|
-
"@modelcontextprotocol/sdk": "1.29.0",
|
|
87
|
-
"@sanqianx/ai-coding-event-bridge-console": "0.7.2",
|
|
88
|
-
"@sanqianx/vector-hub": "1.0.8-rc.8",
|
|
89
|
-
"buffer": "^6.0.3",
|
|
90
|
-
"cheerio": "^1.2.0",
|
|
91
|
-
"claude-ai-workbench": "npm:@sanqianx/claude-ai-workbench@0.13.2-rc.18",
|
|
92
|
-
"cross-spawn": "7.0.6",
|
|
93
|
-
"dotenv": "^17.4.2",
|
|
94
|
-
"gpt-tokenizer": "^3.4.0",
|
|
95
|
-
"http-proxy-agent": "7.0.2",
|
|
96
|
-
"https-proxy-agent": "7.0.6",
|
|
97
|
-
"json-colorizer": "^3.0.1",
|
|
98
|
-
"jsonc-parser": "3.3.1",
|
|
99
|
-
"openai": "^6.49.0",
|
|
100
|
-
"socks-proxy-agent": "8.0.5",
|
|
101
|
-
"turndown": "^7.2.4",
|
|
102
|
-
"uuid": "^13.0.2",
|
|
103
|
-
"wink-bm25-text-search": "^3.1.2",
|
|
104
|
-
"wink-nlp": "^2.4.0",
|
|
105
|
-
"ws": "^8.21.0",
|
|
106
|
-
"yargs": "^18.1.0"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@sanqianx/project-knowledge",
|
|
3
|
+
"version": "5.0.18-rc.2",
|
|
4
|
+
"description": "Knowledge base manager with Git integration, AI-driven analysis, and bilingual (zh-CN/en-US) knowledge output",
|
|
5
|
+
"main": "_site/server.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "node _site/server.js",
|
|
8
|
+
"test": "node _site/_test/run-all-tests.js",
|
|
9
|
+
"release:sync": "node _site/scripts/sync-release-version.js --web-only",
|
|
10
|
+
"vendor:modules": "node _site/scripts/vendor-modules.js",
|
|
11
|
+
"runtime:verify": "node _site/scripts/verify-module-runtime.js --working-tree",
|
|
12
|
+
"release:verify": "node _site/scripts/sync-release-version.js --check --web-only && node _site/scripts/verify-module-runtime.js && node _site/scripts/verify-product-runtime.js && node _site/_test/integration-adapters-test.js",
|
|
13
|
+
"preversion": "npm run release:verify",
|
|
14
|
+
"version": "node _site/scripts/sync-release-version.js --stage --web-only",
|
|
15
|
+
"postversion": "npm run release:verify"
|
|
16
|
+
},
|
|
17
|
+
"bin": {
|
|
18
|
+
"project-knowledge": "bin/project-knowledge.js",
|
|
19
|
+
"project-knowledge-kb": "bin/project-knowledge-kb.js",
|
|
20
|
+
"project-knowledge-mcp": "bin/project-knowledge-mcp.js",
|
|
21
|
+
"project-knowledge-integrations": "bin/project-knowledge-integrations.js"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=22"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"_site/server.js",
|
|
28
|
+
"ui/index.html",
|
|
29
|
+
"ui/product.css",
|
|
30
|
+
"ui/product.js",
|
|
31
|
+
"ui/live-client.js",
|
|
32
|
+
"ui/favicon.svg",
|
|
33
|
+
"_site/lib/",
|
|
34
|
+
"_modules/knowledge-engine/",
|
|
35
|
+
"vendor-manifest.json",
|
|
36
|
+
"module-runtime-manifest.json",
|
|
37
|
+
"_site/scripts/",
|
|
38
|
+
"_site/_test/*.js",
|
|
39
|
+
"_site/_test/fixtures/",
|
|
40
|
+
"_site/start.bat",
|
|
41
|
+
"_site/stop.bat",
|
|
42
|
+
"claude-prompts.json",
|
|
43
|
+
"bin/",
|
|
44
|
+
"plugins/",
|
|
45
|
+
".claude-plugin/",
|
|
46
|
+
".agents/plugins/",
|
|
47
|
+
"templates/",
|
|
48
|
+
"docs/assets/",
|
|
49
|
+
"docs/README.zh-CN.md",
|
|
50
|
+
"docs/project-registry-schema.md",
|
|
51
|
+
"docs/team-knowledge-mode-a-plan.md",
|
|
52
|
+
"docs/testing-strategy.md",
|
|
53
|
+
"docs/leader-glm-workbench-playbook.md",
|
|
54
|
+
"docs/release-5.0.16-acceptance.md",
|
|
55
|
+
"docs/release-5.0.17-acceptance.md",
|
|
56
|
+
"docs/fresh-v5-start.md",
|
|
57
|
+
"README.md",
|
|
58
|
+
"NOTICE",
|
|
59
|
+
"CHANGELOG.md"
|
|
60
|
+
],
|
|
61
|
+
"repository": {
|
|
62
|
+
"type": "git",
|
|
63
|
+
"url": "git+https://github.com/SanQianX/project-knowledge-base.git"
|
|
64
|
+
},
|
|
65
|
+
"keywords": [
|
|
66
|
+
"knowledge-base",
|
|
67
|
+
"git",
|
|
68
|
+
"ai",
|
|
69
|
+
"claude",
|
|
70
|
+
"codex",
|
|
71
|
+
"opencode",
|
|
72
|
+
"mcp",
|
|
73
|
+
"documentation",
|
|
74
|
+
"scanner",
|
|
75
|
+
"context-pack",
|
|
76
|
+
"post-commit-hook"
|
|
77
|
+
],
|
|
78
|
+
"author": "SanQianX",
|
|
79
|
+
"license": "Apache-2.0",
|
|
80
|
+
"dependencies": {
|
|
81
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.141",
|
|
82
|
+
"@grpc/grpc-js": "^1.14.5",
|
|
83
|
+
"@grpc/proto-loader": "^0.8.1",
|
|
84
|
+
"@huggingface/transformers": "3.8.1",
|
|
85
|
+
"@lancedb/lancedb": "0.31.0",
|
|
86
|
+
"@modelcontextprotocol/sdk": "1.29.0",
|
|
87
|
+
"@sanqianx/ai-coding-event-bridge-console": "0.7.2",
|
|
88
|
+
"@sanqianx/vector-hub": "1.0.8-rc.8",
|
|
89
|
+
"buffer": "^6.0.3",
|
|
90
|
+
"cheerio": "^1.2.0",
|
|
91
|
+
"claude-ai-workbench": "npm:@sanqianx/claude-ai-workbench@0.13.2-rc.18",
|
|
92
|
+
"cross-spawn": "7.0.6",
|
|
93
|
+
"dotenv": "^17.4.2",
|
|
94
|
+
"gpt-tokenizer": "^3.4.0",
|
|
95
|
+
"http-proxy-agent": "7.0.2",
|
|
96
|
+
"https-proxy-agent": "7.0.6",
|
|
97
|
+
"json-colorizer": "^3.0.1",
|
|
98
|
+
"jsonc-parser": "3.3.1",
|
|
99
|
+
"openai": "^6.49.0",
|
|
100
|
+
"socks-proxy-agent": "8.0.5",
|
|
101
|
+
"turndown": "^7.2.4",
|
|
102
|
+
"uuid": "^13.0.2",
|
|
103
|
+
"wink-bm25-text-search": "^3.1.2",
|
|
104
|
+
"wink-nlp": "^2.4.0",
|
|
105
|
+
"ws": "^8.21.0",
|
|
106
|
+
"yargs": "^18.1.0"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -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.18-rc.
|
|
5
|
+
"version": "5.0.18-rc.2",
|
|
6
6
|
"description": "Read durable project decisions and implementation history from Project Knowledge.",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "SanQianX",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"const fs=require('fs'),path=require('path'),os=require('os');const PKG='@sanqianx/project-knowledge',SC='project-knowledge/integration-runtime/v1';let f='';const root=process.env.CLAUDE_PLUGIN_ROOT||process.env.PLUGIN_ROOT;if(root){f=path.join(root,'scripts','mcp-launcher.cjs');if(!fs.existsSync(f))f=''}if(!f){const dd=process.env.KB_DATA_DIR||path.join(os.homedir(),'.project-knowledge-v5');try{const bp=path.join(dd,'integration-runtime.json');const st=fs.statSync(bp);if(st.isFile()&&st.size<=32768){const b=JSON.parse(fs.readFileSync(bp,'utf8'));if(b&&b.schema===SC&&b.packageName===PKG&&typeof b.packageRoot==='string'&&path.isAbsolute(b.packageRoot)){const c=path.join(b.packageRoot,'plugins','project-knowledge','scripts','mcp-launcher.cjs');const rr=fs.realpathSync(b.packageRoot),cr=fs.realpathSync(c);const rel=path.relative(rr,cr);if(rel&&rel!=='..'&&!rel.startsWith('..'+path.sep)&&!path.isAbsolute(rel)&&fs.statSync(cr).isFile())f=cr}}}catch(e){}}if(!f){console.error('[project-knowledge-mcp] 未能通过受信任插件根或已验证的安装绑定定位启动器,已停止;不访问网络,也不加载工作目录源码。');process.exit(127)}require(f);"
|
|
9
9
|
],
|
|
10
10
|
"env": {
|
|
11
|
-
"KB_PLUGIN_VERSION": "5.0.18-rc.
|
|
11
|
+
"KB_PLUGIN_VERSION": "5.0.18-rc.2"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|