@rstreamlabs/tunnels 3.10.1 → 4.0.1

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
@@ -84,6 +84,20 @@ const clients = await client.clients.list();
84
84
  Schemas and TypeScript types are exported for clients, tunnels, stream
85
85
  summaries, and engine events.
86
86
 
87
+ List responses and watch inventory use `ListedClient` and `ListedTunnel`.
88
+ Their fields are optional because a list scope may select only part of an
89
+ object. Check a field before using it, or request it in the list scope. The
90
+ full `Client` and `Tunnel` models remain available for complete objects;
91
+ webhook payloads continue to use their full schemas.
92
+
93
+ Compatible managed Engines apply `resources.tunnels.scopes.clients.list`
94
+ and `resources.tunnels.scopes.tunnels.list` independently. Each accepts
95
+ `true`, `false`, or `{ filters, select }`. A denied REST list returns 403;
96
+ watch snapshots contain an empty array for that category while authorized
97
+ categories remain usable. Omitting client scopes preserves legacy client
98
+ visibility. Schema support in this SDK does not enable these permissions on
99
+ older Engines: wait for the compatible Engine rollout before issuing them.
100
+
87
101
  ## Watch Streams
88
102
 
89
103
  `Watch` subscribes to engine events over SSE or WebSocket and validates each
@@ -112,7 +126,16 @@ await watch.connect();
112
126
  ```
113
127
 
114
128
  URL-based watch authentication requires a short-lived token with bounded
115
- lifetime, explicit read-only watch permissions, and list-only tunnel resources.
129
+ lifetime, explicit read-only watch permissions, and client or tunnel list
130
+ resources without creation or connection authority.
131
+
132
+ Treat every `state.initial` event as a full replacement, including snapshots
133
+ received during an existing connection. Filter transitions produce `created`
134
+ and `deleted` events, with deletions containing only the last visible fields.
135
+ When selection omits object IDs, the Engine replaces the snapshot instead of
136
+ emitting deltas that cannot be correlated. WebTTY discovery needs an exposed
137
+ ID, online status and protocol or discovery labels; browser connections also
138
+ need the published host.
116
139
 
117
140
  Browser integrations should provide `auth` as a function that calls a backend
118
141
  token route and returns a fresh watch token for each connection attempt. Do not