@jshookmcp/jshook 0.3.0 → 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 (346) hide show
  1. package/LICENSE +661 -661
  2. package/README.md +32 -49
  3. package/README.zh.md +32 -47
  4. package/dist/AntiCheatDetector-B6d4Qe9D.mjs +1 -0
  5. package/dist/BrowserSessionCoordinator-BJ-HOxo0.mjs +1 -0
  6. package/dist/CacheAdapters-CsNtQIR8.mjs +1 -0
  7. package/dist/CodeInjector-Cll_7bLJ.mjs +1 -0
  8. package/dist/ConsoleMonitor-CxDJV15E.mjs +306 -0
  9. package/dist/DOMInspector-C19J4zeq.mjs +95 -0
  10. package/dist/DarwinAPI-ZfQdpLNI.mjs +1 -0
  11. package/dist/DetailedDataManager-DmQ1LT-W.mjs +1 -0
  12. package/dist/EventBus-DL8iLA09.mjs +1 -0
  13. package/dist/EvidenceGraphBridge-BtbwXsLC.mjs +1 -0
  14. package/dist/ExtensionManager-BD724zkO.mjs +1 -0
  15. package/dist/ExtensionManager.tools-oVMJgPcN.mjs +1 -0
  16. package/dist/FingerprintManager-DT0EAUEo.mjs +1 -0
  17. package/dist/HardwareBreakpoint-BUfPdp0f.mjs +1 -0
  18. package/dist/HeapAnalyzer-B_aqY8oj.mjs +1 -0
  19. package/dist/{HookGeneratorBuilders.core.generators.storage-CTbB4Lcx.mjs → HookGeneratorBuilders.core.generators.storage-DzD6dIJd.mjs} +66 -101
  20. package/dist/InstrumentationSession-D_G1ZPyd.mjs +1 -0
  21. package/dist/MCPServer.search.handlers.domain-BbS-6LnX.mjs +1 -0
  22. package/dist/MemoryController-X1XNSn1n.mjs +2 -0
  23. package/dist/MemoryScanSession-DG_F-PjE.mjs +1 -0
  24. package/dist/MemoryScanner-g1_L1ub5.mjs +1 -0
  25. package/dist/NativeMemoryManager.impl-DniBe2wf.mjs +1 -0
  26. package/dist/NativeMemoryManager.utils-BHy1P_jM.mjs +1 -0
  27. package/dist/NetworkMonitor-B_-au6aV.mjs +185 -0
  28. package/dist/PEAnalyzer-yWQaGrcx.mjs +1 -0
  29. package/dist/PageController-Dfsm1_o7.mjs +1 -0
  30. package/dist/PointerChainEngine-BhCUkmxY.mjs +1 -0
  31. package/dist/PrerequisiteError-BjCQA-gK.mjs +1 -0
  32. package/dist/ProcessRegistry-C-bN48oR.mjs +1 -0
  33. package/dist/ResponseBuilder-BfWP-uaT.mjs +1 -0
  34. package/dist/ReverseEvidenceGraph-BhSYYdiI.mjs +2 -0
  35. package/dist/RingBuffer-Dm54ELKT.mjs +1 -0
  36. package/dist/ScriptManager-LWGPTdvD.mjs +7 -0
  37. package/dist/ServerRuntimeState-D2bWHqEE.mjs +1 -0
  38. package/dist/Speedhack-yseDPSZ9.mjs +1 -0
  39. package/dist/StealthVerifier-BmcxfwSF.mjs +1 -0
  40. package/dist/StructureAnalyzer-C5lpuZkg.mjs +2 -0
  41. package/dist/ToolCatalog-CYdD9F5f.mjs +1 -0
  42. package/dist/ToolError-DWU_z7gp.mjs +1 -0
  43. package/dist/ToolProbe-C7ZU2x7M.mjs +1 -0
  44. package/dist/ToolRegistry-C5oB8KP8.mjs +1 -0
  45. package/dist/ToolRouter.policy-CfhJczkt.mjs +4 -0
  46. package/dist/TraceRecorder-BiJWBXHX.mjs +272 -0
  47. package/dist/VersionDetector-CHT36Az0.mjs +9 -0
  48. package/dist/Win32API-eUCF57l_.mjs +1 -0
  49. package/dist/Win32Debug-CYrIQBvr.mjs +1 -0
  50. package/dist/WorkflowEngine-D876meOO.mjs +1 -0
  51. package/dist/analysis-D4swdMvq.mjs +6 -0
  52. package/dist/{antidebug-BRKeyt27.mjs → antidebug-7L3ygj_9.mjs} +8 -259
  53. package/dist/apk-packer-BqXcInnX.mjs +1 -0
  54. package/dist/artifactRetention-BCPQASm7.mjs +1 -0
  55. package/dist/artifacts-CkodUM4j.mjs +1 -0
  56. package/dist/authorization-schema-BOFwSXUN.mjs +1 -0
  57. package/dist/betterSqlite3-Brtq-SIQ.mjs +1 -0
  58. package/dist/binary-instrument-DU7V6TUM.mjs +7 -0
  59. package/dist/binary-secrets-PdMVoyt0.mjs +1 -0
  60. package/dist/bind-helpers-m2U8glkF.mjs +1 -0
  61. package/dist/boringssl-inspector-BBaJwwkU.mjs +2 -0
  62. package/dist/browser-Qqco2rOT.mjs +11 -0
  63. package/dist/capabilities-CyXuKUl1.mjs +1 -0
  64. package/dist/chunk-C_pMuVsO.mjs +1 -0
  65. package/dist/collector-Bpl6qy2L.mjs +1 -0
  66. package/dist/concurrency-DCr8WQ2M.mjs +1 -0
  67. package/dist/constants-BYj8Xek8.mjs +1 -0
  68. package/dist/coordination-CWXW1o8K.mjs +1 -0
  69. package/dist/dart-inspector-7AkPeZ_Q.mjs +0 -0
  70. package/dist/debugger-DyALjYMk.mjs +1 -0
  71. package/dist/definitions-BWxBke3r.mjs +1 -0
  72. package/dist/definitions-BYwATKc-.mjs +1 -0
  73. package/dist/definitions-B_83XfNQ.mjs +1 -0
  74. package/dist/definitions-Bf3H1EwV.mjs +1 -0
  75. package/dist/definitions-BftdXgXI.mjs +1 -0
  76. package/dist/definitions-Bio5XJYy.mjs +1 -0
  77. package/dist/definitions-C3qNgSn1.mjs +1 -0
  78. package/dist/definitions-CB6vmOer.mjs +1 -0
  79. package/dist/definitions-CMZRSy3k.mjs +1 -0
  80. package/dist/definitions-CQd7yCQH.mjs +1 -0
  81. package/dist/definitions-CT8ln6GQ.mjs +1 -0
  82. package/dist/definitions-Cenu6mxo.mjs +1 -0
  83. package/dist/definitions-D4g-MS10.mjs +1 -0
  84. package/dist/definitions-D5wl_8HN.mjs +1 -0
  85. package/dist/definitions-DAQm1Xar.mjs +1 -0
  86. package/dist/definitions-DP1vgxEY.mjs +1 -0
  87. package/dist/definitions-DxFNRQNK2.mjs +1 -0
  88. package/dist/definitions-Ibci7e_L.mjs +1 -0
  89. package/dist/definitions-OeLvmlQy.mjs +1 -0
  90. package/dist/definitions-RZYGD_Ey.mjs +1 -0
  91. package/dist/definitions-Tls8c0A0.mjs +1 -0
  92. package/dist/definitions-bybDvnG0.mjs +26 -0
  93. package/dist/definitions-l7TjdE6V.mjs +1 -0
  94. package/dist/encoding-ycOaz8Vr.mjs +2 -0
  95. package/dist/ensure-browser-core-DxWC-NTp.mjs +1 -0
  96. package/dist/evidence-graph-bridge-CV_UdYqj.mjs +1 -0
  97. package/dist/factory-CKr4fAE1.mjs +1 -0
  98. package/dist/flat-target-session-DvcQX7J5.mjs +1 -0
  99. package/dist/formatAddress-vLA_hOJt.mjs +1 -0
  100. package/dist/graphql-B2TiPEow.mjs +62 -0
  101. package/dist/handlers-0yKLRIfo.mjs +2 -0
  102. package/dist/handlers-8zN_vBIz.mjs +1 -0
  103. package/dist/handlers-B62K4FTc.mjs +1 -0
  104. package/dist/handlers-BpDlVVVU.mjs +1 -0
  105. package/dist/handlers-CMJK7m1c.mjs +31 -0
  106. package/dist/handlers-D2ZOul9p.mjs +54 -0
  107. package/dist/handlers-D5E40ssn.mjs +5 -0
  108. package/dist/handlers-DGbdQAgD.mjs +4 -0
  109. package/dist/handlers-DHO3rjsW.mjs +1 -0
  110. package/dist/handlers-FJ80VzUI.mjs +2 -0
  111. package/dist/handlers-VHWrxbM_.mjs +1 -0
  112. package/dist/handlers-l8QIKqBj.mjs +2 -0
  113. package/dist/handlers-mPFiNPe8.mjs +302 -0
  114. package/dist/{handlers-Dz9PYsCa.mjs → handlers-yo_xYzT8.mjs} +118 -904
  115. package/dist/handlers.impl-D9Hh8Bgl.mjs +1 -0
  116. package/dist/hooks-D4XLfgtV.mjs +600 -0
  117. package/dist/index.mjs +13 -5240
  118. package/dist/jadx-search-B_Yse0Zh.mjs +5 -0
  119. package/dist/logger-sBC6IdRT.mjs +1 -0
  120. package/dist/maintenance-BUpIukhg.mjs +1 -0
  121. package/dist/manifest-0Jpt_AQa.mjs +1 -0
  122. package/dist/manifest-B3fZbSWR.mjs +1 -0
  123. package/dist/manifest-B7NB2rh2.mjs +1 -0
  124. package/dist/manifest-BDi4nbH1.mjs +1 -0
  125. package/dist/manifest-BLDfkE7n.mjs +1 -0
  126. package/dist/manifest-BcXbB4gf.mjs +1 -0
  127. package/dist/manifest-Bdnc_vrc.mjs +1 -0
  128. package/dist/manifest-BuYKgCnp.mjs +1 -0
  129. package/dist/manifest-CBfNnGPV.mjs +1 -0
  130. package/dist/manifest-CPS1Xv69.mjs +1 -0
  131. package/dist/manifest-CQH9FhwI.mjs +1 -0
  132. package/dist/manifest-CRryuZF4.mjs +1 -0
  133. package/dist/manifest-CctIumog.mjs +1 -0
  134. package/dist/manifest-CvTe5ZGV2.mjs +1 -0
  135. package/dist/manifest-D-5GH0DV.mjs +1 -0
  136. package/dist/manifest-D3Ssf3IC.mjs +1 -0
  137. package/dist/manifest-D5ck3NvC.mjs +1 -0
  138. package/dist/manifest-D9jUUJAu.mjs +1 -0
  139. package/dist/manifest-DCx6w2XV.mjs +1 -0
  140. package/dist/manifest-DG19q-Ld.mjs +1 -0
  141. package/dist/manifest-DLMlD0Zc.mjs +1 -0
  142. package/dist/manifest-DYpn8w_h.mjs +1 -0
  143. package/dist/manifest-DYzWI8Xs.mjs +1 -0
  144. package/dist/manifest-D_obs5F4.mjs +1 -0
  145. package/dist/manifest-DujQqEQR.mjs +2 -0
  146. package/dist/manifest-DwL2ik8P.mjs +1 -0
  147. package/dist/manifest-ItF5P8A12.mjs +1 -0
  148. package/dist/manifest-KZphqIyX.mjs +1 -0
  149. package/dist/manifest-LG42zPLY2.mjs +1 -0
  150. package/dist/manifest-LLdI5m4T.mjs +1 -0
  151. package/dist/manifest-QYbQXJn0.mjs +1 -0
  152. package/dist/manifest-RcpX_MyZ.mjs +123 -0
  153. package/dist/manifest-YgVd8Sgz.mjs +1 -0
  154. package/dist/manifest-Zy7Odg5J.mjs +1 -0
  155. package/dist/manifest-ff1H7Pdp.mjs +1 -0
  156. package/dist/manifest-iuhF6pTL2.mjs +1 -0
  157. package/dist/manifest-nXHmtMSp2.mjs +1 -0
  158. package/dist/manifest-xWfu6iLo.mjs +1 -0
  159. package/dist/manifest-yC16OhL2.mjs +1 -0
  160. package/dist/manifest-ztWJoXy4.mjs +1 -0
  161. package/dist/matchesWildcardPattern-BAG6LvX5.mjs +1 -0
  162. package/dist/modules-BPBcSaM-.mjs +333 -0
  163. package/dist/mojo-ipc-BhwsdVUW.mjs +9 -0
  164. package/dist/native/scripts/linux/enum-windows.sh +12 -12
  165. package/dist/native/scripts/macos/enum-windows.applescript +22 -22
  166. package/dist/native-j8l473zn.mjs +961 -0
  167. package/dist/network-T0VRwNPd.mjs +7 -0
  168. package/dist/outputPaths-B4Ic4RZh.mjs +2 -0
  169. package/dist/parse-args-Bw413PlW.mjs +1 -0
  170. package/dist/platform-CzaQtISh.mjs +93 -0
  171. package/dist/playwright-cdp-fallback-DqFdx9-s.mjs +1 -0
  172. package/dist/process-CWhsCWrf.mjs +2 -0
  173. package/dist/proxy-DZFlDsG3.mjs +2 -0
  174. package/dist/registry-DH4sc1dt.mjs +1 -0
  175. package/dist/renderer-pid-9tJnZ_9N.mjs +1 -0
  176. package/dist/response-C7rKQst4.mjs +1 -0
  177. package/dist/search-defaults-lYBVn_3L.mjs +1 -0
  178. package/dist/server/plugin-api.d.mts +19 -36
  179. package/dist/server/plugin-api.mjs +1 -293
  180. package/dist/shared-state-board-BSjXLUV1.mjs +1 -0
  181. package/dist/sourcemap-Dh3Ai_ur.mjs +1 -0
  182. package/dist/ssrf-policy-CsIJGkpd.mjs +1 -0
  183. package/dist/streaming-BcJ0B6ao.mjs +1 -0
  184. package/dist/tool-builder-qif8M9-K.mjs +1 -0
  185. package/dist/transform-DOxzeWPB.mjs +103 -0
  186. package/dist/types-D9EiE5o9.mjs +1 -0
  187. package/dist/types-Fz69RzbZ.mjs +1 -0
  188. package/dist/wasm-CZ_HTfKR.mjs +174 -0
  189. package/dist/webcrack-C1iYG_EX.mjs +46 -0
  190. package/dist/workflow-BdwQmARn.mjs +101 -0
  191. package/package.json +55 -82
  192. package/src/native/scripts/linux/enum-windows.sh +12 -12
  193. package/src/native/scripts/macos/enum-windows.applescript +22 -22
  194. package/dist/AntiCheatDetector-CqGDXmfc.mjs +0 -350
  195. package/dist/CacheAdapters-jJFy20G-.mjs +0 -80
  196. package/dist/CodeInjector-BdjRfNx7.mjs +0 -150
  197. package/dist/ConsoleMonitor-DykL3IAw.mjs +0 -2269
  198. package/dist/DarwinAPI-ETyy0xyo.mjs +0 -363
  199. package/dist/DetailedDataManager-HT49OrvF.mjs +0 -217
  200. package/dist/EventBus-DFKvADm3.mjs +0 -141
  201. package/dist/EvidenceGraphBridge-318Oi0Lf.mjs +0 -153
  202. package/dist/ExtensionManager-BDMsY2Dz.mjs +0 -721
  203. package/dist/FingerprintManager-BN4UQWnX.mjs +0 -96
  204. package/dist/HardwareBreakpoint-Cc2AFq1Y.mjs +0 -239
  205. package/dist/HeapAnalyzer-DruMgsgj.mjs +0 -284
  206. package/dist/InstrumentationSession-DLH0vd-z.mjs +0 -244
  207. package/dist/MemoryController-CMtviNW_.mjs +0 -167
  208. package/dist/MemoryScanSession-ITgb_NMi.mjs +0 -278
  209. package/dist/MemoryScanner-CiL7Z3ey.mjs +0 -428
  210. package/dist/NativeMemoryManager.impl-D9Lkovvn.mjs +0 -485
  211. package/dist/NativeMemoryManager.utils-BBlAixF5.mjs +0 -165
  212. package/dist/PEAnalyzer-DMQ44gen.mjs +0 -385
  213. package/dist/PageController-BPJNqqBN.mjs +0 -431
  214. package/dist/PointerChainEngine-K7wN8Z-w.mjs +0 -325
  215. package/dist/PrerequisiteError-TuyZIs6n.mjs +0 -20
  216. package/dist/ProcessRegistry-zGg12QbE.mjs +0 -74
  217. package/dist/ResponseBuilder-CJXWmWNw.mjs +0 -143
  218. package/dist/ReverseEvidenceGraph-C02-gXOh.mjs +0 -269
  219. package/dist/ScriptManager-ZuWD-0Jg.mjs +0 -3003
  220. package/dist/Speedhack-D-z0umeT.mjs +0 -156
  221. package/dist/StealthVerifier-BWmPgQsv.mjs +0 -135
  222. package/dist/StructureAnalyzer-Cav5AVSL.mjs +0 -429
  223. package/dist/ToolCatalog-5OJdMiF0.mjs +0 -582
  224. package/dist/ToolError-jh9whhMd.mjs +0 -15
  225. package/dist/ToolProbe-DbCFGyrg.mjs +0 -45
  226. package/dist/ToolRegistry-B9krbTtI.mjs +0 -180
  227. package/dist/ToolRouter.policy-BGDAGyeH.mjs +0 -344
  228. package/dist/TraceRecorder-B41Z5XBj.mjs +0 -1286
  229. package/dist/VersionDetector-K3V4vGsw.mjs +0 -104
  230. package/dist/Win32API-C2kjj0ze.mjs +0 -346
  231. package/dist/Win32Debug-CKrGOTpo.mjs +0 -274
  232. package/dist/WorkflowEngine-DJ6M4opp.mjs +0 -569
  233. package/dist/analysis-BHeJW2Nb.mjs +0 -1234
  234. package/dist/artifactRetention-CPXkUJXp.mjs +0 -598
  235. package/dist/artifacts-DkfosXH3.mjs +0 -59
  236. package/dist/authorization-schema-DRqyJMSk.mjs +0 -31
  237. package/dist/betterSqlite3-DLSBZodi.mjs +0 -74
  238. package/dist/binary-instrument--V3MAhJ4.mjs +0 -971
  239. package/dist/bind-helpers-ClV34xdn.mjs +0 -42
  240. package/dist/boringssl-inspector-Bo_LOLaS.mjs +0 -180
  241. package/dist/browser-Dx3_S2cG.mjs +0 -4369
  242. package/dist/capabilities-CcHlvWgK.mjs +0 -33
  243. package/dist/chunk-CjcI7cDX.mjs +0 -15
  244. package/dist/concurrency-Drev_Vz9.mjs +0 -41
  245. package/dist/constants-CDZLOoVv.mjs +0 -534
  246. package/dist/coordination-DgItD9DL.mjs +0 -259
  247. package/dist/debugger-RS3RSAqs.mjs +0 -1288
  248. package/dist/definitions-BEoYofW5.mjs +0 -47
  249. package/dist/definitions-BRaefg3u.mjs +0 -365
  250. package/dist/definitions-BbkvZkiv.mjs +0 -96
  251. package/dist/definitions-BtWSHJ3o.mjs +0 -17
  252. package/dist/definitions-C1gCHO0i.mjs +0 -43
  253. package/dist/definitions-CDOg_b-l.mjs +0 -138
  254. package/dist/definitions-CVPD9hzZ.mjs +0 -54
  255. package/dist/definitions-Cea8Lgl7.mjs +0 -94
  256. package/dist/definitions-DAgIyjxM.mjs +0 -10
  257. package/dist/definitions-DJA27nsL.mjs +0 -66
  258. package/dist/definitions-DKPFU3LW.mjs +0 -25
  259. package/dist/definitions-DPRpZQ96.mjs +0 -47
  260. package/dist/definitions-DUE5gmdn.mjs +0 -18
  261. package/dist/definitions-DYVjOtxa.mjs +0 -26
  262. package/dist/definitions-DcYLVLCo.mjs +0 -37
  263. package/dist/definitions-Pp5LI2H4.mjs +0 -27
  264. package/dist/definitions-j9KdHVNR.mjs +0 -14
  265. package/dist/definitions-uzkjBwa7.mjs +0 -258
  266. package/dist/definitions-va-AnLuQ.mjs +0 -28
  267. package/dist/encoding-DJeqHmpd.mjs +0 -1079
  268. package/dist/evidence-graph-bridge-DcYizFk2.mjs +0 -136
  269. package/dist/factory-C90tBff6.mjs +0 -575
  270. package/dist/flat-target-session-Dgax2Cy3.mjs +0 -29
  271. package/dist/formatAddress-nnMvEohD.mjs +0 -17
  272. package/dist/graphql-CoHrhweh.mjs +0 -1197
  273. package/dist/handlers-4jmR0nMs.mjs +0 -898
  274. package/dist/handlers-BAHPxcch.mjs +0 -789
  275. package/dist/handlers-BOs9b907.mjs +0 -2600
  276. package/dist/handlers-BWXEy6ef.mjs +0 -917
  277. package/dist/handlers-Bndn6QvE.mjs +0 -111
  278. package/dist/handlers-BqC4bD4s.mjs +0 -681
  279. package/dist/handlers-BtYq60bM2.mjs +0 -276
  280. package/dist/handlers-BzgcB4iv.mjs +0 -799
  281. package/dist/handlers-CRyRWj2b.mjs +0 -859
  282. package/dist/handlers-CVv2H1uq.mjs +0 -592
  283. package/dist/handlers-Dl5a7JS4.mjs +0 -572
  284. package/dist/handlers-Dx2d7jt7.mjs +0 -2537
  285. package/dist/handlers-HujRKC3b.mjs +0 -661
  286. package/dist/handlers.impl-XWXkQfyi.mjs +0 -807
  287. package/dist/hooks-B1B8NRHL.mjs +0 -898
  288. package/dist/logger-Dh_xb7_2.mjs +0 -93
  289. package/dist/maintenance-PRMkLVRW.mjs +0 -835
  290. package/dist/manifest-67Bok-Si.mjs +0 -58
  291. package/dist/manifest-6lNTMZAB2.mjs +0 -87
  292. package/dist/manifest-B2duEHiH.mjs +0 -90
  293. package/dist/manifest-B6EY9Vm8.mjs +0 -57
  294. package/dist/manifest-B6nKSbyY.mjs +0 -95
  295. package/dist/manifest-BL8AQNPF.mjs +0 -106
  296. package/dist/manifest-BSZvJJmV.mjs +0 -47
  297. package/dist/manifest-BU7qzUyX.mjs +0 -418
  298. package/dist/manifest-Bl62e8WK.mjs +0 -49
  299. package/dist/manifest-Bo5cXjdt.mjs +0 -82
  300. package/dist/manifest-BpS4gtUK.mjs +0 -1347
  301. package/dist/manifest-Bv65_e2W.mjs +0 -101
  302. package/dist/manifest-BytNIF4Z.mjs +0 -117
  303. package/dist/manifest-C-xtsjS3.mjs +0 -81
  304. package/dist/manifest-CDYl7OhA.mjs +0 -66
  305. package/dist/manifest-CRZ3xmkD.mjs +0 -61
  306. package/dist/manifest-CoW6u4Tp.mjs +0 -132
  307. package/dist/manifest-Cq5zN_8A.mjs +0 -50
  308. package/dist/manifest-D7YZM_2e.mjs +0 -194
  309. package/dist/manifest-DE_VrAeQ.mjs +0 -314
  310. package/dist/manifest-DGsXSCpT.mjs +0 -39
  311. package/dist/manifest-DJ2vfEuW.mjs +0 -156
  312. package/dist/manifest-DPXDYhEu.mjs +0 -80
  313. package/dist/manifest-Dd4fQb0a.mjs +0 -322
  314. package/dist/manifest-Deq6opGg.mjs +0 -223
  315. package/dist/manifest-DfJTafJK.mjs +0 -37
  316. package/dist/manifest-DgOdgN_j.mjs +0 -50
  317. package/dist/manifest-DlbMW4v4.mjs +0 -47
  318. package/dist/manifest-DmVfbH0w.mjs +0 -374
  319. package/dist/manifest-Dog6Ddjr.mjs +0 -109
  320. package/dist/manifest-DvgU5FWb.mjs +0 -58
  321. package/dist/manifest-HsfDBs7j.mjs +0 -50
  322. package/dist/manifest-I8oQHvCG.mjs +0 -186
  323. package/dist/manifest-NvH_a-av.mjs +0 -786
  324. package/dist/manifest-cEJU1v0Z.mjs +0 -129
  325. package/dist/manifest-wOl5XLB12.mjs +0 -112
  326. package/dist/modules-tZozf0LQ.mjs +0 -10635
  327. package/dist/mojo-ipc-DXNEXEqb.mjs +0 -640
  328. package/dist/network-CPVvwvFg.mjs +0 -3852
  329. package/dist/outputPaths-um7lCRY3.mjs +0 -1141
  330. package/dist/parse-args-B4cY5Vx5.mjs +0 -39
  331. package/dist/platform-CYeFoTWp.mjs +0 -2161
  332. package/dist/process-BTbgcVc6.mjs +0 -1306
  333. package/dist/proxy-r8YN6nP1.mjs +0 -192
  334. package/dist/registry-Bl8ZQW61.mjs +0 -34
  335. package/dist/response-CWhh2aLo.mjs +0 -34
  336. package/dist/shared-state-board-BoZnSoj-.mjs +0 -586
  337. package/dist/sourcemap-BIDHUVXy.mjs +0 -934
  338. package/dist/ssrf-policy-Dsqd-DTX.mjs +0 -166
  339. package/dist/streaming-Dal6utPp.mjs +0 -725
  340. package/dist/tool-builder-BHJp32mV.mjs +0 -186
  341. package/dist/transform-DRVgGG90.mjs +0 -1011
  342. package/dist/types-Bx92KJfT.mjs +0 -4
  343. package/dist/types-DDBWs9UP.mjs +0 -37
  344. package/dist/wasm-BYx5UOeG.mjs +0 -1044
  345. package/dist/webcrack-Be0_FccV.mjs +0 -747
  346. package/dist/workflow-BpuKEtvn.mjs +0 -725
@@ -0,0 +1,5 @@
1
+ import{t as e}from"./ToolError-DWU_z7gp.mjs";import{o as t,r as n,s as r,t as i}from"./parse-args-Bw413PlW.mjs";import{n as a}from"./ResponseBuilder-BfWP-uaT.mjs";import"./definitions-DP1vgxEY.mjs";import{promises as o}from"node:fs";import{posix as s,resolve as c,sep as l}from"node:path";import{execFile as u,spawn as d}from"node:child_process";import{promisify as f}from"node:util";const p=(e,t)=>{let n=process.env[e];if(n===void 0||n===``)return t;let r=parseInt(n,10);return Number.isFinite(r)?r:t},m=(e,t)=>process.env[e]||t,h=p(`JADX_SEARCH_MAX_RESULTS`,500),g=p(`JADX_SEARCH_DEFAULT_CONTEXT_LINES`,2),_=p(`JADX_SEARCH_MAX_CONTEXT_LINES`,20),v=p(`JADX_SEARCH_MAX_MATCHES_PER_FILE`,100),y=p(`JADX_SEARCH_TIMEOUT_MS`,6e4),b=p(`JADX_SEARCH_REGEX_TIMEOUT_MS`,50),x=p(`JADX_SEARCH_MAX_QUERY_LENGTH`,1024),S=p(`JADX_SEARCH_FALLBACK_FILE_LIMIT`,5e4),C=p(`JADX_SEARCH_RG_MAX_BUFFER_BYTES`,128*1024*1024),w=m(`JADX_SEARCH_DEFAULT_GLOBS`,`**/*.java,**/*.kt`).split(`,`),T=p(`JADX_SEARCH_MAX_LINE_BYTES`,64*1024),E=Object.freeze([/\([^()]*[+*][^()]*\)[+*]/,/\([^()]*\|[^()]*\)[+*][^()]*[+*]/]);function D(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`)}function O(t,n,r){let i=n?D(t):t;if(!n){for(let n of E)if(n.test(i))throw new e(`VALIDATION`,`query rejected as potentially catastrophic (ReDoS heuristic match)`,{details:{query:t}})}let a=r?`gi`:`g`;try{return new RegExp(i,a)}catch(n){throw new e(`VALIDATION`,`query failed to compile as regex: ${n.message}`,{cause:n,details:{query:t}})}}function k(e){return e.map(e=>{let t=e.startsWith(`!`);return{negate:t,re:M(t?e.slice(1):e)}})}function A(e,t){let n=!1,r=!1;for(let{negate:i,re:a}of t)if(i||(r=!0),a.test(e)){if(i)return!1;n=!0}return r?n:!0}const j=/[\\^$.+()|[\]{}]/;function M(e){let t=`^`,n=0;for(;n<e.length;){let r=e[n];if(r===`*`){if(e[n+1]===`*`){t+=`.*`,n+=2,e[n]===`/`&&(n+=1);continue}t+=`[^/]*`}else r===`?`?t+=`[^/]`:r!==void 0&&j.test(r)?t+=`\\`+r:r===`/`?t+=`/`:r!==void 0&&(t+=r);n+=1}return t+=`$`,new RegExp(t)}function N(e,t){let n=e.split(l).join(`/`),r=t.split(l).join(`/`),i=r.endsWith(`/`)?r:`${r}/`;return n.startsWith(i)?n.slice(i.length):n}function P(e){return e.split(/\r?\n/)}function F(t,n,r){t.lastIndex=r;let i=performance.now(),a=t.exec(n),o=performance.now()-i;if(o>b)throw new e(`TIMEOUT`,`Regex match exceeded JADX_SEARCH_REGEX_TIMEOUT_MS (${b} ms): ${o.toFixed(2)} ms`,{details:{pattern:t.source,elapsedMs:o}});return a}async function I(t,n,r=S){let i;try{i=await o.readdir(t,{recursive:!0})}catch(n){throw new e(`NOT_FOUND`,`decompileDir not readable: ${t}`,{cause:n})}let a=k(n),s=[];for(let e of i){if(s.length>=r)break;let t=e.split(l).join(`/`);A(t,a)&&s.push(t)}return s}var L=class{async run(e){let t=c(e.decompileDir),n=await I(t,e.globs),r=O(e.query,e.literal,e.caseInsensitive),i=[],a=new Set,u=!1;outer:for(let c of n){let n=s.join(t.split(l).join(`/`),c),d;try{d=await o.readFile(n,`utf8`)}catch{continue}let f=P(d),p=0,m=N(n,t);for(let t=0;t<f.length;t+=1){let n=f[t];if(n===void 0||n.length>T)continue;let o=0,s=F(r,n,o);for(;s!==null;){if(p>=e.maxMatchesPerFile){u=!0;break}let c=s.index+1,l=s.index+s[0].length+1,d={file:m,line:t+1,column:c,text:n,matchStart:c,matchEnd:l};if(e.contextLines>0){let n=[];for(let r=Math.max(0,t-e.contextLines);r<t;r+=1){let e=f[r];e!==void 0&&n.push({line:r+1,text:e})}let r=[];for(let n=t+1;n<Math.min(f.length,t+1+e.contextLines);n+=1){let e=f[n];e!==void 0&&r.push({line:n+1,text:e})}d.context={before:n,after:r}}if(i.push(d),a.add(m),p+=1,i.length>=e.maxResults){u=!0;break outer}let h=s[0].length;if(o=s.index+(h>0?h:1),o>n.length)break;s=F(r,n,o)}}}return{matches:i,filesMatched:a.size,truncated:u}}};const R=f(u);let z,B;async function V(e=3e3){return z||B||(B=(async()=>{try{let t=process.platform===`win32`?`where`:`which`,{stdout:n}=await R(t,[`rg`],{timeout:e,windowsHide:!0}),r=n.trim().split(/\r?\n/)[0];if(!r){let e={available:!1,reason:`'${t} rg' produced empty output`};return z=e,e}let i;try{let{stdout:t}=await R(`rg`,[`--version`],{timeout:e,windowsHide:!0}),n=t.trim().split(/\r?\n/)[0];i=n?n.substring(0,100):void 0}catch{}let a=i?{available:!0,path:r,version:i}:{available:!0,path:r};return z=a,a}catch(e){let t=typeof e==`object`&&e&&`code`in e?e.code:void 0,n=e instanceof Error?e.message:String(e?.message??e),r={available:!1,reason:t===`ENOENT`?`Command 'rg' not found in PATH — install ripgrep (brew/apt/scoop install ripgrep)`:`Probe failed: ${n.substring(0,200)}`};return z=r,r}finally{B=void 0}})(),B)}function H(e,t){let n=t.split(l).join(`/`),r=e.split(l).join(`/`),i=n.endsWith(`/`)?n:`${n}/`;return r.startsWith(i)?r.slice(i.length):r}function U(e){return e.endsWith(`\r
2
+ `)?e.slice(0,-2):e.endsWith(`
3
+ `)||e.endsWith(`\r`)?e.slice(0,-1):e}function W(e){return U(e)}function G(e){let t=[`--json`,`--no-heading`,`-n`,`--no-config`];e.literal&&t.push(`-F`),e.caseInsensitive&&t.push(`-i`),e.contextLines>0&&t.push(`-C`,String(e.contextLines)),t.push(`--max-count`,String(e.maxMatchesPerFile));for(let n of e.globs)t.push(`--glob`,n);return t.push(`--`,e.query,e.decompileDir),t}var K=class{spawnFn;rgExecutable;constructor(e=d,t=`rg`){this.spawnFn=e,this.rgExecutable=t}async run(t){let n=c(t.decompileDir),r=G({...t,decompileDir:n}),i=this.spawnFn(this.rgExecutable,r,{stdio:[`ignore`,`pipe`,`pipe`],windowsHide:!0}),a=0,o=``,s=``,l=[],u=new Set,d=!1,f=new Map,p=e=>{f.delete(e)},m=e=>{if(e.type===`begin`){let t=e.data.path.text,r=H(t,n);return f.has(r)||f.set(r,{recentLines:[],pendingAfter:[],matchCount:0}),!0}if(e.type===`end`){let t=e.data.path.text;return p(H(t,n)),!0}if(e.type===`context`){let r=e,i=H(r.data.path.text,n),a=f.get(i);if(!a)return!0;let o=W(r.data.lines.text),s={line:r.data.line_number,text:o},c=[];for(let e of a.pendingAfter)e.afterRemaining>0&&e.match.context&&(e.match.context.after.push(s),--e.afterRemaining),e.afterRemaining>0&&c.push(e);return a.pendingAfter=c,a.recentLines.push(s),a.recentLines.length>Math.max(t.contextLines,8)&&a.recentLines.shift(),!0}if(e.type===`match`){let r=e,i=H(r.data.path.text,n),a=f.get(i)??{recentLines:[],pendingAfter:[],matchCount:0};if(f.has(i)||f.set(i,a),a.matchCount>=t.maxMatchesPerFile)return d=!0,!0;if(l.length>=t.maxResults)return d=!0,!1;let o=r.data.submatches[0];if(!o)return!0;let s=W(r.data.lines.text),c=o.start+1,p=o.end+1,m={file:i,line:r.data.line_number,column:c,text:s,matchStart:c,matchEnd:p};return t.contextLines>0&&(m.context={before:a.recentLines.filter(e=>e.line<r.data.line_number).slice(-t.contextLines),after:[]},a.pendingAfter.push({match:m,afterRemaining:t.contextLines})),l.push(m),u.add(i),a.matchCount+=1,l.length>=t.maxResults?(d=!0,!1):!0}return!0};return new Promise((t,n)=>{let r=setTimeout(()=>{i.kill(`SIGKILL`),n(new e(`TIMEOUT`,`ripgrep timed out after ${y} ms`,{details:{timeoutMs:y}}))},y),c=!1,f=()=>{c||(c=!0,clearTimeout(r))};i.stdout?.setEncoding(`utf8`),i.stderr?.setEncoding(`utf8`),i.stdout?.on(`data`,t=>{if(c)return;if(a+=t.length,a>C){i.kill(`SIGKILL`),f(),n(new e(`RUNTIME`,`ripgrep stdout exceeded JADX_SEARCH_RG_MAX_BUFFER_BYTES (${C} bytes)`));return}s+=t;let r=s.indexOf(`
4
+ `);for(;r!==-1;){let e=s.slice(0,r).trimEnd();if(s=s.slice(r+1),e.length>0){let t;try{t=JSON.parse(e)}catch{}if(t&&!m(t)){s=``,f(),i.kill(`SIGTERM`);break}}r=s.indexOf(`
5
+ `)}}),i.stderr?.on(`data`,e=>{o+=e}),i.on(`error`,t=>{f(),n(new e(`RUNTIME`,`ripgrep spawn failed: ${t.message}`,{cause:t}))}),i.on(`close`,(r,i)=>{if(f(),r===2&&i!==`SIGTERM`&&i!==`SIGKILL`){n(new e(`RUNTIME`,`ripgrep exited with code 2: ${o.trim()}`,{details:{exitCode:r,signal:i??null,stderr:o.trim()}}));return}t({matches:l,filesMatched:u.size,truncated:d})})})}},q=class{rg;fallback;probe;constructor(e={}){this.rg=e.ripgrep??new K,this.fallback=e.fallback??new L,this.probe=e.probe??(()=>V())}async search(t){let n=await this.validateAndNormalize(t),r=performance.now(),i=`node-fallback`,a;if(t.forceFallback)a=await this.fallback.run(n);else if((await this.probe()).available){i=`ripgrep`;try{a=await this.rg.run(n)}catch(t){if(t instanceof e&&t.code===`VALIDATION`)throw t;i=`node-fallback`,a=await this.fallback.run(n)}}else a=await this.fallback.run(n);let o=Math.round(performance.now()-r),s={matches:a.matches,filesMatched:a.filesMatched,totalMatches:a.matches.length,engine:i,decompileDir:n.decompileDir,durationMs:o};return a.truncated&&(s.truncated=!0),s}async validateAndNormalize(t){if(typeof t.decompileDir!=`string`||t.decompileDir.length===0)throw new e(`VALIDATION`,`decompileDir must be a non-empty string`);if(typeof t.query!=`string`||t.query.length===0)throw new e(`VALIDATION`,`query must be a non-empty string`);if(t.query.length>x)throw new e(`VALIDATION`,`query length ${t.query.length} exceeds JADX_SEARCH_MAX_QUERY_LENGTH (${x})`);let n=t.contextLines??g;if(!Number.isFinite(n)||n<0||!Number.isInteger(n))throw new e(`VALIDATION`,`contextLines must be a non-negative integer`);if(n>_)throw new e(`VALIDATION`,`contextLines ${n} exceeds JADX_SEARCH_MAX_CONTEXT_LINES (${_})`);let r=t.maxMatchesPerFile??v;if(!Number.isFinite(r)||r<1||!Number.isInteger(r))throw new e(`VALIDATION`,`maxMatchesPerFile must be a positive integer`);let i=t.maxResults??h;if(!Number.isFinite(i)||i<1||!Number.isInteger(i))throw new e(`VALIDATION`,`maxResults must be a positive integer`);let a=c(t.decompileDir),s;try{s=await o.stat(a)}catch(t){throw new e(`NOT_FOUND`,`decompileDir not found: ${a}`,{cause:t,details:{decompileDir:a}})}if(!s.isDirectory())throw new e(`VALIDATION`,`decompileDir is not a directory: ${a}`);let l=t.globs&&t.globs.length>0?Array.from(t.globs):[...w];return{decompileDir:a,query:t.query,globs:l,literal:t.literal===!0,caseInsensitive:t.caseInsensitive===!0,contextLines:n,maxMatchesPerFile:r,maxResults:i}}},J=class{engine;constructor(e=new q){this.engine=e}handleJadxSearchCode(o){return a(async()=>{let a=r(o,`decompileDir`),s=r(o,`query`);if(typeof o.apkPath==`string`&&o.apkPath.length>0)throw new e(`VALIDATION`,`apkPath is not supported by jadx_search_code (read-only). Run jadx via the binary-instrument domain first, then pass decompileDir.`);let c={decompileDir:a,query:s},l=i(o,`literal`);l!==void 0&&(c.literal=l);let u=i(o,`caseInsensitive`);u!==void 0&&(c.caseInsensitive=u);let d=n(o,`contextLines`);d!==void 0&&(c.contextLines=d);let f=n(o,`maxMatchesPerFile`);f!==void 0&&(c.maxMatchesPerFile=f);let p=n(o,`maxResults`);p!==void 0&&(c.maxResults=p);let m=o.globs;if(m!==void 0){if(!Array.isArray(m))throw new e(`VALIDATION`,`globs must be an array of strings`);let n=t(o,`globs`);if(n.length!==m.length)throw new e(`VALIDATION`,`globs contains non-string entries`);n.length>0&&(c.globs=n)}let h=await this.engine.search(c);return{matches:h.matches,filesMatched:h.filesMatched,totalMatches:h.totalMatches,engine:h.engine,durationMs:h.durationMs,decompileDir:h.decompileDir,...h.truncated?{truncated:!0}:{}}})}};export{J as JadxSearchHandlers};
@@ -0,0 +1 @@
1
+ const e={gray:`\x1B[90m`,blue:`\x1B[34m`,yellow:`\x1B[33m`,red:`\x1B[31m`,green:`\x1B[32m`,reset:`\x1B[0m`},t=(t,n)=>`${t}${n}${e.reset}`,n=/^(auth(orization)?|cookie|set[_-]?cookie|x[_-]?api[_-]?key|token|access[_-]?token|refresh[_-]?token|id[_-]?token|secret|client[_-]?secret|password|passwd|api[_-]?key|private[_-]?key|credentials?|session[_-]?id|csrf[_-]?token)$/i,r=/^(Bearer\s+\S|eyJ[A-Za-z0-9_-]{10,}|[A-Fa-f0-9]{32,}|sk[_-][A-Za-z0-9]{20,})/;function i(e,t){return e&&n.test(e)&&typeof t==`string`||typeof t==`string`&&r.test(t)?`[REDACTED]`:t}const a=new class{level;listeners=[];constructor(e=`info`){this.level=e}shouldLog(e){let t=[`debug`,`info`,`warn`,`error`];return t.indexOf(e)>=t.indexOf(this.level)}formatMessage(e,t,...n){let r=`[${new Date().toISOString()}] [${e.toUpperCase()}]`,a=``;if(n.length>0)try{a=` `+JSON.stringify(n,i,void 0)}catch{a=` [unserializable]`}return`${r} ${t}${a}`}emit(e,t,n){for(let r of this.listeners)try{r(e,t,n)}catch{}}onLog(e){return this.listeners.push(e),()=>{this.listeners=this.listeners.filter(t=>t!==e)}}debug(n,...r){this.shouldLog(`debug`)&&(console.error(t(e.gray,this.formatMessage(`debug`,n,...r))),this.emit(`debug`,n,r))}info(n,...r){this.shouldLog(`info`)&&(console.error(t(e.blue,this.formatMessage(`info`,n,...r))),this.emit(`info`,n,r))}warn(n,...r){this.shouldLog(`warn`)&&(console.error(t(e.yellow,this.formatMessage(`warn`,n,...r))),this.emit(`warn`,n,r))}error(n,...r){this.shouldLog(`error`)&&(console.error(t(e.red,this.formatMessage(`error`,n,...r))),this.emit(`error`,n,r))}success(n,...r){this.shouldLog(`info`)&&(console.error(t(e.green,this.formatMessage(`info`,n,...r))),this.emit(`info`,n,r))}setLevel(e){this.level=e}}(process.env.LOG_LEVEL||`info`);export{a as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./logger-sBC6IdRT.mjs";import{at as t,ht as n,jt as r,ot as i}from"./constants-BYj8Xek8.mjs";import{n as a,t as o}from"./artifactRetention-BCPQASm7.mjs";import{a as s,n as c}from"./response-C7rKQst4.mjs";import{t as l}from"./types-Fz69RzbZ.mjs";import{i as u,l as d}from"./outputPaths-B4Ic4RZh.mjs";import{r as f}from"./betterSqlite3-Brtq-SIQ.mjs";import{r as p}from"./concurrency-DCr8WQ2M.mjs";import{n as m}from"./ResponseBuilder-BfWP-uaT.mjs";import{t as h}from"./ToolRegistry-C5oB8KP8.mjs";import"./definitions-Bf3H1EwV.mjs";import{createRequire as g}from"node:module";import{existsSync as _}from"node:fs";import{dirname as v,isAbsolute as y,join as b,relative as x,resolve as S}from"node:path";import{fileURLToPath as C}from"node:url";import{mkdir as w,readFile as T,writeFile as E}from"node:fs/promises";import{execFile as D}from"node:child_process";import{promisify as O}from"node:util";const k=O(D),A=g(import.meta.url);let j=null,M=0;function ee(){let e=Date.now();return(!j||e-M>12e4)&&(j=new h,M=e),j}function te(e){let t=v(A.resolve(e));for(;;){let n=b(t,`package.json`);if(_(n))return n;let r=v(t);if(r===t)throw Error(`Could not locate package.json for ${e}`);t=r}}function N(e){return A(te(e))}async function ne(e){let t=e?.includeBridgeHealth??!0,i=ee().probeAll(!0),o=p(()=>L(`git`,[`--version`])),s=p(()=>L(`python`,[`--version`])),c=p(()=>I()),l=p(()=>L(`corepack`,[`--version`])),d=t?Promise.all([p(()=>z(`ghidra-bridge`,`${n.replace(/\/$/,``)}/health`)),p(()=>z(`ida-bridge`,`${r.replace(/\/$/,``)}/health`)),p(()=>z(`burp-mcp-sse`,process.env.BURP_MCP_SSE_URL?.trim()||`http://127.0.0.1:9876`))]):Promise.resolve([]),[f,m,h,g,_,v]=await Promise.all([i,o,s,c,l,d]),y=ie(_,g),b=[P(`@modelcontextprotocol/sdk`),P(`rebrowser-puppeteer-core`),re(),P(`camoufox-js`,`Optional Firefox anti-detect driver`),P(`playwright-core`,`Optional browser automation dependency`),ae()],x=[m,h,g,y,...Object.entries(f).map(([e,t])=>({name:e,status:t.available?`ok`:`missing`,detail:t.available?`${t.path??`PATH`}${t.version?` (${t.version})`:``}`:t.reason??`Unavailable`}))],S=oe(),C=se(b,x,v,S);return{success:[...b,...x,...v].every(e=>e.status!==`error`),generatedAt:new Date().toISOString(),runtime:{platform:process.platform,arch:process.arch,node:process.version,cwd:process.cwd(),projectRoot:u()},packages:b,commands:x,bridges:v,config:{transport:(process.env.MCP_TRANSPORT??`stdio`).toLowerCase(),toolProfile:(process.env.MCP_TOOL_PROFILE??`search`).toLowerCase(),pluginRoots:process.env.MCP_PLUGIN_ROOTS??`<jshook-install>/plugins`,workflowRoots:process.env.MCP_WORKFLOW_ROOTS??`<jshook-install>/workflows`,pluginSignatureRequired:process.env.MCP_PLUGIN_SIGNATURE_REQUIRED??(process.env.NODE_ENV===`production`?`true (production default)`:`false`),pluginStrictLoad:process.env.MCP_PLUGIN_STRICT_LOAD??(process.env.NODE_ENV===`production`?`true (production default)`:`false`),artifactRetention:a()},limitations:S,recommendations:C}}function P(e,t){try{let t=N(e);return{name:e,status:`ok`,detail:t.version?`installed (${t.version})`:`installed`}}catch{return{name:e,status:`missing`,detail:t??`Not installed`}}}function re(){let e=f();return{name:`better-sqlite3`,status:e.status,detail:e.detail}}function F(e){return e.status===`ok`||e.detail.includes(`npx fallback works`)}async function I(){let e=await L(`pnpm`,[`--version`]);if(e.status===`ok`)return e;let t=await L(`npx`,[`pnpm`,`--version`],1e4);return t.status===`ok`?{name:`pnpm`,status:`warn`,detail:`direct pnpm command unavailable; npx fallback works (${t.detail})`}:e}function ie(e,t){return e.status!==`missing`||!F(t)?e:{name:e.name,status:`warn`,detail:process.platform===`win32`?t.detail.includes(`npx fallback works`)?"corepack not found; use `npx pnpm` directly (common with nvm4w-managed Node on Windows)":`corepack not found; standalone pnpm is available (common with nvm4w-managed Node on Windows)`:t.detail.includes(`npx fallback works`)?"corepack not found; use `npx pnpm` directly":`corepack not found; standalone pnpm is available`}}function ae(){try{let e=N(`koffi`).version??`unknown`;if(process.platform===`win32`)return{name:`native-memory`,status:`ok`,detail:`koffi ${e} — Win32 kernel32.dll available`};if(process.platform===`darwin`)try{return A(`koffi`).load(`/usr/lib/libSystem.B.dylib`).unload(),delete A.cache[A.resolve(`koffi`)],{name:`native-memory`,status:`ok`,detail:`koffi ${e} — macOS libSystem.B.dylib available (Mach APIs need root + SIP config)`}}catch{return{name:`native-memory`,status:`warn`,detail:`koffi ${e} installed but cannot load libSystem.B.dylib`}}return{name:`native-memory`,status:`warn`,detail:`koffi ${e} — no native FFI memory provider for ${process.platform} (proc-based ops available on Linux)`}}catch{return{name:`native-memory`,status:`missing`,detail:`koffi not installed — native memory tools unavailable. Install with: pnpm add koffi`}}}async function L(e,t,n=4e3){try{let{stdout:r,stderr:i}=await k(e,t,{timeout:n,windowsHide:!0});return{name:e,status:`ok`,detail:`${r||i}`.trim().split(/\r?\n/)[0]||`available`}}catch(r){if(process.platform===`win32`)try{let{stdout:r,stderr:i}=await k(`cmd`,[`/c`,e,...t],{timeout:n,windowsHide:!0});return{name:e,status:`ok`,detail:`${`${r||i}`.trim().split(/\r?\n/)[0]||`available`} (via cmd)`}}catch(t){return R(e,t)}return R(e,r)}}function R(e,t){let n=t instanceof Error?t.message:String(t);return{name:e,status:/ENOENT|not recognized|not found/i.test(n)?`missing`:`warn`,detail:n}}async function z(e,t){try{let n=await fetch(t,{method:`GET`,signal:AbortSignal.timeout(3e3)});return{name:e,status:n.ok?`ok`:`warn`,detail:`${t} -> HTTP ${n.status}`}}catch(n){return{name:e,status:`warn`,detail:`${t} -> ${n instanceof Error?n.message:String(n)}`}}}function oe(){let e=[];return process.platform===`darwin`?(e.push(`26 cross-platform memory tools available (scan, pointer-chain, structure-analysis, heap). 15 Windows-only tools unavailable (PE analysis, anti-cheat, code injection, speedhack, hardware breakpoints).`),e.push(`Native memory operations (mach_vm_read/write) require root privileges and may require SIP configuration on ARM64.`)):process.platform===`linux`?(e.push(`Process management available via /proc. Native FFI memory provider not implemented — memory read/write uses /proc/pid/mem (requires root or CAP_SYS_PTRACE).`),e.push(`Camoufox runs on Linux, but some Chrome/CDP-heavy workflows are better served by the Chrome driver.`)):process.platform!==`win32`&&e.push(`Platform ${process.platform} is not supported for native memory operations. Use Windows or macOS.`),e}function se(e,t,n,r){let i=[],a=t.find(e=>e.name===`pnpm`),o=t.find(e=>e.name===`corepack`);return e.some(e=>e.name===`better-sqlite3`&&e.status!==`ok`)&&i.push("Install or rebuild the optional SQLite trace backend with `pnpm add -O better-sqlite3@12.10.0` or `npm rebuild better-sqlite3 --foreground-scripts` under the active Node version if you need trace tooling."),e.some(e=>e.name===`camoufox-js`&&e.status!==`ok`)&&i.push("Install optional browser dependencies with `pnpm run install:full` if you need Camoufox support."),t.some(e=>e.name.startsWith(`wabt.`)&&e.status!==`ok`)&&i.push(`Install wabt if you need full WASM disassembly/decompilation; otherwise the server will stay in basic mode.`),a&&!F(a)?i.push("Install pnpm or enable Corepack (`corepack enable`) before running package-management workflows."):a?.detail.includes(`npx fallback works`)?i.push("Use `npx pnpm` directly on this machine or repair the local pnpm/Corepack shim if scripts expect bare `pnpm`."):o?.status===`warn`&&o.detail.includes(`standalone pnpm`)&&i.push("Use `pnpm` or `npx pnpm` directly on this machine; `corepack` is optional and may be absent on nvm4w-managed Windows installs."),n.some(e=>e.status!==`ok`)&&i.push(`Check local bridge endpoints (Ghidra / IDA / Burp) before relying on native-bridge workflows.`),r.length>0&&i.push(`Review platform limitations before using process/memory tooling on non-Windows hosts.`),i}var ce=class{tokenBudget;unifiedCache;artifactCleanup;environmentDoctor;constructor(e){this.tokenBudget=e.tokenBudget,this.unifiedCache=e.unifiedCache,this.artifactCleanup=e.artifactCleanup??o,this.environmentDoctor=e.environmentDoctor??ne}async handleGetTokenBudgetStats(){return m(async()=>{let e=this.tokenBudget.getStats();return{...e,sessionDuration:`${Math.round((Date.now()-e.sessionStartTime)/1e3)}s`}})}async handleManualTokenCleanup(){return m(async()=>{let e=this.tokenBudget.getStats();this.tokenBudget.manualCleanup();let t=this.tokenBudget.getStats(),n=e.currentUsage-t.currentUsage;return{message:`Manual cleanup completed`,before:{usage:e.currentUsage,percentage:e.usagePercentage},after:{usage:t.currentUsage,percentage:t.usagePercentage},freed:{tokens:n,percentage:Math.round(n/e.maxTokens*100)}}})}async handleResetTokenBudget(){return m(async()=>(this.tokenBudget.reset(),{message:`Token budget reset successfully`,currentUsage:0,maxTokens:2e5,usagePercentage:0}))}async handleGetCacheStats(){return m(async()=>this.unifiedCache.getGlobalStats())}async handleSmartCacheCleanup(e){return m(async()=>this.unifiedCache.smartCleanup(e))}async handleClearAllCaches(){return m(async()=>(await this.unifiedCache.clearAll(),{message:`All caches cleared`}))}async handleCleanupArtifacts(e){return m(async()=>this.artifactCleanup({retentionDays:e.retentionDays,maxTotalBytes:e.maxTotalBytes,dryRun:e.dryRun}))}async handleEnvironmentDoctor(e){return m(async()=>this.environmentDoctor({includeBridgeHealth:e.includeBridgeHealth}))}};const B=O(D);function V(){return C(new URL(`../../../../`,import.meta.url))}function H(e){let t=e?.trim();if(t)return t.split(`,`).map(e=>e.trim()).find(e=>e.length>0)}function U(e){let t=e===`workflow`?`MCP_WORKFLOW_ROOTS`:`MCP_PLUGIN_ROOTS`,n=H(process.env[t]);return n?S(n):S(V(),e===`workflow`?`workflows`:`plugins`)}function W(){let e=(process.env.EXTENSION_REGISTRY_BASE_URL??``).trim().replace(/\/+$/,``);if(!e)throw Error(`EXTENSION_REGISTRY_BASE_URL is not configured. Set it in .env or environment before browsing or installing extensions.`);return e}function G(e,t){let n=e?.trim();if(!n){if(t===`subpath`)return`.`;throw Error(`Registry source.${t} must be a non-empty string`)}return n}function K(e,t,n){let r=x(e,t).replace(/\\/g,`/`);if(r===`..`||r.startsWith(`../`)||y(r))throw Error(`Registry source.${n} must stay within ${e}: ${t}`)}function le(e,t){let n=S(e,G(t,`subpath`));return K(e,n,`subpath`),n}function q(e,t){let n=S(e,G(t,`entry`));return K(e,n,`entry`),n}function ue(e){let t=G(e,`entry`).replace(/\\/g,`/`),n=[t];if(!t.endsWith(`.ts`))return n;let r=`${t.slice(0,-3)}.js`;return n.unshift(r),t.startsWith(`dist/`)||n.unshift(`dist/${r}`),[...new Set(n)]}function de(e,t){let n=ue(t);for(let t of n)if(_(q(e,t)))return t;return G(t,`entry`)}async function fe(e,t,n,r){let i={version:1,kind:e,slug:t.slug,id:t.id,source:{type:t.source.type,repo:t.source.repo,ref:t.source.ref,commit:t.source.commit,subpath:G(t.source.subpath,`subpath`),entry:G(r,`entry`)}},a=S(n,l);return await E(a,`${JSON.stringify(i,null,2)}\n`,`utf8`),a}const J=`@jshookmcp/extension-sdk`,pe=[`workspace:`,`link:`,`file:`];function me(){return d().paths.registryCacheDir}var Y=class extends Error{code;url;cachePath;status;constructor(e,t,n,r,i){super(n),this.code=e,this.url=t,this.cachePath=r,this.status=i,this.name=`RegistryFetchError`}};function he(e,t){return process.platform===`win32`?{command:`${e}.cmd`,args:t}:{command:e,args:t}}async function X(e,t,n){let r=he(e,t);return B(r.command,r.args,{...n,env:{...process.env,...n?.env,CI:`true`}})}async function Z(e){let t=S(e,`package.json`),n=S(e,`pnpm-lock.yaml`),r=S(e,`package-lock.json`);if(_(t))try{let e=await T(t,`utf8`),n=JSON.parse(e).packageManager?.trim().toLowerCase().split(`@`)[0];if(n===`pnpm`)return`pnpm`;if(n===`npm`)return`npm`}catch{}return _(n)?`pnpm`:_(r)?`npm`:`pnpm`}function Q(e){return S(me(),`registry-${e}.json`)}async function ge(e){let t=Q(e);try{let e=await T(t,`utf8`);return JSON.parse(e)}catch{return null}}async function _e(e,t){let n=Q(e);await w(v(n),{recursive:!0}),await E(n,JSON.stringify(t,null,2),`utf8`)}function ve(e,t,n){if(t instanceof Y)return t;if(t instanceof DOMException&&t.name===`AbortError`)return new Y(`timeout`,e,`Registry fetch timed out after 10000ms: ${e}`,n);let r=t instanceof Error?t.message:String(t);if(r.includes(`ENOTFOUND`)||r.includes(`getaddrinfo`))return new Y(`dns_failure`,e,`DNS resolution failed for registry URL: ${e}`,n);if(r.includes(`ECONNREFUSED`))return new Y(`connection_refused`,e,`Connection refused by registry server: ${e}`,n);if(r.includes(`CERT_`)||r.includes(`certificate`)||r.includes(`SSL`))return new Y(`tls_error`,e,`TLS/certificate error when connecting to registry: ${e}`,n);let i=r.match(/HTTP\s+(\d+)/i);return i?new Y(`http_error`,e,r,n,Number(i[1])):new Y(`fetch_failed`,e,r,n)}function ye(e){return{success:!1,error:e.code,message:e.message,url:e.url,...typeof e.status==`number`?{status:e.status}:{}}}async function $(t,n){let r=new AbortController,i=setTimeout(()=>r.abort(),1e4),a=n?.cacheKey?Q(n.cacheKey):void 0;try{let i=await fetch(t,{signal:r.signal});if(!i.ok)throw new Y(`http_error`,t,`HTTP ${i.status} ${i.statusText} from ${t}`,a,i.status);let o=await i.json();if(n?.cacheKey)try{await _e(n.cacheKey,o)}catch(r){e.warn(`[extensions] Failed to persist ${n.cacheKey} registry cache for ${t}:`,r)}return{data:o,stale:!1,source:`network`,cachePath:a}}catch(r){let i=ve(t,r,a);if(n?.cacheKey){let r=await ge(n.cacheKey);if(r)return e.warn(`[extensions] Using stale ${n.cacheKey} registry cache after ${i.code}: ${t}`),{data:r,stale:!0,source:`cache`,cachePath:a}}throw i}finally{clearTimeout(i)}}function be(e){let t=e.trim();return t?pe.some(e=>t.startsWith(e))||t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`/`)?!0:/^[A-Za-z]:[\\/]/.test(t):!1}async function xe(e){let t=await T(S(e,`package.json`),`utf8`),n=JSON.parse(t);for(let e of[`dependencies`,`devDependencies`,`peerDependencies`,`optionalDependencies`]){let t=n[e];if(!t||typeof t!=`object`)continue;let r=t[J];if(typeof r==`string`&&be(r))throw Error(`package.json ${e}.${J} uses unsupported local dependency spec "${r}". Declare a published npm version instead, for example "^0.3.2".`)}}async function Se(e,t){let[n,r]=await Promise.allSettled([$(`${e}/workflows.index.json`,{cacheKey:`workflows`}),$(`${e}/plugins.index.json`,{cacheKey:`plugins`})]);if(n.status===`fulfilled`){let e=(Array.isArray(n.value.data.workflows)?n.value.data.workflows:[]).find(e=>e.slug===t);if(e)return{entry:e,kind:`workflow`}}if(r.status===`fulfilled`){let e=(Array.isArray(r.value.data.plugins)?r.value.data.plugins:[]).find(e=>e.slug===t);if(e)return{entry:e,kind:`plugin`}}let i=n.status===`rejected`?n.reason instanceof Error?n.reason:Error(String(n.reason)):void 0,a=r.status===`rejected`?r.reason instanceof Error?r.reason:Error(String(r.reason)):void 0;throw Error(i&&a?`Failed to resolve extension slug "${t}": workflow registry error: ${i.message}; plugin registry error: ${a.message}`:a?`Extension "${t}" was not found in workflow registry, and plugin registry lookup failed: ${a.message}`:i?`Extension "${t}" was not found in plugin registry, and workflow registry lookup failed: ${i.message}`:`Extension "${t}" not found in workflow or plugin registry`)}var Ce=class{ctx;constructor(e){this.ctx=e}async handleListExtensions(){try{return c({success:!0,...this.ctx.listExtensions()})}catch(t){return e.error(`Failed to list extensions:`,t),c(s(t))}}async handleReloadExtensions(){try{return c({success:!0,...await this.ctx.reloadExtensions()})}catch(t){return e.error(`Failed to reload extensions:`,t),c(s(t))}}async handleBrowseExtensionRegistry(t){try{let e=W(),n=t===`all`||t===`plugin`,r=t===`all`||t===`workflow`,i={success:!0},a=!1,o=n?$(`${e}/plugins.index.json`,{cacheKey:`plugins`}):void 0,s=r?$(`${e}/workflows.index.json`,{cacheKey:`workflows`}):void 0,[l,u]=await Promise.all([o??Promise.resolve(void 0),s??Promise.resolve(void 0)]);if(l){let e=Array.isArray(l.data.plugins)?l.data.plugins:[];i.plugins=e.map(e=>({slug:e.slug,id:e.id,name:e.meta.name,description:e.meta.description,author:e.meta.author,repo:e.source.repo,commit:e.source.commit,entry:e.source.entry})),i.pluginCount=e.length,i.pluginSource=l.source,a||=l.stale}if(u){let e=Array.isArray(u.data.workflows)?u.data.workflows:[];i.workflows=e.map(e=>({slug:e.slug,id:e.id,name:e.meta.name,description:e.meta.description,author:e.meta.author,repo:e.source.repo,commit:e.source.commit,entry:e.source.entry})),i.workflowCount=e.length,i.workflowSource=u.source,a||=u.stale}return a&&(i.stale=!0),c(i)}catch(t){return e.error(`Failed to browse extension registry:`,t),t instanceof Y?c(ye(t)):c(s(t))}}async handleInstallExtension(n,r){try{let{entry:e,kind:a}=await Se(W(),n),o=a===`workflow`,s=U(o?`workflow`:`plugin`),l=r?S(r):S(s,n),u=le(l,e.source.subpath);if(q(u,e.source.entry),_(l))return c({success:!1,error:`Target directory already exists: ${l}`,hint:`Remove the existing directory first, or specify a different targetDir`});if(await w(v(l),{recursive:!0}),await B(`git`,[`clone`,e.source.repo,l],{timeout:i}),await B(`git`,[`-C`,l,`checkout`,e.source.commit],{timeout:t}),_(S(u,`package.json`))){await xe(u);let e=await Z(u);await X(e,e===`pnpm`?[`--ignore-workspace`,`install`,`--no-frozen-lockfile`,`--ignore-scripts`]:[`install`,`--ignore-scripts`],{cwd:u,timeout:Math.max(i,12e4)}),await X(e,e===`pnpm`?[`--ignore-workspace`,`run`,`--if-present`,`build`]:[`run`,`build`,`--if-present`],{cwd:u,timeout:Math.max(i,12e4)})}let d=de(u,e.source.entry),f=q(u,d);if(!_(f))return c({success:!1,error:`Installed extension entry not found: ${d}`,installDir:l,projectDir:u,expectedEntryFile:f,hint:`The registry source.entry or its compiled JS output must exist after clone/build before reloadExtensions can load it.`});let p=await fe(o?`workflow`:`plugin`,e,u,d),m=await this.ctx.reloadExtensions();return c({success:!0,installed:{slug:e.slug,id:e.id,name:e.meta.name,repo:e.source.repo,commit:e.source.commit,installDir:l,projectDir:u,entry:d,entryFile:f,metadataPath:p},reload:{addedTools:m.addedTools,pluginCount:m.pluginCount,workflowCount:m.workflowCount,errors:m.errors,warnings:m.warnings}})}catch(t){return e.error(`Failed to install extension:`,t),c(s(t))}}};export{ce as CoreMaintenanceHandlers,Ce as ExtensionManagementHandlers};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./tool-builder-qif8M9-K.mjs";const r=[n(`cross_domain_capabilities`,e=>e.desc(`List all cross-domain capability categories and available workflows.`).query()),n(`cross_domain_suggest_workflow`,e=>e.desc(`Recommend a multi-domain workflow to achieve a specific analysis goal.`).string(`goal`,`High-level task goal or problem statement to classify`).boolean(`preferAvailableOnly`,`Prefer workflows whose dependent domains are currently enabled`,{default:!0}).required(`goal`).query()),n(`cross_domain_health`,e=>e.desc(`Report health status of cross-domain bridges and correlators.`).query()),n(`cross_domain_correlate_all`,e=>e.desc(`Run the built-in skia, mojo, syscall, and binary correlators and merge the results into the shared evidence graph.`).prop(`sceneTree`,{type:`object`,description:`Skia scene tree with layers and drawCommands`,additionalProperties:!0}).array(`jsObjects`,{type:`object`,additionalProperties:!0},`JS object descriptors for Skia correlation`).array(`mojoMessages`,{type:`object`,properties:{interface:{type:`string`},method:{type:`string`},timestamp:{type:`number`},messageId:{type:`string`}},required:[`interface`,`method`,`timestamp`,`messageId`]},`Mojo messages for MOJO-03 correlation`).array(`cdpEvents`,{type:`object`,properties:{eventType:{type:`string`},timestamp:{type:`number`},url:{type:`string`}},required:[`eventType`,`timestamp`]},`CDP events for MOJO-03 correlation`).array(`networkRequests`,{type:`object`,properties:{requestId:{type:`string`},url:{type:`string`},timestamp:{type:`number`}},required:[`requestId`,`url`,`timestamp`]},`Network requests for MOJO-03 correlation`).array(`syscallEvents`,{type:`object`,properties:{pid:{type:`number`},tid:{type:`number`},syscallName:{type:`string`},timestamp:{type:`number`}},required:[`pid`,`tid`,`syscallName`,`timestamp`]},`Syscall events for SYSCALL-02 correlation`).array(`jsStacks`,{type:`object`,properties:{threadId:{type:`number`},timestamp:{type:`number`},frames:{type:`array`,items:{type:`object`,properties:{functionName:{type:`string`}},required:[`functionName`]}}},required:[`threadId`,`timestamp`,`frames`]},`JS stacks for SYSCALL-02 correlation`).prop(`ghidraOutput`,{type:`object`,description:`Binary analysis output with moduleName and functions`,additionalProperties:!0})),n(`cross_domain_evidence_export`,e=>e.desc(`Export the shared cross-domain evidence graph as JSON.`).query()),n(`cross_domain_evidence_stats`,e=>e.desc(`Get node and edge statistics for the shared cross-domain evidence graph.`).query())],i=`cross-domain`,a=`crossDomainHandlers`,o=t({domain:i,depKey:a,lookup:e(r),entries:[{tool:`cross_domain_capabilities`,method:`handleCapabilities`},{tool:`cross_domain_suggest_workflow`,method:`handleSuggestWorkflow`},{tool:`cross_domain_health`,method:`handleHealth`},{tool:`cross_domain_correlate_all`,method:`handleCorrelateAll`},{tool:`cross_domain_evidence_export`,method:`handleEvidenceExport`},{tool:`cross_domain_evidence_stats`,method:`handleEvidenceStats`}]});async function s(e){let{ReverseEvidenceGraph:t}=await import(`./ReverseEvidenceGraph-BhSYYdiI.mjs`).then(e=>e.t),{CrossDomainEvidenceBridge:n}=await import(`./evidence-graph-bridge-CV_UdYqj.mjs`),{CrossDomainWorkflowClassifier:r,CrossDomainHandlers:i}=await import(`./handlers-l8QIKqBj.mjs`),o=e.getDomainInstance(a);if(o)return o;let s=e.getDomainInstance(`evidenceGraph`);s||(s=new t,s.setEventBus(e.eventBus),e.setDomainInstance(`evidenceGraph`,s));let c=e.getDomainInstance(`crossDomainEvidenceBridge`);c||(c=new n(s),e.setDomainInstance(`crossDomainEvidenceBridge`,c));let l=e.getDomainInstance(`crossDomainWorkflowClassifier`);l||(l=new r(e,!0),e.setDomainInstance(`crossDomainWorkflowClassifier`,l));let u=new i(c,l);return e.setDomainInstance(a,u),u}const c={kind:`domain-manifest`,version:1,domain:i,depKey:a,profiles:[`full`],ensure:s,workflowRule:{patterns:[/(cross[- ]domain|multi[- ]domain|evidence graph|correlate).*(v8|network|canvas|syscall|mojo|binary)/i,/(跨域|多域|证据图|关联).*(v8|网络|canvas|syscall|mojo|binary)/i],priority:98,tools:[`cross_domain_capabilities`,`cross_domain_suggest_workflow`,`cross_domain_correlate_all`,`cross_domain_evidence_stats`],hint:`Cross-domain reverse workflow: inspect capabilities → suggest mission workflow → correlate evidencefrom all v5.0 domains → export evidence graph`},toolDependencies:[{from:`cross_domain_suggest_workflow`,to:`deobfuscate`,relation:`suggests`,weight:.6},{from:`cross_domain_suggest_workflow`,to:`js_heap_search`,relation:`suggests`,weight:.6},{from:`cross_domain_suggest_workflow`,to:`network_enable`,relation:`suggests`,weight:.5},{from:`cross_domain_suggest_workflow`,to:`canvas_scene_dump`,relation:`suggests`,weight:.5},{from:`cross_domain_suggest_workflow`,to:`skia_correlate_objects`,relation:`suggests`,weight:.5},{from:`cross_domain_suggest_workflow`,to:`syscall_correlate_js`,relation:`suggests`,weight:.5},{from:`cross_domain_suggest_workflow`,to:`ghidra_analyze`,relation:`suggests`,weight:.5},{from:`cross_domain_correlate_all`,to:`evidence_export`,relation:`precedes`,weight:.7}],registrations:o};export{c as default};
@@ -0,0 +1 @@
1
+ import{i as e}from"./response-C7rKQst4.mjs";import{t}from"./registry-DH4sc1dt.mjs";import{n}from"./bind-helpers-m2U8glkF.mjs";const r=[`TLSv1`,`TLSv1.1`,`TLSv1.2`,`TLSv1.3`];function i(e,t,n={},r=[]){return{name:e,description:t,inputSchema:{type:`object`,properties:n,required:r}}}const a=[i(`tls_cert_pin_bypass_frida`,`Bypass certificate pinning via Frida injection (supports BoringSSL, Chrome, OkHttp).`)],o=[i(`net_raw_tcp_send`,`Send raw TCP data to a remote host; accepts hex or text input.`,{host:{type:`string`,default:`127.0.0.1`,description:`Target host address`},port:{type:`number`,description:`Target port number (1-65535)`},dataHex:{type:`string`,description:`Hex-encoded data to send`},dataText:{type:`string`,description:`Text data to send (alternative to dataHex)`},timeout:{type:`number`,default:5e3,description:`Connection timeout in ms`}},[`port`]),i(`net_raw_tcp_listen`,`Listen on a local TCP port for one incoming connection.`,{port:{type:`number`,description:`Local port to listen on (1-65535)`},timeout:{type:`number`,default:1e4,description:`Listen timeout in ms`}},[`port`]),i(`net_raw_udp_send`,`Send a raw UDP datagram and wait for a response.`,{host:{type:`string`,default:`127.0.0.1`,description:`Target host address`},port:{type:`number`,description:`Target port number (1-65535)`},dataHex:{type:`string`,description:`Hex-encoded data to send`},dataText:{type:`string`,description:`Text data to send (alternative to dataHex)`},timeout:{type:`number`,default:5e3,description:`Response timeout in ms`}},[`port`]),i(`net_raw_udp_listen`,`Listen on a local UDP port for an incoming datagram.`,{port:{type:`number`,description:`Local port to listen on (1-65535)`},timeout:{type:`number`,default:1e4,description:`Listen timeout in ms`}},[`port`])],s=[i(`tcp_open`,`Open a TCP session.`,{host:{type:`string`,default:`127.0.0.1`,description:`Target host name or IP address`},port:{type:`number`,description:`Target TCP port`},timeoutMs:{type:`number`,default:5e3,description:`Connection timeout in milliseconds`},noDelay:{type:`boolean`,default:!0,description:`Enable TCP_NODELAY on the socket after connect`}},[`port`]),i(`tcp_write`,`Write data to an open TCP session.`,{sessionId:{type:`string`,description:`TCP session ID`},dataHex:{type:`string`,description:`Hex-encoded payload to write`},dataText:{type:`string`,description:`UTF-8 text payload to write`},timeoutMs:{type:`number`,default:5e3,description:`Write timeout in milliseconds`}},[`sessionId`]),i(`tcp_read_until`,`Read from an open TCP session until a delimiter or byte limit is reached.`,{sessionId:{type:`string`,description:`TCP session ID`},delimiterHex:{type:`string`,description:`Hex-encoded delimiter to stop at`},delimiterText:{type:`string`,description:`UTF-8 delimiter to stop at`},includeDelimiter:{type:`boolean`,default:!0,description:`Include the delimiter bytes in the returned payload`},maxBytes:{type:`number`,description:`Optional maximum number of bytes to return even if no delimiter matches`},timeoutMs:{type:`number`,default:5e3,description:`Read timeout in milliseconds`}},[`sessionId`]),i(`tcp_close`,`Close an open TCP session.`,{sessionId:{type:`string`,description:`TCP session ID`},force:{type:`boolean`,default:!1,description:`Destroy the socket immediately instead of sending FIN first`},timeoutMs:{type:`number`,default:1e3,description:`Close wait timeout in milliseconds before forcing socket destruction`}},[`sessionId`]),i(`tls_open`,`Open a TLS session.`,{host:{type:`string`,description:`Target host name or IP address`},port:{type:`number`,default:443,description:`Target TLS port`},servername:{type:`string`,description:`Optional SNI and hostname validation override`},alpnProtocols:{type:`array`,items:{type:`string`},description:`Optional ALPN protocols to offer`},timeoutMs:{type:`number`,default:5e3,description:`Connection timeout in milliseconds`},minVersion:{type:`string`,enum:[...r],description:`Optional minimum TLS version`},maxVersion:{type:`string`,enum:[...r],description:`Optional maximum TLS version`},caPem:{type:`string`,description:`Optional PEM-encoded CA bundle`},caPath:{type:`string`,description:`Optional path to a PEM-encoded CA bundle`},allowInvalidCertificates:{type:`boolean`,default:!1,description:`Allow untrusted certificate chains while still reporting the failure`},skipHostnameCheck:{type:`boolean`,default:!1,description:`Skip hostname verification while still reporting the requested target`}},[`host`]),i(`tls_write`,`Write data to an open TLS session.`,{sessionId:{type:`string`,description:`TLS session ID`},dataHex:{type:`string`,description:`Hex-encoded payload to write`},dataText:{type:`string`,description:`UTF-8 text payload to write`},timeoutMs:{type:`number`,default:5e3,description:`Write timeout in milliseconds`}},[`sessionId`]),i(`tls_read_until`,`Read from an open TLS session until a delimiter or byte limit is reached.`,{sessionId:{type:`string`,description:`TLS session ID`},delimiterHex:{type:`string`,description:`Hex-encoded delimiter to stop at`},delimiterText:{type:`string`,description:`UTF-8 delimiter to stop at`},includeDelimiter:{type:`boolean`,default:!0,description:`Include the delimiter bytes in the returned payload`},maxBytes:{type:`number`,description:`Optional maximum number of bytes to return even if no delimiter matches`},timeoutMs:{type:`number`,default:5e3,description:`Read timeout in milliseconds`}},[`sessionId`]),i(`tls_close`,`Close an open TLS session.`,{sessionId:{type:`string`,description:`TLS session ID`},force:{type:`boolean`,default:!1,description:`Destroy the TLS socket immediately instead of sending close_notify/FIN first`},timeoutMs:{type:`number`,default:1e3,description:`Close wait timeout in milliseconds before forcing socket destruction`}},[`sessionId`])],c=[i(`tls_keylog_enable`,`Enable SSLKEYLOGFILE output for BoringSSL-compatible clients.`),i(`tls_keylog_parse`,`Parse an SSLKEYLOGFILE and summarize available key material.`,{path:{type:`string`,description:`Path to SSLKEYLOGFILE`}}),i(`tls_keylog_disable`,`Disable SSLKEYLOGFILE capture and unset the environment variable.`,{path:{type:`string`,description:`Path to disable`}}),i(`tls_decrypt_payload`,`Decrypt a TLS payload using a provided key, nonce, and algorithm.`,{encryptedHex:{type:`string`,description:`Hex-encoded encrypted payload`},keyHex:{type:`string`,description:`Hex-encoded decryption key`},nonceHex:{type:`string`,description:`Hex-encoded nonce/IV`},algorithm:{type:`string`,description:`Cipher algorithm`,default:`aes-256-gcm`},authTagHex:{type:`string`,description:`Hex-encoded authentication tag`}},[`encryptedHex`,`keyHex`,`nonceHex`]),i(`tls_keylog_summarize`,`Summarize the contents of an SSLKEYLOGFILE by label distribution.`,{content:{type:`string`,description:`Inline keylog content to summarize`}}),i(`tls_keylog_lookup_secret`,`Look up a TLS secret by client random hex from the parsed keylog.`,{clientRandom:{type:`string`,description:`Hex-encoded client random`},label:{type:`string`,description:`Optional label filter`}},[`clientRandom`]),i(`tls_cert_pin_bypass`,`Return a certificate pinning bypass strategy for the selected platform.`,{target:{type:`string`,enum:[`android`,`ios`,`desktop`],description:`Target platform for bypass strategy`}},[`target`]),i(`tls_parse_handshake`,`Parse TLS handshake metadata from raw hex.`,{rawHex:{type:`string`,description:`Hex-encoded TLS handshake record`},decrypt:{type:`boolean`,description:`Attempt payload decryption using the loaded keylog`}},[`rawHex`]),i(`tls_cipher_suites`,`List TLS cipher suites.`,{filter:{type:`string`,description:`Keyword filter for cipher suite names`}}),i(`tls_parse_certificate`,`Parse a TLS Certificate message from raw hex and extract fingerprints.`,{rawHex:{type:`string`,description:`Hex-encoded certificate data`}},[`rawHex`]),i(`tls_probe_endpoint`,`Probe a TLS endpoint and report handshake and certificate details.`,{host:{type:`string`,description:`Target host name or IP address`},port:{type:`number`,default:443,description:`Target TLS port`},servername:{type:`string`,description:`Optional SNI and hostname validation override`},alpnProtocols:{type:`array`,items:{type:`string`},description:`Optional ALPN protocols to offer`},timeoutMs:{type:`number`,default:5e3,description:`Probe timeout in milliseconds`},minVersion:{type:`string`,enum:[...r],description:`Optional minimum TLS version`},maxVersion:{type:`string`,enum:[...r],description:`Optional maximum TLS version`},caPem:{type:`string`,description:`Optional PEM-encoded CA bundle`},caPath:{type:`string`,description:`Optional path to a PEM-encoded CA bundle`},allowInvalidCertificates:{type:`boolean`,default:!1,description:`Allow untrusted certificate chains while still reporting the failure`},skipHostnameCheck:{type:`boolean`,default:!1,description:`Skip hostname verification while still reporting the requested target`}},[`host`])],l=[i(`websocket_open`,`Open a WebSocket session.`,{url:{type:`string`,description:`WebSocket URL`},scheme:{type:`string`,enum:[`ws`,`wss`],default:`ws`,description:`WebSocket transport scheme`},host:{type:`string`,description:`Target host name or IP address`},port:{type:`number`,description:`Target port`},path:{type:`string`,default:`/`,description:`Request path`},subprotocols:{type:`array`,items:{type:`string`},description:`Optional subprotocols to offer`},timeoutMs:{type:`number`,default:5e3,description:`Handshake timeout in milliseconds`},servername:{type:`string`,description:`Optional SNI and hostname validation override`},alpnProtocols:{type:`array`,items:{type:`string`},description:`Optional ALPN protocols to offer`},minVersion:{type:`string`,enum:[...r],description:`Optional minimum TLS version`},maxVersion:{type:`string`,enum:[...r],description:`Optional maximum TLS version`},caPem:{type:`string`,description:`Optional PEM-encoded CA bundle`},caPath:{type:`string`,description:`Optional path to a PEM-encoded CA bundle`},allowInvalidCertificates:{type:`boolean`,default:!1,description:`Allow untrusted certificate chains`},skipHostnameCheck:{type:`boolean`,default:!1,description:`Skip hostname verification`}}),i(`websocket_send_frame`,`Send a WebSocket frame.`,{sessionId:{type:`string`,description:`WebSocket session ID`},frameType:{type:`string`,enum:[`text`,`binary`,`ping`,`pong`,`close`],description:`Outgoing frame opcode`},dataText:{type:`string`,description:`UTF-8 payload for text/ping/pong/close frames`},dataHex:{type:`string`,description:`Hex-encoded payload for binary/ping/pong/close frames`},closeCode:{type:`number`,description:`Optional close status code`},closeReason:{type:`string`,description:`Optional close reason`},timeoutMs:{type:`number`,default:5e3,description:`Write timeout in milliseconds`}},[`sessionId`,`frameType`]),i(`websocket_read_frame`,`Read the next queued WebSocket frame from an open session.`,{sessionId:{type:`string`,description:`WebSocket session ID`},timeoutMs:{type:`number`,default:5e3,description:`Read timeout in milliseconds`}},[`sessionId`]),i(`websocket_close`,`Close an open WebSocket session.`,{sessionId:{type:`string`,description:`WebSocket session ID`},force:{type:`boolean`,default:!1,description:`Destroy the underlying socket immediately without sending a close frame first`},closeCode:{type:`number`,description:`Optional close status code`},closeReason:{type:`string`,description:`Optional close reason`},timeoutMs:{type:`number`,default:1e3,description:`Close wait timeout in milliseconds before forcing socket destruction`}},[`sessionId`])],u=[...c,...s,...l,...a,...o],d=`boringssl-inspector`,f=`boringsslInspectorHandlers`,p=[`workflow`,`full`],m=n({domain:d,depKey:f,lookup:t(u),wrapResult:e,entries:[{tool:`tls_keylog_enable`,method:`handleTlsKeylogEnable`},{tool:`tls_keylog_parse`,method:`handleTlsKeylogParse`},{tool:`tls_keylog_disable`,method:`handleTlsKeylogDisable`},{tool:`tls_decrypt_payload`,method:`handleTlsDecryptPayload`},{tool:`tls_keylog_summarize`,method:`handleTlsKeylogSummarize`},{tool:`tls_keylog_lookup_secret`,method:`handleTlsKeylogLookupSecret`},{tool:`tls_cert_pin_bypass`,method:`handleTlsCertPinBypass`},{tool:`tls_parse_handshake`,method:`handleParseHandshake`},{tool:`tls_cipher_suites`,method:`handleCipherSuites`},{tool:`tls_parse_certificate`,method:`handleParseCertificate`},{tool:`tls_probe_endpoint`,method:`handleTlsProbeEndpoint`},{tool:`tcp_open`,method:`handleTcpOpen`},{tool:`tcp_write`,method:`handleTcpWrite`},{tool:`tcp_read_until`,method:`handleTcpReadUntil`},{tool:`tcp_close`,method:`handleTcpClose`},{tool:`tls_open`,method:`handleTlsOpen`},{tool:`tls_write`,method:`handleTlsWrite`},{tool:`tls_read_until`,method:`handleTlsReadUntil`},{tool:`tls_close`,method:`handleTlsClose`},{tool:`websocket_open`,method:`handleWebSocketOpen`},{tool:`websocket_send_frame`,method:`handleWebSocketSendFrame`},{tool:`websocket_read_frame`,method:`handleWebSocketReadFrame`},{tool:`websocket_close`,method:`handleWebSocketClose`},{tool:`tls_cert_pin_bypass_frida`,method:`handleBypassCertPinning`},{tool:`net_raw_tcp_send`,method:`handleRawTcpSend`},{tool:`net_raw_tcp_listen`,method:`handleRawTcpListen`},{tool:`net_raw_udp_send`,method:`handleRawUdpSend`},{tool:`net_raw_udp_listen`,method:`handleRawUdpListen`}]});async function h(e){let{BoringsslInspectorHandlers:t}=await import(`./handlers-D5E40ssn.mjs`),{TLSKeyLogExtractor:n}=await import(`./boringssl-inspector-BBaJwwkU.mjs`).then(e=>e.t),r=e.getDomainInstance(f);if(r)return r;let i=new t(new n);return i.setExtensionInvoke(async t=>{try{let n=e.getDomainInstance(`binaryInstrumentHandlers`);if(n&&typeof n.handleFridaRunScript==`function`)return n.handleFridaRunScript(t)}catch{}return null}),i.setEventBus(e.eventBus),e.setDomainInstance(f,i),i}const g={kind:`domain-manifest`,version:1,domain:d,depKey:f,profiles:p,registrations:m,ensure:h,workflowRule:{patterns:[/\b(tls|ssl|boringssl|cert(ificate)?|pinning|handshake|keylog|websocket)\b/i,/(tls|ssl|cert|pinning|websocket).*(hook|bypass|intercept|dump|log|frame|session)/i],priority:80,tools:[`tls_probe_endpoint`,`websocket_open`,`websocket_send_frame`,`websocket_read_frame`,`tls_keylog_enable`,`tls_keylog_parse`,`tls_decrypt_payload`,`tls_cert_pin_bypass`],hint:`TLS/WebSocket analysis: probe endpoint → open ws/wss session → exchange frames → inspecttrust/cipher/ALPN → enable keylog or bypass pinning when needed.`},prerequisites:{tls_probe_endpoint:[{condition:`Target scope must be explicitly authorized and routable from the MCP host`,fix:`Verify target authorization, port reachability, and provide servername/custom CA options when needed`}],tls_keylog_enable:[{condition:`Target process must allow SSLKEYLOGFILE or be attachable by Frida`,fix:`Launch the target with SSLKEYLOGFILE env set, or enable Frida-based hooking`}],tls_decrypt_payload:[{condition:`A keylog session must be active with captured secrets`,fix:`Run tls_keylog_enable and reproduce TLS traffic before decrypting`}],tls_cert_pin_bypass_frida:[{condition:`Frida must be available on PATH and attached to the target`,fix:`Install Frida and attach via binary-instrument:frida_attach before running the bypass`}]},toolDependencies:[{from:`network`,to:`boringssl-inspector`,relation:`uses`,weight:.8}]};export{g as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./tool-builder-qif8M9-K.mjs";import{resolve as r}from"node:path";const i=[n(`evidence_query`,e=>e.desc(`Query reverse evidence graph by URL, function name, or script ID to find associated nodes.`).enum(`by`,[`url`,`function`,`script`],`Query dimension`).string(`value`,`Search value: URL/fragment, function name, or script ID`).required(`by`,`value`).query()),n(`evidence_export`,e=>e.desc(`Export the reverse evidence graph as JSON snapshot or Markdown report.`).enum(`format`,[`json`,`markdown`],`Export format`).required(`format`).query()),n(`evidence_chain`,e=>e.desc(`Get full provenance chain from a node ID in specified direction.`).string(`nodeId`,`Evidence node ID to start from`).enum(`direction`,[`forward`,`backward`],`Traversal direction`,{default:`forward`}).required(`nodeId`).query())],a=`evidence`,o=`evidenceHandlers`,s=t({domain:a,depKey:o,lookup:e(i),entries:[{tool:`evidence_query`,method:`handleQueryDispatch`},{tool:`evidence_export`,method:`handleExportDispatch`},{tool:`evidence_chain`,method:`handleChain`}]});async function c(e){let{ReverseEvidenceGraph:t}=await import(`./ReverseEvidenceGraph-BhSYYdiI.mjs`).then(e=>e.t),{EvidenceGraphBridge:n}=await import(`./EvidenceGraphBridge-BtbwXsLC.mjs`),{EvidenceHandlers:i}=await import(`./handlers-0yKLRIfo.mjs`),a=e.getDomainInstance(`evidenceGraph`);a||(a=new t,a.setEventBus(e.eventBus),e.setDomainInstance(`evidenceGraph`,a));let o=e.getDomainInstance(`evidenceGraphBridge`);o||(o=new n(a),e.setDomainInstance(`evidenceGraphBridge`,o)),e.getDomainInstance(`instrumentationSessionManager`)?.setEvidenceBridge(o),e.evidenceHandlers||=new i(a);let s=e.getDomainInstance(`snapshotScheduler`),c=e.getDomainInstance(`snapshotStateDir`);return a.setPersistNotifier(s?()=>s.notifyDirty():void 0),s&&c&&!e.getDomainInstance(`evidenceGraphSnapshotRegistered`)&&(s.register(r(c,`evidence-graph`,`current.json`),a),e.setDomainInstance(`evidenceGraphSnapshotRegistered`,!0)),e.evidenceHandlers}const l={kind:`domain-manifest`,version:1,domain:a,depKey:o,profiles:[`full`],ensure:c,workflowRule:{patterns:[/(evidence|provenance|chain).*(graph|query|export|report)/i,/(证据|溯源|链).*(图|查询|导出|报告)/i],priority:90,tools:[`evidence_query`,`evidence_export`],hint:`Evidence graph: query by URL/function/scriptId → get provenance chain → export as JSON or Markdown report`},registrations:s};export{l as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./tool-builder-qif8M9-K.mjs";const r=[n(`binary_instrument_capabilities`,e=>e.desc(`Report binary instrumentation backend availability.`).query()),n(`frida_attach`,e=>e.desc(`Attach Frida to a local target and open a session.`).string(`target`,`Process name, PID, or binary path to attach to`).required(`target`)),n(`frida_enumerate_modules`,e=>e.desc(`List loaded modules in an attached Frida session.`).string(`sessionId`,`Session id returned by frida_attach`).required(`sessionId`).query()),n(`ghidra_analyze`,e=>e.desc(`Analyze a binary and return metadata.`).string(`binaryPath`,`Path to the binary file`).number(`timeout`,`Optional timeout in milliseconds for headless analysis`).required(`binaryPath`)),n(`generate_hooks`,e=>e.desc(`Generate a Frida interceptor script for a list of symbols.`).array(`symbols`,{type:`string`},`Symbol names to hook`).object(`options`,{includeArgs:{type:`boolean`,description:`Emit argument logging on function entry`},includeRetAddr:{type:`boolean`,description:`Emit return-address logging on function entry`}},`Optional Frida hook generation flags`).required(`symbols`)),n(`unidbg_emulate`,e=>e.desc(`Emulate a native function with Unidbg when available.`).string(`binaryPath`,`Path to the binary file`).string(`functionName`,`Function name to emulate`).array(`args`,{type:`string`},`Optional string arguments forwarded to emulation`).required(`binaryPath`,`functionName`)),n(`frida_run_script`,e=>e.desc(`Execute a Frida JavaScript snippet inside an attached Frida session.`).string(`sessionId`,`Session id returned by frida_attach`).string(`script`,`Frida JavaScript to execute`).required(`sessionId`,`script`)),n(`frida_detach`,e=>e.desc(`Detach from a Frida session and clean up resources.`).string(`sessionId`,`Session id returned by frida_attach`).required(`sessionId`)),n(`frida_list_sessions`,e=>e.desc(`List all active Frida attach sessions with target info.`).query()),n(`frida_generate_script`,e=>e.desc(`Generate a Frida interceptor or hook script from built-in templates.`).string(`target`,`Target binary or module name`).string(`template`,`Hook template type: trace, intercept, replace, log`).string(`functionName`,`Function name to generate hook for`).required(`target`,`template`)),n(`get_available_plugins`,e=>e.desc(`List installed binary analysis plugins.`).query()),n(`ghidra_decompile`,e=>e.desc(`Decompile a function using Ghidra.`).string(`binaryPath`,`Path to the binary file`).string(`functionName`,`Function name to decompile`).required(`binaryPath`,`functionName`)),n(`ida_decompile`,e=>e.desc(`Decompile a function using IDA Pro.`).string(`binaryPath`,`Path to the binary file`).string(`functionName`,`Function name to decompile`).required(`binaryPath`,`functionName`)),n(`jadx_decompile`,e=>e.desc(`Decompile an APK class or method with JADX CLI, auto-resolving likely class matches when possible, or use the legacy plugin bridge when available.`).string(`apkPath`,`Path to the APK file`).string(`className`,`Fully qualified class name`).string(`methodName`,`Method name to decompile`).required(`apkPath`,`className`)),n(`apktool_decode`,e=>e.desc(`Decode an APK using apktool to inspect resources, manifest, and smali output.`).string(`apkPath`,`Path to the APK file`).string(`outputDir`,`Optional output directory for decoded contents`).boolean(`force`,`Overwrite output directory if it already exists`,{default:!1}).required(`apkPath`)),n(`apk_manifest_dump`,e=>e.desc(`Extract AndroidManifest.xml from an APK for quick inspection; return readable XML when possible, using JADX CLI as a cross-platform decode fallback for binary AXML, otherwise return base64.`).string(`apkPath`,`Path to the APK file`).required(`apkPath`)),n(`apk_native_libs_list`,e=>e.desc(`List packaged native shared libraries (.so) inside an APK.`).string(`apkPath`,`Path to the APK file`).required(`apkPath`).query()),n(`unidbg_launch`,e=>e.desc(`Emulate a native shared library in Unidbg.`).string(`soPath`,`Path to the .so library file`).string(`arch`,`Architecture: arm or arm64`).required(`soPath`)),n(`unidbg_call`,e=>e.desc(`Call a JNI function in a running Unidbg emulator session.`).string(`sessionId`,`Session id from unidbg_launch`).string(`functionName`,`JNI function name to call`).required(`sessionId`,`functionName`)),n(`unidbg_trace`,e=>e.desc(`Get execution trace from Unidbg session with configurable detail.`).string(`sessionId`,`Session id from unidbg_launch`).required(`sessionId`)),n(`export_hook_script`,e=>e.desc(`Export generated hook templates as a complete, runnable Frida script.`).string(`hookTemplates`,`JSON array of hook template objects`)),n(`frida_enumerate_functions`,e=>e.desc(`Enumerate exported functions for a specific module in a Frida session.`).string(`sessionId`,`Session id returned by frida_attach`).string(`moduleName`,`Module name to enumerate exports from`).required(`sessionId`,`moduleName`).query()),n(`frida_find_symbols`,e=>e.desc(`Search for symbols matching a pattern in a Frida session.`).string(`sessionId`,`Session id returned by frida_attach`).string(`pattern`,`Symbol search pattern (e.g. "exports:*libssl*SSL*")`).required(`sessionId`,`pattern`).query())],i=`binary-instrument`,a=`binaryInstrumentHandlers`,o=t({domain:i,depKey:a,lookup:e(r),entries:[{tool:`binary_instrument_capabilities`,method:`handleBinaryInstrumentCapabilities`},{tool:`frida_attach`,method:`handleFridaAttach`},{tool:`frida_enumerate_modules`,method:`handleFridaEnumerateModules`},{tool:`ghidra_analyze`,method:`handleGhidraAnalyze`},{tool:`generate_hooks`,method:`handleGenerateHooks`},{tool:`unidbg_emulate`,method:`handleUnidbgEmulate`},{tool:`frida_run_script`,method:`handleFridaRunScript`},{tool:`frida_detach`,method:`handleFridaDetach`},{tool:`frida_list_sessions`,method:`handleFridaListSessions`},{tool:`frida_generate_script`,method:`handleFridaGenerateScript`},{tool:`get_available_plugins`,method:`handleGetAvailablePlugins`},{tool:`ghidra_decompile`,method:`handleGhidraDecompile`},{tool:`ida_decompile`,method:`handleIdaDecompile`},{tool:`jadx_decompile`,method:`handleJadxDecompile`},{tool:`apktool_decode`,method:`handleApktoolDecode`},{tool:`apk_manifest_dump`,method:`handleApkManifestDump`},{tool:`apk_native_libs_list`,method:`handleApkNativeLibsList`},{tool:`unidbg_launch`,method:`handleUnidbgLaunch`},{tool:`unidbg_call`,method:`handleUnidbgCall`},{tool:`unidbg_trace`,method:`handleUnidbgTrace`},{tool:`export_hook_script`,method:`handleExportHookScript`},{tool:`frida_enumerate_functions`,method:`handleFridaEnumerateFunctions`},{tool:`frida_find_symbols`,method:`handleFridaFindSymbols`}]});async function s(e){let{BinaryInstrumentHandlers:t}=await import(`./handlers-VHWrxbM_.mjs`),{GhidraAnalyzer:n,HookGenerator:r}=await import(`./binary-instrument-DU7V6TUM.mjs`).then(e=>e.t),i=e.getDomainInstance(a);return i||(i=new t(e,new n,new r),e.setDomainInstance(a,i)),i}const c={kind:`domain-manifest`,version:1,domain:i,depKey:a,profiles:[`full`],ensure:s,registrations:o,workflowRule:{patterns:[/\b(frida|ghidra|ida|unidbg|jadx|binary|disassemb|decompil|dump\s?so)\b/i,/(binary|native|so|dll|elf|apk).*(analyze|hook|instrument|decompile)/i,/(apk|android).*(manifest|apktool|native\s+libs|shared\s+library|\.so)/i],priority:88,tools:[`frida_attach`,`ghidra_analyze`,`jadx_decompile`,`apktool_decode`,`apk_manifest_dump`,`apk_native_libs_list`,`generate_hooks`,`unidbg_launch`],hint:`Binary analysis pipeline: attach Frida → decompile/inspect APK, manifest, and native libs → generate hook scripts → emulate with Unidbg.`},prerequisites:{frida_attach:[{condition:`Frida CLI must be installed; device targets may also require frida-server and elevated privileges`,fix:`Install frida-tools and, for Android/device targets, launch frida-server on the target.`}],frida_run_script:[{condition:`A Frida session must be active`,fix:`Call frida_attach before running a script`}],ghidra_analyze:[{condition:`Ghidra analyzeHeadless must be installed and reachable on PATH`,fix:`Install Ghidra and ensure analyzeHeadless is on PATH.`}],ida_decompile:[{condition:`plugin_ida_bridge must be installed`,fix:`Install @jshookmcpextension/plugin-ida-bridge and provide IDA Pro license`}],jadx_decompile:[{condition:`jadx CLI or plugin_jadx_bridge must be available`,fix:`Install JADX and ensure jadx is on PATH, or install @jshookmcpextension/plugin-jadx-bridge.`}],apktool_decode:[{condition:`apktool CLI must be installed`,fix:`Install apktool and ensure it is on PATH.`}],unidbg_launch:[{condition:`Java 17+ and unidbg JAR must be reachable`,fix:`Install JDK 17+ and download unidbg from its official release`}],generate_hooks:[{condition:`Ghidra analysis output required`,fix:`Run ghidra_analyze first and pass the output to generate_hooks`}]},toolDependencies:[{from:`process`,to:`binary-instrument`,relation:`uses`,weight:.6}]};export{c as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./definitions-DAQm1Xar.mjs";const r=`coordination`,i=`coordinationHandlers`,a=t({domain:r,depKey:i,lookup:e(n),entries:[{tool:`create_task_handoff`,method:`handleCreateTaskHandoff`},{tool:`complete_task_handoff`,method:`handleCompleteTaskHandoff`},{tool:`get_task_context`,method:`handleGetTaskContext`},{tool:`append_session_insight`,method:`handleAppendSessionInsight`},{tool:`save_page_snapshot`,method:`handleSavePageSnapshot`},{tool:`restore_page_snapshot`,method:`handleRestorePageSnapshot`},{tool:`list_page_snapshots`,method:`handleListPageSnapshots`}]});async function o(e){let{CoordinationHandlers:t}=await import(`./coordination-CWXW1o8K.mjs`);return e.coordinationHandlers||=new t(e),e.coordinationHandlers}const s={kind:`domain-manifest`,version:1,domain:r,depKey:i,profiles:[`full`],ensure:o,registrations:a};export{s as default};
@@ -0,0 +1 @@
1
+ import{n as e}from"./ServerRuntimeState-D2bWHqEE.mjs";import{t}from"./BrowserSessionCoordinator-BJ-HOxo0.mjs";import{t as n}from"./registry-DH4sc1dt.mjs";import{n as r}from"./bind-helpers-m2U8glkF.mjs";import{t as i}from"./ensure-browser-core-DxWC-NTp.mjs";import{n as a,t as o}from"./definitions-CMZRSy3k.mjs";const s=`browser`,c=`browserHandlers`,l=r({domain:s,depKey:c,lookup:n([...o,...a]),entries:[{tool:`get_detailed_data`,method:`handleGetDetailedData`},{tool:`browser_attach`,method:`handleBrowserAttach`},{tool:`browser_list_tabs`,method:`handleBrowserListTabs`},{tool:`browser_list_cdp_targets`,method:`handleBrowserListCdpTargets`},{tool:`browser_select_tab`,method:`handleBrowserSelectTab`},{tool:`browser_attach_cdp_target`,method:`handleBrowserAttachCdpTarget`},{tool:`browser_detach_cdp_target`,method:`handleBrowserDetachCdpTarget`},{tool:`browser_evaluate_cdp_target`,method:`handleBrowserEvaluateCdpTarget`},{tool:`browser_launch`,method:`handleBrowserLaunch`},{tool:`browser_close`,method:`handleBrowserClose`},{tool:`browser_status`,method:`handleBrowserStatus`},{tool:`page_navigate`,method:`handlePageNavigate`},{tool:`page_reload`,method:`handlePageReload`},{tool:`page_back`,method:`handlePageBack`},{tool:`page_forward`,method:`handlePageForward`},{tool:`page_list_frames`,method:`handlePageListFrames`},{tool:`page_click`,method:`handlePageClick`},{tool:`page_type`,method:`handlePageType`},{tool:`page_upload_files`,method:`handlePageUploadFiles`},{tool:`page_select`,method:`handlePageSelect`},{tool:`page_hover`,method:`handlePageHover`},{tool:`page_scroll`,method:`handlePageScroll`},{tool:`page_wait_for_selector`,method:`handlePageWaitForSelector`},{tool:`page_evaluate`,method:`handlePageEvaluate`},{tool:`page_screenshot`,method:`handlePageScreenshot`},{tool:`get_all_scripts`,method:`handleGetAllScripts`},{tool:`get_script_source`,method:`handleGetScriptSource`},{tool:`console_monitor`,method:`handleConsoleMonitor`},{tool:`console_get_logs`,method:`handleConsoleGetLogs`},{tool:`console_execute`,method:`handleConsoleExecute`},{tool:`page_inject_script`,method:`handlePageInjectScript`},{tool:`page_cookies`,method:`handlePageCookiesDispatch`},{tool:`page_set_viewport`,method:`handlePageSetViewport`},{tool:`page_emulate_device`,method:`handlePageEmulateDevice`},{tool:`page_local_storage`,method:`handlePageLocalStorageDispatch`},{tool:`page_press_key`,method:`handlePagePressKey`},{tool:`captcha_detect`,method:`handleCaptchaDetect`},{tool:`captcha_wait`,method:`handleCaptchaWait`},{tool:`captcha_config`,method:`handleCaptchaConfig`},{tool:`stealth_inject`,method:`handleStealthInject`},{tool:`stealth_set_user_agent`,method:`handleStealthSetUserAgent`},{tool:`stealth_configure_jitter`,method:`handleStealthConfigureJitter`},{tool:`stealth_generate_fingerprint`,method:`handleStealthGenerateFingerprint`},{tool:`stealth_verify`,method:`handleStealthVerify`},{tool:`camoufox_geolocation`,method:`handleCamoufoxGeolocation`},{tool:`camoufox_server`,method:`handleCamoufoxServerDispatch`},{tool:`framework_state_extract`,method:`handleFrameworkStateExtract`},{tool:`indexeddb_dump`,method:`handleIndexedDBDump`},{tool:`js_heap_search`,method:`handleJSHeapSearch`},{tool:`tab_workflow`,method:`handleTabWorkflow`},{tool:`browser_codegen_start`,method:`handleBrowserCodegenStart`},{tool:`browser_codegen_stop`,method:`handleBrowserCodegenStop`},{tool:`human_mouse`,method:`handleHumanMouse`},{tool:`human_scroll`,method:`handleHumanScroll`},{tool:`human_typing`,method:`handleHumanTyping`},{tool:`captcha_solver_capabilities`,method:`handleCaptchaSolverCapabilities`},{tool:`captcha_vision_solve`,method:`handleCaptchaVisionSolve`},{tool:`widget_challenge_solve`,method:`handleWidgetChallengeSolve`},{tool:`browser_jsdom_parse`,method:`handleJsdomParse`},{tool:`browser_jsdom_query`,method:`handleJsdomQuery`},{tool:`browser_jsdom_execute`,method:`handleJsdomExecute`},{tool:`browser_jsdom_serialize`,method:`handleJsdomSerialize`},{tool:`browser_jsdom_cookies`,method:`handleJsdomCookies`}]});async function u(n){let{BrowserToolHandlers:r}=await import(`./browser-Qqco2rOT.mjs`);if(await i(n),!n.browserHandlers){let i=n,a=typeof n.getDomainInstance==`function`?n.getDomainInstance.bind(n):null,o=typeof n.setDomainInstance==`function`?n.setDomainInstance.bind(n):null,s=a?.(`browserSessionCoordinator`)??i.browserSessionCoordinator??new t(()=>n.collector);o?o(`browserSessionCoordinator`,s):i.browserSessionCoordinator=s,n.browserHandlers=new r(n.collector,n.pageController,n.scriptManager,n.consoleMonitor,n.eventBus,()=>s.getCurrentSessionId(),s,t=>{e(n)?.setBrowserAttach(t)})}return n.browserHandlers}const d={kind:`domain-manifest`,version:1,domain:s,depKey:c,profiles:[`workflow`,`full`],ensure:u,workflowRule:{patterns:[/(browser|page|navigate|screenshot|click|type|scrape)/i,/(浏览器|页面|导航|截图|点击|输入|爬取)/i],priority:90,tools:[`page_navigate`,`page_evaluate`,`browser_jsdom_parse`,`console_get_logs`,`page_click`,`page_type`,`page_screenshot`],hint:`Browser automation workflow: bootstrap browser/page state -> inspect page state -> interact -> capture visual evidence only when needed`},prerequisites:{page_navigate:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}],page_click:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}],page_type:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}],page_upload_files:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}],page_screenshot:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}],page_evaluate:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}],page_hover:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}],page_back:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}],page_forward:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}],page_reload:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}],page_scroll:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}]},registrations:l};export{d as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./tool-builder-qif8M9-K.mjs";import{t as r}from"./authorization-schema-BOFwSXUN.mjs";const i=[`before-load-inject`,`runtime-hook`,`network-intercept`,`function-trace`],a=[n(`instrumentation_session`,e=>e.desc(`Start, stop, or query status of an instrumentation recording session.`).enum(`action`,[`create`,`list`,`destroy`,`status`],`Session operation`).string(`name`,`Optional session name for create`).string(`sessionId`,`Session ID (required for destroy/status)`).required(`action`)),n(`instrumentation_operation`,e=>e.desc(`Manage operations inside an instrumentation session.`).enum(`action`,[`register`,`list`],`Operation`).string(`sessionId`,`Session ID`).enum(`type`,i,`Instrumentation type (action=register)`).string(`target`,`Function name, URL pattern, or script target (action=register)`).object(`config`,{},`Operation-specific config (action=register)`).required(`action`,`sessionId`)),n(`instrumentation_artifact`,e=>e.desc(`Manage artifacts captured by instrumentation operations.`).enum(`action`,[`record`,`query`],`Artifact operation`).string(`sessionId`,`Session ID`).string(`operationId`,`Operation ID (action=record)`).object(`data`,{},`Captured artifact payload (action=record)`).enum(`type`,i,`Optional artifact type filter (action=query)`).number(`limit`,`Max artifacts to return (action=query, default: 50)`,{default:50}).required(`action`,`sessionId`)),n(`instrumentation_hook_preset`,e=>e.desc(`Apply hook presets inside an instrumentation session.`).string(`sessionId`,`Session ID`).string(`preset`,`Single preset id to inject`).array(`presets`,{type:`string`},`Multiple preset ids to inject in one call`).boolean(`captureStack`,`Whether injected presets should capture stack traces`,{default:!1}).boolean(`logToConsole`,`Whether injected presets should log to console`,{default:!0}).enum(`method`,[`evaluate`,`evaluateOnNewDocument`],`Injection method forwarded to hook_preset`,{default:`evaluate`}).prop(`customTemplate`,{type:`object`,additionalProperties:!0,description:`Optional inline custom preset definition`}).prop(`customTemplates`,{type:`array`,items:{type:`object`,additionalProperties:!0},description:`Optional inline custom preset definitions`}).requiredOpenWorld(`sessionId`)),n(`instrumentation_network_replay`,e=>e.desc(`Replay a captured network request inside an instrumentation session.`).string(`sessionId`,`Session ID`).string(`requestId`,`Captured request ID returned by network_get_requests`).object(`headerPatch`,{additionalProperties:{type:`string`}},`Optional request header overrides`).string(`bodyPatch`,`Optional raw request body override`).string(`methodOverride`,`Optional HTTP method override`).string(`urlOverride`,`Optional destination URL override`).object(`authorization`,r,`Optional request-scoped authorization for private-network or insecure-HTTP replay.`).string(`authorizationCapability`,`Optional base64url-encoded request-scoped authorization capability.`).number(`timeoutMs`,`Optional replay timeout in milliseconds`).boolean(`dryRun`,`Preview the replay without sending the request`,{default:!0}).requiredOpenWorld(`sessionId`,`requestId`))],o=`instrumentation`,s=`instrumentationHandlers`,c=t({domain:o,depKey:s,lookup:e(a),entries:[{tool:`instrumentation_session`,method:`handleSessionDispatch`},{tool:`instrumentation_operation`,method:`handleOperationDispatch`},{tool:`instrumentation_artifact`,method:`handleArtifactDispatch`},{tool:`instrumentation_hook_preset`,method:`handleHookPreset`},{tool:`instrumentation_network_replay`,method:`handleNetworkReplay`}]});async function l(e){let{ReverseEvidenceGraph:t}=await import(`./ReverseEvidenceGraph-BhSYYdiI.mjs`).then(e=>e.t),{InstrumentationSessionManager:n}=await import(`./InstrumentationSession-D_G1ZPyd.mjs`),{EvidenceGraphBridge:r}=await import(`./EvidenceGraphBridge-BtbwXsLC.mjs`),{InstrumentationHandlers:i}=await import(`./handlers-B62K4FTc.mjs`),a=e.handlerDeps.hookPresetHandlers,o=e.handlerDeps.advancedHandlers,s=e.getDomainInstance(`evidenceGraph`);s||(s=new t,e.setDomainInstance(`evidenceGraph`,s));let c=e.getDomainInstance(`instrumentationSessionManager`);c||(c=new n,e.setDomainInstance(`instrumentationSessionManager`,c));let l=e.getDomainInstance(`evidenceGraphBridge`);return l||(l=new r(s),e.setDomainInstance(`evidenceGraphBridge`,l)),c.setEvidenceBridge(l),e.instrumentationHandlers||=new i(c,{hookPresetHandlers:a,advancedHandlers:o}),e.instrumentationHandlers}const u={kind:`domain-manifest`,version:1,domain:o,depKey:s,profiles:[`full`],ensure:l,workflowRule:{patterns:[/(hook|intercept|trace|instrument).*(session|unified|manage|all)/i,/(session|统一|会话).*(hook|拦截|追踪|仪器化|instrument)/i],priority:95,tools:[`instrumentation_session`,`instrumentation_operation`,`instrumentation_artifact`,`instrumentation_hook_preset`,`instrumentation_network_replay`],hint:`Instrumentation session: create session → attach hook presets / network replay → record artifacts → query artifacts → destroy when done`},registrations:c};export{u as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./definitions-Bio5XJYy.mjs";const r=`binary-secrets`,i=`binarySecretsHandlers`,a=t({domain:r,depKey:i,lookup:e(n),entries:[{tool:`binary_key_extract`,method:`handleBinaryKeyExtract`}]});async function o(e){let{BinarySecretsHandlers:t}=await import(`./binary-secrets-PdMVoyt0.mjs`);return e.binarySecretsHandlers||=new t,e.binarySecretsHandlers}const s={kind:`domain-manifest`,version:1,domain:r,depKey:i,profiles:[`full`],ensure:o,registrations:a};export{s as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./ensure-browser-core-DxWC-NTp.mjs";import{t as r}from"./definitions-bybDvnG0.mjs";const i=`debugger`,a=`debuggerHandlers`,o=t({domain:i,depKey:a,lookup:e(r),entries:[{tool:`debugger_lifecycle`,method:`handleDebuggerLifecycle`},{tool:`debugger_pause`,method:`handleDebuggerPause`},{tool:`debugger_resume`,method:`handleDebuggerResume`},{tool:`debugger_step`,method:`handleDebuggerStep`},{tool:`breakpoint`,method:`handleBreakpoint`},{tool:`get_call_stack`,method:`handleGetCallStack`},{tool:`debugger_evaluate`,method:`handleDebuggerEvaluateDispatch`},{tool:`debugger_wait_for_paused`,method:`handleDebuggerWaitForPaused`},{tool:`debugger_get_paused_state`,method:`handleDebuggerGetPausedState`},{tool:`get_object_properties`,method:`handleGetObjectProperties`},{tool:`get_scope_variables_enhanced`,method:`handleGetScopeVariablesEnhanced`},{tool:`debugger_session`,method:`handleDebuggerSession`},{tool:`watch`,method:`handleWatch`},{tool:`blackbox_add`,method:`handleBlackboxAdd`},{tool:`blackbox_add_common`,method:`handleBlackboxAddCommon`},{tool:`blackbox_list`,method:`handleBlackboxList`}]});async function s(e){let{DebuggerManager:t,RuntimeInspector:r}=await import(`./modules-BPBcSaM-.mjs`).then(e=>e.t),{DebuggerToolHandlers:i}=await import(`./debugger-DyALjYMk.mjs`);return await n(e),(!e.debuggerManager||!e.runtimeInspector||!e.debuggerHandlers)&&(e.debuggerManager||=new t(e.collector),e.runtimeInspector||=new r(e.collector,e.debuggerManager),e.debuggerHandlers||=new i(e.debuggerManager,e.runtimeInspector,e.eventBus)),e.debuggerHandlers}const c={kind:`domain-manifest`,version:1,domain:i,depKey:a,profiles:[`workflow`,`full`],ensure:s,prerequisites:{debugger_lifecycle:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}],breakpoint:[{condition:`Browser must be launched`,fix:`Call browser_launch and debugger_lifecycle(enable) first`}]},registrations:o};export{c as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./ensure-browser-core-DxWC-NTp.mjs";import{t as r}from"./definitions-CB6vmOer.mjs";const i=`encoding`,a=`encodingHandlers`,o=t({domain:i,depKey:a,lookup:e(r),entries:[{tool:`binary_detect_format`,method:`handleBinaryDetectFormat`},{tool:`binary_decode`,method:`handleBinaryDecode`},{tool:`binary_encode`,method:`handleBinaryEncode`},{tool:`binary_entropy_analysis`,method:`handleBinaryEntropyAnalysis`},{tool:`protobuf_decode_raw`,method:`handleProtobufDecodeRaw`}]});async function s(e){let{EncodingToolHandlers:t}=await import(`./encoding-ycOaz8Vr.mjs`);return await n(e),e.encodingHandlers||=new t(e.collector,async t=>e.consoleMonitor?.getResponseBody(t)??null),e.encodingHandlers}const c={kind:`domain-manifest`,version:1,domain:i,depKey:a,profiles:[`workflow`,`full`],ensure:s,registrations:o};export{c as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./tool-builder-qif8M9-K.mjs";const r=[n(`mojo_ipc_capabilities`,e=>e.desc(`Report Mojo IPC monitoring availability.`).query()),n(`mojo_monitor`,e=>e.desc(`Start or stop Mojo IPC monitoring for the active Chromium-based target.`).enum(`action`,[`start`,`stop`],`Monitor action`).string(`deviceId`,`Optional device or transport identifier (action=start)`).required(`action`)),n(`mojo_decode_message`,e=>e.desc(`Decode a Mojo IPC hex payload into a structured field map.`).string(`hexPayload`,`Hex-encoded Mojo IPC payload`).required(`hexPayload`).query()),n(`mojo_list_interfaces`,e=>e.desc(`List discovered Mojo IPC interfaces and their pending message counts.`).query()),n(`mojo_messages_get`,e=>e.desc(`Retrieve captured Mojo IPC messages from the active monitoring session.`).number(`limit`,`Maximum number of messages to retrieve (default 100)`).string(`interface`,`Filter messages by interface name`).query())],i=`mojo-ipc`,a=`mojoIpcHandlers`,o=t({domain:i,depKey:a,lookup:e(r),entries:[{tool:`mojo_ipc_capabilities`,method:`handleMojoIpcCapabilities`},{tool:`mojo_monitor`,method:`handleMojoMonitorDispatch`},{tool:`mojo_decode_message`,method:`handleMojoDecodeMessage`},{tool:`mojo_list_interfaces`,method:`handleMojoListInterfaces`},{tool:`mojo_messages_get`,method:`handleMojoMessagesGet`}]});async function s(e){let{MojoIPCHandlers:t}=await import(`./mojo-ipc-BhwsdVUW.mjs`),n=e.getDomainInstance(a);if(n)return n;let r=new t(void 0,void 0,e.eventBus);return e.setDomainInstance(a,r),r}const c={kind:`domain-manifest`,version:1,domain:i,depKey:a,profiles:[`full`],registrations:o,ensure:s,workflowRule:{patterns:[/\b(mojo|ipc|chromium\s?(ipc|message)|interface\s?(broker|registry))\b/i,/(mojo|ipc|chromium).*(monitor|capture|hook|trace)/i],priority:75,tools:[`mojo_monitor`,`mojo_decode_message`,`mojo_list_interfaces`],hint:`Mojo IPC: start monitor → capture messages → decode payloads → correlate with CDP`},prerequisites:{mojo_monitor:[{condition:`Frida must be available for real process attachment`,fix:`Install Frida and ensure the Chromium target process is launched first`}],mojo_decode_message:[{condition:`Captured message payload hex is required`,fix:`Start a monitoring session via mojo_monitor and capture traffic first`}]},toolDependencies:[{from:`browser`,to:`mojo-ipc`,relation:`uses`,weight:.8}]};export{c as default,r as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./tool-builder-qif8M9-K.mjs";const r=[n(`execute_sandbox_script`,e=>e.desc(`Execute JavaScript in an isolated sandbox.`).string(`code`,`JavaScript source code to execute inside the sandbox`).string(`sessionId`,`Session ID for scratchpad persistence across executions`).number(`timeoutMs`,`Execution timeout in ms`,{default:1e3}).boolean(`autoCorrect`,`Retry failed scripts up to 2 times with error context`,{default:!1}).required(`code`))],i=`sandbox`,a=`sandboxHandlers`,o=t({domain:i,depKey:a,lookup:e(r),entries:[{tool:`execute_sandbox_script`,method:`handleExecuteSandboxScript`}]});async function s(e){let{SandboxToolHandlers:t}=await import(`./handlers-mPFiNPe8.mjs`),n=e.getDomainInstance(a);if(n)return n;let r=new t(e);return e.setDomainInstance(a,r),r}const c={kind:`domain-manifest`,version:1,domain:i,depKey:a,profiles:[`full`],ensure:s,registrations:o};export{c as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./definitions-C3qNgSn1.mjs";const r=`dart-inspector`,i=`dartInspectorHandlers`,a=t({domain:r,depKey:i,lookup:e(n),entries:[{tool:`dart_strings_extract`,method:`handleDartStringsExtract`},{tool:`dart_smi_scan`,method:`handleDartSmiScan`},{tool:`dart_symbolize`,method:`handleDartSymbolize`},{tool:`flutter_packages_detect`,method:`handleDartPackagesDetect`},{tool:`dart_snapshot_header_parse`,method:`handleDartSnapshotHeaderParse`},{tool:`dart_version_fingerprint`,method:`handleDartVersionFingerprint`},{tool:`dart_object_pool_dump`,method:`handleDartObjectPoolDump`}]});async function o(e){let{DartInspectorHandlers:t}=await import(`./dart-inspector-7AkPeZ_Q.mjs`);return e.dartInspectorHandlers||=new t,e.dartInspectorHandlers}const s={kind:`domain-manifest`,version:1,domain:r,depKey:i,profiles:[`full`],ensure:o,registrations:a};export{s as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./definitions-DxFNRQNK2.mjs";const r=`transform`,i=`transformHandlers`,a=t({domain:r,depKey:i,lookup:e(n),entries:[{tool:`ast_transform_preview`,method:`handleAstTransformPreview`},{tool:`ast_transform_chain`,method:`handleAstTransformChain`},{tool:`ast_transform_apply`,method:`handleAstTransformApply`},{tool:`crypto_extract_standalone`,method:`handleCryptoExtractStandalone`},{tool:`crypto_test_harness`,method:`handleCryptoTestHarness`},{tool:`crypto_compare`,method:`handleCryptoCompare`}]});async function o(e){let{CodeCollector:t}=await import(`./collector-Bpl6qy2L.mjs`),{TransformToolHandlers:n}=await import(`./transform-DOxzeWPB.mjs`);return e.collector||(e.collector=new t(e.config.puppeteer),e.registerCaches()),e.transformHandlers||=new n(e.collector),e.transformHandlers}const s={kind:`domain-manifest`,version:1,domain:r,depKey:i,profiles:[`full`],ensure:o,registrations:a};export{s as default};
@@ -0,0 +1 @@
1
+ import{i as e}from"./response-C7rKQst4.mjs";import{t}from"./registry-DH4sc1dt.mjs";import{n}from"./bind-helpers-m2U8glkF.mjs";const r=[{name:`skia_detect_renderer`,description:`Detect the active Skia renderer backend from the current page context.`,inputSchema:{type:`object`,properties:{},required:[]}},{name:`skia_extract_scene`,description:`Extract a lightweight Skia scene tree from the selected canvas.`,inputSchema:{type:`object`,properties:{canvasId:{type:`string`}},required:[]}},{name:`skia_correlate_objects`,description:`Correlate requested Skia node identifiers with the extracted scene tree.`,inputSchema:{type:`object`,properties:{canvasId:{type:`string`,description:`Optional canvas element ID to target for correlation.`},skiaNodeIds:{type:`array`,items:{type:`string`},description:`Optional list of Skia node identifiers to correlate.`}},required:[]}}],i=`skia-capture`,a=`skiaCaptureHandlers`,o=[`workflow`,`full`],s=n({domain:i,depKey:a,lookup:t(r),wrapResult:e,entries:[{tool:`skia_detect_renderer`,method:`handleSkiaDetectRenderer`},{tool:`skia_extract_scene`,method:`handleSkiaExtractScene`},{tool:`skia_correlate_objects`,method:`handleSkiaCorrelateObjects`}]});async function c(e){let{SkiaCaptureHandlers:t}=await import(`./handlers-8zN_vBIz.mjs`),n=e.getDomainInstance(a);if(n)return n;let r=new t({pageController:e.pageController??null,eventBus:e.eventBus});return e.setDomainInstance(a,r),r}const l={kind:`domain-manifest`,version:1,domain:i,depKey:a,profiles:o,registrations:s,ensure:c,workflowRule:{patterns:[/\b(skia|gpu|render(er)?|scene\s?(tree|graph)|draw\s?call|raster|paint|layer)\b/i,/skia.*(render|detect|scene)/i,/canvas.*skia/i,/gpu.*backend/i],priority:78,tools:[`skia_detect_renderer`,`skia_extract_scene`,`skia_correlate_objects`],hint:`Skia pipeline analysis: detect GPU backend → dump scene tree → correlate with JS objects.`},prerequisites:{skia_detect_renderer:[{condition:`Browser must be running with CDP attached`,fix:`Call browser_launch or browser_attach first`}],skia_extract_scene:[{condition:`Browser must be running with CDP attached`,fix:`Call browser_launch or browser_attach first`}],skia_correlate_objects:[{condition:`V8 heap snapshot should be available for robust matching`,fix:`Run v8_heap_snapshot_capture before correlation`}]},toolDependencies:[{from:`canvas`,to:`skia-capture`,relation:`uses`,weight:.9},{from:`skia_correlate_objects`,to:`v8_heap_snapshot_capture`,relation:`precedes`,weight:.6}]};export{l as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./ensure-browser-core-DxWC-NTp.mjs";import{t as r}from"./tool-builder-qif8M9-K.mjs";const i=[r(`canvas_engine_fingerprint`,e=>e.desc(`Detect Canvas/WebGL game engines in the page.`).query()),r(`canvas_scene_dump`,e=>e.desc(`Extract the full scene tree / display list from a detected canvas engine.`).string(`canvasId`,`Canvas element ID or index to target`).number(`maxDepth`,`Maximum tree traversal depth`,{default:20}).boolean(`onlyInteractive`,`Only include interactive (mouseEnabled) nodes`,{default:!1}).boolean(`onlyVisible`,`Only include visible nodes`,{default:!1}).query()),r(`canvas_pick_object_at_point`,e=>e.desc(`Pick / hit-test the topmost object at a given screen coordinate using the engine's hit-test system`).number(`x`,`Screen X coordinate`).number(`y`,`Screen Y coordinate`).string(`canvasId`,`Canvas element ID or index to target`).boolean(`highlight`,`Draw a highlight rectangle on the picked object`,{default:!1}).required(`x`,`y`).readOnly()),r(`canvas_trace_click_handler`,e=>e.desc(`Trace a click event from DOM to JS call stack.`).number(`x`,`Screen X coordinate to click`).number(`y`,`Screen Y coordinate to click`).string(`canvasId`,`Canvas element ID or index to target`).enum(`breakpointType`,[`click`,`mousedown`,`pointerdown`],`Event breakpoint type`,{default:`click`}).number(`maxFrames`,`Maximum call stack frames to capture`,{default:50}).requiredOpenWorld(`x`,`y`))],a=`canvas`,o=`canvasHandlers`,s=t({domain:a,depKey:o,lookup:e(i),entries:[{tool:`canvas_engine_fingerprint`,method:`handleFingerprint`},{tool:`canvas_scene_dump`,method:`handleSceneDump`},{tool:`canvas_pick_object_at_point`,method:`handlePick`},{tool:`canvas_trace_click_handler`,method:`handleTraceClick`}]});async function c(e){let{DebuggerManager:t}=await import(`./modules-BPBcSaM-.mjs`).then(e=>e.t),{TraceRecorder:r}=await import(`./TraceRecorder-BiJWBXHX.mjs`),{ReverseEvidenceGraph:i}=await import(`./ReverseEvidenceGraph-BhSYYdiI.mjs`).then(e=>e.t),{CanvasToolHandlers:a}=await import(`./handlers-yo_xYzT8.mjs`);await n(e),e.debuggerManager||=new t(e.collector),e.traceRecorder||=new r;let o=e.getDomainInstance(`evidenceGraph`);return o||(o=new i,e.setDomainInstance(`evidenceGraph`,o)),e.canvasHandlers||=new a({pageController:e.pageController,debuggerManager:e.debuggerManager,traceRecorder:e.traceRecorder,evidenceStore:o}),e.canvasHandlers}const l={kind:`domain-manifest`,version:1,domain:a,depKey:o,profiles:[`full`],ensure:c,workflowRule:{patterns:[/(canvas|scene|engine|game).*(pick|dump|trace|reverse)/i,/(canvas|webgl|webgpu|scene).*(graph|tree|node)/i,/(laya|pixi|phaser|cocos|unity).*(reverse|scene|dump|hook)/i],priority:80,tools:[`canvas_engine_fingerprint`,`canvas_scene_dump`,`canvas_pick_object_at_point`,`canvas_trace_click_handler`],hint:`Canvas reverse: fingerprint engine → dump scene tree → pick object at point → trace click to handler`},prerequisites:{canvas_engine_fingerprint:[{condition:`Browser must be running`,fix:`Call browser_launch or browser_attach first`}],canvas_scene_dump:[{condition:`Browser must be running`,fix:`Call browser_launch or browser_attach first`}],canvas_pick_object_at_point:[{condition:`Browser must be running`,fix:`Call browser_launch or browser_attach first`}],canvas_trace_click_handler:[{condition:`Debugger must be enabled`,fix:`Call debugger_lifecycle({ action: 'enable' }) first`}]},registrations:s};export{l as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./ensure-browser-core-DxWC-NTp.mjs";import{n as r,t as i}from"./definitions-OeLvmlQy.mjs";const a=`hooks`,o=`aiHookHandlers`,s=e([...i,...r]),c=t({domain:a,depKey:o,lookup:s,entries:[{tool:`ai_hook`,method:`handleAIHook`}]}),l=t({domain:a,depKey:`hookPresetHandlers`,lookup:s,entries:[{tool:`hook_preset`,method:`handleHookPreset`}]});async function u(e){let{AIHookToolHandlers:t,HookPresetToolHandlers:r}=await import(`./hooks-D4XLfgtV.mjs`);return await n(e),(!e.aiHookHandlers||!e.hookPresetHandlers)&&(e.aiHookHandlers||=new t(e.pageController),e.hookPresetHandlers||=new r(e.pageController)),e.aiHookHandlers}const d={kind:`domain-manifest`,version:1,domain:a,depKey:o,secondaryDepKeys:[`hookPresetHandlers`],profiles:[`full`],ensure:u,registrations:[...c,...l]};export{d as default};
@@ -0,0 +1 @@
1
+ import{i as e}from"./response-C7rKQst4.mjs";import{t}from"./registry-DH4sc1dt.mjs";import{n}from"./bind-helpers-m2U8glkF.mjs";import{t as r}from"./tool-builder-qif8M9-K.mjs";const i=[r(`payload_template_build`,e=>e.desc(`Build a deterministic payload from field definitions.`).array(`fields`,{type:`object`,properties:{name:{type:`string`,description:`Field name`},type:{type:`string`,enum:[`u8`,`u16`,`u32`,`i8`,`i16`,`i32`,`string`,`bytes`],description:`Field type`},value:{description:`Numeric or string field value`},encoding:{type:`string`,enum:[`utf8`,`ascii`,`hex`,`base64`],description:`String/bytes encoding override`},length:{type:`number`,description:`Optional fixed length`},padByte:{type:`number`,description:`Optional pad byte`}},required:[`name`,`type`,`value`]},`Field definitions in output order`).enum(`endian`,[`big`,`little`],`Integer byte order`,{default:`big`}).required(`fields`).idempotent()),r(`payload_mutate`,e=>e.desc(`Apply deterministic byte-level mutations to a hex payload.`).string(`hexPayload`,`Source payload as a hex string`).array(`mutations`,{type:`object`,properties:{strategy:{type:`string`,enum:[`set_byte`,`flip_bit`,`overwrite_bytes`,`append_bytes`,`truncate`,`increment_integer`],description:`Mutation strategy`},offset:{type:`number`,description:`Zero-based byte offset`},value:{type:`number`,description:`Byte value for set_byte`},bit:{type:`number`,description:`Bit index for flip_bit`},data:{type:`string`,description:`Mutation data for overwrite/append`},encoding:{type:`string`,enum:[`utf8`,`ascii`,`hex`,`base64`],description:`Data encoding for overwrite/append`},length:{type:`number`,description:`Target length for truncate`},width:{type:`number`,enum:[1,2,4],description:`Integer width in bytes`},delta:{type:`number`,description:`Increment/decrement delta`},endian:{type:`string`,enum:[`big`,`little`],description:`Integer byte order`},signed:{type:`boolean`,description:`Treat increment target as signed`}},required:[`strategy`]},`Byte-level mutations to apply in order`).required(`hexPayload`,`mutations`)),r(`ethernet_frame_build`,e=>e.desc(`Build a deterministic Ethernet II frame from source/destination MAC addresses, EtherType, and payload bytes.`).string(`destinationMac`,`Destination MAC address in colon, dash, dotted, or plain hex form`).string(`sourceMac`,`Source MAC address in colon, dash, dotted, or plain hex form`).string(`etherType`,`EtherType name (arp, ipv4, ipv6, vlan) or a 16-bit hex value such as 0800`).string(`payloadHex`,`Frame payload as a hex string`).required(`destinationMac`,`sourceMac`,`etherType`,`payloadHex`).idempotent()),r(`arp_build`,e=>e.desc(`Build a deterministic ARP payload for Ethernet/IPv4.`).enum(`operation`,[`request`,`reply`],`ARP operation code`,{default:`request`}).string(`senderMac`,`Sender hardware address`).string(`senderIp`,`Sender IPv4 address`).string(`targetMac`,`Target hardware address (use zeros for requests)`,{default:`00:00:00:00:00:00`}).string(`targetIp`,`Target IPv4 address`).number(`hardwareType`,`Hardware type number. Default: 1 (Ethernet)`,{default:1}).string(`protocolType`,`Protocol type name (ipv4) or 16-bit hex value. Default: ipv4`,{default:`ipv4`}).number(`hardwareSize`,`Hardware address size in bytes. Default: 6`,{default:6}).number(`protocolSize`,`Protocol address size in bytes. Default: 4`,{default:4}).required(`senderMac`,`senderIp`,`targetIp`).idempotent()),r(`raw_ip_packet_build`,e=>e.desc(`Build a deterministic IPv4 or IPv6 packet.`).enum(`version`,[`ipv4`,`ipv6`],`IP version`,{default:`ipv4`}).string(`sourceIp`,`Source IPv4/IPv6 address`).string(`destinationIp`,`Destination IPv4/IPv6 address`).string(`protocol`,`Protocol/next-header name (icmp, tcp, udp, icmpv6) or an 8-bit integer string/hex value`).string(`payloadHex`,`Inner payload as a hex string`,{default:``}).number(`ttl`,`IPv4 TTL or IPv6 hop limit fallback. Default: 64`,{default:64}).number(`hopLimit`,`Explicit IPv6 hop limit override`).number(`identification`,`IPv4 identification field. Default: 0`,{default:0}).boolean(`dontFragment`,`Set the IPv4 DF flag`,{default:!1}).boolean(`moreFragments`,`Set the IPv4 MF flag`,{default:!1}).number(`fragmentOffset`,`IPv4 fragment offset in 8-byte units. Default: 0`,{default:0}).number(`dscp`,`IPv4 DSCP or IPv6 traffic-class DSCP value (0-63). Default: 0`,{default:0}).number(`ecn`,`IPv4/IPv6 ECN bits (0-3). Default: 0`,{default:0}).number(`flowLabel`,`IPv6 flow label (0-1048575). Default: 0`,{default:0}).required(`version`,`sourceIp`,`destinationIp`,`protocol`).idempotent()),r(`icmp_echo_build`,e=>e.desc(`Build a deterministic ICMPv4 echo request or reply payload with an automatically computed checksum.`).enum(`operation`,[`request`,`reply`],`ICMP echo operation`,{default:`request`}).number(`identifier`,`ICMP echo identifier field. Default: 0`,{default:0}).number(`sequenceNumber`,`ICMP echo sequence number field. Default: 0`,{default:0}).string(`payloadHex`,`Optional ICMP payload as a hex string`,{default:``}).idempotent()),r(`checksum_apply`,e=>e.desc(`Apply a deterministic 16-bit Internet checksum across a payload slice, optionally zeroing and writing the checksum field back into the packet.`).string(`hexPayload`,`Source payload as a hex string`).number(`startOffset`,`Inclusive start offset for checksum range. Default: 0`,{default:0}).number(`endOffset`,`Exclusive end offset for checksum range. Default: payload length`).number(`zeroOffset`,`Optional checksum field offset to zero before calculation`).number(`zeroLength`,`Checksum field width in bytes when zeroOffset is set. Default: 2`,{default:2}).number(`writeOffset`,`Optional destination offset for writing the computed checksum. Defaults to zeroOffset when provided`).enum(`endian`,[`big`,`little`],`Byte order used when writing the checksum back`,{default:`big`}).required(`hexPayload`).idempotent()),r(`pcap_write`,e=>e.desc(`Write a compact classic PCAP file from deterministic packet byte records.`).string(`path`,`Destination path for the PCAP file`).array(`packets`,{type:`object`,properties:{dataHex:{type:`string`,description:`Packet bytes as a hex string`},timestampSeconds:{type:`number`,description:`Unix timestamp seconds. Defaults to 0 when omitted`},timestampFraction:{type:`number`,description:`Microsecond or nanosecond fraction depending on timestampPrecision`},originalLength:{type:`number`,description:`Original on-wire packet length. Defaults to included length`}},required:[`dataHex`]},`Packet records to serialize in order`).enum(`endianness`,[`little`,`big`],`PCAP byte order for numeric fields`,{default:`little`}).enum(`timestampPrecision`,[`micro`,`nano`],`Timestamp precision marker in the PCAP magic`,{default:`micro`}).number(`snapLength`,`Global snapshot length. Default: 65535`,{default:65535}).string(`linkType`,`Link-layer type name (ethernet, raw, loopback) or integer string`,{default:`ethernet`}).required(`path`,`packets`).idempotent()),r(`pcap_read`,e=>e.desc(`Read a classic PCAP file and return compact deterministic packet summaries. PCAPNG is intentionally not supported.`).string(`path`,`Path to the PCAP file to parse`).number(`maxPackets`,`Maximum number of packet records to decode`).number(`maxBytesPerPacket`,`Maximum payload bytes to return per packet before truncating the reported hex payload`).required(`path`).query()),r(`proto_define_pattern`,e=>e.desc(`Define a protocol pattern with delimiter, byte order, and field layout.`).string(`name`,`Pattern name`).prop(`spec`,{type:`object`,description:`Pattern specification object`,additionalProperties:!0}).required(`spec`).idempotent()),r(`proto_auto_detect`,e=>e.desc(`Auto-detect a protocol pattern from one or more hex payload samples.`).array(`hexPayloads`,{type:`string`},`Hex payload samples`).required(`hexPayloads`).query()),r(`proto_export_schema`,e=>e.desc(`Export a protocol pattern to a .proto-like schema definition.`).string(`patternId`,`Pattern ID to export`).required(`patternId`).query()),r(`proto_infer_fields`,e=>e.desc(`Infer likely protocol fields from repeated hex payload samples.`).array(`hexPayloads`,{type:`string`},`Hex payload samples`).required(`hexPayloads`).query()),r(`proto_infer_state_machine`,e=>e.desc(`Infer a protocol state machine from captured message sequences.`).array(`messages`,{type:`object`,properties:{direction:{type:`string`,enum:[`req`,`res`],description:`Message direction`},timestamp:{type:`number`,description:`Message timestamp`},fields:{type:`object`,description:`Decoded message fields`,additionalProperties:!0},raw:{type:`string`,description:`Raw message or payload summary`}},required:[`direction`,`timestamp`,`fields`,`raw`]},`Captured protocol messages`).required(`messages`).query()),r(`proto_visualize_state`,e=>e.desc(`Generate a Mermaid state diagram from a protocol state machine definition.`).prop(`stateMachine`,{type:`object`,description:`State machine definition with states and transitions`,additionalProperties:!0}).query()),r(`proto_fingerprint`,e=>e.desc(`Identify protocol type from hex payload samples.`).array(`hexPayloads`,{type:`string`},`Hex payload samples to fingerprint`).boolean(`includeKnownProtocols`,`Match against known protocol signatures`,{default:!0}).boolean(`includeFieldHints`,`Suggest likely field boundaries`,{default:!0}).required(`hexPayloads`).query())],a=`protocol-analysis`,o=`protocolAnalysisHandlers`,s=n({domain:a,depKey:o,lookup:t(i),wrapResult:e,entries:[{tool:`proto_define_pattern`,method:`handleDefinePattern`},{tool:`proto_auto_detect`,method:`handleAutoDetect`},{tool:`proto_infer_fields`,method:`handleInferFields`},{tool:`proto_infer_state_machine`,method:`handleInferStateMachine`},{tool:`proto_export_schema`,method:`handleExportSchema`},{tool:`proto_visualize_state`,method:`handleVisualizeState`},{tool:`payload_template_build`,method:`handlePayloadTemplateBuild`},{tool:`payload_mutate`,method:`handlePayloadMutate`},{tool:`ethernet_frame_build`,method:`handleEthernetFrameBuild`},{tool:`arp_build`,method:`handleArpBuild`},{tool:`raw_ip_packet_build`,method:`handleRawIpPacketBuild`},{tool:`icmp_echo_build`,method:`handleIcmpEchoBuild`},{tool:`checksum_apply`,method:`handleChecksumApply`},{tool:`pcap_write`,method:`handlePcapWrite`},{tool:`pcap_read`,method:`handlePcapRead`},{tool:`proto_fingerprint`,method:`handleProtoFingerprint`}]});async function c(e){let{ProtocolAnalysisHandlers:t}=await import(`./handlers-DGbdQAgD.mjs`),n=e.getDomainInstance(o);if(n)return n;let r=new t(void 0,void 0,e.eventBus);return e.setDomainInstance(o,r),r}const l={kind:`domain-manifest`,version:1,domain:a,depKey:o,profiles:[`full`],ensure:c,registrations:s,prerequisites:{proto_auto_detect:[{condition:`At least one hex payload sample is required`,fix:`Capture traffic using network monitoring tools first`}],proto_infer_state_machine:[{condition:`Multiple message samples are required for state machine inference`,fix:`Capture message sequences with mojo-ipc or network tools`}]},workflowRule:{patterns:[/protocol\s+(reverse|analysis|pattern|state\s*machine|schema)/i,/custom\s+protocol|binary\s+protocol|wire\s+format/i,/infer\s+(protocol|fields|state\s*machine)/i,/proto.*export|proto.*schema|proto.*diagram/i,/payload\s+(template|build|mutate)|packet\s+(template|mutate)/i,/ethernet|arp|ipv4|ipv6|pcap|internet\s+checksum|raw\s+packet/i,/(decode|payload|bytes?|hex|protobuf|msgpack).*(protocol|field|state\s*machine)/i,/(base64|hex|protobuf|msgpack).*(payload|protocol|field|decode)/i,/(crypto\s*harness|checksum|payload\s+rebuild|payload\s+template).*(protocol|payload|decode)/i,/(无状态|纯算|确定性|解码|载荷|字节|报文).*(协议|字段|状态机)/i],priority:.6,tools:[`binary_detect_format`,`binary_decode`,`proto_auto_detect`,`proto_infer_fields`,`proto_define_pattern`,`proto_infer_state_machine`,`proto_export_schema`,`proto_visualize_state`,`payload_template_build`,`payload_mutate`,`checksum_apply`,`crypto_test_harness`,`ethernet_frame_build`,`arp_build`,`raw_ip_packet_build`,`icmp_echo_build`,`pcap_write`,`pcap_read`],hint:`Capture or craft packet bytes -> build Ethernet/ARP/IP/ICMP headers -> apply deterministic checksums and payload mutations -> read/write compact PCAP files -> infer fields or state machines from resulting payloads`},toolDependencies:[{from:`network_get_requests`,to:`binary_decode`,relation:`suggests`,weight:.9},{from:`binary_decode`,to:`proto_auto_detect`,relation:`precedes`,weight:.95},{from:`proto_auto_detect`,to:`proto_infer_fields`,relation:`precedes`,weight:.95},{from:`proto_infer_fields`,to:`proto_infer_state_machine`,relation:`precedes`,weight:.9},{from:`detect_crypto`,to:`crypto_test_harness`,relation:`suggests`,weight:.8},{from:`network`,to:`protocol-analysis`,relation:`uses`,weight:.7}]};export{l as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./definitions-l7TjdE6V.mjs";const r=`network`,i=`advancedHandlers`,a=t({domain:r,depKey:i,lookup:e(n),entries:[{tool:`network_enable`,method:`handleNetworkEnable`},{tool:`network_disable`,method:`handleNetworkDisable`},{tool:`network_get_status`,method:`handleNetworkGetStatus`},{tool:`network_monitor`,method:`handleNetworkMonitor`},{tool:`network_get_requests`,method:`handleNetworkGetRequests`},{tool:`network_get_response_body`,method:`handleNetworkGetResponseBody`},{tool:`network_get_stats`,method:`handleNetworkGetStats`},{tool:`performance_get_metrics`,method:`handlePerformanceGetMetrics`},{tool:`performance_coverage`,method:`handlePerformanceCoverage`},{tool:`performance_take_heap_snapshot`,method:`handlePerformanceTakeHeapSnapshot`},{tool:`performance_trace`,method:`handlePerformanceTraceDispatch`},{tool:`profiler_cpu`,method:`handleProfilerCpuDispatch`},{tool:`profiler_heap_sampling`,method:`handleProfilerHeapSamplingDispatch`},{tool:`console_get_exceptions`,method:`handleConsoleGetExceptions`},{tool:`console_inject`,method:`handleConsoleInjectDispatch`},{tool:`console_inject_fetch_interceptor`,method:`handleConsoleInjectFetchInterceptor`},{tool:`console_inject_xhr_interceptor`,method:`handleConsoleInjectXhrInterceptor`},{tool:`console_buffers`,method:`handleConsoleBuffersDispatch`},{tool:`http_request_build`,method:`handleHttpRequestBuild`},{tool:`http_plain_request`,method:`handleHttpPlainRequest`},{tool:`http2_probe`,method:`handleHttp2Probe`},{tool:`http2_frame_build`,method:`handleHttp2FrameBuild`},{tool:`network_rtt_measure`,method:`handleNetworkRttMeasure`},{tool:`network_latency_stats`,method:`handleNetworkLatencyStats`},{tool:`network_traceroute`,method:`handleNetworkTraceroute`},{tool:`network_icmp_probe`,method:`handleNetworkIcmpProbe`},{tool:`dns_resolve`,method:`handleDnsResolve`},{tool:`dns_reverse`,method:`handleDnsReverse`},{tool:`dns_probe`,method:`handleDnsProbe`},{tool:`dns_cname_chain`,method:`handleDnsCnameChain`},{tool:`dns_bulk_resolve`,method:`handleDnsBulkResolve`},{tool:`network_extract_auth`,method:`handleNetworkExtractAuth`},{tool:`network_export_har`,method:`handleNetworkExportHar`},{tool:`network_replay_request`,method:`handleNetworkReplayRequest`},{tool:`network_intercept`,method:`handleNetworkInterceptDispatch`},{tool:`network_tls_fingerprint`,method:`handleNetworkTlsFingerprint`},{tool:`network_bot_detect_analyze`,method:`handleNetworkBotDetectAnalyze`}]}),o=new Set([`http_request_build`,`http_plain_request`,`http2_probe`,`http2_frame_build`,`network_rtt_measure`,`network_latency_stats`,`network_traceroute`,`network_icmp_probe`,`dns_resolve`,`dns_reverse`,`dns_probe`,`dns_cname_chain`,`dns_bulk_resolve`]);async function s(e){let{AdvancedToolHandlers:t}=await import(`./network-T0VRwNPd.mjs`);if(!(e.activatedToolNames instanceof Set)||[...e.activatedToolNames].some(e=>!o.has(e))){let{ensureBrowserCore:t}=await import(`./ensure-browser-core-DxWC-NTp.mjs`).then(e=>e.n);await t(e)}return e.advancedHandlers||=new t(e.collector,e.consoleMonitor,e.eventBus,()=>e.traceRecorder??null),e.advancedHandlers}const c={kind:`domain-manifest`,version:1,domain:r,depKey:i,profiles:[`workflow`,`full`],ensure:s,workflowRule:{patterns:[/(capture|intercept|monitor|hook).*(network|request|response|api|traffic)/i,/(抓包|拦截|监控|hook).*(网络|请求|响应|api|流量)/i],priority:100,tools:[`network_monitor`,`page_navigate`,`network_get_requests`],hint:`Network capture workflow: bootstrap browser/page state -> enable capture -> navigate or act -> inspect captured requests. (Tip: list_extension_workflows can suggest higher-level recipes.)`},prerequisites:{network_get_requests:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`},{condition:`Network monitoring must be enabled`,fix:`Call network_monitor(enable) first`}],network_get_response_body:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`},{condition:`Network monitoring must be enabled`,fix:`Call network_monitor(enable) first`}],network_extract_auth:[{condition:`Network monitoring must be enabled`,fix:`Call network_monitor(enable) first`}]},registrations:a};export{c as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{i as n,n as r,r as i,t as a}from"./definitions-Bf3H1EwV.mjs";const o=`maintenance`,s=`coreMaintenanceHandlers`,c=[...n,...r,...a],l=[...i],u=e([...c,...l]),d=t({domain:o,depKey:s,lookup:u,entries:[{tool:`get_token_budget_stats`,method:`handleGetTokenBudgetStats`,profiles:[`workflow`,`full`]},{tool:`manual_token_cleanup`,method:`handleManualTokenCleanup`},{tool:`reset_token_budget`,method:`handleResetTokenBudget`},{tool:`get_cache_stats`,method:`handleGetCacheStats`,profiles:[`workflow`,`full`]},{tool:`smart_cache_cleanup`,method:`handleSmartCacheCleanup`,mapArgs:e=>[e.targetSize]},{tool:`clear_all_caches`,method:`handleClearAllCaches`},{tool:`cleanup_artifacts`,method:`handleCleanupArtifacts`,mapArgs:e=>[{retentionDays:e.retentionDays,maxTotalBytes:e.maxTotalBytes,dryRun:e.dryRun}]},{tool:`doctor_environment`,method:`handleEnvironmentDoctor`,mapArgs:e=>[{includeBridgeHealth:e.includeBridgeHealth}]}]}),f=t({domain:o,depKey:`extensionManagementHandlers`,lookup:u,entries:[{tool:`list_extensions`,method:`handleListExtensions`,profiles:[`workflow`,`full`]},{tool:`reload_extensions`,method:`handleReloadExtensions`},{tool:`browse_extension_registry`,method:`handleBrowseExtensionRegistry`,profiles:[`workflow`,`full`],mapArgs:e=>[e.kind??`all`]},{tool:`install_extension`,method:`handleInstallExtension`,mapArgs:e=>[e.slug,e.targetDir]}]});async function p(e){let{CoreMaintenanceHandlers:t,ExtensionManagementHandlers:n}=await import(`./maintenance-BUpIukhg.mjs`);return(!e.coreMaintenanceHandlers||!e.extensionManagementHandlers)&&(e.coreMaintenanceHandlers||=new t({tokenBudget:e.tokenBudget,unifiedCache:e.unifiedCache}),e.extensionManagementHandlers||=new n(e)),e.coreMaintenanceHandlers}const m={kind:`domain-manifest`,version:1,domain:o,depKey:s,secondaryDepKeys:[`extensionManagementHandlers`],profiles:[`workflow`,`full`],ensure:p,registrations:[...d,...f]};export{m as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./tool-builder-qif8M9-K.mjs";const r=[n(`run_macro`,e=>e.desc(`Execute a registered macro by ID with inline progress and atomic bailout.`).string(`macroId`,`Macro ID to execute`).prop(`inputOverrides`,{type:`object`,description:`Per-step input overrides keyed by step ID`,additionalProperties:{type:`object`,additionalProperties:!0}}).required(`macroId`)),n(`list_macros`,e=>e.desc(`List all available macros.`).query())],i=`macro`,a=`macroHandlers`,o=t({domain:i,depKey:a,lookup:e(r),entries:[{tool:`run_macro`,method:`handleRunMacro`},{tool:`list_macros`,method:`handleListMacros`}]});async function s(e){let{MacroToolHandlers:t}=await import(`./handlers-FJ80VzUI.mjs`),n=e.getDomainInstance(a);if(n)return n;let r=new t(e);return e.setDomainInstance(a,r),r}const c={kind:`domain-manifest`,version:1,domain:i,depKey:a,profiles:[`full`],ensure:s,registrations:o};export{c as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./definitions-BWxBke3r.mjs";const r=`proxy`,i=`proxyHandlers`,a=t({domain:r,depKey:i,lookup:e(n),entries:[{tool:`proxy_start`,method:`handleProxyStart`},{tool:`proxy_stop`,method:`handleProxyStop`},{tool:`proxy_status`,method:`handleProxyStatus`},{tool:`proxy_export_ca`,method:`handleProxyExportCa`},{tool:`proxy_add_rule`,method:`handleProxyAddRule`},{tool:`proxy_get_requests`,method:`handleProxyGetRequests`},{tool:`proxy_clear_logs`,method:`handleProxyClearLogs`},{tool:`proxy_setup_adb_device`,method:`handleProxySetupAdbDevice`}]});async function o(e){let{ProxyHandlers:t}=await import(`./proxy-DZFlDsG3.mjs`);return e.proxyHandlers||=new t,e.proxyHandlers}const s={kind:`domain-manifest`,version:1,domain:r,depKey:i,profiles:[`full`],ensure:o,registrations:a};export{s as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./definitions-D4g-MS10.mjs";const r=`process`,i=`processHandlers`,a=e(n),o=process.env.JSHOOK_REGISTRY_PLATFORM===`win32`||process.env.JSHOOK_REGISTRY_PLATFORM===`linux`||process.env.JSHOOK_REGISTRY_PLATFORM===`darwin`?process.env.JSHOOK_REGISTRY_PLATFORM:process.platform;async function s(e){let{ProcessToolHandlers:t}=await import(`./process-CWhsCWrf.mjs`);return e.processHandlers||=new t(e),e.processHandlers}const c=o===`win32`,l=new Set([`check_debug_port`]),u=t({domain:r,depKey:i,lookup:a,entries:[{tool:`electron_attach`,method:`handleElectronAttach`},{tool:`process_windows`,method:`handleProcessWindows`},{tool:`process_check_debug_port`,method:`handleProcessCheckDebugPort`},{tool:`process_launch_debug`,method:`handleProcessLaunchDebug`},{tool:`memory_read`,method:`handleMemoryRead`},{tool:`memory_write`,method:`handleMemoryWrite`},{tool:`memory_scan`,method:`handleMemoryScan`},{tool:`memory_check_protection`,method:`handleMemoryCheckProtection`},{tool:`memory_scan_filtered`,method:`handleMemoryScanFiltered`},{tool:`memory_batch_write`,method:`handleMemoryBatchWrite`},{tool:`memory_dump_region`,method:`handleMemoryDumpRegion`},{tool:`memory_list_regions`,method:`handleMemoryListRegions`},{tool:`memory_audit_export`,method:`handleMemoryAuditExport`},{tool:`inject_dll`,method:`handleInjectDll`},{tool:`inject_shellcode`,method:`handleInjectShellcode`},{tool:`check_debug_port`,method:`handleCheckDebugPort`},{tool:`enumerate_modules`,method:`handleEnumerateModules`}]}),d={kind:`domain-manifest`,version:1,domain:r,depKey:i,profiles:[`full`],ensure:s,registrations:c?u:u.filter(e=>!l.has(e.tool.name))};export{d as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./definitions-BYwATKc-.mjs";const r=`sourcemap`,i=`sourcemapHandlers`,a=t({domain:r,depKey:i,lookup:e(n),entries:[{tool:`sourcemap_discover`,method:`handleSourcemapDiscover`},{tool:`sourcemap_fetch_and_parse`,method:`handleSourcemapFetchAndParse`},{tool:`sourcemap_coverage`,method:`handleSourcemapCoverage`},{tool:`sourcemap_lookup`,method:`handleSourcemapLookup`},{tool:`sourcemap_reconstruct_tree`,method:`handleSourcemapReconstructTree`},{tool:`sourcemap_parse_v4`,method:`handleSourcemapParseV4`}]});async function o(e){let{CodeCollector:t}=await import(`./collector-Bpl6qy2L.mjs`),{SourcemapToolHandlers:n}=await import(`./sourcemap-Dh3Ai_ur.mjs`);return e.collector||(e.collector=new t(e.config.puppeteer),e.registerCaches()),e.sourcemapHandlers||=new n(e.collector),e.sourcemapHandlers}const s={kind:`domain-manifest`,version:1,domain:r,depKey:i,profiles:[`full`],ensure:o,registrations:a};export{s as default};
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./logger-sBC6IdRT.mjs";import{t}from"./EventBus-DL8iLA09.mjs";import{t as n}from"./registry-DH4sc1dt.mjs";import{t as r}from"./ensure-browser-core-DxWC-NTp.mjs";import{t as i}from"./definitions-D5wl_8HN.mjs";const a=2e3;var o=class{bridge;constructor(e){this.bridge=e}isAvailable(){return this.bridge.isSamplingSupported()}async suggestVariableNames(t,n){if(!this.bridge.isSamplingSupported())return e.debug(`LLMDeobfuscator: sampling not available, skipping name suggestion`),null;let r=n.slice(0,20),i=t.slice(0,a),o=[`Given this obfuscated JavaScript code, suggest meaningful variable/function names`,`for these identifiers: ${r.join(`, `)}`,``,"```javascript",i,"```",``,`Respond ONLY with a valid JSON array of objects with fields:`,` { "original": "<old_name>", "suggested": "<new_name>", "confidence": "high"|"medium"|"low" }`,``,`Rules:`,`- Use camelCase for variables/functions, PascalCase for classes`,`- If uncertain, use confidence "low"`,`- If the name is already meaningful, keep it and mark confidence "high"`].join(`
2
+ `),s=await this.bridge.sampleText({systemPrompt:`You are an expert JavaScript reverse engineer. You specialize in deobfuscation and renaming obfuscated identifiers to semantically meaningful names. Output only valid JSON.`,userMessage:o,maxTokens:256,temperature:.3,modelHint:`haiku`});return s?this.parseNameSuggestions(s,r):null}async inferFunctionPurpose(e){if(!this.bridge.isSamplingSupported())return null;let t=e.slice(0,a);return(await this.bridge.sampleText({systemPrompt:`You are a JavaScript reverse engineer. Analyze code and describe its purpose in one concise sentence.`,userMessage:`What does this function do?\n\n\`\`\`javascript\n${t}\n\`\`\`\n\nRespond with a single sentence.`,maxTokens:100,temperature:.2,modelHint:`haiku`}))?.trim()??null}parseNameSuggestions(t,n){try{let r=t.match(/\[[\s\S]*\]/);if(!r)return e.warn(`LLMDeobfuscator: no JSON array found in LLM response`),[];let i=JSON.parse(r[0]);if(!Array.isArray(i))return[];let a=new Set(n);return i.filter(e=>typeof e==`object`&&!!e&&typeof e.original==`string`&&typeof e.suggested==`string`).filter(e=>a.has(e.original)).map(e=>({original:e.original,suggested:e.suggested,confidence:[`high`,`medium`,`low`].includes(e.confidence)?e.confidence:`low`}))}catch(t){return e.warn(`LLMDeobfuscator: failed to parse LLM response:`,t),[]}}};const s=`core`,c=`coreAnalysisHandlers`,l=n(i);let u=null;function d(e){return n=>{let r=n[c];return n=>{let i=n._meta,a;return i?.progressToken!==void 0&&u&&(a=t(u.eventBus,i.progressToken)),e(r,{...n,onProgress:a})}}}const f=d;async function p(e){let{Deobfuscator:t,AdvancedDeobfuscator:n,ObfuscationDetector:i,CodeAnalyzer:a,CryptoDetector:o,HookManager:s}=await import(`./modules-BPBcSaM-.mjs`).then(e=>e.t),{CoreAnalysisHandlers:c}=await import(`./analysis-D4swdMvq.mjs`);return u=e,await r(e),(!e.deobfuscator||!e.advancedDeobfuscator||!e.obfuscationDetector||!e.analyzer||!e.cryptoDetector||!e.hookManager||!e.coreAnalysisHandlers)&&(e.deobfuscator||=new t,e.advancedDeobfuscator||=new n,e.obfuscationDetector||=new i,e.analyzer||=new a,e.cryptoDetector||=new o,e.hookManager||=new s,e.coreAnalysisHandlers||=new c({collector:e.collector,scriptManager:e.scriptManager,deobfuscator:e.deobfuscator,advancedDeobfuscator:e.advancedDeobfuscator,obfuscationDetector:e.obfuscationDetector,analyzer:e.analyzer,cryptoDetector:e.cryptoDetector,hookManager:e.hookManager})),e.coreAnalysisHandlers}const m={kind:`domain-manifest`,version:1,domain:s,depKey:c,profiles:[`workflow`,`full`],ensure:p,workflowRule:{patterns:[/(deobfuscate|deobfusc|beautify|analyze).*(javascript|js|script|code)/i,/(反混淆|美化|分析).*(javascript|js|脚本|代码)/i],priority:85,tools:[`deobfuscate`,`extract_function_tree`,`llm_suggest_names`],hint:`JavaScript analysis workflow: collect -> deobfuscate -> inspect function tree | LLM-powered naming`},prerequisites:{collect_code:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}]},registrations:[{tool:l(`collect_code`),domain:s,bind:f((e,t)=>e.handleCollectCode(t))},{tool:l(`search_in_scripts`),domain:s,profiles:[`search`,`workflow`,`full`],bind:f((e,t)=>e.handleSearchInScripts(t))},{tool:l(`extract_function_tree`),domain:s,bind:f((e,t)=>e.handleExtractFunctionTree(t))},{tool:l(`deobfuscate`),domain:s,bind:f((e,t)=>e.handleDeobfuscate(t))},{tool:l(`understand_code`),domain:s,profiles:[`search`,`workflow`,`full`],bind:f((e,t)=>e.handleUnderstandCode(t))},{tool:l(`detect_crypto`),domain:s,profiles:[`search`,`workflow`,`full`],bind:f((e,t)=>e.handleDetectCrypto(t))},{tool:l(`manage_hooks`),domain:s,bind:f((e,t)=>e.handleManageHooks(t))},{tool:l(`detect_obfuscation`),domain:s,profiles:[`search`,`workflow`,`full`],bind:f((e,t)=>e.handleDetectObfuscation(t))},{tool:l(`webcrack_unpack`),domain:s,bind:f((e,t)=>e.handleWebcrackUnpack(t))},{tool:l(`clear_collected_data`),domain:s,bind:f(e=>e.handleClearCollectedData())},{tool:l(`get_collection_stats`),domain:s,bind:f(e=>e.handleGetCollectionStats())},{tool:l(`webpack_enumerate`),domain:s,bind:f((e,t)=>e.handleWebpackEnumerate(t))},{tool:l(`llm_suggest_names`),domain:s,bind:d(async(e,t)=>{if(!u)return{content:[{type:`text`,text:JSON.stringify({success:!1,error:`Server context not initialized`})}]};let n=new o(u.samplingBridge);if(!n.isAvailable())return{content:[{type:`text`,text:JSON.stringify({success:!1,error:`Sampling not supported by this client`,hint:`The connected MCP client does not declare sampling capabilities. Try using Claude Desktop or another sampling-capable client.`})}]};let r=typeof t.code==`string`?t.code:``,i=Array.isArray(t.identifiers)?t.identifiers.filter(e=>typeof e==`string`):[],a=await n.suggestVariableNames(r,i);return{content:[{type:`text`,text:JSON.stringify({success:!0,suggestions:a??[],samplingUsed:!0})}]}})},{tool:l(`js_deobfuscate_jsvmp`),domain:s,bind:f((e,t)=>e.handleJsDeobfuscateJsvmp(t))},{tool:l(`js_deobfuscate_pipeline`),domain:s,bind:f((e,t)=>e.handleJsDeobfuscatePipeline(t))},{tool:l(`js_analyze_vm`),domain:s,bind:f((e,t)=>e.handleJsAnalyzeVm(t))},{tool:l(`js_solve_constraints`),domain:s,bind:f((e,t)=>e.handleJsSolveConstraints(t))},{tool:l(`analysis_ast_match`),domain:s,bind:f((e,t)=>e.handleAnalysisAstMatch(t))},{tool:l(`analysis_deflat_control_flow`),domain:s,bind:f((e,t)=>e.handleAnalysisDeflatControlFlow(t))},{tool:l(`analysis_decode_string_array`),domain:s,bind:f((e,t)=>e.handleAnalysisDecodeStringArray(t))},{tool:l(`js_symbolic_execute`),domain:s,bind:f((e,t)=>e.handleJsSymbolicExecute(t))},{tool:l(`js_symbolic_execute_jsvmp`),domain:s,bind:f((e,t)=>e.handleJsSymbolicExecuteJsvmp(t))}]};export{m as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./tool-builder-qif8M9-K.mjs";const r=[n(`adb_device_list`,e=>e.desc(`List all connected Android devices and emulators.`).query()),n(`adb_shell`,e=>e.desc(`Execute an ADB shell command on a specific device.`).string(`serial`,`Android device serial or emulator id`).string(`command`,`Shell command to run (e.g. "getprop ro.build.version.release")`).required(`serial`,`command`)),n(`adb_apk_pull`,e=>e.desc(`Pull an APK from a device to the local filesystem.`).string(`serial`,`Android device serial or emulator id`).string(`packageName`,`Android package name (e.g. com.example.app)`).string(`outputPath`,`Local directory to save the APK (default: current directory)`).required(`serial`,`packageName`)),n(`adb_apk_analyze`,e=>e.desc(`Analyze an installed APK: package, permissions, activities, and security info.`).string(`serial`,`Required. Android device serial or emulator id.`).string(`packageName`,`Required. Android package name, for example com.example.app.`).requiredOpenWorld(`serial`,`packageName`)),n(`adb_pull_native_libs`,e=>e.desc(`Pull native shared libraries (.so) for an installed app from a device.`).string(`serial`,`Required. Android device serial or emulator id.`).string(`packageName`,`Required. Android package name, for example com.example.app.`).string(`outputPath`,`Optional. Local directory to save extracted libraries into (default: current directory).`).boolean(`includeSystemLibs`,`Optional. Include system/nativeLibraryDir entries outside the app package path.`,{default:!1}).requiredOpenWorld(`serial`,`packageName`)),n(`adb_webview_list`,e=>e.desc(`List debuggable WebView targets connected via ADB.`).string(`serial`,`Required. Android device serial or emulator id.`).number(`hostPort`,`Optional. Local port to use for forwarding.`,{default:9222}).requiredOpenWorld(`serial`)),n(`adb_webview_attach`,e=>e.desc(`Attach to a WebView via ADB; returns WebSocket debugger URL for CDP.`).string(`serial`,`Required. Android device serial or emulator id.`).string(`targetId`,`Required. WebView target id returned by adb_webview_list.`).number(`hostPort`,`Optional. Local port to use for forwarding.`,{default:9222}).requiredOpenWorld(`serial`,`targetId`))],i=`adb-bridge`,a=`adbBridgeHandlers`,o=t({domain:i,depKey:a,lookup:e(r),entries:[{tool:`adb_device_list`,method:`handleDeviceList`},{tool:`adb_apk_pull`,method:`handleApkPull`},{tool:`adb_shell`,method:`handleShell`},{tool:`adb_apk_analyze`,method:`handleAnalyzeApk`},{tool:`adb_pull_native_libs`,method:`handlePullNativeLibs`},{tool:`adb_webview_list`,method:`handleWebViewList`},{tool:`adb_webview_attach`,method:`handleWebViewAttach`}]});async function s(e){let{ADBBridgeHandlers:t}=await import(`./handlers-DHO3rjsW.mjs`),n=e.getDomainInstance(a);if(n)return n;let r=new t;return e.setDomainInstance(a,r),r}const c={kind:`domain-manifest`,version:1,domain:i,depKey:a,profiles:[`full`],registrations:o,ensure:s,workflowRule:{patterns:[/(android|adb|mobile|apk|device).*(list|shell|pull|analyze|dump)/i,/(adb|android).*(webview|chrome|debug|cdp|inspect)/i,/(android|adb).*(native|\.so|libapp|libflutter|shared\s+library)/i],priority:75,tools:[`adb_device_list`,`adb_shell`,`adb_apk_pull`,`adb_apk_analyze`,`adb_pull_native_libs`,`adb_webview_list`,`adb_webview_attach`],hint:`Android/ADB: list devices → run shell commands → pull/analyze APK or native libs → debug WebViews via CDP`},prerequisites:{"*":[{condition:`ADB server binary must be in PATH`,fix:`Install Android Platform Tools: https://developer.android.com/studio/command-line/adb`}],adb_webview_list:[{condition:`App must have android:debuggable="true"`,fix:`Use a debug build of the Android app`}],adb_webview_attach:[{condition:`App must have android:debuggable="true"`,fix:`Use a debug build of the Android app`}]},toolDependencies:[{from:`browser`,to:`adb-bridge`,relation:`uses`,weight:.7}]};export{c as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./definitions-DP1vgxEY.mjs";const r=`jadx-search`,i=`jadxSearchHandlers`,a=t({domain:r,depKey:i,lookup:e(n),entries:[{tool:`jadx_search_code`,method:`handleJadxSearchCode`}]});async function o(e){let{JadxSearchHandlers:t}=await import(`./jadx-search-B_Yse0Zh.mjs`);return e.jadxSearchHandlers||=new t,e.jadxSearchHandlers}const s={kind:`domain-manifest`,version:1,domain:r,depKey:i,profiles:[`full`],ensure:o,registrations:a};export{s as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./ensure-browser-core-DxWC-NTp.mjs";import{t as r}from"./definitions-RZYGD_Ey.mjs";const i=`streaming`,a=`streamingHandlers`,o=t({domain:i,depKey:a,lookup:e(r),entries:[{tool:`ws_monitor`,method:`handleWsMonitorDispatch`},{tool:`ws_get_frames`,method:`handleWsGetFrames`},{tool:`ws_get_connections`,method:`handleWsGetConnections`},{tool:`sse_monitor_enable`,method:`handleSseMonitorEnable`},{tool:`sse_get_events`,method:`handleSseGetEvents`}]});async function s(e){let{StreamingToolHandlers:t}=await import(`./streaming-BcJ0B6ao.mjs`);return await n(e),e.streamingHandlers||=new t(e.collector),e.streamingHandlers}const c={kind:`domain-manifest`,version:1,domain:i,depKey:a,profiles:[`workflow`,`full`],ensure:s,registrations:o};export{c as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./tool-builder-qif8M9-K.mjs";const r=[n(`trace_recording`,e=>e.desc(`Start or stop trace recording into a SQLite database.`).enum(`action`,[`start`,`stop`],`Recording action`).array(`cdpDomains`,{type:`string`},`CDP domains to record (default: Debugger, Runtime, Network, Page)`).boolean(`recordMemoryDeltas`,`Record memory write deltas`,{default:!0}).boolean(`recordResponseBodies`,`Persist response bodies when available.`,{default:!0}).boolean(`streamResponseChunks`,`Capture response chunks when the browser supports it.`,{default:!0}).number(`networkBodyMaxBytes`,`Maximum response body bytes to persist per request`,{default:10485760,minimum:1024,maximum:104857600}).number(`networkInlineBodyBytes`,`Bodies up to this size are stored inline in SQLite; larger ones go to artifacts`,{default:262144,minimum:1024,maximum:10485760}).required(`action`).idempotent()),n(`start_trace_recording`,e=>e.desc(`Start recording debugger traces into a SQLite database for time-travel.`).array(`cdpDomains`,{type:`string`},`CDP domains to record (default: Debugger, Runtime, Network, Page)`).boolean(`recordMemoryDeltas`,`Record memory write deltas`,{default:!0}).boolean(`recordResponseBodies`,`Persist response bodies when available.`,{default:!0}).boolean(`streamResponseChunks`,`Capture response chunks when the browser supports it.`,{default:!0}).number(`networkBodyMaxBytes`,`Maximum response body bytes to persist per request`,{default:10485760,minimum:1024,maximum:104857600}).number(`networkInlineBodyBytes`,`Bodies up to this size are stored inline in SQLite; larger ones go to artifacts`,{default:262144,minimum:1024,maximum:10485760}).idempotent()),n(`stop_trace_recording`,e=>e.desc(`Stop trace recording and return the final session summary.`).idempotent()),n(`query_trace_sql`,e=>e.desc(`Execute a read-only SQL query against a trace database.`).string(`sql`,`SQL query to execute (SELECT only — write operations are rejected)`).string(`dbPath`,`Path to trace DB file. Uses the active recording if omitted.`).required(`sql`).query()),n(`seek_to_timestamp`,e=>e.desc(`Reconstruct trace state at a specific timestamp.`).number(`timestamp`,`Target timestamp in milliseconds`).string(`dbPath`,`Path to trace DB file. Uses the active recording if omitted.`).number(`windowMs`,`Time window around timestamp to include in ms`,{default:100}).enum(`timeDomain`,[`wall`,`monotonic`],`Interpret timestamp using wall or monotonic time`,{default:`wall`}).required(`timestamp`).query()),n(`trace_get_network_flow`,e=>e.desc(`Get a recorded request-scoped network flow from a trace.`).string(`requestId`,`Network requestId to retrieve from the trace`).string(`dbPath`,`Path to trace DB file. Uses the active recording if omitted.`).boolean(`includeBody`,`Include persisted response body metadata/content when available`,{default:!0}).boolean(`includeChunks`,`Include recorded response chunk timing data`,{default:!0}).boolean(`includeEvents`,`Include related network events from the trace`,{default:!0}).number(`chunkLimit`,`Maximum number of chunks to return`,{default:200,minimum:1,maximum:5e3}).number(`maxBodyBytes`,`Maximum response body bytes to inline before summarizing`,{default:1e5,minimum:1024,maximum:52428800}).boolean(`returnSummary`,`Return body summary even when body is within maxBodyBytes`,{default:!1}).required(`requestId`).query()),n(`diff_heap_snapshots`,e=>e.desc(`Compare two heap snapshots from a trace.`).number(`snapshotId1`,`First snapshot ID (earlier)`).number(`snapshotId2`,`Second snapshot ID (later)`).string(`dbPath`,`Path to trace DB file. Uses the active recording if omitted.`).required(`snapshotId1`,`snapshotId2`).query()),n(`export_trace`,e=>e.desc(`Export a trace database to Chrome Trace Event JSON.`).string(`dbPath`,`Path to trace DB file. Uses the active recording if omitted.`).string(`outputPath`,`Output JSON file path. Auto-generated if omitted.`).idempotent()),n(`summarize_trace`,e=>e.desc(`Generate a compact summary of a trace database.`).enum(`detail`,[`compact`,`balanced`,`full`],`Summary detail level`,{default:`balanced`}).string(`dbPath`,`Path to trace DB file. Uses the active recording if omitted.`).query())],i=`trace`,a=`traceHandlers`,o=t({domain:i,depKey:a,lookup:e(r),entries:[{tool:`trace_recording`,method:`handleTraceRecording`},{tool:`start_trace_recording`,method:`handleStartTraceRecording`},{tool:`stop_trace_recording`,method:`handleStopTraceRecording`},{tool:`query_trace_sql`,method:`handleQueryTraceSql`},{tool:`seek_to_timestamp`,method:`handleSeekToTimestamp`},{tool:`trace_get_network_flow`,method:`handleGetTraceNetworkFlow`},{tool:`diff_heap_snapshots`,method:`handleDiffHeapSnapshots`},{tool:`export_trace`,method:`handleExportTrace`},{tool:`summarize_trace`,method:`handleSummarizeTrace`}]});async function s(e){let{TraceRecorder:t}=await import(`./TraceRecorder-BiJWBXHX.mjs`),{TraceToolHandlers:n}=await import(`./handlers-CMJK7m1c.mjs`);return(!e.traceRecorder||!e.traceHandlers)&&(e.traceRecorder||=new t,e.traceHandlers||=new n(e.traceRecorder,e)),e.traceHandlers}const c={kind:`domain-manifest`,version:1,domain:i,depKey:a,profiles:[`full`],ensure:s,prerequisites:{},workflowRule:{patterns:[/trace/i,/time.?travel/i,/replay/i,/recorded?\s+events?/i],priority:70,tools:[`trace_recording`,`start_trace_recording`,`stop_trace_recording`,`query_trace_sql`,`seek_to_timestamp`,`trace_get_network_flow`,`diff_heap_snapshots`,`export_trace`,`summarize_trace`],hint:`Start recording → perform actions → stop recording → summarize/query/seek/diff/export`},registrations:o};export{c as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./definitions-B_83XfNQ.mjs";const r=`platform`,i=`platformHandlers`,a=t({domain:r,depKey:i,lookup:e(n),entries:[{tool:`platform_capabilities`,method:`handlePlatformCapabilities`},{tool:`miniapp_pkg_scan`,method:`handleMiniappPkgScan`},{tool:`miniapp_pkg_unpack`,method:`handleMiniappPkgUnpack`},{tool:`miniapp_pkg_analyze`,method:`handleMiniappPkgAnalyze`},{tool:`asar_extract`,method:`handleAsarExtract`},{tool:`electron_inspect_app`,method:`handleElectronInspectApp`},{tool:`electron_scan_userdata`,method:`handleElectronScanUserdata`},{tool:`asar_search`,method:`handleAsarSearch`},{tool:`electron_check_fuses`,method:`handleElectronCheckFuses`},{tool:`electron_patch_fuses`,method:`handleElectronPatchFuses`},{tool:`v8_bytecode_decompile`,method:`handleV8BytecodeDecompile`},{tool:`electron_launch_debug`,method:`handleElectronLaunchDebug`},{tool:`electron_debug_status`,method:`handleElectronDebugStatus`},{tool:`electron_ipc_sniff`,method:`handleElectronIPCSniff`}]});async function o(e){let{CodeCollector:t}=await import(`./collector-Bpl6qy2L.mjs`),{PlatformToolHandlers:n}=await import(`./platform-CzaQtISh.mjs`);return e.collector||(e.collector=new t(e.config.puppeteer),e.registerCaches()),e.platformHandlers||=new n(e.collector),e.platformHandlers}const s={kind:`domain-manifest`,version:1,domain:r,depKey:i,profiles:[`full`],ensure:o,registrations:a};export{s as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./registry-DH4sc1dt.mjs";import{n as t}from"./bind-helpers-m2U8glkF.mjs";import{t as n}from"./tool-builder-qif8M9-K.mjs";const r=[`etw`,`strace`,`dtrace`],i={type:`object`,properties:{timestamp:{type:`number`,description:`Relative elapsed time in milliseconds since bpftrace start`},pid:{type:`number`,description:`Process identifier`},syscall:{type:`string`,description:`Observed syscall name`},args:{type:`array`,description:`Stringified syscall arguments`,items:{type:`string`}},returnValue:{type:`number`,description:`Numeric syscall return value if available`},duration:{type:`number`,description:`Execution duration in milliseconds if available`}},required:[`timestamp`,`pid`,`syscall`,`args`]},a=[n(`syscall_start_monitor`,e=>e.desc(`Start syscall monitoring.`).enum(`backend`,r,`Syscall capture backend`).number(`pid`,`Optional PID to scope monitoring to a single process`).boolean(`simulate`,`Use synthetic events instead of a real system tracer`,{default:!1}).required(`backend`)),n(`syscall_stop_monitor`,e=>e.desc(`Stop syscall interception and release all captured events.`).idempotent()),n(`syscall_capture_events`,e=>e.desc(`Capture syscall events from the active or last monitoring session.`).prop(`filter`,{type:`object`,description:`Optional event filter`,properties:{name:{type:`array`,description:`Restrict events to specific syscall names`,items:{type:`string`}},pid:{type:`number`,description:`Restrict events to a specific process ID`}}}).query()),n(`syscall_correlate_js`,e=>e.desc(`Correlate captured syscalls with likely JavaScript functions.`).array(`syscallEvents`,i,`Syscall events to correlate`).required(`syscallEvents`).query()),n(`syscall_filter`,e=>e.desc(`Filter captured syscall events by name, PID, or return value.`).array(`names`,{type:`string`},`Syscall names to keep`).query()),n(`syscall_get_stats`,e=>e.desc(`Get syscall monitoring statistics.`).query()),n(`syscall_ebpf_trace`,e=>e.desc(`Trace syscalls on Linux with eBPF. Requires root or CAP_BPF.`).number(`pid`,`Process ID to trace. 0 = trace all.`,{default:0}).array(`syscalls`,{type:`string`},`Specific syscall names to trace (empty = all)`).number(`durationSec`,`Trace duration in seconds`,{default:10,minimum:1,maximum:300}).boolean(`simulate`,`Use synthetic events when bpftrace is unavailable`,{default:!1}).query())],o=`syscall-hook`,s=`syscallHookHandlers`,c=t({domain:o,depKey:s,lookup:e(a),entries:[{tool:`syscall_start_monitor`,method:`handleSyscallStartMonitor`},{tool:`syscall_stop_monitor`,method:`handleSyscallStopMonitor`},{tool:`syscall_capture_events`,method:`handleSyscallCaptureEvents`},{tool:`syscall_correlate_js`,method:`handleSyscallCorrelateJs`},{tool:`syscall_filter`,method:`handleSyscallFilter`},{tool:`syscall_get_stats`,method:`handleSyscallGetStats`},{tool:`syscall_ebpf_trace`,method:`handleSyscallEbpfTrace`}]});async function l(e){let{SyscallHookHandlers:t}=await import(`./handlers-D2ZOul9p.mjs`),n=e.getDomainInstance(s);if(n)return n;let r=new t(void 0,void 0,e.eventBus);return e.setDomainInstance(s,r),r}const u={kind:`domain-manifest`,version:1,domain:o,depKey:s,profiles:[`full`],ensure:l,registrations:c,workflowRule:{patterns:[/\b(syscall|etw|strace|dtrace|kernel|system\s?call)\b/i,/(syscall|kernel).*(trace|monitor|capture|filter)/i],priority:78,tools:[`syscall_start_monitor`,`syscall_capture_events`,`syscall_correlate_js`],hint:`Syscall tracing: start monitor (ETW/strace/dtrace) → capture events → correlate with JS stacks.`},prerequisites:{syscall_start_monitor:[{condition:`Administrator/root privileges required for ETW and dtrace; Linux strace needs ptrace_scope=0`,fix:`Run the MCP server with elevated privileges, or relax kernel restrictions on Linux`}],syscall_correlate_js:[{condition:`A debugger or v8-inspector session must expose JS stacks`,fix:`Attach the debugger or v8-inspector domain before correlating`}]},toolDependencies:[{from:`memory`,to:`syscall-hook`,relation:`uses`,weight:.5}]};export{u as default};