fix: advance offline demo from original conversation
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { createHash } from 'node:crypto';
|
||||
import { copyReleaseTree } from './release-copy.mjs';
|
||||
|
||||
export const REQUIRED_REPORTS = Object.freeze(['docs/RESEARCH.md', 'docs/research/CURSOR-MECHANISMS.md', 'docs/research/CONTEXT-RECOVERY.md', 'docs/research/TOOL-LOOP.md']);
|
||||
const hash = bytes => createHash('sha256').update(bytes).digest('hex');
|
||||
@@ -29,9 +30,9 @@ export function createDocumentationBundle({ root, portableRoot, evidenceRoot, ar
|
||||
const selected = new Set(entries.filter(row => /^docs\/[^/]+\.md$/.test(row.path) || /^docs\/research\/[^/]+\.(?:md|json)$/.test(row.path)).map(row => row.path));
|
||||
const references = [], shipped = [];
|
||||
fs.mkdirSync(evidenceRoot, { recursive: true });
|
||||
copyReleaseTree(path.join(root, 'docs'), path.join(evidenceRoot, 'docs'));
|
||||
for (const row of entries) {
|
||||
const target = path.join(evidenceRoot, row.path); fs.mkdirSync(path.dirname(target), { recursive: true });
|
||||
fs.copyFileSync(path.join(root, row.path), target);
|
||||
const target = path.join(evidenceRoot, row.path);
|
||||
if (hash(fs.readFileSync(target)) !== row.sha256) throw new Error('Original evidence copy differs: ' + row.path);
|
||||
}
|
||||
const evidenceManifest = { schema: 1, app: 'agent-workbench-evidence', sourceCommit, scope: 'Original docs tree, including all successful/failed historical evidence. No runtime execution dependency.', files: entries };
|
||||
|
||||
Reference in New Issue
Block a user