@fkn/lib 0.9.42 → 0.9.44

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.
Files changed (54) hide show
  1. package/{api-SwxtiYVU.d.ts → api-CFkZVr53.d.ts} +61 -30
  2. package/api.d.ts +2 -2
  3. package/attach-policy.d.ts +11 -15
  4. package/cloud/dns.d.ts +1 -1
  5. package/cloud/fetch.d.ts +1 -1
  6. package/cloud/fs/promises.d.ts +1 -1
  7. package/cloud/fs.d.ts +3 -3
  8. package/cloud/net.d.ts +1 -1
  9. package/cloud-Bx64HSkQ.cjs +1 -0
  10. package/cloud-D-vDUzzx.js +552 -0
  11. package/{cloud-DUH-v10C.d.ts → cloud-DyOQPyUB.d.ts} +4 -4
  12. package/cloud.cjs +1 -1
  13. package/cloud.d.ts +4 -4
  14. package/cloud.js +1 -1
  15. package/{contract-CCxPKIC7.d.ts → contract-6Xfd_qel.d.ts} +173 -22
  16. package/contract.d.ts +4 -4
  17. package/dgram.d.ts +7 -14
  18. package/dns.d.ts +1 -1
  19. package/{extension-yhwDSIiD.d.ts → extension-BlEtNAYc.d.ts} +36 -37
  20. package/extension-CzZn0bY2.js +94 -0
  21. package/extension-DvFf7uoG.cjs +1 -0
  22. package/extension.cjs +1 -1
  23. package/extension.d.ts +3 -3
  24. package/extension.js +3 -3
  25. package/fs/promises.d.ts +1 -1
  26. package/{fs-D0MMRnHC.d.ts → fs-KA1Mgisv.d.ts} +2 -2
  27. package/fs.d.ts +3 -3
  28. package/http.d.ts +1 -1
  29. package/{index-BtFiGoVQ.d.ts → index-BOInGaEl.d.ts} +103 -62
  30. package/{index-D2lvaQDs.d.ts → index-DKr9L2RI.d.ts} +6 -11
  31. package/index.cjs +1 -1
  32. package/index.d.ts +36 -39
  33. package/index.js +55 -55
  34. package/{lib-DppqX10G.js → lib-C3UwxjVs.js} +560 -474
  35. package/lib-fqQfEPk6.cjs +53 -0
  36. package/messages-d7pvCXPn.d.ts +34 -0
  37. package/messages.d.ts +1 -1
  38. package/{net-DcLF-6E-.d.ts → net-CmMZgV2a.d.ts} +3 -19
  39. package/net.d.ts +1 -1
  40. package/package.json +1 -1
  41. package/packages.d.ts +1 -1
  42. package/{proxy-CE46SkyA.d.ts → proxy-dOOmiMl4.d.ts} +2 -2
  43. package/rooms.cjs +1 -1
  44. package/rooms.d.ts +94 -15
  45. package/rooms.js +118 -90
  46. package/{storage-BVr2Rb-d.d.ts → storage-BLBsmkmp.d.ts} +14 -28
  47. package/{wire-Gbo-D74t.d.ts → wire-BwA4JjZH.d.ts} +6 -12
  48. package/wire.d.ts +1 -1
  49. package/cloud-868OlBKn.cjs +0 -1
  50. package/cloud-f3j4s8yZ.js +0 -545
  51. package/extension-BOBuYwZc.js +0 -92
  52. package/extension-hoUs5yJ7.cjs +0 -1
  53. package/lib-CfdmsLoI.cjs +0 -53
  54. package/messages-CRcziTuC.d.ts +0 -46
package/extension.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib-CfdmsLoI.cjs"),t=require("./extension-hoUs5yJ7.cjs");exports.ATTACH_FRAME_EVENT_KEY=e.i,exports.CATEGORIES=e.C,exports.EXTENSION_ABI=e.rt,exports.ExtensionOperationUnsupportedError=e.it,exports.ExtensionOutdatedError=e.at,exports.FORGEABLE_HEADERS=e.J,exports.FrameWindowBlockedError=e.h,exports.FrameWindowRefusedError=e.g,exports.LOCATOR_DENIED=e.O,exports.LOCATOR_ERROR=e.N,exports.LOCATOR_INVALID=e.F,exports.LOCATOR_UNSUPPORTED=e.T,exports.PERMISSION_DENIED=e.t,exports.REQUIRED_EXTENSION_ABI=e.ot,exports.TimeoutError=e.w,exports.assertAttachableFrameUrl=e.b,exports.assertFetchableUrl=e.V,exports.assertForgeableHeaders=e.Y,exports.assertLockdownApplicable=e.x,exports.assertOneCookieIdentity=e.X,exports.attachFrame=e.a,exports.attachFramePermission=e._,exports.available=t.r,exports.box=e.lt,exports.cookies=e.z,exports.createFrame=e.v,exports.createVideoElementHandle=e.ut,exports.events=e.Q,exports.extension=e.Q,exports.fetch=e.H,exports.fetchCredentialedPermission=e.U,exports.fetchLocalPermission=e.W,exports.fetchPermission=e.G,exports.gotoPermission=e.y,exports.handleRevivableModules=e.ct,exports.hasForgedCookie=e.Z,exports.isBlockedFetchUrl=e.K,exports.isBlockedFrameUrl=e.S,exports.isExtensionExposed=e.$,exports.isLocalNetworkUrl=e.q,exports.isLocatorDenied=e.P,exports.isLocatorInvalid=e.A,exports.isLocatorUnsupported=e.E,exports.isPermissionDenied=e.n,exports.isTerminalError=e.M,exports.isType=e.dt,exports.modifyRequestHeadersPermission=e.I,exports.permissions=e.r,exports.promptInstall=t.i,exports.readCookiePermission=e.B,exports.readExtensionHandshake=e.et,exports.removeRequestHeaderRule=e.L,exports.revive=e.ft,exports.setMissingExtensionHandler=e.tt,exports.setRequestHeaderRule=e.R,exports.supportsOperation=e.st,exports.type=e.pt,exports.waitForExtensionExposure=e.nt;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib-fqQfEPk6.cjs"),t=require("./extension-DvFf7uoG.cjs");exports.ATTACH_FRAME_EVENT_KEY=e.i,exports.BACKGROUND_STOPPED=t.a,exports.CATEGORIES=e.w,exports.EXTENSION_ABI=e.it,exports.ExtensionOperationUnsupportedError=e.at,exports.ExtensionOutdatedError=e.ot,exports.FORGEABLE_HEADERS=e.Y,exports.FrameWindowBlockedError=e.g,exports.FrameWindowRefusedError=e._,exports.LOCATOR_DENIED=e.k,exports.LOCATOR_ERROR=e.P,exports.LOCATOR_INVALID=e.I,exports.LOCATOR_UNSUPPORTED=e.E,exports.PERMISSION_DENIED=e.t,exports.REQUIRED_EXTENSION_ABI=e.st,exports.TimeoutError=e.T,exports.assertAttachableFrameUrl=e.x,exports.assertFetchableUrl=e.H,exports.assertForgeableHeaders=e.X,exports.assertLockdownApplicable=e.S,exports.assertOneCookieIdentity=e.Z,exports.attachFrame=e.a,exports.attachFramePermission=e.v,exports.available=t.r,exports.box=e.ut,exports.cookies=e.B,exports.createFrame=e.y,exports.createVideoElementHandle=e.dt,exports.events=e.$,exports.extension=e.$,exports.fetch=e.U,exports.fetchCredentialedPermission=e.W,exports.fetchLocalPermission=e.G,exports.fetchPermission=e.K,exports.gotoPermission=e.b,exports.handleRevivableModules=e.lt,exports.hasForgedCookie=e.Q,exports.isBackgroundStopped=t.o,exports.isBlockedFetchUrl=e.q,exports.isBlockedFrameUrl=e.C,exports.isExtensionExposed=e.et,exports.isLocalNetworkUrl=e.J,exports.isLocatorDenied=e.F,exports.isLocatorInvalid=e.j,exports.isLocatorUnsupported=e.D,exports.isPermissionDenied=e.n,exports.isTerminalError=e.N,exports.isType=e.ft,exports.modifyRequestHeadersPermission=e.L,exports.permissions=e.r,exports.promptInstall=t.i,exports.readCookiePermission=e.V,exports.readExtensionHandshake=e.tt,exports.removeRequestHeaderRule=e.R,exports.revive=e.pt,exports.setMissingExtensionHandler=e.nt,exports.setRequestHeaderRule=e.z,exports.supportsOperation=e.ct,exports.type=e.mt,exports.waitForExtensionExposure=e.rt;
package/extension.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as SelectorPart, A as gotoPermission, B as handleRevivableModules, C as FrameWindowRefusal, D as WindowFrame, E as Locator, F as PermissionRequest, G as createVideoElementHandle, H as RemoteVideoElement, I as permissions, J as type, K as isType, L as CATEGORIES, M as CategoryRequest, N as LegacyPermissionRequest, O as attachFramePermission, P as PermissionGrant, Q as OperationRequest, R as CategoryMeta, S as FrameWindowOptions, T as GotoOptions, U as VideoElementState, V as BoxedVideoElement, W as box, X as Gate, Y as Executor, Z as GateTools, _ as FrameEventMap, a as AttachCookies, b as FramePostMessageOptions, c as BlankPage, d as CookieMatchWire, f as Frame, g as FrameEventListener, h as FrameDocumentEvent, i as AddScriptTagOptions, j as CategoryGrant, k as createFrame, l as ClearCookiesOptions, m as FrameBackendEvent, n as attachFrame, o as AttachFrameOptions, p as FrameBackend, q as revive, s as AttachWindowOptions, t as ATTACH_FRAME_EVENT_KEY, u as ClearCookiesWire, v as FrameLocator, w as FrameWindowRefusedError, x as FrameWindowBlockedError, y as FrameMessageEvent, z as PermissionCategory } from "./index-BtFiGoVQ.js";
2
- import { A as readCookiePermission, B as FORGEABLE_HEADERS, C as RequestHeaderRule, D as CookieDetails, E as setRequestHeaderRule, F as fetchCredentialedPermission, G as LOCATOR_ERROR, H as assertOneCookieIdentity, I as fetchLocalPermission, J as TimeoutError, K as LOCATOR_INVALID, L as fetchPermission, M as ProxyFetchRequest, N as assertFetchableUrl, O as SiteCookie, P as fetch, Q as isTerminalError, R as isBlockedFetchUrl, S as HeaderOperation, T as removeRequestHeaderRule, U as hasForgedCookie, V as assertForgeableHeaders, W as LOCATOR_DENIED, X as isLocatorInvalid, Y as isLocatorDenied, Z as isLocatorUnsupported, _ as PermissionDeniedError, a as extension, b as assertLockdownApplicable, c as setMissingExtensionHandler, d as ExtensionHandshake, f as ExtensionOperationUnsupportedError, g as PERMISSION_DENIED, h as supportsOperation, i as promptInstall, j as FetchInit, k as cookies, l as waitForExtensionExposure, m as REQUIRED_EXTENSION_ABI, o as isExtensionExposed, p as ExtensionOutdatedError, q as LOCATOR_UNSUPPORTED, r as isExtensionAvailable, s as readExtensionHandshake, u as EXTENSION_ABI, v as isPermissionDenied, w as modifyRequestHeadersPermission, x as isBlockedFrameUrl, y as assertAttachableFrameUrl, z as isLocalNetworkUrl } from "./extension-yhwDSIiD.js";
3
- export { ATTACH_FRAME_EVENT_KEY, AddScriptTagOptions, AttachCookies, AttachFrameOptions, AttachWindowOptions, BlankPage, BoxedVideoElement, CATEGORIES, CategoryGrant, type CategoryMeta, CategoryRequest, ClearCookiesOptions, ClearCookiesWire, CookieDetails, CookieMatchWire, EXTENSION_ABI, type Executor, type ExtensionHandshake, ExtensionOperationUnsupportedError, ExtensionOutdatedError, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, FrameBackendEvent, FrameDocumentEvent, FrameEventListener, FrameEventMap, FrameLocator, FrameMessageEvent, FramePostMessageOptions, FrameWindowBlockedError, FrameWindowOptions, FrameWindowRefusal, FrameWindowRefusedError, type Gate, type GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_INVALID, LOCATOR_UNSUPPORTED, LegacyPermissionRequest, Locator, type OperationRequest, PERMISSION_DENIED, type PermissionCategory, type PermissionDeniedError, PermissionGrant, PermissionRequest, ProxyFetchRequest, REQUIRED_EXTENSION_ABI, RemoteVideoElement, RequestHeaderRule, type SelectorPart, SiteCookie, TimeoutError, VideoElementState, WindowFrame, assertAttachableFrameUrl, assertFetchableUrl, assertForgeableHeaders, assertLockdownApplicable, assertOneCookieIdentity, attachFrame, attachFramePermission, isExtensionAvailable as available, box, cookies, createFrame, createVideoElementHandle, extension as events, extension, fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, gotoPermission, handleRevivableModules, hasForgedCookie, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorInvalid, isLocatorUnsupported, isPermissionDenied, isTerminalError, isType, modifyRequestHeadersPermission, permissions, promptInstall, readCookiePermission, readExtensionHandshake, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, supportsOperation, type, waitForExtensionExposure };
1
+ import { $ as GateTools, A as attachFramePermission, B as CategoryMeta, C as FrameWindowRefusal, D as StorageState, E as Locator, F as LegacyPermissionRequest, G as VideoElementState, H as handleRevivableModules, I as PermissionGrant, J as isType, K as box, L as PermissionRequest, M as gotoPermission, N as CategoryGrant, O as StorageStateCookie, P as CategoryRequest, Q as Gate, R as permissions, S as FrameWindowOptions, T as GotoOptions, U as BoxedVideoElement, V as PermissionCategory, W as RemoteVideoElement, X as type, Y as revive, Z as Executor, _ as FrameEventMap, a as AttachCookies, b as FramePostMessageOptions, c as BlankPage, d as CookieMatchWire, et as OperationRequest, f as Frame, g as FrameEventListener, h as FrameDocumentEvent, i as AddScriptTagOptions, j as createFrame, k as WindowFrame, l as ClearCookiesOptions, m as FrameBackendEvent, n as attachFrame, o as AttachFrameOptions, p as FrameBackend, q as createVideoElementHandle, s as AttachWindowOptions, t as ATTACH_FRAME_EVENT_KEY, tt as SelectorPart, u as ClearCookiesWire, v as FrameLocator, w as FrameWindowRefusedError, x as FrameWindowBlockedError, y as FrameMessageEvent, z as CATEGORIES } from "./index-BOInGaEl.js";
2
+ import { $ as isLocatorInvalid, A as CookieDetails, B as fetchPermission, C as assertLockdownApplicable, D as modifyRequestHeadersPermission, E as RequestHeaderRule, F as ProxyFetchRequest, G as assertOneCookieIdentity, H as isLocalNetworkUrl, I as assertFetchableUrl, J as LOCATOR_ERROR, K as hasForgedCookie, L as fetch, M as cookies, N as readCookiePermission, O as removeRequestHeaderRule, P as FetchInit, Q as isLocatorDenied, R as fetchCredentialedPermission, S as assertAttachableFrameUrl, T as HeaderOperation, U as FORGEABLE_HEADERS, V as isBlockedFetchUrl, W as assertForgeableHeaders, X as LOCATOR_UNSUPPORTED, Y as LOCATOR_INVALID, Z as TimeoutError, _ as BackgroundStoppedError, a as extension, b as PermissionDeniedError, c as setMissingExtensionHandler, d as ExtensionHandshake, et as isLocatorUnsupported, f as ExtensionOperationUnsupportedError, g as BACKGROUND_STOPPED, h as supportsOperation, i as promptInstall, j as SiteCookie, k as setRequestHeaderRule, l as waitForExtensionExposure, m as REQUIRED_EXTENSION_ABI, o as isExtensionExposed, p as ExtensionOutdatedError, q as LOCATOR_DENIED, r as isExtensionAvailable, s as readExtensionHandshake, tt as isTerminalError, u as EXTENSION_ABI, v as isBackgroundStopped, w as isBlockedFrameUrl, x as isPermissionDenied, y as PERMISSION_DENIED, z as fetchLocalPermission } from "./extension-BlEtNAYc.js";
3
+ export { ATTACH_FRAME_EVENT_KEY, AddScriptTagOptions, AttachCookies, AttachFrameOptions, AttachWindowOptions, BACKGROUND_STOPPED, type BackgroundStoppedError, BlankPage, BoxedVideoElement, CATEGORIES, CategoryGrant, type CategoryMeta, CategoryRequest, ClearCookiesOptions, ClearCookiesWire, CookieDetails, CookieMatchWire, EXTENSION_ABI, type Executor, type ExtensionHandshake, ExtensionOperationUnsupportedError, ExtensionOutdatedError, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, FrameBackendEvent, FrameDocumentEvent, FrameEventListener, FrameEventMap, FrameLocator, FrameMessageEvent, FramePostMessageOptions, FrameWindowBlockedError, FrameWindowOptions, FrameWindowRefusal, FrameWindowRefusedError, type Gate, type GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_INVALID, LOCATOR_UNSUPPORTED, LegacyPermissionRequest, Locator, type OperationRequest, PERMISSION_DENIED, type PermissionCategory, type PermissionDeniedError, PermissionGrant, PermissionRequest, ProxyFetchRequest, REQUIRED_EXTENSION_ABI, RemoteVideoElement, RequestHeaderRule, type SelectorPart, SiteCookie, StorageState, StorageStateCookie, TimeoutError, VideoElementState, WindowFrame, assertAttachableFrameUrl, assertFetchableUrl, assertForgeableHeaders, assertLockdownApplicable, assertOneCookieIdentity, attachFrame, attachFramePermission, isExtensionAvailable as available, box, cookies, createFrame, createVideoElementHandle, extension as events, extension, fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, gotoPermission, handleRevivableModules, hasForgedCookie, isBackgroundStopped, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorInvalid, isLocatorUnsupported, isPermissionDenied, isTerminalError, isType, modifyRequestHeadersPermission, permissions, promptInstall, readCookiePermission, readExtensionHandshake, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, supportsOperation, type, waitForExtensionExposure };
package/extension.js CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as e, A as t, B as n, C as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, Q as g, R as _, S as v, T as y, U as b, V as x, W as S, X as C, Y as w, Z as T, _ as ee, a as E, at as D, b as O, ct as k, dt as A, et as j, ft as M, g as N, h as P, i as F, it as I, lt as L, n as R, nt as z, ot as B, pt as V, q as H, r as U, rt as W, st as G, t as K, tt as q, ut as J, v as Y, w as X, x as Z, y as Q, z as $ } from "./lib-DppqX10G.js";
2
- import { i as te, r as ne } from "./extension-BOBuYwZc.js";
3
- export { F as ATTACH_FRAME_EVENT_KEY, r as CATEGORIES, W as EXTENSION_ABI, I as ExtensionOperationUnsupportedError, D as ExtensionOutdatedError, l as FORGEABLE_HEADERS, P as FrameWindowBlockedError, N as FrameWindowRefusedError, m as LOCATOR_DENIED, p as LOCATOR_ERROR, a as LOCATOR_INVALID, y as LOCATOR_UNSUPPORTED, K as PERMISSION_DENIED, B as REQUIRED_EXTENSION_ABI, X as TimeoutError, O as assertAttachableFrameUrl, x as assertFetchableUrl, w as assertForgeableHeaders, Z as assertLockdownApplicable, C as assertOneCookieIdentity, E as attachFrame, ee as attachFramePermission, ne as available, L as box, $ as cookies, Y as createFrame, J as createVideoElementHandle, g as events, g as extension, s as fetch, b as fetchCredentialedPermission, S as fetchLocalPermission, o as fetchPermission, Q as gotoPermission, k as handleRevivableModules, T as hasForgedCookie, u as isBlockedFetchUrl, v as isBlockedFrameUrl, e as isExtensionExposed, H as isLocalNetworkUrl, h as isLocatorDenied, t as isLocatorInvalid, i as isLocatorUnsupported, R as isPermissionDenied, f as isTerminalError, A as isType, c as modifyRequestHeadersPermission, U as permissions, te as promptInstall, n as readCookiePermission, j as readExtensionHandshake, d as removeRequestHeaderRule, M as revive, q as setMissingExtensionHandler, _ as setRequestHeaderRule, G as supportsOperation, V as type, z as waitForExtensionExposure };
1
+ import { $ as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, N as f, P as p, Q as m, R as h, S as g, T as _, U as v, V as y, W as b, X as x, Y as S, Z as C, _ as w, a as T, at as E, b as D, ct as O, dt as k, et as A, ft as j, g as M, i as N, it as P, j as F, k as I, lt as L, mt as R, n as z, nt as B, ot as V, pt as H, q as U, r as W, rt as G, st as K, t as q, tt as J, ut as Y, v as X, w as Z, x as Q, y as $, z as ee } from "./lib-C3UwxjVs.js";
2
+ import { a as te, i as ne, o as re, r as ie } from "./extension-CzZn0bY2.js";
3
+ export { N as ATTACH_FRAME_EVENT_KEY, te as BACKGROUND_STOPPED, Z as CATEGORIES, P as EXTENSION_ABI, E as ExtensionOperationUnsupportedError, V as ExtensionOutdatedError, S as FORGEABLE_HEADERS, M as FrameWindowBlockedError, w as FrameWindowRefusedError, I as LOCATOR_DENIED, p as LOCATOR_ERROR, c as LOCATOR_INVALID, i as LOCATOR_UNSUPPORTED, q as PERMISSION_DENIED, K as REQUIRED_EXTENSION_ABI, _ as TimeoutError, Q as assertAttachableFrameUrl, s as assertFetchableUrl, x as assertForgeableHeaders, g as assertLockdownApplicable, C as assertOneCookieIdentity, T as attachFrame, X as attachFramePermission, ie as available, Y as box, t as cookies, $ as createFrame, k as createVideoElementHandle, e as events, e as extension, v as fetch, b as fetchCredentialedPermission, o as fetchLocalPermission, u as fetchPermission, D as gotoPermission, L as handleRevivableModules, m as hasForgedCookie, re as isBackgroundStopped, U as isBlockedFetchUrl, n as isBlockedFrameUrl, A as isExtensionExposed, l as isLocalNetworkUrl, a as isLocatorDenied, F as isLocatorInvalid, r as isLocatorUnsupported, z as isPermissionDenied, f as isTerminalError, j as isType, d as modifyRequestHeadersPermission, W as permissions, ne as promptInstall, y as readCookiePermission, J as readExtensionHandshake, h as removeRequestHeaderRule, H as revive, B as setMissingExtensionHandler, ee as setRequestHeaderRule, O as supportsOperation, R as type, G as waitForExtensionExposure };
package/fs/promises.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as WriteData, i as Stats, n as MakeOptions, o as WriteOptions, r as ReadOptions } from "../index-BQgZVQl7.js";
2
- import { v as promises } from "../index-D2lvaQDs.js";
2
+ import { v as promises } from "../index-DKr9L2RI.js";
3
3
  //#region src/fs/promises.d.ts
4
4
  export declare const readFile: (path: import("node:fs").PathLike, options?: ReadOptions) => Promise<Buffer | string>, writeFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>, appendFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>, unlink: (path: import("node:fs").PathLike) => Promise<void>, rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => Promise<void>, readdir: (path: import("node:fs").PathLike) => Promise<string[]>, mkdir: (path: import("node:fs").PathLike, options?: MakeOptions) => Promise<void>, rm: (path: import("node:fs").PathLike, options?: {
5
5
  recursive?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { a as WriteData, i as Stats, n as MakeOptions, o as WriteOptions, r as ReadOptions, t as Callback } from "./index-BQgZVQl7.js";
2
- import { _ as unlock, a as StorageAccountChangedError, c as StorageNotFoundError, f as encryption, g as storage_d_exports, h as quota, i as SealedRead, l as StorageQuota, m as isNotFound, n as EncryptionStatus, o as StorageAccountPinUnsupportedError, p as isAccountChanged, r as FileEntry, s as StorageLockedError, t as CloudAvailability, u as availability } from "./storage-BVr2Rb-d.js";
3
- import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED, u as STORAGE_NOT_FOUND } from "./messages-CRcziTuC.js";
2
+ import { _ as unlock, a as StorageAccountChangedError, c as StorageNotFoundError, f as encryption, g as storage_d_exports, h as quota, i as SealedRead, l as StorageQuota, m as isNotFound, n as EncryptionStatus, o as StorageAccountPinUnsupportedError, p as isAccountChanged, r as FileEntry, s as StorageLockedError, t as CloudAvailability, u as availability } from "./storage-BLBsmkmp.js";
3
+ import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED, u as STORAGE_NOT_FOUND } from "./messages-d7pvCXPn.js";
4
4
  declare namespace fs_d_exports {
5
5
  export { CloudAvailability, EncryptionStatus, FileEntry, STORAGE_ACCOUNT_CHANGED, STORAGE_ACCOUNT_PIN_UNSUPPORTED, STORAGE_NOT_FOUND, SealedRead, Stats, StorageAccountChangedError, StorageAccountPinUnsupportedError, StorageLockedError, StorageNotFoundError, StorageQuota, availability, available, encryption, isAccountChanged, isNotFound, list, mkdir, promises, quota, readFile, readFileSealed, readdir, rename, rm, stat, unlink, unlock, writeFile };
6
6
  }
package/fs.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { i as Stats } from "./index-BQgZVQl7.js";
2
- import { a as StorageAccountChangedError, i as SealedRead, o as StorageAccountPinUnsupportedError, p as isAccountChanged } from "./storage-BVr2Rb-d.js";
3
- import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED } from "./messages-CRcziTuC.js";
4
- import { A as rmSync, B as ConflictResolver, C as readdir, D as renameSync, E as rename, F as unlinkSync, H as FileConflict, I as writeFile, L as writeFileSync, M as stat, N as statSync, O as replicating, P as unlink, R as AdoptSummary, S as readFileSync, T as remount, V as ConflictSide, _ as pendingDeletes, a as appendFileSync, b as readFile, c as existsSync, d as lstatSync, f as mkdir, g as pending, h as onConflict, i as appendFile, j as rmdirSync, k as rm, l as flush, m as mount, n as adopt, o as available, p as mkdirSync, r as adoptable, s as exists, t as _default, v as promises, w as readdirSync, x as readFileSealed, y as pull, z as ConflictResolution } from "./index-D2lvaQDs.js";
2
+ import { a as StorageAccountChangedError, i as SealedRead, o as StorageAccountPinUnsupportedError, p as isAccountChanged } from "./storage-BLBsmkmp.js";
3
+ import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED } from "./messages-d7pvCXPn.js";
4
+ import { A as rmSync, B as ConflictResolver, C as readdir, D as renameSync, E as rename, F as unlinkSync, H as FileConflict, I as writeFile, L as writeFileSync, M as stat, N as statSync, O as replicating, P as unlink, R as AdoptSummary, S as readFileSync, T as remount, V as ConflictSide, _ as pendingDeletes, a as appendFileSync, b as readFile, c as existsSync, d as lstatSync, f as mkdir, g as pending, h as onConflict, i as appendFile, j as rmdirSync, k as rm, l as flush, m as mount, n as adopt, o as available, p as mkdirSync, r as adoptable, s as exists, t as _default, v as promises, w as readdirSync, x as readFileSealed, y as pull, z as ConflictResolution } from "./index-DKr9L2RI.js";
5
5
  export { type AdoptSummary, type ConflictResolution, type ConflictResolver, type ConflictSide, type FileConflict, STORAGE_ACCOUNT_CHANGED, STORAGE_ACCOUNT_PIN_UNSUPPORTED, type SealedRead, type Stats, StorageAccountChangedError, StorageAccountPinUnsupportedError, adopt, adoptable, appendFile, appendFileSync, available, _default as default, exists, existsSync, flush, isAccountChanged, lstatSync, mkdir, mkdirSync, mount, onConflict, pending, pendingDeletes, promises, pull, readFile, readFileSealed, readFileSync, readdir, readdirSync, remount, rename, renameSync, replicating, rm, rmSync, rmdirSync, stat, statSync, unlink, unlinkSync, writeFile, writeFileSync };
package/http.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as Socket, t as Server$1 } from "./net-DcLF-6E-.js";
1
+ import { n as Socket, t as Server$1 } from "./net-CmMZgV2a.js";
2
2
  import { Buffer } from "buffer";
3
3
  import { Stream } from "stream";
4
4
  import { IncomingHttpHeaders, OutgoingHttpHeaders, RequestOptions } from "http";
@@ -24,35 +24,24 @@ type SelectorModule = {
24
24
  type OperationModule = {
25
25
  resolve: (context: LocatorContext, ...args: any[]) => unknown;
26
26
  /**
27
- * Pins the operation to one chain kind, opting it out of the executor's cross-kind fallback.
28
- *
29
- * That fallback is deliberate and load bearing in the frame-to-element direction:
30
- * `frameLocator('#f').click()` resolves to kind `frame`, the frame kind has no `click`, and the
31
- * element `click` then runs against the child's `documentElement`. It is also bidirectional, so
32
- * without this an operation registered only on the `frame` kind is silently reachable from an
33
- * element chain too.
34
- *
35
- * For most operations that is a convenience. For one whose whole meaning is WHICH REALM it runs
36
- * in, it is a silent identity confusion: `locator('#x').fetch()` would run in the document that
37
- * CONTAINS `#x` while reading as though it ran in `#x`. Pin those, so the wrong spelling is
38
- * refused by name instead of quietly doing something else.
27
+ * Pins the operation to one chain kind, opting it out of the executor's cross-kind fallback. That
28
+ * fallback is load bearing (`frameLocator('#f').click()` runs the element `click` against the
29
+ * child's `documentElement`) and bidirectional, so pin an operation whose meaning is which realm it
30
+ * runs in: unpinned, `locator('#x').fetch()` would run in the document containing `#x`.
39
31
  */
40
32
  kind?: ChainKind;
41
33
  /**
42
- * The argument list a gate sees when `ensure(operation, options)` asks about this operation.
43
- *
44
- * Without it the gate gets `[options]`, which is right for an operation whose options are its first
45
- * argument. An operation that takes them later must say where, or a gate keyed on an argument
46
- * settles a different key at `ensure` than the real call does: `fetch(url, init)` reads the method
47
- * from `args[1]`, so it declares `options => [undefined, options]`.
34
+ * The argument list a gate sees when `ensure(operation, options)` asks about this operation, so a
35
+ * gate keyed on an argument settles the same key at `ensure` as the real call. Defaults to
36
+ * `[options]`; `fetch(url, init)` reads the method from `args[1]`, so it declares
37
+ * `options => [undefined, options]`.
48
38
  */
49
39
  ensureArgs?: (options: Record<string, unknown>) => unknown[];
50
40
  /**
51
- * Maps the arguments a caller passes to the ones the wire carries, on the calling side, before the
52
- * gate and the executor see them, and gives the chain method its parameter types. It lets a public
53
- * option take a new name while every backend keeps reading the old one, since a backend resolves
54
- * options by its own copy. Throw to refuse a call before anything is gated or sent. Absent, the
55
- * arguments travel verbatim.
41
+ * Maps the caller's arguments to the ones the wire carries, before the gate and the executor see
42
+ * them, and gives the chain method its parameter types, so a public option can take a new name while
43
+ * every backend keeps reading the old one. Throw to refuse a call before anything is gated or sent.
44
+ * Absent, the arguments travel verbatim.
56
45
  */
57
46
  send?: (...args: any[]) => unknown[];
58
47
  /**
@@ -72,10 +61,9 @@ type Modules = {
72
61
  };
73
62
  /**
74
63
  * A chain method answered on the calling side by rewriting the parts collected so far into parts every
75
- * executor already resolves, rather than by appending a part of its own name. An executor resolves
76
- * selector names by its own copy of the registry and refuses one it lacks, so a member added this way
77
- * reaches an older executor with a meaning it already has. `to` is the kind of chain it returns.
78
- * Throw to refuse a chain the rewrite cannot express. The executor never sees it.
64
+ * executor already resolves, so it reaches an older executor (which refuses a selector name it lacks)
65
+ * with a meaning it already has. `to` is the kind of chain it returns. Throw to refuse a chain the
66
+ * rewrite cannot express. The executor never sees it.
79
67
  */
80
68
  type ChainRewrite = {
81
69
  to: ChainKind;
@@ -122,16 +110,13 @@ type AddStyleTagOptions$1 = OperationOptions & {
122
110
  //#endregion
123
111
  //#region ../frame-locator/lib/fetch.d.ts
124
112
  /**
125
- * A request issued from the realm the chain LANDS in, so the browser supplies that document's own
126
- * identity: its cookie jar (partitioned, on the extension path), its `Origin`, its `Referer` and its
127
- * `Sec-Fetch-*`. Nothing here synthesizes any of those, which is the point: a synthesized initiator is
128
- * exactly the degraded shape a CSRF-protected private API refuses.
113
+ * A request issued from the realm the chain lands in, so the browser supplies that document's own
114
+ * cookie jar (partitioned, on the extension path), `Origin`, `Referer` and `Sec-Fetch-*`. Nothing here
115
+ * synthesizes them: a private API declines a request whose initiator was synthesized.
129
116
  *
130
- * This module is the MECHANISM only. It carries no allowlist and no consent, because frame-locator has
131
- * no idea what an app is. The consumer gates it: in the FKN extension that is `LOCATOR_PERMISSIONS`,
132
- * whose `satisfies Record<LocatorOperation, OperationPermission>` makes registering this operation
133
- * without a permission a type error, plus an authoritative origin check in the content-script resolver.
134
- * Do not add a "convenience" path that skips the consumer's gate.
117
+ * This is the mechanism only, with no allowlist and no consent. The consumer gates it (in the FKN
118
+ * extension, `LOCATOR_PERMISSIONS` plus an origin check in the content-script resolver), so do not add
119
+ * a path that skips the consumer's gate.
135
120
  */
136
121
  type FrameFetchInit = OperationOptions & {
137
122
  method?: string;
@@ -144,16 +129,12 @@ type FrameFetchInit = OperationOptions & {
144
129
  */
145
130
  credentials?: RequestCredentials;
146
131
  };
147
- /**
148
- * Deliberately NOT a `Response`. It crosses at least one RPC boundary, and a `Response` rebuilt on the
149
- * far side with `new Response()` would be a different object with different headers anyway, so the
150
- * shape says plainly what actually survives.
151
- */
132
+ /** Not a `Response`: it crosses at least one RPC boundary, so the shape states what survives. */
152
133
  type FrameFetchResult = {
153
134
  status: number;
154
135
  statusText: string;
155
136
  ok: boolean;
156
- /** Where the response came from AFTER redirects, which is the only honest answer to "who replied". */
137
+ /** Where the response came from after redirects. */
157
138
  url: string;
158
139
  redirected: boolean;
159
140
  type: ResponseType;
@@ -364,11 +345,7 @@ type ToOf<M> = M extends {
364
345
  } ? K : 'element';
365
346
  type KindRewrites<R, K extends ChainKind> = K extends keyof R ? (R[K] extends Record<string, ChainRewrite> ? R[K] : {}) : {};
366
347
  type ChainOf<M extends Modules, K extends ChainKind, R extends Rewrites> = K extends 'frame' ? FrameLocator$1<M, R> : Locator$1<M, R>;
367
- /**
368
- * What `ensure` may carry. An option no gate reads is accepted and ignored rather than refused:
369
- * `subtree` is the one apps still pass, and the scope it once narrowed is now decided per site by
370
- * the gate, so passing it changes nothing.
371
- */
348
+ /** What `ensure` may carry. An option no gate reads, `subtree` included, is accepted and ignored rather than refused. */
372
349
  type EnsureOptions = OperationOptions & Record<string, unknown>;
373
350
  type Chain<M extends Modules, K extends ChainKind, R extends Rewrites = {}> = { [N in Exclude<keyof M[K]['selectors'], keyof KindRewrites<R, K>>]: (...args: ArgsOf<M[K]['selectors'][N]>) => ChainOf<M, ToOf<M[K]['selectors'][N]>, R>; } & { [N in keyof M[K]['operations'] as M[K]['operations'][N] extends {
374
351
  typed: false;
@@ -724,17 +701,17 @@ type LocatorRewrites = typeof locatorRewrites;
724
701
  type PermissionCategory = 'interaction' | 'storage' | 'network' | 'evaluation';
725
702
  /**
726
703
  * What a category row says. `heading` is the name the popup, dashboard and activity log print;
727
- * `summary` is the owner's one-line account of the category. The row copy is a template over
728
- * `site`, the host the row consults (or its "first and N more" form), with a cloud variant for the
729
- * cloud card: `cloudTitle` is the one short line the card shows, `cloudDescription` the line it
730
- * draws under it where hovering cannot be counted on, and its tooltip everywhere else.
704
+ * `summary` is a one-line account of the category. The row copy is a template over `site` (the host
705
+ * the row consults, or its "first and N more" form). On the cloud card `cloudTitle` is its one short
706
+ * line and `cloudDescription` the line under it where hovering cannot be counted on, its tooltip
707
+ * everywhere else.
731
708
  */
732
709
  type CategoryMeta = {
733
710
  id: PermissionCategory;
734
711
  heading: string;
735
712
  summary: string;
736
713
  title: (site: string) => string;
737
- /** `signedIn` is false when the attach's wire carried `syncCookies: false`, which only a library that predates `cookies` sends; `cookies: 'native'` sends true */
714
+ /** `signedIn` is false only when the attach carried `syncCookies: false`, which only a library that predates `cookies` sends */
738
715
  description: (site: string, signedIn: boolean) => string;
739
716
  cloudTitle: (site: string) => string;
740
717
  cloudDescription: (site: string) => string;
@@ -1134,9 +1111,8 @@ type Frame = Omit<FrameLocator, 'owner'> & {
1134
1111
  /**
1135
1112
  * Which backend serves this attachment, fixed for its life. The same call can draw a card on one
1136
1113
  * backend and not the other, and spends a different identity on each, so an app must be able to
1137
- * tell. A method, as Playwright's scalar facts are (`frame.url()`, `frame.name()`,
1138
- * `page.isClosed()`). Undefined only for a Frame an app built itself with `createFrame` from a
1139
- * backend that names none.
1114
+ * tell. Undefined only for a Frame an app built itself with `createFrame` from a backend that
1115
+ * names none.
1140
1116
  */
1141
1117
  backend(): 'cloud' | 'extension' | undefined;
1142
1118
  /**
@@ -1376,8 +1352,9 @@ type Frame = Omit<FrameLocator, 'owner'> & {
1376
1352
  * installed, so `frame.backend()` answers `'cloud'`. Its requests leave through WebVPN, which
1377
1353
  * keeps the cookies their answers set.
1378
1354
  * - `'ephemeral'`: a fresh jar of the attachment's own, with site storage under a namespace of its
1379
- * own, both gone with it. Always the cloud backend: the browser keeps a partition's cookies after
1380
- * its frame goes, so no extension jar ends with the attachment. Its requests leave through WebVPN.
1355
+ * own, both gone with it, seeded from `storageState` when one is given. Always the cloud backend:
1356
+ * the browser keeps a partition's cookies after its frame goes, so no extension jar ends with the
1357
+ * attachment. Its requests leave through WebVPN.
1381
1358
  * - `'native'`: the person's own browser cookies for `domains` and every goto's host, copied into
1382
1359
  * the browser's partition for the app's top-level site on the attach and on every goto. Extension
1383
1360
  * backend only, so `frame.backend()` answers `'extension'`. Without the extension the top-level
@@ -1390,7 +1367,13 @@ type Frame = Omit<FrameLocator, 'owner'> & {
1390
1367
  * the extension; false is cookies: 'ephemeral'`
1391
1368
  * - an unknown value: TypeError `attachFrame: cookies must be 'persistent', 'ephemeral' or
1392
1369
  * 'native', not "<value>"`
1393
- * - any `storageState` key: TypeError `attachFrame: storageState is not available yet`
1370
+ * - a `storageState` beside anything but `'ephemeral'`, the default included: TypeError
1371
+ * `attachFrame: storageState seeds a fresh jar, so it needs cookies: 'ephemeral'`
1372
+ * - a malformed `storageState`: TypeError `attachFrame: storageState.<path> <what is wrong>`, for
1373
+ * the first field of another shape in the order the state lists them (`StorageState`)
1374
+ * - a cookie whose `expires` is above 0 and below 100000000000: TypeError `attachFrame:
1375
+ * storageState.cookies[<i>].expires is milliseconds since the epoch, and <value> reads as a date
1376
+ * before 1974; a Playwright storageState gives seconds, so multiply it by 1000`
1394
1377
  * - then the shape of the attachment: `iframe` and `window` at once, and `lockdown` or `blank` with
1395
1378
  * a window, each a TypeError
1396
1379
  * - `lockdown` with anything but `'native'`: TypeError `attachFrame: lockdown runs on the
@@ -1407,11 +1390,64 @@ type Frame = Omit<FrameLocator, 'owner'> & {
1407
1390
  * fallback
1408
1391
  */
1409
1392
  type AttachCookies = 'persistent' | 'ephemeral' | 'native';
1393
+ /**
1394
+ * A jar's starting state, in the shape Playwright's `browser.newContext({ storageState })` takes,
1395
+ * except that a cookie's `expires` is milliseconds here where Playwright's is seconds. Seeded into
1396
+ * an `'ephemeral'` attachment's fresh jar and its storage namespace before the attachment's first
1397
+ * document is requested, so that request already carries its cookies and the page's first script
1398
+ * already reads its localStorage. With `blank`, whose empty page requests nothing and runs no code,
1399
+ * it is seeded right after that page is in place, before the attach resolves.
1400
+ *
1401
+ * Accepted only with `cookies: 'ephemeral'`: with `'persistent'` an app-written cookie would land
1402
+ * in the jar every app of the top-level site shares, and with `'native'` in the person's own
1403
+ * session. The seed travels on FKN's own channels, never in a url the app page could read. A
1404
+ * seeded HttpOnly cookie is sent to its site and never readable in the page, as any HttpOnly cookie,
1405
+ * and it never comes back to app code.
1406
+ *
1407
+ * Refused by name, before anything is attached (`AttachCookies` has the order): a field of another
1408
+ * shape; a name or value with `;` or a control character, or a name with `=`; a cookie a browser
1409
+ * does not store (SameSite=None or `__Secure-` without `secure`, `__Host-` without `secure`, a
1410
+ * host-only domain and path '/'); an origin that is not an absolute http or https origin; and an
1411
+ * `expires` that reads as seconds. Against an FKN page or render proxy that predates it, after the
1412
+ * iframe is put back on about:blank (or the window closed) and before anything is requested from
1413
+ * the site: the terminal `LocatorUnsupportedError` `attachFrame: this FKN page predates
1414
+ * storageState; reload the app to load the current one`.
1415
+ */
1416
+ type StorageState = {
1417
+ cookies?: StorageStateCookie[];
1418
+ /** Each origin's localStorage items, read by every page of that origin in the attachment. */
1419
+ origins?: {
1420
+ origin: string;
1421
+ localStorage: {
1422
+ name: string;
1423
+ value: string;
1424
+ }[];
1425
+ }[];
1426
+ };
1427
+ /** One cookie of a `StorageState`. */
1428
+ type StorageStateCookie = {
1429
+ /** Non-empty, with no `=`, `;` or control character. */
1430
+ name: string;
1431
+ /** With no `;` or control character. */
1432
+ value: string;
1433
+ /** `.youtube.com` for a cookie its subdomains also receive, `www.youtube.com` for a host-only one, as Playwright writes it. */
1434
+ domain: string;
1435
+ /** `/` when absent. */
1436
+ path?: string;
1437
+ /** Milliseconds since the epoch, where Playwright's is seconds; -1 or absent for a session cookie. */
1438
+ expires?: number;
1439
+ httpOnly?: boolean;
1440
+ secure?: boolean;
1441
+ /** `'Lax'` when absent, as a browser defaults it. */
1442
+ sameSite?: 'Strict' | 'Lax' | 'None';
1443
+ };
1410
1444
  type AttachFrameOptions = {
1411
1445
  iframe: HTMLIFrameElement;
1412
1446
  domains?: string[];
1413
1447
  /** Which jar, and with it which backend: `'persistent'` when absent. See `AttachCookies`. */
1414
1448
  cookies?: AttachCookies;
1449
+ /** Seeds an `'ephemeral'` jar before the attachment's first document; with any other value a TypeError. See `StorageState`. */
1450
+ storageState?: StorageState;
1415
1451
  /**
1416
1452
  * Replace the embedded site's CSP with a lockdown policy: the frame cannot fetch, connect, or load
1417
1453
  * any resource. Extension backend only, so it takes `cookies: 'native'`; beside any other value it
@@ -1514,11 +1550,16 @@ type AttachWindowOptions = {
1514
1550
  * The window's jar, with an iframe's values (`AttachCookies`). `'persistent'`, the default: the
1515
1551
  * jar of the app that opened it, the same as that app's inline frames; a window whose app is on
1516
1552
  * another site shares cookies only with those frames, and its site storage stays its own.
1517
- * `'ephemeral'`: a jar of the window's own that ends with it. Both run on the cloud backend
1518
- * whatever is installed. `'native'` is refused by name: a window runs on the cloud render proxy,
1519
- * and no backend serves a window on the browser's own cookies yet.
1553
+ * `'ephemeral'`: a jar of the window's own that ends with it, seeded from `storageState`. Both
1554
+ * run on the cloud backend whatever is installed. `'native'` is refused by name: a window runs on
1555
+ * the cloud render proxy, and no backend serves a window on the browser's own cookies yet.
1520
1556
  */
1521
1557
  cookies?: AttachCookies;
1558
+ /**
1559
+ * As for an iframe: only with `'ephemeral'`. The window opens at once, with the click's
1560
+ * activation, and goes to `window.url` once the seed is in place.
1561
+ */
1562
+ storageState?: StorageState;
1522
1563
  /** Whole categories asked for once the window has connected, drawn in the window on the cloud backend. */
1523
1564
  permissions?: CategoryRequest[];
1524
1565
  };
@@ -1640,4 +1681,4 @@ declare const ATTACH_FRAME_EVENT_KEY = "FKN_WEB_EXTENSION_ATTACH_FRAME_EVENT_KEY
1640
1681
  */
1641
1682
  declare const attachFrame: AttachFrameFunction;
1642
1683
  //#endregion
1643
- export { SelectorPart as $, gotoPermission as A, handleRevivableModules as B, FrameWindowRefusal as C, WindowFrame as D, Locator as E, PermissionRequest as F, createVideoElementHandle as G, RemoteVideoElement as H, permissions as I, type as J, isType as K, CATEGORIES as L, CategoryRequest as M, LegacyPermissionRequest as N, attachFramePermission as O, PermissionGrant as P, OperationRequest as Q, CategoryMeta as R, FrameWindowOptions as S, GotoOptions as T, VideoElementState as U, BoxedVideoElement as V, box as W, Gate as X, Executor as Y, GateTools as Z, FrameEventMap as _, AttachCookies as a, FramePostMessageOptions as b, BlankPage as c, CookieMatchWire as d, Frame as f, FrameEventListener as g, FrameDocumentEvent as h, AddScriptTagOptions as i, CategoryGrant as j, createFrame as k, ClearCookiesOptions as l, FrameBackendEvent as m, attachFrame as n, AttachFrameOptions as o, FrameBackend as p, revive as q, AttachFrameFunction as r, AttachWindowOptions as s, ATTACH_FRAME_EVENT_KEY as t, ClearCookiesWire as u, FrameLocator as v, FrameWindowRefusedError as w, FrameWindowBlockedError as x, FrameMessageEvent as y, PermissionCategory as z };
1684
+ export { GateTools as $, attachFramePermission as A, CategoryMeta as B, FrameWindowRefusal as C, StorageState as D, Locator as E, LegacyPermissionRequest as F, VideoElementState as G, handleRevivableModules as H, PermissionGrant as I, isType as J, box as K, PermissionRequest as L, gotoPermission as M, CategoryGrant as N, StorageStateCookie as O, CategoryRequest as P, Gate as Q, permissions as R, FrameWindowOptions as S, GotoOptions as T, BoxedVideoElement as U, PermissionCategory as V, RemoteVideoElement as W, type as X, revive as Y, Executor as Z, FrameEventMap as _, AttachCookies as a, FramePostMessageOptions as b, BlankPage as c, CookieMatchWire as d, OperationRequest as et, Frame as f, FrameEventListener as g, FrameDocumentEvent as h, AddScriptTagOptions as i, createFrame as j, WindowFrame as k, ClearCookiesOptions as l, FrameBackendEvent as m, attachFrame as n, AttachFrameOptions as o, FrameBackend as p, createVideoElementHandle as q, AttachFrameFunction as r, AttachWindowOptions as s, ATTACH_FRAME_EVENT_KEY as t, SelectorPart as tt, ClearCookiesWire as u, FrameLocator as v, FrameWindowRefusedError as w, FrameWindowBlockedError as x, FrameMessageEvent as y, CATEGORIES as z };
@@ -1,6 +1,6 @@
1
1
  import { a as WriteData, i as Stats, n as MakeOptions, o as WriteOptions, r as ReadOptions, t as Callback } from "./index-BQgZVQl7.js";
2
- import { a as StorageAccountChangedError, b as PinOptions, d as captureAccount$1, g as storage_d_exports, i as SealedRead, o as StorageAccountPinUnsupportedError, p as isAccountChanged, v as FileEntry, x as WriteData$1, y as FileSystem } from "./storage-BVr2Rb-d.js";
3
- import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED } from "./messages-CRcziTuC.js";
2
+ import { a as StorageAccountChangedError, b as PinOptions, d as captureAccount$1, g as storage_d_exports, i as SealedRead, o as StorageAccountPinUnsupportedError, p as isAccountChanged, v as FileEntry, x as WriteData$1, y as FileSystem } from "./storage-BLBsmkmp.js";
3
+ import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED } from "./messages-d7pvCXPn.js";
4
4
  declare namespace hybrid_d_exports {
5
5
  export { AdoptSummary, ConflictResolution, ConflictResolver, ConflictSide, FileConflict, FileEntry, FileSystem, WriteData$1 as WriteData, adopt$1 as adopt, adoptable$1 as adoptable, available$1 as available, captureAccount, list, onConflict$1 as onConflict, pending$1 as pending, pendingDeletes$1 as pendingDeletes, pull$1 as pull, readFile$1 as readFile, readFileSealed$1 as readFileSealed, remove, replicating$1 as replicating, writeFile$1 as writeFile };
6
6
  }
@@ -46,15 +46,10 @@ type FileConflict = {
46
46
  * What should be at that path. Return one side's bytes, or anything else as a merge; null leaves the
47
47
  * file alone and the summary reports it unresolved.
48
48
  *
49
- * There is no vocabulary to learn: whatever comes back is what wins. Returning the very Blob that
50
- * `readLocal()` or `readCloud()` handed you is recognised by identity, so picking a side costs one
51
- * write rather than two.
52
- *
53
- * That identity is sound only because the resolver runs in THIS realm: the reads are memoized here,
54
- * so the object the app holds is the object compared. A value that crosses osra arrives as a
55
- * different object with equal content, in both directions, which `tests/osra-identity.browser.test.ts`
56
- * pins against a real channel. So a resolver whose answer ever crossed a realm would simply read as a
57
- * merge: one redundant write, never a wrong file.
49
+ * Whatever comes back is what wins. Returning the very Blob that `readLocal()` or `readCloud()`
50
+ * handed you is recognised by identity, so picking a side costs one write rather than two. An answer
51
+ * that crossed a realm (osra) arrives as a different object, so it reads as a merge: one redundant
52
+ * write, never a wrong file.
58
53
  */
59
54
  type ConflictResolution = WriteData$1 | null;
60
55
  type ConflictResolver = (conflict: FileConflict) => Promise<ConflictResolution> | ConflictResolution;
package/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-CfdmsLoI.cjs"),n=require("./api--LOXTOpv.cjs"),r=require("./busy-Dv8wzE5M.cjs"),i=require("./cloud-868OlBKn.cjs"),a=require("./dns.cjs"),o=require("./net.cjs"),s=require("./dgram.cjs"),c=require("./http.cjs"),l=require("./extension-hoUs5yJ7.cjs"),u=require("./desktop.cjs"),d=require("./fs-p0bOOj5n.cjs"),f=require("./opfs.cjs"),p=require("./packages.cjs"),m=require("./rooms.cjs"),h=require("./account.cjs"),g=require("./connect-button-BpXDs7tw.cjs");let _=require("osra");var v=1e4,y=150,b=()=>new Promise(e=>{if(t.$())return e(!0);let n,r=setTimeout(()=>i(t.$()),v),i=t=>{clearTimeout(n),clearTimeout(r),o.disconnect(),document.removeEventListener(`readystatechange`,s),e(t)},a=()=>{clearTimeout(n),n=setTimeout(()=>i(t.$()),y)},o=new MutationObserver(()=>{t.$()&&i(!0)}),s=()=>{document.readyState===`complete`&&!t.$()&&a()};o.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-fkn-extension`]}),document.addEventListener(`readystatechange`,s),document.readyState===`complete`&&a()}),x=(async e=>{let{kind:n,cookies:r}=t.o(e);if(n===`window`){let n=e;return r===`native`?t.a(n):i.i(n)}let a=e;return r===`native`?S(a):i.i(a)}),S=async e=>(i.a(e),await b(),t.a(e)),C=`https://fkn.app`,w=async(e,t)=>{if(typeof window>`u`)throw Error(`FKN @fkn/lib: relayWorker must be called from the main thread`);let i=await n.f;if(!i)throw Error(`FKN @fkn/lib: relayWorker found no FKN transport in this realm`);n.d();let a=r.t(`relayed worker`);t?.unregisterSignal?.aborted?a():t?.unregisterSignal?.addEventListener(`abort`,a,{once:!0});let o=i.emit instanceof MessagePort?{}:{originA:t?.originA??C,originB:t?.originB??`*`};(0,_.relay)(i,e,{key:`fkn-api`,...o,unregisterSignal:t?.unregisterSignal})},T=async()=>typeof window>`u`?!1:(await n.o).connect.prompt(location.origin).catch(()=>!1),E=async()=>typeof window>`u`?null:(await n.o).relay.prompt().catch(()=>null),D=new Set,O=e=>(D.add(e),()=>{D.delete(e)}),k=()=>{if(D.size===0)return!1;for(let e of[...D])try{e()}catch{}return!0},A=(e,t)=>{if(typeof e?.onUpdateTaken==`function`)return Promise.resolve(e.onUpdateTaken(t))},j=e.t({applyUpdate:()=>W,busyReasons:()=>U,onUpdate:()=>R,onUpdateTaken:()=>z,updateReady:()=>M}),M=async()=>typeof window>`u`?!1:n.o.then(e=>e.shell?.updateReady()).then(e=>e===!0).catch(()=>!1),N=new Set,P=!1,F=()=>{P=!0;for(let e of[...N])try{e()}catch{}},I=0,L=()=>{let e=n.c();e&&N.size!==0&&I!==e.epoch&&(I=e.epoch,P=!1,Promise.resolve(e.remote.shell?.onUpdate(F)).catch(()=>{I===e.epoch&&(I=0)}))};typeof window<`u`&&n.u(L);var R=async e=>{if(typeof window>`u`)return()=>{};if(N.add(e),P)try{e()}catch{}return L(),()=>{N.delete(e)}},z=e=>typeof window>`u`?()=>{}:O(e),B=0,V=!1,H=()=>{if(!k()&&!V){V=!0;try{location.reload()}catch{}}};typeof window<`u`&&n.u(()=>{let e=n.c();if(!e||B===e.epoch)return;B=e.epoch;let t=A(e.remote.shell,H);if(!t){B=0;return}t.catch(()=>{B===e.epoch&&(B=0)})});var U=()=>r.n(),W=async()=>typeof window>`u`?!1:n.o.then(e=>e.shell?.applyUpdate()).then(e=>e===!0).catch(()=>!1);exports.ATTACH_FRAME_EVENT_KEY=t.i,exports.CATEGORIES=t.C,exports.EXTENSION_ABI=t.rt,exports.ExtensionOperationUnsupportedError=t.it,exports.ExtensionOutdatedError=t.at,exports.FORGEABLE_HEADERS=t.J,exports.FrameWindowBlockedError=t.h,exports.FrameWindowRefusedError=t.g,exports.LOCATOR_DENIED=t.O,exports.LOCATOR_ERROR=t.N,exports.LOCATOR_INVALID=t.F,exports.LOCATOR_UNSUPPORTED=t.T,exports.PERMISSION_DENIED=t.t,exports.REQUIRED_EXTENSION_ABI=t.ot,exports.TimeoutError=t.w,Object.defineProperty(exports,"account",{enumerable:!0,get:function(){return h.t}}),exports.assertAttachableFrameUrl=t.b,exports.assertFetchableUrl=t.V,exports.assertForgeableHeaders=t.Y,exports.assertLockdownApplicable=t.x,exports.assertOneCookieIdentity=t.X,exports.attachFrame=x,exports.attachFramePermission=t._,exports.box=t.lt,Object.defineProperty(exports,"cloud",{enumerable:!0,get:function(){return i.n}}),exports.connect=T,exports.connectButtonUrl=g.t,exports.cookies=t.z,exports.createFrame=t.v,exports.createVideoElementHandle=t.ut,Object.defineProperty(exports,"desktop",{enumerable:!0,get:function(){return u.t}}),Object.defineProperty(exports,"dgram",{enumerable:!0,get:function(){return s.t}}),Object.defineProperty(exports,"dns",{enumerable:!0,get:function(){return a.t}}),Object.defineProperty(exports,"extension",{enumerable:!0,get:function(){return l.t}}),exports.fetch=l.n,exports.fetchCredentialedPermission=t.U,exports.fetchLocalPermission=t.W,exports.fetchPermission=t.G,Object.defineProperty(exports,"fs",{enumerable:!0,get:function(){return d.u}}),exports.gotoPermission=t.y,exports.handleRevivableModules=t.ct,exports.hasForgedCookie=t.Z,Object.defineProperty(exports,"http",{enumerable:!0,get:function(){return c.t}}),exports.isBlockedFetchUrl=t.K,exports.isBlockedFrameUrl=t.S,exports.isExtensionExposed=t.$,exports.isLocalNetworkUrl=t.q,exports.isLocatorDenied=t.P,exports.isLocatorInvalid=t.A,exports.isLocatorUnsupported=t.E,exports.isPermissionDenied=t.n,exports.isTerminalError=t.M,exports.isType=t.dt,exports.modifyRequestHeadersPermission=t.I,Object.defineProperty(exports,"net",{enumerable:!0,get:function(){return o.t}}),Object.defineProperty(exports,"opfs",{enumerable:!0,get:function(){return f.t}}),Object.defineProperty(exports,"packages",{enumerable:!0,get:function(){return p.t}}),exports.permissions=t.r,exports.promptInstall=l.i,exports.promptRelay=E,exports.readCookiePermission=t.B,exports.readExtensionHandshake=t.et,exports.relayWorker=w,exports.removeRequestHeaderRule=t.L,exports.revive=t.ft,Object.defineProperty(exports,"rooms",{enumerable:!0,get:function(){return m.t}}),exports.setMissingExtensionHandler=t.tt,exports.setRequestHeaderRule=t.R,Object.defineProperty(exports,"shell",{enumerable:!0,get:function(){return j}}),exports.supportsOperation=t.st,exports.type=t.pt,exports.waitForExtensionExposure=t.nt;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-fqQfEPk6.cjs"),n=require("./extension-DvFf7uoG.cjs"),r=require("./api--LOXTOpv.cjs"),i=require("./busy-Dv8wzE5M.cjs"),a=require("./cloud-Bx64HSkQ.cjs"),o=require("./dns.cjs"),s=require("./net.cjs"),c=require("./dgram.cjs"),l=require("./http.cjs"),u=require("./desktop.cjs"),d=require("./fs-p0bOOj5n.cjs"),f=require("./opfs.cjs"),p=require("./packages.cjs"),m=require("./rooms.cjs"),h=require("./account.cjs"),g=require("./connect-button-BpXDs7tw.cjs");let _=require("osra");var v=1e4,y=150,b=()=>new Promise(e=>{if(t.et())return e(!0);let n,r=setTimeout(()=>i(t.et()),v),i=t=>{clearTimeout(n),clearTimeout(r),o.disconnect(),document.removeEventListener(`readystatechange`,s),e(t)},a=()=>{clearTimeout(n),n=setTimeout(()=>i(t.et()),y)},o=new MutationObserver(()=>{t.et()&&i(!0)}),s=()=>{document.readyState===`complete`&&!t.et()&&a()};o.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-fkn-extension`]}),document.addEventListener(`readystatechange`,s),document.readyState===`complete`&&a()}),x=(async e=>{let{kind:n,cookies:r}=t.o(e);if(n===`window`){let n=e;return r===`native`?t.a(n):a.i(n)}let i=e;return r===`native`?S(i):a.i(i)}),S=async e=>(a.a(e),await b(),t.a(e)),C=`https://fkn.app`,w=async(e,t)=>{if(typeof window>`u`)throw Error(`FKN @fkn/lib: relayWorker must be called from the main thread`);let n=await r.f;if(!n)throw Error(`FKN @fkn/lib: relayWorker found no FKN transport in this realm`);r.d();let a=i.t(`relayed worker`);t?.unregisterSignal?.aborted?a():t?.unregisterSignal?.addEventListener(`abort`,a,{once:!0});let o=n.emit instanceof MessagePort?{}:{originA:t?.originA??C,originB:t?.originB??`*`};(0,_.relay)(n,e,{key:`fkn-api`,...o,unregisterSignal:t?.unregisterSignal})},T=async()=>typeof window>`u`?!1:(await r.o).connect.prompt(location.origin).catch(()=>!1),E=async()=>typeof window>`u`?null:(await r.o).relay.prompt().catch(()=>null),D=new Set,O=e=>(D.add(e),()=>{D.delete(e)}),k=()=>{if(D.size===0)return!1;for(let e of[...D])try{e()}catch{}return!0},A=(e,t)=>{if(typeof e?.onUpdateTaken==`function`)return Promise.resolve(e.onUpdateTaken(t))},j=e.t({applyUpdate:()=>W,busyReasons:()=>U,onUpdate:()=>R,onUpdateTaken:()=>z,updateReady:()=>M}),M=async()=>typeof window>`u`?!1:r.o.then(e=>e.shell?.updateReady()).then(e=>e===!0).catch(()=>!1),N=new Set,P=!1,F=()=>{P=!0;for(let e of[...N])try{e()}catch{}},I=0,L=()=>{let e=r.c();e&&N.size!==0&&I!==e.epoch&&(I=e.epoch,P=!1,Promise.resolve(e.remote.shell?.onUpdate(F)).catch(()=>{I===e.epoch&&(I=0)}))};typeof window<`u`&&r.u(L);var R=async e=>{if(typeof window>`u`)return()=>{};if(N.add(e),P)try{e()}catch{}return L(),()=>{N.delete(e)}},z=e=>typeof window>`u`?()=>{}:O(e),B=0,V=!1,H=()=>{if(!k()&&!V){V=!0;try{location.reload()}catch{}}};typeof window<`u`&&r.u(()=>{let e=r.c();if(!e||B===e.epoch)return;B=e.epoch;let t=A(e.remote.shell,H);if(!t){B=0;return}t.catch(()=>{B===e.epoch&&(B=0)})});var U=()=>i.n(),W=async()=>typeof window>`u`?!1:r.o.then(e=>e.shell?.applyUpdate()).then(e=>e===!0).catch(()=>!1);exports.ATTACH_FRAME_EVENT_KEY=t.i,exports.BACKGROUND_STOPPED=n.a,exports.CATEGORIES=t.w,exports.EXTENSION_ABI=t.it,exports.ExtensionOperationUnsupportedError=t.at,exports.ExtensionOutdatedError=t.ot,exports.FORGEABLE_HEADERS=t.Y,exports.FrameWindowBlockedError=t.g,exports.FrameWindowRefusedError=t._,exports.LOCATOR_DENIED=t.k,exports.LOCATOR_ERROR=t.P,exports.LOCATOR_INVALID=t.I,exports.LOCATOR_UNSUPPORTED=t.E,exports.PERMISSION_DENIED=t.t,exports.REQUIRED_EXTENSION_ABI=t.st,exports.TimeoutError=t.T,Object.defineProperty(exports,"account",{enumerable:!0,get:function(){return h.t}}),exports.assertAttachableFrameUrl=t.x,exports.assertFetchableUrl=t.H,exports.assertForgeableHeaders=t.X,exports.assertLockdownApplicable=t.S,exports.assertOneCookieIdentity=t.Z,exports.attachFrame=x,exports.attachFramePermission=t.v,exports.box=t.ut,Object.defineProperty(exports,"cloud",{enumerable:!0,get:function(){return a.n}}),exports.connect=T,exports.connectButtonUrl=g.t,exports.cookies=t.B,exports.createFrame=t.y,exports.createVideoElementHandle=t.dt,Object.defineProperty(exports,"desktop",{enumerable:!0,get:function(){return u.t}}),Object.defineProperty(exports,"dgram",{enumerable:!0,get:function(){return c.t}}),Object.defineProperty(exports,"dns",{enumerable:!0,get:function(){return o.t}}),Object.defineProperty(exports,"extension",{enumerable:!0,get:function(){return n.t}}),exports.fetch=n.n,exports.fetchCredentialedPermission=t.W,exports.fetchLocalPermission=t.G,exports.fetchPermission=t.K,Object.defineProperty(exports,"fs",{enumerable:!0,get:function(){return d.u}}),exports.gotoPermission=t.b,exports.handleRevivableModules=t.lt,exports.hasForgedCookie=t.Q,Object.defineProperty(exports,"http",{enumerable:!0,get:function(){return l.t}}),exports.isBackgroundStopped=n.o,exports.isBlockedFetchUrl=t.q,exports.isBlockedFrameUrl=t.C,exports.isExtensionExposed=t.et,exports.isLocalNetworkUrl=t.J,exports.isLocatorDenied=t.F,exports.isLocatorInvalid=t.j,exports.isLocatorUnsupported=t.D,exports.isPermissionDenied=t.n,exports.isTerminalError=t.N,exports.isType=t.ft,exports.modifyRequestHeadersPermission=t.L,Object.defineProperty(exports,"net",{enumerable:!0,get:function(){return s.t}}),Object.defineProperty(exports,"opfs",{enumerable:!0,get:function(){return f.t}}),Object.defineProperty(exports,"packages",{enumerable:!0,get:function(){return p.t}}),exports.permissions=t.r,exports.promptInstall=n.i,exports.promptRelay=E,exports.readCookiePermission=t.V,exports.readExtensionHandshake=t.tt,exports.relayWorker=w,exports.removeRequestHeaderRule=t.R,exports.revive=t.pt,Object.defineProperty(exports,"rooms",{enumerable:!0,get:function(){return m.t}}),exports.setMissingExtensionHandler=t.nt,exports.setRequestHeaderRule=t.z,Object.defineProperty(exports,"shell",{enumerable:!0,get:function(){return j}}),exports.supportsOperation=t.ct,exports.type=t.mt,exports.waitForExtensionExposure=t.rt;
package/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { t as account_d_exports } from "./account.js";
2
- import { $ as SelectorPart, A as gotoPermission, B as handleRevivableModules, C as FrameWindowRefusal, D as WindowFrame, E as Locator, F as PermissionRequest, G as createVideoElementHandle, H as RemoteVideoElement, I as permissions, J as type, K as isType, L as CATEGORIES, M as CategoryRequest, N as LegacyPermissionRequest, O as attachFramePermission, P as PermissionGrant, Q as OperationRequest, R as CategoryMeta, S as FrameWindowOptions, T as GotoOptions, U as VideoElementState, V as BoxedVideoElement, W as box, X as Gate, Y as Executor, Z as GateTools, _ as FrameEventMap, a as AttachCookies, b as FramePostMessageOptions, c as BlankPage, d as CookieMatchWire, f as Frame, g as FrameEventListener, h as FrameDocumentEvent, i as AddScriptTagOptions, j as CategoryGrant, k as createFrame, l as ClearCookiesOptions, m as FrameBackendEvent, o as AttachFrameOptions, p as FrameBackend, q as revive, r as AttachFrameFunction, s as AttachWindowOptions, t as ATTACH_FRAME_EVENT_KEY, u as ClearCookiesWire, v as FrameLocator, w as FrameWindowRefusedError, x as FrameWindowBlockedError, y as FrameMessageEvent, z as PermissionCategory } from "./index-BtFiGoVQ.js";
3
- import { A as readCookiePermission, B as FORGEABLE_HEADERS, C as RequestHeaderRule, D as CookieDetails, E as setRequestHeaderRule, F as fetchCredentialedPermission, G as LOCATOR_ERROR, H as assertOneCookieIdentity, I as fetchLocalPermission, J as TimeoutError, K as LOCATOR_INVALID, L as fetchPermission, M as ProxyFetchRequest, N as assertFetchableUrl, O as SiteCookie, Q as isTerminalError, R as isBlockedFetchUrl, S as HeaderOperation, T as removeRequestHeaderRule, U as hasForgedCookie, V as assertForgeableHeaders, W as LOCATOR_DENIED, X as isLocatorInvalid, Y as isLocatorDenied, Z as isLocatorUnsupported, _ as PermissionDeniedError, b as assertLockdownApplicable, c as setMissingExtensionHandler, d as ExtensionHandshake, f as ExtensionOperationUnsupportedError, g as PERMISSION_DENIED, h as supportsOperation, i as promptInstall, j as FetchInit, k as cookies, l as waitForExtensionExposure, m as REQUIRED_EXTENSION_ABI, n as fetch, o as isExtensionExposed, p as ExtensionOutdatedError, q as LOCATOR_UNSUPPORTED, s as readExtensionHandshake, t as extension_d_exports, u as EXTENSION_ABI, v as isPermissionDenied, w as modifyRequestHeadersPermission, x as isBlockedFrameUrl, y as assertAttachableFrameUrl, z as isLocalNetworkUrl } from "./extension-yhwDSIiD.js";
4
- import { n as cloud_d_exports } from "./cloud-DUH-v10C.js";
2
+ import { $ as GateTools, A as attachFramePermission, B as CategoryMeta, C as FrameWindowRefusal, D as StorageState, E as Locator, F as LegacyPermissionRequest, G as VideoElementState, H as handleRevivableModules, I as PermissionGrant, J as isType, K as box, L as PermissionRequest, M as gotoPermission, N as CategoryGrant, O as StorageStateCookie, P as CategoryRequest, Q as Gate, R as permissions, S as FrameWindowOptions, T as GotoOptions, U as BoxedVideoElement, V as PermissionCategory, W as RemoteVideoElement, X as type, Y as revive, Z as Executor, _ as FrameEventMap, a as AttachCookies, b as FramePostMessageOptions, c as BlankPage, d as CookieMatchWire, et as OperationRequest, f as Frame, g as FrameEventListener, h as FrameDocumentEvent, i as AddScriptTagOptions, j as createFrame, k as WindowFrame, l as ClearCookiesOptions, m as FrameBackendEvent, o as AttachFrameOptions, p as FrameBackend, q as createVideoElementHandle, r as AttachFrameFunction, s as AttachWindowOptions, t as ATTACH_FRAME_EVENT_KEY, tt as SelectorPart, u as ClearCookiesWire, v as FrameLocator, w as FrameWindowRefusedError, x as FrameWindowBlockedError, y as FrameMessageEvent, z as CATEGORIES } from "./index-BOInGaEl.js";
3
+ import { $ as isLocatorInvalid, A as CookieDetails, B as fetchPermission, C as assertLockdownApplicable, D as modifyRequestHeadersPermission, E as RequestHeaderRule, F as ProxyFetchRequest, G as assertOneCookieIdentity, H as isLocalNetworkUrl, I as assertFetchableUrl, J as LOCATOR_ERROR, K as hasForgedCookie, M as cookies, N as readCookiePermission, O as removeRequestHeaderRule, P as FetchInit, Q as isLocatorDenied, R as fetchCredentialedPermission, S as assertAttachableFrameUrl, T as HeaderOperation, U as FORGEABLE_HEADERS, V as isBlockedFetchUrl, W as assertForgeableHeaders, X as LOCATOR_UNSUPPORTED, Y as LOCATOR_INVALID, Z as TimeoutError, _ as BackgroundStoppedError, b as PermissionDeniedError, c as setMissingExtensionHandler, d as ExtensionHandshake, et as isLocatorUnsupported, f as ExtensionOperationUnsupportedError, g as BACKGROUND_STOPPED, h as supportsOperation, i as promptInstall, j as SiteCookie, k as setRequestHeaderRule, l as waitForExtensionExposure, m as REQUIRED_EXTENSION_ABI, n as fetch, o as isExtensionExposed, p as ExtensionOutdatedError, q as LOCATOR_DENIED, s as readExtensionHandshake, t as extension_d_exports, tt as isTerminalError, u as EXTENSION_ABI, v as isBackgroundStopped, w as isBlockedFrameUrl, x as isPermissionDenied, y as PERMISSION_DENIED, z as fetchLocalPermission } from "./extension-BlEtNAYc.js";
4
+ import { n as cloud_d_exports } from "./cloud-DyOQPyUB.js";
5
5
  import { t as dns_d_exports } from "./dns.js";
6
- import { s as net_d_exports } from "./net-DcLF-6E-.js";
6
+ import { s as net_d_exports } from "./net-CmMZgV2a.js";
7
7
  import { t as dgram_d_exports } from "./dgram.js";
8
8
  import { t as http_d_exports } from "./http.js";
9
9
  import { t as desktop_d_exports } from "./desktop.js";
10
- import { u as index_d_exports } from "./index-D2lvaQDs.js";
10
+ import { u as index_d_exports } from "./index-DKr9L2RI.js";
11
11
  import { t as index_d_exports$1 } from "./opfs.js";
12
12
  import { t as packages_d_exports } from "./packages.js";
13
13
  import { t as rooms_d_exports } from "./rooms.js";
@@ -31,6 +31,18 @@ import { t as connectButtonUrl } from "./connect-button-Cp0NS95-.js";
31
31
  export declare const attachFrame: AttachFrameFunction;
32
32
  //#endregion
33
33
  //#region src/relay.d.ts
34
+ /**
35
+ * Bridges a worker into the FKN API: once called, the worker can import `@fkn/lib` and use `net` /
36
+ * `dgram` exactly like the main thread. Main thread only.
37
+ *
38
+ * `originA` (default `WEB_ORIGIN`) is the `targetOrigin` for posts to the iframe, `originB` (default
39
+ * `'*'`) the one for posts to the worker, which enforces none. Pass `WEB_ORIGIN` for both only when
40
+ * relaying between two windows on the FKN origin.
41
+ *
42
+ * The page hands its `fkn-api` channel to the worker for good, and its own calls move to
43
+ * `fkn-api-window`. Against a cached FKN page from before that channel, the page's own calls refuse
44
+ * with `OwnChannelUnavailableError` and FKN's UI and account changes stay off here until a reload.
45
+ */
34
46
  export declare const relayWorker: (worker: Worker, options?: {
35
47
  unregisterSignal?: AbortSignal;
36
48
  originA?: string;
@@ -47,31 +59,20 @@ declare namespace shell_d_exports {
47
59
  }
48
60
  /**
49
61
  * The FKN shell's update surface, for apps that want a say in when the platform frame reloads.
62
+ * Nothing here fires on its own schedule. Two moments:
50
63
  *
51
- * Nothing here ever fires on its own schedule. Two moments, and the difference between them is the
52
- * whole design:
64
+ * - **READY**, `onUpdate` / `updateReady`: a newer shell is downloaded and nothing has happened. The
65
+ * broker offers it in its own header and `applyUpdate` lets the app offer it too. It is never taken
66
+ * without a person asking, since only the app knows what a reload costs right now. The one
67
+ * exception: a broker frame that finds a newer shell while loading, before answering this page and
68
+ * with no other fkn.app window open, reloads itself first, so nothing of the app is interrupted.
69
+ * - **TAKEN**, `onUpdateTaken`: someone pressed update, here or in another tab, and the new shell
70
+ * controls every page on the origin. Each page now runs a new worker against an old-build document,
71
+ * so the lib RELOADS THE PAGE by default; an app that cannot be interrupted registers a handler.
53
72
  *
54
- * - **READY**, `onUpdate` / `updateReady`. A newer shell has been downloaded behind the page and
55
- * nothing has happened. The broker offers it in its own header, and `applyUpdate` is the app's
56
- * way to offer it too. It is never taken without a person asking, because only the app knows what
57
- * a reload costs right now, and a torrent mid-download is the case that matters. The one exception
58
- * is a broker frame that finds a newer shell as it loads, before it has answered this page at all,
59
- * while no other fkn.app window is open: it reloads its own frame first, so this page's first
60
- * connection is simply to the newer shell and nothing of the app is interrupted.
61
- * - **TAKEN**, `onUpdateTaken`. Someone pressed update, here or in another tab, and the new shell is
62
- * now in control of every page on the origin. That leaves each one running a new worker against a
63
- * document from the old build, so the lib RELOADS THE PAGE by default to end the mix. An app that
64
- * cannot be interrupted registers a handler and decides for itself.
65
- *
66
- * A lib-side driver that took a ready update by ITSELF, on an idle-looking page, shipped in 0.9.20
67
- * to 0.9.22 and was removed. Idleness measured from the app realm cannot see a transfer running in
68
- * a worker, and the cost of being wrong is someone's download. The default reload above is not that
69
- * driver returning: it happens only after a person has pressed update, and only to finish what they
70
- * asked for.
71
- *
72
- * The page's connection to a replaced frame is re-established automatically either way, which is
73
- * what makes the button cheap to press: a call in flight at that moment rejects with a named error
74
- * rather than hanging.
73
+ * The lib never takes a ready update by itself: idleness seen from the app realm cannot see a
74
+ * transfer running in a worker. The page's connection to a replaced frame is re-established
75
+ * automatically, and a call in flight at that moment rejects with a named error rather than hanging.
75
76
  */
76
77
  /** Whether a newer FKN shell is downloaded and ready to apply. */
77
78
  declare const updateReady: () => Promise<boolean>;
@@ -106,17 +107,13 @@ declare const onUpdate: (callback: () => void) => Promise<() => void>;
106
107
  */
107
108
  declare const onUpdateTaken: (handler: () => void) => (() => void);
108
109
  /**
109
- * What a shell reload would sever right now, as a list of human-readable reasons, empty when
110
- * nothing is bound to the broker connection.
111
- *
112
- * This is the evidence for deciding whether to call `applyUpdate` yet: open sockets and listening
113
- * servers, a streaming proxy response, a mounted package, a live frame attachment, unflushed
114
- * write-behind. An empty list is not a promise that a reload is free, only that this realm holds
115
- * nothing the lib knows about, so an app with state of its own should weigh that too.
110
+ * What a shell reload would sever right now, as human-readable reasons, empty when nothing is bound
111
+ * to the broker connection: open sockets and listening servers, a streaming proxy response, a mounted
112
+ * package, a live frame attachment, unflushed write-behind. Empty is not a promise that a reload is
113
+ * free, only that this realm holds nothing the lib knows about.
116
114
  *
117
- * It is per REALM, and that distinction has already caused a wrong reading once. A worker that
118
- * imports `@fkn/lib/net` keeps its own tally, which this function cannot see from the window. An
119
- * app whose transfers live in a worker should ask the worker, not the page.
115
+ * It is per REALM: a worker that imports `@fkn/lib/net` keeps its own tally, which the window cannot
116
+ * see. An app whose transfers live in a worker should ask the worker, not the page.
120
117
  */
121
118
  declare const busyReasons: () => string[];
122
119
  /**
@@ -129,4 +126,4 @@ declare const busyReasons: () => string[];
129
126
  */
130
127
  declare const applyUpdate: () => Promise<boolean>;
131
128
  //#endregion
132
- export { ATTACH_FRAME_EVENT_KEY, AddScriptTagOptions, AttachCookies, AttachFrameOptions, AttachWindowOptions, BlankPage, BoxedVideoElement, CATEGORIES, CategoryGrant, type CategoryMeta, CategoryRequest, ClearCookiesOptions, ClearCookiesWire, CookieDetails, CookieMatchWire, EXTENSION_ABI, type Executor, type ExtensionHandshake, ExtensionOperationUnsupportedError, ExtensionOutdatedError, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, FrameBackendEvent, FrameDocumentEvent, FrameEventListener, FrameEventMap, FrameLocator, FrameMessageEvent, FramePostMessageOptions, FrameWindowBlockedError, FrameWindowOptions, FrameWindowRefusal, FrameWindowRefusedError, type Gate, type GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_INVALID, LOCATOR_UNSUPPORTED, LegacyPermissionRequest, Locator, type OperationRequest, PERMISSION_DENIED, type PermissionCategory, type PermissionDeniedError, PermissionGrant, PermissionRequest, ProxyFetchRequest, REQUIRED_EXTENSION_ABI, RemoteVideoElement, RequestHeaderRule, type SelectorPart, SiteCookie, TimeoutError, VideoElementState, WindowFrame, account_d_exports as account, assertAttachableFrameUrl, assertFetchableUrl, assertForgeableHeaders, assertLockdownApplicable, assertOneCookieIdentity, attachFramePermission, box, cloud_d_exports as cloud, connectButtonUrl, cookies, createFrame, createVideoElementHandle, desktop_d_exports as desktop, dgram_d_exports as dgram, dns_d_exports as dns, extension_d_exports as extension, fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, index_d_exports as fs, gotoPermission, handleRevivableModules, hasForgedCookie, http_d_exports as http, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorInvalid, isLocatorUnsupported, isPermissionDenied, isTerminalError, isType, modifyRequestHeadersPermission, net_d_exports as net, index_d_exports$1 as opfs, packages_d_exports as packages, permissions, promptInstall, readCookiePermission, readExtensionHandshake, removeRequestHeaderRule, revive, rooms_d_exports as rooms, setMissingExtensionHandler, setRequestHeaderRule, shell_d_exports as shell, supportsOperation, type, waitForExtensionExposure };
129
+ export { ATTACH_FRAME_EVENT_KEY, AddScriptTagOptions, AttachCookies, AttachFrameOptions, AttachWindowOptions, BACKGROUND_STOPPED, type BackgroundStoppedError, BlankPage, BoxedVideoElement, CATEGORIES, CategoryGrant, type CategoryMeta, CategoryRequest, ClearCookiesOptions, ClearCookiesWire, CookieDetails, CookieMatchWire, EXTENSION_ABI, type Executor, type ExtensionHandshake, ExtensionOperationUnsupportedError, ExtensionOutdatedError, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, FrameBackendEvent, FrameDocumentEvent, FrameEventListener, FrameEventMap, FrameLocator, FrameMessageEvent, FramePostMessageOptions, FrameWindowBlockedError, FrameWindowOptions, FrameWindowRefusal, FrameWindowRefusedError, type Gate, type GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_INVALID, LOCATOR_UNSUPPORTED, LegacyPermissionRequest, Locator, type OperationRequest, PERMISSION_DENIED, type PermissionCategory, type PermissionDeniedError, PermissionGrant, PermissionRequest, ProxyFetchRequest, REQUIRED_EXTENSION_ABI, RemoteVideoElement, RequestHeaderRule, type SelectorPart, SiteCookie, StorageState, StorageStateCookie, TimeoutError, VideoElementState, WindowFrame, account_d_exports as account, assertAttachableFrameUrl, assertFetchableUrl, assertForgeableHeaders, assertLockdownApplicable, assertOneCookieIdentity, attachFramePermission, box, cloud_d_exports as cloud, connectButtonUrl, cookies, createFrame, createVideoElementHandle, desktop_d_exports as desktop, dgram_d_exports as dgram, dns_d_exports as dns, extension_d_exports as extension, fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, index_d_exports as fs, gotoPermission, handleRevivableModules, hasForgedCookie, http_d_exports as http, isBackgroundStopped, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorInvalid, isLocatorUnsupported, isPermissionDenied, isTerminalError, isType, modifyRequestHeadersPermission, net_d_exports as net, index_d_exports$1 as opfs, packages_d_exports as packages, permissions, promptInstall, readCookiePermission, readExtensionHandshake, removeRequestHeaderRule, revive, rooms_d_exports as rooms, setMissingExtensionHandler, setRequestHeaderRule, shell_d_exports as shell, supportsOperation, type, waitForExtensionExposure };