@blamejs/blamejs-shop 0.0.124 → 0.0.126

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/CHANGELOG.md CHANGED
@@ -8,6 +8,8 @@ upgrading across more than a few patches at a time.
8
8
 
9
9
  ## v0.0.x
10
10
 
11
+ - v0.0.126 (2026-05-24) — **Address book — saved shipping and billing addresses on the account page.** Signed-in customers can now keep a book of addresses at /account/addresses: add, edit, set a default shipping or billing address, and remove. Addresses are per-customer; every action that targets a specific address first confirms it belongs to the signed-in customer, so a guessed id can't read or change someone else's address. **Added:** *Address book at `/account/addresses`* — List, add, and edit saved addresses (recipient, company, two street lines, city, region, postal code, ISO country, phone). The account dashboard links to it. A blank product catalog isn't required — this is account surface only. · *Default shipping / billing* — Mark one address as the default shipping and one as the default billing; promoting a new default clears the previous one. Surfaced as badges on each card. · *Ownership-checked mutations* — Edit, update, set-default, and remove all resolve the address by id and verify it belongs to the signed-in customer before acting — a foreign or guessed id returns 404, never another customer's data. Add/edit re-render the form with the validation message on bad input.
12
+
11
13
  - v0.0.124 (2026-05-24) — **Save for later — move cart items into a holding list and back.** Each cart line now has a "Save for later" control that moves the item out of the cart into a per-customer holding list without losing it. Saved items live on a new account page where they can be moved back to the cart or removed. Moving an item back reprices it to the current catalog price and checks stock first, so a saved item that sold out (and isn't backorderable) can't silently re-enter the cart. Login-required, since the list is scoped to one customer. **Added:** *Save-for-later control on cart lines* — Each editable cart line gets a Save-for-later control. `POST /cart/lines/:line_id/save` moves the line out of the cart into the customer's saved list (`moveFromCart`). Login-gated — a signed-out shopper is redirected to sign in. · *`/account/saved` — the holding list* — A new account page lists saved items with a thumbnail, the saved price for reference, and Move-to-cart / Remove controls. Items whose product was archived render as "no longer available" rather than breaking the list. The account dashboard links to it (alongside Wishlist). · *Move back to cart, repriced + stock-checked* — `POST /saved/:save_id/move-to-cart` returns the item to the session cart at the current catalog price (not the stale snapshot) and refuses if the SKU is out of stock and not backorderable. `POST /saved/:save_id/remove` drops a saved row.
12
14
 
13
15
  - v0.0.123 (2026-05-24) — **Wishlist — save products to your account, with social-proof counts on the product page.** Signed-in customers can now save products to a wishlist from the product page. A "N shoppers saved this" count surfaces social proof, and saved items live on a new account page where they can be removed or reopened. The save control and count render identically on the edge and container paths; the toggle is idempotent (saving twice is a no-op, toggling again removes) and login-gated, since a wishlist is scoped to one customer. **Added:** *Save to wishlist on the product page* — The PDP renders a "Save to wishlist" control and, once any customer has saved it, a "N shoppers saved this" social-proof count. Both render server-side on the edge and container paths. The count is public; the save action requires sign-in. · *`/account/wishlist` — saved items* — A new account page lists the customer's saved products with a thumbnail, a link back to the product, and a Remove control. Entries whose product was archived render as "no longer available" rather than breaking the list (wishlist rows are orphan-tolerant by design). The account dashboard links to it. · *`POST /wishlist/toggle`* — Login-required endpoint that saves the product if it isn't saved and removes it if it is. Idempotent (`INSERT OR IGNORE`). Redirects back to the product by resolving its canonical slug from the product id, or to a safe same-origin `return_to` (the account page's Remove uses it) — a forged or off-site redirect target is rejected.
package/README.md CHANGED
@@ -66,6 +66,7 @@ Every primitive is composed on the vendored blamejs surface — no npm runtime d
66
66
  | **`lib/reviews.js`** | Operator-moderated product ratings. Submission requires a signed-in customer **and** a verified purchase — `/products/:slug/review` confirms a completed order for the product (via `order.hasPurchasedProduct`) before accepting, re-checked on POST; reviews land `pending`. Author identity is hash-only (`b.crypto.namespaceHash`); the raw email is never stored. The PDP renders the average, per-star distribution, and published reviews with `AggregateRating` JSON-LD. `/admin/reviews` is the moderation queue (`listByStatus` → publish / reject). |
67
67
  | **`lib/wishlist.js`** | Per-customer saved products. The PDP renders a login-gated "Save to wishlist" toggle and a "N shoppers saved this" social-proof count; `/account/wishlist` lists saved items (remove + reopen, orphan-tolerant when a product is archived). `POST /wishlist/toggle` is idempotent (`INSERT OR IGNORE`) and redirects to the canonical product slug or a safe same-origin `return_to`. UUID-shape-validated ids, `b.pagination` HMAC cursors. |
68
68
  | **`lib/save-for-later.js`** | Per-customer cart holding list. Each cart line gets a login-gated "Save for later" control (`POST /cart/lines/:id/save` → `moveFromCart`); `/account/saved` lists items with Move-to-cart / Remove. `moveToCart` reprices to the current catalog price and stock-gates (out-of-stock + non-backorderable is refused). Composes `catalog.inventory` + `catalog.prices` + `catalog.variants`. |
69
+ | **`lib/addresses.js`** | Per-customer address book at `/account/addresses` — add / edit / set default shipping or billing / remove. One-default-per-role invariant (promoting clears the prior). Every by-id route confirms the address belongs to the signed-in customer before acting (a guessed id returns 404). `b.guardUuid` ids, 2-char ISO country. |
69
70
  | **`lib/subscriptions.js`** | Stripe-backed recurring billing — `subscription_plans` (interval / amount / trial) + `subscriptions` (mirrors Stripe's object byte-for-byte). `subscriptions.create` POSTs to Stripe via the payment dep, then persists the returned object locally. `handleStripeEvent` replays `customer.subscription.*` events into the local row so the shop has an authoritative view without round-tripping. |
70
71
  | **`lib/newsletter.js`** | Operator-collected email broadcast list — `signup({ email, source })` composes `b.guardEmail` for shape validation, `b.crypto.namespaceHash` for the dedup key, and `INSERT OR IGNORE` for idempotency. Storefront POST `/newsletter` route renders a designed thank-you card with separate copy for the `new` vs `dedup` branches. |
71
72
  | **`lib/admin.js`** | Bearer-token-gated CRUD over catalog + orders + refunds + bulk CSV import + subscription plans + review moderation. Token compared via `b.crypto.timingSafeEqual`. Errors as RFC 9457 problem documents via `b.problemDetails`. Audit emission on every mutation. |
@@ -86,6 +87,7 @@ Every primitive is composed on the vendored blamejs surface — no npm runtime d
86
87
  - `migrations-d1/0011_reviews.sql` — operator-moderated product reviews (hash-only author identity)
87
88
  - `migrations-d1/0012_wishlist.sql` — per-customer saved products (unique customer + product + variant)
88
89
  - `migrations-d1/0041_save_for_later.sql` — per-customer cart holding list (price snapshot + source line)
90
+ - `migrations-d1/0026_customer_addresses.sql` — per-customer address book (default shipping/billing flags)
89
91
 
90
92
  ### Demo seed
91
93
 
package/lib/storefront.js CHANGED
@@ -1032,6 +1032,108 @@ function renderSaved(opts) {
1032
1032
  });
1033
1033
  }
1034
1034
 
1035
+ // One labelled text input for the address form. `required` and other
1036
+ // attrs are passed through; `value` is pre-filled (escaped) for edit.
1037
+ function _addrField(name, labelText, value, opts) {
1038
+ var esc = _b().template.escapeHtml;
1039
+ opts = opts || {};
1040
+ var attrs = "";
1041
+ if (opts.required) attrs += " required";
1042
+ if (opts.maxlength) attrs += " maxlength=\"" + opts.maxlength + "\"";
1043
+ if (opts.pattern) attrs += " pattern=\"" + esc(opts.pattern) + "\"";
1044
+ if (opts.autocomplete) attrs += " autocomplete=\"" + esc(opts.autocomplete) + "\"";
1045
+ var req = opts.required ? " <span class=\"form-field__req\" aria-hidden=\"true\">*</span>" : "";
1046
+ return "<label class=\"form-field\">" +
1047
+ "<span class=\"form-field__label\">" + esc(labelText) + req + "</span>" +
1048
+ "<input type=\"text\" name=\"" + esc(name) + "\" value=\"" + esc(value == null ? "" : String(value)) + "\"" + attrs + ">" +
1049
+ "</label>";
1050
+ }
1051
+
1052
+ // Shared add/edit address form. `addr` pre-fills for edit (null = add).
1053
+ function _addressForm(action, addr, submitLabel) {
1054
+ var esc = _b().template.escapeHtml;
1055
+ addr = addr || {};
1056
+ function _checked(v) { return Number(v) === 1 ? " checked" : ""; }
1057
+ return "<form class=\"address-form form-stack\" method=\"post\" action=\"" + esc(action) + "\">" +
1058
+ _addrField("recipient_name", "Recipient name", addr.recipient_name, { required: true, maxlength: 120, autocomplete: "name" }) +
1059
+ _addrField("label", "Label (e.g. Home, Work)", addr.label, { maxlength: 60 }) +
1060
+ _addrField("company", "Company", addr.company, { maxlength: 120, autocomplete: "organization" }) +
1061
+ _addrField("street_line1", "Street address", addr.street_line1, { required: true, maxlength: 200, autocomplete: "address-line1" }) +
1062
+ _addrField("street_line2", "Apt / suite / unit", addr.street_line2, { maxlength: 200, autocomplete: "address-line2" }) +
1063
+ "<div class=\"form-row form-row--inline\">" +
1064
+ _addrField("city", "City", addr.city, { required: true, maxlength: 120, autocomplete: "address-level2" }) +
1065
+ _addrField("region", "State / region", addr.region, { maxlength: 120, autocomplete: "address-level1" }) +
1066
+ "</div>" +
1067
+ "<div class=\"form-row form-row--inline\">" +
1068
+ _addrField("postal_code", "Postal code", addr.postal_code, { required: true, maxlength: 32, autocomplete: "postal-code" }) +
1069
+ _addrField("country", "Country (ISO 3166-1)", addr.country || "US", { required: true, maxlength: 2, pattern: "[A-Za-z]{2}", autocomplete: "country" }) +
1070
+ "</div>" +
1071
+ _addrField("phone", "Phone", addr.phone, { maxlength: 40, autocomplete: "tel" }) +
1072
+ "<label class=\"address-form__check\"><input type=\"checkbox\" name=\"is_default_shipping\" value=\"1\"" + _checked(addr.is_default_shipping) + "> Default shipping address</label>" +
1073
+ "<label class=\"address-form__check\"><input type=\"checkbox\" name=\"is_default_billing\" value=\"1\"" + _checked(addr.is_default_billing) + "> Default billing address</label>" +
1074
+ "<button type=\"submit\" class=\"btn-primary\">" + esc(submitLabel) + "</button>" +
1075
+ "</form>";
1076
+ }
1077
+
1078
+ // Account address book. `opts.addresses` is the customer's non-archived
1079
+ // rows; `opts.edit` (when set) pre-fills the form for editing that row,
1080
+ // otherwise the form is a blank "add" form.
1081
+ function renderAddresses(opts) {
1082
+ var esc = _b().template.escapeHtml;
1083
+ var list = opts.addresses || [];
1084
+ var rowsHtml = "";
1085
+ for (var i = 0; i < list.length; i += 1) {
1086
+ var a = list[i];
1087
+ var badges =
1088
+ (Number(a.is_default_shipping) === 1 ? "<span class=\"address-card__badge\">Default shipping</span>" : "") +
1089
+ (Number(a.is_default_billing) === 1 ? "<span class=\"address-card__badge\">Default billing</span>" : "");
1090
+ var lines = [a.recipient_name, a.company, a.street_line1, a.street_line2,
1091
+ [a.city, a.region, a.postal_code].filter(Boolean).join(", "), a.country, a.phone]
1092
+ .filter(function (x) { return x != null && String(x).length; })
1093
+ .map(function (x) { return "<span>" + esc(String(x)) + "</span>"; }).join("");
1094
+ rowsHtml +=
1095
+ "<li class=\"address-card\">" +
1096
+ (a.label ? "<p class=\"address-card__label\">" + esc(a.label) + "</p>" : "") +
1097
+ (badges ? "<p class=\"address-card__badges\">" + badges + "</p>" : "") +
1098
+ "<address class=\"address-card__body\">" + lines + "</address>" +
1099
+ "<div class=\"address-card__actions\">" +
1100
+ "<a class=\"btn-ghost btn-ghost--sm\" href=\"/account/addresses/" + esc(a.id) + "/edit\">Edit</a>" +
1101
+ (Number(a.is_default_shipping) === 1 ? "" : "<form method=\"post\" action=\"/account/addresses/" + esc(a.id) + "/default-shipping\"><button type=\"submit\" class=\"btn-ghost btn-ghost--sm\">Set default shipping</button></form>") +
1102
+ (Number(a.is_default_billing) === 1 ? "" : "<form method=\"post\" action=\"/account/addresses/" + esc(a.id) + "/default-billing\"><button type=\"submit\" class=\"btn-ghost btn-ghost--sm\">Set default billing</button></form>") +
1103
+ "<form method=\"post\" action=\"/account/addresses/" + esc(a.id) + "/archive\"><button type=\"submit\" class=\"btn-ghost btn-ghost--sm\">Remove</button></form>" +
1104
+ "</div>" +
1105
+ "</li>";
1106
+ }
1107
+ var listHtml = rowsHtml
1108
+ ? "<ul class=\"address-list\">" + rowsHtml + "</ul>"
1109
+ : "<p class=\"address-empty\">No saved addresses yet. Add one below to speed up checkout.</p>";
1110
+ var notice = opts.notice
1111
+ ? "<p class=\"form-notice form-notice--error\" role=\"alert\">" + esc(String(opts.notice)) + "</p>"
1112
+ : "";
1113
+ var editing = opts.edit || null;
1114
+ var formHeading = editing ? "Edit address" : "Add an address";
1115
+ var formAction = editing ? ("/account/addresses/" + editing.id) : "/account/addresses";
1116
+ var body =
1117
+ "<section class=\"account-addresses\">" +
1118
+ "<nav class=\"breadcrumb\" aria-label=\"Breadcrumb\"><ol>" +
1119
+ "<li><a href=\"/account\">Account</a></li>" +
1120
+ "<li aria-current=\"page\">Addresses</li>" +
1121
+ "</ol></nav>" +
1122
+ "<h1 class=\"account-addresses__title\">Addresses</h1>" +
1123
+ listHtml +
1124
+ "<h2 class=\"account-addresses__form-title\">" + esc(formHeading) + "</h2>" +
1125
+ notice +
1126
+ _addressForm(formAction, editing, editing ? "Save changes" : "Add address") +
1127
+ "</section>";
1128
+ return _wrap({
1129
+ title: "Addresses",
1130
+ shop_name: opts.shop_name || "blamejs.shop",
1131
+ cart_count: opts.cart_count == null ? 0 : opts.cart_count,
1132
+ theme_css: opts.theme_css,
1133
+ body: body,
1134
+ });
1135
+ }
1136
+
1035
1137
  // Product-level "Save to wishlist" control + social-proof count.
1036
1138
  // Byte-compatible with the edge renderer (`worker/render/product.js`)
1037
1139
  // so both paths emit identical markup. Action-only label — the toggle
@@ -1963,6 +2065,7 @@ var ACCOUNT_DASH_PAGE =
1963
2065
  " <div class=\"account-dash__actions\">\n" +
1964
2066
  " <a class=\"btn-secondary\" href=\"/account/wishlist\">Wishlist</a>\n" +
1965
2067
  " <a class=\"btn-secondary\" href=\"/account/saved\">Saved for later</a>\n" +
2068
+ " <a class=\"btn-secondary\" href=\"/account/addresses\">Addresses</a>\n" +
1966
2069
  " <form method=\"post\" action=\"/account/logout\"><button type=\"submit\" class=\"btn-ghost\">Sign out</button></form>\n" +
1967
2070
  " </div>\n" +
1968
2071
  " </header>\n" +
@@ -2988,6 +3091,129 @@ function mount(router, deps) {
2988
3091
  });
2989
3092
  }
2990
3093
 
3094
+ // Address book — per-customer saved addresses. Every by-id route
3095
+ // verifies the address belongs to the authed customer before acting
3096
+ // (the primitive operates by id alone, so ownership is enforced here
3097
+ // to prevent cross-customer access via a guessed id).
3098
+ if (deps.addresses) {
3099
+ function _addrAuth(req, res) {
3100
+ var auth;
3101
+ try { auth = _currentCustomer(req); }
3102
+ catch (e) {
3103
+ if (e && e.code === "vault/not-initialized") { _serviceUnavailable(res, "auth not configured"); return null; }
3104
+ throw e;
3105
+ }
3106
+ if (!auth) {
3107
+ res.status(303); res.setHeader && res.setHeader("location", "/account/login");
3108
+ res.end ? res.end() : res.send("");
3109
+ return null;
3110
+ }
3111
+ return auth;
3112
+ }
3113
+ async function _ownedAddress(req, res, auth) {
3114
+ var addr;
3115
+ try {
3116
+ addr = await deps.addresses.get(req.params && req.params.id);
3117
+ } catch (e) {
3118
+ // `get` throws TypeError on a non-UUID id — a malformed path
3119
+ // segment is a 404, not a 500.
3120
+ if (e instanceof TypeError) { _send(res, 404, renderNotFound({ shop_name: shopName, theme: theme })); return null; }
3121
+ throw e;
3122
+ }
3123
+ if (!addr || addr.customer_id !== auth.customer_id || Number(addr.is_archived) === 1) {
3124
+ _send(res, 404, renderNotFound({ shop_name: shopName, theme: theme }));
3125
+ return null;
3126
+ }
3127
+ return addr;
3128
+ }
3129
+ async function _renderAddrPage(req, res, auth, editAddr, notice, code) {
3130
+ var rows = await deps.addresses.listForCustomer(auth.customer_id, { limit: 50 });
3131
+ var cartCount = await _cartCountForReq(req);
3132
+ _send(res, code || 200, renderAddresses({
3133
+ addresses: rows,
3134
+ edit: editAddr || null,
3135
+ notice: notice || null,
3136
+ shop_name: shopName,
3137
+ cart_count: cartCount,
3138
+ }));
3139
+ }
3140
+ function _addrInput(body, customerId) {
3141
+ return {
3142
+ customer_id: customerId,
3143
+ label: body.label,
3144
+ recipient_name: body.recipient_name,
3145
+ company: body.company,
3146
+ street_line1: body.street_line1,
3147
+ street_line2: body.street_line2,
3148
+ city: body.city,
3149
+ region: body.region,
3150
+ postal_code: body.postal_code,
3151
+ country: body.country,
3152
+ phone: body.phone,
3153
+ // Checkboxes arrive as "1" when ticked, absent otherwise — the
3154
+ // primitive's _bool wants an integer, so coerce here.
3155
+ is_default_shipping: body.is_default_shipping === "1" ? 1 : 0,
3156
+ is_default_billing: body.is_default_billing === "1" ? 1 : 0,
3157
+ };
3158
+ }
3159
+
3160
+ router.get("/account/addresses", async function (req, res) {
3161
+ var auth = _addrAuth(req, res); if (!auth) return;
3162
+ await _renderAddrPage(req, res, auth, null);
3163
+ });
3164
+
3165
+ router.get("/account/addresses/:id/edit", async function (req, res) {
3166
+ var auth = _addrAuth(req, res); if (!auth) return;
3167
+ var addr = await _ownedAddress(req, res, auth); if (!addr) return;
3168
+ await _renderAddrPage(req, res, auth, addr);
3169
+ });
3170
+
3171
+ router.post("/account/addresses", async function (req, res) {
3172
+ var auth = _addrAuth(req, res); if (!auth) return;
3173
+ try {
3174
+ await deps.addresses.add(_addrInput(req.body || {}, auth.customer_id));
3175
+ } catch (e) {
3176
+ if (e instanceof TypeError) return _renderAddrPage(req, res, auth, null, (e && e.message) || "Please check the address.", 400);
3177
+ throw e;
3178
+ }
3179
+ res.status(303); res.setHeader && res.setHeader("location", "/account/addresses");
3180
+ return res.end ? res.end() : res.send("");
3181
+ });
3182
+
3183
+ router.post("/account/addresses/:id", async function (req, res) {
3184
+ var auth = _addrAuth(req, res); if (!auth) return;
3185
+ var addr = await _ownedAddress(req, res, auth); if (!addr) return;
3186
+ try {
3187
+ await deps.addresses.update(addr.id, _addrInput(req.body || {}, auth.customer_id));
3188
+ } catch (e) {
3189
+ if (e instanceof TypeError) {
3190
+ var merged = Object.assign({}, addr, _addrInput(req.body || {}, auth.customer_id));
3191
+ return _renderAddrPage(req, res, auth, merged, (e && e.message) || "Please check the address.", 400);
3192
+ }
3193
+ throw e;
3194
+ }
3195
+ res.status(303); res.setHeader && res.setHeader("location", "/account/addresses");
3196
+ return res.end ? res.end() : res.send("");
3197
+ });
3198
+
3199
+ function _addrAction(verb, fn) {
3200
+ router.post("/account/addresses/:id/" + verb, async function (req, res) {
3201
+ var auth = _addrAuth(req, res); if (!auth) return;
3202
+ var addr = await _ownedAddress(req, res, auth); if (!addr) return;
3203
+ try { await fn(addr.id); }
3204
+ catch (e) {
3205
+ res.status(e instanceof TypeError ? 400 : 500);
3206
+ return res.end ? res.end((e && e.message) || "Error") : res.send((e && e.message) || "Error");
3207
+ }
3208
+ res.status(303); res.setHeader && res.setHeader("location", "/account/addresses");
3209
+ return res.end ? res.end() : res.send("");
3210
+ });
3211
+ }
3212
+ _addrAction("default-shipping", function (id) { return deps.addresses.setDefaultShipping(id); });
3213
+ _addrAction("default-billing", function (id) { return deps.addresses.setDefaultBilling(id); });
3214
+ _addrAction("archive", function (id) { return deps.addresses.archive(id); });
3215
+ }
3216
+
2991
3217
  // Product reviews — submission requires a logged-in customer AND a
2992
3218
  // verified purchase of the product (the gate, not just a badge).
2993
3219
  // Only mounts when both the reviews primitive and an order handle
@@ -3,8 +3,8 @@
3
3
  "_about": "blamejs.shop vendors a single framework — blamejs — which itself bundles every server-side crypto/identity dependency. The transitive packages blamejs ships are surfaced in its own MANIFEST.json at lib/vendor/blamejs/lib/vendor/MANIFEST.json — Trivy / Grype rely on that nested data for CVE attribution.",
4
4
  "packages": {
5
5
  "blamejs": {
6
- "version": "0.12.29",
7
- "tag": "v0.12.29",
6
+ "version": "0.12.32",
7
+ "tag": "v0.12.32",
8
8
  "license": "Apache-2.0",
9
9
  "author": "blamejs contributors",
10
10
  "source": "https://github.com/blamejs/blamejs",
@@ -8,6 +8,12 @@ upgrading across more than a few patches at a time.
8
8
 
9
9
  ## v0.12.x
10
10
 
11
+ - v0.12.32 (2026-05-24) — **`b.cbor` — bounded, deterministic in-tree CBOR codec (RFC 8949).** CBOR is the binary serialization underneath COSE (RFC 9052), CWT, SCITT, and WebAuthn attestation — a foundational substrate the framework needs in-tree to build signed-statement primitives without a third-party parser. `b.cbor` is that codec, bounded by default like every parser the framework ships: a binary decoder is attack surface, so the defaults refuse the shapes a hostile encoder uses to exhaust memory or stack. The encoder emits Deterministically Encoded CBOR (RFC 8949 §4.2) — shortest-form heads, definite lengths, map keys sorted by encoded bytes, no indefinite-length items — so two semantically-equal values encode to byte-identical output, the property COSE signatures and SCITT receipts depend on. **Added:** *`b.cbor.encode(value, opts?)` / `b.cbor.decode(buffer, opts?)` / `b.cbor.Tag`* — `encode` produces deterministic CBOR from numbers (integers + float64), bigint (64-bit range), strings, `Buffer` / `Uint8Array`, arrays, `Map` or plain objects, `b.cbor.Tag`, and the simple values. `decode` returns the value with maps decoded to a `Map` (CBOR keys may be integers — COSE header labels are) and byte strings to `Buffer`. `b.cbor.Tag(tag, value)` carries a major-type-6 tagged item. `decode(buf, { requireDeterministic: true })` additionally asserts the input was itself canonically encoded (decode → re-encode → byte-compare), refusing a non-canonical re-encoding on a signature-verify path where it would be a malleability vector. **Security:** *Bounded-by-default decoder* — `maxDepth` (default 64, ceiling 256) caps nesting against stack exhaustion; `maxBytes` (default 16 MiB, ceiling 64 MiB) caps total input, and a declared string / array / map length exceeding the remaining bytes is refused before any allocation (no length-prefix memory bomb). Indefinite-length items (additional-info 31) are refused — a streaming-complexity / DoS vector forbidden by deterministic encoding. Reserved additional-info (28–30) is refused. Tags are refused unless allowlisted via `allowedTags` (a tag triggers semantic reprocessing — an un-vetted tag is a confused-deputy vector). Duplicate map keys (RFC 8949 §5.6) and trailing bytes after the data item are refused.
12
+
13
+ - v0.12.31 (2026-05-24) — **`b.auth.jar.parse` — verify RFC 9101 JWT-Secured Authorization Requests (server side).** A plain OAuth authorization request carries its parameters in the URL query string, where a browser, proxy, or referer log can tamper with or leak them. RFC 9101 JAR packs those parameters into a JWT the client signs — the request object — so the authorization server can confirm they arrived exactly as sent. `b.auth.jar.parse(jar, opts)` is the server-side verifier and the request-side counterpart to the existing JARM response handling (`b.auth.oauth.parseJarmResponse`). It delegates the signature check to `b.auth.jwt.verifyExternal` — which already enforces a mandatory `algorithms` allowlist and refuses the alg-confusion (`alg: "none"`, HMAC-vs-RSA) and JWE-on-a-JWS-verifier shapes against a JWKS public-key trust source — then pins `iss` and the `client_id` claim to the expected client, pins `aud` to this server's issuer identifier, refuses a nested `request` / `request_uri` (RFC 9101 §6.3 recursion / confused-deputy vector), and returns the authorization parameters with the JWT envelope claims stripped. **Added:** *`b.auth.jar.parse(jar, opts)` — request-object verification* — `opts.clientId` (the expected client — pins `iss` + the `client_id` claim), `opts.audience` (this server's issuer identifier — pins `aud`), `opts.algorithms` (required signature allowlist — no defaults, the alg-confusion defense), and one of `opts.jwks` / `opts.jwksUri` / `opts.keyResolver` (the client's verification key). Returns `{ params, claims }` where `params` is the authorization parameters (`response_type`, `redirect_uri`, `scope`, `state`, `nonce`, …) with the JWT envelope claims (`iss`, `aud`, `exp`, `iat`, `nbf`, `jti`) removed. A request object whose `client_id` claim disagrees with `opts.clientId`, or that nests a `request` / `request_uri`, is refused. Emitting a request object (the client side) is deferred-with-condition: it requires signing with the client's key under a classical JWS algorithm, and the framework's own JWT signer is PQC-only for the tokens it issues — a PQC-signed request object would not interoperate with a standard authorization server; client-side emission re-opens when a classical JWS signer lands or operators surface the need. Until then clients sign request objects with their existing JOSE tooling.
14
+
15
+ - v0.12.30 (2026-05-24) — **`bundleAdapterStorage.keyRotation(opts)` — verified whole-repository envelope key rotation.** Rotating the key that wraps a backup repository is only safe if you can prove every bundle still reads under the new key — a rotation that silently corrupts one bundle is a time-bomb the operator discovers at restore time, exactly when they can least afford it. `storage.keyRotation(opts)` rotates every bundle's envelope from the old key to the new key (composing `rewrapAllBundles`) and then re-reads every bundle under the NEW key (composing `verifyAllBundles`), so a bad rotation surfaces as `verifyFailed > 0` immediately instead of at restore. It emits a `backup/key-rotated` audit event with the rotation id + per-status counts — a key-rotation event is a compliance record (SOC 2 CC6.1, PCI DSS 3.6.4) operators wire into their signed audit chain. Works for both `recipient` (hybrid PQC envelope) and `passphrase` (Argon2id) storage; refused cleanly on plaintext (`cryptoStrategy: "none"`) storage and when the new key is missing. **Added:** *`bundleAdapterStorage.keyRotation(opts)` — rotate then prove* — `opts.newRecipient` / `opts.newPassphrase` is the key bundles rotate TO (matched to the storage's `cryptoStrategy`); `opts.oldRecipient` / `opts.oldPassphrase` unwraps the current envelope when it differs from the configured key. Returns `{ rotationId, rotatedAt, total, rotated, skipped, failed, verified, verifyFailed, rotateResults, verifyResults }`. `opts.verify` (default true) runs the post-rotation read-back under the new key; `opts.concurrency` / `opts.stopOnFirstFailure` forward to the batch passes. Plaintext bundles + non-wrappable formats are skipped cleanly; a rotation that leaves any bundle unreadable reports `verifyFailed > 0` and emits the audit event with `outcome: "failure"`. A true overlap window where BOTH the old and new key decrypt a bundle (`dualWrap: true`) is refused with `backup/dual-wrap-unsupported` — it needs multi-recipient archive envelopes `b.archive.wrap` does not yet emit, and re-opens when the wrap layer gains them; until then stage a rotation by keeping the old key available to readers until `keyRotation` reports `failed: 0` + `verifyFailed: 0`, then retire it.
16
+
11
17
  - v0.12.29 (2026-05-24) — **`b.ai.dp` — float-safe differential privacy: snapping-mechanism Laplace + discrete Gaussian + Rényi-DP budgets.** Differential privacy adds calibrated noise so an aggregate is provably insensitive to any single record — but the guarantee is fragile: Mironov (2012) showed that a Laplace mechanism sampled with naive double-precision floats lets an attacker distinguish neighbouring datasets with > 35% probability from a single output, silently destroying the promise. `b.ai.dp` ships only mechanisms whose sampling is hardened against that attack class: Laplace via the snapping mechanism (clamp + CSPRNG sign + full-mantissa uniform + power-of-two-grid rounding) and the discrete Gaussian (Canonne–Kamath–Steinke 2020) via integer-exact rejection sampling built from Bernoulli(exp(−γ)) over exact rationals — no floating-point noise at all. All randomness comes from `b.crypto.generateBytes` (SHAKE256 over the OS CSPRNG), never `Math.random`. `b.ai.dp.budget({ scope, epsilon, delta })` tracks a privacy budget per scope and refuses a `consume` that would exceed it, accounting composition either by basic summation (default) or a Rényi-DP accountant (Mironov 2017) for a much tighter bound under repeated Gaussian releases. NIST SP 800-226 (2025) is the evaluation standard; Dwork & Roth is the canonical reference. The exponential and sparse-vector mechanisms are deferred-with-condition — their float-safe constructions (base-2 / permute-and-flip; snapped SVT) re-open on operator demand, since shipping them float-unsafe would defeat the module's purpose. **Added:** *`b.ai.dp.mechanism({ type, sensitivity, epsilon, ... })` — float-safe noise mechanisms* — `type: "laplace"` is the snapping mechanism (pure ε-DP, real-valued, requires a clamp `bound` the guarantee depends on); `type: "gaussian"` is the discrete Gaussian (integer-valued, (ε, δ)-DP, requires `delta`). The Gaussian uses the classic calibration σ = √(2 ln(1.25/δ))·Δ/ε, proven for ε ≤ 1 — larger ε is refused with a pointer to splitting the release under an rdp budget. Descriptors are validated + frozen at construction so a malformed parameter fails fast. · *`b.ai.dp.budget({ scope, epsilon, delta, accounting })` — per-scope privacy budget* — Returns `{ consume, remaining, spent, reset }`. `consume(mechanism, value)` adds the mechanism's noise, charges the accountant, and throws `aiDp/budget-exhausted` if the release would push the scope past its (ε, δ). `accounting: "basic"` (default) sums per-release ε and δ; `accounting: "rdp"` runs a Rényi-DP accountant across a grid of orders and converts to (ε, δ) at the scope's δ for a tight composition bound under repeated Gaussian releases (requires `delta > 0`). The scope budget is enforced on both ε and δ independently. **Security:** *`b.crypto.generateBytes` uniformity fix at 1-byte length* — Node's SHAKE256 XOF is non-uniform at `outputLength: 1` — the byte values 0x00 and 0xff never occur and the low bit skews to ~0.54. `b.crypto.generateBytes(1)` (and the underlying `random(1)`) now draws at least 2 bytes and slices, so a single-byte CSPRNG request is uniform. Surfaced by `b.ai.dp` per-byte noise sampling; any per-byte consumer of `generateBytes` inherits the fix. A regression test asserts 0x00 / 0xff occur and the low bit is balanced.
12
18
 
13
19
  - v0.12.28 (2026-05-24) — **`b.ai.capability` — model-capability registry + cheapest-satisfying-model router.** `b.ai.capability.create({ models })` turns a fleet of AI model descriptors into a routing decision: given a set of requirements (context window, input/output modalities, tool use, structured output, reasoning tier, citation support, prompt-caching size), it picks the cheapest model that satisfies all of them. NIST AI RMF (AI 100-1) MAP 2.x requires documenting each model's capabilities and limitations; the Model Cards convention (Mitchell et al., 2019) formalizes that descriptor — this primitive makes the descriptor actionable. Routing to the cheapest sufficient model is a front-line defense against over-provisioning spend and composes directly with `b.ai.quota`'s `cost-usd` dimension (the chosen descriptor's rate feeds the budget charge); refusing to route a request to a model that cannot satisfy it (missing modality, too-small context window, no tool use) catches a capability mismatch before the inference call burns tokens on a guaranteed-bad result. Cost ranking uses a supplied `costBasis` (`{ inputTokens, outputTokens }`) for real per-call spend, else the sum of the per-1k rates; ties break by model id so the choice is deterministic across calls and nodes. **Added:** *`b.ai.capability.create({ models })` — capability registry + router* — Returns `{ describe, list, register, satisfies, route }`. A descriptor carries `maxContextTokens`, `maxOutputTokens`, `modalitiesIn` / `modalitiesOut` (arrays), `toolUse`, `structuredOutput`, `fineTunable`, `reasoningTier` (`none` / `basic` / `standard` / `advanced`, ordered), `citationSupport`, `promptCachingMaxTokens`, and the cost rates `costPer1kInputTokens` / `costPer1kOutputTokens`. Descriptors are validated + frozen at registration so a typo (negative cost, unknown reasoning tier, non-array modality list) surfaces at config time rather than as a silent mis-route. `describe(modelId)` returns the frozen descriptor; `register(modelId, descriptor)` adds or replaces one at runtime. · *`route({ requirements, fallback?, costBasis? })` — cheapest-satisfying selection* — Collects every model whose descriptor satisfies all requirements, then returns the cheapest (`{ modelId, descriptor, estimatedCost, reason }`). Requirements: `minContextTokens`, `minOutputTokens`, `modalitiesIn` / `modalitiesOut` (model must support every listed modality), `toolUse`, `structuredOutput`, `fineTunable`, `minReasoningTier` (tier ordering — `standard` is met by `standard` or `advanced`), `citationSupport`, `minPromptCachingTokens`. When no model matches, `fallback` (a registered model id) is returned with `reason: "fallback"`, or the call refuses with `aiCapability/no-candidate` if no fallback was supplied. Routing decisions emit `ai/capability-routed` / `ai/capability-fallback` / `ai/capability-no-candidate` through the drop-silent audit chain. · *`satisfies(modelId, requirements)` — precise capability-mismatch reasons* — Returns `{ ok, failures }` where each failure names the `requirement`, the `need`, and what the model `have`s — so a caller surfaces a precise reason (e.g. `minReasoningTier need advanced have basic`) instead of a bare boolean. Use it to explain a routing miss or to gate a request against a specific model before calling it.
@@ -75,6 +75,7 @@ The framework bundles the surface a typical Node app reaches for. Every primitiv
75
75
  - RP-Initiated / Front-Channel / Back-Channel Logout 1.0 (`parseFrontchannelLogoutRequest` + `verifyBackchannelLogoutToken` with jti-replay defense)
76
76
  - RFC 9207 AS Issuer Identifier validation on callbacks (`parseCallback` — refuses iss mismatch + OP `error=` redirect)
77
77
  - OAuth 2.0 JARM signed-response decode (`parseJarmResponse`)
78
+ - RFC 9101 JWT-Secured Authorization Request verification — server-side request-object parse with mandatory alg allowlist + iss/client_id/aud binding + anti-nesting (`b.auth.jar.parse`)
78
79
  - One-time-use refresh-token rotation with operator-supplied replay-defense callback (RFC 9700 §4.13 / OAuth 2.1 §6.1 — `refreshAccessToken({ seen })`)
79
80
  - **Federation / VC** — CIBA Core 1.0 (`b.auth.ciba`, poll/ping/push); OpenID Federation 1.0 trust chain + metadata_policy (`b.auth.openidFederation`); SAML 2.0 SP with XMLDSig signature-wrapping defense + RFC 9525 server-identity (`b.auth.saml`); OpenID4VCI 1.0 issuer (`b.auth.oid4vci`); OpenID4VP 1.0 verifier with DCQL (`b.auth.oid4vp`); SD-JWT VC with `key_attestation` extension (`b.auth.sdJwtVc`)
80
81
  - **Sessions** — `b.session`
@@ -124,6 +125,7 @@ The framework bundles the surface a typical Node app reaches for. Every primitiv
124
125
 
125
126
  - **JSON / SQL / schema** — `b.safeJson` (with `maxKeys` cap defending CVE-2026-21717 V8 HashDoS), `b.safeBuffer`, `b.safeSql`, `b.safeSchema`
126
127
  - **URL + path** — `b.safeUrl` (IDN mixed-script / homograph refuse); `b.safeJsonPath` (refuses filter `?(...)`, deep-scan `$..`, script-shape `(@.x)` for safe Postgres JSONB ops)
128
+ - **Binary codec** — `b.cbor` bounded deterministic CBOR (RFC 8949 §4.2): depth/size caps, indefinite-length + reserved-info + tag + duplicate-key refusal, `requireDeterministic` canonical-form check; the in-tree substrate under COSE / CWT / SCITT / WebAuthn attestation
127
129
  - **Document parsers** — `b.parsers` (XML / TOML / YAML / .env); `b.config` (schema-validated env)
128
130
  - **File-type detection** — `b.fileType` magic-byte content classification with deny-on-upload categories (image / document / archive / executable / etc.)
129
131
  ### Content-safety gates
@@ -292,6 +292,7 @@ This is the minimum-viable security posture for a production deployment. The fra
292
292
  - [ ] Off-site at least one bundle (different region / cloud / physical location)
293
293
  - [ ] Retain bundles per compliance window; the prev-hash chain across bundles makes silent deletion detectable
294
294
  - [ ] Under `hipaa` / `pci-dss` postures, `b.backup.create` refuses `encrypt: false` at boot — the framework enforces backup encryption on these regulatory regimes
295
+ - [ ] Rotate the backup envelope key periodically (PCI DSS 3.6.4 / SOC 2 CC6.1) via `storage.keyRotation({ newRecipient | newPassphrase })` — it rotates every bundle's envelope AND re-reads each under the new key, so a rotation that corrupts a bundle reports `verifyFailed > 0` immediately rather than failing at restore time; the emitted `backup/key-rotated` audit event is the rotation record auditors expect
295
296
  - [ ] Generate a posture-appropriate disaster-recovery runbook with `b.drRunbook.emit({ posture, services, rtoMs, rpoMs })` and commit it under `docs/dr/` — ships RTO/RPO + role-recovery + breach-disclosure deadlines + restore procedure
296
297
 
297
298
  **Multi-tenant deployments**
@@ -340,6 +341,7 @@ This is the minimum-viable security posture for a production deployment. The fra
340
341
  - [ ] **Default-on (v0.7.18+) — transport-layer smuggling defenses:** `b.middleware.bodyParser` rejects requests carrying both `Content-Length` and `Transfer-Encoding` (CL.TE / TE.CL smuggling — CVE-2022-31394 / CVE-2024-27316 class), multiple Content-Length values, Transfer-Encoding whose final coding is not `chunked`, and duplicate `chunked` tokens (TE.TE smuggling) — each rejected with HTTP 400 + `Connection: close`. `b.staticServe` resolves every requested path through `fs.realpathSync` (defeats symlink escape) AND validates the basename through `b.guardFilename` at the balanced profile (rejects path traversal / null-byte / NTFS alternate data streams / UNC / RTLO bidi / overlong UTF-8 / Windows reserved device names). `b.mail` SMTP transport runs `b.guardEmail.validateMessage` at strict profile on the produced RFC 822 wire BEFORE opening the socket — refuses outbound SMTP smuggling (CVE-2023-51764 Postfix / CVE-2023-51765 Sendmail / CVE-2023-51766 Exim / CVE-2026-32178 .NET class) even when operator-supplied subject / body / headers contain bare CR / bare LF + smuggled SMTP verbs. `b.mail.dkim.create` throws on `opts.bodyLength` (M³AAWG / Gmail / Microsoft 365 guidance — `l=` enables append-after-signature attacks). All four protections require zero operator wiring
341
342
  - [ ] **Default-on (v0.7.12+):** `b.fileUpload` and `b.staticServe` wire `b.guardAll.byExtension({ profile: "strict" })` automatically; `b.fileUpload` additionally wires `b.guardFilename.gate({ profile: "strict" })` as `filenameSafety`. No explicit operator action required for the baseline defense-in-depth. To opt up to a broader content vocabulary (e.g. you serve operator-built HTML with links + images), pass `contentSafety: b.guardAll.byExtension({ profile: "balanced" })` explicitly. To opt out entirely (test fixtures, raw-bytes uploads), pass `contentSafety: null` / `filenameSafety: null` with `contentSafetyDisabledReason` / `filenameSafetyDisabledReason` strings — both fire audit rows at create() time so a security review can reconstruct which deploys disabled the default-on protection. To skip a single guard while keeping the rest, pass `contentSafety: b.guardAll.byExtension({ exceptFor: { name: { reason: "..." } } })` — the reason lands in the `guardAll.gate.created` audit row. Future guards added to the family auto-extend the deploy without re-wiring
342
343
  - [ ] For OAuth / OIDC RP callbacks: call `b.auth.oauth.parseCallback(query, opts?)` BEFORE consuming `code` — validates RFC 9207 AS Issuer Identifier (refuses iss-mismatch + OP `error=` redirects + state-mismatch CSRF). For FAPI 2.0 deployments add `b.fapi2.assertCallback(query)` (refuses missing iss; refuses bare-param under `fapi-2.0-message-signing` posture, requiring JARM `response`) and `b.fapi2.assertAuthzRequest(authzParams)` BEFORE issuing the redirect (refuses non-JAR authorization requests). For refresh-token flows, pass `seen({ jti, iss })` to `b.auth.oauth.refreshAccessToken` so reuse of an already-rotated token refuses BEFORE the HTTP exchange (RFC 9700 §4.13 / OAuth 2.1 §6.1)
344
+ - [ ] For OAuth authorization servers accepting RFC 9101 request objects (JAR): verify them with `b.auth.jar.parse(jar, { clientId, audience, algorithms, jwks })` BEFORE honoring the authorization request — it delegates the signature check to the alg-allowlisted `verifyExternal` (refuses `alg: "none"` / HMAC-vs-RSA confusion / JWE-on-JWS), pins `iss` + the `client_id` claim to the expected client and `aud` to your issuer, and refuses a nested `request` / `request_uri` (RFC 9101 §6.3); never accept an unsigned `request` parameter or trust query-string authorization parameters when a signed request object is available
343
345
  - [ ] For Model Context Protocol servers exposing tools to LLM agents: wire `b.mcp.toolResult.sanitize(result, { posture: "refuse" })` over EVERY tool output before returning it to the model — defends OWASP LLM07 (sensitive tool output / prompt-injection echo back into the agent loop), refuses dangerous-HTML + off-allowlist URLs. Wrap each tool's input handler with `b.mcp.validateToolInput(toolName, input, schema)` (JSON Schema 2020-12 subset — `type` / `properties` / `required` / `enum` / `const` / length + range caps) so an LLM-supplied argument shape that doesn't match refuses BEFORE the tool runs. Define each tool's required scopes via `b.mcp.capability.create(scopes)` and gate execution on `cap.satisfiedBy(grantedScopes)` (LLM08 least-privilege)
344
346
  - [ ] For AI inference endpoints (especially pay-per-use provider models): wire `b.ai.quota.create({ dimension, period, limit, enforcement: "hard" })` and call `quota.consume(tenant, model, amount)` BEFORE every inference — caps tokens / requests / cost-usd / compute-hours per tenant per window so one tenant cannot run up an unbounded bill (OWASP LLM10:2025 unbounded consumption / denial-of-wallet). For multi-node deployments supply an `opts.store` whose `reserve` (atomic conditional test-and-charge) + `add` are atomic on the shared backend (Redis Lua / a SQL `UPDATE ... WHERE used + :amt <= :limit`) so the ceiling is enforced on the cluster-wide aggregate, not per-process
345
347
  - [ ] For endpoints returning aggregate statistics over personal data (counts / sums / means / histograms): add calibrated noise with `b.ai.dp` and gate spend with `b.ai.dp.budget({ scope, epsilon, delta })` — use `type: "laplace"` (snapping mechanism) or `type: "gaussian"` (discrete Gaussian), NEVER a hand-rolled `Math.random`-based noise generator: a naive double-precision Laplace sampler lets an attacker distinguish neighbouring datasets from a single output (Mironov 2012), silently breaking the guarantee. Track the per-scope ε/δ budget so repeated queries can't be averaged to cancel the noise
@@ -373,6 +375,7 @@ This is the minimum-viable security posture for a production deployment. The fra
373
375
  - [ ] For routes that build JSONB queries from operator input — `b.db.from(table).where(field, "@>", value)` and the `?` / `?|` / `?&` JSONB key operators route the value through `b.safeJsonPath.validateContainment` / `validateKey` automatically; refuses NUL / control / bidi / zero-width characters in any string leaf or key. Operators building a literal JSONpath expression for `@?` / `@@` call `b.safeJsonPath.validateExpression(expr)` before binding — refuses filter predicates `?(...)`, recursive descent `$..`, script-shape `(@.x.y)`, JS-source hints, and bracket depth bombs
374
376
  - [ ] For idempotency-key middleware on multi-process fleets — use `b.middleware.idempotencyKey.dbStore({ db: b.db })` instead of `memoryStore`. As of v0.9.15 the dbStore defaults to `hashKeys: true` (operator-supplied keys are sha3-512 namespace-hashed before insert/lookup so the DB never sees raw keys that might carry PII — order numbers / emails / vendor prefixes) and `seal: true` (cached response `headers` + `body` are sealed via `b.cryptoField.sealRow` AEAD envelope when vault is initialized so a DB dump leaks neither). Forensic columns (`status_code` / `fingerprint` / `expires_at`) stay plaintext-queryable without unsealing. Opt-out via `{ hashKeys: false, seal: false }` only with a documented justification
375
377
  - [ ] For long-running daemons exposing live metrics — use `b.metrics.snapshot.startWriter({ path, intervalMs, fields })` to flush an atomic JSON snapshot to disk; let a CLI/sidecar consume it via `b.metrics.snapshot.read(path)` + `b.metrics.snapshot.render(snap, { format: "prometheus" | "text" })`. Avoids opening an HTTP port for scrape access. Snapshot read uses `b.safeJson.parse` with a 4 MiB ceiling so a hostile writer with disk-write access can't OOM the reader
378
+ - [ ] For decoding CBOR from untrusted sources (COSE / CWT / WebAuthn attestation objects, IoT payloads): use `b.cbor.decode(buffer, opts)` — bounded by default (depth + total-size caps, indefinite-length + reserved-info refusal), never a raw streaming parser. Allowlist only the tags you process via `allowedTags` (an un-vetted tag triggers semantic reprocessing — a confused-deputy vector), and on a signature-verify path pass `requireDeterministic: true` so a non-canonical re-encoding can't slip a malleable representation past the verifier
376
379
  - [ ] For install-pipeline contexts that run BEFORE the framework is installed (Dockerfile build stages, `install.sh`, `update.sh`, SEA bundle verification) — use `b.selfUpdate.standaloneVerifier` (since v0.9.13). It's a zero-dep verifier (only `node:crypto` + `node:fs`) for ECDSA P-384 / Ed25519 / ML-DSA-87 signatures. Operators physically copy the file via `cp "$(node -p "require('@blamejs/core').selfUpdate.standaloneVerifier.path")" install/standalone-verifier.js` into their install pipeline alongside an operator-owned pubkey
377
380
  - [ ] For daemons that rotate TLS posture without restarting (pinset reload / certificate refresh / `C.TLS_GROUP_PREFERENCE` updates) — call `b.pqcAgent.reload()` after the posture change so the next `b.pqcAgent.agent` access rebuilds against current TLS state. Existing in-flight sockets complete naturally; idle keep-alive sockets are torn down
378
381
  - [ ] For SBOM regeneration / vendor-data integrity sweeps / release-asset bundling — use `b.crypto.hashFilesParallel(filePaths, { algorithms, concurrency, onProgress })` to hash N files in parallel in a single-pass per file. Operator-tunable concurrency cap (default `min(8, paths.length)`, range 1..256) + tunable algorithms list (default `["sha256", "sha3-512"]` for PQC-first + legacy compat). Returns rows in input order
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 1,
3
- "frameworkVersion": "0.12.29",
4
- "createdAt": "2026-05-24T17:07:11.597Z",
3
+ "frameworkVersion": "0.12.32",
4
+ "createdAt": "2026-05-24T19:44:18.478Z",
5
5
  "exports": {
6
6
  "a2a": {
7
7
  "type": "object",
@@ -3203,6 +3203,23 @@
3203
3203
  }
3204
3204
  }
3205
3205
  },
3206
+ "jar": {
3207
+ "type": "object",
3208
+ "members": {
3209
+ "AuthJarError": {
3210
+ "type": "function",
3211
+ "arity": 4
3212
+ },
3213
+ "JAR_TYP": {
3214
+ "type": "primitive",
3215
+ "valueType": "string"
3216
+ },
3217
+ "parse": {
3218
+ "type": "function",
3219
+ "arity": 2
3220
+ }
3221
+ }
3222
+ },
3206
3223
  "jwt": {
3207
3224
  "type": "object",
3208
3225
  "members": {
@@ -5988,6 +6005,27 @@
5988
6005
  }
5989
6006
  }
5990
6007
  },
6008
+ "cbor": {
6009
+ "type": "object",
6010
+ "members": {
6011
+ "CborError": {
6012
+ "type": "function",
6013
+ "arity": 4
6014
+ },
6015
+ "Tag": {
6016
+ "type": "function",
6017
+ "arity": 2
6018
+ },
6019
+ "decode": {
6020
+ "type": "function",
6021
+ "arity": 2
6022
+ },
6023
+ "encode": {
6024
+ "type": "function",
6025
+ "arity": 2
6026
+ }
6027
+ }
6028
+ },
5991
6029
  "cdnCacheControl": {
5992
6030
  "type": "object",
5993
6031
  "members": {
@@ -243,6 +243,7 @@ var auth = {
243
243
  require("./lib/auth/jwt"),
244
244
  { verifyExternal: require("./lib/auth/jwt-external").verifyExternal }),
245
245
  oauth: require("./lib/auth/oauth"),
246
+ jar: require("./lib/auth/jar"),
246
247
  lockout: require("./lib/auth/lockout"),
247
248
  dpop: require("./lib/auth/dpop"),
248
249
  aal: require("./lib/auth/aal"),
@@ -454,6 +455,7 @@ module.exports = {
454
455
  // b.jose.jwe.experimental — see lib/jose-jwe-experimental.js for
455
456
  // the codepoint-stability contract.
456
457
  jose: { jwe: { experimental: require("./lib/jose-jwe-experimental") } },
458
+ cbor: require("./lib/cbor"),
457
459
  queue: queue,
458
460
  logStream: logStream,
459
461
  redact: redact,