MCPcopy Create free account
hub / github.com/SethGammon/Citadel / verifyProjectTelemetry

Function verifyProjectTelemetry

core/telemetry/integrity.js:210–227  ·  view source on GitHub ↗
(projectRoot, options = {})

Source from the content-addressed store, hash-verified

208}
209
210function verifyProjectTelemetry(projectRoot, options = {}) {
211 const files = options.files || collectJsonlFiles(projectRoot);
212 const reports = files.map((file) => verifyJsonlFile(file, options));
213 return {
214 projectRoot,
215 files: reports,
216 totals: reports.reduce((acc, report) => {
217 acc.total += report.total;
218 acc.verified += report.verified;
219 acc.signed += report.signed;
220 acc.legacy += report.legacy;
221 acc.tampered += report.tampered.length;
222 acc.invalid += report.invalid.length;
223 acc.signatureWarnings += report.signatureWarnings.length;
224 return acc;
225 }, { total: 0, verified: 0, signed: 0, legacy: 0, tampered: 0, invalid: 0, signatureWarnings: 0 }),
226 };
227}
228
229module.exports = {
230 HASH_VERSION,

Callers 2

mainFunction · 0.85

Calls 2

collectJsonlFilesFunction · 0.85
verifyJsonlFileFunction · 0.85

Tested by

no test coverage detected