@readmagic/workmate 0.0.4 → 0.0.6
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-BTC7FPqM.js → AddWorkspaceDirectory-ClHi-Dr6.js} +1 -1
- package/dist/chunks/{App-DOm71vtY.js → App-BP06lHmf.js} +1 -1
- package/dist/chunks/{ApproveApiKey-9YQzwrrC.js → ApproveApiKey-Bsy8kr2a.js} +1 -1
- package/dist/chunks/ApproveApiKey-a2ZonQ3n.js +1 -0
- package/dist/chunks/{AssistantSessionChooser-CnYfFWrx.js → AssistantSessionChooser-CcocKoTJ.js} +1 -1
- package/dist/chunks/BackgroundTasksDialog-DNeBhGCf.js +2 -0
- package/dist/chunks/{BypassPermissionsModeDialog-DAq-qbqC.js → BypassPermissionsModeDialog-BKj_3Idm.js} +1 -1
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-CyvidoR3.js → ClaudeMdExternalIncludesDialog-BD-7yAZh.js} +1 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-DFivNFuo.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-CS3zjEPF.js +1 -0
- package/dist/chunks/{DesktopHandoff-gRvy-WlW.js → DesktopHandoff-BmPmCfT3.js} +1 -1
- package/dist/chunks/{DiffDialog-CdfVTgOx.js → DiffDialog-C4XSSjvV.js} +2 -2
- package/dist/chunks/Doctor-BhD-ZzZm.js +1 -0
- package/dist/chunks/Doctor-DEQe2q16.js +3 -0
- package/dist/chunks/ExitFlow-BttnAv-O.js +2 -0
- package/dist/chunks/{Feedback-gGpjUC_F.js → Feedback-BaYA8-SU.js} +2 -2
- package/dist/chunks/Grove-BJziCbZH.js +11 -0
- package/dist/chunks/Grove-sWm-oLBf.js +1 -0
- package/dist/chunks/{HybridTransport-kN1jmg26.js → HybridTransport-B8V6O6rM.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-BpJub73a.js → InvalidConfigDialog-CHzBSJDf.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-DzOp3Ihx.js → InvalidSettingsDialog-BKenH3bD.js} +1 -1
- package/dist/chunks/MCPConnectionManager-CNh9dNlk.js +1 -0
- package/dist/chunks/{McpParsingWarnings-Cc6FWyU4.js → McpParsingWarnings-Bj2-YL8o.js} +1 -1
- package/dist/chunks/MessageSelector-DdR6wJhh.js +3 -0
- package/dist/chunks/Messages-Ch6cboMV.js +11 -0
- package/dist/chunks/{Onboarding-D00lTweB.js → Onboarding-BrAJp0aL.js} +1 -1
- package/dist/chunks/{OverageCreditUpsell-B-Bf_-UX.js → OverageCreditUpsell-Ds1cB7RC.js} +1 -1
- package/dist/chunks/PluginSettings-CGqEzejq.js +17 -0
- package/dist/chunks/{PromptInputFooterSuggestions-MwS_cExV.js → PromptInputFooterSuggestions-egs9VvUs.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-V2dEpzhC.js → PromptInputHelpMenu-SieM5NoY.js} +1 -1
- package/dist/chunks/QueryEngine-CZZMl3PB.js +1 -0
- package/dist/chunks/REPL-CG2N7E4Q.js +142 -0
- package/dist/chunks/REPL-DvA910N_.js +1 -0
- package/dist/chunks/{RemoteCallout-ChCjmgw1.js → RemoteCallout-Cs-ro8_i.js} +1 -1
- package/dist/chunks/RemoteSessionManager-B740Dp6m.js +2 -0
- package/dist/chunks/ResumeConversation-DzV2zmuX.js +1 -0
- package/dist/chunks/{SSETransport-h43pQVlJ.js → SSETransport-DtpMDekF.js} +3 -3
- package/dist/chunks/SearchExtraToolsTool-C4uO-Zx3.js +1 -0
- package/dist/chunks/Settings-XKw6FI_m.js +2 -0
- package/dist/chunks/{TeleportProgress-QtJrXSCX.js → TeleportProgress-rYaHIEfe.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-D-HVj-A6.js → TeleportRepoMismatchDialog-DY97YZMB.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-C6sbzJsJ.js → TeleportResumeWrapper-jaQzyTCh.js} +1 -1
- package/dist/chunks/{ThemePicker-CqPCp5Hs.js → ThemePicker-BViWzLp3.js} +1 -1
- package/dist/chunks/{TrustDialog-CeVwxDlZ.js → TrustDialog-DGJ_BisZ.js} +1 -1
- package/dist/chunks/{ValidationErrorsList-Bl68E-2-.js → ValidationErrorsList-B8pRiGuy.js} +1 -1
- package/dist/chunks/{WelcomeV2-DNiXQ5ES.js → WelcomeV2-DqnbSdIu.js} +1 -1
- package/dist/chunks/{add-dir-V3xjklnJ.js → add-dir-C2Hu3oE4.js} +1 -1
- package/dist/chunks/{agentDisplay-BuiwcrQi.js → agentDisplay-XoDJhr03.js} +1 -1
- package/dist/chunks/agents-BIHTGDYh.js +103 -0
- package/dist/chunks/{agents-ZY6IaVE7.js → agents-C4QXeHIJ.js} +1 -1
- package/dist/chunks/allErrors-1896uQA1.js +1 -0
- package/dist/chunks/{ant-D66LZCap.js → ant-B6k6cBts.js} +1 -1
- package/dist/chunks/api-BsFW57_Q.js +1 -0
- package/dist/chunks/api-gqTA-D7n.js +1 -0
- package/dist/chunks/{assistant-CYF7ch7C.js → assistant-DJ9hd4uC.js} +1 -1
- package/dist/chunks/auth-8Vd3_U8t.js +1 -0
- package/dist/chunks/auth-BnSrKyJe.js +15 -0
- package/dist/chunks/auth-DRTjfnGy.js +1 -0
- package/dist/chunks/{autoMode-TysBQkU_.js → autoMode-BNukrVAB.js} +1 -1
- package/dist/chunks/{autonomy-k3QPea5z.js → autonomy-BEmI7WVW.js} +1 -1
- package/dist/chunks/{autonomy-CNEbT-t_.js → autonomy-DGcy5Rml.js} +7 -7
- package/dist/chunks/{autonomyPanel-DiztRblF.js → autonomyPanel-fhge09AG.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-3i_d_WW5.js +1 -0
- package/dist/chunks/backgroundHousekeeping-BVMf_Tjn.js +17 -0
- package/dist/chunks/{branch-_NBgDfrK.js → branch-Bpe-gocq.js} +1 -1
- package/dist/chunks/{break-cache-BQfgkNAo.js → break-cache-C_p7Kmx2.js} +3 -3
- package/dist/chunks/{bridge-DpmFl8p8.js → bridge-D12Shbkj.js} +2 -2
- package/dist/chunks/{bridgeConfig-DMBOO3gW.js → bridgeConfig-BhxRF2vm.js} +1 -1
- package/dist/chunks/bridgeConfig-CqIQ_rvD.js +1 -0
- package/dist/chunks/bridgeEnabled-D0XC5kNh.js +1 -0
- package/dist/chunks/bridgeEnabled-SbB-6zdY.js +1 -0
- package/dist/chunks/bridgeMain-DHUpZFgL.js +68 -0
- package/dist/chunks/bridgeMain-DUbQjgCp.js +1 -0
- package/dist/chunks/{bridgeMessaging-N5zlzCCr.js → bridgeMessaging-DHc5dOhB.js} +1 -1
- package/dist/chunks/{btw-BFRje_Zi.js → btw-D9hMM5d2.js} +1 -1
- package/dist/chunks/caches-CWzT7e6Y.js +1 -0
- package/dist/chunks/{caches-CcfPJ4_A.js → caches-UeVVM3T0.js} +2 -2
- package/dist/chunks/{ccrClient-q2JCVCU2.js → ccrClient-Iza0L8Zw.js} +1 -1
- package/dist/chunks/{clear-CxY7W5Wt.js → clear-B4d38ssF.js} +1 -1
- package/dist/chunks/client-BzKQTXzF.js +1 -0
- package/dist/chunks/{color-DOWhfjnA.js → color-D8VOyoYl.js} +1 -1
- package/dist/chunks/commands-DDamMmo4.js +1 -0
- package/dist/chunks/commitAttribution-CgohL8vD.js +1 -0
- package/dist/chunks/{commitAttribution-CLbEIaRJ.js → commitAttribution-ChAgixdj.js} +2 -2
- package/dist/chunks/compact-IFHwxjZ9.js +2 -0
- package/dist/chunks/config-DY5-_kk_.js +1 -0
- package/dist/chunks/{config-DiT2Z8dY.js → config-DmomySWC.js} +1 -1
- package/dist/chunks/config-WxgxrQoP.js +1 -0
- package/dist/chunks/{context-B2OvKo2t.js → context-Cl6BJ2vm.js} +1 -1
- package/dist/chunks/{context-noninteractive-BuGxX3YL.js → context-noninteractive-9hELVC29.js} +2 -2
- package/dist/chunks/context-noninteractive-Beij5MfU.js +1 -0
- package/dist/chunks/conversation-BBB91hEw.js +1 -0
- package/dist/chunks/conversation-BWVTM40Y.js +1 -0
- package/dist/chunks/{createSSHSession-C-c7I5iJ.js → createSSHSession-BM-5pbv6.js} +1 -1
- package/dist/chunks/createSession-CoQtL5Rj.js +1 -0
- package/dist/chunks/{createSession-D_fIDqgc.js → createSession-Cvl1Q50F.js} +1 -1
- package/dist/chunks/crossProjectResume-BasMLl2n.js +40 -0
- package/dist/chunks/{datadog-Ed8emSFA.js → datadog-CpqEQbHa.js} +1 -1
- package/dist/chunks/{desktop-D_ofPlyi.js → desktop-B_L6T6jI.js} +1 -1
- package/dist/chunks/{diff-CUAgBDu1.js → diff-CVzOodeg.js} +1 -1
- package/dist/chunks/doctor-1L0TFuGw.js +1 -0
- package/dist/chunks/{entry-Bh0gPOAo.js → entry-DHVYCR26.js} +3 -3
- package/dist/chunks/envLessBridgeConfig-CN0_44-p.js +1 -0
- package/dist/chunks/{envLessBridgeConfig-DJHZAlU-.js → envLessBridgeConfig-Ck2-KMq0.js} +1 -1
- package/dist/chunks/{esm-B62dCLgf.js → esm-D5q6s4l8.js} +1 -1
- package/dist/chunks/exit-Bm1S_f3i.js +1 -0
- package/dist/chunks/extra-usage-UHAWtypK.js +1 -0
- package/dist/chunks/{extra-usage-core-B6ga8Rni.js → extra-usage-core-BFOolqoi.js} +1 -1
- package/dist/chunks/{extra-usage-noninteractive-Dc9AndId.js → extra-usage-noninteractive-cUGZy0en.js} +1 -1
- package/dist/chunks/{extra-usage-CjaHpu8y.js → extra-usage-zDHVtWKZ.js} +1 -1
- package/dist/chunks/extraUsage-Dq66zzqR.js +1 -0
- package/dist/chunks/extractMemories-BcaklA33.js +1 -0
- package/dist/chunks/fast-DALAHO3d.js +1 -0
- package/dist/chunks/{fast-CW_NsL0x.js → fast-MS7WZpD8.js} +1 -1
- package/dist/chunks/{feedback-BpRorTAC.js → feedback-Fw4m28ZC.js} +1 -1
- package/dist/chunks/firstPartyEventLogger-CS9jVz6D.js +1 -0
- package/dist/chunks/{firstPartyEventLogger-CuUiNdj8.js → firstPartyEventLogger-CoSUd0a1.js} +2 -2
- package/dist/chunks/{flushGate-BltVae97.js → flushGate-De-yppeo.js} +1 -1
- package/dist/chunks/{gemini-YyIxfveQ.js → gemini-BPziscyN.js} +1 -1
- package/dist/chunks/{generateRecap-tx4wLIkI.js → generateRecap-jGDLI_wU.js} +1 -1
- package/dist/chunks/{generateSessionName-BkDigIN8.js → generateSessionName-hDJ6HBJ1.js} +1 -1
- package/dist/chunks/{githubRepoPathMapping-C4umZ1oC.js → githubRepoPathMapping-qAoiyj6P.js} +1 -1
- package/dist/chunks/{goal-DZrD4puM.js → goal-CFx4eRkf.js} +3 -3
- package/dist/chunks/{grok-BZf7W_hL.js → grok-Byblph7F.js} +1 -1
- package/dist/chunks/{grove-CFBPplP6.js → grove-CpqjcGCb.js} +2 -2
- package/dist/chunks/{heapdump-DWc3Z2NO.js → heapdump-C4kPlqGt.js} +1 -1
- package/dist/chunks/{help-pap9jNUJ.js → help-B1h-faJ3.js} +1 -1
- package/dist/chunks/hooks-DPLIIpAD.js +1 -0
- package/dist/chunks/{hooks-Bmat0L6A.js → hooks-X6J03MnA.js} +2 -2
- package/dist/chunks/hostGuard-BHI6Q8Mt.js +1 -0
- package/dist/chunks/inboundAttachments-BekVc0W-.js +1 -0
- package/dist/chunks/{inboundAttachments-DkfNHtF9.js → inboundAttachments-CUJE3KaU.js} +1 -1
- package/dist/chunks/initReplBridge-JQ-afRx9.js +1 -0
- package/dist/chunks/{install-D4jmHjmk.js → install-D5YORIJL.js} +1 -1
- package/dist/chunks/{instrumentation-Nqgm1SMw.js → instrumentation-Bw3CxPQf.js} +4 -4
- package/dist/chunks/{job-CT9bcgPb.js → job-DOWtcltx.js} +1 -1
- package/dist/chunks/keybindings-BLw5J-Zj.js +2 -0
- package/dist/chunks/{language-BA5WprZv.js → language-C6Fq-XOZ.js} +1 -1
- package/dist/chunks/language-Cqw5gYJR.js +1 -0
- package/dist/chunks/launchAgentsPlatform-jWWf-Lk9.js +1 -0
- package/dist/chunks/{launchLocalMemory-CRMqifzn.js → launchLocalMemory-kHeD0I0y.js} +2 -2
- package/dist/chunks/{launchLocalVault-DlKX_oDE.js → launchLocalVault-DLqkOjmb.js} +3 -3
- package/dist/chunks/launchMemoryStores-Ct7AVXrO.js +1 -0
- package/dist/chunks/{launchOnboarding-DTdUA_wE.js → launchOnboarding-Cc6WwPX9.js} +1 -1
- package/dist/chunks/launchSchedule-ZyvuvjgU.js +1 -0
- package/dist/chunks/launchSkillStore-BejQnLog.js +1 -0
- package/dist/chunks/{launchTeleport-CXFRPVMR.js → launchTeleport-8CuYUfIR.js} +3 -3
- package/dist/chunks/launchVault-DIvIOuPh.js +1 -0
- package/dist/chunks/{loadAgentsDir-BURvZNN6.js → loadAgentsDir-D206qwP3.js} +632 -632
- package/dist/chunks/loadAgentsDir-TZjwTqdr.js +1 -0
- package/dist/chunks/loadPluginHooks-Ddhsyn0_.js +1 -0
- package/dist/chunks/{localSearch-D2Rs8wQP.js → localSearch-CzrbOklu.js} +1 -1
- package/dist/chunks/localSearch-DrOAL6f4.js +1 -0
- package/dist/chunks/{logoV2Utils-DN9nzdX-.js → logoV2Utils-8M56V7oN.js} +1 -1
- package/dist/chunks/{magicDocs-DIeTcwAA.js → magicDocs-DWjL2k7P.js} +3 -3
- package/dist/chunks/{main-CI54PZrG.js → main-BohPzJFF.js} +86 -86
- package/dist/chunks/{mappers-Q_Z3Kjo-.js → mappers-BDMZFgKx.js} +1 -1
- package/dist/chunks/mcp-Bt1ITh-Z.js +1 -0
- package/dist/chunks/{mcp-RvwPC7FB.js → mcp-CwJ-AIpt.js} +4 -4
- package/dist/chunks/mcp-W0LFoyFR.js +2 -0
- package/dist/chunks/memory-3wV7m7UU.js +1 -0
- package/dist/chunks/{mode-Jl_Boaym.js → mode-CUkHFkju.js} +2 -2
- package/dist/chunks/model-BY3auM2c.js +1 -0
- package/dist/chunks/model-CKkOnnnx.js +1 -0
- package/dist/chunks/model-DRXcJyU9.js +1 -0
- package/dist/chunks/{nativeInstaller-8arnRiUO.js → nativeInstaller-CA5d6_G7.js} +1 -1
- package/dist/chunks/{onChangeAppState-DBantDJ6.js → onChangeAppState-DBmy2Ow_.js} +1 -1
- package/dist/chunks/openai-Cbomn0Ws.js +10 -0
- package/dist/chunks/{overageCreditGrant-CN_sVURL.js → overageCreditGrant-DsUrmeBh.js} +1 -1
- package/dist/chunks/{panel-CrTPqXCv.js → panel-BSZGX6jN.js} +1 -1
- package/dist/chunks/{panelCall-CPKC6VR5.js → panelCall-BsVoL1uF.js} +1 -1
- package/dist/chunks/{partition-CW0BJ881.js → partition-BAakXjvj.js} +1 -1
- package/dist/chunks/{passes-DOm9ukdK.js → passes-CLRt7Cvm.js} +1 -1
- package/dist/chunks/permissions-BVSFuwNP.js +3 -0
- package/dist/chunks/{pidLock-C69HNTTb.js → pidLock-D5rUnDB-.js} +2 -2
- package/dist/chunks/{plan-B0rEs32a.js → plan-SYZ4DXR8.js} +1 -1
- package/dist/chunks/{plugin-BSEMgcGu.js → plugin-Bfjzhmrk.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-CTByPD8J.js → pluginAutoupdate-reO2PgtQ.js} +1 -1
- package/dist/chunks/{pluginBlocklist-mogKaK0p.js → pluginBlocklist-C3H2afWG.js} +1 -1
- package/dist/chunks/pluginCliCommands-lqdxdkQp.js +1 -0
- package/dist/chunks/{pluginFlagging-mHNff1t9.js → pluginFlagging-D9HKAGBC.js} +1 -1
- package/dist/chunks/{pluginOperations-JEedVzfS.js → pluginOperations-EN3EKLux.js} +2 -2
- package/dist/chunks/{pluginStartupCheck-RscVZDi4.js → pluginStartupCheck-BY73BMT2.js} +1 -1
- package/dist/chunks/pluginStartupCheck-CwWOlveD.js +1 -0
- package/dist/chunks/plugins-Dn6ceWrT.js +4 -0
- package/dist/chunks/policyLimits-CkTI5KEt.js +1 -0
- package/dist/chunks/{poor-DekfGNT7.js → poor-j-y-bv8o.js} +1 -1
- package/dist/chunks/{poorMode-CtcqaiwD.js → poorMode-DhzFKpPl.js} +1 -1
- package/dist/chunks/poorMode-V11s-3cf.js +1 -0
- package/dist/chunks/print-Db_VXmfO.js +23 -0
- package/dist/chunks/{privacy-settings-CwJ1H8Ua.js → privacy-settings-DHMJREbb.js} +1 -1
- package/dist/chunks/processBashCommand-BcM_fhV9.js +1 -0
- package/dist/chunks/processSlashCommand-DEVo3GPX.js +5 -0
- package/dist/chunks/{prompt-DNDgGM9q.js → prompt-BNHtszmZ.js} +1 -1
- package/dist/chunks/prompt-CrX31AGm.js +1 -0
- package/dist/chunks/prompt-IAvMxKDl.js +1 -0
- package/dist/chunks/{promptEditor-DMJyosKj.js → promptEditor-DeMrXUir.js} +2 -2
- package/dist/chunks/{protocolHandler-z2zxAtB1.js → protocolHandler-BHxBy84Z.js} +1 -1
- package/dist/chunks/rate-limit-options-DIudL9fb.js +1 -0
- package/dist/chunks/{rcDebugLog-DoL1FpGJ.js → rcDebugLog-CUy1_F23.js} +1 -1
- package/dist/chunks/reconciler-BXpPyfSY.js +4 -0
- package/dist/chunks/{referral-UKJv23_5.js → referral-CUaIo_vT.js} +1 -1
- package/dist/chunks/{refresh-ul_i5R1a.js → refresh-CuaVBIQ0.js} +1 -1
- package/dist/chunks/{registerProtocol-CukLQuxJ.js → registerProtocol-B7Fzdofu.js} +1 -1
- package/dist/chunks/{release-notes-CGv_6MMt.js → release-notes-fbfv2DC0.js} +1 -1
- package/dist/chunks/{releaseNotes-BKZNuDLD.js → releaseNotes-CxAHFLPl.js} +2 -2
- package/dist/chunks/{reload-plugins-2W11dpLQ.js → reload-plugins-B9IT9CFA.js} +1 -1
- package/dist/chunks/{remote-env-D9xsoBfx.js → remote-env-BOklGlll.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-asY9JAXU.js → remoteBridgeCore-j0bG1zjv.js} +1 -1
- package/dist/chunks/{remoteManagedSettings-Bxo3bv1U.js → remoteManagedSettings-Cq994lyc.js} +1 -1
- package/dist/chunks/{rename-CHsHMWpO.js → rename-Iev7wQsI.js} +1 -1
- package/dist/chunks/{resume-NduOaghx.js → resume-y7MCTZHJ.js} +2 -2
- package/dist/chunks/{runtimeObserver-Bo80nWQf.js → runtimeObserver-BZcJ1FbH.js} +1 -1
- package/dist/chunks/{runtimeObserver-BXbjibFk.js → runtimeObserver-CyzLASla.js} +3 -3
- package/dist/chunks/sandbox-adapter-Cu1FYrkh.js +1 -0
- package/dist/chunks/{sandbox-toggle-C-WCDRN4.js → sandbox-toggle-CWpBO228.js} +1 -1
- package/dist/chunks/searchExtraTools-BUOUds7p.js +1 -0
- package/dist/chunks/{session-pDd13-wE.js → session-DL4cA_8l.js} +2 -2
- package/dist/chunks/{sessionDiscovery-CSUnpsCy.js → sessionDiscovery-DAfNKqp1.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-2cgIIxPk.js +1 -0
- package/dist/chunks/sessionMemory-BS8_TbKj.js +1 -0
- package/dist/chunks/sessionMemory-D5fSHXvZ.js +1 -0
- package/dist/chunks/sessionMemoryUtils-BWUztNh6.js +1 -0
- package/dist/chunks/sessionObserver-ChfQtK2m.js +1 -0
- package/dist/chunks/{sessionObserver-Ur7PqKl_.js → sessionObserver-ShbCwJ8x.js} +1 -1
- package/dist/chunks/sessionStorage-Cf5wmnyB.js +1 -0
- package/dist/chunks/{sessionTitle-pWMaI79N.js → sessionTitle-coed9IuJ.js} +1 -1
- package/dist/chunks/{sessionTracing-CCPRzOvy.js → sessionTracing-D9rUyiq0.js} +1 -1
- package/dist/chunks/{settings-DfWP5y6X.js → settings-BovzmwMP.js} +2 -2
- package/dist/chunks/settingsSync-PqU9XGJq.js +1 -0
- package/dist/chunks/setup-B_FOvNpp.js +3 -0
- package/dist/chunks/{shadowedRuleDetection-Chi3afMR.js → shadowedRuleDetection-D1wsAdpp.js} +1 -1
- package/dist/chunks/{sideQuestion-D03MXdE2.js → sideQuestion-wSi38p81.js} +1 -1
- package/dist/chunks/sinks-BpcRrN_T.js +1 -0
- package/dist/chunks/{sinks-B4_pw0Gb.js → sinks-C_Dl1p4K.js} +2 -2
- package/dist/chunks/{skill-learning-7ZQF5JvA.js → skill-learning-B5tmc7EX.js} +1 -1
- package/dist/chunks/skillChangeDetector-DNqohXxz.js +1 -0
- package/dist/chunks/{skillGapStore-BND2Lq0Z.js → skillGapStore-D-kQKVDZ.js} +1 -1
- package/dist/chunks/{skillGapStore-z3LP64O-.js → skillGapStore-Df5BWAk5.js} +2 -2
- package/dist/chunks/{skillGenerator-DaNb-yKH.js → skillGenerator-DbcdpAkw.js} +2 -2
- package/dist/chunks/skillLearning-C5cXZE6_.js +1 -0
- package/dist/chunks/{skillLearning-rMX1bSBa.js → skillLearning-ClRiDcJH.js} +1 -1
- package/dist/chunks/{skillPanel-q7GPSQ6_.js → skillPanel-LBd4E-MM.js} +3 -3
- package/dist/chunks/{skillSearchPanel-oj8gy1ZL.js → skillSearchPanel-CErRnUwo.js} +3 -3
- package/dist/chunks/{skills-QqbeFP0s.js → skills-CBKhfg_a.js} +1 -1
- package/dist/chunks/{stats-DmFubHpI.js → stats-BY4dskVg.js} +1 -1
- package/dist/chunks/{status-DW3Z_7xa.js → status-BnJIXtKl.js} +2 -2
- package/dist/chunks/{status-BEIsLmfj.js → status-DU-B4SMW.js} +1 -1
- package/dist/chunks/{statusNoticeHelpers-CaHS8xig.js → statusNoticeHelpers-CzTuGNuC.js} +1 -1
- package/dist/chunks/{tag-CRg93Die.js → tag-B-wVW9Aj.js} +2 -2
- package/dist/chunks/{tasks-BEohK1ij.js → tasks-CBVL005y.js} +1 -1
- package/dist/chunks/teleport-dtqQXM4x.js +1 -0
- package/dist/chunks/{templateJobs-DYP1fjYU.js → templateJobs-D6998LcG.js} +1 -1
- package/dist/chunks/{terminalSetup-RDKg8dVa.js → terminalSetup-0SBdyKF5.js} +1 -1
- package/dist/chunks/{terminalSetup-BNs9nLbT.js → terminalSetup-CuV-qU6v.js} +1 -1
- package/dist/chunks/{theme-kNL4kl_3.js → theme-p0AooruD.js} +1 -1
- package/dist/chunks/thinkback-Catprqs_.js +1 -0
- package/dist/chunks/thinkback-DI2NpvG-.js +1 -0
- package/dist/chunks/{thinkback-play-BpWMqbgJ.js → thinkback-play-CqrIRx2o.js} +1 -1
- package/dist/chunks/{toolEventObserver-C98uraqD.js → toolEventObserver-DTccwC3c.js} +1 -1
- package/dist/chunks/{toolEventObserver-ar5NDa0M.js → toolEventObserver-DlH73w-S.js} +1 -1
- package/dist/chunks/toolPool-B64V-jmK.js +1 -0
- package/dist/chunks/{trustedDevice-BBKUhCCL.js → trustedDevice-BTYoQCkC.js} +1 -1
- package/dist/chunks/trustedDevice-CiwjT_Y6.js +1 -0
- package/dist/chunks/types-Bh9S_JG5.js +3 -0
- package/dist/chunks/types-DHkZVzJe.js +1 -0
- package/dist/chunks/{ultrareviewCommand-yXlFsMnv.js → ultrareviewCommand-BDFUS3hf.js} +2 -2
- package/dist/chunks/undercover-XYapZ_SS.js +1 -0
- package/dist/chunks/{undercover-BTIRVF1t.js → undercover-vuTpCnQJ.js} +2 -2
- package/dist/chunks/{updateCCB-B2xAJ4Nr.js → updateCCB-DFL5Wt_I.js} +1 -1
- package/dist/chunks/upgrade-D5qwcaWQ.js +1 -0
- package/dist/chunks/upgrade-DIg3j929.js +1 -0
- package/dist/chunks/{upload-BWVIHmMB.js → upload-B_yADHX9.js} +1 -1
- package/dist/chunks/usage-C0SnnC-i.js +1 -0
- package/dist/chunks/usage-CYJKE8N6.js +1 -0
- package/dist/chunks/{useExitOnCtrlCDWithKeybindings-CV4GZ-sq.js → useExitOnCtrlCDWithKeybindings-DKIqRraH.js} +1 -1
- package/dist/chunks/useMainLoopModel-XetDUXd-.js +1 -0
- package/dist/chunks/useManagePlugins-B2KhKiu5.js +1 -0
- package/dist/chunks/{useMergedTools-CRLWSGDl.js → useMergedTools-CKvwz_Zt.js} +1 -1
- package/dist/chunks/{useSearchInput-BzGq4t7t.js → useSearchInput-D1Vr2Js1.js} +1 -1
- package/dist/chunks/useSettingsErrors-B7BXHchG.js +1 -0
- package/dist/chunks/{util-BnReK81E.js → util-BaDs-wL5.js} +1 -1
- package/dist/chunks/validatePlugin-DtiYlXby.js +1 -0
- package/dist/chunks/{vim-C0KTnJJs.js → vim-C-icQDz1.js} +1 -1
- package/dist/chunks/{workerRegistry-CUXbNyL9.js → workerRegistry-ChqPPIaO.js} +1 -1
- package/dist/chunks/worktree-DAn8ooa1.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ApproveApiKey-LPrZMlgU.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-D_UHm7xo.js +0 -2
- package/dist/chunks/ClaudeMdExternalIncludesDialog--w2zWWEn.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-BXdC6j3_.js +0 -1
- package/dist/chunks/Doctor-BuiYwjAS.js +0 -1
- package/dist/chunks/Doctor-DKlHJBXq.js +0 -3
- package/dist/chunks/ExitFlow-rExuBL3w.js +0 -2
- package/dist/chunks/Grove-CD769Wvw.js +0 -11
- package/dist/chunks/Grove-ENfM8hC6.js +0 -1
- package/dist/chunks/MCPConnectionManager-CaBvO7NB.js +0 -1
- package/dist/chunks/MessageSelector-DOB1S2-O.js +0 -3
- package/dist/chunks/Messages-Clihwd2F.js +0 -11
- package/dist/chunks/PluginSettings-DUxj_oAg.js +0 -17
- package/dist/chunks/QueryEngine-BLcPQYq_.js +0 -1
- package/dist/chunks/REPL-B_E07dnf.js +0 -142
- package/dist/chunks/REPL-BhURgntS.js +0 -1
- package/dist/chunks/RemoteSessionManager-B43isWQs.js +0 -2
- package/dist/chunks/ResumeConversation-DaQ9n8_C.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-DSq7beKs.js +0 -1
- package/dist/chunks/Settings-CNsaWv8g.js +0 -2
- package/dist/chunks/agents-D7um1IXM.js +0 -103
- package/dist/chunks/allErrors-CHVdQ3fT.js +0 -1
- package/dist/chunks/api-C-rOQY-l.js +0 -1
- package/dist/chunks/api-Dmn7DUgU.js +0 -1
- package/dist/chunks/auth-C4Rvit2q.js +0 -1
- package/dist/chunks/auth-Cj7EX1eG.js +0 -1
- package/dist/chunks/auth-DAxGNCIR.js +0 -15
- package/dist/chunks/backgroundHousekeeping-C9m4tiFi.js +0 -17
- package/dist/chunks/backgroundHousekeeping-DQjzXBe0.js +0 -1
- package/dist/chunks/bridgeConfig-DsI5d0s7.js +0 -1
- package/dist/chunks/bridgeEnabled-DZzlF2d8.js +0 -1
- package/dist/chunks/bridgeEnabled-FjPuA7zx.js +0 -1
- package/dist/chunks/bridgeMain-BppY0KW3.js +0 -68
- package/dist/chunks/bridgeMain-BrY4tkF6.js +0 -1
- package/dist/chunks/caches-BBLH8G1I.js +0 -1
- package/dist/chunks/client-CtVu3BLD.js +0 -1
- package/dist/chunks/commands-BWw1sQeH.js +0 -1
- package/dist/chunks/commitAttribution-DIT_s0vY.js +0 -1
- package/dist/chunks/compact-CaOnQVkH.js +0 -2
- package/dist/chunks/config-DmPGzNmi.js +0 -1
- package/dist/chunks/config-HHTwEsWp.js +0 -1
- package/dist/chunks/context-noninteractive-BilCSCV1.js +0 -1
- package/dist/chunks/conversation-BWXf3un9.js +0 -1
- package/dist/chunks/conversation-awh8AwwL.js +0 -1
- package/dist/chunks/createSession-Hvpx3Le7.js +0 -1
- package/dist/chunks/crossProjectResume-_XjvSXA3.js +0 -40
- package/dist/chunks/doctor-CkdQ7Fv7.js +0 -1
- package/dist/chunks/effort-DCgooYMY.js +0 -9
- package/dist/chunks/envLessBridgeConfig-sxodu0xO.js +0 -1
- package/dist/chunks/exit-CFJR3NfE.js +0 -1
- package/dist/chunks/extra-usage-D1Y-3OWQ.js +0 -1
- package/dist/chunks/extraUsage-2DwLEr26.js +0 -1
- package/dist/chunks/extractMemories-C3qrwpu2.js +0 -1
- package/dist/chunks/fast-D3CPmUX4.js +0 -1
- package/dist/chunks/firstPartyEventLogger-DPUQnc6J.js +0 -1
- package/dist/chunks/hooks-cCAzfabs.js +0 -1
- package/dist/chunks/hostGuard-C5xydXZI.js +0 -1
- package/dist/chunks/inboundAttachments-DZgSqDwY.js +0 -1
- package/dist/chunks/initReplBridge-myzllvlk.js +0 -1
- package/dist/chunks/keybindings-DETOn3qJ.js +0 -2
- package/dist/chunks/language-BbaOTWm3.js +0 -1
- package/dist/chunks/launchAgentsPlatform-CuRQgd2Q.js +0 -1
- package/dist/chunks/launchMemoryStores-CN0ecWpP.js +0 -1
- package/dist/chunks/launchSchedule-psiSLmTA.js +0 -1
- package/dist/chunks/launchSkillStore-CQQ00Ads.js +0 -1
- package/dist/chunks/launchVault-Dn6jq0Rc.js +0 -1
- package/dist/chunks/loadAgentsDir-Db9UTm45.js +0 -1
- package/dist/chunks/loadPluginHooks-C9A9oS-w.js +0 -1
- package/dist/chunks/localSearch-hBh1ATr2.js +0 -1
- package/dist/chunks/mcp-CtbhGaLC.js +0 -2
- package/dist/chunks/mcp-DMacvhqZ.js +0 -1
- package/dist/chunks/memory-BPN8gW7n.js +0 -1
- package/dist/chunks/model-BIVmcl_N.js +0 -1
- package/dist/chunks/model-CWBwPvTH.js +0 -1
- package/dist/chunks/model-DlVpqR0P.js +0 -1
- package/dist/chunks/openai-yin1iDG8.js +0 -10
- package/dist/chunks/permissions-CxDJ__l6.js +0 -3
- package/dist/chunks/pluginCliCommands-DQQ7C7kk.js +0 -1
- package/dist/chunks/pluginStartupCheck-D7ts2V3p.js +0 -1
- package/dist/chunks/plugins-Cr03lISA.js +0 -4
- package/dist/chunks/policyLimits-DWtLyJ4n.js +0 -1
- package/dist/chunks/poorMode-AE4WNYZo.js +0 -1
- package/dist/chunks/print-CZUmAzmt.js +0 -23
- package/dist/chunks/processBashCommand-aKNneP2u.js +0 -1
- package/dist/chunks/processSlashCommand-BcPnWNxZ.js +0 -5
- package/dist/chunks/prompt-CIyhCdkE.js +0 -1
- package/dist/chunks/prompt-DRhjinu2.js +0 -1
- package/dist/chunks/rate-limit-options--Y3oF1g0.js +0 -1
- package/dist/chunks/reconciler-CJcSh6xo.js +0 -4
- package/dist/chunks/sandbox-adapter-DDfVl_2V.js +0 -1
- package/dist/chunks/searchExtraTools-BHWzsbNO.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-BZvxeufx.js +0 -1
- package/dist/chunks/sessionMemory-CAmpw2yb.js +0 -1
- package/dist/chunks/sessionMemory-DT0IkiA1.js +0 -1
- package/dist/chunks/sessionMemoryUtils-B4kGNH4j.js +0 -1
- package/dist/chunks/sessionObserver-oIkwTidC.js +0 -1
- package/dist/chunks/sessionStorage-DqARUj0K.js +0 -1
- package/dist/chunks/settingsSync-D_4P3Esd.js +0 -1
- package/dist/chunks/setup-JHvhWKh9.js +0 -3
- package/dist/chunks/sinks-Cro1Y8C2.js +0 -1
- package/dist/chunks/skillChangeDetector-uCaYrerZ.js +0 -1
- package/dist/chunks/skillLearning-GZxYPlyl.js +0 -1
- package/dist/chunks/teleport-4Srg5vcP.js +0 -1
- package/dist/chunks/thinkback-gV-sKkMM.js +0 -1
- package/dist/chunks/thinkback-hc5eJ9ul.js +0 -1
- package/dist/chunks/toolPool-CNYKDRq5.js +0 -1
- package/dist/chunks/trustedDevice-0dehm9qz.js +0 -1
- package/dist/chunks/types-BUyOCzUt.js +0 -1
- package/dist/chunks/types-Czs-_G1S.js +0 -3
- package/dist/chunks/undercover-CG_269xD.js +0 -1
- package/dist/chunks/upgrade-J7lKLkD2.js +0 -1
- package/dist/chunks/upgrade-yNl7EO4e.js +0 -1
- package/dist/chunks/usage-B2PbCUMi.js +0 -1
- package/dist/chunks/usage-Ck8Cu45g.js +0 -1
- package/dist/chunks/useMainLoopModel-CO4yBjRM.js +0 -1
- package/dist/chunks/useManagePlugins-BzFKIDrD.js +0 -1
- package/dist/chunks/useSettingsErrors-CSemUjj1.js +0 -1
- package/dist/chunks/validatePlugin-D6sPqea1.js +0 -1
- package/dist/chunks/worktree-89ttIVxH.js +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,o as n}from"./envUtils-DSxRz_kt.js";import{
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,o as n}from"./envUtils-DSxRz_kt.js";import{Qi as r,Vi as i,Xw as a,Yw as o}from"./loadAgentsDir-D206qwP3.js";import{r as s,t as c}from"./featureCheck-HslM03dr.js";import{a as l,c as u,i as d,l as f,n as p,o as m,r as ee,s as te,u as ne}from"./instinctParser-Dt-lqnDe.js";import{C as h,S as g,b as _,c as re,f as ie,i as ae,m as oe,o as v,r as se,u as y}from"./skillGenerator-DbcdpAkw.js";import{a as ce,i as b,l as le,n as x,o as ue,t as de}from"./observationStore-DzCdXq8U.js";import{a as fe,s as pe}from"./projectContext-D9MDwJUF.js";import{d as me,i as he,l as ge,p as _e}from"./sessionObserver-ShbCwJ8x.js";import{dirname as ve,join as S}from"node:path";import{existsSync as C}from"node:fs";import{randomBytes as ye}from"node:crypto";import{mkdir as w,readFile as be,readdir as T,rename as xe,unlink as Se,writeFile as E}from"node:fs/promises";function D(e,t){if(e.length===0)throw Error(`Cannot generate a command draft without instincts`);let n=t?.scope??e[0]?.scope??`project`,r=g(t?.name??Ce(e)),i=Ee(e),a=t?.description??we(e),o=k(r,n,t),s=Te({name:r,description:a,confidence:i,instincts:e});return{name:r,description:a,scope:n,sourceInstinctIds:e.map(e=>e.id),confidence:Number(i.toFixed(2)),content:s,outputPath:o}}async function O(e){await w(e.outputPath,{recursive:!0});let t=S(e.outputPath,`${e.name}.md`);return C(t)?t:(await E(t,e.content,`utf8`),i(),t)}function k(e,n,r){return r?.outputRoot?r.outputRoot:n===`project`?S(r?.cwd??process.cwd(),`.claude`,`commands`):r?.globalCommandsDir??S(t(),`commands`)}function Ce(e){return g([`learned`,...De(e,4)].join(`-`))||`learned-command`}function we(e){return(e[0]?.trigger??`Reuse the learned workflow`).replace(/\s+/g,` `).slice(0,120)}function Te(e){let{name:t,description:n,confidence:r,instincts:i}=e;return[`---`,`name: ${t}`,`description: ${JSON.stringify(n)}`,`origin: skill-learning`,`confidence: ${Number(r.toFixed(2))}`,`evolved_from: [${i.map(e=>JSON.stringify(e.id)).join(`, `)}]`,`---`,``,`# /${t}`,``,`## When to use`,``,i.map(e=>`- ${e.trigger}`).join(`
|
|
2
2
|
`),``,`## Steps`,``,i.map(e=>`- ${e.action}`).join(`
|
|
3
3
|
`),``,`## Evidence`,``,i.flatMap(e=>e.evidence.map(e=>`- ${e}`)).join(`
|
|
4
4
|
`),``].join(`
|
|
5
|
-
`)}function Ee(e){return e.reduce((e,t)=>e+t.confidence,0)/e.length}function De(e,t){let n=new Set([`when`,`with`,`this`,`that`,`user`,`asks`,`for`,`the`,`and`,`run`,`use`,`prefer`,`avoid`]),r=[];for(let i of e)for(let e of`${i.trigger} ${i.action}`.toLowerCase().split(/[^a-z0-9]+/))if(e.length>2&&!n.has(e)&&!r.includes(e)&&r.push(e),r.length>=t)return r;return r}var A=e((()=>{n(),
|
|
5
|
+
`)}function Ee(e){return e.reduce((e,t)=>e+t.confidence,0)/e.length}function De(e,t){let n=new Set([`when`,`with`,`this`,`that`,`user`,`asks`,`for`,`the`,`and`,`run`,`use`,`prefer`,`avoid`]),r=[];for(let i of e)for(let e of`${i.trigger} ${i.action}`.toLowerCase().split(/[^a-z0-9]+/))if(e.length>2&&!n.has(e)&&!r.includes(e)&&r.push(e),r.length>=t)return r;return r}var A=e((()=>{n(),r(),_()}));function j(e,t){if(e.length===0)throw Error(`Cannot generate an agent draft without instincts`);let n=t?.scope??e[0]?.scope??`project`,r=g(t?.name??Oe(e)),i=je(e),a=t?.description??ke(e),o=N(r,n,t),s=Ae({name:r,description:a,confidence:i,instincts:e});return{name:r,description:a,scope:n,sourceInstinctIds:e.map(e=>e.id),confidence:Number(i.toFixed(2)),content:s,outputPath:o}}async function M(e){await w(e.outputPath,{recursive:!0});let t=S(e.outputPath,`${e.name}.md`);return C(t)?t:(await E(t,e.content,`utf8`),i(),t)}function N(e,n,r){return r?.outputRoot?r.outputRoot:n===`project`?S(r?.cwd??process.cwd(),`.claude`,`agents`):r?.globalAgentsDir??S(t(),`agents`)}function Oe(e){return g([`learned`,`agent`,...Me(e,4)].join(`-`))||`learned-agent`}function ke(e){return(e[0]?.trigger??`Run the learned multi-step workflow`).replace(/\s+/g,` `).slice(0,120)}function Ae(e){let{name:t,description:n,confidence:r,instincts:i}=e;return[`---`,`name: ${t}`,`description: ${JSON.stringify(n)}`,`origin: skill-learning`,`confidence: ${Number(r.toFixed(2))}`,`evolved_from: [${i.map(e=>JSON.stringify(e.id)).join(`, `)}]`,`---`,``,`You are the ${t} learned agent.`,``,`## Triggers`,``,i.map(e=>`- ${e.trigger}`).join(`
|
|
6
6
|
`),``,`## Playbook`,``,i.map(e=>`- ${e.action}`).join(`
|
|
7
7
|
`),``,`## Evidence`,``,i.flatMap(e=>e.evidence.map(e=>`- ${e}`)).slice(0,20).join(`
|
|
8
8
|
`),``].join(`
|
|
9
|
-
`)}function je(e){return e.reduce((e,t)=>e+t.confidence,0)/e.length}function Me(e,t){let n=new Set([`when`,`with`,`this`,`that`,`user`,`asks`,`for`,`the`,`and`,`debug`,`investigate`,`research`]),r=[];for(let i of e)for(let e of`${i.trigger} ${i.action}`.toLowerCase().split(/[^a-z0-9]+/))if(e.length>2&&!n.has(e)&&!r.includes(e)&&r.push(e),r.length>=t)return r;return r}var P=e((()=>{n(),
|
|
9
|
+
`)}function je(e){return e.reduce((e,t)=>e+t.confidence,0)/e.length}function Me(e,t){let n=new Set([`when`,`with`,`this`,`that`,`user`,`asks`,`for`,`the`,`and`,`debug`,`investigate`,`research`]),r=[];for(let i of e)for(let e of`${i.trigger} ${i.action}`.toLowerCase().split(/[^a-z0-9]+/))if(e.length>2&&!n.has(e)&&!r.includes(e)&&r.push(e),r.length>=t)return r;return r}var P=e((()=>{n(),r(),_()}));function F(e){let t=new Map;for(let n of e){if(n.status!==`active`&&n.status!==`pending`)continue;let e=`${n.domain}:${Pe(n.trigger)}`,r=t.get(e)??[];r.push(n),t.set(e,r)}return Array.from(t.values()).filter(e=>e.length>=f().minClusterSize).map(e=>{let t=e.reduce((e,t)=>e+t.confidence,0)/e.length;return{target:I(e),trigger:e[0]?.trigger??`learned pattern`,domain:e[0]?.domain??`project`,instincts:e,averageConfidence:Number(t.toFixed(2))}}).sort((e,t)=>t.averageConfidence-e.averageConfidence)}function I(e){let t=Array.isArray(e)?e:e.instincts,n=t.map(e=>`${e.trigger} ${e.action}`).join(` `).toLowerCase();return/user asks|explicitly request|command|run /.test(n)?`command`:t.length>=4&&/(debug|investigate|research|multi-step)/.test(n)?`agent`:`skill`}function Ne(e,t){return F(e).filter(e=>e.target===`skill`&&h(e.instincts)).map(e=>ae(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function L(e,t){return F(e).filter(e=>e.target===`command`&&h(e.instincts)).map(e=>D(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function R(e,t){return F(e).filter(e=>e.target===`agent`&&h(e.instincts)).map(e=>j(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function Pe(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,` `).split(/\s+/).filter(Boolean).slice(0,6).join(` `)}var z=e((()=>{_(),v(),A(),P(),ne()}));function B(e){let t=x(e),n=e?.project;return(e?.scope??n?.scope??`project`)===`global`||!n||n.projectId===`global`?S(t,`global`,`instincts`,`personal`):S(t,`projects`,n.projectId,`instincts`,`personal`)}async function V(e,t){let n=m(e);await w(B(t),{recursive:!0});let r=He(n.id,t),i=`${r}.${ye(6).toString(`hex`)}.tmp`;return await E(i,u(n)),await xe(i,r),n}async function H(e){let t=B(e),n=[];try{n=await T(t)}catch(e){if(e.code===`ENOENT`)return[];throw e}let r=[];for(let e of n.filter(e=>e.endsWith(`.json`))){let n=await be(S(t,e),`utf8`);r.push(te(n))}return r.sort((e,t)=>e.id.localeCompare(t.id))}function Fe(e,t){let n=U.then(()=>Ie(e,t));return U=n.catch(()=>{}),n}async function Ie(e,t){let n=await H(t),r=n.find(t=>t.id===e.id)??n.find(t=>t.trigger.toLowerCase()===e.trigger.toLowerCase()&&l(t,e)),i=new Date().toISOString();if(!r)return V(e,t);let a=l(r,e),o=a?-.1:ze(e.evidenceOutcome),s=p(r.confidence+o),c=Le(r.status,s,a);return V(m({...r,confidence:s,evidence:[...r.evidence,...e.evidence],evidenceOutcome:e.evidenceOutcome??r.evidenceOutcome,observationIds:[...r.observationIds??[],...e.observationIds??[]],updatedAt:i,status:c}),t)}function Le(e,t,n){return n&&t<.3?`conflict-hold`:e===`conflict-hold`&&t>=.5||e===`pending`&&t>=.8?`active`:e}async function Re(e){let t=await H(e),n=Date.now(),r=0;for(let i of t){if(i.status!==`pending`&&i.status!==`active`)continue;let t=Date.parse(i.updatedAt);if(Number.isNaN(t))continue;let a=Math.floor((n-t)/Ue);if(a<1)continue;let o=-.02*a,s=p(i.confidence+o);s!==i.confidence&&(await V(m({...i,confidence:s,updatedAt:new Date(n).toISOString()}),e),r+=1)}return r}function ze(e){return e===`failure`?-.05:.05}async function Be(e,t){let n=await H(t);return await w(ve(e),{recursive:!0}),await E(e,`${JSON.stringify(n,null,2)}\n`),n}async function Ve(e,t){let n=await H(t),r=Date.now()-e*24*60*60*1e3,i=[];for(let e of n)e.status===`pending`&&Date.parse(e.updatedAt)<r&&(await Se(He(e.id,t)),i.push(e));return i}function He(e,t){return S(B(t),`${e}.json`)}var U,Ue,W=e((()=>{b(),d(),U=Promise.resolve(),Ue=10080*60*1e3}));function We(e){if(G.add(e),G.size>Ye){let e=G.size-Xe,t=G.values();for(let n=0;n<e;n++){let e=t.next();if(e.done)break;G.delete(e.value)}}}function Ge(e,t=2,n=.8){let r=new Map;for(let t of e){if(t.scope!==`project`)continue;let e=r.get(t.id)??[];e.push(t),r.set(t.id,e)}return Array.from(r.entries()).flatMap(([e,r])=>{let i=Array.from(new Set(r.map(e=>e.projectId).filter(Boolean))),a=r.reduce((e,t)=>e+t.confidence,0)/r.length;return i.length>=t&&a>=n?[{instinctId:e,projectIds:i,averageConfidence:Number(a.toFixed(2))}]:[]})}async function Ke(e={}){let t=e.minProjects??2,n=e.minConfidence??.8,r=await qe(e.rootDir),i=Ge(r,t,n),a=[];for(let t of i){if(G.has(t.instinctId))continue;let n=r.find(e=>e.id===t.instinctId);n&&(await V({...n,scope:`global`,projectId:void 0,projectName:void 0,confidence:t.averageConfidence,updatedAt:new Date().toISOString()},{rootDir:e.rootDir,scope:`global`,project:Je(e.rootDir)}),We(t.instinctId),a.push(t))}return a}async function qe(e){let t=S(x(e?{rootDir:e}:void 0),`projects`);if(!C(t))return[];let n=await T(t,{withFileTypes:!0}),r=[];for(let i of n){if(!i.isDirectory())continue;let n=await H({rootDir:e,project:{projectId:i.name,projectName:i.name,scope:`project`,source:`git_root`,cwd:t,storageDir:S(t,i.name)},scope:`project`});r.push(...n)}return r}function Je(e){let t=x(e?{rootDir:e}:void 0);return{projectId:`global`,projectName:`Global`,scope:`global`,source:`global`,cwd:t,storageDir:S(t,`global`)}}var Ye,Xe,G,Ze=e((()=>{W(),b(),Ye=256,Xe=192,G=new Set}));function Qe(){X=0,Z=0,Q.clear()}function $e(){return J}function et(){if(!q){q=!0;try{_e()}catch{}a(rt),tt().catch(()=>{})}}async function tt(){if(!s()||process.env.CLAUDE_SKILL_LEARNING_DISABLE)return;let e={project:pe(process.cwd())};await Promise.allSettled([Re(e),ce(e),Ve(30,e)])}function nt(e){try{let t=x();return e.startsWith(t)}catch{return!1}}async function rt(e){if(!s()||process.env.CLAUDE_SKILL_LEARNING_DISABLE||!e.querySource?.startsWith(`repl_main_thread`)||e.toolUseContext.agentId)return;let t=process.cwd();if(nt(t))return;let n=pe(t),r={project:n};++J;let i=[];for(let t of ot(e.messages,n))i.push(await de(t,r));let a=(await ue(r)).filter(e=>e.source===`tool-hook`&&e.sessionId===`runtime-session`&&typeof e.timestamp==`string`&&e.timestamp>Y);i.push(...a);for(let e of a)e.timestamp>Y&&(Y=e.timestamp);if(i.length===0)return;let o=Date.now(),{llm:c}=f(),l=i.length>=5&&X<c.maxCallsPerSession&&o-Z>=c.cooldownMs,u;if(l)X++,Z=o,u=await ge(i,{project:n});else{let{heuristicObserverBackend:e}=await import(`./sessionObserver-ChfQtK2m.js`),t=e.analyze(i,{project:n});u=Array.isArray(t)?t:await t}for(let e of u)await Fe(ee(e),r);await at(r)}function it(){J=0,Y=``,Qe()}async function at(e){let n=await H(e),r=process.cwd(),i=[S(r,`.claude`,`skills`),S(t(),`skills`)],a=F(n).filter(e=>e.target===`skill`&&h(e.instincts));for(let e of a){let t=await se(e.instincts,{cwd:r,scope:e.instincts[0]?.scope??`project`},i);if(t.action===`append-evidence`)continue;let n=t.draft;C(S(n.outputPath,`SKILL.md`))||await re(ie(n,await y(`skill`,n,i)))}let o=L(n,{cwd:r});for(let e of o)(await y(`command`,e,[S(r,`.claude`,`commands`),S(t(),`commands`)])).length>0||await O(e);let s=R(n,{cwd:r});for(let e of s)(await y(`agent`,e,[S(r,`.claude`,`agents`),S(t(),`agents`)])).length>0||await M(e);await Ke()}function ot(e,t){let n=K,r={sessionId:n,projectId:t.projectId,projectName:t.projectName,cwd:t.cwd,timestamp:new Date().toISOString(),source:`hook`};return e.flatMap(e=>{let t=`${n}:${String(e.uuid)}`;if(Q.has(t))return[];if(Q.add(t),Q.size>ut){let e=Q.size-$,t=Q.values();for(let n=0;n<e;n++){let e=t.next();if(e.done)break;Q.delete(e.value)}}if(e.type===`user`){let t=lt(e.message?.content);if(t.length>0)return t.map(e=>({...r,id:crypto.randomUUID(),event:`tool_complete`,toolName:e.toolName,toolOutput:e.output,outcome:e.isError?`failure`:`success`}));let n=st(e.message?.content);return n.trim()?[{...r,id:crypto.randomUUID(),event:`user_message`,messageText:n}]:[]}if(e.type===`assistant`){let t=ct(e.message?.content),n=st(e.message?.content);return[...t.map(e=>({...r,id:crypto.randomUUID(),event:`tool_start`,toolName:e.toolName,toolInput:e.input})),...n.trim()?[{...r,id:crypto.randomUUID(),event:`assistant_message`,messageText:n}]:[]]}return[]})}function st(e){return typeof e==`string`?e:Array.isArray(e)?e.map(e=>{if(!e||typeof e!=`object`)return``;let t=e;return typeof t.text==`string`?t.text:``}).filter(Boolean).join(`
|
|
10
10
|
`):``}function ct(e){return Array.isArray(e)?e.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return t.type===`tool_use`?[{toolName:String(t.name??`unknown_tool`),input:le(t.input)}]:[]}):[]}function lt(e){return Array.isArray(e)?e.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return t.type===`tool_result`?[{toolName:String(t.name??t.tool_name??`unknown_tool`),output:le(t.content),isError:t.is_error===!0}]:[]}):[]}var K,q,J,Y,X,Z,Q,ut,$,dt=e((()=>{o(),ne(),c(),b(),fe(),he(),d(),me(),W(),oe(),z(),v(),_(),A(),P(),Ze(),n(),K=`runtime-session`,q=!1,J=0,Y=``,X=0,Z=0,Q=new Set,ut=1e3,$=500}));export{O as A,j as C,D,M as E,k as O,z as S,P as T,I as _,Qe as a,L as b,Ke as c,Be as d,W as f,Fe as g,V as h,dt as i,A as k,Ge as l,Ve as m,$e as n,it as o,H as p,et as r,rt as s,K as t,Ze as u,F as v,N as w,Ne as x,R as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SD as e,yD as t}from"./loadAgentsDir-D206qwP3.js";e();export{t as SandboxManager};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gt as t,H as n,I as r,Lt as i,P as a,a as o,fi as s,j as c,n as l,r as u,t as d,x as f}from"./src-CDCSSo0U2.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{O as m,en as h}from"./state-ix0xIunV.js";import{CD as g,_D as _,_x as v,bD as y,vD as b,vx as x}from"./loadAgentsDir-BURvZNN6.js";import{f as S,g as C,s as w}from"./settings-DfWP5y6X.js";import{i as T,o as E}from"./platform-BrYefG_2.js";import{u as D}from"./referral-UKJv23_5.js";import{relative as O}from"path";function k(){let e=_.isSandboxingEnabled(),t=_.checkDependencies(),n=t.warnings.length>0?(0,A.jsx)(r,{marginTop:1,flexDirection:`column`,children:t.warnings.map((e,t)=>(0,A.jsx)(a,{dimColor:!0,children:e},t))}):null;if(!e)return(0,A.jsxs)(r,{flexDirection:`column`,paddingY:1,children:[(0,A.jsx)(a,{color:`subtle`,children:`Sandbox is not enabled`}),n]});let i=_.getFsReadConfig(),o=_.getFsWriteConfig(),s=_.getNetworkRestrictionConfig(),c=_.getAllowUnixSockets(),l=_.getExcludedCommands(),u=_.getLinuxGlobPatternWarnings();return(0,A.jsxs)(r,{flexDirection:`column`,paddingY:1,children:[(0,A.jsxs)(r,{flexDirection:`column`,children:[(0,A.jsx)(a,{bold:!0,color:`permission`,children:`Excluded Commands:`}),(0,A.jsx)(a,{dimColor:!0,children:l.length>0?l.join(`, `):`None`})]}),i.denyOnly.length>0&&(0,A.jsxs)(r,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(a,{bold:!0,color:`permission`,children:`Filesystem Read Restrictions:`}),(0,A.jsxs)(a,{dimColor:!0,children:[`Denied: `,i.denyOnly.join(`, `)]}),i.allowWithinDeny&&i.allowWithinDeny.length>0&&(0,A.jsxs)(a,{dimColor:!0,children:[`Allowed within denied: `,i.allowWithinDeny.join(`, `)]})]}),o.allowOnly.length>0&&(0,A.jsxs)(r,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(a,{bold:!0,color:`permission`,children:`Filesystem Write Restrictions:`}),(0,A.jsxs)(a,{dimColor:!0,children:[`Allowed: `,o.allowOnly.join(`, `)]}),o.denyWithinAllow.length>0&&(0,A.jsxs)(a,{dimColor:!0,children:[`Denied within allowed: `,o.denyWithinAllow.join(`, `)]})]}),(s.allowedHosts&&s.allowedHosts.length>0||s.deniedHosts&&s.deniedHosts.length>0)&&(0,A.jsxs)(r,{marginTop:1,flexDirection:`column`,children:[(0,A.jsxs)(a,{bold:!0,color:`permission`,children:[`Network Restrictions`,g()?` (Managed)`:``,`:`]}),s.allowedHosts&&s.allowedHosts.length>0&&(0,A.jsxs)(a,{dimColor:!0,children:[`Allowed: `,s.allowedHosts.join(`, `)]}),s.deniedHosts&&s.deniedHosts.length>0&&(0,A.jsxs)(a,{dimColor:!0,children:[`Denied: `,s.deniedHosts.join(`, `)]})]}),c&&c.length>0&&(0,A.jsxs)(r,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(a,{bold:!0,color:`permission`,children:`Allowed Unix Sockets:`}),(0,A.jsx)(a,{dimColor:!0,children:c.join(`, `)})]}),u.length>0&&(0,A.jsxs)(r,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(a,{bold:!0,color:`warning`,children:`⚠ Warning: Glob patterns not fully supported on Linux`}),(0,A.jsxs)(a,{dimColor:!0,children:[`The following patterns will be ignored: `,u.slice(0,3).join(`, `),u.length>3&&` (${u.length-3} more)`]})]}),n]})}var A,j=e((()=>{s(),d(),y(),A=p()}));function M({depCheck:e}){let t=T()===`macos`,n=e.errors.some(e=>e.includes(`ripgrep`)),i=e.errors.some(e=>e.includes(`bwrap`)),o=e.errors.some(e=>e.includes(`socat`)),s=e.warnings.length>0,c=e.errors.filter(e=>!e.includes(`ripgrep`)&&!e.includes(`bwrap`)&&!e.includes(`socat`));return(0,N.jsxs)(r,{flexDirection:`column`,paddingY:1,gap:1,children:[t&&(0,N.jsx)(r,{flexDirection:`column`,children:(0,N.jsxs)(a,{children:[`seatbelt: `,(0,N.jsx)(a,{color:`success`,children:`built-in (macOS)`})]})}),(0,N.jsxs)(r,{flexDirection:`column`,children:[(0,N.jsxs)(a,{children:[`ripgrep (rg): `,n?(0,N.jsx)(a,{color:`error`,children:`not found`}):(0,N.jsx)(a,{color:`success`,children:`found`})]}),n&&(0,N.jsxs)(a,{dimColor:!0,children:[` `,`· `,t?`brew install ripgrep`:`apt install ripgrep`]})]}),!t&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(r,{flexDirection:`column`,children:[(0,N.jsxs)(a,{children:[`bubblewrap (bwrap):`,` `,i?(0,N.jsx)(a,{color:`error`,children:`not installed`}):(0,N.jsx)(a,{color:`success`,children:`installed`})]}),i&&(0,N.jsxs)(a,{dimColor:!0,children:[` `,`· apt install bubblewrap`]})]}),(0,N.jsxs)(r,{flexDirection:`column`,children:[(0,N.jsxs)(a,{children:[`socat: `,o?(0,N.jsx)(a,{color:`error`,children:`not installed`}):(0,N.jsx)(a,{color:`success`,children:`installed`})]}),o&&(0,N.jsxs)(a,{dimColor:!0,children:[` `,`· apt install socat`]})]}),(0,N.jsxs)(r,{flexDirection:`column`,children:[(0,N.jsxs)(a,{children:[`seccomp filter:`,` `,s?(0,N.jsx)(a,{color:`warning`,children:`not installed`}):(0,N.jsx)(a,{color:`success`,children:`installed`}),s&&(0,N.jsx)(a,{dimColor:!0,children:` (required to block unix domain sockets)`})]}),s&&(0,N.jsxs)(r,{flexDirection:`column`,children:[(0,N.jsxs)(a,{dimColor:!0,children:[` `,`· npm install -g @anthropic-ai/sandbox-runtime`]}),(0,N.jsxs)(a,{dimColor:!0,children:[` `,`· or copy vendor/seccomp/* from sandbox-runtime and set`]}),(0,N.jsxs)(a,{dimColor:!0,children:[` `,`sandbox.seccomp.bpfPath and applyPath in settings.json`]})]})]})]}),c.map(e=>(0,N.jsx)(a,{color:`error`,children:e},e))]})}var N,P=e((()=>{s(),d(),E(),N=p()}));function F({onComplete:e}){let t=_.isSandboxingEnabled(),n=_.areSandboxSettingsLockedByPolicy(),i=_.areUnsandboxedCommandsAllowed();return t?n?(0,L.jsxs)(r,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(a,{color:`subtle`,children:`Override settings are managed by a higher-priority configuration and cannot be changed locally.`}),(0,L.jsx)(r,{marginTop:1,children:(0,L.jsxs)(a,{dimColor:!0,children:[`Current setting: `,i?`Allow unsandboxed fallback`:`Strict sandbox mode`]})})]}):(0,L.jsx)(I,{onComplete:e,currentMode:i?`open`:`closed`}):(0,L.jsx)(r,{flexDirection:`column`,paddingY:1,children:(0,L.jsx)(a,{color:`subtle`,children:`Sandbox is not enabled. Enable sandbox to configure override settings.`})})}function I({onComplete:e,currentMode:t}){let[s]=n(),{headerFocused:l,focusHeader:u}=o(),d=c(`success`,s)(`(current)`),f=[{label:t===`open`?`Allow unsandboxed fallback ${d}`:`Allow unsandboxed fallback`,value:`open`},{label:t===`closed`?`Strict sandbox mode ${d}`:`Strict sandbox mode`,value:`closed`}];async function p(t){let n=t;await _.setSandboxSettings({allowUnsandboxedCommands:n===`open`}),e(n===`open`?`✓ Unsandboxed fallback allowed - commands can run outside sandbox when necessary`:"✓ Strict sandbox mode - all commands must run in sandbox or be excluded via the `excludedCommands` option")}return(0,L.jsxs)(r,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(r,{marginBottom:1,children:(0,L.jsx)(a,{bold:!0,children:`Configure Overrides:`})}),(0,L.jsx)(v,{options:f,onChange:p,onCancel:()=>e(void 0,{display:`skip`}),onUpFromFirstItem:u,isDisabled:l}),(0,L.jsxs)(r,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,L.jsxs)(a,{dimColor:!0,children:[(0,L.jsx)(a,{bold:!0,dimColor:!0,children:`Allow unsandboxed fallback:`}),` `,`When a command fails due to sandbox restrictions, Claude can retry with dangerouslyDisableSandbox to run outside the sandbox (falling back to default permissions).`]}),(0,L.jsxs)(a,{dimColor:!0,children:[(0,L.jsx)(a,{bold:!0,dimColor:!0,children:`Strict sandbox mode:`}),` `,`All bash commands invoked by the model must run in the sandbox unless they are explicitly listed in excludedCommands.`]}),(0,L.jsxs)(a,{dimColor:!0,children:[`Learn more:`,` `,(0,L.jsx)(i,{url:`https://code.claude.com/docs/en/sandboxing#configure-sandboxing`,children:`code.claude.com/docs/en/sandboxing#configure-sandboxing`})]})]})]})}var L,R=e((()=>{s(),d(),y(),x(),L=p()}));function z({onComplete:e,depCheck:r}){let[i]=n(),a=_.isSandboxingEnabled(),o=_.isAutoAllowBashIfSandboxedEnabled(),s=r.warnings.length>0,d=S().sandbox?.network?.allowAllUnixSockets,p=s&&!d,m=a?o?`auto-allow`:`regular`:`disabled`,h=c(`success`,i)(`(current)`),g=[{label:m===`auto-allow`?`Sandbox BashTool, with auto-allow ${h}`:`Sandbox BashTool, with auto-allow`,value:`auto-allow`},{label:m===`regular`?`Sandbox BashTool, with regular permissions ${h}`:`Sandbox BashTool, with regular permissions`,value:`regular`},{label:m===`disabled`?`No Sandbox ${h}`:`No Sandbox`,value:`disabled`}];async function v(t){switch(t){case`auto-allow`:await _.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!0}),e(`✓ Sandbox enabled with auto-allow for bash commands`);break;case`regular`:await _.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!1}),e(`✓ Sandbox enabled with regular bash permissions`);break;case`disabled`:await _.setSandboxSettings({enabled:!1,autoAllowBashIfSandboxed:!1}),e(`○ Sandbox disabled`);break}}t({"confirm:no":()=>e(void 0,{display:`skip`})},{context:`Settings`});let y=(0,V.jsx)(l,{title:`Mode`,children:(0,V.jsx)(B,{showSocketWarning:p,options:g,onSelect:v,onComplete:e})},`mode`),b=(0,V.jsx)(l,{title:`Overrides`,children:(0,V.jsx)(F,{onComplete:e})},`overrides`),x=(0,V.jsx)(l,{title:`Config`,children:(0,V.jsx)(k,{})},`config`);return(0,V.jsx)(f,{color:`permission`,children:(0,V.jsx)(u,{title:`Sandbox:`,color:`permission`,defaultTab:`Mode`,children:r.errors.length>0?[(0,V.jsx)(l,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:r})},`dependencies`)]:[y,...s?[(0,V.jsx)(l,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:r})},`dependencies`)]:[],b,x]})})}function B({showSocketWarning:e,options:t,onSelect:n,onComplete:s}){let{headerFocused:c,focusHeader:l}=o();return(0,V.jsxs)(r,{flexDirection:`column`,paddingY:1,children:[e&&(0,V.jsx)(r,{marginBottom:1,children:(0,V.jsx)(a,{color:`warning`,children:`Cannot block unix domain sockets (see Dependencies tab)`})}),(0,V.jsx)(r,{marginBottom:1,children:(0,V.jsx)(a,{bold:!0,children:`Configure Mode:`})}),(0,V.jsx)(v,{options:t,onChange:n,onCancel:()=>s(void 0,{display:`skip`}),onUpFromFirstItem:l,isDisabled:c}),(0,V.jsxs)(r,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,V.jsxs)(a,{dimColor:!0,children:[(0,V.jsx)(a,{bold:!0,dimColor:!0,children:`Auto-allow mode:`}),` `,`Commands will try to run in the sandbox automatically, and attempts to run outside of the sandbox fallback to regular permissions. Explicit ask/deny rules are always respected.`]}),(0,V.jsxs)(a,{dimColor:!0,children:[`Learn more: `,(0,V.jsx)(i,{url:`https://code.claude.com/docs/en/sandboxing`,children:`code.claude.com/docs/en/sandboxing`})]})]})]})}var V,H=e((()=>{s(),d(),D(),y(),C(),x(),j(),P(),R(),V=p()}));async function U(e,t,n){let r=S().theme||`light`,i=T();if(!_.isSupportedPlatform()){let t=i===`wsl`?`Error: Sandboxing requires WSL2. WSL1 is not supported.`:`Error: Sandboxing is currently only supported on macOS, Linux, and WSL2.`;return e(c(`error`,r)(t)),null}let a=_.checkDependencies();if(!_.isPlatformInEnabledList())return e(c(`error`,r)(`Error: Sandboxing is disabled for this platform (${i}) via the enabledPlatforms setting.`)),null;if(_.areSandboxSettingsLockedByPolicy())return e(c(`error`,r)(`Error: Sandbox settings are overridden by a higher-priority configuration and cannot be changed locally.`)),null;let o=n?.trim()||``;if(!o)return(0,W.jsx)(z,{onComplete:e,depCheck:a});if(o){let t=o.split(` `)[0];if(t===`exclude`){let t=o.slice(8).trim();if(!t)return e(c(`error`,r)(`Error: Please provide a command pattern to exclude (e.g., /sandbox exclude "npm run test:*")`)),null;let n=t.replace(/^["']|["']$/g,``);b(n);let i=w(`localSettings`),a=i?O(m(),i):`.claude/settings.local.json`;return e(c(`success`,r)(`Added "${n}" to excluded commands in ${a}`)),null}else return e(c(`error`,r)(`Error: Unknown subcommand "${t}". Available subcommand: exclude`)),null}return null}var W;e((()=>{s(),h(),H(),d(),E(),y(),C(),W=p()}))();export{U as call};
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gt as t,H as n,I as r,Lt as i,P as a,a as o,fi as s,j as c,n as l,r as u,t as d,x as f}from"./src-CDCSSo0U2.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{O as m,en as h}from"./state-ix0xIunV.js";import{SD as g,TD as _,bD as v,mx as y,px as b,yD as x}from"./loadAgentsDir-D206qwP3.js";import{f as S,g as C,s as w}from"./settings-BovzmwMP.js";import{i as T,o as E}from"./platform-BrYefG_2.js";import{u as D}from"./referral-CUaIo_vT.js";import{relative as O}from"path";function k(){let e=x.isSandboxingEnabled(),t=x.checkDependencies(),n=t.warnings.length>0?(0,A.jsx)(r,{marginTop:1,flexDirection:`column`,children:t.warnings.map((e,t)=>(0,A.jsx)(a,{dimColor:!0,children:e},t))}):null;if(!e)return(0,A.jsxs)(r,{flexDirection:`column`,paddingY:1,children:[(0,A.jsx)(a,{color:`subtle`,children:`Sandbox is not enabled`}),n]});let i=x.getFsReadConfig(),o=x.getFsWriteConfig(),s=x.getNetworkRestrictionConfig(),c=x.getAllowUnixSockets(),l=x.getExcludedCommands(),u=x.getLinuxGlobPatternWarnings();return(0,A.jsxs)(r,{flexDirection:`column`,paddingY:1,children:[(0,A.jsxs)(r,{flexDirection:`column`,children:[(0,A.jsx)(a,{bold:!0,color:`permission`,children:`Excluded Commands:`}),(0,A.jsx)(a,{dimColor:!0,children:l.length>0?l.join(`, `):`None`})]}),i.denyOnly.length>0&&(0,A.jsxs)(r,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(a,{bold:!0,color:`permission`,children:`Filesystem Read Restrictions:`}),(0,A.jsxs)(a,{dimColor:!0,children:[`Denied: `,i.denyOnly.join(`, `)]}),i.allowWithinDeny&&i.allowWithinDeny.length>0&&(0,A.jsxs)(a,{dimColor:!0,children:[`Allowed within denied: `,i.allowWithinDeny.join(`, `)]})]}),o.allowOnly.length>0&&(0,A.jsxs)(r,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(a,{bold:!0,color:`permission`,children:`Filesystem Write Restrictions:`}),(0,A.jsxs)(a,{dimColor:!0,children:[`Allowed: `,o.allowOnly.join(`, `)]}),o.denyWithinAllow.length>0&&(0,A.jsxs)(a,{dimColor:!0,children:[`Denied within allowed: `,o.denyWithinAllow.join(`, `)]})]}),(s.allowedHosts&&s.allowedHosts.length>0||s.deniedHosts&&s.deniedHosts.length>0)&&(0,A.jsxs)(r,{marginTop:1,flexDirection:`column`,children:[(0,A.jsxs)(a,{bold:!0,color:`permission`,children:[`Network Restrictions`,_()?` (Managed)`:``,`:`]}),s.allowedHosts&&s.allowedHosts.length>0&&(0,A.jsxs)(a,{dimColor:!0,children:[`Allowed: `,s.allowedHosts.join(`, `)]}),s.deniedHosts&&s.deniedHosts.length>0&&(0,A.jsxs)(a,{dimColor:!0,children:[`Denied: `,s.deniedHosts.join(`, `)]})]}),c&&c.length>0&&(0,A.jsxs)(r,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(a,{bold:!0,color:`permission`,children:`Allowed Unix Sockets:`}),(0,A.jsx)(a,{dimColor:!0,children:c.join(`, `)})]}),u.length>0&&(0,A.jsxs)(r,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(a,{bold:!0,color:`warning`,children:`⚠ Warning: Glob patterns not fully supported on Linux`}),(0,A.jsxs)(a,{dimColor:!0,children:[`The following patterns will be ignored: `,u.slice(0,3).join(`, `),u.length>3&&` (${u.length-3} more)`]})]}),n]})}var A,j=e((()=>{s(),d(),g(),A=p()}));function M({depCheck:e}){let t=T()===`macos`,n=e.errors.some(e=>e.includes(`ripgrep`)),i=e.errors.some(e=>e.includes(`bwrap`)),o=e.errors.some(e=>e.includes(`socat`)),s=e.warnings.length>0,c=e.errors.filter(e=>!e.includes(`ripgrep`)&&!e.includes(`bwrap`)&&!e.includes(`socat`));return(0,N.jsxs)(r,{flexDirection:`column`,paddingY:1,gap:1,children:[t&&(0,N.jsx)(r,{flexDirection:`column`,children:(0,N.jsxs)(a,{children:[`seatbelt: `,(0,N.jsx)(a,{color:`success`,children:`built-in (macOS)`})]})}),(0,N.jsxs)(r,{flexDirection:`column`,children:[(0,N.jsxs)(a,{children:[`ripgrep (rg): `,n?(0,N.jsx)(a,{color:`error`,children:`not found`}):(0,N.jsx)(a,{color:`success`,children:`found`})]}),n&&(0,N.jsxs)(a,{dimColor:!0,children:[` `,`· `,t?`brew install ripgrep`:`apt install ripgrep`]})]}),!t&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(r,{flexDirection:`column`,children:[(0,N.jsxs)(a,{children:[`bubblewrap (bwrap):`,` `,i?(0,N.jsx)(a,{color:`error`,children:`not installed`}):(0,N.jsx)(a,{color:`success`,children:`installed`})]}),i&&(0,N.jsxs)(a,{dimColor:!0,children:[` `,`· apt install bubblewrap`]})]}),(0,N.jsxs)(r,{flexDirection:`column`,children:[(0,N.jsxs)(a,{children:[`socat: `,o?(0,N.jsx)(a,{color:`error`,children:`not installed`}):(0,N.jsx)(a,{color:`success`,children:`installed`})]}),o&&(0,N.jsxs)(a,{dimColor:!0,children:[` `,`· apt install socat`]})]}),(0,N.jsxs)(r,{flexDirection:`column`,children:[(0,N.jsxs)(a,{children:[`seccomp filter:`,` `,s?(0,N.jsx)(a,{color:`warning`,children:`not installed`}):(0,N.jsx)(a,{color:`success`,children:`installed`}),s&&(0,N.jsx)(a,{dimColor:!0,children:` (required to block unix domain sockets)`})]}),s&&(0,N.jsxs)(r,{flexDirection:`column`,children:[(0,N.jsxs)(a,{dimColor:!0,children:[` `,`· npm install -g @anthropic-ai/sandbox-runtime`]}),(0,N.jsxs)(a,{dimColor:!0,children:[` `,`· or copy vendor/seccomp/* from sandbox-runtime and set`]}),(0,N.jsxs)(a,{dimColor:!0,children:[` `,`sandbox.seccomp.bpfPath and applyPath in settings.json`]})]})]})]}),c.map(e=>(0,N.jsx)(a,{color:`error`,children:e},e))]})}var N,P=e((()=>{s(),d(),E(),N=p()}));function F({onComplete:e}){let t=x.isSandboxingEnabled(),n=x.areSandboxSettingsLockedByPolicy(),i=x.areUnsandboxedCommandsAllowed();return t?n?(0,L.jsxs)(r,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(a,{color:`subtle`,children:`Override settings are managed by a higher-priority configuration and cannot be changed locally.`}),(0,L.jsx)(r,{marginTop:1,children:(0,L.jsxs)(a,{dimColor:!0,children:[`Current setting: `,i?`Allow unsandboxed fallback`:`Strict sandbox mode`]})})]}):(0,L.jsx)(I,{onComplete:e,currentMode:i?`open`:`closed`}):(0,L.jsx)(r,{flexDirection:`column`,paddingY:1,children:(0,L.jsx)(a,{color:`subtle`,children:`Sandbox is not enabled. Enable sandbox to configure override settings.`})})}function I({onComplete:e,currentMode:t}){let[s]=n(),{headerFocused:l,focusHeader:u}=o(),d=c(`success`,s)(`(current)`),f=[{label:t===`open`?`Allow unsandboxed fallback ${d}`:`Allow unsandboxed fallback`,value:`open`},{label:t===`closed`?`Strict sandbox mode ${d}`:`Strict sandbox mode`,value:`closed`}];async function p(t){let n=t;await x.setSandboxSettings({allowUnsandboxedCommands:n===`open`}),e(n===`open`?`✓ Unsandboxed fallback allowed - commands can run outside sandbox when necessary`:"✓ Strict sandbox mode - all commands must run in sandbox or be excluded via the `excludedCommands` option")}return(0,L.jsxs)(r,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(r,{marginBottom:1,children:(0,L.jsx)(a,{bold:!0,children:`Configure Overrides:`})}),(0,L.jsx)(b,{options:f,onChange:p,onCancel:()=>e(void 0,{display:`skip`}),onUpFromFirstItem:u,isDisabled:l}),(0,L.jsxs)(r,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,L.jsxs)(a,{dimColor:!0,children:[(0,L.jsx)(a,{bold:!0,dimColor:!0,children:`Allow unsandboxed fallback:`}),` `,`When a command fails due to sandbox restrictions, Claude can retry with dangerouslyDisableSandbox to run outside the sandbox (falling back to default permissions).`]}),(0,L.jsxs)(a,{dimColor:!0,children:[(0,L.jsx)(a,{bold:!0,dimColor:!0,children:`Strict sandbox mode:`}),` `,`All bash commands invoked by the model must run in the sandbox unless they are explicitly listed in excludedCommands.`]}),(0,L.jsxs)(a,{dimColor:!0,children:[`Learn more:`,` `,(0,L.jsx)(i,{url:`https://code.claude.com/docs/en/sandboxing#configure-sandboxing`,children:`code.claude.com/docs/en/sandboxing#configure-sandboxing`})]})]})]})}var L,R=e((()=>{s(),d(),g(),y(),L=p()}));function z({onComplete:e,depCheck:r}){let[i]=n(),a=x.isSandboxingEnabled(),o=x.isAutoAllowBashIfSandboxedEnabled(),s=r.warnings.length>0,d=S().sandbox?.network?.allowAllUnixSockets,p=s&&!d,m=a?o?`auto-allow`:`regular`:`disabled`,h=c(`success`,i)(`(current)`),g=[{label:m===`auto-allow`?`Sandbox BashTool, with auto-allow ${h}`:`Sandbox BashTool, with auto-allow`,value:`auto-allow`},{label:m===`regular`?`Sandbox BashTool, with regular permissions ${h}`:`Sandbox BashTool, with regular permissions`,value:`regular`},{label:m===`disabled`?`No Sandbox ${h}`:`No Sandbox`,value:`disabled`}];async function _(t){switch(t){case`auto-allow`:await x.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!0}),e(`✓ Sandbox enabled with auto-allow for bash commands`);break;case`regular`:await x.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!1}),e(`✓ Sandbox enabled with regular bash permissions`);break;case`disabled`:await x.setSandboxSettings({enabled:!1,autoAllowBashIfSandboxed:!1}),e(`○ Sandbox disabled`);break}}t({"confirm:no":()=>e(void 0,{display:`skip`})},{context:`Settings`});let v=(0,V.jsx)(l,{title:`Mode`,children:(0,V.jsx)(B,{showSocketWarning:p,options:g,onSelect:_,onComplete:e})},`mode`),y=(0,V.jsx)(l,{title:`Overrides`,children:(0,V.jsx)(F,{onComplete:e})},`overrides`),b=(0,V.jsx)(l,{title:`Config`,children:(0,V.jsx)(k,{})},`config`);return(0,V.jsx)(f,{color:`permission`,children:(0,V.jsx)(u,{title:`Sandbox:`,color:`permission`,defaultTab:`Mode`,children:r.errors.length>0?[(0,V.jsx)(l,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:r})},`dependencies`)]:[v,...s?[(0,V.jsx)(l,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:r})},`dependencies`)]:[],y,b]})})}function B({showSocketWarning:e,options:t,onSelect:n,onComplete:s}){let{headerFocused:c,focusHeader:l}=o();return(0,V.jsxs)(r,{flexDirection:`column`,paddingY:1,children:[e&&(0,V.jsx)(r,{marginBottom:1,children:(0,V.jsx)(a,{color:`warning`,children:`Cannot block unix domain sockets (see Dependencies tab)`})}),(0,V.jsx)(r,{marginBottom:1,children:(0,V.jsx)(a,{bold:!0,children:`Configure Mode:`})}),(0,V.jsx)(b,{options:t,onChange:n,onCancel:()=>s(void 0,{display:`skip`}),onUpFromFirstItem:l,isDisabled:c}),(0,V.jsxs)(r,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,V.jsxs)(a,{dimColor:!0,children:[(0,V.jsx)(a,{bold:!0,dimColor:!0,children:`Auto-allow mode:`}),` `,`Commands will try to run in the sandbox automatically, and attempts to run outside of the sandbox fallback to regular permissions. Explicit ask/deny rules are always respected.`]}),(0,V.jsxs)(a,{dimColor:!0,children:[`Learn more: `,(0,V.jsx)(i,{url:`https://code.claude.com/docs/en/sandboxing`,children:`code.claude.com/docs/en/sandboxing`})]})]})]})}var V,H=e((()=>{s(),d(),D(),g(),C(),y(),j(),P(),R(),V=p()}));async function U(e,t,n){let r=S().theme||`light`,i=T();if(!x.isSupportedPlatform()){let t=i===`wsl`?`Error: Sandboxing requires WSL2. WSL1 is not supported.`:`Error: Sandboxing is currently only supported on macOS, Linux, and WSL2.`;return e(c(`error`,r)(t)),null}let a=x.checkDependencies();if(!x.isPlatformInEnabledList())return e(c(`error`,r)(`Error: Sandboxing is disabled for this platform (${i}) via the enabledPlatforms setting.`)),null;if(x.areSandboxSettingsLockedByPolicy())return e(c(`error`,r)(`Error: Sandbox settings are overridden by a higher-priority configuration and cannot be changed locally.`)),null;let o=n?.trim()||``;if(!o)return(0,W.jsx)(z,{onComplete:e,depCheck:a});if(o){let t=o.split(` `)[0];if(t===`exclude`){let t=o.slice(8).trim();if(!t)return e(c(`error`,r)(`Error: Please provide a command pattern to exclude (e.g., /sandbox exclude "npm run test:*")`)),null;let n=t.replace(/^["']|["']$/g,``);v(n);let i=w(`localSettings`),a=i?O(m(),i):`.claude/settings.local.json`;return e(c(`success`,r)(`Added "${n}" to excluded commands in ${a}`)),null}else return e(c(`error`,r)(`Error: Unknown subcommand "${t}". Available subcommand: exclude`)),null}return null}var W;e((()=>{s(),h(),H(),d(),E(),g(),C(),W=p()}))();export{U as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Yc as e,Zc as t}from"./loadAgentsDir-D206qwP3.js";e();export{t as isSearchExtraToolsEnabled};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,P as r,Wt as i,fi as a,t as o,x as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{
|
|
2
|
-
`).filter(e=>e.length>0),
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,P as r,Wt as i,fi as a,t as o,x as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{US as l,WS as u}from"./loadAgentsDir-D206qwP3.js";import{a as d,l as f}from"./debug-BrXObCdR.js";import{u as p}from"./referral-CUaIo_vT.js";import{t as m}from"./lib-BlVGipXx.js";function h({onDone:e}){let t=u(e=>e.remoteSessionUrl),[a,o]=(0,_.useState)(``);if((0,_.useEffect)(()=>{if(!t)return;let e=t;async function n(){let t=await(0,g.toString)(e,{type:`utf8`,errorCorrectionLevel:`L`});o(t)}n().catch(e=>{f(`QR code generation failed`,e)})},[t]),i(`confirm:no`,e,{context:`Confirmation`}),!t)return(0,v.jsxs)(s,{children:[(0,v.jsx)(r,{color:`warning`,children:"Not in remote mode. Start with `claude --remote` to use this command."}),(0,v.jsx)(r,{dimColor:!0,children:`(press esc to close)`})]});let c=a.split(`
|
|
2
|
+
`).filter(e=>e.length>0),l=c.length===0;return(0,v.jsxs)(s,{children:[(0,v.jsx)(n,{marginBottom:1,children:(0,v.jsx)(r,{bold:!0,children:`Remote session`})}),l?(0,v.jsx)(r,{dimColor:!0,children:`Generating QR code…`}):c.map((e,t)=>(0,v.jsx)(r,{children:e},t)),(0,v.jsxs)(n,{marginTop:1,children:[(0,v.jsx)(r,{dimColor:!0,children:`Open in browser: `}),(0,v.jsx)(r,{color:`ide`,children:t})]}),(0,v.jsx)(n,{marginTop:1,children:(0,v.jsx)(r,{dimColor:!0,children:`(press esc to close)`})})]})}var g,_,v,y;e((()=>{g=m(),a(),_=t(a(),1),o(),p(),l(),d(),v=c(),y=async e=>(0,v.jsx)(h,{onDone:e})}))();export{y as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,l as t}from"./debug-BrXObCdR.js";e();async function n(){let{fetchCodeSessionsFromSessionsAPI:e}=await import(`./api-
|
|
1
|
+
import{a as e,l as t}from"./debug-BrXObCdR.js";e();async function n(){let{fetchCodeSessionsFromSessionsAPI:e}=await import(`./api-BsFW57_Q.js`),n;try{n=await e()}catch(e){throw t(`[assistant:discovery] fetchCodeSessionsFromSessionsAPI failed: ${e}`),e}return n.filter(e=>e.status===`idle`||e.status===`working`||e.status===`waiting`).map(e=>({id:e.id,title:e.title||`Untitled`,status:e.status,created_at:e.created_at??``}))}export{n as discoverAssistantSessions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{xu as e,yu as t}from"./loadAgentsDir-D206qwP3.js";t();export{e as registerSessionFileAccessHooks};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{B as r,en as i}from"./state-ix0xIunV.js";import{Al as a,Bc as o,DE as s,Dl as c,EE as l,El as u,Fn as d,In as f,Ln as ee,Lo as p,ME as te,Ml as m,NE as ne,So as h,Vc as re,Xw as g,Yw as _,ZT as ie,_E as v,bE as ae,cl as oe,dE as se,fE as ce,fl as y,gE as b,hE as le,jE as ue,kE as x,lE as de,lt as S,mE as C,ml as w,pE as T,pl as E,sE as D,sl as O,ut as k,vE as A,xE as j,yE as M,zo as N}from"./loadAgentsDir-D206qwP3.js";import{F as P,I as F,d as I,p as L,z as R}from"./debug-BrXObCdR.js";import{_n as z,gn as B}from"./settings-BovzmwMP.js";import{n as V,r as H}from"./analytics-BotDBGh0.js";import{mi as fe,pi as pe}from"./model-CKkOnnnx.js";import{fn as U,hn as me}from"./prompt-BNHtszmZ.js";import{st as he}from"./rcDebugLog-CUy1_F23.js";import{writeFile as W}from"fs/promises";function ge(){return!1}function _e(){return{}}function ve(e,t){let n=0,r=t==null;for(let i of e){if(!r){i.uuid===t&&(r=!0);continue}if(i.type===`assistant`){let e=i.message.content;Array.isArray(e)&&(n+=B(e,e=>e.type===`tool_use`))}}return n}function G(e){let t=x(e);if(!le()){if(!ce(t))return!1;A()}let n=T(t),r=ve(e,X)>=se(),i=p(e);if(n&&r||n&&!i){let t=e[e.length-1];return t?.uuid&&(X=t.uuid),!0}return!1}async function K(e){let t=I(),n=d();await t.mkdir(n,{mode:448});let r=f();try{await W(r,``,{encoding:`utf-8`,mode:384,flag:`wx`}),await W(r,await w(),{encoding:`utf-8`,mode:384})}catch(e){if(F(e)!==`EEXIST`)throw e}e.readFileState.delete(r);let i=await o.call({file_path:r},e),a=``,s=i.data;return s.type===`text`&&(a=s.file.content),H(`tengu_session_memory_file_read`,{content_length:a.length}),{memoryPath:r,currentMemory:a}}function ye(){if(r())return;let e=oe();process.env.USER_TYPE===`ant`&&H(`tengu_session_memory_init`,{auto_compact_enabled:e}),e&&g($)}async function q(e,t){if(e.length===0)return{success:!1,error:`No messages to summarize`};v();try{let n=c(t),{memoryPath:r,currentMemory:i}=await K(n),a=await y(i,r),{tools:o,mainLoopModel:s}=t.options,[l,u,d]=await Promise.all([S(o,s),te(),ue()]),f=he(l);return await m({promptMessages:[h({content:a})],cacheSafeParams:{systemPrompt:f,userContext:u,systemContext:d,toolUseContext:n,forkContextMessages:e},canUseTool:J(r),querySource:`session_memory`,forkLabel:`session_memory_manual`,overrides:{readFileState:n.readFileState}}),H(`tengu_session_memory_manual_extraction`,{}),M(x(e)),Y(e),{success:!0,memoryPath:r}}catch(e){return{success:!1,error:P(e)}}finally{b()}}function J(e){return async(t,n)=>{if(t.name===`Edit`&&typeof n==`object`&&n&&`file_path`in n){let t=n.file_path;if(typeof t==`string`&&t===e)return{behavior:`allow`,updatedInput:n}}return{behavior:`deny`,message:`only ${U} on ${e} is allowed`,decisionReason:{type:`other`,reason:`only ${U} on ${e} is allowed`}}}}function Y(e){if(!p(e)){let t=e[e.length-1];t?.uuid&&ae(t.uuid)}}var X,Z,Q,$,be=e((()=>{n(),i(),k(),ne(),me(),re(),z(),a(),L(),_(),N(),ee(),pe(),ie(),s(),V(),O(),E(),C(),R(),Z=t(()=>{let e=_e();j({minimumMessageTokensToInit:e.minimumMessageTokensToInit&&e.minimumMessageTokensToInit>0?e.minimumMessageTokensToInit:D.minimumMessageTokensToInit,minimumTokensBetweenUpdate:e.minimumTokensBetweenUpdate&&e.minimumTokensBetweenUpdate>0?e.minimumTokensBetweenUpdate:D.minimumTokensBetweenUpdate,toolCallsBetweenUpdates:e.toolCallsBetweenUpdates&&e.toolCallsBetweenUpdates>0?e.toolCallsBetweenUpdates:D.toolCallsBetweenUpdates})}),Q=!1,$=fe(async function(e){let{messages:t,toolUseContext:n,querySource:r}=e;if(r!==`repl_main_thread`)return;{let{isPoorModeActive:e}=await import(`./poorMode-V11s-3cf.js`);if(e())return}if(!ge()){process.env.USER_TYPE===`ant`&&!Q&&(Q=!0,H(`tengu_session_memory_gate_disabled`,{}));return}if(Z(),!G(t))return;v();let i=c(n),{memoryPath:a,currentMemory:o}=await K(i);await m({promptMessages:[h({content:await y(o,a)})],cacheSafeParams:u(e),canUseTool:J(a),querySource:`session_memory`,forkLabel:`session_memory`,overrides:{readFileState:i.readFileState}});let s=t[t.length-1],d=s?l(s):void 0,f=de();H(`tengu_session_memory_extraction`,{input_tokens:d?.input_tokens,output_tokens:d?.output_tokens,cache_read_input_tokens:d?.cache_read_input_tokens??void 0,cache_creation_input_tokens:d?.cache_creation_input_tokens??void 0,config_min_message_tokens_to_init:f.minimumMessageTokensToInit,config_min_tokens_between_update:f.minimumTokensBetweenUpdate,config_tool_calls_between_updates:f.toolCallsBetweenUpdates}),M(x(t)),Y(t),b()})}));export{G as a,q as i,ye as n,be as r,J as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t}from"./sessionMemory-BS8_TbKj.js";t();export{e as manuallyExtractSessionMemory};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mE as e,uE as t}from"./loadAgentsDir-D206qwP3.js";e();export{t as getSessionMemoryContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t}from"./sessionObserver-ShbCwJ8x.js";e();export{t as heuristicObserverBackend};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{ZT as t,et as n,tt as r}from"./loadAgentsDir-D206qwP3.js";import{st as i}from"./rcDebugLog-CUy1_F23.js";import{i as a,l as o,r as s,t as c,u as l}from"./instinctParser-Dt-lqnDe.js";function u(e){g.set(e.name,e),_||(_=e.name)}function d(e){if(!g.has(e))throw Error(`Observer backend "${e}" is not registered`);_=e}function f(){let e=_?g.get(_):void 0;if(!e)throw Error(`No observer backend is active — register one before analyzing observations`);return e}async function p(e,t){return Promise.resolve(f().analyze(e,t))}function m(){let e=process.env.SKILL_LEARNING_OBSERVER_BACKEND?.trim();return e&&g.has(e)?e:void 0}function h(){let e=m();return e&&d(e),f()}var g,_,v=e((()=>{g=new Map})),y,b=e((()=>{y=[`workflow`,`testing`,`debugging`,`code-style`,`security`,`git`,`project`]}));async function x(e,t){if(e.length===0)return[];if(Date.now()<L)return S(e,t);let n=e.slice(-30),a=C(n),s=P(o().llm.timeoutMs),c;try{let e=await r({systemPrompt:i([R]),userPrompt:a,signal:s,options:{querySource:`skill_learning_observer`,enablePromptCaching:!0,agents:[],isNonInteractiveSession:!0,hasAppendSystemPrompt:!1,mcpTools:[]}});I=0,c=T(e.message?.content)}catch{return I++,I>=o().llm.failureThreshold&&(L=Date.now()+o().llm.circuitCooldownMs),S(e,t)}let l=E(c,t,n);return l.length===0?(I++,I>=o().llm.failureThreshold&&(L=Date.now()+o().llm.circuitCooldownMs),S(e,t)):l}async function S(e,t){try{let{heuristicObserverBackend:n}=await import(`./sessionObserver-ChfQtK2m.js`),r=n.analyze(e,t);return Array.isArray(r)?r:await r}catch{return[]}}function C(e){return`Observations (chronological, newest last):\n${e.map((e,t)=>ee(e,t)).join(`
|
|
2
2
|
`)}\n\nExtract up to ${F} atomic instincts. JSON array only.`}function ee(e,t){let n=[`#${t+1}`,`event=${e.event}`];return e.toolName&&n.push(`tool=${e.toolName}`),e.outcome&&n.push(`outcome=${e.outcome}`),e.messageText&&n.push(`text=${JSON.stringify(w(e.messageText,200))}`),e.toolInput&&n.push(`in=${JSON.stringify(w(e.toolInput,120))}`),e.toolOutput&&n.push(`out=${JSON.stringify(w(e.toolOutput,120))}`),n.join(` | `)}function w(e,t){return e.length<=t?e:`${e.slice(0,t)}…`}function T(e){if(!Array.isArray(e))return``;let t=[];for(let n of e){if(!n||typeof n!=`object`)continue;let e=n;e.type===`text`&&typeof e.text==`string`&&t.push(e.text)}return t.join(``).trim()}function E(e,t,n){let r=D(e);if(!r)return[];let i;try{i=JSON.parse(r)}catch{return[]}if(!Array.isArray(i))return[];let a=n.map(e=>e.id),o=[];for(let e of i.slice(0,F)){let n=O(e,t,a);n&&o.push(n)}return o}function D(e){if(!e)return;let t=e.indexOf(`[`),n=e.lastIndexOf(`]`);if(!(t<0||n<=t))return e.slice(t,n+1)}function O(e,t,n){if(!e||typeof e!=`object`)return;let r=e,i=k(r.trigger,80),a=k(r.action,120);if(!i||!a)return;let o=N(r.evidence);if(o.length!==0)return{trigger:i,action:a,confidence:A(r.confidence),domain:j(r.domain),source:`session-observation`,scope:M(r.scope),projectId:t?.project?.projectId,projectName:t?.project?.projectName,evidence:o,observationIds:n}}function k(e,t){if(typeof e!=`string`)return;let n=e.trim();if(n)return n.length>t?n.slice(0,t):n}function A(e){return typeof e!=`number`||!Number.isFinite(e)?.5:e<0?0:e>1?1:e}function j(e){return typeof e==`string`&&y.includes(e)?e:`project`}function M(e){return e===`global`?`global`:`project`}function N(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(typeof n!=`string`)continue;let e=n.trim();if(e&&(t.push(e.length>200?`${e.slice(0,200)}…`:e),t.length===3))break}return t}function P(e){return AbortSignal.timeout(e)}var F,I,L,R,z,B=e((()=>{n(),t(),l(),b(),F=3,I=0,L=0,R=`You analyse a short sequence of observations from a coding-assistant session (user messages, tool invocations with outcomes, assistant messages) and extract atomic, reusable "instincts" — behavioural patterns that would help the assistant act correctly in future similar situations.
|
|
3
3
|
|
|
4
4
|
Respond with ONLY a JSON array (no prose, no code fences, no commentary). Each item must match this schema:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Rr as e,jr as t,si as n}from"./loadAgentsDir-D206qwP3.js";t();export{e as linkSessionToPR,n as recordTranscript};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{E as t,M as n,n as r,r as i,t as a}from"./lazySchema-DcIJE_0i.js";import{en as o,z as s}from"./state-ix0xIunV.js";import{To as c,
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{E as t,M as n,n as r,r as i,t as a}from"./lazySchema-DcIJE_0i.js";import{en as o,z as s}from"./state-ix0xIunV.js";import{To as c,ZT as l,et as u,tt as d,zo as f}from"./loadAgentsDir-D206qwP3.js";import{a as p,l as m}from"./debug-BrXObCdR.js";import{s as h,u as g}from"./types-C-MRCL8J.js";import{n as _,r as v}from"./analytics-BotDBGh0.js";import{st as y}from"./rcDebugLog-CUy1_F23.js";function b(e){let t=[];for(let n of e){if(n.type!==`user`&&n.type!==`assistant`||`isMeta`in n&&n.isMeta||`origin`in n&&n.origin&&n.origin.kind!==`human`)continue;let e=n.message.content;if(typeof e==`string`)t.push(e);else if(Array.isArray(e))for(let n of e)`type`in n&&n.type===`text`&&`text`in n&&t.push(n.text)}let n=t.join(`
|
|
2
2
|
`);return n.length>S?n.slice(-1e3):n}async function x(e,t){let n=e.trim();if(!n)return null;try{let e=c((await d({systemPrompt:y([C]),userPrompt:n,outputFormat:{type:`json_schema`,schema:{type:`object`,properties:{title:{type:`string`}},required:[`title`],additionalProperties:!1}},signal:t,options:{querySource:`generate_session_title`,agents:[],isNonInteractiveSession:s(),hasAppendSystemPrompt:!1,mcpTools:[]}})).message.content),r=w().safeParse(g(e)),i=r.success&&r.data.title.trim()||null;return v(`tengu_session_title_generated`,{success:i!==null}),i}catch(e){return m(`generateSessionTitle failed: ${e}`,{level:`error`}),v(`tengu_session_title_generated`,{success:!1}),null}}var S,C,w,T=e((()=>{i(),o(),_(),u(),p(),h(),a(),f(),l(),S=1e3,C=`Generate a concise, sentence-case title (3-7 words) that captures the main topic or goal of this coding session. The title should be clear enough that the user recognizes the session in a list. Use sentence case: capitalize only the first word and proper nouns.
|
|
3
3
|
|
|
4
4
|
Return JSON with a single "title" field.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n}from"./envUtils-DSxRz_kt.js";import{i as r,l as i,n as a}from"./esm-lWlUmoUA.js";import{A as o,en as s,ht as c,lt as l,z as u}from"./state-ix0xIunV.js";import{C as d,S as f,a as p,l as m,w as h,z as ee}from"./debug-BrXObCdR.js";import{f as g,g as te}from"./config-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n}from"./envUtils-DSxRz_kt.js";import{i as r,l as i,n as a}from"./esm-lWlUmoUA.js";import{A as o,en as s,ht as c,lt as l,z as u}from"./state-ix0xIunV.js";import{C as d,S as f,a as p,l as m,w as h,z as ee}from"./debug-BrXObCdR.js";import{f as g,g as te}from"./config-DmomySWC.js";import{i as ne,t as re}from"./hash-Tu-My5Vp.js";import{Bt as ie,jt as ae}from"./model-CKkOnnnx.js";import{et as oe,ft as se,rt as ce,ut as le}from"./esm-D5q6s4l8.js";import"path";import"fs";import{createHash as ue}from"crypto";import"fs/promises";import{AsyncLocalStorage as de}from"async_hooks";function fe(e){let t=BigInt(58),n=Array(v).fill(_[0]),r=v-1,i=e;for(;i>0n;){let e=Number(i%t);n[r]=_[e],i/=t,r--}return n.join(``)}function pe(e){let t=e.replace(/-/g,``);if(t.length!==32)throw Error(`Invalid UUID hex length: ${t.length}`);return BigInt(`0x`+t)}function me(e,t){let n=pe(t);return`${e}_${he}${fe(n)}`}var _,he,v,ge=e((()=>{_=`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`,he=`01`,v=22}));function y(e){let n=_e[e],r=process.env[e];return r===void 0?n:t(r)}function b(){let e=g(),t=c(),n={"user.id":e};y(`OTEL_METRICS_INCLUDE_SESSION_ID`)&&(n[`session.id`]=t),y(`OTEL_METRICS_INCLUDE_VERSION`)&&(n[`app.version`]=`0.0.6`);let r=ae();if(r){let e=r.organizationUuid,t=r.emailAddress,i=r.accountUuid;e&&(n[`organization.id`]=e),t&&(n[`user.email`]=t),i&&y(`OTEL_METRICS_INCLUDE_ACCOUNT_UUID`)&&(n[`user.account_uuid`]=i,n[`user.account_id`]=process.env.CLAUDE_CODE_ACCOUNT_TAGGED_ID||me(`user`,i))}return le.terminal&&(n[`terminal.type`]=le.terminal),n}var _e,x=e((()=>{s(),ie(),te(),se(),n(),ge(),_e={OTEL_METRICS_INCLUDE_SESSION_ID:!0,OTEL_METRICS_INCLUDE_VERSION:!1,OTEL_METRICS_INCLUDE_ACCOUNT_UUID:!0}}));function ve(){return t(process.env.OTEL_LOG_USER_PROMPTS)}function ye(e){return ve()?e:`<REDACTED>`}async function S(e,t={}){let n=o();if(!n){C||(C=!0,m(`[3P telemetry] Event dropped (no event logger initialized): ${e}`,{level:`warn`}));return}let r={...b(),"event.name":e,"event.timestamp":new Date().toISOString(),"event.sequence":be++},i=l();i&&(r[`prompt.id`]=i);let a=process.env.CLAUDE_CODE_WORKSPACE_HOST_PATHS;a&&(r[`workspace.host_paths`]=a.split(`|`));for(let[e,n]of Object.entries(t))n!==void 0&&(r[e]=n);n.emit({body:`claude_code.${e}`,attributes:r})}var be,C,xe=e((()=>{s(),p(),n(),x(),be=0,C=!1}));function Se(e){return Math.abs(re(e))||1}function Ce(e){let t=L.get(e);return t===void 0?(I++,L.set(e,I),I):t}function w(){let e=c(),t=`main`,n=M.get(e);if(n)return n;let r={agentId:e,agentName:t,parentAgentId:void 0,processId:1,threadId:Se(t)};return M.set(e,r),N++,r}function T(){return(Date.now()-P)*1e3}function E(){return`span_${++F}`}function we(){let e=process.env.CLAUDE_CODE_PERFETTO_TRACE;m(`[Perfetto] initializePerfettoTracing called, env value: ${e}`)}function Te(e){O&&(k.push({name:`process_name`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:0,args:{name:e.agentName}}),k.push({name:`thread_name`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:e.threadId,args:{name:e.agentName}}),e.parentAgentId&&k.push({name:`parent_agent`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:0,args:{parent_agent_id:e.parentAgentId}}))}function D(){return O}function Ee(e,t,n){if(!O)return;let r={agentId:e,agentName:t,parentAgentId:n,processId:Ce(e),threadId:Se(t)};M.set(e,r),N++,Te(r)}function De(e){O&&(M.delete(e),L.delete(e))}function Oe(e){if(!O)return``;let t=E(),n=w();return j.set(t,{name:`API Call`,category:`api`,startTime:T(),agentInfo:n,args:{model:e.model,prompt_tokens:e.promptTokens,message_id:e.messageId,is_speculative:e.isSpeculative??!1,query_source:e.querySource}}),A.push({name:`API Call`,cat:`api`,ph:`B`,ts:j.get(t).startTime,pid:n.processId,tid:n.threadId,args:j.get(t).args}),t}function ke(e,t){if(!O||!e)return;let n=j.get(e);if(!n)return;let r=T(),i=r-n.startTime,a=t.promptTokens??n.args.prompt_tokens,o=t.ttftMs,s=t.ttltMs,c=t.outputTokens,l=t.cacheReadTokens,u=o!==void 0&&a!==void 0&&o>0?Math.round(a/(o/1e3)*100)/100:void 0,d=s!==void 0&&o!==void 0?s-o:void 0,f=d!==void 0&&c!==void 0&&d>0?Math.round(c/(d/1e3)*100)/100:void 0,p=l!==void 0&&a!==void 0&&a>0?Math.round(l/a*1e4)/100:void 0,m=t.requestSetupMs,h=t.attemptStartTimes,ee={...n.args,ttft_ms:o,ttlt_ms:s,prompt_tokens:a,output_tokens:c,cache_read_tokens:l,cache_creation_tokens:t.cacheCreationTokens,message_id:t.messageId??n.args.message_id,success:t.success??!0,error:t.error,duration_ms:i/1e3,request_setup_ms:m,itps:u,otps:f,cache_hit_rate_pct:p},g=m!==void 0&&m>0?m*1e3:0;if(g>0){let e=n.startTime+g;if(A.push({name:`Request Setup`,cat:`api,setup`,ph:`B`,ts:n.startTime,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:{request_setup_ms:m,attempt_count:h?.length??1}}),h&&h.length>1){let e=h[0];for(let t=0;t<h.length-1;t++){let r=n.startTime+(h[t]-e)*1e3,i=n.startTime+(h[t+1]-e)*1e3;A.push({name:`Attempt ${t+1} (retry)`,cat:`api,retry`,ph:`B`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:{attempt:t+1}}),A.push({name:`Attempt ${t+1} (retry)`,cat:`api,retry`,ph:`E`,ts:i,pid:n.agentInfo.processId,tid:n.agentInfo.threadId})}}A.push({name:`Request Setup`,cat:`api,setup`,ph:`E`,ts:e,pid:n.agentInfo.processId,tid:n.agentInfo.threadId})}if(o!==void 0){let e=n.startTime+g,t=e+o*1e3;A.push({name:`First Token`,cat:`api,ttft`,ph:`B`,ts:e,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:{ttft_ms:o,prompt_tokens:a,itps:u,cache_hit_rate_pct:p}}),A.push({name:`First Token`,cat:`api,ttft`,ph:`E`,ts:t,pid:n.agentInfo.processId,tid:n.agentInfo.threadId});let r=s===void 0?void 0:s-o-g/1e3;r!==void 0&&r>0&&(A.push({name:`Sampling`,cat:`api,sampling`,ph:`B`,ts:t,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:{sampling_ms:r,output_tokens:c,otps:f}}),A.push({name:`Sampling`,cat:`api,sampling`,ph:`E`,ts:t+r*1e3,pid:n.agentInfo.processId,tid:n.agentInfo.threadId}))}A.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:ee}),j.delete(e)}function Ae(e,t){if(!O)return``;let n=E(),r=w();return j.set(n,{name:`Tool: ${e}`,category:`tool`,startTime:T(),agentInfo:r,args:{tool_name:e,...t}}),A.push({name:`Tool: ${e}`,cat:`tool`,ph:`B`,ts:j.get(n).startTime,pid:r.processId,tid:r.threadId,args:j.get(n).args}),n}function je(e,t){if(!O||!e)return;let n=j.get(e);if(!n)return;let r=T(),i=r-n.startTime,a={...n.args,success:t?.success??!0,error:t?.error,result_tokens:t?.resultTokens,duration_ms:i/1e3};A.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:a}),j.delete(e)}function Me(e){if(!O)return``;let t=E(),n=w();return j.set(t,{name:`Waiting for User Input`,category:`user_input`,startTime:T(),agentInfo:n,args:{context:e}}),A.push({name:`Waiting for User Input`,cat:`user_input`,ph:`B`,ts:j.get(t).startTime,pid:n.processId,tid:n.threadId,args:j.get(t).args}),t}function Ne(e,t){if(!O||!e)return;let n=j.get(e);if(!n)return;let r=T(),i=r-n.startTime,a={...n.args,decision:t?.decision,source:t?.source,duration_ms:i/1e3};A.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:a}),j.delete(e)}function Pe(e){if(!O)return``;let t=E(),n=w();return j.set(t,{name:`Interaction`,category:`interaction`,startTime:T(),agentInfo:n,args:{user_prompt_length:e?.length}}),A.push({name:`Interaction`,cat:`interaction`,ph:`B`,ts:j.get(t).startTime,pid:n.processId,tid:n.threadId,args:j.get(t).args}),t}function Fe(e){if(!O||!e)return;let t=j.get(e);if(!t)return;let n=T(),r=n-t.startTime;A.push({name:t.name,cat:t.category,ph:`E`,ts:n,pid:t.agentInfo.processId,tid:t.agentInfo.threadId,args:{...t.args,duration_ms:r/1e3}}),j.delete(e)}var O,k,A,j,M,N,P,F,I,L,Ie=e((()=>{s(),p(),n(),ee(),ne(),f(),O=!1,k=[],A=[],j=new Map,M=new Map,N=0,P=0,F=0,I=1,L=new Map}));function Le(){H.clear(),U.clear()}function R(){return t(process.env.ENABLE_BETA_TRACING_DETAILED)&&process.env.BETA_TRACING_ENDPOINT&&(process.env.USER_TYPE===`ant`||u())||!1}function z(e,t=Ke){return e.length<=t?{content:e,truncated:!1}:{content:e.slice(0,t)+`
|
|
2
2
|
|
|
3
3
|
[TRUNCATED - Content exceeds 60KB limit]`,truncated:!0}}function B(e){return ue(`sha256`).update(e).digest(`hex`).slice(0,12)}function Re(e){return`sp_${B(e)}`}function ze(e){return`msg_${B(h(e.message.content))}`}function V(e){let t=e.trim().match(qe);return t&&t[1]?t[1].trim():null}function Be(e){let t=[],n=[];for(let r of e){let e=r.message.content;if(typeof e==`string`){let r=V(e);r?n.push(r):t.push(`[USER]\n${e}`)}else if(Array.isArray(e)){for(let r of e)if(r.type===`text`){let e=V(r.text);e?n.push(e):t.push(`[USER]\n${r.text}`)}else if(r.type===`tool_result`){let e=typeof r.content==`string`?r.content:h(r.content),i=V(e);i?n.push(i):t.push(`[TOOL RESULT: ${r.tool_use_id}]\n${e}`)}}}return{contextParts:t,systemReminders:n}}function Ve(e,t){if(!R())return;let{content:n,truncated:r}=z(`[USER PROMPT]\n${t}`);e.setAttributes({new_context:n,...r&&{new_context_truncated:!0,new_context_original_length:t.length}})}function He(e,t,n){if(R()){if(t?.systemPrompt){let n=Re(t.systemPrompt),r=t.systemPrompt.slice(0,500);if(e.setAttribute(`system_prompt_hash`,n),e.setAttribute(`system_prompt_preview`,r),e.setAttribute(`system_prompt_length`,t.systemPrompt.length),!H.has(n)){H.add(n);let{content:e,truncated:r}=z(t.systemPrompt);S(`system_prompt`,{system_prompt_hash:n,system_prompt:e,system_prompt_length:String(t.systemPrompt.length),...r&&{system_prompt_truncated:`true`}})}}if(t?.tools)try{let n=d(t.tools).map(e=>{let t=h(e),n=B(t);return{name:typeof e.name==`string`?e.name:`unknown`,hash:n,json:t}});e.setAttribute(`tools`,h(n.map(({name:e,hash:t})=>({name:e,hash:t})))),e.setAttribute(`tools_count`,n.length);for(let{name:e,hash:t,json:r}of n)if(!H.has(`tool_${t}`)){H.add(`tool_${t}`);let{content:n,truncated:i}=z(r);S(`tool`,{tool_name:ce(e),tool_hash:t,tool:n,...i&&{tool_truncated:`true`}})}}catch{e.setAttribute(`tools_parse_error`,!0)}if(n&&n.length>0&&t?.querySource){let r=t.querySource,i=U.get(r),a=0;if(i)for(let e=0;e<n.length;e++){let t=n[e];if(t&&ze(t)===i){a=e+1;break}}let o=n.slice(a).filter(e=>e.type===`user`);if(o.length>0){let{contextParts:t,systemReminders:i}=Be(o);if(t.length>0){let n=t.join(`
|
|
4
4
|
|