@jshookmcp/jshook 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/LICENSE +661 -661
  2. package/README.md +11 -3
  3. package/README.zh.md +11 -3
  4. package/dist/{AntiCheatDetector-CGVGNfy5.mjs → AntiCheatDetector-B6d4Qe9D.mjs} +1 -1
  5. package/dist/BrowserSessionCoordinator-BJ-HOxo0.mjs +1 -0
  6. package/dist/{CodeInjector-BlgyqTOk.mjs → CodeInjector-Cll_7bLJ.mjs} +1 -1
  7. package/dist/ConsoleMonitor-CxDJV15E.mjs +306 -0
  8. package/dist/DOMInspector-C19J4zeq.mjs +95 -0
  9. package/dist/DetailedDataManager-DmQ1LT-W.mjs +1 -0
  10. package/dist/ExtensionManager-BD724zkO.mjs +1 -0
  11. package/dist/ExtensionManager.tools-oVMJgPcN.mjs +1 -0
  12. package/dist/{HardwareBreakpoint-OcJqNFVc.mjs → HardwareBreakpoint-BUfPdp0f.mjs} +1 -1
  13. package/dist/{HeapAnalyzer-CqAxZzeS.mjs → HeapAnalyzer-B_aqY8oj.mjs} +1 -1
  14. package/dist/MCPServer.search.handlers.domain-BbS-6LnX.mjs +1 -0
  15. package/dist/MemoryController-X1XNSn1n.mjs +2 -0
  16. package/dist/{MemoryScanSession-CaxAjZJf.mjs → MemoryScanSession-DG_F-PjE.mjs} +1 -1
  17. package/dist/{MemoryScanner-BLYnMJy6.mjs → MemoryScanner-g1_L1ub5.mjs} +1 -1
  18. package/dist/{NativeMemoryManager.impl-CI554XbY.mjs → NativeMemoryManager.impl-DniBe2wf.mjs} +1 -1
  19. package/dist/{NativeMemoryManager.utils-DM4NC3FE.mjs → NativeMemoryManager.utils-BHy1P_jM.mjs} +1 -1
  20. package/dist/NetworkMonitor-B_-au6aV.mjs +185 -0
  21. package/dist/{PEAnalyzer-DJyaJTQJ.mjs → PEAnalyzer-yWQaGrcx.mjs} +1 -1
  22. package/dist/PageController-Dfsm1_o7.mjs +1 -0
  23. package/dist/{PointerChainEngine-5nF9eNlu.mjs → PointerChainEngine-BhCUkmxY.mjs} +1 -1
  24. package/dist/ProcessRegistry-C-bN48oR.mjs +1 -0
  25. package/dist/{ResponseBuilder-B2lu4KEl.mjs → ResponseBuilder-BfWP-uaT.mjs} +1 -1
  26. package/dist/RingBuffer-Dm54ELKT.mjs +1 -0
  27. package/dist/{ScriptManager-fgqiALgj.mjs → ScriptManager-LWGPTdvD.mjs} +1 -1
  28. package/dist/ServerRuntimeState-D2bWHqEE.mjs +1 -0
  29. package/dist/{Speedhack-l6s8L2Qw.mjs → Speedhack-yseDPSZ9.mjs} +1 -1
  30. package/dist/{StructureAnalyzer-A-WamfYE.mjs → StructureAnalyzer-C5lpuZkg.mjs} +1 -1
  31. package/dist/ToolCatalog-CYdD9F5f.mjs +1 -0
  32. package/dist/ToolProbe-C7ZU2x7M.mjs +1 -0
  33. package/dist/ToolRegistry-C5oB8KP8.mjs +1 -0
  34. package/dist/{ToolRouter.policy-CFHoN_Lw.mjs → ToolRouter.policy-CfhJczkt.mjs} +2 -2
  35. package/dist/{TraceRecorder-Dd8jLXpi.mjs → TraceRecorder-BiJWBXHX.mjs} +1 -1
  36. package/dist/{Win32Debug-CQteFL4F.mjs → Win32Debug-CYrIQBvr.mjs} +1 -1
  37. package/dist/{WorkflowEngine-CxEp2WXH.mjs → WorkflowEngine-D876meOO.mjs} +1 -1
  38. package/dist/analysis-D4swdMvq.mjs +6 -0
  39. package/dist/{antidebug-BOTZH6-0.mjs → antidebug-7L3ygj_9.mjs} +4 -4
  40. package/dist/apk-packer-BqXcInnX.mjs +1 -0
  41. package/dist/{artifactRetention-NBdncOEW.mjs → artifactRetention-BCPQASm7.mjs} +1 -1
  42. package/dist/{artifacts-B5xQuEa_.mjs → artifacts-CkodUM4j.mjs} +1 -1
  43. package/dist/betterSqlite3-Brtq-SIQ.mjs +1 -0
  44. package/dist/{binary-instrument-Cf9qqLlM.mjs → binary-instrument-DU7V6TUM.mjs} +1 -1
  45. package/dist/binary-secrets-PdMVoyt0.mjs +1 -0
  46. package/dist/{boringssl-inspector-BST5vtKx.mjs → boringssl-inspector-BBaJwwkU.mjs} +1 -1
  47. package/dist/browser-Qqco2rOT.mjs +11 -0
  48. package/dist/collector-Bpl6qy2L.mjs +1 -0
  49. package/dist/constants-BYj8Xek8.mjs +1 -0
  50. package/dist/{coordination-BbijHEHH.mjs → coordination-CWXW1o8K.mjs} +1 -1
  51. package/dist/dart-inspector-7AkPeZ_Q.mjs +0 -0
  52. package/dist/{debugger-CRJq_krh.mjs → debugger-DyALjYMk.mjs} +1 -1
  53. package/dist/{definitions-DZ8uKusP.mjs → definitions-BWxBke3r.mjs} +1 -1
  54. package/dist/{definitions-CYFbewnd.mjs → definitions-BYwATKc-.mjs} +1 -1
  55. package/dist/{definitions-DJklW2sS.mjs → definitions-B_83XfNQ.mjs} +1 -1
  56. package/dist/definitions-Bf3H1EwV.mjs +1 -0
  57. package/dist/{definitions-BGobEDQa.mjs → definitions-BftdXgXI.mjs} +1 -1
  58. package/dist/definitions-Bio5XJYy.mjs +1 -0
  59. package/dist/definitions-C3qNgSn1.mjs +1 -0
  60. package/dist/{definitions-NoVp_9Pm.mjs → definitions-CB6vmOer.mjs} +1 -1
  61. package/dist/{definitions-CoQFbggH.mjs → definitions-CMZRSy3k.mjs} +1 -1
  62. package/dist/{definitions-DI9YXsJk.mjs → definitions-CQd7yCQH.mjs} +1 -1
  63. package/dist/{definitions-CIO9O-Sw.mjs → definitions-CT8ln6GQ.mjs} +1 -1
  64. package/dist/{definitions-BGwNSkVm.mjs → definitions-Cenu6mxo.mjs} +1 -1
  65. package/dist/definitions-D4g-MS10.mjs +1 -0
  66. package/dist/{definitions-CuJRsJ6N.mjs → definitions-D5wl_8HN.mjs} +1 -1
  67. package/dist/{definitions-jXPaVy4P.mjs → definitions-DAQm1Xar.mjs} +1 -1
  68. package/dist/definitions-DP1vgxEY.mjs +1 -0
  69. package/dist/{definitions-Dds_zrWx.mjs → definitions-DxFNRQNK2.mjs} +1 -1
  70. package/dist/{definitions-DtE0XLrT.mjs → definitions-Ibci7e_L.mjs} +1 -1
  71. package/dist/{definitions-CCP9gphV.mjs → definitions-OeLvmlQy.mjs} +1 -1
  72. package/dist/{definitions-BbxOUiP-.mjs → definitions-RZYGD_Ey.mjs} +1 -1
  73. package/dist/definitions-Tls8c0A0.mjs +1 -0
  74. package/dist/{definitions-LaYTuwQd.mjs → definitions-bybDvnG0.mjs} +1 -1
  75. package/dist/{definitions-Dgrg7f3D.mjs → definitions-l7TjdE6V.mjs} +1 -1
  76. package/dist/{encoding-DGcr6Aj_.mjs → encoding-ycOaz8Vr.mjs} +1 -1
  77. package/dist/{ensure-browser-core-Buls24LQ.mjs → ensure-browser-core-DxWC-NTp.mjs} +1 -1
  78. package/dist/{factory-Cx_1LorX.mjs → factory-CKr4fAE1.mjs} +1 -1
  79. package/dist/{graphql-HLf3MS8H.mjs → graphql-B2TiPEow.mjs} +4 -4
  80. package/dist/{handlers-D49r1-1P.mjs → handlers-8zN_vBIz.mjs} +1 -1
  81. package/dist/handlers-B62K4FTc.mjs +1 -0
  82. package/dist/{handlers-BZoPla6E.mjs → handlers-BpDlVVVU.mjs} +1 -1
  83. package/dist/{handlers-DmQzIc44.mjs → handlers-CMJK7m1c.mjs} +1 -1
  84. package/dist/{handlers-BLMa4X7l.mjs → handlers-D2ZOul9p.mjs} +2 -2
  85. package/dist/{handlers-DW5AbYs5.mjs → handlers-D5E40ssn.mjs} +3 -3
  86. package/dist/{handlers-BP12ZsWc.mjs → handlers-DGbdQAgD.mjs} +2 -2
  87. package/dist/handlers-DHO3rjsW.mjs +1 -0
  88. package/dist/{handlers-DCE45Ww8.mjs → handlers-FJ80VzUI.mjs} +1 -1
  89. package/dist/handlers-VHWrxbM_.mjs +1 -0
  90. package/dist/{handlers-BggKiVx9.mjs → handlers-l8QIKqBj.mjs} +1 -1
  91. package/dist/{handlers-DnJRGp7t.mjs → handlers-mPFiNPe8.mjs} +1 -1
  92. package/dist/{handlers-pVNpaw4A.mjs → handlers-yo_xYzT8.mjs} +1 -1
  93. package/dist/handlers.impl-D9Hh8Bgl.mjs +1 -0
  94. package/dist/{hooks-DDKppogd.mjs → hooks-D4XLfgtV.mjs} +1 -1
  95. package/dist/index.mjs +11 -15
  96. package/dist/jadx-search-B_Yse0Zh.mjs +5 -0
  97. package/dist/maintenance-BUpIukhg.mjs +1 -0
  98. package/dist/{manifest-yu2xiQqe.mjs → manifest-0Jpt_AQa.mjs} +1 -1
  99. package/dist/{manifest-DMJlcsTR.mjs → manifest-B3fZbSWR.mjs} +1 -1
  100. package/dist/{manifest-De-6Wf2R.mjs → manifest-B7NB2rh2.mjs} +1 -1
  101. package/dist/manifest-BDi4nbH1.mjs +1 -0
  102. package/dist/{manifest-ais9Afrw.mjs → manifest-BLDfkE7n.mjs} +1 -1
  103. package/dist/manifest-BcXbB4gf.mjs +1 -0
  104. package/dist/{manifest-DsVh7Y4U.mjs → manifest-Bdnc_vrc.mjs} +1 -1
  105. package/dist/manifest-BuYKgCnp.mjs +1 -0
  106. package/dist/{manifest-Cx2IVMUY.mjs → manifest-CBfNnGPV.mjs} +1 -1
  107. package/dist/{manifest-DC-SMF6b.mjs → manifest-CPS1Xv69.mjs} +1 -1
  108. package/dist/{manifest-CGq4NpqH2.mjs → manifest-CQH9FhwI.mjs} +1 -1
  109. package/dist/{manifest-CRIJq4Hs.mjs → manifest-CRryuZF4.mjs} +1 -1
  110. package/dist/manifest-CctIumog.mjs +1 -0
  111. package/dist/manifest-CvTe5ZGV2.mjs +1 -0
  112. package/dist/{manifest-H-EpAyZQ.mjs → manifest-D-5GH0DV.mjs} +1 -1
  113. package/dist/{manifest-CtPmHAdn.mjs → manifest-D3Ssf3IC.mjs} +1 -1
  114. package/dist/{manifest-BeP_zJGb2.mjs → manifest-D5ck3NvC.mjs} +1 -1
  115. package/dist/{manifest-CeQmtQOY.mjs → manifest-D9jUUJAu.mjs} +1 -1
  116. package/dist/{manifest-C7qV1z7F.mjs → manifest-DCx6w2XV.mjs} +1 -1
  117. package/dist/{manifest-CFn0359q2.mjs → manifest-DG19q-Ld.mjs} +1 -1
  118. package/dist/{manifest-CJMGt7Qy.mjs → manifest-DLMlD0Zc.mjs} +1 -1
  119. package/dist/{manifest-CDeUZGUZ.mjs → manifest-DYpn8w_h.mjs} +1 -1
  120. package/dist/manifest-DYzWI8Xs.mjs +1 -0
  121. package/dist/{manifest-DKUorv5M.mjs → manifest-D_obs5F4.mjs} +1 -1
  122. package/dist/{manifest-D610kxZr.mjs → manifest-DujQqEQR.mjs} +2 -2
  123. package/dist/manifest-DwL2ik8P.mjs +1 -0
  124. package/dist/manifest-ItF5P8A12.mjs +1 -0
  125. package/dist/{manifest-tmb54wmA.mjs → manifest-KZphqIyX.mjs} +1 -1
  126. package/dist/{manifest-BPuE6oH2.mjs → manifest-LG42zPLY2.mjs} +1 -1
  127. package/dist/{manifest-D44TaRJU.mjs → manifest-LLdI5m4T.mjs} +1 -1
  128. package/dist/{manifest-Dgh0uDW-.mjs → manifest-QYbQXJn0.mjs} +1 -1
  129. package/dist/{manifest-BFGxlDRh.mjs → manifest-RcpX_MyZ.mjs} +2 -2
  130. package/dist/{manifest-CDiCtaQT.mjs → manifest-YgVd8Sgz.mjs} +1 -1
  131. package/dist/{manifest-D16xPXro.mjs → manifest-Zy7Odg5J.mjs} +1 -1
  132. package/dist/manifest-ff1H7Pdp.mjs +1 -0
  133. package/dist/{manifest-C_hEIjSx.mjs → manifest-iuhF6pTL2.mjs} +1 -1
  134. package/dist/{manifest-DWUUWBz0.mjs → manifest-nXHmtMSp2.mjs} +1 -1
  135. package/dist/{manifest-C1nZkTkO.mjs → manifest-xWfu6iLo.mjs} +1 -1
  136. package/dist/{manifest-C0g67k6U.mjs → manifest-yC16OhL2.mjs} +1 -1
  137. package/dist/manifest-ztWJoXy4.mjs +1 -0
  138. package/dist/modules-BPBcSaM-.mjs +333 -0
  139. package/dist/{mojo-ipc-VGlv3Qyp.mjs → mojo-ipc-BhwsdVUW.mjs} +1 -1
  140. package/dist/native/scripts/linux/enum-windows.sh +12 -12
  141. package/dist/native/scripts/macos/enum-windows.applescript +22 -22
  142. package/dist/native-j8l473zn.mjs +961 -0
  143. package/dist/network-T0VRwNPd.mjs +7 -0
  144. package/dist/{outputPaths-BonGThuc.mjs → outputPaths-B4Ic4RZh.mjs} +2 -2
  145. package/dist/platform-CzaQtISh.mjs +93 -0
  146. package/dist/process-CWhsCWrf.mjs +2 -0
  147. package/dist/proxy-DZFlDsG3.mjs +2 -0
  148. package/dist/{registry-DUHIPE-v.mjs → registry-DH4sc1dt.mjs} +1 -1
  149. package/dist/renderer-pid-9tJnZ_9N.mjs +1 -0
  150. package/dist/{search-defaults-D2bY-rzH.mjs → search-defaults-lYBVn_3L.mjs} +1 -1
  151. package/dist/server/plugin-api.d.mts +19 -36
  152. package/dist/server/plugin-api.mjs +1 -1
  153. package/dist/{shared-state-board-Cyg-xh_k.mjs → shared-state-board-BSjXLUV1.mjs} +1 -1
  154. package/dist/{sourcemap-D6Q1UuAp.mjs → sourcemap-Dh3Ai_ur.mjs} +1 -1
  155. package/dist/streaming-BcJ0B6ao.mjs +1 -0
  156. package/dist/transform-DOxzeWPB.mjs +103 -0
  157. package/dist/wasm-CZ_HTfKR.mjs +174 -0
  158. package/dist/{webcrack-CsLLJIs9.mjs → webcrack-C1iYG_EX.mjs} +3 -3
  159. package/dist/{workflow-CYIXtrWD.mjs → workflow-BdwQmARn.mjs} +4 -4
  160. package/package.json +16 -15
  161. package/src/native/scripts/linux/enum-windows.sh +12 -12
  162. package/src/native/scripts/macos/enum-windows.applescript +22 -22
  163. package/dist/ConsoleMonitor-Dkqc0HNi.mjs +0 -490
  164. package/dist/DOMInspector-BYY_EJ0C.mjs +0 -95
  165. package/dist/DetailedDataManager-BniBJlVv.mjs +0 -1
  166. package/dist/ExtensionManager-erMpqcLk.mjs +0 -1
  167. package/dist/MCPServer.search.handlers.domain-DVbWL1bT.mjs +0 -1
  168. package/dist/MemoryController-BaqstM5w.mjs +0 -2
  169. package/dist/PageController-D9jVkH0i.mjs +0 -1
  170. package/dist/ProcessRegistry-Hf12LlR9.mjs +0 -1
  171. package/dist/ToolCatalog-D_IKl1Hu.mjs +0 -1
  172. package/dist/ToolProbe-xsfALmN3.mjs +0 -1
  173. package/dist/ToolRegistry-B0Zs-phN.mjs +0 -1
  174. package/dist/analysis-BuR-NgX8.mjs +0 -5
  175. package/dist/betterSqlite3-CGaxz4AX.mjs +0 -1
  176. package/dist/browser-C4Le3xqA.mjs +0 -11
  177. package/dist/collector-CKO8RPK8.mjs +0 -1
  178. package/dist/constants-Cp6hBrrx.mjs +0 -1
  179. package/dist/definitions-CdWEuIkI.mjs +0 -1
  180. package/dist/definitions-OvGsfxdt.mjs +0 -1
  181. package/dist/handlers-D3iev8g1.mjs +0 -1
  182. package/dist/handlers-De5u62Ga2.mjs +0 -1
  183. package/dist/handlers-S9Ws0IGy.mjs +0 -2
  184. package/dist/handlers.impl-CD2_kOcC.mjs +0 -1
  185. package/dist/maintenance-CutEO84j.mjs +0 -1
  186. package/dist/manifest-BXry5N09.mjs +0 -1
  187. package/dist/manifest-Cq0j7GZt.mjs +0 -1
  188. package/dist/manifest-DD3rtxvV.mjs +0 -1
  189. package/dist/manifest-Dm0o3i2U.mjs +0 -1
  190. package/dist/manifest-DtEFSRaq.mjs +0 -1
  191. package/dist/manifest-zrbrpKCC.mjs +0 -1
  192. package/dist/modules-p-PUNv9r.mjs +0 -332
  193. package/dist/network-BjZ1Y-GB.mjs +0 -7
  194. package/dist/platform-C446Lf97.mjs +0 -93
  195. package/dist/process-C9f2A5zk.mjs +0 -962
  196. package/dist/proxy-CvRepxgV.mjs +0 -1
  197. package/dist/streaming-CTX58tbb.mjs +0 -1
  198. package/dist/transform-Cv9P2vVD.mjs +0 -103
  199. package/dist/wasm-DaJa8J0V.mjs +0 -174
  200. /package/dist/{CacheAdapters-CdAxBmVW.mjs → CacheAdapters-CsNtQIR8.mjs} +0 -0
  201. /package/dist/{DarwinAPI-DC4HGGLl.mjs → DarwinAPI-ZfQdpLNI.mjs} +0 -0
  202. /package/dist/{EventBus-DgciURGg.mjs → EventBus-DL8iLA09.mjs} +0 -0
  203. /package/dist/{EvidenceGraphBridge-BIfgB7HP.mjs → EvidenceGraphBridge-BtbwXsLC.mjs} +0 -0
  204. /package/dist/{FingerprintManager-N7BZqjxP.mjs → FingerprintManager-DT0EAUEo.mjs} +0 -0
  205. /package/dist/{HookGeneratorBuilders.core.generators.storage-Bf1fbrNK.mjs → HookGeneratorBuilders.core.generators.storage-DzD6dIJd.mjs} +0 -0
  206. /package/dist/{InstrumentationSession-DxXs0sCp.mjs → InstrumentationSession-D_G1ZPyd.mjs} +0 -0
  207. /package/dist/{PrerequisiteError-Bl3dK8XA.mjs → PrerequisiteError-BjCQA-gK.mjs} +0 -0
  208. /package/dist/{ReverseEvidenceGraph-B931HeoW.mjs → ReverseEvidenceGraph-BhSYYdiI.mjs} +0 -0
  209. /package/dist/{StealthVerifier-Dhbj4B4P.mjs → StealthVerifier-BmcxfwSF.mjs} +0 -0
  210. /package/dist/{VersionDetector-DMoUWyNm.mjs → VersionDetector-CHT36Az0.mjs} +0 -0
  211. /package/dist/{Win32API-Bhi5xFBe.mjs → Win32API-eUCF57l_.mjs} +0 -0
  212. /package/dist/{authorization-schema-B40obG1A.mjs → authorization-schema-BOFwSXUN.mjs} +0 -0
  213. /package/dist/{bind-helpers-BlAOQrFQ.mjs → bind-helpers-m2U8glkF.mjs} +0 -0
  214. /package/dist/{capabilities-DbYCv-HF.mjs → capabilities-CyXuKUl1.mjs} +0 -0
  215. /package/dist/{concurrency-CcK46d0h.mjs → concurrency-DCr8WQ2M.mjs} +0 -0
  216. /package/dist/{evidence-graph-bridge-B0yhGPcs.mjs → evidence-graph-bridge-CV_UdYqj.mjs} +0 -0
  217. /package/dist/{flat-target-session-CO5g78k3.mjs → flat-target-session-DvcQX7J5.mjs} +0 -0
  218. /package/dist/{formatAddress-C7j2fDlM.mjs → formatAddress-vLA_hOJt.mjs} +0 -0
  219. /package/dist/{handlers-Dv_runVv.mjs → handlers-0yKLRIfo.mjs} +0 -0
  220. /package/dist/{matchesWildcardPattern-BGqLSmEs.mjs → matchesWildcardPattern-BAG6LvX5.mjs} +0 -0
  221. /package/dist/{parse-args-Cuk7-xUt.mjs → parse-args-Bw413PlW.mjs} +0 -0
  222. /package/dist/{playwright-cdp-fallback-BwVR-_T3.mjs → playwright-cdp-fallback-DqFdx9-s.mjs} +0 -0
  223. /package/dist/{ssrf-policy-T96MR3r6.mjs → ssrf-policy-CsIJGkpd.mjs} +0 -0
  224. /package/dist/{tool-builder-CI9914Tf.mjs → tool-builder-qif8M9-K.mjs} +0 -0
  225. /package/dist/{types-DtThH00r.mjs → types-D9EiE5o9.mjs} +0 -0
  226. /package/dist/{types-CuyefmGT.mjs → types-Fz69RzbZ.mjs} +0 -0
@@ -1 +1 @@
1
- import{c as e}from"./PageController-D9jVkH0i.mjs";import{t}from"./tool-builder-CI9914Tf.mjs";const n=[t(`js_heap_search`,e=>e.desc(`Search JS heap for strings matching a pattern.`).string(`pattern`,`Pattern to search`).number(`maxResults`,`Max matches`,{default:50}).boolean(`caseSensitive`,`Case sensitive`,{default:!1}).required(`pattern`).query()),t(`tab_workflow`,e=>e.desc(`Cross-tab coordination.`).enum(`action`,[`list`,`alias_bind`,`alias_open`,`navigate`,`wait_for`,`context_set`,`context_get`,`transfer`,`clear`],`Action`).string(`alias`,`Tab alias`).string(`fromAlias`,`Source tab alias`).number(`index`,`Tab index (0-based)`).string(`url`,`URL`).string(`selector`,`CSS selector to wait for`).string(`waitForText`,`Text to wait for`).string(`key`,`Context key`).string(`value`,`Context value`).string(`expression`,`JS expression for transfer`).number(`timeoutMs`,`Timeout ms`,{default:1e4}).requiredOpenWorld(`action`))],r=[t(`page_navigate`,t=>t.desc(`Navigate the page to a URL with wait and network options.`).string(`url`,`Target URL`).enum(`waitUntil`,e,`When to consider navigation succeeded`,{default:`networkidle`}).number(`timeout`,`Navigation timeout in ms`,{default:3e4,minimum:1e3,maximum:12e4}).boolean(`enableNetworkMonitoring`,`Enable network monitoring before navigation`,{default:!1}).required(`url`).idempotent().openWorld()),t(`page_reload`,e=>e.desc(`Reload the page with optional cache bypass.`).idempotent().openWorld()),t(`page_back`,e=>e.desc(`Navigate back in browser history.`).openWorld()),t(`page_forward`,e=>e.desc(`Navigate forward in browser history.`).openWorld()),t(`page_list_frames`,e=>e.desc(`List page frames for frame targeting.`).query()),t(`page_click`,e=>e.desc(`Click a page element by CSS selector.`).string(`selector`,`CSS selector`).enum(`button`,[`left`,`right`,`middle`],`Mouse button`,{default:`left`}).number(`clickCount`,`Number of clicks`,{default:1,minimum:1,maximum:10}).number(`delay`,`Delay between mousedown and mouseup in ms`,{minimum:0,maximum:1e4}).number(`timeout`,`Click timeout in ms`,{default:1e4,minimum:1e3,maximum:12e4}).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).requiredOpenWorld(`selector`)),t(`page_type`,e=>e.desc(`Type text into an element.`).string(`selector`,`CSS selector`).string(`text`,`Text to type`).number(`delay`,`Delay between key presses in ms`,{minimum:0,maximum:1e3}).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).requiredOpenWorld(`selector`,`text`)),t(`page_upload_files`,e=>e.desc(`Upload one or more local files into an <input type="file"> element.`).string(`selector`,`CSS selector for the file input`).array(`paths`,{type:`string`},`Project-relative file paths to upload`).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).required(`selector`,`paths`).openWorld()),t(`page_select`,e=>e.desc(`Select option(s) in a <select> element.`).string(`selector`,`CSS selector`).array(`values`,{type:`string`},`Values to select`).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).required(`selector`,`values`).idempotent().openWorld()),t(`page_hover`,e=>e.desc(`Hover over an element by CSS selector.`).string(`selector`,`CSS selector`).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).required(`selector`).idempotent().openWorld()),t(`page_scroll`,e=>e.desc(`Scroll to absolute or relative coordinates.`).number(`x`,`Horizontal position`,{default:0}).number(`y`,`Vertical position`,{default:0}).idempotent()),t(`page_wait_for_selector`,e=>e.desc(`Wait for an element to appear.`).string(`selector`,`CSS selector`).number(`timeout`,`Timeout in ms`,{default:3e4,minimum:1e3,maximum:12e4}).required(`selector`).query()),t(`page_evaluate`,e=>e.desc(`Execute JavaScript in page context.`).string(`code`,`JavaScript code`).string(`script`,`Alias of code`).string(`expression`,`Alias of code`).boolean(`autoSummarize`,`Auto-summarize large results`,{default:!0}).number(`maxSize`,`Max result size in bytes before summarizing`,{default:51200,minimum:1024,maximum:10485760}).array(`fieldFilter`,{type:`string`},`Field names to strip from result (recursive)`).boolean(`stripBase64`,`Strip base64 strings from result`,{default:!1}).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).openWorld()),t(`page_screenshot`,e=>e.desc(`Capture a page or element screenshot.`).prop(`selector`,{oneOf:[{type:`string`,description:`CSS selector`},{type:`array`,items:{type:`string`},description:`Multiple CSS selectors`}],description:`Element selector(s). Omit for full page viewport.`}).object(`clip`,{x:{type:`number`,description:`Left offset`},y:{type:`number`,description:`Top offset`},width:{type:`number`,description:`Width`},height:{type:`number`,description:`Height`}},`Pixel region to capture`,{required:[`x`,`y`,`width`,`height`]}).string(`path`,`File path to save screenshot`).enum(`type`,[`png`,`jpeg`],`Image format`,{default:`png`}).number(`quality`,`Image quality 0-100 (jpeg only)`,{minimum:1,maximum:100}).boolean(`fullPage`,`Capture full scrollable page`,{default:!1}).query()),t(`get_all_scripts`,e=>e.desc(`List all scripts loaded by the page with optional source.`).boolean(`includeSource`,`Include source code`,{default:!1}).query()),t(`get_script_source`,e=>e.desc(`Retrieve source code of a script by ID or URL pattern.`).string(`scriptId`,`Script ID`).string(`url`,`Script URL (supports wildcards)`).boolean(`preview`,`Preview only (first N lines + metadata)`,{default:!1}).number(`maxLines`,`Max lines in preview`,{default:100,minimum:1,maximum:1e4}).number(`startLine`,`Start line (1-based)`,{minimum:1}).number(`endLine`,`End line (1-based)`,{minimum:1}).query())],i=[t(`console_monitor`,e=>e.desc(`Toggle console log capture (log, warn, error, info, debug).`).enum(`action`,[`enable`,`disable`],`Action`).required(`action`).idempotent()),t(`console_get_logs`,e=>e.desc(`Retrieve captured console logs with type and time filters.`).enum(`type`,[`log`,`warn`,`error`,`info`,`debug`],`Log type filter`).number(`limit`,`Max logs`).number(`since`,`Timestamp filter`).query()),t(`console_execute`,e=>e.desc(`Evaluate a JS expression in the browser console context.`).string(`expression`,`JavaScript expression`).number(`maxSize`,`Max result size in bytes before offloading (default 50KB → detailId ref)`,{default:51200,minimum:1024,maximum:104857600}).boolean(`stripBase64`,`Strip base64 strings from result`,{default:!1}).requiredOpenWorld(`expression`)),t(`page_inject_script`,e=>e.desc(`Inject JavaScript to run on every page load.`).string(`script`,`JavaScript code`).requiredOpenWorld(`script`)),t(`page_cookies`,e=>e.desc(`Manage page cookies; clear requires matching expectedCount.`).enum(`action`,[`get`,`set`,`clear`],`Action`).number(`expectedCount`,`Required for clear: must match current count`).array(`cookies`,{type:`object`,properties:{name:{type:`string`},value:{type:`string`},domain:{type:`string`},path:{type:`string`},expires:{type:`number`},httpOnly:{type:`boolean`},secure:{type:`boolean`},sameSite:{type:`string`,enum:[`Strict`,`Lax`,`None`]}},required:[`name`,`value`]},`Cookies (action=set)`).destructive().required(`action`)),t(`page_set_viewport`,e=>e.desc(`Set the browser viewport dimensions.`).number(`width`,`Width`).number(`height`,`Height`).required(`width`,`height`).idempotent()),t(`page_emulate_device`,e=>e.desc(`Emulate a mobile device profile.`).string(`device`,`Device name`).required(`device`).idempotent()),t(`page_local_storage`,e=>e.desc(`Read or write localStorage entries for the current origin.`).enum(`action`,[`get`,`set`],`Action`).string(`key`,`Key`).string(`value`,`Value`).required(`action`)),t(`page_press_key`,e=>e.desc(`Simulate a key press by name.`).string(`key`,`Key name`).requiredOpenWorld(`key`))],a=[t(`get_detailed_data`,e=>e.desc(`Retrieve large data by detailId.`).string(`detailId`,`Detail ID from previous response`).string(`path`,`Path to specific nested data`).required(`detailId`).query()),t(`browser_launch`,e=>e.desc(`Launch Chromium/Camoufox or connect to a running browser.`).enum(`driver`,[`chrome`,`camoufox`],`Browser driver`,{default:`chrome`}).boolean(`headless`,`Run headless`,{default:!1}).enum(`os`,[`windows`,`macos`,`linux`],`OS fingerprint (camoufox)`,{default:`windows`}).enum(`mode`,[`launch`,`connect`],`Launch or connect`,{default:`launch`}).string(`browserURL`,`Browser debug endpoint URL`).string(`wsEndpoint`,`WebSocket endpoint`).boolean(`autoConnect`,`Auto-detect local Chrome debug WebSocket`,{default:!1}).enum(`channel`,[`stable`,`beta`,`dev`,`canary`],`Chrome channel`,{default:`stable`}).string(`userDataDir`,`Chrome profile directory`).array(`args`,{type:`string`},`Extra Chrome launch args`).boolean(`enableV8NativesSyntax`,`Enable V8 native syntax for launched Chrome`,{default:!0}).boolean(`geoip`,`Auto-resolve GeoIP (camoufox)`,{default:!1}).boolean(`humanize`,`Humanize cursor (camoufox)`,{default:!1}).string(`proxy`,`Proxy URL (camoufox)`).boolean(`blockImages`,`Block images (camoufox)`,{default:!1}).boolean(`blockWebrtc`,`Block WebRTC (camoufox)`,{default:!1}).boolean(`blockWebgl`,`Block WebGL (camoufox)`,{default:!1}).string(`locale`,`Firefox locale (camoufox)`).array(`addons`,{type:`string`},`Firefox addons (camoufox)`).array(`fonts`,{type:`string`},`Custom fonts (camoufox)`).array(`excludeAddons`,{type:`string`},`Addons to exclude (camoufox)`).boolean(`customFontsOnly`,`Only use custom fonts (camoufox)`,{default:!1}).object(`screen`,{width:{type:`number`},height:{type:`number`}},`Screen resolution (camoufox)`).object(`window`,{width:{type:`number`},height:{type:`number`}},`Window size (camoufox)`).prop(`fingerprint`,{type:`object`,description:`Pre-generated fingerprint (camoufox)`,additionalProperties:!0}).prop(`webglConfig`,{type:`object`,description:`WebGL config (camoufox)`,additionalProperties:!0}).prop(`firefoxUserPrefs`,{type:`object`,description:`Firefox about:config overrides (camoufox)`,additionalProperties:!0}).boolean(`mainWorldEval`,`Main world eval (camoufox)`,{default:!0}).openWorld()),t(`camoufox_server`,e=>e.desc(`Start, close, or check status of a Camoufox anti-detect server.`).enum(`action`,[`launch`,`close`,`status`],`Action`).number(`port`,`Listen port (launch)`).string(`ws_path`,`WebSocket path (launch)`).enum(`os`,[`windows`,`macos`,`linux`],`OS fingerprint (launch)`,{default:`windows`}).boolean(`headless`,`Headless (launch)`,{default:!0}).boolean(`geoip`,`GeoIP (launch)`,{default:!1}).boolean(`humanize`,`Humanize cursor (launch)`,{default:!1}).string(`proxy`,`Proxy URL (launch)`).boolean(`blockImages`,`Block images (launch)`,{default:!1}).boolean(`blockWebrtc`,`Block WebRTC (launch)`,{default:!1}).boolean(`blockWebgl`,`Block WebGL (launch)`,{default:!1}).string(`locale`,`Firefox locale (launch)`).array(`addons`,{type:`string`},`Addons (launch)`).array(`fonts`,{type:`string`},`Fonts (launch)`).array(`excludeAddons`,{type:`string`},`Excluded addons (launch)`).boolean(`customFontsOnly`,`Only custom fonts (launch)`,{default:!1}).object(`screen`,{width:{type:`number`},height:{type:`number`}},`Screen resolution (launch)`).object(`window`,{width:{type:`number`},height:{type:`number`}},`Window size (launch)`).prop(`fingerprint`,{type:`object`,description:`Pre-generated fingerprint (launch)`,additionalProperties:!0}).prop(`webglConfig`,{type:`object`,description:`WebGL config (launch)`,additionalProperties:!0}).prop(`firefoxUserPrefs`,{type:`object`,description:`Firefox about:config overrides (launch)`,additionalProperties:!0}).boolean(`mainWorldEval`,`Main world eval (launch)`,{default:!0}).boolean(`enableCache`,`Enable cache (launch)`,{default:!1}).required(`action`).destructive()),t(`browser_attach`,e=>e.desc(`Connect to a running browser.`).string(`browserURL`,`Debug endpoint URL`).string(`wsEndpoint`,`WebSocket URL`).boolean(`autoConnect`,`Auto-detect local Chrome debug WebSocket`,{default:!1}).enum(`channel`,[`stable`,`beta`,`dev`,`canary`],`Chrome channel`,{default:`stable`}).string(`userDataDir`,`Chrome profile directory`).number(`pageIndex`,`Tab index to activate`,{default:0}).openWorld()),t(`browser_list_cdp_targets`,e=>e.desc(`List CDP targets with optional type/URL/title filters.`).string(`browserURL`,`Browser URL`).string(`wsEndpoint`,`WebSocket endpoint`).boolean(`autoConnect`,`Auto-detect local Chrome debug WebSocket`,{default:!1}).enum(`channel`,[`stable`,`beta`,`dev`,`canary`],`Chrome channel`,{default:`stable`}).string(`userDataDir`,`Chrome profile directory`).string(`type`,`Target type filter`).array(`types`,{type:`string`},`Target types to include`).string(`targetId`,`Exact targetId filter`).string(`urlPattern`,`URL substring filter`).string(`titlePattern`,`Title substring filter`).boolean(`attachedOnly`,`Only attached targets`,{default:!1}).boolean(`discoverOOPIF`,`Auto-discover cross-origin iframes`,{default:!0}).query().openWorld()),t(`browser_attach_cdp_target`,e=>e.desc(`Attach to a CDP target by targetId.`).string(`targetId`,`Target ID`).required(`targetId`)),t(`browser_detach_cdp_target`,e=>e.desc(`Detach the current CDP target session.`).destructive()),t(`browser_evaluate_cdp_target`,e=>e.desc(`Evaluate JS in the attached CDP target.`).string(`code`,`JavaScript code`).string(`script`,`Alias of code`).string(`expression`,`Alias of code`).boolean(`returnByValue`,`Return by value`,{default:!0}).boolean(`awaitPromise`,`Await promises`,{default:!0}).boolean(`autoSummarize`,`Summarize large results`,{default:!0}).number(`maxSize`,`Max size before summarizing`,{default:51200}).array(`fieldFilter`,{type:`string`},`Field names to strip`).boolean(`stripBase64`,`Strip base64 payloads`,{default:!1}).openWorld()),t(`browser_close`,e=>e.desc(`Close the browser and release all resources.`).destructive()),t(`browser_status`,e=>e.desc(`Report browser status: running, tab count, version.`).query())],o=[t(`captcha_detect`,e=>e.desc(`Detect CAPTCHAs on the current page.`).query()),t(`captcha_wait`,e=>e.desc(`Block until the user manually solves the CAPTCHA.`).number(`timeout`,`Timeout in ms`,{default:3e5}).query().openWorld()),t(`captcha_config`,e=>e.desc(`Configure CAPTCHA detection sensitivity and solver backend.`).boolean(`autoDetectCaptcha`,`Auto-detect after navigation`).boolean(`autoSwitchHeadless`,`Switch to headed on detection`).number(`captchaTimeout`,`Wait timeout in ms`).idempotent()),t(`stealth_inject`,e=>e.desc(`Inject anti-detection scripts to reduce bot fingerprint exposure.`).idempotent()),t(`stealth_set_user_agent`,e=>e.desc(`Set User-Agent and fingerprint.`).enum(`platform`,[`windows`,`mac`,`linux`],`Platform`,{default:`windows`}).idempotent()),t(`stealth_configure_jitter`,e=>e.desc(`Configure CDP timing jitter.`).boolean(`enabled`,`Enable`,{default:!0}).number(`minDelayMs`,`Min delay ms`,{default:20}).number(`maxDelayMs`,`Max delay ms`,{default:80}).boolean(`burstMode`,`Skip jitter for time-critical ops`,{default:!1}).idempotent()),t(`stealth_generate_fingerprint`,e=>e.desc(`Generate a browser fingerprint.`).enum(`os`,[`windows`,`macos`,`linux`],`Target OS`).enum(`browser`,[`chrome`,`firefox`],`Target browser`,{default:`chrome`}).string(`locale`,`Locale`,{default:`en-US`})),t(`stealth_verify`,e=>e.desc(`Run anti-detection checks.`).query()),t(`browser_list_tabs`,e=>e.desc(`List open browser tabs with URLs and titles.`).string(`browserURL`,`Browser URL`).string(`wsEndpoint`,`WebSocket endpoint`).boolean(`autoConnect`,`Auto-detect Chrome debug WebSocket`,{default:!1}).enum(`channel`,[`stable`,`beta`,`dev`,`canary`],`Chrome channel`,{default:`stable`}).string(`userDataDir`,`Chrome profile directory`).query().openWorld()),t(`browser_select_tab`,e=>e.desc(`Switch active tab by index, URL pattern, or title pattern.`).number(`index`,`Tab index`).string(`urlPattern`,`URL substring match`).string(`titlePattern`,`Title substring match`).idempotent()),t(`framework_state_extract`,e=>e.desc(`Extract React/Vue/Svelte/Solid component state and meta-framework info.`).enum(`framework`,[`auto`,`react`,`vue2`,`vue3`,`svelte`,`solid`,`preact`],`Framework`,{default:`auto`}).string(`selector`,`Root element CSS selector`).number(`maxDepth`,`Max traversal depth`,{default:5}).query().openWorld()),t(`indexeddb_dump`,e=>e.desc(`Export all IndexedDB databases and records for offline analysis.`).string(`database`,`Database name`).string(`store`,`Object store name`).number(`maxRecords`,`Max records per store`,{default:100}).query()),t(`camoufox_geolocation`,e=>e.desc(`Get geolocation for a locale.`).string(`locale`,`Locale string`).string(`proxy`,`Proxy URL for IP lookup`).required(`locale`).query())],s=[t(`browser_codegen_start`,e=>e.desc(`Start recording browser actions as replayable steps.`).idempotent()),t(`browser_codegen_stop`,e=>e.desc(`Stop recording browser actions and return cleaned replay steps.`).query()),t(`captcha_solver_capabilities`,e=>e.desc(`Report CAPTCHA solving mode availability.`).query()),t(`human_mouse`,e=>e.desc(`Move mouse along a Bezier curve with jitter.`).number(`fromX`,`Start X`).number(`fromY`,`Start Y`).number(`toX`,`Target X`).number(`toY`,`Target Y`).string(`selector`,`CSS selector (alternative to toX/toY)`).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).number(`durationMs`,`Duration ms`,{default:600}).number(`steps`,`Intermediate points`,{default:24}).number(`jitterPx`,`Max jitter px`,{default:1.5}).enum(`curve`,[`ease`,`linear`,`ease-in`,`ease-out`],`Speed curve`,{default:`ease`}).boolean(`click`,`Click at destination`,{default:!1}).openWorld()),t(`human_scroll`,e=>e.desc(`Scroll with randomized speed and pauses to mimic human behavior.`).number(`distance`,`Distance px`,{default:500}).enum(`direction`,[`up`,`down`,`left`,`right`],`Direction`,{default:`down`}).number(`durationMs`,`Duration ms`,{default:1500}).number(`segments`,`Segments`,{default:8}).number(`pauseMs`,`Pause between segments ms`,{default:80}).number(`jitter`,`Variation factor 0-1`,{default:.3}).string(`selector`,`Scrollable container selector`).openWorld()),t(`human_typing`,e=>e.desc(`Type text with human-like speed and occasional typos.`).string(`selector`,`CSS selector`).string(`text`,`Text to type`).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).number(`wpm`,`Words per minute`,{default:90}).number(`errorRate`,`Typo probability per char`,{default:.02}).number(`correctDelayMs`,`Delay before correcting typo ms`,{default:200}).boolean(`clearFirst`,`Clear existing value first`,{default:!1}).requiredOpenWorld(`selector`,`text`)),t(`captcha_vision_solve`,e=>e.desc(`Solve a CAPTCHA with manual flow or a configured external service.`).enum(`mode`,[`external_service`,`manual`],`Solver mode`).string(`provider`,`External solver provider`).string(`apiKey`,`API key`).enum(`challengeType`,[`image`,`widget`,`browser_check`,`auto`],`Challenge type`,{default:`auto`}).string(`typeHint`,`Legacy alias for challengeType`).string(`siteKey`,`Widget site key`).string(`pageUrl`,`Page URL`).number(`timeoutMs`,`Timeout ms`,{default:18e4}).number(`maxRetries`,`Max retries`,{default:2}).openWorld()),t(`widget_challenge_solve`,e=>e.desc(`Solve a widget challenge with hook, manual, or configured external service.`).string(`siteKey`,`Widget site key`).string(`pageUrl`,`Page URL`).enum(`mode`,[`external_service`,`hook`,`manual`],`Solving mode`).string(`provider`,`External solver provider`).string(`apiKey`,`API key`).number(`timeoutMs`,`Timeout ms`,{default:12e4}).boolean(`injectToken`,`Auto-inject token`,{default:!0}).openWorld())],c=[t(`browser_jsdom_parse`,e=>e.desc(`Parse HTML into an in-memory JSDOM session. No browser needed.`).string(`html`,`HTML source`).string(`url`,`Document URL`).string(`contentType`,`Content-Type`).enum(`runScripts`,[`none`,`outside-only`,`dangerously`],`Script execution mode`,{default:`none`}).boolean(`includeNodeLocations`,`Track source offsets`,{default:!1}).boolean(`pretendToBeVisual`,`Expose rAF/matchMedia shims`,{default:!1}).string(`referrer`,`Referrer URL`).number(`storageQuotaBytes`,`Storage quota bytes`,{default:5e6}).required(`html`).query()),t(`browser_jsdom_query`,e=>e.desc(`Query a JSDOM session with a CSS selector.`).string(`sessionId`,`Session ID`).string(`selector`,`CSS selector`).number(`maxResults`,`Max matches`,{default:50}).array(`attributes`,{type:`string`},`Attribute whitelist`).boolean(`includeText`,`Include textContent`,{default:!0}).boolean(`includeHtml`,`Include outerHTML`,{default:!1}).boolean(`includeLocation`,`Include source offsets`,{default:!1}).required(`sessionId`,`selector`).query()),t(`browser_jsdom_execute`,e=>e.desc(`Evaluate JS inside a JSDOM session.`).string(`sessionId`,`Session ID`).string(`code`,`JavaScript code`).number(`timeoutMs`,`Timeout hint ms`,{default:5e3}).required(`sessionId`,`code`)),t(`browser_jsdom_serialize`,e=>e.desc(`Serialize a JSDOM session to HTML.`).string(`sessionId`,`Session ID`).string(`selector`,`CSS selector for a fragment`).boolean(`pretty`,`Pretty-print`,{default:!1}).required(`sessionId`).query()),t(`browser_jsdom_cookies`,e=>e.desc(`Manage cookies on a JSDOM session. Isolated from the attached browser.`).string(`sessionId`,`Session ID`).enum(`action`,[`get`,`set`,`clear`],`Action`,{default:`get`}).string(`url`,`URL scope`).object(`cookie`,{name:{type:`string`,description:`Name`},value:{type:`string`,description:`Value`},domain:{type:`string`,description:`Domain`},path:{type:`string`,description:`Path`},expires:{type:`string`,description:`Expiration`},httpOnly:{type:`boolean`,description:`HttpOnly`},secure:{type:`boolean`,description:`Secure`},sameSite:{type:`string`,description:`SameSite`},raw:{type:`string`,description:`Raw Set-Cookie string`}},`Cookie (action=set)`).destructive().requiredOpenWorld(`sessionId`))],l=[...a,...r,...i,...o,...s,...c];export{n,l as t};
1
+ import{c as e}from"./PageController-Dfsm1_o7.mjs";import{t}from"./tool-builder-qif8M9-K.mjs";const n=[t(`js_heap_search`,e=>e.desc(`Search JS heap for strings matching a pattern.`).string(`pattern`,`Pattern to search`).number(`maxResults`,`Max matches`,{default:50}).boolean(`caseSensitive`,`Case sensitive`,{default:!1}).required(`pattern`).query()),t(`tab_workflow`,e=>e.desc(`Cross-tab coordination.`).enum(`action`,[`list`,`alias_bind`,`alias_open`,`navigate`,`wait_for`,`context_set`,`context_get`,`transfer`,`clear`],`Action`).string(`alias`,`Tab alias`).string(`fromAlias`,`Source tab alias`).number(`index`,`Tab index (0-based)`).string(`url`,`URL`).string(`selector`,`CSS selector to wait for`).string(`waitForText`,`Text to wait for`).string(`key`,`Context key`).string(`value`,`Context value`).string(`expression`,`JS expression for transfer`).number(`timeoutMs`,`Timeout ms`,{default:1e4}).requiredOpenWorld(`action`))],r=[t(`page_navigate`,t=>t.desc(`Navigate the page to a URL with wait and network options.`).string(`url`,`Target URL`).enum(`waitUntil`,e,`When to consider navigation succeeded`,{default:`networkidle`}).number(`timeout`,`Navigation timeout in ms`,{default:3e4,minimum:1e3,maximum:12e4}).boolean(`enableNetworkMonitoring`,`Enable network monitoring before navigation`,{default:!1}).required(`url`).idempotent().openWorld()),t(`page_reload`,e=>e.desc(`Reload the page with optional cache bypass.`).idempotent().openWorld()),t(`page_back`,e=>e.desc(`Navigate back in browser history.`).openWorld()),t(`page_forward`,e=>e.desc(`Navigate forward in browser history.`).openWorld()),t(`page_list_frames`,e=>e.desc(`List page frames for frame targeting.`).query()),t(`page_click`,e=>e.desc(`Click a page element by CSS selector.`).string(`selector`,`CSS selector`).enum(`button`,[`left`,`right`,`middle`],`Mouse button`,{default:`left`}).number(`clickCount`,`Number of clicks`,{default:1,minimum:1,maximum:10}).number(`delay`,`Delay between mousedown and mouseup in ms`,{minimum:0,maximum:1e4}).number(`timeout`,`Click timeout in ms`,{default:1e4,minimum:1e3,maximum:12e4}).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).requiredOpenWorld(`selector`)),t(`page_type`,e=>e.desc(`Type text into an element.`).string(`selector`,`CSS selector`).string(`text`,`Text to type`).number(`delay`,`Delay between key presses in ms`,{minimum:0,maximum:1e3}).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).requiredOpenWorld(`selector`,`text`)),t(`page_upload_files`,e=>e.desc(`Upload one or more local files into an <input type="file"> element.`).string(`selector`,`CSS selector for the file input`).array(`paths`,{type:`string`},`Project-relative file paths to upload`).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).required(`selector`,`paths`).openWorld()),t(`page_select`,e=>e.desc(`Select option(s) in a <select> element.`).string(`selector`,`CSS selector`).array(`values`,{type:`string`},`Values to select`).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).required(`selector`,`values`).idempotent().openWorld()),t(`page_hover`,e=>e.desc(`Hover over an element by CSS selector.`).string(`selector`,`CSS selector`).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).required(`selector`).idempotent().openWorld()),t(`page_scroll`,e=>e.desc(`Scroll to absolute or relative coordinates.`).number(`x`,`Horizontal position`,{default:0}).number(`y`,`Vertical position`,{default:0}).idempotent()),t(`page_wait_for_selector`,e=>e.desc(`Wait for an element to appear.`).string(`selector`,`CSS selector`).number(`timeout`,`Timeout in ms`,{default:3e4,minimum:1e3,maximum:12e4}).required(`selector`).query()),t(`page_evaluate`,e=>e.desc(`Execute JavaScript in page context.`).string(`code`,`JavaScript code`).string(`script`,`Alias of code`).string(`expression`,`Alias of code`).boolean(`autoSummarize`,`Auto-summarize large results`,{default:!0}).number(`maxSize`,`Max result size in bytes before summarizing`,{default:51200,minimum:1024,maximum:10485760}).array(`fieldFilter`,{type:`string`},`Field names to strip from result (recursive)`).boolean(`stripBase64`,`Strip base64 strings from result`,{default:!1}).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).openWorld()),t(`page_screenshot`,e=>e.desc(`Capture a page or element screenshot.`).prop(`selector`,{oneOf:[{type:`string`,description:`CSS selector`},{type:`array`,items:{type:`string`},description:`Multiple CSS selectors`}],description:`Element selector(s). Omit for full page viewport.`}).object(`clip`,{x:{type:`number`,description:`Left offset`},y:{type:`number`,description:`Top offset`},width:{type:`number`,description:`Width`},height:{type:`number`,description:`Height`}},`Pixel region to capture`,{required:[`x`,`y`,`width`,`height`]}).string(`path`,`File path to save screenshot`).enum(`type`,[`png`,`jpeg`],`Image format`,{default:`png`}).number(`quality`,`Image quality 0-100 (jpeg only)`,{minimum:1,maximum:100}).boolean(`fullPage`,`Capture full scrollable page`,{default:!1}).query()),t(`get_all_scripts`,e=>e.desc(`List all scripts loaded by the page with optional source.`).boolean(`includeSource`,`Include source code`,{default:!1}).query()),t(`get_script_source`,e=>e.desc(`Retrieve source code of a script by ID or URL pattern.`).string(`scriptId`,`Script ID`).string(`url`,`Script URL (supports wildcards)`).boolean(`preview`,`Preview only (first N lines + metadata)`,{default:!1}).number(`maxLines`,`Max lines in preview`,{default:100,minimum:1,maximum:1e4}).number(`startLine`,`Start line (1-based)`,{minimum:1}).number(`endLine`,`End line (1-based)`,{minimum:1}).query())],i=[t(`console_monitor`,e=>e.desc(`Toggle console log capture (log, warn, error, info, debug).`).enum(`action`,[`enable`,`disable`],`Action`).required(`action`).idempotent()),t(`console_get_logs`,e=>e.desc(`Retrieve captured console logs with type and time filters.`).enum(`type`,[`log`,`warn`,`error`,`info`,`debug`],`Log type filter`).number(`limit`,`Max logs`).number(`since`,`Timestamp filter`).query()),t(`console_execute`,e=>e.desc(`Evaluate a JS expression in the browser console context.`).string(`expression`,`JavaScript expression`).number(`maxSize`,`Max result size in bytes before offloading (default 50KB → detailId ref)`,{default:51200,minimum:1024,maximum:104857600}).boolean(`stripBase64`,`Strip base64 strings from result`,{default:!1}).requiredOpenWorld(`expression`)),t(`page_inject_script`,e=>e.desc(`Inject JavaScript to run on every page load.`).string(`script`,`JavaScript code`).requiredOpenWorld(`script`)),t(`page_cookies`,e=>e.desc(`Manage page cookies; clear requires matching expectedCount.`).enum(`action`,[`get`,`set`,`clear`],`Action`).number(`expectedCount`,`Required for clear: must match current count`).array(`cookies`,{type:`object`,properties:{name:{type:`string`},value:{type:`string`},domain:{type:`string`},path:{type:`string`},expires:{type:`number`},httpOnly:{type:`boolean`},secure:{type:`boolean`},sameSite:{type:`string`,enum:[`Strict`,`Lax`,`None`]}},required:[`name`,`value`]},`Cookies (action=set)`).destructive().required(`action`)),t(`page_set_viewport`,e=>e.desc(`Set the browser viewport dimensions.`).number(`width`,`Width`).number(`height`,`Height`).required(`width`,`height`).idempotent()),t(`page_emulate_device`,e=>e.desc(`Emulate a mobile device profile.`).string(`device`,`Device name`).required(`device`).idempotent()),t(`page_local_storage`,e=>e.desc(`Read or write localStorage entries for the current origin.`).enum(`action`,[`get`,`set`],`Action`).string(`key`,`Key`).string(`value`,`Value`).required(`action`)),t(`page_press_key`,e=>e.desc(`Simulate a key press by name.`).string(`key`,`Key name`).requiredOpenWorld(`key`))],a=[t(`get_detailed_data`,e=>e.desc(`Retrieve large data by detailId.`).string(`detailId`,`Detail ID from previous response`).string(`path`,`Path to specific nested data`).required(`detailId`).query()),t(`browser_launch`,e=>e.desc(`Launch Chromium/Camoufox or connect to a running browser.`).enum(`driver`,[`chrome`,`camoufox`],`Browser driver`,{default:`chrome`}).boolean(`headless`,`Run headless`,{default:!1}).enum(`os`,[`windows`,`macos`,`linux`],`OS fingerprint (camoufox)`,{default:`windows`}).enum(`mode`,[`launch`,`connect`],`Launch or connect`,{default:`launch`}).string(`browserURL`,`Browser debug endpoint URL`).string(`wsEndpoint`,`WebSocket endpoint`).boolean(`autoConnect`,`Auto-detect local Chrome debug WebSocket`,{default:!1}).enum(`channel`,[`stable`,`beta`,`dev`,`canary`],`Chrome channel`,{default:`stable`}).string(`userDataDir`,`Chrome profile directory`).array(`args`,{type:`string`},`Extra Chrome launch args`).boolean(`enableV8NativesSyntax`,`Enable V8 native syntax for launched Chrome`,{default:!0}).boolean(`geoip`,`Auto-resolve GeoIP (camoufox)`,{default:!1}).boolean(`humanize`,`Humanize cursor (camoufox)`,{default:!1}).string(`proxy`,`Proxy URL (camoufox)`).boolean(`blockImages`,`Block images (camoufox)`,{default:!1}).boolean(`blockWebrtc`,`Block WebRTC (camoufox)`,{default:!1}).boolean(`blockWebgl`,`Block WebGL (camoufox)`,{default:!1}).string(`locale`,`Firefox locale (camoufox)`).array(`addons`,{type:`string`},`Firefox addons (camoufox)`).array(`fonts`,{type:`string`},`Custom fonts (camoufox)`).array(`excludeAddons`,{type:`string`},`Addons to exclude (camoufox)`).boolean(`customFontsOnly`,`Only use custom fonts (camoufox)`,{default:!1}).object(`screen`,{width:{type:`number`},height:{type:`number`}},`Screen resolution (camoufox)`).object(`window`,{width:{type:`number`},height:{type:`number`}},`Window size (camoufox)`).prop(`fingerprint`,{type:`object`,description:`Pre-generated fingerprint (camoufox)`,additionalProperties:!0}).prop(`webglConfig`,{type:`object`,description:`WebGL config (camoufox)`,additionalProperties:!0}).prop(`firefoxUserPrefs`,{type:`object`,description:`Firefox about:config overrides (camoufox)`,additionalProperties:!0}).boolean(`mainWorldEval`,`Main world eval (camoufox)`,{default:!0}).openWorld()),t(`camoufox_server`,e=>e.desc(`Start, close, or check status of a Camoufox anti-detect server.`).enum(`action`,[`launch`,`close`,`status`],`Action`).number(`port`,`Listen port (launch)`).string(`ws_path`,`WebSocket path (launch)`).enum(`os`,[`windows`,`macos`,`linux`],`OS fingerprint (launch)`,{default:`windows`}).boolean(`headless`,`Headless (launch)`,{default:!0}).boolean(`geoip`,`GeoIP (launch)`,{default:!1}).boolean(`humanize`,`Humanize cursor (launch)`,{default:!1}).string(`proxy`,`Proxy URL (launch)`).boolean(`blockImages`,`Block images (launch)`,{default:!1}).boolean(`blockWebrtc`,`Block WebRTC (launch)`,{default:!1}).boolean(`blockWebgl`,`Block WebGL (launch)`,{default:!1}).string(`locale`,`Firefox locale (launch)`).array(`addons`,{type:`string`},`Addons (launch)`).array(`fonts`,{type:`string`},`Fonts (launch)`).array(`excludeAddons`,{type:`string`},`Excluded addons (launch)`).boolean(`customFontsOnly`,`Only custom fonts (launch)`,{default:!1}).object(`screen`,{width:{type:`number`},height:{type:`number`}},`Screen resolution (launch)`).object(`window`,{width:{type:`number`},height:{type:`number`}},`Window size (launch)`).prop(`fingerprint`,{type:`object`,description:`Pre-generated fingerprint (launch)`,additionalProperties:!0}).prop(`webglConfig`,{type:`object`,description:`WebGL config (launch)`,additionalProperties:!0}).prop(`firefoxUserPrefs`,{type:`object`,description:`Firefox about:config overrides (launch)`,additionalProperties:!0}).boolean(`mainWorldEval`,`Main world eval (launch)`,{default:!0}).boolean(`enableCache`,`Enable cache (launch)`,{default:!1}).required(`action`).destructive()),t(`browser_attach`,e=>e.desc(`Connect to a running browser.`).string(`browserURL`,`Debug endpoint URL`).string(`wsEndpoint`,`WebSocket URL`).boolean(`autoConnect`,`Auto-detect local Chrome debug WebSocket`,{default:!1}).enum(`channel`,[`stable`,`beta`,`dev`,`canary`],`Chrome channel`,{default:`stable`}).string(`userDataDir`,`Chrome profile directory`).number(`pageIndex`,`Tab index to activate`,{default:0}).openWorld()),t(`browser_list_cdp_targets`,e=>e.desc(`List CDP targets with optional type/URL/title filters.`).string(`browserURL`,`Browser URL`).string(`wsEndpoint`,`WebSocket endpoint`).boolean(`autoConnect`,`Auto-detect local Chrome debug WebSocket`,{default:!1}).enum(`channel`,[`stable`,`beta`,`dev`,`canary`],`Chrome channel`,{default:`stable`}).string(`userDataDir`,`Chrome profile directory`).string(`type`,`Target type filter`).array(`types`,{type:`string`},`Target types to include`).string(`targetId`,`Exact targetId filter`).string(`urlPattern`,`URL substring filter`).string(`titlePattern`,`Title substring filter`).boolean(`attachedOnly`,`Only attached targets`,{default:!1}).boolean(`discoverOOPIF`,`Auto-discover cross-origin iframes`,{default:!0}).query().openWorld()),t(`browser_attach_cdp_target`,e=>e.desc(`Attach to a CDP target by targetId.`).string(`targetId`,`Target ID`).required(`targetId`)),t(`browser_detach_cdp_target`,e=>e.desc(`Detach the current CDP target session.`).destructive()),t(`browser_evaluate_cdp_target`,e=>e.desc(`Evaluate JS in the attached CDP target.`).string(`code`,`JavaScript code`).string(`script`,`Alias of code`).string(`expression`,`Alias of code`).boolean(`returnByValue`,`Return by value`,{default:!0}).boolean(`awaitPromise`,`Await promises`,{default:!0}).boolean(`autoSummarize`,`Summarize large results`,{default:!0}).number(`maxSize`,`Max size before summarizing`,{default:51200}).array(`fieldFilter`,{type:`string`},`Field names to strip`).boolean(`stripBase64`,`Strip base64 payloads`,{default:!1}).openWorld()),t(`browser_close`,e=>e.desc(`Close the browser and release all resources.`).destructive()),t(`browser_status`,e=>e.desc(`Report browser status: running, tab count, version.`).query())],o=[t(`captcha_detect`,e=>e.desc(`Detect CAPTCHAs on the current page.`).query()),t(`captcha_wait`,e=>e.desc(`Block until the user manually solves the CAPTCHA.`).number(`timeout`,`Timeout in ms`,{default:3e5}).query().openWorld()),t(`captcha_config`,e=>e.desc(`Configure CAPTCHA detection sensitivity and solver backend.`).boolean(`autoDetectCaptcha`,`Auto-detect after navigation`).boolean(`autoSwitchHeadless`,`Switch to headed on detection`).number(`captchaTimeout`,`Wait timeout in ms`).idempotent()),t(`stealth_inject`,e=>e.desc(`Inject anti-detection scripts to reduce bot fingerprint exposure.`).idempotent()),t(`stealth_set_user_agent`,e=>e.desc(`Set User-Agent and fingerprint.`).enum(`platform`,[`windows`,`mac`,`linux`],`Platform`,{default:`windows`}).idempotent()),t(`stealth_configure_jitter`,e=>e.desc(`Configure CDP timing jitter.`).boolean(`enabled`,`Enable`,{default:!0}).number(`minDelayMs`,`Min delay ms`,{default:20}).number(`maxDelayMs`,`Max delay ms`,{default:80}).boolean(`burstMode`,`Skip jitter for time-critical ops`,{default:!1}).idempotent()),t(`stealth_generate_fingerprint`,e=>e.desc(`Generate a browser fingerprint.`).enum(`os`,[`windows`,`macos`,`linux`],`Target OS`).enum(`browser`,[`chrome`,`firefox`],`Target browser`,{default:`chrome`}).string(`locale`,`Locale`,{default:`en-US`})),t(`stealth_verify`,e=>e.desc(`Run anti-detection checks.`).query()),t(`browser_list_tabs`,e=>e.desc(`List open browser tabs with URLs and titles.`).string(`browserURL`,`Browser URL`).string(`wsEndpoint`,`WebSocket endpoint`).boolean(`autoConnect`,`Auto-detect Chrome debug WebSocket`,{default:!1}).enum(`channel`,[`stable`,`beta`,`dev`,`canary`],`Chrome channel`,{default:`stable`}).string(`userDataDir`,`Chrome profile directory`).query().openWorld()),t(`browser_select_tab`,e=>e.desc(`Switch active tab by index, URL pattern, or title pattern.`).number(`index`,`Tab index`).string(`urlPattern`,`URL substring match`).string(`titlePattern`,`Title substring match`).idempotent()),t(`framework_state_extract`,e=>e.desc(`Extract React/Vue/Svelte/Solid component state and meta-framework info.`).enum(`framework`,[`auto`,`react`,`vue2`,`vue3`,`svelte`,`solid`,`preact`],`Framework`,{default:`auto`}).string(`selector`,`Root element CSS selector`).number(`maxDepth`,`Max traversal depth`,{default:5}).query().openWorld()),t(`indexeddb_dump`,e=>e.desc(`Export all IndexedDB databases and records for offline analysis.`).string(`database`,`Database name`).string(`store`,`Object store name`).number(`maxRecords`,`Max records per store`,{default:100}).query()),t(`camoufox_geolocation`,e=>e.desc(`Get geolocation for a locale.`).string(`locale`,`Locale string`).string(`proxy`,`Proxy URL for IP lookup`).required(`locale`).query())],s=[t(`browser_codegen_start`,e=>e.desc(`Start recording browser actions as replayable steps.`).idempotent()),t(`browser_codegen_stop`,e=>e.desc(`Stop recording browser actions and return cleaned replay steps.`).query()),t(`captcha_solver_capabilities`,e=>e.desc(`Report CAPTCHA solving mode availability.`).query()),t(`human_mouse`,e=>e.desc(`Move mouse along a Bezier curve with jitter.`).number(`fromX`,`Start X`).number(`fromY`,`Start Y`).number(`toX`,`Target X`).number(`toY`,`Target Y`).string(`selector`,`CSS selector (alternative to toX/toY)`).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).number(`durationMs`,`Duration ms`,{default:600}).number(`steps`,`Intermediate points`,{default:24}).number(`jitterPx`,`Max jitter px`,{default:1.5}).enum(`curve`,[`ease`,`linear`,`ease-in`,`ease-out`],`Speed curve`,{default:`ease`}).boolean(`click`,`Click at destination`,{default:!1}).openWorld()),t(`human_scroll`,e=>e.desc(`Scroll with randomized speed and pauses to mimic human behavior.`).number(`distance`,`Distance px`,{default:500}).enum(`direction`,[`up`,`down`,`left`,`right`],`Direction`,{default:`down`}).number(`durationMs`,`Duration ms`,{default:1500}).number(`segments`,`Segments`,{default:8}).number(`pauseMs`,`Pause between segments ms`,{default:80}).number(`jitter`,`Variation factor 0-1`,{default:.3}).string(`selector`,`Scrollable container selector`).openWorld()),t(`human_typing`,e=>e.desc(`Type text with human-like speed and occasional typos.`).string(`selector`,`CSS selector`).string(`text`,`Text to type`).string(`frameUrl`,`iframe URL substring`).string(`frameSelector`,`iframe CSS selector`).number(`wpm`,`Words per minute`,{default:90}).number(`errorRate`,`Typo probability per char`,{default:.02}).number(`correctDelayMs`,`Delay before correcting typo ms`,{default:200}).boolean(`clearFirst`,`Clear existing value first`,{default:!1}).requiredOpenWorld(`selector`,`text`)),t(`captcha_vision_solve`,e=>e.desc(`Solve a CAPTCHA with manual flow or a configured external service.`).enum(`mode`,[`external_service`,`manual`],`Solver mode`).string(`provider`,`External solver provider`).string(`apiKey`,`API key`).enum(`challengeType`,[`image`,`widget`,`browser_check`],`Challenge type`,{default:`image`}).string(`typeHint`,`Legacy alias for challengeType`).enum(`taskKind`,[`image`,`recaptcha_v2`,`recaptcha_v3`,`hcaptcha`,`funcaptcha`,`turnstile`],`Explicit solver task kind`).string(`siteKey`,`Widget site key`).string(`pageUrl`,`Page URL`).string(`imageBase64`,`Explicit base64 image payload`).number(`timeoutMs`,`Timeout ms`,{default:18e4}).number(`maxRetries`,`Max retries`,{default:2}).openWorld()),t(`widget_challenge_solve`,e=>e.desc(`Solve a widget challenge with hook, manual, or configured external service.`).string(`siteKey`,`Widget site key`).string(`pageUrl`,`Page URL`).enum(`mode`,[`external_service`,`hook`,`manual`],`Solving mode`).string(`provider`,`External solver provider`).string(`apiKey`,`API key`).number(`timeoutMs`,`Timeout ms`,{default:12e4}).boolean(`injectToken`,`Auto-inject token`,{default:!0}).string(`responseSelector`,`Explicit selector to receive the solved token`).string(`callbackName`,`Explicit global callback name for hook or injection flows`).openWorld())],c=[t(`browser_jsdom_parse`,e=>e.desc(`Parse HTML into an in-memory JSDOM session. No browser needed.`).string(`html`,`HTML source`).string(`url`,`Document URL`).string(`contentType`,`Content-Type`).enum(`runScripts`,[`none`,`outside-only`,`dangerously`],`Script execution mode`,{default:`none`}).boolean(`includeNodeLocations`,`Track source offsets`,{default:!1}).boolean(`pretendToBeVisual`,`Expose rAF/matchMedia shims`,{default:!1}).string(`referrer`,`Referrer URL`).number(`storageQuotaBytes`,`Storage quota bytes`,{default:5e6}).required(`html`).query()),t(`browser_jsdom_query`,e=>e.desc(`Query a JSDOM session with a CSS selector.`).string(`sessionId`,`Session ID`).string(`selector`,`CSS selector`).number(`maxResults`,`Max matches`,{default:50}).array(`attributes`,{type:`string`},`Attribute whitelist`).boolean(`includeText`,`Include textContent`,{default:!0}).boolean(`includeHtml`,`Include outerHTML`,{default:!1}).boolean(`includeLocation`,`Include source offsets`,{default:!1}).required(`sessionId`,`selector`).query()),t(`browser_jsdom_execute`,e=>e.desc(`Evaluate JS inside a JSDOM session.`).string(`sessionId`,`Session ID`).string(`code`,`JavaScript code`).number(`timeoutMs`,`Timeout hint ms`,{default:5e3}).required(`sessionId`,`code`)),t(`browser_jsdom_serialize`,e=>e.desc(`Serialize a JSDOM session to HTML.`).string(`sessionId`,`Session ID`).string(`selector`,`CSS selector for a fragment`).boolean(`pretty`,`Pretty-print`,{default:!1}).required(`sessionId`).query()),t(`browser_jsdom_cookies`,e=>e.desc(`Manage cookies on a JSDOM session. Isolated from the attached browser.`).string(`sessionId`,`Session ID`).enum(`action`,[`get`,`set`,`clear`],`Action`,{default:`get`}).string(`url`,`URL scope`).object(`cookie`,{name:{type:`string`,description:`Name`},value:{type:`string`,description:`Value`},domain:{type:`string`,description:`Domain`},path:{type:`string`,description:`Path`},expires:{type:`string`,description:`Expiration`},httpOnly:{type:`boolean`,description:`HttpOnly`},secure:{type:`boolean`,description:`Secure`},sameSite:{type:`string`,description:`SameSite`},raw:{type:`string`,description:`Raw Set-Cookie string`}},`Cookie (action=set)`).destructive().requiredOpenWorld(`sessionId`))],l=[...a,...r,...i,...o,...s,...c];export{n,l as t};
@@ -1 +1 @@
1
- import{t as e}from"./tool-builder-CI9914Tf.mjs";const t=[e(`call_graph_analyze`,e=>e.desc(`Analyze runtime function call graph from in-page traces.`).number(`maxDepth`,`Maximum stack-derived edge depth`,{default:5}).string(`filterPattern`,`Regex filter for function names`).query()),e(`script_replace_persist`,e=>e.desc(`Persistently replace matching script responses.`).string(`url`,`Script URL match pattern`).string(`replacement`,`Replacement JavaScript source`).enum(`matchType`,[`exact`,`contains`,`regex`],`URL matching strategy`,{default:`contains`}).requiredOpenWorld(`url`,`replacement`)),e(`graphql_introspect`,e=>e.desc(`Run GraphQL introspection query against a target endpoint.`).string(`endpoint`,`GraphQL endpoint URL`).prop(`headers`,{type:`object`,description:`Custom request headers`,additionalProperties:{type:`string`}}).boolean(`useBrowser`,`Use the active browser session for fetch so cookies and CSRF/app-injected headers are preserved. Set false to force a Node-side fetch.`,{default:!0}).requiredOpenWorld(`endpoint`)),e(`graphql_extract_queries`,e=>e.desc(`Extract GraphQL queries/mutations from captured network traces.`).number(`limit`,`Maximum extracted operations`,{default:50}).query()),e(`graphql_replay`,e=>e.desc(`Replay a GraphQL operation with optional variables.`).string(`endpoint`,`GraphQL endpoint URL`).string(`query`,`GraphQL query/mutation string`).prop(`variables`,{type:`object`,description:`GraphQL variables`,additionalProperties:!0}).string(`operationName`,`GraphQL operationName`).prop(`headers`,{type:`object`,description:`Custom request headers`,additionalProperties:{type:`string`}}).boolean(`useBrowser`,`Use the active browser session for fetch so cookies and CSRF/app-injected headers are preserved. Set false to force a Node-side fetch.`,{default:!0}).requiredOpenWorld(`endpoint`,`query`)),e(`graphql_enum_schema`,e=>e.desc(`Enumerate GraphQL fields from server suggestion errors with introspection fallback.`).string(`endpoint`,`GraphQL endpoint URL`).string(`typeName`,`Root type name to report`,{default:`Query`}).string(`parentType`,`Type name to probe fields on`).number(`maxDepth`,`Maximum enumeration depth`,{default:1,minimum:1,maximum:6}).number(`concurrency`,`Reserved concurrency hint for future expansion`,{default:3,minimum:1,maximum:10}).prop(`headers`,{type:`object`,description:`Custom request headers`,additionalProperties:{type:`string`}}).requiredOpenWorld(`endpoint`))];export{t};
1
+ import{t as e}from"./tool-builder-qif8M9-K.mjs";const t=[e(`call_graph_analyze`,e=>e.desc(`Analyze runtime function call graph from in-page traces.`).number(`maxDepth`,`Maximum stack-derived edge depth`,{default:5}).string(`filterPattern`,`Regex filter for function names`).query()),e(`script_replace_persist`,e=>e.desc(`Persistently replace matching script responses.`).string(`url`,`Script URL match pattern`).string(`replacement`,`Replacement JavaScript source`).enum(`matchType`,[`exact`,`contains`,`regex`],`URL matching strategy`,{default:`contains`}).requiredOpenWorld(`url`,`replacement`)),e(`graphql_introspect`,e=>e.desc(`Run GraphQL introspection query against a target endpoint.`).string(`endpoint`,`GraphQL endpoint URL`).prop(`headers`,{type:`object`,description:`Custom request headers`,additionalProperties:{type:`string`}}).boolean(`useBrowser`,`Use the active browser session for fetch so cookies and CSRF/app-injected headers are preserved. Set false to force a Node-side fetch.`,{default:!0}).requiredOpenWorld(`endpoint`)),e(`graphql_extract_queries`,e=>e.desc(`Extract GraphQL queries/mutations from captured network traces.`).number(`limit`,`Maximum extracted operations`,{default:50}).query()),e(`graphql_replay`,e=>e.desc(`Replay a GraphQL operation with optional variables.`).string(`endpoint`,`GraphQL endpoint URL`).string(`query`,`GraphQL query/mutation string`).prop(`variables`,{type:`object`,description:`GraphQL variables`,additionalProperties:!0}).string(`operationName`,`GraphQL operationName`).prop(`headers`,{type:`object`,description:`Custom request headers`,additionalProperties:{type:`string`}}).boolean(`useBrowser`,`Use the active browser session for fetch so cookies and CSRF/app-injected headers are preserved. Set false to force a Node-side fetch.`,{default:!0}).requiredOpenWorld(`endpoint`,`query`)),e(`graphql_enum_schema`,e=>e.desc(`Enumerate GraphQL fields from server suggestion errors with introspection fallback.`).string(`endpoint`,`GraphQL endpoint URL`).string(`typeName`,`Root type name to report`,{default:`Query`}).string(`parentType`,`Type name to probe fields on`).number(`maxDepth`,`Maximum enumeration depth`,{default:1,minimum:1,maximum:6}).number(`concurrency`,`Reserved concurrency hint for future expansion`,{default:3,minimum:1,maximum:10}).prop(`headers`,{type:`object`,description:`Custom request headers`,additionalProperties:{type:`string`}}).requiredOpenWorld(`endpoint`))];export{t};
@@ -1 +1 @@
1
- import{t as e}from"./tool-builder-CI9914Tf.mjs";const t=[e(`wasm_capabilities`,e=>e.desc(`Report WASM tool availability.`).query()),e(`wasm_dump`,e=>e.desc(`Dump a captured WebAssembly module from the current page.`).number(`moduleIndex`,`Index of the WASM module to dump if multiple were loaded`,{default:0}).string(`outputPath`,`Custom output file path. If omitted, auto-generates in artifacts/wasm/`)),e(`wasm_disassemble`,e=>e.desc(`Disassemble a .wasm binary to WAT text format.`).string(`inputPath`,`Path to the .wasm file to disassemble`).string(`outputPath`,`Output .wat file path. If omitted, auto-generates in artifacts/wasm/`).boolean(`foldExprs`,`Fold expressions for more compact output`,{default:!0}).required(`inputPath`)),e(`wasm_decompile`,e=>e.desc(`Decompile .wasm bytecode to readable pseudo-code with type info.`).string(`inputPath`,`Path to the .wasm file to decompile`).string(`outputPath`,`Output file path. If omitted, auto-generates in artifacts/wasm/`).required(`inputPath`)),e(`wasm_inspect_sections`,e=>e.desc(`Parse .wasm section headers: imports, exports, memory, tables, code.`).string(`inputPath`,`Path to the .wasm file to inspect`).enum(`sections`,[`headers`,`details`,`disassemble`,`all`],`What to dump: headers (section overview), details (full metadata), disassemble (bytecode), all`,{default:`details`}).required(`inputPath`)),e(`wasm_offline_run`,e=>e.desc(`Run an exported .wasm function.`).string(`inputPath`,`Path to the .wasm file`).string(`functionName`,`Name of the exported function to invoke`).array(`args`,{type:`string`},`Arguments to pass to the function (will be parsed as integers/floats)`).enum(`runtime`,[`wasmtime`,`wasmer`,`auto`],`WASM runtime to use. "auto" tries wasmtime first, then wasmer`,{default:`auto`}).number(`timeoutMs`,`Execution timeout in ms`,{default:1e4}).required(`inputPath`,`functionName`)),e(`wasm_optimize`,e=>e.desc(`Optimize a .wasm binary for size or speed.`).string(`inputPath`,`Path to the .wasm file to optimize`).string(`outputPath`,`Output optimized .wasm file path. If omitted, auto-generates in artifacts/wasm/`).enum(`level`,[`O1`,`O2`,`O3`,`O4`,`Os`,`Oz`],`Optimization level`,{default:`O2`}).required(`inputPath`)),e(`wasm_vmp_trace`,e=>e.desc(`Read captured WASM VMP import-call traces from the current page.`).number(`maxEvents`,`Maximum import call events to capture`,{default:5e3}).string(`filterModule`,`Filter by import module name`)),e(`wasm_memory_inspect`,e=>e.desc(`Inspect exported WebAssembly.Memory from the current page.`).number(`offset`,`Starting byte offset to read from`,{default:0}).number(`length`,`Number of bytes to read`,{default:256}).enum(`format`,[`hex`,`ascii`,`both`],`Output format`,{default:`both`}).string(`searchPattern`,`Search for this hex pattern or ASCII string in the memory range`)),e(`wasm_to_c`,e=>e.desc(`Transpile .wasm bytecode to C source and header files.`).string(`inputPath`,`Path to the .wasm file to convert`).string(`outputDir`,`Directory for generated .c and .h files. If omitted, uses artifacts/wasm/`).required(`inputPath`)),e(`wasm_detect_obfuscation`,e=>e.desc(`Detect WASM obfuscation: opaque predicates, control-flow flattening, bogus ops.`).string(`inputPath`,`Path to the .wasm file to analyze`).boolean(`verbose`,`Include detailed pattern evidence in output`,{default:!1}).required(`inputPath`)),e(`wasm_instrument_trace`,e=>e.desc(`Generate a JS instrumentation wrapper for a .wasm module.`).string(`inputPath`,`Path to the .wasm file to instrument`).array(`hooks`,{type:`string`,enum:[`call`,`memory`,`branch`,`loop`,`local`]},`Hook types to inject`).boolean(`allHooks`,`Inject all available hook types`,{default:!0}).string(`outputPath`,`Output JS file path. If omitted, auto-generates in artifacts/wasm/`).required(`inputPath`))];export{t};
1
+ import{t as e}from"./tool-builder-qif8M9-K.mjs";const t=[e(`wasm_capabilities`,e=>e.desc(`Report WASM tool availability.`).query()),e(`wasm_dump`,e=>e.desc(`Dump a captured WebAssembly module from the current page.`).number(`moduleIndex`,`Index of the WASM module to dump if multiple were loaded`,{default:0}).string(`outputPath`,`Custom output file path. If omitted, auto-generates in artifacts/wasm/`)),e(`wasm_disassemble`,e=>e.desc(`Disassemble a .wasm binary to WAT text format.`).string(`inputPath`,`Path to the .wasm file to disassemble`).string(`outputPath`,`Output .wat file path. If omitted, auto-generates in artifacts/wasm/`).boolean(`foldExprs`,`Fold expressions for more compact output`,{default:!0}).required(`inputPath`)),e(`wasm_decompile`,e=>e.desc(`Decompile .wasm bytecode to readable pseudo-code with type info.`).string(`inputPath`,`Path to the .wasm file to decompile`).string(`outputPath`,`Output file path. If omitted, auto-generates in artifacts/wasm/`).required(`inputPath`)),e(`wasm_inspect_sections`,e=>e.desc(`Parse .wasm section headers: imports, exports, memory, tables, code.`).string(`inputPath`,`Path to the .wasm file to inspect`).enum(`sections`,[`headers`,`details`,`disassemble`,`all`],`What to dump: headers (section overview), details (full metadata), disassemble (bytecode), all`,{default:`details`}).required(`inputPath`)),e(`wasm_offline_run`,e=>e.desc(`Run an exported .wasm function.`).string(`inputPath`,`Path to the .wasm file`).string(`functionName`,`Name of the exported function to invoke`).array(`args`,{type:`string`},`Arguments to pass to the function (will be parsed as integers/floats)`).enum(`runtime`,[`wasmtime`,`wasmer`,`auto`],`WASM runtime to use. "auto" tries wasmtime first, then wasmer`,{default:`auto`}).number(`timeoutMs`,`Execution timeout in ms`,{default:1e4}).required(`inputPath`,`functionName`)),e(`wasm_optimize`,e=>e.desc(`Optimize a .wasm binary for size or speed.`).string(`inputPath`,`Path to the .wasm file to optimize`).string(`outputPath`,`Output optimized .wasm file path. If omitted, auto-generates in artifacts/wasm/`).enum(`level`,[`O1`,`O2`,`O3`,`O4`,`Os`,`Oz`],`Optimization level`,{default:`O2`}).required(`inputPath`)),e(`wasm_vmp_trace`,e=>e.desc(`Read captured WASM VMP import-call traces from the current page.`).number(`maxEvents`,`Maximum import call events to capture`,{default:5e3}).string(`filterModule`,`Filter by import module name`)),e(`wasm_memory_inspect`,e=>e.desc(`Inspect exported WebAssembly.Memory from the current page.`).number(`offset`,`Starting byte offset to read from`,{default:0}).number(`length`,`Number of bytes to read`,{default:256}).enum(`format`,[`hex`,`ascii`,`both`],`Output format`,{default:`both`}).string(`searchPattern`,`Search for this hex pattern or ASCII string in the memory range`)),e(`wasm_to_c`,e=>e.desc(`Transpile .wasm bytecode to C source and header files.`).string(`inputPath`,`Path to the .wasm file to convert`).string(`outputDir`,`Directory for generated .c and .h files. If omitted, uses artifacts/wasm/`).required(`inputPath`)),e(`wasm_detect_obfuscation`,e=>e.desc(`Detect WASM obfuscation: opaque predicates, control-flow flattening, bogus ops.`).string(`inputPath`,`Path to the .wasm file to analyze`).boolean(`verbose`,`Include detailed pattern evidence in output`,{default:!1}).required(`inputPath`)),e(`wasm_instrument_trace`,e=>e.desc(`Generate a JS instrumentation wrapper for a .wasm module.`).string(`inputPath`,`Path to the .wasm file to instrument`).array(`hooks`,{type:`string`,enum:[`call`,`memory`,`branch`,`loop`,`local`]},`Hook types to inject`).boolean(`allHooks`,`Inject all available hook types`,{default:!0}).string(`outputPath`,`Output JS file path. If omitted, auto-generates in artifacts/wasm/`).required(`inputPath`))];export{t};
@@ -1 +1 @@
1
- import{t as e}from"./tool-builder-CI9914Tf.mjs";const t=[e(`antidebug_bypass`,e=>e.desc(`Bypass one or more anti-debug protection types. Specify types to apply; omit or use ["all"] to apply all bypasses. Types: all, debugger_statement, timing, stack_trace, console_detect.`).array(`types`,{type:`string`,enum:[`all`,`debugger_statement`,`timing`,`stack_trace`,`console_detect`]},`Bypass types to apply (default: ["all"])`).boolean(`persistent`,`Inject persistently for future documents`,{default:!0}).enum(`mode`,[`remove`,`noop`],`Debugger statement mode (for debugger_statement type)`,{default:`remove`}).number(`maxDrift`,`Max timing drift per call in ms (for timing type)`,{default:50,minimum:0,maximum:1e4}).array(`filterPatterns`,{type:`string`},`Additional stack frame patterns to filter (for stack_trace type)`)),e(`antidebug_detect_protections`,e=>e.desc(`Detect anti-debug protections in current page with bypass recommendations.`))];export{t};
1
+ import{t as e}from"./tool-builder-qif8M9-K.mjs";const t=[e(`antidebug_bypass`,e=>e.desc(`Bypass one or more anti-debug protection types. Specify types to apply; omit or use ["all"] to apply all bypasses. Types: all, debugger_statement, timing, stack_trace, console_detect.`).array(`types`,{type:`string`,enum:[`all`,`debugger_statement`,`timing`,`stack_trace`,`console_detect`]},`Bypass types to apply (default: ["all"])`).boolean(`persistent`,`Inject persistently for future documents`,{default:!0}).enum(`mode`,[`remove`,`noop`],`Debugger statement mode (for debugger_statement type)`,{default:`remove`}).number(`maxDrift`,`Max timing drift per call in ms (for timing type)`,{default:50,minimum:0,maximum:1e4}).array(`filterPatterns`,{type:`string`},`Additional stack frame patterns to filter (for stack_trace type)`)),e(`antidebug_detect_protections`,e=>e.desc(`Detect anti-debug protections in current page with bypass recommendations.`))];export{t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./tool-builder-qif8M9-K.mjs";const t=[e(`process_windows`,e=>e.desc(`Get all window handles for a process.`).number(`pid`,`Process ID to get windows for`).required(`pid`)),e(`process_check_debug_port`,e=>e.desc(`Check if a process has a debug port enabled for CDP attachment.`).number(`pid`,`Process ID to check`).required(`pid`)),e(`process_launch_debug`,e=>e.desc(`Launch an executable with remote debugging port enabled.`).string(`executablePath`,`Full path to the executable to launch`).number(`debugPort`,`Debug port to use`,{default:9222,minimum:1,maximum:65535}).array(`args`,{type:`string`},`Additional command line arguments`).required(`executablePath`)),e(`memory_read`,e=>e.desc(`Read memory from a process at a specific address. Requires elevated privileges. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`address`,`Memory address to read (hex string like "0x12345678")`).number(`size`,`Number of bytes to read`).required(`address`,`size`)),e(`memory_write`,e=>e.desc(`Write data to process memory at a given address. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`address`,`Memory address to write to (hex string like "0x12345678")`).string(`data`,`Data to write (hex string or base64)`).enum(`encoding`,[`hex`,`base64`],`Encoding of the data parameter`,{default:`hex`}).required(`address`,`data`)),e(`memory_scan`,e=>e.desc(`Scan process memory for a pattern or value. Requires elevated privileges. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`pattern`,`Pattern to search for (hex bytes like "48 8B 05" or value)`).enum(`patternType`,[`hex`,`int32`,`int64`,`float`,`double`,`string`],`Type of pattern to search`,{default:`hex`}).boolean(`suspendTarget`,`Suspend the target process during scan for a consistent memory snapshot (default: false)`,{default:!1}).required(`pattern`)),e(`memory_check_protection`,e=>e.desc(`Check memory protection flags at a specific address. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`address`,`Memory address to check (hex string like "0x12345678")`).required(`address`)),e(`memory_scan_filtered`,e=>e.desc(`Refine a previous memory scan with filtered addresses. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`pattern`,`Pattern to search for`).array(`addresses`,{type:`string`},`List of addresses to scan within (from previous scan)`).enum(`patternType`,[`hex`,`int32`,`int64`,`float`,`double`,`string`],`Type of pattern to search`,{default:`hex`}).required(`pattern`,`addresses`)),e(`memory_batch_write`,e=>e.desc(`Write multiple memory patches at once. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).array(`patches`,{type:`object`,properties:{address:{type:`string`,description:`Memory address (hex)`},data:{type:`string`,description:`Data to write`},encoding:{type:`string`,enum:[`hex`,`base64`],default:`hex`}},required:[`address`,`data`]},`Array of patches to apply`).required(`patches`)),e(`memory_dump_region`,e=>e.desc(`Dump a process memory region to a binary file for offline analysis. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`address`,`Start address (hex)`).number(`size`,`Number of bytes to dump`).string(`outputPath`,`Output file path`).required(`address`,`size`,`outputPath`)),e(`memory_list_regions`,e=>e.desc(`List all memory regions in a process with protection flags. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`)),e(`memory_audit_export`,e=>e.desc(`Export the in-memory audit trail for memory operations as JSON.`)),e(`inject_dll`,e=>e.desc(`Inject a DLL into a target process.`).number(`pid`,`Target process ID`).string(`dllPath`,`Full path to the DLL file to inject`).required(`pid`,`dllPath`)),e(`inject_shellcode`,e=>e.desc(`Allocate and execute raw shellcode in a target process.`).number(`pid`,`Target process ID`).string(`shellcode`,`Shellcode bytes (hex string or base64)`).enum(`encoding`,[`hex`,`base64`],`Encoding of shellcode`,{default:`hex`}).required(`pid`,`shellcode`)),e(`check_debug_port`,e=>e.desc(`Check if a process is being debugged using NtQueryInformationProcess (ProcessDebugPort).`).number(`pid`,`Target process ID`).required(`pid`)),e(`enumerate_modules`,e=>e.desc(`List all loaded modules (DLLs) in a process with their base addresses.`).number(`pid`,`Target process ID`).required(`pid`)),e(`electron_attach`,e=>e.desc(`Attach to an Electron CDP port and optionally evaluate in a matching page.`).number(`port`,`CDP port to connect to`,{minimum:1,maximum:65535}).string(`pageUrl`,`Optional URL substring used to pick the target page`).string(`evaluate`,`Optional JavaScript expression to evaluate in the selected page`).string(`wsEndpoint`,`Optional browser WebSocket endpoint override`))];export{t};
@@ -1 +1 @@
1
- import{t as e}from"./tool-builder-CI9914Tf.mjs";const t={type:`array`,description:`Remapping rules for unpacked bundle module paths`,items:{type:`object`,properties:{path:{type:`string`,description:`New module path when matched`},pattern:{type:`string`,description:`Match text or regex`},matchType:{type:`string`,enum:[`includes`,`regex`,`exact`],description:`How to interpret pattern`,default:`includes`},target:{type:`string`,enum:[`code`,`path`],description:`Match against source code or module path`,default:`code`}},required:[`path`,`pattern`]}};function n(e){return e.boolean(`unpack`,`Unpack webpack/browserify bundles`,{default:!0}).boolean(`unminify`,`Reformat and unminify code`,{default:!0}).boolean(`jsx`,`Decompile React.createElement to JSX`,{default:!0}).boolean(`mangle`,`Rename obfuscated identifiers`,{default:!1}).string(`outputDir`,`Directory to save deobfuscated artifacts`).boolean(`forceOutput`,`Remove outputDir before saving`,{default:!1}).boolean(`includeModuleCode`,`Include module source in bundle output`,{default:!1}).number(`maxBundleModules`,`Maximum bundle modules to return`,{default:100,minimum:1,maximum:1e4}).prop(`mappings`,t)}const r=[e(`collect_code`,e=>e.desc(`Collect JavaScript from a target website with configurable strategy.`).boolean(`includeInline`,`Include inline scripts`,{default:!0}).boolean(`includeExternal`,`Include external scripts`,{default:!0}).boolean(`includeDynamic`,`Include dynamically loaded scripts`,{default:!1}).enum(`smartMode`,[`summary`,`priority`,`incremental`,`full`],`Collection mode`,{default:`full`}).boolean(`compress`,`Enable compression`,{default:!1}).number(`maxTotalSize`,`Maximum total size in bytes`,{default:2097152,minimum:1024,maximum:10485760}).number(`maxFileSize`,`Maximum single file size in KB`,{default:500,minimum:1,maximum:102400}).array(`priorities`,{type:`string`},`Preferred URL patterns for priority mode`).boolean(`returnSummaryOnly`,`Return summary only`,{default:!1}).string(`url`,`Target URL to collect scripts from`).requiredOpenWorld(`url`)),e(`search_in_scripts`,e=>e.desc(`Search collected scripts by keyword or regex pattern.`).string(`keyword`,`Search keyword or regex pattern`).boolean(`isRegex`,`Treat keyword as regex`,{default:!1}).boolean(`caseSensitive`,`Case-sensitive search`,{default:!1}).number(`contextLines`,`Context lines around each match`,{default:3,minimum:0,maximum:50}).number(`maxMatches`,`Maximum matches`,{default:100,minimum:1,maximum:1e4}).boolean(`returnSummary`,`Return summary instead of full payload`,{default:!1}).number(`maxContextSize`,`Max response size before summary fallback`,{default:5e4,minimum:1e3,maximum:1e6}).required(`keyword`).query()),e(`extract_function_tree`,e=>e.desc(`Extract a function and its dependency tree from collected scripts.`).string(`scriptId`,`Script identifier`).string(`functionName`,`Function name to extract`).number(`maxDepth`,`Maximum dependency traversal depth`,{default:3,minimum:1,maximum:20}).number(`maxSize`,`Maximum output size in KB`,{default:500,minimum:1,maximum:10240}).boolean(`includeComments`,`Include comments in extracted source`,{default:!0}).required(`scriptId`,`functionName`)),e(`deobfuscate`,e=>n(e.desc(`Run webcrack-powered JavaScript deobfuscation with bundle unpacking.`).string(`code`,`Obfuscated JavaScript source`).enum(`engine`,[`auto`,`webcrack`],`Deobfuscation engine`,{default:`auto`}).enum(`llm`,[`gpt-4`,`claude`],`Preferred LLM for analysis`,{default:`gpt-4`}).boolean(`detectOnly`,`Detect only without transformation (webcrack engine)`,{default:!1})).required(`code`)),e(`understand_code`,e=>e.desc(`Run semantic code analysis for structure, behavior, and risks.`).string(`code`,`Source code to analyze`).prop(`context`,{type:`object`,description:`Additional contextual data`}).enum(`focus`,[`structure`,`business`,`security`,`all`],`Analysis focus`,{default:`all`}).required(`code`)),e(`detect_crypto`,e=>e.desc(`Detect cryptographic algorithms and usage patterns in source code.`).string(`code`,`Source code for crypto analysis`).required(`code`).query()),e(`manage_hooks`,e=>e.desc(`Create, inspect, and clear JavaScript runtime hooks.`).enum(`action`,[`create`,`list`,`records`,`clear`],`Hook management operation`).string(`target`,`Hook target identifier`).enum(`type`,[`function`,`xhr`,`fetch`,`websocket`,`localstorage`,`cookie`],`Hook target type`).enum(`hookAction`,[`log`,`block`,`modify`],`Hook behavior`,{default:`log`}).string(`customCode`,`Custom JavaScript hook payload`).string(`hookId`,`Hook identifier`).requiredOpenWorld(`action`)),e(`detect_obfuscation`,e=>e.desc(`Detect obfuscation techniques in JavaScript source.`).string(`code`,`Source code to inspect`).boolean(`generateReport`,`Include human-readable report`,{default:!0}).required(`code`).query()),e(`webcrack_unpack`,e=>n(e.desc(`Run webcrack bundle unpacking and return extracted module graph.`).string(`code`,`Bundled or obfuscated JavaScript source`)).required(`code`)),e(`clear_collected_data`,e=>e.desc(`Clear collected script data, caches, and in-memory indexes.`).destructive()),e(`get_collection_stats`,e=>e.desc(`Get collection, cache, and compression statistics.`).query()),e(`webpack_enumerate`,e=>e.desc(`Enumerate webpack modules in current page and search for keywords.`).string(`searchKeyword`,`Keyword to search across module exports`).boolean(`forceRequireAll`,`Force-require every module`,{default:!1}).number(`maxResults`,`Maximum matching modules`,{default:20,minimum:1,maximum:1e4}).openWorld()),e(`llm_suggest_names`,e=>e.desc(`Use LLM to suggest meaningful names for obfuscated identifiers.`).array(`identifiers`,{type:`string`},`Array of obfuscated identifier names to rename`).required(`code`,`identifiers`).readOnly()),e(`js_deobfuscate_jsvmp`,e=>e.desc(`Deobfuscate JSVMP/VM-protected JavaScript: extract VM bytecode and restore original logic.`).string(`code`,`Obfuscated JavaScript source containing VM/JSVMP patterns`).boolean(`aggressive`,`Use aggressive deobfuscation strategy`,{default:!1}).boolean(`extractInstructions`,`Extract and list VM instructions`,{default:!0}).number(`timeout`,`Deobfuscation timeout in ms`,{default:3e4,minimum:5e3,maximum:12e4}).boolean(`detectOnly`,`Only detect JSVMP without deobfuscating`,{default:!1}).required(`code`)),e(`js_deobfuscate_pipeline`,e=>e.desc(`Three-stage deobfuscation pipeline: preprocess → deobfuscate → humanize.`).string(`code`,`Obfuscated JavaScript source`).boolean(`useWebcrack`,`Apply webcrack after preprocessor stage`,{default:!0}).boolean(`aggressive`,`Enable aggressive transforms in deobfuscator stage`,{default:!1}).boolean(`humanize`,`Run humanizer stage (variable renaming)`,{default:!0}).boolean(`returnStageDetails`,`Include per-stage results in output`,{default:!1}).required(`code`)),e(`js_analyze_vm`,e=>e.desc(`Analyze JSVMP/VM interpreter: dispatch type, handler table, opcode map.`).string(`code`,`JavaScript source containing VM interpreter`).boolean(`extractBytecode`,`Attempt to extract VM bytecode`,{default:!0}).boolean(`mapOpcodes`,`Map opcodes to inferred operations`,{default:!0}).required(`code`)),e(`js_solve_constraints`,e=>e.desc(`Solve opaque predicates and constant expressions in obfuscated code.`).string(`code`,`JavaScript source with opaque predicates or constant conditions`).boolean(`replaceInPlace`,`Replace solved conditions with their constant values`,{default:!0}).number(`maxIterations`,`Maximum solving iterations`,{default:100,minimum:1,maximum:1e4}).required(`code`)),e(`analysis_ast_match`,e=>e.desc(`Match AST nodes by type and optional property filter.`).string(`code`,`JavaScript source code to search`).string(`nodeType`,`AST node type to match (e.g. CallExpression, MemberExpression, FunctionDeclaration)`).string(`filter`,`Optional property filter as JSON path=value, e.g. {"callee.name":"eval"}`).number(`maxResults`,`Maximum matches to return`,{default:50,minimum:1,maximum:500}).required(`code`,`nodeType`)),e(`analysis_deflat_control_flow`,e=>e.desc(`Flatten switch-dispatch control flow back to straight-line code.`).string(`code`,`Obfuscated JavaScript source with CFF pattern`).boolean(`removeDispatcher`,`Remove the dispatcher variable after flattening`,{default:!0}).required(`code`)),e(`analysis_decode_string_array`,e=>e.desc(`Decode literal string-array access back to strings.`).string(`code`,`JavaScript source`).boolean(`removeRotation`,`Apply simple rotation cleanup first`,{default:!0}).number(`maxReplacements`,`Maximum replacements`,{default:200,minimum:1,maximum:1e4}).required(`code`))];export{r as t};
1
+ import{t as e}from"./tool-builder-qif8M9-K.mjs";const t={type:`array`,description:`Remapping rules for unpacked bundle module paths`,items:{type:`object`,properties:{path:{type:`string`,description:`New module path when matched`},pattern:{type:`string`,description:`Match text or regex`},matchType:{type:`string`,enum:[`includes`,`regex`,`exact`],description:`How to interpret pattern`,default:`includes`},target:{type:`string`,enum:[`code`,`path`],description:`Match against source code or module path`,default:`code`}},required:[`path`,`pattern`]}};function n(e){return e.boolean(`unpack`,`Unpack webpack/browserify bundles`,{default:!0}).boolean(`unminify`,`Reformat and unminify code`,{default:!0}).boolean(`jsx`,`Decompile React.createElement to JSX`,{default:!0}).boolean(`mangle`,`Rename obfuscated identifiers`,{default:!1}).string(`outputDir`,`Directory to save deobfuscated artifacts`).boolean(`forceOutput`,`Remove outputDir before saving`,{default:!1}).boolean(`includeModuleCode`,`Include module source in bundle output`,{default:!1}).number(`maxBundleModules`,`Maximum bundle modules to return`,{default:100,minimum:1,maximum:1e4}).prop(`mappings`,t)}const r=[e(`collect_code`,e=>e.desc(`Collect JavaScript from a target website with configurable strategy.`).boolean(`includeInline`,`Include inline scripts`,{default:!0}).boolean(`includeExternal`,`Include external scripts`,{default:!0}).boolean(`includeDynamic`,`Include dynamically loaded scripts`,{default:!1}).enum(`smartMode`,[`summary`,`priority`,`incremental`,`full`],`Collection mode`,{default:`full`}).boolean(`compress`,`Enable compression`,{default:!1}).number(`maxTotalSize`,`Maximum total size in bytes`,{default:2097152,minimum:1024,maximum:10485760}).number(`maxFileSize`,`Maximum single file size in KB`,{default:500,minimum:1,maximum:102400}).array(`priorities`,{type:`string`},`Preferred URL patterns for priority mode`).boolean(`returnSummaryOnly`,`Return summary only`,{default:!1}).string(`url`,`Target URL to collect scripts from`).requiredOpenWorld(`url`)),e(`search_in_scripts`,e=>e.desc(`Search collected scripts by keyword or regex pattern.`).string(`keyword`,`Search keyword or regex pattern`).boolean(`isRegex`,`Treat keyword as regex`,{default:!1}).boolean(`caseSensitive`,`Case-sensitive search`,{default:!1}).number(`contextLines`,`Context lines around each match`,{default:3,minimum:0,maximum:50}).number(`maxMatches`,`Maximum matches`,{default:100,minimum:1,maximum:1e4}).boolean(`returnSummary`,`Return summary instead of full payload`,{default:!1}).number(`maxContextSize`,`Max response size before summary fallback`,{default:5e4,minimum:1e3,maximum:1e6}).required(`keyword`).query()),e(`extract_function_tree`,e=>e.desc(`Extract a function and its dependency tree from collected scripts.`).string(`scriptId`,`Script identifier`).string(`functionName`,`Function name to extract`).number(`maxDepth`,`Maximum dependency traversal depth`,{default:3,minimum:1,maximum:20}).number(`maxSize`,`Maximum output size in KB`,{default:500,minimum:1,maximum:10240}).boolean(`includeComments`,`Include comments in extracted source`,{default:!0}).required(`scriptId`,`functionName`)),e(`deobfuscate`,e=>n(e.desc(`Run webcrack-powered JavaScript deobfuscation with bundle unpacking.`).string(`code`,`Obfuscated JavaScript source`).enum(`engine`,[`auto`,`webcrack`],`Deobfuscation engine`,{default:`auto`}).enum(`llm`,[`gpt-4`,`claude`],`Preferred LLM for analysis`,{default:`gpt-4`}).boolean(`detectOnly`,`Detect only without transformation (webcrack engine)`,{default:!1})).required(`code`)),e(`understand_code`,e=>e.desc(`Run semantic code analysis for structure, behavior, and risks.`).string(`code`,`Source code to analyze`).prop(`context`,{type:`object`,description:`Additional contextual data`}).enum(`focus`,[`structure`,`business`,`security`,`all`],`Analysis focus`,{default:`all`}).required(`code`)),e(`detect_crypto`,e=>e.desc(`Detect cryptographic algorithms and usage patterns in source code.`).string(`code`,`Source code for crypto analysis`).required(`code`).query()),e(`manage_hooks`,e=>e.desc(`Create, inspect, and clear JavaScript runtime hooks.`).enum(`action`,[`create`,`list`,`records`,`clear`],`Hook management operation`).string(`target`,`Hook target identifier`).enum(`type`,[`function`,`xhr`,`fetch`,`websocket`,`localstorage`,`cookie`],`Hook target type`).enum(`hookAction`,[`log`,`block`,`modify`],`Hook behavior`,{default:`log`}).string(`customCode`,`Custom JavaScript hook payload`).string(`hookId`,`Hook identifier`).requiredOpenWorld(`action`)),e(`detect_obfuscation`,e=>e.desc(`Detect obfuscation techniques in JavaScript source.`).string(`code`,`Source code to inspect`).boolean(`generateReport`,`Include human-readable report`,{default:!0}).required(`code`).query()),e(`webcrack_unpack`,e=>n(e.desc(`Run webcrack bundle unpacking and return extracted module graph.`).string(`code`,`Bundled or obfuscated JavaScript source`)).required(`code`)),e(`clear_collected_data`,e=>e.desc(`Clear collected script data, caches, and in-memory indexes.`).destructive()),e(`get_collection_stats`,e=>e.desc(`Get collection, cache, and compression statistics.`).query()),e(`webpack_enumerate`,e=>e.desc(`Enumerate webpack modules in current page and search for keywords.`).string(`searchKeyword`,`Keyword to search across module exports`).boolean(`forceRequireAll`,`Force-require every module`,{default:!1}).number(`maxResults`,`Maximum matching modules`,{default:20,minimum:1,maximum:1e4}).openWorld()),e(`llm_suggest_names`,e=>e.desc(`Use LLM to suggest meaningful names for obfuscated identifiers.`).array(`identifiers`,{type:`string`},`Array of obfuscated identifier names to rename`).required(`code`,`identifiers`).readOnly()),e(`js_deobfuscate_jsvmp`,e=>e.desc(`Deobfuscate JSVMP/VM-protected JavaScript: extract VM bytecode and restore original logic.`).string(`code`,`Obfuscated JavaScript source containing VM/JSVMP patterns`).boolean(`aggressive`,`Use aggressive deobfuscation strategy`,{default:!1}).boolean(`extractInstructions`,`Extract and list VM instructions`,{default:!0}).number(`timeout`,`Deobfuscation timeout in ms`,{default:3e4,minimum:5e3,maximum:12e4}).boolean(`detectOnly`,`Only detect JSVMP without deobfuscating`,{default:!1}).required(`code`)),e(`js_deobfuscate_pipeline`,e=>e.desc(`Three-stage deobfuscation pipeline: preprocess → deobfuscate → humanize.`).string(`code`,`Obfuscated JavaScript source`).boolean(`useWebcrack`,`Apply webcrack after preprocessor stage`,{default:!0}).boolean(`aggressive`,`Enable aggressive transforms in deobfuscator stage`,{default:!1}).boolean(`humanize`,`Run humanizer stage (variable renaming)`,{default:!0}).boolean(`returnStageDetails`,`Include per-stage results in output`,{default:!1}).required(`code`)),e(`js_analyze_vm`,e=>e.desc(`Analyze JSVMP/VM interpreter: dispatch type, handler table, opcode map.`).string(`code`,`JavaScript source containing VM interpreter`).boolean(`extractBytecode`,`Attempt to extract VM bytecode`,{default:!0}).boolean(`mapOpcodes`,`Map opcodes to inferred operations`,{default:!0}).required(`code`)),e(`js_solve_constraints`,e=>e.desc(`Solve opaque predicates and constant expressions in obfuscated code.`).string(`code`,`JavaScript source with opaque predicates or constant conditions`).boolean(`replaceInPlace`,`Replace solved conditions with their constant values`,{default:!0}).number(`maxIterations`,`Maximum solving iterations`,{default:100,minimum:1,maximum:1e4}).required(`code`)),e(`analysis_ast_match`,e=>e.desc(`Match AST nodes by type and optional property filter.`).string(`code`,`JavaScript source code to search`).string(`nodeType`,`AST node type to match (e.g. CallExpression, MemberExpression, FunctionDeclaration)`).string(`filter`,`Optional property filter as JSON path=value, e.g. {"callee.name":"eval"}`).number(`maxResults`,`Maximum matches to return`,{default:50,minimum:1,maximum:500}).required(`code`,`nodeType`)),e(`analysis_deflat_control_flow`,e=>e.desc(`Flatten switch-dispatch control flow back to straight-line code.`).string(`code`,`Obfuscated JavaScript source with CFF pattern`).boolean(`removeDispatcher`,`Remove the dispatcher variable after flattening`,{default:!0}).required(`code`)),e(`analysis_decode_string_array`,e=>e.desc(`Decode literal string-array access back to strings.`).string(`code`,`JavaScript source`).boolean(`removeRotation`,`Apply simple rotation cleanup first`,{default:!0}).number(`maxReplacements`,`Maximum replacements`,{default:200,minimum:1,maximum:1e4}).required(`code`)),e(`js_symbolic_execute`,e=>e.desc(`Symbolic execution of JavaScript: explore all feasible execution paths, collect path constraints, and solve them. Best for control-flow-flattened code with complex branching.`).string(`code`,`JavaScript source to symbolically execute`).number(`maxPaths`,`Maximum paths to explore`,{default:100,minimum:1,maximum:1e3}).number(`maxDepth`,`Maximum traversal depth`,{default:50,minimum:1,maximum:200}).number(`timeout`,`Execution timeout in ms`,{default:3e4,minimum:5e3,maximum:12e4}).boolean(`enableConstraintSolving`,`Run constraint solver on collected paths`,{default:!1}).required(`code`)),e(`js_symbolic_execute_jsvmp`,e=>e.desc(`Symbolic execution of JSVMP bytecode: step through instructions symbolically to infer original logic, constraints, and confidence score. Use after js_analyze_vm to get instructions.`).prop(`instructions`,{type:`array`,description:`JSVMP instructions from js_analyze_vm (array of {opcode, operands, location})`,items:{type:`object`,properties:{opcode:{type:`string`,description:`Instruction opcode`},operands:{type:`array`,description:`Operands`},location:{type:`number`,description:`Bytecode offset`}}}}).enum(`vmType`,[`custom`,`standard`],`VM type hint`,{default:`custom`}).number(`maxSteps`,`Maximum steps to execute`,{default:1e3,minimum:100,maximum:5e4}).number(`timeout`,`Execution timeout in ms`,{default:3e4,minimum:5e3,maximum:12e4}).required(`instructions`))];export{r as t};
@@ -1 +1 @@
1
- import{t as e}from"./tool-builder-CI9914Tf.mjs";const t=[e(`create_task_handoff`,e=>e.desc(`Create an in-session task handoff.`).string(`description`,`Task description`).array(`constraints`,{type:`string`},`Constraints for the specialist`).string(`targetDomain`,`Suggested domain for the specialist`).string(`decision`,`Key design decision made in this phase`).array(`risks`,{type:`string`},`Identified risks for the specialist`).array(`nextSteps`,{type:`string`},`Concrete next actions for the specialist`).required(`description`)),e(`complete_task_handoff`,e=>e.desc(`Mark a task handoff as completed.`).string(`taskId`,`Task ID from create_task_handoff`).string(`summary`,`Concise summary of what was accomplished`).array(`keyFindings`,{type:`string`},`Key discoveries or results`).array(`artifacts`,{type:`string`},`Paths to generated artifact files`).required(`taskId`,`summary`)),e(`get_task_context`,e=>e.desc(`Read task handoff context.`).string(`taskId`,`Optional task ID to read a single handoff`).query()),e(`append_session_insight`,e=>e.desc(`Record an insight for the current session.`).string(`category`,`Insight category`).string(`content`,`The insight content`).number(`confidence`,`Confidence level 0.0-1.0`,{minimum:0,maximum:1,default:1}).required(`category`,`content`)),e(`save_page_snapshot`,e=>e.desc(`Save current page state.`).string(`label`,`Human-readable label for this snapshot`).readOnly()),e(`restore_page_snapshot`,e=>e.desc(`Restore a saved page snapshot.`).string(`snapshotId`,`Snapshot ID from save_page_snapshot`).required(`snapshotId`).idempotent()),e(`list_page_snapshots`,e=>e.desc(`List saved page snapshots.`).query())];export{t};
1
+ import{t as e}from"./tool-builder-qif8M9-K.mjs";const t=[e(`create_task_handoff`,e=>e.desc(`Create an in-session task handoff.`).string(`description`,`Task description`).array(`constraints`,{type:`string`},`Constraints for the specialist`).string(`targetDomain`,`Suggested domain for the specialist`).string(`decision`,`Key design decision made in this phase`).array(`risks`,{type:`string`},`Identified risks for the specialist`).array(`nextSteps`,{type:`string`},`Concrete next actions for the specialist`).required(`description`)),e(`complete_task_handoff`,e=>e.desc(`Mark a task handoff as completed.`).string(`taskId`,`Task ID from create_task_handoff`).string(`summary`,`Concise summary of what was accomplished`).array(`keyFindings`,{type:`string`},`Key discoveries or results`).array(`artifacts`,{type:`string`},`Paths to generated artifact files`).required(`taskId`,`summary`)),e(`get_task_context`,e=>e.desc(`Read task handoff context.`).string(`taskId`,`Optional task ID to read a single handoff`).query()),e(`append_session_insight`,e=>e.desc(`Record an insight for the current session.`).string(`category`,`Insight category`).string(`content`,`The insight content`).number(`confidence`,`Confidence level 0.0-1.0`,{minimum:0,maximum:1,default:1}).required(`category`,`content`)),e(`save_page_snapshot`,e=>e.desc(`Save current page state.`).string(`label`,`Human-readable label for this snapshot`).readOnly()),e(`restore_page_snapshot`,e=>e.desc(`Restore a saved page snapshot.`).string(`snapshotId`,`Snapshot ID from save_page_snapshot`).required(`snapshotId`).idempotent()),e(`list_page_snapshots`,e=>e.desc(`List saved page snapshots.`).query())];export{t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./tool-builder-qif8M9-K.mjs";const t=[e(`jadx_search_code`,e=>e.desc(`Read-only ripgrep-backed search over an existing jadx decompile directory. ReDoS-guarded; Node fallback.`).string(`decompileDir`,`Absolute path to an existing jadx decompile output directory. The tool does not decompile — run jadx via the binary-instrument domain first.`).string(`query`,"Search query (regex unless `literal:true`)").boolean(`literal`,"Treat `query` as a literal string, not a regex",{default:!1}).boolean(`caseInsensitive`,`Case-insensitive matching`,{default:!1}).integer(`contextLines`,`Lines of context around each match`,{default:2,minimum:0,maximum:20}).integer(`maxMatchesPerFile`,`Cap on matches recorded per file`,{minimum:1}).integer(`maxResults`,`Hard ceiling on total matches across all files`,{minimum:1}).array(`globs`,{type:`string`,description:`Glob pattern (negative globs may start with !)`},"File globs applied during enumeration. Defaults to `**/*.java`, `**/*.kt`.").required(`decompileDir`,`query`).query())];export{t};
@@ -1 +1 @@
1
- import{t as e}from"./tool-builder-CI9914Tf.mjs";const t=[`constant_fold`,`string_decrypt`,`dead_code_remove`,`control_flow_flatten`,`rename_vars`],n=[e(`ast_transform_preview`,e=>e.desc(`Preview lightweight AST-like transforms (string/regex based) and return before/after diff.`).string(`code`,`Source code to transform.`).array(`transforms`,{type:`string`,enum:t},`Ordered transform list.`).boolean(`preview`,`Whether to generate line diff output.`,{default:!0}).required(`code`,`transforms`).query()),e(`ast_transform_chain`,e=>e.desc(`Create and store an in-memory transform chain.`).string(`name`,`Chain name.`).array(`transforms`,{type:`string`,enum:t},`Ordered transform list.`).string(`description`,`Optional chain description.`).required(`name`,`transforms`)),e(`ast_transform_apply`,e=>e.desc(`Apply transforms to input code or a live page scriptId.`).string(`scriptId`,`Target script ID from page debugger context.`).string(`code`,`Direct source code input.`).string(`chainName`,`Use a saved transform chain by name.`).array(`transforms`,{type:`string`,enum:t},`Direct transform list (used when chainName is not provided).`)),e(`crypto_extract_standalone`,e=>e.desc(`Extract crypto/sign/encrypt function from current page and generate standalone runnable code.`).string(`targetFunction`,`Target function name/path, e.g. "window.sign".`).boolean(`includePolyfills`,`Include minimal runtime polyfills.`,{default:!0}).required(`targetFunction`)),e(`crypto_test_harness`,e=>e.desc(`Run extracted crypto code in worker_threads + vm sandbox and return deterministic test results.`).string(`code`,`Standalone function code.`).string(`functionName`,`Exported function name to execute.`).array(`testInputs`,{type:`string`},`Input list for test execution.`).required(`code`,`functionName`,`testInputs`).query()),e(`crypto_compare`,e=>e.desc(`Compare two crypto implementations against identical test vectors.`).string(`code1`,`Implementation A code.`).string(`code2`,`Implementation B code.`).string(`functionName`,`Function name shared by both implementations.`).array(`testInputs`,{type:`string`},`Input list for comparison.`).required(`code1`,`code2`,`functionName`,`testInputs`).query())];export{n as t};
1
+ import{t as e}from"./tool-builder-qif8M9-K.mjs";const t=[`constant_fold`,`string_decrypt`,`dead_code_remove`,`control_flow_flatten`,`rename_vars`],n=[e(`ast_transform_preview`,e=>e.desc(`Preview lightweight AST-like transforms (string/regex based) and return before/after diff.`).string(`code`,`Source code to transform.`).array(`transforms`,{type:`string`,enum:t},`Ordered transform list.`).boolean(`preview`,`Whether to generate line diff output.`,{default:!0}).required(`code`,`transforms`).query()),e(`ast_transform_chain`,e=>e.desc(`Create and store an in-memory transform chain.`).string(`name`,`Chain name.`).array(`transforms`,{type:`string`,enum:t},`Ordered transform list.`).string(`description`,`Optional chain description.`).required(`name`,`transforms`)),e(`ast_transform_apply`,e=>e.desc(`Apply transforms to input code or a live page scriptId.`).string(`scriptId`,`Target script ID from page debugger context.`).string(`code`,`Direct source code input.`).string(`chainName`,`Use a saved transform chain by name.`).array(`transforms`,{type:`string`,enum:t},`Direct transform list (used when chainName is not provided).`)),e(`crypto_extract_standalone`,e=>e.desc(`Extract crypto/sign/encrypt function from current page and generate standalone runnable code.`).string(`targetFunction`,`Target function name/path, e.g. "window.sign".`).boolean(`includePolyfills`,`Include minimal runtime polyfills.`,{default:!0}).required(`targetFunction`)),e(`crypto_test_harness`,e=>e.desc(`Run extracted crypto code in worker_threads + vm sandbox and return deterministic test results.`).string(`code`,`Standalone function code.`).string(`functionName`,`Exported function name to execute.`).array(`testInputs`,{type:`string`},`Input list for test execution.`).required(`code`,`functionName`,`testInputs`).query()),e(`crypto_compare`,e=>e.desc(`Compare two crypto implementations against identical test vectors.`).string(`code1`,`Implementation A code.`).string(`code2`,`Implementation B code.`).string(`functionName`,`Function name shared by both implementations.`).array(`testInputs`,{type:`string`},`Input list for comparison.`).required(`code1`,`code2`,`functionName`,`testInputs`).query())];export{n as t};
@@ -1 +1 @@
1
- import{t as e}from"./tool-builder-CI9914Tf.mjs";const t={type:`object`,additionalProperties:!1,properties:{allowPrivateNetwork:{type:`boolean`,description:`Allow access to private/reserved targets only when the request also matches allowedHosts or allowedCidrs.`},allowInsecureHttp:{type:`boolean`,description:`Allow non-loopback HTTP targets only when the request also matches allowedHosts or allowedCidrs.`},allowedHosts:{type:`array`,items:{type:`string`},description:`Exact hostname or host:port allowlist for the primary target (for example ["labs.example.com", "localhost:8080"]).`},allowedCidrs:{type:`array`,items:{type:`string`},description:`CIDR allowlist applied after DNS resolution (for example ["10.10.0.0/16", "192.168.1.10/32"]).`},allowedRedirectHosts:{type:`array`,items:{type:`string`},description:`Optional hostname or host:port allowlist for redirect hops. When omitted, redirects inherit allowedHosts/allowedCidrs.`}},description:`Request-level network authorization policy. Use this instead of process-wide bypasses when you need to reach a real lab target, private address, or plain HTTP service.`},n=[e(`js_bundle_search`,e=>e.desc(`Fetch a remote JS bundle and search it with named regex patterns, with caching and noise filtering.`).string(`url`,`Remote URL of the JavaScript bundle to analyze`).array(`patterns`,{type:`object`,properties:{name:{type:`string`,description:`Human-readable label for this pattern`},regex:{type:`string`,description:`JavaScript regex string`},contextBefore:{type:`number`,description:`Characters of context before match (default: 80)`},contextAfter:{type:`number`,description:`Characters of context after match (default: 80)`}},required:[`name`,`regex`]},`Named regex patterns to search for`).boolean(`cacheBundle`,`Cache the bundle for 5 minutes to avoid re-downloads`,{default:!0}).boolean(`stripNoise`,`Skip matches inside SVG path data or base64 blobs`,{default:!0}).number(`maxMatches`,`Maximum matches to return per pattern`,{default:10,minimum:1,maximum:1e3}).prop(`networkPolicy`,t).requiredOpenWorld(`url`,`patterns`)),e(`page_script_register`,e=>e.desc(`Register a named reusable JS snippet in the Script Library. Execute with page_script_run.`).string(`name`,`Unique script name (e.g. "my_extractor")`).string(`code`,'JavaScript expression/IIFE to register. Use `typeof __params__ !== "undefined" ? __params__ : {}` to safely access runtime parameters.').string(`description`,`Optional human-readable description of the script`).required(`name`,`code`)),e(`page_script_run`,e=>e.desc(`Execute a named script from the Script Library with optional runtime params (__params__).`).string(`name`,`Script name to run (built-in or registered)`).prop(`params`,{type:`object`,additionalProperties:!0,description:`Optional parameters injected as __params__ (must be JSON-serializable)`}).requiredOpenWorld(`name`)),e(`api_probe_batch`,e=>e.desc(`Batch-probe API endpoints in browser context with auto token injection and HTML skip.`).string(`baseUrl`,`Base URL prefix (e.g. "https://chat.qwen.ai") — trailing slash will be stripped`).array(`paths`,{type:`string`},`Paths to probe (e.g. ["/api/v1/users", "/api/v1/chats"])`).enum(`method`,[`GET`,`POST`,`PUT`,`DELETE`,`PATCH`,`HEAD`,`OPTIONS`],`HTTP method for all probes`,{default:`GET`}).object(`headers`,{additionalProperties:{type:`string`}},`Additional HTTP headers to include in all requests`).string(`bodyTemplate`,`JSON body string to send for POST/PUT/PATCH requests (optional)`).array(`includeBodyStatuses`,{type:`number`},`Status codes for which to include response body snippet (default: [200, 201, 204])`).number(`maxBodySnippetLength`,`Max characters per response body snippet`,{default:500,minimum:0,maximum:1e4}).boolean(`autoInjectAuth`,`Auto-inject Bearer token from localStorage (token / active_token / access_token).`,{default:!0}).prop(`networkPolicy`,t).requiredOpenWorld(`baseUrl`,`paths`)),e(`list_extension_workflows`,e=>e.desc(`List runtime-loaded extension workflows from plugins/ or workflows/ directories.`).query()),e(`run_extension_workflow`,e=>e.desc(`Execute an extension workflow by workflowId with optional config and timeout overrides.`).string(`workflowId`,`Registered extension workflow id to execute`).string(`profile`,`Optional profile label exposed to the workflow execution context`).prop(`config`,{type:`object`,additionalProperties:!0,description:`Optional config overrides read through ctx.getConfig(path, fallback)`}).prop(`nodeInputOverrides`,{type:`object`,additionalProperties:{type:`object`,additionalProperties:!0},description:`Optional shallow input overrides keyed by workflow node id`}).number(`timeoutMs`,`Optional override for total workflow timeout in milliseconds`).requiredOpenWorld(`workflowId`))];export{n as t};
1
+ import{t as e}from"./tool-builder-qif8M9-K.mjs";const t={type:`object`,additionalProperties:!1,properties:{allowPrivateNetwork:{type:`boolean`,description:`Allow access to private/reserved targets only when the request also matches allowedHosts or allowedCidrs.`},allowInsecureHttp:{type:`boolean`,description:`Allow non-loopback HTTP targets only when the request also matches allowedHosts or allowedCidrs.`},allowedHosts:{type:`array`,items:{type:`string`},description:`Exact hostname or host:port allowlist for the primary target (for example ["labs.example.com", "localhost:8080"]).`},allowedCidrs:{type:`array`,items:{type:`string`},description:`CIDR allowlist applied after DNS resolution (for example ["10.10.0.0/16", "192.168.1.10/32"]).`},allowedRedirectHosts:{type:`array`,items:{type:`string`},description:`Optional hostname or host:port allowlist for redirect hops. When omitted, redirects inherit allowedHosts/allowedCidrs.`}},description:`Request-level network authorization policy. Use this instead of process-wide bypasses when you need to reach a real lab target, private address, or plain HTTP service.`},n=[e(`js_bundle_search`,e=>e.desc(`Fetch a remote JS bundle and search it with named regex patterns, with caching and noise filtering.`).string(`url`,`Remote URL of the JavaScript bundle to analyze`).array(`patterns`,{type:`object`,properties:{name:{type:`string`,description:`Human-readable label for this pattern`},regex:{type:`string`,description:`JavaScript regex string`},contextBefore:{type:`number`,description:`Characters of context before match (default: 80)`},contextAfter:{type:`number`,description:`Characters of context after match (default: 80)`}},required:[`name`,`regex`]},`Named regex patterns to search for`).boolean(`cacheBundle`,`Cache the bundle for 5 minutes to avoid re-downloads`,{default:!0}).boolean(`stripNoise`,`Skip matches inside SVG path data or base64 blobs`,{default:!0}).number(`maxMatches`,`Maximum matches to return per pattern`,{default:10,minimum:1,maximum:1e3}).prop(`networkPolicy`,t).requiredOpenWorld(`url`,`patterns`)),e(`page_script_register`,e=>e.desc(`Register a named reusable JS snippet in the Script Library. Execute with page_script_run.`).string(`name`,`Unique script name (e.g. "my_extractor")`).string(`code`,'JavaScript expression/IIFE to register. Use `typeof __params__ !== "undefined" ? __params__ : {}` to safely access runtime parameters.').string(`description`,`Optional human-readable description of the script`).required(`name`,`code`)),e(`page_script_run`,e=>e.desc(`Execute a named script from the Script Library with optional runtime params (__params__).`).string(`name`,`Script name to run (built-in or registered)`).prop(`params`,{type:`object`,additionalProperties:!0,description:`Optional parameters injected as __params__ (must be JSON-serializable)`}).requiredOpenWorld(`name`)),e(`api_probe_batch`,e=>e.desc(`Batch-probe API endpoints in browser context with auto token injection and HTML skip.`).string(`baseUrl`,`Base URL prefix (e.g. "https://chat.qwen.ai") — trailing slash will be stripped`).array(`paths`,{type:`string`},`Paths to probe (e.g. ["/api/v1/users", "/api/v1/chats"])`).enum(`method`,[`GET`,`POST`,`PUT`,`DELETE`,`PATCH`,`HEAD`,`OPTIONS`],`HTTP method for all probes`,{default:`GET`}).object(`headers`,{additionalProperties:{type:`string`}},`Additional HTTP headers to include in all requests`).string(`bodyTemplate`,`JSON body string to send for POST/PUT/PATCH requests (optional)`).array(`includeBodyStatuses`,{type:`number`},`Status codes for which to include response body snippet (default: [200, 201, 204])`).number(`maxBodySnippetLength`,`Max characters per response body snippet`,{default:500,minimum:0,maximum:1e4}).boolean(`autoInjectAuth`,`Auto-inject Bearer token from localStorage (token / active_token / access_token).`,{default:!0}).prop(`networkPolicy`,t).requiredOpenWorld(`baseUrl`,`paths`)),e(`list_extension_workflows`,e=>e.desc(`List runtime-loaded extension workflows from plugins/ or workflows/ directories.`).query()),e(`run_extension_workflow`,e=>e.desc(`Execute an extension workflow by workflowId with optional config and timeout overrides.`).string(`workflowId`,`Registered extension workflow id to execute`).string(`profile`,`Optional profile label exposed to the workflow execution context`).prop(`config`,{type:`object`,additionalProperties:!0,description:`Optional config overrides read through ctx.getConfig(path, fallback)`}).prop(`nodeInputOverrides`,{type:`object`,additionalProperties:{type:`object`,additionalProperties:!0},description:`Optional shallow input overrides keyed by workflow node id`}).number(`timeoutMs`,`Optional override for total workflow timeout in milliseconds`).requiredOpenWorld(`workflowId`))];export{n as t};
@@ -1 +1 @@
1
- import{t as e}from"./tool-builder-CI9914Tf.mjs";const t=[e(`ai_hook`,e=>e.desc(`Manage AI hooks. Actions: inject (inject code into page), get_data (retrieve captured hook data), list (all active hooks), clear (remove hook data by id or all), toggle (enable/disable a hook), export (export data as JSON/CSV).`).enum(`action`,[`inject`,`get_data`,`list`,`clear`,`toggle`,`export`],`Operation to perform`).string(`hookId`,`Hook identifier (required for inject/get_data/toggle; optional for clear/export)`).string(`code`,`Hook code to inject (required for action=inject)`).enum(`method`,[`evaluateOnNewDocument`,`evaluate`],`Injection method (for action=inject)`,{default:`evaluate`}).boolean(`enabled`,`Enable or disable hook (required for action=toggle)`).enum(`format`,[`json`,`csv`],`Export format (for action=export)`,{default:`json`}).required(`action`))],n=[e(`hook_preset`,e=>e.desc(`Install a pre-built JavaScript hook from 20+ built-in presets (eval, atob/btoa, Proxy, Reflect, Object.defineProperty, etc.), or provide customTemplate/customTemplates to install your own reusable hook bodies. Use listPresets=true to see all available preset descriptions.`).string(`preset`,`Single preset name to install. Accepts built-in preset ids or ids provided by customTemplate/customTemplates.`).array(`presets`,{type:`string`},`List of preset names to install simultaneously. Accepts built-in ids and custom template ids.`).prop(`customTemplate`,{type:`object`,properties:{id:{type:`string`,description:`Stable preset id, for example deobfuscation-sinks`},description:{type:`string`,description:`Human-readable description for listPresets output.`},body:{type:`string`,description:`Hook body snippet inserted into the preset wrapper.`}},required:[`id`,`body`],description:`Inline custom template. body should contain the hook body inserted into the standard buildHookCode wrapper. Use {{STACK_CODE}} and {{LOG_FN}} placeholders when needed.`}).prop(`customTemplates`,{type:`array`,items:{type:`object`,properties:{id:{type:`string`},description:{type:`string`},body:{type:`string`}},required:[`id`,`body`]},description:`List of inline custom templates to register for this invocation.`}).boolean(`captureStack`,`Include call stack in captured data (has performance impact)`,{default:!1}).boolean(`logToConsole`,`Log hook events to browser console`,{default:!0}).enum(`method`,[`evaluate`,`evaluateOnNewDocument`],`Injection method: evaluate=current page, evaluateOnNewDocument=before page scripts`,{default:`evaluate`}).boolean(`listPresets`,`Set to true to list all available presets with descriptions instead of installing.`,{default:!1}))];export{n,t};
1
+ import{t as e}from"./tool-builder-qif8M9-K.mjs";const t=[e(`ai_hook`,e=>e.desc(`Manage AI hooks. Actions: inject (inject code into page), get_data (retrieve captured hook data), list (all active hooks), clear (remove hook data by id or all), toggle (enable/disable a hook), export (export data as JSON/CSV).`).enum(`action`,[`inject`,`get_data`,`list`,`clear`,`toggle`,`export`],`Operation to perform`).string(`hookId`,`Hook identifier (required for inject/get_data/toggle; optional for clear/export)`).string(`code`,`Hook code to inject (required for action=inject)`).enum(`method`,[`evaluateOnNewDocument`,`evaluate`],`Injection method (for action=inject)`,{default:`evaluate`}).boolean(`enabled`,`Enable or disable hook (required for action=toggle)`).enum(`format`,[`json`,`csv`],`Export format (for action=export)`,{default:`json`}).required(`action`))],n=[e(`hook_preset`,e=>e.desc(`Install a pre-built JavaScript hook from 20+ built-in presets (eval, atob/btoa, Proxy, Reflect, Object.defineProperty, etc.), or provide customTemplate/customTemplates to install your own reusable hook bodies. Use listPresets=true to see all available preset descriptions.`).string(`preset`,`Single preset name to install. Accepts built-in preset ids or ids provided by customTemplate/customTemplates.`).array(`presets`,{type:`string`},`List of preset names to install simultaneously. Accepts built-in ids and custom template ids.`).prop(`customTemplate`,{type:`object`,properties:{id:{type:`string`,description:`Stable preset id, for example deobfuscation-sinks`},description:{type:`string`,description:`Human-readable description for listPresets output.`},body:{type:`string`,description:`Hook body snippet inserted into the preset wrapper.`}},required:[`id`,`body`],description:`Inline custom template. body should contain the hook body inserted into the standard buildHookCode wrapper. Use {{STACK_CODE}} and {{LOG_FN}} placeholders when needed.`}).prop(`customTemplates`,{type:`array`,items:{type:`object`,properties:{id:{type:`string`},description:{type:`string`},body:{type:`string`}},required:[`id`,`body`]},description:`List of inline custom templates to register for this invocation.`}).boolean(`captureStack`,`Include call stack in captured data (has performance impact)`,{default:!1}).boolean(`logToConsole`,`Log hook events to browser console`,{default:!0}).enum(`method`,[`evaluate`,`evaluateOnNewDocument`],`Injection method: evaluate=current page, evaluateOnNewDocument=before page scripts`,{default:`evaluate`}).boolean(`listPresets`,`Set to true to list all available presets with descriptions instead of installing.`,{default:!1}))];export{n,t};
@@ -1 +1 @@
1
- import{t as e}from"./tool-builder-CI9914Tf.mjs";const t=[e(`ws_monitor`,e=>e.desc(`Enable or disable WebSocket frame capture.`).enum(`action`,[`enable`,`disable`],`Monitor action`).string(`urlFilter`,`Regex filter for WebSocket URL (action=enable)`).number(`maxFrames`,`Maximum frames in memory (action=enable, default: 1000)`,{default:1e3,minimum:1,maximum:1e5}).required(`action`).destructive()),e(`ws_get_frames`,e=>e.desc(`Get captured WebSocket frames with pagination and payload filter.`).enum(`direction`,[`sent`,`received`,`all`],`Frame direction filter`,{default:`all`}).number(`limit`,`Maximum frames to return`,{default:100,minimum:1,maximum:1e4}).number(`offset`,`Pagination offset`,{default:0,minimum:0}).string(`payloadFilter`,`Regex filter on frame payload`).readOnly()),e(`ws_get_connections`,e=>e.desc(`Get tracked WebSocket connections and frame counts.`).readOnly()),e(`sse_monitor_enable`,e=>e.desc(`Enable SSE monitoring by injecting EventSource interceptor.`).string(`urlFilter`,`Regex filter for EventSource URL`).number(`maxEvents`,`Maximum SSE events in memory`,{default:2e3,minimum:1,maximum:1e5}).boolean(`persistent`,`Survive page navigations via evaluateOnNewDocument`)),e(`sse_get_events`,e=>e.desc(`Get captured SSE events with filters and pagination.`).string(`sourceUrl`,`Filter by EventSource URL`).string(`eventType`,`Filter by SSE event type`).number(`limit`,`Maximum events`,{default:100,minimum:1,maximum:1e4}).number(`offset`,`Pagination offset`,{default:0,minimum:0}).readOnly())];export{t};
1
+ import{t as e}from"./tool-builder-qif8M9-K.mjs";const t=[e(`ws_monitor`,e=>e.desc(`Enable or disable WebSocket frame capture.`).enum(`action`,[`enable`,`disable`],`Monitor action`).string(`urlFilter`,`Regex filter for WebSocket URL (action=enable)`).number(`maxFrames`,`Maximum frames in memory (action=enable, default: 1000)`,{default:1e3,minimum:1,maximum:1e5}).required(`action`).destructive()),e(`ws_get_frames`,e=>e.desc(`Get captured WebSocket frames with pagination and payload filter.`).enum(`direction`,[`sent`,`received`,`all`],`Frame direction filter`,{default:`all`}).number(`limit`,`Maximum frames to return`,{default:100,minimum:1,maximum:1e4}).number(`offset`,`Pagination offset`,{default:0,minimum:0}).string(`payloadFilter`,`Regex filter on frame payload`).readOnly()),e(`ws_get_connections`,e=>e.desc(`Get tracked WebSocket connections and frame counts.`).readOnly()),e(`sse_monitor_enable`,e=>e.desc(`Enable SSE monitoring by injecting EventSource interceptor.`).string(`urlFilter`,`Regex filter for EventSource URL`).number(`maxEvents`,`Maximum SSE events in memory`,{default:2e3,minimum:1,maximum:1e5}).boolean(`persistent`,`Survive page navigations via evaluateOnNewDocument`)),e(`sse_get_events`,e=>e.desc(`Get captured SSE events with filters and pagination.`).string(`sourceUrl`,`Filter by EventSource URL`).string(`eventType`,`Filter by SSE event type`).number(`limit`,`Maximum events`,{default:100,minimum:1,maximum:1e4}).number(`offset`,`Pagination offset`,{default:0,minimum:0}).readOnly())];export{t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./tool-builder-qif8M9-K.mjs";const t=[e(`apk_packer_detect`,e=>e.desc("Detect Android APK packers by matching `lib/<abi>/lib*.so` filenames against user-supplied customSignatures (ReDoS-guarded regex compilation). The framework ships no built-in signature table — callers provide their own. **Does not unpack, execute, or otherwise interact with the packed payload.**").string(`apkPath`,`Absolute path to the .apk (or .aab) file to inspect`).string(`dirPath`,`Optional path to a directory containing an already-unpacked APK tree`).enum(`ruleMode`,[`append`,`prepend`,`replace`],`How customSignatures interact with the default (empty) signature table`,{default:`append`}).array(`customSignatures`,{type:`object`,properties:{name:{type:`string`,description:`Display name of the fingerprint entry`},category:{type:`string`,description:`Optional free-form category label supplied by the caller`},libPatterns:{type:`array`,items:{type:`string`},description:`lib basenames or anchored regex sources (case-insensitive; ReDoS-guarded)`},confidence:{type:`string`,enum:[`high`,`medium`,`low`],description:`Optional single-hit confidence hint (default: medium)`},notes:{type:`string`,description:`Free-form notes surfaced in list-signatures`}},required:[`name`,`libPatterns`]},`Fingerprints supplied by the caller. Compile-time and runtime ReDoS guards apply.`).query()),e(`apk_packer_list_signatures`,e=>e.desc("List the in-process signature table used by `apk_packer_detect`. Empty by default; reflects caller-managed state at request time. Optionally filter by case-insensitive category substring.").string(`category`,`Optional case-insensitive category substring filter`).query()),e(`apk_signing_block_parse`,e=>e.desc(`Read-only parser for the APK Signing Block (schemes v2/v3/v3.1/v4) plus key-rotation lineage detection and residue-block / dex-prefix / magic-offset anomaly flags. Never mutates the APK.`).string(`apkPath`,`Absolute path to the .apk file to parse`).required(`apkPath`).query())];export{t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./tool-builder-CI9914Tf.mjs";const t=[e(`debugger_lifecycle`,e=>e.desc(`Enable or disable the CDP debugger session.`).enum(`action`,[`enable`,`disable`],`Action to perform`).required(`action`).idempotent()),e(`debugger_pause`,e=>e.desc(`Pause execution at the next statement.`)),e(`debugger_resume`,e=>e.desc(`Resume execution.`)),e(`debugger_step`,e=>e.desc(`Step execution: into (enter next call), over (skip next call), out (exit current function).`).enum(`direction`,[`into`,`over`,`out`],`Step direction`).required(`direction`)),e(`breakpoint`,e=>e.desc(`Manage breakpoints: code (line/script), XHR (URL pattern), event listener, event category, and exception breakpoints.
1
+ import{t as e}from"./tool-builder-qif8M9-K.mjs";const t=[e(`debugger_lifecycle`,e=>e.desc(`Enable or disable the CDP debugger session.`).enum(`action`,[`enable`,`disable`],`Action to perform`).required(`action`).idempotent()),e(`debugger_pause`,e=>e.desc(`Pause execution at the next statement.`)),e(`debugger_resume`,e=>e.desc(`Resume execution.`)),e(`debugger_step`,e=>e.desc(`Step execution: into (enter next call), over (skip next call), out (exit current function).`).enum(`direction`,[`into`,`over`,`out`],`Step direction`).required(`direction`)),e(`breakpoint`,e=>e.desc(`Manage breakpoints: code (line/script), XHR (URL pattern), event listener, event category, and exception breakpoints.
2
2
 
3
3
  Actions:
4
4
  - set: Create a breakpoint. Type determines required params.
@@ -1 +1 @@
1
- import{t as e}from"./tool-builder-CI9914Tf.mjs";import{t}from"./authorization-schema-B40obG1A.mjs";const n=[e(`network_extract_auth`,e=>e.desc(`Extract authentication data from captured network requests.`).number(`minConfidence`,`Minimum confidence threshold 0-1`,{default:.4,minimum:0,maximum:1})),e(`network_export_har`,e=>e.desc(`Export captured network traffic as HAR.`).string(`outputPath`,`File path to write the HAR file. If omitted, returns HAR as JSON.`).boolean(`includeBodies`,`Include response bodies in the HAR (may be slow for large captures). Default: false`,{default:!1}).openWorld()),e(`network_replay_request`,e=>e.desc(`Replay a captured network request with optional changes.`).string(`requestId`,`Request ID from network_get_requests to replay`).object(`headerPatch`,{additionalProperties:{type:`string`}},`Headers to add or override (key-value pairs)`).object(`sessionProfile`,{cookies:{type:`array`,items:{type:`object`,properties:{name:{type:`string`},value:{type:`string`},domain:{type:`string`},path:{type:`string`},expires:{type:`number`},httpOnly:{type:`boolean`},secure:{type:`boolean`},sameSite:{type:`string`,enum:[`Strict`,`Lax`,`None`]}},required:[`name`,`value`]}},userAgent:{type:`string`},acceptLanguage:{type:`string`},referer:{type:`string`},clientHints:{type:`object`,properties:{"sec-ch-ua":{type:`string`},"sec-ch-ua-mobile":{type:`string`},"sec-ch-ua-platform":{type:`string`},"sec-ch-ua-full-version-list":{type:`string`}}},platform:{type:`string`},origin:{type:`string`},collectedAt:{type:`number`},ttlSec:{type:`number`}},`Inject browser cookies, User-Agent and Accept-Language from a captured session into the replay.`).string(`bodyPatch`,`Replace the entire request body with this string`).string(`methodOverride`,`Override the HTTP method`).string(`urlOverride`,`Override the request URL`).object(`authorization`,t,`Request-scoped authorization policy for private-network or insecure-HTTP replay. Use exact hosts/CIDRs instead of process-wide bypasses.`).string(`authorizationCapability`,`Base64url-encoded JSON capability for request-scoped authorization. Payload fields mirror authorization and must include requestId.`).number(`timeoutMs`,`Request timeout in milliseconds`,{default:3e4,minimum:1e3,maximum:12e4}).boolean(`dryRun`,`Preview the request without sending it`,{default:!0}).requiredOpenWorld(`requestId`)),e(`network_intercept`,e=>e.desc(`Manage network interception rules.`).enum(`action`,[`add`,`list`,`disable`],`Intercept operation`).string(`urlPattern`,`URL pattern to match`).enum(`urlPatternType`,[`glob`,`regex`],`How to interpret urlPattern`,{default:`glob`}).enum(`interceptAction`,[`continue`,`abort`,`fulfill`],`Match action`,{default:`fulfill`}).enum(`stage`,[`Request`,`Response`],`Intercept stage. Response (default) intercepts after server responds.`,{default:`Response`}).number(`responseCode`,`HTTP status code to return`,{default:200,minimum:100,maximum:599}).object(`responseHeaders`,{additionalProperties:{type:`string`}},`Custom response headers as key-value pairs.`).string(`responseBody`,`Custom response body string.`).array(`rules`,{type:`object`,properties:{urlPattern:{type:`string`},urlPatternType:{type:`string`,enum:[`glob`,`regex`]},interceptAction:{type:`string`,enum:[`continue`,`abort`,`fulfill`]},stage:{type:`string`,enum:[`Request`,`Response`]},responseCode:{type:`number`},responseHeaders:{type:`object`,additionalProperties:{type:`string`}},responseBody:{type:`string`}},required:[`urlPattern`]},`Rule objects to add`).string(`ruleId`,`Rule ID to remove`).boolean(`all`,`Remove all rules`,{default:!1}).required(`action`)),e(`network_tls_fingerprint`,e=>e.desc(`Compute TLS/HTTP fingerprint hashes for bot detection.`).enum(`mode`,[`analyze_request`,`compute_tls`,`compute_http`],`Fingerprint mode`).string(`requestId`,`Request ID to analyze`).array(`tlsVersions`,{type:`string`},`TLS version codes in order`).array(`ciphers`,{type:`string`},`Cipher suite codes in order`).array(`extensions`,{type:`string`},`Extension type codes in order`).array(`signatureAlgorithms`,{type:`string`},`Signature algorithm codes in order`).enum(`protocol`,[`tls`,`quic`,`dtls`],`Transport protocol type`,{default:`tls`}).boolean(`sni`,`Whether SNI (Server Name Indication) extension is present`,{default:!0}).string(`alpn`,`ALPN value`).array(`httpHeaders`,{type:`string`},`HTTP header names in order`).string(`userAgent`,`User-Agent value`).string(`httpMethod`,`HTTP method`,{default:`GET`}).string(`httpVersion`,`HTTP version`,{default:`1.1`}).string(`cookieHeader`,`Cookie header value`).string(`acceptLanguage`,`Accept-Language header value`).boolean(`includeAnalysis`,`Include detailed fingerprint breakdown`,{default:!0}).required(`mode`)),e(`network_bot_detect_analyze`,e=>e.desc(`Analyze captured requests for bot-detection signals.`).number(`limit`,`Maximum requests to analyze`,{default:50,minimum:1,maximum:500}).boolean(`includeDetails`,`Include per-request analysis details`,{default:!1}).query())],r=[e(`network_enable`,e=>e.desc(`Enable network request monitoring.`).boolean(`enableExceptions`,`Also capture uncaught exceptions`,{default:!0})),e(`network_disable`,e=>e.desc(`Disable network request monitoring`).destructive()),e(`network_get_status`,e=>e.desc(`Get network monitoring status.`).query()),e(`network_monitor`,e=>e.desc(`Manage network request monitoring.`).enum(`action`,[`enable`,`disable`,`status`],`Action to perform`).boolean(`enableExceptions`,`Only for enable action: Also capture uncaught exceptions`,{default:!0}).required(`action`)),e(`network_get_requests`,e=>e.desc(`Get captured network requests.`).string(`url`,`Filter by URL substring`).string(`urlRegex`,`Filter by URL regex pattern`).string(`method`,`Filter by HTTP method (GET, POST, PUT, DELETE)`).number(`sinceTimestamp`,`Only return requests after this epoch timestamp (milliseconds). Useful for incremental polling.`).string(`sinceRequestId`,`Only return requests after this requestId (exclusive). Useful for incremental retrieval.`).number(`tail`,`Return the last N requests after filtering`).number(`limit`,`Maximum number of results per page`,{default:100,minimum:1,maximum:1e3}).number(`offset`,`Skip results for pagination`,{default:0,minimum:0}).boolean(`autoEnable`,`Auto-enable network monitoring when currently disabled`,{default:!0}).boolean(`enableExceptions`,`When autoEnable=true, also enable uncaught exception monitoring`,{default:!0}).array(`fields`,{type:`string`},`Only include these fields per request (e.g. ["url","method","status"]). Reduces response size drastically.`).boolean(`deduplicateUrls`,`Deduplicate URLs by stripping query params and normalizing path segments (UUIDs/IDs → {id}). Returns unique endpoint patterns with counts instead of individual requests.`,{default:!1})),e(`network_get_response_body`,e=>e.desc(`Get the response body for a captured request.`).string(`requestId`,`Request ID (from network_get_requests)`).number(`maxSize`,`Maximum response size in bytes`,{default:1e5,minimum:1024,maximum:2e7}).boolean(`returnSummary`,`Return only size and preview instead of full body`,{default:!1}).number(`retries`,`Retry count when response body is not yet available`,{default:3,minimum:0,maximum:10}).number(`retryIntervalMs`,`Retry interval in milliseconds`,{default:500,minimum:100,maximum:1e4}).boolean(`autoEnable`,`Auto-enable network monitoring when currently disabled`,{default:!1}).boolean(`enableExceptions`,`When autoEnable=true, also enable uncaught exception monitoring`,{default:!0}).required(`requestId`)),e(`network_get_stats`,e=>e.desc(`Get network statistics.`).query()),e(`performance_get_metrics`,e=>e.desc(`Get page performance metrics.`).boolean(`includeTimeline`,`Include detailed timeline events`,{default:!1}).query()),e(`performance_coverage`,e=>e.desc(`Start or stop code coverage recording.`).enum(`action`,[`start`,`stop`],`Coverage action`).required(`action`)),e(`performance_take_heap_snapshot`,e=>e.desc(`Take a V8 heap memory snapshot`)),e(`performance_trace`,e=>e.desc(`Start or stop a Chrome performance trace.`).enum(`action`,[`start`,`stop`],`Trace action`).array(`categories`,{type:`string`},`Trace categories to capture`).boolean(`screenshots`,`Capture screenshots during tracing`,{default:!1}).string(`artifactPath`,`Custom output path`).required(`action`)),e(`profiler_cpu`,e=>e.desc(`Start or stop CPU profiling.`).enum(`action`,[`start`,`stop`],`Profiler action`).string(`artifactPath`,`Custom output path`).required(`action`)),e(`profiler_heap_sampling`,e=>e.desc(`Start or stop heap allocation sampling.`).enum(`action`,[`start`,`stop`],`Sampling action`).number(`samplingInterval`,`Sampling interval in bytes`,{default:32768,minimum:256,maximum:1048576}).string(`artifactPath`,`Custom output path`).number(`topN`,`Number of top allocators to return`,{default:20,minimum:1,maximum:100}).required(`action`))],i=[e(`console_get_exceptions`,e=>e.desc(`Get captured uncaught exceptions from the page`).string(`url`,`Filter by URL substring`).number(`limit`,`Maximum number of exceptions to return`,{default:50,minimum:1,maximum:1e3}).readOnly()),e(`console_inject`,e=>e.desc(`Inject an in-page script, XHR, fetch, or function monitor.`).enum(`type`,[`script`,`xhr`,`fetch`,`function`],`Injection type`).string(`functionName`,`Global function path to trace`).boolean(`persistent`,`Keep the injection across page navigations`,{default:!1}).required(`type`).openWorld()),e(`console_inject_fetch_interceptor`,e=>e.desc(`Inject a fetch interceptor.`).boolean(`persistent`,`Keep the injection across page navigations`,{default:!1}).openWorld()),e(`console_inject_xhr_interceptor`,e=>e.desc(`Inject an XMLHttpRequest interceptor.`).boolean(`persistent`,`Keep the injection across page navigations`,{default:!1}).openWorld()),e(`console_buffers`,e=>e.desc(`Manage injected interceptor state.`).enum(`action`,[`clear`,`reset`],`Buffer action: clear buffers or reset interceptors`).required(`action`))],a=[e(`network_traceroute`,e=>e.desc(`Run an ICMP traceroute.`).string(`target`,`Target hostname or IP address to trace route to`).number(`maxHops`,`Maximum number of hops`,{default:30,minimum:1,maximum:64}).number(`timeout`,`Per-hop timeout in milliseconds`,{default:5e3,minimum:100,maximum:3e4}).number(`packetSize`,`ICMP echo request payload size in bytes`,{default:32,minimum:8,maximum:65500}).required(`target`).query()),e(`network_icmp_probe`,e=>e.desc(`Run an ICMP echo probe.`).string(`target`,`Target hostname or IP address to probe`).number(`ttl`,`Time-to-live value`,{default:128,minimum:1,maximum:255}).number(`packetSize`,`ICMP echo request payload size in bytes`,{default:32,minimum:8,maximum:65500}).number(`timeout`,`Timeout in milliseconds`,{default:5e3,minimum:100,maximum:3e4}).required(`target`).query())],o=[e(`http_request_build`,e=>e.desc(`Build a raw HTTP/1.x request payload.`).string(`method`,`HTTP method token`).string(`target`,`Request target, such as /path, *, or an absolute-form URL`).string(`host`,`Optional Host header value to inject when addHostHeader is enabled`).object(`headers`,{additionalProperties:{type:`string`}},`Optional HTTP headers to include in the request`).string(`body`,`Optional UTF-8 request body`).enum(`httpVersion`,[`1.0`,`1.1`],`HTTP protocol version to emit`,{default:`1.1`}).boolean(`addHostHeader`,`Auto-add the Host header when host is provided`,{default:!0}).boolean(`addContentLength`,`Auto-add Content-Length when a body is present and Transfer-Encoding is absent`,{default:!0}).boolean(`addConnectionClose`,`Auto-add Connection: close when absent`,{default:!0}).requiredOpenWorld(`method`,`target`)),e(`http_plain_request`,e=>e.desc(`Send a raw HTTP request over plain TCP.`).string(`host`,`Target hostname or IP literal`).number(`port`,`TCP port to connect to. Default: 80`,{default:80,minimum:1,maximum:65535}).string(`requestText`,`Raw HTTP request text to send as UTF-8 bytes`).object(`authorization`,t,`Request-scoped authorization policy for private-network or insecure-HTTP targets. Use exact hosts/CIDRs instead of process-wide bypasses.`).number(`timeoutMs`,`Socket timeout in milliseconds`,{default:3e4,minimum:1e3,maximum:12e4}).number(`maxResponseBytes`,`Maximum number of raw response bytes to capture before truncating the exchange`,{default:512e3,minimum:1024,maximum:10485760}).requiredOpenWorld(`host`,`requestText`)),e(`http2_probe`,e=>e.desc(`Probe an HTTP/2 endpoint.`).string(`url`,`Absolute http:// or https:// URL to probe`).string(`method`,`HTTP method token to send. Default: GET`).object(`headers`,{additionalProperties:{type:`string`}},`Optional request headers to include. Header names are normalized to lowercase for HTTP/2.`).string(`body`,`Optional UTF-8 request body to send with the probe`).array(`alpnProtocols`,{type:`string`},`ALPN protocols to offer`).object(`authorization`,t,`Request-scoped authorization policy for private-network or insecure-HTTP targets. Use exact hosts/CIDRs instead of process-wide bypasses.`).number(`timeoutMs`,`Probe timeout in milliseconds`,{default:3e4,minimum:1e3,maximum:12e4}).number(`maxBodyBytes`,`Maximum number of response body bytes to capture for the snippet before truncating`,{default:32768,minimum:1024,maximum:1048576}).requiredOpenWorld(`url`)),e(`http2_frame_build`,e=>e.desc(`Build a raw HTTP/2 frame.`).string(`frameType`,`HTTP/2 frame type: DATA, SETTINGS, PING, WINDOW_UPDATE, RST_STREAM, GOAWAY, or RAW`).number(`streamId`,`Stream identifier (0 for connection-level frames). Default: 0`,{default:0,minimum:0,maximum:2147483647}).number(`flags`,`Raw flags byte (0-255). Overrides type-specific defaults when set.`,{minimum:0,maximum:255}).number(`frameTypeCode`,`Explicit frame type code for RAW frames (0-255). Required when frameType is RAW.`,{minimum:0,maximum:255}).string(`payloadHex`,`Frame payload as a hex string. Mutually exclusive with payloadText.`).string(`payloadText`,`Frame payload as a text string. Mutually exclusive with payloadHex.`).string(`payloadEncoding`,`Encoding for payloadText: utf8 or ascii. Default: utf8`).array(`settings`,{type:`object`,properties:{id:{type:`number`},value:{type:`number`}},required:[`id`,`value`]},`Array of {id, value} entries for SETTINGS frames`).boolean(`ack`,`Set the ACK flag on SETTINGS or PING frames`).string(`pingOpaqueDataHex`,`Exactly 8 bytes of opaque data for PING frames (hex string)`).number(`windowSizeIncrement`,`Window size increment for WINDOW_UPDATE frames (1 to 2^31-1)`).number(`errorCode`,`Error code for RST_STREAM or GOAWAY frames (0 to 2^32-1)`).number(`lastStreamId`,`Last stream ID for GOAWAY frames (0 to 2^31-1)`).string(`debugDataText`,`Optional debug data for GOAWAY frames`).string(`debugDataEncoding`,`Encoding for debugDataText: utf8 or ascii. Default: utf8`).requiredOpenWorld(`frameType`)),e(`dns_resolve`,e=>e.desc(`Resolve a hostname to DNS records using the system resolver.`).string(`hostname`,`Hostname to resolve (e.g. google.com)`).string(`rrType`,`DNS record type: A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, SRV, or ANY`,{default:`A`}).requiredOpenWorld(`hostname`)),e(`dns_reverse`,e=>e.desc(`Reverse DNS lookup — find hostnames for an IP address.`).string(`ip`,`IP address to reverse lookup (e.g. 8.8.8.8)`).requiredOpenWorld(`ip`)),e(`dns_probe`,e=>e.desc(`Run a DNS query and return structured status instead of throwing.`).string(`hostname`,`Hostname to query`).string(`rrType`,`DNS record type: A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, SRV, or ANY`,{default:`A`}).requiredOpenWorld(`hostname`)),e(`dns_cname_chain`,e=>e.desc(`Trace the full CNAME chain for a hostname.`).string(`hostname`,`Hostname to trace CNAME chain for`).number(`maxDepth`,`Maximum chain depth to follow. Default: 10`,{default:10,minimum:1,maximum:30}).requiredOpenWorld(`hostname`)),e(`dns_bulk_resolve`,e=>e.desc(`Resolve many hostnames concurrently with per-host status.`).array(`hostnames`,{type:`string`},`List of hostnames to resolve (max 1000)`).string(`rrType`,`DNS record type: A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, SRV, or ANY`,{default:`A`}).number(`concurrency`,`Maximum number of concurrent DNS queries. Default: 10`,{default:10,minimum:1,maximum:50}).requiredOpenWorld(`hostnames`)),e(`network_rtt_measure`,e=>e.desc(`Measure round-trip time to a target URL.`).string(`url`,`Target URL to measure RTT to`).string(`probeType`,`Probe type: tcp, tls, or http. Default: tcp`,{default:`tcp`}).number(`iterations`,`Number of probe iterations (1-50). Default: 5`,{default:5,minimum:1,maximum:50}).number(`timeoutMs`,`Per-probe timeout in milliseconds (100-30000). Default: 5000`,{default:5e3,minimum:100,maximum:3e4}).object(`authorization`,{additionalProperties:{type:`string`}},`Authorization policy for network access`).requiredOpenWorld(`url`)),e(`network_latency_stats`,e=>e.desc(`Measure repeated latency and compute percentile stats.`).string(`url`,`Target URL to measure`).enum(`probeType`,[`tcp`,`tls`,`http`],`Probe type`,{default:`http`}).number(`iterations`,`Number of probes`,{default:20,minimum:5,maximum:100}).number(`concurrency`,`Max concurrent probes`,{default:5,minimum:1,maximum:20}).number(`timeoutMs`,`Per-probe timeout ms`,{default:5e3,minimum:100,maximum:3e4}).object(`authorization`,{additionalProperties:{type:`string`}},`Authorization policy for network access`).requiredOpenWorld(`url`))],s=[...r,...i,...o,...n,...a];export{s as t};
1
+ import{t as e}from"./tool-builder-qif8M9-K.mjs";import{t}from"./authorization-schema-BOFwSXUN.mjs";const n=[e(`network_extract_auth`,e=>e.desc(`Extract authentication data from captured network requests.`).number(`minConfidence`,`Minimum confidence threshold 0-1`,{default:.4,minimum:0,maximum:1})),e(`network_export_har`,e=>e.desc(`Export captured network traffic as HAR.`).string(`outputPath`,`File path to write the HAR file. If omitted, returns HAR as JSON.`).boolean(`includeBodies`,`Include response bodies in the HAR (may be slow for large captures). Default: false`,{default:!1}).openWorld()),e(`network_replay_request`,e=>e.desc(`Replay a captured network request with optional changes.`).string(`requestId`,`Request ID from network_get_requests to replay`).object(`headerPatch`,{additionalProperties:{type:`string`}},`Headers to add or override (key-value pairs)`).object(`sessionProfile`,{cookies:{type:`array`,items:{type:`object`,properties:{name:{type:`string`},value:{type:`string`},domain:{type:`string`},path:{type:`string`},expires:{type:`number`},httpOnly:{type:`boolean`},secure:{type:`boolean`},sameSite:{type:`string`,enum:[`Strict`,`Lax`,`None`]}},required:[`name`,`value`]}},userAgent:{type:`string`},acceptLanguage:{type:`string`},referer:{type:`string`},clientHints:{type:`object`,properties:{"sec-ch-ua":{type:`string`},"sec-ch-ua-mobile":{type:`string`},"sec-ch-ua-platform":{type:`string`},"sec-ch-ua-full-version-list":{type:`string`}}},platform:{type:`string`},origin:{type:`string`},collectedAt:{type:`number`},ttlSec:{type:`number`}},`Inject browser cookies, User-Agent and Accept-Language from a captured session into the replay.`).string(`bodyPatch`,`Replace the entire request body with this string`).string(`methodOverride`,`Override the HTTP method`).string(`urlOverride`,`Override the request URL`).object(`authorization`,t,`Request-scoped authorization policy for private-network or insecure-HTTP replay. Use exact hosts/CIDRs instead of process-wide bypasses.`).string(`authorizationCapability`,`Base64url-encoded JSON capability for request-scoped authorization. Payload fields mirror authorization and must include requestId.`).number(`timeoutMs`,`Request timeout in milliseconds`,{default:3e4,minimum:1e3,maximum:12e4}).boolean(`dryRun`,`Preview the request without sending it`,{default:!0}).requiredOpenWorld(`requestId`)),e(`network_intercept`,e=>e.desc(`Manage network interception rules.`).enum(`action`,[`add`,`list`,`disable`],`Intercept operation`).string(`urlPattern`,`URL pattern to match`).enum(`urlPatternType`,[`glob`,`regex`],`How to interpret urlPattern`,{default:`glob`}).enum(`interceptAction`,[`continue`,`abort`,`fulfill`],`Match action`,{default:`fulfill`}).enum(`stage`,[`Request`,`Response`],`Intercept stage. Response (default) intercepts after server responds.`,{default:`Response`}).number(`responseCode`,`HTTP status code to return`,{default:200,minimum:100,maximum:599}).object(`responseHeaders`,{additionalProperties:{type:`string`}},`Custom response headers as key-value pairs.`).string(`responseBody`,`Custom response body string.`).array(`rules`,{type:`object`,properties:{urlPattern:{type:`string`},urlPatternType:{type:`string`,enum:[`glob`,`regex`]},interceptAction:{type:`string`,enum:[`continue`,`abort`,`fulfill`]},stage:{type:`string`,enum:[`Request`,`Response`]},responseCode:{type:`number`},responseHeaders:{type:`object`,additionalProperties:{type:`string`}},responseBody:{type:`string`}},required:[`urlPattern`]},`Rule objects to add`).string(`ruleId`,`Rule ID to remove`).boolean(`all`,`Remove all rules`,{default:!1}).required(`action`)),e(`network_tls_fingerprint`,e=>e.desc(`Compute TLS/HTTP fingerprint hashes for bot detection.`).enum(`mode`,[`analyze_request`,`compute_tls`,`compute_http`],`Fingerprint mode`).string(`requestId`,`Request ID to analyze`).array(`tlsVersions`,{type:`string`},`TLS version codes in order`).array(`ciphers`,{type:`string`},`Cipher suite codes in order`).array(`extensions`,{type:`string`},`Extension type codes in order`).array(`signatureAlgorithms`,{type:`string`},`Signature algorithm codes in order`).enum(`protocol`,[`tls`,`quic`,`dtls`],`Transport protocol type`,{default:`tls`}).boolean(`sni`,`Whether SNI (Server Name Indication) extension is present`,{default:!0}).string(`alpn`,`ALPN value`).array(`httpHeaders`,{type:`string`},`HTTP header names in order`).string(`userAgent`,`User-Agent value`).string(`httpMethod`,`HTTP method`,{default:`GET`}).string(`httpVersion`,`HTTP version`,{default:`1.1`}).string(`cookieHeader`,`Cookie header value`).string(`acceptLanguage`,`Accept-Language header value`).boolean(`includeAnalysis`,`Include detailed fingerprint breakdown`,{default:!0}).required(`mode`)),e(`network_bot_detect_analyze`,e=>e.desc(`Analyze captured requests for bot-detection signals.`).number(`limit`,`Maximum requests to analyze`,{default:50,minimum:1,maximum:500}).boolean(`includeDetails`,`Include per-request analysis details`,{default:!1}).query())],r=[e(`network_enable`,e=>e.desc(`Enable network request monitoring.`).boolean(`enableExceptions`,`Also capture uncaught exceptions`,{default:!0})),e(`network_disable`,e=>e.desc(`Disable network request monitoring`).destructive()),e(`network_get_status`,e=>e.desc(`Get network monitoring status.`).query()),e(`network_monitor`,e=>e.desc(`Manage network request monitoring.`).enum(`action`,[`enable`,`disable`,`status`],`Action to perform`).boolean(`enableExceptions`,`Only for enable action: Also capture uncaught exceptions`,{default:!0}).required(`action`)),e(`network_get_requests`,e=>e.desc(`Get captured network requests.`).string(`url`,`Filter by URL substring`).string(`urlRegex`,`Filter by URL regex pattern`).string(`method`,`Filter by HTTP method (GET, POST, PUT, DELETE)`).number(`sinceTimestamp`,`Only return requests after this epoch timestamp (milliseconds). Useful for incremental polling.`).string(`sinceRequestId`,`Only return requests after this requestId (exclusive). Useful for incremental retrieval.`).number(`tail`,`Return the last N requests after filtering`).number(`limit`,`Maximum number of results per page`,{default:100,minimum:1,maximum:1e3}).number(`offset`,`Skip results for pagination`,{default:0,minimum:0}).boolean(`autoEnable`,`Auto-enable network monitoring when currently disabled`,{default:!0}).boolean(`enableExceptions`,`When autoEnable=true, also enable uncaught exception monitoring`,{default:!0}).array(`fields`,{type:`string`},`Only include these fields per request (e.g. ["url","method","status"]). Reduces response size drastically.`).boolean(`deduplicateUrls`,`Deduplicate URLs by stripping query params and normalizing path segments (UUIDs/IDs → {id}). Returns unique endpoint patterns with counts instead of individual requests.`,{default:!1})),e(`network_get_response_body`,e=>e.desc(`Get the response body for a captured request.`).string(`requestId`,`Request ID (from network_get_requests)`).number(`maxSize`,`Maximum response size in bytes`,{default:1e5,minimum:1024,maximum:2e7}).boolean(`returnSummary`,`Return only size and preview instead of full body`,{default:!1}).number(`retries`,`Retry count when response body is not yet available`,{default:3,minimum:0,maximum:10}).number(`retryIntervalMs`,`Retry interval in milliseconds`,{default:500,minimum:100,maximum:1e4}).boolean(`autoEnable`,`Auto-enable network monitoring when currently disabled`,{default:!1}).boolean(`enableExceptions`,`When autoEnable=true, also enable uncaught exception monitoring`,{default:!0}).required(`requestId`)),e(`network_get_stats`,e=>e.desc(`Get network statistics.`).query()),e(`performance_get_metrics`,e=>e.desc(`Get page performance metrics.`).boolean(`includeTimeline`,`Include detailed timeline events`,{default:!1}).query()),e(`performance_coverage`,e=>e.desc(`Start or stop code coverage recording.`).enum(`action`,[`start`,`stop`],`Coverage action`).required(`action`)),e(`performance_take_heap_snapshot`,e=>e.desc(`Take a V8 heap memory snapshot`)),e(`performance_trace`,e=>e.desc(`Start or stop a Chrome performance trace.`).enum(`action`,[`start`,`stop`],`Trace action`).array(`categories`,{type:`string`},`Trace categories to capture`).boolean(`screenshots`,`Capture screenshots during tracing`,{default:!1}).string(`artifactPath`,`Custom output path`).required(`action`)),e(`profiler_cpu`,e=>e.desc(`Start or stop CPU profiling.`).enum(`action`,[`start`,`stop`],`Profiler action`).string(`artifactPath`,`Custom output path`).required(`action`)),e(`profiler_heap_sampling`,e=>e.desc(`Start or stop heap allocation sampling.`).enum(`action`,[`start`,`stop`],`Sampling action`).number(`samplingInterval`,`Sampling interval in bytes`,{default:32768,minimum:256,maximum:1048576}).string(`artifactPath`,`Custom output path`).number(`topN`,`Number of top allocators to return`,{default:20,minimum:1,maximum:100}).required(`action`))],i=[e(`console_get_exceptions`,e=>e.desc(`Get captured uncaught exceptions from the page`).string(`url`,`Filter by URL substring`).number(`limit`,`Maximum number of exceptions to return`,{default:50,minimum:1,maximum:1e3}).readOnly()),e(`console_inject`,e=>e.desc(`Inject an in-page script, XHR, fetch, or function monitor.`).enum(`type`,[`script`,`xhr`,`fetch`,`function`],`Injection type`).string(`functionName`,`Global function path to trace`).boolean(`persistent`,`Keep the injection across page navigations`,{default:!1}).required(`type`).openWorld()),e(`console_inject_fetch_interceptor`,e=>e.desc(`Inject a fetch interceptor.`).boolean(`persistent`,`Keep the injection across page navigations`,{default:!1}).openWorld()),e(`console_inject_xhr_interceptor`,e=>e.desc(`Inject an XMLHttpRequest interceptor.`).boolean(`persistent`,`Keep the injection across page navigations`,{default:!1}).openWorld()),e(`console_buffers`,e=>e.desc(`Manage injected interceptor state.`).enum(`action`,[`clear`,`reset`],`Buffer action: clear buffers or reset interceptors`).required(`action`))],a=[e(`network_traceroute`,e=>e.desc(`Run an ICMP traceroute.`).string(`target`,`Target hostname or IP address to trace route to`).number(`maxHops`,`Maximum number of hops`,{default:30,minimum:1,maximum:64}).number(`timeout`,`Per-hop timeout in milliseconds`,{default:5e3,minimum:100,maximum:3e4}).number(`packetSize`,`ICMP echo request payload size in bytes`,{default:32,minimum:8,maximum:65500}).required(`target`).query()),e(`network_icmp_probe`,e=>e.desc(`Run an ICMP echo probe.`).string(`target`,`Target hostname or IP address to probe`).number(`ttl`,`Time-to-live value`,{default:128,minimum:1,maximum:255}).number(`packetSize`,`ICMP echo request payload size in bytes`,{default:32,minimum:8,maximum:65500}).number(`timeout`,`Timeout in milliseconds`,{default:5e3,minimum:100,maximum:3e4}).required(`target`).query())],o=[e(`http_request_build`,e=>e.desc(`Build a raw HTTP/1.x request payload.`).string(`method`,`HTTP method token`).string(`target`,`Request target, such as /path, *, or an absolute-form URL`).string(`host`,`Optional Host header value to inject when addHostHeader is enabled`).object(`headers`,{additionalProperties:{type:`string`}},`Optional HTTP headers to include in the request`).string(`body`,`Optional UTF-8 request body`).enum(`httpVersion`,[`1.0`,`1.1`],`HTTP protocol version to emit`,{default:`1.1`}).boolean(`addHostHeader`,`Auto-add the Host header when host is provided`,{default:!0}).boolean(`addContentLength`,`Auto-add Content-Length when a body is present and Transfer-Encoding is absent`,{default:!0}).boolean(`addConnectionClose`,`Auto-add Connection: close when absent`,{default:!0}).requiredOpenWorld(`method`,`target`)),e(`http_plain_request`,e=>e.desc(`Send a raw HTTP request over plain TCP.`).string(`host`,`Target hostname or IP literal`).number(`port`,`TCP port to connect to. Default: 80`,{default:80,minimum:1,maximum:65535}).string(`requestText`,`Raw HTTP request text to send as UTF-8 bytes`).object(`authorization`,t,`Request-scoped authorization policy for private-network or insecure-HTTP targets. Use exact hosts/CIDRs instead of process-wide bypasses.`).number(`timeoutMs`,`Socket timeout in milliseconds`,{default:3e4,minimum:1e3,maximum:12e4}).number(`maxResponseBytes`,`Maximum number of raw response bytes to capture before truncating the exchange`,{default:512e3,minimum:1024,maximum:10485760}).requiredOpenWorld(`host`,`requestText`)),e(`http2_probe`,e=>e.desc(`Probe an HTTP/2 endpoint.`).string(`url`,`Absolute http:// or https:// URL to probe`).string(`method`,`HTTP method token to send. Default: GET`).object(`headers`,{additionalProperties:{type:`string`}},`Optional request headers to include. Header names are normalized to lowercase for HTTP/2.`).string(`body`,`Optional UTF-8 request body to send with the probe`).array(`alpnProtocols`,{type:`string`},`ALPN protocols to offer`).object(`authorization`,t,`Request-scoped authorization policy for private-network or insecure-HTTP targets. Use exact hosts/CIDRs instead of process-wide bypasses.`).number(`timeoutMs`,`Probe timeout in milliseconds`,{default:3e4,minimum:1e3,maximum:12e4}).number(`maxBodyBytes`,`Maximum number of response body bytes to capture for the snippet before truncating`,{default:32768,minimum:1024,maximum:1048576}).requiredOpenWorld(`url`)),e(`http2_frame_build`,e=>e.desc(`Build a raw HTTP/2 frame.`).string(`frameType`,`HTTP/2 frame type: DATA, SETTINGS, PING, WINDOW_UPDATE, RST_STREAM, GOAWAY, or RAW`).number(`streamId`,`Stream identifier (0 for connection-level frames). Default: 0`,{default:0,minimum:0,maximum:2147483647}).number(`flags`,`Raw flags byte (0-255). Overrides type-specific defaults when set.`,{minimum:0,maximum:255}).number(`frameTypeCode`,`Explicit frame type code for RAW frames (0-255). Required when frameType is RAW.`,{minimum:0,maximum:255}).string(`payloadHex`,`Frame payload as a hex string. Mutually exclusive with payloadText.`).string(`payloadText`,`Frame payload as a text string. Mutually exclusive with payloadHex.`).string(`payloadEncoding`,`Encoding for payloadText: utf8 or ascii. Default: utf8`).array(`settings`,{type:`object`,properties:{id:{type:`number`},value:{type:`number`}},required:[`id`,`value`]},`Array of {id, value} entries for SETTINGS frames`).boolean(`ack`,`Set the ACK flag on SETTINGS or PING frames`).string(`pingOpaqueDataHex`,`Exactly 8 bytes of opaque data for PING frames (hex string)`).number(`windowSizeIncrement`,`Window size increment for WINDOW_UPDATE frames (1 to 2^31-1)`).number(`errorCode`,`Error code for RST_STREAM or GOAWAY frames (0 to 2^32-1)`).number(`lastStreamId`,`Last stream ID for GOAWAY frames (0 to 2^31-1)`).string(`debugDataText`,`Optional debug data for GOAWAY frames`).string(`debugDataEncoding`,`Encoding for debugDataText: utf8 or ascii. Default: utf8`).requiredOpenWorld(`frameType`)),e(`dns_resolve`,e=>e.desc(`Resolve a hostname to DNS records using the system resolver.`).string(`hostname`,`Hostname to resolve (e.g. google.com)`).string(`rrType`,`DNS record type: A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, SRV, or ANY`,{default:`A`}).requiredOpenWorld(`hostname`)),e(`dns_reverse`,e=>e.desc(`Reverse DNS lookup — find hostnames for an IP address.`).string(`ip`,`IP address to reverse lookup (e.g. 8.8.8.8)`).requiredOpenWorld(`ip`)),e(`dns_probe`,e=>e.desc(`Run a DNS query and return structured status instead of throwing.`).string(`hostname`,`Hostname to query`).string(`rrType`,`DNS record type: A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, SRV, or ANY`,{default:`A`}).requiredOpenWorld(`hostname`)),e(`dns_cname_chain`,e=>e.desc(`Trace the full CNAME chain for a hostname.`).string(`hostname`,`Hostname to trace CNAME chain for`).number(`maxDepth`,`Maximum chain depth to follow. Default: 10`,{default:10,minimum:1,maximum:30}).requiredOpenWorld(`hostname`)),e(`dns_bulk_resolve`,e=>e.desc(`Resolve many hostnames concurrently with per-host status.`).array(`hostnames`,{type:`string`},`List of hostnames to resolve (max 1000)`).string(`rrType`,`DNS record type: A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, SRV, or ANY`,{default:`A`}).number(`concurrency`,`Maximum number of concurrent DNS queries. Default: 10`,{default:10,minimum:1,maximum:50}).requiredOpenWorld(`hostnames`)),e(`network_rtt_measure`,e=>e.desc(`Measure round-trip time to a target URL.`).string(`url`,`Target URL to measure RTT to`).string(`probeType`,`Probe type: tcp, tls, or http. Default: tcp`,{default:`tcp`}).number(`iterations`,`Number of probe iterations (1-50). Default: 5`,{default:5,minimum:1,maximum:50}).number(`timeoutMs`,`Per-probe timeout in milliseconds (100-30000). Default: 5000`,{default:5e3,minimum:100,maximum:3e4}).object(`authorization`,{additionalProperties:{type:`string`}},`Authorization policy for network access`).requiredOpenWorld(`url`)),e(`network_latency_stats`,e=>e.desc(`Measure repeated latency and compute percentile stats.`).string(`url`,`Target URL to measure`).enum(`probeType`,[`tcp`,`tls`,`http`],`Probe type`,{default:`http`}).number(`iterations`,`Number of probes`,{default:20,minimum:5,maximum:100}).number(`concurrency`,`Max concurrent probes`,{default:5,minimum:1,maximum:20}).number(`timeoutMs`,`Per-probe timeout ms`,{default:5e3,minimum:100,maximum:3e4}).object(`authorization`,{additionalProperties:{type:`string`}},`Authorization policy for network access`).requiredOpenWorld(`url`))],s=[...r,...i,...o,...n,...a];export{s as t};
@@ -1,2 +1,2 @@
1
- import{a as e,n as t,r as n}from"./parse-args-Cuk7-xUt.mjs";import"./definitions-NoVp_9Pm.mjs";import{homedir as r,tmpdir as i}from"node:os";import{isAbsolute as a,resolve as o}from"node:path";import{readFile as s,realpath as c}from"node:fs/promises";function l(e,t,n){let r=[],i=0,a=0;for(;i<e.length;){let o=d(e,i);if(o.error)return{fields:r,bytesConsumed:i,error:o.error};let s=o.value;i=o.offset;let c=Number(s>>3n),l=Number(s&7n);if(c<=0)return{fields:r,bytesConsumed:i,error:`Invalid field number ${c} at offset ${i}`};if(l===0){let t=d(e,i);if(t.error)return{fields:r,bytesConsumed:i,error:t.error};i=t.offset,r.push({index:a,fieldNumber:c,wireType:l,wireTypeName:f(l),value:p(t.value)})}else if(l===1){if(i+8>e.length)return{fields:r,bytesConsumed:i,error:`Unexpected EOF for fixed64 at offset ${i}`};let t=e.subarray(i,i+8),n=t.readBigUInt64LE(0);i+=8,r.push({index:a,fieldNumber:c,wireType:l,wireTypeName:f(l),value:{uint64:p(n),hex:t.toString(`hex`)}})}else if(l===2){let o=d(e,i);if(o.error)return{fields:r,bytesConsumed:i,error:o.error};i=o.offset;let s=o.value;if(s>BigInt(2**53-1))return{fields:r,bytesConsumed:i,error:`Length-delimited field is too large at offset ${i}`};let p=Number(s);if(p<0||i+p>e.length)return{fields:r,bytesConsumed:i,error:`Invalid length-delimited field length=${p} at offset ${i}`};let m=e.subarray(i,i+p);i+=p,r.push({index:a,fieldNumber:c,wireType:l,wireTypeName:f(l),value:u(m,t,n)})}else if(l===5){if(i+4>e.length)return{fields:r,bytesConsumed:i,error:`Unexpected EOF for fixed32 at offset ${i}`};let t=e.subarray(i,i+4),n=t.readUInt32LE(0);i+=4,r.push({index:a,fieldNumber:c,wireType:l,wireTypeName:f(l),value:{uint32:n,hex:t.toString(`hex`)}})}else return{fields:r,bytesConsumed:i,error:`Unsupported wire type ${l} at offset ${i}`};a+=1}return{fields:r,bytesConsumed:i}}function u(e,t,n){if(e.length===0)return{kind:`empty`,length:0};if(t<n){let r=l(e,t+1,n);if(!r.error&&r.bytesConsumed===e.length&&r.fields.length>0)return{kind:`message`,fields:r.fields}}let r=m(e);return r!==null&&h(r)?{kind:`string`,value:r}:{kind:`bytes`,length:e.length,hex:e.toString(`hex`),base64:e.toString(`base64`)}}function d(e,t){let n=0n,r=0n,i=t;for(let t=0;t<10;t+=1){let t=e[i];if(t===void 0)return{error:`Unexpected EOF while parsing varint at offset ${i}`};let a=BigInt(t);if(n|=(a&127n)<<r,i+=1,(a&128n)==0n)return{value:n,offset:i};r+=7n}return{error:`Varint exceeds 10 bytes at offset ${t}`}}function f(e){return e===0?`varint`:e===1?`fixed64`:e===2?`length-delimited`:e===5?`fixed32`:`unknown`}function p(e){let t=BigInt(2**53-1),n=BigInt(-(2**53-1));return e<=t&&e>=n?Number(e):e.toString()}function m(e){let t=e.toString(`utf8`);return(t.match(/\uFFFD/g)??[]).length>0?null:t}function h(e){if(e.length===0)return!0;let t=0;for(let n of e){let e=n.charCodeAt(0);(e>=32&&e<=126||e===9||e===10||e===13)&&(t+=1)}return t/e.length>=.85}function g(e){let t=_(e,0,0);if(t.offset!==e.length)throw Error(`MessagePack decode ended early: consumed ${t.offset} of ${e.length} bytes`);return t.value}function _(e,t,n){if(n>64)throw Error(`MessagePack decode depth exceeds safety limit`);let r=e[t];if(r===void 0)throw Error(`Unexpected EOF at offset ${t}`);let i=t+1;if(r<=127)return{value:r,offset:i};if(r>=224)return{value:r-256,offset:i};if(r>=160&&r<=191){let t=r&31;return x(e,i,t),{value:e.subarray(i,i+t).toString(`utf8`),offset:i+t}}if(r>=144&&r<=159){let t=r&15;return v(e,i,t,n+1)}if(r>=128&&r<=143){let t=r&15;return y(e,i,t,n+1)}if(r===192)return{value:null,offset:i};if(r===194)return{value:!1,offset:i};if(r===195)return{value:!0,offset:i};if(r===204)return x(e,i,1),{value:e.readUInt8(i),offset:i+1};if(r===205)return x(e,i,2),{value:e.readUInt16BE(i),offset:i+2};if(r===206)return x(e,i,4),{value:e.readUInt32BE(i),offset:i+4};if(r===207)return x(e,i,8),{value:p(e.readBigUInt64BE(i)),offset:i+8};if(r===208)return x(e,i,1),{value:e.readInt8(i),offset:i+1};if(r===209)return x(e,i,2),{value:e.readInt16BE(i),offset:i+2};if(r===210)return x(e,i,4),{value:e.readInt32BE(i),offset:i+4};if(r===211)return x(e,i,8),{value:p(e.readBigInt64BE(i)),offset:i+8};if(r===202)return x(e,i,4),{value:e.readFloatBE(i),offset:i+4};if(r===203)return x(e,i,8),{value:e.readDoubleBE(i),offset:i+8};if(r===217){x(e,i,1);let t=e.readUInt8(i);return i+=1,x(e,i,t),{value:e.subarray(i,i+t).toString(`utf8`),offset:i+t}}if(r===218){x(e,i,2);let t=e.readUInt16BE(i);return i+=2,x(e,i,t),{value:e.subarray(i,i+t).toString(`utf8`),offset:i+t}}if(r===219){x(e,i,4);let t=e.readUInt32BE(i);return i+=4,x(e,i,t),{value:e.subarray(i,i+t).toString(`utf8`),offset:i+t}}if(r===196){x(e,i,1);let t=e.readUInt8(i);i+=1,x(e,i,t);let n=e.subarray(i,i+t);return{value:{type:`bytes`,base64:n.toString(`base64`),hex:n.toString(`hex`)},offset:i+t}}if(r===197){x(e,i,2);let t=e.readUInt16BE(i);i+=2,x(e,i,t);let n=e.subarray(i,i+t);return{value:{type:`bytes`,base64:n.toString(`base64`),hex:n.toString(`hex`)},offset:i+t}}if(r===198){x(e,i,4);let t=e.readUInt32BE(i);i+=4,x(e,i,t);let n=e.subarray(i,i+t);return{value:{type:`bytes`,base64:n.toString(`base64`),hex:n.toString(`hex`)},offset:i+t}}if(r===220){x(e,i,2);let t=e.readUInt16BE(i);return i+=2,v(e,i,t,n+1)}if(r===221){x(e,i,4);let t=e.readUInt32BE(i);return i+=4,v(e,i,t,n+1)}if(r===222){x(e,i,2);let t=e.readUInt16BE(i);return i+=2,y(e,i,t,n+1)}if(r===223){x(e,i,4);let t=e.readUInt32BE(i);return i+=4,y(e,i,t,n+1)}if(r>=212&&r<=216){let t={212:1,213:2,214:4,215:8,216:16}[r];x(e,i,1+t);let n=e.readInt8(i),a=e.subarray(i+1,i+1+t);return{value:{type:`ext`,extType:n,base64:a.toString(`base64`),hex:a.toString(`hex`)},offset:i+1+t}}if(r===199||r===200||r===201){let t=r===199?1:r===200?2:4;x(e,i,t);let n=t===1?e.readUInt8(i):t===2?e.readUInt16BE(i):e.readUInt32BE(i);i+=t,x(e,i,1+n);let a=e.readInt8(i),o=e.subarray(i+1,i+1+n);return{value:{type:`ext`,extType:a,base64:o.toString(`base64`),hex:o.toString(`hex`)},offset:i+1+n}}throw Error(`Unsupported MessagePack prefix 0x${r.toString(16)} at offset ${t}`)}function v(e,t,n,r){let i=t,a=[];for(let t=0;t<n;t+=1){let t=_(e,i,r);a.push(t.value),i=t.offset}return{value:a,offset:i}}function y(e,t,n,r){let i=t,a={};for(let t=0;t<n;t+=1){let t=_(e,i,r);i=t.offset;let n=_(e,i,r);i=n.offset;let o=b(t.value);a[o]=n.value}return{value:a,offset:i}}function b(e){if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e);if(typeof e==`bigint`)return e.toString();if(e===null)return`null`;try{return JSON.stringify(e)}catch{return String(e)}}function x(e,t,n){if(t<0||n<0||t+n>e.length)throw Error(`Unexpected EOF while reading ${n} bytes at offset ${t}`)}const S=[{format:`png`,bytes:[137,80,78,71]},{format:`jpeg`,bytes:[255,216,255]},{format:`gif`,bytes:[71,73,70]},{format:`wasm`,bytes:[0,97,115,109]},{format:`zip/apk`,bytes:[80,75,3,4]},{format:`pdf`,bytes:[37,80,68,70]}],C=new Set([`base64`,`hex`,`file`,`raw`]),w=new Set([`base64`,`hex`,`raw`,`file`]),T=new Set([`base64`,`hex`,`url`,`protobuf`,`msgpack`]),E=new Set([`hex`,`utf8`,`json`]),D=new Set([`utf8`,`hex`,`json`]),O=new Set([`base64`,`hex`,`url`]);function k(e){return{content:[{type:`text`,text:JSON.stringify(e,null,2)}]}}function A(e,t){return k({success:!1,tool:e,error:t instanceof Error?t.message:String(t)})}function j(e){let t=e.trim().replace(/^0x/i,``).replace(/[\s:,-]/g,``);if(t.length===0)return Buffer.alloc(0);if(t.length%2!=0||!/^[0-9a-fA-F]+$/.test(t))throw Error(`Invalid hex string`);return Buffer.from(t,`hex`)}function M(e){let t=e.trim().replace(/\s+/g,``);if(t.length===0)return Buffer.alloc(0);if(!F(t))throw Error(`Invalid base64 string`);return Buffer.from(t,`base64`)}function N(e){let t=e.trim();return t.length===0?Buffer.alloc(0):P(t)?j(t):F(t)?M(t):Buffer.from(t,`utf8`)}function P(e){let t=e.trim().replace(/^0x/i,``).replace(/[\s:,-]/g,``);return t.length>0&&t.length%2==0&&/^[0-9a-fA-F]+$/.test(t)}function F(e){let t=e.trim().replace(/\s+/g,``);if(t.length===0||t.length%4!=0||!/^[A-Za-z0-9+/]*={0,2}$/.test(t))return!1;try{let e=Buffer.from(t,`base64`);return t.replace(/=+$/,``)===e.toString(`base64`).replace(/=+$/,``)}catch{return!1}}function I(e){return/%[0-9a-fA-F]{2}/.test(e)||/\+/.test(e)}function L(e){return decodeURIComponent(e.replace(/\+/g,`%20`))}function R(e){let t=``;for(let n of e.values())t+=n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===45||n===46||n===95||n===126?String.fromCharCode(n):`%${n.toString(16).toUpperCase().padStart(2,`0`)}`;return t}function z(e){let t=e.toString(`utf8`);return(t.match(/\uFFFD/g)??[]).length>0?null:t}function B(e){try{return JSON.parse(e)}catch{return null}}function V(e,t){return Array.from(e.subarray(0,t).values()).map(e=>e.toString(16).padStart(2,`0`)).join(` `)}function H(e,t=16){let n=[];for(let r=0;r<e.length;r+=t){let i=e.subarray(r,r+t),a=Array.from(i.values()).map(e=>e.toString(16).padStart(2,`0`)).join(` `),o=Array.from(i.values()).map(e=>e>=32&&e<=126?String.fromCharCode(e):`.`).join(``);n.push(`${r.toString(16).padStart(8,`0`)} ${a.padEnd(47)} |${o}|`)}return n.join(`
1
+ import{a as e,n as t,r as n}from"./parse-args-Bw413PlW.mjs";import"./definitions-CB6vmOer.mjs";import{homedir as r,tmpdir as i}from"node:os";import{isAbsolute as a,resolve as o}from"node:path";import{readFile as s,realpath as c}from"node:fs/promises";function l(e,t,n){let r=[],i=0,a=0;for(;i<e.length;){let o=d(e,i);if(o.error)return{fields:r,bytesConsumed:i,error:o.error};let s=o.value;i=o.offset;let c=Number(s>>3n),l=Number(s&7n);if(c<=0)return{fields:r,bytesConsumed:i,error:`Invalid field number ${c} at offset ${i}`};if(l===0){let t=d(e,i);if(t.error)return{fields:r,bytesConsumed:i,error:t.error};i=t.offset,r.push({index:a,fieldNumber:c,wireType:l,wireTypeName:f(l),value:p(t.value)})}else if(l===1){if(i+8>e.length)return{fields:r,bytesConsumed:i,error:`Unexpected EOF for fixed64 at offset ${i}`};let t=e.subarray(i,i+8),n=t.readBigUInt64LE(0);i+=8,r.push({index:a,fieldNumber:c,wireType:l,wireTypeName:f(l),value:{uint64:p(n),hex:t.toString(`hex`)}})}else if(l===2){let o=d(e,i);if(o.error)return{fields:r,bytesConsumed:i,error:o.error};i=o.offset;let s=o.value;if(s>BigInt(2**53-1))return{fields:r,bytesConsumed:i,error:`Length-delimited field is too large at offset ${i}`};let p=Number(s);if(p<0||i+p>e.length)return{fields:r,bytesConsumed:i,error:`Invalid length-delimited field length=${p} at offset ${i}`};let m=e.subarray(i,i+p);i+=p,r.push({index:a,fieldNumber:c,wireType:l,wireTypeName:f(l),value:u(m,t,n)})}else if(l===5){if(i+4>e.length)return{fields:r,bytesConsumed:i,error:`Unexpected EOF for fixed32 at offset ${i}`};let t=e.subarray(i,i+4),n=t.readUInt32LE(0);i+=4,r.push({index:a,fieldNumber:c,wireType:l,wireTypeName:f(l),value:{uint32:n,hex:t.toString(`hex`)}})}else return{fields:r,bytesConsumed:i,error:`Unsupported wire type ${l} at offset ${i}`};a+=1}return{fields:r,bytesConsumed:i}}function u(e,t,n){if(e.length===0)return{kind:`empty`,length:0};if(t<n){let r=l(e,t+1,n);if(!r.error&&r.bytesConsumed===e.length&&r.fields.length>0)return{kind:`message`,fields:r.fields}}let r=m(e);return r!==null&&h(r)?{kind:`string`,value:r}:{kind:`bytes`,length:e.length,hex:e.toString(`hex`),base64:e.toString(`base64`)}}function d(e,t){let n=0n,r=0n,i=t;for(let t=0;t<10;t+=1){let t=e[i];if(t===void 0)return{error:`Unexpected EOF while parsing varint at offset ${i}`};let a=BigInt(t);if(n|=(a&127n)<<r,i+=1,(a&128n)==0n)return{value:n,offset:i};r+=7n}return{error:`Varint exceeds 10 bytes at offset ${t}`}}function f(e){return e===0?`varint`:e===1?`fixed64`:e===2?`length-delimited`:e===5?`fixed32`:`unknown`}function p(e){let t=BigInt(2**53-1),n=BigInt(-(2**53-1));return e<=t&&e>=n?Number(e):e.toString()}function m(e){let t=e.toString(`utf8`);return(t.match(/\uFFFD/g)??[]).length>0?null:t}function h(e){if(e.length===0)return!0;let t=0;for(let n of e){let e=n.charCodeAt(0);(e>=32&&e<=126||e===9||e===10||e===13)&&(t+=1)}return t/e.length>=.85}function g(e){let t=_(e,0,0);if(t.offset!==e.length)throw Error(`MessagePack decode ended early: consumed ${t.offset} of ${e.length} bytes`);return t.value}function _(e,t,n){if(n>64)throw Error(`MessagePack decode depth exceeds safety limit`);let r=e[t];if(r===void 0)throw Error(`Unexpected EOF at offset ${t}`);let i=t+1;if(r<=127)return{value:r,offset:i};if(r>=224)return{value:r-256,offset:i};if(r>=160&&r<=191){let t=r&31;return x(e,i,t),{value:e.subarray(i,i+t).toString(`utf8`),offset:i+t}}if(r>=144&&r<=159){let t=r&15;return v(e,i,t,n+1)}if(r>=128&&r<=143){let t=r&15;return y(e,i,t,n+1)}if(r===192)return{value:null,offset:i};if(r===194)return{value:!1,offset:i};if(r===195)return{value:!0,offset:i};if(r===204)return x(e,i,1),{value:e.readUInt8(i),offset:i+1};if(r===205)return x(e,i,2),{value:e.readUInt16BE(i),offset:i+2};if(r===206)return x(e,i,4),{value:e.readUInt32BE(i),offset:i+4};if(r===207)return x(e,i,8),{value:p(e.readBigUInt64BE(i)),offset:i+8};if(r===208)return x(e,i,1),{value:e.readInt8(i),offset:i+1};if(r===209)return x(e,i,2),{value:e.readInt16BE(i),offset:i+2};if(r===210)return x(e,i,4),{value:e.readInt32BE(i),offset:i+4};if(r===211)return x(e,i,8),{value:p(e.readBigInt64BE(i)),offset:i+8};if(r===202)return x(e,i,4),{value:e.readFloatBE(i),offset:i+4};if(r===203)return x(e,i,8),{value:e.readDoubleBE(i),offset:i+8};if(r===217){x(e,i,1);let t=e.readUInt8(i);return i+=1,x(e,i,t),{value:e.subarray(i,i+t).toString(`utf8`),offset:i+t}}if(r===218){x(e,i,2);let t=e.readUInt16BE(i);return i+=2,x(e,i,t),{value:e.subarray(i,i+t).toString(`utf8`),offset:i+t}}if(r===219){x(e,i,4);let t=e.readUInt32BE(i);return i+=4,x(e,i,t),{value:e.subarray(i,i+t).toString(`utf8`),offset:i+t}}if(r===196){x(e,i,1);let t=e.readUInt8(i);i+=1,x(e,i,t);let n=e.subarray(i,i+t);return{value:{type:`bytes`,base64:n.toString(`base64`),hex:n.toString(`hex`)},offset:i+t}}if(r===197){x(e,i,2);let t=e.readUInt16BE(i);i+=2,x(e,i,t);let n=e.subarray(i,i+t);return{value:{type:`bytes`,base64:n.toString(`base64`),hex:n.toString(`hex`)},offset:i+t}}if(r===198){x(e,i,4);let t=e.readUInt32BE(i);i+=4,x(e,i,t);let n=e.subarray(i,i+t);return{value:{type:`bytes`,base64:n.toString(`base64`),hex:n.toString(`hex`)},offset:i+t}}if(r===220){x(e,i,2);let t=e.readUInt16BE(i);return i+=2,v(e,i,t,n+1)}if(r===221){x(e,i,4);let t=e.readUInt32BE(i);return i+=4,v(e,i,t,n+1)}if(r===222){x(e,i,2);let t=e.readUInt16BE(i);return i+=2,y(e,i,t,n+1)}if(r===223){x(e,i,4);let t=e.readUInt32BE(i);return i+=4,y(e,i,t,n+1)}if(r>=212&&r<=216){let t={212:1,213:2,214:4,215:8,216:16}[r];x(e,i,1+t);let n=e.readInt8(i),a=e.subarray(i+1,i+1+t);return{value:{type:`ext`,extType:n,base64:a.toString(`base64`),hex:a.toString(`hex`)},offset:i+1+t}}if(r===199||r===200||r===201){let t=r===199?1:r===200?2:4;x(e,i,t);let n=t===1?e.readUInt8(i):t===2?e.readUInt16BE(i):e.readUInt32BE(i);i+=t,x(e,i,1+n);let a=e.readInt8(i),o=e.subarray(i+1,i+1+n);return{value:{type:`ext`,extType:a,base64:o.toString(`base64`),hex:o.toString(`hex`)},offset:i+1+n}}throw Error(`Unsupported MessagePack prefix 0x${r.toString(16)} at offset ${t}`)}function v(e,t,n,r){let i=t,a=[];for(let t=0;t<n;t+=1){let t=_(e,i,r);a.push(t.value),i=t.offset}return{value:a,offset:i}}function y(e,t,n,r){let i=t,a={};for(let t=0;t<n;t+=1){let t=_(e,i,r);i=t.offset;let n=_(e,i,r);i=n.offset;let o=b(t.value);a[o]=n.value}return{value:a,offset:i}}function b(e){if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e);if(typeof e==`bigint`)return e.toString();if(e===null)return`null`;try{return JSON.stringify(e)}catch{return String(e)}}function x(e,t,n){if(t<0||n<0||t+n>e.length)throw Error(`Unexpected EOF while reading ${n} bytes at offset ${t}`)}const S=[{format:`png`,bytes:[137,80,78,71]},{format:`jpeg`,bytes:[255,216,255]},{format:`gif`,bytes:[71,73,70]},{format:`wasm`,bytes:[0,97,115,109]},{format:`zip/apk`,bytes:[80,75,3,4]},{format:`pdf`,bytes:[37,80,68,70]}],C=new Set([`base64`,`hex`,`file`,`raw`]),w=new Set([`base64`,`hex`,`raw`,`file`]),T=new Set([`base64`,`hex`,`url`,`protobuf`,`msgpack`]),E=new Set([`hex`,`utf8`,`json`]),D=new Set([`utf8`,`hex`,`json`]),O=new Set([`base64`,`hex`,`url`]);function k(e){return{content:[{type:`text`,text:JSON.stringify(e,null,2)}]}}function A(e,t){return k({success:!1,tool:e,error:t instanceof Error?t.message:String(t)})}function j(e){let t=e.trim().replace(/^0x/i,``).replace(/[\s:,-]/g,``);if(t.length===0)return Buffer.alloc(0);if(t.length%2!=0||!/^[0-9a-fA-F]+$/.test(t))throw Error(`Invalid hex string`);return Buffer.from(t,`hex`)}function M(e){let t=e.trim().replace(/\s+/g,``);if(t.length===0)return Buffer.alloc(0);if(!F(t))throw Error(`Invalid base64 string`);return Buffer.from(t,`base64`)}function N(e){let t=e.trim();return t.length===0?Buffer.alloc(0):P(t)?j(t):F(t)?M(t):Buffer.from(t,`utf8`)}function P(e){let t=e.trim().replace(/^0x/i,``).replace(/[\s:,-]/g,``);return t.length>0&&t.length%2==0&&/^[0-9a-fA-F]+$/.test(t)}function F(e){let t=e.trim().replace(/\s+/g,``);if(t.length===0||t.length%4!=0||!/^[A-Za-z0-9+/]*={0,2}$/.test(t))return!1;try{let e=Buffer.from(t,`base64`);return t.replace(/=+$/,``)===e.toString(`base64`).replace(/=+$/,``)}catch{return!1}}function I(e){return/%[0-9a-fA-F]{2}/.test(e)||/\+/.test(e)}function L(e){return decodeURIComponent(e.replace(/\+/g,`%20`))}function R(e){let t=``;for(let n of e.values())t+=n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===45||n===46||n===95||n===126?String.fromCharCode(n):`%${n.toString(16).toUpperCase().padStart(2,`0`)}`;return t}function z(e){let t=e.toString(`utf8`);return(t.match(/\uFFFD/g)??[]).length>0?null:t}function B(e){try{return JSON.parse(e)}catch{return null}}function V(e,t){return Array.from(e.subarray(0,t).values()).map(e=>e.toString(16).padStart(2,`0`)).join(` `)}function H(e,t=16){let n=[];for(let r=0;r<e.length;r+=t){let i=e.subarray(r,r+t),a=Array.from(i.values()).map(e=>e.toString(16).padStart(2,`0`)).join(` `),o=Array.from(i.values()).map(e=>e>=32&&e<=126?String.fromCharCode(e):`.`).join(``);n.push(`${r.toString(16).padStart(8,`0`)} ${a.padEnd(47)} |${o}|`)}return n.join(`
2
2
  `)}function U(e){let{encoding:t,outputFormat:n,buffer:r,jsonValue:i}=e;if(n===`hex`)return k({success:!0,encoding:t,outputFormat:n,byteLength:r.length,result:r.toString(`hex`),hexDump:H(r)});if(n===`utf8`)return k({success:!0,encoding:t,outputFormat:n,byteLength:r.length,result:r.toString(`utf8`)});let a=z(r),o=a===null?null:B(a);return k({success:!0,encoding:t,outputFormat:n,byteLength:r.length,result:i??{parsedJson:o,utf8:a,hex:r.toString(`hex`)}})}async function W(e){let{source:t,data:n,filePath:l,maxBytes:u}=e;if(t===`file`){if(!l)throw Error(`filePath is required when source=file`);let e=await c(o(l));if(!(await Promise.all([i(),r(),process.cwd()].map(async e=>{let t=a(e)?e:o(e);try{return await c(t)}catch{return t}}))).some(t=>e.startsWith(t)))throw Error(`File access denied: path "${l}" is outside allowed directories`);let t=await s(e);return typeof u==`number`?t.subarray(0,u):t}if(t===`base64`){if(!n)throw Error(`data is required for base64 source`);return M(n)}if(t===`hex`){if(!n)throw Error(`data is required for hex source`);return j(n)}return Buffer.from(n??``,`utf8`)}async function G(e,t){try{let n=await(await e.getActivePage()).evaluate(e=>{let t=t=>{if(!t||typeof t!=`object`)return null;let n=t;if(n.requestId!==e)return null;if(typeof n.responseBody==`string`)return{body:n.responseBody,base64Encoded:!!n.base64Encoded};if(typeof n.body==`string`)return{body:n.body,base64Encoded:!!n.base64Encoded};let r=n.response;if(r&&typeof r==`object`){let e=r;if(typeof e.body==`string`)return{body:e.body,base64Encoded:!!e.base64Encoded}}return null},n=e=>{if(!Array.isArray(e))return null;for(let n of e){let e=t(n);if(e)return e}return null},r=n(window.__capturedAPIs);if(r)return r;try{let e=window.localStorage.getItem(`__capturedAPIs`);return e?n(JSON.parse(e)):null}catch{return null}},t);if(!n||typeof n!=`object`)return null;let r=n;if(typeof r.body!=`string`)return null;if(r.base64Encoded)return Buffer.from(r.body,`base64`);let i=r.body.trim();return F(i)?Buffer.from(i,`base64`):Buffer.from(r.body,`utf8`)}catch{return null}}function K(e){let t=[];for(let n of S){if(e.length<n.bytes.length)continue;let r=!0;for(let t=0;t<n.bytes.length;t+=1)if(e[t]!==n.bytes[t]){r=!1;break}r&&t.push(n.format)}return t}function q(e){let t=e[0];if(t===void 0)return[];let n=new Set;return[8,16,24,32].includes(t)&&n.add(`protobuf`),(t>=128&&t<=143||t>=144&&t<=159||t>=160&&t<=191)&&n.add(`messagepack`),(t>=160&&t<=191||t>=128&&t<=159)&&n.add(`cbor`),Array.from(n)}function J(e,t,n){let r=new Set;if((e===`base64`||t&&F(t.trim()))&&r.add(`base64`),(e===`hex`||t&&P(t))&&r.add(`hex`),t&&I(t)&&r.add(`url-encoded`),n.length>=3){let[e,t,i]=n;e===239&&t===187&&i===191&&r.add(`utf8-bom`)}return Array.from(r)}function Y(e){if(e.length===0)return 0;let t=Array.from({length:256},()=>0);for(let n of e.values())t[n]+=1;let n=0;for(let r of t){if(r===0)continue;let t=r/e.length;n-=t*Math.log2(t)}return Number(n.toFixed(6))}function X(e){if(e.length===0)return[];let t=Array.from({length:256},()=>0);for(let n of e.values())t[n]+=1;let n=[];for(let r=0;r<256;r+=1){let i=t[r];i!==0&&n.push({byte:`0x${r.toString(16).padStart(2,`0`)}`,count:i,ratio:Number((i/e.length).toFixed(6))})}return n.sort((e,t)=>t.count-e.count),n}function Z(e,t){if(e.length===0)return[];let n=[],r=0;for(let i=0;i<e.length;i+=t){let a=Math.min(i+t,e.length);n.push({index:r,start:i,end:a,entropy:Y(e.subarray(i,a))}),r+=1}return n}function Q(e,t){let n=$(t);return e<3.8&&n>.85?`plaintext`:e<5.8?`encoded`:e<7.2?`compressed`:e<7.8?`encrypted`:`random`}function $(e){if(e.length===0)return 1;let t=0;for(let n of e.values())(n>=32&&n<=126||n===9||n===10||n===13)&&(t+=1);return t/e.length}var ee=class{collector;responseBodyResolver;constructor(e,t){this.collector=e,this.responseBodyResolver=t}async resolveCapturedRequestBody(e){if(this.responseBodyResolver)try{let t=await this.responseBodyResolver(e);if(t&&typeof t.body==`string`){if(t.base64Encoded)return Buffer.from(t.body,`base64`);let e=t.body.trim();return F(e)?Buffer.from(e,`base64`):Buffer.from(t.body,`utf8`)}}catch{}return G(this.collector,e)}async handleBinaryDetectFormat(n){try{let r=t(n,`source`,C,`raw`),i=e(n,`data`),a=e(n,`filePath`),o=e(n,`requestId`),s=null,c=!1;if(r===`raw`&&o&&(s=await this.resolveCapturedRequestBody(o),c=s!==null),!s){if(r!==`file`&&!i)throw Error(`data is required for non-file source when requestId payload is unavailable`);s=await W({source:r,data:i,filePath:a,maxBytes:r===`file`?512:void 0})}let l=Y(s);return k({success:!0,source:r,requestId:o??null,requestBodyUsed:c,byteLength:s.length,previewHex:V(s,64),magicFormats:K(s),structuredFormats:q(s),encodingSignals:J(r,i,s),entropy:l,assessment:Q(l,s),topBytes:X(s).slice(0,8)})}catch(e){return A(`binary_detect_format`,e)}}async handleBinaryDecode(n){try{let r=e(n,`data`,``),i=t(n,`encoding`,T),a=t(n,`outputFormat`,E,`hex`);if(!r)throw Error(`data is required`);if(!i)throw Error(`encoding is required`);if(i===`url`){let e=L(r);if(a===`hex`){let t=Buffer.from(e,`utf8`);return k({success:!0,encoding:i,outputFormat:a,byteLength:t.length,result:t.toString(`hex`),hexDump:H(t)})}return k(a===`utf8`?{success:!0,encoding:i,outputFormat:a,result:e}:{success:!0,encoding:i,outputFormat:a,result:B(e)??{text:e}})}let o=i===`base64`?M(r):i===`hex`?j(r):N(r);if(i===`protobuf`){let e=l(o,0,5);return U({encoding:i,outputFormat:a,buffer:o,jsonValue:{fields:e.fields,bytesConsumed:e.bytesConsumed,error:e.error??null}})}return U(i===`msgpack`?{encoding:i,outputFormat:a,buffer:o,jsonValue:g(o)}:{encoding:i,outputFormat:a,buffer:o})}catch(e){return A(`binary_decode`,e)}}async handleBinaryEncode(n){try{let r=e(n,`data`,``),i=t(n,`inputFormat`,D,`utf8`),a=t(n,`outputEncoding`,O,`base64`);if(!r)throw Error(`data is required`);let o;if(i===`utf8`)o=Buffer.from(r,`utf8`);else if(i===`hex`)o=j(r);else{let e=JSON.parse(r);o=Buffer.from(JSON.stringify(e),`utf8`)}let s=a===`base64`?o.toString(`base64`):a===`hex`?o.toString(`hex`):R(o);return k({success:!0,inputFormat:i,outputEncoding:a,byteLength:o.length,output:s})}catch(e){return A(`binary_encode`,e)}}async handleBinaryEntropyAnalysis(r){try{let i=t(r,`source`,w,`raw`),a=e(r,`data`),o=e(r,`filePath`);if(i!==`file`&&!a)throw Error(`data is required for non-file source`);let s=n(r,`blockSize`,256),c=Math.max(16,Math.min(8192,Math.trunc(s||256))),l=await W({source:i,data:a,filePath:o}),u=Y(l);return k({success:!0,source:i,byteLength:l.length,blockSize:c,overallEntropy:u,blockEntropies:Z(l,c),byteFrequency:X(l).slice(0,20),assessment:Q(u,l)})}catch(e){return A(`binary_entropy_analysis`,e)}}async handleProtobufDecodeRaw(t){try{let r=e(t,`data`,``);if(!r)throw Error(`data is required`);let i=n(t,`maxDepth`,5),a=Math.max(1,Math.min(20,Math.trunc(i||5))),o=M(r),s=l(o,0,a);return k({success:s.error===void 0,byteLength:o.length,maxDepth:a,parsedBytes:s.bytesConsumed,fields:s.fields,error:s.error??null})}catch(e){return A(`protobuf_decode_raw`,e)}}};export{ee as EncodingToolHandlers};
@@ -1 +1 @@
1
- import{t as e}from"./chunk-C_pMuVsO.mjs";import{t}from"./PageController-D9jVkH0i.mjs";import{n,t as r}from"./DOMInspector-BYY_EJ0C.mjs";import{t as i}from"./ScriptManager-fgqiALgj.mjs";var a=e({ensureBrowserCore:()=>c});let o=null;async function s(){return o||=(await import(`./ConsoleMonitor-Dkqc0HNi.mjs`)).ConsoleMonitor,o}async function c(e){e.collector||(e.collector=new n(e.config.puppeteer),e.registerCaches()),e.pageController||=new t(e.collector),e.domInspector||=new r(e.collector),e.scriptManager||=new i(e.collector),e.consoleMonitor||=new(await(s()))(e.collector)}export{a as n,c as t};
1
+ import{t as e}from"./chunk-C_pMuVsO.mjs";import{t}from"./PageController-Dfsm1_o7.mjs";import{n,t as r}from"./DOMInspector-C19J4zeq.mjs";import{t as i}from"./ScriptManager-LWGPTdvD.mjs";var a=e({ensureBrowserCore:()=>c});let o=null;async function s(){return o||=(await import(`./ConsoleMonitor-CxDJV15E.mjs`)).ConsoleMonitor,o}async function c(e){e.collector||(e.collector=new n(e.config.puppeteer),e.registerCaches()),e.pageController||=new t(e.collector),e.domInspector||=new r(e.collector),e.scriptManager||=new i(e.collector),e.consoleMonitor||=new(await(s()))(e.collector)}export{a as n,c as t};
@@ -1 +1 @@
1
- import{t as e}from"./chunk-C_pMuVsO.mjs";import{_ as t,b as n,d as r,f as i,h as a,i as o,l as s,m as c,n as l,p as u,s as d,t as f,u as p,v as ee,y as m}from"./Win32API-Bhi5xFBe.mjs";import{_ as h,a as g,b as _,c as v,d as y,f as b,g as x,h as S,i as C,l as w,m as T,n as E,o as D,p as O,r as k,s as A,u as te,v as j,y as M}from"./DarwinAPI-DC4HGGLl.mjs";import N from"node:fs";const P=new WeakMap;function F(e){let t=P.get(e);if(t===void 0)throw Error(`Invalid ProcessHandle — not a Win32 handle`);return t}function I(e){let t=0;return e&p.READONLY&&(t|=1),e&p.READWRITE&&(t|=3),e&p.WRITECOPY&&(t|=17),e&p.EXECUTE&&(t|=4),e&p.EXECUTE_READ&&(t|=5),e&p.EXECUTE_READWRITE&&(t|=7),e&p.EXECUTE_WRITECOPY&&(t|=21),e&p.GUARD&&(t|=8),t}function L(e){let t=(e&1)!=0,n=(e&2)!=0,r=(e&4)!=0,i=p.NOACCESS;return t&&n&&r?i=p.EXECUTE_READWRITE:t&&r?i=p.EXECUTE_READ:t&&n?i=p.READWRITE:r?i=p.EXECUTE:t&&(i=p.READONLY),e&8&&(i|=p.GUARD),i}function R(e){return e===s.COMMIT?`committed`:e===s.RESERVE?`reserved`:`free`}function z(e){return e===16777216?`image`:e===262144?`mapped`:e===131072?`private`:`unknown`}var B=class{platform=`win32`;async checkAvailability(){return m()?ee()?{available:!0,platform:`win32`}:{available:!1,reason:`koffi FFI library not available`,platform:`win32`}:{available:!1,reason:`Not running on Windows`,platform:`win32`}}openProcess(e,t){let r=n(e,t),i={pid:e,writeAccess:t};return P.set(i,r),i}closeProcess(e){f(F(e))}readMemory(e,t,n){let i=r(F(e),t,n);return{data:i,bytesRead:i.length}}writeMemory(e,n,r){return{bytesWritten:t(F(e),n,r)}}queryRegion(e,t){let{success:n,info:r}=a(F(e),t);if(!n||r.RegionSize===0n)return null;let i=I(r.Protect);return{baseAddress:r.BaseAddress,size:Number(r.RegionSize),protection:i,state:R(r.State),type:z(r.Type),isReadable:(i&1)!=0,isWritable:(i&2)!=0,isExecutable:(i&4)!=0}}changeProtection(e,t,n,r){let{success:i,oldProtect:a}=c(F(e),t,n,L(r));if(!i)throw Error(`VirtualProtectEx failed`);return{oldProtection:I(a)}}allocateMemory(e,t,n){let r=F(e),a=L(n),o=i(r,0n,t,s.COMMIT|s.RESERVE,a);if(!o)throw Error(`VirtualAllocEx failed`);return{address:o}}freeMemory(e,t,n){u(F(e),t,0,s.RELEASE)}enumerateModules(e){let t=F(e),{success:n,modules:r,count:i}=l(t);if(!n)throw Error(`EnumProcessModules failed`);let a=[];for(let e=0;e<i;e++){let n=r[e];if(!n)continue;let i=o(t,n),{success:s,info:c}=d(t,n);s&&c&&a.push({name:i,baseAddress:BigInt(c.lpBaseOfDll),size:c.SizeOfImage})}return a}};const V=new WeakMap;function H(e){let t=V.get(e);if(t===void 0)throw Error(`Invalid ProcessHandle — not a Darwin handle`);return t}function U(e){let t=0;return e&g.READ&&(t|=1),e&g.WRITE&&(t|=2),e&g.EXECUTE&&(t|=4),t}function W(e){let t=g.NONE;return e&1&&(t|=g.READ),e&2&&(t|=g.WRITE),e&4&&(t|=g.EXECUTE),t}function G(e){switch(e){case k.PRIVATE:case k.PRIVATE_ALIASED:case k.COW:return`private`;case k.SHARED:case k.TRUESHARED:case k.SHARED_ALIASED:return`mapped`;case k.EMPTY:return`unknown`;default:return`unknown`}}var K=class{platform=`darwin`;async checkAvailability(){if(!w())return{available:!1,reason:`Not running on macOS`,platform:`darwin`};if(!te())return{available:!1,reason:`koffi FFI library cannot load libSystem.B.dylib`,platform:`darwin`};try{let{kr:e}=_(O(),process.pid);if(e!==E.SUCCESS)return{available:!1,reason:`task_for_pid failed (${y(e)}). Run with sudo or add debugger entitlement.`,platform:`darwin`}}catch(e){let t=e instanceof Error?e.message:String(e);return{available:!1,reason:/signal|bus error|segfault|abort/i.test(t)?`Mach API call crashed (${t}). This may be caused by SIP (System Integrity Protection) on ARM64 macOS. Disable SIP or use a code-signed binary with com.apple.security.cs.debugger entitlement.`:`task_for_pid permission check failed: ${t}. Run with sudo or add debugger entitlement.`,platform:`darwin`}}return{available:!0,platform:`darwin`}}openProcess(e,t){let{kr:n,task:r}=_(O(),e);if(n!==E.SUCCESS)throw Error(`Failed to open process ${e}: ${y(n)} (${n}). `+(n===E.FAILURE?`Run with sudo or sign with com.apple.security.cs.debugger entitlement.`:n===E.INVALID_ARGUMENT?`Invalid PID — process may not exist.`:`Check macOS permissions.`));let i={pid:e,writeAccess:t};return V.set(i,{task:r}),i}closeProcess(e){let t=H(e);b(O(),t.task)}readMemory(e,t,n){let{kr:r,data:i,outsize:a}=h(H(e).task,t,n);if(r!==E.SUCCESS)throw Error(`mach_vm_read_overwrite failed at 0x${t.toString(16)}: ${y(r)} (${r})`);return{data:i,bytesRead:Number(a)}}writeMemory(e,t,n){let r=M(H(e).task,t,n);if(r!==E.SUCCESS)throw Error(`mach_vm_write failed at 0x${t.toString(16)}: ${y(r)} (${r})`);return{bytesWritten:n.length}}queryRegion(e,t){let{kr:n,address:r,size:i,info:a}=j(H(e).task,t);if(n!==E.SUCCESS)return null;let o=U(a.protection);return{baseAddress:r,size:Number(i),protection:o,state:`committed`,type:G(a.behavior),isReadable:(o&1)!=0,isWritable:(o&2)!=0,isExecutable:(o&4)!=0}}changeProtection(e,t,n,r){let i=H(e),a=W(r),{kr:o,info:s}=j(i.task,t),c=o===E.SUCCESS?U(s.protection):0;if((a&g.WRITE)!==0&&(a&g.EXECUTE)!==0){let e=x(i.task,t,BigInt(n),!0,g.ALL);if(e!==E.SUCCESS)throw Error(`mach_vm_protect (set_maximum) failed at 0x${t.toString(16)}: ${y(e)} (${e})`)}let l=x(i.task,t,BigInt(n),!1,a);if(l!==E.SUCCESS)throw Error(`mach_vm_protect failed at 0x${t.toString(16)}: ${y(l)} (${l})`);return{oldProtection:c}}allocateMemory(e,t,n){let r=H(e),{kr:i,address:a}=T(r.task,BigInt(t),C.ANYWHERE);if(i!==E.SUCCESS)throw Error(`mach_vm_allocate failed: ${y(i)} (${i})`);let o=W(n);if(o!==(g.READ|g.WRITE)){let e=x(r.task,a,BigInt(t),!1,o);if(e!==E.SUCCESS)throw S(r.task,a,BigInt(t)),Error(`mach_vm_protect after allocate failed: ${y(e)} (${e})`)}return{address:a}}freeMemory(e,t,n){let r=S(H(e).task,t,BigInt(n));if(r!==E.SUCCESS)throw Error(`mach_vm_deallocate failed at 0x${t.toString(16)}: ${y(r)} (${r})`)}enumerateModules(e){let t=H(e);return e.pid===process.pid?this.enumerateModulesSelf():this.enumerateModulesRemote(t.task)}enumerateModulesSelf(){let e=v(),t=[];for(let n=0;n<e;n++){let e=A(n),r=D(n);if(!e||r===0n)continue;let i=e.split(`/`).pop()??e;t.push({name:i,baseAddress:r,size:0})}return t}enumerateModulesRemote(e){let t=[],n=0n;for(let r=0;r<1e4;r++){let{kr:r,address:i,size:a,info:o}=j(e,n);if(r!==E.SUCCESS)break;let s=(o.protection&g.READ)!==0,c=(o.protection&g.EXECUTE)!==0;if(s&&c&&a>0n)try{let{kr:n,data:r}=h(e,i,4);if(n===E.SUCCESS&&r.length>=4){let e=r.readUInt32LE(0);(e===4277009103||e===4277009102)&&t.push({name:`module_0x${i.toString(16)}`,baseAddress:i,size:Number(a)})}}catch{}n=i+a}return t}};const q=/^([0-9a-f]+)-([0-9a-f]+)\s+([r-][w-][x-][ps])\s+([0-9a-f]+)\s+(\S+)\s+(\d+)\s*(.*)$/i;function J(e){let t=[];for(let n of e.split(/\r?\n/)){let e=n.trimEnd().match(q);if(!e)continue;let r=e[3];t.push({start:BigInt(`0x${e[1]}`),end:BigInt(`0x${e[2]}`),permissions:{read:r[0]===`r`,write:r[1]===`w`,exec:r[2]===`x`,private:r[3]===`p`},offset:BigInt(`0x${e[4]}`),dev:e[5],inode:parseInt(e[6],10),pathname:e[7]?.trim()??``})}return t}function Y(e){return`${e.read?`r`:`-`}${e.write?`w`:`-`}${e.exec?`x`:`-`}`}function X(){return process.platform===`linux`}function Z(e){let t=0;return e.includes(`r`)&&(t|=1),e.includes(`w`)&&(t|=2),e.includes(`x`)&&(t|=4),t}function ne(e){let t=Z(e.perms);return{baseAddress:e.start,size:Number(e.end-e.start),protection:t,state:`committed`,type:e.path?`mapped`:`private`,isReadable:(t&1)!=0,isWritable:(t&2)!=0,isExecutable:(t&4)!=0}}function re(e){return Buffer.isBuffer(e)?e:e.startsWith(`0x`)&&e.length%2==0?Buffer.from(e.slice(2),`hex`):Buffer.from(e,`utf8`)}var ie=class{pid;platform=`linux`;constructor(e=process.pid){this.pid=e}isAvailable(){return X()}async read(e,t){let n=this.openProcess(this.pid,!1);return this.readMemory(n,e,t).data}async write(e,t){let n=this.openProcess(this.pid,!0);return this.writeMemory(n,e,t).bytesWritten===t.length}async scan(e){let t=re(e),n=this.openProcess(this.pid,!1),r=await this.queryRegions(),i=[];for(let e of r){if(!e.perms.includes(`r`))continue;let r=Number(e.end-e.start);if(!(r<=0))try{let a=this.readMemory(n,e.start,r).data,o=a.indexOf(t);for(;o>=0;)i.push(e.start+BigInt(o)),o=a.indexOf(t,o+1)}catch{continue}}return i}async queryRegions(){let e=`/proc/${this.pid}/maps`;return J(await N.promises.readFile(e,`utf8`)).map(e=>({start:e.start,end:e.end,perms:`${e.permissions.read?`r`:`-`}${e.permissions.write?`w`:`-`}${e.permissions.exec?`x`:`-`}${e.permissions.private?`p`:`s`}`,path:e.pathname||void 0}))}async checkAvailability(){return this.isAvailable()?{available:!0,platform:`linux`}:{available:!1,platform:`linux`,reason:`Not running on Linux`}}openProcess(e,t){return{pid:e,writeAccess:t}}closeProcess(e){}readMemory(e,t,n){let r=`/proc/${e.pid}/mem`,i=N.openSync(r,e.writeAccess?`r+`:`r`),a=Buffer.alloc(n);try{let e=N.readSync(i,a,0,n,Number(t));return{data:a.subarray(0,e),bytesRead:e}}finally{N.closeSync(i)}}writeMemory(e,t,n){let r=`/proc/${e.pid}/mem`,i=N.openSync(r,`r+`);try{return{bytesWritten:N.writeSync(i,n,0,n.length,Number(t))}}finally{N.closeSync(i)}}queryRegion(e,t){let n=`/proc/${e.pid}/maps`,r=J(N.readFileSync(n,`utf8`));for(let e of r)if(t>=e.start&&t<e.end)return ne({start:e.start,end:e.end,perms:`${e.permissions.read?`r`:`-`}${e.permissions.write?`w`:`-`}${e.permissions.exec?`x`:`-`}${e.permissions.private?`p`:`s`}`,path:e.pathname||void 0});return null}changeProtection(e,t,n,r){throw Error(`Linux memory protection changes are not supported by LinuxMemoryProviderImpl`)}allocateMemory(e,t,n){throw Error(`Linux remote memory allocation is not supported by LinuxMemoryProviderImpl`)}freeMemory(e,t,n){throw Error(`Linux remote memory free is not supported by LinuxMemoryProviderImpl`)}enumerateModules(e){let t=`/proc/${e.pid}/maps`,n=J(N.readFileSync(t,`utf8`)),r=new Map;for(let e of n){if(!e.pathname||e.pathname.startsWith(`[`))continue;let t=r.get(e.pathname);if(t){let n=Number(e.end-t.baseAddress);r.set(e.pathname,{...t,size:n>t.size?n:t.size});continue}r.set(e.pathname,{name:e.pathname.split(`/`).pop()??e.pathname,baseAddress:e.start,size:Number(e.end-e.start)})}return[...r.values()]}},ae=class extends ie{},oe=e({createPlatformProvider:()=>$});let Q=null;function $(){if(Q)return Q;switch(process.platform){case`win32`:Q=new B;break;case`darwin`:Q=new K;break;case`linux`:Q=new ae;break;default:throw Error(`Unsupported platform: ${process.platform}. Memory operations require Windows, macOS, or Linux.`)}if(!Q)throw Error(`Failed to create memory provider`);return Q}export{J as i,oe as n,Y as r,$ as t};
1
+ import{t as e}from"./chunk-C_pMuVsO.mjs";import{_ as t,b as n,d as r,f as i,h as a,i as o,l as s,m as c,n as l,p as u,s as d,t as f,u as p,v as ee,y as m}from"./Win32API-eUCF57l_.mjs";import{_ as h,a as g,b as _,c as v,d as y,f as b,g as x,h as S,i as C,l as w,m as T,n as E,o as D,p as O,r as k,s as A,u as te,v as j,y as M}from"./DarwinAPI-ZfQdpLNI.mjs";import N from"node:fs";const P=new WeakMap;function F(e){let t=P.get(e);if(t===void 0)throw Error(`Invalid ProcessHandle — not a Win32 handle`);return t}function I(e){let t=0;return e&p.READONLY&&(t|=1),e&p.READWRITE&&(t|=3),e&p.WRITECOPY&&(t|=17),e&p.EXECUTE&&(t|=4),e&p.EXECUTE_READ&&(t|=5),e&p.EXECUTE_READWRITE&&(t|=7),e&p.EXECUTE_WRITECOPY&&(t|=21),e&p.GUARD&&(t|=8),t}function L(e){let t=(e&1)!=0,n=(e&2)!=0,r=(e&4)!=0,i=p.NOACCESS;return t&&n&&r?i=p.EXECUTE_READWRITE:t&&r?i=p.EXECUTE_READ:t&&n?i=p.READWRITE:r?i=p.EXECUTE:t&&(i=p.READONLY),e&8&&(i|=p.GUARD),i}function R(e){return e===s.COMMIT?`committed`:e===s.RESERVE?`reserved`:`free`}function z(e){return e===16777216?`image`:e===262144?`mapped`:e===131072?`private`:`unknown`}var B=class{platform=`win32`;async checkAvailability(){return m()?ee()?{available:!0,platform:`win32`}:{available:!1,reason:`koffi FFI library not available`,platform:`win32`}:{available:!1,reason:`Not running on Windows`,platform:`win32`}}openProcess(e,t){let r=n(e,t),i={pid:e,writeAccess:t};return P.set(i,r),i}closeProcess(e){f(F(e))}readMemory(e,t,n){let i=r(F(e),t,n);return{data:i,bytesRead:i.length}}writeMemory(e,n,r){return{bytesWritten:t(F(e),n,r)}}queryRegion(e,t){let{success:n,info:r}=a(F(e),t);if(!n||r.RegionSize===0n)return null;let i=I(r.Protect);return{baseAddress:r.BaseAddress,size:Number(r.RegionSize),protection:i,state:R(r.State),type:z(r.Type),isReadable:(i&1)!=0,isWritable:(i&2)!=0,isExecutable:(i&4)!=0}}changeProtection(e,t,n,r){let{success:i,oldProtect:a}=c(F(e),t,n,L(r));if(!i)throw Error(`VirtualProtectEx failed`);return{oldProtection:I(a)}}allocateMemory(e,t,n){let r=F(e),a=L(n),o=i(r,0n,t,s.COMMIT|s.RESERVE,a);if(!o)throw Error(`VirtualAllocEx failed`);return{address:o}}freeMemory(e,t,n){u(F(e),t,0,s.RELEASE)}enumerateModules(e){let t=F(e),{success:n,modules:r,count:i}=l(t);if(!n)throw Error(`EnumProcessModules failed`);let a=[];for(let e=0;e<i;e++){let n=r[e];if(!n)continue;let i=o(t,n),{success:s,info:c}=d(t,n);s&&c&&a.push({name:i,baseAddress:BigInt(c.lpBaseOfDll),size:c.SizeOfImage})}return a}};const V=new WeakMap;function H(e){let t=V.get(e);if(t===void 0)throw Error(`Invalid ProcessHandle — not a Darwin handle`);return t}function U(e){let t=0;return e&g.READ&&(t|=1),e&g.WRITE&&(t|=2),e&g.EXECUTE&&(t|=4),t}function W(e){let t=g.NONE;return e&1&&(t|=g.READ),e&2&&(t|=g.WRITE),e&4&&(t|=g.EXECUTE),t}function G(e){switch(e){case k.PRIVATE:case k.PRIVATE_ALIASED:case k.COW:return`private`;case k.SHARED:case k.TRUESHARED:case k.SHARED_ALIASED:return`mapped`;case k.EMPTY:return`unknown`;default:return`unknown`}}var K=class{platform=`darwin`;async checkAvailability(){if(!w())return{available:!1,reason:`Not running on macOS`,platform:`darwin`};if(!te())return{available:!1,reason:`koffi FFI library cannot load libSystem.B.dylib`,platform:`darwin`};try{let{kr:e}=_(O(),process.pid);if(e!==E.SUCCESS)return{available:!1,reason:`task_for_pid failed (${y(e)}). Run with sudo or add debugger entitlement.`,platform:`darwin`}}catch(e){let t=e instanceof Error?e.message:String(e);return{available:!1,reason:/signal|bus error|segfault|abort/i.test(t)?`Mach API call crashed (${t}). This may be caused by SIP (System Integrity Protection) on ARM64 macOS. Disable SIP or use a code-signed binary with com.apple.security.cs.debugger entitlement.`:`task_for_pid permission check failed: ${t}. Run with sudo or add debugger entitlement.`,platform:`darwin`}}return{available:!0,platform:`darwin`}}openProcess(e,t){let{kr:n,task:r}=_(O(),e);if(n!==E.SUCCESS)throw Error(`Failed to open process ${e}: ${y(n)} (${n}). `+(n===E.FAILURE?`Run with sudo or sign with com.apple.security.cs.debugger entitlement.`:n===E.INVALID_ARGUMENT?`Invalid PID — process may not exist.`:`Check macOS permissions.`));let i={pid:e,writeAccess:t};return V.set(i,{task:r}),i}closeProcess(e){let t=H(e);b(O(),t.task)}readMemory(e,t,n){let{kr:r,data:i,outsize:a}=h(H(e).task,t,n);if(r!==E.SUCCESS)throw Error(`mach_vm_read_overwrite failed at 0x${t.toString(16)}: ${y(r)} (${r})`);return{data:i,bytesRead:Number(a)}}writeMemory(e,t,n){let r=M(H(e).task,t,n);if(r!==E.SUCCESS)throw Error(`mach_vm_write failed at 0x${t.toString(16)}: ${y(r)} (${r})`);return{bytesWritten:n.length}}queryRegion(e,t){let{kr:n,address:r,size:i,info:a}=j(H(e).task,t);if(n!==E.SUCCESS)return null;let o=U(a.protection);return{baseAddress:r,size:Number(i),protection:o,state:`committed`,type:G(a.behavior),isReadable:(o&1)!=0,isWritable:(o&2)!=0,isExecutable:(o&4)!=0}}changeProtection(e,t,n,r){let i=H(e),a=W(r),{kr:o,info:s}=j(i.task,t),c=o===E.SUCCESS?U(s.protection):0;if((a&g.WRITE)!==0&&(a&g.EXECUTE)!==0){let e=x(i.task,t,BigInt(n),!0,g.ALL);if(e!==E.SUCCESS)throw Error(`mach_vm_protect (set_maximum) failed at 0x${t.toString(16)}: ${y(e)} (${e})`)}let l=x(i.task,t,BigInt(n),!1,a);if(l!==E.SUCCESS)throw Error(`mach_vm_protect failed at 0x${t.toString(16)}: ${y(l)} (${l})`);return{oldProtection:c}}allocateMemory(e,t,n){let r=H(e),{kr:i,address:a}=T(r.task,BigInt(t),C.ANYWHERE);if(i!==E.SUCCESS)throw Error(`mach_vm_allocate failed: ${y(i)} (${i})`);let o=W(n);if(o!==(g.READ|g.WRITE)){let e=x(r.task,a,BigInt(t),!1,o);if(e!==E.SUCCESS)throw S(r.task,a,BigInt(t)),Error(`mach_vm_protect after allocate failed: ${y(e)} (${e})`)}return{address:a}}freeMemory(e,t,n){let r=S(H(e).task,t,BigInt(n));if(r!==E.SUCCESS)throw Error(`mach_vm_deallocate failed at 0x${t.toString(16)}: ${y(r)} (${r})`)}enumerateModules(e){let t=H(e);return e.pid===process.pid?this.enumerateModulesSelf():this.enumerateModulesRemote(t.task)}enumerateModulesSelf(){let e=v(),t=[];for(let n=0;n<e;n++){let e=A(n),r=D(n);if(!e||r===0n)continue;let i=e.split(`/`).pop()??e;t.push({name:i,baseAddress:r,size:0})}return t}enumerateModulesRemote(e){let t=[],n=0n;for(let r=0;r<1e4;r++){let{kr:r,address:i,size:a,info:o}=j(e,n);if(r!==E.SUCCESS)break;let s=(o.protection&g.READ)!==0,c=(o.protection&g.EXECUTE)!==0;if(s&&c&&a>0n)try{let{kr:n,data:r}=h(e,i,4);if(n===E.SUCCESS&&r.length>=4){let e=r.readUInt32LE(0);(e===4277009103||e===4277009102)&&t.push({name:`module_0x${i.toString(16)}`,baseAddress:i,size:Number(a)})}}catch{}n=i+a}return t}};const q=/^([0-9a-f]+)-([0-9a-f]+)\s+([r-][w-][x-][ps])\s+([0-9a-f]+)\s+(\S+)\s+(\d+)\s*(.*)$/i;function J(e){let t=[];for(let n of e.split(/\r?\n/)){let e=n.trimEnd().match(q);if(!e)continue;let r=e[3];t.push({start:BigInt(`0x${e[1]}`),end:BigInt(`0x${e[2]}`),permissions:{read:r[0]===`r`,write:r[1]===`w`,exec:r[2]===`x`,private:r[3]===`p`},offset:BigInt(`0x${e[4]}`),dev:e[5],inode:parseInt(e[6],10),pathname:e[7]?.trim()??``})}return t}function Y(e){return`${e.read?`r`:`-`}${e.write?`w`:`-`}${e.exec?`x`:`-`}`}function X(){return process.platform===`linux`}function Z(e){let t=0;return e.includes(`r`)&&(t|=1),e.includes(`w`)&&(t|=2),e.includes(`x`)&&(t|=4),t}function ne(e){let t=Z(e.perms);return{baseAddress:e.start,size:Number(e.end-e.start),protection:t,state:`committed`,type:e.path?`mapped`:`private`,isReadable:(t&1)!=0,isWritable:(t&2)!=0,isExecutable:(t&4)!=0}}function re(e){return Buffer.isBuffer(e)?e:e.startsWith(`0x`)&&e.length%2==0?Buffer.from(e.slice(2),`hex`):Buffer.from(e,`utf8`)}var ie=class{pid;platform=`linux`;constructor(e=process.pid){this.pid=e}isAvailable(){return X()}async read(e,t){let n=this.openProcess(this.pid,!1);return this.readMemory(n,e,t).data}async write(e,t){let n=this.openProcess(this.pid,!0);return this.writeMemory(n,e,t).bytesWritten===t.length}async scan(e){let t=re(e),n=this.openProcess(this.pid,!1),r=await this.queryRegions(),i=[];for(let e of r){if(!e.perms.includes(`r`))continue;let r=Number(e.end-e.start);if(!(r<=0))try{let a=this.readMemory(n,e.start,r).data,o=a.indexOf(t);for(;o>=0;)i.push(e.start+BigInt(o)),o=a.indexOf(t,o+1)}catch{continue}}return i}async queryRegions(){let e=`/proc/${this.pid}/maps`;return J(await N.promises.readFile(e,`utf8`)).map(e=>({start:e.start,end:e.end,perms:`${e.permissions.read?`r`:`-`}${e.permissions.write?`w`:`-`}${e.permissions.exec?`x`:`-`}${e.permissions.private?`p`:`s`}`,path:e.pathname||void 0}))}async checkAvailability(){return this.isAvailable()?{available:!0,platform:`linux`}:{available:!1,platform:`linux`,reason:`Not running on Linux`}}openProcess(e,t){return{pid:e,writeAccess:t}}closeProcess(e){}readMemory(e,t,n){let r=`/proc/${e.pid}/mem`,i=N.openSync(r,e.writeAccess?`r+`:`r`),a=Buffer.alloc(n);try{let e=N.readSync(i,a,0,n,Number(t));return{data:a.subarray(0,e),bytesRead:e}}finally{N.closeSync(i)}}writeMemory(e,t,n){let r=`/proc/${e.pid}/mem`,i=N.openSync(r,`r+`);try{return{bytesWritten:N.writeSync(i,n,0,n.length,Number(t))}}finally{N.closeSync(i)}}queryRegion(e,t){let n=`/proc/${e.pid}/maps`,r=J(N.readFileSync(n,`utf8`));for(let e of r)if(t>=e.start&&t<e.end)return ne({start:e.start,end:e.end,perms:`${e.permissions.read?`r`:`-`}${e.permissions.write?`w`:`-`}${e.permissions.exec?`x`:`-`}${e.permissions.private?`p`:`s`}`,path:e.pathname||void 0});return null}changeProtection(e,t,n,r){throw Error(`Linux memory protection changes are not supported by LinuxMemoryProviderImpl`)}allocateMemory(e,t,n){throw Error(`Linux remote memory allocation is not supported by LinuxMemoryProviderImpl`)}freeMemory(e,t,n){throw Error(`Linux remote memory free is not supported by LinuxMemoryProviderImpl`)}enumerateModules(e){let t=`/proc/${e.pid}/maps`,n=J(N.readFileSync(t,`utf8`)),r=new Map;for(let e of n){if(!e.pathname||e.pathname.startsWith(`[`))continue;let t=r.get(e.pathname);if(t){let n=Number(e.end-t.baseAddress);r.set(e.pathname,{...t,size:n>t.size?n:t.size});continue}r.set(e.pathname,{name:e.pathname.split(`/`).pop()??e.pathname,baseAddress:e.start,size:Number(e.end-e.start)})}return[...r.values()]}},ae=class extends ie{},oe=e({createPlatformProvider:()=>$});let Q=null;function $(){if(Q)return Q;switch(process.platform){case`win32`:Q=new B;break;case`darwin`:Q=new K;break;case`linux`:Q=new ae;break;default:throw Error(`Unsupported platform: ${process.platform}. Memory operations require Windows, macOS, or Linux.`)}if(!Q)throw Error(`Failed to create memory provider`);return Q}export{J as i,oe as n,Y as r,$ as t};