@blamejs/core 0.7.93 → 0.7.94

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.7.x
10
10
 
11
+ - **0.7.94** (2026-05-06) — `b.compliance.REGIME_MAP` + `b.compliance.describe(<posture>)` — frozen lookup table mapping each posture name to its human-readable name + statutory citation + jurisdiction + domain. `b.compliance.describe("hipaa")` returns `{ name: "Health Insurance Portability and Accountability Act", citation: "Pub. L. 104-191; 45 CFR Parts 160, 162, 164", jurisdiction: "US", domain: "health" }`. Operators rendering the deployment posture in admin UI / audit logs reach for `REGIME_MAP[posture]` instead of hand-rolling a lookup table; values track the regulatory text and update with the framework rather than going stale in operator code. Covers all 19 postures shipped through v0.7.91 (hipaa / pci-dss / soc2 / sox + the v0.7.91 expansions: wmhmda / bipa / ccpa / gdpr / dora / nis2 / cra / ai-act / lgpd-br / pipl-cn / appi-jp / pdpa-sg / pipeda-ca / uk-gdpr). `domain` field categorizes the regime (privacy / health / payment / cybersecurity / financial-reporting / etc.) so operators can render compliance dashboards grouped by domain instead of alphabetical posture.
12
+
11
13
  - **0.7.93** (2026-05-06) — Adjacent-regulation incident-reporting deadline reference exported on `b.dora`. **`b.dora.DEADLINES_NIS2`** — NIS2 (Directive (EU) 2022/2555) Art. 23 deadlines: 24h early warning, 72h initial notification, 1 month final report. **`b.dora.DEADLINES_CRA`** — CRA (Regulation (EU) 2024/2847) Art. 14 deadlines: 24h early warning, 72h initial notification, 14 days final report. **`b.dora.DEADLINES_HIPAA_BREACH`** — HIPAA Breach Notification Rule (45 CFR §164.404 / §164.408) deadlines: 60 days for affected individuals, 60 days for HHS Secretary, annual aggregate report by March 1 for sub-500-individual breaches. Operators handling NIS2 / CRA / HIPAA reporting reach for these constants instead of pinning literal hour counts in their workflow code; the values track the regulatory text and update with the framework rather than going stale in operator code. The b.dora factory itself continues to enforce DORA Article 19 deadlines unchanged — operators wiring NIS2 / CRA / HIPAA workflows compose against the deadline constants directly with their own scheduler / submission code.
12
14
 
13
15
  - **0.7.92** (2026-05-06) — Retention floors + observability semconv expansion. **`b.retention.complianceFloor(<posture>, candidateMs)`** now recognizes `nis2` (3 years — NIS2 Art. 23 incident reporting), `cra` (5 years — CRA Art. 14 vulnerability handling logs), `lgpd-br` (5 years — Brazil fiscal record minimum + LGPD Art. 16), `appi-jp` (3 years — Japan APPI handler-of-record), `pdpa-sg` (1 year — PDPA breach notification audit trail), and `uk-gdpr` (6 years — UK ICO guidance + statutory limit alignment). `gdpr` continues to have no fixed minimum (Art. 5(1)(e) is "no longer than necessary" — operator-driven). **`b.observability.SEMCONV`** gains RPC attributes (`RPC_SYSTEM` / `RPC_SERVICE` / `RPC_METHOD` / `RPC_GRPC_STATUS_CODE`), additional messaging keys (`MESSAGING_CLIENT_ID` / `MESSAGING_MESSAGE_ID` / `MESSAGING_DESTINATION_PARTITION_ID` / `MESSAGING_BATCH_MESSAGE_COUNT`), network transport (`NETWORK_TRANSPORT` / `NETWORK_CONNECTION_TYPE`), process / runtime identification (`PROCESS_PID` / `PROCESS_RUNTIME_NAME` / `PROCESS_RUNTIME_VERSION`), service identification (`SERVICE_NAME` / `SERVICE_VERSION` / `SERVICE_INSTANCE_ID`), and telemetry SDK self-id (`TELEMETRY_SDK_NAME` / `TELEMETRY_SDK_LANGUAGE` / `TELEMETRY_SDK_VERSION`). Operators wiring the framework's tap into a gRPC-fronted OTel collector or an outbox-fed Kafka topic now reference the canonical attribute names directly without an aliasing table on their side.
package/lib/compliance.js CHANGED
@@ -125,12 +125,134 @@ function _resetForTest() {
125
125
  STATE.setAt = null;
126
126
  }
127
127
 
128
+ // Posture → human-readable name + statutory citation + jurisdiction.
129
+ // Operators rendering the deployment posture in admin UI / audit logs
130
+ // reach for REGIME_MAP[posture] instead of hand-rolling a lookup
131
+ // table. The values track the regulatory text and update with the
132
+ // framework rather than going stale in operator code.
133
+ var REGIME_MAP = Object.freeze({
134
+ "hipaa": {
135
+ name: "Health Insurance Portability and Accountability Act",
136
+ citation: "Pub. L. 104-191; 45 CFR Parts 160, 162, 164",
137
+ jurisdiction: "US",
138
+ domain: "health",
139
+ },
140
+ "pci-dss": {
141
+ name: "Payment Card Industry Data Security Standard",
142
+ citation: "PCI Security Standards Council v4.0.1",
143
+ jurisdiction: "international",
144
+ domain: "payment",
145
+ },
146
+ "soc2": {
147
+ name: "System and Organization Controls 2",
148
+ citation: "AICPA Trust Services Criteria",
149
+ jurisdiction: "US",
150
+ domain: "audit-attestation",
151
+ },
152
+ "sox": {
153
+ name: "Sarbanes-Oxley Act",
154
+ citation: "Pub. L. 107-204; 15 U.S.C. §§7201-7266",
155
+ jurisdiction: "US",
156
+ domain: "financial-reporting",
157
+ },
158
+ "wmhmda": {
159
+ name: "Washington My Health My Data Act",
160
+ citation: "RCW 19.373",
161
+ jurisdiction: "US-WA",
162
+ domain: "health",
163
+ },
164
+ "bipa": {
165
+ name: "Illinois Biometric Information Privacy Act",
166
+ citation: "740 ILCS 14",
167
+ jurisdiction: "US-IL",
168
+ domain: "biometrics",
169
+ },
170
+ "ccpa": {
171
+ name: "California Consumer Privacy Act / California Privacy Rights Act",
172
+ citation: "Cal. Civ. Code §§1798.100-1798.199",
173
+ jurisdiction: "US-CA",
174
+ domain: "privacy",
175
+ },
176
+ "gdpr": {
177
+ name: "General Data Protection Regulation",
178
+ citation: "Regulation (EU) 2016/679",
179
+ jurisdiction: "EU",
180
+ domain: "privacy",
181
+ },
182
+ "dora": {
183
+ name: "Digital Operational Resilience Act",
184
+ citation: "Regulation (EU) 2022/2554",
185
+ jurisdiction: "EU",
186
+ domain: "financial-resilience",
187
+ },
188
+ "nis2": {
189
+ name: "Network and Information Security Directive 2",
190
+ citation: "Directive (EU) 2022/2555",
191
+ jurisdiction: "EU",
192
+ domain: "cybersecurity",
193
+ },
194
+ "cra": {
195
+ name: "Cyber Resilience Act",
196
+ citation: "Regulation (EU) 2024/2847",
197
+ jurisdiction: "EU",
198
+ domain: "product-cybersecurity",
199
+ },
200
+ "ai-act": {
201
+ name: "Artificial Intelligence Act",
202
+ citation: "Regulation (EU) 2024/1689",
203
+ jurisdiction: "EU",
204
+ domain: "ai-governance",
205
+ },
206
+ "lgpd-br": {
207
+ name: "Lei Geral de Proteção de Dados",
208
+ citation: "Lei nº 13.709/2018",
209
+ jurisdiction: "BR",
210
+ domain: "privacy",
211
+ },
212
+ "pipl-cn": {
213
+ name: "Personal Information Protection Law",
214
+ citation: "Adopted Aug 20, 2021; effective Nov 1, 2021",
215
+ jurisdiction: "CN",
216
+ domain: "privacy",
217
+ },
218
+ "appi-jp": {
219
+ name: "Act on Protection of Personal Information",
220
+ citation: "Act No. 57 of 2003 (most recent amendment 2022)",
221
+ jurisdiction: "JP",
222
+ domain: "privacy",
223
+ },
224
+ "pdpa-sg": {
225
+ name: "Personal Data Protection Act",
226
+ citation: "Act 26 of 2012",
227
+ jurisdiction: "SG",
228
+ domain: "privacy",
229
+ },
230
+ "pipeda-ca": {
231
+ name: "Personal Information Protection and Electronic Documents Act",
232
+ citation: "S.C. 2000, c. 5",
233
+ jurisdiction: "CA",
234
+ domain: "privacy",
235
+ },
236
+ "uk-gdpr": {
237
+ name: "UK General Data Protection Regulation",
238
+ citation: "Data Protection Act 2018 + retained EU GDPR",
239
+ jurisdiction: "UK",
240
+ domain: "privacy",
241
+ },
242
+ });
243
+
244
+ function describe(posture) {
245
+ return REGIME_MAP[posture] || null;
246
+ }
247
+
128
248
  module.exports = {
129
249
  set: set,
130
250
  current: current,
131
251
  assert: assert,
132
252
  clear: clear,
253
+ describe: describe,
133
254
  KNOWN_POSTURES: KNOWN_POSTURES,
255
+ REGIME_MAP: REGIME_MAP,
134
256
  ComplianceError: ComplianceError,
135
257
  _resetForTest: _resetForTest,
136
258
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blamejs/core",
3
- "version": "0.7.93",
3
+ "version": "0.7.94",
4
4
  "description": "The Node framework that owns its stack.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "blamejs contributors",
@@ -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:1c2e15ca-bff7-43a5-ae92-d24199759193",
5
+ "serialNumber": "urn:uuid:4a206dc4-5c8b-485f-8557-d266d9ad6730",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-05-06T08:15:13.953Z",
8
+ "timestamp": "2026-05-06T08:24:52.645Z",
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.7.93",
22
+ "bom-ref": "@blamejs/core@0.7.94",
23
23
  "type": "library",
24
24
  "name": "blamejs",
25
- "version": "0.7.93",
25
+ "version": "0.7.94",
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.7.93",
29
+ "purl": "pkg:npm/%40blamejs/core@0.7.94",
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.7.93",
57
+ "ref": "@blamejs/core@0.7.94",
58
58
  "dependsOn": []
59
59
  }
60
60
  ]