diff --git a/AGENTS.md b/AGENTS.md index 444f52e..c00b428 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -69,9 +69,9 @@ mirror is Plan B3, and it is unblocked rather than done. it lived. It is declared in the JSR package settings, not in `deno.json` — the config schema accepts `name`, `version`, `license`, `exports` and `publish`, and nothing else. - What this gives up: no discovery on npmjs.org, where the marketplace is the channel anyway, and - a site behind a registry proxy that mirrors npmjs.org and refuses a second one cannot reach the - plugins. Core still can — it publishes to both. + What this gives up, stated plainly rather than argued away: nobody searching npmjs.org will find + these, and a site behind a registry proxy that mirrors npmjs.org and refuses to add a second one + cannot install them at all. Core still can — it publishes to both. ## Conventions diff --git a/README.md b/README.md index 5a4ecec..dac48a8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,17 @@ -# green-tea plugins +

+ Green Tea +

+ +

green tea plugins.

+ +

Each one is a node in the graph, not a link in a chain.

+ +

+ A plugin declares what it provides; your route declares what it needs.
+ Nothing runs for a route that never asked for it. +

+ +--- Official plugins for [green-tea](https://github.com/Expressive-Tea/green-tea). Each one is its own package under `packages/`, published to JSR, and each README says which runtimes it supports and why @@ -20,9 +33,10 @@ That works under every package manager: `jsr add` writes one line to `.npmrc` an | [`@green-tea/rate-limit`](packages/rate-limit) | A per-request limiter with a branded `429` and a swept in-memory store | | [`@green-tea/metrics`](packages/metrics) | Counts the lifecycle stream and renders the Prometheus text format | -Plugins import core as types only. Their built code never imports it at all, so the core that runs -is always your application's, whatever version a plugin was written against — and nothing warns -about a version range, which under CalVer no range can express. +Plugins import core as types only, and a type import leaves nothing behind when it compiles — the +JavaScript JSR publishes never mentions core. So the core that runs is always your application's, +whatever version a plugin was written against, and nothing warns about a version range, which under +CalVer no range can express. That is about *loading*, not about disk. A plugin names an exact core in its `deno.json`, and when your version differs by more than the patch, npm places a second copy under the plugin rather than diff --git a/packages/jwt/README.md b/packages/jwt/README.md index 68f4e22..66e7849 100644 --- a/packages/jwt/README.md +++ b/packages/jwt/README.md @@ -1,4 +1,17 @@ -# @green-tea/jwt +

+ Green Tea +

+ +

@green-tea/jwt

+ +

Sign and verify, as one node in the graph.

+ +

+ Keys load once, while providers boot — a bad key fails the deploy,
+ not the first sign-in of the day. +

+ +--- Loads JWT signing keys at boot and publishes them into the graph as one registry. A handler asks for it with `@needs('jwt')` and signs or verifies by key name. diff --git a/packages/metrics/README.md b/packages/metrics/README.md index a6d3902..2eceae1 100644 --- a/packages/metrics/README.md +++ b/packages/metrics/README.md @@ -1,4 +1,17 @@ -# @green-tea/metrics +

+ Green Tea +

+ +

@green-tea/metrics

+ +

Count the lifecycle. Render Prometheus.

+ +

+ Reads the event stream green-tea already emits, so nothing in your
+ handlers has to know it is being measured. +

+ +--- Subscribes to green-tea's lifecycle stream and counts what happened. You expose it on a route you own, with the transformer this package ships. diff --git a/packages/rate-limit/README.md b/packages/rate-limit/README.md index fcea804..76b9d5a 100644 --- a/packages/rate-limit/README.md +++ b/packages/rate-limit/README.md @@ -1,4 +1,17 @@ -# @green-tea/rate-limit +

+ Green Tea +

+ +

@green-tea/rate-limit

+ +

A limit your handler's signature admits to.

+ +

+ The route asks for the limiter by name, so it runs where it is wanted
+ and nowhere else — and you can see which routes those are. +

+ +--- Publishes a per-request rate limiter into the graph. A handler opts in by asking for it and naming a rule, so the limit is visible in the handler's signature rather than hidden in a middleware chain —