prismcast 1.12.0 → 1.12.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.
Files changed (293) hide show
  1. package/dist/app.d.ts +41 -0
  2. package/dist/app.d.ts.map +1 -1
  3. package/dist/app.js +156 -69
  4. package/dist/app.js.map +1 -1
  5. package/dist/browser/browserSupervisor.d.ts +30 -1
  6. package/dist/browser/browserSupervisor.d.ts.map +1 -1
  7. package/dist/browser/browserSupervisor.js +39 -12
  8. package/dist/browser/browserSupervisor.js.map +1 -1
  9. package/dist/browser/cdp.d.ts +58 -5
  10. package/dist/browser/cdp.d.ts.map +1 -1
  11. package/dist/browser/cdp.js +146 -9
  12. package/dist/browser/cdp.js.map +1 -1
  13. package/dist/browser/channelSelection.d.ts +2 -2
  14. package/dist/browser/channelSelection.d.ts.map +1 -1
  15. package/dist/browser/channelSelection.js +5 -5
  16. package/dist/browser/channelSelection.js.map +1 -1
  17. package/dist/browser/consent.d.ts +16 -0
  18. package/dist/browser/consent.d.ts.map +1 -1
  19. package/dist/browser/consent.js +67 -15
  20. package/dist/browser/consent.js.map +1 -1
  21. package/dist/browser/hlsPlaylistObserver.js +2 -2
  22. package/dist/browser/hlsPlaylistObserver.js.map +1 -1
  23. package/dist/browser/index.d.ts +212 -48
  24. package/dist/browser/index.d.ts.map +1 -1
  25. package/dist/browser/index.js +612 -199
  26. package/dist/browser/index.js.map +1 -1
  27. package/dist/browser/login.d.ts +4 -4
  28. package/dist/browser/login.d.ts.map +1 -1
  29. package/dist/browser/login.js +19 -19
  30. package/dist/browser/login.js.map +1 -1
  31. package/dist/browser/manifestInterceptor.js +1 -1
  32. package/dist/browser/pageStaleness.d.ts +1 -1
  33. package/dist/browser/pageStaleness.d.ts.map +1 -1
  34. package/dist/browser/pageStaleness.js +9 -9
  35. package/dist/browser/pageStaleness.js.map +1 -1
  36. package/dist/browser/precaching.d.ts +23 -11
  37. package/dist/browser/precaching.d.ts.map +1 -1
  38. package/dist/browser/precaching.js +188 -49
  39. package/dist/browser/precaching.js.map +1 -1
  40. package/dist/browser/tabCapture.d.ts +100 -0
  41. package/dist/browser/tabCapture.d.ts.map +1 -0
  42. package/dist/browser/tabCapture.js +320 -0
  43. package/dist/browser/tabCapture.js.map +1 -0
  44. package/dist/browser/tabSelection.d.ts +117 -0
  45. package/dist/browser/tabSelection.d.ts.map +1 -0
  46. package/dist/browser/tabSelection.js +546 -0
  47. package/dist/browser/tabSelection.js.map +1 -0
  48. package/dist/browser/tuning/comcastPolymer.js +2 -2
  49. package/dist/browser/tuning/comcastPolymer.js.map +1 -1
  50. package/dist/browser/tuning/directv.js +1 -1
  51. package/dist/browser/tuning/directv.js.map +1 -1
  52. package/dist/browser/tuning/hbo.js +2 -2
  53. package/dist/browser/tuning/hbo.js.map +1 -1
  54. package/dist/browser/tuning/hulu.d.ts.map +1 -1
  55. package/dist/browser/tuning/hulu.js +9 -6
  56. package/dist/browser/tuning/hulu.js.map +1 -1
  57. package/dist/browser/tuning/shared.d.ts +1 -1
  58. package/dist/browser/tuning/shared.js +1 -1
  59. package/dist/browser/tuning/youtubeTv.d.ts.map +1 -1
  60. package/dist/browser/tuning/youtubeTv.js +1 -2
  61. package/dist/browser/tuning/youtubeTv.js.map +1 -1
  62. package/dist/browser/video.d.ts +33 -13
  63. package/dist/browser/video.d.ts.map +1 -1
  64. package/dist/browser/video.js +113 -52
  65. package/dist/browser/video.js.map +1 -1
  66. package/dist/browser/windowSync.d.ts +46 -0
  67. package/dist/browser/windowSync.d.ts.map +1 -0
  68. package/dist/browser/windowSync.js +153 -0
  69. package/dist/browser/windowSync.js.map +1 -0
  70. package/dist/channels/index.d.ts +7 -0
  71. package/dist/channels/index.d.ts.map +1 -1
  72. package/dist/channels/index.js +24 -8
  73. package/dist/channels/index.js.map +1 -1
  74. package/dist/config/consistencyProbe.js +1 -1
  75. package/dist/config/consistencyProbe.js.map +1 -1
  76. package/dist/config/health.d.ts.map +1 -1
  77. package/dist/config/health.js +0 -3
  78. package/dist/config/health.js.map +1 -1
  79. package/dist/config/index.d.ts +12 -0
  80. package/dist/config/index.d.ts.map +1 -1
  81. package/dist/config/index.js +77 -31
  82. package/dist/config/index.js.map +1 -1
  83. package/dist/config/paths.d.ts +17 -1
  84. package/dist/config/paths.d.ts.map +1 -1
  85. package/dist/config/paths.js +21 -1
  86. package/dist/config/paths.js.map +1 -1
  87. package/dist/config/persistence.d.ts +8 -3
  88. package/dist/config/persistence.d.ts.map +1 -1
  89. package/dist/config/persistence.js +143 -82
  90. package/dist/config/persistence.js.map +1 -1
  91. package/dist/config/profiles.d.ts.map +1 -1
  92. package/dist/config/profiles.js +2 -3
  93. package/dist/config/profiles.js.map +1 -1
  94. package/dist/config/providerLineups.d.ts.map +1 -1
  95. package/dist/config/providerLineups.js +0 -3
  96. package/dist/config/providerLineups.js.map +1 -1
  97. package/dist/config/services.js +1 -1
  98. package/dist/config/services.js.map +1 -1
  99. package/dist/config/sites.d.ts.map +1 -1
  100. package/dist/config/sites.js +77 -58
  101. package/dist/config/sites.js.map +1 -1
  102. package/dist/config/userChannels.d.ts +0 -1
  103. package/dist/config/userChannels.d.ts.map +1 -1
  104. package/dist/config/userChannels.js +1 -5
  105. package/dist/config/userChannels.js.map +1 -1
  106. package/dist/config/userConfig.d.ts +15 -3
  107. package/dist/config/userConfig.d.ts.map +1 -1
  108. package/dist/config/userConfig.js +119 -25
  109. package/dist/config/userConfig.js.map +1 -1
  110. package/dist/config/userProfiles.d.ts.map +1 -1
  111. package/dist/config/userProfiles.js +10 -11
  112. package/dist/config/userProfiles.js.map +1 -1
  113. package/dist/hdhr/protocol.d.ts +1 -1
  114. package/dist/hdhr/protocol.js +1 -1
  115. package/dist/hdhr/udp.d.ts.map +1 -1
  116. package/dist/hdhr/udp.js +16 -4
  117. package/dist/hdhr/udp.js.map +1 -1
  118. package/dist/index.js +10 -3
  119. package/dist/index.js.map +1 -1
  120. package/dist/native/index.d.ts +1 -1
  121. package/dist/native/index.js +3 -3
  122. package/dist/native/probe.js +1 -1
  123. package/dist/native/proxy.d.ts +1 -1
  124. package/dist/native/proxy.js +5 -5
  125. package/dist/native/proxy.js.map +1 -1
  126. package/dist/routes/cdp.js +1 -1
  127. package/dist/routes/config/channels/endpoints/bulk.js +2 -2
  128. package/dist/routes/config/channels/endpoints/bulk.js.map +1 -1
  129. package/dist/routes/config/channels/endpoints/crud.js +1 -1
  130. package/dist/routes/config/channels/endpoints/crud.js.map +1 -1
  131. package/dist/routes/config/channels/endpoints/tags.js +3 -3
  132. package/dist/routes/config/channels/endpoints/tags.js.map +1 -1
  133. package/dist/routes/config/channels/healthBridge.d.ts +4 -0
  134. package/dist/routes/config/channels/healthBridge.d.ts.map +1 -1
  135. package/dist/routes/config/channels/healthBridge.js +9 -5
  136. package/dist/routes/config/channels/healthBridge.js.map +1 -1
  137. package/dist/routes/config/channels/table.d.ts.map +1 -1
  138. package/dist/routes/config/channels/table.js +64 -133
  139. package/dist/routes/config/channels/table.js.map +1 -1
  140. package/dist/routes/config/http/envelope.d.ts +1 -1
  141. package/dist/routes/config/index.d.ts +5 -4
  142. package/dist/routes/config/index.d.ts.map +1 -1
  143. package/dist/routes/config/index.js +5 -4
  144. package/dist/routes/config/index.js.map +1 -1
  145. package/dist/routes/config/services.d.ts.map +1 -1
  146. package/dist/routes/config/services.js +13 -16
  147. package/dist/routes/config/services.js.map +1 -1
  148. package/dist/routes/config/settings.d.ts +6 -14
  149. package/dist/routes/config/settings.d.ts.map +1 -1
  150. package/dist/routes/config/settings.js +14 -34
  151. package/dist/routes/config/settings.js.map +1 -1
  152. package/dist/routes/debug.js +1 -1
  153. package/dist/routes/debug.js.map +1 -1
  154. package/dist/routes/health.d.ts +15 -6
  155. package/dist/routes/health.d.ts.map +1 -1
  156. package/dist/routes/health.js +22 -10
  157. package/dist/routes/health.js.map +1 -1
  158. package/dist/routes/logs.d.ts.map +1 -1
  159. package/dist/routes/logs.js +50 -12
  160. package/dist/routes/logs.js.map +1 -1
  161. package/dist/routes/root/content.d.ts.map +1 -1
  162. package/dist/routes/root/content.js +32 -11
  163. package/dist/routes/root/content.js.map +1 -1
  164. package/dist/routes/root/index.d.ts +10 -0
  165. package/dist/routes/root/index.d.ts.map +1 -1
  166. package/dist/routes/root/index.js +17 -7
  167. package/dist/routes/root/index.js.map +1 -1
  168. package/dist/routes/root/scripts/channels.d.ts.map +1 -1
  169. package/dist/routes/root/scripts/channels.js +9 -19
  170. package/dist/routes/root/scripts/channels.js.map +1 -1
  171. package/dist/routes/root/scripts/clientEscape.js +1 -1
  172. package/dist/routes/root/scripts/config.js +3 -3
  173. package/dist/routes/root/scripts/config.js.map +1 -1
  174. package/dist/routes/root/scripts/shared.d.ts.map +1 -1
  175. package/dist/routes/root/scripts/shared.js +16 -13
  176. package/dist/routes/root/scripts/shared.js.map +1 -1
  177. package/dist/routes/root/scripts/status.handlers.d.ts +3 -0
  178. package/dist/routes/root/scripts/status.handlers.d.ts.map +1 -1
  179. package/dist/routes/root/scripts/status.handlers.js +49 -24
  180. package/dist/routes/root/scripts/status.handlers.js.map +1 -1
  181. package/dist/routes/root/styles.d.ts.map +1 -1
  182. package/dist/routes/root/styles.js +10 -18
  183. package/dist/routes/root/styles.js.map +1 -1
  184. package/dist/routes/theme.js +3 -3
  185. package/dist/routes/theme.js.map +1 -1
  186. package/dist/routes/ui.js +5 -5
  187. package/dist/routes/ui.js.map +1 -1
  188. package/dist/streaming/captureLock.js +2 -2
  189. package/dist/streaming/captureLock.js.map +1 -1
  190. package/dist/streaming/fmp4Segmenter.d.ts +9 -5
  191. package/dist/streaming/fmp4Segmenter.d.ts.map +1 -1
  192. package/dist/streaming/fmp4Segmenter.js +28 -7
  193. package/dist/streaming/fmp4Segmenter.js.map +1 -1
  194. package/dist/streaming/hls.d.ts +62 -2
  195. package/dist/streaming/hls.d.ts.map +1 -1
  196. package/dist/streaming/hls.js +161 -117
  197. package/dist/streaming/hls.js.map +1 -1
  198. package/dist/streaming/hlsSegments.d.ts +2 -1
  199. package/dist/streaming/hlsSegments.d.ts.map +1 -1
  200. package/dist/streaming/hlsSegments.js +19 -4
  201. package/dist/streaming/hlsSegments.js.map +1 -1
  202. package/dist/streaming/lifecycle.d.ts.map +1 -1
  203. package/dist/streaming/lifecycle.js +25 -7
  204. package/dist/streaming/lifecycle.js.map +1 -1
  205. package/dist/streaming/monitor.d.ts +11 -1
  206. package/dist/streaming/monitor.d.ts.map +1 -1
  207. package/dist/streaming/monitor.js +386 -179
  208. package/dist/streaming/monitor.js.map +1 -1
  209. package/dist/streaming/mpegts.d.ts +11 -0
  210. package/dist/streaming/mpegts.d.ts.map +1 -1
  211. package/dist/streaming/mpegts.js +69 -21
  212. package/dist/streaming/mpegts.js.map +1 -1
  213. package/dist/streaming/preroll.js +3 -3
  214. package/dist/streaming/preroll.js.map +1 -1
  215. package/dist/streaming/recovery.d.ts +90 -4
  216. package/dist/streaming/recovery.d.ts.map +1 -1
  217. package/dist/streaming/recovery.js +86 -11
  218. package/dist/streaming/recovery.js.map +1 -1
  219. package/dist/streaming/registry.d.ts +79 -10
  220. package/dist/streaming/registry.d.ts.map +1 -1
  221. package/dist/streaming/registry.js +73 -2
  222. package/dist/streaming/registry.js.map +1 -1
  223. package/dist/streaming/setup.d.ts +56 -30
  224. package/dist/streaming/setup.d.ts.map +1 -1
  225. package/dist/streaming/setup.js +290 -224
  226. package/dist/streaming/setup.js.map +1 -1
  227. package/dist/streaming/statusEmitter.d.ts +4 -1
  228. package/dist/streaming/statusEmitter.d.ts.map +1 -1
  229. package/dist/streaming/statusEmitter.js +19 -7
  230. package/dist/streaming/statusEmitter.js.map +1 -1
  231. package/dist/types/channels.d.ts.map +1 -1
  232. package/dist/types/channels.js +0 -4
  233. package/dist/types/channels.js.map +1 -1
  234. package/dist/types/index.d.ts +3 -2
  235. package/dist/types/index.d.ts.map +1 -1
  236. package/dist/types/index.js +2 -1
  237. package/dist/types/index.js.map +1 -1
  238. package/dist/types/profiles.d.ts +50 -8
  239. package/dist/types/profiles.d.ts.map +1 -1
  240. package/dist/types/profiles.js +35 -1
  241. package/dist/types/profiles.js.map +1 -1
  242. package/dist/types/streaming.d.ts +8 -0
  243. package/dist/types/streaming.d.ts.map +1 -1
  244. package/dist/types/streaming.js +7 -0
  245. package/dist/types/streaming.js.map +1 -1
  246. package/dist/upgrade/commands.js +1 -1
  247. package/dist/upgrade/commands.js.map +1 -1
  248. package/dist/upgrade/detection.d.ts +1 -1
  249. package/dist/utils/bootSession.context.js +1 -1
  250. package/dist/utils/bootSession.context.js.map +1 -1
  251. package/dist/utils/debugFilter.d.ts.map +1 -1
  252. package/dist/utils/debugFilter.js +5 -3
  253. package/dist/utils/debugFilter.js.map +1 -1
  254. package/dist/utils/delay.d.ts +31 -1
  255. package/dist/utils/delay.d.ts.map +1 -1
  256. package/dist/utils/delay.js +39 -3
  257. package/dist/utils/delay.js.map +1 -1
  258. package/dist/utils/errors.d.ts +0 -10
  259. package/dist/utils/errors.d.ts.map +1 -1
  260. package/dist/utils/errors.js +3 -14
  261. package/dist/utils/errors.js.map +1 -1
  262. package/dist/utils/ffmpeg.d.ts +1 -0
  263. package/dist/utils/ffmpeg.d.ts.map +1 -1
  264. package/dist/utils/ffmpeg.js +2 -1
  265. package/dist/utils/ffmpeg.js.map +1 -1
  266. package/dist/utils/fileLogger.d.ts +23 -5
  267. package/dist/utils/fileLogger.d.ts.map +1 -1
  268. package/dist/utils/fileLogger.js +230 -99
  269. package/dist/utils/fileLogger.js.map +1 -1
  270. package/dist/utils/format.d.ts +24 -1
  271. package/dist/utils/format.d.ts.map +1 -1
  272. package/dist/utils/format.js +37 -1
  273. package/dist/utils/format.js.map +1 -1
  274. package/dist/utils/index.d.ts +1 -0
  275. package/dist/utils/index.d.ts.map +1 -1
  276. package/dist/utils/index.js +1 -0
  277. package/dist/utils/index.js.map +1 -1
  278. package/dist/utils/morganStream.d.ts +2 -2
  279. package/dist/utils/morganStream.d.ts.map +1 -1
  280. package/dist/utils/morganStream.js +6 -8
  281. package/dist/utils/morganStream.js.map +1 -1
  282. package/dist/utils/never.d.ts +9 -0
  283. package/dist/utils/never.d.ts.map +1 -0
  284. package/dist/utils/never.js +20 -0
  285. package/dist/utils/never.js.map +1 -0
  286. package/dist/utils/sanitize.d.ts +8 -0
  287. package/dist/utils/sanitize.d.ts.map +1 -1
  288. package/dist/utils/sanitize.js +19 -0
  289. package/dist/utils/sanitize.js.map +1 -1
  290. package/dist/utils/version.d.ts +9 -4
  291. package/dist/utils/version.d.ts.map +1 -1
  292. package/dist/utils/version.js.map +1 -1
  293. package/package.json +5 -5
@@ -74,21 +74,40 @@ const PHASE_POLICY = {
74
74
  // A static-page capture. The captured pixels ARE the content, so a dismissal click lands in the capture by design. This phase has no abort owner, so the bounded
75
75
  // 30-second load window - long enough for banners to render - is what stops the poll. No embed-gate accept: a static capture never reloads.
76
76
  staticCapture: { cmpReject: true, dismissSelector: true, embedGate: false, window: 30000 },
77
- // A tune's channel-selection walk and click-to-play, before the video wait. The caller aborts this poll at the phase boundary, so the 45-second window is only the
78
- // backstop. It is a deliberately independent consent-layer value, NOT coupled to setup.ts's playback-initialization race - the two may legitimately diverge, the
79
- // abort is the terminator and the window the backstop. No embed-gate accept: the walk phase has no reload to pair with one.
80
- tuneSetup: { cmpReject: true, dismissSelector: true, embedGate: false, window: 45000 },
77
+ // A tune's channel-selection walk and click-to-play, before the video wait. This phase has no clock window: the walk's own waits scale with the video timeout and
78
+ // with each provider's retry loops, so no fixed budget bounds it and no single timeout equals it. The caller's abort ends the poll at the phase boundary, which
79
+ // is the terminator a fixed budget could only ever shadow. No embed-gate accept: the walk phase has no reload to pair with one.
80
+ tuneSetup: { cmpReject: true, dismissSelector: true, embedGate: false, window: "untilAborted" },
81
81
  // The tune's wait for the player to become ready. The only phase whose reload semantics compose with an embed-gate accept, so the only phase that runs the acting
82
82
  // gate probe. The window derives from the profile's videoTimeout at poll start so a late-rendering gate is still caught; the caller's abort stops it the instant
83
83
  // the wait settles.
84
84
  videoWait: { cmpReject: true, dismissSelector: true, embedGate: true, window: "videoTimeout" }
85
85
  };
86
- /* Compile-time pin: the video wait is the only phase whose policy may accept an embed gate. If a policy edit ever flips a second phase's embedGate to true,
87
- * EmbedGatePhase widens past "videoWait", the conditional below collapses to `never`, and the assignment of `true` fails to compile - a build error rather than a
88
- * silent widening of the privacy-sensitive auto-accept surface. The binding is read once at module scope purely so the pin is live code, not a dead type alias.
86
+ /* Compile-time assertion: the video wait is the only phase whose policy may accept an embed gate. If a policy edit ever flips a second phase's embedGate to true,
87
+ * EmbedGatePhase widens past "videoWait", the conditional below collapses to `never`, and the assignment of `true` fails to compile - a build error rather than a silent
88
+ * widening of the privacy-sensitive auto-accept surface. The constant's underscore prefix marks it as intentionally unused: its only job is to be type-checked.
89
89
  */
90
- const embedGatePhaseIsVideoWaitOnly = true;
91
- void embedGatePhaseIsVideoWaitOnly;
90
+ const _embedGatePhaseIsVideoWaitOnly = true;
91
+ /**
92
+ * Resolves a phase policy's window into the millisecond budget the poll's deadline is built from. Kept beside PHASE_POLICY because it is the policy's reader: every
93
+ * window kind the table may declare is decided here, so adding a kind is a table entry and a case rather than a conditional threaded through the poll.
94
+ * @param window - The phase policy's declared window.
95
+ * @param profile - The resolved site profile, which supplies the video-wait budget.
96
+ * @returns The budget in milliseconds, infinite for a phase whose caller's abort is its only terminator.
97
+ */
98
+ function resolveWindow(window, profile) {
99
+ switch (window) {
100
+ case "untilAborted": {
101
+ return Number.POSITIVE_INFINITY;
102
+ }
103
+ case "videoTimeout": {
104
+ return profile.videoTimeout ?? CONFIG.streaming.videoTimeout;
105
+ }
106
+ default: {
107
+ return window;
108
+ }
109
+ }
110
+ }
92
111
  /**
93
112
  * Vendor-keyed registry of known cookie-consent CMPs. This is NOT a per-site whitelist - each entry covers every site that embeds the vendor. Seeded with Didomi,
94
113
  * whose reject selector was verified live (france24); additional vendors (OneTrust, Cookiebot, ...) are added here as their reject selectors are verified. Exported so
@@ -149,7 +168,9 @@ export function locateSelectorCoordinate(sel) {
149
168
  /**
150
169
  * Clicks an element identified by a CSS selector using a real coordinate mouse click, if the element is present and laid out. Coordinate clicking generates the
151
170
  * full pointer event chain, which consent buttons in SPA frameworks require to register (a synthetic element.click() is silently dropped by some, as observed on
152
- * the embed-gate accept button). Returns false when the element is absent or has zero layout size, so callers can keep polling.
171
+ * the embed-gate accept button). A hit test after the settle decides which click dispatches: the pointer chain when the element is what paints at the resolved
172
+ * coordinates, and the in-page synthetic click when another element covers it, so a control beneath a lifted page element is still reached. Returns false when the
173
+ * element is absent, has zero layout size, or is covered and the in-page click finds nothing, so callers can keep polling.
153
174
  * @param page - The Puppeteer page.
154
175
  * @param selector - The CSS selector for the element to click.
155
176
  * @returns True if the element was found and clicked.
@@ -162,6 +183,17 @@ async function clickSelectorByCoordinate(page, selector) {
162
183
  // Brief settle delay after scrolling, mirroring the shared scrollAndClick helper, before dispatching the real pointer-event chain. This paces real page physics
163
184
  // inside an action and is exercised only when a click actually dispatches, so it stays on delay() rather than the injected poll clock.
164
185
  await delay(SCROLL_SETTLE_DELAY);
186
+ /* The hit test sits between the settle and the dispatch because it has to read the layout the click will land on: the resolver measured its coordinates before the
187
+ * scroll settled, and once capture is established the video and its ancestors are lifted above the rest of the page, so a banner that appears afterwards sits
188
+ * beneath them at those coordinates and the pointer click lands on the video. When the target is covered, the in-page synthetic click reaches the element whatever
189
+ * paints over it. That click is the fallback and not the first choice because some SPA consent buttons drop a synthetic click - the reason this path dispatches a
190
+ * real pointer chain at all - so the pointer chain stays first wherever it can land on the target.
191
+ */
192
+ const onTop = await page.evaluate(isSelectorAtPoint, { selector, x: target.x, y: target.y });
193
+ if (!onTop) {
194
+ const result = await page.evaluate(clickSelectorInPage, selector);
195
+ return result === "clicked";
196
+ }
165
197
  await page.mouse.click(target.x, target.y);
166
198
  return true;
167
199
  }
@@ -190,6 +222,25 @@ export function clickSelectorInPage(sel) {
190
222
  }
191
223
  return "absent";
192
224
  }
225
+ /**
226
+ * In-page hit test for a selector-identified element at a viewport point: reports whether the element, or one of its own descendants, is what the document paints
227
+ * there. It runs after the settle and immediately before the pointer chain is dispatched at that point, so a page element lifted above the target since the
228
+ * coordinates were resolved - the capture's video after establishment - is seen. A null hit (a point outside the viewport) answers false, so the caller never
229
+ * clicks blind.
230
+ *
231
+ * This function crosses the page.evaluate boundary by source serialization, so it is self-contained: it references only its argument and the page's document global,
232
+ * with every input a parameter and zero outer-scope references. Exported so unit tests can run it against a synthetic DOM.
233
+ * @param input - The selector and the viewport point to test.
234
+ * @returns True when the element or one of its descendants paints at the point.
235
+ */
236
+ export function isSelectorAtPoint(input) {
237
+ const el = document.querySelector(input.selector);
238
+ if (!el) {
239
+ return false;
240
+ }
241
+ const top = document.elementFromPoint(input.x, input.y);
242
+ return (top !== null) && ((top === el) || el.contains(top));
243
+ }
193
244
  /**
194
245
  * Attempts to dismiss the profile's per-site modal with a synthetic in-page click. The per-site dismissSelector modals (Paramount+ "Watch Live", c-span, cbs) are
195
246
  * reliably dismissed by synthetic clicks, so coordinate clicking is reserved for the consent paths that require it. The in-page function guards its querySelector so
@@ -385,11 +436,12 @@ export async function startOverlayHandling(page, profile, options) {
385
436
  const onGate = (options.phase === "videoWait") ? options.onEmbedGateAccepted : undefined;
386
437
  const policy = PHASE_POLICY[phase];
387
438
  const state = { dismissSelector: "armed", handledVendors: new Set() };
388
- // Resolve the poll window from the phase's policy: a fixed millisecond budget, or the profile-derived video-wait window for the phases whose timing tracks the
389
- // wait. One time origin end to end (clock.now() for both the deadline and the loop condition), because realClock.now() is performance.now()-based - a half-migration
390
- // that mixed it with Date.now() would invert the loop condition and zero-tick every poll.
391
- const windowMs = (policy.window === "videoTimeout") ? (profile.videoTimeout ?? CONFIG.streaming.videoTimeout) : policy.window;
392
- const deadline = clock.now() + windowMs;
439
+ /* Resolve the poll window from the phase's policy: a fixed millisecond budget, the profile-derived video-wait window for the phases whose timing tracks the wait,
440
+ * or an infinite deadline for a phase whose only terminator is its caller's abort. One time origin end to end (clock.now() for both the deadline and the loop
441
+ * condition), because realClock.now() is performance.now()-based - a half-migration that mixed it with Date.now() would invert the loop condition and zero-tick
442
+ * every poll. An infinite deadline is safe because the loop still checks the signal on entry and after every sleep, so the abort ends it within one tick.
443
+ */
444
+ const deadline = clock.now() + resolveWindow(policy.window, profile);
393
445
  let firstCheck = true;
394
446
  while (clock.now() < deadline) {
395
447
  if (signal?.aborted) {
@@ -1 +1 @@
1
- {"version":3,"file":"consent.js","sourceRoot":"","sources":["../../src/browser/consent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAK5C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,oKAAoK;AACpK,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAElC,iKAAiK;AACjK,sKAAsK;AACtK,gFAAgF;AAChF,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC,mKAAmK;AACnK,+JAA+J;AAC/J,sKAAsK;AACtK,6CAA6C;AAC7C,MAAM,CAAC,MAAM,wBAAwB,GAAG,oEAAoE,CAAC;AAE7G,oKAAoK;AACpK,sKAAsK;AACtK,sKAAsK;AACtK,qKAAqK;AACrK,+GAA+G;AAC/G,MAAM,CAAC,MAAM,iBAAiB,GAAG,gFAAgF;IAC/G,kEAAkE,CAAC;AAErE,gKAAgK;AAChK,gKAAgK;AAChK,iKAAiK;AACjK,+GAA+G;AAC/G,MAAM,CAAC,MAAM,cAAc,GAAG,mHAAmH;IAC/I,qDAAqD,CAAC;AAExD,mKAAmK;AACnK,iJAAiJ;AACjJ,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAU,CAAC;AAkCjD;;;GAGG;AACH,MAAM,YAAY,GAAG;IAEnB,8JAA8J;IAC9J,gKAAgK;IAChK,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAA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CAAC;YAEX,OAAO;QACT,CAAC;QAED,IAAG,MAAM,KAAK,MAAM,EAAE,CAAC;YAErB,OAAO;QACT,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -45,7 +45,7 @@ export async function observeHlsPlaylists(page, options) {
45
45
  let disposed = false;
46
46
  // Wire-arrival sequence counter. Each eligible unique URL is assigned the next ordinal synchronously at the dedup gate - before its body fetch begins - so the
47
47
  // ordinal reflects the order responses arrived on the wire rather than the order their independent, racing body fetches happen to resolve. Sequences start at 1,
48
- // so a currentSequence() of 0 means nothing has been observed yet and an epoch fenced at 0 reads every later observation as post-epoch. The honest bound: the
48
+ // so a currentSequence() of 0 means nothing has been observed yet and an epoch fenced at 0 reads every later observation as post-epoch. The bound: the
49
49
  // ordinal reflects CDP-event arrival order at the client, and Chrome does not guarantee cross-session event ordering for OOPIF targets, so the fence approximates
50
50
  // wire order within event-delivery latency - a residual window of milliseconds, in place of the seconds-wide body-fetch race a delivery-time ordering would carry.
51
51
  let sequenceCounter = 0;
@@ -72,7 +72,7 @@ export async function observeHlsPlaylists(page, options) {
72
72
  }
73
73
  seenUrls.add(url);
74
74
  // Assign the wire-arrival ordinal synchronously, immediately past the dedup gate and before the first await, so it reflects the order this response arrived
75
- // rather than the order its body fetch resolves against every other in-flight fetch. The local rides through the fetch and is delivered on the observation.
75
+ // rather than the order its body fetch resolves against every other in-flight fetch. The local is carried across the fetch and is delivered on the observation.
76
76
  const sequence = ++sequenceCounter;
77
77
  LOG.debug(logCategory, "Observed .m3u8 response (seq %s): %s.", sequence, url.slice(0, 120));
78
78
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"hlsPlaylistObserver.js","sourceRoot":"","sources":["../../src/browser/hlsPlaylistObserver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB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AAK,CAAC,WAAW,EAAE,iCAAiC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,WAAW,GAAiC,MAAM,mBAAmB,CAAC,IAAI,EAAE;QAEhF,UAAU,EAAE,CAAC,QAAQ,EAAQ,EAAE,GAAG,KAAK,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KACvE,CAAC,CAAC;IAEH,IAAG,CAAC,WAAW,EAAE,CAAC;QAEhB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,kCAAkC,CAAC,CAAC;IAE3D,8JAA8J;IAC9J,gJAAgJ;IAChJ,MAAM,eAAe,GAAG,GAAW,EAAE,CAAC,eAAe,CAAC;IAEtD,MAAM,OAAO,GAAG,GAAS,EAAE;QAEzB,IAAG,QAAQ,EAAE,CAAC;YAEZ,OAAO;QACT,CAAC;QAED,QAAQ,GAAG,IAAI,CAAC;QAChB,WAAW,CAAC,OAAO,EAAE,CAAC;QACtB,QAAQ,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;AACjE,CAAC"}
@@ -1,14 +1,16 @@
1
1
  import type { Browser, LaunchOptions, Page } from "puppeteer-core";
2
+ import type { BrowserPurpose, CaptureImpairment } from "./browserSupervisor.ts";
3
+ import type { Clock, ProcessInfo } from "../utils/index.ts";
2
4
  import { clearLoginState, isLoginModeActive } from "./login.ts";
3
- import { getStream } from "puppeteer-stream";
5
+ import { getAllStreams } from "../streaming/registry.ts";
6
+ import { getCachedTabId } from "./tabSelection.ts";
4
7
  import type { Nullable } from "../types/index.ts";
5
- import type { ProcessInfo } from "../utils/index.ts";
8
+ import type { WindowPlacement } from "./cdp.ts";
6
9
  type CaptureProbe = (browser: Browser) => Promise<void>;
7
10
  /**
8
11
  * Injects the capture-readiness probe used as the capability tier of the launch gate. Called once from streaming/setup.ts at module load (which always precedes any
9
12
  * launch, since the streaming layer is imported during server startup). Separating the wiring from the call keeps browser/index.ts free of a streaming-layer import.
10
- * @param probe - The probe to run against a freshly-launched browser; it resolves when the browser can capture and rejects otherwise (or exits the process for the
11
- * unrecoverable stale-mutex case).
13
+ * @param probe - The probe to run against a freshly-launched browser; it resolves when the browser can capture and rejects when it cannot.
12
14
  */
13
15
  export declare function setCaptureProbe(probe: CaptureProbe): void;
14
16
  /**
@@ -19,10 +21,63 @@ export declare function isGracefulShutdown(): boolean;
19
21
  * Sets the graceful shutdown flag. Call this at the start of shutdown, before terminating streams, so that page close errors are suppressed.
20
22
  */
21
23
  export declare function setGracefulShutdown(value: boolean): void;
24
+ /**
25
+ * Reports whether a page may carry a CDP command aimed at the shared window: it exists, it is still open, and it does not live in a window of its own. The
26
+ * parameter accepts the absent case so every caller narrows through this one test rather than guarding beside it.
27
+ * @param page - The candidate page, which may be absent.
28
+ * @returns True when the page can carry a shared-window command.
29
+ */
30
+ export declare function isCarrierPage(page: Nullable<Page>): page is Page;
31
+ /**
32
+ * Picks the page a shared-window command should travel on from the pages a browser has open, taking the first that qualifies.
33
+ * @param pages - The candidate pages, in the order the browser reports them.
34
+ * @returns The page to carry the command, or null when none of them qualifies.
35
+ */
36
+ export declare function pickCarrierPage(pages: readonly Page[]): Nullable<Page>;
37
+ /**
38
+ * Records which window the shared one is, reading it from a page that sits in it.
39
+ *
40
+ * This is the one way an identity is written. The launch path calls it once the launch-era pages exist, so every browser this process publishes carries the
41
+ * answer before anything asks for a capture tab, and a probe running against a browser of its own calls the same function rather than reaching for the map.
42
+ * @param browser - The browser whose shared window is being recorded.
43
+ * @param page - A page that sits in that window.
44
+ */
45
+ export declare function noteSharedWindow(browser: Browser, page: Page): Promise<void>;
46
+ /**
47
+ * Picks the page an opener-anchored tab should be opened from: one the browser has open, living in the shared window rather than a window of its own, and
48
+ * confirmed to sit in the window this process recorded.
49
+ *
50
+ * A plain-origin page is preferred over the capture extension's own options page, which is the carrier of last resort. The options page is recognized by the URL
51
+ * prefix its own pages carry rather than through the library's resolver, whose wait for a missing extension would spend thirty seconds inside a caller's turn.
52
+ * When no identity was ever recorded the confirmation has nothing to test against, and the first qualifying page is the answer: an anchor to some window of the
53
+ * browser's is still better than letting Chrome choose one.
54
+ * @param browser - The browser to resolve a carrier in.
55
+ * @returns The page to evaluate the open on, or null when none of the browser's pages qualifies.
56
+ */
57
+ export declare function resolveSharedWindowCarrier(browser: Browser): Promise<Nullable<Page>>;
58
+ /**
59
+ * Reports whether a page ended up in the shared window.
60
+ *
61
+ * Advisory when no identity was ever recorded: there is nothing to contradict the placement with, so the answer is true and the caller proceeds. A window that
62
+ * cannot be READ is the opposite answer, though, and deliberately so - the shared lookup reports undefined for a closed page, an empty response, and a CDP
63
+ * failure alike, and reading any of those as a confirmation would confirm a wrong-window tab in exactly the case this check exists for.
64
+ * @param page - The page to test.
65
+ * @returns True when the page sits in the recorded window, or when no window was ever recorded.
66
+ */
67
+ export declare function confirmSharedWindowPlacement(page: Page): Promise<boolean>;
22
68
  export { clearLoginState, isLoginModeActive };
23
69
  export type { LoginStatus } from "./login.ts";
24
70
  export { endLoginMode, getLoginPage, getLoginStatus, setLoginModeEndObserver, startLoginMode } from "./login.ts";
25
- export { BrowserSupersededError, BrowserUnavailableError } from "./browserSupervisor.ts";
71
+ export { BrowserCaptureImpairedError, BrowserSupersededError, BrowserUnavailableError } from "./browserSupervisor.ts";
72
+ export type { BrowserPurpose, CaptureImpairment } from "./browserSupervisor.ts";
73
+ /**
74
+ * Brings the shared browser window into agreement with the visibility policy. This is the one entry point every layer uses - streaming, recovery, login,
75
+ * precaching, and startup all call it and none of them decide window state themselves.
76
+ * @param page - The page whose CDP session should carry the command, when the caller has one in hand. The executor falls back to any open page, or a temporary
77
+ * one, when it is omitted or the page has closed.
78
+ * @returns A promise that resolves once a pass that began at or after this call has completed.
79
+ */
80
+ export declare function syncWindowVisibility(page?: Page): Promise<void>;
26
81
  /**
27
82
  * Computes the current system status and emits it to SSE subscribers. Called when browser state changes significantly or when streams are added/removed.
28
83
  */
@@ -34,11 +89,12 @@ export declare function emitCurrentSystemStatus(): Promise<void>;
34
89
  * Each registered page receives a unique ID that persists for the page's lifetime. This ID is used for comparison and staleness tracking, avoiding potential
35
90
  * issues with Page object reference identity.
36
91
  * @param page - The Puppeteer Page to register.
37
- * @param options - Registration options. Set inFlightSetup when stream setup owns the page but has not yet recorded that ownership in the stream registry, so the
38
- * stale page cleanup never closes a page whose stream is still being established.
92
+ * @param options - Registration options. Set inFlight when an operation owns the page for its duration but nothing the stale page cleanup reads records that
93
+ * ownership - a stream setup that has not yet written its page into the registry, or a discovery walk whose page belongs to no stream at all - so the cleanup
94
+ * never closes a page out from under the operation driving it.
39
95
  */
40
96
  export declare function registerManagedPage(page: Page, options?: {
41
- inFlightSetup?: boolean;
97
+ inFlight?: boolean;
42
98
  }): void;
43
99
  /**
44
100
  * Unregisters a page from PrismCast's management. This should be called when a page is being closed intentionally (during stream cleanup). Unregistering prevents the
@@ -118,51 +174,152 @@ export declare function getExecutablePath(): string;
118
174
  * - Pipe mode provides a faster, more reliable connection than WebSocket
119
175
  * @returns Puppeteer launch options.
120
176
  */
121
- export declare function buildLaunchOptions(): LaunchOptions;
122
- /**
123
- * Decides whether the window bounds the browser granted prove the display cannot show a whole captured frame, returning those bounds when they do and null
124
- * otherwise. Bounds the browser could not report, and bounds read while the window carried a state other than normal, describe a transient condition rather than
125
- * the display...treating either as evidence would let a CDP hiccup or an unfinished window transition pose as a small display, so both yield null. Beyond that,
126
- * either dimension falling below the capture surface is enough: a frame that does not fit the window in one axis is already a frame the screen cannot show whole.
127
- * @param bounds - The window bounds the browser reported, or undefined when the read did not complete.
128
- * @param captureSurface - The dimensions every page renders at, derived from the configured quality preset.
129
- * @returns The granted window dimensions when the display falls short of the capture surface, null otherwise.
130
- */
131
- export declare function getUndersizedDisplayBounds(bounds: {
132
- height?: number;
133
- width?: number;
134
- windowState?: string;
135
- } | undefined, captureSurface: {
177
+ export declare function buildLaunchOptions(): LaunchOptions & {
178
+ defaultViewport: null;
179
+ };
180
+ /**
181
+ * Emulates the capture surface on a page that is about to be captured: the configured quality preset's dimensions, declared at the pixel density the display
182
+ * actually has. Chrome composes an active tab's capture from the window presentation unless the page's device-metrics override declares a density explicitly
183
+ * and that density matches the display's real one, so the density is read from the page itself - a page carrying no declared density reports the display's own -
184
+ * and declared back before capture acquires the page. The declared dimensions are returned so the caller holds its capture constraints to the surface that was
185
+ * emulated rather than reading the preset a second time.
186
+ * @param page - The page to emulate the capture surface on.
187
+ * @returns The dimensions declared on the page.
188
+ */
189
+ export declare function emulateCaptureSurface(page: Page): Promise<{
136
190
  height: number;
137
191
  width: number;
138
- }): Nullable<{
192
+ }>;
193
+ /**
194
+ * Emulates the layout surface on a page that is laid out but never captured: the configured quality preset's dimensions at the display's own density. The guide
195
+ * walks were written against that layout and the launch-gate capture probe acquires against it, so declaring it is what keeps both on the surface they were
196
+ * validated on. The density stays the display's, because nothing reads this page's pixels.
197
+ * @param page - The page to emulate the layout surface on.
198
+ * @returns The dimensions declared on the page.
199
+ */
200
+ export declare function emulateLayoutSurface(page: Page): Promise<{
139
201
  height: number;
140
202
  width: number;
141
203
  }>;
142
204
  /**
143
- * Invalidates a specific browser that is still connected but can no longer capture - a mid-life capture death that no "disconnected" event would surface. This is the
144
- * single recovery action generalized to the alive-but-incapable case: relinquish readiness and terminate the browser's streams (exactly as a disconnect does),
145
- * then additionally close the still-running Chrome so a leaked process is not left behind. The lifecycle is already absent after relinquish, so the next request
146
- * relaunches a fresh, gate-verified browser through the supervisor. Exported for the streaming layer's passive mid-life detector to call once its probe confirms the
147
- * browser cannot capture. noteReadinessLost stays internal: callers signal intent through this function, never the supervisor directly.
205
+ * Derives the creation bounds for a window that should open exactly where an existing window rests. The four numbers always travel, so the new window lands on
206
+ * the same frame. The state travels only when it is "maximized", because that is the one state Chrome saves alongside the frame and a maximized window mirrored
207
+ * as a normal one would drop it. Every other state is left off deliberately: a fullscreen window's frame is its whole screen and a normal window at that frame
208
+ * is the right stand-in for it, and a minimized window reports the frame it will return to, which is a placement worth inheriting without the minimization.
209
+ * @param placement - The placement of the window to mirror.
210
+ * @returns The bounds to create the new window with.
211
+ */
212
+ export declare function mirrorPlacement(placement: WindowPlacement): {
213
+ height: number;
214
+ left: number;
215
+ top: number;
216
+ width: number;
217
+ windowState?: "maximized";
218
+ };
219
+ /**
220
+ * Opens a page for a channel guide discovery walk in a browser window of its own, and marks it as belonging to that window.
221
+ *
222
+ * A document renders only while it is the active tab of a window that is not minimized, and the shared window rests minimized whenever nothing is capturing and
223
+ * no sign-in holds it on screen, with its selected tab belonging to the user. A guide walk needs its page to render - an observer-driven channel rail fills its
224
+ * tiles from rendering updates, and a virtualized grid re-renders as the walk scrolls it - yet it is never captured, so it has no claim on the shared window's
225
+ * presentation and no business moving the user's selection. Its own window resolves both: the page is the active tab there from the moment it exists.
148
226
  *
149
- * The caller passes the exact instance it verified, and we invalidate only if it is still the published browser. The detector's probe runs in the background for
150
- * seconds, during which the verified browser could have disconnected and been replaced by a fresh relaunch; without this identity guard we would tear down that
151
- * new, healthy browser on the strength of a probe against the old, dead one.
152
- * @param browser - The specific browser instance the caller verified as unable to capture.
153
- * @param reason - A short description of why the browser is being invalidated, for the alarm log.
227
+ * The window is created in the background, so Chrome shows it inactive and moves no focus (measured 2026-08-31), and at the shared window's own placement, so
228
+ * the window placement Chrome persists for the profile never changes - readWindowPlacement carries the reasoning. The caller declares the layout surface on
229
+ * the page and owns its registration, and closing the page closes the window with it.
230
+ * @param browser - The browser to open the window in.
231
+ * @returns The page, as the active tab of its own window.
154
232
  */
155
- export declare function invalidateBrowser(browser: Browser, reason: string): Promise<void>;
233
+ export declare function createDiscoveryPage(browser: Browser): Promise<Page>;
234
+ /**
235
+ * Builds the callback the page's focus binding invokes: an immediate re-issue, then a ladder of follow-ups at ACTIVATION_REAFFIRM_LADDER_MS's offsets from this
236
+ * invocation. The ladder is what makes the heal land, because the compositor's switch outlasts the focus event announcing it - the immediate shot alone cannot
237
+ * reach the far side of the switch, so later shots have to.
238
+ *
239
+ * Invocations supersede rather than accumulate. A generation counter makes the newest invocation the owner of the rung schedule: the duplicate focus events a
240
+ * single activation fires collapse into one schedule a few milliseconds newer than the first, while an activation that genuinely arrives later - a second
241
+ * stream's tab give-back landing on this page, another click - gets a full bracket timed from its own moment instead of inheriting the tail of an in-flight one.
242
+ * The counter lives in this closure, so a callback supersedes only the ladders it started itself and two streams' pages cannot reach each other's schedules.
243
+ *
244
+ * Nothing cancels a superseded ladder, because nothing has to: it returns at its next generation check, a shot against a page mid-teardown rejects into the
245
+ * swallow below, and a shot that never settles leaves its ladder awaiting a promise nobody holds. The counter needs no reset for the same reason - a newer
246
+ * invocation is itself the invalidation - and the schedule holds no timers, only awaited sleeps.
247
+ *
248
+ * A rejection is swallowed into a debug line because a focus event races page teardown by nature - the tab a user just selected can be the one a terminating
249
+ * stream is closing - and the periodic re-affirmation corrects anything a lost re-issue leaves behind.
250
+ * @param page - The capture page this callback re-affirms.
251
+ * @param reaffirm - The re-issue to invoke. A parameter rather than a direct call so the callback's behavior can be driven on its own: what it does with the page
252
+ * it was built for, what schedule it keeps, and what it does with a rejection, is the whole of its contract.
253
+ * @param clock - The time source the ladder's waits run on. Defaults to realClock.
254
+ * @returns The callback, which never rejects. Its promise settles once the ladder is spent, which the page-side listener does not wait on.
255
+ */
256
+ export declare function makeFocusReaffirmCallback(page: Page, reaffirm: (page: Page) => Promise<void>, clock?: Clock): () => Promise<void>;
257
+ /**
258
+ * The collaborators a page's heal is built from: the time source its ladder's waits run on, and the re-issue each of its shots performs. Injected as a default
259
+ * parameter in the shape CreatePageWithCaptureDeps, TabCaptureDeps, FullscreenDeps, and PrecachingDeps already use, so a test drives the enrolled callback through
260
+ * the install point itself rather than around it. The port holds no state, and production call sites pass nothing.
261
+ */
262
+ export interface ActivationHealDeps {
263
+ readonly clock: Clock;
264
+ readonly reaffirm: (page: Page) => Promise<void>;
265
+ }
266
+ /**
267
+ * Installs the tab-activation heal on a capture page. Chrome composes the capture of a selected tab from the window's fitted presentation, so the instant a
268
+ * capture tab becomes the selected one that capture starts recording a clipped view of itself; the re-issue ladder this installs moves the composition back to
269
+ * the emulated surface about a second later.
270
+ *
271
+ * The heal has two triggers and one ladder between them. The exposed binding is fired by a focus listener inside the page, which covers the activation that
272
+ * arrives with a user's click focusing the browser window. The enrollment in activationHeals is fired by the selection primitive's activation report, which
273
+ * covers every activation PrismCast performs for itself - the give-back returning a user to a capture tab, the selection step, a re-assert - and a captured page
274
+ * hears none of those: capture holds it visible and the extension's update moves no operating-system focus, so no page event fires at all (measured 2026-08-30).
275
+ * Both triggers hold the same callback instance, which is what lets them share its generation counter instead of running two schedules against one page.
276
+ *
277
+ * The listener is registered through evaluateOnNewDocument so it survives the page's navigations, exactly as the shared video-selector helper does, and the
278
+ * binding survives them on Puppeteer's own terms.
279
+ * @param page - The capture page to install the heal on.
280
+ * @param deps - The clock and the re-issue the ladder runs on. Defaults to the production pair.
281
+ */
282
+ export declare function installActivationHeal(page: Page, deps?: ActivationHealDeps): Promise<void>;
283
+ /**
284
+ * Heals the capture page showing in a tab the selection primitive has just activated.
285
+ *
286
+ * The report names a tab and what needs healing is a page, so the match walks the registry for a capture-mode stream whose page was identified as that tab. A
287
+ * report matching nothing is the ordinary case rather than a failure - a give-back returning the selection to the user's own tab, a native stream that composes
288
+ * no capture at all, a page registered before its setup reached the install point - and every one of them is a quiet no-op.
289
+ * @param tabId - The tab the selection primitive activated.
290
+ * @param deps - The registry read and the page-to-tab lookup the match runs through. Defaults to the production pair.
291
+ */
292
+ export declare function healActivatedCaptureTab(tabId: number, deps?: {
293
+ readonly getAllStreams: typeof getAllStreams;
294
+ readonly getCachedTabId: typeof getCachedTabId;
295
+ }): void;
296
+ /**
297
+ * Records that a still-connected browser can no longer start captures - a mid-life capture death that no "disconnected" event would surface - and schedules the
298
+ * relaunch that cures it. This is the single recovery action for a browser that is alive and still serving: the mark lives on the supervisor's ready state, so its
299
+ * running captures continue untouched, new stream requests are refused at acquire() with a 503 back-off, the recovery ladder stops offering tab replacement, and
300
+ * the relaunch waits for the registry to empty. Exported for the streaming layer to call once its probe or its wedge has produced the verdict.
301
+ *
302
+ * The restart trigger uses this function's return value rather than the supervisor's transition observer, deliberately. The observer runs inside transition(), so a
303
+ * restart begun there would call noteReadinessLost re-entrantly while the marking transition's notification is still on the stack. The observer stays a reporter -
304
+ * the alarm and the status emit - and the caller that holds the verdict acts on it once the transition has completed.
305
+ * @param browser - The specific browser instance the caller verified as unable to start captures.
306
+ * @param reason - A short description of the evidence behind the verdict, carried in the alarm log and the impairment record.
307
+ */
308
+ export declare function noteBrowserCaptureImpaired(browser: Browser, reason: string): void;
156
309
  /**
157
310
  * Provides access to the capture-ready browser, launching one if needed. This is the single gated entry point for all browser access: it delegates to the
158
311
  * supervisor's acquire(), which returns the ready browser, joins an in-flight launch (single-flight, so concurrent callers never contend on Chrome's profile lock),
159
312
  * lazily launches when absent, or - while the relaunch governor is cooling after repeated failures - rejects fast with a BrowserUnavailableError WITHOUT spawning
160
313
  * Chrome (the loop bound). The launch it drives runs the readiness gate, so a returned browser is verified capture-ready, not merely connected.
314
+ *
315
+ * The purpose is what the caller intends to do with the browser, and it is the gate on a marked one: a "capture" caller is refused, because that is precisely the
316
+ * operation the browser can no longer perform, while a "page" caller - precaching, the startup warm-up, the relaunch itself - is served as usual.
317
+ * @param purpose - Whether the caller goes on to start a capture or only needs a page to open.
161
318
  * @returns The capture-ready browser instance.
162
- * @throws BrowserUnavailableError while the governor is cooling, BrowserSupersededError if an in-flight launch was abandoned by a readiness-loss, or the underlying
163
- * launch error when a launch attempt fails.
319
+ * @throws BrowserUnavailableError while the governor is cooling, BrowserCaptureImpairedError when a capture purpose meets a browser that can no longer start
320
+ * captures, BrowserSupersededError if an in-flight launch was abandoned by a readiness-loss, or the underlying launch error when a launch attempt fails.
164
321
  */
165
- export declare function getCurrentBrowser(): Promise<Browser>;
322
+ export declare function getCurrentBrowser(purpose: BrowserPurpose): Promise<Browser>;
166
323
  /**
167
324
  * Returns the Chrome version string captured when the browser launched, or null if the browser is not connected.
168
325
  * @returns The Chrome version string (e.g., "Chrome/144.0.7559.110") or null.
@@ -174,19 +331,18 @@ export declare function getChromeVersion(): Nullable<string>;
174
331
  * @returns The browser instance, or null if not running.
175
332
  */
176
333
  export declare function getBrowserInstance(): Nullable<Browser>;
334
+ /**
335
+ * Returns the impairment recorded on the published browser, or null when nothing is published or the published browser can still start captures. Like
336
+ * getBrowserInstance this does not launch, so callers that only need to know whether captures can be started - the recovery ladder, the status composition, the
337
+ * health endpoint - read it without touching the lifecycle.
338
+ * @returns The impairment record, or null.
339
+ */
340
+ export declare function getCaptureImpairment(): Nullable<CaptureImpairment>;
177
341
  /**
178
342
  * Checks if the browser is currently connected and usable. This is a synchronous check that can be used before attempting browser operations.
179
343
  * @returns True if the browser is connected and ready for use, false otherwise.
180
344
  */
181
345
  export declare function isBrowserConnected(): boolean;
182
- /**
183
- * Minimizes the browser window. The window's presentation state is all this touches - the surface pages render at is emulated from the configured preset and is
184
- * unaffected by whether the window is on screen.
185
- *
186
- * To avoid issues with creating temporary pages (which can cause the window to restore on macOS), we prefer using an existing page if one is available. Only if
187
- * no pages exist do we create a temporary page.
188
- */
189
- export declare function minimizeBrowserWindow(): Promise<void>;
190
346
  /**
191
347
  * Gets all open browser pages (tabs). This is used by the health check endpoint to report page count.
192
348
  * @returns Array of pages, or empty array if the browser is not connected.
@@ -204,7 +360,7 @@ export declare function closeBrowser(): Promise<void>;
204
360
  *
205
361
  * The cleanup uses a multi-stage filtering process:
206
362
  * 1. Only consider pages we created (in managedPageIds)
207
- * 2. Exclude pages associated with active streams, and pages whose stream setup is still in flight
363
+ * 2. Exclude pages associated with active streams, and pages an operation still holds in flight
208
364
  * 3. Apply a grace period before closing (to handle race conditions)
209
365
  * 4. Preserve at least one page to keep the browser alive
210
366
  */
@@ -219,6 +375,13 @@ export declare function startStalePageCleanup(): void;
219
375
  * the browser and streams.
220
376
  */
221
377
  export declare function stopStalePageCleanup(): void;
378
+ /**
379
+ * Relaunches a browser that can no longer start captures, as soon as nothing depends on it. Every trigger routes here - the mark itself, each stream termination,
380
+ * and the periodic restart check as the backstop for a moment when the other two could not act (login mode above all) - so the decision lives in one place rather
381
+ * than being re-derived by each. Idleness rather than age is the condition, because the mark makes the browser useless for new tunes immediately while its running
382
+ * captures are still worth finishing, so the earliest safe moment is exactly the moment the last of them ends.
383
+ */
384
+ export declare function restartBrowserIfImpairedAndIdle(): void;
222
385
  /**
223
386
  * Starts the periodic browser restart eligibility check. This should be called once during server startup, after the browser is initialized. The interval runs
224
387
  * indefinitely until stopBrowserRestartChecking() is called (typically during graceful shutdown).
@@ -237,5 +400,6 @@ export declare function stopBrowserRestartChecking(): void;
237
400
  * @throws If extension extraction fails.
238
401
  */
239
402
  export declare function prepareExtension(): Promise<void>;
240
- export { getStream };
403
+ export { acquireCaptureStream } from "./tabCapture.ts";
404
+ export type { CaptureStream, CaptureStreamOptions } from "./tabCapture.ts";
241
405
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAuB,MAAM,YAAY,CAAC;AAGrF,OAAO,EAAoB,SAAS,EAAU,MAAM,kBAAkB,CAAC;AAOvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA0HrD,KAAK,YAAY,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IA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