@p4code/cli 0.9.19 → 0.9.21

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 (322) hide show
  1. package/dist/{TraceDiagnostics-BU8mTsuy.mjs → TraceDiagnostics-DEAfnZGb.mjs} +3 -3
  2. package/dist/bin.mjs +1 -1
  3. package/dist/{binCli-CJGD6FcB.mjs → binCli-IfUU-uWs.mjs} +6 -6
  4. package/dist/client/.vite/manifest.json +2113 -2113
  5. package/dist/client/assets/{2NI2N5EU-dXNVRqH0.js → 2NI2N5EU-qP3PpVDC.js} +2 -2
  6. package/dist/client/assets/{4UO7MD6I-BnTV2LIU.js → 4UO7MD6I-Da5jHHfF.js} +2 -2
  7. package/dist/client/assets/{5B3SVYGG-BW_NJOn9.js → 5B3SVYGG-BGHUtemY.js} +2 -2
  8. package/dist/client/assets/{5GK6JWQ2-zR4M88FU.js → 5GK6JWQ2-DwbHk3MV.js} +2 -2
  9. package/dist/client/assets/{5N7A7DKN-DIzrmjXm.js → 5N7A7DKN-B-2quXAp.js} +2 -2
  10. package/dist/client/assets/{5OC2THR4-D9gz0spY.js → 5OC2THR4-DSQWJ0ZQ.js} +2 -2
  11. package/dist/client/assets/{5S6HY5KT-BFO1LsJz.js → 5S6HY5KT-CAwEcA6I.js} +2 -2
  12. package/dist/client/assets/{6IMQ5BUJ-CflGSI2z.js → 6IMQ5BUJ-BABYtiev.js} +2 -2
  13. package/dist/client/assets/{6OLKWJ4F-B_-tUtQE.js → 6OLKWJ4F-CwQRt55E.js} +2 -2
  14. package/dist/client/assets/{74OO7NKP-CNFGk064.js → 74OO7NKP-DZoL_aBI.js} +2 -2
  15. package/dist/client/assets/{75O6YZUN-DSw7e3qz.js → 75O6YZUN-CoqdPLhF.js} +2 -2
  16. package/dist/client/assets/{77XECAW3-C1endahg.js → 77XECAW3-DM5Itfvk.js} +2 -2
  17. package/dist/client/assets/{ABYRPUBD-DGyrlbqz.js → ABYRPUBD-C2IaQicJ.js} +2 -2
  18. package/dist/client/assets/AlertDialogRoot-COfNlajP.js +2 -0
  19. package/dist/client/assets/{AnimatedHeight-DG3oq8Fl.js → AnimatedHeight-BoS1RBdk.js} +2 -2
  20. package/dist/client/assets/{AuthSurfaceShell-uHFuClfP.js → AuthSurfaceShell-Dfcdz_aG.js} +2 -2
  21. package/dist/client/assets/{BB2UYUI2-DJtfqV3f.js → BB2UYUI2-DQkTEBDf.js} +2 -2
  22. package/dist/client/assets/{BUM34MOA-B4MgXIYY.js → BUM34MOA-DuY83HEN.js} +2 -2
  23. package/dist/client/assets/{CEQABKGZ-CnWbDLSz.js → CEQABKGZ-CNAynrzB.js} +2 -2
  24. package/dist/client/assets/{CXAC5362-DdZ6n5qP.js → CXAC5362-B_mhvA6r.js} +2 -2
  25. package/dist/client/assets/{ChatGptUsageButton-Dg1SR7pz.js → ChatGptUsageButton-DT3CRIhB.js} +2 -2
  26. package/dist/client/assets/{ChatMarkdown-eJNo9q4b.js → ChatMarkdown-_SLyl8Hk.js} +9 -9
  27. package/dist/client/assets/CheckboxIndicator-Dj91Im5z.js +2 -0
  28. package/dist/client/assets/{ClippedText-Cny-j-4e.js → ClippedText-CmBRrYNb.js} +2 -2
  29. package/dist/client/assets/{CodexSetupSection.logic-C4KEUUA1.js → CodexSetupSection.logic-CqdvWoE6.js} +2 -2
  30. package/dist/client/assets/CollapsiblePanel-BwDr-EKA.js +2 -0
  31. package/dist/client/assets/ComboboxClear-DeqR6c-6.js +2 -0
  32. package/dist/client/assets/{ComboboxGroupLabel-9alK0hYt.js → ComboboxGroupLabel-Dk-MF4sD.js} +2 -2
  33. package/dist/client/assets/{CommandBlock-BOYakQHx.js → CommandBlock-DnTIHX5l.js} +2 -2
  34. package/dist/client/assets/CompositeRoot-Cx12XSsh.js +2 -0
  35. package/dist/client/assets/{ConnectAgentSurface-D9vE8btn.js → ConnectAgentSurface-D-Z7Gl3G.js} +2 -2
  36. package/dist/client/assets/{ConnectionStatusDot-DL0Hsk-v.js → ConnectionStatusDot-BnhNFCMA.js} +2 -2
  37. package/dist/client/assets/{DRLTVNUE-D99K7hWK.js → DRLTVNUE-Bp-Mh_TD.js} +2 -2
  38. package/dist/client/assets/{DYY6UVD2-BF6iP9-o.js → DYY6UVD2-Dwh9ZkXt.js} +2 -2
  39. package/dist/client/assets/DevicePanel-MMC7u5qJ.js +2 -0
  40. package/dist/client/assets/{DeviceSetup-DQqwNSXQ.js → DeviceSetup-BCrBVLkf.js} +2 -2
  41. package/dist/client/assets/DialogTitle-5cBExuFs.js +2 -0
  42. package/dist/client/assets/{DiffCommentAnnotation-DOn5F9Vx.js → DiffCommentAnnotation-D7iLWjnP.js} +2 -2
  43. package/dist/client/assets/{DiffFileTree-C7d_tSjH.js → DiffFileTree-PCGZGqlB.js} +2 -2
  44. package/dist/client/assets/DiffPanel-OOedo4tu.js +2 -0
  45. package/dist/client/assets/{DiffWorkerPoolProvider-CHaL1Ona.js → DiffWorkerPoolProvider-CmorWW2H.js} +2 -2
  46. package/dist/client/assets/{EmbeddedDesign-DZezJSS1.js → EmbeddedDesign-CeUGLwuZ.js} +7 -7
  47. package/dist/client/assets/{EnvironmentMachineIcon-BrYDn6tR.js → EnvironmentMachineIcon-Lz2YGk0G.js} +2 -2
  48. package/dist/client/assets/{ExpandableText-BsOIEd28.js → ExpandableText-B034p2kF.js} +2 -2
  49. package/dist/client/assets/{FNOVOB4O-B07Bu4_g.js → FNOVOB4O-BJscBtWY.js} +2 -2
  50. package/dist/client/assets/{FieldControl-Ua5R3Une.js → FieldControl-H6iQvC-Q.js} +2 -2
  51. package/dist/client/assets/{FileDiff-CAhD0qa4.js → FileDiff-BMtpmo0v.js} +2 -2
  52. package/dist/client/assets/{FilePreviewPanel-Ptxxfl5h.js → FilePreviewPanel-DUqI7pF3.js} +4 -4
  53. package/dist/client/assets/{FoldedSettingsSection-C-4eZXtv.js → FoldedSettingsSection-BTMENmDo.js} +2 -2
  54. package/dist/client/assets/{HDGCDEEZ-BiCUaNcl.js → HDGCDEEZ-BA3H_tu4.js} +2 -2
  55. package/dist/client/assets/{HSJLKHB7-MsC8mniI.js → HSJLKHB7-BojHXJG0.js} +2 -2
  56. package/dist/client/assets/{Icons-D8Idteuf.js → Icons-DmQwwfAN.js} +2 -2
  57. package/dist/client/assets/Input-DWc7cRWt.js +2 -0
  58. package/dist/client/assets/{IntervalSecondsField-Aqwzi0Sz.js → IntervalSecondsField-Cpc7UePr.js} +2 -2
  59. package/dist/client/assets/JZOYTAAL-Bw2-11fa.js +1 -0
  60. package/dist/client/assets/{K3MD6TGW-CkU_KXkd.js → K3MD6TGW-hwfRTJ3N.js} +2 -2
  61. package/dist/client/assets/{K7RP3OMA-DLs66X2w.js → K7RP3OMA-4mJh9KrG.js} +2 -2
  62. package/dist/client/assets/{KeybindingsSettings.logic-DNTed1xn.js → KeybindingsSettings.logic-C6XG7NtX.js} +2 -2
  63. package/dist/client/assets/{LHDIQX7Q-BOSadp0O.js → LHDIQX7Q-LIdvhN0m.js} +2 -2
  64. package/dist/client/assets/{LUXOKEGN-qg2nPaOP.js → LUXOKEGN-B1aHy25-.js} +2 -2
  65. package/dist/client/assets/{LinkMachineSelect-CQIJcmq4.js → LinkMachineSelect-CM7JZDuM.js} +2 -2
  66. package/dist/client/assets/{MathTypeset-B_2pC76G.js → MathTypeset-CA2nw_Ej.js} +2 -2
  67. package/dist/client/assets/{ModelLiveLayer-BdDN1RwJ.js → ModelLiveLayer-CPk6oSLz.js} +3 -3
  68. package/dist/client/assets/{N3JZAHOW-DkFZrX8t.js → N3JZAHOW-Dz6QAj1L.js} +2 -2
  69. package/dist/client/assets/{NUIALGQ3-DF_hOTNF.js → NUIALGQ3-W9kPoZrb.js} +2 -2
  70. package/dist/client/assets/{NoProjectsHero-DIDw2XWy.js → NoProjectsHero-DrTDAhjM.js} +2 -2
  71. package/dist/client/assets/{O65XPQGZ-DX7_CzKu.js → O65XPQGZ-CPx16bPB.js} +2 -2
  72. package/dist/client/assets/{O7XIQ6OM-mHLqolvI.js → O7XIQ6OM-CAdGDrqF.js} +2 -2
  73. package/dist/client/assets/{OFQON5FD-Suig0WTF.js → OFQON5FD-DOxYOpsO.js} +2 -2
  74. package/dist/client/assets/{P4ConnectAccountPages-naPvNZLz.js → P4ConnectAccountPages-D0qqCxCf.js} +2 -2
  75. package/dist/client/assets/{P4ConnectSidebarSignIn-D2rgfUAh.js → P4ConnectSidebarSignIn-CtO1hqIS.js} +2 -2
  76. package/dist/client/assets/{PJQHF43J-7rnsehAx.js → PJQHF43J-CEic-zJ0.js} +2 -2
  77. package/dist/client/assets/PanelLayoutControls-CPevLAhG.js +216 -0
  78. package/dist/client/assets/{PierreEntryIcon-0R4z7KQU.js → PierreEntryIcon-oOiSTYpG.js} +2 -2
  79. package/dist/client/assets/PopoverHandle-DEcvmS0k.js +2 -0
  80. package/dist/client/assets/PreviewPanel-BSwObBjW.js +2 -0
  81. package/dist/client/assets/ProjectDefaultsSettings-BkxL8Xjx.js +2 -0
  82. package/dist/client/assets/{ProjectFavicon-DJmxMkvz.js → ProjectFavicon-DYcNXMDQ.js} +3 -3
  83. package/dist/client/assets/{ProjectIconPickerDialog-3Bcbbvvc.js → ProjectIconPickerDialog-CnlPMGQj.js} +2 -2
  84. package/dist/client/assets/{ProjectMonogram-Bb9wZVNY.js → ProjectMonogram-C8btbogu.js} +2 -2
  85. package/dist/client/assets/{ProviderAuthTerminal-mgY-tn0M.js → ProviderAuthTerminal-B1NeqFZE.js} +2 -2
  86. package/dist/client/assets/ProviderModelPicker-CLwSFV6Q.js +2 -0
  87. package/dist/client/assets/{ProviderSettingsForm-CGySH9bP.js → ProviderSettingsForm-D9GJtzdb.js} +2 -2
  88. package/dist/client/assets/PullRequestCodeTab-CajEWSe5.js +6 -0
  89. package/dist/client/assets/{RHNBAITX-Ddcb7a4G.js → RHNBAITX-D5lTu0BB.js} +2 -2
  90. package/dist/client/assets/{ReadOnlySourcePreview-CUrcvaQB.js → ReadOnlySourcePreview-LxG8Br9J.js} +2 -2
  91. package/dist/client/assets/{RedactedSensitiveText-DiLAhy4C.js → RedactedSensitiveText-BMXImj30.js} +2 -2
  92. package/dist/client/assets/{RenderErrorBoundary-DNjP1Gq4.js → RenderErrorBoundary-CcI-4Zo3.js} +3 -3
  93. package/dist/client/assets/{RightPanelResizeHandle-BKZPxtjZ.js → RightPanelResizeHandle-Cog3JVw0.js} +2 -2
  94. package/dist/client/assets/{SLD4V6NK-CAdpUQd9.js → SLD4V6NK-CG_xQFi-.js} +2 -2
  95. package/dist/client/assets/ScheduledTasksSettings-CSygG_5X.js +6 -0
  96. package/dist/client/assets/{ScopedSwitch-CjWqxV6P.js → ScopedSwitch-LzARRHas.js} +2 -2
  97. package/dist/client/assets/{ScrollAreaCorner-BNGMax5h.js → ScrollAreaCorner-DFCZuJ0r.js} +2 -2
  98. package/dist/client/assets/{SecretInput-F_2AS4sm.js → SecretInput-CRgvNUgU.js} +2 -2
  99. package/dist/client/assets/SelectScrollUpArrow-C-MWJdyw.js +2 -0
  100. package/dist/client/assets/{SelfImproveSettingsSection-dyJbezur.js → SelfImproveSettingsSection-DjuOvf_q.js} +2 -2
  101. package/dist/client/assets/{SettingsPanels-BwrWyM3f.js → SettingsPanels-Ci2h30Aw.js} +5 -5
  102. package/dist/client/assets/{SettingsPanels.logic-DWRYwc9b.js → SettingsPanels.logic-BkjrmwrI.js} +2 -2
  103. package/dist/client/assets/{SettingsScopeNotice-DpC9Q9ae.js → SettingsScopeNotice-96p-bg8p.js} +2 -2
  104. package/dist/client/assets/{SidebarStageBackdrop-ByWEF0y2.js → SidebarStageBackdrop-B8YG-M-e.js} +2 -2
  105. package/dist/client/assets/{T3PCR2KE-BsP9x4U3.js → T3PCR2KE-DyNYo7Zy.js} +2 -2
  106. package/dist/client/assets/{TKWO2OVW-BONiqXri.js → TKWO2OVW-5eCjJCfz.js} +2 -2
  107. package/dist/client/assets/{TSHNXIZL-CLTZIB-s.js → TSHNXIZL-CjI9VTqp.js} +2 -2
  108. package/dist/client/assets/{ThemeEditorPanel-C7o3GtWa.js → ThemeEditorPanel-BdfXdTV6.js} +3 -3
  109. package/dist/client/assets/{ThreadDetailsItemsMenu-Bq_XM62t.js → ThreadDetailsItemsMenu-Cgj2yuzU.js} +19 -19
  110. package/dist/client/assets/{ThreadTerminalDrawer-CD5oxZhC.js → ThreadTerminalDrawer-DBG1eHBS.js} +4 -4
  111. package/dist/client/assets/TooltipProvider-DiV5KdTq.js +2 -0
  112. package/dist/client/assets/{UQJE5E4I-BS_wwVFT.js → UQJE5E4I-CY9HwTsw.js} +2 -2
  113. package/dist/client/assets/{USNYFO5S-CpDVNtuT.js → USNYFO5S-BW0HcjRg.js} +2 -2
  114. package/dist/client/assets/{Virtualizer-BWztABfX.js → Virtualizer-NI9bqlwX.js} +2 -2
  115. package/dist/client/assets/{WEVWDWVA-4IVaqPOG.js → WEVWDWVA-BF8z-yRH.js} +2 -2
  116. package/dist/client/assets/{WorkspaceBreadcrumb-BHensDdi.js → WorkspaceBreadcrumb-Cok6l_SJ.js} +2 -2
  117. package/dist/client/assets/{WorkspacePageContainer-CCJOwHlv.js → WorkspacePageContainer-_--jFIZ8.js} +2 -2
  118. package/dist/client/assets/{WorkspacePageHeader-C9Tpr_np.js → WorkspacePageHeader-CJB6rvZc.js} +2 -2
  119. package/dist/client/assets/{X5RFHQXM-DO1k5hPx.js → X5RFHQXM-pdor6bX7.js} +2 -2
  120. package/dist/client/assets/{X62E3GBT-DR5ebldd.js → X62E3GBT-C6b2WsLT.js} +2 -2
  121. package/dist/client/assets/{XBNEOJTC-D6Kx02Ci.js → XBNEOJTC-BxqaKoJL.js} +2 -2
  122. package/dist/client/assets/{YHV2MVVZ-B7xQdu1d.js → YHV2MVVZ-DO-ICZOV.js} +2 -2
  123. package/dist/client/assets/{YURCZMG2-vpRi9ruy.js → YURCZMG2-BxKVNupW.js} +2 -2
  124. package/dist/client/assets/{YVG2LODB-BPr-N_Eh.js → YVG2LODB-BwiP1iS0.js} +2 -2
  125. package/dist/client/assets/_chat-DDScEBKF.js +47 -0
  126. package/dist/client/assets/{_chat.design-JY93KEj-.js → _chat.design-360SdjDb.js} +2 -2
  127. package/dist/client/assets/{_chat.index-BLQil4HT.js → _chat.index-DsRV2lh0.js} +2 -2
  128. package/dist/client/assets/{_chat.new-BUUjlaam.js → _chat.new-B_AL_NJ2.js} +3 -3
  129. package/dist/client/assets/_chat.pull-requests-DlL4gjh7.js +2 -0
  130. package/dist/client/assets/{alert-Eh-IusVP.js → alert-D6WJ0q4-.js} +2 -2
  131. package/dist/client/assets/{alert-dialog-BxwvNOYD.js → alert-dialog-DsMTn0ZK.js} +2 -2
  132. package/dist/client/assets/{assetUrls-Bk8CvVQ5.js → assetUrls-gAudvjhV.js} +2 -2
  133. package/dist/client/assets/assets-DaZ46ybf.js +2 -0
  134. package/dist/client/assets/{browserHistoryStore-CQgs_U0x.js → browserHistoryStore-CIeLvEnV.js} +2 -2
  135. package/dist/client/assets/{browserLinkTarget-BD9wK52f.js → browserLinkTarget-MQvtO-01.js} +2 -2
  136. package/dist/client/assets/{checkbox-CDoyvSyH.js → checkbox-Cw33xyU7.js} +2 -2
  137. package/dist/client/assets/{color-picker-BOsv4n_B.js → color-picker-Bmtarpj9.js} +2 -2
  138. package/dist/client/assets/{combobox-BJsEk7ze.js → combobox-D6RfzdE7.js} +2 -2
  139. package/dist/client/assets/{command-Cg83G2rG.js → command-1dJ-vX2N.js} +2 -2
  140. package/dist/client/assets/{connect-C7ENaX3L.js → connect-DkCGs4oR.js} +2 -2
  141. package/dist/client/assets/connect-agent-C4n-OyN3.js +2 -0
  142. package/dist/client/assets/{design-pZfTAgOJ.js → design-Djc1_eDF.js} +2 -2
  143. package/dist/client/assets/{device-CG5GzxuX.js → device-P8L_QiVD.js} +2 -2
  144. package/dist/client/assets/{dialog-wBelv1Ac.js → dialog-5OaxRXCC.js} +2 -2
  145. package/dist/client/assets/diffPanelStore-D3ARjaef.js +2 -0
  146. package/dist/client/assets/{diffRendering-C_l9f0DJ.js → diffRendering-Cb9qJUqp.js} +2 -2
  147. package/dist/client/assets/{dist-1X_vspyy.js → dist-BocOAtMa.js} +3 -3
  148. package/dist/client/assets/{draft-input-BhYlt4Pu.js → draft-input-DM7mC5ty.js} +2 -2
  149. package/dist/client/assets/{duoViewer-C9zEhnho.js → duoViewer-Domn2baW.js} +2 -2
  150. package/dist/client/assets/{dynamic--1QgBotz.js → dynamic-CjS-lEY3.js} +2 -2
  151. package/dist/client/assets/{embeddedScripts-B_jWJYkI.js → embeddedScripts-AO2vzovy.js} +2 -2
  152. package/dist/client/assets/{empty-CJnssipy.js → empty-VkAC9qIO.js} +2 -2
  153. package/dist/client/assets/entities-s42SFcbu.js +2 -0
  154. package/dist/client/assets/{fileLinks-Bg40qEqI.js → fileLinks-BY6FjK66.js} +2 -2
  155. package/dist/client/assets/{fileTreeExpansion-C_MZA2Fb.js → fileTreeExpansion-B--IBStv.js} +2 -2
  156. package/dist/client/assets/{getDiffFileInput-PLuWhYlb.js → getDiffFileInput-B7pCnCeh.js} +2 -2
  157. package/dist/client/assets/{htmlRender-DNX1FsUO.js → htmlRender-DYI6n9Xo.js} +2 -2
  158. package/dist/client/assets/{index-BeP8Inse.js → index-C5VbGbq-.js} +3 -3
  159. package/dist/client/assets/{input-Cd-93Wp0.js → input-CiPGmOLv.js} +2 -2
  160. package/dist/client/assets/{input-group-CsS-Psw7.js → input-group-DOUsG7P-.js} +2 -2
  161. package/dist/client/assets/{kbd-DB5SHS11.js → kbd-C8opCm5n.js} +2 -2
  162. package/dist/client/assets/{keybindings-DBugaGH3.js → keybindings-CbaDrm2P.js} +2 -2
  163. package/dist/client/assets/{lazy-8c6T_8yh.js → lazy-Bpm7QNt6.js} +4 -4
  164. package/dist/client/assets/{lazyRouteComponent-DtOhACEQ.js → lazyRouteComponent-BZe6tHvz.js} +2 -2
  165. package/dist/client/assets/{link-BrJlIcQX.js → link-BHR6GsRr.js} +2 -2
  166. package/dist/client/assets/{linkedPrompt-CN6Qis59.js → linkedPrompt-DqEOywCR.js} +2 -2
  167. package/dist/client/assets/main-BYwnnJ9E.js +38 -0
  168. package/dist/client/assets/main-i3nSjwXu.css +2 -0
  169. package/dist/client/assets/{mediaReference-CJpFszQ0.js → mediaReference-CW0q8-nM.js} +2 -2
  170. package/dist/client/assets/{mediaSource-D0cInV6V.js → mediaSource-BgP2sq1w.js} +2 -2
  171. package/dist/client/assets/{modelScene-BmBrNhLd.js → modelScene-OONljnCt.js} +2 -2
  172. package/dist/client/assets/number-field-BkDsfSCt.js +2 -0
  173. package/dist/client/assets/{observeResize-CFw3_anS.js → observeResize-BESwMMOy.js} +2 -2
  174. package/dist/client/assets/{onboarding-Eqww5SU9.js → onboarding-DLaBhCVN.js} +2 -2
  175. package/dist/client/assets/openFileInPreview-Dpge7x7S.js +2 -0
  176. package/dist/client/assets/{p4ProjectFile-BBI5SxD4.js → p4ProjectFile-Fd0NSHmZ.js} +2 -2
  177. package/dist/client/assets/{pair-DQR36eTM.js → pair-BUkFlR8l.js} +2 -2
  178. package/dist/client/assets/{pendingSendStore-Dxq1oBH6.js → pendingSendStore-CX8QB7C5.js} +2 -2
  179. package/dist/client/assets/{phoneViewer-DLo78qRr.js → phoneViewer-BJj_96At.js} +2 -2
  180. package/dist/client/assets/{pierre-icons-uaZzWTro.js → pierre-icons-BptmNFMW.js} +2 -2
  181. package/dist/client/assets/{popover-DU7x_UNP.js → popover-hyDlWUPU.js} +2 -2
  182. package/dist/client/assets/{preview-DpJtvz_q.js → preview-BBssbPEj.js} +2 -2
  183. package/dist/client/assets/{preview-CiDRJw3K.js → preview-DnCP9Q0k.js} +2 -2
  184. package/dist/client/assets/previewMiniPlayerStore-DByen2Nk.js +2 -0
  185. package/dist/client/assets/primary-TNEEuOuT.js +2 -0
  186. package/dist/client/assets/primaryCloudLinkState-DbUZbjy4.js +2 -0
  187. package/dist/client/assets/projectFilesQueryState-CVSEDHhW.js +2 -0
  188. package/dist/client/assets/{projectScriptEditor-BvwaSAI1.js → projectScriptEditor-D2C0qPZA.js} +2 -2
  189. package/dist/client/assets/{providerSkills-BzFbjrTC.js → providerSkills-5OBbbZq-.js} +2 -2
  190. package/dist/client/assets/{pullRequestDetail.logic-D9w_E_Dv.js → pullRequestDetail.logic-D5hhGj8d.js} +2 -2
  191. package/dist/client/assets/{pullRequestIcons-gBL3Yt9x.js → pullRequestIcons-1lUVOGQJ.js} +2 -2
  192. package/dist/client/assets/{pullRequestReviewStore-CDUFfLmu.js → pullRequestReviewStore-CUZ0N4F2.js} +2 -2
  193. package/dist/client/assets/{pullRequests-BZ7PzmTm.js → pullRequests-R7416J6H.js} +2 -2
  194. package/dist/client/assets/{queries-CzRpIoRQ.js → queries-Bp7Rbzrz.js} +2 -2
  195. package/dist/client/assets/query-CeIgbVxh.js +2 -0
  196. package/dist/client/assets/radio-group-C14CASyG.js +2 -0
  197. package/dist/client/assets/relay-V_5ApBIP.js +2 -0
  198. package/dist/client/assets/{renderScheduler-B6SrQg1c.js → renderScheduler-T1-hnpvd.js} +2 -2
  199. package/dist/client/assets/{rightPanelStore-BuudmoUr.js → rightPanelStore-Bt0unAo8.js} +2 -2
  200. package/dist/client/assets/runtime-B92ivG9b.js +7 -0
  201. package/dist/client/assets/{runtimeModeConfig-DyiI0NS9.js → runtimeModeConfig-DymGoV55.js} +2 -2
  202. package/dist/client/assets/{scheduledTasksSettings.logic-DK9Z9azP.js → scheduledTasksSettings.logic-DOegPD4_.js} +2 -2
  203. package/dist/client/assets/{scroll-area-B1iVi_db.js → scroll-area-D2D-AlvC.js} +2 -2
  204. package/dist/client/assets/{select-Dn3MxyiK.js → select-CE2f-g-3.js} +2 -2
  205. package/dist/client/assets/{selfImproveFindings-D5ELz2sX.js → selfImproveFindings-Bhi6QF1b.js} +2 -2
  206. package/dist/client/assets/server-GB5fRm03.js +2 -0
  207. package/dist/client/assets/session-CFzb2gMH.js +2 -0
  208. package/dist/client/assets/{session-logic-21koHfxl.js → session-logic-Cx9524Pd.js} +3 -3
  209. package/dist/client/assets/{settings-RZUSGfch.js → settings-DuV3USCX.js} +2 -2
  210. package/dist/client/assets/{settings.appearance-C2NUZQFB.js → settings.appearance-DtON2De5.js} +2 -2
  211. package/dist/client/assets/settings.archived-CxxKM6i3.js +2 -0
  212. package/dist/client/assets/{settings.computer-use-BhT0XlhO.js → settings.computer-use-BuiCBgaZ.js} +2 -2
  213. package/dist/client/assets/settings.connections-CTuywqD3.js +2 -0
  214. package/dist/client/assets/{settings.data-controls-GIrtB4_J.js → settings.data-controls-BTvw7hwA.js} +2 -2
  215. package/dist/client/assets/{settings.decisions-BBnbf4E4.js → settings.decisions-DjyXWkGE.js} +2 -2
  216. package/dist/client/assets/{settings.designs-BrpJ4wJk.js → settings.designs-B7y3Iz_g.js} +2 -2
  217. package/dist/client/assets/{settings.diagnostics-H0YPr7JD.js → settings.diagnostics-muot_u8V.js} +2 -2
  218. package/dist/client/assets/{settings.general-CuMxiE8w.js → settings.general-CejKrS3r.js} +2 -2
  219. package/dist/client/assets/{settings.integrations-bw-NYX6w.js → settings.integrations-3B64nKur.js} +2 -2
  220. package/dist/client/assets/{settings.keybindings-Mqx8YmX-.js → settings.keybindings-DhvXS2QI.js} +2 -2
  221. package/dist/client/assets/{settings.open-source-licenses-DppmDqdO.js → settings.open-source-licenses-nDTYUclU.js} +2 -2
  222. package/dist/client/assets/settings.plugins-DJQxiL8Y.js +5 -0
  223. package/dist/client/assets/{settings.projects-DvjxFMyV.js → settings.projects-Cf31zLX1.js} +4 -4
  224. package/dist/client/assets/settings.providers-BenYwp5l.js +3 -0
  225. package/dist/client/assets/{settings.scheduled-tasks-_8iDYzJF.js → settings.scheduled-tasks-B0BJtx2Y.js} +2 -2
  226. package/dist/client/assets/{settings.secrets-B5WZy_fN.js → settings.secrets-CugtPHky.js} +2 -2
  227. package/dist/client/assets/{settings.snap-shot-BThcjeQt.js → settings.snap-shot-9uuaPZ8d.js} +2 -2
  228. package/dist/client/assets/{settings.source-control-Cj9K4HE8.js → settings.source-control-DECPD9xY.js} +2 -2
  229. package/dist/client/assets/{settings.storage-D3QQPs1U.js → settings.storage-uPkJDu8D.js} +2 -2
  230. package/dist/client/assets/{settingsLayout-LNYGC372.js → settingsLayout-BoWaVHvV.js} +3 -3
  231. package/dist/client/assets/{sidebar-CCcDCy-Q.js → sidebar-4oe_dr6q.js} +2 -2
  232. package/dist/client/assets/{sidebarProjectGrouping-Bj_Qatcf.js → sidebarProjectGrouping-MU2UfzY1.js} +2 -2
  233. package/dist/client/assets/{skeleton-dlFZVmO8.js → skeleton-D6RVfMa8.js} +2 -2
  234. package/dist/client/assets/{sourceControl-Tyc4OKDH.js → sourceControl-BU6NXFEv.js} +2 -2
  235. package/dist/client/assets/{sourceControlClients-ECBkjM0e.js → sourceControlClients-DBozOkI3.js} +2 -2
  236. package/dist/client/assets/{spinner-fU7Q2OR1.js → spinner-C-qDE4WQ.js} +2 -2
  237. package/dist/client/assets/src-R7EkrVcv.js +15 -0
  238. package/dist/client/assets/{terminal-links-CPJORRle.js → terminal-links-B5f_yaZ1.js} +2 -2
  239. package/dist/client/assets/{terminalSessions-B00GvWIU.js → terminalSessions-Cg0AQjBU.js} +2 -2
  240. package/dist/client/assets/{textarea-CEng2dlo.js → textarea-CWbMGhL9.js} +2 -2
  241. package/dist/client/assets/{themePalette-CcasVi_y.js → themePalette-B_fGWNEh.js} +2 -2
  242. package/dist/client/assets/{threadCheckpoints-D7P5EX0m.js → threadCheckpoints-B88N2CXf.js} +2 -2
  243. package/dist/client/assets/{toggle-DN8nwGi8.js → toggle-CKr6iZUR.js} +2 -2
  244. package/dist/client/assets/{toggle-group-Dx-ruC5S.js → toggle-group-B1WN0Pgy.js} +2 -2
  245. package/dist/client/assets/{tooltip-Da633nbs.js → tooltip-CCYU8XGM.js} +2 -2
  246. package/dist/client/assets/{uiStateStore-aIXF8Zlu.js → uiStateStore-u_PaGpa6.js} +2 -2
  247. package/dist/client/assets/{usage-DXoXMoKb.js → usage-BzExgBit.js} +2 -2
  248. package/dist/client/assets/{usageAccess-RRnEiTSy.js → usageAccess-B0nqd8U-.js} +2 -2
  249. package/dist/client/assets/{usageFormat-D95Lw1XX.js → usageFormat-CUSzTPTq.js} +2 -2
  250. package/dist/client/assets/{usageShortcuts-3UXG3hMD.js → usageShortcuts-jGu1QJHr.js} +2 -2
  251. package/dist/client/assets/{use-atom-command-BkSai4ZH.js → use-atom-command-Bd7vZxeH.js} +2 -2
  252. package/dist/client/assets/{useAriaLabelledBy-rzE7PQnj.js → useAriaLabelledBy-CJvtvui4.js} +2 -2
  253. package/dist/client/assets/useHandleNewThread-CA9pnWuC.js +2 -0
  254. package/dist/client/assets/{useLocation-D7ZCVKu2.js → useLocation-KvBZAN7v.js} +2 -2
  255. package/dist/client/assets/{useNavigate-C6_wm78C.js → useNavigate-DXSBYc-k.js} +2 -2
  256. package/dist/client/assets/{useNavigateBack-iqJmvild.js → useNavigateBack-DzR35iiJ.js} +2 -2
  257. package/dist/client/assets/{useP4ConnectAuthPrompt-CKTZ-MxU.js → useP4ConnectAuthPrompt-czmNhUqV.js} +2 -2
  258. package/dist/client/assets/{useParams-DND-Jy5h.js → useParams-D9reDvT8.js} +2 -2
  259. package/dist/client/assets/{usePermissionStatus-DFJ-2rdQ.js → usePermissionStatus-C5YvHVz-.js} +2 -2
  260. package/dist/client/assets/{usePopupViewport-EARvZG9w.js → usePopupViewport-D7yp2NvZ.js} +2 -2
  261. package/dist/client/assets/{usePullRequestActions-DRrQpPhD.js → usePullRequestActions-BIPl_xE4.js} +3 -3
  262. package/dist/client/assets/{useRegisterFieldControl-Byb-EJOb.js → useRegisterFieldControl-D-hYtXkm.js} +2 -2
  263. package/dist/client/assets/{useScopedModelAvailability-tXU_0tMY.js → useScopedModelAvailability-UuZvj6HE.js} +2 -2
  264. package/dist/client/assets/useSettings-Dp9RSL-0.js +3 -0
  265. package/dist/client/assets/{utils-DsOiwDNN.js → utils-DkKLB01I.js} +3 -3
  266. package/dist/client/assets/{vcsRefInvalidation-CnjZD1r1.js → vcsRefInvalidation-CoBKCEWS.js} +2 -2
  267. package/dist/client/assets/{welcome-BgxI7gmD.js → welcome-CJjj0VVp.js} +2 -2
  268. package/dist/client/index.html +1 -1
  269. package/dist/{preview-C_h8Tda3.mjs → preview-JlPVV2bV.mjs} +11 -3
  270. package/dist/{renderer-BeTlHpQk.mjs → renderer-CswgrCon.mjs} +2 -2
  271. package/dist/{runtime-BUfUqrrw.mjs → runtime-Bec3_bh8.mjs} +2 -2
  272. package/dist/{runtimeLayer-5R-ZfBsl.mjs → runtimeLayer-B9K2BVKV.mjs} +636 -559
  273. package/dist/{runtimeLayer-DurN_FAN.mjs → runtimeLayer-ZFdf4c6R.mjs} +1 -1
  274. package/dist/{server-DuD96ZSr.mjs → server-BnHhGuOc.mjs} +46 -9
  275. package/dist/{sha2-oCwRxj9g.mjs → sha2-BfCJmkJJ.mjs} +35 -2
  276. package/package.json +1 -1
  277. package/dist/client/assets/AlertDialogRoot-CfwItD_i.js +0 -2
  278. package/dist/client/assets/CheckboxIndicator-BpGIx6Ze.js +0 -2
  279. package/dist/client/assets/CollapsiblePanel-vHsKk5wM.js +0 -2
  280. package/dist/client/assets/ComboboxClear-DI8al7ca.js +0 -2
  281. package/dist/client/assets/CompositeRoot-OiiGu5cn.js +0 -2
  282. package/dist/client/assets/DevicePanel-BzIRsUjQ.js +0 -2
  283. package/dist/client/assets/DialogTitle-BNEjkHZl.js +0 -2
  284. package/dist/client/assets/DiffPanel-zzTYLQBt.js +0 -2
  285. package/dist/client/assets/Input-BtekXNnW.js +0 -2
  286. package/dist/client/assets/JZOYTAAL-B8yh1QUr.js +0 -1
  287. package/dist/client/assets/PanelLayoutControls-D6h4yyW-.js +0 -216
  288. package/dist/client/assets/PopoverHandle-BxV9_kh8.js +0 -2
  289. package/dist/client/assets/PreviewPanel-DCN5UudG.js +0 -2
  290. package/dist/client/assets/ProjectDefaultsSettings-BVdLNACE.js +0 -2
  291. package/dist/client/assets/ProviderModelPicker-D3VH0Z__.js +0 -2
  292. package/dist/client/assets/PullRequestCodeTab-D-J3laup.js +0 -6
  293. package/dist/client/assets/ScheduledTasksSettings-BIqva7uG.js +0 -6
  294. package/dist/client/assets/SelectScrollUpArrow-r18qpNEu.js +0 -2
  295. package/dist/client/assets/TooltipProvider-DPt8xz_3.js +0 -2
  296. package/dist/client/assets/_chat-B7MuBHoN.js +0 -47
  297. package/dist/client/assets/_chat.pull-requests-hoMASTBm.js +0 -2
  298. package/dist/client/assets/assets-w0TTeveX.js +0 -2
  299. package/dist/client/assets/connect-agent-BEYL9KOm.js +0 -2
  300. package/dist/client/assets/diffPanelStore-C8bCQWTi.js +0 -2
  301. package/dist/client/assets/entities-CRXY8xy3.js +0 -2
  302. package/dist/client/assets/main-CNyrs4J_.js +0 -37
  303. package/dist/client/assets/main-h6l_SQzg.css +0 -2
  304. package/dist/client/assets/number-field-CSK9SRbZ.js +0 -2
  305. package/dist/client/assets/openFileInPreview-D0wySgTe.js +0 -2
  306. package/dist/client/assets/previewMiniPlayerStore-D98YBqjW.js +0 -2
  307. package/dist/client/assets/primary-B5Ds-X9y.js +0 -2
  308. package/dist/client/assets/primaryCloudLinkState-7otRI1yH.js +0 -2
  309. package/dist/client/assets/projectFilesQueryState-CgQDudyR.js +0 -2
  310. package/dist/client/assets/query-B8d0w621.js +0 -2
  311. package/dist/client/assets/radio-group-XlBZKXvU.js +0 -2
  312. package/dist/client/assets/relay-BWVOLzv_.js +0 -2
  313. package/dist/client/assets/runtime-DYDOkR3G.js +0 -7
  314. package/dist/client/assets/server-DQkamj54.js +0 -2
  315. package/dist/client/assets/session-A0FOa5Fv.js +0 -2
  316. package/dist/client/assets/settings.archived-BOhwFyi3.js +0 -2
  317. package/dist/client/assets/settings.connections-CVIPNlOU.js +0 -2
  318. package/dist/client/assets/settings.plugins-PhsBK5Nz.js +0 -5
  319. package/dist/client/assets/settings.providers-DZac28bF.js +0 -3
  320. package/dist/client/assets/src-B7vcPG0D.js +0 -15
  321. package/dist/client/assets/useHandleNewThread-CT3UAzyB.js +0 -2
  322. package/dist/client/assets/useSettings-BOuYsEM0.js +0 -3
@@ -4,8 +4,8 @@ import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } fr
4
4
  import { i as jbt, n as Kbt, r as Kze } from "./sdk-CcrYY4k4.mjs";
5
5
  import { $ as forEach, $l as hasProperty, $n as has$1, $o as isZero, $r as addFinalizerExit, $t as runPromise, Ac as getOrNull, Ai as asVoidAll, At as matchEffect, B as filter$1, Bc as none$1, Bi as match$1, Bn as withParentSpan, Bt as promise, C as catchTag, Ci as isDeferred, Cl as toJson, Cn as tryPromise, Cr as isDoneCause, Cs as make$73, Cu as constTrue, D as context, Da as squash, Dc as fromNullishOr, Di as makeUnsafe$5, Dn as undefined_, Dr as Clock, Dt as match$2, Du as dual, Ei as make$75, En as txRetry, Eu as constant, F as exit, Fc as isSome, Fi as hasInterrupts, Fo as externalSpan, Fr as catch_$1, Ft as onInterrupt, Fu as pipeArguments, G as findFirst, Gn as zip, Go as format$1, Gr as succeed$1, H as filterMapOrFail, Hc as some, Hi as void_$1, Hl as symbol$1, Ho as has$2, Hr as mergeAll, Ht as provideContext, I as fail, Ii as interrupt$3, In as withFiber, Ir as effect, It as option, Jc as flip, Ji as TimeoutError, Jl as string, Jo as hours, Jr as sync$1, K as firstSuccessOf, Kn as zipWith, Kt as raceFirst, L as failCause$1, Lc as makeOrder, Li as isExit, Ll as make$72, Lr as effectContext, Lt as orDie, M as die, Mc as getOrUndefined$1, Mi as fail$1, Ml as assignProperty, Mn as void_, Mr as CurrentMemoMap, Mt as onError, Nc as isNone, Ni as failCause$2, Nl as normalize, No as ParentSpan, Nr as build, Nt as onExit, O as contextWith, Oc as fromUndefinedOr, Oi as poll, On as uninterruptible, Ot as matchCauseEffect, Ou as flow, P as ensuring, Pn as whileLoop, Pr as buildWithMemoMap, Ps as filterMap, Qi as die$2, Qn as get$6, Qo as isNegative, Qr as addFinalizer, Qt as runForkWith, Rc as map$1, Ri as isFailure, Ro as encode$2, Rr as effectDiscard, Rt as orElseSucceed, S as catchReason, Sc as filter, Si as into, Sl as NodeInspectSymbol, Sn as timeoutOrElse, Ss as getUnsafe$1, St as map, T as catch_, Tc as flatten$1, Tn as tx, Ts as merge$1, Tt as mapError, Tu as constVoid, U as filterOrElse, Uc as toArray$1, Ul as array, Un as withTracerEnabled, Uo as toPredicate, Ur as provide, Us as isArrayNonEmpty, Ut as provideService, Vi as succeed$4, Vn as withSpan, Vo as compose, Vr as merge, Vt as provide$1, W as filterOrFail, Wi as ExceededCapacityError, Wn as yieldNow, Wo as days, Wr as provideMerge, X as fn, Xn as clear$1, Xr as unwrap, Xt as retry, Y as flatten, Yn as RequestPrototype, Yo as infinity, Yr as tap$1, Yt as result, Z as fnUntraced, Zl as symbol$2, Zn as empty$2, Zo as isFinite, Zr as Scope, Zt as runFork, _ as catchCauseIf, _i as done, _n as tapDefect, _s as get$5, _t as logFatal, a as all, aa as fromReasons, ai as makeUnsafe$6, an as scoped, ao as forkUnsafe, at as fromOption, bi as failCause$3, bn as timeout, br as catchDone, bs as getOrUndefined, c as annotateLogs, ca as hasInterrupts$1, cc as failVoid, cn as serviceOption, cs as times, ct as ignore, cu as isNullish, d as asSome, da as interruptors, dn as succeedNone, dt as interruptible, ea as fail$3, ei as close, el as mapInput, en as runPromiseWith, es as max, et as forever, f as asVoid, fa as isCause, fc as isFailure$1, fs as zero, ft as isEffect, g as catchCause, ga as isInterruptReason, gn as tapCause, go as reportCauseUnsafe, gr as spaced, gs as empty$5, gt as logError, h as callback, ha as isFailReason, hi as _await, hn as tap, ho as onExitUnsafe, hs as add, ht as logDebug, hu as isTagged, i as addFinalizer$1, ii as make$74, il as PipeInspectableProto, in as scope, ir as values, it as forkScoped, j as delay, jc as getOrThrow, ji as die$1, jl as assignProperties, jn as useSpan, js as empty$4, jt as never, kc as getOrElse, ki as succeed$2, kn as uninterruptibleMask, kr as currentTimeMillis, ku as identity, la as hasInterruptsOnly, ln as sleep, ls as toMillis, lt as ignoreCause, lu as isNumber, m as cachedInvalidateWithTTL, mc as isSuccess, mn as sync, ms as Service$1, mu as isString, n as acquireRelease, ni as fork, nr as set$3, ns as min, nt as forkDetach, o as andThen, oa as hasDies, oi as provide$2, or as addDelay, os as seconds, ot as fromResult, p as cached, pa as isDieReason, pn as suspend, pr as modifyDelay, ps as Reference, pt as isSuccess$2, q as flatMap, qo as fromInputUnsafe, qr as suspend$1, qt as repeat, r as acquireUseRelease, ra as findErrorOption, rc as empty$3, ri as forkUnsafe$1, rn as runSyncWith, rr as size$3, rs as minutes, rt as forkIn, s as annotateCurrentSpan, sc as fail$4, sn as service, sr as exponential, st as gen$1, su as isNotUndefined, t as Transaction, ta as filterInterruptors, tc as sort, ti as closeUnsafe, tr as remove$1, ts as millis, tt as forkChild, u as as, ua as interrupt$2, ui as CurrentStackFrame, un as succeed, ur as identity_, ut as interrupt$1, uu as isObject$3, v as catchDefect, vc as succeed$3, vi as doneUnsafe, vl as getStackTraceLimit, vn as tapError, vt as logInfo, w as catchTags, wa as pretty, wc as flatMap$1, wi as isDone, wl as format, wn as try_, ws as makeUnsafe$7, x as catchIf, xc as exists, xn as timeoutOption, xs as getOrUndefinedUnsafe, xt as makeSpanScoped, yi as fail$2, yl as setStackTraceLimit, yn as tapErrorTag, yt as logWarning$1, z as fiber, zc as match, zi as isSuccess$1, zl as equals, zt as partition } from "./Effect-BqRgldaH.mjs";
6
6
  import { $r as isGreaterThan, A as NullOr, At as fieldsAssign, B as String$1, C as Literals, Ct as decodeUnknownSync, D as NonEmptyArray, Dt as encodeTo, E as Never, En as isUnspecified, Er as defaultFormatter, Et as encodeSync, Fr as value, Ft as isFinite$1, Gt as isNonEmpty, H as Struct, Hn as make$77, Ht as isMaxLength, I as Record$1, It as isGreaterThan$1, Jr as Equivalence, Jt as isSchema, K as TemplateLiteral, Kt as isPattern, Lt as isGreaterThanOrEqualTo, M as NumberFromString, Mn as omit, Nr as isRedacted, Nt as is, O as NonEmptyString$1, Ot as encodeUnknownEffect, Pr as make$78, Pt as isBetween, Q as Uint8Array$1, Qr as formatIso, Qt as isUUID, Rt as isInt, S as Literal, Sn as formatUrlHostString, St as decodeUnknownResult, T as Natural, Tn as isInetAddress, Tt as encodeEffect, U as StructWithRest, Vt as isLessThanOrEqualTo, W as TaggedError$1, Wt as isMinLength, Xr as add$1, Xt as isStartingWith, Y as Tuple, Yr as Order, Yt as isSchemaError, Z as URLFromString, Zr as addDuration, _ as Finite, _n as toType, _r as passthrough, _t as decodeSync, ai as min$1, at as Void, b as Json, bt as decodeUnknownExit, c as DateTimeUtc, ci as nowUnsafe, cn as suspend$2, ct as brand, dn as toCodecJson, dt as check, ei as isGreaterThanOrEqualTo$1, en as makeFilter, gi as withCurrentZoneLocal, gn as toTaggedUnion, gt as decodeOption, h as Exit, hi as toUtc, hn as toJsonSchemaDocument, ii as makeUnsafe$8, in as optionalKey, ir as toEncoded$1, j as Number$1, jt as fromJsonString, k as Null, kn as assign, kt as encodeUnknownExit, l as DateTimeUtcFromString, li as setParts, ln as tag$1, m as Error$6, mi as toParts, mn as toEquivalence, mt as decodeEffect, n as ArraySchema, ni as isLessThanOrEqualTo$1, nn as mutableKey, nt as Union, oi as now, ot as annotate, p as DurationFromString, pi as toEpochMillis, pn as toEncoded, q as Trim, qr as encode$3, r as Boolean$1, ri as make$76, rn as optional$2, rt as Unknown, s as Class$1, si as nowInCurrentZone, t as Any, ti as isLessThan, tn as mutable, tt as UndefinedOr, u as Defect, ui as subtract, ur as transform$1, vn as withConstructorDefault, vt as decodeTo, xi as TaggedError, xn as formatIp, xr as transformOptional, xt as decodeUnknownOption, y as Int, yn as withDecodingDefault, yr as transform, yt as decodeUnknownEffect, z as SchemaError } from "./Schema-CkGB1Dgx.mjs";
7
- import { $ as layer$92, $a as normalizeThreadPullRequestKey, $i as newProjectFolderName, $o as nonEmptyTrimmed, $r as layer$102, $s as resolveSpawnCommand, $t as sanitizeBranchFragment, A as GitVcsDriver, Aa as readMcpAppPermissions, Ac as modifyEffect, Ai as pendingBackgroundTurnItems, Al as get$9, Ar as ServerConfig$1, As as satisfiesSemverRange, At as webhookDeliveriesTotal, B as hasProjectSettingsOverrides, Bi as constants, Bl as get$7, Br as getBackgroundActivityPresetSettings, Bs as modelSelectionsEqual, Bt as RepositoryIdentityResolver, C as formatPatch, Ca as MCP_APP_OUTPUT_KEY, Cl as set$6, Cn as ServerEnvironment, Co as void_$2, Cr as isSecretAlreadyExistsError, Ct as providerTurnsTotal, D as SourceControlRateLimit, Dc as get$10, Di as resolveAttachmentRelativePath, Dr as writeFileStringAtomically, E as Interactive, Ea as injectMcpAppCsp, Ec as make$83, El as HttpClient, Er as version$1, Et as secretRefsConsumedTotal, Fi as usageLimitBlockedRun, Fs as getModelSelectionBooleanOptionValue, Ft as withMetrics, G as planThreadDeletion, Gc as make$87, Gi as projectComposerContextForProvider, Gl as set$4, Gn as FxSettings, Go as COMPACT_SLASH_COMMAND, Gr as fromLenientJson, Gs as CommandResolutionCache, Gt as flattenTemporaryWorktreeBranchName, Hi as longestStreak, Hl as getAndUpdate, Hn as OpenCodeSettings, Ho as ProcessRunner, Hs as readCustomModelEntries, I as extractBranchNameFromRemoteRef, Ii as chatMarkdownImageSources, In as subscribeBeforeSnapshot, Is as getModelSelectionStringOptionValue, It as normalizeModelMetricLabel, J as LegacyV1ThreadImporter, Jc as Crypto, Ji as isExplicitRelativePath, Jl as CloseEvent, Jn as decode$1, Jo as buildSelectOptionDescriptor, Jt as mergeGitStatusParts, K as ThreadCommandExecutor, Kc as run$1, Kl as update$4, Kn as CursorSettings, Ko as DEFAULT_TIMEOUT_MS, Ks as SpawnExecutableResolution, Kt as formatGeneratedBranchName, Li as formatThreadLink, Ll as transform$2, Ln as subscribeBeforeSnapshotWithoutMutex, Ls as getProviderOptionCurrentValue, Lt as make$80, M as VcsProcess, Mc as update$5, Mi as latestExecutedRun, Ml as mapRequestEffect, Ms as codexModelFamily, Mt as webhookHeldDelay, N as layer$94, Ni as latestRootProviderFailure, Nn as DesktopTelemetryReceiver, Ns as createModelCapabilities, Nt as webhookRunsTotal, Oa as mcpAppToolCallableByApp, Oc as make$81, Os as compareSemverVersions, Ot as terminalRestartsTotal, Pc as SqlClient, Pi as runRanAfter, Ps as formatCodexModelName, Pt as withCommandMetrics, Qa as legacyThreadPullRequestKey, Qc as Int$1, Qi as isWindowsDrivePath, Qo as isWindowsCommandNotFound, Qs as resolveCommandPath, Qt as resolveAutoFeatureBranchName, Ri as remarkGfm, Rl as transformResponse, Rn as ServerSettingsService, Rs as getProviderOptionDescriptors, S as FILE_HEADERS_ONLY, Sa as MCP_APP_MIME_TYPE, Si as resolveAttachmentPathById, Sl as refresh, So as findOneOption, Sr as ServerSecretStore, St as providerTurnDuration, Tl as nextIntBetween, To as readOnly, Ts as makeAsyncRotatingFileSink, U as ProjectService, Ui as assistantCitationsToPlainText, Ul as make$79, Un as MuseSettings, Uo as layer$93, Ur as extractJsonObject, Us as resolvePromptInjectedEffort, Ut as buildTemporaryWorktreeBranchName, V as resolveProjectSettings, Vi as codes$1, Vl as getAndSet, Vn as PiSettings, Vr as resolveServerBackgroundActivitySettings, Vs as normalizeModelSlug, W as layer$104, Wi as isAttachmentOnlyBootstrapPrompt, Wl as modify$3, Wn as GrokSettings, Wo as AUTH_PROBE_TIMEOUT_MS, Ws as collectUint8StreamText, Wt as detectSourceControlProviderFromGitRemoteUrl, X as IdAllocatorV2, Xc as Boolean$2, Xi as isUncPath, Xl as SocketErrorReason, Xo as collectStreamAsString, Xr as NetService, Xt as parseGitHubRepositoryNameWithOwnerFromRemoteUrl, Y as layer$103, Yc as make$84, Yn as fromReadable, Yo as buildServerProvider, Ys as mergePathEntries, Yt as normalizeGitRemoteUrl, Z as derive, Zi as isWindowsAbsolutePath, Zo as isCommandMissingCause, Zr as layer$91, Zt as parseOriginUrlFromGitConfig, _a as toolOutputImages, _c as IsExecutable, _l as invalidate$1, _n as require_dist$1, _o as PersistenceDecodeError, _s as causeErrorTag, _t as increment, a as normalizePreviewUrl, aa as markdownLineEndingOrSpace, al as String$2, an as WorkspacePaths, as as makeManualOnlyProviderMaintenanceCapabilities, at as layer$98, ba as MCP_APP_EXTENSION_ID, bl as make$85, bn as make$86, bt as orchestrationEffectQueueWait, c as rejectCommandsDuringClone, cc as RequestInit, cl as map$2, cn as WorkspaceRootNotExistsError, co as canonicalRepositoryKey, ct as REPLAY_SAFE_EFFECT_TYPES_AFTER_PROCESS_LOSS, cu as encode$4, d as SourceControlProviderRegistry, da as projectTurnItemForDetail, dc as Arguments, do as isSshRemoteUrl, ds as resolveProviderMaintenanceCapabilitiesEffect, du as withAttributes, ea as normalizeProjectPathForComparison, ei as ProjectionStoreV2, en as sanitizeFeatureBranchName, es as parseGenericCliVersion, et as randomUuidV4, fa as MAX_TOOL_OUTPUT_IMAGE_BASE64_LENGTH, fc as Environment, fl as withDefault, fn as claudeLaunchArgDirectories, fo as sourceControlRepositorySelector, fs as ProviderLatestVersions, ft as forkParked, ga as toolOutputImageBlocks, gl as getSuccess, gn as expandHomePath, go as layer$96, gt as layer$97, h as VcsDriverRegistry, ha as readToolOutputImage, hl as getOption$1, ht as layerFromApplicationReceipts, i as newPreviewTabId, ia as markdownLineEnding, ii as threadShellFromProjection, io as visibleThreadPullRequests, is as makeCachedProviderMaintenanceResolution, it as ProjectStoreV2, jc as set$5, jl as mapRequest, js as applyClaudePromptEffortPrefix, jt as webhookDeliveryDuration, k as repositoryPathFromRemoteUrl, ka as readMcpAppCsp, kc as modify$2, ki as derivePendingBackgroundWork, kl as filterStatusOk, ks as parseSemver, kt as terminalSessionsTotal, ln as WorkspaceRootStatFailedError, lo as detectSourceControlProviderFromRemoteUrl, ls as normalizeCommandPath, lt as layer$100, m as layer$88, ma as mcpToolResultOutput, mc as HomeDirectory, mi as createAttachmentId, ml as get$8, mn as readClaudeSettingsEnv, mo as layerFromOrchestrationEventStore, mt as CommandReceiptStoreV2, n as isLoopbackHost, na as remarkParse, nc as make$82, ni as emptyProjection, no as threadPullRequestKeysEqual, ns as spawnAndCollect, nt as layerFromStores, o as ProjectCloneTracker, on as WorkspaceRootCreateFailedError, oo as parseChangeRequestUrl, os as makePackageManagedProviderMaintenanceResolver, ot as EffectOutboxV2, p as BUILT_IN_SOURCE_CONTROL_DRIVERS, pa as mcpAppFromToolItem, pc as ExecutablePath, pn as discoverClaudeSkills, q as layer$95, qi as markdownDestinationHostPath, ql as updateAndGet$1, qn as AcpRegistrySettings, qo as buildBooleanOptionDescriptor, qt as isTemporaryWorktreeBranch, r as isPreviewUrlNormalizationError, ra as factorySpace, rc as ChildProcessSpawner, ri as layer$99, ro as threadPullRequestsOf, rs as enrichProviderSnapshotWithVersionAdvisory, rt as layer$101, sa as boundFileChangeForStorage, sl as all$1, sn as WorkspaceRootNotDirectoryError, ss as makeProviderMaintenanceCapabilities, st as PROCESS_BOUND_EFFECT_TYPES, su as decodeString, t as LSOF_LOCAL_HOST_TOKENS, ta as unified, ti as applyToProjection, tl as Number$2, to as threadPullRequestKeyOf, ts as providerModelsFromSettings, tt as EventSinkV2, uc as Architecture, ul as option$1, uo as getChangeRequestTerminologyForKind, ut as layerPruneWorker, uu as update$6, va as P4_MCP_TOOL_NAMES, vc as Platform, vl as invalidateAll, vn as parseCliArgs, vo as PersistenceSqlError, vt as metricAttributes, w as structuredPatch, wi as toSafeThreadAttachmentSegment, wl as next$1, wn as ServerEnvironmentIdentity, wo as layer$89, x as PullRequestProviderError, xi as resolveAttachmentPath, xl as makeWith, xn as layer$90, xo as findAll, xt as providerSessionsTotal, ya as resolveP4McpToolDefinition, yl as keys, yn as tokenizeCliArgs, ys as errorTag, yt as orchestrationEffectClaimsTotal, zi as types, zl as withScope, zr as resolveSourceControlWriterModelSelection } from "./preview-C_h8Tda3.mjs";
8
- import { $a as resolveIdleCompaction, $c as orchestrationV2RunWorkStartedAt, $d as fromWeb, $i as ServerProviderCompatibilityStatus, $l as ModelSelection, $m as IsoDateTime, $s as OrchestrationV2AppThread, $t as exitSchema$1, Aa as CodexSettings, Al as PullRequestOperationError, Am as defaultInstanceIdForDriver, Ar as AgentSessionSource, Au as del, Bl as SourceControlProviderError, Bm as CheckpointRef, Ca as TerminalResizeError, Cf as setHeaders, Ch as fromInput, Cu as isProviderSendTurnSupportedImageMimeType, Dm as ProviderDriverKind, Dr as AgentSessionImportProjectNotFoundError, Ea as AntigravitySettings, Ec as OrchestrationV2ProviderTurn, Eh as merge$2, Er as AgentSessionImportProjectChangedError, Eu as make$90, Fa as DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL, Fc as OrchestrationV2StopWorkflowError, Fi as ScheduledTask, Fl as pullRequestHostOf, Fu as patch, Gi as GitManagerError, Hp as StreamSse, Ii as ScheduledTaskError, Il as pullRequestProviderRequirement, Iu as post$1, Jd as text$3, Jl as VcsProcessSpawnError, Js as AUTO_WORKSPACE_NOTICE_TITLE, Ju as HttpServer, Kc as OrchestrationWorkflowFileError, Ki as GitPullRequestMaterializationError, Li as ScheduledTaskWebhookDeliveryId, Ll as resolvePullRequestAuthorFilter, Lu as put, Mf as TransportError, Nf as isHttpClientError, Nl as PullRequestSummary, Of as HttpClientError, Om as ProviderInstanceId, Or as AgentSessionImportSource, Ou as make$91, Pd as empty$7, Pf as CurrentErrorReporters, Pi as MIN_SCHEDULED_TASK_INTERVAL_MS, Pl as PullRequestUnavailableError, Qc as linkOriginIsFenced, Qd as filterStatusOk$1, Qi as ServerProvider, Ql as VcsUnsupportedOperationError, Qm as EventId, Qn as PreviewAutomationUnavailableError, Qo as DecisionResult, Qt as ServerClient, Rc as OrchestrationV2Subagent, Sa as TerminalProviderInstanceNotFoundError, Sc as OrchestrationV2ProviderSession, Sd as Path$1, Sf as setHeader, Sh as empty$6, Ta as TerminalWriteError, Tl as ThreadLinkedPullRequest, Tm as PREFERRED_DEFAULT_CODEX_MODELS, To as UsageReadError, Up as asUint8Array, Vl as SourceControlProviderKind, Vm as CheckpointScopeId, Vp as NoContent, Vu as add$2, Wc as OrchestrationV2TurnItem, Wi as GitCommandError, Ws as annotations, Xa as providerInstanceConfigEnabledFlag, Xc as isProviderNativeSubagentThread, Xo as DecisionError, Xs as ORCHESTRATION_V2_WORKSPACE_PREPARATION_FAILURE_CODE, Yc as isOrchestrationV2WorkActive, Yd as uint8Array, Yf as FileSystem, Yo as DECISION_MODELS, Ys as AUTO_WORKSPACE_UNDECIDED_REASON, Zc as latestProviderTurnForAttempt, Zm as EnvironmentId, Zt as make$89, _a as TerminalCwdNotFoundError, _h as ThreadId, _o as symbol$3, aa as isProviderWorkspaceSnapshotCurrent, ah as PositiveInt$1, am as decode$2, ao as FILL_PREVIEW_VIEWPORT, at as SecretRequestError, au as McpServerTransport, ba as TerminalNotRunningError, bc as OrchestrationV2ProviderGoal, bh as TurnItemId, cf as bearerToken, ch as ProviderThreadId, cu as mcpProviderSupport, dc as OrchestrationV2DispatchRejectionReason, df as bodyJsonUnsafe, dm as AcpRegistryOperationError, dn as ResourceMonitorCommand, do as PreviewInvalidUrlError, eh as MessageId$2, el as parseGoalCommand, en as isWrapper, eo as resolveProjectProviderInstanceEnabled, ep as PlatformError, fc as OrchestrationV2DomainEvent, fi as OrchestratorMcpFailure, fm as AcpRegistryOperationErrorReason, fn as ResourceMonitorEvent, ga as TerminalCwdNotDirectoryError, gf as get$11, gh as SecretRef, gm as ANTIGRAVITY_DEFAULT_MODEL, hh as ScheduledTaskId, hm as resolveOfficialAcpRegistryIconUrl, if as schemaBodyJson, im as Retry, in as isStreamSchema, jc as OrchestrationV2RuntimeRequest, jl as PullRequestStack, ju as get$12, ka as ClaudeSettings, kf as HttpClientErrorSchema, kh as bytes, kr as AgentSessionScanError, lh as ProviderTurnId, lm as AcpRegistryListProvidersResult, lu as resolveRegistryEntryEnabled, mc as OrchestrationV2ExecutionNode, mf as bodyUrlParams, mh as RuntimeRequestId, mm as officialAcpRegistryIconUrlForAgentId, mn as McpCapabilityUnavailableError, mu as ChatAttachment, nh as NonNegativeInt$1, nn as ClientAbort, np as isPlatformError, nr as McpAppRequestError, nu as McpServerId, oc as OrchestrationV2ConversationMessage, oh as ProjectId, ot as WORKTREE_SETUP_ERROR_MAX_LENGTH, ou as PluginId, pa as ProviderSetupError, pf as bodyText, ph as RunId, pm as AcpRegistryProbeResult, po as PreviewSessionLookupError, qc as autoWorkspaceNoticeMessage, qd as stream, qi as TextGenerationError, qm as CommandId, ra as isProviderAvailable, rn as getStreamSchemas, ru as McpServerName, sd as HttpServerRequest, sh as ProviderSessionId, so as PREVIEW_URL_MAX_LENGTH, st as WORKTREE_SETUP_STAGE_ORDER, t as sha256, tn as make$88, to as resolveProviderInstanceEnabled, ts as resolveDecisionBackend, uf as bodyJson, um as AcpRegistryListSessionsResult, uo as PreviewControlRequiredError, uu as supportsProviderMcpSignIn, va as TerminalCwdStatError, vc as OrchestrationV2PlanArtifact, vf as post, vh as TrimmedNonEmptyString, vo as value$1, vu as PROVIDER_SEND_TURN_MAX_FILE_BYTES, wa as TerminalSessionLookupError, wc as OrchestrationV2ProviderThread, wl as RuntimeMode, wm as ModelCapabilities, wu as Service$2, xa as TerminalProviderEnvironmentError, xc as OrchestrationV2ProviderRetry, xl as ProviderInteractionMode, ya as TerminalHistoryError, yc as OrchestrationV2ProviderFailure, yf as prependUrl, ym as DEFAULT_MODEL_BY_PROVIDER, yu as PROVIDER_SEND_TURN_MAX_IMAGE_BYTES, zm as CheckpointId } from "./sha2-oCwRxj9g.mjs";
7
+ import { $ as layer$92, $a as normalizeThreadPullRequestKey, $i as newProjectFolderName, $o as nonEmptyTrimmed, $r as layer$102, $s as resolveSpawnCommand, $t as sanitizeBranchFragment, A as GitVcsDriver, Aa as readMcpAppPermissions, Ac as modifyEffect, Ai as pendingBackgroundTurnItems, Al as get$9, Ar as ServerConfig$1, As as satisfiesSemverRange, At as webhookDeliveriesTotal, B as hasProjectSettingsOverrides, Bi as constants, Bl as get$7, Br as getBackgroundActivityPresetSettings, Bs as modelSelectionsEqual, Bt as RepositoryIdentityResolver, C as formatPatch, Ca as MCP_APP_OUTPUT_KEY, Cl as set$6, Cn as ServerEnvironment, Co as void_$2, Cr as isSecretAlreadyExistsError, Ct as providerTurnsTotal, D as SourceControlRateLimit, Dc as get$10, Di as resolveAttachmentRelativePath, Dr as writeFileStringAtomically, E as Interactive, Ea as injectMcpAppCsp, Ec as make$83, El as HttpClient, Er as version$1, Et as secretRefsConsumedTotal, Fi as usageLimitBlockedRun, Fs as getModelSelectionBooleanOptionValue, Ft as withMetrics, G as planThreadDeletion, Gc as make$87, Gi as projectComposerContextForProvider, Gl as set$4, Gn as FxSettings, Go as COMPACT_SLASH_COMMAND, Gr as fromLenientJson, Gs as CommandResolutionCache, Gt as flattenTemporaryWorktreeBranchName, Hi as longestStreak, Hl as getAndUpdate, Hn as OpenCodeSettings, Ho as ProcessRunner, Hs as readCustomModelEntries, I as extractBranchNameFromRemoteRef, Ii as chatMarkdownImageSources, In as subscribeBeforeSnapshot, Is as getModelSelectionStringOptionValue, It as normalizeModelMetricLabel, J as LegacyV1ThreadImporter, Jc as Crypto, Ji as isExplicitRelativePath, Jl as CloseEvent, Jn as decode$1, Jo as buildSelectOptionDescriptor, Jt as mergeGitStatusParts, K as ThreadCommandExecutor, Kc as run$1, Kl as update$4, Kn as CursorSettings, Ko as DEFAULT_TIMEOUT_MS, Ks as SpawnExecutableResolution, Kt as formatGeneratedBranchName, Li as formatThreadLink, Ll as transform$2, Ln as subscribeBeforeSnapshotWithoutMutex, Ls as getProviderOptionCurrentValue, Lt as make$80, M as VcsProcess, Mc as update$5, Mi as latestExecutedRun, Ml as mapRequestEffect, Ms as codexModelFamily, Mt as webhookHeldDelay, N as layer$94, Ni as latestRootProviderFailure, Nn as DesktopTelemetryReceiver, Ns as createModelCapabilities, Nt as webhookRunsTotal, Oa as mcpAppToolCallableByApp, Oc as make$81, Os as compareSemverVersions, Ot as terminalRestartsTotal, Pc as SqlClient, Pi as runRanAfter, Ps as formatCodexModelName, Pt as withCommandMetrics, Qa as legacyThreadPullRequestKey, Qc as Int$1, Qi as isWindowsDrivePath, Qo as isWindowsCommandNotFound, Qs as resolveCommandPath, Qt as resolveAutoFeatureBranchName, Ri as remarkGfm, Rl as transformResponse, Rn as ServerSettingsService, Rs as getProviderOptionDescriptors, S as FILE_HEADERS_ONLY, Sa as MCP_APP_MIME_TYPE, Si as resolveAttachmentPathById, Sl as refresh, So as findOneOption, Sr as ServerSecretStore, St as providerTurnDuration, Tl as nextIntBetween, To as readOnly, Ts as makeAsyncRotatingFileSink, U as ProjectService, Ui as assistantCitationsToPlainText, Ul as make$79, Un as MuseSettings, Uo as layer$93, Ur as extractJsonObject, Us as resolvePromptInjectedEffort, Ut as buildTemporaryWorktreeBranchName, V as resolveProjectSettings, Vi as codes$1, Vl as getAndSet, Vn as PiSettings, Vr as resolveServerBackgroundActivitySettings, Vs as normalizeModelSlug, W as layer$104, Wi as isAttachmentOnlyBootstrapPrompt, Wl as modify$3, Wn as GrokSettings, Wo as AUTH_PROBE_TIMEOUT_MS, Ws as collectUint8StreamText, Wt as detectSourceControlProviderFromGitRemoteUrl, X as IdAllocatorV2, Xc as Boolean$2, Xi as isUncPath, Xl as SocketErrorReason, Xo as collectStreamAsString, Xr as NetService, Xt as parseGitHubRepositoryNameWithOwnerFromRemoteUrl, Y as layer$103, Yc as make$84, Yn as fromReadable, Yo as buildServerProvider, Ys as mergePathEntries, Yt as normalizeGitRemoteUrl, Z as derive, Zi as isWindowsAbsolutePath, Zo as isCommandMissingCause, Zr as layer$91, Zt as parseOriginUrlFromGitConfig, _a as toolOutputImages, _c as IsExecutable, _l as invalidate$1, _n as require_dist$1, _o as PersistenceDecodeError, _s as causeErrorTag, _t as increment, a as normalizePreviewUrl, aa as markdownLineEndingOrSpace, al as String$2, an as WorkspacePaths, as as makeManualOnlyProviderMaintenanceCapabilities, at as layer$98, ba as MCP_APP_EXTENSION_ID, bl as make$85, bn as make$86, bt as orchestrationEffectQueueWait, c as rejectCommandsDuringClone, cc as RequestInit, cl as map$2, cn as WorkspaceRootNotExistsError, co as canonicalRepositoryKey, ct as REPLAY_SAFE_EFFECT_TYPES_AFTER_PROCESS_LOSS, cu as encode$4, d as SourceControlProviderRegistry, da as projectTurnItemForDetail, dc as Arguments, do as isSshRemoteUrl, ds as resolveProviderMaintenanceCapabilitiesEffect, du as withAttributes, ea as normalizeProjectPathForComparison, ei as ProjectionStoreV2, en as sanitizeFeatureBranchName, es as parseGenericCliVersion, et as randomUuidV4, fa as MAX_TOOL_OUTPUT_IMAGE_BASE64_LENGTH, fc as Environment, fl as withDefault, fn as claudeLaunchArgDirectories, fo as sourceControlRepositorySelector, fs as ProviderLatestVersions, ft as forkParked, ga as toolOutputImageBlocks, gl as getSuccess, gn as expandHomePath, go as layer$96, gt as layer$97, h as VcsDriverRegistry, ha as readToolOutputImage, hl as getOption$1, ht as layerFromApplicationReceipts, i as newPreviewTabId, ia as markdownLineEnding, ii as threadShellFromProjection, io as visibleThreadPullRequests, is as makeCachedProviderMaintenanceResolution, it as ProjectStoreV2, jc as set$5, jl as mapRequest, js as applyClaudePromptEffortPrefix, jt as webhookDeliveryDuration, k as repositoryPathFromRemoteUrl, ka as readMcpAppCsp, kc as modify$2, ki as derivePendingBackgroundWork, kl as filterStatusOk, ks as parseSemver, kt as terminalSessionsTotal, ln as WorkspaceRootStatFailedError, lo as detectSourceControlProviderFromRemoteUrl, ls as normalizeCommandPath, lt as layer$100, m as layer$88, ma as mcpToolResultOutput, mc as HomeDirectory, mi as createAttachmentId, ml as get$8, mn as readClaudeSettingsEnv, mo as layerFromOrchestrationEventStore, mt as CommandReceiptStoreV2, n as isLoopbackHost, na as remarkParse, nc as make$82, ni as emptyProjection, no as threadPullRequestKeysEqual, ns as spawnAndCollect, nt as layerFromStores, o as ProjectCloneTracker, on as WorkspaceRootCreateFailedError, oo as parseChangeRequestUrl, os as makePackageManagedProviderMaintenanceResolver, ot as EffectOutboxV2, p as BUILT_IN_SOURCE_CONTROL_DRIVERS, pa as mcpAppFromToolItem, pc as ExecutablePath, pn as discoverClaudeSkills, q as layer$95, qi as markdownDestinationHostPath, ql as updateAndGet$1, qn as AcpRegistrySettings, qo as buildBooleanOptionDescriptor, qt as isTemporaryWorktreeBranch, r as isPreviewUrlNormalizationError, ra as factorySpace, rc as ChildProcessSpawner, ri as layer$99, ro as threadPullRequestsOf, rs as enrichProviderSnapshotWithVersionAdvisory, rt as layer$101, sa as boundFileChangeForStorage, sl as all$1, sn as WorkspaceRootNotDirectoryError, ss as makeProviderMaintenanceCapabilities, st as PROCESS_BOUND_EFFECT_TYPES, su as decodeString, t as LSOF_LOCAL_HOST_TOKENS, ta as unified, ti as applyToProjection, tl as Number$2, to as threadPullRequestKeyOf, ts as providerModelsFromSettings, tt as EventSinkV2, uc as Architecture, ul as option$1, uo as getChangeRequestTerminologyForKind, ut as layerPruneWorker, uu as update$6, va as P4_MCP_TOOL_NAMES, vc as Platform, vl as invalidateAll, vn as parseCliArgs, vo as PersistenceSqlError, vt as metricAttributes, w as structuredPatch, wi as toSafeThreadAttachmentSegment, wl as next$1, wn as ServerEnvironmentIdentity, wo as layer$89, x as PullRequestProviderError, xi as resolveAttachmentPath, xl as makeWith, xn as layer$90, xo as findAll, xt as providerSessionsTotal, ya as resolveP4McpToolDefinition, yl as keys, yn as tokenizeCliArgs, ys as errorTag, yt as orchestrationEffectClaimsTotal, zi as types, zl as withScope, zr as resolveSourceControlWriterModelSelection } from "./preview-JlPVV2bV.mjs";
8
+ import { $a as resolveIdleCompaction, $c as linkOriginIsFenced, $d as filterStatusOk$1, $i as ServerProviderCompatibilityStatus, $l as VcsUnsupportedOperationError, $m as EventId, $s as OrchestrationV2AppThread, $t as exitSchema$1, Aa as CodexSettings, Af as HttpClientErrorSchema, Ah as bytes, Ar as AgentSessionSource, Bm as CheckpointId, Ca as TerminalResizeError, Cd as Path$1, Cf as setHeader, Ch as empty$6, Dh as merge$2, Dr as AgentSessionImportProjectNotFoundError, Du as make$90, Ea as AntigravitySettings, Ec as OrchestrationV2ProviderTurn, El as ThreadLinkedPullRequest, Em as PREFERRED_DEFAULT_CODEX_MODELS, Er as AgentSessionImportProjectChangedError, Fa as DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL, Fc as OrchestrationV2StopWorkflowError, Fd as empty$7, Ff as CurrentErrorReporters, Fi as ScheduledTask, Fl as PullRequestUnavailableError, Gc as OrchestrationV2TurnItem, Gi as GitManagerError, Hl as SourceControlProviderKind, Hm as CheckpointScopeId, Hp as NoContent, Hu as add$2, Ii as ScheduledTaskError, Il as pullRequestHostOf, Iu as patch, Jc as autoWorkspaceNoticeMessage, Jd as stream, Jm as CommandId, Js as AUTO_WORKSPACE_NOTICE_TITLE, Ki as GitPullRequestMaterializationError, Li as ScheduledTaskWebhookDeliveryId, Ll as pullRequestProviderRequirement, Lu as post$1, Ml as PullRequestStack, Mu as get$12, Nf as TransportError, Om as ProviderDriverKind, Or as AgentSessionImportSource, Pf as isHttpClientError, Pi as MIN_SCHEDULED_TASK_INTERVAL_MS, Pl as PullRequestSummary, Qc as latestProviderTurnForAttempt, Qi as ServerProvider, Qm as EnvironmentId, Qn as PreviewAutomationUnavailableError, Qo as DecisionResult, Qt as ServerClient, Rc as OrchestrationV2Subagent, Rl as resolvePullRequestAuthorFilter, Ru as put, Sa as TerminalProviderInstanceNotFoundError, Sc as OrchestrationV2ProviderSession, Sl as ProviderInteractionMode, Ta as TerminalWriteError, Tl as RuntimeMode, Tm as ModelCapabilities, To as UsageReadError, Tu as Service$2, Up as StreamSse, Vl as SourceControlProviderError, Vm as CheckpointRef, Wi as GitCommandError, Wp as asUint8Array, Ws as annotations, Xa as providerInstanceConfigEnabledFlag, Xc as isOrchestrationV2WorkActive, Xd as uint8Array, Xf as FileSystem, Xo as DecisionError, Xs as ORCHESTRATION_V2_WORKSPACE_PREPARATION_FAILURE_CODE, Yd as text$3, Yl as VcsProcessSpawnError, Yo as DECISION_MODELS, Ys as AUTO_WORKSPACE_UNDECIDED_REASON, Yu as HttpServer, Zc as isProviderNativeSubagentThread, Zt as make$89, _a as TerminalCwdNotFoundError, _f as get$11, _h as SecretRef, _m as ANTIGRAVITY_DEFAULT_MODEL, _o as symbol$3, aa as isProviderWorkspaceSnapshotCurrent, af as schemaBodyJson, am as Retry, ao as FILL_PREVIEW_VIEWPORT, at as SecretRequestError, ba as TerminalNotRunningError, bc as OrchestrationV2ProviderGoal, bf as prependUrl, bm as DEFAULT_MODEL_BY_PROVIDER, bu as PROVIDER_SEND_TURN_MAX_IMAGE_BYTES, cd as HttpServerRequest, ch as ProviderSessionId, dc as OrchestrationV2DispatchRejectionReason, df as bodyJson, dm as AcpRegistryListSessionsResult, dn as ResourceMonitorCommand, do as PreviewInvalidUrlError, du as supportsProviderMcpSignIn, ef as fromWeb, eh as IsoDateTime, el as orchestrationV2RunWorkStartedAt, en as isWrapper, eo as resolveProjectProviderInstanceEnabled, eu as ModelSelection, fc as OrchestrationV2DomainEvent, ff as bodyJsonUnsafe, fi as OrchestratorMcpFailure, fm as AcpRegistryOperationError, fn as ResourceMonitorEvent, ga as TerminalCwdNotDirectoryError, gh as ScheduledTaskId, gm as resolveOfficialAcpRegistryIconUrl, hf as bodyUrlParams, hh as RuntimeRequestId, hm as officialAcpRegistryIconUrlForAgentId, hu as ChatAttachment, in as isStreamSchema, iu as McpServerName, jc as OrchestrationV2RuntimeRequest, jl as PullRequestOperationError, jm as defaultInstanceIdForDriver, ju as del, ka as ClaudeSettings, kf as HttpClientError, km as ProviderInstanceId, kr as AgentSessionScanError, ku as make$91, lf as bearerToken, lh as ProviderThreadId, lu as mcpProviderSupport, mc as OrchestrationV2ExecutionNode, mf as bodyText, mh as RunId, mm as AcpRegistryProbeResult, mn as McpCapabilityUnavailableError, nn as ClientAbort, nr as McpAppRequestError, oc as OrchestrationV2ConversationMessage, oh as PositiveInt$1, om as decode$2, ot as WORKTREE_SETUP_ERROR_MAX_LENGTH, ou as McpServerTransport, pa as ProviderSetupError, pm as AcpRegistryOperationErrorReason, po as PreviewSessionLookupError, qc as OrchestrationWorkflowFileError, qi as TextGenerationError, ra as isProviderAvailable, rh as NonNegativeInt$1, rn as getStreamSchemas, rp as isPlatformError, ru as McpServerId, sh as ProjectId, so as PREVIEW_URL_MAX_LENGTH, st as WORKTREE_SETUP_STAGE_ORDER, su as PluginId, t as sha256, th as MessageId$2, tl as parseGoalCommand, tn as make$88, to as resolveProviderInstanceEnabled, tp as PlatformError, ts as resolveDecisionBackend, uh as ProviderTurnId, um as AcpRegistryListProvidersResult, uo as PreviewControlRequiredError, uu as resolveRegistryEntryEnabled, va as TerminalCwdStatError, vc as OrchestrationV2PlanArtifact, vh as ThreadId, vo as value$1, wa as TerminalSessionLookupError, wc as OrchestrationV2ProviderThread, wf as setHeaders, wh as fromInput, wu as isProviderSendTurnSupportedImageMimeType, xa as TerminalProviderEnvironmentError, xc as OrchestrationV2ProviderRetry, xh as TurnItemId, ya as TerminalHistoryError, yc as OrchestrationV2ProviderFailure, yf as post, yh as TrimmedNonEmptyString, yu as PROVIDER_SEND_TURN_MAX_FILE_BYTES } from "./sha2-BfCJmkJJ.mjs";
9
9
  import { $ as paginate$1, A as fromIterable, An as unbounded$1, Bn as interruptAs, C as flattenIterable, Cn as publish, Dn as sliding, Dt as toAsyncIterable, E as fromAsyncIterable, En as shutdown$1, Et as timeoutOrElse$1, Fn as await_, Ft as unwrap$1, G as mapEffect, H as map$3, Hn as runIn, Ht as mapInput$1, I as fromSubscription, In as getCurrent, J as mergeAll$1, K as mapError$1, Ln as interrupt$4, Lt as drain$1, M as fromPubSub, Nn as makeUnsafe$10, O as fromEffect, On as subscribe, Ot as toAsyncIterableWith, P as fromQueue, Pn as awaitAll, Rn as interruptAll, Rt as forEach$1, S as flatMap$2, Sn as unbounded$2, St as takeUntilEffect, T as fromArray, Tn as publishUnsafe, V as make$94, Vn as join, Y as mkString, Z as onEnd, _ as failCause$5, _n as shutdown$2, a as changes$1, bn as take$1, bt as switchMap, cn as fail$5, ct as runCollect, d as drain, dn as interrupt$5, en as make$92, et as pipeThroughChannel, fn as make$93, ft as runForEach, g as fail$6, h as ensuring$1, hn as offerUnsafe, i as catch_$2, in as collect$1, j as fromIteratorSucceed, k as fromEffectRepeat, l as decodeText$1, ln as failCause$4, lt as runDrain, m as encodeText, mn as offerAll, mt as runHead, n as catchCause$1, nn as bounded, o as changesWith, on as end, p as empty$8, pn as offer$1, pt as runForEachArray, q as merge$3, rn as clear$2, s as concat$1, st as run$2, t as callback$1, tn as makeUnsafe$9, ut as runFold, v as filter$2, vn as shutdownUnsafe, vt as succeed$5, wt as tap$2, x as filterMapEffect, xn as takeAll, xt as takeUntil, y as filterEffect, yn as sliding$1, yt as suspend$3, z as interruptWhen } from "./Stream-DZTo5F3N.mjs";
10
10
  import { n as responsePayloads } from "./mcpResponsePayloads-tqyeJD3c.mjs";
11
11
  import * as NodeModule from "node:module";
@@ -3497,6 +3497,49 @@ const endRunlessRootTurns = (input) => gen$1(function* () {
3497
3497
  }
3498
3498
  return events;
3499
3499
  });
3500
+ // src/orchestration-v2/sweepLedger.ts
3501
+ const mergeItems = (current, changes) => {
3502
+ const items = new Map(current.map((item) => [item.key, item]));
3503
+ for (const change of changes) items.set(change.key, {
3504
+ ...items.get(change.key),
3505
+ ...change
3506
+ });
3507
+ return [...items.values()];
3508
+ };
3509
+ function applySweepChange(current, change, now) {
3510
+ if (change.action === "start") return {
3511
+ status: "running",
3512
+ items: mergeItems([], change.items),
3513
+ startedAt: now,
3514
+ endedAt: null
3515
+ };
3516
+ if (current == null) return current;
3517
+ switch (change.action) {
3518
+ case "update": return {
3519
+ ...current,
3520
+ items: mergeItems(current.items, change.items)
3521
+ };
3522
+ case "reopen": return {
3523
+ ...current,
3524
+ status: "running",
3525
+ endedAt: null,
3526
+ items: current.items.map((item) => item.status === "running" ? {
3527
+ ...item,
3528
+ status: "queued"
3529
+ } : item)
3530
+ };
3531
+ case "stop": return current.status === "running" ? {
3532
+ ...current,
3533
+ status: "stopped",
3534
+ endedAt: now
3535
+ } : current;
3536
+ case "finish": return current.status === "running" ? {
3537
+ ...current,
3538
+ status: "finished",
3539
+ endedAt: now
3540
+ } : current;
3541
+ }
3542
+ }
3500
3543
  // src/orchestration-v2/CheckpointRestoreSafety.ts
3501
3544
  const SHARED_WORKSPACE_RESTORE_MESSAGE = "File restore requires an isolated worktree. This workspace may contain changes from another thread. Rewind the conversation without restoring files instead.";
3502
3545
  const isCheckpointRestoreIsolated = fn("orchestrationV2.isCheckpointRestoreIsolated")(function* (thread, scope, dependencies) {
@@ -41758,7 +41801,8 @@ const CLAUDE_SCRIPT_EXTENSIONS = [
41758
41801
  ".ts",
41759
41802
  ".jsx"
41760
41803
  ];
41761
- const CLAUDE_MCP_REGISTRATION_TIMEOUT = "90 seconds";
41804
+ const CLAUDE_MCP_REGISTRATION_TIMEOUT = "3 minutes";
41805
+ const CLAUDE_MCP_STATUS_TIMEOUT = "90 seconds";
41762
41806
  const CLAUDE_STDERR_DRAIN_TIMEOUT = seconds(1);
41763
41807
  const CLAUDE_ROOT_REFUSAL = "--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons";
41764
41808
  const CLAUDE_GROUP_WATCH_SCRIPT = ["{ trap '' TERM; read -r _ <&3; kill -TERM 0; sleep 5; kill -KILL 0; } </dev/null >/dev/null 2>&1 &", "exec \"$@\" 3<&-"].join("\n");
@@ -42117,7 +42161,7 @@ const layerQueryRunner = effect(ClaudeAgentSdkQueryRunner, gen$1(function* () {
42117
42161
  servers: failed
42118
42162
  });
42119
42163
  const needsSignIn = yield* tryPromise(() => queryRuntime.mcpServerStatus()).pipe(map((statuses) => Array.isArray(statuses) ? statuses.filter((server) => server.status === "needs-auth").map((server) => server.name) : []), timeoutOrElse({
42120
- duration: CLAUDE_MCP_REGISTRATION_TIMEOUT,
42164
+ duration: CLAUDE_MCP_STATUS_TIMEOUT,
42121
42165
  orElse: () => succeed([])
42122
42166
  }), orElseSucceed(() => []));
42123
42167
  if (needsSignIn.length > 0) {
@@ -44028,15 +44072,15 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44028
44072
  const runPromise = runPromiseWith(runtimeContext);
44029
44073
  const emitProviderEvent = (event) => offer$1(events, event).pipe(asVoid);
44030
44074
  const emitContextUsage = fnUntraced(function* (context, usage, requestStarted = false) {
44031
- const now$114 = yield* now;
44032
- if (requestStarted && context.streamUsage !== null) context.streamUsage.requestedAt = now$114;
44075
+ const now$115 = yield* now;
44076
+ if (requestStarted && context.streamUsage !== null) context.streamUsage.requestedAt = now$115;
44033
44077
  const maxTokens = claudeContextWindow(context.input.modelSelection);
44034
44078
  const tokenUsage = typeof usage === "number" ? {
44035
44079
  usedTokens: usage,
44036
44080
  maxTokens,
44037
44081
  ...claudeAutoCompactThreshold(adapterOptions.settings.autoCompactWindow, maxTokens),
44038
- updatedAt: formatIso(now$114)
44039
- } : claudeProviderTurnTokenUsage(usage, maxTokens, formatIso(now$114), adapterOptions.settings.autoCompactWindow, context.streamUsage?.requestedAt);
44082
+ updatedAt: formatIso(now$115)
44083
+ } : claudeProviderTurnTokenUsage(usage, maxTokens, formatIso(now$115), adapterOptions.settings.autoCompactWindow, context.streamUsage?.requestedAt);
44040
44084
  if (typeof usage !== "number") {
44041
44085
  if (claudeMessageInputTokens(usage) <= 0) return;
44042
44086
  context.compactionTokens = void 0;
@@ -44140,14 +44184,14 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44140
44184
  const clearOpaqueBackgroundTaskReplayTombstone = (nativeThreadId, taskId) => clearTaskIdFromNativeThreadSet(opaqueBackgroundTaskReplayTombstonesByNativeThread, nativeThreadId, taskId);
44141
44185
  const emitProviderThreadRoster = fnUntraced(function* (input) {
44142
44186
  const roster = rosterForNativeThread(yield* get$7(pendingBackgroundTasksByNativeThread), input.nativeThreadId);
44143
- const now$98 = yield* now;
44187
+ const now$99 = yield* now;
44144
44188
  const providerThread = {
44145
44189
  ...input.providerThread,
44146
44190
  providerSessionId: session.id,
44147
44191
  ...input.status === void 0 ? {} : { status: input.status },
44148
44192
  pendingBackgroundTasks: claudePendingBackgroundTasksFromRoster(roster),
44149
44193
  ...goalsByNativeThread.has(input.nativeThreadId) ? { goal: goalsByNativeThread.get(input.nativeThreadId) ?? null } : {},
44150
- updatedAt: now$98
44194
+ updatedAt: now$99
44151
44195
  };
44152
44196
  yield* rememberProviderThread(providerThread);
44153
44197
  yield* emitProviderEvent({
@@ -44438,7 +44482,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44438
44482
  }).pipe(catch_(() => logWarning$1("orchestration-v2.claude-subagent-launch-lookup-failed", { taskId: resume.taskId }).pipe(as(null))));
44439
44483
  if (launchToolUseId === null || launchToolUseId === resume.toolUseId) return;
44440
44484
  const ids = claudeSubagentIds(resume.context, resume.taskId);
44441
- const now$115 = yield* now;
44485
+ const now$116 = yield* now;
44442
44486
  const subagent = {
44443
44487
  confirmedOutcome: void 0,
44444
44488
  childThread: null,
@@ -44463,9 +44507,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44463
44507
  model: null,
44464
44508
  result: null,
44465
44509
  status: "completed",
44466
- startedAt: now$115,
44467
- completedAt: now$115,
44468
- updatedAt: now$115
44510
+ startedAt: now$116,
44511
+ completedAt: now$116,
44512
+ updatedAt: now$116
44469
44513
  },
44470
44514
  rootNodeId: resume.context.input.rootNodeId,
44471
44515
  childThreadId: ids.childThreadId,
@@ -44550,7 +44594,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44550
44594
  const parentThread = input.coordinator.childThread;
44551
44595
  const taskId = input.coordinator.task.nativeTaskRef?.nativeId;
44552
44596
  if (parentThread === null || taskId === void 0 || taskId === null) return;
44553
- const now$109 = yield* now;
44597
+ const now$110 = yield* now;
44554
44598
  const seen = yield* get$7(workflowMemberStates);
44555
44599
  const transcriptDir = input.workflow.runHandles?.transcriptDir;
44556
44600
  for (const member of input.workflow.agents) {
@@ -44563,9 +44607,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44563
44607
  const model = member.model ?? parentThread.modelSelection.model;
44564
44608
  const attempt = member.attempt ?? previous?.attempt ?? 1;
44565
44609
  const restarted = previous !== void 0 && attempt > previous.attempt;
44566
- const createdAt = previous?.createdAt ?? now$109;
44567
- const startedAt = status === "pending" ? null : member.startedAt !== void 0 ? makeUnsafe$8(member.startedAt) : (restarted ? null : previous?.startedAt) ?? (status === "running" ? now$109 : null);
44568
- const completedAt = settled ? (restarted ? null : previous?.completedAt) ?? now$109 : null;
44610
+ const createdAt = previous?.createdAt ?? now$110;
44611
+ const startedAt = status === "pending" ? null : member.startedAt !== void 0 ? makeUnsafe$8(member.startedAt) : (restarted ? null : previous?.startedAt) ?? (status === "running" ? now$110 : null);
44612
+ const completedAt = settled ? (restarted ? null : previous?.completedAt) ?? now$110 : null;
44569
44613
  const changed = restarted || previous?.status !== status || !equals(previous?.startedAt, startedAt) || previous?.result !== member.result || previous?.label !== member.label || previous?.prompt !== prompt || previous?.model !== model;
44570
44614
  const agentId = member.agentId;
44571
44615
  const readTranscript = settled && transcriptDir !== void 0 && agentId !== void 0 && (input.coordinator.task.status === "running" ? (restarted ? 0 : previous?.transcriptReadAttempts ?? 0) < 3 : restarted || previous?.finalTranscriptRead !== true);
@@ -44606,7 +44650,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44606
44650
  role: "user",
44607
44651
  text: prompt,
44608
44652
  ordinal: 100,
44609
- now: now$109
44653
+ now: now$110
44610
44654
  });
44611
44655
  if (restarted && !settled) yield* emitSubagentConversationMessage({
44612
44656
  nativeItemId: `${memberKey}:answer:200`,
@@ -44615,7 +44659,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44615
44659
  role: "assistant",
44616
44660
  text: "Retry in progress.",
44617
44661
  ordinal: 200,
44618
- now: now$109
44662
+ now: now$110
44619
44663
  });
44620
44664
  const task = {
44621
44665
  id: nodeId,
@@ -44640,7 +44684,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44640
44684
  result: member.result ?? null,
44641
44685
  startedAt,
44642
44686
  completedAt,
44643
- updatedAt: now$109
44687
+ updatedAt: now$110
44644
44688
  };
44645
44689
  const nodeBase = {
44646
44690
  runId: null,
@@ -44701,7 +44745,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44701
44745
  role: "assistant",
44702
44746
  text: answer,
44703
44747
  ordinal: 200,
44704
- now: now$109
44748
+ now: now$110
44705
44749
  });
44706
44750
  }
44707
44751
  yield* update$4(workflowMemberStates, (current) => new Map(current).set(memberKey, {
@@ -44747,7 +44791,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44747
44791
  if (existingSubagent !== void 0 && existingSubagent.task.status !== "running" && input.status === "running" && !isReopen) return;
44748
44792
  const resumeToolUseId = input.reopen === true && existingSubagent !== void 0 && input.toolUseId !== void 0 && input.toolUseId !== existingSubagent.runToolUseId && input.prompt !== void 0 ? input.toolUseId : null;
44749
44793
  const lifecycleChanged = existingSubagent === void 0 || existingSubagent.task.status !== input.status || input.reopen === true && input.status === "running";
44750
- const now$110 = yield* now;
44794
+ const now$111 = yield* now;
44751
44795
  const nativeItemId = `task:${input.taskId}`;
44752
44796
  const derivedIds = claudeSubagentIds(input.context, input.taskId);
44753
44797
  const nodeId = existingSubagent?.task.id ?? derivedIds.nodeId;
@@ -44789,7 +44833,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44789
44833
  title: input.title ?? null,
44790
44834
  model: input.model ?? null,
44791
44835
  result: null,
44792
- startedAt: now$110
44836
+ startedAt: now$111
44793
44837
  },
44794
44838
  status: input.status,
44795
44839
  ...input.reopen === true && input.status === "running" && existingSubagent !== void 0 ? { runId: input.context.input.runId } : {},
@@ -44800,9 +44844,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44800
44844
  ...input.progress === void 0 ? {} : { progress: input.progress },
44801
44845
  ...workflowWithThreads === void 0 ? {} : { workflow: workflowWithThreads },
44802
44846
  ...input.result === void 0 ? {} : { result: input.result },
44803
- ...isReopen ? { startedAt: now$110 } : {},
44804
- completedAt: input.status === "running" ? null : priorTask?.completedAt ?? now$110,
44805
- updatedAt: now$110
44847
+ ...isReopen ? { startedAt: now$111 } : {},
44848
+ completedAt: input.status === "running" ? null : priorTask?.completedAt ?? now$111,
44849
+ updatedAt: now$111
44806
44850
  };
44807
44851
  const subagent = {
44808
44852
  task,
@@ -44856,7 +44900,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44856
44900
  title: workflowWithThreads === void 0 ? task.title : `Workflow · ${workflowWithThreads.name ?? task.title ?? "Untitled"}`,
44857
44901
  ordinal: input.context.subagentsByTaskId.size
44858
44902
  }),
44859
- now: now$110,
44903
+ now: now$111,
44860
44904
  createdBy: "agent",
44861
44905
  creationSource: "provider"
44862
44906
  });
@@ -44927,7 +44971,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44927
44971
  role: "user",
44928
44972
  text: task.prompt,
44929
44973
  ordinal: existingSubagent === void 0 ? 100 : ++subagent.nextChildItemOrdinal,
44930
- now: now$110
44974
+ now: now$111
44931
44975
  });
44932
44976
  if (workflowWithThreads !== void 0) {
44933
44977
  yield* projectClaudeWorkflowMembers({
@@ -44981,7 +45025,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
44981
45025
  role: "assistant",
44982
45026
  text: input.result,
44983
45027
  ordinal: resultItemOrdinal,
44984
- now: now$110
45028
+ now: now$111
44985
45029
  });
44986
45030
  }
44987
45031
  });
@@ -45276,7 +45320,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
45276
45320
  };
45277
45321
  });
45278
45322
  const cancelWithdrawnRequest = fnUntraced(function* (artifacts) {
45279
- const now$104 = yield* now;
45323
+ const now$105 = yield* now;
45280
45324
  yield* all([
45281
45325
  emitProviderEvent({
45282
45326
  type: "runtime_request.updated",
@@ -45284,7 +45328,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
45284
45328
  runtimeRequest: {
45285
45329
  ...artifacts.request,
45286
45330
  status: "cancelled",
45287
- resolvedAt: now$104
45331
+ resolvedAt: now$105
45288
45332
  }
45289
45333
  }),
45290
45334
  emitProviderEvent({
@@ -45293,7 +45337,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
45293
45337
  node: {
45294
45338
  ...artifacts.node,
45295
45339
  status: "cancelled",
45296
- completedAt: now$104
45340
+ completedAt: now$105
45297
45341
  }
45298
45342
  }),
45299
45343
  emitProviderEvent({
@@ -45302,8 +45346,8 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
45302
45346
  turnItem: {
45303
45347
  ...artifacts.turnItem,
45304
45348
  status: "cancelled",
45305
- completedAt: now$104,
45306
- updatedAt: now$104
45349
+ completedAt: now$105,
45350
+ updatedAt: now$105
45307
45351
  }
45308
45352
  })
45309
45353
  ], { concurrency: 1 });
@@ -45323,7 +45367,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
45323
45367
  const block = context.reasoning.blocks.get(update.itemId);
45324
45368
  if (block === void 0 || update.text.length === 0) return;
45325
45369
  block.text = update.text;
45326
- const now$111 = yield* now;
45370
+ const now$112 = yield* now;
45327
45371
  yield* emitProviderEvent({
45328
45372
  type: "turn_item.updated",
45329
45373
  driver: CLAUDE_PROVIDER,
@@ -45350,8 +45394,8 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
45350
45394
  streaming: !update.completed,
45351
45395
  status: update.completed ? "completed" : "running",
45352
45396
  startedAt: block.startedAt,
45353
- completedAt: update.completed ? now$111 : null,
45354
- updatedAt: now$111
45397
+ completedAt: update.completed ? now$112 : null,
45398
+ updatedAt: now$112
45355
45399
  }
45356
45400
  });
45357
45401
  })
@@ -45556,7 +45600,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
45556
45600
  const emitAssistantTextArtifacts = fnUntraced(function* (input) {
45557
45601
  if (input.context.assistant.emittedNativeItemIds.has(input.nativeItemId)) return;
45558
45602
  input.context.assistant.emittedNativeItemIds.add(input.nativeItemId);
45559
- const now$112 = yield* now;
45603
+ const now$113 = yield* now;
45560
45604
  const ordinal = yield* resolveItemOrdinal(input.context, input.nativeItemId);
45561
45605
  const artifacts = buildAssistantArtifacts({
45562
45606
  idAllocator,
@@ -45565,8 +45609,8 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
45565
45609
  nativeItemId: input.nativeItemId,
45566
45610
  text: input.text,
45567
45611
  ordinal,
45568
- startedAt: now$112,
45569
- completedAt: now$112
45612
+ startedAt: now$113,
45613
+ completedAt: now$113
45570
45614
  });
45571
45615
  yield* all([
45572
45616
  emitProviderEvent({
@@ -45651,14 +45695,14 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
45651
45695
  message
45652
45696
  });
45653
45697
  if (workflow === void 0) return;
45654
- const now$100 = yield* now;
45698
+ const now$101 = yield* now;
45655
45699
  const progress = text$2(message.description);
45656
45700
  const workflowWithThreads = withWorkflowMemberThreadIds(workflow, registered.childThreadId);
45657
45701
  const task = {
45658
45702
  ...registered.task,
45659
45703
  ...progress === void 0 ? {} : { progress },
45660
45704
  workflow: workflowWithThreads,
45661
- updatedAt: now$100
45705
+ updatedAt: now$101
45662
45706
  };
45663
45707
  const coordinator = {
45664
45708
  ...registered,
@@ -45689,7 +45733,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
45689
45733
  const isNewSubagentTaskStarted = message.type === "system" && message.subtype === "task_started" && !isClaudeNonSubagentTask(message);
45690
45734
  const isKnownSubagentTaskStarted = message.type === "system" && message.subtype === "task_started" && (yield* get$7(sessionSubagentsByTaskId)).has(message.task_id);
45691
45735
  if (isKnownSubagentTaskStarted && message.type === "system" && message.subtype === "task_started") {
45692
- const now$102 = yield* now;
45736
+ const now$103 = yield* now;
45693
45737
  yield* update$4(sessionSubagentsByTaskId, (current) => {
45694
45738
  const registered = current.get(message.task_id);
45695
45739
  if (registered === void 0 || registered.task.status === "running") return current;
@@ -45701,9 +45745,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
45701
45745
  ...priorTask,
45702
45746
  status: "running",
45703
45747
  result: null,
45704
- startedAt: now$102,
45748
+ startedAt: now$103,
45705
45749
  completedAt: null,
45706
- updatedAt: now$102
45750
+ updatedAt: now$103
45707
45751
  }
45708
45752
  });
45709
45753
  });
@@ -45839,10 +45883,10 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
45839
45883
  if (!rateLimitInfo) return;
45840
45884
  const names = adapterOptions.scopedLimitNames ? yield* get$7(adapterOptions.scopedLimitNames) : { overageIncluded: void 0 };
45841
45885
  const update = claudeRateLimitEventToUpdate(rateLimitInfo, names);
45842
- const now$105 = yield* now;
45886
+ const now$106 = yield* now;
45843
45887
  if (update && adapterOptions.onUsageLimits) yield* adapterOptions.onUsageLimits({
45844
45888
  ...update,
45845
- checkedAt: formatIso(now$105)
45889
+ checkedAt: formatIso(now$106)
45846
45890
  });
45847
45891
  const context = yield* get$7(activeTurn);
45848
45892
  if (context === null) {
@@ -45868,7 +45912,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
45868
45912
  if (!context.announcedUsageLimits.has(limitKey)) {
45869
45913
  context.announcedUsageLimits.add(limitKey);
45870
45914
  const nativeItemId = `usage-limit:${context.providerTurnId}:${limitKey}`;
45871
- const notice = describeClaudeUsageLimit(rateLimitInfo, toEpochMillis(now$105), names);
45915
+ const notice = describeClaudeUsageLimit(rateLimitInfo, toEpochMillis(now$106), names);
45872
45916
  yield* emitProviderEvent({
45873
45917
  type: "turn_item.updated",
45874
45918
  driver: CLAUDE_PROVIDER,
@@ -45893,9 +45937,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
45893
45937
  status: "completed",
45894
45938
  title: notice,
45895
45939
  message: notice,
45896
- startedAt: now$105,
45897
- completedAt: now$105,
45898
- updatedAt: now$105
45940
+ startedAt: now$106,
45941
+ completedAt: now$106,
45942
+ updatedAt: now$106
45899
45943
  }
45900
45944
  });
45901
45945
  }
@@ -46065,7 +46109,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
46065
46109
  }
46066
46110
  if (message.type === "system" && message.subtype === "compact_boundary") {
46067
46111
  if (context.streamUsage !== null) context.streamUsage.usage = null;
46068
- const now$116 = yield* now;
46112
+ const now$98 = yield* now;
46069
46113
  const nativeItemId = message.uuid;
46070
46114
  const postTokens = message.compact_metadata.post_tokens;
46071
46115
  const afterTokenCount = typeof postTokens === "number" && Number.isFinite(postTokens) && postTokens > 0 ? Math.round(postTokens) : void 0;
@@ -46095,9 +46139,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
46095
46139
  driver: CLAUDE_PROVIDER,
46096
46140
  status: "completed",
46097
46141
  title: "Context compacted",
46098
- startedAt: now$116,
46099
- completedAt: now$116,
46100
- updatedAt: now$116,
46142
+ startedAt: now$98,
46143
+ completedAt: now$98,
46144
+ updatedAt: now$98,
46101
46145
  ...message.compact_metadata.pre_tokens === void 0 ? {} : { beforeTokenCount: message.compact_metadata.pre_tokens },
46102
46146
  ...afterTokenCount === void 0 ? {} : { afterTokenCount }
46103
46147
  }
@@ -46105,7 +46149,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
46105
46149
  return;
46106
46150
  }
46107
46151
  if (message.type === "system" && message.subtype === "model_refusal_fallback") {
46108
- const now$103 = yield* now;
46152
+ const now$104 = yield* now;
46109
46153
  const nativeItemId = message.uuid;
46110
46154
  yield* emitProviderEvent({
46111
46155
  type: "turn_item.updated",
@@ -46131,9 +46175,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
46131
46175
  status: "completed",
46132
46176
  title: message.content,
46133
46177
  message: message.content,
46134
- startedAt: now$103,
46135
- completedAt: now$103,
46136
- updatedAt: now$103
46178
+ startedAt: now$104,
46179
+ completedAt: now$104,
46180
+ updatedAt: now$104
46137
46181
  }
46138
46182
  });
46139
46183
  return;
@@ -46180,8 +46224,8 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
46180
46224
  return;
46181
46225
  }
46182
46226
  if (message.type === "assistant" && input.replayed !== true) {
46183
- const now$108 = yield* now;
46184
- yield* completeProviderRetry(context, now$108);
46227
+ const now$109 = yield* now;
46228
+ yield* completeProviderRetry(context, now$109);
46185
46229
  if (message.parent_tool_use_id === null && message.message.usage !== void 0 && message.message.model !== "<synthetic>") {
46186
46230
  const snapshotUsage = message.message.usage;
46187
46231
  const stream = context.streamUsage;
@@ -46456,7 +46500,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
46456
46500
  const thinking = message.message.content.flatMap((block) => block.type === "thinking" && block.thinking.trim().length > 0 ? [block.thinking] : []);
46457
46501
  const subagent = thinking.length === 0 ? void 0 : yield* resolveSubagentByToolUseId(context, assistantParentToolUseId);
46458
46502
  if (subagent !== void 0) {
46459
- const now$99 = yield* now;
46503
+ const now$100 = yield* now;
46460
46504
  for (const [index, text] of thinking.entries()) {
46461
46505
  const nativeItemId = `${message.uuid}:thinking:${index}`;
46462
46506
  yield* emitProviderEvent({
@@ -46484,9 +46528,9 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
46484
46528
  text,
46485
46529
  streaming: false,
46486
46530
  status: "completed",
46487
- startedAt: now$99,
46488
- completedAt: now$99,
46489
- updatedAt: now$99
46531
+ startedAt: now$100,
46532
+ completedAt: now$100,
46533
+ updatedAt: now$100
46490
46534
  }
46491
46535
  });
46492
46536
  }
@@ -46496,7 +46540,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
46496
46540
  if (assistantText !== null && assistantText.text.length > 0 && assistantParentToolUseId !== null) {
46497
46541
  const subagent = yield* resolveSubagentByToolUseId(context, assistantParentToolUseId);
46498
46542
  if (subagent === void 0) return;
46499
- const now$113 = yield* now;
46543
+ const now$114 = yield* now;
46500
46544
  const nativeMessageId = message.type === "assistant" && typeof message.message.id === "string" ? message.message.id : null;
46501
46545
  subagent.lastAssistantText = nativeMessageId !== null && nativeMessageId === subagent.lastAssistantMessageId ? `${subagent.lastAssistantText ?? ""}\n${assistantText.text}` : assistantText.text;
46502
46546
  subagent.lastAssistantMessageId = nativeMessageId;
@@ -46507,7 +46551,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
46507
46551
  role: "assistant",
46508
46552
  text: assistantText.text,
46509
46553
  ordinal: ++subagent.nextChildItemOrdinal,
46510
- now: now$113
46554
+ now: now$114
46511
46555
  });
46512
46556
  return;
46513
46557
  }
@@ -46941,14 +46985,14 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
46941
46985
  return updated;
46942
46986
  })));
46943
46987
  if (resolved === "cancel" && callbackOptions.signal.aborted) {
46944
- const now$106 = yield* now;
46988
+ const now$107 = yield* now;
46945
46989
  yield* emitProviderEvent({
46946
46990
  type: "node.updated",
46947
46991
  driver: CLAUDE_PROVIDER,
46948
46992
  node: {
46949
46993
  ...artifacts.node,
46950
46994
  status: "cancelled",
46951
- completedAt: now$106
46995
+ completedAt: now$107
46952
46996
  }
46953
46997
  });
46954
46998
  yield* emitProviderEvent({
@@ -46957,8 +47001,8 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
46957
47001
  turnItem: {
46958
47002
  ...artifacts.turnItem,
46959
47003
  status: "cancelled",
46960
- completedAt: now$106,
46961
- updatedAt: now$106
47004
+ completedAt: now$107,
47005
+ updatedAt: now$107
46962
47006
  }
46963
47007
  });
46964
47008
  yield* emitProviderEvent({
@@ -46967,7 +47011,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
46967
47011
  runtimeRequest: {
46968
47012
  ...artifacts.request,
46969
47013
  status: "cancelled",
46970
- resolvedAt: now$106
47014
+ resolvedAt: now$107
46971
47015
  }
46972
47016
  });
46973
47017
  }
@@ -47595,7 +47639,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
47595
47639
  });
47596
47640
  const nativeThreadId = yield* getNativeThreadId$1(rollbackInput.providerThread);
47597
47641
  yield* closeLiveQueryForNativeThread(nativeThreadId);
47598
- const now$101 = yield* now;
47642
+ const now$102 = yield* now;
47599
47643
  if (rollbackInput.target.type === "thread_start") {
47600
47644
  const resetNativeThreadId = yield* queryRunner.allocateSessionId;
47601
47645
  return {
@@ -47608,7 +47652,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
47608
47652
  providerSessionId: input.providerSessionId,
47609
47653
  nativeThreadId: resetNativeThreadId,
47610
47654
  ...rollbackInput.providerThread.forkedFrom === null ? {} : { forkedFrom: rollbackInput.providerThread.forkedFrom },
47611
- now: now$101
47655
+ now: now$102
47612
47656
  }),
47613
47657
  handoffIds: rollbackInput.providerThread.handoffIds
47614
47658
  },
@@ -47629,7 +47673,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
47629
47673
  },
47630
47674
  status: "idle",
47631
47675
  lastRunOrdinal: rollbackInput.target.appRunOrdinal,
47632
- updatedAt: now$101
47676
+ updatedAt: now$102
47633
47677
  },
47634
47678
  providerTurns: [],
47635
47679
  messages: [],
@@ -47664,7 +47708,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
47664
47708
  updated.add(forked.sessionId);
47665
47709
  return updated;
47666
47710
  });
47667
- const now$107 = yield* now;
47711
+ const now$108 = yield* now;
47668
47712
  return makeProviderThread$2({
47669
47713
  idAllocator,
47670
47714
  providerInstanceId: adapterOptions.instanceId,
@@ -47676,7 +47720,7 @@ const makeClaudeAdapterV2 = fn("makeClaudeAdapterV2")(function* (adapterOptions)
47676
47720
  providerThreadId: forkInput.sourceProviderThread.id,
47677
47721
  ...forkInput.providerTurnId === void 0 ? {} : { providerTurnId: forkInput.providerTurnId }
47678
47722
  },
47679
- now: now$107
47723
+ now: now$108
47680
47724
  });
47681
47725
  }, (effect, forkInput) => effect.pipe(mapError((cause) => new ProviderAdapterForkThreadError({
47682
47726
  driver: CLAUDE_PROVIDER,
@@ -48254,7 +48298,7 @@ function claudeGatewayDiscoveryGraceMs(environment) {
48254
48298
  * This is used as a fallback when `claude auth status` does not include
48255
48299
  * subscription type information.
48256
48300
  */
48257
- const probeClaudeCapabilities = (claudeSettings, environment, cwd, includeUsage = true) => {
48301
+ const probeClaudeCapabilities = (claudeSettings, environment, cwd, includeUsage = true) => suspend(() => {
48258
48302
  const abort = new AbortController();
48259
48303
  const abortProbe = sync(() => {
48260
48304
  if (!abort.signal.aborted) abort.abort();
@@ -48304,6 +48348,15 @@ const probeClaudeCapabilities = (claudeSettings, environment, cwd, includeUsage
48304
48348
  ...usage ? { usage } : {}
48305
48349
  };
48306
48350
  }).pipe(tap(() => graceMs > 0 ? sleep(graceMs).pipe(andThen(abortProbe), forkDetach) : abortProbe))), onError(() => abortProbe), result, map((result) => isSuccess(result) ? result.success : void 0));
48351
+ });
48352
+ const keepLastClaudeCapabilities = (probe) => {
48353
+ let lastCapabilities;
48354
+ return probe.pipe(map((capabilities) => {
48355
+ if (capabilities === void 0) return lastCapabilities;
48356
+ const { usage: _usage, ...withoutUsage } = capabilities;
48357
+ lastCapabilities = withoutUsage;
48358
+ return capabilities;
48359
+ }));
48307
48360
  };
48308
48361
  const runClaudeCommand = fn("runClaudeCommand")(function* (claudeSettings, args, environment, cwd) {
48309
48362
  const claudeEnvironment = yield* makeClaudeEnvironment(claudeSettings, environment);
@@ -48681,13 +48734,14 @@ const ClaudeDriver = {
48681
48734
  cause
48682
48735
  })));
48683
48736
  const textGeneration = yield* makeClaudeTextGeneration(effectiveConfig, processEnv, modelCatalog);
48737
+ const probeCapabilities = keepLastClaudeCapabilities(all([probeClaudeCapabilities(effectiveConfig, processEnv, stateDir), readClaudeOrganizationId(accountConfigPath)]).pipe(map(([capabilities, workspaceId]) => capabilities && workspaceId ? {
48738
+ ...capabilities,
48739
+ workspaceId
48740
+ } : capabilities), provideService(FileSystem, fileSystem), provideService(Path$1, path)));
48684
48741
  const capabilitiesProbeCache = yield* make$85({
48685
48742
  capacity: 1,
48686
48743
  timeToLive: CAPABILITIES_PROBE_TTL,
48687
- lookup: () => all([probeClaudeCapabilities(effectiveConfig, processEnv, stateDir), readClaudeOrganizationId(accountConfigPath)]).pipe(map(([capabilities, workspaceId]) => capabilities && workspaceId ? {
48688
- ...capabilities,
48689
- workspaceId
48690
- } : capabilities), provideService(FileSystem, fileSystem), provideService(Path$1, path))
48744
+ lookup: () => probeCapabilities
48691
48745
  });
48692
48746
  const capabilitiesCacheKey = yield* makeClaudeCapabilitiesCacheKey(effectiveConfig, stateDir, processEnv);
48693
48747
  const checkProvider = catalogService.refreshInBackground.pipe(andThen(modelCatalog.pipe(flatMap((catalog) => checkClaudeProviderStatus(effectiveConfig, () => get$8(capabilitiesProbeCache, capabilitiesCacheKey), processEnv, stateDir, catalog, scopedLimitNames, (version) => readClaudeResetCredits(configDir, version).pipe(provideService(HttpClient, httpClient), provideService(FileSystem, fileSystem), provideService(Path$1, path)))), map(stampIdentity))), provideService(ChildProcessSpawner, spawner), provideService(FileSystem, fileSystem), provideService(Path$1, path));
@@ -141966,7 +142020,7 @@ const layer$28 = succeed$1(ThreadForkServiceV2, ThreadForkServiceV2.of({ plan: (
141966
142020
  targetThreadId: input.targetThreadId,
141967
142021
  cause: forkableSourceRunStatusError(input.sourceRun)
141968
142022
  });
141969
- const { delegatedFrom: _delegatedFrom, launchedByThreadId: _launchedByThreadId, ...inherited } = input.sourceProjection.thread;
142023
+ const { delegatedFrom: _delegatedFrom, launchedByThreadId: _launchedByThreadId, sweep: _sweep, ...inherited } = input.sourceProjection.thread;
141970
142024
  return {
141971
142025
  targetThread: {
141972
142026
  ...inherited,
@@ -142628,7 +142682,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142628
142682
  });
142629
142683
  const queuedRun = nextQueuedRun(projection);
142630
142684
  if (queuedRun === void 0) return;
142631
- const now$26 = yield* now;
142685
+ const now$52 = yield* now;
142632
142686
  const rootNode = projection.nodes.find((node) => node.id === queuedRun.rootNodeId);
142633
142687
  const attempt = projection.attempts.find((entry) => entry.id === queuedRun.activeAttemptId);
142634
142688
  const providerThread = projection.providerThreads.find((entry) => entry.id === queuedRun.providerThreadId);
@@ -142645,11 +142699,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142645
142699
  runId: queuedRun.id,
142646
142700
  nodeId: rootNode.id,
142647
142701
  providerInstanceId: queuedRun.providerInstanceId,
142648
- occurredAt: now$26,
142702
+ occurredAt: now$52,
142649
142703
  payload: {
142650
142704
  ...attempt,
142651
142705
  status: "failed",
142652
- completedAt: now$26
142706
+ completedAt: now$52
142653
142707
  }
142654
142708
  }] : [],
142655
142709
  ...rootNode === void 0 ? [] : [{
@@ -142658,11 +142712,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142658
142712
  runId: queuedRun.id,
142659
142713
  nodeId: rootNode.id,
142660
142714
  providerInstanceId: queuedRun.providerInstanceId,
142661
- occurredAt: now$26,
142715
+ occurredAt: now$52,
142662
142716
  payload: {
142663
142717
  ...rootNode,
142664
142718
  status: "failed",
142665
- completedAt: now$26
142719
+ completedAt: now$52
142666
142720
  }
142667
142721
  }],
142668
142722
  ...rootNode === void 0 || providerThread === void 0 ? [] : [{
@@ -142671,7 +142725,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142671
142725
  runId: queuedRun.id,
142672
142726
  nodeId: rootNode.id,
142673
142727
  providerInstanceId: queuedRun.providerInstanceId,
142674
- occurredAt: now$26,
142728
+ occurredAt: now$52,
142675
142729
  payload: {
142676
142730
  id: idAllocator.derive.turnItemFromProviderItem({
142677
142731
  driver: providerThread.driver,
@@ -142687,9 +142741,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142687
142741
  ordinal: yield* nextTurnItemOrdinal(projection),
142688
142742
  status: "failed",
142689
142743
  title: "Queued provider could not start",
142690
- startedAt: now$26,
142691
- completedAt: now$26,
142692
- updatedAt: now$26,
142744
+ startedAt: now$52,
142745
+ completedAt: now$52,
142746
+ updatedAt: now$52,
142693
142747
  type: "error",
142694
142748
  failure
142695
142749
  }
@@ -142700,12 +142754,12 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142700
142754
  runId: queuedRun.id,
142701
142755
  ...rootNode === void 0 ? {} : { nodeId: rootNode.id },
142702
142756
  providerInstanceId: queuedRun.providerInstanceId,
142703
- occurredAt: now$26,
142757
+ occurredAt: now$52,
142704
142758
  payload: {
142705
142759
  ...queuedRun,
142706
142760
  status: "failed",
142707
142761
  queuePosition: null,
142708
- completedAt: now$26
142762
+ completedAt: now$52
142709
142763
  }
142710
142764
  }
142711
142765
  ]);
@@ -142726,13 +142780,13 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142726
142780
  const machineInstance = Object.hasOwn(settings.providerInstances, queuedRun.providerInstanceId) ? settings.providerInstances[queuedRun.providerInstanceId] : void 0;
142727
142781
  const instanceDisabledForProject = projectOverride !== void 0 ? !projectOverride : machineInstance !== void 0 && !resolveProviderInstanceEnabled(machineInstance);
142728
142782
  if (worktreeMissing || instanceDisabledForProject || failureClass !== void 0 && failureClass !== "validation_error" && failedRun?.providerInstanceId === queuedRun.providerInstanceId) {
142729
- const now$19 = yield* now;
142783
+ const now$49 = yield* now;
142730
142784
  yield* writeSystemEvents(projection.runs.filter((run) => run.status === "queued").map((run) => ({
142731
142785
  type: "run.updated",
142732
142786
  threadId,
142733
142787
  runId: run.id,
142734
142788
  providerInstanceId: run.providerInstanceId,
142735
- occurredAt: now$19,
142789
+ occurredAt: now$49,
142736
142790
  payload: {
142737
142791
  ...run,
142738
142792
  queueHeld: true
@@ -142760,7 +142814,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142760
142814
  cause: `Queued run ${queuedRun.id} is missing projection state.`
142761
142815
  });
142762
142816
  const commandId = CommandId.make(`command:system:start-queued:${queuedRun.id}`);
142763
- const now$11 = yield* now;
142817
+ const now$41 = yield* now;
142764
142818
  const selectionChanged = !modelSelectionsEqual(projection.thread.modelSelection, queuedRun.modelSelection);
142765
142819
  const switchPlan = selectionChanged ? yield* providerSwitchService.plan({
142766
142820
  projection,
@@ -142784,7 +142838,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142784
142838
  threadId,
142785
142839
  runId: run.id,
142786
142840
  providerInstanceId: run.providerInstanceId,
142787
- occurredAt: now$11,
142841
+ occurredAt: now$41,
142788
142842
  payload: {
142789
142843
  ...run,
142790
142844
  queueHeld: true
@@ -142848,7 +142902,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142848
142902
  runs: projection.runs,
142849
142903
  strategy: handoffStrategy,
142850
142904
  items: [...needsFullContext && latestCompletedRun !== void 0 ? legacyImportItems : [], ...yield* readHandoffItems(threadId, coveredRuns.map((run) => run.id))],
142851
- createdAt: now$11
142905
+ createdAt: now$41
142852
142906
  }).pipe(mapError((cause) => new OrchestratorDispatchError({
142853
142907
  commandId,
142854
142908
  commandType: "message.dispatch",
@@ -142860,7 +142914,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142860
142914
  toProviderThreadId: queuedProviderThread.id,
142861
142915
  toProviderInstanceId: queuedRun.providerInstanceId,
142862
142916
  items: legacyImportItems,
142863
- createdAt: now$11
142917
+ createdAt: now$41
142864
142918
  }).pipe(mapError((cause) => new OrchestratorDispatchError({
142865
142919
  commandId,
142866
142920
  commandType: "message.dispatch",
@@ -142876,7 +142930,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142876
142930
  rootNodeId: rootNode.id,
142877
142931
  providerThreadId: queuedProviderThread.id,
142878
142932
  cwd: resolvedRuntimePolicy.cwd ?? projection.thread.worktreePath ?? process.cwd(),
142879
- createdAt: now$11
142933
+ createdAt: now$41
142880
142934
  })), mapError((cause) => new OrchestratorDispatchError({
142881
142935
  commandId,
142882
142936
  commandType: "message.dispatch",
@@ -142898,7 +142952,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142898
142952
  firstRunOrdinal: queuedProviderThread.firstRunOrdinal ?? queuedRun.ordinal,
142899
142953
  lastRunOrdinal: queuedRun.ordinal,
142900
142954
  handoffIds: appendContextHandoffId(appendContextHandoffId(queuedProviderThread.handoffIds, handoff?.id ?? null), legacyImportRecoveryHandoff?.id ?? null),
142901
- updatedAt: now$11
142955
+ updatedAt: now$41
142902
142956
  };
142903
142957
  const startingRun = {
142904
142958
  ...queuedRun,
@@ -142937,9 +142991,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142937
142991
  },
142938
142992
  inputIntent: "queued_turn",
142939
142993
  status: "completed",
142940
- startedAt: now$11,
142941
- completedAt: now$11,
142942
- updatedAt: now$11
142994
+ startedAt: now$41,
142995
+ completedAt: now$41,
142996
+ updatedAt: now$41
142943
142997
  };
142944
142998
  const handoffTurnItem = activeHandoff === null ? null : {
142945
142999
  id: idAllocator.derive.runSignalTurnItem({
@@ -142956,9 +143010,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142956
143010
  ordinal: queuedRun.ordinal * 100 - 1,
142957
143011
  status: "completed",
142958
143012
  title: handoff === null ? "Imported context" : "Provider handoff",
142959
- startedAt: now$11,
142960
- completedAt: now$11,
142961
- updatedAt: now$11,
143013
+ startedAt: now$41,
143014
+ completedAt: now$41,
143015
+ updatedAt: now$41,
142962
143016
  type: "handoff",
142963
143017
  contextHandoffId: activeHandoff.id,
142964
143018
  fromProviderThreadIds: activeHandoff.fromProviderThreadIds,
@@ -142976,7 +143030,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142976
143030
  runId: queuedRun.id,
142977
143031
  nodeId: rootNode.id,
142978
143032
  providerInstanceId: queuedRun.providerInstanceId,
142979
- occurredAt: now$11,
143033
+ occurredAt: now$41,
142980
143034
  payload: checkpointScope
142981
143035
  }, {
142982
143036
  type: "node.updated",
@@ -142984,7 +143038,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142984
143038
  runId: queuedRun.id,
142985
143039
  nodeId: rootNode.id,
142986
143040
  providerInstanceId: queuedRun.providerInstanceId,
142987
- occurredAt: now$11,
143041
+ occurredAt: now$41,
142988
143042
  payload: {
142989
143043
  ...rootNode,
142990
143044
  checkpointScopeId: checkpointScope.id
@@ -142995,12 +143049,12 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
142995
143049
  type: queuedRun.providerInstanceId === projection.thread.providerInstanceId ? "thread.model-selection-updated" : "thread.provider-switched",
142996
143050
  threadId,
142997
143051
  providerInstanceId: queuedRun.providerInstanceId,
142998
- occurredAt: now$11,
143052
+ occurredAt: now$41,
142999
143053
  payload: {
143000
143054
  ...projection.thread,
143001
143055
  providerInstanceId: queuedRun.providerInstanceId,
143002
143056
  modelSelection: queuedRun.modelSelection,
143003
- updatedAt: now$11
143057
+ updatedAt: now$41
143004
143058
  }
143005
143059
  }] : [],
143006
143060
  ...handoff === null || transferId === null || latestHandoffRun === void 0 ? [] : [{
@@ -143008,7 +143062,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143008
143062
  threadId,
143009
143063
  runId: queuedRun.id,
143010
143064
  providerInstanceId: queuedRun.providerInstanceId,
143011
- occurredAt: now$11,
143065
+ occurredAt: now$41,
143012
143066
  payload: {
143013
143067
  id: transferId,
143014
143068
  type: "provider_handoff",
@@ -143026,16 +143080,16 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143026
143080
  },
143027
143081
  createdBy: queuedMessage.createdBy,
143028
143082
  error: null,
143029
- createdAt: now$11,
143030
- updatedAt: now$11,
143031
- consumedAt: now$11
143083
+ createdAt: now$41,
143084
+ updatedAt: now$41,
143085
+ consumedAt: now$41
143032
143086
  }
143033
143087
  }, {
143034
143088
  type: "context-handoff.updated",
143035
143089
  threadId,
143036
143090
  runId: queuedRun.id,
143037
143091
  providerInstanceId: queuedRun.providerInstanceId,
143038
- occurredAt: now$11,
143092
+ occurredAt: now$41,
143039
143093
  payload: handoff
143040
143094
  }],
143041
143095
  ...legacyImportRecoveryHandoff === null ? [] : [{
@@ -143043,7 +143097,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143043
143097
  threadId,
143044
143098
  runId: queuedRun.id,
143045
143099
  providerInstanceId: queuedRun.providerInstanceId,
143046
- occurredAt: now$11,
143100
+ occurredAt: now$41,
143047
143101
  payload: legacyImportRecoveryHandoff
143048
143102
  }],
143049
143103
  ...handoffTurnItem === null ? [] : [{
@@ -143052,7 +143106,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143052
143106
  runId: queuedRun.id,
143053
143107
  nodeId: rootNodeId,
143054
143108
  providerInstanceId: queuedRun.providerInstanceId,
143055
- occurredAt: now$11,
143109
+ occurredAt: now$41,
143056
143110
  payload: handoffTurnItem
143057
143111
  }],
143058
143112
  ...sessionsToDetach.map((session) => ({
@@ -143060,10 +143114,10 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143060
143114
  threadId,
143061
143115
  driver: session.driver,
143062
143116
  providerInstanceId: session.providerInstanceId,
143063
- occurredAt: now$11,
143117
+ occurredAt: now$41,
143064
143118
  payload: {
143065
143119
  providerSessionId: session.id,
143066
- detachedAt: now$11,
143120
+ detachedAt: now$41,
143067
143121
  reason: "Provider or model selection changed."
143068
143122
  }
143069
143123
  })),
@@ -143072,7 +143126,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143072
143126
  type: "provider-thread.updated",
143073
143127
  threadId,
143074
143128
  providerInstanceId: queuedRun.providerInstanceId,
143075
- occurredAt: now$11,
143129
+ occurredAt: now$41,
143076
143130
  payload: providerThread
143077
143131
  },
143078
143132
  {
@@ -143081,7 +143135,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143081
143135
  runId: queuedRun.id,
143082
143136
  nodeId: rootNodeId,
143083
143137
  providerInstanceId: queuedRun.providerInstanceId,
143084
- occurredAt: now$11,
143138
+ occurredAt: now$41,
143085
143139
  payload: notificationTurnItem(userTurnItem, queuedMessage, projection.subagents)
143086
143140
  },
143087
143141
  {
@@ -143090,7 +143144,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143090
143144
  runId: queuedRun.id,
143091
143145
  nodeId: rootNodeId,
143092
143146
  providerInstanceId: queuedRun.providerInstanceId,
143093
- occurredAt: now$11,
143147
+ occurredAt: now$41,
143094
143148
  payload: startingRun
143095
143149
  }
143096
143150
  ], [...sessionsToDetach.map((session) => ({
@@ -143150,7 +143204,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143150
143204
  cause: `Delegated task ${command.taskId} is not an app-owned task of thread ${command.parentThreadId}.`
143151
143205
  });
143152
143206
  const state = command.type === "delegated_task.completion-delivery.acknowledge" ? "acknowledged" : "disposed";
143153
- const now$30 = yield* now;
143207
+ const now$14 = yield* now;
143154
143208
  const emitEvent = emit(events, command);
143155
143209
  if (task.completionDelivery?.state === state || command.type === "delegated_task.completion-delivery.acknowledge" && task.completionDelivery?.state === "disposed") {
143156
143210
  yield* emitEvent({
@@ -143160,7 +143214,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143160
143214
  nodeId: task.id,
143161
143215
  driver: task.driver,
143162
143216
  providerInstanceId: task.providerInstanceId,
143163
- occurredAt: now$30,
143217
+ occurredAt: now$14,
143164
143218
  payload: task
143165
143219
  });
143166
143220
  return;
@@ -143171,7 +143225,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143171
143225
  state,
143172
143226
  observedByRunId: command.type === "delegated_task.completion-delivery.acknowledge" ? command.observedByRunId : null
143173
143227
  },
143174
- updatedAt: now$30
143228
+ updatedAt: now$14
143175
143229
  };
143176
143230
  yield* emitEvent({
143177
143231
  type: "subagent.updated",
@@ -143180,7 +143234,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143180
143234
  nodeId: task.id,
143181
143235
  driver: task.driver,
143182
143236
  providerInstanceId: task.providerInstanceId,
143183
- occurredAt: now$30,
143237
+ occurredAt: now$14,
143184
143238
  payload: updatedTask
143185
143239
  });
143186
143240
  const parentRun = task.runId === null ? void 0 : projection.runs.find((candidate) => candidate.id === task.runId);
@@ -143215,7 +143269,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143215
143269
  runId: parentRun.id,
143216
143270
  ...parentRun.rootNodeId === null ? {} : { nodeId: parentRun.rootNodeId },
143217
143271
  providerInstanceId: parentRun.providerInstanceId,
143218
- occurredAt: now$30,
143272
+ occurredAt: now$14,
143219
143273
  payload: {
143220
143274
  ...parentRun,
143221
143275
  delegatedCompletion: updatedCohort
@@ -143228,7 +143282,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143228
143282
  events,
143229
143283
  projection,
143230
143284
  run: deliveryRun,
143231
- now: now$30
143285
+ now: now$14
143232
143286
  });
143233
143287
  return parentRun.id;
143234
143288
  }
@@ -143239,7 +143293,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143239
143293
  runId: deliveryRun.id,
143240
143294
  ...deliveryRun.rootNodeId === null ? {} : { nodeId: deliveryRun.rootNodeId },
143241
143295
  providerInstanceId: deliveryRun.providerInstanceId,
143242
- occurredAt: now$30,
143296
+ occurredAt: now$14,
143243
143297
  payload: {
143244
143298
  ...message,
143245
143299
  text: delegatedCompletionWakeDetail(remainingTaskIds),
@@ -143248,7 +143302,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143248
143302
  generation: delivery.generation,
143249
143303
  taskIds: remainingTaskIds
143250
143304
  },
143251
- updatedAt: now$30
143305
+ updatedAt: now$14
143252
143306
  }
143253
143307
  });
143254
143308
  }
@@ -143337,7 +143391,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143337
143391
  commandType: command.type,
143338
143392
  cause: `Parent thread ${parentThread.id} is deleted or belongs to another project.`
143339
143393
  });
143340
- const now$15 = yield* now;
143394
+ const now$45 = yield* now;
143341
143395
  const emitEvent = emit(events, command);
143342
143396
  const thread = {
143343
143397
  createdBy: command.createdBy,
@@ -143362,8 +143416,8 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143362
143416
  rootThreadId: parentThread?.lineage.rootThreadId ?? command.threadId
143363
143417
  },
143364
143418
  forkedFrom: null,
143365
- createdAt: now$15,
143366
- updatedAt: now$15,
143419
+ createdAt: now$45,
143420
+ updatedAt: now$45,
143367
143421
  archivedAt: null,
143368
143422
  settledOverride: null,
143369
143423
  settledAt: null,
@@ -143376,7 +143430,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143376
143430
  type: "thread.created",
143377
143431
  threadId: command.threadId,
143378
143432
  providerInstanceId: command.modelSelection.instanceId,
143379
- occurredAt: now$15,
143433
+ occurredAt: now$45,
143380
143434
  payload: thread
143381
143435
  });
143382
143436
  if (command.importedNativeThread !== void 0) yield* emitEvent({
@@ -143384,7 +143438,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143384
143438
  threadId: command.threadId,
143385
143439
  driver: command.importedNativeThread.ref.driver,
143386
143440
  providerInstanceId: command.modelSelection.instanceId,
143387
- occurredAt: now$15,
143441
+ occurredAt: now$45,
143388
143442
  payload: {
143389
143443
  id: idAllocator.derive.providerThread({
143390
143444
  driver: command.importedNativeThread.ref.driver,
@@ -143405,8 +143459,8 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143405
143459
  forkedFrom: null,
143406
143460
  contextUsage: null,
143407
143461
  nativeMetadata: command.importedNativeThread.metadata ?? null,
143408
- createdAt: now$15,
143409
- updatedAt: now$15
143462
+ createdAt: now$45,
143463
+ updatedAt: now$45
143410
143464
  }
143411
143465
  });
143412
143466
  });
@@ -143548,6 +143602,28 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143548
143602
  commandType: command.type,
143549
143603
  cause: `Thread ${command.threadId} is archived.`
143550
143604
  });
143605
+ if (command.type === "thread.metadata.update" && command.sweep !== void 0) {
143606
+ if (thread.archivedAt !== null) return yield* new OrchestratorDispatchError({
143607
+ commandId: command.commandId,
143608
+ commandType: command.type,
143609
+ cause: `Thread ${command.threadId} is archived.`
143610
+ });
143611
+ if (command.sweep.action === "start" && thread.sweep?.status === "running") return yield* new OrchestratorDispatchError({
143612
+ commandId: command.commandId,
143613
+ commandType: command.type,
143614
+ cause: `Thread ${command.threadId} already has a running sweep. Update it instead.`
143615
+ });
143616
+ if (command.sweep.action !== "start" && thread.sweep == null) return yield* new OrchestratorDispatchError({
143617
+ commandId: command.commandId,
143618
+ commandType: command.type,
143619
+ cause: `Thread ${command.threadId} has no sweep. Start one first.`
143620
+ });
143621
+ if (command.sweep.action === "reopen" && thread.sweep?.status === "running") return yield* new OrchestratorDispatchError({
143622
+ commandId: command.commandId,
143623
+ commandType: command.type,
143624
+ cause: `Thread ${command.threadId} already has a running sweep.`
143625
+ });
143626
+ }
143551
143627
  if (command.type === "thread.pin.reorder" && thread.pinnedAt == null) return yield* new OrchestratorDispatchError({
143552
143628
  commandId: command.commandId,
143553
143629
  commandType: command.type,
@@ -143582,7 +143658,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143582
143658
  targetModelSelection: command.modelSelection
143583
143659
  }).pipe(mapDispatchError(command));
143584
143660
  }) : null;
143585
- const now$31 = yield* now;
143661
+ const now$18 = yield* now;
143586
143662
  if (command.type === "thread.metadata.update" && command.limitRecovery != null) {
143587
143663
  const projection = yield* loadProjectionForCommand(command, [
143588
143664
  "runs",
@@ -143592,7 +143668,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143592
143668
  const run = usageLimitBlockedRun(projection.runs, projection.turnItems, null);
143593
143669
  const failure = latestRootProviderFailure(run, projection.turnItems);
143594
143670
  const resetMs = Date.parse(command.limitRecovery.resetAt);
143595
- if (command.limitRecovery.snooze === true && resetMs <= toEpochMillis(now$31)) return yield* new OrchestratorDispatchError({
143671
+ if (command.limitRecovery.snooze === true && resetMs <= toEpochMillis(now$18)) return yield* new OrchestratorDispatchError({
143596
143672
  commandId: command.commandId,
143597
143673
  commandType: command.type,
143598
143674
  cause: "The reset time has passed. Retry the thread manually."
@@ -143607,7 +143683,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143607
143683
  if (command.type === "thread.snooze") {
143608
143684
  const projection = yield* loadProjectionForCommand(command, ["runs", "runtimeRequests"], { turnItemTypes: [] });
143609
143685
  const parsedSnoozedUntil = make$76(command.snoozedUntil);
143610
- if (isNone(parsedSnoozedUntil) || toEpochMillis(parsedSnoozedUntil.value) <= toEpochMillis(now$31)) return yield* new OrchestratorDispatchError({
143686
+ if (isNone(parsedSnoozedUntil) || toEpochMillis(parsedSnoozedUntil.value) <= toEpochMillis(now$18)) return yield* new OrchestratorDispatchError({
143611
143687
  commandId: command.commandId,
143612
143688
  commandType: command.type,
143613
143689
  cause: `Thread ${command.threadId} snooze wake time ${command.snoozedUntil} is not in the future.`
@@ -143651,15 +143727,15 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143651
143727
  switch (command.type) {
143652
143728
  case "thread.archive": return {
143653
143729
  ...thread,
143654
- archivedAt: now$31,
143730
+ archivedAt: now$18,
143655
143731
  titleRegeneration: null,
143656
143732
  pullRequests: thread.pullRequests?.map((link) => withPullRequestWatch(link, void 0)),
143657
- updatedAt: now$31
143733
+ updatedAt: now$18
143658
143734
  };
143659
143735
  case "thread.unarchive": return {
143660
143736
  ...thread,
143661
143737
  archivedAt: null,
143662
- updatedAt: now$31
143738
+ updatedAt: now$18
143663
143739
  };
143664
143740
  case "thread.snooze": {
143665
143741
  const existingSnoozedAt = thread.snoozedUntil != null && snoozedUntil !== null && toEpochMillis(thread.snoozedUntil) === toEpochMillis(snoozedUntil) ? thread.snoozedAt ?? null : null;
@@ -143670,8 +143746,8 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143670
143746
  ...thread.limitRecovery,
143671
143747
  snooze: false
143672
143748
  } : null,
143673
- snoozedAt: existingSnoozedAt ?? now$31,
143674
- updatedAt: existingSnoozedAt === null ? now$31 : thread.updatedAt
143749
+ snoozedAt: existingSnoozedAt ?? now$18,
143750
+ updatedAt: existingSnoozedAt === null ? now$18 : thread.updatedAt
143675
143751
  };
143676
143752
  }
143677
143753
  case "thread.unsnooze": {
@@ -143680,8 +143756,8 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143680
143756
  ...thread,
143681
143757
  snoozedUntil: null,
143682
143758
  snoozedAt: null,
143683
- lastSnoozeWakeAt: alreadyAwake ? thread.lastSnoozeWakeAt : now$31,
143684
- updatedAt: alreadyAwake ? thread.updatedAt : now$31
143759
+ lastSnoozeWakeAt: alreadyAwake ? thread.lastSnoozeWakeAt : now$18,
143760
+ updatedAt: alreadyAwake ? thread.updatedAt : now$18
143685
143761
  };
143686
143762
  }
143687
143763
  case "thread.pin": {
@@ -143689,12 +143765,12 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143689
143765
  const promotes = thread.snoozedUntil != null;
143690
143766
  return {
143691
143767
  ...thread,
143692
- pinnedAt: alreadyPinned ? thread.pinnedAt : now$31,
143768
+ pinnedAt: alreadyPinned ? thread.pinnedAt : now$18,
143693
143769
  ...alreadyPinned || command.orderKey === void 0 ? {} : { pinOrderKey: command.orderKey },
143694
143770
  snoozedUntil: null,
143695
143771
  snoozedAt: null,
143696
- lastSnoozeWakeAt: thread.snoozedUntil == null ? thread.lastSnoozeWakeAt : now$31,
143697
- updatedAt: alreadyPinned && !promotes ? thread.updatedAt : now$31
143772
+ lastSnoozeWakeAt: thread.snoozedUntil == null ? thread.lastSnoozeWakeAt : now$18,
143773
+ updatedAt: alreadyPinned && !promotes ? thread.updatedAt : now$18
143698
143774
  };
143699
143775
  }
143700
143776
  case "thread.unpin": {
@@ -143703,7 +143779,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143703
143779
  ...thread,
143704
143780
  pinnedAt: null,
143705
143781
  pinOrderKey: null,
143706
- updatedAt: alreadyUnpinned ? thread.updatedAt : now$31
143782
+ updatedAt: alreadyUnpinned ? thread.updatedAt : now$18
143707
143783
  };
143708
143784
  }
143709
143785
  case "thread.pin.reorder": {
@@ -143711,7 +143787,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143711
143787
  return {
143712
143788
  ...thread,
143713
143789
  pinOrderKey: command.orderKey,
143714
- updatedAt: keyUnchanged ? thread.updatedAt : now$31
143790
+ updatedAt: keyUnchanged ? thread.updatedAt : now$18
143715
143791
  };
143716
143792
  }
143717
143793
  case "thread.active.reorder": return {
@@ -143720,7 +143796,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143720
143796
  updatedAt: thread.updatedAt
143721
143797
  };
143722
143798
  case "thread.mark-unread": {
143723
- const snoozeExpired = thread.snoozedUntil != null && toEpochMillis(thread.snoozedUntil) <= toEpochMillis(now$31);
143799
+ const snoozeExpired = thread.snoozedUntil != null && toEpochMillis(thread.snoozedUntil) <= toEpochMillis(now$18);
143724
143800
  return {
143725
143801
  ...thread,
143726
143802
  lastVisitedAt: markUnreadVisitedAt,
@@ -143744,23 +143820,24 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143744
143820
  ...command.title === void 0 ? {} : { title: command.title },
143745
143821
  ...command.sideChat === void 0 ? {} : { sideChat: command.sideChat },
143746
143822
  ...command.limitRecovery === void 0 ? {} : { limitRecovery },
143747
- ...command.limitRecovery !== void 0 && limitRecovery?.snooze === true && Date.parse(limitRecovery.resetAt) > toEpochMillis(now$31) ? {
143823
+ ...command.limitRecovery !== void 0 && limitRecovery?.snooze === true && Date.parse(limitRecovery.resetAt) > toEpochMillis(now$18) ? {
143748
143824
  snoozedUntil: makeUnsafe$8(limitRecovery.resetAt),
143749
- snoozedAt: now$31
143825
+ snoozedAt: now$18
143750
143826
  } : command.limitRecovery !== void 0 && thread.limitRecovery?.snooze && thread.snoozedUntil != null && toEpochMillis(thread.snoozedUntil) === Date.parse(thread.limitRecovery.resetAt) ? {
143751
143827
  snoozedUntil: null,
143752
143828
  snoozedAt: null,
143753
- lastSnoozeWakeAt: now$31
143829
+ lastSnoozeWakeAt: now$18
143754
143830
  } : {},
143831
+ ...command.sweep === void 0 ? {} : { sweep: applySweepChange(thread.sweep, command.sweep, formatIso(now$18)) },
143755
143832
  ...command.branch === void 0 ? {} : { branch: command.branch },
143756
143833
  ...command.worktreePath === void 0 ? {} : { worktreePath: command.worktreePath },
143757
143834
  ...command.linkedPullRequest === void 0 ? {} : {
143758
143835
  linkedPullRequest: command.linkedPullRequest,
143759
- pullRequests: [...threadPullRequestsOf(thread).filter((link) => !(thread.linkedPullRequest && threadPullRequestKeysEqual(link, legacyThreadPullRequestKey(thread.linkedPullRequest))) && !(command.linkedPullRequest && threadPullRequestKeysEqual(link, legacyThreadPullRequestKey(command.linkedPullRequest)))), ...command.linkedPullRequest ? [legacyPullRequestLink(thread, command.linkedPullRequest, now$31)] : []]
143836
+ pullRequests: [...threadPullRequestsOf(thread).filter((link) => !(thread.linkedPullRequest && threadPullRequestKeysEqual(link, legacyThreadPullRequestKey(thread.linkedPullRequest))) && !(command.linkedPullRequest && threadPullRequestKeysEqual(link, legacyThreadPullRequestKey(command.linkedPullRequest)))), ...command.linkedPullRequest ? [legacyPullRequestLink(thread, command.linkedPullRequest, now$18)] : []]
143760
143837
  },
143761
143838
  ...command.regenerateTitle === true ? { titleRegeneration: {
143762
143839
  requestId: command.commandId,
143763
- startedAt: now$31
143840
+ startedAt: now$18
143764
143841
  } } : command.regenerateTitle === false || command.title !== void 0 ? { titleRegeneration: null } : {},
143765
143842
  ...movingProject ? {
143766
143843
  projectId: command.projectId,
@@ -143772,7 +143849,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143772
143849
  pullRequests: [],
143773
143850
  limitRecovery: null
143774
143851
  } : {},
143775
- updatedAt: now$31
143852
+ updatedAt: now$18
143776
143853
  };
143777
143854
  }
143778
143855
  case "thread.design.link":
@@ -143784,7 +143861,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143784
143861
  return {
143785
143862
  ...thread,
143786
143863
  designs: links.filter((link) => link !== existing),
143787
- updatedAt: now$31
143864
+ updatedAt: now$18
143788
143865
  };
143789
143866
  }
143790
143867
  if (existing && (existing.source === "manual" || command.source === "agent")) return thread;
@@ -143796,9 +143873,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143796
143873
  } : link) : [...links, {
143797
143874
  path: command.path,
143798
143875
  source: command.source,
143799
- linkedAt: formatIso(now$31)
143876
+ linkedAt: formatIso(now$18)
143800
143877
  }],
143801
- updatedAt: now$31
143878
+ updatedAt: now$18
143802
143879
  };
143803
143880
  }
143804
143881
  case "thread.pull-request.link":
@@ -143819,7 +143896,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143819
143896
  ...key,
143820
143897
  url: command.url,
143821
143898
  source: command.source,
143822
- linkedAt: formatIso(now$31),
143899
+ linkedAt: formatIso(now$18),
143823
143900
  snapshot: null,
143824
143901
  stack: null
143825
143902
  };
@@ -143830,7 +143907,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143830
143907
  ...branchKey,
143831
143908
  url: branch.url,
143832
143909
  source: "manual",
143833
- linkedAt: formatIso(now$31),
143910
+ linkedAt: formatIso(now$18),
143834
143911
  snapshot: null,
143835
143912
  stack: null
143836
143913
  }] : [],
@@ -143855,13 +143932,13 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143855
143932
  ...thread,
143856
143933
  pullRequests,
143857
143934
  linkedPullRequest: thread.linkedPullRequest && pullRequests.some((link) => link.source !== "stack-dismissed" && threadPullRequestKeysEqual(link, legacyThreadPullRequestKey(thread.linkedPullRequest))) ? thread.linkedPullRequest : null,
143858
- updatedAt: command.type === "thread.pull-request-link.sync" ? thread.updatedAt : now$31
143935
+ updatedAt: command.type === "thread.pull-request-link.sync" ? thread.updatedAt : now$18
143859
143936
  };
143860
143937
  }
143861
143938
  case "thread.pull-request.watch":
143862
143939
  case "thread.pull-request-watch.sync": {
143863
143940
  const key = normalizeThreadPullRequestKey(command);
143864
- const startedAt = formatIso(now$31);
143941
+ const startedAt = formatIso(now$18);
143865
143942
  const linked = threadPullRequestsOf(thread);
143866
143943
  const visible = (link) => link.source !== "stack-dismissed" && threadPullRequestKeysEqual(link, key);
143867
143944
  const links = command.type === "thread.pull-request.watch" && command.watching && command.link !== void 0 && !linked.some(visible) ? [...linked.filter((link) => !threadPullRequestKeysEqual(link, key)), {
@@ -143889,7 +143966,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143889
143966
  return {
143890
143967
  ...thread,
143891
143968
  pullRequests: links.map((link) => link === existing ? withPullRequestWatch(link, watch) : link),
143892
- updatedAt: command.type === "thread.pull-request.watch" ? now$31 : thread.updatedAt
143969
+ updatedAt: command.type === "thread.pull-request.watch" ? now$18 : thread.updatedAt
143893
143970
  };
143894
143971
  }
143895
143972
  case "thread.pull-request.sync": return {
@@ -143897,7 +143974,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143897
143974
  branchPullRequest: command.branchPullRequest,
143898
143975
  ...command.linkedPullRequest === void 0 ? {} : {
143899
143976
  linkedPullRequest: command.linkedPullRequest,
143900
- pullRequests: [...threadPullRequestsOf(thread).filter((link) => !(thread.linkedPullRequest && threadPullRequestKeysEqual(link, legacyThreadPullRequestKey(thread.linkedPullRequest))) && !(command.linkedPullRequest && threadPullRequestKeysEqual(link, legacyThreadPullRequestKey(command.linkedPullRequest)))), ...command.linkedPullRequest ? [legacyPullRequestLink(thread, command.linkedPullRequest, now$31)] : []]
143977
+ pullRequests: [...threadPullRequestsOf(thread).filter((link) => !(thread.linkedPullRequest && threadPullRequestKeysEqual(link, legacyThreadPullRequestKey(thread.linkedPullRequest))) && !(command.linkedPullRequest && threadPullRequestKeysEqual(link, legacyThreadPullRequestKey(command.linkedPullRequest)))), ...command.linkedPullRequest ? [legacyPullRequestLink(thread, command.linkedPullRequest, now$18)] : []]
143901
143978
  },
143902
143979
  updatedAt: thread.updatedAt
143903
143980
  };
@@ -143905,24 +143982,24 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143905
143982
  ...thread,
143906
143983
  ...command.title === void 0 ? {} : { title: command.title },
143907
143984
  titleRegeneration: null,
143908
- updatedAt: now$31
143985
+ updatedAt: now$18
143909
143986
  } : thread;
143910
143987
  case "thread.runtime-mode.set": return {
143911
143988
  ...thread,
143912
143989
  runtimeMode: command.runtimeMode,
143913
- updatedAt: now$31
143990
+ updatedAt: now$18
143914
143991
  };
143915
143992
  case "thread.interaction-mode.set": return {
143916
143993
  ...thread,
143917
143994
  interactionMode: command.interactionMode,
143918
- updatedAt: now$31
143995
+ updatedAt: now$18
143919
143996
  };
143920
143997
  case "thread.model-selection.set":
143921
143998
  case "provider.switch": return {
143922
143999
  ...thread,
143923
144000
  providerInstanceId: command.modelSelection.instanceId,
143924
144001
  modelSelection: command.modelSelection,
143925
- updatedAt: now$31
144002
+ updatedAt: now$18
143926
144003
  };
143927
144004
  }
143928
144005
  })();
@@ -143934,7 +144011,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143934
144011
  type: "thread.pull-request-link-updated",
143935
144012
  threadId: command.threadId,
143936
144013
  providerInstanceId: updatedThread.providerInstanceId,
143937
- occurredAt: now$31,
144014
+ occurredAt: now$18,
143938
144015
  payload: link
143939
144016
  });
143940
144017
  return;
@@ -143969,7 +144046,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143969
144046
  type: eventType,
143970
144047
  threadId: command.threadId,
143971
144048
  providerInstanceId: updatedThread.providerInstanceId,
143972
- occurredAt: now$31,
144049
+ occurredAt: now$18,
143973
144050
  payload: updatedThread
143974
144051
  });
143975
144052
  if (command.type === "thread.metadata.update" && command.regenerateTitle === true) yield* update$4(effects, (existing) => [...existing, pendingThreadTitleGenerationEffect(command.commandId, command.threadId, { type: "regenerate" })]);
@@ -143996,12 +144073,12 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
143996
144073
  threadId: command.threadId,
143997
144074
  runId: run.id,
143998
144075
  providerInstanceId: run.providerInstanceId,
143999
- occurredAt: now$31,
144076
+ occurredAt: now$18,
144000
144077
  payload: {
144001
144078
  ...run,
144002
144079
  status: "cancelled",
144003
144080
  queuePosition: null,
144004
- completedAt: now$31
144081
+ completedAt: now$18
144005
144082
  }
144006
144083
  });
144007
144084
  for (const run of preparingRuns) {
@@ -144013,13 +144090,13 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144013
144090
  runId: run.id,
144014
144091
  nodeId: preparationItem.nodeId ?? void 0,
144015
144092
  providerInstanceId: run.providerInstanceId,
144016
- occurredAt: now$31,
144093
+ occurredAt: now$18,
144017
144094
  payload: {
144018
144095
  ...preparationItem,
144019
144096
  status: "cancelled",
144020
144097
  title: "Workspace preparation cancelled",
144021
- completedAt: now$31,
144022
- updatedAt: now$31
144098
+ completedAt: now$18,
144099
+ updatedAt: now$18
144023
144100
  }
144024
144101
  });
144025
144102
  }
@@ -144031,11 +144108,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144031
144108
  runId: attempt.runId,
144032
144109
  nodeId: attempt.rootNodeId,
144033
144110
  providerInstanceId: run.providerInstanceId,
144034
- occurredAt: now$31,
144111
+ occurredAt: now$18,
144035
144112
  payload: {
144036
144113
  ...attempt,
144037
144114
  status: "cancelled",
144038
- completedAt: now$31
144115
+ completedAt: now$18
144039
144116
  }
144040
144117
  });
144041
144118
  }
@@ -144051,11 +144128,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144051
144128
  runId: run.id,
144052
144129
  nodeId: node.id,
144053
144130
  providerInstanceId: run.providerInstanceId,
144054
- occurredAt: now$31,
144131
+ occurredAt: now$18,
144055
144132
  payload: {
144056
144133
  ...node,
144057
144134
  status: "cancelled",
144058
- completedAt: now$31
144135
+ completedAt: now$18
144059
144136
  }
144060
144137
  });
144061
144138
  }
@@ -144063,14 +144140,14 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144063
144140
  command,
144064
144141
  events,
144065
144142
  projection: yield* getProjectionWithPendingEvents(command.threadId, events),
144066
- now: now$31,
144143
+ now: now$18,
144067
144144
  cancelQueuedDelivery: false
144068
144145
  });
144069
144146
  yield* closePendingLinkRequests({
144070
144147
  command,
144071
144148
  events,
144072
144149
  threadId: command.threadId,
144073
- now: now$31
144150
+ now: now$18
144074
144151
  });
144075
144152
  }
144076
144153
  const detachSessionIds = new Set(command.type === "thread.archive" ? (providerContext?.providerSessions ?? []).map((session) => session.id) : movingProject || command.type === "thread.metadata.update" && command.worktreePath !== void 0 && command.worktreePath !== thread.worktreePath ? (providerContext?.providerSessions ?? []).map((session) => session.id) : command.type === "thread.runtime-mode.set" ? (providerContext?.providerSessions ?? []).filter((session) => !session.capabilities.sessions.supportsRuntimeModeSwitchInSession).map((session) => session.id) : providerSwitchPlan?.releaseProviderSessionIds ?? []);
@@ -144082,10 +144159,10 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144082
144159
  threadId: command.threadId,
144083
144160
  driver: session.driver,
144084
144161
  providerInstanceId: session.providerInstanceId,
144085
- occurredAt: now$31,
144162
+ occurredAt: now$18,
144086
144163
  payload: {
144087
144164
  providerSessionId: session.id,
144088
- detachedAt: now$31,
144165
+ detachedAt: now$18,
144089
144166
  reason: command.type === "thread.archive" ? "Thread archived." : command.type === "thread.metadata.update" ? "Workspace changed." : command.type === "thread.runtime-mode.set" ? "Runtime mode changed." : "Provider or model selection changed."
144090
144167
  }
144091
144168
  });
@@ -144123,16 +144200,16 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144123
144200
  commandType: command.type,
144124
144201
  cause: `Provider session ${command.providerSessionId} does not belong to thread ${command.threadId}.`
144125
144202
  });
144126
- const now$36 = yield* now;
144203
+ const now$23 = yield* now;
144127
144204
  yield* emit(events, command)({
144128
144205
  type: "provider-session.detached",
144129
144206
  threadId: command.threadId,
144130
144207
  driver: session.driver,
144131
144208
  providerInstanceId: session.providerInstanceId,
144132
- occurredAt: now$36,
144209
+ occurredAt: now$23,
144133
144210
  payload: {
144134
144211
  providerSessionId: session.id,
144135
- detachedAt: now$36,
144212
+ detachedAt: now$23,
144136
144213
  ...command.reason === void 0 ? {} : { reason: command.reason }
144137
144214
  }
144138
144215
  });
@@ -144165,17 +144242,17 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144165
144242
  const target = yield* projects.get(command.projectId).pipe(mapDispatchError(command));
144166
144243
  if (isNone(target) || target.value.deletedAt !== null) return yield* reject(`cannot move to missing project ${command.projectId}.`);
144167
144244
  if ((thread.worktreePath ?? getOrUndefined$1(current)?.workspaceRoot) !== target.value.workspaceRoot) return yield* reject(`does not work in ${target.value.workspaceRoot}.`);
144168
- const now$22 = yield* now;
144245
+ const now$10 = yield* now;
144169
144246
  yield* emit(events, command)({
144170
144247
  type: "thread.metadata-updated",
144171
144248
  threadId: command.threadId,
144172
144249
  providerInstanceId: thread.providerInstanceId,
144173
- occurredAt: now$22,
144250
+ occurredAt: now$10,
144174
144251
  payload: {
144175
144252
  ...thread,
144176
144253
  projectId: command.projectId,
144177
144254
  worktreePath: null,
144178
- updatedAt: now$22
144255
+ updatedAt: now$10
144179
144256
  }
144180
144257
  });
144181
144258
  });
@@ -144227,7 +144304,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144227
144304
  cause: forkableSourceRunStatusError(sourceRun)
144228
144305
  });
144229
144306
  const sourceProviderThread = providerThreadForRun(sourceProjection, sourceRun);
144230
- const now$25 = command.createdAt ?? (yield* now);
144307
+ const now$13 = command.createdAt ?? (yield* now);
144231
144308
  const emitEvent = emit(events, command);
144232
144309
  const transferId = yield* mapDispatchError(command)(idAllocator.allocate.contextTransfer({
144233
144310
  sourceThreadId: sourceProjection.thread.id,
@@ -144246,20 +144323,20 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144246
144323
  ...command.runtimeMode === void 0 ? {} : { runtimeMode: command.runtimeMode },
144247
144324
  createdBy: command.createdBy,
144248
144325
  creationSource: command.creationSource,
144249
- createdAt: now$25
144326
+ createdAt: now$13
144250
144327
  }).pipe(mapDispatchError(command));
144251
144328
  yield* emitEvent({
144252
144329
  type: "thread.created",
144253
144330
  threadId: command.targetThreadId,
144254
144331
  providerInstanceId: targetThread.providerInstanceId,
144255
- occurredAt: now$25,
144332
+ occurredAt: now$13,
144256
144333
  payload: targetThread
144257
144334
  });
144258
144335
  yield* emitEvent({
144259
144336
  type: "context-transfer.created",
144260
144337
  threadId: command.targetThreadId,
144261
144338
  providerInstanceId: sourceRun.providerInstanceId,
144262
- occurredAt: now$25,
144339
+ occurredAt: now$13,
144263
144340
  payload: transfer
144264
144341
  });
144265
144342
  });
@@ -144315,7 +144392,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144315
144392
  cause: "Finish or stop the target thread's active work and clear its queue before merging back."
144316
144393
  });
144317
144394
  const sourceProviderThread = providerThreadForRun(sourceProjection, sourceRun);
144318
- const now$35 = command.createdAt ?? (yield* now);
144395
+ const now$22 = command.createdAt ?? (yield* now);
144319
144396
  const emitEvent = emit(events, command);
144320
144397
  const transferId = yield* mapDispatchError(command)(idAllocator.allocate.contextTransfer({
144321
144398
  sourceThreadId: command.sourceThreadId,
@@ -144337,27 +144414,27 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144337
144414
  resolution: null,
144338
144415
  createdBy: command.createdBy,
144339
144416
  error: sourceProviderThread === void 0 ? "Source merge-back run has no provider thread." : null,
144340
- createdAt: now$35,
144341
- updatedAt: now$35,
144417
+ createdAt: now$22,
144418
+ updatedAt: now$22,
144342
144419
  consumedAt: null
144343
144420
  };
144344
144421
  for (const pendingTransfer of pendingMergeBackTransfersForPair) yield* emitEvent({
144345
144422
  type: "context-transfer.updated",
144346
144423
  threadId: command.targetThreadId,
144347
144424
  providerInstanceId: sourceRun.providerInstanceId,
144348
- occurredAt: now$35,
144425
+ occurredAt: now$22,
144349
144426
  payload: {
144350
144427
  ...pendingTransfer,
144351
144428
  status: "superseded",
144352
144429
  error: `Superseded by merge-back transfer ${transferId}.`,
144353
- updatedAt: now$35
144430
+ updatedAt: now$22
144354
144431
  }
144355
144432
  });
144356
144433
  yield* emitEvent({
144357
144434
  type: "context-transfer.created",
144358
144435
  threadId: command.targetThreadId,
144359
144436
  providerInstanceId: sourceRun.providerInstanceId,
144360
- occurredAt: now$35,
144437
+ occurredAt: now$22,
144361
144438
  payload: transfer
144362
144439
  });
144363
144440
  });
@@ -144419,7 +144496,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144419
144496
  cause: `Provider session ${providerThread.providerSessionId} is not active.`
144420
144497
  });
144421
144498
  const session = sessionOption.value;
144422
- const now$39 = yield* now;
144499
+ const now$26 = yield* now;
144423
144500
  const emitEvent = emit(input.events, input.command);
144424
144501
  const selectionChanged = !modelSelectionsEqual(targetRun.modelSelection, input.modelSelection);
144425
144502
  const providerInstanceChanged = targetRun.providerInstanceId !== input.modelSelection.instanceId;
@@ -144453,8 +144530,8 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144453
144530
  attachments: input.attachments,
144454
144531
  ...input.context ? { context: input.context } : {},
144455
144532
  streaming: false,
144456
- createdAt: now$39,
144457
- updatedAt: now$39
144533
+ createdAt: now$26,
144534
+ updatedAt: now$26
144458
144535
  };
144459
144536
  const turnItem = {
144460
144537
  createdBy: input.createdBy,
@@ -144472,9 +144549,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144472
144549
  ordinal: yield* nextTurnItemOrdinal(input.projection),
144473
144550
  status: "completed",
144474
144551
  title: null,
144475
- startedAt: now$39,
144476
- completedAt: now$39,
144477
- updatedAt: now$39,
144552
+ startedAt: now$26,
144553
+ completedAt: now$26,
144554
+ updatedAt: now$26,
144478
144555
  type: "user_message",
144479
144556
  messageId: input.messageId,
144480
144557
  inputIntent: input.command.type === "queued-message.promote-to-steer" ? "promoted_queued_to_steer" : "steer",
@@ -144488,7 +144565,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144488
144565
  runId: messageInput.runId,
144489
144566
  nodeId: messageInput.nodeId,
144490
144567
  providerInstanceId: messageInput.providerInstanceId,
144491
- occurredAt: now$39,
144568
+ occurredAt: now$26,
144492
144569
  payload: message
144493
144570
  });
144494
144571
  yield* emitEvent({
@@ -144497,7 +144574,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144497
144574
  runId: messageInput.runId,
144498
144575
  nodeId: messageInput.nodeId,
144499
144576
  providerInstanceId: messageInput.providerInstanceId,
144500
- occurredAt: now$39,
144577
+ occurredAt: now$26,
144501
144578
  payload: notificationTurnItem(turnItem, message, input.projection.subagents)
144502
144579
  });
144503
144580
  });
@@ -144515,12 +144592,12 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144515
144592
  type: instanceChanged ? "thread.provider-switched" : "thread.model-selection-updated",
144516
144593
  threadId: input.command.threadId,
144517
144594
  providerInstanceId: input.modelSelection.instanceId,
144518
- occurredAt: now$39,
144595
+ occurredAt: now$26,
144519
144596
  payload: {
144520
144597
  ...input.projection.thread,
144521
144598
  providerInstanceId: input.modelSelection.instanceId,
144522
144599
  modelSelection: input.modelSelection,
144523
- updatedAt: now$39
144600
+ updatedAt: now$26
144524
144601
  }
144525
144602
  });
144526
144603
  yield* appendSteeringMessage({
@@ -144612,13 +144689,13 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144612
144689
  lastRunOrdinal: targetRun.ordinal,
144613
144690
  handoffIds: [],
144614
144691
  forkedFrom: null,
144615
- createdAt: now$39,
144616
- updatedAt: now$39
144692
+ createdAt: now$26,
144693
+ updatedAt: now$26
144617
144694
  } : {
144618
144695
  ...existingTargetProviderThread,
144619
144696
  providerSessionId: targetProviderSessionId,
144620
144697
  lastRunOrdinal: targetRun.ordinal,
144621
- updatedAt: now$39
144698
+ updatedAt: now$26
144622
144699
  };
144623
144700
  const transferId = yield* mapDispatchError(input.command)(idAllocator.allocate.contextTransfer({
144624
144701
  sourceThreadId: input.command.threadId,
@@ -144640,7 +144717,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144640
144717
  strategy: "full_thread_summary",
144641
144718
  items: yield* readHandoffItems(input.command.threadId),
144642
144719
  runs: input.projection.runs,
144643
- createdAt: now$39
144720
+ createdAt: now$26
144644
144721
  }).pipe(mapDispatchError(input.command));
144645
144722
  restartProviderThread = {
144646
144723
  ...targetProviderThreadBase,
@@ -144663,9 +144740,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144663
144740
  },
144664
144741
  createdBy: input.createdBy,
144665
144742
  error: null,
144666
- createdAt: now$39,
144667
- updatedAt: now$39,
144668
- consumedAt: now$39
144743
+ createdAt: now$26,
144744
+ updatedAt: now$26,
144745
+ consumedAt: now$26
144669
144746
  };
144670
144747
  restartSessionTransition = { type: "detach" };
144671
144748
  } else if (requiresProviderSessionRestart) {
@@ -144678,7 +144755,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144678
144755
  providerInstanceId: input.modelSelection.instanceId,
144679
144756
  providerSessionId: nextProviderSessionId,
144680
144757
  status: "not_loaded",
144681
- updatedAt: now$39
144758
+ updatedAt: now$26
144682
144759
  };
144683
144760
  restartSessionTransition = {
144684
144761
  type: "replace",
@@ -144699,7 +144776,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144699
144776
  rootNodeId: nextRootNodeId,
144700
144777
  providerThreadId: restartProviderThread.id,
144701
144778
  cwd: resolvedRuntimePolicy.cwd ?? input.projection.thread.worktreePath ?? session.providerSession.cwd,
144702
- createdAt: now$39
144779
+ createdAt: now$26
144703
144780
  }).pipe(mapError((cause) => new OrchestratorDispatchError({
144704
144781
  commandId: input.command.commandId,
144705
144782
  commandType: input.command.type,
@@ -144757,11 +144834,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144757
144834
  runId: targetRun.id,
144758
144835
  nodeId: rootNodeId,
144759
144836
  providerInstanceId: targetRun.providerInstanceId,
144760
- occurredAt: now$39,
144837
+ occurredAt: now$26,
144761
144838
  payload: {
144762
144839
  ...currentAttempt,
144763
144840
  status: "superseded",
144764
- completedAt: now$39
144841
+ completedAt: now$26
144765
144842
  }
144766
144843
  });
144767
144844
  if (currentRootNode !== void 0) yield* emitEvent({
@@ -144770,23 +144847,23 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144770
144847
  runId: targetRun.id,
144771
144848
  nodeId: rootNodeId,
144772
144849
  providerInstanceId: targetRun.providerInstanceId,
144773
- occurredAt: now$39,
144850
+ occurredAt: now$26,
144774
144851
  payload: {
144775
144852
  ...currentRootNode,
144776
144853
  status: "interrupted",
144777
- completedAt: now$39
144854
+ completedAt: now$26
144778
144855
  }
144779
144856
  });
144780
144857
  if (selectionChanged) yield* emitEvent({
144781
144858
  type: providerInstanceChanged ? "thread.provider-switched" : "thread.model-selection-updated",
144782
144859
  threadId: input.command.threadId,
144783
144860
  providerInstanceId: input.modelSelection.instanceId,
144784
- occurredAt: now$39,
144861
+ occurredAt: now$26,
144785
144862
  payload: {
144786
144863
  ...input.projection.thread,
144787
144864
  providerInstanceId: input.modelSelection.instanceId,
144788
144865
  modelSelection: input.modelSelection,
144789
- updatedAt: now$39
144866
+ updatedAt: now$26
144790
144867
  }
144791
144868
  });
144792
144869
  if (requiresProviderThreadHandoff || requiresProviderSessionRestart) yield* emitEvent({
@@ -144794,7 +144871,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144794
144871
  threadId: input.command.threadId,
144795
144872
  driver: restartProviderThread.driver,
144796
144873
  providerInstanceId: input.modelSelection.instanceId,
144797
- occurredAt: now$39,
144874
+ occurredAt: now$26,
144798
144875
  payload: restartProviderThread
144799
144876
  });
144800
144877
  if (restartHandoff !== null) yield* emitEvent({
@@ -144802,7 +144879,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144802
144879
  threadId: input.command.threadId,
144803
144880
  runId: targetRun.id,
144804
144881
  providerInstanceId: input.modelSelection.instanceId,
144805
- occurredAt: now$39,
144882
+ occurredAt: now$26,
144806
144883
  payload: restartHandoff
144807
144884
  });
144808
144885
  if (restartTransfer !== null) yield* emitEvent({
@@ -144810,7 +144887,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144810
144887
  threadId: input.command.threadId,
144811
144888
  runId: targetRun.id,
144812
144889
  providerInstanceId: input.modelSelection.instanceId,
144813
- occurredAt: now$39,
144890
+ occurredAt: now$26,
144814
144891
  payload: restartTransfer
144815
144892
  });
144816
144893
  yield* emitEvent({
@@ -144819,7 +144896,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144819
144896
  runId: targetRun.id,
144820
144897
  nodeId: nextRootNodeId,
144821
144898
  providerInstanceId: input.modelSelection.instanceId,
144822
- occurredAt: now$39,
144899
+ occurredAt: now$26,
144823
144900
  payload: restartedRun
144824
144901
  });
144825
144902
  yield* emitEvent({
@@ -144828,7 +144905,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144828
144905
  runId: targetRun.id,
144829
144906
  nodeId: nextRootNodeId,
144830
144907
  providerInstanceId: input.modelSelection.instanceId,
144831
- occurredAt: now$39,
144908
+ occurredAt: now$26,
144832
144909
  payload: nextAttempt
144833
144910
  });
144834
144911
  yield* emitEvent({
@@ -144837,7 +144914,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144837
144914
  runId: targetRun.id,
144838
144915
  nodeId: nextRootNodeId,
144839
144916
  providerInstanceId: input.modelSelection.instanceId,
144840
- occurredAt: now$39,
144917
+ occurredAt: now$26,
144841
144918
  payload: nextRootNode
144842
144919
  });
144843
144920
  yield* emitEvent({
@@ -144846,7 +144923,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144846
144923
  runId: targetRun.id,
144847
144924
  nodeId: nextRootNodeId,
144848
144925
  providerInstanceId: input.modelSelection.instanceId,
144849
- occurredAt: now$39,
144926
+ occurredAt: now$26,
144850
144927
  payload: ensuredCheckpointScope
144851
144928
  });
144852
144929
  yield* appendSteeringMessage({
@@ -144892,15 +144969,15 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144892
144969
  const run = usageLimitBlockedRun(projection.runs, projection.turnItems, null);
144893
144970
  const failure = latestRootProviderFailure(run, projection.turnItems);
144894
144971
  const recovery = projection.thread.limitRecovery;
144895
- const now$38 = yield* now;
144896
- if (run?.id !== command.usageLimitContinuationOfRunId || failure?.class !== "usage_limit" || threadShellFromProjection(projection).lastErrorClass !== "usage_limit" || !recovery?.autoResume || recovery.requestId !== command.usageLimitRecoveryRequestId || recovery.runId !== run.id || recovery.resetAt !== failure.resetAt || Date.parse(recovery.resetAt) > toEpochMillis(now$38) || projection.thread.archivedAt !== null || projection.thread.deletedAt !== null || projection.thread.providerInstanceId !== run.providerInstanceId || projection.runtimeRequests.some((request) => request.status === "pending") || projection.thread.snoozedUntil != null && toEpochMillis(projection.thread.snoozedUntil) > toEpochMillis(now$38)) {
144972
+ const now$25 = yield* now;
144973
+ if (run?.id !== command.usageLimitContinuationOfRunId || failure?.class !== "usage_limit" || threadShellFromProjection(projection).lastErrorClass !== "usage_limit" || !recovery?.autoResume || recovery.requestId !== command.usageLimitRecoveryRequestId || recovery.runId !== run.id || recovery.resetAt !== failure.resetAt || Date.parse(recovery.resetAt) > toEpochMillis(now$25) || projection.thread.archivedAt !== null || projection.thread.deletedAt !== null || projection.thread.providerInstanceId !== run.providerInstanceId || projection.runtimeRequests.some((request) => request.status === "pending") || projection.thread.snoozedUntil != null && toEpochMillis(projection.thread.snoozedUntil) > toEpochMillis(now$25)) {
144897
144974
  yield* emit(events, command)({
144898
144975
  type: "thread.metadata-updated",
144899
144976
  threadId: command.threadId,
144900
- occurredAt: now$38,
144977
+ occurredAt: now$25,
144901
144978
  payload: {
144902
144979
  ...projection.thread,
144903
- ...recovery?.autoResume && recovery.requestId === command.usageLimitRecoveryRequestId && recovery.runId === command.usageLimitContinuationOfRunId && projection.thread.snoozedUntil != null && toEpochMillis(projection.thread.snoozedUntil) > toEpochMillis(now$38) ? { limitRecovery: {
144980
+ ...recovery?.autoResume && recovery.requestId === command.usageLimitRecoveryRequestId && recovery.runId === command.usageLimitContinuationOfRunId && projection.thread.snoozedUntil != null && toEpochMillis(projection.thread.snoozedUntil) > toEpochMillis(now$25) ? { limitRecovery: {
144904
144981
  ...recovery,
144905
144982
  requestId: command.commandId
144906
144983
  } } : {}
@@ -144923,18 +145000,18 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144923
145000
  }
144924
145001
  const continuedTaskId = projection.runs.find((run) => run.id === command.restartContinuationOfRunId)?.delegatedTaskId;
144925
145002
  if (projection.thread.snoozedUntil != null) {
144926
- const now$33 = yield* now;
145003
+ const now$20 = yield* now;
144927
145004
  const thread = {
144928
145005
  ...projection.thread,
144929
145006
  snoozedUntil: null,
144930
145007
  snoozedAt: null,
144931
- updatedAt: now$33
145008
+ updatedAt: now$20
144932
145009
  };
144933
145010
  const event = yield* emit(events, command)({
144934
145011
  type: "thread.unsnoozed",
144935
145012
  threadId: command.threadId,
144936
145013
  providerInstanceId: thread.providerInstanceId,
144937
- occurredAt: now$33,
145014
+ occurredAt: now$20,
144938
145015
  payload: thread
144939
145016
  });
144940
145017
  projection = applyToProjection(projection, event);
@@ -144942,21 +145019,21 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
144942
145019
  const userMessages = projection.messages.filter((message) => message.role === "user");
144943
145020
  const onlyMaintenanceHistory = userMessages.length > 0 && userMessages.every(isNativeMaintenanceCommand);
144944
145021
  if (!isNativeMaintenanceCommand(command) && (command.titleSeed !== void 0 && (yield* projectionStore.getMessageCount(command.threadId).pipe(mapDispatchError(command))) === 0 || command.createdBy === "user" && onlyMaintenanceHistory)) {
144945
- const now$16 = yield* now;
145022
+ const now$53 = yield* now;
144946
145023
  const thread = {
144947
145024
  ...projection.thread,
144948
145025
  title: command.titleSeed ?? projection.thread.title,
144949
145026
  titleRegeneration: {
144950
145027
  requestId: command.commandId,
144951
- startedAt: now$16
145028
+ startedAt: now$53
144952
145029
  },
144953
- updatedAt: now$16
145030
+ updatedAt: now$53
144954
145031
  };
144955
145032
  const event = yield* emit(events, command)({
144956
145033
  type: "thread.metadata-updated",
144957
145034
  threadId: command.threadId,
144958
145035
  providerInstanceId: thread.providerInstanceId,
144959
- occurredAt: now$16,
145036
+ occurredAt: now$53,
144960
145037
  payload: thread
144961
145038
  });
144962
145039
  yield* update$4(effects, (existing) => [...existing, pendingThreadTitleGenerationEffect(command.commandId, command.threadId, {
@@ -145095,7 +145172,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145095
145172
  commandType: command.type,
145096
145173
  cause: `Active run ${queueBehindRun.id} has no provider thread for queued dispatch.`
145097
145174
  });
145098
- const now$24 = yield* now;
145175
+ const now$12 = yield* now;
145099
145176
  const ordinal = nextRunOrdinal(projection);
145100
145177
  const runId = idAllocator.derive.run({
145101
145178
  threadId: command.threadId,
@@ -145128,8 +145205,8 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145128
145205
  lastRunOrdinal: null,
145129
145206
  handoffIds: [],
145130
145207
  forkedFrom: null,
145131
- createdAt: now$24,
145132
- updatedAt: now$24
145208
+ createdAt: now$12,
145209
+ updatedAt: now$12
145133
145210
  };
145134
145211
  const attemptId = idAllocator.derive.runAttempt({
145135
145212
  runId,
@@ -145145,7 +145222,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145145
145222
  rootNodeId,
145146
145223
  providerThreadId: queuedProviderThread.id,
145147
145224
  cwd: resolvedRuntimePolicy.cwd ?? selectedProviderSession?.cwd ?? projection.thread.worktreePath ?? process.cwd(),
145148
- createdAt: now$24
145225
+ createdAt: now$12
145149
145226
  })), mapError((cause) => new OrchestratorDispatchError({
145150
145227
  commandId: command.commandId,
145151
145228
  commandType: command.type,
@@ -145166,7 +145243,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145166
145243
  status: "queued",
145167
145244
  ...worktreeMissingRun !== void 0 || queueIsHeld && !wakeSkipsHold ? { queueHeld: true } : {},
145168
145245
  queuePosition: goalStopRunId !== void 0 ? 1 : Math.max(0, ...projection.runs.filter((candidate) => candidate.status === "queued").map((candidate) => candidate.queuePosition ?? candidate.ordinal)) + 1,
145169
- requestedAt: now$24,
145246
+ requestedAt: now$12,
145170
145247
  startedAt: null,
145171
145248
  completedAt: null,
145172
145249
  checkpointId: null,
@@ -145219,8 +145296,8 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145219
145296
  ...command.context ? { context: command.context } : {},
145220
145297
  attachments: command.attachments,
145221
145298
  streaming: false,
145222
- createdAt: now$24,
145223
- updatedAt: now$24,
145299
+ createdAt: now$12,
145300
+ updatedAt: now$12,
145224
145301
  ...delegatedCompletion === void 0 ? {} : { delegatedCompletion },
145225
145302
  ...command.notification === void 0 ? {} : { notification: command.notification }
145226
145303
  };
@@ -145229,7 +145306,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145229
145306
  type: "provider-thread.updated",
145230
145307
  threadId: command.threadId,
145231
145308
  providerInstanceId: modelSelection.instanceId,
145232
- occurredAt: now$24,
145309
+ occurredAt: now$12,
145233
145310
  payload: queuedProviderThread
145234
145311
  });
145235
145312
  yield* emitEvent({
@@ -145238,17 +145315,17 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145238
145315
  runId,
145239
145316
  nodeId: rootNodeId,
145240
145317
  providerInstanceId: modelSelection.instanceId,
145241
- occurredAt: now$24,
145318
+ occurredAt: now$12,
145242
145319
  payload: run
145243
145320
  });
145244
- yield* completeSourcePlan(now$24);
145321
+ yield* completeSourcePlan(now$12);
145245
145322
  yield* emitEvent({
145246
145323
  type: "run-attempt.created",
145247
145324
  threadId: command.threadId,
145248
145325
  runId,
145249
145326
  nodeId: rootNodeId,
145250
145327
  providerInstanceId: modelSelection.instanceId,
145251
- occurredAt: now$24,
145328
+ occurredAt: now$12,
145252
145329
  payload: attempt
145253
145330
  });
145254
145331
  yield* emitEvent({
@@ -145257,7 +145334,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145257
145334
  runId,
145258
145335
  nodeId: rootNodeId,
145259
145336
  providerInstanceId: modelSelection.instanceId,
145260
- occurredAt: now$24,
145337
+ occurredAt: now$12,
145261
145338
  payload: rootNode
145262
145339
  });
145263
145340
  if (checkpointScope !== null) yield* emitEvent({
@@ -145266,7 +145343,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145266
145343
  runId,
145267
145344
  nodeId: rootNodeId,
145268
145345
  providerInstanceId: modelSelection.instanceId,
145269
- occurredAt: now$24,
145346
+ occurredAt: now$12,
145270
145347
  payload: yield* checkpointService.ensureScope(checkpointScope).pipe(mapError((cause) => new OrchestratorDispatchError({
145271
145348
  commandId: command.commandId,
145272
145349
  commandType: command.type,
@@ -145279,7 +145356,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145279
145356
  runId,
145280
145357
  nodeId: rootNodeId,
145281
145358
  providerInstanceId: modelSelection.instanceId,
145282
- occurredAt: now$24,
145359
+ occurredAt: now$12,
145283
145360
  payload: message
145284
145361
  });
145285
145362
  const existingItem = projection.turnItems.find((item) => item.type === "user_message" && item.messageId === command.messageId);
@@ -145289,7 +145366,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145289
145366
  runId,
145290
145367
  nodeId: rootNodeId,
145291
145368
  providerInstanceId: modelSelection.instanceId,
145292
- occurredAt: now$24,
145369
+ occurredAt: now$12,
145293
145370
  payload: {
145294
145371
  ...existingItem,
145295
145372
  runId,
@@ -145300,7 +145377,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145300
145377
  status: "pending",
145301
145378
  startedAt: null,
145302
145379
  completedAt: null,
145303
- updatedAt: now$24
145380
+ updatedAt: now$12
145304
145381
  }
145305
145382
  });
145306
145383
  if (goalStopRunId !== void 0) return yield* stopRunForGoalCommand({
@@ -145310,7 +145387,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145310
145387
  projection: yield* getProjectionWithPendingEvents(command.threadId, events),
145311
145388
  queuedRunId: runId,
145312
145389
  targetRunId: goalStopRunId,
145313
- now: now$24
145390
+ now: now$12
145314
145391
  });
145315
145392
  return;
145316
145393
  }
@@ -145322,17 +145399,17 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145322
145399
  });
145323
145400
  const pendingMergeBackTransfer = latestContextTransfer(pendingMergeBackTransfers);
145324
145401
  const supersededMergeBackTransfers = pendingMergeBackTransfers.filter((transfer) => transfer.id !== pendingMergeBackTransfer?.id);
145325
- const now$17 = yield* now;
145402
+ const now$7 = yield* now;
145326
145403
  if (!modelSelectionsEqual(projection.thread.modelSelection, modelSelection) || projection.thread.providerInstanceId !== modelSelection.instanceId) yield* emit(events, command)({
145327
145404
  type: projection.thread.providerInstanceId === modelSelection.instanceId ? "thread.model-selection-updated" : "thread.provider-switched",
145328
145405
  threadId: command.threadId,
145329
145406
  providerInstanceId: modelSelection.instanceId,
145330
- occurredAt: now$17,
145407
+ occurredAt: now$7,
145331
145408
  payload: {
145332
145409
  ...projection.thread,
145333
145410
  providerInstanceId: modelSelection.instanceId,
145334
145411
  modelSelection,
145335
- updatedAt: now$17
145412
+ updatedAt: now$7
145336
145413
  }
145337
145414
  });
145338
145415
  const ordinal = nextRunOrdinal(projection);
@@ -145389,7 +145466,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145389
145466
  toProviderThreadId: providerThreadId,
145390
145467
  toProviderInstanceId: modelSelection.instanceId,
145391
145468
  items: legacyImportItems,
145392
- createdAt: now$17
145469
+ createdAt: now$7
145393
145470
  }).pipe(mapDispatchError(command)) : null;
145394
145471
  const providerThread = activeProviderThread === void 0 ? {
145395
145472
  id: providerThreadId,
@@ -145405,14 +145482,14 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145405
145482
  lastRunOrdinal: ordinal,
145406
145483
  handoffIds: legacyImportHandoff === null ? [] : [legacyImportHandoff.id],
145407
145484
  forkedFrom: null,
145408
- createdAt: now$17,
145409
- updatedAt: now$17
145485
+ createdAt: now$7,
145486
+ updatedAt: now$7
145410
145487
  } : {
145411
145488
  ...activeProviderThread,
145412
145489
  providerSessionId,
145413
145490
  lastRunOrdinal: ordinal,
145414
145491
  handoffIds: appendContextHandoffId(activeProviderThread.handoffIds, legacyImportHandoff?.id ?? null),
145415
- updatedAt: now$17
145492
+ updatedAt: now$7
145416
145493
  };
145417
145494
  const attemptId = idAllocator.derive.runAttempt({
145418
145495
  runId,
@@ -145428,7 +145505,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145428
145505
  rootNodeId,
145429
145506
  providerThreadId,
145430
145507
  cwd: resolvedRuntimePolicy.cwd ?? projection.thread.worktreePath ?? process.cwd(),
145431
- createdAt: now$17
145508
+ createdAt: now$7
145432
145509
  })), mapDispatchError(command));
145433
145510
  const run = {
145434
145511
  id: runId,
@@ -145442,7 +145519,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145442
145519
  activeAttemptId: attemptId,
145443
145520
  status: dispatchMode.type === "defer_start" ? "preparing" : "starting",
145444
145521
  queuePosition: null,
145445
- requestedAt: now$17,
145522
+ requestedAt: now$7,
145446
145523
  startedAt: null,
145447
145524
  completedAt: null,
145448
145525
  checkpointId: null,
@@ -145497,8 +145574,8 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145497
145574
  ...command.context ? { context: command.context } : {},
145498
145575
  attachments: command.attachments,
145499
145576
  streaming: false,
145500
- createdAt: now$17,
145501
- updatedAt: now$17,
145577
+ createdAt: now$7,
145578
+ updatedAt: now$7,
145502
145579
  ...delegatedCompletion === void 0 ? {} : { delegatedCompletion },
145503
145580
  ...command.notification === void 0 ? {} : { notification: command.notification }
145504
145581
  };
@@ -145518,9 +145595,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145518
145595
  ordinal: yield* nextTurnItemOrdinal(projection),
145519
145596
  status: "completed",
145520
145597
  title: null,
145521
- startedAt: now$17,
145522
- completedAt: now$17,
145523
- updatedAt: now$17,
145598
+ startedAt: now$7,
145599
+ completedAt: now$7,
145600
+ updatedAt: now$7,
145524
145601
  type: "user_message",
145525
145602
  messageId: command.messageId,
145526
145603
  inputIntent: "turn_start",
@@ -145544,9 +145621,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145544
145621
  ordinal: turnItem.ordinal + 1,
145545
145622
  status: "completed",
145546
145623
  title: AUTO_WORKSPACE_NOTICE_TITLE,
145547
- startedAt: now$17,
145548
- completedAt: now$17,
145549
- updatedAt: now$17,
145624
+ startedAt: now$7,
145625
+ completedAt: now$7,
145626
+ updatedAt: now$7,
145550
145627
  type: "system_notice",
145551
145628
  message: autoWorkspaceNoticeMessage(autoWorkspace)
145552
145629
  };
@@ -145565,9 +145642,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145565
145642
  ordinal: turnItem.ordinal + (autoWorkspaceTurnItem === null ? 1 : 2),
145566
145643
  status: "running",
145567
145644
  title: WORKSPACE_PREPARATION_INPUT,
145568
- startedAt: now$17,
145645
+ startedAt: now$7,
145569
145646
  completedAt: null,
145570
- updatedAt: now$17,
145647
+ updatedAt: now$7,
145571
145648
  type: "command_execution",
145572
145649
  input: WORKSPACE_PREPARATION_INPUT
145573
145650
  } : null;
@@ -145577,7 +145654,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145577
145654
  threadId: command.threadId,
145578
145655
  driver: adapter.driver,
145579
145656
  providerInstanceId: modelSelection.instanceId,
145580
- occurredAt: now$17,
145657
+ occurredAt: now$7,
145581
145658
  payload: providerThread
145582
145659
  });
145583
145660
  if (legacyImportHandoff !== null) yield* emitEvent({
@@ -145585,7 +145662,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145585
145662
  threadId: command.threadId,
145586
145663
  runId,
145587
145664
  providerInstanceId: modelSelection.instanceId,
145588
- occurredAt: now$17,
145665
+ occurredAt: now$7,
145589
145666
  payload: legacyImportHandoff
145590
145667
  });
145591
145668
  yield* emitEvent({
@@ -145594,17 +145671,17 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145594
145671
  runId,
145595
145672
  nodeId: rootNodeId,
145596
145673
  providerInstanceId: modelSelection.instanceId,
145597
- occurredAt: now$17,
145674
+ occurredAt: now$7,
145598
145675
  payload: run
145599
145676
  });
145600
- yield* completeSourcePlan(now$17);
145677
+ yield* completeSourcePlan(now$7);
145601
145678
  yield* emitEvent({
145602
145679
  type: "run-attempt.created",
145603
145680
  threadId: command.threadId,
145604
145681
  runId,
145605
145682
  nodeId: rootNodeId,
145606
145683
  providerInstanceId: modelSelection.instanceId,
145607
- occurredAt: now$17,
145684
+ occurredAt: now$7,
145608
145685
  payload: attempt
145609
145686
  });
145610
145687
  yield* emitEvent({
@@ -145613,7 +145690,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145613
145690
  runId,
145614
145691
  nodeId: rootNodeId,
145615
145692
  providerInstanceId: modelSelection.instanceId,
145616
- occurredAt: now$17,
145693
+ occurredAt: now$7,
145617
145694
  payload: rootNode
145618
145695
  });
145619
145696
  if (checkpointScope !== null) yield* emitEvent({
@@ -145622,7 +145699,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145622
145699
  runId,
145623
145700
  nodeId: rootNodeId,
145624
145701
  providerInstanceId: modelSelection.instanceId,
145625
- occurredAt: now$17,
145702
+ occurredAt: now$7,
145626
145703
  payload: checkpointScope
145627
145704
  });
145628
145705
  yield* emitEvent({
@@ -145631,7 +145708,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145631
145708
  runId,
145632
145709
  nodeId: rootNodeId,
145633
145710
  providerInstanceId: modelSelection.instanceId,
145634
- occurredAt: now$17,
145711
+ occurredAt: now$7,
145635
145712
  payload: message
145636
145713
  });
145637
145714
  yield* emitEvent({
@@ -145640,7 +145717,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145640
145717
  runId,
145641
145718
  nodeId: rootNodeId,
145642
145719
  providerInstanceId: modelSelection.instanceId,
145643
- occurredAt: now$17,
145720
+ occurredAt: now$7,
145644
145721
  payload: notificationTurnItem(turnItem, message, projection.subagents)
145645
145722
  });
145646
145723
  if (autoWorkspaceTurnItem !== null) yield* emitEvent({
@@ -145649,7 +145726,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145649
145726
  runId,
145650
145727
  nodeId: rootNodeId,
145651
145728
  providerInstanceId: modelSelection.instanceId,
145652
- occurredAt: now$17,
145729
+ occurredAt: now$7,
145653
145730
  payload: autoWorkspaceTurnItem
145654
145731
  });
145655
145732
  if (preparationTurnItem !== null) yield* emitEvent({
@@ -145658,7 +145735,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145658
145735
  runId,
145659
145736
  nodeId: rootNodeId,
145660
145737
  providerInstanceId: modelSelection.instanceId,
145661
- occurredAt: now$17,
145738
+ occurredAt: now$7,
145662
145739
  payload: preparationTurnItem
145663
145740
  });
145664
145741
  const pendingEffect = {
@@ -145761,13 +145838,13 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145761
145838
  providerThreadId: sourceProviderThread.id,
145762
145839
  ...sourceProviderTurnId === void 0 ? {} : { providerTurnId: sourceProviderTurnId }
145763
145840
  } : null,
145764
- createdAt: now$17,
145765
- updatedAt: now$17
145841
+ createdAt: now$7,
145842
+ updatedAt: now$7
145766
145843
  } : {
145767
145844
  ...targetProviderThread,
145768
145845
  providerInstanceId: modelSelection.instanceId,
145769
145846
  providerSessionId,
145770
- updatedAt: now$17
145847
+ updatedAt: now$7
145771
145848
  };
145772
145849
  const portableForkItems = !requiresPortableFork || sourceProjection === null || sourceRun === null ? [] : yield* readHandoffItems(sourceProjection.thread.id, [...sourceProjection.runs.filter((run) => run.ordinal <= sourceRun.ordinal).map((run) => run.id), ...sourceProjection.thread.historyOrigin === "v1_import" ? [null] : []]);
145773
145850
  const portableForkHandoff = !requiresPortableFork || pendingForkTransfer === void 0 || sourceProjection === null || sourceRun === null ? null : yield* contextHandoffService.prepareProviderHandoff({
@@ -145782,7 +145859,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145782
145859
  strategy: "full_thread_summary",
145783
145860
  items: portableForkItems,
145784
145861
  runs: sourceProjection.runs,
145785
- createdAt: now$17
145862
+ createdAt: now$7
145786
145863
  }).pipe(mapError((cause) => new OrchestratorDispatchError({
145787
145864
  commandId: command.commandId,
145788
145865
  commandType: command.type,
@@ -145819,7 +145896,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145819
145896
  strategy: targetProviderThread === void 0 || requiresFullProviderSwitchContext ? "full_thread_summary" : "delta_since_target_last_seen",
145820
145897
  items: providerSwitchItems,
145821
145898
  runs: projection.runs,
145822
- createdAt: now$17
145899
+ createdAt: now$7
145823
145900
  }).pipe(mapError((cause) => new OrchestratorDispatchError({
145824
145901
  commandId: command.commandId,
145825
145902
  commandType: command.type,
@@ -145831,7 +145908,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145831
145908
  toProviderThreadId: ensuredProviderThread.id,
145832
145909
  toProviderInstanceId: modelSelection.instanceId,
145833
145910
  items: legacyImportItems,
145834
- createdAt: now$17
145911
+ createdAt: now$7
145835
145912
  }).pipe(mapDispatchError(command)) : null;
145836
145913
  const providerThread = {
145837
145914
  ...ensuredProviderThread,
@@ -145843,7 +145920,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145843
145920
  providerSwitchHandoff,
145844
145921
  legacyImportRecoveryHandoff
145845
145922
  ].flatMap((handoff) => handoff === null ? [] : [handoff.id])],
145846
- updatedAt: now$17
145923
+ updatedAt: now$7
145847
145924
  };
145848
145925
  const attemptId = idAllocator.derive.runAttempt({
145849
145926
  runId,
@@ -145891,7 +145968,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145891
145968
  toProviderInstanceId: modelSelection.instanceId,
145892
145969
  coveredRunOrdinals: visibleDeltaRunOrdinals(mergeBackSourceProjection, mergeBackDeltaItems),
145893
145970
  deltaItems: mergeBackDeltaItems,
145894
- createdAt: now$17
145971
+ createdAt: now$7
145895
145972
  }).pipe(mapError((cause) => new OrchestratorDispatchError({
145896
145973
  commandId: command.commandId,
145897
145974
  commandType: command.type,
@@ -145903,7 +145980,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145903
145980
  rootNodeId,
145904
145981
  providerThreadId: providerThread.id,
145905
145982
  cwd: resolvedRuntimePolicy.cwd ?? existingProviderSession?.cwd ?? projection.thread.worktreePath ?? process.cwd(),
145906
- createdAt: now$17
145983
+ createdAt: now$7
145907
145984
  }).pipe(mapError((cause) => new OrchestratorDispatchError({
145908
145985
  commandId: command.commandId,
145909
145986
  commandType: command.type,
@@ -145921,7 +145998,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145921
145998
  activeAttemptId: attemptId,
145922
145999
  status: "starting",
145923
146000
  queuePosition: null,
145924
- requestedAt: now$17,
146001
+ requestedAt: now$7,
145925
146002
  startedAt: null,
145926
146003
  completedAt: null,
145927
146004
  checkpointId: null,
@@ -145975,8 +146052,8 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145975
146052
  ...command.context ? { context: command.context } : {},
145976
146053
  attachments: command.attachments,
145977
146054
  streaming: false,
145978
- createdAt: now$17,
145979
- updatedAt: now$17,
146055
+ createdAt: now$7,
146056
+ updatedAt: now$7,
145980
146057
  ...delegatedCompletion === void 0 ? {} : { delegatedCompletion },
145981
146058
  ...command.notification === void 0 ? {} : { notification: command.notification }
145982
146059
  };
@@ -145996,9 +146073,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
145996
146073
  ordinal: ordinal * 100,
145997
146074
  status: "completed",
145998
146075
  title: null,
145999
- startedAt: now$17,
146000
- completedAt: now$17,
146001
- updatedAt: now$17,
146076
+ startedAt: now$7,
146077
+ completedAt: now$7,
146078
+ updatedAt: now$7,
146002
146079
  type: "user_message",
146003
146080
  messageId: command.messageId,
146004
146081
  inputIntent: "turn_start",
@@ -146024,9 +146101,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146024
146101
  ordinal: ordinal * 100 - 1,
146025
146102
  status: "completed",
146026
146103
  title: portableForkHandoff !== null ? "Fork context" : providerSwitchHandoff !== null ? "Provider handoff" : "Merge-back context",
146027
- startedAt: now$17,
146028
- completedAt: now$17,
146029
- updatedAt: now$17,
146104
+ startedAt: now$7,
146105
+ completedAt: now$7,
146106
+ updatedAt: now$7,
146030
146107
  type: "handoff",
146031
146108
  contextHandoffId: activeHandoff.id,
146032
146109
  fromProviderThreadIds: activeHandoff.fromProviderThreadIds,
@@ -146055,7 +146132,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146055
146132
  threadId: command.threadId,
146056
146133
  runId,
146057
146134
  providerInstanceId: modelSelection.instanceId,
146058
- occurredAt: now$17,
146135
+ occurredAt: now$7,
146059
146136
  payload: {
146060
146137
  ...pendingForkTransfer,
146061
146138
  targetProviderInstanceId: modelSelection.instanceId,
@@ -146063,7 +146140,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146063
146140
  status: "pending",
146064
146141
  resolution: null,
146065
146142
  error: null,
146066
- updatedAt: now$17
146143
+ updatedAt: now$7
146067
146144
  }
146068
146145
  });
146069
146146
  if (pendingForkTransfer !== void 0 && portableForkResolution !== null) yield* emitEvent({
@@ -146071,7 +146148,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146071
146148
  threadId: command.threadId,
146072
146149
  runId,
146073
146150
  providerInstanceId: modelSelection.instanceId,
146074
- occurredAt: now$17,
146151
+ occurredAt: now$7,
146075
146152
  payload: {
146076
146153
  ...pendingForkTransfer,
146077
146154
  targetProviderInstanceId: modelSelection.instanceId,
@@ -146079,14 +146156,14 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146079
146156
  status: "resolved_portable",
146080
146157
  resolution: portableForkResolution,
146081
146158
  error: null,
146082
- updatedAt: now$17
146159
+ updatedAt: now$7
146083
146160
  }
146084
146161
  });
146085
146162
  yield* emitEvent({
146086
146163
  type: "provider-thread.updated",
146087
146164
  threadId: command.threadId,
146088
146165
  providerInstanceId: modelSelection.instanceId,
146089
- occurredAt: now$17,
146166
+ occurredAt: now$7,
146090
146167
  payload: providerThread
146091
146168
  });
146092
146169
  if (portableForkHandoff !== null) yield* emitEvent({
@@ -146094,7 +146171,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146094
146171
  threadId: command.threadId,
146095
146172
  runId,
146096
146173
  providerInstanceId: modelSelection.instanceId,
146097
- occurredAt: now$17,
146174
+ occurredAt: now$7,
146098
146175
  payload: portableForkHandoff
146099
146176
  });
146100
146177
  if (legacyImportRecoveryHandoff !== null) yield* emitEvent({
@@ -146102,7 +146179,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146102
146179
  threadId: command.threadId,
146103
146180
  runId,
146104
146181
  providerInstanceId: modelSelection.instanceId,
146105
- occurredAt: now$17,
146182
+ occurredAt: now$7,
146106
146183
  payload: legacyImportRecoveryHandoff
146107
146184
  });
146108
146185
  if (providerSwitchTransferId !== null && providerSwitchHandoff !== null && latestHandoffRun !== void 0) {
@@ -146123,16 +146200,16 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146123
146200
  },
146124
146201
  createdBy: command.createdBy,
146125
146202
  error: null,
146126
- createdAt: now$17,
146127
- updatedAt: now$17,
146128
- consumedAt: now$17
146203
+ createdAt: now$7,
146204
+ updatedAt: now$7,
146205
+ consumedAt: now$7
146129
146206
  };
146130
146207
  yield* emitEvent({
146131
146208
  type: "context-transfer.created",
146132
146209
  threadId: command.threadId,
146133
146210
  runId,
146134
146211
  providerInstanceId: modelSelection.instanceId,
146135
- occurredAt: now$17,
146212
+ occurredAt: now$7,
146136
146213
  payload: transfer
146137
146214
  });
146138
146215
  yield* emitEvent({
@@ -146140,7 +146217,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146140
146217
  threadId: command.threadId,
146141
146218
  runId,
146142
146219
  providerInstanceId: modelSelection.instanceId,
146143
- occurredAt: now$17,
146220
+ occurredAt: now$7,
146144
146221
  payload: providerSwitchHandoff
146145
146222
  });
146146
146223
  }
@@ -146149,7 +146226,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146149
146226
  threadId: command.threadId,
146150
146227
  runId,
146151
146228
  providerInstanceId: modelSelection.instanceId,
146152
- occurredAt: now$17,
146229
+ occurredAt: now$7,
146153
146230
  payload: mergeBackHandoff
146154
146231
  });
146155
146232
  for (const supersededTransfer of supersededMergeBackTransfers) yield* emitEvent({
@@ -146157,12 +146234,12 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146157
146234
  threadId: command.threadId,
146158
146235
  runId,
146159
146236
  providerInstanceId: modelSelection.instanceId,
146160
- occurredAt: now$17,
146237
+ occurredAt: now$7,
146161
146238
  payload: {
146162
146239
  ...supersededTransfer,
146163
146240
  status: "superseded",
146164
146241
  error: pendingMergeBackTransfer === void 0 ? "Superseded while consuming merge-back transfer." : `Superseded by merge-back transfer ${pendingMergeBackTransfer.id}.`,
146165
- updatedAt: now$17
146242
+ updatedAt: now$7
146166
146243
  }
146167
146244
  });
146168
146245
  if (pendingMergeBackTransfer !== void 0 && mergeBackResolution !== null) yield* emitEvent({
@@ -146170,7 +146247,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146170
146247
  threadId: command.threadId,
146171
146248
  runId,
146172
146249
  providerInstanceId: modelSelection.instanceId,
146173
- occurredAt: now$17,
146250
+ occurredAt: now$7,
146174
146251
  payload: {
146175
146252
  ...pendingMergeBackTransfer,
146176
146253
  targetProviderInstanceId: modelSelection.instanceId,
@@ -146178,8 +146255,8 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146178
146255
  status: "consumed",
146179
146256
  resolution: mergeBackResolution,
146180
146257
  error: null,
146181
- updatedAt: now$17,
146182
- consumedAt: now$17
146258
+ updatedAt: now$7,
146259
+ consumedAt: now$7
146183
146260
  }
146184
146261
  });
146185
146262
  yield* emitEvent({
@@ -146188,17 +146265,17 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146188
146265
  runId,
146189
146266
  nodeId: rootNodeId,
146190
146267
  providerInstanceId: modelSelection.instanceId,
146191
- occurredAt: now$17,
146268
+ occurredAt: now$7,
146192
146269
  payload: run
146193
146270
  });
146194
- yield* completeSourcePlan(now$17);
146271
+ yield* completeSourcePlan(now$7);
146195
146272
  yield* emitEvent({
146196
146273
  type: "run-attempt.created",
146197
146274
  threadId: command.threadId,
146198
146275
  runId,
146199
146276
  nodeId: rootNodeId,
146200
146277
  providerInstanceId: modelSelection.instanceId,
146201
- occurredAt: now$17,
146278
+ occurredAt: now$7,
146202
146279
  payload: attempt
146203
146280
  });
146204
146281
  yield* emitEvent({
@@ -146207,7 +146284,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146207
146284
  runId,
146208
146285
  nodeId: rootNodeId,
146209
146286
  providerInstanceId: modelSelection.instanceId,
146210
- occurredAt: now$17,
146287
+ occurredAt: now$7,
146211
146288
  payload: rootNode
146212
146289
  });
146213
146290
  yield* emitEvent({
@@ -146216,7 +146293,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146216
146293
  runId,
146217
146294
  nodeId: rootNodeId,
146218
146295
  providerInstanceId: modelSelection.instanceId,
146219
- occurredAt: now$17,
146296
+ occurredAt: now$7,
146220
146297
  payload: yield* checkpointService.ensureScope(checkpointScope).pipe(mapError((cause) => new OrchestratorDispatchError({
146221
146298
  commandId: command.commandId,
146222
146299
  commandType: command.type,
@@ -146229,7 +146306,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146229
146306
  runId,
146230
146307
  nodeId: rootNodeId,
146231
146308
  providerInstanceId: modelSelection.instanceId,
146232
- occurredAt: now$17,
146309
+ occurredAt: now$7,
146233
146310
  payload: handoffTurnItem
146234
146311
  });
146235
146312
  yield* emitEvent({
@@ -146238,7 +146315,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146238
146315
  runId,
146239
146316
  nodeId: rootNodeId,
146240
146317
  providerInstanceId: modelSelection.instanceId,
146241
- occurredAt: now$17,
146318
+ occurredAt: now$7,
146242
146319
  payload: message
146243
146320
  });
146244
146321
  yield* emitEvent({
@@ -146247,7 +146324,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146247
146324
  runId,
146248
146325
  nodeId: rootNodeId,
146249
146326
  providerInstanceId: modelSelection.instanceId,
146250
- occurredAt: now$17,
146327
+ occurredAt: now$7,
146251
146328
  payload: notificationTurnItem(turnItem, message, projection.subagents)
146252
146329
  });
146253
146330
  const forkResolution = nativeForkResolution ?? portableForkResolution;
@@ -146256,7 +146333,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146256
146333
  threadId: command.threadId,
146257
146334
  runId,
146258
146335
  providerInstanceId: modelSelection.instanceId,
146259
- occurredAt: now$17,
146336
+ occurredAt: now$7,
146260
146337
  payload: {
146261
146338
  ...pendingForkTransfer,
146262
146339
  targetProviderInstanceId: modelSelection.instanceId,
@@ -146264,8 +146341,8 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146264
146341
  status: "consumed",
146265
146342
  resolution: forkResolution,
146266
146343
  error: null,
146267
- updatedAt: now$17,
146268
- consumedAt: now$17
146344
+ updatedAt: now$7,
146345
+ consumedAt: now$7
146269
146346
  }
146270
146347
  });
146271
146348
  const detachDetail = canResumeAcrossInstances ? "Provider account changed; continuing the native thread." : "Provider or model selection changed.";
@@ -146275,10 +146352,10 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146275
146352
  threadId: command.threadId,
146276
146353
  driver: session.driver,
146277
146354
  providerInstanceId: session.providerInstanceId,
146278
- occurredAt: now$17,
146355
+ occurredAt: now$7,
146279
146356
  payload: {
146280
146357
  providerSessionId: session.id,
146281
- detachedAt: now$17,
146358
+ detachedAt: now$7,
146282
146359
  reason: detachDetail
146283
146360
  }
146284
146361
  });
@@ -146338,7 +146415,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146338
146415
  providerInstanceId: command.modelSelection.instanceId,
146339
146416
  cause
146340
146417
  })));
146341
- const now$29 = command.createdAt ?? (yield* now);
146418
+ const now$17 = command.createdAt ?? (yield* now);
146342
146419
  const taskNodeId = idAllocator.derive.delegatedTaskNode({ commandId: command.commandId });
146343
146420
  const childThreadId = idAllocator.derive.delegatedTaskThread({ commandId: command.commandId });
146344
146421
  const childMessageId = idAllocator.derive.delegatedTaskMessage({ commandId: command.commandId });
@@ -146358,7 +146435,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146358
146435
  providerInstanceId: command.modelSelection.instanceId,
146359
146436
  modelSelection: command.modelSelection,
146360
146437
  title: taskTitle,
146361
- now: now$29,
146438
+ now: now$17,
146362
146439
  createdBy: command.createdBy,
146363
146440
  creationSource: command.creationSource
146364
146441
  }),
@@ -146387,9 +146464,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146387
146464
  ...command.completionWake === void 0 ? {} : { completionWake: command.completionWake },
146388
146465
  status: "running",
146389
146466
  result: null,
146390
- startedAt: now$29,
146467
+ startedAt: now$17,
146391
146468
  completedAt: null,
146392
- updatedAt: now$29
146469
+ updatedAt: now$17
146393
146470
  };
146394
146471
  const taskNode = {
146395
146472
  id: taskNodeId,
@@ -146405,7 +146482,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146405
146482
  nativeItemRef: null,
146406
146483
  runtimeRequestId: null,
146407
146484
  checkpointScopeId: null,
146408
- startedAt: now$29,
146485
+ startedAt: now$17,
146409
146486
  completedAt: null
146410
146487
  };
146411
146488
  const parentProviderTurn = providerTurnForRun(parentProjection, parentRun);
@@ -146421,9 +146498,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146421
146498
  ordinal: yield* nextTurnItemOrdinal(parentProjection),
146422
146499
  status: "running",
146423
146500
  title: command.title ?? taskTitle,
146424
- startedAt: now$29,
146501
+ startedAt: now$17,
146425
146502
  completedAt: null,
146426
- updatedAt: now$29,
146503
+ updatedAt: now$17,
146427
146504
  type: "subagent",
146428
146505
  subagentId: taskNodeId,
146429
146506
  origin: "app_owned",
@@ -146439,7 +146516,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146439
146516
  threadId: childThreadId,
146440
146517
  driver: targetAdapter.driver,
146441
146518
  providerInstanceId: command.modelSelection.instanceId,
146442
- occurredAt: now$29,
146519
+ occurredAt: now$17,
146443
146520
  payload: childThread
146444
146521
  });
146445
146522
  yield* emitEvent({
@@ -146449,7 +146526,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146449
146526
  nodeId: taskNodeId,
146450
146527
  driver: targetAdapter.driver,
146451
146528
  providerInstanceId: command.modelSelection.instanceId,
146452
- occurredAt: now$29,
146529
+ occurredAt: now$17,
146453
146530
  payload: taskNode
146454
146531
  });
146455
146532
  yield* emitEvent({
@@ -146459,7 +146536,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146459
146536
  nodeId: taskNodeId,
146460
146537
  driver: targetAdapter.driver,
146461
146538
  providerInstanceId: command.modelSelection.instanceId,
146462
- occurredAt: now$29,
146539
+ occurredAt: now$17,
146463
146540
  payload: task
146464
146541
  });
146465
146542
  yield* emitEvent({
@@ -146469,7 +146546,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146469
146546
  nodeId: taskNodeId,
146470
146547
  driver: targetAdapter.driver,
146471
146548
  providerInstanceId: command.modelSelection.instanceId,
146472
- occurredAt: now$29,
146549
+ occurredAt: now$17,
146473
146550
  payload: taskTurnItem
146474
146551
  });
146475
146552
  const childMessageCommand = {
@@ -146516,16 +146593,16 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146516
146593
  resolution: null,
146517
146594
  createdBy: command.createdBy,
146518
146595
  error: null,
146519
- createdAt: now$29,
146520
- updatedAt: now$29,
146521
- consumedAt: now$29
146596
+ createdAt: now$17,
146597
+ updatedAt: now$17,
146598
+ consumedAt: now$17
146522
146599
  };
146523
146600
  yield* emitEvent({
146524
146601
  type: "context-transfer.created",
146525
146602
  threadId: childThreadId,
146526
146603
  runId: childRun.id,
146527
146604
  providerInstanceId: command.modelSelection.instanceId,
146528
- occurredAt: now$29,
146605
+ occurredAt: now$17,
146529
146606
  payload: spawnTransfer
146530
146607
  });
146531
146608
  });
@@ -146681,7 +146758,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146681
146758
  commandType: command.type,
146682
146759
  cause: `Parent run ${command.parentRunId} is stopping.`
146683
146760
  });
146684
- const now$27 = yield* now;
146761
+ const now$15 = yield* now;
146685
146762
  const taskNodeId = idAllocator.derive.delegatedTaskNode({ commandId: command.commandId });
146686
146763
  const taskTurnItemId = idAllocator.derive.delegatedTaskTurnItem({ commandId: command.commandId });
146687
146764
  const taskTitle = subagentThreadTitle({
@@ -146696,7 +146773,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146696
146773
  nodeId: taskNodeId,
146697
146774
  driver: command.driver,
146698
146775
  providerInstanceId: command.modelSelection.instanceId,
146699
- occurredAt: now$27
146776
+ occurredAt: now$15
146700
146777
  };
146701
146778
  const emitEvent = emit(events, command);
146702
146779
  yield* emitEvent({
@@ -146716,7 +146793,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146716
146793
  nativeItemRef: null,
146717
146794
  runtimeRequestId: null,
146718
146795
  checkpointScopeId: null,
146719
- startedAt: now$27,
146796
+ startedAt: now$15,
146720
146797
  completedAt: null
146721
146798
  }
146722
146799
  });
@@ -146742,9 +146819,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146742
146819
  ...command.completionWake === void 0 ? {} : { completionWake: command.completionWake },
146743
146820
  status: "running",
146744
146821
  result: null,
146745
- startedAt: now$27,
146822
+ startedAt: now$15,
146746
146823
  completedAt: null,
146747
- updatedAt: now$27
146824
+ updatedAt: now$15
146748
146825
  }
146749
146826
  });
146750
146827
  yield* emitEvent({
@@ -146762,9 +146839,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146762
146839
  ordinal: yield* nextTurnItemOrdinal(parentProjection),
146763
146840
  status: "running",
146764
146841
  title: command.title ?? taskTitle,
146765
- startedAt: now$27,
146842
+ startedAt: now$15,
146766
146843
  completedAt: null,
146767
- updatedAt: now$27,
146844
+ updatedAt: now$15,
146768
146845
  type: "subagent",
146769
146846
  subagentId: taskNodeId,
146770
146847
  origin: "app_owned",
@@ -146813,30 +146890,30 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146813
146890
  if (command.stoppedThere === void 0) return yield* emitRemoteStopOwed(events, command, task, task.remoteChild);
146814
146891
  const owesStop = task.status === "cancelled" || task.status === "interrupted" || task.remoteChild?.stoppedThere === false;
146815
146892
  if (task.remoteChild?.stoppedThere === true || owesStop && command.stoppedThere !== "stopped") return;
146816
- const now$40 = yield* now;
146893
+ const now$27 = yield* now;
146817
146894
  yield* emit(events, command)({
146818
146895
  type: "subagent.updated",
146819
146896
  threadId: command.parentThreadId,
146820
146897
  ...task.runId === null ? {} : { runId: task.runId },
146821
146898
  nodeId: task.id,
146822
146899
  driver: task.driver,
146823
- occurredAt: now$40,
146900
+ occurredAt: now$27,
146824
146901
  payload: {
146825
146902
  ...task,
146826
146903
  remoteChild,
146827
- updatedAt: now$40
146904
+ updatedAt: now$27
146828
146905
  }
146829
146906
  });
146830
146907
  return;
146831
146908
  }
146832
- const now$41 = yield* now;
146909
+ const now$28 = yield* now;
146833
146910
  const updatedTask = {
146834
146911
  ...task,
146835
146912
  remoteChild,
146836
146913
  status: command.status,
146837
146914
  result: command.result,
146838
- completedAt: now$41,
146839
- updatedAt: now$41
146915
+ completedAt: now$28,
146916
+ updatedAt: now$28
146840
146917
  };
146841
146918
  const parentRun = task.runId === null ? void 0 : parentProjection.runs.find((candidate) => candidate.id === task.runId);
146842
146919
  const plan = yield* planDelegatedCompletionDelivery({
@@ -146844,7 +146921,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146844
146921
  parentRun,
146845
146922
  task,
146846
146923
  updatedTask,
146847
- now: now$41
146924
+ now: now$28
146848
146925
  }).pipe(mapDispatchError(command));
146849
146926
  const emitEvent = emit(events, command);
146850
146927
  yield* emitEvent({
@@ -146853,7 +146930,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146853
146930
  ...task.runId === null ? {} : { runId: task.runId },
146854
146931
  nodeId: task.id,
146855
146932
  driver: task.driver,
146856
- occurredAt: now$41,
146933
+ occurredAt: now$28,
146857
146934
  payload: plan.task
146858
146935
  });
146859
146936
  if (plan.parentRun !== void 0) yield* emitEvent({
@@ -146862,7 +146939,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146862
146939
  runId: plan.parentRun.id,
146863
146940
  ...plan.parentRun.rootNodeId === null ? {} : { nodeId: plan.parentRun.rootNodeId },
146864
146941
  providerInstanceId: plan.parentRun.providerInstanceId,
146865
- occurredAt: now$41,
146942
+ occurredAt: now$28,
146866
146943
  payload: plan.parentRun
146867
146944
  });
146868
146945
  if (plan.message !== void 0) yield* emitEvent({
@@ -146871,7 +146948,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146871
146948
  ...plan.message.runId === null ? {} : { runId: plan.message.runId },
146872
146949
  ...plan.message.nodeId === null ? {} : { nodeId: plan.message.nodeId },
146873
146950
  providerInstanceId: plan.parentRun?.providerInstanceId ?? parentProjection.thread.providerInstanceId,
146874
- occurredAt: now$41,
146951
+ occurredAt: now$28,
146875
146952
  payload: plan.message
146876
146953
  });
146877
146954
  const node = parentProjection.nodes.find((candidate) => candidate.id === task.id);
@@ -146881,11 +146958,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146881
146958
  ...node.runId === null ? {} : { runId: node.runId },
146882
146959
  nodeId: node.id,
146883
146960
  driver: task.driver,
146884
- occurredAt: now$41,
146961
+ occurredAt: now$28,
146885
146962
  payload: {
146886
146963
  ...node,
146887
146964
  status: command.status,
146888
- completedAt: now$41
146965
+ completedAt: now$28
146889
146966
  }
146890
146967
  });
146891
146968
  const item = parentProjection.turnItems.find((candidate) => candidate.type === "subagent" && candidate.subagentId === task.id);
@@ -146895,13 +146972,13 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146895
146972
  ...item.runId === null ? {} : { runId: item.runId },
146896
146973
  ...item.nodeId === null ? {} : { nodeId: item.nodeId },
146897
146974
  driver: task.driver,
146898
- occurredAt: now$41,
146975
+ occurredAt: now$28,
146899
146976
  payload: {
146900
146977
  ...item,
146901
146978
  status: command.status,
146902
146979
  result: command.result,
146903
- completedAt: now$41,
146904
- updatedAt: now$41
146980
+ completedAt: now$28,
146981
+ updatedAt: now$28
146905
146982
  }
146906
146983
  });
146907
146984
  });
@@ -146924,14 +147001,14 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146924
147001
  yield* emitRemoteStopOwed(events, command, task, task.remoteChild);
146925
147002
  });
146926
147003
  const emitRemoteStopOwed = fn("orchestrationV2.dispatch.remoteStopOwed")(function* (events, command, task, remoteChild) {
146927
- const now$34 = yield* now;
147004
+ const now$21 = yield* now;
146928
147005
  yield* emit(events, command)({
146929
147006
  type: "subagent.updated",
146930
147007
  threadId: command.parentThreadId,
146931
147008
  ...task.runId === null ? {} : { runId: task.runId },
146932
147009
  nodeId: task.id,
146933
147010
  driver: task.driver,
146934
- occurredAt: now$34,
147011
+ occurredAt: now$21,
146935
147012
  payload: {
146936
147013
  ...task,
146937
147014
  remoteChild: {
@@ -146939,7 +147016,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146939
147016
  stoppedThere: false,
146940
147017
  stopCount: (remoteChild.stopCount ?? 0) + 1
146941
147018
  },
146942
- updatedAt: now$34
147019
+ updatedAt: now$21
146943
147020
  }
146944
147021
  });
146945
147022
  });
@@ -146964,12 +147041,12 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146964
147041
  commandType: command.type,
146965
147042
  cause: `Delegated task ${command.taskId} already wakes the parent with completionWake ${command.completionWake}.`
146966
147043
  });
146967
- const now$8 = yield* now;
147044
+ const now$47 = yield* now;
146968
147045
  const emitEvent = emit(events, command);
146969
147046
  const updatedTask = {
146970
147047
  ...task,
146971
147048
  completionWake: command.completionWake,
146972
- updatedAt: now$8
147049
+ updatedAt: now$47
146973
147050
  };
146974
147051
  const parentRun = task.runId === null ? void 0 : parentProjection.runs.find((candidate) => candidate.id === task.runId);
146975
147052
  const completionPlan = command.completionWake === "always" && isTerminalDelegatedTaskStatus(task.status) && parentRun !== void 0 && hasLiveRun({ runs: [parentRun] }) ? yield* planDelegatedCompletionDelivery({
@@ -146977,7 +147054,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146977
147054
  parentRun,
146978
147055
  task: updatedTask,
146979
147056
  updatedTask,
146980
- now: now$8
147057
+ now: now$47
146981
147058
  }) : void 0;
146982
147059
  yield* emitEvent({
146983
147060
  type: "subagent.updated",
@@ -146986,7 +147063,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146986
147063
  nodeId: task.id,
146987
147064
  driver: task.driver,
146988
147065
  providerInstanceId: task.providerInstanceId,
146989
- occurredAt: now$8,
147066
+ occurredAt: now$47,
146990
147067
  payload: completionPlan?.task ?? updatedTask
146991
147068
  });
146992
147069
  if (completionPlan === void 0) return;
@@ -146996,7 +147073,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
146996
147073
  runId: completionPlan.parentRun.id,
146997
147074
  ...completionPlan.parentRun.rootNodeId === null ? {} : { nodeId: completionPlan.parentRun.rootNodeId },
146998
147075
  providerInstanceId: completionPlan.parentRun.providerInstanceId,
146999
- occurredAt: now$8,
147076
+ occurredAt: now$47,
147000
147077
  payload: completionPlan.parentRun
147001
147078
  });
147002
147079
  if (completionPlan.message !== void 0) yield* emitEvent({
@@ -147005,7 +147082,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147005
147082
  ...completionPlan.message.runId === null ? {} : { runId: completionPlan.message.runId },
147006
147083
  ...completionPlan.message.nodeId === null ? {} : { nodeId: completionPlan.message.nodeId },
147007
147084
  providerInstanceId: completionPlan.parentRun?.providerInstanceId ?? parentProjection.thread.providerInstanceId,
147008
- occurredAt: now$8,
147085
+ occurredAt: now$47,
147009
147086
  payload: completionPlan.message
147010
147087
  });
147011
147088
  return completionPlan.parentRun?.id;
@@ -147054,7 +147131,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147054
147131
  commandType: command.type,
147055
147132
  cause: `Target run ${command.targetRunId} does not belong to thread ${command.targetThreadId}.`
147056
147133
  });
147057
- const now$28 = yield* now;
147134
+ const now$16 = yield* now;
147058
147135
  const parentProviderTurn = providerTurnForRun(parentProjection, parentRun);
147059
147136
  const turnItem = {
147060
147137
  id: idAllocator.derive.createdThreadTurnItem({ commandId: command.commandId }),
@@ -147068,9 +147145,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147068
147145
  ordinal: yield* nextTurnItemOrdinal(parentProjection),
147069
147146
  status: "completed",
147070
147147
  title: targetProjection.thread.title,
147071
- startedAt: now$28,
147072
- completedAt: now$28,
147073
- updatedAt: now$28,
147148
+ startedAt: now$16,
147149
+ completedAt: now$16,
147150
+ updatedAt: now$16,
147074
147151
  type: "thread_created",
147075
147152
  targetThreadId: command.targetThreadId,
147076
147153
  targetRunId: command.targetRunId,
@@ -147083,7 +147160,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147083
147160
  runId: command.parentRunId,
147084
147161
  nodeId: command.parentNodeId,
147085
147162
  providerInstanceId: parentRun.providerInstanceId,
147086
- occurredAt: now$28,
147163
+ occurredAt: now$16,
147087
147164
  payload: turnItem
147088
147165
  });
147089
147166
  });
@@ -147123,7 +147200,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147123
147200
  commandType: command.type,
147124
147201
  cause: `Secret request ${command.turnItemId} belongs to another run.`
147125
147202
  });
147126
- const now$46 = yield* now;
147203
+ const now$34 = yield* now;
147127
147204
  const unchanged = existing !== void 0 && (existing.secretStatus !== "pending" || command.secretStatus === "pending");
147128
147205
  const pending = command.secretStatus === "pending";
147129
147206
  const turnItem = unchanged ? existing : {
@@ -147138,9 +147215,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147138
147215
  ordinal: existing?.ordinal ?? (yield* nextTurnItemOrdinal(projection)),
147139
147216
  status: pending ? "waiting" : command.secretStatus === "saved" ? "completed" : "cancelled",
147140
147217
  title: command.label,
147141
- startedAt: existing?.startedAt ?? now$46,
147142
- completedAt: pending ? null : now$46,
147143
- updatedAt: now$46,
147218
+ startedAt: existing?.startedAt ?? now$34,
147219
+ completedAt: pending ? null : now$34,
147220
+ updatedAt: now$34,
147144
147221
  type: "secret_request",
147145
147222
  label: command.label,
147146
147223
  reason: command.reason,
@@ -147153,7 +147230,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147153
147230
  runId: command.runId,
147154
147231
  nodeId: command.nodeId,
147155
147232
  providerInstanceId: run.providerInstanceId,
147156
- occurredAt: now$46,
147233
+ occurredAt: now$34,
147157
147234
  payload: turnItem
147158
147235
  });
147159
147236
  });
@@ -147203,7 +147280,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147203
147280
  cause: `Run ${command.runId} is not active.`
147204
147281
  });
147205
147282
  const nodeId = existing?.nodeId ?? command.nodeId;
147206
- const now$18 = yield* now;
147283
+ const now$54 = yield* now;
147207
147284
  const unchanged = existing !== void 0 && (existing.linkStatus !== "pending" || command.linkStatus === "pending");
147208
147285
  const pending = command.linkStatus === "pending";
147209
147286
  const { type: _type, commandId: _commandId, turnItemId: _turnItemId, wake, ...fields } = command;
@@ -147223,9 +147300,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147223
147300
  ordinal: existing?.ordinal ?? (yield* nextTurnItemOrdinal(projection)),
147224
147301
  status: pending ? "waiting" : command.linkStatus === "linked" ? "completed" : command.linkStatus === "failed" ? "failed" : "cancelled",
147225
147302
  title: command.label ?? command.url ?? "Link an environment",
147226
- startedAt: existing?.startedAt ?? now$18,
147227
- completedAt: pending ? null : now$18,
147228
- updatedAt: now$18,
147303
+ startedAt: existing?.startedAt ?? now$54,
147304
+ completedAt: pending ? null : now$54,
147305
+ updatedAt: now$54,
147229
147306
  type: "link_request"
147230
147307
  };
147231
147308
  yield* emit(events, command)({
@@ -147234,7 +147311,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147234
147311
  runId: command.runId,
147235
147312
  nodeId,
147236
147313
  providerInstanceId: run.providerInstanceId,
147237
- occurredAt: now$18,
147314
+ occurredAt: now$54,
147238
147315
  payload: turnItem
147239
147316
  });
147240
147317
  if (wake === void 0 || unchanged || projection.thread.archivedAt !== null || projection.thread.deletedAt !== null) return;
@@ -147329,7 +147406,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147329
147406
  serverName: input.create.serverName,
147330
147407
  reattach: input.create.reattach
147331
147408
  };
147332
- const now$44 = yield* now;
147409
+ const now$31 = yield* now;
147333
147410
  const pending = input.signInStatus === "pending";
147334
147411
  const turnItem = unchanged ? existing : {
147335
147412
  id: input.turnItemId,
@@ -147343,9 +147420,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147343
147420
  ordinal: existing?.ordinal ?? (yield* nextTurnItemOrdinal(projection)),
147344
147421
  status: pending ? "waiting" : input.signInStatus === "signed-in" ? "completed" : "cancelled",
147345
147422
  title: `${fields.serverName} needs sign-in`,
147346
- startedAt: existing?.startedAt ?? now$44,
147347
- completedAt: pending ? null : now$44,
147348
- updatedAt: now$44,
147423
+ startedAt: existing?.startedAt ?? now$31,
147424
+ completedAt: pending ? null : now$31,
147425
+ updatedAt: now$31,
147349
147426
  type: "mcp_sign_in_request",
147350
147427
  serverId: fields.serverId,
147351
147428
  serverName: fields.serverName,
@@ -147358,7 +147435,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147358
147435
  runId: run.id,
147359
147436
  nodeId: run.rootNodeId,
147360
147437
  providerInstanceId: run.providerInstanceId,
147361
- occurredAt: now$44,
147438
+ occurredAt: now$31,
147362
147439
  payload: turnItem
147363
147440
  });
147364
147441
  });
@@ -147447,11 +147524,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147447
147524
  cause: "Enter an answer before sending."
147448
147525
  });
147449
147526
  }
147450
- const now$12 = yield* now;
147527
+ const now$50 = yield* now;
147451
147528
  const resolvedRequest = {
147452
147529
  ...runtimeRequest,
147453
147530
  status: "resolved",
147454
- resolvedAt: now$12,
147531
+ resolvedAt: now$50,
147455
147532
  ...command.decision === void 0 ? {} : { decision: command.decision },
147456
147533
  ...command.answers === void 0 ? {} : { answers: command.answers }
147457
147534
  };
@@ -147466,7 +147543,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147466
147543
  driver: providerSession.driver,
147467
147544
  providerInstanceId: providerSession.providerInstanceId
147468
147545
  },
147469
- occurredAt: now$12,
147546
+ occurredAt: now$50,
147470
147547
  payload: resolvedRequest
147471
147548
  });
147472
147549
  if (requestNode !== void 0) yield* emitEvent({
@@ -147478,11 +147555,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147478
147555
  driver: providerSession.driver,
147479
147556
  providerInstanceId: providerSession.providerInstanceId
147480
147557
  },
147481
- occurredAt: now$12,
147558
+ occurredAt: now$50,
147482
147559
  payload: {
147483
147560
  ...requestNode,
147484
147561
  status: resolvedNodeStatus,
147485
- completedAt: now$12
147562
+ completedAt: now$50
147486
147563
  }
147487
147564
  });
147488
147565
  if (approvalTurnItem !== void 0) yield* emitEvent({
@@ -147494,7 +147571,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147494
147571
  driver: providerSession.driver,
147495
147572
  providerInstanceId: providerSession.providerInstanceId
147496
147573
  },
147497
- occurredAt: now$12,
147574
+ occurredAt: now$50,
147498
147575
  payload: {
147499
147576
  ...approvalTurnItem,
147500
147577
  ...approvalTurnItem.type === "user_input_request" && command.answers !== void 0 ? { questionAnswer: {
@@ -147504,8 +147581,8 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147504
147581
  questionTextById: Object.fromEntries(approvalTurnItem.questions.map((question) => [question.id, question.question]))
147505
147582
  } } : {},
147506
147583
  status: resolvedNodeStatus,
147507
- completedAt: now$12,
147508
- updatedAt: now$12
147584
+ completedAt: now$50,
147585
+ updatedAt: now$50
147509
147586
  }
147510
147587
  });
147511
147588
  if (runtimeRequest.responseCapability.type === "message") {
@@ -147615,7 +147692,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147615
147692
  commandType: command.type,
147616
147693
  cause: "Automatic completion deliveries cannot be promoted to Steer."
147617
147694
  });
147618
- const now$47 = yield* now;
147695
+ const now$35 = yield* now;
147619
147696
  const emitEvent = emit(events, command);
147620
147697
  const parsedGoalCommand = parseGoalCommand(queuedMessage);
147621
147698
  const goalCommand = parsedGoalCommand === null || (yield* goalDriverFor(command, queuedRun.providerInstanceId)) === void 0 ? null : parsedGoalCommand;
@@ -147630,7 +147707,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147630
147707
  runId: queuedRun.id,
147631
147708
  nodeId: queuedRootNode.id,
147632
147709
  providerInstanceId: queuedRun.providerInstanceId,
147633
- occurredAt: now$47,
147710
+ occurredAt: now$35,
147634
147711
  payload: {
147635
147712
  ...queuedRun,
147636
147713
  queuePosition: 1
@@ -147644,7 +147721,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147644
147721
  projection,
147645
147722
  queuedRunId: queuedRun.id,
147646
147723
  targetRunId: stops ? target.id : void 0,
147647
- now: now$47
147724
+ now: now$35
147648
147725
  });
147649
147726
  }
147650
147727
  yield* emitEvent({
@@ -147653,12 +147730,12 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147653
147730
  runId: queuedRun.id,
147654
147731
  nodeId: queuedRootNode.id,
147655
147732
  providerInstanceId: queuedRun.providerInstanceId,
147656
- occurredAt: now$47,
147733
+ occurredAt: now$35,
147657
147734
  payload: {
147658
147735
  ...queuedRun,
147659
147736
  status: "cancelled",
147660
147737
  queuePosition: null,
147661
- completedAt: now$47
147738
+ completedAt: now$35
147662
147739
  }
147663
147740
  });
147664
147741
  yield* emitEvent({
@@ -147667,11 +147744,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147667
147744
  runId: queuedRun.id,
147668
147745
  nodeId: queuedRootNode.id,
147669
147746
  providerInstanceId: queuedRun.providerInstanceId,
147670
- occurredAt: now$47,
147747
+ occurredAt: now$35,
147671
147748
  payload: {
147672
147749
  ...queuedAttempt,
147673
147750
  status: "cancelled",
147674
- completedAt: now$47
147751
+ completedAt: now$35
147675
147752
  }
147676
147753
  });
147677
147754
  yield* emitEvent({
@@ -147680,11 +147757,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147680
147757
  runId: queuedRun.id,
147681
147758
  nodeId: queuedRootNode.id,
147682
147759
  providerInstanceId: queuedRun.providerInstanceId,
147683
- occurredAt: now$47,
147760
+ occurredAt: now$35,
147684
147761
  payload: {
147685
147762
  ...queuedRootNode,
147686
147763
  status: "cancelled",
147687
- completedAt: now$47
147764
+ completedAt: now$35
147688
147765
  }
147689
147766
  });
147690
147767
  yield* dispatchSteerIntoRun({
@@ -147742,7 +147819,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147742
147819
  moving,
147743
147820
  ...withoutMoving.slice(beforeIndex)
147744
147821
  ];
147745
- const now$50 = yield* now;
147822
+ const now$39 = yield* now;
147746
147823
  const emitEvent = emit(events, command);
147747
147824
  yield* forEach(reordered, (run, index) => gen$1(function* () {
147748
147825
  const queuePosition = index + 1;
@@ -147753,7 +147830,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147753
147830
  runId: run.id,
147754
147831
  ...run.rootNodeId === null ? {} : { nodeId: run.rootNodeId },
147755
147832
  providerInstanceId: run.providerInstanceId,
147756
- occurredAt: now$50,
147833
+ occurredAt: now$39,
147757
147834
  payload: {
147758
147835
  ...run,
147759
147836
  queuePosition
@@ -147784,20 +147861,20 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147784
147861
  });
147785
147862
  const queuedMessage = projection.messages.find((candidate) => candidate.id === queuedRun.userMessageId);
147786
147863
  if (queuedMessage?.delegatedCompletion !== void 0) {
147787
- const now$45 = yield* now;
147864
+ const now$32 = yield* now;
147788
147865
  yield* disposeDelegatedCompletionCohort({
147789
147866
  command,
147790
147867
  events,
147791
147868
  projection,
147792
147869
  parentRunId: queuedMessage.delegatedCompletion.parentRunId,
147793
147870
  disposition: "disposed",
147794
- now: now$45
147871
+ now: now$32
147795
147872
  });
147796
147873
  return;
147797
147874
  }
147798
147875
  const queuedRootNode = queuedRun.rootNodeId === null ? void 0 : projection.nodes.find((candidate) => candidate.id === queuedRun.rootNodeId);
147799
147876
  const queuedAttempt = queuedRun.activeAttemptId === null ? void 0 : projection.attempts.find((candidate) => candidate.id === queuedRun.activeAttemptId);
147800
- const now$10 = yield* now;
147877
+ const now$33 = yield* now;
147801
147878
  const emitEvent = emit(events, command);
147802
147879
  yield* emitEvent({
147803
147880
  type: "run.updated",
@@ -147805,12 +147882,12 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147805
147882
  runId: queuedRun.id,
147806
147883
  ...queuedRun.rootNodeId === null ? {} : { nodeId: queuedRun.rootNodeId },
147807
147884
  providerInstanceId: queuedRun.providerInstanceId,
147808
- occurredAt: now$10,
147885
+ occurredAt: now$33,
147809
147886
  payload: {
147810
147887
  ...queuedRun,
147811
147888
  status: "cancelled",
147812
147889
  queuePosition: null,
147813
- completedAt: now$10
147890
+ completedAt: now$33
147814
147891
  }
147815
147892
  });
147816
147893
  if (queuedAttempt !== void 0 && queuedRootNode !== void 0) yield* emitEvent({
@@ -147819,11 +147896,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147819
147896
  runId: queuedRun.id,
147820
147897
  nodeId: queuedRootNode.id,
147821
147898
  providerInstanceId: queuedRun.providerInstanceId,
147822
- occurredAt: now$10,
147899
+ occurredAt: now$33,
147823
147900
  payload: {
147824
147901
  ...queuedAttempt,
147825
147902
  status: "cancelled",
147826
- completedAt: now$10
147903
+ completedAt: now$33
147827
147904
  }
147828
147905
  });
147829
147906
  if (queuedRootNode !== void 0) yield* emitEvent({
@@ -147832,11 +147909,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147832
147909
  runId: queuedRun.id,
147833
147910
  nodeId: queuedRootNode.id,
147834
147911
  providerInstanceId: queuedRun.providerInstanceId,
147835
- occurredAt: now$10,
147912
+ occurredAt: now$33,
147836
147913
  payload: {
147837
147914
  ...queuedRootNode,
147838
147915
  status: "cancelled",
147839
- completedAt: now$10
147916
+ completedAt: now$33
147840
147917
  }
147841
147918
  });
147842
147919
  });
@@ -147879,7 +147956,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147879
147956
  attachments: command.attachments ?? queuedMessage.attachments
147880
147957
  }, queuedRun.providerInstanceId);
147881
147958
  const queuedTurnItem = projection.turnItems.find((candidate) => candidate.type === "user_message" && candidate.messageId === queuedMessage.id);
147882
- const now$52 = yield* now;
147959
+ const now$42 = yield* now;
147883
147960
  const emitEvent = emit(events, command);
147884
147961
  const editedAttachments = command.attachments === void 0 ? {} : { attachments: command.attachments };
147885
147962
  yield* emitEvent({
@@ -147888,13 +147965,13 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147888
147965
  runId: queuedRun.id,
147889
147966
  ...queuedRun.rootNodeId === null ? {} : { nodeId: queuedRun.rootNodeId },
147890
147967
  providerInstanceId: queuedRun.providerInstanceId,
147891
- occurredAt: now$52,
147968
+ occurredAt: now$42,
147892
147969
  payload: {
147893
147970
  ...queuedMessage,
147894
147971
  text: command.text,
147895
147972
  ...editedAttachments,
147896
147973
  ...command.context ? { context: command.context } : {},
147897
- updatedAt: now$52
147974
+ updatedAt: now$42
147898
147975
  }
147899
147976
  });
147900
147977
  if (queuedTurnItem !== void 0 && queuedTurnItem.type === "user_message") yield* emitEvent({
@@ -147903,13 +147980,13 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147903
147980
  runId: queuedRun.id,
147904
147981
  ...queuedRun.rootNodeId === null ? {} : { nodeId: queuedRun.rootNodeId },
147905
147982
  providerInstanceId: queuedRun.providerInstanceId,
147906
- occurredAt: now$52,
147983
+ occurredAt: now$42,
147907
147984
  payload: {
147908
147985
  ...queuedTurnItem,
147909
147986
  text: command.text,
147910
147987
  ...editedAttachments,
147911
147988
  ...command.context ? { context: command.context } : {},
147912
- updatedAt: now$52
147989
+ updatedAt: now$42
147913
147990
  }
147914
147991
  });
147915
147992
  });
@@ -147949,18 +148026,18 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147949
148026
  commandType: command.type,
147950
148027
  cause: `Run ${command.runId} is not awaiting workspace preparation.`
147951
148028
  });
147952
- const now$43 = yield* now;
148029
+ const now$30 = yield* now;
147953
148030
  yield* emit(events, command)({
147954
148031
  type: "turn-item.updated",
147955
148032
  threadId: command.threadId,
147956
148033
  runId: state.run.id,
147957
148034
  nodeId: state.rootNode.id,
147958
148035
  providerInstanceId: state.run.providerInstanceId,
147959
- occurredAt: now$43,
148036
+ occurredAt: now$30,
147960
148037
  payload: {
147961
148038
  ...state.preparationItem,
147962
148039
  title: command.phase === "worktree" ? "Preparing worktree" : "Starting setup script",
147963
- updatedAt: now$43
148040
+ updatedAt: now$30
147964
148041
  }
147965
148042
  });
147966
148043
  });
@@ -147981,7 +148058,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147981
148058
  commandType: command.type,
147982
148059
  cause: `Run ${command.runId} is not awaiting workspace preparation.`
147983
148060
  });
147984
- const now$32 = yield* now;
148061
+ const now$19 = yield* now;
147985
148062
  const resolvedRuntimePolicy = yield* runtimePolicy.resolve({
147986
148063
  thread: projection.thread,
147987
148064
  modelSelection: state.run.modelSelection
@@ -147992,7 +148069,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
147992
148069
  rootNodeId: state.rootNode.id,
147993
148070
  providerThreadId: state.providerThread.id,
147994
148071
  cwd: resolvedRuntimePolicy.cwd ?? projection.thread.worktreePath ?? process.cwd(),
147995
- createdAt: now$32
148072
+ createdAt: now$19
147996
148073
  }).pipe(mapDispatchError(command));
147997
148074
  const emitEvent = emit(events, command);
147998
148075
  yield* emitEvent({
@@ -148001,7 +148078,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148001
148078
  runId: state.run.id,
148002
148079
  nodeId: state.rootNode.id,
148003
148080
  providerInstanceId: state.run.providerInstanceId,
148004
- occurredAt: now$32,
148081
+ occurredAt: now$19,
148005
148082
  payload: checkpointScope
148006
148083
  });
148007
148084
  yield* emitEvent({
@@ -148010,7 +148087,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148010
148087
  runId: state.run.id,
148011
148088
  nodeId: state.rootNode.id,
148012
148089
  providerInstanceId: state.run.providerInstanceId,
148013
- occurredAt: now$32,
148090
+ occurredAt: now$19,
148014
148091
  payload: {
148015
148092
  ...state.rootNode,
148016
148093
  checkpointScopeId: checkpointScope.id
@@ -148022,15 +148099,15 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148022
148099
  runId: state.run.id,
148023
148100
  nodeId: state.rootNode.id,
148024
148101
  providerInstanceId: state.run.providerInstanceId,
148025
- occurredAt: now$32,
148102
+ occurredAt: now$19,
148026
148103
  payload: {
148027
148104
  ...state.preparationItem,
148028
148105
  status: "completed",
148029
148106
  title: "Workspace ready",
148030
148107
  output: "Workspace preparation completed.",
148031
148108
  exitCode: 0,
148032
- completedAt: now$32,
148033
- updatedAt: now$32
148109
+ completedAt: now$19,
148110
+ updatedAt: now$19
148034
148111
  }
148035
148112
  });
148036
148113
  yield* emitEvent({
@@ -148039,7 +148116,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148039
148116
  runId: state.run.id,
148040
148117
  nodeId: state.rootNode.id,
148041
148118
  providerInstanceId: state.run.providerInstanceId,
148042
- occurredAt: now$32,
148119
+ occurredAt: now$19,
148043
148120
  payload: {
148044
148121
  ...state.run,
148045
148122
  status: "starting"
@@ -148072,7 +148149,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148072
148149
  commandType: command.type,
148073
148150
  cause: `Run ${command.runId} is not awaiting workspace preparation.`
148074
148151
  });
148075
- const now$7 = yield* now;
148152
+ const now$46 = yield* now;
148076
148153
  const emitEvent = emit(events, command);
148077
148154
  yield* emitEvent({
148078
148155
  type: "run-attempt.updated",
@@ -148080,11 +148157,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148080
148157
  runId: state.run.id,
148081
148158
  nodeId: state.rootNode.id,
148082
148159
  providerInstanceId: state.run.providerInstanceId,
148083
- occurredAt: now$7,
148160
+ occurredAt: now$46,
148084
148161
  payload: {
148085
148162
  ...state.attempt,
148086
148163
  status: "failed",
148087
- completedAt: now$7
148164
+ completedAt: now$46
148088
148165
  }
148089
148166
  });
148090
148167
  yield* emitEvent({
@@ -148093,11 +148170,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148093
148170
  runId: state.run.id,
148094
148171
  nodeId: state.rootNode.id,
148095
148172
  providerInstanceId: state.run.providerInstanceId,
148096
- occurredAt: now$7,
148173
+ occurredAt: now$46,
148097
148174
  payload: {
148098
148175
  ...state.rootNode,
148099
148176
  status: "failed",
148100
- completedAt: now$7
148177
+ completedAt: now$46
148101
148178
  }
148102
148179
  });
148103
148180
  yield* emitEvent({
@@ -148106,15 +148183,15 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148106
148183
  runId: state.run.id,
148107
148184
  nodeId: state.rootNode.id,
148108
148185
  providerInstanceId: state.run.providerInstanceId,
148109
- occurredAt: now$7,
148186
+ occurredAt: now$46,
148110
148187
  payload: {
148111
148188
  ...state.preparationItem,
148112
148189
  status: "failed",
148113
148190
  title: "Workspace preparation failed",
148114
148191
  output: command.failure.message,
148115
148192
  exitCode: 1,
148116
- completedAt: now$7,
148117
- updatedAt: now$7
148193
+ completedAt: now$46,
148194
+ updatedAt: now$46
148118
148195
  }
148119
148196
  });
148120
148197
  yield* emitEvent({
@@ -148123,7 +148200,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148123
148200
  runId: state.run.id,
148124
148201
  nodeId: state.rootNode.id,
148125
148202
  providerInstanceId: state.run.providerInstanceId,
148126
- occurredAt: now$7,
148203
+ occurredAt: now$46,
148127
148204
  payload: {
148128
148205
  id: idAllocator.derive.turnItemFromProviderItem({
148129
148206
  driver: state.providerThread.driver,
@@ -148139,9 +148216,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148139
148216
  ordinal: yield* nextTurnItemOrdinal(projection),
148140
148217
  status: "failed",
148141
148218
  title: "Workspace preparation failed",
148142
- startedAt: now$7,
148143
- completedAt: now$7,
148144
- updatedAt: now$7,
148219
+ startedAt: now$46,
148220
+ completedAt: now$46,
148221
+ updatedAt: now$46,
148145
148222
  type: "error",
148146
148223
  failure: {
148147
148224
  ...command.failure,
@@ -148155,11 +148232,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148155
148232
  runId: state.run.id,
148156
148233
  nodeId: state.rootNode.id,
148157
148234
  providerInstanceId: state.run.providerInstanceId,
148158
- occurredAt: now$7,
148235
+ occurredAt: now$46,
148159
148236
  payload: {
148160
148237
  ...state.run,
148161
148238
  status: "failed",
148162
- completedAt: now$7
148239
+ completedAt: now$46
148163
148240
  }
148164
148241
  });
148165
148242
  });
@@ -148191,14 +148268,14 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148191
148268
  commandType: command.type,
148192
148269
  cause: "Another run is active on this thread."
148193
148270
  });
148194
- const now$23 = yield* now;
148271
+ const now$11 = yield* now;
148195
148272
  const emitEvent = emit(events, command);
148196
148273
  const scope = {
148197
148274
  threadId: command.threadId,
148198
148275
  runId: state.run.id,
148199
148276
  nodeId: state.rootNode.id,
148200
148277
  providerInstanceId: state.run.providerInstanceId,
148201
- occurredAt: now$23
148278
+ occurredAt: now$11
148202
148279
  };
148203
148280
  yield* emitEvent({
148204
148281
  ...scope,
@@ -148206,7 +148283,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148206
148283
  payload: {
148207
148284
  ...failureItem,
148208
148285
  status: "cancelled",
148209
- updatedAt: now$23
148286
+ updatedAt: now$11
148210
148287
  }
148211
148288
  });
148212
148289
  yield* emitEvent({
@@ -148217,7 +148294,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148217
148294
  status: "running",
148218
148295
  title: WORKSPACE_PREPARATION_INPUT,
148219
148296
  completedAt: null,
148220
- updatedAt: now$23
148297
+ updatedAt: now$11
148221
148298
  }
148222
148299
  });
148223
148300
  yield* emitEvent({
@@ -148255,7 +148332,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148255
148332
  threadId: command.threadId,
148256
148333
  runId: run.id,
148257
148334
  providerInstanceId: run.providerInstanceId,
148258
- occurredAt: now$23,
148335
+ occurredAt: now$11,
148259
148336
  payload: {
148260
148337
  ...run,
148261
148338
  queueHeld: false
@@ -148665,7 +148742,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148665
148742
  "running",
148666
148743
  "waiting"
148667
148744
  ].includes(subagent.status) || subagent.startedAt !== null && toEpochMillis(subagent.startedAt) > toEpochMillis(command.subagent.stoppedAt)) return;
148668
- const now$48 = yield* now;
148745
+ const now$36 = yield* now;
148669
148746
  const allocateEventId = () => idAllocator.allocate.event({
148670
148747
  threadId: command.threadId,
148671
148748
  commandId: command.commandId
@@ -148676,7 +148753,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148676
148753
  result: outcome.result,
148677
148754
  status: outcome.status,
148678
148755
  completedAt: outcome.completedAt,
148679
- now: now$48,
148756
+ now: now$36,
148680
148757
  emitted: yield* get$7(events),
148681
148758
  allocateEventId
148682
148759
  }).pipe(mapDispatchError(command));
@@ -148697,7 +148774,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148697
148774
  projection: child,
148698
148775
  status: outcome.status,
148699
148776
  completedAt: outcome.completedAt,
148700
- now: now$48,
148777
+ now: now$36,
148701
148778
  emitted: yield* get$7(events),
148702
148779
  allocateEventId
148703
148780
  }).pipe(mapDispatchError(command));
@@ -148713,7 +148790,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148713
148790
  "starting",
148714
148791
  "running"
148715
148792
  ].includes(stoppedRun.status) && stoppedRun.activeAttemptId !== stopped.providerTurn?.runAttemptId) return;
148716
- const now$13 = yield* now;
148793
+ const now$37 = yield* now;
148717
148794
  if (stopped.providerTurn !== void 0 && stoppedRun.status === "running") {
148718
148795
  const output = yield* projectionStore.getThreadRecords(command.threadId, ["messages"], {
148719
148796
  messageRunIds: [stoppedRun.id],
@@ -148728,7 +148805,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148728
148805
  providerTurn: stopped.providerTurn,
148729
148806
  events,
148730
148807
  effects,
148731
- now: now$13
148808
+ now: now$37
148732
148809
  });
148733
148810
  }
148734
148811
  if (projection.runs.some((run) => run.id !== stoppedRun.id && (run.status === "preparing" || run.status === "starting" || run.status === "running"))) return;
@@ -148738,7 +148815,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148738
148815
  projection,
148739
148816
  stoppedProviderThreadId: command.providerThreadId,
148740
148817
  throughRunOrdinal: stoppedRun.ordinal,
148741
- now: now$13
148818
+ now: now$37
148742
148819
  });
148743
148820
  });
148744
148821
  const dispatchSubagentStop = (command, events, effects) => gen$1(function* () {
@@ -148769,17 +148846,17 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148769
148846
  });
148770
148847
  const providerSessionId = providerThread.providerSessionId;
148771
148848
  const nativeTaskId = subagent.nativeTaskRef.nativeId;
148772
- const now$51 = yield* now;
148849
+ const now$40 = yield* now;
148773
148850
  yield* emit(events, command)({
148774
148851
  type: "subagent.updated",
148775
148852
  threadId: command.threadId,
148776
148853
  runId: command.runId,
148777
148854
  nodeId: subagent.id,
148778
148855
  providerInstanceId: subagent.providerInstanceId,
148779
- occurredAt: now$51,
148856
+ occurredAt: now$40,
148780
148857
  payload: {
148781
148858
  ...subagent,
148782
- updatedAt: now$51
148859
+ updatedAt: now$40
148783
148860
  }
148784
148861
  });
148785
148862
  yield* update$4(effects, (existing) => [...existing, {
@@ -148839,7 +148916,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148839
148916
  commandType: command.type,
148840
148917
  cause: `Run ${command.runId} is not interruptible.`
148841
148918
  });
148842
- const now$49 = yield* now;
148919
+ const now$38 = yield* now;
148843
148920
  const completionMessage = projection.messages.find((candidate) => candidate.id === run.userMessageId);
148844
148921
  const completionCohortRunId = completionMessage?.delegatedCompletion?.parentRunId ?? run.id;
148845
148922
  const stopRemainingWork = () => command.holdQueue === true ? holdStoppedThread({
@@ -148847,7 +148924,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148847
148924
  events,
148848
148925
  projection,
148849
148926
  cohortRunIds: [completionCohortRunId],
148850
- now: now$49
148927
+ now: now$38
148851
148928
  }) : gen$1(function* () {
148852
148929
  for (const parentRunId of /* @__PURE__ */ new Set([completionCohortRunId, run.id])) yield* disposeDelegatedCompletionCohort({
148853
148930
  command,
@@ -148855,7 +148932,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148855
148932
  projection: yield* getProjectionWithPendingEvents(command.threadId, events),
148856
148933
  parentRunId,
148857
148934
  disposition: "stopped",
148858
- now: now$49,
148935
+ now: now$38,
148859
148936
  ...parentRunId !== run.id && completionMessage?.delegatedCompletion !== void 0 ? { interruptedWakeTaskIds: completionMessage.delegatedCompletion.taskIds } : {}
148860
148937
  });
148861
148938
  });
@@ -148875,9 +148952,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148875
148952
  ordinal: yield* nextTurnItemOrdinal(projection),
148876
148953
  status: "completed",
148877
148954
  title: "Interrupt requested",
148878
- startedAt: now$49,
148879
- completedAt: now$49,
148880
- updatedAt: now$49,
148955
+ startedAt: now$38,
148956
+ completedAt: now$38,
148957
+ updatedAt: now$38,
148881
148958
  type: "run_interrupt_request",
148882
148959
  message: command.reason ?? "Interrupt requested"
148883
148960
  };
@@ -148939,9 +149016,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148939
149016
  ordinal: interruptRequestItem.ordinal + 1,
148940
149017
  status: "interrupted",
148941
149018
  title: "Interrupted",
148942
- startedAt: now$49,
148943
- completedAt: now$49,
148944
- updatedAt: now$49,
149019
+ startedAt: now$38,
149020
+ completedAt: now$38,
149021
+ updatedAt: now$38,
148945
149022
  type: "run_interrupt_result",
148946
149023
  message: "Run interrupted before provider start"
148947
149024
  };
@@ -148951,7 +149028,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148951
149028
  runId: run.id,
148952
149029
  nodeId: rootNode.id,
148953
149030
  providerInstanceId: run.providerInstanceId,
148954
- occurredAt: now$49,
149031
+ occurredAt: now$38,
148955
149032
  payload: interruptRequestItem
148956
149033
  });
148957
149034
  yield* emitEvent({
@@ -148960,7 +149037,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148960
149037
  runId: run.id,
148961
149038
  nodeId: rootNode.id,
148962
149039
  providerInstanceId: run.providerInstanceId,
148963
- occurredAt: now$49,
149040
+ occurredAt: now$38,
148964
149041
  payload: interruptResultItem
148965
149042
  });
148966
149043
  const preparationItem = projection.turnItems.find((candidate) => candidate.runId === run.id && candidate.type === "command_execution" && candidate.input === WORKSPACE_PREPARATION_INPUT && candidate.status === "running");
@@ -148970,14 +149047,14 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148970
149047
  runId: run.id,
148971
149048
  nodeId: rootNode.id,
148972
149049
  providerInstanceId: run.providerInstanceId,
148973
- occurredAt: now$49,
149050
+ occurredAt: now$38,
148974
149051
  payload: {
148975
149052
  ...preparationItem,
148976
149053
  status: "interrupted",
148977
149054
  title: "Workspace preparation interrupted",
148978
149055
  output: command.reason ?? "Interrupted before provider start",
148979
- completedAt: now$49,
148980
- updatedAt: now$49
149056
+ completedAt: now$38,
149057
+ updatedAt: now$38
148981
149058
  }
148982
149059
  });
148983
149060
  yield* emitEvent({
@@ -148986,11 +149063,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148986
149063
  runId: run.id,
148987
149064
  nodeId: rootNode.id,
148988
149065
  providerInstanceId: run.providerInstanceId,
148989
- occurredAt: now$49,
149066
+ occurredAt: now$38,
148990
149067
  payload: {
148991
149068
  ...attempt,
148992
149069
  status: "interrupted",
148993
- completedAt: now$49
149070
+ completedAt: now$38
148994
149071
  }
148995
149072
  });
148996
149073
  yield* emitEvent({
@@ -148999,11 +149076,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
148999
149076
  runId: run.id,
149000
149077
  nodeId: rootNode.id,
149001
149078
  providerInstanceId: run.providerInstanceId,
149002
- occurredAt: now$49,
149079
+ occurredAt: now$38,
149003
149080
  payload: {
149004
149081
  ...rootNode,
149005
149082
  status: "interrupted",
149006
- completedAt: now$49
149083
+ completedAt: now$38
149007
149084
  }
149008
149085
  });
149009
149086
  yield* emitEvent({
@@ -149012,11 +149089,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149012
149089
  runId: run.id,
149013
149090
  nodeId: rootNode.id,
149014
149091
  providerInstanceId: run.providerInstanceId,
149015
- occurredAt: now$49,
149092
+ occurredAt: now$38,
149016
149093
  payload: {
149017
149094
  ...run,
149018
149095
  status: "interrupted",
149019
- completedAt: now$49
149096
+ completedAt: now$38
149020
149097
  }
149021
149098
  });
149022
149099
  const supersededTurn = projection.providerTurns.findLast((candidate) => candidate.status === "running" && projection.attempts.some((attempt) => attempt.id === candidate.runAttemptId && attempt.runId === run.id));
@@ -149059,7 +149136,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149059
149136
  runId: run.id,
149060
149137
  nodeId: rootNode.id,
149061
149138
  providerInstanceId: run.providerInstanceId,
149062
- occurredAt: now$49,
149139
+ occurredAt: now$38,
149063
149140
  payload: interruptRequestItem
149064
149141
  });
149065
149142
  yield* stopRemainingWork();
@@ -149069,7 +149146,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149069
149146
  providerTurn,
149070
149147
  events,
149071
149148
  effects,
149072
- now: now$49
149149
+ now: now$38
149073
149150
  });
149074
149151
  yield* settleBackgroundWork({
149075
149152
  command,
@@ -149077,7 +149154,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149077
149154
  projection,
149078
149155
  stoppedProviderThreadId: providerThread.id,
149079
149156
  throughRunOrdinal: run.ordinal,
149080
- now: now$49
149157
+ now: now$38
149081
149158
  });
149082
149159
  yield* update$4(effects, (existing) => [...existing, ...otherProviderInterrupts]);
149083
149160
  return;
@@ -149100,7 +149177,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149100
149177
  runId: run.id,
149101
149178
  nodeId: rootNode.id,
149102
149179
  providerInstanceId: run.providerInstanceId,
149103
- occurredAt: now$49,
149180
+ occurredAt: now$38,
149104
149181
  payload: interruptRequestItem
149105
149182
  });
149106
149183
  yield* stopRemainingWork();
@@ -149228,18 +149305,18 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149228
149305
  const idle = idleChildren.get(task.childThreadId) ?? (!child.runs.some((run) => run.status === "queued" || isBlockingRun(run)) && !child.providerThreads.some((thread) => thread.status === "active" || (thread.pendingBackgroundTasks?.length ?? 0) > 0) && !child.runtimeRequests.some((request) => request.status === "pending") && child.turnItems.length === 0 && isNone(yield* findFirst(child.runs, awaitsRestartContinuation)));
149229
149306
  idleChildren.set(task.childThreadId, idle);
149230
149307
  if (!idle) continue;
149231
- const now$20 = yield* now;
149308
+ const now$8 = yield* now;
149232
149309
  const emitEvent = emit(events, command);
149233
149310
  yield* emitEvent({
149234
149311
  type: "subagent.updated",
149235
149312
  threadId: command.threadId,
149236
149313
  nodeId: task.id,
149237
- occurredAt: now$20,
149314
+ occurredAt: now$8,
149238
149315
  payload: {
149239
149316
  ...task,
149240
149317
  status: "cancelled",
149241
- completedAt: now$20,
149242
- updatedAt: now$20,
149318
+ completedAt: now$8,
149319
+ updatedAt: now$8,
149243
149320
  completionDelivery: {
149244
149321
  state: "disposed",
149245
149322
  observedByRunId: null
@@ -149252,11 +149329,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149252
149329
  type: "node.updated",
149253
149330
  threadId: command.threadId,
149254
149331
  nodeId: node.id,
149255
- occurredAt: now$20,
149332
+ occurredAt: now$8,
149256
149333
  payload: {
149257
149334
  ...node,
149258
149335
  status: "cancelled",
149259
- completedAt: now$20
149336
+ completedAt: now$8
149260
149337
  }
149261
149338
  });
149262
149339
  for (const item of projection.turnItems) {
@@ -149265,12 +149342,12 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149265
149342
  type: "turn-item.updated",
149266
149343
  threadId: command.threadId,
149267
149344
  nodeId: task.id,
149268
- occurredAt: now$20,
149345
+ occurredAt: now$8,
149269
149346
  payload: {
149270
149347
  ...item,
149271
149348
  status: "cancelled",
149272
- completedAt: now$20,
149273
- updatedAt: now$20
149349
+ completedAt: now$8,
149350
+ updatedAt: now$8
149274
149351
  }
149275
149352
  });
149276
149353
  }
@@ -149312,7 +149389,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149312
149389
  cause: interrupted.cause
149313
149390
  });
149314
149391
  }
149315
- const now$21 = yield* now;
149392
+ const now$9 = yield* now;
149316
149393
  const executed = latestExecutedRun(projection.runs);
149317
149394
  const reached = /* @__PURE__ */ new Map();
149318
149395
  if (target !== void 0) reached.set(target.id, target);
@@ -149322,14 +149399,14 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149322
149399
  events,
149323
149400
  thread: projection.thread,
149324
149401
  run,
149325
- now: now$21
149402
+ now: now$9
149326
149403
  });
149327
149404
  yield* holdStoppedThread({
149328
149405
  command,
149329
149406
  events,
149330
149407
  projection,
149331
149408
  cohortRunIds: [],
149332
- now: now$21
149409
+ now: now$9
149333
149410
  });
149334
149411
  yield* cancelIdleOrphans;
149335
149412
  });
@@ -149421,28 +149498,28 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149421
149498
  cause: `Cannot roll back provider thread ${providerThread.id} to checkpoint ${targetCheckpoint.id}: target provider turn ${targetProviderTurn.id} belongs to provider thread ${targetProviderTurn.providerThreadId}.`
149422
149499
  });
149423
149500
  }
149424
- const now$42 = yield* now;
149501
+ const now$29 = yield* now;
149425
149502
  yield* emit(events, command)({
149426
149503
  type: "thread.metadata-updated",
149427
149504
  threadId: command.threadId,
149428
149505
  providerInstanceId: projection.thread.providerInstanceId,
149429
- occurredAt: now$42,
149506
+ occurredAt: now$29,
149430
149507
  payload: {
149431
149508
  ...projection.thread,
149432
149509
  rollbackRequestId: command.commandId,
149433
149510
  rollbackFailure: null,
149434
- updatedAt: now$42
149511
+ updatedAt: now$29
149435
149512
  }
149436
149513
  });
149437
149514
  yield* emit(events, command)({
149438
149515
  type: "checkpoint.rollback-requested",
149439
149516
  threadId: command.threadId,
149440
149517
  providerInstanceId: modelSelection.instanceId,
149441
- occurredAt: now$42,
149518
+ occurredAt: now$29,
149442
149519
  payload: {
149443
149520
  scopeId: targetScope.id,
149444
149521
  checkpointId: targetCheckpoint.id,
149445
- requestedAt: now$42
149522
+ requestedAt: now$29
149446
149523
  }
149447
149524
  });
149448
149525
  yield* update$4(effects, (existing) => [...existing, {
@@ -149471,19 +149548,19 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149471
149548
  commandType: command.type,
149472
149549
  cause: `Rollback ${command.requestId} is no longer the thread's current rollback.`
149473
149550
  });
149474
- const now$53 = yield* now;
149551
+ const now$43 = yield* now;
149475
149552
  yield* emit(events, command)({
149476
149553
  type: "thread.metadata-updated",
149477
149554
  threadId: command.threadId,
149478
149555
  providerInstanceId: thread.providerInstanceId,
149479
- occurredAt: now$53,
149556
+ occurredAt: now$43,
149480
149557
  payload: {
149481
149558
  ...thread,
149482
149559
  rollbackFailure: {
149483
149560
  requestId: command.requestId,
149484
149561
  message: command.message
149485
149562
  },
149486
- updatedAt: now$53
149563
+ updatedAt: now$43
149487
149564
  }
149488
149565
  });
149489
149566
  });
@@ -149701,7 +149778,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149701
149778
  const task = parentProjection.subagents.find((candidate) => candidate.id === options.taskId && candidate.origin === "app_owned" && candidate.childThreadId === childThreadId);
149702
149779
  if (task === void 0) return;
149703
149780
  if (parentProjection.contextTransfers.find((transfer) => transfer.type === "subagent_result" && transfer.sourceThreadId === childThreadId && transfer.targetThreadId === parentThreadId && (transfer.sourcePoint.runId === childRun.id || options.taskId === forkedFrom.nodeId && transfer.sourcePoint.runId === void 0)) !== void 0) return;
149704
- const now$54 = yield* now;
149781
+ const now$44 = yield* now;
149705
149782
  const result = subagentResultForRun(childProjection, {
149706
149783
  ...childRun,
149707
149784
  status: outcome
@@ -149714,15 +149791,15 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149714
149791
  providerThreadId: childRun.providerThreadId,
149715
149792
  status: terminalStatus,
149716
149793
  result: result.text,
149717
- completedAt: now$54,
149718
- updatedAt: now$54
149794
+ completedAt: now$44,
149795
+ updatedAt: now$44
149719
149796
  };
149720
149797
  const completionPlan = yield* planDelegatedCompletionDelivery({
149721
149798
  parentProjection,
149722
149799
  parentRun,
149723
149800
  task,
149724
149801
  updatedTask,
149725
- now: now$54
149802
+ now: now$44
149726
149803
  });
149727
149804
  const resultTransferId = yield* idAllocator.allocate.contextTransfer({
149728
149805
  sourceThreadId: childThreadId,
@@ -149751,8 +149828,8 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149751
149828
  summaryMessageId: result.messageId,
149752
149829
  summaryText: result.text,
149753
149830
  createdByProviderInstanceId: childRun.providerInstanceId,
149754
- createdAt: now$54,
149755
- updatedAt: now$54
149831
+ createdAt: now$44,
149832
+ updatedAt: now$44
149756
149833
  };
149757
149834
  const resultTransfer = {
149758
149835
  id: resultTransferId,
@@ -149774,9 +149851,9 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149774
149851
  },
149775
149852
  createdBy: "system",
149776
149853
  error: null,
149777
- createdAt: now$54,
149778
- updatedAt: now$54,
149779
- consumedAt: now$54
149854
+ createdAt: now$44,
149855
+ updatedAt: now$44,
149856
+ consumedAt: now$44
149780
149857
  };
149781
149858
  const completionEvents = [
149782
149859
  {
@@ -149785,7 +149862,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149785
149862
  ...task.runId === null ? {} : { runId: task.runId },
149786
149863
  nodeId: task.id,
149787
149864
  driver: task.driver,
149788
- occurredAt: now$54,
149865
+ occurredAt: now$44,
149789
149866
  payload: completionPlan.task
149790
149867
  },
149791
149868
  ...completionPlan.parentRun === void 0 ? [] : [{
@@ -149794,7 +149871,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149794
149871
  runId: completionPlan.parentRun.id,
149795
149872
  ...completionPlan.parentRun.rootNodeId === null ? {} : { nodeId: completionPlan.parentRun.rootNodeId },
149796
149873
  providerInstanceId: completionPlan.parentRun.providerInstanceId,
149797
- occurredAt: now$54,
149874
+ occurredAt: now$44,
149798
149875
  payload: completionPlan.parentRun
149799
149876
  }],
149800
149877
  ...completionPlan.message === void 0 ? [] : [{
@@ -149803,7 +149880,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149803
149880
  ...completionPlan.message.runId === null ? {} : { runId: completionPlan.message.runId },
149804
149881
  ...completionPlan.message.nodeId === null ? {} : { nodeId: completionPlan.message.nodeId },
149805
149882
  providerInstanceId: completionPlan.parentRun?.providerInstanceId ?? parentProjection.thread.providerInstanceId,
149806
- occurredAt: now$54,
149883
+ occurredAt: now$44,
149807
149884
  payload: completionPlan.message
149808
149885
  }],
149809
149886
  ...parentNode === void 0 ? [] : [{
@@ -149812,12 +149889,12 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149812
149889
  ...parentNode.runId === null ? {} : { runId: parentNode.runId },
149813
149890
  nodeId: parentNode.id,
149814
149891
  driver: task.driver,
149815
- occurredAt: now$54,
149892
+ occurredAt: now$44,
149816
149893
  payload: {
149817
149894
  ...parentNode,
149818
149895
  status: terminalStatus,
149819
149896
  providerThreadId: childRun.providerThreadId,
149820
- completedAt: now$54
149897
+ completedAt: now$44
149821
149898
  }
149822
149899
  }],
149823
149900
  ...parentTurnItem === void 0 ? [] : [{
@@ -149826,13 +149903,13 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149826
149903
  ...parentTurnItem.runId === null ? {} : { runId: parentTurnItem.runId },
149827
149904
  ...parentTurnItem.nodeId === null ? {} : { nodeId: parentTurnItem.nodeId },
149828
149905
  driver: task.driver,
149829
- occurredAt: now$54,
149906
+ occurredAt: now$44,
149830
149907
  payload: {
149831
149908
  ...parentTurnItem,
149832
149909
  status: terminalStatus,
149833
149910
  result: result.text,
149834
- completedAt: now$54,
149835
- updatedAt: now$54
149911
+ completedAt: now$44,
149912
+ updatedAt: now$44
149836
149913
  }
149837
149914
  }],
149838
149915
  ...resultHandoff === null ? [] : [{
@@ -149840,7 +149917,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149840
149917
  threadId: parentThreadId,
149841
149918
  ...parentRun === void 0 ? {} : { runId: parentRun.id },
149842
149919
  providerInstanceId: childRun.providerInstanceId,
149843
- occurredAt: now$54,
149920
+ occurredAt: now$44,
149844
149921
  payload: resultHandoff
149845
149922
  }],
149846
149923
  {
@@ -149848,7 +149925,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149848
149925
  threadId: parentThreadId,
149849
149926
  ...parentRun === void 0 ? {} : { runId: parentRun.id },
149850
149927
  providerInstanceId: childRun.providerInstanceId,
149851
- occurredAt: now$54,
149928
+ occurredAt: now$44,
149852
149929
  payload: resultTransfer
149853
149930
  }
149854
149931
  ];
@@ -149895,7 +149972,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149895
149972
  const cohort = parentRun?.delegatedCompletion;
149896
149973
  const delivery = cohort?.delivery;
149897
149974
  if (parentRun === void 0 || cohort === void 0 || delivery === null || delivery === void 0 || delivery.messageId !== deliveryRun.userMessageId || delivery.generation !== messageOwnership.generation) return;
149898
- const now$9 = yield* now;
149975
+ const now$48 = yield* now;
149899
149976
  const nextTaskStates = /* @__PURE__ */ new Map();
149900
149977
  for (const task of projection.subagents) {
149901
149978
  if (task.origin !== "app_owned" || task.runId !== parentRun.id || !delivery.taskIds.includes(task.id) || task.completionDelivery?.state !== "claimed") continue;
@@ -149935,11 +150012,11 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149935
150012
  nodeId: task.id,
149936
150013
  driver: task.driver,
149937
150014
  providerInstanceId: task.providerInstanceId,
149938
- occurredAt: now$9,
150015
+ occurredAt: now$48,
149939
150016
  payload: {
149940
150017
  ...task,
149941
150018
  completionDelivery,
149942
- updatedAt: now$9
150019
+ updatedAt: now$48
149943
150020
  }
149944
150021
  }];
149945
150022
  });
@@ -149949,7 +150026,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149949
150026
  runId: updatedParentRun.id,
149950
150027
  ...updatedParentRun.rootNodeId === null ? {} : { nodeId: updatedParentRun.rootNodeId },
149951
150028
  providerInstanceId: updatedParentRun.providerInstanceId,
149952
- occurredAt: now$9,
150029
+ occurredAt: now$48,
149953
150030
  payload: updatedParentRun
149954
150031
  }]);
149955
150032
  if (nextDelivery !== null) yield* offerDelegatedCompletionDelivery(threadId, parentRun.id);
@@ -149960,13 +150037,13 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149960
150037
  const parentRun = projection.runs.find((run) => run.id === ownership?.parentRunId);
149961
150038
  const cohort = parentRun?.delegatedCompletion;
149962
150039
  const delivery = cohort?.delivery;
149963
- const now$37 = yield* now;
150040
+ const now$24 = yield* now;
149964
150041
  const emitEvent = emit(events, command);
149965
150042
  if (parentRun === void 0 || cohort === void 0 || cohort.disposition !== "open" || delivery == null || delivery.messageId !== command.messageId || delivery.generation !== ownership?.generation) {
149966
150043
  yield* emitEvent({
149967
150044
  type: "thread.metadata-updated",
149968
150045
  threadId: command.threadId,
149969
- occurredAt: now$37,
150046
+ occurredAt: now$24,
149970
150047
  payload: projection.thread
149971
150048
  });
149972
150049
  return;
@@ -149993,14 +150070,14 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
149993
150070
  nodeId: task.id,
149994
150071
  driver: task.driver,
149995
150072
  providerInstanceId: task.providerInstanceId,
149996
- occurredAt: now$37,
150073
+ occurredAt: now$24,
149997
150074
  payload: {
149998
150075
  ...task,
149999
150076
  completionDelivery: {
150000
150077
  state,
150001
150078
  observedByRunId: null
150002
150079
  },
150003
- updatedAt: now$37
150080
+ updatedAt: now$24
150004
150081
  }
150005
150082
  });
150006
150083
  }
@@ -150009,7 +150086,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
150009
150086
  threadId: command.threadId,
150010
150087
  runId: parentRun.id,
150011
150088
  providerInstanceId: parentRun.providerInstanceId,
150012
- occurredAt: now$37,
150089
+ occurredAt: now$24,
150013
150090
  payload: {
150014
150091
  ...parentRun,
150015
150092
  delegatedCompletion: {
@@ -150237,14 +150314,14 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
150237
150314
  commandType: command.type,
150238
150315
  cause: "Continue the limited thread before resuming its queue."
150239
150316
  });
150240
- const now$14 = yield* now;
150317
+ const now$51 = yield* now;
150241
150318
  const queued = projection.runs.filter((run) => run.status === "queued");
150242
150319
  for (const run of queued) yield* emit(events, command)({
150243
150320
  type: "run.updated",
150244
150321
  threadId: command.threadId,
150245
150322
  runId: run.id,
150246
150323
  providerInstanceId: run.providerInstanceId,
150247
- occurredAt: now$14,
150324
+ occurredAt: now$51,
150248
150325
  payload: {
150249
150326
  ...run,
150250
150327
  queueHeld: false
@@ -150253,7 +150330,7 @@ const makeOrchestrator = fn("orchestrationV2.Orchestrator.layer")(function* () {
150253
150330
  if (queued.length === 0) yield* emit(events, command)({
150254
150331
  type: "thread.metadata-updated",
150255
150332
  threadId: command.threadId,
150256
- occurredAt: now$14,
150333
+ occurredAt: now$51,
150257
150334
  payload: projection.thread
150258
150335
  });
150259
150336
  break;
@@ -161325,4 +161402,4 @@ const layer = mergeAll(layerOrchestratorProvided, layerMcpAppRequestsProvided, l
161325
161402
  const layerProduction = mergeAll(layer.pipe(provide(layerProjectService)), layerProjectService, layerManagedProjectFoldersProvided, layerThreadLaunchProvided, layerThreadLifecycleProvided, layerScheduledTaskProvided, layerScratchThreadPromotionProvided, layerSecretRequestsProvided, layer$1.pipe(provide(layerThreadManagementProvided)), layer$25.pipe(provide(mergeAll(layer$99, layerThreadManagementProvided))), layerProviderContinuationWorkerProvided, layerAgentSessionImporterProvided, layerPruneWorker.pipe(provide(layer$100))).pipe(provide(layer$10.pipe(provide(layerScheduledTaskProvided))), provide(layer$86), provideMerge(layerEventInfrastructure));
161326
161403
  export { PROJECT_FAVICON_FALLBACK_MARKER as $, layer$73 as $n, EMPTY_TOTALS as $t, ThreadManagementError as A, RpcSerialization as An, offer as Ar, makeCodexChatGptAuth as At, ProviderSessionManagerV2 as B, PtyAdapter as Bn, set$2 as Br, normalizeKey as Bt, ManagedProjectFolders as C, Protocol$3 as Cn, CheckpointStore as Cr, layer$53 as Ct, createTranscriptJsonReader as D, Protocol$4 as Dn, delegatedTaskProgress as Dr, layer$60 as Dt, layer$21 as E, makeProtocolWithHttpEffectWebsocket as En, parseTurnDiffFilesFromNumstat as Er, layer$56 as Et, latestRun as F, claudeSkillInvocation as Fn, make$65 as Fr, JWTClaimsBuilder as Ft, stringArray as G, withWorkspaceLease as Gn, make$71 as Gr, JWTInvalid as Gt, layer$32 as H, layer$68 as Hn, make$70 as Hr, isDisjoint as Ht, withCreationProvenance as I, AcpRegistryCatalog as In, update$2 as Ir, checkKeyType as It, layer$33 as J, BackgroundPolicy as Jn, encode$1 as Jt, stringRecord as K, TextGeneration as Kn, encode as Kt, OrchestratorV2 as L, layerFromHost as Ln, changes as Lr, validateCrit as Lt, isActiveRun as M, layerJson as Mn, take as Mr, codexCallbackUrl as Mt, isTerminalRunStatus as N, layerJsonRpc as Nn, unbounded as Nr, providerAuthReturnUrl as Nt, ProviderAuthService as O, make$49 as On, subagentResultForRun as Or, sameUsageLimitCommandCoverage as Ot, latestActiveRun as P, RequestId$1 as Pn, get$1 as Pr, jwtVerify as Pt, layer$37 as Q, layer$72 as Qn, layer$61 as Qt, OrchestratorV2Error as R, toAcpRegistryOperationError as Rn, get$2 as Rr, importPKCS8 as Rt, layer$18 as S, ProviderEventLoggers as Sn, checkpointRefForScopeOrdinal as Sr, layer$51 as St, AgentSessionScanner as T, makeProtocolWithHttpEffect as Tn, isGitImport as Tr, layer$55 as Tt, isRecord$1 as U, nodeRuntimeUnavailableMessage as Un, run as Ur, assertNotSet as Ut, McpRegistry as V, PtySpawnError as Vn, update$3 as Vr, sign as Vt, registryNameFor as W, resolveNodeExecutable as Wn, get$3 as Wr, JWSInvalid as Wt, layerObserver as X, layer$71 as Xn, codexPlanLabel as Xt, layerCallbackRoute as Y, layer$70 as Yn, CodexInstallation as Yt, WorkspaceEntries as Z, PullRequestService as Zn, codexRateLimitsToLimits as Zt, SecretRequests as _, isWorkspacePreviewEntryPath as _n, ProviderAdapterRegistryV2 as _r, layer$47 as _t, layerProjectService as a, ModelManifest as an, AgentScope as ar, layer$40 as at, layer$17 as b, mergeProviderInstanceEnvironment as bn, DispatchModeLimit as br, layer$49 as bt, ProviderRuntimeRecoveryService as c, resolveProviderCompatibility as cn, layer$79 as cr, ProviderRegistry as ct, layer$11 as d, openZipArchive as dn, clientModeCeiling as dr, TerminalManager as dt, claudeUsageResponseToLimits as en, layer$74 as er, isProjectFaviconPath as et, ScratchThreadPromotion as f, WORKSPACE_BROWSER_PREVIEW_EXTENSIONS as fn, hiddenWhileLinksOff as fr, layer$44 as ft, relayHookBaseUrl as g, isWorkspaceImagePreviewPath as gn, threadLinkFor as gr, PortDiscovery as gt, WEBHOOK_ROUTE_PREFIX as h, hostPreviewMimeTypeFromExtension as hn, requireThreadScope as hr, layer$46 as ht, layerProduction as i, BUNDLED_MODEL_MANIFEST as in, layer$77 as ir, GitWorkflowService as it, ThreadManagementService as j, jsonRpc as jn, shutdown as jr, codexAuthorizationRequest as jt, McpAppRequests as k, makeNoSerialization$1 as kn, clear as kr, withUsageLimitsCommands as kt, runDaemon as l, layer$63 as ln, MODE_LIMIT_HEADER as lr, layer$42 as lt, ScheduledTaskWebhookOrigin as m, audioMimeTypeFromExtension as mn, requireThreadMcpCapability as mr, layer$45 as mt, layerEventInfrastructure as n, COMPACTION_SUGGESTION_MIN_TOKENS as nn, layerAnalytics as nr, layer$39 as nt, layerProjectSetupScriptRunner as o, layer$62 as on, agentScopeCommand as or, GitManager as ot, ScheduledTaskService as p, WORKSPACE_IMAGE_PREVIEW_EXTENSIONS as pn, requireMcpCapability as pr, NativeTelemetryClient as pt, transportFromJsonEntry as q, layer$69 as qn, concat as qt, layerEventSink as r, readContainedWorkflowFile as rn, AnalyticsService as rr, layerAutoPullPolicy as rt, layerReports as s, layerModelCatalog as sn, McpSessionRegistry as sr, layer$41 as st, layer as t, makeEventNdjsonLogStore as tn, layer$75 as tr, VcsStatusBroadcaster as tt, PreviewManager as u, AntigravityInstallation as un, McpInvocationContext as ur, ProjectSetupScriptRunner as ut, ThreadLaunchService as v, makeUnavailableUsageLimits as vn, layerFromProviderInstanceRegistry as vr, deriveProviderInstanceConfigMap as vt, AgentSessionImporter as w, make$48 as wn, layer$85 as wr, layer$54 as wt, WorktreeSetupTracker as x, NoOpProviderEventLoggers as xn, runOutcome as xr, BUILT_IN_USAGE_DRIVERS as xt, Decisions as y, layer$64 as yn, ProviderInstanceRegistry as yr, layer$48 as yt, queuedRunsInDeliveryOrder as z, AcpRegistryRuntimeCoordinator as zn, make$66 as zr, importSPKI as zt };
161327
161404
 
161328
- //# sourceMappingURL=runtimeLayer-5R-ZfBsl.mjs.map
161405
+ //# sourceMappingURL=runtimeLayer-B9K2BVKV.mjs.map