@request-seal/core 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/LICENSE +190 -0
  3. package/NOTICE +9 -0
  4. package/README.md +391 -2
  5. package/dist/accept-signature.d.ts +37 -0
  6. package/dist/accept-signature.js +232 -0
  7. package/dist/adapters/fetch/index.d.ts +43 -0
  8. package/dist/adapters/fetch/index.js +455 -0
  9. package/dist/adapters/fetch/runtime.d.ts +11 -0
  10. package/dist/adapters/fetch/runtime.js +34 -0
  11. package/dist/adapters/node-http/index.d.ts +86 -0
  12. package/dist/adapters/node-http/index.js +882 -0
  13. package/dist/adapters/support.d.ts +27 -0
  14. package/dist/adapters/support.js +193 -0
  15. package/dist/brand.d.ts +13 -0
  16. package/dist/brand.js +82 -0
  17. package/dist/bytes.d.ts +11 -0
  18. package/dist/bytes.js +76 -0
  19. package/dist/constants.d.ts +132 -0
  20. package/dist/constants.js +119 -0
  21. package/dist/context.d.ts +23 -0
  22. package/dist/context.js +195 -0
  23. package/dist/crypto/algorithm.d.ts +41 -0
  24. package/dist/crypto/algorithm.js +147 -0
  25. package/dist/crypto/index.d.ts +19 -0
  26. package/dist/crypto/index.js +98 -0
  27. package/dist/crypto/jose.d.ts +9 -0
  28. package/dist/crypto/jose.js +45 -0
  29. package/dist/crypto/options.d.ts +3 -0
  30. package/dist/crypto/options.js +15 -0
  31. package/dist/crypto/primitive.d.ts +10 -0
  32. package/dist/crypto/primitive.js +121 -0
  33. package/dist/crypto/subtle.d.ts +22 -0
  34. package/dist/crypto/subtle.js +13 -0
  35. package/dist/custody/content_key.d.ts +13 -0
  36. package/dist/custody/content_key.js +101 -0
  37. package/dist/custody/der.d.ts +36 -0
  38. package/dist/custody/der.js +530 -0
  39. package/dist/custody/index.d.ts +6 -0
  40. package/dist/custody/index.js +6 -0
  41. package/dist/custody/jwk.d.ts +10 -0
  42. package/dist/custody/jwk.js +211 -0
  43. package/dist/custody/local.d.ts +20 -0
  44. package/dist/custody/local.js +282 -0
  45. package/dist/custody/ssh-agent/index.d.ts +9 -0
  46. package/dist/custody/ssh-agent/index.js +58 -0
  47. package/dist/custody/ssh-agent/port.d.ts +19 -0
  48. package/dist/custody/ssh-agent/port.js +183 -0
  49. package/dist/custody/ssh-agent/wire.d.ts +17 -0
  50. package/dist/custody/ssh-agent/wire.js +140 -0
  51. package/dist/digest.d.ts +64 -0
  52. package/dist/digest.js +385 -0
  53. package/dist/discovery/address.d.ts +10 -0
  54. package/dist/discovery/address.js +105 -0
  55. package/dist/discovery/body.d.ts +47 -0
  56. package/dist/discovery/body.js +194 -0
  57. package/dist/discovery/cache.d.ts +26 -0
  58. package/dist/discovery/cache.js +237 -0
  59. package/dist/discovery/certificate.d.ts +3 -0
  60. package/dist/discovery/certificate.js +81 -0
  61. package/dist/discovery/deflate.d.ts +5 -0
  62. package/dist/discovery/deflate.js +140 -0
  63. package/dist/discovery/gzip.d.ts +3 -0
  64. package/dist/discovery/gzip.js +97 -0
  65. package/dist/discovery/headers.d.ts +10 -0
  66. package/dist/discovery/headers.js +119 -0
  67. package/dist/discovery/index.d.ts +22 -0
  68. package/dist/discovery/index.js +59 -0
  69. package/dist/discovery/node-connection.d.ts +7 -0
  70. package/dist/discovery/node-connection.js +12 -0
  71. package/dist/discovery/node-trust.d.ts +2 -0
  72. package/dist/discovery/node-trust.js +9 -0
  73. package/dist/discovery/node.d.ts +19 -0
  74. package/dist/discovery/node.js +477 -0
  75. package/dist/discovery/proof.d.ts +9 -0
  76. package/dist/discovery/proof.js +162 -0
  77. package/dist/discovery/snapshot.d.ts +9 -0
  78. package/dist/discovery/snapshot.js +73 -0
  79. package/dist/discovery/source.d.ts +42 -0
  80. package/dist/discovery/source.js +204 -0
  81. package/dist/discovery/support.d.ts +13 -0
  82. package/dist/discovery/support.js +61 -0
  83. package/dist/errors/parity.d.ts +1909 -0
  84. package/dist/errors/parity.js +2131 -0
  85. package/dist/errors/types.d.ts +93 -0
  86. package/dist/errors/types.js +63 -0
  87. package/dist/index.d.ts +48 -0
  88. package/dist/index.js +36 -0
  89. package/dist/jose/header.d.ts +24 -0
  90. package/dist/jose/header.js +231 -0
  91. package/dist/jose/jwe.d.ts +33 -0
  92. package/dist/jose/jwe.js +269 -0
  93. package/dist/jose/jws.d.ts +35 -0
  94. package/dist/jose/jws.js +203 -0
  95. package/dist/jose/key-management.d.ts +41 -0
  96. package/dist/jose/key-management.js +276 -0
  97. package/dist/jose/nested.d.ts +20 -0
  98. package/dist/jose/nested.js +63 -0
  99. package/dist/jose/support.d.ts +26 -0
  100. package/dist/jose/support.js +143 -0
  101. package/dist/json.d.ts +40 -0
  102. package/dist/json.js +281 -0
  103. package/dist/key_handle.d.ts +30 -0
  104. package/dist/key_handle.js +263 -0
  105. package/dist/key_identity.d.ts +24 -0
  106. package/dist/key_identity.js +85 -0
  107. package/dist/message/index.d.ts +84 -0
  108. package/dist/message/index.js +375 -0
  109. package/dist/node_hasher.d.ts +4 -0
  110. package/dist/node_hasher.js +26 -0
  111. package/dist/numbers.d.ts +18 -0
  112. package/dist/numbers.js +29 -0
  113. package/dist/policy.d.ts +70 -0
  114. package/dist/policy.js +183 -0
  115. package/dist/profile.d.ts +36 -0
  116. package/dist/profile.js +215 -0
  117. package/dist/public_key.d.ts +32 -0
  118. package/dist/public_key.js +179 -0
  119. package/dist/quorum/evaluation.d.ts +22 -0
  120. package/dist/quorum/evaluation.js +384 -0
  121. package/dist/quorum/verification.d.ts +38 -0
  122. package/dist/quorum/verification.js +85 -0
  123. package/dist/quorum.d.ts +48 -0
  124. package/dist/quorum.js +151 -0
  125. package/dist/replay/claim.d.ts +24 -0
  126. package/dist/replay/claim.js +79 -0
  127. package/dist/replay/index.d.ts +18 -0
  128. package/dist/replay/index.js +18 -0
  129. package/dist/replay/memory.d.ts +4 -0
  130. package/dist/replay/memory.js +46 -0
  131. package/dist/replay/postgres.d.ts +11 -0
  132. package/dist/replay/postgres.js +64 -0
  133. package/dist/replay/receipt.d.ts +5 -0
  134. package/dist/replay/receipt.js +23 -0
  135. package/dist/replay/store.d.ts +10 -0
  136. package/dist/replay/store.js +68 -0
  137. package/dist/replay-port.d.ts +41 -0
  138. package/dist/replay-port.js +1 -0
  139. package/dist/result.d.ts +13 -0
  140. package/dist/result.js +9 -0
  141. package/dist/runtime.d.ts +7 -0
  142. package/dist/runtime.js +23 -0
  143. package/dist/sign.d.ts +39 -0
  144. package/dist/sign.js +314 -0
  145. package/dist/signature-base/index.d.ts +8 -0
  146. package/dist/signature-base/index.js +324 -0
  147. package/dist/signature-fields.d.ts +25 -0
  148. package/dist/signature-fields.js +160 -0
  149. package/dist/signer.d.ts +7 -0
  150. package/dist/signer.js +16 -0
  151. package/dist/structured-fields/index.d.ts +99 -0
  152. package/dist/structured-fields/index.js +671 -0
  153. package/dist/verification.d.ts +37 -0
  154. package/dist/verification.js +155 -0
  155. package/dist/verify-quorum.d.ts +4 -0
  156. package/dist/verify-quorum.js +145 -0
  157. package/dist/verify.d.ts +30 -0
  158. package/dist/verify.js +393 -0
  159. package/dist/web-bot-auth/index.d.ts +16 -0
  160. package/dist/web-bot-auth/index.js +13 -0
  161. package/dist/web-bot-auth/policy.d.ts +41 -0
  162. package/dist/web-bot-auth/policy.js +110 -0
  163. package/dist/web-bot-auth/sign.d.ts +3 -0
  164. package/dist/web-bot-auth/sign.js +121 -0
  165. package/dist/web-bot-auth/support.d.ts +16 -0
  166. package/dist/web-bot-auth/support.js +157 -0
  167. package/dist/web-bot-auth/verification.d.ts +64 -0
  168. package/dist/web-bot-auth/verification.js +52 -0
  169. package/dist/web-bot-auth/verify.d.ts +3 -0
  170. package/dist/web-bot-auth/verify.js +345 -0
  171. package/package.json +88 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,86 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## 0.2.0 - October 11, 2026
6
+ - Rewrite the README and add eleven usage guides, architecture decisions, and threat-model documentation. Every complete TypeScript example runs in CI; README verification excerpts are checked against the programs they come from. Generate the API reference with TypeDoc and publish it to GitHub Pages at https://baselabs.github.io/request-seal-typescript/. The migration guide compares behavior with `http-message-signatures` 1.0.6 using executed examples.
7
+ - Verify interoperability with RequestSeal for Elixir 0.4.1 for every HTTP and JWS algorithm, all JWE alg/enc pairs, nested JWS-in-JWE, signed TLS Web Bot Auth directories, and shared PostgreSQL replay claims.
8
+ - Sign Requests in runtimes without a Request body accessor (Firefox) by reading the already materialized body with the byte bound applied after the copy; a Request that merely hides its body stream still goes through the bounded reader. Fetch verification eligibility is checked before any Request is constructed, so an ineligible runtime never disturbs the caller's body. Node discovery reports `discovery/transport_unavailable` only when the runtime denies access to OS trust roots; other trust-store errors keep their existing reasons.
9
+ - Test on Node 22.12.0, 24.21.0, and 26.11.1, Deno 2.5.6, and Bun 1.3.14, plus Chromium 156.0.8078.4, Firefox 157.0, and WebKit 27.2; document exact runtime limitations and OS trust permissions.
10
+ - Return bounded `discovery/transport_unavailable` when system-root access is denied. Refuse ineligible Fetch verified delivery before consuming request bytes.
11
+ - Try IPv6 discovery addresses before IPv4, stable within each family, and remove duplicate answers before the 64-address bound, as RequestSeal does. A host whose IPv6 route silently drops traffic now spends the deadline on the IPv6 address first.
12
+ - Add the Profile extension surface with bounded package stamps, shared selected-label verification, profile-bound replay facts, and execution of all nine profile corpus cases.
13
+ - Widen `Verification.profile` and `ReplayFacts.profile` to include extension stamps; exhaustive narrowing consumers must handle the two-string extension name tuple. `ProfileStamp<MetadataKey>` restricts named metadata to scalar values while runtime validation enforces integer, Unicode, and size bounds.
14
+ - Encode explicit verification facts as UTF-8, convert null stamp metadata to the reference's empty string, and canonicalize whole-stamp key order for replay commitments. Bound name parts and keys to 255 Unicode code points and reject lone surrogates in every stamp string.
15
+ - Render Deno inspection of Verifications, Web Bot Auth envelopes and policies, discovery values, key handles, public keys, key identities, content keys and JOSE results through the callback Deno passes to `Deno.customInspect`; Deno previously printed `[object Object]`. Each still shows only its redacted view.
16
+ - Align crypto and custody with RequestSeal for Elixir 0.4.1: add trailing per-call `maxBytes` options (1–16,777,216; default 1,048,576), validate options before key and algorithm checks, enforce direct callback ceilings, and forward larger SSH-agent requests with bounded peer errors. Invalid byte options return `invalid_options`: crypto for `Crypto.sign`, `Crypto.verify` and `publicKey.verify`, custody for `KeyHandle.sign`, `KeyHandle.verify` and `KeyHandle.unwrap`, which accepts no `maxBytes`. `publicKey.verify` takes the same trailing options. `Crypto.sign`, `Crypto.verify` and `publicKey.verify` check the data size before key validity, as the reference does. Expose `Crypto.maxBytesCeiling()` and the exported `CRYPTO_MAX_BYTES_CEILING` and `CRYPTO_DEFAULT_MAX_BYTES` constants. A caller custodian's fourth argument carries the ceiling; custodians enforce their own input limit and pass the ceiling when delegating. The ssh-agent retains its practical payload limit, including protocol overhead: a peer refusal returns `custodian_protocol` through `KeyHandle.sign` and crypto `invalid_key` through `Crypto.sign`. Keep Message, Body, JWS, adapter, and SignatureBase limits fixed. Align the error vocabulary with RequestSeal for Elixir 0.4.1; retain the unchanged 0.4.0 conformance corpus.
17
+
18
+ ## 0.1.0 - October 10, 2026
19
+ - Published to npm manually, without provenance, from commit d175327. It predates parity with RequestSeal for Elixir 0.4.1, the Profile extension surface and its nine conformance cases, the reciprocal exchange, the browser lanes and the developer documentation.
20
+ - Align HTTP handle signing and the error vocabulary with RequestSeal 0.4.0: explicit `signingTimeout` bounds, `signer_algorithm_mismatch` with its exact message, and `signing_failed` with a bounded custody source on both forms. Handle deadlines start immediately before custody, after signature-base construction, and are capped at `signingTimeout` (default 5,000 ms) even under a longer caller Context. Generated-spec KeyHandle failures now report `signing_failed` (previously `signer_failed`); direct `handle.sign` malformed output now reports `invalid_signing_output` (previously `custodian_failure`). Add nullable core `message` and `source` fields; preserve callable `signer_failed` behavior. Re-pin the error extraction, shared corpus, and replay peer.
21
+ - Rename the npm package from `request-seal` to `@request-seal/core` under the `request-seal` organization; use `@request-seal/core/<subpath>` for every subpath import.
22
+ - Add captured Node HTTP Web Bot Auth verification, shared attempt storage, and executable signed TLS directory examples.
23
+ - Reject concurrent capture consumers and retained length mismatches; derive HTTP/2 scheme from TLS and reject conflicting Host/authority.
24
+ - Add captured-request quorum verification with shared replay and single-verification guards.
25
+ - Apply redirect method/body rules, validate redirect policy before delivery, remove Location fragments, and report actual client attempts.
26
+ - Measure Fetch runtime overrides and eligibility in the wire lane; refuse Node sec-fetch-mode signing, empty-query targets on Node majors below 24, and planted runtime markers.
27
+ - Deliver response signatures with their exact buffered bytes, use one clock for Date and created, and omit prohibited lengths.
28
+ - Require absolute ssh-agent sockets and preserve connection error parity; execute every README TypeScript fence against real inputs.
29
+ - Validate literal discovery addresses before deadline dispatch; restore replay timer coverage beside caller cancellation and cap built-test concurrency at 4.
30
+ - Add optional Node HTTP capture/replay, final response signing, bounded signed clients, Fetch signing and runtime-restricted verification, and caller-selected OpenSSH agent custody. Record exact Node/Deno/Bun wire observations and generated-key OpenSSL checks.
31
+ - Hold the process only while a run is active: each run arms its own referenced deadline timer, so a run whose only pending work is a caller callback that never settles ends with `deadline_exceeded` at its deadline on Node, Deno and Bun instead of being dropped; idle and settled Contexts never keep a process alive; pass a Context signal to stop sooner.
32
+ - Reject foreign `err()` and `adapterError` payloads with `TypeError`; accept any callable signer or KeyHandle for Accept-Signature fulfillment (an intentional divergence from the reference's two-argument function); permit shared stateless digest factories while rejecting overlapping operations on one session; check fetched cache results against their fetch clock and snapshots against the cache clock; decode every query key eagerly and classify TLS failures as the reference does; avoid idle timers for signal-free contexts and reattach cancellation listeners on reuse after internal release.
33
+ - Redact every individual Verification in JSON and runtime inspection while preserving explicit canonical facts; accept callable signers, trust callbacks, and held-key resolvers without Function.length gates, including KeyHandle signing.
34
+ - Document Web Bot Auth deadline phases, held-key fallback conditions, coverage-only nested evidence, host normalization differences, and generic principal narrowing. Verify origin confinement against two real loopback TLS peers.
35
+ - Add source-bound Web Bot Auth protocol-00 signing and verification, trusted agent provenance, nested coverage evidence, and one profile-separated envelope replay claim.
36
+ - Execute all fourteen Web Bot Auth corpus cases; preserve published bytes and rejection expectations. Add real signed TLS directory rotation/removal, OpenSSL byte agreement, and counting-store checks.
37
+ - Permit explicit JOSE algorithm choices in discovery lookup while retaining key metadata restrictions; apply replay retention ceilings after the complete envelope's earliest end.
38
+ - Match reference quorum assignment search and tie-breaking, check bindings incrementally and yield after about 10 ms of search work, and merge canonical identities with union-find.
39
+ - Parse quorum signature dictionaries once, cache per-label bases by field schema, enforce asymmetric handle identity consistency when observed or supplied, and preserve configured failure order.
40
+ - Align replay rejection, Accept-Signature validation precedence and reference string normalization; add caller-owned ordered fulfillment and redact quorum policies and composite results in JSON inspection; preserve custody deadlines during fulfillment.
41
+ - Executed differential coverage: 2,160 count-only instances from the original brute force (any mode, up to 5 slots), plus 2,160 instances checked on assignments and reasons with bindings, merged and unknown identities, all modes and units, and 8 to 16 slots. The 14 recorded divergence cases are checked against the reference port.
42
+ - Add branded quorum policies, identity-aware assignment with bounded exact search, nested and same-parameter bindings, and independent single-label verification facts.
43
+ - Add RFC 9421 Accept-Signature parsing and verified-pool challenge matching; execute all three quorum and negotiation corpus cases.
44
+ - Keep Context ownership release internal, align safe-number receipt bounds with claims, and reject corpus receipt/claim retention disagreements. Document required-content deadlines and verify-produced number ends.
45
+ - Normalize caller replay store errors, accept the exact signed bigint retention lower bound, release replay child Context listeners, and preserve deadline_exceeded during required content checks.
46
+ - Keep receipt construction internal, verify the packed PostgreSQL export, and require the real database URL in CI. PostgreSQL cross-language checks run where REQUESTSEAL_REPLAY_ELIXIR=1 and an Elixir toolchain with the pinned dependencies are present; the CI Elixir lane is separate work.
47
+ - Add branded replay claims and receipts, shared exclusive retention arithmetic, a bounded single-isolate memory store, and the dependency-free replay-postgres subpath over caller-owned autocommit queries.
48
+ - Execute all eleven v0.3.1 replay.claim cases, add a verbatim replay smoke case, and pass Context cancellation to the store while preventing a late commitment from reaching storage.
49
+ - Add bounded compact JWS signing and verification, JWE encryption and authenticated decryption, one-level nesting, explicit policy snapshots, and separately branded results.
50
+ - Add confined JOSE key-management capabilities, unconditional random fallback on unwrap failure, OAEP uniform-error tests and timing measurements, and reciprocal OpenSSL checks for RSA-OAEP (SHA-1 and SHA-256), A128GCMKW and A256GCMKW (empty AAD), and direct A128GCM and A256GCM in both directions.
51
+ - Execute all v0.3.1 JWS/JWE cases and both JOSE Wycheproof batches; retain source verdicts, declared overrides, applicability counts, and the two exact Bun ECDSA limitations.
52
+ - Re-pin error parity to RequestSeal v0.3.1 (commit b0d6f94); add `retention_exceeded` before replay commitment and storage when the retention end exceeds the clock bound.
53
+ - Add explicit generic signing and verification, frozen policies and layered verifications, canonical fact serialization, and a caller-owned replay port.
54
+ - Add RFC 9530 digests, bounded incremental SHA-2 with construction self-tests, and the Node-compatible hasher subpath.
55
+ - Execute the shared signing and verification corpus and add a tooling smoke case for each new surface.
56
+ - Preserve the discovery Node source type in built exports; refuse OS trust when Node has no non-empty system CA list. Retain cache rollback history through no-store, expiry and invalidation, and count CRLF within the chunk-line limit.
57
+ - Run live corpus vendoring when offline mode is unset, independently of gh; align Deno permissions and extract error rules directly from the pinned commit.
58
+ - Add bounded discovery sources, JWKS/directory/CIMD snapshots, directory possession proofs, source-bound key sets and resolutions, caller-owned caches, and the resolver bridge.
59
+ - Add the `./discovery-node` HTTPS transport with pinned-address TLS connections, IANA address denial, exact exceptions, manual redirects, proxy exclusion, cancellation, and body/decompression ceilings.
60
+ - All four `discovery.body` cases execute from the unchanged v0.3.1 corpus: 2,979 executed or runtime-limited items, 62 not applicable, and 23 pending out of 3,064; add real TLS, DNS, proxy, rotation and removal probes.
61
+ - Add captured WebCrypto primitives, separate HTTP/JWS registries, fixed RSA-PSS parameters, and fixed-width ECDSA and canonical Ed25519 verification.
62
+ - Add bounded DER/PEM codecs, validated RSA CRT import, private local key handles, public key formats and thumbprints, opaque identities, deadline containment, and confined RSA-OAEP/AES capabilities.
63
+ - Add pinned RFC and Wycheproof vectors, OpenSSL reciprocity, crypto/key corpus surfaces, batch counts and overrides, canary checks, and HMAC timing measurements.
64
+ - Keep deadline contexts reusable across nested and sequential runs; settlement releases only the active run, and idle contexts without caller or parent signals do not arm timers.
65
+ - Bound JOSE deadline error parity to the crypto layer and reject invalid adapter constructor arguments with TypeError.
66
+ - Add the ESM package scaffold, strict TypeScript build, web-only core typecheck, Node runtime lanes, Deno and Bun core lanes, and staged trusted-publishing workflow.
67
+ - Add Result and eleven bounded error variants with parity against Elixir RequestSeal v0.3.1 (commit b0d6f94), including status-derived discovery retryability.
68
+ - Add copied ByteString inputs, strict base64/base64url, ordered bounded I-JSON with exact number lexemes, and RFC numeric guards.
69
+ - Add branded deadline contexts, callback fault containment, deep freezing, and own-key option snapshots.
70
+ - Add the corpus loader, checksummed three-case tooling corpus, CLI, tamper checks, self-checks, and package boundary validation.
71
+ - Run live corpus vendoring when gh is available and offline mode is unset; align Deno permissions and extract error rules directly from the pinned commit.
72
+ - All four `discovery.body` cases execute from the unchanged v0.3.1 corpus: 2,965 executed or runtime-limited items, 62 not applicable, and 37 pending out of 3,064; add real TLS, DNS, proxy, rotation and removal probes.
73
+ - Keep deadline contexts reusable across nested and sequential runs; settlement releases only the active run, and idle contexts do not arm timers.
74
+ - Move the corpus pin to RequestSeal v0.3.1, index SHA-256 `222bae05fe7a240c6457ec02659e39f1785629290c7883dca404dd21d71f0398` (verified by `scripts/vendor-corpus.ts v0.3.1 --update-pin`).
75
+ - Vendor the checksummed RequestSeal v0.3.0 conformance corpus; pin its release commit and index digest. Validate batch inventories, per-item pins and overrides, positive references, and execution counts. Report pending surfaces against a committed allowlist during development and block releases until complete coverage. Wycheproof overrides are declared pins with cited clauses and may replace valid, invalid, or acceptable published verdicts; HTTPWG and RFC 9421 batches reject overrides.
76
+ - Require an explicit schema for Structured Fields parsing and caller-built tree serialization; parsed trees retain their schema. Revision strings disable inner lists unless a schema enables them.
77
+ - Add parseField with ordered occurrence combination, selective uniqueKeys, and independent uniqueParameters policies.
78
+ - Require RFC 3986 IPv6 or IPvFuture bracketed authorities; reject bracketed IPv4 forms and zone identifiers.
79
+ - Pin canonical base64 padding: byte sequences with nonzero padding bits reject under the shared decoding rule.
80
+ - Preserve immutable parsed bytes, snapshot caller-built signature parameters, and require branded messages for bases and related requests.
81
+ - Align validation precedence and negative zero serialization; support exact bigint decimal coefficients below 10³⁰ with RFC decimal magnitude limits.
82
+ - Add bounded RFC 8941/RFC 9651 Structured Fields parsing, ordered typed trees, unique mode, explicit schemas, and canonical serialization.
83
+ - Add lossless HTTP message, field, body, and transport values with copied bytes, target-form validation, and optional Content-Digest generation.
84
+ - Add all RFC 9421 signature-base components, related requests, trailers, Structured Fields selection, and exact query encoding.
85
+ - Register four wire corpus surfaces and two upstream batch formats; add checksummed HTTPWG, RFC 9421, and real HTTP capture tests.
86
+ - Keep the tooling smoke corpus independently pinned and excluded from the package.
package/LICENSE ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all other
162
+ commercial damages or losses), even if such Contributor has been
163
+ advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 BaseLabs
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,9 @@
1
+ RequestSeal (TypeScript)
2
+ Copyright 2026 BaseLabs
3
+
4
+ This product includes software developed by BaseLabs
5
+ (https://github.com/baselabs).
6
+
7
+ The error vocabulary corresponds to the Elixir RequestSeal reference
8
+ (https://github.com/baselabs/request_seal) at v0.4.0 (commit b239287).
9
+ No Elixir runtime is included or required.