@browsercore/contracts 0.2.10 → 0.2.12

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.
package/README.md CHANGED
@@ -4,49 +4,80 @@
4
4
  [![CI](https://img.shields.io/github/actions/workflow/status/jverneuer/browsercore-contracts/ci.yml?label=ci)](https://github.com/jverneuer/browsercore-contracts/actions/workflows/ci.yml)
5
5
 
6
6
  The canonical interface package for the browsercore stack. Every protocol
7
- package, runtime adapter, and consumer depends on these contracts; they
8
- define how components communicate without coupling them to each other. As of
9
- 0.2.5 this is the canonical single definition for `Transport`,
10
- `CryptoProvider`, and `CompressionProvider` (the implementing packages
11
- re-export them), plus the `Platform` service contracts (events, time,
12
- telemetry, network). As of 0.2.6: every `Platform` bundle is **optional**
13
- (capabilities are resolved, not faked), `Network.udp` is a **factory**
14
- (`UdpSocketFactory`), `Clock` is **THE** time contract (superseding the five
15
- sibling-local shapes), `TlsHandshakeEngine` is the contracts-level seam that
16
- lets quic drive a TLS handshake without importing `@browsercore/tls`, and the
17
- `ProxyConfig` family / `ProfileId` / `CookieJarConsumer` config types have
18
- their canonical homes here (owning packages alias next wave). As of 0.2.8 the
19
- certificate mirror is canonical too: `CertificateSignatureAlgorithm` (and
20
- `Certificate.selfSigned`) land here, and tls 0.4.19 imports and re-exports
21
- this type from `@browsercore/contracts` (earlier tls versions declared a
22
- structurally identical local union) — one definition, not a second
23
- `Certificate` beside the engine contract.
24
- Deliberately
25
- package-local surfaces that remain duplicated (e.g. the full `CookieJar`)
26
- are documented as such at each definition.
7
+ package, runtime adapter, and consumer depends on these contracts; they define
8
+ how components communicate without coupling them to each other. This package
9
+ is the canonical single definition for `Transport`, `CryptoProvider`, and
10
+ `CompressionProvider`: `@browsercore/transport` re-exports `Transport`,
11
+ `@browsercore/crypto` re-exports `CryptoProvider`, and
12
+ `@browsercore/compression` declares its own structural copy. It also holds
13
+ the `Platform` service contracts for events, time, telemetry, and network.
14
+
15
+ Every `Platform` bundle is optional, so capabilities are resolved rather than
16
+ faked. `Network.udp` is a factory (`UdpSocketFactory`), `Clock` is the time
17
+ contract, and `TlsHandshakeEngine` is the seam that lets quic drive a TLS
18
+ handshake without importing `@browsercore/tls`. The `ProxyConfig` family,
19
+ `ProfileId`, and `CookieJarConsumer` have their canonical homes here too.
20
+ `CertificateSignatureAlgorithm` and `Certificate.selfSigned` live here as
21
+ well; `@browsercore/tls` imports and re-exports them from this package, so
22
+ there is one `Certificate` definition instead of a second one beside the
23
+ engine contract. Surfaces that deliberately stay package-local (the full
24
+ `CookieJar`, for example) say so at each definition.
27
25
 
28
26
  ## Why this package exists
29
27
 
30
- **Zero drift through global interface distribution.** Without a shared
31
- contracts package, every `@browsercore/*` package would define its own version
32
- of `Transport`, `BrowserProfile`, `FetchClient`, etc. When one package changes
33
- a shape, the others silently break at runtime. By centralizing every
34
- cross-package interface here, a type error becomes a compile error the moment
35
- any package diverges.
28
+ **No drift between packages.** Without a shared contracts package, every
29
+ `@browsercore/*` package would define its own version of `Transport`,
30
+ `BrowserProfile`, `FetchClient`, etc. When one package changes a shape, the
31
+ others silently break at runtime. Centralizing every cross-package interface
32
+ here turns that into a compile error the moment any package diverges.
36
33
 
37
34
  **Alternative implementations welcome.** The contracts define exactly what a
38
- component must satisfy, nothing more. Want to write a different transport?
39
- Implement `Transport`. A different crypto backend? Implement
35
+ component must satisfy, nothing more. To write a different transport,
36
+ implement `Transport`. For a different crypto backend, implement
40
37
  `CryptoProvider` (synchronous; WebCrypto cannot satisfy it, see
41
38
  [docs/design-decisions.md](docs/design-decisions.md) for why that is
42
- deliberate and what an async future would cost). A
43
- different runtime (Bun, Deno, Workers)? Implement the `Platform` service
44
- interfaces. The contracts are the spec; the packages are the reference
45
- implementations.
39
+ deliberate and what an async future would cost). For a different runtime
40
+ (Bun, Deno, Workers), implement the `Platform` service interfaces. The
41
+ contracts are the spec; the packages are the reference implementations.
46
42
 
47
- **Implementation-independent.** No `node:crypto`, `node:net`, `Buffer`, or any
48
- runtime details leak into these types. They are portable TypeScript interfaces
49
- and plain data.
43
+ **Implementation-independent.** No `node:crypto`, `node:net`, `Buffer`, or
44
+ any runtime details leak into these types. They are portable TypeScript
45
+ interfaces and plain data.
46
+
47
+ ## Install
48
+
49
+ ```sh
50
+ npm install @browsercore/contracts
51
+ ```
52
+
53
+ ## Usage
54
+
55
+ ### Importing types (compile-time only)
56
+
57
+ ```ts
58
+ import type { Net, DnsResolver, Transport, BrowserProfile } from "@browsercore/contracts";
59
+ ```
60
+
61
+ Type imports are erased at compile time, so they cost nothing at runtime.
62
+
63
+ ### Importing wire code tables (runtime)
64
+
65
+ ```ts
66
+ import { CIPHER_SUITE_CODES, NAMED_GROUP_CODES } from "@browsercore/contracts";
67
+
68
+ const aes128 = CIPHER_SUITE_CODES["TLS_AES_128_GCM_SHA256"]; // 0x1301
69
+ const x25519 = NAMED_GROUP_CODES["x25519"]; // 0x001d
70
+ ```
71
+
72
+ ### Implementing an alternative package
73
+
74
+ ```ts
75
+ import type { Transport, TransportState, CloseReason } from "@browsercore/contracts";
76
+
77
+ class MyCustomTransport implements Transport {
78
+ // Implement the interface and the rest of the stack works unchanged
79
+ }
80
+ ```
50
81
 
51
82
  ## Architecture
52
83
 
@@ -65,48 +96,45 @@ transport tls http1 http2 http3 quic fetch crypto compression
65
96
  ```
66
97
 
67
98
  Dependency direction is strictly upward; contracts is the root dependency.
68
- `browsersmith` is the **only** package allowed `node:*` imports; it builds a
69
- `Platform` object that threads runtime capabilities (network, crypto,
70
- compression, events, telemetry, time) down through options.
99
+ Protocol packages import no `node:*` builtins; runtime capabilities arrive
100
+ through the injected `Platform`, which `browsersmith` (the composition root)
101
+ builds and threads down through options (network, crypto, compression,
102
+ events, telemetry, time, trust).
71
103
 
72
104
  ## What's inside
73
105
 
74
106
  | Module | Purpose | Key exports |
75
107
  |---|---|---|
76
108
  | **Contracts** | Canonical provider interfaces, the single definitions the implementing packages re-export | `CryptoProvider`, `CompressionProvider`, `Transport`, `DatagramTransport`, `UdpSocketFactory`, `CookieJar`, `PacketCallback` |
77
- | **Platform** | The composition root + per-service bundles, **every bundle optional** | `Platform`, `PlatformOptions`, `Network`, `Crypto`, `Compression` |
109
+ | **Platform** | The composition root + per-service bundles, **every bundle optional** | `Platform`, `PlatformOptions`, `Network`, `Crypto`, `Compression`, `Trust` |
78
110
  | **Events** | Structural emitter interface (a method surface, **not** EventTarget-backed) injected via `Platform.events` | `EventProvider`, `TypedEventEmitter<T>` |
79
- | **Time** | THE canonical Clock (wall + monotonic + sleep + timers) and the Duration/Scheduler helpers | `Clock`, `TimerHandle`, `Time`, `Duration`, `Scheduler`, `Deadline` |
111
+ | **Time** | The canonical Clock (wall + monotonic + sleep + timers) and the Duration/Scheduler helpers | `Clock`, `TimerHandle`, `Time`, `Duration`, `Scheduler`, `Deadline` |
80
112
  | **TLS Engine** | The quic↔tls handshake seam; protocol packages never import each other | `TlsHandshakeEngine`, `TlsHandshakeContext`, `ClientHelloConfig`, `ServerHello`, `Certificate`, `CertificateSignatureAlgorithm`, `CipherSuite`, `NamedGroup`, `SignatureScheme`, `AeadAlgorithm`, `ProtocolVersion`, `KeyPair`, `TrafficSecrets`, `ApplicationTrafficSecrets`, `HandshakePhase`, `AlertLevel` |
81
- | **TLS Session** | The tls↔browsersmith resumption seam: one ticket record per NewSessionTicket and the string-keyed (SNI) ticket store browsersmith implements and tls consumes; sync by design, `get` never consumes — the caller pops via `delete` | `TlsSessionStore`, `TlsResumptionTicket` |
82
- | **Config** | Canonical configuration types (owning packages alias next wave) | `ProxyConfig`, `ProxyScheme`, `ProxyTarget`, `ProxyCredentials`, `CookieJarConsumer` |
113
+ | **TLS Session** | The tls↔browsersmith resumption seam: one ticket record per NewSessionTicket and the string-keyed (SNI) ticket store browsersmith implements and tls consumes; sync by design, and `get` never consumes, so the caller pops via `delete` | `TlsSessionStore`, `TlsResumptionTicket` |
114
+ | **Config** | Canonical configuration types | `ProxyConfig`, `ProxyScheme`, `ProxyTarget`, `ProxyCredentials`, `CookieJarConsumer` |
83
115
  | **Telemetry** | OTel-aligned observability | `Logger`, `Tracer`, `Span`, `Metrics`, `Telemetry` |
84
116
  | **Models** | Shared data structures that cross package boundaries | `BrowserProfile`, `TlsProfile`, `Http1Profile`, `Http2Profile`, `ProfileId`, `Request`, `Response`, `Headers`, `Cookie`, `TransportState`, `CloseReason`, `ContentEncoding` |
85
- | **Net** | Platform-agnostic TCP + DNS contracts for runtime portability (`DnsResolver.lookupAll?` — optional single dual-family lookup) | `Net`, `DnsResolver`, `Socket`, `ConnectOptions`, `IPAddress` |
86
- | **IANA Tables** | Canonical TLS wire code lookup tables (single source of truth) | `CIPHER_SUITE_CODES`, `NAMED_GROUP_CODES`, `SIGNATURE_SCHEME_CODES`, `VERSION_CODES` |
117
+ | **Net** | Platform-agnostic TCP + DNS contracts for runtime portability (`DnsResolver.lookupAll?`, an optional single dual-family lookup) | `Net`, `DnsResolver`, `Socket`, `ConnectOptions`, `IPAddress` |
118
+ | **IANA Tables** | Canonical TLS wire code lookup tables (single source of truth) | `CIPHER_SUITE_CODES`, `NAMED_GROUP_CODES`, `SIGNATURE_SCHEME_CODES`, `VERSION_CODES`, `CIPHER_GREASE_PLACEHOLDER` |
87
119
 
88
- The former "Protocol Connection Contracts" (`TlsConnection`, `Http1Connection`,
89
- `Http2Connection`, `Http3Connection`, `QuicConnection`, `QuicStream`,
90
- `FetchClient`) and the Options layer (`TlsOptions` … `FetchClientOptions`) were
91
- removed in 0.2.5. They had zero consumers, since every consumer binds the
92
- implementation-local types exported by the protocol packages themselves
93
- (replaceability audit, 2026-11-16). `Transport` and `CryptoProvider` here are
94
- now the canonical single definitions that `@browsercore/transport` and
95
- `@browsercore/crypto` re-export.
120
+ This package defines no protocol connection contracts (`TlsConnection`,
121
+ `Http1Connection`, `Http2Connection`, `Http3Connection`, `QuicConnection`,
122
+ `QuicStream`, `FetchClient`) and no options layer (`TlsOptions` …
123
+ `FetchClientOptions`): every consumer binds the implementation-local types
124
+ exported by the protocol packages themselves. `Transport` and
125
+ `CryptoProvider` here are the canonical single definitions, re-exported by
126
+ `@browsercore/transport` and `@browsercore/crypto` respectively.
96
127
 
97
- ## Platform semantics (0.2.6)
128
+ ## Platform semantics
98
129
 
99
130
  **Every `Platform` bundle is optional** (`network?`, `crypto?`,
100
- `compression?`, `events?`, `telemetry?`, `time?`), and every `Network`
131
+ `compression?`, `events?`, `telemetry?`, `time?`, `trust?`), and every `Network`
101
132
  member is optional (`tcp?`, `dns?`, `udp?`). A platform carries exactly the
102
133
  capabilities its runtime has; nothing has to be faked. The contract is:
103
134
 
104
135
  - **Consumers resolve what they use and throw typed errors naming the
105
- missing capability.** `@browsercore/fetch`'s `proxyDialPlatform`
106
- (`fetch/src/proxy.ts`) demonstrated the pattern while the fields were
107
- still required; untouched bundles were throwing getters naming the
108
- culprit. With optional bundles the same guarantee is expressed by
109
- omitting the field, and consumers write
136
+ missing capability.** With optional bundles the guarantee is expressed
137
+ by omitting the field, and consumers write
110
138
  `platform.network?.tcp ?? throw missingCapability("platform.network.tcp")`.
111
139
  - **Implementers may provide everything**: an implementation providing
112
140
  more than a consumer requires (e.g. `browsersmith`'s `createPlatform()`)
@@ -115,49 +143,41 @@ capabilities its runtime has; nothing has to be faked. The contract is:
115
143
 
116
144
  **UDP is a factory, not an instance.** `Network.udp` is a
117
145
  `UdpSocketFactory`: `connect(address)` returns a per-connection
118
- `DatagramTransport`. The previous instance shape (`udp: DatagramTransport`)
119
- forced the composition root to bind one socket at module-import time
120
- (browsersmith's import-time `createSocket("udp4")` singleton,
121
- replaceability audit, 2026-11-16). A factory binds sockets at connection
122
- time, per connection, and lets UDP-less runtimes (Cloudflare Workers) omit
123
- the capability instead of dead-binding a socket.
124
-
125
- **`Clock` is THE time contract.** `now()` (wall, epoch ms),
146
+ `DatagramTransport`. Sockets bind at connection time, per connection, and
147
+ UDP-less runtimes (Cloudflare Workers) omit the capability instead of
148
+ dead-binding a socket.
149
+
150
+ **`trust` carries the runtime's root store.** `Trust.rootStore()` returns
151
+ the DER trust anchors the runtime offers its own TLS stack (Node's bundled
152
+ Mozilla store plus `NODE_EXTRA_CA_CERTS`). It is the runtime's own root
153
+ program, not Chrome's root program; certificate verification policy lives
154
+ in `@browsercore/tls`, which receives the anchors as plain bytes.
155
+
156
+ **`Clock` is the time contract.** `now()` (wall, epoch ms),
126
157
  `monotonic()` (monotonic ms; never `Date.now()` deltas for deadline math),
127
158
  `sleep(ms)`, `setTimeout(ms, fn)` / `clearTimeout(handle)` with
128
159
  `TimerHandle` an opaque `object` (not `NodeJS.Timeout`; runtime timer
129
- tokens must not leak into published declarations). It supersedes the five
130
- package-local sibling Clock shapes (tls/http1/http2/http3/quic), whose
131
- `options.clock` seams migrate onto it in the next wave. `Time` remains as
132
- the `Platform` bundle name aliasing `Clock`; `Duration`/`Scheduler`/
133
- `Deadline` stay for duration-composed scheduling.
160
+ tokens must not leak into published declarations). `Time` is the
161
+ `Platform` bundle name aliasing `Clock`; `Duration`/`Scheduler`/
162
+ `Deadline` serve duration-composed scheduling.
134
163
 
135
164
  **`TlsHandshakeEngine` is the quic↔tls seam.** Protocol packages never
136
165
  import each other (the no-hard-wires invariant); this interface,
137
166
  `runHandshake` / `generateKeyShares` / `cipherSuiteToAead` plus the pure
138
167
  handshake data types, is what `@browsercore/tls` implements and the
139
- composition root injects into quic, replacing quic's direct tls imports
140
- (the audit's single no-hard-wires violation). http3's fake-quic
141
- compatibility test is the proof-of-concept for swapping a structural engine
142
- implementation.
143
-
144
- **`Certificate.signatureAlgorithm` is a discriminated union (0.2.8,
145
- breaking).** The engine's certificate mirror previously carried
146
- `signatureScheme: SignatureScheme`, and the tls parser threw for every
147
- signature algorithm outside four hardcoded OIDs — making servers presenting
148
- SHA-384/512 RSA, ECDSA-SHA512, Ed25519, or RSA-PSS certificates unreachable.
149
- tls 0.4.19 fixed that by never throwing on a structurally valid certificate:
150
- parsing always succeeds, and `CertificateSignatureAlgorithm` records the
151
- outcome — `{ kind: "supported", scheme }` when the OID maps to a scheme the
168
+ composition root injects into quic.
169
+
170
+ **`Certificate.signatureAlgorithm` is a discriminated union.** Parsing
171
+ never throws on a structurally valid certificate:
172
+ `CertificateSignatureAlgorithm` records the outcome, either
173
+ `{ kind: "supported", scheme }` when the OID maps to a scheme the
152
174
  engine can verify, or `{ kind: "rejected", reason: "sha1" | "md5" |
153
- "pss-parameters" | "unknown", oid }` naming the policy reason and the
154
- dotted-arc OID when policy declines it. Acceptance is the ENGINE's decision,
155
- not the parser's — matching Chrome, which parses SHA-1-signed roots but
156
- refuses to rely on them. The mirror also gained `Certificate.selfSigned`
157
- (true when the subject DN bytes equal the issuer DN bytes). This is a
158
- breaking type change for consumers reading `peerCertificate.signatureScheme`:
159
- migrate by switching on `peerCertificate.signatureAlgorithm.kind` —
160
- `"supported"` reads `.scheme` where `signatureScheme` used to be read;
175
+ "pss-parameters" | "unknown", oid }`, naming the policy reason and the
176
+ dotted-arc OID when policy declines it. Acceptance is the engine's decision,
177
+ not the parser's. This matches Chrome, which parses SHA-1-signed roots but
178
+ refuses to rely on them. `Certificate.selfSigned` is true when the subject
179
+ DN bytes equal the issuer DN bytes. Consumers switch on
180
+ `peerCertificate.signatureAlgorithm.kind`: `"supported"` reads `.scheme`;
161
181
  `"rejected"` surfaces `.reason`/`.oid` instead of a thrown error:
162
182
 
163
183
  ```ts
@@ -178,43 +198,13 @@ function describeIssuerSignature(certificate: Certificate): string {
178
198
  `ProxyCredentials` (verbatim from `@browsercore/proxy`), `ProfileId` (the
179
199
  ten built-in registry ids), and `CookieJarConsumer` (the minimal jar surface
180
200
  fetch actually calls; `@browsercore/cookies`' full jar satisfies it
181
- structurally) are defined here as canonical; the owning packages alias onto
182
- them in the next wave.
201
+ structurally) are defined here as canonical.
183
202
 
184
203
  Further rationale (why the sync crypto/compression contracts are deliberate,
185
204
  why WebCrypto/CompressionStream are not valid backends, and what an async
186
205
  future would cost) lives in
187
206
  [docs/design-decisions.md](docs/design-decisions.md).
188
207
 
189
- ## Usage
190
-
191
- ### Importing types (compile-time only)
192
-
193
- ```ts
194
- import type { Net, DnsResolver, Transport, BrowserProfile } from "@browsercore/contracts";
195
- ```
196
-
197
- Type imports are erased at compile time, zero runtime cost.
198
-
199
- ### Importing wire code tables (runtime)
200
-
201
- ```ts
202
- import { CIPHER_SUITE_CODES, NAMED_GROUP_CODES } from "@browsercore/contracts";
203
-
204
- const aes128 = CIPHER_SUITE_CODES["TLS_AES_128_GCM_SHA256"]; // 0x1301
205
- const x25519 = NAMED_GROUP_CODES["x25519"]; // 0x001d
206
- ```
207
-
208
- ### Implementing an alternative package
209
-
210
- ```ts
211
- import type { Transport, TransportState, CloseReason } from "@browsercore/contracts";
212
-
213
- class MyCustomTransport implements Transport {
214
- // Implement the interface and the rest of the stack works unchanged
215
- }
216
- ```
217
-
218
208
  ## Design rules
219
209
 
220
210
  1. **If a type crosses a package boundary, it lives here.** Litmus test:
@@ -240,7 +230,8 @@ class MyCustomTransport implements Transport {
240
230
  ## Zero overhead
241
231
 
242
232
  All type exports are erased by the TypeScript compiler. The only runtime
243
- exports are the IANA wire code tables and `Duration` factories, plain
233
+ exports are the IANA wire code tables (plus the `CIPHER_GREASE_PLACEHOLDER`
234
+ constant) and the `Duration` factory, plain
244
235
  `const` objects with no dependencies, no side effects.
245
236
 
246
237
  ## Contributing
@@ -69,6 +69,35 @@ export interface CryptoProvider {
69
69
  * key schedule. Order verified against OpenSSL's X25519MLKEM768 peer.
70
70
  */
71
71
  x25519MLKEM768SharedSecret(x25519SecretKey: Uint8Array, x25519PeerPublicKey: Uint8Array, mlkemSecretKey: Uint8Array, mlkemCiphertext: Uint8Array): Uint8Array;
72
+ /**
73
+ * AES-CBC over raw block chaining: no padding of its own, because TLS 1.2
74
+ * pads the plaintext before it calls this (RFC 5246 §6.2.3.2). `key` is 16
75
+ * or 32 bytes and selects the AES variant, `iv` and the block count of
76
+ * `plaintext` are the caller's responsibility.
77
+ *
78
+ * Optional: only the TLS 1.2 CBC suites Chrome advertises as fallbacks
79
+ * need it (RFC 5246 §7.4.1.2). A provider without it keeps rejecting those
80
+ * suites, exactly as before these methods existed, so adding them breaks no
81
+ * implementation.
82
+ */
83
+ aesCbcEncrypt?(key: Uint8Array, iv: Uint8Array, plaintext: Uint8Array): Uint8Array;
84
+ /** The inverse of `aesCbcEncrypt`; `aesEcbEncrypt` cannot serve as one (it has no decryption). */
85
+ aesCbcDecrypt?(key: Uint8Array, iv: Uint8Array, ciphertext: Uint8Array): Uint8Array;
86
+ /**
87
+ * HMAC-SHA1, the MAC of the TLS 1.2 CBC suites named above (RFC 5246
88
+ * §6.2.3.1). A method of its own rather than a `HashId`: `HashId` selects
89
+ * the HKDF and PRF hash everywhere else, where SHA-1 is forbidden.
90
+ * Optional for the same reason as AES-CBC.
91
+ */
92
+ hmacSha1?(key: Uint8Array, data: Uint8Array): Uint8Array;
93
+ /**
94
+ * RSA PKCS#1 v1.5 public-key encryption (RFC 8017 §7.2). A TLS 1.2 client
95
+ * encrypts the 48-byte pre-master secret with the server's key for the
96
+ * static-RSA suites (RFC 5246 §7.4.7.1); `publicKey` is the DER
97
+ * SubjectPublicKeyInfo of the server certificate. Optional for the same
98
+ * reason as AES-CBC.
99
+ */
100
+ rsaEncryptPkcs1?(publicKey: Uint8Array, plaintext: Uint8Array): Uint8Array;
72
101
  }
73
102
  /**
74
103
  * `CompressionProvider` — the canonical injected compression surface.
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACR,eAAe,EACf,MAAM,EACN,mBAAmB,EACnB,SAAS,EACT,WAAW,EACX,MAAM,EACN,aAAa,EACb,cAAc,EACd,WAAW,EACX,UAAU,EACV,aAAa,EACb,eAAe,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD;;;;;;;;;;;;;;;;;;;;GAoBG;A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W,iBAAiB;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,IAAI,IAAI,OAAO,CAAC;QAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC,CAAC;IAC1E,KAAK,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;;OAGG;IACH,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC5D;AAMD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,SAAS;IACtB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IAC3C,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C,KAAK,IAAI,IAAI,CAAC;IACd,SAAS,IAAI,MAAM,CAAC;IACpB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAWD;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;CACtC"}
package/dist/index.d.ts CHANGED
@@ -34,5 +34,5 @@ export type { Logger, Span, Tracer, Metrics, Telemetry, } from "./telemetry.js";
34
34
  export type { Clock, TimerHandle, Deadline, Scheduler, Time, } from "./time.js";
35
35
  /** Duration static factories — `Duration.seconds(5)`, `Duration.milliseconds(250)`. */
36
36
  export { Duration } from "./time.js";
37
- export type { Compression, Crypto, Platform, PlatformOptions, } from "./platform.js";
37
+ export type { Compression, Crypto, Platform, PlatformOptions, Trust, } from "./platform.js";
38
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,YAAY,EAER,cAAc,EACd,mBAAmB,EACnB,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAEhB,SAAS,EAET,cAAc,EACd,uBAAuB,GAC1B,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EAER,SAAS,EACT,mBAAmB,EAEnB,cAAc,EACd,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAElB,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,aAAa,EAEb,OAAO,EAEP,MAAM,EAEN,MAAM,EACN,SAAS,EACT,aAAa,EACb,eAAe,EACf,WAAW,EAEX,UAAU,EACV,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,QAAQ,EAER,eAAe,GAClB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACH,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,GAChB,MAAM,aAAa,CAAC;AAMrB,YAAY,EACR,cAAc,EACd,MAAM,EACN,GAAG,EACH,WAAW,EACX,SAAS,EACT,OAAO,GACV,MAAM,oBAAoB,CAAC;AAM5B,YAAY,EAER,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EAGf,6BAA6B,EAC7B,eAAe,EAEf,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,OAAO,EACP,cAAc,EACd,yBAAyB,EACzB,cAAc,EACd,UAAU,EAEV,mBAAmB,EACnB,kBAAkB,GACrB,MAAM,iBAAiB,CAAC;AAMzB,YAAY,EACR,mBAAmB,EACnB,eAAe,GAClB,MAAM,kBAAkB,CAAC;AAM1B,YAAY,EACR,WAAW,EACX,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,iBAAiB,GACpB,MAAM,aAAa,CAAC;AAMrB,YAAY,EACR,aAAa,EACb,iBAAiB,GACpB,MAAM,aAAa,CAAC;AAMrB,YAAY,EACR,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAO,EACP,SAAS,GACZ,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EACR,KAAK,EACL,WAAW,EACX,QAAQ,EACR,SAAS,EACT,IAAI,GACP,MAAM,WAAW,CAAC;AAEnB,uFAAuF;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAMrC,YAAY,EACR,WAAW,EACX,MAAM,EACN,QAAQ,EACR,eAAe,GAClB,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,YAAY,EAER,cAAc,EACd,mBAAmB,EACnB,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAEhB,SAAS,EAET,cAAc,EACd,uBAAuB,GAC1B,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EAER,SAAS,EACT,mBAAmB,EAEnB,cAAc,EACd,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAElB,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,aAAa,EAEb,OAAO,EAEP,MAAM,EAEN,MAAM,EACN,SAAS,EACT,aAAa,EACb,eAAe,EACf,WAAW,EAEX,UAAU,EACV,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,QAAQ,EAER,eAAe,GAClB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACH,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,GAChB,MAAM,aAAa,CAAC;AAMrB,YAAY,EACR,cAAc,EACd,MAAM,EACN,GAAG,EACH,WAAW,EACX,SAAS,EACT,OAAO,GACV,MAAM,oBAAoB,CAAC;AAM5B,YAAY,EAER,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EAGf,6BAA6B,EAC7B,eAAe,EAEf,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,OAAO,EACP,cAAc,EACd,yBAAyB,EACzB,cAAc,EACd,UAAU,EAEV,mBAAmB,EACnB,kBAAkB,GACrB,MAAM,iBAAiB,CAAC;AAMzB,YAAY,EACR,mBAAmB,EACnB,eAAe,GAClB,MAAM,kBAAkB,CAAC;AAM1B,YAAY,EACR,WAAW,EACX,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,iBAAiB,GACpB,MAAM,aAAa,CAAC;AAMrB,YAAY,EACR,aAAa,EACb,iBAAiB,GACpB,MAAM,aAAa,CAAC;AAMrB,YAAY,EACR,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAO,EACP,SAAS,GACZ,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EACR,KAAK,EACL,WAAW,EACX,QAAQ,EACR,SAAS,EACT,IAAI,GACP,MAAM,WAAW,CAAC;AAEnB,uFAAuF;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAMrC,YAAY,EACR,WAAW,EACX,MAAM,EACN,QAAQ,EACR,eAAe,EACf,KAAK,GACR,MAAM,eAAe,CAAC"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA4DH,8DAA8D;AAC9D,OAAO,EACH,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,GAChB,MAAM,aAAa,CAAC;AAiGrB,uFAAuF;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAarC,8EAA8E;AAC9E,qEAAqE;AACrE,uEAAuE;AACvE,6DAA6D;AAC7D,qCAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA4DH,8DAA8D;AAC9D,OAAO,EACH,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,GAChB,MAAM,aAAa,CAAC;AAiGrB,uFAAuF;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAcrC,8EAA8E;AAC9E,qEAAqE;AACrE,uEAAuE;AACvE,6DAA6D;AAC7D,qCAAqC"}
@@ -4,7 +4,7 @@
4
4
  * This is the single object that browsersmith assembles and passes down
5
5
  * to every protocol package. Each field is a service bundle that groups
6
6
  * related platform capabilities (network, crypto, compression, events,
7
- * telemetry, time).
7
+ * telemetry, time, trust).
8
8
  *
9
9
  * Architecture:
10
10
  *
@@ -17,7 +17,8 @@
17
17
  * ├── compression? (gzip, deflate, brotli, etc.)
18
18
  * ├── events? (EventProvider)
19
19
  * ├── telemetry? (logger, tracer, metrics)
20
- * └── time? (Clock — the canonical time contract)
20
+ * ├── time? (Clock — the canonical time contract)
21
+ * └── trust? (Trust — the runtime trust root store)
21
22
  *
22
23
  * All fields are interfaces — this file has zero runtime behavior
23
24
  * and zero node:* imports.
@@ -48,6 +49,22 @@ export type Compression = CompressionProvider;
48
49
  export interface Crypto {
49
50
  readonly provider: CryptoProvider;
50
51
  }
52
+ /**
53
+ * `Trust` — the injected runtime trust root store (part of `Platform`).
54
+ *
55
+ * Runtime trust anchors — the store THIS runtime offers its own TLS stack.
56
+ *
57
+ * This is the runtime's own root program (e.g. Node's bundled Mozilla store
58
+ * plus `NODE_EXTRA_CA_CERTS`), not Chrome's root program; certificate
59
+ * verification policy lives in `@browsercore/tls`, which receives the
60
+ * anchors as plain DER bytes. `browsersmith` populates this bundle from its
61
+ * Node adapter; protocol packages reach it through options, never by
62
+ * importing `node:tls` directly.
63
+ */
64
+ export interface Trust {
65
+ /** Raw DER root certificates (e.g. Node's bundled Mozilla store + NODE_EXTRA_CA_CERTS). */
66
+ readonly rootStore: () => readonly Uint8Array[];
67
+ }
51
68
  /**
52
69
  * `Platform` — the single composition root for all runtime services.
53
70
  *
@@ -82,6 +99,8 @@ export interface Platform {
82
99
  readonly events?: EventProvider;
83
100
  readonly telemetry?: Telemetry;
84
101
  readonly time?: Time;
102
+ /** Trust bundle — the runtime trust root store; see {@link Trust}. */
103
+ readonly trust?: Trust;
85
104
  }
86
105
  /**
87
106
  * Options for overriding individual platform adapters.
@@ -102,5 +121,8 @@ export interface PlatformOptions {
102
121
  readonly events?: EventProvider;
103
122
  readonly telemetry?: Telemetry;
104
123
  readonly time?: Time;
124
+ readonly trust?: {
125
+ readonly rootStore?: () => readonly Uint8Array[];
126
+ };
105
127
  }
106
128
  //# sourceMappingURL=platform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAMtC;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,GAAG,mBAAmB,CAAC;AAM9C;;;;;;GAMG;AACH,MAAM,WAAW,MAAM;IACnB,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;CACrC;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,QAAQ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,aAAa,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE;QACb,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,SAAS,UAAU,EAAE,CAAC;KACpD,CAAC;CACL"}
package/dist/platform.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * This is the single object that browsersmith assembles and passes down
5
5
  * to every protocol package. Each field is a service bundle that groups
6
6
  * related platform capabilities (network, crypto, compression, events,
7
- * telemetry, time).
7
+ * telemetry, time, trust).
8
8
  *
9
9
  * Architecture:
10
10
  *
@@ -17,7 +17,8 @@
17
17
  * ├── compression? (gzip, deflate, brotli, etc.)
18
18
  * ├── events? (EventProvider)
19
19
  * ├── telemetry? (logger, tracer, metrics)
20
- * └── time? (Clock — the canonical time contract)
20
+ * ├── time? (Clock — the canonical time contract)
21
+ * └── trust? (Trust — the runtime trust root store)
21
22
  *
22
23
  * All fields are interfaces — this file has zero runtime behavior
23
24
  * and zero node:* imports.
@@ -1 +1 @@
1
- {"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG"}
1
+ {"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browsercore/contracts",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "description": "Shared interfaces and models for the browsercore stack",
5
5
  "repository": {
6
6
  "type": "git",