@sanqianx/project-knowledge 5.0.15-rc.4 → 5.0.15
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 +12 -0
- package/_site/_test/native-context-integrations-test.js +10 -1
- package/_site/lib/integration-installer.js +6 -1
- package/module-runtime-manifest.json +3 -3
- 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,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.0.15] - 2026-10-13
|
|
4
|
+
|
|
5
|
+
- 冻结 rc.5 已验收的中文 BM25 与可校验向量片段融合、本项目进度与跨范围上下文、无可靠匹配诊断及离线 Claude 插件接入。
|
|
6
|
+
- 包含 UI 属性/源码示例被知识晋升误判的修复,以及 Codex 本地市场重载修复;保留真实 Git 失败和原生 Hook 信任审核。
|
|
7
|
+
- 正式包先下载和测试,再更新 latest;本机与另一台设备的结果分别报告。
|
|
8
|
+
|
|
9
|
+
## [5.0.15-rc.5] - 2026-10-13
|
|
10
|
+
|
|
11
|
+
- 修复 Codex 本地插件市场被强制执行 Git 刷新而无法更新的问题;识别原生明确的非 Git 市场反馈后重新加载本地插件,真实 Git/认证失败仍终止,保留可用旧插件。
|
|
12
|
+
- 不写入 Hook 信任、不跳过原生审核;保留 rc.4 的知识晋升误判修复与检索改进。
|
|
13
|
+
- 候选包先下载验收,不提升 latest。
|
|
14
|
+
|
|
3
15
|
## [5.0.15-rc.4] - 2026-10-13
|
|
4
16
|
|
|
5
17
|
- 修复知识晋升校验把 UI 的 `placeholder=` 属性及有正文解释的源码示例误判为未完成内容的问题;真实未完成标记、空正文、越界及哈希校验继续拦截。
|
|
@@ -17,13 +17,14 @@ async function main() {
|
|
|
17
17
|
const thirdParty = { type: 'process', command: 'node', args: ['third-party-hook.js'], timeoutMs: 4000 };
|
|
18
18
|
const before = { model: 'user-model', env: { USER_VALUE: 'keep' }, hooks: { enabled: true, events: { UserPromptSubmit: [{ hooks: [thirdParty] }], Stop: [{ hooks: [thirdParty] }] } } };
|
|
19
19
|
fs.writeFileSync(configFile, JSON.stringify(before));
|
|
20
|
-
let version = '5.0.9', enabled = true, trusted = false;
|
|
20
|
+
let version = '5.0.9', enabled = true, trusted = false, marketplaceMode = 'git';
|
|
21
21
|
const calls = [], cache = path.join(root, 'codex-cache');
|
|
22
22
|
const manager = new IntegrationManager({ homeDir: root, zcodeConfigFile: configFile, commandResolver: name => name,
|
|
23
23
|
codexHookProbe: async () => ({ data: [{ cwd: root, errors: [], warnings: [], hooks: [{ eventName: 'userPromptSubmit', pluginId: 'project-knowledge@project-knowledge', command: hook.command, sourcePath: path.join(cache, 'hooks/codex.json'), enabled: true, trustStatus: trusted ? 'trusted' : 'untrusted' }] }] }),
|
|
24
24
|
runner: (command, args) => {
|
|
25
25
|
calls.push(args.join(' '));
|
|
26
26
|
if (args.join(' ') === 'plugin marketplace list') return { status: 0, stdout: 'project-knowledge marketplace' };
|
|
27
|
+
if (args.join(' ') === 'plugin marketplace upgrade project-knowledge' && marketplaceMode !== 'git') return { status: 1, stderr: marketplaceMode === 'local' ? 'Error: marketplace `project-knowledge` is not configured as a Git marketplace' : 'Git authentication failed' };
|
|
27
28
|
if (args.join(' ') === 'plugin list --json') return { status: 0, stdout: JSON.stringify({ installed: [{ pluginId: 'project-knowledge@project-knowledge', version, enabled, source: { path: cache } }] }) };
|
|
28
29
|
if (args.slice(0, 2).join(' ') === 'plugin add') { version = manager.version; fs.mkdirSync(cache, { recursive: true }); fs.cpSync(plugin, cache, { recursive: true }); }
|
|
29
30
|
return { status: 0, stdout: '' };
|
|
@@ -37,6 +38,14 @@ async function main() {
|
|
|
37
38
|
const count = calls.filter(c => c.startsWith('plugin add')).length; manager.installCodex(); assert.equal(calls.filter(c => c.startsWith('plugin add')).length, count);
|
|
38
39
|
enabled = false; assert.throws(() => manager.installCodex(), /禁用/); assert.equal(manager.statusCodex().state, 'disabled'); enabled = true;
|
|
39
40
|
assert.ok(calls.every(c => !/trust|bypass/.test(c)), 'installer never writes native trust or bypasses review');
|
|
41
|
+
marketplaceMode = 'local'; version = '5.0.9';
|
|
42
|
+
assert.equal(manager.installCodex().state, 'updated', 'local catalogues reload owned files without a Git refresh');
|
|
43
|
+
assert.equal(manager.statusCodex().state, 'installed');
|
|
44
|
+
marketplaceMode = 'network-failed'; version = '5.0.9';
|
|
45
|
+
const removals = calls.filter(c => c.startsWith('plugin remove')).length;
|
|
46
|
+
assert.throws(() => manager.installCodex(), /Git authentication failed/);
|
|
47
|
+
assert.equal(calls.filter(c => c.startsWith('plugin remove')).length, removals, 'an actual Git failure must not remove the working plugin or be treated as a local catalogue');
|
|
48
|
+
marketplaceMode = 'git'; version = manager.version;
|
|
40
49
|
const installed = manager.installZCode(); assert.equal(installed.state, 'installed'); manager.installZCode();
|
|
41
50
|
const current = JSON.parse(fs.readFileSync(configFile));
|
|
42
51
|
assert.equal(current.model, before.model); assert.deepEqual(current.env, before.env); assert.deepEqual(current.hooks.events.Stop, before.hooks.events.Stop);
|
|
@@ -592,7 +592,12 @@ class IntegrationManager {
|
|
|
592
592
|
updateCodex() {
|
|
593
593
|
if (!this.dryRun && this.codexPlugin()?.enabled === false) throw new Error('知识库插件已被用户禁用,请在 Codex 中明确启用,未静默修改。');
|
|
594
594
|
this.ensureCodexMarketplace();
|
|
595
|
-
this.execute('codex', ['plugin', 'marketplace', 'upgrade', MARKETPLACE_NAME]);
|
|
595
|
+
const refreshed = this.execute('codex', ['plugin', 'marketplace', 'upgrade', MARKETPLACE_NAME], { allowFailure: true });
|
|
596
|
+
// Native refresh is Git-only. A local catalogue already points at current
|
|
597
|
+
// files; reinstall those files, but never hide a real Git/network failure.
|
|
598
|
+
if (refreshed.status !== 0 && !/^Error: marketplace `project-knowledge` is not configured as a Git marketplace\s*$/.test(String(refreshed.stderr || refreshed.stdout || '').trim())) {
|
|
599
|
+
throw new Error(String(refreshed.stderr || refreshed.stdout || '').trim() || 'Codex marketplace refresh failed.');
|
|
600
|
+
}
|
|
596
601
|
if (this.dryRun || this.codexPlugin()) {
|
|
597
602
|
this.execute('codex', ['plugin', 'remove', `${INTEGRATION_NAME}@${MARKETPLACE_NAME}`]);
|
|
598
603
|
}
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"plugins/project-knowledge/hooks/claude.json": "d61510327e3e1facbb4c645228e9f50cad05a88b33d80c4c22e5ba9f8b9f5359",
|
|
9
9
|
"plugins/project-knowledge/hooks/codex.json": "216e03c07295606ef6ebb2c4f669ad0d790b5e7c4f3f34600488033db75e4239",
|
|
10
10
|
"plugins/project-knowledge/scripts/context-hook.cjs": "da666153ad5723592cce42d25337ae649f7d93e43fab76b3c6d1263933de063f",
|
|
11
|
-
"plugins/project-knowledge/.claude-plugin/plugin.json": "
|
|
12
|
-
"plugins/project-knowledge/.codex-plugin/plugin.json": "
|
|
13
|
-
"plugins/project-knowledge/.mcp.json": "
|
|
11
|
+
"plugins/project-knowledge/.claude-plugin/plugin.json": "c6877fdc7c66bf4b6d296a219d465bb82a239027fe83fdd31b482690d618454b",
|
|
12
|
+
"plugins/project-knowledge/.codex-plugin/plugin.json": "e0e933b11567453b730510d3706aa1d9869064100d9d330a1d5865d5f3c1620c",
|
|
13
|
+
"plugins/project-knowledge/.mcp.json": "ad7e042a32ae84d501595f71cf4e865d424b8ae1621bdee0b1e06b851c67b949"
|
|
14
14
|
},
|
|
15
15
|
"modules": {
|
|
16
16
|
"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.15
|
|
5
|
+
"version": "5.0.15",
|
|
6
6
|
"description": "Read durable project decisions and implementation history from Project Knowledge.",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "SanQianX",
|