prismcast 1.13.0 → 1.14.0

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 (218) hide show
  1. package/dist/app.d.ts +88 -6
  2. package/dist/app.js +287 -154
  3. package/dist/app.js.map +1 -1
  4. package/dist/browser/cdp.d.ts +6 -17
  5. package/dist/browser/cdp.js +6 -57
  6. package/dist/browser/cdp.js.map +1 -1
  7. package/dist/browser/index.d.ts +106 -23
  8. package/dist/browser/index.js +292 -225
  9. package/dist/browser/index.js.map +1 -1
  10. package/dist/browser/precaching.d.ts +25 -11
  11. package/dist/browser/precaching.js +245 -97
  12. package/dist/browser/precaching.js.map +1 -1
  13. package/dist/browser/tabCapture.js +3 -10
  14. package/dist/browser/tabCapture.js.map +1 -1
  15. package/dist/browser/tuning/comcastPolymer.js +13 -14
  16. package/dist/browser/tuning/comcastPolymer.js.map +1 -1
  17. package/dist/browser/tuning/hbo.js +34 -17
  18. package/dist/browser/tuning/hbo.js.map +1 -1
  19. package/dist/browser/video.d.ts +1 -1
  20. package/dist/browser/video.js +3 -3
  21. package/dist/channels/index.js +5 -5
  22. package/dist/channels/index.js.map +1 -1
  23. package/dist/cliHelp.d.ts +11 -0
  24. package/dist/cliHelp.js +148 -0
  25. package/dist/cliHelp.js.map +1 -0
  26. package/dist/config/channelForm.js +5 -4
  27. package/dist/config/channelForm.js.map +1 -1
  28. package/dist/config/consistencyProbe.d.ts +2 -4
  29. package/dist/config/consistencyProbe.js +8 -51
  30. package/dist/config/consistencyProbe.js.map +1 -1
  31. package/dist/config/index.d.ts +107 -55
  32. package/dist/config/index.js +499 -267
  33. package/dist/config/index.js.map +1 -1
  34. package/dist/config/paths.d.ts +13 -8
  35. package/dist/config/paths.js +21 -25
  36. package/dist/config/paths.js.map +1 -1
  37. package/dist/config/persistence.d.ts +57 -11
  38. package/dist/config/persistence.js +127 -44
  39. package/dist/config/persistence.js.map +1 -1
  40. package/dist/config/reactivity.d.ts +60 -36
  41. package/dist/config/reactivity.js +89 -116
  42. package/dist/config/reactivity.js.map +1 -1
  43. package/dist/config/services.d.ts +61 -26
  44. package/dist/config/services.js +137 -68
  45. package/dist/config/services.js.map +1 -1
  46. package/dist/config/streamSettings.d.ts +24 -0
  47. package/dist/config/streamSettings.js +17 -0
  48. package/dist/config/streamSettings.js.map +1 -0
  49. package/dist/config/userChannels.d.ts +60 -52
  50. package/dist/config/userChannels.js +138 -188
  51. package/dist/config/userChannels.js.map +1 -1
  52. package/dist/config/userConfig.d.ts +224 -61
  53. package/dist/config/userConfig.js +351 -134
  54. package/dist/config/userConfig.js.map +1 -1
  55. package/dist/hdhr/discover.d.ts +7 -1
  56. package/dist/hdhr/discover.js +12 -6
  57. package/dist/hdhr/discover.js.map +1 -1
  58. package/dist/hdhr/index.d.ts +51 -10
  59. package/dist/hdhr/index.js +108 -112
  60. package/dist/hdhr/index.js.map +1 -1
  61. package/dist/hdhr/udp.d.ts +11 -4
  62. package/dist/hdhr/udp.js +25 -20
  63. package/dist/hdhr/udp.js.map +1 -1
  64. package/dist/index.js +16 -143
  65. package/dist/index.js.map +1 -1
  66. package/dist/native/index.d.ts +1 -1
  67. package/dist/native/index.js +4 -3
  68. package/dist/native/index.js.map +1 -1
  69. package/dist/native/proxy.d.ts +1 -1
  70. package/dist/native/proxy.js +36 -28
  71. package/dist/native/proxy.js.map +1 -1
  72. package/dist/routes/cdp.d.ts +7 -6
  73. package/dist/routes/cdp.js +9 -8
  74. package/dist/routes/cdp.js.map +1 -1
  75. package/dist/routes/components.d.ts +23 -5
  76. package/dist/routes/components.js +21 -4
  77. package/dist/routes/components.js.map +1 -1
  78. package/dist/routes/config/channels/endpoints/browse.js +39 -29
  79. package/dist/routes/config/channels/endpoints/browse.js.map +1 -1
  80. package/dist/routes/config/channels/endpoints/bulk.js +2 -6
  81. package/dist/routes/config/channels/endpoints/bulk.js.map +1 -1
  82. package/dist/routes/config/channels/endpoints/predefined.js +5 -15
  83. package/dist/routes/config/channels/endpoints/predefined.js.map +1 -1
  84. package/dist/routes/config/channels/endpoints/prefs.js +7 -6
  85. package/dist/routes/config/channels/endpoints/prefs.js.map +1 -1
  86. package/dist/routes/config/channels/endpoints/service.js +6 -5
  87. package/dist/routes/config/channels/endpoints/service.js.map +1 -1
  88. package/dist/routes/config/channels/endpoints/tags.js +4 -16
  89. package/dist/routes/config/channels/endpoints/tags.js.map +1 -1
  90. package/dist/routes/config/channels/table.d.ts +2 -1
  91. package/dist/routes/config/channels/table.js +11 -13
  92. package/dist/routes/config/channels/table.js.map +1 -1
  93. package/dist/routes/config/http/envelope.d.ts +6 -3
  94. package/dist/routes/config/http/envelope.js +18 -5
  95. package/dist/routes/config/http/envelope.js.map +1 -1
  96. package/dist/routes/config/index.d.ts +21 -13
  97. package/dist/routes/config/index.js +47 -34
  98. package/dist/routes/config/index.js.map +1 -1
  99. package/dist/routes/config/settings.d.ts +43 -6
  100. package/dist/routes/config/settings.js +225 -125
  101. package/dist/routes/config/settings.js.map +1 -1
  102. package/dist/routes/config/vocabulary.d.ts +24 -0
  103. package/dist/routes/config/vocabulary.js +33 -0
  104. package/dist/routes/config/vocabulary.js.map +1 -0
  105. package/dist/routes/debug.js +28 -13
  106. package/dist/routes/debug.js.map +1 -1
  107. package/dist/routes/root/content.js +33 -26
  108. package/dist/routes/root/content.js.map +1 -1
  109. package/dist/routes/root/scripts/channels.js +23 -11
  110. package/dist/routes/root/scripts/channels.js.map +1 -1
  111. package/dist/routes/root/scripts/config.d.ts +1 -1
  112. package/dist/routes/root/scripts/config.js +127 -79
  113. package/dist/routes/root/scripts/config.js.map +1 -1
  114. package/dist/routes/root/scripts/shared.js +34 -23
  115. package/dist/routes/root/scripts/shared.js.map +1 -1
  116. package/dist/routes/root/scripts/status.handlers.d.ts +8 -13
  117. package/dist/routes/root/scripts/status.handlers.js +35 -21
  118. package/dist/routes/root/scripts/status.handlers.js.map +1 -1
  119. package/dist/routes/root/styles.js +13 -16
  120. package/dist/routes/root/styles.js.map +1 -1
  121. package/dist/routes/services.js +12 -16
  122. package/dist/routes/services.js.map +1 -1
  123. package/dist/routes/theme.js +12 -12
  124. package/dist/routes/theme.js.map +1 -1
  125. package/dist/routes/ui.d.ts +4 -3
  126. package/dist/routes/ui.js +17 -13
  127. package/dist/routes/ui.js.map +1 -1
  128. package/dist/service/generators.js +12 -9
  129. package/dist/service/generators.js.map +1 -1
  130. package/dist/streaming/captureSession.d.ts +4 -4
  131. package/dist/streaming/captureSession.js +6 -7
  132. package/dist/streaming/captureSession.js.map +1 -1
  133. package/dist/streaming/codec.d.ts +12 -2
  134. package/dist/streaming/codec.js +40 -28
  135. package/dist/streaming/codec.js.map +1 -1
  136. package/dist/streaming/fmp4Segmenter.d.ts +14 -4
  137. package/dist/streaming/fmp4Segmenter.js +99 -79
  138. package/dist/streaming/fmp4Segmenter.js.map +1 -1
  139. package/dist/streaming/hls.d.ts +21 -14
  140. package/dist/streaming/hls.js +148 -122
  141. package/dist/streaming/hls.js.map +1 -1
  142. package/dist/streaming/hlsResume.d.ts +36 -13
  143. package/dist/streaming/hlsResume.js +68 -37
  144. package/dist/streaming/hlsResume.js.map +1 -1
  145. package/dist/streaming/monitor.d.ts +5 -3
  146. package/dist/streaming/monitor.js +47 -37
  147. package/dist/streaming/monitor.js.map +1 -1
  148. package/dist/streaming/mp4Parser.d.ts +29 -4
  149. package/dist/streaming/mp4Parser.js +49 -7
  150. package/dist/streaming/mp4Parser.js.map +1 -1
  151. package/dist/streaming/playlistBuilder.d.ts +1 -2
  152. package/dist/streaming/playlistBuilder.js +2 -3
  153. package/dist/streaming/playlistBuilder.js.map +1 -1
  154. package/dist/streaming/preroll.d.ts +43 -16
  155. package/dist/streaming/preroll.js +112 -62
  156. package/dist/streaming/preroll.js.map +1 -1
  157. package/dist/streaming/pretune.d.ts +2 -2
  158. package/dist/streaming/pretune.js +11 -7
  159. package/dist/streaming/pretune.js.map +1 -1
  160. package/dist/streaming/recovery.d.ts +29 -2
  161. package/dist/streaming/recovery.js +43 -4
  162. package/dist/streaming/recovery.js.map +1 -1
  163. package/dist/streaming/registry.d.ts +13 -10
  164. package/dist/streaming/registry.js +6 -5
  165. package/dist/streaming/registry.js.map +1 -1
  166. package/dist/streaming/setup.d.ts +29 -20
  167. package/dist/streaming/setup.js +181 -170
  168. package/dist/streaming/setup.js.map +1 -1
  169. package/dist/streaming/showInfo.d.ts +24 -12
  170. package/dist/streaming/showInfo.js +120 -113
  171. package/dist/streaming/showInfo.js.map +1 -1
  172. package/dist/streaming/statusEmitter.d.ts +15 -10
  173. package/dist/streaming/statusEmitter.js +24 -20
  174. package/dist/streaming/statusEmitter.js.map +1 -1
  175. package/dist/types/config.d.ts +24 -13
  176. package/dist/types/config.js +5 -1
  177. package/dist/types/config.js.map +1 -1
  178. package/dist/types/index.d.ts +3 -2
  179. package/dist/types/index.js +2 -1
  180. package/dist/types/index.js.map +1 -1
  181. package/dist/types/profiles.d.ts +2 -2
  182. package/dist/types/selection.d.ts +12 -10
  183. package/dist/types/streaming.d.ts +12 -5
  184. package/dist/types/streaming.js +12 -5
  185. package/dist/types/streaming.js.map +1 -1
  186. package/dist/utils/debugFilter.d.ts +3 -2
  187. package/dist/utils/debugFilter.js +7 -5
  188. package/dist/utils/debugFilter.js.map +1 -1
  189. package/dist/{hdhr → utils}/deviceId.d.ts +1 -1
  190. package/dist/{hdhr → utils}/deviceId.js +11 -29
  191. package/dist/utils/deviceId.js.map +1 -0
  192. package/dist/utils/errors.d.ts +7 -0
  193. package/dist/utils/errors.js +12 -3
  194. package/dist/utils/errors.js.map +1 -1
  195. package/dist/utils/fileLogger.d.ts +23 -12
  196. package/dist/utils/fileLogger.js +73 -41
  197. package/dist/utils/fileLogger.js.map +1 -1
  198. package/dist/utils/httpErrors.d.ts +13 -0
  199. package/dist/utils/httpErrors.js +22 -0
  200. package/dist/utils/httpErrors.js.map +1 -0
  201. package/dist/utils/index.d.ts +3 -0
  202. package/dist/utils/index.js +3 -0
  203. package/dist/utils/index.js.map +1 -1
  204. package/dist/utils/logger.d.ts +9 -8
  205. package/dist/utils/logger.js +64 -20
  206. package/dist/utils/logger.js.map +1 -1
  207. package/dist/utils/markup.js +8 -3
  208. package/dist/utils/markup.js.map +1 -1
  209. package/dist/utils/plainObject.d.ts +6 -0
  210. package/dist/utils/plainObject.js +18 -0
  211. package/dist/utils/plainObject.js.map +1 -0
  212. package/dist/utils/runtimeIdentity.context.js +1 -29
  213. package/dist/utils/runtimeIdentity.context.js.map +1 -1
  214. package/dist/utils/runtimeIdentity.d.ts +17 -6
  215. package/dist/utils/runtimeIdentity.js +50 -17
  216. package/dist/utils/runtimeIdentity.js.map +1 -1
  217. package/package.json +5 -5
  218. package/dist/hdhr/deviceId.js.map +0 -1
package/dist/app.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAGvI,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,cAAc,EAAE,OAAO,EAC/I,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC1G,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,eAAe,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,uBAAuB,EAC5I,2BAA2B,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACzJ,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,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C;AAC5B,CAAC;AAWD,MAAM,CAAC,MAAM,yBAAyB,GAAuB;IAE3D,IAAI,EAAE,CAAC,IAAY,EAAQ,EAAE;QAE3B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IACD,kBAAkB;CACnB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAc,EAAE,OAA2B,yBAAyB;IAEvG,IAAG,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;QAE7B,GAAG,CAAC,IAAI,CAAC,4EAA4E,CAAC,CAAC;QAEvF,OAAO;IACT,CAAC;IAED,GAAG,CAAC,KAAK,CAAC,+BAA+B,EAAE,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAE1E,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACf,CAAC"}
@@ -4,14 +4,15 @@ import type { Nullable } from "../types/index.ts";
4
4
  export declare const WINDOW_STATE_POLL_MS = 25;
5
5
  export declare const WINDOW_RESTORE_CEILING_MS = 2000;
6
6
  /**
7
- * Executes a CDP (Chrome DevTools Protocol) operation with proper session lifecycle management. This helper handles the common pattern of:
7
+ * Executes a CDP (Chrome DevTools Protocol) operation against the window holding a page. This helper handles the common pattern of:
8
8
  * 1. Creating a CDP session attached to the page's target
9
9
  * 2. Getting the browser window ID for the page
10
10
  * 3. Calling the provided operation with the session and window ID
11
11
  * 4. Gracefully handling errors when the page is closed during the operation
12
12
  *
13
- * The session is created fresh for each call rather than being reused because CDP sessions become invalid when the page navigates or closes. Creating a new
14
- * session ensures we always have a valid connection.
13
+ * Each call attaches a fresh session and never detaches it...the session stays attached until the page's target goes away. A fresh session per call keeps
14
+ * callers stateless, so no caller holds a session that a page close would leave dangling. The price is one more attached session on the page for every call,
15
+ * which is why the window lookup in index.ts caches its answer per page rather than calling again on every tune.
15
16
  * @param page - The Puppeteer page object to create a CDP session for.
16
17
  * @param operation - An async function that receives the CDP session and window ID. The operation can use any CDP commands via session.send().
17
18
  * @returns The result of the operation, or undefined if the page was closed or an error occurred.
@@ -55,8 +56,8 @@ export declare function readWindowPlacement(page: Page): Promise<Nullable<Window
55
56
  export declare function minimizeWindow(page: Page): Promise<void>;
56
57
  /**
57
58
  * Un-minimizes the browser window, restoring it to normal state. The window belongs on screen while a capture stream is reading the compositor's output for it, and
58
- * while a user is completing TV provider authentication in it. The capability probe calls this directly to make its environment representative of the one capture
59
- * runs in; every other caller goes through the window-visibility executor, which owns the policy.
59
+ * while a user is completing TV provider authentication in it. The GPU capability probe (detectBrowserCapabilities in browser/index.ts) calls this directly to make
60
+ * its environment representative of the one capture runs in; every other caller goes through the window-visibility executor, which owns the policy.
60
61
  *
61
62
  * The contract is a confirmed state, not a fired command: this resolves once Chrome reports the window restored, or once the ceiling lapses with a warning and the
62
63
  * window left in whatever state it does report. On macOS a restore runs asynchronously against the acknowledgement of the command that asked for it, and a capture
@@ -66,15 +67,3 @@ export declare function minimizeWindow(page: Page): Promise<void>;
66
67
  * @param clock - Clock driving the confirmation cadence and its elapsed measurement. Defaults to the system clock; tests inject a virtual clock.
67
68
  */
68
69
  export declare function unminimizeWindow(page: Page, clock?: Clock): Promise<void>;
69
- /**
70
- * Re-issues a capture page's own declared device metrics. Chrome composes the capture of a selected tab from the window's fitted presentation rather than from the
71
- * emulated surface, and the override event is what re-selects the composition target: a capture composing the window's view of the page returns to the full
72
- * emulated surface, and a capture already composing that surface is left exactly as it was. Callable at any time, from anywhere, at any frequency, because the
73
- * values sent are the ones Puppeteer has already declared on this page - nothing about the page's emulation changes.
74
- *
75
- * The command is issued raw rather than through page.setViewport, which drops an override whose values match the standing one. It is the event, not a change of
76
- * values, that does the work here.
77
- * @param page - The page to re-affirm. A page carrying no explicitly declared density is left alone.
78
- * @throws Whatever the CDP send rejects with. Each trigger site decides whether that matters to it.
79
- */
80
- export declare function reaffirmCaptureSurface(page: Page): Promise<void>;
@@ -8,9 +8,6 @@ import { systemClock } from "homebridge-plugin-utils";
8
8
  * minimized window's output is not composed for capture to read. Which state the window should be in is decided in one place, by decideWindowVisibility in
9
9
  * windowSync.ts; these primitives only carry it out and report back what Chrome says came of it.
10
10
  *
11
- * - Capture surface re-affirmation: re-issuing a capture page's own declared device metrics, which is what moves that capture's composition target back to the
12
- * emulated surface.
13
- *
14
11
  * - Browser-level operations: Operations that affect the browser rather than a specific page, like getting the window ID for a page's target.
15
12
  *
16
13
  * CDP sessions are created per-page and must be managed carefully:
@@ -28,14 +25,15 @@ export const WINDOW_STATE_POLL_MS = 25;
28
25
  // a slow-but-healthy transition. Lapsing never blocks the caller: capture proceeds against whatever state Chrome reports.
29
26
  export const WINDOW_RESTORE_CEILING_MS = 2000;
30
27
  /**
31
- * Executes a CDP (Chrome DevTools Protocol) operation with proper session lifecycle management. This helper handles the common pattern of:
28
+ * Executes a CDP (Chrome DevTools Protocol) operation against the window holding a page. This helper handles the common pattern of:
32
29
  * 1. Creating a CDP session attached to the page's target
33
30
  * 2. Getting the browser window ID for the page
34
31
  * 3. Calling the provided operation with the session and window ID
35
32
  * 4. Gracefully handling errors when the page is closed during the operation
36
33
  *
37
- * The session is created fresh for each call rather than being reused because CDP sessions become invalid when the page navigates or closes. Creating a new
38
- * session ensures we always have a valid connection.
34
+ * Each call attaches a fresh session and never detaches it...the session stays attached until the page's target goes away. A fresh session per call keeps
35
+ * callers stateless, so no caller holds a session that a page close would leave dangling. The price is one more attached session on the page for every call,
36
+ * which is why the window lookup in index.ts caches its answer per page rather than calling again on every tune.
39
37
  * @param page - The Puppeteer page object to create a CDP session for.
40
38
  * @param operation - An async function that receives the CDP session and window ID. The operation can use any CDP commands via session.send().
41
39
  * @returns The result of the operation, or undefined if the page was closed or an error occurred.
@@ -140,10 +138,6 @@ export async function readWindowPlacement(page) {
140
138
  * @param page - The Puppeteer page object.
141
139
  */
142
140
  export async function minimizeWindow(page) {
143
- // Early exit if the page is already closed.
144
- if (page.isClosed()) {
145
- return;
146
- }
147
141
  await withCDPSession(page, async (session, windowId) => {
148
142
  /* Let the window manager settle before asking for the state change. On macOS, NSWindow state transitions run asynchronously relative to Chrome's
149
143
  * acknowledgement of a CDP command, and the page this call arrives on has usually just been created or navigated, which activates the window. A minimize
@@ -158,8 +152,8 @@ export async function minimizeWindow(page) {
158
152
  }
159
153
  /**
160
154
  * Un-minimizes the browser window, restoring it to normal state. The window belongs on screen while a capture stream is reading the compositor's output for it, and
161
- * while a user is completing TV provider authentication in it. The capability probe calls this directly to make its environment representative of the one capture
162
- * runs in; every other caller goes through the window-visibility executor, which owns the policy.
155
+ * while a user is completing TV provider authentication in it. The GPU capability probe (detectBrowserCapabilities in browser/index.ts) calls this directly to make
156
+ * its environment representative of the one capture runs in; every other caller goes through the window-visibility executor, which owns the policy.
163
157
  *
164
158
  * The contract is a confirmed state, not a fired command: this resolves once Chrome reports the window restored, or once the ceiling lapses with a warning and the
165
159
  * window left in whatever state it does report. On macOS a restore runs asynchronously against the acknowledgement of the command that asked for it, and a capture
@@ -169,10 +163,6 @@ export async function minimizeWindow(page) {
169
163
  * @param clock - Clock driving the confirmation cadence and its elapsed measurement. Defaults to the system clock; tests inject a virtual clock.
170
164
  */
171
165
  export async function unminimizeWindow(page, clock = systemClock) {
172
- // Early exit if the page is already closed.
173
- if (page.isClosed()) {
174
- return;
175
- }
176
166
  await withCDPSession(page, async (session, windowId) => {
177
167
  // Restore the window to normal (visible) state.
178
168
  await session.send("Browser.setWindowBounds", {
@@ -195,45 +185,4 @@ export async function unminimizeWindow(page, clock = systemClock) {
195
185
  }
196
186
  });
197
187
  }
198
- /**
199
- * Re-issues a capture page's own declared device metrics. Chrome composes the capture of a selected tab from the window's fitted presentation rather than from the
200
- * emulated surface, and the override event is what re-selects the composition target: a capture composing the window's view of the page returns to the full
201
- * emulated surface, and a capture already composing that surface is left exactly as it was. Callable at any time, from anywhere, at any frequency, because the
202
- * values sent are the ones Puppeteer has already declared on this page - nothing about the page's emulation changes.
203
- *
204
- * The command is issued raw rather than through page.setViewport, which drops an override whose values match the standing one. It is the event, not a change of
205
- * values, that does the work here.
206
- * @param page - The page to re-affirm. A page carrying no explicitly declared density is left alone.
207
- * @throws Whatever the CDP send rejects with. Each trigger site decides whether that matters to it.
208
- */
209
- export async function reaffirmCaptureSurface(page) {
210
- /* An explicitly declared, positive density is precisely the mark of a capture page, which is what makes this function safe to fire at any page from any trigger.
211
- * A page PrismCast has not emulated carries no viewport at all and falls out on the first test; a page emulated for layout declares the display's own density
212
- * through Chrome's disable value of 0, which the positive test excludes. The narrowing runs in two steps because the send forwards the page's own dimensions as
213
- * well: the record is nullable, and its density is optional where CDP's field is required.
214
- */
215
- const viewport = page.viewport();
216
- if (!viewport) {
217
- return;
218
- }
219
- const deviceScaleFactor = viewport.deviceScaleFactor;
220
- if ((typeof deviceScaleFactor !== "number") || !(deviceScaleFactor > 0)) {
221
- return;
222
- }
223
- const session = await page.createCDPSession();
224
- try {
225
- await session.send("Emulation.setDeviceMetricsOverride", { deviceScaleFactor, height: viewport.height, mobile: false, width: viewport.width });
226
- }
227
- finally {
228
- /* The detach carries a catch of its own. A page that dies mid-send takes its session with it, and a throw raised out of this finally would replace the send's
229
- * rejection with a detach failure the caller can do nothing about - the send's own reason has to reach the caller unaltered.
230
- */
231
- try {
232
- await session.detach();
233
- }
234
- catch {
235
- // The session is already gone, which is the state the detach was asking for.
236
- }
237
- }
238
- }
239
188
  //# sourceMappingURL=cdp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cdp.js","sourceRoot":"","sources":["../../src/browser/cdp.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGvE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,kKAAkK;AAClK,mKAAmK;AACnK,oDAAoD;AACpD,MAAM,CAAC,MAAM,oBAAoB,GAAG,EA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AC5G,IAAI,EAAE,GAA8B,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,KAAuB,EAAW,EAAE,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC,CAAC;QAEpJ,IAAG,OAAO,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YAE/B;;;eAGG;YACH,GAAG,CAAC,IAAI,CAAC,sHAAsH,EAAE,yBAAyB,EACxJ,EAAE,WAAW,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;QACpC,CAAC;aAAM,CAAC;YAEN,GAAG,CAAC,KAAK,CAAC,mBAAmB,EAAE,iEAAiE,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5I,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,23 +1,26 @@
1
1
  import type { Browser, LaunchOptions, Page } from "puppeteer-core";
2
2
  import type { BrowserPurpose, CaptureImpairment } from "./browserSupervisor.ts";
3
+ import type { ChangeRejection, ConfigChange } from "../config/reactivity.ts";
4
+ import type { Config, Nullable } from "../types/index.ts";
3
5
  import { clearLoginState, isLoginModeActive } from "./login.ts";
4
6
  import { getAllStreams } from "../streaming/registry.ts";
5
7
  import { getCachedTabId } from "./tabSelection.ts";
6
8
  import type { Clock } from "homebridge-plugin-utils";
7
- import type { Nullable } from "../types/index.ts";
8
9
  import type { ProcessInfo } from "../utils/index.ts";
10
+ import type { SystemStatus } from "../streaming/statusEmitter.ts";
9
11
  import type { WindowPlacement } from "./cdp.ts";
10
12
  type CaptureProbe = (browser: Browser) => Promise<void>;
11
13
  /**
12
14
  * 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
13
- * 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.
15
+ * launch, since the streaming layer is imported during server startup). Separating the wiring from the call keeps browser/index.ts from importing
16
+ * streaming/setup.ts, which already imports this module, so the dependency stays one-directional.
14
17
  * @param probe - The probe to run against a freshly-launched browser; it resolves when the browser can capture and rejects when it cannot.
15
18
  */
16
19
  export declare function setCaptureProbe(probe: CaptureProbe): void;
17
20
  type StreamTerminator = (streamId: number, channelName: string, reason: string) => void;
18
21
  /**
19
22
  * Injects the authoritative stream terminator used when browser readiness is lost. Called once from streaming/lifecycle.ts at module load. Separating the wiring
20
- * from the call keeps browser/index.ts free of a streaming-layer import.
23
+ * from the call keeps browser/index.ts from importing streaming/lifecycle.ts, which already imports this module, so the dependency stays one-directional.
21
24
  * @param terminator - The function that tears down one stream and all of the resources it owns.
22
25
  */
23
26
  export declare function setStreamTerminator(terminator: StreamTerminator): void;
@@ -47,7 +50,7 @@ export declare function pickCarrierPage(pages: readonly Page[]): Nullable<Page>;
47
50
  * Records which window the shared one is, reading it from a page that sits in it.
48
51
  *
49
52
  * 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
50
- * 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.
53
+ * answer before anything asks for a capture tab.
51
54
  * @param browser - The browser whose shared window is being recorded.
52
55
  * @param page - A page that sits in that window.
53
56
  */
@@ -79,6 +82,13 @@ export type { LoginStatus } from "./login.ts";
79
82
  export { endLoginMode, getLoginPage, getLoginStatus, setLoginModeEndObserver, startLoginMode } from "./login.ts";
80
83
  export { BrowserCaptureImpairedError, BrowserSupersededError, BrowserUnavailableError } from "./browserSupervisor.ts";
81
84
  export type { BrowserPurpose, CaptureImpairment } from "./browserSupervisor.ts";
85
+ /**
86
+ * Thrown when the browser launched but its capture system failed a launch gate: the capture extension never became ready, or the capture probe found no
87
+ * working capture across its attempts. setupStream answers it as a capture-infrastructure failure by its type, so its message is free to state what happened.
88
+ */
89
+ export declare class CaptureLaunchError extends Error {
90
+ constructor(message: string, options?: ErrorOptions);
91
+ }
82
92
  /**
83
93
  * Brings the shared browser window into agreement with the visibility policy. This is the one entry point every layer uses - streaming, recovery, login,
84
94
  * precaching, and startup all call it and none of them decide window state themselves.
@@ -87,6 +97,25 @@ export type { BrowserPurpose, CaptureImpairment } from "./browserSupervisor.ts";
87
97
  * @returns A promise that resolves once a pass that began at or after this call has completed.
88
98
  */
89
99
  export declare function syncWindowVisibility(page?: Page): Promise<void>;
100
+ /**
101
+ * The facts a system status is composed from: the browser and capture state, and the process and registry readings taken beside them. One shape, read by
102
+ * emitCurrentSystemStatus and composed by composeSystemStatus, so the payload is a pure function of stated facts.
103
+ */
104
+ interface SystemStatusFacts {
105
+ readonly browser: Nullable<Pick<Browser, "connected">>;
106
+ readonly captureImpaired: boolean;
107
+ readonly memory: Pick<NodeJS.MemoryUsage, "heapUsed" | "rss">;
108
+ readonly pageCount: number;
109
+ readonly streams: SystemStatus["streams"];
110
+ readonly uptime: number;
111
+ }
112
+ /**
113
+ * Composes the system status the SSE bus carries. A browser reads as connected only when one is published and its connection is live, and the memory readings
114
+ * carry only the figures the status reports.
115
+ * @param facts - The browser and capture state and the process and registry readings, read at the moment the status is composed.
116
+ * @returns The system status.
117
+ */
118
+ export declare function composeSystemStatus(facts: SystemStatusFacts): SystemStatus;
90
119
  /**
91
120
  * Computes the current system status and emits it to SSE subscribers. Called when browser state changes significantly or when streams are added/removed.
92
121
  */
@@ -95,8 +124,8 @@ export declare function emitCurrentSystemStatus(): Promise<void>;
95
124
  * Registers a page as managed by PrismCast. This should be called immediately after creating a page via browser.newPage(). Registered pages are tracked for stale
96
125
  * page cleanup, while unregistered pages (manually opened, site popups, etc.) are left alone.
97
126
  *
98
- * 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
99
- * issues with Page object reference identity.
127
+ * Each registered page receives a unique ID that persists for the page's lifetime, read back through the Page reference by getManagedPageId. The staleness map,
128
+ * the in-flight set and the stale page cleanup's decision core all work on this stable string key rather than on Page objects.
100
129
  * @param page - The Puppeteer Page to register.
101
130
  * @param options - Registration options. Set inFlight when an operation owns the page for its duration but nothing the stale page cleanup reads records that
102
131
  * 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
@@ -113,11 +142,7 @@ export declare function registerManagedPage(page: Page, options?: {
113
142
  export declare function unregisterManagedPage(page: Page): void;
114
143
  /**
115
144
  * Ensures the data directory exists, creating it if necessary. This should be called during application startup before any operations that depend on the data
116
- * directory (like browser launch or extension preparation).
117
- *
118
- * The data directory stores:
119
- * - Chrome profile data (cookies, local storage, session state)
120
- * - Extension files (when running as a packaged executable)
145
+ * directory, browser launch above all, because the directory holds the Chrome profile data (cookies, local storage, session state).
121
146
  */
122
147
  export declare function ensureDataDirectory(): Promise<void>;
123
148
  /**
@@ -135,6 +160,20 @@ export declare function ensureDataDirectory(): Promise<void>;
135
160
  * @returns The PIDs to terminate, in process-table order.
136
161
  */
137
162
  export declare function findChromeProcessesUsingProfile(processes: readonly ProcessInfo[], profileDir: string, ownPid: number, isProcessAlive: (pid: number) => boolean): number[];
163
+ /**
164
+ * Finds a live Chrome outside this process that holds our profile directory. A Chrome holds the profile when it roots a tree of processes on the profile and the
165
+ * kill filter's ownership stage spares it, its parent alive and not this process. The test reads the root because Chrome's helpers carry the profile flag with
166
+ * the Chrome main as their parent, so a helper's parent, the main, is a live process that is not this one, and every helper of this process's own Chrome would
167
+ * otherwise read as a holder. It reads the ownership stage rather than a liveness test of its own so it stays in step with the kill filter: the sweep never keeps
168
+ * the files of a Chrome it ends nor removes those of one it spares. A helper whose parent lacks the profile flag reads as a root, so that error keeps the lock files
169
+ * rather than removing them, and the next sweep with no Chrome alive removes them.
170
+ * @param processes - The current process table snapshot: the sweep's scan from before its kill loop, or the teardown's scan once its Chrome has exited.
171
+ * @param profileDir - The Chrome user-data-dir to match against.
172
+ * @param ownPid - The current process's PID (a Chrome whose parent is us is ours, never a holder).
173
+ * @param isProcessAlive - Predicate that returns true when the given PID is currently a live process. Injected so tests do not depend on real PIDs.
174
+ * @returns The PID of the first holder in process-table order, or null when no live Chrome outside this process holds the profile.
175
+ */
176
+ export declare function findProfileHolder(processes: readonly ProcessInfo[], profileDir: string, ownPid: number, isProcessAlive: (pid: number) => boolean): Nullable<number>;
138
177
  /**
139
178
  * Ensures a clean slate for browser launch by terminating any stale Chrome processes and removing orphaned profile lock files. Chrome locks its profile
140
179
  * directory while running; if a previous instance crashed without releasing the lock, we cannot launch a new browser with the same profile. Discovery is done
@@ -146,13 +185,23 @@ export declare function findChromeProcessesUsingProfile(processes: readonly Proc
146
185
  * process exit handler: Chrome may be running normally (e.g., after a capture probe timeout) and an immediate SIGKILL would corrupt its profile databases,
147
186
  * poisoning the Docker volume for subsequent container restarts.
148
187
  *
149
- * The ownership filter makes this function safe to call from any context, including a rejected-duplicate startup's exit handler: a duplicate that never
150
- * spawned Chrome will find nothing matching its ownership criteria and signal nothing.
188
+ * The ownership filter and the holder test together make this function safe to call from any context, including a rejected-duplicate startup's exit handler: a
189
+ * duplicate that never spawned Chrome finds nothing matching its ownership criteria, signals nothing, and leaves the profile's lock files to the live Chrome
190
+ * that holds them.
151
191
  *
152
192
  * Called at startup before launching the browser and from the process exit handler as a crash recovery fallback. Safe to call when no stale processes or files
153
193
  * exist - the discovery and lock-file cleanup are both no-ops in the empty case.
154
194
  */
155
195
  export declare function killStaleChrome(): void;
196
+ /**
197
+ * Removes the profile's lock files and the DevTools port file unless a live Chrome outside this process holds the profile. Chrome writes these while running and
198
+ * removes them on clean shutdown, but an unclean exit (container kill, SIGKILL, crash) leaves them behind. Stale lock files prevent Chrome from acquiring the
199
+ * profile, and a stale DevToolsActivePort can confuse the Puppeteer connection. This is the one removal of those files, so each caller, the stale-Chrome sweep and
200
+ * the teardown primitive, reaches them through the holder test, and none removes them from under a live holder.
201
+ * @param processes - The process table the holder test reads: the sweep's scan from before its kill loop, or the teardown's scan once its Chrome has exited.
202
+ * @param profileDir - The Chrome user data directory path.
203
+ */
204
+ export declare function cleanStaleProfileFiles(processes: readonly ProcessInfo[], profileDir: string): void;
156
205
  /**
157
206
  * Seeds the extension developer-mode preference into the Chrome profile so the capture extension loads. Chrome loads an unpacked extension only when the profile
158
207
  * has extension developer mode enabled, and PrismCast's capture extension is loaded unpacked...without the flag the extension never registers and the capture
@@ -210,6 +259,18 @@ export declare function emulateLayoutSurface(page: Page): Promise<{
210
259
  height: number;
211
260
  width: number;
212
261
  }>;
262
+ /**
263
+ * Re-issues a capture page's own standing device-metrics override. Chrome composes the capture of a selected tab from the window's fitted presentation rather than
264
+ * from the emulated surface, and re-sending the page's standing override is what moves the composition back to the emulated surface, while a capture already
265
+ * composing that surface is left exactly as it was. Callable at any time, from anywhere, at any frequency, because the values sent are the ones Puppeteer has
266
+ * already declared on this page - nothing about the page's emulation changes.
267
+ *
268
+ * The re-issue goes through the page's own emulation session, the one Puppeteer keeps on the page's primary target, because the override is only as durable as
269
+ * the session that holds it and Chrome restores the window's view size when a session that declared one detaches.
270
+ * @param page - The page to re-affirm. A page carrying no explicitly declared density is left alone.
271
+ * @throws Whatever the viewport setter rejects with. Each trigger site decides whether that matters to it.
272
+ */
273
+ export declare function reaffirmCaptureSurface(page: Page): Promise<void>;
213
274
  /**
214
275
  * 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
215
276
  * 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
@@ -386,7 +447,8 @@ export declare function closeBrowser(): Promise<void>;
386
447
  export declare function cleanupStalePages(now: number): Promise<void>;
387
448
  /**
388
449
  * Starts the periodic stale page cleanup. This should be called once during server startup, after the browser is initialized. The sweep runs indefinitely until
389
- * stopStalePageCleanup() is called (typically during graceful shutdown). A second start while one is running changes nothing.
450
+ * stopStalePageCleanup() is called (typically during graceful shutdown), and a saved interval re-arms it through applyStalePageCleanupChanges(). A second start
451
+ * while one is running changes nothing.
390
452
  * @param clock - The clock the sweep's interval arms on and whose reading each sweep judges staleness against, so the cadence and the judgment share one time
391
453
  * source. Defaults to the system clock.
392
454
  */
@@ -396,6 +458,16 @@ export declare function startStalePageCleanup(clock?: Clock): void;
396
458
  * browser and streams. Disposing the registry drains the interval, and a stop with nothing running is a no-op.
397
459
  */
398
460
  export declare function stopStalePageCleanup(): void;
461
+ /**
462
+ * Re-arms the running stale-page sweep at a saved cleanup interval. The re-arm restarts the cadence from the save, so the next sweep runs one full interval after
463
+ * it, and the grace period needs nothing here, because each sweep already reads it when it runs. The handler reads the running sweep and never creates one, so a
464
+ * save before the boot's start or after the stop arms nothing, and a save can never resurrect a stopped sweep. The interval comes from the candidate, because
465
+ * the reconcile commits CONFIG only after its handlers run. Re-arming cannot fail, so the handler refuses nothing.
466
+ * @param _changes - The change to the cleanup interval; the candidate carries the interval, so the handler reads that instead.
467
+ * @param next - The candidate running configuration.
468
+ * @returns No rejections.
469
+ */
470
+ export declare function applyStalePageCleanupChanges(_changes: readonly ConfigChange[], next: Readonly<Config>): Promise<readonly ChangeRejection[]>;
399
471
  /**
400
472
  * The registry facts a restart's idleness decision is made from. One shape, read by readRestartFacts and judged by isBrowserIdleForRestart, so the decision stays
401
473
  * a pure function of stated facts rather than of whatever each guard happened to read.
@@ -421,6 +493,25 @@ interface RestartFacts {
421
493
  * @returns True when the browser may be torn down for this cause.
422
494
  */
423
495
  export declare function isBrowserIdleForRestart(cause: BrowserRestartCause, facts: RestartFacts): boolean;
496
+ /**
497
+ * The facts the maintenance quiet period is decided from. One shape, read by the restart check's tick and judged by decideRestartQuietPeriod, so the decision is
498
+ * a pure function of stated facts in the way the idleness decision is.
499
+ */
500
+ interface QuietPeriodFacts {
501
+ readonly age: number;
502
+ readonly quietPending: boolean;
503
+ readonly streamCount: number;
504
+ }
505
+ export type QuietPeriodAction = "arm" | "cancel" | "skip";
506
+ /**
507
+ * Decides what a restart check's tick does about the maintenance quiet period. A browser younger than BROWSER_MAX_AGE needs no maintenance, so the tick leaves
508
+ * the countdown as it stands. An old browser with streams registered waits for them: a countdown already running is cancelled, so a stream that starts during
509
+ * the quiet period resets it, and with no countdown running there is nothing to do. An old browser with an empty registry starts the countdown, unless one is
510
+ * already running.
511
+ * @param facts - The browser's age, the registry's size and the countdown's state, read at the tick.
512
+ * @returns The action the tick takes.
513
+ */
514
+ export declare function decideRestartQuietPeriod(facts: QuietPeriodFacts): QuietPeriodAction;
424
515
  /**
425
516
  * 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,
426
517
  * 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
@@ -435,7 +526,7 @@ export declare function restartBrowserIfImpairedAndIdle(): Promise<void>;
435
526
  /**
436
527
  * Starts the periodic browser restart eligibility check. This should be called once during server startup, after the browser is initialized. The check runs
437
528
  * indefinitely until stopBrowserRestartChecking() is called (typically during graceful shutdown). A second start while one is running changes nothing.
438
- * @param clock - The clock the check's interval and the quiet period it arms both run on. Defaults to the system clock.
529
+ * @param clock - The clock the check's interval and the quiet period it arms both run on, and the browser's age is measured on. Defaults to the system clock.
439
530
  */
440
531
  export declare function startBrowserRestartChecking(clock?: Clock): void;
441
532
  /**
@@ -443,13 +534,5 @@ export declare function startBrowserRestartChecking(clock?: Clock): void;
443
534
  * Disposing the registry drains the check and any pending quiet period together, and a stop with nothing running is a no-op.
444
535
  */
445
536
  export declare function stopBrowserRestartChecking(): void;
446
- /**
447
- * Extracts the Puppeteer Stream extension files when running as a packaged executable. This copies the extension files from within the packaged binary to the
448
- * filesystem where Chrome can load them.
449
- *
450
- * When running from source (not packaged), this function does nothing - puppeteer-stream can load the extension directly from node_modules.
451
- * @throws If extension extraction fails.
452
- */
453
- export declare function prepareExtension(): Promise<void>;
454
537
  export { acquireCaptureStream } from "./tabCapture.ts";
455
538
  export type { CaptureStream, CaptureStreamOptions } from "./tabCapture.ts";