@readmagic/workmate 0.0.22 → 0.0.23
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-DWgTWJ7R.js → AddWorkspaceDirectory-OgcBcK5A.js} +1 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-CDNd5-7E.js +1 -0
- package/dist/chunks/{AgentsMdExternalIncludesDialog-s0Orgord.js → AgentsMdExternalIncludesDialog-CNEifEyV.js} +1 -1
- package/dist/chunks/App-B-3tPQ3k.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-COuhHcey.js +2 -0
- package/dist/chunks/{BypassPermissionsModeDialog-D2Gesf-u.js → BypassPermissionsModeDialog-bJek4siJ.js} +1 -1
- package/dist/chunks/CustomSelect-DoeEXOIP.js +1 -0
- package/dist/chunks/{DiffDialog-v2IiYyi3.js → DiffDialog-B3X9FMpO.js} +5 -5
- package/dist/chunks/Doctor-6PXyjIi6.js +3 -0
- package/dist/chunks/Doctor-DNgkgYhB.js +1 -0
- package/dist/chunks/{ExitFlow-BasHk1mk.js → ExitFlow-DgAZp_8U.js} +2 -2
- package/dist/chunks/Grove-CHatOzcE.js +11 -0
- package/dist/chunks/{InvalidConfigDialog-DYVQK5js.js → InvalidConfigDialog-DXL92MN9.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-Dg6OiStR.js → InvalidSettingsDialog-Dtmpzeps.js} +1 -1
- package/dist/chunks/{KeybindingProviderSetup-Bn1jzN5F.js → KeybindingProviderSetup-DA37QUFs.js} +1 -1
- package/dist/chunks/MCPConnectionManager-thZd-xA_.js +1 -0
- package/dist/chunks/MCPToolListView-CpY-YJg4.js +1 -0
- package/dist/chunks/{McpParsingWarnings-DZejAh8b.js → McpParsingWarnings-JvChf3xr.js} +1 -1
- package/dist/chunks/MessageSelector-C0_iw7SI.js +3 -0
- package/dist/chunks/Messages-K4DDsDP9.js +10 -0
- package/dist/chunks/Onboarding-C1UdzM-1.js +1 -0
- package/dist/chunks/{PromptInputFooterSuggestions-lkr_A5jQ.js → PromptInputFooterSuggestions-AyLog8p7.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-DaQKKyM5.js → PromptInputHelpMenu-oyic20ip.js} +1 -1
- package/dist/chunks/ProviderSetup-XcBHjUnd.js +1 -0
- package/dist/chunks/QueryEngine-DYxBjJ4i.js +1 -0
- package/dist/chunks/REPL-CQBJRrT0.js +124 -0
- package/dist/chunks/REPL-CrVuMQY2.js +1 -0
- package/dist/chunks/ResumeConversation-Dl8H9Gfy.js +1 -0
- package/dist/chunks/SearchExtraToolsTool-lv7VE50N.js +1 -0
- package/dist/chunks/{SelectMulti-CNE06VAN.js → SelectMulti-Bc6l11_K.js} +1 -1
- package/dist/chunks/Settings-TGp3fPrS.js +3 -0
- package/dist/chunks/Spinner-zYPFVFHN.js +1 -0
- package/dist/chunks/{SpinnerGlyph-A6G-gloN.js → SpinnerGlyph-CmkRUvHe.js} +1 -1
- package/dist/chunks/{TextInput-7uqPhq9T.js → TextInput-CD9iau2k.js} +5 -5
- package/dist/chunks/{ThemePicker-DT9zVy-0.js → ThemePicker-0F0hZYPX.js} +1 -1
- package/dist/chunks/TrustDialog-C76YiMKz.js +1 -0
- package/dist/chunks/{ValidationErrorsList-BLtP647v.js → ValidationErrorsList-DgNzJQUP.js} +1 -1
- package/dist/chunks/_baseEach-4ff-vRlp.js +1 -0
- package/dist/chunks/add-dir-JMsRLGfx.js +1 -0
- package/dist/chunks/{agentDisplay-vLQHFrmq.js → agentDisplay-BReJUBWg.js} +1 -1
- package/dist/chunks/agents-9qQ8I6zW.js +101 -0
- package/dist/chunks/{agents-DLz0kfsr.js → agents-B3x8yJ_r.js} +1 -1
- package/dist/chunks/allErrors-DfWylHSw.js +1 -0
- package/dist/chunks/{appleTerminalBackup-BYKdf3of.js → appleTerminalBackup-BArZWB21.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-BGxHB_OX.js +1 -0
- package/dist/chunks/backgroundHousekeeping-CVNIhQg8.js +17 -0
- package/dist/chunks/banner-Cu2-XUek.js +2 -0
- package/dist/chunks/{bedrockClient-DxE_mHFI.js → bedrockClient-CfiDN-kF.js} +2 -2
- package/dist/chunks/branch-C4TsMEkx.js +2 -0
- package/dist/chunks/{break-cache-BL2gnDLX.js → break-cache-BMXqFTeS.js} +2 -2
- package/dist/chunks/btw-Dn1eYFAz.js +1 -0
- package/dist/chunks/caches-BGzKwpnc.js +1 -0
- package/dist/chunks/caches-DArHxBgL.js +1 -0
- package/dist/chunks/{claudeDesktop-D3PEgx3U.js → claudeDesktop-D8ml2767.js} +1 -1
- package/dist/chunks/{clear-CXfhVRp8.js → clear-Bdhb6b39.js} +1 -1
- package/dist/chunks/{client-DdenNfkQ.js → client-4iqhC8xq.js} +1 -1
- package/dist/chunks/client-BiqbIkwr.js +1 -0
- package/dist/chunks/client-CZ8nyVh5.js +1 -0
- package/dist/chunks/{client-DvhWKIOx.js → client-CpTCeWba.js} +1 -1
- package/dist/chunks/commands-QepeBbFn.js +1 -0
- package/dist/chunks/compact-Bu9BUpxV.js +2 -0
- package/dist/chunks/config-C-Y2qtB2.js +3 -0
- package/dist/chunks/config-D58C3_Lu.js +1 -0
- package/dist/chunks/config-DD8fCYXn.js +1 -0
- package/dist/chunks/{context-3s9wtn4L.js → context-CY_yfdYa.js} +1 -1
- package/dist/chunks/context-noninteractive-BDDi3NLF.js +1 -0
- package/dist/chunks/{context-noninteractive-CJhUu_4y.js → context-noninteractive-Dd4xIoP1.js} +5 -5
- package/dist/chunks/conversation-B0wxBwzv.js +1 -0
- package/dist/chunks/conversation-DUu9qBnq.js +1 -0
- package/dist/chunks/conversationRecovery-2ft8sCPE.js +1 -0
- package/dist/chunks/crossProjectResume-6boHMUBx.js +40 -0
- package/dist/chunks/cwd-Dc3NV7s8.js +1 -0
- package/dist/chunks/cwd-Pa83R95t.js +1 -0
- package/dist/chunks/{datadog-v_mXWncN.js → datadog-BPuGcxxC.js} +1 -1
- package/dist/chunks/{debug-8DCufdSp.js → debug-Bglx1aTu.js} +5 -5
- package/dist/chunks/{detectRepository-DfX8xXw2.js → detectRepository-CfX8Lc0A.js} +1 -1
- package/dist/chunks/{diff-DJSt7QO6.js → diff-BOAElpfQ.js} +1 -1
- package/dist/chunks/{directoryCompletion-CT6YVeg7.js → directoryCompletion-D_Rtg-4j.js} +1 -1
- package/dist/chunks/dist-es-B3-7VFf2.js +1 -0
- package/dist/chunks/dist-es-B7j_mv242.js +1 -0
- package/dist/chunks/dist-es-BSKD_hOQ.js +1 -0
- package/dist/chunks/dist-es-BSRN-2nA.js +9 -0
- package/dist/chunks/{dist-es-yHGBqhBe.js → dist-es-BXXmyhQ2.js} +1 -1
- package/dist/chunks/{dist-es-C3reqy7X.js → dist-es-BaQndfvh2.js} +1 -1
- package/dist/chunks/dist-es-CzTYn7xo.js +1 -0
- package/dist/chunks/dist-es-DSkyibcN.js +1 -0
- package/dist/chunks/{dist-es-BOPBJQo3.js → dist-es-_UNJQniz.js} +1 -1
- package/dist/chunks/dist-es-hwK6468D.js +1 -0
- package/dist/chunks/dist-es-ovsdbtwh.js +1 -0
- package/dist/chunks/doctor-CkLzqAMd.js +1 -0
- package/dist/chunks/{entry-ex0-RyYV.js → entry-TNOoyy7_.js} +4 -4
- package/dist/chunks/{envUtils-DcaKZlRU.js → envUtils-DfkgIdYf.js} +1 -1
- package/dist/chunks/esm-eTAUP-La.js +1 -0
- package/dist/chunks/{execFileNoThrow-BsfuytkN.js → execFileNoThrow-BTachNBI.js} +1 -1
- package/dist/chunks/exit-DXApFJIP.js +1 -0
- package/dist/chunks/extraUsage-CmQaLPV1.js +1 -0
- package/dist/chunks/extractMemories-xP63mv6R.js +1 -0
- package/dist/chunks/fast-C5nQH8rm.js +1 -0
- package/dist/chunks/fast-eGx2IxD7.js +1 -0
- package/dist/chunks/fetchModelList-CxLsVNsu.js +1 -0
- package/dist/chunks/fetchModelList-D24lRIgR.js +1 -0
- package/dist/chunks/{fileSuggestions-B-SLfb-o.js → fileSuggestions-DHxdwq28.js} +2 -2
- package/dist/chunks/firstPartyEventLogger-BVAogAX8.js +1 -0
- package/dist/chunks/firstPartyEventLogger-M6UMli2c.js +3 -0
- package/dist/chunks/{gemini-BC9kHhwe.js → gemini-D_ORb_L6.js} +2 -2
- package/dist/chunks/generateSessionName-BQoDduyA.js +1 -0
- package/dist/chunks/{genericProcessUtils-BYi0OefF.js → genericProcessUtils-DwQFuna9.js} +1 -1
- package/dist/chunks/goal-D7c2mSds.js +3 -0
- package/dist/chunks/grok-B2-ZbUiR.js +1 -0
- package/dist/chunks/grove-O6qp7ITR.js +1 -0
- package/dist/chunks/{help-CK90i4hE.js → help-CZJdRviD.js} +1 -1
- package/dist/chunks/history-CQiUERTL.js +1 -0
- package/dist/chunks/hooks-BNuUlMzL.js +1 -0
- package/dist/chunks/{hooks-BRFDg9DV.js → hooks-DIvN6gdv.js} +3 -3
- package/dist/chunks/{install-ZMll-dAa.js → install-T_CV1Slu.js} +1 -1
- package/dist/chunks/instrumentation-BjqUZ383.js +21 -0
- package/dist/chunks/{job-G_ukhLc4.js → job-R6c4-3c8.js} +1 -1
- package/dist/chunks/keybindings-CLRaiL_Z.js +1 -0
- package/dist/chunks/{launchLocalMemory-BcRlXLm6.js → launchLocalMemory-DrbKrwXc.js} +2 -2
- package/dist/chunks/launchOnboarding-tqsMD8ni.js +8 -0
- package/dist/chunks/loadAgentsDir-CcmY8zCj.js +1 -0
- package/dist/chunks/{loadAgentsDir-C1LkW7gl.js → loadAgentsDir-DlPbtIsS.js} +540 -543
- package/dist/chunks/loadPluginHooks-C_msxVIc.js +1 -0
- package/dist/chunks/{loader-C61fB6vU.js → loader-CICGtLp2.js} +1 -1
- package/dist/chunks/{localSearch-DFo_WTMm.js → localSearch-CK-sFzPm.js} +1 -1
- package/dist/chunks/localSearch-DrUj0B-d.js +1 -0
- package/dist/chunks/{log-DaILwWJa.js → log-D2TIwHBV.js} +1 -1
- package/dist/chunks/logoUtils-x2pHV-Nl.js +1 -0
- package/dist/chunks/{magicDocs-DYc9TFmI.js → magicDocs-BEF8D3if.js} +3 -3
- package/dist/chunks/main-kOVUGxOS.js +345 -0
- package/dist/chunks/managedEnv-BEqrGqn1.js +1 -0
- package/dist/chunks/managedEnv-OPlzUPbJ.js +1 -0
- package/dist/chunks/mcp-BNd29r6p.js +6 -0
- package/dist/chunks/mcp-D0wAJrRT.js +1 -0
- package/dist/chunks/mcp-mgOlm1cY.js +2 -0
- package/dist/chunks/memory-DDLk9_LJ.js +1 -0
- package/dist/chunks/{mode-Pan-Q2c4.js → mode-CcNsWgK3.js} +2 -2
- package/dist/chunks/model-BwBG0V1u.js +1 -0
- package/dist/chunks/model-DzCP4K-9.js +1 -0
- package/dist/chunks/modelOptions-DRaG3bo0.js +1 -0
- package/dist/chunks/nativeInstaller-C3pVPqrZ.js +1 -0
- package/dist/chunks/notifications-4wP1Tx9Y.js +1 -0
- package/dist/chunks/onChangeAppState-BlaoFbYF.js +1 -0
- package/dist/chunks/openai-CDN71NdX.js +2 -0
- package/dist/chunks/{overlayContext-CMV7nYR9.js → overlayContext-BT2Lq8ei.js} +1 -1
- package/dist/chunks/{panel-D9fGQgln.js → panel-CVS4SK_E.js} +1 -1
- package/dist/chunks/parser-CG5RuOCK.js +1 -0
- package/dist/chunks/{parser-D8slvrJP.js → parser-Cg6hSCmn.js} +1 -1
- package/dist/chunks/partition-CIl_ORUT.js +1 -0
- package/dist/chunks/{pasteStore-DNV1M5Xd.js → pasteStore-P0zP-ch0.js} +1 -1
- package/dist/chunks/permissions-zSNOZSwr.js +3 -0
- package/dist/chunks/pidLock-BTqO-h7Y.js +3 -0
- package/dist/chunks/{plan-CQLnPLuE.js → plan-Bs6em6lk.js} +1 -1
- package/dist/chunks/{platform-Dzff1WWw.js → platform-BacQ6ACS.js} +1 -1
- package/dist/chunks/plugin-DDDxjBa0.js +17 -0
- package/dist/chunks/{pluginAutoupdate-BJaAqwTH.js → pluginAutoupdate-8qugAFhb.js} +1 -1
- package/dist/chunks/pluginBlocklist-q01ackCf.js +1 -0
- package/dist/chunks/pluginCliCommands-DXZfCZsv.js +1 -0
- package/dist/chunks/{pluginFlagging-DQP8tBi2.js → pluginFlagging-BG2MHCQJ.js} +1 -1
- package/dist/chunks/pluginOperations-hXYLrzM2.js +2 -0
- package/dist/chunks/{pluginStartupCheck-CfRvCrFg.js → pluginStartupCheck-DTMa6TgL.js} +1 -1
- package/dist/chunks/pluginStartupCheck-HS1ZceZa.js +1 -0
- package/dist/chunks/plugins-COoGBYk6.js +4 -0
- package/dist/chunks/{poorMode-J5SYJvoY.js → poorMode-B0QGV6Ci.js} +1 -1
- package/dist/chunks/poorMode-G-pnu6NM.js +1 -0
- package/dist/chunks/print-BASybEtO.js +13 -0
- package/dist/chunks/processBashCommand-DDi_Pymt.js +1 -0
- package/dist/chunks/processSlashCommand-Cq9kaoSF.js +5 -0
- package/dist/chunks/{projectContext-Bw3o5BrN.js → projectContext-5fmRr6Sd.js} +1 -1
- package/dist/chunks/{projectContext-BN2ZWzOG.js → projectContext-DhtjLv3k.js} +1 -1
- package/dist/chunks/{projectOnboardingState-CJycxw5P.js → projectOnboardingState-B5YATuc6.js} +1 -1
- package/dist/chunks/prompt-CHobfCB1.js +1 -0
- package/dist/chunks/prompt-CMm6RHHc.js +1 -0
- package/dist/chunks/{prompt-BGqgPgCU.js → prompt-mM79EGnT.js} +1 -1
- package/dist/chunks/{promptEditor-CmQ9p4oe.js → promptEditor-DLGN_eLu.js} +1 -1
- package/dist/chunks/{protocolHandler-CJo9-PfZ.js → protocolHandler-DjQALaU2.js} +1 -1
- package/dist/chunks/{proxy-CB17QimU.js → proxy-CDBfZjO7.js} +2 -2
- package/dist/chunks/reconciler-CeXqh95g.js +1 -0
- package/dist/chunks/refresh-Ce2yk28a.js +1 -0
- package/dist/chunks/{registerProtocol-CLIpzVwF.js → registerProtocol-CAsDme_E.js} +1 -1
- package/dist/chunks/reject-Bld5E-bn.js +1 -0
- package/dist/chunks/{reload-plugins-DjugL8jH.js → reload-plugins-C42xSB5l.js} +1 -1
- package/dist/chunks/rename-CtBghpxZ.js +1 -0
- package/dist/chunks/{renderOptions-Zqfm2U1y.js → renderOptions-DV0dn0IW.js} +1 -1
- package/dist/chunks/resume-BWkaTDqd.js +2 -0
- package/dist/chunks/ripgrep-DLs8MraF.js +1 -0
- package/dist/chunks/{ripgrep-BuzOTf1S.js → ripgrep-Dl3y5r4m.js} +1 -1
- package/dist/chunks/{runtimeObserver-CK_iZ6OB.js → runtimeObserver-1wQO8HSZ.js} +1 -1
- package/dist/chunks/{runtimeObserver-CpP0L9T9.js → runtimeObserver-XQrOux41.js} +4 -4
- package/dist/chunks/sandbox-adapter-8GO6eJxw.js +1 -0
- package/dist/chunks/{sandbox-toggle-KOHYvbQT.js → sandbox-toggle-Dir9Polo.js} +1 -1
- package/dist/chunks/searchExtraTools-BhDq8DTJ.js +1 -0
- package/dist/chunks/{select-C_KXmqbI.js → select-Bxf5-5sI.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-CozocHQE.js +1 -0
- package/dist/chunks/sessionObserver-DGEQM4cO.js +1 -0
- package/dist/chunks/{sessionObserver-WOYv2n7C.js → sessionObserver-DS4G6mb9.js} +2 -2
- package/dist/chunks/sessionStorage-BcAscOGE.js +1 -0
- package/dist/chunks/sessionTracing-BoDDYLxW.js +11 -0
- package/dist/chunks/settings-B2jvL8Dp.js +24 -0
- package/dist/chunks/settings-CisDe8DB.js +1 -0
- package/dist/chunks/setup-BRypY6iT.js +3 -0
- package/dist/chunks/{shadowedRuleDetection-Df-kZ_pK.js → shadowedRuleDetection-BRxZjobz.js} +1 -1
- package/dist/chunks/{sideQuestion-CMB8hfgX.js → sideQuestion-DLJxyrlp.js} +3 -3
- package/dist/chunks/sinks-CGdKmq_8.js +1 -0
- package/dist/chunks/sinks-Cz2HfgMU.js +1 -0
- package/dist/chunks/skillChangeDetector-xviGstqm.js +1 -0
- package/dist/chunks/{skillGapStore-CfmlO6pb.js → skillGapStore-CKN_d3pO.js} +2 -2
- package/dist/chunks/{skillLifecycle-BQ2LMfMx.js → skillLifecycle-BMY2JGGG.js} +2 -2
- package/dist/chunks/{skillSearchPanel-BwYuwLFs.js → skillSearchPanel-D9trHULQ.js} +2 -2
- package/dist/chunks/{skills-BVHPQma0.js → skills-CX_AvwLG.js} +1 -1
- package/dist/chunks/startupProfiler-BH0FoI66.js +1 -0
- package/dist/chunks/{startupProfiler-DTs9w9EN.js → startupProfiler-CJdr3SxP.js} +2 -2
- package/dist/chunks/state-B4jiUise.js +1 -0
- package/dist/chunks/state-BhOKSFi5.js +1 -0
- package/dist/chunks/status-Daaak6Bo.js +1 -0
- package/dist/chunks/statusNoticeHelpers-vFVgIYuw.js +1 -0
- package/dist/chunks/{stringUtils-BQm3OfeJ.js → stringUtils-C718f5ey.js} +1 -1
- package/dist/chunks/sts-ei3CGBNu.js +1 -0
- package/dist/chunks/switcher-BpgmH4AI.js +1 -0
- package/dist/chunks/{switcher-Bq1Ct_Sn.js → switcher-CAajZeNL.js} +1 -1
- package/dist/chunks/{tasks-0c8Uy04D.js → tasks-BWNQr2d3.js} +1 -1
- package/dist/chunks/{templateJobs-BdFzE9XG.js → templateJobs-gUET39Ho.js} +1 -1
- package/dist/chunks/{terminalSetup-Cf_r6pwK.js → terminalSetup-B_10N_gE.js} +3 -3
- package/dist/chunks/{terminalSetup-D7J6bxcn.js → terminalSetup-qc2PlvOm.js} +1 -1
- package/dist/chunks/{theme-Bby4fssR.js → theme-B7fKI6E5.js} +1 -1
- package/dist/chunks/tipRegistry-DamZr34w.js +2 -0
- package/dist/chunks/{toolEventObserver-CzFZUIsM.js → toolEventObserver-BL06sDI4.js} +1 -1
- package/dist/chunks/toolPool-CX5wDBi1.js +1 -0
- package/dist/chunks/{types-zk5Ltv5q.js → types-Dx7P7JLQ.js} +2 -2
- package/dist/chunks/udsClient-cQz6nJ_T.js +1 -0
- package/dist/chunks/{use-select-navigation-DMaC_3iw.js → use-select-navigation-BiUJdWai.js} +1 -1
- package/dist/chunks/{useExitOnCtrlCDWithKeybindings-CjW3gUOt.js → useExitOnCtrlCDWithKeybindings-C9BYG8Bo.js} +1 -1
- package/dist/chunks/useMainLoopModel-DwjSVzzO.js +1 -0
- package/dist/chunks/useManagePlugins-BqfIVa6E.js +1 -0
- package/dist/chunks/{useMergedTools-DarmnCEw.js → useMergedTools-Bw8FchX8.js} +1 -1
- package/dist/chunks/{useSearchInput-C2JuUW3g.js → useSearchInput-B25K1RnK.js} +1 -1
- package/dist/chunks/useSettingsErrors-DYQ44kX4.js +1 -0
- package/dist/chunks/{util-Bq5l7FF5.js → util-CtlC2dsN.js} +1 -1
- package/dist/chunks/validatePlugin-D6tFo87L.js +1 -0
- package/dist/chunks/vim-CoRp9lY1.js +1 -0
- package/dist/chunks/worktree-B8apCnVe.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -5
- package/dist/chunks/AgentsMdExternalIncludesDialog-DCvgQ6n3.js +0 -1
- package/dist/chunks/App-BcEI6U5j.js +0 -1
- package/dist/chunks/ApproveApiKey-DegdTXZl.js +0 -1
- package/dist/chunks/ApproveApiKey-_VXIMSwY.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-CjBt1L0p.js +0 -2
- package/dist/chunks/CustomSelect-B46Eh0gU.js +0 -1
- package/dist/chunks/Doctor-BP0Rqraa.js +0 -1
- package/dist/chunks/Doctor-By_y3C2V.js +0 -3
- package/dist/chunks/Grove-C3mhgshv.js +0 -11
- package/dist/chunks/MCPConnectionManager-ChN4Ayjk.js +0 -1
- package/dist/chunks/MCPToolListView-DLSrQHDc.js +0 -1
- package/dist/chunks/MessageSelector-CdDlJE48.js +0 -3
- package/dist/chunks/Messages-DuL_r1Or.js +0 -10
- package/dist/chunks/Onboarding-CE2GNA-h.js +0 -1
- package/dist/chunks/QueryEngine-DNNy1UCD.js +0 -1
- package/dist/chunks/REPL-CEhW-C41.js +0 -1
- package/dist/chunks/REPL-CkSL4C_8.js +0 -124
- package/dist/chunks/ResumeConversation-BMCO_3X7.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-DSy_jDhf.js +0 -1
- package/dist/chunks/Settings-mDykHLok.js +0 -2
- package/dist/chunks/Spinner-DwsJJUtn.js +0 -1
- package/dist/chunks/TrustDialog-G4jM9IfM.js +0 -1
- package/dist/chunks/add-dir-7RfQAC3h.js +0 -1
- package/dist/chunks/agents-BNg_skSm.js +0 -101
- package/dist/chunks/allErrors-DaztSMrw.js +0 -1
- package/dist/chunks/auth-BTB00dq5.js +0 -10
- package/dist/chunks/auth-Bbc0Ny8i.js +0 -1
- package/dist/chunks/backgroundHousekeeping-DYz83_8C.js +0 -1
- package/dist/chunks/backgroundHousekeeping-bEZtlJSf.js +0 -17
- package/dist/chunks/banner-mqZEluky.js +0 -2
- package/dist/chunks/branch-exFKkymg.js +0 -2
- package/dist/chunks/btw-3l78DYET.js +0 -1
- package/dist/chunks/caches-6Nx6tsk9.js +0 -1
- package/dist/chunks/caches-ouaWB9bY.js +0 -1
- package/dist/chunks/client-C01Bnxxv.js +0 -1
- package/dist/chunks/client-DYRgRQsr.js +0 -1
- package/dist/chunks/commands-BoxOw75F.js +0 -1
- package/dist/chunks/compact-BOYr105K.js +0 -2
- package/dist/chunks/config-BddEvZZl.js +0 -3
- package/dist/chunks/config-GEv9hUzz.js +0 -1
- package/dist/chunks/config-kw4xg7Nk.js +0 -1
- package/dist/chunks/context-noninteractive-DFvoZ2L9.js +0 -1
- package/dist/chunks/conversation-CoGharlH.js +0 -1
- package/dist/chunks/conversation-MxEVm54C.js +0 -1
- package/dist/chunks/conversationRecovery-Da_8uldZ.js +0 -1
- package/dist/chunks/crossProjectResume-CzPCHq_K.js +0 -40
- package/dist/chunks/cwd-BcO6WHKo.js +0 -1
- package/dist/chunks/cwd-CDUelriw.js +0 -1
- package/dist/chunks/dist-es-5t7v8oaj.js +0 -1
- package/dist/chunks/dist-es-BIjDeceU.js +0 -1
- package/dist/chunks/dist-es-C-OjW2Ao.js +0 -1
- package/dist/chunks/dist-es-CEk66gUu.js +0 -1
- package/dist/chunks/dist-es-CIULjvtA2.js +0 -1
- package/dist/chunks/dist-es-CMtO44xC.js +0 -1
- package/dist/chunks/dist-es-CYPVg66r.js +0 -9
- package/dist/chunks/dist-es-D1Y8zSMI.js +0 -1
- package/dist/chunks/dist-es-Gt_DpXlP.js +0 -1
- package/dist/chunks/dist-es-kj-F5A132.js +0 -1
- package/dist/chunks/doctor-DWvioSU9.js +0 -1
- package/dist/chunks/esm-BQY8jJNR.js +0 -1
- package/dist/chunks/exit-BxC_ZEtO.js +0 -1
- package/dist/chunks/extraUsage-DYm33Occ.js +0 -1
- package/dist/chunks/extractMemories-CzN3Ax2B.js +0 -1
- package/dist/chunks/fast-DqUpl_Lr.js +0 -1
- package/dist/chunks/fast-NUdUyAaM.js +0 -1
- package/dist/chunks/fetchModelList-CqsTAWEN.js +0 -1
- package/dist/chunks/fetchModelList-DBMHE6Ng.js +0 -1
- package/dist/chunks/firstPartyEventLogger-C0q45h_4.js +0 -3
- package/dist/chunks/firstPartyEventLogger-CP8hCBDj.js +0 -1
- package/dist/chunks/generateSessionName-ChvKBVxB.js +0 -1
- package/dist/chunks/goal-ByyimpVU.js +0 -3
- package/dist/chunks/grok-DenjixMl.js +0 -1
- package/dist/chunks/grove-Dq8QbQ9o.js +0 -7
- package/dist/chunks/history-CNQNd6hT.js +0 -1
- package/dist/chunks/hooks-BaYwmkxD.js +0 -1
- package/dist/chunks/instrumentation-BwVyvRfY.js +0 -21
- package/dist/chunks/keybindings-wNxBzDVQ.js +0 -1
- package/dist/chunks/launchOnboarding-CDjQ64RO.js +0 -8
- package/dist/chunks/loadAgentsDir-DKXap_Om.js +0 -1
- package/dist/chunks/loadPluginHooks-DtmHtEiS.js +0 -1
- package/dist/chunks/localSearch-BB9x5C2N.js +0 -1
- package/dist/chunks/logoUtils-Dj_2SWmO.js +0 -1
- package/dist/chunks/main-BRg8L_aw.js +0 -346
- package/dist/chunks/managedEnv-DsqAYOJ4.js +0 -1
- package/dist/chunks/managedEnv-lybrMred.js +0 -1
- package/dist/chunks/mcp-Bsw3cMiJ.js +0 -6
- package/dist/chunks/mcp-DDdud6Y7.js +0 -1
- package/dist/chunks/mcp-DbgTDUt7.js +0 -2
- package/dist/chunks/memory-CzwTzihf.js +0 -1
- package/dist/chunks/model-BYfmXKHf.js +0 -1
- package/dist/chunks/model-BwBE0Pt5.js +0 -1
- package/dist/chunks/modelOptions-DvNBapgG.js +0 -1
- package/dist/chunks/nativeInstaller-DnSNJWIi.js +0 -1
- package/dist/chunks/notifications-B0DTaYoy.js +0 -1
- package/dist/chunks/omit-Dl1Us_PY.js +0 -1
- package/dist/chunks/onChangeAppState-4KOJMN82.js +0 -1
- package/dist/chunks/openai-C_6C1_0N.js +0 -10
- package/dist/chunks/parser-BKAVMTyD.js +0 -1
- package/dist/chunks/partition-B504IgAa.js +0 -1
- package/dist/chunks/permissions-CLFMhdRk.js +0 -3
- package/dist/chunks/pidLock-D9do1Afy.js +0 -3
- package/dist/chunks/plugin-BYdF7uob.js +0 -17
- package/dist/chunks/pluginBlocklist-DKKmOnWM.js +0 -1
- package/dist/chunks/pluginCliCommands-z8TtJMKH.js +0 -1
- package/dist/chunks/pluginOperations-BcfJCDco.js +0 -2
- package/dist/chunks/pluginStartupCheck-Cq4PvULa.js +0 -1
- package/dist/chunks/plugins-CTM8jpOw.js +0 -4
- package/dist/chunks/policyLimits-a7ix6GnU.js +0 -1
- package/dist/chunks/poorMode-C11JEH3d.js +0 -1
- package/dist/chunks/print-u6MzL5Cr.js +0 -13
- package/dist/chunks/processBashCommand-DIwrI2QC.js +0 -1
- package/dist/chunks/processSlashCommand-B-Gujpxm.js +0 -5
- package/dist/chunks/prompt-BPJDGlx5.js +0 -1
- package/dist/chunks/prompt-DEdZzkEz.js +0 -1
- package/dist/chunks/reconciler-DSKLuOS7.js +0 -1
- package/dist/chunks/refresh-BbZFCNpn.js +0 -1
- package/dist/chunks/rename-DOtCOtEr.js +0 -1
- package/dist/chunks/resume-BB4T4WIV.js +0 -2
- package/dist/chunks/ripgrep-CZ2CqaHb.js +0 -1
- package/dist/chunks/sandbox-adapter-DhJJ6WOV.js +0 -1
- package/dist/chunks/searchExtraTools-CdJghGkj.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-D7KbWFp7.js +0 -1
- package/dist/chunks/sessionObserver-DB-sLv-X.js +0 -1
- package/dist/chunks/sessionStorage-sgOAbDn7.js +0 -1
- package/dist/chunks/sessionTracing-yBre24PH.js +0 -11
- package/dist/chunks/settings-C-KNkvsM.js +0 -1
- package/dist/chunks/settings-DKN4xSpQ.js +0 -24
- package/dist/chunks/setup-CN_Pk7AR.js +0 -3
- package/dist/chunks/sinks-BS17vtN0.js +0 -1
- package/dist/chunks/sinks-D1EjkHb4.js +0 -1
- package/dist/chunks/skillChangeDetector-CBKuGuEi.js +0 -1
- package/dist/chunks/startupProfiler-B_U4QDtf.js +0 -1
- package/dist/chunks/state-BowF111d.js +0 -1
- package/dist/chunks/state-CGuyDES7.js +0 -1
- package/dist/chunks/status-BurdTfyz.js +0 -2
- package/dist/chunks/status-DMq1An5h.js +0 -1
- package/dist/chunks/statusNoticeHelpers-X75JNlx5.js +0 -1
- package/dist/chunks/sts-C2Gf2WYN.js +0 -1
- package/dist/chunks/switcher-DGD4ORVf.js +0 -1
- package/dist/chunks/tipRegistry-CyRXWWTz.js +0 -2
- package/dist/chunks/toolPool-CnrZcprA.js +0 -1
- package/dist/chunks/udsClient-ftP0yIpe.js +0 -1
- package/dist/chunks/useMainLoopModel-DWscpA9I.js +0 -1
- package/dist/chunks/useManagePlugins-CYXVcql2.js +0 -1
- package/dist/chunks/useSettingsErrors-DutJBiKZ.js +0 -1
- package/dist/chunks/validatePlugin-DIdEydz_.js +0 -1
- package/dist/chunks/vim-D8prM2IH.js +0 -1
- package/dist/chunks/worktree-Caqt2WRZ.js +0 -1
- /package/dist/chunks/{dist-es-Cgsa8pb82.js → dist-es-Cgsa8pb8.js} +0 -0
- /package/dist/chunks/{dist-es-Cwru7c2B2.js → dist-es-Cwru7c2B.js} +0 -0
- /package/dist/chunks/{dist-es-DXIR5NLi2.js → dist-es-DXIR5NLi.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ar as e,Da as t,Fr as n,HS as r,PS as i,Sr as a,Um as o,Vn as s,Vp as c,Wm as l,Yp as u,ZS as d,Zi as f,as as p,ba as m,cT as h,dm as g,dr as _,fa as v,fm as y,ir as b,is as x,jr as S,la as C,ns as w,qr as T,rT as E,vr as D,xa as O,zn as k}from"./loadAgentsDir-C1LkW7gl.js";import{t as A,zt as j}from"./state-BowF111d.js";import{n as M,t as N}from"./cwd-BcO6WHKo.js";import{Bt as P,zt as F}from"./settings-DKN4xSpQ.js";import{o as I,s as L}from"./log-DaILwWJa.js";import{relative as R}from"path";M(),j(),y(),P(),w(),u(),I(),f(),h(),o(),D();function z(e){if(e.type!==`attachment`)return e;let t=e.attachment;if(t.type===`new_file`)return{...e,attachment:{...t,type:`file`,displayPath:R(N(),t.filename)}};if(t.type===`new_directory`)return{...e,attachment:{...t,type:`directory`,displayPath:R(N(),t.path)}};if(!(`displayPath`in t)){let n=`filename`in t?t.filename:`path`in t?t.path:`skillDir`in t?t.skillDir:void 0;if(n)return{...e,attachment:{...t,displayPath:R(N(),n)}}}return e}function B(e){return V(e).messages}function V(e){try{let t=e.map(z),n=new Set(F);for(let e of t)e.type===`user`&&e.permissionMode!==void 0&&!n.has(e.permissionMode)&&(e.permissionMode=void 0);let a=C(m(O(t))),o=H(a),s;if(o.kind===`interrupted_turn`){let[e]=v([r({content:`Continue from where you left off.`,isMeta:!0})]);a.push(e),s={kind:`interrupted_prompt`,message:e}}else s=o;let c=a.findLastIndex(e=>e.type!==`system`&&e.type!==`progress`);return c!==-1&&a[c].type===`user`&&a.splice(c+1,0,i({content:d})),{messages:a,turnInterruptionState:s}}catch(e){throw L(e),e}}function H(e){if(e.length===0)return{kind:`none`};let n=e.findLastIndex(e=>e.type!==`system`&&e.type!==`progress`&&!(e.type===`assistant`&&e.isApiErrorMessage)),r=n===-1?void 0:e[n];return!r||r.type===`assistant`?{kind:`none`}:r.type===`user`?r.isMeta||r.isCompactSummary?{kind:`none`}:t(r)?{kind:`interrupted_turn`}:{kind:`interrupted_prompt`,message:r}:r.type===`attachment`?{kind:`interrupted_turn`}:{kind:`none`}}function U(e){for(let t of e)if(t.type===`attachment`){if(t.attachment.type===`invoked_skills`){let e=t.attachment.skills;for(let t of e)t.name&&t.path&&t.content&&A(t.name,t.path,t.content,null)}t.attachment.type===`skill_listing`&&p()}p(),x()}async function W(e){let{messages:t,leafUuids:r}=await n(e),i=null,a=0;for(let e of t.values()){if(e.isSidechain||!r.has(e.uuid))continue;let t=new Date(e.timestamp).getTime();t>a&&(a=t,i=e)}return i?{messages:T(k(t,i)),sessionId:i.sessionId}:{messages:[],sessionId:void 0}}async function G(t,n){try{let r=null,i=null,o;if(t===void 0){let e=S(),t=new Set;try{let{listAllLiveSessions:e}=await import(`./udsClient-ftP0yIpe.js`),n=await e();t=new Set(n.flatMap(e=>e.kind&&e.kind!==`interactive`&&e.sessionId?[e.sessionId]:[]))}catch{}r=(await e).find(e=>{let n=_(e);return!n||!t.has(n)})??null}else if(n){let e=await W(n);i=e.messages,o=e.sessionId}else typeof t==`string`?(r=await b(t),o=t):r=t;if(!r&&!i)return null;r&&(a(r)&&(r=await e(r)),o||(o=_(r)),o&&await E(r,g(o)),c(r),i=r.messages,s(i)),U(i);let u=V(i);i=u.messages;let d=await l(`resume`,{sessionId:o});return i.push(...d),{messages:i,turnInterruptionState:u.turnInterruptionState,fileHistorySnapshots:r?.fileHistorySnapshots,attributionSnapshots:r?.attributionSnapshots,contentReplacements:r?.contentReplacements,contextCollapseCommits:r?.contextCollapseCommits,contextCollapseSnapshot:r?.contextCollapseSnapshot,sessionId:o,agentName:r?.agentName,agentColor:r?.agentColor,agentSetting:r?.agentSetting,customTitle:r?.customTitle,tag:r?.tag,mode:r?.mode,worktreeSession:r?.worktreeSession,prNumber:r?.prNumber,prUrl:r?.prUrl,prRepository:r?.prRepository,fullPath:r?.fullPath,goal:r?.goal}}catch(e){throw L(e),e}}export{G as n,B as t};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Ar as n,Cc as r,Si as i,Sr as a,Ub as o,Yb as s,ad as c,br as l,cC as u,dr as d,fx as f,id as p,ni as ee,px as m,rr as te,sC as h,vr as g,xc as ne,xi as _}from"./loadAgentsDir-C1LkW7gl.js";import{C as re,D as v,Gr as y,H as ie,I as b,P as x,T as S,Wt as C,Xn as ae,ai as w,di as oe,fi as T,hn as se,k as ce,oi as le,ot as ue,p as E,t as de}from"./src-DL3w8VPk.js";import{t as D}from"./jsx-runtime-Bb4Xn-E0.js";import{Z as fe,ut as pe,zt as me}from"./state-BowF111d.js";import{S as O,c as k,i as A,x as he}from"./debug-8DCufdSp.js";import{Fr as ge,Jn as _e,Ur as ve,qn as j}from"./settings-DKN4xSpQ.js";import{a as M,o as ye,s as be}from"./log-DaILwWJa.js";import{n as xe,r as N}from"./analytics-DJobLaWP.js";import{S as Se,_ as Ce,d as we,p as Te}from"./startupProfiler-DTs9w9EN.js";import{f as Ee,u as De}from"./model-BwBE0Pt5.js";import{n as P,t as Oe}from"./TextInput-7uqPhq9T.js";import{n as ke,t as F}from"./useExitOnCtrlCDWithKeybindings-CjW3gUOt.js";import{n as Ae,t as je}from"./select-C_KXmqbI.js";import{r as Me,t as Ne}from"./Spinner-DwsJJUtn.js";import{l as Pe,u as Fe}from"./SpinnerGlyph-A6G-gloN.js";import{t as Ie}from"./SearchBox-C9xxQzh1.js";import{n as Le,t as Re}from"./useSearchInput-C2JuUW3g.js";import{n as I,t as L}from"./Messages-DuL_r1Or.js";function ze({log:e,onExit:t,onSelect:r}){let[i,o]=R.useState(null);R.useEffect(()=>{o(null),a(e)&&n(e).then(o)},[e]);let s=a(e)&&i===null,c=i??e,l=d(c)||``,u=ne();return C(`confirm:no`,t,{context:`Confirmation`}),C(`confirm:yes`,(0,R.useCallback)(()=>{r(i??e)},[r,i,e]),{context:`Confirmation`}),s?(0,z.jsxs)(b,{flexDirection:`column`,padding:1,children:[(0,z.jsx)(E,{message:`Loading session…`}),(0,z.jsx)(x,{dimColor:!0,children:(0,z.jsx)(S,{children:(0,z.jsx)(p,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})})})]}):(0,z.jsxs)(b,{flexDirection:`column`,children:[(0,z.jsx)(L,{messages:c.messages,tools:u,commands:[],verbose:!0,toolJSX:null,toolUseConfirmQueue:[],inProgressToolUseIDs:new Set,isMessageSelectorVisible:!1,conversationId:l,screen:`transcript`,streamingToolUses:[],showAllInTranscript:!0,isLoading:!1}),(0,z.jsxs)(b,{flexShrink:0,flexDirection:`column`,borderTopDimColor:!0,borderBottom:!1,borderLeft:!1,borderRight:!1,borderStyle:`single`,paddingLeft:2,children:[(0,z.jsxs)(x,{children:[Te(c.modified),` · `,c.messageCount,` messages`,c.gitBranch?` · ${c.gitBranch}`:``]}),(0,z.jsx)(x,{dimColor:!0,children:(0,z.jsxs)(S,{children:[(0,z.jsx)(v,{shortcut:`Enter`,action:`resume`}),(0,z.jsx)(p,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]})]})}var R,z,Be=e((()=>{R=t(w(),1),de(),o(),r(),Ce(),g(),c(),I(),z=D()}));function B(e,t){if(e===H)return 5;let n=y(e),r=t?Math.min(n,t-U-W):n;return Math.max(0,r)+U+W}function Ve(e,t){let n=t-U-W;return y(e)<=n?e:n<=1?e.charAt(0):Se(e,n)}function He({tabs:e,selectedIndex:t,availableWidth:n,showAllProjects:r=!1}){let i=r?`Resume (All Projects)`:`Resume`,a=i.length+1,o=Math.max(qe,K),s=n-a-o-2,c=Math.max(0,Math.min(t,e.length-1)),l=Math.max(20,Math.floor(s/2)),u=e.map(e=>B(e,l)),d=0,f=e.length;if(u.reduce((e,t,n)=>e+t+ +(n<u.length-1),0)>s){let t=s-Ke,n=u[c]??0;for(d=c,f=c+1;d>0||f<e.length;){let r=d>0,i=f<e.length;if(r){let e=(u[d-1]??0)+1;if(n+e<=t){d--,n+=e;continue}}if(i){let e=(u[f]??0)+1;if(n+e<=t){f++,n+=e;continue}}break}}let p=d,ee=e.length-f,m=e.slice(d,f),te=m.map((e,t)=>d+t);return(0,V.jsxs)(b,{flexDirection:`row`,gap:1,children:[(0,V.jsx)(x,{color:`suggestion`,children:i}),p>0&&(0,V.jsxs)(x,{dimColor:!0,children:[G,p]}),m.map((e,t)=>{let n=te[t]===c,r=e===H?e:`#${Ve(e,l-U)}`;return(0,V.jsxs)(x,{backgroundColor:n?`suggestion`:void 0,color:n?`inverseText`:void 0,bold:n,children:[` `,r,` `]},e)}),ee>0?(0,V.jsxs)(x,{dimColor:!0,children:[Ue,ee,We]}):(0,V.jsx)(x,{dimColor:!0,children:Ge})]})}var V,H,U,W,G,Ue,We,Ge,Ke,qe,K,Je=e((()=>{de(),Ce(),V=D(),H=`All`,U=2,W=1,G=`← `,Ue=`→`,We=` (tab to cycle)`,Ge=`(tab to cycle)`,Ke=5,qe=18,K=14}));function Ye({nodes:e,onSelect:t,onCancel:n,onFocus:r,focusNodeId:i,visibleOptionCount:a,layout:o=`expanded`,isDisabled:s=!1,hideIndexes:c=!1,isNodeExpanded:l,onExpand:u,onCollapse:d,getParentPrefix:f,getChildPrefix:p,onUpFromFirstItem:ee}){let[m,te]=q.useState(new Set),h=q.useRef(!1),g=q.useRef(null),ne=q.useCallback(e=>l?l(e):m.has(e),[l,m]),_=q.useMemo(()=>{let t=[];function n(e,r,i){let a=!!e.children&&e.children.length>0,o=ne(e.id);if(t.push({node:e,depth:r,isExpanded:o,hasChildren:a,parentId:i}),a&&o&&e.children)for(let t of e.children)n(t,r+1,e.id)}for(let t of e)n(t,0);return t},[e,ne]),re=q.useCallback(e=>e?`▼ `:`▶ `,[]),v=q.useCallback(e=>` ▸ `,[]),y=f??re,ie=p??v,x=q.useCallback(e=>{let t=``;return e.hasChildren?t=y(e.isExpanded):e.depth>0&&(t=ie(e.depth)),t+e.node.label},[y,ie]),S=q.useMemo(()=>_.map(e=>({label:x(e),description:e.node.description,dimDescription:e.node.dimDescription??!0,value:e.node.id})),[_,x]),C=q.useMemo(()=>{let e=new Map;return _.forEach(t=>e.set(t.node.id,t.node)),e},[_]),ae=q.useCallback(e=>_.find(t=>t.node.id===e),[_]),w=q.useCallback((e,t)=>{ae(e)?.hasChildren&&(t?u?u(e):te(t=>new Set(t).add(e)):d?d(e):te(t=>{let n=new Set(t);return n.delete(e),n}))},[ae,u,d]);return(0,Xe.jsx)(b,{tabIndex:0,autoFocus:!0,onKeyDown:e=>{if(!i||s)return;let t=ae(i);if(t){if(e.key===`right`&&t.hasChildren)e.preventDefault(),w(i,!0);else if(e.key===`left`){if(t.hasChildren&&t.isExpanded)e.preventDefault(),w(i,!1);else if(t.parentId!==void 0&&(e.preventDefault(),h.current=!0,w(t.parentId,!1),r)){let e=C.get(t.parentId);e&&r(e)}}}},children:(0,Xe.jsx)(je,{options:S,onChange:q.useCallback(e=>{let n=C.get(e);n&&t(n)},[C,t]),onFocus:q.useCallback(e=>{if(h.current){h.current=!1;return}if(g.current!==e&&(g.current=e,r)){let t=C.get(e);t&&r(t)}},[r,C]),onCancel:n,defaultFocusValue:i,visibleOptionCount:a,layout:o,isDisabled:s,hideIndexes:c,onUpFromFirstItem:ee})})}var q,Xe,Ze=e((()=>{q=t(w(),1),de(),Ae(),Xe=D()}));function Qe(e,t){return Se(e.replace(/\s+/g,` `).trim(),t)}function $e({before:e,match:t,after:n},r){return oe.dim(e)+r(t)+oe.dim(n)}function et(e,t,n){let r=e.toLowerCase().indexOf(t.toLowerCase());if(r===-1)return null;let i=r+t.length,a=Math.max(0,r-n),o=Math.min(e.length,i+n),s=e.slice(a,r),c=e.slice(r,i),l=e.slice(i,o);return{before:(a>0?`…`:``)+s.replace(/\s+/g,` `).trimStart(),match:c.trim(),after:l.replace(/\s+/g,` `).trimEnd()+(o<e.length?`…`:``)}}function tt(e,t,n){let{isGroupHeader:r=!1,isChild:i=!1,forkCount:a=0}=n||{},o=r&&a>0?ct:i?lt:0,s=r&&a>0?` (+${a} other ${a===1?`session`:`sessions`})`:``,c=e.isSidechain?` (sidechain)`:``,l=t-o-c.length-s.length;return`${Qe(M(e),l)}${c}${s}`}function nt(e,t){let{isChild:n=!1,showProjectPath:r=!1}=t||{},i=n?` `:``,a=we(e),o=r&&e.projectPath?` · ${e.projectPath}`:``;return i+a+o}function rt({logs:e,maxHeight:t=1/0,forceWidth:n,onCancel:r,onSelect:i,onLogsChanged:a,onLoadMore:o,initialSearchQuery:s,showAllProjects:c=!1,onToggleAllProjects:u,onAgenticSearch:f}){let m=ue(),h=n===void 0?m.columns:n,g=ke(r),ne=ae(),y=l(),[w]=ie(),oe=Pe(w),T=J.useMemo(()=>e=>le(e,oe.warning),[oe.warning]),[E,de]=J.useState(null),[D,me]=J.useState(!1),[O,k]=J.useState(!1),[A,he]=J.useState(!1),_e=J.useMemo(()=>fe(),[]),[ve,j]=J.useState(``),[ye,be]=J.useState(0),[xe,Se]=J.useState(new Set),[Ce,Te]=J.useState(null),[Ee,De]=J.useState(1),[P,F]=J.useState(`list`),[Ae,Me]=J.useState(null),Fe=J.useRef(null),[Ie,Re]=J.useState(0),[I,L]=J.useState({status:`idle`}),[R,z]=J.useState(!1),Be=J.useRef(null),{query:B,setQuery:Ve,cursorOffset:V}=Le({isActive:P===`search`&&I.status!==`searching`,onExit:()=>{F(`list`),N(`tengu_session_search_toggled`,{enabled:!1})},onExitUp:()=>{F(`list`),N(`tengu_session_search_toggled`,{enabled:!1})},passthroughCtrlKeys:[`n`],initialQuery:s||``}),H=J.useDeferredValue(B),[U,W]=J.useState(``);J.useEffect(()=>{if(!H){W(``);return}let e=setTimeout(W,300,H);return()=>clearTimeout(e)},[H]);let[G,Ue]=J.useState(null),[We,Ge]=J.useState(!1);J.useEffect(()=>{ge().then(e=>de(e)),_(_e).then(e=>{he(e.length>1)})},[_e]);let Ke=J.useMemo(()=>new Map(e.map(e=>[e,at(e)])),[e]),qe=J.useMemo(()=>null,[e,Ke,!1]),K=J.useMemo(()=>st(e),[e]),Je=K.length>0,q=J.useMemo(()=>Je?[`All`,...K]:[],[Je,K]),Xe=q.length>0&&Ie<q.length?Ie:0,Ze=q[Xe],rt=Ze===`All`?void 0:Ze,it=+!!Je,ct=J.useMemo(()=>{let t=e;return y&&(t=e.filter(e=>{let t=pe(),n=d(e);return!!(t&&n===t||e.customTitle||te(e.messages)||e.firstPrompt||e.customTitle)})),rt!==void 0&&(t=t.filter(e=>e.tag===rt)),D&&E&&(t=t.filter(e=>e.gitBranch===E)),A&&!O&&(t=t.filter(e=>e.projectPath===_e)),t},[e,y,rt,D,E,A,O,_e]),lt=J.useMemo(()=>{if(!B)return ct;let e=B.toLowerCase();return ct.filter(t=>{let n=M(t).toLowerCase(),r=(t.gitBranch||``).toLowerCase(),i=(t.tag||``).toLowerCase(),a=t.prNumber?`pr #${t.prNumber} ${t.prRepository||``}`.toLowerCase():``;return n.includes(e)||r.includes(e)||i.includes(e)||a.includes(e)})},[ct,B]);J.useEffect(()=>{},[H,U,!1]),J.useEffect(()=>{Ue(null),Ge(!1)},[U,qe,!1]);let{filteredLogs:ut,snippets:X}=J.useMemo(()=>{let e=new Map,t=lt;if(G&&U&&G.query===U){for(let t of G.results)if(t.searchableText){let n=et(t.searchableText,U,dt);n&&e.set(t.log,n)}let n=new Set(t.map(e=>e.messages[0]?.uuid)),r=G.results.map(e=>e.log).filter(e=>!n.has(e.messages[0]?.uuid));t=[...t,...r]}return{filteredLogs:t,snippets:e}},[lt,G,U]),Z=J.useMemo(()=>I.status===`results`&&I.results.length>0?I.results:ut,[I,ut]),Q=Math.max(30,h-4),ft=J.useMemo(()=>{if(!y)return[];let e=ot(Z);return Array.from(e.entries()).map(([e,t])=>{let n=t[0],r=Z.indexOf(n),i=X.get(n),a=i?$e(i,T):null;if(t.length===1){let t=nt(n,{showProjectPath:c});return{id:`log:${e}:0`,value:{log:n,indexInFiltered:r},label:tt(n,Q),description:a?`${t}\n ${a}`:t,dimDescription:!0}}let o=t.length-1,s=t.slice(1).map((t,n)=>{let r=Z.indexOf(t),i=X.get(t),a=i?$e(i,T):null,o=nt(t,{isChild:!0,showProjectPath:c});return{id:`log:${e}:${n+1}`,value:{log:t,indexInFiltered:r},label:tt(t,Q,{isChild:!0}),description:a?`${o}\n ${a}`:o,dimDescription:!0}}),l=nt(n,{showProjectPath:c});return{id:`group:${e}`,value:{log:n,indexInFiltered:r},label:tt(n,Q,{isGroupHeader:!0,forkCount:o}),description:a?`${l}\n ${a}`:l,dimDescription:!0,children:s}})},[y,Z,Q,c,X,T]),pt=J.useMemo(()=>y?[]:Z.map((e,t)=>{let n=Qe(M(e)+(e.isSidechain?` (sidechain)`:``),Q),r=we(e),i=c&&e.projectPath?` · ${e.projectPath}`:``,a=X.get(e),o=a?$e(a,T):null;return{label:n,description:o?`${r}${i}\n ${o}`:r+i,dimDescription:!0,value:t.toString()}}),[y,Z,T,Q,c,X]),$=Ce?.value.log??null,mt=()=>{if(!y||!$)return``;let e=d($);if(!e)return``;let t=Z.filter(t=>d(t)===e);if(!(t.length>1))return``;let n=xe.has(e);return t.indexOf($)>0||n?`← to collapse`:`→ to expand`},ht=J.useCallback(async()=>{let e=$?d($):void 0;if(!$||!e){F(`list`),j(``);return}ve.trim()&&(await ee(e,ve.trim(),$.fullPath),y&&a&&a()),F(`list`),j(``)},[$,ve,a,y]),gt=J.useCallback(()=>{F(`list`),N(`tengu_session_search_toggled`,{enabled:!1})},[]),_t=J.useCallback(()=>{F(`search`),N(`tengu_session_search_toggled`,{enabled:!0})},[]),vt=J.useCallback(async()=>{if(!B.trim()||!f||!0)return;Be.current?.abort();let t=new AbortController;Be.current=t,L({status:`searching`}),N(`tengu_agentic_search_started`,{query_length:B.length});try{let n=await f(B,e,t.signal);if(t.signal.aborted)return;L({status:`results`,results:n,query:B}),N(`tengu_agentic_search_completed`,{query_length:B.length,results_count:n.length})}catch(e){if(t.signal.aborted)return;L({status:`error`,message:e instanceof Error?e.message:`Search failed`}),N(`tengu_agentic_search_error`,{query_length:B.length})}},[B,f,!1,e]);J.useEffect(()=>{I.status!==`idle`&&I.status!==`searching`&&(I.status===`results`&&I.query!==B||I.status===`error`)&&L({status:`idle`})},[B,I]),J.useEffect(()=>()=>{Be.current?.abort()},[]);let yt=J.useRef(I.status);J.useEffect(()=>{let e=yt.current;if(yt.current=I.status,e===`searching`&&I.status===`results`){if(y&&ft.length>0)Te(ft[0]);else if(!y&&Z.length>0){let e=Z[0];Te({id:`0`,value:{log:e,indexInFiltered:0},label:``})}}},[I.status,y,ft,Z]);let bt=J.useCallback(e=>{let t=parseInt(e,10),n=Z[t];!n||Fe.current===t.toString()||(Fe.current=t.toString(),Te({id:t.toString(),value:{log:n,indexInFiltered:t},label:``}),De(t+1))},[Z]),xt=J.useCallback(e=>{Te(e);let t=Z.findIndex(t=>d(t)===d(e.value.log));t>=0&&De(t+1)},[Z]);C(`confirm:no`,()=>{Be.current?.abort(),L({status:`idle`}),N(`tengu_agentic_search_cancelled`,{})},{context:`Confirmation`,isActive:P!==`preview`&&I.status===`searching`}),C(`confirm:no`,()=>{F(`list`),j(``)},{context:`Settings`,isActive:P===`rename`&&I.status!==`searching`}),C(`confirm:no`,()=>{Ve(``),z(!1),r?.()},{context:`Confirmation`,isActive:P!==`preview`&&P!==`rename`&&P!==`search`&&R&&I.status!==`searching`}),se((e,t)=>{if(P!==`preview`&&I.status!==`searching`&&P!==`rename`)if(P===`search`)e.toLowerCase()===`n`&&t.ctrl?gt():(t.return||t.downArrow)&&B.trim();else{if(R){if(t.return){vt(),z(!1);return}else if(t.downArrow){z(!1);return}else if(t.upArrow){F(`search`),z(!1);return}}if(Je&&t.tab){let e=t.shift?-1:1;Re(t=>{let n=((t<q.length?t:0)+q.length+e)%q.length,r=q[n];return N(`tengu_session_tag_filter_changed`,{is_all:r===`All`,tag_count:K.length}),n});return}let n=!t.ctrl&&!t.meta,r=e.toLowerCase();if(r===`a`&&t.ctrl&&u)u(),N(`tengu_session_all_projects_toggled`,{enabled:!c});else if(r===`b`&&t.ctrl){let e=!D;me(e),N(`tengu_session_branch_filter_toggled`,{enabled:e})}else if(r===`w`&&t.ctrl&&A){let e=!O;k(e),N(`tengu_session_worktree_filter_toggled`,{enabled:e})}else r===`/`&&n?(F(`search`),N(`tengu_session_search_toggled`,{enabled:!0})):r===`r`&&t.ctrl&&$?(F(`rename`),j(``),N(`tengu_session_rename_started`,{})):r===`v`&&t.ctrl&&$?(Me($),F(`preview`),N(`tengu_session_preview_opened`,{messageCount:$.messageCount})):$&&n&&e.length>0&&!/^\s+$/.test(e)&&(F(`search`),Ve(e),N(`tengu_session_search_toggled`,{enabled:!0}))}},{isActive:!0});let St=[];D&&E&&St.push(E),A&&!O&&St.push(`current worktree`);let Ct=8+ +(St.length>0&&P!==`search`)+it,wt=Math.max(1,Math.floor((t-Ct-2)/3));return J.useEffect(()=>{if(!o)return;let e=wt*2;Ee+e>=Z.length&&o(wt*3)},[Ee,wt,Z.length,o]),e.length===0?null:P===`preview`&&Ae&&y?(0,Y.jsx)(ze,{log:Ae,onExit:()=>{F(`list`),Me(null)},onSelect:i}):(0,Y.jsxs)(b,{flexDirection:`column`,height:t-1,children:[(0,Y.jsx)(b,{flexShrink:0,children:(0,Y.jsx)(re,{color:`suggestion`})}),(0,Y.jsx)(b,{flexShrink:0,children:(0,Y.jsx)(x,{children:` `})}),Je?(0,Y.jsx)(He,{tabs:q,selectedIndex:Xe,availableWidth:h,showAllProjects:c}):(0,Y.jsx)(b,{flexShrink:0,children:(0,Y.jsxs)(x,{bold:!0,color:`suggestion`,children:[`Resume Session`,P===`list`&&Z.length>wt&&(0,Y.jsxs)(x,{dimColor:!0,children:[` `,`(`,Ee,` of `,Z.length,`)`]})]})}),(0,Y.jsx)(ce,{query:B,isFocused:P===`search`,isTerminalFocused:ne,cursorOffset:V}),St.length>0&&P!==`search`&&(0,Y.jsx)(b,{flexShrink:0,paddingLeft:2,children:(0,Y.jsx)(x,{dimColor:!0,children:(0,Y.jsx)(S,{children:St})})}),(0,Y.jsx)(b,{flexShrink:0,children:(0,Y.jsx)(x,{children:` `})}),I.status===`searching`&&(0,Y.jsxs)(b,{paddingLeft:1,flexShrink:0,children:[(0,Y.jsx)(Ne,{}),(0,Y.jsx)(x,{children:` Searching…`})]}),I.status===`results`&&I.results.length>0&&(0,Y.jsx)(b,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,Y.jsx)(x,{dimColor:!0,italic:!0,children:`Work Mate found these results:`})}),I.status===`results`&&I.results.length===0&&ut.length===0&&(0,Y.jsx)(b,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,Y.jsx)(x,{dimColor:!0,italic:!0,children:`No matching sessions found.`})}),I.status===`error`&&ut.length===0&&(0,Y.jsx)(b,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,Y.jsx)(x,{dimColor:!0,italic:!0,children:`No matching sessions found.`})}),!!B.trim()&&f&&!1,I.status===`searching`?null:P===`rename`&&$?(0,Y.jsxs)(b,{paddingLeft:2,flexDirection:`column`,children:[(0,Y.jsx)(x,{bold:!0,children:`Rename session:`}),(0,Y.jsx)(b,{paddingTop:1,children:(0,Y.jsx)(Oe,{value:ve,onChange:j,onSubmit:ht,placeholder:M($,`Enter new session name`),columns:h,cursorOffset:ye,onChangeCursorOffset:be,showCursor:!0})})]}):y?(0,Y.jsx)(Ye,{nodes:ft,onSelect:e=>{i(e.value.log)},onFocus:xt,onCancel:r,focusNodeId:Ce?.id,visibleOptionCount:wt,layout:`expanded`,isDisabled:P===`search`||R,hideIndexes:!1,isNodeExpanded:e=>{if(P===`search`||D)return!0;let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;return t?xe.has(t):!1},onExpand:e=>{let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;t&&(Se(e=>new Set(e).add(t)),N(`tengu_session_group_expanded`,{}))},onCollapse:e=>{let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;t&&Se(e=>{let n=new Set(e);return n.delete(t),n})},onUpFromFirstItem:_t}):(0,Y.jsx)(je,{options:pt,onChange:e=>{let t=Z[parseInt(e,10)];t&&i(t)},visibleOptionCount:wt,onCancel:r,onFocus:bt,defaultFocusValue:Ce?.id.toString(),layout:`expanded`,isDisabled:P===`search`||R,onUpFromFirstItem:_t}),(0,Y.jsx)(b,{paddingLeft:2,children:g.pending?(0,Y.jsxs)(x,{dimColor:!0,children:[`Press `,g.keyName,` again to exit`]}):P===`rename`?(0,Y.jsx)(x,{dimColor:!0,children:(0,Y.jsxs)(S,{children:[(0,Y.jsx)(v,{shortcut:`Enter`,action:`save`}),(0,Y.jsx)(p,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):I.status===`searching`?(0,Y.jsx)(x,{dimColor:!0,children:(0,Y.jsxs)(S,{children:[(0,Y.jsx)(x,{children:`Searching with Work Mate…`}),(0,Y.jsx)(p,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):R?(0,Y.jsx)(x,{dimColor:!0,children:(0,Y.jsxs)(S,{children:[(0,Y.jsx)(v,{shortcut:`Enter`,action:`search`}),(0,Y.jsx)(v,{shortcut:`↓`,action:`skip`}),(0,Y.jsx)(p,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):P===`search`?(0,Y.jsx)(x,{dimColor:!0,children:(0,Y.jsxs)(S,{children:[(0,Y.jsx)(x,{children:`Type to Search`}),(0,Y.jsx)(v,{shortcut:`Enter`,action:`select`}),(0,Y.jsx)(p,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`clear`})]})}):(0,Y.jsx)(x,{dimColor:!0,children:(0,Y.jsxs)(S,{children:[u&&(0,Y.jsx)(v,{shortcut:`Ctrl+A`,action:`show ${c?`current dir`:`all projects`}`}),E&&(0,Y.jsx)(v,{shortcut:`Ctrl+B`,action:`toggle branch`}),A&&(0,Y.jsx)(v,{shortcut:`Ctrl+W`,action:`show ${O?`current worktree`:`all worktrees`}`}),(0,Y.jsx)(v,{shortcut:`Ctrl+V`,action:`preview`}),(0,Y.jsx)(v,{shortcut:`Ctrl+R`,action:`rename`}),(0,Y.jsx)(x,{children:`Type to search`}),(0,Y.jsx)(p,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`}),mt()&&(0,Y.jsx)(x,{children:mt()})]})})})]})}function it(e){if(e.type!==`user`&&e.type!==`assistant`)return``;let t=`message`in e?e.message?.content:void 0;return t?typeof t==`string`?t:Array.isArray(t)?t.map(e=>typeof e==`string`?e:`text`in e&&typeof e.text==`string`?e.text:``).filter(Boolean).join(` `):``:``}function at(e){let t=(e.messages.length<=ut?e.messages:[...e.messages.slice(0,X),...e.messages.slice(-1e3)]).map(it).filter(Boolean).join(` `),n=`${[e.customTitle,e.summary,e.firstPrompt,e.gitBranch,e.tag,e.prNumber?`PR #${e.prNumber}`:void 0,e.prRepository].filter(Boolean).join(` `)} ${t}`.trim();return n.length>Z?n.slice(0,Z):n}function ot(e){let t=new Map;for(let n of e){let e=d(n);if(e){let r=t.get(e);r?r.push(n):t.set(e,[n])}}return t.forEach(e=>e.sort((e,t)=>new Date(t.modified).getTime()-new Date(e.modified).getTime())),t}function st(e){let t=new Set;for(let n of e)n.tag&&t.add(n.tag);return Array.from(t).sort((e,t)=>e.localeCompare(t))}var J,Y,ct,lt,ut,X,Z,dt,Q=e((()=>{T(),J=t(w(),1),me(),F(),Re(),s(),de(),o(),xe(),Ce(),i(),ve(),ye(),g(),Fe(),c(),Ae(),Ie(),Be(),Me(),Je(),P(),Ze(),Y=D(),ct=2,lt=4,ut=2e3,X=1e3,Z=5e4,dt=50}));function ft(e){if(e.type!==`user`&&e.type!==`assistant`)return``;let t=`message`in e?e.message?.content:void 0;return t?typeof t==`string`?t:Array.isArray(t)?t.map(e=>typeof e==`string`?e:`text`in e&&typeof e.text==`string`?e.text:``).filter(Boolean).join(` `):``:``}function pt(e){if(e.length===0)return``;let t=(e.length<=gt?e:[...e.slice(0,gt/2),...e.slice(-100/2)]).map(ft).filter(Boolean).join(` `).replace(/\s+/g,` `).trim();return t.length>ht?`${t.slice(0,ht)}…`:t}function $(e,t){return!!(M(e).toLowerCase().includes(t)||e.customTitle?.toLowerCase().includes(t)||e.tag?.toLowerCase().includes(t)||e.gitBranch?.toLowerCase().includes(t)||e.summary?.toLowerCase().includes(t)||e.firstPrompt?.toLowerCase().includes(t)||e.messages&&e.messages.length>0&&pt(e.messages).toLowerCase().includes(t))}async function mt(e,t,r){if(!e.trim()||t.length===0)return[];let i=e.toLowerCase(),o=t.filter(e=>$(e,i)),s;if(o.length>=_t)s=o.slice(0,_t);else{let e=t.filter(e=>!$(e,i)),n=_t-o.length;s=[...o,...e.slice(0,n)]}k(`Agentic search: ${s.length}/${t.length} logs, query="${e}", matching: ${o.length}, with messages: ${j(s,e=>e.messages?.length>0)}`);let c=s.map(async e=>{if(a(e))try{return await n(e)}catch(t){return be(t),e}return e}),l=await Promise.all(c);k(`Agentic search: loaded ${j(l,e=>e.messages?.length>0)}/${s.length} logs with transcripts`);let d=`Sessions:
|
|
2
|
-
${l.map((e,t)=>{let n=[`${t}:`],r=M(e);if(n.push(r),e.customTitle&&e.customTitle!==r&&n.push(`[custom title: ${e.customTitle}]`),e.tag&&n.push(`[tag: ${e.tag}]`),e.gitBranch&&n.push(`[branch: ${e.gitBranch}]`),e.summary&&n.push(`- Summary: ${e.summary}`),e.firstPrompt&&e.firstPrompt!==`No prompt`&&n.push(`- First message: ${e.firstPrompt.slice(0,300)}`),e.messages&&e.messages.length>0){let t=pt(e.messages);t&&n.push(`- Transcript: ${t}`)}return n.join(` `)}).join(`
|
|
3
|
-
`)}
|
|
4
|
-
|
|
5
|
-
Search query: "${e}"
|
|
6
|
-
|
|
7
|
-
Find the sessions that are most relevant to this query.`;k(`Agentic search prompt (first 500 chars): ${d.slice(0,500)}...`);try{let e=De();k(`Agentic search using model: ${e}`);let t=(await u({model:e,system:vt,messages:[{role:`user`,content:d}],signal:r,querySource:`session_search`})).content.find(e=>e.type===`text`);if(t?.type!==`text`)return k(`No text content in agentic search response`),[];k(`Agentic search response: ${t.text}`);let n=t.text.match(/\{[\s\S]*\}/);if(!n)return k(`Could not find JSON in agentic search response`),[];let i=(O(n[0]).relevant_indices||[]).filter(e=>e>=0&&e<l.length).map(e=>l[e]);return k(`Agentic search found ${i.length} relevant sessions`),i}catch(e){return be(e),k(`Agentic search error: ${e}`),[]}}var ht,gt,_t,vt,yt=e((()=>{_e(),A(),ye(),Ee(),g(),h(),he(),ht=2e3,gt=100,_t=100,vt=`Your goal is to find relevant sessions based on a user's search query.
|
|
8
|
-
|
|
9
|
-
You will be given a list of sessions with their metadata and a search query. Identify which sessions are most relevant to the query.
|
|
10
|
-
|
|
11
|
-
Each session may include:
|
|
12
|
-
- Title (display name or custom title)
|
|
13
|
-
- Tag (user-assigned category, shown as [tag: name] - users tag sessions with /tag command to categorize them)
|
|
14
|
-
- Branch (git branch name, shown as [branch: name])
|
|
15
|
-
- Summary (AI-generated summary)
|
|
16
|
-
- First message (beginning of the conversation)
|
|
17
|
-
- Transcript (excerpt of conversation content)
|
|
18
|
-
|
|
19
|
-
IMPORTANT: Tags are user-assigned labels that indicate the session's topic or category. If the query matches a tag exactly or partially, those sessions should be highly prioritized.
|
|
20
|
-
|
|
21
|
-
For each session, consider (in order of priority):
|
|
22
|
-
1. Exact tag matches (highest priority - user explicitly categorized this session)
|
|
23
|
-
2. Partial tag matches or tag-related terms
|
|
24
|
-
3. Title matches (custom titles or first message content)
|
|
25
|
-
4. Branch name matches
|
|
26
|
-
5. Summary and transcript content matches
|
|
27
|
-
6. Semantic similarity and related concepts
|
|
28
|
-
|
|
29
|
-
CRITICAL: Be VERY inclusive in your matching. Include sessions that:
|
|
30
|
-
- Contain the query term anywhere in any field
|
|
31
|
-
- Are semantically related to the query (e.g., "testing" matches sessions about "tests", "unit tests", "QA", etc.)
|
|
32
|
-
- Discuss topics that could be related to the query
|
|
33
|
-
- Have transcripts that mention the concept even in passing
|
|
34
|
-
|
|
35
|
-
When in doubt, INCLUDE the session. It's better to return too many results than too few. The user can easily scan through results, but missing relevant sessions is frustrating.
|
|
36
|
-
|
|
37
|
-
Return sessions ordered by relevance (most relevant first). If truly no sessions have ANY connection to the query, return an empty array - but this should be rare.
|
|
38
|
-
|
|
39
|
-
Respond with ONLY the JSON object, no markdown formatting:
|
|
40
|
-
{"relevant_indices": [2, 5, 0]}`}));function bt(e,t){let n=fe();if(!t||!e.projectPath||e.projectPath===n)return{isCrossProject:!1};let r=d(e);return{isCrossProject:!0,isSameRepoWorktree:!1,command:`cd ${m([e.projectPath])} && claude --resume ${r}`,projectPath:e.projectPath}}var xt=e((()=>{me(),f(),g()}));export{rt as a,yt as i,xt as n,Q as o,mt as r,bt as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{D as t,Z as n,zt as r}from"./state-BowF111d.js";import{AsyncLocalStorage as i}from"async_hooks";function a(e,t){return c.run(e,t)}function o(){return c.getStore()??t()}function s(){try{return o()}catch{return n()}}var c,l=e((()=>{r(),c=new i}));export{a as i,l as n,o as r,s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./cwd-BcO6WHKo.js";e();export{t as getCwd};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./dist-es-C3reqy7X.js";t();export{e as fromTokenFile};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{d as r,f as i,l as a}from"./protocols-CCsohXid.js";var o,s=e((()=>{o={CrtSignerV4:null}}));function c(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function l(e,t){let n=e.credentialProvider;e.credentialProvider=()=>(e.credentialProvider=n,Promise.resolve(t))}var u,d,f,p=e((()=>{a(),u=`X-Amz-S3session-Token`,d=u.toLowerCase(),f=class extends i{async signWithCredentials(e,t,n){let r=c(t);e.headers[d]=t.sessionToken;let i=this;return l(i,r),i.signRequest(e,n??{})}async presignWithCredentials(e,t,n){let r=c(t);return delete e.headers[d],e.headers[u]=t.sessionToken,e.query=e.query??{},e.query[u]=t.sessionToken,l(this,r),this.presign(e,n)}}})),m,h=e((()=>{a(),s(),p(),t(),m=class{static sigv4aDependency(){return typeof o.CrtSignerV4==`function`?`crt`:typeof r.SignatureV4a==`function`?`js`:`none`}constructor(e){n(this,`sigv4aSigner`,void 0),n(this,`sigv4Signer`,void 0),n(this,`signerOptions`,void 0),this.sigv4Signer=new f(e),this.signerOptions=e}async sign(e,t={}){return t.signingRegion===`*`?this.getSigv4aSigner().sign(e,t):this.sigv4Signer.sign(e,t)}async signWithCredentials(e,t,n={}){if(n.signingRegion===`*`){let r=this.getSigv4aSigner(),i=o.CrtSignerV4;if(i&&r instanceof i)return r.signWithCredentials(e,t,n);throw Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.signWithCredentials(e,t,n)}async presign(e,t={}){if(t.signingRegion===`*`){let n=this.getSigv4aSigner(),r=o.CrtSignerV4;if(r&&n instanceof r)return n.presign(e,t);throw Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.presign(e,t)}async presignWithCredentials(e,t,n={}){if(n.signingRegion===`*`)throw Error(`Method presignWithCredentials is not supported for [signingRegion=*].`);return this.sigv4Signer.presignWithCredentials(e,t,n)}getSigv4aSigner(){if(!this.sigv4aSigner){let e=o.CrtSignerV4,t=r.SignatureV4a;if(this.signerOptions.runtime===`node`){if(!e&&!t)throw Error(`Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);if(e&&typeof e==`function`)this.sigv4aSigner=new e({...this.signerOptions,signingAlgorithm:1});else if(t&&typeof t==`function`)this.sigv4aSigner=new t({...this.signerOptions});else throw Error(`Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}else{if(!t||typeof t!=`function`)throw Error(`JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a`);this.sigv4aSigner=new t({...this.signerOptions})}}return this.sigv4aSigner}}})),g=e((()=>{h(),s(),p()}));export{m as n,h as r,g as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{C as r,D as i,E as a,F as o,I as ee,K as s,L as c,M as l,O as u,P as te,U as ne,V as re,X as ie,Y as ae,_ as oe,d as se,et as ce,g as le,i as ue,j as de,k as fe,l as pe,mt as me,n as he,nt as ge,ot as _e,p as ve,q as d,rt as ye,s as be,st as xe,t as f,vt as Se,x as Ce,y as we,z as Te}from"./client-DvAL7lY8.js";import{B as Ee,D as De,H as Oe,M as ke,O as Ae,Y as je,c as Me,o as Ne,t as p,u as Pe}from"./protocols-CnYQjBlj.js";import{B as Fe,H as Ie,L as Le,c as Re,d as ze,r as m,z as Be}from"./serde-f76bObzR.js";import{a as Ve,d as He,l as Ue,m as h,o as We,r as Ge,s as Ke,t as g}from"./config-BSXLgwpD.js";import{C as qe,c as _,f as Je,t as v,v as Ye}from"./dist-es-BF6bR-Ik.js";import{n as Xe,t as Ze}from"./checksum-DgbnMdM-.js";import{C as Qe,_ as $e,c as et,g as tt,m as nt,n as rt,o as y,t as it,x as at}from"./protocols-CCsohXid.js";import{i as ot,t as st}from"./dist-es-CYPVg66r.js";import{a as ct,t as lt}from"./dist-es-Bfr4TzQe.js";import{n as ut,t as dt}from"./dist-es-BIjDeceU.js";var b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,ft,pt,mt,ht=e((()=>{o(),b=`ref`,x=-1,S=!0,C=`isSet`,w=`PartitionResult`,T=`booleanEquals`,E=`stringEquals`,D=`getAttr`,O=`us-east-1`,k=`sigv4`,A=`sts`,j=`https://sts.{Region}.{PartitionResult#dnsSuffix}`,M={[b]:`Endpoint`},N={[b]:`Region`},P={[b]:w},F={},I=[N],L={conditions:[[C,[M]],[C,I],[`aws.partition`,I,w],[T,[{[b]:`UseFIPS`},S]],[T,[{[b]:`UseDualStack`},S]],[E,[N,`aws-global`]],[T,[{[b]:`UseGlobalEndpoint`},S]],[E,[N,`eu-central-1`]],[T,[{fn:D,argv:[P,`supportsDualStack`]},S]],[T,[{fn:D,argv:[P,`supportsFIPS`]},S]],[E,[N,`ap-south-1`]],[E,[N,`eu-north-1`]],[E,[N,`eu-west-1`]],[E,[N,`eu-west-2`]],[E,[N,`eu-west-3`]],[E,[N,`sa-east-1`]],[E,[N,O]],[E,[N,`us-east-2`]],[E,[N,`us-west-2`]],[E,[N,`us-west-1`]],[E,[N,`ca-central-1`]],[E,[N,`ap-southeast-1`]],[E,[N,`ap-northeast-1`]],[E,[N,`ap-southeast-2`]],[E,[{fn:D,argv:[P,`name`]},`aws-us-gov`]]],results:[[x],[`https://sts.amazonaws.com`,{authSchemes:[{name:k,signingName:A,signingRegion:O}]}],[j,{authSchemes:[{name:k,signingName:A,signingRegion:`{Region}`}]}],[x,`Invalid Configuration: FIPS and custom endpoint are not supported`],[x,`Invalid Configuration: Dualstack and custom endpoint are not supported`],[M,F],[`https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,F],[x,`FIPS and DualStack are enabled, but this partition does not support one or both`],[`https://sts.{Region}.amazonaws.com`,F],[`https://sts-fips.{Region}.{PartitionResult#dnsSuffix}`,F],[x,`FIPS is enabled but this partition does not support FIPS`],[`https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}`,F],[x,`DualStack is enabled but this partition does not support DualStack`],[j,F],[x,`Invalid Configuration: Missing Region`]]},ft=2,pt=new Int32Array([-1,1,-1,0,30,3,1,4,100000014,2,5,100000014,3,25,6,4,24,7,5,100000001,8,6,9,100000013,7,100000001,10,10,100000001,11,11,100000001,12,12,100000001,13,13,100000001,14,14,100000001,15,15,100000001,16,16,100000001,17,17,100000001,18,18,100000001,19,19,100000001,20,20,100000001,21,21,100000001,22,22,100000001,23,23,100000001,100000002,8,100000011,100000012,4,28,26,9,27,100000010,24,100000008,100000009,8,29,100000007,9,100000006,100000007,3,100000003,31,4,100000004,100000005]),mt=ne.from(pt,ft,L.conditions,L.results)})),gt,R,_t=e((()=>{f(),o(),ht(),gt=new re({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`,`UseGlobalEndpoint`]}),R=(e,t={})=>gt.get(e,()=>c(mt,{endpointParams:e,logger:t.logger})),Te.aws=be}));function vt(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`sts`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function z(e){return{schemeId:`aws.auth#sigv4a`,signingProperties:{name:`sts`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function B(e){return{schemeId:`smithy.api#noAuth`}}var yt,bt,xt,St,Ct,wt,Tt,Et=e((()=>{y(),dt(),d(),o(),_t(),yt=e=>async(t,n,r)=>{if(!r)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let i=await e(t,n,r),a=je(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!a)throw Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);let o=await s(r,{getEndpointParameterInstructions:a},t);return Object.assign(i,o)},bt=async(e,t,n)=>({operation:je(t).operation,region:await Oe(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),xt=yt(bt),St=(e,t,n)=>r=>{let i=e(r).properties?.authSchemes;if(!i)return t(r);let a=[];for(let e of i){let{name:t,properties:o={},...ee}=e,s=t.toLowerCase();t!==s&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${t}' to '${s}'`);let c;if(s===`sigv4a`){c=`aws.auth#sigv4a`;let e=i.find(e=>{let t=e.name.toLowerCase();return t!==`sigv4a`&&t.startsWith(`sigv4`)});if(ut.sigv4aDependency()===`none`&&e)continue}else if(s.startsWith(`sigv4`))c=`aws.auth#sigv4`;else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${s}'`);let l=n[c];if(!l)throw Error(`Could not find HttpAuthOption create function for '${c}'`);let u=l(r);u.schemeId=c,u.signingProperties={...u.signingProperties||{},...ee,...o},a.push(u)}return a},Ct=e=>{let t=[];switch(e.operation){case`AssumeRoleWithSAML`:t.push(B(e)),t.push(z(e));break;case`AssumeRoleWithWebIdentity`:t.push(B(e)),t.push(z(e));break;default:t.push(vt(e)),t.push(z(e))}return t},wt=St(R,Ct,{"aws.auth#sigv4":vt,"aws.auth#sigv4a":z,"smithy.api#noAuth":B}),Tt=e=>{let t=tt(et(e));return Object.assign(t,{authSchemePreference:Oe(e.authSchemePreference??[])})}})),Dt,Ot,kt=e((()=>{Dt=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:`sts`}),Ot={UseGlobalEndpoint:{type:`builtInParams`,name:`useGlobalEndpoint`},UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}}})),At,jt,Mt,V,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt=e((()=>{At=`@aws-sdk/client-sts`,jt=`AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native`,Mt=`3.1085.0`,V={build:`concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs`,"build:cjs":`node ../../scripts/compilation/inline`,"build:es":`premove dist-es && tsc -p tsconfig.es.json`,"build:include:deps":`yarn g:turbo run build -F="$npm_package_name"`,"build:types":`premove dist-types && tsc -p tsconfig.types.json`,"build:types:downlevel":`downlevel-dts dist-types dist-types/ts3.4`,clean:`premove dist-cjs dist-es dist-types`,"extract:docs":`api-extractor run --local`,"generate:client":`node ../../scripts/generate-clients/single-service`,test:`yarn g:vitest run --passWithNoTests`,"test:watch":`yarn g:vitest watch --passWithNoTests`,"test:integration":`yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts`,"test:integration:watch":`yarn g:vitest watch --passWithNoTests -c vitest.config.integ.mts`,"test:e2e":`yarn g:vitest run -c vitest.config.e2e.mts`,"test:e2e:watch":`yarn g:vitest watch -c vitest.config.e2e.mts`,"test:index":`tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs`},Nt=`./dist-cjs/index.js`,Pt=`./dist-types/index.d.ts`,Ft=`./dist-es/index.js`,It={"@aws-sdk/core":`^3.975.1`,"@aws-sdk/credential-provider-node":`^3.972.66`,"@aws-sdk/signature-v4-multi-region":`^3.996.39`,"@aws-sdk/types":`^3.974.0`,"@smithy/core":`^3.29.2`,"@smithy/fetch-http-handler":`^5.6.4`,"@smithy/node-http-handler":`^4.9.4`,"@smithy/types":`^4.16.0`,tslib:`^2.6.2`},Lt={"@smithy/snapshot-testing":`^2.2.7`,"@tsconfig/node20":`20.1.8`,"@types/node":`^20.14.8`,concurrently:`7.0.0`,"downlevel-dts":`0.10.1`,premove:`4.0.0`,typescript:`~5.8.3`,vitest:`^4.0.17`},Rt={node:`>=20.0.0`},zt={"<4.5":{"dist-types/*":[`dist-types/ts3.4/*`]}},Bt=[`dist-*/**`],Vt={name:`AWS SDK for JavaScript Team`,url:`https://aws.amazon.com/sdk-for-javascript/`},Ht=`Apache-2.0`,Ut={"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.browser`},Wt=`https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts`,Gt={type:`git`,url:`https://github.com/aws/aws-sdk-js-v3.git`,directory:`clients/client-sts`},Kt={name:At,description:jt,version:Mt,scripts:V,main:Nt,types:Pt,module:Ft,sideEffects:!1,dependencies:It,devDependencies:Lt,engines:Rt,typesVersions:zt,files:Bt,author:Vt,license:Ht,browser:Ut,"react-native":{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.native`},homepage:Wt,repository:Gt}})),H,U=e((()=>{d(),H=class e extends xe{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}})),Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn=e((()=>{U(),t(),Jt=class e extends H{constructor(t){super({name:`ExpiredTokenException`,$fault:`client`,...t}),n(this,`name`,`ExpiredTokenException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},Yt=class e extends H{constructor(t){super({name:`MalformedPolicyDocumentException`,$fault:`client`,...t}),n(this,`name`,`MalformedPolicyDocumentException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},Xt=class e extends H{constructor(t){super({name:`PackedPolicyTooLargeException`,$fault:`client`,...t}),n(this,`name`,`PackedPolicyTooLargeException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},Zt=class e extends H{constructor(t){super({name:`RegionDisabledException`,$fault:`client`,...t}),n(this,`name`,`RegionDisabledException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},Qt=class e extends H{constructor(t){super({name:`IDPRejectedClaimException`,$fault:`client`,...t}),n(this,`name`,`IDPRejectedClaimException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},$t=class e extends H{constructor(t){super({name:`InvalidIdentityTokenException`,$fault:`client`,...t}),n(this,`name`,`InvalidIdentityTokenException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},en=class e extends H{constructor(t){super({name:`IDPCommunicationErrorException`,$fault:`client`,...t}),n(this,`name`,`IDPCommunicationErrorException`),n(this,`$fault`,`client`),n(this,`$retryable`,{}),Object.setPrototypeOf(this,e.prototype)}},tn=class e extends H{constructor(t){super({name:`InvalidAuthorizationMessageException`,$fault:`client`,...t}),n(this,`name`,`InvalidAuthorizationMessageException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},nn=class e extends H{constructor(t){super({name:`ExpiredTradeInTokenException`,$fault:`client`,...t}),n(this,`name`,`ExpiredTradeInTokenException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},rn=class e extends H{constructor(t){super({name:`JWTPayloadSizeExceededException`,$fault:`client`,...t}),n(this,`name`,`JWTPayloadSizeExceededException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},an=class e extends H{constructor(t){super({name:`OutboundWebIdentityFederationDisabledException`,$fault:`client`,...t}),n(this,`name`,`OutboundWebIdentityFederationDisabledException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},on=class e extends H{constructor(t){super({name:`SessionDurationEscalationException`,$fault:`client`,...t}),n(this,`name`,`SessionDurationEscalationException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}}})),cn,ln,un,dn,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,W,G,K,q,J,Y,X,Z,En,Q,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,$=e((()=>{De(),sn(),U(),cn=`Arn`,ln=`Account`,un=`ExpiredTokenException`,dn=`ExpiredTradeInTokenException`,fn=`GetCallerIdentity`,pn=`GetCallerIdentityRequest`,mn=`GetCallerIdentityResponse`,hn=`InvalidAuthorizationMessageException`,gn=`IDPCommunicationErrorException`,_n=`IDPRejectedClaimException`,vn=`InvalidIdentityTokenException`,yn=`JWTPayloadSizeExceededException`,bn=`MalformedPolicyDocumentException`,xn=`OutboundWebIdentityFederationDisabledException`,Sn=`PackedPolicyTooLargeException`,Cn=`RegionDisabledException`,wn=`SessionDurationEscalationException`,Tn=`UserId`,W=`awsQueryError`,G=`client`,K=`error`,q=`httpError`,J=`message`,Y=`smithy.ts.sdk.synthetic.com.amazonaws.sts`,X=`com.amazonaws.sts`,Z=Ae.for(Y),En=[-3,Y,`STSServiceException`,0,[],[]],Z.registerError(En,H),Q=Ae.for(X),Dn=[-3,X,un,{[W]:[`ExpiredTokenException`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(Dn,Jt),On=[-3,X,dn,{[W]:[`ExpiredTradeInTokenException`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(On,nn),kn=[-3,X,gn,{[W]:[`IDPCommunicationError`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(kn,en),An=[-3,X,_n,{[W]:[`IDPRejectedClaim`,403],[K]:G,[q]:403},[J],[0]],Q.registerError(An,Qt),jn=[-3,X,hn,{[W]:[`InvalidAuthorizationMessageException`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(jn,tn),Mn=[-3,X,vn,{[W]:[`InvalidIdentityToken`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(Mn,$t),Nn=[-3,X,yn,{[W]:[`JWTPayloadSizeExceededException`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(Nn,rn),Pn=[-3,X,bn,{[W]:[`MalformedPolicyDocument`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(Pn,Yt),Fn=[-3,X,xn,{[W]:[`OutboundWebIdentityFederationDisabledException`,403],[K]:G,[q]:403},[J],[0]],Q.registerError(Fn,an),In=[-3,X,Sn,{[W]:[`PackedPolicyTooLarge`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(In,Xt),Ln=[-3,X,Cn,{[W]:[`RegionDisabledException`,403],[K]:G,[q]:403},[J],[0]],Q.registerError(Ln,Zt),Rn=[-3,X,wn,{[W]:[`SessionDurationEscalationException`,403],[K]:G,[q]:403},[J],[0]],Q.registerError(Rn,on),zn=[Z,Q],Bn=[3,X,pn,0,[],[]],Vn=[3,X,mn,0,[Tn,ln,cn],[0,0,0]],Hn=[9,X,fn,0,()=>Bn,()=>Vn]})),Un,Wn=e((()=>{y(),it(),dt(),v(),Ze(),d(),p(),m(),Et(),_t(),$(),Un=e=>({apiVersion:`2011-06-15`,base64Decoder:e?.base64Decoder??Ie,base64Encoder:e?.base64Encoder??Be,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??R,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??wt,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new Qe},{schemeId:`aws.auth#sigv4a`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4a`),signer:new at},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new _}],logger:e?.logger??new ie,protocol:e?.protocol??rt,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.sts`,errorTypeRegistries:zn,xmlNamespace:`https://sts.amazonaws.com/doc/2011-06-15/`,version:`2011-06-15`,serviceTarget:`AWSSecurityTokenServiceV20110615`},serviceId:e?.serviceId??`STS`,sha256:e?.sha256??Xe,signerConstructor:e?.signerConstructor??ut,urlParser:e?.urlParser??Ee,utf8Decoder:e?.utf8Decoder??Fe,utf8Encoder:e?.utf8Encoder??Le})})),Gn,Kn=e((()=>{qt(),f(),y(),st(),v(),d(),g(),i(),m(),lt(),Wn(),Gn=e=>{ye(process.version);let t=Ge(e),n=()=>t().then(_e),r=Un(e);Se(process.version);let i={profile:e?.profile,logger:r.logger};return{...r,...e,runtime:`node`,defaultsMode:t,authSchemePreference:e?.authSchemePreference??h($e,i),bodyLengthChecker:e?.bodyLengthChecker??ze,credentialDefaultProvider:e?.credentialDefaultProvider??ot,defaultUserAgentProvider:e?.defaultUserAgentProvider??se({serviceId:r.serviceId,clientVersion:Kt.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`)||(async e=>await ot(e?.__config||{})()),signer:new Qe},{schemeId:`aws.auth#sigv4a`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4a`),signer:new at},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new _}],maxAttempts:e?.maxAttempts??h(u,e),region:e?.region??h(Ke,{...We,...i}),requestHandler:ct.create(e?.requestHandler??n),retryMode:e?.retryMode??h({...fe,default:async()=>(await n()).retryMode||l},e),sigv4aSigningRegionSet:e?.sigv4aSigningRegionSet??h(nt,i),streamCollector:e?.streamCollector??Re,useDualstackEndpoint:e?.useDualstackEndpoint??h(He,i),useFipsEndpoint:e?.useFipsEndpoint??h(Ue,i),userAgentAppId:e?.userAgentAppId??h(pe,i)}}})),qn,Jn,Yn=e((()=>{qn=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},Jn=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})})),Xn,Zn=e((()=>{f(),d(),p(),Yn(),Xn=(e,t)=>{let n=Object.assign(he(e),ce(e),Me(e),qn(e));return t.forEach(e=>e.configure(n)),Object.assign(e,ue(n),ge(n),Pe(n),Jn(n))}})),Qn,$n=e((()=>{f(),v(),d(),g(),o(),p(),i(),De(),Et(),kt(),Kn(),Zn(),t(),Qn=class extends me{constructor(...[e]){let t=Gn(e||{});super(t),n(this,`config`,void 0),this.initConfig=t;let i=Xn(Tt(ee(r(Ve(de(le(Dt(t))))))),e?.extensions||[]);this.config=i,this.middlewareStack.use(ke(this.config)),this.middlewareStack.use(ve(this.config)),this.middlewareStack.use(a(this.config)),this.middlewareStack.use(Ne(this.config)),this.middlewareStack.use(Ce(this.config)),this.middlewareStack.use(we(this.config)),this.middlewareStack.use(oe(this.config)),this.middlewareStack.use(qe(this.config,{httpAuthSchemeParametersProvider:xt,identityProviderConfigProvider:async e=>new Je({"aws.auth#sigv4":e.credentials,"aws.auth#sigv4a":e.credentials})})),this.middlewareStack.use(Ye(this.config))}destroy(){super.destroy()}}})),er,tr,nr,rr=e((()=>{d(),o(),kt(),er=ae(Ot,`AWSSecurityTokenServiceV20110615`,`STSClient`,te),tr={},nr=(e,t,n,r)=>[]})),ir=e((()=>{})),ar=e((()=>{})),or=e((()=>{})),sr=e((()=>{})),cr=e((()=>{})),lr=e((()=>{})),ur,dr=e((()=>{rr(),$(),ur=class extends er(tr,nr,`GetCallerIdentity`,Hn){}})),fr=e((()=>{})),pr=e((()=>{})),mr=e((()=>{})),hr=e((()=>{})),gr=e((()=>{})),_r=e((()=>{ir(),ar(),or(),sr(),cr(),lr(),dr(),fr(),pr(),mr(),hr()})),vr=e((()=>{})),yr=e((()=>{}));e((()=>{$n(),gr(),_r(),$(),sn(),vr(),yr(),U()}))();export{ur as GetCallerIdentityCommand,Qn as STSClient};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,t as r}from"./dist-es-CYPVg66r.js";r();export{t as credentialsTreatedAsExpired,n as credentialsWillNeedRefresh,e as defaultProvider};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,t as n}from"./dist-es-CYPVg66r.js";import"./dist-es-Cd_AeqMK.js";import{n as r,t as i}from"./dist-es-CMtO44xC.js";var a=e((()=>{})),o=e((()=>{})),s=e((()=>{})),c=e((()=>{})),l=e((()=>{})),u,d=e((()=>{i(),u=(e={})=>r({...e})})),f=e((()=>{})),p=e((()=>{})),m,h=e((()=>{n(),m=(e={})=>t({...e})})),g=e((()=>{})),_=e((()=>{})),v=e((()=>{})),y=e((()=>{})),b=e((()=>{}));e((()=>{a(),o(),s(),c(),l(),d(),f(),p(),h(),g(),_(),v(),y(),b()}))();export{u as fromIni,m as fromNodeProviderChain};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{_t as t,t as n}from"./client-DvAL7lY8.js";import{L as r,N as i,k as a,t as o,v as s}from"./config-BSXLgwpD.js";var c,l,u=e((()=>{n(),o(),c=(e,t,n)=>{let a={EcsContainer:async e=>{let{fromHttp:t}=await import(`./dist-es-Byxccz_-.js`),{fromContainerMetadata:r}=await import(`./dist-es-Cwru7c2B2.js`);return n?.debug(`@aws-sdk/credential-provider-ini - credential_source is EcsContainer`),async()=>i(t(e??{}),r(e))().then(l)},Ec2InstanceMetadata:async e=>{n?.debug(`@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata`);let{fromInstanceMetadata:t}=await import(`./dist-es-Cwru7c2B2.js`);return async()=>t(e)().then(l)},Environment:async e=>{n?.debug(`@aws-sdk/credential-provider-ini - credential_source is Environment`);let{fromEnv:t}=await import(`./dist-es-D1wHe_zh.js`);return async()=>t(e)().then(l)}};if(e in a)return a[e];throw new r(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:n})},l=e=>t(e,`CREDENTIALS_PROFILE_NAMED_PROVIDER`,`p`)})),d,f,p,m,h,g=e((()=>{n(),o(),u(),d=(e,{profile:t=`default`,logger:n}={})=>!!e&&typeof e==`object`&&typeof e.role_arn==`string`&&[`undefined`,`string`].indexOf(typeof e.role_session_name)>-1&&[`undefined`,`string`].indexOf(typeof e.external_id)>-1&&[`undefined`,`string`].indexOf(typeof e.mfa_serial)>-1&&(f(e,{profile:t,logger:n})||p(e,{profile:t,logger:n})),f=(e,{profile:t,logger:n})=>{let r=typeof e.source_profile==`string`&&e.credential_source===void 0;return r&&n?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`),r},p=(e,{profile:t,logger:n})=>{let r=typeof e.credential_source==`string`&&e.source_profile===void 0;return r&&n?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`),r},m=async(e,n,i,o,s={},l)=>{i.logger?.debug(`@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)`);let u=n[e],{source_profile:d,region:f}=u;if(!i.roleAssumer){let{getDefaultRoleAssumer:e}=await import(`./sts-C2Gf2WYN.js`);i.roleAssumer=e({...i.clientConfig,credentialProviderLogger:i.logger,parentClientConfig:{...o,...i?.parentClientConfig,region:f??i?.parentClientConfig?.region??o?.region}},i.clientPlugins)}if(d&&d in s)throw new r(`Detected a cycle attempting to resolve credentials for profile ${a(i)}. Profiles visited: `+Object.keys(s).join(`, `),{logger:i.logger});i.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${d?`source_profile=[${d}]`:`profile=[${e}]`}`);let p=d?l(d,n,i,o,{...s,[d]:!0},h(n[d]??{})):(await c(u.credential_source,e,i.logger)(i))();if(h(u))return p.then(e=>t(e,`CREDENTIALS_PROFILE_SOURCE_PROFILE`,`o`));{let n={RoleArn:u.role_arn,RoleSessionName:u.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:u.external_id,DurationSeconds:parseInt(u.duration_seconds||`3600`,10)},{mfa_serial:a}=u;if(a){if(!i.mfaCodeProvider)throw new r(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:i.logger,tryNextLink:!1});n.SerialNumber=a,n.TokenCode=await i.mfaCodeProvider(a)}let o=await p;return i.roleAssumer(o,n).then(e=>t(e,`CREDENTIALS_PROFILE_SOURCE_PROFILE`,`o`))}},h=e=>!e.role_arn&&!!e.credential_source})),_,v,y=e((()=>{n(),_=e=>!!(e&&e.login_session),v=async(e,n,r)=>{let{fromLoginCredentials:i}=await import(`./dist-es-DKFm0FJ7.js`);return t(await i({...n,profile:e})({callerClientConfig:r}),`CREDENTIALS_PROFILE_LOGIN`,`AC`)}})),b,x,S=e((()=>{n(),b=e=>!!e&&typeof e==`object`&&typeof e.credential_process==`string`,x=async(e,n)=>{let{fromProcess:r}=await import(`./dist-es-DXIR5NLi2.js`);return t(await r({...e,profile:n})(),`CREDENTIALS_PROFILE_PROCESS`,`v`)}})),C,w,T=e((()=>{n(),C=async(e,n,r={},i)=>{let{fromSSO:a}=await import(`./dist-es-kj-F5A132.js`);return a({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:i}).then(e=>n.sso_session?t(e,`CREDENTIALS_PROFILE_SSO`,`r`):t(e,`CREDENTIALS_PROFILE_SSO_LEGACY`,`t`))},w=e=>e&&(typeof e.sso_start_url==`string`||typeof e.sso_account_id==`string`||typeof e.sso_session==`string`||typeof e.sso_region==`string`||typeof e.sso_role_name==`string`)})),E,D,O=e((()=>{n(),E=e=>!!e&&typeof e==`object`&&typeof e.aws_access_key_id==`string`&&typeof e.aws_secret_access_key==`string`&&[`undefined`,`string`].indexOf(typeof e.aws_session_token)>-1&&[`undefined`,`string`].indexOf(typeof e.aws_account_id)>-1,D=async(e,n)=>(n?.logger?.debug(`@aws-sdk/credential-provider-ini - resolveStaticCredentials`),t({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}},`CREDENTIALS_PROFILE`,`n`))})),k,A,j=e((()=>{n(),k=e=>!!e&&typeof e==`object`&&typeof e.web_identity_token_file==`string`&&typeof e.role_arn==`string`&&[`undefined`,`string`].indexOf(typeof e.role_session_name)>-1,A=async(e,n,r)=>{let{fromTokenFile:i}=await import(`./dist-es-5t7v8oaj.js`);return t(await i({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:n.roleAssumerWithWebIdentity,logger:n.logger,parentClientConfig:n.parentClientConfig})({callerClientConfig:r}),`CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN`,`q`)}})),M,N=e((()=>{o(),g(),y(),S(),T(),O(),j(),M=async(e,t,n,i,a={},o=!1)=>{let s=t[e];if(Object.keys(a).length>0&&E(s))return D(s,n);if(o||d(s,{profile:e,logger:n.logger}))return m(e,t,n,i,a,M);if(E(s))return D(s,n);if(k(s))return A(s,n,i);if(b(s))return x(n,e);if(w(s))return await C(e,s,n,i);if(_(s))return v(e,n,i);throw new r(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:n.logger})}})),P,F=e((()=>{o(),N(),P=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug(`@aws-sdk/credential-provider-ini - fromIni`);let n=await s(e);return M(a({profile:e.profile??t?.profile}),n,e,t)}})),I=e((()=>{F()}));export{P as n,F as r,I as t};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{L as t,N as n,t as r}from"./config-BSXLgwpD.js";import{c as i,t as a}from"./dist-es-DelBIxNM.js";var o,s=e((()=>{r(),o=async e=>{let{ENV_CMDS_FULL_URI:r,ENV_CMDS_RELATIVE_URI:i,fromContainerMetadata:a,fromInstanceMetadata:o}=await import(`./dist-es-Cwru7c2B2.js`);if(process.env[i]||process.env[r]){e.logger?.debug(`@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata`);let{fromHttp:t}=await import(`./dist-es-Byxccz_-.js`);return n(t(e),a(e))}return process.env.AWS_EC2_METADATA_DISABLED&&process.env.AWS_EC2_METADATA_DISABLED!==`false`?async()=>{throw new t(`EC2 Instance Metadata Service access disabled`,{logger:e.logger})}:(e.logger?.debug(`@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata`),o(e))}}));function c(e,t){let n=l(e),r,i,a,o,s=async e=>{if(e?.forceRefresh)return o||(o=n(e).then(e=>{a=e}).finally(()=>{o=void 0})),await o,a;if(a?.expiration&&a?.expiration?.getTime()<Date.now()&&(a=void 0),r)await r;else if(!a||t?.(a))if(a)i||(i=n(e).then(e=>{a=e}).finally(()=>{i=void 0}));else return r=n(e).then(e=>{a=e}).finally(()=>{r=void 0}),s(e);return a};return s}var l,u=e((()=>{l=e=>async t=>{let n;for(let r of e)try{return await r(t)}catch(e){if(n=e,e?.tryNextLink)continue;throw e}throw n}})),d,f,p,m,h=e((()=>{a(),r(),s(),u(),d=!1,f=(e={})=>c([async()=>{if(e.profile??process.env.AWS_PROFILE)throw process.env.AWS_ACCESS_KEY_ID&&process.env.AWS_SECRET_ACCESS_KEY&&(d||((e.logger?.warn&&e.logger?.constructor?.name!==`NoOpLogger`?e.logger.warn.bind(e.logger):console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
|
|
2
|
-
Multiple credential sources detected:
|
|
3
|
-
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
|
|
4
|
-
This SDK will proceed with the AWS_PROFILE value.
|
|
5
|
-
|
|
6
|
-
However, a future version may change this behavior to prefer the ENV static credentials.
|
|
7
|
-
Please ensure that your environment only sets either the AWS_PROFILE or the
|
|
8
|
-
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
|
|
9
|
-
`),d=!0)),new t(`AWS_PROFILE is set, skipping fromEnv provider.`,{logger:e.logger,tryNextLink:!0});return e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv`),i(e)()},async n=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromSSO`);let{ssoStartUrl:r,ssoAccountId:i,ssoRegion:a,ssoRoleName:o,ssoSession:s}=e;if(!r&&!i&&!a&&!o&&!s)throw new t(`Skipping SSO provider in default chain (inputs do not include SSO fields).`,{logger:e.logger});let{fromSSO:c}=await import(`./dist-es-kj-F5A132.js`);return c(e)(n)},async t=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromIni`);let{fromIni:n}=await import(`./dist-es-D1Y8zSMI.js`);return n(e)(t)},async t=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromProcess`);let{fromProcess:n}=await import(`./dist-es-DXIR5NLi2.js`);return n(e)(t)},async t=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile`);let{fromTokenFile:n}=await import(`./dist-es-5t7v8oaj.js`);return n(e)(t)},async()=>(e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::remoteProvider`),(await o(e))()),async()=>{throw new t(`Could not load credentials from any providers`,{tryNextLink:!1,logger:e.logger})}],m),p=e=>e?.expiration!==void 0,m=e=>e?.expiration!==void 0&&e.expiration.getTime()-Date.now()<3e5})),g=e((()=>{h()}));export{h as a,f as i,m as n,p as r,g as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./dist-es-CMtO44xC.js";t();export{e as fromIni};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./client-DvAL7lY8.js";import{_ as e,f as t,t as n}from"./dist-es-BOPBJQo3.js";n();export{e as BedrockRuntimeClient,t as CountTokensCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./dist-es-Cgsa8pb82.js";t();export{e as fromSSO};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";import{n,t as r}from"./Doctor-By_y3C2V.js";var i,a;e((()=>{n(),i=t(),a=(e,t,n)=>Promise.resolve((0,i.jsx)(r,{onDone:e}))}))();export{a as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{l as r,o as i}from"./envUtils-DcaKZlRU.js";import{n as a,t as o}from"./defineProperty-C-QyHrDq.js";import{E as s,O as c,S as l,i as u,l as d,n as f,s as p,v as ee}from"./esm-lWlUmoUA.js";import{B as te,C as ne,D as re,E as ie,F as m,O as ae,S as oe,T as h,b as se,c as ce,i as le,m as ue,n as g,o as de,u as fe,v as _,x as pe}from"./esm-BbMeEYcz.js";import{n as me,t as he}from"./esm-sVMjGuep.js";import{I as ge,Q as _e,S as ve,ut as ye,zt as be}from"./state-BowF111d.js";import{C as xe,L as Se,i as Ce,x as we}from"./debug-8DCufdSp.js";import{Br as Te,Gt as Ee,Ur as De,Ut as Oe,Wt as v,qt as ke}from"./settings-DKN4xSpQ.js";import{i as Ae,t as je}from"./execFileNoThrow-BsfuytkN.js";import{a as Me,n as Ne,o as Pe,r as Fe}from"./platform-Dzff1WWw.js";import{St as Ie,Tt as Le,en as Re,f as ze,s as Be,tn as Ve,yt as He}from"./model-BwBE0Pt5.js";import{i as Ue,t as We}from"./genericProcessUtils-BYi0OefF.js";import{arch as Ge,hostname as Ke,platform as qe,release as Je}from"os";import{extname as Ye}from"path";import{stat as Xe}from"fs/promises";import{inspect as Ze}from"util";import*as Qe from"process";import{AsyncLocalStorage as $e}from"async_hooks";var y,et=e((()=>{(function(e){e[e.UNSPECIFIED=0]=`UNSPECIFIED`,e[e.TRACE=1]=`TRACE`,e[e.TRACE2=2]=`TRACE2`,e[e.TRACE3=3]=`TRACE3`,e[e.TRACE4=4]=`TRACE4`,e[e.DEBUG=5]=`DEBUG`,e[e.DEBUG2=6]=`DEBUG2`,e[e.DEBUG3=7]=`DEBUG3`,e[e.DEBUG4=8]=`DEBUG4`,e[e.INFO=9]=`INFO`,e[e.INFO2=10]=`INFO2`,e[e.INFO3=11]=`INFO3`,e[e.INFO4=12]=`INFO4`,e[e.WARN=13]=`WARN`,e[e.WARN2=14]=`WARN2`,e[e.WARN3=15]=`WARN3`,e[e.WARN4=16]=`WARN4`,e[e.ERROR=17]=`ERROR`,e[e.ERROR2=18]=`ERROR2`,e[e.ERROR3=19]=`ERROR3`,e[e.ERROR4=20]=`ERROR4`,e[e.FATAL=21]=`FATAL`,e[e.FATAL2=22]=`FATAL2`,e[e.FATAL3=23]=`FATAL3`,e[e.FATAL4=24]=`FATAL4`})(y||(y={}))})),b,x,S=e((()=>{b=class{emit(e){}enabled(){return!1}},x=new b}));function tt(e,t,n){return r=>r===e?t:n}var C,w,nt=e((()=>{C=Symbol.for(`io.opentelemetry.js.api.logs`),w=globalThis})),rt,T,it=e((()=>{S(),rt=class{getLogger(e,t,n){return new b}},T=new rt})),at,ot=e((()=>{S(),at=class{constructor(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}emit(e){this._getLogger().emit(e)}enabled(e){return this._getLogger().enabled(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider._getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):x}}})),st,ct=e((()=>{it(),ot(),st=class{getLogger(e,t,n){return this._getDelegateLogger(e,t,n)??new at(this,e,t,n)}_getDelegate(){return this._delegate??T}_setDelegate(e){this._delegate=e}_getDelegateLogger(e,t,n){return this._delegate?.getLogger(e,t,n)}}})),lt,ut=e((()=>{nt(),it(),ct(),lt=class e{constructor(){this._proxyLoggerProvider=new st}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(e){return w[C]?this.getLoggerProvider():(w[C]=tt(1,e,T),this._proxyLoggerProvider._setDelegate(e),e)}getLoggerProvider(){return w[C]?.call(w,1)??this._proxyLoggerProvider}getLogger(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)}disable(){delete w[C],this._proxyLoggerProvider=new st}}})),dt,E=e((()=>{et(),S(),ut(),dt=lt.getInstance()}));function ft(){return`workmate/0.0.22`}var pt=e((()=>{}));function mt(){return process.platform===`linux`&&r(process.env.CLAUDE_CODE_BUBBLEWRAP)}function ht(){return process.platform===`linux`?D??!1:!1}async function gt(){if(O!==void 0)return O;if(process.platform===`darwin`)return O=null,null;try{let e=await We(process.pid,10);for(let t of e){let e=t.toLowerCase();for(let t of Oe)if(e.includes(t))return O=t,t}}catch{}return O=null,null}async function _t(){return process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`&&v.platform!==`darwin`?await gt()||`pycharm`:v.terminal}function vt(){return process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`&&v.platform!==`darwin`?O===void 0?`pycharm`:O||`pycharm`:v.terminal}async function yt(){process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`&&await gt()}var bt,D,O,xt,St=e((()=>{n(),ke(),i(),Ae(),Ue(),bt=t(async()=>{if(process.platform!==`linux`)return!1;let{code:e}=await je(`test`,[`-f`,`/.dockerenv`]);return e===0}),D=null,process.platform===`linux`&&Xe(`/lib/libc.musl-${process.arch===`x64`?`x86_64`:`aarch64`}.so.1`).then(()=>{D=!0},()=>{D=!1}),xt={...v,terminal:vt(),getIsDocker:bt,getIsBubblewrapSandbox:mt,isMuslEnvironment:ht,getTerminalWithJetBrainsDetectionAsync:_t,initJetBrainsDetection:yt}}));function Ct(e){return wt?.has(e)??!1}var wt,Tt=e((()=>{Ce(),Se()}));function k(){return At.getStore()}function Et(e,t){return At.run(e,t)}function Dt(e){return e?.agentType===`subagent`}function Ot(){let e=k();if(!(!Dt(e)||!e.subagentName))return e.isBuiltIn?e.subagentName:`user-defined`}function kt(){let e=k();if(!(!e?.invokingRequestId||e.invocationEmitted))return e.invocationEmitted=!0,{invokingRequestId:e.invokingRequestId,invocationKind:e.invocationKind}}var At,jt=e((()=>{At=new $e}));function Mt(e){return e.startsWith(`mcp__`)?`mcp_tool`:e}function Nt(){return r(process.env.OTEL_LOG_TOOL_DETAILS)}function Pt(e,t){return!!(process.env.CLAUDE_CODE_ENTRYPOINT===`local-agent`||e===`claudeai-proxy`||t&&Ct(t))}function Ft(e,t,n){let r=It(e);return!r||!Gt.has(r.serverName)&&!Pt(t,n)?{}:{mcpServerName:r.serverName,mcpToolName:r.mcpToolName}}function It(e){if(!e.startsWith(`mcp__`))return;let t=e.split(`__`);if(t.length<3)return;let n=t[1],r=t.slice(2).join(`__`);if(!(!n||!r))return{serverName:n,mcpToolName:r}}function Lt(e,t){if(e===`Skill`&&typeof t==`object`&&t&&`skill`in t&&typeof t.skill==`string`)return t.skill}function Rt(e,t=0){if(typeof e==`string`)return e.length>Kt?`${e.slice(0,qt)}…[${e.length} chars]`:e;if(typeof e==`number`||typeof e==`boolean`||e==null)return e;if(t>=Jt)return`<nested>`;if(Array.isArray(e)){let n=e.slice(0,M).map(e=>Rt(e,t+1));return e.length>M&&n.push(`…[${e.length} items]`),n}if(typeof e==`object`){let n=Object.entries(e).filter(([e])=>!e.startsWith(`_`)),r=n.slice(0,M).map(([e,n])=>[e,Rt(n,t+1)]);return n.length>M&&r.push([`…`,`${n.length} keys`]),Object.fromEntries(r)}return String(e)}function zt(e){if(!Nt())return;let t=xe(Rt(e));return t.length>j&&(t=`${t.slice(0,j)}…[truncated]`),t}function A(e){let t=Ye(e).toLowerCase();if(!t||t===`.`)return;let n=t.slice(1);return n.length>Yt?`other`:n}function Bt(e,t){if(!e.includes(`.`)&&!t)return;let n,r=new Set;if(t){let e=A(t);e&&(r.add(e),n=e)}for(let t of e.split(Zt)){if(!t)continue;let e=t.split(Qt);if(e.length<2)continue;let i=e[0],a=i.lastIndexOf(`/`),o=a>=0?i.slice(a+1):i;if(Xt.has(o))for(let t=1;t<e.length;t++){let i=e[t];if(i.charCodeAt(0)===45)continue;let a=A(i);a&&!r.has(a)&&(r.add(a),n=n?`${n},${a}`:a)}}if(n)return n}function Vt(){let e=k();if(e)return{agentId:e.agentId,parentSessionId:e.parentSessionId,agentType:e.agentType};let t=process.env.CLAUDE_CODE_AGENT_ID,n=process.env.CLAUDE_CODE_PARENT_SESSION_ID,r=t?`standalone`:void 0;if(t||r||n)return{...t?{agentId:t}:{},...r?{agentType:r}:{},...n?{parentSessionId:n}:{}};let i=_e();return i?{parentSessionId:i}:{}}function Ht(){try{let e=process.memoryUsage(),t=process.cpuUsage(),n=Date.now(),r;if(N&&P){let e=n-P;e>0&&(r=(t.user-N.user+(t.system-N.system))/(e*1e3)*100)}return N=t,P=n,{uptime:process.uptime(),rss:e.rss,heapTotal:e.heapTotal,heapUsed:e.heapUsed,external:e.external,arrayBuffers:e.arrayBuffers,constrainedMemory:process.constrainedMemory(),cpuUsage:t,cpuPercent:r}}catch{return}}async function Ut(e={}){let t=e.model?String(e.model):Be(),n=typeof e.betas==`string`?e.betas:Re(t).join(`,`),[r,i]=await Promise.all([en(),Te()]),a=Ht();return{model:t,sessionId:ye(),userType:process.env.USER_TYPE||``,...n.length>0?{betas:n}:{},envContext:r,...process.env.CLAUDE_CODE_ENTRYPOINT&&{entrypoint:process.env.CLAUDE_CODE_ENTRYPOINT},...process.env.CLAUDE_AGENT_SDK_VERSION&&{agentSdkVersion:process.env.CLAUDE_AGENT_SDK_VERSION},isInteractive:String(ge()),clientType:ve(),...a&&{processMetrics:a},sweBenchRunId:process.env.SWE_BENCH_RUN_ID||``,sweBenchInstanceId:process.env.SWE_BENCH_INSTANCE_ID||``,sweBenchTaskId:process.env.SWE_BENCH_TASK_ID||``,...Vt(),...He()&&{subscriptionType:He()},...i&&{rh:i}}}function Wt(e,t,n={}){let{envContext:r,processMetrics:i,rh:a,skillMode:o,observerMode:s,...c}=e,l={platform:r.platform,platform_raw:r.platformRaw,arch:r.arch,node_version:r.nodeVersion,terminal:r.terminal||`unknown`,package_managers:r.packageManagers,runtimes:r.runtimes,is_running_with_bun:r.isRunningWithBun,is_ci:r.isCi,is_claubbit:r.isClaubbit,is_claude_code_remote:r.isClaudeCodeRemote,is_local_agent_mode:r.isLocalAgentMode,is_conductor:r.isConductor,is_github_action:r.isGithubAction,is_claude_code_action:r.isClaudeCodeAction,is_claude_ai_auth:r.isClaudeAiAuth,version:r.version,build_time:r.buildTime,deployment_environment:r.deploymentEnvironment};r.remoteEnvironmentType&&(l.remote_environment_type=r.remoteEnvironmentType),r.claudeCodeContainerId&&(l.claude_code_container_id=r.claudeCodeContainerId),r.claudeCodeRemoteSessionId&&(l.claude_code_remote_session_id=r.claudeCodeRemoteSessionId),r.tags&&(l.tags=r.tags.split(`,`).map(e=>e.trim()).filter(Boolean)),r.githubEventName&&(l.github_event_name=r.githubEventName),r.githubActionsRunnerEnvironment&&(l.github_actions_runner_environment=r.githubActionsRunnerEnvironment),r.githubActionsRunnerOs&&(l.github_actions_runner_os=r.githubActionsRunnerOs),r.githubActionRef&&(l.github_action_ref=r.githubActionRef),r.wslVersion&&(l.wsl_version=r.wslVersion),r.linuxDistroId&&(l.linux_distro_id=r.linuxDistroId),r.linuxDistroVersion&&(l.linux_distro_version=r.linuxDistroVersion),r.linuxKernel&&(l.linux_kernel=r.linuxKernel),r.vcs&&(l.vcs=r.vcs),r.versionBase&&(l.version_base=r.versionBase);let u={session_id:c.sessionId,model:c.model,user_type:c.userType,is_interactive:c.isInteractive===`true`,client_type:c.clientType};if(c.betas&&(u.betas=c.betas),c.entrypoint&&(u.entrypoint=c.entrypoint),c.agentSdkVersion&&(u.agent_sdk_version=c.agentSdkVersion),c.sweBenchRunId&&(u.swe_bench_run_id=c.sweBenchRunId),c.sweBenchInstanceId&&(u.swe_bench_instance_id=c.sweBenchInstanceId),c.sweBenchTaskId&&(u.swe_bench_task_id=c.sweBenchTaskId),c.agentId&&(u.agent_id=c.agentId),c.parentSessionId&&(u.parent_session_id=c.parentSessionId),c.agentType&&(u.agent_type=c.agentType),t.githubActionsMetadata){let e=t.githubActionsMetadata;l.github_actions_metadata={actor_id:e.actorId,repository_id:e.repositoryId,repository_owner_id:e.repositoryOwnerId}}let d;return(t.accountUuid||t.organizationUuid)&&(d={account_uuid:t.accountUuid,organization_uuid:t.organizationUuid}),{env:l,...i&&{process:Buffer.from(xe(i)).toString(`base64`)},...d&&{auth:d},core:u,additional:{...a&&{rh:a},...o&&{skill_mode:o},...s&&{observer_mode:s},...n}}}var Gt,Kt,qt,j,M,Jt,Yt,Xt,Zt,Qt,$t,en,N,P,tn=e((()=>{n(),ke(),St(),Ve(),ze(),be(),i(),Tt(),Ie(),De(),Pe(),jt(),we(),Gt=new Set,Kt=512,qt=128,j=4*1024,M=20,Jt=2,Yt=10,Xt=new Set([`rm`,`mv`,`cp`,`touch`,`mkdir`,`chmod`,`chown`,`cat`,`head`,`tail`,`sort`,`stat`,`diff`,`wc`,`grep`,`rg`,`sed`]),Zt=/\s*(?:&&|\|\||[;|])\s*/,Qt=/\s+/,$t=t(()=>{let e=`0.0.22`.match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);return e?e[0]:void 0}),en=t(async()=>{let[e,t,n,i]=await Promise.all([v.getPackageManagers(),v.getRuntimes(),Fe(),Ne()]);return{platform:Ee(),platformRaw:process.env.CLAUDE_CODE_HOST_PLATFORM||process.platform,arch:v.arch,nodeVersion:v.nodeVersion,terminal:xt.terminal,packageManagers:e.join(`,`),runtimes:t.join(`,`),isRunningWithBun:v.isRunningWithBun(),isCi:r(process.env.CI),isClaubbit:r(process.env.CLAUBBIT),isClaudeCodeRemote:r(process.env.CLAUDE_CODE_REMOTE),isLocalAgentMode:process.env.CLAUDE_CODE_ENTRYPOINT===`local-agent`,isConductor:v.isConductor(),...process.env.CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE&&{remoteEnvironmentType:process.env.CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE},...process.env.CLAUDE_CODE_CONTAINER_ID&&{claudeCodeContainerId:process.env.CLAUDE_CODE_CONTAINER_ID},...process.env.CLAUDE_CODE_REMOTE_SESSION_ID&&{claudeCodeRemoteSessionId:process.env.CLAUDE_CODE_REMOTE_SESSION_ID},...process.env.CLAUDE_CODE_TAGS&&{tags:process.env.CLAUDE_CODE_TAGS},isGithubAction:r(process.env.GITHUB_ACTIONS),isClaudeCodeAction:r(process.env.CLAUDE_CODE_ACTION),isClaudeAiAuth:Le(),version:`0.0.22`,versionBase:$t(),buildTime:`2026-08-20T09:27:22.266Z`,deploymentEnvironment:v.detectDeploymentEnvironment(),...r(process.env.GITHUB_ACTIONS)&&{githubEventName:process.env.GITHUB_EVENT_NAME,githubActionsRunnerEnvironment:process.env.RUNNER_ENVIRONMENT,githubActionsRunnerOs:process.env.RUNNER_OS,githubActionRef:process.env.GITHUB_ACTION_PATH?.includes(`claude-code-action/`)?process.env.GITHUB_ACTION_PATH.split(`claude-code-action/`)[1]:void 0},...Me()&&{wslVersion:Me()},...n??{},...i.length>0?{vcs:i.join(`,`)}:{}}}),N=null,P=null}));function nn(e){return e.setValue(F,!0)}function rn(e){return e.getValue(F)===!0}var F,I=e((()=>{f(),F=c(`OpenTelemetry SDK Context Key SUPPRESS_TRACING`)}));function an(e){let t={};if(typeof e!=`object`||!e)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!on(n)){p.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!sn(r)){p.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}function on(e){return typeof e==`string`&&e!==``}function sn(e){return e==null?!0:Array.isArray(e)?cn(e):ln(typeof e)}function cn(e){let t;for(let n of e){if(n==null)continue;let e=typeof n;if(e!==t){if(!t){if(ln(e)){t=e;continue}return!1}return!1}}return!0}function ln(e){switch(e){case`number`:case`boolean`:case`string`:return!0}return!1}var un=e((()=>{f()}));function dn(){return e=>{p.error(fn(e))}}function fn(e){return typeof e==`string`?e:JSON.stringify(pn(e))}function pn(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(e=>{if(t[e])return;let r=n[e];r&&(t[e]=String(r))}),n=Object.getPrototypeOf(n);return t}var mn=e((()=>{f()}));function hn(e){try{gn(e)}catch{}}var gn,_n=e((()=>{mn(),gn=dn()}));function vn(e){let t=process.env[e];if(t==null||t.trim()===``)return;let n=Number(t);if(isNaN(n)){p.warn(`Unknown value ${Ze(t)} for ${e}, expected a number, using defaults`);return}return n}function L(e){let t=process.env[e];if(!(t==null||t.trim()===``))return t}var yn=e((()=>{f()})),bn,xn=e((()=>{bn=`2.9.0`})),Sn,Cn=e((()=>{Sn=`process.runtime.name`})),R,wn=e((()=>{xn(),_(),Cn(),R={[ie]:`opentelemetry`,[Sn]:`node`,[h]:ae,[re]:bn}})),z,Tn=e((()=>{yn(),wn(),z=performance})),En=e((()=>{Tn()}));function B(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*Fn)]}function Dn(e){return Nn(B(z.timeOrigin),B(typeof e==`number`?e:z.now()))}function On(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(--n,r+=V),[n,r]}function kn(e){return e[0]*1e6+e[1]/1e3}function An(e){return e[0]+e[1]/V}function jn(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function Mn(e){return jn(e)||typeof e==`number`||e instanceof Date}function Nn(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=V&&(n[1]-=V,n[0]+=1),n}var Pn,Fn,V,In=e((()=>{En(),Pn=9,Fn=10**6,V=10**Pn})),H,Ln=e((()=>{(function(e){e[e.SUCCESS=0]=`SUCCESS`,e[e.FAILED=1]=`FAILED`})(H||(H={}))}));function Rn(e){if(!zn(e)||Bn(e)!==Un)return!1;let t=qn(e);if(t===null)return!0;let n=G.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&U.call(n)===Kn}function zn(e){return typeof e==`object`&&!!e}function Bn(e){return e==null?e===void 0?Gn:Wn:K&&K in Object(e)?Vn(e):Hn(e)}function Vn(e){let t=G.call(e,K),n=e[K],r=!1;try{e[K]=void 0,r=!0}catch{}let i=Jn.call(e);return r&&(t?e[K]=n:delete e[K]),i}function Hn(e){return Jn.call(e)}var Un,Wn,Gn,U,Kn,qn,W,G,K,Jn,Yn=e((()=>{Un=`[object Object]`,Wn=`[object Null]`,Gn=`[object Undefined]`,U=Function.prototype.toString,Kn=U.call(Object),qn=Object.getPrototypeOf,W=Object.prototype,G=W.hasOwnProperty,K=Symbol?Symbol.toStringTag:void 0,Jn=W.toString}));function Xn(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=Qn(t,e.shift(),0,n);return t}function Zn(e){return q(e)?e.slice():e}function Qn(e,t,n=0,r){let i;if(!(n>nr)){if(n++,Y(e)||Y(t)||er(t))i=Zn(t);else if(q(e)){if(i=e.slice(),q(t))for(let e=0,n=t.length;e<n;e++)i.push(Zn(t[e]));else if(J(t)){let e=Object.keys(t);for(let n=0,r=e.length;n<r;n++){let r=e[n];r===`__proto__`||r===`constructor`||r===`prototype`||(i[r]=Zn(t[r]))}}}else if(J(e))if(J(t)){if(!tr(e,t))return t;i=Object.assign({},e);let a=Object.keys(t);for(let o=0,s=a.length;o<s;o++){let s=a[o];if(s===`__proto__`||s===`constructor`||s===`prototype`)continue;let c=t[s];if(Y(c))c===void 0?delete i[s]:i[s]=c;else{let a=i[s],o=c;if($n(e,s,r)||$n(t,s,r))delete i[s];else{if(J(a)&&J(o)){let n=r.get(a)||[],i=r.get(o)||[];n.push({obj:e,key:s}),i.push({obj:t,key:s}),r.set(a,n),r.set(o,i)}i[s]=Qn(i[s],c,n,r)}}}}else i=t;return i}}function $n(e,t,n){let r=n.get(e[t])||[];for(let n=0,i=r.length;n<i;n++){let i=r[n];if(i.key===t&&i.obj===e)return!0}return!1}function q(e){return Array.isArray(e)}function er(e){return typeof e==`function`}function J(e){return!Y(e)&&!q(e)&&!er(e)&&typeof e==`object`}function Y(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e===void 0||e instanceof Date||e instanceof RegExp||e===null}function tr(e,t){return!(!Rn(e)||!Rn(t))}var nr,rr=e((()=>{Yn(),nr=20})),ir,ar=e((()=>{a(),ir=class{constructor(){o(this,`_promise`,void 0),o(this,`_resolve`,void 0),o(this,`_reject`,void 0),this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}}})),or,sr=e((()=>{ar(),a(),or=class{constructor(e,t){o(this,`_isCalled`,!1),o(this,`_deferred`,new ir),o(this,`_callback`,void 0),o(this,`_that`,void 0),this._callback=e,this._that=t}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(e=>this._deferred.resolve(e),e=>this._deferred.reject(e))}catch(e){this._deferred.reject(e)}}return this._deferred.promise}}}));function cr(e,t){return new Promise(n=>{d.with(nn(d.active()),()=>{e.export(t,n)})})}var lr=e((()=>{f(),I()})),ur,X=e((()=>{I(),un(),_n(),mn(),In(),Ln(),En(),rr(),sr(),lr(),ur={_export:cr}}));function dr(){if(Z===void 0)try{let e=globalThis.process.argv0;Z=e?`unknown_service:${e}`:`unknown_service`}catch{Z=`unknown_service`}return Z}var Z,fr=e((()=>{})),Q,pr=e((()=>{Q=e=>typeof e==`object`&&!!e&&typeof e.then==`function`}));function mr(e,t){return yr.FromAttributeList(Object.entries(e),t)}function hr(){return mr({[ne]:dr(),[h]:R[h],[ie]:R[ie],[re]:R[re]})}function gr(e){return e.map(([e,t])=>Q(t)?[e,t.catch(t=>{p.debug(`promise rejection for resource attribute: %s - %s`,e,t)})]:[e,t])}function _r(e){if(typeof e==`string`||e===void 0)return e;p.warn(`Schema URL must be string or undefined, got %s. Schema URL will be ignored.`,e)}function vr(e,t){let n=e?.schemaUrl,r=t?.schemaUrl,i=n===void 0||n===``,a=r===void 0||r===``;if(i)return r;if(a||n===r)return n;p.warn(`Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.`,n,r)}var yr,br=e((()=>{f(),X(),_(),fr(),pr(),a(),yr=class e{static FromAttributeList(t,n){let r=new e({},n);return r._rawAttributes=gr(t),r._asyncAttributesPending=t.filter(([e,t])=>Q(t)).length>0,r}constructor(e,t){o(this,`_rawAttributes`,void 0),o(this,`_asyncAttributesPending`,!1),o(this,`_schemaUrl`,void 0),o(this,`_memoizedAttributes`,void 0);let n=e.attributes??{};this._rawAttributes=Object.entries(n).map(([e,t])=>(Q(t)&&(this._asyncAttributesPending=!0),[e,t])),this._rawAttributes=gr(this._rawAttributes),this._schemaUrl=_r(t?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[t,n]=this._rawAttributes[e];this._rawAttributes[e]=[t,Q(n)?await n:n]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&p.error(`Accessing resource attributes before async attributes settled`),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[t,n]of this._rawAttributes){if(Q(n)){p.debug(`Unsettled resource attribute ${t} skipped`);continue}n!=null&&(e[t]??(e[t]=n))}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(t){if(t==null)return this;let n=vr(this,t),r=n?{schemaUrl:n}:void 0;return e.FromAttributeList([...t.getRawAttributes(),...this.getRawAttributes()],r)}}})),xr,Sr,Cr=e((()=>{f(),_(),X(),a(),xr=class{constructor(){o(this,`_MAX_LENGTH`,255),o(this,`_COMMA_SEPARATOR`,`,`),o(this,`_LABEL_KEY_VALUE_SPLITTER`,`=`)}detect(e){let t={},n=L(`OTEL_RESOURCE_ATTRIBUTES`),r=L(`OTEL_SERVICE_NAME`);if(n)try{let e=this._parseResourceAttributes(n);Object.assign(t,e)}catch(e){p.debug(`EnvDetector failed: ${e instanceof Error?e.message:e}`)}return r&&(t[ne]=r),{attributes:t}}_parseResourceAttributes(e){if(!e)return{};let t={},n=e.split(this._COMMA_SEPARATOR).filter(e=>e.trim()!==``);for(let e of n){let n=e.split(this._LABEL_KEY_VALUE_SPLITTER);if(n.length!==2)throw Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${e}". Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.`);let[r,i]=n,a=r.trim(),o=i.trim();if(a.length===0)throw Error(`Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in "${e}".`);let s,c;try{s=decodeURIComponent(a),c=decodeURIComponent(o)}catch(t){throw Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${e}": ${t instanceof Error?t.message:t}`,{cause:t})}if(s.length>this._MAX_LENGTH)throw Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${s}".`);if(c.length>this._MAX_LENGTH)throw Error(`Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key "${s}".`);t[s]=c}return t}},Sr=new xr})),wr,Tr,Er,Dr,Or,kr=e((()=>{wr=`host.arch`,Tr=`host.id`,Er=`host.name`,Dr=`os.type`,Or=`os.version`}));async function Ar(){if(!$)switch(Qe.platform){case`darwin`:$=(await import(`./getMachineId-darwin-CsRhaP3y.js`)).getMachineId;break;case`linux`:$=(await import(`./getMachineId-linux-Bd7UBNRQ.js`)).getMachineId;break;case`freebsd`:$=(await import(`./getMachineId-bsd-Cut1kHoA.js`)).getMachineId;break;case`win32`:$=(await import(`./getMachineId-win-DamF2CH_.js`)).getMachineId;break;default:$=(await import(`./getMachineId-unsupported-vFGP8E_8.js`)).getMachineId;break}return $()}var $,jr=e((()=>{})),Mr,Nr,Pr=e((()=>{Mr=e=>{switch(e){case`arm`:return`arm32`;case`ppc`:return`ppc32`;case`x64`:return`amd64`;default:return e}},Nr=e=>{switch(e){case`sunos`:return`solaris`;case`win32`:return`windows`;default:return e}}})),Fr,Ir,Lr=e((()=>{kr(),jr(),Pr(),Fr=class{detect(e){return{attributes:{[Er]:Ke(),[wr]:Mr(Ge()),[Tr]:Ar()}}}},Ir=new Fr})),Rr,zr,Br=e((()=>{kr(),Pr(),Rr=class{detect(e){return{attributes:{[Dr]:Nr(qe()),[Or]:Je()}}}},zr=new Rr})),Vr=e((()=>{Lr(),Br(),kr()})),Hr=e((()=>{Vr()})),Ur=e((()=>{Cr(),Hr()})),Wr=e((()=>{br(),Ur(),fr()}));function Gr(e){return Kr(e,new WeakSet)}function Kr(e,t){if(e==null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e instanceof Uint8Array)return!0;if(typeof e==`object`){if(t.has(e))return!1;if(t.add(e),Array.isArray(e))return e.every(e=>Kr(e,t));let n=e;return n.constructor!==Object&&n.constructor!==void 0?!1:Object.values(n).every(e=>Kr(e,t))}return!1}var qr=e((()=>{})),Jr,Yr=e((()=>{f(),g(),_(),qr(),a(),Jr=class{set severityText(e){this._isLogRecordReadonly()||(this._severityText=e)}get severityText(){return this._severityText}set severityNumber(e){this._isLogRecordReadonly()||(this._severityNumber=e)}get severityNumber(){return this._severityNumber}set body(e){this._isLogRecordReadonly()||(this._body=e)}get body(){return this._body}get eventName(){return this._eventName}set eventName(e){this._isLogRecordReadonly()||(this._eventName=e)}get droppedAttributesCount(){return this._droppedAttributesCount}constructor(e,t,n){o(this,`hrTime`,void 0),o(this,`hrTimeObserved`,void 0),o(this,`spanContext`,void 0),o(this,`resource`,void 0),o(this,`instrumentationScope`,void 0),o(this,`attributes`,{}),o(this,`_severityText`,void 0),o(this,`_severityNumber`,void 0),o(this,`_body`,void 0),o(this,`_eventName`,void 0),o(this,`_attributesCount`,0),o(this,`_droppedAttributesCount`,0),o(this,`_isReadonly`,!1),o(this,`_logRecordLimits`,void 0);let{timestamp:r,observedTimestamp:i,eventName:a,severityNumber:s,severityText:c,body:l,attributes:d={},exception:f,context:p}=n,te=Date.now();if(this.hrTime=ue(r??te),this.hrTimeObserved=ue(i??te),p){let e=u.getSpanContext(p);e&&ee(e)&&(this.spanContext=e)}this.severityNumber=s,this.severityText=c,this.body=l,this.resource=e.resource,this.instrumentationScope=t,this._logRecordLimits=e.logRecordLimits,this._eventName=a,this.setAttributes(d),f!=null&&this._setException(f)}setAttribute(e,t){if(this._isLogRecordReadonly())return this;if(e.length===0)return p.warn(`Invalid attribute key: ${e}`),this;if(!Gr(t))return p.warn(`Invalid attribute value set for key: ${e}`),this;let n=!Object.prototype.hasOwnProperty.call(this.attributes,e);return n&&this._attributesCount>=this._logRecordLimits.attributeCountLimit?(this._droppedAttributesCount++,this._droppedAttributesCount===1&&p.warn(`Dropping extra attributes.`),this):(this.attributes[e]=this._truncateToSize(t),n&&this._attributesCount++,this)}setAttributes(e){for(let[t,n]of Object.entries(e))this.setAttribute(t,n);return this}setBody(e){return this.body=e,this}setEventName(e){return this.eventName=e,this}setSeverityNumber(e){return this.severityNumber=e,this}setSeverityText(e){return this.severityText=e,this}_makeReadonly(){this._isReadonly=!0}_truncateToSize(e){let t=this._logRecordLimits.attributeValueLengthLimit;if(t<=0)return p.warn(`Attribute value limit must be positive, got ${t}`),e;if(e==null)return e;if(typeof e==`string`)return this._truncateToLimitUtil(e,t);if(e instanceof Uint8Array)return e;if(Array.isArray(e))return e.map(e=>this._truncateToSize(e));if(typeof e==`object`){let t={};for(let[n,r]of Object.entries(e))t[n]=this._truncateToSize(r);return t}return e}_setException(e){let t=!1;if(typeof e==`string`||typeof e==`number`)Object.hasOwn(this.attributes,`exception.message`)||this.setAttribute(se,String(e)),t=!0;else if(e&&typeof e==`object`){let n=e;n.code?(Object.hasOwn(this.attributes,`exception.type`)||this.setAttribute(oe,n.code.toString()),t=!0):n.name&&(Object.hasOwn(this.attributes,`exception.type`)||this.setAttribute(oe,n.name),t=!0),n.message&&(Object.hasOwn(this.attributes,`exception.message`)||this.setAttribute(se,n.message),t=!0),n.stack&&(Object.hasOwn(this.attributes,`exception.stacktrace`)||this.setAttribute(pe,n.stack),t=!0)}t||p.warn(`Failed to record an exception ${e}`)}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_isLogRecordReadonly(){return this._isReadonly&&p.warn(`Can not execute the operation on emitted log record`),this._isReadonly}}})),Xr,Zr=e((()=>{E(),f(),Yr(),a(),Xr=class{constructor(e,t){o(this,`instrumentationScope`,void 0),o(this,`_sharedState`,void 0),o(this,`_loggerConfig`,void 0),this.instrumentationScope=e,this._sharedState=t,this._loggerConfig=this._sharedState.getLoggerConfig(this.instrumentationScope)}emit(e){let t=this._loggerConfig,n=e.context||d.active(),r=e.severityNumber??y.UNSPECIFIED;if(r!==y.UNSPECIFIED&&r<t.minimumSeverity)return;if(t.traceBased){let e=u.getSpanContext(n);if(e&&ee(e)&&(e.traceFlags&l.SAMPLED)!==l.SAMPLED)return}let i=new Jr(this._sharedState,this.instrumentationScope,{context:n,...e});this._sharedState.loggerMetrics.emitLog(),this._sharedState.activeProcessor.onEmit(i,n),i._makeReadonly()}enabled(e){let t=this._loggerConfig;if(t.disabled)return!1;let n=e?.severityNumber;if(typeof n==`number`&&n!==y.UNSPECIFIED&&n<t.minimumSeverity)return!1;let r=e?.context||d.active();if(t.traceBased){let e=u.getSpanContext(r);if(e&&ee(e)&&(e.traceFlags&l.SAMPLED)!==l.SAMPLED)return!1}let i={context:r,instrumentationScope:this.instrumentationScope,severityNumber:e?.severityNumber,eventName:e?.eventName};for(let e of this._sharedState.processors)if(!e.enabled||e.enabled(i))return!0;return!1}}})),Qr,$r=e((()=>{Qr=class{forceFlush(){return Promise.resolve()}onEmit(e,t){}shutdown(){return Promise.resolve()}enabled(e){return!1}}})),ei,ti=e((()=>{g(),a(),ei=class{constructor(e,t){o(this,`processors`,void 0),o(this,`forceFlushTimeoutMillis`,void 0),this.processors=e,this.forceFlushTimeoutMillis=t}async forceFlush(){let e=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(t=>de(t.forceFlush(),e)))}onEmit(e,t){this.processors.forEach(n=>n.onEmit(e,t))}async shutdown(){await Promise.all(this.processors.map(e=>e.shutdown()))}enabled(e){for(let t of this.processors)if(!t.enabled||t.enabled(e))return!0;return!1}}}));function ni(e){return`${e.name}@${e.version||``}:${e.schemaUrl||``}`}var ri=e((()=>{})),ii,ai=e((()=>{ii=`otel.sdk.log.created`})),oi,si=e((()=>{ai(),a(),oi=class{constructor(e){o(this,`createdLogs`,void 0),this.createdLogs=e.createCounter(ii,{unit:`{log_record}`,description:`The number of logs submitted to enabled SDK Loggers.`})}emitLog(){this.createdLogs.add(1)}}})),ci,li=e((()=>{ci=`0.215.0`})),ui,di,fi,pi=e((()=>{f(),E(),$r(),ti(),ri(),si(),li(),a(),ui={disabled:!1,minimumSeverity:y.UNSPECIFIED,traceBased:!1},di=()=>({...ui}),fi=class{constructor(e,t,n,r,i,a){o(this,`loggers`,new Map),o(this,`activeProcessor`,void 0),o(this,`registeredLogRecordProcessors`,[]),o(this,`resource`,void 0),o(this,`forceFlushTimeoutMillis`,void 0),o(this,`logRecordLimits`,void 0),o(this,`processors`,void 0),o(this,`loggerMetrics`,void 0),o(this,`_loggerConfigurator`,void 0),o(this,`_loggerConfigs`,new Map),this.resource=e,this.forceFlushTimeoutMillis=t,this.logRecordLimits=n,this.processors=r,r.length>0?(this.registeredLogRecordProcessors=r,this.activeProcessor=new ei(this.registeredLogRecordProcessors,this.forceFlushTimeoutMillis)):this.activeProcessor=new Qr,this._loggerConfigurator=i??di;let c=a?a.getMeter(`@opentelemetry/sdk-logs`,ci):s();this.loggerMetrics=new oi(c)}getLoggerConfig(e){let t=ni(e),n=this._loggerConfigs.get(t);return n||(n=this._loggerConfigurator(e),this._loggerConfigs.set(t,n),n)}}})),mi,hi=e((()=>{f(),E(),he(),g(),Zr(),pi(),a(),mi=class{constructor(e={}){o(this,`_shutdownOnce`,void 0),o(this,`_sharedState`,void 0);let t={resource:e.resource??me(),forceFlushTimeoutMillis:e.forceFlushTimeoutMillis??3e4,logRecordLimits:{attributeCountLimit:e.logRecordLimits?.attributeCountLimit??128,attributeValueLengthLimit:e.logRecordLimits?.attributeValueLengthLimit??1/0},loggerConfigurator:e.loggerConfigurator??di,processors:e.processors??[],meterProvider:e.meterProvider};this._sharedState=new fi(t.resource,t.forceFlushTimeoutMillis,t.logRecordLimits,t.processors,t.loggerConfigurator,t.meterProvider),this._shutdownOnce=new le(this._shutdown,this)}getLogger(e,t,n){if(this._shutdownOnce.isCalled)return p.warn(`A shutdown LoggerProvider cannot provide a Logger`),x;e||p.warn(`Logger requested without instrumentation scope name.`);let r=e||`unknown`,i=`${r}@${t||``}:${n?.schemaUrl||``}`;return this._sharedState.loggers.has(i)||this._sharedState.loggers.set(i,new Xr({name:r,version:t,schemaUrl:n?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(i)}forceFlush(){return this._shutdownOnce.isCalled?(p.warn(`invalid attempt to force flush after LoggerProvider shutdown`),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(p.warn(`shutdown may only be called once per LoggerProvider`),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}}})),gi,_i=e((()=>{g(),gi=class{export(e,t){this._sendLogRecords(e,t)}async forceFlush(){}async shutdown(){}_exportInfo(e){return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationScope,timestamp:fe(e.hrTime),traceId:e.spanContext?.traceId,spanId:e.spanContext?.spanId,traceFlags:e.spanContext?.traceFlags,severityText:e.severityText,severityNumber:e.severityNumber,eventName:e.eventName,body:e.body,attributes:e.attributes}}_sendLogRecords(e,t){for(let t of e)console.dir(this._exportInfo(t),{depth:3});t?.({code:ce.SUCCESS})}}}));async function vi(e){let t=[];for(let n=0,r=e.length;n<r;n++){let r=e[n];r.resource.asyncAttributesPending&&r.resource.waitForAsyncAttributes&&t.push(r.resource.waitForAsyncAttributes())}t!=null&&t.length>0&&await Promise.all(t)}var yi,bi,xi=e((()=>{f(),g(),a(),yi=class{constructor(e,t,n){o(this,`_exportCompleted`,void 0),o(this,`_exportScheduledPromise`,void 0),o(this,`_exportScheduledResolve`,void 0),this._exportScheduledPromise=new Promise(e=>{this._exportScheduledResolve=e}),this._exportCompleted=this._executeExport(e,t,n)}get exportCompleted(){return this._exportCompleted}get exportScheduled(){return this._exportScheduledPromise}async _executeExport(e,t,n){try{await vi(t),await d.with(te(d.active()),async()=>this._exportWithTimeout(e,t,n))}catch(e){m(e),this._exportScheduledResolve()}}async _exportWithTimeout(e,t,n){return new Promise((r,i)=>{let a=setTimeout(()=>{i(Error(`Timeout`))},n);e.export(t,e=>{clearTimeout(a),e.code===ce.SUCCESS?r():i(e.error??Error(`BatchLogRecordProcessor: log record export failed`))}),this._exportScheduledResolve()})}},bi=class{constructor(e,t){o(this,`_maxExportBatchSize`,void 0),o(this,`_maxQueueSize`,void 0),o(this,`_scheduledDelayMillis`,void 0),o(this,`_exportTimeoutMillis`,void 0),o(this,`_exporter`,void 0),o(this,`_currentExport`,null),o(this,`_finishedLogRecords`,[]),o(this,`_timer`,void 0),o(this,`_shutdownOnce`,void 0),o(this,`_flushing`,!1),this._exporter=e,this._maxExportBatchSize=t?.maxExportBatchSize??512,this._maxQueueSize=t?.maxQueueSize??2048,this._scheduledDelayMillis=t?.scheduledDelayMillis??5e3,this._exportTimeoutMillis=t?.exportTimeoutMillis??3e4,this._shutdownOnce=new le(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(p.warn(`BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize`),this._maxExportBatchSize=this._maxQueueSize)}onEmit(e){this._shutdownOnce.isCalled||this._addToBuffer(e)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}_addToBuffer(e){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(e),this._maybeStartTimer())}shutdown(){return this._shutdownOnce.call()}async _shutdown(){this.onShutdown(),await this._flushAll(),await this._exporter.shutdown()}async _flushAll(){if(this._flushing)return;this._flushing=!0;let e=this._finishedLogRecords;for(this._finishedLogRecords=[],this._clearTimer(),this._currentExport!==null&&(await this._exporter.forceFlush(),await this._currentExport.exportCompleted,this._currentExport=null);e.length>0;){let t;e.length<=this._maxExportBatchSize?(t=e,e=[]):t=e.splice(0,this._maxExportBatchSize);let n=new yi(this._exporter,t,this._exportTimeoutMillis);this._currentExport=n;try{await n.exportScheduled,await this._exporter.forceFlush(),await n.exportCompleted}catch(e){m(e)}finally{this._currentExport=null}}this._flushing=!1,this._maybeStartTimer()}_extractBatch(){if(this._finishedLogRecords.length===0)return null;if(this._finishedLogRecords.length<=this._maxExportBatchSize){let e=this._finishedLogRecords;return this._finishedLogRecords=[],e}else return this._finishedLogRecords.splice(0,this._maxExportBatchSize)}_exportOneBatch(){this._clearTimer();let e=this._extractBatch();if(e===null)return;let t=new yi(this._exporter,e,this._exportTimeoutMillis);this._currentExport=t,t.exportCompleted.then(()=>{this._currentExport=null,this._maybeStartTimer()}).catch(e=>{this._currentExport=null,m(e),this._maybeStartTimer()})}_maybeStartTimer(){if(!this._shutdownOnce.isCalled&&!this._flushing&&this._finishedLogRecords.length!==0&&this._currentExport===null){if(this._finishedLogRecords.length>=this._maxExportBatchSize){this._exportOneBatch();return}this._timer===void 0&&(this._timer=setTimeout(()=>{this._timer=void 0,this._exportOneBatch()},this._scheduledDelayMillis),typeof this._timer!=`number`&&this._timer.unref())}}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}}})),Si,Ci=e((()=>{xi(),Si=class extends bi{onShutdown(){}}})),wi=e((()=>{Ci()})),Ti=e((()=>{wi()})),Ei=e((()=>{hi(),_i(),Ti(),E()}));export{Bt as $,An as A,hn as B,Xn as C,Dn as D,Nn as E,Tn as F,I as G,un as H,z as I,It as J,rn as K,vn as L,Mn as M,jn as N,On as O,B as P,A as Q,L as R,rr as S,Ln as T,sn as U,_n as V,an as W,zt as X,Lt as Y,Ut as Z,mr as _,_i as a,kt as at,or as b,Wr as c,jt as ct,Ir as d,yt as dt,tn as et,Lr as f,St as ft,br as g,dt as gt,hr as h,E as ht,gi as i,Wt as it,In as j,kn as k,Br as l,Et as lt,Cr as m,pt as mt,Si as n,Ft as nt,mi as o,k as ot,Sr as p,ft as pt,nn as q,Ci as r,Mt as rt,hi as s,Ot as st,Ei as t,Nt as tt,zr as u,xt as ut,X as v,H as w,sr as x,ur as y,yn as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Ks as t,St as n,gi as r,ow as i,qs as a,sw as o,vi as s,yt as c}from"./loadAgentsDir-C1LkW7gl.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{n as u,t as d}from"./ExitFlow-BasHk1mk.js";import{spawnSync as f}from"child_process";function p(){return o(g)??`Goodbye!`}async function m(e){if(a())return e(),f(`tmux`,[`detach-client`],{stdio:`ignore`}),null;let t=c()!==null;return t?(0,h.jsx)(d,{showWorktree:t,onDone:e,onCancel:()=>e()}):(e(p()),await r(0,`prompt_input_exit`),null)}var h,g;e((()=>{i(),u(),t(),s(),n(),h=l(),g=[`Goodbye!`,`See ya!`,`Bye!`,`Catch you later!`]}))();export{m as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Dp as n,Op as r,Ub as i,ad as a,id as o}from"./loadAgentsDir-C1LkW7gl.js";import{D as s,Gt as c,I as l,P as u,T as d,ai as f,t as p,x as m}from"./src-DL3w8VPk.js";import{t as h}from"./jsx-runtime-Bb4Xn-E0.js";import{G as g,K as _,P as v,St as y,Tt as b,U as x,W as S,f as C,g as w,gn as T,hn as E}from"./model-BwBE0Pt5.js";import{n as D,t as O}from"./useExitOnCtrlCDWithKeybindings-CjW3gUOt.js";import{t as k}from"./select-C_KXmqbI.js";import{n as A,r as j,t as M}from"./modelOptions-DvNBapgG.js";import{t as N}from"./CustomSelect-B46Eh0gU.js";import{n as P,t as F}from"./fetchModelList-CqsTAWEN.js";function I({initial:e,sessionModel:t,onSelect:n,onCancel:i,isStandaloneCommand:a,showFastModeNotice:f,headerText:p}){let h=D(),y=e===null?z:e,[b,x]=(0,L.useState)(y),C=r(e=>_()?e.fastMode:!1),[T,O]=(0,L.useState)(()=>new Set(E(y)?[y.replace(/\[1m\]/i,``)]:[])),j=(0,L.useCallback)(()=>{if(!b||b===z)return;let e=b.replace(/\[1m\]/i,``);O(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[b]),N=(0,L.useMemo)(()=>A(C??!1),[C]),[P,I]=(0,L.useState)(null),[B,V]=(0,L.useState)(!1);(0,L.useEffect)(()=>{let e=!1;return V(!1),F().then(t=>{if(!e){if(!t||t.length===0){I(null),V(!0);return}I(t)}}).catch(()=>{e||V(!0)}),()=>{e=!0}},[]);let H=(0,L.useMemo)(()=>P?M(P,C??!1):null,[P,C]),U=P===null&&!B,W=(0,L.useMemo)(()=>{let t=H??N;return e!==null&&!t.some(t=>t.value===e)?[...t,{value:e,label:w(e),description:`Current model`}]:t},[H,N,e]),G=(0,L.useMemo)(()=>W.map(e=>({...e,value:e.value===null?z:e.value})),[W]),K=(0,L.useMemo)(()=>G.some(e=>e.value===y)?y:G[0]?.value??void 0,[G,y]),q=Math.min(10,G.length),J=Math.max(0,G.length-q),Y=G.find(e=>e.value===b)?.label,X=b!==void 0&&b!==z&&T.has(b.replace(/\[1m\]/i,``)),Z=(0,L.useCallback)(e=>{x(e)},[]);c({"modelPicker:toggle1M":()=>j()},{context:`ModelPicker`});function Q(e){if(e===z){n(null);return}let t=e.replace(/\[1m\]/i,``);n(T.has(t)?`${t}[1m]`:t)}let $=(0,R.jsxs)(l,{flexDirection:`column`,children:[(0,R.jsxs)(l,{flexDirection:`column`,children:[(0,R.jsxs)(l,{marginBottom:1,flexDirection:`column`,children:[(0,R.jsx)(u,{color:`remember`,bold:!0,children:`Select model`}),(0,R.jsx)(u,{dimColor:!0,children:p??`Choose a model for this and future sessions. Use Space to toggle 1M context.`}),t&&(0,R.jsxs)(u,{dimColor:!0,children:[`Currently using `,w(t),` for this session (set by plan mode). Selecting a model will undo this.`]})]}),(0,R.jsxs)(l,{flexDirection:`column`,marginBottom:1,children:[(0,R.jsx)(l,{flexDirection:`column`,children:(0,R.jsx)(k,{defaultValue:y,defaultFocusValue:K,options:G,onChange:Q,onFocus:Z,onCancel:i??(()=>{}),visibleOptionCount:q})}),J>0&&(0,R.jsx)(l,{paddingLeft:3,children:(0,R.jsxs)(u,{dimColor:!0,children:[`and `,J,` more…`]})}),U&&(0,R.jsx)(l,{paddingLeft:3,children:(0,R.jsx)(u,{dimColor:!0,children:`正在从 API 拉取可用模型列表…`})}),B&&P===null&&(0,R.jsx)(l,{paddingLeft:3,children:(0,R.jsx)(u,{dimColor:!0,children:`API 拉取失败,使用内置列表`})})]}),(0,R.jsx)(l,{marginBottom:1,flexDirection:`column`,children:X?(0,R.jsxs)(u,{dimColor:!0,children:[`1M context on`,(0,R.jsx)(u,{color:`subtle`,children:` · Space to toggle`})]}):(0,R.jsxs)(u,{color:`subtle`,children:[`1M context off`,Y?` for ${Y}`:``,(0,R.jsx)(u,{color:`subtle`,children:` · Space to toggle`})]})}),_()?f?(0,R.jsx)(l,{marginBottom:1,children:(0,R.jsxs)(u,{dimColor:!0,children:[`Fast mode is `,(0,R.jsx)(u,{bold:!0,children:`ON`}),` and available with `,v,` only (/fast). Switching to other models turn off fast mode.`]})}):S()&&!g()?(0,R.jsx)(l,{marginBottom:1,children:(0,R.jsxs)(u,{dimColor:!0,children:[`Use `,(0,R.jsx)(u,{bold:!0,children:`/fast`}),` to turn on Fast mode (`,v,` only).`]})}):null:null]}),a&&(0,R.jsx)(u,{dimColor:!0,italic:!0,children:h.pending?(0,R.jsxs)(R.Fragment,{children:[`Press `,h.keyName,` again to exit`]}):(0,R.jsxs)(d,{children:[(0,R.jsx)(s,{shortcut:`Enter`,action:`confirm`}),(0,R.jsx)(o,{action:`select:cancel`,context:`Select`,fallback:`Esc`,description:`exit`})]})})]});return a?(0,R.jsx)(m,{color:`permission`,children:$}):$}var L,R,z,B=e((()=>{L=t(f(),1),T(),O(),x(),p(),i(),n(),C(),j(),P(),a(),N(),R=h(),z=`__NO_PREFERENCE__`}));function V(e,t,n){if(!b())return!1;if(t)return!0;if(e===null||!E(e))return!1;let r=e.toLowerCase().replace(/\[1m\]$/,``).trim(),i=r===`opus`||r.includes(`opus-4-6`)||r.includes(`opus-4-7`),a=r===`sonnet`||r.includes(`sonnet-4-6`);return i&&n?!1:i||a}var H=e((()=>{y(),T()}));export{B as i,V as n,I as r,H as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ac as e,ic as t,oc as n,sc as r}from"./loadAgentsDir-C1LkW7gl.js";r();export{t as drainPendingExtraction,e as executeExtractMemories,n as initExtractMemories};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Ap as n,Dp as r,Op as i,Ub as a}from"./loadAgentsDir-C1LkW7gl.js";import{Gt as o,I as s,Lt as c,P as l,ai as u,di as d,fi as f,j as p,t as m,y as h}from"./src-DL3w8VPk.js";import{t as g}from"./jsx-runtime-Bb4Xn-E0.js";import{Ht as _,b as v,h as y}from"./settings-DKN4xSpQ.js";import{c as b,m as x}from"./config-BddEvZZl.js";import{n as S,r as C}from"./analytics-DJobLaWP.js";import{_ as w,l as T}from"./startupProfiler-DTs9w9EN.js";import{F as E,I as D,K as O,L as k,M as A,N as j,P as M,Q as N,U as P,j as F,q as I,z as L}from"./model-BwBE0Pt5.js";import{n as R,t as z}from"./systemTheme-Ceakddth.js";function B({cooldown:e}){return e?(0,H.jsx)(l,{color:`promptBorder`,dimColor:!0,children:`↯`}):(0,H.jsx)(l,{color:`fastMode`,children:`↯`})}function V(e=!0,t=!1){if(!e)return`↯`;let n=R(b().theme);return t?d.dim(p(`promptBorder`,n)(`↯`)):p(`fastMode`,n)(`↯`)}var H,U=e((()=>{f(),_(),m(),x(),z(),H=g()}));function W(e,t){E(),v(`userSettings`,{fastMode:e?!0:void 0}),t(e?e=>{let t=!I(e.mainLoopModel);return{...e,...t?{mainLoopModel:D(),mainLoopModelForSession:null}:{},fastMode:!0}}:e=>({...e,fastMode:!1}))}function G({onDone:e,unavailableReason:t}){let r=i(e=>e.mainLoopModel),a=i(e=>e.fastMode),u=n(),[d,f]=(0,J.useState)(a??!1),p=k(),m=p.status===`cooldown`,g=t!==null,_=F(A(!0));function v(){g||(W(d,u),C(`tengu_fast_mode_toggled`,{enabled:d,source:`picker`}),d?e(`${V(d)} Fast mode ON${I(r)?``:` · model set to ${M}`} · ${_}`):(u(e=>({...e,fastMode:!1})),e(`Fast mode OFF`)))}function y(){if(g){a&&W(!1,u),e(`Fast mode OFF`,{display:`system`});return}e(a?`${V()} Kept Fast mode ON`:`Kept Fast mode OFF`,{display:`system`})}function b(){g||f(e=>!e)}return o({"confirm:yes":v,"confirm:nextField":b,"confirm:next":b,"confirm:previous":b,"confirm:cycleMode":b,"confirm:toggle":b},{context:`Confirmation`}),(0,Y.jsxs)(h,{title:(0,Y.jsxs)(l,{children:[(0,Y.jsx)(B,{cooldown:m}),` Fast mode (research preview)`]}),subtitle:`High-speed mode for ${M}. Billed as extra usage at a premium rate. Separate rate limits apply.`,onCancel:y,color:`fastMode`,inputGuide:e=>e.pending?(0,Y.jsxs)(l,{children:[`Press `,e.keyName,` again to exit`]}):g?(0,Y.jsx)(l,{children:`Esc to cancel`}):(0,Y.jsx)(l,{children:`Tab to toggle · Enter to confirm · Esc to cancel`}),children:[t?(0,Y.jsx)(s,{marginLeft:2,children:(0,Y.jsx)(l,{color:`error`,children:t})}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(s,{flexDirection:`column`,gap:0,marginLeft:2,children:(0,Y.jsxs)(s,{flexDirection:`row`,gap:2,children:[(0,Y.jsx)(l,{bold:!0,children:`Fast mode`}),(0,Y.jsx)(l,{color:d?`fastMode`:void 0,bold:d,children:d?`ON `:`OFF`}),(0,Y.jsx)(l,{dimColor:!0,children:_})]})}),m&&p.status===`cooldown`&&(0,Y.jsx)(s,{marginLeft:2,children:(0,Y.jsxs)(l,{color:`warning`,children:[p.reason===`overloaded`?`Fast mode overloaded and is temporarily unavailable`:`You've hit your fast limit`,` · resets in `,T(p.resetAt-Date.now(),{hideTrailingZeros:!0})]})})]}),(0,Y.jsxs)(l,{dimColor:!0,children:[`Learn more:`,` `,(0,Y.jsx)(c,{url:`https://code.workmate.com/docs/en/fast-mode`,children:`https://code.workmate.com/docs/en/fast-mode`})]})]})}async function K(e,t,n){let r=L();if(r)return`Fast mode unavailable: ${r}`;let{mainLoopModel:i}=t();return W(e,n),C(`tengu_fast_mode_toggled`,{enabled:e,source:`shortcut`}),e?`${V(!0)} Fast mode ON${I(i)?``:` · model set to ${M}`} · ${F(A(!0))}`:`Fast mode OFF`}async function q(e,t,n){if(!O())return null;await N();let r=n?.trim().toLowerCase();if(r===`on`||r===`off`)return e(await K(r===`on`,t.getAppState,t.setAppState)),null;let i=L();return C(`tengu_fast_mode_picker_shown`,{unavailable_reason:i??``}),(0,Y.jsx)(G,{onDone:e,unavailableReason:i})}var J,Y,X=e((()=>{J=t(u(),1),m(),U(),a(),S(),r(),P(),w(),j(),y(),Y=g()}));export{U as a,V as i,q as n,X as r,G as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./fast-DqUpl_Lr.js";t();export{n as FastModePicker,e as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{g as t,v as n}from"./types-zk5Ltv5q.js";import{c as r,i}from"./debug-8DCufdSp.js";import{$t as a,tn as o}from"./settings-DKN4xSpQ.js";import{Er as s,Sn as c,St as l,Tt as u,_r as d,mr as f,wr as p,xn as m}from"./model-BwBE0Pt5.js";import{n as h,r as g}from"./client-DdenNfkQ.js";async function _(){let e=p();try{switch(e){case`firstParty`:{let e=await m({maxRetries:1}),t=u()?[a]:void 0,n=[];for await(let r of e.models.list({betas:t}))n.push({value:r.id,label:r.display_name??r.id,description:r.id});return n.length>0?n:null}case`openai`:{let e=h({maxRetries:1}),t=[];for await(let n of e.models.list())t.push({value:n.id,label:n.id,description:`via openai-compat`});return t.length>0?t:null}case`grok`:{let{getGrokClient:e}=await import(`./client-DYRgRQsr.js`),t=e({maxRetries:1}),n=[];for await(let e of t.models.list())n.push({value:e.id,label:e.id,description:`via grok`});return n.length>0?n:null}case`bedrock`:{let e=(await f()).map(e=>({value:e,label:e,description:`Bedrock inference profile`}));return e.length>0?e:null}case`gemini`:case`vertex`:case`foundry`:return null}}catch(t){return r(`[fetchModelList] ${e} failed: ${t instanceof Error?t.message:`unknown`}`),null}return null}var v,y,b=e((()=>{o(),c(),g(),l(),i(),t(),d(),s(),v=300*1e3,y=n(_,v)}));export{b as n,y as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./fetchModelList-CqsTAWEN.js";e();export{t as fetchAvailableModels};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{i as r,l as i,o as a}from"./envUtils-DcaKZlRU.js";import{n as o,t as s}from"./defineProperty-C-QyHrDq.js";import{C as c,v as l,w as u}from"./esm-BbMeEYcz.js";import{Z as d,_ as f,c as ee,et as p,it as te,mt as ne,n as re,o as ie,pt as ae,t as oe,v as se,w as m}from"./esm-BQY8jJNR.js";import{n as h,t as ce}from"./axios-DaWTGg7G.js";import{d as le,l as ue}from"./types-zk5Ltv5q.js";import{L as de,ut as g,zt as _}from"./state-BowF111d.js";import{n as fe,t as pe}from"./cwd-BcO6WHKo.js";import{B as me,C as v,H as he,L as ge,N as _e,x as ve}from"./debug-8DCufdSp.js";import{Gt as ye,qt as be}from"./settings-DKN4xSpQ.js";import{c as xe,d as y,m as b,n as Se}from"./config-BddEvZZl.js";import{a as Ce,s as we}from"./execFileNoThrow-BsfuytkN.js";import{d as Te,o as Ee,p as x,s as S}from"./log-DaILwWJa.js";import{a as De,i as Oe,o as ke}from"./platform-Dzff1WWw.js";import{i as Ae,n as je}from"./analytics-DJobLaWP.js";import{n as Me,r as C}from"./startupProfiler-DTs9w9EN.js";import{$n as Ne,Cn as Pe,En as Fe,Ht as Ie,St as w,Tt as Le,Vt as Re,_t as ze,er as Be,ht as T,pt as Ve,xt as He,yt as Ue}from"./model-BwBE0Pt5.js";import*as E from"path";import{randomUUID as D}from"crypto";import{appendFile as We,mkdir as O,readdir as Ge,unlink as k,writeFile as Ke}from"fs/promises";function A(){return i(process.env.CLAUDE_CODE_USE_BEDROCK)||i(process.env.CLAUDE_CODE_USE_VERTEX)||i(process.env.CLAUDE_CODE_USE_FOUNDRY)||x()}function qe(){return x()}var j=e((()=>{a(),Te()}));async function Je(){M===null&&!N&&(N=Ze(),M=await N,N=null,P.cache.clear?.())}function Ye(){M=null,N=null,P.cache.clear?.(),F.cache.clear?.()}function Xe(){if(M!==null)return M;let e=T();if(e?.emailAddress)return e.emailAddress}async function Ze(){let e=T();if(e?.emailAddress)return e.emailAddress}var M,N,P,F,I=e((()=>{we(),n(),_(),w(),b(),fe(),be(),a(),M=null,N=null,P=t(e=>{let t=y(),n=xe(),r,a,o;if(e&&(r=Ue()??void 0,a=ze()??void 0,r&&n.claudeCodeFirstTokenDate)){let e=new Date(n.claudeCodeFirstTokenDate).getTime();isNaN(e)||(o=e)}let s=T(),c=s?.organizationUuid,l=s?.accountUuid;return{deviceId:t,sessionId:g(),email:Xe(),appVersion:`0.0.22`,platform:ye(),organizationUuid:c,accountUuid:l,userType:process.env.USER_TYPE,subscriptionType:r,rateLimitTier:a,firstTokenTime:o,...i(process.env.GITHUB_ACTIONS)&&{githubActionsMetadata:{actor:process.env.GITHUB_ACTOR,actorId:process.env.GITHUB_ACTOR_ID,repository:process.env.GITHUB_REPOSITORY,repositoryId:process.env.GITHUB_REPOSITORY_ID,repositoryOwner:process.env.GITHUB_REPOSITORY_OWNER,repositoryOwnerId:process.env.GITHUB_REPOSITORY_OWNER_ID}}}}),F=t(async()=>{let e=await Ce(`git config --get user.email`,{shell:!0,reject:!1,cwd:pe()});return e.exitCode===0&&e.stdout?e.stdout.trim():void 0})}));function Qe(){return{seconds:0,nanos:0}}function L(e){return e!=null}var R,$e=e((()=>{R={fromJSON(e){return{seconds:L(e.seconds)?globalThis.Number(e.seconds):0,nanos:L(e.nanos)?globalThis.Number(e.nanos):0}},toJSON(e){let t={};return e.seconds!==void 0&&(t.seconds=Math.round(e.seconds)),e.nanos!==void 0&&(t.nanos=Math.round(e.nanos)),t},create(e){return R.fromPartial(e??{})},fromPartial(e){let t=Qe();return t.seconds=e.seconds??0,t.nanos=e.nanos??0,t}}}));function et(){return{account_id:0,organization_uuid:``,account_uuid:``}}function z(e){return e!=null}var B,tt=e((()=>{B={fromJSON(e){return{account_id:z(e.account_id)?globalThis.Number(e.account_id):0,organization_uuid:z(e.organization_uuid)?globalThis.String(e.organization_uuid):``,account_uuid:z(e.account_uuid)?globalThis.String(e.account_uuid):``}},toJSON(e){let t={};return e.account_id!==void 0&&(t.account_id=Math.round(e.account_id)),e.organization_uuid!==void 0&&(t.organization_uuid=e.organization_uuid),e.account_uuid!==void 0&&(t.account_uuid=e.account_uuid),t},create(e){return B.fromPartial(e??{})},fromPartial(e){let t=et();return t.account_id=e.account_id??0,t.organization_uuid=e.organization_uuid??``,t.account_uuid=e.account_uuid??``,t}}}));function nt(){return{actor_id:``,repository_id:``,repository_owner_id:``}}function rt(){return{platform:``,node_version:``,terminal:``,package_managers:``,runtimes:``,is_running_with_bun:!1,is_ci:!1,is_claubbit:!1,is_github_action:!1,is_claude_code_action:!1,is_claude_ai_auth:!1,version:``,github_event_name:``,github_actions_runner_environment:``,github_actions_runner_os:``,github_action_ref:``,wsl_version:``,github_actions_metadata:void 0,arch:``,is_claude_code_remote:!1,remote_environment_type:``,claude_code_container_id:``,claude_code_remote_session_id:``,tags:[],deployment_environment:``,is_conductor:!1,version_base:``,coworker_type:``,build_time:``,is_local_agent_mode:!1,linux_distro_id:``,linux_distro_version:``,linux_kernel:``,vcs:``,platform_raw:``}}function it(){return{slack_team_id:``,is_enterprise_install:!1,trigger:``,creation_method:``}}function at(){return{event_name:``,client_timestamp:void 0,model:``,session_id:``,user_type:``,betas:``,env:void 0,entrypoint:``,agent_sdk_version:``,is_interactive:!1,client_type:``,process:``,additional_metadata:``,auth:void 0,server_timestamp:void 0,event_id:``,device_id:``,swe_bench_run_id:``,swe_bench_instance_id:``,swe_bench_task_id:``,email:``,agent_id:``,parent_session_id:``,agent_type:``,slack:void 0,team_name:``,skill_name:``,plugin_name:``,marketplace_name:``}}function ot(e){let t=(e.seconds||0)*1e3;return t+=(e.nanos||0)/1e6,new globalThis.Date(t)}function V(e){return e instanceof globalThis.Date?e:typeof e==`string`?new globalThis.Date(e):ot(R.fromJSON(e))}function H(e){return e!=null}var U,W,G,K,st=e((()=>{$e(),tt(),U={fromJSON(e){return{actor_id:H(e.actor_id)?globalThis.String(e.actor_id):``,repository_id:H(e.repository_id)?globalThis.String(e.repository_id):``,repository_owner_id:H(e.repository_owner_id)?globalThis.String(e.repository_owner_id):``}},toJSON(e){let t={};return e.actor_id!==void 0&&(t.actor_id=e.actor_id),e.repository_id!==void 0&&(t.repository_id=e.repository_id),e.repository_owner_id!==void 0&&(t.repository_owner_id=e.repository_owner_id),t},create(e){return U.fromPartial(e??{})},fromPartial(e){let t=nt();return t.actor_id=e.actor_id??``,t.repository_id=e.repository_id??``,t.repository_owner_id=e.repository_owner_id??``,t}},W={fromJSON(e){return{platform:H(e.platform)?globalThis.String(e.platform):``,node_version:H(e.node_version)?globalThis.String(e.node_version):``,terminal:H(e.terminal)?globalThis.String(e.terminal):``,package_managers:H(e.package_managers)?globalThis.String(e.package_managers):``,runtimes:H(e.runtimes)?globalThis.String(e.runtimes):``,is_running_with_bun:H(e.is_running_with_bun)?globalThis.Boolean(e.is_running_with_bun):!1,is_ci:H(e.is_ci)?globalThis.Boolean(e.is_ci):!1,is_claubbit:H(e.is_claubbit)?globalThis.Boolean(e.is_claubbit):!1,is_github_action:H(e.is_github_action)?globalThis.Boolean(e.is_github_action):!1,is_claude_code_action:H(e.is_claude_code_action)?globalThis.Boolean(e.is_claude_code_action):!1,is_claude_ai_auth:H(e.is_claude_ai_auth)?globalThis.Boolean(e.is_claude_ai_auth):!1,version:H(e.version)?globalThis.String(e.version):``,github_event_name:H(e.github_event_name)?globalThis.String(e.github_event_name):``,github_actions_runner_environment:H(e.github_actions_runner_environment)?globalThis.String(e.github_actions_runner_environment):``,github_actions_runner_os:H(e.github_actions_runner_os)?globalThis.String(e.github_actions_runner_os):``,github_action_ref:H(e.github_action_ref)?globalThis.String(e.github_action_ref):``,wsl_version:H(e.wsl_version)?globalThis.String(e.wsl_version):``,github_actions_metadata:H(e.github_actions_metadata)?U.fromJSON(e.github_actions_metadata):void 0,arch:H(e.arch)?globalThis.String(e.arch):``,is_claude_code_remote:H(e.is_claude_code_remote)?globalThis.Boolean(e.is_claude_code_remote):!1,remote_environment_type:H(e.remote_environment_type)?globalThis.String(e.remote_environment_type):``,claude_code_container_id:H(e.claude_code_container_id)?globalThis.String(e.claude_code_container_id):``,claude_code_remote_session_id:H(e.claude_code_remote_session_id)?globalThis.String(e.claude_code_remote_session_id):``,tags:globalThis.Array.isArray(e?.tags)?e.tags.map(e=>globalThis.String(e)):[],deployment_environment:H(e.deployment_environment)?globalThis.String(e.deployment_environment):``,is_conductor:H(e.is_conductor)?globalThis.Boolean(e.is_conductor):!1,version_base:H(e.version_base)?globalThis.String(e.version_base):``,coworker_type:H(e.coworker_type)?globalThis.String(e.coworker_type):``,build_time:H(e.build_time)?globalThis.String(e.build_time):``,is_local_agent_mode:H(e.is_local_agent_mode)?globalThis.Boolean(e.is_local_agent_mode):!1,linux_distro_id:H(e.linux_distro_id)?globalThis.String(e.linux_distro_id):``,linux_distro_version:H(e.linux_distro_version)?globalThis.String(e.linux_distro_version):``,linux_kernel:H(e.linux_kernel)?globalThis.String(e.linux_kernel):``,vcs:H(e.vcs)?globalThis.String(e.vcs):``,platform_raw:H(e.platform_raw)?globalThis.String(e.platform_raw):``}},toJSON(e){let t={};return e.platform!==void 0&&(t.platform=e.platform),e.node_version!==void 0&&(t.node_version=e.node_version),e.terminal!==void 0&&(t.terminal=e.terminal),e.package_managers!==void 0&&(t.package_managers=e.package_managers),e.runtimes!==void 0&&(t.runtimes=e.runtimes),e.is_running_with_bun!==void 0&&(t.is_running_with_bun=e.is_running_with_bun),e.is_ci!==void 0&&(t.is_ci=e.is_ci),e.is_claubbit!==void 0&&(t.is_claubbit=e.is_claubbit),e.is_github_action!==void 0&&(t.is_github_action=e.is_github_action),e.is_claude_code_action!==void 0&&(t.is_claude_code_action=e.is_claude_code_action),e.is_claude_ai_auth!==void 0&&(t.is_claude_ai_auth=e.is_claude_ai_auth),e.version!==void 0&&(t.version=e.version),e.github_event_name!==void 0&&(t.github_event_name=e.github_event_name),e.github_actions_runner_environment!==void 0&&(t.github_actions_runner_environment=e.github_actions_runner_environment),e.github_actions_runner_os!==void 0&&(t.github_actions_runner_os=e.github_actions_runner_os),e.github_action_ref!==void 0&&(t.github_action_ref=e.github_action_ref),e.wsl_version!==void 0&&(t.wsl_version=e.wsl_version),e.github_actions_metadata!==void 0&&(t.github_actions_metadata=U.toJSON(e.github_actions_metadata)),e.arch!==void 0&&(t.arch=e.arch),e.is_claude_code_remote!==void 0&&(t.is_claude_code_remote=e.is_claude_code_remote),e.remote_environment_type!==void 0&&(t.remote_environment_type=e.remote_environment_type),e.claude_code_container_id!==void 0&&(t.claude_code_container_id=e.claude_code_container_id),e.claude_code_remote_session_id!==void 0&&(t.claude_code_remote_session_id=e.claude_code_remote_session_id),e.tags?.length&&(t.tags=e.tags),e.deployment_environment!==void 0&&(t.deployment_environment=e.deployment_environment),e.is_conductor!==void 0&&(t.is_conductor=e.is_conductor),e.version_base!==void 0&&(t.version_base=e.version_base),e.coworker_type!==void 0&&(t.coworker_type=e.coworker_type),e.build_time!==void 0&&(t.build_time=e.build_time),e.is_local_agent_mode!==void 0&&(t.is_local_agent_mode=e.is_local_agent_mode),e.linux_distro_id!==void 0&&(t.linux_distro_id=e.linux_distro_id),e.linux_distro_version!==void 0&&(t.linux_distro_version=e.linux_distro_version),e.linux_kernel!==void 0&&(t.linux_kernel=e.linux_kernel),e.vcs!==void 0&&(t.vcs=e.vcs),e.platform_raw!==void 0&&(t.platform_raw=e.platform_raw),t},create(e){return W.fromPartial(e??{})},fromPartial(e){let t=rt();return t.platform=e.platform??``,t.node_version=e.node_version??``,t.terminal=e.terminal??``,t.package_managers=e.package_managers??``,t.runtimes=e.runtimes??``,t.is_running_with_bun=e.is_running_with_bun??!1,t.is_ci=e.is_ci??!1,t.is_claubbit=e.is_claubbit??!1,t.is_github_action=e.is_github_action??!1,t.is_claude_code_action=e.is_claude_code_action??!1,t.is_claude_ai_auth=e.is_claude_ai_auth??!1,t.version=e.version??``,t.github_event_name=e.github_event_name??``,t.github_actions_runner_environment=e.github_actions_runner_environment??``,t.github_actions_runner_os=e.github_actions_runner_os??``,t.github_action_ref=e.github_action_ref??``,t.wsl_version=e.wsl_version??``,t.github_actions_metadata=e.github_actions_metadata!==void 0&&e.github_actions_metadata!==null?U.fromPartial(e.github_actions_metadata):void 0,t.arch=e.arch??``,t.is_claude_code_remote=e.is_claude_code_remote??!1,t.remote_environment_type=e.remote_environment_type??``,t.claude_code_container_id=e.claude_code_container_id??``,t.claude_code_remote_session_id=e.claude_code_remote_session_id??``,t.tags=e.tags?.map(e=>e)||[],t.deployment_environment=e.deployment_environment??``,t.is_conductor=e.is_conductor??!1,t.version_base=e.version_base??``,t.coworker_type=e.coworker_type??``,t.build_time=e.build_time??``,t.is_local_agent_mode=e.is_local_agent_mode??!1,t.linux_distro_id=e.linux_distro_id??``,t.linux_distro_version=e.linux_distro_version??``,t.linux_kernel=e.linux_kernel??``,t.vcs=e.vcs??``,t.platform_raw=e.platform_raw??``,t}},G={fromJSON(e){return{slack_team_id:H(e.slack_team_id)?globalThis.String(e.slack_team_id):``,is_enterprise_install:H(e.is_enterprise_install)?globalThis.Boolean(e.is_enterprise_install):!1,trigger:H(e.trigger)?globalThis.String(e.trigger):``,creation_method:H(e.creation_method)?globalThis.String(e.creation_method):``}},toJSON(e){let t={};return e.slack_team_id!==void 0&&(t.slack_team_id=e.slack_team_id),e.is_enterprise_install!==void 0&&(t.is_enterprise_install=e.is_enterprise_install),e.trigger!==void 0&&(t.trigger=e.trigger),e.creation_method!==void 0&&(t.creation_method=e.creation_method),t},create(e){return G.fromPartial(e??{})},fromPartial(e){let t=it();return t.slack_team_id=e.slack_team_id??``,t.is_enterprise_install=e.is_enterprise_install??!1,t.trigger=e.trigger??``,t.creation_method=e.creation_method??``,t}},K={fromJSON(e){return{event_name:H(e.event_name)?globalThis.String(e.event_name):``,client_timestamp:H(e.client_timestamp)?V(e.client_timestamp):void 0,model:H(e.model)?globalThis.String(e.model):``,session_id:H(e.session_id)?globalThis.String(e.session_id):``,user_type:H(e.user_type)?globalThis.String(e.user_type):``,betas:H(e.betas)?globalThis.String(e.betas):``,env:H(e.env)?W.fromJSON(e.env):void 0,entrypoint:H(e.entrypoint)?globalThis.String(e.entrypoint):``,agent_sdk_version:H(e.agent_sdk_version)?globalThis.String(e.agent_sdk_version):``,is_interactive:H(e.is_interactive)?globalThis.Boolean(e.is_interactive):!1,client_type:H(e.client_type)?globalThis.String(e.client_type):``,process:H(e.process)?globalThis.String(e.process):``,additional_metadata:H(e.additional_metadata)?globalThis.String(e.additional_metadata):``,auth:H(e.auth)?B.fromJSON(e.auth):void 0,server_timestamp:H(e.server_timestamp)?V(e.server_timestamp):void 0,event_id:H(e.event_id)?globalThis.String(e.event_id):``,device_id:H(e.device_id)?globalThis.String(e.device_id):``,swe_bench_run_id:H(e.swe_bench_run_id)?globalThis.String(e.swe_bench_run_id):``,swe_bench_instance_id:H(e.swe_bench_instance_id)?globalThis.String(e.swe_bench_instance_id):``,swe_bench_task_id:H(e.swe_bench_task_id)?globalThis.String(e.swe_bench_task_id):``,email:H(e.email)?globalThis.String(e.email):``,agent_id:H(e.agent_id)?globalThis.String(e.agent_id):``,parent_session_id:H(e.parent_session_id)?globalThis.String(e.parent_session_id):``,agent_type:H(e.agent_type)?globalThis.String(e.agent_type):``,slack:H(e.slack)?G.fromJSON(e.slack):void 0,team_name:H(e.team_name)?globalThis.String(e.team_name):``,skill_name:H(e.skill_name)?globalThis.String(e.skill_name):``,plugin_name:H(e.plugin_name)?globalThis.String(e.plugin_name):``,marketplace_name:H(e.marketplace_name)?globalThis.String(e.marketplace_name):``}},toJSON(e){let t={};return e.event_name!==void 0&&(t.event_name=e.event_name),e.client_timestamp!==void 0&&(t.client_timestamp=e.client_timestamp.toISOString()),e.model!==void 0&&(t.model=e.model),e.session_id!==void 0&&(t.session_id=e.session_id),e.user_type!==void 0&&(t.user_type=e.user_type),e.betas!==void 0&&(t.betas=e.betas),e.env!==void 0&&(t.env=W.toJSON(e.env)),e.entrypoint!==void 0&&(t.entrypoint=e.entrypoint),e.agent_sdk_version!==void 0&&(t.agent_sdk_version=e.agent_sdk_version),e.is_interactive!==void 0&&(t.is_interactive=e.is_interactive),e.client_type!==void 0&&(t.client_type=e.client_type),e.process!==void 0&&(t.process=e.process),e.additional_metadata!==void 0&&(t.additional_metadata=e.additional_metadata),e.auth!==void 0&&(t.auth=B.toJSON(e.auth)),e.server_timestamp!==void 0&&(t.server_timestamp=e.server_timestamp.toISOString()),e.event_id!==void 0&&(t.event_id=e.event_id),e.device_id!==void 0&&(t.device_id=e.device_id),e.swe_bench_run_id!==void 0&&(t.swe_bench_run_id=e.swe_bench_run_id),e.swe_bench_instance_id!==void 0&&(t.swe_bench_instance_id=e.swe_bench_instance_id),e.swe_bench_task_id!==void 0&&(t.swe_bench_task_id=e.swe_bench_task_id),e.email!==void 0&&(t.email=e.email),e.agent_id!==void 0&&(t.agent_id=e.agent_id),e.parent_session_id!==void 0&&(t.parent_session_id=e.parent_session_id),e.agent_type!==void 0&&(t.agent_type=e.agent_type),e.slack!==void 0&&(t.slack=G.toJSON(e.slack)),e.team_name!==void 0&&(t.team_name=e.team_name),e.skill_name!==void 0&&(t.skill_name=e.skill_name),e.plugin_name!==void 0&&(t.plugin_name=e.plugin_name),e.marketplace_name!==void 0&&(t.marketplace_name=e.marketplace_name),t},create(e){return K.fromPartial(e??{})},fromPartial(e){let t=at();return t.event_name=e.event_name??``,t.client_timestamp=e.client_timestamp??void 0,t.model=e.model??``,t.session_id=e.session_id??``,t.user_type=e.user_type??``,t.betas=e.betas??``,t.env=e.env!==void 0&&e.env!==null?W.fromPartial(e.env):void 0,t.entrypoint=e.entrypoint??``,t.agent_sdk_version=e.agent_sdk_version??``,t.is_interactive=e.is_interactive??!1,t.client_type=e.client_type??``,t.process=e.process??``,t.additional_metadata=e.additional_metadata??``,t.auth=e.auth!==void 0&&e.auth!==null?B.fromPartial(e.auth):void 0,t.server_timestamp=e.server_timestamp??void 0,t.event_id=e.event_id??``,t.device_id=e.device_id??``,t.swe_bench_run_id=e.swe_bench_run_id??``,t.swe_bench_instance_id=e.swe_bench_instance_id??``,t.swe_bench_task_id=e.swe_bench_task_id??``,t.email=e.email??``,t.agent_id=e.agent_id??``,t.parent_session_id=e.parent_session_id??``,t.agent_type=e.agent_type??``,t.slack=e.slack!==void 0&&e.slack!==null?G.fromPartial(e.slack):void 0,t.team_name=e.team_name??``,t.skill_name=e.skill_name??``,t.plugin_name=e.plugin_name??``,t.marketplace_name=e.marketplace_name??``,t}}}));function q(){return E.join(r(),`telemetry`)}function ct(e){if(!h.isAxiosError(e))return _e(e);let t=[],n=e.response?.headers?.[`request-id`];return n&&t.push(`request-id=${n}`),e.response?.status&&t.push(`status=${e.response.status}`),e.code&&t.push(`code=${e.code}`),e.message&&t.push(e.message),t.join(`, `)}var J,Y,X,lt=e((()=>{se(),ce(),_(),st(),w(),b(),a(),ge(),Fe(),ue(),Ee(),Re(),ve(),ne(),Ne(),je(),p(),o(),J=D(),Y=`1p_failed_events.`,X=class{constructor(e={}){s(this,`endpoint`,void 0),s(this,`timeout`,void 0),s(this,`maxBatchSize`,void 0),s(this,`skipAuth`,void 0),s(this,`batchDelayMs`,void 0),s(this,`baseBackoffDelayMs`,void 0),s(this,`maxBackoffDelayMs`,void 0),s(this,`maxAttempts`,void 0),s(this,`isKilled`,void 0),s(this,`pendingExports`,[]),s(this,`isShutdown`,!1),s(this,`schedule`,void 0),s(this,`cancelBackoff`,null),s(this,`attempts`,0),s(this,`isRetrying`,!1),s(this,`lastExportErrorContext`,void 0);let t=e.baseUrl||(process.env.ANTHROPIC_BASE_URL===`https://api-staging.anthropic.com`?`https://api-staging.anthropic.com`:`https://api.anthropic.com`);this.endpoint=`${t}${e.path||`/api/event_logging/batch`}`,this.timeout=e.timeout||1e4,this.maxBatchSize=e.maxBatchSize||200,this.skipAuth=e.skipAuth??!1,this.batchDelayMs=e.batchDelayMs||100,this.baseBackoffDelayMs=e.baseBackoffDelayMs||500,this.maxBackoffDelayMs=e.maxBackoffDelayMs||3e4,this.maxAttempts=e.maxAttempts??8,this.isKilled=e.isKilled??(()=>!1),this.schedule=e.schedule??((e,t)=>{let n=setTimeout(e,t);return()=>clearTimeout(n)}),this.retryPreviousBatches()}async getQueuedEventCount(){return(await this.loadEventsFromCurrentBatch()).length}getCurrentBatchFilePath(){return E.join(q(),`${Y}${g()}.${J}.json`)}async loadEventsFromFile(e){try{return await le(e)}catch{return[]}}async loadEventsFromCurrentBatch(){return this.loadEventsFromFile(this.getCurrentBatchFilePath())}async saveEventsToFile(e,t){try{if(t.length===0)try{await k(e)}catch{}else await O(q(),{recursive:!0}),await Ke(e,`${t.map(e=>v(e)).join(`
|
|
2
|
-
`)}\n`,`utf8`)}catch(e){S(e)}}async appendEventsToFile(e,t){if(t.length!==0)try{await O(q(),{recursive:!0}),await We(e,`${t.map(e=>v(e)).join(`
|
|
3
|
-
`)}\n`,`utf8`)}catch(e){S(e)}}async deleteFile(e){try{await k(e)}catch{}}async retryPreviousBatches(){try{let e=`${Y}${g()}.`,t;try{t=(await Ge(q())).filter(t=>t.startsWith(e)&&t.endsWith(`.json`)).filter(e=>!e.includes(J))}catch(e){if(me(e))return;throw e}for(let e of t){let t=E.join(q(),e);this.retryFileInBackground(t)}}catch(e){S(e)}}async retryFileInBackground(e){if(this.attempts>=this.maxAttempts){await this.deleteFile(e);return}let t=await this.loadEventsFromFile(e);if(t.length===0){await this.deleteFile(e);return}let n=await this.sendEventsInBatches(t);n.length===0?await this.deleteFile(e):await this.saveEventsToFile(e,n)}async export(e,t){if(this.isShutdown){t({code:m.FAILED,error:Error(`Exporter has been shutdown`)});return}let n=this.doExport(e,t);this.pendingExports.push(n),n.finally(()=>{let e=this.pendingExports.indexOf(n);e>-1&&this.pendingExports.splice(e,1)})}async doExport(e,t){try{let n=e.filter(e=>e.instrumentationScope?.name===`com.anthropic.claude_code.events`);if(n.length===0){t({code:m.SUCCESS});return}let r=this.transformLogsToEvents(n).events;if(r.length===0){t({code:m.SUCCESS});return}if(this.attempts>=this.maxAttempts){t({code:m.FAILED,error:Error(`Dropped ${r.length} events: max attempts (${this.maxAttempts}) reached`)});return}let i=await this.sendEventsInBatches(r);if(this.attempts++,i.length>0){await this.queueFailedEvents(i),this.scheduleBackoffRetry();let e=this.lastExportErrorContext?` (${this.lastExportErrorContext})`:``;t({code:m.FAILED,error:Error(`Failed to export ${i.length} events${e}`)});return}this.resetBackoff(),await this.getQueuedEventCount()>0&&!this.isRetrying&&this.retryFailedEvents(),t({code:m.SUCCESS})}catch(e){S(e),t({code:m.FAILED,error:he(e)})}}async sendEventsInBatches(e){let t=[];for(let n=0;n<e.length;n+=this.maxBatchSize)t.push(e.slice(n,n+this.maxBatchSize));let n=[],r;for(let e=0;e<t.length;e++){let i=t[e];try{await this.sendBatchWithRetry({events:i})}catch(i){r=ct(i);for(let r=e;r<t.length;r++)n.push(...t[r]);break}e<t.length-1&&this.batchDelayMs>0&&await Ie(this.batchDelayMs)}return n.length>0&&r&&(this.lastExportErrorContext=r),n}async queueFailedEvents(e){let t=this.getCurrentBatchFilePath();await this.appendEventsToFile(t,e);let n=this.lastExportErrorContext?` (${this.lastExportErrorContext})`:``,r=`1P event logging: ${e.length} events failed to export${n}`;S(Error(r))}scheduleBackoffRetry(){if(this.cancelBackoff||this.isRetrying||this.isShutdown)return;let e=Math.min(this.baseBackoffDelayMs*this.attempts*this.attempts,this.maxBackoffDelayMs);this.cancelBackoff=this.schedule(async()=>{this.cancelBackoff=null,await this.retryFailedEvents()},e)}async retryFailedEvents(){let e=this.getCurrentBatchFilePath();for(;!this.isShutdown;){let t=await this.loadEventsFromFile(e);if(t.length===0)break;if(this.attempts>=this.maxAttempts){await this.deleteFile(e),this.resetBackoff();return}this.isRetrying=!0,await this.deleteFile(e);let n=await this.sendEventsInBatches(t);if(this.attempts++,this.isRetrying=!1,n.length>0){await this.saveEventsToFile(e,n),this.scheduleBackoffRetry();return}this.resetBackoff()}}resetBackoff(){this.attempts=0,this.cancelBackoff&&(this.cancelBackoff(),this.cancelBackoff=null)}async sendBatchWithRetry(e){if(this.isKilled())throw Error(`firstParty sink killswitch active`);let t={"Content-Type":`application/json`,"User-Agent":ae(),"x-service-name":`workmate`},n=Se()||de(),r=this.skipAuth||!n;if(!r&&Le()){let e=Ve();He()?e&&Be(e.expiresAt)&&(r=!0):r=!0}let i=r?{headers:{},error:`trust not established or Oauth token expired`}:Pe(),a=!i.error,o=a?{...t,...i.headers}:t;try{let t=await h.post(this.endpoint,e,{timeout:this.timeout,headers:o});this.logSuccess(e.events.length,a,t.data);return}catch(n){if(a&&h.isAxiosError(n)&&n.response?.status===401){let n=await h.post(this.endpoint,e,{timeout:this.timeout,headers:t});this.logSuccess(e.events.length,!1,n.data);return}throw n}}logSuccess(e,t,n){}hrTimeToDate(e){let[t,n]=e;return new Date(t*1e3+n/1e6)}transformLogsToEvents(e){let t=[];for(let n of e){let e=n.attributes||{},r=e.event_name||n.body||`unknown`,i=e.core_metadata,a=e.user_metadata,o=e.event_metadata||{};if(!i){t.push({event_type:`ClaudeCodeInternalEvent`,event_data:K.toJSON({event_id:e.event_id,event_name:r,client_timestamp:this.hrTimeToDate(n.hrTime),session_id:g(),additional_metadata:Buffer.from(v({transform_error:`core_metadata attribute is missing`})).toString(`base64`)})});continue}let s=te(i,a,o),{_PROTO_skill_name:c,_PROTO_plugin_name:l,_PROTO_marketplace_name:u,...d}=s.additional,f=Ae(d);t.push({event_type:`ClaudeCodeInternalEvent`,event_data:K.toJSON({event_id:e.event_id,event_name:r,client_timestamp:this.hrTimeToDate(n.hrTime),device_id:e.user_id,email:a?.email,auth:s.auth,...s.core,env:s.env,process:s.process,skill_name:typeof c==`string`?c:void 0,plugin_name:typeof l==`string`?l:void 0,marketplace_name:typeof u==`string`?u:void 0,additional_metadata:Object.keys(f).length>0?Buffer.from(v(f)).toString(`base64`):void 0})})}return{events:t}}async shutdown(){this.isShutdown=!0,this.resetBackoff(),await this.forceFlush()}async forceFlush(){await Promise.all(this.pendingExports)}}}));function ut(e){return!1}var dt=e((()=>{}));function ft(){return{}}function pt(e){let t=ft()[e];if(!t)return null;let n=t.sample_rate;return typeof n!=`number`||n<0||n>1||n>=1?null:n<=0?0:Math.random()<n?n:0}async function mt(){if($)try{await $.shutdown()}catch{}}function Z(){return!A()}async function ht(e,t,n={}){try{let r=await d({model:n.model,betas:n.betas}),i={event_name:t,event_id:D(),core_metadata:r,user_metadata:P(!0),event_metadata:n},a=y();a&&(i.user_id=a),e.emit({body:t,attributes:i})}catch{}}function gt(e,t={}){Z()&&(!Q||ut(`firstParty`)||ht(Q,e,t))}function _t(){if(C(`1p_event_logging_start`),!Z())return;C(`1p_event_after_config`);let e=parseInt(process.env.OTEL_LOGS_EXPORT_INTERVAL||vt.toString(),10),t=yt,n=bt,r=Oe(),i={[c]:`workmate`,[u]:`0.0.22`};if(r===`wsl`){let e=De();e&&(i[`wsl.version`]=e)}$=new ie({resource:f(i),processors:[new re(new X({maxBatchSize:t,isKilled:()=>ut(`firstParty`)}),{scheduledDelayMillis:e,maxExportBatchSize:t,maxQueueSize:n})]}),Q=$.getLogger(`com.anthropic.claude_code.events`,`0.0.22`)}var vt,yt,bt,Q,$,xt=e((()=>{ee(),oe(),l(),b(),ke(),Me(),I(),j(),lt(),p(),dt(),vt=1e4,yt=200,bt=8192,Q=null,$=null}));export{gt as a,F as c,Ye as d,j as f,Z as i,Je as l,qe as m,xt as n,pt as o,A as p,_t as r,mt as s,ft as t,I as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t}from"./firstPartyEventLogger-C0q45h_4.js";e();export{t as initialize1PEventLogging};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{FC as t,X as n,Z as r,Zg as i,Zi as a,wS as o}from"./loadAgentsDir-C1LkW7gl.js";import{f as s,l as c}from"./types-zk5Ltv5q.js";import{L as l,N as u,c as d,i as f}from"./debug-8DCufdSp.js";import{r as p,t as m}from"./sessionTitle-k4wpUS5l.js";async function h(e,n){let i=m(e);if(!i)return null;try{let e=await r({systemPrompt:t([`Generate a short kebab-case name (2-4 words) that captures the main topic of this conversation. Use lowercase words separated by hyphens. Examples: "fix-login-bug", "add-auth-feature", "refactor-api-client", "debug-test-failures". Return JSON with a "name" field.`]),userPrompt:i,outputFormat:{type:`json_schema`,schema:{type:`object`,properties:{name:{type:`string`}},required:[`name`],additionalProperties:!1}},signal:n,options:{querySource:`rename_generate_name`,agents:[],isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,mcpTools:[]}}),a=s(Array.isArray(e.message.content)?o(e.message.content):e.message.content);return a&&typeof a==`object`&&`name`in a&&typeof a.name==`string`?a.name:null}catch(e){return d(`generateSessionName failed: ${u(e)}`,{level:`error`}),null}}var g=e((()=>{n(),f(),l(),c(),a(),p(),i()}));export{g as n,h as t};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$c as t,Pg as n,Qc as r,Xc as i,Yc as a,Zc as o,al as s,cl as c,el as l,ll as u,nl as d,ol as f,rl as p,tl as m,ul as h,zg as g}from"./loadAgentsDir-C1LkW7gl.js";import{I as _,P as v,t as y}from"./src-DL3w8VPk.js";import{t as b}from"./jsx-runtime-Bb4Xn-E0.js";import{t as x}from"./select-C_KXmqbI.js";import{t as S}from"./CustomSelect-B46Eh0gU.js";import{n as C,t as w}from"./PermissionDialog-BaibiQae.js";function T({currentGoal:e,newObjective:t,onConfirm:n,onCancel:r}){function i(e){e===`yes`?n():r()}let a=e.tokenBudget===null?`${e.tokensUsed}`:`${e.tokensUsed} / ${e.tokenBudget}`;return(0,E.jsx)(w,{color:`warning`,title:`Replace active goal?`,children:(0,E.jsxs)(_,{flexDirection:`column`,marginTop:1,paddingX:1,children:[(0,E.jsx)(v,{children:`A goal is already in progress. Replacing it will reset all progress and counters.`}),(0,E.jsxs)(_,{marginTop:1,flexDirection:`column`,children:[(0,E.jsx)(v,{dimColor:!0,children:`Current goal:`}),(0,E.jsxs)(v,{children:[(0,E.jsx)(v,{dimColor:!0,children:`· Objective: `}),e.objective]}),(0,E.jsxs)(v,{children:[(0,E.jsx)(v,{dimColor:!0,children:`· Status: `}),d(e.status)]}),(0,E.jsxs)(v,{children:[(0,E.jsx)(v,{dimColor:!0,children:`· Time: `}),m(e)]}),(0,E.jsxs)(v,{children:[(0,E.jsx)(v,{dimColor:!0,children:`· Tokens: `}),a]})]}),(0,E.jsxs)(_,{marginTop:1,flexDirection:`column`,children:[(0,E.jsx)(v,{dimColor:!0,children:`New objective:`}),(0,E.jsx)(v,{children:t})]}),(0,E.jsx)(_,{marginTop:1,children:(0,E.jsx)(x,{options:[{label:`Yes, replace the goal`,value:`yes`},{label:`No, keep the current goal`,value:`no`}],onChange:i,onCancel:r})})]})})}var E,D=e((()=>{y(),S(),C(),f(),E=b()}));function O(e){let t=e.split(`
|
|
2
|
-
`)[0]??e;return t.length<=F?t:`${t.slice(0,F)}…`}function k(){g(e=>e.origin===`goal-continuation`||e.origin===`goal-budget-limit`)}function A(){let e=p();if(!e)return"No active goal. Set one with `/goal <objective>`.";let t=e.tokenBudget===null?`${e.tokensUsed}`:`${e.tokensUsed} / ${e.tokenBudget}`,n=[`Goal: ${e.objective}`,`Status: ${d(e.status)}`,`Time: ${m(e)}`,`Tokens: ${t}`,`Continuation turns: ${e.turnsExecuted}`];return e.status===`max_turns`&&n.push("Hint: Max continuation turns reached (150). Run `/goal continue` to reset and continue."),n.join(`
|
|
3
|
-
`)}function j(e){return h(e),s(),i(),`Goal set.`}async function M(e,n,a){let s=a.trim();if(!s||s.toLowerCase()===`status`)return e(A(),{display:`system`}),null;let d=s.toLowerCase();if(d===`clear`){let t=r();return t&&(o(),k()),e(t?`Goal cleared.`:`No active goal to clear.`,{display:`system`}),null}if(d===`pause`){let t=c();return t&&(i(),k()),e(t?`Goal paused.`:`No active goal to pause.`,{display:`system`}),null}if(d===`resume`){if(p()?.status===`max_turns`)return e("Goal reached max continuation turns (150). Run `/goal continue` to reset turn counter and continue.",{display:`system`}),null;let t=u();return t&&i(),e(t?`Goal resumed.`:`No paused goal to resume.`,{display:`system`,shouldQuery:!!t}),null}if(d===`continue`){let t=l();return t&&i(),e(t?`Goal continuation counter reset (0/150). Continuing...`:`Current goal is not in max-turns state.`,{display:`system`,shouldQuery:!!t}),null}if(d===`complete`){let n=t();return n&&(i(),k()),e(n?`Goal marked complete.`:`No active goal to complete.`,{display:`system`}),null}if(s.length>P)return e(`Goal objective is too long (${s.length} chars; limit ${P}). Save the detailed instructions to a file and reference it from a shorter objective.`,{display:`system`}),null;let f=p();return f&&f.status!==`complete`?(0,N.jsx)(T,{currentGoal:f,newObjective:s,onConfirm:()=>{k(),e(j(s),{display:`system`,shouldQuery:!0,displayArgs:O(s),metaMessages:[`<goal-objective-updated>\n${s}\n</goal-objective-updated>`]})},onCancel:()=>{e(`Kept the current goal. New objective discarded.`,{display:`system`})}}):(e(j(s),{display:`system`,shouldQuery:!0,displayArgs:O(s),metaMessages:[`<goal-objective-updated>\n${s}\n</goal-objective-updated>`]}),null)}var N,P,F;e((()=>{f(),a(),n(),D(),N=b(),P=4e3,F=80}))();export{M as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{MC as t,NS as n,Zi as r,da as i,fC as a,hC as o,it as s,lC as c,o_ as l,pC as u,pa as d,tt as f,uC as p,u_ as m}from"./loadAgentsDir-C1LkW7gl.js";import{c as h,i as g}from"./debug-8DCufdSp.js";import{A as _,N as v}from"./model-BwBE0Pt5.js";import{n as y,t as b}from"./client-DvhWKIOx.js";import{n as x,t as S}from"./openaiShared-G2-w4gJt.js";import{randomUUID as C}from"crypto";async function*w(e,r,c,f,m){try{let n=t(m.model),g=d(e,c),v=(await Promise.all(c.map(e=>s(e,{getToolPermissionContext:m.getToolPermissionContext,tools:c,agents:m.agents,allowedAgentTypes:m.allowedAgentTypes,model:m.model})))).filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),y=o(g,r),S=u(v),w=a(m.toolChoice),T=b({maxRetries:0,fetchOverride:m.fetchOverride,source:m.querySource});h(`[Grok] Calling model=${n}, messages=${y.length}, tools=${S.length}`);let E=p(await T.chat.completions.create({model:n,messages:y,...S.length>0&&{tools:S,...w&&{tool_choice:w}},stream:!0,stream_options:{include_usage:!0},...m.temperatureOverride!==void 0&&{temperature:m.temperatureOverride}},{signal:f}),n),D={},O=null,k={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0},A=0,j=Date.now();for await(let e of E){switch(e.type){case`message_start`:O=e.message,A=Date.now()-j,e.message.usage&&(k=x(k,e.message.usage));break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?D[t]={...n,input:``}:n.type===`text`?D[t]={...n,text:``}:n.type===`thinking`?D[t]={...n,thinking:``,signature:``}:D[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=D[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.signature=n.signature);break}case`content_block_stop`:{let t=D[e.index];if(!t||!O)break;yield{message:{...O,content:i([t],c,m.agentId)},requestId:void 0,type:`assistant`,uuid:C(),timestamp:new Date().toISOString()};break}case`message_delta`:{let t=e.usage;t&&(k=x(k,t));break}case`message_stop`:break}e.type===`message_stop`&&k.input_tokens+k.output_tokens>0&&l(_(n,k),k,m.model),yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:A}:void 0}}}catch(e){let t=e instanceof Error?e.message:String(e);h(`[Grok] Error: ${t}`,{level:`error`}),yield n({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{y(),S(),c(),r(),f(),g(),m(),v()}))();export{w as queryModelGrok};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./memoize-BK3gG5ob.js";import{mt as n,pt as r}from"./esm-BQY8jJNR.js";import{n as i,t as a}from"./axios-DaWTGg7G.js";import{gi as o,vi as s}from"./loadAgentsDir-C1LkW7gl.js";import{c,i as l}from"./debug-8DCufdSp.js";import{en as u,tn as d}from"./settings-DKN4xSpQ.js";import{c as f,m as p,v as m}from"./config-BddEvZZl.js";import{a as h,n as g}from"./process-gEbdy6uY.js";import{d as _,f as v,o as y,s as b}from"./log-DaILwWJa.js";import{n as x,r as S}from"./analytics-DJobLaWP.js";import{Cn as C,Dn as w,En as T,Et as E,St as D,Tn as O,ht as k}from"./model-BwBE0Pt5.js";a(),t(),x(),D(),l(),s(),_(),g(),d(),p(),T(),y(),n();var A=1440*60*1e3,j=e(async()=>{if(v())return{success:!1};try{return{success:!0,data:(await w(()=>{let e=C();if(e.error)throw Error(`Failed to get auth headers: ${e.error}`);return i.get(`${u().BASE_API_URL}/api/oauth/account/settings`,{headers:{...e.headers,"User-Agent":r()}})})).data}}catch(e){return b(e),j.cache.clear?.(),{success:!1}}});async function M(){try{await w(()=>{let e=C();if(e.error)throw Error(`Failed to get auth headers: ${e.error}`);return i.post(`${u().BASE_API_URL}/api/oauth/account/grove_notice_viewed`,{},{headers:{...e.headers,"User-Agent":r()}})}),j.cache.clear?.()}catch(e){b(e)}}async function N(e){try{await w(()=>{let t=C();if(t.error)throw Error(`Failed to get auth headers: ${t.error}`);return i.patch(`${u().BASE_API_URL}/api/oauth/account/settings`,{grove_enabled:e},{headers:{...t.headers,"User-Agent":r()}})}),j.cache.clear?.()}catch(e){b(e)}}async function P(){if(!E())return!1;let e=k()?.accountUuid;if(!e)return!1;let t=f().groveConfigCache?.[e];return t?Date.now()-t.timestamp>A?(c(`Grove: Cache stale, returning cached data and refreshing in background`),F(e),t.grove_enabled):(c(`Grove: Using fresh cached config`),t.grove_enabled):(c(`Grove: No cache, fetching config in background (dialog skipped this session)`),F(e),!1)}async function F(e){try{let t=await I();if(!t.success)return;let n=t.data.grove_enabled,r=f().groveConfigCache?.[e];if(r?.grove_enabled===n&&Date.now()-r.timestamp<=A)return;m(t=>({...t,groveConfigCache:{...t.groveConfigCache,[e]:{grove_enabled:n,timestamp:Date.now()}}}))}catch(e){c(`Grove: Failed to fetch and store config: ${e}`)}}var I=e(async()=>{if(v())return{success:!1};try{let{grove_enabled:e,domain_excluded:t,notice_is_grace_period:n,notice_reminder_frequency:r}=(await w(()=>{let e=C();if(e.error)throw Error(`Failed to get auth headers: ${e.error}`);return i.get(`${u().BASE_API_URL}/api/claude_code_grove`,{headers:{...e.headers,"User-Agent":O()},timeout:3e3})})).data;return{success:!0,data:{grove_enabled:e,domain_excluded:t??!1,notice_is_grace_period:n??!0,notice_reminder_frequency:r}}}catch(e){return c(`Failed to fetch Grove notice config: ${e}`),{success:!1}}});function L(e,t,n){if(!e.success||!t.success)return!1;let r=e.data,i=t.data;if(r.grove_enabled!==null)return!1;if(n||!i.notice_is_grace_period)return!0;let a=i.notice_reminder_frequency;return a!==null&&r.grove_notice_viewed_at?Math.floor((Date.now()-new Date(r.grove_notice_viewed_at).getTime())/(1e3*60*60*24))>=a:r.grove_notice_viewed_at==null}async function R(){let[e,t]=await Promise.all([j(),I()]);if(L(e,t,!1)){let e=t.success?t.data:null;S(`tengu_grove_print_viewed`,{dismissable:e?.notice_is_grace_period}),e===null||e.notice_is_grace_period?(h(`
|
|
2
|
-
An update to our Consumer Terms and Privacy Policy will take effect on October 8, 2025. Run \`claude\` to review the updated terms.
|
|
3
|
-
|
|
4
|
-
`),await M()):(h(`
|
|
5
|
-
[ACTION REQUIRED] An update to our Consumer Terms and Privacy Policy has taken effect on October 8, 2025. You must run \`claude\` to review the updated terms.
|
|
6
|
-
|
|
7
|
-
`),await o(1))}}export{P as a,j as i,R as n,M as o,I as r,N as s,L as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,l as n,o as r}from"./envUtils-DcaKZlRU.js";import{tt as i,ut as a,zt as o}from"./state-BowF111d.js";import{C as s,L as c,P as l,S as u,c as d,et as f,f as p,h as m,i as h,tt as g,x as _}from"./debug-8DCufdSp.js";import{S as v,x as y}from"./config-BddEvZZl.js";import{Ht as b,Vt as x}from"./model-BwBE0Pt5.js";import{a as S,i as C,n as w,r as T}from"./pasteStore-DNV1M5Xd.js";import{join as E}from"path";import{appendFile as D,writeFile as O}from"fs/promises";function k(e){return(e.match(/\r\n|\r|\n/g)||[]).length}function A(e,t){return t===0?`[Pasted text #${e}]`:`[Pasted text #${e} +${t} lines]`}function j(e){return`[Image #${e}]`}function M(e){return[...e.matchAll(/\[(Pasted text|Image|\.\.\.Truncated text) #(\d+)(?: \+\d+ lines)?(\.)*\]/g)].map(e=>({id:parseInt(e[2]||`0`,10),match:e[0],index:e.index})).filter(e=>e.id>0)}function N(e,t){let n=M(e),r=e;for(let e=n.length-1;e>=0;e--){let i=n[e],a=t[i.id];a?.type===`text`&&(r=r.slice(0,i.index)+a.content+r.slice(i.index+i.match.length))}return r}function P(e){return u(e)}async function*F(){let e=a();for(let e=q.length-1;e>=0;e--)yield q[e];let n=E(t(),`history.jsonl`);try{for await(let t of m(n))try{let n=P(t);if(n.sessionId===e&&Q.has(n.timestamp))continue;yield n}catch(e){d(`Failed to parse history line: ${e}`)}}catch(e){if(l(e)===`ENOENT`)return;throw e}}async function*I(){for await(let e of F())yield await z(e)}async function*L(){let e=i(),t=a(),n=[],r=0;for await(let i of F())if(!(!i||typeof i.project!=`string`)&&i.project===e&&(i.sessionId===t?(yield await z(i),r++):n.push(i),r+n.length>=G))break;for(let e of n){if(r>=G)return;yield await z(e),r++}}async function R(e){if(e.content)return{id:e.id,type:e.type,content:e.content,mediaType:e.mediaType,filename:e.filename};if(e.contentHash){let t=await C(e.contentHash);if(t)return{id:e.id,type:e.type,content:t,mediaType:e.mediaType,filename:e.filename}}return null}async function z(e){let t={};for(let[n,r]of Object.entries(e.pastedContents||{})){let e=await R(r);e&&(t[Number(n)]=e)}return{display:e.display,pastedContents:t}}async function B(){if(q.length===0)return;let e;try{let n=E(t(),`history.jsonl`);await O(n,``,{encoding:`utf8`,mode:384,flag:`a`}),e=await v(n,{stale:1e4,retries:{retries:3,minTimeout:50}});let r=q.map(e=>`${s(e)}\n`);q=[],await D(n,r.join(``),{mode:384})}catch(e){d(`Failed to write prompt history: ${e}`)}finally{e&&await e()}}async function V(e){if(!(J||q.length===0)&&!(e>5)){J=!0;try{await B()}finally{J=!1,q.length>0&&(await b(500),V(e+1))}}}async function H(e){let t=typeof e==`string`?{display:e,pastedContents:{}}:e,n={};if(t.pastedContents){for(let[e,r]of Object.entries(t.pastedContents))if(r.type!==`image`)if(r.content.length<=K)n[Number(e)]={id:r.id,type:r.type,content:r.content,mediaType:r.mediaType,filename:r.filename};else{let t=w(r.content);n[Number(e)]={id:r.id,type:r.type,contentHash:t,mediaType:r.mediaType,filename:r.filename},S(t,r.content)}}let r={...t,pastedContents:n,timestamp:Date.now(),project:i(),sessionId:a()};q.push(r),Z=r,Y=V(0)}function U(e){n(process.env.CLAUDE_CODE_SKIP_PROMPT_HISTORY)||(X||(X=!0,g(async()=>{Y&&await Y,q.length>0&&await B()})),H(e))}function W(){if(!Z)return;let e=Z;Z=null;let t=q.lastIndexOf(e);t===-1?Q.add(e.timestamp):q.splice(t,1)}var G,K,q,J,Y,X,Z,Q,$=e((()=>{o(),f(),h(),r(),c(),p(),y(),T(),x(),_(),G=100,K=1024,q=[],J=!1,Y=null,X=!1,Z=null,Q=new Set}));export{L as a,I as c,A as i,M as l,N as n,k as o,j as r,$ as s,U as t,W as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{hn as e,qt as t,sn as n}from"./loadAgentsDir-C1LkW7gl.js";e();export{t as executeSessionEndHooks,n as getSessionEndHookTimeoutMs};
|