@jshookmcp/jshook 0.2.9 → 0.3.1

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 (316) hide show
  1. package/README.md +25 -50
  2. package/README.zh.md +25 -48
  3. package/dist/AntiCheatDetector-CGVGNfy5.mjs +1 -0
  4. package/dist/CacheAdapters-CdAxBmVW.mjs +1 -0
  5. package/dist/CodeInjector-BlgyqTOk.mjs +1 -0
  6. package/dist/ConsoleMonitor-Dkqc0HNi.mjs +490 -0
  7. package/dist/DOMInspector-BYY_EJ0C.mjs +95 -0
  8. package/dist/DarwinAPI-DC4HGGLl.mjs +1 -0
  9. package/dist/DetailedDataManager-BniBJlVv.mjs +1 -0
  10. package/dist/EventBus-DgciURGg.mjs +1 -0
  11. package/dist/EvidenceGraphBridge-BIfgB7HP.mjs +1 -0
  12. package/dist/ExtensionManager-erMpqcLk.mjs +1 -0
  13. package/dist/FingerprintManager-N7BZqjxP.mjs +1 -0
  14. package/dist/HardwareBreakpoint-OcJqNFVc.mjs +1 -0
  15. package/dist/HeapAnalyzer-CqAxZzeS.mjs +1 -0
  16. package/dist/{HookGeneratorBuilders.core.generators.storage-CtcdK78Q.mjs → HookGeneratorBuilders.core.generators.storage-Bf1fbrNK.mjs} +66 -174
  17. package/dist/InstrumentationSession-DxXs0sCp.mjs +1 -0
  18. package/dist/MCPServer.search.handlers.domain-DVbWL1bT.mjs +1 -0
  19. package/dist/MemoryController-BaqstM5w.mjs +2 -0
  20. package/dist/MemoryScanSession-CaxAjZJf.mjs +1 -0
  21. package/dist/MemoryScanner-BLYnMJy6.mjs +1 -0
  22. package/dist/NativeMemoryManager.impl-CI554XbY.mjs +1 -0
  23. package/dist/NativeMemoryManager.utils-DM4NC3FE.mjs +1 -0
  24. package/dist/PEAnalyzer-DJyaJTQJ.mjs +1 -0
  25. package/dist/PageController-D9jVkH0i.mjs +1 -0
  26. package/dist/PointerChainEngine-5nF9eNlu.mjs +1 -0
  27. package/dist/PrerequisiteError-Bl3dK8XA.mjs +1 -0
  28. package/dist/ProcessRegistry-Hf12LlR9.mjs +1 -0
  29. package/dist/ResponseBuilder-B2lu4KEl.mjs +1 -0
  30. package/dist/ReverseEvidenceGraph-B931HeoW.mjs +2 -0
  31. package/dist/ScriptManager-fgqiALgj.mjs +7 -0
  32. package/dist/Speedhack-l6s8L2Qw.mjs +1 -0
  33. package/dist/StealthVerifier-Dhbj4B4P.mjs +1 -0
  34. package/dist/StructureAnalyzer-A-WamfYE.mjs +2 -0
  35. package/dist/ToolCatalog-D_IKl1Hu.mjs +1 -0
  36. package/dist/ToolError-DWU_z7gp.mjs +1 -0
  37. package/dist/ToolProbe-xsfALmN3.mjs +1 -0
  38. package/dist/ToolRegistry-B0Zs-phN.mjs +1 -0
  39. package/dist/ToolRouter.policy-CFHoN_Lw.mjs +4 -0
  40. package/dist/TraceRecorder-Dd8jLXpi.mjs +272 -0
  41. package/dist/VersionDetector-DMoUWyNm.mjs +9 -0
  42. package/dist/Win32API-Bhi5xFBe.mjs +1 -0
  43. package/dist/Win32Debug-CQteFL4F.mjs +1 -0
  44. package/dist/WorkflowEngine-CxEp2WXH.mjs +1 -0
  45. package/dist/analysis-BuR-NgX8.mjs +5 -0
  46. package/dist/{antidebug-CqDTB_uk.mjs → antidebug-BOTZH6-0.mjs} +8 -259
  47. package/dist/artifactRetention-NBdncOEW.mjs +1 -0
  48. package/dist/artifacts-B5xQuEa_.mjs +1 -0
  49. package/dist/authorization-schema-B40obG1A.mjs +1 -0
  50. package/dist/betterSqlite3-CGaxz4AX.mjs +1 -0
  51. package/dist/binary-instrument-Cf9qqLlM.mjs +7 -0
  52. package/dist/bind-helpers-BlAOQrFQ.mjs +1 -0
  53. package/dist/boringssl-inspector-BST5vtKx.mjs +2 -0
  54. package/dist/browser-C4Le3xqA.mjs +11 -0
  55. package/dist/capabilities-DbYCv-HF.mjs +1 -0
  56. package/dist/chunk-C_pMuVsO.mjs +1 -0
  57. package/dist/collector-CKO8RPK8.mjs +1 -0
  58. package/dist/concurrency-CcK46d0h.mjs +1 -0
  59. package/dist/constants-Cp6hBrrx.mjs +1 -0
  60. package/dist/coordination-BbijHEHH.mjs +1 -0
  61. package/dist/debugger-CRJq_krh.mjs +1 -0
  62. package/dist/definitions-BGobEDQa.mjs +1 -0
  63. package/dist/definitions-BGwNSkVm.mjs +1 -0
  64. package/dist/definitions-BbxOUiP-.mjs +1 -0
  65. package/dist/definitions-CCP9gphV.mjs +1 -0
  66. package/dist/definitions-CIO9O-Sw.mjs +1 -0
  67. package/dist/definitions-CYFbewnd.mjs +1 -0
  68. package/dist/definitions-CdWEuIkI.mjs +1 -0
  69. package/dist/definitions-CoQFbggH.mjs +1 -0
  70. package/dist/definitions-CuJRsJ6N.mjs +1 -0
  71. package/dist/definitions-DI9YXsJk.mjs +1 -0
  72. package/dist/definitions-DJklW2sS.mjs +1 -0
  73. package/dist/definitions-DZ8uKusP.mjs +1 -0
  74. package/dist/definitions-Dds_zrWx.mjs +1 -0
  75. package/dist/definitions-Dgrg7f3D.mjs +1 -0
  76. package/dist/definitions-DtE0XLrT.mjs +1 -0
  77. package/dist/definitions-LaYTuwQd.mjs +26 -0
  78. package/dist/definitions-NoVp_9Pm.mjs +1 -0
  79. package/dist/definitions-OvGsfxdt.mjs +1 -0
  80. package/dist/definitions-jXPaVy4P.mjs +1 -0
  81. package/dist/encoding-DGcr6Aj_.mjs +2 -0
  82. package/dist/ensure-browser-core-Buls24LQ.mjs +1 -0
  83. package/dist/evidence-graph-bridge-B0yhGPcs.mjs +1 -0
  84. package/dist/factory-Cx_1LorX.mjs +1 -0
  85. package/dist/flat-target-session-CO5g78k3.mjs +1 -0
  86. package/dist/formatAddress-C7j2fDlM.mjs +1 -0
  87. package/dist/graphql-HLf3MS8H.mjs +62 -0
  88. package/dist/handlers-BLMa4X7l.mjs +54 -0
  89. package/dist/handlers-BP12ZsWc.mjs +4 -0
  90. package/dist/handlers-BZoPla6E.mjs +1 -0
  91. package/dist/handlers-BggKiVx9.mjs +2 -0
  92. package/dist/handlers-D3iev8g1.mjs +1 -0
  93. package/dist/handlers-D49r1-1P.mjs +1 -0
  94. package/dist/handlers-DCE45Ww8.mjs +2 -0
  95. package/dist/handlers-DW5AbYs5.mjs +5 -0
  96. package/dist/handlers-De5u62Ga2.mjs +1 -0
  97. package/dist/handlers-DmQzIc44.mjs +31 -0
  98. package/dist/handlers-DnJRGp7t.mjs +302 -0
  99. package/dist/handlers-Dv_runVv.mjs +2 -0
  100. package/dist/handlers-S9Ws0IGy.mjs +2 -0
  101. package/dist/{handlers-Bl8zkwz1.mjs → handlers-pVNpaw4A.mjs} +144 -841
  102. package/dist/handlers.impl-CD2_kOcC.mjs +1 -0
  103. package/dist/hooks-DDKppogd.mjs +600 -0
  104. package/dist/index.mjs +12 -5225
  105. package/dist/logger-sBC6IdRT.mjs +1 -0
  106. package/dist/maintenance-CutEO84j.mjs +1 -0
  107. package/dist/manifest-BFGxlDRh.mjs +123 -0
  108. package/dist/manifest-BPuE6oH2.mjs +1 -0
  109. package/dist/manifest-BXry5N09.mjs +1 -0
  110. package/dist/manifest-BeP_zJGb2.mjs +1 -0
  111. package/dist/manifest-C0g67k6U.mjs +1 -0
  112. package/dist/manifest-C1nZkTkO.mjs +1 -0
  113. package/dist/manifest-C7qV1z7F.mjs +1 -0
  114. package/dist/manifest-CDeUZGUZ.mjs +1 -0
  115. package/dist/manifest-CDiCtaQT.mjs +1 -0
  116. package/dist/manifest-CFn0359q2.mjs +1 -0
  117. package/dist/manifest-CGq4NpqH2.mjs +1 -0
  118. package/dist/manifest-CJMGt7Qy.mjs +1 -0
  119. package/dist/manifest-CRIJq4Hs.mjs +1 -0
  120. package/dist/manifest-C_hEIjSx.mjs +1 -0
  121. package/dist/manifest-CeQmtQOY.mjs +1 -0
  122. package/dist/manifest-Cq0j7GZt.mjs +1 -0
  123. package/dist/manifest-CtPmHAdn.mjs +1 -0
  124. package/dist/manifest-Cx2IVMUY.mjs +1 -0
  125. package/dist/manifest-D16xPXro.mjs +1 -0
  126. package/dist/manifest-D44TaRJU.mjs +1 -0
  127. package/dist/manifest-D610kxZr.mjs +2 -0
  128. package/dist/manifest-DC-SMF6b.mjs +1 -0
  129. package/dist/manifest-DD3rtxvV.mjs +1 -0
  130. package/dist/manifest-DKUorv5M.mjs +1 -0
  131. package/dist/manifest-DMJlcsTR.mjs +1 -0
  132. package/dist/manifest-DWUUWBz0.mjs +1 -0
  133. package/dist/manifest-De-6Wf2R.mjs +1 -0
  134. package/dist/manifest-Dgh0uDW-.mjs +1 -0
  135. package/dist/manifest-Dm0o3i2U.mjs +1 -0
  136. package/dist/manifest-DsVh7Y4U.mjs +1 -0
  137. package/dist/manifest-DtEFSRaq.mjs +1 -0
  138. package/dist/manifest-H-EpAyZQ.mjs +1 -0
  139. package/dist/manifest-ais9Afrw.mjs +1 -0
  140. package/dist/manifest-tmb54wmA.mjs +1 -0
  141. package/dist/manifest-yu2xiQqe.mjs +1 -0
  142. package/dist/manifest-zrbrpKCC.mjs +1 -0
  143. package/dist/matchesWildcardPattern-BGqLSmEs.mjs +1 -0
  144. package/dist/modules-p-PUNv9r.mjs +332 -0
  145. package/dist/mojo-ipc-VGlv3Qyp.mjs +9 -0
  146. package/dist/network-BjZ1Y-GB.mjs +7 -0
  147. package/dist/outputPaths-BonGThuc.mjs +2 -0
  148. package/dist/parse-args-Cuk7-xUt.mjs +1 -0
  149. package/dist/platform-C446Lf97.mjs +93 -0
  150. package/dist/playwright-cdp-fallback-BwVR-_T3.mjs +1 -0
  151. package/dist/process-C9f2A5zk.mjs +962 -0
  152. package/dist/proxy-CvRepxgV.mjs +1 -0
  153. package/dist/registry-DUHIPE-v.mjs +1 -0
  154. package/dist/response-C7rKQst4.mjs +1 -0
  155. package/dist/search-defaults-D2bY-rzH.mjs +1 -0
  156. package/dist/server/plugin-api.mjs +1 -293
  157. package/dist/shared-state-board-Cyg-xh_k.mjs +1 -0
  158. package/dist/sourcemap-D6Q1UuAp.mjs +1 -0
  159. package/dist/ssrf-policy-T96MR3r6.mjs +1 -0
  160. package/dist/streaming-CTX58tbb.mjs +1 -0
  161. package/dist/tool-builder-CI9914Tf.mjs +1 -0
  162. package/dist/transform-Cv9P2vVD.mjs +103 -0
  163. package/dist/types-CuyefmGT.mjs +1 -0
  164. package/dist/types-DtThH00r.mjs +1 -0
  165. package/dist/wasm-DaJa8J0V.mjs +174 -0
  166. package/dist/webcrack-CsLLJIs9.mjs +46 -0
  167. package/dist/workflow-CYIXtrWD.mjs +101 -0
  168. package/package.json +12 -7
  169. package/dist/AntiCheatDetector-BNk-EoBt.mjs +0 -244
  170. package/dist/CacheAdapters-CDe5WPSV.mjs +0 -80
  171. package/dist/CodeInjector-Cq8q01kp.mjs +0 -150
  172. package/dist/ConsoleMonitor-CPVQW1Y-.mjs +0 -2201
  173. package/dist/DarwinAPI-BNPxu0RH.mjs +0 -363
  174. package/dist/DetailedDataManager-BQQcxh64.mjs +0 -217
  175. package/dist/EventBus-DgPmwpeu.mjs +0 -141
  176. package/dist/EvidenceGraphBridge-SFesNera.mjs +0 -153
  177. package/dist/ExtensionManager-CWYgw0YW.mjs +0 -714
  178. package/dist/FingerprintManager-gzWtkKuf.mjs +0 -96
  179. package/dist/HardwareBreakpoint-B9gZCdFP.mjs +0 -239
  180. package/dist/HeapAnalyzer-BLDH0dCv.mjs +0 -284
  181. package/dist/InstrumentationSession-CvPC7Jwy.mjs +0 -244
  182. package/dist/MemoryController-CbVdCIJF.mjs +0 -167
  183. package/dist/MemoryScanSession-BsDZbLYm.mjs +0 -278
  184. package/dist/MemoryScanner-Bcpml6II.mjs +0 -425
  185. package/dist/NativeMemoryManager.impl-dZtA1ZGn.mjs +0 -482
  186. package/dist/NativeMemoryManager.utils-B-FjA2mJ.mjs +0 -165
  187. package/dist/PEAnalyzer-D1lzJ_VG.mjs +0 -385
  188. package/dist/PageController-Bqm2kZ_X.mjs +0 -417
  189. package/dist/PointerChainEngine-BOhyVsjx.mjs +0 -322
  190. package/dist/PrerequisiteError-Dl33Svkz.mjs +0 -20
  191. package/dist/ResponseBuilder-D3iFYx2N.mjs +0 -143
  192. package/dist/ReverseEvidenceGraph-Dlsk94LC.mjs +0 -269
  193. package/dist/ScriptManager-aHHq0X7U.mjs +0 -3000
  194. package/dist/Speedhack-CqdIFlQl.mjs +0 -156
  195. package/dist/StealthVerifier-Bo4T3bz8.mjs +0 -135
  196. package/dist/StructureAnalyzer-DhFaPvRO.mjs +0 -426
  197. package/dist/ToolCatalog-C0JGZoOm.mjs +0 -582
  198. package/dist/ToolError-jh9whhMd.mjs +0 -15
  199. package/dist/ToolProbe-oC7aPrkv.mjs +0 -45
  200. package/dist/ToolRegistry-BjaF4oNz.mjs +0 -131
  201. package/dist/ToolRouter.policy-BWV67ZK-.mjs +0 -304
  202. package/dist/TraceRecorder-DgxyVbdQ.mjs +0 -519
  203. package/dist/VersionDetector-CwVLVdDM.mjs +0 -104
  204. package/dist/Win32API-CePkipZY.mjs +0 -340
  205. package/dist/Win32Debug-BvKs-gxc.mjs +0 -274
  206. package/dist/WorkflowEngine-CuvkZtWu.mjs +0 -598
  207. package/dist/analysis-CL9uACt9.mjs +0 -463
  208. package/dist/artifactRetention-CFEprwPw.mjs +0 -591
  209. package/dist/artifacts-Bk2-_uPq.mjs +0 -59
  210. package/dist/betterSqlite3-0pqusHHH.mjs +0 -74
  211. package/dist/binary-instrument-CXfpx6fT.mjs +0 -979
  212. package/dist/bind-helpers-xFfRF-qm.mjs +0 -22
  213. package/dist/boringssl-inspector-BH2D3VKc.mjs +0 -180
  214. package/dist/browser-BpOr5PEx.mjs +0 -4082
  215. package/dist/chunk-CjcI7cDX.mjs +0 -15
  216. package/dist/concurrency-Bt0yv1kJ.mjs +0 -41
  217. package/dist/constants-B0OANIBL.mjs +0 -519
  218. package/dist/coordination-qUbyF8KU.mjs +0 -259
  219. package/dist/debugger-gnKxRSN0.mjs +0 -1271
  220. package/dist/definitions-6M-eejaT.mjs +0 -53
  221. package/dist/definitions-B18eyf0B.mjs +0 -18
  222. package/dist/definitions-B3QdlrHv.mjs +0 -34
  223. package/dist/definitions-B4rAvHNZ.mjs +0 -63
  224. package/dist/definitions-BB_4jnmy.mjs +0 -37
  225. package/dist/definitions-BMfYXoNC.mjs +0 -43
  226. package/dist/definitions-Beid2EB3.mjs +0 -27
  227. package/dist/definitions-C1UvM5Iy.mjs +0 -126
  228. package/dist/definitions-CXEI7QC72.mjs +0 -216
  229. package/dist/definitions-C_4r7Fo-2.mjs +0 -14
  230. package/dist/definitions-CkFDALoa.mjs +0 -26
  231. package/dist/definitions-Cke7zEb8.mjs +0 -94
  232. package/dist/definitions-ClJLzsJQ.mjs +0 -25
  233. package/dist/definitions-Cq-zroAU.mjs +0 -28
  234. package/dist/definitions-Cy3Sl6gV.mjs +0 -34
  235. package/dist/definitions-D3VsGcvz.mjs +0 -47
  236. package/dist/definitions-DVGfrn7y.mjs +0 -96
  237. package/dist/definitions-LKpC3-nL.mjs +0 -9
  238. package/dist/definitions-bAhHQJq9.mjs +0 -359
  239. package/dist/encoding-Bvz5jLRv.mjs +0 -1065
  240. package/dist/evidence-graph-bridge-C_fv9PuC.mjs +0 -135
  241. package/dist/factory-DxlGh9Xf.mjs +0 -575
  242. package/dist/formatAddress-DVkj9kpI.mjs +0 -17
  243. package/dist/graphql-DYWzJ29s.mjs +0 -1026
  244. package/dist/handlers-9sAbfIg-.mjs +0 -2552
  245. package/dist/handlers-C67ktuRN.mjs +0 -710
  246. package/dist/handlers-C87g8oCe.mjs +0 -276
  247. package/dist/handlers-CTsDAO6p.mjs +0 -681
  248. package/dist/handlers-Cgyg6c0U.mjs +0 -645
  249. package/dist/handlers-D6j6yka7.mjs +0 -2124
  250. package/dist/handlers-DdFzXLvF.mjs +0 -446
  251. package/dist/handlers-DeLOCd5m.mjs +0 -799
  252. package/dist/handlers-DlCJN4Td.mjs +0 -757
  253. package/dist/handlers-DxGIq15_2.mjs +0 -917
  254. package/dist/handlers-U6L4xhuF.mjs +0 -585
  255. package/dist/handlers-tB9Mp9ZK.mjs +0 -84
  256. package/dist/handlers-tiy7EIBp.mjs +0 -572
  257. package/dist/handlers.impl-DS0d9fUw.mjs +0 -761
  258. package/dist/hooks-CzCWByww.mjs +0 -898
  259. package/dist/logger-Dh_xb7_2.mjs +0 -93
  260. package/dist/maintenance-P7ePRXQC.mjs +0 -830
  261. package/dist/manifest-2ToTpjv8.mjs +0 -106
  262. package/dist/manifest-3g71z6Bg.mjs +0 -79
  263. package/dist/manifest-82baTv4U.mjs +0 -45
  264. package/dist/manifest-B3QVVeBS.mjs +0 -82
  265. package/dist/manifest-BB2J8IMJ.mjs +0 -149
  266. package/dist/manifest-BKbgbSiY.mjs +0 -60
  267. package/dist/manifest-Bcf-TJzH.mjs +0 -848
  268. package/dist/manifest-BmtZzQiQ2.mjs +0 -45
  269. package/dist/manifest-Bnd7kqEY.mjs +0 -55
  270. package/dist/manifest-BqQX6OQC2.mjs +0 -65
  271. package/dist/manifest-BqrQ4Tpj.mjs +0 -81
  272. package/dist/manifest-Br4RPFt5.mjs +0 -370
  273. package/dist/manifest-C5qDjysN.mjs +0 -107
  274. package/dist/manifest-C9RT5nk32.mjs +0 -34
  275. package/dist/manifest-CAhOuvSl.mjs +0 -204
  276. package/dist/manifest-CBYWCUBJ.mjs +0 -51
  277. package/dist/manifest-CFADCRa1.mjs +0 -37
  278. package/dist/manifest-CQVhavRF.mjs +0 -114
  279. package/dist/manifest-CT7zZBV1.mjs +0 -48
  280. package/dist/manifest-CV12bcrF.mjs +0 -121
  281. package/dist/manifest-CXsRWjjI.mjs +0 -224
  282. package/dist/manifest-CZLUCfG02.mjs +0 -95
  283. package/dist/manifest-D6phHKFd.mjs +0 -131
  284. package/dist/manifest-DCyjf4n2.mjs +0 -294
  285. package/dist/manifest-DHsnKgP6.mjs +0 -60
  286. package/dist/manifest-Df_dliIe.mjs +0 -55
  287. package/dist/manifest-Dh8WBmEW.mjs +0 -129
  288. package/dist/manifest-DhKRAT8_.mjs +0 -92
  289. package/dist/manifest-DlpTj4ic2.mjs +0 -193
  290. package/dist/manifest-DrbmZcFl2.mjs +0 -253
  291. package/dist/manifest-DuwHjUa5.mjs +0 -70
  292. package/dist/manifest-DzwvxPJX.mjs +0 -38
  293. package/dist/manifest-NXctwWQq.mjs +0 -68
  294. package/dist/manifest-Sc_0JQ13.mjs +0 -418
  295. package/dist/manifest-gZ4s_UtG.mjs +0 -96
  296. package/dist/manifest-qSleDqdO.mjs +0 -1023
  297. package/dist/modules-C184v-S9.mjs +0 -11365
  298. package/dist/mojo-ipc-B_H61Afw.mjs +0 -525
  299. package/dist/network-671Cw6hV.mjs +0 -3346
  300. package/dist/outputPaths-B1uGmrWZ.mjs +0 -1145
  301. package/dist/parse-args-BlRjqlkL.mjs +0 -39
  302. package/dist/platform-WmNn8Sxb.mjs +0 -2070
  303. package/dist/process-QcbIy5Zq.mjs +0 -1401
  304. package/dist/proxy-DqNs0bAd.mjs +0 -170
  305. package/dist/registry-D-6e18lB.mjs +0 -34
  306. package/dist/response-BQVP-xUn.mjs +0 -28
  307. package/dist/shared-state-board-DV-dpHFJ.mjs +0 -586
  308. package/dist/sourcemap-Dq8ez8vS.mjs +0 -650
  309. package/dist/ssrf-policy-ZaUfvhq7.mjs +0 -166
  310. package/dist/streaming-BUQ0VJsg.mjs +0 -725
  311. package/dist/tool-builder-DCbIC5Eo.mjs +0 -186
  312. package/dist/transform-CiYJfNX0.mjs +0 -1007
  313. package/dist/types-Bx92KJfT.mjs +0 -4
  314. package/dist/types-CPhOReNX.mjs +0 -37
  315. package/dist/wasm-DQTnHDs4.mjs +0 -531
  316. package/dist/workflow-f3xJOcjx.mjs +0 -725
@@ -1,193 +0,0 @@
1
- import { n as toolLookup, t as ensureBrowserCore } from "./registry-D-6e18lB.mjs";
2
- import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
3
- import { t as advancedTools } from "./definitions-CXEI7QC72.mjs";
4
- //#region src/server/domains/network/manifest.ts
5
- const DOMAIN = "network";
6
- const DEP_KEY = "advancedHandlers";
7
- const t = toolLookup(advancedTools);
8
- const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
9
- async function ensure(ctx) {
10
- const { AdvancedToolHandlers } = await import("./network-671Cw6hV.mjs");
11
- await ensureBrowserCore(ctx);
12
- if (!ctx.advancedHandlers) ctx.advancedHandlers = new AdvancedToolHandlers(ctx.collector, ctx.consoleMonitor, ctx.eventBus);
13
- return ctx.advancedHandlers;
14
- }
15
- const manifest = {
16
- kind: "domain-manifest",
17
- version: 1,
18
- domain: DOMAIN,
19
- depKey: DEP_KEY,
20
- profiles: ["workflow", "full"],
21
- ensure,
22
- workflowRule: {
23
- patterns: [/(capture|intercept|monitor|hook).*(network|request|response|api|traffic)/i, /(抓包|拦截|监控|hook).*(网络|请求|响应|api|流量)/i],
24
- priority: 100,
25
- tools: [
26
- "run_extension_workflow",
27
- "list_extension_workflows",
28
- "network_monitor",
29
- "page_navigate",
30
- "network_get_requests"
31
- ],
32
- hint: "Network capture workflow: prefer extension workflows first; otherwise bootstrap browser/page state -> enable capture -> navigate or act -> inspect captured requests"
33
- },
34
- prerequisites: {
35
- network_get_requests: [{
36
- condition: "Browser must be launched",
37
- fix: "Call browser_launch or browser_attach first"
38
- }, {
39
- condition: "Network monitoring must be enabled",
40
- fix: "Call network_monitor(enable) first"
41
- }],
42
- network_get_response_body: [{
43
- condition: "Browser must be launched",
44
- fix: "Call browser_launch or browser_attach first"
45
- }, {
46
- condition: "Network monitoring must be enabled",
47
- fix: "Call network_monitor(enable) first"
48
- }],
49
- network_extract_auth: [{
50
- condition: "Network monitoring must be enabled",
51
- fix: "Call network_monitor(enable) first"
52
- }]
53
- },
54
- registrations: [
55
- {
56
- tool: t("network_enable"),
57
- domain: DOMAIN,
58
- bind: b((h, a) => h.handleNetworkEnable(a))
59
- },
60
- {
61
- tool: t("network_disable"),
62
- domain: DOMAIN,
63
- bind: b((h, a) => h.handleNetworkDisable(a))
64
- },
65
- {
66
- tool: t("network_get_status"),
67
- domain: DOMAIN,
68
- bind: b((h, a) => h.handleNetworkGetStatus(a))
69
- },
70
- {
71
- tool: t("network_monitor"),
72
- domain: DOMAIN,
73
- bind: b((h, a) => h.handleNetworkMonitor(a))
74
- },
75
- {
76
- tool: t("network_get_requests"),
77
- domain: DOMAIN,
78
- bind: b((h, a) => h.handleNetworkGetRequests(a))
79
- },
80
- {
81
- tool: t("network_get_response_body"),
82
- domain: DOMAIN,
83
- bind: b((h, a) => h.handleNetworkGetResponseBody(a))
84
- },
85
- {
86
- tool: t("network_get_stats"),
87
- domain: DOMAIN,
88
- bind: b((h, a) => h.handleNetworkGetStats(a))
89
- },
90
- {
91
- tool: t("performance_get_metrics"),
92
- domain: DOMAIN,
93
- bind: b((h, a) => h.handlePerformanceGetMetrics(a))
94
- },
95
- {
96
- tool: t("performance_coverage"),
97
- domain: DOMAIN,
98
- bind: b((h, a) => h.handlePerformanceCoverage(a))
99
- },
100
- {
101
- tool: t("performance_take_heap_snapshot"),
102
- domain: DOMAIN,
103
- bind: b((h, a) => h.handlePerformanceTakeHeapSnapshot(a))
104
- },
105
- {
106
- tool: t("performance_trace"),
107
- domain: DOMAIN,
108
- bind: b((h, a) => h.handlePerformanceTraceDispatch(a))
109
- },
110
- {
111
- tool: t("profiler_cpu"),
112
- domain: DOMAIN,
113
- bind: b((h, a) => h.handleProfilerCpuDispatch(a))
114
- },
115
- {
116
- tool: t("profiler_heap_sampling"),
117
- domain: DOMAIN,
118
- bind: b((h, a) => h.handleProfilerHeapSamplingDispatch(a))
119
- },
120
- {
121
- tool: t("console_get_exceptions"),
122
- domain: DOMAIN,
123
- bind: b((h, a) => h.handleConsoleGetExceptions(a))
124
- },
125
- {
126
- tool: t("console_inject"),
127
- domain: DOMAIN,
128
- bind: b((h, a) => h.handleConsoleInjectDispatch(a))
129
- },
130
- {
131
- tool: t("console_buffers"),
132
- domain: DOMAIN,
133
- bind: b((h, a) => h.handleConsoleBuffersDispatch(a))
134
- },
135
- {
136
- tool: t("http_request_build"),
137
- domain: DOMAIN,
138
- bind: b((h, a) => h.handleHttpRequestBuild(a))
139
- },
140
- {
141
- tool: t("http_plain_request"),
142
- domain: DOMAIN,
143
- bind: b((h, a) => h.handleHttpPlainRequest(a))
144
- },
145
- {
146
- tool: t("http2_probe"),
147
- domain: DOMAIN,
148
- bind: b((h, a) => h.handleHttp2Probe(a))
149
- },
150
- {
151
- tool: t("http2_frame_build"),
152
- domain: DOMAIN,
153
- bind: b((h, a) => h.handleHttp2FrameBuild(a))
154
- },
155
- {
156
- tool: t("network_rtt_measure"),
157
- domain: DOMAIN,
158
- bind: b((h, a) => h.handleNetworkRttMeasure(a))
159
- },
160
- {
161
- tool: t("network_traceroute"),
162
- domain: DOMAIN,
163
- bind: b((h, a) => h.handleNetworkTraceroute(a))
164
- },
165
- {
166
- tool: t("network_icmp_probe"),
167
- domain: DOMAIN,
168
- bind: b((h, a) => h.handleNetworkIcmpProbe(a))
169
- },
170
- {
171
- tool: t("network_extract_auth"),
172
- domain: DOMAIN,
173
- bind: b((h, a) => h.handleNetworkExtractAuth(a))
174
- },
175
- {
176
- tool: t("network_export_har"),
177
- domain: DOMAIN,
178
- bind: b((h, a) => h.handleNetworkExportHar(a))
179
- },
180
- {
181
- tool: t("network_replay_request"),
182
- domain: DOMAIN,
183
- bind: b((h, a) => h.handleNetworkReplayRequest(a))
184
- },
185
- {
186
- tool: t("network_intercept"),
187
- domain: DOMAIN,
188
- bind: b((h, a) => h.handleNetworkInterceptDispatch(a))
189
- }
190
- ]
191
- };
192
- //#endregion
193
- export { manifest as default };
@@ -1,253 +0,0 @@
1
- import { n as toolLookup } from "./registry-D-6e18lB.mjs";
2
- import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
3
- import { t as tool } from "./tool-builder-DCbIC5Eo.mjs";
4
- //#region src/server/domains/protocol-analysis/definitions.ts
5
- const protocolAnalysisTools = [
6
- tool("payload_template_build", (t) => t.desc("Build a binary payload from declarative field definitions.").idempotent()),
7
- tool("payload_mutate", (t) => t.desc("Apply deterministic byte-level mutations to a hex payload. Useful for protocol probing, boundary testing, and replay preparation.").string("hexPayload", "Source payload as a hex string").array("mutations", {
8
- type: "object",
9
- properties: {
10
- offset: {
11
- type: "number",
12
- description: "Zero-based byte offset"
13
- },
14
- length: {
15
- type: "number",
16
- description: "Mutation length in bytes (default: 1, ignored for replace_hex when valueHex is longer)"
17
- },
18
- mode: {
19
- type: "string",
20
- enum: [
21
- "zero",
22
- "ff",
23
- "flip_bits",
24
- "increment_u8",
25
- "decrement_u8",
26
- "replace_hex"
27
- ],
28
- description: "Mutation strategy"
29
- },
30
- valueHex: {
31
- type: "string",
32
- description: "Replacement hex bytes for replace_hex mode"
33
- }
34
- },
35
- required: ["offset", "mode"]
36
- }, "Byte-level mutations to apply in order").required("hexPayload", "mutations")),
37
- tool("ethernet_frame_build", (t) => t.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()),
38
- tool("arp_build", (t) => t.desc("Build a deterministic ARP payload for Ethernet/IPv4 style address resolution packets.").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()),
39
- tool("raw_ip_packet_build", (t) => t.desc("Build a deterministic raw IPv4 or IPv6 packet header around an existing payload.").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: false }).boolean("moreFragments", "Set the IPv4 MF flag", { default: false }).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()),
40
- tool("icmp_echo_build", (t) => t.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()),
41
- tool("checksum_apply", (t) => t.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()),
42
- tool("pcap_write", (t) => t.desc("Write a compact classic PCAP file from deterministic packet byte records.").string("path", "Destination path for the PCAP file").array("packets", {
43
- type: "object",
44
- properties: {
45
- dataHex: {
46
- type: "string",
47
- description: "Packet bytes as a hex string"
48
- },
49
- timestampSeconds: {
50
- type: "number",
51
- description: "Unix timestamp seconds. Defaults to 0 when omitted"
52
- },
53
- timestampFraction: {
54
- type: "number",
55
- description: "Microsecond or nanosecond fraction depending on timestampPrecision"
56
- },
57
- originalLength: {
58
- type: "number",
59
- description: "Original on-wire packet length. Defaults to included length"
60
- }
61
- },
62
- required: ["dataHex"]
63
- }, "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()),
64
- tool("pcap_read", (t) => t.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()),
65
- tool("proto_define_pattern", (t) => t.desc("Define a protocol pattern with delimiter, byte order, and field layout").string("name", "Pattern name").prop("spec", {
66
- type: "object",
67
- description: "Pattern specification object",
68
- additionalProperties: true
69
- }).required("name", "spec").idempotent()),
70
- tool("proto_auto_detect", (t) => t.desc("Auto-detect a protocol pattern from one or more hex payload samples").array("hexPayloads", { type: "string" }, "Hex payload samples").required("hexPayloads").query()),
71
- tool("proto_export_schema", (t) => t.desc("Export a protocol pattern to a .proto-like schema definition").string("patternId", "Pattern ID to export").required("patternId").query()),
72
- tool("proto_infer_fields", (t) => t.desc("Infer likely protocol fields from repeated hex payload samples").array("hexPayloads", { type: "string" }, "Hex payload samples").required("hexPayloads").query()),
73
- tool("proto_infer_state_machine", (t) => t.desc("Infer a protocol state machine from captured message sequences").array("messages", {
74
- type: "object",
75
- properties: {
76
- direction: {
77
- type: "string",
78
- enum: ["req", "res"],
79
- description: "Message direction"
80
- },
81
- timestamp: {
82
- type: "number",
83
- description: "Message timestamp"
84
- },
85
- fields: {
86
- type: "object",
87
- description: "Decoded message fields",
88
- additionalProperties: true
89
- },
90
- raw: {
91
- type: "string",
92
- description: "Raw message or payload summary"
93
- }
94
- },
95
- required: [
96
- "direction",
97
- "timestamp",
98
- "fields",
99
- "raw"
100
- ]
101
- }, "Captured protocol messages").required("messages").query()),
102
- tool("proto_visualize_state", (t) => t.desc("Generate a Mermaid state diagram from a protocol state machine definition").prop("stateMachine", {
103
- type: "object",
104
- description: "State machine definition with states and transitions",
105
- additionalProperties: true
106
- }).query())
107
- ];
108
- //#endregion
109
- //#region src/server/domains/protocol-analysis/manifest.ts
110
- const DOMAIN = "protocol-analysis";
111
- const DEP_KEY = "protocolAnalysisHandlers";
112
- const t = toolLookup(protocolAnalysisTools);
113
- const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
114
- async function ensure(ctx) {
115
- const { ProtocolAnalysisHandlers } = await import("./handlers-D6j6yka7.mjs");
116
- const existing = ctx.getDomainInstance(DEP_KEY);
117
- if (existing) return existing;
118
- const handlers = new ProtocolAnalysisHandlers(void 0, void 0, ctx.eventBus);
119
- ctx.setDomainInstance(DEP_KEY, handlers);
120
- return handlers;
121
- }
122
- const manifest = {
123
- kind: "domain-manifest",
124
- version: 1,
125
- domain: DOMAIN,
126
- depKey: DEP_KEY,
127
- profiles: ["full"],
128
- ensure,
129
- registrations: [
130
- {
131
- tool: t("proto_define_pattern"),
132
- domain: DOMAIN,
133
- bind: b((handlers, args) => handlers.handleDefinePattern(args))
134
- },
135
- {
136
- tool: t("proto_auto_detect"),
137
- domain: DOMAIN,
138
- bind: b((handlers, args) => handlers.handleAutoDetect(args))
139
- },
140
- {
141
- tool: t("proto_infer_fields"),
142
- domain: DOMAIN,
143
- bind: b((handlers, args) => handlers.handleInferFields(args))
144
- },
145
- {
146
- tool: t("proto_infer_state_machine"),
147
- domain: DOMAIN,
148
- bind: b((handlers, args) => handlers.handleInferStateMachine(args))
149
- },
150
- {
151
- tool: t("proto_export_schema"),
152
- domain: DOMAIN,
153
- bind: b((handlers, args) => handlers.handleExportSchema(args))
154
- },
155
- {
156
- tool: t("proto_visualize_state"),
157
- domain: DOMAIN,
158
- bind: b((handlers, args) => handlers.handleVisualizeState(args))
159
- },
160
- {
161
- tool: t("payload_template_build"),
162
- domain: DOMAIN,
163
- bind: b((handlers, args) => handlers.handlePayloadTemplateBuild(args))
164
- },
165
- {
166
- tool: t("payload_mutate"),
167
- domain: DOMAIN,
168
- bind: b((handlers, args) => handlers.handlePayloadMutate(args))
169
- },
170
- {
171
- tool: t("ethernet_frame_build"),
172
- domain: DOMAIN,
173
- bind: b((handlers, args) => handlers.handleEthernetFrameBuild(args))
174
- },
175
- {
176
- tool: t("arp_build"),
177
- domain: DOMAIN,
178
- bind: b((handlers, args) => handlers.handleArpBuild(args))
179
- },
180
- {
181
- tool: t("raw_ip_packet_build"),
182
- domain: DOMAIN,
183
- bind: b((handlers, args) => handlers.handleRawIpPacketBuild(args))
184
- },
185
- {
186
- tool: t("icmp_echo_build"),
187
- domain: DOMAIN,
188
- bind: b((handlers, args) => handlers.handleIcmpEchoBuild(args))
189
- },
190
- {
191
- tool: t("checksum_apply"),
192
- domain: DOMAIN,
193
- bind: b((handlers, args) => handlers.handleChecksumApply(args))
194
- },
195
- {
196
- tool: t("pcap_write"),
197
- domain: DOMAIN,
198
- bind: b((handlers, args) => handlers.handlePcapWrite(args))
199
- },
200
- {
201
- tool: t("pcap_read"),
202
- domain: DOMAIN,
203
- bind: b((handlers, args) => handlers.handlePcapRead(args))
204
- }
205
- ],
206
- prerequisites: {
207
- proto_auto_detect: [{
208
- condition: "At least one hex payload sample is required",
209
- fix: "Capture traffic using network monitoring tools first"
210
- }],
211
- proto_infer_state_machine: [{
212
- condition: "Multiple message samples are required for state machine inference",
213
- fix: "Capture message sequences with mojo-ipc or network tools"
214
- }]
215
- },
216
- workflowRule: {
217
- patterns: [
218
- /protocol\s+(reverse|analysis|pattern|state\s*machine|schema)/i,
219
- /custom\s+protocol|binary\s+protocol|wire\s+format/i,
220
- /infer\s+(protocol|fields|state\s*machine)/i,
221
- /proto.*export|proto.*schema|proto.*diagram/i,
222
- /payload\s+(template|build|mutate)|packet\s+(template|mutate)/i,
223
- /ethernet|arp|ipv4|ipv6|pcap|internet\s+checksum|raw\s+packet/i
224
- ],
225
- priority: .6,
226
- tools: [
227
- "proto_auto_detect",
228
- "proto_infer_fields",
229
- "proto_define_pattern",
230
- "proto_infer_state_machine",
231
- "proto_export_schema",
232
- "proto_visualize_state",
233
- "payload_template_build",
234
- "payload_mutate",
235
- "ethernet_frame_build",
236
- "arp_build",
237
- "raw_ip_packet_build",
238
- "icmp_echo_build",
239
- "checksum_apply",
240
- "pcap_write",
241
- "pcap_read"
242
- ],
243
- 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"
244
- },
245
- toolDependencies: [{
246
- from: "network",
247
- to: "protocol-analysis",
248
- relation: "uses",
249
- weight: .7
250
- }]
251
- };
252
- //#endregion
253
- export { manifest as default };
@@ -1,70 +0,0 @@
1
- import { n as toolLookup } from "./registry-D-6e18lB.mjs";
2
- import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
3
- import { t as wasmTools } from "./definitions-Cy3Sl6gV.mjs";
4
- //#region src/server/domains/wasm/manifest.ts
5
- const DOMAIN = "wasm";
6
- const DEP_KEY = "wasmHandlers";
7
- const t = toolLookup(wasmTools);
8
- const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
9
- async function ensure(ctx) {
10
- const { CodeCollector } = await import("./modules-C184v-S9.mjs").then((n) => n.t);
11
- const { WasmToolHandlers } = await import("./wasm-DQTnHDs4.mjs");
12
- if (!ctx.collector) {
13
- ctx.collector = new CodeCollector(ctx.config.puppeteer);
14
- ctx.registerCaches();
15
- }
16
- if (!ctx.wasmHandlers) ctx.wasmHandlers = new WasmToolHandlers(ctx.collector);
17
- return ctx.wasmHandlers;
18
- }
19
- const manifest = {
20
- kind: "domain-manifest",
21
- version: 1,
22
- domain: DOMAIN,
23
- depKey: DEP_KEY,
24
- profiles: ["full"],
25
- ensure,
26
- registrations: [
27
- {
28
- tool: t("wasm_dump"),
29
- domain: DOMAIN,
30
- bind: b((h, a) => h.handleWasmDump(a))
31
- },
32
- {
33
- tool: t("wasm_disassemble"),
34
- domain: DOMAIN,
35
- bind: b((h, a) => h.handleWasmDisassemble(a))
36
- },
37
- {
38
- tool: t("wasm_decompile"),
39
- domain: DOMAIN,
40
- bind: b((h, a) => h.handleWasmDecompile(a))
41
- },
42
- {
43
- tool: t("wasm_inspect_sections"),
44
- domain: DOMAIN,
45
- bind: b((h, a) => h.handleWasmInspectSections(a))
46
- },
47
- {
48
- tool: t("wasm_offline_run"),
49
- domain: DOMAIN,
50
- bind: b((h, a) => h.handleWasmOfflineRun(a))
51
- },
52
- {
53
- tool: t("wasm_optimize"),
54
- domain: DOMAIN,
55
- bind: b((h, a) => h.handleWasmOptimize(a))
56
- },
57
- {
58
- tool: t("wasm_vmp_trace"),
59
- domain: DOMAIN,
60
- bind: b((h, a) => h.handleWasmVmpTrace(a))
61
- },
62
- {
63
- tool: t("wasm_memory_inspect"),
64
- domain: DOMAIN,
65
- bind: b((h, a) => h.handleWasmMemoryInspect(a))
66
- }
67
- ]
68
- };
69
- //#endregion
70
- export { manifest as default };
@@ -1,38 +0,0 @@
1
- import { n as toolLookup, t as ensureBrowserCore } from "./registry-D-6e18lB.mjs";
2
- import { n as getDep, t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
3
- import { n as hookPresetTools, t as aiHookTools } from "./definitions-BMfYXoNC.mjs";
4
- //#region src/server/domains/hooks/manifest.ts
5
- const DOMAIN = "hooks";
6
- const DEP_KEY = "aiHookHandlers";
7
- const DEP_KEY_PRESET = "hookPresetHandlers";
8
- const t = toolLookup([...aiHookTools, ...hookPresetTools]);
9
- const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
10
- async function ensure(ctx) {
11
- const { AIHookToolHandlers, HookPresetToolHandlers } = await import("./hooks-CzCWByww.mjs");
12
- await ensureBrowserCore(ctx);
13
- if (!ctx.aiHookHandlers || !ctx.hookPresetHandlers) {
14
- if (!ctx.aiHookHandlers) ctx.aiHookHandlers = new AIHookToolHandlers(ctx.pageController);
15
- if (!ctx.hookPresetHandlers) ctx.hookPresetHandlers = new HookPresetToolHandlers(ctx.pageController);
16
- }
17
- return ctx.aiHookHandlers;
18
- }
19
- const manifest = {
20
- kind: "domain-manifest",
21
- version: 1,
22
- domain: DOMAIN,
23
- depKey: DEP_KEY,
24
- secondaryDepKeys: ["hookPresetHandlers"],
25
- profiles: ["full"],
26
- ensure,
27
- registrations: [{
28
- tool: t("ai_hook"),
29
- domain: DOMAIN,
30
- bind: b((h, a) => h.handleAIHook(a))
31
- }, {
32
- tool: t("hook_preset"),
33
- domain: DOMAIN,
34
- bind: (deps) => (args) => getDep(deps, DEP_KEY_PRESET).handleHookPreset(args)
35
- }]
36
- };
37
- //#endregion
38
- export { manifest as default };
@@ -1,68 +0,0 @@
1
- import { n as toolLookup, t as ensureBrowserCore } from "./registry-D-6e18lB.mjs";
2
- import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
3
- import { t as workflowToolDefinitions } from "./definitions-Cke7zEb8.mjs";
4
- //#region src/server/domains/workflow/manifest.ts
5
- const DOMAIN = "workflow";
6
- const DEP_KEY = "workflowHandlers";
7
- const t = toolLookup(workflowToolDefinitions);
8
- const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
9
- async function ensure(ctx) {
10
- const { WorkflowHandlers } = await import("./workflow-f3xJOcjx.mjs");
11
- await ensureBrowserCore(ctx);
12
- const browserHandlers = ctx.handlerDeps.browserHandlers;
13
- const advancedHandlers = ctx.handlerDeps.advancedHandlers;
14
- if (!ctx.workflowHandlers) ctx.workflowHandlers = new WorkflowHandlers({
15
- browserHandlers,
16
- advancedHandlers,
17
- serverContext: ctx
18
- });
19
- return ctx.workflowHandlers;
20
- }
21
- const manifest = {
22
- kind: "domain-manifest",
23
- version: 1,
24
- domain: DOMAIN,
25
- depKey: DEP_KEY,
26
- profiles: ["workflow", "full"],
27
- ensure,
28
- workflowRule: {
29
- patterns: [/(workflow|extension|run)/i, /(工作流|扩展|运行)/i],
30
- priority: 95,
31
- tools: ["run_extension_workflow", "list_extension_workflows"],
32
- hint: "Extension workflow: list available workflows -> run the best matching workflow"
33
- },
34
- registrations: [
35
- {
36
- tool: t("page_script_register"),
37
- domain: DOMAIN,
38
- bind: b((h, a) => h.handlePageScriptRegister(a))
39
- },
40
- {
41
- tool: t("page_script_run"),
42
- domain: DOMAIN,
43
- bind: b((h, a) => h.handlePageScriptRun(a))
44
- },
45
- {
46
- tool: t("api_probe_batch"),
47
- domain: DOMAIN,
48
- bind: b((h, a) => h.handleApiProbeBatch(a))
49
- },
50
- {
51
- tool: t("js_bundle_search"),
52
- domain: DOMAIN,
53
- bind: b((h, a) => h.handleJsBundleSearch(a))
54
- },
55
- {
56
- tool: t("list_extension_workflows"),
57
- domain: DOMAIN,
58
- bind: b((h) => h.handleListExtensionWorkflows())
59
- },
60
- {
61
- tool: t("run_extension_workflow"),
62
- domain: DOMAIN,
63
- bind: b((h, a) => h.handleRunExtensionWorkflow(a))
64
- }
65
- ]
66
- };
67
- //#endregion
68
- export { manifest as default };