ryco-cli 0.1.20 → 0.1.22
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-Bh7MX3rC.cjs → AcpNativeLogging-COepku4a.cjs} +264 -7
- package/dist/{AcpNativeLogging-CLM3p9JD.mjs → AcpNativeLogging-D7e1dn7s.mjs} +254 -9
- package/dist/{AzureDevOpsSourceControlProvider-jQm1WPMS.mjs → AzureDevOpsSourceControlProvider-BNGEg1R8.mjs} +3 -3
- package/dist/{AzureDevOpsSourceControlProvider-D9QXGi1h.cjs → AzureDevOpsSourceControlProvider-CrvgKNf2.cjs} +2 -2
- package/dist/{BitbucketSourceControlProvider-j95Cro_2.mjs → BitbucketSourceControlProvider-Bt21jw68.mjs} +3 -3
- package/dist/{BitbucketSourceControlProvider-C3VDp9qR.cjs → BitbucketSourceControlProvider-BzhsQwH-.cjs} +2 -2
- package/dist/{BunPTY-CNvWSzEJ.mjs → BunPTY-TbHbSc8S.mjs} +1 -1
- package/dist/{ClaudeDriver-CT89QDP8.mjs → ClaudeDriver-D65SPdHR.mjs} +44 -119
- package/dist/{ClaudeDriver-DiRhQM2K.cjs → ClaudeDriver-D7NatUx6.cjs} +52 -127
- package/dist/{CodexDriver-CBYfPl_X.mjs → CodexDriver-D4z5-wUD.mjs} +237 -50
- package/dist/{CodexDriver-BmKoU7w_.cjs → CodexDriver-DWGtHt9r.cjs} +235 -48
- package/dist/{CodexTextGeneration-CuXvtfAi.cjs → CodexTextGeneration-B4tJTUDo.cjs} +1 -1
- package/dist/{CodexTextGeneration-B7GPyLo2.mjs → CodexTextGeneration-BikHow8k.mjs} +2 -2
- package/dist/{CopilotDriver-XX5zmGVK.cjs → CopilotDriver-DJvYncGI.cjs} +122 -23
- package/dist/{CopilotDriver-BJ1P_bHz.mjs → CopilotDriver-ZvvsAIkd.mjs} +123 -24
- package/dist/{CursorDriver-BH6yAijk.mjs → CursorDriver-B1QSBzuH.mjs} +45 -74
- package/dist/{CursorDriver-CYMXQKec.cjs → CursorDriver-D3I4KULs.cjs} +44 -73
- package/dist/{ForgejoSourceControlProvider-ZfU3SBzW.mjs → ForgejoSourceControlProvider-BGXysSX6.mjs} +3 -3
- package/dist/{ForgejoSourceControlProvider-Dzg-BJY_.cjs → ForgejoSourceControlProvider-Dh6DOoc8.cjs} +2 -2
- package/dist/{GitHubSourceControlProvider-BpyIi23Q.cjs → GitHubSourceControlProvider-8hsv_kCE.cjs} +2 -2
- package/dist/{GitHubSourceControlProvider-Bx5_H3zb.mjs → GitHubSourceControlProvider-CPCYV8Xo.mjs} +3 -3
- package/dist/{GitLabSourceControlProvider-QccSsOnx.cjs → GitLabSourceControlProvider-B0ZbF9Zx.cjs} +2 -2
- package/dist/{GitLabSourceControlProvider-DjvGD1WZ.mjs → GitLabSourceControlProvider-Bvknpaon.mjs} +3 -3
- package/dist/{GrokDriver-BPIUrqkN.mjs → GrokDriver-DgQe3pKz.mjs} +41 -10
- package/dist/{GrokDriver-jE4az7JZ.cjs → GrokDriver-_puXDTU3.cjs} +42 -11
- package/dist/{NodePTY-lO8PwZLk.mjs → NodePTY-B_p5tLYO.mjs} +1 -1
- package/dist/{OpenCodeDriver-IbZqAzYW.cjs → OpenCodeDriver-401RexI0.cjs} +240 -40
- package/dist/{OpenCodeDriver-_hUfFwH4.mjs → OpenCodeDriver-DNUlF8M-.mjs} +238 -41
- package/dist/{SourceControlProviderDiscoveryCatalog-CHxCP6Ng.mjs → SourceControlProviderDiscoveryCatalog-B37RHe2u.mjs} +1 -1
- package/dist/{SourceControlProviderDiscoveryCatalog-CnkV-oKD.cjs → SourceControlProviderDiscoveryCatalog-DreaAH1H.cjs} +1 -1
- package/dist/bin.cjs +10690 -5679
- package/dist/bin.mjs +10674 -5674
- package/dist/client/assets/AccountSettings-CypheYqM.js +1 -0
- package/dist/client/assets/AiFocusSettings-BlX0ED1t.js +1 -0
- package/dist/client/assets/AnimatedHeight-DKCe4x_Q.js +1 -0
- package/dist/client/assets/AppearanceSettings-BSyn6NXf.js +1 -0
- package/dist/client/assets/BranchToolbar.logic-fpBz8Ajj.js +1 -0
- package/dist/client/assets/BrowserPanel-BWch19QH.js +1 -0
- package/dist/client/assets/ChatRightPanel-B7yrq-hS.js +27 -0
- package/dist/client/assets/ChatThreadRouteView-Cg0d_EHs.js +1 -0
- package/dist/client/assets/CommandPaletteDialog-DImCuPaX.js +1 -0
- package/dist/client/assets/CompositeItem-BYnHWRNf.js +1 -0
- package/dist/client/assets/CompositeRoot-B28uivk7.js +1 -0
- package/dist/client/assets/ComputerUseSettings-CosW7jaG.js +1 -0
- package/dist/client/assets/ConnectionsSettings-Bk6vI3G-.js +7 -0
- package/dist/client/assets/ContextHandoffEndpointLabel-BR6ygaub.js +4 -0
- package/dist/client/assets/DiagnosticsSettings-Dp_tCNLw.js +2 -0
- package/dist/client/assets/DialogHandle-BN-QB-sO.js +1 -0
- package/dist/client/assets/DialogPopup-BuJs5WUt.js +1 -0
- package/dist/client/assets/DialogRoot-PxEcoecQ.js +1 -0
- package/dist/client/assets/DialogTitle-4nxQsra4.js +1 -0
- package/dist/client/assets/DialogTrigger-D_0canul.js +1 -0
- package/dist/client/assets/DialogViewport-DSo-2hyf.js +1 -0
- package/dist/client/assets/DraftChatThreadRouteView-C94kpMx4.js +1 -0
- package/dist/client/assets/{ExternalIdentityWeb.logic-TlJdh82R.js → ExternalIdentityWeb.logic-CGJKCFPo.js} +1 -1
- package/dist/client/assets/{GlassSurface-BWk2twKc.js → GlassSurface-CyOTUS7E.js} +1 -1
- package/dist/client/assets/HostedConnectionControls-CL0Ws4ca.js +1 -0
- package/dist/client/assets/HostedHubRoot-LUINZl4r.js +1 -0
- package/dist/client/assets/HostedNativeAuthorizationRoute-CgYVBE6N.js +1 -0
- package/dist/client/assets/HostedRelayTrustNotice-DgdeZh52.js +1 -0
- package/dist/client/assets/Icons-BIUbIFr7.js +1 -0
- package/dist/client/assets/IntegrationsSettingsPanel-B7tXTaa3.js +1 -0
- package/dist/client/assets/KeybindingsSettings-HMlRcGQ4.js +7 -0
- package/dist/client/assets/LazyBrowserPanel-CKfmuM9U.js +1 -0
- package/dist/client/assets/{McpServersSettings-Cbq-uHU3.js → McpServersSettings-Bq-HyhvC.js} +4 -4
- package/dist/client/assets/MobileSheet-acDRH9aa.js +1 -0
- package/dist/client/assets/NoActiveThreadState-7rym7bV7.js +1 -0
- package/dist/client/assets/NodeSecuritySettings-D8qjh4Dc.js +1 -0
- package/dist/client/assets/OpinionatedPluginsSettings-D7Uks5yR.js +1 -0
- package/dist/client/assets/PhoneGetAppInterstitial-BQXUSufH.js +1 -0
- package/dist/client/assets/PhoneGetAppInterstitialBackdrop-BbUvwGmI.js +1 -0
- package/dist/client/assets/PhoneHome-DvgdMTkh.js +1 -0
- package/dist/client/assets/PhoneSettingsSurface-DncJ540i.js +1 -0
- package/dist/client/assets/ProjectFavicon-BY5Vyyk6.js +1 -0
- package/dist/client/assets/ProviderInstanceIcon-CZe1TbeC.js +1 -0
- package/dist/client/assets/ProviderModelPicker-DHAY1n_1.js +1 -0
- package/dist/client/assets/{ProviderUpdateLaunchNotification.logic-D3qYdp40.js → ProviderUpdateLaunchNotification.logic-DQJVrUIo.js} +1 -1
- package/dist/client/assets/ProvidersSettingsPanel-BylxZs4S.js +1 -0
- package/dist/client/assets/RedactedSensitiveText-D-enj1h5.js +1 -0
- package/dist/client/assets/RootAppShell-DBK0WW2b.js +6 -0
- package/dist/client/assets/RycoLetterMark-PnGm6TQY.js +1 -0
- package/dist/client/assets/{Separator-DiMB6Prz.js → Separator-BWKYMFqt.js} +1 -1
- package/dist/client/assets/SettingsDialog-N25hIv-a.js +1 -0
- package/dist/client/assets/SettingsPanels-D9YXmUPP.js +3 -0
- package/dist/client/assets/SettingsPanels.editor-Cn18k74l.js +1 -0
- package/dist/client/assets/SourceControlSettings-BAzSpMfR.js +1 -0
- package/dist/client/assets/StatisticsPage-CLKpfsQ8.js +1 -0
- package/dist/client/assets/StatisticsPanel-DxHUFn64.js +1 -0
- package/dist/client/assets/StatisticsSettingsLink-B3HIQYFh.js +1 -0
- package/dist/client/assets/ThreadStatusIndicators-CQZ_OgY8.js +0 -0
- package/dist/client/assets/{ThreadTerminalDrawer-DvadlVXV.js → ThreadTerminalDrawer-D1SPewXR.js} +3 -3
- package/dist/client/assets/ThreadWorkspacePanel-DVF6oZsV.js +2009 -0
- package/dist/client/assets/ToolbarRootContext-Dt8G5aCw.js +1 -0
- package/dist/client/assets/{WorkItemsTab-CI6hTQ_k.js → WorkItemsTab-BoE-TcXJ.js} +8 -8
- package/dist/client/assets/{activity-1CkdQG5u.js → activity-DfFM6I8A.js} +1 -1
- package/dist/client/assets/alert-DE5SkZhr.js +1 -0
- package/dist/client/assets/alert-dialog-BqPnPhb6.js +1 -0
- package/dist/client/assets/appChrome-CJauXpqv.js +1 -0
- package/dist/client/assets/{archive-BL1hojl3.js → archive-BFV4YQ7D.js} +1 -1
- package/dist/client/assets/arrow-left-CCmICk1t.js +1 -0
- package/dist/client/assets/arrow-right-Z3Eay6Fd.js +1 -0
- package/dist/client/assets/{arrow-up-CTcWIlqV.js → arrow-up-caak6P06.js} +1 -1
- package/dist/client/assets/arrow-up-right-BwC-fCE4.js +1 -0
- package/dist/client/assets/authorization-bHsGYIT0.js +1 -0
- package/dist/client/assets/{badge-Cil0isYQ.js → badge-m9kM3P07.js} +1 -1
- package/dist/client/assets/{bot-DJp0cuhK.js → bot-Cv7a7Ksf.js} +1 -1
- package/dist/client/assets/{button-CBqaO2Ub.js → button-B6xQZNKz.js} +1 -1
- package/dist/client/assets/capabilities-D6bsjqkj.js +1 -0
- package/dist/client/assets/{chart-column-Dw6ACmXM.js → chart-column-DgGlY4sD.js} +1 -1
- package/dist/client/assets/chatThreadActions-BXaNbPbp.js +1 -0
- package/dist/client/assets/check-BfnWUGBT.js +1 -0
- package/dist/client/assets/{chevron-down-B7C6FKzM.js → chevron-down-B_FKCRVh.js} +1 -1
- package/dist/client/assets/chevron-right-B6CKNGh4.js +1 -0
- package/dist/client/assets/{circle-alert-BWvs6IOn.js → circle-alert-BV3vJE-c.js} +1 -1
- package/dist/client/assets/circle-check-D2Vx39x-.js +1 -0
- package/dist/client/assets/{external-link-fbvzDWM7.js → circle-dashed-khcA8K3Y.js} +1 -1
- package/dist/client/assets/circle-question-mark-DEuLdOiy.js +1 -0
- package/dist/client/assets/circle-x-DqfM_2wS.js +1 -0
- package/dist/client/assets/clamp-D0kAXd-u.js +1 -0
- package/dist/client/assets/{clipboard-copy-C4VV20QR.js → clipboard-copy-CiD4tBsh.js} +1 -1
- package/dist/client/assets/clock--4M7moiV.js +1 -0
- package/dist/client/assets/clock-3-NbnQqtcd.js +1 -0
- package/dist/client/assets/collapsible-BECg-ssO.js +1 -0
- package/dist/client/assets/command-DvbA3O0J.js +1 -0
- package/dist/client/assets/{copy-UQjKGt7t.js → copy-CkPe1c-r.js} +1 -1
- package/dist/client/assets/data-list-7TiaqfZU.js +1 -0
- package/dist/client/assets/desktopUpdateAtoms-6j0d8vfy.js +1 -0
- package/dist/client/assets/desktopWorkspace-8s8rm3zL.js +1 -0
- package/dist/client/assets/device-CGaJ6fwD.js +168 -0
- package/dist/client/assets/dialog-C9v8Zl6e.js +1 -0
- package/dist/client/assets/{download-CQZ-m4zW.js → download-DPjzVxTa.js} +1 -1
- package/dist/client/assets/draft-input-BRSLIjV6.js +1 -0
- package/dist/client/assets/editorPreferences-D-9SDgRM.js +1 -0
- package/dist/client/assets/empty-CuQ57p2u.js +1 -0
- package/dist/client/assets/external-link-CF9EzT-A.js +1 -0
- package/dist/client/assets/{eye-CUSPj-gd.js → eye-C2Puut9B.js} +1 -1
- package/dist/client/assets/{folder-DtsQoI9_.js → folder-BKTxLq18.js} +1 -1
- package/dist/client/assets/{folder-closed-CsvKfC6X.js → folder-closed-D2cwiusg.js} +1 -1
- package/dist/client/assets/getPseudoElementBounds-DdH76YK5.js +1 -0
- package/dist/client/assets/{git-branch-BKr-Ij4u.js → git-branch-Dauy2SWC.js} +1 -1
- package/dist/client/assets/{git-pull-request-DIYyPsg5.js → git-pull-request-DsK1gBtK.js} +1 -1
- package/dist/client/assets/globe-dS40wBdE.js +1 -0
- package/dist/client/assets/group-DBXm8riE.js +1 -0
- package/dist/client/assets/hostedConnectionCoordinator-DSMW2Ldh.js +1 -0
- package/dist/client/assets/{index-QY6vcnCY.js → index-DRY8Hgrj.js} +2 -2
- package/dist/client/assets/input-Dn_zesdZ.js +1 -0
- package/dist/client/assets/kbd-BF2-WlxQ.js +1 -0
- package/dist/client/assets/{key-round-CacMputS.js → key-round-BjaaL9Df.js} +1 -1
- package/dist/client/assets/{keybindings-Bj6xWIbQ.js → keybindings-FSJY3Tht.js} +1 -1
- package/dist/client/assets/{keyboard-BqeRMHfL.js → keyboard-AkUFPD_e.js} +1 -1
- package/dist/client/assets/label-BKjVY2A9.js +1 -0
- package/dist/client/assets/{layers-BYi0v17h.js → layers-tzRiuxSx.js} +1 -1
- package/dist/client/assets/{lib-B6XyeqaU.js → lib-D5cyGc84.js} +1 -1
- package/dist/client/assets/{loader-zHASMrUy.js → loader-BrbWRz3I.js} +1 -1
- package/dist/client/assets/loader-circle-DRKbHQst.js +1 -0
- package/dist/client/assets/{log-out-tMJm0Gk6.js → log-out-BEihaal1.js} +1 -1
- package/dist/client/assets/{logging-1BfRrhxL.js → logging-Y73f240E.js} +1 -1
- package/dist/client/assets/main-BiIQEybS.js +9 -0
- package/dist/client/assets/main-tZWU6iqX.css +2 -0
- package/dist/client/assets/menu-BxtB33Up.js +1 -0
- package/dist/client/assets/{messages-square-DiMgWzoq.js → messages-square-e0Zg750i.js} +1 -1
- package/dist/client/assets/{minimize-2-C33mL7LT.js → minimize-2-DC9gMgGl.js} +1 -1
- package/dist/client/assets/monitor-Dj0JFj4_.js +1 -0
- package/dist/client/assets/{palette-BSD_aJZg.js → palette-0qvNt1CR.js} +1 -1
- package/dist/client/assets/{pencil-B69ERoVM.js → pencil-CA0DGufX.js} +1 -1
- package/dist/client/assets/{play-DYDxlTKo.js → play-wIyvqd_g.js} +1 -1
- package/dist/client/assets/plus-5kH13lqq.js +1 -0
- package/dist/client/assets/popover-CwhgX3HA.js +1 -0
- package/dist/client/assets/primary-BqnEJHWx.js +2 -0
- package/dist/client/assets/{projectPaths-BFTUsvWs.js → projectPaths-45WPhgoj.js} +1 -1
- package/dist/client/assets/providerDriverMeta-Cc60r9Rb.js +1 -0
- package/dist/client/assets/providerInstances-Cr8JmFCe.js +1 -0
- package/dist/client/assets/providerModels-Cr8JmFCe.js +1 -0
- package/dist/client/assets/qr-code-BKrwYZ2s.js +1 -0
- package/dist/client/assets/{qr-code-ScYULAuR.js → qr-code-DDmpRnPp.js} +1 -1
- package/dist/client/assets/radio-group-DZCo21CF.js +2 -0
- package/dist/client/assets/{refresh-cw-DopCMrtR.js → refresh-cw-DiuiLTny.js} +1 -1
- package/dist/client/assets/resolveAriaLabelledBy-927ShlEO.js +1 -0
- package/dist/client/assets/rightPanelRouteSearch-CExl-IaQ.js +1 -0
- package/dist/client/assets/rotate-ccw-XOYBPtyK.js +1 -0
- package/dist/client/assets/rotate-cw-D32Z4Sdd.js +1 -0
- package/dist/client/assets/runtime-CA2W9mZ-.js +17 -0
- package/dist/client/assets/{save-Bh36JIv6.js → save-DjlqeVG_.js} +1 -1
- package/dist/client/assets/scroll-area-CylKYQms.js +1 -0
- package/dist/client/assets/scrollEdges-D7RQhYjX.js +1 -0
- package/dist/client/assets/search-B2nLj573.js +1 -0
- package/dist/client/assets/select-qTezUK8F.js +1 -0
- package/dist/client/assets/separator-D77goPy-.js +1 -0
- package/dist/client/assets/{server-JApJpgLa.js → server-y8Wq0Qwv.js} +1 -1
- package/dist/client/assets/session-logic-xfW418Rx.js +1 -0
- package/dist/client/assets/{settings-2-CZQg_KUQ.js → settings-2-DpwBKj3m.js} +1 -1
- package/dist/client/assets/settingsLayout-BuaXzjIe.js +1 -0
- package/dist/client/assets/settingsSections.logic-CR4aytUI.js +1 -0
- package/dist/client/assets/sheet-z3AEiSN4.js +1 -0
- package/dist/client/assets/{shield-IZEIJ8r7.js → shield-BuXuMVtb.js} +1 -1
- package/dist/client/assets/{shield-alert-DY9uVP5G.js → shield-alert-Dfk--o-I.js} +1 -1
- package/dist/client/assets/{shield-check-dQ-4cMKk.js → shield-check-BHi57iF1.js} +1 -1
- package/dist/client/assets/sidebar-Dst9O2OR.js +1 -0
- package/dist/client/assets/sidebarProjectFolders-DR1NBLLz.js +4 -0
- package/dist/client/assets/{sidebarStatusText-q88Acn3r.js → sidebarStatusText-7jo1n9E1.js} +1 -1
- package/dist/client/assets/skeleton-D_kbMg21.js +1 -0
- package/dist/client/assets/{smartphone-gNe1ynB8.js → smartphone-DcUQ17YT.js} +1 -1
- package/dist/client/assets/{sparkles-CAf3oJ5S.js → sparkles-nVLLtdqb.js} +1 -1
- package/dist/client/assets/spinner-CkXSwhuf.js +1 -0
- package/dist/client/assets/{square-pen-Bj3p_Q8E.js → square-pen-dcArpda7.js} +1 -1
- package/dist/client/assets/src-I4s4HU8f.js +14 -0
- package/dist/client/assets/star-CdUOqzzZ.js +1 -0
- package/dist/client/assets/storeSelectors-Cr8JmFCe.js +1 -0
- package/dist/client/assets/switch-BMeRsIbg.js +1 -0
- package/dist/client/assets/{tabSwitchInstrumentation-CLDM7g1_.js → tabSwitchInstrumentation-BuxWNdCV.js} +1 -1
- package/dist/client/assets/terminal-DupJfYRW.js +1 -0
- package/dist/client/assets/{terminal-links-BJzH2Ipe.js → terminal-links-Bf4neyyn.js} +1 -1
- package/dist/client/assets/textarea-Bu_OTJYe.js +1 -0
- package/dist/client/assets/threadPinning-DhnkssEa.js +1 -0
- package/dist/client/assets/{threadPriorityRefreshRuntime-D-OkS27H.js → threadPriorityRefreshRuntime-DJjlyX7f.js} +1 -1
- package/dist/client/assets/toast-CIjfIWUw.js +1 -0
- package/dist/client/assets/toggle-BA4mJ5v9.js +1 -0
- package/dist/client/assets/toggle-group-ChGfILTR.js +1 -0
- package/dist/client/assets/{tokenModePresentation-lVM0-Wi3.js → tokenModePresentation-B64s_OK3.js} +1 -1
- package/dist/client/assets/tooltip-C2VVqN6U.js +1 -0
- package/dist/client/assets/{trash-2-CM1zXPGb.js → trash-2-Dqgxd0nF.js} +1 -1
- package/dist/client/assets/{triangle-alert-RL_T3KLo.js → triangle-alert-D4cCh6sB.js} +1 -1
- package/dist/client/assets/types-Cr8JmFCe.js +1 -0
- package/dist/client/assets/{undo-2-x37tfI3V.js → undo-2-C8EQVSSD.js} +1 -1
- package/dist/client/assets/{unplug-Cw8iawyX.js → unplug-Dt3Sy2op.js} +1 -1
- package/dist/client/assets/useAppSidebarCollapsed-w0th-164.js +1 -0
- package/dist/client/assets/{useAtlassian-Bpvpm41l.js → useAtlassian-j7ex3bVN.js} +0 -0
- package/dist/client/assets/useButton-Dx5k1uZG.js +1 -0
- package/dist/client/assets/useCompositeListItem-BqkyY0oT.js +1 -0
- package/dist/client/assets/{clamp-CgH0Dl6R.js → useControlled-HocCF1v9.js} +1 -1
- package/dist/client/assets/useDebouncedValue-BevbEbPO.js +1 -0
- package/dist/client/assets/useFloatingRootContext-j6TgzEFa.js +1 -0
- package/dist/client/assets/useHandleNewThread-gVYty_Bg.js +1 -0
- package/dist/client/assets/useLabelableId-CcYPzJvj.js +1 -0
- package/dist/client/assets/useLocation-CZ3osOgz.js +1 -0
- package/dist/client/assets/useOpenInteractionType-apbY9ZEK.js +1 -0
- package/dist/client/assets/usePhoneThreadActions-CnDlicSp.js +1 -0
- package/dist/client/assets/usePopupViewport-0k75uXo1.js +1 -0
- package/dist/client/assets/useRenderElement-5DRNLBaU.js +1 -0
- package/dist/client/assets/useScrollLock-C5WLWXcc.js +1 -0
- package/dist/client/assets/{useStatistics-B4vW9Enx.js → useStatistics-GOFXPHO0.js} +2 -2
- package/dist/client/assets/useSwipeDismiss-BNHPBucH.js +1 -0
- package/dist/client/assets/useThreadActions-B4Xy2soQ.js +2 -0
- package/dist/client/assets/useTriggerFocusGuards-C3geWFzt.js +1 -0
- package/dist/client/assets/useValueChanged-FVqPwcY_.js +1 -0
- package/dist/client/assets/user-round-KsVtJgon.js +1 -0
- package/dist/client/assets/utils-B5qahmRn.js +1 -0
- package/dist/client/assets/visuallyHidden-j2WbVEv-.js +1 -0
- package/dist/client/assets/workspaceMetadataProjection-D3vqw40g.js +1 -0
- package/dist/client/assets/{wrench-D0IetWa1.js → wrench-BnpoYEZm.js} +1 -1
- package/dist/client/assets/x-BXHT1Zj1.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/{collectUint8StreamText-B3klZuIF.mjs → collectUint8StreamText-C_VNyArd.mjs} +1027 -162
- package/dist/{collectUint8StreamText-CDu-bszH.cjs → collectUint8StreamText-DStwNTTK.cjs} +1122 -161
- package/dist/{makeManagedServerProvider-CsaYHU8T.mjs → makeManagedServerProvider-GZcpSLrW.mjs} +22 -3
- package/dist/{makeManagedServerProvider-DeEmDbiq.cjs → makeManagedServerProvider-VzxWN-04.cjs} +32 -1
- package/dist/resource-monitor/LICENSE +21 -0
- package/dist/resource-monitor/darwin-arm64/LICENSE +21 -0
- package/dist/resource-monitor/darwin-arm64/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/darwin-x64/LICENSE +21 -0
- package/dist/resource-monitor/darwin-x64/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/linux-arm64/LICENSE +21 -0
- package/dist/resource-monitor/linux-arm64/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/linux-x64/LICENSE +21 -0
- package/dist/resource-monitor/linux-x64/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/ryco-resource-monitor.exe +0 -0
- package/dist/resource-monitor/win32-arm64/LICENSE +21 -0
- package/dist/resource-monitor/win32-arm64/ryco-resource-monitor.exe +0 -0
- package/dist/resource-monitor/win32-x64/LICENSE +21 -0
- package/dist/resource-monitor/win32-x64/ryco-resource-monitor.exe +0 -0
- package/package.json +1 -1
- package/dist/client/assets/AccountSettings-CvD49Uja.js +0 -1
- package/dist/client/assets/AiFocusSettings-CYIp0JOV.js +0 -1
- package/dist/client/assets/AnimatedHeight-CM_Eh6tz.js +0 -1
- package/dist/client/assets/AppearanceSettings-BwUAv5oz.js +0 -1
- package/dist/client/assets/BranchToolbar.logic-CKKpnCfs.js +0 -1
- package/dist/client/assets/ChatRightPanel-DYXZNh1m.js +0 -27
- package/dist/client/assets/ChatThreadRouteView-B0kj0wFr.js +0 -1
- package/dist/client/assets/CommandPaletteDialog-CJKvYVxh.js +0 -1
- package/dist/client/assets/CompositeItem-B4ITmHni.js +0 -1
- package/dist/client/assets/CompositeRoot-C5I2Yh5e.js +0 -1
- package/dist/client/assets/ConnectionsSettings-4l-DXYo6.js +0 -7
- package/dist/client/assets/DiagnosticsSettings-B6IUUiYM.js +0 -2
- package/dist/client/assets/DialogHandle-Bs7TUuxl.js +0 -1
- package/dist/client/assets/DialogPopup-BAK5J3da.js +0 -1
- package/dist/client/assets/DialogRoot-DMnQO_iQ.js +0 -1
- package/dist/client/assets/DialogTitle-B1m3rLO-.js +0 -1
- package/dist/client/assets/DialogTrigger-VXV8wYO4.js +0 -1
- package/dist/client/assets/DialogViewport-yUeHNu43.js +0 -1
- package/dist/client/assets/DraftChatThreadRouteView-C39ZNgWr.js +0 -1
- package/dist/client/assets/HostedConnectionControls-DO5uPfav.js +0 -1
- package/dist/client/assets/HostedHubRoot-DkHX6TkK.js +0 -1
- package/dist/client/assets/HostedNativeAuthorizationRoute-C1VRYU0-.js +0 -1
- package/dist/client/assets/HostedRelayTrustNotice-Cl7lRwRJ.js +0 -1
- package/dist/client/assets/Icons-uMh1k5C0.js +0 -1
- package/dist/client/assets/IntegrationsSettingsPanel-Mx-1xSUL.js +0 -1
- package/dist/client/assets/KeybindingsSettings-Bv3H18VO.js +0 -7
- package/dist/client/assets/MobileSheet-DS7_soKu.js +0 -1
- package/dist/client/assets/NewWorktreeDialog-CLm1JR27.js +0 -4
- package/dist/client/assets/NoActiveThreadState-CFxNrhs_.js +0 -1
- package/dist/client/assets/NodeSecuritySettings-B3uURyma.js +0 -1
- package/dist/client/assets/OpinionatedPluginsSettings-B7gZOBCs.js +0 -1
- package/dist/client/assets/PhoneGetAppInterstitial-DQdUrqs1.js +0 -1
- package/dist/client/assets/PhoneGetAppInterstitialBackdrop-DbRPU11Z.js +0 -1
- package/dist/client/assets/PhoneHome-BbZKBYb8.js +0 -1
- package/dist/client/assets/PhoneSettingsSurface-BJ8jDucY.js +0 -1
- package/dist/client/assets/ProjectFavicon-DHnstN4J.js +0 -1
- package/dist/client/assets/ProviderModelPicker-Ch69G0-0.js +0 -1
- package/dist/client/assets/ProvidersSettingsPanel-Dz-1od7X.js +0 -1
- package/dist/client/assets/RedactedSensitiveText-BORE69Ig.js +0 -1
- package/dist/client/assets/RootAppShell-DnesFYfo.js +0 -6
- package/dist/client/assets/RycoLetterMark-DDx_gBX-.js +0 -1
- package/dist/client/assets/SettingsDialog-CWK_H1sI.js +0 -1
- package/dist/client/assets/SettingsPanels-DxMEuovz.js +0 -3
- package/dist/client/assets/SettingsPanels.editor-D2gxvDPy.js +0 -1
- package/dist/client/assets/SourceControlSettings-CB2SdaRk.js +0 -1
- package/dist/client/assets/StatisticsPage-MhMDuSSQ.js +0 -1
- package/dist/client/assets/StatisticsPanel-D3d0bJgk.js +0 -1
- package/dist/client/assets/StatisticsSettingsLink-DlnQpfyr.js +0 -1
- package/dist/client/assets/ThreadStatusIndicators-CPpIFcAC.js +0 -0
- package/dist/client/assets/ThreadWorkspacePanel-Ct9EINsa.js +0 -2009
- package/dist/client/assets/ToolbarRootContext-DtUqN8i6.js +0 -1
- package/dist/client/assets/alert-DQjuri3D.js +0 -1
- package/dist/client/assets/alert-dialog-Cb2TnXzy.js +0 -1
- package/dist/client/assets/arrow-left-Dtj9PfsA.js +0 -1
- package/dist/client/assets/arrow-up-right-DGeet8e6.js +0 -1
- package/dist/client/assets/authorization-BrGZruGo.js +0 -1
- package/dist/client/assets/branding-BEx1jrAA.js +0 -1
- package/dist/client/assets/capabilities-Cj8jXZOW.js +0 -1
- package/dist/client/assets/chatThreadActions-kwD_yAEt.js +0 -1
- package/dist/client/assets/chevron-right-BWYGybX9.js +0 -1
- package/dist/client/assets/clock-3-r12DkpRj.js +0 -1
- package/dist/client/assets/clock-nNA05brA.js +0 -1
- package/dist/client/assets/collapsible-DBPd--L7.js +0 -1
- package/dist/client/assets/command-DuPvkUAz.js +0 -1
- package/dist/client/assets/composerDraftStore-czbuHgbM.js +0 -11
- package/dist/client/assets/data-list-BNy2Nwkd.js +0 -1
- package/dist/client/assets/desktopUpdateAtoms-Dz4zQu-C.js +0 -1
- package/dist/client/assets/desktopWorkspace-wrPRMcOi.js +0 -1
- package/dist/client/assets/device-DbMaLmeM.js +0 -168
- package/dist/client/assets/dialog-Csp7hsmq.js +0 -1
- package/dist/client/assets/draft-input-COB-ymgx.js +0 -1
- package/dist/client/assets/editorPreferences-lQ3Fm4yA.js +0 -1
- package/dist/client/assets/empty-BcTA7vWq.js +0 -1
- package/dist/client/assets/env-BZZxbmon.js +0 -1
- package/dist/client/assets/folder-open-GqwNTbSV.js +0 -1
- package/dist/client/assets/getPseudoElementBounds-BaLrkv_J.js +0 -1
- package/dist/client/assets/group-CCjhaP2K.js +0 -1
- package/dist/client/assets/input-pu0UXdN_.js +0 -1
- package/dist/client/assets/kbd-xUvRCeUS.js +0 -1
- package/dist/client/assets/label-BzDE8wjR.js +0 -1
- package/dist/client/assets/loader-circle-CrtHFAvM.js +0 -1
- package/dist/client/assets/main-CZzCxtM-.css +0 -2
- package/dist/client/assets/main-stppnsiU.js +0 -9
- package/dist/client/assets/menu-g3Hcm2JF.js +0 -1
- package/dist/client/assets/plus-B2h-VEqh.js +0 -1
- package/dist/client/assets/popover-z5hURYff.js +0 -1
- package/dist/client/assets/primary-AnB-Zuft.js +0 -2
- package/dist/client/assets/providerDriverMeta-C9M8tUrj.js +0 -1
- package/dist/client/assets/providerIconUtils-BXecnJ0v.js +0 -1
- package/dist/client/assets/providerInstances-CMy-5cGE.js +0 -1
- package/dist/client/assets/providerModels-CMy-5cGE.js +0 -1
- package/dist/client/assets/qr-code-B6lBPRxy.js +0 -1
- package/dist/client/assets/radio-group-DQahlnSi.js +0 -2
- package/dist/client/assets/resolveAriaLabelledBy-CUqcBhyS.js +0 -1
- package/dist/client/assets/rightPanelRouteSearch-uEySicf2.js +0 -1
- package/dist/client/assets/runtime-DRPzstwF.js +0 -1
- package/dist/client/assets/scroll-area-CzUrMo2h.js +0 -1
- package/dist/client/assets/scrollEdges-C5VxoJIp.js +0 -1
- package/dist/client/assets/search-BGQsenCM.js +0 -1
- package/dist/client/assets/select-_C7bRT7k.js +0 -1
- package/dist/client/assets/separator-CFUmZFfK.js +0 -1
- package/dist/client/assets/session-logic-C5moG_sv.js +0 -4
- package/dist/client/assets/settingsDialogStore-DnU14tMG.js +0 -1
- package/dist/client/assets/settingsLayout-zwP6p5aD.js +0 -1
- package/dist/client/assets/settingsSections.logic-F8RXVmAq.js +0 -1
- package/dist/client/assets/sheet-BoROLwxR.js +0 -1
- package/dist/client/assets/sidebar-5T3qKIfp.js +0 -1
- package/dist/client/assets/sidebarProjectFolders-Bzdw3xc6.js +0 -4
- package/dist/client/assets/skeleton-C2GDOvXd.js +0 -1
- package/dist/client/assets/spinner-Dlyh0j_K.js +0 -1
- package/dist/client/assets/src-Blzsn4sO.js +0 -14
- package/dist/client/assets/storeSelectors-BJw1h5Ih.js +0 -1
- package/dist/client/assets/switch-CIMwetO3.js +0 -1
- package/dist/client/assets/terminal-C_CyIsDD.js +0 -1
- package/dist/client/assets/textarea-C0_BLJbT.js +0 -1
- package/dist/client/assets/threadPinning-DQrBoIxu.js +0 -1
- package/dist/client/assets/toast-D7IDKuLa.js +0 -1
- package/dist/client/assets/toggle-DjmkdNns.js +0 -1
- package/dist/client/assets/toggle-group-q7LGJy7u.js +0 -1
- package/dist/client/assets/tooltip-c9oahm_e.js +0 -1
- package/dist/client/assets/types-BJw1h5Ih.js +0 -1
- package/dist/client/assets/uiStateStore-C48VlkZ2.js +0 -1
- package/dist/client/assets/useButton-CbjUY1n3.js +0 -1
- package/dist/client/assets/useCompositeListItem-Mh9CnfjW.js +0 -1
- package/dist/client/assets/useDebouncedValue-fMFxXx4-.js +0 -1
- package/dist/client/assets/useFloatingRootContext-P6J9bP_1.js +0 -1
- package/dist/client/assets/useHandleNewThread-C1VSk4Ji.js +0 -1
- package/dist/client/assets/useLabelableId-ve_G1Djw.js +0 -1
- package/dist/client/assets/useLocation-LUorHj6V.js +0 -1
- package/dist/client/assets/useOpenInteractionType-BcwkVFGu.js +0 -1
- package/dist/client/assets/usePhoneThreadActions--SRv1Gdm.js +0 -1
- package/dist/client/assets/usePopupViewport-DyXMbxzY.js +0 -1
- package/dist/client/assets/useRenderElement-DchFnsR8.js +0 -1
- package/dist/client/assets/useScrollLock-DvPB4gyu.js +0 -1
- package/dist/client/assets/useSwipeDismiss-8zZC4ynu.js +0 -1
- package/dist/client/assets/useThreadActions-wbcN8Mp3.js +0 -2
- package/dist/client/assets/useTriggerFocusGuards-DI2oAYh0.js +0 -1
- package/dist/client/assets/useValueChanged-DeYQvzxH.js +0 -1
- package/dist/client/assets/user-round-Cpzx8pSw.js +0 -1
- package/dist/client/assets/utils-Dz7wQZDk.js +0 -1
- package/dist/client/assets/visibilityPolling-BwzZdaSN.js +0 -1
- package/dist/client/assets/x-C1Cemsov.js +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const require_rolldown_runtime = require("./rolldown-runtime-LGfotAqq.cjs");
|
|
4
|
-
const require_collectUint8StreamText = require("./collectUint8StreamText-
|
|
4
|
+
const require_collectUint8StreamText = require("./collectUint8StreamText-DStwNTTK.cjs");
|
|
5
5
|
const require_Metrics = require("./Metrics-DIjMQ5pa.cjs");
|
|
6
6
|
const require_bin = require("./bin.cjs");
|
|
7
|
-
const require_makeManagedServerProvider = require("./makeManagedServerProvider-
|
|
7
|
+
const require_makeManagedServerProvider = require("./makeManagedServerProvider-VzxWN-04.cjs");
|
|
8
8
|
const require_ProviderDriver = require("./ProviderDriver--rNeAi3B.cjs");
|
|
9
|
-
const require_AcpNativeLogging = require("./AcpNativeLogging-
|
|
9
|
+
const require_AcpNativeLogging = require("./AcpNativeLogging-COepku4a.cjs");
|
|
10
10
|
let effect_Effect = require("effect/Effect");
|
|
11
11
|
effect_Effect = require_rolldown_runtime.__toESM(effect_Effect, 1);
|
|
12
12
|
let effect_Layer = require("effect/Layer");
|
|
@@ -23,6 +23,10 @@ let effect_Cause = require("effect/Cause");
|
|
|
23
23
|
effect_Cause = require_rolldown_runtime.__toESM(effect_Cause, 1);
|
|
24
24
|
let effect_Deferred = require("effect/Deferred");
|
|
25
25
|
effect_Deferred = require_rolldown_runtime.__toESM(effect_Deferred, 1);
|
|
26
|
+
let effect_Exit = require("effect/Exit");
|
|
27
|
+
effect_Exit = require_rolldown_runtime.__toESM(effect_Exit, 1);
|
|
28
|
+
let effect_Option = require("effect/Option");
|
|
29
|
+
effect_Option = require_rolldown_runtime.__toESM(effect_Option, 1);
|
|
26
30
|
let effect_Ref = require("effect/Ref");
|
|
27
31
|
effect_Ref = require_rolldown_runtime.__toESM(effect_Ref, 1);
|
|
28
32
|
let effect_Stream = require("effect/Stream");
|
|
@@ -35,10 +39,6 @@ let effect_FileSystem = require("effect/FileSystem");
|
|
|
35
39
|
effect_FileSystem = require_rolldown_runtime.__toESM(effect_FileSystem, 1);
|
|
36
40
|
let effect_Path = require("effect/Path");
|
|
37
41
|
effect_Path = require_rolldown_runtime.__toESM(effect_Path, 1);
|
|
38
|
-
let effect_Option = require("effect/Option");
|
|
39
|
-
effect_Option = require_rolldown_runtime.__toESM(effect_Option, 1);
|
|
40
|
-
let effect_Exit = require("effect/Exit");
|
|
41
|
-
effect_Exit = require_rolldown_runtime.__toESM(effect_Exit, 1);
|
|
42
42
|
let effect_DateTime = require("effect/DateTime");
|
|
43
43
|
effect_DateTime = require_rolldown_runtime.__toESM(effect_DateTime, 1);
|
|
44
44
|
let effect_PubSub = require("effect/PubSub");
|
|
@@ -861,6 +861,7 @@ function makeGrokAdapter(grokSettings, options) {
|
|
|
861
861
|
updatedAt: now
|
|
862
862
|
};
|
|
863
863
|
ctx = {
|
|
864
|
+
subagentEvents: require_AcpNativeLogging.makeAcpSubagentRuntimeEvents(),
|
|
864
865
|
threadId: input.threadId,
|
|
865
866
|
acpSessionId: started.sessionId,
|
|
866
867
|
session,
|
|
@@ -911,6 +912,14 @@ function makeGrokAdapter(grokSettings, options) {
|
|
|
911
912
|
toolCall: event.toolCall,
|
|
912
913
|
rawPayload: event.rawPayload
|
|
913
914
|
}));
|
|
915
|
+
for (const subagentEvent of yield* ctx.subagentEvents({
|
|
916
|
+
provider: PROVIDER$1,
|
|
917
|
+
threadId: ctx.threadId,
|
|
918
|
+
turnId: ctx.activeTurnId,
|
|
919
|
+
state: event.toolCall.subagent,
|
|
920
|
+
rawPayload: event.rawPayload,
|
|
921
|
+
makeStamp: makeEventStamp
|
|
922
|
+
})) yield* offerRuntimeEventForRuntime(runtimeSessionId, subagentEvent);
|
|
914
923
|
return;
|
|
915
924
|
case "ContentDelta":
|
|
916
925
|
yield* logNative(ctx.threadId, "session/update", event.rawPayload);
|
|
@@ -924,6 +933,17 @@ function makeGrokAdapter(grokSettings, options) {
|
|
|
924
933
|
rawPayload: event.rawPayload
|
|
925
934
|
}));
|
|
926
935
|
return;
|
|
936
|
+
case "ThoughtDelta":
|
|
937
|
+
yield* logNative(ctx.threadId, "session/update", event.rawPayload);
|
|
938
|
+
yield* offerRuntimeEventForRuntime(runtimeSessionId, require_AcpNativeLogging.makeAcpThoughtDeltaEvent({
|
|
939
|
+
stamp: yield* makeEventStamp(),
|
|
940
|
+
provider: PROVIDER$1,
|
|
941
|
+
threadId: ctx.threadId,
|
|
942
|
+
turnId: ctx.activeTurnId,
|
|
943
|
+
text: event.text,
|
|
944
|
+
rawPayload: event.rawPayload
|
|
945
|
+
}));
|
|
946
|
+
return;
|
|
927
947
|
case "UsageUpdated":
|
|
928
948
|
yield* logNative(ctx.threadId, "session/update", event.rawPayload);
|
|
929
949
|
yield* offerRuntimeEventForRuntime(runtimeSessionId, require_AcpNativeLogging.makeAcpTokenUsageEvent({
|
|
@@ -978,8 +998,18 @@ function makeGrokAdapter(grokSettings, options) {
|
|
|
978
998
|
requestedModelId: requestedTurnModelId,
|
|
979
999
|
mapError: (cause) => require_AcpNativeLogging.mapAcpToAdapterError(PROVIDER$1, input.threadId, "session/set_model", cause)
|
|
980
1000
|
});
|
|
981
|
-
const
|
|
1001
|
+
const pathLineEntries = [];
|
|
982
1002
|
const imagePromptParts = yield* effect_Effect.forEach(input.attachments ?? [], (attachment) => effect_Effect.gen(function* () {
|
|
1003
|
+
if (!require_bin.isPersistableChatAttachment(attachment) || attachment.type !== "image") {
|
|
1004
|
+
pathLineEntries.push({
|
|
1005
|
+
attachment,
|
|
1006
|
+
...attachment.id === void 0 ? {} : { resolvedPath: require_bin.resolveAttachmentPath({
|
|
1007
|
+
attachmentsDir: serverConfig.attachmentsDir,
|
|
1008
|
+
attachment
|
|
1009
|
+
}) ?? void 0 }
|
|
1010
|
+
});
|
|
1011
|
+
return null;
|
|
1012
|
+
}
|
|
983
1013
|
const attachmentPath = require_bin.resolveAttachmentPath({
|
|
984
1014
|
attachmentsDir: serverConfig.attachmentsDir,
|
|
985
1015
|
attachment
|
|
@@ -1001,10 +1031,11 @@ function makeGrokAdapter(grokSettings, options) {
|
|
|
1001
1031
|
mimeType: attachment.mimeType
|
|
1002
1032
|
};
|
|
1003
1033
|
}));
|
|
1004
|
-
const
|
|
1034
|
+
const promptText = require_makeManagedServerProvider.appendAttachmentPathLines(input.input?.trim(), require_makeManagedServerProvider.formatAttachmentPathLines(pathLineEntries));
|
|
1035
|
+
const promptParts = [...promptText && promptText.trim().length > 0 ? [{
|
|
1005
1036
|
type: "text",
|
|
1006
|
-
text
|
|
1007
|
-
}] : [], ...imagePromptParts];
|
|
1037
|
+
text: promptText
|
|
1038
|
+
}] : [], ...imagePromptParts.filter((part) => part !== null)];
|
|
1008
1039
|
if (promptParts.length === 0) return yield* new require_bin.ProviderAdapterValidationError({
|
|
1009
1040
|
provider: PROVIDER$1,
|
|
1010
1041
|
operation: "sendTurn",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { g as PtySpawnError, h as PtyAdapter } from "./bin.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { Effect, FileSystem, Layer, Path } from "effect";
|
|
6
6
|
//#region src/terminal/Layers/NodePTY.ts
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const require_rolldown_runtime = require("./rolldown-runtime-LGfotAqq.cjs");
|
|
4
|
-
const require_collectUint8StreamText = require("./collectUint8StreamText-
|
|
4
|
+
const require_collectUint8StreamText = require("./collectUint8StreamText-DStwNTTK.cjs");
|
|
5
5
|
const require_Metrics = require("./Metrics-DIjMQ5pa.cjs");
|
|
6
6
|
const require_bin = require("./bin.cjs");
|
|
7
|
+
const require_makeManagedServerProvider = require("./makeManagedServerProvider-VzxWN-04.cjs");
|
|
7
8
|
const require_sourceControlContextFormatter = require("./sourceControlContextFormatter-BDZqn-4T.cjs");
|
|
8
|
-
const require_makeManagedServerProvider = require("./makeManagedServerProvider-DeEmDbiq.cjs");
|
|
9
9
|
const require_ProviderDriver = require("./ProviderDriver--rNeAi3B.cjs");
|
|
10
10
|
let effect = require("effect");
|
|
11
11
|
let effect_unstable_http = require("effect/unstable/http");
|
|
12
|
+
let node_path = require("node:path");
|
|
13
|
+
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
14
|
+
let node_os = require("node:os");
|
|
15
|
+
node_os = require_rolldown_runtime.__toESM(node_os, 1);
|
|
16
|
+
let node_fs_promises = require("node:fs/promises");
|
|
17
|
+
node_fs_promises = require_rolldown_runtime.__toESM(node_fs_promises, 1);
|
|
12
18
|
require("effect/unstable/process");
|
|
13
19
|
let effect_Semaphore = require("effect/Semaphore");
|
|
14
20
|
effect_Semaphore = require_rolldown_runtime.__toESM(effect_Semaphore, 1);
|
|
@@ -103,14 +109,26 @@ const makeOpenCodeTextGeneration = effect.Effect.fn("makeOpenCodeTextGeneration"
|
|
|
103
109
|
operation: input.operation,
|
|
104
110
|
detail: "OpenCode model selection must use the 'provider/model' format."
|
|
105
111
|
});
|
|
106
|
-
const declaredAttachmentBytes = (input.attachments ?? []).reduce((total, attachment) => total + attachment.sizeBytes, 0);
|
|
112
|
+
const declaredAttachmentBytes = (input.attachments ?? []).reduce((total, attachment) => total + (attachment.sizeBytes ?? 0), 0);
|
|
107
113
|
if (declaredAttachmentBytes > 52428800) return yield* new require_collectUint8StreamText.TextGenerationError({
|
|
108
114
|
operation: input.operation,
|
|
109
115
|
detail: `Attachments total ${declaredAttachmentBytes} bytes; limit is ${require_collectUint8StreamText.PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES} bytes.`
|
|
110
116
|
});
|
|
111
117
|
const attachmentUrlById = /* @__PURE__ */ new Map();
|
|
112
118
|
let attachmentTotalBytes = 0;
|
|
119
|
+
const pathLineEntries = [];
|
|
113
120
|
for (const attachment of input.attachments ?? []) {
|
|
121
|
+
if (!require_bin.isOpenCodeNativeAttachment(attachment)) {
|
|
122
|
+
pathLineEntries.push({
|
|
123
|
+
attachment,
|
|
124
|
+
...attachment.id === void 0 ? {} : { resolvedPath: require_bin.resolveAttachmentPath({
|
|
125
|
+
attachmentsDir: serverConfig.attachmentsDir,
|
|
126
|
+
attachment
|
|
127
|
+
}) ?? void 0 }
|
|
128
|
+
});
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
if (attachment.id === void 0) continue;
|
|
114
132
|
const persisted = require_bin.readPersistedAttachment({
|
|
115
133
|
attachmentsDir: serverConfig.attachmentsDir,
|
|
116
134
|
attachment
|
|
@@ -128,8 +146,9 @@ const makeOpenCodeTextGeneration = effect.Effect.fn("makeOpenCodeTextGeneration"
|
|
|
128
146
|
}
|
|
129
147
|
const fileParts = require_bin.toOpenCodeFileParts({
|
|
130
148
|
attachments: input.attachments,
|
|
131
|
-
resolveAttachmentUrl: (attachment) => attachmentUrlById.get(attachment.id) ?? null
|
|
149
|
+
resolveAttachmentUrl: (attachment) => attachment.id === void 0 ? null : attachmentUrlById.get(attachment.id) ?? null
|
|
132
150
|
});
|
|
151
|
+
const finalPrompt = require_makeManagedServerProvider.appendAttachmentPathLines(input.prompt, require_makeManagedServerProvider.formatAttachmentPathLines(pathLineEntries)) ?? input.prompt;
|
|
133
152
|
const runAgainstServer = (server) => effect.Effect.gen(function* () {
|
|
134
153
|
const client = yield* openCodeRuntime.createOpenCodeSdkClient({
|
|
135
154
|
baseUrl: server.url,
|
|
@@ -165,7 +184,7 @@ const makeOpenCodeTextGeneration = effect.Effect.fn("makeOpenCodeTextGeneration"
|
|
|
165
184
|
...selectedVariant ? { variant: selectedVariant } : {},
|
|
166
185
|
parts: [{
|
|
167
186
|
type: "text",
|
|
168
|
-
text:
|
|
187
|
+
text: finalPrompt
|
|
169
188
|
}, ...fileParts]
|
|
170
189
|
});
|
|
171
190
|
const info = result.data?.info;
|
|
@@ -463,6 +482,44 @@ function mapPermissionDecision(reply) {
|
|
|
463
482
|
default: return "decline";
|
|
464
483
|
}
|
|
465
484
|
}
|
|
485
|
+
/**
|
|
486
|
+
* Maps an OpenCode assistant message's token snapshot into the shared usage
|
|
487
|
+
* shape. OpenCode reports no context window here, so `usedTokens` is the full
|
|
488
|
+
* bucket sum (input incl. cache + output + reasoning) — the same estimate
|
|
489
|
+
* other apps derive by summing buckets when the server reports no total.
|
|
490
|
+
* Reads defensively: older servers and partial event payloads may omit fields.
|
|
491
|
+
*/
|
|
492
|
+
function threadTokenUsageFromOpenCodeTokens(tokens) {
|
|
493
|
+
if (typeof tokens !== "object" || tokens === null) return;
|
|
494
|
+
const record = tokens;
|
|
495
|
+
const nonNegative = (value) => typeof value === "number" && Number.isFinite(value) && value > 0 ? value : 0;
|
|
496
|
+
const inputTokens = nonNegative(record.input) + nonNegative(record.cache?.read) + nonNegative(record.cache?.write);
|
|
497
|
+
const outputTokens = nonNegative(record.output);
|
|
498
|
+
const reasoningTokens = nonNegative(record.reasoning);
|
|
499
|
+
const usedTokens = inputTokens + outputTokens + reasoningTokens;
|
|
500
|
+
if (usedTokens <= 0) return;
|
|
501
|
+
return {
|
|
502
|
+
usedTokens,
|
|
503
|
+
lastUsedTokens: usedTokens,
|
|
504
|
+
...inputTokens > 0 ? { inputTokens } : {},
|
|
505
|
+
...nonNegative(record.cache?.read) > 0 ? { cachedInputTokens: nonNegative(record.cache?.read) } : {},
|
|
506
|
+
...outputTokens > 0 ? { outputTokens } : {},
|
|
507
|
+
...reasoningTokens > 0 ? { reasoningOutputTokens: reasoningTokens } : {}
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
function planStepsFromOpenCodeTodos(todos) {
|
|
511
|
+
const steps = [];
|
|
512
|
+
for (const todo of todos) {
|
|
513
|
+
if (todo.status === "cancelled") continue;
|
|
514
|
+
const step = typeof todo.content === "string" ? todo.content.trim() : "";
|
|
515
|
+
if (!step) continue;
|
|
516
|
+
steps.push({
|
|
517
|
+
step,
|
|
518
|
+
status: todo.status === "completed" ? "completed" : todo.status === "in_progress" ? "inProgress" : "pending"
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
return steps;
|
|
522
|
+
}
|
|
466
523
|
function resolveTurnSnapshot(context, turnId) {
|
|
467
524
|
const existing = context.turns.find((turn) => turn.id === turnId);
|
|
468
525
|
if (existing) return existing;
|
|
@@ -953,11 +1010,43 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
953
1010
|
case "session.created":
|
|
954
1011
|
yield* registerOpenCodeChildSession(context, event.properties.info, event);
|
|
955
1012
|
break;
|
|
1013
|
+
case "todo.updated": {
|
|
1014
|
+
if (event.properties.sessionID !== context.openCodeSessionId) break;
|
|
1015
|
+
const plan = planStepsFromOpenCodeTodos(event.properties.todos);
|
|
1016
|
+
if (plan.length === 0) break;
|
|
1017
|
+
const fingerprint = JSON.stringify(plan);
|
|
1018
|
+
if (context.lastPlanFingerprint === fingerprint) break;
|
|
1019
|
+
context.lastPlanFingerprint = fingerprint;
|
|
1020
|
+
yield* emitForContext(context, {
|
|
1021
|
+
...yield* buildEventBase({
|
|
1022
|
+
threadId: context.session.threadId,
|
|
1023
|
+
turnId,
|
|
1024
|
+
raw: event
|
|
1025
|
+
}),
|
|
1026
|
+
type: "turn.plan.updated",
|
|
1027
|
+
payload: { plan }
|
|
1028
|
+
});
|
|
1029
|
+
break;
|
|
1030
|
+
}
|
|
956
1031
|
case "message.updated":
|
|
957
1032
|
context.messageRoleById.set(scopedOpenCodeId(event.properties.sessionID, event.properties.info.id), event.properties.info.role);
|
|
958
|
-
if (event.properties.info.role === "assistant")
|
|
959
|
-
if (
|
|
960
|
-
|
|
1033
|
+
if (event.properties.info.role === "assistant") {
|
|
1034
|
+
if (event.properties.sessionID === context.openCodeSessionId) {
|
|
1035
|
+
const usage = threadTokenUsageFromOpenCodeTokens(event.properties.info.tokens);
|
|
1036
|
+
if (usage) yield* emitForContext(context, {
|
|
1037
|
+
...yield* buildEventBase({
|
|
1038
|
+
threadId: context.session.threadId,
|
|
1039
|
+
turnId,
|
|
1040
|
+
raw: event
|
|
1041
|
+
}),
|
|
1042
|
+
type: "thread.token-usage.updated",
|
|
1043
|
+
payload: { usage }
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
for (const part of context.partById.values()) {
|
|
1047
|
+
if (part.sessionID !== event.properties.sessionID || part.messageID !== event.properties.info.id) continue;
|
|
1048
|
+
yield* emitAssistantTextDelta(context, part, turnId, event);
|
|
1049
|
+
}
|
|
961
1050
|
}
|
|
962
1051
|
break;
|
|
963
1052
|
case "message.removed":
|
|
@@ -1022,18 +1111,16 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1022
1111
|
const title = part.state.status === "running" ? part.state.title ?? part.tool : part.tool;
|
|
1023
1112
|
const detail = detailFromToolPart(part);
|
|
1024
1113
|
const childSubagent = context.subagentBySessionId.get(part.sessionID);
|
|
1025
|
-
if (childSubagent) {
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
});
|
|
1033
|
-
break;
|
|
1034
|
-
}
|
|
1114
|
+
if (childSubagent) yield* emitOpenCodeSubagentUpdated(context, {
|
|
1115
|
+
subagent: childSubagent,
|
|
1116
|
+
status: statusFromOpenCodeSubagentState("running"),
|
|
1117
|
+
summary: title,
|
|
1118
|
+
detail,
|
|
1119
|
+
raw: event
|
|
1120
|
+
});
|
|
1035
1121
|
const payload = {
|
|
1036
1122
|
itemType,
|
|
1123
|
+
...childSubagent ? { agentId: String(childSubagent.subagentId) } : {},
|
|
1037
1124
|
...part.state.status === "error" ? { status: "failed" } : part.state.status === "completed" ? { status: "completed" } : { status: "inProgress" },
|
|
1038
1125
|
...title ? { title } : {},
|
|
1039
1126
|
...detail ? { detail } : {},
|
|
@@ -1053,7 +1140,7 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1053
1140
|
type: part.state.status === "pending" ? "item.started" : part.state.status === "completed" || part.state.status === "error" ? "item.completed" : "item.updated",
|
|
1054
1141
|
payload
|
|
1055
1142
|
};
|
|
1056
|
-
appendTurnItem(context, turnId, part);
|
|
1143
|
+
if (!childSubagent) appendTurnItem(context, turnId, part);
|
|
1057
1144
|
yield* emitForContext(context, runtimeEvent);
|
|
1058
1145
|
}
|
|
1059
1146
|
break;
|
|
@@ -1076,7 +1163,8 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1076
1163
|
}
|
|
1077
1164
|
});
|
|
1078
1165
|
break;
|
|
1079
|
-
case "permission.replied":
|
|
1166
|
+
case "permission.replied": {
|
|
1167
|
+
const permissionRequest = context.pendingPermissions.get(event.properties.requestID);
|
|
1080
1168
|
context.resolvedRequestIds.add(event.properties.requestID);
|
|
1081
1169
|
context.pendingPermissions.delete(event.properties.requestID);
|
|
1082
1170
|
yield* emitForContext(context, {
|
|
@@ -1088,11 +1176,12 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1088
1176
|
}),
|
|
1089
1177
|
type: "request.resolved",
|
|
1090
1178
|
payload: {
|
|
1091
|
-
requestType: "unknown",
|
|
1179
|
+
requestType: permissionRequest ? mapPermissionToRequestType(permissionRequest.permission) : "unknown",
|
|
1092
1180
|
decision: mapPermissionDecision(event.properties.reply)
|
|
1093
1181
|
}
|
|
1094
1182
|
});
|
|
1095
1183
|
break;
|
|
1184
|
+
}
|
|
1096
1185
|
case "question.asked":
|
|
1097
1186
|
if (context.resolvedRequestIds.has(event.properties.id) || context.pendingQuestions.has(event.properties.id)) break;
|
|
1098
1187
|
context.pendingQuestions.set(event.properties.id, event.properties);
|
|
@@ -1157,26 +1246,34 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1157
1246
|
});
|
|
1158
1247
|
break;
|
|
1159
1248
|
}
|
|
1160
|
-
if (event.properties.status.type === "busy")
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
yield* emitForContext(context, {
|
|
1166
|
-
...yield* buildEventBase({
|
|
1167
|
-
threadId: context.session.threadId,
|
|
1168
|
-
turnId,
|
|
1169
|
-
raw: event
|
|
1170
|
-
}),
|
|
1171
|
-
type: "runtime.warning",
|
|
1172
|
-
payload: {
|
|
1173
|
-
message: event.properties.status.message,
|
|
1174
|
-
detail: event.properties.status
|
|
1175
|
-
}
|
|
1249
|
+
if (event.properties.status.type === "busy") {
|
|
1250
|
+
context.lastRetryKey = void 0;
|
|
1251
|
+
updateProviderSession(context, {
|
|
1252
|
+
status: "running",
|
|
1253
|
+
activeTurnId: turnId
|
|
1176
1254
|
});
|
|
1255
|
+
}
|
|
1256
|
+
if (event.properties.status.type === "retry") {
|
|
1257
|
+
const retryKey = `${event.properties.status.attempt}:${event.properties.status.message}`;
|
|
1258
|
+
if (context.lastRetryKey !== retryKey) {
|
|
1259
|
+
context.lastRetryKey = retryKey;
|
|
1260
|
+
yield* emitForContext(context, {
|
|
1261
|
+
...yield* buildEventBase({
|
|
1262
|
+
threadId: context.session.threadId,
|
|
1263
|
+
turnId,
|
|
1264
|
+
raw: event
|
|
1265
|
+
}),
|
|
1266
|
+
type: "runtime.warning",
|
|
1267
|
+
payload: {
|
|
1268
|
+
message: event.properties.status.message,
|
|
1269
|
+
detail: event.properties.status
|
|
1270
|
+
}
|
|
1271
|
+
});
|
|
1272
|
+
}
|
|
1177
1273
|
break;
|
|
1178
1274
|
}
|
|
1179
1275
|
if (event.properties.status.type === "idle" && turnId) {
|
|
1276
|
+
context.lastRetryKey = void 0;
|
|
1180
1277
|
if (context.pendingPrompt?.turnId === turnId) {
|
|
1181
1278
|
context.pendingPrompt.idleEvent = event;
|
|
1182
1279
|
break;
|
|
@@ -1412,6 +1509,8 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1412
1509
|
activeTurnId: void 0,
|
|
1413
1510
|
activeAgent: void 0,
|
|
1414
1511
|
activeVariant: void 0,
|
|
1512
|
+
lastPlanFingerprint: void 0,
|
|
1513
|
+
lastRetryKey: void 0,
|
|
1415
1514
|
promptSemaphore: yield* effect.Semaphore.make(1),
|
|
1416
1515
|
pendingPrompt: void 0,
|
|
1417
1516
|
promptGeneration: 0,
|
|
@@ -1464,14 +1563,25 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1464
1563
|
const formatted = require_sourceControlContextFormatter.formatSourceControlContextsForAgent(input.sourceControlContexts ?? []);
|
|
1465
1564
|
let text = formatted ? formatted + "\n\n" + (input.input?.trim() ?? "") : input.input?.trim();
|
|
1466
1565
|
const attachmentUrlById = /* @__PURE__ */ new Map();
|
|
1467
|
-
const declaredAttachmentBytes = (input.attachments ?? []).reduce((total, attachment) => total + attachment.sizeBytes, 0);
|
|
1566
|
+
const declaredAttachmentBytes = (input.attachments ?? []).reduce((total, attachment) => total + (attachment.sizeBytes ?? 0), 0);
|
|
1468
1567
|
if (declaredAttachmentBytes > 52428800) return yield* new require_bin.ProviderAdapterRequestError({
|
|
1469
1568
|
provider: PROVIDER$1,
|
|
1470
1569
|
method: "session.prompt",
|
|
1471
1570
|
detail: `Attachments total ${declaredAttachmentBytes} bytes; limit is ${require_collectUint8StreamText.PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES} bytes.`
|
|
1472
1571
|
});
|
|
1473
1572
|
let attachmentTotalBytes = 0;
|
|
1573
|
+
const pathLineEntries = [];
|
|
1474
1574
|
for (const attachment of input.attachments ?? []) {
|
|
1575
|
+
if (!require_bin.isOpenCodeNativeAttachment(attachment)) {
|
|
1576
|
+
pathLineEntries.push({
|
|
1577
|
+
attachment,
|
|
1578
|
+
...attachment.id === void 0 ? {} : { resolvedPath: require_bin.resolveAttachmentPath({
|
|
1579
|
+
attachmentsDir: serverConfig.attachmentsDir,
|
|
1580
|
+
attachment
|
|
1581
|
+
}) ?? void 0 }
|
|
1582
|
+
});
|
|
1583
|
+
continue;
|
|
1584
|
+
}
|
|
1475
1585
|
const persisted = require_bin.readPersistedAttachment({
|
|
1476
1586
|
attachmentsDir: serverConfig.attachmentsDir,
|
|
1477
1587
|
attachment
|
|
@@ -1489,9 +1599,10 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1489
1599
|
detail: `Attachments total ${attachmentTotalBytes} bytes; limit is ${require_collectUint8StreamText.PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES} bytes.`
|
|
1490
1600
|
});
|
|
1491
1601
|
}
|
|
1602
|
+
text = require_makeManagedServerProvider.appendAttachmentPathLines(text, require_makeManagedServerProvider.formatAttachmentPathLines(pathLineEntries));
|
|
1492
1603
|
const fileParts = require_bin.toOpenCodeFileParts({
|
|
1493
1604
|
attachments: input.attachments,
|
|
1494
|
-
resolveAttachmentUrl: (attachment) => attachmentUrlById.get(attachment.id) ?? null
|
|
1605
|
+
resolveAttachmentUrl: (attachment) => attachment.id === void 0 ? null : attachmentUrlById.get(attachment.id) ?? null
|
|
1495
1606
|
});
|
|
1496
1607
|
if ((!text || text.length === 0) && fileParts.length === 0) return yield* new require_bin.ProviderAdapterValidationError({
|
|
1497
1608
|
provider: PROVIDER$1,
|
|
@@ -1721,6 +1832,91 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1721
1832
|
});
|
|
1722
1833
|
}
|
|
1723
1834
|
//#endregion
|
|
1835
|
+
//#region src/provider/Layers/OpenCodeGoUsage.ts
|
|
1836
|
+
/**
|
|
1837
|
+
* OpenCodeGoUsage — probes OpenCode Go subscription usage limits.
|
|
1838
|
+
*
|
|
1839
|
+
* Mirrors `ClaudeUsage.ts`: reads the OpenCode CLI's credential store
|
|
1840
|
+
* (`<data dir>/auth.json`), calls the Go usage API with the stored
|
|
1841
|
+
* `opencode-go` API key, and maps the response onto the shared
|
|
1842
|
+
* `ServerProviderRateLimits` contract (rolling → primary, weekly →
|
|
1843
|
+
* secondary, monthly → tertiary).
|
|
1844
|
+
*
|
|
1845
|
+
* Every failure path degrades to `undefined` — a missing Go key or an
|
|
1846
|
+
* unreachable API must never make the provider snapshot probe fail.
|
|
1847
|
+
*
|
|
1848
|
+
* @module provider/Layers/OpenCodeGoUsage
|
|
1849
|
+
*/
|
|
1850
|
+
const OPENCODE_GO_USAGE_API = "https://opencode.ai/zen/go/v1/usage";
|
|
1851
|
+
const OPENCODE_GO_USAGE_TIMEOUT_MS = 5e3;
|
|
1852
|
+
const ROLLING_WINDOW_DURATION_MINS = 300;
|
|
1853
|
+
const WEEKLY_WINDOW_DURATION_MINS = 10080;
|
|
1854
|
+
const MONTHLY_WINDOW_DURATION_MINS = 43200;
|
|
1855
|
+
function resolveOpenCodeDataDirPath(environment = process.env) {
|
|
1856
|
+
const xdgDataHome = environment.XDG_DATA_HOME?.trim();
|
|
1857
|
+
const home = environment.HOME?.trim() || node_os.homedir();
|
|
1858
|
+
const base = xdgDataHome && xdgDataHome.length > 0 ? xdgDataHome : node_path.join(home, ".local", "share");
|
|
1859
|
+
return node_path.join(base, "opencode");
|
|
1860
|
+
}
|
|
1861
|
+
async function readOpenCodeGoApiKey(environment) {
|
|
1862
|
+
try {
|
|
1863
|
+
const authPath = node_path.join(resolveOpenCodeDataDirPath(environment), "auth.json");
|
|
1864
|
+
const key = JSON.parse(await node_fs_promises.readFile(authPath, "utf8"))["opencode-go"]?.key;
|
|
1865
|
+
if (typeof key !== "string" || key.trim().length === 0) return;
|
|
1866
|
+
return key.trim();
|
|
1867
|
+
} catch {
|
|
1868
|
+
return;
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
function parseOpenCodeGoUsageRateLimits(data) {
|
|
1872
|
+
const windows = data?.usage;
|
|
1873
|
+
if (!windows || typeof windows !== "object") return;
|
|
1874
|
+
const buildWindow = (raw, windowDurationMins) => {
|
|
1875
|
+
if (!raw || typeof raw !== "object" || typeof raw.percent !== "number") return;
|
|
1876
|
+
if (!Number.isFinite(raw.percent)) return;
|
|
1877
|
+
const resetsAt = typeof raw.resetsAt === "string" ? Date.parse(raw.resetsAt) : NaN;
|
|
1878
|
+
return {
|
|
1879
|
+
usedPercent: raw.percent,
|
|
1880
|
+
windowDurationMins,
|
|
1881
|
+
...Number.isFinite(resetsAt) ? { resetsAt: Math.floor(resetsAt / 1e3) } : {}
|
|
1882
|
+
};
|
|
1883
|
+
};
|
|
1884
|
+
const primary = buildWindow(windows.rolling, ROLLING_WINDOW_DURATION_MINS);
|
|
1885
|
+
const secondary = buildWindow(windows.weekly, WEEKLY_WINDOW_DURATION_MINS);
|
|
1886
|
+
const tertiary = buildWindow(windows.monthly, MONTHLY_WINDOW_DURATION_MINS);
|
|
1887
|
+
if (!primary && !secondary && !tertiary) return;
|
|
1888
|
+
return {
|
|
1889
|
+
limitId: "opencode-go",
|
|
1890
|
+
limitName: "OpenCode Go",
|
|
1891
|
+
planType: "go",
|
|
1892
|
+
...primary ? { primary } : {},
|
|
1893
|
+
...secondary ? { secondary } : {},
|
|
1894
|
+
...tertiary ? { tertiary } : {}
|
|
1895
|
+
};
|
|
1896
|
+
}
|
|
1897
|
+
async function fetchOpenCodeGoUsageRateLimits(input) {
|
|
1898
|
+
const apiKey = await readOpenCodeGoApiKey(input.environment);
|
|
1899
|
+
if (!apiKey) return;
|
|
1900
|
+
const response = await input.fetchImpl(OPENCODE_GO_USAGE_API, {
|
|
1901
|
+
headers: {
|
|
1902
|
+
Authorization: `Bearer ${apiKey}`,
|
|
1903
|
+
Accept: "application/json"
|
|
1904
|
+
},
|
|
1905
|
+
signal: AbortSignal.timeout(OPENCODE_GO_USAGE_TIMEOUT_MS)
|
|
1906
|
+
});
|
|
1907
|
+
if (!response.ok) return;
|
|
1908
|
+
return parseOpenCodeGoUsageRateLimits(await response.json());
|
|
1909
|
+
}
|
|
1910
|
+
const probeOpenCodeGoUsageRateLimits = effect.Effect.fn("probeOpenCodeGoUsageRateLimits")(function* (environment = process.env, fetchImpl = fetch) {
|
|
1911
|
+
return yield* effect.Effect.tryPromise({
|
|
1912
|
+
try: () => fetchOpenCodeGoUsageRateLimits({
|
|
1913
|
+
environment,
|
|
1914
|
+
fetchImpl
|
|
1915
|
+
}),
|
|
1916
|
+
catch: () => void 0
|
|
1917
|
+
}).pipe(effect.Effect.orElseSucceed(() => void 0));
|
|
1918
|
+
});
|
|
1919
|
+
//#endregion
|
|
1724
1920
|
//#region src/provider/Layers/OpenCodeProvider.ts
|
|
1725
1921
|
const PROVIDER = require_collectUint8StreamText.ProviderDriverKind.make("opencode");
|
|
1726
1922
|
const OPENCODE_PRESENTATION = {
|
|
@@ -1831,6 +2027,7 @@ function flattenOpenCodeModels(input) {
|
|
|
1831
2027
|
if (!modelId || !name) continue;
|
|
1832
2028
|
const subProvider = require_bin.nonEmptyTrimmed(provider.name);
|
|
1833
2029
|
const shortName = subProvider ? deriveShortNameByStrippingPrefix(name, subProvider) : void 0;
|
|
2030
|
+
const maxContextTokens = model.limit?.context;
|
|
1834
2031
|
const slug = `${provider.id}/${modelId}`;
|
|
1835
2032
|
if (models.has(slug)) continue;
|
|
1836
2033
|
models.set(slug, {
|
|
@@ -1838,6 +2035,7 @@ function flattenOpenCodeModels(input) {
|
|
|
1838
2035
|
name,
|
|
1839
2036
|
...subProvider ? { subProvider } : {},
|
|
1840
2037
|
...shortName ? { shortName } : {},
|
|
2038
|
+
...typeof maxContextTokens === "number" && Number.isFinite(maxContextTokens) && maxContextTokens > 0 ? { maxContextTokens: Math.floor(maxContextTokens) } : {},
|
|
1841
2039
|
isCustom: false,
|
|
1842
2040
|
capabilities: openCodeCapabilitiesForModel({
|
|
1843
2041
|
providerID: provider.id,
|
|
@@ -1891,7 +2089,7 @@ const makePendingOpenCodeProvider = (openCodeSettings) => {
|
|
|
1891
2089
|
}
|
|
1892
2090
|
});
|
|
1893
2091
|
};
|
|
1894
|
-
const checkOpenCodeProviderStatus = effect.Effect.fn("checkOpenCodeProviderStatus")(function* (openCodeSettings, cwd, environment = process.env) {
|
|
2092
|
+
const checkOpenCodeProviderStatus = effect.Effect.fn("checkOpenCodeProviderStatus")(function* (openCodeSettings, cwd, environment = process.env, probeUsage = probeOpenCodeGoUsageRateLimits) {
|
|
1895
2093
|
const openCodeRuntime = yield* require_bin.OpenCodeRuntime;
|
|
1896
2094
|
const checkedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1897
2095
|
const customModels = openCodeSettings.customModels;
|
|
@@ -1990,11 +2188,13 @@ const checkOpenCodeProviderStatus = effect.Effect.fn("checkOpenCodeProviderStatu
|
|
|
1990
2188
|
version = inventoryExit.value.serverVersion;
|
|
1991
2189
|
const models = require_bin.providerModelsFromSettings(flattenOpenCodeModels(inventoryExit.value.inventory), PROVIDER, customModels, DEFAULT_OPENCODE_MODEL_CAPABILITIES);
|
|
1992
2190
|
const connectedCount = new Set(inventoryExit.value.inventory.providerList.connected).size;
|
|
2191
|
+
const rateLimits = yield* probeUsage(environment).pipe(effect.Effect.orElseSucceed(() => void 0));
|
|
1993
2192
|
return require_bin.buildServerProvider({
|
|
1994
2193
|
presentation: OPENCODE_PRESENTATION,
|
|
1995
2194
|
enabled: true,
|
|
1996
2195
|
checkedAt,
|
|
1997
2196
|
models,
|
|
2197
|
+
...rateLimits ? { rateLimits } : {},
|
|
1998
2198
|
probe: {
|
|
1999
2199
|
installed: true,
|
|
2000
2200
|
version,
|