Child work has an owner.
context.fork() creates a named task that belongs to the current request. It cannot quietly become an untracked promise.
context.fork("profile", (signal) => loadProfile({ signal }))Nelo is a Web Standards framework for TypeScript that makes child tasks, cancellation, resource cleanup, and response delivery explicit parts of the request lifecycle.
import { Nelo } from "nelo";
const app = new Nelo();
app.get("/users/:id", async (context) => {
const user = context.fork("user", (signal) =>
fetchUser(context.params.id!, { signal })
);
const feed = context.fork("feed", (signal) =>
fetchFeed(context.params.id!, { signal })
);
return context.json({
user: await user,
feed: await feed,
});
});Request ownership
A handler returning does not always mean the request is finished. Nelo separates work owned by the handler from work required while the response body is still being delivered.
middleware · route handler · context.fork() · context.use()
Response.body · delivery.fork() · delivery.use()
context.fork() creates a named task that belongs to the current request. It cannot quietly become an untracked promise.
context.fork("profile", (signal) => loadProfile({ signal }))The same cooperative signal travels through child scopes while the first abort reason remains available for diagnostics.
context.signal.reason // client_disconnectResources are released in reverse acquisition order after the work that owns them has settled.
context.use("database", connect, (db) => db.close())Server-backed lifecycle demo
The demo calls a real Next.js route and returns the Handler and Delivery timeline for success, disconnect, and producer failure.
Select a scenario and run the request.
The response is generated by the server route, not mocked in the browser.Small API
context.fork(name, operation)context.signalcontext.use(name, acquire, cleanup)context.delivery.fork() / use()Runtime capabilities
Support is shown only after real transport behavior and tests exist.
| Capability | Core | Node.js | Cloudflare | Deno | Bun |
|---|---|---|---|---|---|
| Request scopes | Core | Core | Core | ||
| Owned tasks | Core | Core | Core | ||
| Resource cleanup | Core | Core | Core | ||
| Client disconnect | Planned | Planned | Planned | ||
| Delivery tracking | Planned | Planned | Planned | ||
| Graceful shutdown | Planned | Planned | Planned |
Built in phases
Phase 4 completes the Handler and Delivery lifetime split. The next work is runtime-specific.
Lifetime scopes, owned tasks, typed cancellation, and deterministic resource cleanup.
Fetch-style application API, router, middleware, context helpers, and error boundaries.
Real socket disconnect tests, delivery tracking, graceful shutdown, and CI.
Separate lifetimes, delivery-owned work, typed abort reasons, and request diagnostics.
Cloudflare, Deno, and Bun adapters, deferred work, and diagnostics tooling.
Experimental software