Skip to content

Commit 76b3e3e

Browse files
latest 0.5.1 packages and docs
1 parent e1a4693 commit 76b3e3e

6 files changed

Lines changed: 10 additions & 9 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,13 @@ This allows automated tools to cryptographically verify published sustainability
318318

319319
## Reference implementation (publisher/)
320320

321-
Published on npm: **[`sustainability-wellknown-publisher`](https://www.npmjs.com/package/sustainability-wellknown-publisher)** (`npm install sustainability-wellknown-publisher`). The `0.1.0` release on the registry implements the historical `-02` / schema-`1.1` model; the `0.4.0` release implements the current schema-`2.0` model (revision `-04`; the latest posted `-05` revision makes no schema change). `0.5.0` is a version-only bump keeping the two packages in lockstep — the publisher's code is unchanged from `0.4.0`.
321+
Published on npm: **[`sustainability-wellknown-publisher`](https://www.npmjs.com/package/sustainability-wellknown-publisher)** (`npm install sustainability-wellknown-publisher`). The `0.1.0` release on the registry implements the historical `-02` / schema-`1.1` model; the `0.4.0` release implements the current schema-`2.0` model (revision `-04`; the latest posted `-05` revision makes no schema change). `0.5.0`/`0.5.1` are version-only bumps keeping the two packages in lockstep — the publisher's code is unchanged from `0.4.0`.
322322

323323
[publisher/](publisher/) is a production-grade TypeScript implementation that publishes a fully draft-conformant `/.well-known/sustainability-data` document. It ingests metrics from pluggable source adapters — static/computed values, Kepler/Prometheus energy telemetry, the Climatiq estimate API, **Green Web Foundation CO2.js (bytes → carbon)**, the **Green Web Foundation carbon.txt hosted API**, and enterprise suites (Salesforce Net Zero Cloud, Microsoft Sustainability Manager, Watershed) — normalizes them to the draft's field model, **validates every payload against this repo's JTD and CDDL schemas before serving** (publish-only-if-valid), and exposes the Basic and Extended service levels with the draft's mandated DoS/privacy safeguards. It can also **serve a bidirectional `carbon.txt`** that points back to the metrics document. It ships as Express and Fastify middleware plus a standalone server that any web server can reverse-proxy. See [publisher/README.md](publisher/README.md) and [publisher/USAGE.md](publisher/USAGE.md).
324324

325325
## Reference implementation (consumer/)
326326

327-
Published on npm: **[`sustainability-wellknown-consumer`](https://www.npmjs.com/package/sustainability-wellknown-consumer)** (`npm install sustainability-wellknown-consumer`). As with the publisher, `0.1.0` on the registry implements the `-02` / schema-`1.1` model; the `0.4.0` release implements the current schema-`2.0` model (revision `-04`; the latest posted `-05` revision makes no schema change). `0.5.0` fixed a CLI argument-parsing bug found while verifying the first live deployment — see the note under "Verify a live deployment" below.
327+
Published on npm: **[`sustainability-wellknown-consumer`](https://www.npmjs.com/package/sustainability-wellknown-consumer)** (`npm install sustainability-wellknown-consumer`). As with the publisher, `0.1.0` on the registry implements the `-02` / schema-`1.1` model; the `0.4.0` release implements the current schema-`2.0` model (revision `-04`; the latest posted `-05` revision makes no schema change). `0.5.0` fixed a CLI argument-parsing bug found while verifying the first live deployment (`0.5.1` is a documentation-only follow-up) — see the note under "Verify a live deployment" below.
328328

329329
[consumer/](consumer/) is a reference **client** for `/.well-known/sustainability-data`, complementing `publisher/`'s reference producer: fetch, defensively validate (JTD schema plus the draft's cross-entry array rules, since a non-conformant upstream server is the normal case for early ecosystem adoption), and transform (CSV, NDJSON, a flattened one-row-per-metric shape, trend aggregation) a document from any origin. It ships a zero-dependency one-call function (`fetchSustainability`) and a richer `SustainabilityClient` class for repeated, ETag-cached polling, plus a `sustainability-fetch` CLI whose `--strict` mode doubles as a standalone conformance checker usable against **any** implementation, not just this repo's own `publisher/`. Its `interop.test.ts` — a live, in-process round trip against a real `Publisher` instance — is concrete, running proof of the draft's client-side MUSTs (accept both response shapes; ignore unknown fields; apply the legacy-compatibility rules for historical `1.x` documents). See [consumer/README.md](consumer/README.md) and [consumer/USAGE.md](consumer/USAGE.md).
330330

consumer/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ is the normal case for early ecosystem adoption, not a hypothetical. Built
1515
basic-first and M2M-oriented: every API is one line to call from a script (a cron
1616
job, a crawler, a carbon-aware scheduler) and fails loudly and legibly on bad input.
1717

18-
> **Version note:** consumer **0.5.0** (this tree, and the current npm release)
18+
> **Version note:** consumer **0.5.1** (this tree, and the current npm release —
19+
> a documentation-only release; its code is identical to `0.5.0`)
1920
> implements the **-04**/**-05** draft revisions' `"2.0"` wire format — the renamed
2021
> `/.well-known/sustainability-data` URI (earlier revisions requested the suffix
2122
> `sustainability`), 8 mandatory fields (including the opaque `target` reporting

consumer/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

consumer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sustainability-wellknown-consumer",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "Reference client for /.well-known/sustainability-data (draft-besleaga-sustainability-wellknown): fetch, validate, and transform. Complements sustainability-wellknown-publisher.",
55
"license": "BSD-3-Clause",
66
"author": "Andrei Nicolae Besleaga",

publisher/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

publisher/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sustainability-wellknown-publisher",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "Production publisher/gateway that serves a draft-conformant /.well-known/sustainability-data document from pluggable metric sources (static/computed, Kepler/Prometheus, Climatiq, Salesforce Net Zero Cloud, Microsoft Sustainability Manager, Watershed).",
55
"license": "BSD-3-Clause",
66
"author": "Andrei Nicolae Besleaga",

0 commit comments

Comments
 (0)