From ed2bdde64b0e62c5083ac2bc694baf541f5cd670 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Sat, 31 Oct 2026 15:04:43 +0000 Subject: [PATCH] docs(chord): HTTP core as a fetch handler, Node listener as the easy path --- packages/chord/docs/next/decisions.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/chord/docs/next/decisions.md b/packages/chord/docs/next/decisions.md index a2d98b44d..84798b324 100644 --- a/packages/chord/docs/next/decisions.md +++ b/packages/chord/docs/next/decisions.md @@ -2070,6 +2070,15 @@ validation and copies the v2 kernel added around Delta. a build error naming it; relative paths into another plugin's directory are refused. Owner's notes for the app kit pass: third-party plugins need the imported plugins' sources or types for type checking (publishing each plugin to npm works but is unpleasant); plugins should be testable on their own, with their dependencies mocked. +- **The HTTP core is a `fetch` handler; Chord's own Node server is the easy path (owner, 2026-10-31: "could http just plug + into hono/express?"; "we should still provide the easy path using just node's shit as well, for small apps or apps + where we don't care"):** the component builds one Web-standard handler, `(request: Request) => Promise`, + from `Http` (admission, the security baseline, router, wraps, descriptions), plus per-runtime upgrade adapters for + `/chord` and plugin sockets. The default is Chord's own listener, the native host-lifetime object of `chord.http` + over Node's `http` (decision "The HTTP server is a native object"); an app with its own server mounts the handler + (`hono.all("/*", (c) => http.fetch(c.req.raw))`, an Express adapter) and passes upgrades to the adapter. The same + routes then run on other runtimes later (Bun, Durable Objects, design ยง26 #16). Built in slice 10's fix round + (reworks `server.ts`, `request.ts`, `response.ts`; router, admission rules and descriptions stay). - **A plugin's npm dependencies are bundled; external only by opt-in (owner, 2026-10-29: "explicit opt in + (a)"):** a plugin's `dependencies` are installed into its own `node_modules` (`npm install --ignore-scripts`) and bundled into each facet that imports them (host packages, its `peerDependencies`, stay external and are passed in). On Node a