@sanqianx/project-knowledge 5.0.11-rc.1 → 5.0.11
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 +7 -0
- 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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.0.11] - 2026-10-12
|
|
4
|
+
|
|
5
|
+
- Claude Code 的普通开发需求通过原生前置 Hook 自动取得项目/领域知识和适用的已确认长期记忆;MCP 保留用于深入读取。
|
|
6
|
+
- 引擎统一准备有界上下文,工作台复用同一接口并避免重复注入;知识读取失败明确提示后继续,向量故障不冒充成功。
|
|
7
|
+
- 修复旧知识插件存在即跳过更新及 Windows Git CRLF/npm LF 接线误判;插件版本、启用、文件与采集能力分别验证。
|
|
8
|
+
- 保留 v5 数据、模型、第三方 Hook 和向量位置;原生模型请求与开发提交闭环分开验收。首批只承诺 Claude Code 自动读取,Codex/ZCode 后续交付。
|
|
9
|
+
|
|
3
10
|
## [5.0.10] - 2026-10-12
|
|
4
11
|
|
|
5
12
|
- Freeze the accepted rc.2 scoped-memory runtime: review and edit candidates,
|
|
@@ -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": "b04275a69c2790c7706c480615afc57211612d6ca8ce2865aa2ba9a742c27f14",
|
|
11
|
+
"plugins/project-knowledge/.mcp.json": "0d371611f442631f1f03520d00d146242d23c584b50efccbe29d032aad68c35c"
|
|
12
12
|
},
|
|
13
13
|
"modules": {
|
|
14
14
|
"terminal": {
|
package/package.json
CHANGED
|
@@ -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
|
|
5
|
+
"version": "5.0.11",
|
|
6
6
|
"description": "Read durable project decisions and implementation history from Project Knowledge.",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "SanQianX",
|