@sanqianx/project-knowledge 5.0.11-rc.1 → 5.0.11-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/automatic-context-test.js +3 -0
- package/_site/lib/integration-installer.js +7 -2
- package/module-runtime-manifest.json +2 -2
- 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
|
@@ -55,6 +55,9 @@ async function main() {
|
|
|
55
55
|
assert.ok(commandCalls.includes('plugin marketplace update project-knowledge'));
|
|
56
56
|
assert.ok(commandCalls.includes('plugin update project-knowledge@project-knowledge --scope user'));
|
|
57
57
|
assert.equal(manager.statusClaude().state, 'installed');
|
|
58
|
+
const cacheRoot = path.join(root, '.claude/plugins/cache/project-knowledge/project-knowledge', manager.version);
|
|
59
|
+
for (const file of ['hooks/claude.json', 'scripts/context-hook.cjs']) fs.writeFileSync(path.join(cacheRoot, file), fs.readFileSync(path.join(cacheRoot, file), 'utf8').replace(/\r?\n/g, '\r\n'));
|
|
60
|
+
assert.equal(manager.automaticContextStatus('claude', manager.statusClaude()).configured, true, 'Git CRLF checkout and npm LF are the same client integration');
|
|
58
61
|
const before = commandCalls.filter(c => c.startsWith('plugin update')).length; manager.installClaude();
|
|
59
62
|
assert.equal(commandCalls.filter(c => c.startsWith('plugin update')).length, before);
|
|
60
63
|
console.log('Automatic context protocol, fail-open safety and stale-plugin upgrade passed.');
|
|
@@ -784,9 +784,14 @@ class IntegrationManager {
|
|
|
784
784
|
locations = (index.plugins?.[`${INTEGRATION_NAME}@${MARKETPLACE_NAME}`] || []).filter(p => p.version === knowledge.version).map(p => p.installPath);
|
|
785
785
|
} catch {}
|
|
786
786
|
if (!locations.length) locations.push(path.join(this.homeDir, '.claude/plugins/cache', MARKETPLACE_NAME, INTEGRATION_NAME, knowledge.version));
|
|
787
|
-
const files = ['hooks/claude.json', 'scripts/context-hook.cjs'];
|
|
787
|
+
const files = ['hooks/claude.json', 'scripts/context-hook.cjs', '.mcp.json', '.claude-plugin/plugin.json'];
|
|
788
788
|
const configured = locations.some(directory => typeof directory === 'string' && files.every(file => {
|
|
789
|
-
|
|
789
|
+
// Native marketplaces use Git checkout newline rules; npm integrity
|
|
790
|
+
// remains byte-exact elsewhere. Only normalize text line endings here.
|
|
791
|
+
try {
|
|
792
|
+
const text = target => new TextDecoder('utf-8', { fatal: true }).decode(fs.readFileSync(target)).replace(/\r\n/g, '\n');
|
|
793
|
+
return text(path.join(directory, file)) === text(path.join(this.rootDir, 'plugins', INTEGRATION_NAME, file));
|
|
794
|
+
} catch { return false; }
|
|
790
795
|
}));
|
|
791
796
|
return { supported: true, state: configured ? 'configured' : 'needs-repair', configured, expectedVersion: this.version, detail: configured ? '前置读取脚本已接线;请重新打开会话。具体需求是否已读取请查看 agent.context 与 knowledge.context 日志。' : '插件前置读取文件缺失或内容不匹配,请更新/修复插件。' };
|
|
792
797
|
}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"ui/favicon.svg": "c48be946b224112ebb0238b44263f7a61bda31e531afa895c2e9801c0ff24f32",
|
|
8
8
|
"plugins/project-knowledge/hooks/claude.json": "d61510327e3e1facbb4c645228e9f50cad05a88b33d80c4c22e5ba9f8b9f5359",
|
|
9
9
|
"plugins/project-knowledge/scripts/context-hook.cjs": "b138fab6d8fcb35f8101ccfda565ccec694acb888f94347c5864c804ebb5e1a0",
|
|
10
|
-
"plugins/project-knowledge/.claude-plugin/plugin.json": "
|
|
11
|
-
"plugins/project-knowledge/.mcp.json": "
|
|
10
|
+
"plugins/project-knowledge/.claude-plugin/plugin.json": "d9feb14520106a72478577662a30950b4646b3f9d01d2719633a679b7320f93e",
|
|
11
|
+
"plugins/project-knowledge/.mcp.json": "70a47a1c7d8f846406727933e1ef7b838f20ec275f31da15ed387d947c4c4e3b"
|
|
12
12
|
},
|
|
13
13
|
"modules": {
|
|
14
14
|
"terminal": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanqianx/project-knowledge",
|
|
3
|
-
"version": "5.0.11-rc.
|
|
3
|
+
"version": "5.0.11-rc.2",
|
|
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.11-rc.
|
|
5
|
+
"version": "5.0.11-rc.2",
|
|
6
6
|
"description": "Read durable project decisions and implementation history from Project Knowledge.",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "SanQianX",
|