@inkeep/open-knowledge 0.42.0 → 0.43.0-beta.0

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 (356) hide show
  1. package/dist/{acp-harness-probe-C3Si3Oe6.mjs → acp-harness-probe-BI6bXf3a.mjs} +2 -2
  2. package/dist/assets/skills/discovery/SKILL.md +1 -1
  3. package/dist/assets/skills/project/SKILL.md +2 -2
  4. package/dist/assets/skills/project/references/components-and-visuals.md +4 -0
  5. package/dist/assets/skills/write-skill/SKILL.md +2 -2
  6. package/dist/assets/skills/write-skill/references/pressure-testing.md +1 -1
  7. package/dist/{build-fAc55Z_L.mjs → build-DYQrG4v7.mjs} +1 -1
  8. package/dist/build-DcqN8tua.mjs +1 -0
  9. package/dist/{chunk-TLSUDHID-BOrmK-jg.mjs → chunk-TLSUDHID-B0bd8ZfM.mjs} +2 -2
  10. package/dist/cli.mjs +60 -60
  11. package/dist/config-schema.json +154 -0
  12. package/dist/config.project.schema.json +154 -0
  13. package/dist/constants-BKJ7B5iw.mjs +2 -0
  14. package/dist/{diff-HJF2MPDN-BvwqXcA5.mjs → diff-HJF2MPDN-DhZaF2MX.mjs} +1 -1
  15. package/dist/{flag-coverage-6JEX67RU-D3X0I2ha.mjs → flag-coverage-6JEX67RU-D1byxsyF.mjs} +2 -2
  16. package/dist/fs-traced-B9Czc2nP.mjs +1 -0
  17. package/dist/{fs-traced-Cc6WsRtP.mjs → fs-traced-BmZQL7v9.mjs} +2 -2
  18. package/dist/git-handle-B1uGukUi.mjs +1 -0
  19. package/dist/{git-handle-JgY8Ytwb.mjs → git-handle-bosCq-DO.mjs} +2 -2
  20. package/dist/index.d.mts +37 -13
  21. package/dist/index.mjs +1 -1
  22. package/dist/{init-BRlzdKw6.mjs → init-BUp3cQ_4.mjs} +37 -37
  23. package/dist/init-CIt3KTw5.mjs +1 -0
  24. package/dist/{launch-json-removal-D3bQuZax.mjs → launch-json-removal-CwOqJJze.mjs} +2 -2
  25. package/dist/{lib-CE7ieLC-.mjs → lib-BS_oZ9bm.mjs} +4 -4
  26. package/dist/{libesm-CG75CrN9.mjs → libesm-DzwC_yFw.mjs} +1 -1
  27. package/dist/loader-Bofa7u1n.mjs +1 -0
  28. package/dist/{loader-BiH3mrIJ.mjs → loader-y7Mn8M-Z.mjs} +2 -2
  29. package/dist/md-manager-DPw-b4lt.mjs +2 -0
  30. package/dist/{open-browser-BqBGMi_2.mjs → open-browser-CkLowmAw.mjs} +2 -2
  31. package/dist/parse-worker.mjs +1 -1
  32. package/dist/{preview-DB8FUJNR.mjs → preview-BV8bR51k.mjs} +2 -2
  33. package/dist/preview-CUhu4iSu.mjs +1 -0
  34. package/dist/public/assets/ActivityModeContent-CCFHLlT9.js +1 -0
  35. package/dist/public/assets/AgentDiffPane-CQfhJYfr.js +2 -0
  36. package/dist/public/assets/{AgentThreadClientBinder-D_oI6JYB.js → AgentThreadClientBinder-DZwzRPDa.js} +1 -1
  37. package/dist/public/assets/CodeMirrorPropInput-BqDZpzvH.js +3 -0
  38. package/dist/public/assets/{ConsentDialogBody-BjbzWR8D.js → ConsentDialogBody-CiXNBNFL.js} +1 -1
  39. package/dist/public/assets/DocumentContext-WcIs30H8.js +38 -0
  40. package/dist/public/assets/{EditorModeToggle-v_8_QyqL.js → EditorModeToggle-1xLWvnWd.js} +2 -2
  41. package/dist/public/assets/{EnableSyncConfirmDialog-DGzRLORN.js → EnableSyncConfirmDialog-CPuodmd5.js} +1 -1
  42. package/dist/public/assets/FeedbackForm-DXei5e26.js +1 -0
  43. package/dist/public/assets/GraphPanel-U2ZyS1Aa.js +44 -0
  44. package/dist/public/assets/{LintConfigEditor-P94jXYrX.js → LintConfigEditor-DEUL9rFl.js} +1 -1
  45. package/dist/public/assets/ManagedArtifactProperties-EDghUFni.js +1 -0
  46. package/dist/public/assets/{McpConsentDialogBody-DQKGlIrW.js → McpConsentDialogBody-C8VSVSPz.js} +1 -1
  47. package/dist/public/assets/MermaidDocEditor-BwjUe5g_.js +1 -0
  48. package/dist/public/assets/PropertyPanel-F1tECi8I.js +2 -0
  49. package/dist/public/assets/{RegisteredAgentIcon-8Tcfr3WP.js → RegisteredAgentIcon-C2dU04N7.js} +1 -1
  50. package/dist/public/assets/ReportBugDialogBody-Cz_kN3Qc.js +3 -0
  51. package/dist/public/assets/{SchemaConfigEditor-DgQ8bbvw.js → SchemaConfigEditor-C_t3p7aQ.js} +1 -1
  52. package/dist/public/assets/SettingsDialogBody-_7c5ty2t.js +7 -0
  53. package/dist/public/assets/{ShareBranchSwitchDialog-C5BWlfbq.js → ShareBranchSwitchDialog-Dj6PdkLL.js} +1 -1
  54. package/dist/public/assets/{ShareReceiveDialog-CI2Mloot.js → ShareReceiveDialog-Cmfia-Vl.js} +1 -1
  55. package/dist/public/assets/{ShareReceiveMissDialog-ohgoelQ3.js → ShareReceiveMissDialog-xHTJ1V_2.js} +1 -1
  56. package/dist/public/assets/{SkillEditorActions-B3vkquAC.js → SkillEditorActions-Cw7itVro.js} +1 -1
  57. package/dist/public/assets/SourceEditor-DGpQCfDe.js +1 -0
  58. package/dist/public/assets/{TerminalPanel-BNrFiNj3.js → TerminalPanel-Dfvz7JrY.js} +3 -3
  59. package/dist/public/assets/TerminalSessionsHost-D6vvdN1I.js +2 -0
  60. package/dist/public/assets/{TerminalWindowApp-CT-DB-wX.js → TerminalWindowApp-CfeLvqLD.js} +1 -1
  61. package/dist/public/assets/ThreadView-S_XJwwbZ.js +6 -0
  62. package/dist/public/assets/TimelineDiffPane-DgS-xWyU.js +2 -0
  63. package/dist/public/assets/{abnfDiagram-VRR7QNED-BN6xOaJK.js → abnfDiagram-VRR7QNED-BA0sca5y.js} +1 -1
  64. package/dist/public/assets/{agent-diff-store-CL1zJhM8.js → agent-diff-store-Cn0Zbsuy.js} +1 -1
  65. package/dist/public/assets/{agent-visibility-DboUkSIR.js → agent-visibility-B4n6jrOx.js} +1 -1
  66. package/dist/public/assets/{arc-DXLgvp45.js → arc-DIcYIkPb.js} +1 -1
  67. package/dist/public/assets/architecture-TIHT7OUA-DhKVyAdC.js +1 -0
  68. package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-sAL9H8K0.js → architectureDiagram-ZJ3FMSHR-CyZsfJqr.js} +1 -1
  69. package/dist/public/assets/auth-state-cache-PC5ml3gS.js +11 -0
  70. package/dist/public/assets/awareness-heartbeat.worker-BYkbsKQ2.js +1 -0
  71. package/dist/public/assets/{blockDiagram-677ZJIJ3-CecPiwgF.js → blockDiagram-677ZJIJ3-BL4J4ddi.js} +1 -1
  72. package/dist/public/assets/{c4Diagram-LMCZKHZV-D8mdqYYS.js → c4Diagram-LMCZKHZV-DtpyWL_l.js} +1 -1
  73. package/dist/public/assets/{calendar-DEDeJBdZ.js → calendar-2iQWonjM.js} +1 -1
  74. package/dist/public/assets/channel-D7XYjy4a.js +1 -0
  75. package/dist/public/assets/chunk-2Q5K7J3B-BpVQiBsM.js +1 -0
  76. package/dist/public/assets/{chunk-32BRIVSS-JpxGJ5ji.js → chunk-32BRIVSS-J_rdnOiy.js} +1 -1
  77. package/dist/public/assets/{chunk-52WLFC77-C_iSxcYL.js → chunk-52WLFC77-BOMCKXNP.js} +1 -1
  78. package/dist/public/assets/{chunk-5FCAYU7R-Bq8uZn8B.js → chunk-5FCAYU7R-8Y9BJKC-.js} +1 -1
  79. package/dist/public/assets/{chunk-5HE753X5-Canmf8DQ.js → chunk-5HE753X5-CQEApaqU.js} +1 -1
  80. package/dist/public/assets/{chunk-5JV3BV7I-Dtexaqo4.js → chunk-5JV3BV7I-Wp4ieThX.js} +1 -1
  81. package/dist/public/assets/{chunk-5TONJI2A-QaNyDyr1.js → chunk-5TONJI2A-Dht2oB5p.js} +1 -1
  82. package/dist/public/assets/{chunk-5VM5RSS4-DnRDZx9C.js → chunk-5VM5RSS4-BtUIXst7.js} +1 -1
  83. package/dist/public/assets/{chunk-7BUUIJ7U-CjwBXrEk.js → chunk-7BUUIJ7U-B7ItXXvn.js} +1 -1
  84. package/dist/public/assets/{chunk-BIQX33UG-CwPTWPTQ.js → chunk-BIQX33UG-B4CjyNhu.js} +1 -1
  85. package/dist/public/assets/{chunk-BO2N2NFS-BTXsfKML.js → chunk-BO2N2NFS-DMgXoikU.js} +3 -3
  86. package/dist/public/assets/{chunk-C7G6YPKG-yRQSkwCz.js → chunk-C7G6YPKG-Bhzd4FsL.js} +1 -1
  87. package/dist/public/assets/{chunk-CQNSW5MT-BzGo9Za_.js → chunk-CQNSW5MT-CVrDoms_.js} +1 -1
  88. package/dist/public/assets/{chunk-CYSBUYHQ-CKmnpHug.js → chunk-CYSBUYHQ-N9puYKAt.js} +1 -1
  89. package/dist/public/assets/{chunk-EMLP6XTP-_x7IkQoS.js → chunk-EMLP6XTP-ACA6yW7o.js} +1 -1
  90. package/dist/public/assets/{chunk-EX3LRPZG-Dp9dLoos.js → chunk-EX3LRPZG-BIvLDOrf.js} +1 -1
  91. package/dist/public/assets/{chunk-FWX5IMBZ-DS2bi_oI.js → chunk-FWX5IMBZ-1CESfm5O.js} +2 -2
  92. package/dist/public/assets/{chunk-HOUHSVGY-CiAzcmEO.js → chunk-HOUHSVGY-DTcG17JD.js} +1 -1
  93. package/dist/public/assets/{chunk-ICXQ74PX-COjRz7aI.js → chunk-ICXQ74PX-CDyWyZCQ.js} +1 -1
  94. package/dist/public/assets/{chunk-JG7HCLWE-BIqqOtX1.js → chunk-JG7HCLWE-gt52jYPR.js} +1 -1
  95. package/dist/public/assets/{chunk-JWPE2WC7-DKmcMFEN.js → chunk-JWPE2WC7-BIGkO1cG.js} +1 -1
  96. package/dist/public/assets/{chunk-MOJQB5TN-BJQv3CxF.js → chunk-MOJQB5TN-dX_Ns_6-.js} +1 -1
  97. package/dist/public/assets/{chunk-MOZMSUNE-Cy6wrRA7.js → chunk-MOZMSUNE-DtIvb1II.js} +1 -1
  98. package/dist/public/assets/{chunk-OGEWGWER-C7C3Oiaz.js → chunk-OGEWGWER-BgCGYbch.js} +1 -1
  99. package/dist/public/assets/{chunk-OSBZ3O6U-DmX-gaPq.js → chunk-OSBZ3O6U-BjU8eaT1.js} +1 -1
  100. package/dist/public/assets/{chunk-PUDLZKDR-ZoTPQ917.js → chunk-PUDLZKDR-BtLyPGmD.js} +1 -1
  101. package/dist/public/assets/{chunk-Q4XR5HBZ-sjes-Yon.js → chunk-Q4XR5HBZ-B32WTAPs.js} +1 -1
  102. package/dist/public/assets/{chunk-QBLGF6JB-BiU9LEk8.js → chunk-QBLGF6JB-CprENtRb.js} +1 -1
  103. package/dist/public/assets/{chunk-R7FJI6CG-BAfUnNIm.js → chunk-R7FJI6CG-DCV9Dvbs.js} +1 -1
  104. package/dist/public/assets/{chunk-RYQCIY6F-IRvgwbUs.js → chunk-RYQCIY6F-DAyLri1b.js} +1 -1
  105. package/dist/public/assets/{chunk-U6XO7XAA-2Ds3FX_A.js → chunk-U6XO7XAA-DSdpZQB7.js} +1 -1
  106. package/dist/public/assets/{chunk-V7JOEXUC-Xkrljz-l.js → chunk-V7JOEXUC-9lX7N0EN.js} +1 -1
  107. package/dist/public/assets/chunk-VAUOI2AC-buA1NS7h.js +1 -0
  108. package/dist/public/assets/{chunk-VR4S4FIN-Db6y0lij.js → chunk-VR4S4FIN-CcTJJ1HA.js} +1 -1
  109. package/dist/public/assets/{chunk-WYO6CB5R-WjatCbeP.js → chunk-WYO6CB5R-9yPqK9ib.js} +1 -1
  110. package/dist/public/assets/chunk-XXDRQBXY-Dpdm1nrz.js +1 -0
  111. package/dist/public/assets/{chunk-YOTPTUD7-BDIMzFfd.js → chunk-YOTPTUD7-DBti7bK5.js} +1 -1
  112. package/dist/public/assets/{chunk-ZGVPDNZ5-DKtGLh__.js → chunk-ZGVPDNZ5-5ruaVNfo.js} +1 -1
  113. package/dist/public/assets/{chunk-ZIRB5QZD-JvsKOaWe.js → chunk-ZIRB5QZD-DmY1977n.js} +1 -1
  114. package/dist/public/assets/classDiagram-OUVF2IWQ-BdRcUr99.js +1 -0
  115. package/dist/public/assets/classDiagram-v2-EOCWNBFH-4fffeoHu.js +1 -0
  116. package/dist/public/assets/client-version-BmlQC9U8.js +1 -0
  117. package/dist/public/assets/{config-provider-BvRqIV8_.js → config-provider-GshVNiWq.js} +2 -2
  118. package/dist/public/assets/{cose-bilkent-JH36ORCC-B5xjEHuC.js → cose-bilkent-JH36ORCC-D8nyC_t4.js} +1 -1
  119. package/dist/public/assets/cynefin-VYW2F7L2-BlrdxSfe.js +1 -0
  120. package/dist/public/assets/{cynefinDiagram-TSTJHNR4-BeGFvfoc.js → cynefinDiagram-TSTJHNR4-B4B58YEO.js} +1 -1
  121. package/dist/public/assets/{dagre-CLVncoxl.js → dagre-DjTdhlGF.js} +1 -1
  122. package/dist/public/assets/{dagre-VKFMJZFB-D98i06T_.js → dagre-VKFMJZFB-DQHmtQOE.js} +1 -1
  123. package/dist/public/assets/{diagram-FQU43EPY--u6SeKWp.js → diagram-FQU43EPY-B28ABQG6.js} +1 -1
  124. package/dist/public/assets/{diagram-G47NLZAW-BqkpNwsF.js → diagram-G47NLZAW-1MthGQcj.js} +1 -1
  125. package/dist/public/assets/{diagram-NH7WQ7WH-eeVqGH2O.js → diagram-NH7WQ7WH-B_Fhjw29.js} +1 -1
  126. package/dist/public/assets/{diagram-OA4YK3LP-D_SnUALW.js → diagram-OA4YK3LP-1B7_yz5p.js} +1 -1
  127. package/dist/public/assets/{diagram-WEI45ONY-DKlVw8je.js → diagram-WEI45ONY-DzfuKRxf.js} +1 -1
  128. package/dist/public/assets/{dist-CRnLx168.js → dist-Cgpf3BIr.js} +156 -154
  129. package/dist/public/assets/dist-ChSSPf9y.js +2 -0
  130. package/dist/public/assets/dist-CslAqn54.js +1 -0
  131. package/dist/public/assets/{dist-DQ4RxLMf.js → dist-DL8cni8v.js} +1 -1
  132. package/dist/public/assets/{doc-hash-DaHNz5tZ.js → doc-hash-Bso39bSh.js} +1 -1
  133. package/dist/public/assets/{documents-events-CO5GMB1j.js → documents-events-CtKncdGv.js} +1 -1
  134. package/dist/public/assets/{ebnfDiagram-CCIWWBDH-d0cDPEQB.js → ebnfDiagram-CCIWWBDH-BjazoYYO.js} +1 -1
  135. package/dist/public/assets/{erDiagram-Q63AITRT-BsZ0tL6Z.js → erDiagram-Q63AITRT-DvgiLWl5.js} +1 -1
  136. package/dist/public/assets/eventmodeling-45OFAUF4-D8s6Yevv.js +1 -0
  137. package/dist/public/assets/{file-tree-adapter-CMkAk18U.js → file-tree-adapter-SJF4yRd-.js} +1 -1
  138. package/dist/public/assets/{file-tree-utils-DW5kpGI7.js → file-tree-utils-llNa05uo.js} +1 -1
  139. package/dist/public/assets/flowDiagram-23GEKE2U-hlKdkNzZ.js +1 -0
  140. package/dist/public/assets/{ganttDiagram-NO4QXBWP-DPxkIh3b.js → ganttDiagram-NO4QXBWP-CJgOU-j1.js} +1 -1
  141. package/dist/public/assets/gitGraph-TEB2WS4Q-B-5iqxxO.js +1 -0
  142. package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-vSvxugX5.js → gitGraphDiagram-IHSO6WYX-DYP87cJL.js} +1 -1
  143. package/dist/public/assets/globals-88oPHAs4.css +1 -0
  144. package/dist/public/assets/{globals-CXEWtNVL.js → globals-BzYms-F0.js} +1 -1
  145. package/dist/public/assets/{graphlib-C4UD57Nn.js → graphlib-DYCc0Y9o.js} +1 -1
  146. package/dist/public/assets/{highlighted-body-OFNGDK62-DCKUiY8r.js → highlighted-body-OFNGDK62-C9GzQB8c.js} +1 -1
  147. package/dist/public/assets/index-BVWeqqNi.js +2014 -0
  148. package/dist/public/assets/info-DKCQHKI2-CkzkGEPY.js +1 -0
  149. package/dist/public/assets/{infoDiagram-FWYZ7A6U-Crh0f5aw.js → infoDiagram-FWYZ7A6U-CbZOQ254.js} +1 -1
  150. package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-DBJ4jEKk.js → ishikawaDiagram-FXEZZL3T-CUWPHUOP.js} +1 -1
  151. package/dist/public/assets/{journeyDiagram-5HDEW3XC-CUDo0rzP.js → journeyDiagram-5HDEW3XC-RLUp44OU.js} +1 -1
  152. package/dist/public/assets/{kanban-definition-HUTT4EX6-CJD8Oexf.js → kanban-definition-HUTT4EX6-D4TPhDQW.js} +1 -1
  153. package/dist/public/assets/{line-ClsiHw5g.js → line-KTG0S8eM.js} +1 -1
  154. package/dist/public/assets/{linear-BklRBRnp.js → linear-D6fTctUn.js} +1 -1
  155. package/dist/public/assets/lint-config-client-BYECwWuu.js +1 -0
  156. package/dist/public/assets/{map-CMaVsxPf.js → map-Rw6uJqFR.js} +1 -1
  157. package/dist/public/assets/{markdownlint-rule-browser-BkNWMW9T.js → markdownlint-rule-browser-BR80y6ho.js} +1 -1
  158. package/dist/public/assets/mermaid-GHXKKRXX-WtDC9WMV.js +1 -0
  159. package/dist/public/assets/{mermaid-parser.core-D-rj2UdW.js → mermaid-parser.core-CusxBOjy.js} +2 -2
  160. package/dist/public/assets/{mermaid.core-DZGNq3YZ.js → mermaid.core-okCkIUps.js} +3 -3
  161. package/dist/public/assets/{mindmap-definition-LN4V7U3C-Drk1V3-q.js → mindmap-definition-LN4V7U3C-D-eGlMvq.js} +1 -1
  162. package/dist/public/assets/{navigation-targets-BvMgbXSl.js → navigation-targets-SdStq-nY.js} +1 -1
  163. package/dist/public/assets/{now-Ck_JVNC2.js → now-DRL8tqfF.js} +1 -1
  164. package/dist/public/assets/{open-managed-artifact-tab-uWUnYmu7.js → open-managed-artifact-tab-CgQ5akUh.js} +1 -1
  165. package/dist/public/assets/{ordinal-DrDHGs3t.js → ordinal-DnmHW-WD.js} +1 -1
  166. package/dist/public/assets/overlay-layers-y-dNUWSd.js +1 -0
  167. package/dist/public/assets/packet-7NZHBO7P-DDIvLOTX.js +1 -0
  168. package/dist/public/assets/{pegDiagram-2B236MQR-CM3AjMbx.js → pegDiagram-2B236MQR-Bjnm3xCN.js} +1 -1
  169. package/dist/public/assets/{pending-receive-nav-store-ZP5ClzoO.js → pending-receive-nav-store-DTqMgVXW.js} +1 -1
  170. package/dist/public/assets/pie-RZYD4A2V-DnssmCEa.js +1 -0
  171. package/dist/public/assets/{pieDiagram-ENE6RG2P-D8wIwdwS.js → pieDiagram-ENE6RG2P-BkLpbnFN.js} +1 -1
  172. package/dist/public/assets/{prop-types-CaVq0ILj.js → prop-types-CU-rIGvv.js} +1 -1
  173. package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-h2Dtd1uI.js → quadrantDiagram-ABIIQ3AL-eMGNkhp-.js} +1 -1
  174. package/dist/public/assets/radar-I7S5WNFK-0J5y2_MO.js +1 -0
  175. package/dist/public/assets/railroad-3IZDKUUU-BgsONsxl.js +1 -0
  176. package/dist/public/assets/railroad-abnf-AHOZXSZD-BhBo_9j9.js +1 -0
  177. package/dist/public/assets/railroad-ebnf-EBAXGLYW-B5mHA2IL.js +1 -0
  178. package/dist/public/assets/railroad-peg-LSFZ7HO6-BV4uZ4WL.js +1 -0
  179. package/dist/public/assets/{railroadDiagram-RFXS5EU6-CLc68_Sv.js → railroadDiagram-RFXS5EU6-Cs70gdc4.js} +1 -1
  180. package/dist/public/assets/{receive-store-O26Klsmj.js → receive-store-C5uRDARd.js} +1 -1
  181. package/dist/public/assets/{requirementDiagram-TGXJPOKE-DtJA-6Zq.js → requirementDiagram-TGXJPOKE-yQhnovOU.js} +1 -1
  182. package/dist/public/assets/{sankeyDiagram-HTMAVEWB-Dw4-_oAZ.js → sankeyDiagram-HTMAVEWB-C7R3anws.js} +1 -1
  183. package/dist/public/assets/{selection-context-Cl9EWdbI.js → selection-context-DtzxXWAX.js} +1 -1
  184. package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-B4Af8Tp3.js → sequenceDiagram-DBY2YBRQ-CEdbVotz.js} +1 -1
  185. package/dist/public/assets/{sizeCapture-X5ZJPWSS-B7J9pg7l.js → sizeCapture-X5ZJPWSS-DAh96RVo.js} +1 -1
  186. package/dist/public/assets/skill-actions-PBEWDc_3.js +1 -0
  187. package/dist/public/assets/{skills-api-BxZRuTIF.js → skills-api-Cd3IvPjQ.js} +1 -1
  188. package/dist/public/assets/{src-D9eynQ26.js → src--OxBHrEw.js} +1 -1
  189. package/dist/public/assets/{src-BPnSaHfB.js → src-Dum6a22K.js} +2 -2
  190. package/dist/public/assets/{stateDiagram-2N3HPSRC-L3VR_LMr.js → stateDiagram-2N3HPSRC-q96Dmt4i.js} +1 -1
  191. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-BCNHhMpC.js +1 -0
  192. package/dist/public/assets/{swimlanes-5IMT3BWC-CRfWYpqt.js → swimlanes-5IMT3BWC--g7Ac5Wk.js} +2 -2
  193. package/dist/public/assets/swimlanesDiagram-G3AALYLV-hRuoLGg3.js +8 -0
  194. package/dist/public/assets/{tag-pill-input-D3yKn_j2.js → tag-pill-input-CS-2Qx-_.js} +1 -1
  195. package/dist/public/assets/{target-navigation-intent-DKN8qckv.js → target-navigation-intent-D3w-HLu3.js} +1 -1
  196. package/dist/public/assets/{telemetry-impl-DXiL3sBk.js → telemetry-impl-Z8PmW_aL.js} +2 -2
  197. package/dist/public/assets/{telemetry-startup-Db44p95P.js → telemetry-startup-Cy7C8oSF.js} +1 -1
  198. package/dist/public/assets/{terminal-launch-events-cbz64adZ.js → terminal-launch-events-CTVJjVZG.js} +1 -1
  199. package/dist/public/assets/{terminal-telemetry-B-8TrAWX.js → terminal-telemetry-pdIn1zDv.js} +1 -1
  200. package/dist/public/assets/thread-client-C0O75Kza.js +1 -0
  201. package/dist/public/assets/{timeline-definition-FHXFAJF6-C1Qc7Dba.js → timeline-definition-FHXFAJF6-DqrkK_6w.js} +1 -1
  202. package/dist/public/assets/treeView-QDETBFTQ-N2YNex2I.js +1 -0
  203. package/dist/public/assets/treemap-6X3UGDF4-DkzYKeau.js +1 -0
  204. package/dist/public/assets/{typing-burst-detector-DNp0nd7d.js → typing-burst-detector-BEbZgL9-.js} +2 -2
  205. package/dist/public/assets/{uninstall-B_24eCu8.js → uninstall-BpVYvA3J.js} +1 -1
  206. package/dist/public/assets/use-activity-panel-B8RDBgok.js +1 -0
  207. package/dist/public/assets/use-apply-config-color-theme-A0jx7vnI.js +2 -0
  208. package/dist/public/assets/{use-collab-url-DKVO0F_k.js → use-collab-url-bpUtly6S.js} +1 -1
  209. package/dist/public/assets/{use-live-xterm-theme-DxXMX-ZB.js → use-live-xterm-theme-w8QeNUlq.js} +1 -1
  210. package/dist/public/assets/{use-settings-route-R3f95s9q.js → use-settings-route-CFvCFlXS.js} +1 -1
  211. package/dist/public/assets/{use-terminal-enabled-FmmwhtBs.js → use-terminal-enabled-CuFAAh8J.js} +1 -1
  212. package/dist/public/assets/use-timeline-entry-diff-DlW9hmrR.js +6 -0
  213. package/dist/public/assets/{use-workspace-DQ7VjlT1.js → use-workspace-CNWEPWim.js} +1 -1
  214. package/dist/public/assets/{vennDiagram-L72KCM5P-C4cNDPVl.js → vennDiagram-L72KCM5P-DFSXk11G.js} +1 -1
  215. package/dist/public/assets/wardley-OPB4EBWU-OOiOMSoP.js +1 -0
  216. package/dist/public/assets/{wardleyDiagram-EHGQE667-B2UY3KQf.js → wardleyDiagram-EHGQE667-Bw65HviB.js} +1 -1
  217. package/dist/public/assets/{workspace-paths-CFyvLimb.js → workspace-paths-DQOJHVhV.js} +1 -1
  218. package/dist/public/assets/{xychartDiagram-FW5EYKEG-CMsrwnL2.js → xychartDiagram-FW5EYKEG-CEVfZ0d5.js} +1 -1
  219. package/dist/public/index.html +55 -53
  220. package/dist/public/uninstall.html +5 -5
  221. package/dist/{repair-launch-json-CyzMH3Dg.mjs → repair-launch-json-_2TGq22B.mjs} +2 -2
  222. package/dist/{repair-mcp-configs-Bk1NyiZ4.mjs → repair-mcp-configs-Cf6t84yK.mjs} +2 -2
  223. package/dist/repair-skills-CtpTVpw_.mjs +1 -0
  224. package/dist/{repair-skills-C0Geadpr.mjs → repair-skills-DwQqF8O8.mjs} +2 -2
  225. package/dist/schemas/v0/config.project.schema.json +154 -0
  226. package/dist/server-lock-CZMSbPZ0.mjs +1 -0
  227. package/dist/{server-lock-rqh-yT8R.mjs → server-lock-DpWXnrNF.mjs} +2 -2
  228. package/dist/{sleep-B2L0pvp4.mjs → sleep-DTzPXGtM.mjs} +5 -5
  229. package/dist/src-BFcAqZ_V.mjs +1 -0
  230. package/dist/src-BkP5u3RK.mjs +3269 -0
  231. package/dist/{src-Q2mWJGdH.mjs → src-DY417osM.mjs} +124 -120
  232. package/dist/src-JZ7OJ1TB.mjs +20 -0
  233. package/dist/start-0twfe-vW.mjs +1 -0
  234. package/dist/{start-CNop6WpI.mjs → start-BcTJLNem.mjs} +2 -2
  235. package/dist/{write-project-skill-CG87XS-d.mjs → write-project-skill-cxdqSDsT.mjs} +4 -4
  236. package/package.json +5 -5
  237. package/dist/build-L3kflBeC.mjs +0 -1
  238. package/dist/constants-W4BDL0X1.mjs +0 -2
  239. package/dist/fs-traced-BpCA6YXG.mjs +0 -1
  240. package/dist/git-handle-maG17s4k.mjs +0 -1
  241. package/dist/init-CVeJ6jGy.mjs +0 -1
  242. package/dist/loader-DXTwcp6f.mjs +0 -1
  243. package/dist/md-manager-BHEZ9tjn.mjs +0 -2
  244. package/dist/preview-zru6Ga5A.mjs +0 -1
  245. package/dist/public/assets/ActivityModeContent-Cga3MNl5.js +0 -1
  246. package/dist/public/assets/AgentDiffPane-D51hdGMm.js +0 -2
  247. package/dist/public/assets/CodeMirrorPropInput-C5y2rXYX.js +0 -3
  248. package/dist/public/assets/DocumentContext-9aHVrow4.js +0 -38
  249. package/dist/public/assets/FeedbackForm-C2LaBRN9.js +0 -1
  250. package/dist/public/assets/GraphPanel-Bp-rgKAp.js +0 -44
  251. package/dist/public/assets/ManagedArtifactProperties-RLiPia3Z.js +0 -1
  252. package/dist/public/assets/MermaidDocEditor-LMmhg9P3.js +0 -1
  253. package/dist/public/assets/PropertyPanel-BInrc8Dz.js +0 -2
  254. package/dist/public/assets/ReportBugDialogBody-CN9m_7Kk.js +0 -2
  255. package/dist/public/assets/SettingsDialogBody-BCxbiRlp.js +0 -7
  256. package/dist/public/assets/SourceEditor-DEzHIX3Z.js +0 -1
  257. package/dist/public/assets/TerminalSessionsHost-BApXyKBm.js +0 -2
  258. package/dist/public/assets/ThreadView-B0tKB64Q.js +0 -6
  259. package/dist/public/assets/TimelineDiffPane-ErJoJPn_.js +0 -2
  260. package/dist/public/assets/architecture-TIHT7OUA-D0qm7G-3.js +0 -1
  261. package/dist/public/assets/auth-state-cache-HjMem9G-.js +0 -11
  262. package/dist/public/assets/channel-DA_5WVVG.js +0 -1
  263. package/dist/public/assets/chunk-2Q5K7J3B-CZvundFv.js +0 -1
  264. package/dist/public/assets/chunk-VAUOI2AC-CzpwkaIj.js +0 -1
  265. package/dist/public/assets/chunk-XXDRQBXY-aujsIsPx.js +0 -1
  266. package/dist/public/assets/classDiagram-OUVF2IWQ-DaJYvXbz.js +0 -1
  267. package/dist/public/assets/classDiagram-v2-EOCWNBFH-naGS_xxO.js +0 -1
  268. package/dist/public/assets/client-version-Cx5VddNZ.js +0 -1
  269. package/dist/public/assets/cynefin-VYW2F7L2-BIoIBt-C.js +0 -1
  270. package/dist/public/assets/dist-B1qkpf98.js +0 -2
  271. package/dist/public/assets/eventmodeling-45OFAUF4-DJJWSxES.js +0 -1
  272. package/dist/public/assets/flowDiagram-23GEKE2U-BDvIWhMq.js +0 -1
  273. package/dist/public/assets/gitGraph-TEB2WS4Q-DbaUaLPe.js +0 -1
  274. package/dist/public/assets/globals-GYHxaktb.css +0 -1
  275. package/dist/public/assets/index-BvwEhh3F.js +0 -2014
  276. package/dist/public/assets/info-DKCQHKI2-t_ReTPP2.js +0 -1
  277. package/dist/public/assets/lint-config-client-ClOK3XHG.js +0 -1
  278. package/dist/public/assets/mermaid-GHXKKRXX-Cj1_l2m9.js +0 -1
  279. package/dist/public/assets/packet-7NZHBO7P-DvVA7lgt.js +0 -1
  280. package/dist/public/assets/pie-RZYD4A2V-THg35hJ6.js +0 -1
  281. package/dist/public/assets/radar-I7S5WNFK-Cnae5YqF.js +0 -1
  282. package/dist/public/assets/railroad-3IZDKUUU-z19uKrUP.js +0 -1
  283. package/dist/public/assets/railroad-abnf-AHOZXSZD-BUg9AO49.js +0 -1
  284. package/dist/public/assets/railroad-ebnf-EBAXGLYW-DuBtfJ_K.js +0 -1
  285. package/dist/public/assets/railroad-peg-LSFZ7HO6-BSfcErEJ.js +0 -1
  286. package/dist/public/assets/skill-actions-BOEtYQao.js +0 -1
  287. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-DM5o7mT7.js +0 -1
  288. package/dist/public/assets/swimlanesDiagram-G3AALYLV-BTrTvdTh.js +0 -8
  289. package/dist/public/assets/thread-client-CurKSSA8.js +0 -1
  290. package/dist/public/assets/treeView-QDETBFTQ-nC4bzLZB.js +0 -1
  291. package/dist/public/assets/treemap-6X3UGDF4-D1MGcMAJ.js +0 -1
  292. package/dist/public/assets/use-activity-panel-CcjzkedG.js +0 -1
  293. package/dist/public/assets/use-apply-config-color-theme-CsOxA7Ln.js +0 -2
  294. package/dist/public/assets/use-timeline-entry-diff-CqINluw6.js +0 -6
  295. package/dist/public/assets/wardley-OPB4EBWU-Dt2lEMaH.js +0 -1
  296. package/dist/repair-skills-D19a_XVe.mjs +0 -1
  297. package/dist/server-lock-DUfHjP3M.mjs +0 -1
  298. package/dist/src-CfIUSiib.mjs +0 -22
  299. package/dist/src-DF_K89lg.mjs +0 -1
  300. package/dist/src-phea8qFf.mjs +0 -3265
  301. package/dist/start-C651KlAq.mjs +0 -1
  302. /package/dist/public/assets/{ActivityPanelDiffView-CSOgz1F9.js → ActivityPanelDiffView-B03Wzvap.js} +0 -0
  303. /package/dist/public/assets/{AppMenubar-CXadCCMc.js → AppMenubar-Bisp0k8X.js} +0 -0
  304. /package/dist/public/assets/{BugReportHistoryDialog-B5Yf5rAM.js → BugReportHistoryDialog-Bp4PHyEI.js} +0 -0
  305. /package/dist/public/assets/{__vite-browser-external-T_MG5_bv.js → __vite-browser-external-BckCY-VI.js} +0 -0
  306. /package/dist/public/assets/{agent-presence-CTJkQnoU.js → agent-presence-CEfNcJUY.js} +0 -0
  307. /package/dist/public/assets/{array-BAI_NyvG.js → array-D9gZmznT.js} +0 -0
  308. /package/dist/public/assets/{chunk-KEIR6QF5-BSqm2tNO.js → chunk-KEIR6QF5-zkgbDrf9.js} +0 -0
  309. /package/dist/public/assets/{chunk-Y2CYZVJY-BCLrJxO_.js → chunk-Y2CYZVJY-BAUBUeAF.js} +0 -0
  310. /package/dist/public/assets/{clike-CkWR_Slw.js → clike-ccBqxK3t.js} +0 -0
  311. /package/dist/public/assets/{clipboard-adapter--Ja4oXEM.js → clipboard-adapter-Cxzkvc1d.js} +0 -0
  312. /package/dist/public/assets/{colors-C1oQkVlI.js → colors-BZ7r12jC.js} +0 -0
  313. /package/dist/public/assets/{copilot-BAzfPGty.js → copilot-CjOGWDvv.js} +0 -0
  314. /package/dist/public/assets/{cursor-C1n4GZG0.js → cursor-B8rehP9c.js} +0 -0
  315. /package/dist/public/assets/{cytoscape.esm-ewu4kfMU.js → cytoscape.esm-GtliGICm.js} +0 -0
  316. /package/dist/public/assets/{defaultLocale-C0VJf-tm.js → defaultLocale-CqKPYlUZ.js} +0 -0
  317. /package/dist/public/assets/{diff-BsdYbIgD.js → diff-oW0nWZgn.js} +0 -0
  318. /package/dist/public/assets/{dist-DDqBNQiG.js → dist-B1Jbz0yl.js} +0 -0
  319. /package/dist/public/assets/{dist-d-7NE8aL.js → dist-Cqbn6bM9.js} +0 -0
  320. /package/dist/public/assets/{dist-BF6U-ayK.js → dist-D1zECWv_.js} +0 -0
  321. /package/dist/public/assets/{dist-BocybIB-.js → dist-zCmaEyrL.js} +0 -0
  322. /package/dist/public/assets/{follow-file-DBnmqlyk.js → follow-file-BghdVu5J.js} +0 -0
  323. /package/dist/public/assets/{form-D-z6QdLf.js → form-coxG-8Qw.js} +0 -0
  324. /package/dist/public/assets/{format-BVhfvqw3.js → format-CejNFduS.js} +0 -0
  325. /package/dist/public/assets/{go-D-ZJPtwk.js → go-CCS4kWKN.js} +0 -0
  326. /package/dist/public/assets/{init-BX0_4ZBD.js → init-CMTNTj66.js} +0 -0
  327. /package/dist/public/assets/{isObject-BkQ5hIlp.js → isObject-Ho9jn-6g.js} +0 -0
  328. /package/dist/public/assets/{libesm-CHqp8owk.js → libesm-Db-3Gx3Z.js} +0 -0
  329. /package/dist/public/assets/{lint-plugin-meta-B3N1DKgL.js → lint-plugin-meta-J-wb-uxW.js} +0 -0
  330. /package/dist/public/assets/{lru-string-cache-hwDoWobi.js → lru-string-cache-BZxOuxTi.js} +0 -0
  331. /package/dist/public/assets/{lua-Cx3bDzQk.js → lua-DgAwqJ0D.js} +0 -0
  332. /package/dist/public/assets/{mcp-consent-store-Xk9UA_MB.js → mcp-consent-store-wvrClpLC.js} +0 -0
  333. /package/dist/public/assets/{min-Bd9Lorof.js → min-BQPeeNfF.js} +0 -0
  334. /package/dist/public/assets/{panel-Cyobla0Z.js → panel-C8ZhM4q-.js} +0 -0
  335. /package/dist/public/assets/{panzoom.es-B9Lp3OVt.js → panzoom.es-CxTS7ZPP.js} +0 -0
  336. /package/dist/public/assets/{path-C1_RvjGX.js → path-DoEWlp6O.js} +0 -0
  337. /package/dist/public/assets/{pdf-B7Y_z-D1.js → pdf-Da_O_GF5.js} +0 -0
  338. /package/dist/public/assets/{pdf.worker-B6TdDPWM.js → pdf.worker-Pbs_-93C.js} +0 -0
  339. /package/dist/public/assets/{perl-CV3dlsd7.js → perl-DMwerdcj.js} +0 -0
  340. /package/dist/public/assets/{properties-D1GaCcfv.js → properties-Du1Kuwqc.js} +0 -0
  341. /package/dist/public/assets/{r-CHRF940O.js → r-wSvpRg5h.js} +0 -0
  342. /package/dist/public/assets/{rough.esm-B1nzhEZO.js → rough.esm-esi5HKC4.js} +0 -0
  343. /package/dist/public/assets/{ruby-YzQuyklS.js → ruby-DuM6hMQW.js} +0 -0
  344. /package/dist/public/assets/{schema-fields-view-intent-Dz1ZzVCe.js → schema-fields-view-intent-BeD8vY0v.js} +0 -0
  345. /package/dist/public/assets/{share-metadata-rows-BlaR96La.js → share-metadata-rows-CbXHISQ4.js} +0 -0
  346. /package/dist/public/assets/{shell-BvVJAeXE.js → shell-BZ7mgeL0.js} +0 -0
  347. /package/dist/public/assets/{skeleton-HLkcMp95.js → skeleton-BG12Hmzn.js} +0 -0
  348. /package/dist/public/assets/{sortable.esm-B6whf_t-.js → sortable.esm-C565D25d.js} +0 -0
  349. /package/dist/public/assets/{sql-CECtKdDi.js → sql-BXdRuz6d.js} +0 -0
  350. /package/dist/public/assets/{src-BaTc8y5c.js → src-DNE52RZP.js} +0 -0
  351. /package/dist/public/assets/{swift-DLct3DJs.js → swift-DZwxTp-L.js} +0 -0
  352. /package/dist/public/assets/{textarea-RSYJwPz9.js → textarea-tdCJViKf.js} +0 -0
  353. /package/dist/public/assets/{thread-draft-staging-B4_1TigQ.js → thread-draft-staging-BuvCYJwg.js} +0 -0
  354. /package/dist/public/assets/{toml-Bl-Vp4wG.js → toml-C5KR4pi6.js} +0 -0
  355. /package/dist/public/assets/{use-installed-clis-B_nDAq7A.js → use-installed-clis-UlK7P1aH.js} +0 -0
  356. /package/dist/public/assets/{useLintConfigViewMode-BYm6FwC5.js → useLintConfigViewMode-DKPENttR.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-DTipWd-i.mjs";import{K as o,S as s,_ as c,d as l,f as u,g as d,h as f,i as p,l as m,m as h,n as g,o as ee,p as te,s as ne,t as re}from"./sleep-B2L0pvp4.mjs";import{a as _,c as ie,i as ae,n as v,o as y,r as b,s as oe,t as x}from"./esm-CItKw7Y6.mjs";import{C as se,_ as S,c as ce,g as le,h as ue,m as de,o as fe,r as pe,v as me,w as he,y as C}from"./logger-B7Z8XO-z.mjs";import{basename as w,dirname as T,isAbsolute as ge,join as _e,resolve as E,sep as D}from"node:path";import{appendFileSync as ve,closeSync as ye,cpSync as be,existsSync as xe,linkSync as Se,mkdirSync as Ce,openSync as we,readFileSync as Te,readdirSync as Ee,renameSync as De,rmSync as Oe,rmdirSync as ke,statSync as Ae,symlinkSync as je,unlinkSync as O,writeFileSync as Me}from"node:fs";import{homedir as Ne}from"node:os";import{appendFile as Pe,mkdir as Fe,readdir as Ie,rename as Le,rm as Re,stat as ze,unlink as Be,writeFile as Ve}from"node:fs/promises";import*as He from"zlib";import{Readable as Ue}from"stream";var k=o();v();const We=3e4,Ge={writeFile:(e,t,n)=>Ve(e,t,n),rename:(e,t)=>Le(e,t)};async function Ke(e){try{let t=T(e),n=`${w(e)}.tmp.`,r=Date.now()-We,i=await Ie(t);await Promise.all(i.map(async e=>{if(!e.startsWith(n))return;let i=_e(t,e);try{(await ze(i)).mtimeMs<r&&await Be(i)}catch{}}))}catch{}}function qe(e){try{let t=T(e),n=`${w(e)}.tmp.`,r=Date.now()-We;for(let e of Ee(t)){if(!e.startsWith(n))continue;let i=_e(t,e);try{Ae(i).mtimeMs<r&&O(i)}catch{}}}catch{}}async function Je(e,t,n={}){await Ke(e);let r=n.fs??Ge,i=`${e}.tmp.${crypto.randomUUID()}`;try{await r.writeFile(i,t,{encoding:`utf-8`,mode:n.mode??420}),await r.rename(i,e)}catch(e){try{O(i)}catch{}throw e}}function Ye(e,t,n={}){qe(e);let r=`${e}.tmp.${crypto.randomUUID()}`;try{Me(r,t,{encoding:`utf-8`,mode:n.mode??420}),De(r,e)}catch(e){try{O(r)}catch{}throw e}}var A=class extends Error{code=`LOCK_TIMEOUT`;lockPath;timeoutMs;constructor(e,t){super(`Could not acquire file lock at ${e} within ${t}ms`),this.name=`FileLockTimeoutError`,this.lockPath=e,this.timeoutMs=t}};async function Xe(e,t,n={}){let r=n.timeoutMs??5e3,i=n.retryIntervalMs??25,a=r*2,o=Date.now()+r;for(;;){let s;try{s=we(e,`wx`,384)}catch(t){if(t.code!==`EEXIST`)throw t;let s;try{let t=Ae(e);s=Date.now()-t.mtimeMs}catch{continue}let c=!1;if(s>a){n.onWarn?.(`cleared stale file lock`,{lockPath:e,ageMs:s,staleThresholdMs:a});try{O(e),c=!0}catch{}}if(c)continue;if(Date.now()>=o)throw new A(e,r);await re(i);continue}try{return await t()}finally{try{ye(s)}catch{}try{O(e)}catch{}}}}function Ze(e){let t=Date.now()+e;for(;Date.now()<t;);}function Qe(e,t,n={}){let r=n.timeoutMs??5e3,i=n.retryIntervalMs??25,a=r*2,o=Date.now()+r;for(;;){let s;try{s=we(e,`wx`,384)}catch(t){if(t.code!==`EEXIST`)throw t;let s;try{let t=Ae(e);s=Date.now()-t.mtimeMs}catch{continue}let c=!1;if(s>a){n.onWarn?.(`cleared stale file lock`,{lockPath:e,ageMs:s,staleThresholdMs:a});try{O(e),c=!0}catch{}}if(c)continue;if(Date.now()>=o)throw new A(e,r);Ze(i);continue}try{return t()}finally{try{ye(s)}catch{}try{O(e)}catch{}}}}const $e=`config.yml`;function et(e){return`https://unpkg.com/@inkeep/open-knowledge@latest/dist/schemas/${p}/${e===`user`?`config.user.schema.json`:e===`project-local`?`config.project-local.schema.json`:`config.project.schema.json`}`}function tt(e){return`# yaml-language-server: $schema=${et(e)}\n`}function nt(e,t,n){if(e===`user`)return E(n??Ne(),`.ok`,`global.yml`);let r=ge(t)?t:E(t);return e===`project-local`?E(r,`.ok`,g,$e):E(r,`.ok`,$e)}function j(e){return{ok:!1,error:e}}function rt(e){return{ok:!0,...e}}async function it(e){return f(`config.patch`,{"config.scope":e.scope,"config.transport":`fs`},async t=>{let n=await at(e);return t.setAttribute(`config.outcome`,n.ok?`success`:`rejected`),n.ok||t.setAttribute(`config.error.code`,n.error.code),n})}async function at(e){let{cwd:t,scope:n,patch:r,homedirOverride:i}=e,a=nt(n,t,i),o=te(r,n);if(o!==null)return j(o);try{await Fe(T(a),{recursive:!0})}catch(e){return j({code:`WRITE_ERROR`,detail:`Could not create parent directory for ${a}: ${e instanceof Error?e.message:String(e)}`})}try{return await Xe(`${a}.lock`,()=>ot(e,a))}catch(e){if(e instanceof A)return j({code:`WRITE_ERROR`,detail:e.message});throw e}}async function ot(e,t){let{patch:n,scope:r,firstWriteHeader:i}=e,a=``,o=!1;if(xe(t)){o=!0;try{a=Te(t,`utf-8`)}catch(e){return j({code:`WRITE_ERROR`,detail:`Could not read existing config: ${e instanceof Error?e.message:String(e)}`})}}let s=(0,k.parseDocument)(a);if(s.errors.length>0)return j({code:`YAML_PARSE`,detail:s.errors.map(e=>e.message).join(`; `)});if(s.contents===null)s.contents=s.createNode({});else if(!(0,k.isMap)(s.contents))return j({code:`YAML_PARSE`,detail:`Top-level YAML value must be a mapping (object), got ${(0,k.isSeq)(s.contents)?`sequence`:`scalar`}`});let f=l(s,n),p=s.toJSON(),m=d(`config.validate`,{"config.scope":r,"config.validation.layer":`L2`},e=>{let t=c.safeParse(p);if(e.setAttribute(`config.outcome`,t.success?`success`:`rejected`),!t.success)for(let e of t.error.issues)h(`config.validation.issue`,{"issue.path":e.path.map(e=>String(e)).join(`.`),"issue.message":e.message});return t});if(!m.success)return j({code:`SCHEMA_INVALID`,issues:m.error.issues.map(u)});let g=s.toString();if(!o){let e=i===void 0?tt(r):i??``;e.length>0&&(g=`${e.endsWith(`
1
+ import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-DTipWd-i.mjs";import{K as o,S as s,_ as c,d as l,f as u,g as d,h as f,i as p,l as m,m as h,n as g,o as ee,p as te,s as ne,t as re}from"./sleep-DTzPXGtM.mjs";import{a as _,c as ie,i as ae,n as v,o as y,r as b,s as oe,t as x}from"./esm-CItKw7Y6.mjs";import{C as se,_ as S,c as ce,g as le,h as ue,m as de,o as fe,r as pe,v as me,w as he,y as C}from"./logger-B7Z8XO-z.mjs";import{basename as w,dirname as T,isAbsolute as ge,join as _e,resolve as E,sep as D}from"node:path";import{appendFileSync as ve,closeSync as ye,cpSync as be,existsSync as xe,linkSync as Se,mkdirSync as Ce,openSync as we,readFileSync as Te,readdirSync as Ee,renameSync as De,rmSync as Oe,rmdirSync as ke,statSync as Ae,symlinkSync as je,unlinkSync as O,writeFileSync as Me}from"node:fs";import{homedir as Ne}from"node:os";import{appendFile as Pe,mkdir as Fe,readdir as Ie,rename as Le,rm as Re,stat as ze,unlink as Be,writeFile as Ve}from"node:fs/promises";import*as He from"zlib";import{Readable as Ue}from"stream";var k=o();v();const We=3e4,Ge={writeFile:(e,t,n)=>Ve(e,t,n),rename:(e,t)=>Le(e,t)};async function Ke(e){try{let t=T(e),n=`${w(e)}.tmp.`,r=Date.now()-We,i=await Ie(t);await Promise.all(i.map(async e=>{if(!e.startsWith(n))return;let i=_e(t,e);try{(await ze(i)).mtimeMs<r&&await Be(i)}catch{}}))}catch{}}function qe(e){try{let t=T(e),n=`${w(e)}.tmp.`,r=Date.now()-We;for(let e of Ee(t)){if(!e.startsWith(n))continue;let i=_e(t,e);try{Ae(i).mtimeMs<r&&O(i)}catch{}}}catch{}}async function Je(e,t,n={}){await Ke(e);let r=n.fs??Ge,i=`${e}.tmp.${crypto.randomUUID()}`;try{await r.writeFile(i,t,{encoding:`utf-8`,mode:n.mode??420}),await r.rename(i,e)}catch(e){try{O(i)}catch{}throw e}}function Ye(e,t,n={}){qe(e);let r=`${e}.tmp.${crypto.randomUUID()}`;try{Me(r,t,{encoding:`utf-8`,mode:n.mode??420}),De(r,e)}catch(e){try{O(r)}catch{}throw e}}var A=class extends Error{code=`LOCK_TIMEOUT`;lockPath;timeoutMs;constructor(e,t){super(`Could not acquire file lock at ${e} within ${t}ms`),this.name=`FileLockTimeoutError`,this.lockPath=e,this.timeoutMs=t}};async function Xe(e,t,n={}){let r=n.timeoutMs??5e3,i=n.retryIntervalMs??25,a=r*2,o=Date.now()+r;for(;;){let s;try{s=we(e,`wx`,384)}catch(t){if(t.code!==`EEXIST`)throw t;let s;try{let t=Ae(e);s=Date.now()-t.mtimeMs}catch{continue}let c=!1;if(s>a){n.onWarn?.(`cleared stale file lock`,{lockPath:e,ageMs:s,staleThresholdMs:a});try{O(e),c=!0}catch{}}if(c)continue;if(Date.now()>=o)throw new A(e,r);await re(i);continue}try{return await t()}finally{try{ye(s)}catch{}try{O(e)}catch{}}}}function Ze(e){let t=Date.now()+e;for(;Date.now()<t;);}function Qe(e,t,n={}){let r=n.timeoutMs??5e3,i=n.retryIntervalMs??25,a=r*2,o=Date.now()+r;for(;;){let s;try{s=we(e,`wx`,384)}catch(t){if(t.code!==`EEXIST`)throw t;let s;try{let t=Ae(e);s=Date.now()-t.mtimeMs}catch{continue}let c=!1;if(s>a){n.onWarn?.(`cleared stale file lock`,{lockPath:e,ageMs:s,staleThresholdMs:a});try{O(e),c=!0}catch{}}if(c)continue;if(Date.now()>=o)throw new A(e,r);Ze(i);continue}try{return t()}finally{try{ye(s)}catch{}try{O(e)}catch{}}}}const $e=`config.yml`;function et(e){return`https://unpkg.com/@inkeep/open-knowledge@latest/dist/schemas/${p}/${e===`user`?`config.user.schema.json`:e===`project-local`?`config.project-local.schema.json`:`config.project.schema.json`}`}function tt(e){return`# yaml-language-server: $schema=${et(e)}\n`}function nt(e,t,n){if(e===`user`)return E(n??Ne(),`.ok`,`global.yml`);let r=ge(t)?t:E(t);return e===`project-local`?E(r,`.ok`,g,$e):E(r,`.ok`,$e)}function j(e){return{ok:!1,error:e}}function rt(e){return{ok:!0,...e}}async function it(e){return f(`config.patch`,{"config.scope":e.scope,"config.transport":`fs`},async t=>{let n=await at(e);return t.setAttribute(`config.outcome`,n.ok?`success`:`rejected`),n.ok||t.setAttribute(`config.error.code`,n.error.code),n})}async function at(e){let{cwd:t,scope:n,patch:r,homedirOverride:i}=e,a=nt(n,t,i),o=te(r,n);if(o!==null)return j(o);try{await Fe(T(a),{recursive:!0})}catch(e){return j({code:`WRITE_ERROR`,detail:`Could not create parent directory for ${a}: ${e instanceof Error?e.message:String(e)}`})}try{return await Xe(`${a}.lock`,()=>ot(e,a))}catch(e){if(e instanceof A)return j({code:`WRITE_ERROR`,detail:e.message});throw e}}async function ot(e,t){let{patch:n,scope:r,firstWriteHeader:i}=e,a=``,o=!1;if(xe(t)){o=!0;try{a=Te(t,`utf-8`)}catch(e){return j({code:`WRITE_ERROR`,detail:`Could not read existing config: ${e instanceof Error?e.message:String(e)}`})}}let s=(0,k.parseDocument)(a);if(s.errors.length>0)return j({code:`YAML_PARSE`,detail:s.errors.map(e=>e.message).join(`; `)});if(s.contents===null)s.contents=s.createNode({});else if(!(0,k.isMap)(s.contents))return j({code:`YAML_PARSE`,detail:`Top-level YAML value must be a mapping (object), got ${(0,k.isSeq)(s.contents)?`sequence`:`scalar`}`});let f=l(s,n),p=s.toJSON(),m=d(`config.validate`,{"config.scope":r,"config.validation.layer":`L2`},e=>{let t=c.safeParse(p);if(e.setAttribute(`config.outcome`,t.success?`success`:`rejected`),!t.success)for(let e of t.error.issues)h(`config.validation.issue`,{"issue.path":e.path.map(e=>String(e)).join(`.`),"issue.message":e.message});return t});if(!m.success)return j({code:`SCHEMA_INVALID`,issues:m.error.issues.map(u)});let g=s.toString();if(!o){let e=i===void 0?tt(r):i??``;e.length>0&&(g=`${e.endsWith(`
2
2
  `)?e:`${e}\n`}${g}`)}try{await Fe(T(t),{recursive:!0})}catch(e){return j({code:`WRITE_ERROR`,detail:`Could not create parent directory for ${t}: ${e instanceof Error?e.message:String(e)}`})}try{await Je(t,g)}catch(e){return j({code:`WRITE_ERROR`,detail:`Could not write ${t}: ${e instanceof Error?e.message:String(e)}`})}return rt({effective:m.data,appliedPaths:f,path:t,created:!o})}function st(e,t,n,r){return e.success?{code:`UNKNOWN`,message:`unexpected success in error path`}:{code:`SCHEMA_INVALID`,issues:e.error.issues.map(e=>{let i=e.path.map(e=>typeof e==`symbol`?String(e):e),a=ne({file:r,source:n,doc:t,path:i});return{path:i,message:e.message,issueCode:e.code,...a===void 0?{}:{source:a}}})}}function ct(e,t,n){let r=`${e}.invalid-${t.replace(/[:.]/g,`-`)}`;try{return De(e,r),r}catch(t){n(`[config] Could not sideline invalid config file ${e} → ${r}: ${t instanceof Error?t.message:String(t)}. File left in place; using schema defaults.`);return}}function lt(e){let{absPath:t,sideline:n=!0,timestamp:r=new Date().toISOString()}=e,i=e.warn??(e=>console.warn(e)),a=c.parse({});if(!xe(t))return{valid:!0,value:a,source:void 0};let o;try{o=Te(t,`utf-8`)}catch(e){let n=e instanceof Error?e.message:String(e);return i(`[config] Could not read ${t}: ${n}. Using schema defaults.`),{valid:!1,value:a,error:{code:`UNKNOWN`,message:`Read failed: ${n}`}}}let s=(0,k.parseDocument)(o);if(s.errors.length>0){let e=s.errors.map(e=>e.message).join(`; `);i(`[config] ${t} contains invalid YAML (${e}). Using schema defaults.`+(n?``:` Pass-through mode: file left in place.`));let o=n?ct(t,r,i):void 0;return{valid:!1,value:a,error:{code:`YAML_PARSE`,detail:e},...o===void 0?{}:{sidelinedTo:o}}}let l=s.toJSON()??{},u=c.safeParse(l);if(!u.success){let e=st(u,s,o,t);i(`[config] ${t} fails schema validation (${u.error.issues.length} issue(s)). Using schema defaults.`+(n?``:` Pass-through mode: file left in place.`));let c=n?ct(t,r,i):void 0;return{valid:!1,value:a,error:e,...c===void 0?{}:{sidelinedTo:c}}}let d=ee({value:l,file:t,source:o,doc:s}),f=d[0];if(f!==void 0){i(`[config] ${t} carries removed config key(s):\n${d.map(m).join(`
3
3
 
4
4
  `)}\nUsing schema defaults.`+(n?``:` Pass-through mode: file left in place.`));let e=n?ct(t,r,i):void 0;return{valid:!1,value:a,error:f,...e===void 0?{}:{sidelinedTo:e}}}return{valid:!0,value:u.data,source:t}}var ut=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AbstractAsyncHooksContextManager=void 0;let n=t(`events`),r=[`addListener`,`on`,`once`,`prependListener`,`prependOnceListener`];e.AbstractAsyncHooksContextManager=class{bind(e,t){return t instanceof n.EventEmitter?this._bindEventEmitter(e,t):typeof t==`function`?this._bindFunction(e,t):t}_bindFunction(e,t){let n=this,r=function(...r){return n.with(e,()=>t.apply(this,r))};return Object.defineProperty(r,`length`,{enumerable:!1,configurable:!0,writable:!1,value:t.length}),r}_bindEventEmitter(e,t){return this._getPatchMap(t)===void 0?(this._createPatchMap(t),r.forEach(n=>{t[n]!==void 0&&(t[n]=this._patchAddListener(t,t[n],e))}),typeof t.removeListener==`function`&&(t.removeListener=this._patchRemoveListener(t,t.removeListener)),typeof t.off==`function`&&(t.off=this._patchRemoveListener(t,t.off)),typeof t.removeAllListeners==`function`&&(t.removeAllListeners=this._patchRemoveAllListeners(t,t.removeAllListeners)),t):t}_patchRemoveListener(e,t){let n=this;return function(r,i){let a=n._getPatchMap(e)?.[r];if(a===void 0)return t.call(this,r,i);let o=a.get(i);return t.call(this,r,o||i)}}_patchRemoveAllListeners(e,t){let n=this;return function(r){let i=n._getPatchMap(e);return i!==void 0&&(arguments.length===0?n._createPatchMap(e):i[r]!==void 0&&delete i[r]),t.apply(this,arguments)}}_patchAddListener(e,t,n){let r=this;return function(i,a){if(r._wrapped)return t.call(this,i,a);let o=r._getPatchMap(e);o===void 0&&(o=r._createPatchMap(e));let s=o[i];s===void 0&&(s=new WeakMap,o[i]=s);let c=r.bind(n,a);s.set(a,c),r._wrapped=!0;try{return t.call(this,i,c)}finally{r._wrapped=!1}}}_createPatchMap(e){let t=Object.create(null);return e[this._kOtListeners]=t,t}_getPatchMap(e){return e[this._kOtListeners]}_kOtListeners=Symbol(`OtListeners`);_wrapped=!1}})),dt=a((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.AsyncHooksContextManager=void 0;let r=(v(),e(x)),i=t(`async_hooks`),a=ut();n.AsyncHooksContextManager=class extends a.AbstractAsyncHooksContextManager{_asyncHook;_contexts=new Map;_stack=[];constructor(){super(),this._asyncHook=i.createHook({init:this._init.bind(this),before:this._before.bind(this),after:this._after.bind(this),destroy:this._destroy.bind(this),promiseResolve:this._destroy.bind(this)})}active(){return this._stack[this._stack.length-1]??r.ROOT_CONTEXT}with(e,t,n,...r){this._enterContext(e);try{return t.call(n,...r)}finally{this._exitContext()}}enable(){return this._asyncHook.enable(),this}disable(){return this._asyncHook.disable(),this._contexts.clear(),this._stack=[],this}_init(e,t){if(t===`TIMERWRAP`)return;let n=this._stack[this._stack.length-1];n!==void 0&&this._contexts.set(e,n)}_destroy(e){this._contexts.delete(e)}_before(e){let t=this._contexts.get(e);t!==void 0&&this._enterContext(t)}_after(){this._exitContext()}_enterContext(e){this._stack.push(e)}_exitContext(){this._stack.pop()}}})),ft=a((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.AsyncLocalStorageContextManager=void 0;let r=(v(),e(x)),i=t(`async_hooks`),a=ut();n.AsyncLocalStorageContextManager=class extends a.AbstractAsyncHooksContextManager{_asyncLocalStorage;constructor(){super(),this._asyncLocalStorage=new i.AsyncLocalStorage}active(){return this._asyncLocalStorage.getStore()??r.ROOT_CONTEXT}with(e,t,n,...r){let i=n==null?t:t.bind(n);return this._asyncLocalStorage.run(e,i,...r)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}}})),pt=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AsyncLocalStorageContextManager=e.AsyncHooksContextManager=void 0;var t=dt();Object.defineProperty(e,`AsyncHooksContextManager`,{enumerable:!0,get:function(){return t.AsyncHooksContextManager}});var n=ft();Object.defineProperty(e,`AsyncLocalStorageContextManager`,{enumerable:!0,get:function(){return n.AsyncLocalStorageContextManager}})})),mt=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AggregationTemporalityPreference=void 0,(function(e){e[e.DELTA=0]=`DELTA`,e[e.CUMULATIVE=1]=`CUMULATIVE`,e[e.LOWMEMORY=2]=`LOWMEMORY`})(e.AggregationTemporalityPreference||={})})),ht,gt=n((()=>{ht=class{_delegate;constructor(e){this._delegate=e}export(e,t){this._delegate.export(e,t)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}})),M,_t=n((()=>{M=class extends Error{code;name=`OTLPExporterError`;data;constructor(e,t,n){super(e),this.data=n,this.code=t}}}));function vt(e){if(Number.isFinite(e)&&e>0)return e;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${e}')`)}function yt(e){if(e!=null)return()=>e}function bt(e,t,n){return{timeoutMillis:vt(e.timeoutMillis??t.timeoutMillis??n.timeoutMillis),concurrencyLimit:e.concurrencyLimit??t.concurrencyLimit??n.concurrencyLimit,compression:e.compression??t.compression??n.compression}}function xt(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:`none`}}var St=n((()=>{})),Ct,wt=n((()=>{(function(e){e.NONE=`none`,e.GZIP=`gzip`})(Ct||={})}));function Tt(e){return new Et(e.concurrencyLimit)}var Et,Dt=n((()=>{Et=class{_concurrencyLimit;_sendingPromises=[];constructor(e){this._concurrencyLimit=e}pushPromise(e){if(this.hasReachedLimit())throw Error(`Concurrency Limit reached`);this._sendingPromises.push(e);let t=()=>{let t=this._sendingPromises.indexOf(e);this._sendingPromises.splice(t,1)};e.then(t,t)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}}));function Ot(e){return Object.prototype.hasOwnProperty.call(e,`partialSuccess`)}function kt(){return{handleResponse(e){e==null||!Ot(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||y.warn(`Received Partial Success response:`,JSON.stringify(e.partialSuccess))}}}var At=n((()=>{}));function jt(e,t){return new Mt(e.transport,e.serializer,kt(),e.promiseHandler,t.timeout)}var N,Mt,Nt=n((()=>{N=le(),_t(),At(),v(),Mt=class{_transport;_serializer;_responseHandler;_promiseQueue;_timeout;_diagLogger;constructor(e,t,n,r,i){this._transport=e,this._serializer=t,this._responseHandler=n,this._promiseQueue=r,this._timeout=i,this._diagLogger=y.createComponentLogger({namespace:`OTLPExportDelegate`})}export(e,t){if(this._diagLogger.debug(`items to be sent`,e),this._promiseQueue.hasReachedLimit()){t({code:N.ExportResultCode.FAILED,error:Error(`Concurrent export limit reached`)});return}let n=this._serializer.serializeRequest(e);if(n==null){t({code:N.ExportResultCode.FAILED,error:Error(`Nothing to send`)});return}this._promiseQueue.pushPromise(this._transport.send(n,this._timeout).then(e=>{if(e.status===`success`){if(e.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(e.data))}catch(t){this._diagLogger.warn(`Export succeeded but could not deserialize response - is the response specification compliant?`,t,e.data)}t({code:N.ExportResultCode.SUCCESS});return}else if(e.status===`failure`&&e.error){t({code:N.ExportResultCode.FAILED,error:e.error});return}else e.status===`retryable`?t({code:N.ExportResultCode.FAILED,error:new M(`Export failed with retryable status`)}):t({code:N.ExportResultCode.FAILED,error:new M(`Export failed with unknown error`)})},e=>t({code:N.ExportResultCode.FAILED,error:e})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug(`shutdown started`),await this.forceFlush(),this._transport.shutdown()}}}));function Pt(e,t,n){return jt({transport:n,serializer:t,promiseHandler:Tt(e)},{timeout:e.timeoutMillis})}var Ft=n((()=>{Dt(),Nt()})),It=i({CompressionAlgorithm:()=>Ct,OTLPExporterBase:()=>ht,OTLPExporterError:()=>M,createOtlpNetworkExportDelegate:()=>Pt,getSharedConfigurationDefaults:()=>xt,mergeOtlpSharedConfigurationWithDefaults:()=>bt}),Lt=n((()=>{gt(),_t(),St(),wt(),Ft()})),Rt=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.OTLPMetricExporterBase=t.LowMemoryTemporalitySelector=t.DeltaTemporalitySelector=t.CumulativeTemporalitySelector=void 0;let n=le(),r=ue(),i=mt(),a=(Lt(),e(It)),o=(v(),e(x));t.CumulativeTemporalitySelector=()=>r.AggregationTemporality.CUMULATIVE,t.DeltaTemporalitySelector=e=>{switch(e){case r.InstrumentType.COUNTER:case r.InstrumentType.OBSERVABLE_COUNTER:case r.InstrumentType.GAUGE:case r.InstrumentType.HISTOGRAM:case r.InstrumentType.OBSERVABLE_GAUGE:return r.AggregationTemporality.DELTA;case r.InstrumentType.UP_DOWN_COUNTER:case r.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return r.AggregationTemporality.CUMULATIVE}},t.LowMemoryTemporalitySelector=e=>{switch(e){case r.InstrumentType.COUNTER:case r.InstrumentType.HISTOGRAM:return r.AggregationTemporality.DELTA;case r.InstrumentType.GAUGE:case r.InstrumentType.UP_DOWN_COUNTER:case r.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:case r.InstrumentType.OBSERVABLE_COUNTER:case r.InstrumentType.OBSERVABLE_GAUGE:return r.AggregationTemporality.CUMULATIVE}};function s(){let e=((0,n.getStringFromEnv)(`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE`)??`cumulative`).toLowerCase();return e===`cumulative`?t.CumulativeTemporalitySelector:e===`delta`?t.DeltaTemporalitySelector:e===`lowmemory`?t.LowMemoryTemporalitySelector:(o.diag.warn(`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${e}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`),t.CumulativeTemporalitySelector)}function c(e){return e==null?s():e===i.AggregationTemporalityPreference.DELTA?t.DeltaTemporalitySelector:e===i.AggregationTemporalityPreference.LOWMEMORY?t.LowMemoryTemporalitySelector:t.CumulativeTemporalitySelector}let l=Object.freeze({type:r.AggregationType.DEFAULT});function u(e){return e?.aggregationPreference??(()=>l)}t.OTLPMetricExporterBase=class extends a.OTLPExporterBase{_aggregationTemporalitySelector;_aggregationSelector;constructor(e,t){super(e),this._aggregationSelector=u(t),this._aggregationTemporalitySelector=c(t?.temporalityPreference)}selectAggregation(e){return this._aggregationSelector(e)}selectAggregationTemporality(e){return this._aggregationTemporalitySelector(e)}}})),zt=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.VERSION=void 0,e.VERSION=`0.204.0`}));function Bt(e){return()=>{let t={};return Object.entries(e?.()??{}).forEach(([e,n])=>{n===void 0?y.warn(`Header "${e}" has invalid value (${n}) and will be ignored`):t[e]=String(n)}),t}}var Vt=n((()=>{v()}));function Ht(e,t,n){let r={...n()},i={};return()=>(t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,r))}function Ut(e){if(e!=null)try{let t=globalThis.location?.href;return new URL(e,t).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${e}'`)}}function Wt(e){return async t=>{let{Agent:n}=await(t===`http:`?import(`http`):import(`https`));return new n(e)}}function Gt(e,t,n){return{...bt(e,t,n),headers:Ht(Bt(e.headers),t.headers,n.headers),url:Ut(e.url)??t.url??n.url,agentFactory:e.agentFactory??t.agentFactory??n.agentFactory}}function Kt(e,t){return{...xt(),headers:()=>e,url:`http://localhost:4318/`+t,agentFactory:Wt({keepAlive:!0})}}var qt=n((()=>{St(),Vt()}));function Jt(e){return[429,502,503,504].includes(e)}function Yt(e){if(e==null)return;let t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;let n=new Date(e).getTime()-Date.now();return n>=0?n:0}var Xt=n((()=>{}));function Zt(e,t,n,r,i,a){let o=new URL(t.url),s=e({hostname:o.hostname,port:o.port,path:o.pathname,method:`POST`,headers:{...t.headers()},agent:n},e=>{let t=[];e.on(`data`,e=>t.push(e)),e.on(`end`,()=>{e.statusCode&&e.statusCode<299?i({status:`success`,data:Buffer.concat(t)}):e.statusCode&&Jt(e.statusCode)?i({status:`retryable`,retryInMillis:Yt(e.headers[`retry-after`])}):i({status:`failure`,error:new M(e.statusMessage,e.statusCode,Buffer.concat(t).toString())})})});s.setTimeout(a,()=>{s.destroy(),i({status:`failure`,error:Error(`Request Timeout`)})}),s.on(`error`,e=>{i({status:`failure`,error:e})}),Qt(s,t.compression,r,e=>{i({status:`failure`,error:e})})}function Qt(e,t,n,r){let i=$t(n);t===`gzip`&&(e.setHeader(`Content-Encoding`,`gzip`),i=i.on(`error`,r).pipe(He.createGzip()).on(`error`,r)),i.pipe(e).on(`error`,r)}function $t(e){let t=new Ue;return t.push(e),t.push(null),t}var en=n((()=>{Xt(),_t()}));async function tn(e){let{request:t}=await(e===`http:`?import(`http`):import(`https`));return t}function nn(e){return new rn(e)}var rn,an=n((()=>{en(),rn=class{_parameters;_utils=null;constructor(e){this._parameters=e}async send(e,t){let{agent:n,request:r}=await this._loadUtils();return new Promise(i=>{Zt(r,this._parameters,n,e,e=>{i(e)},t)})}shutdown(){}async _loadUtils(){let e=this._utils;if(e===null){let t=new URL(this._parameters.url).protocol,[n,r]=await Promise.all([this._parameters.agentFactory(t),tn(t)]);e=this._utils={agent:n,request:r}}return e}}}));function on(){return 2*fn*Math.random()-fn}function sn(e){return new pn(e.transport)}var cn,ln,un,dn,fn,pn,mn=n((()=>{cn=5,ln=1e3,un=5e3,dn=1.5,fn=.2,pn=class{_transport;constructor(e){this._transport=e}retry(e,t,n){return new Promise((r,i)=>{setTimeout(()=>{this._transport.send(e,t).then(r,i)},n)})}async send(e,t){let n=Date.now()+t,r=await this._transport.send(e,t),i=cn,a=ln;for(;r.status===`retryable`&&i>0;){i--;let t=Math.max(Math.min(a,un)+on(),0);a*=dn;let o=r.retryInMillis??t,s=n-Date.now();if(o>s)return r;r=await this.retry(e,s,o)}return r}shutdown(){return this._transport.shutdown()}}}));function hn(e,t){return jt({transport:sn({transport:nn(e)}),serializer:t,promiseHandler:Tt(e)},{timeout:e.timeoutMillis})}var gn=n((()=>{Nt(),an(),Dt(),mn()}));function _n(e){let t=process.env[e]?.trim();if(t!=null&&t!==``){let n=Number(t);if(Number.isFinite(n)&&n>0)return n;y.warn(`Configuration: ${e} is invalid, expected number greater than 0 (actual: ${t})`)}}function vn(e){let t=_n(`OTEL_EXPORTER_OTLP_${e}_TIMEOUT`),n=_n(`OTEL_EXPORTER_OTLP_TIMEOUT`);return t??n}function yn(e){let t=process.env[e]?.trim();if(t!==``){if(t==null||t===`none`||t===`gzip`)return t;y.warn(`Configuration: ${e} is invalid, expected 'none' or 'gzip' (actual: '${t}')`)}}function bn(e){let t=yn(`OTEL_EXPORTER_OTLP_${e}_COMPRESSION`),n=yn(`OTEL_EXPORTER_OTLP_COMPRESSION`);return t??n}function xn(e){return{timeoutMillis:vn(e),compression:bn(e)}}var Sn=n((()=>{v()}));function Cn(e){let t=(0,P.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${e}_HEADERS`),n=(0,P.getStringFromEnv)(`OTEL_EXPORTER_OTLP_HEADERS`),r=(0,P.parseKeyPairsIntoRecord)(t),i=(0,P.parseKeyPairsIntoRecord)(n);if(!(Object.keys(r).length===0&&Object.keys(i).length===0))return Object.assign({},(0,P.parseKeyPairsIntoRecord)(n),(0,P.parseKeyPairsIntoRecord)(t))}function wn(e){try{return new URL(e).toString()}catch{y.warn(`Configuration: Could not parse environment-provided export URL: '${e}', falling back to undefined`);return}}function Tn(e,t){try{new URL(e)}catch{y.warn(`Configuration: Could not parse environment-provided export URL: '${e}', falling back to undefined`);return}e.endsWith(`/`)||(e+=`/`),e+=t;try{new URL(e)}catch{y.warn(`Configuration: Provided URL appended with '${t}' is not a valid URL, using 'undefined' instead of '${e}'`);return}return e}function En(e){let t=(0,P.getStringFromEnv)(`OTEL_EXPORTER_OTLP_ENDPOINT`);if(t!==void 0)return Tn(t,e)}function Dn(e){let t=(0,P.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${e}_ENDPOINT`);if(t!==void 0)return wn(t)}function On(e,t){return{...xn(e),url:Dn(e)??En(t),headers:yt(Cn(e))}}var P,kn=n((()=>{P=le(),v(),Sn(),St()}));function An(e){if(typeof e.httpAgentOptions==`function`)return e.httpAgentOptions;let t=e.httpAgentOptions;if(e.keepAlive!=null&&(t={keepAlive:e.keepAlive,...t}),t!=null)return Wt(t)}function jn(e,t,n,r){return e.metadata&&y.warn(`Metadata cannot be set when using http`),Gt({url:e.url,headers:yt(e.headers),concurrencyLimit:e.concurrencyLimit,timeoutMillis:e.timeoutMillis,compression:e.compression,agentFactory:An(e)},On(t,n),Kt(r,n))}var Mn=n((()=>{qt(),kn(),v(),St()})),Nn=i({convertLegacyHttpOptions:()=>jn,createOtlpHttpExportDelegate:()=>hn,getSharedConfigurationFromEnvironment:()=>xn,httpAgentFactoryFromOptions:()=>Wt}),Pn=n((()=>{qt(),gn(),Sn(),Mn()})),Fn=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.OTLPMetricExporter=void 0;let n=Rt(),r=de(),i=zt(),a=(Pn(),e(Nn)),o={"User-Agent":`OTel-OTLP-Exporter-JavaScript/${i.VERSION}`};t.OTLPMetricExporter=class extends n.OTLPMetricExporterBase{constructor(e){super((0,a.createOtlpHttpExportDelegate)((0,a.convertLegacyHttpOptions)(e??{},`METRICS`,`v1/metrics`,{...o,"Content-Type":`application/json`}),r.JsonMetricsSerializer),e)}}})),In=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.OTLPMetricExporter=void 0;var t=Fn();Object.defineProperty(e,`OTLPMetricExporter`,{enumerable:!0,get:function(){return t.OTLPMetricExporter}})})),Ln=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.OTLPMetricExporter=void 0;var t=In();Object.defineProperty(e,`OTLPMetricExporter`,{enumerable:!0,get:function(){return t.OTLPMetricExporter}})})),Rn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.OTLPMetricExporterBase=e.LowMemoryTemporalitySelector=e.DeltaTemporalitySelector=e.CumulativeTemporalitySelector=e.AggregationTemporalityPreference=e.OTLPMetricExporter=void 0;var t=Ln();Object.defineProperty(e,`OTLPMetricExporter`,{enumerable:!0,get:function(){return t.OTLPMetricExporter}});var n=mt();Object.defineProperty(e,`AggregationTemporalityPreference`,{enumerable:!0,get:function(){return n.AggregationTemporalityPreference}});var r=Rt();Object.defineProperty(e,`CumulativeTemporalitySelector`,{enumerable:!0,get:function(){return r.CumulativeTemporalitySelector}}),Object.defineProperty(e,`DeltaTemporalitySelector`,{enumerable:!0,get:function(){return r.DeltaTemporalitySelector}}),Object.defineProperty(e,`LowMemoryTemporalitySelector`,{enumerable:!0,get:function(){return r.LowMemoryTemporalitySelector}}),Object.defineProperty(e,`OTLPMetricExporterBase`,{enumerable:!0,get:function(){return r.OTLPMetricExporterBase}})})),zn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.VERSION=void 0,e.VERSION=`0.204.0`})),Bn=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.OTLPTraceExporter=void 0;let n=(Lt(),e(It)),r=zn(),i=de(),a=(Pn(),e(Nn));t.OTLPTraceExporter=class extends n.OTLPExporterBase{constructor(e={}){super((0,a.createOtlpHttpExportDelegate)((0,a.convertLegacyHttpOptions)(e,`TRACES`,`v1/traces`,{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${r.VERSION}`,"Content-Type":`application/json`}),i.JsonTraceSerializer))}}})),Vn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.OTLPTraceExporter=void 0;var t=Bn();Object.defineProperty(e,`OTLPTraceExporter`,{enumerable:!0,get:function(){return t.OTLPTraceExporter}})})),Hn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.OTLPTraceExporter=void 0;var t=Vn();Object.defineProperty(e,`OTLPTraceExporter`,{enumerable:!0,get:function(){return t.OTLPTraceExporter}})})),Un=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.OTLPTraceExporter=void 0;var t=Hn();Object.defineProperty(e,`OTLPTraceExporter`,{enumerable:!0,get:function(){return t.OTLPTraceExporter}})})),Wn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e._clearDefaultServiceNameCache=e.defaultServiceName=void 0;let t;function n(){if(t===void 0)try{let e=globalThis.process.argv0;t=e?`unknown_service:${e}`:`unknown_service`}catch{t=`unknown_service`}return t}e.defaultServiceName=n;function r(){t=void 0}e._clearDefaultServiceNameCache=r})),Gn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isPromiseLike=void 0,e.isPromiseLike=e=>typeof e==`object`&&!!e&&typeof e.then==`function`})),Kn=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.defaultResource=t.emptyResource=t.resourceFromDetectedResource=t.resourceFromAttributes=void 0;let n=(v(),e(x)),r=S(),i=(C(),e(me)),a=Wn(),o=Gn();var s=class e{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(t,n){let r=new e({},n);return r._rawAttributes=f(t),r._asyncAttributesPending=t.filter(([e,t])=>(0,o.isPromiseLike)(t)).length>0,r}constructor(e,t){let n=e.attributes??{};this._rawAttributes=Object.entries(n).map(([e,t])=>((0,o.isPromiseLike)(t)&&(this._asyncAttributesPending=!0),[e,t])),this._rawAttributes=f(this._rawAttributes),this._schemaUrl=p(t?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[t,n]=this._rawAttributes[e];this._rawAttributes[e]=[t,(0,o.isPromiseLike)(n)?await n:n]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&n.diag.error(`Accessing resource attributes before async attributes settled`),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[t,r]of this._rawAttributes){if((0,o.isPromiseLike)(r)){n.diag.debug(`Unsettled resource attribute ${t} skipped`);continue}r!=null&&(e[t]??=r)}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(t){if(t==null)return this;let n=m(this,t),r=n?{schemaUrl:n}:void 0;return e.FromAttributeList([...t.getRawAttributes(),...this.getRawAttributes()],r)}};function c(e,t){return s.FromAttributeList(Object.entries(e),t)}t.resourceFromAttributes=c;function l(e,t){return new s(e,t)}t.resourceFromDetectedResource=l;function u(){return c({})}t.emptyResource=u;function d(){return c({[i.ATTR_SERVICE_NAME]:(0,a.defaultServiceName)(),[i.ATTR_TELEMETRY_SDK_LANGUAGE]:r.SDK_INFO[i.ATTR_TELEMETRY_SDK_LANGUAGE],[i.ATTR_TELEMETRY_SDK_NAME]:r.SDK_INFO[i.ATTR_TELEMETRY_SDK_NAME],[i.ATTR_TELEMETRY_SDK_VERSION]:r.SDK_INFO[i.ATTR_TELEMETRY_SDK_VERSION]})}t.defaultResource=d;function f(e){return e.map(([e,t])=>(0,o.isPromiseLike)(t)?[e,t.catch(t=>{n.diag.debug(`promise rejection for resource attribute: %s - %s`,e,t)})]:[e,t])}function p(e){if(typeof e==`string`||e===void 0)return e;n.diag.warn(`Schema URL must be string or undefined, got %s. Schema URL will be ignored.`,e)}function m(e,t){let r=e?.schemaUrl,i=t?.schemaUrl,a=r===void 0||r===``,o=i===void 0||i===``;if(a)return i;if(o||r===i)return r;n.diag.warn(`Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.`,r,i)}})),qn=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.detectResources=void 0;let n=(v(),e(x)),r=Kn();t.detectResources=(e={})=>(e.detectors||[]).map(t=>{try{let i=(0,r.resourceFromDetectedResource)(t.detect(e));return n.diag.debug(`${t.constructor.name} found resource.`,i),i}catch(e){return n.diag.debug(`${t.constructor.name} failed: ${e.message}`),(0,r.emptyResource)()}}).reduce((e,t)=>e.merge(t),(0,r.emptyResource)())})),Jn=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.envDetector=void 0;let n=(v(),e(x)),r=(C(),e(me)),i=S();t.envDetector=new class{_MAX_LENGTH=255;_COMMA_SEPARATOR=`,`;_LABEL_KEY_VALUE_SPLITTER=`=`;detect(e){let t={},a=(0,i.getStringFromEnv)(`OTEL_RESOURCE_ATTRIBUTES`),o=(0,i.getStringFromEnv)(`OTEL_SERVICE_NAME`);if(a)try{let e=this._parseResourceAttributes(a);Object.assign(t,e)}catch(e){n.diag.debug(`EnvDetector failed: ${e instanceof Error?e.message:e}`)}return o&&(t[r.ATTR_SERVICE_NAME]=o),{attributes:t}}_parseResourceAttributes(e){if(!e)return{};let t={},n=e.split(this._COMMA_SEPARATOR).filter(e=>e.trim()!==``);for(let e of n){let n=e.split(this._LABEL_KEY_VALUE_SPLITTER);if(n.length!==2)throw Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${e}". Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.`);let[r,i]=n,a=r.trim(),o=i.trim();if(a.length===0)throw Error(`Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in "${e}".`);let s,c;try{s=decodeURIComponent(a),c=decodeURIComponent(o)}catch(t){throw Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${e}": ${t instanceof Error?t.message:t}`,{cause:t})}if(s.length>this._MAX_LENGTH)throw Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${s}".`);if(c.length>this._MAX_LENGTH)throw Error(`Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key "${s}".`);t[s]=c}return t}}})),F=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ATTR_WEBENGINE_VERSION=e.ATTR_WEBENGINE_NAME=e.ATTR_WEBENGINE_DESCRIPTION=e.ATTR_SERVICE_NAMESPACE=e.ATTR_SERVICE_INSTANCE_ID=e.ATTR_PROCESS_RUNTIME_VERSION=e.ATTR_PROCESS_RUNTIME_NAME=e.ATTR_PROCESS_RUNTIME_DESCRIPTION=e.ATTR_PROCESS_PID=e.ATTR_PROCESS_OWNER=e.ATTR_PROCESS_EXECUTABLE_PATH=e.ATTR_PROCESS_EXECUTABLE_NAME=e.ATTR_PROCESS_COMMAND_ARGS=e.ATTR_PROCESS_COMMAND=e.ATTR_OS_VERSION=e.ATTR_OS_TYPE=e.ATTR_K8S_POD_NAME=e.ATTR_K8S_NAMESPACE_NAME=e.ATTR_K8S_DEPLOYMENT_NAME=e.ATTR_K8S_CLUSTER_NAME=e.ATTR_HOST_TYPE=e.ATTR_HOST_NAME=e.ATTR_HOST_IMAGE_VERSION=e.ATTR_HOST_IMAGE_NAME=e.ATTR_HOST_IMAGE_ID=e.ATTR_HOST_ID=e.ATTR_HOST_ARCH=e.ATTR_CONTAINER_NAME=e.ATTR_CONTAINER_IMAGE_TAGS=e.ATTR_CONTAINER_IMAGE_NAME=e.ATTR_CONTAINER_ID=e.ATTR_CLOUD_REGION=e.ATTR_CLOUD_PROVIDER=e.ATTR_CLOUD_AVAILABILITY_ZONE=e.ATTR_CLOUD_ACCOUNT_ID=void 0,e.ATTR_CLOUD_ACCOUNT_ID=`cloud.account.id`,e.ATTR_CLOUD_AVAILABILITY_ZONE=`cloud.availability_zone`,e.ATTR_CLOUD_PROVIDER=`cloud.provider`,e.ATTR_CLOUD_REGION=`cloud.region`,e.ATTR_CONTAINER_ID=`container.id`,e.ATTR_CONTAINER_IMAGE_NAME=`container.image.name`,e.ATTR_CONTAINER_IMAGE_TAGS=`container.image.tags`,e.ATTR_CONTAINER_NAME=`container.name`,e.ATTR_HOST_ARCH=`host.arch`,e.ATTR_HOST_ID=`host.id`,e.ATTR_HOST_IMAGE_ID=`host.image.id`,e.ATTR_HOST_IMAGE_NAME=`host.image.name`,e.ATTR_HOST_IMAGE_VERSION=`host.image.version`,e.ATTR_HOST_NAME=`host.name`,e.ATTR_HOST_TYPE=`host.type`,e.ATTR_K8S_CLUSTER_NAME=`k8s.cluster.name`,e.ATTR_K8S_DEPLOYMENT_NAME=`k8s.deployment.name`,e.ATTR_K8S_NAMESPACE_NAME=`k8s.namespace.name`,e.ATTR_K8S_POD_NAME=`k8s.pod.name`,e.ATTR_OS_TYPE=`os.type`,e.ATTR_OS_VERSION=`os.version`,e.ATTR_PROCESS_COMMAND=`process.command`,e.ATTR_PROCESS_COMMAND_ARGS=`process.command_args`,e.ATTR_PROCESS_EXECUTABLE_NAME=`process.executable.name`,e.ATTR_PROCESS_EXECUTABLE_PATH=`process.executable.path`,e.ATTR_PROCESS_OWNER=`process.owner`,e.ATTR_PROCESS_PID=`process.pid`,e.ATTR_PROCESS_RUNTIME_DESCRIPTION=`process.runtime.description`,e.ATTR_PROCESS_RUNTIME_NAME=`process.runtime.name`,e.ATTR_PROCESS_RUNTIME_VERSION=`process.runtime.version`,e.ATTR_SERVICE_INSTANCE_ID=`service.instance.id`,e.ATTR_SERVICE_NAMESPACE=`service.namespace`,e.ATTR_WEBENGINE_DESCRIPTION=`webengine.description`,e.ATTR_WEBENGINE_NAME=`webengine.name`,e.ATTR_WEBENGINE_VERSION=`webengine.version`})),Yn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getMachineId=void 0;let n=t(`process`),i;async function a(){if(!i)switch(n.platform){case`darwin`:i=(await import(`./getMachineId-darwin-BWLy_Kik.mjs`).then(e=>r(e.default))).getMachineId;break;case`linux`:i=(await import(`./getMachineId-linux-CVE8Y0Fo.mjs`).then(e=>r(e.default))).getMachineId;break;case`freebsd`:i=(await import(`./getMachineId-bsd-BZEr0yHg.mjs`).then(e=>r(e.default))).getMachineId;break;case`win32`:i=(await import(`./getMachineId-win-B_OXaWuM.mjs`).then(e=>r(e.default))).getMachineId;break;default:i=(await import(`./getMachineId-unsupported-CA6ETHmi.mjs`).then(e=>r(e.default))).getMachineId;break}return i()}e.getMachineId=a})),Xn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.normalizeType=e.normalizeArch=void 0,e.normalizeArch=e=>{switch(e){case`arm`:return`arm32`;case`ppc`:return`ppc32`;case`x64`:return`amd64`;default:return e}},e.normalizeType=e=>{switch(e){case`sunos`:return`solaris`;case`win32`:return`windows`;default:return e}}})),Zn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hostDetector=void 0;let n=F(),r=t(`os`),i=Yn(),a=Xn();e.hostDetector=new class{detect(e){return{attributes:{[n.ATTR_HOST_NAME]:(0,r.hostname)(),[n.ATTR_HOST_ARCH]:(0,a.normalizeArch)((0,r.arch)()),[n.ATTR_HOST_ID]:(0,i.getMachineId)()}}}}})),Qn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.osDetector=void 0;let n=F(),r=t(`os`),i=Xn();e.osDetector=new class{detect(e){return{attributes:{[n.ATTR_OS_TYPE]:(0,i.normalizeType)((0,r.platform)()),[n.ATTR_OS_VERSION]:(0,r.release)()}}}}})),$n=a((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.processDetector=void 0;let r=(v(),e(x)),i=F(),a=t(`os`);n.processDetector=new class{detect(e){let t={[i.ATTR_PROCESS_PID]:process.pid,[i.ATTR_PROCESS_EXECUTABLE_NAME]:process.title,[i.ATTR_PROCESS_EXECUTABLE_PATH]:process.execPath,[i.ATTR_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[i.ATTR_PROCESS_RUNTIME_VERSION]:process.versions.node,[i.ATTR_PROCESS_RUNTIME_NAME]:`nodejs`,[i.ATTR_PROCESS_RUNTIME_DESCRIPTION]:`Node.js`};process.argv.length>1&&(t[i.ATTR_PROCESS_COMMAND]=process.argv[1]);try{let e=a.userInfo();t[i.ATTR_PROCESS_OWNER]=e.username}catch(e){r.diag.debug(`error obtaining process owner: ${e}`)}return{attributes:t}}}})),er=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.serviceInstanceIdDetector=void 0;let n=F(),r=t(`crypto`);e.serviceInstanceIdDetector=new class{detect(e){return{attributes:{[n.ATTR_SERVICE_INSTANCE_ID]:(0,r.randomUUID)()}}}}})),tr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.serviceInstanceIdDetector=e.processDetector=e.osDetector=e.hostDetector=void 0;var t=Zn();Object.defineProperty(e,`hostDetector`,{enumerable:!0,get:function(){return t.hostDetector}});var n=Qn();Object.defineProperty(e,`osDetector`,{enumerable:!0,get:function(){return n.osDetector}});var r=$n();Object.defineProperty(e,`processDetector`,{enumerable:!0,get:function(){return r.processDetector}});var i=er();Object.defineProperty(e,`serviceInstanceIdDetector`,{enumerable:!0,get:function(){return i.serviceInstanceIdDetector}})})),nr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.serviceInstanceIdDetector=e.processDetector=e.osDetector=e.hostDetector=void 0;var t=tr();Object.defineProperty(e,`hostDetector`,{enumerable:!0,get:function(){return t.hostDetector}}),Object.defineProperty(e,`osDetector`,{enumerable:!0,get:function(){return t.osDetector}}),Object.defineProperty(e,`processDetector`,{enumerable:!0,get:function(){return t.processDetector}}),Object.defineProperty(e,`serviceInstanceIdDetector`,{enumerable:!0,get:function(){return t.serviceInstanceIdDetector}})})),rr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.noopDetector=e.NoopDetector=void 0;var t=class{detect(){return{attributes:{}}}};e.NoopDetector=t,e.noopDetector=new t})),ir=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.noopDetector=e.serviceInstanceIdDetector=e.processDetector=e.osDetector=e.hostDetector=e.envDetector=void 0;var t=Jn();Object.defineProperty(e,`envDetector`,{enumerable:!0,get:function(){return t.envDetector}});var n=nr();Object.defineProperty(e,`hostDetector`,{enumerable:!0,get:function(){return n.hostDetector}}),Object.defineProperty(e,`osDetector`,{enumerable:!0,get:function(){return n.osDetector}}),Object.defineProperty(e,`processDetector`,{enumerable:!0,get:function(){return n.processDetector}}),Object.defineProperty(e,`serviceInstanceIdDetector`,{enumerable:!0,get:function(){return n.serviceInstanceIdDetector}});var r=rr();Object.defineProperty(e,`noopDetector`,{enumerable:!0,get:function(){return r.noopDetector}})})),ar=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.defaultServiceName=e.emptyResource=e.defaultResource=e.resourceFromAttributes=e.serviceInstanceIdDetector=e.processDetector=e.osDetector=e.hostDetector=e.envDetector=e.detectResources=void 0;var t=qn();Object.defineProperty(e,`detectResources`,{enumerable:!0,get:function(){return t.detectResources}});var n=ir();Object.defineProperty(e,`envDetector`,{enumerable:!0,get:function(){return n.envDetector}}),Object.defineProperty(e,`hostDetector`,{enumerable:!0,get:function(){return n.hostDetector}}),Object.defineProperty(e,`osDetector`,{enumerable:!0,get:function(){return n.osDetector}}),Object.defineProperty(e,`processDetector`,{enumerable:!0,get:function(){return n.processDetector}}),Object.defineProperty(e,`serviceInstanceIdDetector`,{enumerable:!0,get:function(){return n.serviceInstanceIdDetector}});var r=Kn();Object.defineProperty(e,`resourceFromAttributes`,{enumerable:!0,get:function(){return r.resourceFromAttributes}}),Object.defineProperty(e,`defaultResource`,{enumerable:!0,get:function(){return r.defaultResource}}),Object.defineProperty(e,`emptyResource`,{enumerable:!0,get:function(){return r.emptyResource}});var i=Wn();Object.defineProperty(e,`defaultServiceName`,{enumerable:!0,get:function(){return i.defaultServiceName}})})),or=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AggregationTemporality=void 0,(function(e){e[e.DELTA=0]=`DELTA`,e[e.CUMULATIVE=1]=`CUMULATIVE`})(e.AggregationTemporality||={})})),I=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DataPointType=e.InstrumentType=void 0,(function(e){e.COUNTER=`COUNTER`,e.GAUGE=`GAUGE`,e.HISTOGRAM=`HISTOGRAM`,e.UP_DOWN_COUNTER=`UP_DOWN_COUNTER`,e.OBSERVABLE_COUNTER=`OBSERVABLE_COUNTER`,e.OBSERVABLE_GAUGE=`OBSERVABLE_GAUGE`,e.OBSERVABLE_UP_DOWN_COUNTER=`OBSERVABLE_UP_DOWN_COUNTER`})(e.InstrumentType||={}),(function(e){e[e.HISTOGRAM=0]=`HISTOGRAM`,e[e.EXPONENTIAL_HISTOGRAM=1]=`EXPONENTIAL_HISTOGRAM`,e[e.GAUGE=2]=`GAUGE`,e[e.SUM=3]=`SUM`})(e.DataPointType||={})})),L=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.equalsCaseInsensitive=e.binarySearchUB=e.setEquals=e.callWithTimeout=e.TimeoutError=e.instrumentationScopeId=e.hashAttributes=void 0;function t(e){let t=Object.keys(e);return t.length===0?``:(t=t.sort(),JSON.stringify(t.map(t=>[t,e[t]])))}e.hashAttributes=t;function n(e){return`${e.name}:${e.version??``}:${e.schemaUrl??``}`}e.instrumentationScopeId=n;var r=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};e.TimeoutError=r;function i(e,t){let n,i=new Promise(function(e,i){n=setTimeout(function(){i(new r(`Operation timed out.`))},t)});return Promise.race([e,i]).then(e=>(clearTimeout(n),e),e=>{throw clearTimeout(n),e})}e.callWithTimeout=i;function a(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}e.setEquals=a;function o(e,t){let n=0,r=e.length-1,i=e.length;for(;r>=n;){let a=n+Math.trunc((r-n)/2);e[a]<t?n=a+1:(i=a,r=a-1)}return i}e.binarySearchUB=o;function s(e,t){return e.toLowerCase()===t.toLowerCase()}e.equalsCaseInsensitive=s})),R=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AggregatorKind=void 0,(function(e){e[e.DROP=0]=`DROP`,e[e.SUM=1]=`SUM`,e[e.LAST_VALUE=2]=`LAST_VALUE`,e[e.HISTOGRAM=3]=`HISTOGRAM`,e[e.EXPONENTIAL_HISTOGRAM=4]=`EXPONENTIAL_HISTOGRAM`})(e.AggregatorKind||={})})),sr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DropAggregator=void 0;let t=R();e.DropAggregator=class{kind=t.AggregatorKind.DROP;createAccumulation(){}merge(e,t){}diff(e,t){}toMetricData(e,t,n,r){}}})),cr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.HistogramAggregator=e.HistogramAccumulation=void 0;let t=R(),n=I(),r=L();function i(e){let t=e.map(()=>0);return t.push(0),{buckets:{boundaries:e,counts:t},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var a=class{startTime;_boundaries;_recordMinMax;_current;constructor(e,t,n=!0,r=i(t)){this.startTime=e,this._boundaries=t,this._recordMinMax=n,this._current=r}record(e){if(Number.isNaN(e))return;this._current.count+=1,this._current.sum+=e,this._recordMinMax&&(this._current.min=Math.min(e,this._current.min),this._current.max=Math.max(e,this._current.max),this._current.hasMinMax=!0);let t=(0,r.binarySearchUB)(this._boundaries,e);this._current.buckets.counts[t]+=1}setStartTime(e){this.startTime=e}toPointValue(){return this._current}};e.HistogramAccumulation=a,e.HistogramAggregator=class{kind=t.AggregatorKind.HISTOGRAM;_boundaries;_recordMinMax;constructor(e,t){this._boundaries=e,this._recordMinMax=t}createAccumulation(e){return new a(e,this._boundaries,this._recordMinMax)}merge(e,t){let n=e.toPointValue(),r=t.toPointValue(),i=n.buckets.counts,o=r.buckets.counts,s=Array(i.length);for(let e=0;e<i.length;e++)s[e]=i[e]+o[e];let c=1/0,l=-1/0;return this._recordMinMax&&(n.hasMinMax&&r.hasMinMax?(c=Math.min(n.min,r.min),l=Math.max(n.max,r.max)):n.hasMinMax?(c=n.min,l=n.max):r.hasMinMax&&(c=r.min,l=r.max)),new a(e.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:s},count:n.count+r.count,sum:n.sum+r.sum,hasMinMax:this._recordMinMax&&(n.hasMinMax||r.hasMinMax),min:c,max:l})}diff(e,t){let n=e.toPointValue(),r=t.toPointValue(),i=n.buckets.counts,o=r.buckets.counts,s=Array(i.length);for(let e=0;e<i.length;e++)s[e]=o[e]-i[e];return new a(t.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:s},count:r.count-n.count,sum:r.sum-n.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(e,t,r,i){return{descriptor:e,aggregationTemporality:t,dataPointType:n.DataPointType.HISTOGRAM,dataPoints:r.map(([t,r])=>{let a=r.toPointValue(),o=e.type===n.InstrumentType.GAUGE||e.type===n.InstrumentType.UP_DOWN_COUNTER||e.type===n.InstrumentType.OBSERVABLE_GAUGE||e.type===n.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:t,startTime:r.startTime,endTime:i,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:o?void 0:a.sum,buckets:a.buckets,count:a.count}}})}}}})),lr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Buckets=void 0,e.Buckets=class e{backing;indexBase;indexStart;indexEnd;constructor(e=new t,n=0,r=0,i=0){this.backing=e,this.indexBase=n,this.indexStart=r,this.indexEnd=i}get offset(){return this.indexStart}get length(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1}counts(){return Array.from({length:this.length},(e,t)=>this.at(t))}at(e){let t=this.indexBase-this.indexStart;return e<t&&(e+=this.backing.length),e-=t,this.backing.countAt(e)}incrementBucket(e,t){this.backing.increment(e,t)}decrementBucket(e,t){this.backing.decrement(e,t)}trim(){for(let e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(let e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this._rotate()}downscale(e){this._rotate();let t=1+this.indexEnd-this.indexStart,n=1<<e,r=0,i=0;for(let e=this.indexStart;e<=this.indexEnd;){let a=e%n;a<0&&(a+=n);for(let o=a;o<n&&r<t;o++)this._relocateBucket(i,r),r++,e++;i++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart}clone(){return new e(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)}_rotate(){let e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)}_relocateBucket(e,t){e!==t&&this.incrementBucket(e,this.backing.emptyBucket(t))}};var t=class e{_counts;constructor(e=[0]){this._counts=e}get length(){return this._counts.length}countAt(e){return this._counts[e]}growTo(e,t,n){let r=Array(e).fill(0);r.splice(n,this._counts.length-t,...this._counts.slice(t)),r.splice(0,t,...this._counts.slice(0,t)),this._counts=r}reverse(e,t){let n=Math.floor((e+t)/2)-e;for(let r=0;r<n;r++){let n=this._counts[e+r];this._counts[e+r]=this._counts[t-r-1],this._counts[t-r-1]=n}}emptyBucket(e){let t=this._counts[e];return this._counts[e]=0,t}increment(e,t){this._counts[e]+=t}decrement(e,t){this._counts[e]>=t?this._counts[e]-=t:this._counts[e]=0}clone(){return new e([...this._counts])}}})),ur=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getSignificand=e.getNormalBase2=e.MIN_VALUE=e.MAX_NORMAL_EXPONENT=e.MIN_NORMAL_EXPONENT=e.SIGNIFICAND_WIDTH=void 0,e.SIGNIFICAND_WIDTH=52;let t=1023;e.MIN_NORMAL_EXPONENT=-t+1,e.MAX_NORMAL_EXPONENT=t,e.MIN_VALUE=2**-1022;function n(e){let n=new DataView(new ArrayBuffer(8));return n.setFloat64(0,e),((n.getUint32(0)&2146435072)>>20)-t}e.getNormalBase2=n;function r(e){let t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);let n=t.getUint32(0),r=t.getUint32(4);return(n&1048575)*2**32+r}e.getSignificand=r})),dr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.nextGreaterSquare=e.ldexp=void 0;function t(e,t){return e===0||e===1/0||e===-1/0||Number.isNaN(e)?e:e*2**t}e.ldexp=t;function n(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,e}e.nextGreaterSquare=n})),fr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MappingError=void 0,e.MappingError=class extends Error{}})),pr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ExponentMapping=void 0;let t=ur(),n=dr(),r=fr();e.ExponentMapping=class{_shift;constructor(e){this._shift=-e}mapToIndex(e){return e<t.MIN_VALUE?this._minNormalLowerBoundaryIndex():t.getNormalBase2(e)+this._rightShift(t.getSignificand(e)-1,t.SIGNIFICAND_WIDTH)>>this._shift}lowerBoundary(e){let t=this._minNormalLowerBoundaryIndex();if(e<t)throw new r.MappingError(`underflow: ${e} is < minimum lower boundary: ${t}`);let i=this._maxNormalLowerBoundaryIndex();if(e>i)throw new r.MappingError(`overflow: ${e} is > maximum lower boundary: ${i}`);return n.ldexp(1,e<<this._shift)}get scale(){return this._shift===0?0:-this._shift}_minNormalLowerBoundaryIndex(){let e=t.MIN_NORMAL_EXPONENT>>this._shift;return this._shift<2&&e--,e}_maxNormalLowerBoundaryIndex(){return t.MAX_NORMAL_EXPONENT>>this._shift}_rightShift(e,t){return Math.floor(e*2**-t)}}})),mr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LogarithmMapping=void 0;let t=ur(),n=dr(),r=fr();e.LogarithmMapping=class{_scale;_scaleFactor;_inverseFactor;constructor(e){this._scale=e,this._scaleFactor=n.ldexp(Math.LOG2E,e),this._inverseFactor=n.ldexp(Math.LN2,-e)}mapToIndex(e){if(e<=t.MIN_VALUE)return this._minNormalLowerBoundaryIndex()-1;if(t.getSignificand(e)===0)return(t.getNormalBase2(e)<<this._scale)-1;let n=Math.floor(Math.log(e)*this._scaleFactor),r=this._maxNormalLowerBoundaryIndex();return n>=r?r:n}lowerBoundary(e){let n=this._maxNormalLowerBoundaryIndex();if(e>=n){if(e===n)return 2*Math.exp((e-(1<<this._scale))/this._scaleFactor);throw new r.MappingError(`overflow: ${e} is > maximum lower boundary: ${n}`)}let i=this._minNormalLowerBoundaryIndex();if(e<=i){if(e===i)return t.MIN_VALUE;if(e===i-1)return Math.exp((e+(1<<this._scale))/this._scaleFactor)/2;throw new r.MappingError(`overflow: ${e} is < minimum lower boundary: ${i}`)}return Math.exp(e*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return t.MIN_NORMAL_EXPONENT<<this._scale}_maxNormalLowerBoundaryIndex(){return(t.MAX_NORMAL_EXPONENT+1<<this._scale)-1}}})),hr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getMapping=void 0;let t=pr(),n=mr(),r=fr(),i=Array.from({length:31},(e,r)=>r>10?new n.LogarithmMapping(r-10):new t.ExponentMapping(r-10));function a(e){if(e>20||e<-10)throw new r.MappingError(`expected scale >= -10 && <= 20, got: ${e}`);return i[e+10]}e.getMapping=a})),gr=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.ExponentialHistogramAggregator=t.ExponentialHistogramAccumulation=void 0;let n=R(),r=I(),i=(v(),e(x)),a=lr(),o=hr(),s=dr();var c=class e{static combine(t,n){return new e(Math.min(t.low,n.low),Math.max(t.high,n.high))}low;high;constructor(e,t){this.low=e,this.high=t}},l=class e{startTime;_maxSize;_recordMinMax;_sum;_count;_zeroCount;_min;_max;_positive;_negative;_mapping;constructor(e,t=160,n=!0,r=0,s=0,c=0,l=1/0,u=-1/0,d=new a.Buckets,f=new a.Buckets,p=(0,o.getMapping)(20)){this.startTime=e,this._maxSize=t,this._recordMinMax=n,this._sum=r,this._count=s,this._zeroCount=c,this._min=l,this._max=u,this._positive=d,this._negative=f,this._mapping=p,this._maxSize<2&&(i.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, \
@@ -11,4 +11,4 @@ To resolve the conflict:`,(0,i.getConflictResolutionRecipe)(t,e))),a=o):r.diag.w
11
11
  `,`Details:
12
12
  `,(0,i.getIncompatibilityDetails)(t,e),`To resolve the conflict:
13
13
  `,(0,i.getConflictResolutionRecipe)(t,e))}return a}}})),zr=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.MultiMetricStorage=void 0;let n=(v(),e(x));t.MultiMetricStorage=class{_backingStorages;hasAttributeProcessor;constructor(e){this._backingStorages=e,this.hasAttributeProcessor=e.some(e=>e.hasAttributeProcessor)}record(e,t,r,i){this.hasAttributeProcessor&&r===void 0&&(r=n.context.active());let a=this._backingStorages;for(let n=0;n<a.length;n++)a[n].record(e,t,r,i)}}})),Br=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.BatchObservableResultImpl=t.ObservableResultImpl=void 0;let n=(v(),e(x)),r=V(),i=jr();t.ObservableResultImpl=class{_buffer=new r.AttributeHashMap;_instrumentName;_valueType;constructor(e,t){this._instrumentName=e,this._valueType=t}observe(e,t={}){if(typeof e!=`number`){n.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${e}`);return}this._valueType===n.ValueType.INT&&!Number.isInteger(e)&&(n.diag.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`),e=Math.trunc(e),!Number.isInteger(e))||this._buffer.set(t,e)}},t.BatchObservableResultImpl=class{_buffer=new Map;observe(e,t,a={}){if(!(0,i.isObservableInstrument)(e))return;let o=this._buffer.get(e);if(o??(o=new r.AttributeHashMap,this._buffer.set(e,o)),typeof t!=`number`){n.diag.warn(`non-number value provided to metric ${e._descriptor.name}: ${t}`);return}e._descriptor.valueType===n.ValueType.INT&&!Number.isInteger(t)&&(n.diag.warn(`INT value type cannot accept a floating-point value for ${e._descriptor.name}, ignoring the fractional digits.`),t=Math.trunc(t),!Number.isInteger(t))||o.set(a,t)}}})),Vr=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.ObservableRegistry=void 0;let n=(v(),e(x)),r=jr(),i=Br(),a=L();t.ObservableRegistry=class{_callbacks=[];_batchCallbacks=[];addCallback(e,t){this._findCallback(e,t)>=0||this._callbacks.push({callback:e,instrument:t})}removeCallback(e,t){let n=this._findCallback(e,t);n<0||this._callbacks.splice(n,1)}addBatchCallback(e,t){let i=new Set(t.filter(r.isObservableInstrument));if(i.size===0){n.diag.error(`BatchObservableCallback is not associated with valid instruments`,t);return}this._findBatchCallback(e,i)>=0||this._batchCallbacks.push({callback:e,instruments:i})}removeBatchCallback(e,t){let n=new Set(t.filter(r.isObservableInstrument)),i=this._findBatchCallback(e,n);i<0||this._batchCallbacks.splice(i,1)}async observe(e,t){let n=this._observeCallbacks(e,t),r=this._observeBatchCallbacks(e,t);return(await Promise.allSettled([...n,...r])).filter(e=>e.status===`rejected`).map(e=>e.reason)}_observeCallbacks(e,t){return this._callbacks.map(async({callback:n,instrument:r})=>{let o=new i.ObservableResultImpl(r._descriptor.name,r._descriptor.valueType),s=Promise.resolve(n(o));t!=null&&(s=(0,a.callWithTimeout)(s,t)),await s,r._metricStorages.forEach(t=>{t.record(o._buffer,e)})})}_observeBatchCallbacks(e,t){return this._batchCallbacks.map(async({callback:n,instruments:r})=>{let o=new i.BatchObservableResultImpl,s=Promise.resolve(n(o));t!=null&&(s=(0,a.callWithTimeout)(s,t)),await s,r.forEach(t=>{let n=o._buffer.get(t);n!=null&&t._metricStorages.forEach(t=>{t.record(n,e)})})})}_findCallback(e,t){return this._callbacks.findIndex(n=>n.callback===e&&n.instrument===t)}_findBatchCallback(e,t){return this._batchCallbacks.findIndex(n=>n.callback===e&&(0,a.setEquals)(n.instruments,t))}}})),Hr=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.SyncMetricStorage=void 0;let n=(v(),e(x)),r=Nr(),i=Pr(),a=Fr();t.SyncMetricStorage=class extends r.MetricStorage{_aggregationCardinalityLimit;_deltaMetricStorage;_temporalMetricStorage;_attributesProcessor;constructor(e,t,n,r,o){super(e),this._aggregationCardinalityLimit=o,this._deltaMetricStorage=new i.DeltaMetricProcessor(t,this._aggregationCardinalityLimit),this._temporalMetricStorage=new a.TemporalMetricProcessor(t,r),this._attributesProcessor=n,this.hasAttributeProcessor=n!==void 0}hasAttributeProcessor;record(e,t,r,i){this._attributesProcessor!==void 0&&(t=this._attributesProcessor.process(t,r??n.context.active())),this._deltaMetricStorage.record(e,t,i)}collect(e,t){let n=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,n,t)}}})),Ur=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MeterSharedState=void 0;let t=B(),n=Mr(),r=Ir(),i=Rr(),a=zr(),o=Vr(),s=Hr();e.MeterSharedState=class{metricStorageRegistry=new i.MetricStorageRegistry;observableRegistry=new o.ObservableRegistry;meter;_meterProviderSharedState;_instrumentationScope;constructor(e,t){this.meter=new n.Meter(this),this._meterProviderSharedState=e,this._instrumentationScope=t}registerMetricStorage(e){let t=this._registerMetricStorage(e,s.SyncMetricStorage);return t.length===1?t[0]:new a.MultiMetricStorage(t)}registerAsyncMetricStorage(e){return this._registerMetricStorage(e,r.AsyncMetricStorage)}async collect(e,t,n){let r=await this.observableRegistry.observe(t,n?.timeoutMillis),i=this.metricStorageRegistry.getStorages(e);if(i.length===0)return null;let a=[];return i.forEach(n=>{let r=n.collect(e,t);r!=null&&a.push(r)}),a.length===0?{errors:r}:{scopeMetrics:{scope:this._instrumentationScope,metrics:a},errors:r}}_registerMetricStorage(e,n){let r=this._meterProviderSharedState.viewRegistry.findViews(e,this._instrumentationScope).map(r=>{let i=(0,t.createInstrumentDescriptorWithView)(r,e),a=this.metricStorageRegistry.findOrUpdateCompatibleStorage(i);if(a!=null)return a;let o=new n(i,r.aggregation.createAggregator(i),r.attributesProcessor,this._meterProviderSharedState.metricCollectors,r.aggregationCardinalityLimit);return this.metricStorageRegistry.register(o),o});if(r.length===0){let t=this._meterProviderSharedState.selectAggregations(e.type).map(([t,r])=>{let i=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(t,e);if(i!=null)return i;let a=r.createAggregator(e),o=t.selectCardinalityLimit(e.type),s=new n(e,a,void 0,[t],o);return this.metricStorageRegistry.registerForCollector(t,s),s});r=r.concat(t)}return r}}})),Wr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MeterProviderSharedState=void 0;let t=L(),n=Ar(),r=Ur(),i=z();e.MeterProviderSharedState=class{viewRegistry=new n.ViewRegistry;metricCollectors=[];meterSharedStates=new Map;resource;constructor(e){this.resource=e}getMeterSharedState(e){let n=(0,t.instrumentationScopeId)(e),i=this.meterSharedStates.get(n);return i??(i=new r.MeterSharedState(this,e),this.meterSharedStates.set(n,i)),i}selectAggregations(e){let t=[];for(let n of this.metricCollectors)t.push([n,(0,i.toAggregation)(n.selectAggregation(e))]);return t}}})),Gr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MetricCollector=void 0;let t=S();e.MetricCollector=class{_sharedState;_metricReader;constructor(e,t){this._sharedState=e,this._metricReader=t}async collect(e){let n=(0,t.millisToHrTime)(Date.now()),r=[],i=[],a=Array.from(this._sharedState.meterSharedStates.values()).map(async t=>{let a=await t.collect(this,n,e);a?.scopeMetrics!=null&&r.push(a.scopeMetrics),a?.errors!=null&&i.push(...a.errors)});return await Promise.all(a),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:r},errors:i}}async forceFlush(e){await this._metricReader.forceFlush(e)}async shutdown(e){await this._metricReader.shutdown(e)}selectAggregationTemporality(e){return this._metricReader.selectAggregationTemporality(e)}selectAggregation(e){return this._metricReader.selectAggregation(e)}selectCardinalityLimit(e){return this._metricReader.selectCardinalityLimit?.(e)??2e3}}})),Kr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ExactPredicate=e.PatternPredicate=void 0;let t=/[\^$\\.+?()[\]{}|]/g;e.PatternPredicate=class e{_matchAll;_regexp;constructor(t){t===`*`?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(e.escapePattern(t)))}match(e){return this._matchAll?!0:this._regexp.test(e)}static escapePattern(e){return`^${e.replace(t,`\\$&`).replace(`*`,`.*`)}$`}static hasWildcard(e){return e.includes(`*`)}},e.ExactPredicate=class{_matchAll;_pattern;constructor(e){this._matchAll=e===void 0,this._pattern=e}match(e){return!!(this._matchAll||e===this._pattern)}}})),qr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createDenyListAttributesProcessor=e.createAllowListAttributesProcessor=e.createMultiAttributesProcessor=e.createNoopAttributesProcessor=void 0;var t=class{process(e,t){return e}},n=class{_processors;constructor(e){this._processors=e}process(e,t){let n=e;for(let e of this._processors)n=e.process(n,t);return n}},r=class{_allowedAttributeNames;constructor(e){this._allowedAttributeNames=new Set(e)}process(e,t){let n={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&this._allowedAttributeNames.has(t)&&(n[t]=e[t]);return n}},i=class{_deniedAttributeNames;constructor(e){this._deniedAttributeNames=new Set(e)}process(e,t){let n={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&!this._deniedAttributeNames.has(t)&&(n[t]=e[t]);return n}};function a(){return l}e.createNoopAttributesProcessor=a;function o(e){return new n(e)}e.createMultiAttributesProcessor=o;function s(e){return new r(e)}e.createAllowListAttributesProcessor=s;function c(e){return new i(e)}e.createDenyListAttributesProcessor=c;let l=new t})),Jr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.InstrumentSelector=void 0;let t=Kr();e.InstrumentSelector=class{_nameFilter;_type;_unitFilter;constructor(e){this._nameFilter=new t.PatternPredicate(e?.name??`*`),this._type=e?.type,this._unitFilter=new t.ExactPredicate(e?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}}})),Yr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MeterSelector=void 0;let t=Kr();e.MeterSelector=class{_nameFilter;_versionFilter;_schemaUrlFilter;constructor(e){this._nameFilter=new t.ExactPredicate(e?.name),this._versionFilter=new t.ExactPredicate(e?.version),this._schemaUrlFilter=new t.ExactPredicate(e?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}}})),Xr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.View=void 0;let t=Kr(),n=qr(),r=Jr(),i=Yr(),a=z();function o(e){return e.instrumentName==null&&e.instrumentType==null&&e.instrumentUnit==null&&e.meterName==null&&e.meterVersion==null&&e.meterSchemaUrl==null}function s(e){if(o(e))throw Error(`Cannot create view with no selector arguments supplied`);if(e.name!=null&&(e?.instrumentName==null||t.PatternPredicate.hasWildcard(e.instrumentName)))throw Error(`Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.`)}e.View=class{name;description;aggregation;attributesProcessor;instrumentSelector;meterSelector;aggregationCardinalityLimit;constructor(e){s(e),e.attributesProcessors==null?this.attributesProcessor=(0,n.createNoopAttributesProcessor)():this.attributesProcessor=(0,n.createMultiAttributesProcessor)(e.attributesProcessors),this.name=e.name,this.description=e.description,this.aggregation=(0,a.toAggregation)(e.aggregation??{type:a.AggregationType.DEFAULT}),this.instrumentSelector=new r.InstrumentSelector({name:e.instrumentName,type:e.instrumentType,unit:e.instrumentUnit}),this.meterSelector=new i.MeterSelector({name:e.meterName,version:e.meterVersion,schemaUrl:e.meterSchemaUrl}),this.aggregationCardinalityLimit=e.aggregationCardinalityLimit}}})),Zr=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.MeterProvider=void 0;let n=(v(),e(x)),r=ar(),i=Tr(),a=Wr(),o=Gr(),s=Xr();t.MeterProvider=class{_sharedState;_shutdown=!1;constructor(e){if(this._sharedState=new a.MeterProviderSharedState(e?.resource??(0,r.defaultResource)()),e?.views!=null&&e.views.length>0)for(let t of e.views)this._sharedState.viewRegistry.addView(new s.View(t));if(e?.readers!=null&&e.readers.length>0)for(let t of e.readers){let n=new o.MetricCollector(this._sharedState,t);t.setMetricProducer(n),this._sharedState.metricCollectors.push(n),e.sdkMetricsEnabled&&t instanceof i.MetricReader&&t._setSelfObsMeterProvider(this)}}getMeter(e,t=``,r={}){return this._shutdown?(n.diag.warn(`A shutdown MeterProvider cannot provide a Meter`),(0,n.createNoopMeter)()):this._sharedState.getMeterSharedState({name:e,version:t,schemaUrl:r.schemaUrl}).meter}async shutdown(e){if(this._shutdown){n.diag.warn(`shutdown may only be called once per MeterProvider`);return}this._shutdown=!0,await Promise.all(this._sharedState.metricCollectors.map(t=>t.shutdown(e)))}async forceFlush(e){if(this._shutdown){n.diag.warn(`invalid attempt to force flush after MeterProvider shutdown`);return}await Promise.all(this._sharedState.metricCollectors.map(t=>t.forceFlush(e)))}}})),Qr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TimeoutError=e.createDenyListAttributesProcessor=e.createAllowListAttributesProcessor=e.AggregationType=e.MeterProvider=e.ConsoleMetricExporter=e.InMemoryMetricExporter=e.PeriodicExportingMetricReader=e.MetricReader=e.InstrumentType=e.DataPointType=e.AggregationTemporality=void 0;var t=or();Object.defineProperty(e,`AggregationTemporality`,{enumerable:!0,get:function(){return t.AggregationTemporality}});var n=I();Object.defineProperty(e,`DataPointType`,{enumerable:!0,get:function(){return n.DataPointType}}),Object.defineProperty(e,`InstrumentType`,{enumerable:!0,get:function(){return n.InstrumentType}});var r=Tr();Object.defineProperty(e,`MetricReader`,{enumerable:!0,get:function(){return r.MetricReader}});var i=Dr();Object.defineProperty(e,`PeriodicExportingMetricReader`,{enumerable:!0,get:function(){return i.PeriodicExportingMetricReader}});var a=Or();Object.defineProperty(e,`InMemoryMetricExporter`,{enumerable:!0,get:function(){return a.InMemoryMetricExporter}});var o=kr();Object.defineProperty(e,`ConsoleMetricExporter`,{enumerable:!0,get:function(){return o.ConsoleMetricExporter}});var s=Zr();Object.defineProperty(e,`MeterProvider`,{enumerable:!0,get:function(){return s.MeterProvider}});var c=z();Object.defineProperty(e,`AggregationType`,{enumerable:!0,get:function(){return c.AggregationType}});var l=qr();Object.defineProperty(e,`createAllowListAttributesProcessor`,{enumerable:!0,get:function(){return l.createAllowListAttributesProcessor}}),Object.defineProperty(e,`createDenyListAttributesProcessor`,{enumerable:!0,get:function(){return l.createDenyListAttributesProcessor}});var u=L();Object.defineProperty(e,`TimeoutError`,{enumerable:!0,get:function(){return u.TimeoutError}})})),$r=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ExceptionEventName=void 0,e.ExceptionEventName=`exception`})),ei=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.formatInspect=e.settledResourceAttributes=e.inspectCustom=void 0,e.inspectCustom=Symbol.for(`nodejs.util.inspect.custom`);function t(e){let t={};for(let[n,r]of e.getRawAttributes())typeof r?.then!=`function`&&r!=null&&(t[n]??=r);return t}e.settledResourceAttributes=t;function n(e,t,n,r,i){if(typeof n==`number`&&n<0){let t=`[${e}]`;return r?.stylize?r.stylize(t,`special`):t}return typeof i!=`function`||!r?t:`${e} ${i(t,{...r,depth:r.depth==null?r.depth:r.depth-1})}`}e.formatInspect=n})),ti=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.SpanImpl=void 0;let n=(v(),e(x)),r=S(),i=(C(),e(me)),a=$r(),o=ei();t.SpanImpl=class{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;_attributesCount=0;name;status={code:n.SpanStatusCode.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_recordEndMetrics;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(e){let t=Date.now();if(this._spanContext=e.spanContext,this._performanceStartTime=r.otperformance.now(),this._performanceOffset=t-(this._performanceStartTime+r.otperformance.timeOrigin),this._startTimeProvided=e.startTime!=null,this._spanLimits=e.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit??0,this._spanProcessor=e.spanProcessor,this.name=e.name,this.parentSpanContext=e.parentSpanContext,this.kind=e.kind,e.links)for(let t of e.links)this.addLink(t);this.startTime=this._getTime(e.startTime??t),this.resource=e.resource,this.instrumentationScope=e.scope,this._recordEndMetrics=e.recordEndMetrics,e.attributes!=null&&this.setAttributes(e.attributes),this._spanProcessor.onStart(this,e.context)}spanContext(){return this._spanContext}setAttribute(e,t){if(t==null||this._isSpanEnded())return this;if(e.length===0)return n.diag.warn(`Invalid attribute key: ${e}`),this;if(!(0,r.isAttributeValue)(t))return n.diag.warn(`Invalid attribute value set for key: ${e}`),this;let{attributeCountLimit:i}=this._spanLimits,a=!Object.prototype.hasOwnProperty.call(this.attributes,e);return i!==void 0&&this._attributesCount>=i&&a?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),a&&this._attributesCount++,this)}setAttributes(e){for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.setAttribute(t,e[t]);return this}addEvent(e,t,i){if(this._isSpanEnded())return this;let{eventCountLimit:a}=this._spanLimits;if(a===0)return n.diag.warn(`No events allowed.`),this._droppedEventsCount++,this;a!==void 0&&this.events.length>=a&&(this._droppedEventsCount===0&&n.diag.debug(`Dropping extra events.`),this.events.shift(),this._droppedEventsCount++),(0,r.isTimeInput)(t)&&((0,r.isTimeInput)(i)||(i=t),t=void 0);let o=(0,r.sanitizeAttributes)(t),{attributePerEventCountLimit:s}=this._spanLimits,c={},l=0,u=0;for(let e in o){if(!Object.prototype.hasOwnProperty.call(o,e))continue;let t=o[e];if(s!==void 0&&u>=s){l++;continue}c[e]=this._truncateToSize(t),u++}return this.events.push({name:e,attributes:c,time:this._getTime(i),droppedAttributesCount:l}),this}addLink(e){if(this._isSpanEnded())return this;let{linkCountLimit:t}=this._spanLimits;if(t===0)return this._droppedLinksCount++,this;t!==void 0&&this.links.length>=t&&(this._droppedLinksCount===0&&n.diag.debug(`Dropping extra links.`),this.links.shift(),this._droppedLinksCount++);let{attributePerLinkCountLimit:i}=this._spanLimits,a=(0,r.sanitizeAttributes)(e.attributes),o={},s=0,c=0;for(let e in a){if(!Object.prototype.hasOwnProperty.call(a,e))continue;let t=a[e];if(i!==void 0&&c>=i){s++;continue}o[e]=this._truncateToSize(t),c++}let l={context:e.context};return c>0&&(l.attributes=o),s>0&&(l.droppedAttributesCount=s),this.links.push(l),this}addLinks(e){for(let t of e)this.addLink(t);return this}setStatus(e){if(this._isSpanEnded()||e.code===n.SpanStatusCode.UNSET||this.status.code===n.SpanStatusCode.OK)return this;let t={code:e.code};return e.code===n.SpanStatusCode.ERROR&&(typeof e.message==`string`?t.message=e.message:e.message!=null&&n.diag.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`)),this.status=t,this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e){if(this._isSpanEnded()){n.diag.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this.endTime=this._getTime(e),this._duration=(0,r.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(n.diag.warn(`Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.`,this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&n.diag.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._droppedLinksCount>0&&n.diag.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`),this._spanProcessor.onEnding&&this._spanProcessor.onEnding(this),this._recordEndMetrics?.(),this._ended=!0,this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e==`number`&&e<=r.otperformance.now())return(0,r.hrTime)(e+this._performanceOffset);if(typeof e==`number`)return(0,r.millisToHrTime)(e);if(e instanceof Date)return(0,r.millisToHrTime)(e.getTime());if((0,r.isTimeInputHrTime)(e))return e;if(this._startTimeProvided)return(0,r.millisToHrTime)(Date.now());let t=r.otperformance.now()-this._performanceStartTime;return(0,r.addHrTimes)(this.startTime,(0,r.millisToHrTime)(t))}isRecording(){return this._ended===!1}recordException(e,t){let r={};typeof e==`string`?r[i.ATTR_EXCEPTION_MESSAGE]=e:e&&(e.code?r[i.ATTR_EXCEPTION_TYPE]=e.code.toString():e.name&&(r[i.ATTR_EXCEPTION_TYPE]=e.name),e.message&&(r[i.ATTR_EXCEPTION_MESSAGE]=e.message),e.stack&&(r[i.ATTR_EXCEPTION_STACKTRACE]=e.stack)),r[i.ATTR_EXCEPTION_TYPE]||r[i.ATTR_EXCEPTION_MESSAGE]?this.addEvent(a.ExceptionEventName,r,t):n.diag.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){let e=Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);n.diag.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,e)}return this._ended}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_truncateToSize(e){let t=this._attributeValueLengthLimit;return t<=0?(n.diag.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e==`string`?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(e=>typeof e==`string`?this._truncateToLimitUtil(e,t):e):e}[o.inspectCustom](e,t,n){let r={name:this.name,kind:this.kind,spanContext:this._spanContext,parentSpanContext:this.parentSpanContext,status:this.status,startTime:this.startTime,endTime:this.endTime,duration:this._duration,ended:this._ended,attributes:this.attributes,events:this.events,links:this.links,droppedAttributesCount:this._droppedAttributesCount,droppedEventsCount:this._droppedEventsCount,droppedLinksCount:this._droppedLinksCount,instrumentationScope:this.instrumentationScope,resource:{attributes:(0,o.settledResourceAttributes)(this.resource)}};return(0,o.formatInspect)(`SpanImpl`,r,e,t,n)}}})),H=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SamplingDecision=void 0,(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(e.SamplingDecision||={})})),U=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.OTEL_COMPONENT_TYPE_VALUE_SIMPLE_SPAN_PROCESSOR=e.OTEL_COMPONENT_TYPE_VALUE_BATCHING_SPAN_PROCESSOR=e.METRIC_OTEL_SDK_SPAN_STARTED=e.METRIC_OTEL_SDK_SPAN_LIVE=e.METRIC_OTEL_SDK_PROCESSOR_SPAN_QUEUE_SIZE=e.METRIC_OTEL_SDK_PROCESSOR_SPAN_QUEUE_CAPACITY=e.METRIC_OTEL_SDK_PROCESSOR_SPAN_PROCESSED=e.ATTR_OTEL_SPAN_SAMPLING_RESULT=e.ATTR_OTEL_SPAN_PARENT_ORIGIN=e.ATTR_OTEL_COMPONENT_TYPE=e.ATTR_OTEL_COMPONENT_NAME=void 0,e.ATTR_OTEL_COMPONENT_NAME=`otel.component.name`,e.ATTR_OTEL_COMPONENT_TYPE=`otel.component.type`,e.ATTR_OTEL_SPAN_PARENT_ORIGIN=`otel.span.parent.origin`,e.ATTR_OTEL_SPAN_SAMPLING_RESULT=`otel.span.sampling_result`,e.METRIC_OTEL_SDK_PROCESSOR_SPAN_PROCESSED=`otel.sdk.processor.span.processed`,e.METRIC_OTEL_SDK_PROCESSOR_SPAN_QUEUE_CAPACITY=`otel.sdk.processor.span.queue.capacity`,e.METRIC_OTEL_SDK_PROCESSOR_SPAN_QUEUE_SIZE=`otel.sdk.processor.span.queue.size`,e.METRIC_OTEL_SDK_SPAN_LIVE=`otel.sdk.span.live`,e.METRIC_OTEL_SDK_SPAN_STARTED=`otel.sdk.span.started`,e.OTEL_COMPONENT_TYPE_VALUE_BATCHING_SPAN_PROCESSOR=`batching_span_processor`,e.OTEL_COMPONENT_TYPE_VALUE_SIMPLE_SPAN_PROCESSOR=`simple_span_processor`})),ni=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TracerMetrics=void 0;let t=H(),n=U();e.TracerMetrics=class{startedSpans;liveSpans;constructor(e){this.startedSpans=e.createCounter(n.METRIC_OTEL_SDK_SPAN_STARTED,{unit:`{span}`,description:`The number of created spans.`}),this.liveSpans=e.createUpDownCounter(n.METRIC_OTEL_SDK_SPAN_LIVE,{unit:`{span}`,description:`The number of currently live spans.`})}startSpan(e,a){let o=i(a);if(this.startedSpans.add(1,{[n.ATTR_OTEL_SPAN_PARENT_ORIGIN]:r(e),[n.ATTR_OTEL_SPAN_SAMPLING_RESULT]:o}),a===t.SamplingDecision.NOT_RECORD)return()=>{};let s={[n.ATTR_OTEL_SPAN_SAMPLING_RESULT]:o};return this.liveSpans.add(1,s),()=>{this.liveSpans.add(-1,s)}}};function r(e){return e?e.isRemote?`remote`:`local`:`none`}function i(e){switch(e){case t.SamplingDecision.RECORD_AND_SAMPLED:return`RECORD_AND_SAMPLE`;case t.SamplingDecision.RECORD:return`RECORD_ONLY`;case t.SamplingDecision.NOT_RECORD:return`DROP`}}})),ri=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.VERSION=void 0,e.VERSION=`2.9.0`})),ii=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.Tracer=void 0;let n=(v(),e(x)),r=S(),i=ti(),a=ni(),o=ri(),s=ei();t.Tracer=class{_sampler;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;_tracerMetrics;constructor(e,t){this.instrumentationScope=e,this._sampler=t.sampler,this._spanLimits=t.spanLimits,this._resource=t.resource,this._idGenerator=t.idGenerator,this._spanProcessor=t.spanProcessor;let n=t.meterProvider.getMeter(`@opentelemetry/sdk-trace`,o.VERSION);this._tracerMetrics=new a.TracerMetrics(n)}startSpan(e,t={},a=n.context.active()){t.root&&(a=n.trace.deleteSpan(a));let o=n.trace.getSpan(a);if((0,r.isTracingSuppressed)(a))return n.diag.debug(`Instrumentation suppressed, returning Noop Span`),n.trace.wrapSpanContext(n.INVALID_SPAN_CONTEXT);let s=o?.spanContext(),c=this._idGenerator.generateSpanId(),l,u,d;!s||!n.trace.isSpanContextValid(s)?u=this._idGenerator.generateTraceId():(u=s.traceId,d=s.traceState,l=s);let f=t.kind??n.SpanKind.INTERNAL,p=(t.links??[]).map(e=>({context:e.context,attributes:(0,r.sanitizeAttributes)(e.attributes)})),m=(0,r.sanitizeAttributes)(t.attributes),h=this._sampler.shouldSample(a,u,e,f,m,p),g=this._tracerMetrics.startSpan(s,h.decision);d=h.traceState??d;let ee=h.decision===n.SamplingDecision.RECORD_AND_SAMPLED?n.TraceFlags.SAMPLED:n.TraceFlags.NONE,te={traceId:u,spanId:c,traceFlags:ee,traceState:d};if(h.decision===n.SamplingDecision.NOT_RECORD)return n.diag.debug(`Recording is off, propagating context in a non-recording span`),n.trace.wrapSpanContext(te);let ne=(0,r.sanitizeAttributes)(Object.assign(m,h.attributes));return new i.SpanImpl({resource:this._resource,scope:this.instrumentationScope,context:a,spanContext:te,name:e,kind:f,links:p,parentSpanContext:l,attributes:ne,startTime:t.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits,recordEndMetrics:g})}startActiveSpan(e,t,r,i){let a,o,s;if(arguments.length<2)return;arguments.length===2?s=t:arguments.length===3?(a=t,s=r):(a=t,o=r,s=i);let c=o??n.context.active(),l=this.startSpan(e,a,c),u=n.trace.setSpan(c,l);return n.context.with(u,s,void 0,l)}[s.inspectCustom](e,t,n){let r={instrumentationScope:this.instrumentationScope,resource:{attributes:(0,s.settledResourceAttributes)(this._resource)},spanLimits:this._spanLimits};return(0,s.formatInspect)(`Tracer`,r,e,t,n)}}})),ai=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MultiSpanProcessor=void 0;let t=S();e.MultiSpanProcessor=class{_spanProcessors;constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise(n=>{Promise.all(e).then(()=>{n()}).catch(e=>{(0,t.globalErrorHandler)(e||Error(`MultiSpanProcessor: forceFlush failed`)),n()})})}onStart(e,t){for(let n of this._spanProcessors)n.onStart(e,t)}onEnding(e){for(let t of this._spanProcessors)t.onEnding&&t.onEnding(e)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise((t,n)=>{Promise.all(e).then(()=>{t()},n)})}}})),oi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AlwaysOffSampler=void 0;let t=H();e.AlwaysOffSampler=class{shouldSample(){return{decision:t.SamplingDecision.NOT_RECORD}}toString(){return`AlwaysOffSampler`}}})),si=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AlwaysOnSampler=void 0;let t=H();e.AlwaysOnSampler=class{shouldSample(){return{decision:t.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return`AlwaysOnSampler`}}})),ci=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.ParentBasedSampler=void 0;let n=(v(),e(x)),r=S(),i=oi(),a=si();t.ParentBasedSampler=class{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(e){this._root=e.root,this._root||=((0,r.globalErrorHandler)(Error(`ParentBasedSampler must have a root sampler configured`)),new a.AlwaysOnSampler),this._remoteParentSampled=e.remoteParentSampled??new a.AlwaysOnSampler,this._remoteParentNotSampled=e.remoteParentNotSampled??new i.AlwaysOffSampler,this._localParentSampled=e.localParentSampled??new a.AlwaysOnSampler,this._localParentNotSampled=e.localParentNotSampled??new i.AlwaysOffSampler}shouldSample(e,t,r,i,a,o){let s=n.trace.getSpanContext(e);return!s||!(0,n.isSpanContextValid)(s)?this._root.shouldSample(e,t,r,i,a,o):s.isRemote?s.traceFlags&n.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,t,r,i,a,o):this._remoteParentNotSampled.shouldSample(e,t,r,i,a,o):s.traceFlags&n.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,t,r,i,a,o):this._localParentNotSampled.shouldSample(e,t,r,i,a,o)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}})),li=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.SpanProcessorMetrics=void 0;let n=(C(),e(me)),r=U(),i=new Map;t.SpanProcessorMetrics=class{processedSpans;queueSize;queueSizeCallback;standardAttrs;droppedAttrs;constructor(e,t,a){let o=i.get(e)??0;if(i.set(e,o+1),this.standardAttrs={[r.ATTR_OTEL_COMPONENT_TYPE]:e,[r.ATTR_OTEL_COMPONENT_NAME]:`${e}/${o}`},this.droppedAttrs={...this.standardAttrs,[n.ATTR_ERROR_TYPE]:`queue_full`},this.processedSpans=t.createCounter(r.METRIC_OTEL_SDK_PROCESSOR_SPAN_PROCESSED,{unit:`{span}`,description:`The number of spans for which the processing has finished, either successful or failed.`}),a){let{capacity:e,getQueueSize:n}=a;t.createUpDownCounter(r.METRIC_OTEL_SDK_PROCESSOR_SPAN_QUEUE_CAPACITY,{unit:`{span}`,description:`The maximum number of spans the queue of a given instance of an SDK span processor can hold.`}).add(e,this.standardAttrs),this.queueSize=t.createObservableUpDownCounter(r.METRIC_OTEL_SDK_PROCESSOR_SPAN_QUEUE_SIZE,{unit:`{span}`,description:`The number of spans in the queue of a given instance of an SDK span processor.`}),this.queueSizeCallback=e=>e.observe(n(),this.standardAttrs),this.queueSize.addCallback(this.queueSizeCallback)}}dropSpans(e){this.processedSpans.add(e,this.droppedAttrs)}finishSpans(e,t){if(!t){this.processedSpans.add(e,this.standardAttrs);return}let r={...this.standardAttrs,[n.ATTR_ERROR_TYPE]:t.name};this.processedSpans.add(e,r)}shutdown(){this.queueSize&&this.queueSizeCallback&&this.queueSize.removeCallback(this.queueSizeCallback)}}})),ui=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.BatchSpanProcessorBase=void 0;let n=(v(),e(x)),r=S(),i=li(),a=U();t.BatchSpanProcessorBase=class{_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_exporter;_metrics;_isExporting=!1;_finishedSpans=[];_timer;_shutdownOnce;_droppedSpansCount=0;constructor(e){this._exporter=e.exporter,this._maxExportBatchSize=e.maxExportBatchSize??512,this._maxQueueSize=e.maxQueueSize??2048,this._scheduledDelayMillis=e.scheduledDelayMillis??5e3,this._exportTimeoutMillis=e.exportTimeoutMillis??3e4,this._shutdownOnce=new r.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(n.diag.warn(`BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize`),this._maxExportBatchSize=this._maxQueueSize);let t=e.selfObsMeterProvider?e.selfObsMeterProvider.getMeter(`@opentelemetry/sdk-trace`):(0,n.createNoopMeter)();this._metrics=new i.SpanProcessorMetrics(a.OTEL_COMPONENT_TYPE_VALUE_BATCHING_SPAN_PROCESSOR,t,{capacity:this._maxQueueSize,getQueueSize:()=>this._finishedSpans.length})}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,t){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&n.TraceFlags.SAMPLED)!==0&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>(this._metrics.shutdown(),this._exporter.shutdown()))}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&n.diag.debug(`maxQueueSize reached, dropping spans`),this._droppedSpansCount++,this._metrics.dropSpans(1);return}this._droppedSpansCount>0&&(n.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,t)=>{let n=[],r=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let e=0,t=r;e<t;e++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,t)=>{let i=setTimeout(()=>{t(Error(`Timeout`))},this._exportTimeoutMillis);n.context.with((0,r.suppressTracing)(n.context.active()),()=>{let n;this._finishedSpans.length<=this._maxExportBatchSize?(n=this._finishedSpans,this._finishedSpans=[]):n=this._finishedSpans.splice(0,this._maxExportBatchSize);let a=()=>this._exporter.export(n,a=>{clearTimeout(i),this._metrics.finishSpans(n.length,a.error),a.code===r.ExportResultCode.SUCCESS?e():t(a.error??Error(`BatchSpanProcessor: span export failed`))}),o=null;for(let e=0,t=n.length;e<t;e++){let t=n[e];t.resource.asyncAttributesPending&&t.resource.waitForAsyncAttributes&&(o??=[],o.push(t.resource.waitForAsyncAttributes()))}o===null?a():Promise.all(o).then(a,e=>{(0,r.globalErrorHandler)(e),t(e)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{this._isExporting=!1,(0,r.globalErrorHandler)(e)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),typeof this._timer!=`number`&&this._timer.unref())}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}}})),di=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BatchSpanProcessor=void 0;let t=ui();e.BatchSpanProcessor=class extends t.BatchSpanProcessorBase{onShutdown(){}}})),fi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.RandomIdGenerator=void 0,e.RandomIdGenerator=class{generateTraceId=n(16);generateSpanId=n(8)};let t=Buffer.allocUnsafe(16);function n(e){return function(){for(let n=0;n<e/4;n++)t.writeUInt32BE(Math.random()*2**32>>>0,n*4);for(let n=0;n<e&&!(t[n]>0);n++)n===e-1&&(t[e-1]=1);return t.toString(`hex`,0,e)}}})),pi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.RandomIdGenerator=e.BatchSpanProcessor=void 0;var t=di();Object.defineProperty(e,`BatchSpanProcessor`,{enumerable:!0,get:function(){return t.BatchSpanProcessor}});var n=fi();Object.defineProperty(e,`RandomIdGenerator`,{enumerable:!0,get:function(){return n.RandomIdGenerator}})})),mi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.RandomIdGenerator=e.BatchSpanProcessor=void 0;var t=pi();Object.defineProperty(e,`BatchSpanProcessor`,{enumerable:!0,get:function(){return t.BatchSpanProcessor}}),Object.defineProperty(e,`RandomIdGenerator`,{enumerable:!0,get:function(){return t.RandomIdGenerator}})})),hi=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.TracerProvider=void 0;let n=(v(),e(x)),r=ar(),i=ii(),a=ai(),o=ci(),s=si(),c=mi(),l=ei();var u;(function(e){e[e.resolved=0]=`resolved`,e[e.timeout=1]=`timeout`,e[e.error=2]=`error`,e[e.unresolved=3]=`unresolved`})(u||={}),t.TracerProvider=class{_resource;_activeSpanProcessor;_forceFlushTimeoutMillis;_tracerOptions;_tracers=new Map;constructor(e={}){this._forceFlushTimeoutMillis=e.forceFlushTimeoutMillis??3e4,this._resource=e.resource??(0,r.defaultResource)();let t=e.spanProcessors??[];this._activeSpanProcessor=new a.MultiSpanProcessor(t),this._tracerOptions={resource:this._resource,sampler:e.sampler??new o.ParentBasedSampler({root:new s.AlwaysOnSampler}),spanLimits:{attributeCountLimit:e.spanLimits?.attributeCountLimit??128,attributeValueLengthLimit:e.spanLimits?.attributeValueLengthLimit??1/0,eventCountLimit:e.spanLimits?.eventCountLimit??128,linkCountLimit:e.spanLimits?.linkCountLimit??128,attributePerEventCountLimit:e.spanLimits?.attributePerEventCountLimit??128,attributePerLinkCountLimit:e.spanLimits?.attributePerLinkCountLimit??128},idGenerator:e.idGenerator||new c.RandomIdGenerator,spanProcessor:this._activeSpanProcessor,meterProvider:e.meterProvider??{getMeter(){return(0,n.createNoopMeter)()}}}}getTracer(e,t,n){let r=`${e}@${t||``}:${n?.schemaUrl||``}`;return this._tracers.has(r)||this._tracers.set(r,new i.Tracer({name:e,version:t,schemaUrl:n?.schemaUrl},this._tracerOptions)),this._tracers.get(r)}forceFlush(){let e=this._forceFlushTimeoutMillis,t=this._activeSpanProcessor._spanProcessors.map(t=>new Promise(n=>{let r,i=setTimeout(()=>{n(Error(`Span processor did not completed within timeout period of ${e} ms`)),r=u.timeout},e);t.forceFlush().then(()=>{clearTimeout(i),r!==u.timeout&&(r=u.resolved,n(r))}).catch(e=>{clearTimeout(i),r=u.error,n(e)})}));return new Promise((e,n)=>{Promise.all(t).then(t=>{let r=t.filter(e=>e!==u.resolved);r.length>0?n(r):e()}).catch(e=>n([e]))})}shutdown(){return this._activeSpanProcessor.shutdown()}[l.inspectCustom](e,t,n){let r=this._activeSpanProcessor._spanProcessors,i={resource:{attributes:(0,l.settledResourceAttributes)(this._resource)},tracers:Array.from(this._tracers.keys()),spanProcessors:r.map(e=>e.constructor?.name??`SpanProcessor`)};return(0,l.formatInspect)(`TracerProvider`,i,e,t,n)}}})),gi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ConsoleSpanExporter=void 0;let t=S();e.ConsoleSpanExporter=class{export(e,t){return this._sendSpans(e,t)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(e){return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationScope,traceId:e.spanContext().traceId,parentSpanContext:e.parentSpanContext,traceState:e.spanContext().traceState?.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:(0,t.hrTimeToMicroseconds)(e.startTime),duration:(0,t.hrTimeToMicroseconds)(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}}_sendSpans(e,n){for(let t of e)console.dir(this._exportInfo(t),{depth:3});if(n)return n({code:t.ExportResultCode.SUCCESS})}}})),_i=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.InMemorySpanExporter=void 0;let t=S();e.InMemorySpanExporter=class{_finishedSpans=[];_stopped=!1;export(e,n){if(this._stopped)return n({code:t.ExportResultCode.FAILED,error:Error(`Exporter has been stopped`)});this._finishedSpans.push(...e),setTimeout(()=>n({code:t.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}}})),vi=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.SimpleSpanProcessor=void 0;let n=(v(),e(x)),r=S(),i=li(),a=U();t.SimpleSpanProcessor=class{_exporter;_metrics;_shutdownOnce;_pendingExports;constructor(e){this._exporter=e.exporter,this._shutdownOnce=new r.BindOnceFuture(this._shutdown,this),this._pendingExports=new Set;let t=e.selfObsMeterProvider?e.selfObsMeterProvider.getMeter(`@opentelemetry/sdk-trace`):(0,n.createNoopMeter)();this._metrics=new i.SpanProcessorMetrics(a.OTEL_COMPONENT_TYPE_VALUE_SIMPLE_SPAN_PROCESSOR,t)}async forceFlush(){await Promise.all(Array.from(this._pendingExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(e,t){}onEnd(e){if(this._shutdownOnce.isCalled||(e.spanContext().traceFlags&n.TraceFlags.SAMPLED)===0)return;let t=this._doExport(e).catch(e=>(0,r.globalErrorHandler)(e));this._pendingExports.add(t),t.finally(()=>this._pendingExports.delete(t))}async _doExport(e){e.resource.asyncAttributesPending&&await e.resource.waitForAsyncAttributes?.();let t=await r.internal._export(this._exporter,[e]);if(this._metrics.finishSpans(1,t.error),t.code!==r.ExportResultCode.SUCCESS)throw t.error??Error(`SimpleSpanProcessor: span export failed (status ${t})`)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._metrics.shutdown(),this._exporter.shutdown()}}})),yi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.NoopSpanProcessor=void 0,e.NoopSpanProcessor=class{onStart(e,t){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}}})),bi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createAlwaysRecordSampler=void 0;let t=H();function n(e){if(!e)throw Error(`createAlwaysRecordSampler requires a delegate sampler`);return{shouldSample(n,r,i,a,o,s){let c=e.shouldSample(n,r,i,a,o,s);return c.decision===t.SamplingDecision.NOT_RECORD?{decision:t.SamplingDecision.RECORD,attributes:c.attributes,traceState:c.traceState}:c},toString(){return`AlwaysRecordSampler{${e.toString()}}`}}}e.createAlwaysRecordSampler=n})),xi=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.TraceIdRatioBasedSampler=void 0;let n=(v(),e(x)),r=H();t.TraceIdRatioBasedSampler=class{_ratio;_upperBound;constructor(e=0){this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:(0,n.isValidTraceId)(t)&&this._accumulate(t)<this._upperBound?r.SamplingDecision.RECORD_AND_SAMPLED:r.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!=`number`||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n<32;n+=8){let r=0;for(let t=0;t<8;t++){let i=e.charCodeAt(n+t),a=i<58?i-48:i<71?i-55:i-87;r=r<<4|a}t=(t^r)>>>0}return t}}})),W=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SamplingDecision=e.TraceIdRatioBasedSampler=e.ParentBasedSampler=e.createAlwaysRecordSampler=e.AlwaysOnSampler=e.AlwaysOffSampler=e.NoopSpanProcessor=e.SimpleSpanProcessor=e.InMemorySpanExporter=e.ConsoleSpanExporter=e.RandomIdGenerator=e.BatchSpanProcessor=e.TracerProvider=void 0;var t=hi();Object.defineProperty(e,`TracerProvider`,{enumerable:!0,get:function(){return t.TracerProvider}});var n=mi();Object.defineProperty(e,`BatchSpanProcessor`,{enumerable:!0,get:function(){return n.BatchSpanProcessor}}),Object.defineProperty(e,`RandomIdGenerator`,{enumerable:!0,get:function(){return n.RandomIdGenerator}});var r=gi();Object.defineProperty(e,`ConsoleSpanExporter`,{enumerable:!0,get:function(){return r.ConsoleSpanExporter}});var i=_i();Object.defineProperty(e,`InMemorySpanExporter`,{enumerable:!0,get:function(){return i.InMemorySpanExporter}});var a=vi();Object.defineProperty(e,`SimpleSpanProcessor`,{enumerable:!0,get:function(){return a.SimpleSpanProcessor}});var o=yi();Object.defineProperty(e,`NoopSpanProcessor`,{enumerable:!0,get:function(){return o.NoopSpanProcessor}});var s=oi();Object.defineProperty(e,`AlwaysOffSampler`,{enumerable:!0,get:function(){return s.AlwaysOffSampler}});var c=si();Object.defineProperty(e,`AlwaysOnSampler`,{enumerable:!0,get:function(){return c.AlwaysOnSampler}});var l=bi();Object.defineProperty(e,`createAlwaysRecordSampler`,{enumerable:!0,get:function(){return l.createAlwaysRecordSampler}});var u=ci();Object.defineProperty(e,`ParentBasedSampler`,{enumerable:!0,get:function(){return u.ParentBasedSampler}});var d=xi();Object.defineProperty(e,`TraceIdRatioBasedSampler`,{enumerable:!0,get:function(){return d.TraceIdRatioBasedSampler}});var f=H();Object.defineProperty(e,`SamplingDecision`,{enumerable:!0,get:function(){return f.SamplingDecision}})})),Si=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.buildSamplerFromEnv=t.loadDefaultConfig=void 0;let n=(v(),e(x)),r=S(),i=W();var a;(function(e){e.AlwaysOff=`always_off`,e.AlwaysOn=`always_on`,e.ParentBasedAlwaysOff=`parentbased_always_off`,e.ParentBasedAlwaysOn=`parentbased_always_on`,e.ParentBasedTraceIdRatio=`parentbased_traceidratio`,e.TraceIdRatio=`traceidratio`})(a||={});function o(){return{sampler:s(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,r.getNumberFromEnv)(`OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT`)??1/0,attributeCountLimit:(0,r.getNumberFromEnv)(`OTEL_ATTRIBUTE_COUNT_LIMIT`)??128},spanLimits:{attributeValueLengthLimit:(0,r.getNumberFromEnv)(`OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT`)??1/0,attributeCountLimit:(0,r.getNumberFromEnv)(`OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT`)??128,linkCountLimit:(0,r.getNumberFromEnv)(`OTEL_SPAN_LINK_COUNT_LIMIT`)??128,eventCountLimit:(0,r.getNumberFromEnv)(`OTEL_SPAN_EVENT_COUNT_LIMIT`)??128,attributePerEventCountLimit:(0,r.getNumberFromEnv)(`OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT`)??128,attributePerLinkCountLimit:(0,r.getNumberFromEnv)(`OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT`)??128}}}t.loadDefaultConfig=o;function s(){let e=(0,r.getStringFromEnv)(`OTEL_TRACES_SAMPLER`)??a.ParentBasedAlwaysOn;switch(e){case a.AlwaysOn:return new i.AlwaysOnSampler;case a.AlwaysOff:return new i.AlwaysOffSampler;case a.ParentBasedAlwaysOn:return new i.ParentBasedSampler({root:new i.AlwaysOnSampler});case a.ParentBasedAlwaysOff:return new i.ParentBasedSampler({root:new i.AlwaysOffSampler});case a.TraceIdRatio:return new i.TraceIdRatioBasedSampler(c());case a.ParentBasedTraceIdRatio:return new i.ParentBasedSampler({root:new i.TraceIdRatioBasedSampler(c())});default:return n.diag.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "${a.ParentBasedAlwaysOn}".`),new i.ParentBasedSampler({root:new i.AlwaysOnSampler})}}t.buildSamplerFromEnv=s;function c(){let e=(0,r.getNumberFromEnv)(`OTEL_TRACES_SAMPLER_ARG`);return e==null?(n.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1.`),1):e<0||e>1?(n.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e} was given, but it is out of range ([0..1]), defaulting to 1.`),1):e}})),Ci=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reconfigureLimits=e.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=e.DEFAULT_ATTRIBUTE_COUNT_LIMIT=void 0;let t=S();e.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128,e.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;function n(n){let r=Object.assign({},n.spanLimits);return r.attributeCountLimit=n.spanLimits?.attributeCountLimit??n.generalLimits?.attributeCountLimit??(0,t.getNumberFromEnv)(`OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT`)??(0,t.getNumberFromEnv)(`OTEL_ATTRIBUTE_COUNT_LIMIT`)??e.DEFAULT_ATTRIBUTE_COUNT_LIMIT,r.attributeValueLengthLimit=n.spanLimits?.attributeValueLengthLimit??n.generalLimits?.attributeValueLengthLimit??(0,t.getNumberFromEnv)(`OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT`)??(0,t.getNumberFromEnv)(`OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT`)??e.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},n,{spanLimits:r})}e.reconfigureLimits=n})),wi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BasicTracerProvider=void 0;let t=S(),n=Si(),r=Ci(),i=W();e.BasicTracerProvider=class extends i.TracerProvider{constructor(e={}){let i=(0,t.merge)({},(0,n.loadDefaultConfig)(),(0,r.reconfigureLimits)(e));delete i.generalLimits,super(i)}}})),Ti=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BatchSpanProcessor=void 0;let t=S(),n=W();e.BatchSpanProcessor=class extends n.BatchSpanProcessor{constructor(e,n){n||={};for(let[e,r]of[[`maxExportBatchSize`,`OTEL_BSP_MAX_EXPORT_BATCH_SIZE`],[`maxQueueSize`,`OTEL_BSP_MAX_QUEUE_SIZE`],[`scheduledDelayMillis`,`OTEL_BSP_SCHEDULE_DELAY`],[`exportTimeoutMillis`,`OTEL_BSP_EXPORT_TIMEOUT`]])if(n[e]===void 0){let i=(0,t.getNumberFromEnv)(r);i!==void 0&&(n[e]=i)}super({exporter:e,...n})}}})),Ei=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SimpleSpanProcessor=void 0;let t=W();e.SimpleSpanProcessor=class extends t.SimpleSpanProcessor{constructor(e){super({exporter:e})}}})),Di=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SamplingDecision=e.TraceIdRatioBasedSampler=e.ParentBasedSampler=e.AlwaysOnSampler=e.AlwaysOffSampler=e.NoopSpanProcessor=e.InMemorySpanExporter=e.RandomIdGenerator=e.ConsoleSpanExporter=e.SimpleSpanProcessor=e.BatchSpanProcessor=e.BasicTracerProvider=void 0;var t=wi();Object.defineProperty(e,`BasicTracerProvider`,{enumerable:!0,get:function(){return t.BasicTracerProvider}});var n=Ti();Object.defineProperty(e,`BatchSpanProcessor`,{enumerable:!0,get:function(){return n.BatchSpanProcessor}});var r=Ei();Object.defineProperty(e,`SimpleSpanProcessor`,{enumerable:!0,get:function(){return r.SimpleSpanProcessor}});var i=W();Object.defineProperty(e,`ConsoleSpanExporter`,{enumerable:!0,get:function(){return i.ConsoleSpanExporter}}),Object.defineProperty(e,`RandomIdGenerator`,{enumerable:!0,get:function(){return i.RandomIdGenerator}}),Object.defineProperty(e,`InMemorySpanExporter`,{enumerable:!0,get:function(){return i.InMemorySpanExporter}}),Object.defineProperty(e,`NoopSpanProcessor`,{enumerable:!0,get:function(){return i.NoopSpanProcessor}}),Object.defineProperty(e,`AlwaysOffSampler`,{enumerable:!0,get:function(){return i.AlwaysOffSampler}}),Object.defineProperty(e,`AlwaysOnSampler`,{enumerable:!0,get:function(){return i.AlwaysOnSampler}}),Object.defineProperty(e,`ParentBasedSampler`,{enumerable:!0,get:function(){return i.ParentBasedSampler}}),Object.defineProperty(e,`TraceIdRatioBasedSampler`,{enumerable:!0,get:function(){return i.TraceIdRatioBasedSampler}}),Object.defineProperty(e,`SamplingDecision`,{enumerable:!0,get:function(){return i.SamplingDecision}})}));v();var Oi=pt(),ki=S(),Ai=Rn(),ji=Un(),Mi=ar(),Ni=Qr(),Pi=Di();C();const G=`open-knowledge-server`;let K=null,q=null,J=null;function Fi(){return{tracer:b.getTracer(G),meter:_.getMeter(G)}}function Ii(e={}){let t=e.localSink!==void 0,n=process.env.OTEL_SDK_DISABLED===`false`;if(!t&&!n||K)return Fi();try{let r=(0,Mi.resourceFromAttributes)({[se]:process.env.OTEL_SERVICE_NAME||`open-knowledge-server`,[he]:process.env.OTEL_SERVICE_VERSION||`0.2.0`}),i=new Oi.AsyncLocalStorageContextManager;oe.setGlobalContextManager(i);let a=[],o=e.localSink?.attributeDenylist??s;a.push(new ce({attributeDenylist:o})),t&&e.localSink!==void 0&&(J=new fe({projectDir:e.localSink.projectDir,maxBytes:e.localSink.spansMaxBytes}),a.push(new Pi.SimpleSpanProcessor(J))),n&&a.push(new Pi.BatchSpanProcessor(new ji.OTLPTraceExporter));let c=new Pi.BasicTracerProvider({resource:r,spanProcessors:a});b.setGlobalTracerProvider(c),K=c;try{ae.setGlobalPropagator(new ki.W3CTraceContextPropagator)}catch(e){pe(`telemetry`).warn({err:e},`OpenTelemetry propagator init failed — file sink active, distributed trace correlation degraded`)}let l=null;n&&(l=new Ni.MeterProvider({resource:r,readers:[new Ni.PeriodicExportingMetricReader({exporter:new Ai.OTLPMetricExporter})]}),_.setGlobalMeterProvider(l)),q=l,pe(`telemetry`).info({file_sink_enabled:t,otlp_push_enabled:n,otlp_endpoint:n?process.env.OTEL_EXPORTER_OTLP_ENDPOINT||`http://localhost:4318`:null,service_name:r.attributes[se]},`OpenTelemetry initialized`)}catch(e){let t=pe(`telemetry`);K===null?(t.error({err:e},`failed to initialize OpenTelemetry — falling back to no-op`),q=null,J=null):(t.warn({err:e},`OpenTelemetry metrics init failed — traces still active, metrics degraded`),q=null)}return Fi()}const Li=5e3,Ri=new Set;function zi(e){Ri.add(e)}async function Bi(){let e=pe(`telemetry`);for(let t of Ri)try{t()}catch(t){e.warn({err:t},`telemetry shutdown reset hook threw; continuing teardown`)}if(!K&&!q)return;let t=(J?J.forceFlush().catch(t=>{e.warn({err:t},`telemetry file-sink flush failed during shutdown`)}):Promise.resolve()).then(()=>Promise.all([K?.shutdown().catch(t=>{e.warn({err:t},`tracer provider shutdown failed`)}),q?.shutdown().catch(t=>{e.warn({err:t},`meter provider shutdown failed`)})])),n;await Promise.race([t.then(()=>(n!==void 0&&clearTimeout(n),!1)),new Promise(e=>{n=setTimeout(()=>e(!0),Li),n.unref?.()})])&&e.warn({},`telemetry shutdown timed out after ${Li}ms — data may be lost`),K=null,q=null,J=null,b.disable(),_.disable(),oe.disable()}function Vi(){return b.getTracer(G)}function Hi(){return _.getMeter(G)}async function Y(e,t,n){return Vi().startActiveSpan(e,t??{},async e=>{try{let t=await n(e);return e.isRecording(),t}catch(t){throw e.recordException(t),e.setStatus({code:ie.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function X(e,t,n){return Vi().startActiveSpan(e,t??{},e=>{try{return n(e)}catch(t){throw e.recordException(t),e.setStatus({code:ie.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function Ui(e){let t=b.getSpan(oe.active());t&&t.setAttributes(e)}function Z(e){let t=e.split(D).filter(Boolean);return t.length<=2?e:`...${D}${t.slice(-2).join(D)}`}function Wi(e){return e.includes(`${D}.git${D}ok${D}`)||e.includes(`shadow-repo`)?`shadow-repo`:e.includes(`${D}.git${D}`)?`git`:w(e).endsWith(`.lock`)||w(e)===`lock`?`lock`:w(e)===`principal.json`?`principal`:e.includes(`${D}.ok${D}`)&&(w(e)===`conflicts.json`||e.includes(`${D}conflicts${D}`))?`conflict`:e.includes(`${D}.ok${D}`)?`ok-internal`:e.endsWith(`.md`)||e.endsWith(`.mdx`)?`content-md`:`other`}function Q(e,t,n){let r={"fs.operation":e,"fs.path":Z(t),"fs.path.role":Wi(t)};return n&&Object.assign(r,n),r}function $(e){return typeof e==`string`?Buffer.byteLength(e,`utf-8`):e instanceof Uint8Array?e.byteLength:e.byteLength??0}async function Gi(e,t,n){return Y(`fs.writeFile`,{attributes:Q(`writeFile`,e,{"fs.bytes":$(t)})},async()=>{await Ve(e,t,n)})}async function Ki(e,t,n){return Y(`fs.appendFile`,{attributes:Q(`appendFile`,e,{"fs.bytes":$(t)})},async()=>{await Pe(e,t,n)})}async function qi(e,t){return Y(`fs.rm`,{attributes:Q(`rm`,e)},async()=>{await Re(e,t)})}async function Ji(e,t){return Y(`fs.rename`,{attributes:Q(`rename`,t,{"fs.source_path":Z(e)})},async()=>{await Le(e,t)})}async function Yi(e,t){return Y(`fs.mkdir`,{attributes:Q(`mkdir`,e)},async()=>Fe(e,t))}function Xi(e,t,n){X(`fs.writeFileSync`,{attributes:Q(`writeFileSync`,e,{"fs.bytes":$(t)})},()=>{Me(e,t,n)})}function Zi(e,t,n){X(`fs.appendFileSync`,{attributes:Q(`appendFileSync`,e,{"fs.bytes":$(t)})},()=>{ve(e,t,n)})}function Qi(e,t){return X(`fs.mkdirSync`,{attributes:Q(`mkdirSync`,e)},()=>Ce(e,t))}function $i(e,t){X(`fs.renameSync`,{attributes:Q(`renameSync`,t,{"fs.source_path":Z(e)})},()=>{De(e,t)})}function ea(e,t,n){X(`fs.cpSync`,{attributes:Q(`cpSync`,t,{"fs.source_path":Z(e)})},()=>{be(e,t,n)})}function ta(e){X(`fs.unlinkSync`,{attributes:Q(`unlinkSync`,e)},()=>{O(e)})}function na(e,t){X(`fs.linkSync`,{attributes:Q(`linkSync`,t,{"fs.source_path":Z(e)})},()=>{Se(e,t)})}function ra(e,t,n){X(`fs.symlinkSync`,{attributes:Q(`symlinkSync`,t,{"fs.source_path":Z(e)})},()=>{je(e,t,n)})}function ia(e,t){X(`fs.rmSync`,{attributes:Q(`rmSync`,e)},()=>{Oe(e,t)})}function aa(e){X(`fs.rmdirSync`,{attributes:Q(`rmdirSync`,e)},()=>{ke(e)})}const oa={writeFile:(e,t,n)=>Gi(e,t,n),rename:(e,t)=>Ji(e,t)};export{A,Ui as C,lt as D,X as E,Qe as M,Je as N,nt as O,Ye as P,zi as S,Y as T,Gi as _,oa as a,Vi as b,Yi as c,$i as d,qi as f,ta as g,ra as h,Zi as i,Xe as j,it as k,Qi as l,aa as m,Z as n,ea as o,ia as p,Ki as r,na as s,Wi as t,Ji as u,Xi as v,Bi as w,Ii as x,Hi as y};
14
- //# sourceMappingURL=fs-traced-Cc6WsRtP.mjs.map
14
+ //# sourceMappingURL=fs-traced-BmZQL7v9.mjs.map
@@ -0,0 +1 @@
1
+ import{r as e}from"./git-handle-bosCq-DO.mjs";export{e as createGitInstance};
@@ -1,4 +1,4 @@
1
- import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{ma as r}from"./src-Q2mWJGdH.mjs";import{delimiter as i,normalize as a,resolve as o}from"node:path";import{existsSync as s,statSync as c}from"node:fs";import{homedir as l}from"node:os";import{EventEmitter as u}from"node:events";import{spawn as d}from"child_process";var f=n(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}})),p=n(((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=c,n.disable=o,n.enable=i,n.enabled=s,n.humanize=f(),n.destroy=l,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null,a,o;function s(...e){if(!s.enabled)return;let r=s,i=Number(new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,`enabled`,{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(t===void 0?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?n.skips.push(e.slice(1)):n.names.push(e)}function a(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else if(i!==-1)r=i+1,a++,n=a;else return!1;for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}function o(){let e=[...n.names,...n.skips.map(e=>`-`+e)].join(`,`);return n.enable(``),e}function s(e){for(let t of n.skips)if(a(e,t))return!1;for(let t of n.names)if(a(e,t))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n})),m=n(((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)||e.storage.getItem(`DEBUG`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=p()(e);let{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}})),ee=n(((e,t)=>{t.exports=(e,t=process.argv)=>{let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}})),te=n(((t,n)=>{let r=e(`os`),i=e(`tty`),a=ee(),{env:o}=process,s;a(`no-color`)||a(`no-colors`)||a(`color=false`)||a(`color=never`)?s=0:(a(`color`)||a(`colors`)||a(`color=true`)||a(`color=always`))&&(s=1),`FORCE_COLOR`in o&&(s=o.FORCE_COLOR===`true`?1:o.FORCE_COLOR===`false`?0:o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3));function c(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function l(e,t){if(s===0)return 0;if(a(`color=16m`)||a(`color=full`)||a(`color=truecolor`))return 3;if(a(`color=256`))return 2;if(e&&!t&&s===void 0)return 0;let n=s||0;if(o.TERM===`dumb`)return n;if(process.platform===`win32`){let e=r.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in o)return[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`,`GITHUB_ACTIONS`,`BUILDKITE`].some(e=>e in o)||o.CI_NAME===`codeship`?1:n;if(`TEAMCITY_VERSION`in o)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION);if(o.COLORTERM===`truecolor`)return 3;if(`TERM_PROGRAM`in o){let e=parseInt((o.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(o.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||`COLORTERM`in o?1:n}function u(e){return c(l(e,e&&e.isTTY))}n.exports={supportsColor:u,stdout:c(l(!0,i.isatty(1))),stderr:c(l(!0,i.isatty(2)))}})),ne=n(((t,n)=>{let r=e(`tty`),i=e(`util`);t.init=d,t.log=c,t.formatArgs=o,t.save=l,t.load=u,t.useColors=a,t.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{let e=te();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function a(){return`colors`in t.inspectOpts?!!t.inspectOpts.colors:r.isatty(process.stderr.fd)}function o(e){let{namespace:t,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${t} \u001B[0m`;e[0]=a+e[0].split(`
1
+ import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{va as r}from"./src-DY417osM.mjs";import{delimiter as i,normalize as a,resolve as o}from"node:path";import{existsSync as s,statSync as c}from"node:fs";import{homedir as l}from"node:os";import{EventEmitter as u}from"node:events";import{spawn as d}from"child_process";var f=n(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}})),p=n(((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=c,n.disable=o,n.enable=i,n.enabled=s,n.humanize=f(),n.destroy=l,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null,a,o;function s(...e){if(!s.enabled)return;let r=s,i=Number(new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,`enabled`,{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(t===void 0?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?n.skips.push(e.slice(1)):n.names.push(e)}function a(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else if(i!==-1)r=i+1,a++,n=a;else return!1;for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}function o(){let e=[...n.names,...n.skips.map(e=>`-`+e)].join(`,`);return n.enable(``),e}function s(e){for(let t of n.skips)if(a(e,t))return!1;for(let t of n.names)if(a(e,t))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n})),m=n(((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)||e.storage.getItem(`DEBUG`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=p()(e);let{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}})),ee=n(((e,t)=>{t.exports=(e,t=process.argv)=>{let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}})),te=n(((t,n)=>{let r=e(`os`),i=e(`tty`),a=ee(),{env:o}=process,s;a(`no-color`)||a(`no-colors`)||a(`color=false`)||a(`color=never`)?s=0:(a(`color`)||a(`colors`)||a(`color=true`)||a(`color=always`))&&(s=1),`FORCE_COLOR`in o&&(s=o.FORCE_COLOR===`true`?1:o.FORCE_COLOR===`false`?0:o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3));function c(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function l(e,t){if(s===0)return 0;if(a(`color=16m`)||a(`color=full`)||a(`color=truecolor`))return 3;if(a(`color=256`))return 2;if(e&&!t&&s===void 0)return 0;let n=s||0;if(o.TERM===`dumb`)return n;if(process.platform===`win32`){let e=r.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in o)return[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`,`GITHUB_ACTIONS`,`BUILDKITE`].some(e=>e in o)||o.CI_NAME===`codeship`?1:n;if(`TEAMCITY_VERSION`in o)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION);if(o.COLORTERM===`truecolor`)return 3;if(`TERM_PROGRAM`in o){let e=parseInt((o.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(o.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||`COLORTERM`in o?1:n}function u(e){return c(l(e,e&&e.isTTY))}n.exports={supportsColor:u,stdout:c(l(!0,i.isatty(1))),stderr:c(l(!0,i.isatty(2)))}})),ne=n(((t,n)=>{let r=e(`tty`),i=e(`util`);t.init=d,t.log=c,t.formatArgs=o,t.save=l,t.load=u,t.useColors=a,t.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{let e=te();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function a(){return`colors`in t.inspectOpts?!!t.inspectOpts.colors:r.isatty(process.stderr.fd)}function o(e){let{namespace:t,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${t} \u001B[0m`;e[0]=a+e[0].split(`
2
2
  `).join(`
3
3
  `+a),e.push(i+`m+`+n.exports.humanize(this.diff)+`\x1B[0m`)}else e[0]=s()+t+` `+e[0]}function s(){return t.inspectOpts.hideDate?``:new Date().toISOString()+` `}function c(...e){return process.stderr.write(i.formatWithOptions(t.inspectOpts,...e)+`
4
4
  `)}function l(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function u(){return process.env.DEBUG}function d(e){e.inspectOpts={};let n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]}n.exports=p()(t);let{formatters:f}=n.exports;f.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split(`
@@ -7,4 +7,4 @@ import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{ma as r}from"./src
7
7
  `)){let e=it(i,`
8
8
  `);a=e[0],i=e[1]}yield{file:r,key:a,value:i}}}var Tn,En=S({"src/lib/responses/ConfigList.ts"(){q(),Tn=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{}),this._all}addFile(e){if(!(e in this.values)){let t=O(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,n){let r=this.addFile(e);Object.hasOwn(r,t)?Array.isArray(r[t])?r[t].push(n):r[t]=[r[t],n]:r[t]=n,this._all=void 0}}}});function Dn(e,t){return typeof e==`string`&&Object.hasOwn(Mn,e)?e:t}function On(e,t,n,r){let i=[`config`,`--${r}`];return n&&i.push(`--add`),i.push(e,t),{commands:i,format:`utf-8`,parser(e){return e}}}function kn(e,t){let n=[`config`,`--null`,`--show-origin`,`--get-all`,e];return t&&n.splice(1,0,`--${t}`),{commands:n,format:`utf-8`,parser(t){return Sn(t,e)}}}function An(e){let t=[`config`,`--list`,`--show-origin`,`--null`];return e&&t.push(`--${e}`),{commands:t,format:`utf-8`,parser(e){return xn(e)}}}function jn(){return{addConfig(e,t,...n){return this._runTask(On(e,t,n[0]===!0,Dn(n[1],`local`)),G(arguments))},getConfig(e,t){return this._runTask(kn(e,Dn(t,void 0)),G(arguments))},listConfig(...e){return this._runTask(An(Dn(e[0],void 0)),G(arguments))}}}var Mn,Nn=S({"src/lib/tasks/config.ts"(){En(),q(),Mn=(e=>(e.system=`system`,e.global=`global`,e.local=`local`,e.worktree=`worktree`,e))(Mn||{})}});function Pn(e){return In.has(e)}var Fn,In,Ln=S({"src/lib/tasks/diff-name-status.ts"(){Fn=(e=>(e.ADDED=`A`,e.COPIED=`C`,e.DELETED=`D`,e.MODIFIED=`M`,e.RENAMED=`R`,e.CHANGED=`T`,e.UNMERGED=`U`,e.UNKNOWN=`X`,e.BROKEN=`B`,e))(Fn||{}),In=new Set(Object.values(Fn))}});function Rn(...e){return new Wn().param(...e)}function zn(e){let t=new Set,n={};return st(e,e=>{let[r,i,a]=e.split(I);t.add(r),(n[r]=n[r]||[]).push({line:N(i),path:r,preview:a})}),{paths:t,results:n}}function Bn(){return{grep(e){let t=G(arguments),n=W(arguments);for(let e of Vn)if(n.includes(e))return this._runTask(J(`git.grep: use of "${e}" is not supported.`),t);typeof e==`string`&&(e=Rn().param(e));let r=[`grep`,`--null`,`-n`,`--full-name`,...n,...e];return this._runTask({commands:r,format:`utf-8`,parser(e){return zn(e)}},t)}}}var Vn,Hn,Un,Wn,Gn=S({"src/lib/tasks/grep.ts"(){q(),X(),Vn=[`-h`],Hn=Symbol(`grepQuery`),Wn=class{constructor(){this[Un]=[]}*[(Un=Hn,Symbol.iterator)](){for(let e of this[Hn])yield e}and(...e){return e.length&&this[Hn].push(`--and`,`(`,...P(e,`-e`),`)`),this}param(...e){return this[Hn].push(...P(e,`-e`)),this}}}}),Kn={};C(Kn,{ResetMode:()=>Xn,getResetMode:()=>Jn,resetTask:()=>qn});function qn(e,t){let n=[`reset`];return Yn(e)&&n.push(`--${e}`),n.push(...t),Y(n)}function Jn(e){if(Yn(e))return e;switch(typeof e){case`string`:case`undefined`:return`soft`}}function Yn(e){return typeof e==`string`&&Zn.includes(e)}var Xn,Zn,Qn=S({"src/lib/tasks/reset.ts"(){q(),X(),Xn=(e=>(e.MIXED=`mixed`,e.SOFT=`soft`,e.HARD=`hard`,e.MERGE=`merge`,e.KEEP=`keep`,e))(Xn||{}),Zn=M(Object.values(Xn))}});function $n(){return(0,ue.default)(`simple-git`)}function er(e,t,n){return!t||!String(t).replace(/\s*/,``)?n?(t,...r)=>{e(t,...r),n(t,...r)}:e:(r,...i)=>{e(`%s ${r}`,t,...i),n&&n(r,...i)}}function tr(e,t,{namespace:n}){if(typeof e==`string`)return e;let r=t&&t.namespace||``;return r.startsWith(n)?r.substr(n.length+1):r||n}function nr(e,t,n,r=$n()){let i=e&&`[${e}]`||``,a=[],o=typeof t==`string`?r.extend(t):t,s=tr(z(t,V),o,r);return l(n);function c(t,n){return A(a,nr(e,s.replace(/^[^:]+/,t),n,r))}function l(t){let n=t&&`[${t}]`||``,a=o&&er(o,n)||L,s=er(r,`${i} ${n}`,a);return Object.assign(o?a:s,{label:e,sibling:c,info:s,step:l})}}var rr=S({"src/lib/git-logger.ts"(){q(),ue.default.formatters.L=e=>String(xt(e)?e.length:`-`),ue.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString(`utf8`):R(e)}}),ir,ar=S({"src/lib/runners/tasks-pending-queue.ts"(){E(),rr(),ir=class e{constructor(e=`GitExecutor`){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(t){let n=e.getName(t.commands[0]);return{task:t,logger:nr(this.logLabel,n),name:n}}push(e){let t=this.createProgress(e);return t.logger(`Adding task to the queue, commands = %o`,e.commands),this._queue.set(e,t),t}fatal(e){for(let[t,{logger:n}]of Array.from(this._queue.entries()))t===e.task?(n.info(`Failed %o`,e),n(`Fatal exception, any as-yet un-started tasks run through this executor will not be attempted`)):n.info(`A fatal exception occurred in a previous task, the queue has been purged: %o`,e.message),this.complete(t);if(this._queue.size!==0)throw Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new T(void 0,`TasksPendingQueue: attempt called for an unknown task`);return t.logger(`Starting task`),t}static getName(t=`empty`){return`task:${t}:${++e.counter}`}static{this.counter=0}}}});function Z(e,t){return{method:at(e.commands)||``,commands:t}}function or(e,t){return n=>{t(`[ERROR] child process exception %o`,n),e.push(Buffer.from(String(n.stack),`ascii`))}}function sr(e,t,n,r){return i=>{n(`%s received %L bytes`,t,i),r(`%B`,i),e.push(i)}}var cr,lr=S({"src/lib/runners/git-executor-chain.ts"(){E(),X(),q(),ar(),cr=class{constructor(e,t,n){this._executor=e,this._scheduler=t,this._plugins=n,this._chain=Promise.resolve(),this._queue=new ir}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}async attemptTask(e){let t=await this._scheduler.next(),n=()=>this._queue.complete(e);try{let{logger:t}=this._queue.attempt(e);return await(an(e)?this.attemptEmptyTask(e,t):this.attemptRemoteTask(e,t))}catch(t){throw this.onFatalException(e,t)}finally{n(),t()}}onFatalException(e,t){let n=t instanceof T?Object.assign(t,{task:e}):new T(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(n),n}async attemptRemoteTask(e,t){let n=this._plugins.exec(`spawn.binary`,``,Z(e,e.commands)),r=this._plugins.exec(`spawn.args`,[...e.commands],{...Z(e,e.commands),env:{...this.env}}),i=await this.gitResponse(e,n,r,this.outputHandler,t.step(`SPAWN`)),a=await this.handleTaskData(e,r,i,t.step(`HANDLE`));return t(`passing response to task's parser as a %s`,e.format),rn(e)?It(e.parser,a):It(e.parser,a.asStrings())}async attemptEmptyTask(e,t){return t(`empty task bypassing child process to call to task's parser`),e.parser(this)}handleTaskData(e,t,n,r){let{exitCode:i,rejection:a,stdOut:o,stdErr:s}=n;return new Promise((c,l)=>{r(`Preparing to handle process response exitCode=%d stdOut=`,i);let{error:u}=this._plugins.exec(`task.error`,{error:a},{...Z(e,t),...n});if(u&&e.onError)return r.info(`exitCode=%s handling with custom error handler`),e.onError(n,u,e=>{r.info(`custom error handler treated as success`),r(`custom error returned a %s`,R(e)),c(new Tt(Array.isArray(e)?Buffer.concat(e):e,Buffer.concat(s)))},l);if(u)return r.info(`handling as error: exitCode=%s stdErr=%s rejection=%o`,i,s.length,a),l(u);r.info(`retrieving task output complete`),c(new Tt(Buffer.concat(o),Buffer.concat(s)))})}async gitResponse(e,t,n,r,i){let a=i.sibling(`output`),o=this._plugins.exec(`spawn.options`,{cwd:this.cwd,env:this.env,windowsHide:!0},Z(e,e.commands));return new Promise(s=>{let c=[],l=[];i.info(`%s %o`,t,n),i(`%O`,o);let u=this._beforeSpawn(e,n);if(u)return s({stdOut:c,stdErr:l,exitCode:9901,rejection:u});this._plugins.exec(`spawn.before`,void 0,{...Z(e,n),kill(e){u=e||u}});let f=d(t,n,o);f.stdout.on(`data`,sr(c,`stdOut`,i,a.step(`stdOut`))),f.stderr.on(`data`,sr(l,`stdErr`,i,a.step(`stdErr`))),f.on(`error`,or(l,i)),r&&(i(`Passing child process stdOut/stdErr to custom outputHandler`),r(t,f.stdout,f.stderr,[...n])),this._plugins.exec(`spawn.after`,void 0,{...Z(e,n),spawned:f,close(e,t){s({stdOut:c,stdErr:l,exitCode:e,rejection:u||t})},kill(e){f.killed||(u=e,f.kill(`SIGINT`))}})})}_beforeSpawn(e,t){let n;return this._plugins.exec(`spawn.before`,void 0,{...Z(e,t),kill(e){n=e||n}}),n}}}}),ur={};C(ur,{GitExecutor:()=>dr});var dr,fr=S({"src/lib/runners/git-executor.ts"(){lr(),dr=class{constructor(e,t,n){this.cwd=e,this._scheduler=t,this._plugins=n,this._chain=new cr(this,this._scheduler,this._plugins)}chain(){return new cr(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function pr(e,t,n=L){t.then(e=>{n(null,e)},t=>{t?.task===e&&n(t instanceof $e?mr(t):t,void 0)})}function mr(e){let t=e=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${e} should be GitResponseError.git.${e}, this will no longer be available in version 3`),t=L};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(n,{}));function n(n,r){return r in e||(n[r]={enumerable:!1,configurable:!1,get(){return t(r),e.git[r]}}),n}}var hr=S({"src/lib/task-callback.ts"(){D(),q()}});function gr(e,t){return tn(n=>{if(!ct(e))throw Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||n).cwd=e})}var _r=S({"src/lib/tasks/change-working-directory.ts"(){q(),X()}});function vr(e){let t=[`checkout`,...e];return t[1]===`-b`&&t.includes(`-B`)&&(t[1]=ut(t,`-B`)),Y(t)}function yr(){return{checkout(){return this._runTask(vr(W(arguments,1)),G(arguments))},checkoutBranch(e,t){return this._runTask(vr([`-b`,e,t,...W(arguments)]),G(arguments))},checkoutLocalBranch(e){return this._runTask(vr([`-b`,e,...W(arguments)]),G(arguments))}}}var br=S({"src/lib/tasks/checkout.ts"(){q(),X()}});function xr(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function Sr(){return{countObjects(){return this._runTask({commands:[`count-objects`,`--verbose`],format:`utf-8`,parser(e){return K(xr(),[Cr],e)}})}}}var Cr,wr=S({"src/lib/tasks/count-objects.ts"(){q(),Cr=new H(/([a-z-]+): (\d+)$/,(e,[t,n])=>{let r=dt(t);Object.hasOwn(e,r)&&(e[r]=N(n))})}});function Tr(e){return K({author:null,branch:``,commit:``,root:!1,summary:{changes:0,insertions:0,deletions:0}},Er,e)}var Er,Dr=S({"src/lib/parsers/parse-commit.ts"(){q(),Er=[new H(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,n,r])=>{e.branch=t,e.commit=r,e.root=!!n}),new H(/\s*Author:\s(.+)/i,(e,[t])=>{let n=t.split(`<`),r=n.pop();!r||!r.includes(`@`)||(e.author={email:r.substr(0,r.length-1),name:n.join(`<`).trim()})}),new H(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,n,r])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(n,10)||0,e.summary.deletions=parseInt(r,10)||0}),new H(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,n,r])=>{e.summary.changes=parseInt(t,10)||0;let i=parseInt(n,10)||0;r===`-`?e.summary.deletions=i:r===`+`&&(e.summary.insertions=i)})]}});function Or(e,t,n){return{commands:[`-c`,`core.abbrev=40`,`commit`,...P(e,`-m`),...t,...n],format:`utf-8`,parser:Tr}}function kr(){return{commit(t,...n){let r=G(arguments),i=e(t)||Or(j(t),j(z(n[0],bt,[])),[...M(z(n[1],B,[])),...W(arguments,0,!0)]);return this._runTask(i,r)}};function e(e){return!bt(e)&&J(`git.commit: requires the commit message to be supplied as a string/string[]`)}}var Ar=S({"src/lib/tasks/commit.ts"(){Dr(),q(),X()}});function jr(){return{firstCommit(){return this._runTask(Y([`rev-list`,`--max-parents=0`,`HEAD`],!0),G(arguments))}}}var Mr=S({"src/lib/tasks/first-commit.ts"(){q(),X()}});function Nr(e,t){let n=[`hash-object`,e];return t&&n.push(`-w`),Y(n,!0)}var Pr=S({"src/lib/tasks/hash-object.ts"(){X()}});function Fr(e,t,n){let r=String(n).trim(),i;if(i=Lr.exec(r))return new Ir(e,t,!1,i[1]);if(i=Rr.exec(r))return new Ir(e,t,!0,i[1]);let a=``,o=r.split(` `);for(;o.length;)if(o.shift()===`in`){a=o.join(` `);break}return new Ir(e,t,/^re/i.test(r),a)}var Ir,Lr,Rr,zr=S({"src/lib/responses/InitSummary.ts"(){Ir=class{constructor(e,t,n,r){this.bare=e,this.path=t,this.existing=n,this.gitDir=r}},Lr=/^Init.+ repository in (.+)$/,Rr=/^Rein.+ in (.+)$/}});function Br(e){return e.includes(Hr)}function Vr(e=!1,t,n){let r=[`init`,...n];return e&&!Br(r)&&r.splice(1,0,Hr),{commands:r,format:`utf-8`,parser(e){return Fr(r.includes(`--bare`),t,e)}}}var Hr,Ur=S({"src/lib/tasks/init.ts"(){zr(),Hr=`--bare`}});function Wr(e){for(let t=0;t<e.length;t++){let n=Kr.exec(e[t]);if(n)return`--${n[1]}`}return``}function Gr(e){return Kr.test(e)}var Kr,qr=S({"src/lib/args/log-format.ts"(){Kr=/^--(stat|numstat|name-only|name-status)(=|$)/}}),Jr,Yr=S({"src/lib/responses/DiffSummary.ts"(){Jr=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function Xr(e=``){let t=ti[e];return e=>K(new Jr,t,e,!1)}var Zr,Qr,$r,ei,ti,ni=S({"src/lib/parsers/parse-diff-summary.ts"(){qr(),Yr(),Ln(),q(),Zr=[new H(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,n,r=``])=>{e.files.push({file:t.trim(),changes:N(n),insertions:r.replace(/[^+]/g,``).length,deletions:r.replace(/[^-]/g,``).length,binary:!1})}),new H(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,n,r])=>{e.files.push({file:t.trim(),before:N(n),after:N(r),binary:!0})}),new H(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,n])=>{let r=/(\d+) i/.exec(n),i=/(\d+) d/.exec(n);e.changed=N(t),e.insertions=N(r?.[1]),e.deletions=N(i?.[1])})],Qr=[new H(/(\d+)\t(\d+)\t(.+)$/,(e,[t,n,r])=>{let i=N(t),a=N(n);e.changed++,e.insertions+=i,e.deletions+=a,e.files.push({file:r,changes:i+a,insertions:i,deletions:a,binary:!1})}),new H(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],$r=[new H(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],ei=[new H(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,n,r,i,a])=>{e.changed++,e.files.push({file:a??r,changes:0,insertions:0,deletions:0,binary:!1,status:mt(Pn(t)&&t),from:mt(!!a&&r!==a&&r),similarity:N(n)})})],ti={"":Zr,"--stat":Zr,"--numstat":Qr,"--name-status":ei,"--name-only":$r}}});function ri(e,t){return t.reduce((t,n,r)=>(t[n]=e[r]||``,t),Object.create({diff:null}))}function ii(e=si,t=ci,n=``){let r=Xr(n);return function(n){let i=k(n.trim(),!1,ai).map(function(n){let i=n.split(oi),a=ri(i[0].split(e),t);return i.length>1&&i[1].trim()&&(a.diff=r(i[1])),a});return{all:i,latest:i.length&&i[0]||null,total:i.length}}}var ai,oi,si,ci,li=S({"src/lib/parsers/parse-list-log-summary.ts"(){q(),ni(),qr(),ai=`òòòòòò `,oi=` òò`,si=` ò `,ci=[`hash`,`date`,`message`,`refs`,`author_name`,`author_email`]}}),ui={};C(ui,{diffSummaryTask:()=>di,validateLogFormatConfig:()=>fi});function di(e){let t=Wr(e),n=[`diff`];return t===``&&(t=`--stat`,n.push(`--stat=4096`)),n.push(...e),fi(n)||{commands:n,format:`utf-8`,parser:Xr(t)}}function fi(e){let t=e.filter(Gr);if(t.length>1)return J(`Summary flags are mutually exclusive - pick one of ${t.join(`,`)}`);if(t.length&&e.includes(`-z`))return J(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var pi=S({"src/lib/tasks/diff.ts"(){qr(),ni(),X()}});function mi(e,t){let n=[],r=[];return Object.keys(e).forEach(t=>{n.push(t),r.push(String(e[t]))}),[n,r.join(t)]}function hi(e){return Object.keys(e).reduce((t,n)=>(n in yi||(t[n]=e[n]),t),{})}function gi(e={},t=[]){let n=z(e.splitter,V,si),[r,i]=mi(_t(e.format)?e.format:{hash:`%H`,date:e.strictDate===!1?`%ai`:`%aI`,message:`%s`,refs:`%D`,body:e.multiLine?`%B`:`%b`,author_name:e.mailMap===!1?`%an`:`%aN`,author_email:e.mailMap===!1?`%ae`:`%aE`},n),a=[],o=[`--pretty=format:${ai}${i}${oi}`,...t],s=e.n||e[`max-count`]||e.maxCount;if(s&&o.push(`--max-count=${s}`),e.from||e.to){let t=e.symmetric===!1?`..`:`...`;a.push(`${e.from||``}${t}${e.to||``}`)}return V(e.file)&&o.push(`--follow`,se(e.file)),Mt(hi(e),o),{fields:r,splitter:n,commands:[...o,...a]}}function _i(e,t,n){let r=ii(e,t,Wr(n));return{commands:[`log`,...n],format:`utf-8`,parser:r}}function vi(){return{log(...n){let r=G(arguments),i=gi(Pt(arguments),M(z(arguments[0],B,[]))),a=t(...n)||fi(i.commands)||e(i);return this._runTask(a,r)}};function e(e){return _i(e.splitter,e.fields,e.commands)}function t(e,t){return V(e)&&V(t)&&J(`git.log(string, string) should be replaced with git.log({ from: string, to: string })`)}}var yi,bi=S({"src/lib/tasks/log.ts"(){qr(),li(),q(),X(),pi(),yi=(e=>(e[e[`--pretty`]=0]=`--pretty`,e[e[`max-count`]=1]=`max-count`,e[e.maxCount=2]=`maxCount`,e[e.n=3]=`n`,e[e.file=4]=`file`,e[e.format=5]=`format`,e[e.from=6]=`from`,e[e.to=7]=`to`,e[e.splitter=8]=`splitter`,e[e.symmetric=9]=`symmetric`,e[e.mailMap=10]=`mailMap`,e[e.multiLine=11]=`multiLine`,e[e.strictDate=12]=`strictDate`,e))(yi||{})}}),xi,Si,Ci=S({"src/lib/responses/MergeSummary.ts"(){xi=class{constructor(e,t=null,n){this.reason=e,this.file=t,this.meta=n}toString(){return`${this.file}:${this.reason}`}},Si=class{constructor(){this.conflicts=[],this.merges=[],this.result=`success`}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(`, `)}`:`OK`}}}}),wi,Ti,Ei=S({"src/lib/responses/PullSummary.ts"(){wi=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},Ti=class{constructor(){this.remote=``,this.hash={local:``,remote:``},this.branch={local:``,remote:``},this.message=``}toString(){return this.message}}}});function Di(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function Oi(e){let t=/^\s*(\d+)/.exec(e),n=/delta (\d+)/i.exec(e);return{count:N(t&&t[1]||`0`),delta:N(n&&n[1]||`0`)}}var ki,Ai=S({"src/lib/parsers/parse-remote-objects.ts"(){q(),ki=[new U(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,n])=>{let r=t.toLowerCase(),i=Di(e.remoteMessages);Object.assign(i,{[r]:N(n)})}),new U(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,n])=>{let r=t.toLowerCase(),i=Di(e.remoteMessages);Object.assign(i,{[r]:N(n)})}),new U(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,n,r])=>{let i=Di(e.remoteMessages);i.total=Oi(t),i.reused=Oi(n),i.packReused=N(r)})]}});function ji(e,t){return K({remoteMessages:new Ni},Mi,t)}var Mi,Ni,Pi=S({"src/lib/parsers/parse-remote-messages.ts"(){q(),Ai(),Mi=[new U(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...ki,new U([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new U([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,n,r])=>{e.remoteMessages.vulnerabilities={count:N(t),summary:n,url:r}})],Ni=class{constructor(){this.all=[]}}}});function Fi(e,t){let n=K(new Ti,Bi,[e,t]);return n.message&&n}var Ii,Li,Ri,zi,Bi,Vi,Hi,Ui=S({"src/lib/parsers/parse-pull.ts"(){Ei(),q(),Pi(),Ii=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,Li=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,Ri=/^(create|delete) mode \d+ (.+)/,zi=[new H(Ii,(e,[t,n,r])=>{e.files.push(t),n&&(e.insertions[t]=n.length),r&&(e.deletions[t]=r.length)}),new H(Li,(e,[t,,n,,r])=>n!==void 0||r!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+n||0,e.summary.deletions=+r||0,!0):!1),new H(Ri,(e,[t,n])=>{A(e.files,n),A(t===`create`?e.created:e.deleted,n)})],Bi=[new H(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new H(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new H(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,n,r,i])=>{e.branch.local=r,e.hash.local=t,e.branch.remote=i,e.hash.remote=n})],Vi=(e,t)=>K(new wi,zi,[e,t]),Hi=(e,t)=>Object.assign(new wi,Vi(e,t),ji(e,t))}}),Wi,Gi,Ki,qi=S({"src/lib/parsers/parse-merge.ts"(){Ci(),q(),Ui(),Wi=[new H(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new H(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,n])=>{e.conflicts.push(new xi(t,n))}),new H(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,n,r])=>{e.conflicts.push(new xi(t,n,{deleteRef:r}))}),new H(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new xi(t,null))}),new H(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],Gi=(e,t)=>Object.assign(Ki(e,t),Hi(e,t)),Ki=e=>K(new Si,Wi,e)}});function Ji(e){return e.length?{commands:[`merge`,...e],format:`utf-8`,parser(e,t){let n=Gi(e,t);if(n.failed)throw new $e(n);return n}}:J(`Git.merge requires at least one option`)}var Yi=S({"src/lib/tasks/merge.ts"(){D(),qi(),X()}});function Xi(e,t,n){let r=n.includes(`deleted`),i=n.includes(`tag`)||/^refs\/tags/.test(e),a=!n.includes(`new`);return{deleted:r,tag:i,branch:!i,new:!a,alreadyUpdated:a,local:e,remote:t}}var Zi,Qi,$i,ea=S({"src/lib/parsers/parse-push.ts"(){q(),Pi(),Zi=[new H(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new H(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref={...e.ref||{},local:t}}),new H(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,n,r])=>{e.pushed.push(Xi(t,n,r))}),new H(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,n,r])=>{e.branch={...e.branch||{},local:t,remote:n,remoteName:r}}),new H(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,n,r,i])=>{e.update={head:{local:t,remote:n},hash:{from:r,to:i}}})],Qi=(e,t)=>{let n=$i(e,t),r=ji(e,t);return{...n,...r}},$i=(e,t)=>K({pushed:[]},Zi,[e,t])}}),ta={};C(ta,{pushTagsTask:()=>na,pushTask:()=>ra});function na(e={},t){return A(t,`--tags`),ra(e,t)}function ra(e={},t){let n=[`push`,...t];return e.branch&&n.splice(1,0,e.branch),e.remote&&n.splice(1,0,e.remote),ut(n,`-v`),A(n,`--verbose`),A(n,`--porcelain`),{commands:n,format:`utf-8`,parser:Qi}}var ia=S({"src/lib/tasks/push.ts"(){ea(),q()}});function aa(){return{showBuffer(){let e=[`show`,...W(arguments,1)];return e.includes(`--binary`)||e.splice(1,0,`--binary`),this._runTask(nn(e),G(arguments))},show(){let e=[`show`,...W(arguments,1)];return this._runTask(Y(e),G(arguments))}}}var oa=S({"src/lib/tasks/show.ts"(){q(),X()}}),sa,ca,la=S({"src/lib/responses/FileStatusSummary.ts"(){sa=/^(.+)\0(.+)$/,ca=class{constructor(e,t,n){if(this.path=e,this.index=t,this.working_dir=n,t===`R`||n===`R`){let t=sa.exec(e)||[null,e,e];this.from=t[2]||``,this.path=t[1]||``}}}}});function ua(e){let[t,n]=e.split(I);return{from:n||t,to:t}}function Q(e,t,n){return[`${e}${t}`,n]}function da(e,...t){return t.map(t=>Q(e,t,(e,t)=>e.conflicted.push(t)))}function fa(e,t){let n=t.trim();switch(` `){case n.charAt(2):return r(n.charAt(0),n.charAt(1),n.slice(3));case n.charAt(1):return r(` `,n.charAt(0),n.slice(2));default:return}function r(t,n,r){let i=`${t}${n}`,a=ma.get(i);a&&a(e,r),i!==`##`&&i!==`!!`&&e.files.push(new ca(r,t,n))}}var pa,ma,ha,ga=S({"src/lib/responses/StatusSummary.ts"(){q(),la(),pa=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},ma=new Map([Q(` `,`A`,(e,t)=>e.created.push(t)),Q(` `,`D`,(e,t)=>e.deleted.push(t)),Q(` `,`M`,(e,t)=>e.modified.push(t)),Q(`A`,` `,(e,t)=>{e.created.push(t),e.staged.push(t)}),Q(`A`,`M`,(e,t)=>{e.created.push(t),e.staged.push(t),e.modified.push(t)}),Q(`D`,` `,(e,t)=>{e.deleted.push(t),e.staged.push(t)}),Q(`M`,` `,(e,t)=>{e.modified.push(t),e.staged.push(t)}),Q(`M`,`M`,(e,t)=>{e.modified.push(t),e.staged.push(t)}),Q(`R`,` `,(e,t)=>{e.renamed.push(ua(t))}),Q(`R`,`M`,(e,t)=>{let n=ua(t);e.renamed.push(n),e.modified.push(n.to)}),Q(`!`,`!`,(e,t)=>{(e.ignored=e.ignored||[]).push(t)}),Q(`?`,`?`,(e,t)=>e.not_added.push(t)),...da(`A`,`A`,`U`),...da(`D`,`D`,`U`),...da(`U`,`A`,`D`,`U`),[`##`,(e,t)=>{let n=/ahead (\d+)/,r=/behind (\d+)/,i=/^(.+?(?=(?:\.{3}|\s|$)))/,a=/\.{3}(\S*)/,o=/\son\s(\S+?)(?=\.{3}|$)/,s=n.exec(t);e.ahead=s&&+s[1]||0,s=r.exec(t),e.behind=s&&+s[1]||0,s=i.exec(t),e.current=z(s?.[1],V,null),s=a.exec(t),e.tracking=z(s?.[1],V,null),s=o.exec(t),s&&(e.current=z(s?.[1],V,e.current)),e.detached=/\(no branch\)/.test(t)}]]),ha=function(e){let t=e.split(I),n=new pa;for(let e=0,r=t.length;e<r;){let r=t[e++].trim();r&&(r.charAt(0)===`R`&&(r+=I+(t[e++]||``)),fa(n,r))}return n}}});function _a(e){return{format:`utf-8`,commands:[`status`,`--porcelain`,`-b`,`-u`,`--null`,...e.filter(e=>!va.includes(e))],parser(e){return ha(e)}}}var va,ya=S({"src/lib/tasks/status.ts"(){ga(),va=[`--null`,`-z`]}});function ba(e=0,t=0,n=0,r=``,i=!0){return Object.defineProperty({major:e,minor:t,patch:n,agent:r,installed:i},`toString`,{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function xa(){return ba(0,0,0,``,!1)}function Sa(){return{version(){return this._runTask({commands:[`--version`],format:`utf-8`,parser:Ca,onError(e,t,n,r){if(e.exitCode===-2)return n(Buffer.from(wa));r(t)}})}}}function Ca(e){return e===wa?xa():K(ba(0,0,0,e),Ta,e)}var wa,Ta,Ea=S({"src/lib/tasks/version.ts"(){q(),wa=`installed=false`,Ta=[new H(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,n,r,i=``])=>{Object.assign(e,ba(N(t),N(n),N(r),i))}),new H(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,n,r,i=``])=>{Object.assign(e,ba(N(t),N(n),r,i))})]}});function Da(e,t,n,...r){return V(n)?t(n,z(r[0],V),W(arguments)):J(`git.${e}() requires a string 'repoPath'`)}function Oa(){return{clone(e,...t){return this._runTask(Da(`clone`,ka,z(e,V),...t),G(arguments))},mirror(e,...t){return this._runTask(Da(`mirror`,Aa,z(e,V),...t),G(arguments))}}}var ka,Aa,ja=S({"src/lib/tasks/clone.ts"(){X(),q(),ka=(e,t,n)=>{let r=[`clone`,...n];return V(e)&&r.push(se(e)),V(t)&&r.push(se(t)),Y(r)},Aa=(e,t,n)=>(A(n,`--mirror`),ka(e,t,n))}}),Ma={};C(Ma,{SimpleGitApi:()=>Na});var Na,Pa=S({"src/lib/simple-git-api.ts"(){hr(),_r(),br(),wr(),Ar(),Nn(),Mr(),Gn(),Pr(),Ur(),bi(),Yi(),ia(),oa(),ya(),X(),Ea(),q(),ja(),Na=class{constructor(e){this._executor=e}_runTask(e,t){let n=this._executor.chain(),r=n.push(e);return t&&pr(e,r,t),Object.create(this,{then:{value:r.then.bind(r)},catch:{value:r.catch.bind(r)},_executor:{value:n}})}add(e){return this._runTask(Y([`add`,...j(e)]),G(arguments))}cwd(e){let t=G(arguments);return typeof e==`string`?this._runTask(gr(e,this._executor),t):typeof e?.path==`string`?this._runTask(gr(e.path,e.root&&this._executor||void 0),t):this._runTask(J(`Git.cwd: workingDirectory must be supplied as a string`),t)}hashObject(e,t){return this._runTask(Nr(e,t===!0),G(arguments))}init(e){return this._runTask(Vr(e===!0,this._executor.cwd,W(arguments)),G(arguments))}merge(){return this._runTask(Ji(W(arguments)),G(arguments))}mergeFromTo(e,t){return V(e)&&V(t)?this._runTask(Ji([e,t,...W(arguments)]),G(arguments,!1)):this._runTask(J(`Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings`))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=ra({remote:z(arguments[0],V),branch:z(arguments[1],V)},W(arguments));return this._runTask(e,G(arguments))}stash(){return this._runTask(Y([`stash`,...W(arguments)]),G(arguments))}status(){return this._runTask(_a(W(arguments)),G(arguments))}},Object.assign(Na.prototype,yr(),Oa(),kr(),jn(),Sr(),jr(),Bn(),vi(),aa(),Sa())}}),Fa={};C(Fa,{Scheduler:()=>La});var Ia,La,Ra=S({"src/lib/runners/scheduler.ts"(){q(),rr(),Ia=(()=>{let e=0;return()=>{e++;let{promise:t,done:n}=(0,g.createDeferred)();return{promise:t,done:n,id:e}}})(),La=class{constructor(e=2){this.concurrency=e,this.logger=nr(``,`scheduler`),this.pending=[],this.running=[],this.logger(`Constructed, concurrency=%s`,e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger(`Schedule attempt ignored, pending=%s running=%s concurrency=%s`,this.pending.length,this.running.length,this.concurrency);return}let e=A(this.running,this.pending.shift());this.logger(`Attempting id=%s`,e.id),e.done(()=>{this.logger(`Completing id=`,e.id),ut(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=A(this.pending,Ia());return this.logger(`Scheduling id=%s`,t),this.schedule(),e}}}}),za={};C(za,{applyPatchTask:()=>Ba});function Ba(e,t){return Y([`apply`,...t,...e])}var Va=S({"src/lib/tasks/apply-patch.ts"(){X()}});function Ha(e,t){return{branch:e,hash:t,success:!0}}function Ua(e){return{branch:e,hash:null,success:!1}}var Wa,Ga=S({"src/lib/responses/BranchDeleteSummary.ts"(){Wa=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function Ka(e,t){return t===1&&Ja.test(e)}var qa,Ja,Ya,Xa,Za=S({"src/lib/parsers/parse-branch-delete.ts"(){Ga(),q(),qa=/(\S+)\s+\(\S+\s([^)]+)\)/,Ja=/^error[^']+'([^']+)'/m,Ya=[new H(qa,(e,[t,n])=>{let r=Ha(t,n);e.all.push(r),e.branches[t]=r}),new H(Ja,(e,[t])=>{let n=Ua(t);e.errors.push(n),e.all.push(n),e.branches[t]=n})],Xa=(e,t)=>K(new Wa,Ya,[e,t])}}),Qa,$a=S({"src/lib/responses/BranchSummary.ts"(){Qa=class{constructor(){this.all=[],this.branches={},this.current=``,this.detached=!1}push(e,t,n,r,i){e===`*`&&(this.detached=t,this.current=n),this.all.push(n),this.branches[n]={current:e===`*`,linkedWorkTree:e===`+`,name:n,commit:r,label:i}}}}});function eo(e){return e?e.charAt(0):``}function to(e,t=!1){return K(new Qa,t?[ro]:no,e)}var no,ro,io=S({"src/lib/parsers/parse-branch.ts"(){$a(),q(),no=[new H(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,n,r,i])=>{e.push(eo(t),!0,n,r,i)}),new H(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(e,[t,n,r,i])=>{e.push(eo(t),!1,n,r,i)})],ro=new H(/^(\S+)$/s,(e,[t])=>{e.push(`*`,!1,t,``,``)})}}),ao={};C(ao,{branchLocalTask:()=>co,branchTask:()=>so,containsDeleteBranchCommand:()=>oo,deleteBranchTask:()=>uo,deleteBranchesTask:()=>lo});function oo(e){let t=[`-d`,`-D`,`--delete`];return e.some(e=>t.includes(e))}function so(e){let t=oo(e),n=e.includes(`--show-current`),r=[`branch`,...e];return r.length===1&&r.push(`-a`),r.includes(`-v`)||r.splice(1,0,`-v`),{format:`utf-8`,commands:r,parser(e,r){return t?Xa(e,r).all[0]:to(e,n)}}}function co(){return{format:`utf-8`,commands:[`branch`,`-v`],parser(e){return to(e)}}}function lo(e,t=!1){return{format:`utf-8`,commands:[`branch`,`-v`,t?`-D`:`-d`,...e],parser(e,t){return Xa(e,t)},onError({exitCode:e,stdOut:t},n,r,i){if(!Ka(String(n),e))return i(n);r(t)}}}function uo(e,t=!1){let n={format:`utf-8`,commands:[`branch`,`-v`,t?`-D`:`-d`,e],parser(t,n){return Xa(t,n).branches[e]},onError({exitCode:e,stdErr:t,stdOut:r},i,a,o){if(!Ka(String(i),e))return o(i);throw new $e(n.parser(F(r),F(t)),String(i))}};return n}var fo=S({"src/lib/tasks/branch.ts"(){D(),Za(),io(),q()}});function po(e){let t=e.trim().replace(/^["']|["']$/g,``);return t&&a(t)}var mo,ho=S({"src/lib/responses/CheckIgnore.ts"(){mo=e=>e.split(/\n/g).map(po).filter(Boolean)}}),go={};C(go,{checkIgnoreTask:()=>_o});function _o(e){return{commands:[`check-ignore`,...e],format:`utf-8`,parser:mo}}var vo=S({"src/lib/tasks/check-ignore.ts"(){ho()}});function yo(e,t){return K({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},bo,[e,t])}var bo,xo=S({"src/lib/parsers/parse-fetch.ts"(){q(),bo=[new H(/From (.+)$/,(e,[t])=>{e.remote=t}),new H(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,n])=>{e.branches.push({name:t,tracking:n})}),new H(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,n])=>{e.tags.push({name:t,tracking:n})}),new H(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new H(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,n,r,i])=>{e.updated.push({name:r,tracking:i,to:n,from:t})})]}}),So={};C(So,{fetchTask:()=>wo});function Co(e){return/^--upload-pack(=|$)/.test(e)}function wo(e,t,n){let r=[`fetch`,...n];return e&&t&&r.push(e,t),r.find(Co)?J(`git.fetch: potential exploit argument blocked.`):{commands:r,format:`utf-8`,parser:yo}}var To=S({"src/lib/tasks/fetch.ts"(){xo(),X()}});function Eo(e){return K({moves:[]},Do,e)}var Do,Oo=S({"src/lib/parsers/parse-move.ts"(){q(),Do=[new H(/^Renaming (.+) to (.+)$/,(e,[t,n])=>{e.moves.push({from:t,to:n})})]}}),ko={};C(ko,{moveTask:()=>Ao});function Ao(e,t){return{commands:[`mv`,`-v`,...j(e),t],format:`utf-8`,parser:Eo}}var jo=S({"src/lib/tasks/move.ts"(){Oo(),q()}}),Mo={};C(Mo,{pullTask:()=>No});function No(e,t,n){let r=[`pull`,...n];return e&&t&&r.splice(1,0,e,t),{commands:r,format:`utf-8`,parser(e,t){return Hi(e,t)},onError(e,t,n,r){let i=Fi(F(e.stdOut),F(e.stdErr));if(i)return r(new $e(i));r(t)}}}var Po=S({"src/lib/tasks/pull.ts"(){D(),Ui(),q()}});function Fo(e){let t={};return Lo(e,([e])=>t[e]={name:e}),Object.values(t)}function Io(e){let t={};return Lo(e,([e,n,r])=>{Object.hasOwn(t,e)||(t[e]={name:e,refs:{fetch:``,push:``}}),r&&n&&(t[e].refs[r.replace(/[^a-z]/g,``)]=n)}),Object.values(t)}function Lo(e,t){st(e,e=>t(e.split(/\s+/)))}var Ro=S({"src/lib/responses/GetRemoteSummary.ts"(){q()}}),zo={};C(zo,{addRemoteTask:()=>Bo,getRemotesTask:()=>Vo,listRemotesTask:()=>Ho,remoteTask:()=>Uo,removeRemoteTask:()=>Wo});function Bo(e,t,n){return Y([`remote`,`add`,...n,e,t])}function Vo(e){let t=[`remote`];return e&&t.push(`-v`),{commands:t,format:`utf-8`,parser:e?Io:Fo}}function Ho(e){let t=[...e];return t[0]!==`ls-remote`&&t.unshift(`ls-remote`),Y(t)}function Uo(e){let t=[...e];return t[0]!==`remote`&&t.unshift(`remote`),Y(t)}function Wo(e){return Y([`remote`,`remove`,e])}var Go=S({"src/lib/tasks/remote.ts"(){Ro(),X()}}),Ko={};C(Ko,{stashListTask:()=>qo});function qo(e={},t){let n=gi(e),r=[`stash`,`list`,...n.commands,...t],i=ii(n.splitter,n.fields,Wr(r));return fi(r)||{commands:r,format:`utf-8`,parser:i}}var Jo=S({"src/lib/tasks/stash-list.ts"(){qr(),li(),pi(),bi()}}),Yo={};C(Yo,{addSubModuleTask:()=>Xo,initSubModuleTask:()=>Zo,subModuleTask:()=>Qo,updateSubModuleTask:()=>$o});function Xo(e,t){return Qo([`add`,e,t])}function Zo(e){return Qo([`init`,...e])}function Qo(e){let t=[...e];return t[0]!==`submodule`&&t.unshift(`submodule`),Y(t)}function $o(e){return Qo([`update`,...e])}var es=S({"src/lib/tasks/sub-module.ts"(){X()}});function ts(e,t){let n=Number.isNaN(e);return n===Number.isNaN(t)?n?ns(e,t):0:n?1:-1}function ns(e,t){return e===t?0:e>t?1:-1}function rs(e){return e.trim()}function is(e){return typeof e==`string`&&parseInt(e.replace(/^\D+/g,``),10)||0}var as,os,ss=S({"src/lib/responses/TagList.ts"(){as=class{constructor(e,t){this.all=e,this.latest=t}},os=function(e,t=!1){let n=e.split(`
9
9
  `).map(rs).filter(Boolean);t||n.sort(function(e,t){let n=e.split(`.`),r=t.split(`.`);if(n.length===1||r.length===1)return ts(is(n[0]),is(r[0]));for(let e=0,t=Math.max(n.length,r.length);e<t;e++){let t=ns(is(n[e]),is(r[e]));if(t)return t}return 0});let r=t?n[0]:[...n].reverse().find(e=>e.indexOf(`.`)>=0);return new as(n,r)}}}),cs={};C(cs,{addAnnotatedTagTask:()=>ds,addTagTask:()=>us,tagListTask:()=>ls});function ls(e=[]){let t=e.some(e=>/^--sort=/.test(e));return{format:`utf-8`,commands:[`tag`,`-l`,...e],parser(e){return os(e,t)}}}function us(e){return{format:`utf-8`,commands:[`tag`,e],parser(){return{name:e}}}}function ds(e,t){return{format:`utf-8`,commands:[`tag`,`-a`,`-m`,t,e],parser(){return{name:e}}}}var fs=S({"src/lib/tasks/tag.ts"(){ss()}}),ps=Ze({"src/git.js"(e,t){var{GitExecutor:n}=(fr(),w(ur)),{SimpleGitApi:r}=(Pa(),w(Ma)),{Scheduler:i}=(Ra(),w(Fa)),{adhocExecTask:a,configurationErrorTask:o}=(X(),w(en)),{asArray:s,filterArray:c,filterPrimitives:l,filterString:u,filterStringOrStringArray:d,filterType:f,getTrailingOptions:p,trailingFunctionArgument:m,trailingOptionsArgument:ee}=(q(),w(Rt)),{applyPatchTask:te}=(Va(),w(za)),{branchTask:ne,branchLocalTask:re,deleteBranchesTask:ie,deleteBranchTask:ae}=(fo(),w(ao)),{checkIgnoreTask:oe}=(vo(),w(go)),{checkIsRepoTask:se}=(qt(),w(zt)),{cleanWithOptionsTask:h,isCleanOptionsArray:ce}=(bn(),w(sn)),{diffSummaryTask:le}=(pi(),w(ui)),{fetchTask:ue}=(To(),w(So)),{moveTask:g}=(jo(),w(ko)),{pullTask:de}=(Po(),w(Mo)),{pushTagsTask:fe}=(ia(),w(ta)),{addRemoteTask:pe,getRemotesTask:me,listRemotesTask:he,remoteTask:ge,removeRemoteTask:_}=(Go(),w(zo)),{getResetMode:_e,resetTask:ve}=(Qn(),w(Kn)),{stashListTask:ye}=(Jo(),w(Ko)),{addSubModuleTask:be,initSubModuleTask:xe,subModuleTask:Se,updateSubModuleTask:Ce}=(es(),w(Yo)),{addAnnotatedTagTask:we,addTagTask:Te,tagListTask:Ee}=(fs(),w(cs)),{straightThroughBufferTask:De,straightThroughStringTask:v}=(X(),w(en));function y(e,t){this._plugins=t,this._executor=new n(e.baseDir,new i(e.maxConcurrentProcesses),t),this._trimmed=e.trimmed}(y.prototype=Object.create(r.prototype)).constructor=y,y.prototype.customBinary=function(e){return this._plugins.reconfigure(`binary`,e),this},y.prototype.env=function(e,t){return arguments.length===1&&typeof e==`object`?this._executor.env=e:(this._executor.env=this._executor.env||{})[e]=t,this},y.prototype.stashList=function(e){return this._runTask(ye(ee(arguments)||{},c(e)&&e||[]),m(arguments))},y.prototype.mv=function(e,t){return this._runTask(g(e,t),m(arguments))},y.prototype.checkoutLatestTag=function(e){var t=this;return this.pull(function(){t.tags(function(n,r){t.checkout(r.latest,e)})})},y.prototype.pull=function(e,t,n,r){return this._runTask(de(f(e,u),f(t,u),p(arguments)),m(arguments))},y.prototype.fetch=function(e,t){return this._runTask(ue(f(e,u),f(t,u),p(arguments)),m(arguments))},y.prototype.silent=function(e){return this._runTask(a(()=>console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this method will be removed.")))},y.prototype.tags=function(e,t){return this._runTask(Ee(p(arguments)),m(arguments))},y.prototype.rebase=function(){return this._runTask(v([`rebase`,...p(arguments)]),m(arguments))},y.prototype.reset=function(e){return this._runTask(ve(_e(e),p(arguments)),m(arguments))},y.prototype.revert=function(e){let t=m(arguments);return typeof e==`string`?this._runTask(v([`revert`,...p(arguments,0,!0),e]),t):this._runTask(o(`Commit must be a string`),t)},y.prototype.addTag=function(e){let t=typeof e==`string`?Te(e):o(`Git.addTag requires a tag name`);return this._runTask(t,m(arguments))},y.prototype.addAnnotatedTag=function(e,t){return this._runTask(we(e,t),m(arguments))},y.prototype.deleteLocalBranch=function(e,t,n){return this._runTask(ae(e,typeof t==`boolean`?t:!1),m(arguments))},y.prototype.deleteLocalBranches=function(e,t,n){return this._runTask(ie(e,typeof t==`boolean`?t:!1),m(arguments))},y.prototype.branch=function(e,t){return this._runTask(ne(p(arguments)),m(arguments))},y.prototype.branchLocal=function(e){return this._runTask(re(),m(arguments))},y.prototype.raw=function(e){let t=!Array.isArray(e),n=[].slice.call(t?arguments:e,0);for(let e=0;e<n.length&&t;e++)if(!l(n[e])){n.splice(e,n.length-e);break}n.push(...p(arguments,0,!0));var r=m(arguments);return n.length?this._runTask(v(n,this._trimmed),r):this._runTask(o(`Raw: must supply one or more command to execute`),r)},y.prototype.submoduleAdd=function(e,t,n){return this._runTask(be(e,t),m(arguments))},y.prototype.submoduleUpdate=function(e,t){return this._runTask(Ce(p(arguments,!0)),m(arguments))},y.prototype.submoduleInit=function(e,t){return this._runTask(xe(p(arguments,!0)),m(arguments))},y.prototype.subModule=function(e,t){return this._runTask(Se(p(arguments)),m(arguments))},y.prototype.listRemote=function(){return this._runTask(he(p(arguments)),m(arguments))},y.prototype.addRemote=function(e,t,n){return this._runTask(pe(e,t,p(arguments)),m(arguments))},y.prototype.removeRemote=function(e,t){return this._runTask(_(e),m(arguments))},y.prototype.getRemotes=function(e,t){return this._runTask(me(e===!0),m(arguments))},y.prototype.remote=function(e,t){return this._runTask(ge(p(arguments)),m(arguments))},y.prototype.tag=function(e,t){let n=p(arguments);return n[0]!==`tag`&&n.unshift(`tag`),this._runTask(v(n),m(arguments))},y.prototype.updateServerInfo=function(e){return this._runTask(v([`update-server-info`]),m(arguments))},y.prototype.pushTags=function(e,t){let n=fe({remote:f(e,u)},p(arguments));return this._runTask(n,m(arguments))},y.prototype.rm=function(e){return this._runTask(v([`rm`,`-f`,...s(e)]),m(arguments))},y.prototype.rmKeepLocal=function(e){return this._runTask(v([`rm`,`--cached`,...s(e)]),m(arguments))},y.prototype.catFile=function(e,t){return this._catFile(`utf-8`,arguments)},y.prototype.binaryCatFile=function(){return this._catFile(`buffer`,arguments)},y.prototype._catFile=function(e,t){var n=m(t),r=[`cat-file`],i=t[0];if(typeof i==`string`)return this._runTask(o(`Git.catFile: options must be supplied as an array of strings`),n);Array.isArray(i)&&r.push.apply(r,i);let a=e===`buffer`?De(r):v(r);return this._runTask(a,n)},y.prototype.diff=function(e,t){let n=u(e)?o(`git.diff: supplying options as a single string is no longer supported, switch to an array of strings`):v([`diff`,...p(arguments)]);return this._runTask(n,m(arguments))},y.prototype.diffSummary=function(){return this._runTask(le(p(arguments,1)),m(arguments))},y.prototype.applyPatch=function(e){let t=d(e)?te(s(e),p([].slice.call(arguments,1))):o(`git.applyPatch requires one or more string patches as the first argument`);return this._runTask(t,m(arguments))},y.prototype.revparse=function(){let e=[`rev-parse`,...p(arguments,!0)];return this._runTask(v(e,!0),m(arguments))},y.prototype.clean=function(e,t,n){let r=ce(e),i=r&&e.join(``)||f(e,u)||``,a=p([].slice.call(arguments,+!!r));return this._runTask(h(i,a),m(arguments))},y.prototype.exec=function(e){return this._runTask({commands:[],format:`utf-8`,parser(){typeof e==`function`&&e()}})},y.prototype.clearQueue=function(){return this._runTask(a(()=>console.warn(`simple-git deprecation notice: clearQueue() is deprecated and will be removed, switch to using the abortPlugin instead.`)))},y.prototype.checkIgnore=function(e,t){return this._runTask(oe(s(f(e,d,[]))),m(arguments))},y.prototype.checkIsRepo=function(e,t){return this._runTask(se(f(e,u)),m(arguments))},t.exports=y}});E();var ms=class extends T{constructor(e,t){super(void 0,t),this.config=e}};E(),E();var $=class extends T{constructor(e,t,n){super(e,n),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};D(),tt(),qt(),bn(),Nn(),Ln(),Gn(),Qn();function hs(e){if(e)return[{type:`spawn.before`,action(t,n){e.aborted&&n.kill(new $(void 0,`abort`,`Abort already signaled`))}},{type:`spawn.after`,action(t,n){function r(){n.kill(new $(void 0,`abort`,`Abort signal received`))}e.addEventListener(`abort`,r),n.spawned.on(`close`,()=>e.removeEventListener(`abort`,r))}}]}function gs(e={}){return{type:`spawn.args`,action(t,{env:n}){for(let r of Ke(t,n))if(e[r.category]!==!0)throw new $(void 0,`unsafe`,r.message);return t}}}q();function _s(e){let t=P(e,`-c`);return{type:`spawn.args`,action(e){return[...t,...e]}}}q();var vs=(0,g.deferred)().promise;function ys({onClose:e=!0,onExit:t=50}={}){function n(){let n=-1,i={close:(0,g.deferred)(),closeTimeout:(0,g.deferred)(),exit:(0,g.deferred)(),exitTimeout:(0,g.deferred)()},a=Promise.race([e===!1?vs:i.closeTimeout.promise,t===!1?vs:i.exitTimeout.promise]);return r(e,i.close,i.closeTimeout),r(t,i.exit,i.exitTimeout),{close(e){n=e,i.close.done()},exit(e){n=e,i.exit.done()},get exitCode(){return n},result:a}}function r(e,t,n){e!==!1&&(e===!0?t.promise:t.promise.then(()=>pt(e))).then(n.done)}return{type:`spawn.after`,async action(e,{spawned:t,close:r}){let i=n(),a=!0,o=()=>void(a=!1);t.stdout?.on(`data`,o),t.stderr?.on(`data`,o),t.on(`error`,o),t.on(`close`,e=>i.close(e)),t.on(`exit`,e=>i.exit(e));try{await i.result,a&&await pt(50),r(i.exitCode)}catch(e){r(i.exitCode,e)}}}}q();var bs=`Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings`,xs=`Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option`;function Ss(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_~-]+)$/i.test(e)}function Cs(e,t){if(e.length<1||e.length>2)throw new $(void 0,`binary`,bs);if(e.some(Ss))if(t)console.warn(xs);else throw new $(void 0,`binary`,xs);let[n,r]=e;return{binary:n,prefix:r}}function ws(e,t=[`git`],n=!1){let r=Cs(j(t),n);e.on(`binary`,e=>{r=Cs(j(e),n)}),e.append(`spawn.binary`,()=>r.binary),e.append(`spawn.args`,e=>r.prefix?[r.prefix,...e]:e)}E();function Ts(e){return!!(e.exitCode&&e.stdErr.length)}function Es(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function Ds(e=!1,t=Ts,n=Es){return(r,i)=>!e&&r||!t(i)?r:n(i)}function Os(e){return{type:`task.error`,action(t,n){let r=e(t.error,{stdErr:n.stdErr,stdOut:n.stdOut,exitCode:n.exitCode});return Buffer.isBuffer(r)?{error:new T(void 0,r.toString(`utf-8`))}:{error:r}}}}q();var ks=class{constructor(){this.plugins=new Set,this.events=new u}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let n=A(this.plugins,{type:e,action:t});return()=>this.plugins.delete(n)}add(e){let t=[];return j(e).forEach(e=>e&&this.plugins.add(A(t,e))),()=>{t.forEach(e=>this.plugins.delete(e))}}exec(e,t,n){let r=t,i=Object.freeze(Object.create(n));for(let t of this.plugins)t.type===e&&(r=t.action(r,i));return r}};q();function As(e){let t=`--progress`,n=[`checkout`,`clone`,`fetch`,`pull`,`push`];return[{type:`spawn.args`,action(e,r){return n.includes(r.method)?lt(e,t):e}},{type:`spawn.after`,action(n,r){r.commands.includes(t)&&r.spawned.stderr?.on(`data`,t=>{let n=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(t.toString(`utf8`));n&&e({method:r.method,stage:js(n[1]),progress:N(n[2]),processed:N(n[3]),total:N(n[4])})})}}]}function js(e){return String(e.toLowerCase().split(` `,1))||`unknown`}q();function Ms(e){let t=ft(e,[`uid`,`gid`]);return{type:`spawn.options`,action(e){return{...t,...e}}}}function Ns({block:e,stdErr:t=!0,stdOut:n=!0}){if(e>0)return{type:`spawn.after`,action(r,i){let a;function o(){a&&clearTimeout(a),a=setTimeout(c,e)}function s(){i.spawned.stdout?.off(`data`,o),i.spawned.stderr?.off(`data`,o),i.spawned.off(`exit`,s),i.spawned.off(`close`,s),a&&clearTimeout(a)}function c(){s(),i.kill(new $(void 0,`timeout`,`block timeout reached`))}n&&i.spawned.stdout?.on(`data`,o),t&&i.spawned.stderr?.on(`data`,o),i.spawned.on(`exit`,s),i.spawned.on(`close`,s),o()}}}function Ps(){return{type:`spawn.args`,action(e){let t=[],n;function r(e){(n||=[]).push(...e)}for(let n=0;n<e.length;n++){let i=e[n];if(h(i)){r(ce(i));continue}if(i===`--`){r(e.slice(n+1).flatMap(e=>h(e)&&ce(e)||e));break}t.push(i)}return n?[...t,`--`,...n.map(String)]:t}}}q();var Fs=ps();function Is(e,t){let n=new ks,r=kt(e&&(typeof e==`string`?{baseDir:e}:e)||{},t);if(!ct(r.baseDir))throw new ms(r,`Cannot use simple-git on a directory that does not exist`);return Array.isArray(r.config)&&n.add(_s(r.config)),n.add(gs(r.unsafe)),n.add(ys(r.completion)),r.abort&&n.add(hs(r.abort)),r.progress&&n.add(As(r.progress)),r.timeout&&n.add(Ns(r.timeout)),r.spawnOptions&&n.add(Ms(r.spawnOptions)),n.add(Ps()),n.add(Os(Ds(!0))),r.errors&&n.add(Os(r.errors)),ws(n,r.binary,r.unsafe?.allowUnsafeCustomBinary),new Fs(r,n)}D();var Ls=Is,Rs=Is;const zs=new class{_tail=Promise.resolve();enqueue(e){let t=this._tail.then(()=>e());return this._tail=t.catch(()=>void 0),t}};function Bs(e){return zs.enqueue(e)}function Vs(e){try{return s(e)&&c(e).isDirectory()}catch{return!1}}const Hs=[`HOME`,`USERPROFILE`,`HOMEDRIVE`,`HOMEPATH`,`APPDATA`,`LOCALAPPDATA`,`ProgramData`,`ALLUSERSPROFILE`,`SystemRoot`,`WINDIR`,`windir`,`ComSpec`,`TEMP`,`TMP`,`USERNAME`,`USERDOMAIN`,`PATHEXT`,`SSH_AUTH_SOCK`,`ELECTRON_RUN_AS_NODE`];function Us(e){let t={LANG:`C`,LC_ALL:`C`,GIT_TERMINAL_PROMPT:`0`,GIT_MERGE_AUTOEDIT:`no`};t.PATH=r(process.env.PATH??process.env.Path,{platform:process.platform,homeDir:l(),isDir:Vs,delimiter:i});for(let e of Hs){let n=process.env[e];n!==void 0&&(t[e]=n)}return e&&(t.OK_GH_TOKEN=e.token,t.OK_GH_TOKEN_HOST=e.host),t}function Ws(e,t){let n={...e.env};for(let[e,r]of Object.entries(t))r!==void 0&&(n[e]=r);return e.git.env(n)}function Gs(e,t={}){let{credentialArgs:n=[],gitIndexFile:r,ghToken:i,timeoutMs:a}=t,s=Us(i);return r&&(s.GIT_INDEX_FILE=o(e,r)),{git:Rs({baseDir:e,config:[`commit.gpgsign=false`,`core.autocrlf=false`,...n.length>=2?[n[1]]:[]],unsafe:{allowUnsafeCredentialHelper:!0},...a===void 0?{}:{timeout:{block:a}}}).env(s),projectDir:e,credentialArgs:n,env:s}}export{Rs as a,Bs as i,Us as n,Ls as o,Gs as r,re as s,Ws as t};
10
- //# sourceMappingURL=git-handle-JgY8Ytwb.mjs.map
10
+ //# sourceMappingURL=git-handle-bosCq-DO.mjs.map
package/dist/index.d.mts CHANGED
@@ -2223,6 +2223,14 @@ interface ReportBundleSummary$1 {
2223
2223
  generatedAt: string;
2224
2224
  }
2225
2225
  //#endregion
2226
+ //#region ../core/src/logging/secret-scrub.d.ts
2227
+ /** Apply {@link SECRET_PATTERNS} line by line; report which patterns matched. */
2228
+ declare function redactSecrets(content: string): {
2229
+ redacted: string;
2230
+ patterns: string[];
2231
+ lineCount: number;
2232
+ };
2233
+ //#endregion
2226
2234
  //#region ../../node_modules/.pnpm/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts
2227
2235
  /**
2228
2236
  * One place in a source file.
@@ -2339,6 +2347,30 @@ declare const ConfigSchema: ZodObject<{
2339
2347
  attributeDenylist: ZodDefault<ZodArray<ZodString>>;
2340
2348
  }, $loose>>;
2341
2349
  }, $loose>>;
2350
+ lossCapture: ZodDefault<ZodObject<{
2351
+ enabled: ZodDefault<ZodBoolean>;
2352
+ maxBytes: ZodDefault<ZodNumber>;
2353
+ }, $loose>>;
2354
+ bridge: ZodDefault<ZodObject<{
2355
+ backgroundThrottle: ZodDefault<ZodObject<{
2356
+ enabled: ZodDefault<ZodBoolean>;
2357
+ }, $loose>>;
2358
+ deferGuard: ZodDefault<ZodObject<{
2359
+ enabled: ZodDefault<ZodBoolean>;
2360
+ }, $loose>>;
2361
+ lossDetector: ZodDefault<ZodObject<{
2362
+ enabled: ZodDefault<ZodBoolean>;
2363
+ }, $loose>>;
2364
+ fixedPoint: ZodDefault<ZodObject<{
2365
+ enabled: ZodDefault<ZodBoolean>;
2366
+ }, $loose>>;
2367
+ preDrain: ZodDefault<ZodObject<{
2368
+ enabled: ZodDefault<ZodBoolean>;
2369
+ }, $loose>>;
2370
+ flushOnHide: ZodDefault<ZodObject<{
2371
+ enabled: ZodDefault<ZodBoolean>;
2372
+ }, $loose>>;
2373
+ }, $loose>>;
2342
2374
  search: ZodDefault<ZodObject<{
2343
2375
  semantic: ZodDefault<ZodObject<{
2344
2376
  enabled: ZodDefault<ZodBoolean>;
@@ -3567,14 +3599,6 @@ interface BundleExtraFile {
3567
3599
  zipName?: string;
3568
3600
  }
3569
3601
  //#endregion
3570
- //#region src/commands/bug-report-redact.d.ts
3571
- /** Apply {@link SECRET_PATTERNS} line by line; report which patterns matched. */
3572
- declare function redactContent(content: string): {
3573
- redacted: string;
3574
- patterns: string[];
3575
- lineCount: number;
3576
- };
3577
- //#endregion
3578
3602
  //#region ../server/src/config/schema.d.ts
3579
3603
  type Config = Config$1;
3580
3604
  //#endregion
@@ -4713,7 +4737,7 @@ interface ReportBundleResult {
4713
4737
  * per-project lock/spawn-error + local sink logs, sysinfo. No git/server
4714
4738
  * dependency.
4715
4739
  * - `full`: the `ok diagnose bundle` superset — adds telemetry spans, live
4716
- * server state, runtime metadata, and doc-name anonymization.
4740
+ * server state, runtime metadata, and the content-loss ring.
4717
4741
  * Availability-gated: pieces whose source is missing (no running server,
4718
4742
  * no shadow repo, no telemetry sink) are omitted without error, and the
4719
4743
  * bundled manifest inventory reflects what was actually included.
@@ -4721,11 +4745,11 @@ interface ReportBundleResult {
4721
4745
  * Every full-only artifact is project-scoped, so without a `projectDir` both
4722
4746
  * levels produce the same system-wide bundle.
4723
4747
  *
4724
- * With `redact` on, the secret-pattern scrub applies at both levels; the
4725
- * full level additionally hashes doc names and masks the content-dir path
4726
- * (inverse map written as a sidecar next to the zip, never inside it).
4748
+ * With `redact` on, the secret-pattern scrub applies at both levels; the full
4749
+ * level additionally masks the content-dir path. Doc names ship raw under the
4750
+ * user's explicit Detailed-diagnostics consent.
4727
4751
  */
4728
4752
  declare function collectReportBundle(opts: CollectReportBundleOptions): Promise<ReportBundleResult>;
4729
4753
  //#endregion
4730
- export { ALL_EDITOR_IDS, type BundleExtraFile, type BundleLogger, type CollectReportBundleOptions, EDITOR_LABELS, EDITOR_TARGETS, type EditorId, type EditorMcpResult, type EditorMcpTarget, type ExcludeWriteResult, type ExpectedShareRepo, type GhDetectResult, HOSTS_WITH_USER_SKILL_DIR, type IntegrationWriteOutcome, LAUNCH_CONFIG_NAME, type LoadConfigResult, type McpConfigDeclineEvent, type McpConfigDeclineScope, type McpConfigMigrateEvent, type McpConfigMigrateScope, type McpDeclineReason, type McpEntryClassification, type McpInstallOptions, type McpRemoveOutcome, type OwnManagedMcpEntryHit, PATH_SHIM_BEGIN, PATH_SHIM_BLOCK_RE, PATH_SHIM_END, type ParsedGitHubBlobUrl, type ParsedGitHubShareTarget, type ParsedGitHubTreeUrl, type PathDiscovery, type PathInstallConsent, type PathInstallMarker, type PreviewResult, type ProjectAiIntegrationsResult, type ProjectSkillRemoveResult, type ProjectSkillResult, type ReportBundleLevel, type ReportBundleResult, type ReportBundleSummary, type ResolveProjectRootOptions, type ResolveProjectRootResult, type ShareFolderValidationResult, type SharingMode, type SkillBundleTarget, type TokenStore, type TrackedRefusal, type UserMcpConfigsOptions, addOkPathsToGitExclude, assertProjectPathSafe, buildManagedServerEntry, buildMcpConfigDeclineEvent, buildMcpConfigMigrateEvent, classifyExistingMcpEntry, collectReportBundle, createTokenStore, defaultBugReportZipPath, detectGh, detectInstalledEditors, formatTrackedRemediation, getExcludedOkPaths, getOkArtifactPaths, isEntryUpToDate, isOwnManagedEntry, loadConfig, makeLazyProbeTokenStore, okBugReportsDir, parseGitHubBlobUrl, parseGitHubShareUrl, parseGitHubTreeUrl, parseGitUrl, pathInstallMarkerPath, previewContent, probeOwnManagedEditorMcpEntry, probeTrackedOkPaths, readExistingMcpEntry, readSharingMode, readSkillsShared, redactContent, removeOkPathsFromGitExclude, removeOwnMcpEntry, removeProjectSkill, removeUserGlobalSkillBundle, resolveProjectRoot, runStop, setSkillsShared, truncatePriorEntry, userGlobalSkillBundleTargets, validateLocalFolderForShare, writeEditorMcpConfig, writeProjectAiIntegrations, writeProjectSkill, writeUserMcpConfigs };
4754
+ export { ALL_EDITOR_IDS, type BundleExtraFile, type BundleLogger, type CollectReportBundleOptions, EDITOR_LABELS, EDITOR_TARGETS, type EditorId, type EditorMcpResult, type EditorMcpTarget, type ExcludeWriteResult, type ExpectedShareRepo, type GhDetectResult, HOSTS_WITH_USER_SKILL_DIR, type IntegrationWriteOutcome, LAUNCH_CONFIG_NAME, type LoadConfigResult, type McpConfigDeclineEvent, type McpConfigDeclineScope, type McpConfigMigrateEvent, type McpConfigMigrateScope, type McpDeclineReason, type McpEntryClassification, type McpInstallOptions, type McpRemoveOutcome, type OwnManagedMcpEntryHit, PATH_SHIM_BEGIN, PATH_SHIM_BLOCK_RE, PATH_SHIM_END, type ParsedGitHubBlobUrl, type ParsedGitHubShareTarget, type ParsedGitHubTreeUrl, type PathDiscovery, type PathInstallConsent, type PathInstallMarker, type PreviewResult, type ProjectAiIntegrationsResult, type ProjectSkillRemoveResult, type ProjectSkillResult, type ReportBundleLevel, type ReportBundleResult, type ReportBundleSummary, type ResolveProjectRootOptions, type ResolveProjectRootResult, type ShareFolderValidationResult, type SharingMode, type SkillBundleTarget, type TokenStore, type TrackedRefusal, type UserMcpConfigsOptions, addOkPathsToGitExclude, assertProjectPathSafe, buildManagedServerEntry, buildMcpConfigDeclineEvent, buildMcpConfigMigrateEvent, classifyExistingMcpEntry, collectReportBundle, createTokenStore, defaultBugReportZipPath, detectGh, detectInstalledEditors, formatTrackedRemediation, getExcludedOkPaths, getOkArtifactPaths, isEntryUpToDate, isOwnManagedEntry, loadConfig, makeLazyProbeTokenStore, okBugReportsDir, parseGitHubBlobUrl, parseGitHubShareUrl, parseGitHubTreeUrl, parseGitUrl, pathInstallMarkerPath, previewContent, probeOwnManagedEditorMcpEntry, probeTrackedOkPaths, readExistingMcpEntry, readSharingMode, readSkillsShared, redactSecrets as redactContent, removeOkPathsFromGitExclude, removeOwnMcpEntry, removeProjectSkill, removeUserGlobalSkillBundle, resolveProjectRoot, runStop, setSkillsShared, truncatePriorEntry, userGlobalSkillBundleTargets, validateLocalFolderForShare, writeEditorMcpConfig, writeProjectAiIntegrations, writeProjectSkill, writeUserMcpConfigs };
4731
4755
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{c as e,d as t,f as n,g as r,i,l as a,r as o,s,t as c,u as l,v as u,y as d}from"./write-project-skill-CG87XS-d.mjs";import{C as f,T as p,_ as m,b as h,c as g,f as _,g as v,h as y,i as b,l as x,n as S,r as C,s as w,t as T,u as E,v as D,w as O}from"./src-CfIUSiib.mjs";import{a as k,i as A,n as j,t as M}from"./acp-harness-probe-C3Si3Oe6.mjs";import{A as N,F as P,I as F,M as I,N as L,O as R,P as z,d as B,j as V,k as H,n as U,o as W,s as G,v as K,x as q,y as J}from"./init-BRlzdKw6.mjs";import{n as Y}from"./loader-BiH3mrIJ.mjs";import{n as X}from"./preview-DB8FUJNR.mjs";import{n as Z,t as Q}from"./mcp-migrate-event-CWx0WLdE.mjs";export{a as ALL_EDITOR_IDS,l as EDITOR_LABELS,t as EDITOR_TARGETS,n as HOSTS_WITH_USER_SKILL_DIR,U as LAUNCH_CONFIG_NAME,g as PATH_SHIM_BEGIN,x as PATH_SHIM_BLOCK_RE,E as PATH_SHIM_END,R as addOkPathsToGitExclude,c as assertProjectPathSafe,r as buildManagedServerEntry,C as buildMcpConfigDeclineEvent,Q as buildMcpConfigMigrateEvent,W as classifyExistingMcpEntry,h as collectReportBundle,A as createTokenStore,f as defaultBugReportZipPath,j as detectGh,G as detectInstalledEditors,H as formatTrackedRemediation,N as getExcludedOkPaths,V as getOkArtifactPaths,u as isEntryUpToDate,d as isOwnManagedEntry,Y as loadConfig,k as makeLazyProbeTokenStore,O as okBugReportsDir,y as parseGitHubBlobUrl,v as parseGitHubShareUrl,m as parseGitHubTreeUrl,D as parseGitUrl,_ as pathInstallMarkerPath,X as previewContent,M as probeOwnManagedEditorMcpEntry,I as probeTrackedOkPaths,B as readExistingMcpEntry,L as readSharingMode,z as readSkillsShared,p as redactContent,P as removeOkPathsFromGitExclude,w as removeOwnMcpEntry,o as removeProjectSkill,s as removeUserGlobalSkillBundle,q as resolveProjectRoot,b as runStop,F as setSkillsShared,Z as truncatePriorEntry,e as userGlobalSkillBundleTargets,S as validateLocalFolderForShare,K as writeEditorMcpConfig,T as writeProjectAiIntegrations,i as writeProjectSkill,J as writeUserMcpConfigs};
1
+ import{_o as e}from"./src-DY417osM.mjs";import{c as t,d as n,f as r,g as i,i as a,l as o,r as s,s as c,t as l,u,v as d,y as f}from"./write-project-skill-cxdqSDsT.mjs";import{C as p,_ as m,b as h,c as g,f as _,g as v,h as y,i as b,l as x,n as S,r as C,s as w,t as T,u as E,v as D,w as O}from"./src-JZ7OJ1TB.mjs";import{a as k,i as A,n as j,t as M}from"./acp-harness-probe-BI6bXf3a.mjs";import{A as N,F as P,I as F,M as I,N as L,O as R,P as z,d as B,j as V,k as H,n as U,o as W,s as G,v as K,x as q,y as J}from"./init-BUp3cQ_4.mjs";import{n as Y}from"./loader-y7Mn8M-Z.mjs";import{n as X}from"./preview-BV8bR51k.mjs";import{n as Z,t as Q}from"./mcp-migrate-event-CWx0WLdE.mjs";export{o as ALL_EDITOR_IDS,u as EDITOR_LABELS,n as EDITOR_TARGETS,r as HOSTS_WITH_USER_SKILL_DIR,U as LAUNCH_CONFIG_NAME,g as PATH_SHIM_BEGIN,x as PATH_SHIM_BLOCK_RE,E as PATH_SHIM_END,R as addOkPathsToGitExclude,l as assertProjectPathSafe,i as buildManagedServerEntry,C as buildMcpConfigDeclineEvent,Q as buildMcpConfigMigrateEvent,W as classifyExistingMcpEntry,h as collectReportBundle,A as createTokenStore,p as defaultBugReportZipPath,j as detectGh,G as detectInstalledEditors,H as formatTrackedRemediation,N as getExcludedOkPaths,V as getOkArtifactPaths,d as isEntryUpToDate,f as isOwnManagedEntry,Y as loadConfig,k as makeLazyProbeTokenStore,O as okBugReportsDir,y as parseGitHubBlobUrl,v as parseGitHubShareUrl,m as parseGitHubTreeUrl,D as parseGitUrl,_ as pathInstallMarkerPath,X as previewContent,M as probeOwnManagedEditorMcpEntry,I as probeTrackedOkPaths,B as readExistingMcpEntry,L as readSharingMode,z as readSkillsShared,e as redactContent,P as removeOkPathsFromGitExclude,w as removeOwnMcpEntry,s as removeProjectSkill,c as removeUserGlobalSkillBundle,q as resolveProjectRoot,b as runStop,F as setSkillsShared,Z as truncatePriorEntry,t as userGlobalSkillBundleTargets,S as validateLocalFolderForShare,K as writeEditorMcpConfig,T as writeProjectAiIntegrations,a as writeProjectSkill,J as writeUserMcpConfigs};