@action-state-group/capsule-viewer 0.1.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.
Files changed (102) hide show
  1. package/README.md +74 -2
  2. package/dist/alias-interpreters.d.ts +18 -0
  3. package/dist/alias-interpreters.js +50 -0
  4. package/dist/alias-interpreters.js.map +1 -0
  5. package/dist/browser.d.ts +5 -2
  6. package/dist/browser.js +19 -5
  7. package/dist/browser.js.map +1 -1
  8. package/dist/builtin-manifests.d.ts +51 -0
  9. package/dist/builtin-manifests.js +196 -0
  10. package/dist/builtin-manifests.js.map +1 -0
  11. package/dist/chart-dataset.d.ts +23 -0
  12. package/dist/chart-dataset.js +191 -0
  13. package/dist/chart-dataset.js.map +1 -0
  14. package/dist/chart-spec.d.ts +130 -0
  15. package/dist/chart-spec.js +638 -0
  16. package/dist/chart-spec.js.map +1 -0
  17. package/dist/chart-view.d.ts +27 -0
  18. package/dist/chart-view.js +374 -0
  19. package/dist/chart-view.js.map +1 -0
  20. package/dist/compliance-styles.d.ts +1 -8
  21. package/dist/compliance-styles.js +40 -3
  22. package/dist/compliance-styles.js.map +1 -1
  23. package/dist/compliance-view.d.ts +41 -1
  24. package/dist/compliance-view.js +773 -303
  25. package/dist/compliance-view.js.map +1 -1
  26. package/dist/compliance.d.ts +33 -4
  27. package/dist/compliance.js +92 -13
  28. package/dist/compliance.js.map +1 -1
  29. package/dist/composed-styles.d.ts +12 -0
  30. package/dist/composed-styles.js +20 -0
  31. package/dist/composed-styles.js.map +1 -0
  32. package/dist/composed-view.d.ts +1 -1
  33. package/dist/composed-view.js +9 -2
  34. package/dist/composed-view.js.map +1 -1
  35. package/dist/contract-report-wording.d.ts +195 -0
  36. package/dist/contract-report-wording.js +1177 -0
  37. package/dist/contract-report-wording.js.map +1 -0
  38. package/dist/contract-report.d.ts +92 -0
  39. package/dist/contract-report.js +63 -0
  40. package/dist/contract-report.js.map +1 -0
  41. package/dist/core-strip.d.ts +38 -0
  42. package/dist/core-strip.js +183 -0
  43. package/dist/core-strip.js.map +1 -0
  44. package/dist/emitter-shell.html +181 -3
  45. package/dist/emitter.d.ts +36 -0
  46. package/dist/emitter.js +77 -4
  47. package/dist/emitter.js.map +1 -1
  48. package/dist/evidence-graph-view.d.ts +66 -7
  49. package/dist/evidence-graph-view.js +1483 -127
  50. package/dist/evidence-graph-view.js.map +1 -1
  51. package/dist/evidence-graph.iife.js +17741 -6812
  52. package/dist/frame-tokens.generated.d.ts +3 -0
  53. package/dist/frame-tokens.generated.js +5 -0
  54. package/dist/frame-tokens.generated.js.map +1 -0
  55. package/dist/index.d.ts +3 -0
  56. package/dist/index.js +5 -0
  57. package/dist/index.js.map +1 -1
  58. package/dist/outcome-report-presentation.d.ts +48 -0
  59. package/dist/outcome-report-presentation.js +90 -0
  60. package/dist/outcome-report-presentation.js.map +1 -0
  61. package/dist/outcome-report-styles.d.ts +1 -16
  62. package/dist/outcome-report-styles.js +48 -45
  63. package/dist/outcome-report-styles.js.map +1 -1
  64. package/dist/outcome-report-view.d.ts +75 -2
  65. package/dist/outcome-report-view.js +1063 -436
  66. package/dist/outcome-report-view.js.map +1 -1
  67. package/dist/presentation-builder.d.ts +70 -6
  68. package/dist/presentation-builder.js +198 -70
  69. package/dist/presentation-builder.js.map +1 -1
  70. package/dist/presentation-fragment.d.ts +129 -0
  71. package/dist/presentation-fragment.js +213 -0
  72. package/dist/presentation-fragment.js.map +1 -0
  73. package/dist/presentation-mount.d.ts +4 -2
  74. package/dist/presentation-mount.js +2 -1
  75. package/dist/presentation-mount.js.map +1 -1
  76. package/dist/presentation-registry.d.ts +277 -0
  77. package/dist/presentation-registry.js +416 -0
  78. package/dist/presentation-registry.js.map +1 -0
  79. package/dist/record-content.d.ts +68 -0
  80. package/dist/record-content.js +153 -0
  81. package/dist/record-content.js.map +1 -0
  82. package/dist/record-dating.d.ts +10 -0
  83. package/dist/record-dating.js +76 -0
  84. package/dist/record-dating.js.map +1 -0
  85. package/dist/report-front-styles.d.ts +9 -0
  86. package/dist/report-front-styles.js +43 -0
  87. package/dist/report-front-styles.js.map +1 -0
  88. package/dist/report-front.d.ts +56 -0
  89. package/dist/report-front.js +140 -0
  90. package/dist/report-front.js.map +1 -0
  91. package/dist/report-levels.d.ts +238 -0
  92. package/dist/report-levels.js +874 -0
  93. package/dist/report-levels.js.map +1 -0
  94. package/dist/report-provenance.d.ts +111 -0
  95. package/dist/report-provenance.js +535 -0
  96. package/dist/report-provenance.js.map +1 -0
  97. package/dist/viewer-build.d.ts +37 -0
  98. package/dist/viewer-build.js +29 -0
  99. package/dist/viewer-build.js.map +1 -0
  100. package/dist/wording/contract-report-eu-ai-act.en.json +319 -0
  101. package/dist/wording/contract-report-outcomes.en.json +418 -0
  102. package/package.json +6 -3
package/README.md CHANGED
@@ -15,11 +15,83 @@ import {
15
15
  ```
16
16
 
17
17
  The in-browser renderer (`renderEvidenceGraph`) ships bundled as
18
- `dist/evidence-graph.iife.js`, for a page's core runtime slot. Bundle verification comes from
19
- `@action-state-group/agent-action-capsule`.
18
+ `dist/evidence-graph.iife.js`, for a page's core runtime slot, and the Go
19
+ module ships the same build as `go/pageruntime`. Bundle verification comes from
20
+ `@action-state-group/agent-action-capsule`. Besides `registerPresentation`,
21
+ the runtime's global `EvidenceGraph` carries the verifier functions a
22
+ presentation module may call: `buildResultRoot`, `disclosureOf`,
23
+ `ed25519Available`, `verifiedPayload`, `verifyDisclosureEnvelope` and
24
+ `verifyProducerEnvelope`.
20
25
 
21
26
  The code moved here from agent-action-capsule (agent-action-capsule#281) and
22
27
  keeps its BSD-3-Clause license (`LICENSE-BSD-3-Clause`); the rest of the
23
28
  package is Apache-2.0 (`LICENSE`).
24
29
 
30
+ ## Tuning the contract-report module's words
31
+
32
+ The contract-report module (`src/contract-report.ts`) resolves on
33
+ `contract-report/v1` (agent-action-capsule spec/contract-report-v1.md),
34
+ registered in place of `aac.builtin.result-contract-report/v0`. It draws
35
+ one of two layouts -- `lines` (the Outcomes report) or `groups` (the EU AI
36
+ Act Results) -- each with its own bundled default wording pack
37
+ (`src/wording/contract-report-outcomes.en.json`,
38
+ `src/wording/contract-report-eu-ai-act.en.json`). A host passes its own
39
+ pack as the page's `wording`; its entries replace the default pack's,
40
+ entry by entry.
41
+
42
+ **The module's own keys** sit under `card.*` (shared by both layouts: the
43
+ front block, dating, the proofs), `lines.*` (the Outcomes report only) and
44
+ `groups.*` (the EU AI Act Results only) -- plus the shared `prov.*`,
45
+ `chat.*`, `case.*` and `judge.*` prefixes. These are never contract-report/v1
46
+ section 3 keys: a pack cannot use them to set something section 3 owns, and
47
+ the module never uses a section 3 prefix for its own concepts. `card.pf.*`
48
+ is the per-claim proofs line (`card.pf.assurance`, `card.pf.assurance.line`,
49
+ `card.pf.wording`, `card.pf.wording.refused`, ...); `card.wording.refused` is
50
+ the visible notice a refused host layer draws.
51
+
52
+ **The section 3 keys this module reads**, and where each shows:
53
+
54
+ | Key | Shows |
55
+ | ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
56
+ | `report.title` | The card's heading (aliased onto `lines.title` / `groups.kicker`). |
57
+ | `report.summary` | One line under the title, drawn only when set (`reportSummary`, `report-levels.ts`). |
58
+ | `group.<segment>.title` | A group's heading -- the part of a row's `requirement_ref` before its first `.` (EU AI Act obligation headings; the Outcomes report's check groups). |
59
+ | `row.<requirement_ref>.label` | A row's name, in place of the producer's label or the id made readable. |
60
+ | `row.<requirement_ref>.detail` | A row's explanation, drawn beside its name when set. |
61
+ | `row.<requirement_ref>.not_evaluable` | The note shown when a row's claims are not evaluable, in place of the module's own note. |
62
+ | `verdict.met`, `.not_met`, `.not_evaluable`, `.out_of_scope` | Aliased onto the layout's own verdict words (`lines.verdict.*` / `groups.verdict.*`, and the Outcomes proofs' `lines.pf.verdict.*`): every pill and cell that draws that verdict. |
63
+ | `tier.recomputed`, `.judged` | Aliased onto the layout's own tier badge words. |
64
+ | `grade.self-attested`, `.witnessed`, `.countersigned` | Each claim's assurance line in its proofs (`assuranceRow`); locked, like `sufficiency.*` and `status.*`. |
65
+ | `sufficiency.satisfied`, `.gap`, `.insufficient`, `.unknown` | The same assurance line. |
66
+ | `status.<value>` | The same assurance line (the claim's carrier status, lowercased). |
67
+
68
+ A word with no entry, in any layer, is shown as its raw token or
69
+ identifier -- nothing is guessed. The default layer always words the
70
+ title (`lines.title` / `groups.kicker`, which `report.title` aliases). Until
71
+ the default EU pack carries `group.*` and `row.*` words, the EU card names
72
+ obligations and tests with the producer's labels, in italics as the
73
+ producer's text.
74
+
75
+ A Result whose claims the card cannot place one by one (a requirement
76
+ judged more than once in one conversation, claims under more than one
77
+ contract, claims of another type or id shape) is drawn as the generic
78
+ Result page, with a note, so no claim is merged or left out.
79
+
80
+ **The single-contract rule.** `row.*` and `group.*` apply only when every
81
+ claim in the Result cites the same `contract_ref` (`citesOneContract`,
82
+ contract-report.ts): a pack is written for one contract, and two contracts
83
+ can reuse one `requirement_ref` for different requirements. A Result that
84
+ cites more than one contract is drawn as the generic Result page (see
85
+ above), so the rule is a second guard for callers that draw a card directly.
86
+
87
+ **The refused-layer rule.** Each wording layer is checked on its own
88
+ (digest, shape, then fit against this module's words). A layer that does
89
+ not check is refused: it contributes no words, and the card draws with the
90
+ default layer alone, a visible `card.wording.refused` line
91
+ (`data-wording="refused"`) naming the reason, and a `card.pf.wording.refused`
92
+ proofs line naming the refused digest and the base layer that was applied
93
+ instead. The presentation builder (`buildPresentation`,
94
+ `presentation-builder.ts`) still refuses to _write_ a page whose pack does
95
+ not fit -- the graceful degrade above is only the live renderer's behaviour.
96
+
25
97
  Releases follow [RELEASING.md](https://github.com/action-state-group/capsule-viewer/blob/main/RELEASING.md).
@@ -0,0 +1,18 @@
1
+ import { type ExtensionInterpreterId, type ExtensionRow } from "@action-state-group/agent-action-capsule";
2
+ /** The interpreters of the two deprecated cards, as AAC 0.7.0 named them. */
3
+ export type AliasInterpreterId = "outcome-report-card" | "compliance-card";
4
+ /** An interpreter a page of this viewer can run. */
5
+ export type PageInterpreterId = ExtensionInterpreterId | AliasInterpreterId;
6
+ /** AAC's extension row, with the alias interpreters as possible values. */
7
+ export interface PageExtensionRow extends Omit<ExtensionRow, "interpreter"> {
8
+ readonly interpreter?: PageInterpreterId;
9
+ }
10
+ /**
11
+ * AAC's extension rows, with a deprecated card's block shown as AAC 0.7.0
12
+ * showed it: interpreted by its card when that card's reader accepts the
13
+ * block and the card ran on this page (`applied`). Every other row is
14
+ * returned unchanged.
15
+ */
16
+ export declare function aliasExtensionRows(bundle: unknown, rows: readonly ExtensionRow[], applied: ReadonlySet<PageInterpreterId>): readonly PageExtensionRow[];
17
+ /** The interpreters in `applied` that AAC itself names. */
18
+ export declare function aacInterpreters(applied: ReadonlySet<PageInterpreterId>): ReadonlySet<ExtensionInterpreterId>;
@@ -0,0 +1,50 @@
1
+ // SPDX-License-Identifier: BSD-3-Clause
2
+ // The extension interpreters of the two deprecated aliases of
3
+ // contract-report/v1, defined here so the verification page reads as it did
4
+ // with agent-action-capsule 0.7.0. AAC 0.8.0 removed `outcome-report-card`
5
+ // and `compliance-card` from its `ExtensionInterpreterId` and reports an
6
+ // `outcome-report/v1` or `eu-ai-act-compliance/v1` block as uninterpreted
7
+ // (its spec/REGISTRY.md section 14). Removed with the alias path in the
8
+ // follow-up (agent-action-capsule#379, PR C2).
9
+ import { EXTENSION_SHOWN, } from "@action-state-group/agent-action-capsule";
10
+ import { readCompliancePresentation } from "./compliance-presentation.js";
11
+ import { readOutcomeReportPresentation } from "./outcome-report-presentation.js";
12
+ // AAC 0.7.0 extension-interpreters.ts, the two removed entries.
13
+ const ALIAS_INTERPRETERS = Object.freeze({
14
+ "outcome-report/v1": {
15
+ id: "outcome-report-card",
16
+ accepts: (bundle) => readOutcomeReportPresentation(bundle) !== undefined,
17
+ },
18
+ "eu-ai-act-compliance/v1": {
19
+ id: "compliance-card",
20
+ accepts: (bundle) => readCompliancePresentation(bundle) !== undefined,
21
+ },
22
+ });
23
+ /**
24
+ * AAC's extension rows, with a deprecated card's block shown as AAC 0.7.0
25
+ * showed it: interpreted by its card when that card's reader accepts the
26
+ * block and the card ran on this page (`applied`). Every other row is
27
+ * returned unchanged.
28
+ */
29
+ export function aliasExtensionRows(bundle, rows, applied) {
30
+ return rows.map((row) => {
31
+ if (row.interpreter !== undefined ||
32
+ !Object.hasOwn(ALIAS_INTERPRETERS, row.id))
33
+ return row;
34
+ const interpreter = ALIAS_INTERPRETERS[row.id];
35
+ if (!interpreter.accepts(bundle) || !applied.has(interpreter.id))
36
+ return row;
37
+ return {
38
+ id: row.id,
39
+ integrity: row.integrity,
40
+ interpreter: interpreter.id,
41
+ semantics: EXTENSION_SHOWN[row.integrity === "covered" ? "covered" : "notCovered"],
42
+ };
43
+ });
44
+ }
45
+ const isAlias = (id) => id === "outcome-report-card" || id === "compliance-card";
46
+ /** The interpreters in `applied` that AAC itself names. */
47
+ export function aacInterpreters(applied) {
48
+ return new Set([...applied].filter((id) => !isAlias(id)));
49
+ }
50
+ //# sourceMappingURL=alias-interpreters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alias-interpreters.js","sourceRoot":"","sources":["../src/alias-interpreters.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,8DAA8D;AAC9D,4EAA4E;AAC5E,2EAA2E;AAC3E,yEAAyE;AACzE,0EAA0E;AAC1E,wEAAwE;AACxE,+CAA+C;AAC/C,OAAO,EACL,eAAe,GAGhB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAajF,gEAAgE;AAChE,MAAM,kBAAkB,GAKpB,MAAM,CAAC,MAAM,CAAC;IAChB,mBAAmB,EAAE;QACnB,EAAE,EAAE,qBAAqB;QACzB,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,6BAA6B,CAAC,MAAM,CAAC,KAAK,SAAS;KACzE;I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xE,CAAC;AACJ,CAAC"}
package/dist/browser.d.ts CHANGED
@@ -1,4 +1,7 @@
1
1
  export * from "./evidence-graph-view.js";
2
- export * from "./outcome-report-view.js";
3
- export * from "./compliance-view.js";
2
+ export * from "./contract-report.js";
3
+ export * from "./contract-report-wording.js";
4
+ export { conversationStatus } from "./outcome-report-view.js";
5
+ export { obligationStatus, rowStatus } from "./compliance-view.js";
4
6
  export * from "./presentation-mount.js";
7
+ export { buildResultRoot, disclosureOf, ed25519Available, verifiedPayload, verifyDisclosureEnvelope, verifyProducerEnvelope, } from "@action-state-group/agent-action-capsule";
package/dist/browser.js CHANGED
@@ -1,11 +1,25 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  // The in-browser renderer the emitted page runs. It is published only as
3
3
  // dist/evidence-graph.iife.js (`npm run emitter:iife`), which exposes
4
- // renderEvidenceGraph, and not as a package export: under the browser
5
- // condition @action-state-group/agent-action-capsule 0.1.1 lacks modules it
6
- // imports, which only the bundling plugin (scripts/aac-browser.mjs) supplies.
4
+ // renderEvidenceGraph, and not as a package export. It bundles
5
+ // @action-state-group/agent-action-capsule (0.9.0 or later) through that
6
+ // package's own browser entry, by plain package resolution. The Go module
7
+ // ships the build as go/pageruntime.
7
8
  export * from "./evidence-graph-view.js";
8
- export * from "./outcome-report-view.js";
9
- export * from "./compliance-view.js";
9
+ export * from "./contract-report.js";
10
+ export * from "./contract-report-wording.js";
11
+ export { conversationStatus } from "./outcome-report-view.js";
12
+ export { obligationStatus, rowStatus } from "./compliance-view.js";
10
13
  export * from "./presentation-mount.js";
14
+ // The verifier functions a presentation module may call on the runtime's
15
+ // global (EvidenceGraph), beside registerPresentation: agent-action-capsule's
16
+ // own functions, re-exported by name and unchanged, so a module verifies with
17
+ // the same verifier the page does (ed25519Available is its check that the
18
+ // browser can verify Ed25519 signatures; buildResultRoot is its Result
19
+ // reader, which the Show-evidence component, static/show_evidence.js, draws
20
+ // from). This list is the runtime's contract
21
+ // with presentation modules: a name is added here only from
22
+ // agent-action-capsule's verifier, and removing one breaks the modules that
23
+ // call it.
24
+ export { buildResultRoot, disclosureOf, ed25519Available, verifiedPayload, verifyDisclosureEnvelope, verifyProducerEnvelope, } from "@action-state-group/agent-action-capsule";
11
25
  //# sourceMappingURL=browser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,sEAAsE;AACtE,sEAAsE;AACtE,4EAA4E;AAC5E,8EAA8E;AAC9E,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,sEAAsE;AACtE,+DAA+D;AAC/D,yEAAyE;AACzE,0EAA0E;AAC1E,qCAAqC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACnE,cAAc,yBAAyB,CAAC;AAExC,yEAAyE;AACzE,8EAA8E;AAC9E,8EAA8E;AAC9E,0EAA0E;AAC1E,uEAAuE;AACvE,4EAA4E;AAC5E,6CAA6C;AAC7C,4DAA4D;AAC5D,4EAA4E;AAC5E,WAAW;AACX,OAAO,EACL,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,0CAA0C,CAAC"}
@@ -0,0 +1,51 @@
1
+ import type { PresentationManifest } from "./presentation-registry.js";
2
+ /**
3
+ * The seven built-in manifests of spec/presentation-contract-v0.md appendix A,
4
+ * as values. Each equals the JSON file of the same name under
5
+ * schemas/examples/presentation-manifest-v0/ (test/builtin-manifests.test.ts
6
+ * compares them when those files are present). The precedence between the
7
+ * built-in page shapes is stated here, in `forbids`, and nowhere in code:
8
+ *
9
+ * - rows first: every Result manifest forbids `spec_version:report/v1`;
10
+ * - the contract-report kind first among Result pages: the two cards and the
11
+ * generic Result page forbid `contract-report/v1`;
12
+ * - compliance only when outcome-report is not engaged: the compliance
13
+ * manifest forbids `outcome-report/v1`;
14
+ * - the generic Result page only when no card is engaged;
15
+ * - Result before graph: the graph forbids the Result profile;
16
+ * - the no-aggregate note is the one fallback.
17
+ */
18
+ export declare const BUILTIN_MANIFEST_REPORT_ROWS: PresentationManifest;
19
+ /**
20
+ * A Result root that opts into the contract-report view
21
+ * (spec/contract-report-v1.md). The core runtime ships no contract-report
22
+ * module, so this manifest draws the generic Result page. A registry that
23
+ * brings a contract-report module registers it in place of this manifest,
24
+ * never beside it (the two match the same descriptors).
25
+ */
26
+ export declare const BUILTIN_MANIFEST_RESULT_CONTRACT_REPORT: PresentationManifest;
27
+ export declare const BUILTIN_MANIFEST_RESULT_OUTCOME_REPORT: PresentationManifest;
28
+ export declare const BUILTIN_MANIFEST_RESULT_COMPLIANCE: PresentationManifest;
29
+ export declare const BUILTIN_MANIFEST_RESULT: PresentationManifest;
30
+ export declare const BUILTIN_MANIFEST_EVALUATION_SUMMARY_GRAPH: PresentationManifest;
31
+ export declare const BUILTIN_MANIFEST_NO_AGGREGATE: PresentationManifest;
32
+ /** All seven, in appendix A's table order (an order that decides nothing). */
33
+ export declare const BUILTIN_MANIFESTS: readonly PresentationManifest[];
34
+ /**
35
+ * The composition section: the generic view of a `composed/v1` block
36
+ * (members, observers, joins, composition closure, composed digest, and
37
+ * same-custody agreement shown as redundant, not corroborating). A specific
38
+ * module selected by the engaged extension alone.
39
+ *
40
+ * It is NOT one of the page manifests above, and must not be: one
41
+ * descriptor matches it together with each of the six specific page
42
+ * manifests (a Result root that also carries composed/v1, say), so the
43
+ * registration test of contract section 4.5 refuses it in that set, and it
44
+ * would equally refuse every composition-aware page module (appendix B,
45
+ * `org.example.composition-aware/v0`) that it is meant to sit beneath. It is
46
+ * resolved in the core's section registry instead, by the same algorithm,
47
+ * and renders after whichever page module the page registry selected.
48
+ */
49
+ export declare const BUILTIN_MANIFEST_COMPOSED: PresentationManifest;
50
+ /** The built-in section manifests (one today). */
51
+ export declare const BUILTIN_SECTION_MANIFESTS: readonly PresentationManifest[];
@@ -0,0 +1,196 @@
1
+ /**
2
+ * The seven built-in manifests of spec/presentation-contract-v0.md appendix A,
3
+ * as values. Each equals the JSON file of the same name under
4
+ * schemas/examples/presentation-manifest-v0/ (test/builtin-manifests.test.ts
5
+ * compares them when those files are present). The precedence between the
6
+ * built-in page shapes is stated here, in `forbids`, and nowhere in code:
7
+ *
8
+ * - rows first: every Result manifest forbids `spec_version:report/v1`;
9
+ * - the contract-report kind first among Result pages: the two cards and the
10
+ * generic Result page forbid `contract-report/v1`;
11
+ * - compliance only when outcome-report is not engaged: the compliance
12
+ * manifest forbids `outcome-report/v1`;
13
+ * - the generic Result page only when no card is engaged;
14
+ * - Result before graph: the graph forbids the Result profile;
15
+ * - the no-aggregate note is the one fallback.
16
+ */
17
+ export const BUILTIN_MANIFEST_REPORT_ROWS = Object.freeze({
18
+ spec_version: "aac.presentation-manifest/v0",
19
+ id: "aac.builtin.report-rows/v0",
20
+ presentation_api: "aac.presentation-api/v0",
21
+ runtime_min: "0.1.0",
22
+ trust_class: "trusted-executable",
23
+ requires: {
24
+ bundle_kind: "evidence-bundle/v2",
25
+ profiles: ["spec_version:report/v1"],
26
+ },
27
+ audiences: ["*"],
28
+ formats: ["html", "fragment", "embedded"],
29
+ fallback: false,
30
+ priority: 1,
31
+ executable: { carrier: "core-runtime" },
32
+ });
33
+ /**
34
+ * A Result root that opts into the contract-report view
35
+ * (spec/contract-report-v1.md). The core runtime ships no contract-report
36
+ * module, so this manifest draws the generic Result page. A registry that
37
+ * brings a contract-report module registers it in place of this manifest,
38
+ * never beside it (the two match the same descriptors).
39
+ */
40
+ export const BUILTIN_MANIFEST_RESULT_CONTRACT_REPORT = Object.freeze({
41
+ spec_version: "aac.presentation-manifest/v0",
42
+ id: "aac.builtin.result-contract-report/v0",
43
+ presentation_api: "aac.presentation-api/v0",
44
+ runtime_min: "0.1.0",
45
+ trust_class: "trusted-executable",
46
+ requires: {
47
+ bundle_kind: "evidence-bundle/v2",
48
+ profiles: ["result_version:evidence-result-v0"],
49
+ extensions: { required: ["contract-report/v1"] },
50
+ },
51
+ forbids: { profiles: ["spec_version:report/v1"] },
52
+ audiences: ["*"],
53
+ formats: ["html", "fragment", "embedded"],
54
+ fallback: false,
55
+ priority: 1,
56
+ executable: { carrier: "core-runtime" },
57
+ });
58
+ export const BUILTIN_MANIFEST_RESULT_OUTCOME_REPORT = Object.freeze({
59
+ spec_version: "aac.presentation-manifest/v0",
60
+ id: "aac.builtin.result-outcome-report/v0",
61
+ presentation_api: "aac.presentation-api/v0",
62
+ runtime_min: "0.1.0",
63
+ trust_class: "trusted-executable",
64
+ requires: {
65
+ bundle_kind: "evidence-bundle/v2",
66
+ profiles: ["result_version:evidence-result-v0"],
67
+ extensions: { required: ["outcome-report/v1"] },
68
+ },
69
+ forbids: {
70
+ profiles: ["spec_version:report/v1"],
71
+ extensions: ["contract-report/v1"],
72
+ },
73
+ audiences: ["*"],
74
+ formats: ["html", "fragment", "embedded"],
75
+ fallback: false,
76
+ priority: 1,
77
+ executable: { carrier: "core-runtime" },
78
+ });
79
+ export const BUILTIN_MANIFEST_RESULT_COMPLIANCE = Object.freeze({
80
+ spec_version: "aac.presentation-manifest/v0",
81
+ id: "aac.builtin.result-compliance/v0",
82
+ presentation_api: "aac.presentation-api/v0",
83
+ runtime_min: "0.1.0",
84
+ trust_class: "trusted-executable",
85
+ requires: {
86
+ bundle_kind: "evidence-bundle/v2",
87
+ profiles: ["result_version:evidence-result-v0"],
88
+ extensions: { required: ["eu-ai-act-compliance/v1"] },
89
+ },
90
+ forbids: {
91
+ profiles: ["spec_version:report/v1"],
92
+ extensions: ["contract-report/v1", "outcome-report/v1"],
93
+ },
94
+ audiences: ["*"],
95
+ formats: ["html", "fragment", "embedded"],
96
+ fallback: false,
97
+ priority: 1,
98
+ executable: { carrier: "core-runtime" },
99
+ });
100
+ export const BUILTIN_MANIFEST_RESULT = Object.freeze({
101
+ spec_version: "aac.presentation-manifest/v0",
102
+ id: "aac.builtin.result/v0",
103
+ presentation_api: "aac.presentation-api/v0",
104
+ runtime_min: "0.1.0",
105
+ trust_class: "trusted-executable",
106
+ requires: {
107
+ bundle_kind: "evidence-bundle/v2",
108
+ profiles: ["result_version:evidence-result-v0"],
109
+ },
110
+ forbids: {
111
+ profiles: ["spec_version:report/v1"],
112
+ extensions: [
113
+ "contract-report/v1",
114
+ "outcome-report/v1",
115
+ "eu-ai-act-compliance/v1",
116
+ ],
117
+ },
118
+ audiences: ["*"],
119
+ formats: ["html", "fragment", "embedded"],
120
+ fallback: false,
121
+ priority: 1,
122
+ executable: { carrier: "core-runtime" },
123
+ });
124
+ export const BUILTIN_MANIFEST_EVALUATION_SUMMARY_GRAPH = Object.freeze({
125
+ spec_version: "aac.presentation-manifest/v0",
126
+ id: "aac.builtin.evaluation-summary-graph/v0",
127
+ presentation_api: "aac.presentation-api/v0",
128
+ runtime_min: "0.1.0",
129
+ trust_class: "trusted-executable",
130
+ requires: {
131
+ bundle_kind: "evidence-bundle/v2",
132
+ profiles: ["spec_version:evaluation-summary/v1"],
133
+ },
134
+ forbids: { profiles: ["result_version:evidence-result-v0"] },
135
+ audiences: ["*"],
136
+ formats: ["html", "fragment", "embedded"],
137
+ fallback: false,
138
+ priority: 1,
139
+ executable: { carrier: "core-runtime" },
140
+ });
141
+ export const BUILTIN_MANIFEST_NO_AGGREGATE = Object.freeze({
142
+ spec_version: "aac.presentation-manifest/v0",
143
+ id: "aac.builtin.no-aggregate/v0",
144
+ presentation_api: "aac.presentation-api/v0",
145
+ runtime_min: "0.1.0",
146
+ trust_class: "trusted-executable",
147
+ requires: { bundle_kind: "evidence-bundle/v2" },
148
+ audiences: ["*"],
149
+ formats: ["html", "fragment", "embedded"],
150
+ fallback: true,
151
+ executable: { carrier: "core-runtime" },
152
+ });
153
+ /** All seven, in appendix A's table order (an order that decides nothing). */
154
+ export const BUILTIN_MANIFESTS = Object.freeze([
155
+ BUILTIN_MANIFEST_REPORT_ROWS,
156
+ BUILTIN_MANIFEST_RESULT_CONTRACT_REPORT,
157
+ BUILTIN_MANIFEST_RESULT_OUTCOME_REPORT,
158
+ BUILTIN_MANIFEST_RESULT_COMPLIANCE,
159
+ BUILTIN_MANIFEST_RESULT,
160
+ BUILTIN_MANIFEST_EVALUATION_SUMMARY_GRAPH,
161
+ BUILTIN_MANIFEST_NO_AGGREGATE,
162
+ ]);
163
+ /**
164
+ * The composition section: the generic view of a `composed/v1` block
165
+ * (members, observers, joins, composition closure, composed digest, and
166
+ * same-custody agreement shown as redundant, not corroborating). A specific
167
+ * module selected by the engaged extension alone.
168
+ *
169
+ * It is NOT one of the page manifests above, and must not be: one
170
+ * descriptor matches it together with each of the six specific page
171
+ * manifests (a Result root that also carries composed/v1, say), so the
172
+ * registration test of contract section 4.5 refuses it in that set, and it
173
+ * would equally refuse every composition-aware page module (appendix B,
174
+ * `org.example.composition-aware/v0`) that it is meant to sit beneath. It is
175
+ * resolved in the core's section registry instead, by the same algorithm,
176
+ * and renders after whichever page module the page registry selected.
177
+ */
178
+ export const BUILTIN_MANIFEST_COMPOSED = Object.freeze({
179
+ spec_version: "aac.presentation-manifest/v0",
180
+ id: "aac.builtin.composed/v0",
181
+ presentation_api: "aac.presentation-api/v0",
182
+ runtime_min: "0.1.0",
183
+ trust_class: "trusted-executable",
184
+ requires: {
185
+ bundle_kind: "evidence-bundle/v2",
186
+ extensions: { required: ["composed/v1"] },
187
+ },
188
+ audiences: ["*"],
189
+ formats: ["html", "fragment", "embedded"],
190
+ fallback: false,
191
+ priority: 1,
192
+ executable: { carrier: "core-runtime" },
193
+ });
194
+ /** The built-in section manifests (one today). */
195
+ export const BUILTIN_SECTION_MANIFESTS = Object.freeze([BUILTIN_MANIFEST_COMPOSED]);
196
+ //# sourceMappingURL=builtin-manifests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin-manifests.js","sourceRoot":"","sources":["../src/builtin-manifests.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAyB,MAAM,CAAC,MAAM,CAC7E;IACE,YAAY,EAAE,8BAA8B;IAC5C,EAAE,EAAE,4BAA4B;IAChC,gBAAgB,EAAE,yBAAyB;IAC3C,WAAW,EAAE,OAAO;IACpB,WAAW,EAAE,oBAAoB;IACjC,QAAQ,EAAE;QACR,WAAW,EAAE,oBAAoB;QACjC,QAAQ,EAAE,CAAC,wBAAwB,CAAC;KACrC;IACD,SAAS,EAAE,CAAC,GAAG,CAAC;IAChB,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC;IACzC,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,CAAC;IACX,UAAU,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;CACxC,CACsB,CAAC;AAE1B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAClD,MAAM,CAAC,MAAM,CAAC;IACZ,YAAY,EAAE,8BAA8B;IAC5C,EAAE,EAAE,uCAAuC;IAC3C,gBAAgB,EAAE,yBAAyB;IAC3C,WAAW,EAAE,OAAO;IACpB,WAAW,EAAE,oBAAoB;IACjC,QAAQ,EAAE;QACR,WAAW,EAAE,oBAAoB;QACjC,QAAQ,EAAE,CAAC,mCAAmC,CAAC;QAC/C,UAAU,EAAE,EAAE,QAAQ,EAAE,CAAC,oBAAoB,CAAC,EAAE;KACjD;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,wBAAwB,CAAC,EAAE;IACjD,SAAS,EAAE,CAAC,GAAG,CAAC;IAChB,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AAS,EAAE,CAAC,GAAG,CAAC;IAChB,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC;IACzC,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,CAAC;IACX,UAAU,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;CACxC,CAAyB,CAAC;AAE3B,kDAAkD;AAClD,MAAM,CAAC,MAAM,yBAAyB,GACpC,MAAM,CAAC,MAAM,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { type ResultRoot, type VerifiedBundleContext } from "@action-state-group/agent-action-capsule";
2
+ import { ChartRefusal, type ChartDataset } from "./chart-spec.js";
3
+ /** evidencebook's member through which a caller-sealed capsule carries its own header. */
4
+ export declare const RECORD_HEADER_MEMBER = "evidence_record_header";
5
+ /**
6
+ * The dataset a report's Result names, as the chart checker reads it; or
7
+ * undefined when the Result names none or the bundle does not disclose its
8
+ * plan or dataset (the checker refuses a chart then, `chart-no-dataset`).
9
+ * Throws a {@link ChartRefusal} (`chart-dataset-invalid`) for a plan or
10
+ * dataset that does not match its digests or shape.
11
+ */
12
+ export declare function chartDatasetOf(context: VerifiedBundleContext, result: ResultRoot): Promise<ChartDataset | undefined>;
13
+ /** One chart's build-time verdict: drawn, or refused with its reason. */
14
+ export interface ChartBuildCheck {
15
+ readonly index: number;
16
+ readonly refusal?: ChartRefusal;
17
+ }
18
+ /**
19
+ * Check every chart spec against a verified bundle, as the builder does
20
+ * before it writes any packaging. A bundle that did not verify, or whose
21
+ * root is not an Evidence Result, has no dataset to check against.
22
+ */
23
+ export declare function checkChartsAgainst(context: VerifiedBundleContext, charts: readonly unknown[]): Promise<ChartBuildCheck[]>;