openclaw-brokerkit 0.3.0 → 0.3.2

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
@@ -187,9 +187,12 @@ Because the packaged UI has an opaque origin under the required scripts-only
187
187
  sandbox, a delegated host must accept only the expected `Origin: null`,
188
188
  return `Access-Control-Allow-Origin: null`, allow `BrokerKit-Session` and
189
189
  `Content-Type` in preflight responses, allow only its fixed route methods,
190
- and set `Vary: Origin` plus `Cache-Control: no-store`. It must not return
191
- `Access-Control-Allow-Credentials: true`; delegated API requests deliberately
192
- omit cookies.
190
+ set `Access-Control-Allow-Credentials: true`, and set `Vary: Origin` plus
191
+ `Cache-Control: no-store`. Delegated API requests use `credentials: "include"`
192
+ so a private hosting edge can receive its own access cookie. The host must not
193
+ treat that cookie as BrokerKit authorization: every delegated route still
194
+ requires and validates the short-lived `BrokerKit-Session`. Direct mode keeps
195
+ using `credentials: "omit"`.
193
196
 
194
197
  ### Parent session bridge
195
198
 
@@ -206,3 +209,19 @@ frame and must bind each response to the supplied 128-bit nonce. `session` is
206
209
  the same `brokerkit.io/delegated-web/v1` object returned by
207
210
  `POST <basePath>/session`. The bridge is a BrokerKit interface; it contains
208
211
  no host-product namespace or host-specific payload.
212
+
213
+ ### Session rebootstrap
214
+
215
+ A direct-renewal token can expire while a browser tab is suspended. If the
216
+ host rejects renewal with `not_authorized`, a framed UI sends this
217
+ credential-free message once:
218
+
219
+ ```text
220
+ { type: "brokerkit.delegated-web.rebootstrap", version: 1 }
221
+ ```
222
+
223
+ The host must accept it only from the embedded BrokerKit frame and reload only
224
+ that protected frame so its HTML response can inject a fresh session. Hosts
225
+ must rate-limit reloads and must not return a token through this message. This
226
+ keeps rebootstrap host-neutral while leaving session issuance at the trusted
227
+ HTTP boundary.