Commit Graph
83 Commits
Author SHA1 Message Date
chrnx 9316397694 Merge feature/multipart-body: multipart/form-data parsing + configurable duplicate-field policy
RC blocker C complete. Zero-dep in-memory multipart parser (src/multipart.ts,
binary-safe): @body() yields { fields, files } with UploadedFile buffers.
readBody now returns a Buffer (text fallthrough preserved as string).
bodyDuplicates policy ('array'|'last', default last) shared by urlencoded +
multipart, overridable per-route via @Post('/x', { duplicates }). maxParts
anti-DoS. Plan review caught 2 parser bugs (first-part loss; embedded-boundary
mis-split) fixed before implementation.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 20:25:12 -05:00
chrnx 97284935aa docs: multipart/form-data uploads, bodyDuplicates, maxParts
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 20:19:29 -05:00
chrnx 34017f6ab2 feat(routes): per-endpoint duplicates override via @Post/@Get opts
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 20:16:46 -05:00
chrnx ec2e3a0e62 feat(http): configurable bodyDuplicates policy for urlencoded + multipart fields
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 20:13:52 -05:00
chrnx 5808da8012 feat(http): parse multipart/form-data; readBody yields Buffer, text fallthrough preserved
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 20:11:10 -05:00
chrnx 0f7932c696 feat(multipart): pure binary-safe multipart/form-data parser
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 20:07:32 -05:00
chrnx d2d4fc1d21 Merge feature/transport-security: TLS/wss, trustProxy, CORS, secure-by-default headers
RC blocker A complete. createApp gains tls (native https/wss), trustProxy
(X-Forwarded-* → ctx.protocol/ip), cors (guarded preflight, credentials-safe),
and security (on-by-default headers, HSTS only when secure). Two adversarial
review findings fixed: control-byte Origin rejection and case-variant header
override.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 19:26:17 -05:00
chrnx 258130bf30 docs: transport security (TLS/wss, trustProxy, CORS, security headers)
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 19:20:34 -05:00
chrnx cb77216a53 feat(http): configurable CORS with guarded OPTIONS preflight
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 19:16:48 -05:00
chrnx 0982873462 fix(http): make injected security/CORS headers authoritative over case-variant handler keys
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 19:14:17 -05:00
chrnx 04da79721f feat(http): inject security headers on every response via writeHead patch
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 19:06:58 -05:00
chrnx 0dba41606a feat(http): trustProxy + ctx.protocol/ctx.ip from socket or X-Forwarded-*
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 19:02:11 -05:00
chrnx b8ee1b14a5 feat(http): native TLS termination → https/wss via tls option
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 18:58:40 -05:00
chrnx b87bdc698f fix(security): reject all control bytes in Origin validation
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 18:56:07 -05:00
chrnx 881bc59419 feat(security): pure CORS + security-header computation module
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-06 18:52:24 -05:00
chrnx e38d972566 Merge feature/dx-adoption: usable for small apps + showcase examples
CI / build (push) Has been cancelled
Core: urlencoded body parsing, a rooms broadcast-hub primitive
(auto-provided), WS auth rejection close-code (4000+status), and an SSE
header-flush fix for idle subscriptions. Examples: CRUD, WS chat with
rooms + handshake auth (no socket.io), and minimal GraphQL with an SSE
subscription over rooms (graphql is a devDep; core stays zero-dep).

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 13:38:35 -05:00
chrnx c39eb667ac feat(example): minimal GraphQL with query/mutation and an SSE subscription over rooms
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 13:37:37 -05:00
chrnx 0c29c76a8a fix(http): flush SSE headers immediately so idle subscriptions don't deadlock clients
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 13:37:33 -05:00
chrnx 8335ff2875 feat(example): WS chat with rooms and handshake auth (no socket.io)
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 13:30:16 -05:00
chrnx 3842271c4d feat(example): in-memory CRUD with query and JSON/urlencoded bodies
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 13:28:42 -05:00
chrnx 9050a7e5d9 feat: WS connections rejected by an HttpError close with 4000+status
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 13:25:24 -05:00
chrnx 6171e5e6bd feat: rooms broadcast-hub primitive, auto-provided to handlers
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 13:23:54 -05:00
chrnx 2bbc43505e feat: parse application/x-www-form-urlencoded request bodies
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 13:22:01 -05:00
chrnx 07b6b57611 Merge feature/beta-wow: graph introspection + DX wow features
CI / build (push) Has been cancelled
Built-in graph viz (app.graph/toMermaid/toDOT + opt-in GET /__graph__),
app.explain(route), one-line createApp({ overrides }), and a 'did you
mean' boot hint + flow compile-time type-test. All leverage the graph
being inspectable data — differentiators vs NestJS.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 02:37:17 -05:00
chrnx 9d8088d0a9 feat: 'did you mean' boot hint, flow compile-time type-test, and demos
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 02:36:37 -05:00
chrnx cc0044ba6a feat: createApp overrides — swap any provider/step by token in one line
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 02:33:52 -05:00
chrnx 73cd874cae feat: opt-in GET /__graph__ dev endpoint rendering the live graph
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 02:31:52 -05:00
chrnx f5136e35d0 feat: app.graph/explain/toMermaid/toDOT — inspect the dependency graph
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 02:30:22 -05:00
chrnx d67a4080dd feat: pure Mermaid/DOT/HTML graph renderers
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 02:28:39 -05:00
chrnx 8f3aef9edc Merge feature/solid-beta: hardening for a solid beta
CI / build (push) Has been cancelled
CI (Gitea Actions), request hardening (body-size limit -> 413, server
timeouts), graceful shutdown (app.close drains streams + connections),
and per-route subgraph slicing (routes run only their needed
providers/steps; observer plugin steps run unconditionally).
TLS/CORS/validation and mesh-side slicing deferred to RC.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 01:37:34 -05:00
chrnx a25c9752a2 fix: always-run observer steps receive their declared needs under slicing
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 01:14:20 -05:00
chrnx 9a5f54a4b3 docs: document per-route slicing execution and app.close() in quickstart
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 01:14:06 -05:00
chrnx df01bbfc41 feat: per-route subgraph slicing — routes run only their needed providers/steps
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 01:09:47 -05:00
chrnx 68caca2cc1 feat: graceful shutdown via app.close() force-closing streams and connections
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 01:07:42 -05:00
chrnx ddca3fd74b feat: request body-size limit (413) and configurable server timeouts
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 01:05:09 -05:00
chrnx a327352ba0 ci: typecheck, test, and build on push/PR (Gitea Actions, Node 18)
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-28 01:02:43 -05:00
chrnx 86cb473012 Merge docs/overview: architecture map, quickstart, framework comparison
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 21:51:49 -05:00
chrnx 774d807e96 docs: comparison vs Express/Fastify/NestJS/expressive-tea
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 21:49:40 -05:00
chrnx 8b43a15609 docs: architecture mental map, quickstart guide, README links
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 21:30:33 -05:00
chrnx e8c1ed9bc8 Merge feature/mesh-skeleton: spec #3 green-tea mesh (walking skeleton)
Distributed DI over a WS control channel: a teacup invokes a remote
scope/step or proxies a route on a teapot, via one id-correlated RPC.
Remote tokens become synthetic graph nodes with RPC runners; opt-in
export gated by a shared secret. No discovery/LB/failover yet.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 21:17:12 -05:00
chrnx 44e77d4bb4 feat(mesh): two-node teapot/teacup example
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 20:45:58 -05:00
chrnx e702de187d fix(mesh): close teacup links on shutdown/boot-failure; match proxy routes by method
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 20:42:44 -05:00
chrnx e8a63e8d41 feat(mesh): wire remote scopes and proxy routes through the graph
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 20:36:56 -05:00
chrnx a1e8f73e64 feat(mesh): teacup remote node and proxy-route builder
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 20:33:15 -05:00
chrnx f151da4bd7 feat(mesh): route reserved control path to meshControl on upgrade
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 20:31:48 -05:00
chrnx 1174d14754 feat(mesh): teacup WS link client with id-correlated RPC
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 20:30:08 -05:00
chrnx c4f220f431 feat(mesh): teapot manifest builder and control-channel dispatcher
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 20:28:21 -05:00
chrnx 9f963792f0 feat(mesh): mesh lifecycle bus events
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 20:26:37 -05:00
chrnx ec1214e9e5 feat(mesh): export flag on providers, steps, and routes
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 20:25:53 -05:00
chrnx 31f91ee61f feat(mesh): RPC frame protocol and codec
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 20:23:58 -05:00
chrnx a4fb19210e Merge feature/streams: spec #2 green-tea streams
Multicast channel primitive + SSE/ndjson streaming + WebSocket duplex,
all on one AsyncIterable seam. Transport owns stream lifecycle; ws is a
lazy optional peer dep. De-hardcodes HTTP method.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 15:51:07 -05:00
chrnx e365cee3bf fix: transport owns WS stream lifecycle (force-cancel outbound, emit stream:error, balanced events)
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 15:40:50 -05:00
chrnx b58db71405 feat: export streams API and add SSE/WS example endpoints
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 15:34:27 -05:00
chrnx 04688ab621 feat: wire SSE/WS routes through the graph with stream lifecycle events
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 15:32:17 -05:00
chrnx abc4603050 feat: WebSocket upgrade path with lazy optional ws dependency
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 15:29:14 -05:00
chrnx 8aac7f24bd fix: prevent stream hang/crash on client disconnect during backpressure
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 15:26:17 -05:00
chrnx 0eaefd0053 feat: SSE/ndjson streaming responses with backpressure and cleanup
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 15:22:18 -05:00
chrnx fdbba5f06d feat: @inbound and @abort handler argument decorators
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 15:18:38 -05:00
chrnx 732e1eb636 feat: Sse/Ws/Stream/Post route decorators with transport metadata
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 15:17:08 -05:00
chrnx a94a987a35 feat: pipeline returns StreamResult for async-iterable handlers
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 15:15:05 -05:00
chrnx a3dad32384 feat: SSE and ndjson stream encoders
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 15:13:09 -05:00
chrnx f96d349c74 feat: multicast channel primitive + isAsyncIterable guard
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-27 15:11:28 -05:00
chrnx 35c60c44c3 docs: add runtime adapters (Node/Deno/Bun/edge) to roadmap
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-26 02:07:43 -05:00
chrnx b0b0b1388d docs: add README, MIT license, and DCO-based contributing guide
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-26 02:00:21 -05:00
chrnx ccaacb9a02 fix: stream errors -> 500, guard non-object body picks, test @query e2e 2026-06-26 01:51:02 -05:00
chrnx 7114bf685e feat: handlers declare deps via arg decorators, graph-validated at boot 2026-06-26 01:44:57 -05:00
chrnx 5bb825e293 feat: parse query string and json body into the request 2026-06-26 01:42:01 -05:00
chrnx 751db324d6 feat: handler argument decorators (needs/ctx/param/query/body/headers) 2026-06-26 01:40:04 -05:00
chrnx 97faff4c06 fix: guard handler errors, dedupe runner names, export flow core, test optional provider 2026-06-26 01:11:26 -05:00
chrnx 04c8b3a743 feat: end-to-end example demonstrating the four core ideas 2026-06-26 01:04:24 -05:00
chrnx 221a230270 fix: spread provider returns in boot snapshot; dedupe path-join; guard step runner 2026-06-26 01:01:06 -05:00
chrnx 62eb6587ea feat: boot orchestrator, app, inspect, fail-fast providers
Wires all modules together into createApp(): topo-ordered providers run
at boot (fail-fast for required), pipeline runs per request, inspect()
returns the ordered chain, plugins observe via Bus without mutating state.
2026-06-26 00:55:02 -05:00
chrnx 3803d4fe95 feat: node http transport with :param route matching 2026-06-26 00:49:29 -05:00
chrnx 23a31f9264 feat: request pipeline with ctx accumulation, throw handling, lifecycle events 2026-06-26 00:47:55 -05:00
chrnx af4642d449 feat: JsonTransformer and error-to-response mapping 2026-06-26 00:45:49 -05:00
chrnx c072eea7c9 feat: structurally-isolated plugin handle (on + scope.add only) 2026-06-26 00:44:17 -05:00
chrnx e7187eb673 feat: decorators and reflect-metadata readers for providers/steps/modules/routes 2026-06-26 00:42:18 -05:00
chrnx 201572512e feat: dependency graph topological sort with cycle/missing-dep validation 2026-06-26 00:40:25 -05:00
chrnx f7098b48ef feat: scope-aware async (transport-agnostic) DI container 2026-06-26 00:38:49 -05:00
chrnx 11fc746d28 feat: typed flow core with compile-time context guarantee 2026-06-26 00:35:44 -05:00
chrnx 96880d055b feat: read-only lifecycle observer bus 2026-06-26 00:33:48 -05:00
chrnx efa89360e4 feat: typed http signals (Unauthorized, Redirect, NotModified, NotFound) 2026-06-26 00:31:41 -05:00
chrnx 04e4ae5c54 chore: scaffold @green-tea/core with vitest and strict ts 2026-06-26 00:29:40 -05:00