@readmagic/workmate 0.0.1
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 +1 -0
- package/dist/chunks/App-DY5O6IKw.js +1 -0
- package/dist/chunks/ApproveApiKey-BEzfC6r3.js +1 -0
- package/dist/chunks/ApproveApiKey-DfAPwDix.js +1 -0
- package/dist/chunks/AssistantSessionChooser-Ce3PraaD.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-Dvhcgahe.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-B68V1bCq.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-BV7HHcgL.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-CTWhpIm8.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-CU5fCPKq.js +1 -0
- package/dist/chunks/DesktopHandoff-BRbU4is4.js +1 -0
- package/dist/chunks/Dialog-vfLXEPed.js +1 -0
- package/dist/chunks/DiffDialog-CBluIK-x.js +6 -0
- package/dist/chunks/Doctor-B0CRtxi2.js +1 -0
- package/dist/chunks/Doctor-WxNv49HC.js +3 -0
- package/dist/chunks/ExitFlow-CRPgptCN.js +2 -0
- package/dist/chunks/Feedback-CEtzaLr3.js +2 -0
- package/dist/chunks/Grove--kttLxvs.js +11 -0
- package/dist/chunks/Grove-CelgLWH4.js +1 -0
- package/dist/chunks/HybridTransport-BgV5_7Az.js +4 -0
- package/dist/chunks/InvalidConfigDialog-DCGwXW_p.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-jTwsdXWr.js +1 -0
- package/dist/chunks/ListItem-vfLXEPed.js +1 -0
- package/dist/chunks/MCPConnectionManager-BX0LMz9J.js +1 -0
- package/dist/chunks/McpParsingWarnings-WQrWJeWP.js +1 -0
- package/dist/chunks/MessageSelector-_UZB8cGb.js +3 -0
- package/dist/chunks/Messages-jCoW_1Rr.js +11 -0
- package/dist/chunks/Onboarding-BoIVNCgc.js +1 -0
- package/dist/chunks/OverageCreditUpsell-1FCN8bH3.js +1 -0
- package/dist/chunks/PermissionDialog-0ya1CU5k.js +1 -0
- package/dist/chunks/PluginSettings-BD9JLV9-.js +17 -0
- package/dist/chunks/PressEnterToContinue-Dl9Hg9Mf.js +1 -0
- package/dist/chunks/PromptInputFooterSuggestions-CrGST0Cq.js +1 -0
- package/dist/chunks/PromptInputHelpMenu-B2TDpbpw.js +1 -0
- package/dist/chunks/QueryEngine-D2HUnwmU.js +1 -0
- package/dist/chunks/REPL-BV4WyYMg.js +142 -0
- package/dist/chunks/REPL-DcpN3MRC.js +1 -0
- package/dist/chunks/RemoteCallout-DS_EV6Fh.js +1 -0
- package/dist/chunks/RemoteSessionManager-Tx1N2uVL.js +2 -0
- package/dist/chunks/ResumeConversation-Cw3vP4G8.js +1 -0
- package/dist/chunks/SSETransport-BXiEBMpb.js +4 -0
- package/dist/chunks/SearchBox-vfLXEPed.js +1 -0
- package/dist/chunks/SearchExtraToolsTool-D3VOFq9R.js +1 -0
- package/dist/chunks/Settings-ns6mRsDc.js +2 -0
- package/dist/chunks/TeleportProgress-CcDzMC5L.js +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-DZbxl4sD.js +1 -0
- package/dist/chunks/TeleportResumeWrapper-EowJO5nm.js +1 -0
- package/dist/chunks/ThemePicker-BYbChJpu.js +1 -0
- package/dist/chunks/TrustDialog-DA3YTk_k.js +1 -0
- package/dist/chunks/TungstenTool-Cb7gJvq4.js +1 -0
- package/dist/chunks/TungstenTool-CxMQVCuF.js +1 -0
- package/dist/chunks/ValidationErrorsList-Cx-hoRwG.js +2 -0
- package/dist/chunks/WelcomeV2-BTfttGcv.js +1 -0
- package/dist/chunks/add-dir-CWt69NAZ.js +1 -0
- package/dist/chunks/agentDisplay-CQ4mZWFH.js +1 -0
- package/dist/chunks/agents-C6jzKOit.js +2 -0
- package/dist/chunks/agents-D4clhuCl.js +103 -0
- package/dist/chunks/ajv-5vMo9UcX.js +8 -0
- package/dist/chunks/allErrors-HMPqE0jK.js +1 -0
- package/dist/chunks/analytics-BotDBGh0.js +1 -0
- package/dist/chunks/ant-9Z5bppVC.js +1 -0
- package/dist/chunks/api-L2IgleTV.js +1 -0
- package/dist/chunks/api-TgV7fl9V.js +1 -0
- package/dist/chunks/asciicast-DYbkzGCN.js +1 -0
- package/dist/chunks/asciicast-n-BBfgDq.js +4 -0
- package/dist/chunks/assistant-BA9_Mo9U.js +1 -0
- package/dist/chunks/assistant-BiNOSla3.js +1 -0
- package/dist/chunks/assistant-YvbVKjVh.js +1 -0
- package/dist/chunks/attributionHooks-CUAoGkU6.js +1 -0
- package/dist/chunks/attributionTrailer-oKKrF3z8.js +1 -0
- package/dist/chunks/auth-CEig4Gxp.js +1 -0
- package/dist/chunks/auth-CbGDlhyO.js +1 -0
- package/dist/chunks/auth-DHyCIxCk.js +15 -0
- package/dist/chunks/autoMode-Db4QrgFr.js +45 -0
- package/dist/chunks/autoModeDenials-BxNzGJdR.js +1 -0
- package/dist/chunks/autonomy-BkAMA7du.js +1 -0
- package/dist/chunks/autonomy-D4Vy-RPQ.js +15 -0
- package/dist/chunks/autonomyPanel-EjfO8jvg.js +1 -0
- package/dist/chunks/axios-BHBm_hhU.js +1 -0
- package/dist/chunks/axios-DaWTGg7G.js +16 -0
- package/dist/chunks/backgroundHousekeeping-BNEKWHhH.js +1 -0
- package/dist/chunks/backgroundHousekeeping-hDDE8mJC.js +17 -0
- package/dist/chunks/banner-hD6wZygx.js +2 -0
- package/dist/chunks/base64-js-0wLHn8zB.js +1 -0
- package/dist/chunks/bedrockClient-DxE_mHFI.js +15 -0
- package/dist/chunks/bg-BzG63WOm.js +1 -0
- package/dist/chunks/bg-DQ0Q3Qv-.js +9 -0
- package/dist/chunks/branch-CeQ9IyZk.js +3 -0
- package/dist/chunks/break-cache-Bd0clV2N.js +8 -0
- package/dist/chunks/bridge-yerAiaK2.js +2 -0
- package/dist/chunks/bridgeConfig-CCtXe8ak.js +1 -0
- package/dist/chunks/bridgeConfig-D5dB38xD.js +1 -0
- package/dist/chunks/bridgeEnabled--F-6TUi4.js +1 -0
- package/dist/chunks/bridgeEnabled-DKX8-T_H.js +1 -0
- package/dist/chunks/bridgeMain--R1HFbOv.js +68 -0
- package/dist/chunks/bridgeMain-d06JByZn.js +1 -0
- package/dist/chunks/bridgeMessaging-CqbLTDcx.js +1 -0
- package/dist/chunks/bridgePointer-W_jdQ8zf.js +1 -0
- package/dist/chunks/browser-Bd7GeBH1.js +1 -0
- package/dist/chunks/btw-CVGRmL9a.js +1 -0
- package/dist/chunks/bundledMode--fG1S62b.js +1 -0
- package/dist/chunks/caches-BtmAri4e.js +3 -0
- package/dist/chunks/caches-BuTIAOtY.js +1 -0
- package/dist/chunks/capacityWake-CV_x9H8j.js +1 -0
- package/dist/chunks/ccrClient-HqMi5Kfu.js +1 -0
- package/dist/chunks/checksum-DgbnMdM-.js +1 -0
- package/dist/chunks/classPrivateFieldSet2-D4U5K-I3.js +1 -0
- package/dist/chunks/classPrivateMethodInitSpec-BXQD0Vh4.js +1 -0
- package/dist/chunks/claudeDesktop-aUMx06RK.js +1 -0
- package/dist/chunks/clear-C6nRzIQE.js +1 -0
- package/dist/chunks/cliLaunch-2AUoMnqx.js +1 -0
- package/dist/chunks/client-BeET1hnC.js +1 -0
- package/dist/chunks/client-DchQnIJD.js +36 -0
- package/dist/chunks/client-DvAL7lY8.js +8 -0
- package/dist/chunks/color-DXI_4ibU.js +1 -0
- package/dist/chunks/color-convert-p91EwGT7.js +1 -0
- package/dist/chunks/commands-VjcG4qFq.js +1 -0
- package/dist/chunks/commitAttribution-Cm40fdNU.js +2 -0
- package/dist/chunks/commitAttribution-Lb3qUlAR.js +1 -0
- package/dist/chunks/compact-DPTVpJ4D.js +2 -0
- package/dist/chunks/completionCache-BQaLkB4d.js +4 -0
- package/dist/chunks/completionCache-CW8lKIgy.js +1 -0
- package/dist/chunks/config-0cRberzR.js +1 -0
- package/dist/chunks/config-BSXLgwpD.js +1 -0
- package/dist/chunks/config-BrxKpHpR.js +1 -0
- package/dist/chunks/config-C7YHKCPV.js +3 -0
- package/dist/chunks/config-CLmFk-5V.js +1 -0
- package/dist/chunks/connectHeadless-CqRoEtrg.js +1 -0
- package/dist/chunks/context-C_cKrBUn.js +1 -0
- package/dist/chunks/context-noninteractive-DnH6Q9Lu.js +54 -0
- package/dist/chunks/context-noninteractive-rUZ3ydmJ.js +1 -0
- package/dist/chunks/controlMessageCompat-IFu4Gc1y.js +1 -0
- package/dist/chunks/conversation-GJxfkr6M.js +1 -0
- package/dist/chunks/conversation-oK3aFzqO.js +1 -0
- package/dist/chunks/createSSHSession--bWmmIk9.js +6 -0
- package/dist/chunks/createSession-DIr4sUp6.js +1 -0
- package/dist/chunks/createSession-DM4acqaC.js +1 -0
- package/dist/chunks/cron-3LntnnhJ.js +1 -0
- package/dist/chunks/crossProjectResume-DKrtjTpm.js +40 -0
- package/dist/chunks/cwd-BuJhkTrc.js +1 -0
- package/dist/chunks/cwd-D-tY2NKc.js +1 -0
- package/dist/chunks/daemon-B9lBPdBJ.js +2 -0
- package/dist/chunks/dangerousBackend-DwcP0P08.js +1 -0
- package/dist/chunks/datadog-ByS7LGGa.js +1 -0
- package/dist/chunks/datadog-DNCsyfSO.js +1 -0
- package/dist/chunks/debug-DzZUT2Wv.js +1 -0
- package/dist/chunks/debug-IKW-jE7K.js +39 -0
- package/dist/chunks/debugUtils-D2981c0Z.js +1 -0
- package/dist/chunks/defineProperty-C-QyHrDq.js +1 -0
- package/dist/chunks/desktop-B5cvrcOQ.js +1 -0
- package/dist/chunks/detached-rfIUyc-B.js +5 -0
- package/dist/chunks/detect-libc-CxbBtWJu.js +1 -0
- package/dist/chunks/detectRepository-6nw-Aw3v.js +1 -0
- package/dist/chunks/detectRepository-ReZ0Fz8Z.js +1 -0
- package/dist/chunks/diff-cXAp9cNN.js +1 -0
- package/dist/chunks/directoryCompletion-DBM2o5kx.js +1 -0
- package/dist/chunks/dist-CXlEpGqr.js +20 -0
- package/dist/chunks/dist-DESLAofA.js +1 -0
- package/dist/chunks/dist-DIee4wq1.js +29 -0
- package/dist/chunks/dist-Dopnn8wS.js +5 -0
- package/dist/chunks/dist-es-5t7v8oaj.js +1 -0
- package/dist/chunks/dist-es-BF6bR-Ik.js +2 -0
- package/dist/chunks/dist-es-BIjDeceU.js +1 -0
- package/dist/chunks/dist-es-BOPBJQo3.js +1 -0
- package/dist/chunks/dist-es-Bfr4TzQe.js +3 -0
- package/dist/chunks/dist-es-Byxccz_-.js +1 -0
- package/dist/chunks/dist-es-C-OjW2Ao.js +1 -0
- package/dist/chunks/dist-es-C3reqy7X.js +1 -0
- package/dist/chunks/dist-es-C7vygWzp.js +1 -0
- package/dist/chunks/dist-es-CEk66gUu.js +1 -0
- package/dist/chunks/dist-es-CIULjvtA2.js +1 -0
- package/dist/chunks/dist-es-CMtO44xC.js +1 -0
- package/dist/chunks/dist-es-CQMt6zRM.js +1 -0
- package/dist/chunks/dist-es-CYPVg66r.js +9 -0
- package/dist/chunks/dist-es-Cd_AeqMK.js +6 -0
- package/dist/chunks/dist-es-Cgsa8pb82.js +1 -0
- package/dist/chunks/dist-es-Cwru7c2B2.js +1 -0
- package/dist/chunks/dist-es-D1Y8zSMI.js +1 -0
- package/dist/chunks/dist-es-D1wHe_zh.js +1 -0
- package/dist/chunks/dist-es-DKFm0FJ7.js +1 -0
- package/dist/chunks/dist-es-DKIwwJME.js +1 -0
- package/dist/chunks/dist-es-DNFTCbrP.js +1 -0
- package/dist/chunks/dist-es-DXIR5NLi2.js +1 -0
- package/dist/chunks/dist-es-DelBIxNM.js +1 -0
- package/dist/chunks/dist-es-DmdZmEJ-.js +1 -0
- package/dist/chunks/dist-es-Gt_DpXlP.js +1 -0
- package/dist/chunks/dist-es-gUzZ_7Vf.js +1 -0
- package/dist/chunks/dist-es-kj-F5A132.js +1 -0
- package/dist/chunks/dist-es-yHGBqhBe.js +1 -0
- package/dist/chunks/doctor-CTMHXZvQ.js +1 -0
- package/dist/chunks/earlyInput-BTC_Wucv.js +2 -0
- package/dist/chunks/earlyInput-xcoTbKQn.js +1 -0
- package/dist/chunks/effort-Br8KKHdx.js +9 -0
- package/dist/chunks/entry-4lIRMrLI.js +14 -0
- package/dist/chunks/envLessBridgeConfig-CGuIxFzJ.js +1 -0
- package/dist/chunks/envLessBridgeConfig-D_Jg4fJy.js +1 -0
- package/dist/chunks/envUtils-DSxRz_kt.js +1 -0
- package/dist/chunks/esm-BYnFh4pG.js +1 -0
- package/dist/chunks/esm-Bx6rTxIs.js +1 -0
- package/dist/chunks/esm-C367Cyo-.js +1 -0
- package/dist/chunks/esm-C8Zkk1Ux.js +1 -0
- package/dist/chunks/esm-CGx9qY3q.js +56 -0
- package/dist/chunks/esm-CXM9jqO_.js +1 -0
- package/dist/chunks/esm-CXczu_-W.js +1 -0
- package/dist/chunks/esm-CXt5K8Xt.js +1 -0
- package/dist/chunks/esm-Cb-L4oAk.js +1 -0
- package/dist/chunks/esm-D6ZZCdtk.js +1 -0
- package/dist/chunks/esm-DhRjocaU.js +1 -0
- package/dist/chunks/esm-DklLYEuz.js +1 -0
- package/dist/chunks/esm-IYgGg4wR.js +1 -0
- package/dist/chunks/esm-lWlUmoUA.js +1 -0
- package/dist/chunks/esm-lyfry1WB.js +10 -0
- package/dist/chunks/esm-wGnzjq4Z.js +1 -0
- package/dist/chunks/event-streams-C0Zy0Uqv.js +1 -0
- package/dist/chunks/event-streams-DoqJmjFN.js +1 -0
- package/dist/chunks/eventLoopStallDetector-Cg_RXU1q.js +1 -0
- package/dist/chunks/execAsync-Bv2yxuGe.js +1 -0
- package/dist/chunks/execFileNoThrow-COKYqVQj.js +34 -0
- package/dist/chunks/execSyncWrapper-DZJ3tNWF.js +1 -0
- package/dist/chunks/exit-BOhGfSlm.js +2 -0
- package/dist/chunks/exit-Z9oWrqE4.js +1 -0
- package/dist/chunks/extra-usage-BS4aVOt5.js +1 -0
- package/dist/chunks/extra-usage-DtAIhW74.js +1 -0
- package/dist/chunks/extra-usage-core-CdL1ltqq.js +1 -0
- package/dist/chunks/extra-usage-noninteractive-DxxRI0Yx.js +1 -0
- package/dist/chunks/extraUsage-BYZdi44Y.js +1 -0
- package/dist/chunks/extractMemories-C4f9JWuI.js +1 -0
- package/dist/chunks/fast-B0OB4x7K.js +1 -0
- package/dist/chunks/fast-DKqiojzf.js +1 -0
- package/dist/chunks/featureCheck-CrJeuheQ.js +1 -0
- package/dist/chunks/featureCheck-HslM03dr.js +1 -0
- package/dist/chunks/feedback-yB19xph5.js +1 -0
- package/dist/chunks/figures-5ThXQEtq.js +1 -0
- package/dist/chunks/file-D1cN3LMK.js +12 -0
- package/dist/chunks/fileStateCache-DDW5toIs.js +1 -0
- package/dist/chunks/files-DAzGtmzz.js +2 -0
- package/dist/chunks/firstPartyEventLogger-CdUpe6Lh.js +1 -0
- package/dist/chunks/firstPartyEventLogger-hU-LPkje.js +5 -0
- package/dist/chunks/flushGate-ZFr8yv7F.js +1 -0
- package/dist/chunks/foundry-sdk-BdeF2aBu.js +1 -0
- package/dist/chunks/fpsMetrics-Cf_hdtiJ.js +1 -0
- package/dist/chunks/from-CgDRRLiX.js +4 -0
- package/dist/chunks/gemini-DqAv8_GY.js +1 -0
- package/dist/chunks/generateRecap-lO2PDlx8.js +1 -0
- package/dist/chunks/generateSessionName-48veu5dv.js +1 -0
- package/dist/chunks/genericProcessUtils-F1Qcb1sO.js +23 -0
- package/dist/chunks/getMachineId-bsd-Cut1kHoA.js +1 -0
- package/dist/chunks/getMachineId-darwin-CsRhaP3y.js +2 -0
- package/dist/chunks/getMachineId-linux-Bd7UBNRQ.js +1 -0
- package/dist/chunks/getMachineId-unsupported-vFGP8E_8.js +1 -0
- package/dist/chunks/getMachineId-win-DamF2CH_.js +1 -0
- package/dist/chunks/git-BE_FiJZp.js +1 -0
- package/dist/chunks/git-tyaWOgRL.js +6 -0
- package/dist/chunks/githubRepoPathMapping-BlR0BphY.js +1 -0
- package/dist/chunks/goal-Bn8Kz2Dp.js +3 -0
- package/dist/chunks/graceful-fs-DDVg0cja.js +2 -0
- package/dist/chunks/grok-DhnO_KDC.js +1 -0
- package/dist/chunks/grove-DotW04-v.js +7 -0
- package/dist/chunks/hash-Tu-My5Vp.js +1 -0
- package/dist/chunks/heapdump-DkZSKNbp.js +5 -0
- package/dist/chunks/help-DU_BcZtU.js +1 -0
- package/dist/chunks/hooks-BTMWE5Qx.js +79 -0
- package/dist/chunks/hooks-DONAb_nq.js +1 -0
- package/dist/chunks/hostGuard-Dh296c6q.js +1 -0
- package/dist/chunks/inboundAttachments-BcEgi49j.js +1 -0
- package/dist/chunks/inboundAttachments-DVs3_m48.js +1 -0
- package/dist/chunks/index.min-D75yiGLN.js +1 -0
- package/dist/chunks/initReplBridge-D0Xec8S-.js +1 -0
- package/dist/chunks/install-BkfXeXpv.js +1 -0
- package/dist/chunks/instinctParser-Dt-lqnDe.js +1 -0
- package/dist/chunks/instrumentation-H0XRS1yG.js +21 -0
- package/dist/chunks/intl-cKc-V6Mq.js +1 -0
- package/dist/chunks/isObject-C6qM3WEW.js +1 -0
- package/dist/chunks/isSymbol-BO6cdPI7.js +1 -0
- package/dist/chunks/job-DKtLkF8V.js +2 -0
- package/dist/chunks/json-bigint-bonnP-Hz.js +8 -0
- package/dist/chunks/jsx-runtime-Bb4Xn-E0.js +1 -0
- package/dist/chunks/jws-BscXOT9I.js +3 -0
- package/dist/chunks/jwtUtils-C-ojmb8W.js +1 -0
- package/dist/chunks/keybindings-ez51eHHp.js +2 -0
- package/dist/chunks/language-BuRSO2sR.js +1 -0
- package/dist/chunks/language-Da4KNbjm.js +1 -0
- package/dist/chunks/launchAgentsPlatform-BQyPdrHp.js +1 -0
- package/dist/chunks/launchCommand-1qkTCKpf.js +1 -0
- package/dist/chunks/launchLocalMemory-CWHAj7CX.js +3 -0
- package/dist/chunks/launchLocalVault-D8iJdtsP.js +3 -0
- package/dist/chunks/launchMemoryStores-W7jWG2uH.js +1 -0
- package/dist/chunks/launchOnboarding-q__LaLy1.js +8 -0
- package/dist/chunks/launchSchedule-BWi9F5vh.js +1 -0
- package/dist/chunks/launchSkillStore-4wd4MQBc.js +1 -0
- package/dist/chunks/launchTeleport-BlCf2QM_.js +3 -0
- package/dist/chunks/launchVault-C7u7LZV7.js +1 -0
- package/dist/chunks/lazySchema-uxlVVNM1.js +1 -0
- package/dist/chunks/lib-BSzUGQb_.js +2 -0
- package/dist/chunks/lib-BlVGipXx.js +14 -0
- package/dist/chunks/lib-rQZENxQg.js +8 -0
- package/dist/chunks/loadAgentsDir-Dgd-fzNt.js +1 -0
- package/dist/chunks/loadAgentsDir-nzr38hai.js +3990 -0
- package/dist/chunks/loadPluginHooks-z1-zvBLw.js +1 -0
- package/dist/chunks/loadSso-DSxfVpgX.js +1 -0
- package/dist/chunks/localSearch-B-L_ldos.js +1 -0
- package/dist/chunks/localSearch-D-FprOMr.js +1 -0
- package/dist/chunks/lockfile-D5-j7HOZ.js +1 -0
- package/dist/chunks/log-B3eB4EFv.js +1 -0
- package/dist/chunks/logoV2Utils-RQ160dI2.js +1 -0
- package/dist/chunks/magicDocs-BqZ0GewA.js +57 -0
- package/dist/chunks/main-DeFMhaFE.js +31 -0
- package/dist/chunks/main-y7LJ5qUc.js +1243 -0
- package/dist/chunks/mappers-CWykjGfP.js +1 -0
- package/dist/chunks/mcp-CSFPAfaW.js +2 -0
- package/dist/chunks/mcp-DBwT4pa9.js +6 -0
- package/dist/chunks/mcp-DvZTaHZE.js +1 -0
- package/dist/chunks/memoize-BK3gG5ob.js +1 -0
- package/dist/chunks/memoize-BO31Ws9Q.js +1 -0
- package/dist/chunks/memory-DcpPpYN0.js +1 -0
- package/dist/chunks/metadata-BRLJvh61.js +1 -0
- package/dist/chunks/modalContext-DFjKLCB6.js +1 -0
- package/dist/chunks/mode-BkViT_0o.js +2 -0
- package/dist/chunks/model--z4Di9QO.js +1 -0
- package/dist/chunks/model-CZktWw6o.js +1 -0
- package/dist/chunks/model-DfFA3qMO.js +1 -0
- package/dist/chunks/multipart-parser-DDLYsngd.js +2 -0
- package/dist/chunks/nativeInstaller-GcIk7G2Y.js +1 -0
- package/dist/chunks/oauth-BqJqV-2M.js +1 -0
- package/dist/chunks/oauth-C8X_p8Gc.js +1 -0
- package/dist/chunks/observationStore-DzCdXq8U.js +4 -0
- package/dist/chunks/onChangeAppState-DwGVi-BC.js +1 -0
- package/dist/chunks/open-BtQHzzL9.js +1 -0
- package/dist/chunks/openai-B2wxZDQx.js +10 -0
- package/dist/chunks/openaiShared-G2-w4gJt.js +1 -0
- package/dist/chunks/output-style-BM3qAHLA.js +1 -0
- package/dist/chunks/overageCreditGrant-CjK49axw.js +1 -0
- package/dist/chunks/p-map-B1EeBuI8.js +1 -0
- package/dist/chunks/p-map-HKDr3iDo.js +1 -0
- package/dist/chunks/package-BC0bllK8.js +1 -0
- package/dist/chunks/panel-B-nrcHpm.js +1 -0
- package/dist/chunks/panel-R4ue6pSW.js +1 -0
- package/dist/chunks/panelCall-I_fbgub5.js +1 -0
- package/dist/chunks/parseConnectUrl-BiyKR5-x.js +1 -0
- package/dist/chunks/parser-BlM_Fk4J.js +1 -0
- package/dist/chunks/parser-CQrasoUB.js +1 -0
- package/dist/chunks/partition-CxRF7T-f.js +1 -0
- package/dist/chunks/passes-U_h-hNu-.js +1 -0
- package/dist/chunks/path-BCSE0S-c.js +1 -0
- package/dist/chunks/permissions-B8epy16o.js +3 -0
- package/dist/chunks/permissions-CeYKbtSC.js +1 -0
- package/dist/chunks/permissions-Cn_6f8CB.js +1 -0
- package/dist/chunks/pidLock-CBJDnBG_.js +3 -0
- package/dist/chunks/pipeTransport-D3Qx9v1V.js +1 -0
- package/dist/chunks/plan-BAhStVci.js +1 -0
- package/dist/chunks/platform-EtecGacO.js +2 -0
- package/dist/chunks/plist-Bzo2VMe9.js +6 -0
- package/dist/chunks/plugin-D9huNnv6.js +1 -0
- package/dist/chunks/pluginAutoupdate-BfmyxR5g.js +1 -0
- package/dist/chunks/pluginBlocklist-03sZaZa6.js +1 -0
- package/dist/chunks/pluginCliCommands-P2Ndi1r1.js +1 -0
- package/dist/chunks/pluginFlagging-BVy7Xv_0.js +1 -0
- package/dist/chunks/pluginOperations-Cz37qcjF.js +2 -0
- package/dist/chunks/pluginStartupCheck-BqUwHcMD.js +1 -0
- package/dist/chunks/pluginStartupCheck-w24D-wwk.js +1 -0
- package/dist/chunks/plugins-B0hiIN4q.js +4 -0
- package/dist/chunks/policyLimits-Dem-XJ_h.js +1 -0
- package/dist/chunks/pollConfig-C2Ac8WMU.js +1 -0
- package/dist/chunks/poller-CpLBoB-N.js +1 -0
- package/dist/chunks/poor-CfbMKZNJ.js +1 -0
- package/dist/chunks/poorMode-Bsw2V-V_.js +1 -0
- package/dist/chunks/poorMode-jvImnkty.js +1 -0
- package/dist/chunks/postCommitAttribution-DoSP9wZD.js +1 -0
- package/dist/chunks/print-ozjC0Mhg.js +23 -0
- package/dist/chunks/privacy-settings-DeGoBRrZ.js +1 -0
- package/dist/chunks/process-CNfq37LF.js +1 -0
- package/dist/chunks/process-gEbdy6uY.js +1 -0
- package/dist/chunks/processBashCommand-loWZ8MSE.js +1 -0
- package/dist/chunks/processSlashCommand-BdouajZb.js +5 -0
- package/dist/chunks/projectContext-BaDZBAoK.js +1 -0
- package/dist/chunks/projectContext-D9MDwJUF.js +1 -0
- package/dist/chunks/prompt-Bef63FhB.js +132 -0
- package/dist/chunks/prompt-C7wd1H_i.js +1 -0
- package/dist/chunks/prompt-DIoNqZvO.js +1 -0
- package/dist/chunks/promptEditor-foiayhdY.js +4 -0
- package/dist/chunks/protocolHandler-BsiB1oW_.js +13 -0
- package/dist/chunks/protocols-CCsohXid.js +18 -0
- package/dist/chunks/protocols-CnYQjBlj.js +2 -0
- package/dist/chunks/proxy-Cn2YwITp.js +99 -0
- package/dist/chunks/rate-limit-options-DTJPDcTr.js +1 -0
- package/dist/chunks/rcDebugLog-BUuD-X1D.js +11 -0
- package/dist/chunks/reconciler-DqXTmV3J.js +4 -0
- package/dist/chunks/referral-DP_GshTS.js +1 -0
- package/dist/chunks/refresh-CNzXPAFw.js +1 -0
- package/dist/chunks/registerProtocol-CjxlFsKw.js +36 -0
- package/dist/chunks/release-notes-BxgK8zWO.js +4 -0
- package/dist/chunks/releaseNotes-CbSktIJW.js +2 -0
- package/dist/chunks/reload-plugins-CDu6yU5-.js +1 -0
- package/dist/chunks/remote-env-B4HnhISc.js +1 -0
- package/dist/chunks/remoteBridgeCore-D-wG5jau.js +1 -0
- package/dist/chunks/remoteManagedSettings-B7gt0VAX.js +1 -0
- package/dist/chunks/rename-DlbMb24l.js +1 -0
- package/dist/chunks/renderOptions-5kWQpVr2.js +1 -0
- package/dist/chunks/resume-BB5iBogS.js +2 -0
- package/dist/chunks/rewind-D12hCfZD.js +1 -0
- package/dist/chunks/ripgrep-BQgJ02F9.js +1 -0
- package/dist/chunks/ripgrep-BvDwiKJ3.js +5 -0
- package/dist/chunks/rollback-BPWRKlIZ.js +11 -0
- package/dist/chunks/rolldown-runtime-DaDcL9Zw.js +1 -0
- package/dist/chunks/runtimeObserver-BNH2WGE3.js +1 -0
- package/dist/chunks/runtimeObserver-Ci-5gvYg.js +10 -0
- package/dist/chunks/sandbox-adapter-Coe1GDAE.js +1 -0
- package/dist/chunks/sandbox-toggle-B2Yk4y2V.js +1 -0
- package/dist/chunks/sanitization-DV-94a9Z.js +1 -0
- package/dist/chunks/satisfies-DQJHNtpQ.js +1 -0
- package/dist/chunks/sdkHeapDumpMonitor-WdXUV7DV.js +1 -0
- package/dist/chunks/searchExtraTools-BnWZ9roi.js +1 -0
- package/dist/chunks/semver-BMRJYn3q.js +1 -0
- package/dist/chunks/semver-DQo45qGo.js +1 -0
- package/dist/chunks/serde-f76bObzR.js +4 -0
- package/dist/chunks/server-LdbAb0sV.js +1 -0
- package/dist/chunks/serverBanner-BdExKFHT.js +1 -0
- package/dist/chunks/serverLog-BFmvyJ93.js +1 -0
- package/dist/chunks/session-Bmx7L3Mt.js +2 -0
- package/dist/chunks/sessionDataUploader-CaCjwsA2.js +1 -0
- package/dist/chunks/sessionDiscovery-DcEAr5vJ.js +1 -0
- package/dist/chunks/sessionFileAccessHooks-BhdOmW9o.js +1 -0
- package/dist/chunks/sessionManager-CPa049BO.js +1 -0
- package/dist/chunks/sessionMemory-Bsg2unYX.js +1 -0
- package/dist/chunks/sessionMemory-CIbCojm-.js +1 -0
- package/dist/chunks/sessionMemoryUtils-Cjb57wtC.js +1 -0
- package/dist/chunks/sessionObserver-CRU1qWnP.js +1 -0
- package/dist/chunks/sessionObserver-DQwHsDrM.js +20 -0
- package/dist/chunks/sessionStorage-BxDN8qRc.js +1 -0
- package/dist/chunks/sessionStoragePortable-Cx6JQ5Ye.js +3 -0
- package/dist/chunks/sessionTitle-B8jcexkQ.js +14 -0
- package/dist/chunks/sessionTracing-BuLsL6qA.js +11 -0
- package/dist/chunks/settings-5PQdphqC.js +19 -0
- package/dist/chunks/settingsSync-BDeuErb5.js +1 -0
- package/dist/chunks/setup-BKEnSLR9.js +3 -0
- package/dist/chunks/shadowedRuleDetection-7Z8ezTKF.js +1 -0
- package/dist/chunks/shellQuote-fB02N16J.js +4 -0
- package/dist/chunks/sideQuestion-CYdNATPW.js +20 -0
- package/dist/chunks/signin-CPaEtsnK.js +1 -0
- package/dist/chunks/sink-DjKoYMsA.js +1 -0
- package/dist/chunks/sink-iYxWapbU.js +1 -0
- package/dist/chunks/sinks-GryGVRT8.js +2 -0
- package/dist/chunks/sinks-jfaIjsRJ.js +1 -0
- package/dist/chunks/skill-learning-E8tQed-Q.js +5 -0
- package/dist/chunks/skillChangeDetector-A8SAuyo9.js +1 -0
- package/dist/chunks/skillGapStore-B5rl12bV.js +1 -0
- package/dist/chunks/skillGapStore-CjJrxxjk.js +5 -0
- package/dist/chunks/skillGenerator-BDR_z3-X.js +8 -0
- package/dist/chunks/skillLearning-BQtfFE0g.js +1 -0
- package/dist/chunks/skillLearning-C8ihdryM.js +1 -0
- package/dist/chunks/skillPanel-yR8Oi-mO.js +28 -0
- package/dist/chunks/skillSearchPanel-DUQQUCUS.js +21 -0
- package/dist/chunks/skills-NAZQ3j-t.js +1 -0
- package/dist/chunks/slashCommandParsing-RQb_7Xzt.js +1 -0
- package/dist/chunks/src-CDCSSo0U2.js +53 -0
- package/dist/chunks/src-CHw1lvBc.js +3 -0
- package/dist/chunks/src-CST_jFnT.js +1 -0
- package/dist/chunks/src-CgZmCiiH.js +2 -0
- package/dist/chunks/src-CiJCsqUl.js +9 -0
- package/dist/chunks/src-D06Xyj4g.js +2 -0
- package/dist/chunks/src-DCUgdrYl.js +5 -0
- package/dist/chunks/src-DLz3FZm1.js +1 -0
- package/dist/chunks/src-DPUAq5Ty.js +1 -0
- package/dist/chunks/src-DQOX_xI1.js +1 -0
- package/dist/chunks/src-Dt5IJd3C.js +1 -0
- package/dist/chunks/src-Dvp6-vB7.js +19 -0
- package/dist/chunks/src-PM8NIIu_.js +1 -0
- package/dist/chunks/src-l6_O0K-a.js +1 -0
- package/dist/chunks/src-xRRBgNzF.js +25 -0
- package/dist/chunks/sso-oidc-DFJ7SBvI.js +1 -0
- package/dist/chunks/startupProfiler-B0m6crkd.js +1 -0
- package/dist/chunks/startupProfiler-DxRQteII.js +3 -0
- package/dist/chunks/state-4KQ3kaqz.js +1 -0
- package/dist/chunks/state-53JDbNQM.js +1 -0
- package/dist/chunks/state-Cn_m2NOf.js +1 -0
- package/dist/chunks/staticRender-BIxpgNUq.js +1 -0
- package/dist/chunks/stats-h4yu84Q-.js +1 -0
- package/dist/chunks/status-BbdeubJG.js +1 -0
- package/dist/chunks/status-is_Bg_IB.js +2 -0
- package/dist/chunks/statusNoticeHelpers-CQ7CUugR.js +1 -0
- package/dist/chunks/stdio-4S7b8Uhx.js +1 -0
- package/dist/chunks/stdio-W_Kokrkh.js +3 -0
- package/dist/chunks/stickers-qJoNhPk4.js +1 -0
- package/dist/chunks/store-Z8rTjDHe.js +1 -0
- package/dist/chunks/stringUtils-CvXbHQRH.js +4 -0
- package/dist/chunks/sts-C2Gf2WYN.js +1 -0
- package/dist/chunks/subprocessEnv-BSQSomcK.js +1 -0
- package/dist/chunks/subprocessEnv-vrwzMgKn.js +1 -0
- package/dist/chunks/supports-color-uJ1LqA-P.js +1 -0
- package/dist/chunks/systemPromptSections-CgpggIYX.js +1 -0
- package/dist/chunks/systemPromptSections-IePG5K8r.js +1 -0
- package/dist/chunks/systemTheme-Ceakddth.js +1 -0
- package/dist/chunks/tag-i3HZ4lhj.js +11 -0
- package/dist/chunks/tasks-HzsYNTZ1.js +1 -0
- package/dist/chunks/teleport-hN3cAbYC.js +1 -0
- package/dist/chunks/templateJobs-CIv_ysje.js +12 -0
- package/dist/chunks/terminalSetup-C0PF87iu.js +33 -0
- package/dist/chunks/terminalSetup-CxniwSF-.js +1 -0
- package/dist/chunks/theme-BKIHX_Dx.js +1 -0
- package/dist/chunks/thinkback-BA4cMz4D.js +1 -0
- package/dist/chunks/thinkback-mT-8FIT-.js +1 -0
- package/dist/chunks/thinkback-play-Cfk49mvF.js +1 -0
- package/dist/chunks/tmux-CbsW-VDJ.js +1 -0
- package/dist/chunks/toolEventObserver-8FQtxeVv.js +1 -0
- package/dist/chunks/toolEventObserver-B1xvyKdE.js +1 -0
- package/dist/chunks/toolPool-CHVDZqh7.js +1 -0
- package/dist/chunks/trustedDevice-BYCh1ff7.js +1 -0
- package/dist/chunks/trustedDevice-DnIWErCt.js +1 -0
- package/dist/chunks/tui-fTa_pzdA.js +6 -0
- package/dist/chunks/types-BUyOCzUt.js +1 -0
- package/dist/chunks/types-Czs-_G1S.js +3 -0
- package/dist/chunks/types-a7X-tJpJ.js +17 -0
- package/dist/chunks/udsClient-Cg9bBD0p.js +1 -0
- package/dist/chunks/ultrareviewCommand-DCFRZsKp.js +3 -0
- package/dist/chunks/undercover-B-kKUWtK.js +1 -0
- package/dist/chunks/undercover-CsLPQb-a.js +31 -0
- package/dist/chunks/up-dO5BcPaq.js +12 -0
- package/dist/chunks/updateCCB-CfUnkOLT.js +11 -0
- package/dist/chunks/upgrade-CngUwvY4.js +1 -0
- package/dist/chunks/upgrade-kpttjebY.js +1 -0
- package/dist/chunks/upload-DDhQqV8n.js +1 -0
- package/dist/chunks/upstreamproxy-CvcjNY7J.js +11 -0
- package/dist/chunks/usage-CJ5w0907.js +1 -0
- package/dist/chunks/usage-eZRwLa77.js +1 -0
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-yAroCqu4.js +1 -0
- package/dist/chunks/useMainLoopModel-BNFW-g8E.js +1 -0
- package/dist/chunks/useManagePlugins-CTtPaQRP.js +1 -0
- package/dist/chunks/useMergedTools-CZJffsmf.js +1 -0
- package/dist/chunks/useSearchInput-C-CqUK6w.js +1 -0
- package/dist/chunks/useSettingsErrors-BWlJCgYF.js +1 -0
- package/dist/chunks/util-DJV0joAW.js +1 -0
- package/dist/chunks/v4-jw6qOKwQ.js +65 -0
- package/dist/chunks/validatePlugin-CRmpIGLV.js +1 -0
- package/dist/chunks/vertex-sdk-DjXcZ2J7.js +9 -0
- package/dist/chunks/vim-n8-UT5w-.js +1 -0
- package/dist/chunks/which-BBCjXfI2.js +1 -0
- package/dist/chunks/windowsPaths-D6T_3XaU.js +1 -0
- package/dist/chunks/windowsPaths-DUKTzBck.js +1 -0
- package/dist/chunks/workSecret-C_lv0dRh.js +1 -0
- package/dist/chunks/workerRegistry-BdHi7_sN.js +1 -0
- package/dist/chunks/worktree-YDeHMlHZ.js +1 -0
- package/dist/chunks/worktreeModeEnabled-BFOYTTTr.js +1 -0
- package/dist/chunks/worktreeModeEnabled-D68iEHpC.js +1 -0
- package/dist/chunks/wrapper-K8ZapJVu.js +6 -0
- package/dist/chunks/xdg-DcF9ejUM.js +1 -0
- package/dist/chunks/zod-CuNujUwx.js +1 -0
- package/dist/cli-bun.js +2 -0
- package/dist/cli-node.js +2 -0
- package/dist/cli.js +2 -0
- package/dist/vendor/ripgrep/x64-linux/rg +0 -0
- package/package.json +218 -0
- package/scripts/postinstall.cjs +389 -0
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Postinstall script — runs automatically after `bun install` or `npm install`.
|
|
4
|
+
*
|
|
5
|
+
* Downloads ripgrep binary (idempotent, skips if exists).
|
|
6
|
+
* Works in dev mode (src/ exists), published mode (dist/ exists), with bun or node.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* node scripts/postinstall.js
|
|
10
|
+
* node scripts/postinstall.js --force
|
|
11
|
+
* bun run scripts/postinstall.js
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const {
|
|
15
|
+
existsSync,
|
|
16
|
+
mkdirSync,
|
|
17
|
+
readFileSync,
|
|
18
|
+
renameSync,
|
|
19
|
+
rmSync,
|
|
20
|
+
statSync,
|
|
21
|
+
writeFileSync,
|
|
22
|
+
chmodSync,
|
|
23
|
+
} = require('fs')
|
|
24
|
+
const { spawnSync } = require('child_process')
|
|
25
|
+
const { setDefaultResultOrder } = require('node:dns')
|
|
26
|
+
const path = require('path')
|
|
27
|
+
const os = require('os')
|
|
28
|
+
|
|
29
|
+
// Prefer IPv4 first — Bun on Windows sometimes fails GitHub over broken IPv6 paths.
|
|
30
|
+
try {
|
|
31
|
+
setDefaultResultOrder('ipv4first')
|
|
32
|
+
} catch {
|
|
33
|
+
/* ignore */
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// --- Config ---
|
|
37
|
+
|
|
38
|
+
const RG_VERSION = '15.0.1'
|
|
39
|
+
const DEFAULT_RELEASE_BASE = `https://github.com/microsoft/ripgrep-prebuilt/releases/download/v${RG_VERSION}`
|
|
40
|
+
const MIRROR_RELEASE_BASE = `https://ghproxy.net/https://github.com/microsoft/ripgrep-prebuilt/releases/download/v${RG_VERSION}`
|
|
41
|
+
const RELEASE_BASE = (
|
|
42
|
+
process.env.RIPGREP_DOWNLOAD_BASE ?? DEFAULT_RELEASE_BASE
|
|
43
|
+
).replace(/\/$/, '')
|
|
44
|
+
|
|
45
|
+
const scriptDir = path.dirname(__filename)
|
|
46
|
+
const projectRoot = path.resolve(scriptDir, '..')
|
|
47
|
+
|
|
48
|
+
// --- Platform mapping ---
|
|
49
|
+
|
|
50
|
+
function getPlatformMapping() {
|
|
51
|
+
const arch = process.arch
|
|
52
|
+
const platform = process.platform
|
|
53
|
+
|
|
54
|
+
if (platform === 'darwin') {
|
|
55
|
+
if (arch === 'arm64')
|
|
56
|
+
return { target: 'aarch64-apple-darwin', ext: 'tar.gz' }
|
|
57
|
+
if (arch === 'x64') return { target: 'x86_64-apple-darwin', ext: 'tar.gz' }
|
|
58
|
+
throw new Error(`Unsupported macOS arch: ${arch}`)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (platform === 'win32') {
|
|
62
|
+
if (arch === 'x64') return { target: 'x86_64-pc-windows-msvc', ext: 'zip' }
|
|
63
|
+
if (arch === 'arm64')
|
|
64
|
+
return { target: 'aarch64-pc-windows-msvc', ext: 'zip' }
|
|
65
|
+
throw new Error(`Unsupported Windows arch: ${arch}`)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (platform === 'linux') {
|
|
69
|
+
const isMusl = detectMusl()
|
|
70
|
+
if (arch === 'x64') {
|
|
71
|
+
return { target: 'x86_64-unknown-linux-musl', ext: 'tar.gz' }
|
|
72
|
+
}
|
|
73
|
+
if (arch === 'arm64') {
|
|
74
|
+
return isMusl
|
|
75
|
+
? { target: 'aarch64-unknown-linux-musl', ext: 'tar.gz' }
|
|
76
|
+
: { target: 'aarch64-unknown-linux-gnu', ext: 'tar.gz' }
|
|
77
|
+
}
|
|
78
|
+
throw new Error(`Unsupported Linux arch: ${arch}`)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
throw new Error(`Unsupported platform: ${platform}`)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function detectMusl() {
|
|
85
|
+
const muslArch = process.arch === 'x64' ? 'x86_64' : 'aarch64'
|
|
86
|
+
try {
|
|
87
|
+
statSync(`/lib/libc.musl-${muslArch}.so.1`)
|
|
88
|
+
return true
|
|
89
|
+
} catch {
|
|
90
|
+
return false
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// --- Paths ---
|
|
95
|
+
|
|
96
|
+
function getVendorDir() {
|
|
97
|
+
if (existsSync(path.join(projectRoot, 'src'))) {
|
|
98
|
+
return path.resolve(projectRoot, 'src', 'utils', 'vendor', 'ripgrep')
|
|
99
|
+
}
|
|
100
|
+
return path.resolve(projectRoot, 'dist', 'vendor', 'ripgrep')
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function getBinaryPath() {
|
|
104
|
+
const dir = getVendorDir()
|
|
105
|
+
const subdir = `${process.arch}-${process.platform}`
|
|
106
|
+
const binary = process.platform === 'win32' ? 'rg.exe' : 'rg'
|
|
107
|
+
return path.resolve(dir, subdir, binary)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// --- Download helpers ---
|
|
111
|
+
|
|
112
|
+
function proxyEnvSet() {
|
|
113
|
+
const v = s => (s ?? '').trim()
|
|
114
|
+
return !!(
|
|
115
|
+
v(process.env.HTTPS_PROXY) ||
|
|
116
|
+
v(process.env.HTTP_PROXY) ||
|
|
117
|
+
v(process.env.ALL_PROXY) ||
|
|
118
|
+
v(process.env.https_proxy) ||
|
|
119
|
+
v(process.env.http_proxy)
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function tryPowerShellDownload(url, dest) {
|
|
124
|
+
const u = url.replace(/'/g, "''")
|
|
125
|
+
const d = dest.replace(/'/g, "''")
|
|
126
|
+
const cmd = `Invoke-WebRequest -Uri '${u}' -OutFile '${d}' -UseBasicParsing`
|
|
127
|
+
const result = spawnSync(
|
|
128
|
+
'powershell.exe',
|
|
129
|
+
[
|
|
130
|
+
'-NoProfile',
|
|
131
|
+
'-NonInteractive',
|
|
132
|
+
'-ExecutionPolicy',
|
|
133
|
+
'Bypass',
|
|
134
|
+
'-Command',
|
|
135
|
+
cmd,
|
|
136
|
+
],
|
|
137
|
+
{ stdio: 'pipe', windowsHide: true },
|
|
138
|
+
)
|
|
139
|
+
return result.status === 0 && existsSync(dest) && statSync(dest).size > 0
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function tryCurlDownload(url, dest) {
|
|
143
|
+
const curl = process.platform === 'win32' ? 'curl.exe' : 'curl'
|
|
144
|
+
const result = spawnSync(curl, ['-fsSL', '-L', '--fail', '-o', dest, url], {
|
|
145
|
+
stdio: 'pipe',
|
|
146
|
+
windowsHide: true,
|
|
147
|
+
})
|
|
148
|
+
return result.status === 0 && existsSync(dest) && statSync(dest).size > 0
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
async function fetchRelease(url) {
|
|
152
|
+
if (proxyEnvSet()) {
|
|
153
|
+
// Dynamic require so it works in node without bundling issues
|
|
154
|
+
const undici = require('undici')
|
|
155
|
+
return await undici.fetch(url, {
|
|
156
|
+
redirect: 'follow',
|
|
157
|
+
dispatcher: new undici.EnvHttpProxyAgent(),
|
|
158
|
+
})
|
|
159
|
+
}
|
|
160
|
+
// Node 18+ has global fetch, Bun has it too
|
|
161
|
+
return await fetch(url, { redirect: 'follow' })
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
async function downloadUrlToBuffer(url) {
|
|
165
|
+
const response = await fetchRelease(url)
|
|
166
|
+
if (!response.ok) {
|
|
167
|
+
throw new Error(
|
|
168
|
+
`Download failed: ${response.status} ${response.statusText}`,
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
return Buffer.from(await response.arrayBuffer())
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
async function downloadUrlToBufferWithFallback(url) {
|
|
175
|
+
let firstError
|
|
176
|
+
try {
|
|
177
|
+
return await downloadUrlToBuffer(url)
|
|
178
|
+
} catch (e) {
|
|
179
|
+
firstError = e
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const tmpRoot = path.join(
|
|
183
|
+
os.tmpdir(),
|
|
184
|
+
`ripgrep-dl-${process.pid}-${Date.now()}`,
|
|
185
|
+
)
|
|
186
|
+
const tmpFile = path.join(tmpRoot, 'archive')
|
|
187
|
+
mkdirSync(tmpRoot, { recursive: true })
|
|
188
|
+
try {
|
|
189
|
+
if (process.platform === 'win32' && tryPowerShellDownload(url, tmpFile)) {
|
|
190
|
+
return readFileSync(tmpFile)
|
|
191
|
+
}
|
|
192
|
+
if (tryCurlDownload(url, tmpFile)) {
|
|
193
|
+
return readFileSync(tmpFile)
|
|
194
|
+
}
|
|
195
|
+
} finally {
|
|
196
|
+
rmSync(tmpRoot, { recursive: true, force: true })
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
throw firstError
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// --- Extract ---
|
|
203
|
+
|
|
204
|
+
function findZipEntryKey(files, want) {
|
|
205
|
+
return Object.keys(files).find(k => {
|
|
206
|
+
const norm = k.replace(/\\/g, '/')
|
|
207
|
+
return norm === want || norm.endsWith(`/${want}`)
|
|
208
|
+
})
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
async function extractZip(buffer, binaryPath, extractedBinary) {
|
|
212
|
+
const binaryDir = path.dirname(binaryPath)
|
|
213
|
+
// Try fflate first (bundled dep)
|
|
214
|
+
let fflateError
|
|
215
|
+
try {
|
|
216
|
+
const { unzipSync } = require('fflate')
|
|
217
|
+
const unzipped = unzipSync(new Uint8Array(buffer))
|
|
218
|
+
const key = findZipEntryKey(unzipped, extractedBinary)
|
|
219
|
+
if (!key) {
|
|
220
|
+
throw new Error(`Binary ${extractedBinary} not found in zip`)
|
|
221
|
+
}
|
|
222
|
+
writeFileSync(binaryPath, Buffer.from(unzipped[key]))
|
|
223
|
+
return
|
|
224
|
+
} catch (e) {
|
|
225
|
+
fflateError = e
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Fallback: PowerShell Expand-Archive or unzip CLI
|
|
229
|
+
const tmpDir = path.join(binaryDir, '.tmp-download')
|
|
230
|
+
rmSync(tmpDir, { recursive: true, force: true })
|
|
231
|
+
mkdirSync(tmpDir, { recursive: true })
|
|
232
|
+
try {
|
|
233
|
+
const assetName = `archive.zip`
|
|
234
|
+
const archivePath = path.join(tmpDir, assetName)
|
|
235
|
+
writeFileSync(archivePath, buffer)
|
|
236
|
+
|
|
237
|
+
let extracted = false
|
|
238
|
+
if (process.platform === 'win32') {
|
|
239
|
+
const psCmd = `Expand-Archive -Path '${archivePath.replace(/'/g, "''")}' -DestinationPath '${tmpDir.replace(/'/g, "''")}' -Force`
|
|
240
|
+
const psResult = spawnSync(
|
|
241
|
+
'powershell.exe',
|
|
242
|
+
[
|
|
243
|
+
'-NoProfile',
|
|
244
|
+
'-NonInteractive',
|
|
245
|
+
'-ExecutionPolicy',
|
|
246
|
+
'Bypass',
|
|
247
|
+
'-Command',
|
|
248
|
+
psCmd,
|
|
249
|
+
],
|
|
250
|
+
{ stdio: 'pipe', windowsHide: true },
|
|
251
|
+
)
|
|
252
|
+
if (psResult.status === 0) {
|
|
253
|
+
extracted = true
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if (!extracted) {
|
|
258
|
+
const result = spawnSync('unzip', ['-o', archivePath, '-d', tmpDir], {
|
|
259
|
+
stdio: 'pipe',
|
|
260
|
+
})
|
|
261
|
+
if (result.status !== 0) {
|
|
262
|
+
const unzipErr = result.stderr?.toString().trim() || 'command not found'
|
|
263
|
+
const fflateMsg =
|
|
264
|
+
fflateError instanceof Error
|
|
265
|
+
? fflateError.message
|
|
266
|
+
: String(fflateError)
|
|
267
|
+
throw new Error(
|
|
268
|
+
`zip extraction failed (fflate: ${fflateMsg}; unzip: ${unzipErr})`,
|
|
269
|
+
)
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const srcBinary = path.join(tmpDir, extractedBinary)
|
|
274
|
+
if (!existsSync(srcBinary)) {
|
|
275
|
+
throw new Error(`Binary not found at expected path: ${srcBinary}`)
|
|
276
|
+
}
|
|
277
|
+
renameSync(srcBinary, binaryPath)
|
|
278
|
+
} finally {
|
|
279
|
+
rmSync(tmpDir, { recursive: true, force: true })
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
async function extractTarGz(buffer, binaryPath, extractedBinary, assetName) {
|
|
284
|
+
const binaryDir = path.dirname(binaryPath)
|
|
285
|
+
const tmpDir = path.join(binaryDir, '.tmp-download')
|
|
286
|
+
rmSync(tmpDir, { recursive: true, force: true })
|
|
287
|
+
mkdirSync(tmpDir, { recursive: true })
|
|
288
|
+
try {
|
|
289
|
+
const archivePath = path.join(tmpDir, assetName)
|
|
290
|
+
writeFileSync(archivePath, buffer)
|
|
291
|
+
const result = spawnSync('tar', ['xzf', archivePath, '-C', tmpDir], {
|
|
292
|
+
stdio: 'pipe',
|
|
293
|
+
})
|
|
294
|
+
if (result.status !== 0) {
|
|
295
|
+
throw new Error(`tar extract failed: ${result.stderr?.toString()}`)
|
|
296
|
+
}
|
|
297
|
+
const srcBinary = path.join(tmpDir, extractedBinary)
|
|
298
|
+
if (!existsSync(srcBinary)) {
|
|
299
|
+
throw new Error(`Binary not found at expected path: ${srcBinary}`)
|
|
300
|
+
}
|
|
301
|
+
renameSync(srcBinary, binaryPath)
|
|
302
|
+
} finally {
|
|
303
|
+
rmSync(tmpDir, { recursive: true, force: true })
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// --- Main ---
|
|
308
|
+
|
|
309
|
+
async function downloadAndExtract() {
|
|
310
|
+
const { target, ext } = getPlatformMapping()
|
|
311
|
+
const assetName = `ripgrep-v${RG_VERSION}-${target}.${ext}`
|
|
312
|
+
|
|
313
|
+
const binaryPath = getBinaryPath()
|
|
314
|
+
const binaryDir = path.dirname(binaryPath)
|
|
315
|
+
|
|
316
|
+
const force = process.argv.includes('--force')
|
|
317
|
+
if (!force && existsSync(binaryPath)) {
|
|
318
|
+
const stat = statSync(binaryPath)
|
|
319
|
+
if (stat.size > 0) {
|
|
320
|
+
console.log(`[ripgrep] Binary already exists at ${binaryPath}, skipping.`)
|
|
321
|
+
return
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
console.log(`[ripgrep] Downloading v${RG_VERSION} for ${target}...`)
|
|
326
|
+
|
|
327
|
+
const extractedBinary = process.platform === 'win32' ? 'rg.exe' : 'rg'
|
|
328
|
+
|
|
329
|
+
const mirrors = [RELEASE_BASE]
|
|
330
|
+
if (RELEASE_BASE === DEFAULT_RELEASE_BASE.replace(/\/$/, '')) {
|
|
331
|
+
mirrors.push(MIRROR_RELEASE_BASE.replace(/\/$/, ''))
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
let buffer
|
|
335
|
+
let lastError
|
|
336
|
+
for (const base of mirrors) {
|
|
337
|
+
const url = `${base}/${assetName}`
|
|
338
|
+
try {
|
|
339
|
+
console.log(`[ripgrep] Trying ${url}`)
|
|
340
|
+
buffer = await downloadUrlToBufferWithFallback(url)
|
|
341
|
+
break
|
|
342
|
+
} catch (e) {
|
|
343
|
+
console.warn(
|
|
344
|
+
`[ripgrep] Download from ${base} failed: ${e instanceof Error ? e.message : e}`,
|
|
345
|
+
)
|
|
346
|
+
lastError = e
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
if (!buffer) {
|
|
350
|
+
throw lastError
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
try {
|
|
354
|
+
console.log(`[ripgrep] Downloaded ${Math.round(buffer.length / 1024)} KB`)
|
|
355
|
+
|
|
356
|
+
mkdirSync(binaryDir, { recursive: true })
|
|
357
|
+
|
|
358
|
+
if (ext === 'tar.gz') {
|
|
359
|
+
await extractTarGz(buffer, binaryPath, extractedBinary, assetName)
|
|
360
|
+
} else {
|
|
361
|
+
await extractZip(buffer, binaryPath, extractedBinary)
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
if (process.platform !== 'win32') {
|
|
365
|
+
chmodSync(binaryPath, 0o755)
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
console.log(`[ripgrep] Installed to ${binaryPath}`)
|
|
369
|
+
} catch (e) {
|
|
370
|
+
const msg = e instanceof Error ? e.message : String(e)
|
|
371
|
+
const hint =
|
|
372
|
+
'Check network or set HTTPS_PROXY. If GitHub is blocked, set RIPGREP_DOWNLOAD_BASE to a mirror (see script header).'
|
|
373
|
+
throw new Error(`${msg} ${hint}`)
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
async function main() {
|
|
378
|
+
await downloadAndExtract()
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
main().catch(error => {
|
|
382
|
+
const msg = error instanceof Error ? error.message : String(error)
|
|
383
|
+
console.error(`[postinstall] ripgrep download failed (non-fatal): ${msg}`)
|
|
384
|
+
console.error(
|
|
385
|
+
`[postinstall] You can install ripgrep manually: https://github.com/BurntSushi/ripgrep#installation`,
|
|
386
|
+
)
|
|
387
|
+
// Never exit with error code — postinstall must not break install
|
|
388
|
+
process.exit(0)
|
|
389
|
+
})
|