Implement the immutable HTTP domain model in @dexpace/core: Request, Response, Headers, Status,
MediaType, Protocol, QueryParams, RequestOptions, ETag, HttpRange, RequestConditions.
Scope
- Builder-based models:
#private fields, private constructor, defensive-copying newBuilder(),
validate-then-construct build(), Object.freeze(this) once at construction (nested collections frozen
independently).
- Value types with no builder (
Status, MediaType, Protocol) as frozen classes with static factories.
- Typed
Error subclasses only; shared requireField() validation helper.
- Header strictness (
HTTP-18 splitting defense), URL/query encoding, conditional-request application.
- SPDX header convention (
NFR-13) starts here and holds for every later phase.
Spec refs
Product spec §4 (HTTP-3–HTTP-53), SEAM-29. sdk-design: §4.
Dependencies
Phase 0.
Docs
- Plan:
docs/superpowers/plans/2026-07-23-phase1-core-http-domain-model.md
- Design:
docs/superpowers/specs/2026-07-23-phase1-core-http-domain-model-design.md
- Checklist:
docs/superpowers/plans/2026-07-23-phase1-core-http-domain-model-checklist.md
Notes
Request/Response body types ship as unknown placeholders here and are narrowed in Phase 3b; MultipartBody
also lands in 3b. Zero runtime dependencies (SEAM-1).
Implement the immutable HTTP domain model in
@dexpace/core:Request,Response,Headers,Status,MediaType,Protocol,QueryParams,RequestOptions,ETag,HttpRange,RequestConditions.Scope
#privatefields, private constructor, defensive-copyingnewBuilder(),validate-then-construct
build(),Object.freeze(this)once at construction (nested collections frozenindependently).
Status,MediaType,Protocol) as frozen classes with static factories.Errorsubclasses only; sharedrequireField()validation helper.HTTP-18splitting defense), URL/query encoding, conditional-request application.NFR-13) starts here and holds for every later phase.Spec refs
Product spec §4 (
HTTP-3–HTTP-53),SEAM-29. sdk-design: §4.Dependencies
Phase 0.
Docs
docs/superpowers/plans/2026-07-23-phase1-core-http-domain-model.mddocs/superpowers/specs/2026-07-23-phase1-core-http-domain-model-design.mddocs/superpowers/plans/2026-07-23-phase1-core-http-domain-model-checklist.mdNotes
Request/Responsebody types ship asunknownplaceholders here and are narrowed in Phase 3b;MultipartBodyalso lands in 3b. Zero runtime dependencies (
SEAM-1).