agentroam-runtime-darwin-arm64 0.2.0-preview.81 → 0.2.0-preview.83

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 (379) 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 +26 -25
  5. package/runtime/.next/app-path-routes-manifest.json +1 -1
  6. package/runtime/.next/build-manifest.json +10 -10
  7. package/runtime/.next/prerender-manifest.json +1 -1
  8. package/runtime/.next/react-loadable-manifest.json +4 -4
  9. package/runtime/.next/required-server-files.json +1 -1
  10. package/runtime/.next/server/app/_not-found/page.js +1 -1
  11. package/runtime/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/runtime/.next/server/app/_not-found.html +1 -1
  13. package/runtime/.next/server/app/_not-found.rsc +1 -1
  14. package/runtime/.next/server/app/api/agent/abort/route.js +1 -1
  15. package/runtime/.next/server/app/api/agent/answer/route.js +1 -1
  16. package/runtime/.next/server/app/api/agent/codex-sharing/route.js +1 -1
  17. package/runtime/.next/server/app/api/agent/composer/route.js +1 -0
  18. package/runtime/.next/server/app/api/agent/composer/route.js.nft.json +1 -0
  19. package/runtime/.next/server/app/api/agent/harness/status/route.js +1 -1
  20. package/runtime/.next/server/app/api/agent/model/route.js +1 -1
  21. package/runtime/.next/server/app/api/agent/models/route.js +1 -1
  22. package/runtime/.next/server/app/api/agent/run/route.js +1 -1
  23. package/runtime/.next/server/app/api/agent/runtime-health/route.js +1 -1
  24. package/runtime/.next/server/app/api/agent/steer/route.js +1 -1
  25. package/runtime/.next/server/app/api/agent/stream/route.js +2 -2
  26. package/runtime/.next/server/app/api/agent-workspaces/[workspaceId]/sessions/route.js +1 -1
  27. package/runtime/.next/server/app/api/agent-workspaces/route.js +1 -1
  28. package/runtime/.next/server/app/api/auth/verify/route.js +1 -1
  29. package/runtime/.next/server/app/api/business/route.js +1 -1
  30. package/runtime/.next/server/app/api/calendar/route.js +2 -2
  31. package/runtime/.next/server/app/api/client-logs/route.js +1 -1
  32. package/runtime/.next/server/app/api/collaboration/route.js +2 -2
  33. package/runtime/.next/server/app/api/engine-threads/route.js +1 -1
  34. package/runtime/.next/server/app/api/engine-threads.body +1 -1
  35. package/runtime/.next/server/app/api/flow/v1/catalog/route.js +1 -1
  36. package/runtime/.next/server/app/api/flow/v1/runs/[runId]/cancel/route.js +1 -1
  37. package/runtime/.next/server/app/api/flow/v1/runs/[runId]/events/route.js +2 -2
  38. package/runtime/.next/server/app/api/flow/v1/runs/route.js +1 -1
  39. package/runtime/.next/server/app/api/flow-studio/config/route.js +1 -1
  40. package/runtime/.next/server/app/api/internal/todo-bootstrap/route.js +1 -1
  41. package/runtime/.next/server/app/api/internal/todo-mcp/route.js +1 -1
  42. package/runtime/.next/server/app/api/mcp/connect/route.js +1 -1
  43. package/runtime/.next/server/app/api/mcp/disconnect/route.js +1 -1
  44. package/runtime/.next/server/app/api/mcp/servers/route.js +1 -1
  45. package/runtime/.next/server/app/api/mcp/servers.body +1 -1
  46. package/runtime/.next/server/app/api/memory/[key]/route.js +1 -1
  47. package/runtime/.next/server/app/api/memory/route.js +1 -1
  48. package/runtime/.next/server/app/api/messaging/route.js +1 -1
  49. package/runtime/.next/server/app/api/notifications/[id]/ack/route.js +1 -1
  50. package/runtime/.next/server/app/api/notifications/[id]/route.js +1 -1
  51. package/runtime/.next/server/app/api/notifications/route.js +1 -1
  52. package/runtime/.next/server/app/api/notifications/stream/route.js +2 -2
  53. package/runtime/.next/server/app/api/plugins/load/route.js +1 -1
  54. package/runtime/.next/server/app/api/projects/[id]/route.js +1 -1
  55. package/runtime/.next/server/app/api/projects/check/route.js +1 -1
  56. package/runtime/.next/server/app/api/projects/directories/route.js +1 -1
  57. package/runtime/.next/server/app/api/projects/roots/route.js +1 -1
  58. package/runtime/.next/server/app/api/projects/route.js +1 -1
  59. package/runtime/.next/server/app/api/push/subscribe/route.js +2 -2
  60. package/runtime/.next/server/app/api/push/unsubscribe/route.js +2 -2
  61. package/runtime/.next/server/app/api/push/vapid/route.js +2 -2
  62. package/runtime/.next/server/app/api/push/vapid.body +1 -1
  63. package/runtime/.next/server/app/api/remote-tools/register/route.js +1 -1
  64. package/runtime/.next/server/app/api/session-images/[id]/route.js +1 -1
  65. package/runtime/.next/server/app/api/session-views/route.js +1 -1
  66. package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/route.js +1 -1
  67. package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/stop/route.js +1 -1
  68. package/runtime/.next/server/app/api/sessions/[id]/background-jobs/route.js +1 -1
  69. package/runtime/.next/server/app/api/sessions/[id]/changes/route.js +2 -2
  70. package/runtime/.next/server/app/api/sessions/[id]/engine-switches/route.js +1 -1
  71. package/runtime/.next/server/app/api/sessions/[id]/fork/route.js +1 -1
  72. package/runtime/.next/server/app/api/sessions/[id]/fork-at/route.js +1 -1
  73. package/runtime/.next/server/app/api/sessions/[id]/goals/route.js +1 -1
  74. package/runtime/.next/server/app/api/sessions/[id]/handoff/route.js +1 -1
  75. package/runtime/.next/server/app/api/sessions/[id]/native-goal/route.js +1 -1
  76. package/runtime/.next/server/app/api/sessions/[id]/query-index/route.js +1 -1
  77. package/runtime/.next/server/app/api/sessions/[id]/release/route.js +1 -1
  78. package/runtime/.next/server/app/api/sessions/[id]/route.js +1 -1
  79. package/runtime/.next/server/app/api/sessions/[id]/switch-engine/route.js +1 -1
  80. package/runtime/.next/server/app/api/sessions/[id]/thread-goal/route.js +1 -1
  81. package/runtime/.next/server/app/api/sessions/[id]/thread-history/route.js +1 -1
  82. package/runtime/.next/server/app/api/sessions/[id]/tool-result/route.js +1 -1
  83. package/runtime/.next/server/app/api/sessions/parallel/route.js +1 -1
  84. package/runtime/.next/server/app/api/sessions/route.js +1 -1
  85. package/runtime/.next/server/app/api/settings/route.js +1 -1
  86. package/runtime/.next/server/app/api/skills/route.js +1 -1
  87. package/runtime/.next/server/app/api/todos/[id]/commands/route.js +1 -1
  88. package/runtime/.next/server/app/api/todos/[id]/executions/route.js +1 -1
  89. package/runtime/.next/server/app/api/todos/[id]/route.js +1 -1
  90. package/runtime/.next/server/app/api/todos/route.js +1 -1
  91. package/runtime/.next/server/app/api/tool-policies/[policyId]/route.js +1 -1
  92. package/runtime/.next/server/app/api/tool-policies/route.js +1 -1
  93. package/runtime/.next/server/app/api/tools/route.js +1 -1
  94. package/runtime/.next/server/app/api/update/check/route.js +1 -1
  95. package/runtime/.next/server/app/api/update/install/route.js +1 -1
  96. package/runtime/.next/server/app/api/update/status/route.js +1 -1
  97. package/runtime/.next/server/app/api/web-auth/login/route.js +1 -1
  98. package/runtime/.next/server/app/api/web-auth/logout/route.js +1 -1
  99. package/runtime/.next/server/app/api/web-auth/revoke-all/route.js +1 -1
  100. package/runtime/.next/server/app/api/web-auth/setup/route.js +1 -1
  101. package/runtime/.next/server/app/api/web-auth/status/route.js +1 -1
  102. package/runtime/.next/server/app/api/web-console/bootstrap/route.js +1 -1
  103. package/runtime/.next/server/app/api/web-console/computer-settings/route.js +1 -1
  104. package/runtime/.next/server/app/api/web-console/computers/route.js +1 -1
  105. package/runtime/.next/server/app/api/web-console/device-state/route.js +1 -1
  106. package/runtime/.next/server/app/api/web-console/history/route.js +1 -1
  107. package/runtime/.next/server/app/api/web-console/preferences/route.js +1 -1
  108. package/runtime/.next/server/app/api/workspace-changes/route.js +1 -1
  109. package/runtime/.next/server/app/web/page.js +4 -4
  110. package/runtime/.next/server/app/web/page_client-reference-manifest.js +1 -1
  111. package/runtime/.next/server/app-paths-manifest.json +39 -38
  112. package/runtime/.next/server/chunks/1298.js +1 -1
  113. package/runtime/.next/server/chunks/5303.js +2 -2
  114. package/runtime/.next/server/chunks/5801.js +1 -1
  115. package/runtime/.next/server/chunks/6703.js +1 -1
  116. package/runtime/.next/server/chunks/9119.js +3 -3
  117. package/runtime/.next/server/chunks/9457.js +1 -1
  118. package/runtime/.next/server/middleware-build-manifest.js +1 -1
  119. package/runtime/.next/server/middleware-react-loadable-manifest.js +1 -1
  120. package/runtime/.next/server/pages/404.html +1 -1
  121. package/runtime/.next/server/pages/500.html +1 -1
  122. package/runtime/.next/server/server-reference-manifest.json +1 -1
  123. package/runtime/.next/static/chunks/20.2eb9bc3a5b4d410b.js +1 -0
  124. package/runtime/.next/static/chunks/325-0818ba5a4060a0e8.js +1 -0
  125. package/runtime/.next/static/chunks/34.c7dbf7ffc8914be9.js +1 -0
  126. package/runtime/.next/static/chunks/686.7b5c444243fcf29a.js +1 -0
  127. package/runtime/.next/static/chunks/app/web/error-828d278147a0619d.js +1 -0
  128. package/runtime/.next/static/chunks/app/web/layout-1127176e7e88e395.js +1 -0
  129. package/runtime/.next/static/chunks/app/web/page-8adf166584b0088e.js +1 -0
  130. package/runtime/.next/static/chunks/{main-68faabab5d101471.js → main-9c08f7656f9692e6.js} +1 -1
  131. package/runtime/.next/static/chunks/main-app-07d67f2d4e96ecb8.js +1 -0
  132. package/runtime/.next/static/chunks/{webpack-f51a057f833e73eb.js → webpack-040c7a20dd455025.js} +1 -1
  133. package/runtime/.next/static/css/645d4c94ea111811.css +1 -0
  134. package/runtime/lib/remote-control/application/paced-video-sender.mjs +20 -1
  135. package/runtime/lib/remote-control/application/remote-video-session.mjs +18 -4
  136. package/runtime/lib/remote-control/infrastructure/native-video-encoder.mjs +15 -2
  137. package/runtime/lib/remote-control/infrastructure/werift-video-transport.mjs +3 -1
  138. package/runtime/lib/remote-control/remote-authorization.mjs +2 -2
  139. package/runtime/lib/remote-control/remote-video-signal.mjs +2 -0
  140. package/runtime/lib/todo-completion-worker.mjs +45 -0
  141. package/runtime/lib/tunnel-control.mjs +1 -1
  142. package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/MacOS/agentroam-remote-desktop +0 -0
  143. package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/Resources/agentroam-component.json +1 -1
  144. package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/_CodeSignature/CodeResources +2 -2
  145. package/runtime/node_modules/.package-lock.json +129 -129
  146. package/runtime/node_modules/@agent/core/dist/index.js +295 -70
  147. package/runtime/node_modules/@agent/native-runtime/dist/index.js +498 -150
  148. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs +75 -79
  149. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js +52 -52
  150. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-2g5j09ba.mjs +16 -0
  151. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-59ydwk0g.mjs +17 -0
  152. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-q4cwy1ja.mjs → core-664d5mmy.mjs} +2 -2
  153. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-zn1abzvs.mjs → core-70sfhqm6.mjs} +2 -2
  154. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-95gcz3n1.mjs +38 -0
  155. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-ew5sfvfe.mjs +39 -0
  156. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-gjhs7gf6.mjs +20 -0
  157. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-kvdt1szx.mjs +18 -0
  158. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-p654hjkr.mjs +22 -0
  159. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-q9bjbxkv.mjs +19 -0
  160. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-samdvsjh.mjs +33 -0
  161. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-x6bt758j.mjs +17 -0
  162. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core.mjs +12 -12
  163. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.json +22 -22
  164. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json +26 -26
  165. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/package.json +22 -23
  166. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +84 -83
  167. package/runtime/node_modules/caniuse-lite/package.json +1 -1
  168. package/runtime/node_modules/mediabunny/README.md +4 -0
  169. package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.cjs +225 -136
  170. package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.cjs +10 -10
  171. package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.mjs +11 -11
  172. package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.mjs +225 -136
  173. package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.node.cjs +225 -136
  174. package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.worker.js +8 -0
  175. package/runtime/node_modules/mediabunny/dist/modules/src/adts/adts-demuxer.js +4 -0
  176. package/runtime/node_modules/mediabunny/dist/modules/src/aes.js +6 -4
  177. package/runtime/node_modules/mediabunny/dist/modules/src/hls/hls-demuxer.js +6 -0
  178. package/runtime/node_modules/mediabunny/dist/modules/src/hls/hls-segmented-input.js +17 -5
  179. package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-boxes.js +2 -1
  180. package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-demuxer.js +62 -12
  181. package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-muxer.js +34 -18
  182. package/runtime/node_modules/mediabunny/dist/modules/src/matroska/matroska-demuxer.js +3 -0
  183. package/runtime/node_modules/mediabunny/dist/modules/src/media-sink.js +3 -8
  184. package/runtime/node_modules/mediabunny/dist/modules/src/media-source.js +5 -12
  185. package/runtime/node_modules/mediabunny/dist/modules/src/misc.js +19 -5
  186. package/runtime/node_modules/mediabunny/dist/modules/src/mp3/mp3-demuxer.js +4 -0
  187. package/runtime/node_modules/mediabunny/dist/modules/src/mpeg-ts/mpeg-ts-demuxer.js +22 -13
  188. package/runtime/node_modules/mediabunny/dist/modules/src/mpeg-ts/mpeg-ts-muxer.js +2 -2
  189. package/runtime/node_modules/mediabunny/dist/modules/src/segmented-input.js +70 -65
  190. package/runtime/node_modules/mediabunny/dist/modules/src/tsconfig.tsbuildinfo +1 -1
  191. package/runtime/node_modules/mediabunny/dist/modules/src/version.js +1 -1
  192. package/runtime/node_modules/mediabunny/dist/modules/src/worker.js +26 -0
  193. package/runtime/node_modules/mediabunny/package.json +1 -1
  194. package/runtime/node_modules/mediabunny/src/adts/adts-demuxer.ts +5 -0
  195. package/runtime/node_modules/mediabunny/src/aes.ts +7 -4
  196. package/runtime/node_modules/mediabunny/src/hls/hls-demuxer.ts +7 -0
  197. package/runtime/node_modules/mediabunny/src/hls/hls-segmented-input.ts +19 -6
  198. package/runtime/node_modules/mediabunny/src/isobmff/isobmff-boxes.ts +2 -1
  199. package/runtime/node_modules/mediabunny/src/isobmff/isobmff-demuxer.ts +74 -14
  200. package/runtime/node_modules/mediabunny/src/isobmff/isobmff-muxer.ts +37 -19
  201. package/runtime/node_modules/mediabunny/src/matroska/matroska-demuxer.ts +4 -0
  202. package/runtime/node_modules/mediabunny/src/media-sink.ts +3 -12
  203. package/runtime/node_modules/mediabunny/src/media-source.ts +5 -20
  204. package/runtime/node_modules/mediabunny/src/metadata.ts +1 -0
  205. package/runtime/node_modules/mediabunny/src/misc.ts +26 -5
  206. package/runtime/node_modules/mediabunny/src/mp3/mp3-demuxer.ts +5 -0
  207. package/runtime/node_modules/mediabunny/src/mpeg-ts/mpeg-ts-demuxer.ts +30 -19
  208. package/runtime/node_modules/mediabunny/src/mpeg-ts/mpeg-ts-muxer.ts +2 -2
  209. package/runtime/node_modules/mediabunny/src/segmented-input.ts +76 -79
  210. package/runtime/node_modules/mediabunny/src/version.ts +1 -1
  211. package/runtime/node_modules/mediabunny/src/worker.ts +28 -0
  212. package/runtime/package-lock.json +162 -162
  213. package/runtime/server.js +1 -1
  214. package/runtime/webapp/dist/assets/AIHubView-HV2FIroL.js +1 -0
  215. package/runtime/webapp/dist/assets/{AgentManager-dXI31b0a.js → AgentManager-C4zPGI-Y.js} +2 -2
  216. package/runtime/webapp/dist/assets/AiHubPane-CEjQjdqT.js +1 -0
  217. package/runtime/webapp/dist/assets/App-CS2wVlfV.js +68 -0
  218. package/runtime/webapp/dist/assets/BrowserLivePanel-BwtEM-IV.js +61 -0
  219. package/runtime/webapp/dist/assets/{CalendarPage-BbYdGYWn.js → CalendarPage-DY8pZK7d.js} +1 -1
  220. package/runtime/webapp/dist/assets/{CalendarView-QfbrlL9X.js → CalendarView-CuBzp-g8.js} +1 -1
  221. package/runtime/webapp/dist/assets/{CollaborationCreateDialog-CWhmFQtA.js → CollaborationCreateDialog-DsXkxAd1.js} +1 -1
  222. package/runtime/webapp/dist/assets/{CollaborationDashboard-XL5SnFOu.js → CollaborationDashboard-CvE5vaOh.js} +1 -1
  223. package/runtime/webapp/dist/assets/{CollaborationPage-B1tiqgnG.js → CollaborationPage-Cjeo60S0.js} +2 -2
  224. package/runtime/webapp/dist/assets/{FilePreview-CPY6dP8Q.js → FilePreview-CyXKv1Cu.js} +9 -9
  225. package/runtime/webapp/dist/assets/{FileTree-BBgrOian.js → FileTree-DNI9VhEp.js} +2 -2
  226. package/runtime/webapp/dist/assets/FileWorkspaceDrawer-DRluuYWn.js +1 -0
  227. package/runtime/webapp/dist/assets/FlowStudioPane-CKlzxza_.js +5 -0
  228. package/runtime/webapp/dist/assets/{HostProjectPicker-DN_vGqQb.js → HostProjectPicker-CjlxN2ct.js} +1 -1
  229. package/runtime/webapp/dist/assets/{LSPServerList-B-R7HDSP.js → LSPServerList-BbAS_sm-.js} +1 -1
  230. package/runtime/webapp/dist/assets/{MCPServerList-CTc0iAwT.js → MCPServerList-DkVUlKEJ.js} +1 -1
  231. package/runtime/webapp/dist/assets/{MemoryViewer-Dzh_miRv.js → MemoryViewer-Ywl80xth.js} +1 -1
  232. package/runtime/webapp/dist/assets/NewSessionWindow-B4H26X5c.js +1 -0
  233. package/runtime/webapp/dist/assets/RemoteDesktopPage-B4q2I23i.js +1 -0
  234. package/runtime/webapp/dist/assets/{RemoteDesktopTabBridge-BA_HQv3V.js → RemoteDesktopTabBridge-B_cCKi7K.js} +1 -1
  235. package/runtime/webapp/dist/assets/{RunningSessionsIcon-BvFSI9OF.js → RunningSessionsIcon-Cz8_524L.js} +1 -1
  236. package/runtime/webapp/dist/assets/{SessionDashboard-DcPPoXe2.js → SessionDashboard-DXPSvNsY.js} +1 -1
  237. package/runtime/webapp/dist/assets/{SessionDashboardBridge-CjoeUy-v.js → SessionDashboardBridge-7BjKdfN8.js} +1 -1
  238. package/runtime/webapp/dist/assets/{SettingsPanel-DmdXDQUm.js → SettingsPanel-C78O9_ho.js} +2 -2
  239. package/runtime/webapp/dist/assets/{SkillManager-CS_skFZj.js → SkillManager-BdkBUxhH.js} +1 -1
  240. package/runtime/webapp/dist/assets/{TaskPaneTerminal-BFHDRCb9.js → TaskPaneTerminal-B2WKBysj.js} +1 -1
  241. package/runtime/webapp/dist/assets/{TerminalPane-Dr_nY9pI.js → TerminalPane-CxGcN85G.js} +1 -1
  242. package/runtime/webapp/dist/assets/TodoPage-CdzjZR2O.js +1 -0
  243. package/runtime/webapp/dist/assets/{abnfDiagram-VCTEODGH-FEEApB15.js → abnfDiagram-VCTEODGH-DFIXyU71.js} +1 -1
  244. package/runtime/webapp/dist/assets/{arc-CycwMc2c.js → arc-CLpaLEla.js} +1 -1
  245. package/runtime/webapp/dist/assets/{architectureDiagram-5GKGNRK7-BFq9JapX.js → architectureDiagram-5GKGNRK7-Df8T0lx0.js} +1 -1
  246. package/runtime/webapp/dist/assets/{blockDiagram-I7D4REHJ-DkOJ55Ag.js → blockDiagram-I7D4REHJ-jCoyPZhV.js} +1 -1
  247. package/runtime/webapp/dist/assets/{c4Diagram-7LVT6UL2-CRvi_3RM.js → c4Diagram-7LVT6UL2-DsZuTCuo.js} +1 -1
  248. package/runtime/webapp/dist/assets/{calendar-days-CLwKstxM.js → calendar-days-BIRmYMrW.js} +1 -1
  249. package/runtime/webapp/dist/assets/channel-0IyV-PVi.js +1 -0
  250. package/runtime/webapp/dist/assets/{check-8EVJMrTV.js → check-DCU8YHqr.js} +1 -1
  251. package/runtime/webapp/dist/assets/{chevron-down-ChNxfI2x.js → chevron-down-BUEiUZA7.js} +1 -1
  252. package/runtime/webapp/dist/assets/{chevron-right-Cbkc_d70.js → chevron-right-B_ITnckH.js} +1 -1
  253. package/runtime/webapp/dist/assets/{chunk-2Q5K7J3B-Cklzvs8u.js → chunk-2Q5K7J3B-BEZp3wuG.js} +1 -1
  254. package/runtime/webapp/dist/assets/{chunk-5VM5RSS4-NxozE5UP.js → chunk-5VM5RSS4-BGGDhFwD.js} +1 -1
  255. package/runtime/webapp/dist/assets/{chunk-F27PBJKO-Dyb8E7YM.js → chunk-F27PBJKO-Mqzm4ODE.js} +1 -1
  256. package/runtime/webapp/dist/assets/{chunk-IMKFNOWR-BqbMMc1n.js → chunk-IMKFNOWR-DtnGgUQJ.js} +1 -1
  257. package/runtime/webapp/dist/assets/{chunk-JWPE2WC7-do0R2H6U.js → chunk-JWPE2WC7-By3kXE4y.js} +1 -1
  258. package/runtime/webapp/dist/assets/{chunk-POPQ4Y6H-B2HIaynf.js → chunk-POPQ4Y6H-BTHuMHN1.js} +1 -1
  259. package/runtime/webapp/dist/assets/{chunk-SVP7TREG-C_zmjkwn.js → chunk-SVP7TREG-BeWH1pvB.js} +1 -1
  260. package/runtime/webapp/dist/assets/{chunk-TICWLB2K-Dh2bZgM1.js → chunk-TICWLB2K-oiekJTZh.js} +1 -1
  261. package/runtime/webapp/dist/assets/{chunk-XXDRQBXY-CnqciVDz.js → chunk-XXDRQBXY-B7CKqUBs.js} +1 -1
  262. package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-Dm5zwUmQ.js +1 -0
  263. package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-Dm5zwUmQ.js +1 -0
  264. package/runtime/webapp/dist/assets/{client-I0ZVCjOI.js → client-BpqlZTm2.js} +1 -1
  265. package/runtime/webapp/dist/assets/{codeSyntax-C8n4_KZS.js → codeSyntax-GjP28nDI.js} +3 -3
  266. package/runtime/webapp/dist/assets/{collaboration-lVxWL5ce.js → collaboration-CYS2Soeh.js} +1 -1
  267. package/runtime/webapp/dist/assets/composer-file-routing-DHdpFYk8.js +6 -0
  268. package/runtime/webapp/dist/assets/{cose-bilkent-JH36ORCC-CulKVUkj.js → cose-bilkent-JH36ORCC-BmhhO76e.js} +1 -1
  269. package/runtime/webapp/dist/assets/{cynefin-OW5HDTMX-C1LUI1_G.js → cynefin-OW5HDTMX-BesIxLGS.js} +1 -1
  270. package/runtime/webapp/dist/assets/{cynefinDiagram-5FMLGOSQ-D3Ymzw_P.js → cynefinDiagram-5FMLGOSQ-DdF6XhwX.js} +1 -1
  271. package/runtime/webapp/dist/assets/{dagre-GXQ25YYZ-DRaL0cGu.js → dagre-GXQ25YYZ-CxUfRr5w.js} +1 -1
  272. package/runtime/webapp/dist/assets/{diagram-S7CK7UJ4-D8gLHoZo.js → diagram-S7CK7UJ4-zSD7nygh.js} +1 -1
  273. package/runtime/webapp/dist/assets/{diagram-UQ7AKVKN-CaVU0aQT.js → diagram-UQ7AKVKN-CgirUu7t.js} +1 -1
  274. package/runtime/webapp/dist/assets/{diagram-VSXAHHWV-LFAKRvZz.js → diagram-VSXAHHWV-CkI9kDpP.js} +1 -1
  275. package/runtime/webapp/dist/assets/{diagram-VX7I27RA-DXpxUERc.js → diagram-VX7I27RA-ZfbGJBGR.js} +1 -1
  276. package/runtime/webapp/dist/assets/{diagram-Z3DM3KII-vAiik55G.js → diagram-Z3DM3KII-CA44IJP4.js} +1 -1
  277. package/runtime/webapp/dist/assets/{ebnfDiagram-PWID7BFC-MaFL7Kgb.js → ebnfDiagram-PWID7BFC-CVwSxyot.js} +1 -1
  278. package/runtime/webapp/dist/assets/{erDiagram-RLTQ6QDP-DuEu79B3.js → erDiagram-RLTQ6QDP-DwjlVHEs.js} +1 -1
  279. package/runtime/webapp/dist/assets/{file-types-ZVLWtslN.js → file-types-Dj25tuty.js} +1 -1
  280. package/runtime/webapp/dist/assets/{flowDiagram-HODETNUW-BAQ6nP2D.js → flowDiagram-HODETNUW-CEt0pwA8.js} +1 -1
  281. package/runtime/webapp/dist/assets/{ganttDiagram-EL5Y4UJY-C48VBnPy.js → ganttDiagram-EL5Y4UJY-CNsj7gWS.js} +3 -3
  282. package/runtime/webapp/dist/assets/{gitGraphDiagram-WWUBYQGX-BfWAh9Kr.js → gitGraphDiagram-WWUBYQGX-ERbll1_Q.js} +1 -1
  283. package/runtime/webapp/dist/assets/{history-D4E3D_aM.js → history-DTS97eAH.js} +1 -1
  284. package/runtime/webapp/dist/assets/{image-plus-DQV_EEAN.js → image-plus-BmlwMe18.js} +1 -1
  285. package/runtime/webapp/dist/assets/index-C30NoLsn.js +500 -0
  286. package/runtime/webapp/dist/assets/index-COFV-DUC.css +1 -0
  287. package/runtime/webapp/dist/assets/{infoDiagram-27XIBGKW-BM7P_-u_.js → infoDiagram-27XIBGKW-BiMEmJW5.js} +1 -1
  288. package/runtime/webapp/dist/assets/{ishikawaDiagram-5VMMS53U-Cwd8XR-p.js → ishikawaDiagram-5VMMS53U-CPlJXmF2.js} +1 -1
  289. package/runtime/webapp/dist/assets/{journeyDiagram-3NMN7TZE-MOgiksTh.js → journeyDiagram-3NMN7TZE-DJJ-qvlw.js} +1 -1
  290. package/runtime/webapp/dist/assets/{kanban-definition-UXKFOSKX-DulC5OLL.js → kanban-definition-UXKFOSKX-PHmavvDJ.js} +1 -1
  291. package/runtime/webapp/dist/assets/{layout-Dku9sXQ7.js → layout-DH5OfcVL.js} +1 -1
  292. package/runtime/webapp/dist/assets/{linear-B3-dddD7.js → linear-DQek-QDQ.js} +1 -1
  293. package/runtime/webapp/dist/assets/{list-todo-Bik5IY2r.js → list-todo-DULblcsU.js} +1 -1
  294. package/runtime/webapp/dist/assets/{locate-fixed-CHkezEEh.js → locate-fixed-B3zScPI-.js} +1 -1
  295. package/runtime/webapp/dist/assets/{mermaid.core-CRRXKysA.js → mermaid.core-D6eHnLLU.js} +5 -5
  296. package/runtime/webapp/dist/assets/{mindmap-definition-YA3MSWOX-CaaP-nEb.js → mindmap-definition-YA3MSWOX-D0TkZusX.js} +1 -1
  297. package/runtime/webapp/dist/assets/{mobileViewport-CekmYKqS.js → mobileViewport-BhIxH-zP.js} +1 -1
  298. package/runtime/webapp/dist/assets/{new-session-window-BfDMd-h3.css → new-session-window-DIU2v1uh.css} +1 -1
  299. package/runtime/webapp/dist/assets/new-session-window-bxVA-U3Y.js +191 -0
  300. package/runtime/webapp/dist/assets/page-DyPXAvyj.js +86 -0
  301. package/runtime/webapp/dist/assets/{pause-BsmUCuwZ.js → pause-C793N3J1.js} +1 -1
  302. package/runtime/webapp/dist/assets/{pegDiagram-XKGWAZYB-BqybPEwk.js → pegDiagram-XKGWAZYB-DMIjPBzH.js} +1 -1
  303. package/runtime/webapp/dist/assets/{pieDiagram-E7YTZNPT-BX1H2lh2.js → pieDiagram-E7YTZNPT-DctF47JZ.js} +1 -1
  304. package/runtime/webapp/dist/assets/{pin-BsEEYq8M.js → pin-BLVakDSL.js} +1 -1
  305. package/runtime/webapp/dist/assets/{quadrantDiagram-AXDQQJYC-Btnywv1k.js → quadrantDiagram-AXDQQJYC-JnwbWWwT.js} +1 -1
  306. package/runtime/webapp/dist/assets/{railroadDiagram-O6MQD6OU-Da_TV1ER.js → railroadDiagram-O6MQD6OU-DcpHMNVP.js} +1 -1
  307. package/runtime/webapp/dist/assets/{requirementDiagram-BXWQKSXE-5V1Aow9h.js → requirementDiagram-BXWQKSXE-C-fRbIOI.js} +1 -1
  308. package/runtime/webapp/dist/assets/{rotate-ccw-BbSby0GQ.js → rotate-ccw-CyZK_Om1.js} +1 -1
  309. package/runtime/webapp/dist/assets/{rotate-cw-BMdX-ln4.js → rotate-cw-ChAt9mcI.js} +1 -1
  310. package/runtime/webapp/dist/assets/{sankeyDiagram-P5KCCOFB-D_OIVihV.js → sankeyDiagram-P5KCCOFB-Sb34Y9Ep.js} +1 -1
  311. package/runtime/webapp/dist/assets/{send-Cb7EWSJF.js → send-DlrISC4K.js} +1 -1
  312. package/runtime/webapp/dist/assets/{sequenceDiagram-WJ2MYXX4-LKeF5Mri.js → sequenceDiagram-WJ2MYXX4-BeHoOpkJ.js} +1 -1
  313. package/runtime/webapp/dist/assets/{session-dashboard-BFqNDCc8.js → session-dashboard-D1JY1ka0.js} +1 -1
  314. package/runtime/webapp/dist/assets/{session-tree-BK_qaCnb.js → session-tree-Q-jABJNB.js} +1 -1
  315. package/runtime/webapp/dist/assets/{shield-check-C-r87aMq.js → shield-check-Bzd1i1OQ.js} +1 -1
  316. package/runtime/webapp/dist/assets/{sizeCapture-INFHLROL-B6j7Q_MN.js → sizeCapture-INFHLROL-DspvE2eQ.js} +1 -1
  317. package/runtime/webapp/dist/assets/{stateDiagram-D77RDMKH-zhPFqHdQ.js → stateDiagram-D77RDMKH-oBIvmRy9.js} +1 -1
  318. package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-DXD2F0in.js +1 -0
  319. package/runtime/webapp/dist/assets/{swimlanes-42K2YHIH-C_FCENx1.js → swimlanes-42K2YHIH-CAdrbVmI.js} +1 -1
  320. package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-CXpNu-5Z.js +8 -0
  321. package/runtime/webapp/dist/assets/{timeline-definition-24CTP7MA-C3DBXjDU.js → timeline-definition-24CTP7MA-BtWjc4KI.js} +1 -1
  322. package/runtime/webapp/dist/assets/{trash-2-DjggJGbw.js → trash-2-DwFoTvHX.js} +1 -1
  323. package/runtime/webapp/dist/assets/{types-BQCEWNQz.js → types-COzZsLPY.js} +1 -1
  324. package/runtime/webapp/dist/assets/{use-session-activity-BbTXGW7Z.js → use-session-activity-BRhj0V5U.js} +1 -1
  325. package/runtime/webapp/dist/assets/{vennDiagram-4TSXK5OY-CssdTIB0.js → vennDiagram-4TSXK5OY-Be4H6PYr.js} +1 -1
  326. package/runtime/webapp/dist/assets/{wardleyDiagram-VM6X3IG4-C58K2vVU.js → wardleyDiagram-VM6X3IG4-COVxCAu8.js} +1 -1
  327. package/runtime/webapp/dist/assets/{web-B4y8vdRZ.js → web-BdMHTzmo.js} +1 -1
  328. package/runtime/webapp/dist/assets/{web-D9rJZXHW.js → web-Qg6ZVe1T.js} +1 -1
  329. package/runtime/webapp/dist/assets/{x-BYUglEo9.js → x-CoIXF2eL.js} +1 -1
  330. package/runtime/webapp/dist/assets/{xychartDiagram-S5SC5T6Z-CQi8bD6A.js → xychartDiagram-S5SC5T6Z-J_S9eMK9.js} +1 -1
  331. package/runtime/webapp/dist/assets/{zoom-out-iMMWRXJs.js → zoom-out-C10hb0zX.js} +1 -1
  332. package/runtime/webapp/dist/index.html +2 -2
  333. package/runtime/ws-server.mjs +5 -0
  334. package/runtime/.next/static/chunks/106.b2050e53421795af.js +0 -1
  335. package/runtime/.next/static/chunks/20.7bd5212774091396.js +0 -1
  336. package/runtime/.next/static/chunks/34.40a88b70750502fb.js +0 -1
  337. package/runtime/.next/static/chunks/753-90c7dd1ba08be9be.js +0 -1
  338. package/runtime/.next/static/chunks/app/web/error-30cea9cffce0ebc2.js +0 -1
  339. package/runtime/.next/static/chunks/app/web/layout-d8a4f4131e7f2330.js +0 -1
  340. package/runtime/.next/static/chunks/app/web/page-b0da5ef19349a66b.js +0 -1
  341. package/runtime/.next/static/chunks/main-app-30a478479a347a9e.js +0 -1
  342. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-0e6mn0ck.mjs +0 -17
  343. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-0ssqfy51.mjs +0 -18
  344. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-82ghff97.mjs +0 -39
  345. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-82yhcz2x.mjs +0 -17
  346. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-b8jr1m8m.mjs +0 -23
  347. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-cj0jh226.mjs +0 -17
  348. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-ebtbxtjf.mjs +0 -28
  349. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-pb4erfqh.mjs +0 -42
  350. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-rs058s2g.mjs +0 -16
  351. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-w6pv4szb.mjs +0 -18
  352. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-wjeh40nr.mjs +0 -20
  353. package/runtime/webapp/dist/assets/AIHubView-CM6ugXG3.js +0 -1
  354. package/runtime/webapp/dist/assets/AiHubPane-DFzC3nbd.js +0 -1
  355. package/runtime/webapp/dist/assets/App-mF6ELC07.js +0 -68
  356. package/runtime/webapp/dist/assets/BrowserLivePanel-CamAULwS.js +0 -61
  357. package/runtime/webapp/dist/assets/FileWorkspaceDrawer-BXDuKlrL.js +0 -1
  358. package/runtime/webapp/dist/assets/FlowStudioPane-lnjLcd9c.js +0 -5
  359. package/runtime/webapp/dist/assets/NewSessionWindow-zjqAUfKb.js +0 -1
  360. package/runtime/webapp/dist/assets/RemoteDesktopPage-9AhztqA2.js +0 -1
  361. package/runtime/webapp/dist/assets/TodoPage-guIvBCW0.js +0 -1
  362. package/runtime/webapp/dist/assets/artifact-links-B0ApmgK6.js +0 -2
  363. package/runtime/webapp/dist/assets/channel-BwDuyJO4.js +0 -1
  364. package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-BfyV8P0w.js +0 -1
  365. package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-BfyV8P0w.js +0 -1
  366. package/runtime/webapp/dist/assets/composer-file-routing-qSvJpT-v.js +0 -6
  367. package/runtime/webapp/dist/assets/download-BE31-Qm0.js +0 -6
  368. package/runtime/webapp/dist/assets/index-DSgLFE4Q.js +0 -489
  369. package/runtime/webapp/dist/assets/index-zQk0NCEB.css +0 -1
  370. package/runtime/webapp/dist/assets/loader-circle-C5C-IzGK.js +0 -6
  371. package/runtime/webapp/dist/assets/new-session-window-Dgl7UWPR.js +0 -190
  372. package/runtime/webapp/dist/assets/page-_fFyRId-.js +0 -86
  373. package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-DWnBZAiI.js +0 -1
  374. package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-DOZCbCJP.js +0 -8
  375. /package/runtime/.next/static/{5rv6PMhU7yq1sI1ClFWRU → XwGGZtJQeU5VoGqV-1dyI}/_buildManifest.js +0 -0
  376. /package/runtime/.next/static/{5rv6PMhU7yq1sI1ClFWRU → XwGGZtJQeU5VoGqV-1dyI}/_ssgManifest.js +0 -0
  377. /package/runtime/.next/static/chunks/{183-dbd3e343da4ba103.js → 183-5019797f0b42210b.js} +0 -0
  378. /package/runtime/.next/static/chunks/{3cc391f0-4ff886cecc4d6d79.js → 3cc391f0-6cd083946ece156d.js} +0 -0
  379. /package/runtime/.next/static/chunks/app/_not-found/{page-c0fc9b6684d4f0ca.js → page-cffe4d626dcef5fd.js} +0 -0
@@ -234,6 +234,7 @@ 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;
237
238
 
238
239
  while (true) {
239
240
  const packetHeader = await this.readPacketHeader(currentPos);
@@ -542,31 +543,41 @@ export class MpegTsDemuxer extends Demuxer {
542
543
  elementaryStream.firstSection = section;
543
544
  elementaryStream.canBeTrustedWithKeyPackets = section.randomAccessIndicator === 1;
544
545
 
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
- }
546
+ const context = new PacketReadingContext(elementaryStream, section.startPos);
550
547
 
551
- await initDemuxer.readMetadata();
548
+ if (elementaryStream.info.type === 'video') {
549
+ let packetCount = 0;
552
550
 
553
- const matchingStream = initDemuxer.elementaryStreams.find(x => (
554
- x.pid === section.pid && x.info.codec === elementaryStream.info.codec && x.initialized
555
- ));
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
+ }
556
561
 
557
- if (matchingStream) {
558
- elementaryStream.info = matchingStream.info;
559
- elementaryStream.initialized = true;
562
+ await initDemuxer.readMetadata();
563
+ }
560
564
 
561
- break outer; // We have the stream info, we're done
562
- }
563
- }
565
+ const matchingStream = initDemuxer.elementaryStreams.find(x => (
566
+ x.pid === section.pid
567
+ && x.info.codec === elementaryStream.info.codec
568
+ && x.initialized
569
+ ));
564
570
 
565
- const context = new PacketReadingContext(elementaryStream, section.startPos);
571
+ if (matchingStream) {
572
+ elementaryStream.info = matchingStream.info;
573
+ elementaryStream.initialized = true;
574
+
575
+ break outer; // We have the stream info, we're done
576
+ }
577
+ }
578
+
579
+ packetCount++;
566
580
 
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) {
570
581
  const contextAlias = context; // TyyyyypeScript 😩
571
582
  contextAlias.suppliedPacket = null;
572
583
  await context.markNextPacket();
@@ -41,8 +41,8 @@ import {
41
41
  // Resources:
42
42
  // ISO/IEC 13818-1
43
43
 
44
- const PAT_PID = 0x0000;
45
- const PMT_PID = 0x1000;
44
+ export const PAT_PID = 0x0000;
45
+ export const PMT_PID = 0x1000;
46
46
  const FIRST_TRACK_PID = 0x0100;
47
47
 
48
48
  const VIDEO_STREAM_ID_BASE = 0xE0;
@@ -48,6 +48,7 @@ export type Segment = {
48
48
  */
49
49
  unixEpochTimestamp: number | null;
50
50
  discontinuityNumber: number;
51
+ initSegment: Segment | null;
51
52
  };
52
53
 
53
54
  export type SegmentRetrievalOptions = {
@@ -147,7 +148,7 @@ export abstract class SegmentedInput {
147
148
  return [];
148
149
  }
149
150
 
150
- const input = this.getInputForSegment(this.firstSegment);
151
+ const input = this.getInputForSegment(this.firstSegment.initSegment ?? this.firstSegment);
151
152
  const inputTracks = await input.getTracks();
152
153
 
153
154
  for (const track of inputTracks) {
@@ -247,8 +248,7 @@ class SegmentedInputInputTrackBacking implements InputTrackBacking {
247
248
  packetInfos = new WeakMap<EncodedPacket, PacketInfo>();
248
249
 
249
250
  hydrationPromise: Promise<void> | null = null;
250
- firstInputTrack: InputTrack | null = null;
251
- firstSegment: Segment | null = null;
251
+ metadataInputTrack: InputTrack | null = null;
252
252
 
253
253
  constructor(segmentedInput: SegmentedInput, decl: SegmentedInputTrackDeclaration, number: number) {
254
254
  this.segmentedInput = segmentedInput;
@@ -258,34 +258,35 @@ class SegmentedInputInputTrackBacking implements InputTrackBacking {
258
258
 
259
259
  hydrate() {
260
260
  return this.hydrationPromise ??= (async () => {
261
- this.segmentedInput.firstSegment ??= await this.segmentedInput.getFirstSegment({});
262
- if (!this.segmentedInput.firstSegment) {
263
- throw new Error('Missing first segment, can\'t retrieve track.');
264
- }
265
-
266
- let currentSegment: Segment | null = this.segmentedInput.firstSegment;
261
+ const firstSegment = await this.getFirstSegment();
267
262
  let track: InputTrack | null = null;
268
263
 
269
- // For playlists with sparse tracks (rare af!!), not every segment has every track, so we need to loop to
270
- // find the first segment that actually contains the track we want.
271
- while (currentSegment) {
272
- const input = this.segmentedInput.getInputForSegment(currentSegment);
273
- const inputTracks = await input.getTracks();
264
+ if (firstSegment.initSegment) {
265
+ // The init segment holds all the metadata, so there's no need to fetch any actual media
266
+ const inputTracks = await this.segmentedInput.getInputForSegment(firstSegment.initSegment).getTracks();
274
267
  track = inputTracks.find(x => x.type === this.decl.type && x.number === this.number) ?? null;
268
+ } else {
269
+ // For playlists with sparse tracks (rare af!!), not every segment has every track, so we need to loop
270
+ // to find the first segment that actually contains the track we want.
271
+ let currentSegment: Segment | null = firstSegment;
272
+ while (currentSegment) {
273
+ const input = this.segmentedInput.getInputForSegment(currentSegment);
274
+ const inputTracks = await input.getTracks();
275
+ track = inputTracks.find(x => x.type === this.decl.type && x.number === this.number) ?? null;
276
+
277
+ if (track) {
278
+ break;
279
+ }
275
280
 
276
- if (track) {
277
- break;
281
+ currentSegment = await this.segmentedInput.getNextSegment(currentSegment, {});
278
282
  }
279
-
280
- currentSegment = await this.segmentedInput.getNextSegment(currentSegment, {});
281
283
  }
282
284
 
283
285
  if (!track) {
284
286
  throw new Error('No matching track found in underlying media data.');
285
287
  }
286
288
 
287
- this.firstInputTrack = track;
288
- this.firstSegment = currentSegment;
289
+ this.metadataInputTrack = track;
289
290
  })();
290
291
  }
291
292
 
@@ -299,7 +300,7 @@ class SegmentedInputInputTrackBacking implements InputTrackBacking {
299
300
 
300
301
  /** If the backing track is already present, delegate synchronously; otherwise, hydrate first. */
301
302
  delegate<T>(fn: () => MaybePromise<T>): MaybePromise<T> {
302
- if (this.firstInputTrack) {
303
+ if (this.metadataInputTrack) {
303
304
  return fn();
304
305
  }
305
306
 
@@ -307,13 +308,13 @@ class SegmentedInputInputTrackBacking implements InputTrackBacking {
307
308
  }
308
309
 
309
310
  async getDecoderConfig() {
310
- return this.delegate(() => this.firstInputTrack!._backing.getDecoderConfig());
311
+ return this.delegate(() => this.metadataInputTrack!._backing.getDecoderConfig());
311
312
  }
312
313
 
313
314
  getHasOnlyKeyPackets() {
314
315
  return this.delegate(() => {
315
316
  return this.segmentedInput.hasOnlyKeyPackets
316
- || (this.firstInputTrack!._backing.getHasOnlyKeyPackets?.() ?? null);
317
+ || (this.metadataInputTrack!._backing.getHasOnlyKeyPackets?.() ?? null);
317
318
  });
318
319
  }
319
320
 
@@ -322,34 +323,32 @@ class SegmentedInputInputTrackBacking implements InputTrackBacking {
322
323
  }
323
324
 
324
325
  getCodec() {
325
- return this.delegate(() => this.firstInputTrack!._backing.getCodec());
326
+ return this.delegate(() => this.metadataInputTrack!._backing.getCodec());
326
327
  }
327
328
 
328
329
  getInternalCodecId() {
329
- return this.delegate(() => this.firstInputTrack!._backing.getInternalCodecId());
330
+ return this.delegate(() => this.metadataInputTrack!._backing.getInternalCodecId());
330
331
  }
331
332
 
332
333
  getDisposition() {
333
- return this.delegate(() => this.firstInputTrack!._backing.getDisposition());
334
+ return this.delegate(() => this.metadataInputTrack!._backing.getDisposition());
334
335
  }
335
336
 
336
337
  getLanguageCode() {
337
- return this.delegate(() => this.firstInputTrack!._backing.getLanguageCode());
338
+ return this.delegate(() => this.metadataInputTrack!._backing.getLanguageCode());
338
339
  }
339
340
 
340
341
  getName() {
341
- return this.delegate(() => this.firstInputTrack!._backing.getName());
342
+ return this.delegate(() => this.metadataInputTrack!._backing.getName());
342
343
  }
343
344
 
344
345
  getTimeResolution() {
345
- return this.delegate(() => this.firstInputTrack!._backing.getTimeResolution());
346
+ return this.delegate(() => this.metadataInputTrack!._backing.getTimeResolution());
346
347
  }
347
348
 
348
349
  async isRelativeToUnixEpoch() {
349
- await this.hydrate();
350
-
351
- assert(this.segmentedInput.firstSegment);
352
- return this.segmentedInput.firstSegment.unixEpochTimestamp === this.segmentedInput.firstSegment.timestamp;
350
+ const firstSegment = await this.getFirstSegment();
351
+ return firstSegment.unixEpochTimestamp === firstSegment.timestamp;
353
352
  }
354
353
 
355
354
  getUnixTimeForTimestamp(timestamp: number) {
@@ -357,11 +356,11 @@ class SegmentedInputInputTrackBacking implements InputTrackBacking {
357
356
  }
358
357
 
359
358
  getBitrate() {
360
- return this.delegate(() => this.firstInputTrack!._backing.getBitrate());
359
+ return this.delegate(() => this.metadataInputTrack!._backing.getBitrate());
361
360
  }
362
361
 
363
362
  getAverageBitrate() {
364
- return this.delegate(() => this.firstInputTrack!._backing.getAverageBitrate());
363
+ return this.delegate(() => this.metadataInputTrack!._backing.getAverageBitrate());
365
364
  }
366
365
 
367
366
  getDurationFromMetadata(options: DurationMetadataRequestOptions): Promise<number | null> {
@@ -374,11 +373,11 @@ class SegmentedInputInputTrackBacking implements InputTrackBacking {
374
373
 
375
374
  async createAdjustedPacket(packet: EncodedPacket, segment: Segment, track: InputTrack) {
376
375
  assert(packet.sequenceNumber >= 0);
377
- assert(this.segmentedInput.firstSegment);
378
376
 
377
+ const firstSegment = await this.getFirstSegment();
379
378
  const mediaOffset = await this.segmentedInput.getMediaOffset(segment, track.input);
380
379
  // If we didn't do this then sequence numbers would exceed Number.MAX_SAFE_INTEGER for Unix-timestamped segments
381
- const segmentTimestampRelativeToFirst = segment.timestamp - this.segmentedInput.firstSegment.timestamp;
380
+ const segmentTimestampRelativeToFirst = segment.timestamp - firstSegment.timestamp;
382
381
 
383
382
  const modified = packet.clone({
384
383
  timestamp: roundToDivisor(
@@ -400,40 +399,41 @@ class SegmentedInputInputTrackBacking implements InputTrackBacking {
400
399
  }
401
400
 
402
401
  async getFirstPacket(options: PacketRetrievalOptions): Promise<EncodedPacket | null> {
403
- await this.hydrate();
404
-
405
- assert(this.firstInputTrack);
406
- assert(this.firstSegment);
407
-
408
- let currentTrack: InputTrack | null = this.firstInputTrack;
409
- let currentSegment: Segment | null = this.firstSegment;
402
+ const firstSegment = await this.getFirstSegment();
403
+ // Kick this off early so it runs in parallel to loading our own media
404
+ void this.segmentedInput.getMediaOffsetForDiscontinuity(firstSegment.discontinuityNumber).catch(() => {});
410
405
 
411
406
  // Loop until we found a segment with a packet (segments may contain zero packets in rare cases)
412
- while (true) {
413
- if (currentTrack) {
414
- const packet = await currentTrack._backing.getFirstPacket(options);
407
+ let currentSegment: Segment | null = firstSegment;
408
+ while (currentSegment) {
409
+ const input = this.segmentedInput.getInputForSegment(currentSegment);
410
+ const tracks = await input.getTracks();
411
+ const track = tracks.find(t => t.type === this.decl.type && t.number === this.number);
412
+
413
+ if (track) {
414
+ const packet = await track._backing.getFirstPacket(options);
415
415
  if (packet) {
416
- return this.createAdjustedPacket(packet, currentSegment, currentTrack);
416
+ return this.createAdjustedPacket(packet, currentSegment, track);
417
417
  }
418
418
  }
419
419
 
420
420
  currentSegment = await this.segmentedInput.getNextSegment(currentSegment, {
421
421
  skipLiveWait: options.skipLiveWait,
422
422
  });
423
- if (!currentSegment) {
424
- break;
425
- }
426
-
427
- const nextInput = this.segmentedInput.getInputForSegment(currentSegment);
428
- const nextTracks = await nextInput.getTracks();
429
- currentTrack = nextTracks.find(t => (
430
- t.type === this.firstInputTrack!.type && t.number === this.firstInputTrack!.number
431
- )) ?? null;
432
423
  }
433
424
 
434
425
  return null;
435
426
  }
436
427
 
428
+ async getFirstSegment() {
429
+ this.segmentedInput.firstSegment ??= await this.segmentedInput.getFirstSegment({});
430
+ if (!this.segmentedInput.firstSegment) {
431
+ throw new Error('Missing first segment, can\'t retrieve track.');
432
+ }
433
+
434
+ return this.segmentedInput.firstSegment;
435
+ }
436
+
437
437
  getNextPacket(packet: EncodedPacket, options: PacketRetrievalOptions): Promise<EncodedPacket | null> {
438
438
  return this._getNextInternal(packet, options, false);
439
439
  }
@@ -516,14 +516,13 @@ class SegmentedInputInputTrackBacking implements InputTrackBacking {
516
516
  return null;
517
517
  }
518
518
 
519
- await this.hydrate();
519
+ // Kick this off early so it runs in parallel to loading our own media
520
+ void this.segmentedInput.getMediaOffsetForDiscontinuity(currentSegment.discontinuityNumber).catch(() => {});
520
521
 
521
522
  while (currentSegment) {
522
523
  const input = this.segmentedInput.getInputForSegment(currentSegment);
523
524
  const tracks = await input.getTracks();
524
- const track = tracks.find(t => (
525
- t.type === this.firstInputTrack!.type && t.number === this.firstInputTrack!.number
526
- ));
525
+ const track = tracks.find(t => t.type === this.decl.type && t.number === this.number);
527
526
 
528
527
  if (!track) {
529
528
  // Search the previous segment
@@ -587,9 +586,7 @@ class SegmentedInputInputTrackBacking implements InputTrackBacking {
587
586
  if (nextSegment) {
588
587
  const nextInput = this.segmentedInput.getInputForSegment(nextSegment);
589
588
  const nextTracks = await nextInput.getTracks();
590
- const nextTrack = nextTracks.find(t => (
591
- t.type === this.firstInputTrack!.type && t.number === this.firstInputTrack!.number
592
- ));
589
+ const nextTrack = nextTracks.find(t => t.type === this.decl.type && t.number === this.number);
593
590
 
594
591
  let nextPacket = nextTrack
595
592
  ? await nextTrack._backing.getFirstPacket({ ...options, metadataOnly: true })
@@ -632,71 +629,71 @@ const toSegmentTimestamp = (timestamp: number, mediaOffset: number, timeResoluti
632
629
  class SegmentedInputInputVideoTrackBacking
633
630
  extends SegmentedInputInputTrackBacking
634
631
  implements InputVideoTrackBacking {
635
- declare firstInputTrack: InputVideoTrack | null;
632
+ declare metadataInputTrack: InputVideoTrack | null;
636
633
 
637
634
  override getType() {
638
635
  return 'video' as const;
639
636
  }
640
637
 
641
638
  override getCodec() {
642
- return this.delegate(() => this.firstInputTrack!._backing.getCodec());
639
+ return this.delegate(() => this.metadataInputTrack!._backing.getCodec());
643
640
  }
644
641
 
645
642
  getCodedWidth() {
646
- return this.delegate(() => this.firstInputTrack!._backing.getCodedWidth());
643
+ return this.delegate(() => this.metadataInputTrack!._backing.getCodedWidth());
647
644
  }
648
645
 
649
646
  getCodedHeight() {
650
- return this.delegate(() => this.firstInputTrack!._backing.getCodedHeight());
647
+ return this.delegate(() => this.metadataInputTrack!._backing.getCodedHeight());
651
648
  }
652
649
 
653
650
  getSquarePixelWidth() {
654
- return this.delegate(() => this.firstInputTrack!._backing.getSquarePixelWidth());
651
+ return this.delegate(() => this.metadataInputTrack!._backing.getSquarePixelWidth());
655
652
  }
656
653
 
657
654
  getSquarePixelHeight() {
658
- return this.delegate(() => this.firstInputTrack!._backing.getSquarePixelHeight());
655
+ return this.delegate(() => this.metadataInputTrack!._backing.getSquarePixelHeight());
659
656
  }
660
657
 
661
658
  getTransformationMatrix() {
662
- return this.delegate(() => this.firstInputTrack!._backing.getTransformationMatrix());
659
+ return this.delegate(() => this.metadataInputTrack!._backing.getTransformationMatrix());
663
660
  }
664
661
 
665
662
  async getColorSpace(): Promise<VideoColorSpaceInit> {
666
- return this.delegate(() => this.firstInputTrack!._backing.getColorSpace());
663
+ return this.delegate(() => this.metadataInputTrack!._backing.getColorSpace());
667
664
  }
668
665
 
669
666
  async canBeTransparent(): Promise<boolean> {
670
- return this.delegate(() => this.firstInputTrack!._backing.canBeTransparent());
667
+ return this.delegate(() => this.metadataInputTrack!._backing.canBeTransparent());
671
668
  }
672
669
 
673
670
  override async getDecoderConfig(): Promise<VideoDecoderConfig | null> {
674
- return this.delegate(() => this.firstInputTrack!._backing.getDecoderConfig());
671
+ return this.delegate(() => this.metadataInputTrack!._backing.getDecoderConfig());
675
672
  }
676
673
  }
677
674
 
678
675
  class SegmentedInputInputAudioTrackBacking
679
676
  extends SegmentedInputInputTrackBacking
680
677
  implements InputAudioTrackBacking {
681
- declare firstInputTrack: InputAudioTrack;
678
+ declare metadataInputTrack: InputAudioTrack;
682
679
 
683
680
  override getType() {
684
681
  return 'audio' as const;
685
682
  }
686
683
 
687
684
  override getCodec() {
688
- return this.delegate(() => this.firstInputTrack._backing.getCodec());
685
+ return this.delegate(() => this.metadataInputTrack._backing.getCodec());
689
686
  }
690
687
 
691
688
  getNumberOfChannels() {
692
- return this.delegate(() => this.firstInputTrack._backing.getNumberOfChannels());
689
+ return this.delegate(() => this.metadataInputTrack._backing.getNumberOfChannels());
693
690
  }
694
691
 
695
692
  getSampleRate() {
696
- return this.delegate(() => this.firstInputTrack._backing.getSampleRate());
693
+ return this.delegate(() => this.metadataInputTrack._backing.getSampleRate());
697
694
  }
698
695
 
699
696
  override async getDecoderConfig(): Promise<AudioDecoderConfig | null> {
700
- return this.delegate(() => this.firstInputTrack._backing.getDecoderConfig());
697
+ return this.delegate(() => this.metadataInputTrack._backing.getDecoderConfig());
701
698
  }
702
699
  }
@@ -8,6 +8,6 @@
8
8
 
9
9
  // This file is generated by scripts/write-version.ts. Do not edit manually.
10
10
 
11
- export const VERSION = '1.66.2';
11
+ export const VERSION = '1.66.5';
12
12
 
13
13
  export const VERSIONED_NAME = `Mediabunny v${VERSION}`;
@@ -0,0 +1,28 @@
1
+ /*!
2
+ * Copyright (c) 2026-present, Vanilagy and contributors
3
+ *
4
+ * This Source Code Form is subject to the terms of the Mozilla Public
5
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
7
+ */
8
+
9
+ import { colorAlphaMergerWorkerCode } from './media-sink';
10
+ import { colorAlphaSplitterWorkerCode, mediaStreamTrackProcessorWorkerCode } from './media-source';
11
+ import { unthrottledTimerWorkerCode } from './misc';
12
+
13
+ switch (self.name) {
14
+ case 'unthrottled-timer':
15
+ unthrottledTimerWorkerCode();
16
+ break;
17
+ case 'color-alpha-splitter':
18
+ colorAlphaSplitterWorkerCode();
19
+ break;
20
+ case 'color-alpha-merger':
21
+ colorAlphaMergerWorkerCode();
22
+ break;
23
+ case 'media-stream-track-processor':
24
+ mediaStreamTrackProcessorWorkerCode();
25
+ break;
26
+ default:
27
+ throw new Error(`Unknown worker name '${self.name}'.`);
28
+ }