ryco-cli 0.1.12 → 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.
- package/dist/{AcpNativeLogging-Ba9Nn9Re.mjs → AcpNativeLogging-D3fe64a6.mjs} +1 -1
- package/dist/{AcpNativeLogging-Be1KGJfF.cjs → AcpNativeLogging-vLtnq5f1.cjs} +1 -1
- package/dist/{AzureDevOpsSourceControlProvider-CVj-F-pW.cjs → AzureDevOpsSourceControlProvider-BtezW57t.cjs} +2 -2
- package/dist/{AzureDevOpsSourceControlProvider-CGlK6M0b.mjs → AzureDevOpsSourceControlProvider-WNUDtsur.mjs} +2 -2
- package/dist/{BitbucketSourceControlProvider-CEZEd4PX.cjs → BitbucketSourceControlProvider-BWzNM0jW.cjs} +2 -2
- package/dist/{BitbucketSourceControlProvider-BV6iRDi7.mjs → BitbucketSourceControlProvider-tbbUFKz3.mjs} +2 -2
- package/dist/{ClaudeDriver-lBU7EyUX.cjs → ClaudeDriver-BTvdJvam.cjs} +170 -7
- package/dist/{ClaudeDriver-rooMNrJz.mjs → ClaudeDriver-CG5ngU5z.mjs} +171 -8
- package/dist/{CodexDriver-DBz2rPXb.mjs → CodexDriver-49o7TA-C.mjs} +4 -4
- package/dist/{CodexDriver-CZCIJSLV.cjs → CodexDriver-CFxwJNXx.cjs} +3 -3
- package/dist/{CodexTextGeneration-BeG7ymPC.mjs → CodexTextGeneration-C0t4xcPO.mjs} +2 -2
- package/dist/{CodexTextGeneration-BvIcyD1P.cjs → CodexTextGeneration-CedcXf9a.cjs} +1 -1
- package/dist/{CopilotDriver-CX5zhEdZ.cjs → CopilotDriver-B8J_ovCX.cjs} +20 -16
- package/dist/{CopilotDriver-D36vbGbn.mjs → CopilotDriver-Cu1B1skB.mjs} +21 -17
- package/dist/{CursorDriver-DWuuOSkJ.mjs → CursorDriver-P_A8uQki.mjs} +4 -4
- package/dist/{CursorDriver-CPBVeesr.cjs → CursorDriver-zlKHPy1_.cjs} +3 -3
- package/dist/{ForgejoSourceControlProvider-CeN7Snfr.mjs → ForgejoSourceControlProvider-DLhJZtq9.mjs} +2 -2
- package/dist/{ForgejoSourceControlProvider-CzmmcAZO.cjs → ForgejoSourceControlProvider-szJ-dvsD.cjs} +2 -2
- package/dist/{GitHubSourceControlProvider-DfFR9O2o.cjs → GitHubSourceControlProvider-3ofb6HsF.cjs} +2 -2
- package/dist/{GitHubSourceControlProvider-Dmz1LJct.mjs → GitHubSourceControlProvider-D5MQQPCJ.mjs} +2 -2
- package/dist/{GitLabSourceControlProvider-C21lwphV.mjs → GitLabSourceControlProvider-DLkxeob5.mjs} +2 -2
- package/dist/{GitLabSourceControlProvider-DGoelNmL.cjs → GitLabSourceControlProvider-DkupZH5G.cjs} +2 -2
- package/dist/{GrokDriver-CIXj_4ry.cjs → GrokDriver-CTUNclwp.cjs} +3 -3
- package/dist/{GrokDriver-qKX1a63G.mjs → GrokDriver-D8KoMY76.mjs} +4 -4
- package/dist/{OpenCodeDriver-CbdswhqU.mjs → OpenCodeDriver-B7htxutj.mjs} +92 -27
- package/dist/{OpenCodeDriver-DDEuwtXl.cjs → OpenCodeDriver-pXM8bSct.cjs} +91 -26
- package/dist/{SourceControlProviderDiscoveryCatalog-DJWDCoup.cjs → SourceControlProviderDiscoveryCatalog-Bj_sZfmB.cjs} +1 -1
- package/dist/{SourceControlProviderDiscoveryCatalog-4_4yahsa.mjs → SourceControlProviderDiscoveryCatalog-C6Fn7rZE.mjs} +1 -1
- package/dist/bin.cjs +1113 -312
- package/dist/bin.mjs +1115 -315
- package/dist/client/assets/{AccountSettings-C3v2klAG.js → AccountSettings-CinnQaX-.js} +1 -1
- package/dist/client/assets/{AiFocusSettings-BquKjnWf.js → AiFocusSettings-UbXOywZg.js} +1 -1
- package/dist/client/assets/{AnimatedHeight-BIsV_Z3J.js → AnimatedHeight-DCad8EQ2.js} +1 -1
- package/dist/client/assets/AppearanceSettings-CTh8Z8nz.js +1 -0
- package/dist/client/assets/{BranchToolbar.logic-CmvD76Cw.js → BranchToolbar.logic-37EnknDD.js} +1 -1
- package/dist/client/assets/ChatRightPanel-DUwLYKbp.js +27 -0
- package/dist/client/assets/{ChatThreadRouteView-DlgAAOCp.js → ChatThreadRouteView-C43W0PEz.js} +1 -1
- package/dist/client/assets/CommandPaletteDialog-IHOe0hOG.js +1 -0
- package/dist/client/assets/{CompositeItem-F3NGn6aG.js → CompositeItem-ClLCuzeJ.js} +1 -1
- package/dist/client/assets/{CompositeRoot-CmJGfRtc.js → CompositeRoot-Bdsr9eHn.js} +1 -1
- package/dist/client/assets/{ConnectionsSettings-Ccn8q4fG.js → ConnectionsSettings-tmBjGOPj.js} +2 -2
- package/dist/client/assets/{DiagnosticsSettings-QXpjXOrH.js → DiagnosticsSettings-CbCEgaau.js} +1 -1
- package/dist/client/assets/{DialogHandle-C4uSr9wX.js → DialogHandle-CitVLvYq.js} +1 -1
- package/dist/client/assets/{DialogPopup-Dck8r8Hn.js → DialogPopup-CfaEr9jv.js} +1 -1
- package/dist/client/assets/DialogRoot-CyEOjgGH.js +1 -0
- package/dist/client/assets/{DialogTitle-CCedPAjV.js → DialogTitle-BUkU0qXf.js} +1 -1
- package/dist/client/assets/{DialogTrigger-CYJ7_YcV.js → DialogTrigger-CEjWue7M.js} +1 -1
- package/dist/client/assets/{DialogViewport-D-CrTM-P.js → DialogViewport-Cyc_ye5w.js} +1 -1
- package/dist/client/assets/{DraftChatThreadRouteView-DFMY6O91.js → DraftChatThreadRouteView-BSA67nKa.js} +1 -1
- package/dist/client/assets/{ExternalIdentityWeb.logic-D64j70NH.js → ExternalIdentityWeb.logic-BqdBjAua.js} +1 -1
- package/dist/client/assets/GlassSurface-B3cq28tB.js +1 -0
- package/dist/client/assets/{HostedConnectionControls-BC4kVWTa.js → HostedConnectionControls-S2Wr9fiZ.js} +1 -1
- package/dist/client/assets/HostedHubRoot-DK9zP4tJ.js +1 -0
- package/dist/client/assets/{HostedNativeAuthorizationRoute-Df0oSrLR.js → HostedNativeAuthorizationRoute-CKnLbCOH.js} +1 -1
- package/dist/client/assets/{HostedRelayTrustNotice-ffS_O2AX.js → HostedRelayTrustNotice-CbF_SOpf.js} +1 -1
- package/dist/client/assets/{Icons-CT3nd2MA.js → Icons-DZpTOLIb.js} +1 -1
- package/dist/client/assets/{IntegrationsSettingsPanel-BHyy-VM0.js → IntegrationsSettingsPanel-BdBEGIyL.js} +1 -1
- package/dist/client/assets/KeybindingsSettings-Bye1H9Sx.js +7 -0
- package/dist/client/assets/{McpServersSettings-UthT1T80.js → McpServersSettings-D0U0g2q7.js} +1 -1
- package/dist/client/assets/{MobileSheet-CkeG6_SP.js → MobileSheet-BPvuTPR6.js} +1 -1
- package/dist/client/assets/{NewWorktreeDialog-DTZnArOC.js → NewWorktreeDialog-C_xJCZWF.js} +1 -1
- package/dist/client/assets/{NoActiveThreadState-jcEAWu7N.js → NoActiveThreadState-Cfn_Wwnf.js} +1 -1
- package/dist/client/assets/{NodeSecuritySettings-DPqjRphc.js → NodeSecuritySettings-DUQNZJqJ.js} +1 -1
- package/dist/client/assets/{OpinionatedPluginsSettings-BSy3F4v6.js → OpinionatedPluginsSettings-D44efcv7.js} +1 -1
- package/dist/client/assets/{PhoneGetAppInterstitial-B2mrJtgM.js → PhoneGetAppInterstitial-CzduFI4-.js} +1 -1
- package/dist/client/assets/{PhoneGetAppInterstitialBackdrop-B8vfJdZd.js → PhoneGetAppInterstitialBackdrop-CJ44QRCp.js} +1 -1
- package/dist/client/assets/PhoneHome-BLEJm5TG.js +1 -0
- package/dist/client/assets/PhoneSettingsSurface-CqetLTIm.js +1 -0
- package/dist/client/assets/{ProjectFavicon-BhQnkxbx.js → ProjectFavicon-DrBXI2cH.js} +1 -1
- package/dist/client/assets/{ProviderModelPicker-COg6CGM4.js → ProviderModelPicker-CyID3P1C.js} +1 -1
- package/dist/client/assets/{ProviderUpdateLaunchNotification.logic-BkoRegCn.js → ProviderUpdateLaunchNotification.logic-C6VoLD-w.js} +1 -1
- package/dist/client/assets/ProvidersSettingsPanel-BHmpXUIM.js +1 -0
- package/dist/client/assets/{RedactedSensitiveText-CxtaUiKH.js → RedactedSensitiveText-CZwFEoNn.js} +1 -1
- package/dist/client/assets/RootAppShell-BVXRShhe.js +6 -0
- package/dist/client/assets/{RycoLetterMark-Bk0kvGJ_.js → RycoLetterMark-C-fvI9UB.js} +1 -1
- package/dist/client/assets/SettingsDialog-CnETTu23.js +1 -0
- package/dist/client/assets/{SettingsPanels-D8Xy3pPC.js → SettingsPanels-C3HDrmQq.js} +3 -3
- package/dist/client/assets/{SettingsPanels.editor-B2x4U4rW.js → SettingsPanels.editor-DI8Z5rsl.js} +1 -1
- package/dist/client/assets/SourceControlSettings-BG4tsvql.js +1 -0
- package/dist/client/assets/{StatisticsPage-C38pI2_b.js → StatisticsPage-dy_aYqvS.js} +1 -1
- package/dist/client/assets/{StatisticsPanel-6sINT28-.js → StatisticsPanel-CeRJBu65.js} +1 -1
- package/dist/client/assets/{StatisticsSettingsLink-Cx43bOeo.js → StatisticsSettingsLink-ChlwCDG0.js} +1 -1
- package/dist/client/assets/ThreadStatusIndicators-D-ioX09X.js +0 -0
- package/dist/client/assets/{ThreadTerminalDrawer-C4NJu8Qs.js → ThreadTerminalDrawer-BvGaRxBP.js} +1 -1
- package/dist/client/assets/{ThreadWorkspacePanel-D9qlHXCA.js → ThreadWorkspacePanel-BAWm7mGl.js} +2 -2
- package/dist/client/assets/{ToolbarRootContext-BgqqXVly.js → ToolbarRootContext-k-_m5nCN.js} +1 -1
- package/dist/client/assets/{WorkItemsTab-BDAeQe4D.js → WorkItemsTab-Q2V2EuvK.js} +12 -12
- package/dist/client/assets/{alert-LqMhbdE9.js → alert-BymbRVPf.js} +1 -1
- package/dist/client/assets/{alert-dialog-DxoA6ky8.js → alert-dialog-Gym8_p4Q.js} +1 -1
- package/dist/client/assets/appearancePreferences-BhNRCg6W.js +1 -0
- package/dist/client/assets/authorization-BwQZHweJ.js +1 -0
- package/dist/client/assets/{badge-CXw6fWrB.js → badge-BQI7J3Sg.js} +1 -1
- package/dist/client/assets/{branding-DeKsIp6g.js → branding-DqHDcyzW.js} +1 -1
- package/dist/client/assets/{button-BAbJxRzt.js → button-Wf_1nfeu.js} +1 -1
- package/dist/client/assets/{capabilities-BkVqeGLQ.js → capabilities-BrllgEYz.js} +1 -1
- package/dist/client/assets/{chatThreadActions-DQ8aOQ1g.js → chatThreadActions-BGkJmj6T.js} +1 -1
- package/dist/client/assets/{collapsible-dxy6kc2k.js → collapsible-GOpRckDq.js} +1 -1
- package/dist/client/assets/{command-CGNKG_Oe.js → command-Dx5YM54H.js} +1 -1
- package/dist/client/assets/composerDraftStore-DC2r8dcu.js +11 -0
- package/dist/client/assets/{data-list-CYKBxN62.js → data-list-BSiCZBKn.js} +1 -1
- package/dist/client/assets/{desktopUpdateAtoms-B9iJXSdW.js → desktopUpdateAtoms-DkmoIGr0.js} +1 -1
- package/dist/client/assets/{desktopWorkspace-B-cSBe8H.js → desktopWorkspace-Ddm531g5.js} +1 -1
- package/dist/client/assets/{device-DfIh5pQV.js → device-B0aqBYM1.js} +1 -1
- package/dist/client/assets/{dialog-DQsYchqu.js → dialog-CUxw5AxI.js} +1 -1
- package/dist/client/assets/{draft-input-CkzOk8BY.js → draft-input-CpfrGQ1h.js} +1 -1
- package/dist/client/assets/editorPreferences-SOMXdQpi.js +1 -0
- package/dist/client/assets/{empty-DwzqNgCP.js → empty-D420OZA9.js} +1 -1
- package/dist/client/assets/{env-B4arEvJg.js → env-Bf33qXdb.js} +1 -1
- package/dist/client/assets/{getPseudoElementBounds-X62ElHN8.js → getPseudoElementBounds-nDGTWECG.js} +1 -1
- package/dist/client/assets/{group-D9ER9giz.js → group-Cq4Llttm.js} +1 -1
- package/dist/client/assets/{index-Bntnmu6O.js → index-BL8_ra0g.js} +2 -2
- package/dist/client/assets/{input-CHEwW3oH.js → input-Dl4N9ZfE.js} +1 -1
- package/dist/client/assets/{kbd-DCGQZk18.js → kbd-CqoZVQfv.js} +1 -1
- package/dist/client/assets/{keybindings-CWJ7E9ZI.js → keybindings-DQzcPjMv.js} +1 -1
- package/dist/client/assets/{label-CVFHsLFO.js → label-x5DgpBI_.js} +1 -1
- package/dist/client/assets/{lib-qiiNMGgU.js → lib-BXIqHSZx.js} +1 -1
- package/dist/client/assets/{liquidGlass-CPsvmaF0.js → liquidGlass-yFkZrRk5.js} +1 -1
- package/dist/client/assets/{logging-M8H3z7rQ.js → logging-CZlHfeu2.js} +1 -1
- package/dist/client/assets/main-B7T7on1T.css +2 -0
- package/dist/client/assets/main-J4YlUJad.js +9 -0
- package/dist/client/assets/{menu-Dvxh8sD5.js → menu-BuDpxm_Q.js} +1 -1
- package/dist/client/assets/{popover-CuH9Yrj3.js → popover-DuprDUaB.js} +1 -1
- package/dist/client/assets/primary-CJx2nSkc.js +2 -0
- package/dist/client/assets/projectPaths-DrelgodZ.js +1 -0
- package/dist/client/assets/{providerDriverMeta-I0TSo-QI.js → providerDriverMeta-D27Koh7Q.js} +1 -1
- package/dist/client/assets/{providerIconUtils-CzSa_16f.js → providerIconUtils-CtOHwjWL.js} +1 -1
- package/dist/client/assets/providerInstances-BPwEwwpF.js +1 -0
- package/dist/client/assets/providerModels-BPwEwwpF.js +1 -0
- package/dist/client/assets/{qr-code-Bddq6K7S.js → qr-code-BVfzPOP3.js} +1 -1
- package/dist/client/assets/{radio-group-CBZFr4C8.js → radio-group-rgmJqPI7.js} +1 -1
- package/dist/client/assets/{resolveAriaLabelledBy-CD_ugzhJ.js → resolveAriaLabelledBy-l4SuqStl.js} +1 -1
- package/dist/client/assets/{rightPanelRouteSearch-DB5gQGHK.js → rightPanelRouteSearch-DmpObL1z.js} +1 -1
- package/dist/client/assets/runtime-DYzjhL5M.js +1 -0
- package/dist/client/assets/{scroll-area-Drsa8bNB.js → scroll-area-DMs8l4bb.js} +1 -1
- package/dist/client/assets/{scrollEdges-B-cqxY4l.js → scrollEdges-DWTOweRb.js} +1 -1
- package/dist/client/assets/{select-BYbVr-yg.js → select-Djwp8HDm.js} +1 -1
- package/dist/client/assets/{separator-CdS5bi4Z.js → separator-rjtf5Q3V.js} +1 -1
- package/dist/client/assets/{session-logic-wxhvMgEN.js → session-logic-DLEAZb3K.js} +2 -2
- package/dist/client/assets/{settingsDialogStore-ygYoScKe.js → settingsDialogStore-Dbykwvfs.js} +1 -1
- package/dist/client/assets/{settingsLayout-D8glO7f1.js → settingsLayout-C7bl9Xi4.js} +1 -1
- package/dist/client/assets/{sheet-BO78gIKZ.js → sheet-CQIQYfOM.js} +1 -1
- package/dist/client/assets/{sidebar-Dm6l2GA6.js → sidebar-BdDOvXe8.js} +1 -1
- package/dist/client/assets/sidebarProjectFolders-D_Me0oJ8.js +4 -0
- package/dist/client/assets/{sidebarStatusText-D0HT0fek.js → sidebarStatusText-BF6odB03.js} +1 -1
- package/dist/client/assets/{skeleton-CvQSeJbw.js → skeleton-Mgh4Gx9x.js} +1 -1
- package/dist/client/assets/{spinner-ClF0jOcX.js → spinner-CzzUdFeE.js} +1 -1
- package/dist/client/assets/{src-Vf4LVnMX.js → src-Ca7Gag3m.js} +1 -1
- package/dist/client/assets/storeSelectors-D7HbqO4E.js +1 -0
- package/dist/client/assets/{switch-BTGo9Yip.js → switch-CntUxI1A.js} +1 -1
- package/dist/client/assets/{terminal-links-CZ3c9AbA.js → terminal-links-CUFISn8U.js} +1 -1
- package/dist/client/assets/{textarea-RFPODxWW.js → textarea-C8QxddDb.js} +1 -1
- package/dist/client/assets/threadPinning-BIV4KXZU.js +1 -0
- package/dist/client/assets/{threadPriorityRefreshRuntime-tRDgvBzr.js → threadPriorityRefreshRuntime-B-pVYK_y.js} +1 -1
- package/dist/client/assets/{toast-CcSCAm4B.js → toast-Cw7bXJzg.js} +1 -1
- package/dist/client/assets/{toggle-I6h33Cu5.js → toggle-Bi9uP4Hb.js} +1 -1
- package/dist/client/assets/{toggle-group-mLIkiJtU.js → toggle-group-LcgyMgj5.js} +1 -1
- package/dist/client/assets/{tooltip-C8sAONBj.js → tooltip-t3Nrleyq.js} +1 -1
- package/dist/client/assets/types-D7HbqO4E.js +1 -0
- package/dist/client/assets/{uiStateStore-B6pjzSjj.js → uiStateStore-BW2WnK4k.js} +1 -1
- package/dist/client/assets/useAtlassian-a-MaAd0k.js +0 -0
- package/dist/client/assets/{useButton-D__1LqCF.js → useButton-DUuWgIMw.js} +1 -1
- package/dist/client/assets/{useCompositeListItem-Cmr_nuuG.js → useCompositeListItem-CL5mJqCb.js} +1 -1
- package/dist/client/assets/{useDebouncedValue-DHjoudTq.js → useDebouncedValue-jDDWNjgt.js} +1 -1
- package/dist/client/assets/{useFloatingRootContext-D5EZmrCa.js → useFloatingRootContext-C4I8IxtL.js} +1 -1
- package/dist/client/assets/{useHandleNewThread-Bvz-DKgn.js → useHandleNewThread-820pBJCC.js} +1 -1
- package/dist/client/assets/{useLabelableId-DnQJ7amm.js → useLabelableId-KX33mhBC.js} +1 -1
- package/dist/client/assets/{useLocation-CDeYzWW6.js → useLocation-B4QlXdMt.js} +1 -1
- package/dist/client/assets/{useOpenInteractionType-CjtpACKR.js → useOpenInteractionType-DjM9MBY7.js} +1 -1
- package/dist/client/assets/{usePhoneThreadActions-CAgIq9aZ.js → usePhoneThreadActions-DxxWMYgC.js} +1 -1
- package/dist/client/assets/{usePopupViewport-BuhsNdVy.js → usePopupViewport-CAMlnyaP.js} +1 -1
- package/dist/client/assets/{useScrollLock-D3tMGsRk.js → useScrollLock-CAPfesBT.js} +1 -1
- package/dist/client/assets/{useStatistics-CiLROMJP.js → useStatistics-CWasDzsV.js} +2 -2
- package/dist/client/assets/{useSwipeDismiss-CbgDJvw1.js → useSwipeDismiss-BZsYSBgq.js} +1 -1
- package/dist/client/assets/{useTheme-DiC-5xCb.js → useTheme-By1kfyiU.js} +1 -1
- package/dist/client/assets/{useThreadActions-Vew3ScxG.js → useThreadActions-MOjDrEnS.js} +1 -1
- package/dist/client/assets/{useTriggerFocusGuards-CrugmkhX.js → useTriggerFocusGuards-D5z439rn.js} +1 -1
- package/dist/client/assets/{useValueChanged-MQtIzPIU.js → useValueChanged-D0CHQQwP.js} +1 -1
- package/dist/client/assets/{utils-BofFIn5Y.js → utils-B76_2Yk7.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/{collectUint8StreamText-Bb52hlpd.cjs → collectUint8StreamText-B9B7bGv9.cjs} +46 -10
- package/dist/{collectUint8StreamText-EDg4F0TU.mjs → collectUint8StreamText-RzKEq2NY.mjs} +35 -11
- package/dist/{makeManagedServerProvider-itynW7xv.cjs → makeManagedServerProvider-BF1eBatf.cjs} +1 -1
- package/dist/{makeManagedServerProvider-Cf8bNWwc.mjs → makeManagedServerProvider-BuG2fLP8.mjs} +1 -1
- package/package.json +1 -1
- package/dist/client/assets/AppearanceSettings-CYbSApl4.js +0 -1
- package/dist/client/assets/ChatRightPanel-DVxRdZWT.js +0 -27
- package/dist/client/assets/CommandPaletteDialog-BnJURcy7.js +0 -1
- package/dist/client/assets/DialogRoot-BpIvUdm7.js +0 -1
- package/dist/client/assets/GlassSurface-C3IIWMu9.js +0 -1
- package/dist/client/assets/HostedHubRoot-pBGVub10.js +0 -1
- package/dist/client/assets/KeybindingsSettings-BfkONqmZ.js +0 -7
- package/dist/client/assets/PhoneHome-C-ttaKuE.js +0 -1
- package/dist/client/assets/PhoneSettingsSurface-CJddundi.js +0 -1
- package/dist/client/assets/ProvidersSettingsPanel-C3aPyCrN.js +0 -1
- package/dist/client/assets/RootAppShell-3T2sBtpP.js +0 -6
- package/dist/client/assets/SettingsDialog-krsStFrf.js +0 -1
- package/dist/client/assets/SourceControlSettings-KIx9EfEZ.js +0 -1
- package/dist/client/assets/ThreadStatusIndicators-CL0KGLlj.js +0 -0
- package/dist/client/assets/appearancePreferences-COvj0WMT.js +0 -1
- package/dist/client/assets/authorization-mIJKV2yp.js +0 -1
- package/dist/client/assets/composerDraftStore-CdJJZe42.js +0 -11
- package/dist/client/assets/editorPreferences-0DWMgcci.js +0 -1
- package/dist/client/assets/main-BjVnVob0.js +0 -9
- package/dist/client/assets/main-DaYHZt-J.css +0 -2
- package/dist/client/assets/panel-right-BodNpkM9.js +0 -1
- package/dist/client/assets/primary-OskAInOO.js +0 -2
- package/dist/client/assets/projectPaths-SSsIvt0g.js +0 -1
- package/dist/client/assets/providerInstances-BJcfB_9E.js +0 -1
- package/dist/client/assets/providerModels-BJcfB_9E.js +0 -1
- package/dist/client/assets/runtime-DfGHeCnR.js +0 -1
- package/dist/client/assets/sidebarProjectFolders-CGVDJ0ZT.js +0 -4
- package/dist/client/assets/storeSelectors-Bpr2pdhU.js +0 -1
- package/dist/client/assets/types-Bpr2pdhU.js +0 -1
- package/dist/client/assets/useAppearancePreference-BlLlxQl7.js +0 -1
- package/dist/client/assets/useAtlassian-DC0XOw4u.js +0 -0
package/dist/bin.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { $ as AgentControlExternalOverviewResult, $a as DESKTOP_NATIVE_NODE_CLAIM_SIGN_PATH, $i as ThreadTurnDiffCompletedPayload$1, $n as ClaudeSettings, $r as OrchestrationEventType, $t as AgentControlMcpRecentActivityResult, A as AGENT_CONTROL_MCP_AUTOMATION_LIST_PROMPT_MAX_CHARS, Aa as ThreadPriorityBatchId, An as AtlassianConnectionStatus, Ao as ApprovalRequestId, At as AgentControlMcpProposeAutomationUpdateInput, B as AGENT_CONTROL_TERMINAL_PROPOSAL_STATUSES, Ba as defaultInstanceIdForDriver, Bi as ThreadGoalUpdatedPayload$1, Bn as McpProviderCapabilities, Bo as MessageId, Br as DEFAULT_PROJECT_METADATA_DIR, Bt as AgentControlMcpProposeProjectCreateInput, C as AGENT_CONTROL_DEVICE_ACTION_KINDS, Ci as ProjectCreatedPayload$1, Cn as DeviceUdid, Co as RelayProtocolVersion, Cr as ProviderSteerTurnInput, Ct as AgentControlMcpListThreadsInput, D as AGENT_CONTROL_EXTERNAL_MCP_TOOL_NAMES, Di as ProjectScript, Dn as AtlassianCapability, Do as AuthRevokeClientSessionInput, Dr as CONTEXT_HANDOFF_ACTIVITY_KIND, Dt as AgentControlMcpOrchestrationEventsResult, E as AGENT_CONTROL_EXTERNAL_MCP_TOOLS, Ea as VcsProcessExitError, Ei as ProjectMetadataDir, En as ThreadPriorityRpcError, Eo as AuthCreatePairingCredentialInput, Er as AgentTokenMode, Et as AgentControlMcpOperationalReadInput, F as AGENT_CONTROL_MCP_TOOLS, Fa as DEFAULT_GIT_TEXT_GENERATION_OPTIONS_BY_PROVIDER, Fi as ThreadArchivedPayload$1, Fn as McpInventoryResource, Fo as CommandId, Fr as ContextHandoffDigest, Ft as AgentControlMcpProposeDeviceInstallInput, G as AgentControlAutomationDefinition, Ga as TerminalNotRunningError, Gi as ThreadProposedPlanUpsertedPayload$1, Gn as McpServerWritableConfig, Gr as OrchestrationAggregateKind, Gt as AgentControlMcpReadAutomationInput, H as AgentControlActionKind, Hi as ThreadMessageSentPayload, Hn as McpServer, Ho as PositiveInt, Hr as ModelSelection, Ht as AgentControlMcpProposeProjectUpdateInput, I as AGENT_CONTROL_MCP_TOOL_NAMES, Ia as DEFAULT_MODEL, Ii as ThreadAttachedToWorktreePayload$1, In as McpInventoryResourceTemplate, Io as ContextHandoffId, Ir as ContextHandoffEndpointSnapshot, It as AgentControlMcpProposeDeviceLaunchInput, J as AgentControlAutomationRunId, Ja as EDITORS, Ji as ThreadSessionSetPayload$1, Jn as McpWorkspaceId, Jr as OrchestrationCheckpointSummary, Jt as AgentControlMcpReadDeviceContentInput, K as AgentControlAutomationId, Ka as TerminalSessionLookupError, Ki as ThreadRevertedPayload$1, Kn as McpSettingsError, Kr as OrchestrationCheckpointFile, Kt as AgentControlMcpReadAutomationResult, L as AGENT_CONTROL_MCP_WAIT_TIMEOUT_MS_DEFAULT, La as MODEL_SLUG_ALIASES_BY_PROVIDER, Li as ThreadCreatedPayload$1, Ln as McpInventoryTool, Lo as EnvironmentId, Lr as ContextHandoffInspectionError, Lt as AgentControlMcpProposeDeviceOpenUrlInput, M as AGENT_CONTROL_MCP_OPERATIONAL_RANGE_MAX_MS, Ma as ThreadPriorityFingerprint, Mi as ProviderSessionRuntimeStatus, Mn as GitCommandError, Mo as AtlassianResourceId, Mr as ChatAttachment, Mt as AgentControlMcpProposeDeviceBootInput, N as AGENT_CONTROL_MCP_OPERATIONAL_RETENTION_MS, Ni as RuntimeMode, Nn as GitManagerError, No as AuthSessionId, Nr as ClientOrchestrationCommand, Nt as AgentControlMcpProposeDeviceDetachInput, O as AGENT_CONTROL_EXTERNAL_PAIRING_CODE_TTL_MS, Oi as ProjectionPendingApprovalDecision, On as AtlassianConnectionError, Oo as AuthRevokePairingLinkInput, Or as CONTEXT_HANDOFF_ERROR_MAX_CHARS, Ot as AgentControlMcpProposeAutomationCancelInput, P as AGENT_CONTROL_MCP_READ_THREAD_TEXT_BUDGET_CHARS, Pa as DEFAULT_GIT_TEXT_GENERATION_MODEL_BY_PROVIDER, Pi as ThreadActivityAppendedPayload$1, Pn as TextGenerationError, Po as CheckpointRef, Pr as ContextHandoffActivityPayload, Pt as AgentControlMcpProposeDeviceInputInput, Q as AgentControlExternalIntegration, Qa as DESKTOP_NATIVE_NODE_CLAIM_MAX_BODY_BYTES, Qi as ThreadTokenModeSetPayload$1, Qn as ServerProviderUpdateError, Qo as TurnId, Qr as OrchestrationEventMetadata, Qt as AgentControlMcpReadThreadResult, R as AGENT_CONTROL_MCP_WAIT_TIMEOUT_MS_MAX, Ra as ProviderDriverKind, Ri as ThreadDeletedPayload$1, Rn as McpListServersResult, Ro as EventId, Rr as ContextHandoffMode, Rt as AgentControlMcpProposeDeviceRecordingInput, S as AGENT_CONTROL_CAPABILITIES, Sa as SourceControlRepositoryError, Si as ProjectAvatarSetPayload$1, Sn as DeviceRpcError, So as RelayFrame, Sr as ProviderSessionStartInput, St as AgentControlMcpListProjectsResult, T as AGENT_CONTROL_EXTERNAL_CREDENTIAL_AUDIENCE, Ti as ProjectMetaUpdatedPayload$1, Tn as ThreadPriorityCandidateRanking, To as AuthClientMetadataDeviceType, Tr as ProviderStopSessionInput, Tt as AgentControlMcpMutationResult, U as AgentControlActionPlan, Ua as TerminalCwdError, Ui as ThreadMetaUpdatedPayload$1, Un as McpServerConfig, Uo as ProjectId, Ur as ORCHESTRATION_WS_METHODS, Ut as AgentControlMcpProposeSettingsChangeInput, V as AGENT_CONTROL_WS_METHODS, Va as isProviderDriverKind, Vi as ThreadInteractionModeSetPayload$1, Vn as McpProviderSupport, Vo as NonNegativeInt, Vr as DEFAULT_PROVIDER_INTERACTION_MODE, Vt as AgentControlMcpProposeProjectRemoveInput, W as AgentControlAutomation, Wa as TerminalHistoryError, Wi as ThreadPriorityProjectedRanking, Wn as McpServerName, Wr as OrchestrationActorKind, Wt as AgentControlMcpProviderRuntimeEventsResult, X as AgentControlExternalCapabilitiesResult, Xa as DESKTOP_NATIVE_NODE_CLAIM_COMMIT_PATH, Xi as ThreadSettlementOverride, Xn as UsageReadError, Xo as ThreadId, Xr as OrchestrationDispatchCommandError, Xt as AgentControlMcpReadDeviceStateResult, Y as AgentControlCapability, Ya as OpenError, Yi as ThreadSettledPayload$1, Yn as OpinionatedPluginError, Yr as OrchestrationCommandReceiptStatus, Yt as AgentControlMcpReadDeviceStateInput, Z as AgentControlExternalCreateTaskInput, Za as DESKTOP_NATIVE_NODE_CLAIM_DESCRIPTOR_PATH, Zi as ThreadStatusBucketOverriddenPayload$1, Zn as ServerProvider, Zo as TrimmedNonEmptyString, Zr as OrchestrationEvent, Zt as AgentControlMcpReadThreadInput, _ as ProjectWriteFileError, _a as WORK_ITEM_DETAIL_COMMENT_BODY_MAX_BYTES, _i as OrchestrationThreadHistoryCursor, _n as AgentControlRpcError, _o as RELAY_MAX_RPC_MESSAGE_BYTES, _r as isToolLifecycleItemType, _t as AgentControlMcpListAutomationsInput, a as WS_METHODS, aa as WorktreeCreatedPayload$1, ai as OrchestrationGetWorkflowScriptError, an as AgentControlOperationId, ao as LOCAL_INTRODUCTION_MAX_BODY_BYTES, ar as OpenCodeSettings, at as AgentControlIntegrationId, b as AGENT_CONTROL_AUTOMATION_MIN_INTERVAL_MS, bn as DEVICE_SWIPE_DURATION_MAX_MS, bo as RelayChannelId, br as ProviderRespondToUserInputInput, bt as AgentControlMcpListDevicesResult, c as WsRpcGroup, ca as WorktreeMetaUpdatedPayload$1, ci as OrchestrationProposedPlanId, cn as AgentControlPlanDigest, co as HubEnrollmentCeremonyDetail, cr as ThreadEnvMode, ct as AgentControlMcpControlRequestResult, da as PullRequestState, di as OrchestrationSession, dn as AgentControlProposal, do as RELAY_AUTHENTICATION_DEADLINE_MS, dr as KeybindingsConfigError, dt as AgentControlMcpDiagnosticsSummaryResult, ea as ThreadTurnInterruptRequestedPayload$1, ei as OrchestrationGetFullThreadDiffError, en as AgentControlMcpSendMessageInput, eo as DesktopNativeNodeClaimCommitRequest, er as CodexSettings, et as AgentControlExternalProjectScope, f as ProjectListEntriesError, fa as StatusBucket, fi as OrchestrationSessionStatus, fn as AgentControlProposalId, fo as RELAY_FRAME_TYPES, fr as MODEL_PICKER_JUMP_KEYBINDING_COMMANDS, ft as AgentControlMcpInstallation, g as ProjectStageFileReferenceError, ga as WORK_ITEM_DETAIL_BODY_MAX_BYTES, gi as OrchestrationThreadActivityTone, gn as AgentControlRiskTag, go as RELAY_MAX_RETRY_AFTER_MS, gr as ToolLifecycleItemType, gt as AgentControlMcpListAutomationRunsResult, h as ProjectSearchEntriesError, ha as ThreadGoal, hi as OrchestrationThread, hn as AgentControlResultEnvelope, ho as RELAY_MAX_DATA_FRAME_BYTES, hr as RuntimeSubagentStatus, ht as AgentControlMcpListAutomationRunsInput, i as fromLenientJson, ia as WorktreeArchivedPayload$1, ii as OrchestrationGetTurnDiffResult, in as AgentControlOperation, io as LOCAL_INTRODUCTION_DESCRIPTOR_PATH, ir as GrokSettings, it as AgentControlExternalWaitForTaskInput, j as AGENT_CONTROL_MCP_MESSAGE_TEXT_MAX_CHARS, ja as ThreadPriorityCandidateId, ji as ProviderInteractionMode, jn as AtlassianProduct, jo as AtlassianConnectionId, jr as CONTEXT_HANDOFF_WS_METHODS, jt as AgentControlMcpProposeDeviceAttachInput, k as AGENT_CONTROL_EXTERNAL_PROPOSAL_TTL_MS, ka as VcsUnsupportedOperationError, ki as ProjectionPendingApprovalStatus, kn as AtlassianConnectionKind, ko as AuthRpcError, kr as CONTEXT_HANDOFF_INSPECTION_CHUNK_MAX_BYTES, kt as AgentControlMcpProposeAutomationCreateInput, l as FilesystemBrowseError, la as WorktreeRestoredPayload$1, li as OrchestrationReadModel, ln as AgentControlPrincipal, lo as HubEnrollmentStartResult, lr as KeybindingRule, lt as AgentControlMcpCreateThreadsInput, m as ProjectReadFileError, ma as WorktreeId, mi as OrchestrationStopBackgroundTaskError, mn as AgentControlRequestId, mr as THREAD_JUMP_KEYBINDING_COMMANDS, mt as AgentControlMcpInterruptThreadInput, n as decodeJsonResult, na as ThreadUnsettledPayload$1, ni as OrchestrationGetTaskOutputError, nn as AgentControlMcpUpdateThreadInput, no as LOCAL_INTRODUCTION_COMPLETE_PATH, nr as CursorSettings, nt as AgentControlExternalTaskId, o as WsDeviceRpcGroup, oa as WorktreeDeletedPayload$1, oi as OrchestrationMessage, on as AgentControlOperationState, oo as LocalIntroductionCompleteRequest, or as ServerSettings, ot as AgentControlMcpCapabilitiesResult, p as ProjectReadFileBinaryError, pa as Worktree, pi as OrchestrationShellSnapshot, pn as AgentControlProposalStatus, po as RELAY_MAX_CONTROL_FRAME_BYTES, pr as ResolvedKeybindingRule, pt as AgentControlMcpInstallationId, q as AgentControlAutomationRun, qa as TerminalSubscriptionResyncError, qi as ThreadRuntimeModeSetPayload$1, qn as McpWorkspace, qo as RuntimeSessionId, qr as OrchestrationCheckpointStatus, qt as AgentControlMcpReadControlRequestInput, r as formatSchemaError, ra as TurnDispatchMode, ri as OrchestrationGetTurnDiffError, rn as AgentControlMcpWaitForControlRequestInput, rr as DEFAULT_SERVER_SETTINGS, rt as AgentControlExternalTaskIdInput, s as WsHostedRpcGroup, sa as WorktreeManualPositionSetPayload$1, si as OrchestrationMessageRole, sn as AgentControlOperationStatus, so as HubConnectorStatus, sr as ServerSettingsError, st as AgentControlMcpContextResult, t as collectUint8StreamText, ta as ThreadUnarchivedPayload$1, ti as OrchestrationGetSnapshotError, tn as AgentControlMcpSettingsSummaryResult, to as DesktopNativeNodeClaimSignRequest, tr as CopilotSettings, tt as AgentControlExternalRpcError, u as PROJECT_READ_FILE_BINARY_MAX_BYTES, ua as WorktreeSourceControlStateUpdatedPayload$1, ui as OrchestrationReplayEventsError, un as AgentControlPromptSummary, uo as HubIdentitySummary, ur as KeybindingsConfig, ut as AgentControlMcpDiagnosticsSummaryInput, v as AGENT_CONTROL_ACTION_CAPABILITIES, va as WorkItemProviderError, vi as OrchestrationThreadHistoryError, vn as DEVICE_CAPABILITY_LABELS, vo as RELAY_SUPPORTED_VERSION_RANGE, vr as ProviderInterruptTurnInput, vt as AgentControlMcpListAutomationsResult, w as AGENT_CONTROL_ERROR_CODES, wa as VcsDriverKind, wi as ProjectDeletedPayload$1, wn as ThreadPriorityBatchSnapshot, wo as AuthBootstrapInput, wr as ProviderStopBackgroundTaskInput, wt as AgentControlMcpListThreadsResult, x as AGENT_CONTROL_AUTOMATION_PROPOSAL_TTL_MS, xa as SourceControlProviderError, xn as DEVICE_WS_METHODS, xo as RelayEffectiveRole, xr as ProviderSendTurnInput, xt as AgentControlMcpListProjectsInput, y as AGENT_CONTROL_AUTOMATION_MAX_HORIZON_MS, ya as WorkItemProviderKind, yi as OrchestrationWorktreeShell, yn as DEVICE_FRAME_MAGIC, yo as RelayCapability, yr as ProviderRespondToRequestInput, yt as AgentControlMcpListDevicesInput, z as AGENT_CONTROL_RISK_TAGS, za as ProviderInstanceId, zi as ThreadGoalClearedPayload$1, zn as McpOauthLoginResult, zo as IsoDateTime, zr as DEFAULT_AGENT_TOKEN_MODE, zt as AgentControlMcpProposeDeviceShutdownInput } from "./collectUint8StreamText-EDg4F0TU.mjs";
|
|
3
|
+
import { $ as AgentControlExternalOverviewResult, $a as DESKTOP_NATIVE_NODE_CLAIM_DESCRIPTOR_PATH, $i as ThreadStatusBucketOverriddenPayload$1, $n as ClaudeSettings, $o as TrimmedNonEmptyString, $r as OrchestrationEventType, $t as AgentControlMcpRecentActivityResult, A as AGENT_CONTROL_MCP_AUTOMATION_LIST_PROMPT_MAX_CHARS, Ai as ProjectionPendingApprovalDecision, An as AtlassianConnectionStatus, Ao as AuthRevokePairingLinkInput, At as AgentControlMcpProposeAutomationUpdateInput, B as AGENT_CONTROL_TERMINAL_PROPOSAL_STATUSES, Ba as ProviderDriverKind, Bi as ThreadDeletedPayload$1, Bn as McpProviderCapabilities, Bo as EventId, Br as DEFAULT_PROJECT_METADATA_DIR, Bt as AgentControlMcpProposeProjectCreateInput, C as AGENT_CONTROL_DEVICE_ACTION_KINDS, Ca as SourceControlProviderError, Cn as DeviceUdid, Co as RelayEffectiveRole, Cr as ProviderSteerTurnInput, Ct as AgentControlMcpListThreadsInput, D as AGENT_CONTROL_EXTERNAL_MCP_TOOL_NAMES, Di as ProjectMetaUpdatedPayload$1, Dn as AtlassianCapability, Do as AuthClientMetadataDeviceType, Dr as CONTEXT_HANDOFF_ACTIVITY_KIND, Dt as AgentControlMcpOrchestrationEventsResult, E as AGENT_CONTROL_EXTERNAL_MCP_TOOLS, Ea as VcsDriverKind, Ei as ProjectDeletedPayload$1, En as ThreadPriorityRpcError, Eo as AuthBootstrapInput, Er as AgentTokenMode, Et as AgentControlMcpOperationalReadInput, F as AGENT_CONTROL_MCP_TOOLS, Fi as RuntimeMode, Fn as McpInventoryResource, Fo as AuthSessionId, Fr as ContextHandoffDigest, Ft as AgentControlMcpProposeDeviceInstallInput, G as AgentControlAutomationDefinition, Ga as TerminalCwdError, Gi as ThreadMetaUpdatedPayload$1, Gn as McpServerWritableConfig, Go as ProjectId, Gr as OrchestrationAggregateKind, Gt as AgentControlMcpReadAutomationInput, H as AgentControlActionKind, Ha as defaultInstanceIdForDriver, Hi as ThreadGoalUpdatedPayload$1, Hn as McpServer, Ho as MessageId, Hr as ModelSelection, Ht as AgentControlMcpProposeProjectUpdateInput, I as AGENT_CONTROL_MCP_TOOL_NAMES, Ia as DEFAULT_GIT_TEXT_GENERATION_MODEL_BY_PROVIDER, Ii as ThreadActivityAppendedPayload$1, In as McpInventoryResourceTemplate, Io as CheckpointRef, Ir as ContextHandoffEndpointSnapshot, It as AgentControlMcpProposeDeviceLaunchInput, J as AgentControlAutomationRunId, Ja as TerminalSessionLookupError, Ji as ThreadRevertedPayload$1, Jn as McpWorkspaceId, Jr as OrchestrationCheckpointSummary, Jt as AgentControlMcpReadDeviceContentInput, K as AgentControlAutomationId, Ka as TerminalHistoryError, Ki as ThreadPriorityProjectedRanking, Kn as McpSettingsError, Kr as OrchestrationCheckpointFile, Kt as AgentControlMcpReadAutomationResult, L as AGENT_CONTROL_MCP_WAIT_TIMEOUT_MS_DEFAULT, La as DEFAULT_GIT_TEXT_GENERATION_OPTIONS_BY_PROVIDER, Li as ThreadArchivedPayload$1, Ln as McpInventoryTool, Lo as CommandId, Lr as ContextHandoffInspectionError, Lt as AgentControlMcpProposeDeviceOpenUrlInput, M as AGENT_CONTROL_MCP_OPERATIONAL_RANGE_MAX_MS, Ma as ThreadPriorityBatchId, Mn as GitCommandError, Mo as ApprovalRequestId, Mr as ChatAttachment, Mt as AgentControlMcpProposeDeviceBootInput, N as AGENT_CONTROL_MCP_OPERATIONAL_RETENTION_MS, Na as ThreadPriorityCandidateId, Ni as ProviderInteractionMode, Nn as GitManagerError, No as AtlassianConnectionId, Nr as ClientOrchestrationCommand, Nt as AgentControlMcpProposeDeviceDetachInput, O as AGENT_CONTROL_EXTERNAL_PAIRING_CODE_TTL_MS, Oa as VcsProcessExitError, Oi as ProjectMetadataDir, On as AtlassianConnectionError, Oo as AuthCreatePairingCredentialInput, Or as CONTEXT_HANDOFF_ERROR_MAX_CHARS, Ot as AgentControlMcpProposeAutomationCancelInput, P as AGENT_CONTROL_MCP_READ_THREAD_TEXT_BUDGET_CHARS, Pa as ThreadPriorityFingerprint, Pi as ProviderSessionRuntimeStatus, Pn as TextGenerationError, Po as AtlassianResourceId, Pr as ContextHandoffActivityPayload, Pt as AgentControlMcpProposeDeviceInputInput, Q as AgentControlExternalIntegration, Qa as DESKTOP_NATIVE_NODE_CLAIM_COMMIT_PATH, Qi as ThreadSettlementOverride, Qn as ServerProviderUpdateError, Qo as ThreadId, Qr as OrchestrationEventMetadata, Qt as AgentControlMcpReadThreadResult, R as AGENT_CONTROL_MCP_WAIT_TIMEOUT_MS_MAX, Ra as DEFAULT_MODEL, Ri as ThreadAttachedToWorktreePayload$1, Rn as McpListServersResult, Ro as ContextHandoffId, Rr as ContextHandoffMode, Rt as AgentControlMcpProposeDeviceRecordingInput, S as AGENT_CONTROL_CAPABILITIES, Si as PROVIDER_SEND_TURN_MAX_IMAGE_BYTES, Sn as DeviceRpcError, So as RelayChannelId, Sr as ProviderSessionStartInput, St as AgentControlMcpListProjectsResult, T as AGENT_CONTROL_EXTERNAL_CREDENTIAL_AUDIENCE, Ti as ProjectCreatedPayload$1, Tn as ThreadPriorityCandidateRanking, To as RelayProtocolVersion, Tr as ProviderStopSessionInput, Tt as AgentControlMcpMutationResult, U as AgentControlActionPlan, Ua as isProviderDriverKind, Ui as ThreadInteractionModeSetPayload$1, Un as McpServerConfig, Uo as NonNegativeInt, Ur as ORCHESTRATION_WS_METHODS, Ut as AgentControlMcpProposeSettingsChangeInput, V as AGENT_CONTROL_WS_METHODS, Va as ProviderInstanceId, Vi as ThreadGoalClearedPayload$1, Vn as McpProviderSupport, Vo as IsoDateTime, Vr as DEFAULT_PROVIDER_INTERACTION_MODE, Vt as AgentControlMcpProposeProjectRemoveInput, W as AgentControlAutomation, Wi as ThreadMessageSentPayload, Wn as McpServerName, Wo as PositiveInt, Wr as OrchestrationActorKind, Wt as AgentControlMcpProviderRuntimeEventsResult, X as AgentControlExternalCapabilitiesResult, Xa as EDITORS, Xi as ThreadSessionSetPayload$1, Xn as UsageReadError, Xr as OrchestrationDispatchCommandError, Xt as AgentControlMcpReadDeviceStateResult, Y as AgentControlCapability, Ya as TerminalSubscriptionResyncError, Yi as ThreadRuntimeModeSetPayload$1, Yn as OpinionatedPluginError, Yo as RuntimeSessionId, Yr as OrchestrationCommandReceiptStatus, Yt as AgentControlMcpReadDeviceStateInput, Z as AgentControlExternalCreateTaskInput, Za as OpenError, Zi as ThreadSettledPayload$1, Zn as ServerProvider, Zr as OrchestrationEvent, Zt as AgentControlMcpReadThreadInput, _ as ProjectWriteFileError, _a as ThreadGoal, _i as OrchestrationThreadHistoryCursor, _n as AgentControlRpcError, _o as RELAY_MAX_DATA_FRAME_BYTES, _r as isToolLifecycleItemType, _t as AgentControlMcpListAutomationsInput, a as WS_METHODS, aa as TurnDispatchMode, ai as OrchestrationGetWorkflowScriptError, an as AgentControlOperationId, ar as OpenCodeSettings, at as AgentControlIntegrationId, b as AGENT_CONTROL_AUTOMATION_MIN_INTERVAL_MS, ba as WorkItemProviderError, bi as PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES, bn as DEVICE_SWIPE_DURATION_MAX_MS, bo as RELAY_SUPPORTED_VERSION_RANGE, br as ProviderRespondToUserInputInput, bt as AgentControlMcpListDevicesResult, c as WsRpcGroup, ca as WorktreeDeletedPayload$1, ci as OrchestrationProposedPlanId, cn as AgentControlPlanDigest, co as LocalIntroductionCompleteRequest, cr as ThreadEnvMode, ct as AgentControlMcpControlRequestResult, da as WorktreeRestoredPayload$1, di as OrchestrationSession, dn as AgentControlProposal, do as HubEnrollmentStartResult, dr as KeybindingsConfigError, dt as AgentControlMcpDiagnosticsSummaryResult, ea as ThreadTokenModeSetPayload$1, ei as OrchestrationGetFullThreadDiffError, en as AgentControlMcpSendMessageInput, eo as DESKTOP_NATIVE_NODE_CLAIM_MAX_BODY_BYTES, er as CodexSettings, es as TurnId, et as AgentControlExternalProjectScope, f as ProjectListEntriesError, fa as WorktreeSourceControlStateUpdatedPayload$1, fi as OrchestrationSessionStatus, fn as AgentControlProposalId, fo as HubIdentitySummary, fr as MODEL_PICKER_JUMP_KEYBINDING_COMMANDS, ft as AgentControlMcpInstallation, g as ProjectStageFileReferenceError, ga as WorktreeId, gi as OrchestrationThreadActivityTone, gn as AgentControlRiskTag, gr as ToolLifecycleItemType, gt as AgentControlMcpListAutomationRunsResult, h as ProjectSearchEntriesError, ha as Worktree, hi as OrchestrationThread, hn as AgentControlResultEnvelope, ho as RELAY_MAX_CONTROL_FRAME_BYTES, hr as RuntimeSubagentStatus, ht as AgentControlMcpListAutomationRunsInput, i as fromLenientJson, ia as ThreadUnsettledPayload$1, ii as OrchestrationGetTurnDiffResult, in as AgentControlOperation, io as LOCAL_INTRODUCTION_COMPLETE_PATH, ir as GrokSettings, it as AgentControlExternalWaitForTaskInput, j as AGENT_CONTROL_MCP_MESSAGE_TEXT_MAX_CHARS, ja as VcsUnsupportedOperationError, ji as ProjectionPendingApprovalStatus, jn as AtlassianProduct, jo as AuthRpcError, jr as CONTEXT_HANDOFF_WS_METHODS, jt as AgentControlMcpProposeDeviceAttachInput, k as AGENT_CONTROL_EXTERNAL_PROPOSAL_TTL_MS, ki as ProjectScript, kn as AtlassianConnectionKind, ko as AuthRevokeClientSessionInput, kr as CONTEXT_HANDOFF_INSPECTION_CHUNK_MAX_BYTES, kt as AgentControlMcpProposeAutomationCreateInput, l as FilesystemBrowseError, la as WorktreeManualPositionSetPayload$1, li as OrchestrationReadModel, ln as AgentControlPrincipal, lo as HubConnectorStatus, lr as KeybindingRule, lt as AgentControlMcpCreateThreadsInput, m as ProjectReadFileError, ma as StatusBucket, mi as OrchestrationStopBackgroundTaskError, mn as AgentControlRequestId, mo as RELAY_FRAME_TYPES, mr as THREAD_JUMP_KEYBINDING_COMMANDS, mt as AgentControlMcpInterruptThreadInput, n as decodeJsonResult, na as ThreadTurnInterruptRequestedPayload$1, ni as OrchestrationGetTaskOutputError, nn as AgentControlMcpUpdateThreadInput, no as DesktopNativeNodeClaimCommitRequest, nr as CursorSettings, nt as AgentControlExternalTaskId, o as WsDeviceRpcGroup, oa as WorktreeArchivedPayload$1, oi as OrchestrationMessage, on as AgentControlOperationState, oo as LOCAL_INTRODUCTION_DESCRIPTOR_PATH, or as ServerSettings, ot as AgentControlMcpCapabilitiesResult, p as ProjectReadFileBinaryError, pa as PullRequestState, pi as OrchestrationShellSnapshot, pn as AgentControlProposalStatus, po as RELAY_AUTHENTICATION_DEADLINE_MS, pr as ResolvedKeybindingRule, pt as AgentControlMcpInstallationId, q as AgentControlAutomationRun, qa as TerminalNotRunningError, qi as ThreadProposedPlanUpsertedPayload$1, qn as McpWorkspace, qr as OrchestrationCheckpointStatus, qt as AgentControlMcpReadControlRequestInput, r as formatSchemaError, ra as ThreadUnarchivedPayload$1, ri as OrchestrationGetTurnDiffError, rn as AgentControlMcpWaitForControlRequestInput, ro as DesktopNativeNodeClaimSignRequest, rr as DEFAULT_SERVER_SETTINGS, rt as AgentControlExternalTaskIdInput, s as WsHostedRpcGroup, sa as WorktreeCreatedPayload$1, si as OrchestrationMessageRole, sn as AgentControlOperationStatus, so as LOCAL_INTRODUCTION_MAX_BODY_BYTES, sr as ServerSettingsError, st as AgentControlMcpContextResult, t as collectUint8StreamText, ta as ThreadTurnDiffCompletedPayload$1, ti as OrchestrationGetSnapshotError, tn as AgentControlMcpSettingsSummaryResult, to as DESKTOP_NATIVE_NODE_CLAIM_SIGN_PATH, tr as CopilotSettings, tt as AgentControlExternalRpcError, u as PROJECT_READ_FILE_BINARY_MAX_BYTES, ua as WorktreeMetaUpdatedPayload$1, ui as OrchestrationReplayEventsError, un as AgentControlPromptSummary, uo as HubEnrollmentCeremonyDetail, ur as KeybindingsConfig, ut as AgentControlMcpDiagnosticsSummaryInput, v as AGENT_CONTROL_ACTION_CAPABILITIES, va as WORK_ITEM_DETAIL_BODY_MAX_BYTES, vi as OrchestrationThreadHistoryError, vn as DEVICE_CAPABILITY_LABELS, vo as RELAY_MAX_RETRY_AFTER_MS, vr as ProviderInterruptTurnInput, vt as AgentControlMcpListAutomationsResult, w as AGENT_CONTROL_ERROR_CODES, wa as SourceControlRepositoryError, wi as ProjectAvatarSetPayload$1, wn as ThreadPriorityBatchSnapshot, wo as RelayFrame, wr as ProviderStopBackgroundTaskInput, wt as AgentControlMcpListThreadsResult, x as AGENT_CONTROL_AUTOMATION_PROPOSAL_TTL_MS, xa as WorkItemProviderKind, xi as PROVIDER_SEND_TURN_MAX_FILE_BYTES, xn as DEVICE_WS_METHODS, xo as RelayCapability, xr as ProviderSendTurnInput, xt as AgentControlMcpListProjectsInput, y as AGENT_CONTROL_AUTOMATION_MAX_HORIZON_MS, ya as WORK_ITEM_DETAIL_COMMENT_BODY_MAX_BYTES, yi as OrchestrationWorktreeShell, yn as DEVICE_FRAME_MAGIC, yo as RELAY_MAX_RPC_MESSAGE_BYTES, yr as ProviderRespondToRequestInput, yt as AgentControlMcpListDevicesInput, z as AGENT_CONTROL_RISK_TAGS, za as MODEL_SLUG_ALIASES_BY_PROVIDER, zi as ThreadCreatedPayload$1, zn as McpOauthLoginResult, zo as EnvironmentId, zr as DEFAULT_AGENT_TOKEN_MODE, zt as AgentControlMcpProposeDeviceShutdownInput } from "./collectUint8StreamText-RzKEq2NY.mjs";
|
|
4
4
|
import { $ as normalizeGitRemoteUrl, A as runtimeQueueBlockedDuration, B as startupCommandGateQueueHighWater, C as providerStartupQueueHighWater, Ct as decode, D as providerTurnsTotal, E as providerTurnMetricAttributes, Et as Type, F as runtimeQueueHighWater, G as LocalDiagnosticsMetrics, H as terminalRestartsTotal, I as runtimeQueueOverflowsTotal, J as buildTemporaryWorktreeBranchName, K as LocalDiagnosticsMetricsLive, L as runtimeQueueRecoveriesTotal, M as runtimeQueueDepth, N as runtimeQueueDequeuesTotal, O as rpcRequestDuration, P as runtimeQueueEnqueuesTotal, Q as mergeGitStatusParts, R as startupCommandGateEnqueuesTotal, S as providerStartupQueueDepth, St as Tokeniser, T as providerTurnDuration, Tt as rfc8949EncodeOptions, U as terminalSessionsTotal, V as startupCommandGateQueueWaitDuration, W as withMetrics, X as detectSourceControlProviderFromGitRemoteUrl, Y as dedupeRemoteBranchesWithLocalMatches, Z as isTemporaryWorktreeBranch, _ as providerRuntimeEventsTotal, _t as encodeNodeKeyRotationTranscript, a as contextHandoffsTotal, at as DEFAULT_PORT, b as providerStaleStopTimeoutsTotal, bt as formatNodePublicKeyFingerprint, c as increment, ct as deriveServerPaths, d as orchestrationCommandAckDuration, dt as resolveManagedWorktreesRoot, et as resolveAutoFeatureBranchName, f as orchestrationCommandDuration, ft as resolveNodeE2eePolicyConfig, g as providerMetricAttributes, gt as encodeNodeAuthenticationTranscript, h as providerEventLogRecordsDroppedTotal, ht as encodeNativeNodeClaimTranscript, i as contextHandoffPreparationDuration, it as outcomeFromExit, j as runtimeQueueCoalescedTotal, k as rpcRequestsTotal, l as metricAttributes, lt as ensureServerDirectories, m as orchestrationEventsProcessedTotal, mt as canonicalizeHubOrigin, n as contextHandoffContextEntriesTotal, nt as sanitizeFeatureBranchName, o as gitCommandDuration, ot as RuntimeMode$1, p as orchestrationCommandsTotal, pt as resolveStaticDir, q as WORKTREE_BRANCH_PREFIX, r as contextHandoffDispatchDuration, rt as compactTraceAttributes, s as gitCommandsTotal, st as ServerConfig, t as contextHandoffContextBytesTotal, tt as sanitizeBranchFragment, u as metricNames, ut as resolveHubConnectorConfig, v as providerRuntimeStaleEventsTotal, vt as equalNodeIdentityBytes, w as providerStartupQueueWaitDuration, wt as encode, x as providerStartupAdmissionTotal, xt as normalizeHubNodeName, y as providerSessionsTotal, yt as fingerprintNodePublicKey, z as startupCommandGateQueueDepth } from "./Metrics-BP9YjxZB.mjs";
|
|
5
|
-
import { a as makeForgejoDiscovery, c as sourceBranch, d as firstNonEmptyLine, f as probeSourceControlProvider, h as layer$20, i as makeBitbucketDiscovery, m as VcsProcess, n as githubDiscovery, o as SourceControlProvider, p as refineUnknownRemoteProvider, r as gitlabDiscovery, s as parseSourceControlOwnerRef, t as azureDevOpsDiscovery, u as detailFromCause } from "./SourceControlProviderDiscoveryCatalog-
|
|
5
|
+
import { a as makeForgejoDiscovery, c as sourceBranch, d as firstNonEmptyLine, f as probeSourceControlProvider, h as layer$20, i as makeBitbucketDiscovery, m as VcsProcess, n as githubDiscovery, o as SourceControlProvider, p as refineUnknownRemoteProvider, r as gitlabDiscovery, s as parseSourceControlOwnerRef, t as azureDevOpsDiscovery, u as detailFromCause } from "./SourceControlProviderDiscoveryCatalog-C6Fn7rZE.mjs";
|
|
6
6
|
import { n as detectSourceControlProviderFromRemoteUrl, r as getChangeRequestTerminologyForKind } from "./sourceControl-BiEBxN01.mjs";
|
|
7
7
|
import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
|
|
8
8
|
import * as NodeServices from "@effect/platform-node/NodeServices";
|
|
@@ -11,7 +11,7 @@ import * as Layer$1 from "effect/Layer";
|
|
|
11
11
|
import { Argument, Command, Flag, GlobalFlag } from "effect/unstable/cli";
|
|
12
12
|
import * as Net from "node:net";
|
|
13
13
|
import { createServer } from "node:net";
|
|
14
|
-
import { Array as Array$1, Cache, Cause, Clock, Config, Console, Context, Data, DateTime, Deferred, Duration, Effect, Encoding, Equal, Exit, Fiber, FileSystem, Layer, Logger, Metric, Option, Order, Path, Predicate, PubSub, Queue, Redacted, Ref, References, Result, Schedule, Schema, SchemaGetter, SchemaIssue, SchemaTransformation, Scope, Semaphore, Stream, Struct, SynchronizedRef, Tracer, TxQueue, TxRef } from "effect";
|
|
14
|
+
import { Array as Array$1, Cache, Cause, Clock, Config, Console, Context, Data, DateTime, Deferred, Duration, Effect, Encoding, Equal, Exit, Fiber, FileSystem, Layer, Logger, Metric, Option, Order, Path, Predicate, PubSub, Queue, Redacted, Ref, References, Result, Schedule, Schema, SchemaGetter, SchemaIssue, SchemaTransformation, Scope, Semaphore, Stream, Struct, SubscriptionRef, SynchronizedRef, Tracer, TxQueue, TxRef } from "effect";
|
|
15
15
|
import * as Schema$1 from "effect/Schema";
|
|
16
16
|
import * as P from "effect/Predicate";
|
|
17
17
|
import { FetchHttpClient, HttpBody, HttpClient, HttpClientRequest, HttpClientResponse, HttpRouter, HttpServer, HttpServerRequest, HttpServerResponse, Multipart } from "effect/unstable/http";
|
|
@@ -20,7 +20,7 @@ import path, { basename, dirname, extname, join } from "node:path";
|
|
|
20
20
|
import * as Crypto from "node:crypto";
|
|
21
21
|
import { createHash, createPrivateKey, createPublicKey, generateKeyPairSync, randomBytes, randomUUID, sign } from "node:crypto";
|
|
22
22
|
import * as NFS from "node:fs";
|
|
23
|
-
import fs, { accessSync, constants, existsSync, realpathSync, statSync } from "node:fs";
|
|
23
|
+
import fs, { accessSync, closeSync, constants, existsSync, fstatSync, lstatSync, openSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
24
24
|
import * as readline from "node:readline";
|
|
25
25
|
import { createInterface } from "node:readline";
|
|
26
26
|
import * as OS from "node:os";
|
|
@@ -51,7 +51,6 @@ import * as Sink$1 from "effect/Sink";
|
|
|
51
51
|
import { createServer as createServer$1 } from "node:http";
|
|
52
52
|
import * as SqlSchema from "effect/unstable/sql/SqlSchema";
|
|
53
53
|
import { clamp } from "effect/Number";
|
|
54
|
-
import { pathToFileURL } from "node:url";
|
|
55
54
|
import { parsePatchFiles } from "@pierre/diffs";
|
|
56
55
|
import * as HttpServerRequest$1 from "effect/unstable/http/HttpServerRequest";
|
|
57
56
|
import { createInterface as createInterface$1 } from "node:readline/promises";
|
|
@@ -1514,6 +1513,7 @@ function attachmentRelativePath(attachment) {
|
|
|
1514
1513
|
});
|
|
1515
1514
|
return `${attachment.id}${extension}`;
|
|
1516
1515
|
}
|
|
1516
|
+
case "file": return `${attachment.id}.bin`;
|
|
1517
1517
|
}
|
|
1518
1518
|
}
|
|
1519
1519
|
function resolveAttachmentPath(input) {
|
|
@@ -1522,6 +1522,64 @@ function resolveAttachmentPath(input) {
|
|
|
1522
1522
|
relativePath: attachmentRelativePath(input.attachment)
|
|
1523
1523
|
});
|
|
1524
1524
|
}
|
|
1525
|
+
function attachmentByteLimit(attachment) {
|
|
1526
|
+
return attachment.type === "image" ? PROVIDER_SEND_TURN_MAX_IMAGE_BYTES : PROVIDER_SEND_TURN_MAX_FILE_BYTES;
|
|
1527
|
+
}
|
|
1528
|
+
/**
|
|
1529
|
+
* Opens and reads a persisted attachment through one descriptor. Comparing
|
|
1530
|
+
* the path's lstat identity with the opened descriptor prevents a path or
|
|
1531
|
+
* symlink swap between validation and read, including on platforms without a
|
|
1532
|
+
* useful O_NOFOLLOW flag.
|
|
1533
|
+
*/
|
|
1534
|
+
function readPersistedAttachment(input) {
|
|
1535
|
+
const attachmentPath = resolveAttachmentPath(input);
|
|
1536
|
+
if (!attachmentPath) return {
|
|
1537
|
+
ok: false,
|
|
1538
|
+
reason: `Invalid attachment id '${input.attachment.id}'.`
|
|
1539
|
+
};
|
|
1540
|
+
let descriptor;
|
|
1541
|
+
try {
|
|
1542
|
+
const pathInfo = lstatSync(attachmentPath);
|
|
1543
|
+
if (!pathInfo.isFile()) return {
|
|
1544
|
+
ok: false,
|
|
1545
|
+
reason: `Attachment '${input.attachment.name}' is not a regular file.`
|
|
1546
|
+
};
|
|
1547
|
+
const noFollow = typeof constants.O_NOFOLLOW === "number" ? constants.O_NOFOLLOW : 0;
|
|
1548
|
+
descriptor = openSync(attachmentPath, constants.O_RDONLY | noFollow);
|
|
1549
|
+
const openedInfo = fstatSync(descriptor);
|
|
1550
|
+
if (!openedInfo.isFile() || openedInfo.dev !== pathInfo.dev || openedInfo.ino !== pathInfo.ino) return {
|
|
1551
|
+
ok: false,
|
|
1552
|
+
reason: `Attachment '${input.attachment.name}' changed while it was being opened. Attach it again and retry.`
|
|
1553
|
+
};
|
|
1554
|
+
const limit = attachmentByteLimit(input.attachment);
|
|
1555
|
+
if (openedInfo.size <= 0 || openedInfo.size > limit) return {
|
|
1556
|
+
ok: false,
|
|
1557
|
+
reason: `Attachment '${input.attachment.name}' is ${openedInfo.size} bytes; limit is ${limit} bytes.`
|
|
1558
|
+
};
|
|
1559
|
+
if (openedInfo.size !== input.attachment.sizeBytes) return {
|
|
1560
|
+
ok: false,
|
|
1561
|
+
reason: `Attachment '${input.attachment.name}' changed after upload; expected ${input.attachment.sizeBytes} bytes but found ${openedInfo.size}.`
|
|
1562
|
+
};
|
|
1563
|
+
const bytes = readFileSync(descriptor);
|
|
1564
|
+
const completedInfo = fstatSync(descriptor);
|
|
1565
|
+
if (completedInfo.dev !== openedInfo.dev || completedInfo.ino !== openedInfo.ino || completedInfo.size !== openedInfo.size || bytes.byteLength !== openedInfo.size) return {
|
|
1566
|
+
ok: false,
|
|
1567
|
+
reason: `Attachment '${input.attachment.name}' changed while it was being read. Attach it again and retry.`
|
|
1568
|
+
};
|
|
1569
|
+
return {
|
|
1570
|
+
ok: true,
|
|
1571
|
+
bytes,
|
|
1572
|
+
sizeBytes: bytes.byteLength
|
|
1573
|
+
};
|
|
1574
|
+
} catch {
|
|
1575
|
+
return {
|
|
1576
|
+
ok: false,
|
|
1577
|
+
reason: `Attachment '${input.attachment.name}' is missing, unreadable, or not a safe regular file.`
|
|
1578
|
+
};
|
|
1579
|
+
} finally {
|
|
1580
|
+
if (descriptor !== void 0) closeSync(descriptor);
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1525
1583
|
function resolveAttachmentPathById(input) {
|
|
1526
1584
|
const normalizedId = normalizeAttachmentRelativePath(input.attachmentId);
|
|
1527
1585
|
if (!normalizedId || normalizedId.includes("/") || normalizedId.includes(".")) return null;
|
|
@@ -5868,6 +5926,7 @@ const makeRuntimeSqliteLayer = Effect.fn("makeRuntimeSqliteLayer")(function* (co
|
|
|
5868
5926
|
const setup = Layer.effectDiscard(Effect.gen(function* () {
|
|
5869
5927
|
const startedAt = Date.now();
|
|
5870
5928
|
const sql = yield* SqlClient.SqlClient;
|
|
5929
|
+
yield* sql`PRAGMA busy_timeout = 5000;`;
|
|
5871
5930
|
yield* sql`PRAGMA journal_mode = WAL;`;
|
|
5872
5931
|
yield* sql`PRAGMA foreign_keys = ON;`;
|
|
5873
5932
|
yield* runMigrations();
|
|
@@ -7876,6 +7935,31 @@ const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function* (option
|
|
|
7876
7935
|
}
|
|
7877
7936
|
const currentUpstream = yield* resolveCurrentUpstream(cwd).pipe(Effect.catch(() => Effect.succeed(null)));
|
|
7878
7937
|
if (currentUpstream) {
|
|
7938
|
+
if (!(branch === currentUpstream.branchName || branch.endsWith(`/${currentUpstream.branchName}`) && currentUpstream.upstreamRef.endsWith(`/${branch}`))) {
|
|
7939
|
+
const remoteName = (yield* resolvePushRemoteName(cwd, branch).pipe(Effect.catch(() => Effect.succeed(null)))) ?? currentUpstream.remoteName;
|
|
7940
|
+
const publishBranch = yield* resolvePublishBranchName(cwd, branch);
|
|
7941
|
+
if ((yield* runGitStdout("GitVcsDriver.pushCurrentBranch.readMergeBase", cwd, [
|
|
7942
|
+
"config",
|
|
7943
|
+
"--get",
|
|
7944
|
+
`branch.${branch}.gh-merge-base`
|
|
7945
|
+
], true).pipe(Effect.map((stdout) => stdout.trim()))).length === 0) yield* runGit("GitVcsDriver.pushCurrentBranch.recordMergeBase", cwd, [
|
|
7946
|
+
"config",
|
|
7947
|
+
`branch.${branch}.gh-merge-base`,
|
|
7948
|
+
currentUpstream.branchName
|
|
7949
|
+
]);
|
|
7950
|
+
yield* runGit("GitVcsDriver.pushCurrentBranch.pushOwnBranch", cwd, [
|
|
7951
|
+
"push",
|
|
7952
|
+
"-u",
|
|
7953
|
+
remoteName,
|
|
7954
|
+
`HEAD:refs/heads/${publishBranch}`
|
|
7955
|
+
]);
|
|
7956
|
+
return {
|
|
7957
|
+
status: "pushed",
|
|
7958
|
+
branch,
|
|
7959
|
+
upstreamBranch: `${remoteName}/${publishBranch}`,
|
|
7960
|
+
setUpstream: true
|
|
7961
|
+
};
|
|
7962
|
+
}
|
|
7879
7963
|
yield* runGit("GitVcsDriver.pushCurrentBranch.pushUpstream", cwd, [
|
|
7880
7964
|
"push",
|
|
7881
7965
|
currentUpstream.remoteName,
|
|
@@ -8104,6 +8188,25 @@ const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function* (option
|
|
|
8104
8188
|
input.refName
|
|
8105
8189
|
];
|
|
8106
8190
|
yield* executeGit("GitVcsDriver.createWorktree", input.cwd, args, { fallbackErrorMessage: "git worktree add failed" });
|
|
8191
|
+
const gitmodulesPath = path.join(worktreePath, ".gitmodules");
|
|
8192
|
+
if (yield* fileSystem.exists(gitmodulesPath).pipe(Effect.mapError((cause) => new GitCommandError({
|
|
8193
|
+
operation: "GitVcsDriver.createWorktree.inspectSubmodules",
|
|
8194
|
+
command: "inspect .gitmodules",
|
|
8195
|
+
cwd: worktreePath,
|
|
8196
|
+
detail: `Failed to inspect ${gitmodulesPath} after creating the worktree.`,
|
|
8197
|
+
cause
|
|
8198
|
+
})))) {
|
|
8199
|
+
const submoduleArgs = [
|
|
8200
|
+
"submodule",
|
|
8201
|
+
"update",
|
|
8202
|
+
"--init",
|
|
8203
|
+
"--recursive"
|
|
8204
|
+
];
|
|
8205
|
+
yield* executeGit("GitVcsDriver.createWorktree.initializeSubmodules", worktreePath, submoduleArgs, {
|
|
8206
|
+
timeoutMs: 12e4,
|
|
8207
|
+
fallbackErrorMessage: "git submodule initialization failed"
|
|
8208
|
+
}).pipe(Effect.mapError((error) => createGitCommandError("GitVcsDriver.createWorktree.initializeSubmodules", worktreePath, submoduleArgs, `The worktree was created, but its submodules could not be initialized: ${error.detail}`, error)));
|
|
8209
|
+
}
|
|
8107
8210
|
if (input.dependencyHydration === "copyInstallDirs") yield* copyWorktreeDependencyInstallDirs({
|
|
8108
8211
|
cwd: input.cwd,
|
|
8109
8212
|
worktreePath
|
|
@@ -8168,6 +8271,15 @@ const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function* (option
|
|
|
8168
8271
|
fallbackErrorMessage: "git worktree remove failed"
|
|
8169
8272
|
}).pipe(Effect.mapError((error) => createGitCommandError("GitVcsDriver.removeWorktree", input.cwd, args, `${commandLabel$1(args)} failed (cwd: ${input.cwd}): ${error.message}`, error)));
|
|
8170
8273
|
});
|
|
8274
|
+
const pruneWorktrees = (cwd) => executeGit("GitVcsDriver.pruneWorktrees", cwd, [
|
|
8275
|
+
"worktree",
|
|
8276
|
+
"prune",
|
|
8277
|
+
"--expire",
|
|
8278
|
+
"now"
|
|
8279
|
+
], {
|
|
8280
|
+
timeoutMs: 1e4,
|
|
8281
|
+
fallbackErrorMessage: "git worktree prune failed"
|
|
8282
|
+
}).pipe(Effect.asVoid);
|
|
8171
8283
|
const renameBranch = Effect.fn("renameBranch")(function* (input) {
|
|
8172
8284
|
if (input.oldBranch === input.newBranch) return { branch: input.newBranch };
|
|
8173
8285
|
const targetBranch = yield* resolveAvailableBranchName(input.cwd, input.newBranch);
|
|
@@ -8294,6 +8406,7 @@ const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function* (option
|
|
|
8294
8406
|
fetchRemoteTrackingBranch,
|
|
8295
8407
|
setBranchUpstream,
|
|
8296
8408
|
removeWorktree,
|
|
8409
|
+
pruneWorktrees,
|
|
8297
8410
|
renameBranch,
|
|
8298
8411
|
createRef,
|
|
8299
8412
|
deleteBranch,
|
|
@@ -12672,26 +12785,26 @@ const make$12 = Effect.fn("makeSourceControlProviderRegistry")(function* () {
|
|
|
12672
12785
|
const azureDevOpsCli = yield* AzureDevOpsCli;
|
|
12673
12786
|
const fileSystem = yield* FileSystem.FileSystem;
|
|
12674
12787
|
const github = yield* makeLazyProvider("github", Effect.tryPromise({
|
|
12675
|
-
try: () => import("./GitHubSourceControlProvider-
|
|
12788
|
+
try: () => import("./GitHubSourceControlProvider-D5MQQPCJ.mjs"),
|
|
12676
12789
|
catch: (cause) => providerLoadError("github", cause)
|
|
12677
12790
|
}).pipe(Effect.flatMap((module) => module.make()), Effect.provideService(GitHubCli, githubCli), Effect.provideService(FileSystem.FileSystem, fileSystem)));
|
|
12678
12791
|
const gitlab = yield* makeLazyProvider("gitlab", Effect.tryPromise({
|
|
12679
|
-
try: () => import("./GitLabSourceControlProvider-
|
|
12792
|
+
try: () => import("./GitLabSourceControlProvider-DLkxeob5.mjs"),
|
|
12680
12793
|
catch: (cause) => providerLoadError("gitlab", cause)
|
|
12681
12794
|
}).pipe(Effect.flatMap((module) => module.make()), Effect.provideService(GitLabCli, gitlabCli)));
|
|
12682
12795
|
const bitbucket = yield* makeLazyProvider("bitbucket", Effect.tryPromise({
|
|
12683
|
-
try: () => import("./BitbucketSourceControlProvider-
|
|
12796
|
+
try: () => import("./BitbucketSourceControlProvider-tbbUFKz3.mjs"),
|
|
12684
12797
|
catch: (cause) => providerLoadError("bitbucket", cause)
|
|
12685
12798
|
}).pipe(Effect.flatMap((module) => module.make()), Effect.provideService(BitbucketApi, bitbucketApi)), {
|
|
12686
12799
|
searchRepositories: true,
|
|
12687
12800
|
cloneAuthentication: true
|
|
12688
12801
|
});
|
|
12689
12802
|
const forgejo = yield* makeLazyProvider("forgejo", Effect.tryPromise({
|
|
12690
|
-
try: () => import("./ForgejoSourceControlProvider-
|
|
12803
|
+
try: () => import("./ForgejoSourceControlProvider-DLhJZtq9.mjs"),
|
|
12691
12804
|
catch: (cause) => providerLoadError("forgejo", cause)
|
|
12692
12805
|
}).pipe(Effect.flatMap((module) => module.make()), Effect.provideService(ForgejoApi, forgejoApi)));
|
|
12693
12806
|
const azureDevOps = yield* makeLazyProvider("azure-devops", Effect.tryPromise({
|
|
12694
|
-
try: () => import("./AzureDevOpsSourceControlProvider-
|
|
12807
|
+
try: () => import("./AzureDevOpsSourceControlProvider-WNUDtsur.mjs"),
|
|
12695
12808
|
catch: (cause) => providerLoadError("azure-devops", cause)
|
|
12696
12809
|
}).pipe(Effect.flatMap((module) => module.make()), Effect.provideService(AzureDevOpsCli, azureDevOpsCli)));
|
|
12697
12810
|
const bitbucketDiscovery = makeBitbucketDiscovery(bitbucketApi);
|
|
@@ -12930,6 +13043,11 @@ const DEFAULT_KEYBINDINGS = [
|
|
|
12930
13043
|
command: "thread.find",
|
|
12931
13044
|
when: "!terminalFocus"
|
|
12932
13045
|
},
|
|
13046
|
+
{
|
|
13047
|
+
key: "mod+alt+p",
|
|
13048
|
+
command: "thread.pinToggle",
|
|
13049
|
+
when: "!terminalFocus"
|
|
13050
|
+
},
|
|
12933
13051
|
{
|
|
12934
13052
|
key: "mod+shift+[",
|
|
12935
13053
|
command: "thread.previous"
|
|
@@ -14516,7 +14634,8 @@ const ServerNotification__SpendControlLimitSnapshot = Schema$1.Struct({
|
|
|
14516
14634
|
const ServerNotification__SubAgentActivityKind = Schema$1.Literals([
|
|
14517
14635
|
"started",
|
|
14518
14636
|
"interacted",
|
|
14519
|
-
"interrupted"
|
|
14637
|
+
"interrupted",
|
|
14638
|
+
"completed"
|
|
14520
14639
|
]);
|
|
14521
14640
|
const ServerNotification__TerminalInteractionNotification = Schema$1.Struct({
|
|
14522
14641
|
itemId: Schema$1.String,
|
|
@@ -15403,7 +15522,8 @@ const V2ItemCompletedNotification__ReasoningEffort = Schema$1.String.annotate({
|
|
|
15403
15522
|
const V2ItemCompletedNotification__SubAgentActivityKind = Schema$1.Literals([
|
|
15404
15523
|
"started",
|
|
15405
15524
|
"interacted",
|
|
15406
|
-
"interrupted"
|
|
15525
|
+
"interrupted",
|
|
15526
|
+
"completed"
|
|
15407
15527
|
]);
|
|
15408
15528
|
const V2ItemCompletedNotification__TextElement = Schema$1.Struct({
|
|
15409
15529
|
byteRange: Schema$1.Struct({
|
|
@@ -15587,7 +15707,8 @@ const V2ItemStartedNotification__ReasoningEffort = Schema$1.String.annotate({ de
|
|
|
15587
15707
|
const V2ItemStartedNotification__SubAgentActivityKind = Schema$1.Literals([
|
|
15588
15708
|
"started",
|
|
15589
15709
|
"interacted",
|
|
15590
|
-
"interrupted"
|
|
15710
|
+
"interrupted",
|
|
15711
|
+
"completed"
|
|
15591
15712
|
]);
|
|
15592
15713
|
const V2ItemStartedNotification__TextElement = Schema$1.Struct({
|
|
15593
15714
|
byteRange: Schema$1.Struct({
|
|
@@ -16082,7 +16203,8 @@ const V2ReviewStartResponse__ReasoningEffort = Schema$1.String.annotate({ descri
|
|
|
16082
16203
|
const V2ReviewStartResponse__SubAgentActivityKind = Schema$1.Literals([
|
|
16083
16204
|
"started",
|
|
16084
16205
|
"interacted",
|
|
16085
|
-
"interrupted"
|
|
16206
|
+
"interrupted",
|
|
16207
|
+
"completed"
|
|
16086
16208
|
]);
|
|
16087
16209
|
const V2ReviewStartResponse__TextElement = Schema$1.Struct({
|
|
16088
16210
|
byteRange: Schema$1.Struct({
|
|
@@ -16267,7 +16389,8 @@ const V2ThreadForkResponse__ReasoningEffort = Schema$1.String.annotate({ descrip
|
|
|
16267
16389
|
const V2ThreadForkResponse__SubAgentActivityKind = Schema$1.Literals([
|
|
16268
16390
|
"started",
|
|
16269
16391
|
"interacted",
|
|
16270
|
-
"interrupted"
|
|
16392
|
+
"interrupted",
|
|
16393
|
+
"completed"
|
|
16271
16394
|
]);
|
|
16272
16395
|
const V2ThreadForkResponse__TextElement = Schema$1.Struct({
|
|
16273
16396
|
byteRange: Schema$1.Struct({
|
|
@@ -16449,7 +16572,8 @@ const V2ThreadListResponse__ReasoningEffort = Schema$1.String.annotate({ descrip
|
|
|
16449
16572
|
const V2ThreadListResponse__SubAgentActivityKind = Schema$1.Literals([
|
|
16450
16573
|
"started",
|
|
16451
16574
|
"interacted",
|
|
16452
|
-
"interrupted"
|
|
16575
|
+
"interrupted",
|
|
16576
|
+
"completed"
|
|
16453
16577
|
]);
|
|
16454
16578
|
const V2ThreadListResponse__TextElement = Schema$1.Struct({
|
|
16455
16579
|
byteRange: Schema$1.Struct({
|
|
@@ -16585,7 +16709,8 @@ const V2ThreadMetadataUpdateResponse__ReasoningEffort = Schema$1.String.annotate
|
|
|
16585
16709
|
const V2ThreadMetadataUpdateResponse__SubAgentActivityKind = Schema$1.Literals([
|
|
16586
16710
|
"started",
|
|
16587
16711
|
"interacted",
|
|
16588
|
-
"interrupted"
|
|
16712
|
+
"interrupted",
|
|
16713
|
+
"completed"
|
|
16589
16714
|
]);
|
|
16590
16715
|
const V2ThreadMetadataUpdateResponse__TextElement = Schema$1.Struct({
|
|
16591
16716
|
byteRange: Schema$1.Struct({
|
|
@@ -16716,7 +16841,8 @@ const V2ThreadReadResponse__ReasoningEffort = Schema$1.String.annotate({ descrip
|
|
|
16716
16841
|
const V2ThreadReadResponse__SubAgentActivityKind = Schema$1.Literals([
|
|
16717
16842
|
"started",
|
|
16718
16843
|
"interacted",
|
|
16719
|
-
"interrupted"
|
|
16844
|
+
"interrupted",
|
|
16845
|
+
"completed"
|
|
16720
16846
|
]);
|
|
16721
16847
|
const V2ThreadReadResponse__TextElement = Schema$1.Struct({
|
|
16722
16848
|
byteRange: Schema$1.Struct({
|
|
@@ -16958,7 +17084,8 @@ const V2ThreadResumeResponse__ReasoningEffort = Schema$1.String.annotate({ descr
|
|
|
16958
17084
|
const V2ThreadResumeResponse__SubAgentActivityKind = Schema$1.Literals([
|
|
16959
17085
|
"started",
|
|
16960
17086
|
"interacted",
|
|
16961
|
-
"interrupted"
|
|
17087
|
+
"interrupted",
|
|
17088
|
+
"completed"
|
|
16962
17089
|
]);
|
|
16963
17090
|
const V2ThreadResumeResponse__TextElement = Schema$1.Struct({
|
|
16964
17091
|
byteRange: Schema$1.Struct({
|
|
@@ -17089,7 +17216,8 @@ const V2ThreadRollbackResponse__ReasoningEffort = Schema$1.String.annotate({ des
|
|
|
17089
17216
|
const V2ThreadRollbackResponse__SubAgentActivityKind = Schema$1.Literals([
|
|
17090
17217
|
"started",
|
|
17091
17218
|
"interacted",
|
|
17092
|
-
"interrupted"
|
|
17219
|
+
"interrupted",
|
|
17220
|
+
"completed"
|
|
17093
17221
|
]);
|
|
17094
17222
|
const V2ThreadRollbackResponse__TextElement = Schema$1.Struct({
|
|
17095
17223
|
byteRange: Schema$1.Struct({
|
|
@@ -17253,7 +17381,8 @@ const V2ThreadStartedNotification__ReasoningEffort = Schema$1.String.annotate({
|
|
|
17253
17381
|
const V2ThreadStartedNotification__SubAgentActivityKind = Schema$1.Literals([
|
|
17254
17382
|
"started",
|
|
17255
17383
|
"interacted",
|
|
17256
|
-
"interrupted"
|
|
17384
|
+
"interrupted",
|
|
17385
|
+
"completed"
|
|
17257
17386
|
]);
|
|
17258
17387
|
const V2ThreadStartedNotification__TextElement = Schema$1.Struct({
|
|
17259
17388
|
byteRange: Schema$1.Struct({
|
|
@@ -17431,7 +17560,8 @@ const V2ThreadStartResponse__ReasoningEffort = Schema$1.String.annotate({ descri
|
|
|
17431
17560
|
const V2ThreadStartResponse__SubAgentActivityKind = Schema$1.Literals([
|
|
17432
17561
|
"started",
|
|
17433
17562
|
"interacted",
|
|
17434
|
-
"interrupted"
|
|
17563
|
+
"interrupted",
|
|
17564
|
+
"completed"
|
|
17435
17565
|
]);
|
|
17436
17566
|
const V2ThreadStartResponse__TextElement = Schema$1.Struct({
|
|
17437
17567
|
byteRange: Schema$1.Struct({
|
|
@@ -17574,7 +17704,8 @@ const V2ThreadUnarchiveResponse__ReasoningEffort = Schema$1.String.annotate({ de
|
|
|
17574
17704
|
const V2ThreadUnarchiveResponse__SubAgentActivityKind = Schema$1.Literals([
|
|
17575
17705
|
"started",
|
|
17576
17706
|
"interacted",
|
|
17577
|
-
"interrupted"
|
|
17707
|
+
"interrupted",
|
|
17708
|
+
"completed"
|
|
17578
17709
|
]);
|
|
17579
17710
|
const V2ThreadUnarchiveResponse__TextElement = Schema$1.Struct({
|
|
17580
17711
|
byteRange: Schema$1.Struct({
|
|
@@ -17704,7 +17835,8 @@ const V2TurnCompletedNotification__ReasoningEffort = Schema$1.String.annotate({
|
|
|
17704
17835
|
const V2TurnCompletedNotification__SubAgentActivityKind = Schema$1.Literals([
|
|
17705
17836
|
"started",
|
|
17706
17837
|
"interacted",
|
|
17707
|
-
"interrupted"
|
|
17838
|
+
"interrupted",
|
|
17839
|
+
"completed"
|
|
17708
17840
|
]);
|
|
17709
17841
|
const V2TurnCompletedNotification__TextElement = Schema$1.Struct({
|
|
17710
17842
|
byteRange: Schema$1.Struct({
|
|
@@ -17831,7 +17963,8 @@ const V2TurnStartedNotification__ReasoningEffort = Schema$1.String.annotate({ de
|
|
|
17831
17963
|
const V2TurnStartedNotification__SubAgentActivityKind = Schema$1.Literals([
|
|
17832
17964
|
"started",
|
|
17833
17965
|
"interacted",
|
|
17834
|
-
"interrupted"
|
|
17966
|
+
"interrupted",
|
|
17967
|
+
"completed"
|
|
17835
17968
|
]);
|
|
17836
17969
|
const V2TurnStartedNotification__TextElement = Schema$1.Struct({
|
|
17837
17970
|
byteRange: Schema$1.Struct({
|
|
@@ -17997,7 +18130,8 @@ const V2TurnStartResponse__ReasoningEffort = Schema$1.String.annotate({ descript
|
|
|
17997
18130
|
const V2TurnStartResponse__SubAgentActivityKind = Schema$1.Literals([
|
|
17998
18131
|
"started",
|
|
17999
18132
|
"interacted",
|
|
18000
|
-
"interrupted"
|
|
18133
|
+
"interrupted",
|
|
18134
|
+
"completed"
|
|
18001
18135
|
]);
|
|
18002
18136
|
const V2TurnStartResponse__TextElement = Schema$1.Struct({
|
|
18003
18137
|
byteRange: Schema$1.Struct({
|
|
@@ -21908,14 +22042,19 @@ const ServerNotification__ThreadItem = Schema$1.Union([
|
|
|
21908
22042
|
status: Schema$1.Literals([
|
|
21909
22043
|
"inProgress",
|
|
21910
22044
|
"completed",
|
|
21911
|
-
"failed"
|
|
22045
|
+
"failed",
|
|
22046
|
+
"interrupted"
|
|
21912
22047
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
21913
22048
|
tool: Schema$1.Literals([
|
|
21914
22049
|
"spawnAgent",
|
|
21915
22050
|
"sendInput",
|
|
21916
22051
|
"resumeAgent",
|
|
21917
22052
|
"wait",
|
|
21918
|
-
"closeAgent"
|
|
22053
|
+
"closeAgent",
|
|
22054
|
+
"sendMessage",
|
|
22055
|
+
"followupTask",
|
|
22056
|
+
"interruptAgent",
|
|
22057
|
+
"listAgents"
|
|
21919
22058
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
21920
22059
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
21921
22060
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -22313,14 +22452,19 @@ const V2ItemCompletedNotification__ThreadItem = Schema$1.Union([
|
|
|
22313
22452
|
status: Schema$1.Literals([
|
|
22314
22453
|
"inProgress",
|
|
22315
22454
|
"completed",
|
|
22316
|
-
"failed"
|
|
22455
|
+
"failed",
|
|
22456
|
+
"interrupted"
|
|
22317
22457
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
22318
22458
|
tool: Schema$1.Literals([
|
|
22319
22459
|
"spawnAgent",
|
|
22320
22460
|
"sendInput",
|
|
22321
22461
|
"resumeAgent",
|
|
22322
22462
|
"wait",
|
|
22323
|
-
"closeAgent"
|
|
22463
|
+
"closeAgent",
|
|
22464
|
+
"sendMessage",
|
|
22465
|
+
"followupTask",
|
|
22466
|
+
"interruptAgent",
|
|
22467
|
+
"listAgents"
|
|
22324
22468
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
22325
22469
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
22326
22470
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -22507,14 +22651,19 @@ const V2ItemStartedNotification__ThreadItem = Schema$1.Union([
|
|
|
22507
22651
|
status: Schema$1.Literals([
|
|
22508
22652
|
"inProgress",
|
|
22509
22653
|
"completed",
|
|
22510
|
-
"failed"
|
|
22654
|
+
"failed",
|
|
22655
|
+
"interrupted"
|
|
22511
22656
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
22512
22657
|
tool: Schema$1.Literals([
|
|
22513
22658
|
"spawnAgent",
|
|
22514
22659
|
"sendInput",
|
|
22515
22660
|
"resumeAgent",
|
|
22516
22661
|
"wait",
|
|
22517
|
-
"closeAgent"
|
|
22662
|
+
"closeAgent",
|
|
22663
|
+
"sendMessage",
|
|
22664
|
+
"followupTask",
|
|
22665
|
+
"interruptAgent",
|
|
22666
|
+
"listAgents"
|
|
22518
22667
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
22519
22668
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
22520
22669
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -22750,14 +22899,19 @@ const V2ReviewStartResponse__ThreadItem = Schema$1.Union([
|
|
|
22750
22899
|
status: Schema$1.Literals([
|
|
22751
22900
|
"inProgress",
|
|
22752
22901
|
"completed",
|
|
22753
|
-
"failed"
|
|
22902
|
+
"failed",
|
|
22903
|
+
"interrupted"
|
|
22754
22904
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
22755
22905
|
tool: Schema$1.Literals([
|
|
22756
22906
|
"spawnAgent",
|
|
22757
22907
|
"sendInput",
|
|
22758
22908
|
"resumeAgent",
|
|
22759
22909
|
"wait",
|
|
22760
|
-
"closeAgent"
|
|
22910
|
+
"closeAgent",
|
|
22911
|
+
"sendMessage",
|
|
22912
|
+
"followupTask",
|
|
22913
|
+
"interruptAgent",
|
|
22914
|
+
"listAgents"
|
|
22761
22915
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
22762
22916
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
22763
22917
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -22931,14 +23085,19 @@ const V2ThreadForkResponse__ThreadItem = Schema$1.Union([
|
|
|
22931
23085
|
status: Schema$1.Literals([
|
|
22932
23086
|
"inProgress",
|
|
22933
23087
|
"completed",
|
|
22934
|
-
"failed"
|
|
23088
|
+
"failed",
|
|
23089
|
+
"interrupted"
|
|
22935
23090
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
22936
23091
|
tool: Schema$1.Literals([
|
|
22937
23092
|
"spawnAgent",
|
|
22938
23093
|
"sendInput",
|
|
22939
23094
|
"resumeAgent",
|
|
22940
23095
|
"wait",
|
|
22941
|
-
"closeAgent"
|
|
23096
|
+
"closeAgent",
|
|
23097
|
+
"sendMessage",
|
|
23098
|
+
"followupTask",
|
|
23099
|
+
"interruptAgent",
|
|
23100
|
+
"listAgents"
|
|
22942
23101
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
22943
23102
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
22944
23103
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -23102,14 +23261,19 @@ const V2ThreadListResponse__ThreadItem = Schema$1.Union([
|
|
|
23102
23261
|
status: Schema$1.Literals([
|
|
23103
23262
|
"inProgress",
|
|
23104
23263
|
"completed",
|
|
23105
|
-
"failed"
|
|
23264
|
+
"failed",
|
|
23265
|
+
"interrupted"
|
|
23106
23266
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
23107
23267
|
tool: Schema$1.Literals([
|
|
23108
23268
|
"spawnAgent",
|
|
23109
23269
|
"sendInput",
|
|
23110
23270
|
"resumeAgent",
|
|
23111
23271
|
"wait",
|
|
23112
|
-
"closeAgent"
|
|
23272
|
+
"closeAgent",
|
|
23273
|
+
"sendMessage",
|
|
23274
|
+
"followupTask",
|
|
23275
|
+
"interruptAgent",
|
|
23276
|
+
"listAgents"
|
|
23113
23277
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
23114
23278
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
23115
23279
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -23273,14 +23437,19 @@ const V2ThreadMetadataUpdateResponse__ThreadItem = Schema$1.Union([
|
|
|
23273
23437
|
status: Schema$1.Literals([
|
|
23274
23438
|
"inProgress",
|
|
23275
23439
|
"completed",
|
|
23276
|
-
"failed"
|
|
23440
|
+
"failed",
|
|
23441
|
+
"interrupted"
|
|
23277
23442
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
23278
23443
|
tool: Schema$1.Literals([
|
|
23279
23444
|
"spawnAgent",
|
|
23280
23445
|
"sendInput",
|
|
23281
23446
|
"resumeAgent",
|
|
23282
23447
|
"wait",
|
|
23283
|
-
"closeAgent"
|
|
23448
|
+
"closeAgent",
|
|
23449
|
+
"sendMessage",
|
|
23450
|
+
"followupTask",
|
|
23451
|
+
"interruptAgent",
|
|
23452
|
+
"listAgents"
|
|
23284
23453
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
23285
23454
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
23286
23455
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -23444,14 +23613,19 @@ const V2ThreadReadResponse__ThreadItem = Schema$1.Union([
|
|
|
23444
23613
|
status: Schema$1.Literals([
|
|
23445
23614
|
"inProgress",
|
|
23446
23615
|
"completed",
|
|
23447
|
-
"failed"
|
|
23616
|
+
"failed",
|
|
23617
|
+
"interrupted"
|
|
23448
23618
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
23449
23619
|
tool: Schema$1.Literals([
|
|
23450
23620
|
"spawnAgent",
|
|
23451
23621
|
"sendInput",
|
|
23452
23622
|
"resumeAgent",
|
|
23453
23623
|
"wait",
|
|
23454
|
-
"closeAgent"
|
|
23624
|
+
"closeAgent",
|
|
23625
|
+
"sendMessage",
|
|
23626
|
+
"followupTask",
|
|
23627
|
+
"interruptAgent",
|
|
23628
|
+
"listAgents"
|
|
23455
23629
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
23456
23630
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
23457
23631
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -23616,14 +23790,19 @@ const V2ThreadResumeResponse__ThreadItem = Schema$1.Union([
|
|
|
23616
23790
|
status: Schema$1.Literals([
|
|
23617
23791
|
"inProgress",
|
|
23618
23792
|
"completed",
|
|
23619
|
-
"failed"
|
|
23793
|
+
"failed",
|
|
23794
|
+
"interrupted"
|
|
23620
23795
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
23621
23796
|
tool: Schema$1.Literals([
|
|
23622
23797
|
"spawnAgent",
|
|
23623
23798
|
"sendInput",
|
|
23624
23799
|
"resumeAgent",
|
|
23625
23800
|
"wait",
|
|
23626
|
-
"closeAgent"
|
|
23801
|
+
"closeAgent",
|
|
23802
|
+
"sendMessage",
|
|
23803
|
+
"followupTask",
|
|
23804
|
+
"interruptAgent",
|
|
23805
|
+
"listAgents"
|
|
23627
23806
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
23628
23807
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
23629
23808
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -23787,14 +23966,19 @@ const V2ThreadRollbackResponse__ThreadItem = Schema$1.Union([
|
|
|
23787
23966
|
status: Schema$1.Literals([
|
|
23788
23967
|
"inProgress",
|
|
23789
23968
|
"completed",
|
|
23790
|
-
"failed"
|
|
23969
|
+
"failed",
|
|
23970
|
+
"interrupted"
|
|
23791
23971
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
23792
23972
|
tool: Schema$1.Literals([
|
|
23793
23973
|
"spawnAgent",
|
|
23794
23974
|
"sendInput",
|
|
23795
23975
|
"resumeAgent",
|
|
23796
23976
|
"wait",
|
|
23797
|
-
"closeAgent"
|
|
23977
|
+
"closeAgent",
|
|
23978
|
+
"sendMessage",
|
|
23979
|
+
"followupTask",
|
|
23980
|
+
"interruptAgent",
|
|
23981
|
+
"listAgents"
|
|
23798
23982
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
23799
23983
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
23800
23984
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -23962,14 +24146,19 @@ const V2ThreadStartedNotification__ThreadItem = Schema$1.Union([
|
|
|
23962
24146
|
status: Schema$1.Literals([
|
|
23963
24147
|
"inProgress",
|
|
23964
24148
|
"completed",
|
|
23965
|
-
"failed"
|
|
24149
|
+
"failed",
|
|
24150
|
+
"interrupted"
|
|
23966
24151
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
23967
24152
|
tool: Schema$1.Literals([
|
|
23968
24153
|
"spawnAgent",
|
|
23969
24154
|
"sendInput",
|
|
23970
24155
|
"resumeAgent",
|
|
23971
24156
|
"wait",
|
|
23972
|
-
"closeAgent"
|
|
24157
|
+
"closeAgent",
|
|
24158
|
+
"sendMessage",
|
|
24159
|
+
"followupTask",
|
|
24160
|
+
"interruptAgent",
|
|
24161
|
+
"listAgents"
|
|
23973
24162
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
23974
24163
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
23975
24164
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -24133,14 +24322,19 @@ const V2ThreadStartResponse__ThreadItem = Schema$1.Union([
|
|
|
24133
24322
|
status: Schema$1.Literals([
|
|
24134
24323
|
"inProgress",
|
|
24135
24324
|
"completed",
|
|
24136
|
-
"failed"
|
|
24325
|
+
"failed",
|
|
24326
|
+
"interrupted"
|
|
24137
24327
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
24138
24328
|
tool: Schema$1.Literals([
|
|
24139
24329
|
"spawnAgent",
|
|
24140
24330
|
"sendInput",
|
|
24141
24331
|
"resumeAgent",
|
|
24142
24332
|
"wait",
|
|
24143
|
-
"closeAgent"
|
|
24333
|
+
"closeAgent",
|
|
24334
|
+
"sendMessage",
|
|
24335
|
+
"followupTask",
|
|
24336
|
+
"interruptAgent",
|
|
24337
|
+
"listAgents"
|
|
24144
24338
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
24145
24339
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
24146
24340
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -24304,14 +24498,19 @@ const V2ThreadUnarchiveResponse__ThreadItem = Schema$1.Union([
|
|
|
24304
24498
|
status: Schema$1.Literals([
|
|
24305
24499
|
"inProgress",
|
|
24306
24500
|
"completed",
|
|
24307
|
-
"failed"
|
|
24501
|
+
"failed",
|
|
24502
|
+
"interrupted"
|
|
24308
24503
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
24309
24504
|
tool: Schema$1.Literals([
|
|
24310
24505
|
"spawnAgent",
|
|
24311
24506
|
"sendInput",
|
|
24312
24507
|
"resumeAgent",
|
|
24313
24508
|
"wait",
|
|
24314
|
-
"closeAgent"
|
|
24509
|
+
"closeAgent",
|
|
24510
|
+
"sendMessage",
|
|
24511
|
+
"followupTask",
|
|
24512
|
+
"interruptAgent",
|
|
24513
|
+
"listAgents"
|
|
24315
24514
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
24316
24515
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
24317
24516
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -24475,14 +24674,19 @@ const V2TurnCompletedNotification__ThreadItem = Schema$1.Union([
|
|
|
24475
24674
|
status: Schema$1.Literals([
|
|
24476
24675
|
"inProgress",
|
|
24477
24676
|
"completed",
|
|
24478
|
-
"failed"
|
|
24677
|
+
"failed",
|
|
24678
|
+
"interrupted"
|
|
24479
24679
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
24480
24680
|
tool: Schema$1.Literals([
|
|
24481
24681
|
"spawnAgent",
|
|
24482
24682
|
"sendInput",
|
|
24483
24683
|
"resumeAgent",
|
|
24484
24684
|
"wait",
|
|
24485
|
-
"closeAgent"
|
|
24685
|
+
"closeAgent",
|
|
24686
|
+
"sendMessage",
|
|
24687
|
+
"followupTask",
|
|
24688
|
+
"interruptAgent",
|
|
24689
|
+
"listAgents"
|
|
24486
24690
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
24487
24691
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
24488
24692
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -24646,14 +24850,19 @@ const V2TurnStartedNotification__ThreadItem = Schema$1.Union([
|
|
|
24646
24850
|
status: Schema$1.Literals([
|
|
24647
24851
|
"inProgress",
|
|
24648
24852
|
"completed",
|
|
24649
|
-
"failed"
|
|
24853
|
+
"failed",
|
|
24854
|
+
"interrupted"
|
|
24650
24855
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
24651
24856
|
tool: Schema$1.Literals([
|
|
24652
24857
|
"spawnAgent",
|
|
24653
24858
|
"sendInput",
|
|
24654
24859
|
"resumeAgent",
|
|
24655
24860
|
"wait",
|
|
24656
|
-
"closeAgent"
|
|
24861
|
+
"closeAgent",
|
|
24862
|
+
"sendMessage",
|
|
24863
|
+
"followupTask",
|
|
24864
|
+
"interruptAgent",
|
|
24865
|
+
"listAgents"
|
|
24657
24866
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
24658
24867
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
24659
24868
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -24817,14 +25026,19 @@ const V2TurnStartResponse__ThreadItem = Schema$1.Union([
|
|
|
24817
25026
|
status: Schema$1.Literals([
|
|
24818
25027
|
"inProgress",
|
|
24819
25028
|
"completed",
|
|
24820
|
-
"failed"
|
|
25029
|
+
"failed",
|
|
25030
|
+
"interrupted"
|
|
24821
25031
|
]).annotate({ description: "Current status of the collab tool call." }),
|
|
24822
25032
|
tool: Schema$1.Literals([
|
|
24823
25033
|
"spawnAgent",
|
|
24824
25034
|
"sendInput",
|
|
24825
25035
|
"resumeAgent",
|
|
24826
25036
|
"wait",
|
|
24827
|
-
"closeAgent"
|
|
25037
|
+
"closeAgent",
|
|
25038
|
+
"sendMessage",
|
|
25039
|
+
"followupTask",
|
|
25040
|
+
"interruptAgent",
|
|
25041
|
+
"listAgents"
|
|
24828
25042
|
]).annotate({ description: "Name of the collab tool that was invoked." }),
|
|
24829
25043
|
type: Schema$1.Literal("collabAgentToolCall").annotate({ title: "CollabAgentToolCallThreadItemType" })
|
|
24830
25044
|
}).annotate({ title: "CollabAgentToolCallThreadItem" }),
|
|
@@ -28082,12 +28296,17 @@ Schema$1.Literals([
|
|
|
28082
28296
|
"sendInput",
|
|
28083
28297
|
"resumeAgent",
|
|
28084
28298
|
"wait",
|
|
28085
|
-
"closeAgent"
|
|
28299
|
+
"closeAgent",
|
|
28300
|
+
"sendMessage",
|
|
28301
|
+
"followupTask",
|
|
28302
|
+
"interruptAgent",
|
|
28303
|
+
"listAgents"
|
|
28086
28304
|
]);
|
|
28087
28305
|
Schema$1.Literals([
|
|
28088
28306
|
"inProgress",
|
|
28089
28307
|
"completed",
|
|
28090
|
-
"failed"
|
|
28308
|
+
"failed",
|
|
28309
|
+
"interrupted"
|
|
28091
28310
|
]);
|
|
28092
28311
|
Schema$1.Literals(["stdout", "stderr"]).annotate({ description: "Stream label for `command/exec/outputDelta` notifications." });
|
|
28093
28312
|
Schema$1.Literals([
|
|
@@ -28811,12 +29030,17 @@ Schema$1.Literals([
|
|
|
28811
29030
|
"sendInput",
|
|
28812
29031
|
"resumeAgent",
|
|
28813
29032
|
"wait",
|
|
28814
|
-
"closeAgent"
|
|
29033
|
+
"closeAgent",
|
|
29034
|
+
"sendMessage",
|
|
29035
|
+
"followupTask",
|
|
29036
|
+
"interruptAgent",
|
|
29037
|
+
"listAgents"
|
|
28815
29038
|
]);
|
|
28816
29039
|
Schema$1.Literals([
|
|
28817
29040
|
"inProgress",
|
|
28818
29041
|
"completed",
|
|
28819
|
-
"failed"
|
|
29042
|
+
"failed",
|
|
29043
|
+
"interrupted"
|
|
28820
29044
|
]);
|
|
28821
29045
|
Schema$1.Literals([
|
|
28822
29046
|
"agent",
|
|
@@ -28877,12 +29101,17 @@ Schema$1.Literals([
|
|
|
28877
29101
|
"sendInput",
|
|
28878
29102
|
"resumeAgent",
|
|
28879
29103
|
"wait",
|
|
28880
|
-
"closeAgent"
|
|
29104
|
+
"closeAgent",
|
|
29105
|
+
"sendMessage",
|
|
29106
|
+
"followupTask",
|
|
29107
|
+
"interruptAgent",
|
|
29108
|
+
"listAgents"
|
|
28881
29109
|
]);
|
|
28882
29110
|
Schema$1.Literals([
|
|
28883
29111
|
"inProgress",
|
|
28884
29112
|
"completed",
|
|
28885
|
-
"failed"
|
|
29113
|
+
"failed",
|
|
29114
|
+
"interrupted"
|
|
28886
29115
|
]);
|
|
28887
29116
|
Schema$1.Literals([
|
|
28888
29117
|
"agent",
|
|
@@ -29239,12 +29468,17 @@ Schema$1.Literals([
|
|
|
29239
29468
|
"sendInput",
|
|
29240
29469
|
"resumeAgent",
|
|
29241
29470
|
"wait",
|
|
29242
|
-
"closeAgent"
|
|
29471
|
+
"closeAgent",
|
|
29472
|
+
"sendMessage",
|
|
29473
|
+
"followupTask",
|
|
29474
|
+
"interruptAgent",
|
|
29475
|
+
"listAgents"
|
|
29243
29476
|
]);
|
|
29244
29477
|
Schema$1.Literals([
|
|
29245
29478
|
"inProgress",
|
|
29246
29479
|
"completed",
|
|
29247
|
-
"failed"
|
|
29480
|
+
"failed",
|
|
29481
|
+
"interrupted"
|
|
29248
29482
|
]);
|
|
29249
29483
|
Schema$1.Literals([
|
|
29250
29484
|
"agent",
|
|
@@ -29375,12 +29609,17 @@ Schema$1.Literals([
|
|
|
29375
29609
|
"sendInput",
|
|
29376
29610
|
"resumeAgent",
|
|
29377
29611
|
"wait",
|
|
29378
|
-
"closeAgent"
|
|
29612
|
+
"closeAgent",
|
|
29613
|
+
"sendMessage",
|
|
29614
|
+
"followupTask",
|
|
29615
|
+
"interruptAgent",
|
|
29616
|
+
"listAgents"
|
|
29379
29617
|
]);
|
|
29380
29618
|
Schema$1.Literals([
|
|
29381
29619
|
"inProgress",
|
|
29382
29620
|
"completed",
|
|
29383
|
-
"failed"
|
|
29621
|
+
"failed",
|
|
29622
|
+
"interrupted"
|
|
29384
29623
|
]);
|
|
29385
29624
|
Schema$1.Literals([
|
|
29386
29625
|
"agent",
|
|
@@ -29486,12 +29725,17 @@ Schema$1.Literals([
|
|
|
29486
29725
|
"sendInput",
|
|
29487
29726
|
"resumeAgent",
|
|
29488
29727
|
"wait",
|
|
29489
|
-
"closeAgent"
|
|
29728
|
+
"closeAgent",
|
|
29729
|
+
"sendMessage",
|
|
29730
|
+
"followupTask",
|
|
29731
|
+
"interruptAgent",
|
|
29732
|
+
"listAgents"
|
|
29490
29733
|
]);
|
|
29491
29734
|
Schema$1.Literals([
|
|
29492
29735
|
"inProgress",
|
|
29493
29736
|
"completed",
|
|
29494
|
-
"failed"
|
|
29737
|
+
"failed",
|
|
29738
|
+
"interrupted"
|
|
29495
29739
|
]);
|
|
29496
29740
|
Schema$1.Literals([
|
|
29497
29741
|
"agent",
|
|
@@ -29551,12 +29795,17 @@ Schema$1.Literals([
|
|
|
29551
29795
|
"sendInput",
|
|
29552
29796
|
"resumeAgent",
|
|
29553
29797
|
"wait",
|
|
29554
|
-
"closeAgent"
|
|
29798
|
+
"closeAgent",
|
|
29799
|
+
"sendMessage",
|
|
29800
|
+
"followupTask",
|
|
29801
|
+
"interruptAgent",
|
|
29802
|
+
"listAgents"
|
|
29555
29803
|
]);
|
|
29556
29804
|
Schema$1.Literals([
|
|
29557
29805
|
"inProgress",
|
|
29558
29806
|
"completed",
|
|
29559
|
-
"failed"
|
|
29807
|
+
"failed",
|
|
29808
|
+
"interrupted"
|
|
29560
29809
|
]);
|
|
29561
29810
|
Schema$1.Literals([
|
|
29562
29811
|
"agent",
|
|
@@ -29609,12 +29858,17 @@ Schema$1.Literals([
|
|
|
29609
29858
|
"sendInput",
|
|
29610
29859
|
"resumeAgent",
|
|
29611
29860
|
"wait",
|
|
29612
|
-
"closeAgent"
|
|
29861
|
+
"closeAgent",
|
|
29862
|
+
"sendMessage",
|
|
29863
|
+
"followupTask",
|
|
29864
|
+
"interruptAgent",
|
|
29865
|
+
"listAgents"
|
|
29613
29866
|
]);
|
|
29614
29867
|
Schema$1.Literals([
|
|
29615
29868
|
"inProgress",
|
|
29616
29869
|
"completed",
|
|
29617
|
-
"failed"
|
|
29870
|
+
"failed",
|
|
29871
|
+
"interrupted"
|
|
29618
29872
|
]);
|
|
29619
29873
|
Schema$1.Literals([
|
|
29620
29874
|
"agent",
|
|
@@ -29903,12 +30157,17 @@ Schema$1.Literals([
|
|
|
29903
30157
|
"sendInput",
|
|
29904
30158
|
"resumeAgent",
|
|
29905
30159
|
"wait",
|
|
29906
|
-
"closeAgent"
|
|
30160
|
+
"closeAgent",
|
|
30161
|
+
"sendMessage",
|
|
30162
|
+
"followupTask",
|
|
30163
|
+
"interruptAgent",
|
|
30164
|
+
"listAgents"
|
|
29907
30165
|
]);
|
|
29908
30166
|
Schema$1.Literals([
|
|
29909
30167
|
"inProgress",
|
|
29910
30168
|
"completed",
|
|
29911
|
-
"failed"
|
|
30169
|
+
"failed",
|
|
30170
|
+
"interrupted"
|
|
29912
30171
|
]);
|
|
29913
30172
|
Schema$1.Literals([
|
|
29914
30173
|
"agent",
|
|
@@ -30037,12 +30296,17 @@ Schema$1.Literals([
|
|
|
30037
30296
|
"sendInput",
|
|
30038
30297
|
"resumeAgent",
|
|
30039
30298
|
"wait",
|
|
30040
|
-
"closeAgent"
|
|
30299
|
+
"closeAgent",
|
|
30300
|
+
"sendMessage",
|
|
30301
|
+
"followupTask",
|
|
30302
|
+
"interruptAgent",
|
|
30303
|
+
"listAgents"
|
|
30041
30304
|
]);
|
|
30042
30305
|
Schema$1.Literals([
|
|
30043
30306
|
"inProgress",
|
|
30044
30307
|
"completed",
|
|
30045
|
-
"failed"
|
|
30308
|
+
"failed",
|
|
30309
|
+
"interrupted"
|
|
30046
30310
|
]);
|
|
30047
30311
|
Schema$1.Literals([
|
|
30048
30312
|
"agent",
|
|
@@ -30153,12 +30417,17 @@ Schema$1.Literals([
|
|
|
30153
30417
|
"sendInput",
|
|
30154
30418
|
"resumeAgent",
|
|
30155
30419
|
"wait",
|
|
30156
|
-
"closeAgent"
|
|
30420
|
+
"closeAgent",
|
|
30421
|
+
"sendMessage",
|
|
30422
|
+
"followupTask",
|
|
30423
|
+
"interruptAgent",
|
|
30424
|
+
"listAgents"
|
|
30157
30425
|
]);
|
|
30158
30426
|
Schema$1.Literals([
|
|
30159
30427
|
"inProgress",
|
|
30160
30428
|
"completed",
|
|
30161
|
-
"failed"
|
|
30429
|
+
"failed",
|
|
30430
|
+
"interrupted"
|
|
30162
30431
|
]);
|
|
30163
30432
|
Schema$1.Literals([
|
|
30164
30433
|
"agent",
|
|
@@ -30303,12 +30572,17 @@ Schema$1.Literals([
|
|
|
30303
30572
|
"sendInput",
|
|
30304
30573
|
"resumeAgent",
|
|
30305
30574
|
"wait",
|
|
30306
|
-
"closeAgent"
|
|
30575
|
+
"closeAgent",
|
|
30576
|
+
"sendMessage",
|
|
30577
|
+
"followupTask",
|
|
30578
|
+
"interruptAgent",
|
|
30579
|
+
"listAgents"
|
|
30307
30580
|
]);
|
|
30308
30581
|
Schema$1.Literals([
|
|
30309
30582
|
"inProgress",
|
|
30310
30583
|
"completed",
|
|
30311
|
-
"failed"
|
|
30584
|
+
"failed",
|
|
30585
|
+
"interrupted"
|
|
30312
30586
|
]);
|
|
30313
30587
|
Schema$1.Literals([
|
|
30314
30588
|
"agent",
|
|
@@ -30384,12 +30658,17 @@ Schema$1.Literals([
|
|
|
30384
30658
|
"sendInput",
|
|
30385
30659
|
"resumeAgent",
|
|
30386
30660
|
"wait",
|
|
30387
|
-
"closeAgent"
|
|
30661
|
+
"closeAgent",
|
|
30662
|
+
"sendMessage",
|
|
30663
|
+
"followupTask",
|
|
30664
|
+
"interruptAgent",
|
|
30665
|
+
"listAgents"
|
|
30388
30666
|
]);
|
|
30389
30667
|
Schema$1.Literals([
|
|
30390
30668
|
"inProgress",
|
|
30391
30669
|
"completed",
|
|
30392
|
-
"failed"
|
|
30670
|
+
"failed",
|
|
30671
|
+
"interrupted"
|
|
30393
30672
|
]);
|
|
30394
30673
|
Schema$1.Literals([
|
|
30395
30674
|
"agent",
|
|
@@ -30439,12 +30718,17 @@ Schema$1.Literals([
|
|
|
30439
30718
|
"sendInput",
|
|
30440
30719
|
"resumeAgent",
|
|
30441
30720
|
"wait",
|
|
30442
|
-
"closeAgent"
|
|
30721
|
+
"closeAgent",
|
|
30722
|
+
"sendMessage",
|
|
30723
|
+
"followupTask",
|
|
30724
|
+
"interruptAgent",
|
|
30725
|
+
"listAgents"
|
|
30443
30726
|
]);
|
|
30444
30727
|
Schema$1.Literals([
|
|
30445
30728
|
"inProgress",
|
|
30446
30729
|
"completed",
|
|
30447
|
-
"failed"
|
|
30730
|
+
"failed",
|
|
30731
|
+
"interrupted"
|
|
30448
30732
|
]);
|
|
30449
30733
|
Schema$1.Literals([
|
|
30450
30734
|
"agent",
|
|
@@ -30494,12 +30778,17 @@ Schema$1.Literals([
|
|
|
30494
30778
|
"sendInput",
|
|
30495
30779
|
"resumeAgent",
|
|
30496
30780
|
"wait",
|
|
30497
|
-
"closeAgent"
|
|
30781
|
+
"closeAgent",
|
|
30782
|
+
"sendMessage",
|
|
30783
|
+
"followupTask",
|
|
30784
|
+
"interruptAgent",
|
|
30785
|
+
"listAgents"
|
|
30498
30786
|
]);
|
|
30499
30787
|
Schema$1.Literals([
|
|
30500
30788
|
"inProgress",
|
|
30501
30789
|
"completed",
|
|
30502
|
-
"failed"
|
|
30790
|
+
"failed",
|
|
30791
|
+
"interrupted"
|
|
30503
30792
|
]);
|
|
30504
30793
|
Schema$1.Literals([
|
|
30505
30794
|
"agent",
|
|
@@ -30556,12 +30845,17 @@ Schema$1.Literals([
|
|
|
30556
30845
|
"sendInput",
|
|
30557
30846
|
"resumeAgent",
|
|
30558
30847
|
"wait",
|
|
30559
|
-
"closeAgent"
|
|
30848
|
+
"closeAgent",
|
|
30849
|
+
"sendMessage",
|
|
30850
|
+
"followupTask",
|
|
30851
|
+
"interruptAgent",
|
|
30852
|
+
"listAgents"
|
|
30560
30853
|
]);
|
|
30561
30854
|
Schema$1.Literals([
|
|
30562
30855
|
"inProgress",
|
|
30563
30856
|
"completed",
|
|
30564
|
-
"failed"
|
|
30857
|
+
"failed",
|
|
30858
|
+
"interrupted"
|
|
30565
30859
|
]);
|
|
30566
30860
|
Schema$1.Literals([
|
|
30567
30861
|
"agent",
|
|
@@ -32384,7 +32678,7 @@ const DEVICE_TOOL_DEFINITIONS = [
|
|
|
32384
32678
|
}
|
|
32385
32679
|
}
|
|
32386
32680
|
];
|
|
32387
|
-
function asRecord$
|
|
32681
|
+
function asRecord$6(value) {
|
|
32388
32682
|
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Tool arguments must be a JSON object.");
|
|
32389
32683
|
return value;
|
|
32390
32684
|
}
|
|
@@ -32607,7 +32901,7 @@ async function startDeviceToolGateway(manager) {
|
|
|
32607
32901
|
if (typeof method !== "string") return json(response, 400, mcpError$1(id, -32600, "Missing method."));
|
|
32608
32902
|
if (method === "notifications/initialized" || method === "notifications/cancelled") return empty(response, 202);
|
|
32609
32903
|
if (method === "initialize") {
|
|
32610
|
-
const requested = asRecord$
|
|
32904
|
+
const requested = asRecord$6(message.params ?? {}).protocolVersion;
|
|
32611
32905
|
return json(response, 200, mcpSuccess(id, {
|
|
32612
32906
|
protocolVersion: typeof requested === "string" ? requested : "2025-06-18",
|
|
32613
32907
|
capabilities: { tools: { listChanged: false } },
|
|
@@ -32627,7 +32921,7 @@ async function startDeviceToolGateway(manager) {
|
|
|
32627
32921
|
text: "Device tools are only available during an active Ryco turn."
|
|
32628
32922
|
}]
|
|
32629
32923
|
}));
|
|
32630
|
-
const params = asRecord$
|
|
32924
|
+
const params = asRecord$6(message.params ?? {});
|
|
32631
32925
|
const name = params.name;
|
|
32632
32926
|
if (typeof name !== "string" || !DEVICE_TOOL_NAMES.includes(name)) return json(response, 200, mcpError$1(id, -32602, "Unknown device tool."));
|
|
32633
32927
|
if (agentControlBlocksLegacyTool(binding.threadId, name)) return json(response, 200, mcpSuccess(id, {
|
|
@@ -32642,7 +32936,7 @@ async function startDeviceToolGateway(manager) {
|
|
|
32642
32936
|
manager,
|
|
32643
32937
|
threadId: binding.threadId,
|
|
32644
32938
|
name,
|
|
32645
|
-
args: asRecord$
|
|
32939
|
+
args: asRecord$6(params.arguments ?? {})
|
|
32646
32940
|
});
|
|
32647
32941
|
return json(response, 200, mcpSuccess(id, { content: value && typeof value === "object" && "_mcpContent" in value ? value._mcpContent : [{
|
|
32648
32942
|
type: "text",
|
|
@@ -32941,7 +33235,7 @@ const BUILT_IN_DRIVERS = [
|
|
|
32941
33235
|
configSchema: CodexSettings,
|
|
32942
33236
|
defaultConfig: () => Schema.decodeSync(CodexSettings)({}),
|
|
32943
33237
|
create: (input) => Effect.tryPromise({
|
|
32944
|
-
try: () => import("./CodexDriver-
|
|
33238
|
+
try: () => import("./CodexDriver-49o7TA-C.mjs"),
|
|
32945
33239
|
catch: (cause) => driverImportError(codexDriverKind, input, cause)
|
|
32946
33240
|
}).pipe(Effect.flatMap(({ CodexDriver }) => CodexDriver.create(input)))
|
|
32947
33241
|
},
|
|
@@ -32955,7 +33249,7 @@ const BUILT_IN_DRIVERS = [
|
|
|
32955
33249
|
configSchema: ClaudeSettings,
|
|
32956
33250
|
defaultConfig: () => Schema.decodeSync(ClaudeSettings)({}),
|
|
32957
33251
|
create: (input) => Effect.tryPromise({
|
|
32958
|
-
try: () => import("./ClaudeDriver-
|
|
33252
|
+
try: () => import("./ClaudeDriver-CG5ngU5z.mjs"),
|
|
32959
33253
|
catch: (cause) => driverImportError(claudeDriverKind, input, cause)
|
|
32960
33254
|
}).pipe(Effect.flatMap(({ ClaudeDriver }) => ClaudeDriver.create(input)))
|
|
32961
33255
|
},
|
|
@@ -32969,7 +33263,7 @@ const BUILT_IN_DRIVERS = [
|
|
|
32969
33263
|
configSchema: CopilotSettings,
|
|
32970
33264
|
defaultConfig: () => Schema.decodeSync(CopilotSettings)({}),
|
|
32971
33265
|
create: (input) => Effect.tryPromise({
|
|
32972
|
-
try: () => import("./CopilotDriver-
|
|
33266
|
+
try: () => import("./CopilotDriver-Cu1B1skB.mjs"),
|
|
32973
33267
|
catch: (cause) => driverImportError(copilotDriverKind, input, cause)
|
|
32974
33268
|
}).pipe(Effect.flatMap(({ CopilotDriver }) => CopilotDriver.create(input)))
|
|
32975
33269
|
},
|
|
@@ -32983,7 +33277,7 @@ const BUILT_IN_DRIVERS = [
|
|
|
32983
33277
|
configSchema: CursorSettings,
|
|
32984
33278
|
defaultConfig: () => Schema.decodeSync(CursorSettings)({}),
|
|
32985
33279
|
create: (input) => Effect.tryPromise({
|
|
32986
|
-
try: () => import("./CursorDriver-
|
|
33280
|
+
try: () => import("./CursorDriver-P_A8uQki.mjs"),
|
|
32987
33281
|
catch: (cause) => driverImportError(cursorDriverKind, input, cause)
|
|
32988
33282
|
}).pipe(Effect.flatMap(({ CursorDriver }) => CursorDriver.create(input)))
|
|
32989
33283
|
},
|
|
@@ -32997,7 +33291,7 @@ const BUILT_IN_DRIVERS = [
|
|
|
32997
33291
|
configSchema: GrokSettings,
|
|
32998
33292
|
defaultConfig: () => Schema.decodeSync(GrokSettings)({}),
|
|
32999
33293
|
create: (input) => Effect.tryPromise({
|
|
33000
|
-
try: () => import("./GrokDriver-
|
|
33294
|
+
try: () => import("./GrokDriver-D8KoMY76.mjs"),
|
|
33001
33295
|
catch: (cause) => driverImportError(grokDriverKind, input, cause)
|
|
33002
33296
|
}).pipe(Effect.flatMap(({ GrokDriver }) => GrokDriver.create(input)))
|
|
33003
33297
|
},
|
|
@@ -33011,7 +33305,7 @@ const BUILT_IN_DRIVERS = [
|
|
|
33011
33305
|
configSchema: OpenCodeSettings,
|
|
33012
33306
|
defaultConfig: () => Schema.decodeSync(OpenCodeSettings)({}),
|
|
33013
33307
|
create: (input) => Effect.tryPromise({
|
|
33014
|
-
try: () => import("./OpenCodeDriver-
|
|
33308
|
+
try: () => import("./OpenCodeDriver-B7htxutj.mjs"),
|
|
33015
33309
|
catch: (cause) => driverImportError(openCodeDriverKind, input, cause)
|
|
33016
33310
|
}).pipe(Effect.flatMap(({ OpenCodeDriver }) => OpenCodeDriver.create(input)))
|
|
33017
33311
|
}
|
|
@@ -33726,7 +34020,7 @@ const scopedSafeTeardown = (label) => (effect) => Effect.gen(function* () {
|
|
|
33726
34020
|
});
|
|
33727
34021
|
//#endregion
|
|
33728
34022
|
//#region package.json
|
|
33729
|
-
var version$1 = "0.1.
|
|
34023
|
+
var version$1 = "0.1.14";
|
|
33730
34024
|
//#endregion
|
|
33731
34025
|
//#region src/provider/Layers/CodexProvider.ts
|
|
33732
34026
|
const PROVIDER_PROBE_TIMEOUT_MS = 8e3;
|
|
@@ -34211,7 +34505,7 @@ function sortProviderSupport(left, right) {
|
|
|
34211
34505
|
};
|
|
34212
34506
|
return statusRank[left.status] - statusRank[right.status] || Number(right.enabled) - Number(left.enabled) || left.driver.localeCompare(right.driver) || left.instanceId.localeCompare(right.instanceId);
|
|
34213
34507
|
}
|
|
34214
|
-
function asRecord$
|
|
34508
|
+
function asRecord$5(value) {
|
|
34215
34509
|
if (value === null || typeof value !== "object" || Array.isArray(value)) return;
|
|
34216
34510
|
return value;
|
|
34217
34511
|
}
|
|
@@ -34219,7 +34513,7 @@ function asStringArray(value) {
|
|
|
34219
34513
|
return Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : [];
|
|
34220
34514
|
}
|
|
34221
34515
|
function asStringRecord(value) {
|
|
34222
|
-
const record = asRecord$
|
|
34516
|
+
const record = asRecord$5(value);
|
|
34223
34517
|
if (!record) return {};
|
|
34224
34518
|
const entries = Object.entries(record).filter((entry) => {
|
|
34225
34519
|
const [, entryValue] = entry;
|
|
@@ -34244,7 +34538,7 @@ function asOptionalNumber(value) {
|
|
|
34244
34538
|
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
34245
34539
|
}
|
|
34246
34540
|
function sourceFromOrigin(origin) {
|
|
34247
|
-
const type = asRecord$
|
|
34541
|
+
const type = asRecord$5(asRecord$5(origin)?.name)?.type;
|
|
34248
34542
|
if (type === "user" || type === "project" || type === "system") return type;
|
|
34249
34543
|
if (type === "mdm") return "managed";
|
|
34250
34544
|
return "unknown";
|
|
@@ -34264,13 +34558,13 @@ function collectLayerServers(layers) {
|
|
|
34264
34558
|
if (!layers) return [];
|
|
34265
34559
|
const layerServers = [];
|
|
34266
34560
|
for (const layer of layers) {
|
|
34267
|
-
const servers = asRecord$
|
|
34561
|
+
const servers = asRecord$5(asRecord$5(layer.config)?.mcp_servers);
|
|
34268
34562
|
if (servers) layerServers.push(servers);
|
|
34269
34563
|
}
|
|
34270
34564
|
return layerServers;
|
|
34271
34565
|
}
|
|
34272
34566
|
function decodeServerConfig(raw) {
|
|
34273
|
-
const record = asRecord$
|
|
34567
|
+
const record = asRecord$5(raw);
|
|
34274
34568
|
if (!record) return Schema.decodeSync(McpServerConfig)({ transport: "unknown" });
|
|
34275
34569
|
const input = {
|
|
34276
34570
|
transport: typeof record.url === "string" ? "http" : typeof record.command === "string" ? "stdio" : "unknown",
|
|
@@ -34387,15 +34681,15 @@ function toStartupStatus(config, status) {
|
|
|
34387
34681
|
}
|
|
34388
34682
|
function extractConfigPath(layers) {
|
|
34389
34683
|
const userLayer = layers?.find((layer) => {
|
|
34390
|
-
const name = asRecord$
|
|
34684
|
+
const name = asRecord$5(layer.name);
|
|
34391
34685
|
return name?.type === "user" && typeof name.file === "string";
|
|
34392
34686
|
});
|
|
34393
|
-
const file = asRecord$
|
|
34687
|
+
const file = asRecord$5(userLayer?.name)?.file;
|
|
34394
34688
|
return typeof file === "string" ? file : void 0;
|
|
34395
34689
|
}
|
|
34396
34690
|
function buildServers(input) {
|
|
34397
34691
|
const configRecord = input.configResponse.config;
|
|
34398
|
-
const configuredServers = asRecord$
|
|
34692
|
+
const configuredServers = asRecord$5(configRecord.mcp_servers) ?? {};
|
|
34399
34693
|
const statusByName = new Map(input.statuses.map((status) => [status.name, status]));
|
|
34400
34694
|
const names = [.../* @__PURE__ */ new Set([...Object.keys(configuredServers), ...statusByName.keys()])].toSorted((left, right) => left.localeCompare(right));
|
|
34401
34695
|
const layerServers = collectLayerServers(input.configResponse.layers);
|
|
@@ -34620,7 +34914,7 @@ const makeCodexMcpService = Effect.gen(function* () {
|
|
|
34620
34914
|
cwd: serverConfig.cwd,
|
|
34621
34915
|
includeLayers: false
|
|
34622
34916
|
})).config;
|
|
34623
|
-
const config = mergeServerSecrets((asRecord$
|
|
34917
|
+
const config = mergeServerSecrets((asRecord$5(configRecord.mcp_servers) ?? {})[input.name], input);
|
|
34624
34918
|
return yield* client.request("config/batchWrite", {
|
|
34625
34919
|
edits: [{
|
|
34626
34920
|
keyPath: `mcp_servers.${input.name}`,
|
|
@@ -37133,6 +37427,20 @@ const OpenLive = Layer.effect(Open, make$10);
|
|
|
37133
37427
|
*/
|
|
37134
37428
|
var OrchestrationEngineService = class extends Context.Service()("ryco/orchestration/Services/OrchestrationEngine/OrchestrationEngineService") {};
|
|
37135
37429
|
//#endregion
|
|
37430
|
+
//#region src/orchestration/Services/ThreadDeletionReactor.ts
|
|
37431
|
+
/**
|
|
37432
|
+
* ThreadDeletionReactor - Thread deletion cleanup reactor service interface.
|
|
37433
|
+
*
|
|
37434
|
+
* Owns background workers that react to thread deletion domain events and
|
|
37435
|
+
* perform best-effort runtime cleanup for provider sessions and terminals.
|
|
37436
|
+
*
|
|
37437
|
+
* @module ThreadDeletionReactor
|
|
37438
|
+
*/
|
|
37439
|
+
/**
|
|
37440
|
+
* ThreadDeletionReactor - Service tag for thread deletion cleanup workers.
|
|
37441
|
+
*/
|
|
37442
|
+
var ThreadDeletionReactor = class extends Context.Service()("ryco/orchestration/Services/ThreadDeletionReactor") {};
|
|
37443
|
+
//#endregion
|
|
37136
37444
|
//#region src/orchestration/Services/ContextHandoffInspection.ts
|
|
37137
37445
|
var ContextHandoffInspection = class extends Context.Service()("ryco/orchestration/Services/ContextHandoffInspection") {};
|
|
37138
37446
|
//#endregion
|
|
@@ -38678,6 +38986,9 @@ var WorkspaceAccessPolicy = class extends Context.Service()("ryco/workspace/Serv
|
|
|
38678
38986
|
//#region src/provider/Services/ProviderSessionReaper.ts
|
|
38679
38987
|
var ProviderSessionReaper = class extends Context.Service()("ryco/provider/Services/ProviderSessionReaper") {};
|
|
38680
38988
|
//#endregion
|
|
38989
|
+
//#region src/provider/Services/ProviderSessionDirectory.ts
|
|
38990
|
+
var ProviderSessionDirectory = class extends Context.Service()("ryco/provider/Services/ProviderSessionDirectory") {};
|
|
38991
|
+
//#endregion
|
|
38681
38992
|
//#region ../../packages/shared/src/qrCode.ts
|
|
38682
38993
|
var QrCode = class QrCode {
|
|
38683
38994
|
static Ecc;
|
|
@@ -39892,6 +40203,86 @@ const validateRestrictedWorkspaceSnapshot = (snapshot) => Effect.gen(function* (
|
|
|
39892
40203
|
operation: "persisted worktree startup validation"
|
|
39893
40204
|
}), { discard: true });
|
|
39894
40205
|
}).pipe(Effect.mapError(incompatibleWorkspaceStateError));
|
|
40206
|
+
const ORPHANED_PROVIDER_SESSION_ERROR = "Provider session did not survive a server restart. Send a new message to continue.";
|
|
40207
|
+
function clearRuntimePayloadActiveTurn(runtimePayload) {
|
|
40208
|
+
if (typeof runtimePayload === "object" && runtimePayload !== null && !Array.isArray(runtimePayload)) return {
|
|
40209
|
+
...runtimePayload,
|
|
40210
|
+
activeTurnId: null
|
|
40211
|
+
};
|
|
40212
|
+
return { activeTurnId: null };
|
|
40213
|
+
}
|
|
40214
|
+
/**
|
|
40215
|
+
* Settle projected provider sessions whose native process did not survive this
|
|
40216
|
+
* server process. This runs after the provider/orchestration roots subscribe,
|
|
40217
|
+
* but before the startup command gate opens, so repaired state is authoritative
|
|
40218
|
+
* before clients can mutate it.
|
|
40219
|
+
*/
|
|
40220
|
+
const reconcileOrphanedProviderSessions = Effect.gen(function* () {
|
|
40221
|
+
const directory = yield* ProviderSessionDirectory;
|
|
40222
|
+
const orchestrationEngine = yield* OrchestrationEngineService;
|
|
40223
|
+
const providerService = yield* ProviderService;
|
|
40224
|
+
const projectionSnapshotQuery = yield* ProjectionSnapshotQuery;
|
|
40225
|
+
const liveSessionsExit = yield* Effect.exit(providerService.listSessions());
|
|
40226
|
+
if (Exit.isFailure(liveSessionsExit)) {
|
|
40227
|
+
if (Cause.hasInterrupts(liveSessionsExit.cause)) return yield* Effect.failCause(liveSessionsExit.cause);
|
|
40228
|
+
yield* Effect.logWarning("provider session startup inventory failed", { cause: Cause.pretty(liveSessionsExit.cause) });
|
|
40229
|
+
return;
|
|
40230
|
+
}
|
|
40231
|
+
const liveThreadIds = new Set(liveSessionsExit.value.map((session) => session.threadId));
|
|
40232
|
+
const orphanedThreads = (yield* projectionSnapshotQuery.getCommandReadModel()).threads.filter((thread) => thread.session !== null && (thread.session.status === "starting" || thread.session.status === "running" || thread.session.activeTurnId !== null) && !liveThreadIds.has(thread.id));
|
|
40233
|
+
for (const thread of orphanedThreads) {
|
|
40234
|
+
const session = thread.session;
|
|
40235
|
+
if (session === null) continue;
|
|
40236
|
+
yield* Effect.gen(function* () {
|
|
40237
|
+
const binding = yield* directory.getBinding(thread.id);
|
|
40238
|
+
if (Option.isNone(binding)) return;
|
|
40239
|
+
yield* providerService.stopSessionBinding(binding.value).pipe(Effect.catchCause((cause) => Cause.hasInterrupts(cause) ? Effect.failCause(cause) : Effect.logWarning("failed to stop orphaned provider runtime binding", {
|
|
40240
|
+
threadId: thread.id,
|
|
40241
|
+
cause: Cause.pretty(cause)
|
|
40242
|
+
})));
|
|
40243
|
+
yield* directory.upsert({
|
|
40244
|
+
...binding.value,
|
|
40245
|
+
status: "stopped",
|
|
40246
|
+
runtimePayload: clearRuntimePayloadActiveTurn(binding.value.runtimePayload)
|
|
40247
|
+
});
|
|
40248
|
+
}).pipe(Effect.catchCause((cause) => Cause.hasInterrupts(cause) ? Effect.failCause(cause) : Effect.logWarning("failed to reconcile orphaned provider session binding", {
|
|
40249
|
+
threadId: thread.id,
|
|
40250
|
+
cause: Cause.pretty(cause)
|
|
40251
|
+
})));
|
|
40252
|
+
const reconciledAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
40253
|
+
if (session.activeTurnId !== null) {
|
|
40254
|
+
const interruptCommand = {
|
|
40255
|
+
type: "thread.turn.interrupt",
|
|
40256
|
+
commandId: CommandId.make(`provider:startup-reconciliation:turn-interrupt:${crypto.randomUUID()}`),
|
|
40257
|
+
threadId: thread.id,
|
|
40258
|
+
turnId: session.activeTurnId,
|
|
40259
|
+
createdAt: reconciledAt
|
|
40260
|
+
};
|
|
40261
|
+
yield* Effect.suspend(() => orchestrationEngine.dispatch(interruptCommand)).pipe(Effect.retry(Schedule.recurs(1)), Effect.catchCause((cause) => Cause.hasInterrupts(cause) ? Effect.failCause(cause) : Effect.logWarning("failed to settle orphaned provider turn projection", {
|
|
40262
|
+
threadId: thread.id,
|
|
40263
|
+
turnId: session.activeTurnId,
|
|
40264
|
+
cause: Cause.pretty(cause)
|
|
40265
|
+
})));
|
|
40266
|
+
}
|
|
40267
|
+
const sessionCommand = {
|
|
40268
|
+
type: "thread.session.set",
|
|
40269
|
+
commandId: CommandId.make(`server:startup-reconciliation:${crypto.randomUUID()}`),
|
|
40270
|
+
threadId: thread.id,
|
|
40271
|
+
session: {
|
|
40272
|
+
...session,
|
|
40273
|
+
status: "error",
|
|
40274
|
+
activeTurnId: null,
|
|
40275
|
+
lastError: ORPHANED_PROVIDER_SESSION_ERROR,
|
|
40276
|
+
updatedAt: reconciledAt
|
|
40277
|
+
},
|
|
40278
|
+
createdAt: reconciledAt
|
|
40279
|
+
};
|
|
40280
|
+
yield* Effect.suspend(() => orchestrationEngine.dispatch(sessionCommand)).pipe(Effect.retry(Schedule.recurs(1)), Effect.catchCause((cause) => Cause.hasInterrupts(cause) ? Effect.failCause(cause) : Effect.logWarning("failed to settle orphaned provider session projection", {
|
|
40281
|
+
threadId: thread.id,
|
|
40282
|
+
cause: Cause.pretty(cause)
|
|
40283
|
+
})));
|
|
40284
|
+
}
|
|
40285
|
+
}).pipe(Effect.catchCause((cause) => Cause.hasInterrupts(cause) ? Effect.failCause(cause) : Effect.logWarning("provider session startup reconciliation failed", { cause: Cause.pretty(cause) })));
|
|
39895
40286
|
const makeServerRuntimeStartup = Effect.gen(function* () {
|
|
39896
40287
|
const runtimeStartedAt = Date.now();
|
|
39897
40288
|
const serverConfig = yield* ServerConfig;
|
|
@@ -39926,6 +40317,8 @@ const makeServerRuntimeStartup = Effect.gen(function* () {
|
|
|
39926
40317
|
concurrency: "unbounded",
|
|
39927
40318
|
discard: true
|
|
39928
40319
|
}));
|
|
40320
|
+
yield* Effect.logDebug("startup phase: reconciling orphaned provider sessions");
|
|
40321
|
+
yield* runStartupPhase("provider-sessions.reconcile", reconcileOrphanedProviderSessions);
|
|
39929
40322
|
const welcomeBase = yield* resolveWelcomeBase;
|
|
39930
40323
|
const environment = yield* serverEnvironment.getDescriptor;
|
|
39931
40324
|
yield* Effect.logDebug("startup phase: preparing welcome payload");
|
|
@@ -41682,6 +42075,7 @@ const make$9 = Effect.fn("makeGitWorkflowService")(function* () {
|
|
|
41682
42075
|
listRefs: (input) => detectGitRepositoryForCommand("GitWorkflowService.listRefs", input.cwd).pipe(Effect.flatMap((isGitRepository) => isGitRepository ? git.listRefs(input).pipe(Effect.catch(recoverMissingCwd(input.cwd, nonRepositoryListRefs()))) : Effect.succeed(nonRepositoryListRefs()))),
|
|
41683
42076
|
createWorktree: (input) => ensureGitCommand("GitWorkflowService.createWorktree", input.cwd).pipe(Effect.andThen(git.createWorktree(input))),
|
|
41684
42077
|
removeWorktree: (input) => ensureGitCommand("GitWorkflowService.removeWorktree", input.cwd).pipe(Effect.andThen(git.removeWorktree(input))),
|
|
42078
|
+
pruneWorktrees: (cwd) => ensureGitCommand("GitWorkflowService.pruneWorktrees", cwd).pipe(Effect.andThen(git.pruneWorktrees(cwd))),
|
|
41685
42079
|
listWorktreePaths: (cwd) => {
|
|
41686
42080
|
const empty = [];
|
|
41687
42081
|
return detectGitRepositoryForCommand("GitWorkflowService.listWorktreePaths", cwd).pipe(Effect.flatMap((isGitRepository) => isGitRepository ? git.listWorktreePaths(cwd).pipe(Effect.catch(recoverMissingCwd(cwd, empty))) : Effect.succeed(empty)));
|
|
@@ -44857,6 +45251,7 @@ const makeWsRpcContext = (principal) => Effect.gen(function* () {
|
|
|
44857
45251
|
const usageServiceOption = yield* Effect.serviceOption(UsageService);
|
|
44858
45252
|
const usageService = Option.getOrElse(usageServiceOption, () => UsageServiceTest);
|
|
44859
45253
|
const orchestrationEngine = yield* OrchestrationEngineService;
|
|
45254
|
+
const threadDeletionReactor = yield* ThreadDeletionReactor;
|
|
44860
45255
|
const contextHandoffInspection = yield* Effect.serviceOption(ContextHandoffInspection);
|
|
44861
45256
|
const threadPriorityCoordinator = yield* Effect.serviceOption(ThreadPriorityCoordinator);
|
|
44862
45257
|
const agentControlProposals = yield* Effect.serviceOption(AgentControlProposalService);
|
|
@@ -45074,7 +45469,7 @@ const makeWsRpcContext = (principal) => Effect.gen(function* () {
|
|
|
45074
45469
|
})() : Effect.void;
|
|
45075
45470
|
return yield* Effect.gen(function* () {
|
|
45076
45471
|
if (bootstrap?.createThread) {
|
|
45077
|
-
yield* orchestrationEngine.dispatch({
|
|
45472
|
+
const created = yield* orchestrationEngine.dispatch({
|
|
45078
45473
|
type: "thread.create",
|
|
45079
45474
|
commandId: serverCommandId("bootstrap-thread-create"),
|
|
45080
45475
|
threadId: command.threadId,
|
|
@@ -45087,6 +45482,7 @@ const makeWsRpcContext = (principal) => Effect.gen(function* () {
|
|
|
45087
45482
|
worktreePath: bootstrap.createThread.worktreePath,
|
|
45088
45483
|
createdAt: bootstrap.createThread.createdAt
|
|
45089
45484
|
});
|
|
45485
|
+
yield* threadDeletionReactor.drainThrough(created.sequence);
|
|
45090
45486
|
createdThread = true;
|
|
45091
45487
|
}
|
|
45092
45488
|
if (bootstrap?.prepareWorktree) {
|
|
@@ -45123,7 +45519,7 @@ const makeWsRpcContext = (principal) => Effect.gen(function* () {
|
|
|
45123
45519
|
}));
|
|
45124
45520
|
});
|
|
45125
45521
|
const dispatchNormalizedCommand = (normalizedCommand) => {
|
|
45126
|
-
const dispatchEffect = normalizedCommand.type === "thread.turn.start" && normalizedCommand.bootstrap ? dispatchBootstrapTurnStart(normalizedCommand) : orchestrationEngine.dispatch(normalizedCommand).pipe(Effect.mapError((cause) => toDispatchCommandError(cause, "Failed to dispatch orchestration command")));
|
|
45522
|
+
const dispatchEffect = normalizedCommand.type === "thread.turn.start" && normalizedCommand.bootstrap ? dispatchBootstrapTurnStart(normalizedCommand) : orchestrationEngine.dispatch(normalizedCommand).pipe(Effect.tap(({ sequence }) => normalizedCommand.type === "thread.create" ? threadDeletionReactor.drainThrough(sequence) : Effect.void), Effect.mapError((cause) => toDispatchCommandError(cause, "Failed to dispatch orchestration command")));
|
|
45127
45523
|
return startup.enqueueCommand(dispatchEffect).pipe(Effect.mapError((cause) => toDispatchCommandError(cause, "Failed to dispatch orchestration command")));
|
|
45128
45524
|
};
|
|
45129
45525
|
const loadDiagnosticsMetrics = localDiagnosticsMetrics.snapshot;
|
|
@@ -45511,18 +45907,24 @@ const normalizeDispatchCommand = (command) => Effect.gen(function* () {
|
|
|
45511
45907
|
...command.projectMetadataDir !== void 0 ? { projectMetadataDir: yield* normalizeProjectMetadataDir(command.projectMetadataDir) } : {}
|
|
45512
45908
|
};
|
|
45513
45909
|
if (command.type !== "thread.turn.start" && command.type !== "thread.turn.steer") return command;
|
|
45514
|
-
const
|
|
45910
|
+
const preparedAttachments = yield* Effect.forEach(command.message.attachments, (attachment) => Effect.gen(function* () {
|
|
45515
45911
|
const parsed = parseBase64DataUrl(attachment.dataUrl);
|
|
45516
|
-
if (!parsed
|
|
45517
|
-
const
|
|
45518
|
-
if (
|
|
45912
|
+
if (!parsed) return yield* new OrchestrationDispatchCommandError({ message: `Attachment '${attachment.name}' must use a valid base64 data URL.` });
|
|
45913
|
+
const normalizedMimeType = parsed.mimeType.toLowerCase();
|
|
45914
|
+
if (normalizedMimeType !== attachment.mimeType.toLowerCase()) return yield* new OrchestrationDispatchCommandError({ message: `Attachment '${attachment.name}' declares '${attachment.mimeType}' but its payload is '${parsed.mimeType}'.` });
|
|
45915
|
+
if (attachment.type === "image" && !normalizedMimeType.startsWith("image/")) return yield* new OrchestrationDispatchCommandError({ message: `Image attachment '${attachment.name}' must use an image MIME type.` });
|
|
45916
|
+
const normalizedBase64 = parsed.base64.replace(/\s+/g, "");
|
|
45917
|
+
const bytes = Buffer.from(normalizedBase64, "base64");
|
|
45918
|
+
if (bytes.byteLength === 0 || bytes.toString("base64") !== normalizedBase64 || bytes.byteLength !== attachment.sizeBytes) return yield* new OrchestrationDispatchCommandError({ message: `Attachment '${attachment.name}' has invalid base64 data or mismatched size metadata.` });
|
|
45919
|
+
const attachmentLimit = attachment.type === "image" ? PROVIDER_SEND_TURN_MAX_IMAGE_BYTES : PROVIDER_SEND_TURN_MAX_FILE_BYTES;
|
|
45920
|
+
if (bytes.byteLength > attachmentLimit) return yield* new OrchestrationDispatchCommandError({ message: `Attachment '${attachment.name}' is ${bytes.byteLength} bytes; limit is ${attachmentLimit} bytes.` });
|
|
45519
45921
|
const attachmentId = createAttachmentId(command.threadId);
|
|
45520
45922
|
if (!attachmentId) return yield* new OrchestrationDispatchCommandError({ message: "Failed to create a safe attachment id." });
|
|
45521
45923
|
const persistedAttachment = {
|
|
45522
|
-
type:
|
|
45924
|
+
type: attachment.type,
|
|
45523
45925
|
id: attachmentId,
|
|
45524
45926
|
name: attachment.name,
|
|
45525
|
-
mimeType:
|
|
45927
|
+
mimeType: normalizedMimeType,
|
|
45526
45928
|
sizeBytes: bytes.byteLength
|
|
45527
45929
|
};
|
|
45528
45930
|
const attachmentPath = resolveAttachmentPath({
|
|
@@ -45530,10 +45932,22 @@ const normalizeDispatchCommand = (command) => Effect.gen(function* () {
|
|
|
45530
45932
|
attachment: persistedAttachment
|
|
45531
45933
|
});
|
|
45532
45934
|
if (!attachmentPath) return yield* new OrchestrationDispatchCommandError({ message: `Failed to resolve persisted path for '${attachment.name}'.` });
|
|
45533
|
-
|
|
45534
|
-
|
|
45535
|
-
|
|
45935
|
+
return {
|
|
45936
|
+
attachment: persistedAttachment,
|
|
45937
|
+
attachmentPath,
|
|
45938
|
+
bytes
|
|
45939
|
+
};
|
|
45536
45940
|
}), { concurrency: 1 });
|
|
45941
|
+
const totalAttachmentBytes = preparedAttachments.reduce((total, prepared) => total + prepared.bytes.byteLength, 0);
|
|
45942
|
+
if (totalAttachmentBytes > 52428800) return yield* new OrchestrationDispatchCommandError({ message: `Attachments total ${totalAttachmentBytes} bytes; limit is ${PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES} bytes.` });
|
|
45943
|
+
yield* Effect.forEach(preparedAttachments, ({ attachment, attachmentPath, bytes }) => fileSystem.makeDirectory(path.dirname(attachmentPath), { recursive: true }).pipe(Effect.mapError(() => new OrchestrationDispatchCommandError({ message: `Failed to create attachment directory for '${attachment.name}'.` })), Effect.andThen(fileSystem.writeFile(attachmentPath, bytes).pipe(Effect.mapError(() => new OrchestrationDispatchCommandError({ message: `Failed to persist attachment '${attachment.name}'.` }))))), {
|
|
45944
|
+
concurrency: 1,
|
|
45945
|
+
discard: true
|
|
45946
|
+
}).pipe(Effect.onError(() => Effect.forEach(preparedAttachments, ({ attachmentPath }) => fileSystem.remove(attachmentPath).pipe(Effect.ignore), {
|
|
45947
|
+
concurrency: 1,
|
|
45948
|
+
discard: true
|
|
45949
|
+
})));
|
|
45950
|
+
const normalizedAttachments = preparedAttachments.map(({ attachment }) => attachment);
|
|
45537
45951
|
return {
|
|
45538
45952
|
...command,
|
|
45539
45953
|
message: {
|
|
@@ -47751,10 +48165,10 @@ const ContextHandoffDocument = Schema.Struct({
|
|
|
47751
48165
|
subagents: Schema.Array(ContextHandoffSubagentEntry),
|
|
47752
48166
|
priorHandoffs: Schema.Array(ContextHandoffBoundaryEntry)
|
|
47753
48167
|
});
|
|
47754
|
-
function asRecord$
|
|
48168
|
+
function asRecord$4(value) {
|
|
47755
48169
|
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
47756
48170
|
}
|
|
47757
|
-
function asTrimmedString$
|
|
48171
|
+
function asTrimmedString$2(value) {
|
|
47758
48172
|
if (typeof value !== "string") return;
|
|
47759
48173
|
const trimmed = value.trim();
|
|
47760
48174
|
return trimmed.length > 0 ? trimmed : void 0;
|
|
@@ -47773,7 +48187,7 @@ function truncateUnicodeSafe(value, maxChars) {
|
|
|
47773
48187
|
return value.slice(0, end);
|
|
47774
48188
|
}
|
|
47775
48189
|
function boundedString(value, maxChars) {
|
|
47776
|
-
const normalized = asTrimmedString$
|
|
48190
|
+
const normalized = asTrimmedString$2(value);
|
|
47777
48191
|
if (!normalized) return { truncated: false };
|
|
47778
48192
|
const bounded = truncateUnicodeSafe(normalized, maxChars);
|
|
47779
48193
|
return {
|
|
@@ -47825,7 +48239,7 @@ function boundedEndpoint(endpoint) {
|
|
|
47825
48239
|
};
|
|
47826
48240
|
}
|
|
47827
48241
|
function activityPayload(activity) {
|
|
47828
|
-
return asRecord$
|
|
48242
|
+
return asRecord$4(activity.payload);
|
|
47829
48243
|
}
|
|
47830
48244
|
function decodeHandoffPayload(activity) {
|
|
47831
48245
|
if (activity.kind !== "context-handoff") return;
|
|
@@ -47912,7 +48326,7 @@ function collectRuntimePlan(activities) {
|
|
|
47912
48326
|
if (!Array.isArray(payload?.plan)) continue;
|
|
47913
48327
|
let truncated = payload.plan.length > MAX_PLAN_STEPS;
|
|
47914
48328
|
const steps = payload.plan.slice(0, MAX_PLAN_STEPS).flatMap((entry) => {
|
|
47915
|
-
const record = asRecord$
|
|
48329
|
+
const record = asRecord$4(entry);
|
|
47916
48330
|
const step = boundedString(record?.step, DETAIL_MAX_CHARS);
|
|
47917
48331
|
if (!step.value) return [];
|
|
47918
48332
|
truncated ||= step.truncated;
|
|
@@ -47939,21 +48353,21 @@ function collectRuntimePlan(activities) {
|
|
|
47939
48353
|
return latest ? [latest] : [];
|
|
47940
48354
|
}
|
|
47941
48355
|
function normalizeCommand(value) {
|
|
47942
|
-
const direct = asTrimmedString$
|
|
48356
|
+
const direct = asTrimmedString$2(value);
|
|
47943
48357
|
if (direct) return direct;
|
|
47944
48358
|
if (!Array.isArray(value)) return;
|
|
47945
48359
|
const parts = value.flatMap((entry) => {
|
|
47946
|
-
const part = asTrimmedString$
|
|
48360
|
+
const part = asTrimmedString$2(entry);
|
|
47947
48361
|
return part ? [part] : [];
|
|
47948
48362
|
});
|
|
47949
48363
|
return parts.length > 0 ? parts.join(" ") : void 0;
|
|
47950
48364
|
}
|
|
47951
48365
|
function extractCommand(payload) {
|
|
47952
|
-
const data = asRecord$
|
|
47953
|
-
const item = asRecord$
|
|
47954
|
-
const input = asRecord$
|
|
47955
|
-
const result = asRecord$
|
|
47956
|
-
const rawInput = asRecord$
|
|
48366
|
+
const data = asRecord$4(payload.data);
|
|
48367
|
+
const item = asRecord$4(data?.item);
|
|
48368
|
+
const input = asRecord$4(item?.input);
|
|
48369
|
+
const result = asRecord$4(item?.result);
|
|
48370
|
+
const rawInput = asRecord$4(data?.rawInput);
|
|
47957
48371
|
for (const candidate of [
|
|
47958
48372
|
item?.command,
|
|
47959
48373
|
input?.command,
|
|
@@ -47964,7 +48378,7 @@ function extractCommand(payload) {
|
|
|
47964
48378
|
const command = normalizeCommand(candidate);
|
|
47965
48379
|
if (command) return command;
|
|
47966
48380
|
}
|
|
47967
|
-
const executable = asTrimmedString$
|
|
48381
|
+
const executable = asTrimmedString$2(rawInput?.executable);
|
|
47968
48382
|
const args = normalizeCommand(rawInput?.args);
|
|
47969
48383
|
return executable ? args ? `${executable} ${args}` : executable : void 0;
|
|
47970
48384
|
}
|
|
@@ -47972,36 +48386,36 @@ function textFromContentArray(value) {
|
|
|
47972
48386
|
if (!Array.isArray(value)) return;
|
|
47973
48387
|
const chunks = [];
|
|
47974
48388
|
for (const entry of value) {
|
|
47975
|
-
const record = asRecord$
|
|
47976
|
-
const direct = asTrimmedString$
|
|
47977
|
-
const nested = asTrimmedString$
|
|
48389
|
+
const record = asRecord$4(entry);
|
|
48390
|
+
const direct = asTrimmedString$2(record?.text);
|
|
48391
|
+
const nested = asTrimmedString$2(asRecord$4(record?.content)?.text);
|
|
47978
48392
|
if (direct) chunks.push(direct);
|
|
47979
48393
|
else if (nested) chunks.push(nested);
|
|
47980
48394
|
}
|
|
47981
48395
|
return chunks.length > 0 ? chunks.join("\n") : void 0;
|
|
47982
48396
|
}
|
|
47983
48397
|
function extractOutput(payload) {
|
|
47984
|
-
const data = asRecord$
|
|
47985
|
-
const item = asRecord$
|
|
47986
|
-
if (item?.type === "commandExecution") return asTrimmedString$
|
|
48398
|
+
const data = asRecord$4(payload.data);
|
|
48399
|
+
const item = asRecord$4(data?.item);
|
|
48400
|
+
if (item?.type === "commandExecution") return asTrimmedString$2(item.aggregatedOutput);
|
|
47987
48401
|
if (item?.type === "mcpToolCall") {
|
|
47988
|
-
const error = asTrimmedString$
|
|
48402
|
+
const error = asTrimmedString$2(asRecord$4(item.error)?.message);
|
|
47989
48403
|
if (error) return error;
|
|
47990
|
-
const content = textFromContentArray(asRecord$
|
|
48404
|
+
const content = textFromContentArray(asRecord$4(item.result)?.content);
|
|
47991
48405
|
if (content) return content;
|
|
47992
48406
|
}
|
|
47993
48407
|
if (item?.type === "dynamicToolCall") {
|
|
47994
48408
|
const content = textFromContentArray(item.contentItems);
|
|
47995
48409
|
if (content) return content;
|
|
47996
48410
|
}
|
|
47997
|
-
const rawOutput = asRecord$
|
|
47998
|
-
return asTrimmedString$
|
|
48411
|
+
const rawOutput = asRecord$4(data?.rawOutput);
|
|
48412
|
+
return asTrimmedString$2(rawOutput?.stdout) ?? asTrimmedString$2(rawOutput?.stderr) ?? asTrimmedString$2(rawOutput?.content) ?? textFromContentArray(data?.content);
|
|
47999
48413
|
}
|
|
48000
48414
|
function extractExitCode(payload) {
|
|
48001
|
-
const data = asRecord$
|
|
48002
|
-
const item = asRecord$
|
|
48003
|
-
const itemResult = asRecord$
|
|
48004
|
-
const rawOutput = asRecord$
|
|
48415
|
+
const data = asRecord$4(payload.data);
|
|
48416
|
+
const item = asRecord$4(data?.item);
|
|
48417
|
+
const itemResult = asRecord$4(item?.result);
|
|
48418
|
+
const rawOutput = asRecord$4(data?.rawOutput);
|
|
48005
48419
|
for (const candidate of [
|
|
48006
48420
|
item?.exitCode,
|
|
48007
48421
|
itemResult?.exitCode,
|
|
@@ -48010,7 +48424,7 @@ function extractExitCode(payload) {
|
|
|
48010
48424
|
const exitCode = asInteger(candidate);
|
|
48011
48425
|
if (exitCode !== void 0) return exitCode;
|
|
48012
48426
|
}
|
|
48013
|
-
const detail = asTrimmedString$
|
|
48427
|
+
const detail = asTrimmedString$2(payload.detail);
|
|
48014
48428
|
const match = detail ? /<exited with exit code (?<code>-?\d+)>\s*$/iu.exec(detail) : null;
|
|
48015
48429
|
const parsed = Number.parseInt(match?.groups?.code ?? "", 10);
|
|
48016
48430
|
return Number.isInteger(parsed) ? parsed : void 0;
|
|
@@ -48024,7 +48438,7 @@ function pathFromRecord(record) {
|
|
|
48024
48438
|
"newPath",
|
|
48025
48439
|
"oldPath"
|
|
48026
48440
|
]) {
|
|
48027
|
-
const path = asTrimmedString$
|
|
48441
|
+
const path = asTrimmedString$2(record[key]);
|
|
48028
48442
|
if (path) return truncateUnicodeSafe(path, PATH_MAX_CHARS);
|
|
48029
48443
|
}
|
|
48030
48444
|
}
|
|
@@ -48045,7 +48459,7 @@ function collectPathsAndChanges(value) {
|
|
|
48045
48459
|
for (const entry of current) visit(entry, depth + 1);
|
|
48046
48460
|
return;
|
|
48047
48461
|
}
|
|
48048
|
-
const record = asRecord$
|
|
48462
|
+
const record = asRecord$4(current);
|
|
48049
48463
|
if (!record || seenObjects.has(record)) return;
|
|
48050
48464
|
seenObjects.add(record);
|
|
48051
48465
|
const path = pathFromRecord(record);
|
|
@@ -48099,10 +48513,10 @@ function extractTool(activity) {
|
|
|
48099
48513
|
const lifecycle = toolLifecycle(activity.kind);
|
|
48100
48514
|
const payload = activityPayload(activity);
|
|
48101
48515
|
if (!lifecycle || !payload || !Schema.is(ToolLifecycleItemType)(payload.itemType)) return;
|
|
48102
|
-
const data = asRecord$
|
|
48103
|
-
const providerRefs = asRecord$
|
|
48104
|
-
const providerItemId = asTrimmedString$
|
|
48105
|
-
const toolCallId = asTrimmedString$
|
|
48516
|
+
const data = asRecord$4(payload.data);
|
|
48517
|
+
const providerRefs = asRecord$4(payload.providerRefs);
|
|
48518
|
+
const providerItemId = asTrimmedString$2(payload.providerItemId) ?? asTrimmedString$2(providerRefs?.providerItemId);
|
|
48519
|
+
const toolCallId = asTrimmedString$2(data?.toolCallId);
|
|
48106
48520
|
const command = boundedString(extractCommand(payload), TOOL_COMMAND_MAX_CHARS);
|
|
48107
48521
|
const output = boundedString(extractOutput(payload), TOOL_OUTPUT_MAX_CHARS);
|
|
48108
48522
|
const detail = boundedString(payload.detail, DETAIL_MAX_CHARS);
|
|
@@ -48194,7 +48608,7 @@ function parseQuestions(payload) {
|
|
|
48194
48608
|
let truncated = payload.questions.length > MAX_QUESTIONS_PER_REQUEST;
|
|
48195
48609
|
return {
|
|
48196
48610
|
questions: payload.questions.slice(0, MAX_QUESTIONS_PER_REQUEST).flatMap((value) => {
|
|
48197
|
-
const record = asRecord$
|
|
48611
|
+
const record = asRecord$4(value);
|
|
48198
48612
|
const id = boundedString(record?.id, LABEL_MAX_CHARS);
|
|
48199
48613
|
const header = boundedString(record?.header, LABEL_MAX_CHARS);
|
|
48200
48614
|
const question = boundedString(record?.question, QUESTION_MAX_CHARS);
|
|
@@ -48203,7 +48617,7 @@ function parseQuestions(payload) {
|
|
|
48203
48617
|
const rawOptions = Array.isArray(record?.options) ? record.options : [];
|
|
48204
48618
|
truncated ||= rawOptions.length > MAX_OPTIONS_PER_QUESTION;
|
|
48205
48619
|
const options = rawOptions.slice(0, MAX_OPTIONS_PER_QUESTION).flatMap((option) => {
|
|
48206
|
-
const label = boundedString(asRecord$
|
|
48620
|
+
const label = boundedString(asRecord$4(option)?.label, LABEL_MAX_CHARS);
|
|
48207
48621
|
truncated ||= label.truncated;
|
|
48208
48622
|
return label.value ? [label.value] : [];
|
|
48209
48623
|
});
|
|
@@ -48244,7 +48658,7 @@ function collectNotices(activities) {
|
|
|
48244
48658
|
const failure = failureFromActivity(activity);
|
|
48245
48659
|
if (failure) failures.push(failure);
|
|
48246
48660
|
const payload = activityPayload(activity);
|
|
48247
|
-
const requestId = asTrimmedString$
|
|
48661
|
+
const requestId = asTrimmedString$2(payload?.requestId);
|
|
48248
48662
|
if (!requestId) continue;
|
|
48249
48663
|
if (activity.kind === "user-input.resolved") {
|
|
48250
48664
|
pendingQuestions.delete(requestId);
|
|
@@ -48271,7 +48685,7 @@ function collectSubagents(activities) {
|
|
|
48271
48685
|
for (const activity of activities.toSorted(compareOrdered)) {
|
|
48272
48686
|
if (activity.kind !== "subagent.completed") continue;
|
|
48273
48687
|
const payload = activityPayload(activity);
|
|
48274
|
-
const subagent = asRecord$
|
|
48688
|
+
const subagent = asRecord$4(payload?.subagent);
|
|
48275
48689
|
const subagentId = boundedString(subagent?.subagentId, LABEL_MAX_CHARS);
|
|
48276
48690
|
const status = payload?.status;
|
|
48277
48691
|
if (!subagentId.value || !Schema.is(RuntimeSubagentStatus)(status)) continue;
|
|
@@ -50290,10 +50704,10 @@ const DEVICE_CAPABILITY_IDS = [
|
|
|
50290
50704
|
"accessibility",
|
|
50291
50705
|
"encoder"
|
|
50292
50706
|
];
|
|
50293
|
-
const asRecord$
|
|
50707
|
+
const asRecord$3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
|
|
50294
50708
|
const asNonEmptyString = (value) => typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
50295
50709
|
const parseToolchain = (value) => {
|
|
50296
|
-
const record = asRecord$
|
|
50710
|
+
const record = asRecord$3(value);
|
|
50297
50711
|
if (!record) return void 0;
|
|
50298
50712
|
const toolchain = {
|
|
50299
50713
|
xcodeVersion: asNonEmptyString(record["xcodeVersion"]),
|
|
@@ -50315,7 +50729,7 @@ const parseCapability = (id, raw) => {
|
|
|
50315
50729
|
id,
|
|
50316
50730
|
ok: true
|
|
50317
50731
|
};
|
|
50318
|
-
const record = asRecord$
|
|
50732
|
+
const record = asRecord$3(raw);
|
|
50319
50733
|
if (!record) return {
|
|
50320
50734
|
id,
|
|
50321
50735
|
ok: false,
|
|
@@ -50348,7 +50762,7 @@ const parseHelperProbe = (stdout) => {
|
|
|
50348
50762
|
error: "The device helper preflight returned unreadable output."
|
|
50349
50763
|
};
|
|
50350
50764
|
}
|
|
50351
|
-
const record = asRecord$
|
|
50765
|
+
const record = asRecord$3(parsed);
|
|
50352
50766
|
if (!record) return {
|
|
50353
50767
|
ok: false,
|
|
50354
50768
|
capabilities: DEVICE_CAPABILITY_IDS.map((id) => ({
|
|
@@ -50359,7 +50773,7 @@ const parseHelperProbe = (stdout) => {
|
|
|
50359
50773
|
toolchain: void 0,
|
|
50360
50774
|
error: "The device helper preflight returned unreadable output."
|
|
50361
50775
|
};
|
|
50362
|
-
const capabilitiesRecord = asRecord$
|
|
50776
|
+
const capabilitiesRecord = asRecord$3(record["capabilities"]);
|
|
50363
50777
|
const error = asNonEmptyString(record["error"]);
|
|
50364
50778
|
if (!capabilitiesRecord) {
|
|
50365
50779
|
const ok = record["ok"] === true;
|
|
@@ -50612,7 +51026,7 @@ var DeviceHelperError = class extends Error {
|
|
|
50612
51026
|
this.code = code;
|
|
50613
51027
|
}
|
|
50614
51028
|
};
|
|
50615
|
-
function asRecord$
|
|
51029
|
+
function asRecord$2(value) {
|
|
50616
51030
|
return typeof value === "object" && value !== null ? value : {};
|
|
50617
51031
|
}
|
|
50618
51032
|
/**
|
|
@@ -50748,8 +51162,8 @@ var HelperClient = class {
|
|
|
50748
51162
|
async attach(udid, options = {}) {
|
|
50749
51163
|
if (!options.force && this.attachment?.udid === udid) return this.attachment;
|
|
50750
51164
|
this.attachment = null;
|
|
50751
|
-
const result = asRecord$
|
|
50752
|
-
const capabilities = asRecord$
|
|
51165
|
+
const result = asRecord$2(await this.request(HELPER_METHODS.attach, { udid }));
|
|
51166
|
+
const capabilities = asRecord$2(result.capabilities);
|
|
50753
51167
|
const pixelWidth = readNumber(result, "pixelWidth", 0);
|
|
50754
51168
|
const pixelHeight = readNumber(result, "pixelHeight", 0);
|
|
50755
51169
|
const scale = readNumber(result, "scale", 3);
|
|
@@ -50903,14 +51317,14 @@ var HelperClient = class {
|
|
|
50903
51317
|
} catch {
|
|
50904
51318
|
return;
|
|
50905
51319
|
}
|
|
50906
|
-
const record = asRecord$
|
|
51320
|
+
const record = asRecord$2(message);
|
|
50907
51321
|
if (typeof record.id !== "number") return;
|
|
50908
51322
|
const request = this.pending.get(record.id);
|
|
50909
51323
|
if (!request) return;
|
|
50910
51324
|
this.pending.delete(record.id);
|
|
50911
51325
|
clearTimeout(request.timer);
|
|
50912
51326
|
if (record.error !== void 0 && record.error !== null) {
|
|
50913
|
-
const error = asRecord$
|
|
51327
|
+
const error = asRecord$2(record.error);
|
|
50914
51328
|
request.reject(new DeviceHelperError(typeof error.code === "number" ? `helper_${error.code}` : "helper_error", typeof error.message === "string" ? error.message : "Device helper reported an error"));
|
|
50915
51329
|
return;
|
|
50916
51330
|
}
|
|
@@ -74982,9 +75396,6 @@ Schema.Struct({ threadId: ThreadId });
|
|
|
74982
75396
|
*/
|
|
74983
75397
|
var ProviderSessionRuntimeRepository = class extends Context.Service()("ryco/persistence/Services/ProviderSessionRuntime/ProviderSessionRuntimeRepository") {};
|
|
74984
75398
|
//#endregion
|
|
74985
|
-
//#region src/provider/Services/ProviderSessionDirectory.ts
|
|
74986
|
-
var ProviderSessionDirectory = class extends Context.Service()("ryco/provider/Services/ProviderSessionDirectory") {};
|
|
74987
|
-
//#endregion
|
|
74988
75399
|
//#region src/provider/Layers/ProviderSessionDirectory.ts
|
|
74989
75400
|
function toPersistenceError(operation) {
|
|
74990
75401
|
return (cause) => new ProviderSessionDirectoryPersistenceError({
|
|
@@ -75669,6 +76080,12 @@ const ProviderEventLoggersLive = Layer.effect(ProviderEventLoggers, Effect.gen(f
|
|
|
75669
76080
|
};
|
|
75670
76081
|
}));
|
|
75671
76082
|
//#endregion
|
|
76083
|
+
//#region ../../packages/shared/src/providerCapabilities.ts
|
|
76084
|
+
/** Drivers whose native turn API accepts arbitrary file bytes, not only images. */
|
|
76085
|
+
function providerSupportsGeneralFileAttachments(provider) {
|
|
76086
|
+
return provider === "copilot" || provider === "opencode";
|
|
76087
|
+
}
|
|
76088
|
+
//#endregion
|
|
75672
76089
|
//#region src/provider/Layers/ProviderService.ts
|
|
75673
76090
|
/**
|
|
75674
76091
|
* ProviderServiceLive - Cross-provider orchestration layer.
|
|
@@ -76215,6 +76632,8 @@ const makeProviderService = Effect.fn("makeProviderService")(function* (options)
|
|
|
76215
76632
|
});
|
|
76216
76633
|
metricProvider = routed.adapter.provider;
|
|
76217
76634
|
metricModel = input.modelSelection?.model;
|
|
76635
|
+
const unsupportedFile = input.attachments.find((attachment) => attachment.type === "file");
|
|
76636
|
+
if (unsupportedFile && !providerSupportsGeneralFileAttachments(routed.adapter.provider)) return yield* toValidationError("ProviderService.sendTurn", `Provider '${routed.adapter.provider}' does not accept general file attachments. Add '${unsupportedFile.name}' to the workspace and reference its path instead.`);
|
|
76218
76637
|
yield* Effect.annotateCurrentSpan({
|
|
76219
76638
|
"provider.kind": routed.adapter.provider,
|
|
76220
76639
|
...input.modelSelection?.model ? { "provider.model": input.modelSelection.model } : {}
|
|
@@ -76289,6 +76708,8 @@ const makeProviderService = Effect.fn("makeProviderService")(function* (options)
|
|
|
76289
76708
|
allowRecovery: false
|
|
76290
76709
|
});
|
|
76291
76710
|
if (!routed.isActive || routed.session === void 0) return yield* new ProviderSessionNotFoundError({ threadId: input.threadId });
|
|
76711
|
+
const unsupportedFile = input.attachments.find((attachment) => attachment.type === "file");
|
|
76712
|
+
if (unsupportedFile && !providerSupportsGeneralFileAttachments(routed.adapter.provider)) return yield* toValidationError("ProviderService.steerTurn", `Provider '${routed.adapter.provider}' does not accept general file attachments. Add '${unsupportedFile.name}' to the workspace and reference its path instead.`);
|
|
76292
76713
|
if (routed.session.activeTurnId !== input.expectedTurnId) return yield* toValidationError("ProviderService.steerTurn", `Expected active turn '${input.expectedTurnId}', found '${routed.session.activeTurnId ?? "none"}'.`);
|
|
76293
76714
|
const steer = routed.adapter.steerTurn;
|
|
76294
76715
|
if (routed.adapter.capabilities.turnSteering !== "native" || steer === void 0) return yield* toValidationError("ProviderService.steerTurn", `Provider '${routed.adapter.provider}' does not support active-turn steering.`);
|
|
@@ -76733,13 +77154,13 @@ function openCodeQuestionId(index, question) {
|
|
|
76733
77154
|
function toOpenCodeFileParts(input) {
|
|
76734
77155
|
const parts = [];
|
|
76735
77156
|
for (const attachment of input.attachments ?? []) {
|
|
76736
|
-
const
|
|
76737
|
-
if (!
|
|
77157
|
+
const attachmentUrl = input.resolveAttachmentUrl(attachment);
|
|
77158
|
+
if (!attachmentUrl) continue;
|
|
76738
77159
|
parts.push({
|
|
76739
77160
|
type: "file",
|
|
76740
77161
|
mime: attachment.mimeType,
|
|
76741
77162
|
filename: attachment.name,
|
|
76742
|
-
url:
|
|
77163
|
+
url: attachmentUrl
|
|
76743
77164
|
});
|
|
76744
77165
|
}
|
|
76745
77166
|
return parts;
|
|
@@ -77546,12 +77967,10 @@ const TERMINAL_ENV_BLOCKLIST = /* @__PURE__ */ new Set([
|
|
|
77546
77967
|
var TerminalSubprocessCheckError = class extends Schema.TaggedError()("TerminalSubprocessCheckError", {
|
|
77547
77968
|
message: Schema.String,
|
|
77548
77969
|
cause: Schema.optional(Schema.Defect()),
|
|
77549
|
-
|
|
77550
|
-
|
|
77551
|
-
|
|
77552
|
-
|
|
77553
|
-
"ps"
|
|
77554
|
-
])
|
|
77970
|
+
command: Schema.Literals(["powershell", "ps"]),
|
|
77971
|
+
exitCode: Schema.optional(Schema.NullOr(Schema.Number)),
|
|
77972
|
+
timedOut: Schema.optional(Schema.Boolean),
|
|
77973
|
+
stdoutTruncated: Schema.optional(Schema.Boolean)
|
|
77555
77974
|
}) {};
|
|
77556
77975
|
var TerminalProcessSignalError = class extends Schema.TaggedError()("TerminalProcessSignalError", {
|
|
77557
77976
|
message: Schema.String,
|
|
@@ -77771,81 +78190,90 @@ function isRetryableShellSpawnError(error) {
|
|
|
77771
78190
|
const message = messages.join(" ").toLowerCase();
|
|
77772
78191
|
return message.includes("posix_spawnp failed") || message.includes("enoent") || message.includes("not found") || message.includes("file not found") || message.includes("no such file");
|
|
77773
78192
|
}
|
|
77774
|
-
function
|
|
77775
|
-
const
|
|
77776
|
-
|
|
77777
|
-
|
|
77778
|
-
|
|
77779
|
-
|
|
77780
|
-
|
|
77781
|
-
|
|
77782
|
-
|
|
77783
|
-
|
|
77784
|
-
|
|
77785
|
-
|
|
77786
|
-
|
|
77787
|
-
|
|
77788
|
-
|
|
77789
|
-
|
|
77790
|
-
|
|
77791
|
-
|
|
77792
|
-
|
|
77793
|
-
|
|
77794
|
-
|
|
77795
|
-
|
|
77796
|
-
|
|
77797
|
-
|
|
77798
|
-
}
|
|
78193
|
+
function parsePosixProcessTable(stdout) {
|
|
78194
|
+
const childrenByParent = /* @__PURE__ */ new Map();
|
|
78195
|
+
for (const line of stdout.split(/\r?\n/g)) {
|
|
78196
|
+
const match = /^\s*(\d+)\s+(\d+)(?:\s|$)/.exec(line);
|
|
78197
|
+
if (!match) continue;
|
|
78198
|
+
const pid = Number(match[1]);
|
|
78199
|
+
const parentPid = Number(match[2]);
|
|
78200
|
+
if (!Number.isInteger(pid) || !Number.isInteger(parentPid)) continue;
|
|
78201
|
+
const children = childrenByParent.get(parentPid) ?? [];
|
|
78202
|
+
children.push(pid);
|
|
78203
|
+
childrenByParent.set(parentPid, children);
|
|
78204
|
+
}
|
|
78205
|
+
return { childrenByParent };
|
|
78206
|
+
}
|
|
78207
|
+
function parseWindowsProcessTable(stdout) {
|
|
78208
|
+
const childrenByParent = /* @__PURE__ */ new Map();
|
|
78209
|
+
for (const line of stdout.split(/\r?\n/g)) {
|
|
78210
|
+
const [pidRaw, parentPidRaw] = line.trim().split("|", 2);
|
|
78211
|
+
const pid = Number(pidRaw);
|
|
78212
|
+
const parentPid = Number(parentPidRaw);
|
|
78213
|
+
if (!Number.isInteger(pid) || !Number.isInteger(parentPid)) continue;
|
|
78214
|
+
const children = childrenByParent.get(parentPid) ?? [];
|
|
78215
|
+
children.push(pid);
|
|
78216
|
+
childrenByParent.set(parentPid, children);
|
|
78217
|
+
}
|
|
78218
|
+
return { childrenByParent };
|
|
77799
78219
|
}
|
|
77800
|
-
const
|
|
77801
|
-
|
|
77802
|
-
|
|
78220
|
+
const POSIX_PS_ABSOLUTE_PATHS = ["/bin/ps", "/usr/bin/ps"];
|
|
78221
|
+
const resolvePosixPsCommand = Effect.fn("terminal.resolvePosixPsCommand")(function* () {
|
|
78222
|
+
const fileSystem = yield* FileSystem.FileSystem;
|
|
78223
|
+
for (const candidate of POSIX_PS_ABSOLUTE_PATHS) if (yield* fileSystem.exists(candidate).pipe(Effect.orElseSucceed(() => false))) return candidate;
|
|
78224
|
+
return "ps";
|
|
78225
|
+
});
|
|
78226
|
+
const snapshotPosixProcessTable = Effect.fn("terminal.snapshotPosixProcessTable")(function* (psCommand) {
|
|
78227
|
+
const result = yield* Effect.tryPromise({
|
|
78228
|
+
try: () => runProcess(psCommand, ["-eo", "pid=,ppid="], {
|
|
77803
78229
|
timeoutMs: 1e3,
|
|
77804
78230
|
allowNonZeroExit: true,
|
|
77805
|
-
maxBufferBytes:
|
|
78231
|
+
maxBufferBytes: 524288,
|
|
77806
78232
|
outputMode: "truncate"
|
|
77807
78233
|
}),
|
|
77808
78234
|
catch: (cause) => new TerminalSubprocessCheckError({
|
|
77809
|
-
message: "Failed to
|
|
78235
|
+
message: "Failed to snapshot POSIX processes.",
|
|
77810
78236
|
cause,
|
|
77811
|
-
|
|
77812
|
-
command: "pgrep"
|
|
78237
|
+
command: "ps"
|
|
77813
78238
|
})
|
|
77814
78239
|
});
|
|
77815
|
-
|
|
77816
|
-
|
|
77817
|
-
|
|
78240
|
+
if (result.code !== 0 || result.timedOut || result.stdoutTruncated) return yield* new TerminalSubprocessCheckError({
|
|
78241
|
+
message: "POSIX process snapshot was incomplete.",
|
|
78242
|
+
command: "ps",
|
|
78243
|
+
exitCode: result.code,
|
|
78244
|
+
timedOut: result.timedOut,
|
|
78245
|
+
stdoutTruncated: result.stdoutTruncated
|
|
78246
|
+
});
|
|
78247
|
+
return parsePosixProcessTable(result.stdout);
|
|
78248
|
+
});
|
|
78249
|
+
const snapshotWindowsProcessTable = Effect.fn("terminal.snapshotWindowsProcessTable")(function* () {
|
|
78250
|
+
const command = ["$processes = Get-CimInstance Win32_Process -ErrorAction Stop", "foreach ($process in $processes) { Write-Output \"$($process.ProcessId)|$($process.ParentProcessId)\" }"].join("; ");
|
|
78251
|
+
const result = yield* Effect.tryPromise({
|
|
78252
|
+
try: () => runProcess("powershell.exe", [
|
|
78253
|
+
"-NoProfile",
|
|
78254
|
+
"-NonInteractive",
|
|
78255
|
+
"-Command",
|
|
78256
|
+
command
|
|
78257
|
+
], {
|
|
78258
|
+
timeoutMs: 1500,
|
|
77818
78259
|
allowNonZeroExit: true,
|
|
77819
|
-
maxBufferBytes:
|
|
78260
|
+
maxBufferBytes: 524288,
|
|
77820
78261
|
outputMode: "truncate"
|
|
77821
78262
|
}),
|
|
77822
78263
|
catch: (cause) => new TerminalSubprocessCheckError({
|
|
77823
|
-
message: "Failed to
|
|
78264
|
+
message: "Failed to snapshot Windows processes.",
|
|
77824
78265
|
cause,
|
|
77825
|
-
|
|
77826
|
-
command: "ps"
|
|
78266
|
+
command: "powershell"
|
|
77827
78267
|
})
|
|
77828
78268
|
});
|
|
77829
|
-
|
|
77830
|
-
|
|
77831
|
-
|
|
77832
|
-
|
|
77833
|
-
|
|
77834
|
-
|
|
77835
|
-
|
|
77836
|
-
|
|
77837
|
-
const [pidRaw, ppidRaw] = line.trim().split(/\s+/g);
|
|
77838
|
-
const pid = Number(pidRaw);
|
|
77839
|
-
const ppid = Number(ppidRaw);
|
|
77840
|
-
if (!Number.isInteger(pid) || !Number.isInteger(ppid)) continue;
|
|
77841
|
-
if (ppid === terminalPid) return true;
|
|
77842
|
-
}
|
|
77843
|
-
return false;
|
|
77844
|
-
});
|
|
77845
|
-
const defaultSubprocessChecker = Effect.fn("terminal.defaultSubprocessChecker")(function* (terminalPid) {
|
|
77846
|
-
if (!Number.isInteger(terminalPid) || terminalPid <= 0) return false;
|
|
77847
|
-
if (process.platform === "win32") return yield* checkWindowsSubprocessActivity(terminalPid);
|
|
77848
|
-
return yield* checkPosixSubprocessActivity(terminalPid);
|
|
78269
|
+
if (result.code !== 0 || result.timedOut || result.stdoutTruncated) return yield* new TerminalSubprocessCheckError({
|
|
78270
|
+
message: "Windows process snapshot was incomplete.",
|
|
78271
|
+
command: "powershell",
|
|
78272
|
+
exitCode: result.code,
|
|
78273
|
+
timedOut: result.timedOut,
|
|
78274
|
+
stdoutTruncated: result.stdoutTruncated
|
|
78275
|
+
});
|
|
78276
|
+
return parseWindowsProcessTable(result.stdout);
|
|
77849
78277
|
});
|
|
77850
78278
|
function capHistory(history, maxLines) {
|
|
77851
78279
|
if (history.length === 0) return history;
|
|
@@ -78037,7 +78465,8 @@ const makeTerminalManagerWithOptions = Effect.fn("makeTerminalManagerWithOptions
|
|
|
78037
78465
|
const platform = options.platform ?? process.platform;
|
|
78038
78466
|
const baseEnv = options.env ?? process.env;
|
|
78039
78467
|
const shellResolver = options.shellResolver ?? (() => defaultShellResolver(platform, baseEnv));
|
|
78040
|
-
const
|
|
78468
|
+
const posixPsCommand = options.processTableSnapshotter === void 0 && platform !== "win32" ? yield* resolvePosixPsCommand() : null;
|
|
78469
|
+
const processTableSnapshotter = options.processTableSnapshotter ?? (platform === "win32" ? snapshotWindowsProcessTable : () => snapshotPosixProcessTable(posixPsCommand ?? "ps"));
|
|
78041
78470
|
const subprocessPollIntervalMs = options.subprocessPollIntervalMs ?? DEFAULT_SUBPROCESS_POLL_INTERVAL_MS;
|
|
78042
78471
|
const processKillGraceMs = options.processKillGraceMs ?? DEFAULT_PROCESS_KILL_GRACE_MS;
|
|
78043
78472
|
const maxRetainedInactiveSessions = options.maxRetainedInactiveSessions ?? DEFAULT_MAX_RETAINED_INACTIVE_SESSIONS;
|
|
@@ -78528,26 +78957,22 @@ const makeTerminalManagerWithOptions = Effect.fn("makeTerminalManagerWithOptions
|
|
|
78528
78957
|
const pollSubprocessActivity = Effect.fn("terminal.pollSubprocessActivity")(function* () {
|
|
78529
78958
|
const runningSessions = [...(yield* readManagerState).sessions.values()].filter((session) => session.status === "running" && Number.isInteger(session.pid));
|
|
78530
78959
|
if (runningSessions.length === 0) return;
|
|
78960
|
+
const processTable = yield* processTableSnapshotter().pipe(Effect.map(Option.some), Effect.catch((reason) => Effect.logWarning("failed to snapshot processes for terminal subprocess polling", { reason }).pipe(Effect.as(Option.none()))));
|
|
78961
|
+
if (Option.isNone(processTable)) return;
|
|
78531
78962
|
const checkSubprocessActivity = Effect.fn("terminal.checkSubprocessActivity")(function* (session) {
|
|
78532
78963
|
const terminalPid = session.pid;
|
|
78533
|
-
const hasRunningSubprocess =
|
|
78534
|
-
threadId: session.threadId,
|
|
78535
|
-
terminalId: session.terminalId,
|
|
78536
|
-
terminalPid,
|
|
78537
|
-
reason
|
|
78538
|
-
}).pipe(Effect.as(Option.none()))));
|
|
78539
|
-
if (Option.isNone(hasRunningSubprocess)) return;
|
|
78964
|
+
const hasRunningSubprocess = (processTable.value.childrenByParent.get(terminalPid)?.length ?? 0) > 0;
|
|
78540
78965
|
const event = yield* modifyManagerState((state) => {
|
|
78541
78966
|
const liveSession = Option.fromNullishOr(state.sessions.get(toSessionKey(session.threadId, session.terminalId)));
|
|
78542
|
-
if (Option.isNone(liveSession) || liveSession.value.status !== "running" || liveSession.value.pid !== terminalPid || liveSession.value.hasRunningSubprocess === hasRunningSubprocess
|
|
78543
|
-
liveSession.value.hasRunningSubprocess = hasRunningSubprocess
|
|
78967
|
+
if (Option.isNone(liveSession) || liveSession.value.status !== "running" || liveSession.value.pid !== terminalPid || liveSession.value.hasRunningSubprocess === hasRunningSubprocess) return [Option.none(), state];
|
|
78968
|
+
liveSession.value.hasRunningSubprocess = hasRunningSubprocess;
|
|
78544
78969
|
liveSession.value.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
78545
78970
|
return [Option.some({
|
|
78546
78971
|
type: "activity",
|
|
78547
78972
|
threadId: liveSession.value.threadId,
|
|
78548
78973
|
terminalId: liveSession.value.terminalId,
|
|
78549
78974
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
78550
|
-
hasRunningSubprocess
|
|
78975
|
+
hasRunningSubprocess
|
|
78551
78976
|
}), state];
|
|
78552
78977
|
});
|
|
78553
78978
|
if (Option.isSome(event)) yield* publishEvent(event.value);
|
|
@@ -78855,20 +79280,6 @@ var ProviderCommandReactor = class extends Context.Service()("ryco/orchestration
|
|
|
78855
79280
|
*/
|
|
78856
79281
|
var ProviderRuntimeIngestionService = class extends Context.Service()("ryco/orchestration/Services/ProviderRuntimeIngestion/ProviderRuntimeIngestionService") {};
|
|
78857
79282
|
//#endregion
|
|
78858
|
-
//#region src/orchestration/Services/ThreadDeletionReactor.ts
|
|
78859
|
-
/**
|
|
78860
|
-
* ThreadDeletionReactor - Thread deletion cleanup reactor service interface.
|
|
78861
|
-
*
|
|
78862
|
-
* Owns background workers that react to thread deletion domain events and
|
|
78863
|
-
* perform best-effort runtime cleanup for provider sessions and terminals.
|
|
78864
|
-
*
|
|
78865
|
-
* @module ThreadDeletionReactor
|
|
78866
|
-
*/
|
|
78867
|
-
/**
|
|
78868
|
-
* ThreadDeletionReactor - Service tag for thread deletion cleanup workers.
|
|
78869
|
-
*/
|
|
78870
|
-
var ThreadDeletionReactor = class extends Context.Service()("ryco/orchestration/Services/ThreadDeletionReactor") {};
|
|
78871
|
-
//#endregion
|
|
78872
79283
|
//#region src/orchestration/Layers/OrchestrationReactor.ts
|
|
78873
79284
|
const makeOrchestrationReactor = Effect.gen(function* () {
|
|
78874
79285
|
const providerRuntimeIngestion = yield* ProviderRuntimeIngestionService;
|
|
@@ -79444,6 +79855,227 @@ function make$4() {
|
|
|
79444
79855
|
}
|
|
79445
79856
|
const layer = Layer.effect(ThreadBackgroundLivenessService, Effect.sync(make$4));
|
|
79446
79857
|
//#endregion
|
|
79858
|
+
//#region src/orchestration/ActivityPayloadProjection.ts
|
|
79859
|
+
function asRecord$1(value) {
|
|
79860
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
79861
|
+
}
|
|
79862
|
+
function asTrimmedString$1(value) {
|
|
79863
|
+
if (typeof value !== "string") return null;
|
|
79864
|
+
const trimmed = value.trim();
|
|
79865
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
79866
|
+
}
|
|
79867
|
+
function summarizeToolTextOutput(value) {
|
|
79868
|
+
const lines = [];
|
|
79869
|
+
for (const rawLine of value.split(/\r?\n/u)) {
|
|
79870
|
+
const line = rawLine.replace(/\s+/g, " ").trim();
|
|
79871
|
+
if (line.length > 0) lines.push(line);
|
|
79872
|
+
}
|
|
79873
|
+
const firstLine = lines.find((line) => line !== "```");
|
|
79874
|
+
if (firstLine) return firstLine.length <= 84 ? firstLine : `${firstLine.slice(0, 83).trimEnd()}…`;
|
|
79875
|
+
if (lines.length > 1) return `${lines.length.toLocaleString()} lines`;
|
|
79876
|
+
return null;
|
|
79877
|
+
}
|
|
79878
|
+
function pushChangedFile(target, seen, value) {
|
|
79879
|
+
const normalized = asTrimmedString$1(value);
|
|
79880
|
+
if (!normalized || seen.has(normalized)) return;
|
|
79881
|
+
seen.add(normalized);
|
|
79882
|
+
target.push(normalized);
|
|
79883
|
+
}
|
|
79884
|
+
function collectChangedFiles(value, target, seen, depth) {
|
|
79885
|
+
if (depth > 4 || target.length >= 12) return;
|
|
79886
|
+
if (Array.isArray(value)) {
|
|
79887
|
+
for (const entry of value) {
|
|
79888
|
+
collectChangedFiles(entry, target, seen, depth + 1);
|
|
79889
|
+
if (target.length >= 12) return;
|
|
79890
|
+
}
|
|
79891
|
+
return;
|
|
79892
|
+
}
|
|
79893
|
+
const record = asRecord$1(value);
|
|
79894
|
+
if (!record) return;
|
|
79895
|
+
pushChangedFile(target, seen, record.path);
|
|
79896
|
+
pushChangedFile(target, seen, record.filePath);
|
|
79897
|
+
pushChangedFile(target, seen, record.relativePath);
|
|
79898
|
+
pushChangedFile(target, seen, record.filename);
|
|
79899
|
+
pushChangedFile(target, seen, record.newPath);
|
|
79900
|
+
pushChangedFile(target, seen, record.oldPath);
|
|
79901
|
+
for (const nestedKey of [
|
|
79902
|
+
"item",
|
|
79903
|
+
"result",
|
|
79904
|
+
"input",
|
|
79905
|
+
"data",
|
|
79906
|
+
"changes",
|
|
79907
|
+
"files",
|
|
79908
|
+
"edits",
|
|
79909
|
+
"patch",
|
|
79910
|
+
"patches",
|
|
79911
|
+
"operations"
|
|
79912
|
+
]) {
|
|
79913
|
+
if (!(nestedKey in record)) continue;
|
|
79914
|
+
collectChangedFiles(record[nestedKey], target, seen, depth + 1);
|
|
79915
|
+
if (target.length >= 12) return;
|
|
79916
|
+
}
|
|
79917
|
+
}
|
|
79918
|
+
function projectCommandData(data) {
|
|
79919
|
+
const item = asRecord$1(data.item);
|
|
79920
|
+
if (!item) return;
|
|
79921
|
+
const projectedItem = {};
|
|
79922
|
+
if ("command" in item) projectedItem.command = item.command;
|
|
79923
|
+
const aggregatedOutput = asTrimmedString$1(item.aggregatedOutput);
|
|
79924
|
+
if (aggregatedOutput) {
|
|
79925
|
+
const summary = summarizeToolTextOutput(aggregatedOutput);
|
|
79926
|
+
if (summary) projectedItem.aggregatedOutput = summary;
|
|
79927
|
+
}
|
|
79928
|
+
const input = asRecord$1(item.input);
|
|
79929
|
+
if (input && "command" in input) projectedItem.input = { command: input.command };
|
|
79930
|
+
const result = asRecord$1(item.result);
|
|
79931
|
+
if (result) {
|
|
79932
|
+
const projectedResult = {};
|
|
79933
|
+
if ("command" in result) projectedResult.command = result.command;
|
|
79934
|
+
const content = asTrimmedString$1(result.content);
|
|
79935
|
+
if (content) {
|
|
79936
|
+
const summary = summarizeToolTextOutput(content);
|
|
79937
|
+
if (summary) projectedResult.content = summary;
|
|
79938
|
+
}
|
|
79939
|
+
if (Object.keys(projectedResult).length > 0) projectedItem.result = projectedResult;
|
|
79940
|
+
}
|
|
79941
|
+
return Object.keys(projectedItem).length > 0 ? projectedItem : void 0;
|
|
79942
|
+
}
|
|
79943
|
+
function projectCommandValue(data) {
|
|
79944
|
+
if (data.command !== void 0) return data.command;
|
|
79945
|
+
const input = asRecord$1(data.input);
|
|
79946
|
+
if (input?.command !== void 0) return input.command;
|
|
79947
|
+
const stateInput = asRecord$1(asRecord$1(data.state)?.input);
|
|
79948
|
+
if (stateInput?.command !== void 0) return stateInput.command;
|
|
79949
|
+
}
|
|
79950
|
+
const MCP_ITEM_KEPT_FIELDS = [
|
|
79951
|
+
"type",
|
|
79952
|
+
"id",
|
|
79953
|
+
"tool",
|
|
79954
|
+
"server",
|
|
79955
|
+
"status",
|
|
79956
|
+
"arguments",
|
|
79957
|
+
"appContext",
|
|
79958
|
+
"error",
|
|
79959
|
+
"durationMs"
|
|
79960
|
+
];
|
|
79961
|
+
function extractMcpResultText(result) {
|
|
79962
|
+
const record = asRecord$1(result);
|
|
79963
|
+
if (!record) return typeof result === "string" ? result : null;
|
|
79964
|
+
if (typeof record.content === "string") return record.content;
|
|
79965
|
+
if (Array.isArray(record.content)) {
|
|
79966
|
+
const texts = [];
|
|
79967
|
+
for (const entry of record.content) {
|
|
79968
|
+
const text = asRecord$1(entry)?.text;
|
|
79969
|
+
if (typeof text === "string" && text.trim().length > 0) texts.push(text);
|
|
79970
|
+
}
|
|
79971
|
+
if (texts.length > 0) return texts.join("\n");
|
|
79972
|
+
}
|
|
79973
|
+
return null;
|
|
79974
|
+
}
|
|
79975
|
+
function summarizeMcpResult(result) {
|
|
79976
|
+
if (result === void 0 || result === null) return;
|
|
79977
|
+
const text = extractMcpResultText(result);
|
|
79978
|
+
const summary = text ? summarizeToolTextOutput(text) : null;
|
|
79979
|
+
return summary ? { content: summary } : void 0;
|
|
79980
|
+
}
|
|
79981
|
+
function projectMcpToolCallData(data) {
|
|
79982
|
+
const projectedData = {};
|
|
79983
|
+
const item = asRecord$1(data.item);
|
|
79984
|
+
if (item) {
|
|
79985
|
+
const projectedItem = {};
|
|
79986
|
+
for (const key of MCP_ITEM_KEPT_FIELDS) if (key in item) projectedItem[key] = item[key];
|
|
79987
|
+
const result = summarizeMcpResult(item.result);
|
|
79988
|
+
if (result) projectedItem.result = result;
|
|
79989
|
+
projectedData.item = projectedItem;
|
|
79990
|
+
}
|
|
79991
|
+
if ("toolName" in data) projectedData.toolName = data.toolName;
|
|
79992
|
+
if ("input" in data) projectedData.input = data.input;
|
|
79993
|
+
if (!item) {
|
|
79994
|
+
const result = summarizeMcpResult(data.result);
|
|
79995
|
+
if (result) projectedData.result = result;
|
|
79996
|
+
}
|
|
79997
|
+
if ("toolCallId" in data) projectedData.toolCallId = data.toolCallId;
|
|
79998
|
+
if ("kind" in data) projectedData.kind = data.kind;
|
|
79999
|
+
const changedFiles = [];
|
|
80000
|
+
collectChangedFiles(data, changedFiles, /* @__PURE__ */ new Set(), 0);
|
|
80001
|
+
if (changedFiles.length > 0) projectedData.files = changedFiles.map((path) => ({ path }));
|
|
80002
|
+
return projectedData;
|
|
80003
|
+
}
|
|
80004
|
+
function projectRawOutput(value) {
|
|
80005
|
+
const direct = asTrimmedString$1(value);
|
|
80006
|
+
if (direct) {
|
|
80007
|
+
const summary = summarizeToolTextOutput(direct);
|
|
80008
|
+
return summary ? { content: summary } : void 0;
|
|
80009
|
+
}
|
|
80010
|
+
const rawOutput = asRecord$1(value);
|
|
80011
|
+
if (!rawOutput) return;
|
|
80012
|
+
if (typeof rawOutput.totalFiles === "number" && Number.isFinite(rawOutput.totalFiles)) return {
|
|
80013
|
+
totalFiles: rawOutput.totalFiles,
|
|
80014
|
+
...rawOutput.truncated === true ? { truncated: true } : {}
|
|
80015
|
+
};
|
|
80016
|
+
for (const key of [
|
|
80017
|
+
"content",
|
|
80018
|
+
"stdout",
|
|
80019
|
+
"stderr"
|
|
80020
|
+
]) {
|
|
80021
|
+
const output = asTrimmedString$1(rawOutput[key]);
|
|
80022
|
+
if (!output) continue;
|
|
80023
|
+
const summary = summarizeToolTextOutput(output);
|
|
80024
|
+
return summary ? { content: summary } : void 0;
|
|
80025
|
+
}
|
|
80026
|
+
}
|
|
80027
|
+
function projectAcpContent(value) {
|
|
80028
|
+
if (!Array.isArray(value)) return;
|
|
80029
|
+
const summary = summarizeToolTextOutput(value.map((entryValue) => {
|
|
80030
|
+
const entry = asRecord$1(entryValue);
|
|
80031
|
+
const content = asRecord$1(entry?.content);
|
|
80032
|
+
return entry?.type === "content" && content?.type === "text" ? asTrimmedString$1(content.text) : null;
|
|
80033
|
+
}).filter((entry) => entry !== null).join("\n"));
|
|
80034
|
+
return summary ? { content: summary } : void 0;
|
|
80035
|
+
}
|
|
80036
|
+
/**
|
|
80037
|
+
* Projects provider-specific tool data to the fields shared clients consume.
|
|
80038
|
+
* The result is safe to persist for cumulative streaming updates: unbounded
|
|
80039
|
+
* tool output is reduced to a one-line summary while identity, command, and
|
|
80040
|
+
* changed-file metadata remain available to every client.
|
|
80041
|
+
*/
|
|
80042
|
+
function projectActivityPayload(activity) {
|
|
80043
|
+
const payload = asRecord$1(activity.payload);
|
|
80044
|
+
const data = asRecord$1(payload?.data);
|
|
80045
|
+
if (!payload || !data) return activity;
|
|
80046
|
+
const itemStatus = asRecord$1(data.item)?.status;
|
|
80047
|
+
const projectedPayload = payload.status === "completed" && (itemStatus === "failed" || itemStatus === "declined") ? {
|
|
80048
|
+
...payload,
|
|
80049
|
+
status: itemStatus
|
|
80050
|
+
} : payload;
|
|
80051
|
+
if (payload.itemType === "mcp_tool_call") return {
|
|
80052
|
+
...activity,
|
|
80053
|
+
payload: {
|
|
80054
|
+
...projectedPayload,
|
|
80055
|
+
data: projectMcpToolCallData(data)
|
|
80056
|
+
}
|
|
80057
|
+
};
|
|
80058
|
+
const projectedData = {};
|
|
80059
|
+
const item = projectCommandData(data);
|
|
80060
|
+
if (item) projectedData.item = item;
|
|
80061
|
+
const command = projectCommandValue(data);
|
|
80062
|
+
if (command !== void 0) projectedData.command = command;
|
|
80063
|
+
const changedFiles = [];
|
|
80064
|
+
collectChangedFiles(data, changedFiles, /* @__PURE__ */ new Set(), 0);
|
|
80065
|
+
if (changedFiles.length > 0) projectedData.files = changedFiles.map((path) => ({ path }));
|
|
80066
|
+
if ("toolCallId" in data) projectedData.toolCallId = data.toolCallId;
|
|
80067
|
+
if ("kind" in data) projectedData.kind = data.kind;
|
|
80068
|
+
const rawOutput = projectRawOutput(data.rawOutput) ?? projectAcpContent(data.content);
|
|
80069
|
+
if (rawOutput) projectedData.rawOutput = rawOutput;
|
|
80070
|
+
return {
|
|
80071
|
+
...activity,
|
|
80072
|
+
payload: {
|
|
80073
|
+
...projectedPayload,
|
|
80074
|
+
data: projectedData
|
|
80075
|
+
}
|
|
80076
|
+
};
|
|
80077
|
+
}
|
|
80078
|
+
//#endregion
|
|
79447
80079
|
//#region src/orchestration/Layers/ProviderRuntimeIngestion.ts
|
|
79448
80080
|
const providerTurnKey = (threadId, turnId) => `${threadId}:${turnId}`;
|
|
79449
80081
|
const providerTaskKey = (threadId, taskId) => `${threadId}:${taskId}`;
|
|
@@ -79961,7 +80593,7 @@ function runtimeEventToActivities(event, taskTitle) {
|
|
|
79961
80593
|
}
|
|
79962
80594
|
case "item.updated":
|
|
79963
80595
|
if (!isToolLifecycleItemType(event.payload.itemType)) return [];
|
|
79964
|
-
return [{
|
|
80596
|
+
return [projectActivityPayload({
|
|
79965
80597
|
id: event.eventId,
|
|
79966
80598
|
createdAt: event.createdAt,
|
|
79967
80599
|
tone: "tool",
|
|
@@ -79979,7 +80611,7 @@ function runtimeEventToActivities(event, taskTitle) {
|
|
|
79979
80611
|
},
|
|
79980
80612
|
turnId: toTurnId$1(event.turnId) ?? null,
|
|
79981
80613
|
...maybeSequence
|
|
79982
|
-
}];
|
|
80614
|
+
})];
|
|
79983
80615
|
case "item.completed":
|
|
79984
80616
|
if (!isToolLifecycleItemType(event.payload.itemType)) return [];
|
|
79985
80617
|
return [{
|
|
@@ -80955,6 +81587,15 @@ const HANDLED_TURN_START_KEY_TTL = Duration.minutes(30);
|
|
|
80955
81587
|
const DEFAULT_RUNTIME_MODE = "full-access";
|
|
80956
81588
|
const DEFAULT_TOKEN_MODE = DEFAULT_AGENT_TOKEN_MODE;
|
|
80957
81589
|
const DEFAULT_THREAD_TITLE = "New thread";
|
|
81590
|
+
function pathEntryExists(targetPath) {
|
|
81591
|
+
try {
|
|
81592
|
+
lstatSync(targetPath);
|
|
81593
|
+
return true;
|
|
81594
|
+
} catch (error) {
|
|
81595
|
+
if (error.code === "ENOENT") return false;
|
|
81596
|
+
throw error;
|
|
81597
|
+
}
|
|
81598
|
+
}
|
|
80958
81599
|
function providerErrorLabel(value) {
|
|
80959
81600
|
const normalized = value?.trim();
|
|
80960
81601
|
return normalized && normalized.length > 0 ? normalized : "unknown";
|
|
@@ -80976,10 +81617,10 @@ function isUnknownPendingApprovalRequestError(cause) {
|
|
|
80976
81617
|
const error = findProviderAdapterRequestError(cause);
|
|
80977
81618
|
if (error) {
|
|
80978
81619
|
const detail = error.detail.toLowerCase();
|
|
80979
|
-
return detail.includes("unknown pending approval request") || detail.includes("unknown pending permission request");
|
|
81620
|
+
return detail.includes("unknown pending approval request") || detail.includes("unknown pending permission request") || detail.includes("unknown pending codex approval request");
|
|
80980
81621
|
}
|
|
80981
|
-
const message = Cause.pretty(cause);
|
|
80982
|
-
return message.includes("unknown pending approval request") || message.includes("unknown pending permission request");
|
|
81622
|
+
const message = Cause.pretty(cause).toLowerCase();
|
|
81623
|
+
return message.includes("unknown pending approval request") || message.includes("unknown pending permission request") || message.includes("unknown pending codex approval request");
|
|
80983
81624
|
}
|
|
80984
81625
|
function isUnknownPendingUserInputRequestError(cause) {
|
|
80985
81626
|
const error = findProviderAdapterRequestError(cause);
|
|
@@ -81063,9 +81704,64 @@ const make$2 = Effect.gen(function* () {
|
|
|
81063
81704
|
const resolveThread = Effect.fnUntraced(function* (threadId) {
|
|
81064
81705
|
return yield* projectionSnapshotQuery.getThreadDetailById(threadId).pipe(Effect.map(Option.getOrUndefined));
|
|
81065
81706
|
});
|
|
81707
|
+
const ensureRecordedWorktreeAvailable = Effect.fn("ensureRecordedWorktreeAvailable")(function* (thread, project) {
|
|
81708
|
+
if (thread.worktreePath === null) return;
|
|
81709
|
+
if (!project) return yield* new ProviderAdapterRequestError({
|
|
81710
|
+
provider: providerErrorLabel(String(thread.modelSelection.instanceId)),
|
|
81711
|
+
method: "thread.turn.start",
|
|
81712
|
+
detail: `Cannot verify worktree '${thread.worktreePath}' because project '${thread.projectId}' is unavailable.`
|
|
81713
|
+
});
|
|
81714
|
+
const repositoryRoot = path.resolve(project.workspaceRoot);
|
|
81715
|
+
const worktreePath = path.resolve(thread.worktreePath);
|
|
81716
|
+
if (worktreePath === repositoryRoot) return;
|
|
81717
|
+
const registeredWorktreePaths = () => gitWorkflow.listWorktreePaths(repositoryRoot).pipe(Effect.map((paths) => paths.map((entry) => path.resolve(entry))));
|
|
81718
|
+
const failRecovery = (detail) => new ProviderAdapterRequestError({
|
|
81719
|
+
provider: providerErrorLabel(String(thread.modelSelection.instanceId)),
|
|
81720
|
+
method: "thread.turn.start",
|
|
81721
|
+
detail
|
|
81722
|
+
});
|
|
81723
|
+
if (pathEntryExists(worktreePath)) {
|
|
81724
|
+
if (!(yield* registeredWorktreePaths()).includes(worktreePath)) return yield* failRecovery(`Refusing to use '${worktreePath}' because it exists but is not a registered worktree for '${repositoryRoot}'.`);
|
|
81725
|
+
return;
|
|
81726
|
+
}
|
|
81727
|
+
const branch = thread.branch;
|
|
81728
|
+
if (branch === null) return yield* failRecovery(`Cannot recreate missing worktree '${worktreePath}' because the thread has no recorded branch.`);
|
|
81729
|
+
if (!(yield* gitWorkflow.listLocalBranchNames(repositoryRoot)).includes(branch)) return yield* failRecovery(`Cannot recreate missing worktree '${worktreePath}' because branch '${branch}' no longer exists.`);
|
|
81730
|
+
yield* gitWorkflow.pruneWorktrees(repositoryRoot);
|
|
81731
|
+
if (pathEntryExists(worktreePath)) {
|
|
81732
|
+
if ((yield* registeredWorktreePaths()).includes(worktreePath)) return;
|
|
81733
|
+
return yield* failRecovery(`Refusing to recreate worktree '${worktreePath}' because another filesystem entry now occupies that path.`);
|
|
81734
|
+
}
|
|
81735
|
+
const recreated = yield* gitWorkflow.createWorktree({
|
|
81736
|
+
cwd: repositoryRoot,
|
|
81737
|
+
path: worktreePath,
|
|
81738
|
+
refName: branch,
|
|
81739
|
+
dependencyHydration: "none"
|
|
81740
|
+
});
|
|
81741
|
+
if (path.resolve(recreated.worktree.path) !== worktreePath || recreated.worktree.refName !== branch) return yield* failRecovery(`Worktree recovery returned unexpected metadata for '${worktreePath}' and branch '${branch}'.`);
|
|
81742
|
+
const changedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
81743
|
+
yield* orchestrationEngine.dispatch({
|
|
81744
|
+
type: "thread.meta.update",
|
|
81745
|
+
commandId: serverCommandId$2("worktree-recovered"),
|
|
81746
|
+
threadId: thread.id,
|
|
81747
|
+
branch,
|
|
81748
|
+
worktreePath
|
|
81749
|
+
});
|
|
81750
|
+
if (thread.worktreeId !== void 0 && thread.worktreeId !== null) yield* orchestrationEngine.dispatch({
|
|
81751
|
+
type: "worktree.meta.update",
|
|
81752
|
+
commandId: serverCommandId$2("worktree-recovered-meta"),
|
|
81753
|
+
worktreeId: thread.worktreeId,
|
|
81754
|
+
branch,
|
|
81755
|
+
changedAt
|
|
81756
|
+
});
|
|
81757
|
+
yield* gitWorkflow.invalidateStatus(worktreePath);
|
|
81758
|
+
yield* vcsStatusBroadcaster.refreshStatus(worktreePath).pipe(Effect.ignoreCause({ log: true }));
|
|
81759
|
+
});
|
|
81066
81760
|
const ensureSessionForThread = Effect.fn("ensureSessionForThread")(function* (threadId, createdAt, options) {
|
|
81067
81761
|
const thread = yield* resolveThread(threadId);
|
|
81068
81762
|
if (!thread) return yield* Effect.die(/* @__PURE__ */ new Error(`Thread '${threadId}' was not found in read model.`));
|
|
81763
|
+
const project = yield* resolveProject(thread.projectId);
|
|
81764
|
+
yield* ensureRecordedWorktreeAvailable(thread, project);
|
|
81069
81765
|
const desiredRuntimeMode = thread.runtimeMode;
|
|
81070
81766
|
const desiredTokenMode = thread.tokenMode ?? DEFAULT_TOKEN_MODE;
|
|
81071
81767
|
const requestedModelSelection = options?.modelSelection;
|
|
@@ -81113,7 +81809,6 @@ const make$2 = Effect.gen(function* () {
|
|
|
81113
81809
|
detail: `Thread '${threadId}' cannot switch from instance '${currentInstanceId}' to '${desiredInstanceId}' because their provider resume state is incompatible.`
|
|
81114
81810
|
});
|
|
81115
81811
|
}
|
|
81116
|
-
const project = yield* resolveProject(thread.projectId);
|
|
81117
81812
|
const effectiveCwd = resolveThreadWorkspaceCwd({
|
|
81118
81813
|
thread,
|
|
81119
81814
|
projects: project ? [project] : []
|
|
@@ -81346,34 +82041,7 @@ const make$2 = Effect.gen(function* () {
|
|
|
81346
82041
|
});
|
|
81347
82042
|
return;
|
|
81348
82043
|
}
|
|
81349
|
-
|
|
81350
|
-
yield* contextHandoffCoordinator.processTurnStart(event);
|
|
81351
|
-
return;
|
|
81352
|
-
}
|
|
81353
|
-
if (thread.messages.filter((entry) => entry.role === "user").length === 1) {
|
|
81354
|
-
const project = yield* resolveProject(thread.projectId);
|
|
81355
|
-
const generationCwd = resolveThreadWorkspaceCwd({
|
|
81356
|
-
thread,
|
|
81357
|
-
projects: project ? [project] : []
|
|
81358
|
-
}) ?? process.cwd();
|
|
81359
|
-
const generationInput = {
|
|
81360
|
-
messageText: message.text,
|
|
81361
|
-
...message.attachments !== void 0 ? { attachments: message.attachments } : {},
|
|
81362
|
-
...event.payload.titleSeed !== void 0 ? { titleSeed: event.payload.titleSeed } : {}
|
|
81363
|
-
};
|
|
81364
|
-
yield* maybeGenerateAndRenameWorktreeBranchForFirstTurn({
|
|
81365
|
-
threadId: event.payload.threadId,
|
|
81366
|
-
branch: thread.branch,
|
|
81367
|
-
worktreePath: thread.worktreePath,
|
|
81368
|
-
worktreeId: thread.worktreeId ?? null,
|
|
81369
|
-
...generationInput
|
|
81370
|
-
}).pipe(Effect.forkScoped);
|
|
81371
|
-
if (canReplaceThreadTitle(thread.title, event.payload.titleSeed)) yield* maybeGenerateThreadTitleForFirstTurn({
|
|
81372
|
-
threadId: event.payload.threadId,
|
|
81373
|
-
cwd: generationCwd,
|
|
81374
|
-
...generationInput
|
|
81375
|
-
}).pipe(Effect.forkScoped);
|
|
81376
|
-
}
|
|
82044
|
+
const isFirstUserMessageTurn = thread.messages.filter((entry) => entry.role === "user").length === 1;
|
|
81377
82045
|
const handleTurnStartFailure = (cause) => {
|
|
81378
82046
|
if (Cause.hasInterruptsOnly(cause)) return Effect.void;
|
|
81379
82047
|
const detail = formatFailureDetail(cause);
|
|
@@ -81396,6 +82064,12 @@ const make$2 = Effect.gen(function* () {
|
|
|
81396
82064
|
cause: Cause.pretty(recoveryCause),
|
|
81397
82065
|
originalCause: Cause.pretty(cause)
|
|
81398
82066
|
})));
|
|
82067
|
+
if (event.payload.contextHandoff !== void 0) {
|
|
82068
|
+
const project = yield* resolveProject(thread.projectId);
|
|
82069
|
+
if (!(yield* ensureRecordedWorktreeAvailable(thread, project).pipe(Effect.as(true), Effect.catchCause((cause) => handleTurnStartFailure(cause).pipe(Effect.as(false)))))) return;
|
|
82070
|
+
yield* contextHandoffCoordinator.processTurnStart(event);
|
|
82071
|
+
return;
|
|
82072
|
+
}
|
|
81399
82073
|
const sendTurnRequest = yield* buildSendTurnRequestForThread({
|
|
81400
82074
|
threadId: event.payload.threadId,
|
|
81401
82075
|
messageText: message.text,
|
|
@@ -81406,6 +82080,30 @@ const make$2 = Effect.gen(function* () {
|
|
|
81406
82080
|
createdAt: event.payload.createdAt
|
|
81407
82081
|
}).pipe(Effect.map(Option.some), Effect.catchCause((cause) => handleTurnStartFailure(cause).pipe(Effect.as(Option.none()))));
|
|
81408
82082
|
if (Option.isNone(sendTurnRequest)) return;
|
|
82083
|
+
if (isFirstUserMessageTurn) {
|
|
82084
|
+
const project = yield* resolveProject(thread.projectId);
|
|
82085
|
+
const generationCwd = resolveThreadWorkspaceCwd({
|
|
82086
|
+
thread,
|
|
82087
|
+
projects: project ? [project] : []
|
|
82088
|
+
}) ?? process.cwd();
|
|
82089
|
+
const generationInput = {
|
|
82090
|
+
messageText: message.text,
|
|
82091
|
+
...message.attachments !== void 0 ? { attachments: message.attachments } : {},
|
|
82092
|
+
...event.payload.titleSeed !== void 0 ? { titleSeed: event.payload.titleSeed } : {}
|
|
82093
|
+
};
|
|
82094
|
+
yield* maybeGenerateAndRenameWorktreeBranchForFirstTurn({
|
|
82095
|
+
threadId: event.payload.threadId,
|
|
82096
|
+
branch: thread.branch,
|
|
82097
|
+
worktreePath: thread.worktreePath,
|
|
82098
|
+
worktreeId: thread.worktreeId ?? null,
|
|
82099
|
+
...generationInput
|
|
82100
|
+
}).pipe(Effect.forkScoped);
|
|
82101
|
+
if (canReplaceThreadTitle(thread.title, event.payload.titleSeed)) yield* maybeGenerateThreadTitleForFirstTurn({
|
|
82102
|
+
threadId: event.payload.threadId,
|
|
82103
|
+
cwd: generationCwd,
|
|
82104
|
+
...generationInput
|
|
82105
|
+
}).pipe(Effect.forkScoped);
|
|
82106
|
+
}
|
|
81409
82107
|
const commitAcceptedModelSelection = event.payload.modelSelection !== void 0 && !Equal.equals(thread.modelSelection, event.payload.modelSelection) ? orchestrationEngine.dispatch({
|
|
81410
82108
|
type: "thread.meta.update",
|
|
81411
82109
|
commandId: serverCommandId$2("accepted-model-selection"),
|
|
@@ -81418,7 +82116,8 @@ const make$2 = Effect.gen(function* () {
|
|
|
81418
82116
|
if (isProviderOriginatedCommandId(event.commandId)) return;
|
|
81419
82117
|
const thread = yield* resolveThread(event.payload.threadId);
|
|
81420
82118
|
if (!thread) return;
|
|
81421
|
-
|
|
82119
|
+
const session = thread.session;
|
|
82120
|
+
if (!session || session.status === "stopped") return yield* appendProviderFailureActivity({
|
|
81422
82121
|
threadId: event.payload.threadId,
|
|
81423
82122
|
kind: "provider.turn.interrupt.failed",
|
|
81424
82123
|
summary: "Provider turn interrupt failed",
|
|
@@ -81426,7 +82125,41 @@ const make$2 = Effect.gen(function* () {
|
|
|
81426
82125
|
turnId: event.payload.turnId ?? null,
|
|
81427
82126
|
createdAt: event.payload.createdAt
|
|
81428
82127
|
});
|
|
81429
|
-
|
|
82128
|
+
const recoverInterruptFailure = (cause) => {
|
|
82129
|
+
if (Cause.hasInterruptsOnly(cause)) return Effect.interrupt;
|
|
82130
|
+
const detail = formatFailureDetail(cause);
|
|
82131
|
+
return Effect.gen(function* () {
|
|
82132
|
+
const latestSession = (yield* resolveThread(event.payload.threadId))?.session;
|
|
82133
|
+
if (!latestSession || latestSession.status === "stopped" || latestSession.status === "ready" || latestSession.activeTurnId === null || event.payload.turnId !== void 0 && latestSession.activeTurnId !== event.payload.turnId) return;
|
|
82134
|
+
yield* providerService.stopSession({ threadId: event.payload.threadId }).pipe(Effect.catchCause((stopCause) => Cause.hasInterruptsOnly(stopCause) ? Effect.interrupt : Effect.logWarning("provider command reactor failed to stop session after interrupt failure", {
|
|
82135
|
+
threadId: event.payload.threadId,
|
|
82136
|
+
cause: Cause.pretty(stopCause),
|
|
82137
|
+
originalCause: Cause.pretty(cause)
|
|
82138
|
+
})));
|
|
82139
|
+
const stoppedSession = (yield* resolveThread(event.payload.threadId))?.session;
|
|
82140
|
+
if (!stoppedSession || stoppedSession.status === "stopped" || stoppedSession.status === "ready" || stoppedSession.activeTurnId === null || event.payload.turnId !== void 0 && stoppedSession.activeTurnId !== event.payload.turnId) return;
|
|
82141
|
+
yield* setThreadSession({
|
|
82142
|
+
threadId: event.payload.threadId,
|
|
82143
|
+
session: {
|
|
82144
|
+
...stoppedSession,
|
|
82145
|
+
status: "stopped",
|
|
82146
|
+
activeTurnId: null,
|
|
82147
|
+
lastError: detail,
|
|
82148
|
+
updatedAt: event.payload.createdAt
|
|
82149
|
+
},
|
|
82150
|
+
createdAt: event.payload.createdAt
|
|
82151
|
+
});
|
|
82152
|
+
yield* appendProviderFailureActivity({
|
|
82153
|
+
threadId: event.payload.threadId,
|
|
82154
|
+
kind: "provider.turn.interrupt.failed",
|
|
82155
|
+
summary: "Provider turn interrupt failed",
|
|
82156
|
+
detail,
|
|
82157
|
+
turnId: event.payload.turnId ?? null,
|
|
82158
|
+
createdAt: event.payload.createdAt
|
|
82159
|
+
});
|
|
82160
|
+
});
|
|
82161
|
+
};
|
|
82162
|
+
yield* providerService.interruptTurn({ threadId: event.payload.threadId }).pipe(Effect.catchCause(recoverInterruptFailure));
|
|
81430
82163
|
});
|
|
81431
82164
|
const processGoalUpdated = Effect.fn("processGoalUpdated")(function* (event) {
|
|
81432
82165
|
if (event.payload.origin !== "client") return;
|
|
@@ -83218,14 +83951,17 @@ const make = Effect.gen(function* () {
|
|
|
83218
83951
|
}),
|
|
83219
83952
|
process: processThreadDeletedSafely
|
|
83220
83953
|
});
|
|
83954
|
+
const seenSequence = yield* SubscriptionRef.make(0);
|
|
83955
|
+
const noteSeen = (sequence) => SubscriptionRef.update(seenSequence, (seen) => Math.max(seen, sequence));
|
|
83221
83956
|
return {
|
|
83222
83957
|
start: Effect.fn("start")(function* () {
|
|
83223
|
-
yield*
|
|
83224
|
-
|
|
83225
|
-
return worker.enqueue(event);
|
|
83226
|
-
}));
|
|
83958
|
+
const subscription = yield* orchestrationEngine.subscribeDomainEvents;
|
|
83959
|
+
yield* Effect.forkScoped(Stream.runForEach(Stream.fromSubscription(subscription), (event) => (event.type === "thread.deleted" ? worker.enqueue(event) : Effect.void).pipe(Effect.andThen(noteSeen(event.sequence)))));
|
|
83227
83960
|
}),
|
|
83228
|
-
|
|
83961
|
+
drainThrough: Effect.fn("ThreadDeletionReactor.drainThrough")(function* (targetSequence) {
|
|
83962
|
+
yield* SubscriptionRef.changes(seenSequence).pipe(Stream.filter((seen) => seen >= targetSequence), Stream.runHead);
|
|
83963
|
+
yield* worker.drain;
|
|
83964
|
+
})
|
|
83229
83965
|
};
|
|
83230
83966
|
});
|
|
83231
83967
|
const ThreadDeletionReactorLive = Layer.effect(ThreadDeletionReactor, make);
|
|
@@ -97543,6 +98279,12 @@ const OrchestrationEventPersistedRowSchema = Schema.Struct({
|
|
|
97543
98279
|
payload: UnknownFromJsonString,
|
|
97544
98280
|
metadata: EventMetadataFromJsonString
|
|
97545
98281
|
});
|
|
98282
|
+
const HasEventAfterRequestSchema = Schema.Struct({
|
|
98283
|
+
aggregateKind: OrchestrationAggregateKind,
|
|
98284
|
+
aggregateId: Schema.String,
|
|
98285
|
+
type: OrchestrationEventType,
|
|
98286
|
+
sequenceExclusive: NonNegativeInt
|
|
98287
|
+
});
|
|
97546
98288
|
const ReadFromSequenceRequestSchema = Schema.Struct({
|
|
97547
98289
|
sequenceExclusive: NonNegativeInt,
|
|
97548
98290
|
limit: Schema.Number
|
|
@@ -97656,6 +98398,20 @@ const makeEventStore = Effect.gen(function* () {
|
|
|
97656
98398
|
ORDER BY sequence DESC
|
|
97657
98399
|
LIMIT ${limit}
|
|
97658
98400
|
`
|
|
98401
|
+
});
|
|
98402
|
+
const findEventAfter = SqlSchema.findOneOption({
|
|
98403
|
+
Request: HasEventAfterRequestSchema,
|
|
98404
|
+
Result: Schema.Struct({ sequence: NonNegativeInt }),
|
|
98405
|
+
execute: (request) => sql`
|
|
98406
|
+
SELECT sequence
|
|
98407
|
+
FROM orchestration_events
|
|
98408
|
+
WHERE aggregate_kind = ${request.aggregateKind}
|
|
98409
|
+
AND stream_id = ${request.aggregateId}
|
|
98410
|
+
AND event_type = ${request.type}
|
|
98411
|
+
AND sequence > ${request.sequenceExclusive}
|
|
98412
|
+
ORDER BY sequence ASC
|
|
98413
|
+
LIMIT 1
|
|
98414
|
+
`
|
|
97659
98415
|
});
|
|
97660
98416
|
const append = (event) => appendEventRow({
|
|
97661
98417
|
eventId: event.eventId,
|
|
@@ -97705,12 +98461,14 @@ const makeEventStore = Effect.gen(function* () {
|
|
|
97705
98461
|
since: input.since,
|
|
97706
98462
|
limit: Math.min(Math.max(1, Math.floor(input.limit)), 500)
|
|
97707
98463
|
}).pipe(Effect.mapError(toPersistenceSqlOrDecodeError$2("OrchestrationEventStore.readRecent:query", "OrchestrationEventStore.readRecent:decodeRows")), Effect.flatMap((rows) => Effect.forEach(rows, (row) => decodeEvent(row).pipe(Effect.mapError(toPersistenceDecodeError("OrchestrationEventStore.readRecent:rowToEvent"))))));
|
|
98464
|
+
const hasEventAfter = (input) => findEventAfter(input).pipe(Effect.map(Option.isSome), Effect.mapError(toPersistenceSqlOrDecodeError$2("OrchestrationEventStore.hasEventAfter:query", "OrchestrationEventStore.hasEventAfter:decodeRow")));
|
|
97708
98465
|
return {
|
|
97709
98466
|
append,
|
|
97710
98467
|
readPage,
|
|
97711
98468
|
readRecent,
|
|
97712
98469
|
readFromSequence,
|
|
97713
|
-
readAll: () => readFromSequence(0, Number.MAX_SAFE_INTEGER)
|
|
98470
|
+
readAll: () => readFromSequence(0, Number.MAX_SAFE_INTEGER),
|
|
98471
|
+
hasEventAfter
|
|
97714
98472
|
};
|
|
97715
98473
|
});
|
|
97716
98474
|
const OrchestrationEventStoreLive = Layer.effect(OrchestrationEventStore, makeEventStore);
|
|
@@ -98028,7 +98786,8 @@ function requireThreadHasUserMessage(input) {
|
|
|
98028
98786
|
return requireThread(input).pipe(Effect.flatMap((thread) => thread.messages.some((message) => message.role === "user") ? Effect.succeed(thread) : Effect.fail(invariantError(input.command.type, `Thread '${input.threadId}' cannot be archived before a message has been sent.`))));
|
|
98029
98787
|
}
|
|
98030
98788
|
function requireThreadAbsent(input) {
|
|
98031
|
-
|
|
98789
|
+
const existing = findThreadById(input.readModel, input.threadId);
|
|
98790
|
+
if (existing === void 0 || existing.deletedAt !== null) return Effect.void;
|
|
98032
98791
|
return Effect.fail(invariantError(input.command.type, `Thread '${input.threadId}' already exists and cannot be created twice.`));
|
|
98033
98792
|
}
|
|
98034
98793
|
//#endregion
|
|
@@ -100441,17 +101200,26 @@ const makeProjectionPendingApprovalRepository = Effect.gen(function* () {
|
|
|
100441
101200
|
execute: ({ requestId }) => sql`
|
|
100442
101201
|
DELETE FROM projection_pending_approvals
|
|
100443
101202
|
WHERE request_id = ${requestId}
|
|
101203
|
+
`
|
|
101204
|
+
});
|
|
101205
|
+
const deleteProjectionPendingApprovalRowsByThread = SqlSchema.void({
|
|
101206
|
+
Request: ListProjectionPendingApprovalsInput,
|
|
101207
|
+
execute: ({ threadId }) => sql`
|
|
101208
|
+
DELETE FROM projection_pending_approvals
|
|
101209
|
+
WHERE thread_id = ${threadId}
|
|
100444
101210
|
`
|
|
100445
101211
|
});
|
|
100446
101212
|
const upsert = (row) => upsertProjectionPendingApprovalRow(row).pipe(Effect.mapError(toPersistenceSqlError("ProjectionPendingApprovalRepository.upsert:query")));
|
|
100447
101213
|
const listByThreadId = (input) => listProjectionPendingApprovalRows(input).pipe(Effect.mapError(toPersistenceSqlError("ProjectionPendingApprovalRepository.listByThreadId:query")));
|
|
100448
101214
|
const getByRequestId = (input) => getProjectionPendingApprovalRow(input).pipe(Effect.mapError(toPersistenceSqlError("ProjectionPendingApprovalRepository.getByRequestId:query")));
|
|
100449
101215
|
const deleteByRequestId = (input) => deleteProjectionPendingApprovalRow(input).pipe(Effect.mapError(toPersistenceSqlError("ProjectionPendingApprovalRepository.deleteByRequestId:query")));
|
|
101216
|
+
const deleteByThreadId = (input) => deleteProjectionPendingApprovalRowsByThread(input).pipe(Effect.mapError(toPersistenceSqlError("ProjectionPendingApprovalRepository.deleteByThreadId:query")));
|
|
100450
101217
|
return {
|
|
100451
101218
|
upsert,
|
|
100452
101219
|
listByThreadId,
|
|
100453
101220
|
getByRequestId,
|
|
100454
|
-
deleteByRequestId
|
|
101221
|
+
deleteByRequestId,
|
|
101222
|
+
deleteByThreadId
|
|
100455
101223
|
};
|
|
100456
101224
|
});
|
|
100457
101225
|
const ProjectionPendingApprovalRepositoryLive = Layer.effect(ProjectionPendingApprovalRepository, makeProjectionPendingApprovalRepository);
|
|
@@ -101399,7 +102167,15 @@ const ORCHESTRATION_EVENT_PROJECTORS = {
|
|
|
101399
102167
|
"project.meta-updated": [ORCHESTRATION_PROJECTOR_NAMES.projects],
|
|
101400
102168
|
"project.avatar-set": [ORCHESTRATION_PROJECTOR_NAMES.projects],
|
|
101401
102169
|
"project.deleted": [ORCHESTRATION_PROJECTOR_NAMES.projects],
|
|
101402
|
-
"thread.created": [
|
|
102170
|
+
"thread.created": [
|
|
102171
|
+
ORCHESTRATION_PROJECTOR_NAMES.threadMessages,
|
|
102172
|
+
ORCHESTRATION_PROJECTOR_NAMES.threadProposedPlans,
|
|
102173
|
+
ORCHESTRATION_PROJECTOR_NAMES.threadActivities,
|
|
102174
|
+
ORCHESTRATION_PROJECTOR_NAMES.threadSessions,
|
|
102175
|
+
ORCHESTRATION_PROJECTOR_NAMES.threadTurns,
|
|
102176
|
+
ORCHESTRATION_PROJECTOR_NAMES.pendingApprovals,
|
|
102177
|
+
ORCHESTRATION_PROJECTOR_NAMES.threads
|
|
102178
|
+
],
|
|
101403
102179
|
"thread.deleted": [ORCHESTRATION_PROJECTOR_NAMES.threads],
|
|
101404
102180
|
"thread.archived": [ORCHESTRATION_PROJECTOR_NAMES.threads],
|
|
101405
102181
|
"thread.unarchived": [ORCHESTRATION_PROJECTOR_NAMES.threads],
|
|
@@ -101464,7 +102240,7 @@ function extractActivityRequestId(payload) {
|
|
|
101464
102240
|
}
|
|
101465
102241
|
function isStalePendingApprovalFailureDetail(detail) {
|
|
101466
102242
|
if (detail === null) return false;
|
|
101467
|
-
return detail.includes("stale pending approval request") || detail.includes("unknown pending approval request") || detail.includes("unknown pending permission request");
|
|
102243
|
+
return detail.includes("stale pending approval request") || detail.includes("unknown pending approval request") || detail.includes("unknown pending permission request") || detail.includes("unknown pending codex approval request");
|
|
101468
102244
|
}
|
|
101469
102245
|
function derivePendingUserInputStatesFromActivities(activities) {
|
|
101470
102246
|
const states = /* @__PURE__ */ new Map();
|
|
@@ -101549,7 +102325,6 @@ function collectThreadAttachmentRelativePaths(threadId, messages) {
|
|
|
101549
102325
|
if (!threadSegment) return /* @__PURE__ */ new Set();
|
|
101550
102326
|
const relativePaths = /* @__PURE__ */ new Set();
|
|
101551
102327
|
for (const message of messages) for (const attachment of message.attachments ?? []) {
|
|
101552
|
-
if (attachment.type !== "image") continue;
|
|
101553
102328
|
const attachmentThreadSegment = parseThreadSegmentFromAttachmentId(attachment.id);
|
|
101554
102329
|
if (!attachmentThreadSegment || attachmentThreadSegment !== threadSegment) continue;
|
|
101555
102330
|
relativePaths.add(attachmentRelativePath(attachment));
|
|
@@ -101851,7 +102626,12 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
|
|
|
101851
102626
|
return;
|
|
101852
102627
|
}
|
|
101853
102628
|
case "thread.deleted": {
|
|
101854
|
-
|
|
102629
|
+
if (!(yield* eventStore.hasEventAfter({
|
|
102630
|
+
aggregateKind: "thread",
|
|
102631
|
+
aggregateId: event.payload.threadId,
|
|
102632
|
+
type: "thread.created",
|
|
102633
|
+
sequenceExclusive: event.sequence
|
|
102634
|
+
}))) attachmentSideEffects.deletedThreadIds.add(event.payload.threadId);
|
|
101855
102635
|
const existingRow = yield* projectionThreadRepository.getById({ threadId: event.payload.threadId });
|
|
101856
102636
|
if (Option.isNone(existingRow)) return;
|
|
101857
102637
|
yield* projectionThreadRepository.upsert({
|
|
@@ -102086,6 +102866,9 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
|
|
|
102086
102866
|
});
|
|
102087
102867
|
const applyThreadMessagesProjection = Effect.fn("applyThreadMessagesProjection")(function* (event, attachmentSideEffects) {
|
|
102088
102868
|
switch (event.type) {
|
|
102869
|
+
case "thread.created":
|
|
102870
|
+
yield* projectionThreadMessageRepository.deleteByThreadId({ threadId: event.payload.threadId });
|
|
102871
|
+
return;
|
|
102089
102872
|
case "thread.message-sent": {
|
|
102090
102873
|
const existingMessage = yield* projectionThreadMessageRepository.getByMessageId({ messageId: event.payload.messageId });
|
|
102091
102874
|
const previousMessage = Option.getOrUndefined(existingMessage);
|
|
@@ -102127,6 +102910,9 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
|
|
|
102127
102910
|
});
|
|
102128
102911
|
const applyThreadProposedPlansProjection = Effect.fn("applyThreadProposedPlansProjection")(function* (event, _attachmentSideEffects) {
|
|
102129
102912
|
switch (event.type) {
|
|
102913
|
+
case "thread.created":
|
|
102914
|
+
yield* projectionThreadProposedPlanRepository.deleteByThreadId({ threadId: event.payload.threadId });
|
|
102915
|
+
return;
|
|
102130
102916
|
case "thread.proposed-plan-upserted":
|
|
102131
102917
|
yield* projectionThreadProposedPlanRepository.upsert({
|
|
102132
102918
|
planId: event.payload.proposedPlan.id,
|
|
@@ -102153,6 +102939,10 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
|
|
|
102153
102939
|
});
|
|
102154
102940
|
const applyThreadActivitiesProjection = Effect.fn("applyThreadActivitiesProjection")(function* (event, attachmentSideEffects) {
|
|
102155
102941
|
switch (event.type) {
|
|
102942
|
+
case "thread.created":
|
|
102943
|
+
yield* projectionThreadActivityRepository.deleteByThreadId({ threadId: event.payload.threadId });
|
|
102944
|
+
yield* projectionThreadUserInputRequestRepository.deleteByThreadId({ threadId: event.payload.threadId });
|
|
102945
|
+
return;
|
|
102156
102946
|
case "thread.activity-appended": {
|
|
102157
102947
|
const requestId = extractActivityRequestId(event.payload.activity.payload);
|
|
102158
102948
|
const activityPayload = typeof event.payload.activity.payload === "object" && event.payload.activity.payload !== null ? event.payload.activity.payload : null;
|
|
@@ -102208,6 +102998,10 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
|
|
|
102208
102998
|
}
|
|
102209
102999
|
});
|
|
102210
103000
|
const applyThreadSessionsProjection = Effect.fn("applyThreadSessionsProjection")(function* (event, _attachmentSideEffects) {
|
|
103001
|
+
if (event.type === "thread.created") {
|
|
103002
|
+
yield* projectionThreadSessionRepository.deleteByThreadId({ threadId: event.payload.threadId });
|
|
103003
|
+
return;
|
|
103004
|
+
}
|
|
102211
103005
|
if (event.type !== "thread.session-set") return;
|
|
102212
103006
|
yield* projectionThreadSessionRepository.upsert({
|
|
102213
103007
|
threadId: event.payload.threadId,
|
|
@@ -102224,6 +103018,9 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
|
|
|
102224
103018
|
});
|
|
102225
103019
|
const applyThreadTurnsProjection = Effect.fn("applyThreadTurnsProjection")(function* (event, _attachmentSideEffects) {
|
|
102226
103020
|
switch (event.type) {
|
|
103021
|
+
case "thread.created":
|
|
103022
|
+
yield* projectionTurnRepository.deleteByThreadId({ threadId: event.payload.threadId });
|
|
103023
|
+
return;
|
|
102227
103024
|
case "thread.turn-start-requested":
|
|
102228
103025
|
yield* projectionTurnRepository.replacePendingTurnStart({
|
|
102229
103026
|
threadId: event.payload.threadId,
|
|
@@ -102399,6 +103196,9 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
|
|
|
102399
103196
|
const applyCheckpointsProjection = () => Effect.void;
|
|
102400
103197
|
const applyPendingApprovalsProjection = Effect.fn("applyPendingApprovalsProjection")(function* (event, attachmentSideEffects) {
|
|
102401
103198
|
switch (event.type) {
|
|
103199
|
+
case "thread.created":
|
|
103200
|
+
yield* projectionPendingApprovalRepository.deleteByThreadId({ threadId: event.payload.threadId });
|
|
103201
|
+
return;
|
|
102402
103202
|
case "thread.activity-appended": {
|
|
102403
103203
|
const requestId = extractActivityRequestId(event.payload.activity.payload) ?? event.metadata.requestId ?? null;
|
|
102404
103204
|
if (requestId === null) return;
|
|
@@ -102556,7 +103356,7 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
|
|
|
102556
103356
|
const lastAppliedByProjector = new Map(projectors.map((projector) => [projector.name, 0]));
|
|
102557
103357
|
for (const row of stateRows) if (lastAppliedByProjector.has(row.projector)) lastAppliedByProjector.set(row.projector, row.lastAppliedSequence);
|
|
102558
103358
|
const replayFromSequence = Math.min(...lastAppliedByProjector.values());
|
|
102559
|
-
yield* Stream.runForEach(eventStore.readFromSequence(replayFromSequence), (event) => Effect.gen(function* () {
|
|
103359
|
+
yield* Stream.runForEach(eventStore.readFromSequence(replayFromSequence, Number.MAX_SAFE_INTEGER), (event) => Effect.gen(function* () {
|
|
102560
103360
|
const projectorsToAdvance = projectors.filter((projector) => event.sequence > (lastAppliedByProjector.get(projector.name) ?? 0));
|
|
102561
103361
|
if (projectorsToAdvance.length === 0) return;
|
|
102562
103362
|
const postCommit = yield* sql.withTransaction(applyProjectorsForEvent(event, projectorsToAdvance));
|
|
@@ -106475,4 +107275,4 @@ else if (external !== null) (external.action === "pair" ? promptAndPairExternalM
|
|
|
106475
107275
|
});
|
|
106476
107276
|
else NodeRuntime.runMain(program);
|
|
106477
107277
|
//#endregion
|
|
106478
|
-
export { spawnAndCollect as $, V2ThreadRealtimeErrorNotification as $t, normalizeCliError as A, makeProviderMaintenanceCapabilities as An, ToolRequestUserInputParams as At, buildCodexInitializeParams as B,
|
|
107278
|
+
export { spawnAndCollect as $, V2ThreadRealtimeErrorNotification as $t, normalizeCliError as A, makeProviderMaintenanceCapabilities as An, ToolRequestUserInputParams as At, buildCodexInitializeParams as B, createModelCapabilities as Bn, V2ItemCompletedNotification as Bt, buildCommitMessagePrompt as C, decodeGitHubPullRequestListJson as Cn, SERVER_NOTIFICATION_METHODS as Ct, buildThreadPriorityPrompt as D, enrichProviderSnapshotWithVersionAdvisory as Dn, ServerRequest__ExecCommandApprovalParams as Dt, buildPrContentPrompt as E, AzureDevOpsCli as En, ServerRequest__DynamicToolCallParams as Et, makeClaudeCapabilitiesCacheKey as F, ServerSettingsService as Fn, V2CommandExecutionOutputDeltaNotification as Ft, buildSelectOptionDescriptor as G, getProviderOptionDescriptors as Gn, V2PlanDeltaNotification as Gt, makePendingCodexProvider as H, getModelSelectionStringOptionValue as Hn, V2McpServerOauthLoginCompletedNotification as Ht, makeClaudeContinuationGroupKey as I, readPersistedAttachment as In, V2ConfigWarningNotification as It, detailFromResult as J, resolvePromptInjectedEffort as Jn, V2ServerRequestResolvedNotification as Jt, buildServerProvider as K, getProviderOptionStringSelectionValue as Kn, V2ReasoningSummaryTextDeltaNotification as Kt, makeClaudeEnvironment as L, resolveAttachmentPath as Ln, V2DeprecationNoticeNotification as Lt, sanitizePrTitle as M, normalizeCommandPath as Mn, V2AccountRateLimitsUpdatedNotification as Mt, sanitizeThreadTitle as N, resolveProviderMaintenanceCapabilitiesEffect as Nn, V2AccountUpdatedNotification as Nt, buildThreadTitlePrompt as O, makeManualOnlyProviderMaintenanceCapabilities as On, ServerRequest__FileChangeRequestApprovalParams as Ot, toJsonSchemaObject as P, compareCliVersions as Pn, V2AgentMessageDeltaNotification as Pt, providerModelsFromSettings as Q, V2ThreadRealtimeClosedNotification as Qt, resolveClaudeHomePath$1 as R, resolveCommandPath as Rn, V2ErrorNotification as Rt, buildBranchNamePrompt as S, withoutStatusCheckRollupJsonField as Sn, CodexAppServerTransportError as St, buildIssueContentTitlePrompt as T, BitbucketApi as Tn, ServerRequest__CommandExecutionRequestApprovalParams as Tt, DEFAULT_TIMEOUT_MS as U, getProviderOptionBooleanSelectionValue as Un, V2McpToolCallProgressNotification as Ut, checkCodexProviderStatus as V, getModelSelectionBooleanOptionValue as Vn, V2ItemStartedNotification as Vt, buildBooleanOptionDescriptor as W, getProviderOptionCurrentValue as Wn, V2ModelReroutedNotification as Wt, nonEmptyTrimmed as X, V2ThreadGoalUpdatedNotification as Xt, isCommandMissingCause as Y, V2ThreadGoalClearedNotification as Yt, parseGenericCliVersion as Z, V2ThreadNameUpdatedNotification as Zt, ProviderEventLoggers as _, GITHUB_PULL_REQUEST_LIST_JSON_FIELDS as _n, layerChildProcess as _t, PtyAdapter as a, V2ThreadTokenUsageUpdatedNotification as an, createProcessDeviceToolBinding as at, checkRtkAvailability as b, formatGitHubJsonFields as bn, CodexAppServerRequestError as bt, OpenCodeRuntimeError as c, V2TurnPlanUpdatedNotification as cn, ProviderAdapterSessionClosedError as ct, openCodeRuntimeErrorDetail as d, V2TurnStartResponse as dn, ProviderDriverError as dt, V2ThreadRealtimeItemAddedNotification as en, AGENT_CONTROL_INTERNAL_SERVER_NAME as et, parseOpenCodeModelSlug as f, V2TurnSteerParams as fn, codexContinuationIdentity as ft, toOpenCodeQuestionAnswers as g, GitLabCli as gn, CodexAppServerClient as gt, toOpenCodePermissionReply as h, V2WindowsWorldWritableWarningNotification as hn, expandHomePath$3 as ht, classifyTaskAgentKind as i, V2ThreadStatusChangedNotification as in, redactAgentControlSecrets as it, sanitizeCommitSubject as j, makeStaticProviderMaintenanceResolver as jn, ToolRequestUserInputResponse as jt, extractJsonObject as k, makePackageManagedProviderMaintenanceResolver as kn, ServerRequest__ToolRequestUserInputParams as kt, buildOpenCodePermissionRules as l, V2TurnStartParams as ln, ProviderAdapterSessionNotFoundError as lt, toOpenCodeFileParts as m, V2WindowsSandboxSetupCompletedNotification as mn, resolveCodexHomeLayout as mt, AgentControlSessionRegistry as n, V2ThreadRealtimeStartedNotification as nn, installAgentControlAcp as nt, PtySpawnError as o, V2TurnCompletedNotification as on, ProviderAdapterProcessError as ot, runOpenCodeSdk as p, V2TurnSteerResponse as pn, materializeCodexShadowHome as pt, collectStreamAsString as q, normalizeModelSlug as qn, V2ReasoningTextDeltaNotification as qt, ignoreProviderBackgroundCause as r, V2ThreadStartedNotification as rn, installAgentControlNativeHttp as rt, OpenCodeRuntime as s, V2TurnDiffUpdatedNotification as sn, ProviderAdapterRequestError as st, makeServerQueueMetrics as t, V2ThreadRealtimeOutputAudioDeltaNotification as tn, agentControlHostContext as tt, openCodeQuestionId as u, V2TurnStartParams__CollaborationMode as un, ProviderAdapterValidationError as ut, makeEventNdjsonLogger as v, GitHubCli as vn, CodexAppServerProcessExitedError as vt, buildIssueContentPolishPrompt as w, ForgejoApi as wn, ServerRequest__ApplyPatchApprovalParams as wt, validateRankInboxThreadsResult as x, isStatusCheckRollupAccessError as xn, CodexAppServerSpawnError as xt, buildTokenReductionInstructions as y, GitHubCliError as yn, CodexAppServerProtocolParseError as yt, mergeProviderInstanceEnvironment as z, applyClaudePromptEffortPrefix as zn, V2FileChangeOutputDeltaNotification as zt };
|