docs(mesh): mesh may change in any release, and only within its own surface
Make the wording consistent: mesh is alpha and may change in any release. The JSDoc tags said 'a minor release' while the README said 'any'. State the rule mesh now follows. Its surface is the @experimental exports, MeshConfig and the mesh:* events. A mesh change stays inside that surface: it adds no createApp option, App method or decorator, and it changes no stable type. Mesh adapts to the stable API instead of moving it. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
11 files changed
+24
-24
No files matched your search
+1
-1
@@ -129,7 +129,7 @@ export interface RoutePlan {
|
||||
* Mesh networking options: a secret to gate this node's exports and/or remote teapots to connect to.
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export interface MeshConfig {
|
||||
secret?: string;
|
||||
|
||||
@@ -41,7 +41,7 @@ export function toWsRequest(request: Request, ip: string): WsRequest {
|
||||
* The subset of a host WebSocket that {@link eventSocket} drives (Deno's WebSocket and workerd's both satisfy it).
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export interface EventfulSocket {
|
||||
readonly readyState: number;
|
||||
@@ -162,7 +162,7 @@ async function pollDrained(host: Pick<EventfulSocket, 'readyState' | 'bufferedAm
|
||||
* Constructs a host WebSocket *client*. Both the platform global and the `ws` package satisfy it.
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export type SocketCtor = new (url: string) => EventfulSocket;
|
||||
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ export type { TlsOptions, CorsOptions, SecurityOptions } from './security';
|
||||
export type { UploadedFile, MultipartBody } from './multipart';
|
||||
export type { StandardSchemaV1, StandardIssue, StandardResult } from './standard-schema';
|
||||
|
||||
// Mesh — experimental (`createApp({ experimental: true })`): outside the API freeze, may change in a minor.
|
||||
// Mesh — experimental (`createApp({ experimental: true })`): outside the API freeze, may change in any release.
|
||||
export { connectLink } from './mesh/link';
|
||||
export { buildRemote, envelopeFrom } from './mesh/teacup';
|
||||
export { buildManifest, createMeshControl, MESH_CONTROL_PATH } from './mesh/teapot';
|
||||
|
||||
+4
-4
@@ -9,7 +9,7 @@ import { encode, decode, MESH_PROTOCOL_VERSION, type Manifest, type RequestEnvel
|
||||
* Client handle to a remote mesh server: its manifest, an RPC caller, and a close().
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export interface Link {
|
||||
manifest: Manifest;
|
||||
@@ -21,7 +21,7 @@ export interface Link {
|
||||
* Backoff bounds for reconnection. `false` disables reconnecting entirely.
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export interface ReconnectOptions {
|
||||
/** Delay before the first retry; doubles from here (default: 500ms). */
|
||||
@@ -38,7 +38,7 @@ export interface ReconnectOptions {
|
||||
* cadences, and silently changing what the default means is the worst kind of breaking change.
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export type ManifestPolicy = 'refuse';
|
||||
|
||||
@@ -474,7 +474,7 @@ function backoffBounds(
|
||||
* `Ctor` is injectable to exercise both client implementations on a single runtime.
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export function connectLink(args: {
|
||||
url: string;
|
||||
|
||||
@@ -36,7 +36,7 @@ export const MESH_PROTOCOL_VERSION = 1;
|
||||
* 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.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export interface RequestEnvelope {
|
||||
method: string;
|
||||
@@ -58,7 +58,7 @@ export interface RequestEnvelope {
|
||||
* Manifest entry for an exported route.
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export interface RouteEntry {
|
||||
method: string;
|
||||
@@ -73,7 +73,7 @@ export interface RouteEntry {
|
||||
* 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.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export interface Manifest {
|
||||
steps: string[];
|
||||
@@ -88,7 +88,7 @@ export interface Manifest {
|
||||
* 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.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export type Frame =
|
||||
| { type: 'hello'; v: number; secret: string }
|
||||
|
||||
+4
-4
@@ -6,7 +6,7 @@ import type { ResponseShape } from '../pipeline';
|
||||
* Local proxy for a remote scope: runs the RPC and returns its token→value binding.
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export interface RemoteScopeNode {
|
||||
name: string;
|
||||
@@ -16,7 +16,7 @@ export interface RemoteScopeNode {
|
||||
* Local proxy for a remote route: forwards the request envelope over the link.
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export interface RemoteRoute {
|
||||
method: string;
|
||||
@@ -32,7 +32,7 @@ export interface RemoteRoute {
|
||||
* and its events on the far side join the same trace instead of starting a new one.
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export function envelopeFrom(ctx: any): RequestEnvelope {
|
||||
const req = ctx?.req;
|
||||
@@ -54,7 +54,7 @@ export function envelopeFrom(ctx: any): RequestEnvelope {
|
||||
* Turn a link's manifest into local proxy nodes: lazy request-scope steps, and routes.
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export function buildRemote(link: Link): { steps: RemoteScopeNode[]; routes: RemoteRoute[] } {
|
||||
const steps: RemoteScopeNode[] = link.manifest.steps.map((token) => ({
|
||||
|
||||
+4
-4
@@ -24,7 +24,7 @@ import {
|
||||
* to it on an app without a control channel closes `1008` on every adapter.
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export const MESH_CONTROL_PATH = '/__mesh__/control';
|
||||
|
||||
@@ -77,7 +77,7 @@ export function controlFrameLimit(maxBodyBytes = DEFAULT_MAX_BODY_BYTES): number
|
||||
* Assemble a {@link Manifest} from exported step tokens and buffered routes.
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export function buildManifest(args: { steps: string[]; routes: RouteEntry[] }): Manifest {
|
||||
return { steps: [...args.steps], routes: args.routes };
|
||||
@@ -94,7 +94,7 @@ function safeEqual(left: string, right: string): boolean {
|
||||
* Dependencies for the mesh control handler: shared secret, manifest, and scope/route resolvers.
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export interface MeshControlDeps {
|
||||
secret: string;
|
||||
@@ -292,7 +292,7 @@ async function serveFrames(
|
||||
* Build a control handler that authenticates peers and serves scope/route RPCs from the manifest.
|
||||
*
|
||||
* @experimental Part of the mesh, which needs `createApp({ experimental: true })`: outside the
|
||||
* API freeze, so it may change in a minor release.
|
||||
* API freeze, so it may change in any release.
|
||||
*/
|
||||
export function createMeshControl(deps: MeshControlDeps): {
|
||||
path: string;
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ export interface PipelineStep {
|
||||
* A fully materialized HTTP response produced by a transformer.
|
||||
*
|
||||
* @experimental Public only through the mesh (`MeshControlDeps`, `RemoteRoute`), which needs
|
||||
* `createApp({ experimental: true })`: outside the API freeze, so it may change in a minor release.
|
||||
* `createApp({ experimental: true })`: outside the API freeze, so it may change in any release.
|
||||
*/
|
||||
export interface ResponseShape {
|
||||
status: number;
|
||||
|
||||
Reference in new issue
Block a user