@sanqianx/project-knowledge 5.1.1 → 5.1.3

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 (28) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/README.md +2 -2
  3. package/_site/_test/capture-hook-dedup-test.js +1 -1
  4. package/_site/_test/fresh-product-data-test.js +1 -1
  5. package/_site/_test/helpers/cdp-browser.js +4 -1
  6. package/_site/_test/helpers/parallel-dock-acceptance-r2-env.js +1 -1
  7. package/_site/_test/helpers/parallel-dock-isolation-r3-fixture.js +1 -1
  8. package/_site/_test/helpers/parallel-memory-injection-shell.js +1 -1
  9. package/_site/_test/helpers/parallel-retrieval-followup-r2-shell.js +1 -1
  10. package/_site/_test/helpers/parallel-workbench-drafts-r5-fixture.js +1 -1
  11. package/_site/_test/helpers/parallel-workbench-fixture.js +1 -1
  12. package/_site/_test/helpers/parallel-workbench-integration-5025-fixture.js +1 -1
  13. package/_site/_test/helpers/qa-r44-env.js +2 -2
  14. package/_site/_test/integration-runtime-binding-a2-test.js +2 -2
  15. package/_site/_test/integration-runtime-binding-test.js +3 -3
  16. package/_site/_test/launcher-readiness-test.js +1 -1
  17. package/_site/_test/run-all-tests.js +26 -3
  18. package/_site/lib/data-dir.js +1 -1
  19. package/_site/lib/engine-connection.js +2 -1
  20. package/_site/lib/engine-knowledge-client.js +1 -1
  21. package/bin/project-knowledge.js +1 -1
  22. package/module-runtime-manifest.json +14 -13
  23. package/package.json +2 -2
  24. package/plugins/project-knowledge/.claude-plugin/plugin.json +1 -1
  25. package/plugins/project-knowledge/.codex-plugin/plugin.json +1 -1
  26. package/plugins/project-knowledge/.mcp.json +2 -2
  27. package/plugins/project-knowledge/scripts/context-hook.cjs +1 -1
  28. package/plugins/project-knowledge/scripts/mcp-launcher.cjs +1 -1
@@ -9,7 +9,7 @@
9
9
  "plugins": [
10
10
  {
11
11
  "name": "project-knowledge",
12
- "version": "5.1.1",
12
+ "version": "5.1.3",
13
13
  "source": "./plugins/project-knowledge",
14
14
  "description": "Search durable project decisions and implementation history through MCP."
15
15
  }
package/README.md CHANGED
@@ -200,7 +200,7 @@ new empty knowledge directories. Old files remain untouched but are not read.
200
200
  See [fresh v5 setup](docs/fresh-v5-start.md). Queued tasks can be cancelled by
201
201
  unbinding; only an active knowledge/index writer blocks removal.
202
202
 
203
- Default internal data directory: `~/.project-knowledge-v5/`
203
+ Default internal data directory: `~/.project-knowledge/`
204
204
 
205
205
  Override it with `KB_DATA_DIR`:
206
206
 
@@ -224,7 +224,7 @@ Settings, registration metadata, caches, runtime state, logs, and recovery
224
224
  assets remain in the internal data directory; vector payloads do not:
225
225
 
226
226
  ```text
227
- ~/.project-knowledge-v5/
227
+ ~/.project-knowledge/
228
228
  ├── settings.json
229
229
  ├── projects.json # minimal project ID/order index
230
230
  ├── projects/<projectId>/
@@ -13,7 +13,7 @@ const ROOT = path.resolve(__dirname, '../..');
13
13
  const TEMP = fs.mkdtempSync(path.join(os.tmpdir(), 'pk-capture-dedup-'));
14
14
  const HOME = path.join(TEMP, '用户 空格');
15
15
  const OLD = path.join(HOME, '.ai-coding-event-bridge');
16
- const CURRENT = path.join(HOME, '.project-knowledge-v5/events');
16
+ const CURRENT = path.join(HOME, '.project-knowledge/events');
17
17
  const options = { homeDir: HOME, bridgeHomeDir: CURRENT };
18
18
  const shim = home => path.join(home, 'bin/bridge-hook.cjs');
19
19
  const cmd = home => ({ type: 'command', command: `node "${shim(home)}"` });
@@ -8,7 +8,7 @@ const { connectEngine } = require('../lib/engine-connection');
8
8
 
9
9
  (async () => {
10
10
  const root = fs.mkdtempSync(path.join(os.tmpdir(), 'kb-fresh-product-'));
11
- assert.equal(resolveDataDirPath({ dataDir: '', homeDir: root }), path.join(root, '.project-knowledge-v5'));
11
+ assert.equal(resolveDataDirPath({ dataDir: '', homeDir: root }), path.join(root, '.project-knowledge'));
12
12
  const old = path.join(root, 'old'); fs.mkdirSync(old);
13
13
  const bytes = JSON.stringify({ projects: ['old-project'], activeClaim: 'old-claim' });
14
14
  fs.writeFileSync(path.join(old, 'projects.json'), bytes);
@@ -16,7 +16,10 @@ function wait(ms) {
16
16
  return new Promise(resolve => setTimeout(resolve, ms));
17
17
  }
18
18
 
19
- async function waitFor(fn, label, timeoutMs = 15000) {
19
+ // 25s default: the 2026-11 CI runner image is slow enough that dialog opens
20
+ // exceeded 15s while the assertions themselves stayed correct; the budget is
21
+ // a ceiling, not a delay — passing calls return immediately.
22
+ async function waitFor(fn, label, timeoutMs = 25000) {
20
23
  const deadline = Date.now() + timeoutMs;
21
24
  let lastError;
22
25
  while (Date.now() < deadline) {
@@ -42,7 +42,7 @@ const MODULE_API_PREFIX = '/api/claude-workbench/v1';
42
42
  // fixture data dir. The live desktop core 5.0.24 installation is never
43
43
  // written to, restarted or replaced.
44
44
  const REAL_PROFILE_STORES = [
45
- path.join(os.homedir(), '.project-knowledge-v5', 'workbench'),
45
+ path.join(os.homedir(), '.project-knowledge', 'workbench'),
46
46
  path.join(os.homedir(), '.agent-terminal'),
47
47
  ];
48
48
 
@@ -102,7 +102,7 @@ const REAL_USERPROFILE = process.env.USERPROFILE || REAL_HOME;
102
102
  // a time, and the secret that is read there never leaves the server process
103
103
  // memory: it is handed over through a pipe, never written to a file.
104
104
  const REAL_PROFILE_STORES = [
105
- path.join(REAL_HOME, '.project-knowledge-v5', 'workbench'),
105
+ path.join(REAL_HOME, '.project-knowledge', 'workbench'),
106
106
  path.join(REAL_HOME, '.agent-terminal'),
107
107
  ];
108
108
 
@@ -273,7 +273,7 @@ function hostEnv(layout, extra = {}) {
273
273
  function realWorkbenchProfileDir() {
274
274
  const override = String(process.env.PK_WB_REAL_PROFILE_DIR || '').trim();
275
275
  if (override) return path.resolve(override);
276
- return path.join(REAL_HOME, '.project-knowledge-v5', 'workbench');
276
+ return path.join(REAL_HOME, '.project-knowledge', 'workbench');
277
277
  }
278
278
 
279
279
  // Byte-level snapshot of a flat directory. The SHA-256 digests stay in the
@@ -280,7 +280,7 @@ function hostEnv(layout, extra = {}) {
280
280
  function realWorkbenchProfileDir() {
281
281
  const override = String(process.env.PK_WB_REAL_PROFILE_DIR || '').trim();
282
282
  if (override) return path.resolve(override);
283
- return path.join(REAL_HOME, '.project-knowledge-v5', 'workbench');
283
+ return path.join(REAL_HOME, '.project-knowledge', 'workbench');
284
284
  }
285
285
 
286
286
  // Byte-level snapshot of a flat directory. The SHA-256 digests stay in the
@@ -250,7 +250,7 @@ function hostEnv(layout, extra = {}) {
250
250
  // captured at module load. R5 uses this string exclusively to prove that no
251
251
  // isolated env value points there; this helper never touches the filesystem.
252
252
  function realWorkbenchProfileDir() {
253
- return path.join(REAL_HOME, '.project-knowledge-v5', 'workbench');
253
+ return path.join(REAL_HOME, '.project-knowledge', 'workbench');
254
254
  }
255
255
 
256
256
  // The module that is hosted: the copy the installed product ships, unless
@@ -214,7 +214,7 @@ function hostEnv(layout, extra = {}) {
214
214
  function realWorkbenchProfileDir() {
215
215
  const override = String(process.env.PK_WB_REAL_PROFILE_DIR || '').trim();
216
216
  if (override) return path.resolve(override);
217
- return path.join(REAL_HOME, '.project-knowledge-v5', 'workbench');
217
+ return path.join(REAL_HOME, '.project-knowledge', 'workbench');
218
218
  }
219
219
 
220
220
  // Byte-level snapshot of a flat directory. The SHA256 digests stay in the
@@ -309,7 +309,7 @@ function hostEnv(layout, extra = {}) {
309
309
  // no isolated env value points there; this helper never touches the
310
310
  // filesystem.
311
311
  function realWorkbenchProfileDir() {
312
- return path.join(REAL_HOME, '.project-knowledge-v5', 'workbench');
312
+ return path.join(REAL_HOME, '.project-knowledge', 'workbench');
313
313
  }
314
314
 
315
315
  // The module that is hosted: the copy the installed product ships, unless
@@ -105,7 +105,7 @@ function isInside(candidate, parent) {
105
105
  // hardens its own environment, and os.homedir() reads the REDIRECTED
106
106
  // USERPROFILE once the isolation is applied. The value is therefore captured
107
107
  // at load time and refreshed by the capture, never re-derived later.
108
- let REAL_PROFILE_DIR = path.join(os.homedir(), '.project-knowledge-v5', 'workbench');
108
+ let REAL_PROFILE_DIR = path.join(os.homedir(), '.project-knowledge', 'workbench');
109
109
  function realProfileDir() { return REAL_PROFILE_DIR; }
110
110
 
111
111
  // The lane's own temp root, outside the repository and outside the real
@@ -190,7 +190,7 @@ function captureRealEnvironment() {
190
190
  const chrome = findChromeDetailed();
191
191
  const claude = findClaudeExecutable();
192
192
  const present = (name) => Object.keys(process.env).some(key => key.toUpperCase() === name && String(process.env[key] || '').trim() !== '');
193
- REAL_PROFILE_DIR = path.join(realHome, '.project-knowledge-v5', 'workbench');
193
+ REAL_PROFILE_DIR = path.join(realHome, '.project-knowledge', 'workbench');
194
194
  return {
195
195
  realHome,
196
196
  realUserProfile,
@@ -508,8 +508,8 @@ async function testProbeEnvUsesManagerDataDir() {
508
508
  // not leak into the probe: the manager's own home-based binding wins.
509
509
  const goodData = stubServerPackage('ok-env');
510
510
  const goodHome = dir('env-good-home');
511
- fs.mkdirSync(path.join(goodHome, '.project-knowledge-v5'), { recursive: true });
512
- fs.copyFileSync(bindingPathOf(goodData), path.join(goodHome, '.project-knowledge-v5', 'integration-runtime.json'));
511
+ fs.mkdirSync(path.join(goodHome, '.project-knowledge'), { recursive: true });
512
+ fs.copyFileSync(bindingPathOf(goodData), path.join(goodHome, '.project-knowledge', 'integration-runtime.json'));
513
513
  const evilPkg = dir('env-evil-pkg');
514
514
  fakePackage(evilPkg, { version: '5.0.15' });
515
515
  const evilData = dir('env-evil-data');
@@ -230,7 +230,7 @@ async function testBootstrapResolvesForBothNativeForms() {
230
230
 
231
231
  async function testInstallerBindingLifecycle() {
232
232
  const home = path.join(TEMP, 'installer-home');
233
- const dataDir = path.join(home, '.project-knowledge-v5');
233
+ const dataDir = path.join(home, '.project-knowledge');
234
234
  const bindingPath = path.join(dataDir, 'integration-runtime.json');
235
235
  const manager = new IntegrationManager({
236
236
  rootDir: ROOT,
@@ -274,7 +274,7 @@ async function testInstallerBindingLifecycle() {
274
274
 
275
275
  async function testInstallAllCaptureOnlySkipsBinding() {
276
276
  const home = path.join(TEMP, 'install-all-home');
277
- const dataDir = path.join(home, '.project-knowledge-v5');
277
+ const dataDir = path.join(home, '.project-knowledge');
278
278
  const bridgeStub = {
279
279
  createBridge: () => ({
280
280
  registerConsumer: async () => ({}),
@@ -303,7 +303,7 @@ async function testInstallAllCaptureOnlySkipsBinding() {
303
303
 
304
304
  async function testMcpStartupProbe() {
305
305
  const home = path.join(TEMP, 'probe-home');
306
- const dataDir = path.join(home, '.project-knowledge-v5');
306
+ const dataDir = path.join(home, '.project-knowledge');
307
307
  const packageInfo = readJson(path.join(ROOT, 'package.json'));
308
308
  writeBinding(dataDir, { schema: RUNTIME_SCHEMA, packageName: packageInfo.name, packageRoot: ROOT, version: packageInfo.version, updatedAt: new Date().toISOString() });
309
309
  const manager = new IntegrationManager({
@@ -10,7 +10,7 @@ const endpoint = require('../lib/runtime-endpoint');
10
10
  const packageRoot = process.env.KB_LAUNCHER_TEST_PACKAGE || path.resolve(__dirname, '../..');
11
11
  const bin = path.join(packageRoot, 'bin/project-knowledge.js');
12
12
  const root = fs.mkdtempSync(path.join(os.tmpdir(), 'kb-launcher-readiness-'));
13
- const data = path.join(root, '.project-knowledge-v5');
13
+ const data = path.join(root, '.project-knowledge');
14
14
  const record = path.join(data, 'runtime/claude-sessions/project-a/session.json');
15
15
  const recordBytes = JSON.stringify({ schema: 'claude-workbench-session/v1', sessionId: 'old-test', projectSlug: 'project-a', state: 'running', metadata: { automation: true } });
16
16
  fs.mkdirSync(path.dirname(record), { recursive: true });
@@ -26,9 +26,14 @@ const BACKEND_ONLY = args.includes('--backend-only');
26
26
  const PER_TEST_TIMEOUT_MS = Number(process.env.PK_TEST_TIMEOUT_MS || 90_000);
27
27
 
28
28
  function listTestFiles() {
29
+ // Optional exclusion list (semicolon-separated filenames) for environments
30
+ // where a specific browser interaction cannot run headless at all — the
31
+ // same files still run in every other lane and on real machines.
32
+ const excluded = new Set(String(process.env.PK_TEST_EXCLUDE || '').split(';').map(s => s.trim()).filter(Boolean));
29
33
  return fs.readdirSync(TEST_DIR)
30
34
  .filter(file => file.endsWith('-test.js'))
31
35
  .filter(file => file !== 'run-all-tests.js')
36
+ .filter(file => !excluded.has(file))
32
37
  .filter(file => !BACKEND_ONLY || !fs.readFileSync(path.join(TEST_DIR, file), 'utf8').includes('helpers/cdp-browser'))
33
38
  .sort();
34
39
  }
@@ -100,14 +105,32 @@ function runOne(file) {
100
105
  let totalDuration = 0;
101
106
  for (const file of files) {
102
107
  process.stdout.write(`> ${file} ... `);
103
- const result = runOne(file);
108
+ let result = runOne(file);
109
+ // One bounded retry for intermittents (headless dialog races, port
110
+ // contention on busy runners): both runs' outcomes are preserved in the
111
+ // record — a pass-on-retry is labeled, and a second failure stays FAIL.
112
+ // Assertions are never weakened; this only re-runs the same file in a
113
+ // fresh sandbox.
114
+ if (!result.passed) {
115
+ const first = { label: result.failureLabel, tail: result.outputTail };
116
+ const retry = runOne(file);
117
+ if (retry.passed) {
118
+ retry.passedOnRetry = true;
119
+ retry.firstFailure = first;
120
+ result = retry;
121
+ } else {
122
+ result.firstFailure = first;
123
+ }
124
+ }
104
125
  totalDuration += result.durationMs;
105
126
  results.push(result);
106
127
 
107
128
  if (result.passed) {
108
- console.log(`PASS (${result.durationMs}ms)`);
129
+ console.log(result.passedOnRetry
130
+ ? `PASS on retry (${result.durationMs}ms; first run: ${result.firstFailure.label} — recorded, not hidden)`
131
+ : `PASS (${result.durationMs}ms)`);
109
132
  } else {
110
- console.log(`${result.failureLabel}, ${result.durationMs}ms`);
133
+ console.log(`${result.failureLabel}, ${result.durationMs}ms${result.firstFailure ? ` (also failed on retry; first: ${result.firstFailure.label})` : ''}`);
111
134
  if (result.outputTail) {
112
135
  console.log('--- tail ---');
113
136
  console.log(result.outputTail);
@@ -5,7 +5,7 @@ const os = require('os');
5
5
  let resolved = null;
6
6
  function resolveDataDirPath(options = {}) {
7
7
  const configured = options.dataDir === undefined ? process.env.KB_DATA_DIR : options.dataDir;
8
- return path.resolve(configured || path.join(options.homeDir || os.homedir(), '.project-knowledge-v5'));
8
+ return path.resolve(configured || path.join(options.homeDir || os.homedir(), '.project-knowledge'));
9
9
  }
10
10
  function ensureDataDir(dataDir = resolveDataDirPath()) { fs.mkdirSync(dataDir, { recursive: true }); return path.resolve(dataDir); }
11
11
  function getDataDir() { if (!resolved) resolved = resolveDataDirPath(); return resolved; }
@@ -23,7 +23,8 @@ 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 !== 4) throw new Error('ENGINE_VERSION_MISMATCH');
26
+ // Schema 4 (0.2.x) and 5 (0.3.x, agent-member plane) are both supported by this shell; anything else is a genuine mismatch. Hardcoding ===4 used to mislabel engine 0.3.x as 'legacy'.
27
+ if (engine.name !== 'knowledge-engine' || ![4, 5].includes(engine.dataSchemaVersion)) throw new Error('ENGINE_VERSION_MISMATCH');
27
28
  step = 'runtime-authentication';
28
29
  const auth = await bridge._fetch(`${bridge.engineUrl}/api/runtime-auth`, { headers });
29
30
  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 !== 4 || !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' || ![4, 5].includes(health.dataSchemaVersion) || !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 });
@@ -25,7 +25,7 @@ Usage:
25
25
 
26
26
  Options:
27
27
  -p, --port <port> Port (default: 5757, startup auto-fallback +19)
28
- --data <dir> Select data directory (default: ~/.project-knowledge-v5)
28
+ --data <dir> Select data directory (default: ~/.project-knowledge)
29
29
  --host <host> Bind host (default: 127.0.0.1)
30
30
  --no-open Do not open browser
31
31
  --fg Run in foreground
@@ -9,11 +9,11 @@
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
- "plugins/project-knowledge/scripts/context-hook.cjs": "ddc1f6f5638c662adbbf4391557bbeb7196af2fb869e7ecfeefba76b9bab5760",
13
- "plugins/project-knowledge/scripts/mcp-launcher.cjs": "7c68830b5c73eb53ef030756a4de33987f7eab6b1a6cc15602835aac3f954893",
14
- "plugins/project-knowledge/.claude-plugin/plugin.json": "f0d8ce9139185495e0c7e28b8b9f2cc2fcbc014ca963ebd4e96c1581d6de8762",
15
- "plugins/project-knowledge/.codex-plugin/plugin.json": "e8dd5a17e4bc99dd2a152d51fc63e54818f416e720f9480e6e26f0439201b4a5",
16
- "plugins/project-knowledge/.mcp.json": "1cc8b56db7d590da76a2b83b8238a948e48b11215219676e7e1727a4f2f135c0",
12
+ "plugins/project-knowledge/scripts/context-hook.cjs": "12f9120a4503193042eff109da3688e909ef8a0f8409bf38c7f47f6e36941d86",
13
+ "plugins/project-knowledge/scripts/mcp-launcher.cjs": "c9235eaf722ad011ce42d7a8416a77bef8e2a65e174f27b3d183f4b8f811f293",
14
+ "plugins/project-knowledge/.claude-plugin/plugin.json": "f05c4000bfe5edea956e8ee472d698aecdc34bbfe79010b1b09ad1a2784a5caa",
15
+ "plugins/project-knowledge/.codex-plugin/plugin.json": "8e38a3bbe337087238a681a41f88c4753616f298de0e339f37660dbb42aa69f2",
16
+ "plugins/project-knowledge/.mcp.json": "89bce93cc7544443d060a25e318399cb013f2d694fdcc43c31110f4411be67ff",
17
17
  "ui/version-info.js": "01a82217b031de54b80d6c7974da9c70888c4c90a046bd4248a808f7989ddce7",
18
18
  "ui/version-info.css": "209fad8e42b661f72d2aba3280e1ca47768b5cefb776fe5459538d34fbad120f"
19
19
  },
@@ -267,19 +267,19 @@
267
267
  "engine": {
268
268
  "name": "@sanqianx/ai-coding-knowledge-engine",
269
269
  "installName": "@sanqianx/ai-coding-knowledge-engine",
270
- "version": "0.2.9",
270
+ "version": "0.3.1",
271
271
  "files": {
272
272
  "LICENSE": "c1b9df1275e769f3dbab000d1e457a2d4b0f28eb5da6c77e48dc37eeba202ed7",
273
273
  "README.md": "4d99cf4b19a4b07533dc86bb63015255364016fad76c1306bea69db0a9ff8743",
274
- "package.json": "858f2530bf87a76894b78f32084134770614b01850b736379432b83bc5e93693",
274
+ "package.json": "5d08d41a8769b1046f1cce1e4274436c5536e361e824520db79a17456179e547",
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": "1785a52c22427ab8e41dacfca91ae872d81c68081940bc114f7176edb46aabc8",
282
- "src/coordinator.js": "0a6b285fd8cd2bdb19a90b0b63ed7bc948789570cff7372128a2d6fcbbab43e1",
281
+ "src/context.js": "a868037b212c20eeb126648956665ace57f7272271000a827fa089804ad5ee32",
282
+ "src/coordinator.js": "1f13351ca51bdab41d941a256583091fd35948988c925328ec3607f2a307a037",
283
283
  "src/diagnostics.js": "f7b516ace61a1e9faaa6876930b9e2e258499a25857d1203f4e53d28bfd0fa1a",
284
284
  "src/headless-analyzer.js": "df570864136981cf98f3f69d047fa5729fbbfdeeaee0c6bfad26dab941dbbdae",
285
285
  "src/index-request.js": "78f26b872299005499fff4f2d1f9e8f986784f2ff36a5cf2be2b1e7b7c7d9378",
@@ -300,20 +300,21 @@
300
300
  "src/runtime/conversation-exclusions.js": "ef8545034b862d384fb460140490bb531b58d94992f5e2222ebaaa079b44fa63",
301
301
  "src/runtime/conversation-store.js": "4c91f16cef516556e381ee4369d67165b00833214b7675012340cbc1637ec8d7",
302
302
  "src/runtime/evidence-bundle.js": "d8e74774c2860a869f62e8adbe54d1c80818ea3da09436eff94037536ba559bf",
303
- "src/runtime/git-runner.js": "8d4b784e33f05733e0236d0c39f573d07ec7b44e093d022e0fbc05305cdaab7b",
303
+ "src/runtime/git-runner.js": "49df732dcdcea3011f44448476ed1945ee13f4fe8ded2428c48bc17c44ee21e3",
304
304
  "src/runtime/knowledge-promotion.js": "c1d29e8eca3708f8841f1a697e8bb51ed7a977f4fea649b8ae98be2d7195c06e",
305
305
  "src/runtime/knowledge-retrieval-service.js": "a4dcd09d34185f196814ff37821666e43ed0839126eab63b234bd53c4513ef1a",
306
306
  "src/runtime/layout.js": "e47fe54c605218493ce46f6289798d9db2a3ecec95089d288ed03d3b75cf871a",
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": "4ad8a037f86f3fa8d6f688750485898c02d4dbc47aa32502f2f98c89f65e9a28",
311
- "src/store.js": "91864c976e6da9a3dadf7441247a956ccc62e957789e5cb7c40df1925bcabb5d",
310
+ "src/server.js": "626cb8741fa3f2c725a2fe364f5c9fd80d93db9a7090cf3368e24ed1681a7354",
311
+ "src/store.js": "82519965dfc4b7ec11b7f098e57a86a22c0e4420beb1b305d6fa7fbc7936c42c",
312
312
  "ui/app.css": "7ad370c269e60a7b5ec907d81a607b2d16bd07b2d7c22a81f102dab51eeb2889",
313
313
  "ui/app.js": "e9ecb0125d5f2a8bb30a58c4d278fe0737ee2540ecfb065f97f453495cfc792d",
314
314
  "ui/index.html": "ce3565cfefd4838b11d37a91a906ef26ca5a1834844fe3f7c897b56851a3c418",
315
315
  "src/memory-groups.js": "92b5edbd0ec7c9a3cf505d4683a053ea71d7ceeb7cfbe049bc65342a39c0c8f2",
316
- "src/retry-scheduler.js": "048c11b767617e0c621c231e91029b4e5e834ae3e7ebc3c84b5168ea9f92ec57"
316
+ "src/retry-scheduler.js": "048c11b767617e0c621c231e91029b4e5e834ae3e7ebc3c84b5168ea9f92ec57",
317
+ "src/agent-members.js": "fee015e907d974b9e147e2dbd05d2b2ef9c243bd3eb9226bb68a19c190c2213a"
317
318
  }
318
319
  },
319
320
  "workflow": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanqianx/project-knowledge",
3
- "version": "5.1.1",
3
+ "version": "5.1.3",
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.9",
90
+ "@sanqianx/ai-coding-knowledge-engine": "0.3.1",
91
91
  "@sanqianx/ai-coding-workflow": "0.1.1",
92
92
  "@sanqianx/vector-hub": "1.0.8-rc.8",
93
93
  "buffer": "^6.0.3",
@@ -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.1.1",
5
+ "version": "5.1.3",
6
6
  "description": "Read durable project decisions and implementation history from Project Knowledge.",
7
7
  "author": {
8
8
  "name": "SanQianX",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-knowledge",
3
- "version": "5.1.1",
3
+ "version": "5.1.3",
4
4
  "description": "Read durable project decisions and implementation history from Project Knowledge.",
5
5
  "author": {
6
6
  "name": "SanQianX",
@@ -5,10 +5,10 @@
5
5
  "command": "node",
6
6
  "args": [
7
7
  "-e",
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-v5');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);"
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.1.1"
11
+ "KB_PLUGIN_VERSION": "5.1.3"
12
12
  }
13
13
  }
14
14
  }
@@ -29,7 +29,7 @@ function log(dataDir, event, input) {
29
29
  async function run(payload, { env = process.env, argv = process.argv.slice(2), fetchImpl = fetch, timeoutMs = 10000 } = {}) {
30
30
  if (env.KB_KNOWLEDGE_CONTEXT === '0' || !payload || payload.hook_event_name !== 'UserPromptSubmit') return {};
31
31
  const client = clientFrom(argv), requestId = `context-${crypto.randomUUID()}`, started = Date.now();
32
- const dataDir = path.resolve(env.KB_DATA_DIR || path.join(os.homedir(), '.project-knowledge-v5'));
32
+ const dataDir = path.resolve(env.KB_DATA_DIR || path.join(os.homedir(), '.project-knowledge'));
33
33
  if (typeof payload.cwd !== 'string' || !path.isAbsolute(payload.cwd) || typeof payload.prompt !== 'string' || !payload.prompt.trim() || payload.prompt.length > 131072) return {};
34
34
  const controller = new AbortController(), timer = setTimeout(() => controller.abort(), timeoutMs);
35
35
  let result;
@@ -32,7 +32,7 @@ function fail(code) {
32
32
  }
33
33
 
34
34
  function bindingPath() {
35
- return path.join(process.env.KB_DATA_DIR || path.join(os.homedir(), '.project-knowledge-v5'), 'integration-runtime.json');
35
+ return path.join(process.env.KB_DATA_DIR || path.join(os.homedir(), '.project-knowledge'), 'integration-runtime.json');
36
36
  }
37
37
 
38
38
  function loadBinding() {