ryco-cli 0.1.13 → 0.1.14

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 (215) hide show
  1. package/dist/{AcpNativeLogging-Ba9Nn9Re.mjs → AcpNativeLogging-D3fe64a6.mjs} +1 -1
  2. package/dist/{AcpNativeLogging-Be1KGJfF.cjs → AcpNativeLogging-vLtnq5f1.cjs} +1 -1
  3. package/dist/{AzureDevOpsSourceControlProvider-CVj-F-pW.cjs → AzureDevOpsSourceControlProvider-BtezW57t.cjs} +2 -2
  4. package/dist/{AzureDevOpsSourceControlProvider-CGlK6M0b.mjs → AzureDevOpsSourceControlProvider-WNUDtsur.mjs} +2 -2
  5. package/dist/{BitbucketSourceControlProvider-CEZEd4PX.cjs → BitbucketSourceControlProvider-BWzNM0jW.cjs} +2 -2
  6. package/dist/{BitbucketSourceControlProvider-BV6iRDi7.mjs → BitbucketSourceControlProvider-tbbUFKz3.mjs} +2 -2
  7. package/dist/{ClaudeDriver-lBU7EyUX.cjs → ClaudeDriver-BTvdJvam.cjs} +170 -7
  8. package/dist/{ClaudeDriver-rooMNrJz.mjs → ClaudeDriver-CG5ngU5z.mjs} +171 -8
  9. package/dist/{CodexDriver-DBz2rPXb.mjs → CodexDriver-49o7TA-C.mjs} +4 -4
  10. package/dist/{CodexDriver-CZCIJSLV.cjs → CodexDriver-CFxwJNXx.cjs} +3 -3
  11. package/dist/{CodexTextGeneration-BeG7ymPC.mjs → CodexTextGeneration-C0t4xcPO.mjs} +2 -2
  12. package/dist/{CodexTextGeneration-BvIcyD1P.cjs → CodexTextGeneration-CedcXf9a.cjs} +1 -1
  13. package/dist/{CopilotDriver-CX5zhEdZ.cjs → CopilotDriver-B8J_ovCX.cjs} +20 -16
  14. package/dist/{CopilotDriver-D36vbGbn.mjs → CopilotDriver-Cu1B1skB.mjs} +21 -17
  15. package/dist/{CursorDriver-DWuuOSkJ.mjs → CursorDriver-P_A8uQki.mjs} +4 -4
  16. package/dist/{CursorDriver-CPBVeesr.cjs → CursorDriver-zlKHPy1_.cjs} +3 -3
  17. package/dist/{ForgejoSourceControlProvider-CeN7Snfr.mjs → ForgejoSourceControlProvider-DLhJZtq9.mjs} +2 -2
  18. package/dist/{ForgejoSourceControlProvider-CzmmcAZO.cjs → ForgejoSourceControlProvider-szJ-dvsD.cjs} +2 -2
  19. package/dist/{GitHubSourceControlProvider-DfFR9O2o.cjs → GitHubSourceControlProvider-3ofb6HsF.cjs} +2 -2
  20. package/dist/{GitHubSourceControlProvider-Dmz1LJct.mjs → GitHubSourceControlProvider-D5MQQPCJ.mjs} +2 -2
  21. package/dist/{GitLabSourceControlProvider-C21lwphV.mjs → GitLabSourceControlProvider-DLkxeob5.mjs} +2 -2
  22. package/dist/{GitLabSourceControlProvider-DGoelNmL.cjs → GitLabSourceControlProvider-DkupZH5G.cjs} +2 -2
  23. package/dist/{GrokDriver-CIXj_4ry.cjs → GrokDriver-CTUNclwp.cjs} +3 -3
  24. package/dist/{GrokDriver-qKX1a63G.mjs → GrokDriver-D8KoMY76.mjs} +4 -4
  25. package/dist/{OpenCodeDriver-CbdswhqU.mjs → OpenCodeDriver-B7htxutj.mjs} +92 -27
  26. package/dist/{OpenCodeDriver-DDEuwtXl.cjs → OpenCodeDriver-pXM8bSct.cjs} +91 -26
  27. package/dist/{SourceControlProviderDiscoveryCatalog-DJWDCoup.cjs → SourceControlProviderDiscoveryCatalog-Bj_sZfmB.cjs} +1 -1
  28. package/dist/{SourceControlProviderDiscoveryCatalog-4_4yahsa.mjs → SourceControlProviderDiscoveryCatalog-C6Fn7rZE.mjs} +1 -1
  29. package/dist/bin.cjs +1113 -312
  30. package/dist/bin.mjs +1115 -315
  31. package/dist/client/assets/{AccountSettings-Be5_48k0.js → AccountSettings-CinnQaX-.js} +1 -1
  32. package/dist/client/assets/{AiFocusSettings-DIpQXLW2.js → AiFocusSettings-UbXOywZg.js} +1 -1
  33. package/dist/client/assets/{AnimatedHeight-BIsV_Z3J.js → AnimatedHeight-DCad8EQ2.js} +1 -1
  34. package/dist/client/assets/AppearanceSettings-CTh8Z8nz.js +1 -0
  35. package/dist/client/assets/{BranchToolbar.logic-D7slG_zJ.js → BranchToolbar.logic-37EnknDD.js} +1 -1
  36. package/dist/client/assets/ChatRightPanel-DUwLYKbp.js +27 -0
  37. package/dist/client/assets/{ChatThreadRouteView-CocRstME.js → ChatThreadRouteView-C43W0PEz.js} +1 -1
  38. package/dist/client/assets/CommandPaletteDialog-IHOe0hOG.js +1 -0
  39. package/dist/client/assets/{CompositeItem-F3NGn6aG.js → CompositeItem-ClLCuzeJ.js} +1 -1
  40. package/dist/client/assets/{CompositeRoot-CmJGfRtc.js → CompositeRoot-Bdsr9eHn.js} +1 -1
  41. package/dist/client/assets/{ConnectionsSettings-CXabxSaH.js → ConnectionsSettings-tmBjGOPj.js} +2 -2
  42. package/dist/client/assets/{DiagnosticsSettings-CZ3vY43G.js → DiagnosticsSettings-CbCEgaau.js} +1 -1
  43. package/dist/client/assets/{DialogHandle-C4uSr9wX.js → DialogHandle-CitVLvYq.js} +1 -1
  44. package/dist/client/assets/{DialogPopup-Dck8r8Hn.js → DialogPopup-CfaEr9jv.js} +1 -1
  45. package/dist/client/assets/DialogRoot-CyEOjgGH.js +1 -0
  46. package/dist/client/assets/{DialogTitle-CCedPAjV.js → DialogTitle-BUkU0qXf.js} +1 -1
  47. package/dist/client/assets/{DialogTrigger-CYJ7_YcV.js → DialogTrigger-CEjWue7M.js} +1 -1
  48. package/dist/client/assets/{DialogViewport-D-CrTM-P.js → DialogViewport-Cyc_ye5w.js} +1 -1
  49. package/dist/client/assets/{DraftChatThreadRouteView-D8Bt3Qnq.js → DraftChatThreadRouteView-BSA67nKa.js} +1 -1
  50. package/dist/client/assets/{ExternalIdentityWeb.logic-D64j70NH.js → ExternalIdentityWeb.logic-BqdBjAua.js} +1 -1
  51. package/dist/client/assets/GlassSurface-B3cq28tB.js +1 -0
  52. package/dist/client/assets/{HostedConnectionControls-DxAXv0Hd.js → HostedConnectionControls-S2Wr9fiZ.js} +1 -1
  53. package/dist/client/assets/HostedHubRoot-DK9zP4tJ.js +1 -0
  54. package/dist/client/assets/{HostedNativeAuthorizationRoute-CTQe7Vjt.js → HostedNativeAuthorizationRoute-CKnLbCOH.js} +1 -1
  55. package/dist/client/assets/{HostedRelayTrustNotice-BldMySVi.js → HostedRelayTrustNotice-CbF_SOpf.js} +1 -1
  56. package/dist/client/assets/{Icons-CT3nd2MA.js → Icons-DZpTOLIb.js} +1 -1
  57. package/dist/client/assets/{IntegrationsSettingsPanel-D6f3KoqM.js → IntegrationsSettingsPanel-BdBEGIyL.js} +1 -1
  58. package/dist/client/assets/KeybindingsSettings-Bye1H9Sx.js +7 -0
  59. package/dist/client/assets/{McpServersSettings-B7YqVvV4.js → McpServersSettings-D0U0g2q7.js} +1 -1
  60. package/dist/client/assets/{MobileSheet-CkeG6_SP.js → MobileSheet-BPvuTPR6.js} +1 -1
  61. package/dist/client/assets/{NewWorktreeDialog-CKr2ioue.js → NewWorktreeDialog-C_xJCZWF.js} +1 -1
  62. package/dist/client/assets/{NoActiveThreadState-BD-eNmfn.js → NoActiveThreadState-Cfn_Wwnf.js} +1 -1
  63. package/dist/client/assets/{NodeSecuritySettings-FWM_SeDi.js → NodeSecuritySettings-DUQNZJqJ.js} +1 -1
  64. package/dist/client/assets/{OpinionatedPluginsSettings-BtZQF4Ze.js → OpinionatedPluginsSettings-D44efcv7.js} +1 -1
  65. package/dist/client/assets/{PhoneGetAppInterstitial-CooQgpSw.js → PhoneGetAppInterstitial-CzduFI4-.js} +1 -1
  66. package/dist/client/assets/{PhoneGetAppInterstitialBackdrop-B8vfJdZd.js → PhoneGetAppInterstitialBackdrop-CJ44QRCp.js} +1 -1
  67. package/dist/client/assets/PhoneHome-BLEJm5TG.js +1 -0
  68. package/dist/client/assets/PhoneSettingsSurface-CqetLTIm.js +1 -0
  69. package/dist/client/assets/{ProjectFavicon-qZGdjYCM.js → ProjectFavicon-DrBXI2cH.js} +1 -1
  70. package/dist/client/assets/{ProviderModelPicker-D0w23uWo.js → ProviderModelPicker-CyID3P1C.js} +1 -1
  71. package/dist/client/assets/{ProviderUpdateLaunchNotification.logic-BkoRegCn.js → ProviderUpdateLaunchNotification.logic-C6VoLD-w.js} +1 -1
  72. package/dist/client/assets/ProvidersSettingsPanel-BHmpXUIM.js +1 -0
  73. package/dist/client/assets/{RedactedSensitiveText-CxtaUiKH.js → RedactedSensitiveText-CZwFEoNn.js} +1 -1
  74. package/dist/client/assets/RootAppShell-BVXRShhe.js +6 -0
  75. package/dist/client/assets/{RycoLetterMark-Bk0kvGJ_.js → RycoLetterMark-C-fvI9UB.js} +1 -1
  76. package/dist/client/assets/SettingsDialog-CnETTu23.js +1 -0
  77. package/dist/client/assets/{SettingsPanels-Dr4f2y9l.js → SettingsPanels-C3HDrmQq.js} +3 -3
  78. package/dist/client/assets/{SettingsPanels.editor-B2x4U4rW.js → SettingsPanels.editor-DI8Z5rsl.js} +1 -1
  79. package/dist/client/assets/SourceControlSettings-BG4tsvql.js +1 -0
  80. package/dist/client/assets/{StatisticsPage-Bjouapmf.js → StatisticsPage-dy_aYqvS.js} +1 -1
  81. package/dist/client/assets/{StatisticsPanel-D_khPph6.js → StatisticsPanel-CeRJBu65.js} +1 -1
  82. package/dist/client/assets/{StatisticsSettingsLink-Cx43bOeo.js → StatisticsSettingsLink-ChlwCDG0.js} +1 -1
  83. package/dist/client/assets/ThreadStatusIndicators-D-ioX09X.js +0 -0
  84. package/dist/client/assets/{ThreadTerminalDrawer-DDHEuRGB.js → ThreadTerminalDrawer-BvGaRxBP.js} +1 -1
  85. package/dist/client/assets/{ThreadWorkspacePanel-QF3KwbGm.js → ThreadWorkspacePanel-BAWm7mGl.js} +2 -2
  86. package/dist/client/assets/{ToolbarRootContext-BgqqXVly.js → ToolbarRootContext-k-_m5nCN.js} +1 -1
  87. package/dist/client/assets/{WorkItemsTab-AOVwVvb7.js → WorkItemsTab-Q2V2EuvK.js} +12 -12
  88. package/dist/client/assets/{alert-LqMhbdE9.js → alert-BymbRVPf.js} +1 -1
  89. package/dist/client/assets/{alert-dialog-DxoA6ky8.js → alert-dialog-Gym8_p4Q.js} +1 -1
  90. package/dist/client/assets/appearancePreferences-BhNRCg6W.js +1 -0
  91. package/dist/client/assets/authorization-BwQZHweJ.js +1 -0
  92. package/dist/client/assets/{badge-CXw6fWrB.js → badge-BQI7J3Sg.js} +1 -1
  93. package/dist/client/assets/{branding-BDfN6Spd.js → branding-DqHDcyzW.js} +1 -1
  94. package/dist/client/assets/{button-BAbJxRzt.js → button-Wf_1nfeu.js} +1 -1
  95. package/dist/client/assets/{capabilities-3zgirmmI.js → capabilities-BrllgEYz.js} +1 -1
  96. package/dist/client/assets/{chatThreadActions-DQ8aOQ1g.js → chatThreadActions-BGkJmj6T.js} +1 -1
  97. package/dist/client/assets/{collapsible-dxy6kc2k.js → collapsible-GOpRckDq.js} +1 -1
  98. package/dist/client/assets/{command-CGNKG_Oe.js → command-Dx5YM54H.js} +1 -1
  99. package/dist/client/assets/composerDraftStore-DC2r8dcu.js +11 -0
  100. package/dist/client/assets/{data-list-CYKBxN62.js → data-list-BSiCZBKn.js} +1 -1
  101. package/dist/client/assets/{desktopUpdateAtoms-CyfPW2jg.js → desktopUpdateAtoms-DkmoIGr0.js} +1 -1
  102. package/dist/client/assets/{desktopWorkspace-DHUZEpfy.js → desktopWorkspace-Ddm531g5.js} +1 -1
  103. package/dist/client/assets/{device-B_qvyvtW.js → device-B0aqBYM1.js} +1 -1
  104. package/dist/client/assets/{dialog-DQsYchqu.js → dialog-CUxw5AxI.js} +1 -1
  105. package/dist/client/assets/{draft-input-CkzOk8BY.js → draft-input-CpfrGQ1h.js} +1 -1
  106. package/dist/client/assets/editorPreferences-SOMXdQpi.js +1 -0
  107. package/dist/client/assets/{empty-DwzqNgCP.js → empty-D420OZA9.js} +1 -1
  108. package/dist/client/assets/{env-B4arEvJg.js → env-Bf33qXdb.js} +1 -1
  109. package/dist/client/assets/{getPseudoElementBounds-X62ElHN8.js → getPseudoElementBounds-nDGTWECG.js} +1 -1
  110. package/dist/client/assets/{group-D9ER9giz.js → group-Cq4Llttm.js} +1 -1
  111. package/dist/client/assets/{index-CQmEMMQH.js → index-BL8_ra0g.js} +2 -2
  112. package/dist/client/assets/{input-CHEwW3oH.js → input-Dl4N9ZfE.js} +1 -1
  113. package/dist/client/assets/{kbd-DCGQZk18.js → kbd-CqoZVQfv.js} +1 -1
  114. package/dist/client/assets/{keybindings-CWJ7E9ZI.js → keybindings-DQzcPjMv.js} +1 -1
  115. package/dist/client/assets/{label-CVFHsLFO.js → label-x5DgpBI_.js} +1 -1
  116. package/dist/client/assets/{lib-qiiNMGgU.js → lib-BXIqHSZx.js} +1 -1
  117. package/dist/client/assets/{liquidGlass-CPsvmaF0.js → liquidGlass-yFkZrRk5.js} +1 -1
  118. package/dist/client/assets/{logging-M8H3z7rQ.js → logging-CZlHfeu2.js} +1 -1
  119. package/dist/client/assets/main-B7T7on1T.css +2 -0
  120. package/dist/client/assets/main-J4YlUJad.js +9 -0
  121. package/dist/client/assets/{menu-Dvxh8sD5.js → menu-BuDpxm_Q.js} +1 -1
  122. package/dist/client/assets/{popover-CuH9Yrj3.js → popover-DuprDUaB.js} +1 -1
  123. package/dist/client/assets/primary-CJx2nSkc.js +2 -0
  124. package/dist/client/assets/projectPaths-DrelgodZ.js +1 -0
  125. package/dist/client/assets/{providerDriverMeta-I0TSo-QI.js → providerDriverMeta-D27Koh7Q.js} +1 -1
  126. package/dist/client/assets/{providerIconUtils-X0Z3EK-Q.js → providerIconUtils-CtOHwjWL.js} +1 -1
  127. package/dist/client/assets/providerInstances-BPwEwwpF.js +1 -0
  128. package/dist/client/assets/providerModels-BPwEwwpF.js +1 -0
  129. package/dist/client/assets/{qr-code-Bddq6K7S.js → qr-code-BVfzPOP3.js} +1 -1
  130. package/dist/client/assets/{radio-group-CBZFr4C8.js → radio-group-rgmJqPI7.js} +1 -1
  131. package/dist/client/assets/{resolveAriaLabelledBy-CD_ugzhJ.js → resolveAriaLabelledBy-l4SuqStl.js} +1 -1
  132. package/dist/client/assets/{rightPanelRouteSearch-DB5gQGHK.js → rightPanelRouteSearch-DmpObL1z.js} +1 -1
  133. package/dist/client/assets/runtime-DYzjhL5M.js +1 -0
  134. package/dist/client/assets/{scroll-area-Drsa8bNB.js → scroll-area-DMs8l4bb.js} +1 -1
  135. package/dist/client/assets/{scrollEdges-B-cqxY4l.js → scrollEdges-DWTOweRb.js} +1 -1
  136. package/dist/client/assets/{select-BYbVr-yg.js → select-Djwp8HDm.js} +1 -1
  137. package/dist/client/assets/{separator-CdS5bi4Z.js → separator-rjtf5Q3V.js} +1 -1
  138. package/dist/client/assets/{session-logic-GZix7S2I.js → session-logic-DLEAZb3K.js} +2 -2
  139. package/dist/client/assets/{settingsDialogStore-ygYoScKe.js → settingsDialogStore-Dbykwvfs.js} +1 -1
  140. package/dist/client/assets/{settingsLayout-D8glO7f1.js → settingsLayout-C7bl9Xi4.js} +1 -1
  141. package/dist/client/assets/{sheet-BO78gIKZ.js → sheet-CQIQYfOM.js} +1 -1
  142. package/dist/client/assets/{sidebar-Dm6l2GA6.js → sidebar-BdDOvXe8.js} +1 -1
  143. package/dist/client/assets/sidebarProjectFolders-D_Me0oJ8.js +4 -0
  144. package/dist/client/assets/{sidebarStatusText-D0HT0fek.js → sidebarStatusText-BF6odB03.js} +1 -1
  145. package/dist/client/assets/{skeleton-CvQSeJbw.js → skeleton-Mgh4Gx9x.js} +1 -1
  146. package/dist/client/assets/{spinner-ClF0jOcX.js → spinner-CzzUdFeE.js} +1 -1
  147. package/dist/client/assets/{src-Vf4LVnMX.js → src-Ca7Gag3m.js} +1 -1
  148. package/dist/client/assets/storeSelectors-D7HbqO4E.js +1 -0
  149. package/dist/client/assets/{switch-BTGo9Yip.js → switch-CntUxI1A.js} +1 -1
  150. package/dist/client/assets/{terminal-links-CZ3c9AbA.js → terminal-links-CUFISn8U.js} +1 -1
  151. package/dist/client/assets/{textarea-RFPODxWW.js → textarea-C8QxddDb.js} +1 -1
  152. package/dist/client/assets/threadPinning-BIV4KXZU.js +1 -0
  153. package/dist/client/assets/{threadPriorityRefreshRuntime-Ct5pnIbX.js → threadPriorityRefreshRuntime-B-pVYK_y.js} +1 -1
  154. package/dist/client/assets/{toast-CcSCAm4B.js → toast-Cw7bXJzg.js} +1 -1
  155. package/dist/client/assets/{toggle-I6h33Cu5.js → toggle-Bi9uP4Hb.js} +1 -1
  156. package/dist/client/assets/{toggle-group-mLIkiJtU.js → toggle-group-LcgyMgj5.js} +1 -1
  157. package/dist/client/assets/{tooltip-C8sAONBj.js → tooltip-t3Nrleyq.js} +1 -1
  158. package/dist/client/assets/types-D7HbqO4E.js +1 -0
  159. package/dist/client/assets/{uiStateStore-B6pjzSjj.js → uiStateStore-BW2WnK4k.js} +1 -1
  160. package/dist/client/assets/useAtlassian-a-MaAd0k.js +0 -0
  161. package/dist/client/assets/{useButton-D__1LqCF.js → useButton-DUuWgIMw.js} +1 -1
  162. package/dist/client/assets/{useCompositeListItem-Cmr_nuuG.js → useCompositeListItem-CL5mJqCb.js} +1 -1
  163. package/dist/client/assets/{useDebouncedValue-DHjoudTq.js → useDebouncedValue-jDDWNjgt.js} +1 -1
  164. package/dist/client/assets/{useFloatingRootContext-D5EZmrCa.js → useFloatingRootContext-C4I8IxtL.js} +1 -1
  165. package/dist/client/assets/{useHandleNewThread-DX2FtXcP.js → useHandleNewThread-820pBJCC.js} +1 -1
  166. package/dist/client/assets/{useLabelableId-DnQJ7amm.js → useLabelableId-KX33mhBC.js} +1 -1
  167. package/dist/client/assets/{useLocation-CDeYzWW6.js → useLocation-B4QlXdMt.js} +1 -1
  168. package/dist/client/assets/{useOpenInteractionType-CjtpACKR.js → useOpenInteractionType-DjM9MBY7.js} +1 -1
  169. package/dist/client/assets/{usePhoneThreadActions-BEa3VzGG.js → usePhoneThreadActions-DxxWMYgC.js} +1 -1
  170. package/dist/client/assets/{usePopupViewport-BuhsNdVy.js → usePopupViewport-CAMlnyaP.js} +1 -1
  171. package/dist/client/assets/{useScrollLock-D3tMGsRk.js → useScrollLock-CAPfesBT.js} +1 -1
  172. package/dist/client/assets/{useStatistics-CtunoTE-.js → useStatistics-CWasDzsV.js} +2 -2
  173. package/dist/client/assets/{useSwipeDismiss-CbgDJvw1.js → useSwipeDismiss-BZsYSBgq.js} +1 -1
  174. package/dist/client/assets/{useTheme-DiC-5xCb.js → useTheme-By1kfyiU.js} +1 -1
  175. package/dist/client/assets/{useThreadActions-fN-Al13y.js → useThreadActions-MOjDrEnS.js} +1 -1
  176. package/dist/client/assets/{useTriggerFocusGuards-CrugmkhX.js → useTriggerFocusGuards-D5z439rn.js} +1 -1
  177. package/dist/client/assets/{useValueChanged-MQtIzPIU.js → useValueChanged-D0CHQQwP.js} +1 -1
  178. package/dist/client/assets/{utils-BofFIn5Y.js → utils-B76_2Yk7.js} +1 -1
  179. package/dist/client/index.html +1 -1
  180. package/dist/{collectUint8StreamText-Bb52hlpd.cjs → collectUint8StreamText-B9B7bGv9.cjs} +46 -10
  181. package/dist/{collectUint8StreamText-EDg4F0TU.mjs → collectUint8StreamText-RzKEq2NY.mjs} +35 -11
  182. package/dist/{makeManagedServerProvider-itynW7xv.cjs → makeManagedServerProvider-BF1eBatf.cjs} +1 -1
  183. package/dist/{makeManagedServerProvider-Cf8bNWwc.mjs → makeManagedServerProvider-BuG2fLP8.mjs} +1 -1
  184. package/package.json +1 -1
  185. package/dist/client/assets/AppearanceSettings-CYbSApl4.js +0 -1
  186. package/dist/client/assets/ChatRightPanel-BIS1DPGa.js +0 -27
  187. package/dist/client/assets/CommandPaletteDialog-C5xAo65V.js +0 -1
  188. package/dist/client/assets/DialogRoot-BpIvUdm7.js +0 -1
  189. package/dist/client/assets/GlassSurface-C3IIWMu9.js +0 -1
  190. package/dist/client/assets/HostedHubRoot-Cc8GYcK6.js +0 -1
  191. package/dist/client/assets/KeybindingsSettings-D2bNQPI-.js +0 -7
  192. package/dist/client/assets/PhoneHome-BtPE7bQn.js +0 -1
  193. package/dist/client/assets/PhoneSettingsSurface-tcFCccEL.js +0 -1
  194. package/dist/client/assets/ProvidersSettingsPanel-B3aBKY--.js +0 -1
  195. package/dist/client/assets/RootAppShell-C-0ChFVJ.js +0 -6
  196. package/dist/client/assets/SettingsDialog-Bbuoh793.js +0 -1
  197. package/dist/client/assets/SourceControlSettings-CkiYR4lR.js +0 -1
  198. package/dist/client/assets/ThreadStatusIndicators-ZImeLExQ.js +0 -0
  199. package/dist/client/assets/appearancePreferences-COvj0WMT.js +0 -1
  200. package/dist/client/assets/authorization-mIJKV2yp.js +0 -1
  201. package/dist/client/assets/composerDraftStore-CdJJZe42.js +0 -11
  202. package/dist/client/assets/editorPreferences-DHIJntKF.js +0 -1
  203. package/dist/client/assets/main-BKS5Nf2_.js +0 -9
  204. package/dist/client/assets/main-DaYHZt-J.css +0 -2
  205. package/dist/client/assets/panel-right-BodNpkM9.js +0 -1
  206. package/dist/client/assets/primary-BzLEg2w1.js +0 -2
  207. package/dist/client/assets/projectPaths-BAd6NFcE.js +0 -1
  208. package/dist/client/assets/providerInstances-BJcfB_9E.js +0 -1
  209. package/dist/client/assets/providerModels-BJcfB_9E.js +0 -1
  210. package/dist/client/assets/runtime-CXut_g4p.js +0 -1
  211. package/dist/client/assets/sidebarProjectFolders-cnmz3B_-.js +0 -4
  212. package/dist/client/assets/storeSelectors-DYekgeHu.js +0 -1
  213. package/dist/client/assets/types-DYekgeHu.js +0 -1
  214. package/dist/client/assets/useAppearancePreference-BlLlxQl7.js +0 -1
  215. package/dist/client/assets/useAtlassian-9-hy2f8z.js +0 -0
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { $n as ClaudeSettings, Ao as ApprovalRequestId, Go as RuntimeItemId, Jo as RuntimeSubagentId, Ko as RuntimeRequestId, Pn as TextGenerationError, Qo as TurnId, Ra as ProviderDriverKind, Ro as EventId, Wo as ProviderItemId, Xo as ThreadId, Yo as RuntimeTaskId, za as ProviderInstanceId } from "./collectUint8StreamText-EDg4F0TU.mjs";
3
+ import { $n as ClaudeSettings, Ba as ProviderDriverKind, Bo as EventId, Jo as RuntimeRequestId, Ko as ProviderItemId, Mo as ApprovalRequestId, Pn as TextGenerationError, Qo as ThreadId, Va as ProviderInstanceId, Xo as RuntimeSubagentId, Zo as RuntimeTaskId, es as TurnId, qo as RuntimeItemId } from "./collectUint8StreamText-RzKEq2NY.mjs";
4
4
  import { nt as sanitizeFeatureBranchName, st as ServerConfig, tt as sanitizeBranchFragment } from "./Metrics-BP9YjxZB.mjs";
5
- import { $ as spawnAndCollect, A as normalizeCliError, Bn as getModelSelectionBooleanOptionValue, C as buildCommitMessagePrompt, D as buildThreadPriorityPrompt, Dn as enrichProviderSnapshotWithVersionAdvisory, E as buildPrContentPrompt, F as makeClaudeCapabilitiesCacheKey, Fn as ServerSettingsService, G as buildSelectOptionDescriptor, I as makeClaudeContinuationGroupKey, In as resolveAttachmentPath, J as detailFromResult, K as buildServerProvider, L as makeClaudeEnvironment, M as sanitizePrTitle, Mn as normalizeCommandPath, N as sanitizeThreadTitle, Nn as resolveProviderMaintenanceCapabilitiesEffect, O as buildThreadTitlePrompt, P as toJsonSchemaObject, Pn as compareCliVersions, Q as providerModelsFromSettings, R as resolveClaudeHomePath, Rn as applyClaudePromptEffortPrefix, S as buildBranchNamePrompt, T as buildIssueContentTitlePrompt, U as DEFAULT_TIMEOUT_MS, Un as getProviderOptionCurrentValue, Vn as getModelSelectionStringOptionValue, W as buildBooleanOptionDescriptor, Wn as getProviderOptionDescriptors, Y as isCommandMissingCause, Z as parseGenericCliVersion, _ as ProviderEventLoggers, at as createProcessDeviceToolBinding, b as checkRtkAvailability, ct as ProviderAdapterSessionClosedError, dt as ProviderDriverError, et as AGENT_CONTROL_INTERNAL_SERVER_NAME, i as classifyTaskAgentKind, it as redactAgentControlSecrets, j as sanitizeCommitSubject, kn as makePackageManagedProviderMaintenanceResolver, lt as ProviderAdapterSessionNotFoundError, n as AgentControlSessionRegistry, ot as ProviderAdapterProcessError, qn as resolvePromptInjectedEffort, rt as installAgentControlNativeHttp, st as ProviderAdapterRequestError, t as makeServerQueueMetrics, tt as agentControlHostContext, ut as ProviderAdapterValidationError, v as makeEventNdjsonLogger, w as buildIssueContentPolishPrompt, x as validateRankInboxThreadsResult, y as buildTokenReductionInstructions, z as mergeProviderInstanceEnvironment, zn as createModelCapabilities } from "./bin.mjs";
5
+ import { $ as spawnAndCollect, A as normalizeCliError, Bn as createModelCapabilities, C as buildCommitMessagePrompt, D as buildThreadPriorityPrompt, Dn as enrichProviderSnapshotWithVersionAdvisory, E as buildPrContentPrompt, F as makeClaudeCapabilitiesCacheKey, Fn as ServerSettingsService, G as buildSelectOptionDescriptor, Gn as getProviderOptionDescriptors, Hn as getModelSelectionStringOptionValue, I as makeClaudeContinuationGroupKey, J as detailFromResult, Jn as resolvePromptInjectedEffort, K as buildServerProvider, L as makeClaudeEnvironment, Ln as resolveAttachmentPath, M as sanitizePrTitle, Mn as normalizeCommandPath, N as sanitizeThreadTitle, Nn as resolveProviderMaintenanceCapabilitiesEffect, O as buildThreadTitlePrompt, P as toJsonSchemaObject, Pn as compareCliVersions, Q as providerModelsFromSettings, R as resolveClaudeHomePath, S as buildBranchNamePrompt, T as buildIssueContentTitlePrompt, U as DEFAULT_TIMEOUT_MS, Vn as getModelSelectionBooleanOptionValue, W as buildBooleanOptionDescriptor, Wn as getProviderOptionCurrentValue, Y as isCommandMissingCause, Z as parseGenericCliVersion, _ as ProviderEventLoggers, at as createProcessDeviceToolBinding, b as checkRtkAvailability, ct as ProviderAdapterSessionClosedError, dt as ProviderDriverError, et as AGENT_CONTROL_INTERNAL_SERVER_NAME, i as classifyTaskAgentKind, it as redactAgentControlSecrets, j as sanitizeCommitSubject, kn as makePackageManagedProviderMaintenanceResolver, lt as ProviderAdapterSessionNotFoundError, n as AgentControlSessionRegistry, ot as ProviderAdapterProcessError, rt as installAgentControlNativeHttp, st as ProviderAdapterRequestError, t as makeServerQueueMetrics, tt as agentControlHostContext, ut as ProviderAdapterValidationError, v as makeEventNdjsonLogger, w as buildIssueContentPolishPrompt, x as validateRankInboxThreadsResult, y as buildTokenReductionInstructions, z as mergeProviderInstanceEnvironment, zn as applyClaudePromptEffortPrefix } from "./bin.mjs";
6
6
  import { t as formatSourceControlContextsForAgent } from "./sourceControlContextFormatter-DEwpnVAH.mjs";
7
7
  import { n as formatProjectCustomSystemPrompt } from "./ProjectCustomSystemPrompt-CS1nulhL.mjs";
8
- import { n as requireRuntimeSessionId, r as stampRuntimeEvent, t as makeManagedServerProvider } from "./makeManagedServerProvider-Cf8bNWwc.mjs";
8
+ import { n as requireRuntimeSessionId, r as stampRuntimeEvent, t as makeManagedServerProvider } from "./makeManagedServerProvider-BuG2fLP8.mjs";
9
9
  import { t as defaultProviderContinuationIdentity } from "./ProviderDriver-kCV60GKk.mjs";
10
10
  import { Cache, Cause, DateTime, Deferred, Duration, Effect, Exit, Fiber, FileSystem, Option, Path, Queue, Ref, Result, Schema, Stream } from "effect";
11
11
  import { HttpClient } from "effect/unstable/http";
@@ -879,6 +879,87 @@ function parseCliArgs(args, options) {
879
879
  };
880
880
  }
881
881
  //#endregion
882
+ //#region src/provider/contextCompactionPolicy.ts
883
+ const CONTEXT_COMPACTION_TRIGGER_RATIO = .8;
884
+ function initialContextCompactionPolicyState(generation) {
885
+ return {
886
+ generation,
887
+ phase: "idle",
888
+ armed: true
889
+ };
890
+ }
891
+ /**
892
+ * Decides whether a context snapshot should arm automatic compaction.
893
+ *
894
+ * The lower rearm watermark prevents a repeated high-water snapshot from
895
+ * creating another request after a completed or interrupted compaction. A
896
+ * generation mismatch is always ignored so a late observation from a replaced
897
+ * provider session cannot mutate the active one.
898
+ */
899
+ function observeContextCompaction(state, input) {
900
+ if (input.generation !== state.generation || state.phase === "disabled") return {
901
+ state,
902
+ trigger: false
903
+ };
904
+ const { usedTokens, maxTokens } = input.usage;
905
+ if (maxTokens === void 0 || !Number.isFinite(maxTokens) || maxTokens <= 0 || !Number.isFinite(usedTokens) || usedTokens < 0) return {
906
+ state,
907
+ trigger: false
908
+ };
909
+ const ratio = usedTokens / maxTokens;
910
+ if (state.phase !== "idle") return {
911
+ state,
912
+ trigger: false
913
+ };
914
+ if (!state.armed) return ratio <= .65 ? {
915
+ state: {
916
+ ...state,
917
+ armed: true
918
+ },
919
+ trigger: false
920
+ } : {
921
+ state,
922
+ trigger: false
923
+ };
924
+ if (ratio < .8) return {
925
+ state,
926
+ trigger: false
927
+ };
928
+ return {
929
+ state: {
930
+ ...state,
931
+ phase: "requested",
932
+ armed: false
933
+ },
934
+ trigger: true,
935
+ windowTokens: Math.max(1, Math.floor(maxTokens * CONTEXT_COMPACTION_TRIGGER_RATIO))
936
+ };
937
+ }
938
+ function markContextCompactionStarted(state, generation) {
939
+ if (generation !== state.generation || state.phase === "disabled") return state;
940
+ return {
941
+ ...state,
942
+ phase: "compacting",
943
+ armed: false
944
+ };
945
+ }
946
+ function settleContextCompaction(state, generation) {
947
+ if (generation !== state.generation || state.phase === "disabled") return state;
948
+ return {
949
+ ...state,
950
+ phase: "idle",
951
+ armed: false
952
+ };
953
+ }
954
+ function disableContextCompaction(state, generation) {
955
+ if (generation !== state.generation) return state;
956
+ return {
957
+ ...state,
958
+ phase: "disabled",
959
+ armed: false
960
+ };
961
+ }
962
+ //#endregion
882
963
  //#region src/provider/Layers/ClaudeAdapter.ts
883
964
  /**
884
965
  * ClaudeAdapterLive - Scoped live implementation for the Claude Agent provider adapter.
@@ -889,6 +970,25 @@ function parseCliArgs(args, options) {
889
970
  * @module ClaudeAdapterLive
890
971
  */
891
972
  const PROVIDER = ProviderDriverKind.make("claudeAgent");
973
+ const CLAUDE_SUBAGENT_ATTRIBUTION_CACHE_CAP = 256;
974
+ function rememberClaudeSubagentLaunchInput(context, toolUseId, input) {
975
+ if (!context.subagentLaunchInputByToolUseId.has(toolUseId) && context.subagentLaunchInputByToolUseId.size >= CLAUDE_SUBAGENT_ATTRIBUTION_CACHE_CAP) {
976
+ const oldestToolUseId = context.subagentLaunchInputByToolUseId.keys().next().value;
977
+ if (oldestToolUseId !== void 0) context.subagentLaunchInputByToolUseId.delete(oldestToolUseId);
978
+ }
979
+ context.subagentLaunchInputByToolUseId.set(toolUseId, input);
980
+ }
981
+ function rememberClaudeSubagentModel(context, toolUseId, model) {
982
+ if (!context.subagentModelByToolUseId.has(toolUseId) && context.subagentModelByToolUseId.size >= CLAUDE_SUBAGENT_ATTRIBUTION_CACHE_CAP) {
983
+ const oldestToolUseId = context.subagentModelByToolUseId.keys().next().value;
984
+ if (oldestToolUseId !== void 0) context.subagentModelByToolUseId.delete(oldestToolUseId);
985
+ }
986
+ context.subagentModelByToolUseId.set(toolUseId, model);
987
+ }
988
+ function claudeSubagentLaunchModel(input) {
989
+ const model = trimmedClaudeString(input?.model);
990
+ return model?.toLowerCase() === "inherit" ? void 0 : model;
991
+ }
892
992
  function isUuid(value) {
893
993
  return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value);
894
994
  }
@@ -981,6 +1081,12 @@ function normalizeClaudeTokenUsage(value, contextWindow) {
981
1081
  ...typeof usage.duration_ms === "number" && Number.isFinite(usage.duration_ms) ? { durationMs: usage.duration_ms } : {}
982
1082
  };
983
1083
  }
1084
+ function withAutomaticCompactionCapability(usage, supported) {
1085
+ return supported ? {
1086
+ ...usage,
1087
+ compactsAutomatically: true
1088
+ } : usage;
1089
+ }
984
1090
  function asCanonicalTurnId(value) {
985
1091
  return value;
986
1092
  }
@@ -1502,6 +1608,7 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
1502
1608
  options: input.options
1503
1609
  }));
1504
1610
  const sessions = /* @__PURE__ */ new Map();
1611
+ let nextSessionGeneration = 0;
1505
1612
  const runtimeEventQueue = yield* Queue.bounded(2048);
1506
1613
  const runtimeEventQueueMetrics = yield* makeServerQueueMetrics({
1507
1614
  queue: "provider.adapter.runtimeEvents",
@@ -1847,6 +1954,40 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
1847
1954
  }
1848
1955
  });
1849
1956
  });
1957
+ const emitCompactionUnavailableWarning = Effect.fn("emitCompactionUnavailableWarning")(function* (context) {
1958
+ if (context.compactionUnavailableWarningEmitted) return;
1959
+ context.compactionUnavailableWarningEmitted = true;
1960
+ yield* emitRuntimeWarning(context, "Automatic context compaction is unavailable for this session. Start a new session if the context window fills.");
1961
+ });
1962
+ const maybeEnableAutomaticCompaction = Effect.fn("maybeEnableAutomaticCompaction")(function* (context, usage) {
1963
+ if (context.stopped || sessions.get(context.session.threadId) !== context) return;
1964
+ const decision = observeContextCompaction(context.compactionPolicy, {
1965
+ generation: context.generation,
1966
+ usage
1967
+ });
1968
+ context.compactionPolicy = decision.state;
1969
+ const windowTokens = decision.windowTokens;
1970
+ if (!decision.trigger || windowTokens === void 0) return;
1971
+ const applyFlagSettings = context.query.applyFlagSettings;
1972
+ if (!context.supportsAutomaticCompaction || !applyFlagSettings) {
1973
+ context.compactionPolicy = disableContextCompaction(context.compactionPolicy, context.generation);
1974
+ yield* emitCompactionUnavailableWarning(context);
1975
+ return;
1976
+ }
1977
+ const generation = context.generation;
1978
+ const applied = yield* Effect.tryPromise({
1979
+ try: () => applyFlagSettings.call(context.query, {
1980
+ autoCompactEnabled: true,
1981
+ autoCompactWindow: windowTokens
1982
+ }),
1983
+ catch: () => void 0
1984
+ }).pipe(Effect.as(true), Effect.timeout("3 seconds"), Effect.catch(() => Effect.succeed(false)));
1985
+ if (context.stopped || context.generation !== generation || sessions.get(context.session.threadId) !== context) return;
1986
+ if (!applied) {
1987
+ context.compactionPolicy = disableContextCompaction(context.compactionPolicy, generation);
1988
+ yield* emitCompactionUnavailableWarning(context);
1989
+ }
1990
+ });
1850
1991
  const completeTurn = Effect.fn("completeTurn")(function* (context, status, errorMessage, result) {
1851
1992
  const resultContextWindow = maxClaudeContextWindowFromModelUsage(result?.modelUsage);
1852
1993
  if (resultContextWindow !== void 0) context.lastKnownContextWindow = resultContextWindow;
@@ -1854,11 +1995,12 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
1854
1995
  const accumulatedTotalProcessedTokens = accumulatedSnapshot?.totalProcessedTokens ?? accumulatedSnapshot?.usedTokens;
1855
1996
  const lastGoodUsage = context.lastKnownTokenUsage;
1856
1997
  const maxTokens = resultContextWindow ?? context.lastKnownContextWindow;
1857
- const usageSnapshot = lastGoodUsage ? {
1998
+ const rawUsageSnapshot = lastGoodUsage ? {
1858
1999
  ...lastGoodUsage,
1859
2000
  ...typeof maxTokens === "number" && Number.isFinite(maxTokens) && maxTokens > 0 ? { maxTokens } : {},
1860
2001
  ...typeof accumulatedTotalProcessedTokens === "number" && Number.isFinite(accumulatedTotalProcessedTokens) && accumulatedTotalProcessedTokens > lastGoodUsage.usedTokens ? { totalProcessedTokens: accumulatedTotalProcessedTokens } : {}
1861
2002
  } : accumulatedSnapshot;
2003
+ const usageSnapshot = rawUsageSnapshot ? withAutomaticCompactionCapability(rawUsageSnapshot, context.supportsAutomaticCompaction) : void 0;
1862
2004
  const turnState = context.turnState;
1863
2005
  if (!turnState) {
1864
2006
  if (usageSnapshot) {
@@ -1964,6 +2106,7 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
1964
2106
  };
1965
2107
  if (context.agentControl) yield* context.agentControl.retireTurn(turnState.turnId);
1966
2108
  yield* updateResumeCursor(context);
2109
+ if (status === "completed" && usageSnapshot) yield* maybeEnableAutomaticCompaction(context, usageSnapshot);
1967
2110
  });
1968
2111
  const handleStreamEvent = Effect.fn("handleStreamEvent")(function* (context, message) {
1969
2112
  if (message.type !== "stream_event") return;
@@ -2034,6 +2177,7 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
2034
2177
  };
2035
2178
  const nextFingerprint = parsedInput && Object.keys(parsedInput).length > 0 ? toolInputFingerprint(parsedInput) : void 0;
2036
2179
  context.inFlightTools.set(event.index, nextTool);
2180
+ if (nextTool.itemType === "collab_agent_tool_call" && parsedInput) rememberClaudeSubagentLaunchInput(context, nextTool.itemId, parsedInput);
2037
2181
  if (!parsedInput || !nextFingerprint || tool.lastEmittedInputFingerprint === nextFingerprint) return;
2038
2182
  nextTool = {
2039
2183
  ...nextTool,
@@ -2115,6 +2259,7 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
2115
2259
  ...parentToolUseId ? { parentToolUseId } : {}
2116
2260
  };
2117
2261
  context.inFlightTools.set(index, tool);
2262
+ if (itemType === "collab_agent_tool_call") rememberClaudeSubagentLaunchInput(context, itemId, toolInput);
2118
2263
  const stamp = yield* makeEventStamp();
2119
2264
  yield* offerRuntimeEventForContext(context, {
2120
2265
  type: "item.started",
@@ -2282,6 +2427,7 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
2282
2427
  const snapshotModel = trimmedClaudeString(message.message.model);
2283
2428
  const owningAgent = owningTaskId ? context.taskAgents.get(owningTaskId) : void 0;
2284
2429
  if (owningAgent && snapshotModel) owningAgent.model = snapshotModel;
2430
+ else if (snapshotModel) rememberClaudeSubagentModel(context, assistantParentToolUseId, snapshotModel);
2285
2431
  context.lastAssistantUuid = message.uuid;
2286
2432
  yield* updateResumeCursor(context);
2287
2433
  return;
@@ -2504,6 +2650,11 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
2504
2650
  });
2505
2651
  return;
2506
2652
  case "status":
2653
+ if (message.status === "compacting") context.compactionPolicy = markContextCompactionStarted(context.compactionPolicy, context.generation);
2654
+ else if (message.compact_result === "failed") {
2655
+ context.compactionPolicy = disableContextCompaction(context.compactionPolicy, context.generation);
2656
+ yield* emitCompactionUnavailableWarning(context);
2657
+ } else if (message.compact_result === "success") context.compactionPolicy = settleContextCompaction(context.compactionPolicy, context.generation);
2507
2658
  yield* offerRuntimeEventForContext(context, {
2508
2659
  ...base,
2509
2660
  type: "session.state.changed",
@@ -2515,6 +2666,8 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
2515
2666
  });
2516
2667
  return;
2517
2668
  case "compact_boundary":
2669
+ context.compactionPolicy = settleContextCompaction(context.compactionPolicy, context.generation);
2670
+ context.lastKnownTokenUsage = void 0;
2518
2671
  yield* offerRuntimeEventForContext(context, {
2519
2672
  ...base,
2520
2673
  type: "thread.state.changed",
@@ -2564,8 +2717,10 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
2564
2717
  case "task_started": {
2565
2718
  const launchingTool = message.tool_use_id ? Array.from(context.inFlightTools.values()).find((tool) => tool.itemId === message.tool_use_id) : void 0;
2566
2719
  const owningAgentId = launchingTool?.agentId;
2567
- const launchInput = launchingTool?.input;
2568
- const model = trimmedClaudeString(launchInput?.model) ?? trimmedClaudeString(context.session.model ?? void 0);
2720
+ const launchInput = launchingTool?.input ?? (message.tool_use_id ? context.subagentLaunchInputByToolUseId.get(message.tool_use_id) : void 0);
2721
+ if (message.tool_use_id) context.subagentLaunchInputByToolUseId.delete(message.tool_use_id);
2722
+ const model = (message.tool_use_id ? context.subagentModelByToolUseId.get(message.tool_use_id) : void 0) ?? claudeSubagentLaunchModel(launchInput);
2723
+ if (message.tool_use_id) context.subagentModelByToolUseId.delete(message.tool_use_id);
2569
2724
  const rawLaunchEffort = launchInput?.effort;
2570
2725
  const effort = trimmedClaudeString(rawLaunchEffort) ?? (typeof rawLaunchEffort === "number" && Number.isFinite(rawLaunchEffort) ? String(rawLaunchEffort) : context.currentEffort);
2571
2726
  context.taskAgents.set(message.task_id, {
@@ -2619,7 +2774,7 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
2619
2774
  eventId: usageStamp.eventId,
2620
2775
  createdAt: usageStamp.createdAt,
2621
2776
  type: "thread.token-usage.updated",
2622
- payload: { usage: normalizedUsage }
2777
+ payload: { usage: withAutomaticCompactionCapability(normalizedUsage, context.supportsAutomaticCompaction) }
2623
2778
  });
2624
2779
  }
2625
2780
  }
@@ -2698,7 +2853,7 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
2698
2853
  eventId: usageStamp.eventId,
2699
2854
  createdAt: usageStamp.createdAt,
2700
2855
  type: "thread.token-usage.updated",
2701
- payload: { usage: normalizedUsage }
2856
+ payload: { usage: withAutomaticCompactionCapability(normalizedUsage, context.supportsAutomaticCompaction) }
2702
2857
  });
2703
2858
  }
2704
2859
  }
@@ -3312,7 +3467,10 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
3312
3467
  createdAt: startedAt,
3313
3468
  updatedAt: startedAt
3314
3469
  };
3470
+ const generation = ++nextSessionGeneration;
3471
+ const supportsAutomaticCompaction = typeof queryRuntime.applyFlagSettings === "function";
3315
3472
  const context = {
3473
+ generation,
3316
3474
  session,
3317
3475
  promptQueue,
3318
3476
  query: queryRuntime,
@@ -3332,6 +3490,8 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
3332
3490
  inFlightTools,
3333
3491
  suppressedSubagentBlocks: /* @__PURE__ */ new Map(),
3334
3492
  taskAgents: /* @__PURE__ */ new Map(),
3493
+ subagentLaunchInputByToolUseId: /* @__PURE__ */ new Map(),
3494
+ subagentModelByToolUseId: /* @__PURE__ */ new Map(),
3335
3495
  workflowMemberFingerprints: /* @__PURE__ */ new Map(),
3336
3496
  workflowPhasesByTaskId: /* @__PURE__ */ new Map(),
3337
3497
  liveTaskIds: /* @__PURE__ */ new Set(),
@@ -3339,6 +3499,9 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
3339
3499
  turnState: void 0,
3340
3500
  lastKnownContextWindow: void 0,
3341
3501
  lastKnownTokenUsage: void 0,
3502
+ compactionPolicy: initialContextCompactionPolicyState(generation),
3503
+ supportsAutomaticCompaction,
3504
+ compactionUnavailableWarningEmitted: false,
3342
3505
  lastAssistantUuid: resumeState?.resumeSessionAt,
3343
3506
  lastThreadStartedId: void 0,
3344
3507
  subagentByTaskId: /* @__PURE__ */ new Map(),
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { Ai as ProviderApprovalDecision, Ao as ApprovalRequestId, Go as RuntimeItemId, Ko as RuntimeRequestId, Qo as TurnId, Ra as ProviderDriverKind, Ro as EventId, Wo as ProviderItemId, Yo as RuntimeTaskId, bi as PROVIDER_SEND_TURN_MAX_IMAGE_BYTES, er as CodexSettings, ha as ThreadGoal, za as ProviderInstanceId } from "./collectUint8StreamText-EDg4F0TU.mjs";
3
+ import { Ba as ProviderDriverKind, Bo as EventId, Jo as RuntimeRequestId, Ko as ProviderItemId, Mi as ProviderApprovalDecision, Mo as ApprovalRequestId, Si as PROVIDER_SEND_TURN_MAX_IMAGE_BYTES, Va as ProviderInstanceId, Zo as RuntimeTaskId, _a as ThreadGoal, er as CodexSettings, es as TurnId, qo as RuntimeItemId } from "./collectUint8StreamText-RzKEq2NY.mjs";
4
4
  import { st as ServerConfig } from "./Metrics-BP9YjxZB.mjs";
5
- import { $t as V2ThreadRealtimeErrorNotification, At as ToolRequestUserInputParams, B as buildCodexInitializeParams, Bn as getModelSelectionBooleanOptionValue, Bt as V2ItemCompletedNotification, Ct as SERVER_NOTIFICATION_METHODS, Dn as enrichProviderSnapshotWithVersionAdvisory, Dt as ServerRequest__ExecCommandApprovalParams, Et as ServerRequest__DynamicToolCallParams, Fn as ServerSettingsService, Ft as V2CommandExecutionOutputDeltaNotification, Gt as V2PlanDeltaNotification, H as makePendingCodexProvider, Ht as V2McpServerOauthLoginCompletedNotification, In as resolveAttachmentPath, It as V2ConfigWarningNotification, Jt as V2ServerRequestResolvedNotification, Kn as normalizeModelSlug, Kt as V2ReasoningSummaryTextDeltaNotification, Lt as V2DeprecationNoticeNotification, Mt as V2AccountRateLimitsUpdatedNotification, Nn as resolveProviderMaintenanceCapabilitiesEffect, Nt as V2AccountUpdatedNotification, Ot as ServerRequest__FileChangeRequestApprovalParams, Pt as V2AgentMessageDeltaNotification, Qt as V2ThreadRealtimeClosedNotification, Rt as V2ErrorNotification, St as CodexAppServerTransportError, Tt as ServerRequest__CommandExecutionRequestApprovalParams, Ut as V2McpToolCallProgressNotification, V as checkCodexProviderStatus, Vn as getModelSelectionStringOptionValue, Vt as V2ItemStartedNotification, Wt as V2ModelReroutedNotification, Xt as V2ThreadGoalUpdatedNotification, Yt as V2ThreadGoalClearedNotification, Zt as V2ThreadNameUpdatedNotification, _ as ProviderEventLoggers, _t as layerChildProcess, an as V2ThreadTokenUsageUpdatedNotification, at as createProcessDeviceToolBinding, b as checkRtkAvailability, bt as CodexAppServerRequestError, cn as V2TurnPlanUpdatedNotification, ct as ProviderAdapterSessionClosedError, dn as V2TurnStartResponse, dt as ProviderDriverError, en as V2ThreadRealtimeItemAddedNotification, fn as V2TurnSteerParams, ft as codexContinuationIdentity, gt as CodexAppServerClient, hn as V2WindowsWorldWritableWarningNotification, ht as expandHomePath, in as V2ThreadStatusChangedNotification, jt as ToolRequestUserInputResponse, kn as makePackageManagedProviderMaintenanceResolver, kt as ServerRequest__ToolRequestUserInputParams, ln as V2TurnStartParams, lt as ProviderAdapterSessionNotFoundError, mn as V2WindowsSandboxSetupCompletedNotification, mt as resolveCodexHomeLayout, n as AgentControlSessionRegistry, nn as V2ThreadRealtimeStartedNotification, on as V2TurnCompletedNotification, ot as ProviderAdapterProcessError, pn as V2TurnSteerResponse, pt as materializeCodexShadowHome, qt as V2ReasoningTextDeltaNotification, rn as V2ThreadStartedNotification, rt as installAgentControlNativeHttp, sn as V2TurnDiffUpdatedNotification, st as ProviderAdapterRequestError, t as makeServerQueueMetrics, tn as V2ThreadRealtimeOutputAudioDeltaNotification, un as V2TurnStartParams__CollaborationMode, ut as ProviderAdapterValidationError, v as makeEventNdjsonLogger, vt as CodexAppServerProcessExitedError, wt as ServerRequest__ApplyPatchApprovalParams, xt as CodexAppServerSpawnError, y as buildTokenReductionInstructions, yt as CodexAppServerProtocolParseError, z as mergeProviderInstanceEnvironment, zt as V2FileChangeOutputDeltaNotification } from "./bin.mjs";
5
+ import { $t as V2ThreadRealtimeErrorNotification, At as ToolRequestUserInputParams, B as buildCodexInitializeParams, Bt as V2ItemCompletedNotification, Ct as SERVER_NOTIFICATION_METHODS, Dn as enrichProviderSnapshotWithVersionAdvisory, Dt as ServerRequest__ExecCommandApprovalParams, Et as ServerRequest__DynamicToolCallParams, Fn as ServerSettingsService, Ft as V2CommandExecutionOutputDeltaNotification, Gt as V2PlanDeltaNotification, H as makePendingCodexProvider, Hn as getModelSelectionStringOptionValue, Ht as V2McpServerOauthLoginCompletedNotification, It as V2ConfigWarningNotification, Jt as V2ServerRequestResolvedNotification, Kt as V2ReasoningSummaryTextDeltaNotification, Ln as resolveAttachmentPath, Lt as V2DeprecationNoticeNotification, Mt as V2AccountRateLimitsUpdatedNotification, Nn as resolveProviderMaintenanceCapabilitiesEffect, Nt as V2AccountUpdatedNotification, Ot as ServerRequest__FileChangeRequestApprovalParams, Pt as V2AgentMessageDeltaNotification, Qt as V2ThreadRealtimeClosedNotification, Rt as V2ErrorNotification, St as CodexAppServerTransportError, Tt as ServerRequest__CommandExecutionRequestApprovalParams, Ut as V2McpToolCallProgressNotification, V as checkCodexProviderStatus, Vn as getModelSelectionBooleanOptionValue, Vt as V2ItemStartedNotification, Wt as V2ModelReroutedNotification, Xt as V2ThreadGoalUpdatedNotification, Yt as V2ThreadGoalClearedNotification, Zt as V2ThreadNameUpdatedNotification, _ as ProviderEventLoggers, _t as layerChildProcess, an as V2ThreadTokenUsageUpdatedNotification, at as createProcessDeviceToolBinding, b as checkRtkAvailability, bt as CodexAppServerRequestError, cn as V2TurnPlanUpdatedNotification, ct as ProviderAdapterSessionClosedError, dn as V2TurnStartResponse, dt as ProviderDriverError, en as V2ThreadRealtimeItemAddedNotification, fn as V2TurnSteerParams, ft as codexContinuationIdentity, gt as CodexAppServerClient, hn as V2WindowsWorldWritableWarningNotification, ht as expandHomePath, in as V2ThreadStatusChangedNotification, jt as ToolRequestUserInputResponse, kn as makePackageManagedProviderMaintenanceResolver, kt as ServerRequest__ToolRequestUserInputParams, ln as V2TurnStartParams, lt as ProviderAdapterSessionNotFoundError, mn as V2WindowsSandboxSetupCompletedNotification, mt as resolveCodexHomeLayout, n as AgentControlSessionRegistry, nn as V2ThreadRealtimeStartedNotification, on as V2TurnCompletedNotification, ot as ProviderAdapterProcessError, pn as V2TurnSteerResponse, pt as materializeCodexShadowHome, qn as normalizeModelSlug, qt as V2ReasoningTextDeltaNotification, rn as V2ThreadStartedNotification, rt as installAgentControlNativeHttp, sn as V2TurnDiffUpdatedNotification, st as ProviderAdapterRequestError, t as makeServerQueueMetrics, tn as V2ThreadRealtimeOutputAudioDeltaNotification, un as V2TurnStartParams__CollaborationMode, ut as ProviderAdapterValidationError, v as makeEventNdjsonLogger, vt as CodexAppServerProcessExitedError, wt as ServerRequest__ApplyPatchApprovalParams, xt as CodexAppServerSpawnError, y as buildTokenReductionInstructions, yt as CodexAppServerProtocolParseError, z as mergeProviderInstanceEnvironment, zt as V2FileChangeOutputDeltaNotification } from "./bin.mjs";
6
6
  import { t as formatSourceControlContextsForAgent } from "./sourceControlContextFormatter-DEwpnVAH.mjs";
7
7
  import { t as appendProjectCustomSystemPrompt } from "./ProjectCustomSystemPrompt-CS1nulhL.mjs";
8
- import { n as requireRuntimeSessionId, r as stampRuntimeEvent, t as makeManagedServerProvider } from "./makeManagedServerProvider-Cf8bNWwc.mjs";
9
- import { t as makeCodexTextGeneration } from "./CodexTextGeneration-BeG7ymPC.mjs";
8
+ import { n as requireRuntimeSessionId, r as stampRuntimeEvent, t as makeManagedServerProvider } from "./makeManagedServerProvider-BuG2fLP8.mjs";
9
+ import { t as makeCodexTextGeneration } from "./CodexTextGeneration-C0t4xcPO.mjs";
10
10
  import { Deferred, Effect, Exit, Fiber, FileSystem, Layer, Option, Queue, Redacted, Ref, Schema, Scope, Stream } from "effect";
11
11
  import { HttpClient } from "effect/unstable/http";
12
12
  import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const require_rolldown_runtime = require("./rolldown-runtime-LGfotAqq.cjs");
4
- const require_collectUint8StreamText = require("./collectUint8StreamText-Bb52hlpd.cjs");
4
+ const require_collectUint8StreamText = require("./collectUint8StreamText-B9B7bGv9.cjs");
5
5
  const require_Metrics = require("./Metrics-DIjMQ5pa.cjs");
6
6
  const require_bin = require("./bin.cjs");
7
7
  const require_sourceControlContextFormatter = require("./sourceControlContextFormatter-BDZqn-4T.cjs");
8
8
  const require_ProjectCustomSystemPrompt = require("./ProjectCustomSystemPrompt-B8SUlNGa.cjs");
9
- const require_makeManagedServerProvider = require("./makeManagedServerProvider-itynW7xv.cjs");
10
- const require_CodexTextGeneration = require("./CodexTextGeneration-BvIcyD1P.cjs");
9
+ const require_makeManagedServerProvider = require("./makeManagedServerProvider-BF1eBatf.cjs");
10
+ const require_CodexTextGeneration = require("./CodexTextGeneration-CedcXf9a.cjs");
11
11
  let effect = require("effect");
12
12
  let effect_unstable_http = require("effect/unstable/http");
13
13
  let effect_unstable_process = require("effect/unstable/process");
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { Pn as TextGenerationError } from "./collectUint8StreamText-EDg4F0TU.mjs";
3
+ import { Pn as TextGenerationError } from "./collectUint8StreamText-RzKEq2NY.mjs";
4
4
  import { nt as sanitizeFeatureBranchName, st as ServerConfig, tt as sanitizeBranchFragment } from "./Metrics-BP9YjxZB.mjs";
5
- import { A as normalizeCliError, Bn as getModelSelectionBooleanOptionValue, C as buildCommitMessagePrompt, D as buildThreadPriorityPrompt, E as buildPrContentPrompt, In as resolveAttachmentPath, M as sanitizePrTitle, N as sanitizeThreadTitle, O as buildThreadTitlePrompt, P as toJsonSchemaObject, S as buildBranchNamePrompt, T as buildIssueContentTitlePrompt, Vn as getModelSelectionStringOptionValue, ht as expandHomePath, j as sanitizeCommitSubject, w as buildIssueContentPolishPrompt, x as validateRankInboxThreadsResult } from "./bin.mjs";
5
+ import { A as normalizeCliError, C as buildCommitMessagePrompt, D as buildThreadPriorityPrompt, E as buildPrContentPrompt, Hn as getModelSelectionStringOptionValue, Ln as resolveAttachmentPath, M as sanitizePrTitle, N as sanitizeThreadTitle, O as buildThreadTitlePrompt, P as toJsonSchemaObject, S as buildBranchNamePrompt, T as buildIssueContentTitlePrompt, Vn as getModelSelectionBooleanOptionValue, ht as expandHomePath, j as sanitizeCommitSubject, w as buildIssueContentPolishPrompt, x as validateRankInboxThreadsResult } from "./bin.mjs";
6
6
  import { Effect, FileSystem, Option, Path, Schema, Stream } from "effect";
7
7
  import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
8
8
  //#region src/textGeneration/CodexTextGeneration.ts
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const require_collectUint8StreamText = require("./collectUint8StreamText-Bb52hlpd.cjs");
3
+ const require_collectUint8StreamText = require("./collectUint8StreamText-B9B7bGv9.cjs");
4
4
  const require_Metrics = require("./Metrics-DIjMQ5pa.cjs");
5
5
  const require_bin = require("./bin.cjs");
6
6
  let effect = require("effect");
@@ -1,15 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const require_collectUint8StreamText = require("./collectUint8StreamText-Bb52hlpd.cjs");
3
+ const require_collectUint8StreamText = require("./collectUint8StreamText-B9B7bGv9.cjs");
4
4
  const require_Metrics = require("./Metrics-DIjMQ5pa.cjs");
5
5
  const require_bin = require("./bin.cjs");
6
- const require_makeManagedServerProvider = require("./makeManagedServerProvider-itynW7xv.cjs");
6
+ const require_makeManagedServerProvider = require("./makeManagedServerProvider-BF1eBatf.cjs");
7
7
  const require_ProviderDriver = require("./ProviderDriver--rNeAi3B.cjs");
8
- const require_CodexTextGeneration = require("./CodexTextGeneration-BvIcyD1P.cjs");
8
+ const require_CodexTextGeneration = require("./CodexTextGeneration-CedcXf9a.cjs");
9
9
  let effect = require("effect");
10
10
  let node_crypto = require("node:crypto");
11
11
  require("effect/unstable/process");
12
- let node_fs_promises = require("node:fs/promises");
13
12
  let _github_copilot_sdk = require("@github/copilot-sdk");
14
13
  //#region src/provider/Layers/CopilotAdapter.types.ts
15
14
  const COPILOT_DRIVER_KIND = require_collectUint8StreamText.ProviderDriverKind.make("copilot");
@@ -668,27 +667,32 @@ const makeStartSession = (deps) => (input) => effect.Effect.gen(function* () {
668
667
  }).pipe(effect.Effect.onError(() => effect.Effect.sync(() => deps.sessions.get(input.threadId)?.agentControl).pipe(effect.Effect.flatMap((connection) => connection ? connection.revoke("runtime-teardown") : effect.Effect.void))));
669
668
  const makeSendTurn = (deps) => (input) => effect.Effect.gen(function* () {
670
669
  const record = yield* deps.requireSession(input.threadId);
670
+ const declaredAttachmentBytes = (input.attachments ?? []).reduce((total, attachment) => total + attachment.sizeBytes, 0);
671
+ if (declaredAttachmentBytes > 52428800) return yield* new require_bin.ProviderAdapterRequestError({
672
+ provider: COPILOT_DRIVER_KIND,
673
+ method: "session.send",
674
+ detail: `Attachments total ${declaredAttachmentBytes} bytes; limit is ${require_collectUint8StreamText.PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES} bytes.`
675
+ });
676
+ let attachmentTotalBytes = 0;
671
677
  const attachments = yield* effect.Effect.forEach(input.attachments ?? [], (attachment) => effect.Effect.gen(function* () {
672
- const filePath = require_bin.resolveAttachmentPath({
678
+ const persisted = require_bin.readPersistedAttachment({
673
679
  attachmentsDir: deps.serverConfig.attachmentsDir,
674
680
  attachment
675
681
  });
676
- if (!filePath) return yield* new require_bin.ProviderAdapterRequestError({
682
+ if (!persisted.ok) return yield* new require_bin.ProviderAdapterRequestError({
683
+ provider: COPILOT_DRIVER_KIND,
684
+ method: "session.send",
685
+ detail: persisted.reason
686
+ });
687
+ attachmentTotalBytes += persisted.sizeBytes;
688
+ if (attachmentTotalBytes > 52428800) return yield* new require_bin.ProviderAdapterRequestError({
677
689
  provider: COPILOT_DRIVER_KIND,
678
690
  method: "session.send",
679
- detail: `Invalid attachment id '${attachment.id}'.`
691
+ detail: `Attachments total ${attachmentTotalBytes} bytes; limit is ${require_collectUint8StreamText.PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES} bytes.`
680
692
  });
681
693
  return {
682
694
  type: "blob",
683
- data: (yield* effect.Effect.tryPromise({
684
- try: () => (0, node_fs_promises.readFile)(filePath),
685
- catch: (cause) => new require_bin.ProviderAdapterRequestError({
686
- provider: COPILOT_DRIVER_KIND,
687
- method: "session.send",
688
- detail: `Failed to read attachment '${attachment.name}'.`,
689
- cause
690
- })
691
- })).toString("base64"),
695
+ data: persisted.bytes.toString("base64"),
692
696
  mimeType: attachmentMimeType(attachment),
693
697
  displayName: attachment.name
694
698
  };
@@ -1,15 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { Fa as DEFAULT_GIT_TEXT_GENERATION_OPTIONS_BY_PROVIDER, Go as RuntimeItemId, Ko as RuntimeRequestId, Pa as DEFAULT_GIT_TEXT_GENERATION_MODEL_BY_PROVIDER, Pn as TextGenerationError, Qo as TurnId, Ra as ProviderDriverKind, Ro as EventId, Wo as ProviderItemId, er as CodexSettings, tr as CopilotSettings, za as ProviderInstanceId } from "./collectUint8StreamText-EDg4F0TU.mjs";
3
+ import { Ba as ProviderDriverKind, Bo as EventId, Ia as DEFAULT_GIT_TEXT_GENERATION_MODEL_BY_PROVIDER, Jo as RuntimeRequestId, Ko as ProviderItemId, La as DEFAULT_GIT_TEXT_GENERATION_OPTIONS_BY_PROVIDER, Pn as TextGenerationError, Va as ProviderInstanceId, bi as PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES, er as CodexSettings, es as TurnId, qo as RuntimeItemId, tr as CopilotSettings } from "./collectUint8StreamText-RzKEq2NY.mjs";
4
4
  import { st as ServerConfig } from "./Metrics-BP9YjxZB.mjs";
5
- import { D as buildThreadPriorityPrompt, G as buildSelectOptionDescriptor, Gn as getProviderOptionStringSelectionValue, In as resolveAttachmentPath, K as buildServerProvider, Ln as resolveCommandPath, N as sanitizeThreadTitle, O as buildThreadTitlePrompt, On as makeManualOnlyProviderMaintenanceCapabilities, Q as providerModelsFromSettings, Vn as getModelSelectionStringOptionValue, Y as isCommandMissingCause, _ as ProviderEventLoggers, at as createProcessDeviceToolBinding, dt as ProviderDriverError, et as AGENT_CONTROL_INTERNAL_SERVER_NAME, it as redactAgentControlSecrets, k as extractJsonObject, lt as ProviderAdapterSessionNotFoundError, n as AgentControlSessionRegistry, ot as ProviderAdapterProcessError, rt as installAgentControlNativeHttp, st as ProviderAdapterRequestError, t as makeServerQueueMetrics, tt as agentControlHostContext, ut as ProviderAdapterValidationError, v as makeEventNdjsonLogger, x as validateRankInboxThreadsResult, z as mergeProviderInstanceEnvironment, zn as createModelCapabilities } from "./bin.mjs";
6
- import { n as requireRuntimeSessionId, r as stampRuntimeEvent, t as makeManagedServerProvider } from "./makeManagedServerProvider-Cf8bNWwc.mjs";
5
+ import { Bn as createModelCapabilities, D as buildThreadPriorityPrompt, G as buildSelectOptionDescriptor, Hn as getModelSelectionStringOptionValue, In as readPersistedAttachment, K as buildServerProvider, Kn as getProviderOptionStringSelectionValue, N as sanitizeThreadTitle, O as buildThreadTitlePrompt, On as makeManualOnlyProviderMaintenanceCapabilities, Q as providerModelsFromSettings, Rn as resolveCommandPath, Y as isCommandMissingCause, _ as ProviderEventLoggers, at as createProcessDeviceToolBinding, dt as ProviderDriverError, et as AGENT_CONTROL_INTERNAL_SERVER_NAME, it as redactAgentControlSecrets, k as extractJsonObject, lt as ProviderAdapterSessionNotFoundError, n as AgentControlSessionRegistry, ot as ProviderAdapterProcessError, rt as installAgentControlNativeHttp, st as ProviderAdapterRequestError, t as makeServerQueueMetrics, tt as agentControlHostContext, ut as ProviderAdapterValidationError, v as makeEventNdjsonLogger, x as validateRankInboxThreadsResult, z as mergeProviderInstanceEnvironment } from "./bin.mjs";
6
+ import { n as requireRuntimeSessionId, r as stampRuntimeEvent, t as makeManagedServerProvider } from "./makeManagedServerProvider-BuG2fLP8.mjs";
7
7
  import { t as defaultProviderContinuationIdentity } from "./ProviderDriver-kCV60GKk.mjs";
8
- import { t as makeCodexTextGeneration } from "./CodexTextGeneration-BeG7ymPC.mjs";
8
+ import { t as makeCodexTextGeneration } from "./CodexTextGeneration-C0t4xcPO.mjs";
9
9
  import { Effect, Option, Queue, Result, Schema, Stream } from "effect";
10
10
  import { randomUUID } from "node:crypto";
11
11
  import "effect/unstable/process";
12
- import { readFile } from "node:fs/promises";
13
12
  import { CopilotClient, RuntimeConnection } from "@github/copilot-sdk";
14
13
  //#region src/provider/Layers/CopilotAdapter.types.ts
15
14
  const COPILOT_DRIVER_KIND = ProviderDriverKind.make("copilot");
@@ -668,27 +667,32 @@ const makeStartSession = (deps) => (input) => Effect.gen(function* () {
668
667
  }).pipe(Effect.onError(() => Effect.sync(() => deps.sessions.get(input.threadId)?.agentControl).pipe(Effect.flatMap((connection) => connection ? connection.revoke("runtime-teardown") : Effect.void))));
669
668
  const makeSendTurn = (deps) => (input) => Effect.gen(function* () {
670
669
  const record = yield* deps.requireSession(input.threadId);
670
+ const declaredAttachmentBytes = (input.attachments ?? []).reduce((total, attachment) => total + attachment.sizeBytes, 0);
671
+ if (declaredAttachmentBytes > 52428800) return yield* new ProviderAdapterRequestError({
672
+ provider: COPILOT_DRIVER_KIND,
673
+ method: "session.send",
674
+ detail: `Attachments total ${declaredAttachmentBytes} bytes; limit is ${PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES} bytes.`
675
+ });
676
+ let attachmentTotalBytes = 0;
671
677
  const attachments = yield* Effect.forEach(input.attachments ?? [], (attachment) => Effect.gen(function* () {
672
- const filePath = resolveAttachmentPath({
678
+ const persisted = readPersistedAttachment({
673
679
  attachmentsDir: deps.serverConfig.attachmentsDir,
674
680
  attachment
675
681
  });
676
- if (!filePath) return yield* new ProviderAdapterRequestError({
682
+ if (!persisted.ok) return yield* new ProviderAdapterRequestError({
683
+ provider: COPILOT_DRIVER_KIND,
684
+ method: "session.send",
685
+ detail: persisted.reason
686
+ });
687
+ attachmentTotalBytes += persisted.sizeBytes;
688
+ if (attachmentTotalBytes > 52428800) return yield* new ProviderAdapterRequestError({
677
689
  provider: COPILOT_DRIVER_KIND,
678
690
  method: "session.send",
679
- detail: `Invalid attachment id '${attachment.id}'.`
691
+ detail: `Attachments total ${attachmentTotalBytes} bytes; limit is ${PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES} bytes.`
680
692
  });
681
693
  return {
682
694
  type: "blob",
683
- data: (yield* Effect.tryPromise({
684
- try: () => readFile(filePath),
685
- catch: (cause) => new ProviderAdapterRequestError({
686
- provider: COPILOT_DRIVER_KIND,
687
- method: "session.send",
688
- detail: `Failed to read attachment '${attachment.name}'.`,
689
- cause
690
- })
691
- })).toString("base64"),
695
+ data: persisted.bytes.toString("base64"),
692
696
  mimeType: attachmentMimeType(attachment),
693
697
  displayName: attachment.name
694
698
  };
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { Ao as ApprovalRequestId, Ko as RuntimeRequestId, Pn as TextGenerationError, Qo as TurnId, Ra as ProviderDriverKind, Ro as EventId, nr as CursorSettings, za as ProviderInstanceId } from "./collectUint8StreamText-EDg4F0TU.mjs";
3
+ import { Ba as ProviderDriverKind, Bo as EventId, Jo as RuntimeRequestId, Mo as ApprovalRequestId, Pn as TextGenerationError, Va as ProviderInstanceId, es as TurnId, nr as CursorSettings } from "./collectUint8StreamText-RzKEq2NY.mjs";
4
4
  import { nt as sanitizeFeatureBranchName, st as ServerConfig, tt as sanitizeBranchFragment } from "./Metrics-BP9YjxZB.mjs";
5
- import { An as makeProviderMaintenanceCapabilities, C as buildCommitMessagePrompt, D as buildThreadPriorityPrompt, Dn as enrichProviderSnapshotWithVersionAdvisory, E as buildPrContentPrompt, Fn as ServerSettingsService, G as buildSelectOptionDescriptor, Gn as getProviderOptionStringSelectionValue, Hn as getProviderOptionBooleanSelectionValue, In as resolveAttachmentPath, K as buildServerProvider, M as sanitizePrTitle, N as sanitizeThreadTitle, Nn as resolveProviderMaintenanceCapabilitiesEffect, O as buildThreadTitlePrompt, Q as providerModelsFromSettings, S as buildBranchNamePrompt, T as buildIssueContentTitlePrompt, W as buildBooleanOptionDescriptor, Y as isCommandMissingCause, _ as ProviderEventLoggers, at as createProcessDeviceToolBinding, dt as ProviderDriverError, j as sanitizeCommitSubject, jn as makeStaticProviderMaintenanceResolver, k as extractJsonObject, lt as ProviderAdapterSessionNotFoundError, n as AgentControlSessionRegistry, nt as installAgentControlAcp, ot as ProviderAdapterProcessError, q as collectStreamAsString, st as ProviderAdapterRequestError, tt as agentControlHostContext, ut as ProviderAdapterValidationError, v as makeEventNdjsonLogger, w as buildIssueContentPolishPrompt, x as validateRankInboxThreadsResult, z as mergeProviderInstanceEnvironment, zn as createModelCapabilities } from "./bin.mjs";
6
- import { n as requireRuntimeSessionId, r as stampRuntimeEvent, t as makeManagedServerProvider } from "./makeManagedServerProvider-Cf8bNWwc.mjs";
5
+ import { An as makeProviderMaintenanceCapabilities, Bn as createModelCapabilities, C as buildCommitMessagePrompt, D as buildThreadPriorityPrompt, Dn as enrichProviderSnapshotWithVersionAdvisory, E as buildPrContentPrompt, Fn as ServerSettingsService, G as buildSelectOptionDescriptor, K as buildServerProvider, Kn as getProviderOptionStringSelectionValue, Ln as resolveAttachmentPath, M as sanitizePrTitle, N as sanitizeThreadTitle, Nn as resolveProviderMaintenanceCapabilitiesEffect, O as buildThreadTitlePrompt, Q as providerModelsFromSettings, S as buildBranchNamePrompt, T as buildIssueContentTitlePrompt, Un as getProviderOptionBooleanSelectionValue, W as buildBooleanOptionDescriptor, Y as isCommandMissingCause, _ as ProviderEventLoggers, at as createProcessDeviceToolBinding, dt as ProviderDriverError, j as sanitizeCommitSubject, jn as makeStaticProviderMaintenanceResolver, k as extractJsonObject, lt as ProviderAdapterSessionNotFoundError, n as AgentControlSessionRegistry, nt as installAgentControlAcp, ot as ProviderAdapterProcessError, q as collectStreamAsString, st as ProviderAdapterRequestError, tt as agentControlHostContext, ut as ProviderAdapterValidationError, v as makeEventNdjsonLogger, w as buildIssueContentPolishPrompt, x as validateRankInboxThreadsResult, z as mergeProviderInstanceEnvironment } from "./bin.mjs";
6
+ import { n as requireRuntimeSessionId, r as stampRuntimeEvent, t as makeManagedServerProvider } from "./makeManagedServerProvider-BuG2fLP8.mjs";
7
7
  import { t as defaultProviderContinuationIdentity } from "./ProviderDriver-kCV60GKk.mjs";
8
- import { a as makeAcpRequestOpenedEvent, c as makeAcpToolCallEvent, d as AcpSessionRuntime, f as parsePermissionRequest, i as makeAcpPlanUpdatedEvent, l as acpPermissionOutcome, m as SessionConfigOption, n as makeAcpAssistantItemEvent, o as makeAcpRequestResolvedEvent, r as makeAcpContentDeltaEvent, s as makeAcpTokenUsageEvent, t as makeAcpNativeLoggers, u as mapAcpToAdapterError } from "./AcpNativeLogging-Ba9Nn9Re.mjs";
8
+ import { a as makeAcpRequestOpenedEvent, c as makeAcpToolCallEvent, d as AcpSessionRuntime, f as parsePermissionRequest, i as makeAcpPlanUpdatedEvent, l as acpPermissionOutcome, m as SessionConfigOption, n as makeAcpAssistantItemEvent, o as makeAcpRequestResolvedEvent, r as makeAcpContentDeltaEvent, s as makeAcpTokenUsageEvent, t as makeAcpNativeLoggers, u as mapAcpToAdapterError } from "./AcpNativeLogging-D3fe64a6.mjs";
9
9
  import { Cause, DateTime, Deferred, Effect, Exit, Fiber, FileSystem, Layer, Option, Path, PubSub, Ref, Result, Schema, Scope, Semaphore, Stream, SynchronizedRef } from "effect";
10
10
  import { HttpClient } from "effect/unstable/http";
11
11
  import * as nodePath from "node:path";
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const require_rolldown_runtime = require("./rolldown-runtime-LGfotAqq.cjs");
4
- const require_collectUint8StreamText = require("./collectUint8StreamText-Bb52hlpd.cjs");
4
+ const require_collectUint8StreamText = require("./collectUint8StreamText-B9B7bGv9.cjs");
5
5
  const require_Metrics = require("./Metrics-DIjMQ5pa.cjs");
6
6
  const require_bin = require("./bin.cjs");
7
- const require_makeManagedServerProvider = require("./makeManagedServerProvider-itynW7xv.cjs");
7
+ const require_makeManagedServerProvider = require("./makeManagedServerProvider-BF1eBatf.cjs");
8
8
  const require_ProviderDriver = require("./ProviderDriver--rNeAi3B.cjs");
9
- const require_AcpNativeLogging = require("./AcpNativeLogging-Be1KGJfF.cjs");
9
+ const require_AcpNativeLogging = require("./AcpNativeLogging-vLtnq5f1.cjs");
10
10
  let effect = require("effect");
11
11
  let effect_unstable_http = require("effect/unstable/http");
12
12
  let node_path = require("node:path");
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { Ca as truncateSourceControlDetailContent, xa as SourceControlProviderError } from "./collectUint8StreamText-EDg4F0TU.mjs";
4
- import { a as makeForgejoDiscovery, l as sourceControlRefFromInput, o as SourceControlProvider } from "./SourceControlProviderDiscoveryCatalog-4_4yahsa.mjs";
3
+ import { Ca as SourceControlProviderError, Ta as truncateSourceControlDetailContent } from "./collectUint8StreamText-RzKEq2NY.mjs";
4
+ import { a as makeForgejoDiscovery, l as sourceControlRefFromInput, o as SourceControlProvider } from "./SourceControlProviderDiscoveryCatalog-C6Fn7rZE.mjs";
5
5
  import { wn as ForgejoApi } from "./bin.mjs";
6
6
  import { DateTime, Effect, Layer, Option } from "effect";
7
7
  //#region src/sourceControl/ForgejoSourceControlProvider.ts
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const require_collectUint8StreamText = require("./collectUint8StreamText-Bb52hlpd.cjs");
4
- const require_SourceControlProviderDiscoveryCatalog = require("./SourceControlProviderDiscoveryCatalog-DJWDCoup.cjs");
3
+ const require_collectUint8StreamText = require("./collectUint8StreamText-B9B7bGv9.cjs");
4
+ const require_SourceControlProviderDiscoveryCatalog = require("./SourceControlProviderDiscoveryCatalog-Bj_sZfmB.cjs");
5
5
  const require_bin = require("./bin.cjs");
6
6
  let effect = require("effect");
7
7
  //#region src/sourceControl/ForgejoSourceControlProvider.ts
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const require_collectUint8StreamText = require("./collectUint8StreamText-Bb52hlpd.cjs");
4
- const require_SourceControlProviderDiscoveryCatalog = require("./SourceControlProviderDiscoveryCatalog-DJWDCoup.cjs");
3
+ const require_collectUint8StreamText = require("./collectUint8StreamText-B9B7bGv9.cjs");
4
+ const require_SourceControlProviderDiscoveryCatalog = require("./SourceControlProviderDiscoveryCatalog-Bj_sZfmB.cjs");
5
5
  const require_sourceControl = require("./sourceControl-B0D1Op29.cjs");
6
6
  const require_bin = require("./bin.cjs");
7
7
  let effect = require("effect");
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { Ca as truncateSourceControlDetailContent, ba as SOURCE_CONTROL_WORKFLOW_LOG_MAX_BYTES, xa as SourceControlProviderError } from "./collectUint8StreamText-EDg4F0TU.mjs";
4
- import { n as githubDiscovery, o as SourceControlProvider } from "./SourceControlProviderDiscoveryCatalog-4_4yahsa.mjs";
3
+ import { Ca as SourceControlProviderError, Sa as SOURCE_CONTROL_WORKFLOW_LOG_MAX_BYTES, Ta as truncateSourceControlDetailContent } from "./collectUint8StreamText-RzKEq2NY.mjs";
4
+ import { n as githubDiscovery, o as SourceControlProvider } from "./SourceControlProviderDiscoveryCatalog-C6Fn7rZE.mjs";
5
5
  import { a as parseGitHubRepositoryOwnerFromUrl, i as parseGitHubRepositoryIdentityFromUrl, t as classifySourceControlCommentAuthorRole } from "./sourceControl-BiEBxN01.mjs";
6
6
  import { Cn as decodeGitHubPullRequestListJson, Sn as withoutStatusCheckRollupJsonField, _n as GITHUB_PULL_REQUEST_LIST_JSON_FIELDS, bn as formatGitHubJsonFields, vn as GitHubCli, xn as isStatusCheckRollupAccessError, yn as GitHubCliError } from "./bin.mjs";
7
7
  import { DateTime, Effect, FileSystem, Layer, Option, Result, Schema } from "effect";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { Ca as truncateSourceControlDetailContent, xa as SourceControlProviderError } from "./collectUint8StreamText-EDg4F0TU.mjs";
4
- import { l as sourceControlRefFromInput, o as SourceControlProvider, r as gitlabDiscovery } from "./SourceControlProviderDiscoveryCatalog-4_4yahsa.mjs";
3
+ import { Ca as SourceControlProviderError, Ta as truncateSourceControlDetailContent } from "./collectUint8StreamText-RzKEq2NY.mjs";
4
+ import { l as sourceControlRefFromInput, o as SourceControlProvider, r as gitlabDiscovery } from "./SourceControlProviderDiscoveryCatalog-C6Fn7rZE.mjs";
5
5
  import { gn as GitLabCli } from "./bin.mjs";
6
6
  import { DateTime, Effect, Layer, Option } from "effect";
7
7
  //#region src/sourceControl/GitLabSourceControlProvider.ts