7 Commits
Author SHA1 Message Date
chrnx ead71dc1b1 Merge pull request 'ci(release): spend the publish's one dist-tag on latest while there is no stable' (#60) from ci/publish-under-latest into develop
CI / dco (pull_request) Successful in 4s
CI / runtimes (bun) (pull_request) Successful in 14s
CI / build (pull_request) Successful in 25s
CI / runtimes (deno) (pull_request) Successful in 17s
CI / runtimes (edge) (pull_request) Successful in 11s
Promote → GitHub / push-github (push) Failing after 6s
CI / dco (push) Has been skipped
CI / build (push) Successful in 24s
CI / runtimes (bun) (push) Successful in 14s
CI / runtimes (deno) (push) Successful in 18s
CI / runtimes (edge) (push) Successful in 12s
2026-08-19 19:18:20 +00:00
chrnx 19fcc18899 ci(release): spend the publish's one dist-tag on latest while there is no stable
CI / dco (pull_request) Successful in 4s
CI / runtimes (bun) (pull_request) Successful in 14s
CI / build (pull_request) Successful in 24s
CI / runtimes (deno) (pull_request) Successful in 18s
CI / runtimes (edge) (pull_request) Successful in 12s
`npm dist-tag` cannot use Trusted Publishing. The OIDC exchange lives inside
`publish.js` and nowhere else, so the token it returns is publish-scoped: the
step added in the previous commit got `E401` on v26.8.0-beta.1, after both
registries had already taken the version.

That leaves one npm write per release, and it has to go where it counts.
While no stable exists, `latest` and `beta` mean the same thing — there is
nothing else to install — so `latest` takes the publish, because that is what
a bare `npm install @green-tea/core` resolves to and an untouched `latest`
hands the default install an older build than the one just released. The
channel tag is moved by hand; the step prints the command and AGENTS.md says
when it applies.

This is temporary by construction. Once a stable version exists it owns
`latest`, a beta published afterwards must not drag it backwards, and the
publish goes back to setting the channel tag directly — with nothing left to
move by hand.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-19 14:17:12 -05:00
chrnx 7f9e6b19d6 Merge pull request 'ci(release): keep latest on the newest beta, and make a re-run finishable' (#58) from ci/release-dist-tags into develop
CI / dco (pull_request) Successful in 4s
CI / runtimes (bun) (pull_request) Successful in 15s
CI / build (pull_request) Successful in 24s
CI / runtimes (deno) (pull_request) Successful in 18s
CI / runtimes (edge) (pull_request) Successful in 12s
CI / dco (push) Has been skipped
CI / runtimes (bun) (push) Successful in 15s
CI / build (push) Successful in 25s
CI / runtimes (deno) (push) Successful in 19s
CI / runtimes (edge) (push) Successful in 12s
Release → npmjs / publish-prod (push) Has been skipped
Promote → GitHub / push-github (push) Successful in 5s
2026-08-19 19:11:16 +00:00
chrnx 7be26fda5c ci(release): keep latest on the newest beta, and make a re-run finishable
CI / dco (pull_request) Successful in 5s
CI / runtimes (bun) (pull_request) Successful in 14s
CI / build (pull_request) Successful in 24s
CI / runtimes (edge) (pull_request) Successful in 12s
CI / runtimes (deno) (pull_request) Successful in 19s
While there is no stable release, a bare `npm install @green-tea/core` should
get the same thing `@beta` gets — that is what the docs promise. Since
`1a313c2` a prerelease publishes under its channel tag only, so the next
release would have left `latest` behind on 26.8.0-beta.0: an older build for
anyone who installs without asking for a channel.

`npm publish` sets one tag, and `npm dist-tag` cannot use Trusted Publishing —
the OIDC exchange lives inside `publish.js` and nowhere else. Rather than keep
a long-lived npm token in a secret for one command, the step runs the same
exchange itself: request the Actions id-token, trade it for a short-lived
package-scoped token, move the tag. Both values are masked.

The rule is bounded on purpose. Once a stable version exists it owns `latest`
permanently, and a beta published afterwards must not drag it backwards; the
lookup that decides this is read into a variable first, so a failed request
fails the step instead of passing for "no stable exists".

Both publishes also become skip-if-present. That is not belt-and-braces: the
new step runs after them and can fail, so a re-run has to be able to finish
the remaining work instead of dying on a version npm would reject anyway. The
JSR guard asks api.jsr.io rather than jsr.io/meta.json, which is 404 for a
package with no versions yet — the state this package is actually in.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-19 14:10:00 -05:00
chrnx e540752f1e Merge pull request 'chore(release): close the changelog at 26.8.0-beta.1' (#56) from chore/close-changelog-26.8.0-beta.1 into develop
CI / dco (pull_request) Successful in 4s
CI / runtimes (bun) (pull_request) Successful in 13s
CI / build (pull_request) Successful in 24s
CI / runtimes (deno) (pull_request) Successful in 18s
CI / runtimes (edge) (pull_request) Successful in 12s
CI / dco (push) Has been skipped
CI / build (push) Successful in 24s
CI / runtimes (bun) (push) Successful in 14s
CI / runtimes (deno) (push) Successful in 18s
Promote → GitHub / push-github (push) Successful in 6s
CI / runtimes (edge) (push) Successful in 12s
2026-08-19 19:02:33 +00:00
chrnx e86051382d chore(release): close the changelog at 26.8.0-beta.1
CI / dco (pull_request) Successful in 4s
CI / runtimes (bun) (pull_request) Successful in 15s
CI / build (pull_request) Successful in 24s
CI / runtimes (edge) (pull_request) Successful in 12s
CI / runtimes (deno) (pull_request) Successful in 18s
Everything in `[Unreleased]` ships under this tag, so the section gets its
date one step before the tag exists — the order AGENTS.md now prescribes.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-19 14:01:14 -05:00
chrnx b8cb684a6b docs: close the changelog at the tag, not when the version is decided
The changelog said [26.8.0-beta.1] - 2026-08-17 with a date, above work that
has never been tagged and is on no registry — npm still ends at beta.0 and
neither forge has the tag. A day of further work then landed underneath it as
[Unreleased], so the file asserted both that beta.1 shipped and that its
contents had not.

Folds that section back into [Unreleased], where all of it actually belongs,
and writes the rule in AGENTS.md so the next version is closed one step before
its tag rather than the day it is decided.

A version number is a plan; a changelog heading is a receipt.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-19 14:00:55 -05:00
3 changed files with 173 additions and 98 deletions

No files matched your search

+45 -4
View File
@@ -12,6 +12,8 @@ jobs:
publish-prod:
if: ${{ github.server_url == 'https://github.com' }}
runs-on: ubuntu-latest
env:
PKG: '@green-tea/core'
permissions:
id-token: write # OIDC for Trusted Publishing (also enables provenance)
contents: read
@@ -40,11 +42,41 @@ jobs:
# types, module analysis — and learning about them after npm has published leaves the tag
# half-shipped. Seconds, against a failure mode with no clean recovery.
- run: deno publish --dry-run
# A publish sets exactly one dist-tag, and it is the only npm write this workflow can make:
# Trusted Publishing's OIDC exchange lives inside `npm publish` and nowhere else, so the token
# it produces is rejected by `npm dist-tag` (E401, learned on v26.8.0-beta.1). So the one tag
# the publish gets has to be the one that matters most.
#
# While no stable release exists, `latest` and the channel tag mean the same thing — there is
# nothing else to install — and `latest` takes it, because that is what a bare
# `npm install @green-tea/core` resolves to. Leaving it behind on an older beta would hand the
# default install an older build than the one just released. The channel tag is then moved by
# hand; the step prints the command. Once a stable version exists it owns `latest` for good,
# a later beta must not drag it backwards, and the channel tag becomes the automatic one again.
- name: Publish to npmjs
run: |
TAG=$(node -e "const v=require('./package.json').version;const m=v.match(/-([a-z]+)/);console.log(m?m[1]:'latest')")
echo "dist-tag: $TAG"
npm publish --access public --tag "$TAG"
VERSION=$(node -p "require('./package.json').version")
CHANNEL=$(node -e "const m=process.argv[1].match(/-([a-z]+)/);console.log(m?m[1]:'latest')" "$VERSION")
# Read the list into a variable so a failed lookup fails the step, rather than passing for
# "no stable exists" and pointing `latest` at a prerelease that should not have it.
VERSIONS=$(npm view "$PKG" versions --json)
if [ "$CHANNEL" != latest ] \
&& ! node -e "process.exit([].concat(JSON.parse(process.argv[1])).some(v=>!v.includes('-'))?0:1)" "$VERSIONS"; then
TAG=latest
else
TAG=$CHANNEL
fi
echo "$VERSION under dist-tag: $TAG"
# Skip rather than fail when the version is already up, so a re-run after a later failure
# can finish the remaining work instead of dying on a duplicate npm rejects anyway.
if npm view "$PKG@$VERSION" version >/dev/null 2>&1; then
echo "npm already has $VERSION"
else
npm publish --access public --tag "$TAG"
fi
if [ "$TAG" != "$CHANNEL" ]; then
echo "::notice::Move the channel tag by hand: npm dist-tag add $PKG@$VERSION $CHANNEL"
fi
# JSR last, deliberately. npm allows an unpublish within 72 hours; JSR versions are immutable
# and can never be replaced or removed. Ordered so a failure here costs a re-run, while a
# failure *after* it would cost a version number permanently. Version and entry points come
@@ -52,4 +84,13 @@ jobs:
# dist-tags, so a prerelease simply publishes under its own version. Auth is the same OIDC
# id-token npm just used; the package is linked to this repository on jsr.io.
- name: Publish to JSR
run: deno publish
run: |
VERSION=$(node -p "require('./package.json').version")
PKG=${PKG#@}
# 404 until the version exists, and also for a package with no versions at all — which is
# what this one was until v26.8.0-beta.1 — so the guard must not read a 404 as an error.
if curl -fsS -o /dev/null "https://api.jsr.io/scopes/${PKG%%/*}/packages/${PKG#*/}/versions/$VERSION"; then
echo "JSR already has $VERSION"
else
deno publish
fi
+33
View File
@@ -66,6 +66,39 @@ The exception is a `hotfix/*`, which lands on `main` without passing through `de
A conflict against unreleased `develop` work can never be delegated to an outside contributor — they cannot see the code they are conflicting with. Those are always the maintainer's to resolve.
## Releasing
**Close the `CHANGELOG` section as the step immediately before the tag, never earlier.** A version
heading with a date is a claim that the release exists. Until the tag is pushed and the registries
have it, that claim is false — and a `[26.8.0-beta.1] - 2026-08-17` sitting above work that shipped
nowhere is worse than no heading at all, because the next reader believes it.
This is not hypothetical: the beta.1 section was written the day the version was *decided*, the
release slipped, and a day of further work landed underneath it as `[Unreleased]`. The file then said
two contradictory things — that beta.1 was released, and that everything in it was not.
So the order is: everything merged and promoted → **close the section with the release date** → tag →
registries. Until that step, work accumulates under `[Unreleased]`, however certain the next version
number feels.
Bumping `package.json` and `deno.json` ahead of the tag is fine and necessary — those say what the
*next* publish will be called, and the docs repo's `verify:release` compares the tag against them.
A version number is a plan; a changelog heading is a receipt.
**After a beta release, move the channel tag by hand.** A publish sets exactly one dist-tag, and it
is the only npm write the release workflow can make — Trusted Publishing's OIDC exchange lives inside
`npm publish`, so the token it hands back is rejected by `npm dist-tag` (`E401`, learned the hard way
on `v26.8.0-beta.1`). While there is no stable release the publish spends that one tag on `latest`,
since that is what a bare `npm install @green-tea/core` resolves to, and the workflow prints the
command for the rest:
```bash
npm dist-tag add @green-tea/core@<version> beta
```
Once a stable version exists this stops being a chore: `latest` belongs to the stable release, the
publish gives a beta its channel tag directly, and there is nothing left to move.
## CI
The audit gate is scoped, not severity-filtered: `npm audit --omit=dev` blocks, everything else is `continue-on-error`. A critical in the test runner reaches nobody; a high in `reflect-metadata` reaches everyone. It runs *after* the code gates, because an advisory published by a third party must never decide whether a contributor sees their own lint and typecheck output.
+95 -94
View File
@@ -8,102 +8,15 @@ npm treats versions as semver and semver forbids leading zeros.
## [Unreleased]
### Changed
- **A request that crosses the mesh keeps its identity.** The RPC envelope now carries the caller's
`requestId` and `traceId`, and a teapot adopts them rather than opening a new investigation — the
same rule an incoming `x-request-id` already got, applied at the process boundary where a trace
matters most. It also carries `url`, so a proxied handler sees the path its caller asked for.
Both fields are **optional on the wire and the protocol version does not move**: `decode` validates
only what a frame type requires and passes extras through, so a teapot on an older green-tea
ignores them and keeps answering. That is degraded, not broken. The rule for when the version
*does* move is now written next to the constant, because "bump on any breaking change" never said
what counts as breaking.
The remote-route envelope is also built explicitly instead of cast from the internal request
object, which had been putting `ip` and `protocol` on the wire — fields the protocol never
declared and a teapot could have come to depend on.
- **Boot waits for a teapot that is merely slow, and still fails for one that is absent.**
`createApp({ mesh: { bootTimeoutMs } })` gives a teacup a grace period — default `timeoutMs`, so
30s — in which a teapot that has not finished starting is retried with backoff. When it passes,
the boot still fails, because a provider the graph depends on is not optional: booting without it
would only move the failure to the first request, where it becomes a caller's 503 instead of the
deploy's error. `bootTimeoutMs: 0` restores a single attempt.
**A refusal is not retried.** A wrong secret or a protocol-version mismatch is the teapot's
decision and will be the same decision in thirty seconds, so it fails immediately rather than
spending the whole budget to reach an identical error. The two are told apart by whether the
socket ever opened — a peer that accepted the connection and then hung up rejected us on purpose;
one that never accepted it may simply not be listening yet.
Every retry is logged *and* emitted as the new `mesh:boot:retry` lifecycle event, so a slow boot
is visible to whatever collects events and not only to whoever is watching a terminal.
### Fixed
- **A mesh export that carried behaviour arrived as `{}`, with HTTP 200 and no warning.** The wire is
JSON, so a value with methods — a connection pool, a client, a `Map` — lost everything but its
shape in transit. What reached the caller was an object: truthy, passing any `if (db)` check, and
missing every method, so the failure surfaced as `db.query is not a function` at a call site
arbitrarily far from the export that caused it.
A teapot now refuses to send one, on the side that still holds the real value, with a message
naming the token and what sat where: `mesh cannot transport 'db': result.db is a Pool instance`.
The check is an allowlist — primitives, plain objects, arrays — so `Date` is refused too, since it
would arrive as a string rather than the type the caller declared, which is the same silent
difference in a smaller costume. It is bounded by a scan budget, so a large legitimate payload is
never turned into an error by the cost of checking it.
**This is a constraint the documentation never stated:** a mesh export carries *data*, never
behaviour. Export what a handle produces, not the handle.
- **A mesh teacup now reconnects to a teapot that came back.** A dropped link used to stay dead for
the life of the process: every RPC answered 503 until the teacup was restarted, so deploying a
teapot forced a restart of every teacup that depended on it, and boot order became load-bearing.
Links now reconnect with exponential backoff and jitter (500ms doubling to 30s), tunable through
`mesh: { reconnect: { initialDelayMs, maxDelayMs } }` and disabled with `reconnect: false`.
`close()` is terminal — a link the application hung up on never reconnects, so `app.close()` cannot
leave a process that refuses to exit.
A returning teapot whose manifest no longer exports something the graph was validated against at
boot is **refused** rather than adopted, named by `mesh: { onManifestChange: 'refuse' }`, which is
the default and currently the only policy. The link keeps retrying, since a partial deploy may
still restore it, and logs the refusal once per distinct manifest rather than once per attempt.
Serving against a manifest that no longer backs the graph would surface as a 500 that looks like
application code. Extra exports in a returning manifest are ignored: the graph is fixed at boot.
This also closes the documented gap where **an app-scope export outlived its teapot with a stale
value** — a successful reconnect re-registers those bindings, so the next resolve re-runs the RPC.
Mesh remains **alpha** and behind `experimental: true`.
- **`mesh:rpc:error` reported the wire id where every other emitter reports a name.** A failing
remote call emitted `name: "0"` — the per-link request counter — so the teacup's event could not be
lined up with the teapot's event for the same failure. It now names the token or route.
- **A teapot now bounds its own handshake and caps the size of a control frame.** The teacup has
always timed out its side; the teapot had no equivalent, so an unauthenticated peer could hold a
socket open forever by simply never sending `hello`. And `decode` runs `JSON.parse` on
peer-controlled input *before* authentication, with no ceiling below whatever the WebSocket layer
allowed — 100 MiB under the `ws` package's defaults. Frames above 4,000,000 characters are now
refused with close code 1009, sized above the 1 MB default body limit a legitimate RPC can carry.
- **A `ws://` teapot on a non-loopback host now warns at boot.** The shared secret travels verbatim
in the `hello` frame, so an unencrypted link puts it in front of anyone on the path. A warning
rather than a refusal, since a private network doing its own mutual TLS is a real deployment and
green-tea cannot tell the two apart.
## [26.8.0-beta.1] - 2026-08-17
## [26.8.0-beta.1] - 2026-08-19
### Added
- **Observability: a correlated lifecycle event stream and an injectable logger.** Every request is
given an id — an incoming `x-request-id` is adopted rather than replaced — and every event of that
request carries it, alongside the matched route *pattern* (never the concrete URL, which would give
request carries it, alongside the matched route _pattern_ (never the concrete URL, which would give
a metrics backend one label per distinct path). Each step reports its own duration. `createApp({
logger })` accepts any object with `debug`/`info`/`warn`/`error`; the default writes structured JSON,
logger })` accepts any object with `debug`/`info`/`warn`/`error`; the default writes structured JSON,
or a readable line on a TTY, decided once at boot. Nothing in core writes to `console`, enforced by a
lint rule rather than by intention. `createApp({ logRequests: true })` logs one line per request, off
by default. New exports: `Logger`, `LogLevel`, `LogFields`, `createDefaultLogger`,
@@ -144,6 +57,37 @@ npm treats versions as semver and semver forbids leading zeros.
### Changed
- **A request that crosses the mesh keeps its identity.** The RPC envelope now carries the caller's
`requestId` and `traceId`, and a teapot adopts them rather than opening a new investigation — the
same rule an incoming `x-request-id` already got, applied at the process boundary where a trace
matters most. It also carries `url`, so a proxied handler sees the path its caller asked for.
Both fields are **optional on the wire and the protocol version does not move**: `decode` validates
only what a frame type requires and passes extras through, so a teapot on an older green-tea
ignores them and keeps answering. That is degraded, not broken. The rule for when the version
_does_ move is now written next to the constant, because "bump on any breaking change" never said
what counts as breaking.
The remote-route envelope is also built explicitly instead of cast from the internal request
object, which had been putting `ip` and `protocol` on the wire — fields the protocol never
declared and a teapot could have come to depend on.
- **Boot waits for a teapot that is merely slow, and still fails for one that is absent.**
`createApp({ mesh: { bootTimeoutMs } })` gives a teacup a grace period — default `timeoutMs`, so
30s — in which a teapot that has not finished starting is retried with backoff. When it passes,
the boot still fails, because a provider the graph depends on is not optional: booting without it
would only move the failure to the first request, where it becomes a caller's 503 instead of the
deploy's error. `bootTimeoutMs: 0` restores a single attempt.
**A refusal is not retried.** A wrong secret or a protocol-version mismatch is the teapot's
decision and will be the same decision in thirty seconds, so it fails immediately rather than
spending the whole budget to reach an identical error. The two are told apart by whether the
socket ever opened — a peer that accepted the connection and then hung up rejected us on purpose;
one that never accepted it may simply not be listening yet.
Every retry is logged _and_ emitted as the new `mesh:boot:retry` lifecycle event, so a slow boot
is visible to whatever collects events and not only to whoever is watching a terminal.
- **`.` and `..` in a request path are now resolved rather than 404'd.** `GET /public/../admin` reaches
a route declared as `/admin`, and `%2e` counts as a dot, so the encoded spelling cannot reach a route
the plain one resolves away from. This is a **behaviour change on Node only**, and it exists to end a
@@ -155,6 +99,58 @@ npm treats versions as semver and semver forbids leading zeros.
### Fixed
- **A mesh export that carried behaviour arrived as `{}`, with HTTP 200 and no warning.** The wire is
JSON, so a value with methods — a connection pool, a client, a `Map` — lost everything but its
shape in transit. What reached the caller was an object: truthy, passing any `if (db)` check, and
missing every method, so the failure surfaced as `db.query is not a function` at a call site
arbitrarily far from the export that caused it.
A teapot now refuses to send one, on the side that still holds the real value, with a message
naming the token and what sat where: `mesh cannot transport 'db': result.db is a Pool instance`.
The check is an allowlist — primitives, plain objects, arrays — so `Date` is refused too, since it
would arrive as a string rather than the type the caller declared, which is the same silent
difference in a smaller costume. It is bounded by a scan budget, so a large legitimate payload is
never turned into an error by the cost of checking it.
**This is a constraint the documentation never stated:** a mesh export carries _data_, never
behaviour. Export what a handle produces, not the handle.
- **A mesh teacup now reconnects to a teapot that came back.** A dropped link used to stay dead for
the life of the process: every RPC answered 503 until the teacup was restarted, so deploying a
teapot forced a restart of every teacup that depended on it, and boot order became load-bearing.
Links now reconnect with exponential backoff and jitter (500ms doubling to 30s), tunable through
`mesh: { reconnect: { initialDelayMs, maxDelayMs } }` and disabled with `reconnect: false`.
`close()` is terminal — a link the application hung up on never reconnects, so `app.close()` cannot
leave a process that refuses to exit.
A returning teapot whose manifest no longer exports something the graph was validated against at
boot is **refused** rather than adopted, named by `mesh: { onManifestChange: 'refuse' }`, which is
the default and currently the only policy. The link keeps retrying, since a partial deploy may
still restore it, and logs the refusal once per distinct manifest rather than once per attempt.
Serving against a manifest that no longer backs the graph would surface as a 500 that looks like
application code. Extra exports in a returning manifest are ignored: the graph is fixed at boot.
This also closes the documented gap where **an app-scope export outlived its teapot with a stale
value** — a successful reconnect re-registers those bindings, so the next resolve re-runs the RPC.
Mesh remains **alpha** and behind `experimental: true`.
- **`mesh:rpc:error` reported the wire id where every other emitter reports a name.** A failing
remote call emitted `name: "0"` — the per-link request counter — so the teacup's event could not be
lined up with the teapot's event for the same failure. It now names the token or route.
- **A teapot now bounds its own handshake and caps the size of a control frame.** The teacup has
always timed out its side; the teapot had no equivalent, so an unauthenticated peer could hold a
socket open forever by simply never sending `hello`. And `decode` runs `JSON.parse` on
peer-controlled input _before_ authentication, with no ceiling below whatever the WebSocket layer
allowed — 100 MiB under the `ws` package's defaults. Frames above 4,000,000 characters are now
refused with close code 1009, sized above the 1 MB default body limit a legitimate RPC can carry.
- **A `ws://` teapot on a non-loopback host now warns at boot.** The shared secret travels verbatim
in the `hello` frame, so an unencrypted link puts it in front of anyone on the path. A warning
rather than a refusal, since a private network doing its own mutual TLS is a real deployment and
green-tea cannot tell the two apart.
- **Buffered response bodies are narrowed to what the host runtime's `Response` accepts.** A Node
`Buffer` is a `Uint8Array` at runtime but its declared backing store admits `SharedArrayBuffer`, which
`BodyInit` does not — so Deno's types rejected it. This was a real typing hole on the `app.fetch`
@@ -167,6 +163,7 @@ npm treats versions as semver and semver forbids leading zeros.
## [26.8.0-beta.0] - 2026-08-02
### Added
- **Safe constrained route parameters:** patterns such as `:id(\d+)` match a complete decoded
segment. The parser accepts a deliberately small, bounded regex subset and rejects unsafe or
malformed expressions at boot. Specificity is now static ▸ constrained param ▸ plain param ▸
@@ -186,14 +183,14 @@ npm treats versions as semver and semver forbids leading zeros.
- **Bun adapter** (`@green-tea/core/bun`): `serveBun(app)` runs HTTP + SSE + WebSocket on Bun, reusing the neutral `app.upgrade` / `WsSocket` capability. WebSocket, rooms, and channels behave identically to Node and Deno.
- **Cloudflare Workers / edge adapter** (`@green-tea/core/edge`): `edgeHandler(app)` runs HTTP + SSE + WebSocket on workerd, reusing the neutral `app.upgrade` / `WsSocket` capability. Requires the `nodejs_compat` compatibility flag. Green Tea now runs on Node, Deno, Bun, and the edge — with identical WebSocket, rooms, and channel behaviour on all four.
- **`app.upgrade(request, socket)`**: neutral WebSocket entry point for non-Node runtimes, built on a shared `WsSocket` capability. WebSocket logic is now runtime-agnostic (`src/http/ws-core.ts`).
- **Mesh (alpha) runs on Node, Deno and Bun** — teapot *and* teacup, in any combination
- **Mesh (alpha) runs on Node, Deno and Bun** — teapot _and_ teacup, in any combination
(a Deno teapot can serve a Node teacup). It no longer needs `app.listen()`: the graph boots on
first use, so `serveDeno`/`serveBun` work through `app.fetch`/`app.upgrade`. Edge is **not**
supported — the teapot's secret comparison needs `node:crypto`'s `timingSafeEqual`, which
`nodejs_compat` does not provide.
- **`MESH_PROTOCOL_VERSION`**: the mesh wire is versioned. Peers exchange it in the `hello`/`manifest`
frames and refuse a mismatch, naming both versions, instead of misreading each other's frames.
The teapot checks the version *before* the secret — a skewed peer is not an auth failure.
The teapot checks the version _before_ the secret — a skewed peer is not an auth failure.
- **`HttpError` accepts `headers`**, so a custom error can carry its own response headers
(`retry-after`, `etag`, …) without a special case in the error renderer.
- **`app.ready(): Promise<void>`** — resolves the dependency graph and returns. On a mesh app it
@@ -209,6 +206,7 @@ npm treats versions as semver and semver forbids leading zeros.
pings — the platform `WebSocket` on Deno/Bun does not expose `ws.ping()`.
### Fixed
- The Deno WebSocket adapter snapshots request and connection metadata before accepting an upgrade;
Deno 2.9 invalidates that metadata once upgraded, which previously broke WebSocket and mesh boots.
- Repeated slashes and malformed path encoding now return `400` consistently across Node and Fetch
@@ -244,6 +242,7 @@ npm treats versions as semver and semver forbids leading zeros.
`request:step:leave`.
### Changed
- Root, runtime-only, and website dependency audits are clean after supported package updates and
narrow pins for vulnerable transitives. CI audits root + website trees and builds the docs; the
GitHub OIDC release workflow audits immediately before its publish gate.
@@ -268,6 +267,7 @@ First public beta, published under the npm `beta` dist-tag. The API may still
change before the stable release.
### Added
- **Transport security** — native TLS termination (https/wss), CORS with a
guarded preflight and credentials-safe origins, secure-by-default response
headers (nosniff, X-Frame-Options, Referrer-Policy, HSTS-when-secure), and
@@ -287,7 +287,7 @@ change before the stable release.
`405 Method Not Allowed` with an `Allow` header when a path exists under a
different method.
- **Argument decorators** — `@needs/@ctx/@param/@query/@body/@headers/@inbound/
@abort`, plus `@header('name')` as a singular alias of `@headers`.
@abort`, plus `@header('name')` as a singular alias of `@headers`.
- **Streams** — SSE / ndjson / WebSocket duplex over a multicast
`AsyncIterable` channel, with backpressure and cleanup; `rooms` broadcast hubs.
- **Graph introspection** — `app.explain(route)`, `app.graph()`,
@@ -309,6 +309,7 @@ change before the stable release.
- **Benchmarks** — reproducible `npm run bench` harness vs Express 5, Fastify 5,
NestJS, and raw `http`; results in [BENCHMARKS.md](./BENCHMARKS.md).
[Unreleased]: https://github.com/Expressive-Tea/green-tea/compare/v26.8.0-beta.0...main
[Unreleased]: https://github.com/Expressive-Tea/green-tea/compare/v26.8.0-beta.1...main
[26.8.0-beta.1]: https://github.com/Expressive-Tea/green-tea/compare/v26.8.0-beta.0...v26.8.0-beta.1
[26.8.0-beta.0]: https://github.com/Expressive-Tea/green-tea/compare/v26.7.0-beta.0...v26.8.0-beta.0
[26.7.0-beta.0]: https://github.com/Expressive-Tea/green-tea/releases/tag/v26.7.0-beta.0