ryco-cli 0.1.21 → 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-D54V5cIY.cjs → AcpNativeLogging-COepku4a.cjs} +78 -7
- package/dist/{AcpNativeLogging-Ch-s9nA8.mjs → AcpNativeLogging-D7e1dn7s.mjs} +74 -9
- package/dist/{AzureDevOpsSourceControlProvider-DTOlXGyd.mjs → AzureDevOpsSourceControlProvider-BNGEg1R8.mjs} +3 -3
- package/dist/{AzureDevOpsSourceControlProvider-BzB5-N9m.cjs → AzureDevOpsSourceControlProvider-CrvgKNf2.cjs} +2 -2
- package/dist/{BitbucketSourceControlProvider-DGd4IPx5.mjs → BitbucketSourceControlProvider-Bt21jw68.mjs} +3 -3
- package/dist/{BitbucketSourceControlProvider-D-8PWXO3.cjs → BitbucketSourceControlProvider-BzhsQwH-.cjs} +2 -2
- package/dist/{BunPTY-CNvWSzEJ.mjs → BunPTY-TbHbSc8S.mjs} +1 -1
- package/dist/{ClaudeDriver-DxowtK6I.mjs → ClaudeDriver-D65SPdHR.mjs} +44 -119
- package/dist/{ClaudeDriver-HEbUzW34.cjs → ClaudeDriver-D7NatUx6.cjs} +52 -127
- package/dist/{CodexDriver-CccSWoP3.mjs → CodexDriver-D4z5-wUD.mjs} +237 -50
- package/dist/{CodexDriver-YG4IwzLm.cjs → CodexDriver-DWGtHt9r.cjs} +235 -48
- package/dist/{CodexTextGeneration-CBJHkgOz.cjs → CodexTextGeneration-B4tJTUDo.cjs} +1 -1
- package/dist/{CodexTextGeneration-BfGt7ZUe.mjs → CodexTextGeneration-BikHow8k.mjs} +2 -2
- package/dist/{CopilotDriver-Bm4OZMkm.cjs → CopilotDriver-DJvYncGI.cjs} +122 -23
- package/dist/{CopilotDriver-DZAW-7yV.mjs → CopilotDriver-ZvvsAIkd.mjs} +123 -24
- package/dist/{CursorDriver-B4jb4rWd.mjs → CursorDriver-B1QSBzuH.mjs} +34 -74
- package/dist/{CursorDriver-CYcKAkUY.cjs → CursorDriver-D3I4KULs.cjs} +33 -73
- package/dist/{ForgejoSourceControlProvider-Dfi8KH7I.mjs → ForgejoSourceControlProvider-BGXysSX6.mjs} +3 -3
- package/dist/{ForgejoSourceControlProvider-CXUevO6C.cjs → ForgejoSourceControlProvider-Dh6DOoc8.cjs} +2 -2
- package/dist/{GitHubSourceControlProvider-DOs1ouvp.cjs → GitHubSourceControlProvider-8hsv_kCE.cjs} +2 -2
- package/dist/{GitHubSourceControlProvider-BH97aNa0.mjs → GitHubSourceControlProvider-CPCYV8Xo.mjs} +3 -3
- package/dist/{GitLabSourceControlProvider-CfbE6GYD.cjs → GitLabSourceControlProvider-B0ZbF9Zx.cjs} +2 -2
- package/dist/{GitLabSourceControlProvider-nIzcy9AJ.mjs → GitLabSourceControlProvider-Bvknpaon.mjs} +3 -3
- package/dist/{GrokDriver-CENrrqQc.mjs → GrokDriver-DgQe3pKz.mjs} +30 -10
- package/dist/{GrokDriver-C35gWEiw.cjs → GrokDriver-_puXDTU3.cjs} +31 -11
- package/dist/{NodePTY-lO8PwZLk.mjs → NodePTY-B_p5tLYO.mjs} +1 -1
- package/dist/{OpenCodeDriver-CHuQ6Xhc.cjs → OpenCodeDriver-401RexI0.cjs} +137 -19
- package/dist/{OpenCodeDriver-BIxSPI9J.mjs → OpenCodeDriver-DNUlF8M-.mjs} +135 -20
- package/dist/{SourceControlProviderDiscoveryCatalog-DaRgCE5d.mjs → SourceControlProviderDiscoveryCatalog-B37RHe2u.mjs} +1 -1
- package/dist/{SourceControlProviderDiscoveryCatalog-DCmYsPEa.cjs → SourceControlProviderDiscoveryCatalog-DreaAH1H.cjs} +1 -1
- package/dist/bin.cjs +4508 -613
- package/dist/bin.mjs +4499 -615
- 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-TXvkTDG8.js → ExternalIdentityWeb.logic-CGJKCFPo.js} +1 -1
- package/dist/client/assets/{GlassSurface-k7VAG7Dp.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-Cpzyop0g.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-BWOy8LJG.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-ro03rSMk.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-CBbr_lPX.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-DUe5V2Mj.js → badge-m9kM3P07.js} +1 -1
- package/dist/client/assets/{bot-DJp0cuhK.js → bot-Cv7a7Ksf.js} +1 -1
- package/dist/client/assets/{button-BdUaa4U1.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-CQJvt69U.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-DCgzArdM.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-B7pkMeOn.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-B1VrUJXw.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-C7IGaRXO.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-WiaEF1ae.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-Bxew8m4Q.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-Cgjn5Y-7.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-BPNtoDXL.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-BQkcb-1_.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-D8TBiBWk.mjs → collectUint8StreamText-C_VNyArd.mjs} +614 -20
- package/dist/{collectUint8StreamText-C5fop6Zf.cjs → collectUint8StreamText-DStwNTTK.cjs} +679 -19
- package/dist/{makeManagedServerProvider-DRlNwlhe.mjs → makeManagedServerProvider-GZcpSLrW.mjs} +22 -3
- package/dist/{makeManagedServerProvider-BytnBN6b.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--RGb4Xyh.js +0 -1
- package/dist/client/assets/AiFocusSettings-BnGcbAMj.js +0 -1
- package/dist/client/assets/AnimatedHeight-xBldRJT_.js +0 -1
- package/dist/client/assets/AppearanceSettings-BZRfC5N0.js +0 -1
- package/dist/client/assets/BranchToolbar.logic-CGpYXkLE.js +0 -1
- package/dist/client/assets/ChatRightPanel-BlooofmF.js +0 -27
- package/dist/client/assets/ChatThreadRouteView-B28bv4Zt.js +0 -1
- package/dist/client/assets/CommandPaletteDialog-hNEraTe2.js +0 -1
- package/dist/client/assets/CompositeItem-CKY4wPzb.js +0 -1
- package/dist/client/assets/CompositeRoot-Ds7U4w5S.js +0 -1
- package/dist/client/assets/ConnectionsSettings-C4VqR67L.js +0 -7
- package/dist/client/assets/DiagnosticsSettings-ByZ42-mW.js +0 -2
- package/dist/client/assets/DialogHandle-BdmgCiER.js +0 -1
- package/dist/client/assets/DialogPopup-D6m8w7-0.js +0 -1
- package/dist/client/assets/DialogRoot-BnE2_J9j.js +0 -1
- package/dist/client/assets/DialogTitle-DFkPQ5wa.js +0 -1
- package/dist/client/assets/DialogTrigger-CTCt2xVs.js +0 -1
- package/dist/client/assets/DialogViewport-OqbNjTEg.js +0 -1
- package/dist/client/assets/DraftChatThreadRouteView-B_4VVh8J.js +0 -1
- package/dist/client/assets/HostedConnectionControls-D0YyFVVm.js +0 -1
- package/dist/client/assets/HostedHubRoot-gr9o6h-w.js +0 -1
- package/dist/client/assets/HostedNativeAuthorizationRoute-DQy7gPHg.js +0 -1
- package/dist/client/assets/HostedRelayTrustNotice-DtiCe1oF.js +0 -1
- package/dist/client/assets/Icons-BHigZ6eO.js +0 -1
- package/dist/client/assets/IntegrationsSettingsPanel-RgmTIo_4.js +0 -1
- package/dist/client/assets/KeybindingsSettings-2J94301x.js +0 -7
- package/dist/client/assets/MobileSheet-5RNq1fWV.js +0 -1
- package/dist/client/assets/NewWorktreeDialog-BE_53fbt.js +0 -4
- package/dist/client/assets/NoActiveThreadState-Cpar0wiW.js +0 -1
- package/dist/client/assets/NodeSecuritySettings-BpZYwf5z.js +0 -1
- package/dist/client/assets/OpinionatedPluginsSettings-CLbbw_K_.js +0 -1
- package/dist/client/assets/PhoneGetAppInterstitial-G1mx30Rm.js +0 -1
- package/dist/client/assets/PhoneGetAppInterstitialBackdrop-nfP93au3.js +0 -1
- package/dist/client/assets/PhoneHome-D24dskaK.js +0 -1
- package/dist/client/assets/PhoneSettingsSurface-DU6QcRMa.js +0 -1
- package/dist/client/assets/ProjectFavicon-DiAvCEOv.js +0 -1
- package/dist/client/assets/ProviderModelPicker-KKoDIb0I.js +0 -1
- package/dist/client/assets/ProvidersSettingsPanel-Cotp9jkx.js +0 -1
- package/dist/client/assets/RedactedSensitiveText-Bijn-7t0.js +0 -1
- package/dist/client/assets/RootAppShell-BPFAVRor.js +0 -6
- package/dist/client/assets/RycoLetterMark-DDqdXSCR.js +0 -1
- package/dist/client/assets/SettingsDialog-C1pQqIpt.js +0 -1
- package/dist/client/assets/SettingsPanels-_z4Xw8vV.js +0 -3
- package/dist/client/assets/SettingsPanels.editor-CFrJ6eJl.js +0 -1
- package/dist/client/assets/SourceControlSettings-aZXtdyQJ.js +0 -1
- package/dist/client/assets/StatisticsPage-DLxnsLkl.js +0 -1
- package/dist/client/assets/StatisticsPanel-CZng52aF.js +0 -1
- package/dist/client/assets/StatisticsSettingsLink-BswiD6v1.js +0 -1
- package/dist/client/assets/ThreadStatusIndicators-Dg7ByO0t.js +0 -0
- package/dist/client/assets/ThreadWorkspacePanel-j_muuK0U.js +0 -2009
- package/dist/client/assets/ToolbarRootContext-gBA5VTsh.js +0 -1
- package/dist/client/assets/alert-DM55UBFJ.js +0 -1
- package/dist/client/assets/alert-dialog-t0tth9lg.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-jiPI8hG1.js +0 -1
- package/dist/client/assets/branding-31Bj-8ZC.js +0 -1
- package/dist/client/assets/capabilities-DQDkV1US.js +0 -1
- package/dist/client/assets/chatThreadActions-3VwZmcuQ.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-BmAgbTeN.js +0 -1
- package/dist/client/assets/command-8YtR6jmS.js +0 -1
- package/dist/client/assets/composerDraftStore-Bz5WIZBE.js +0 -11
- package/dist/client/assets/data-list-D7UF_rKC.js +0 -1
- package/dist/client/assets/desktopUpdateAtoms-D_GMRE2r.js +0 -1
- package/dist/client/assets/desktopWorkspace-Dg6EeBlb.js +0 -1
- package/dist/client/assets/device-DlExHdp_.js +0 -168
- package/dist/client/assets/dialog-B0sUgnpe.js +0 -1
- package/dist/client/assets/draft-input-CljKajxE.js +0 -1
- package/dist/client/assets/editorPreferences-B3qgjPa6.js +0 -1
- package/dist/client/assets/empty-D5W-VFFg.js +0 -1
- package/dist/client/assets/env-3rzMJf1D.js +0 -1
- package/dist/client/assets/folder-open-GqwNTbSV.js +0 -1
- package/dist/client/assets/getPseudoElementBounds-BAmGtfzA.js +0 -1
- package/dist/client/assets/group-BQB2fHcw.js +0 -1
- package/dist/client/assets/input-5Gxk32uP.js +0 -1
- package/dist/client/assets/kbd-B4HCyWpi.js +0 -1
- package/dist/client/assets/label-CaZNWVUA.js +0 -1
- package/dist/client/assets/loader-circle-CrtHFAvM.js +0 -1
- package/dist/client/assets/main-BPfnkW0F.js +0 -9
- package/dist/client/assets/main-DspUYA0Y.css +0 -2
- package/dist/client/assets/menu-C9Z3D_7l.js +0 -1
- package/dist/client/assets/plus-B2h-VEqh.js +0 -1
- package/dist/client/assets/popover-CCz2VJor.js +0 -1
- package/dist/client/assets/primary-BMsRfh2b.js +0 -2
- package/dist/client/assets/providerDriverMeta-CgWTJ9AV.js +0 -1
- package/dist/client/assets/providerIconUtils-DKIWQBl_.js +0 -1
- package/dist/client/assets/providerInstances-DTwJD7w4.js +0 -1
- package/dist/client/assets/providerModels-DTwJD7w4.js +0 -1
- package/dist/client/assets/qr-code-BPTdK_Fr.js +0 -1
- package/dist/client/assets/radio-group-2REtGBUc.js +0 -2
- package/dist/client/assets/resolveAriaLabelledBy-CPzaFh9Q.js +0 -1
- package/dist/client/assets/rightPanelRouteSearch-Cv7sQjf8.js +0 -1
- package/dist/client/assets/runtime-DAfYpzw4.js +0 -1
- package/dist/client/assets/scroll-area-BsYcpnWD.js +0 -1
- package/dist/client/assets/scrollEdges-CUJFIJBP.js +0 -1
- package/dist/client/assets/search-BGQsenCM.js +0 -1
- package/dist/client/assets/select-zInJ5G5C.js +0 -1
- package/dist/client/assets/separator-CsdeZPxC.js +0 -1
- package/dist/client/assets/session-logic-CjEpVbpM.js +0 -6
- package/dist/client/assets/settingsDialogStore-B7yUTgbo.js +0 -1
- package/dist/client/assets/settingsLayout-7JR7nC6x.js +0 -1
- package/dist/client/assets/settingsSections.logic-F8RXVmAq.js +0 -1
- package/dist/client/assets/sheet-CLd8wqAA.js +0 -1
- package/dist/client/assets/sidebar-BliCAaUG.js +0 -1
- package/dist/client/assets/sidebarProjectFolders-ScxWbdTn.js +0 -4
- package/dist/client/assets/skeleton-B_qDqbso.js +0 -1
- package/dist/client/assets/spinner-BlCG_0jN.js +0 -1
- package/dist/client/assets/src-Chx4ffXH.js +0 -14
- package/dist/client/assets/storeSelectors-Of4FM0vM.js +0 -1
- package/dist/client/assets/switch-DUT5lUyk.js +0 -1
- package/dist/client/assets/terminal-C_CyIsDD.js +0 -1
- package/dist/client/assets/textarea-C5eyaBI3.js +0 -1
- package/dist/client/assets/threadPinning-B8un4fjx.js +0 -1
- package/dist/client/assets/toast-X_O6OBAx.js +0 -1
- package/dist/client/assets/toggle-P-wZyQFO.js +0 -1
- package/dist/client/assets/toggle-group-Du7zfd4_.js +0 -1
- package/dist/client/assets/tooltip-D_i-87PL.js +0 -1
- package/dist/client/assets/types-Of4FM0vM.js +0 -1
- package/dist/client/assets/uiStateStore-UUXKrPLz.js +0 -1
- package/dist/client/assets/useButton-D8BjCVb-.js +0 -1
- package/dist/client/assets/useCompositeListItem-BHuxHR8U.js +0 -1
- package/dist/client/assets/useDebouncedValue-D2-9M4Tq.js +0 -1
- package/dist/client/assets/useFloatingRootContext-CTdmlYcf.js +0 -1
- package/dist/client/assets/useHandleNewThread-YGjWitl4.js +0 -1
- package/dist/client/assets/useLabelableId-LInf_Egz.js +0 -1
- package/dist/client/assets/useLocation-3zGT25DO.js +0 -1
- package/dist/client/assets/useOpenInteractionType-BPthQeg6.js +0 -1
- package/dist/client/assets/usePhoneThreadActions-D_Z29f6p.js +0 -1
- package/dist/client/assets/usePopupViewport-BErrsN0k.js +0 -1
- package/dist/client/assets/useRenderElement-DchFnsR8.js +0 -1
- package/dist/client/assets/useScrollLock-CLyJPg7p.js +0 -1
- package/dist/client/assets/useSwipeDismiss-DjMT1XiU.js +0 -1
- package/dist/client/assets/useThreadActions-ISbVGkmx.js +0 -2
- package/dist/client/assets/useTriggerFocusGuards-DwOHWbrB.js +0 -1
- package/dist/client/assets/useValueChanged-Bq39JB8D.js +0 -1
- package/dist/client/assets/user-round-Cpzx8pSw.js +0 -1
- package/dist/client/assets/utils-BFbDkTQq.js +0 -1
- package/dist/client/assets/visibilityPolling-BwzZdaSN.js +0 -1
- package/dist/client/assets/x-C1Cemsov.js +0 -1
|
@@ -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-BytnBN6b.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;
|
|
@@ -1092,18 +1111,16 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1092
1111
|
const title = part.state.status === "running" ? part.state.title ?? part.tool : part.tool;
|
|
1093
1112
|
const detail = detailFromToolPart(part);
|
|
1094
1113
|
const childSubagent = context.subagentBySessionId.get(part.sessionID);
|
|
1095
|
-
if (childSubagent) {
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
});
|
|
1103
|
-
break;
|
|
1104
|
-
}
|
|
1114
|
+
if (childSubagent) yield* emitOpenCodeSubagentUpdated(context, {
|
|
1115
|
+
subagent: childSubagent,
|
|
1116
|
+
status: statusFromOpenCodeSubagentState("running"),
|
|
1117
|
+
summary: title,
|
|
1118
|
+
detail,
|
|
1119
|
+
raw: event
|
|
1120
|
+
});
|
|
1105
1121
|
const payload = {
|
|
1106
1122
|
itemType,
|
|
1123
|
+
...childSubagent ? { agentId: String(childSubagent.subagentId) } : {},
|
|
1107
1124
|
...part.state.status === "error" ? { status: "failed" } : part.state.status === "completed" ? { status: "completed" } : { status: "inProgress" },
|
|
1108
1125
|
...title ? { title } : {},
|
|
1109
1126
|
...detail ? { detail } : {},
|
|
@@ -1123,7 +1140,7 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1123
1140
|
type: part.state.status === "pending" ? "item.started" : part.state.status === "completed" || part.state.status === "error" ? "item.completed" : "item.updated",
|
|
1124
1141
|
payload
|
|
1125
1142
|
};
|
|
1126
|
-
appendTurnItem(context, turnId, part);
|
|
1143
|
+
if (!childSubagent) appendTurnItem(context, turnId, part);
|
|
1127
1144
|
yield* emitForContext(context, runtimeEvent);
|
|
1128
1145
|
}
|
|
1129
1146
|
break;
|
|
@@ -1546,14 +1563,25 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1546
1563
|
const formatted = require_sourceControlContextFormatter.formatSourceControlContextsForAgent(input.sourceControlContexts ?? []);
|
|
1547
1564
|
let text = formatted ? formatted + "\n\n" + (input.input?.trim() ?? "") : input.input?.trim();
|
|
1548
1565
|
const attachmentUrlById = /* @__PURE__ */ new Map();
|
|
1549
|
-
const declaredAttachmentBytes = (input.attachments ?? []).reduce((total, attachment) => total + attachment.sizeBytes, 0);
|
|
1566
|
+
const declaredAttachmentBytes = (input.attachments ?? []).reduce((total, attachment) => total + (attachment.sizeBytes ?? 0), 0);
|
|
1550
1567
|
if (declaredAttachmentBytes > 52428800) return yield* new require_bin.ProviderAdapterRequestError({
|
|
1551
1568
|
provider: PROVIDER$1,
|
|
1552
1569
|
method: "session.prompt",
|
|
1553
1570
|
detail: `Attachments total ${declaredAttachmentBytes} bytes; limit is ${require_collectUint8StreamText.PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES} bytes.`
|
|
1554
1571
|
});
|
|
1555
1572
|
let attachmentTotalBytes = 0;
|
|
1573
|
+
const pathLineEntries = [];
|
|
1556
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
|
+
}
|
|
1557
1585
|
const persisted = require_bin.readPersistedAttachment({
|
|
1558
1586
|
attachmentsDir: serverConfig.attachmentsDir,
|
|
1559
1587
|
attachment
|
|
@@ -1571,9 +1599,10 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1571
1599
|
detail: `Attachments total ${attachmentTotalBytes} bytes; limit is ${require_collectUint8StreamText.PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES} bytes.`
|
|
1572
1600
|
});
|
|
1573
1601
|
}
|
|
1602
|
+
text = require_makeManagedServerProvider.appendAttachmentPathLines(text, require_makeManagedServerProvider.formatAttachmentPathLines(pathLineEntries));
|
|
1574
1603
|
const fileParts = require_bin.toOpenCodeFileParts({
|
|
1575
1604
|
attachments: input.attachments,
|
|
1576
|
-
resolveAttachmentUrl: (attachment) => attachmentUrlById.get(attachment.id) ?? null
|
|
1605
|
+
resolveAttachmentUrl: (attachment) => attachment.id === void 0 ? null : attachmentUrlById.get(attachment.id) ?? null
|
|
1577
1606
|
});
|
|
1578
1607
|
if ((!text || text.length === 0) && fileParts.length === 0) return yield* new require_bin.ProviderAdapterValidationError({
|
|
1579
1608
|
provider: PROVIDER$1,
|
|
@@ -1803,6 +1832,91 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1803
1832
|
});
|
|
1804
1833
|
}
|
|
1805
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
|
|
1806
1920
|
//#region src/provider/Layers/OpenCodeProvider.ts
|
|
1807
1921
|
const PROVIDER = require_collectUint8StreamText.ProviderDriverKind.make("opencode");
|
|
1808
1922
|
const OPENCODE_PRESENTATION = {
|
|
@@ -1913,6 +2027,7 @@ function flattenOpenCodeModels(input) {
|
|
|
1913
2027
|
if (!modelId || !name) continue;
|
|
1914
2028
|
const subProvider = require_bin.nonEmptyTrimmed(provider.name);
|
|
1915
2029
|
const shortName = subProvider ? deriveShortNameByStrippingPrefix(name, subProvider) : void 0;
|
|
2030
|
+
const maxContextTokens = model.limit?.context;
|
|
1916
2031
|
const slug = `${provider.id}/${modelId}`;
|
|
1917
2032
|
if (models.has(slug)) continue;
|
|
1918
2033
|
models.set(slug, {
|
|
@@ -1920,6 +2035,7 @@ function flattenOpenCodeModels(input) {
|
|
|
1920
2035
|
name,
|
|
1921
2036
|
...subProvider ? { subProvider } : {},
|
|
1922
2037
|
...shortName ? { shortName } : {},
|
|
2038
|
+
...typeof maxContextTokens === "number" && Number.isFinite(maxContextTokens) && maxContextTokens > 0 ? { maxContextTokens: Math.floor(maxContextTokens) } : {},
|
|
1923
2039
|
isCustom: false,
|
|
1924
2040
|
capabilities: openCodeCapabilitiesForModel({
|
|
1925
2041
|
providerID: provider.id,
|
|
@@ -1973,7 +2089,7 @@ const makePendingOpenCodeProvider = (openCodeSettings) => {
|
|
|
1973
2089
|
}
|
|
1974
2090
|
});
|
|
1975
2091
|
};
|
|
1976
|
-
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) {
|
|
1977
2093
|
const openCodeRuntime = yield* require_bin.OpenCodeRuntime;
|
|
1978
2094
|
const checkedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1979
2095
|
const customModels = openCodeSettings.customModels;
|
|
@@ -2072,11 +2188,13 @@ const checkOpenCodeProviderStatus = effect.Effect.fn("checkOpenCodeProviderStatu
|
|
|
2072
2188
|
version = inventoryExit.value.serverVersion;
|
|
2073
2189
|
const models = require_bin.providerModelsFromSettings(flattenOpenCodeModels(inventoryExit.value.inventory), PROVIDER, customModels, DEFAULT_OPENCODE_MODEL_CAPABILITIES);
|
|
2074
2190
|
const connectedCount = new Set(inventoryExit.value.inventory.providerList.connected).size;
|
|
2191
|
+
const rateLimits = yield* probeUsage(environment).pipe(effect.Effect.orElseSucceed(() => void 0));
|
|
2075
2192
|
return require_bin.buildServerProvider({
|
|
2076
2193
|
presentation: OPENCODE_PRESENTATION,
|
|
2077
2194
|
enabled: true,
|
|
2078
2195
|
checkedAt,
|
|
2079
2196
|
models,
|
|
2197
|
+
...rateLimits ? { rateLimits } : {},
|
|
2080
2198
|
probe: {
|
|
2081
2199
|
installed: true,
|
|
2082
2200
|
version,
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { $
|
|
3
|
+
import { $a as ProviderInstanceId, Ln as TextGenerationError, Qa as ProviderDriverKind, _s as TurnId, cr as OpenCodeSettings, ds as RuntimeRequestId, ki as PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES, ls as ProviderItemId, ps as RuntimeSubagentId, rs as EventId, us as RuntimeItemId } from "./collectUint8StreamText-C_VNyArd.mjs";
|
|
4
4
|
import { nt as sanitizeFeatureBranchName, st as ServerConfig, tt as sanitizeBranchFragment } from "./Metrics-BP9YjxZB.mjs";
|
|
5
|
-
import { $ as
|
|
5
|
+
import { $ as mergeProviderInstanceEnvironment, $n as resolveAttachmentPath, B as buildPrContentPrompt, C as openCodeRuntimeErrorDetail, Ct as ProviderAdapterSessionNotFoundError, D as toOpenCodePermissionReply, E as toOpenCodeFileParts, F as validateRankInboxThreadsResult, G as sanitizeCommitSubject, H as buildThreadTitlePrompt, Hn as enrichProviderSnapshotWithVersionAdvisory, I as buildBranchNamePrompt, Jn as resolveProviderMaintenanceCapabilitiesEffect, K as sanitizePrTitle, L as buildCommitMessagePrompt, M as makeEventNdjsonLogger, O as toOpenCodeQuestionAnswers, Qn as readPersistedAttachment, R as buildIssueContentPolishPrompt, S as openCodeQuestionId, St as ProviderAdapterSessionClosedError, T as runOpenCodeSdk, Tt as ProviderDriverError, U as extractJsonObject, V as buildThreadPriorityPrompt, Wn as makePackageManagedProviderMaintenanceResolver, Xn as ServerSettingsService, Yn as compareCliVersions, _ as MINIMUM_OPENCODE_VERSION, b as buildOpenCodePermissionRules, bt as ProviderAdapterProcessError, dt as parseGenericCliVersion, ft as providerModelsFromSettings, ht as agentControlHostContext, ir as getModelSelectionStringOptionValue, j as ProviderEventLoggers, k as verifyOpenCodeServerVersion, nr as createModelCapabilities, ot as buildServerProvider, q as sanitizeThreadTitle, qn as normalizeCommandPath, t as makeServerQueueMetrics, ut as nonEmptyTrimmed, v as OpenCodeRuntime, w as parseOpenCodeModelSlug, wt as ProviderAdapterValidationError, x as isOpenCodeNativeAttachment, xt as ProviderAdapterRequestError, y as OpenCodeRuntimeError, yt as createProcessDeviceToolBinding, z as buildIssueContentTitlePrompt } from "./bin.mjs";
|
|
6
|
+
import { a as formatAttachmentPathLines, i as appendAttachmentPathLines, n as requireRuntimeSessionId, r as stampRuntimeEvent, t as makeManagedServerProvider } from "./makeManagedServerProvider-GZcpSLrW.mjs";
|
|
6
7
|
import { t as formatSourceControlContextsForAgent } from "./sourceControlContextFormatter-DEwpnVAH.mjs";
|
|
7
|
-
import { n as requireRuntimeSessionId, r as stampRuntimeEvent, t as makeManagedServerProvider } from "./makeManagedServerProvider-DRlNwlhe.mjs";
|
|
8
8
|
import { t as defaultProviderContinuationIdentity } from "./ProviderDriver-kCV60GKk.mjs";
|
|
9
9
|
import { Cause, Data, Effect, Exit, Fiber, Queue, Ref, Schema, Scope, Semaphore, Stream } from "effect";
|
|
10
10
|
import { HttpClient } from "effect/unstable/http";
|
|
11
|
+
import * as NodePath from "node:path";
|
|
12
|
+
import * as NodeOS from "node:os";
|
|
13
|
+
import * as NodeFS from "node:fs/promises";
|
|
11
14
|
import "effect/unstable/process";
|
|
12
15
|
import * as Semaphore$1 from "effect/Semaphore";
|
|
13
16
|
//#region src/provider/OpenCodeServerOwner.ts
|
|
@@ -101,14 +104,26 @@ const makeOpenCodeTextGeneration = Effect.fn("makeOpenCodeTextGeneration")(funct
|
|
|
101
104
|
operation: input.operation,
|
|
102
105
|
detail: "OpenCode model selection must use the 'provider/model' format."
|
|
103
106
|
});
|
|
104
|
-
const declaredAttachmentBytes = (input.attachments ?? []).reduce((total, attachment) => total + attachment.sizeBytes, 0);
|
|
107
|
+
const declaredAttachmentBytes = (input.attachments ?? []).reduce((total, attachment) => total + (attachment.sizeBytes ?? 0), 0);
|
|
105
108
|
if (declaredAttachmentBytes > 52428800) return yield* new TextGenerationError({
|
|
106
109
|
operation: input.operation,
|
|
107
110
|
detail: `Attachments total ${declaredAttachmentBytes} bytes; limit is ${PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES} bytes.`
|
|
108
111
|
});
|
|
109
112
|
const attachmentUrlById = /* @__PURE__ */ new Map();
|
|
110
113
|
let attachmentTotalBytes = 0;
|
|
114
|
+
const pathLineEntries = [];
|
|
111
115
|
for (const attachment of input.attachments ?? []) {
|
|
116
|
+
if (!isOpenCodeNativeAttachment(attachment)) {
|
|
117
|
+
pathLineEntries.push({
|
|
118
|
+
attachment,
|
|
119
|
+
...attachment.id === void 0 ? {} : { resolvedPath: resolveAttachmentPath({
|
|
120
|
+
attachmentsDir: serverConfig.attachmentsDir,
|
|
121
|
+
attachment
|
|
122
|
+
}) ?? void 0 }
|
|
123
|
+
});
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
if (attachment.id === void 0) continue;
|
|
112
127
|
const persisted = readPersistedAttachment({
|
|
113
128
|
attachmentsDir: serverConfig.attachmentsDir,
|
|
114
129
|
attachment
|
|
@@ -126,8 +141,9 @@ const makeOpenCodeTextGeneration = Effect.fn("makeOpenCodeTextGeneration")(funct
|
|
|
126
141
|
}
|
|
127
142
|
const fileParts = toOpenCodeFileParts({
|
|
128
143
|
attachments: input.attachments,
|
|
129
|
-
resolveAttachmentUrl: (attachment) => attachmentUrlById.get(attachment.id) ?? null
|
|
144
|
+
resolveAttachmentUrl: (attachment) => attachment.id === void 0 ? null : attachmentUrlById.get(attachment.id) ?? null
|
|
130
145
|
});
|
|
146
|
+
const finalPrompt = appendAttachmentPathLines(input.prompt, formatAttachmentPathLines(pathLineEntries)) ?? input.prompt;
|
|
131
147
|
const runAgainstServer = (server) => Effect.gen(function* () {
|
|
132
148
|
const client = yield* openCodeRuntime.createOpenCodeSdkClient({
|
|
133
149
|
baseUrl: server.url,
|
|
@@ -163,7 +179,7 @@ const makeOpenCodeTextGeneration = Effect.fn("makeOpenCodeTextGeneration")(funct
|
|
|
163
179
|
...selectedVariant ? { variant: selectedVariant } : {},
|
|
164
180
|
parts: [{
|
|
165
181
|
type: "text",
|
|
166
|
-
text:
|
|
182
|
+
text: finalPrompt
|
|
167
183
|
}, ...fileParts]
|
|
168
184
|
});
|
|
169
185
|
const info = result.data?.info;
|
|
@@ -1090,18 +1106,16 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1090
1106
|
const title = part.state.status === "running" ? part.state.title ?? part.tool : part.tool;
|
|
1091
1107
|
const detail = detailFromToolPart(part);
|
|
1092
1108
|
const childSubagent = context.subagentBySessionId.get(part.sessionID);
|
|
1093
|
-
if (childSubagent) {
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
});
|
|
1101
|
-
break;
|
|
1102
|
-
}
|
|
1109
|
+
if (childSubagent) yield* emitOpenCodeSubagentUpdated(context, {
|
|
1110
|
+
subagent: childSubagent,
|
|
1111
|
+
status: statusFromOpenCodeSubagentState("running"),
|
|
1112
|
+
summary: title,
|
|
1113
|
+
detail,
|
|
1114
|
+
raw: event
|
|
1115
|
+
});
|
|
1103
1116
|
const payload = {
|
|
1104
1117
|
itemType,
|
|
1118
|
+
...childSubagent ? { agentId: String(childSubagent.subagentId) } : {},
|
|
1105
1119
|
...part.state.status === "error" ? { status: "failed" } : part.state.status === "completed" ? { status: "completed" } : { status: "inProgress" },
|
|
1106
1120
|
...title ? { title } : {},
|
|
1107
1121
|
...detail ? { detail } : {},
|
|
@@ -1121,7 +1135,7 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1121
1135
|
type: part.state.status === "pending" ? "item.started" : part.state.status === "completed" || part.state.status === "error" ? "item.completed" : "item.updated",
|
|
1122
1136
|
payload
|
|
1123
1137
|
};
|
|
1124
|
-
appendTurnItem(context, turnId, part);
|
|
1138
|
+
if (!childSubagent) appendTurnItem(context, turnId, part);
|
|
1125
1139
|
yield* emitForContext(context, runtimeEvent);
|
|
1126
1140
|
}
|
|
1127
1141
|
break;
|
|
@@ -1544,14 +1558,25 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1544
1558
|
const formatted = formatSourceControlContextsForAgent(input.sourceControlContexts ?? []);
|
|
1545
1559
|
let text = formatted ? formatted + "\n\n" + (input.input?.trim() ?? "") : input.input?.trim();
|
|
1546
1560
|
const attachmentUrlById = /* @__PURE__ */ new Map();
|
|
1547
|
-
const declaredAttachmentBytes = (input.attachments ?? []).reduce((total, attachment) => total + attachment.sizeBytes, 0);
|
|
1561
|
+
const declaredAttachmentBytes = (input.attachments ?? []).reduce((total, attachment) => total + (attachment.sizeBytes ?? 0), 0);
|
|
1548
1562
|
if (declaredAttachmentBytes > 52428800) return yield* new ProviderAdapterRequestError({
|
|
1549
1563
|
provider: PROVIDER$1,
|
|
1550
1564
|
method: "session.prompt",
|
|
1551
1565
|
detail: `Attachments total ${declaredAttachmentBytes} bytes; limit is ${PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES} bytes.`
|
|
1552
1566
|
});
|
|
1553
1567
|
let attachmentTotalBytes = 0;
|
|
1568
|
+
const pathLineEntries = [];
|
|
1554
1569
|
for (const attachment of input.attachments ?? []) {
|
|
1570
|
+
if (!isOpenCodeNativeAttachment(attachment)) {
|
|
1571
|
+
pathLineEntries.push({
|
|
1572
|
+
attachment,
|
|
1573
|
+
...attachment.id === void 0 ? {} : { resolvedPath: resolveAttachmentPath({
|
|
1574
|
+
attachmentsDir: serverConfig.attachmentsDir,
|
|
1575
|
+
attachment
|
|
1576
|
+
}) ?? void 0 }
|
|
1577
|
+
});
|
|
1578
|
+
continue;
|
|
1579
|
+
}
|
|
1555
1580
|
const persisted = readPersistedAttachment({
|
|
1556
1581
|
attachmentsDir: serverConfig.attachmentsDir,
|
|
1557
1582
|
attachment
|
|
@@ -1569,9 +1594,10 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1569
1594
|
detail: `Attachments total ${attachmentTotalBytes} bytes; limit is ${PROVIDER_SEND_TURN_MAX_ATTACHMENT_TOTAL_BYTES} bytes.`
|
|
1570
1595
|
});
|
|
1571
1596
|
}
|
|
1597
|
+
text = appendAttachmentPathLines(text, formatAttachmentPathLines(pathLineEntries));
|
|
1572
1598
|
const fileParts = toOpenCodeFileParts({
|
|
1573
1599
|
attachments: input.attachments,
|
|
1574
|
-
resolveAttachmentUrl: (attachment) => attachmentUrlById.get(attachment.id) ?? null
|
|
1600
|
+
resolveAttachmentUrl: (attachment) => attachment.id === void 0 ? null : attachmentUrlById.get(attachment.id) ?? null
|
|
1575
1601
|
});
|
|
1576
1602
|
if ((!text || text.length === 0) && fileParts.length === 0) return yield* new ProviderAdapterValidationError({
|
|
1577
1603
|
provider: PROVIDER$1,
|
|
@@ -1801,6 +1827,91 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
1801
1827
|
});
|
|
1802
1828
|
}
|
|
1803
1829
|
//#endregion
|
|
1830
|
+
//#region src/provider/Layers/OpenCodeGoUsage.ts
|
|
1831
|
+
/**
|
|
1832
|
+
* OpenCodeGoUsage — probes OpenCode Go subscription usage limits.
|
|
1833
|
+
*
|
|
1834
|
+
* Mirrors `ClaudeUsage.ts`: reads the OpenCode CLI's credential store
|
|
1835
|
+
* (`<data dir>/auth.json`), calls the Go usage API with the stored
|
|
1836
|
+
* `opencode-go` API key, and maps the response onto the shared
|
|
1837
|
+
* `ServerProviderRateLimits` contract (rolling → primary, weekly →
|
|
1838
|
+
* secondary, monthly → tertiary).
|
|
1839
|
+
*
|
|
1840
|
+
* Every failure path degrades to `undefined` — a missing Go key or an
|
|
1841
|
+
* unreachable API must never make the provider snapshot probe fail.
|
|
1842
|
+
*
|
|
1843
|
+
* @module provider/Layers/OpenCodeGoUsage
|
|
1844
|
+
*/
|
|
1845
|
+
const OPENCODE_GO_USAGE_API = "https://opencode.ai/zen/go/v1/usage";
|
|
1846
|
+
const OPENCODE_GO_USAGE_TIMEOUT_MS = 5e3;
|
|
1847
|
+
const ROLLING_WINDOW_DURATION_MINS = 300;
|
|
1848
|
+
const WEEKLY_WINDOW_DURATION_MINS = 10080;
|
|
1849
|
+
const MONTHLY_WINDOW_DURATION_MINS = 43200;
|
|
1850
|
+
function resolveOpenCodeDataDirPath(environment = process.env) {
|
|
1851
|
+
const xdgDataHome = environment.XDG_DATA_HOME?.trim();
|
|
1852
|
+
const home = environment.HOME?.trim() || NodeOS.homedir();
|
|
1853
|
+
const base = xdgDataHome && xdgDataHome.length > 0 ? xdgDataHome : NodePath.join(home, ".local", "share");
|
|
1854
|
+
return NodePath.join(base, "opencode");
|
|
1855
|
+
}
|
|
1856
|
+
async function readOpenCodeGoApiKey(environment) {
|
|
1857
|
+
try {
|
|
1858
|
+
const authPath = NodePath.join(resolveOpenCodeDataDirPath(environment), "auth.json");
|
|
1859
|
+
const key = JSON.parse(await NodeFS.readFile(authPath, "utf8"))["opencode-go"]?.key;
|
|
1860
|
+
if (typeof key !== "string" || key.trim().length === 0) return;
|
|
1861
|
+
return key.trim();
|
|
1862
|
+
} catch {
|
|
1863
|
+
return;
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
function parseOpenCodeGoUsageRateLimits(data) {
|
|
1867
|
+
const windows = data?.usage;
|
|
1868
|
+
if (!windows || typeof windows !== "object") return;
|
|
1869
|
+
const buildWindow = (raw, windowDurationMins) => {
|
|
1870
|
+
if (!raw || typeof raw !== "object" || typeof raw.percent !== "number") return;
|
|
1871
|
+
if (!Number.isFinite(raw.percent)) return;
|
|
1872
|
+
const resetsAt = typeof raw.resetsAt === "string" ? Date.parse(raw.resetsAt) : NaN;
|
|
1873
|
+
return {
|
|
1874
|
+
usedPercent: raw.percent,
|
|
1875
|
+
windowDurationMins,
|
|
1876
|
+
...Number.isFinite(resetsAt) ? { resetsAt: Math.floor(resetsAt / 1e3) } : {}
|
|
1877
|
+
};
|
|
1878
|
+
};
|
|
1879
|
+
const primary = buildWindow(windows.rolling, ROLLING_WINDOW_DURATION_MINS);
|
|
1880
|
+
const secondary = buildWindow(windows.weekly, WEEKLY_WINDOW_DURATION_MINS);
|
|
1881
|
+
const tertiary = buildWindow(windows.monthly, MONTHLY_WINDOW_DURATION_MINS);
|
|
1882
|
+
if (!primary && !secondary && !tertiary) return;
|
|
1883
|
+
return {
|
|
1884
|
+
limitId: "opencode-go",
|
|
1885
|
+
limitName: "OpenCode Go",
|
|
1886
|
+
planType: "go",
|
|
1887
|
+
...primary ? { primary } : {},
|
|
1888
|
+
...secondary ? { secondary } : {},
|
|
1889
|
+
...tertiary ? { tertiary } : {}
|
|
1890
|
+
};
|
|
1891
|
+
}
|
|
1892
|
+
async function fetchOpenCodeGoUsageRateLimits(input) {
|
|
1893
|
+
const apiKey = await readOpenCodeGoApiKey(input.environment);
|
|
1894
|
+
if (!apiKey) return;
|
|
1895
|
+
const response = await input.fetchImpl(OPENCODE_GO_USAGE_API, {
|
|
1896
|
+
headers: {
|
|
1897
|
+
Authorization: `Bearer ${apiKey}`,
|
|
1898
|
+
Accept: "application/json"
|
|
1899
|
+
},
|
|
1900
|
+
signal: AbortSignal.timeout(OPENCODE_GO_USAGE_TIMEOUT_MS)
|
|
1901
|
+
});
|
|
1902
|
+
if (!response.ok) return;
|
|
1903
|
+
return parseOpenCodeGoUsageRateLimits(await response.json());
|
|
1904
|
+
}
|
|
1905
|
+
const probeOpenCodeGoUsageRateLimits = Effect.fn("probeOpenCodeGoUsageRateLimits")(function* (environment = process.env, fetchImpl = fetch) {
|
|
1906
|
+
return yield* Effect.tryPromise({
|
|
1907
|
+
try: () => fetchOpenCodeGoUsageRateLimits({
|
|
1908
|
+
environment,
|
|
1909
|
+
fetchImpl
|
|
1910
|
+
}),
|
|
1911
|
+
catch: () => void 0
|
|
1912
|
+
}).pipe(Effect.orElseSucceed(() => void 0));
|
|
1913
|
+
});
|
|
1914
|
+
//#endregion
|
|
1804
1915
|
//#region src/provider/Layers/OpenCodeProvider.ts
|
|
1805
1916
|
const PROVIDER = ProviderDriverKind.make("opencode");
|
|
1806
1917
|
const OPENCODE_PRESENTATION = {
|
|
@@ -1911,6 +2022,7 @@ function flattenOpenCodeModels(input) {
|
|
|
1911
2022
|
if (!modelId || !name) continue;
|
|
1912
2023
|
const subProvider = nonEmptyTrimmed(provider.name);
|
|
1913
2024
|
const shortName = subProvider ? deriveShortNameByStrippingPrefix(name, subProvider) : void 0;
|
|
2025
|
+
const maxContextTokens = model.limit?.context;
|
|
1914
2026
|
const slug = `${provider.id}/${modelId}`;
|
|
1915
2027
|
if (models.has(slug)) continue;
|
|
1916
2028
|
models.set(slug, {
|
|
@@ -1918,6 +2030,7 @@ function flattenOpenCodeModels(input) {
|
|
|
1918
2030
|
name,
|
|
1919
2031
|
...subProvider ? { subProvider } : {},
|
|
1920
2032
|
...shortName ? { shortName } : {},
|
|
2033
|
+
...typeof maxContextTokens === "number" && Number.isFinite(maxContextTokens) && maxContextTokens > 0 ? { maxContextTokens: Math.floor(maxContextTokens) } : {},
|
|
1921
2034
|
isCustom: false,
|
|
1922
2035
|
capabilities: openCodeCapabilitiesForModel({
|
|
1923
2036
|
providerID: provider.id,
|
|
@@ -1971,7 +2084,7 @@ const makePendingOpenCodeProvider = (openCodeSettings) => {
|
|
|
1971
2084
|
}
|
|
1972
2085
|
});
|
|
1973
2086
|
};
|
|
1974
|
-
const checkOpenCodeProviderStatus = Effect.fn("checkOpenCodeProviderStatus")(function* (openCodeSettings, cwd, environment = process.env) {
|
|
2087
|
+
const checkOpenCodeProviderStatus = Effect.fn("checkOpenCodeProviderStatus")(function* (openCodeSettings, cwd, environment = process.env, probeUsage = probeOpenCodeGoUsageRateLimits) {
|
|
1975
2088
|
const openCodeRuntime = yield* OpenCodeRuntime;
|
|
1976
2089
|
const checkedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1977
2090
|
const customModels = openCodeSettings.customModels;
|
|
@@ -2070,11 +2183,13 @@ const checkOpenCodeProviderStatus = Effect.fn("checkOpenCodeProviderStatus")(fun
|
|
|
2070
2183
|
version = inventoryExit.value.serverVersion;
|
|
2071
2184
|
const models = providerModelsFromSettings(flattenOpenCodeModels(inventoryExit.value.inventory), PROVIDER, customModels, DEFAULT_OPENCODE_MODEL_CAPABILITIES);
|
|
2072
2185
|
const connectedCount = new Set(inventoryExit.value.inventory.providerList.connected).size;
|
|
2186
|
+
const rateLimits = yield* probeUsage(environment).pipe(Effect.orElseSucceed(() => void 0));
|
|
2073
2187
|
return buildServerProvider({
|
|
2074
2188
|
presentation: OPENCODE_PRESENTATION,
|
|
2075
2189
|
enabled: true,
|
|
2076
2190
|
checkedAt,
|
|
2077
2191
|
models,
|
|
2192
|
+
...rateLimits ? { rateLimits } : {},
|
|
2078
2193
|
probe: {
|
|
2079
2194
|
installed: true,
|
|
2080
2195
|
version,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Ba as VcsProcessSpawnError, Ra as VcsOutputDecodeError, Va as VcsProcessTimeoutError, t as collectUint8StreamText, za as VcsProcessExitError } from "./collectUint8StreamText-C_VNyArd.mjs";
|
|
4
4
|
import { Context, Duration, Effect, Layer, Option, Schema, Sink, Stream } from "effect";
|
|
5
5
|
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
|
|
6
6
|
//#region src/vcs/VcsProcess.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const require_collectUint8StreamText = require("./collectUint8StreamText-
|
|
3
|
+
const require_collectUint8StreamText = require("./collectUint8StreamText-DStwNTTK.cjs");
|
|
4
4
|
let effect = require("effect");
|
|
5
5
|
let effect_unstable_process = require("effect/unstable/process");
|
|
6
6
|
//#region src/vcs/VcsProcess.ts
|