@action-state-group/capsule-viewer 0.24.0 → 0.26.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.
@@ -0,0 +1,208 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ /**
3
+ * The deal receipt for a browser consumer (capsule-viewer#383, CV-TS): the
4
+ * same receipt modules the Go package `receipt` ships to Go page builders,
5
+ * built from the one source (go/receipt/receipt_core.js), for a page that
6
+ * bundles them itself, such as a saved receipt page or an exchanges row.
7
+ *
8
+ * It verifies the bundle with agent-action-capsule's runtime, resolves it
9
+ * among the four receipt modules at the reader's audience, and draws the
10
+ * receipt the module chose. It never draws a receipt the runtime did not
11
+ * verify. The words are the receipt modules' own (the example English
12
+ * pack), so a consumer carries no receipt words of its own.
13
+ */
14
+ import { buildVerifiedBundleContext, bundleVerified, Sha256UnavailableError, VERIFICATION_BANNER_LINES, verificationBanner, } from "@action-state-group/agent-action-capsule";
15
+ import { PresentationRegistry, } from "./presentation-registry.js";
16
+ import { RECEIPT_CORE, RECEIPT_MANIFESTS } from "./receipt-core.generated.js";
17
+ /** The receipt kinds, as go/receipt names them. */
18
+ export const RECEIPT_KINDS = [
19
+ "unilateral",
20
+ "seller",
21
+ "bilateral",
22
+ "deal",
23
+ ];
24
+ const core = RECEIPT_CORE;
25
+ /** The four receipt modules, each with the manifest go/receipt ships for it. */
26
+ export function receiptModules() {
27
+ return RECEIPT_KINDS.map((kind) => {
28
+ const module = core.createModule(kind, {
29
+ localTime: true,
30
+ memberContext: (bundle) => buildVerifiedBundleContext(bundle),
31
+ });
32
+ return {
33
+ ...module,
34
+ manifest: RECEIPT_MANIFESTS[kind],
35
+ };
36
+ });
37
+ }
38
+ /**
39
+ * A composed/v1 block that failed, or a carried copy whose own completeness
40
+ * claims failed. The runtime's page gate reads neither (the composed status
41
+ * and each member's claims are reported apart), so the receipt check does.
42
+ */
43
+ function composedFailed(context) {
44
+ return context.extensions.some((extension) => {
45
+ const composed = extension.composed;
46
+ if (!composed)
47
+ return false;
48
+ if (composed.malformed || composed.status === "fail")
49
+ return true;
50
+ return (composed.members ?? []).some((member) => member.bundle !== undefined &&
51
+ ["graphClosure", "intervalCoverage", "perRecordMembership"].some((claim) => member.bundle?.[claim]?.status === "fail"));
52
+ });
53
+ }
54
+ async function verified(bundle) {
55
+ const refused = {
56
+ kind: "did_not_verify",
57
+ line: VERIFICATION_BANNER_LINES.refused,
58
+ };
59
+ let value = bundle;
60
+ let context;
61
+ try {
62
+ if (typeof bundle === "string")
63
+ value = JSON.parse(bundle);
64
+ context = await buildVerifiedBundleContext(value);
65
+ }
66
+ catch (error) {
67
+ if (error instanceof Sha256UnavailableError)
68
+ return { kind: "cannot_check" };
69
+ return refused;
70
+ }
71
+ // No strict result: no Ed25519 here, so a producer-selected bundle
72
+ // cannot be checked in this browser.
73
+ if (context.strict === undefined)
74
+ return { kind: "cannot_check" };
75
+ const banner = verificationBanner(context, []);
76
+ if (banner.state === "failed")
77
+ return { kind: "did_not_verify", line: banner.line };
78
+ if (!bundleVerified(context.verification) || composedFailed(context))
79
+ return refused;
80
+ const records = value.records;
81
+ const total = Array.isArray(records) ? records.length : 0;
82
+ return {
83
+ context,
84
+ runtimeLine: banner.line,
85
+ records: { total, tied: Math.max(0, total - banner.uncheckpointed) },
86
+ };
87
+ }
88
+ async function resolved(bundle, audience) {
89
+ const checked = await verified(bundle);
90
+ if ("kind" in checked)
91
+ return { result: checked };
92
+ const registry = new PresentationRegistry();
93
+ for (const module of receiptModules())
94
+ registry.register(module);
95
+ const resolution = await registry.resolve(checked.context, audience, "html");
96
+ if (resolution.kind !== "module")
97
+ return { result: { kind: "no_module" } };
98
+ // The registry's canRender built the model once already; building it again
99
+ // costs a second pass over a two-sided receipt's carried copies, which the
100
+ // modules' contract (canRender, then buildModel) asks for.
101
+ const model = await resolution.module.buildModel(checked.context);
102
+ return { ...checked, module: resolution.module, model };
103
+ }
104
+ const bothSides = (model) => typeof model === "object" &&
105
+ model !== null &&
106
+ model.case === "both";
107
+ function result(found) {
108
+ if ("result" in found)
109
+ return found.result;
110
+ return {
111
+ kind: "checked",
112
+ module: found.module.manifest.id,
113
+ both: bothSides(found.model),
114
+ runtimeLine: found.runtimeLine,
115
+ records: found.records,
116
+ };
117
+ }
118
+ /** Check a receipt bundle (its JSON text, or the parsed value) without drawing it. */
119
+ export async function checkReceipt(bundle, options = {}) {
120
+ return result(await resolved(bundle, options.audience ?? "keep"));
121
+ }
122
+ /**
123
+ * Draw a receipt bundle into `host`: its children are replaced by the L0, L1
124
+ * and L2 regions of the receipt, or emptied when the result is not
125
+ * `checked`, so a host drawn into before never keeps an earlier receipt.
126
+ */
127
+ export async function renderReceipt(bundle, host, options = {}) {
128
+ const found = await resolved(bundle, options.audience ?? "keep");
129
+ if (options.carrier === "report")
130
+ host.setAttribute("data-receipt-carrier", "report");
131
+ else
132
+ host.removeAttribute("data-receipt-carrier");
133
+ if ("result" in found) {
134
+ host.replaceChildren();
135
+ return found.result;
136
+ }
137
+ const doc = host.ownerDocument;
138
+ const region = (name) => {
139
+ const node = doc.createElement("div");
140
+ node.dataset.region = name;
141
+ return node;
142
+ };
143
+ const regions = { L0: region("L0"), L1: region("L1"), L2: region("L2") };
144
+ host.replaceChildren(regions.L0, regions.L1, regions.L2);
145
+ // The receipt modules draw from the model and the host alone; they take
146
+ // no core services and set no chrome class.
147
+ await found.module.render(found.model, {
148
+ ...regions,
149
+ depth: options.depth ?? "L0",
150
+ setChromeClass: () => undefined,
151
+ });
152
+ return result(found);
153
+ }
154
+ const fill = (key, values = {}) => (core.WORDS[key] ?? `[${key}]`).replace(/\{(\w+)\}/g, (_, name) => String(values[name]));
155
+ /**
156
+ * The one-line label an exchanges row shows for a result, in the receipt
157
+ * modules' words; null where the result has no label. It is for the owner's
158
+ * own row only, never for a receipt carried in a report: its words address
159
+ * the owner (Sherlock2, #387).
160
+ */
161
+ export function receiptLabel(result) {
162
+ const key = result.kind === "checked"
163
+ ? result.both
164
+ ? "row.both"
165
+ : "row.one_sided"
166
+ : result.kind === "no_record"
167
+ ? "row.none"
168
+ : result.kind === "cannot_check"
169
+ ? "row.cannot_check"
170
+ : result.kind === "did_not_verify"
171
+ ? "row.did_not_verify"
172
+ : null;
173
+ return key === null ? null : fill(key);
174
+ }
175
+ /**
176
+ * The lines a saved receipt page shows above the receipt, on the owner's
177
+ * own page, and their tone: `ok` only for a receipt both sides stamped,
178
+ * `warn` for one side's own receipt, `bad` for one not checked or not
179
+ * verified. Null for `no_module`.
180
+ */
181
+ export function receiptPageLines(result) {
182
+ switch (result.kind) {
183
+ case "checked":
184
+ return {
185
+ tone: result.both ? "ok" : "warn",
186
+ lines: [
187
+ fill("row.page.receipt", { label: receiptLabel(result) ?? "" }),
188
+ fill("row.page.records_tied", result.records),
189
+ result.runtimeLine,
190
+ ],
191
+ };
192
+ case "cannot_check":
193
+ return {
194
+ tone: "bad",
195
+ lines: [
196
+ `${fill("row.cannot_check")}. ${fill("row.cannot_check_pointer")}`,
197
+ ],
198
+ };
199
+ case "did_not_verify":
200
+ return {
201
+ tone: "bad",
202
+ lines: [`${fill("row.did_not_verify")}.`, result.line],
203
+ };
204
+ default:
205
+ return null;
206
+ }
207
+ }
208
+ //# sourceMappingURL=receipt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"receipt.js","sourceRoot":"","sources":["../src/receipt.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;;;;;;;;GAWG;AACH,OAAO,EACL,0BAA0B,EAC1B,cAAc,EACd,sBAAsB,EACtB,yBAAyB,EACzB,kBAAkB,GAEnB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,oBAAoB,GAGrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAE9E,mDAAmD;AACnD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,YAAY;IACZ,QAAQ;IACR,WAAW;IACX,MAAM;C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B,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,SAAS;YACZ,OAAO;gBACL,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM;gBACjC,KAAK,EAAE;oBACL,IAAI,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;oBAC/D,IAAI,CAAC,uBAAuB,EAAE,MAAM,CAAC,OAAO,CAAC;oBAC7C,MAAM,CAAC,WAAW;iBACnB;aACF,CAAC;QACJ,KAAK,cAAc;YACjB,OAAO;gBACL,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE;oBACL,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC,0BAA0B,CAAC,EAAE;iBACnE;aACF,CAAC;QACJ,KAAK,gBAAgB;YACnB,OAAO;gBACL,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,oBAAoB,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC;aACvD,CAAC;QACJ;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC"}
@@ -19,7 +19,7 @@ const unreleased = typeof __CAPSULE_VIEWER_UNRELEASED__ === "boolean" &&
19
19
  __CAPSULE_VIEWER_UNRELEASED__;
20
20
  export const VIEWER_BUILD = {
21
21
  viewer: "@action-state-group/capsule-viewer",
22
- viewerVersion: "0.24.0",
22
+ viewerVersion: "0.26.0",
23
23
  verifier: "@action-state-group/agent-action-capsule",
24
24
  verifierVersion: "0.16.0",
25
25
  cllVersion: "0.4.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@action-state-group/capsule-viewer",
3
- "version": "0.24.0",
3
+ "version": "0.26.0",
4
4
  "description": "capsule-viewer page emitter and presentation builder, under the Agent Action Capsule presentation contract",
5
5
  "license": "Apache-2.0 AND BSD-3-Clause",
6
6
  "type": "module",
@@ -19,6 +19,10 @@
19
19
  "./history-view": {
20
20
  "types": "./dist/history-view.d.ts",
21
21
  "import": "./dist/history-view.js"
22
+ },
23
+ "./receipt": {
24
+ "types": "./dist/receipt.d.ts",
25
+ "import": "./dist/receipt.js"
22
26
  }
23
27
  },
24
28
  "engines": {