@@ -23,18 +23,33 @@ export interface DevframeConnection {
2323 metaBaseUrl : string
2424 /** Previously issued bearer token, when the connection is already trusted. */
2525 authToken ?: string
26- /** Skip shared browser caches and authentication broadcasts. Retained when reconnecting. */
26+ /**
27+ * Skip shared browser caches and authentication broadcasts. Retained when reconnecting.
28+ * The origin-wide `devframe-auth` channel carries no backend identity, so a token
29+ * from another connection could otherwise overwrite this connection's credentials.
30+ * Authentication still uses this connection's own RPC transport.
31+ */
32+ isolated ?: boolean
33+ }
34+
35+ /**
36+ * Configure discovery before metadata and its source URL have been resolved.
37+ * Shared behavior is the default. Set `isolated: true` when connecting to independent
38+ * backends from one viewer. Browser credential caches are not scoped per backend, and
39+ * `devframe-auth` broadcasts carry no backend identity, so they can mix credentials.
40+ * An isolated connection still authenticates through its own RPC transport.
41+ */
42+ export interface DevframeConnectionDiscoveryOptions {
43+ /** Use connection-local credentials; see {@link DevframeConnection.isolated}. Defaults to shared behavior. */
2744 isolated ?: boolean
45+ connectionMeta ?: never
46+ metaBaseUrl ?: never
47+ authToken ?: never
2848}
2949
3050export interface SetupDevframeConnectionOptions {
3151 /** Reuse a prepared connection, or configure isolation before resolving its metadata. */
32- connection ?: DevframeConnection | {
33- isolated ?: boolean
34- connectionMeta ?: never
35- metaBaseUrl ?: never
36- authToken ?: never
37- }
52+ connection ?: DevframeConnection | DevframeConnectionDiscoveryOptions
3853 /** Use a pre-known descriptor while deriving its source URL from `baseURL`. */
3954 connectionMeta ?: ConnectionMeta
4055 /** Base URL, or fallback list, used to locate `__connection.json`. */
0 commit comments