@action-state-group/capsule-viewer 0.3.0 → 0.4.0
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/README.md +3 -2
- package/dist/browser.js +1 -1
- package/dist/chart-dataset.d.ts +23 -0
- package/dist/chart-dataset.js +191 -0
- package/dist/chart-dataset.js.map +1 -0
- package/dist/chart-spec.d.ts +130 -0
- package/dist/chart-spec.js +638 -0
- package/dist/chart-spec.js.map +1 -0
- package/dist/chart-view.d.ts +27 -0
- package/dist/chart-view.js +374 -0
- package/dist/chart-view.js.map +1 -0
- package/dist/compliance-styles.js +0 -1
- package/dist/compliance-styles.js.map +1 -1
- package/dist/compliance-view.js +53 -17
- package/dist/compliance-view.js.map +1 -1
- package/dist/contract-report-wording.js +38 -2
- package/dist/contract-report-wording.js.map +1 -1
- package/dist/core-strip.d.ts +38 -0
- package/dist/core-strip.js +183 -0
- package/dist/core-strip.js.map +1 -0
- package/dist/emitter-shell.html +5 -1
- package/dist/emitter.js +13 -3
- package/dist/emitter.js.map +1 -1
- package/dist/evidence-graph-view.d.ts +6 -0
- package/dist/evidence-graph-view.js +194 -76
- package/dist/evidence-graph-view.js.map +1 -1
- package/dist/evidence-graph.iife.js +5702 -1559
- package/dist/outcome-report-view.js +49 -25
- package/dist/outcome-report-view.js.map +1 -1
- package/dist/presentation-builder.d.ts +15 -0
- package/dist/presentation-builder.js +36 -2
- package/dist/presentation-builder.js.map +1 -1
- package/dist/presentation-mount.d.ts +2 -0
- package/dist/presentation-mount.js +1 -0
- package/dist/presentation-mount.js.map +1 -1
- package/dist/report-front-styles.d.ts +2 -2
- package/dist/report-front-styles.js +3 -15
- package/dist/report-front-styles.js.map +1 -1
- package/dist/report-front.d.ts +2 -24
- package/dist/report-front.js +11 -145
- package/dist/report-front.js.map +1 -1
- package/dist/report-levels.d.ts +33 -1
- package/dist/report-levels.js +135 -0
- package/dist/report-levels.js.map +1 -1
- package/dist/viewer-build.js +3 -3
- package/dist/viewer-build.js.map +1 -1
- package/dist/wording/contract-report-eu-ai-act.en.json +24 -0
- package/dist/wording/contract-report-outcomes.en.json +24 -0
- package/package.json +5 -3
package/dist/emitter-shell.html
CHANGED
|
@@ -297,9 +297,13 @@
|
|
|
297
297
|
<style>__THEME_SLOT__</style>
|
|
298
298
|
</head>
|
|
299
299
|
<body>
|
|
300
|
+
<!-- prettier-ignore -->
|
|
301
|
+
<noscript><p>This page needs scripts to show the report. A version without scripts can be built from the same bundle with render-report --format static.</p></noscript>
|
|
300
302
|
<div id="app"></div>
|
|
301
303
|
<!-- prettier-ignore -->
|
|
302
|
-
<script
|
|
304
|
+
<script type="application/json">__BUNDLE_SLOT__</script>
|
|
305
|
+
<!-- prettier-ignore -->
|
|
306
|
+
<script>window.__BUNDLE__ = JSON.parse(document.currentScript.previousElementSibling.textContent);</script>
|
|
303
307
|
<!-- prettier-ignore -->
|
|
304
308
|
<script>__CORE_RUNTIME_SLOT__</script>
|
|
305
309
|
<!-- prettier-ignore -->
|
package/dist/emitter.js
CHANGED
|
@@ -3,6 +3,8 @@ import { createHash } from "node:crypto";
|
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { COMPLIANCE_CSS } from "./compliance-styles.js";
|
|
5
5
|
import { COMPOSED_CSS } from "./composed-styles.js";
|
|
6
|
+
import { CHART_CSS } from "./chart-view.js";
|
|
7
|
+
import { CORE_STRIP_CSS } from "./core-strip.js";
|
|
6
8
|
import { jcs } from "@action-state-group/agent-action-capsule";
|
|
7
9
|
import { OUTCOME_REPORT_CSS } from "./outcome-report-styles.js";
|
|
8
10
|
import { RECORD_CONTENT_CSS } from "./record-content.js";
|
|
@@ -37,6 +39,8 @@ export const CORE_RUNTIME_STYLES = [
|
|
|
37
39
|
COMPLIANCE_CSS,
|
|
38
40
|
RECORD_CONTENT_CSS,
|
|
39
41
|
COMPOSED_CSS,
|
|
42
|
+
CORE_STRIP_CSS,
|
|
43
|
+
CHART_CSS,
|
|
40
44
|
];
|
|
41
45
|
const shell = readFileSync(new URL("./emitter-shell.html", import.meta.url), "utf8");
|
|
42
46
|
function replaceSingle(template, placeholder, value) {
|
|
@@ -95,9 +99,12 @@ function checkInline(name, value, endTag) {
|
|
|
95
99
|
throw new Error(`${name} must not contain CR or NUL characters`);
|
|
96
100
|
}
|
|
97
101
|
}
|
|
98
|
-
// Collect the text of every <script> and <style> element in document
|
|
99
|
-
// The shell writes
|
|
100
|
-
// element's text runs to the first matching end
|
|
102
|
+
// Collect the text of every bare <script> and <style> element in document
|
|
103
|
+
// order: the ones the CSP hashes. The shell writes their start tags bare, and
|
|
104
|
+
// checkInline guarantees each element's text runs to the first matching end
|
|
105
|
+
// tag. The bundle's <script type="application/json"> element is skipped on
|
|
106
|
+
// purpose: it is data the browser never runs, so it needs no hash, and
|
|
107
|
+
// hashing it would put a per-bundle source in script-src.
|
|
101
108
|
function inlineElements(html) {
|
|
102
109
|
const found = { script: [], style: [] };
|
|
103
110
|
let offset = 0;
|
|
@@ -167,6 +174,9 @@ export function emitEvidenceGraphHtml(bundle, browserIIFE, options = {}) {
|
|
|
167
174
|
}
|
|
168
175
|
});
|
|
169
176
|
});
|
|
177
|
+
// The shell carries the bundle in a JSON data element that a fixed script
|
|
178
|
+
// reads with JSON.parse, so every member, "__proto__" included, stays data
|
|
179
|
+
// (an object literal would make "__proto__" the object's prototype, #109).
|
|
170
180
|
const embeddedBundleJson = escapeJsonForHtmlScript(bundleJson);
|
|
171
181
|
let html = replaceSingle(shell, titleSlot, escapeHtmlText(title));
|
|
172
182
|
html = replaceSingle(html, themeSlot, themeCss);
|
package/dist/emitter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitter.js","sourceRoot":"","sources":["../src/emitter.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EA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gB,GAAG,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;IAC7E,MAAM,GAAG,GAAG;QACV,oBAAoB;QACpB,mBAAmB;QACnB,aAAa;YACX,GAAG,YAAY;YACf,GAAG,CAAC,gBAAgB,CAAC,MAAM,KAAK,CAAC;gBAC/B,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,CAAC,iBAAiB,EAAE,GAAG,gBAAgB,CAAC,CAAC;SAC9C,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACb,eAAe;QACf,oBAAoB;QACpB,iBAAiB;QACjB,oBAAoB;KACrB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,GAAG,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;IACzC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;IACD,MAAM,IAAI,GACR,GAAG,IAAI,eAAe,KAAK,CAAC,UAAU,QAAQ;QAC9C,gBAAgB,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,eAAe,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,CAAC,OAAO,aAAa,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;IACzI,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -116,6 +116,12 @@ export interface RenderEvidenceGraphOptions {
|
|
|
116
116
|
* use the core's own labels and do not read it.
|
|
117
117
|
*/
|
|
118
118
|
readonly wording?: WordingPackInput;
|
|
119
|
+
/**
|
|
120
|
+
* Chart specs (docs/design/chart-spec.md), drawn in L1 in this order. Each
|
|
121
|
+
* is checked against the dataset the Result names before it is drawn; a
|
|
122
|
+
* spec that fails is replaced by the core's notice, never drawn.
|
|
123
|
+
*/
|
|
124
|
+
readonly charts?: readonly unknown[];
|
|
119
125
|
/**
|
|
120
126
|
* The exact command that checks this file outside the page, shown when
|
|
121
127
|
* this viewer cannot verify it (see {@link renderUnableToVerify}).
|
|
@@ -3,11 +3,15 @@ import { AGENT_INPUT_ORIGINALS_EXTENSION, BOOK_PAYLOADS_EXTENSION, buildVerified
|
|
|
3
3
|
import { BUILTIN_MANIFEST_COMPOSED, BUILTIN_MANIFEST_EVALUATION_SUMMARY_GRAPH, BUILTIN_MANIFEST_NO_AGGREGATE, BUILTIN_MANIFEST_REPORT_ROWS, BUILTIN_MANIFEST_RESULT, BUILTIN_MANIFEST_RESULT_COMPLIANCE, BUILTIN_MANIFEST_RESULT_CONTRACT_REPORT, BUILTIN_MANIFEST_RESULT_OUTCOME_REPORT, } from "./builtin-manifests.js";
|
|
4
4
|
import { classifyCountersignatures, declaredProducerKeys, } from "@action-state-group/agent-action-capsule";
|
|
5
5
|
import { buildEvidenceGraph, EvidenceGraphError, zoneStatement, } from "@action-state-group/agent-action-capsule";
|
|
6
|
-
import { digestCapability } from "@action-state-group/agent-action-capsule";
|
|
7
|
-
import {
|
|
6
|
+
import { digestCapability, JcsFloatError, JcsUnsafeIntegerError, jsonDigest, } from "@action-state-group/agent-action-capsule";
|
|
7
|
+
import { chartDatasetOf } from "./chart-dataset.js";
|
|
8
|
+
import { ChartRefusal, checkChart } from "./chart-spec.js";
|
|
9
|
+
import { renderChart, renderChartRefused, renderCharts } from "./chart-view.js";
|
|
10
|
+
import { citesOneContract, renderContractReport, } from "./contract-report.js";
|
|
8
11
|
import { readOutcomeReportPresentation, } from "./outcome-report-presentation.js";
|
|
9
12
|
import { composedSectionModule } from "./composed-view.js";
|
|
10
|
-
import { DEFAULT_WORDS } from "./contract-report-wording.js";
|
|
13
|
+
import { DEFAULT_WORDS, contractReportWords, } from "./contract-report-wording.js";
|
|
14
|
+
import { CORE_STRIP_ATTRIBUTE, coreStripModel, renderCoreStrip, } from "./core-strip.js";
|
|
11
15
|
import { RECORD_CONTENT_CSS, renderContent } from "./record-content.js";
|
|
12
16
|
import { deferBody, recordAddress, revealRecord, revealRecordsByHash, } from "./report-levels.js";
|
|
13
17
|
import { readCompliancePresentation, } from "./compliance-presentation.js";
|
|
@@ -15,7 +19,7 @@ import { readPresentationBlock } from "@action-state-group/agent-action-capsule"
|
|
|
15
19
|
import { bundleVerified, PresentationAmbiguityError, PresentationRegistry, presentationExtensionRows, presentationRefusalNotices, } from "./presentation-registry.js";
|
|
16
20
|
import { aacInterpreters, aliasExtensionRows, } from "./alias-interpreters.js";
|
|
17
21
|
import { buildReportRows, } from "@action-state-group/agent-action-capsule";
|
|
18
|
-
import { buildResultRoot, isResultRoot, UNVERIFIED_KEY_LABEL,
|
|
22
|
+
import { buildResultRoot, isResultRoot, UNVERIFIED_KEY_LABEL, } from "@action-state-group/agent-action-capsule";
|
|
19
23
|
import { buildVerificationPageModel, CHECKED_ON_THIS_PAGE, CHECKS_SCOPE_LINE, FAILED_ON_THIS_PAGE, FULL_VERIFIER_LINE, NOT_CHECKED_ON_THIS_PAGE, RECEIPT_GRADE_DISPLAY, VERIFICATION_BANNER_LINES, verificationBanner, verificationCheckWords, } from "@action-state-group/agent-action-capsule";
|
|
20
24
|
function element(tag, text) {
|
|
21
25
|
const value = document.createElement(tag);
|
|
@@ -62,8 +66,6 @@ function appendTime(parent, label, value, absent) {
|
|
|
62
66
|
parent.append(cell);
|
|
63
67
|
}
|
|
64
68
|
const recordsWord = (count) => `${count} ${count === 1 ? "record" : "records"}`;
|
|
65
|
-
const evaluationsWord = (count) => `${count} ${count === 1 ? "evaluation" : "evaluations"}`;
|
|
66
|
-
const requirementsWord = (count) => `${count} ${count === 1 ? "requirement" : "requirements"}`;
|
|
67
69
|
// The banner is drawn from AAC's banner model alone (presentation contract
|
|
68
70
|
// section 6.2) and precedes every row in the DOM; a bundle that fails the
|
|
69
71
|
// page's own checks gets the refusal line here and no rows at all, so a
|
|
@@ -718,7 +720,7 @@ function renderCheckLists(host, lists, verifierHint) {
|
|
|
718
720
|
// `applied` is the set of extension interpreters this rendering ran; an
|
|
719
721
|
// extension row says "interpreted by" only for one of them. `refused` is
|
|
720
722
|
// every module this runtime refused that matched (page, then section).
|
|
721
|
-
async function renderVerificationPage(root, context, styled, applied, refused, citedSigners, verifierHint, depth, stamps) {
|
|
723
|
+
async function renderVerificationPage(root, context, styled, applied, refused, citedSigners, verifierHint, depth, stamps, charts) {
|
|
722
724
|
const { bundle, verification: verified } = context;
|
|
723
725
|
const section = element("section");
|
|
724
726
|
section.dataset.page = "verification";
|
|
@@ -747,6 +749,11 @@ async function renderVerificationPage(root, context, styled, applied, refused, c
|
|
|
747
749
|
appendValue(summary, "bundle digest", model.bundleDigest ?? "uncomputable");
|
|
748
750
|
appendValue(summary, "checkpoint root", model.checkpointRoot ?? "absent");
|
|
749
751
|
appendValue(summary, "checkpoint size", model.checkpointSize ?? "absent");
|
|
752
|
+
// Each chart spec the page was built with, by the SHA-256 of its JCS, and
|
|
753
|
+
// whether it was drawn (docs/design/chart-spec.md section 1).
|
|
754
|
+
charts.forEach((chart, i) => appendValue(summary, `chart spec ${i + 1} sha256`, chart.refused === undefined
|
|
755
|
+
? chart.sha256
|
|
756
|
+
: `${chart.sha256} (not drawn: ${chart.refused})`));
|
|
750
757
|
page.append(summary);
|
|
751
758
|
renderReceipts(page, model.receipts);
|
|
752
759
|
if (model.selfWitnessed) {
|
|
@@ -1358,75 +1365,26 @@ const BUCKETS = [
|
|
|
1358
1365
|
// ER section 4.2: drawn only when the Result carries the fourth bucket.
|
|
1359
1366
|
["outOfScope", "out of scope", "buckets.out_of_scope"],
|
|
1360
1367
|
];
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
// do not bear out shows as a `count mismatch` marker beside the recomputed
|
|
1369
|
-
// value. `excluded as not applicable` is the one figure carried as stated:
|
|
1370
|
-
// no claim backs it, by construction. Coverage counts evaluations (one per
|
|
1371
|
-
// claim, ER §3), so the line also names how many distinct requirements the
|
|
1372
|
-
// claims cite, and an UNKNOWN count is never called unresolved requirements.
|
|
1368
|
+
/**
|
|
1369
|
+
* The marks the core puts on a Result's counts: the strip, the bucket tallies
|
|
1370
|
+
* and lists, and the count-mismatch markers. A page whose root is no Result
|
|
1371
|
+
* shows none of them; a module that draws one there is discarded for the
|
|
1372
|
+
* refusal (renderVerifiedContext).
|
|
1373
|
+
*/
|
|
1374
|
+
const RESULT_COUNT_MARKS = `[${CORE_STRIP_ATTRIBUTE}], .cv-strip, [data-bucket], [data-bucket-count], [data-count-mismatch]`;
|
|
1373
1375
|
/** Said above the generic Result page when a Result opted into a card whose layout cannot hold its claims (`claimsFitCard`). */
|
|
1374
1376
|
export const CARD_UNFIT_NOTE = "This Result's claims don't fit the report layout, so every claim is listed below instead.";
|
|
1377
|
+
// The Result page lists the claims by verdict, after the core strip, which
|
|
1378
|
+
// draws coverage first and then the buckets, never a single figure
|
|
1379
|
+
// (core-strip.ts). Every count drawn here is the recomputed one
|
|
1380
|
+
// (`result.bucketCounts`); a producer figure the claims do not bear out
|
|
1381
|
+
// shows as a `count mismatch` marker beside it. Each claim keeps its own
|
|
1382
|
+
// tier and grade on its row.
|
|
1375
1383
|
function renderResultPage(result, root) {
|
|
1376
1384
|
const section = element("section");
|
|
1377
1385
|
section.dataset.page = "result";
|
|
1378
1386
|
section.append(element("h1", "Evidence result"));
|
|
1379
|
-
// The requirements the in-force evaluations cover: every claim of one
|
|
1380
|
-
// requirement carries the same applies_from, so a requirement is in force
|
|
1381
|
-
// or later as a whole (ER section 4.3).
|
|
1382
|
-
const requirements = new Set(result.claims
|
|
1383
|
-
.filter((claim) => !claim.later)
|
|
1384
|
-
.map((claim) => JSON.stringify([claim.contractRef, claim.requirementRef]))).size;
|
|
1385
|
-
const coverage = element("p");
|
|
1386
|
-
coverage.append(`coverage: ${evaluationsWord(result.coverage.evaluatedPopulation)} of ${requirementsWord(requirements)}`);
|
|
1387
|
-
const evaluatedMarker = countMismatchMarker(result, "evaluated_population");
|
|
1388
|
-
if (evaluatedMarker !== undefined)
|
|
1389
|
-
coverage.append(" ", evaluatedMarker);
|
|
1390
|
-
coverage.append(` · ${result.coverage.excludedNotApplicable} excluded as not applicable · ${result.coverage.unknownCount} with an unknown result`);
|
|
1391
|
-
const unknownMarker = countMismatchMarker(result, "unknown_count");
|
|
1392
|
-
if (unknownMarker !== undefined)
|
|
1393
|
-
coverage.append(" ", unknownMarker);
|
|
1394
1387
|
const later = result.claims.filter((claim) => claim.later);
|
|
1395
|
-
const laterMarker = countMismatchMarker(result, "not_yet_in_force");
|
|
1396
|
-
if (later.length > 0 || laterMarker !== undefined) {
|
|
1397
|
-
coverage.append(` · ${evaluationsWord(later.length)} not yet in force`);
|
|
1398
|
-
if (laterMarker !== undefined)
|
|
1399
|
-
coverage.append(" ", laterMarker);
|
|
1400
|
-
coverage.dataset.notYetInForce = String(later.length);
|
|
1401
|
-
}
|
|
1402
|
-
coverage.dataset.coverage = "result";
|
|
1403
|
-
coverage.dataset.evaluated = String(result.coverage.evaluatedPopulation);
|
|
1404
|
-
coverage.dataset.requirements = String(requirements);
|
|
1405
|
-
coverage.dataset.excluded = String(result.coverage.excludedNotApplicable);
|
|
1406
|
-
coverage.dataset.excludedBasis = "stated";
|
|
1407
|
-
coverage.dataset.unknown = String(result.coverage.unknownCount);
|
|
1408
|
-
section.append(coverage);
|
|
1409
|
-
// ER sections 4.2 and 4.3: whenever a claim is dated, the date "in force"
|
|
1410
|
-
// is relative to; and whenever a claim is dated or the out-of-scope switch
|
|
1411
|
-
// is on, that these are the producer's copy of the contract, never checked
|
|
1412
|
-
// here.
|
|
1413
|
-
const dated = result.claims.some((claim) => claim.appliesFrom !== undefined);
|
|
1414
|
-
if (dated || result.buckets.outOfScope !== undefined) {
|
|
1415
|
-
const copied = element("p");
|
|
1416
|
-
if (dated) {
|
|
1417
|
-
// A dated Result passed validation, so generated_at parses.
|
|
1418
|
-
const date = utcDateOf(result.generatedAt) ?? result.generatedAt;
|
|
1419
|
-
copied.append(`In force as of ${date}. `);
|
|
1420
|
-
copied.dataset.asOf = date;
|
|
1421
|
-
}
|
|
1422
|
-
copied.append(dated && result.buckets.outOfScope !== undefined
|
|
1423
|
-
? "The dates and the out-of-scope switch are copied from the contract, not re-checked here."
|
|
1424
|
-
: dated
|
|
1425
|
-
? "The dates are copied from the contract, not re-checked here."
|
|
1426
|
-
: "The out-of-scope switch is copied from the contract, not re-checked here.");
|
|
1427
|
-
copied.dataset.copiedFacts = "contract";
|
|
1428
|
-
section.append(copied);
|
|
1429
|
-
}
|
|
1430
1388
|
const byId = new Map(result.claims.map((claim) => [claim.id, claim]));
|
|
1431
1389
|
const buckets = element("section");
|
|
1432
1390
|
buckets.dataset.buckets = "verdict";
|
|
@@ -1915,6 +1873,55 @@ export function resolvePresentation(context, audience = DEFAULT_AUDIENCE, format
|
|
|
1915
1873
|
/** `"*"`: no particular audience, so only modules serving every audience. */
|
|
1916
1874
|
const DEFAULT_AUDIENCE = "*";
|
|
1917
1875
|
const DEFAULT_FORMAT = "html";
|
|
1876
|
+
async function chartDigestsOf(charts) {
|
|
1877
|
+
const out = [];
|
|
1878
|
+
for (const spec of charts ?? []) {
|
|
1879
|
+
try {
|
|
1880
|
+
out.push({ sha256: await jsonDigest(spec) });
|
|
1881
|
+
}
|
|
1882
|
+
catch (err) {
|
|
1883
|
+
// A number JCS has no form for: the checker refuses that spec, and the
|
|
1884
|
+
// page goes on with the rest.
|
|
1885
|
+
if (!(err instanceof JcsFloatError || err instanceof JcsUnsafeIntegerError))
|
|
1886
|
+
throw err;
|
|
1887
|
+
out.push({ sha256: "uncomputable" });
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
return out;
|
|
1891
|
+
}
|
|
1892
|
+
/**
|
|
1893
|
+
* Check every chart against the Result's dataset and draw it, or the core's
|
|
1894
|
+
* notice for a chart that fails (chart-spec.ts). The page runtime checks
|
|
1895
|
+
* again here even when the builder already did: a page that reaches a reader
|
|
1896
|
+
* with a mismatch never shows the chart.
|
|
1897
|
+
*/
|
|
1898
|
+
async function drawCharts(context, result, charts, digests, words) {
|
|
1899
|
+
let dataset;
|
|
1900
|
+
let invalid;
|
|
1901
|
+
try {
|
|
1902
|
+
dataset =
|
|
1903
|
+
result === undefined ? undefined : await chartDatasetOf(context, result);
|
|
1904
|
+
}
|
|
1905
|
+
catch (err) {
|
|
1906
|
+
if (!(err instanceof ChartRefusal))
|
|
1907
|
+
throw err;
|
|
1908
|
+
invalid = err;
|
|
1909
|
+
}
|
|
1910
|
+
const parts = charts.map((spec, i) => {
|
|
1911
|
+
try {
|
|
1912
|
+
if (invalid !== undefined)
|
|
1913
|
+
throw invalid;
|
|
1914
|
+
return renderChart(checkChart(spec, dataset), i, digests[i].sha256, words);
|
|
1915
|
+
}
|
|
1916
|
+
catch (err) {
|
|
1917
|
+
if (!(err instanceof ChartRefusal))
|
|
1918
|
+
throw err;
|
|
1919
|
+
digests[i].refused = err.reason;
|
|
1920
|
+
return renderChartRefused(i, err.reason, words);
|
|
1921
|
+
}
|
|
1922
|
+
});
|
|
1923
|
+
return renderCharts(parts);
|
|
1924
|
+
}
|
|
1918
1925
|
/**
|
|
1919
1926
|
* True when the rendered page module checked the producer signature of the
|
|
1920
1927
|
* records it cites as signers: the built-in Result page, on a Close (or a
|
|
@@ -2059,6 +2066,7 @@ const sameLook = (a, b) => a.look === b.look &&
|
|
|
2059
2066
|
box.height >=
|
|
2060
2067
|
b.clips[i].height - Math.max(0, box.bar - b.clips[i].bar) - 1) &&
|
|
2061
2068
|
Math.abs(a.place[0] - b.place[0]) <= 2 * SIDE_MARGIN_SLACK &&
|
|
2069
|
+
Math.abs(a.below - b.below) <= SIDE_MARGIN_SLACK &&
|
|
2062
2070
|
a.place[1] - b.place[1] >= -SIDE_MARGIN_SLACK &&
|
|
2063
2071
|
a.offsets.length === b.offsets.length &&
|
|
2064
2072
|
a.offsets.every((m, i) => Math.abs(m - b.offsets[i]) <= SIDE_MARGIN_SLACK);
|
|
@@ -2372,6 +2380,34 @@ async function renderVerifiedContext(context, root, options) {
|
|
|
2372
2380
|
uncheckpointed: bannerModel.uncheckpointed,
|
|
2373
2381
|
total: Array.isArray(records) ? records.length : 0,
|
|
2374
2382
|
};
|
|
2383
|
+
// The core's strip opens L0 on a verified bundle whose root is an
|
|
2384
|
+
// Evidence Result (core-strip.ts; presentation contract section 9.1). Its
|
|
2385
|
+
// words are the contract report's, in the grouping the module draws and
|
|
2386
|
+
// the page's wording pack; a page with no Result draws no strip.
|
|
2387
|
+
let strip;
|
|
2388
|
+
let chartsNode;
|
|
2389
|
+
const chartDigests = await chartDigestsOf(options.charts);
|
|
2390
|
+
const charted = options.charts !== undefined && options.charts.length > 0;
|
|
2391
|
+
if (verified) {
|
|
2392
|
+
const result = await resultRootOf(context);
|
|
2393
|
+
const grouping = contractReportGroupingOf(bundle) ?? "lines";
|
|
2394
|
+
const words = result === undefined && !charted
|
|
2395
|
+
? undefined
|
|
2396
|
+
: await contractReportWords(grouping, options.wording, {
|
|
2397
|
+
singleContract: result !== undefined && citesOneContract(result),
|
|
2398
|
+
});
|
|
2399
|
+
if (result !== undefined)
|
|
2400
|
+
strip = await coreStripModel(result, words);
|
|
2401
|
+
// With no Result there is no dataset: each chart shows its notice
|
|
2402
|
+
// (chart-no-dataset), never nothing.
|
|
2403
|
+
if (charted)
|
|
2404
|
+
chartsNode = await drawCharts(context, result, options.charts, chartDigests, words);
|
|
2405
|
+
}
|
|
2406
|
+
else
|
|
2407
|
+
// A failed bundle has no L1 (contract I1); the verification page says
|
|
2408
|
+
// why no chart was drawn.
|
|
2409
|
+
for (const digest of chartDigests)
|
|
2410
|
+
digest.refused = "the bundle did not verify";
|
|
2375
2411
|
// The host's three regions, in order after the banner and the header
|
|
2376
2412
|
// (presentation contract section 9.1). L2 opens with the core's
|
|
2377
2413
|
// verification section, drawn last but placed first; a module's L2 detail
|
|
@@ -2389,6 +2425,7 @@ async function renderVerifiedContext(context, root, options) {
|
|
|
2389
2425
|
core: root,
|
|
2390
2426
|
};
|
|
2391
2427
|
let bar;
|
|
2428
|
+
let stripNode;
|
|
2392
2429
|
const drawFrame = () => {
|
|
2393
2430
|
root.replaceChildren();
|
|
2394
2431
|
root.classList.remove("cv-shell-chrome");
|
|
@@ -2402,6 +2439,12 @@ async function renderVerifiedContext(context, root, options) {
|
|
|
2402
2439
|
// section 9.1, I1): no module renders, and a notice goes before L2.
|
|
2403
2440
|
if (verified) {
|
|
2404
2441
|
regions = { L0: region("L0"), L1: region("L1"), L2: L2module, core };
|
|
2442
|
+
stripNode = strip === undefined ? undefined : renderCoreStrip(strip);
|
|
2443
|
+
if (stripNode !== undefined)
|
|
2444
|
+
regions.L0.append(stripNode);
|
|
2445
|
+
// The charts open L1, in the order the build gave them (chart-view.ts).
|
|
2446
|
+
if (chartsNode !== undefined)
|
|
2447
|
+
regions.L1.append(chartsNode);
|
|
2405
2448
|
root.append(regions.L0, regions.L1, L2);
|
|
2406
2449
|
}
|
|
2407
2450
|
else {
|
|
@@ -2442,6 +2485,7 @@ async function renderVerifiedContext(context, root, options) {
|
|
|
2442
2485
|
look: "",
|
|
2443
2486
|
offsets: [],
|
|
2444
2487
|
place: [0, 0],
|
|
2488
|
+
below: 0,
|
|
2445
2489
|
readable: "unseen",
|
|
2446
2490
|
clips: [],
|
|
2447
2491
|
};
|
|
@@ -2453,9 +2497,12 @@ async function renderVerifiedContext(context, root, options) {
|
|
|
2453
2497
|
const ancestors = [];
|
|
2454
2498
|
for (let at = root.parentElement; at !== null; at = at.parentElement)
|
|
2455
2499
|
ancestors.push(at);
|
|
2500
|
+
// The L0 region's own box too, but not what a module writes in it: a
|
|
2501
|
+
// module that hides or moves the region hides the strip.
|
|
2456
2502
|
const elements = [
|
|
2457
2503
|
...ancestors,
|
|
2458
2504
|
root,
|
|
2505
|
+
...(stripNode === undefined ? [] : [regions.L0]),
|
|
2459
2506
|
...parts.flatMap((part) => [part, ...part.querySelectorAll("*")]),
|
|
2460
2507
|
];
|
|
2461
2508
|
// A browser also computes each element's ::before and ::after, whose
|
|
@@ -2510,7 +2557,15 @@ async function renderVerifiedContext(context, root, options) {
|
|
|
2510
2557
|
if (style?.position === "fixed")
|
|
2511
2558
|
fixed = true;
|
|
2512
2559
|
}
|
|
2560
|
+
// Every word of the banner and the strip: a module's content laid over
|
|
2561
|
+
// the strip is caught as one laid over the banner is.
|
|
2513
2562
|
const words = readable(parts, root);
|
|
2563
|
+
// The strip stays where the banner puts it: nothing a module draws, laid
|
|
2564
|
+
// out ahead of it (a flex or grid `order`, a float), pushes it down.
|
|
2565
|
+
const strip = parts.length > 0 ? parts[parts.length - 1] : undefined;
|
|
2566
|
+
const below = jsdom || strip === undefined || strip !== stripNode
|
|
2567
|
+
? 0
|
|
2568
|
+
: strip.getBoundingClientRect().top - box.top;
|
|
2514
2569
|
// The visible size of every box that clips the banner, from <html> down
|
|
2515
2570
|
// to the banner's own elements: a module that shrinks one (a scrolling
|
|
2516
2571
|
// host's height set to 0) clips the banner wherever the reader has
|
|
@@ -2567,26 +2622,45 @@ async function renderVerifiedContext(context, root, options) {
|
|
|
2567
2622
|
];
|
|
2568
2623
|
});
|
|
2569
2624
|
root.classList.toggle("cv-shell-chrome", had);
|
|
2570
|
-
return { look: seen, offsets, place, readable: words, clips };
|
|
2625
|
+
return { look: seen, offsets, place, below, readable: words, clips };
|
|
2571
2626
|
};
|
|
2627
|
+
// The core strip (core-strip.ts) is held to the same rules as the
|
|
2628
|
+
// banner: its words, structure and look are the core's, and it stays the
|
|
2629
|
+
// first thing in L0, right after the banner.
|
|
2572
2630
|
const frameOf = () => {
|
|
2573
2631
|
const detail = bar.nextElementSibling;
|
|
2574
2632
|
const parts = [
|
|
2575
2633
|
bar,
|
|
2576
2634
|
...(detail?.hasAttribute("data-banner-detail") ? [detail] : []),
|
|
2577
2635
|
];
|
|
2636
|
+
const held = [...parts, ...(stripNode === undefined ? [] : [stripNode])];
|
|
2578
2637
|
return {
|
|
2579
2638
|
parts,
|
|
2639
|
+
held,
|
|
2580
2640
|
header: bar.previousElementSibling,
|
|
2581
|
-
words: snapshot(
|
|
2641
|
+
words: snapshot(held),
|
|
2582
2642
|
looks: {
|
|
2583
|
-
plain: looks(
|
|
2584
|
-
chrome: looks(
|
|
2643
|
+
plain: looks(held, false),
|
|
2644
|
+
chrome: looks(held, true),
|
|
2585
2645
|
},
|
|
2586
2646
|
};
|
|
2587
2647
|
};
|
|
2588
2648
|
// Measured only when a module will render: it lays out the page.
|
|
2589
2649
|
let frame = selected !== undefined || section !== undefined ? frameOf() : undefined;
|
|
2650
|
+
// The strip is L0's first node and L0 follows the banner directly; no
|
|
2651
|
+
// other node on the page carries the strip's marker. On a page with no
|
|
2652
|
+
// Result, nothing on it may carry the marks of the Result's counts
|
|
2653
|
+
// (RESULT_COUNT_MARKS): a module or layout there draws no claim counts,
|
|
2654
|
+
// tallies or coverage (the 2026-10-25 ruling on #81, condition 2).
|
|
2655
|
+
const stripIntact = (last) => {
|
|
2656
|
+
if (stripNode === undefined)
|
|
2657
|
+
return root.querySelector(RESULT_COUNT_MARKS) === null;
|
|
2658
|
+
return (regions.L0.parentNode === root &&
|
|
2659
|
+
regions.L0.previousSibling === last &&
|
|
2660
|
+
regions.L0.firstChild === stripNode &&
|
|
2661
|
+
!stripNode.hidden &&
|
|
2662
|
+
root.querySelectorAll(`[${CORE_STRIP_ATTRIBUTE}], .cv-strip`).length === 1);
|
|
2663
|
+
};
|
|
2590
2664
|
const assertFrameIntact = () => {
|
|
2591
2665
|
const at = frame;
|
|
2592
2666
|
const [top, detail] = at.parts;
|
|
@@ -2604,8 +2678,9 @@ async function renderVerifiedContext(context, root, options) {
|
|
|
2604
2678
|
(detail !== undefined && detail.previousElementSibling !== top) ||
|
|
2605
2679
|
top.parentNode !== root ||
|
|
2606
2680
|
top.hidden ||
|
|
2607
|
-
|
|
2608
|
-
|
|
2681
|
+
!stripIntact(detail ?? top) ||
|
|
2682
|
+
snapshot(at.held) !== at.words ||
|
|
2683
|
+
!sameLook(looks(at.held, root.classList.contains("cv-shell-chrome")), root.classList.contains("cv-shell-chrome")
|
|
2609
2684
|
? at.looks.chrome
|
|
2610
2685
|
: at.looks.plain))
|
|
2611
2686
|
throw new Error("a module altered the verification banner");
|
|
@@ -2707,12 +2782,55 @@ async function renderVerifiedContext(context, root, options) {
|
|
|
2707
2782
|
if (ran !== undefined)
|
|
2708
2783
|
for (const id of moduleInterpreters(ran.module.manifest.id, context.bundle))
|
|
2709
2784
|
applied.add(id);
|
|
2710
|
-
const checkedLine = await renderVerificationPage(regions.core, context, chrome === OUTCOME_CHROME, applied, refused, refusal === undefined && citesCheckedSigners(selected), options.verifierHint, depth, stamps);
|
|
2785
|
+
const checkedLine = await renderVerificationPage(regions.core, context, chrome === OUTCOME_CHROME, applied, refused, refusal === undefined && citesCheckedSigners(selected), options.verifierHint, depth, stamps, chartDigests);
|
|
2711
2786
|
// The banner says the same counts as the section it links to.
|
|
2712
2787
|
const summary = root.querySelector("[data-verify-summary]");
|
|
2713
2788
|
if (summary !== null)
|
|
2714
2789
|
summary.textContent = checkedLine;
|
|
2790
|
+
linkCitedBy(root);
|
|
2715
2791
|
// A page opened at a record's address shows that record.
|
|
2716
2792
|
revealRecordsByHash(root.ownerDocument);
|
|
2717
2793
|
}
|
|
2794
|
+
// "Cited by" (capsule-viewer#83): each record a number on the page counts
|
|
2795
|
+
// links back to that number. The numbers say what they count themselves
|
|
2796
|
+
// (report-levels.ts `evidenceAction`: `data-cites`, the digests their claims
|
|
2797
|
+
// cite that this bundle carries, and `data-evidence-name`); this reads them
|
|
2798
|
+
// back once the module and the records section are drawn, and infers no
|
|
2799
|
+
// citation. The list sits in the record's entry beside its address, outside
|
|
2800
|
+
// the entry's lazily built body, so a page that runs no script carries it.
|
|
2801
|
+
function linkCitedBy(root) {
|
|
2802
|
+
const anchors = new Map();
|
|
2803
|
+
for (const anchor of root.querySelectorAll(".cv-record-anchor"))
|
|
2804
|
+
anchors.set(anchor.id, anchor);
|
|
2805
|
+
const citing = new Map();
|
|
2806
|
+
for (const action of root.querySelectorAll("details.cv-ev[data-cites]"))
|
|
2807
|
+
for (const digest of (action.dataset.cites ?? "").split(" ")) {
|
|
2808
|
+
// One entry may hold two addresses (a book record and the capsule it
|
|
2809
|
+
// carries): its list is one, under the entry's last address.
|
|
2810
|
+
const entry = anchors
|
|
2811
|
+
.get(recordAddress(digest))
|
|
2812
|
+
?.closest("details.cv-record");
|
|
2813
|
+
if (entry === undefined || entry === null)
|
|
2814
|
+
continue;
|
|
2815
|
+
const list = citing.get(entry) ?? [];
|
|
2816
|
+
if (!list.includes(action))
|
|
2817
|
+
list.push(action);
|
|
2818
|
+
citing.set(entry, list);
|
|
2819
|
+
}
|
|
2820
|
+
for (const [entry, actions] of citing) {
|
|
2821
|
+
const own = entry.querySelectorAll(":scope > .cv-record-anchor");
|
|
2822
|
+
const anchor = own[own.length - 1];
|
|
2823
|
+
const line = element("p", "Cited by: ");
|
|
2824
|
+
line.className = "cv-cited-by";
|
|
2825
|
+
line.dataset.citedBy = actions.map((a) => a.id).join(" ");
|
|
2826
|
+
actions.forEach((action, i) => {
|
|
2827
|
+
if (i > 0)
|
|
2828
|
+
line.append(" · ");
|
|
2829
|
+
const link = element("a", action.dataset.evidenceName ?? action.id);
|
|
2830
|
+
link.setAttribute("href", `#${action.id}`);
|
|
2831
|
+
line.append(link);
|
|
2832
|
+
});
|
|
2833
|
+
anchor.after(line);
|
|
2834
|
+
}
|
|
2835
|
+
}
|
|
2718
2836
|
//# sourceMappingURL=evidence-graph-view.js.map
|