@readmagic/workmate 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (434) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-BSLHrjbt.js → AddWorkspaceDirectory-BgNp7glC.js} +1 -1
  2. package/dist/chunks/{App-DY5O6IKw.js → App-Coboqa8H.js} +1 -1
  3. package/dist/chunks/ApproveApiKey-CQsQdQBC.js +1 -0
  4. package/dist/chunks/{ApproveApiKey-BEzfC6r3.js → ApproveApiKey-CYpBbj0k.js} +1 -1
  5. package/dist/chunks/{AssistantSessionChooser-Ce3PraaD.js → AssistantSessionChooser-DxKsTdqj.js} +1 -1
  6. package/dist/chunks/{BackgroundTasksDialog-Dvhcgahe.js → BackgroundTasksDialog-AiVi-1pI.js} +1 -1
  7. package/dist/chunks/{BypassPermissionsModeDialog-B68V1bCq.js → BypassPermissionsModeDialog-Cx3QGFz-.js} +1 -1
  8. package/dist/chunks/{ClaudeMdExternalIncludesDialog-CTWhpIm8.js → ClaudeMdExternalIncludesDialog-BAK9fxwg.js} +1 -1
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-DUu6iRJk.js +1 -0
  10. package/dist/chunks/ConsoleOAuthFlow-DVTPwR5I.js +1 -0
  11. package/dist/chunks/{DesktopHandoff-BRbU4is4.js → DesktopHandoff-BsHgLlTy.js} +1 -1
  12. package/dist/chunks/{DiffDialog-CBluIK-x.js → DiffDialog-BgTW2Znv.js} +1 -1
  13. package/dist/chunks/{Doctor-WxNv49HC.js → Doctor-BXhz8eUa.js} +1 -1
  14. package/dist/chunks/Doctor-D75dsEyb.js +1 -0
  15. package/dist/chunks/{ExitFlow-CRPgptCN.js → ExitFlow-B1XNACQP.js} +1 -1
  16. package/dist/chunks/{Feedback-CEtzaLr3.js → Feedback-Cvz80lAn.js} +1 -1
  17. package/dist/chunks/Grove-B7hhBvFw.js +1 -0
  18. package/dist/chunks/{Grove--kttLxvs.js → Grove-Dsi4yU08.js} +1 -1
  19. package/dist/chunks/{HybridTransport-BgV5_7Az.js → HybridTransport-8qA64lCx.js} +1 -1
  20. package/dist/chunks/{InvalidConfigDialog-DCGwXW_p.js → InvalidConfigDialog-CAZ1z5WG.js} +1 -1
  21. package/dist/chunks/{InvalidSettingsDialog-jTwsdXWr.js → InvalidSettingsDialog-D82Qk_MR.js} +1 -1
  22. package/dist/chunks/{MCPConnectionManager-BX0LMz9J.js → MCPConnectionManager-BLfKm4H2.js} +1 -1
  23. package/dist/chunks/{McpParsingWarnings-WQrWJeWP.js → McpParsingWarnings-8ZueNqAd.js} +1 -1
  24. package/dist/chunks/{MessageSelector-_UZB8cGb.js → MessageSelector-DmKtBYX9.js} +1 -1
  25. package/dist/chunks/Messages-CaFdI1kk.js +11 -0
  26. package/dist/chunks/{Onboarding-BoIVNCgc.js → Onboarding-CUztnbbv.js} +1 -1
  27. package/dist/chunks/{OverageCreditUpsell-1FCN8bH3.js → OverageCreditUpsell-DSgrZvMv.js} +1 -1
  28. package/dist/chunks/{PluginSettings-BD9JLV9-.js → PluginSettings-0FSNch8O.js} +1 -1
  29. package/dist/chunks/{PromptInputFooterSuggestions-CrGST0Cq.js → PromptInputFooterSuggestions-IaihWay3.js} +1 -1
  30. package/dist/chunks/{PromptInputHelpMenu-B2TDpbpw.js → PromptInputHelpMenu-okS2rQ4k.js} +1 -1
  31. package/dist/chunks/{QueryEngine-D2HUnwmU.js → QueryEngine-WYDWzQuY.js} +1 -1
  32. package/dist/chunks/{REPL-BV4WyYMg.js → REPL-Dto012J0.js} +7 -7
  33. package/dist/chunks/REPL-vV_jzAVx.js +1 -0
  34. package/dist/chunks/{RemoteCallout-DS_EV6Fh.js → RemoteCallout-C_UIYnuT.js} +1 -1
  35. package/dist/chunks/RemoteSessionManager-CuSSHAXN.js +2 -0
  36. package/dist/chunks/{ResumeConversation-Cw3vP4G8.js → ResumeConversation-g_JyOWbl.js} +1 -1
  37. package/dist/chunks/{SSETransport-BXiEBMpb.js → SSETransport-Chj_yfPv.js} +1 -1
  38. package/dist/chunks/SearchExtraToolsTool-Daedym7_.js +1 -0
  39. package/dist/chunks/{Settings-ns6mRsDc.js → Settings-DUXA-qac.js} +2 -2
  40. package/dist/chunks/{TeleportProgress-CcDzMC5L.js → TeleportProgress-DP1a8jit.js} +1 -1
  41. package/dist/chunks/{TeleportRepoMismatchDialog-DZbxl4sD.js → TeleportRepoMismatchDialog-B6sTwXuZ.js} +1 -1
  42. package/dist/chunks/{TeleportResumeWrapper-EowJO5nm.js → TeleportResumeWrapper-CKUuRQSG.js} +1 -1
  43. package/dist/chunks/{ThemePicker-BYbChJpu.js → ThemePicker-Dyq1YVhb.js} +1 -1
  44. package/dist/chunks/{TrustDialog-DA3YTk_k.js → TrustDialog-CdZS9t-T.js} +1 -1
  45. package/dist/chunks/{ValidationErrorsList-Cx-hoRwG.js → ValidationErrorsList-DUNh4BNa.js} +1 -1
  46. package/dist/chunks/WelcomeV2-TPbOXGrO.js +1 -0
  47. package/dist/chunks/{add-dir-CWt69NAZ.js → add-dir-Bf_5tCeR.js} +1 -1
  48. package/dist/chunks/{agentDisplay-CQ4mZWFH.js → agentDisplay-CCeYiAta.js} +1 -1
  49. package/dist/chunks/{agents-D4clhuCl.js → agents-Bt72Gz1v.js} +1 -1
  50. package/dist/chunks/{agents-C6jzKOit.js → agents-T8xHY5Wk.js} +1 -1
  51. package/dist/chunks/{allErrors-HMPqE0jK.js → allErrors-CDWTJcMw.js} +1 -1
  52. package/dist/chunks/{ant-9Z5bppVC.js → ant-DRF-v5bA.js} +1 -1
  53. package/dist/chunks/api-CLLIHLpn.js +1 -0
  54. package/dist/chunks/api-DMpNA1s8.js +1 -0
  55. package/dist/chunks/asciicast-BIr75_x9.js +1 -0
  56. package/dist/chunks/{asciicast-n-BBfgDq.js → asciicast-CQJlNTae.js} +1 -1
  57. package/dist/chunks/{assistant-BA9_Mo9U.js → assistant-C83quuNj.js} +1 -1
  58. package/dist/chunks/{assistant-BiNOSla3.js → assistant-z1ojxEET.js} +1 -1
  59. package/dist/chunks/assistant-z2o4-UJe.js +1 -0
  60. package/dist/chunks/auth-Ce0jllLf.js +1 -0
  61. package/dist/chunks/auth-DV3P8Qup.js +1 -0
  62. package/dist/chunks/{auth-DHyCIxCk.js → auth-DpFfHy1W.js} +1 -1
  63. package/dist/chunks/{autoMode-Db4QrgFr.js → autoMode-DW_H3i37.js} +3 -3
  64. package/dist/chunks/{autonomy-BkAMA7du.js → autonomy-46hnmyAi.js} +1 -1
  65. package/dist/chunks/{autonomy-D4Vy-RPQ.js → autonomy-OxhciwYa.js} +1 -1
  66. package/dist/chunks/{autonomyPanel-EjfO8jvg.js → autonomyPanel-CTEjq0Bd.js} +1 -1
  67. package/dist/chunks/backgroundHousekeeping-BycL9lOe.js +1 -0
  68. package/dist/chunks/{backgroundHousekeeping-hDDE8mJC.js → backgroundHousekeeping-Cpxq4krt.js} +2 -2
  69. package/dist/chunks/{banner-hD6wZygx.js → banner-BVkLvJiB.js} +1 -1
  70. package/dist/chunks/bg-H849G7Sc.js +1 -0
  71. package/dist/chunks/{bg-DQ0Q3Qv-.js → bg-zWGqkcST.js} +2 -2
  72. package/dist/chunks/{branch-CeQ9IyZk.js → branch-DJzijRGm.js} +1 -1
  73. package/dist/chunks/{break-cache-Bd0clV2N.js → break-cache-BQfgkNAo.js} +2 -2
  74. package/dist/chunks/{bridge-yerAiaK2.js → bridge-Dpr2AWpc.js} +2 -2
  75. package/dist/chunks/bridgeConfig-CcANVX0P.js +1 -0
  76. package/dist/chunks/{bridgeConfig-CCtXe8ak.js → bridgeConfig-DDF3teRE.js} +1 -1
  77. package/dist/chunks/bridgeEnabled-Cn-u7P4_.js +1 -0
  78. package/dist/chunks/{bridgeEnabled--F-6TUi4.js → bridgeEnabled-D4JDZd0y.js} +1 -1
  79. package/dist/chunks/{bridgeMain--R1HFbOv.js → bridgeMain-CtgVyLjI.js} +7 -7
  80. package/dist/chunks/bridgeMain-Dh0gWRVo.js +1 -0
  81. package/dist/chunks/{bridgeMessaging-CqbLTDcx.js → bridgeMessaging-CRG6HqUb.js} +1 -1
  82. package/dist/chunks/{bridgePointer-W_jdQ8zf.js → bridgePointer-Cug5fQ3e.js} +1 -1
  83. package/dist/chunks/{browser-Bd7GeBH1.js → browser-BKiu1max.js} +1 -1
  84. package/dist/chunks/{btw-CVGRmL9a.js → btw-DG9CCeq4.js} +1 -1
  85. package/dist/chunks/{caches-BtmAri4e.js → caches-BB5_91gU.js} +2 -2
  86. package/dist/chunks/caches-C3NINY3K.js +1 -0
  87. package/dist/chunks/{ccrClient-HqMi5Kfu.js → ccrClient-CRXGlUCe.js} +1 -1
  88. package/dist/chunks/{claudeDesktop-aUMx06RK.js → claudeDesktop-9xfIgkzE.js} +1 -1
  89. package/dist/chunks/{clear-C6nRzIQE.js → clear-ueMvDelv.js} +1 -1
  90. package/dist/chunks/{cliLaunch-2AUoMnqx.js → cliLaunch-BJ9o-rIV.js} +1 -1
  91. package/dist/chunks/client-AnWHs0gW.js +1 -0
  92. package/dist/chunks/{color-DXI_4ibU.js → color-B0-MIfsq.js} +1 -1
  93. package/dist/chunks/commands-DsKH3ogN.js +1 -0
  94. package/dist/chunks/commitAttribution-D7NrwLhc.js +1 -0
  95. package/dist/chunks/{commitAttribution-Cm40fdNU.js → commitAttribution-DKun9CeU.js} +1 -1
  96. package/dist/chunks/{compact-DPTVpJ4D.js → compact-BhWCO-oD.js} +1 -1
  97. package/dist/chunks/completionCache-C9zlWBRz.js +1 -0
  98. package/dist/chunks/{completionCache-BQaLkB4d.js → completionCache-CdHCuiqq.js} +2 -2
  99. package/dist/chunks/{config-C7YHKCPV.js → config-662VDD70.js} +1 -1
  100. package/dist/chunks/config-CUN8YbOa.js +1 -0
  101. package/dist/chunks/{config-CLmFk-5V.js → config-DklnhNx1.js} +1 -1
  102. package/dist/chunks/config-Wk3svGdH.js +1 -0
  103. package/dist/chunks/{context-C_cKrBUn.js → context-DBswG0EY.js} +1 -1
  104. package/dist/chunks/context-noninteractive-C3dICmA9.js +1 -0
  105. package/dist/chunks/{context-noninteractive-DnH6Q9Lu.js → context-noninteractive-CTvyNimw.js} +1 -1
  106. package/dist/chunks/{conversation-GJxfkr6M.js → conversation-CooSju3g.js} +1 -1
  107. package/dist/chunks/conversation-DLLIOKYV.js +1 -0
  108. package/dist/chunks/{createSSHSession--bWmmIk9.js → createSSHSession-BdO35H6o.js} +1 -1
  109. package/dist/chunks/{createSession-DIr4sUp6.js → createSession-Br1g8qSD.js} +1 -1
  110. package/dist/chunks/createSession-CVG8SiEm.js +1 -0
  111. package/dist/chunks/{crossProjectResume-DKrtjTpm.js → crossProjectResume-DiKJb83I.js} +1 -1
  112. package/dist/chunks/cwd--nvsx73T.js +1 -0
  113. package/dist/chunks/{cwd-BuJhkTrc.js → cwd-CYmmnQVS.js} +1 -1
  114. package/dist/chunks/{daemon-B9lBPdBJ.js → daemon-BQiSFjc-.js} +1 -1
  115. package/dist/chunks/{datadog-DNCsyfSO.js → datadog-BE6D_6m0.js} +1 -1
  116. package/dist/chunks/datadog-C69i7cfI.js +1 -0
  117. package/dist/chunks/debug-8kgDrUfj.js +1 -0
  118. package/dist/chunks/{debug-IKW-jE7K.js → debug-DiuXEmUq.js} +1 -1
  119. package/dist/chunks/{debugUtils-D2981c0Z.js → debugUtils-3YYWvb3H.js} +1 -1
  120. package/dist/chunks/{desktop-B5cvrcOQ.js → desktop-W7SA8BFk.js} +1 -1
  121. package/dist/chunks/{detached-rfIUyc-B.js → detached-Cv9gAylK.js} +1 -1
  122. package/dist/chunks/{detectRepository-ReZ0Fz8Z.js → detectRepository-B1PMTLAU.js} +1 -1
  123. package/dist/chunks/detectRepository-_Kj817Vi.js +1 -0
  124. package/dist/chunks/{diff-cXAp9cNN.js → diff-CMtRjFUb.js} +1 -1
  125. package/dist/chunks/{directoryCompletion-DBM2o5kx.js → directoryCompletion-CeV63gvu.js} +1 -1
  126. package/dist/chunks/doctor-DEz8BHAz.js +1 -0
  127. package/dist/chunks/{effort-Br8KKHdx.js → effort-BAlVDBHq.js} +1 -1
  128. package/dist/chunks/{entry-4lIRMrLI.js → entry-DLqeVq5C.js} +2 -2
  129. package/dist/chunks/envLessBridgeConfig-3kCrKZl7.js +1 -0
  130. package/dist/chunks/envLessBridgeConfig-BfgXw47_.js +1 -0
  131. package/dist/chunks/{execFileNoThrow-COKYqVQj.js → execFileNoThrow-DResQRvR.js} +1 -1
  132. package/dist/chunks/{execSyncWrapper-DZJ3tNWF.js → execSyncWrapper-CWxMek26.js} +1 -1
  133. package/dist/chunks/{exit-Z9oWrqE4.js → exit-cyepwuyy.js} +1 -1
  134. package/dist/chunks/extra-usage-DlFeNGQD.js +1 -0
  135. package/dist/chunks/{extra-usage-core-CdL1ltqq.js → extra-usage-core-Dh4rVUI-.js} +1 -1
  136. package/dist/chunks/{extra-usage-DtAIhW74.js → extra-usage-nRFfBiXh.js} +1 -1
  137. package/dist/chunks/{extra-usage-noninteractive-DxxRI0Yx.js → extra-usage-noninteractive-D4Ya5KPm.js} +1 -1
  138. package/dist/chunks/{extraUsage-BYZdi44Y.js → extraUsage-DtWi8E78.js} +1 -1
  139. package/dist/chunks/extractMemories-BqN8fWZ5.js +1 -0
  140. package/dist/chunks/{fast-DKqiojzf.js → fast-DkUxqWhE.js} +1 -1
  141. package/dist/chunks/fast-NvqW2-t1.js +1 -0
  142. package/dist/chunks/{feedback-yB19xph5.js → feedback-Cn7Sbqxa.js} +1 -1
  143. package/dist/chunks/{file-D1cN3LMK.js → file-BZriE-XU.js} +1 -1
  144. package/dist/chunks/{files-DAzGtmzz.js → files-Cz1-PK3r.js} +1 -1
  145. package/dist/chunks/firstPartyEventLogger-AhXYSrkP.js +1 -0
  146. package/dist/chunks/{firstPartyEventLogger-hU-LPkje.js → firstPartyEventLogger-BQYrBdvD.js} +2 -2
  147. package/dist/chunks/{flushGate-ZFr8yv7F.js → flushGate-ebqQZF1t.js} +1 -1
  148. package/dist/chunks/{gemini-DqAv8_GY.js → gemini-Sr_00TsL.js} +1 -1
  149. package/dist/chunks/{generateRecap-lO2PDlx8.js → generateRecap-5d4l_ODy.js} +1 -1
  150. package/dist/chunks/{generateSessionName-48veu5dv.js → generateSessionName-DEAw5x_h.js} +1 -1
  151. package/dist/chunks/{genericProcessUtils-F1Qcb1sO.js → genericProcessUtils-DO7Fy0RJ.js} +1 -1
  152. package/dist/chunks/git-Cc1jAz6r.js +1 -0
  153. package/dist/chunks/{git-tyaWOgRL.js → git-Cgc8X5l2.js} +2 -2
  154. package/dist/chunks/{githubRepoPathMapping-BlR0BphY.js → githubRepoPathMapping-Tt-LdYFZ.js} +1 -1
  155. package/dist/chunks/{goal-Bn8Kz2Dp.js → goal-DCaI1NPN.js} +1 -1
  156. package/dist/chunks/{grok-DhnO_KDC.js → grok-CKlngG3b.js} +1 -1
  157. package/dist/chunks/{grove-DotW04-v.js → grove-DSWe6psK.js} +1 -1
  158. package/dist/chunks/{heapdump-DkZSKNbp.js → heapdump-OVbV05On.js} +1 -1
  159. package/dist/chunks/{help-DU_BcZtU.js → help-CRtX5VX9.js} +1 -1
  160. package/dist/chunks/hooks-DvtnNoYE.js +1 -0
  161. package/dist/chunks/{hooks-BTMWE5Qx.js → hooks-tpf90xd5.js} +1 -1
  162. package/dist/chunks/{hostGuard-Dh296c6q.js → hostGuard-t7QfbijF.js} +1 -1
  163. package/dist/chunks/{inboundAttachments-DVs3_m48.js → inboundAttachments-BZ6MKpxd.js} +1 -1
  164. package/dist/chunks/inboundAttachments-D5Ux2kCl.js +1 -0
  165. package/dist/chunks/{initReplBridge-D0Xec8S-.js → initReplBridge-CjuO6in6.js} +1 -1
  166. package/dist/chunks/{install-BkfXeXpv.js → install-DqpM2brU.js} +1 -1
  167. package/dist/chunks/{instrumentation-H0XRS1yG.js → instrumentation--Sx0y1Gk.js} +3 -3
  168. package/dist/chunks/{job-DKtLkF8V.js → job-D7B35Usp.js} +1 -1
  169. package/dist/chunks/{jwtUtils-C-ojmb8W.js → jwtUtils-CqXPjf-a.js} +1 -1
  170. package/dist/chunks/{keybindings-ez51eHHp.js → keybindings-JvAmBpLt.js} +1 -1
  171. package/dist/chunks/{language-BuRSO2sR.js → language-8Rnu_qxl.js} +1 -1
  172. package/dist/chunks/language-DaxZe0Xw.js +1 -0
  173. package/dist/chunks/{launchAgentsPlatform-BQyPdrHp.js → launchAgentsPlatform-CNPkOVzu.js} +1 -1
  174. package/dist/chunks/{launchLocalMemory-CWHAj7CX.js → launchLocalMemory-BxmDhENs.js} +1 -1
  175. package/dist/chunks/{launchLocalVault-D8iJdtsP.js → launchLocalVault-DQlTGA-g.js} +1 -1
  176. package/dist/chunks/{launchMemoryStores-W7jWG2uH.js → launchMemoryStores-EYAwxI8i.js} +1 -1
  177. package/dist/chunks/{launchOnboarding-q__LaLy1.js → launchOnboarding-CTu5Zf4E.js} +1 -1
  178. package/dist/chunks/{launchSchedule-BWi9F5vh.js → launchSchedule-CeHHSvO7.js} +1 -1
  179. package/dist/chunks/{launchSkillStore-4wd4MQBc.js → launchSkillStore-Bqh2Fru2.js} +1 -1
  180. package/dist/chunks/{launchTeleport-BlCf2QM_.js → launchTeleport-Crc3XVZX.js} +1 -1
  181. package/dist/chunks/{launchVault-C7u7LZV7.js → launchVault-BHLgpth_.js} +1 -1
  182. package/dist/chunks/loadAgentsDir-D7npVvsj.js +1 -0
  183. package/dist/chunks/{loadAgentsDir-nzr38hai.js → loadAgentsDir-ZQwvbURI.js} +66 -66
  184. package/dist/chunks/{loadPluginHooks-z1-zvBLw.js → loadPluginHooks-CaKvZVZI.js} +1 -1
  185. package/dist/chunks/localSearch-BU5oulbF.js +1 -0
  186. package/dist/chunks/{localSearch-B-L_ldos.js → localSearch-H0LchlTi.js} +1 -1
  187. package/dist/chunks/{log-B3eB4EFv.js → log-Duzb4o6h.js} +1 -1
  188. package/dist/chunks/{logoV2Utils-RQ160dI2.js → logoV2Utils-5lcUu53m.js} +1 -1
  189. package/dist/chunks/{magicDocs-BqZ0GewA.js → magicDocs-D1FIPmYg.js} +1 -1
  190. package/dist/chunks/main-B8XtFN2P.js +859 -0
  191. package/dist/chunks/{main-DeFMhaFE.js → main-CR7cXdgy.js} +3 -3
  192. package/dist/chunks/{mappers-CWykjGfP.js → mappers-DKU4RgE3.js} +1 -1
  193. package/dist/chunks/{mcp-DBwT4pa9.js → mcp-B06Mqsur.js} +4 -4
  194. package/dist/chunks/{mcp-DvZTaHZE.js → mcp-C0AjA07u.js} +1 -1
  195. package/dist/chunks/{mcp-CSFPAfaW.js → mcp-ghioDl7W.js} +1 -1
  196. package/dist/chunks/{memoize-BO31Ws9Q.js → memoize-DgMjqLtn.js} +1 -1
  197. package/dist/chunks/{memory-DcpPpYN0.js → memory-D-Q62bJ7.js} +1 -1
  198. package/dist/chunks/{metadata-BRLJvh61.js → metadata-CIx5CsoY.js} +1 -1
  199. package/dist/chunks/{mode-BkViT_0o.js → mode-DFZgqKBd.js} +1 -1
  200. package/dist/chunks/{model-DfFA3qMO.js → model-BgrLt7P7.js} +1 -1
  201. package/dist/chunks/model-aVc5c3Lz.js +1 -0
  202. package/dist/chunks/{model-CZktWw6o.js → model-fDWtIRVr.js} +1 -1
  203. package/dist/chunks/{nativeInstaller-GcIk7G2Y.js → nativeInstaller-DKe1pWoL.js} +1 -1
  204. package/dist/chunks/{onChangeAppState-DwGVi-BC.js → onChangeAppState-DaQ0R9Tw.js} +1 -1
  205. package/dist/chunks/{openai-B2wxZDQx.js → openai-DNS0-ivj.js} +1 -1
  206. package/dist/chunks/{overageCreditGrant-CjK49axw.js → overageCreditGrant-qHN3tnp2.js} +1 -1
  207. package/dist/chunks/{panel-R4ue6pSW.js → panel-Be-OxtqL.js} +1 -1
  208. package/dist/chunks/{panel-B-nrcHpm.js → panel-CrTPqXCv.js} +1 -1
  209. package/dist/chunks/{panelCall-I_fbgub5.js → panelCall-BvKpHquo.js} +1 -1
  210. package/dist/chunks/parser-Bj3gOqFv.js +1 -0
  211. package/dist/chunks/{parser-CQrasoUB.js → parser-TYEkLFgh.js} +1 -1
  212. package/dist/chunks/{partition-CxRF7T-f.js → partition-Cv11dD5P.js} +1 -1
  213. package/dist/chunks/{passes-U_h-hNu-.js → passes-DQdM2Ssq.js} +1 -1
  214. package/dist/chunks/{path-BCSE0S-c.js → path-Cu_AKqg6.js} +1 -1
  215. package/dist/chunks/{permissions-B8epy16o.js → permissions-DB_2mmCl.js} +1 -1
  216. package/dist/chunks/{pidLock-CBJDnBG_.js → pidLock-DchmaAK6.js} +2 -2
  217. package/dist/chunks/{pipeTransport-D3Qx9v1V.js → pipeTransport-7GIO6GCA.js} +1 -1
  218. package/dist/chunks/{plan-BAhStVci.js → plan-D8dQDl8W.js} +1 -1
  219. package/dist/chunks/{platform-EtecGacO.js → platform-B5dCGT8t.js} +1 -1
  220. package/dist/chunks/{plugin-D9huNnv6.js → plugin-w8MqsKHn.js} +1 -1
  221. package/dist/chunks/{pluginAutoupdate-BfmyxR5g.js → pluginAutoupdate-7FFHzSRz.js} +1 -1
  222. package/dist/chunks/{pluginBlocklist-03sZaZa6.js → pluginBlocklist-Cw_l-yal.js} +1 -1
  223. package/dist/chunks/{pluginCliCommands-P2Ndi1r1.js → pluginCliCommands-BtYWRxhS.js} +1 -1
  224. package/dist/chunks/{pluginFlagging-BVy7Xv_0.js → pluginFlagging-_WUQP3Lq.js} +1 -1
  225. package/dist/chunks/{pluginOperations-Cz37qcjF.js → pluginOperations-BOkST1qE.js} +1 -1
  226. package/dist/chunks/{pluginStartupCheck-w24D-wwk.js → pluginStartupCheck-BelpzwZI.js} +1 -1
  227. package/dist/chunks/pluginStartupCheck-XBLJZZys.js +1 -0
  228. package/dist/chunks/{plugins-B0hiIN4q.js → plugins-6px6K1fh.js} +1 -1
  229. package/dist/chunks/policyLimits-C07tQ0Wr.js +1 -0
  230. package/dist/chunks/{poor-CfbMKZNJ.js → poor-D3T_8wwf.js} +1 -1
  231. package/dist/chunks/poorMode-BdBDiOFD.js +1 -0
  232. package/dist/chunks/{poorMode-Bsw2V-V_.js → poorMode-BqyVuBu-.js} +1 -1
  233. package/dist/chunks/{print-ozjC0Mhg.js → print-DcQSuK0v.js} +4 -4
  234. package/dist/chunks/{privacy-settings-DeGoBRrZ.js → privacy-settings-D5zxu4Aa.js} +1 -1
  235. package/dist/chunks/{processBashCommand-loWZ8MSE.js → processBashCommand-CEqA4QZi.js} +1 -1
  236. package/dist/chunks/{processSlashCommand-BdouajZb.js → processSlashCommand-DMpFk59M.js} +1 -1
  237. package/dist/chunks/prompt-CKvoqUC3.js +1 -0
  238. package/dist/chunks/prompt-aXZPR3q8.js +1 -0
  239. package/dist/chunks/{prompt-Bef63FhB.js → prompt-wys9CwDo.js} +1 -1
  240. package/dist/chunks/{promptEditor-foiayhdY.js → promptEditor-D6HzjcMS.js} +1 -1
  241. package/dist/chunks/{protocolHandler-BsiB1oW_.js → protocolHandler-BXlx1N7v.js} +1 -1
  242. package/dist/chunks/{proxy-Cn2YwITp.js → proxy-CHnxhNZI.js} +1 -1
  243. package/dist/chunks/{rate-limit-options-DTJPDcTr.js → rate-limit-options-1hc-RyNR.js} +1 -1
  244. package/dist/chunks/{rcDebugLog-BUuD-X1D.js → rcDebugLog-CivJaJ3V.js} +1 -1
  245. package/dist/chunks/{reconciler-DqXTmV3J.js → reconciler-BKX4jh34.js} +1 -1
  246. package/dist/chunks/{referral-DP_GshTS.js → referral-Cu9bEOFE.js} +1 -1
  247. package/dist/chunks/{refresh-CNzXPAFw.js → refresh-vJbxW4a1.js} +1 -1
  248. package/dist/chunks/{registerProtocol-CjxlFsKw.js → registerProtocol-B_XbLDQO.js} +3 -3
  249. package/dist/chunks/{release-notes-BxgK8zWO.js → release-notes-CavWoMQR.js} +1 -1
  250. package/dist/chunks/{releaseNotes-CbSktIJW.js → releaseNotes-Di6OaHF7.js} +2 -2
  251. package/dist/chunks/{reload-plugins-CDu6yU5-.js → reload-plugins-ofeLn07p.js} +1 -1
  252. package/dist/chunks/{remote-env-B4HnhISc.js → remote-env-dXzHAuD6.js} +1 -1
  253. package/dist/chunks/{remoteBridgeCore-D-wG5jau.js → remoteBridgeCore-CmwkjiTK.js} +1 -1
  254. package/dist/chunks/{remoteManagedSettings-B7gt0VAX.js → remoteManagedSettings-Co-CxR67.js} +1 -1
  255. package/dist/chunks/{rename-DlbMb24l.js → rename-CtjP0lop.js} +1 -1
  256. package/dist/chunks/{renderOptions-5kWQpVr2.js → renderOptions-DOXmueQV.js} +1 -1
  257. package/dist/chunks/{resume-BB5iBogS.js → resume-C5h5JvY1.js} +1 -1
  258. package/dist/chunks/{ripgrep-BvDwiKJ3.js → ripgrep-BN_g-F7X.js} +1 -1
  259. package/dist/chunks/ripgrep-hOjrgpMp.js +1 -0
  260. package/dist/chunks/{runtimeObserver-Ci-5gvYg.js → runtimeObserver-B93v1AxE.js} +2 -2
  261. package/dist/chunks/{runtimeObserver-BNH2WGE3.js → runtimeObserver-DOZFrqJu.js} +1 -1
  262. package/dist/chunks/sandbox-adapter-CO5GuywY.js +1 -0
  263. package/dist/chunks/{sandbox-toggle-B2Yk4y2V.js → sandbox-toggle-TiLGFwaZ.js} +1 -1
  264. package/dist/chunks/searchExtraTools-CXZJU2Kv.js +1 -0
  265. package/dist/chunks/{session-Bmx7L3Mt.js → session-v9tKHhU9.js} +1 -1
  266. package/dist/chunks/{sessionDiscovery-DcEAr5vJ.js → sessionDiscovery-4byQKOnc.js} +1 -1
  267. package/dist/chunks/sessionFileAccessHooks-BUyIQVzL.js +1 -0
  268. package/dist/chunks/sessionMemory-ZsxCLHYd.js +1 -0
  269. package/dist/chunks/{sessionMemory-Bsg2unYX.js → sessionMemory-e6YpTUhW.js} +1 -1
  270. package/dist/chunks/sessionMemoryUtils-BD_dqyYB.js +1 -0
  271. package/dist/chunks/sessionObserver-DNItJztR.js +1 -0
  272. package/dist/chunks/{sessionObserver-DQwHsDrM.js → sessionObserver-OgY9BUP4.js} +1 -1
  273. package/dist/chunks/sessionStorage-xvxpRETp.js +1 -0
  274. package/dist/chunks/{sessionTitle-B8jcexkQ.js → sessionTitle-Bph6GO4F.js} +1 -1
  275. package/dist/chunks/{sessionTracing-BuLsL6qA.js → sessionTracing-BBxhPccY.js} +1 -1
  276. package/dist/chunks/{settings-5PQdphqC.js → settings-BhvhCpVh.js} +2 -2
  277. package/dist/chunks/settingsSync-D2B5K4BT.js +1 -0
  278. package/dist/chunks/{setup-BKEnSLR9.js → setup-CEnNEK6Z.js} +2 -2
  279. package/dist/chunks/{shadowedRuleDetection-7Z8ezTKF.js → shadowedRuleDetection-DDSOFi1W.js} +1 -1
  280. package/dist/chunks/{shellQuote-fB02N16J.js → shellQuote-yXoC_y5m.js} +1 -1
  281. package/dist/chunks/{sideQuestion-CYdNATPW.js → sideQuestion-CAiA6jAf.js} +1 -1
  282. package/dist/chunks/sink-CyKOf5TT.js +1 -0
  283. package/dist/chunks/{sink-DjKoYMsA.js → sink-DxPJ4khU.js} +1 -1
  284. package/dist/chunks/{sinks-GryGVRT8.js → sinks-BNo3DvxO.js} +2 -2
  285. package/dist/chunks/sinks-CHgtwDha.js +1 -0
  286. package/dist/chunks/{skill-learning-E8tQed-Q.js → skill-learning-Dx1o4mMo.js} +1 -1
  287. package/dist/chunks/{skillChangeDetector-A8SAuyo9.js → skillChangeDetector-BRBCwQ2w.js} +1 -1
  288. package/dist/chunks/{skillGapStore-B5rl12bV.js → skillGapStore-BV_6qzxU.js} +1 -1
  289. package/dist/chunks/{skillGapStore-CjJrxxjk.js → skillGapStore-Zvqiyxds.js} +2 -2
  290. package/dist/chunks/{skillGenerator-BDR_z3-X.js → skillGenerator-jJQDphQ8.js} +2 -2
  291. package/dist/chunks/skillLearning-BH7EAU1m.js +1 -0
  292. package/dist/chunks/{skillLearning-BQtfFE0g.js → skillLearning-BTT3_yGc.js} +1 -1
  293. package/dist/chunks/{skillPanel-yR8Oi-mO.js → skillPanel-OW2M6SZr.js} +3 -3
  294. package/dist/chunks/{skillSearchPanel-DUQQUCUS.js → skillSearchPanel-C0Y56c5N.js} +4 -4
  295. package/dist/chunks/{skills-NAZQ3j-t.js → skills-BFsyLP33.js} +1 -1
  296. package/dist/chunks/{startupProfiler-DxRQteII.js → startupProfiler-BquH_Yqm.js} +1 -1
  297. package/dist/chunks/startupProfiler-CYCH-qos.js +1 -0
  298. package/dist/chunks/state-BOa-3Av3.js +1 -0
  299. package/dist/chunks/{state-4KQ3kaqz.js → state-ix0xIunV.js} +1 -1
  300. package/dist/chunks/{stats-h4yu84Q-.js → stats-CrPmPT8f.js} +1 -1
  301. package/dist/chunks/{status-BbdeubJG.js → status-BO5J2MAe.js} +1 -1
  302. package/dist/chunks/{status-is_Bg_IB.js → status-DHJbK4pV.js} +1 -1
  303. package/dist/chunks/{statusNoticeHelpers-CQ7CUugR.js → statusNoticeHelpers-CqeUBySi.js} +1 -1
  304. package/dist/chunks/{stickers-qJoNhPk4.js → stickers-BLFmyHZV.js} +1 -1
  305. package/dist/chunks/{stringUtils-CvXbHQRH.js → stringUtils-D_g2L6A4.js} +1 -1
  306. package/dist/chunks/systemPromptSections-CR_AoPIX.js +1 -0
  307. package/dist/chunks/{systemPromptSections-CgpggIYX.js → systemPromptSections-DN0HGVye.js} +1 -1
  308. package/dist/chunks/{tag-i3HZ4lhj.js → tag-M2AEtXjW.js} +1 -1
  309. package/dist/chunks/{tasks-HzsYNTZ1.js → tasks-CoOs_Qkj.js} +1 -1
  310. package/dist/chunks/{teleport-hN3cAbYC.js → teleport-DjIgQeBB.js} +1 -1
  311. package/dist/chunks/{templateJobs-CIv_ysje.js → templateJobs-Cl50Qw0s.js} +1 -1
  312. package/dist/chunks/{terminalSetup-CxniwSF-.js → terminalSetup-Bdh9K31U.js} +1 -1
  313. package/dist/chunks/{terminalSetup-C0PF87iu.js → terminalSetup-nvS3KCDG.js} +1 -1
  314. package/dist/chunks/{theme-BKIHX_Dx.js → theme-DgCIr0jU.js} +1 -1
  315. package/dist/chunks/thinkback-BSv_fvbV.js +1 -0
  316. package/dist/chunks/{thinkback-mT-8FIT-.js → thinkback-ERCQ86CR.js} +1 -1
  317. package/dist/chunks/{thinkback-play-Cfk49mvF.js → thinkback-play-DNB0IWYt.js} +1 -1
  318. package/dist/chunks/{tmux-CbsW-VDJ.js → tmux-ZZk68JBq.js} +1 -1
  319. package/dist/chunks/{toolEventObserver-8FQtxeVv.js → toolEventObserver-9-5Ne25Z.js} +1 -1
  320. package/dist/chunks/{toolEventObserver-B1xvyKdE.js → toolEventObserver-9XCQXiMx.js} +1 -1
  321. package/dist/chunks/{toolPool-CHVDZqh7.js → toolPool-uQKZRMKg.js} +1 -1
  322. package/dist/chunks/trustedDevice-0ej6e3nx.js +1 -0
  323. package/dist/chunks/{trustedDevice-BYCh1ff7.js → trustedDevice-nqhuw4tp.js} +1 -1
  324. package/dist/chunks/{tui-fTa_pzdA.js → tui-C2yuCuOU.js} +3 -3
  325. package/dist/chunks/{types-a7X-tJpJ.js → types-Cnorfsss.js} +1 -1
  326. package/dist/chunks/{udsClient-Cg9bBD0p.js → udsClient-CiFj4M_h.js} +1 -1
  327. package/dist/chunks/{ultrareviewCommand-DCFRZsKp.js → ultrareviewCommand-BMBHepdu.js} +1 -1
  328. package/dist/chunks/undercover-6UUO38fQ.js +1 -0
  329. package/dist/chunks/{undercover-CsLPQb-a.js → undercover-DDgIKbO5.js} +3 -3
  330. package/dist/chunks/{up-dO5BcPaq.js → up-D6bNw_tT.js} +1 -1
  331. package/dist/chunks/{updateCCB-CfUnkOLT.js → updateCCB-B-OlpLjA.js} +1 -1
  332. package/dist/chunks/{upgrade-kpttjebY.js → upgrade-BN20nsCH.js} +1 -1
  333. package/dist/chunks/upgrade-DYqlCH80.js +1 -0
  334. package/dist/chunks/{upload-DDhQqV8n.js → upload-BQGByiXE.js} +1 -1
  335. package/dist/chunks/{upstreamproxy-CvcjNY7J.js → upstreamproxy-os5rw0Vg.js} +1 -1
  336. package/dist/chunks/{usage-CJ5w0907.js → usage-D_sqm8us.js} +1 -1
  337. package/dist/chunks/usage-DolSCKGi.js +1 -0
  338. package/dist/chunks/{useExitOnCtrlCDWithKeybindings-yAroCqu4.js → useExitOnCtrlCDWithKeybindings-vzUoPY51.js} +1 -1
  339. package/dist/chunks/useMainLoopModel-cZd8EKo5.js +1 -0
  340. package/dist/chunks/{useManagePlugins-CTtPaQRP.js → useManagePlugins-DgGZBvXV.js} +1 -1
  341. package/dist/chunks/{useMergedTools-CZJffsmf.js → useMergedTools-Bb4XbC9d.js} +1 -1
  342. package/dist/chunks/{useSearchInput-C-CqUK6w.js → useSearchInput-B1UOjxAI.js} +1 -1
  343. package/dist/chunks/{useSettingsErrors-BWlJCgYF.js → useSettingsErrors-BLbvu4--.js} +1 -1
  344. package/dist/chunks/{util-DJV0joAW.js → util-CxlfALM4.js} +1 -1
  345. package/dist/chunks/validatePlugin-n8a4W_jI.js +1 -0
  346. package/dist/chunks/{vim-n8-UT5w-.js → vim-DLWBHwVM.js} +1 -1
  347. package/dist/chunks/{which-BBCjXfI2.js → which-sEFQXpaX.js} +1 -1
  348. package/dist/chunks/windowsPaths-BLevJOlm.js +1 -0
  349. package/dist/chunks/{windowsPaths-D6T_3XaU.js → windowsPaths-N_YmYY6k.js} +1 -1
  350. package/dist/chunks/{workSecret-C_lv0dRh.js → workSecret-DvniZR71.js} +1 -1
  351. package/dist/chunks/{workerRegistry-BdHi7_sN.js → workerRegistry-CFnGtb3L.js} +1 -1
  352. package/dist/chunks/worktree-Dr_WzlXs.js +1 -0
  353. package/dist/cli.js +1 -1
  354. package/package.json +1 -1
  355. package/dist/chunks/ApproveApiKey-DfAPwDix.js +0 -1
  356. package/dist/chunks/ClaudeMdExternalIncludesDialog-BV7HHcgL.js +0 -1
  357. package/dist/chunks/ConsoleOAuthFlow-CU5fCPKq.js +0 -1
  358. package/dist/chunks/Doctor-B0CRtxi2.js +0 -1
  359. package/dist/chunks/Grove-CelgLWH4.js +0 -1
  360. package/dist/chunks/Messages-jCoW_1Rr.js +0 -11
  361. package/dist/chunks/REPL-DcpN3MRC.js +0 -1
  362. package/dist/chunks/RemoteSessionManager-Tx1N2uVL.js +0 -2
  363. package/dist/chunks/SearchExtraToolsTool-D3VOFq9R.js +0 -1
  364. package/dist/chunks/WelcomeV2-BTfttGcv.js +0 -1
  365. package/dist/chunks/api-L2IgleTV.js +0 -1
  366. package/dist/chunks/api-TgV7fl9V.js +0 -1
  367. package/dist/chunks/asciicast-DYbkzGCN.js +0 -1
  368. package/dist/chunks/assistant-YvbVKjVh.js +0 -1
  369. package/dist/chunks/auth-CEig4Gxp.js +0 -1
  370. package/dist/chunks/auth-CbGDlhyO.js +0 -1
  371. package/dist/chunks/backgroundHousekeeping-BNEKWHhH.js +0 -1
  372. package/dist/chunks/bg-BzG63WOm.js +0 -1
  373. package/dist/chunks/bridgeConfig-D5dB38xD.js +0 -1
  374. package/dist/chunks/bridgeEnabled-DKX8-T_H.js +0 -1
  375. package/dist/chunks/bridgeMain-d06JByZn.js +0 -1
  376. package/dist/chunks/caches-BuTIAOtY.js +0 -1
  377. package/dist/chunks/client-BeET1hnC.js +0 -1
  378. package/dist/chunks/commands-VjcG4qFq.js +0 -1
  379. package/dist/chunks/commitAttribution-Lb3qUlAR.js +0 -1
  380. package/dist/chunks/completionCache-CW8lKIgy.js +0 -1
  381. package/dist/chunks/config-0cRberzR.js +0 -1
  382. package/dist/chunks/config-BrxKpHpR.js +0 -1
  383. package/dist/chunks/context-noninteractive-rUZ3ydmJ.js +0 -1
  384. package/dist/chunks/conversation-oK3aFzqO.js +0 -1
  385. package/dist/chunks/createSession-DM4acqaC.js +0 -1
  386. package/dist/chunks/cwd-D-tY2NKc.js +0 -1
  387. package/dist/chunks/datadog-ByS7LGGa.js +0 -1
  388. package/dist/chunks/debug-DzZUT2Wv.js +0 -1
  389. package/dist/chunks/detectRepository-6nw-Aw3v.js +0 -1
  390. package/dist/chunks/doctor-CTMHXZvQ.js +0 -1
  391. package/dist/chunks/envLessBridgeConfig-CGuIxFzJ.js +0 -1
  392. package/dist/chunks/envLessBridgeConfig-D_Jg4fJy.js +0 -1
  393. package/dist/chunks/extra-usage-BS4aVOt5.js +0 -1
  394. package/dist/chunks/extractMemories-C4f9JWuI.js +0 -1
  395. package/dist/chunks/fast-B0OB4x7K.js +0 -1
  396. package/dist/chunks/firstPartyEventLogger-CdUpe6Lh.js +0 -1
  397. package/dist/chunks/git-BE_FiJZp.js +0 -1
  398. package/dist/chunks/hooks-DONAb_nq.js +0 -1
  399. package/dist/chunks/inboundAttachments-BcEgi49j.js +0 -1
  400. package/dist/chunks/language-Da4KNbjm.js +0 -1
  401. package/dist/chunks/loadAgentsDir-Dgd-fzNt.js +0 -1
  402. package/dist/chunks/localSearch-D-FprOMr.js +0 -1
  403. package/dist/chunks/main-y7LJ5qUc.js +0 -1243
  404. package/dist/chunks/model--z4Di9QO.js +0 -1
  405. package/dist/chunks/parser-BlM_Fk4J.js +0 -1
  406. package/dist/chunks/pluginStartupCheck-BqUwHcMD.js +0 -1
  407. package/dist/chunks/policyLimits-Dem-XJ_h.js +0 -1
  408. package/dist/chunks/poorMode-jvImnkty.js +0 -1
  409. package/dist/chunks/prompt-C7wd1H_i.js +0 -1
  410. package/dist/chunks/prompt-DIoNqZvO.js +0 -1
  411. package/dist/chunks/ripgrep-BQgJ02F9.js +0 -1
  412. package/dist/chunks/sandbox-adapter-Coe1GDAE.js +0 -1
  413. package/dist/chunks/searchExtraTools-BnWZ9roi.js +0 -1
  414. package/dist/chunks/sessionFileAccessHooks-BhdOmW9o.js +0 -1
  415. package/dist/chunks/sessionMemory-CIbCojm-.js +0 -1
  416. package/dist/chunks/sessionMemoryUtils-Cjb57wtC.js +0 -1
  417. package/dist/chunks/sessionObserver-CRU1qWnP.js +0 -1
  418. package/dist/chunks/sessionStorage-BxDN8qRc.js +0 -1
  419. package/dist/chunks/settingsSync-BDeuErb5.js +0 -1
  420. package/dist/chunks/sink-iYxWapbU.js +0 -1
  421. package/dist/chunks/sinks-jfaIjsRJ.js +0 -1
  422. package/dist/chunks/skillLearning-C8ihdryM.js +0 -1
  423. package/dist/chunks/startupProfiler-B0m6crkd.js +0 -1
  424. package/dist/chunks/state-53JDbNQM.js +0 -1
  425. package/dist/chunks/systemPromptSections-IePG5K8r.js +0 -1
  426. package/dist/chunks/thinkback-BA4cMz4D.js +0 -1
  427. package/dist/chunks/trustedDevice-DnIWErCt.js +0 -1
  428. package/dist/chunks/undercover-B-kKUWtK.js +0 -1
  429. package/dist/chunks/upgrade-CngUwvY4.js +0 -1
  430. package/dist/chunks/usage-eZRwLa77.js +0 -1
  431. package/dist/chunks/useMainLoopModel-BNFW-g8E.js +0 -1
  432. package/dist/chunks/validatePlugin-CRmpIGLV.js +0 -1
  433. package/dist/chunks/windowsPaths-DUKTzBck.js +0 -1
  434. package/dist/chunks/worktree-YDeHMlHZ.js +0 -1
@@ -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-4KQ3kaqz.js";import{IE as g,NE as _,Nb as v,PE as y,Pb as b,zE as x}from"./loadAgentsDir-nzr38hai.js";import{f as S,g as C,s as w}from"./settings-5PQdphqC.js";import{i as T,o as E}from"./platform-EtecGacO.js";import{u as D}from"./referral-DP_GshTS.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`,x()?` (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=_.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(),g(),b(),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(),g(),C(),b(),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,``);y(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};
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{IE as g,NE as _,Nb as v,PE as y,Pb as b,zE as x}from"./loadAgentsDir-ZQwvbURI.js";import{f as S,g as C,s as w}from"./settings-BhvhCpVh.js";import{i as T,o as E}from"./platform-B5dCGT8t.js";import{u as D}from"./referral-Cu9bEOFE.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`,x()?` (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=_.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(),g(),b(),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(),g(),C(),b(),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,``);y(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-ZQwvbURI.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{lS as l,uS as u}from"./loadAgentsDir-nzr38hai.js";import{l as d,p as f}from"./debug-IKW-jE7K.js";import{u as p}from"./referral-DP_GshTS.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(`
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{lS as l,uS as u}from"./loadAgentsDir-ZQwvbURI.js";import{l as d,p as f}from"./debug-DiuXEmUq.js";import{u as p}from"./referral-Cu9bEOFE.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
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{l as e,p as t}from"./debug-IKW-jE7K.js";e();async function n(){let{fetchCodeSessionsFromSessionsAPI:e}=await import(`./api-L2IgleTV.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};
1
+ import{l as e,p as t}from"./debug-DiuXEmUq.js";e();async function n(){let{fetchCodeSessionsFromSessionsAPI:e}=await import(`./api-DMpNA1s8.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-ZQwvbURI.js";t();export{e as registerSessionFileAccessHooks};
@@ -0,0 +1 @@
1
+ import{i as e,r as t}from"./sessionMemory-e6YpTUhW.js";t();export{e as manuallyExtractSessionMemory};
@@ -1 +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-4KQ3kaqz.js";import{AT as a,Al as o,BT as s,Bc as c,CT as l,DT as u,Dl as d,ET as f,El as p,FT as m,Fn as ee,GT as te,In as ne,KT as re,Ln as ie,Lo as h,MT as g,Ml as _,NT as v,OT as ae,PT as oe,So as y,TT as se,UT as b,VT as ce,Vc as le,cl as ue,dT as de,fl as x,jT as S,kT as C,lt as w,lw as T,ml as E,pl as D,qT as O,sl as k,ut as A,uw as j,xT as M,zo as N}from"./loadAgentsDir-nzr38hai.js";import{B as P,U as F,_ as I,h as L,z as R}from"./debug-IKW-jE7K.js";import{_n as z,gn as B}from"./settings-5PQdphqC.js";import{n as V,r as H}from"./analytics-BotDBGh0.js";import{Ci as fe,Si as pe}from"./model-DfFA3qMO.js";import{pn as me,un as U}from"./prompt-Bef63FhB.js";import{st as he}from"./rcDebugLog-BUuD-X1D.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=b(e);if(!C()){if(!f(t))return!1;g()}let n=u(t),r=ve(e,X)>=se(),i=h(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=L(),n=ee();await t.mkdir(n,{mode:448});let r=ne();try{await W(r,``,{encoding:`utf-8`,mode:384,flag:`wx`}),await W(r,await E(),{encoding:`utf-8`,mode:384})}catch(e){if(P(e)!==`EEXIST`)throw e}e.readFileState.delete(r);let i=await c.call({file_path:r},e),a=``,o=i.data;return o.type===`text`&&(a=o.file.content),H(`tengu_session_memory_file_read`,{content_length:a.length}),{memoryPath:r,currentMemory:a}}function ye(){if(r())return;let e=ue();process.env.USER_TYPE===`ant`&&H(`tengu_session_memory_init`,{auto_compact_enabled:e}),e&&j($)}async function q(e,t){if(e.length===0)return{success:!1,error:`No messages to summarize`};S();try{let n=d(t),{memoryPath:r,currentMemory:i}=await K(n),a=await x(i,r),{tools:o,mainLoopModel:s}=t.options,[c,l,u]=await Promise.all([w(o,s),re(),te()]),f=he(c);return await _({promptMessages:[y({content:a})],cacheSafeParams:{systemPrompt:f,userContext:l,systemContext:u,toolUseContext:n,forkContextMessages:e},canUseTool:J(r),querySource:`session_memory`,forkLabel:`session_memory_manual`,overrides:{readFileState:n.readFileState}}),H(`tengu_session_memory_manual_extraction`,{}),v(b(e)),Y(e),{success:!0,memoryPath:r}}catch(e){return{success:!1,error:R(e)}}finally{a()}}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(!h(e)){let t=e[e.length-1];t?.uuid&&oe(t.uuid)}}var X,Z,Q,$,be=e((()=>{n(),i(),A(),O(),me(),le(),z(),o(),I(),T(),N(),ie(),pe(),de(),ce(),V(),k(),D(),ae(),F(),Z=t(()=>{let e=_e();m({minimumMessageTokensToInit:e.minimumMessageTokensToInit&&e.minimumMessageTokensToInit>0?e.minimumMessageTokensToInit:M.minimumMessageTokensToInit,minimumTokensBetweenUpdate:e.minimumTokensBetweenUpdate&&e.minimumTokensBetweenUpdate>0?e.minimumTokensBetweenUpdate:M.minimumTokensBetweenUpdate,toolCallsBetweenUpdates:e.toolCallsBetweenUpdates&&e.toolCallsBetweenUpdates>0?e.toolCallsBetweenUpdates:M.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-jvImnkty.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;S();let i=d(n),{memoryPath:o,currentMemory:c}=await K(i);await _({promptMessages:[y({content:await x(c,o)})],cacheSafeParams:p(e),canUseTool:J(o),querySource:`session_memory`,forkLabel:`session_memory`,overrides:{readFileState:i.readFileState}});let u=t[t.length-1],f=u?s(u):void 0,m=l();H(`tengu_session_memory_extraction`,{input_tokens:f?.input_tokens,output_tokens:f?.output_tokens,cache_read_input_tokens:f?.cache_read_input_tokens??void 0,cache_creation_input_tokens:f?.cache_creation_input_tokens??void 0,config_min_message_tokens_to_init:m.minimumMessageTokensToInit,config_min_tokens_between_update:m.minimumTokensBetweenUpdate,config_tool_calls_between_updates:m.toolCallsBetweenUpdates}),v(b(t)),Y(t),a()})}));export{G as a,q as i,ye as n,be as r,J as t};
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{AT as a,Al as o,BT as s,Bc as c,CT as l,DT as u,Dl as d,ET as f,El as p,FT as m,Fn as ee,GT as te,In as ne,KT as re,Ln as ie,Lo as h,MT as g,Ml as _,NT as v,OT as ae,PT as oe,So as y,TT as se,UT as b,VT as ce,Vc as le,cl as ue,dT as de,fl as x,jT as S,kT as C,lt as w,lw as T,ml as E,pl as D,qT as O,sl as k,ut as A,uw as j,xT as M,zo as N}from"./loadAgentsDir-ZQwvbURI.js";import{B as P,U as F,_ as I,h as L,z as R}from"./debug-DiuXEmUq.js";import{_n as z,gn as B}from"./settings-BhvhCpVh.js";import{n as V,r as H}from"./analytics-BotDBGh0.js";import{Ci as fe,Si as pe}from"./model-BgrLt7P7.js";import{pn as me,un as U}from"./prompt-wys9CwDo.js";import{st as he}from"./rcDebugLog-CivJaJ3V.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=b(e);if(!C()){if(!f(t))return!1;g()}let n=u(t),r=ve(e,X)>=se(),i=h(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=L(),n=ee();await t.mkdir(n,{mode:448});let r=ne();try{await W(r,``,{encoding:`utf-8`,mode:384,flag:`wx`}),await W(r,await E(),{encoding:`utf-8`,mode:384})}catch(e){if(P(e)!==`EEXIST`)throw e}e.readFileState.delete(r);let i=await c.call({file_path:r},e),a=``,o=i.data;return o.type===`text`&&(a=o.file.content),H(`tengu_session_memory_file_read`,{content_length:a.length}),{memoryPath:r,currentMemory:a}}function ye(){if(r())return;let e=ue();process.env.USER_TYPE===`ant`&&H(`tengu_session_memory_init`,{auto_compact_enabled:e}),e&&j($)}async function q(e,t){if(e.length===0)return{success:!1,error:`No messages to summarize`};S();try{let n=d(t),{memoryPath:r,currentMemory:i}=await K(n),a=await x(i,r),{tools:o,mainLoopModel:s}=t.options,[c,l,u]=await Promise.all([w(o,s),re(),te()]),f=he(c);return await _({promptMessages:[y({content:a})],cacheSafeParams:{systemPrompt:f,userContext:l,systemContext:u,toolUseContext:n,forkContextMessages:e},canUseTool:J(r),querySource:`session_memory`,forkLabel:`session_memory_manual`,overrides:{readFileState:n.readFileState}}),H(`tengu_session_memory_manual_extraction`,{}),v(b(e)),Y(e),{success:!0,memoryPath:r}}catch(e){return{success:!1,error:R(e)}}finally{a()}}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(!h(e)){let t=e[e.length-1];t?.uuid&&oe(t.uuid)}}var X,Z,Q,$,be=e((()=>{n(),i(),A(),O(),me(),le(),z(),o(),I(),T(),N(),ie(),pe(),de(),ce(),V(),k(),D(),ae(),F(),Z=t(()=>{let e=_e();m({minimumMessageTokensToInit:e.minimumMessageTokensToInit&&e.minimumMessageTokensToInit>0?e.minimumMessageTokensToInit:M.minimumMessageTokensToInit,minimumTokensBetweenUpdate:e.minimumTokensBetweenUpdate&&e.minimumTokensBetweenUpdate>0?e.minimumTokensBetweenUpdate:M.minimumTokensBetweenUpdate,toolCallsBetweenUpdates:e.toolCallsBetweenUpdates&&e.toolCallsBetweenUpdates>0?e.toolCallsBetweenUpdates:M.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-BdBDiOFD.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;S();let i=d(n),{memoryPath:o,currentMemory:c}=await K(i);await _({promptMessages:[y({content:await x(c,o)})],cacheSafeParams:p(e),canUseTool:J(o),querySource:`session_memory`,forkLabel:`session_memory`,overrides:{readFileState:i.readFileState}});let u=t[t.length-1],f=u?s(u):void 0,m=l();H(`tengu_session_memory_extraction`,{input_tokens:f?.input_tokens,output_tokens:f?.output_tokens,cache_read_input_tokens:f?.cache_read_input_tokens??void 0,cache_creation_input_tokens:f?.cache_creation_input_tokens??void 0,config_min_message_tokens_to_init:m.minimumMessageTokensToInit,config_min_tokens_between_update:m.minimumTokensBetweenUpdate,config_tool_calls_between_updates:m.toolCallsBetweenUpdates}),v(b(t)),Y(t),a()})}));export{G as a,q as i,ye as n,be as r,J as t};
@@ -0,0 +1 @@
1
+ import{OT as e,wT as t}from"./loadAgentsDir-ZQwvbURI.js";e();export{t as getSessionMemoryContent};
@@ -0,0 +1 @@
1
+ import{i as e,r as t}from"./sessionObserver-OgY9BUP4.js";e();export{t as heuristicObserverBackend};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{dT as t,et as n,tt as r}from"./loadAgentsDir-nzr38hai.js";import{st as i}from"./rcDebugLog-BUuD-X1D.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-CRU1qWnP.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(`
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{dT as t,et as n,tt as r}from"./loadAgentsDir-ZQwvbURI.js";import{st as i}from"./rcDebugLog-CivJaJ3V.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-DNItJztR.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-ZQwvbURI.js";t();export{e as linkSessionToPR,n as recordTranscript};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{A as t,t as n,w as r}from"./v4-jw6qOKwQ.js";import{en as i,z as a}from"./state-4KQ3kaqz.js";import{To as o,dT as s,et as c,tt as l,zo as u}from"./loadAgentsDir-nzr38hai.js";import{l as d,p as f}from"./debug-IKW-jE7K.js";import{s as p,u as m}from"./types-a7X-tJpJ.js";import{n as h,r as g}from"./analytics-BotDBGh0.js";import{n as _,t as v}from"./lazySchema-uxlVVNM1.js";import{st as y}from"./rcDebugLog-BUuD-X1D.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(`
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{A as t,t as n,w as r}from"./v4-jw6qOKwQ.js";import{en as i,z as a}from"./state-ix0xIunV.js";import{To as o,dT as s,et as c,tt as l,zo as u}from"./loadAgentsDir-ZQwvbURI.js";import{l as d,p as f}from"./debug-DiuXEmUq.js";import{s as p,u as m}from"./types-Cnorfsss.js";import{n as h,r as g}from"./analytics-BotDBGh0.js";import{n as _,t as v}from"./lazySchema-uxlVVNM1.js";import{st as y}from"./rcDebugLog-CivJaJ3V.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=o((await l({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:a(),hasAppendSystemPrompt:!1,mcpTools:[]}})).message.content),r=w().safeParse(m(e)),i=r.success&&r.data.title.trim()||null;return g(`tengu_session_title_generated`,{success:i!==null}),i}catch(e){return f(`generateSessionTitle failed: ${e}`,{level:`error`}),g(`tengu_session_title_generated`,{success:!1}),null}}var S,C,w,T=e((()=>{n(),i(),h(),c(),d(),p(),v(),u(),s(),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-4KQ3kaqz.js";import{D as d,E as f,O as p,U as m,l as h,p as g}from"./debug-IKW-jE7K.js";import{f as _,g as ee}from"./config-C7YHKCPV.js";import{i as te,t as ne}from"./hash-Tu-My5Vp.js";import{Mt as re,Vt as ie}from"./model-DfFA3qMO.js";import{_ as v,s as ae,u as oe,y as se}from"./metadata-BRLJvh61.js";import"path";import"fs";import{createHash as ce}from"crypto";import"fs/promises";import{AsyncLocalStorage as le}from"async_hooks";function ue(e){let t=BigInt(58),n=Array(b).fill(y[0]),r=b-1,i=e;for(;i>0n;){let e=Number(i%t);n[r]=y[e],i/=t,r--}return n.join(``)}function de(e){let t=e.replace(/-/g,``);if(t.length!==32)throw Error(`Invalid UUID hex length: ${t.length}`);return BigInt(`0x`+t)}function fe(e,t){let n=de(t);return`${e}_${pe}${ue(n)}`}var y,pe,b,me=e((()=>{y=`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`,pe=`01`,b=22}));function x(e){let n=he[e],r=process.env[e];return r===void 0?n:t(r)}function S(){let e=_(),t=c(),n={"user.id":e};x(`OTEL_METRICS_INCLUDE_SESSION_ID`)&&(n[`session.id`]=t),x(`OTEL_METRICS_INCLUDE_VERSION`)&&(n[`app.version`]=`0.0.1`);let r=re();if(r){let e=r.organizationUuid,t=r.emailAddress,i=r.accountUuid;e&&(n[`organization.id`]=e),t&&(n[`user.email`]=t),i&&x(`OTEL_METRICS_INCLUDE_ACCOUNT_UUID`)&&(n[`user.account_uuid`]=i,n[`user.account_id`]=process.env.CLAUDE_CODE_ACCOUNT_TAGGED_ID||fe(`user`,i))}return v.terminal&&(n[`terminal.type`]=v.terminal),n}var he,C=e((()=>{s(),ie(),ee(),se(),n(),me(),he={OTEL_METRICS_INCLUDE_SESSION_ID:!0,OTEL_METRICS_INCLUDE_VERSION:!1,OTEL_METRICS_INCLUDE_ACCOUNT_UUID:!0}}));function ge(){return t(process.env.OTEL_LOG_USER_PROMPTS)}function _e(e){return ge()?e:`<REDACTED>`}async function w(e,t={}){let n=o();if(!n){T||(T=!0,g(`[3P telemetry] Event dropped (no event logger initialized): ${e}`,{level:`warn`}));return}let r={...S(),"event.name":e,"event.timestamp":new Date().toISOString(),"event.sequence":ve++},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 ve,T,ye=e((()=>{s(),h(),n(),C(),ve=0,T=!1}));function be(e){return Math.abs(ne(e))||1}function xe(e){let t=L.get(e);return t===void 0?(I++,L.set(e,I),I):t}function E(){let e=c(),t=`main`,n=P.get(e);if(n)return n;let r={agentId:e,agentName:t,parentAgentId:void 0,processId:1,threadId:be(t)};return P.set(e,r),F++,r}function D(){return(Date.now()-Pe)*1e3}function O(){return`span_${++Fe}`}function Se(){let e=process.env.CLAUDE_CODE_PERFETTO_TRACE;g(`[Perfetto] initializePerfettoTracing called, env value: ${e}`)}function Ce(e){A&&(j.push({name:`process_name`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:0,args:{name:e.agentName}}),j.push({name:`thread_name`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:e.threadId,args:{name:e.agentName}}),e.parentAgentId&&j.push({name:`parent_agent`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:0,args:{parent_agent_id:e.parentAgentId}}))}function k(){return A}function we(e,t,n){if(!A)return;let r={agentId:e,agentName:t,parentAgentId:n,processId:xe(e),threadId:be(t)};P.set(e,r),F++,Ce(r)}function Te(e){A&&(P.delete(e),L.delete(e))}function Ee(e){if(!A)return``;let t=O(),n=E();return N.set(t,{name:`API Call`,category:`api`,startTime:D(),agentInfo:n,args:{model:e.model,prompt_tokens:e.promptTokens,message_id:e.messageId,is_speculative:e.isSpeculative??!1,query_source:e.querySource}}),M.push({name:`API Call`,cat:`api`,ph:`B`,ts:N.get(t).startTime,pid:n.processId,tid:n.threadId,args:N.get(t).args}),t}function De(e,t){if(!A||!e)return;let n=N.get(e);if(!n)return;let r=D(),i=r-n.startTime,a=t.promptTokens??n.args.prompt_tokens,o=t.ttftMs,s=t.ttltMs,c=t.outputTokens,l=t.cacheReadTokens,u=o!==void 0&&a!==void 0&&o>0?Math.round(a/(o/1e3)*100)/100:void 0,d=s!==void 0&&o!==void 0?s-o:void 0,f=d!==void 0&&c!==void 0&&d>0?Math.round(c/(d/1e3)*100)/100:void 0,p=l!==void 0&&a!==void 0&&a>0?Math.round(l/a*1e4)/100:void 0,m=t.requestSetupMs,h=t.attemptStartTimes,g={...n.args,ttft_ms:o,ttlt_ms:s,prompt_tokens:a,output_tokens:c,cache_read_tokens:l,cache_creation_tokens:t.cacheCreationTokens,message_id:t.messageId??n.args.message_id,success:t.success??!0,error:t.error,duration_ms:i/1e3,request_setup_ms:m,itps:u,otps:f,cache_hit_rate_pct:p},_=m!==void 0&&m>0?m*1e3:0;if(_>0){let e=n.startTime+_;if(M.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;M.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}}),M.push({name:`Attempt ${t+1} (retry)`,cat:`api,retry`,ph:`E`,ts:i,pid:n.agentInfo.processId,tid:n.agentInfo.threadId})}}M.push({name:`Request Setup`,cat:`api,setup`,ph:`E`,ts:e,pid:n.agentInfo.processId,tid:n.agentInfo.threadId})}if(o!==void 0){let e=n.startTime+_,t=e+o*1e3;M.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}}),M.push({name:`First Token`,cat:`api,ttft`,ph:`E`,ts:t,pid:n.agentInfo.processId,tid:n.agentInfo.threadId});let r=s===void 0?void 0:s-o-_/1e3;r!==void 0&&r>0&&(M.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}}),M.push({name:`Sampling`,cat:`api,sampling`,ph:`E`,ts:t+r*1e3,pid:n.agentInfo.processId,tid:n.agentInfo.threadId}))}M.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:g}),N.delete(e)}function Oe(e,t){if(!A)return``;let n=O(),r=E();return N.set(n,{name:`Tool: ${e}`,category:`tool`,startTime:D(),agentInfo:r,args:{tool_name:e,...t}}),M.push({name:`Tool: ${e}`,cat:`tool`,ph:`B`,ts:N.get(n).startTime,pid:r.processId,tid:r.threadId,args:N.get(n).args}),n}function ke(e,t){if(!A||!e)return;let n=N.get(e);if(!n)return;let r=D(),i=r-n.startTime,a={...n.args,success:t?.success??!0,error:t?.error,result_tokens:t?.resultTokens,duration_ms:i/1e3};M.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:a}),N.delete(e)}function Ae(e){if(!A)return``;let t=O(),n=E();return N.set(t,{name:`Waiting for User Input`,category:`user_input`,startTime:D(),agentInfo:n,args:{context:e}}),M.push({name:`Waiting for User Input`,cat:`user_input`,ph:`B`,ts:N.get(t).startTime,pid:n.processId,tid:n.threadId,args:N.get(t).args}),t}function je(e,t){if(!A||!e)return;let n=N.get(e);if(!n)return;let r=D(),i=r-n.startTime,a={...n.args,decision:t?.decision,source:t?.source,duration_ms:i/1e3};M.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:a}),N.delete(e)}function Me(e){if(!A)return``;let t=O(),n=E();return N.set(t,{name:`Interaction`,category:`interaction`,startTime:D(),agentInfo:n,args:{user_prompt_length:e?.length}}),M.push({name:`Interaction`,cat:`interaction`,ph:`B`,ts:N.get(t).startTime,pid:n.processId,tid:n.threadId,args:N.get(t).args}),t}function Ne(e){if(!A||!e)return;let t=N.get(e);if(!t)return;let n=D(),r=n-t.startTime;M.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}}),N.delete(e)}var A,j,M,N,P,F,Pe,Fe,I,L,Ie=e((()=>{s(),h(),n(),m(),te(),f(),A=!1,j=[],M=[],N=new Map,P=new Map,F=0,Pe=0,Fe=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)+`
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{D as d,E as f,O as p,U as m,l as h,p as g}from"./debug-DiuXEmUq.js";import{f as _,g as ee}from"./config-662VDD70.js";import{i as te,t as ne}from"./hash-Tu-My5Vp.js";import{Mt as re,Vt as ie}from"./model-BgrLt7P7.js";import{_ as v,s as ae,u as oe,y as se}from"./metadata-CIx5CsoY.js";import"path";import"fs";import{createHash as ce}from"crypto";import"fs/promises";import{AsyncLocalStorage as le}from"async_hooks";function ue(e){let t=BigInt(58),n=Array(b).fill(y[0]),r=b-1,i=e;for(;i>0n;){let e=Number(i%t);n[r]=y[e],i/=t,r--}return n.join(``)}function de(e){let t=e.replace(/-/g,``);if(t.length!==32)throw Error(`Invalid UUID hex length: ${t.length}`);return BigInt(`0x`+t)}function fe(e,t){let n=de(t);return`${e}_${pe}${ue(n)}`}var y,pe,b,me=e((()=>{y=`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`,pe=`01`,b=22}));function x(e){let n=he[e],r=process.env[e];return r===void 0?n:t(r)}function S(){let e=_(),t=c(),n={"user.id":e};x(`OTEL_METRICS_INCLUDE_SESSION_ID`)&&(n[`session.id`]=t),x(`OTEL_METRICS_INCLUDE_VERSION`)&&(n[`app.version`]=`0.0.2`);let r=re();if(r){let e=r.organizationUuid,t=r.emailAddress,i=r.accountUuid;e&&(n[`organization.id`]=e),t&&(n[`user.email`]=t),i&&x(`OTEL_METRICS_INCLUDE_ACCOUNT_UUID`)&&(n[`user.account_uuid`]=i,n[`user.account_id`]=process.env.CLAUDE_CODE_ACCOUNT_TAGGED_ID||fe(`user`,i))}return v.terminal&&(n[`terminal.type`]=v.terminal),n}var he,C=e((()=>{s(),ie(),ee(),se(),n(),me(),he={OTEL_METRICS_INCLUDE_SESSION_ID:!0,OTEL_METRICS_INCLUDE_VERSION:!1,OTEL_METRICS_INCLUDE_ACCOUNT_UUID:!0}}));function ge(){return t(process.env.OTEL_LOG_USER_PROMPTS)}function _e(e){return ge()?e:`<REDACTED>`}async function w(e,t={}){let n=o();if(!n){T||(T=!0,g(`[3P telemetry] Event dropped (no event logger initialized): ${e}`,{level:`warn`}));return}let r={...S(),"event.name":e,"event.timestamp":new Date().toISOString(),"event.sequence":ve++},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 ve,T,ye=e((()=>{s(),h(),n(),C(),ve=0,T=!1}));function be(e){return Math.abs(ne(e))||1}function xe(e){let t=L.get(e);return t===void 0?(I++,L.set(e,I),I):t}function E(){let e=c(),t=`main`,n=P.get(e);if(n)return n;let r={agentId:e,agentName:t,parentAgentId:void 0,processId:1,threadId:be(t)};return P.set(e,r),F++,r}function D(){return(Date.now()-Pe)*1e3}function O(){return`span_${++Fe}`}function Se(){let e=process.env.CLAUDE_CODE_PERFETTO_TRACE;g(`[Perfetto] initializePerfettoTracing called, env value: ${e}`)}function Ce(e){A&&(j.push({name:`process_name`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:0,args:{name:e.agentName}}),j.push({name:`thread_name`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:e.threadId,args:{name:e.agentName}}),e.parentAgentId&&j.push({name:`parent_agent`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:0,args:{parent_agent_id:e.parentAgentId}}))}function k(){return A}function we(e,t,n){if(!A)return;let r={agentId:e,agentName:t,parentAgentId:n,processId:xe(e),threadId:be(t)};P.set(e,r),F++,Ce(r)}function Te(e){A&&(P.delete(e),L.delete(e))}function Ee(e){if(!A)return``;let t=O(),n=E();return N.set(t,{name:`API Call`,category:`api`,startTime:D(),agentInfo:n,args:{model:e.model,prompt_tokens:e.promptTokens,message_id:e.messageId,is_speculative:e.isSpeculative??!1,query_source:e.querySource}}),M.push({name:`API Call`,cat:`api`,ph:`B`,ts:N.get(t).startTime,pid:n.processId,tid:n.threadId,args:N.get(t).args}),t}function De(e,t){if(!A||!e)return;let n=N.get(e);if(!n)return;let r=D(),i=r-n.startTime,a=t.promptTokens??n.args.prompt_tokens,o=t.ttftMs,s=t.ttltMs,c=t.outputTokens,l=t.cacheReadTokens,u=o!==void 0&&a!==void 0&&o>0?Math.round(a/(o/1e3)*100)/100:void 0,d=s!==void 0&&o!==void 0?s-o:void 0,f=d!==void 0&&c!==void 0&&d>0?Math.round(c/(d/1e3)*100)/100:void 0,p=l!==void 0&&a!==void 0&&a>0?Math.round(l/a*1e4)/100:void 0,m=t.requestSetupMs,h=t.attemptStartTimes,g={...n.args,ttft_ms:o,ttlt_ms:s,prompt_tokens:a,output_tokens:c,cache_read_tokens:l,cache_creation_tokens:t.cacheCreationTokens,message_id:t.messageId??n.args.message_id,success:t.success??!0,error:t.error,duration_ms:i/1e3,request_setup_ms:m,itps:u,otps:f,cache_hit_rate_pct:p},_=m!==void 0&&m>0?m*1e3:0;if(_>0){let e=n.startTime+_;if(M.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;M.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}}),M.push({name:`Attempt ${t+1} (retry)`,cat:`api,retry`,ph:`E`,ts:i,pid:n.agentInfo.processId,tid:n.agentInfo.threadId})}}M.push({name:`Request Setup`,cat:`api,setup`,ph:`E`,ts:e,pid:n.agentInfo.processId,tid:n.agentInfo.threadId})}if(o!==void 0){let e=n.startTime+_,t=e+o*1e3;M.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}}),M.push({name:`First Token`,cat:`api,ttft`,ph:`E`,ts:t,pid:n.agentInfo.processId,tid:n.agentInfo.threadId});let r=s===void 0?void 0:s-o-_/1e3;r!==void 0&&r>0&&(M.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}}),M.push({name:`Sampling`,cat:`api,sampling`,ph:`E`,ts:t+r*1e3,pid:n.agentInfo.processId,tid:n.agentInfo.threadId}))}M.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:g}),N.delete(e)}function Oe(e,t){if(!A)return``;let n=O(),r=E();return N.set(n,{name:`Tool: ${e}`,category:`tool`,startTime:D(),agentInfo:r,args:{tool_name:e,...t}}),M.push({name:`Tool: ${e}`,cat:`tool`,ph:`B`,ts:N.get(n).startTime,pid:r.processId,tid:r.threadId,args:N.get(n).args}),n}function ke(e,t){if(!A||!e)return;let n=N.get(e);if(!n)return;let r=D(),i=r-n.startTime,a={...n.args,success:t?.success??!0,error:t?.error,result_tokens:t?.resultTokens,duration_ms:i/1e3};M.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:a}),N.delete(e)}function Ae(e){if(!A)return``;let t=O(),n=E();return N.set(t,{name:`Waiting for User Input`,category:`user_input`,startTime:D(),agentInfo:n,args:{context:e}}),M.push({name:`Waiting for User Input`,cat:`user_input`,ph:`B`,ts:N.get(t).startTime,pid:n.processId,tid:n.threadId,args:N.get(t).args}),t}function je(e,t){if(!A||!e)return;let n=N.get(e);if(!n)return;let r=D(),i=r-n.startTime,a={...n.args,decision:t?.decision,source:t?.source,duration_ms:i/1e3};M.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:a}),N.delete(e)}function Me(e){if(!A)return``;let t=O(),n=E();return N.set(t,{name:`Interaction`,category:`interaction`,startTime:D(),agentInfo:n,args:{user_prompt_length:e?.length}}),M.push({name:`Interaction`,cat:`interaction`,ph:`B`,ts:N.get(t).startTime,pid:n.processId,tid:n.threadId,args:N.get(t).args}),t}function Ne(e){if(!A||!e)return;let t=N.get(e);if(!t)return;let n=D(),r=n-t.startTime;M.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}}),N.delete(e)}var A,j,M,N,P,F,Pe,Fe,I,L,Ie=e((()=>{s(),h(),n(),m(),te(),f(),A=!1,j=[],M=[],N=new Map,P=new Map,F=0,Pe=0,Fe=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 ce(`sha256`).update(e).digest(`hex`).slice(0,12)}function Re(e){return`sp_${B(e)}`}function ze(e){return`msg_${B(p(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:p(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);w(`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=p(e),n=B(t);return{name:typeof e.name==`string`?e.name:`unknown`,hash:n,json:t}});e.setAttribute(`tools`,p(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);w(`tool`,{tool_name:oe(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