@readmagic/workmate 0.0.20 → 0.0.21
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-DgAxYgBY.js +1 -0
- package/dist/chunks/AgentsMdExternalIncludesDialog-DGMRVexR.js +1 -0
- package/dist/chunks/AgentsMdExternalIncludesDialog-Dp6CwZyI.js +1 -0
- package/dist/chunks/App-VWyPd524.js +1 -0
- package/dist/chunks/ApproveApiKey-Bolw0sPs.js +1 -0
- package/dist/chunks/ApproveApiKey-CyNPMd6g.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-DxagIOOw.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-OS2S66zQ.js +1 -0
- package/dist/chunks/{DiffDialog-DCpchgp5.js → DiffDialog-CMtml9iw.js} +3 -3
- package/dist/chunks/Doctor-Bk9P37mU.js +1 -0
- package/dist/chunks/Doctor-D9F3tKsr.js +3 -0
- package/dist/chunks/ExitFlow-DhRv5JPj.js +2 -0
- package/dist/chunks/{Grove-Dd6rjs5P.js → Grove-Bbh8PpH0.js} +1 -1
- package/dist/chunks/{HybridTransport-CJVkWa2u.js → HybridTransport-P1vEUwhv.js} +1 -1
- package/dist/chunks/InvalidConfigDialog-xAYpE-20.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-CXFSISy3.js +1 -0
- package/dist/chunks/MCPConnectionManager-CoId-C__.js +1 -0
- package/dist/chunks/MCPToolListView-BQkQ-hyF.js +1 -0
- package/dist/chunks/McpParsingWarnings-6ENzOklf.js +1 -0
- package/dist/chunks/MessageSelector-BvRVrfg6.js +3 -0
- package/dist/chunks/Messages-Cykztq1O.js +10 -0
- package/dist/chunks/Onboarding-CfeRwPNQ.js +1 -0
- package/dist/chunks/PermissionDialog-BaibiQae.js +1 -0
- package/dist/chunks/PressEnterToContinue-DZc_s_pE.js +1 -0
- package/dist/chunks/PromptInputFooterSuggestions-Blzgj5yW.js +1 -0
- package/dist/chunks/PromptInputHelpMenu-Ckp0k8E3.js +1 -0
- package/dist/chunks/QueryEngine-DduzztIG.js +1 -0
- package/dist/chunks/REPL-B8e5UU3H.js +128 -0
- package/dist/chunks/REPL-C4mbOhyL.js +1 -0
- package/dist/chunks/{RemoteSessionManager-BfsOv4K6.js → RemoteSessionManager-BPESC6Wu.js} +2 -2
- package/dist/chunks/ResumeConversation-DG1sLryB.js +1 -0
- package/dist/chunks/{SSETransport-B3K6eH9I.js → SSETransport-CDNP2PlK.js} +1 -1
- package/dist/chunks/{SearchBox-CwwV0W-w.js → SearchBox-C9xxQzh1.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-vK2PP628.js +1 -0
- package/dist/chunks/Settings-B7n_dfP-.js +2 -0
- package/dist/chunks/TeleportProgress-QL3ibQfK.js +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-f-xl7biD.js +1 -0
- package/dist/chunks/TeleportResumeWrapper-DzVcrFuP.js +1 -0
- package/dist/chunks/ThemePicker-CIFKZza0.js +1 -0
- package/dist/chunks/TrustDialog-C0HEwZPk.js +1 -0
- package/dist/chunks/{ValidationErrorsList-BfZ5gcIv.js → ValidationErrorsList-2QWIs_6h.js} +1 -1
- package/dist/chunks/add-dir-DmEhPnvj.js +1 -0
- package/dist/chunks/{agentDisplay-BM4QG_RX.js → agentDisplay-1Y-N-gqz.js} +1 -1
- package/dist/chunks/{agents-BbDBN5l9.js → agents-CvW8XjoJ.js} +1 -1
- package/dist/chunks/agents-D96ng5I9.js +101 -0
- package/dist/chunks/allErrors-CT2dbBF3.js +1 -0
- package/dist/chunks/{api-DyUWfg3a.js → api-DTyrmy1O.js} +1 -1
- package/dist/chunks/api-DumFOErN.js +1 -0
- package/dist/chunks/{auth-0rn1U4Eq.js → auth-CZ4EsFWF.js} +1 -1
- package/dist/chunks/auth-QvonHoG9.js +1 -0
- package/dist/chunks/auth-jV5THRH8.js +1 -0
- package/dist/chunks/backgroundHousekeeping-C72oPgfD.js +17 -0
- package/dist/chunks/backgroundHousekeeping-D9PScHES.js +1 -0
- package/dist/chunks/{banner-BkUdig-T.js → banner-ChT5Ri7Q.js} +1 -1
- package/dist/chunks/{bg-tGgpwpYx.js → bg-qG2osBbP.js} +2 -2
- package/dist/chunks/{branch-CQ38cx5n.js → branch-K8X6jx0i.js} +1 -1
- package/dist/chunks/{break-cache-CcwOjTKt.js → break-cache-BZ_UMtEL.js} +1 -1
- package/dist/chunks/{bridgeConfig-C5L-7KaP.js → bridgeConfig-C-bI-slm.js} +1 -1
- package/dist/chunks/bridgeConfig-_xpxhGB5.js +1 -0
- package/dist/chunks/{bridgeMessaging-DVC3qj-C.js → bridgeMessaging-DSJlYarJ.js} +1 -1
- package/dist/chunks/{bridgeStatusUtil-Cex6VowM.js → bridgeStatusUtil-DaEq5c69.js} +1 -1
- package/dist/chunks/btw-BNs5OX7x.js +1 -0
- package/dist/chunks/caches-CC5NHwAz.js +1 -0
- package/dist/chunks/caches-nHxJWXgO.js +1 -0
- package/dist/chunks/{ccrClient-DO563xlf.js → ccrClient-JnhF5b3z.js} +1 -1
- package/dist/chunks/{clear-DmqQBNKg.js → clear-D2KRoibg.js} +1 -1
- package/dist/chunks/client-BtTkq0YS.js +1 -0
- package/dist/chunks/commands-C_rYjyQZ.js +1 -0
- package/dist/chunks/compact-Cqd6vKpn.js +2 -0
- package/dist/chunks/config-Be0BkAAr.js +1 -0
- package/dist/chunks/{config-DRy1I12M.js → config-DUTgj3js.js} +1 -1
- package/dist/chunks/{config-e0Goy478.js → config-DoEDgAfv.js} +1 -1
- package/dist/chunks/context-Db9tH1VF.js +1 -0
- package/dist/chunks/{context-noninteractive-BzDVMnWC.js → context-noninteractive-CacA9VlT.js} +2 -2
- package/dist/chunks/context-noninteractive-D9tJYwi7.js +1 -0
- package/dist/chunks/conversation-DWfE4KGH.js +1 -0
- package/dist/chunks/conversation-Tvo4EDpQ.js +1 -0
- package/dist/chunks/convert-legacy-node-http-options-BZnGSjx2.js +1 -0
- package/dist/chunks/{createSSHSession-LVGVXHXL.js → createSSHSession-BQ83MMtr.js} +1 -1
- package/dist/chunks/createSession-CqHnHhCR.js +1 -0
- package/dist/chunks/{createSession-Dgwxk1WA.js → createSession-DqTtBycR.js} +1 -1
- package/dist/chunks/crossProjectResume-DIXtiODF.js +40 -0
- package/dist/chunks/{datadog-Bc6wkPne.js → datadog-BuElf2EQ.js} +1 -1
- package/dist/chunks/detectRepository-DUJBh5s2.js +1 -0
- package/dist/chunks/{detectRepository-CDOJ-M7h.js → detectRepository-pRAVv8SH.js} +1 -1
- package/dist/chunks/{diff-DIg66U_d.js → diff-yA6v_dpP.js} +1 -1
- package/dist/chunks/{directoryCompletion-BDGcGDuv.js → directoryCompletion-CuA3_YIT.js} +1 -1
- package/dist/chunks/doctor-eNAm6OiS.js +1 -0
- package/dist/chunks/{entry-B-Y-AYeK.js → entry-DidpiR-D.js} +5 -5
- package/dist/chunks/esm-0CwQE5CJ.js +10 -0
- package/dist/chunks/esm-BCUC71kt.js +1 -0
- package/dist/chunks/esm-BCmY8V0C.js +1 -0
- package/dist/chunks/esm-BUJtY-Rb.js +1 -0
- package/dist/chunks/esm-BadZVa27.js +1 -0
- package/dist/chunks/esm-BbMeEYcz.js +1 -0
- package/dist/chunks/esm-sVMjGuep.js +1 -0
- package/dist/chunks/execFileNoThrow-B_KRY4cT.js +34 -0
- package/dist/chunks/exit-DywUeiYd.js +1 -0
- package/dist/chunks/extraUsage-DiAirtuk.js +1 -0
- package/dist/chunks/extractMemories-_xiTnX95.js +1 -0
- package/dist/chunks/fast-DCXZACT9.js +1 -0
- package/dist/chunks/fast-Qo4WVqiW.js +1 -0
- package/dist/chunks/{fetchModelList-Dy-x4h3G.js → fetchModelList-fQDsmR3E.js} +1 -1
- package/dist/chunks/fetchModelList-woVzIVde.js +1 -0
- package/dist/chunks/{fileSuggestions-CFkJktgc.js → fileSuggestions-CRx1D6uk.js} +3 -3
- package/dist/chunks/firstPartyEventLogger-B261Wksn.js +3 -0
- package/dist/chunks/firstPartyEventLogger-DtFTeHy-.js +1 -0
- package/dist/chunks/{flushGate-BjKW7PFC.js → flushGate-BA8dSr0i.js} +1 -1
- package/dist/chunks/fpsMetrics-wxj9GAsd.js +1 -0
- package/dist/chunks/{gemini-NnmxBoEp.js → gemini-BXAyy1JN.js} +1 -1
- package/dist/chunks/generateSessionName-Cwmk2N3F.js +1 -0
- package/dist/chunks/{genericProcessUtils-6E7fB1dI.js → genericProcessUtils-Cnyun_Wr.js} +3 -3
- package/dist/chunks/{git-By_J4XJL.js → git-Wid-XppW.js} +1 -1
- package/dist/chunks/git-hO-TMvXc.js +1 -0
- package/dist/chunks/{githubRepoPathMapping-CzgPGOHQ.js → githubRepoPathMapping-OV8U1VFK.js} +1 -1
- package/dist/chunks/goal-C9clrwEH.js +3 -0
- package/dist/chunks/{grok-BxZ4vTDw.js → grok-CjeCecsZ.js} +1 -1
- package/dist/chunks/{grove-CYE1Cfcz.js → grove-DqTnK9nn.js} +2 -2
- package/dist/chunks/help-Bb6LdzXK.js +1 -0
- package/dist/chunks/{hooks-7iyENdDG.js → hooks-BDgToO1Z.js} +2 -2
- package/dist/chunks/hooks-BX2s7aoL.js +1 -0
- package/dist/chunks/{initReplBridge-BEZW5PEY.js → initReplBridge-D7cuY_os.js} +1 -1
- package/dist/chunks/install-eCA8UACi.js +1 -0
- package/dist/chunks/{instrumentation-2HH15DPu.js → instrumentation-BaRKojJh.js} +6 -6
- package/dist/chunks/{job-CXz7SLZp.js → job-DYMfSglZ.js} +1 -1
- package/dist/chunks/{jwtUtils-C_LG1txt.js → jwtUtils-JE2okZ70.js} +1 -1
- package/dist/chunks/keybindings-iBqc1KHL.js +1 -0
- package/dist/chunks/launchLocalMemory-IZPGEzMk.js +3 -0
- package/dist/chunks/launchOnboarding-BeNf51Ig.js +8 -0
- package/dist/chunks/loadAgentsDir-Bpke9CtB.js +1 -0
- package/dist/chunks/{loadAgentsDir-DaNpxaO-.js → loadAgentsDir-C96o6gCj.js} +576 -576
- package/dist/chunks/loadPluginHooks-0nGlugZ4.js +1 -0
- package/dist/chunks/{localSearch-C2SZ9bGW.js → localSearch-DLz5IGGu.js} +1 -1
- package/dist/chunks/localSearch-dodgnjGn.js +1 -0
- package/dist/chunks/logoUtils-Cg_6QV1Z.js +1 -0
- package/dist/chunks/{magicDocs-CrTwULyJ.js → magicDocs-DmPNMnNY.js} +2 -2
- package/dist/chunks/{main-Blm02_Js.js → main-7ssnA9Yb.js} +2 -2
- package/dist/chunks/{main-bJXadFi0.js → main-BEv6MqMX.js} +34 -34
- package/dist/chunks/{managedEnv-CUsdYhAI.js → managedEnv-CHYvwXBH.js} +1 -1
- package/dist/chunks/managedEnv-CbjOQmEe.js +1 -0
- package/dist/chunks/mappers-D8VLUZ2N.js +1 -0
- package/dist/chunks/mcp-BUn3yqsT.js +1 -0
- package/dist/chunks/mcp-BskLq9iP.js +2 -0
- package/dist/chunks/mcp-C-0DMaXx.js +6 -0
- package/dist/chunks/memory-vDkJM58W.js +1 -0
- package/dist/chunks/modalContext-DDZdU1J8.js +1 -0
- package/dist/chunks/mode-Dbh21H2Y.js +2 -0
- package/dist/chunks/model-BaMclMXn.js +1 -0
- package/dist/chunks/model-atn3_JBi.js +1 -0
- package/dist/chunks/model-vS1Iewyq.js +1 -0
- package/dist/chunks/{modelOptions-B3nis9cC.js → modelOptions-Cw1ThINb.js} +1 -1
- package/dist/chunks/nativeInstaller-CfZ5uNTh.js +1 -0
- package/dist/chunks/omit-B7eQ9q0x.js +1 -0
- package/dist/chunks/{onChangeAppState-vKml_lit.js → onChangeAppState-kEAt8nxV.js} +1 -1
- package/dist/chunks/{openai-DdupGVdC.js → openai-wh8AX5iz.js} +3 -3
- package/dist/chunks/panel-Cm23FDVt.js +1 -0
- package/dist/chunks/{partition-BivH9MBJ.js → partition-CENvOfiS.js} +1 -1
- package/dist/chunks/permissions-ChuIx-d4.js +3 -0
- package/dist/chunks/{pidLock-DiKz5Tza.js → pidLock-C1hmh3YQ.js} +2 -2
- package/dist/chunks/plan-s228H7IU.js +1 -0
- package/dist/chunks/plugin-DVBEWwMP.js +17 -0
- package/dist/chunks/{pluginAutoupdate-C2xTKLR_.js → pluginAutoupdate-aLXhSUVD.js} +1 -1
- package/dist/chunks/pluginBlocklist-BprCv0En.js +1 -0
- package/dist/chunks/pluginCliCommands-WzzqR1Sr.js +1 -0
- package/dist/chunks/{pluginFlagging-DRA0m76J.js → pluginFlagging-BSLuTk3M.js} +1 -1
- package/dist/chunks/pluginOperations-Ca9Lup5G.js +2 -0
- package/dist/chunks/pluginStartupCheck-DdtxcNwH.js +1 -0
- package/dist/chunks/{pluginStartupCheck-BF1N4Lih.js → pluginStartupCheck-xQbHZ5gf.js} +1 -1
- package/dist/chunks/plugins-DdIaXpNb.js +4 -0
- package/dist/chunks/{poorMode-CKQfWf3S.js → poorMode-Bt_A2arj.js} +1 -1
- package/dist/chunks/poorMode-ZIq2oz7q.js +1 -0
- package/dist/chunks/print-vxrRE1O2.js +14 -0
- package/dist/chunks/processBashCommand-ISucgwpi.js +1 -0
- package/dist/chunks/processSlashCommand-BnpXO_fI.js +5 -0
- package/dist/chunks/prompt-2AA5W7EH.js +1 -0
- package/dist/chunks/prompt-AXiS2LoO.js +1 -0
- package/dist/chunks/{prompt-8u06WVES.js → prompt-BNNE5tsG.js} +1 -1
- package/dist/chunks/promptEditor-DT6egmcb.js +4 -0
- package/dist/chunks/{protocolHandler-DzHVaPl3.js → protocolHandler-DukQ6b4Q.js} +1 -1
- package/dist/chunks/{reconciler-RIKmaPg7.js → reconciler-D3zyJCnV.js} +1 -1
- package/dist/chunks/refresh-BSG0t4cf.js +1 -0
- package/dist/chunks/{registerProtocol-C0IlPEoa.js → registerProtocol-BOEYaX-X.js} +1 -1
- package/dist/chunks/{reload-plugins-DC-tbXVv.js → reload-plugins-BFMRhbv8.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-NGTnhQgw.js → remoteBridgeCore-D5OwvmAz.js} +1 -1
- package/dist/chunks/{remoteManagedSettings-BoOYHzYP.js → remoteManagedSettings-DyGVvvcW.js} +1 -1
- package/dist/chunks/rename-BrEwj3Xw.js +1 -0
- package/dist/chunks/resume-DR5JbICs.js +2 -0
- package/dist/chunks/{ripgrep-C3jtZL7k.js → ripgrep-Dt4a91S5.js} +1 -1
- package/dist/chunks/ripgrep-KTOU5s9J.js +1 -0
- package/dist/chunks/{runtimeObserver-L6041elO.js → runtimeObserver-CsZw5XBt.js} +2 -2
- package/dist/chunks/{runtimeObserver-DzesbvgI.js → runtimeObserver-DS1PK6We.js} +1 -1
- package/dist/chunks/sandbox-adapter-BqDyWcol.js +1 -0
- package/dist/chunks/sandbox-toggle-B9f_0NQI.js +1 -0
- package/dist/chunks/searchExtraTools-2pIT2C8u.js +1 -0
- package/dist/chunks/session-wkRTfdo8.js +2 -0
- package/dist/chunks/sessionFileAccessHooks-DV22q9JO.js +1 -0
- package/dist/chunks/sessionObserver-BLJg0qm_.js +1 -0
- package/dist/chunks/{sessionObserver-0D8xFoRK.js → sessionObserver-N7fORFdL.js} +2 -2
- package/dist/chunks/{sessionState-CQhbGfmh.js → sessionState-8jutEorw.js} +1 -1
- package/dist/chunks/sessionStorage-DRV7IhZF.js +1 -0
- package/dist/chunks/sessionTracing-fIp8g04N.js +11 -0
- package/dist/chunks/{settings-3xZ0fsvE.js → settings-BowI3jp-.js} +2 -2
- package/dist/chunks/settings-CHn0gJCG.js +1 -0
- package/dist/chunks/settingsSync-DF4JgSNc.js +1 -0
- package/dist/chunks/setup-UiEO9i7F.js +3 -0
- package/dist/chunks/{shadowedRuleDetection-Cy9tsuKc.js → shadowedRuleDetection-DEo1hvGi.js} +1 -1
- package/dist/chunks/{sideQuestion-Ds7Elgs4.js → sideQuestion-C11KgNGL.js} +3 -3
- package/dist/chunks/sinks-DnLqRPEC.js +1 -0
- package/dist/chunks/{sinks-BXX72cbf.js → sinks-mGBiINp8.js} +1 -1
- package/dist/chunks/skillChangeDetector-Dc6YZXJE.js +1 -0
- package/dist/chunks/{skillGapStore-BxCxKPev.js → skillGapStore-H4MkUFUY.js} +2 -2
- package/dist/chunks/{skillLifecycle-CfyNC3sW.js → skillLifecycle-ADUTDK7D.js} +2 -2
- package/dist/chunks/{skillSearchPanel-CMNJFIEC.js → skillSearchPanel-PpfVDMGR.js} +2 -2
- package/dist/chunks/skills-DKtN17ch.js +1 -0
- package/dist/chunks/src-9vmGsuSI.js +1 -0
- package/dist/chunks/{src-CgZmCiiH.js → src-BacxF9BD.js} +2 -2
- package/dist/chunks/{startupProfiler-CbzxVmbv.js → startupProfiler-B90b5vuq.js} +1 -1
- package/dist/chunks/startupProfiler-DG2TN5R_.js +1 -0
- package/dist/chunks/staticRender-BVWx0IM1.js +1 -0
- package/dist/chunks/stats-D4LEtkrw.js +1 -0
- package/dist/chunks/status-0ZBx6Ls0.js +2 -0
- package/dist/chunks/status-BUJ4-omB.js +1 -0
- package/dist/chunks/{statusNoticeHelpers-CZoOse-_.js → statusNoticeHelpers-BrpQWj0l.js} +1 -1
- package/dist/chunks/{stringUtils-CKD8qDqx.js → stringUtils-D7oJIyY2.js} +1 -1
- package/dist/chunks/switcher-D7Ey5uIi.js +1 -0
- package/dist/chunks/{switcher-DQF5ZNal.js → switcher-DWfKi17X.js} +1 -1
- package/dist/chunks/{syncCache-qWJ_VfBo.js → syncCache-DUhciJLz.js} +1 -1
- package/dist/chunks/{tasks-C8pb6ftc.js → tasks-BwSsj2vI.js} +1 -1
- package/dist/chunks/teleport-DwZMevmQ.js +1 -0
- package/dist/chunks/{templateJobs-DJ4dcfcL.js → templateJobs-fiKuu4DK.js} +1 -1
- package/dist/chunks/{terminalSetup-7PdC4fV5.js → terminalSetup-Cte5a4hM.js} +1 -1
- package/dist/chunks/{terminalSetup-kWdZRKWq.js → terminalSetup-a7-BNS4T.js} +1 -1
- package/dist/chunks/theme-CAoGjf2D.js +1 -0
- package/dist/chunks/{tmux-CpGd0Aca.js → tmux-DA06aewY.js} +1 -1
- package/dist/chunks/{toolEventObserver-D2nk8ZbW.js → toolEventObserver-Cq_ZV7x9.js} +1 -1
- package/dist/chunks/toolPool-mdsxlKWR.js +1 -0
- package/dist/chunks/{trustedDevice-CB6rNzl-.js → trustedDevice-C1m--Yjw.js} +1 -1
- package/dist/chunks/trustedDevice-CeDIk_ln.js +1 -0
- package/dist/chunks/{udsClient-U7MEfYj7.js → udsClient-BcwsY0XE.js} +1 -1
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-L5idX6Kz.js +1 -0
- package/dist/chunks/useMainLoopModel-VXeS2EC6.js +1 -0
- package/dist/chunks/useManagePlugins-CAXp5CfH.js +1 -0
- package/dist/chunks/useMergedTools-DYXrPTIA.js +1 -0
- package/dist/chunks/useSearchInput-Bxl4wGcZ.js +1 -0
- package/dist/chunks/useSettingsErrors-sbjsaT7k.js +1 -0
- package/dist/chunks/{userAgent-i-oGzf40.js → userAgent-NbKd-hN7.js} +1 -1
- package/dist/chunks/util-DU63xTwZ.js +1 -0
- package/dist/chunks/validatePlugin-DQ_9OCpP.js +1 -0
- package/dist/chunks/{vim-BagKUX4j.js → vim-xruiCyUd.js} +1 -1
- package/dist/chunks/which-B8rchd8P.js +1 -0
- package/dist/chunks/{workerRegistry-BjxoZ12l.js → workerRegistry-BBgquE8F.js} +2 -2
- package/dist/chunks/worktree-C28I8mFB.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +3 -21
- package/dist/chunks/AddWorkspaceDirectory-BYNvxNrD.js +0 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-BSSz86ER.js +0 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-CMEGV4Md.js +0 -1
- package/dist/chunks/App-W_9d1DjK.js +0 -1
- package/dist/chunks/ApproveApiKey-Bf1Rb8Ql.js +0 -1
- package/dist/chunks/ApproveApiKey-wpdvXpFr.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-lGn1Wj1k.js +0 -2
- package/dist/chunks/BypassPermissionsModeDialog-CjVjyNf8.js +0 -1
- package/dist/chunks/Doctor-6SjW91rd.js +0 -1
- package/dist/chunks/Doctor-FPYTivHw.js +0 -3
- package/dist/chunks/ExitFlow-Dy8_1D8J.js +0 -2
- package/dist/chunks/InvalidConfigDialog-Bisj9ic_.js +0 -1
- package/dist/chunks/InvalidSettingsDialog-DyTPNRQR.js +0 -1
- package/dist/chunks/MCPConnectionManager-DfyoZaiu.js +0 -1
- package/dist/chunks/MCPToolListView-Dioupv8F.js +0 -1
- package/dist/chunks/McpParsingWarnings-BUlgpZAF.js +0 -1
- package/dist/chunks/MessageSelector-D8fylxPg.js +0 -3
- package/dist/chunks/Messages-BZDFMYBT.js +0 -10
- package/dist/chunks/Onboarding-BKLomZYo.js +0 -1
- package/dist/chunks/PermissionDialog-BPhvs5xH.js +0 -1
- package/dist/chunks/PressEnterToContinue-Dwoh6CaW.js +0 -1
- package/dist/chunks/PromptInputFooterSuggestions-DCum89fF.js +0 -1
- package/dist/chunks/PromptInputHelpMenu-DG2lRqis.js +0 -1
- package/dist/chunks/QueryEngine-CyGHpX7M.js +0 -1
- package/dist/chunks/REPL-BDsz8KIx.js +0 -1
- package/dist/chunks/REPL-CCBNfZfs.js +0 -128
- package/dist/chunks/ResumeConversation-pC8NLq0F.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-DYoxHo9T.js +0 -1
- package/dist/chunks/Settings-CKaGmKg2.js +0 -2
- package/dist/chunks/TeleportProgress-CkgSp1cs.js +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-DdO_rECq.js +0 -1
- package/dist/chunks/TeleportResumeWrapper-BeG4N-2z.js +0 -1
- package/dist/chunks/ThemePicker-iD9ufy99.js +0 -1
- package/dist/chunks/TrustDialog-qO5OdQt8.js +0 -1
- package/dist/chunks/add-dir-C4eSVlZ6.js +0 -1
- package/dist/chunks/agents-D3APE_8d.js +0 -101
- package/dist/chunks/allErrors-BkgB7JNK.js +0 -1
- package/dist/chunks/api-BHBK9axp.js +0 -1
- package/dist/chunks/auth-BEoTPSgC.js +0 -1
- package/dist/chunks/auth-BPug7U_u.js +0 -1
- package/dist/chunks/backgroundHousekeeping-D7xAhUaE.js +0 -1
- package/dist/chunks/backgroundHousekeeping-km82qEh0.js +0 -17
- package/dist/chunks/bridgeConfig-CJMjDoaP.js +0 -1
- package/dist/chunks/btw-_P96ffHR.js +0 -1
- package/dist/chunks/caches-DH-q8Fjf.js +0 -1
- package/dist/chunks/caches-Dq0pJFDP.js +0 -1
- package/dist/chunks/client-C19cqYQS.js +0 -1
- package/dist/chunks/commands-BkpqHY9F.js +0 -1
- package/dist/chunks/compact-DuVIvqMu.js +0 -2
- package/dist/chunks/config-DMP6-Ccr.js +0 -1
- package/dist/chunks/context-DjgMzIfe.js +0 -1
- package/dist/chunks/context-noninteractive-DV7bIJCm.js +0 -1
- package/dist/chunks/conversation-BBOE_EoE.js +0 -1
- package/dist/chunks/conversation-WxH5pb2z.js +0 -1
- package/dist/chunks/createSession-BUzna9-E.js +0 -1
- package/dist/chunks/crossProjectResume-6B2NYy8a.js +0 -40
- package/dist/chunks/detectRepository-Cv9-k6dg.js +0 -1
- package/dist/chunks/doctor-BhUmhHQU.js +0 -1
- package/dist/chunks/esm-BYnFh4pG.js +0 -1
- package/dist/chunks/esm-Bx6rTxIs.js +0 -1
- package/dist/chunks/esm-C367Cyo-.js +0 -1
- package/dist/chunks/esm-CXM9jqO_.js +0 -1
- package/dist/chunks/esm-CXczu_-W.js +0 -1
- package/dist/chunks/esm-CXt5K8Xt.js +0 -1
- package/dist/chunks/esm-Cb-L4oAk.js +0 -1
- package/dist/chunks/esm-CvHtYRrr.js +0 -1
- package/dist/chunks/esm-DhRjocaU.js +0 -1
- package/dist/chunks/esm-DklLYEuz.js +0 -1
- package/dist/chunks/esm-IYgGg4wR.js +0 -1
- package/dist/chunks/esm-lyfry1WB.js +0 -10
- package/dist/chunks/execFileNoThrow-Bmb5HEFz.js +0 -34
- package/dist/chunks/exit-CW2eqUrR.js +0 -1
- package/dist/chunks/extraUsage-CkTon7ib.js +0 -1
- package/dist/chunks/extractMemories-CfmbvayQ.js +0 -1
- package/dist/chunks/fast-ByahC7Gw.js +0 -1
- package/dist/chunks/fast-xtIP4u4y.js +0 -1
- package/dist/chunks/fetchModelList-D9aePIPW.js +0 -1
- package/dist/chunks/firstPartyEventLogger-Bt9iG9xk.js +0 -1
- package/dist/chunks/firstPartyEventLogger-DqGSujCz.js +0 -3
- package/dist/chunks/fpsMetrics-Dk_pnSHJ.js +0 -1
- package/dist/chunks/generateSessionName-EpqGW-T2.js +0 -1
- package/dist/chunks/git-zJCasBa6.js +0 -1
- package/dist/chunks/goal-DbS8yJfB.js +0 -3
- package/dist/chunks/help-DatnwM25.js +0 -1
- package/dist/chunks/hooks-DjbqtbUV.js +0 -1
- package/dist/chunks/install-DJukI-kL.js +0 -1
- package/dist/chunks/keybindings-C9l5il16.js +0 -1
- package/dist/chunks/launchLocalMemory-BfGenqj1.js +0 -3
- package/dist/chunks/launchOnboarding-DjMmXeQE.js +0 -8
- package/dist/chunks/loadAgentsDir-DcI-8FQF.js +0 -1
- package/dist/chunks/loadPluginHooks-CGgpcyEC.js +0 -1
- package/dist/chunks/localSearch-CTTwYTU1.js +0 -1
- package/dist/chunks/logoUtils-CbIqOFrX.js +0 -1
- package/dist/chunks/managedEnv-DXeaUDSK.js +0 -1
- package/dist/chunks/mappers-_B-s9fNz.js +0 -1
- package/dist/chunks/mcp-BbbYzWpy.js +0 -6
- package/dist/chunks/mcp-D91sH9a8.js +0 -1
- package/dist/chunks/mcp-Dx-zgUgu.js +0 -2
- package/dist/chunks/memory-BeL7ui9m.js +0 -1
- package/dist/chunks/modalContext-wY9CeN4G.js +0 -1
- package/dist/chunks/mode-D695kgLI.js +0 -2
- package/dist/chunks/model-DX0TtzqX.js +0 -1
- package/dist/chunks/model-Do0f476p.js +0 -1
- package/dist/chunks/model-DpcM8dz5.js +0 -1
- package/dist/chunks/nativeInstaller-CymO8TNe.js +0 -1
- package/dist/chunks/omit-DO61BHZu.js +0 -1
- package/dist/chunks/panel-CVd1dzYl.js +0 -1
- package/dist/chunks/permissions-C9iqR4_N.js +0 -3
- package/dist/chunks/plan-KDN5IGWY.js +0 -1
- package/dist/chunks/plugin-D0rzUb8E.js +0 -17
- package/dist/chunks/pluginBlocklist-xdiUmUpt.js +0 -1
- package/dist/chunks/pluginCliCommands-CIDDvVN7.js +0 -1
- package/dist/chunks/pluginOperations-BEYsarAn.js +0 -2
- package/dist/chunks/pluginStartupCheck-DVkI4pqo.js +0 -1
- package/dist/chunks/plugins-CWWU4BKs.js +0 -4
- package/dist/chunks/poorMode-BTIe8W_H.js +0 -1
- package/dist/chunks/print-B5H2xbBS.js +0 -14
- package/dist/chunks/processBashCommand-EQ9EWaRV.js +0 -1
- package/dist/chunks/processSlashCommand-C4PKNyFT.js +0 -5
- package/dist/chunks/prompt-B9sDzLPK.js +0 -1
- package/dist/chunks/prompt-WsoTRhoh.js +0 -1
- package/dist/chunks/promptEditor-Cr4w-4Bz.js +0 -4
- package/dist/chunks/refresh-CCSCAjgz.js +0 -1
- package/dist/chunks/rename-DS1AmW-F.js +0 -1
- package/dist/chunks/resume-Cf5PSoPw.js +0 -2
- package/dist/chunks/ripgrep-CBUbn6Po.js +0 -1
- package/dist/chunks/sandbox-adapter-Z4Phj31K.js +0 -1
- package/dist/chunks/sandbox-toggle-COZE8Lo4.js +0 -1
- package/dist/chunks/searchExtraTools-CvkRbL2m.js +0 -1
- package/dist/chunks/session-BvA99K4j.js +0 -2
- package/dist/chunks/sessionFileAccessHooks-6XfAf6ke.js +0 -1
- package/dist/chunks/sessionObserver-CRWUBJEY.js +0 -1
- package/dist/chunks/sessionStorage-DqEuxDlb.js +0 -1
- package/dist/chunks/sessionTracing-BoOZsXU2.js +0 -11
- package/dist/chunks/settings-Crx1cI1u.js +0 -1
- package/dist/chunks/settingsSync-rkWmClKS.js +0 -1
- package/dist/chunks/setup-D8L275fT.js +0 -3
- package/dist/chunks/sinks-DMp6uEzM.js +0 -1
- package/dist/chunks/skillChangeDetector-CtithJ4a.js +0 -1
- package/dist/chunks/skills-DXMk-498.js +0 -1
- package/dist/chunks/src-D3yIF9I42.js +0 -1
- package/dist/chunks/src-DQOX_xI1.js +0 -1
- package/dist/chunks/src-Dt5IJd3C.js +0 -1
- package/dist/chunks/src-Dvp6-vB7.js +0 -19
- package/dist/chunks/src-PM8NIIu_.js +0 -1
- package/dist/chunks/startupProfiler-uHetQush.js +0 -1
- package/dist/chunks/staticRender-D9AbnQFr.js +0 -1
- package/dist/chunks/stats-Ce15gc3E.js +0 -1
- package/dist/chunks/status-CFrLuGbf.js +0 -2
- package/dist/chunks/status-D5OCkMZG.js +0 -1
- package/dist/chunks/switcher-AiMcRzoi.js +0 -1
- package/dist/chunks/teleport-Bi_1VFIZ.js +0 -1
- package/dist/chunks/theme-CEKOCSLw.js +0 -1
- package/dist/chunks/toolPool-Df5iUqJ-.js +0 -1
- package/dist/chunks/trustedDevice-DXGePUAC.js +0 -1
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-Bw0mlTT9.js +0 -1
- package/dist/chunks/useMainLoopModel-CIG2cjS2.js +0 -1
- package/dist/chunks/useManagePlugins-MSHw-qHx.js +0 -1
- package/dist/chunks/useMergedTools-Bb-INJa2.js +0 -1
- package/dist/chunks/useSearchInput-QL_VtdJD.js +0 -1
- package/dist/chunks/useSettingsErrors-Dvi6zLCr.js +0 -1
- package/dist/chunks/util-CLQvtXuD.js +0 -1
- package/dist/chunks/validatePlugin-1mTZ3TJR.js +0 -1
- package/dist/chunks/which-BxQ1hpjp.js +0 -1
- package/dist/chunks/worktree-DpksgxdF.js +0 -1
- /package/dist/chunks/{src-DL3w8VPk2.js → src-DL3w8VPk.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-DaDcL9Zw.js";import{CC as t,Gm as n,Km as r,La as i,Rg as a,SC as o,Sa as s,Um as c,Wm as l,Xc as u,Yc as d,mp as f,pp as p,qa as m,va as h,xa as g,zg as _}from"./loadAgentsDir-DaNpxaO-.js";import{I as v,t as y}from"./src-DL3w8VPk2.js";import{t as b}from"./jsx-runtime-Bb4Xn-E0.js";import{A as x,P as S,R as C}from"./debug-D58GQBDG.js";import{h as w,t as T}from"./settings-3xZ0fsvE.js";import{n as E,r as D}from"./analytics-DJobLaWP.js";import{bt as O,yt as k}from"./prompt-8u06WVES.js";import{randomUUID as A}from"crypto";y(),l(),f(),r();var j=b();function M({input:e,progress:t,verbose:r}){return(0,j.jsxs)(v,{flexDirection:`column`,marginTop:1,children:[(0,j.jsx)(p,{addMargin:!1,param:{text:`<bash-input>${e}</bash-input>`,type:`text`}}),t?(0,j.jsx)(n,{fullOutput:t.fullOutput,output:t.output,elapsedTimeSeconds:t.elapsedTimeSeconds,totalLines:t.totalLines,verbose:r}):c.renderToolUseProgressMessage?.([],{verbose:r,tools:[],terminalSize:void 0})]})}C(),E(),o(),i(),w();function N(){return T().defaultShell??`bash`}l(),k(),_();async function P(n,r,i,o,l){let f=O()&&N()===`powershell`;D(`tengu_input_bash`,{powershell:f});let p=s({content:m({inputString:`<bash-input>${n}</bash-input>`,precedingInputBlocks:r})}),_;l({jsx:(0,j.jsx)(M,{input:n,progress:null,verbose:o.options.verbose}),shouldHidePromptInput:!1});try{let r={...o,setToolJSX:e=>{_=e?.jsx}},m=e=>{l({jsx:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(M,{input:n,progress:e.data,verbose:o.options.verbose}),_]}),shouldHidePromptInput:!1,showSpinner:!1})},g=null;f&&(g=(u(),e(d)).PowerShellTool);let v=g??c,y=(g?await g.call({command:n,dangerouslyDisableSandbox:!0},r,void 0,void 0,m):await c.call({command:n,dangerouslyDisableSandbox:!0},r,void 0,void 0,m)).data;if(!y)throw Error(`No result received from shell command`);let b=y.stderr,x=await t(v,{...y,stderr:``},A()),S=typeof x.content==`string`?x.content:a(y.stdout);return{messages:[h(),p,...i,s({content:`<bash-stdout>${S}</bash-stdout><bash-stderr>${a(b)}</bash-stderr>`})],shouldQuery:!1}}catch(e){return e instanceof x?e.interrupted?{messages:[h(),p,g({toolUse:!1}),...i],shouldQuery:!1}:{messages:[h(),p,...i,s({content:`<bash-stdout>${a(e.stdout)}</bash-stdout><bash-stderr>${a(e.stderr)}</bash-stderr>`})],shouldQuery:!1}:{messages:[h(),p,...i,s({content:`<bash-stderr>Command failed: ${a(S(e))}</bash-stderr>`})],shouldQuery:!1}}finally{l(null)}}export{P as processBashCommand};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$_ as t,Ap as n,Aw as r,B as i,BC as a,Bw as o,Cm as s,Ds as c,Dv as l,E as u,Ea as d,Fb as f,Fc as p,Ga as m,Ha as h,Ic as g,Ii as _,La as v,Li as y,Mp as b,Np as x,Of as S,Ow as C,Pb as w,Ra as T,Sa as E,Sf as D,Sm as O,Tf as k,Ti as ee,Ts as A,Uh as j,V as te,VC as ne,Wh as M,Xp as re,Xv as ie,Yp as ae,Zv as oe,b as se,bf as ce,c_ as le,ha as N,ji as ue,jp as de,kf as fe,ki as pe,kp as me,kw as P,lc as he,qa as F,ry as ge,sc as I,tv as L,u_ as _e,uc as ve,va as R,wm as ye,ws as be,wv as xe,xa as Se,xf as Ce,ya as we,zC as Te,zi as z,zw as Ee}from"./loadAgentsDir-DaNpxaO-.js";import{Ut as De,Wn as Oe,ft as ke,t as Ae}from"./state-D5D6QpTX.js";import{E as je,R as Me,c as B,f as Ne,i as V,k as H,u as Pe}from"./debug-D58GQBDG.js";import{Dt as Fe,Et as Ie}from"./settings-3xZ0fsvE.js";import{T as U,o as Le,q as Re,s as W,w as G}from"./log-CZ7ploQm.js";import{n as ze,r as K}from"./analytics-DJobLaWP.js";import{Xr as Be,Zr as Ve,dn as He,fn as Ue}from"./model-Do0f476p.js";import{ct as We,ot as Ge}from"./esm-CvHtYRrr.js";import{E as Ke,T as qe,w as Je}from"./sessionTracing-BoOZsXU2.js";import{randomUUID as q}from"crypto";function Ye(e,t,n,r,i){let a=0;for(let o of Fe){let s=n[o];if(s)for(let n of s)for(let s of n.hooks){let c=s.once?()=>{B(`Removing one-shot hook for event ${o} in skill '${r}'`),x(e,t,o,s)}:void 0;de(e,t,o,n.matcher||``,s,c,i),a++}}a>0&&B(`Registered ${a} hooks from skill '${r}'`)}var Xe=e((()=>{Ie(),V(),b()}));function Ze(e){let t=e.trim();if(!t.startsWith(`/`))return null;let n=t.slice(1).split(` `);if(!n[0])return null;let r=n[0],i=!1,a=1;n.length>1&&n[1]===`(MCP)`&&(r=`${r} (MCP)`,i=!0,a=2);let o=n.slice(a).join(` `);return{commandName:r,args:o,isMcp:i}}var Qe=e((()=>{}));function $e(){return!1}function J(){if(!$e())throw Error(`ToolUseContext.options.allowBackgroundForkedSlashCommands is test-only and cannot be enabled outside NODE_ENV=test.`)}async function et(e,t,i,a,o,c,l){let u=ae(),d=e.pluginInfo?r(e.pluginInfo.repository).marketplace:void 0;K(`tengu_slash_command_forked`,{command_name:e.name,invocation_trigger:`user-slash`,...e.pluginInfo&&{_PROTO_plugin_name:e.pluginInfo.pluginManifest.name,...d&&{_PROTO_marketplace_name:d},...D(e.pluginInfo)}});let{skillContent:f,modifiedGetAppState:p,baseAgent:h,promptMessages:g}=await ve(e,t,i);B(`Executing forked slash command /${e.name} with agent ${h.agentType}`);let _=i.options.allowBackgroundForkedSlashCommands===!0;if(_&&J(),_){let t=w(),r=z(e),a=Be(),o=e=>oe({value:e,mode:`prompt`,priority:`later`,isMeta:!0,skipSlashCommands:!0,workload:a}),d=async()=>{if(!l?.runId)return;let e=await O({runId:l.runId,rootDir:l.rootDir,priority:`later`,workload:a});for(let t of e)ie(t)},f=async e=>{l?.runId&&await s({runId:l.runId,rootDir:l.rootDir,error:e instanceof Error?e.message:String(e)})};return(async()=>{let a=Date.now()+$;for(;Date.now()<a&&i.getAppState().mcp.clients.some(e=>e.type===`pending`);)await Ue(Q);let s=i.options.refreshTools?.()??i.options.tools,l=[];for await(let r of n({agentDefinition:h,promptMessages:g,toolUseContext:{...i,getAppState:p,abortController:t},canUseTool:c,isAsync:!0,querySource:`agent:custom`,model:e.model,availableTools:s,override:{agentId:u}}))l.push(r);let f=I(l,`Command completed`);B(`Background forked command /${r} completed (agent ${u})`),o(`<scheduled-task-result command="/${r}">\n${f}\n</scheduled-task-result>`);try{await d()}catch(e){W(e)}})().catch(async e=>{W(e),o(`<scheduled-task-result command="/${r}" status="failed">\n${e instanceof Error?e.message:String(e)}\n</scheduled-task-result>`),await f(e)}),{messages:[],shouldQuery:!1,command:e,deferAutonomyCompletion:!!l?.runId}}let v=[],y=[],b=`forked-command-${e.name}`,x=0,S=e=>(x++,{type:`progress`,data:{message:e,type:`agent_progress`,prompt:f,agentId:u},parentToolUseID:b,toolUseID:`${b}-${x}`,timestamp:new Date().toISOString(),uuid:q()}),C=()=>{o({jsx:fe(y,{tools:i.options.tools,verbose:!1}),shouldHidePromptInput:!1,shouldContinueAnimation:!0,showSpinner:!0})};C();try{for await(let t of n({agentDefinition:h,promptMessages:g,toolUseContext:{...i,getAppState:p},canUseTool:c,isAsync:!1,querySource:`agent:custom`,model:e.model,availableTools:i.options.tools})){v.push(t);let e=m([t]);if(t.type===`assistant`){let n=xe(t);n>0&&i.setResponseLength(e=>e+n);let r=e[0];r&&r.type===`assistant`&&(y.push(S(t)),C())}if(t.type===`user`){let t=e[0];t&&t.type===`user`&&(y.push(S(t)),C())}}}finally{o(null)}let T=I(v,`Command completed`);return B(`Forked slash command /${e.name} completed with agent ${u}`),{messages:[E({content:F({inputString:`/${z(e)} ${t}`.trim(),precedingInputBlocks:a})}),E({content:`<local-command-stdout>\n${T}\n</local-command-stdout>`})],shouldQuery:!1,command:e,resultText:T}}function tt(e){return!/[^a-zA-Z0-9:\-_]/.test(e)}async function nt(e,t,n,i,a,o,s,c,l,u){let d=Ze(e);if(!d){K(`tengu_input_slash_missing`,{});let e="Commands are in the form `/command [args]`";return{messages:[R(),...i,E({content:F({inputString:e,precedingInputBlocks:t})})],shouldQuery:!1,resultText:e}}let{commandName:f,args:p,isMcp:m}=d,g=m?`mcp`:ee().has(f)?f:`custom`;if(!_(f,a.options.commands)){let n=!1;try{await Pe().stat(`/${f}`),n=!0}catch{}if(tt(f)&&!n){K(`tengu_input_slash_invalid`,{input:f});let e=`Unknown skill: ${f}`;return{messages:[R(),...i,E({content:F({inputString:e,precedingInputBlocks:t})}),...p?[we(`Args from unknown skill: ${p}`,`warning`)]:[]],shouldQuery:!1,resultText:e}}let r=q();return Oe(r),K(`tengu_input_prompt`,{}),qe(`user_prompt`,{prompt_length:String(e.length),prompt:Ke(e),"prompt.id":r}),{messages:[E({content:F({inputString:e,precedingInputBlocks:t}),uuid:s}),...i],shouldQuery:!0}}let{messages:v,shouldQuery:y,allowedTools:b,model:x,command:S,resultText:C,nextInput:w,submitNextInput:O,deferAutonomyCompletion:k}=await rt(f,p,o,a,t,n,c,l,s,u);if(v.length===0){let e={input:g};if(S.type===`prompt`&&S.pluginInfo){let{pluginManifest:t,repository:n}=S.pluginInfo,{marketplace:i}=r(n),a=P(i);e._PROTO_plugin_name=t.name,i&&(e._PROTO_marketplace_name=i),e.plugin_repository=a?n:`third-party`,e.plugin_name=a?t.name:`third-party`,a&&t.version&&(e.plugin_version=t.version),Object.assign(e,D(S.pluginInfo))}return K(`tengu_input_command`,{...e,invocation_trigger:`user-slash`}),{messages:[],shouldQuery:!1,model:x,nextInput:w,submitNextInput:O,deferAutonomyCompletion:k}}if(v.length===2&&v[1].type===`user`&&typeof v[1].message.content==`string`&&v[1].message.content.startsWith(`Unknown command:`))return e.startsWith(`/var`)||e.startsWith(`/tmp`)||e.startsWith(`/private`)||K(`tengu_input_slash_invalid`,{input:f}),{messages:[R(),...v],shouldQuery:y,allowedTools:b,model:x};let A={input:g};if(S.type===`prompt`&&S.pluginInfo){let{pluginManifest:e,repository:t}=S.pluginInfo,{marketplace:n}=r(t),i=P(n);A._PROTO_plugin_name=e.name,n&&(A._PROTO_marketplace_name=n),A.plugin_repository=i?t:`third-party`,A.plugin_name=i?e.name:`third-party`,i&&e.version&&(A.plugin_version=e.version),Object.assign(A,D(S.pluginInfo))}K(`tengu_input_command`,{...A,invocation_trigger:`user-slash`});let j=v.length>0&&v[0]&&T(v[0]);return{messages:y||v.every(h)||j?v:[R(),...v],shouldQuery:y,allowedTools:b,model:x,resultText:C,nextInput:w,submitNextInput:O,deferAutonomyCompletion:k}}async function rt(e,t,n,r,a,o,s,c,l,u){let d=ue(e,r.options.commands);if(d.type===`prompt`&&d.userInvocable!==!1&&Ce(e),d.userInvocable===!1)return{messages:[E({content:F({inputString:`/${e}`,precedingInputBlocks:a})}),E({content:`This skill can only be invoked by Work Mate, not directly by users. Ask Work Mate to use the "${e}" skill for you.`})],shouldQuery:!1,command:d};try{switch(d.type){case`local-jsx`:return new Promise(e=>{let i=!1,o=(n,r)=>{if(i=!0,r?.display===`skip`){e({messages:[],shouldQuery:!1,command:d,nextInput:r?.nextInput,submitNextInput:r?.submitNextInput});return}let o=(r?.metaMessages??[]).map(e=>E({content:e,isMeta:!0})),s=M()&&typeof n==`string`&&n.endsWith(` dismissed`),c=r?.displayArgs??t;e({messages:r?.display===`system`?s?o:[N(Y(d,c)),N(`<local-command-stdout>${n}</local-command-stdout>`),...o]:[E({content:F({inputString:Y(d,c),precedingInputBlocks:a})}),E(n?{content:`<local-command-stdout>${n}</local-command-stdout>`}:{content:`<local-command-stdout>${Ee}</local-command-stdout>`}),...o],shouldQuery:r?.shouldQuery??!1,command:d,nextInput:r?.nextInput,submitNextInput:r?.submitNextInput})};d.load().then(e=>e.call(o,{...r,canUseTool:c},t)).then(t=>{if(t!=null){if(r.options.isNonInteractiveSession){e({messages:[],shouldQuery:!1,command:d});return}i||n({jsx:t,shouldHidePromptInput:!0,showSpinner:!1,isLocalJSXCommand:!0,isImmediate:d.immediate===!0})}}).catch(t=>{W(t),!i&&(i=!0,n({jsx:null,shouldHidePromptInput:!1,clearLocalJSX:!0}),e({messages:[],shouldQuery:!1,command:d}))})});case`local`:{let e=E({content:F({inputString:Y(d,d.isSensitive&&t.trim()?`***`:t),precedingInputBlocks:a})});try{let n=R(),i=await(await d.load()).call(t,r);if(i.type===`skip`)return{messages:[],shouldQuery:!1,command:d};if(i.type===`compact`){let t=[n,e,...i.displayText?[E({content:`<local-command-stdout>${i.displayText}</local-command-stdout>`,timestamp:new Date(Date.now()+100).toISOString()})]:[]],r={...i.compactionResult,messagesToKeep:[...i.compactionResult.messagesToKeep??[],...t]};return L(),{messages:le(r),shouldQuery:!1,command:d}}return{messages:[e,N(`<local-command-stdout>${i.value}</local-command-stdout>`)],shouldQuery:!1,command:d,resultText:i.value}}catch(t){return W(t),{messages:[e,N(`<local-command-stderr>${String(t)}</local-command-stderr>`)],shouldQuery:!1,command:d}}}case`prompt`:try{return d.context===`fork`?await et(d,t,r,a,n,c??i,u):await Z(d,t,r,a,o,l)}catch(e){return e instanceof je?{messages:[E({content:F({inputString:Y(d,t),precedingInputBlocks:a})}),Se({toolUse:!1})],shouldQuery:!1,command:d}:{messages:[E({content:F({inputString:Y(d,t),precedingInputBlocks:a})}),E({content:`<local-command-stderr>${String(e)}</local-command-stderr>`})],shouldQuery:!1,command:d}}}}catch(e){if(e instanceof H)return{messages:[E({content:F({inputString:e.message,precedingInputBlocks:a})})],shouldQuery:!1,command:d};throw e}}function Y(e,t){return d(z(e),t)}function X(e,t=`loading`){return[`<${G}>${e}</${G}>`,`<${U}>${e}</${U}>`,`<skill-format>true</skill-format>`].join(`
|
|
2
|
-
`)}function it(e,t){return[`<${G}>${e}</${G}>`,`<${U}>/${e}</${U}>`,t?`<command-args>${t}</command-args>`:null].filter(Boolean).join(`
|
|
3
|
-
`)}function at(e,t){return e.userInvocable===!1&&(e.loadedFrom===`skills`||e.loadedFrom===`plugin`||e.loadedFrom===`mcp`)?X(e.name,e.progressMessage):it(e.name,t)}async function ot(e,t,n,r,i=[]){let a=pe(e,n);if(!a)throw new H(`Unknown command: ${e}`);if(a.type!==`prompt`)throw Error(`Unexpected ${a.type} command. Expected 'prompt' command. Use /${e} directly in the main conversation.`);return Z(a,t,r,[],i)}async function Z(e,t,n,r=[],i=[],o){let s=await e.getPromptForCommand(t,n),c=!a(`hooks`)||ne(e.source);if(e.hooks&&c){let t=ke();Ye(n.setAppState,t,e.hooks,e.name,e.type===`prompt`?e.skillRoot:void 0)}let l=e.source?`${e.source}:${e.name}`:e.name,d=s.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
4
|
-
|
|
5
|
-
`);Ae(e.name,l,d,Ge()?.agentId??null);let f=at(e,t),p=u(e.allowedTools??[]),m=i.length>0||r.length>0?[...i,...r,...s]:s,h=await g(A(s.filter(e=>e.type===`text`).map(e=>e.text).join(` `),n,null,[],n.messages,`repl_main_thread`,{skipSkillDiscovery:!0}));return{messages:[E({content:f,uuid:o}),E({content:m,isMeta:!0}),...h,be({type:`command_permissions`,allowedTools:p,model:e.model})],shouldQuery:!0,allowedTools:p,model:e.model,command:e}}var Q,$;e((()=>{De(),y(),o(),Re(),ze(),_e(),t(),me(),S(),f(),We(),c(),V(),Me(),he(),Ne(),j(),p(),Xe(),Le(),ge(),v(),se(),te(),C(),Te(),Qe(),He(),ce(),Je(),k(),l(),re(),ye(),Ve(),Q=200,$=1e4}))();export{X as formatSkillLoadingMetadata,ot as processPromptSlashCommand,nt as processSlashCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,r as t}from"./prompt-8u06WVES.js";t();export{e as isDeferredTool};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{lw as e,rw as t}from"./loadAgentsDir-DaNpxaO-.js";e();export{t as clearPromptCache};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{Ad as r,Fd as i,Md as a,Pd as o,fb as s,sb as c,vu as l,yu as u}from"./loadAgentsDir-DaNpxaO-.js";import{Rn as d,t as f}from"./src-DL3w8VPk2.js";import{T as p,c as m,f as h,i as g,u as _,x as v}from"./debug-D58GQBDG.js";import{n as y,t as b}from"./execSyncWrapper-C3ZFV9od.js";import{r as x,t as S}from"./which-BxQ1hpjp.js";import{basename as C}from"path";import{spawn as w,spawnSync as T}from"child_process";function E(e){return!!x(e)}function D(e){let t=C(e.split(` `)[0]??``);return A.find(e=>t.includes(e))}function O(e,t,n){return n?M.has(e)?[`-g`,`${t}:${n}`]:e===`subl`?[`${t}:${n}`]:[t]:[t]}function k(e,t){let n=N();if(!n)return!1;let r=n.split(` `),i=r[0]??n,a=r.slice(1),o=D(n);if(o){let r=O(o,e,t),s={detached:!0,stdio:`ignore`},c;return c=process.platform===`win32`?w(`${n} ${r.map(e=>`"${e}"`).join(` `)}`,{...s,shell:!0}):w(i,[...a,...r],s),c.on(`error`,e=>m(`editor spawn failed: ${e}`,{level:`error`})),c.unref(),!0}let s=d.get(process.stdout);if(!s)return!1;let c=t&&j.test(C(i));s.enterAlternateScreen();try{let r={stdio:`inherit`},o;return o=process.platform===`win32`?T(`${n} ${c?`+${t} `:``}"${e}"`,{...r,shell:!0}):T(i,[...a,...c?[`+${t}`,e]:[e]],r),o.error?(m(`editor spawn failed: ${o.error}`,{level:`error`}),!1):!0}finally{s.exitAlternateScreen()}}var A,j,M,N,P=e((()=>{n(),f(),g(),S(),A=[`code`,`cursor`,`windsurf`,`codium`,`subl`,`atom`,`gedit`,`notepad++`,`notepad`],j=/\b(vi|vim|nvim|nano|emacs|pico|micro|helix|hx)\b/,M=new Set([`code`,`cursor`,`windsurf`,`codium`]),N=t(()=>process.env.VISUAL?.trim()?process.env.VISUAL.trim():process.env.EDITOR?.trim()?process.env.EDITOR.trim():process.platform===`win32`?`start /wait notepad`:[`code`,`vi`,`nano`].find(e=>E(e)))}));function F(e){return D(e)!==void 0}function I(e){let t=_(),n=d.get(process.stdout);if(!n)throw Error(`Ink instance not found - cannot pause rendering`);let r=N();if(!r)return{content:null};try{t.statSync(e)}catch{return{content:null}}let i=!F(r);i?n.enterAlternateScreen():(n.pause(),n.suspendStdin());try{return b(`${z[r]??r} "${e}"`,{stdio:`inherit`}),{content:t.readFileSync(e,{encoding:`utf-8`})}}catch(e){if(typeof e==`object`&&e&&`status`in e&&typeof e.status==`number`){let t=e.status;if(t!==0)return{content:null,error:`${s(r)} exited with code ${t}`}}return{content:null}}finally{i?n.exitAlternateScreen():(n.resumeStdin(),n.resume())}}function L(e,t,n){let r=e;for(let[e,t]of Object.entries(n))if(t.type===`text`){let n=parseInt(e,10),i=t.content,s=r.indexOf(i);if(s!==-1){let e=a(n,o(i));r=r.slice(0,s)+e+r.slice(s+i.length)}}return r}function R(e,t){let n=_(),i=l();try{p(i,t?r(e,t):e,{encoding:`utf-8`,flush:!0});let n=I(i);if(n.content===null)return n;let a=n.content;return a.endsWith(`
|
|
2
|
-
`)&&!a.endsWith(`
|
|
3
|
-
|
|
4
|
-
`)&&(a=a.slice(0,-1)),t&&(a=L(a,e,t)),{content:a}}finally{try{n.unlinkSync(i)}catch{}}}var z,B=e((()=>{i(),f(),P(),y(),h(),c(),v(),u(),z={code:`code -w`,subl:`subl --wait`}}));export{P as a,N as i,R as n,k as o,B as r,I as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Hx as t,Ux as n,_h as r,_s as i,as as a,b_ as o,bh as s,ch as c,co as l,hh as u,i as d,is as f,lo as p,o as m,uh as h,vs as g,x_ as _,yh as v}from"./loadAgentsDir-DaNpxaO-.js";import{$ as y,Ut as b}from"./state-D5D6QpTX.js";import{P as x,R as S,c as C,i as w}from"./debug-D58GQBDG.js";import{o as T,s as E}from"./log-CZ7ploQm.js";async function D(e){C(`refreshActivePlugins: clearing all plugin caches`),f(),c();let t=await p(),[a,o]=await Promise.all([i(),d(y())]),{enabled:l,disabled:u,errors:m}=t,[h,g]=await Promise.all([Promise.all(l.map(async e=>{if(e.mcpServers)return Object.keys(e.mcpServers).length;let t=await n(e,m);return t&&(e.mcpServers=t),t?Object.keys(t).length:0})),Promise.all(l.map(async e=>{if(e.lspServers)return Object.keys(e.lspServers).length;let t=await s(e,m);return t&&(e.lspServers=t),t?Object.keys(t).length:0}))]),v=h.reduce((e,t)=>e+t,0),b=g.reduce((e,t)=>e+t,0);e(e=>({...e,plugins:{...e.plugins,enabled:l,disabled:u,commands:a,errors:O(e.plugins.errors,m),needsRefresh:!1},agentDefinitions:o,mcp:{...e.mcp,pluginReconnectKey:e.mcp.pluginReconnectKey+1}})),r();let S=!1;try{await _()}catch(e){S=!0,E(e),C(`refreshActivePlugins: loadPluginHooks failed: ${x(e)}`)}let w=l.reduce((e,t)=>t.hooksConfig?e+Object.values(t.hooksConfig).reduce((e,t)=>e+(t?.reduce((e,t)=>e+t.hooks.length,0)??0),0):e,0);return C(`refreshActivePlugins: ${l.length} enabled, ${a.length} commands, ${o.allAgents.length} agents, ${w} hooks, ${v} MCP, ${b} LSP`),{enabled_count:l.length,disabled_count:u.length,command_count:a.length,agent_count:o.allAgents.length,hook_count:w,mcp_count:v,lsp_count:b,error_count:m.length+ +!!S,agentDefinitions:o,pluginCommands:a}}function O(e,t){let n=e.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),r=new Set(t.map(k));return[...n.filter(e=>!r.has(k(e))),...t]}function k(e){return e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`}var A=e((()=>{b(),u(),m(),w(),S(),T(),a(),g(),o(),v(),t(),h(),l()}));export{D as n,A as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{La as t,br as n,hr as r,ka as i,oi as a,ri as o}from"./loadAgentsDir-DaNpxaO-.js";import{Ut as s,ft as c}from"./state-D5D6QpTX.js";import{a as l,i as u,r as d}from"./bridgeConfig-C5L-7KaP.js";import{n as f,t as p}from"./generateSessionName-EpqGW-T2.js";async function m(e,t,n){let s;if(!n||n.trim()===``){let n=await p(i(t.messages),t.abortController.signal);if(!n)return e(`Could not generate a name: no conversation context yet. Usage: /rename <name>`,{display:`system`}),null;s=n}else s=n.trim();let l=c(),f=r();await a(l,s,f);let m=t.getAppState().replBridgeSessionId;if(m){let e=u();import(`./createSession-BUzna9-E.js`).then(({updateBridgeSessionTitle:t})=>t(m,s,{baseUrl:d(),getAccessToken:e?()=>e:void 0}).catch(()=>{}))}return await o(l,s,f),t.setAppState(e=>({...e,standaloneAgentContext:{...e.standaloneAgentContext,name:s}})),e(`Session renamed to: ${s}`,{display:`system`}),null}e((()=>{s(),l(),t(),n(),f()}))();export{m as call};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{$S as i,Ar as a,Ci as o,Fr as s,Mu as c,Nr as l,Pu as u,QS as d,Si as f,Sr as p,Xp as m,Zp as h,ar as g,br as _,fi as v,fr as y,gC as b,wr as x}from"./loadAgentsDir-DaNpxaO-.js";import{I as S,P as C,ai as w,di as T,dr as E,fi as D,ot as O,t as k}from"./src-DL3w8VPk2.js";import{t as A}from"./jsx-runtime-Bb4Xn-E0.js";import{$ as j,Ut as M,ft as N}from"./state-D5D6QpTX.js";import{o as P,s as F}from"./log-CZ7ploQm.js";import{n as I,r as L}from"./modalContext-wY9CeN4G.js";import{a as R,i as z,n as B,o as V,r as H,t as U}from"./crossProjectResume-6B2NYy8a.js";function W(e){switch(e.resultType){case`sessionNotFound`:return`Session ${T.bold(e.arg)} was not found. Run ${T.bold(`/resume`)} without arguments to browse all sessions.`;case`multipleMatches`:return`Found ${e.count} sessions matching ${T.bold(e.arg)}. Run ${T.bold(`/resume`)} to pick one from the list.`}}function G({message:e,args:t,onDone:n}){return J.useEffect(()=>{let e=setTimeout(n,0);return()=>clearTimeout(e)},[n]),(0,Y.jsxs)(S,{flexDirection:`column`,children:[(0,Y.jsxs)(C,{dimColor:!0,children:[r.pointer,` /resume `,t]}),(0,Y.jsx)(d,{children:(0,Y.jsx)(C,{children:e})})]})}function K({onDone:e,onResume:t}){let[n,r]=J.useState([]),[i,o]=J.useState([]),[u,d]=J.useState(!0),[p,m]=J.useState(!1),[g,_]=J.useState(!1),{rows:v}=O(),b=L(),w=J.useCallback(async(t,n)=>{d(!0);try{let i=q(t?await a():await s(n),N());if(i.length===0){e(`No conversations found to resume`);return}r(i)}catch{e(`Failed to load conversations`)}finally{d(!1)}},[e]);J.useEffect(()=>{async function e(){let e=await f(j());o(e),w(!1,e)}e()},[w]);let T=J.useCallback(()=>{let e=!g;_(e),w(e,i)},[g,w,i]);async function D(n){let r=h(y(n));if(!r){e(`Failed to resume conversation`);return}let i=x(n)?await l(n):n,a=U(i,g);if(a.isCrossProject){if(a.isSameRepoWorktree){m(!0),t(r,i,`slash_command_picker`);return}let n=await E(a.command);n&&process.stdout.write(n),e([``,`This conversation is from a different directory.`,``,`To resume, run:`,` ${a.command}`,``,`(Command copied to clipboard)`,``].join(`
|
|
2
|
-
`),{display:`user`});return}m(!0),t(r,i,`slash_command_picker`)}function k(){e(`Resume cancelled`,{display:`system`})}return u?(0,Y.jsxs)(S,{children:[(0,Y.jsx)(c,{}),(0,Y.jsx)(C,{children:` Loading conversations…`})]}):p?(0,Y.jsxs)(S,{children:[(0,Y.jsx)(c,{}),(0,Y.jsx)(C,{children:` Resuming conversation…`})]}):(0,Y.jsx)(R,{logs:n,maxHeight:b?Math.floor(v/2):v-2,onCancel:k,onSelect:D,onLogsChanged:()=>w(g,i),showAllProjects:g,onToggleAllProjects:T,onAgenticSearch:H})}function q(e,t){return e.filter(e=>!e.isSidechain&&y(e)!==t)}var J,Y,X;e((()=>{D(),n(),J=t(w(),1),M(),V(),i(),u(),I(),b(),k(),z(),B(),o(),P(),_(),m(),Y=A(),X=async(e,t,n)=>{let r=async(n,r,i)=>{try{await t.resume?.(n,r,i),e(void 0,{display:`skip`})}catch(t){F(t),e(`Failed to resume: ${t.message}`)}},i=n?.trim();if(!i)return(0,Y.jsx)(K,{onDone:e,onResume:r},Date.now());let a=await s(await f(j()));if(a.length===0){let t=`No conversations found to resume.`;return(0,Y.jsx)(G,{message:t,args:i,onDone:()=>e(t)})}let o=h(i);if(o){let e=a.filter(e=>y(e)===o).sort((e,t)=>t.modified.getTime()-e.modified.getTime());if(e.length>0){let t=e[0];return r(o,x(t)?await l(t):t,`slash_command_session_id`),null}let t=await g(o);if(t)return r(o,t,`slash_command_session_id`),null}if(p()){let t=await v(i,{exact:!0});if(t.length===1){let e=t[0],n=y(e);if(n)return r(n,x(e)?await l(e):e,`slash_command_title`),null}if(t.length>1){let n=W({resultType:`multipleMatches`,arg:i,count:t.length});return(0,Y.jsx)(G,{message:n,args:i,onDone:()=>e(n)})}}let c=W({resultType:`sessionNotFound`,arg:i});return(0,Y.jsx)(G,{message:c,args:i,onDone:()=>e(c)})}}))();export{X as call,q as filterResumableSessions};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t}from"./ripgrep-C3jtZL7k.js";e();export{t as getRipgrepStatus};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Qw as e,tT as t}from"./loadAgentsDir-DaNpxaO-.js";t();export{e as SandboxManager};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$u as t,$w as n,Qu as r,Qw as i,iT as a,tT as o,uC as s}from"./loadAgentsDir-DaNpxaO-.js";import{Gt as c,H as l,I as u,Lt as d,P as f,a as p,j as m,n as h,r as g,t as _,x as v}from"./src-DL3w8VPk2.js";import{t as y}from"./jsx-runtime-Bb4Xn-E0.js";import{D as b,Ut as x}from"./state-D5D6QpTX.js";import{d as S,h as C,o as w}from"./settings-3xZ0fsvE.js";import{i as T,o as E}from"./platform-DMQxcm4K.js";import{relative as D}from"path";function O(){let e=i.isSandboxingEnabled(),t=i.checkDependencies(),n=t.warnings.length>0?(0,k.jsx)(u,{marginTop:1,flexDirection:`column`,children:t.warnings.map((e,t)=>(0,k.jsx)(f,{dimColor:!0,children:e},t))}):null;if(!e)return(0,k.jsxs)(u,{flexDirection:`column`,paddingY:1,children:[(0,k.jsx)(f,{color:`subtle`,children:`Sandbox is not enabled`}),n]});let r=i.getFsReadConfig(),o=i.getFsWriteConfig(),s=i.getNetworkRestrictionConfig(),c=i.getAllowUnixSockets(),l=i.getExcludedCommands(),d=i.getLinuxGlobPatternWarnings();return(0,k.jsxs)(u,{flexDirection:`column`,paddingY:1,children:[(0,k.jsxs)(u,{flexDirection:`column`,children:[(0,k.jsx)(f,{bold:!0,color:`permission`,children:`Excluded Commands:`}),(0,k.jsx)(f,{dimColor:!0,children:l.length>0?l.join(`, `):`None`})]}),r.denyOnly.length>0&&(0,k.jsxs)(u,{marginTop:1,flexDirection:`column`,children:[(0,k.jsx)(f,{bold:!0,color:`permission`,children:`Filesystem Read Restrictions:`}),(0,k.jsxs)(f,{dimColor:!0,children:[`Denied: `,r.denyOnly.join(`, `)]}),r.allowWithinDeny&&r.allowWithinDeny.length>0&&(0,k.jsxs)(f,{dimColor:!0,children:[`Allowed within denied: `,r.allowWithinDeny.join(`, `)]})]}),o.allowOnly.length>0&&(0,k.jsxs)(u,{marginTop:1,flexDirection:`column`,children:[(0,k.jsx)(f,{bold:!0,color:`permission`,children:`Filesystem Write Restrictions:`}),(0,k.jsxs)(f,{dimColor:!0,children:[`Allowed: `,o.allowOnly.join(`, `)]}),o.denyWithinAllow.length>0&&(0,k.jsxs)(f,{dimColor:!0,children:[`Denied within allowed: `,o.denyWithinAllow.join(`, `)]})]}),(s.allowedHosts&&s.allowedHosts.length>0||s.deniedHosts&&s.deniedHosts.length>0)&&(0,k.jsxs)(u,{marginTop:1,flexDirection:`column`,children:[(0,k.jsxs)(f,{bold:!0,color:`permission`,children:[`Network Restrictions`,a()?` (Managed)`:``,`:`]}),s.allowedHosts&&s.allowedHosts.length>0&&(0,k.jsxs)(f,{dimColor:!0,children:[`Allowed: `,s.allowedHosts.join(`, `)]}),s.deniedHosts&&s.deniedHosts.length>0&&(0,k.jsxs)(f,{dimColor:!0,children:[`Denied: `,s.deniedHosts.join(`, `)]})]}),c&&c.length>0&&(0,k.jsxs)(u,{marginTop:1,flexDirection:`column`,children:[(0,k.jsx)(f,{bold:!0,color:`permission`,children:`Allowed Unix Sockets:`}),(0,k.jsx)(f,{dimColor:!0,children:c.join(`, `)})]}),d.length>0&&(0,k.jsxs)(u,{marginTop:1,flexDirection:`column`,children:[(0,k.jsx)(f,{bold:!0,color:`warning`,children:`⚠ Warning: Glob patterns not fully supported on Linux`}),(0,k.jsxs)(f,{dimColor:!0,children:[`The following patterns will be ignored: `,d.slice(0,3).join(`, `),d.length>3&&` (${d.length-3} more)`]})]}),n]})}var k,A=e((()=>{_(),o(),k=y()}));function j({depCheck:e}){let t=T()===`macos`,n=e.errors.some(e=>e.includes(`ripgrep`)),r=e.errors.some(e=>e.includes(`bwrap`)),i=e.errors.some(e=>e.includes(`socat`)),a=e.warnings.length>0,o=e.errors.filter(e=>!e.includes(`ripgrep`)&&!e.includes(`bwrap`)&&!e.includes(`socat`));return(0,M.jsxs)(u,{flexDirection:`column`,paddingY:1,gap:1,children:[t&&(0,M.jsx)(u,{flexDirection:`column`,children:(0,M.jsxs)(f,{children:[`seatbelt: `,(0,M.jsx)(f,{color:`success`,children:`built-in (macOS)`})]})}),(0,M.jsxs)(u,{flexDirection:`column`,children:[(0,M.jsxs)(f,{children:[`ripgrep (rg): `,n?(0,M.jsx)(f,{color:`error`,children:`not found`}):(0,M.jsx)(f,{color:`success`,children:`found`})]}),n&&(0,M.jsxs)(f,{dimColor:!0,children:[` `,`· `,t?`brew install ripgrep`:`apt install ripgrep`]})]}),!t&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(u,{flexDirection:`column`,children:[(0,M.jsxs)(f,{children:[`bubblewrap (bwrap):`,` `,r?(0,M.jsx)(f,{color:`error`,children:`not installed`}):(0,M.jsx)(f,{color:`success`,children:`installed`})]}),r&&(0,M.jsxs)(f,{dimColor:!0,children:[` `,`· apt install bubblewrap`]})]}),(0,M.jsxs)(u,{flexDirection:`column`,children:[(0,M.jsxs)(f,{children:[`socat: `,i?(0,M.jsx)(f,{color:`error`,children:`not installed`}):(0,M.jsx)(f,{color:`success`,children:`installed`})]}),i&&(0,M.jsxs)(f,{dimColor:!0,children:[` `,`· apt install socat`]})]}),(0,M.jsxs)(u,{flexDirection:`column`,children:[(0,M.jsxs)(f,{children:[`seccomp filter:`,` `,a?(0,M.jsx)(f,{color:`warning`,children:`not installed`}):(0,M.jsx)(f,{color:`success`,children:`installed`}),a&&(0,M.jsx)(f,{dimColor:!0,children:` (required to block unix domain sockets)`})]}),a&&(0,M.jsxs)(u,{flexDirection:`column`,children:[(0,M.jsxs)(f,{dimColor:!0,children:[` `,`· npm install -g @anthropic-ai/sandbox-runtime`]}),(0,M.jsxs)(f,{dimColor:!0,children:[` `,`· or copy vendor/seccomp/* from sandbox-runtime and set`]}),(0,M.jsxs)(f,{dimColor:!0,children:[` `,`sandbox.seccomp.bpfPath and applyPath in settings.json`]})]})]})]}),o.map(e=>(0,M.jsx)(f,{color:`error`,children:e},e))]})}var M,N=e((()=>{_(),E(),M=y()}));function P({onComplete:e}){let t=i.isSandboxingEnabled(),n=i.areSandboxSettingsLockedByPolicy(),r=i.areUnsandboxedCommandsAllowed();return t?n?(0,I.jsxs)(u,{flexDirection:`column`,paddingY:1,children:[(0,I.jsx)(f,{color:`subtle`,children:`Override settings are managed by a higher-priority configuration and cannot be changed locally.`}),(0,I.jsx)(u,{marginTop:1,children:(0,I.jsxs)(f,{dimColor:!0,children:[`Current setting: `,r?`Allow unsandboxed fallback`:`Strict sandbox mode`]})})]}):(0,I.jsx)(F,{onComplete:e,currentMode:r?`open`:`closed`}):(0,I.jsx)(u,{flexDirection:`column`,paddingY:1,children:(0,I.jsx)(f,{color:`subtle`,children:`Sandbox is not enabled. Enable sandbox to configure override settings.`})})}function F({onComplete:e,currentMode:t}){let[n]=l(),{headerFocused:a,focusHeader:o}=p(),s=m(`success`,n)(`(current)`),c=[{label:t===`open`?`Allow unsandboxed fallback ${s}`:`Allow unsandboxed fallback`,value:`open`},{label:t===`closed`?`Strict sandbox mode ${s}`:`Strict sandbox mode`,value:`closed`}];async function h(t){let n=t;await i.setSandboxSettings({allowUnsandboxedCommands:n===`open`}),e(n===`open`?`✓ Unsandboxed fallback allowed - commands can run outside sandbox when necessary`:"✓ Strict sandbox mode - all commands must run in sandbox or be excluded via the `excludedCommands` option")}return(0,I.jsxs)(u,{flexDirection:`column`,paddingY:1,children:[(0,I.jsx)(u,{marginBottom:1,children:(0,I.jsx)(f,{bold:!0,children:`Configure Overrides:`})}),(0,I.jsx)(r,{options:c,onChange:h,onCancel:()=>e(void 0,{display:`skip`}),onUpFromFirstItem:o,isDisabled:a}),(0,I.jsxs)(u,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,I.jsxs)(f,{dimColor:!0,children:[(0,I.jsx)(f,{bold:!0,dimColor:!0,children:`Allow unsandboxed fallback:`}),` `,`When a command fails due to sandbox restrictions, Work Mate can retry with dangerouslyDisableSandbox to run outside the sandbox (falling back to default permissions).`]}),(0,I.jsxs)(f,{dimColor:!0,children:[(0,I.jsx)(f,{bold:!0,dimColor:!0,children:`Strict sandbox mode:`}),` `,`All bash commands invoked by the model must run in the sandbox unless they are explicitly listed in excludedCommands.`]}),(0,I.jsxs)(f,{dimColor:!0,children:[`Learn more:`,` `,(0,I.jsx)(d,{url:`https://code.workmate.com/docs/en/sandboxing#configure-sandboxing`,children:`code.workmate.com/docs/en/sandboxing#configure-sandboxing`})]})]})]})}var I,L=e((()=>{_(),o(),t(),I=y()}));function R({onComplete:e,depCheck:t}){let[n]=l(),r=i.isSandboxingEnabled(),a=i.isAutoAllowBashIfSandboxedEnabled(),o=t.warnings.length>0,s=S().sandbox?.network?.allowAllUnixSockets,u=o&&!s,d=r?a?`auto-allow`:`regular`:`disabled`,f=m(`success`,n)(`(current)`),p=[{label:d===`auto-allow`?`Sandbox BashTool, with auto-allow ${f}`:`Sandbox BashTool, with auto-allow`,value:`auto-allow`},{label:d===`regular`?`Sandbox BashTool, with regular permissions ${f}`:`Sandbox BashTool, with regular permissions`,value:`regular`},{label:d===`disabled`?`No Sandbox ${f}`:`No Sandbox`,value:`disabled`}];async function _(t){switch(t){case`auto-allow`:await i.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!0}),e(`✓ Sandbox enabled with auto-allow for bash commands`);break;case`regular`:await i.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!1}),e(`✓ Sandbox enabled with regular bash permissions`);break;case`disabled`:await i.setSandboxSettings({enabled:!1,autoAllowBashIfSandboxed:!1}),e(`○ Sandbox disabled`);break}}c({"confirm:no":()=>e(void 0,{display:`skip`})},{context:`Settings`});let y=(0,B.jsx)(h,{title:`Mode`,children:(0,B.jsx)(z,{showSocketWarning:u,options:p,onSelect:_,onComplete:e})},`mode`),b=(0,B.jsx)(h,{title:`Overrides`,children:(0,B.jsx)(P,{onComplete:e})},`overrides`),x=(0,B.jsx)(h,{title:`Config`,children:(0,B.jsx)(O,{})},`config`);return(0,B.jsx)(v,{color:`permission`,children:(0,B.jsx)(g,{title:`Sandbox:`,color:`permission`,defaultTab:`Mode`,children:t.errors.length>0?[(0,B.jsx)(h,{title:`Dependencies`,children:(0,B.jsx)(j,{depCheck:t})},`dependencies`)]:[y,...o?[(0,B.jsx)(h,{title:`Dependencies`,children:(0,B.jsx)(j,{depCheck:t})},`dependencies`)]:[],b,x]})})}function z({showSocketWarning:e,options:t,onSelect:n,onComplete:i}){let{headerFocused:a,focusHeader:o}=p();return(0,B.jsxs)(u,{flexDirection:`column`,paddingY:1,children:[e&&(0,B.jsx)(u,{marginBottom:1,children:(0,B.jsx)(f,{color:`warning`,children:`Cannot block unix domain sockets (see Dependencies tab)`})}),(0,B.jsx)(u,{marginBottom:1,children:(0,B.jsx)(f,{bold:!0,children:`Configure Mode:`})}),(0,B.jsx)(r,{options:t,onChange:n,onCancel:()=>i(void 0,{display:`skip`}),onUpFromFirstItem:o,isDisabled:a}),(0,B.jsxs)(u,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,B.jsxs)(f,{dimColor:!0,children:[(0,B.jsx)(f,{bold:!0,dimColor:!0,children:`Auto-allow mode:`}),` `,`Commands will try to run in the sandbox automatically, and attempts to run outside of the sandbox fallback to regular permissions. Explicit ask/deny rules are always respected.`]}),(0,B.jsxs)(f,{dimColor:!0,children:[`Learn more:`,` `,(0,B.jsx)(d,{url:`https://code.workmate.com/docs/en/sandboxing`,children:`code.workmate.com/docs/en/sandboxing`})]})]})]})}var B,V=e((()=>{_(),s(),o(),C(),t(),A(),N(),L(),B=y()}));async function H(e,t,r){let a=S().theme||`light`,o=T();if(!i.isSupportedPlatform()){let t=o===`wsl`?`Error: Sandboxing requires WSL2. WSL1 is not supported.`:`Error: Sandboxing is currently only supported on macOS, Linux, and WSL2.`;return e(m(`error`,a)(t)),null}let s=i.checkDependencies();if(!i.isPlatformInEnabledList())return e(m(`error`,a)(`Error: Sandboxing is disabled for this platform (${o}) via the enabledPlatforms setting.`)),null;if(i.areSandboxSettingsLockedByPolicy())return e(m(`error`,a)(`Error: Sandbox settings are overridden by a higher-priority configuration and cannot be changed locally.`)),null;let c=r?.trim()||``;if(!c)return(0,U.jsx)(R,{onComplete:e,depCheck:s});if(c){let t=c.split(` `)[0];if(t===`exclude`){let t=c.slice(8).trim();if(!t)return e(m(`error`,a)(`Error: Please provide a command pattern to exclude (e.g., /sandbox exclude "npm run test:*")`)),null;let r=t.replace(/^["']|["']$/g,``);n(r);let i=w(`localSettings`),o=i?D(b(),i):`.workmate/settings.local.json`;return e(m(`success`,a)(`Added "${r}" to excluded commands in ${o}`)),null}else return e(m(`error`,a)(`Error: Unknown subcommand "${t}". Available subcommand: exclude`)),null}return null}var U;e((()=>{x(),V(),_(),E(),o(),C(),U=y()}))();export{H as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F_ as e,N_ as t}from"./loadAgentsDir-DaNpxaO-.js";t();export{e as isSearchExtraToolsEnabled};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Xh as n,Zh as r,uC as i}from"./loadAgentsDir-DaNpxaO-.js";import{I as a,P as o,Wt as s,ai as c,t as l,x as u}from"./src-DL3w8VPk2.js";import{t as d}from"./jsx-runtime-Bb4Xn-E0.js";import{c as f,i as p}from"./debug-D58GQBDG.js";import{t as m}from"./lib-BlVGipXx.js";function h({onDone:e}){let t=r(e=>e.remoteSessionUrl),[n,i]=(0,_.useState)(``);if((0,_.useEffect)(()=>{if(!t)return;let e=t;async function n(){let t=await(0,g.toString)(e,{type:`utf8`,errorCorrectionLevel:`L`});i(t)}n().catch(e=>{f(`QR code generation failed`,e)})},[t]),s(`confirm:no`,e,{context:`Confirmation`}),!t)return(0,v.jsxs)(u,{children:[(0,v.jsx)(o,{color:`warning`,children:"Not in remote mode. Start with `claude --remote` to use this command."}),(0,v.jsx)(o,{dimColor:!0,children:`(press esc to close)`})]});let c=n.split(`
|
|
2
|
-
`).filter(e=>e.length>0),l=c.length===0;return(0,v.jsxs)(u,{children:[(0,v.jsx)(a,{marginBottom:1,children:(0,v.jsx)(o,{bold:!0,children:`Remote session`})}),l?(0,v.jsx)(o,{dimColor:!0,children:`Generating QR code…`}):c.map((e,t)=>(0,v.jsx)(o,{children:e},t)),(0,v.jsxs)(a,{marginTop:1,children:[(0,v.jsx)(o,{dimColor:!0,children:`Open in browser: `}),(0,v.jsx)(o,{color:`ide`,children:t})]}),(0,v.jsx)(a,{marginTop:1,children:(0,v.jsx)(o,{dimColor:!0,children:`(press esc to close)`})})]})}var g,_,v,y;e((()=>{g=m(),_=t(c(),1),l(),i(),n(),p(),v=d(),y=async e=>(0,v.jsx)(h,{onDone:e})}))();export{y as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{nh as e,rh as t}from"./loadAgentsDir-DaNpxaO-.js";e();export{t as registerSessionFileAccessHooks};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t}from"./sessionObserver-0D8xFoRK.js";t();export{e as heuristicObserverBackend};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Dr as e,Xr as t,br as n}from"./loadAgentsDir-DaNpxaO-.js";n();export{e as linkSessionToPR,t as recordTranscript};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n}from"./envUtils-DcaKZlRU.js";import{i as r,l as i,n as a}from"./esm-lWlUmoUA.js";import{R as o,Ut as s,ft as c,k as l,ot as u}from"./state-D5D6QpTX.js";import{C as d,R as f,S as p,c as m,i as h,x as g}from"./debug-D58GQBDG.js";import{d as _,h as ee}from"./config-DRy1I12M.js";import{i as te,t as ne}from"./hash-Tu-My5Vp.js";import{Pt as re,Tt as ie}from"./model-Do0f476p.js";import{et as ae,ft as oe,rt as se,ut as ce}from"./esm-CvHtYRrr.js";import"path";import"fs";import{createHash as le}from"crypto";import"fs/promises";import{AsyncLocalStorage as ue}from"async_hooks";function de(e){let t=BigInt(58),n=Array(y).fill(v[0]),r=y-1,i=e;for(;i>0n;){let e=Number(i%t);n[r]=v[e],i/=t,r--}return n.join(``)}function fe(e){let t=e.replace(/-/g,``);if(t.length!==32)throw Error(`Invalid UUID hex length: ${t.length}`);return BigInt(`0x${t}`)}function pe(e,t){let n=fe(t);return`${e}_${me}${de(n)}`}var v,me,y,he=e((()=>{v=`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`,me=`01`,y=22}));function b(e){let n=ge[e],r=process.env[e];return r===void 0?n:t(r)}function x(){let e=_(),t=c(),n={"user.id":e};b(`OTEL_METRICS_INCLUDE_SESSION_ID`)&&(n[`session.id`]=t),b(`OTEL_METRICS_INCLUDE_VERSION`)&&(n[`app.version`]=`0.0.20`);let r=ie();if(r){let e=r.organizationUuid,t=r.emailAddress,i=r.accountUuid;e&&(n[`organization.id`]=e),t&&(n[`user.email`]=t),i&&b(`OTEL_METRICS_INCLUDE_ACCOUNT_UUID`)&&(n[`user.account_uuid`]=i,n[`user.account_id`]=process.env.CLAUDE_CODE_ACCOUNT_TAGGED_ID||pe(`user`,i))}return ce.terminal&&(n[`terminal.type`]=ce.terminal),n}var ge,S=e((()=>{s(),re(),ee(),oe(),n(),he(),ge={OTEL_METRICS_INCLUDE_SESSION_ID:!0,OTEL_METRICS_INCLUDE_VERSION:!1,OTEL_METRICS_INCLUDE_ACCOUNT_UUID:!0}}));function _e(){return t(process.env.OTEL_LOG_USER_PROMPTS)}function ve(e){return _e()?e:`<REDACTED>`}async function C(e,t={}){let n=l();if(!n){w||(w=!0,m(`[3P telemetry] Event dropped (no event logger initialized): ${e}`,{level:`warn`}));return}let r={...x(),"event.name":e,"event.timestamp":new Date().toISOString(),"event.sequence":ye++},i=u();i&&(r[`prompt.id`]=i);let a=process.env.CLAUDE_CODE_WORKSPACE_HOST_PATHS;a&&(r[`workspace.host_paths`]=a.split(`|`));for(let[e,n]of Object.entries(t))n!==void 0&&(r[e]=n);n.emit({body:`claude_code.${e}`,attributes:r})}var ye,w,T=e((()=>{s(),h(),n(),S(),ye=0,w=!1}));function be(){A.clear(),j.clear()}function E(){return t(process.env.ENABLE_BETA_TRACING_DETAILED)&&process.env.BETA_TRACING_ENDPOINT&&o()||!1}function D(e,t=ke){return e.length<=t?{content:e,truncated:!1}:{content:e.slice(0,t)+`
|
|
2
|
-
|
|
3
|
-
[TRUNCATED - Content exceeds 60KB limit]`,truncated:!0}}function O(e){return le(`sha256`).update(e).digest(`hex`).slice(0,12)}function xe(e){return`sp_${O(e)}`}function Se(e){return`msg_${O(d(e.message.content))}`}function k(e){let t=e.trim().match(Ae);return t?.[1]?t[1].trim():null}function Ce(e){let t=[],n=[];for(let r of e){let e=r.message.content;if(typeof e==`string`){let r=k(e);r?n.push(r):t.push(`[USER]\n${e}`)}else if(Array.isArray(e)){for(let r of e)if(r.type===`text`){let e=k(r.text);e?n.push(e):t.push(`[USER]\n${r.text}`)}else if(r.type===`tool_result`){let e=typeof r.content==`string`?r.content:d(r.content),i=k(e);i?n.push(i):t.push(`[TOOL RESULT: ${r.tool_use_id}]\n${e}`)}}}return{contextParts:t,systemReminders:n}}function we(e,t){if(!E())return;let{content:n,truncated:r}=D(`[USER PROMPT]\n${t}`);e.setAttributes({new_context:n,...r&&{new_context_truncated:!0,new_context_original_length:t.length}})}function Te(e,t,n){if(E()){if(t?.systemPrompt){let n=xe(t.systemPrompt),r=t.systemPrompt.slice(0,500);if(e.setAttribute(`system_prompt_hash`,n),e.setAttribute(`system_prompt_preview`,r),e.setAttribute(`system_prompt_length`,t.systemPrompt.length),!A.has(n)){A.add(n);let{content:e,truncated:r}=D(t.systemPrompt);C(`system_prompt`,{system_prompt_hash:n,system_prompt:e,system_prompt_length:String(t.systemPrompt.length),...r&&{system_prompt_truncated:`true`}})}}if(t?.tools)try{let n=p(t.tools).map(e=>{let t=d(e),n=O(t);return{name:typeof e.name==`string`?e.name:`unknown`,hash:n,json:t}});e.setAttribute(`tools`,d(n.map(({name:e,hash:t})=>({name:e,hash:t})))),e.setAttribute(`tools_count`,n.length);for(let{name:e,hash:t,json:r}of n)if(!A.has(`tool_${t}`)){A.add(`tool_${t}`);let{content:n,truncated:i}=D(r);C(`tool`,{tool_name:se(e),tool_hash:t,tool:n,...i&&{tool_truncated:`true`}})}}catch{e.setAttribute(`tools_parse_error`,!0)}if(n&&n.length>0&&t?.querySource){let r=t.querySource,i=j.get(r),a=0;if(i)for(let e=0;e<n.length;e++){let t=n[e];if(t&&Se(t)===i){a=e+1;break}}let o=n.slice(a).filter(e=>e.type===`user`);if(o.length>0){let{contextParts:t,systemReminders:i}=Ce(o);if(t.length>0){let n=t.join(`
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
`),{content:r,truncated:i}=D(n);e.setAttributes({new_context:r,new_context_message_count:o.length,...i&&{new_context_truncated:!0,new_context_original_length:n.length}})}if(i.length>0){let t=i.join(`
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
`),{content:n,truncated:r}=D(t);e.setAttributes({system_reminders:n,system_reminders_count:i.length,...r&&{system_reminders_truncated:!0,system_reminders_original_length:t.length}})}let a=n[n.length-1];a&&j.set(r,Se(a))}}}}function Ee(e,t){if(!(!E()||!t)&&t.modelOutput!==void 0){let{content:n,truncated:r}=D(t.modelOutput);e[`response.model_output`]=n,r&&(e[`response.model_output_truncated`]=!0,e[`response.model_output_original_length`]=t.modelOutput.length)}}function De(e,t,n){if(!E())return;let{content:r,truncated:i}=D(`[TOOL INPUT: ${t}]\n${n}`);e.setAttributes({tool_input:r,...i&&{tool_input_truncated:!0,tool_input_original_length:n.length}})}function Oe(e,t,n){if(!E())return;let{content:r,truncated:i}=D(`[TOOL RESULT: ${t}]\n${n}`);e.new_context=r,i&&(e.new_context_truncated=!0,e.new_context_original_length=n.length)}var A,j,ke,Ae,je=e((()=>{s(),ae(),n(),g(),T(),A=new Set,j=new Map,ke=60*1024,Ae=/^<system-reminder>\n?([\s\S]*?)\n?<\/system-reminder>$/}));function Me(e){return Math.abs(ne(e))||1}function Ne(e){let t=U.get(e);return t===void 0?(H++,U.set(e,H),H):t}function M(){let e=c(),t=`main`,n=B.get(e);if(n)return n;let r={agentId:e,agentName:t,parentAgentId:void 0,processId:1,threadId:Me(t)};return B.set(e,r),V++,r}function N(){return(Date.now()-Ke)*1e3}function P(){return`span_${++qe}`}function Pe(){let e=process.env.CLAUDE_CODE_PERFETTO_TRACE;m(`[Perfetto] initializePerfettoTracing called, env value: ${e}`)}function Fe(e){I&&(L.push({name:`process_name`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:0,args:{name:e.agentName}}),L.push({name:`thread_name`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:e.threadId,args:{name:e.agentName}}),e.parentAgentId&&L.push({name:`parent_agent`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:0,args:{parent_agent_id:e.parentAgentId}}))}function F(){return I}function Ie(e,t,n){if(!I)return;let r={agentId:e,agentName:t,parentAgentId:n,processId:Ne(e),threadId:Me(t)};B.set(e,r),V++,Fe(r)}function Le(e){I&&(B.delete(e),U.delete(e))}function Re(e){if(!I)return``;let t=P(),n=M();return z.set(t,{name:`API Call`,category:`api`,startTime:N(),agentInfo:n,args:{model:e.model,prompt_tokens:e.promptTokens,message_id:e.messageId,is_speculative:e.isSpeculative??!1,query_source:e.querySource}}),R.push({name:`API Call`,cat:`api`,ph:`B`,ts:z.get(t).startTime,pid:n.processId,tid:n.threadId,args:z.get(t).args}),t}function ze(e,t){if(!I||!e)return;let n=z.get(e);if(!n)return;let r=N(),i=r-n.startTime,a=t.promptTokens??n.args.prompt_tokens,o=t.ttftMs,s=t.ttltMs,c=t.outputTokens,l=t.cacheReadTokens,u=o!==void 0&&a!==void 0&&o>0?Math.round(a/(o/1e3)*100)/100:void 0,d=s!==void 0&&o!==void 0?s-o:void 0,f=d!==void 0&&c!==void 0&&d>0?Math.round(c/(d/1e3)*100)/100:void 0,p=l!==void 0&&a!==void 0&&a>0?Math.round(l/a*1e4)/100:void 0,m=t.requestSetupMs,h=t.attemptStartTimes,g={...n.args,ttft_ms:o,ttlt_ms:s,prompt_tokens:a,output_tokens:c,cache_read_tokens:l,cache_creation_tokens:t.cacheCreationTokens,message_id:t.messageId??n.args.message_id,success:t.success??!0,error:t.error,duration_ms:i/1e3,request_setup_ms:m,itps:u,otps:f,cache_hit_rate_pct:p},_=m!==void 0&&m>0?m*1e3:0;if(_>0){let e=n.startTime+_;if(R.push({name:`Request Setup`,cat:`api,setup`,ph:`B`,ts:n.startTime,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:{request_setup_ms:m,attempt_count:h?.length??1}}),h&&h.length>1){let e=h[0];for(let t=0;t<h.length-1;t++){let r=n.startTime+(h[t]-e)*1e3,i=n.startTime+(h[t+1]-e)*1e3;R.push({name:`Attempt ${t+1} (retry)`,cat:`api,retry`,ph:`B`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:{attempt:t+1}}),R.push({name:`Attempt ${t+1} (retry)`,cat:`api,retry`,ph:`E`,ts:i,pid:n.agentInfo.processId,tid:n.agentInfo.threadId})}}R.push({name:`Request Setup`,cat:`api,setup`,ph:`E`,ts:e,pid:n.agentInfo.processId,tid:n.agentInfo.threadId})}if(o!==void 0){let e=n.startTime+_,t=e+o*1e3;R.push({name:`First Token`,cat:`api,ttft`,ph:`B`,ts:e,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:{ttft_ms:o,prompt_tokens:a,itps:u,cache_hit_rate_pct:p}}),R.push({name:`First Token`,cat:`api,ttft`,ph:`E`,ts:t,pid:n.agentInfo.processId,tid:n.agentInfo.threadId});let r=s===void 0?void 0:s-o-_/1e3;r!==void 0&&r>0&&(R.push({name:`Sampling`,cat:`api,sampling`,ph:`B`,ts:t,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:{sampling_ms:r,output_tokens:c,otps:f}}),R.push({name:`Sampling`,cat:`api,sampling`,ph:`E`,ts:t+r*1e3,pid:n.agentInfo.processId,tid:n.agentInfo.threadId}))}R.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:g}),z.delete(e)}function Be(e,t){if(!I)return``;let n=P(),r=M();return z.set(n,{name:`Tool: ${e}`,category:`tool`,startTime:N(),agentInfo:r,args:{tool_name:e,...t}}),R.push({name:`Tool: ${e}`,cat:`tool`,ph:`B`,ts:z.get(n).startTime,pid:r.processId,tid:r.threadId,args:z.get(n).args}),n}function Ve(e,t){if(!I||!e)return;let n=z.get(e);if(!n)return;let r=N(),i=r-n.startTime,a={...n.args,success:t?.success??!0,error:t?.error,result_tokens:t?.resultTokens,duration_ms:i/1e3};R.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:a}),z.delete(e)}function He(e){if(!I)return``;let t=P(),n=M();return z.set(t,{name:`Waiting for User Input`,category:`user_input`,startTime:N(),agentInfo:n,args:{context:e}}),R.push({name:`Waiting for User Input`,cat:`user_input`,ph:`B`,ts:z.get(t).startTime,pid:n.processId,tid:n.threadId,args:z.get(t).args}),t}function Ue(e,t){if(!I||!e)return;let n=z.get(e);if(!n)return;let r=N(),i=r-n.startTime,a={...n.args,decision:t?.decision,source:t?.source,duration_ms:i/1e3};R.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:a}),z.delete(e)}function We(e){if(!I)return``;let t=P(),n=M();return z.set(t,{name:`Interaction`,category:`interaction`,startTime:N(),agentInfo:n,args:{user_prompt_length:e?.length}}),R.push({name:`Interaction`,cat:`interaction`,ph:`B`,ts:z.get(t).startTime,pid:n.processId,tid:n.threadId,args:z.get(t).args}),t}function Ge(e){if(!I||!e)return;let t=z.get(e);if(!t)return;let n=N(),r=n-t.startTime;R.push({name:t.name,cat:t.category,ph:`E`,ts:n,pid:t.agentInfo.processId,tid:t.agentInfo.threadId,args:{...t.args,duration_ms:r/1e3}}),z.delete(e)}var I,L,R,z,B,V,Ke,qe,H,U,Je=e((()=>{s(),h(),n(),f(),te(),g(),I=!1,L=[],R=[],z=new Map,B=new Map,V=0,Ke=0,qe=0,H=1,U=new Map}));function W(e){return e.spanContext().spanId||``}function Ye(){if($)return;$=!0;let e=setInterval(()=>{let e=Date.now()-dt;for(let[t,n]of X){let r=n.deref();r===void 0?(X.delete(t),Z.delete(t)):r.startTime<e&&(r.ended||r.span.end(),X.delete(t),Z.delete(t))}},6e4);typeof e.unref==`function`&&e.unref()}function Xe(){return!1}function G(){return Xe()||E()}function K(){return r.getTracer(`com.anthropic.claude_code.tracing`,`1.0.0`)}function q(e,t={}){return{...x(),"span.type":e,...t}}function Ze(e){Ye();let n=F()?We(e):void 0;if(!G()){if(n){let e=r.getActiveSpan()||K().startSpan(`dummy`),t=W(e),i={span:e,startTime:Date.now(),attributes:{},perfettoSpanId:n};return X.set(t,new WeakRef(i)),J.enterWith(i),e}return r.getActiveSpan()||K().startSpan(`dummy`)}let i=K(),a=t(process.env.OTEL_LOG_USER_PROMPTS)?e:`<REDACTED>`;Q++;let o=q(`interaction`,{user_prompt:a,user_prompt_length:e.length,"interaction.sequence":Q}),s=i.startSpan(`claude_code.interaction`,{attributes:o});we(s,e);let c=W(s),l={span:s,startTime:Date.now(),attributes:o,perfettoSpanId:n};return X.set(c,new WeakRef(l)),J.enterWith(l),s}function Qe(){let e=J.getStore();if(!e||e.ended)return;if(e.perfettoSpanId&&Ge(e.perfettoSpanId),!G()){e.ended=!0,X.delete(W(e.span)),J.enterWith(void 0);return}let t=Date.now()-e.startTime;e.span.setAttributes({"interaction.duration_ms":t}),e.span.end(),e.ended=!0,X.delete(W(e.span)),J.enterWith(void 0)}function $e(e,t,n,a){let o=F()?Re({model:e,querySource:t?.querySource,messageId:void 0}):void 0;if(!G()){if(o){let t=r.getActiveSpan()||K().startSpan(`dummy`),n=W(t),i={span:t,startTime:Date.now(),attributes:{model:e},perfettoSpanId:o};return X.set(n,new WeakRef(i)),Z.set(n,i),t}return r.getActiveSpan()||K().startSpan(`dummy`)}let s=K(),c=J.getStore(),l=q(`llm_request`,{model:e,"llm_request.context":c?`interaction`:`standalone`,speed:a?`fast`:`normal`}),u=c?r.setSpan(i.active(),c.span):i.active(),d=s.startSpan(`claude_code.llm_request`,{attributes:l},u);t?.querySource&&d.setAttribute(`query_source`,t.querySource),Te(d,t,n);let f=W(d),p={span:d,startTime:Date.now(),attributes:l,perfettoSpanId:o};return X.set(f,new WeakRef(p)),Z.set(f,p),d}function et(e,t){let n;if(e){let t=W(e);n=X.get(t)?.deref()}else n=Array.from(X.values()).findLast(e=>{let t=e.deref();return t?.attributes[`span.type`]===`llm_request`||t?.attributes.model})?.deref();if(!n)return;let r=Date.now()-n.startTime;if(n.perfettoSpanId&&ze(n.perfettoSpanId,{ttftMs:t?.ttftMs,ttltMs:r,promptTokens:t?.inputTokens,outputTokens:t?.outputTokens,cacheReadTokens:t?.cacheReadTokens,cacheCreationTokens:t?.cacheCreationTokens,success:t?.success,error:t?.error,requestSetupMs:t?.requestSetupMs,attemptStartTimes:t?.attemptStartTimes}),!G()){let e=W(n.span);X.delete(e),Z.delete(e);return}let i={duration_ms:r};t&&(t.inputTokens!==void 0&&(i.input_tokens=t.inputTokens),t.outputTokens!==void 0&&(i.output_tokens=t.outputTokens),t.cacheReadTokens!==void 0&&(i.cache_read_tokens=t.cacheReadTokens),t.cacheCreationTokens!==void 0&&(i.cache_creation_tokens=t.cacheCreationTokens),t.success!==void 0&&(i.success=t.success),t.statusCode!==void 0&&(i.status_code=t.statusCode),t.error!==void 0&&(i.error=t.error),t.attempt!==void 0&&(i.attempt=t.attempt),t.hasToolCall!==void 0&&(i[`response.has_tool_call`]=t.hasToolCall),t.ttftMs!==void 0&&(i.ttft_ms=t.ttftMs),Ee(i,t)),n.span.setAttributes(i),n.span.end();let a=W(n.span);X.delete(a),Z.delete(a)}function tt(e,t,n){let a=F()?Be(e,t):void 0;if(!G()){if(a){let t=r.getActiveSpan()||K().startSpan(`dummy`),n=W(t),i={span:t,startTime:Date.now(),attributes:{"span.type":`tool`,tool_name:e},perfettoSpanId:a};return X.set(n,new WeakRef(i)),Y.enterWith(i),t}return r.getActiveSpan()||K().startSpan(`dummy`)}let o=K(),s=J.getStore(),c=q(`tool`,{tool_name:e,...t}),l=s?r.setSpan(i.active(),s.span):i.active(),u=o.startSpan(`claude_code.tool`,{attributes:c},l);n&&De(u,e,n);let d=W(u),f={span:u,startTime:Date.now(),attributes:c,perfettoSpanId:a};return X.set(d,new WeakRef(f)),Y.enterWith(f),u}function nt(){let e=F()?He(`tool_permission`):void 0;if(!G()){if(e){let t=r.getActiveSpan()||K().startSpan(`dummy`),n=W(t),i={span:t,startTime:Date.now(),attributes:{"span.type":`tool.blocked_on_user`},perfettoSpanId:e};return X.set(n,new WeakRef(i)),Z.set(n,i),t}return r.getActiveSpan()||K().startSpan(`dummy`)}let t=K(),n=Y.getStore(),a=q(`tool.blocked_on_user`),o=n?r.setSpan(i.active(),n.span):i.active(),s=t.startSpan(`claude_code.tool.blocked_on_user`,{attributes:a},o),c=W(s),l={span:s,startTime:Date.now(),attributes:a,perfettoSpanId:e};return X.set(c,new WeakRef(l)),Z.set(c,l),s}function rt(e,t){let n=Array.from(X.values()).findLast(e=>e.deref()?.attributes[`span.type`]===`tool.blocked_on_user`)?.deref();if(!n)return;if(n.perfettoSpanId&&Ue(n.perfettoSpanId,{decision:e,source:t}),!G()){let e=W(n.span);X.delete(e),Z.delete(e);return}let r={duration_ms:Date.now()-n.startTime};e&&(r.decision=e),t&&(r.source=t),n.span.setAttributes(r),n.span.end();let i=W(n.span);X.delete(i),Z.delete(i)}function it(){if(!G())return r.getActiveSpan()||K().startSpan(`dummy`);let e=K(),t=Y.getStore(),n=q(`tool.execution`),a=t?r.setSpan(i.active(),t.span):i.active(),o=e.startSpan(`claude_code.tool.execution`,{attributes:n},a),s=W(o),c={span:o,startTime:Date.now(),attributes:n};return X.set(s,new WeakRef(c)),Z.set(s,c),o}function at(e){if(!G())return;let t=Array.from(X.values()).findLast(e=>e.deref()?.attributes[`span.type`]===`tool.execution`)?.deref();if(!t)return;let n={duration_ms:Date.now()-t.startTime};e&&(e.success!==void 0&&(n.success=e.success),e.error!==void 0&&(n.error=e.error)),t.span.setAttributes(n),t.span.end();let r=W(t.span);X.delete(r),Z.delete(r)}function ot(e,t){let n=Y.getStore();if(!n)return;if(n.perfettoSpanId&&Ve(n.perfettoSpanId,{success:!0,resultTokens:t}),!G()){let e=W(n.span);X.delete(e),Y.enterWith(void 0);return}let r={duration_ms:Date.now()-n.startTime};e&&Oe(r,n.attributes.tool_name||`unknown`,e),t!==void 0&&(r.result_tokens=t),n.span.setAttributes(r),n.span.end();let i=W(n.span);X.delete(i),Y.enterWith(void 0)}function st(){return t(process.env.OTEL_LOG_TOOL_CONTENT)}function ct(e,t){if(!G()||!st())return;let n=Y.getStore();if(!n)return;let r={};for(let[e,n]of Object.entries(t))if(typeof n==`string`){let{content:t,truncated:i}=D(n);r[e]=t,i&&(r[`${e}_truncated`]=!0,r[`${e}_original_length`]=n.length)}else r[e]=n;n.span.addEvent(e,r)}function lt(e,t,n,a){if(!E())return r.getActiveSpan()||K().startSpan(`dummy`);let o=K(),s=Y.getStore()??J.getStore(),c=q(`hook`,{hook_event:e,hook_name:t,num_hooks:n,hook_definitions:a}),l=s?r.setSpan(i.active(),s.span):i.active(),u=o.startSpan(`claude_code.hook`,{attributes:c},l),d=W(u),f={span:u,startTime:Date.now(),attributes:c};return X.set(d,new WeakRef(f)),Z.set(d,f),u}function ut(e,t){if(!E())return;let n=W(e),r=X.get(n)?.deref();if(!r)return;let i={duration_ms:Date.now()-r.startTime};t&&(t.numSuccess!==void 0&&(i.num_success=t.numSuccess),t.numBlocking!==void 0&&(i.num_blocking=t.numBlocking),t.numNonBlockingError!==void 0&&(i.num_non_blocking_error=t.numNonBlockingError),t.numCancelled!==void 0&&(i.num_cancelled=t.numCancelled)),r.span.setAttributes(i),r.span.end(),X.delete(n),Z.delete(n)}var J,Y,X,Z,Q,$,dt,ft=e((()=>{a(),n(),S(),je(),Je(),J=new ue,Y=new ue,X=new Map,Z=new Map,Q=0,$=!1,dt=1800*1e3}));export{E as C,x as D,ve as E,S as O,je as S,C as T,Pe as _,rt as a,Le as b,ft as c,Ze as d,$e as f,Je as g,tt as h,et as i,Xe as l,it as m,ut as n,at as o,nt as p,Qe as r,ot as s,ct as t,lt as u,F as v,T as w,be as x,Ie as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e,h as t,s as n}from"./settings-3xZ0fsvE.js";t();export{n as getSettingsForSource,e as updateSettingsForSource};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Ky as t,jv as n}from"./loadAgentsDir-DaNpxaO-.js";import{D as r,E as i,N as a,j as o,n as s,r as c,t as l}from"./lazySchema-DULtBUCI.js";import{Ut as u}from"./state-D5D6QpTX.js";import{R as d}from"./debug-D58GQBDG.js";import{h as f}from"./settings-3xZ0fsvE.js";import{h as p}from"./config-DRy1I12M.js";import{O as m,m as h}from"./git-By_J4XJL.js";import{u as g}from"./oauth-D38aRTUb.js";import{Pt as _,ti as v}from"./model-Do0f476p.js";import"path";import"fs/promises";var y,b=e((()=>{c(),l(),y=s(()=>r({entries:o(a(),a())})),s(()=>r({userId:a(),version:i(),lastModified:a(),checksum:a(),content:y()}))})),x=e((()=>{u(),g(),_(),t(),p(),m(),d(),h(),v(),f(),n(),b()}));export{x as t};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./memoize-BK3gG5ob.js";import{l as n,o as r,s as i}from"./envUtils-DcaKZlRU.js";import{AC as a,At as o,Dm as s,Dv as c,Em as l,Ev as u,Fa as d,IC as ee,Ig as te,JS as f,Ky as p,LC as m,La as h,Lg as ne,Li as re,Mi as ie,Mm as ae,Mn as oe,NC as se,Nm as g,Nn as ce,PC as le,RC as ue,Sa as de,St as fe,Vy as pe,YS as me,YT as he,Y_ as ge,_v as _,ac as v,br as y,by as b,cm as x,cv as S,dc as C,di as w,dv as T,fv as E,gt as D,gv as O,hn as k,ht as A,hv as j,jm as M,jn as N,kC as P,kv as F,lc as I,lm as L,lv as _e,mn as ve,mv as ye,oc as be,ot as xe,pv as Se,qT as Ce,sv as R,uv as we,vt as z,vv as Te,yv as Ee}from"./loadAgentsDir-DaNpxaO-.js";import{di as B,fi as De}from"./src-DL3w8VPk2.js";import{R as V,Ut as H,Vn as Oe,ar as ke,ft as Ae,rt as je,z as Me,zn as Ne}from"./state-D5D6QpTX.js";import{n as Pe,t as U}from"./cwd-Nh5IZNKO.js";import{F as Fe,P as Ie,R as W,f as G,u as Le}from"./debug-D58GQBDG.js";import{Gt as Re,In as ze,Jt as Be,Ln as Ve}from"./settings-3xZ0fsvE.js";import{h as He,o as Ue}from"./config-DRy1I12M.js";import{O as We,k as K,l as Ge,m as Ke,n as qe,r as Je}from"./git-By_J4XJL.js";import{o as Ye,s as Xe}from"./log-CZ7ploQm.js";import{n as q,r as J}from"./analytics-DJobLaWP.js";import{n as Ze,r as Y}from"./startupProfiler-CbzxVmbv.js";import{Jr as Qe,Pt as $e,Yr as et,Zt as tt}from"./model-Do0f476p.js";import{pn as nt,un as X}from"./prompt-8u06WVES.js";import{h as rt,l as it,p as at,u as ot}from"./terminalSetup-kWdZRKWq.js";import{ft as st,ut as Z}from"./esm-CvHtYRrr.js";import{c as ct,t as lt}from"./nativeInstaller-CymO8TNe.js";import{l as ut,s as dt}from"./logoUtils-CbIqOFrX.js";import{i as ft,r as pt}from"./runtimeObserver-L6041elO.js";import{t as mt}from"./sinks-BXX72cbf.js";import{writeFile as Q}from"fs/promises";r(),De(),Pe(),We(),Ye(),Ke(),Be(),He(),$e(),he(),m(),se(),P(),ne(),re(),y(),k(),t(),H(),xe(),ge(),nt(),me(),Ve(),I(),G(),x(),h(),ce(),Qe(),b(),c(),q(),l(),ae(),E(),W();function ht(){return!1}function gt(){return{}}var $;function _t(e,t){let n=0,r=t==null;for(let i of e){if(!r){i.uuid===t&&(r=!0);continue}if(i.type===`assistant`){let e=i.message.content;Array.isArray(e)&&(n+=ze(e,e=>e.type===`tool_use`))}}return n}function vt(e){let t=F(e);if(!Se()){if(!we(t))return!1;O()}let n=T(t),r=_t(e,$)>=_e(),i=d(e);if(n&&r||n&&!i){let t=e[e.length-1];return t?.uuid&&($=t.uuid),!0}return!1}async function yt(e){let t=Le(),n=N();await t.mkdir(n,{mode:448});let r=oe();try{await Q(r,``,{encoding:`utf-8`,mode:384,flag:`wx`}),await Q(r,await g(),{encoding:`utf-8`,mode:384})}catch(e){if(Fe(e)!==`EEXIST`)throw e}e.readFileState.delete(r);let i=await f.call({file_path:r},e),a=``,o=i.data;return o.type===`text`&&(a=o.file.content),J(`tengu_session_memory_file_read`,{content_length:a.length}),{memoryPath:r,currentMemory:a}}var bt=e(()=>{let e=gt();Ee({minimumMessageTokensToInit:e.minimumMessageTokensToInit&&e.minimumMessageTokensToInit>0?e.minimumMessageTokensToInit:R.minimumMessageTokensToInit,minimumTokensBetweenUpdate:e.minimumTokensBetweenUpdate&&e.minimumTokensBetweenUpdate>0?e.minimumTokensBetweenUpdate:R.minimumTokensBetweenUpdate,toolCallsBetweenUpdates:e.toolCallsBetweenUpdates&&e.toolCallsBetweenUpdates>0?e.toolCallsBetweenUpdates:R.toolCallsBetweenUpdates})}),xt=et(async e=>{let{messages:t,toolUseContext:n,querySource:r}=e;if(r!==`repl_main_thread`||!ht()||(bt(),!vt(t)))return;j();let i=be(n),{memoryPath:a,currentMemory:o}=await yt(i);await C({promptMessages:[de({content:await M(o,a)})],cacheSafeParams:v(e),canUseTool:Ct(a),querySource:`session_memory`,forkLabel:`session_memory`,overrides:{readFileState:i.readFileState}});let s=t[t.length-1],c=s?u(s):void 0,l=S();J(`tengu_session_memory_extraction`,{input_tokens:c?.input_tokens,output_tokens:c?.output_tokens,cache_read_input_tokens:c?.cache_read_input_tokens??void 0,cache_creation_input_tokens:c?.cache_creation_input_tokens??void 0,config_min_message_tokens_to_init:l.minimumMessageTokensToInit,config_min_tokens_between_update:l.minimumTokensBetweenUpdate,config_tool_calls_between_updates:l.toolCallsBetweenUpdates}),_(F(t)),wt(t),ye()});function St(){Me()||s()&&L(xt)}function Ct(e){return async(t,n)=>{if(t.name===`Edit`&&typeof n==`object`&&n&&`file_path`in n){let t=n.file_path;if(typeof t==`string`&&t===e)return{behavior:`allow`,updatedInput:n}}return{behavior:`deny`,message:`only ${X} on ${e} is allowed`,decisionReason:{type:`other`,reason:`only ${X} on ${e} is allowed`}}}}function wt(e){if(!d(e)){let t=e[e.length-1];t?.uuid&&Te(t.uuid)}}q(),H(),ft(),ot(),p(),st(),W(),ut(),lt(),at(),Ze(),fe();async function Tt(e,t,r,s,c,l,u,d){K(`info`,`setup_started`);let f=process.version.match(/^v(\d+)\./)?.[1];if((!f||parseInt(f,10)<18)&&(console.error(B.bold.red(`Error: Work Mate requires Node.js version 18 or higher.`)),process.exit(1)),u&&ke(te(u)),!V())try{let e=await it();e.status===`restored`?console.log(B.yellow(`Detected an interrupted Terminal.app setup. Your original settings have been restored. You may need to restart Terminal.app for the changes to take effect.`)):e.status===`failed`&&console.error(B.red(`Failed to restore Terminal.app settings. Please manually restore your original settings with: defaults import com.apple.Terminal ${e.backupPath}.`))}catch(e){Xe(e)}a(e);let p=Date.now();if(ee(),K(`info`,`setup_hooks_captured`,{duration_ms:Date.now()-p}),le(e),s){let t=ve(),n=await Ge();!t&&!n&&(process.stderr.write(B.red(`Error: Can only use --worktree in a git repository, but ${B.bold(e)} is not a git repository. Configure a WorktreeCreate hook in settings.json to use --worktree with other VCS systems.\n`)),process.exit(1));let r=d?`pr-${d}`:c??Ce(),i;if(n){let e=qe(U());e||(process.stderr.write(B.red(`Error: Could not determine the main git repository root.
|
|
2
|
-
`)),process.exit(1)),e!==(Je(U())??U())&&(K(`info`,`worktree_resolved_to_main_repo`),process.chdir(e),a(e)),i=l?z(e,o(r)):void 0}else i=l?z(U(),o(r)):void 0;let s;try{s=await D(Ae(),r,i,d?{prNumber:d}:void 0)}catch(e){process.stderr.write(B.red(`Error creating worktree: ${Ie(e)}\n`)),process.exit(1)}if(J(`tengu_worktree_created`,{tmux_enabled:l}),l&&i){let e=await A(i,s.worktreePath);e.created?console.log(B.green(`Created tmux session: ${B.bold(i)}\nTo attach: ${B.bold(`tmux attach -t ${i}`)}`)):console.error(B.yellow(`Warning: Failed to create tmux session: ${e.error}`))}process.chdir(s.worktreePath),a(s.worktreePath),Ne(U()),Oe(U()),w(s),pe(),ue()}K(`info`,`setup_background_jobs_starting`),i()||(St(),pt()),ct(),K(`info`,`setup_background_jobs_launched`),Y(`setup_before_prefetch`),K(`info`,`setup_prefetch_starting`);let m=V()&&n(process.env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL)||i();if(m||ie(je()),import(`./loadPluginHooks-CGgpcyEC.js`).then(e=>{m||(e.loadPluginHooks(),e.setupPluginHookHotReload())}),i()||import(`./sessionFileAccessHooks-6XfAf6ke.js`).then(e=>e.registerSessionFileAccessHooks()),mt(),J(`tengu_started`,{}),tt(V()),Y(`setup_after_prefetch`),!i()&&rt()&&await dt(),t===`bypassPermissions`||r){if(process.platform!==`win32`&&typeof process.getuid==`function`&&process.getuid()===0&&process.env.IS_SANDBOX!==`1`&&!n(process.env.CLAUDE_CODE_BUBBLEWRAP))if(process.stdin.isTTY){console.error(B.bold.red(`WARNING: Running as root/sudo with bypass permissions mode is dangerous.`)),console.error(B.yellow(`Bypass mode skips ALL permission checks. Combined with root, any command (rm -rf /, chmod, dd) executes without review.`));let e=(await import(`readline`)).createInterface({input:process.stdin,output:process.stdout}),t=await new Promise(t=>{e.question(`
|
|
3
|
-
I understand the risks. Continue? [y/N] `,t)});e.close(),t.trim().toLowerCase()!==`y`&&(console.error(`Aborted.`),process.exit(1))}else console.error(`--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons`),process.exit(1);if(process.env.CLAUDE_CODE_ENTRYPOINT!==`local-agent`&&process.env.CLAUDE_CODE_ENTRYPOINT!==`claude-desktop`){let[e,t]=await Promise.all([Z.getIsDocker(),Re.hasInternetAccess()]),n=Z.getIsBubblewrapSandbox(),r=process.env.IS_SANDBOX===`1`;(!(e||n||r)||t)&&(console.error(`--dangerously-skip-permissions can only be used in Docker/sandbox containers with no internet access but got Docker: ${e}, Bubblewrap: ${n}, IS_SANDBOX: ${r}, hasInternet: ${t}`),process.exit(1))}}let h=Ue();h.lastCost!==void 0&&h.lastDuration!==void 0&&J(`tengu_exit`,{last_session_cost:h.lastCost,last_session_api_duration:h.lastAPIDuration,last_session_tool_duration:h.lastToolDuration,last_session_duration:h.lastDuration,last_session_lines_added:h.lastLinesAdded,last_session_lines_removed:h.lastLinesRemoved,last_session_total_input_tokens:h.lastTotalInputTokens,last_session_total_output_tokens:h.lastTotalOutputTokens,last_session_total_cache_creation_input_tokens:h.lastTotalCacheCreationInputTokens,last_session_total_cache_read_input_tokens:h.lastTotalCacheReadInputTokens,last_session_fps_average:h.lastFpsAverage,last_session_fps_low_1_pct:h.lastFpsLow1Pct,last_session_id:h.lastSessionId,...h.lastSessionMetrics})}export{Tt as setup};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./sinks-BXX72cbf.js";export{e as initSinks};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{AC as e,BT as t,Di as n,Ds as r,Ei as i,Ig as a,JT as o,KS as s,Ky as ee,Lg as te,Li as ne,Nt as re,Ny as ie,Os as ae,Ot as c,Py as l,Rn as oe,St as se,Th as ce,VT as le,Vy as u,Wr as ue,Xi as de,YT as fe,Yi as d,Zi as pe,a_ as f,bc as p,bg as m,br as me,ci as he,di as h,eh as ge,fn as _e,hc as ve,hn as ye,i_ as g,kC as _,ni as v,qS as y,qi as b,th as x,ti as S,vg as C,yt as w}from"./loadAgentsDir-DaNpxaO-.js";import{Mn as T,Ut as E,ar as D,cr as O,ft as k,h as A,jn as j,lr as M,q as N,zn as P}from"./state-D5D6QpTX.js";import{n as be,t as F}from"./cwd-Nh5IZNKO.js";import{c as I,f as xe,i as L,nt as Se,tt as R,u as Ce}from"./debug-D58GQBDG.js";import{n as we,r as Te}from"./analytics-DJobLaWP.js";import{C as Ee,_ as De}from"./model-Do0f476p.js";import{Gt as Oe}from"./prompt-8u06WVES.js";import*as z from"path";import{dirname as ke}from"path";E(),f(),ie(),Oe(),te(),ee(),ce(),ve(),be(),L(),m(),De(),fe(),_(),me(),s(),x(),se();function Ae(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.type!==`assistant`)continue;let r=n.message.content.find(e=>e.type===`tool_use`&&e.name===`TodoWrite`);if(r?.type!==`tool_use`)continue;let i=r.input;if(typeof i!=`object`||!i)return[];let a=ge().safeParse(i.todos);return a.success?a.data:[]}return[]}function je(e,t){if(e.fileHistorySnapshots&&e.fileHistorySnapshots.length>0&&C(e.fileHistorySnapshots,e=>{t(t=>({...t,fileHistory:e}))}),!y()&&e.messages&&e.messages.length>0){let n=Ae(e.messages);if(n.length>0){let e=k();t(t=>({...t,todos:{...t.todos,[e]:n}}))}}}function B(e,t){if(!(!e&&!t))return{name:e??``,color:t==="default"?void 0:t}}function V(e,t,n){if(t)return{agentDefinition:t,agentType:void 0};if(!e)return T(void 0),{agentDefinition:void 0,agentType:void 0};let r=n.activeAgents.find(t=>t.agentType===e);return r?(T(r.agentType),!N()&&r.model&&r.model!==`inherit`&&j(Ee(r.model)),{agentDefinition:r,agentType:r.agentType}):(I(`Resumed session had agent "${e}" but it is no longer available. Using default behavior.`),T(void 0),{agentDefinition:void 0,agentType:void 0})}function H(t){let n=w();if(n){h(n);return}if(t){try{process.chdir(t.worktreePath)}catch{h(null);return}e(t.worktreePath),P(F()),c(t),u(),g(),o.cache.clear?.()}}function Me(){let t=w();if(t){c(null),u(),g(),o.cache.clear?.();try{process.chdir(t.originalCwd)}catch{return}e(t.originalCwd),P(F())}}async function Ne(e,t,n){if(t.forkSession)e.contentReplacements?.length&&await ue(e.contentReplacements);else{let n=t.sessionIdOverride??e.sessionId;n&&(D(a(n),t.transcriptPath?ke(t.transcriptPath):null),await S(),l(n))}v(t.forkSession?{...e,worktreeSession:void 0}:e),t.forkSession||(H(e.worktreeSession),oe());let{agentDefinition:r,agentType:i}=V(e.agentSetting,n.mainThreadAgentDefinition,n.agentDefinitions);he(`normal`),t.includeAttribution;let o=B(e.agentName,e.agentColor);p(e.agentName);let s=n.agentDefinitions;return{messages:e.messages,fileHistorySnapshots:e.fileHistorySnapshots,contentReplacements:e.contentReplacements,agentName:e.agentName,agentColor:e.agentColor==="default"?void 0:e.agentColor,restoredAgentDef:r,initialState:{...n.initialState,...i&&{agent:i},...o&&{standaloneAgentContext:o},agentDefinitions:s}}}le(),E(),ne(),we(),de(),r(),R(),L(),xe(),ye(),M();var Pe=1e3,Fe=500,Ie=300,Le=2e3,Re=typeof Bun<`u`,U=null,W=null,G=new Set,K=!1,q=!1,J=!1,Y=null,X=O(),Z=null;async function ze(){if(K||q)return;K=!0,J||(J=!0,pe(()=>{i(),X.emit()}));let e=await Ve();e.length!==0&&(I(`Watching for changes in skill/command directories: ${e.join(`, `)}...`),U=t.watch(e,{persistent:!0,ignoreInitial:!0,depth:2,awaitWriteFinish:{stabilityThreshold:Z?.stabilityThreshold??Pe,pollInterval:Z?.pollInterval??Fe},ignored:(e,t)=>t&&!t.isFile()&&!t.isDirectory()?!0:e.split(z.sep).some(e=>e===`.git`),ignorePermissionErrors:!0,usePolling:Re,interval:Z?.chokidarInterval??Le,atomic:!0}),U.on(`add`,$),U.on(`change`,$),U.on(`unlink`,$),Y=Se(async()=>{await Q()}))}function Q(){q=!0,Y&&(Y(),Y=null);let e=Promise.resolve();return U&&(e=U.close(),U=null),W&&(clearTimeout(W),W=null),G.clear(),X.clear(),e}var Be=X.subscribe;async function Ve(){let e=Ce(),t=[],n=d(`userSettings`,`skills`);if(n)try{await e.stat(n),t.push(n)}catch{}let r=d(`userSettings`,`commands`);if(r)try{await e.stat(r),t.push(r)}catch{}let i=d(`projectSettings`,`skills`);if(i)try{let n=z.resolve(i);await e.stat(n),t.push(n)}catch{}let a=d(`projectSettings`,`commands`);if(a)try{let n=z.resolve(a);await e.stat(n),t.push(n)}catch{}for(let n of A()){let r=z.join(n,`.workmate`,`skills`);try{await e.stat(r),t.push(r)}catch{}}return t}function $(e){I(`Detected skill change: ${e}`),Te(`tengu_skill_file_changed`,{source:`chokidar`}),He(e)}function He(e){G.add(e),W&&clearTimeout(W),W=setTimeout(async()=>{W=null;let e=[...G];if(G.clear(),_e(await re(`skills`,e[0]))){I(`ConfigChange hook blocked skill reload (${e.length} paths)`);return}b(),n(),ae(),X.emit()},Z?.reloadDebounce??Ie)}async function Ue(e){U&&(await U.close(),U=null),W&&(clearTimeout(W),W=null),G.clear(),X.clear(),K=!1,q=!1,Z=e??null}var We={initialize:ze,dispose:Q,subscribe:Be,resetForTesting:Ue};export{V as a,Ne as i,B as n,je as o,Me as r,H as s,We as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Dp as n,Ji as r,Li as i,Op as a,Xi as o,zi as s}from"./loadAgentsDir-DaNpxaO-.js";import{I as c,P as l,ai as u,h as d,t as f,y as p}from"./src-DL3w8VPk2.js";import{t as m}from"./jsx-runtime-Bb4Xn-E0.js";import{cn as h,on as g}from"./settings-3xZ0fsvE.js";import{_,v}from"./startupProfiler-CbzxVmbv.js";import{l as y,o as b}from"./stringUtils-CKD8qDqx.js";function x(e,t){let n=t.trim();if(n===``)return e.slice();let r=n.toLowerCase().split(/\s+/);return e.filter(e=>{let t=`${e.name} ${e.description}`.toLowerCase();return r.every(e=>t.includes(e))})}var S=e((()=>{}));function C(e){return e===`plugin`?`plugin`:e===`mcp`?`mcp`:g(e)}function w({onExit:e,commands:t}){let[i,a]=(0,T.useState)(``),o=(0,T.useMemo)(()=>t.filter(e=>e.type===`prompt`&&(e.loadedFrom===`skills`||e.loadedFrom===`commands_DEPRECATED`||e.loadedFrom===`plugin`||e.loadedFrom===`mcp`)),[t]),u=(0,T.useMemo)(()=>x(o.map(e=>({...e,name:s(e),description:e.description??``})),i),[o,i]),f=(0,T.useMemo)(()=>{let e={policySettings:[],userSettings:[],projectSettings:[],localSettings:[],flagSettings:[],plugin:[],mcp:[]};for(let t of u){let n=t.source;n in e&&e[n].push(t)}for(let t of Object.values(e))t.sort((e,t)=>s(e).localeCompare(s(t)));return e},[u]),m=()=>{e(`Skills dialog dismissed`,{display:`system`})};if(o.length===0)return(0,E.jsxs)(p,{title:`Skills`,subtitle:`No skills found`,onCancel:m,hideInputGuide:!0,children:[(0,E.jsx)(l,{dimColor:!0,children:`Create skills in .workmate/skills/ or ~/.workmate/skills/`}),(0,E.jsx)(l,{dimColor:!0,italic:!0,children:(0,E.jsx)(n,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`close`})})]});let h=e=>{switch(e){case`projectSettings`:case`localSettings`:return{label:`local`,color:`yellow`};case`userSettings`:return{label:`global`,color:`cyan`};case`policySettings`:return{label:`managed`,color:`magenta`};default:return}},g=(e,t)=>{let n=`~${_(r(e))}`,i=e.source===`plugin`?e.pluginInfo?.pluginManifest.name:void 0,a=h(e.source);return(0,E.jsxs)(c,{children:[(0,E.jsx)(l,{color:t?`suggestion`:void 0,children:s(e)}),a&&(0,E.jsxs)(l,{color:a.color,children:[` [`,a.label,`]`]}),(0,E.jsxs)(l,{dimColor:!0,children:[i?` · ${i}`:``,` · `,C(e.source),` · `,n,` tokens`]})]})};return(0,E.jsx)(d,{title:`Skills`,placeholder:`Type to filter skills…`,items:(0,T.useMemo)(()=>D.flatMap(e=>f[e]),[f]),getKey:e=>`${e.name}-${e.source}`,visibleCount:12,direction:`down`,onQueryChange:a,onSelect:t=>{e(`/${s(t)}`,{display:`user`})},onCancel:m,emptyMessage:e=>e.trim()?`No skills matching "${e.trim()}"`:`No skills found`,matchLabel:i.trim()===``?`${o.length} ${y(o.length,`skill`)}`:`${u.length}/${o.length} ${y(o.length,`skill`)}`,selectAction:`invoke skill`,renderItem:(e,t)=>g(e,t)})}var T,E,D,O=e((()=>{T=t(u(),1),i(),f(),o(),v(),h(),b(),a(),S(),E=m(),D=[`projectSettings`,`localSettings`,`userSettings`,`flagSettings`,`policySettings`,`plugin`,`mcp`]}));async function k(e,t){return(0,A.jsx)(w,{onExit:e,commands:t.options.commands})}var A;e((()=>{O(),A=m()}))();export{k as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$r as e,$t as t,An as n,B as r,Bt as i,C as a,Cn as o,Cr as s,Ct as c,D as l,Dr as u,Dt as d,En as f,Er as p,Ft as m,G as h,Gn as g,Gr as _,Gt as v,H as y,I as b,In as x,Jr as S,Jt as C,Kt as w,Lt as T,Mn as E,Mr as D,N as O,On as k,P as A,Pn as j,Pr as M,Pt as N,Q as P,Qn as F,Qr as I,R as L,Rn as R,Sn as z,T as B,Tn as V,Tt as H,U,Un as W,V as G,Vn as K,Vt as q,Wt as J,Xn as Y,Xr as X,Xt as Z,Y as Q,Yt as $,Z as ee,Zn as te,Zt as ne,_ as re,_n as ie,_r as ae,a as oe,an as se,ar as ce,br as le,ci as ue,cn as de,cr as fe,ct as pe,d as me,dr as he,dt as ge,en as _e,er as ve,et as ye,fn as be,fr as xe,ft as Se,gr as Ce,gt as we,h as Te,hn as Ee,hr as De,ir as Oe,it as ke,j as Ae,jt as je,k as Me,kn as Ne,kr as Pe,kt as Fe,l as Ie,ln as Le,lr as Re,lt as ze,mr as Be,mt as Ve,n as He,nn as Ue,nt as We,o as Ge,oi as Ke,on as qe,or as Je,ot as Ye,p as Xe,pn as Ze,pr as Qe,q as $e,qn as et,r as tt,ri as nt,rn as rt,rr as it,s as at,si as ot,sn as st,sr as ct,t as lt,ti as ut,tn as dt,tr as ft,un as pt,vr as mt,vt as ht,x as gt,xn as _t,xr as vt,xt as yt,y as bt,yr as xt,yt as St,zn as Ct}from"./src-DL3w8VPk2.js";lt();export{St as AlternateScreen,m as Ansi,et as BaseBox,g as BaseText,b as Box,je as Button,B as Byline,Je as CLEAR_ITERM2_PROGRESS,ct as CLEAR_TAB_STATUS,fe as CLEAR_TERMINAL_TITLE,Ct as ClickEvent,Be as DBP,De as DFE,I as DISABLE_KITTY_KEYBOARD,e as DISABLE_MODIFY_OTHER_KEYS,Ce as DISABLE_MOUSE_TRACKING,P as DOUBLE_PRESS_TIMEOUT_MS,bt as Dialog,a as Divider,ae as ENABLE_MOUSE_TRACKING,mt as ENTER_ALT_SCREEN,xt as EXIT_ALT_SCREEN,nt as Event,ut as EventEmitter,Pe as FocusEvent,u as FocusManager,Te as FuzzyPicker,le as HIDE_CURSOR,n as Ink,X as InputEvent,w as KeybindingProvider,q as KeybindingSetup,K as KeyboardEvent,l as KeyboardShortcutHint,T as Link,re as ListItem,Xe as LoadingState,Fe as Newline,H as NoSelect,gt as Pane,me as ProgressBar,Ie as Ratchet,c as RawAnsi,vt as SHOW_CURSOR,yt as ScrollBox,Me as SearchBox,d as Spacer,at as StatusIcon,_t as THEME_NAMES,z as THEME_SETTINGS,He as Tab,tt as Tabs,S as TerminalFocusEvent,W as TerminalSizeContext,E as TerminalWriteProvider,A as Text,O as TextHoverColorContext,L as ThemeProvider,Ke as applyColor,ot as applyTextStyles,Ue as chordToDisplayString,rt as chordToString,s as clamp,Ae as color,ue as colorize,f as createRoot,ne as getBindingDisplayText,Re as getClipboardPath,pt as getKeyName,te as getTerminalFocusState,F as getTerminalFocused,o as getTheme,ft as hasCursorUpViewportYankBug,R as instances,it as isSynchronizedOutputSupported,Oe as isXtermJs,se as keystrokeToDisplayString,qe as keystrokeToString,t as keystrokesEqual,be as matchesBinding,Ze as matchesKeystroke,N as measureElement,st as parseBindings,de as parseChord,Le as parseKeystroke,x as renderBorder,k as renderSync,_e as resolveKey,dt as resolveKeyWithChordState,he as setClipboard,r as setThemeConfigCallbacks,_ as stringWidth,p as styles,ve as subscribeTerminalFocus,i as supportsHyperlinks,xe as supportsTabStatus,V as themeColorToAnsi,Ve as useAnimationFrame,ge as useAnimationTimer,ht as useApp,h as useDeclaredCursor,ye as useDoublePress,pe as useHasSelection,Ee as useInput,Se as useInterval,J as useKeybinding,C as useKeybindingContext,v as useKeybindings,We as useMinDisplayTime,$ as useOptionalKeybindingContext,G as usePreviewTheme,Z as useRegisterKeybindingContext,$e as useSearchHighlight,ze as useSelection,ie as useStdin,oe as useTabHeaderFocus,ee as useTabStatus,Ge as useTabsWidth,Y as useTerminalFocus,j as useTerminalNotification,Ye as useTerminalSize,Q as useTerminalTitle,we as useTerminalViewport,y as useTheme,U as useThemeSetting,ke as useTimeout,M as wrapAnsi,Qe as wrapForMultiplexer,D as wrapText,Ne as wrappedRender,ce as writeDiffToTerminal};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,t}from"./rolldown-runtime-DaDcL9Zw.js";import{C as n,S as r,n as i,t as a}from"./esm-CXt5K8Xt.js";import{t as o}from"./src-Dvp6-vB7.js";var s=t((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OTLPLogExporter=void 0;var s=o(),c=(i(),e(a)),l=(n(),e(r));t.OTLPLogExporter=class extends l.OTLPExporterBase{constructor(e={}){super((0,s.createOtlpGrpcExportDelegate)((0,s.convertLegacyOtlpGrpcOptions)(e,`LOGS`),c.ProtobufLogsSerializer,`LogsExportService`,`/opentelemetry.proto.collector.logs.v1.LogsService/Export`))}}})),c=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.OTLPLogExporter=void 0;var t=s();Object.defineProperty(e,"OTLPLogExporter",{enumerable:!0,get:function(){return t.OTLPLogExporter}})}));export default c();export{};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,t}from"./rolldown-runtime-DaDcL9Zw.js";import{C as n,S as r,n as i,t as a}from"./esm-CXt5K8Xt.js";import{t as o}from"./src-Dvp6-vB7.js";var s=t((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OTLPTraceExporter=void 0;var s=o(),c=(i(),e(a)),l=(n(),e(r));t.OTLPTraceExporter=class extends l.OTLPExporterBase{constructor(e={}){super((0,s.createOtlpGrpcExportDelegate)((0,s.convertLegacyOtlpGrpcOptions)(e,`TRACES`),c.ProtobufTraceSerializer,`TraceExportService`,`/opentelemetry.proto.collector.trace.v1.TraceService/Export`))}}})),c=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.OTLPTraceExporter=void 0;var t=s();Object.defineProperty(e,"OTLPTraceExporter",{enumerable:!0,get:function(){return t.OTLPTraceExporter}})}));export default c();export{};
|