@api.global/typedsocket 5.1.2 → 6.0.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/readme.hints.md CHANGED
@@ -1,21 +1,37 @@
1
1
  # TypedSocket Hints
2
2
 
3
- ## SmartServe Integration (Added v3.1.0)
3
+ ## TypedSocket 6 Integration
4
4
 
5
- TypedSocket now supports SmartServe as an alternative WebSocket backend via `TypedSocket.fromSmartServe()`.
5
+ TypedSocket 6 requires SmartServe 4.2.1 and TypedRequest 5.2.1. Compose the
6
+ TypedSocket server before constructing SmartServe so `webSocketTransportOwner`
7
+ is selected for the physical peer at upgrade time.
6
8
 
7
- ### Key Differences from Smartsocket Mode
9
+ ### Authority Rules
8
10
 
9
- 1. **Tag System**: SmartServe uses `Set<string>` for tags, while Smartsocket uses `{id, payload}`. The wrapper stores payloads in `peer.data` with `__typedsocket_tag__` prefix.
11
+ 1. **Peer identity**: Incoming server handlers call
12
+ `getServerConnectionForRequest(typedTools)` to obtain the exact typed transport
13
+ connection without assertions. Tag validators receive opaque `connectionId`
14
+ and `routingSurfaceId` identities instead of mutable peer/router objects.
10
15
 
11
- 2. **Request/Response**: Uses TypedRouter's `fireEventInterestMap` for async correlation when sending server-initiated requests.
16
+ 2. **Tags**: Client tags are default-deny exact rules. Authentication, roles,
17
+ registration, and reserved names are assigned only with `setServerTag()`.
12
18
 
13
- 3. **Lifecycle**: SmartServe manages WebSocket lifecycle. `typedSocket.stop()` only clears internal state.
19
+ 3. **Bytes**: Generic legacy VirtualStreams are always denied. Exact native-byte
20
+ facades require fixed manifests, principal/revision authority, and durable
21
+ confirmation.
14
22
 
15
- 4. **eventSubject**: Not fully supported in SmartServe mode - use SmartServe's `onConnectionOpen`/`onConnectionClose` hooks instead.
23
+ 4. **Lifecycle**: Client text work, native frames, callbacks, pending requests,
24
+ tag mutations, and server request interests have fixed resource ceilings and
25
+ generation fencing. SmartServe settlements authorize only the exact frame
26
+ object returned by `pullBinaryFrame()`.
16
27
 
17
- ### Files Modified for SmartServe Support
28
+ 5. **Restoration**: `restoreConnection(context)` runs after capability
29
+ negotiation and before desired tags or `connected`. Use
30
+ `context.createTypedRequest()` for authenticated restoration RPCs; it inherits
31
+ the restoration deadline and abort signal and becomes invalid afterward.
18
32
 
19
- - `ts/typedsocket.classes.typedsocket.ts` - Main implementation
20
- - `ts/typedsocket.plugins.ts` - Type imports
21
- - `package.json` - Optional peer dependency
33
+ ### Release Artifact
34
+
35
+ Only compiled `dist_ts` JavaScript/declarations, package metadata, documentation,
36
+ and the license are published. `pnpm run verify:package` performs the deterministic
37
+ two-pack entry, hash, metadata, and smoke-import gate.