@sanqianx/project-knowledge 5.0.30 → 5.0.31
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 +21 -0
- package/_site/_test/appearance-settings-test.js +148 -0
- package/_site/_test/helpers/parallel-capture-safety-r5-cap-shell.js +606 -0
- package/_site/_test/helpers/parallel-capture-safety-r5-memory-shell.js +464 -0
- package/_site/_test/helpers/parallel-dock-acceptance-env.js +301 -0
- package/_site/_test/helpers/parallel-dock-acceptance-r2-env.js +378 -0
- package/_site/_test/helpers/parallel-dock-acceptance-r2-ui.js +314 -0
- package/_site/_test/helpers/parallel-dock-acceptance-ui.js +195 -0
- package/_site/_test/helpers/parallel-dock-isolation-r3-credential-preload.js +113 -0
- package/_site/_test/helpers/parallel-dock-isolation-r3-env.js +307 -0
- package/_site/_test/helpers/parallel-dock-isolation-r3-fixture.js +373 -0
- package/_site/_test/helpers/parallel-dock-isolation-r3-ui.js +314 -0
- package/_site/_test/helpers/parallel-engine-reconcile-r4-harness.js +340 -0
- package/_site/_test/helpers/parallel-engine-reconcile-r4-standin-analyzer.js +82 -0
- package/_site/_test/helpers/parallel-memory-capture-r3-cap-shell.js +605 -0
- package/_site/_test/helpers/parallel-memory-capture-r3-shell.js +176 -0
- package/_site/_test/helpers/parallel-memory-capture-r4-cap-shell.js +577 -0
- package/_site/_test/helpers/parallel-memory-injection-shell.js +723 -0
- package/_site/_test/helpers/parallel-memory-injection-wb-host.js +81 -0
- package/_site/_test/helpers/parallel-workbench-drafts-r5-fixture.js +295 -0
- package/_site/_test/helpers/parallel-workbench-drafts-r5-harness.js +573 -0
- package/_site/_test/helpers/parallel-workbench-drafts-r5-host.js +69 -0
- package/_site/_test/helpers/parallel-workbench-runtime-harness.js +587 -0
- package/_site/_test/helpers/qa-r45-harness.js +94 -0
- package/_site/_test/helpers/qa-r48-env.js +64 -0
- package/_site/_test/helpers/qa-r51-env.cjs +77 -0
- package/_site/_test/parallel-capture-safety-r5-cap006-probe.js +524 -0
- package/_site/_test/parallel-capture-safety-r5-cap008e-probe.js +577 -0
- package/_site/_test/parallel-capture-safety-r5-mem005-health-test.js +320 -0
- package/_site/_test/parallel-engine-reconcile-r4-eng007-probe.js +304 -0
- package/_site/_test/parallel-logging-acceptance-log003-probe.js +78 -0
- package/_site/_test/parallel-logging-acceptance-log004-probe.js +85 -0
- package/_site/_test/parallel-memory-capture-r3-cap001-probe.js +238 -0
- package/_site/_test/parallel-memory-capture-r3-cap006-probe.js +371 -0
- package/_site/_test/parallel-memory-capture-r3-cap008-probe.js +439 -0
- package/_site/_test/parallel-memory-capture-r3-mem005-persistence-test.js +271 -0
- package/_site/_test/parallel-memory-capture-r4-cap006-probe.js +519 -0
- package/_site/_test/parallel-memory-capture-r4-cap008e-probe.js +569 -0
- package/_site/_test/parallel-memory-capture-r4-mem005-health-test.js +314 -0
- package/_site/_test/parallel-memory-injection-origin-probe.js +412 -0
- package/_site/_test/parallel-memory-injection-probe.js +411 -0
- package/_site/_test/parallel-workbench-drafts-r4-probe.js +477 -0
- package/_site/_test/parallel-workbench-drafts-r5-chrome-env-bisect.js +89 -0
- package/_site/_test/parallel-workbench-drafts-r5-probe.js +593 -0
- package/_site/_test/parallel-workbench-runtime-minimax-probe.js +321 -0
- package/_site/_test/parallel-workbench-runtime-wb004-ordering.js +307 -0
- package/_site/_test/parallel-workbench-runtime-wb005-drafts.js +313 -0
- package/_site/_test/parallel-workbench-runtime-wb008-abort.js +321 -0
- package/_site/_test/qa-r45-offline-backfill-test.js +279 -0
- package/_site/_test/qa-r48-sys003-blank-secret-test.js +258 -0
- package/_site/_test/t07c-cln-001-002-007-coverage-test.js +135 -0
- package/_site/_test/t07d-git-rel-coverage-test.js +224 -0
- package/_site/_test/t07e-qta-coverage-test.js +195 -0
- package/_site/_test/t07f-mem-008-coverage-test.js +101 -0
- package/_site/lib/server-app.js +11 -2
- package/_site/lib/settings-store.js +43 -1
- package/module-runtime-manifest.json +6 -6
- package/package.json +1 -1
- package/plugins/project-knowledge/.claude-plugin/plugin.json +1 -1
- package/plugins/project-knowledge/.codex-plugin/plugin.json +1 -1
- package/plugins/project-knowledge/.mcp.json +1 -1
- package/ui/index.html +18 -1
- package/ui/product.css +6 -2
- package/ui/product.js +86 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// P-ENGINE-RECONCILE-R4 deterministic analyzer stand-in.
|
|
4
|
+
//
|
|
5
|
+
// SCOPE (declared): this stand-in writes REAL staged Markdown bytes and a REAL
|
|
6
|
+
// staging manifest through the engine's real promotion path (journal, backups,
|
|
7
|
+
// hashing, state advance, index sync). It does NOT exercise a real model, a
|
|
8
|
+
// real prompt, or any paid API - the promoted text is fixture content. The
|
|
9
|
+
// analyzer's atomic-file helper comes from the engine under test, so a
|
|
10
|
+
// candidate host promotes with its own bytes.
|
|
11
|
+
|
|
12
|
+
const fs = require('node:fs');
|
|
13
|
+
const path = require('node:path');
|
|
14
|
+
const crypto = require('node:crypto');
|
|
15
|
+
|
|
16
|
+
function hashBuffer(value) {
|
|
17
|
+
return `sha256:${crypto.createHash('sha256').update(value).digest('hex')}`;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function createStandinAnalyzer(options = {}) {
|
|
21
|
+
const { eventsFile = null, engineRoot = null } = options;
|
|
22
|
+
|
|
23
|
+
function record(entry) {
|
|
24
|
+
if (!eventsFile) return;
|
|
25
|
+
fs.mkdirSync(path.dirname(eventsFile), { recursive: true });
|
|
26
|
+
fs.appendFileSync(eventsFile, `${JSON.stringify({ ...entry, at: new Date().toISOString(), pid: process.pid })}\n`);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
sourceReadMode: 'isolated-frozen-evidence',
|
|
31
|
+
async runClaim(input) {
|
|
32
|
+
const claim = input.claim;
|
|
33
|
+
const sha = claim.commitSha;
|
|
34
|
+
record({ kind: 'start', projectId: input.projectId, runId: claim.runId, commitSha: sha });
|
|
35
|
+
try {
|
|
36
|
+
const filename = `changes/${sha.slice(0, 12)}.md`;
|
|
37
|
+
const markdown = [
|
|
38
|
+
'---',
|
|
39
|
+
`commit: ${sha}`,
|
|
40
|
+
`run: ${claim.runId}`,
|
|
41
|
+
'---',
|
|
42
|
+
`# Fixture knowledge ${input.projectId}`,
|
|
43
|
+
'',
|
|
44
|
+
`Commit ${sha} promoted by the deterministic stand-in analyzer (no real model output).`,
|
|
45
|
+
'',
|
|
46
|
+
].join('\n');
|
|
47
|
+
|
|
48
|
+
const atomicFilePath = engineRoot
|
|
49
|
+
? path.join(engineRoot, 'src', 'runtime', 'atomic-file.js')
|
|
50
|
+
: path.join(__dirname, '..', '..', '..', '_modules', 'knowledge-engine', 'src', 'runtime', 'atomic-file.js');
|
|
51
|
+
const AtomicFile = require(atomicFilePath);
|
|
52
|
+
AtomicFile.writeFileAtomic(path.join(input.stagingPath, 'files', ...filename.split('/')), markdown);
|
|
53
|
+
|
|
54
|
+
const references = [
|
|
55
|
+
`commit:${claim.commitSha}`,
|
|
56
|
+
`patch:${claim.patchHash}`,
|
|
57
|
+
`conversation:${claim.conversationSnapshotHash}`,
|
|
58
|
+
`retrieval:${claim.retrievalManifestHash}`,
|
|
59
|
+
];
|
|
60
|
+
AtomicFile.writeJsonAtomic(input.manifestPath, {
|
|
61
|
+
schema: 'knowledge-staging-manifest/v1',
|
|
62
|
+
projectId: input.projectId,
|
|
63
|
+
runId: claim.runId,
|
|
64
|
+
commitSha: claim.commitSha,
|
|
65
|
+
operations: [{
|
|
66
|
+
operation: 'create',
|
|
67
|
+
path: filename,
|
|
68
|
+
reason: 'Deterministic stand-in knowledge for reconciliation coverage',
|
|
69
|
+
sha256: hashBuffer(markdown),
|
|
70
|
+
evidenceReferences: references,
|
|
71
|
+
}],
|
|
72
|
+
memoryCandidates: [],
|
|
73
|
+
});
|
|
74
|
+
return { ok: true };
|
|
75
|
+
} finally {
|
|
76
|
+
record({ kind: 'finish', projectId: input.projectId, runId: claim.runId, commitSha: sha });
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
module.exports = { createStandinAnalyzer };
|