@blamejs/core 0.13.14 → 0.13.16

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,10 @@ upgrading across more than a few patches at a time.
8
8
 
9
9
  ## v0.13.x
10
10
 
11
+ - v0.13.16 (2026-05-27) — **`b.mail.agent` docs now describe the facade accurately, and not-yet-wired verbs point to the primitive to use.** b.mail.agent's module documentation claimed it was "the standardization contract for every mail protocol" that JMAP / IMAP / POP3 all route through — but no protocol server actually dispatches through the agent (the framework's own JMAP EmailSubmission handler composes b.mail.send.deliver directly), and the compose / send / reply / forward, sieve.list / sieve.activate, identity / vacation / mdn.* and export / job / import verbs throw mail-agent/not-implemented. The docs are corrected to describe what the agent is: a mailbox-access facade (RBAC + posture + audit + dispatch around a mail store) whose read surface plus the mailbox-mutation and Sieve-upload methods are wired, with the remaining verbs not yet routed through it. Those verbs' error message now names the underlying primitive to compose directly (b.mail.send.deliver, b.mail.sieve, b.mailMdn, …) instead of citing a version tag that had long passed. The public WIRED_AT export (a method→version map that no longer reflected reality) is replaced by COMPOSE_HINT (a method→primitive-to-compose map). No behaviour change: the same methods are wired or throw exactly as before. **Changed:** *`b.mail.agent` documentation corrected; not-implemented errors point to the primitive to compose* — The `@module` / `@card` no longer claim the agent is the universal protocol-dispatch contract — it's documented as a mailbox-access facade with a wired read + mutation + Sieve-upload surface, and the compose/send/identity/vacation/MDN/export verbs documented as not yet routed through it (compose the underlying primitive directly until a protocol server adopts the agent). The `mail-agent/not-implemented` error now names that primitive (e.g. `b.mail.send.deliver`) rather than a passed version tag. **Removed:** *`b.mail.agent.WIRED_AT` export replaced by `COMPOSE_HINT`* — The `WIRED_AT` export mapped each method to a framework version that was supposed to "light it up" — versions that have all shipped without the wiring, so the map was misleading. It is replaced by `COMPOSE_HINT`, mapping each not-yet-wired method to the primitive an operator composes directly. Operators reading `b.mail.agent.WIRED_AT` should read `b.mail.agent.COMPOSE_HINT` instead (pre-1.0: no compatibility shim).
12
+
13
+ - v0.13.15 (2026-05-27) — **Corrected more source citations and made deferred/reserved options honest in their docs.** A second accuracy pass over source threat-annotations and option docs. Three citation corrections: the base64url strict-decode guard cited CVE-2022-0235 (which is actually a node-fetch cookie-leak, unrelated) — it now names the weakness class it defends (CWE-347 / CWE-1286 signature canonicalization); the glob consecutive-wildcard ReDoS cap cited the wrong library (the CVE-2026-26996 ReDoS is minimatch, not picomatch — the adjacent picomatch one is CVE-2026-33671); and CVE-2026-32178 is reframed to the CWE-138 header-injection-spoofing class the public record actually documents (and dropped from the end-of-data SMTP-smuggling list, which is a different class). Several options/statuses are now honest about not-yet-implemented surface: b.archive.read.zip.fromTrustedStream is marked experimental (its methods throw and its options aren't honored yet — the example now shows the supported buffer-then-random-access path); b.acme revokeCert's useCertKey / certPrivateKey are marked reserved (the cert-key path throws; account-key signing is the supported default); and a stale message claiming passkey break-glass factors were a future feature is removed (passkeys are a live allowed factor). No runtime behaviour changes beyond message/doc text. **Changed:** *Deferred / reserved surface now documented honestly* — `b.archive.read.zip.fromTrustedStream` is marked `experimental` — its `inspect`/`entries`/`extract` throw and its `bombPolicy`/`audit` options aren't honored yet; the documented example now shows the supported path (buffer the stream, then use the random-access reader). `b.acme` `revokeCert`'s `useCertKey` / `certPrivateKey` options are marked reserved (the cert-key-signed-revocation path throws; account-key signing, the default, covers mainstream CAs). A `b.breakGlass` policy error and comment that called passkey factors a future feature are corrected — passkeys are a live allowed factor. **Fixed:** *Corrected misattributed CVE citations in source threat-annotations* — `b.crypto.fromBase64Url`'s strict-decode guard cited CVE-2022-0235 (a node-fetch header-leak, unrelated to base64/JWT decoding); it now cites the weakness class it actually defends — CWE-347 / CWE-1286 signature canonicalization. `b.guardRegex`'s consecutive-`*` cap attributed CVE-2026-26996 to picomatch; that ReDoS is in minimatch (the picomatch ReDoS it also defends is CVE-2026-33671) — the library name is corrected. CVE-2026-32178 is reframed to the CWE-138 header-injection spoofing class the public advisory documents, and removed from the end-of-data SMTP-smuggling trio (a distinct class). No behaviour change — the defenses are unchanged.
14
+
11
15
  - v0.13.14 (2026-05-27) — **DNSSEC chain validation now bounds KeyTrap (CVE-2023-50387) amplification with hard caps.** b.network.dns.dnssec.verifyChain tried every DNSKEY whose 16-bit key tag matched an RRSIG, with no cap on how many candidates or total signature verifications a single response could drive. A hostile zone publishing many DNSKEYs sharing one key tag (plus matching RRSIGs) could force O(keys x signatures) full public-key verifications from one query — the KeyTrap denial-of-service (CVE-2023-50387). Validation is now bounded by non-configurable caps that match the BIND / Unbound mitigations: at most 4 same-tag candidate keys are tried per RRSIG, at most 64 DNSKEYs per zone link and 16 DS records per delegation are accepted, the chain is at most 128 links deep, and the whole response is held to a signature-validation budget that scales with chain depth (so a legitimate deep delegation is never false-rejected while bounded collisions stay bounded); exceeding any of these refuses the response rather than performing the work. Separately, a domain name that encodes to more than 255 octets is now refused at canonicalization (RFC 1035 §2.3.4), which also bounds the NSEC3 closest-encloser label enumeration, and the NSEC3 iteration ceiling is lowered from 500 to 150 to match the BIND 9.16.33+ / Unbound 1.17.1 fix for the sibling CVE-2023-50868. **Security:** *`verifyChain` caps colliding-key fan-out and total signature validations (KeyTrap / CVE-2023-50387)* — A zone advertising many same-key-tag DNSKEYs and RRSIGs can no longer drive unbounded public-key verifications. New refusals: `dnssec/too-many-colliding-keys` (>4 same-tag candidates per RRSIG), `dnssec/too-many-dnskeys` (>64 DNSKEYs per zone link), `dnssec/too-many-ds` (>16 DS records per delegation), `dnssec/too-many-links` (chain deeper than 128), and `dnssec/validation-budget-exceeded` (signature validations beyond the depth-scaled budget). The caps are intentionally non-configurable — they sit well above any legitimate zone, and the budget scales with chain depth so deep delegations validate normally. · *Domain-name octet cap + lower NSEC3 iteration ceiling* — A name that canonicalizes to more than 255 octets is refused (`dnssec/bad-name`, RFC 1035 §2.3.4), which bounds the per-label NSEC3 closest-encloser enumeration (CVE-2023-50868 class). The default NSEC3 iteration ceiling drops from 500 to 150, matching the BIND 9.16.33+ / Unbound 1.17.1 post-CVE defaults (RFC 9276 recommends 0).
12
16
 
13
17
  - v0.13.13 (2026-05-27) — **Archive extraction-path verification now refuses Windows reserved names, NTFS data streams, and trailing-dot/space per segment.** b.guardFilename.verifyExtractionPath (the per-entry gate b.archive.read.zip.extract / b.safeArchive run on every extracted file) checked traversal, absolute paths, drive-letter and UNC prefixes, null bytes, PATH_MAX overflow, and realpath containment — but not the per-segment Windows write-target hazards the disk validate / sanitize paths already reject. An archive entry named CON, NUL.txt, subdir/LPT1, file.txt:hidden, or secret.txt. stayed inside the extraction root, so the containment and realpath checks passed it, yet on Windows it would resolve to a device, write a hidden NTFS stream, or (after Windows strips the trailing dot/space) overwrite a sibling file. These are now refused: any path segment that collides with a Windows reserved device name, uses NTFS alternate-data-stream syntax (name:stream), or carries a trailing dot or leading/trailing whitespace. The checks are platform-unconditional — a verifier running on Linux still refuses names that are only dangerous on the Windows host that ultimately extracts the archive — with a per-check opt-out (reservedNamePolicy / adsPolicy / leadingTrailingPolicy: "allow") for Linux-only targets. **Security:** *`verifyExtractionPath` refuses per-segment Windows extraction hazards (reserved names / NTFS ADS / trailing dot-space)* — Closes a within-root write-target-redirection gap: an extracted entry could stay inside the destination yet, on Windows, resolve to a device (`CON` / `NUL` / `COM1` / `LPT1`), write a hidden alternate data stream (`file.txt:payload`), or overwrite a sibling after Windows strips a trailing dot/space (`config.`). The verification gate now rejects all three per path segment. Refusal is platform-unconditional (the verifier may run on a different OS than the extractor); set `reservedNamePolicy` / `adsPolicy` / `leadingTrailingPolicy` to `"allow"` to opt a check out on a Linux-only target. Single-entry, name-only residuals — 8.3 short-name aliasing, case-insensitive cross-entry collisions, and archive symlink/hardlink entry-target validation — remain the extract orchestrator's responsibility (it owns the case-folded seen-set and the link-target gate).
package/lib/acme.js CHANGED
@@ -1079,14 +1079,17 @@ function create(opts) {
1079
1079
  * the DER-encoded cert (base64url-encoded automatically) plus an
1080
1080
  * optional `reason` code per RFC 5280 §5.3.1 (0=unspecified,
1081
1081
  * 1=keyCompromise, 3=affiliationChanged, 4=superseded, 5=cessationOfOperation).
1082
- * Signs with the account key by default; pass `useCertKey:true`
1083
- * + the cert's private key to authorize via the cert's own key
1084
- * when the account key is unavailable.
1082
+ * Signs with the account key the only supported path today, and
1083
+ * sufficient for mainstream CAs. (The cert-key-signed variant
1084
+ * `useCertKey` / `certPrivateKey` is reserved and not yet
1085
+ * implemented; passing `useCertKey:true` throws.)
1085
1086
  *
1086
1087
  * @opts
1087
1088
  * reason: number, // RFC 5280 §5.3.1 reason code; default 0 (unspecified)
1088
- * useCertKey: boolean, // sign with the cert's own key instead of account key
1089
- * certPrivateKey: KeyObject, // required when useCertKey:true
1089
+ * useCertKey: boolean, // RESERVED cert-key-signed revocation is not yet
1090
+ * // implemented; account-key signing (the default)
1091
+ * // covers mainstream CAs. Passing true throws.
1092
+ * certPrivateKey: KeyObject, // RESERVED — consumed only by the cert-key path above
1090
1093
  *
1091
1094
  * @example
1092
1095
  * await acme.revokeCert(certDerBuffer, { reason: 4 }); // 4 = superseded
@@ -772,7 +772,7 @@ function zip(adapter, opts) {
772
772
  * @primitive b.archive.read.zip.fromTrustedStream
773
773
  * @signature b.archive.read.zip.fromTrustedStream(adapter, opts?)
774
774
  * @since 0.12.7
775
- * @status stable
775
+ * @status experimental
776
776
  * @related b.archive.read.zip, b.archive.adapters.trustedStream
777
777
  *
778
778
  * Forward-scan-only ZIP reader for trusted Readable sources. No
@@ -781,20 +781,23 @@ function zip(adapter, opts) {
781
781
  * `b.archive.zip().toStream()` output back into a reader for round-trip
782
782
  * verification).
783
783
  *
784
- * Adversarial input MUST use the random-access entry point with an
785
- * `fs` / `buffer` / `objectStore` / `http` adapter.
784
+ * NOT YET IMPLEMENTED: the streaming LFH walker is not built —
785
+ * `inspect()` / `entries()` / `extract()` throw
786
+ * `archive-read/trusted-stream-*-deferred`, and `bombPolicy` / `audit`
787
+ * are accepted but not yet honored. Re-opens when a streaming
788
+ * consumer needs it. Until then, collect the stream into a buffer and
789
+ * use the random-access reader, which is the supported path for both
790
+ * trusted round-trip verification and adversarial input.
786
791
  *
787
792
  * @opts
788
- * bombPolicy: { maxEntries, maxEntryDecompressedBytes,
789
- * maxTotalDecompressedBytes, maxExpansionRatio },
790
- * audit: b.audit,
793
+ * bombPolicy: { ... }, // reserved — not yet honored
794
+ * audit: b.audit, // reserved — not yet honored
791
795
  *
792
796
  * @example
793
- * var produced = fs.createReadStream("./own-export.zip");
794
- * var reader = b.archive.read.zip.fromTrustedStream(
795
- * b.archive.adapters.trustedStream(produced)
796
- * );
797
- * for await (var e of reader.entries()) console.log(e.name, e.size);
797
+ * // Supported path: buffer the stream, then read random-access.
798
+ * var bytes = await someStreamToBuffer(producedZipStream);
799
+ * var reader = b.archive.read.zip(b.archive.adapters.buffer(bytes));
800
+ * var entries = await reader.inspect();
798
801
  */
799
802
  function fromTrustedStream(adapter, opts) {
800
803
  if (!adapter || adapter.kind !== "trusted-sequential") {
@@ -805,25 +808,26 @@ function fromTrustedStream(adapter, opts) {
805
808
  var bombPolicy = _normalizeBombPolicy(opts.bombPolicy);
806
809
  void bombPolicy;
807
810
 
808
- // Trusted stream walks LFH-by-LFH. v0.12.7 ships the API surface +
809
- // a basic LFH walker for round-trip verification of the framework's
810
- // own emitted archives. The full feature parity (extraction via
811
- // streaming inflate, data-descriptor scanning) is intentionally
812
- // deferred to v0.12.8 alongside the tar reader's sequential mode.
811
+ // The streaming LFH walker is not built — only the API surface +
812
+ // adapter validation exist. Extraction via streaming inflate +
813
+ // data-descriptor scanning re-opens when a streaming consumer needs
814
+ // it; until then the supported path is to buffer the stream and use
815
+ // the random-access reader (which handles both trusted round-trip
816
+ // verification and adversarial input).
813
817
  async function inspect() {
814
818
  throw new ArchiveReadError("archive-read/trusted-stream-inspect-deferred",
815
- "fromTrustedStream.inspect() is deferred to v0.12.8 use the random-access entry " +
816
- "point with b.archive.adapters.buffer(await collect(readable)) for v0.12.7");
819
+ "fromTrustedStream.inspect() is not implementedcollect the stream into a buffer and " +
820
+ "use b.archive.read.zip(b.archive.adapters.buffer(bytes))");
817
821
  }
818
822
 
819
823
  async function* entries() {
820
824
  throw new ArchiveReadError("archive-read/trusted-stream-entries-deferred",
821
- "fromTrustedStream.entries() is deferred to v0.12.8 — collect into buffer for v0.12.7");
825
+ "fromTrustedStream.entries() is not implemented — collect into a buffer and use the random-access reader");
822
826
  }
823
827
 
824
828
  async function extract() {
825
829
  throw new ArchiveReadError("archive-read/trusted-stream-extract-deferred",
826
- "fromTrustedStream.extract() is deferred to v0.12.8 — collect into buffer for v0.12.7");
830
+ "fromTrustedStream.extract() is not implemented — collect into a buffer and use the random-access reader");
827
831
  }
828
832
 
829
833
  return {
@@ -130,9 +130,9 @@ function _ensureFactorLockout() {
130
130
  // keys + encryption-context binding (cross-cell tampering / accidental
131
131
  // row-swap fails closed). It does NOT defend against vault-key
132
132
  // compromise alone — the DEK is still vault-recoverable. True
133
- // second-factor cryptographic gating ships in v0.5.2 with passkey
134
- // integration (the passkey private key lives on the YubiKey, not in
135
- // the framework, so a vault leak alone can't unwrap).
133
+ // second-factor cryptographic gating uses passkey integration (the
134
+ // passkey private key lives on the YubiKey, not in the framework, so a
135
+ // vault leak alone can't unwrap).
136
136
 
137
137
  // In-memory DEK cache. Keyed by table name. Cleared on _resetForTest.
138
138
  var dekCache = new Map();
@@ -520,8 +520,7 @@ function _validatePolicySet(table, opts) {
520
520
  if (ALLOWED_FACTORS.indexOf(opts.factors[j]) === -1) {
521
521
  throw new BreakGlassError("breakglass/bad-policy",
522
522
  "policy.set: factors[" + j + "] '" + opts.factors[j] +
523
- "' not in v0.5.0 allowed factors [" + ALLOWED_FACTORS.join(",") + "]" +
524
- " (passkey lands in v0.5.2)");
523
+ "' not in allowed factors [" + ALLOWED_FACTORS.join(",") + "]");
525
524
  }
526
525
  }
527
526
  // Model B (cryptographic mode) ships in v0.5.1. When enabled,
package/lib/crypto.js CHANGED
@@ -789,10 +789,12 @@ function toBase64Url(buf) {
789
789
  *
790
790
  * Strict mode (default) refuses non-canonical input — chars outside
791
791
  * the RFC 4648 §5 alphabet, length-mod-4-of-1, mixed `+/` from
792
- * standard base64, trailing garbage. Defends a CVE-2022-0235 class
793
- * footgun where Node's permissive decoder silently tolerated
794
- * tampered JWT signatures. Operators with a documented lossy legacy
795
- * payload opt out per call via `{ strict: false }`.
792
+ * standard base64, trailing garbage. Defends the CWE-347 /
793
+ * CWE-1286 signature-canonicalization footgun where a permissive
794
+ * base64url decoder silently tolerates a tampered JWS / JWT signature
795
+ * (non-canonical bytes decoding to the same buffer). Operators with a
796
+ * documented lossy legacy payload opt out per call via
797
+ * `{ strict: false }`.
796
798
  *
797
799
  * @opts
798
800
  * strict: boolean // default: true — refuse non-canonical input
@@ -817,7 +819,8 @@ function fromBase64Url(s, opts) {
817
819
  // OAuth `state` round-tripping) MUST reject non-canonical / malformed
818
820
  // input. The Node base64url decoder silently tolerates trailing
819
821
  // garbage, mixed `+/` from standard base64, missing padding errors,
820
- // and length-mod-4 shapes — CVE-2022-0235 class footgun. Strict mode
822
+ // and length-mod-4 shapes — the CWE-347 / CWE-1286 signature-
823
+ // canonicalization footgun. Strict mode
821
824
  // (the default) refuses anything outside the RFC 4648 §5 alphabet +
822
825
  // length rules. Operators with a known-lossy legacy payload pass
823
826
  // `{ strict: false }` to opt out per call.
package/lib/guard-dsn.js CHANGED
@@ -84,8 +84,9 @@
84
84
  * generating a DSN (the existing `b.mail.bounce` primitive does
85
85
  * this); this guard parses INBOUND DSNs and gates the parse
86
86
  * surface bounds, not the bounce-generation policy.
87
- * - **DSN header-injection class** (CVE-2026-32178 .NET
88
- * System.Net.Mail at outbound; the inbound parse path here)
87
+ * - **DSN header-injection class** (CVE-2026-32178 .NET CWE-138
88
+ * special-element / header-injection spoofing, the System.Net.Mail
89
+ * vector per MSRC, at outbound; the inbound parse path here)
89
90
  * — refuses CR/LF/NUL/C0 in header lines.
90
91
  * - **CSAF / iSchedule prose tampering** — operator inspecting
91
92
  * the prose part for the original recipient runs into the
@@ -37,8 +37,9 @@
37
37
  * octets. Total header value capped at 998 bytes per RFC 5322
38
38
  * §2.1.1 line cap.
39
39
  * - **CRLF + control-char refusal** — header-injection defense
40
- * (CVE-2026-32178 .NET System.Net.Mail class on the wire-protocol
41
- * surface; this primitive's job is the SEMANTIC shape).
40
+ * (CVE-2026-32178 .NET CWE-138 header-injection spoofing, the
41
+ * System.Net.Mail vector per MSRC, on the wire-protocol surface;
42
+ * this primitive's job is the SEMANTIC shape).
42
43
  * - **Phrase-injection refusal** — Operator-supplied display
43
44
  * phrase mustn't carry CRLF / `<` / `>` outside the angle
44
45
  * brackets (a separate Bcc/Cc header smuggled into the phrase
@@ -248,14 +248,14 @@ function _detectIssues(input, opts) {
248
248
  }
249
249
 
250
250
  // Consecutive-star wildcard cap (CVE-2026-26996). Operator-supplied
251
- // glob fragments compile to picomatch / RegExp; a long run of `*`
252
- // against a non-matching literal walks O(4^N). Three-or-more
251
+ // glob fragments compile to minimatch / picomatch / RegExp; a long run
252
+ // of `*` against a non-matching literal walks O(4^N). Three-or-more
253
253
  // consecutive `*` is the canonical bad shape; `**` (recursive glob)
254
254
  // stays permitted, gated by the profile's `maxConsecutiveStars`.
255
255
  function _detectConsecutiveStar(input, opts, issues) {
256
256
  if (opts.consecutiveStarPolicy === "allow") return;
257
- // CVE-2026-26996 is a picomatch / glob-shape backtracking class —
258
- // `***+literal` walks O(4^N) when picomatch translates the run to a
257
+ // CVE-2026-26996 is a minimatch glob-shape backtracking class —
258
+ // `***+literal` walks O(4^N) when minimatch translates the run to a
259
259
  // backtracking-heavy regex. Native ECMAScript regex syntax cannot
260
260
  // produce three consecutive `*` quantifiers (it's a SyntaxError),
261
261
  // so applying this detector to `inputKind: "regex"` strings only
@@ -15,8 +15,7 @@
15
15
  * ## Smuggling defense — bare-CR / bare-LF refusal
16
16
  *
17
17
  * The SMTP smuggling class (`CVE-2023-51764` Postfix, `CVE-2023-51765`
18
- * Sendmail, `CVE-2023-51766` Exim, `CVE-2026-32178` .NET
19
- * `System.Net.Mail`) exploits implementations that accept the
18
+ * Sendmail, `CVE-2023-51766` Exim) exploits implementations that accept the
20
19
  * non-standard end-of-data sequence `<LF>.<LF>` or `<LF>.<CR><LF>`
21
20
  * instead of the standard `<CR><LF>.<CR><LF>`. The introduced break-
22
21
  * out lets a malicious peer inject a second message past SPF / DMARC
package/lib/mail-agent.js CHANGED
@@ -7,19 +7,26 @@
7
7
  * @featured true
8
8
  *
9
9
  * @intro
10
- * The standardization contract for every mail protocol blamejs ships.
11
- * JMAP (v0.9.27), IMAP (v0.9.28), POP3 (v0.9.29), ManageSieve (v0.9.30),
12
- * the inbound MX listener (v0.9.24), and the submission listener
13
- * (v0.9.25) all translate their protocol calls into `agent.X(args)`.
14
- * The agent owns RBAC, posture enforcement, audit emission,
15
- * dispatch, and worker isolation; every protocol on top is a thin
16
- * shell.
10
+ * A mailbox-access facade that owns RBAC, posture enforcement, audit
11
+ * emission, dispatch (local / worker-pool / queue), and worker
12
+ * isolation around a mail store, so a protocol server built on top
13
+ * can stay a thin shell. It is designed to be the shared dispatch
14
+ * layer mail-protocol servers route through; today the read surface
15
+ * and the mailbox-mutation + Sieve-upload methods are wired, while the
16
+ * compose/send and identity/vacation/MDN/export verbs are not yet
17
+ * wired into the facade (see below).
17
18
  *
18
- * `agent.create()` returns the facade. Methods backed by v0.9.19's
19
- * `b.mailStore` run immediately; methods that depend on later slices
20
- * throw `mail-agent/not-implemented` with a `wiredAt` tag naming the
21
- * version that lights them up (defer-with-condition operator can
22
- * match against the tag to scope their integration).
19
+ * `agent.create()` returns the facade. Methods backed by
20
+ * `b.mailStore` (folders / fetch / search / move / flag / delete /
21
+ * expunge, plus `sieve.put`) run immediately. The remaining verbs
22
+ * compose / send / reply / forward, sieve.list / sieve.activate,
23
+ * identity / vacation / mdn.*, export / job / import — throw
24
+ * `mail-agent/not-implemented`: they are not yet routed through the
25
+ * agent. Until they are, compose the underlying primitive directly
26
+ * (`b.mail.send.deliver` for outbound, `b.mail.sieve` for Sieve,
27
+ * `b.mailMdn` for MDN, etc.) — which is what the framework's own JMAP
28
+ * `emailSubmissionSet` handler does. They wire into the facade when a
29
+ * protocol server adopts the agent as its dispatch layer.
23
30
  *
24
31
  * ```js
25
32
  * var agent = b.mail.agent.create({
@@ -58,9 +65,11 @@
58
65
  * on every entrypoint.
59
66
  *
60
67
  * @card
61
- * The standardization contract for every mail protocol JMAP / IMAP /
62
- * POP3 all translate into `agent.X(args)`. RBAC + posture + audit +
63
- * dispatch owned here; protocols on top are thin shells.
68
+ * Mailbox-access facade RBAC + posture + audit + dispatch around a
69
+ * mail store, so a protocol server on top stays a thin shell. Read +
70
+ * mailbox-mutation + Sieve-upload methods are wired; compose/send and
71
+ * identity/vacation/MDN/export verbs compose the underlying primitive
72
+ * directly until a protocol server routes them through the agent.
64
73
  */
65
74
 
66
75
  var lazyRequire = require("./lazy-require");
@@ -118,25 +127,25 @@ var SCOPE_FOR_METHOD = Object.freeze({
118
127
  import: "mail:import",
119
128
  });
120
129
 
121
- // Methods deferred behind a `wiredAt` version. Operator gets a clear
122
- // error pointing at the slice that lights them up — defer-with-
123
- // condition per the v1-defensible-scope rule.
124
- var WIRED_AT = Object.freeze({
125
- compose: "v0.9.25",
126
- send: "v0.9.25",
127
- reply: "v0.9.25",
128
- forward: "v0.9.25",
129
- "sieve.list": "v0.9.26",
130
- "sieve.put": "v0.9.26",
131
- "sieve.activate": "v0.9.26",
132
- "identity.set": "v0.9.25",
133
- "vacation.set": "v0.9.25",
134
- "mdn.send": "v0.9.25",
135
- "mdn.parse": "v0.9.25",
136
- "mdn.allowList": "v0.9.25",
137
- export: "v0.9.34a",
138
- job: "v0.9.34a",
139
- import: "v0.9.34",
130
+ // Verbs not yet routed through the agent facade. The error points the
131
+ // operator at the underlying primitive to compose directly (the
132
+ // escape hatch) defer-with-condition: these wire into the agent when
133
+ // a protocol server adopts it as its dispatch layer.
134
+ var COMPOSE_HINT = Object.freeze({
135
+ compose: "b.mail.send.deliver",
136
+ send: "b.mail.send.deliver",
137
+ reply: "b.mail.send.deliver",
138
+ forward: "b.mail.send.deliver",
139
+ "sieve.list": "b.mail.sieve",
140
+ "sieve.activate": "b.mail.sieve",
141
+ "identity.set": "your identity store + b.mail.sieve",
142
+ "vacation.set": "b.mail.sieve (vacation extension)",
143
+ "mdn.send": "b.mailMdn",
144
+ "mdn.parse": "b.mailMdn",
145
+ "mdn.allowList": "b.mailMdn",
146
+ export: "b.mailStore / b.auditTools",
147
+ job: "the dispatch queue directly",
148
+ import: "b.mailStore",
140
149
  });
141
150
 
142
151
  /**
@@ -653,9 +662,10 @@ function _notImplemented(ctx, method, args) {
653
662
  // the slice lights up.
654
663
  if (ctx.posture) guardMailQuery.validateActor(args && args.actor, ctx.posture);
655
664
  _checkPermission(ctx, method, args);
656
- ctx.auditEmit("mail.agent.not_implemented", args && args.actor, { method: method, wiredAt: WIRED_AT[method] });
665
+ ctx.auditEmit("mail.agent.not_implemented", args && args.actor, { method: method, composeDirectly: COMPOSE_HINT[method] });
657
666
  return Promise.reject(new MailAgentError("mail-agent/not-implemented",
658
- "agent." + method + ": wired at " + WIRED_AT[method] + " (defer-with-condition)"));
667
+ "agent." + method + " is not yet routed through the agent facade — compose " +
668
+ COMPOSE_HINT[method] + " directly"));
659
669
  }
660
670
 
661
671
  // ---- Internals ------------------------------------------------------------
@@ -771,7 +781,7 @@ module.exports = {
771
781
  consumer: consumer,
772
782
  MailAgentError: MailAgentError,
773
783
  SCOPE_FOR_METHOD: SCOPE_FOR_METHOD,
774
- WIRED_AT: WIRED_AT,
784
+ COMPOSE_HINT: COMPOSE_HINT,
775
785
  HEAVY_METHODS: HEAVY_METHODS,
776
786
  // Re-export the guard family so callers can introspect without
777
787
  // separate requires.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blamejs/core",
3
- "version": "0.13.14",
3
+ "version": "0.13.16",
4
4
  "description": "The Node framework that owns its stack.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "blamejs contributors",
package/sbom.cdx.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
3
3
  "bomFormat": "CycloneDX",
4
4
  "specVersion": "1.5",
5
- "serialNumber": "urn:uuid:7b7971af-a00b-4343-af83-3f8ef1a433dc",
5
+ "serialNumber": "urn:uuid:cd0375e1-7520-4024-b6eb-d8c708fc00db",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-05-27T13:56:08.465Z",
8
+ "timestamp": "2026-05-27T17:24:50.447Z",
9
9
  "lifecycles": [
10
10
  {
11
11
  "phase": "build"
@@ -19,14 +19,14 @@
19
19
  }
20
20
  ],
21
21
  "component": {
22
- "bom-ref": "@blamejs/core@0.13.14",
22
+ "bom-ref": "@blamejs/core@0.13.16",
23
23
  "type": "application",
24
24
  "name": "blamejs",
25
- "version": "0.13.14",
25
+ "version": "0.13.16",
26
26
  "scope": "required",
27
27
  "author": "blamejs contributors",
28
28
  "description": "The Node framework that owns its stack.",
29
- "purl": "pkg:npm/%40blamejs/core@0.13.14",
29
+ "purl": "pkg:npm/%40blamejs/core@0.13.16",
30
30
  "properties": [],
31
31
  "externalReferences": [
32
32
  {
@@ -54,7 +54,7 @@
54
54
  "components": [],
55
55
  "dependencies": [
56
56
  {
57
- "ref": "@blamejs/core@0.13.14",
57
+ "ref": "@blamejs/core@0.13.16",
58
58
  "dependsOn": []
59
59
  }
60
60
  ]