@sanqianx/project-knowledge 5.0.1 → 5.0.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +25 -0
- package/README.md +5 -0
- package/_modules/knowledge-engine/README.md +2 -0
- package/_modules/knowledge-engine/package.json +1 -1
- package/_modules/knowledge-engine/src/analysis-contract.js +3 -1
- package/_modules/knowledge-engine/src/analysis-output.js +52 -0
- package/_modules/knowledge-engine/src/coordinator.js +14 -4
- package/_modules/knowledge-engine/src/diagnostics.js +37 -0
- package/_modules/knowledge-engine/src/headless-analyzer.js +4 -18
- package/_modules/knowledge-engine/src/runtime/commit-reconciler.js +1 -1
- package/_site/_test/agent-capture-ui-test.js +85 -0
- package/_site/_test/module-process-lifecycle-test.js +11 -0
- package/_site/_test/zcode-capture-integration-test.js +107 -0
- package/_site/lib/integration-installer.js +74 -33
- package/_site/lib/module-bridge.js +7 -0
- package/_site/lib/server-app.js +9 -8
- package/bin/project-knowledge-integrations.js +13 -2
- package/docs/README.zh-CN.md +17 -0
- package/module-runtime-manifest.json +28 -27
- package/package.json +3 -3
- 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/ui/index.html +1 -0
- package/ui/product.css +1 -0
- package/ui/product.js +33 -1
- package/vendor-manifest.json +9 -7
|
@@ -20,17 +20,19 @@ try {
|
|
|
20
20
|
const INTEGRATION_NAME = 'project-knowledge';
|
|
21
21
|
const MARKETPLACE_NAME = 'project-knowledge';
|
|
22
22
|
const DEFAULT_MARKETPLACE_SOURCE = 'SanQianX/project-knowledge-base';
|
|
23
|
-
const SUPPORTED_CLIENTS = ['claude', 'opencode', 'codex'];
|
|
23
|
+
const SUPPORTED_CLIENTS = ['claude', 'opencode', 'codex', 'zcode'];
|
|
24
24
|
const DEFAULT_BRIDGE_CONSUMER = 'project-knowledge';
|
|
25
25
|
const CLIENT_LABELS = {
|
|
26
26
|
claude: 'Claude Code',
|
|
27
27
|
opencode: 'OpenCode',
|
|
28
28
|
codex: 'Codex',
|
|
29
|
+
zcode: 'ZCode',
|
|
29
30
|
};
|
|
30
31
|
const CLIENT_METHOD_SUFFIX = {
|
|
31
32
|
claude: 'Claude',
|
|
32
33
|
opencode: 'OpenCode',
|
|
33
34
|
codex: 'Codex',
|
|
35
|
+
zcode: 'ZCode',
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
function normalizeClient(value) {
|
|
@@ -323,26 +325,28 @@ class IntegrationManager {
|
|
|
323
325
|
this.commandResolver = options.commandResolver || defaultCommandResolver;
|
|
324
326
|
this.dryRun = Boolean(options.dryRun);
|
|
325
327
|
this.logger = options.logger || null;
|
|
328
|
+
this.operationId = options.operationId || '';
|
|
326
329
|
this.planned = [];
|
|
327
330
|
this.bridge = options.bridgeModule || bridgeModule;
|
|
328
331
|
this.bridgeConsumerName = options.bridgeConsumerName || DEFAULT_BRIDGE_CONSUMER;
|
|
329
332
|
this.bridgeHomeDir = options.bridgeHomeDir
|
|
330
333
|
|| this.env.AI_CODING_EVENT_BRIDGE_HOME
|
|
331
334
|
|| path.join(resolveDataDirPath({ dataDir: this.env.KB_DATA_DIR || '', homeDir: this.homeDir }), 'events');
|
|
332
|
-
this.claudeSettingsFile = options.claudeSettingsFile || '';
|
|
333
|
-
this.codexConfigFile = options.codexConfigFile || '';
|
|
334
|
-
this.openCodePluginsDir = options.openCodePluginsDir || '';
|
|
335
|
+
this.claudeSettingsFile = options.claudeSettingsFile || path.join(this.homeDir, '.claude', 'settings.json');
|
|
336
|
+
this.codexConfigFile = options.codexConfigFile || path.join(this.homeDir, '.codex', 'config.toml');
|
|
337
|
+
this.openCodePluginsDir = options.openCodePluginsDir || path.join(openCodeConfigDir(this.homeDir, this.env), 'plugin');
|
|
338
|
+
this.zcodeConfigFile = options.zcodeConfigFile || path.join(this.homeDir, '.zcode', 'cli', 'config.json');
|
|
335
339
|
}
|
|
336
340
|
|
|
337
341
|
_bridgeFacade() {
|
|
338
342
|
return this.bridge.createBridge({ homeDir: this.bridgeHomeDir });
|
|
339
343
|
}
|
|
340
344
|
|
|
341
|
-
_captureInstallerOptions() {
|
|
345
|
+
_captureInstallerOptions(client) {
|
|
342
346
|
return {
|
|
343
347
|
homeDir: this.bridgeHomeDir,
|
|
344
348
|
settingsFile: this.claudeSettingsFile || undefined,
|
|
345
|
-
configFile: this.
|
|
349
|
+
configFile: client === 'zcode' ? this.zcodeConfigFile : this.codexConfigFile,
|
|
346
350
|
pluginsDir: this.openCodePluginsDir || undefined,
|
|
347
351
|
};
|
|
348
352
|
}
|
|
@@ -382,6 +386,42 @@ class IntegrationManager {
|
|
|
382
386
|
|
|
383
387
|
// ---- Development Capture connectors (Bridge hooks / notify / plugin) ----
|
|
384
388
|
|
|
389
|
+
async captureOperation(operation, client, options = {}) {
|
|
390
|
+
const startedAt = Date.now();
|
|
391
|
+
const context = { client, operation };
|
|
392
|
+
try {
|
|
393
|
+
const result = await this[`${operation}Capture${CLIENT_METHOD_SUFFIX[client]}`](options);
|
|
394
|
+
const ok = !result.conflict && result.state !== 'failed';
|
|
395
|
+
if (operation !== 'status' || !ok) this.log(ok ? 'info' : 'error', `integration.capture.${ok ? 'completed' : 'failed'}`, ok ? 'Agent 采集接线操作完成。' : 'Agent 采集接线未完成。', { operationId: this.operationId, durationMs: Date.now() - startedAt, error: ok ? undefined : Object.assign(new Error(result.detail), { code: 'CAPTURE_CONFLICT' }), context });
|
|
396
|
+
return { ok, ...result, ...(!ok ? { error: { code: 'CAPTURE_CONFLICT', message: result.detail } } : {}) };
|
|
397
|
+
} catch (error) {
|
|
398
|
+
this.log('error', 'integration.capture.failed', 'Agent 采集接线操作失败。', { operationId: this.operationId, durationMs: Date.now() - startedAt, error, context });
|
|
399
|
+
return { ok: false, state: 'failed', installed: false, detail: error.message, error: { code: error.code || 'CAPTURE_FAILED', message: error.message } };
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
async installCaptureZCode() {
|
|
404
|
+
if (this.dryRun) {
|
|
405
|
+
this.planned.push({ command: 'bridge', args: ['installZcodeHook', this.bridgeHomeDir] });
|
|
406
|
+
return { state: 'planned', installed: false, detail: '计划接入 ZCode 会话采集,未修改配置。' };
|
|
407
|
+
}
|
|
408
|
+
await this.bridge.installers.zcode.installZcodeHook(this._captureInstallerOptions('zcode'));
|
|
409
|
+
const status = await this.statusCaptureZCode();
|
|
410
|
+
if (!status.installed) throw new Error('ZCode Hook 写入后校验失败,请检查 hooks.enabled 与事件配置。');
|
|
411
|
+
return status;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
async statusCaptureZCode() {
|
|
415
|
+
const status = await this.bridge.installers.zcode.statusZcodeHook(this._captureInstallerOptions('zcode'));
|
|
416
|
+
return { state: status.installed ? 'installed' : 'not-installed', installed: status.installed, conflict: false, detail: status.installed ? '已配置用户输入与回答采集;请重新打开 ZCode 会话。' : 'ZCode 会话采集尚未接入。' };
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
async uninstallCaptureZCode() {
|
|
420
|
+
if (this.dryRun) return { state: 'planned', detail: '计划移除 ZCode 采集,未修改配置。' };
|
|
421
|
+
await this.bridge.installers.zcode.uninstallZcodeHook(this._captureInstallerOptions('zcode'));
|
|
422
|
+
return { state: 'removed', installed: false, detail: '已移除 ZCode 托管采集,保留第三方配置与已有记录。' };
|
|
423
|
+
}
|
|
424
|
+
|
|
385
425
|
async installCaptureClaude() {
|
|
386
426
|
if (this.dryRun) {
|
|
387
427
|
this.planned.push({ command: 'bridge', args: ['installClaudeCodeHook', this.bridgeHomeDir] });
|
|
@@ -397,7 +437,7 @@ class IntegrationManager {
|
|
|
397
437
|
state: status.installed ? 'installed' : 'not-installed',
|
|
398
438
|
installed: status.installed,
|
|
399
439
|
conflict: false,
|
|
400
|
-
detail: status.installed ?
|
|
440
|
+
detail: status.installed ? '已配置用户输入与回答采集。' : '会话采集 Hook 尚未配置。',
|
|
401
441
|
};
|
|
402
442
|
}
|
|
403
443
|
|
|
@@ -453,7 +493,7 @@ class IntegrationManager {
|
|
|
453
493
|
state: status.installed ? 'installed' : status.thirdParty ? 'conflict' : 'not-installed',
|
|
454
494
|
installed: Boolean(status.installed),
|
|
455
495
|
conflict: Boolean(status.thirdParty),
|
|
456
|
-
detail: status.installed ? '
|
|
496
|
+
detail: status.installed ? '已配置提交回合后的会话采集。' : status.thirdParty ? '已有第三方通知配置,不会覆盖;请查看诊断记录。' : '会话采集通知尚未配置。',
|
|
457
497
|
};
|
|
458
498
|
}
|
|
459
499
|
|
|
@@ -481,7 +521,7 @@ class IntegrationManager {
|
|
|
481
521
|
state: status.installed ? 'installed' : 'not-installed',
|
|
482
522
|
installed: Boolean(status.installed),
|
|
483
523
|
conflict: false,
|
|
484
|
-
detail: status.installed ? '
|
|
524
|
+
detail: status.installed ? '已配置会话采集插件。' : '会话采集插件尚未配置,保留其他插件。',
|
|
485
525
|
};
|
|
486
526
|
}
|
|
487
527
|
|
|
@@ -510,9 +550,21 @@ class IntegrationManager {
|
|
|
510
550
|
}
|
|
511
551
|
|
|
512
552
|
detectClients() {
|
|
513
|
-
return SUPPORTED_CLIENTS.filter(client => Boolean(this.executable(client)));
|
|
553
|
+
return SUPPORTED_CLIENTS.filter(client => Boolean(this.executable(client)) || client === 'zcode' && this.captureConfigFound(client));
|
|
514
554
|
}
|
|
515
555
|
|
|
556
|
+
captureConfigFound(client) {
|
|
557
|
+
const target = { claude: this.claudeSettingsFile, codex: this.codexConfigFile, opencode: path.dirname(this.openCodePluginsDir), zcode: this.zcodeConfigFile }[client];
|
|
558
|
+
try { const stat = fs.statSync(target); return client === 'opencode' ? stat.isDirectory() : stat.isFile(); } catch { return false; }
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
// Capture support does not imply a verified MCP/plugin installer. Never
|
|
562
|
+
// present ZCode knowledge retrieval as installed merely because hooks exist.
|
|
563
|
+
statusZCode() { return { state: 'not-supported', supported: false, installed: false, detail: 'ZCode 当前支持会话采集;知识检索插件未接入,不会自动安装。' }; }
|
|
564
|
+
installZCode() { return this.statusZCode(); }
|
|
565
|
+
updateZCode() { return this.statusZCode(); }
|
|
566
|
+
uninstallZCode() { return this.statusZCode(); }
|
|
567
|
+
|
|
516
568
|
execute(client, args, options = {}) {
|
|
517
569
|
const startedAt = Date.now();
|
|
518
570
|
const command = this.executable(client);
|
|
@@ -805,13 +857,7 @@ class IntegrationManager {
|
|
|
805
857
|
const results = [];
|
|
806
858
|
for (const rawClient of clients) {
|
|
807
859
|
const client = normalizeClient(rawClient);
|
|
808
|
-
|
|
809
|
-
try {
|
|
810
|
-
const result = await this[`${operation}Capture${suffix}`](options);
|
|
811
|
-
results.push({ client, label: CLIENT_LABELS[client], ok: true, ...result });
|
|
812
|
-
} catch (error) {
|
|
813
|
-
results.push({ client, label: CLIENT_LABELS[client], ok: false, state: 'failed', detail: error.message });
|
|
814
|
-
}
|
|
860
|
+
results.push({ client, label: CLIENT_LABELS[client], ...(await this.captureOperation(operation, client, options)) });
|
|
815
861
|
}
|
|
816
862
|
return results;
|
|
817
863
|
}
|
|
@@ -839,11 +885,7 @@ class IntegrationManager {
|
|
|
839
885
|
}
|
|
840
886
|
}
|
|
841
887
|
if (options.knowledgeOnly !== true) {
|
|
842
|
-
|
|
843
|
-
entry.developmentCapture = { ok: true, ...(await this[`installCapture${suffix}`]()) };
|
|
844
|
-
} catch (error) {
|
|
845
|
-
entry.developmentCapture = { ok: false, state: 'failed', detail: error.message };
|
|
846
|
-
}
|
|
888
|
+
entry.developmentCapture = await this.captureOperation('install', client);
|
|
847
889
|
}
|
|
848
890
|
summary.clients.push(entry);
|
|
849
891
|
}
|
|
@@ -851,7 +893,7 @@ class IntegrationManager {
|
|
|
851
893
|
}
|
|
852
894
|
|
|
853
895
|
async statusAll(options = {}) {
|
|
854
|
-
const clients = options.clients && options.clients.length ? options.clients.map(normalizeClient) :
|
|
896
|
+
const clients = options.clients && options.clients.length ? options.clients.map(normalizeClient) : SUPPORTED_CLIENTS;
|
|
855
897
|
const summary = { clients: [], bridge: null };
|
|
856
898
|
try {
|
|
857
899
|
summary.bridge = { ok: true, ...(await this.bridgeStatus()) };
|
|
@@ -860,17 +902,15 @@ class IntegrationManager {
|
|
|
860
902
|
}
|
|
861
903
|
for (const client of clients) {
|
|
862
904
|
const suffix = CLIENT_METHOD_SUFFIX[client];
|
|
863
|
-
const entry = { client, label: CLIENT_LABELS[client], available: Boolean(this.executable(client)) };
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
entry.developmentCapture = { ok: true, ...(await this[`statusCapture${suffix}`]()) };
|
|
871
|
-
} catch (error) {
|
|
872
|
-
entry.developmentCapture = { ok: false, state: 'failed', detail: error.message };
|
|
905
|
+
const entry = { client, label: CLIENT_LABELS[client], available: Boolean(this.executable(client)), configFound: this.captureConfigFound(client) };
|
|
906
|
+
if (!options.captureOnly) {
|
|
907
|
+
try {
|
|
908
|
+
entry.knowledgeIntegration = { ok: true, ...(await this[`status${suffix}`]()) };
|
|
909
|
+
} catch (error) {
|
|
910
|
+
entry.knowledgeIntegration = { ok: false, state: 'failed', detail: error.message };
|
|
911
|
+
}
|
|
873
912
|
}
|
|
913
|
+
entry.developmentCapture = await this.captureOperation('status', client);
|
|
874
914
|
summary.clients.push(entry);
|
|
875
915
|
}
|
|
876
916
|
return summary;
|
|
@@ -881,6 +921,7 @@ class IntegrationManager {
|
|
|
881
921
|
async disableAllCapture(options = {}) {
|
|
882
922
|
const clients = options.clients && options.clients.length ? options.clients.map(normalizeClient) : SUPPORTED_CLIENTS;
|
|
883
923
|
const results = await this.operateCapture('uninstall', clients, { unregisterConsumer: false });
|
|
924
|
+
if (results.some(result => !result.ok)) return { clients: results, consumer: { ok: false, state: 'kept', detail: '部分采集未能移除,保留宿主消费者,请修复失败项后重试。' } };
|
|
884
925
|
let consumer = null;
|
|
885
926
|
try {
|
|
886
927
|
consumer = { ok: true, ...(await this.unregisterBridgeConsumer()) };
|
|
@@ -610,6 +610,13 @@ class ModuleBridge {
|
|
|
610
610
|
windowsHide: true,
|
|
611
611
|
env: { ...process.env, ...(spec.env || {}) },
|
|
612
612
|
});
|
|
613
|
+
child.on('message', message => {
|
|
614
|
+
if (message?.type !== 'kb:diagnostic' || !message.record || !['terminal', 'knowledge-engine'].includes(spec.name)) return;
|
|
615
|
+
const record = message.record;
|
|
616
|
+
if (!['debug', 'info', 'warn', 'error'].includes(record.level) || typeof record.event !== 'string' || typeof record.message !== 'string') return;
|
|
617
|
+
const component = spec.name === 'terminal' ? 'claude-ai-workbench' : 'knowledge-engine';
|
|
618
|
+
try { Promise.resolve(this.logger[record.level]?.(record.event, record.message, { component, projectId: record.projectId, runId: record.runId, operationId: record.operationId, commitSha: record.commitSha, phase: record.phase, error: record.error, context: record.context })).catch(() => {}); } catch {}
|
|
619
|
+
});
|
|
613
620
|
let attempts = spec._attempts || 0;
|
|
614
621
|
child.on('error', error => {
|
|
615
622
|
this.supervised = this.supervised.filter(existing => existing !== child);
|
package/_site/lib/server-app.js
CHANGED
|
@@ -1292,13 +1292,13 @@ function createRequestHandler(runtime, options = {}) {
|
|
|
1292
1292
|
// Unified Integration Setup surface: one action manages Knowledge
|
|
1293
1293
|
// Integration and Development Capture per client, with separate status.
|
|
1294
1294
|
if (method === 'GET' && pathname === '/api/integrations/status') {
|
|
1295
|
-
const manager = new IntegrationManager({ rootDir: runtime.rootDir });
|
|
1296
|
-
const summary = await manager.statusAll({});
|
|
1295
|
+
const manager = new IntegrationManager({ ...options.integrationOptions, rootDir: runtime.rootDir, logger: runtime.logger, operationId: requestOperationId, bridgeHomeDir: runtime.bridgeAdapter.hookBinding().bridgeHomeDir });
|
|
1296
|
+
const summary = await manager.statusAll({ captureOnly: url.searchParams.get('captureOnly') === '1' });
|
|
1297
1297
|
return send(res, 200, { ok: true, ...summary });
|
|
1298
1298
|
}
|
|
1299
1299
|
if (method === 'POST' && pathname === '/api/integrations/install') {
|
|
1300
1300
|
const body = await readJsonBody(req);
|
|
1301
|
-
const manager = new IntegrationManager({ rootDir: runtime.rootDir });
|
|
1301
|
+
const manager = new IntegrationManager({ ...options.integrationOptions, rootDir: runtime.rootDir, logger: runtime.logger, operationId: requestOperationId, bridgeHomeDir: runtime.bridgeAdapter.hookBinding().bridgeHomeDir });
|
|
1302
1302
|
const clients = Array.isArray(body.clients) && body.clients.length
|
|
1303
1303
|
? body.clients.map(client => String(client))
|
|
1304
1304
|
: undefined;
|
|
@@ -1308,12 +1308,13 @@ function createRequestHandler(runtime, options = {}) {
|
|
|
1308
1308
|
captureOnly: body.captureOnly === true,
|
|
1309
1309
|
scope: body.scope || 'user',
|
|
1310
1310
|
});
|
|
1311
|
-
|
|
1312
|
-
|
|
1311
|
+
const complete = summary.bridge.ok && summary.clients.every(entry => (!entry.knowledgeIntegration || entry.knowledgeIntegration.ok) && (!entry.developmentCapture || entry.developmentCapture.ok));
|
|
1312
|
+
await runtime.logger[complete ? 'info' : 'error'](`integrations.install_${complete ? 'completed' : 'failed'}`, complete ? 'Agent 接入完成。' : 'Agent 接入未完成,请查看各工具的失败原因。', { operationId: requestOperationId, context: { clients: summary.clients.map(entry => entry.client) } });
|
|
1313
|
+
return send(res, 200, { ok: true, complete, operationId: requestOperationId, ...summary });
|
|
1313
1314
|
}
|
|
1314
1315
|
if (method === 'POST' && pathname === '/api/integrations/uninstall') {
|
|
1315
1316
|
const body = await readJsonBody(req);
|
|
1316
|
-
const manager = new IntegrationManager({ rootDir: runtime.rootDir });
|
|
1317
|
+
const manager = new IntegrationManager({ ...options.integrationOptions, rootDir: runtime.rootDir, logger: runtime.logger, operationId: requestOperationId, bridgeHomeDir: runtime.bridgeAdapter.hookBinding().bridgeHomeDir });
|
|
1317
1318
|
if (body.disableAllCapture === true) {
|
|
1318
1319
|
const summary = await manager.disableAllCapture({});
|
|
1319
1320
|
return send(res, 200, { ok: true, ...summary });
|
|
@@ -1321,9 +1322,9 @@ function createRequestHandler(runtime, options = {}) {
|
|
|
1321
1322
|
const clients = Array.isArray(body.clients) && body.clients.length
|
|
1322
1323
|
? body.clients.map(client => String(client))
|
|
1323
1324
|
: undefined;
|
|
1324
|
-
const knowledgeResults = await manager.operate('uninstall', clients && clients.length ? clients : manager.detectClients(), { scope: body.scope || 'user' });
|
|
1325
|
+
const knowledgeResults = body.captureOnly === true ? [] : await manager.operate('uninstall', clients && clients.length ? clients : manager.detectClients(), { scope: body.scope || 'user' });
|
|
1325
1326
|
const captureResults = body.knowledgeOnly === true ? [] : await manager.operateCapture('uninstall', clients && clients.length ? clients : manager.detectClients(), {});
|
|
1326
|
-
return send(res, 200, { ok: true, clients: knowledgeResults, capture: captureResults });
|
|
1327
|
+
return send(res, 200, { ok: true, complete: [...knowledgeResults, ...captureResults].every(entry => entry.ok), operationId: requestOperationId, clients: knowledgeResults, capture: captureResults });
|
|
1327
1328
|
}
|
|
1328
1329
|
|
|
1329
1330
|
if (method === 'GET' && pathname === '/api/ai-profiles') {
|
|
@@ -5,6 +5,8 @@ const {
|
|
|
5
5
|
SUPPORTED_CLIENTS,
|
|
6
6
|
normalizeClient,
|
|
7
7
|
} = require('../_site/lib/integration-installer');
|
|
8
|
+
const { Logger } = require('../_site/lib/structured-logger');
|
|
9
|
+
const { createId } = require('../_site/lib/contracts');
|
|
8
10
|
|
|
9
11
|
function printHelp() {
|
|
10
12
|
console.log(`project-knowledge-integrations
|
|
@@ -23,6 +25,7 @@ Clients:
|
|
|
23
25
|
claude Claude Code plugin (MCP + Skill) + managed Bridge hooks
|
|
24
26
|
opencode OpenCode MCP + global Skill + managed Bridge plugin
|
|
25
27
|
codex Codex plugin (MCP + Skill) + managed Bridge notify
|
|
28
|
+
zcode ZCode managed Bridge hooks (capture only; no verified MCP installer)
|
|
26
29
|
all All supported clients
|
|
27
30
|
|
|
28
31
|
Options:
|
|
@@ -99,7 +102,7 @@ function selectClients(requested, manager) {
|
|
|
99
102
|
|
|
100
103
|
function printCapabilityLine(prefix, capability) {
|
|
101
104
|
if (!capability) return;
|
|
102
|
-
const mark = capability.ok ? 'OK' : 'FAIL';
|
|
105
|
+
const mark = capability.supported === false ? 'INFO' : capability.ok ? 'OK' : 'FAIL';
|
|
103
106
|
console.log(` [${mark}] ${prefix}: ${capability.state} - ${capability.detail}`);
|
|
104
107
|
}
|
|
105
108
|
|
|
@@ -109,10 +112,18 @@ async function runCli(argv = process.argv.slice(2), dependencies = {}) {
|
|
|
109
112
|
printHelp();
|
|
110
113
|
return 0;
|
|
111
114
|
}
|
|
115
|
+
const logger = dependencies.manager ? null : new Logger();
|
|
112
116
|
const manager = dependencies.manager || new IntegrationManager({
|
|
117
|
+
logger,
|
|
118
|
+
operationId: createId('op'),
|
|
113
119
|
dryRun: options.dryRun,
|
|
114
120
|
marketplaceSource: options.marketplaceSource || undefined,
|
|
115
121
|
});
|
|
122
|
+
try { return await runOperation(options, manager); }
|
|
123
|
+
finally { if (logger) await logger.close(); }
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
async function runOperation(options, manager) {
|
|
116
127
|
const clients = selectClients(options.clients, manager);
|
|
117
128
|
|
|
118
129
|
if (options.operation === 'disable-capture') {
|
|
@@ -130,7 +141,7 @@ async function runCli(argv = process.argv.slice(2), dependencies = {}) {
|
|
|
130
141
|
return summary.clients.some(result => !result.ok) || !summary.consumer.ok ? 1 : 0;
|
|
131
142
|
}
|
|
132
143
|
|
|
133
|
-
if (options.operation === 'install') {
|
|
144
|
+
if (options.operation === 'install' || options.operation === 'update' && options.captureOnly) {
|
|
134
145
|
// One action configures Knowledge Integration + Development Capture
|
|
135
146
|
// together (per-client flags narrow the scope). No client UI is needed.
|
|
136
147
|
const summary = await manager.installAll({ clients, knowledgeOnly: options.knowledgeOnly, captureOnly: options.captureOnly, scope: options.scope });
|
package/docs/README.zh-CN.md
CHANGED
|
@@ -85,6 +85,23 @@ vector-hub 是唯一派生索引服务,外壳不再执行第二套索引写入
|
|
|
85
85
|
|
|
86
86
|
## 需求记录与查询
|
|
87
87
|
|
|
88
|
+
### 外部 Agent 会话采集
|
|
89
|
+
|
|
90
|
+
在网页左下角打开“系统状态 → 外部 Agent 采集”,对使用的工具点击“接入”或
|
|
91
|
+
“修复”;“移除采集”只移除托管 Hook,不删除历史记录或第三方配置。
|
|
92
|
+
“检测到命令/检测到配置”与“已配置采集”是不同状态,未检测到不等于没有安装。
|
|
93
|
+
配置完成后重新打开外部 Agent 会话,再到活动记录验证新会话是否出现。
|
|
94
|
+
|
|
95
|
+
```powershell
|
|
96
|
+
project-knowledge-integrations status --all
|
|
97
|
+
project-knowledge-integrations install --ide zcode --capture-only
|
|
98
|
+
project-knowledge-integrations uninstall --ide zcode --capture-only
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
ZCode 接入当前仅包含会话采集,不会冒充已安装 MCP/知识检索插件。
|
|
102
|
+
接入失败会显示操作 ID,并写入数据目录 `logs/system/YYYY-MM-DD.jsonl`;
|
|
103
|
+
网页“系统诊断记录”可查看和导出。注册消费者本身不能代替安装 Agent Hook。
|
|
104
|
+
|
|
88
105
|
Claude Code、Codex、OpenCode 集成可在编码前追加用户真实需求元数据。记录写入
|
|
89
106
|
项目 `requirements.jsonl`,不会触发分析或写知识。
|
|
90
107
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "project-knowledge/module-content/v1",
|
|
3
3
|
"productFiles": {
|
|
4
|
-
"ui/index.html": "
|
|
5
|
-
"ui/product.js": "
|
|
6
|
-
"ui/product.css": "
|
|
4
|
+
"ui/index.html": "e7291caab778eba3c5499d8286804ad1f4ef31c87a957f69c8fb77befc01321b",
|
|
5
|
+
"ui/product.js": "1a6ddedd97b00c3f798c13a0a55b0f63790e701483492bc97d28cae4034efaf8",
|
|
6
|
+
"ui/product.css": "73554abf3f951ea01a2bfe2df81748b702a6ca4488eea16bfe5afe04ef1dea70"
|
|
7
7
|
},
|
|
8
8
|
"modules": {
|
|
9
9
|
"terminal": {
|
|
10
10
|
"name": "@sanqianx/claude-ai-workbench",
|
|
11
11
|
"installName": "claude-ai-workbench",
|
|
12
|
-
"version": "0.13.
|
|
12
|
+
"version": "0.13.1",
|
|
13
13
|
"files": {
|
|
14
14
|
"LICENSE": "c1b9df1275e769f3dbab000d1e457a2d4b0f28eb5da6c77e48dc37eeba202ed7",
|
|
15
|
-
"README.md": "
|
|
15
|
+
"README.md": "07a12d2397f625bd9d3a5e2944012d031a03c0bf1c8237e7c2b6f47cb6636685",
|
|
16
16
|
"apps/agent-terminal/app.css": "39cc65ac65bcb390f4aa21d9b783182ca229557f6bec15090f69598120161917",
|
|
17
17
|
"apps/agent-terminal/app.js": "2fedcc79f9515ebae89d1c7dc996d732aa1d0946038eaaa045438121bf27f551",
|
|
18
18
|
"apps/agent-terminal/index.html": "6a52ba210696c8aed99e2786e21d2771340070d51583199dd74c8da41edf0257",
|
|
@@ -26,27 +26,27 @@
|
|
|
26
26
|
"apps/minimal-test-host/README.md": "fa73136f4ee3865c2d91eb97b2e8c03679aa4688e44c1e1c8ec6e27d604b0de5",
|
|
27
27
|
"docs/sdk/FILE_LAYOUT.md": "17882f96505c8161bfb66876684b9d2d3f50021a111b8b844502d3cb4e97870a",
|
|
28
28
|
"docs/sdk/INTEGRATION.md": "d4c0c80d2d2fc610205102d703a429bfaa20f9f3a48f1718f5bab02ee90138df",
|
|
29
|
-
"docs/sdk/openapi.yaml": "
|
|
29
|
+
"docs/sdk/openapi.yaml": "3e6cc332979a58d98073e5e04ceccef1c62aff681e78dc9f705450e6ad95006e",
|
|
30
30
|
"docs/sdk/README.md": "7ab591d39c36a3b84cfdf487ff567040ec453975f3ef0fba86dc822094667b61",
|
|
31
|
-
"package.json": "
|
|
31
|
+
"package.json": "88df20662b9034a4cfca3b5c49cf58f2ad41398d34abfd37078a13fe87642cd7",
|
|
32
32
|
"packages/client/index.d.ts": "fb66b7b21ac936cddcb7f74543cf4f3bb7e80c169534ec249ab8ef2356224162",
|
|
33
33
|
"packages/client/index.js": "92fe5ddd32289d729f336f669e47bd9601e562f5a4309ee4fa7f7f15b567edc2",
|
|
34
|
-
"packages/client/package.json": "
|
|
34
|
+
"packages/client/package.json": "4998341161acc712ef4b775004d2e791c232662269c18924029d7fa9e63e7452",
|
|
35
35
|
"packages/client/README.md": "342dff9b1dcbc85fccc9b980ed3e4e455aa71133af1d0805b8431ea2ac564ef8",
|
|
36
36
|
"packages/contracts/index.d.ts": "edc717067bfb864c6c95df0c408a799fbf90b7552519131e6dc35af3f9eb9006",
|
|
37
37
|
"packages/contracts/index.js": "565b4a88190dbb8994cd0a9309b30b00f64305d65505fff9fa360d7ce69dfb58",
|
|
38
|
-
"packages/contracts/package.json": "
|
|
38
|
+
"packages/contracts/package.json": "26d81905c0757c918ec9d0272645e4e6c3a5e64cfc7c31eb2e40c4f31f12dde1",
|
|
39
39
|
"packages/contracts/README.md": "44d83a3cc508cec6c5c20dfa1f2c08d5ea03e3afb2853639fdc0a9cc8eb5b9c8",
|
|
40
40
|
"packages/core/index.d.ts": "c95b24a13f8aeeb128497833cf298790563baca6036ea5d29a9d8daff53199d7",
|
|
41
41
|
"packages/core/index.js": "5579ceb1a63d3f962f5656c75f82cf60cd834fd270b4aa95e581bf38e4432448",
|
|
42
|
-
"packages/core/package.json": "
|
|
42
|
+
"packages/core/package.json": "a8dacd7a973ea57bcead83668aa837c3092537397d043b6f4a381a71c7fe7c8e",
|
|
43
43
|
"packages/core/README.md": "e222c546104a168f1038d95c6c4efb8e5603edd6145ab2cab79cab977fb710e5",
|
|
44
44
|
"packages/server/bin/agent-terminal-server.js": "b01297ab245a2b994bf42043b7469bd6e71d8f76a4bb99d4ed651e71844c152f",
|
|
45
45
|
"packages/server/bin/claude-workbench-server.js": "a8c46ed7e71afcc10e00a104ed6f2d0ac05346a743b33c3a5bd11b1314d80f40",
|
|
46
46
|
"packages/server/bin/claude-workbench.js": "98dbd550d4d657056a75a190e7ee0dffd9f760fba58783f3ffb8d389ad7a32de",
|
|
47
47
|
"packages/server/index.d.ts": "ad39d5091056df5ec94e031a0de47c2c4ff75128ec3edadc3d3a364fca1b912b",
|
|
48
|
-
"packages/server/index.js": "
|
|
49
|
-
"packages/server/lib/agent-discovery.js": "
|
|
48
|
+
"packages/server/index.js": "96750689d90661c49bcdd170ed3f2d4e19dafd180ae62640e2207c3b261a8918",
|
|
49
|
+
"packages/server/lib/agent-discovery.js": "7fa15684329fd287cd0869183808311bf975263255425562f2896bc2c1a69e7c",
|
|
50
50
|
"packages/server/lib/agent-registry.js": "1c1ce6771ee3fc217293b5c5166ade8f098b6d5d68d47511bd772ba86ee438e9",
|
|
51
51
|
"packages/server/lib/attachment-store.js": "5c92c45c7ec5a8b0ee9c14edb42eeda5fce93d8e654718dcd75c12e3f0bfa6e7",
|
|
52
52
|
"packages/server/lib/bridges/app-server-bridge.js": "85bb644ab570a7a7e6aa26123c8e3cd2e8c11c3ff4e1270954b8e26517968f69",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"packages/server/lib/capture-settings-store.js": "eb18885d7bedd3e353287dd7d1cf81e815e5d65d5d82170aa8fe5506a03de8bd",
|
|
55
55
|
"packages/server/lib/context-resolver.js": "d3060bfe35fb184e521847fc0900cf6114f8ebf3120ce13ed39dfc224af54660",
|
|
56
56
|
"packages/server/lib/conversation-capture.js": "9f3ee29003eaea4778dc1e4b7e23e868f2ba0268bd43db07317acba62f48a094",
|
|
57
|
+
"packages/server/lib/diagnostics.js": "b45687fcc07f8baeb33ffd08efdc875494d4e3205887514fdfd7e1ce6370753b",
|
|
57
58
|
"packages/server/lib/drivers/cli-json-runner.js": "c3febcea2df92b72125d053a4ffe6349e61caa98491acb6123ae964b6b90de8a",
|
|
58
59
|
"packages/server/lib/drivers/codex-driver.js": "cb6f60048af534d836c7e95c494fbd16aa28ba24c5e94d76edb2eb9720f4cb54",
|
|
59
60
|
"packages/server/lib/drivers/opencode-driver.js": "119b11663d926a3f5f7c63c960264784879459b3f84e6fdf482b4346697a6376",
|
|
@@ -67,10 +68,10 @@
|
|
|
67
68
|
"packages/server/lib/profile-store.js": "2a4496970c4b54a814f043cdeda87b897ad80d298dd96385964cf17e8164e6c6",
|
|
68
69
|
"packages/server/lib/project-store.js": "5225c78f3216340f01b99356496c8e2c2d9cfc6247954a3f00b273dd2cc5b692",
|
|
69
70
|
"packages/server/lib/session-archive-store.js": "d3335b832a6e9fb9792991056f6596a997a4959efa6e62b60fb60133fb724196",
|
|
70
|
-
"packages/server/lib/system-doctor.js": "
|
|
71
|
+
"packages/server/lib/system-doctor.js": "2b0e858d69d8fb268eaed950c9883473ee9850684b532bc2db8e14674a974919",
|
|
71
72
|
"packages/server/lib/ui-preferences-store.js": "e108cb22e7cc1f3438704913d5401e01de2c0e717eb2abd3bdc4727209393819",
|
|
72
|
-
"packages/server/lib/workbench-service.js": "
|
|
73
|
-
"packages/server/package.json": "
|
|
73
|
+
"packages/server/lib/workbench-service.js": "b5caac09665b21a118a0cd826adfa3f3006e68989182e4d80bf3a4554b951250",
|
|
74
|
+
"packages/server/package.json": "6e80c900440c99144a629458c287bc1215a2aa0841c7493612f8db00e9f5dc66",
|
|
74
75
|
"packages/server/README.md": "a34cfaa4f4e859008b44e2be8e1aafb56e97fe83e6129c968a8562945fa843f3",
|
|
75
76
|
"packages/ui/ai-profile-settings.d.ts": "0551b6c6eda6d18ea89a976daddf01b2161195f4874fe2d67a57cd9ecc6ce643",
|
|
76
77
|
"packages/ui/ai-profile-settings.js": "e92bbac67a1199d473e4e44b32d1cc76c5b6c79306d4fef9d9067a1bb6ec42ca",
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
"packages/ui/claude-terminal.js": "96bd217a4a7e4792ae3fbaaf46249ecee13b0f4e01fc6d25a1b8b22d8f8fe00c",
|
|
79
80
|
"packages/ui/index.d.ts": "e547ab39640fe7519fb367b78442dc8a2c51b2efd17b66f8b0a003b154b36ead",
|
|
80
81
|
"packages/ui/index.js": "f4394aabd395938f5c3fe587e430471d4033e83945a9b9c7e0149ad4040982c9",
|
|
81
|
-
"packages/ui/package.json": "
|
|
82
|
+
"packages/ui/package.json": "fd52ffefcb0dca34c5058d84559fe25a8d635469b039c9fd05b499889636731b",
|
|
82
83
|
"packages/ui/README.md": "793c4a9c286fee23f39062a1976ca3afe9d2816dcdb55e156ba940e1ef514f89",
|
|
83
84
|
"packages/ui/theme.css": "8f03a081272a7db11b196f7a70d0fafb1f8d954778f329f1ba53d110d9d5fd98",
|
|
84
85
|
"src/assets/claude-prompts.json": "cb111f2e0a45afe8a31c251a504d1ab5375966ed61291660e61fd2efd77f6d9f",
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
"src/backend/lib/ai-vendor-presets.js": "02c6de9c2e89ad0286426e8eb4900c3c6a4960ef0e8f9d27ffb5836062abfbb2",
|
|
92
93
|
"src/backend/lib/ai-workspace.js": "969917f26cd0b0a272932714819d838a2bab2a5aac5c4e946647dfa3afa479bf",
|
|
93
94
|
"src/backend/lib/automation-config.js": "c23b868bbcfbcece4465c9c939faccaef582667e858f3f36fc7b6d19bcd545e6",
|
|
94
|
-
"src/backend/lib/claude-cli-runner.js": "
|
|
95
|
+
"src/backend/lib/claude-cli-runner.js": "05cc4e57e7e52721de8d9e14eff1f37424bd094796bbbc70fcbca0a6c203d868",
|
|
95
96
|
"src/backend/lib/data-dir.js": "a62d96d1ab538e37690ad31fe4f51e84120b55b6bc767661ed98ad9242f879db",
|
|
96
97
|
"src/backend/lib/llm-client.js": "76d1a73fbea445b5ac34c23d1a3b084e0884c5efed6f7d3b9ed76d406d2cd038",
|
|
97
98
|
"src/backend/lib/model-context-windows.js": "f64f7c995143407b7390105087e3ebcd56a5a3ba2fd3019478a86f9e3c6b7896",
|
|
@@ -174,17 +175,17 @@
|
|
|
174
175
|
"eventBridge": {
|
|
175
176
|
"name": "@sanqianx/ai-coding-event-bridge-console",
|
|
176
177
|
"installName": "@sanqianx/ai-coding-event-bridge-console",
|
|
177
|
-
"version": "0.7.
|
|
178
|
+
"version": "0.7.2",
|
|
178
179
|
"files": {
|
|
179
180
|
"LICENSE": "94a3bded67f76ec9f6333ad3370111bcb6e5cadbeb6f306a8112f9543320ecc2",
|
|
180
|
-
"README.md": "
|
|
181
|
-
"console/index.html": "
|
|
182
|
-
"package.json": "
|
|
183
|
-
"src/agent-detect.js": "
|
|
181
|
+
"README.md": "4699558a9498f93a83587523ef5cae019d2146867f355134ea27100ac6245769",
|
|
182
|
+
"console/index.html": "bdc61db0ca9e6b5d8886418c1c03df141f39ab722f50d0c16bba75fe57ac46f0",
|
|
183
|
+
"package.json": "f6b965a9ce9440039d96767c7d126a8149cffa56559693955cca15b0707bcd60",
|
|
184
|
+
"src/agent-detect.js": "2a4752218e6cdb4151ae9796b23558c2dd94b55217a20fa1f1a76f506bb2f781",
|
|
184
185
|
"src/bin.js": "e443cfabb8df1a694c9e2415a292db81f183d9e31b7fe8f5f9a14d2a09d03052",
|
|
185
186
|
"src/bridge/bin/commit-boundary.js": "2c87126d9d6467ddae13acc1d0997f2124a68174738b8cd6f8614e7eeccb3d0d",
|
|
186
187
|
"src/bridge/connectors/capture-guard.js": "aa9c51a6012966c5b6eb66a40b61ada61fd2cfd43fd4f6985d7b655421e8a1e3",
|
|
187
|
-
"src/bridge/connectors/claude-code/hook-entry.js": "
|
|
188
|
+
"src/bridge/connectors/claude-code/hook-entry.js": "c88b9ace27e4d148ee7b04724ec2f990a0c71c6e59a4d22afb4c9a8e2e72048e",
|
|
188
189
|
"src/bridge/connectors/claude-code/notify.js": "4325684ac92c1a2e531aefc5cbcbc886dc2b58080c410ee5e879574593f077cd",
|
|
189
190
|
"src/bridge/connectors/codex/cursor-store.js": "077784e9c6b895dde95247706381dbaca68892e1382f3a957c3e90efb51059f5",
|
|
190
191
|
"src/bridge/connectors/codex/hook-entry.js": "d180a3713609b251ba8a9fdffbcf202346b1098ce4e07cd3ae696216a9f56e96",
|
|
@@ -199,21 +200,21 @@
|
|
|
199
200
|
"src/bridge/core/journal-router.js": "5fe48ae4240034f030807c80bdba35c6ef2cb7bfa3fa310105ce0fb77d272131",
|
|
200
201
|
"src/bridge/core/journal.js": "13c72396c970e6acd9a97900a926daa108aded01d8bb3735213e0feff8aa20b6",
|
|
201
202
|
"src/bridge/core/lock.js": "484988ce593d138183e7d94648ece97c88661e7fa8379f0ef7335a634fe15ba3",
|
|
202
|
-
"src/bridge/core/normalizer.js": "
|
|
203
|
+
"src/bridge/core/normalizer.js": "e8eaa3582538c8f45dfc8d3ceb21c1e2f46347917d086436cfd361d32f62302e",
|
|
203
204
|
"src/bridge/core/paths.js": "6e829c00105d3b9214942f33af6225b338c668ff4cdda5c3ab92cb759d54be30",
|
|
204
205
|
"src/bridge/core/project-registry.js": "8c5cc8e18d55af1a0c2d682c25ea1c37eb6f4687cf3eaa5997fc57532560d866",
|
|
205
206
|
"src/bridge/core/repo-context.js": "1627d416fd6aaa43d8c4be8ce5097bb69244b1afe7f1ce5e9f71956c5542ce3f",
|
|
206
|
-
"src/bridge/core/runtime-home.js": "
|
|
207
|
+
"src/bridge/core/runtime-home.js": "f2bfffba20c8256259cecc1014261897a4d6f721807c04b2e4d2b3dc973f14e1",
|
|
207
208
|
"src/bridge/core/semver.js": "7f87ed40f3af3ae0480abc9934946358f0caa5d951472d5892b088aa468ec0f1",
|
|
208
209
|
"src/bridge/core/turn-identity.js": "4ee79410d0122ca93cea565591c183db6bff64b0a467f50a4e590de4ee78c399",
|
|
209
210
|
"src/bridge/index.js": "7f56d08fdcfa815a45f50c73b27d0627497ac364da55cd8e6635351f734b57b2",
|
|
210
211
|
"src/bridge/installers/claude-code/installer.js": "c0a8a39d654e886fad838a54a2acb535096384d6307c88eb5dc813992efefbd2",
|
|
211
212
|
"src/bridge/installers/codex/installer.js": "0c8542c2320b7e7b654ad22163bd5ee26f3792545f521e096ee5c795f2ec9303",
|
|
212
213
|
"src/bridge/installers/opencode/installer.js": "27f2ed3629e55b4ee083c6d0d4ceafc614145102ead2ba99630ad979c120ab08",
|
|
213
|
-
"src/bridge/installers/zcode/installer.js": "
|
|
214
|
+
"src/bridge/installers/zcode/installer.js": "625343d6a9fc81b81fb3d1fcd12ac6cdf6d33fae45925631db88aaf74fe497ff",
|
|
214
215
|
"src/bridge/query/conversation-query.js": "89db83f3f4bf5e2807603589da9fa03b4b494e1cb94afc772e57572ccdcb0854",
|
|
215
216
|
"src/pick-folder.js": "70f55df999262b90433f2b4251aa69dd70a23b55a84756b5f1d24dbeacfbda31",
|
|
216
|
-
"src/server.js": "
|
|
217
|
+
"src/server.js": "d521073673b4e1cc84cc9fab46aae5c07f3274f7cdcf20f78696b7808be5103c"
|
|
217
218
|
}
|
|
218
219
|
}
|
|
219
220
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanqianx/project-knowledge",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.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": {
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
"@huggingface/transformers": "3.8.1",
|
|
81
81
|
"@lancedb/lancedb": "0.31.0",
|
|
82
82
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
83
|
-
"@sanqianx/ai-coding-event-bridge-console": "0.7.
|
|
83
|
+
"@sanqianx/ai-coding-event-bridge-console": "0.7.2",
|
|
84
84
|
"@sanqianx/vector-hub": "1.0.7",
|
|
85
85
|
"buffer": "^6.0.3",
|
|
86
86
|
"cheerio": "^1.2.0",
|
|
87
|
-
"claude-ai-workbench": "npm:@sanqianx/claude-ai-workbench@0.13.
|
|
87
|
+
"claude-ai-workbench": "npm:@sanqianx/claude-ai-workbench@0.13.1",
|
|
88
88
|
"cross-spawn": "7.0.6",
|
|
89
89
|
"dotenv": "^17.4.2",
|
|
90
90
|
"gpt-tokenizer": "^3.4.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
|
|
3
3
|
"name": "project-knowledge",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.3",
|
|
5
5
|
"description": "Read durable project decisions and implementation history from Project Knowledge.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "SanQianX",
|
package/ui/index.html
CHANGED
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
<header><h2>系统状态</h2><button id="closeSystem" class="icon-button" aria-label="关闭系统状态">×</button></header>
|
|
38
38
|
<div class="drawer-content">
|
|
39
39
|
<section><h3>模块连接</h3><div id="moduleHealth"></div><button id="repairWiring">修复当前项目接线</button><p class="muted" id="wiringFeedback"></p><p class="muted" id="captureStatus"></p></section>
|
|
40
|
+
<section id="agentCaptureSection"><div class="actions"><h3>外部 Agent 采集</h3><button id="refreshAgentCapture">检查状态</button></div><p class="muted">只接入你使用的工具。采集外部开发会话,不会重新安装 Agent,也不影响已有记录。</p><div id="agentCaptureList"></div><p id="agentCaptureFeedback" class="feedback" role="status"></p></section>
|
|
40
41
|
<section><h3>后台维护模型</h3><p class="muted">使用持久化默认模型,不跟随聊天中的临时切换。</p><select id="maintenanceModel" aria-label="后台维护默认模型"></select><div class="actions"><button id="saveMaintenance">保存默认模型</button><button id="configureProviders">管理模型供应商</button></div><p id="configurationStatus" class="muted"></p></section>
|
|
41
42
|
<section><h3>向量检索模型</h3><p id="embeddingStatus" class="muted">正在读取配置。</p><button id="openEmbedding">配置向量模型</button><p class="muted">凭据由工作台统一保存。未配置时仍可使用文本检索。</p></section>
|
|
42
43
|
<section><h3>智脑设置</h3><label>名称<input id="brainName" maxlength="100"></label><label>知识根目录<div class="input-with-action"><input id="knowledgeRoot"><button id="pickRoot">选择</button></div></label><p class="muted">修改根目录不会移动已有项目知识或共享知识。</p><button id="saveBrainSettings">保存设置</button></section>
|
package/ui/product.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
:root{--page:#f3f5f7;--surface:#fff;--surface2:#f8f9fb;--surface3:#edf1f4;--line:#dce2e8;--text:#202733;--muted:#687587;--faint:#8e99a7;--nav:#eef1f4;--accent:#516f89;--accent-soft:#e6edf3;--good:#397761;--bad:#a05252;--bad-soft:#fbeeee;color-scheme:light}
|
|
2
|
+
.agent-capture-row{display:flex;align-items:center;gap:16px;padding:16px 0;border-bottom:1px solid var(--line)}.agent-capture-row>div:first-child{flex:1;min-width:0}.agent-capture-row small{display:block;color:var(--muted);margin-top:8px;overflow-wrap:anywhere}.agent-capture-row .actions{flex-shrink:0}#agentCaptureFeedback{white-space:pre-wrap}
|
|
2
3
|
#logsDialog{display:flex;flex-direction:column;overflow:hidden}#logsDialog:not([open]){display:none}#logsContent{overflow:auto;min-height:0;flex:1;margin-top:16px}#logsContent .row{align-items:flex-start;cursor:pointer}#logsContent pre{flex:1;min-width:0;margin:0}#logsContent .log-entry{border-bottom:1px solid var(--line)}#logsContent .log-detail{padding:16px;background:var(--surface2);max-height:320px;overflow:auto}#logsContent [data-level=warn],#logsContent [data-level=error],#logsContent [data-level=fatal]{color:var(--bad)}#logsContent .row time,#logsContent .row pre{color:inherit}
|
|
3
4
|
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
|
|
4
5
|
.knowledge-context{overflow-x:hidden}.reference{overflow-wrap:anywhere}.reference small{min-width:0;max-width:100%}
|