agentroam-runtime-darwin-arm64 0.2.0-preview.79 → 0.2.0-preview.80

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 (338) hide show
  1. package/manifest.json +2 -2
  2. package/package.json +1 -1
  3. package/runtime/.next/BUILD_ID +1 -1
  4. package/runtime/.next/app-build-manifest.json +8 -8
  5. package/runtime/.next/app-path-routes-manifest.json +1 -1
  6. package/runtime/.next/build-manifest.json +3 -3
  7. package/runtime/.next/prerender-manifest.json +1 -1
  8. package/runtime/.next/required-server-files.json +1 -1
  9. package/runtime/.next/server/app/_not-found/page.js +1 -1
  10. package/runtime/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/runtime/.next/server/app/_not-found.html +1 -1
  12. package/runtime/.next/server/app/_not-found.rsc +2 -2
  13. package/runtime/.next/server/app/api/agent/abort/route.js +1 -1
  14. package/runtime/.next/server/app/api/agent/answer/route.js +1 -1
  15. package/runtime/.next/server/app/api/agent/codex-sharing/route.js +1 -1
  16. package/runtime/.next/server/app/api/agent/harness/status/route.js +1 -1
  17. package/runtime/.next/server/app/api/agent/model/route.js +1 -1
  18. package/runtime/.next/server/app/api/agent/models/route.js +1 -1
  19. package/runtime/.next/server/app/api/agent/run/route.js +1 -1
  20. package/runtime/.next/server/app/api/agent/runtime-health/route.js +1 -1
  21. package/runtime/.next/server/app/api/agent/steer/route.js +1 -1
  22. package/runtime/.next/server/app/api/agent/stream/route.js +3 -3
  23. package/runtime/.next/server/app/api/agent-workspaces/[workspaceId]/sessions/route.js +1 -1
  24. package/runtime/.next/server/app/api/agent-workspaces/route.js +1 -1
  25. package/runtime/.next/server/app/api/auth/verify/route.js +1 -1
  26. package/runtime/.next/server/app/api/business/route.js +1 -1
  27. package/runtime/.next/server/app/api/calendar/route.js +2 -2
  28. package/runtime/.next/server/app/api/client-logs/route.js +1 -1
  29. package/runtime/.next/server/app/api/collaboration/route.js +2 -2
  30. package/runtime/.next/server/app/api/engine-threads/route.js +1 -1
  31. package/runtime/.next/server/app/api/flow/v1/catalog/route.js +1 -1
  32. package/runtime/.next/server/app/api/flow/v1/runs/[runId]/cancel/route.js +1 -1
  33. package/runtime/.next/server/app/api/flow/v1/runs/[runId]/events/route.js +2 -2
  34. package/runtime/.next/server/app/api/flow/v1/runs/route.js +1 -1
  35. package/runtime/.next/server/app/api/flow-studio/config/route.js +1 -1
  36. package/runtime/.next/server/app/api/internal/todo-bootstrap/route.js +1 -1
  37. package/runtime/.next/server/app/api/internal/todo-mcp/route.js +1 -1
  38. package/runtime/.next/server/app/api/mcp/connect/route.js +1 -1
  39. package/runtime/.next/server/app/api/mcp/disconnect/route.js +1 -1
  40. package/runtime/.next/server/app/api/mcp/servers/route.js +1 -1
  41. package/runtime/.next/server/app/api/memory/[key]/route.js +1 -1
  42. package/runtime/.next/server/app/api/memory/route.js +1 -1
  43. package/runtime/.next/server/app/api/messaging/route.js +1 -1
  44. package/runtime/.next/server/app/api/notifications/[id]/ack/route.js +1 -1
  45. package/runtime/.next/server/app/api/notifications/[id]/route.js +1 -1
  46. package/runtime/.next/server/app/api/notifications/route.js +1 -1
  47. package/runtime/.next/server/app/api/notifications/stream/route.js +2 -2
  48. package/runtime/.next/server/app/api/plugins/load/route.js +1 -1
  49. package/runtime/.next/server/app/api/projects/[id]/route.js +1 -1
  50. package/runtime/.next/server/app/api/projects/check/route.js +1 -1
  51. package/runtime/.next/server/app/api/projects/directories/route.js +1 -1
  52. package/runtime/.next/server/app/api/projects/roots/route.js +1 -1
  53. package/runtime/.next/server/app/api/projects/route.js +1 -1
  54. package/runtime/.next/server/app/api/push/subscribe/route.js +2 -2
  55. package/runtime/.next/server/app/api/push/unsubscribe/route.js +3 -3
  56. package/runtime/.next/server/app/api/push/vapid/route.js +2 -2
  57. package/runtime/.next/server/app/api/remote-tools/register/route.js +1 -1
  58. package/runtime/.next/server/app/api/session-images/[id]/route.js +1 -1
  59. package/runtime/.next/server/app/api/session-views/route.js +1 -1
  60. package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/route.js +1 -1
  61. package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/stop/route.js +1 -1
  62. package/runtime/.next/server/app/api/sessions/[id]/background-jobs/route.js +1 -1
  63. package/runtime/.next/server/app/api/sessions/[id]/changes/route.js +2 -2
  64. package/runtime/.next/server/app/api/sessions/[id]/engine-switches/route.js +1 -1
  65. package/runtime/.next/server/app/api/sessions/[id]/fork/route.js +1 -1
  66. package/runtime/.next/server/app/api/sessions/[id]/fork-at/route.js +1 -1
  67. package/runtime/.next/server/app/api/sessions/[id]/goals/route.js +1 -1
  68. package/runtime/.next/server/app/api/sessions/[id]/handoff/route.js +1 -1
  69. package/runtime/.next/server/app/api/sessions/[id]/native-goal/route.js +1 -1
  70. package/runtime/.next/server/app/api/sessions/[id]/query-index/route.js +1 -1
  71. package/runtime/.next/server/app/api/sessions/[id]/release/route.js +1 -1
  72. package/runtime/.next/server/app/api/sessions/[id]/route.js +1 -1
  73. package/runtime/.next/server/app/api/sessions/[id]/switch-engine/route.js +1 -1
  74. package/runtime/.next/server/app/api/sessions/[id]/thread-goal/route.js +1 -1
  75. package/runtime/.next/server/app/api/sessions/[id]/thread-history/route.js +1 -1
  76. package/runtime/.next/server/app/api/sessions/[id]/tool-result/route.js +1 -1
  77. package/runtime/.next/server/app/api/sessions/parallel/route.js +1 -1
  78. package/runtime/.next/server/app/api/sessions/route.js +1 -1
  79. package/runtime/.next/server/app/api/settings/route.js +1 -1
  80. package/runtime/.next/server/app/api/skills/route.js +1 -1
  81. package/runtime/.next/server/app/api/todos/[id]/commands/route.js +1 -1
  82. package/runtime/.next/server/app/api/todos/[id]/executions/route.js +1 -1
  83. package/runtime/.next/server/app/api/todos/[id]/route.js +1 -1
  84. package/runtime/.next/server/app/api/todos/route.js +1 -1
  85. package/runtime/.next/server/app/api/tool-policies/[policyId]/route.js +1 -1
  86. package/runtime/.next/server/app/api/tool-policies/route.js +1 -1
  87. package/runtime/.next/server/app/api/tools/route.js +1 -1
  88. package/runtime/.next/server/app/api/update/check/route.js +1 -1
  89. package/runtime/.next/server/app/api/update/install/route.js +1 -1
  90. package/runtime/.next/server/app/api/update/status/route.js +1 -1
  91. package/runtime/.next/server/app/api/web-auth/login/route.js +1 -1
  92. package/runtime/.next/server/app/api/web-auth/logout/route.js +1 -1
  93. package/runtime/.next/server/app/api/web-auth/revoke-all/route.js +1 -1
  94. package/runtime/.next/server/app/api/web-auth/setup/route.js +1 -1
  95. package/runtime/.next/server/app/api/web-auth/status/route.js +1 -1
  96. package/runtime/.next/server/app/api/web-console/bootstrap/route.js +1 -1
  97. package/runtime/.next/server/app/api/web-console/computer-settings/route.js +1 -1
  98. package/runtime/.next/server/app/api/web-console/computers/route.js +1 -1
  99. package/runtime/.next/server/app/api/web-console/device-state/route.js +1 -1
  100. package/runtime/.next/server/app/api/web-console/history/route.js +1 -1
  101. package/runtime/.next/server/app/api/web-console/preferences/route.js +1 -1
  102. package/runtime/.next/server/app/api/workspace-changes/route.js +1 -1
  103. package/runtime/.next/server/app/web/page.js +4 -4
  104. package/runtime/.next/server/app/web/page_client-reference-manifest.js +1 -1
  105. package/runtime/.next/server/app-paths-manifest.json +33 -33
  106. package/runtime/.next/server/chunks/1298.js +1 -1
  107. package/runtime/.next/server/chunks/5303.js +1 -1
  108. package/runtime/.next/server/chunks/6703.js +1 -1
  109. package/runtime/.next/server/chunks/9119.js +2 -2
  110. package/runtime/.next/server/chunks/9457.js +1 -1
  111. package/runtime/.next/server/middleware-build-manifest.js +1 -1
  112. package/runtime/.next/server/pages/404.html +1 -1
  113. package/runtime/.next/server/pages/500.html +1 -1
  114. package/runtime/.next/server/server-reference-manifest.json +1 -1
  115. package/runtime/.next/static/chunks/app/web/{error-fac7681c6397fcd7.js → error-f313c4014e78cef5.js} +1 -1
  116. package/runtime/.next/static/chunks/app/web/layout-80fa1b5f4c96b0b5.js +1 -0
  117. package/runtime/.next/static/chunks/app/web/page-2e962377e57d3383.js +1 -0
  118. package/runtime/.next/static/chunks/{main-app-0c7cccb2825ad747.js → main-app-ea4c5663714943e2.js} +1 -1
  119. package/runtime/lib/device-pairing-gateway.mjs +1 -1
  120. package/runtime/lib/pairing-page.mjs +5 -4
  121. package/runtime/lib/pwa-assets.mjs +3 -0
  122. package/runtime/lib/tunnel-control.mjs +38 -3
  123. package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/MacOS/agentroam-remote-desktop +0 -0
  124. package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/Resources/agentroam-component.json +1 -1
  125. package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/_CodeSignature/CodeResources +2 -2
  126. package/runtime/node_modules/.package-lock.json +129 -129
  127. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs +79 -75
  128. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js +52 -52
  129. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-0e6mn0ck.mjs +17 -0
  130. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-0ssqfy51.mjs +18 -0
  131. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-82ghff97.mjs +39 -0
  132. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-82yhcz2x.mjs +17 -0
  133. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-b8jr1m8m.mjs +23 -0
  134. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-cj0jh226.mjs +17 -0
  135. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-ebtbxtjf.mjs +28 -0
  136. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-pb4erfqh.mjs +42 -0
  137. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-664d5mmy.mjs → core-q4cwy1ja.mjs} +2 -2
  138. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-rs058s2g.mjs +16 -0
  139. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-w6pv4szb.mjs +18 -0
  140. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-wjeh40nr.mjs +20 -0
  141. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-70sfhqm6.mjs → core-zn1abzvs.mjs} +2 -2
  142. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core.mjs +12 -12
  143. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.json +22 -22
  144. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json +26 -26
  145. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/package.json +23 -22
  146. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +83 -84
  147. package/runtime/node_modules/caniuse-lite/package.json +1 -1
  148. package/runtime/node_modules/mediabunny/README.md +0 -4
  149. package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.cjs +127 -185
  150. package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.cjs +11 -11
  151. package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.mjs +12 -12
  152. package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.mjs +127 -185
  153. package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.node.cjs +127 -185
  154. package/runtime/node_modules/mediabunny/dist/modules/src/adts/adts-demuxer.js +0 -4
  155. package/runtime/node_modules/mediabunny/dist/modules/src/aes.js +4 -6
  156. package/runtime/node_modules/mediabunny/dist/modules/src/hls/hls-demuxer.js +0 -6
  157. package/runtime/node_modules/mediabunny/dist/modules/src/hls/hls-segmented-input.js +5 -17
  158. package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-boxes.js +1 -2
  159. package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-demuxer.js +1 -12
  160. package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-muxer.js +18 -34
  161. package/runtime/node_modules/mediabunny/dist/modules/src/matroska/matroska-demuxer.js +0 -3
  162. package/runtime/node_modules/mediabunny/dist/modules/src/media-sink.js +8 -3
  163. package/runtime/node_modules/mediabunny/dist/modules/src/media-source.js +12 -5
  164. package/runtime/node_modules/mediabunny/dist/modules/src/misc.js +5 -19
  165. package/runtime/node_modules/mediabunny/dist/modules/src/mp3/mp3-demuxer.js +0 -4
  166. package/runtime/node_modules/mediabunny/dist/modules/src/mpeg-ts/mpeg-ts-demuxer.js +13 -22
  167. package/runtime/node_modules/mediabunny/dist/modules/src/mpeg-ts/mpeg-ts-muxer.js +2 -2
  168. package/runtime/node_modules/mediabunny/dist/modules/src/segmented-input.js +65 -70
  169. package/runtime/node_modules/mediabunny/dist/modules/src/tsconfig.tsbuildinfo +1 -1
  170. package/runtime/node_modules/mediabunny/dist/modules/src/version.js +1 -1
  171. package/runtime/node_modules/mediabunny/package.json +1 -1
  172. package/runtime/node_modules/mediabunny/src/adts/adts-demuxer.ts +0 -5
  173. package/runtime/node_modules/mediabunny/src/aes.ts +4 -7
  174. package/runtime/node_modules/mediabunny/src/hls/hls-demuxer.ts +0 -7
  175. package/runtime/node_modules/mediabunny/src/hls/hls-segmented-input.ts +6 -19
  176. package/runtime/node_modules/mediabunny/src/isobmff/isobmff-boxes.ts +1 -2
  177. package/runtime/node_modules/mediabunny/src/isobmff/isobmff-demuxer.ts +1 -15
  178. package/runtime/node_modules/mediabunny/src/isobmff/isobmff-muxer.ts +19 -37
  179. package/runtime/node_modules/mediabunny/src/matroska/matroska-demuxer.ts +0 -4
  180. package/runtime/node_modules/mediabunny/src/media-sink.ts +12 -3
  181. package/runtime/node_modules/mediabunny/src/media-source.ts +20 -5
  182. package/runtime/node_modules/mediabunny/src/misc.ts +5 -26
  183. package/runtime/node_modules/mediabunny/src/mp3/mp3-demuxer.ts +0 -5
  184. package/runtime/node_modules/mediabunny/src/mpeg-ts/mpeg-ts-demuxer.ts +19 -30
  185. package/runtime/node_modules/mediabunny/src/mpeg-ts/mpeg-ts-muxer.ts +2 -2
  186. package/runtime/node_modules/mediabunny/src/segmented-input.ts +79 -76
  187. package/runtime/node_modules/mediabunny/src/version.ts +1 -1
  188. package/runtime/package-lock.json +162 -162
  189. package/runtime/public/pwa/apple-touch-icon.png +0 -0
  190. package/runtime/public/pwa/icon-maskable-512.png +0 -0
  191. package/runtime/public/pwa/manifest.webmanifest +2 -1
  192. package/runtime/public/pwa/pairing-scan.js +32 -14
  193. package/runtime/server.js +1 -1
  194. package/runtime/webapp/dist/apple-touch-icon.png +0 -0
  195. package/runtime/webapp/dist/assets/{AIHubView-4kqTaPjO.js → AIHubView-CM6ugXG3.js} +1 -1
  196. package/runtime/webapp/dist/assets/{AgentManager-CDgiLqF_.js → AgentManager-dXI31b0a.js} +1 -1
  197. package/runtime/webapp/dist/assets/{AiHubPane-C070jRHe.js → AiHubPane-DFzC3nbd.js} +1 -1
  198. package/runtime/webapp/dist/assets/{App-iZlxRHaL.js → App-mF6ELC07.js} +4 -4
  199. package/runtime/webapp/dist/assets/{BrowserLivePanel-DxjgVXXK.js → BrowserLivePanel-CamAULwS.js} +1 -1
  200. package/runtime/webapp/dist/assets/{CalendarPage-CxPVBlzd.js → CalendarPage-BbYdGYWn.js} +1 -1
  201. package/runtime/webapp/dist/assets/{CalendarView-CS-OG-13.js → CalendarView-QfbrlL9X.js} +1 -1
  202. package/runtime/webapp/dist/assets/{CollaborationCreateDialog-tI6S1cha.js → CollaborationCreateDialog-CWhmFQtA.js} +1 -1
  203. package/runtime/webapp/dist/assets/{CollaborationDashboard-DSZa3Cns.js → CollaborationDashboard-XL5SnFOu.js} +1 -1
  204. package/runtime/webapp/dist/assets/{CollaborationPage-COyvllTJ.js → CollaborationPage-B1tiqgnG.js} +1 -1
  205. package/runtime/webapp/dist/assets/{FilePreview-CcJXlLge.js → FilePreview-CPY6dP8Q.js} +3 -3
  206. package/runtime/webapp/dist/assets/{FileTree-BuhW-pqR.js → FileTree-BBgrOian.js} +1 -1
  207. package/runtime/webapp/dist/assets/{FileWorkspaceDrawer-ByWXnJ0B.js → FileWorkspaceDrawer-BXDuKlrL.js} +1 -1
  208. package/runtime/webapp/dist/assets/{FlowStudioPane-CxQ-QIOf.js → FlowStudioPane-lnjLcd9c.js} +1 -1
  209. package/runtime/webapp/dist/assets/{HostProjectPicker--J4_JpSW.js → HostProjectPicker-DN_vGqQb.js} +1 -1
  210. package/runtime/webapp/dist/assets/{LSPServerList-fkagcDVv.js → LSPServerList-B-R7HDSP.js} +1 -1
  211. package/runtime/webapp/dist/assets/{MCPServerList-w7tetX3J.js → MCPServerList-CTc0iAwT.js} +1 -1
  212. package/runtime/webapp/dist/assets/{MemoryViewer-Xac9EeaV.js → MemoryViewer-Dzh_miRv.js} +1 -1
  213. package/runtime/webapp/dist/assets/{NewSessionWindow-C460-gxX.js → NewSessionWindow-zjqAUfKb.js} +1 -1
  214. package/runtime/webapp/dist/assets/{RemoteDesktopPage-BniHztmt.js → RemoteDesktopPage-9AhztqA2.js} +1 -1
  215. package/runtime/webapp/dist/assets/{RemoteDesktopTabBridge-BF1dFltY.js → RemoteDesktopTabBridge-BA_HQv3V.js} +1 -1
  216. package/runtime/webapp/dist/assets/{RunningSessionsIcon-D6rY-IzV.js → RunningSessionsIcon-BvFSI9OF.js} +1 -1
  217. package/runtime/webapp/dist/assets/{SessionDashboard-D868NjZ_.js → SessionDashboard-DcPPoXe2.js} +1 -1
  218. package/runtime/webapp/dist/assets/{SessionDashboardBridge-AhmhQ1Xn.js → SessionDashboardBridge-CjoeUy-v.js} +1 -1
  219. package/runtime/webapp/dist/assets/{SettingsPanel-DoDRBreZ.js → SettingsPanel-DmdXDQUm.js} +1 -1
  220. package/runtime/webapp/dist/assets/{SkillManager-Da7bpT-s.js → SkillManager-CS_skFZj.js} +1 -1
  221. package/runtime/webapp/dist/assets/{TaskPaneTerminal-DTDU88Rr.js → TaskPaneTerminal-BFHDRCb9.js} +1 -1
  222. package/runtime/webapp/dist/assets/{TerminalPane-_dVVs00I.js → TerminalPane-Dr_nY9pI.js} +1 -1
  223. package/runtime/webapp/dist/assets/TodoPage-guIvBCW0.js +1 -0
  224. package/runtime/webapp/dist/assets/{abnfDiagram-VCTEODGH-D3GW7M1R.js → abnfDiagram-VCTEODGH-FEEApB15.js} +1 -1
  225. package/runtime/webapp/dist/assets/{arc-CkEemU1L.js → arc-CycwMc2c.js} +1 -1
  226. package/runtime/webapp/dist/assets/{architectureDiagram-5GKGNRK7-GYQtcFLY.js → architectureDiagram-5GKGNRK7-BFq9JapX.js} +1 -1
  227. package/runtime/webapp/dist/assets/{blockDiagram-I7D4REHJ-D5_bj13P.js → blockDiagram-I7D4REHJ-DkOJ55Ag.js} +1 -1
  228. package/runtime/webapp/dist/assets/{c4Diagram-7LVT6UL2-Cyg1YunN.js → c4Diagram-7LVT6UL2-CRvi_3RM.js} +1 -1
  229. package/runtime/webapp/dist/assets/{calendar-days-B1Mn3x8A.js → calendar-days-CLwKstxM.js} +1 -1
  230. package/runtime/webapp/dist/assets/channel-BwDuyJO4.js +1 -0
  231. package/runtime/webapp/dist/assets/{check-D-yTByNl.js → check-8EVJMrTV.js} +1 -1
  232. package/runtime/webapp/dist/assets/{chevron-down-hiPnZS_M.js → chevron-down-ChNxfI2x.js} +1 -1
  233. package/runtime/webapp/dist/assets/{chevron-right-DKsui_wS.js → chevron-right-Cbkc_d70.js} +1 -1
  234. package/runtime/webapp/dist/assets/{chunk-2Q5K7J3B-ZYdmLJUM.js → chunk-2Q5K7J3B-Cklzvs8u.js} +1 -1
  235. package/runtime/webapp/dist/assets/{chunk-5VM5RSS4-C-zA5MxE.js → chunk-5VM5RSS4-NxozE5UP.js} +1 -1
  236. package/runtime/webapp/dist/assets/{chunk-F27PBJKO-cWERJSPb.js → chunk-F27PBJKO-Dyb8E7YM.js} +1 -1
  237. package/runtime/webapp/dist/assets/{chunk-IMKFNOWR-BDqkH2_j.js → chunk-IMKFNOWR-BqbMMc1n.js} +1 -1
  238. package/runtime/webapp/dist/assets/{chunk-JWPE2WC7-D0hOf4wm.js → chunk-JWPE2WC7-do0R2H6U.js} +1 -1
  239. package/runtime/webapp/dist/assets/{chunk-POPQ4Y6H-bGKHqXLU.js → chunk-POPQ4Y6H-B2HIaynf.js} +1 -1
  240. package/runtime/webapp/dist/assets/{chunk-SVP7TREG-DbzwWcno.js → chunk-SVP7TREG-C_zmjkwn.js} +1 -1
  241. package/runtime/webapp/dist/assets/{chunk-TICWLB2K-CmCx8YTb.js → chunk-TICWLB2K-Dh2bZgM1.js} +1 -1
  242. package/runtime/webapp/dist/assets/{chunk-XXDRQBXY-COAufrJq.js → chunk-XXDRQBXY-CnqciVDz.js} +1 -1
  243. package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-BfyV8P0w.js +1 -0
  244. package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-BfyV8P0w.js +1 -0
  245. package/runtime/webapp/dist/assets/{client-5Hu1eVTX.js → client-I0ZVCjOI.js} +1 -1
  246. package/runtime/webapp/dist/assets/{codeSyntax-Jy5nWtHv.js → codeSyntax-C8n4_KZS.js} +1 -1
  247. package/runtime/webapp/dist/assets/{collaboration-DRFqpcAz.js → collaboration-lVxWL5ce.js} +1 -1
  248. package/runtime/webapp/dist/assets/{composer-file-routing-BtvXnu_o.js → composer-file-routing-qSvJpT-v.js} +1 -1
  249. package/runtime/webapp/dist/assets/{cose-bilkent-JH36ORCC-BU8MmGqT.js → cose-bilkent-JH36ORCC-CulKVUkj.js} +1 -1
  250. package/runtime/webapp/dist/assets/{cynefin-OW5HDTMX-BHXgPQGq.js → cynefin-OW5HDTMX-C1LUI1_G.js} +1 -1
  251. package/runtime/webapp/dist/assets/{cynefinDiagram-5FMLGOSQ-DSJJ_PpM.js → cynefinDiagram-5FMLGOSQ-D3Ymzw_P.js} +1 -1
  252. package/runtime/webapp/dist/assets/{dagre-GXQ25YYZ-pJr8jDyF.js → dagre-GXQ25YYZ-DRaL0cGu.js} +1 -1
  253. package/runtime/webapp/dist/assets/{diagram-S7CK7UJ4-BZ_7PPQn.js → diagram-S7CK7UJ4-D8gLHoZo.js} +1 -1
  254. package/runtime/webapp/dist/assets/{diagram-UQ7AKVKN-c8pu5Rp4.js → diagram-UQ7AKVKN-CaVU0aQT.js} +1 -1
  255. package/runtime/webapp/dist/assets/{diagram-VSXAHHWV-D1xao_j-.js → diagram-VSXAHHWV-LFAKRvZz.js} +1 -1
  256. package/runtime/webapp/dist/assets/{diagram-VX7I27RA-CnBWGCHa.js → diagram-VX7I27RA-DXpxUERc.js} +1 -1
  257. package/runtime/webapp/dist/assets/{diagram-Z3DM3KII-D-TCo4OF.js → diagram-Z3DM3KII-vAiik55G.js} +1 -1
  258. package/runtime/webapp/dist/assets/{download-B2jLl85N.js → download-BE31-Qm0.js} +1 -1
  259. package/runtime/webapp/dist/assets/{ebnfDiagram-PWID7BFC-BGBuf1T3.js → ebnfDiagram-PWID7BFC-MaFL7Kgb.js} +1 -1
  260. package/runtime/webapp/dist/assets/{erDiagram-RLTQ6QDP-D8rCYH4y.js → erDiagram-RLTQ6QDP-DuEu79B3.js} +1 -1
  261. package/runtime/webapp/dist/assets/{file-types-BZ8YZAV-.js → file-types-ZVLWtslN.js} +1 -1
  262. package/runtime/webapp/dist/assets/{flowDiagram-HODETNUW-BJGQL6in.js → flowDiagram-HODETNUW-BAQ6nP2D.js} +1 -1
  263. package/runtime/webapp/dist/assets/{ganttDiagram-EL5Y4UJY-K9o-Kk2M.js → ganttDiagram-EL5Y4UJY-C48VBnPy.js} +1 -1
  264. package/runtime/webapp/dist/assets/{gitGraphDiagram-WWUBYQGX-BC2r8pLT.js → gitGraphDiagram-WWUBYQGX-BfWAh9Kr.js} +1 -1
  265. package/runtime/webapp/dist/assets/{history-Ci0s2eVL.js → history-D4E3D_aM.js} +1 -1
  266. package/runtime/webapp/dist/assets/{image-plus-Cx4LQVvj.js → image-plus-DQV_EEAN.js} +1 -1
  267. package/runtime/webapp/dist/assets/{index-D1AQffdA.js → index-DSgLFE4Q.js} +3 -3
  268. package/runtime/webapp/dist/assets/{infoDiagram-27XIBGKW-bFnrh7W7.js → infoDiagram-27XIBGKW-BM7P_-u_.js} +1 -1
  269. package/runtime/webapp/dist/assets/{ishikawaDiagram-5VMMS53U-Qun77xRt.js → ishikawaDiagram-5VMMS53U-Cwd8XR-p.js} +1 -1
  270. package/runtime/webapp/dist/assets/{journeyDiagram-3NMN7TZE-DjCfoBNX.js → journeyDiagram-3NMN7TZE-MOgiksTh.js} +1 -1
  271. package/runtime/webapp/dist/assets/{kanban-definition-UXKFOSKX-BJGlhVsx.js → kanban-definition-UXKFOSKX-DulC5OLL.js} +1 -1
  272. package/runtime/webapp/dist/assets/{layout-CYTxygXU.js → layout-Dku9sXQ7.js} +1 -1
  273. package/runtime/webapp/dist/assets/{linear-CzJGOwUm.js → linear-B3-dddD7.js} +1 -1
  274. package/runtime/webapp/dist/assets/{list-todo-CP9DqU2D.js → list-todo-Bik5IY2r.js} +1 -1
  275. package/runtime/webapp/dist/assets/{loader-circle-xEKTnlp3.js → loader-circle-C5C-IzGK.js} +1 -1
  276. package/runtime/webapp/dist/assets/{locate-fixed-CfEojGOl.js → locate-fixed-CHkezEEh.js} +1 -1
  277. package/runtime/webapp/dist/assets/{mermaid.core-BTbaaIjb.js → mermaid.core-CRRXKysA.js} +5 -5
  278. package/runtime/webapp/dist/assets/{mindmap-definition-YA3MSWOX-eiKdbp4J.js → mindmap-definition-YA3MSWOX-CaaP-nEb.js} +1 -1
  279. package/runtime/webapp/dist/assets/{mobileViewport-DF1R6qR2.js → mobileViewport-CekmYKqS.js} +1 -1
  280. package/runtime/webapp/dist/assets/{new-session-window-BtGAiW4A.css → new-session-window-BfDMd-h3.css} +1 -1
  281. package/runtime/webapp/dist/assets/{new-session-window-BFILhYAe.js → new-session-window-Dgl7UWPR.js} +26 -26
  282. package/runtime/webapp/dist/assets/page-_fFyRId-.js +86 -0
  283. package/runtime/webapp/dist/assets/{pause-C-ecDo3W.js → pause-BsmUCuwZ.js} +1 -1
  284. package/runtime/webapp/dist/assets/{pegDiagram-XKGWAZYB-BuvePvoF.js → pegDiagram-XKGWAZYB-BqybPEwk.js} +1 -1
  285. package/runtime/webapp/dist/assets/{pieDiagram-E7YTZNPT-Csgh2lYE.js → pieDiagram-E7YTZNPT-BX1H2lh2.js} +1 -1
  286. package/runtime/webapp/dist/assets/{pin-CjmuX5Tq.js → pin-BsEEYq8M.js} +1 -1
  287. package/runtime/webapp/dist/assets/{quadrantDiagram-AXDQQJYC-8Bbl_RHv.js → quadrantDiagram-AXDQQJYC-Btnywv1k.js} +1 -1
  288. package/runtime/webapp/dist/assets/{railroadDiagram-O6MQD6OU-CvYQkIeK.js → railroadDiagram-O6MQD6OU-Da_TV1ER.js} +1 -1
  289. package/runtime/webapp/dist/assets/{requirementDiagram-BXWQKSXE-CytOuQX4.js → requirementDiagram-BXWQKSXE-5V1Aow9h.js} +1 -1
  290. package/runtime/webapp/dist/assets/{rotate-ccw-HY6j6nBt.js → rotate-ccw-BbSby0GQ.js} +1 -1
  291. package/runtime/webapp/dist/assets/{rotate-cw-CyYR2IEw.js → rotate-cw-BMdX-ln4.js} +1 -1
  292. package/runtime/webapp/dist/assets/{sankeyDiagram-P5KCCOFB-BoyI7ZhF.js → sankeyDiagram-P5KCCOFB-D_OIVihV.js} +1 -1
  293. package/runtime/webapp/dist/assets/{send-jSK0YaRl.js → send-Cb7EWSJF.js} +1 -1
  294. package/runtime/webapp/dist/assets/{sequenceDiagram-WJ2MYXX4-Ckvtmn2N.js → sequenceDiagram-WJ2MYXX4-LKeF5Mri.js} +1 -1
  295. package/runtime/webapp/dist/assets/{session-dashboard-B4lyuZYF.js → session-dashboard-BFqNDCc8.js} +1 -1
  296. package/runtime/webapp/dist/assets/{session-tree-CEy-pW8A.js → session-tree-BK_qaCnb.js} +1 -1
  297. package/runtime/webapp/dist/assets/{shield-check-CFebh9do.js → shield-check-C-r87aMq.js} +1 -1
  298. package/runtime/webapp/dist/assets/{sizeCapture-INFHLROL-yUQjHNrI.js → sizeCapture-INFHLROL-B6j7Q_MN.js} +1 -1
  299. package/runtime/webapp/dist/assets/{stateDiagram-D77RDMKH-Dj8oPHDB.js → stateDiagram-D77RDMKH-zhPFqHdQ.js} +1 -1
  300. package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-DWnBZAiI.js +1 -0
  301. package/runtime/webapp/dist/assets/{swimlanes-42K2YHIH-GDjg8QNS.js → swimlanes-42K2YHIH-C_FCENx1.js} +1 -1
  302. package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-DOZCbCJP.js +8 -0
  303. package/runtime/webapp/dist/assets/{timeline-definition-24CTP7MA-DFDHsxzp.js → timeline-definition-24CTP7MA-C3DBXjDU.js} +1 -1
  304. package/runtime/webapp/dist/assets/{trash-2-BF9eI5Bh.js → trash-2-DjggJGbw.js} +1 -1
  305. package/runtime/webapp/dist/assets/{types-BuPq0iQM.js → types-BQCEWNQz.js} +1 -1
  306. package/runtime/webapp/dist/assets/{use-session-activity-Ceb8OBjB.js → use-session-activity-BbTXGW7Z.js} +1 -1
  307. package/runtime/webapp/dist/assets/{vennDiagram-4TSXK5OY-DR5HBqo1.js → vennDiagram-4TSXK5OY-CssdTIB0.js} +1 -1
  308. package/runtime/webapp/dist/assets/{wardleyDiagram-VM6X3IG4-Bb6pROnE.js → wardleyDiagram-VM6X3IG4-C58K2vVU.js} +1 -1
  309. package/runtime/webapp/dist/assets/{web-BV7fxnr4.js → web-B4y8vdRZ.js} +1 -1
  310. package/runtime/webapp/dist/assets/{web-C8kCU9om.js → web-D9rJZXHW.js} +1 -1
  311. package/runtime/webapp/dist/assets/{x-uSekqXJV.js → x-BYUglEo9.js} +1 -1
  312. package/runtime/webapp/dist/assets/{xychartDiagram-S5SC5T6Z-CrpaVklx.js → xychartDiagram-S5SC5T6Z-CQi8bD6A.js} +1 -1
  313. package/runtime/webapp/dist/assets/{zoom-out-B59mGU6c.js → zoom-out-iMMWRXJs.js} +1 -1
  314. package/runtime/webapp/dist/index.html +2 -2
  315. package/runtime/.next/static/chunks/app/web/layout-79492e587e5930cf.js +0 -1
  316. package/runtime/.next/static/chunks/app/web/page-0f06deb6eb4d49e0.js +0 -1
  317. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-2g5j09ba.mjs +0 -16
  318. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-59ydwk0g.mjs +0 -17
  319. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-95gcz3n1.mjs +0 -38
  320. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-ew5sfvfe.mjs +0 -39
  321. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-gjhs7gf6.mjs +0 -20
  322. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-kvdt1szx.mjs +0 -18
  323. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-p654hjkr.mjs +0 -22
  324. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-q9bjbxkv.mjs +0 -19
  325. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-samdvsjh.mjs +0 -33
  326. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-x6bt758j.mjs +0 -17
  327. package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.worker.js +0 -8
  328. package/runtime/node_modules/mediabunny/dist/modules/src/worker.js +0 -26
  329. package/runtime/node_modules/mediabunny/src/worker.ts +0 -28
  330. package/runtime/webapp/dist/assets/TodoPage-Bqu8bqNk.js +0 -1
  331. package/runtime/webapp/dist/assets/channel-CnNsi-lz.js +0 -1
  332. package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-DVRTvUTS.js +0 -1
  333. package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-DVRTvUTS.js +0 -1
  334. package/runtime/webapp/dist/assets/page-B-CkpInM.js +0 -86
  335. package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-Csg946NK.js +0 -1
  336. package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-BUnuRfXp.js +0 -8
  337. /package/runtime/.next/static/{Ra6nQooMsDWN9-yjPL93f → 57IUKkg-db8mOGDMma8be}/_buildManifest.js +0 -0
  338. /package/runtime/.next/static/{Ra6nQooMsDWN9-yjPL93f → 57IUKkg-db8mOGDMma8be}/_ssgManifest.js +0 -0
@@ -259,8 +259,10 @@ export const createAes128CbcDecryptStream = (
259
259
  return new ReadableStream<Uint8Array>({
260
260
  pull: async (controller) => {
261
261
  try {
262
- const initPromise = initted ? null : Promise.resolve(getInit());
263
- void initPromise?.catch(() => {}); // Awaited below
262
+ if (!initted) {
263
+ aesContext.init(await getInit());
264
+ initted = true;
265
+ }
264
266
 
265
267
  const requestedLength = CHUNK_SIZE + BLOCK_SIZE;
266
268
 
@@ -283,11 +285,6 @@ export const createAes128CbcDecryptStream = (
283
285
  const input = readBytes(nextSlice, bytesToRead);
284
286
  const output = new Uint8Array(bytesToRead);
285
287
 
286
- if (initPromise) {
287
- aesContext.init(await initPromise);
288
- initted = true;
289
- }
290
-
291
288
  for (let i = 0; i < bytesToRead; i += 16) {
292
289
  aesContext.in.set(input.subarray(i, i + 16));
293
290
  aesContext.decrypt();
@@ -842,19 +842,16 @@ abstract class HlsInputTrackBacking implements InputTrackBacking {
842
842
  }
843
843
 
844
844
  async getFirstPacket(options: PacketRetrievalOptions): Promise<EncodedPacket | null> {
845
- this.prefetchReferencePlaylist();
846
845
  await this.hydrate();
847
846
  return this.internalTrack.backingTrack!.getFirstPacket(options);
848
847
  }
849
848
 
850
849
  async getPacket(timestamp: number, options: PacketRetrievalOptions): Promise<EncodedPacket | null> {
851
- this.prefetchReferencePlaylist();
852
850
  await this.hydrate();
853
851
  return this.internalTrack.backingTrack!.getPacket(timestamp, options);
854
852
  }
855
853
 
856
854
  async getKeyPacket(timestamp: number, options: PacketRetrievalOptions): Promise<EncodedPacket | null> {
857
- this.prefetchReferencePlaylist();
858
855
  await this.hydrate();
859
856
  return this.internalTrack.backingTrack!.getKeyPacket(timestamp, options);
860
857
  }
@@ -868,10 +865,6 @@ abstract class HlsInputTrackBacking implements InputTrackBacking {
868
865
  await this.hydrate();
869
866
  return this.internalTrack.backingTrack!.getNextKeyPacket(packet, options);
870
867
  }
871
-
872
- prefetchReferencePlaylist() {
873
- void this.internalTrack.demuxer.getReferenceSegmentedInput().getFirstSegment().catch(() => {});
874
- }
875
868
  }
876
869
 
877
870
  class HlsInputVideoTrackBacking
@@ -676,16 +676,8 @@ export class HlsSegmentedInput extends SegmentedInput {
676
676
  }
677
677
 
678
678
  let initInput: Input | null = null;
679
- if (hlsSegment.initSegment) {
680
- initInput = this.getInputForSegment(hlsSegment.initSegment);
681
-
682
- // Fetch the init input's data immediately to avoid the serial request chain of first having to go through
683
- // the segment before the init section is even requested. Reduces latency.
684
- void initInput.getTracks().catch(() => {});
685
- } else if (hlsSegment.firstSegment) {
686
- // Don't prefetch this one. It's only needed in rare cases, like MPEG-TS segments that are missing media
687
- // initialization, so it's not generally worth it to prefetch this.
688
- initInput = this.getInputForSegment(hlsSegment.firstSegment);
679
+ if (hlsSegment.initSegment || hlsSegment.firstSegment) {
680
+ initInput = this.getInputForSegment((hlsSegment.initSegment ?? hlsSegment.firstSegment)!);
689
681
  }
690
682
 
691
683
  const formatOptions: InputFormatOptions = {
@@ -847,19 +839,17 @@ export class HlsSegmentedInput extends SegmentedInput {
847
839
 
848
840
  getFirstSegmentTimestampOffset() {
849
841
  return this.segmentTimestampOffsetPromise ??= (async () => {
842
+ const firstSegment = await this.getFirstSegment();
843
+ assert(firstSegment);
844
+
850
845
  const referenceSegmentedInput = this.demuxer.getReferenceSegmentedInput();
851
846
  if (this === referenceSegmentedInput) {
852
847
  return 0;
853
848
  }
854
849
 
855
- const [firstSegment, referenceFirstSegment] = await Promise.all([
856
- this.getFirstSegment(),
857
- referenceSegmentedInput.getFirstSegment(),
858
- ]);
859
- assert(firstSegment);
860
-
861
850
  // An offset of 0 is only safe (= close enough) if we start at the same point as the reference: either both
862
851
  // of us list all segments since the presentation's start, or both of us are on date-time-based timelines
852
+ const referenceFirstSegment = await referenceSegmentedInput.getFirstSegment();
863
853
  if (
864
854
  referenceFirstSegment
865
855
  && (
@@ -877,9 +867,6 @@ export class HlsSegmentedInput extends SegmentedInput {
877
867
  // that we need
878
868
 
879
869
  const input = this.getInputForSegment(firstSegment);
880
- // Kick this off early so it runs in parallel to loading our own media
881
- void this.getMediaOffsetForDiscontinuity(firstSegment.discontinuityNumber).catch(() => {});
882
-
883
870
  if (await this.getRawTimestampOffset(input) === null) {
884
871
  return 0;
885
872
  }
@@ -1641,8 +1641,7 @@ export const tfdt = (trackData: IsobmffTrackData) => {
1641
1641
  assert(trackData.currentChunk);
1642
1642
 
1643
1643
  return fullBox('tfdt', 1, 0, [
1644
- // Base Media Decode Time
1645
- u64(intoTimescale(trackData.currentChunk.samples[0]!.decodeTimestamp, trackData.timescale)),
1644
+ u64(intoTimescale(trackData.currentChunk.startTimestamp, trackData.timescale)), // Base Media Decode Time
1646
1645
  ]);
1647
1646
  };
1648
1647
 
@@ -473,11 +473,7 @@ export class IsobmffDemuxer extends Demuxer {
473
473
  currentPos = startPos + boxInfo.totalSize;
474
474
  }
475
475
 
476
- if (!foundMovieBoxes) {
477
- if (!this.input._initInput) {
478
- throw new Error('No "moov" box found; the file is invalid or incomplete.');
479
- }
480
-
476
+ if (!foundMovieBoxes && this.input._initInput) {
481
477
  // A segment file is allowed to hold zero fragments, in which case there's no moof box to key off of.
482
478
  // It's still a perfectly valid segment, so let's take the tracks from the init input.
483
479
  await this.copyMetadataFromInitInput(this.input._initInput);
@@ -3544,11 +3540,6 @@ abstract class IsobmffTrackBacking implements InputTrackBacking {
3544
3540
  return null;
3545
3541
  }
3546
3542
 
3547
- const fileSize = this.internalTrack.demuxer.reader.fileSize;
3548
- if (fileSize !== null && sampleInfo.sampleOffset + sampleInfo.sampleSize > fileSize) {
3549
- return null; // Data is definitely outside
3550
- }
3551
-
3552
3543
  let data: Uint8Array;
3553
3544
  if (options.metadataOnly && this.internalTrack.info?.codec !== 'eac3') { // E-AC-3 is split by its data
3554
3545
  data = PLACEHOLDER_DATA;
@@ -3621,11 +3612,6 @@ abstract class IsobmffTrackBacking implements InputTrackBacking {
3621
3612
  const fragmentSample = trackData.samples[sampleIndex];
3622
3613
  assert(fragmentSample);
3623
3614
 
3624
- const fileSize = this.internalTrack.demuxer.reader.fileSize;
3625
- if (fileSize !== null && fragmentSample.byteOffset + fragmentSample.byteSize > fileSize) {
3626
- return null; // Data is definitely outside
3627
- }
3628
-
3629
3615
  let data: Uint8Array;
3630
3616
  if (options.metadataOnly && this.internalTrack.info?.codec !== 'eac3') { // E-AC-3 is split by its data
3631
3617
  data = PLACEHOLDER_DATA;
@@ -1128,9 +1128,7 @@ export class IsobmffMuxer extends Muxer {
1128
1128
  return;
1129
1129
  }
1130
1130
 
1131
- const queue = trackData.timestampProcessingQueue;
1132
- const sortedTimestamps = queue.map(x => x.timestamp).sort((a, b) => a - b);
1133
- const firstTimestampInTimescale = intoTimescale(sortedTimestamps[0]!, trackData.timescale);
1131
+ const sortedTimestamps = trackData.timestampProcessingQueue.map(x => x.timestamp).sort((a, b) => a - b);
1134
1132
 
1135
1133
  if (this.isFragmented) {
1136
1134
  trackData.startTimestampOffset ??= Math.min(sortedTimestamps[0]!, 0);
@@ -1138,31 +1136,17 @@ export class IsobmffMuxer extends Muxer {
1138
1136
  trackData.startTimestampOffset ??= sortedTimestamps[0]!;
1139
1137
  }
1140
1138
 
1141
- // Since the user only supplies presentation time & decode order, we have to reverse-engineer from that a
1142
- // sensible decode timestamp, which is a concept in ISOBMFF: we hand out the sorted presentation timestamps in
1143
- // decode order. The first group starts at its lowest timestamp, every following group exactly where the
1144
- // previous one ended, so that there are no gaps or overlaps in the decode timeline.
1145
- let groupStartTimescaleUnits: number;
1146
- if (trackData.lastTimescaleUnits === null) {
1147
- groupStartTimescaleUnits = firstTimestampInTimescale;
1148
- } else {
1149
- assert(trackData.lastSample);
1150
- groupStartTimescaleUnits = Math.round(trackData.lastTimescaleUnits)
1151
- + trackData.lastSample.timescaleUnitsToNextSample;
1152
- }
1153
-
1154
- let lastDecodeStep = 0;
1139
+ for (let i = 0; i < trackData.timestampProcessingQueue.length; i++) {
1140
+ const sample = trackData.timestampProcessingQueue[i]!;
1155
1141
 
1156
- for (let i = 0; i < queue.length; i++) {
1157
- const sample = queue[i]!;
1158
-
1159
- const decodeTimescaleUnits = groupStartTimescaleUnits
1160
- + intoTimescale(sortedTimestamps[i]!, trackData.timescale)
1161
- - firstTimestampInTimescale;
1162
- sample.decodeTimestamp = decodeTimescaleUnits / trackData.timescale;
1142
+ // Since the user only supplies presentation time, but these may be out of order, we reverse-engineer from
1143
+ // that a sensible decode timestamp. The notion of a decode timestamp doesn't really make sense
1144
+ // (presentation timestamp & decode order are all you need), but it is a concept in ISOBMFF so we need to
1145
+ // model it.
1146
+ sample.decodeTimestamp = sortedTimestamps[i]!;
1163
1147
 
1164
1148
  const sampleCompositionTimeOffset
1165
- = intoTimescale(sample.timestamp, trackData.timescale) - decodeTimescaleUnits;
1149
+ = intoTimescale(sample.timestamp - sample.decodeTimestamp, trackData.timescale);
1166
1150
  const durationInTimescale = intoTimescale(sample.duration, trackData.timescale);
1167
1151
 
1168
1152
  if (trackData.lastTimescaleUnits !== null) {
@@ -1174,7 +1158,6 @@ export class IsobmffMuxer extends Muxer {
1174
1158
 
1175
1159
  trackData.lastTimescaleUnits += delta;
1176
1160
  trackData.lastSample.timescaleUnitsToNextSample = delta;
1177
- lastDecodeStep = delta;
1178
1161
 
1179
1162
  if (!this.isFragmented) {
1180
1163
  let lastTableEntry = last(trackData.timeToSampleTable);
@@ -1251,17 +1234,16 @@ export class IsobmffMuxer extends Muxer {
1251
1234
  assert(trackData.lastSample);
1252
1235
  assert(trackData.lastTimescaleUnits !== null);
1253
1236
 
1254
- if (nextSample) {
1255
- // The last sample fills the time until the next key frame, where the next group starts. The next sample
1256
- // will also set the last sample's duration, but the last sample may get written before that.
1257
- const nextTimestampInTimescale = intoTimescale(nextSample.timestamp, trackData.timescale);
1258
- trackData.lastSample.timescaleUnitsToNextSample = Math.max(
1259
- nextTimestampInTimescale - Math.round(trackData.lastTimescaleUnits),
1260
- // With open GOPs, the last sample's decode timestamp may already lie past the next key frame. Then, it
1261
- // still gets a regular decode step to keep decode timestamps strictly increasing, and the next group
1262
- // starts later. If we didn't do this, we'd get duplicate DTSs.
1263
- lastDecodeStep,
1264
- );
1237
+ if (nextSample !== undefined && trackData.lastSample.timescaleUnitsToNextSample === 0) {
1238
+ assert(nextSample.type === 'key');
1239
+
1240
+ // Given the next sample, we can make a guess about the duration of the last sample. This avoids having
1241
+ // the last sample's duration in each fragment be "0" for fragmented files. The guess we make here is
1242
+ // actually correct most of the time, since typically, no delta frame with a lower timestamp follows the key
1243
+ // frame (although it can happen).
1244
+ const timescaleUnits = intoTimescale(nextSample.timestamp, trackData.timescale, false);
1245
+ const delta = Math.round(timescaleUnits - trackData.lastTimescaleUnits);
1246
+ trackData.lastSample.timescaleUnitsToNextSample = delta;
1265
1247
  }
1266
1248
  }
1267
1249
 
@@ -438,10 +438,6 @@ export class MatroskaDemuxer extends Demuxer {
438
438
  assertDefinedSize(size);
439
439
  currentPos = dataStartPos + size;
440
440
  }
441
-
442
- if (this.segments.length === 0) {
443
- throw new Error('No Segment element found; the file is invalid or incomplete.');
444
- }
445
441
  })();
446
442
  }
447
443
 
@@ -34,7 +34,6 @@ import {
34
34
  CallSerializer,
35
35
  clamp,
36
36
  colorSpaceIsComplete,
37
- createWorker,
38
37
  getInt24,
39
38
  getUint24,
40
39
  insertSorted,
@@ -1611,6 +1610,8 @@ class VideoDecoderWrapper extends DecoderWrapper<VideoSample> {
1611
1610
  }
1612
1611
  }
1613
1612
 
1613
+ let mergerWorkerUrl: string | null = null;
1614
+
1614
1615
  /** Utility class that merges together color and alpha information on the CPU in a pool of workers. */
1615
1616
  export class ColorAlphaMerger {
1616
1617
  private workers: Worker[] = [];
@@ -1620,9 +1621,17 @@ export class ColorAlphaMerger {
1620
1621
 
1621
1622
  merge(color: VideoFrame, alpha: VideoFrame): Promise<VideoFrame> {
1622
1623
  if (this.workers.length === 0) {
1624
+ if (!mergerWorkerUrl) {
1625
+ const blob = new Blob(
1626
+ [`(${colorAlphaMergerWorkerCode.toString()})()`],
1627
+ { type: 'application/javascript' },
1628
+ );
1629
+ mergerWorkerUrl = URL.createObjectURL(blob);
1630
+ }
1631
+
1623
1632
  const poolSize = clamp(navigator.hardwareConcurrency, 1, 4);
1624
1633
  for (let i = 0; i < poolSize; i++) {
1625
- const worker = createWorker('color-alpha-merger', colorAlphaMergerWorkerCode);
1634
+ const worker = new Worker(mergerWorkerUrl);
1626
1635
 
1627
1636
  worker.addEventListener('message', (event: MessageEvent<ColorAlphaMergerWorkerResponse>) => {
1628
1637
  const data = event.data;
@@ -1691,7 +1700,7 @@ type ColorAlphaMergerWorkerResponse =
1691
1700
  | { id: number; frame: VideoFrame }
1692
1701
  | { id: number; error: string };
1693
1702
 
1694
- export const colorAlphaMergerWorkerCode = () => {
1703
+ const colorAlphaMergerWorkerCode = () => {
1695
1704
  // These buffers are reused across frames as long as the size matches, since consecutive frames usually share
1696
1705
  // dimensions
1697
1706
  let cpuAlphaBuffer: Uint8Array | null = null;
@@ -31,7 +31,6 @@ import {
31
31
  CallSerializer,
32
32
  clamp,
33
33
  clearIntervalUnthrottled,
34
- createWorker,
35
34
  floorToDivisor,
36
35
  isCodecReclaimedError,
37
36
  isFirefox,
@@ -1240,6 +1239,8 @@ const detectAvcChunkTimestampShift = () => {
1240
1239
  })();
1241
1240
  };
1242
1241
 
1242
+ let splitterWorkerUrl: string | null = null;
1243
+
1243
1244
  /** Utility class for splitting a composite frame into separate color and alpha parts on the CPU in a worker. */
1244
1245
  export class ColorAlphaSplitter {
1245
1246
  private worker: Worker | null = null;
@@ -1252,7 +1253,15 @@ export class ColorAlphaSplitter {
1252
1253
 
1253
1254
  split(sourceFrame: VideoFrame): Promise<{ colorFrame: VideoFrame; alphaFrame: VideoFrame }> {
1254
1255
  if (!this.worker) {
1255
- this.worker = createWorker('color-alpha-splitter', colorAlphaSplitterWorkerCode);
1256
+ if (!splitterWorkerUrl) {
1257
+ const blob = new Blob(
1258
+ [`(${colorAlphaSplitterWorkerCode.toString()})()`],
1259
+ { type: 'application/javascript' },
1260
+ );
1261
+ splitterWorkerUrl = URL.createObjectURL(blob);
1262
+ }
1263
+
1264
+ this.worker = new Worker(splitterWorkerUrl);
1256
1265
 
1257
1266
  this.worker.addEventListener('message', (event: MessageEvent<ColorAlphaSplitterWorkerResponse>) => {
1258
1267
  const data = event.data;
@@ -1307,7 +1316,7 @@ type ColorAlphaSplitterWorkerResponse =
1307
1316
  | { id: number; colorFrame: VideoFrame; alphaFrame: VideoFrame }
1308
1317
  | { id: number; error: string };
1309
1318
 
1310
- export const colorAlphaSplitterWorkerCode = () => {
1319
+ const colorAlphaSplitterWorkerCode = () => {
1311
1320
  // Reused across frames as long as the size matches, since consecutive frames usually share dimensions.
1312
1321
  let cpuSourceBuffer: Uint8Array | null = null;
1313
1322
 
@@ -3397,7 +3406,7 @@ type MediaStreamTrackProcessorControllerMessage = {
3397
3406
  trackId: number;
3398
3407
  };
3399
3408
 
3400
- export const mediaStreamTrackProcessorWorkerCode = () => {
3409
+ const mediaStreamTrackProcessorWorkerCode = () => {
3401
3410
  const sendMessage = (message: MediaStreamTrackProcessorWorkerMessage, transfer?: Transferable[]) => {
3402
3411
  if (transfer) {
3403
3412
  self.postMessage(message, { transfer });
@@ -3482,7 +3491,13 @@ let nextMediaStreamTrackProcessorWorkerId = 0;
3482
3491
  let mediaStreamTrackProcessorWorker: Worker | null = null;
3483
3492
 
3484
3493
  const initMediaStreamTrackProcessorWorker = () => {
3485
- mediaStreamTrackProcessorWorker = createWorker('media-stream-track-processor', mediaStreamTrackProcessorWorkerCode);
3494
+ const blob = new Blob(
3495
+ [`(${mediaStreamTrackProcessorWorkerCode.toString()})()`],
3496
+ { type: 'application/javascript' },
3497
+ );
3498
+ const url = URL.createObjectURL(blob);
3499
+
3500
+ mediaStreamTrackProcessorWorker = new Worker(url);
3486
3501
  };
3487
3502
 
3488
3503
  let mediaStreamTrackProcessorIsSupportedInWorkerCache: boolean | null = null;
@@ -1450,7 +1450,7 @@ const shouldUseNativeTimers = () => {
1450
1450
  return typeof window === 'undefined';
1451
1451
  };
1452
1452
 
1453
- export const unthrottledTimerWorkerCode = () => {
1453
+ const unthrottledTimerWorkerMain = () => {
1454
1454
  const timeoutHandles = new Map<number, ReturnType<typeof setTimeout>>();
1455
1455
  const intervalHandles = new Map<number, ReturnType<typeof setInterval>>();
1456
1456
 
@@ -1499,7 +1499,10 @@ const getUnthrottledTimerWorker = () => {
1499
1499
  return unthrottledTimerWorker;
1500
1500
  }
1501
1501
 
1502
- unthrottledTimerWorker = createWorker('unthrottled-timer', unthrottledTimerWorkerCode);
1502
+ const workerSource = `(${unthrottledTimerWorkerMain.toString()})();`;
1503
+ const workerURL = URL.createObjectURL(new Blob([workerSource], { type: 'text/javascript' }));
1504
+ unthrottledTimerWorker = new Worker(workerURL);
1505
+ URL.revokeObjectURL(workerURL);
1503
1506
 
1504
1507
  unthrottledTimerWorker.onmessage = (event: MessageEvent<UnthrottledTimerEvent>) => {
1505
1508
  const message = event.data;
@@ -1520,30 +1523,6 @@ const getUnthrottledTimerWorker = () => {
1520
1523
  return unthrottledTimerWorker;
1521
1524
  };
1522
1525
 
1523
- const workerBlobUrls = new Map<() => void, string>();
1524
-
1525
- export const createWorker = (name: string, workerMain: () => void) => {
1526
- const workerUrl = (globalThis as Record<symbol, unknown>)[Symbol.for('mediabunny:workerUrl')];
1527
- if (workerUrl !== undefined && typeof workerUrl !== 'string' && !(workerUrl instanceof URL)) {
1528
- throw new TypeError(
1529
- 'globalThis[Symbol.for(\'mediabunny:workerUrl\')], when provided, must be a string or URL.',
1530
- );
1531
- }
1532
-
1533
- // For environments that can't run blob: workers. The standalone worker file runs the program matching the name.
1534
- if (workerUrl !== undefined) {
1535
- return new Worker(workerUrl, { name });
1536
- }
1537
-
1538
- let blobUrl = workerBlobUrls.get(workerMain);
1539
- if (!blobUrl) {
1540
- blobUrl = URL.createObjectURL(new Blob([`(${workerMain.toString()})();`], { type: 'text/javascript' }));
1541
- workerBlobUrls.set(workerMain, blobUrl);
1542
- }
1543
-
1544
- return new Worker(blobUrl, { name });
1545
- };
1546
-
1547
1526
  export const setTimeoutUnthrottled = (
1548
1527
  // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
1549
1528
  callback: Function,
@@ -490,11 +490,6 @@ class Mp3AudioTrackBacking implements InputAudioTrackBacking {
490
490
  return null;
491
491
  }
492
492
 
493
- const fileSize = this.demuxer.reader.fileSize;
494
- if (fileSize !== null && rawSample.dataStart + rawSample.dataSize > fileSize) {
495
- return null; // Data definitely doesn't fit
496
- }
497
-
498
493
  let data: Uint8Array;
499
494
  if (options.metadataOnly) {
500
495
  data = PLACEHOLDER_DATA;
@@ -234,7 +234,6 @@ export class MpegTsDemuxer extends Demuxer {
234
234
  // Some files contain these multiple times, but we only care about their first appearance
235
235
  let hasProgramAssociationTable = false;
236
236
  let hasProgramMap = false;
237
- let initDemuxer: MpegTsDemuxer | null = null;
238
237
 
239
238
  while (true) {
240
239
  const packetHeader = await this.readPacketHeader(currentPos);
@@ -543,41 +542,31 @@ export class MpegTsDemuxer extends Demuxer {
543
542
  elementaryStream.firstSection = section;
544
543
  elementaryStream.canBeTrustedWithKeyPackets = section.randomAccessIndicator === 1;
545
544
 
546
- const context = new PacketReadingContext(elementaryStream, section.startPos);
547
-
548
- if (elementaryStream.info.type === 'video') {
549
- let packetCount = 0;
550
-
551
- // We loop because in some files, the video parameters are not in the first packet
552
- while (true) {
553
- if (packetCount === 1 && this.input._initInput) {
554
- // The parameters aren't in the first packet, so instead of searching further (which
555
- // may take long), get them from the init input
556
- if (!initDemuxer) {
557
- initDemuxer = (await this.input._initInput._getDemuxer()) as MpegTsDemuxer;
558
- if (initDemuxer.constructor !== MpegTsDemuxer) {
559
- throw new Error('Init input must match the input\'s format.');
560
- }
545
+ if (this.input._initInput) {
546
+ const initDemuxer = (await this.input._initInput._getDemuxer()) as MpegTsDemuxer;
547
+ if (initDemuxer.constructor !== MpegTsDemuxer) {
548
+ throw new Error('Init input must match the input\'s format.');
549
+ }
561
550
 
562
- await initDemuxer.readMetadata();
563
- }
551
+ await initDemuxer.readMetadata();
564
552
 
565
- const matchingStream = initDemuxer.elementaryStreams.find(x => (
566
- x.pid === section.pid
567
- && x.info.codec === elementaryStream.info.codec
568
- && x.initialized
569
- ));
553
+ const matchingStream = initDemuxer.elementaryStreams.find(x => (
554
+ x.pid === section.pid && x.info.codec === elementaryStream.info.codec && x.initialized
555
+ ));
570
556
 
571
- if (matchingStream) {
572
- elementaryStream.info = matchingStream.info;
573
- elementaryStream.initialized = true;
557
+ if (matchingStream) {
558
+ elementaryStream.info = matchingStream.info;
559
+ elementaryStream.initialized = true;
574
560
 
575
- break outer; // We have the stream info, we're done
576
- }
577
- }
561
+ break outer; // We have the stream info, we're done
562
+ }
563
+ }
578
564
 
579
- packetCount++;
565
+ const context = new PacketReadingContext(elementaryStream, section.startPos);
580
566
 
567
+ if (elementaryStream.info.type === 'video') {
568
+ // We loop because in some files, the video parameters are not in the first packet
569
+ while (true) {
581
570
  const contextAlias = context; // TyyyyypeScript 😩
582
571
  contextAlias.suppliedPacket = null;
583
572
  await context.markNextPacket();
@@ -41,8 +41,8 @@ import {
41
41
  // Resources:
42
42
  // ISO/IEC 13818-1
43
43
 
44
- export const PAT_PID = 0x0000;
45
- export const PMT_PID = 0x1000;
44
+ const PAT_PID = 0x0000;
45
+ const PMT_PID = 0x1000;
46
46
  const FIRST_TRACK_PID = 0x0100;
47
47
 
48
48
  const VIDEO_STREAM_ID_BASE = 0xE0;