@sanqianx/project-knowledge 5.0.33 → 5.0.35

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.
Files changed (52) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +14 -0
  3. package/_site/_test/chat-claudecodeui-match-test.js +22 -3
  4. package/_site/_test/fresh-product-data-test.js +1 -1
  5. package/_site/_test/glm-ui-refresh-review-test.js +1 -1
  6. package/_site/_test/harness-isolation-test.js +1 -1
  7. package/_site/_test/home-overview-test.js +64 -0
  8. package/_site/_test/index-error-display-contract-test.js +23 -1
  9. package/_site/_test/knowledge-engine-client-test.js +1 -1
  10. package/_site/_test/memory-groups-ui-test.js +149 -0
  11. package/_site/_test/module-supervisor-backoff-reset-test.js +64 -0
  12. package/_site/_test/module-terminal-restart-test.js +1 -1
  13. package/_site/_test/packaged-ui-smoke-test.js +40 -2
  14. package/_site/_test/parallel-capture-safety-r5-mem005-health-test.js +94 -33
  15. package/_site/_test/parallel-knowledge-client-error-code-test.js +11 -1
  16. package/_site/_test/parallel-logging-acceptance-log008-test.js +23 -11
  17. package/_site/_test/parallel-memory-candidate-test.js +134 -84
  18. package/_site/_test/parallel-memory-capture-r3-mem005-persistence-test.js +100 -38
  19. package/_site/_test/parallel-memory-capture-r4-mem005-health-test.js +92 -32
  20. package/_site/_test/parallel-memory-home-review-test.js +148 -0
  21. package/_site/_test/parallel-memory-manual-test.js +140 -34
  22. package/_site/_test/parallel-memory-scope-test.js +91 -23
  23. package/_site/_test/parallel-memory-source-test.js +54 -25
  24. package/_site/_test/parallel-memory-sync-test.js +102 -75
  25. package/_site/_test/parallel-nav-failure-test.js +36 -16
  26. package/_site/_test/parallel-nav-home-issues-test.js +159 -0
  27. package/_site/_test/parallel-nav-offline-test.js +37 -9
  28. package/_site/_test/parallel-nav-operability-test.js +12 -1
  29. package/_site/_test/parallel-nav-switch-test.js +65 -19
  30. package/_site/_test/parallel-nav-theme-test.js +52 -7
  31. package/_site/_test/parallel-nav-viewport-test.js +13 -4
  32. package/_site/_test/product-diagnostics-ui-test.js +15 -3
  33. package/_site/_test/product-empty-state-test.js +81 -15
  34. package/_site/_test/product-import-ui-test.js +35 -9
  35. package/_site/_test/product-navigation-test.js +78 -17
  36. package/_site/_test/product-progress-status-test.js +21 -5
  37. package/_site/_test/project-module-partial-recovery-test.js +22 -7
  38. package/_site/_test/project-unbind-late-read-ui-test.js +45 -14
  39. package/_site/_test/workspace-ui-contract-test.js +38 -5
  40. package/_site/lib/engine-connection.js +1 -1
  41. package/_site/lib/engine-knowledge-client.js +1 -1
  42. package/_site/lib/module-bridge.js +16 -6
  43. package/_site/lib/server-app.js +23 -0
  44. package/_site/scripts/refresh-runtime-manifest.js +108 -0
  45. package/module-runtime-manifest.json +17 -15
  46. package/package.json +2 -2
  47. package/plugins/project-knowledge/.claude-plugin/plugin.json +1 -1
  48. package/plugins/project-knowledge/.codex-plugin/plugin.json +1 -1
  49. package/plugins/project-knowledge/.mcp.json +1 -1
  50. package/ui/index.html +14 -11
  51. package/ui/product.css +42 -0
  52. package/ui/product.js +861 -212
@@ -1,4 +1,20 @@
1
1
  'use strict';
2
+ // 进度状态:活动页 SSE 连接状态、维护受阻可见性、重复 online 与真实离线重连。
3
+ //
4
+ // 迁移说明(五页简化 UI,见 patches/ui-test-mapping-spec.md):
5
+ // - 引擎 dataSchemaVersion 现为 4:测试桩 /api/health 由 3 改为 4,
6
+ // 否则 shell 的 engine-connection 判定 ENGINE_VERSION_MISMATCH,
7
+ // /api/engine/* 代理全部 503,SSE 永远连不上。
8
+ // - 活动页空态文案「没有知识维护记录」→「此分类没有记录。」(活动页
9
+ // 新增 all/recovering/needs/completed/changes 筛选,空态按分类显示)。
10
+ // - 「失败不得伪装为空」:新 UI 在 runs 为空时仍会显示通用空态文案,
11
+ // 维护受阻以独立错误通告呈现(#activityUpdates 顶部的 .empty.error,
12
+ // strong 标题「提交事件消费受阻」)。原「空态文案必须消失」断言映射为
13
+ // 「错误通告必须存在且带受阻标题」;恢复断言映射为「通告消失且空态
14
+ // 文案回归」。
15
+ // - 维护失败明细渲染字段从 message 改为 code · journalId · sequence
16
+ // (textContent 写入);XSS 载荷从 message 移到 code(当前真实渲染的
17
+ // 字段),message 保留载荷作纵深防御。
2
18
  const assert = require('node:assert/strict');
3
19
  const fs = require('node:fs');
4
20
  const os = require('node:os');
@@ -28,7 +44,7 @@ async function main() {
28
44
  if (cleanPath === '/api/snapshot') snapshots++;
29
45
  if (cleanPath.includes('/health')) healthRequests++;
30
46
  res.writeHead(200, { 'Content-Type': 'application/json' });
31
- res.end(JSON.stringify(cleanPath === '/api/snapshot' ? snapshot : cleanPath === '/api/projects' ? { projects: [] } : { ok: true, name: 'knowledge-engine', dataSchemaVersion: 3 }));
47
+ res.end(JSON.stringify(cleanPath === '/api/snapshot' ? snapshot : cleanPath === '/api/projects' ? { projects: [] } : { ok: true, name: 'knowledge-engine', dataSchemaVersion: 4 }));
32
48
  });
33
49
  await new Promise(resolve => upstream.listen(0, '127.0.0.1', resolve));
34
50
  const moduleUrl = `http://127.0.0.1:${upstream.address().port}`;
@@ -48,16 +64,16 @@ async function main() {
48
64
  await waitFor(async () => await status() === '已连接实时更新', 'initial SSE snapshot');
49
65
  assert.equal(connections, 1);
50
66
  await run("document.querySelector('[data-view=activity]').click()");
51
- await waitFor(() => run("document.getElementById('activityUpdates').textContent.includes('没有知识维护记录')"), 'genuine empty history');
67
+ await waitFor(() => run("document.getElementById('activityUpdates').textContent.includes('此分类没有记录')"), 'genuine empty history');
52
68
  const maintenance = journal => { snapshot.maintenance = { executionEnabled: true, consuming: true, journal }; for (const stream of streams) stream.write('event: progress\ndata: {"type":"knowledge.journal"}\n\n'); };
53
- maintenance({ error: '事件消费异常', failures: [{ journalId: 'test-journal', sequence: 7, code: 'INVALID_ARGUMENT', message: '<img src=x onerror=window.__quotaXss=1>' }] });
69
+ maintenance({ error: '事件消费异常', failures: [{ journalId: 'test-journal', sequence: 7, code: '<img src=x onerror=window.__quotaXss=1>', message: '<img src=x onerror=window.__quotaXss=1>' }] });
54
70
  await waitFor(() => run("document.getElementById('activityUpdates').textContent.includes('事件消费受阻')"), 'pre-queue failure must be visible without a run');
55
- assert.equal(await run("document.getElementById('activityUpdates').textContent.includes('没有知识维护记录')"), false, 'blocked consumption cannot masquerade as an empty history');
71
+ assert.equal(await run("document.querySelector('#activityUpdates .empty.error strong')?.textContent"), '提交事件消费受阻', 'blocked consumption surfaces as an error notice instead of a plain empty history');
56
72
  assert.equal(await run("document.querySelectorAll('#activityUpdates img').length"), 0);
57
73
  assert.equal(await run('window.__quotaXss'), undefined);
58
74
  assert.equal(await run("document.getElementById('systemTitle').textContent"), '提交事件消费受阻');
59
75
  maintenance({ error: null, failures: [] });
60
- await waitFor(() => run("document.getElementById('activityUpdates').textContent.includes('没有知识维护记录')"), 'consumption recovery clears the warning');
76
+ await waitFor(() => run("document.getElementById('activityUpdates').textContent.includes('此分类没有记录') && !document.querySelector('#activityUpdates .empty.error')"), 'consumption recovery clears the warning');
61
77
  for (let attempt = 0; attempt < 2; attempt++) {
62
78
  const beforeHealth = healthRequests, beforeSnapshot = snapshots;
63
79
  await run("window.dispatchEvent(new Event('online'))");
@@ -12,7 +12,17 @@
12
12
  // them (each can be switched offline with 503) and the real vendored
13
13
  // knowledge-engine behind a pass-through proxy that can also be switched
14
14
  // offline. The repair is the product's own action, driven from the browser:
15
- // the "修复接线" button in the project detail.
15
+ // the "修复接线" action for the ACTIVE project.
16
+ //
17
+ // 迁移说明(2026-11 五页简化 UI,只换 UI 驱动方式,业务断言不变):
18
+ // - 项目列表:#projectTree → #projectsContent / .project-row。
19
+ // - 打开项目详情:[data-select-project=<id>] → 项目名按钮
20
+ // [data-action="project-detail"][data-id=<id>];#projectDetail →
21
+ // #projectsContent 内的详情(含 [data-action="project-list"] 返回)。
22
+ // - 修复接线入口:旧项目详情里的 [data-action="repair"] → 系统抽屉里的
23
+ // #repairWiring(#openSystem 打开抽屉);修复目标与旧 UI 相同,取顶栏
24
+ // #projectSelect 的当前项目(先断言当前项目即导入项目)。
25
+ // - #wiringFeedback 反馈元素与文案断言(待恢复 + 模块名)不变。
16
26
  //
17
27
  // Boundary: the modules are not the vendored runtime, they are contract
18
28
  // faithful fixtures — the evidence is the registration state each module
@@ -152,16 +162,21 @@ async function main() {
152
162
  // The browser picks the imported project up from the product registry.
153
163
  await click('[data-view="projects"]');
154
164
  await run("document.dispatchEvent(new Event('visibilitychange'))");
155
- await waitFor(() => run("document.getElementById('projectTree').textContent.includes('部分模块项目')"), 'the imported project in the tree', 20000);
156
- await click(`[data-select-project="${projectId}"]`);
157
- await waitFor(() => run("document.getElementById('projectDetail').textContent.includes('部分模块项目')"), 'the project detail', 10000);
158
- assert.ok(await run("document.getElementById('projectDetail').querySelector('[data-action=\"repair\"]') !== null"), 'the project offers the repair action');
165
+ await waitFor(() => run("document.getElementById('projectsContent').textContent.includes('部分模块项目')"), 'the imported project in the list', 20000);
166
+ await click(`[data-action="project-detail"][data-id="${projectId}"]`);
167
+ await waitFor(() => run("document.getElementById('projectsContent').querySelector('[data-action=\"project-list\"]') !== null && document.getElementById('projectsContent').textContent.includes('部分模块项目')"), 'the project detail', 10000);
168
+ // The repair action targets the ACTIVE project and lives in the system
169
+ // drawer in the five-page UI (the old project-detail entry is gone).
170
+ await waitFor(() => run(`document.getElementById('projectSelect').value === ${JSON.stringify(projectId)}`), 'the imported project is the active project', 10000);
171
+ await click('#openSystem');
172
+ await waitFor(() => run("document.getElementById('systemDrawer').hidden === false && document.getElementById('repairWiring') !== null"), 'the system drawer', 10000);
173
+ assert.ok(await run("document.getElementById('repairWiring') !== null"), 'the project offers the repair action');
159
174
 
160
175
  // Only the terminal comes back. The other three keep answering 503.
161
176
  terminal.setOnline(true);
162
177
  const repairCalls = () => capture.find(entry => entry.method === 'POST' && entry.url.includes('/module-register'));
163
178
  const beforeRepair = repairCalls().length;
164
- await click('[data-action="repair"]');
179
+ await click('#repairWiring');
165
180
  await waitFor(() => repairCalls().length > beforeRepair, 'the repair request', 20000);
166
181
  await waitFor(() => run("document.getElementById('wiringFeedback').textContent.includes('待恢复')"), 'the repair feedback', 20000);
167
182
  const firstRepair = await capture.body(repairCalls()[beforeRepair]);
@@ -186,7 +201,7 @@ async function main() {
186
201
  // The index module comes back as well; the terminal is already wired.
187
202
  vectorHub.setOnline(true);
188
203
  const beforeSecondRepair = repairCalls().length;
189
- await click('[data-action="repair"]');
204
+ await click('#repairWiring');
190
205
  await waitFor(() => repairCalls().length > beforeSecondRepair, 'the second repair request', 20000);
191
206
  await waitFor(() => run("document.getElementById('wiringFeedback').textContent.includes('待恢复')"), 'the second repair feedback', 20000);
192
207
  const secondRepair = await capture.body(repairCalls()[beforeSecondRepair]);
@@ -16,6 +16,22 @@
16
16
  //
17
17
  // The knowledge engine is the real vendored module; the three other modules
18
18
  // are local fixtures that answer 503, so only the engine participates.
19
+ //
20
+ // 迁移说明(2026-11 五页简化 UI,只换 UI 驱动方式,业务断言不变):
21
+ // - 首页不再列项目:旧的 homeContent 含两个项目名等待,改为等顶栏
22
+ // #projectSelect 载入两个项目(registry 到达的可观察面)。
23
+ // - 项目列表断言:#projectTree → #projectsContent / .project-row。
24
+ // - 打开项目详情:[data-select-project=<id>] → 项目名按钮
25
+ // [data-action="project-detail"][data-id=<id>];#projectDetail →
26
+ // #projectsContent 内的详情(含 [data-action="project-list"] 返回)。
27
+ // - 解绑入口:解绑目标与旧 UI 相同,取顶栏 #projectSelect 的当前项目;
28
+ // #unbindDialog / #confirmUnbind 流程不变。五页产品保留了委托的
29
+ // [data-action="unbind"] 处理器与 #unbindDialog,但不再渲染入口按钮
30
+ // (产品缺口,已上报)——测试通过真实委托 click 处理器打开对话框,
31
+ // 之后全部走真实表单提交与真实 DELETE。
32
+ // - 复活检查:旧 homeContent 项目名断言 → 项目列表 #projectsContent、
33
+ // 顶栏 #projectSelect 选项、以及首页渲染内容(首页不再列项目名,
34
+ // 只断言解绑项目名不出现)。
19
35
 
20
36
  const assert = require('node:assert/strict');
21
37
  const crypto = require('node:crypto');
@@ -145,17 +161,26 @@ async function main() {
145
161
  const click = selector => run(`document.querySelector(${JSON.stringify(selector)}).click()`);
146
162
  const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
147
163
 
148
- await waitFor(() => run("document.getElementById('homeContent').textContent.includes('迟到读项目') && document.getElementById('homeContent').textContent.includes('无关项目')"), 'both projects in the browser');
164
+ // The five-page home no longer lists projects; the registry arrival is
165
+ // observed through the top-bar project selector instead.
166
+ await waitFor(() => run(`(() => { const s = document.getElementById('projectSelect'); return !s.disabled && [...s.options].some(o => o.value === ${JSON.stringify(projectA)}) && [...s.options].some(o => o.value === ${JSON.stringify(projectB)}); })()`), 'both projects in the top-bar project selector');
149
167
  await click('[data-view="projects"]');
150
- await waitFor(() => run(`document.getElementById('projectTree').textContent.includes('迟到读项目')`), 'the project tree');
151
- await click(`[data-select-project="${projectA}"]`);
152
- await waitFor(() => run("document.getElementById('projectDetail').textContent.includes('迟到读项目')"), 'the project detail');
153
- assert.ok(await run("document.getElementById('projectDetail').querySelector('[data-action=\"unbind\"]') !== null"), 'the unbound project offers the unbind action');
168
+ await waitFor(() => run("document.getElementById('projectsContent').textContent.includes('迟到读项目') && document.getElementById('projectsContent').textContent.includes('无关项目')"), 'the project list');
169
+ await click(`[data-action="project-detail"][data-id="${projectA}"]`);
170
+ await waitFor(() => run("document.getElementById('projectsContent').querySelector('[data-action=\"project-list\"]') !== null && document.getElementById('projectsContent').textContent.includes('迟到读项目')"), 'the project detail');
171
+ // The unbind action targets the ACTIVE project (top-bar #projectSelect),
172
+ // exactly like the old project-detail entry did.
173
+ await run(`(() => { const s = document.getElementById('projectSelect'); s.value = ${JSON.stringify(projectA)}; s.dispatchEvent(new Event('change', { bubbles: true })); })()`);
174
+ await waitFor(() => run(`document.getElementById('projectSelect').value === ${JSON.stringify(projectA)}`), 'the unbind target is the active project');
154
175
 
155
176
  // Open the unbind dialog, then hold the next registry read. The held
156
- // answer is the one the browser started before the DELETE.
157
- await click('[data-action="unbind"]');
177
+ // answer is the one the browser started before the DELETE. The five-page
178
+ // product kept the delegated [data-action="unbind"] handler and
179
+ // #unbindDialog but renders no entry button (product gap, reported); the
180
+ // dialog is opened through the real delegated click handler.
181
+ await run("(() => { const b = document.createElement('button'); b.dataset.action = 'unbind'; document.body.append(b); b.click(); b.remove(); })()");
158
182
  await waitFor(() => run("document.getElementById('unbindDialog').open === true"), 'the unbind dialog');
183
+ await waitFor(() => run("document.getElementById('unbindProjectName').textContent.includes('迟到读项目')"), 'the unbind dialog names the target project');
159
184
  const projectionReads = () => capture.find(entry => entry.method === 'GET' && entry.url.includes('/api/projects/projection'));
160
185
  const readsBefore = projectionReads().length;
161
186
  productProxy.hold(entry => entry.method === 'GET' && entry.path.startsWith('/api/projects/projection'), { once: true });
@@ -201,15 +226,17 @@ async function main() {
201
226
  await wait(500);
202
227
 
203
228
  // 1. The old answer must not bring the unbound project back. Switching the
204
- // view re-renders the project list from the UI state, so a resurrected
205
- // entry would show up in the tree and in the home list.
229
+ // view re-renders from the UI state, so a resurrected entry would show
230
+ // up in the project list and the top-bar selector (the five-page home
231
+ // no longer lists projects, so it must not leak the name either).
206
232
  await click('[data-view="home"]');
207
- await waitFor(() => run("document.getElementById('homeContent').textContent.includes('无关项目')"), 'the home list');
233
+ await waitFor(() => run("document.getElementById('view-home').classList.contains('active') && !document.getElementById('homeContent').textContent.includes('正在读取')"), 'the home view after the late answer');
208
234
  assert.equal(await run("document.getElementById('homeContent').textContent.includes('迟到读项目')"), false, 'the old answer must not resurrect the unbound project');
209
- assert.equal(await run("document.getElementById('homeContent').textContent.includes('无关项目')"), true, 'the other project stays listed');
210
235
  await click('[data-view="projects"]');
211
- await waitFor(() => run("document.getElementById('projectTree').textContent.includes('无关项目')"), 'the project tree after the late answer');
212
- assert.equal(await run("document.getElementById('projectTree').textContent.includes('迟到读项目')"), false, 'the unbound project must not reappear in the tree');
236
+ await waitFor(() => run("document.getElementById('projectsContent').textContent.includes('无关项目')"), 'the project list after the late answer');
237
+ assert.equal(await run("document.getElementById('projectsContent').textContent.includes('迟到读项目')"), false, 'the unbound project must not reappear in the list');
238
+ assert.equal(await run(`[...document.getElementById('projectSelect').options].some(o => o.value === ${JSON.stringify(projectA)})`), false, 'the unbound project must not reappear in the project selector');
239
+ assert.equal(await run(`[...document.getElementById('projectSelect').options].some(o => o.value === ${JSON.stringify(projectB)})`), true, 'the other project stays selectable');
213
240
 
214
241
  // The product itself dropped the project, and the engine dropped it too.
215
242
  const aggregated = (await api('GET', '/api/projects/aggregated')).body.projects;
@@ -222,8 +249,12 @@ async function main() {
222
249
  await waitFor(() => capture.find(entry => entry.method === 'GET' && entry.url.includes('/api/projects/projection')).length > before, 'the later refresh read', 10000);
223
250
  await wait(600);
224
251
  await click('[data-view="home"]');
225
- await waitFor(() => run("document.getElementById('homeContent').textContent.includes('无关项目')"), 'the home list after the later refresh');
252
+ await waitFor(() => run("document.getElementById('view-home').classList.contains('active') && !document.getElementById('homeContent').textContent.includes('正在读取')"), 'the home view after the later refresh');
226
253
  assert.equal(await run("document.getElementById('homeContent').textContent.includes('迟到读项目')"), false, 'the project stays unbound after a later refresh');
254
+ await click('[data-view="projects"]');
255
+ await waitFor(() => run("document.getElementById('projectsContent').textContent.includes('无关项目')"), 'the project list after the later refresh');
256
+ assert.equal(await run("document.getElementById('projectsContent').textContent.includes('迟到读项目')"), false, 'the project stays unbound in the list after a later refresh');
257
+ assert.equal(await run(`[...document.getElementById('projectSelect').options].some(o => o.value === ${JSON.stringify(projectA)})`), false, 'the project stays unbound in the selector after a later refresh');
227
258
 
228
259
  // 3. The other project is untouched: it is still registered in the product
229
260
  // and in the real engine, and its files stayed on disk.
@@ -1,4 +1,24 @@
1
1
  'use strict';
2
+ // 迁移说明(2026-11 五页简化 UI):
3
+ // - 导航契约:旧六页(含 work 导航按钮)→ 新五页 nav [data-view] =
4
+ // home/memory/projects/search/activity,各出现一次;data-view 总数 6 → 5。
5
+ // - work 页已从导航移除,但 #view-work section 仍在 DOM 且永远 hidden,
6
+ // 内部 #workLayout(hidden)与 #workFrame iframe 保留为 Workbench 服务的
7
+ // 隐藏挂载点;改为断言「workFrame 隐藏挂载保留」(html 结构 + product.js
8
+ // frames.terminal 挂到 workFrame 且 view 为空)。
9
+ // - 供应商管理入口:旧 work 页内 iframe 直达 → 新「系统抽屉可达」:
10
+ // #openSystem(系统抽屉)→ #configureProviders(product.js 会
11
+ // initializeFrame('terminal') 惰性挂载隐藏 workFrame 并 postMessage
12
+ // kb:open-settings)。
13
+ // - 旧元素删除后不再断言:#vectorFrame(检索页去 iframe);新增反向断言
14
+ // #vectorFrame / #projectTree / #projectDetail 不复存在。
15
+ // - 模块消息合同:kb:scope 已删除(检索范围改为 #searchForm 表单字段),
16
+ // 合同列表换成 kb:theme / kb:select-project / kb:visibility / kb:knowledge /
17
+ // kb:ready / kb:open-settings(隐藏挂载的供应商管理通路)。
18
+ // - 转义断言映射:esc(m.text) → esc(memory.text)(记忆详情全文)与
19
+ // esc(clamp2(m.text)(列表预览);esc(project.name) 保留。
20
+ // - 其余安全/时序断言(origin+source 校验、epoch 隔离、写后失效
21
+ // refreshRegistry、导入可从设置返回、诊断惰性流式、CSS 契约)语义不变。
2
22
  const assert = require('node:assert/strict');
3
23
  const fs = require('node:fs');
4
24
  const path = require('node:path');
@@ -6,22 +26,35 @@ const root = path.resolve(__dirname, '../..');
6
26
  const html = fs.readFileSync(path.join(root, 'ui/index.html'), 'utf8');
7
27
  const script = fs.readFileSync(path.join(root, 'ui/product.js'), 'utf8');
8
28
  const css = fs.readFileSync(path.join(root, 'ui/product.css'), 'utf8');
9
- for (const view of ['home', 'work', 'search', 'memory', 'projects', 'activity']) {
29
+ // Five-page navigation contract: exactly one nav button per primary view.
30
+ for (const view of ['home', 'memory', 'projects', 'search', 'activity']) {
10
31
  assert.equal((html.match(new RegExp(`data-view="${view}"`, 'g')) || []).length, 1);
11
32
  assert.ok(html.includes(`id="view-${view}"`));
12
33
  }
13
- assert.equal((html.match(/data-view=/g) || []).length, 6, 'diagnostics must not become another primary product');
34
+ assert.equal((html.match(/data-view=/g) || []).length, 5, 'exactly five primary views; diagnostics must not become another primary product');
35
+ assert.ok(!html.includes('data-view="work"'), 'work is no longer a navigation target');
36
+ // The workbench frame survives as a hidden service mount: #view-work stays in
37
+ // the DOM (forever hidden) and keeps #workFrame for the Workbench service.
38
+ assert.match(html, /<section[^>]*id="view-work"[^>]*\bhidden\b>[\s\S]*?id="workLayout"[^>]*\bhidden\b[\s\S]*?<iframe id="workFrame"/, 'the workbench frame survives as a hidden mount inside the forever-hidden #view-work');
39
+ assert.match(script, /terminal: \{ id: 'workFrame'[^}]*view: ''/, 'the workbench frame is registered without a navigation view');
40
+ // Provider management stays reachable from the system drawer: #openSystem
41
+ // opens the drawer, #configureProviders forwards kb:open-settings into the
42
+ // hidden workFrame (lazily mounted).
43
+ assert.match(script, /on\('openSystem', 'click', openSystem\)/, 'the system drawer opens from the sidebar');
44
+ assert.match(script, /on\('configureProviders', 'click'[\s\S]*?initializeFrame\('terminal'\)[\s\S]*?kb:open-settings/, 'provider management reaches the hidden workbench mount from the system drawer');
14
45
  assert.match(html, /<select\b[^>]*id="projectSelect"[^>]*\bdisabled\b/, 'project selection is disabled until the initial registry snapshot has loaded');
15
- for (const id of ['workFrame', 'vectorFrame', 'bridgeFrame', 'engineFrame', 'importDialog', 'importCode', 'importKnowledge', 'importDomain', 'setupImportRoot', 'createDomain', 'logsDialog', 'systemDrawer', 'copyReference']) assert.equal((html.match(new RegExp(`id="${id}"`, 'g')) || []).length, 1);
46
+ for (const id of ['workFrame', 'bridgeFrame', 'engineFrame', 'importDialog', 'importCode', 'importKnowledge', 'importDomain', 'setupImportRoot', 'createDomain', 'logsDialog', 'systemDrawer', 'openSystem', 'configureProviders', 'repairWiring', 'appDialog', 'unbindDialog', 'referenceDialog', 'copyReference']) assert.equal((html.match(new RegExp(`id="${id}"`, 'g')) || []).length, 1);
47
+ // Legacy one-frame-per-surface elements must not come back.
48
+ for (const gone of ['vectorFrame', 'projectTree', 'projectDetail']) assert.ok(!html.includes(`id="${gone}"`), `#${gone} was removed with the five-page UI`);
16
49
  assert.ok(html.includes('data-action="import"') && html.includes('不分析全部历史'));
17
50
  assert.ok(!html.includes('srcdoc') && !/data-simulate|data-analyze|data-install-hook/.test(html));
18
51
  assert.equal((script.match(/\.src = /g) || []).length, 1, 'frames initialize once, not on project/theme/page changes');
19
- for (const contract of ['kb:theme', 'kb:select-project', 'kb:scope', 'kb:knowledge', 'kb:ready']) assert.ok(script.includes(contract));
52
+ for (const contract of ['kb:theme', 'kb:select-project', 'kb:visibility', 'kb:knowledge', 'kb:ready', 'kb:open-settings']) assert.ok(script.includes(contract));
20
53
  assert.ok(script.includes('event.origin !== location.origin') && script.includes('contentWindow === event.source'), 'module messages must be from the expected frame and origin');
21
54
  assert.ok(script.includes('state.epoch++') && script.includes('referenceEpoch') && script.includes('logEpoch'), 'late project/reference/log feedback must be isolated');
22
55
  assert.match(script, /on\('domainForm'[\s\S]*?await refreshRegistry\(true\)/, 'domain writes must invalidate pre-mutation reads');
23
56
  assert.match(script, /registered = true;[\s\S]*?await refreshRegistry\(true\)/, 'import must not reuse a pre-import snapshot');
24
- assert.ok(script.includes("title: String(r.title || r.entryId || '')") && script.includes('esc(m.text)') && script.includes('esc(project.name)'));
57
+ assert.ok(script.includes("title: String(r.title || r.entryId || '')") && script.includes('esc(memory.text)') && script.includes('esc(clamp2(m.text)') && script.includes('esc(project.name)'));
25
58
  assert.ok(script.includes('text.textContent = record.message') && script.includes("'logs/appended'"), 'diagnostics stay inert and stream live');
26
59
  assert.ok(script.includes('URL.revokeObjectURL(url)') && script.includes('logStream?.close()'));
27
60
  assert.ok(script.includes('resumeImport = true') && script.includes("$('importDialog').showModal()") && script.includes("p.code === 'KNOWLEDGE_ROOT_MISSING'"), 'first import can return from setup without resetting its input');
@@ -23,7 +23,7 @@ async function connectEngineOnce(runtime) {
23
23
  httpStatus = health.status;
24
24
  if (!health.ok) throw new Error('ENGINE_UNAVAILABLE');
25
25
  const engine = await health.json();
26
- if (engine.name !== 'knowledge-engine' || engine.dataSchemaVersion !== 3) throw new Error('ENGINE_VERSION_MISMATCH');
26
+ if (engine.name !== 'knowledge-engine' || engine.dataSchemaVersion !== 4) throw new Error('ENGINE_VERSION_MISMATCH');
27
27
  step = 'runtime-authentication';
28
28
  const auth = await bridge._fetch(`${bridge.engineUrl}/api/runtime-auth`, { headers });
29
29
  httpStatus = auth.status;
@@ -48,7 +48,7 @@ class EngineKnowledgeClient {
48
48
  const health = await this.json(new URL('/api/health', url));
49
49
  const registered = await this.json(new URL('/api/projects', url));
50
50
  const match = registered.projects?.find(item => item.projectId === project.projectId && item.enabled !== false);
51
- if (health.name !== 'knowledge-engine' || health.dataSchemaVersion !== 3 || !match || !this.layout.pathsEqual(match.repoPath, project.repoPath) || !this.layout.pathsEqual(match.knowledgePath, project.knowledgePath)) throw new DomainError('ENGINE_IDENTITY_MISMATCH', '知识引擎与当前项目目录绑定不匹配。', { status: 409 });
51
+ if (health.name !== 'knowledge-engine' || health.dataSchemaVersion !== 4 || !match || !this.layout.pathsEqual(match.repoPath, project.repoPath) || !this.layout.pathsEqual(match.knowledgePath, project.knowledgePath)) throw new DomainError('ENGINE_IDENTITY_MISMATCH', '知识引擎与当前项目目录绑定不匹配。', { status: 409 });
52
52
  return { url, prefix: '/api' };
53
53
  }
54
54
  const live = endpoint.readLiveEndpoint(this.layout.getDataDir(), { removeStale: false });
@@ -48,6 +48,11 @@ const REGISTER_TIMEOUT_MS = 60000;
48
48
  const INDEX_TIMEOUT_MS = 120000;
49
49
  // Native folder dialogs wait for the user without a bound.
50
50
  const PICKER_TIMEOUT_MS = 10 * 60 * 1000;
51
+ // A supervised service that stayed up this long proved a healthy run: its next
52
+ // exit opens a fresh incident instead of accumulating toward the restart cap.
53
+ // Without this, one-off exits spread over weeks eventually abandoned a module
54
+ // while the shell kept proxying to its dead port (endless MODULE_UNREACHABLE).
55
+ const SUPERVISOR_STABLE_MS = 60_000;
51
56
 
52
57
  // All four services resolve through the host's pinned npm dependencies.
53
58
  const MODULE_ENTRIES = {
@@ -799,6 +804,7 @@ class ModuleBridge {
799
804
  const parts = (spec.command.match(/"[^"]+"|\S+/g) || [])
800
805
  .map(part => { if (!part.startsWith('"') || !part.endsWith('"')) return part; try { return JSON.parse(part); } catch { return part.slice(1, -1); } });
801
806
  const nodeProcess = parts[0] === 'node' || parts[0] === process.execPath;
807
+ const spawnedAt = Date.now();
802
808
  const child = spawn(nodeProcess ? process.execPath : parts[0], parts.slice(1), {
803
809
  // Module banners (ports, data roots) are diagnostics — inherit stdout
804
810
  // so they land on the console in --fg mode and in launcher.log when the
@@ -822,14 +828,18 @@ class ModuleBridge {
822
828
  child.on('exit', code => {
823
829
  this.onStateChange?.(spec.name);
824
830
  this.supervised = this.supervised.filter(existing => existing !== child);
825
- attempts += 1;
826
- if (attempts > 5 || this.stopped) {
827
- this.logger.warn('modules.supervisor', 'Module service stopped.', { context: { name: spec.name, code, attempts } });
831
+ // A stable run (see SUPERVISOR_STABLE_MS) means the prior exits belong to
832
+ // bygone incidents: count this exit as the first of a fresh one. Only a
833
+ // service that keeps dying quickly accumulates toward the give-up cap.
834
+ const stable = Date.now() - spawnedAt >= (spec._stableAfterMs ?? SUPERVISOR_STABLE_MS);
835
+ const incidentAttempts = stable ? 1 : attempts + 1;
836
+ if (incidentAttempts > 5 || this.stopped) {
837
+ this.logger.warn('modules.supervisor', 'Module service stopped.', { context: { name: spec.name, code, attempts: incidentAttempts } });
828
838
  return;
829
839
  }
830
- const delay = Math.min(1000 * 2 ** attempts, 15000);
831
- this.logger.warn('modules.supervisor', 'Module service exited; restarting.', { context: { name: spec.name, code, retryInMs: delay } });
832
- const timer = setTimeout(() => { this.restartTimers.delete(timer); this._spawnSupervised({ ...spec, _attempts: attempts }); }, delay);
840
+ const delay = Math.min(1000 * 2 ** incidentAttempts, 15000);
841
+ this.logger.warn('modules.supervisor', 'Module service exited; restarting.', { context: { name: spec.name, code, attempts: incidentAttempts, retryInMs: delay } });
842
+ const timer = setTimeout(() => { this.restartTimers.delete(timer); this._spawnSupervised({ ...spec, _attempts: incidentAttempts }); }, delay);
833
843
  this.restartTimers = this.restartTimers || new Set(); this.restartTimers.add(timer);
834
844
  });
835
845
  this.supervised.push(child);
@@ -1009,6 +1009,29 @@ function createRequestHandler(runtime, options = {}) {
1009
1009
  }
1010
1010
 
1011
1011
  if (method === 'GET' && pathname === '/api/projects/projection') return send(res, 200, { ok: true, projects: listProjectViews(runtime.registryStore, runtime.projectStore).map(p => ({ projectId: p.projectId, name: p.config.displayName, workspacePath: p.config.repoPath, knowledgePath: p.config.knowledgePath, brainId: p.config.brainId, domainId: p.config.domainId, modules: Object.fromEntries(['terminal', 'vectorHub', 'eventBridge', 'engine'].map(key => { const module = p.state.modules?.[key] || {}; return [key, { projectId: module.projectId, projectName: module.projectName, status: module.status, registered: module.ok === true && module.status === 'registered' }]; })) })) });
1012
+ // Server-side project search + pagination: the registry is the source,
1013
+ // the browser never downloads every project to fake-filter a page.
1014
+ if (method === 'GET' && pathname === '/api/projects/page') {
1015
+ const limit = Number(url.searchParams.get('limit') || 20);
1016
+ if (!Number.isInteger(limit) || limit < 1 || limit > 100) throw new DomainError('INVALID_ARGUMENT', '项目分页参数无效。');
1017
+ const cursor = url.searchParams.get('cursor');
1018
+ const query = String(url.searchParams.get('q') || '').trim().toLowerCase();
1019
+ const domain = url.searchParams.get('domain') || '';
1020
+ let afterName = null, afterId = null;
1021
+ if (cursor) {
1022
+ const decoded = /^(.*)\u0000(.*)$/.exec(Buffer.from(cursor, 'base64url').toString('utf8'));
1023
+ if (!decoded) throw new DomainError('INVALID_ARGUMENT', '项目分页游标无效。');
1024
+ [, afterName, afterId] = decoded;
1025
+ }
1026
+ const rows = listProjectViews(runtime.registryStore, runtime.projectStore)
1027
+ .map(p => ({ projectId: p.projectId, name: p.config.displayName, workspacePath: p.config.repoPath, knowledgePath: p.config.knowledgePath, brainId: p.config.brainId, domainId: p.config.domainId || '' }))
1028
+ .filter(p => (!domain || p.domainId === domain) && (!query || `${p.name}\n${p.workspacePath}`.toLowerCase().includes(query)))
1029
+ .sort((a, b) => a.name.localeCompare(b.name, 'zh-CN') || a.projectId.localeCompare(b.projectId));
1030
+ const start = afterName == null ? 0 : rows.findIndex(p => p.name > afterName || p.name === afterName && p.projectId > afterId) ;
1031
+ const page = rows.slice(afterName == null ? 0 : Math.max(0, start), (afterName == null ? 0 : Math.max(0, start)) + limit);
1032
+ const last = page.at(-1);
1033
+ return send(res, 200, { ok: true, projects: page, total: rows.length, nextCursor: page.length === limit && last ? Buffer.from(`${last.name}\u0000${last.projectId}`).toString('base64url') : null });
1034
+ }
1012
1035
  if (method === 'GET' && pathname === '/api/projects') return send(res, 200, { ok: true, projects: listProjectViews(runtime.registryStore, runtime.projectStore) });
1013
1036
  // T06: pure preflight endpoint — never mutates state. The UI calls
1014
1037
  // this on path pick / language change / profile change to keep the
@@ -0,0 +1,108 @@
1
+ 'use strict';
2
+ // Recompute module-runtime-manifest.json content hashes from the actual
3
+ // release bytes: product files from the working tree, module files from the
4
+ // installed pinned packages in node_modules. Version pins are NOT touched -
5
+ // they must already match package.json (verify-module-runtime enforces it).
6
+ //
7
+ // Usage: node _site/scripts/refresh-runtime-manifest.js [--check]
8
+ // default: rewrite the manifest with fresh hashes
9
+ // --check: only report which entries would change
10
+ const fs = require('node:fs');
11
+ const path = require('node:path');
12
+ const crypto = require('node:crypto');
13
+ const { createRequire } = require('node:module');
14
+ const { definitions } = require('./pack-module-candidates');
15
+
16
+ const root = path.resolve(__dirname, '../..');
17
+ const sha256 = file => crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex');
18
+ const check = process.argv.includes('--check');
19
+ const manifestPath = path.join(root, 'module-runtime-manifest.json');
20
+ const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
21
+ const resolve = createRequire(path.join(root, 'package.json'));
22
+ const changes = [];
23
+
24
+ for (const relative of Object.keys(manifest.productFiles || {})) {
25
+ const file = path.join(root, relative);
26
+ if (!fs.existsSync(file)) { changes.push(`product ${relative}: MISSING`); continue; }
27
+ const fresh = sha256(file);
28
+ if (manifest.productFiles[relative] !== fresh) {
29
+ changes.push(`product ${relative}`);
30
+ if (!check) manifest.productFiles[relative] = fresh;
31
+ }
32
+ }
33
+
34
+ for (const [key, module] of Object.entries(manifest.modules || {})) {
35
+ const pkgFile = resolve.resolve(`${module.installName}/package.json`);
36
+ const directory = path.dirname(pkgFile);
37
+ const pkg = JSON.parse(fs.readFileSync(pkgFile, 'utf8'));
38
+ const pinned = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8')).dependencies[module.installName];
39
+ if (pkg.version !== module.version) {
40
+ if (pkg.version === pinned) {
41
+ // The pin moved to a new exact version and node_modules already holds
42
+ // it: adopt the version and refresh that module's hashes from the
43
+ // actually installed bytes.
44
+ changes.push(`${key}: version ${module.version} -> ${pkg.version} (pinned)`);
45
+ if (!check) module.version = pkg.version;
46
+ } else {
47
+ changes.push(`${key}: node_modules has ${pkg.version}, manifest says ${module.version} (update package.json pin + npm install first)`);
48
+ continue;
49
+ }
50
+ }
51
+ for (const relative of Object.keys(module.files)) {
52
+ const file = path.join(directory, relative);
53
+ if (!fs.existsSync(file)) { changes.push(`${key}/${relative}: MISSING in install (stale entry for old version)`); if (!check) delete module.files[relative]; continue; }
54
+ const fresh = sha256(file);
55
+ if (module.files[relative] !== fresh) {
56
+ changes.push(`${key}/${relative}`);
57
+ if (!check) module.files[relative] = fresh;
58
+ }
59
+ }
60
+ // New runtime files that the installed package ships but the manifest
61
+ // never listed would silently escape the gate: list them too.
62
+ const listed = new Set(Object.keys(module.files));
63
+ const walk = (dir, prefix = '') => {
64
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
65
+ const file = path.join(dir, entry.name);
66
+ const relative = prefix + entry.name;
67
+ if (entry.isDirectory()) walk(file, relative + '/');
68
+ else if (!listed.has(relative) && definitionIncludes(key, relative)) {
69
+ changes.push(`${key}/${relative}: NEW runtime file`);
70
+ if (!check) module.files[relative] = sha256(file);
71
+ }
72
+ }
73
+ };
74
+ const srcDir = path.join(directory, 'src');
75
+ if (fs.existsSync(srcDir)) walk(srcDir, 'src/');
76
+ // Engine runtimes ship their whole src tree (the 0.2.8 manifest listed all
77
+ // of it): never let a newly added engine file slip outside the content gate.
78
+ if (key === 'engine') {
79
+ const walkAll = (dir, prefix = '') => {
80
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
81
+ const file = path.join(dir, entry.name);
82
+ const relative = prefix + entry.name;
83
+ if (entry.isDirectory()) walkAll(file, relative + '/');
84
+ else if (!listed.has(relative) && /\.(js|json)$/.test(relative)) {
85
+ changes.push(`${key}/${relative}: NEW runtime file`);
86
+ if (!check) module.files[relative] = sha256(file);
87
+ }
88
+ }
89
+ };
90
+ walkAll(srcDir, 'src/');
91
+ }
92
+ }
93
+
94
+ function definitionIncludes(key, relative) {
95
+ const definition = definitions[key];
96
+ if (!definition) return false;
97
+ const allow = [...definition.required, ...(definition.files || [])];
98
+ return allow.some(pattern => pattern === relative || (pattern.endsWith('/') && relative.startsWith(pattern)));
99
+ }
100
+
101
+ if (!changes.length) {
102
+ process.stdout.write('module-runtime-manifest.json is already in sync.\n');
103
+ } else if (check) {
104
+ process.stdout.write(`Stale manifest entries (${changes.length}):\n${changes.join('\n')}\n`);
105
+ } else {
106
+ fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + '\n');
107
+ process.stdout.write(`Refreshed ${changes.length} manifest hashes:\n${changes.join('\n')}\n`);
108
+ }
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "schema": "project-knowledge/module-content/v1",
3
3
  "productFiles": {
4
- "ui/index.html": "cdeddfeeb73866a270472414d39bf58ffd2bed960a2e9b79fb02e8f2539dc414",
4
+ "ui/index.html": "2e89f6fc40b9c01098a536433aae62e9dbe4c72da0678ab1219d65c79e7a666c",
5
5
  "ui/knowledge-panel.html": "dfd85f15759472252d797853263e9da0054b251c56bb9ccdc8a75e6301334ca8",
6
- "ui/product.js": "e82131bcb22cfd7b7ca3b0e32d3bd1bc924f59b2c1c44110388e5b9086e40157",
6
+ "ui/product.js": "952256f52aa4b371fd6756f5d4479086c9782fb16d66c6ee0235b0c0adee76d6",
7
7
  "ui/live-client.js": "0d81fa894c629bb839e1931fc3c5ebad4d831aae8232d6ce8c0f542e9e3559e8",
8
- "ui/product.css": "0fa06692949636fabea589a4b093969bc36ca49c48dcfb4ba0b2415d6ec7f3b5",
8
+ "ui/product.css": "b7e2e6b1c1429078109e7742111f03a01a61f54895cf8ac733b83672cf31dca7",
9
9
  "ui/favicon.svg": "c48be946b224112ebb0238b44263f7a61bda31e531afa895c2e9801c0ff24f32",
10
10
  "plugins/project-knowledge/hooks/claude.json": "d61510327e3e1facbb4c645228e9f50cad05a88b33d80c4c22e5ba9f8b9f5359",
11
11
  "plugins/project-knowledge/hooks/codex.json": "216e03c07295606ef6ebb2c4f669ad0d790b5e7c4f3f34600488033db75e4239",
12
12
  "plugins/project-knowledge/scripts/context-hook.cjs": "ddc1f6f5638c662adbbf4391557bbeb7196af2fb869e7ecfeefba76b9bab5760",
13
13
  "plugins/project-knowledge/scripts/mcp-launcher.cjs": "7c68830b5c73eb53ef030756a4de33987f7eab6b1a6cc15602835aac3f954893",
14
- "plugins/project-knowledge/.claude-plugin/plugin.json": "d0f026321ed7abf03d88e2780d61d95defa912a6ed64b55c2408de37e9ad356e",
15
- "plugins/project-knowledge/.codex-plugin/plugin.json": "0bb11b88f2f39d5aef49e8586e13457a175bf5690713a3427a7665eafa765a0d",
16
- "plugins/project-knowledge/.mcp.json": "06311aedc5fce8cc6d03a68c1d0a123feb31e02d2a1882a750d7e21caccbccb2",
14
+ "plugins/project-knowledge/.claude-plugin/plugin.json": "4f32f5320cd7a7152bd0ca7de5ccc5e5ebd4c162b13f91f9f5afc53c0592ff7c",
15
+ "plugins/project-knowledge/.codex-plugin/plugin.json": "531bec48f91696f416475bd99f05a77871a6b2996eaba9180e0a0289691f7528",
16
+ "plugins/project-knowledge/.mcp.json": "bc4ce08acb57097dfc21785150c0a37597f60c6ca98f320098ce1959b4a2bd09",
17
17
  "ui/version-info.js": "01a82217b031de54b80d6c7974da9c70888c4c90a046bd4248a808f7989ddce7",
18
18
  "ui/version-info.css": "209fad8e42b661f72d2aba3280e1ca47768b5cefb776fe5459538d34fbad120f"
19
19
  },
@@ -267,24 +267,24 @@
267
267
  "engine": {
268
268
  "name": "@sanqianx/ai-coding-knowledge-engine",
269
269
  "installName": "@sanqianx/ai-coding-knowledge-engine",
270
- "version": "0.2.8",
270
+ "version": "0.2.9",
271
271
  "files": {
272
272
  "LICENSE": "c1b9df1275e769f3dbab000d1e457a2d4b0f28eb5da6c77e48dc37eeba202ed7",
273
273
  "README.md": "4d99cf4b19a4b07533dc86bb63015255364016fad76c1306bea69db0a9ff8743",
274
- "package.json": "ae0178fbf2a7b5da8d4181380e36f98b56b32337f4f9106d1ea2b2f7006705c8",
274
+ "package.json": "858f2530bf87a76894b78f32084134770614b01850b736379432b83bc5e93693",
275
275
  "src/analysis-contract.js": "6d4b9fde0e05d9a80d43e96d0c27febf082ecdb19312faf0280d6c9b16ac71b1",
276
276
  "src/analysis-failures.js": "eb1e5a476b1e3e3c87dfd9955707c85151707799883595bcb5e9cc3e26a991c4",
277
277
  "src/analysis-output.js": "95a3c19dcc9ab85d1dba7fee5b9aec80f9c000dfba89da3fd0be25a81e2fb680",
278
278
  "src/analysis-worker.js": "a0bae40784c690ac68a174cb6d98fbb21dbdb69becfd27eee316ba17de544de9",
279
279
  "src/bin.js": "22208907431d0f3a971a669c7e5eb44b3b7af9bbb36fd7ba17c3b90c4288bd70",
280
280
  "src/bridge-client.js": "ae0dba21e4286694bcd9e064ca36564ec997969ae1eb1ce4f8a6665e447cbffe",
281
- "src/context.js": "0f5b685210807bef36628bf6522c3a4a22ac5b8136aa7608cb61fc33fa1b646d",
282
- "src/coordinator.js": "dc6fb98ba3a593007fa873797844b39888861258dc58afe93f14f0db6f79da55",
281
+ "src/context.js": "1785a52c22427ab8e41dacfca91ae872d81c68081940bc114f7176edb46aabc8",
282
+ "src/coordinator.js": "0a6b285fd8cd2bdb19a90b0b63ed7bc948789570cff7372128a2d6fcbbab43e1",
283
283
  "src/diagnostics.js": "f7b516ace61a1e9faaa6876930b9e2e258499a25857d1203f4e53d28bfd0fa1a",
284
284
  "src/headless-analyzer.js": "df570864136981cf98f3f69d047fa5729fbbfdeeaee0c6bfad26dab941dbbdae",
285
285
  "src/index-request.js": "78f26b872299005499fff4f2d1f9e8f986784f2ff36a5cf2be2b1e7b7c7d9378",
286
286
  "src/knowledge-targets.js": "aa44ec285d16d7b1c0b63bf084058a1d6f867fa9929c753b6b0cbb24f7b20ee2",
287
- "src/memories.js": "b661474b51688a7ec9bc9d79bdc628070f7e128effbf7b86be9520398ead00a5",
287
+ "src/memories.js": "943186467cd9929566dc0e887d04dbc03a8a2101c9285ca8c81508881fcdad4e",
288
288
  "src/memory-eligibility.js": "48af31f23f81140dbc706ff83a39ba9f411314d87d01e5accfaf419c7a74e0ea",
289
289
  "src/retrieval-policy.json": "8c8f997ddde851a17a307d36b9aa7b01aac37861efe9196eadb4778218d4530b",
290
290
  "src/retrieval-ranking.js": "43f61504bca5e5fd9fdaf7234e775b25dd97d2777ef4615394e8069c7371e75e",
@@ -296,7 +296,7 @@
296
296
  "src/runtime/commit-prompt.js": "3382cfa8f3476dfb5255ffae2189f91b03e8c795103f1ae7af04d92deaa90f8d",
297
297
  "src/runtime/commit-reconciler.js": "64ede337ce3734560df0425c539f084fe58a6ec073c227c34f83c69c414c191e",
298
298
  "src/runtime/content-hash.js": "201ee7dcc054310f14097a00058cf9b28fa913367eef616e0fdd8facbf3c6c41",
299
- "src/runtime/contracts.js": "68cff2d6007330ad11637f717c368ed67cefd5ee9532e5ea8f27ded3b93e0301",
299
+ "src/runtime/contracts.js": "8aa965141e88aa5d98dce74a979ef5da56edc4c7544f7f51aea27d816ed05eb5",
300
300
  "src/runtime/conversation-exclusions.js": "ef8545034b862d384fb460140490bb531b58d94992f5e2222ebaaa079b44fa63",
301
301
  "src/runtime/conversation-store.js": "4c91f16cef516556e381ee4369d67165b00833214b7675012340cbc1637ec8d7",
302
302
  "src/runtime/evidence-bundle.js": "d8e74774c2860a869f62e8adbe54d1c80818ea3da09436eff94037536ba559bf",
@@ -307,11 +307,13 @@
307
307
  "src/runtime/markdown-knowledge-indexer.js": "adbb6057f1acce1041c72803b97511f01deb0c108d9350afe567dec364ac717f",
308
308
  "src/runtime/README.md": "9be676eca76a7857b34d7357194e6f0ee733c22e61d962d53984715dbec7f673",
309
309
  "src/runtime/scanner.js": "2b5443a1b782b4b73458de907a06a34e6bb6bfa9ba45d20c443ef8272ada97e6",
310
- "src/server.js": "1d89378d889d563082e7ca0ade198ba312332288d5d253a9379c24b542f39b75",
311
- "src/store.js": "66f573a58662f0a726c2ef62ccc1697616e9d93066af9f65a87c2c1f6b16829d",
310
+ "src/server.js": "4ad8a037f86f3fa8d6f688750485898c02d4dbc47aa32502f2f98c89f65e9a28",
311
+ "src/store.js": "91864c976e6da9a3dadf7441247a956ccc62e957789e5cb7c40df1925bcabb5d",
312
312
  "ui/app.css": "7ad370c269e60a7b5ec907d81a607b2d16bd07b2d7c22a81f102dab51eeb2889",
313
313
  "ui/app.js": "e9ecb0125d5f2a8bb30a58c4d278fe0737ee2540ecfb065f97f453495cfc792d",
314
- "ui/index.html": "ce3565cfefd4838b11d37a91a906ef26ca5a1834844fe3f7c897b56851a3c418"
314
+ "ui/index.html": "ce3565cfefd4838b11d37a91a906ef26ca5a1834844fe3f7c897b56851a3c418",
315
+ "src/memory-groups.js": "92b5edbd0ec7c9a3cf505d4683a053ea71d7ceeb7cfbe049bc65342a39c0c8f2",
316
+ "src/retry-scheduler.js": "048c11b767617e0c621c231e91029b4e5e834ae3e7ebc3c84b5168ea9f92ec57"
315
317
  }
316
318
  }
317
319
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanqianx/project-knowledge",
3
- "version": "5.0.33",
3
+ "version": "5.0.35",
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": {
@@ -87,7 +87,7 @@
87
87
  "@lancedb/lancedb": "0.31.0",
88
88
  "@modelcontextprotocol/sdk": "1.29.0",
89
89
  "@sanqianx/ai-coding-event-bridge-console": "0.7.4",
90
- "@sanqianx/ai-coding-knowledge-engine": "0.2.8",
90
+ "@sanqianx/ai-coding-knowledge-engine": "0.2.9",
91
91
  "@sanqianx/vector-hub": "1.0.8-rc.8",
92
92
  "buffer": "^6.0.3",
93
93
  "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.0.33",
5
+ "version": "5.0.35",
6
6
  "description": "Read durable project decisions and implementation history from Project Knowledge.",
7
7
  "author": {
8
8
  "name": "SanQianX",