feat: name every type the public signatures use, before the freeze (CARD-22, D19)
CI / dco (pull_request) Successful in 5s
CI / runtimes (bun) (pull_request) Successful in 20s
CI / build (pull_request) Successful in 29s
CI / runtimes (edge) (pull_request) Successful in 19s
CI / runtimes (deno) (pull_request) Successful in 32s

D19 as amended 2026-10-24: nothing that shipped in 26.9.0-beta.2 is
removed. Every symbol D19 had listed for removal or review is in that
release, so this change only adds exports and marks scope.

- Export `AppOptions`, `ExplainNode`, `WsRequest` and `WsSocket`. Each
  appears in a public signature (`createApp`, `Explain.chain`,
  `app.upgrade`) but could not be imported. `AppOptions` is the former
  inline options type of `createApp`, moved verbatim into an interface.
- Add `RequestHeaders`. `Headers` shadows the Fetch global wherever it
  is imported, so it stays only as a `@deprecated` alias of the same type.
- Mark the mesh exports and `MeshConfig` `@experimental`. They stay
  exported and unchanged, but sit outside the freeze, like the
  `experimental: true` flag the mesh already needs.
- The seven review candidates (`withConsoleFallback`, `UNMATCHED_ROUTE`,
  `HTTP_ERROR`, `VALIDATION_ERROR`, `TransportMismatchError`,
  `isAsyncIterable`, `buildOpenApi`) stay as they are.

CHANGELOG: `### Added` for the types, `### Changed` for the mesh tag, and
a new `### Deprecated` for `Headers`. No `### Breaking`.

test/types/public-surface.test.ts fails to compile if any of the new
names stops being exported. `deno publish --dry-run` passes.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-10-24 14:48:26 -05:00
1 parent b1392db7af
commit 92d54dcc45
10 files changed
+113 -16

No files matched your search

+9
View File
@@ -34,6 +34,9 @@ export const MESH_PROTOCOL_VERSION = 1;
*
* `correlation` and `url` are optional by protocol, not by intent: a teapot running an older
* green-tea simply ignores them, which costs the correlation of that hop and nothing else.
*
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
* API freeze, so it may change in a minor release.
*/
export interface RequestEnvelope {
method: string;
@@ -63,6 +66,9 @@ export interface RouteEntry {
* Steps only: a provider's value is the object it builds, which cannot cross a JSON wire, so
* exporting one is refused at boot (`collectProviders`). Every entry here is request-scope and
* lazy — the token exists in the teacup's graph, and running it is an RPC.
*
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
* API freeze, so it may change in a minor release.
*/
export interface Manifest {
steps: string[];
@@ -75,6 +81,9 @@ export interface Manifest {
* `ping`/`pong` are application frames rather than WebSocket protocol pings on purpose: the `ws`
* package exposes `ws.ping()`, but the platform `WebSocket` that Deno and Bun provide does not,
* so a protocol-level heartbeat could not work on every runtime mesh claims to support.
*
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
* API freeze, so it may change in a minor release.
*/
export type Frame =
| { type: 'hello'; v: number; secret: string }