@action-state-group/capsule-viewer 0.1.0 → 0.3.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 (90) hide show
  1. package/README.md +73 -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/compliance-styles.d.ts +1 -8
  12. package/dist/compliance-styles.js +41 -3
  13. package/dist/compliance-styles.js.map +1 -1
  14. package/dist/compliance-view.d.ts +41 -1
  15. package/dist/compliance-view.js +737 -303
  16. package/dist/compliance-view.js.map +1 -1
  17. package/dist/compliance.d.ts +33 -4
  18. package/dist/compliance.js +92 -13
  19. package/dist/compliance.js.map +1 -1
  20. package/dist/composed-styles.d.ts +12 -0
  21. package/dist/composed-styles.js +20 -0
  22. package/dist/composed-styles.js.map +1 -0
  23. package/dist/composed-view.d.ts +1 -1
  24. package/dist/composed-view.js +9 -2
  25. package/dist/composed-view.js.map +1 -1
  26. package/dist/contract-report-wording.d.ts +195 -0
  27. package/dist/contract-report-wording.js +1141 -0
  28. package/dist/contract-report-wording.js.map +1 -0
  29. package/dist/contract-report.d.ts +92 -0
  30. package/dist/contract-report.js +63 -0
  31. package/dist/contract-report.js.map +1 -0
  32. package/dist/emitter-shell.html +176 -2
  33. package/dist/emitter.d.ts +36 -0
  34. package/dist/emitter.js +64 -1
  35. package/dist/emitter.js.map +1 -1
  36. package/dist/evidence-graph-view.d.ts +60 -7
  37. package/dist/evidence-graph-view.js +1344 -106
  38. package/dist/evidence-graph-view.js.map +1 -1
  39. package/dist/evidence-graph.iife.js +12410 -5624
  40. package/dist/frame-tokens.generated.d.ts +3 -0
  41. package/dist/frame-tokens.generated.js +5 -0
  42. package/dist/frame-tokens.generated.js.map +1 -0
  43. package/dist/index.d.ts +3 -0
  44. package/dist/index.js +5 -0
  45. package/dist/index.js.map +1 -1
  46. package/dist/outcome-report-presentation.d.ts +48 -0
  47. package/dist/outcome-report-presentation.js +90 -0
  48. package/dist/outcome-report-presentation.js.map +1 -0
  49. package/dist/outcome-report-styles.d.ts +1 -16
  50. package/dist/outcome-report-styles.js +48 -45
  51. package/dist/outcome-report-styles.js.map +1 -1
  52. package/dist/outcome-report-view.d.ts +75 -2
  53. package/dist/outcome-report-view.js +1039 -436
  54. package/dist/outcome-report-view.js.map +1 -1
  55. package/dist/presentation-builder.d.ts +55 -6
  56. package/dist/presentation-builder.js +163 -69
  57. package/dist/presentation-builder.js.map +1 -1
  58. package/dist/presentation-fragment.d.ts +129 -0
  59. package/dist/presentation-fragment.js +213 -0
  60. package/dist/presentation-fragment.js.map +1 -0
  61. package/dist/presentation-mount.d.ts +2 -2
  62. package/dist/presentation-mount.js +1 -1
  63. package/dist/presentation-mount.js.map +1 -1
  64. package/dist/presentation-registry.d.ts +277 -0
  65. package/dist/presentation-registry.js +416 -0
  66. package/dist/presentation-registry.js.map +1 -0
  67. package/dist/record-content.d.ts +68 -0
  68. package/dist/record-content.js +153 -0
  69. package/dist/record-content.js.map +1 -0
  70. package/dist/record-dating.d.ts +10 -0
  71. package/dist/record-dating.js +76 -0
  72. package/dist/record-dating.js.map +1 -0
  73. package/dist/report-front-styles.d.ts +9 -0
  74. package/dist/report-front-styles.js +55 -0
  75. package/dist/report-front-styles.js.map +1 -0
  76. package/dist/report-front.d.ts +78 -0
  77. package/dist/report-front.js +274 -0
  78. package/dist/report-front.js.map +1 -0
  79. package/dist/report-levels.d.ts +206 -0
  80. package/dist/report-levels.js +739 -0
  81. package/dist/report-levels.js.map +1 -0
  82. package/dist/report-provenance.d.ts +111 -0
  83. package/dist/report-provenance.js +535 -0
  84. package/dist/report-provenance.js.map +1 -0
  85. package/dist/viewer-build.d.ts +37 -0
  86. package/dist/viewer-build.js +29 -0
  87. package/dist/viewer-build.js.map +1 -0
  88. package/dist/wording/contract-report-eu-ai-act.en.json +295 -0
  89. package/dist/wording/contract-report-outcomes.en.json +394 -0
  90. package/package.json +3 -2
@@ -1,10 +1,18 @@
1
1
  import { type VerifiedBundleContext } from "@action-state-group/agent-action-capsule";
2
+ import type { PresentationManifest } from "./presentation-registry.js";
2
3
  import { type CountersignerSource } from "@action-state-group/agent-action-capsule";
3
- import type { PresentationDepth, WordingPackInput } from "@action-state-group/agent-action-capsule";
4
- import { PresentationRegistry, type PresentationFormat, type PresentationModule, type PresentationRegistration, type PresentationResolution, type PresentationResolver, type PresentationRuntime } from "@action-state-group/agent-action-capsule";
4
+ import { type ContractReportInput } from "./contract-report.js";
5
+ import type { PresentationDepth, WordingPackInput } from "./presentation-fragment.js";
6
+ import { PresentationRegistry, type PresentationFormat, type PresentationModule, type PresentationRegistration, type PresentationResolution, type PresentationResolver, type PresentationRuntime } from "./presentation-registry.js";
7
+ /**
8
+ * Draw the `checking` state into `root`, replacing what it held: the
9
+ * banner alone, with no verdict and no row, until the checks finish
10
+ * (presentation contract section 6.2). Returns that banner's bar.
11
+ */
12
+ export declare function renderChecking(root: HTMLElement): HTMLElement;
5
13
  /** The words a page says when this viewer cannot verify the bundle at all. */
6
14
  export declare const UNABLE_TO_VERIFY_LINES: {
7
- readonly banner: "Unable to verify in this viewer";
15
+ readonly banner: "Couldn't check this page here: check it with a full verifier";
8
16
  readonly reason: "This viewer cannot compute the SHA-256 digests the checks need, so nothing was checked and no records are shown. This is not a failed check: the file may well be valid.";
9
17
  readonly command: "To check this file, run:";
10
18
  readonly noCommand: "To check this file, open it from a secure (https) page, or check it with a verifier outside this viewer.";
@@ -20,9 +28,52 @@ export declare const UNABLE_TO_VERIFY_LINES: {
20
28
  export declare function renderUnableToVerify(root: HTMLElement, options?: {
21
29
  readonly verifyCommand?: string;
22
30
  }): void;
23
- /** The six built-in modules, registered by default. */
31
+ /**
32
+ * The one line a closed "How this page was checked" section shows, so what
33
+ * this page did not check stays in view with it folded: how many of the
34
+ * checks passed (or failed), how many records the file carries, and the
35
+ * signatures or other checks this page did not run.
36
+ */
37
+ export declare function checkedSummaryLine(verified: boolean, model: {
38
+ readonly checks: readonly {
39
+ readonly status: string;
40
+ }[];
41
+ readonly records: readonly unknown[];
42
+ readonly checkLists: {
43
+ readonly failed: readonly string[];
44
+ readonly notChecked: readonly string[];
45
+ };
46
+ }): string;
47
+ /** The summary's lead for a bundle that failed outside every counted check. */
48
+ export declare const SUMMARY_NOT_VERIFIED = "the bundle did not verify";
49
+ /** The folded verification section's heading. */
50
+ export declare const CHECKED_SECTION_TITLE = "How this page was checked";
51
+ /** Said above the generic Result page when a Result opted into a card whose layout cannot hold its claims (`claimsFitCard`). */
52
+ export declare const CARD_UNFIT_NOTE = "This Result's claims don't fit the report layout, so every claim is listed below instead.";
53
+ /**
54
+ * The contract-report module's manifest (agent-action-capsule
55
+ * spec/contract-report-v1.md section 4): the same match as
56
+ * `aac.builtin.result-contract-report/v0`, which it replaces in this
57
+ * registry. Registering both would be an ambiguity error (presentation
58
+ * contract section 4.5). It carries no `executable.wording_sha256`: the pack
59
+ * is a builder input, recorded as provenance.
60
+ */
61
+ export declare const CONTRACT_REPORT_MANIFEST: PresentationManifest;
62
+ /**
63
+ * The data a contract report draws from, beside the empty
64
+ * `contract-report/v1` block: an earlier kind's block, read by its own
65
+ * reader (section 5), the outcome block first, as the built-in manifests'
66
+ * precedence has it (the compliance card forbids `outcome-report/v1`).
67
+ */
68
+ /** The grouping the contract-report module draws for `bundle`, or undefined when it draws the generic Result page. */
69
+ export declare function contractReportGroupingOf(bundle: unknown): ContractReportInput["grouping"] | undefined;
70
+ /**
71
+ * The seven built-in modules, registered by default: agent-action-capsule's
72
+ * seven built-in shapes, with the contract-report module in place of
73
+ * `aac.builtin.result-contract-report/v0` (contract-report/v1 section 4).
74
+ */
24
75
  export declare const BUILTIN_PRESENTATIONS: readonly PresentationModule[];
25
- /** A fresh registry holding the six built-in modules. */
76
+ /** A fresh registry holding the seven built-in modules. */
26
77
  export declare function createPresentationRegistry(): PresentationRegistry;
27
78
  /**
28
79
  * The built-in sections: modules resolved after the page module, in their
@@ -55,12 +106,14 @@ export interface RenderEvidenceGraphOptions {
55
106
  readonly sections?: PresentationResolver;
56
107
  readonly audience?: string;
57
108
  readonly format?: PresentationFormat;
58
- /** The opening depth handed to the module's host; "L2" when omitted. */
109
+ /** The opening depth handed to the module's host; "L0" when omitted. */
59
110
  readonly depth?: PresentationDepth;
60
111
  /**
61
112
  * The wording pack the page was built with, carried so the page holds
62
113
  * the exact words it was built with (presentation only; contract I3).
63
- * The built-in modules use the core's own labels and do not read it.
114
+ * The contract-report module (the outcome and EU AI Act reports) draws
115
+ * its words from it, over its default pack; the other built-in modules
116
+ * use the core's own labels and do not read it.
64
117
  */
65
118
  readonly wording?: WordingPackInput;
66
119
  /**