@readmagic/workmate 0.0.1 → 0.0.2
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/chunks/{AddWorkspaceDirectory-BSLHrjbt.js → AddWorkspaceDirectory-BgNp7glC.js} +1 -1
- package/dist/chunks/{App-DY5O6IKw.js → App-Coboqa8H.js} +1 -1
- package/dist/chunks/ApproveApiKey-CQsQdQBC.js +1 -0
- package/dist/chunks/{ApproveApiKey-BEzfC6r3.js → ApproveApiKey-CYpBbj0k.js} +1 -1
- package/dist/chunks/{AssistantSessionChooser-Ce3PraaD.js → AssistantSessionChooser-DxKsTdqj.js} +1 -1
- package/dist/chunks/{BackgroundTasksDialog-Dvhcgahe.js → BackgroundTasksDialog-AiVi-1pI.js} +1 -1
- package/dist/chunks/{BypassPermissionsModeDialog-B68V1bCq.js → BypassPermissionsModeDialog-Cx3QGFz-.js} +1 -1
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-CTWhpIm8.js → ClaudeMdExternalIncludesDialog-BAK9fxwg.js} +1 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-DUu6iRJk.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-DVTPwR5I.js +1 -0
- package/dist/chunks/{DesktopHandoff-BRbU4is4.js → DesktopHandoff-BsHgLlTy.js} +1 -1
- package/dist/chunks/{DiffDialog-CBluIK-x.js → DiffDialog-BgTW2Znv.js} +1 -1
- package/dist/chunks/{Doctor-WxNv49HC.js → Doctor-BXhz8eUa.js} +1 -1
- package/dist/chunks/Doctor-D75dsEyb.js +1 -0
- package/dist/chunks/{ExitFlow-CRPgptCN.js → ExitFlow-B1XNACQP.js} +1 -1
- package/dist/chunks/{Feedback-CEtzaLr3.js → Feedback-Cvz80lAn.js} +1 -1
- package/dist/chunks/Grove-B7hhBvFw.js +1 -0
- package/dist/chunks/{Grove--kttLxvs.js → Grove-Dsi4yU08.js} +1 -1
- package/dist/chunks/{HybridTransport-BgV5_7Az.js → HybridTransport-8qA64lCx.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-DCGwXW_p.js → InvalidConfigDialog-CAZ1z5WG.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-jTwsdXWr.js → InvalidSettingsDialog-D82Qk_MR.js} +1 -1
- package/dist/chunks/{MCPConnectionManager-BX0LMz9J.js → MCPConnectionManager-BLfKm4H2.js} +1 -1
- package/dist/chunks/{McpParsingWarnings-WQrWJeWP.js → McpParsingWarnings-8ZueNqAd.js} +1 -1
- package/dist/chunks/{MessageSelector-_UZB8cGb.js → MessageSelector-DmKtBYX9.js} +1 -1
- package/dist/chunks/Messages-CaFdI1kk.js +11 -0
- package/dist/chunks/{Onboarding-BoIVNCgc.js → Onboarding-CUztnbbv.js} +1 -1
- package/dist/chunks/{OverageCreditUpsell-1FCN8bH3.js → OverageCreditUpsell-DSgrZvMv.js} +1 -1
- package/dist/chunks/{PluginSettings-BD9JLV9-.js → PluginSettings-0FSNch8O.js} +1 -1
- package/dist/chunks/{PromptInputFooterSuggestions-CrGST0Cq.js → PromptInputFooterSuggestions-IaihWay3.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-B2TDpbpw.js → PromptInputHelpMenu-okS2rQ4k.js} +1 -1
- package/dist/chunks/{QueryEngine-D2HUnwmU.js → QueryEngine-WYDWzQuY.js} +1 -1
- package/dist/chunks/{REPL-BV4WyYMg.js → REPL-Dto012J0.js} +7 -7
- package/dist/chunks/REPL-vV_jzAVx.js +1 -0
- package/dist/chunks/{RemoteCallout-DS_EV6Fh.js → RemoteCallout-C_UIYnuT.js} +1 -1
- package/dist/chunks/RemoteSessionManager-CuSSHAXN.js +2 -0
- package/dist/chunks/{ResumeConversation-Cw3vP4G8.js → ResumeConversation-g_JyOWbl.js} +1 -1
- package/dist/chunks/{SSETransport-BXiEBMpb.js → SSETransport-Chj_yfPv.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-Daedym7_.js +1 -0
- package/dist/chunks/{Settings-ns6mRsDc.js → Settings-DUXA-qac.js} +2 -2
- package/dist/chunks/{TeleportProgress-CcDzMC5L.js → TeleportProgress-DP1a8jit.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-DZbxl4sD.js → TeleportRepoMismatchDialog-B6sTwXuZ.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-EowJO5nm.js → TeleportResumeWrapper-CKUuRQSG.js} +1 -1
- package/dist/chunks/{ThemePicker-BYbChJpu.js → ThemePicker-Dyq1YVhb.js} +1 -1
- package/dist/chunks/{TrustDialog-DA3YTk_k.js → TrustDialog-CdZS9t-T.js} +1 -1
- package/dist/chunks/{ValidationErrorsList-Cx-hoRwG.js → ValidationErrorsList-DUNh4BNa.js} +1 -1
- package/dist/chunks/WelcomeV2-TPbOXGrO.js +1 -0
- package/dist/chunks/{add-dir-CWt69NAZ.js → add-dir-Bf_5tCeR.js} +1 -1
- package/dist/chunks/{agentDisplay-CQ4mZWFH.js → agentDisplay-CCeYiAta.js} +1 -1
- package/dist/chunks/{agents-D4clhuCl.js → agents-Bt72Gz1v.js} +1 -1
- package/dist/chunks/{agents-C6jzKOit.js → agents-T8xHY5Wk.js} +1 -1
- package/dist/chunks/{allErrors-HMPqE0jK.js → allErrors-CDWTJcMw.js} +1 -1
- package/dist/chunks/{ant-9Z5bppVC.js → ant-DRF-v5bA.js} +1 -1
- package/dist/chunks/api-CLLIHLpn.js +1 -0
- package/dist/chunks/api-DMpNA1s8.js +1 -0
- package/dist/chunks/asciicast-BIr75_x9.js +1 -0
- package/dist/chunks/{asciicast-n-BBfgDq.js → asciicast-CQJlNTae.js} +1 -1
- package/dist/chunks/{assistant-BA9_Mo9U.js → assistant-C83quuNj.js} +1 -1
- package/dist/chunks/{assistant-BiNOSla3.js → assistant-z1ojxEET.js} +1 -1
- package/dist/chunks/assistant-z2o4-UJe.js +1 -0
- package/dist/chunks/auth-Ce0jllLf.js +1 -0
- package/dist/chunks/auth-DV3P8Qup.js +1 -0
- package/dist/chunks/{auth-DHyCIxCk.js → auth-DpFfHy1W.js} +1 -1
- package/dist/chunks/{autoMode-Db4QrgFr.js → autoMode-DW_H3i37.js} +3 -3
- package/dist/chunks/{autonomy-BkAMA7du.js → autonomy-46hnmyAi.js} +1 -1
- package/dist/chunks/{autonomy-D4Vy-RPQ.js → autonomy-OxhciwYa.js} +1 -1
- package/dist/chunks/{autonomyPanel-EjfO8jvg.js → autonomyPanel-CTEjq0Bd.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-BycL9lOe.js +1 -0
- package/dist/chunks/{backgroundHousekeeping-hDDE8mJC.js → backgroundHousekeeping-Cpxq4krt.js} +2 -2
- package/dist/chunks/{banner-hD6wZygx.js → banner-BVkLvJiB.js} +1 -1
- package/dist/chunks/bg-H849G7Sc.js +1 -0
- package/dist/chunks/{bg-DQ0Q3Qv-.js → bg-zWGqkcST.js} +2 -2
- package/dist/chunks/{branch-CeQ9IyZk.js → branch-DJzijRGm.js} +1 -1
- package/dist/chunks/{break-cache-Bd0clV2N.js → break-cache-BQfgkNAo.js} +2 -2
- package/dist/chunks/{bridge-yerAiaK2.js → bridge-Dpr2AWpc.js} +2 -2
- package/dist/chunks/bridgeConfig-CcANVX0P.js +1 -0
- package/dist/chunks/{bridgeConfig-CCtXe8ak.js → bridgeConfig-DDF3teRE.js} +1 -1
- package/dist/chunks/bridgeEnabled-Cn-u7P4_.js +1 -0
- package/dist/chunks/{bridgeEnabled--F-6TUi4.js → bridgeEnabled-D4JDZd0y.js} +1 -1
- package/dist/chunks/{bridgeMain--R1HFbOv.js → bridgeMain-CtgVyLjI.js} +7 -7
- package/dist/chunks/bridgeMain-Dh0gWRVo.js +1 -0
- package/dist/chunks/{bridgeMessaging-CqbLTDcx.js → bridgeMessaging-CRG6HqUb.js} +1 -1
- package/dist/chunks/{bridgePointer-W_jdQ8zf.js → bridgePointer-Cug5fQ3e.js} +1 -1
- package/dist/chunks/{browser-Bd7GeBH1.js → browser-BKiu1max.js} +1 -1
- package/dist/chunks/{btw-CVGRmL9a.js → btw-DG9CCeq4.js} +1 -1
- package/dist/chunks/{caches-BtmAri4e.js → caches-BB5_91gU.js} +2 -2
- package/dist/chunks/caches-C3NINY3K.js +1 -0
- package/dist/chunks/{ccrClient-HqMi5Kfu.js → ccrClient-CRXGlUCe.js} +1 -1
- package/dist/chunks/{claudeDesktop-aUMx06RK.js → claudeDesktop-9xfIgkzE.js} +1 -1
- package/dist/chunks/{clear-C6nRzIQE.js → clear-ueMvDelv.js} +1 -1
- package/dist/chunks/{cliLaunch-2AUoMnqx.js → cliLaunch-BJ9o-rIV.js} +1 -1
- package/dist/chunks/client-AnWHs0gW.js +1 -0
- package/dist/chunks/{color-DXI_4ibU.js → color-B0-MIfsq.js} +1 -1
- package/dist/chunks/commands-DsKH3ogN.js +1 -0
- package/dist/chunks/commitAttribution-D7NrwLhc.js +1 -0
- package/dist/chunks/{commitAttribution-Cm40fdNU.js → commitAttribution-DKun9CeU.js} +1 -1
- package/dist/chunks/{compact-DPTVpJ4D.js → compact-BhWCO-oD.js} +1 -1
- package/dist/chunks/completionCache-C9zlWBRz.js +1 -0
- package/dist/chunks/{completionCache-BQaLkB4d.js → completionCache-CdHCuiqq.js} +2 -2
- package/dist/chunks/{config-C7YHKCPV.js → config-662VDD70.js} +1 -1
- package/dist/chunks/config-CUN8YbOa.js +1 -0
- package/dist/chunks/{config-CLmFk-5V.js → config-DklnhNx1.js} +1 -1
- package/dist/chunks/config-Wk3svGdH.js +1 -0
- package/dist/chunks/{context-C_cKrBUn.js → context-DBswG0EY.js} +1 -1
- package/dist/chunks/context-noninteractive-C3dICmA9.js +1 -0
- package/dist/chunks/{context-noninteractive-DnH6Q9Lu.js → context-noninteractive-CTvyNimw.js} +1 -1
- package/dist/chunks/{conversation-GJxfkr6M.js → conversation-CooSju3g.js} +1 -1
- package/dist/chunks/conversation-DLLIOKYV.js +1 -0
- package/dist/chunks/{createSSHSession--bWmmIk9.js → createSSHSession-BdO35H6o.js} +1 -1
- package/dist/chunks/{createSession-DIr4sUp6.js → createSession-Br1g8qSD.js} +1 -1
- package/dist/chunks/createSession-CVG8SiEm.js +1 -0
- package/dist/chunks/{crossProjectResume-DKrtjTpm.js → crossProjectResume-DiKJb83I.js} +1 -1
- package/dist/chunks/cwd--nvsx73T.js +1 -0
- package/dist/chunks/{cwd-BuJhkTrc.js → cwd-CYmmnQVS.js} +1 -1
- package/dist/chunks/{daemon-B9lBPdBJ.js → daemon-BQiSFjc-.js} +1 -1
- package/dist/chunks/{datadog-DNCsyfSO.js → datadog-BE6D_6m0.js} +1 -1
- package/dist/chunks/datadog-C69i7cfI.js +1 -0
- package/dist/chunks/debug-8kgDrUfj.js +1 -0
- package/dist/chunks/{debug-IKW-jE7K.js → debug-DiuXEmUq.js} +1 -1
- package/dist/chunks/{debugUtils-D2981c0Z.js → debugUtils-3YYWvb3H.js} +1 -1
- package/dist/chunks/{desktop-B5cvrcOQ.js → desktop-W7SA8BFk.js} +1 -1
- package/dist/chunks/{detached-rfIUyc-B.js → detached-Cv9gAylK.js} +1 -1
- package/dist/chunks/{detectRepository-ReZ0Fz8Z.js → detectRepository-B1PMTLAU.js} +1 -1
- package/dist/chunks/detectRepository-_Kj817Vi.js +1 -0
- package/dist/chunks/{diff-cXAp9cNN.js → diff-CMtRjFUb.js} +1 -1
- package/dist/chunks/{directoryCompletion-DBM2o5kx.js → directoryCompletion-CeV63gvu.js} +1 -1
- package/dist/chunks/doctor-DEz8BHAz.js +1 -0
- package/dist/chunks/{effort-Br8KKHdx.js → effort-BAlVDBHq.js} +1 -1
- package/dist/chunks/{entry-4lIRMrLI.js → entry-DLqeVq5C.js} +2 -2
- package/dist/chunks/envLessBridgeConfig-3kCrKZl7.js +1 -0
- package/dist/chunks/envLessBridgeConfig-BfgXw47_.js +1 -0
- package/dist/chunks/{execFileNoThrow-COKYqVQj.js → execFileNoThrow-DResQRvR.js} +1 -1
- package/dist/chunks/{execSyncWrapper-DZJ3tNWF.js → execSyncWrapper-CWxMek26.js} +1 -1
- package/dist/chunks/{exit-Z9oWrqE4.js → exit-cyepwuyy.js} +1 -1
- package/dist/chunks/extra-usage-DlFeNGQD.js +1 -0
- package/dist/chunks/{extra-usage-core-CdL1ltqq.js → extra-usage-core-Dh4rVUI-.js} +1 -1
- package/dist/chunks/{extra-usage-DtAIhW74.js → extra-usage-nRFfBiXh.js} +1 -1
- package/dist/chunks/{extra-usage-noninteractive-DxxRI0Yx.js → extra-usage-noninteractive-D4Ya5KPm.js} +1 -1
- package/dist/chunks/{extraUsage-BYZdi44Y.js → extraUsage-DtWi8E78.js} +1 -1
- package/dist/chunks/extractMemories-BqN8fWZ5.js +1 -0
- package/dist/chunks/{fast-DKqiojzf.js → fast-DkUxqWhE.js} +1 -1
- package/dist/chunks/fast-NvqW2-t1.js +1 -0
- package/dist/chunks/{feedback-yB19xph5.js → feedback-Cn7Sbqxa.js} +1 -1
- package/dist/chunks/{file-D1cN3LMK.js → file-BZriE-XU.js} +1 -1
- package/dist/chunks/{files-DAzGtmzz.js → files-Cz1-PK3r.js} +1 -1
- package/dist/chunks/firstPartyEventLogger-AhXYSrkP.js +1 -0
- package/dist/chunks/{firstPartyEventLogger-hU-LPkje.js → firstPartyEventLogger-BQYrBdvD.js} +2 -2
- package/dist/chunks/{flushGate-ZFr8yv7F.js → flushGate-ebqQZF1t.js} +1 -1
- package/dist/chunks/{gemini-DqAv8_GY.js → gemini-Sr_00TsL.js} +1 -1
- package/dist/chunks/{generateRecap-lO2PDlx8.js → generateRecap-5d4l_ODy.js} +1 -1
- package/dist/chunks/{generateSessionName-48veu5dv.js → generateSessionName-DEAw5x_h.js} +1 -1
- package/dist/chunks/{genericProcessUtils-F1Qcb1sO.js → genericProcessUtils-DO7Fy0RJ.js} +1 -1
- package/dist/chunks/git-Cc1jAz6r.js +1 -0
- package/dist/chunks/{git-tyaWOgRL.js → git-Cgc8X5l2.js} +2 -2
- package/dist/chunks/{githubRepoPathMapping-BlR0BphY.js → githubRepoPathMapping-Tt-LdYFZ.js} +1 -1
- package/dist/chunks/{goal-Bn8Kz2Dp.js → goal-DCaI1NPN.js} +1 -1
- package/dist/chunks/{grok-DhnO_KDC.js → grok-CKlngG3b.js} +1 -1
- package/dist/chunks/{grove-DotW04-v.js → grove-DSWe6psK.js} +1 -1
- package/dist/chunks/{heapdump-DkZSKNbp.js → heapdump-OVbV05On.js} +1 -1
- package/dist/chunks/{help-DU_BcZtU.js → help-CRtX5VX9.js} +1 -1
- package/dist/chunks/hooks-DvtnNoYE.js +1 -0
- package/dist/chunks/{hooks-BTMWE5Qx.js → hooks-tpf90xd5.js} +1 -1
- package/dist/chunks/{hostGuard-Dh296c6q.js → hostGuard-t7QfbijF.js} +1 -1
- package/dist/chunks/{inboundAttachments-DVs3_m48.js → inboundAttachments-BZ6MKpxd.js} +1 -1
- package/dist/chunks/inboundAttachments-D5Ux2kCl.js +1 -0
- package/dist/chunks/{initReplBridge-D0Xec8S-.js → initReplBridge-CjuO6in6.js} +1 -1
- package/dist/chunks/{install-BkfXeXpv.js → install-DqpM2brU.js} +1 -1
- package/dist/chunks/{instrumentation-H0XRS1yG.js → instrumentation--Sx0y1Gk.js} +3 -3
- package/dist/chunks/{job-DKtLkF8V.js → job-D7B35Usp.js} +1 -1
- package/dist/chunks/{jwtUtils-C-ojmb8W.js → jwtUtils-CqXPjf-a.js} +1 -1
- package/dist/chunks/{keybindings-ez51eHHp.js → keybindings-JvAmBpLt.js} +1 -1
- package/dist/chunks/{language-BuRSO2sR.js → language-8Rnu_qxl.js} +1 -1
- package/dist/chunks/language-DaxZe0Xw.js +1 -0
- package/dist/chunks/{launchAgentsPlatform-BQyPdrHp.js → launchAgentsPlatform-CNPkOVzu.js} +1 -1
- package/dist/chunks/{launchLocalMemory-CWHAj7CX.js → launchLocalMemory-BxmDhENs.js} +1 -1
- package/dist/chunks/{launchLocalVault-D8iJdtsP.js → launchLocalVault-DQlTGA-g.js} +1 -1
- package/dist/chunks/{launchMemoryStores-W7jWG2uH.js → launchMemoryStores-EYAwxI8i.js} +1 -1
- package/dist/chunks/{launchOnboarding-q__LaLy1.js → launchOnboarding-CTu5Zf4E.js} +1 -1
- package/dist/chunks/{launchSchedule-BWi9F5vh.js → launchSchedule-CeHHSvO7.js} +1 -1
- package/dist/chunks/{launchSkillStore-4wd4MQBc.js → launchSkillStore-Bqh2Fru2.js} +1 -1
- package/dist/chunks/{launchTeleport-BlCf2QM_.js → launchTeleport-Crc3XVZX.js} +1 -1
- package/dist/chunks/{launchVault-C7u7LZV7.js → launchVault-BHLgpth_.js} +1 -1
- package/dist/chunks/loadAgentsDir-D7npVvsj.js +1 -0
- package/dist/chunks/{loadAgentsDir-nzr38hai.js → loadAgentsDir-ZQwvbURI.js} +66 -66
- package/dist/chunks/{loadPluginHooks-z1-zvBLw.js → loadPluginHooks-CaKvZVZI.js} +1 -1
- package/dist/chunks/localSearch-BU5oulbF.js +1 -0
- package/dist/chunks/{localSearch-B-L_ldos.js → localSearch-H0LchlTi.js} +1 -1
- package/dist/chunks/{log-B3eB4EFv.js → log-Duzb4o6h.js} +1 -1
- package/dist/chunks/{logoV2Utils-RQ160dI2.js → logoV2Utils-5lcUu53m.js} +1 -1
- package/dist/chunks/{magicDocs-BqZ0GewA.js → magicDocs-D1FIPmYg.js} +1 -1
- package/dist/chunks/main-B8XtFN2P.js +859 -0
- package/dist/chunks/{main-DeFMhaFE.js → main-CR7cXdgy.js} +3 -3
- package/dist/chunks/{mappers-CWykjGfP.js → mappers-DKU4RgE3.js} +1 -1
- package/dist/chunks/{mcp-DBwT4pa9.js → mcp-B06Mqsur.js} +4 -4
- package/dist/chunks/{mcp-DvZTaHZE.js → mcp-C0AjA07u.js} +1 -1
- package/dist/chunks/{mcp-CSFPAfaW.js → mcp-ghioDl7W.js} +1 -1
- package/dist/chunks/{memoize-BO31Ws9Q.js → memoize-DgMjqLtn.js} +1 -1
- package/dist/chunks/{memory-DcpPpYN0.js → memory-D-Q62bJ7.js} +1 -1
- package/dist/chunks/{metadata-BRLJvh61.js → metadata-CIx5CsoY.js} +1 -1
- package/dist/chunks/{mode-BkViT_0o.js → mode-DFZgqKBd.js} +1 -1
- package/dist/chunks/{model-DfFA3qMO.js → model-BgrLt7P7.js} +1 -1
- package/dist/chunks/model-aVc5c3Lz.js +1 -0
- package/dist/chunks/{model-CZktWw6o.js → model-fDWtIRVr.js} +1 -1
- package/dist/chunks/{nativeInstaller-GcIk7G2Y.js → nativeInstaller-DKe1pWoL.js} +1 -1
- package/dist/chunks/{onChangeAppState-DwGVi-BC.js → onChangeAppState-DaQ0R9Tw.js} +1 -1
- package/dist/chunks/{openai-B2wxZDQx.js → openai-DNS0-ivj.js} +1 -1
- package/dist/chunks/{overageCreditGrant-CjK49axw.js → overageCreditGrant-qHN3tnp2.js} +1 -1
- package/dist/chunks/{panel-R4ue6pSW.js → panel-Be-OxtqL.js} +1 -1
- package/dist/chunks/{panel-B-nrcHpm.js → panel-CrTPqXCv.js} +1 -1
- package/dist/chunks/{panelCall-I_fbgub5.js → panelCall-BvKpHquo.js} +1 -1
- package/dist/chunks/parser-Bj3gOqFv.js +1 -0
- package/dist/chunks/{parser-CQrasoUB.js → parser-TYEkLFgh.js} +1 -1
- package/dist/chunks/{partition-CxRF7T-f.js → partition-Cv11dD5P.js} +1 -1
- package/dist/chunks/{passes-U_h-hNu-.js → passes-DQdM2Ssq.js} +1 -1
- package/dist/chunks/{path-BCSE0S-c.js → path-Cu_AKqg6.js} +1 -1
- package/dist/chunks/{permissions-B8epy16o.js → permissions-DB_2mmCl.js} +1 -1
- package/dist/chunks/{pidLock-CBJDnBG_.js → pidLock-DchmaAK6.js} +2 -2
- package/dist/chunks/{pipeTransport-D3Qx9v1V.js → pipeTransport-7GIO6GCA.js} +1 -1
- package/dist/chunks/{plan-BAhStVci.js → plan-D8dQDl8W.js} +1 -1
- package/dist/chunks/{platform-EtecGacO.js → platform-B5dCGT8t.js} +1 -1
- package/dist/chunks/{plugin-D9huNnv6.js → plugin-w8MqsKHn.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-BfmyxR5g.js → pluginAutoupdate-7FFHzSRz.js} +1 -1
- package/dist/chunks/{pluginBlocklist-03sZaZa6.js → pluginBlocklist-Cw_l-yal.js} +1 -1
- package/dist/chunks/{pluginCliCommands-P2Ndi1r1.js → pluginCliCommands-BtYWRxhS.js} +1 -1
- package/dist/chunks/{pluginFlagging-BVy7Xv_0.js → pluginFlagging-_WUQP3Lq.js} +1 -1
- package/dist/chunks/{pluginOperations-Cz37qcjF.js → pluginOperations-BOkST1qE.js} +1 -1
- package/dist/chunks/{pluginStartupCheck-w24D-wwk.js → pluginStartupCheck-BelpzwZI.js} +1 -1
- package/dist/chunks/pluginStartupCheck-XBLJZZys.js +1 -0
- package/dist/chunks/{plugins-B0hiIN4q.js → plugins-6px6K1fh.js} +1 -1
- package/dist/chunks/policyLimits-C07tQ0Wr.js +1 -0
- package/dist/chunks/{poor-CfbMKZNJ.js → poor-D3T_8wwf.js} +1 -1
- package/dist/chunks/poorMode-BdBDiOFD.js +1 -0
- package/dist/chunks/{poorMode-Bsw2V-V_.js → poorMode-BqyVuBu-.js} +1 -1
- package/dist/chunks/{print-ozjC0Mhg.js → print-DcQSuK0v.js} +4 -4
- package/dist/chunks/{privacy-settings-DeGoBRrZ.js → privacy-settings-D5zxu4Aa.js} +1 -1
- package/dist/chunks/{processBashCommand-loWZ8MSE.js → processBashCommand-CEqA4QZi.js} +1 -1
- package/dist/chunks/{processSlashCommand-BdouajZb.js → processSlashCommand-DMpFk59M.js} +1 -1
- package/dist/chunks/prompt-CKvoqUC3.js +1 -0
- package/dist/chunks/prompt-aXZPR3q8.js +1 -0
- package/dist/chunks/{prompt-Bef63FhB.js → prompt-wys9CwDo.js} +1 -1
- package/dist/chunks/{promptEditor-foiayhdY.js → promptEditor-D6HzjcMS.js} +1 -1
- package/dist/chunks/{protocolHandler-BsiB1oW_.js → protocolHandler-BXlx1N7v.js} +1 -1
- package/dist/chunks/{proxy-Cn2YwITp.js → proxy-CHnxhNZI.js} +1 -1
- package/dist/chunks/{rate-limit-options-DTJPDcTr.js → rate-limit-options-1hc-RyNR.js} +1 -1
- package/dist/chunks/{rcDebugLog-BUuD-X1D.js → rcDebugLog-CivJaJ3V.js} +1 -1
- package/dist/chunks/{reconciler-DqXTmV3J.js → reconciler-BKX4jh34.js} +1 -1
- package/dist/chunks/{referral-DP_GshTS.js → referral-Cu9bEOFE.js} +1 -1
- package/dist/chunks/{refresh-CNzXPAFw.js → refresh-vJbxW4a1.js} +1 -1
- package/dist/chunks/{registerProtocol-CjxlFsKw.js → registerProtocol-B_XbLDQO.js} +3 -3
- package/dist/chunks/{release-notes-BxgK8zWO.js → release-notes-CavWoMQR.js} +1 -1
- package/dist/chunks/{releaseNotes-CbSktIJW.js → releaseNotes-Di6OaHF7.js} +2 -2
- package/dist/chunks/{reload-plugins-CDu6yU5-.js → reload-plugins-ofeLn07p.js} +1 -1
- package/dist/chunks/{remote-env-B4HnhISc.js → remote-env-dXzHAuD6.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-D-wG5jau.js → remoteBridgeCore-CmwkjiTK.js} +1 -1
- package/dist/chunks/{remoteManagedSettings-B7gt0VAX.js → remoteManagedSettings-Co-CxR67.js} +1 -1
- package/dist/chunks/{rename-DlbMb24l.js → rename-CtjP0lop.js} +1 -1
- package/dist/chunks/{renderOptions-5kWQpVr2.js → renderOptions-DOXmueQV.js} +1 -1
- package/dist/chunks/{resume-BB5iBogS.js → resume-C5h5JvY1.js} +1 -1
- package/dist/chunks/{ripgrep-BvDwiKJ3.js → ripgrep-BN_g-F7X.js} +1 -1
- package/dist/chunks/ripgrep-hOjrgpMp.js +1 -0
- package/dist/chunks/{runtimeObserver-Ci-5gvYg.js → runtimeObserver-B93v1AxE.js} +2 -2
- package/dist/chunks/{runtimeObserver-BNH2WGE3.js → runtimeObserver-DOZFrqJu.js} +1 -1
- package/dist/chunks/sandbox-adapter-CO5GuywY.js +1 -0
- package/dist/chunks/{sandbox-toggle-B2Yk4y2V.js → sandbox-toggle-TiLGFwaZ.js} +1 -1
- package/dist/chunks/searchExtraTools-CXZJU2Kv.js +1 -0
- package/dist/chunks/{session-Bmx7L3Mt.js → session-v9tKHhU9.js} +1 -1
- package/dist/chunks/{sessionDiscovery-DcEAr5vJ.js → sessionDiscovery-4byQKOnc.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-BUyIQVzL.js +1 -0
- package/dist/chunks/sessionMemory-ZsxCLHYd.js +1 -0
- package/dist/chunks/{sessionMemory-Bsg2unYX.js → sessionMemory-e6YpTUhW.js} +1 -1
- package/dist/chunks/sessionMemoryUtils-BD_dqyYB.js +1 -0
- package/dist/chunks/sessionObserver-DNItJztR.js +1 -0
- package/dist/chunks/{sessionObserver-DQwHsDrM.js → sessionObserver-OgY9BUP4.js} +1 -1
- package/dist/chunks/sessionStorage-xvxpRETp.js +1 -0
- package/dist/chunks/{sessionTitle-B8jcexkQ.js → sessionTitle-Bph6GO4F.js} +1 -1
- package/dist/chunks/{sessionTracing-BuLsL6qA.js → sessionTracing-BBxhPccY.js} +1 -1
- package/dist/chunks/{settings-5PQdphqC.js → settings-BhvhCpVh.js} +2 -2
- package/dist/chunks/settingsSync-D2B5K4BT.js +1 -0
- package/dist/chunks/{setup-BKEnSLR9.js → setup-CEnNEK6Z.js} +2 -2
- package/dist/chunks/{shadowedRuleDetection-7Z8ezTKF.js → shadowedRuleDetection-DDSOFi1W.js} +1 -1
- package/dist/chunks/{shellQuote-fB02N16J.js → shellQuote-yXoC_y5m.js} +1 -1
- package/dist/chunks/{sideQuestion-CYdNATPW.js → sideQuestion-CAiA6jAf.js} +1 -1
- package/dist/chunks/sink-CyKOf5TT.js +1 -0
- package/dist/chunks/{sink-DjKoYMsA.js → sink-DxPJ4khU.js} +1 -1
- package/dist/chunks/{sinks-GryGVRT8.js → sinks-BNo3DvxO.js} +2 -2
- package/dist/chunks/sinks-CHgtwDha.js +1 -0
- package/dist/chunks/{skill-learning-E8tQed-Q.js → skill-learning-Dx1o4mMo.js} +1 -1
- package/dist/chunks/{skillChangeDetector-A8SAuyo9.js → skillChangeDetector-BRBCwQ2w.js} +1 -1
- package/dist/chunks/{skillGapStore-B5rl12bV.js → skillGapStore-BV_6qzxU.js} +1 -1
- package/dist/chunks/{skillGapStore-CjJrxxjk.js → skillGapStore-Zvqiyxds.js} +2 -2
- package/dist/chunks/{skillGenerator-BDR_z3-X.js → skillGenerator-jJQDphQ8.js} +2 -2
- package/dist/chunks/skillLearning-BH7EAU1m.js +1 -0
- package/dist/chunks/{skillLearning-BQtfFE0g.js → skillLearning-BTT3_yGc.js} +1 -1
- package/dist/chunks/{skillPanel-yR8Oi-mO.js → skillPanel-OW2M6SZr.js} +3 -3
- package/dist/chunks/{skillSearchPanel-DUQQUCUS.js → skillSearchPanel-C0Y56c5N.js} +4 -4
- package/dist/chunks/{skills-NAZQ3j-t.js → skills-BFsyLP33.js} +1 -1
- package/dist/chunks/{startupProfiler-DxRQteII.js → startupProfiler-BquH_Yqm.js} +1 -1
- package/dist/chunks/startupProfiler-CYCH-qos.js +1 -0
- package/dist/chunks/state-BOa-3Av3.js +1 -0
- package/dist/chunks/{state-4KQ3kaqz.js → state-ix0xIunV.js} +1 -1
- package/dist/chunks/{stats-h4yu84Q-.js → stats-CrPmPT8f.js} +1 -1
- package/dist/chunks/{status-BbdeubJG.js → status-BO5J2MAe.js} +1 -1
- package/dist/chunks/{status-is_Bg_IB.js → status-DHJbK4pV.js} +1 -1
- package/dist/chunks/{statusNoticeHelpers-CQ7CUugR.js → statusNoticeHelpers-CqeUBySi.js} +1 -1
- package/dist/chunks/{stickers-qJoNhPk4.js → stickers-BLFmyHZV.js} +1 -1
- package/dist/chunks/{stringUtils-CvXbHQRH.js → stringUtils-D_g2L6A4.js} +1 -1
- package/dist/chunks/systemPromptSections-CR_AoPIX.js +1 -0
- package/dist/chunks/{systemPromptSections-CgpggIYX.js → systemPromptSections-DN0HGVye.js} +1 -1
- package/dist/chunks/{tag-i3HZ4lhj.js → tag-M2AEtXjW.js} +1 -1
- package/dist/chunks/{tasks-HzsYNTZ1.js → tasks-CoOs_Qkj.js} +1 -1
- package/dist/chunks/{teleport-hN3cAbYC.js → teleport-DjIgQeBB.js} +1 -1
- package/dist/chunks/{templateJobs-CIv_ysje.js → templateJobs-Cl50Qw0s.js} +1 -1
- package/dist/chunks/{terminalSetup-CxniwSF-.js → terminalSetup-Bdh9K31U.js} +1 -1
- package/dist/chunks/{terminalSetup-C0PF87iu.js → terminalSetup-nvS3KCDG.js} +1 -1
- package/dist/chunks/{theme-BKIHX_Dx.js → theme-DgCIr0jU.js} +1 -1
- package/dist/chunks/thinkback-BSv_fvbV.js +1 -0
- package/dist/chunks/{thinkback-mT-8FIT-.js → thinkback-ERCQ86CR.js} +1 -1
- package/dist/chunks/{thinkback-play-Cfk49mvF.js → thinkback-play-DNB0IWYt.js} +1 -1
- package/dist/chunks/{tmux-CbsW-VDJ.js → tmux-ZZk68JBq.js} +1 -1
- package/dist/chunks/{toolEventObserver-8FQtxeVv.js → toolEventObserver-9-5Ne25Z.js} +1 -1
- package/dist/chunks/{toolEventObserver-B1xvyKdE.js → toolEventObserver-9XCQXiMx.js} +1 -1
- package/dist/chunks/{toolPool-CHVDZqh7.js → toolPool-uQKZRMKg.js} +1 -1
- package/dist/chunks/trustedDevice-0ej6e3nx.js +1 -0
- package/dist/chunks/{trustedDevice-BYCh1ff7.js → trustedDevice-nqhuw4tp.js} +1 -1
- package/dist/chunks/{tui-fTa_pzdA.js → tui-C2yuCuOU.js} +3 -3
- package/dist/chunks/{types-a7X-tJpJ.js → types-Cnorfsss.js} +1 -1
- package/dist/chunks/{udsClient-Cg9bBD0p.js → udsClient-CiFj4M_h.js} +1 -1
- package/dist/chunks/{ultrareviewCommand-DCFRZsKp.js → ultrareviewCommand-BMBHepdu.js} +1 -1
- package/dist/chunks/undercover-6UUO38fQ.js +1 -0
- package/dist/chunks/{undercover-CsLPQb-a.js → undercover-DDgIKbO5.js} +3 -3
- package/dist/chunks/{up-dO5BcPaq.js → up-D6bNw_tT.js} +1 -1
- package/dist/chunks/{updateCCB-CfUnkOLT.js → updateCCB-B-OlpLjA.js} +1 -1
- package/dist/chunks/{upgrade-kpttjebY.js → upgrade-BN20nsCH.js} +1 -1
- package/dist/chunks/upgrade-DYqlCH80.js +1 -0
- package/dist/chunks/{upload-DDhQqV8n.js → upload-BQGByiXE.js} +1 -1
- package/dist/chunks/{upstreamproxy-CvcjNY7J.js → upstreamproxy-os5rw0Vg.js} +1 -1
- package/dist/chunks/{usage-CJ5w0907.js → usage-D_sqm8us.js} +1 -1
- package/dist/chunks/usage-DolSCKGi.js +1 -0
- package/dist/chunks/{useExitOnCtrlCDWithKeybindings-yAroCqu4.js → useExitOnCtrlCDWithKeybindings-vzUoPY51.js} +1 -1
- package/dist/chunks/useMainLoopModel-cZd8EKo5.js +1 -0
- package/dist/chunks/{useManagePlugins-CTtPaQRP.js → useManagePlugins-DgGZBvXV.js} +1 -1
- package/dist/chunks/{useMergedTools-CZJffsmf.js → useMergedTools-Bb4XbC9d.js} +1 -1
- package/dist/chunks/{useSearchInput-C-CqUK6w.js → useSearchInput-B1UOjxAI.js} +1 -1
- package/dist/chunks/{useSettingsErrors-BWlJCgYF.js → useSettingsErrors-BLbvu4--.js} +1 -1
- package/dist/chunks/{util-DJV0joAW.js → util-CxlfALM4.js} +1 -1
- package/dist/chunks/validatePlugin-n8a4W_jI.js +1 -0
- package/dist/chunks/{vim-n8-UT5w-.js → vim-DLWBHwVM.js} +1 -1
- package/dist/chunks/{which-BBCjXfI2.js → which-sEFQXpaX.js} +1 -1
- package/dist/chunks/windowsPaths-BLevJOlm.js +1 -0
- package/dist/chunks/{windowsPaths-D6T_3XaU.js → windowsPaths-N_YmYY6k.js} +1 -1
- package/dist/chunks/{workSecret-C_lv0dRh.js → workSecret-DvniZR71.js} +1 -1
- package/dist/chunks/{workerRegistry-BdHi7_sN.js → workerRegistry-CFnGtb3L.js} +1 -1
- package/dist/chunks/worktree-Dr_WzlXs.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ApproveApiKey-DfAPwDix.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-BV7HHcgL.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-CU5fCPKq.js +0 -1
- package/dist/chunks/Doctor-B0CRtxi2.js +0 -1
- package/dist/chunks/Grove-CelgLWH4.js +0 -1
- package/dist/chunks/Messages-jCoW_1Rr.js +0 -11
- package/dist/chunks/REPL-DcpN3MRC.js +0 -1
- package/dist/chunks/RemoteSessionManager-Tx1N2uVL.js +0 -2
- package/dist/chunks/SearchExtraToolsTool-D3VOFq9R.js +0 -1
- package/dist/chunks/WelcomeV2-BTfttGcv.js +0 -1
- package/dist/chunks/api-L2IgleTV.js +0 -1
- package/dist/chunks/api-TgV7fl9V.js +0 -1
- package/dist/chunks/asciicast-DYbkzGCN.js +0 -1
- package/dist/chunks/assistant-YvbVKjVh.js +0 -1
- package/dist/chunks/auth-CEig4Gxp.js +0 -1
- package/dist/chunks/auth-CbGDlhyO.js +0 -1
- package/dist/chunks/backgroundHousekeeping-BNEKWHhH.js +0 -1
- package/dist/chunks/bg-BzG63WOm.js +0 -1
- package/dist/chunks/bridgeConfig-D5dB38xD.js +0 -1
- package/dist/chunks/bridgeEnabled-DKX8-T_H.js +0 -1
- package/dist/chunks/bridgeMain-d06JByZn.js +0 -1
- package/dist/chunks/caches-BuTIAOtY.js +0 -1
- package/dist/chunks/client-BeET1hnC.js +0 -1
- package/dist/chunks/commands-VjcG4qFq.js +0 -1
- package/dist/chunks/commitAttribution-Lb3qUlAR.js +0 -1
- package/dist/chunks/completionCache-CW8lKIgy.js +0 -1
- package/dist/chunks/config-0cRberzR.js +0 -1
- package/dist/chunks/config-BrxKpHpR.js +0 -1
- package/dist/chunks/context-noninteractive-rUZ3ydmJ.js +0 -1
- package/dist/chunks/conversation-oK3aFzqO.js +0 -1
- package/dist/chunks/createSession-DM4acqaC.js +0 -1
- package/dist/chunks/cwd-D-tY2NKc.js +0 -1
- package/dist/chunks/datadog-ByS7LGGa.js +0 -1
- package/dist/chunks/debug-DzZUT2Wv.js +0 -1
- package/dist/chunks/detectRepository-6nw-Aw3v.js +0 -1
- package/dist/chunks/doctor-CTMHXZvQ.js +0 -1
- package/dist/chunks/envLessBridgeConfig-CGuIxFzJ.js +0 -1
- package/dist/chunks/envLessBridgeConfig-D_Jg4fJy.js +0 -1
- package/dist/chunks/extra-usage-BS4aVOt5.js +0 -1
- package/dist/chunks/extractMemories-C4f9JWuI.js +0 -1
- package/dist/chunks/fast-B0OB4x7K.js +0 -1
- package/dist/chunks/firstPartyEventLogger-CdUpe6Lh.js +0 -1
- package/dist/chunks/git-BE_FiJZp.js +0 -1
- package/dist/chunks/hooks-DONAb_nq.js +0 -1
- package/dist/chunks/inboundAttachments-BcEgi49j.js +0 -1
- package/dist/chunks/language-Da4KNbjm.js +0 -1
- package/dist/chunks/loadAgentsDir-Dgd-fzNt.js +0 -1
- package/dist/chunks/localSearch-D-FprOMr.js +0 -1
- package/dist/chunks/main-y7LJ5qUc.js +0 -1243
- package/dist/chunks/model--z4Di9QO.js +0 -1
- package/dist/chunks/parser-BlM_Fk4J.js +0 -1
- package/dist/chunks/pluginStartupCheck-BqUwHcMD.js +0 -1
- package/dist/chunks/policyLimits-Dem-XJ_h.js +0 -1
- package/dist/chunks/poorMode-jvImnkty.js +0 -1
- package/dist/chunks/prompt-C7wd1H_i.js +0 -1
- package/dist/chunks/prompt-DIoNqZvO.js +0 -1
- package/dist/chunks/ripgrep-BQgJ02F9.js +0 -1
- package/dist/chunks/sandbox-adapter-Coe1GDAE.js +0 -1
- package/dist/chunks/searchExtraTools-BnWZ9roi.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-BhdOmW9o.js +0 -1
- package/dist/chunks/sessionMemory-CIbCojm-.js +0 -1
- package/dist/chunks/sessionMemoryUtils-Cjb57wtC.js +0 -1
- package/dist/chunks/sessionObserver-CRU1qWnP.js +0 -1
- package/dist/chunks/sessionStorage-BxDN8qRc.js +0 -1
- package/dist/chunks/settingsSync-BDeuErb5.js +0 -1
- package/dist/chunks/sink-iYxWapbU.js +0 -1
- package/dist/chunks/sinks-jfaIjsRJ.js +0 -1
- package/dist/chunks/skillLearning-C8ihdryM.js +0 -1
- package/dist/chunks/startupProfiler-B0m6crkd.js +0 -1
- package/dist/chunks/state-53JDbNQM.js +0 -1
- package/dist/chunks/systemPromptSections-IePG5K8r.js +0 -1
- package/dist/chunks/thinkback-BA4cMz4D.js +0 -1
- package/dist/chunks/trustedDevice-DnIWErCt.js +0 -1
- package/dist/chunks/undercover-B-kKUWtK.js +0 -1
- package/dist/chunks/upgrade-CngUwvY4.js +0 -1
- package/dist/chunks/usage-eZRwLa77.js +0 -1
- package/dist/chunks/useMainLoopModel-BNFW-g8E.js +0 -1
- package/dist/chunks/validatePlugin-CRmpIGLV.js +0 -1
- package/dist/chunks/windowsPaths-DUKTzBck.js +0 -1
- package/dist/chunks/worktree-YDeHMlHZ.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,o as n,t as r}from"./cliLaunch-
|
|
2
|
-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,o as n,t as r}from"./cliLaunch-BJ9o-rIV.js";import{a as i,i as a,n as o,r as s,t as c}from"./state-Cn_m2NOf.js";import{resolve as l}from"path";async function u(e){let t=e[0]||`status`;switch(t){case`start`:await h(e.slice(1));break;case`stop`:await p();break;case`status`:case`ps`:await f();break;case`bg`:await(await import(`./bg-H849G7Sc.js`)).handleBgStart(e.slice(1));break;case`attach`:await(await import(`./bg-H849G7Sc.js`)).attachHandler(e[1]);break;case`logs`:await(await import(`./bg-H849G7Sc.js`)).logsHandler(e[1]);break;case`kill`:await(await import(`./bg-H849G7Sc.js`)).killHandler(e[1]);break;case`--help`:case`-h`:case`help`:d();break;default:console.error(`Unknown daemon subcommand: ${t}`),d(),process.exitCode=1}}function d(){console.log(`
|
|
2
|
+
Work Mate Daemon — background process management
|
|
3
3
|
|
|
4
4
|
USAGE
|
|
5
5
|
claude daemon [subcommand]
|
|
@@ -26,6 +26,6 @@ OPTIONS (for start)
|
|
|
26
26
|
--name <name> Session name
|
|
27
27
|
-h, --help Show this help
|
|
28
28
|
`)}async function f(){let e=o();switch(console.log(`=== Daemon Supervisor ===`),e.status){case`running`:{let t=e.state;console.log(` Status: running`),console.log(` PID: ${t.pid}`),console.log(` CWD: ${t.cwd}`),console.log(` Started: ${t.startedAt}`),console.log(` Workers: ${t.workerKinds.join(`, `)}`);break}case`stopped`:console.log(` Status: stopped`);break;case`stale`:console.log(` Status: stale (cleaned up)`);break}console.log(`
|
|
29
|
-
=== Background Sessions ===`),await(await import(`./bg-
|
|
29
|
+
=== Background Sessions ===`),await(await import(`./bg-H849G7Sc.js`)).psHandler([])}async function p(){let e=o();if(e.status===`stopped`){console.log(`daemon is not running`);return}if(e.status===`stale`){console.log(`daemon was stale (cleaned up)`);return}console.log(`stopping daemon (PID: ${e.state.pid})...`),await a()?console.log(`daemon stopped`):console.log(`daemon could not be stopped (may have already exited)`)}function m(e){let t={};for(let n=0;n<e.length;n++){let r=e[n];r===`--dir`&&n+1<e.length?t.dir=l(e[++n]):r.startsWith(`--dir=`)?t.dir=l(r.slice(6)):r===`--spawn-mode`&&n+1<e.length?t.spawnMode=e[++n]:r.startsWith(`--spawn-mode=`)?t.spawnMode=r.slice(13):r===`--capacity`&&n+1<e.length?t.capacity=e[++n]:r.startsWith(`--capacity=`)?t.capacity=r.slice(11):r===`--permission-mode`&&n+1<e.length?t.permissionMode=e[++n]:r.startsWith(`--permission-mode=`)?t.permissionMode=r.slice(18):r===`--sandbox`?t.sandbox=`1`:r===`--name`&&n+1<e.length?t.name=e[++n]:r.startsWith(`--name=`)&&(t.name=r.slice(7))}return t}async function h(e){let t=m(e),n=t.dir||l(`.`);console.log(`[daemon] supervisor starting in ${n}`);let r=[{kind:`remoteControl`,process:null,backoffMs:v,failureCount:0,parked:!1,lastStartTime:0,restartTimer:null}];i({pid:process.pid,cwd:n,startedAt:new Date().toISOString(),workerKinds:r.map(e=>e.kind),lastStatus:`running`});let a=new AbortController,o=()=>{console.log(`[daemon] supervisor shutting down...`),a.abort(),s();for(let e of r)e.restartTimer&&(clearTimeout(e.restartTimer),e.restartTimer=null),e.process&&!e.process.killed&&e.process.kill(`SIGTERM`)};process.on(`SIGTERM`,o),process.on(`SIGINT`,o);for(let e of r)a.signal.aborted||g(e,n,t,a.signal);await new Promise(e=>{if(a.signal.aborted){e();return}a.signal.addEventListener(`abort`,()=>e(),{once:!0})}),await Promise.all(r.filter(e=>e.process&&e.process.exitCode===null).map(e=>new Promise(t=>{if(!e.process||e.process.exitCode!==null){t();return}let n=null;e.process.on(`exit`,()=>{n&&(clearTimeout(n),n=null),t()}),n=setTimeout(()=>{e.process&&e.process.exitCode===null&&e.process.kill(`SIGKILL`),t()},3e4),n.unref?.()}))),console.log(`[daemon] supervisor stopped`)}function g(e,t,i,a){if(a.aborted||e.parked)return;e.lastStartTime=Date.now();let o={...process.env,DAEMON_WORKER_DIR:t,DAEMON_WORKER_NAME:i.name,DAEMON_WORKER_SPAWN_MODE:i.spawnMode||`same-dir`,DAEMON_WORKER_CAPACITY:i.capacity||`4`,DAEMON_WORKER_PERMISSION:i.permissionMode,DAEMON_WORKER_SANDBOX:i.sandbox||`0`,DAEMON_WORKER_CREATE_SESSION:`1`,CLAUDE_CODE_SESSION_KIND:`daemon-worker`};console.log(`[daemon] spawning worker '${e.kind}'`);let s=n(r([`--daemon-worker=${e.kind}`],{env:o}),{cwd:t,stdio:[`ignore`,`pipe`,`pipe`]});e.process=s,s.stdout?.on(`data`,e=>{let t=e.toString().trimEnd().split(`
|
|
30
30
|
`);for(let e of t)console.log(` ${e}`)}),s.stderr?.on(`data`,e=>{let t=e.toString().trimEnd().split(`
|
|
31
31
|
`);for(let e of t)console.error(` ${e}`)}),s.on(`exit`,(n,r)=>{if(e.process=null,!a.aborted){if(n===_){console.error(`[daemon] worker '${e.kind}' exited with permanent error — parking`),e.parked=!0;return}if(Date.now()-e.lastStartTime<1e4){if(e.failureCount++,e.failureCount>=x){console.error(`[daemon] worker '${e.kind}' failed ${e.failureCount} times rapidly — parking`),e.parked=!0;return}}else e.failureCount=0,e.backoffMs=v;console.log(`[daemon] worker '${e.kind}' exited (code=${n}, signal=${r}), restarting in ${e.backoffMs}ms`),e.restartTimer=setTimeout(()=>{e.restartTimer=null,!a.aborted&&!e.parked&&g(e,t,i,a)},e.backoffMs),e.restartTimer.unref?.(),e.backoffMs=Math.min(e.backoffMs*b,y)}})}var _,v,y,b,x;e((()=>{t(),c(),_=78,v=2e3,y=12e4,b=2,x=5}))();export{u as daemonMain};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Kr as t,qr as n}from"./src-CDCSSo0U2.js";import{en as r,ht as i}from"./state-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Kr as t,qr as n}from"./src-CDCSSo0U2.js";import{en as r,ht as i}from"./state-ix0xIunV.js";import{My as a,Oy as o,po as s,zo as c}from"./loadAgentsDir-ZQwvbURI.js";import{Y as l}from"./log-Duzb4o6h.js";import{Vt as u}from"./prompt-wys9CwDo.js";import{randomUUID as d}from"crypto";function f(e){return e.flatMap(e=>{if(!e)return[];switch(e.type){case`assistant`:return[{type:`assistant`,message:e.message,uuid:e.uuid,requestId:void 0,timestamp:new Date().toISOString()}];case`user`:return[{type:`user`,message:e.message,uuid:e.uuid??d(),timestamp:e.timestamp??new Date().toISOString(),isMeta:e.isSynthetic}];default:return[]}})}function p(e){let t=e.preservedSegment;return{trigger:e.trigger,pre_tokens:e.preTokens,...t&&{preserved_segment:{head_uuid:t.headUuid,anchor_uuid:t.anchorUuid,tail_uuid:t.tailUuid}}}}function m(e){let t=e,n=t.preserved_segment;return{trigger:t.trigger,preTokens:t.pre_tokens,...n&&{preservedSegment:{headUuid:n.head_uuid,anchorUuid:n.anchor_uuid,tailUuid:n.tail_uuid}}}}function h(e){return e.flatMap(e=>{if(!e)return[];switch(e.type){case`assistant`:return[{type:`assistant`,message:v(e),session_id:i(),parent_tool_use_id:null,uuid:e.uuid,error:e?.error}];case`user`:return[{type:`user`,message:e.message,session_id:i(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isSynthetic:e.isMeta||e.isVisibleInTranscriptOnly,...e.toolUseResult===void 0?{}:{tool_use_result:e.toolUseResult}}];case`system`:return e.subtype===`compact_boundary`&&e.compactMetadata?[{type:`system`,subtype:`compact_boundary`,session_id:i(),uuid:e.uuid,compact_metadata:p(e.compactMetadata)}]:e.subtype===`local_command`&&(e.content.includes(`<local-command-stdout>`)||e.content.includes(`<local-command-stderr>`))?[g(e.content,e.uuid)]:[];default:return[]}})}function g(e,t){let r=s({content:n(e).replace(/<local-command-stdout>([\s\S]*?)<\/local-command-stdout>/,`$1`).replace(/<local-command-stderr>([\s\S]*?)<\/local-command-stderr>/,`$1`).trim()});return{type:`assistant`,content:r.message?.content,message:r.message,parent_tool_use_id:null,session_id:i(),uuid:t}}function _(e){if(e)return{type:`rate_limit`,status:e.status,...e.resetsAt!==void 0&&{resetsAt:e.resetsAt},...e.rateLimitType!==void 0&&{rateLimitType:e.rateLimitType},...e.utilization!==void 0&&{utilization:e.utilization},...e.overageStatus!==void 0&&{overageStatus:e.overageStatus},...e.overageResetsAt!==void 0&&{overageResetsAt:e.overageResetsAt},...e.overageDisabledReason!==void 0&&{overageDisabledReason:e.overageDisabledReason},...e.isUsingOverage!==void 0&&{isUsingOverage:e.isUsingOverage},...e.surpassedThreshold!==void 0&&{surpassedThreshold:e.surpassedThreshold}}}function v(e){let t=e.message.content;if(!Array.isArray(t))return e.message;let n=t.map(e=>{if(e.type!==`tool_use`)return e;if(e.name===`ExitPlanMode`){let t=o();if(t)return{...e,input:{...e.input,plan:t}}}return e});return{...e.message,content:n}}var y=e((()=>{r(),l(),u(),t(),c(),a()}));export{p as a,f as i,y as n,h as o,g as r,_ as s,m as t};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./p-map-HKDr3iDo.js";import{D as r,H as i,I as a,P as o,T as s,fi as c,j as ee,kn as l,t as u,y as d}from"./src-CDCSSo0U2.js";import{t as f}from"./jsx-runtime-Bb4Xn-E0.js";import{B_ as p,ES as m,F_ as h,Fb as te,G_ as g,H_ as _,Hb as v,Ib as y,Jy as b,M_ as x,OS as S,U_ as ne,Vb as re,Y_ as C,Yy as ie,a_ as ae,ag as oe,b_ as w,cS as se,dg as T,e_ as E,j_ as D,lS as O,lg as k,n_ as A,r_ as j,s_ as M,t_ as N,x_ as P}from"./loadAgentsDir-
|
|
2
|
-
No servers were imported.`),n(),m()},[_,t,n]),y=(0,X.useCallback)(()=>{v(0)},[v]);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(d,{title:`Import MCP Servers from Claude Desktop`,subtitle:`Found ${c.length} MCP ${q(c.length,`server`)} in Claude Desktop.`,color:`success`,onCancel:y,hideInputGuide:!0,children:[f.length>0&&(0,Z.jsx)(o,{color:`warning`,children:`Note: Some servers already exist with the same name. If selected, they will be imported with a numbered suffix.`}),(0,Z.jsx)(o,{children:`Please select the servers you want to import:`}),(0,Z.jsx)(te,{options:c.map(e=>({label:`${e}${f.includes(e)?` (already exists)`:``}`,value:e})),defaultValue:c.filter(e=>!f.includes(e)),onSubmit:g,onCancel:y,hideIndexes:!0})]}),(0,Z.jsx)(a,{paddingX:1,children:(0,Z.jsx)(o,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(s,{children:[(0,Z.jsx)(r,{shortcut:`Space`,action:`select`}),(0,Z.jsx)(r,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(re,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}u(),ie(),le(),j(),T(),g(),x(),O(),R(),I(),S(),ce(),W();async function Q(e,t){try{let n=await oe(e,t);return n.type===`connected`?`✓ Connected`:n.type===`needs-auth`?`! Needs authentication`:`✗ Failed to connect`}catch{return`✗ Connection error`}}async function me({debug:e,verbose:t}){let n=fe();K(`tengu_mcp_start`,{});try{await de(n)}catch(e){throw F(e)&&Y(`Error: Directory ${n} does not exist`),e}try{let{setup:r}=await import(`./setup-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./p-map-HKDr3iDo.js";import{D as r,H as i,I as a,P as o,T as s,fi as c,j as ee,kn as l,t as u,y as d}from"./src-CDCSSo0U2.js";import{t as f}from"./jsx-runtime-Bb4Xn-E0.js";import{B_ as p,ES as m,F_ as h,Fb as te,G_ as g,H_ as _,Hb as v,Ib as y,Jy as b,M_ as x,OS as S,U_ as ne,Vb as re,Y_ as C,Yy as ie,a_ as ae,ag as oe,b_ as w,cS as se,dg as T,e_ as E,j_ as D,lS as O,lg as k,n_ as A,r_ as j,s_ as M,t_ as N,x_ as P}from"./loadAgentsDir-ZQwvbURI.js";import{K as F,U as I}from"./debug-DiuXEmUq.js";import{c as L,g as R,o as z,y as B}from"./config-662VDD70.js";import{n as V,o as H}from"./process-gEbdy6uY.js";import{i as U,o as W}from"./platform-B5dCGT8t.js";import{s as ce,u as G}from"./types-Cnorfsss.js";import{n as le,r as K}from"./analytics-BotDBGh0.js";import{l as q,o as ue}from"./stringUtils-D_g2L6A4.js";import{n as J,t as Y}from"./exit-BOhGfSlm.js";import{stat as de}from"fs/promises";import{cwd as fe}from"process";n();var X=e(c(),1);S(),V(),u(),g(),ue(),v(),y();var Z=f();function pe({servers:e,scope:t,onDone:n}){let c=Object.keys(e),[l,u]=(0,X.useState)({});(0,X.useEffect)(()=>{p().then(({servers:e})=>u(e))},[]);let f=c.filter(e=>l[e]!==void 0);async function g(n){let r=0;for(let i of n){let n=e[i];if(n){let e=i;if(l[e]!==void 0){let t=1;for(;l[`${i}_${t}`]!==void 0;)t++;e=`${i}_${t}`}await h(e,n,t),r++}}v(r)}let[_]=i(),v=(0,X.useCallback)(e=>{H(e>0?`\n${ee(`success`,_)(`Successfully imported ${e} MCP ${q(e,`server`)} to ${t} config.`)}\n`:`
|
|
2
|
+
No servers were imported.`),n(),m()},[_,t,n]),y=(0,X.useCallback)(()=>{v(0)},[v]);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(d,{title:`Import MCP Servers from Claude Desktop`,subtitle:`Found ${c.length} MCP ${q(c.length,`server`)} in Claude Desktop.`,color:`success`,onCancel:y,hideInputGuide:!0,children:[f.length>0&&(0,Z.jsx)(o,{color:`warning`,children:`Note: Some servers already exist with the same name. If selected, they will be imported with a numbered suffix.`}),(0,Z.jsx)(o,{children:`Please select the servers you want to import:`}),(0,Z.jsx)(te,{options:c.map(e=>({label:`${e}${f.includes(e)?` (already exists)`:``}`,value:e})),defaultValue:c.filter(e=>!f.includes(e)),onSubmit:g,onCancel:y,hideIndexes:!0})]}),(0,Z.jsx)(a,{paddingX:1,children:(0,Z.jsx)(o,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(s,{children:[(0,Z.jsx)(r,{shortcut:`Space`,action:`select`}),(0,Z.jsx)(r,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(re,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}u(),ie(),le(),j(),T(),g(),x(),O(),R(),I(),S(),ce(),W();async function Q(e,t){try{let n=await oe(e,t);return n.type===`connected`?`✓ Connected`:n.type===`needs-auth`?`! Needs authentication`:`✗ Failed to connect`}catch{return`✗ Connection error`}}async function me({debug:e,verbose:t}){let n=fe();K(`tengu_mcp_start`,{});try{await de(n)}catch(e){throw F(e)&&Y(`Error: Directory ${n} does not exist`),e}try{let{setup:r}=await import(`./setup-CEnNEK6Z.js`);await r(n,`default`,!1,!1,void 0,!1);let{startMCPServer:i}=await import(`./mcp-ghioDl7W.js`);await i(n,e??!1,t??!1)}catch(e){Y(`Error: Failed to start MCP server: ${e}`)}}async function he(e,t){let n=_(e),r=()=>{n&&(n.type===`sse`||n.type===`http`)&&(N(e,n),E(e,n))};try{if(t.scope){let n=P(t.scope);K(`tengu_mcp_delete`,{name:e,scope:n}),await C(e,n),r(),process.stdout.write(`Removed MCP server ${e} from ${n} config\n`),J(`File modified: ${w(n)}`)}let n=z(),i=L(),{servers:a}=ne(`project`),o=!!a[e],s=[];if(n.mcpServers?.[e]&&s.push(`local`),o&&s.push(`project`),i.mcpServers?.[e]&&s.push(`user`),s.length===0)Y(`No MCP server found with name: "${e}"`);else if(s.length===1){let t=s[0];K(`tengu_mcp_delete`,{name:e,scope:t}),await C(e,t),r(),process.stdout.write(`Removed MCP server "${e}" from ${t} config\n`),J(`File modified: ${w(t)}`)}else process.stderr.write(`MCP server "${e}" exists in multiple scopes:\n`),s.forEach(e=>{process.stderr.write(` - ${D(e)} (${w(e)})\n`)}),process.stderr.write(`
|
|
3
3
|
To remove from a specific scope, use:
|
|
4
4
|
`),s.forEach(t=>{process.stderr.write(` claude mcp remove "${e}" -s ${t}\n`)}),Y()}catch(e){Y(e.message)}}async function ge(){K(`tengu_mcp_list`,{});let{servers:e}=await p();if(Object.keys(e).length===0)console.log("No MCP servers configured. Use `claude mcp add` to add a server.");else{console.log(`Checking MCP server health...
|
|
5
|
-
`);let n=await t(Object.entries(e),async([e,t])=>({name:e,server:t,status:await Q(e,t)}),{concurrency:k()});for(let{name:e,server:t,status:r}of n)if(t.type===`sse`)console.log(`${e}: ${t.url} (SSE) - ${r}`);else if(t.type===`http`)console.log(`${e}: ${t.url} (HTTP) - ${r}`);else if(t.type===`claudeai-proxy`)console.log(`${e}: ${t.url} - ${r}`);else if(!t.type||t.type===`stdio`){let n=t,i=Array.isArray(n.args)?n.args:[];console.log(`${e}: ${n.command} ${i.join(` `)} - ${r}`)}}await m(0)}async function $(e){K(`tengu_mcp_get`,{name:e});let t=_(e);t||Y(`No MCP server found with name: ${e}`),console.log(`${e}:`),console.log(` Scope: ${D(t.scope)}`);let n=await Q(e,t);if(console.log(` Status: ${n}`),t.type===`sse`){if(console.log(` Type: sse`),console.log(` URL: ${t.url}`),t.headers){console.log(` Headers:`);for(let[e,n]of Object.entries(t.headers))console.log(` ${e}: ${n}`)}if(t.oauth?.clientId||t.oauth?.callbackPort){let n=[];t.oauth.clientId&&(n.push(`client_id configured`),A(e,t)?.clientSecret&&n.push(`client_secret configured`)),t.oauth.callbackPort&&n.push(`callback_port ${t.oauth.callbackPort}`),console.log(` OAuth: ${n.join(`, `)}`)}}else if(t.type===`http`){if(console.log(` Type: http`),console.log(` URL: ${t.url}`),t.headers){console.log(` Headers:`);for(let[e,n]of Object.entries(t.headers))console.log(` ${e}: ${n}`)}if(t.oauth?.clientId||t.oauth?.callbackPort){let n=[];t.oauth.clientId&&(n.push(`client_id configured`),A(e,t)?.clientSecret&&n.push(`client_secret configured`)),t.oauth.callbackPort&&n.push(`callback_port ${t.oauth.callbackPort}`),console.log(` OAuth: ${n.join(`, `)}`)}}else if(t.type===`stdio`){console.log(` Type: stdio`),console.log(` Command: ${t.command}`);let e=Array.isArray(t.args)?t.args:[];if(console.log(` Args: ${e.join(` `)}`),t.env){console.log(` Environment:`);for(let[e,n]of Object.entries(t.env))console.log(` ${e}=${n}`)}}console.log(`\nTo remove this server, run: claude mcp remove "${e}" -s ${t.scope}`),await m(0)}async function _e(e,t,n){try{let r=P(n.scope),i=G(t),a=n.clientSecret&&i&&typeof i==`object`&&`type`in i&&(i.type===`sse`||i.type===`http`)&&`url`in i&&typeof i.url==`string`&&`oauth`in i&&i.oauth&&typeof i.oauth==`object`&&`clientId`in i.oauth?await ae():void 0;await h(e,i,r);let o=i&&typeof i==`object`&&`type`in i?String(i.type||`stdio`):`stdio`;a&&i&&typeof i==`object`&&`type`in i&&(i.type===`sse`||i.type===`http`)&&`url`in i&&typeof i.url==`string`&&M(e,{type:i.type,url:i.url},a),K(`tengu_mcp_add`,{scope:r,source:`json`,type:o}),J(`Added ${o} MCP server ${e} to ${r} config`)}catch(e){Y(e.message)}}async function ve(e){try{let t=P(e.scope);K(`tengu_mcp_add`,{scope:t,platform:U(),source:`desktop`});let{readClaudeDesktopMcpServers:n}=await import(`./claudeDesktop-
|
|
6
|
-
You will be prompted for approval next time you start
|
|
5
|
+
`);let n=await t(Object.entries(e),async([e,t])=>({name:e,server:t,status:await Q(e,t)}),{concurrency:k()});for(let{name:e,server:t,status:r}of n)if(t.type===`sse`)console.log(`${e}: ${t.url} (SSE) - ${r}`);else if(t.type===`http`)console.log(`${e}: ${t.url} (HTTP) - ${r}`);else if(t.type===`claudeai-proxy`)console.log(`${e}: ${t.url} - ${r}`);else if(!t.type||t.type===`stdio`){let n=t,i=Array.isArray(n.args)?n.args:[];console.log(`${e}: ${n.command} ${i.join(` `)} - ${r}`)}}await m(0)}async function $(e){K(`tengu_mcp_get`,{name:e});let t=_(e);t||Y(`No MCP server found with name: ${e}`),console.log(`${e}:`),console.log(` Scope: ${D(t.scope)}`);let n=await Q(e,t);if(console.log(` Status: ${n}`),t.type===`sse`){if(console.log(` Type: sse`),console.log(` URL: ${t.url}`),t.headers){console.log(` Headers:`);for(let[e,n]of Object.entries(t.headers))console.log(` ${e}: ${n}`)}if(t.oauth?.clientId||t.oauth?.callbackPort){let n=[];t.oauth.clientId&&(n.push(`client_id configured`),A(e,t)?.clientSecret&&n.push(`client_secret configured`)),t.oauth.callbackPort&&n.push(`callback_port ${t.oauth.callbackPort}`),console.log(` OAuth: ${n.join(`, `)}`)}}else if(t.type===`http`){if(console.log(` Type: http`),console.log(` URL: ${t.url}`),t.headers){console.log(` Headers:`);for(let[e,n]of Object.entries(t.headers))console.log(` ${e}: ${n}`)}if(t.oauth?.clientId||t.oauth?.callbackPort){let n=[];t.oauth.clientId&&(n.push(`client_id configured`),A(e,t)?.clientSecret&&n.push(`client_secret configured`)),t.oauth.callbackPort&&n.push(`callback_port ${t.oauth.callbackPort}`),console.log(` OAuth: ${n.join(`, `)}`)}}else if(t.type===`stdio`){console.log(` Type: stdio`),console.log(` Command: ${t.command}`);let e=Array.isArray(t.args)?t.args:[];if(console.log(` Args: ${e.join(` `)}`),t.env){console.log(` Environment:`);for(let[e,n]of Object.entries(t.env))console.log(` ${e}=${n}`)}}console.log(`\nTo remove this server, run: claude mcp remove "${e}" -s ${t.scope}`),await m(0)}async function _e(e,t,n){try{let r=P(n.scope),i=G(t),a=n.clientSecret&&i&&typeof i==`object`&&`type`in i&&(i.type===`sse`||i.type===`http`)&&`url`in i&&typeof i.url==`string`&&`oauth`in i&&i.oauth&&typeof i.oauth==`object`&&`clientId`in i.oauth?await ae():void 0;await h(e,i,r);let o=i&&typeof i==`object`&&`type`in i?String(i.type||`stdio`):`stdio`;a&&i&&typeof i==`object`&&`type`in i&&(i.type===`sse`||i.type===`http`)&&`url`in i&&typeof i.url==`string`&&M(e,{type:i.type,url:i.url},a),K(`tengu_mcp_add`,{scope:r,source:`json`,type:o}),J(`Added ${o} MCP server ${e} to ${r} config`)}catch(e){Y(e.message)}}async function ve(e){try{let t=P(e.scope);K(`tengu_mcp_add`,{scope:t,platform:U(),source:`desktop`});let{readClaudeDesktopMcpServers:n}=await import(`./claudeDesktop-9xfIgkzE.js`),r=await n();Object.keys(r).length===0&&J(`No MCP servers found in Claude Desktop configuration or configuration file does not exist.`);let{unmount:i}=await l((0,Z.jsx)(se,{children:(0,Z.jsx)(b,{children:(0,Z.jsx)(pe,{servers:r,scope:t,onDone:()=>{i()}})})}),{exitOnCtrlC:!0})}catch(e){Y(e.message)}}async function ye(){K(`tengu_mcp_reset_mcpjson_choices`,{}),B(e=>({...e,enabledMcpjsonServers:[],disabledMcpjsonServers:[],enableAllProjectMcpServers:!1})),J(`All project-scoped (.mcp.json) server approvals and rejections have been reset.
|
|
6
|
+
You will be prompted for approval next time you start Work Mate.`)}export{ve as mcpAddFromDesktopHandler,_e as mcpAddJsonHandler,$ as mcpGetHandler,ge as mcpListHandler,he as mcpRemoveHandler,ye as mcpResetChoicesHandler,me as mcpServeHandler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{D as i,Gt as a,H as o,I as s,Lt as c,P as l,T as u,Wt as d,fi as f,j as p,t as m,y as h}from"./src-CDCSSo0U2.js";import{t as g}from"./jsx-runtime-Bb4Xn-E0.js";import{$g as _,$y as v,D_ as y,Hb as b,M_ as x,Mb as S,Nb as C,Qg as w,Vb as T,b_ as E,dS as D,i_ as O,k_ as k,lS as A,r_ as j,tb as ee,uS as M}from"./loadAgentsDir-nzr38hai.js";import{l as te,u as ne}from"./debug-IKW-jE7K.js";import{l as re,n as ie,o as ae}from"./stringUtils-CvXbHQRH.js";import{D as oe,O as se}from"./rcDebugLog-BUuD-X1D.js";import{u as ce}from"./referral-DP_GshTS.js";import{i as le,n as N,r as ue}from"./MCPConnectionManager-BX0LMz9J.js";import{n as de,t as fe}from"./McpParsingWarnings-WQrWJeWP.js";import{a as pe,c as P,i as F,l as me,n as he,o as I,r as ge,s as _e,t as ve,u as L}from"./PluginSettings-BD9JLV9-.js";function ye({agentServer:e,onCancel:t,onComplete:n}){let[a]=o(),[f,m]=(0,R.useState)(!1),[g,_]=(0,R.useState)(null),[y,b]=(0,R.useState)(null),x=(0,R.useRef)(null);(0,R.useEffect)(()=>()=>x.current?.abort(),[]),d(`confirm:no`,(0,R.useCallback)(()=>{f&&(x.current?.abort(),x.current=null,m(!1),b(null))},[f]),{context:`Confirmation`,isActive:f});let S=(0,R.useCallback)(async()=>{if(!e.needsAuth||!e.url)return;m(!0),_(null);let t=new AbortController;x.current=t;try{let r={type:e.transport,url:e.url};await O(e.name,r,b,t.signal),n?.(`Authentication successful for ${e.name}. The server will connect when the agent runs.`)}catch(e){e instanceof Error&&!(e instanceof w)&&_(e.message)}finally{m(!1),x.current=null}},[e,n]),E=ie(String(e.name));if(f)return(0,z.jsxs)(s,{flexDirection:`column`,gap:1,padding:1,children:[(0,z.jsxs)(l,{color:`claude`,children:[`Authenticating with `,e.name,`…`]}),(0,z.jsxs)(s,{children:[(0,z.jsx)(v,{}),(0,z.jsx)(l,{children:` A browser window will open for authentication`})]}),y&&(0,z.jsxs)(s,{flexDirection:`column`,children:[(0,z.jsx)(l,{dimColor:!0,children:`If your browser doesn't open automatically, copy this URL manually:`}),(0,z.jsx)(c,{url:y})]}),(0,z.jsx)(s,{marginLeft:3,children:(0,z.jsxs)(l,{dimColor:!0,children:[`Return here after authenticating in your browser.`,` `,(0,z.jsx)(T,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]})})]});let D=[];return e.needsAuth&&D.push({label:e.isAuthenticated?`Re-authenticate`:`Authenticate`,value:`auth`}),D.push({label:`Back`,value:`back`}),(0,z.jsxs)(h,{title:`${E} MCP Server`,subtitle:`agent-only`,onCancel:t,inputGuide:e=>e.pending?(0,z.jsxs)(l,{children:[`Press `,e.keyName,` again to exit`]}):(0,z.jsxs)(u,{children:[(0,z.jsx)(i,{shortcut:`↑↓`,action:`navigate`}),(0,z.jsx)(i,{shortcut:`Enter`,action:`confirm`}),(0,z.jsx)(T,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:[(0,z.jsxs)(s,{flexDirection:`column`,gap:0,children:[(0,z.jsxs)(s,{children:[(0,z.jsx)(l,{bold:!0,children:`Type: `}),(0,z.jsx)(l,{dimColor:!0,children:e.transport})]}),e.url&&(0,z.jsxs)(s,{children:[(0,z.jsx)(l,{bold:!0,children:`URL: `}),(0,z.jsx)(l,{dimColor:!0,children:e.url})]}),e.command&&(0,z.jsxs)(s,{children:[(0,z.jsx)(l,{bold:!0,children:`Command: `}),(0,z.jsx)(l,{dimColor:!0,children:e.command})]}),(0,z.jsxs)(s,{children:[(0,z.jsx)(l,{bold:!0,children:`Used by: `}),(0,z.jsx)(l,{dimColor:!0,children:e.sourceAgents.join(`, `)})]}),(0,z.jsxs)(s,{marginTop:1,children:[(0,z.jsx)(l,{bold:!0,children:`Status: `}),(0,z.jsxs)(l,{children:[p(`inactive`,a)(r.radioOff),` not connected (agent-only)`]})]}),e.needsAuth&&(0,z.jsxs)(s,{children:[(0,z.jsx)(l,{bold:!0,children:`Auth: `}),e.isAuthenticated?(0,z.jsxs)(l,{children:[p(`success`,a)(r.tick),` authenticated`]}):(0,z.jsxs)(l,{children:[p(`warning`,a)(r.triangleUpOutline),` may need authentication`]})]})]}),(0,z.jsx)(s,{children:(0,z.jsx)(l,{dimColor:!0,children:`This server connects only when running the agent.`})}),g&&(0,z.jsx)(s,{children:(0,z.jsxs)(l,{color:`error`,children:[`Error: `,g]})}),(0,z.jsx)(s,{children:(0,z.jsx)(C,{options:D,onChange:async e=>{switch(e){case`auth`:await S();break;case`back`:t();break}},onCancel:t})})]})}var R,z,B=e((()=>{n(),R=t(f(),1),m(),ce(),j(),ae(),b(),S(),ee(),z=g()}));function V(e){switch(e){case`project`:return{label:`Project MCPs`,path:E(e)};case`user`:return{label:`User MCPs`,path:E(e)};case`local`:return{label:`Local MCPs`,path:E(e)};case`enterprise`:return{label:`Enterprise MCPs`};case`dynamic`:return{label:`Built-in MCPs`,path:`always available`};default:return{label:e}}}function be(e){let t=new Map;for(let n of e){let e=n.scope;t.has(e)||t.set(e,[]),t.get(e).push(n)}for(let[,e]of t)e.sort((e,t)=>e.name.localeCompare(t.name));return t}function xe({servers:e,agentServers:t=[],onSelectServer:n,onSelectAgentServer:d,onComplete:f}){let[m]=o(),[g,_]=(0,H.useState)(0),v=H.useMemo(()=>be(e.filter(e=>e.client.config.type!==`claudeai-proxy`)),[e]),y=H.useMemo(()=>e.filter(e=>e.client.config.type===`claudeai-proxy`).sort((e,t)=>e.name.localeCompare(t.name)),[e]),b=H.useMemo(()=>(v.get(`dynamic`)??[]).sort((e,t)=>e.name.localeCompare(t.name)),[v]),x=V(`dynamic`),S=H.useMemo(()=>{let e=[];for(let t of W){let n=v.get(t)??[];for(let t of n)e.push({type:`server`,server:t})}for(let t of y)e.push({type:`server`,server:t});for(let n of t)e.push({type:`agent-server`,agentServer:n});for(let t of b)e.push({type:`server`,server:t});return e},[v,y,t,b]),C=(0,H.useCallback)(()=>{f(`MCP dialog dismissed`,{display:`system`})},[f]);a({"confirm:previous":()=>_(e=>e===0?S.length-1:e-1),"confirm:next":()=>_(e=>e===S.length-1?0:e+1),"confirm:yes":(0,H.useCallback)(()=>{let e=S[g];e&&(e.type===`server`?n(e.server):e.type===`agent-server`&&d&&d(e.agentServer))},[S,g,n,d]),"confirm:no":C},{context:`Confirmation`});let w=e=>S.findIndex(t=>t.type===`server`&&t.server===e),E=e=>S.findIndex(t=>t.type===`agent-server`&&t.agentServer===e),D=ne(),O=e.some(e=>e.client.type===`failed`);if(e.length===0&&t.length===0)return null;let k=e=>{let t=w(e),n=g===t,i=``,a=``;if(e.client.type===`disabled`)i=p(`inactive`,m)(r.radioOff),a=`disabled`;else if(e.client.type===`connected`)i=p(`success`,m)(r.tick),a=`connected`;else if(e.client.type===`pending`){i=p(`inactive`,m)(r.radioOff);let{reconnectAttempt:t,maxReconnectAttempts:n}=e.client;a=t&&n?`reconnecting (${t}/${n})…`:`connecting…`}else e.client.type===`needs-auth`?(i=p(`warning`,m)(r.triangleUpOutline),a=`needs authentication`):(i=p(`error`,m)(r.cross),a=`failed`);return(0,U.jsxs)(s,{children:[(0,U.jsx)(l,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,U.jsx)(l,{color:n?`suggestion`:void 0,children:e.name}),(0,U.jsxs)(l,{dimColor:!n,children:[` · `,i,` `]}),(0,U.jsx)(l,{dimColor:!n,children:a})]},`${e.name}-${t}`)},A=e=>{let t=E(e),n=g===t,i=e.needsAuth?p(`warning`,m)(r.triangleUpOutline):p(`inactive`,m)(r.radioOff),a=e.needsAuth?`may need auth`:`agent-only`;return(0,U.jsxs)(s,{children:[(0,U.jsx)(l,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,U.jsx)(l,{color:n?`suggestion`:void 0,children:e.name}),(0,U.jsxs)(l,{dimColor:!n,children:[` · `,i,` `]}),(0,U.jsx)(l,{dimColor:!n,children:a})]},`agent-${e.name}-${t}`)},j=e.length+t.length;return(0,U.jsxs)(s,{flexDirection:`column`,children:[(0,U.jsx)(fe,{}),(0,U.jsx)(h,{title:`Manage MCP servers`,subtitle:`${j} ${re(j,`server`)}`,onCancel:C,hideInputGuide:!0,children:(0,U.jsxs)(s,{flexDirection:`column`,children:[W.map(e=>{let t=v.get(e);if(!t||t.length===0)return null;let n=V(e);return(0,U.jsxs)(s,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsxs)(s,{paddingLeft:2,children:[(0,U.jsx)(l,{bold:!0,children:n.label}),n.path&&(0,U.jsxs)(l,{dimColor:!0,children:[` (`,n.path,`)`]})]}),t.map(e=>k(e))]},e)}),y.length>0&&(0,U.jsxs)(s,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsx)(s,{paddingLeft:2,children:(0,U.jsx)(l,{bold:!0,children:`claude.ai`})}),y.map(e=>k(e))]}),t.length>0&&(0,U.jsxs)(s,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsx)(s,{paddingLeft:2,children:(0,U.jsx)(l,{bold:!0,children:`Agent MCPs`})}),[...new Set(t.flatMap(e=>e.sourceAgents))].map(e=>(0,U.jsxs)(s,{flexDirection:`column`,marginTop:1,children:[(0,U.jsx)(s,{paddingLeft:2,children:(0,U.jsxs)(l,{dimColor:!0,children:[`@`,e]})}),t.filter(t=>t.sourceAgents.includes(e)).map(e=>A(e))]},e))]}),b.length>0&&(0,U.jsxs)(s,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsxs)(s,{paddingLeft:2,children:[(0,U.jsx)(l,{bold:!0,children:x.label}),x.path&&(0,U.jsxs)(l,{dimColor:!0,children:[` (`,x.path,`)`]})]}),b.map(e=>k(e))]}),(0,U.jsxs)(s,{flexDirection:`column`,children:[O&&(0,U.jsx)(l,{dimColor:!0,children:D?`※ Error logs shown inline with --debug`:`※ Run claude --debug to see error logs`}),(0,U.jsxs)(l,{dimColor:!0,children:[(0,U.jsx)(c,{url:`https://code.claude.com/docs/en/mcp`,children:`https://code.claude.com/docs/en/mcp`}),` for help`]})]})]})}),(0,U.jsx)(s,{paddingX:1,children:(0,U.jsx)(l,{dimColor:!0,italic:!0,children:(0,U.jsxs)(u,{children:[(0,U.jsx)(i,{shortcut:`↑↓`,action:`navigate`}),(0,U.jsx)(i,{shortcut:`Enter`,action:`confirm`}),(0,U.jsx)(T,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}var H,U,W,G=e((()=>{n(),H=t(f(),1),m(),ce(),x(),te(),ae(),b(),de(),U=g(),W=[`project`,`local`,`user`,`enterprise`]}));function Se({serverName:e,onComplete:t}){let[n]=o(),i=D(),a=ue(),[c,u]=(0,K.useState)(!0),[d,f]=(0,K.useState)(null);return(0,K.useEffect)(()=>{async function n(){try{if(!i.getState().mcp.clients.find(t=>t.name===e)){f(`MCP server "${e}" not found`),u(!1),t(`MCP server "${e}" not found`);return}switch((await a(e)).client.type){case`connected`:u(!1),t(`Successfully reconnected to ${e}`);break;case`needs-auth`:f(`${e} requires authentication`),u(!1),t(`${e} requires authentication. Use /mcp to authenticate.`);break;case`pending`:case`failed`:case`disabled`:f(`Failed to reconnect to ${e}`),u(!1),t(`Failed to reconnect to ${e}`);break}}catch(e){let n=e instanceof Error?e.message:String(e);f(n),u(!1),t(`Error: ${n}`)}}n()},[e,a,i,t]),c?(0,q.jsxs)(s,{flexDirection:`column`,gap:1,padding:1,children:[(0,q.jsxs)(l,{color:`text`,children:[`Reconnecting to `,(0,q.jsx)(l,{bold:!0,children:e})]}),(0,q.jsxs)(s,{children:[(0,q.jsx)(v,{}),(0,q.jsx)(l,{children:` Establishing connection to MCP server`})]})]}):d?(0,q.jsxs)(s,{flexDirection:`column`,gap:1,padding:1,children:[(0,q.jsxs)(s,{children:[(0,q.jsxs)(l,{children:[p(`error`,n)(r.cross),` `]}),(0,q.jsxs)(l,{color:`error`,children:[`Failed to reconnect to `,e]})]}),(0,q.jsxs)(l,{dimColor:!0,children:[`Error: `,d]})]}):null}var K,q,J=e((()=>{n(),K=t(f(),1),m(),N(),A(),ee(),q=g()}));function Y({onComplete:e}){let t=M(e=>e.mcp),n=M(e=>e.agentDefinitions),r=t.clients,[i,a]=X.useState({type:`list`}),[o,s]=X.useState([]),c=(0,X.useMemo)(()=>y(n.allAgents),[n.allAgents]),l=X.useMemo(()=>r.filter(e=>e.name!==`ide`).sort((e,t)=>e.name.localeCompare(t.name)),[r]);switch(X.useEffect(()=>{let e=!1;async function n(){let n=await Promise.all(l.map(async e=>{let n=e.config.scope,r=e.config.type===`sse`,i=e.config.type===`http`,a=e.config.type===`claudeai-proxy`,o;if(r||i){let n=await new _(e.name,e.config).tokens(),r=oe()!==null&&e.type===`connected`,i=e.type===`connected`&&k(t.tools,e.name).length>0;o=!!n||r||i}let s={name:e.name,client:e,scope:n};return a?{...s,transport:`claudeai-proxy`,isAuthenticated:!1,config:e.config}:r?{...s,transport:`sse`,isAuthenticated:o,config:e.config}:i?{...s,transport:`http`,isAuthenticated:o,config:e.config}:{...s,transport:`stdio`,config:e.config}}));e||s(n)}return n(),()=>{e=!0}},[l,t.tools]),(0,X.useEffect)(()=>{o.length===0&&l.length>0||o.length===0&&c.length===0&&e("No MCP servers configured. Please run /doctor if this is unexpected. Otherwise, run `claude mcp --help` or visit https://code.claude.com/docs/en/mcp to learn more.")},[o.length,l.length,c.length,e]),i.type){case`list`:return(0,Z.jsx)(xe,{servers:o,agentServers:c,onSelectServer:e=>a({type:`server-menu`,server:e}),onSelectAgentServer:e=>a({type:`agent-server-menu`,agentServer:e}),onComplete:e,defaultTab:i.defaultTab});case`server-menu`:{let n=k(t.tools,i.server.name),r=i.server.transport===`claudeai-proxy`?`claude.ai`:`Claude Code`;return i.server.transport===`stdio`?(0,Z.jsx)(_e,{server:i.server,serverToolsCount:n.length,onViewTools:()=>a({type:`server-tools`,server:i.server}),onCancel:()=>a({type:`list`,defaultTab:r}),onComplete:e}):(0,Z.jsx)(me,{server:i.server,serverToolsCount:n.length,onViewTools:()=>a({type:`server-tools`,server:i.server}),onCancel:()=>a({type:`list`,defaultTab:r}),onComplete:e})}case`server-tools`:return(0,Z.jsx)(ge,{server:i.server,onSelectTool:(e,t)=>a({type:`server-tool-detail`,server:i.server,toolIndex:t}),onBack:()=>a({type:`server-menu`,server:i.server})});case`server-tool-detail`:{let e=k(t.tools,i.server.name)[i.toolIndex];return e?(0,Z.jsx)(pe,{tool:e,server:i.server,onBack:()=>a({type:`server-tools`,server:i.server})}):(a({type:`server-tools`,server:i.server}),null)}case`agent-server-menu`:return(0,Z.jsx)(ye,{agentServer:i.agentServer,onCancel:()=>a({type:`list`,defaultTab:`Agents`}),onComplete:e})}}var X,Z,Ce=e((()=>{X=t(f(),1),j(),x(),A(),se(),B(),G(),L(),P(),I(),F(),Z=g()})),we=e((()=>{B(),G(),J(),L(),Ce(),P(),I(),F()}));function Te({action:e,target:t,onComplete:n}){let r=M(e=>e.mcp.clients),i=le(),a=(0,Q.useRef)(!1);return(0,Q.useEffect)(()=>{if(a.current)return;a.current=!0;let o=e===`enable`,s=r.filter(e=>e.name!==`ide`),c=t===`all`?s.filter(e=>o?e.type===`disabled`:e.type!==`disabled`):s.filter(e=>e.name===t);if(c.length===0){n(t===`all`?`All MCP servers are already ${o?`enabled`:`disabled`}`:`MCP server "${t}" not found`);return}for(let e of c)i(e.name);n(t===`all`?`${o?`Enabled`:`Disabled`} ${c.length} MCP server(s)`:`MCP server "${t}" ${o?`enabled`:`disabled`}`)},[e,t,r,i,n]),null}async function Ee(e,t,n){if(n){let t=n.trim().split(/\s+/);if(t[0]===`no-redirect`)return(0,$.jsx)(Y,{onComplete:e});if(t[0]===`reconnect`&&t[1])return(0,$.jsx)(Se,{serverName:t.slice(1).join(` `),onComplete:e});if(t[0]===`enable`||t[0]===`disable`)return(0,$.jsx)(Te,{action:t[0],target:t.length>1?t.slice(1).join(` `):`all`,onComplete:e})}return process.env.USER_TYPE===`ant`?(0,$.jsx)(ve,{onComplete:e,args:`manage`,showMcpRedirectMessage:!0}):(0,$.jsx)(Y,{onComplete:e})}var Q,$;e((()=>{Q=t(f(),1),we(),J(),N(),A(),he(),$=g()}))();export{Ee as call};
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{D as i,Gt as a,H as o,I as s,Lt as c,P as l,T as u,Wt as d,fi as f,j as p,t as m,y as h}from"./src-CDCSSo0U2.js";import{t as g}from"./jsx-runtime-Bb4Xn-E0.js";import{$g as _,$y as v,D_ as y,Hb as b,M_ as x,Mb as S,Nb as C,Qg as w,Vb as T,b_ as E,dS as D,i_ as O,k_ as k,lS as A,r_ as j,tb as ee,uS as M}from"./loadAgentsDir-ZQwvbURI.js";import{l as te,u as ne}from"./debug-DiuXEmUq.js";import{l as re,n as ie,o as ae}from"./stringUtils-D_g2L6A4.js";import{D as oe,O as se}from"./rcDebugLog-CivJaJ3V.js";import{u as ce}from"./referral-Cu9bEOFE.js";import{i as le,n as N,r as ue}from"./MCPConnectionManager-BLfKm4H2.js";import{n as de,t as fe}from"./McpParsingWarnings-8ZueNqAd.js";import{a as pe,c as P,i as F,l as me,n as he,o as I,r as ge,s as _e,t as ve,u as L}from"./PluginSettings-0FSNch8O.js";function ye({agentServer:e,onCancel:t,onComplete:n}){let[a]=o(),[f,m]=(0,R.useState)(!1),[g,_]=(0,R.useState)(null),[y,b]=(0,R.useState)(null),x=(0,R.useRef)(null);(0,R.useEffect)(()=>()=>x.current?.abort(),[]),d(`confirm:no`,(0,R.useCallback)(()=>{f&&(x.current?.abort(),x.current=null,m(!1),b(null))},[f]),{context:`Confirmation`,isActive:f});let S=(0,R.useCallback)(async()=>{if(!e.needsAuth||!e.url)return;m(!0),_(null);let t=new AbortController;x.current=t;try{let r={type:e.transport,url:e.url};await O(e.name,r,b,t.signal),n?.(`Authentication successful for ${e.name}. The server will connect when the agent runs.`)}catch(e){e instanceof Error&&!(e instanceof w)&&_(e.message)}finally{m(!1),x.current=null}},[e,n]),E=ie(String(e.name));if(f)return(0,z.jsxs)(s,{flexDirection:`column`,gap:1,padding:1,children:[(0,z.jsxs)(l,{color:`claude`,children:[`Authenticating with `,e.name,`…`]}),(0,z.jsxs)(s,{children:[(0,z.jsx)(v,{}),(0,z.jsx)(l,{children:` A browser window will open for authentication`})]}),y&&(0,z.jsxs)(s,{flexDirection:`column`,children:[(0,z.jsx)(l,{dimColor:!0,children:`If your browser doesn't open automatically, copy this URL manually:`}),(0,z.jsx)(c,{url:y})]}),(0,z.jsx)(s,{marginLeft:3,children:(0,z.jsxs)(l,{dimColor:!0,children:[`Return here after authenticating in your browser.`,` `,(0,z.jsx)(T,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]})})]});let D=[];return e.needsAuth&&D.push({label:e.isAuthenticated?`Re-authenticate`:`Authenticate`,value:`auth`}),D.push({label:`Back`,value:`back`}),(0,z.jsxs)(h,{title:`${E} MCP Server`,subtitle:`agent-only`,onCancel:t,inputGuide:e=>e.pending?(0,z.jsxs)(l,{children:[`Press `,e.keyName,` again to exit`]}):(0,z.jsxs)(u,{children:[(0,z.jsx)(i,{shortcut:`↑↓`,action:`navigate`}),(0,z.jsx)(i,{shortcut:`Enter`,action:`confirm`}),(0,z.jsx)(T,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:[(0,z.jsxs)(s,{flexDirection:`column`,gap:0,children:[(0,z.jsxs)(s,{children:[(0,z.jsx)(l,{bold:!0,children:`Type: `}),(0,z.jsx)(l,{dimColor:!0,children:e.transport})]}),e.url&&(0,z.jsxs)(s,{children:[(0,z.jsx)(l,{bold:!0,children:`URL: `}),(0,z.jsx)(l,{dimColor:!0,children:e.url})]}),e.command&&(0,z.jsxs)(s,{children:[(0,z.jsx)(l,{bold:!0,children:`Command: `}),(0,z.jsx)(l,{dimColor:!0,children:e.command})]}),(0,z.jsxs)(s,{children:[(0,z.jsx)(l,{bold:!0,children:`Used by: `}),(0,z.jsx)(l,{dimColor:!0,children:e.sourceAgents.join(`, `)})]}),(0,z.jsxs)(s,{marginTop:1,children:[(0,z.jsx)(l,{bold:!0,children:`Status: `}),(0,z.jsxs)(l,{children:[p(`inactive`,a)(r.radioOff),` not connected (agent-only)`]})]}),e.needsAuth&&(0,z.jsxs)(s,{children:[(0,z.jsx)(l,{bold:!0,children:`Auth: `}),e.isAuthenticated?(0,z.jsxs)(l,{children:[p(`success`,a)(r.tick),` authenticated`]}):(0,z.jsxs)(l,{children:[p(`warning`,a)(r.triangleUpOutline),` may need authentication`]})]})]}),(0,z.jsx)(s,{children:(0,z.jsx)(l,{dimColor:!0,children:`This server connects only when running the agent.`})}),g&&(0,z.jsx)(s,{children:(0,z.jsxs)(l,{color:`error`,children:[`Error: `,g]})}),(0,z.jsx)(s,{children:(0,z.jsx)(C,{options:D,onChange:async e=>{switch(e){case`auth`:await S();break;case`back`:t();break}},onCancel:t})})]})}var R,z,B=e((()=>{n(),R=t(f(),1),m(),ce(),j(),ae(),b(),S(),ee(),z=g()}));function V(e){switch(e){case`project`:return{label:`Project MCPs`,path:E(e)};case`user`:return{label:`User MCPs`,path:E(e)};case`local`:return{label:`Local MCPs`,path:E(e)};case`enterprise`:return{label:`Enterprise MCPs`};case`dynamic`:return{label:`Built-in MCPs`,path:`always available`};default:return{label:e}}}function be(e){let t=new Map;for(let n of e){let e=n.scope;t.has(e)||t.set(e,[]),t.get(e).push(n)}for(let[,e]of t)e.sort((e,t)=>e.name.localeCompare(t.name));return t}function xe({servers:e,agentServers:t=[],onSelectServer:n,onSelectAgentServer:d,onComplete:f}){let[m]=o(),[g,_]=(0,H.useState)(0),v=H.useMemo(()=>be(e.filter(e=>e.client.config.type!==`claudeai-proxy`)),[e]),y=H.useMemo(()=>e.filter(e=>e.client.config.type===`claudeai-proxy`).sort((e,t)=>e.name.localeCompare(t.name)),[e]),b=H.useMemo(()=>(v.get(`dynamic`)??[]).sort((e,t)=>e.name.localeCompare(t.name)),[v]),x=V(`dynamic`),S=H.useMemo(()=>{let e=[];for(let t of W){let n=v.get(t)??[];for(let t of n)e.push({type:`server`,server:t})}for(let t of y)e.push({type:`server`,server:t});for(let n of t)e.push({type:`agent-server`,agentServer:n});for(let t of b)e.push({type:`server`,server:t});return e},[v,y,t,b]),C=(0,H.useCallback)(()=>{f(`MCP dialog dismissed`,{display:`system`})},[f]);a({"confirm:previous":()=>_(e=>e===0?S.length-1:e-1),"confirm:next":()=>_(e=>e===S.length-1?0:e+1),"confirm:yes":(0,H.useCallback)(()=>{let e=S[g];e&&(e.type===`server`?n(e.server):e.type===`agent-server`&&d&&d(e.agentServer))},[S,g,n,d]),"confirm:no":C},{context:`Confirmation`});let w=e=>S.findIndex(t=>t.type===`server`&&t.server===e),E=e=>S.findIndex(t=>t.type===`agent-server`&&t.agentServer===e),D=ne(),O=e.some(e=>e.client.type===`failed`);if(e.length===0&&t.length===0)return null;let k=e=>{let t=w(e),n=g===t,i=``,a=``;if(e.client.type===`disabled`)i=p(`inactive`,m)(r.radioOff),a=`disabled`;else if(e.client.type===`connected`)i=p(`success`,m)(r.tick),a=`connected`;else if(e.client.type===`pending`){i=p(`inactive`,m)(r.radioOff);let{reconnectAttempt:t,maxReconnectAttempts:n}=e.client;a=t&&n?`reconnecting (${t}/${n})…`:`connecting…`}else e.client.type===`needs-auth`?(i=p(`warning`,m)(r.triangleUpOutline),a=`needs authentication`):(i=p(`error`,m)(r.cross),a=`failed`);return(0,U.jsxs)(s,{children:[(0,U.jsx)(l,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,U.jsx)(l,{color:n?`suggestion`:void 0,children:e.name}),(0,U.jsxs)(l,{dimColor:!n,children:[` · `,i,` `]}),(0,U.jsx)(l,{dimColor:!n,children:a})]},`${e.name}-${t}`)},A=e=>{let t=E(e),n=g===t,i=e.needsAuth?p(`warning`,m)(r.triangleUpOutline):p(`inactive`,m)(r.radioOff),a=e.needsAuth?`may need auth`:`agent-only`;return(0,U.jsxs)(s,{children:[(0,U.jsx)(l,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,U.jsx)(l,{color:n?`suggestion`:void 0,children:e.name}),(0,U.jsxs)(l,{dimColor:!n,children:[` · `,i,` `]}),(0,U.jsx)(l,{dimColor:!n,children:a})]},`agent-${e.name}-${t}`)},j=e.length+t.length;return(0,U.jsxs)(s,{flexDirection:`column`,children:[(0,U.jsx)(fe,{}),(0,U.jsx)(h,{title:`Manage MCP servers`,subtitle:`${j} ${re(j,`server`)}`,onCancel:C,hideInputGuide:!0,children:(0,U.jsxs)(s,{flexDirection:`column`,children:[W.map(e=>{let t=v.get(e);if(!t||t.length===0)return null;let n=V(e);return(0,U.jsxs)(s,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsxs)(s,{paddingLeft:2,children:[(0,U.jsx)(l,{bold:!0,children:n.label}),n.path&&(0,U.jsxs)(l,{dimColor:!0,children:[` (`,n.path,`)`]})]}),t.map(e=>k(e))]},e)}),y.length>0&&(0,U.jsxs)(s,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsx)(s,{paddingLeft:2,children:(0,U.jsx)(l,{bold:!0,children:`claude.ai`})}),y.map(e=>k(e))]}),t.length>0&&(0,U.jsxs)(s,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsx)(s,{paddingLeft:2,children:(0,U.jsx)(l,{bold:!0,children:`Agent MCPs`})}),[...new Set(t.flatMap(e=>e.sourceAgents))].map(e=>(0,U.jsxs)(s,{flexDirection:`column`,marginTop:1,children:[(0,U.jsx)(s,{paddingLeft:2,children:(0,U.jsxs)(l,{dimColor:!0,children:[`@`,e]})}),t.filter(t=>t.sourceAgents.includes(e)).map(e=>A(e))]},e))]}),b.length>0&&(0,U.jsxs)(s,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsxs)(s,{paddingLeft:2,children:[(0,U.jsx)(l,{bold:!0,children:x.label}),x.path&&(0,U.jsxs)(l,{dimColor:!0,children:[` (`,x.path,`)`]})]}),b.map(e=>k(e))]}),(0,U.jsxs)(s,{flexDirection:`column`,children:[O&&(0,U.jsx)(l,{dimColor:!0,children:D?`※ Error logs shown inline with --debug`:`※ Run claude --debug to see error logs`}),(0,U.jsxs)(l,{dimColor:!0,children:[(0,U.jsx)(c,{url:`https://code.claude.com/docs/en/mcp`,children:`https://code.claude.com/docs/en/mcp`}),` for help`]})]})]})}),(0,U.jsx)(s,{paddingX:1,children:(0,U.jsx)(l,{dimColor:!0,italic:!0,children:(0,U.jsxs)(u,{children:[(0,U.jsx)(i,{shortcut:`↑↓`,action:`navigate`}),(0,U.jsx)(i,{shortcut:`Enter`,action:`confirm`}),(0,U.jsx)(T,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}var H,U,W,G=e((()=>{n(),H=t(f(),1),m(),ce(),x(),te(),ae(),b(),de(),U=g(),W=[`project`,`local`,`user`,`enterprise`]}));function Se({serverName:e,onComplete:t}){let[n]=o(),i=D(),a=ue(),[c,u]=(0,K.useState)(!0),[d,f]=(0,K.useState)(null);return(0,K.useEffect)(()=>{async function n(){try{if(!i.getState().mcp.clients.find(t=>t.name===e)){f(`MCP server "${e}" not found`),u(!1),t(`MCP server "${e}" not found`);return}switch((await a(e)).client.type){case`connected`:u(!1),t(`Successfully reconnected to ${e}`);break;case`needs-auth`:f(`${e} requires authentication`),u(!1),t(`${e} requires authentication. Use /mcp to authenticate.`);break;case`pending`:case`failed`:case`disabled`:f(`Failed to reconnect to ${e}`),u(!1),t(`Failed to reconnect to ${e}`);break}}catch(e){let n=e instanceof Error?e.message:String(e);f(n),u(!1),t(`Error: ${n}`)}}n()},[e,a,i,t]),c?(0,q.jsxs)(s,{flexDirection:`column`,gap:1,padding:1,children:[(0,q.jsxs)(l,{color:`text`,children:[`Reconnecting to `,(0,q.jsx)(l,{bold:!0,children:e})]}),(0,q.jsxs)(s,{children:[(0,q.jsx)(v,{}),(0,q.jsx)(l,{children:` Establishing connection to MCP server`})]})]}):d?(0,q.jsxs)(s,{flexDirection:`column`,gap:1,padding:1,children:[(0,q.jsxs)(s,{children:[(0,q.jsxs)(l,{children:[p(`error`,n)(r.cross),` `]}),(0,q.jsxs)(l,{color:`error`,children:[`Failed to reconnect to `,e]})]}),(0,q.jsxs)(l,{dimColor:!0,children:[`Error: `,d]})]}):null}var K,q,J=e((()=>{n(),K=t(f(),1),m(),N(),A(),ee(),q=g()}));function Y({onComplete:e}){let t=M(e=>e.mcp),n=M(e=>e.agentDefinitions),r=t.clients,[i,a]=X.useState({type:`list`}),[o,s]=X.useState([]),c=(0,X.useMemo)(()=>y(n.allAgents),[n.allAgents]),l=X.useMemo(()=>r.filter(e=>e.name!==`ide`).sort((e,t)=>e.name.localeCompare(t.name)),[r]);switch(X.useEffect(()=>{let e=!1;async function n(){let n=await Promise.all(l.map(async e=>{let n=e.config.scope,r=e.config.type===`sse`,i=e.config.type===`http`,a=e.config.type===`claudeai-proxy`,o;if(r||i){let n=await new _(e.name,e.config).tokens(),r=oe()!==null&&e.type===`connected`,i=e.type===`connected`&&k(t.tools,e.name).length>0;o=!!n||r||i}let s={name:e.name,client:e,scope:n};return a?{...s,transport:`claudeai-proxy`,isAuthenticated:!1,config:e.config}:r?{...s,transport:`sse`,isAuthenticated:o,config:e.config}:i?{...s,transport:`http`,isAuthenticated:o,config:e.config}:{...s,transport:`stdio`,config:e.config}}));e||s(n)}return n(),()=>{e=!0}},[l,t.tools]),(0,X.useEffect)(()=>{o.length===0&&l.length>0||o.length===0&&c.length===0&&e("No MCP servers configured. Please run /doctor if this is unexpected. Otherwise, run `claude mcp --help` or visit https://code.claude.com/docs/en/mcp to learn more.")},[o.length,l.length,c.length,e]),i.type){case`list`:return(0,Z.jsx)(xe,{servers:o,agentServers:c,onSelectServer:e=>a({type:`server-menu`,server:e}),onSelectAgentServer:e=>a({type:`agent-server-menu`,agentServer:e}),onComplete:e,defaultTab:i.defaultTab});case`server-menu`:{let n=k(t.tools,i.server.name),r=i.server.transport===`claudeai-proxy`?`claude.ai`:`Work Mate`;return i.server.transport===`stdio`?(0,Z.jsx)(_e,{server:i.server,serverToolsCount:n.length,onViewTools:()=>a({type:`server-tools`,server:i.server}),onCancel:()=>a({type:`list`,defaultTab:r}),onComplete:e}):(0,Z.jsx)(me,{server:i.server,serverToolsCount:n.length,onViewTools:()=>a({type:`server-tools`,server:i.server}),onCancel:()=>a({type:`list`,defaultTab:r}),onComplete:e})}case`server-tools`:return(0,Z.jsx)(ge,{server:i.server,onSelectTool:(e,t)=>a({type:`server-tool-detail`,server:i.server,toolIndex:t}),onBack:()=>a({type:`server-menu`,server:i.server})});case`server-tool-detail`:{let e=k(t.tools,i.server.name)[i.toolIndex];return e?(0,Z.jsx)(pe,{tool:e,server:i.server,onBack:()=>a({type:`server-tools`,server:i.server})}):(a({type:`server-tools`,server:i.server}),null)}case`agent-server-menu`:return(0,Z.jsx)(ye,{agentServer:i.agentServer,onCancel:()=>a({type:`list`,defaultTab:`Agents`}),onComplete:e})}}var X,Z,Ce=e((()=>{X=t(f(),1),j(),x(),A(),se(),B(),G(),L(),P(),I(),F(),Z=g()})),we=e((()=>{B(),G(),J(),L(),Ce(),P(),I(),F()}));function Te({action:e,target:t,onComplete:n}){let r=M(e=>e.mcp.clients),i=le(),a=(0,Q.useRef)(!1);return(0,Q.useEffect)(()=>{if(a.current)return;a.current=!0;let o=e===`enable`,s=r.filter(e=>e.name!==`ide`),c=t===`all`?s.filter(e=>o?e.type===`disabled`:e.type!==`disabled`):s.filter(e=>e.name===t);if(c.length===0){n(t===`all`?`All MCP servers are already ${o?`enabled`:`disabled`}`:`MCP server "${t}" not found`);return}for(let e of c)i(e.name);n(t===`all`?`${o?`Enabled`:`Disabled`} ${c.length} MCP server(s)`:`MCP server "${t}" ${o?`enabled`:`disabled`}`)},[e,t,r,i,n]),null}async function Ee(e,t,n){if(n){let t=n.trim().split(/\s+/);if(t[0]===`no-redirect`)return(0,$.jsx)(Y,{onComplete:e});if(t[0]===`reconnect`&&t[1])return(0,$.jsx)(Se,{serverName:t.slice(1).join(` `),onComplete:e});if(t[0]===`enable`||t[0]===`disable`)return(0,$.jsx)(Te,{action:t[0],target:t.length>1?t.slice(1).join(` `):`all`,onComplete:e})}return process.env.USER_TYPE===`ant`?(0,$.jsx)(ve,{onComplete:e,args:`manage`,showMcpRedirectMessage:!0}):(0,$.jsx)(Y,{onComplete:e})}var Q,$;e((()=>{Q=t(f(),1),we(),J(),N(),A(),he(),$=g()}))();export{Ee as call};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as e,Gp as t,Ia as n,La as r,Rd as i,TC as a,W as o,Wp as s,Xu as c,Yu as l,aw as u,iw as d,nl as f,po as p,tl as m,wC as h,zd as g,zo as _}from"./loadAgentsDir-
|
|
1
|
+
import{G as e,Gp as t,Ia as n,La as r,Rd as i,TC as a,W as o,Wp as s,Xu as c,Yu as l,aw as u,iw as d,nl as f,po as p,tl as m,wC as h,zd as g,zo as _}from"./loadAgentsDir-ZQwvbURI.js";import{E as v,O as y}from"./debug-DiuXEmUq.js";import{o as b,s as x}from"./log-Duzb4o6h.js";import{_ as S,u as C}from"./model-BgrLt7P7.js";import{Cn as w,Sn as T,xn as E}from"./prompt-wys9CwDo.js";import{a as D,o as O}from"./fileStateCache-DDW5toIs.js";import{I as k,K as A,f as j}from"./stdio-W_Kokrkh.js";import{n as M,t as N}from"./stdio-4S7b8Uhx.js";A(),a(),n(),w(),c(),u(),O(),b(),_(),S(),e(),s(),v(),g(),m();var P=[r];async function F(e,n,r){let a=D(100);t(e);let s=new M({name:`claude/tengu`,version:`0.0.2`},{capabilities:{tools:{}}});s.setRequestHandler(k,async()=>{let e=T(),t=l(e);return{tools:await Promise.all(t.map(async n=>{let r;if(n.outputSchema){let e=f(n.outputSchema);typeof e==`object`&&e&&`type`in e&&e.type===`object`&&(r=e)}return{...n,description:await n.prompt({getToolPermissionContext:async()=>e,tools:t,agents:[]}),inputSchema:f(n.inputSchema),outputSchema:r}}))}}),s.setRequestHandler(j,async({params:{name:e,arguments:t}})=>{let s=l(T()),c=E(s,e);if(!c)throw Error(`Tool ${e} not found`);let u={abortController:d(),options:{commands:P,tools:s,mainLoopModel:C(),thinkingConfig:{type:`disabled`},mcpClients:[],mcpResources:{},isNonInteractiveSession:!0,debug:n,verbose:r,agentDefinitions:{activeAgents:[],allAgents:[]}},getAppState:()=>h(),setAppState:()=>{},messages:[],readFileState:a,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:()=>{},updateAttributionState:()=>{}};try{if(!c.isEnabled())throw Error(`Tool ${e} is not enabled`);let n=await c.validateInput?.(t??{},u);if(n&&!n.result)throw Error(`Tool ${e} input is invalid: ${`message`in n?n.message:String(n)}`);let r=await c.call(t??{},u,o,p({content:[]}));return{content:[{type:`text`,text:typeof r==`string`?r:y(r.data)}]}}catch(e){return x(e),{isError:!0,content:[{type:`text`,text:(e instanceof Error?i(e):[String(e)]).filter(Boolean).join(`
|
|
2
2
|
`).trim()||`Error`}]}}});async function c(){let e=new N;await s.connect(e)}return await c()}export{F as startMCPServer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{E as t,O as n}from"./debug-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{E as t,O as n}from"./debug-DiuXEmUq.js";import{o as r,s as i}from"./log-Duzb4o6h.js";import{n as a,t as o}from"./index.min-D75yiGLN.js";function s(e,t=300*1e3){let r=new Map,a=new Map,o=async(...o)=>{let s=n(o),c=r.get(s),l=Date.now();if(!c){let t=a.get(s);if(t)return t;let n=e(...o);a.set(s,n);try{let e=await n;return a.get(s)===n&&r.set(s,{value:e,timestamp:l,refreshing:!1}),e}finally{a.get(s)===n&&a.delete(s)}}if(c&&l-c.timestamp>t&&!c.refreshing){c.refreshing=!0;let t=c;return e(...o).then(e=>{r.get(s)===t&&r.set(s,{value:e,timestamp:Date.now(),refreshing:!1})}).catch(e=>{i(e),r.get(s)===t&&r.delete(s)}),c.value}return r.get(s).value};return o.cache={clear:()=>{r.clear(),a.clear()}},o}function c(e,t,n=100){let r=new o({max:n}),i=(...n)=>{let i=t(...n),a=r.get(i);if(a!==void 0)return a;let o=e(...n);return r.set(i,o),o};return i.cache={clear:()=>r.clear(),size:()=>r.size,delete:e=>r.delete(e),get:e=>r.peek(e),has:e=>r.has(e)},i}var l=e((()=>{a(),r(),t()}));export{c as n,s as r,l as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,o as r}from"./envUtils-DSxRz_kt.js";import{I as i,Lt as a,P as o,Wt as s,_ as c,di as l,fi as u,t as d,ui as ee,y as f}from"./src-CDCSSo0U2.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{en as m,nt as h}from"./state-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,o as r}from"./envUtils-DSxRz_kt.js";import{I as i,Lt as a,P as o,Wt as s,_ as c,di as l,fi as u,t as d,ui as ee,y as f}from"./src-CDCSSo0U2.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{en as m,nt as h}from"./state-ix0xIunV.js";import{$T as g,Mb as _,Nb as te,Un as v,Vn as ne,XT as y,au as b,hf as re,lS as x,mf as S,ou as C,tE as w,uS as T}from"./loadAgentsDir-ZQwvbURI.js";import{n as E,t as D}from"./cwd-CYmmnQVS.js";import{B as O,U as k}from"./debug-DiuXEmUq.js";import{g as A,y as j}from"./settings-BhvhCpVh.js";import{I as M,P as N,j as ie}from"./config-662VDD70.js";import{_ as P,r as F}from"./git-Cgc8X5l2.js";import{o as I,s as L}from"./log-Duzb4o6h.js";import{f as R,l as ae}from"./file-BZriE-XU.js";import{n as oe,r as z}from"./analytics-BotDBGh0.js";import{b as se,h as ce}from"./startupProfiler-BquH_Yqm.js";import{u as B}from"./referral-Cu9bEOFE.js";import{r as V,t as H}from"./browser-BKiu1max.js";import{n as U,t as W}from"./useExitOnCtrlCDWithKeybindings-vzUoPY51.js";import{r as le,t as ue}from"./promptEditor-D6HzjcMS.js";import{homedir as de}from"os";import{join as G,relative as fe}from"path";import{mkdir as K,writeFile as pe}from"fs/promises";function me(e){return F(e)!==null}var he=e((()=>{P()}));function ge({onSelect:e,onCancel:t}){let r=(0,q.use)(g()),a=G(n(),`CLAUDE.md`),l=G(h(),`CLAUDE.md`),u=r.some(e=>e.path===a),d=r.some(e=>e.path===l),f=[...r.filter(e=>e.type!==`AutoMem`).map(e=>({...e,exists:!0})),...u?[]:[{path:a,type:`User`,content:``,exists:!1}],...d?[]:[{path:l,type:`Project`,content:``,exists:!1}]],p=new Map,m=f.map(e=>{let t=ae(e.path),n=e.exists?``:` (new)`,r=e.parent?(p.get(e.parent)??0)+1:0;p.set(e.path,r);let i=r>0?` `.repeat(r-1):``,o;o=e.type===`User`&&!e.isNested&&e.path===a?`User memory`:e.type===`Project`&&!e.isNested&&e.path===l?`Project memory`:r>0?`${i}L ${t}${n}`:`${t}`;let s,c=me(h());return s=e.type===`User`&&!e.isNested?`Saved in ~/.claude/CLAUDE.md`:e.type===`Project`&&!e.isNested&&e.path===l?`${c?`Checked in at`:`Saved in`} ./CLAUDE.md`:e.parent?`@-imported`:e.isNested?`dynamically loaded`:``,{label:o,value:e.path,description:s}}),_=[],v=T(e=>e.agentDefinitions);if(M()){_.push({label:`Open auto-memory folder`,value:`${X}${ie()}`,description:``});for(let e of v.activeAgents)if(e.memory){let t=ne(e.agentType,e.memory);_.push({label:`Open ${ee.bold(e.agentType)} agent memory`,value:`${X}${t}`,description:`${e.memory} scope`})}}m.push(..._);let y=Y&&m.some(e=>e.value===Y)?Y:m[0]?.value||``,[b,x]=(0,q.useState)(M),[S,w]=(0,q.useState)(C),[E]=(0,q.useState)(M),D=T(e=>Object.values(e.tasks).some(e=>e.type===`dream`&&e.status===`running`)),[O,k]=(0,q.useState)(null);(0,q.useEffect)(()=>{E&&re().then(k)},[E,D]);let A=D?`running`:O===null?``:O===0?`never`:`last ran ${ce(new Date(O))}`,[N,P]=(0,q.useState)(null),F=N!==null,I=+!!E;function L(){let e=!b;j(`userSettings`,{autoMemoryEnabled:e}),x(e),z(`tengu_auto_memory_toggled`,{enabled:e})}function R(){let e=!S;j(`userSettings`,{autoDreamEnabled:e}),w(e),z(`tengu_auto_dream_toggled`,{enabled:e})}return U(),s(`confirm:no`,t,{context:`Confirmation`}),s(`confirm:yes`,()=>{N===0?L():N===1&&R()},{context:`Confirmation`,isActive:F}),s(`select:next`,()=>{P(e=>e!==null&&e<I?e+1:null)},{context:`Select`,isActive:F}),s(`select:previous`,()=>{P(e=>e!==null&&e>0?e-1:e)},{context:`Select`,isActive:F}),(0,J.jsxs)(i,{flexDirection:`column`,width:`100%`,children:[(0,J.jsxs)(i,{flexDirection:`column`,marginBottom:1,children:[(0,J.jsx)(c,{isFocused:N===0,children:(0,J.jsxs)(o,{children:[`Auto-memory: `,b?`on`:`off`]})}),E&&(0,J.jsx)(c,{isFocused:N===1,styled:!1,children:(0,J.jsxs)(o,{color:N===1?`suggestion`:void 0,children:[`Auto-dream: `,S?`on`:`off`,A&&(0,J.jsxs)(o,{dimColor:!0,children:[` · `,A]}),!D&&S&&(0,J.jsx)(o,{dimColor:!0,children:` · /dream to run`})]})})]}),(0,J.jsx)(te,{defaultFocusValue:y,options:m,isDisabled:F,onChange:t=>{if(t.startsWith(X)){let e=t.slice(15);K(e,{recursive:!0}).catch(()=>{}).then(()=>V(e));return}Y=t,e(t)},onCancel:t,onUpFromFirstItem:()=>P(I)})]})}var q,J,Y,X,_e=e((()=>{l(),u(),q=t(u(),1),m(),W(),d(),B(),N(),oe(),b(),S(),x(),v(),H(),w(),r(),R(),se(),he(),A(),_(),J=p(),X=`__open_folder__`}));function ve(e){let t=de(),n=D(),r=e.startsWith(t)?`~`+e.slice(t.length):null,i=e.startsWith(n)?`./`+fe(n,e):null;return r&&i?r.length<=i.length?r:i:r||i||e}var ye=e((()=>{u(),d(),E(),p()}));function be({onDone:e}){let t=async t=>{try{t.includes(n())&&await K(n(),{recursive:!0});try{await pe(t,``,{encoding:`utf8`,flag:`wx`})}catch(e){if(O(e)!==`EEXIST`)throw e}await ue(t);let r=`default`,i=``;process.env.VISUAL?(r=`$VISUAL`,i=process.env.VISUAL):process.env.EDITOR&&(r=`$EDITOR`,i=process.env.EDITOR);let a=r==="default"?``:`Using ${r}="${i}".`,o=a?`> ${a} To change editor, set $EDITOR or $VISUAL environment variable.`:`> To use a different editor, set the $EDITOR or $VISUAL environment variable.`;e(`Opened memory file at ${ve(t)}\n\n${o}`,{display:`system`})}catch(t){L(t),e(`Error opening memory file: ${t}`)}},r=()=>{e(`Cancelled memory editing`,{display:`system`})};return(0,Q.jsx)(f,{title:`Memory`,onCancel:r,color:`remember`,children:(0,Q.jsxs)(i,{flexDirection:`column`,children:[(0,Q.jsx)(Z.Suspense,{fallback:null,children:(0,Q.jsx)(ge,{onSelect:t,onCancel:r})}),(0,Q.jsx)(i,{marginTop:1,children:(0,Q.jsxs)(o,{dimColor:!0,children:[`Learn more: `,(0,Q.jsx)(a,{url:`https://code.claude.com/docs/en/memory`})]})})]})})}var Z,Q,$;e((()=>{Z=t(u(),1),d(),_e(),ye(),w(),r(),k(),I(),le(),Q=p(),$=async e=>(y(),await g(),(0,Q.jsx)(be,{onDone:e}))}))();export{$ as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{l as r,o as i}from"./envUtils-DSxRz_kt.js";import{C as a,H as o,R as s,en as c,ht as l,rt as u}from"./state-4KQ3kaqz.js";import{E as d,O as f,U as p,l as ee}from"./debug-IKW-jE7K.js";import{Jt as m,Xt as h,Zt as g,qt as te}from"./settings-5PQdphqC.js";import{_ as ne,m as re}from"./git-tyaWOgRL.js";import{r as ie,t as ae}from"./execFileNoThrow-COKYqVQj.js";import{a as _,n as oe,o as se,r as v}from"./platform-EtecGacO.js";import{It as y,Kt as ce,Mn as le,Vt as ue,_ as de,jn as b,u as x}from"./model-DfFA3qMO.js";import{i as fe,t as pe}from"./genericProcessUtils-F1Qcb1sO.js";import{extname as me}from"path";import{stat as he}from"fs/promises";import{AsyncLocalStorage as ge}from"async_hooks";function _e(){return process.platform===`linux`&&r(process.env.CLAUDE_CODE_BUBBLEWRAP)}function ve(){return process.platform===`linux`?T??!1:!1}async function S(){if(E!==void 0)return E;if(process.platform===`darwin`)return E=null,null;try{let e=await pe(process.pid,10);for(let t of e){let e=t.toLowerCase();for(let t of te)if(e.includes(t))return E=t,t}}catch{}return E=null,null}async function ye(){return process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`&&m.platform!==`darwin`?await S()||`pycharm`:m.terminal}function be(){return process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`&&m.platform!==`darwin`?E===void 0?`pycharm`:E||`pycharm`:m.terminal}async function C(){process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`&&await S()}var w,T,E,D,O=e((()=>{n(),g(),i(),ie(),fe(),w=t(async()=>{if(process.platform!==`linux`)return!1;let{code:e}=await ae(`test`,[`-f`,`/.dockerenv`]);return e===0}),T=null,process.platform===`linux`&&he(`/lib/libc.musl-${process.arch===`x64`?`x86_64`:`aarch64`}.so.1`).then(()=>{T=!0},()=>{T=!1}),D={...m,terminal:be(),getIsDocker:w,getIsBubblewrapSandbox:_e,isMuslEnvironment:ve,getTerminalWithJetBrainsDetectionAsync:ye,initJetBrainsDetection:C}}));function k(e){return A?.has(e)??!1}var A,j=e((()=>{ee(),p()}));function M(){return P.getStore()}function N(e,t){return P.run(e,t)}function xe(e){return e?.agentType===`subagent`}function Se(){let e=M();if(!(!xe(e)||!e.subagentName))return e.isBuiltIn?e.subagentName:`user-defined`}function Ce(){let e=M();if(!(!e?.invokingRequestId||e.invocationEmitted))return e.invocationEmitted=!0,{invokingRequestId:e.invokingRequestId,invocationKind:e.invocationKind}}var P,F=e((()=>{P=new ge}));function we(e){return e.startsWith(`mcp__`)?`mcp_tool`:e}function I(){return r(process.env.OTEL_LOG_TOOL_DETAILS)}function Te(e,t){return!!(process.env.CLAUDE_CODE_ENTRYPOINT===`local-agent`||e===`claudeai-proxy`||t&&k(t))}function Ee(e,t,n){let r=L(e);return!r||!B.has(r.serverName)&&!Te(t,n)?{}:{mcpServerName:r.serverName,mcpToolName:r.mcpToolName}}function L(e){if(!e.startsWith(`mcp__`))return;let t=e.split(`__`);if(t.length<3)return;let n=t[1],r=t.slice(2).join(`__`);if(!(!n||!r))return{serverName:n,mcpToolName:r}}function De(e,t){if(e===`Skill`&&typeof t==`object`&&t&&`skill`in t&&typeof t.skill==`string`)return t.skill}function R(e,t=0){if(typeof e==`string`)return e.length>V?`${e.slice(0,H)}…[${e.length} chars]`:e;if(typeof e==`number`||typeof e==`boolean`||e==null)return e;if(t>=G)return`<nested>`;if(Array.isArray(e)){let n=e.slice(0,W).map(e=>R(e,t+1));return e.length>W&&n.push(`…[${e.length} items]`),n}if(typeof e==`object`){let n=Object.entries(e).filter(([e])=>!e.startsWith(`_`)),r=n.slice(0,W).map(([e,n])=>[e,R(n,t+1)]);return n.length>W&&r.push([`…`,`${n.length} keys`]),Object.fromEntries(r)}return String(e)}function Oe(e){if(!I())return;let t=f(R(e));return t.length>U&&(t=t.slice(0,U)+`…[truncated]`),t}function z(e){let t=me(e).toLowerCase();if(!t||t===`.`)return;let n=t.slice(1);return n.length>K?`other`:n}function ke(e,t){if(!e.includes(`.`)&&!t)return;let n,r=new Set;if(t){let e=z(t);e&&(r.add(e),n=e)}for(let t of e.split(J)){if(!t)continue;let e=t.split(Y);if(e.length<2)continue;let i=e[0],a=i.lastIndexOf(`/`),o=a>=0?i.slice(a+1):i;if(q.has(o))for(let t=1;t<e.length;t++){let i=e[t];if(i.charCodeAt(0)===45)continue;let a=z(i);a&&!r.has(a)&&(r.add(a),n=n?n+`,`+a:a)}}if(n)return n}function Ae(){let e=M();if(e)return{agentId:e.agentId,parentSessionId:e.parentSessionId,agentType:e.agentType};let t=process.env.CLAUDE_CODE_AGENT_ID,n=process.env.CLAUDE_CODE_PARENT_SESSION_ID,r=t?`standalone`:void 0;if(t||r||n)return{...t?{agentId:t}:{},...r?{agentType:r}:{},...n?{parentSessionId:n}:{}};let i=u();return i?{parentSessionId:i}:{}}function je(){try{let e=process.memoryUsage(),t=process.cpuUsage(),n=Date.now(),r;if(Q&&$){let e=n-$;e>0&&(r=(t.user-Q.user+(t.system-Q.system))/(e*1e3)*100)}return Q=t,$=n,{uptime:process.uptime(),rss:e.rss,heapTotal:e.heapTotal,heapUsed:e.heapUsed,external:e.external,arrayBuffers:e.arrayBuffers,constrainedMemory:process.constrainedMemory(),cpuUsage:t,cpuPercent:r}}catch{return}}async function Me(e={}){let t=e.model?String(e.model):x(),n=typeof e.betas==`string`?e.betas:b(t).join(`,`),[r,i]=await Promise.all([Z(),re()]),c=je();return{model:t,sessionId:l(),userType:process.env.USER_TYPE||``,...n.length>0?{betas:n}:{},envContext:r,...process.env.CLAUDE_CODE_ENTRYPOINT&&{entrypoint:process.env.CLAUDE_CODE_ENTRYPOINT},...process.env.CLAUDE_AGENT_SDK_VERSION&&{agentSdkVersion:process.env.CLAUDE_AGENT_SDK_VERSION},isInteractive:String(s()),clientType:a(),...c&&{processMetrics:c},sweBenchRunId:process.env.SWE_BENCH_RUN_ID||``,sweBenchInstanceId:process.env.SWE_BENCH_INSTANCE_ID||``,sweBenchTaskId:process.env.SWE_BENCH_TASK_ID||``,...Ae(),...y()&&{subscriptionType:y()},...o()?{kairosActive:!0}:{},...i&&{rh:i}}}function Ne(e,t,n={}){let{envContext:r,processMetrics:i,rh:a,kairosActive:o,skillMode:s,observerMode:c,...l}=e,u={platform:r.platform,platform_raw:r.platformRaw,arch:r.arch,node_version:r.nodeVersion,terminal:r.terminal||`unknown`,package_managers:r.packageManagers,runtimes:r.runtimes,is_running_with_bun:r.isRunningWithBun,is_ci:r.isCi,is_claubbit:r.isClaubbit,is_claude_code_remote:r.isClaudeCodeRemote,is_local_agent_mode:r.isLocalAgentMode,is_conductor:r.isConductor,is_github_action:r.isGithubAction,is_claude_code_action:r.isClaudeCodeAction,is_claude_ai_auth:r.isClaudeAiAuth,version:r.version,build_time:r.buildTime,deployment_environment:r.deploymentEnvironment};r.remoteEnvironmentType&&(u.remote_environment_type=r.remoteEnvironmentType),r.claudeCodeContainerId&&(u.claude_code_container_id=r.claudeCodeContainerId),r.claudeCodeRemoteSessionId&&(u.claude_code_remote_session_id=r.claudeCodeRemoteSessionId),r.tags&&(u.tags=r.tags.split(`,`).map(e=>e.trim()).filter(Boolean)),r.githubEventName&&(u.github_event_name=r.githubEventName),r.githubActionsRunnerEnvironment&&(u.github_actions_runner_environment=r.githubActionsRunnerEnvironment),r.githubActionsRunnerOs&&(u.github_actions_runner_os=r.githubActionsRunnerOs),r.githubActionRef&&(u.github_action_ref=r.githubActionRef),r.wslVersion&&(u.wsl_version=r.wslVersion),r.linuxDistroId&&(u.linux_distro_id=r.linuxDistroId),r.linuxDistroVersion&&(u.linux_distro_version=r.linuxDistroVersion),r.linuxKernel&&(u.linux_kernel=r.linuxKernel),r.vcs&&(u.vcs=r.vcs),r.versionBase&&(u.version_base=r.versionBase);let d={session_id:l.sessionId,model:l.model,user_type:l.userType,is_interactive:l.isInteractive===`true`,client_type:l.clientType};if(l.betas&&(d.betas=l.betas),l.entrypoint&&(d.entrypoint=l.entrypoint),l.agentSdkVersion&&(d.agent_sdk_version=l.agentSdkVersion),l.sweBenchRunId&&(d.swe_bench_run_id=l.sweBenchRunId),l.sweBenchInstanceId&&(d.swe_bench_instance_id=l.sweBenchInstanceId),l.sweBenchTaskId&&(d.swe_bench_task_id=l.sweBenchTaskId),l.agentId&&(d.agent_id=l.agentId),l.parentSessionId&&(d.parent_session_id=l.parentSessionId),l.agentType&&(d.agent_type=l.agentType),t.githubActionsMetadata){let e=t.githubActionsMetadata;u.github_actions_metadata={actor_id:e.actorId,repository_id:e.repositoryId,repository_owner_id:e.repositoryOwnerId}}let p;return(t.accountUuid||t.organizationUuid)&&(p={account_uuid:t.accountUuid,organization_uuid:t.organizationUuid}),{env:u,...i&&{process:Buffer.from(f(i)).toString(`base64`)},...p&&{auth:p},core:d,additional:{...a&&{rh:a},...o&&{is_assistant_mode:!0},...s&&{skill_mode:s},...c&&{observer_mode:c},...n}}}var B,V,H,U,W,G,K,q,J,Y,X,Z,Q,$,Pe=e((()=>{n(),g(),O(),le(),de(),c(),i(),j(),ue(),ne(),se(),F(),d(),B=new Set,V=512,H=128,U=4*1024,W=20,G=2,K=10,q=new Set([`rm`,`mv`,`cp`,`touch`,`mkdir`,`chmod`,`chown`,`cat`,`head`,`tail`,`sort`,`stat`,`diff`,`wc`,`grep`,`rg`,`sed`]),J=/\s*(?:&&|\|\||[;|])\s*/,Y=/\s+/,X=t(()=>{let e=`0.0.1`.match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);return e?e[0]:void 0}),Z=t(async()=>{let[e,t,n,i]=await Promise.all([m.getPackageManagers(),m.getRuntimes(),v(),oe()]);return{platform:h(),platformRaw:process.env.CLAUDE_CODE_HOST_PLATFORM||process.platform,arch:m.arch,nodeVersion:m.nodeVersion,terminal:D.terminal,packageManagers:e.join(`,`),runtimes:t.join(`,`),isRunningWithBun:m.isRunningWithBun(),isCi:r(process.env.CI),isClaubbit:r(process.env.CLAUBBIT),isClaudeCodeRemote:r(process.env.CLAUDE_CODE_REMOTE),isLocalAgentMode:process.env.CLAUDE_CODE_ENTRYPOINT===`local-agent`,isConductor:m.isConductor(),...process.env.CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE&&{remoteEnvironmentType:process.env.CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE},...process.env.CLAUDE_CODE_CONTAINER_ID&&{claudeCodeContainerId:process.env.CLAUDE_CODE_CONTAINER_ID},...process.env.CLAUDE_CODE_REMOTE_SESSION_ID&&{claudeCodeRemoteSessionId:process.env.CLAUDE_CODE_REMOTE_SESSION_ID},...process.env.CLAUDE_CODE_TAGS&&{tags:process.env.CLAUDE_CODE_TAGS},isGithubAction:r(process.env.GITHUB_ACTIONS),isClaudeCodeAction:r(process.env.CLAUDE_CODE_ACTION),isClaudeAiAuth:ce(),version:`0.0.1`,versionBase:X(),buildTime:`2026-07-12T13:57:24.344Z`,deploymentEnvironment:m.detectDeploymentEnvironment(),...r(process.env.GITHUB_ACTIONS)&&{githubEventName:process.env.GITHUB_EVENT_NAME,githubActionsRunnerEnvironment:process.env.RUNNER_ENVIRONMENT,githubActionsRunnerOs:process.env.RUNNER_OS,githubActionRef:process.env.GITHUB_ACTION_PATH?.includes(`claude-code-action/`)?process.env.GITHUB_ACTION_PATH.split(`claude-code-action/`)[1]:void 0},..._()&&{wslVersion:_()},...n??{},...i.length>0?{vcs:i.join(`,`)}:{}}}),Q=null,$=null}));export{D as _,z as a,I as c,Ne as d,Ce as f,N as g,F as h,Me as i,Ee as l,Se as m,De as n,ke as o,M as p,Oe as r,Pe as s,L as t,we as u,C as v,O as y};
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{l as r,o as i}from"./envUtils-DSxRz_kt.js";import{C as a,H as o,R as s,en as c,ht as l,rt as u}from"./state-ix0xIunV.js";import{E as d,O as f,U as p,l as ee}from"./debug-DiuXEmUq.js";import{Jt as m,Xt as h,Zt as g,qt as te}from"./settings-BhvhCpVh.js";import{_ as ne,m as re}from"./git-Cgc8X5l2.js";import{r as ie,t as ae}from"./execFileNoThrow-DResQRvR.js";import{a as _,n as oe,o as se,r as v}from"./platform-B5dCGT8t.js";import{It as y,Kt as ce,Mn as le,Vt as ue,_ as de,jn as b,u as x}from"./model-BgrLt7P7.js";import{i as fe,t as pe}from"./genericProcessUtils-DO7Fy0RJ.js";import{extname as me}from"path";import{stat as he}from"fs/promises";import{AsyncLocalStorage as ge}from"async_hooks";function _e(){return process.platform===`linux`&&r(process.env.CLAUDE_CODE_BUBBLEWRAP)}function ve(){return process.platform===`linux`?T??!1:!1}async function S(){if(E!==void 0)return E;if(process.platform===`darwin`)return E=null,null;try{let e=await pe(process.pid,10);for(let t of e){let e=t.toLowerCase();for(let t of te)if(e.includes(t))return E=t,t}}catch{}return E=null,null}async function ye(){return process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`&&m.platform!==`darwin`?await S()||`pycharm`:m.terminal}function be(){return process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`&&m.platform!==`darwin`?E===void 0?`pycharm`:E||`pycharm`:m.terminal}async function C(){process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`&&await S()}var w,T,E,D,O=e((()=>{n(),g(),i(),ie(),fe(),w=t(async()=>{if(process.platform!==`linux`)return!1;let{code:e}=await ae(`test`,[`-f`,`/.dockerenv`]);return e===0}),T=null,process.platform===`linux`&&he(`/lib/libc.musl-${process.arch===`x64`?`x86_64`:`aarch64`}.so.1`).then(()=>{T=!0},()=>{T=!1}),D={...m,terminal:be(),getIsDocker:w,getIsBubblewrapSandbox:_e,isMuslEnvironment:ve,getTerminalWithJetBrainsDetectionAsync:ye,initJetBrainsDetection:C}}));function k(e){return A?.has(e)??!1}var A,j=e((()=>{ee(),p()}));function M(){return P.getStore()}function N(e,t){return P.run(e,t)}function xe(e){return e?.agentType===`subagent`}function Se(){let e=M();if(!(!xe(e)||!e.subagentName))return e.isBuiltIn?e.subagentName:`user-defined`}function Ce(){let e=M();if(!(!e?.invokingRequestId||e.invocationEmitted))return e.invocationEmitted=!0,{invokingRequestId:e.invokingRequestId,invocationKind:e.invocationKind}}var P,F=e((()=>{P=new ge}));function we(e){return e.startsWith(`mcp__`)?`mcp_tool`:e}function I(){return r(process.env.OTEL_LOG_TOOL_DETAILS)}function Te(e,t){return!!(process.env.CLAUDE_CODE_ENTRYPOINT===`local-agent`||e===`claudeai-proxy`||t&&k(t))}function Ee(e,t,n){let r=L(e);return!r||!B.has(r.serverName)&&!Te(t,n)?{}:{mcpServerName:r.serverName,mcpToolName:r.mcpToolName}}function L(e){if(!e.startsWith(`mcp__`))return;let t=e.split(`__`);if(t.length<3)return;let n=t[1],r=t.slice(2).join(`__`);if(!(!n||!r))return{serverName:n,mcpToolName:r}}function De(e,t){if(e===`Skill`&&typeof t==`object`&&t&&`skill`in t&&typeof t.skill==`string`)return t.skill}function R(e,t=0){if(typeof e==`string`)return e.length>V?`${e.slice(0,H)}…[${e.length} chars]`:e;if(typeof e==`number`||typeof e==`boolean`||e==null)return e;if(t>=G)return`<nested>`;if(Array.isArray(e)){let n=e.slice(0,W).map(e=>R(e,t+1));return e.length>W&&n.push(`…[${e.length} items]`),n}if(typeof e==`object`){let n=Object.entries(e).filter(([e])=>!e.startsWith(`_`)),r=n.slice(0,W).map(([e,n])=>[e,R(n,t+1)]);return n.length>W&&r.push([`…`,`${n.length} keys`]),Object.fromEntries(r)}return String(e)}function Oe(e){if(!I())return;let t=f(R(e));return t.length>U&&(t=t.slice(0,U)+`…[truncated]`),t}function z(e){let t=me(e).toLowerCase();if(!t||t===`.`)return;let n=t.slice(1);return n.length>K?`other`:n}function ke(e,t){if(!e.includes(`.`)&&!t)return;let n,r=new Set;if(t){let e=z(t);e&&(r.add(e),n=e)}for(let t of e.split(J)){if(!t)continue;let e=t.split(Y);if(e.length<2)continue;let i=e[0],a=i.lastIndexOf(`/`),o=a>=0?i.slice(a+1):i;if(q.has(o))for(let t=1;t<e.length;t++){let i=e[t];if(i.charCodeAt(0)===45)continue;let a=z(i);a&&!r.has(a)&&(r.add(a),n=n?n+`,`+a:a)}}if(n)return n}function Ae(){let e=M();if(e)return{agentId:e.agentId,parentSessionId:e.parentSessionId,agentType:e.agentType};let t=process.env.CLAUDE_CODE_AGENT_ID,n=process.env.CLAUDE_CODE_PARENT_SESSION_ID,r=t?`standalone`:void 0;if(t||r||n)return{...t?{agentId:t}:{},...r?{agentType:r}:{},...n?{parentSessionId:n}:{}};let i=u();return i?{parentSessionId:i}:{}}function je(){try{let e=process.memoryUsage(),t=process.cpuUsage(),n=Date.now(),r;if(Q&&$){let e=n-$;e>0&&(r=(t.user-Q.user+(t.system-Q.system))/(e*1e3)*100)}return Q=t,$=n,{uptime:process.uptime(),rss:e.rss,heapTotal:e.heapTotal,heapUsed:e.heapUsed,external:e.external,arrayBuffers:e.arrayBuffers,constrainedMemory:process.constrainedMemory(),cpuUsage:t,cpuPercent:r}}catch{return}}async function Me(e={}){let t=e.model?String(e.model):x(),n=typeof e.betas==`string`?e.betas:b(t).join(`,`),[r,i]=await Promise.all([Z(),re()]),c=je();return{model:t,sessionId:l(),userType:process.env.USER_TYPE||``,...n.length>0?{betas:n}:{},envContext:r,...process.env.CLAUDE_CODE_ENTRYPOINT&&{entrypoint:process.env.CLAUDE_CODE_ENTRYPOINT},...process.env.CLAUDE_AGENT_SDK_VERSION&&{agentSdkVersion:process.env.CLAUDE_AGENT_SDK_VERSION},isInteractive:String(s()),clientType:a(),...c&&{processMetrics:c},sweBenchRunId:process.env.SWE_BENCH_RUN_ID||``,sweBenchInstanceId:process.env.SWE_BENCH_INSTANCE_ID||``,sweBenchTaskId:process.env.SWE_BENCH_TASK_ID||``,...Ae(),...y()&&{subscriptionType:y()},...o()?{kairosActive:!0}:{},...i&&{rh:i}}}function Ne(e,t,n={}){let{envContext:r,processMetrics:i,rh:a,kairosActive:o,skillMode:s,observerMode:c,...l}=e,u={platform:r.platform,platform_raw:r.platformRaw,arch:r.arch,node_version:r.nodeVersion,terminal:r.terminal||`unknown`,package_managers:r.packageManagers,runtimes:r.runtimes,is_running_with_bun:r.isRunningWithBun,is_ci:r.isCi,is_claubbit:r.isClaubbit,is_claude_code_remote:r.isClaudeCodeRemote,is_local_agent_mode:r.isLocalAgentMode,is_conductor:r.isConductor,is_github_action:r.isGithubAction,is_claude_code_action:r.isClaudeCodeAction,is_claude_ai_auth:r.isClaudeAiAuth,version:r.version,build_time:r.buildTime,deployment_environment:r.deploymentEnvironment};r.remoteEnvironmentType&&(u.remote_environment_type=r.remoteEnvironmentType),r.claudeCodeContainerId&&(u.claude_code_container_id=r.claudeCodeContainerId),r.claudeCodeRemoteSessionId&&(u.claude_code_remote_session_id=r.claudeCodeRemoteSessionId),r.tags&&(u.tags=r.tags.split(`,`).map(e=>e.trim()).filter(Boolean)),r.githubEventName&&(u.github_event_name=r.githubEventName),r.githubActionsRunnerEnvironment&&(u.github_actions_runner_environment=r.githubActionsRunnerEnvironment),r.githubActionsRunnerOs&&(u.github_actions_runner_os=r.githubActionsRunnerOs),r.githubActionRef&&(u.github_action_ref=r.githubActionRef),r.wslVersion&&(u.wsl_version=r.wslVersion),r.linuxDistroId&&(u.linux_distro_id=r.linuxDistroId),r.linuxDistroVersion&&(u.linux_distro_version=r.linuxDistroVersion),r.linuxKernel&&(u.linux_kernel=r.linuxKernel),r.vcs&&(u.vcs=r.vcs),r.versionBase&&(u.version_base=r.versionBase);let d={session_id:l.sessionId,model:l.model,user_type:l.userType,is_interactive:l.isInteractive===`true`,client_type:l.clientType};if(l.betas&&(d.betas=l.betas),l.entrypoint&&(d.entrypoint=l.entrypoint),l.agentSdkVersion&&(d.agent_sdk_version=l.agentSdkVersion),l.sweBenchRunId&&(d.swe_bench_run_id=l.sweBenchRunId),l.sweBenchInstanceId&&(d.swe_bench_instance_id=l.sweBenchInstanceId),l.sweBenchTaskId&&(d.swe_bench_task_id=l.sweBenchTaskId),l.agentId&&(d.agent_id=l.agentId),l.parentSessionId&&(d.parent_session_id=l.parentSessionId),l.agentType&&(d.agent_type=l.agentType),t.githubActionsMetadata){let e=t.githubActionsMetadata;u.github_actions_metadata={actor_id:e.actorId,repository_id:e.repositoryId,repository_owner_id:e.repositoryOwnerId}}let p;return(t.accountUuid||t.organizationUuid)&&(p={account_uuid:t.accountUuid,organization_uuid:t.organizationUuid}),{env:u,...i&&{process:Buffer.from(f(i)).toString(`base64`)},...p&&{auth:p},core:d,additional:{...a&&{rh:a},...o&&{is_assistant_mode:!0},...s&&{skill_mode:s},...c&&{observer_mode:c},...n}}}var B,V,H,U,W,G,K,q,J,Y,X,Z,Q,$,Pe=e((()=>{n(),g(),O(),le(),de(),c(),i(),j(),ue(),ne(),se(),F(),d(),B=new Set,V=512,H=128,U=4*1024,W=20,G=2,K=10,q=new Set([`rm`,`mv`,`cp`,`touch`,`mkdir`,`chmod`,`chown`,`cat`,`head`,`tail`,`sort`,`stat`,`diff`,`wc`,`grep`,`rg`,`sed`]),J=/\s*(?:&&|\|\||[;|])\s*/,Y=/\s+/,X=t(()=>{let e=`0.0.2`.match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);return e?e[0]:void 0}),Z=t(async()=>{let[e,t,n,i]=await Promise.all([m.getPackageManagers(),m.getRuntimes(),v(),oe()]);return{platform:h(),platformRaw:process.env.CLAUDE_CODE_HOST_PLATFORM||process.platform,arch:m.arch,nodeVersion:m.nodeVersion,terminal:D.terminal,packageManagers:e.join(`,`),runtimes:t.join(`,`),isRunningWithBun:m.isRunningWithBun(),isCi:r(process.env.CI),isClaubbit:r(process.env.CLAUBBIT),isClaudeCodeRemote:r(process.env.CLAUDE_CODE_REMOTE),isLocalAgentMode:process.env.CLAUDE_CODE_ENTRYPOINT===`local-agent`,isConductor:m.isConductor(),...process.env.CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE&&{remoteEnvironmentType:process.env.CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE},...process.env.CLAUDE_CODE_CONTAINER_ID&&{claudeCodeContainerId:process.env.CLAUDE_CODE_CONTAINER_ID},...process.env.CLAUDE_CODE_REMOTE_SESSION_ID&&{claudeCodeRemoteSessionId:process.env.CLAUDE_CODE_REMOTE_SESSION_ID},...process.env.CLAUDE_CODE_TAGS&&{tags:process.env.CLAUDE_CODE_TAGS},isGithubAction:r(process.env.GITHUB_ACTIONS),isClaudeCodeAction:r(process.env.CLAUDE_CODE_ACTION),isClaudeAiAuth:ce(),version:`0.0.2`,versionBase:X(),buildTime:`2026-07-12T15:42:48.748Z`,deploymentEnvironment:m.detectDeploymentEnvironment(),...r(process.env.GITHUB_ACTIONS)&&{githubEventName:process.env.GITHUB_EVENT_NAME,githubActionsRunnerEnvironment:process.env.RUNNER_ENVIRONMENT,githubActionsRunnerOs:process.env.RUNNER_OS,githubActionRef:process.env.GITHUB_ACTION_PATH?.includes(`claude-code-action/`)?process.env.GITHUB_ACTION_PATH.split(`claude-code-action/`)[1]:void 0},..._()&&{wslVersion:_()},...n??{},...i.length>0?{vcs:i.join(`,`)}:{}}}),Q=null,$=null}));export{D as _,z as a,I as c,Ne as d,Ce as f,N as g,F as h,Me as i,Ee as l,Se as m,De as n,ke as o,M as p,Oe as r,Pe as s,L as t,we as u,C as v,O as y};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,P as r,fi as i,t as a}from"./src-CDCSSo0U2.js";import{t as o}from"./jsx-runtime-Bb4Xn-E0.js";import{Nb as s,Pb as c,dt as l,ft as u,mt as d,pt as f}from"./loadAgentsDir-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,P as r,fi as i,t as a}from"./src-CDCSSo0U2.js";import{t as o}from"./jsx-runtime-Bb4Xn-E0.js";import{Nb as s,Pb as c,dt as l,ft as u,mt as d,pt as f}from"./loadAgentsDir-ZQwvbURI.js";function p({onDone:e}){let t=f(),i=l(),a=(0,m.useMemo)(()=>t.map(e=>({label:(0,h.jsxs)(r,{children:[e.icon,` `,e.name,` `,(0,h.jsxs)(r,{dimColor:!0,children:[`(`,e.slug,`) — `,e.description]})]}),value:e.slug})),[t]);function o(n){d(n);let r=t.find(e=>e.slug===n);e(`${r?.icon} Mode switched to: ${r?.name} (${r?.slug}) — ${r?.description}`,{display:`system`})}function c(){e(`Mode selection cancelled.`,{display:`system`})}return(0,h.jsxs)(n,{flexDirection:`column`,children:[(0,h.jsxs)(n,{marginBottom:1,flexDirection:`column`,children:[(0,h.jsx)(r,{color:`remember`,bold:!0,children:`Select mode`}),(0,h.jsx)(r,{dimColor:!0,children:`Arrow keys to navigate, Enter to select, Esc to cancel.`})]}),(0,h.jsx)(s,{defaultValue:i,options:a,onChange:o,onCancel:c,visibleOptionCount:t.length})]})}var m,h,g;e((()=>{m=t(i(),1),a(),c(),u(),h=o(),g=async(e,t,n)=>{let r=n?.trim().toLowerCase();if(r){let t=f(),n=t.find(e=>e.slug===r);if(!n){e(`Unknown mode: "${r}"\n\nAvailable modes:\n${t.map(e=>`${e.icon} ${e.slug} — ${e.description}`).join(`
|
|
2
2
|
`)}`,{display:`system`});return}d(r),e(`${n.icon} Mode switched to: ${n.name} (${n.slug}) — ${n.description}`,{display:`system`});return}return(0,h.jsx)(p,{onDone:e})}}))();export{g as call};
|