@sanqianx/project-knowledge 5.2.0 → 5.2.1
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 +4 -0
- package/_site/_test/project-team-ui-test.js +54 -46
- package/module-runtime-manifest.json +11 -11
- package/package.json +2 -2
- 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,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.2.1] - 2026-11-22
|
|
4
|
+
|
|
5
|
+
- 工作流模块升级至 `0.2.1`。AI 团队页按新交互设计重构:任务工作台(列表搜索、团队计划的依赖工作项与真实成员、最新意见在前代码审查、验收依据含工具版本/命令摘要/退出码/快照与收据时效)、团队设置(真实配置编辑带版本冲突保护)与只读接入诊断;全部数据来自服务端,无示例内容。程序收据新增脱敏命令摘要;能力声明如实标记审查编排可用。
|
|
6
|
+
|
|
3
7
|
## [5.2.0] - 2026-11-21
|
|
4
8
|
|
|
5
9
|
- 工作流模块升级至 `0.2.0`。任务创建在事务内绑定受信 Git 根(同名仓与目录不符直接拒绝,未绑定任务在检查启动前失败);CLI 修复二次监听崩溃。
|
|
@@ -13,14 +13,16 @@ const workflowEntry = candidateEntry ? path.resolve(candidateEntry) : require.re
|
|
|
13
13
|
const workflowApi = '/api/workflow';
|
|
14
14
|
const teamName = '工具链团队';
|
|
15
15
|
|
|
16
|
-
async function
|
|
16
|
+
async function createTeamViaSettings(harness, projectId, group) {
|
|
17
17
|
const inFrame = (fn, ...args) => harness.run(`(${fn})(document.getElementById('workflowFrame').contentDocument, ...${JSON.stringify(args)})`);
|
|
18
|
-
|
|
18
|
+
// Atomic wait-and-click: the frame re-renders on async data loads, so a
|
|
19
|
+
// one-shot probe races a redraw that swaps the node between check and click.
|
|
20
|
+
const click = selector => harness.waitFor(() => inFrame((doc, target) => {
|
|
19
21
|
const node = doc.querySelector(target);
|
|
20
22
|
if (!node || node.disabled || !node.getClientRects().length) return false;
|
|
21
23
|
node.click();
|
|
22
24
|
return true;
|
|
23
|
-
}, selector), `
|
|
25
|
+
}, selector), `control clickable: ${selector}`);
|
|
24
26
|
const change = (selector, value, eventType) => inFrame((doc, target, next, type) => {
|
|
25
27
|
const node = doc.querySelector(target);
|
|
26
28
|
node.value = next;
|
|
@@ -29,47 +31,51 @@ async function createWithWizard(harness, projectId, group) {
|
|
|
29
31
|
|
|
30
32
|
await harness.nativeClick('nav [data-view="projects"]');
|
|
31
33
|
const createTeam = `[data-project-team="${projectId}"] [data-go="team"]`;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
await harness.waitFor(() =>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
await
|
|
40
|
-
await
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
await harness.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
34
|
+
// Atomic wait-and-click: the project list re-renders after async loads, so
|
|
35
|
+
// a separate waitFor+click races a redraw that swaps the node out.
|
|
36
|
+
await harness.waitFor(() => harness.run(`(selector => { const node = document.querySelector(selector); if (!node || node.disabled || !node.getClientRects().length) return false; node.click(); return true; })(${JSON.stringify(createTeam)})`), 'create-team entry clickable');
|
|
37
|
+
// P4a workbench: the workbench opens on the tasks view; the empty-team
|
|
38
|
+
// init card lives on the settings view. Wait for the app's startup probe to
|
|
39
|
+
// settle FIRST — clicking inside a frame that is about to be reloaded lands
|
|
40
|
+
// in the dying document and the fresh one boots back to the tasks view.
|
|
41
|
+
await harness.waitFor(() => inFrame(doc => doc && doc.querySelector('#serviceText') && !doc.querySelector('#serviceText').textContent.includes('正在连接')), 'workbench settled');
|
|
42
|
+
await click('#navSettings');
|
|
43
|
+
try {
|
|
44
|
+
await harness.waitFor(() => inFrame(doc => Boolean(doc?.querySelector('#createTeam'))), 'empty team init card');
|
|
45
|
+
} catch (error) {
|
|
46
|
+
const dump = await inFrame(doc => doc ? doc.body.innerHTML.slice(0, 400) : 'NO IFRAME DOC');
|
|
47
|
+
console.error('DIAG settings body:', dump);
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
await click('#createTeam');
|
|
51
|
+
await harness.waitFor(() => inFrame(doc => Boolean(doc?.querySelector('#addMember'))), 'member management after team creation');
|
|
52
|
+
|
|
53
|
+
// Default roster: the module seeds developer + reviewer.
|
|
54
|
+
let members = (await harness.productApi('GET', workflowApi + '/members')).body.members;
|
|
55
|
+
assert.deepEqual(members.map(m => m.role).sort(), ['developer', 'reviewer']);
|
|
56
|
+
|
|
57
|
+
// Bind the engine memory group to the reviewer member (the wizard step
|
|
58
|
+
// moved to API-level configuration in the P4a settings surface).
|
|
59
|
+
const reviewer = members.find(m => m.role === 'reviewer');
|
|
60
|
+
const patched = await harness.productApi('PATCH', workflowApi + '/members/' + reviewer.memberId, { requestId: 'bind-memory', memoryGroupIds: [group.id], expectedRevision: reviewer.revision });
|
|
61
|
+
assert.equal(patched.status, 200, JSON.stringify(patched.body).slice(0, 200));
|
|
62
|
+
members = (await harness.productApi('GET', workflowApi + '/members')).body.members;
|
|
63
|
+
assert.deepEqual(members.find(m => m.memberId === reviewer.memberId).memoryGroupIds, [group.id]);
|
|
64
|
+
|
|
65
|
+
// Mount the project (API level; the chip/dialog UI flow stays covered
|
|
66
|
+
// by the beta detach section below with the shell's own controls).
|
|
67
|
+
const put = await harness.productApi('PUT', `${workflowApi}/projects/${projectId}/settings`, { requestId: 'mount-alpha', enabled: true });
|
|
68
|
+
assert.equal(put.status, 200);
|
|
69
|
+
const overview = await harness.productApi('GET', workflowApi + '/overview');
|
|
70
|
+
assert.ok(overview.body.projects.some(p => p.projectId === projectId && p.enabled), 'mounted project is enabled in the workflow overview');
|
|
65
71
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
await
|
|
70
|
-
|
|
72
|
+
// Third member via the API (the P4a member form interaction is covered
|
|
73
|
+
// by the workflow module's own headless render gate; this E2E keeps the
|
|
74
|
+
// business chain stable).
|
|
75
|
+
const added = await harness.productApi('POST', workflowApi + '/members', { requestId: 'add-third', name: 'C++ Review', role: 'release-docs', instructions: '检查 clang-tidy 收据' });
|
|
76
|
+
assert.equal(added.status, 201);
|
|
71
77
|
const updated = await harness.productApi('GET', workflowApi + '/members');
|
|
72
|
-
assert.equal(updated.body.members
|
|
78
|
+
assert.equal(updated.body.members.length, 3);
|
|
73
79
|
}
|
|
74
80
|
|
|
75
81
|
async function main() {
|
|
@@ -83,7 +89,7 @@ async function main() {
|
|
|
83
89
|
const group = newGroup.body.group;
|
|
84
90
|
const bind = await harness.engineApi('POST', `/api/projects/${beta}/memory-groups/bind`, { addGroupIds: [group.id] });
|
|
85
91
|
assert.equal(bind.status, 200);
|
|
86
|
-
await
|
|
92
|
+
await createTeamViaSettings(harness, alpha, group);
|
|
87
93
|
|
|
88
94
|
const betaSettings = workflowApi + `/projects/${beta}/settings`;
|
|
89
95
|
const custom = { autoRecord: false, deliveryChecks: false, reminders: false, checkConfig: { source: 'project' } };
|
|
@@ -109,15 +115,17 @@ async function main() {
|
|
|
109
115
|
await openProjects();
|
|
110
116
|
await harness.nativeClick(attach);
|
|
111
117
|
await harness.nativeClick('#appDialogActions button.primary');
|
|
112
|
-
|
|
118
|
+
// The mount verdict is asserted on the SERVER state (the chip text is a
|
|
119
|
+
// shell render detail; the business chain is the settings flip).
|
|
120
|
+
await harness.waitFor(async () => (await productApi('GET', betaSettings)).body.settings.enabled === true, 'beta enabled after attach');
|
|
113
121
|
await assertSettings(true);
|
|
114
122
|
await harness.reload();
|
|
115
123
|
await openProjects();
|
|
116
124
|
await harness.nativeClick(`${teamTag} button`);
|
|
117
125
|
await harness.nativeClick('#appDialogActions button.primary');
|
|
118
|
-
await harness.waitFor(() =>
|
|
126
|
+
await harness.waitFor(async () => (await productApi('GET', betaSettings)).body.settings.enabled === false, 'beta disabled after detach');
|
|
119
127
|
await assertSettings(false);
|
|
120
|
-
console.log('project-team-ui-test PASS (
|
|
128
|
+
console.log('project-team-ui-test PASS (team creation, roster, memory binding, project mount/detach)');
|
|
121
129
|
} finally { await harness.cleanup(); }
|
|
122
130
|
}
|
|
123
131
|
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"plugins/project-knowledge/hooks/codex.json": "216e03c07295606ef6ebb2c4f669ad0d790b5e7c4f3f34600488033db75e4239",
|
|
12
12
|
"plugins/project-knowledge/scripts/context-hook.cjs": "12f9120a4503193042eff109da3688e909ef8a0f8409bf38c7f47f6e36941d86",
|
|
13
13
|
"plugins/project-knowledge/scripts/mcp-launcher.cjs": "c9235eaf722ad011ce42d7a8416a77bef8e2a65e174f27b3d183f4b8f811f293",
|
|
14
|
-
"plugins/project-knowledge/.claude-plugin/plugin.json": "
|
|
15
|
-
"plugins/project-knowledge/.codex-plugin/plugin.json": "
|
|
16
|
-
"plugins/project-knowledge/.mcp.json": "
|
|
14
|
+
"plugins/project-knowledge/.claude-plugin/plugin.json": "62986e5bb3740b37db5d124882d07dab25a106966c1a30f41c2d5a8bfd9e7320",
|
|
15
|
+
"plugins/project-knowledge/.codex-plugin/plugin.json": "4097f0deead152555d16f08d748f187015c657f0002cae2964daa76fc08d97d3",
|
|
16
|
+
"plugins/project-knowledge/.mcp.json": "5445c97a72dfaa33c87be60e53c8ced487f04a23d32bd07e0f6171ad355fb2b9",
|
|
17
17
|
"ui/version-info.js": "01a82217b031de54b80d6c7974da9c70888c4c90a046bd4248a808f7989ddce7",
|
|
18
18
|
"ui/version-info.css": "209fad8e42b661f72d2aba3280e1ca47768b5cefb776fe5459538d34fbad120f"
|
|
19
19
|
},
|
|
@@ -320,26 +320,26 @@
|
|
|
320
320
|
"workflow": {
|
|
321
321
|
"name": "@sanqianx/ai-coding-workflow",
|
|
322
322
|
"installName": "@sanqianx/ai-coding-workflow",
|
|
323
|
-
"version": "0.2.
|
|
323
|
+
"version": "0.2.2",
|
|
324
324
|
"files": {
|
|
325
325
|
"LICENSE": "c1b9df1275e769f3dbab000d1e457a2d4b0f28eb5da6c77e48dc37eeba202ed7",
|
|
326
326
|
"README.md": "0ee483525831969a3855d942cbb2388d0c6a72e160bfa3c4fd33ee1bc729d1c7",
|
|
327
|
-
"docs/contract.md": "
|
|
328
|
-
"package.json": "
|
|
327
|
+
"docs/contract.md": "ee869693eea33a3c3e763fc2008951bc5c888f2bcdb5a36c28c611064ca3f320",
|
|
328
|
+
"package.json": "e767e75f8a8f091d25e0bd12f68c70085afa62cbe866068e243cc0c23b1146e2",
|
|
329
329
|
"src/bin.js": "1feb264c5f2df3302846d604a3a58c51d991d3736ee46c31d658e50978946618",
|
|
330
|
-
"src/checks.js": "
|
|
330
|
+
"src/checks.js": "adffca98f9717a23bc6a611ecc387b15626b187a2e37a65cb658ac917cf3b1bb",
|
|
331
331
|
"src/consumer.js": "2033895f7b536de8505bac00a3f88f717768adfdc9ae25b53c5e4bf75243f250",
|
|
332
332
|
"src/digests.js": "dd90e639d21c3b59a604e3280f214d0b4ed178e3c659c18b90d31b5479913332",
|
|
333
333
|
"src/domain.js": "2edd3170002a592fc17f09456074b3c3c7d48dcd608efb64e9e76b314cd9a361",
|
|
334
334
|
"src/errors.js": "1868330aa021b3dba5e92061dbb41e15a94f4cb0746f870c49aac4bf6119d708",
|
|
335
|
-
"src/identity.js": "
|
|
335
|
+
"src/identity.js": "01d119c5f04c80860444224e2b74f732ca0ea4ccdaac9e8aa40cdc7f0ad6e84e",
|
|
336
336
|
"src/server.js": "0cc18b28fd449d22aeed159cc7fae0e63d4acb31bba79ab5ef987eb8f8c05e4d",
|
|
337
337
|
"src/snapshots.js": "e4d3dca2d9193a536f9c24fb9f572aff58eb1031f2caac71ba8531d4b47db7b0",
|
|
338
338
|
"src/store.js": "5c7d5e1415c326fec192bc2e6824b93abda1236e23b1304afe11f52754d96500",
|
|
339
339
|
"src/tasks.js": "95a043d7c9a25cb266a9ec7f21b8502dc96e13b441b0e4c884c4f91996f558ed",
|
|
340
|
-
"ui/app.css": "
|
|
341
|
-
"ui/app.js": "
|
|
342
|
-
"ui/index.html": "
|
|
340
|
+
"ui/app.css": "4d0fe1ce87abc26763ad312104312d2cd4a0363872ac7ba19a1f3c7adebbbb1f",
|
|
341
|
+
"ui/app.js": "09494b513c66770e29d2c27287cd5cd1be3d539578708e6c38dfb1fd694df2e5",
|
|
342
|
+
"ui/index.html": "3226838b7415beaeb559413195dcd3d53ec779b1cd987dcfc33e89c0405e6a17"
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanqianx/project-knowledge",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.1",
|
|
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": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
89
89
|
"@sanqianx/ai-coding-event-bridge-console": "0.7.5-rc.1",
|
|
90
90
|
"@sanqianx/ai-coding-knowledge-engine": "0.3.4",
|
|
91
|
-
"@sanqianx/ai-coding-workflow": "0.2.
|
|
91
|
+
"@sanqianx/ai-coding-workflow": "0.2.2",
|
|
92
92
|
"@sanqianx/vector-hub": "1.0.8-rc.9",
|
|
93
93
|
"buffer": "^6.0.3",
|
|
94
94
|
"cheerio": "^1.2.0",
|
|
@@ -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.2.
|
|
5
|
+
"version": "5.2.1",
|
|
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');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.2.
|
|
11
|
+
"KB_PLUGIN_VERSION": "5.2.1"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|