@browsercore/contracts 0.1.3 → 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.
- package/LICENSE +21 -0
- package/README.md +93 -47
- package/dist/contracts.d.ts +1 -4
- package/dist/contracts.d.ts.map +1 -1
- package/package.json +27 -9
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 browsercore contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,67 +1,113 @@
|
|
|
1
|
-
# @browsercore/
|
|
2
|
-
[](https://github.com/jverneuer/browsercore-api)
|
|
1
|
+
# @browsercore/contracts
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@browsercore/contracts)
|
|
4
|
+
[](https://github.com/jverneuer/browsercore-contracts/blob/main/COVERAGE.md)
|
|
5
|
+
[](https://github.com/jverneuer/browsercore-contracts/actions/workflows/ci.yml)
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
The canonical interface package for the browsercore stack. Every protocol
|
|
8
|
+
package, runtime adapter, and consumer depends on these contracts — they
|
|
9
|
+
define how components communicate without coupling them to each other.
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
## Why this package exists
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
**Zero drift through global interface distribution.** Without a shared
|
|
14
|
+
contracts package, every `@browsercore/*` package would define its own version
|
|
15
|
+
of `Transport`, `BrowserProfile`, `FetchClient`, etc. When one package changes
|
|
16
|
+
a shape, the others silently break at runtime. By centralizing every
|
|
17
|
+
cross-package interface here, a type error becomes a compile error the moment
|
|
18
|
+
any package diverges.
|
|
11
19
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
| `QuicFrame` | `"quic"` | `ProtocolFrame` |
|
|
20
|
+
**Alternative implementations welcome.** The contracts define exactly what a
|
|
21
|
+
component must satisfy — nothing more. Want to write a different TLS engine?
|
|
22
|
+
Implement `TlsConnection`. A different transport? Implement `Transport`. A
|
|
23
|
+
different runtime (Bun, Deno, Workers)? Implement `Net` and `DnsResolver`. The
|
|
24
|
+
contracts are the spec; the packages are the reference implementations.
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
**Implementation-independent.** No `node:crypto`, `node:net`, `Buffer`, or any
|
|
27
|
+
runtime details leak into these types. They are portable TypeScript interfaces
|
|
28
|
+
and plain data.
|
|
20
29
|
|
|
21
|
-
##
|
|
30
|
+
## Architecture
|
|
22
31
|
|
|
23
|
-
|
|
32
|
+
```
|
|
33
|
+
@browsercore/contracts (this package — interfaces + models + wire codes)
|
|
34
|
+
▲
|
|
35
|
+
│
|
|
36
|
+
┌──────┼─────────────┐
|
|
37
|
+
│ │ │
|
|
38
|
+
▼ ▼ ▼
|
|
39
|
+
tls http2 transport
|
|
40
|
+
│ │ │
|
|
41
|
+
└───────┴─────────────┘
|
|
42
|
+
▼
|
|
43
|
+
@browsercore/fetch
|
|
44
|
+
▼
|
|
45
|
+
browsersmith (entrypoint)
|
|
46
|
+
```
|
|
24
47
|
|
|
25
|
-
|
|
26
|
-
|
|
48
|
+
Dependency direction is strictly upward — contracts is the root dependency.
|
|
49
|
+
No package below contracts in the graph; every other package imports from it.
|
|
27
50
|
|
|
28
|
-
|
|
29
|
-
// ... existing options
|
|
30
|
-
readonly onPacket?: PacketCallback;
|
|
31
|
-
}
|
|
51
|
+
## What's inside
|
|
32
52
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
53
|
+
| Module | Purpose | Key exports |
|
|
54
|
+
|---|---|---|
|
|
55
|
+
| **Contracts** | Provider + connection interfaces that protocol packages implement | `CryptoProvider`, `CompressionProvider`, `Transport`, `DatagramTransport`, `TlsConnection`, `Http1Connection`, `Http2Connection`, `Http3Connection`, `QuicConnection`, `QuicStream`, `FetchClient`, `CookieJar`, `Clock`, `PacketCallback` |
|
|
56
|
+
| **Models** | Shared data structures that cross package boundaries | `BrowserProfile`, `TlsProfile`, `Http1Profile`, `Http2Profile`, `Request`, `Response`, `Headers`, `Cookie`, `TransportState`, `CloseReason`, `ContentEncoding` |
|
|
57
|
+
| **Net** | Platform-agnostic TCP + DNS contracts for runtime portability | `Net`, `DnsResolver`, `Socket`, `ConnectOptions`, `IPAddress` |
|
|
58
|
+
| **Options** | Configuration objects passed to each protocol package | `TlsOptions`, `Http1Options`, `Http2Options`, `Http3Options`, `QuicOptions`, `FetchClientOptions` |
|
|
59
|
+
| **IANA Tables** | Canonical TLS wire code lookup tables (single source of truth) | `CIPHER_SUITE_CODES`, `NAMED_GROUP_CODES`, `SIGNATURE_SCHEME_CODES`, `VERSION_CODES` |
|
|
60
|
+
|
|
61
|
+
## Usage
|
|
62
|
+
|
|
63
|
+
### Importing types (compile-time only)
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
import type { Net, DnsResolver, Transport, BrowserProfile } from "@browsercore/contracts";
|
|
44
67
|
```
|
|
45
68
|
|
|
46
|
-
|
|
69
|
+
Type imports are erased at compile time — zero runtime cost.
|
|
47
70
|
|
|
48
|
-
|
|
49
|
-
import { createInspectorSession } from "@browsercore/devtools";
|
|
50
|
-
import type { PacketCallback } from "@browsercore/api";
|
|
71
|
+
### Importing wire code tables (runtime)
|
|
51
72
|
|
|
52
|
-
|
|
73
|
+
```ts
|
|
74
|
+
import { CIPHER_SUITE_CODES, NAMED_GROUP_CODES } from "@browsercore/contracts";
|
|
75
|
+
|
|
76
|
+
const aes128 = CIPHER_SUITE_CODES["TLS_AES_128_GCM_SHA256"]; // 0x1301
|
|
77
|
+
const x25519 = NAMED_GROUP_CODES["x25519"]; // 0x001d
|
|
78
|
+
```
|
|
53
79
|
|
|
54
|
-
|
|
55
|
-
const onPacket: PacketCallback = (frame) => session.addFrame(frame);
|
|
80
|
+
### Implementing an alternative package
|
|
56
81
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
82
|
+
```ts
|
|
83
|
+
import type { Transport, TransportState, CloseReason } from "@browsercore/contracts";
|
|
84
|
+
|
|
85
|
+
class MyCustomTransport implements Transport {
|
|
86
|
+
// Implement the interface — the rest of the stack works unchanged
|
|
87
|
+
}
|
|
63
88
|
```
|
|
64
89
|
|
|
65
|
-
##
|
|
90
|
+
## Design rules
|
|
91
|
+
|
|
92
|
+
1. **If a type crosses a package boundary, it lives here.** Litmus test:
|
|
93
|
+
*"Could two packages reasonably import this type?"* If yes → contracts.
|
|
94
|
+
If only one package uses it → stays in that package.
|
|
95
|
+
|
|
96
|
+
2. **No runtime behavior.** Only TypeScript types and `const` data tables.
|
|
97
|
+
No classes with logic, no functions with side effects.
|
|
98
|
+
|
|
99
|
+
3. **No Node built-ins.** Types reference only portable primitives:
|
|
100
|
+
`string`, `number`, `Uint8Array`, `Promise`, `IterableIterator`.
|
|
101
|
+
|
|
102
|
+
4. **Branded types for IDs.** `ProfileId`, `StreamId`, `ConnectionId` etc.
|
|
103
|
+
are opaque branded types, not bare `string`/`number`.
|
|
104
|
+
|
|
105
|
+
5. **Discriminated unions for state.** `TransportState`, `CloseReason`,
|
|
106
|
+
`TlsState` model every valid state explicitly — invalid combinations
|
|
107
|
+
are unrepresentable.
|
|
108
|
+
|
|
109
|
+
## Zero overhead
|
|
66
110
|
|
|
67
|
-
|
|
111
|
+
All type exports are erased by the TypeScript compiler. The only runtime
|
|
112
|
+
exports are the IANA wire code tables — plain `const` objects with no
|
|
113
|
+
dependencies, no side effects.
|
package/dist/contracts.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Litmus test: "Could another package reasonably import this type?"
|
|
5
5
|
* If yes → belongs here. If only one protocol touches it → stays in that package.
|
|
6
6
|
*/
|
|
7
|
-
import type { Cookie, FetchOptions, FetchResponse, ProtocolFrame, Request, Response, UdpAddress } from "./models.js";
|
|
7
|
+
import type { ContentEncoding, Cookie, DatagramCloseReason, EcdhCurve, EcdhKeyPair, FetchOptions, FetchResponse, HashId, ProtocolFrame, Request, Response, TransportState, CloseReason, TlsState, UdpAddress, X25519KeyPair } from "./models.js";
|
|
8
8
|
/**
|
|
9
9
|
* Cryptographic primitive abstraction.
|
|
10
10
|
* Implemented by: @browsercore/crypto
|
|
@@ -198,7 +198,4 @@ export type PacketCallback = (frame: ProtocolFrame) => void;
|
|
|
198
198
|
export interface PacketInspectionOptions {
|
|
199
199
|
readonly onPacket?: PacketCallback;
|
|
200
200
|
}
|
|
201
|
-
import type { HashId, EcdhCurve, X25519KeyPair, EcdhKeyPair } from "./models.js";
|
|
202
|
-
import type { ContentEncoding } from "./models.js";
|
|
203
|
-
import type { TransportState, CloseReason, DatagramCloseReason, TlsState } from "./models.js";
|
|
204
201
|
//# sourceMappingURL=contracts.d.ts.map
|
package/dist/contracts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,
|
|
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,YAAY,EACZ,aAAa,EACb,MAAM,EACN,aAAa,EACb,OAAO,EACP,QAAQ,EACR,cAAc,EACd,WAAW,EACX,QAAQ,EACR,UAAU,EACV,aAAa,EAChB,MAAM,aAAa,CAAC;AAMrB;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC3B,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC;IACxC,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IACrC,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IACrC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC;IACpG,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IAClE,gBAAgB,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,GAAG,UAAU,CAAC;IAC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I,CAAC,CAAC;CAC1B;AAMD;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IACxB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACnE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAED;;;;;GAKG;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;AAMD;;;;;GAKG;AACH,MAAM,WAAW,KAAK;IAClB,GAAG,IAAI,MAAM,CAAC;IACd,UAAU,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,IAAI,CAAC;CACjE;AAED;;;;GAIG;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/package.json
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@browsercore/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Shared interfaces, models, and options for the browsercore stack",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/jverneuer/browsercore-contracts.git"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/jverneuer/browsercore-contracts#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/jverneuer/browsercore-contracts/issues"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
5
14
|
"type": "module",
|
|
15
|
+
"sideEffects": false,
|
|
6
16
|
"main": "./dist/index.js",
|
|
7
17
|
"types": "./dist/index.d.ts",
|
|
8
18
|
"exports": {
|
|
@@ -12,19 +22,27 @@
|
|
|
12
22
|
}
|
|
13
23
|
},
|
|
14
24
|
"files": [
|
|
15
|
-
"dist"
|
|
25
|
+
"dist",
|
|
26
|
+
"LICENSE"
|
|
16
27
|
],
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public",
|
|
30
|
+
"registry": "https://registry.npmjs.org/"
|
|
31
|
+
},
|
|
17
32
|
"scripts": {
|
|
33
|
+
"clean": "rm -rf dist",
|
|
18
34
|
"build": "tsc -p tsconfig.json",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"publishConfig": {
|
|
24
|
-
"access": "public"
|
|
35
|
+
"prepublishOnly": "npm run clean && npm run build",
|
|
36
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
37
|
+
"test": "vitest run",
|
|
38
|
+
"lint": "oxlint --type-aware src/"
|
|
25
39
|
},
|
|
26
40
|
"devDependencies": {
|
|
27
41
|
"@types/node": "^26.1.2",
|
|
28
|
-
"
|
|
42
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
43
|
+
"oxlint": "^1.76.0",
|
|
44
|
+
"oxlint-tsgolint": "7.0.2001",
|
|
45
|
+
"typescript": "^7.0.2",
|
|
46
|
+
"vitest": "^4.1.10"
|
|
29
47
|
}
|
|
30
48
|
}
|