feat(plugin)!: a plugin is a named object, and app.boot() is public #96

Merged
chrnx merged 6 commits from feature/plugin-contract into develop 2026-09-17 03:47:22 +00:00
Owner

See .specs/2026-09-15-plugin-ecosystem-design.md section 1. Companion PRs: green-tea-docs (required by AGENTS.md for new public API), matcha templates, patitas-peludas migration.

See .specs/2026-09-15-plugin-ecosystem-design.md section 1. Companion PRs: green-tea-docs (required by AGENTS.md for new public API), matcha templates, patitas-peludas migration.
chrnx added 6 commits 2026-09-17 03:29:13 +00:00
A plugin published as its own package cannot import HttpError without depending on
core's version, and under CalVer no dependency range survives next month's beta. A
Symbol.for brand crosses copies, so a plugin throws a 429 core renders, while
importing nothing but types.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
BREAKING CHANGE: `Plugin` is now `{ name, mount(api) }`. `fn.name` was the only
source for the name that plugin:mounted reports, and it is empty for a returned
arrow, "plugin" for a const, and whatever a minifier decides. A failed mount now
names the plugin and keeps the original error as its cause, and two plugins with
the same name fail createApp.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Only listen() booted before accepting traffic. Deno, Bun and edge all boot on the
first request, and the memo keeps the rejection, so a bad key answered 500 for the
life of the process while the app looked healthy.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
docs: record the plugin contract change and app.boot()
CI / dco (pull_request) Successful in 6s
CI / build (pull_request) Successful in 16m38s
CI / runtimes (bun) (pull_request) Successful in 16s
CI / runtimes (deno) (pull_request) Successful in 20s
CI / runtimes (edge) (pull_request) Successful in 14s
7a01ca3068
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
chrnx merged commit 1364d54ab4 into develop 2026-09-17 03:47:22 +00:00
Sign in to join this conversation.