@jshookmcp/jshook 0.3.2 → 0.3.4
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.
- package/README.md +19 -4
- package/README.zh.md +19 -4
- package/dist/AntiCheatDetector-B-mz4DK_.mjs +1 -0
- package/dist/{BrowserSessionCoordinator-BJ-HOxo0.mjs → BrowserSessionCoordinator-Cdic8FsH.mjs} +1 -1
- package/dist/CodeAnalyzerDataFlow-a-NkwcaG.mjs +2 -0
- package/dist/CodeInjector-B099WO6x.mjs +1 -0
- package/dist/ConsoleMonitor-BZRqrBH-.mjs +306 -0
- package/dist/CpuEngine-BC8jayy9.mjs +1 -0
- package/dist/DartAotExecutor-B7WVTKsd.mjs +1 -0
- package/dist/DartAotLoader-BxdhW-K2.mjs +2 -0
- package/dist/DarwinAPI-DzojdfjF.mjs +1 -0
- package/dist/DetailedDataManager-Dgh402Gp.mjs +5 -0
- package/dist/ExecutionSandbox-QbWQmzuC.mjs +45 -0
- package/dist/ExtensionManager.tools-D3h818Xs.mjs +1 -0
- package/dist/FingerprintManager-D9Zlr6be.mjs +1 -0
- package/dist/HardwareBreakpoint-C_lJ22bj.mjs +1 -0
- package/dist/HeapAnalyzer-bJbLvzp6.mjs +1 -0
- package/dist/HookPatternScanner-yx4vJ9sd.mjs +1 -0
- package/dist/InstrumentationSession-Cv1wikLA.mjs +1 -0
- package/dist/IntegrityScanner-BB7sw-SA.mjs +1 -0
- package/dist/JScramblerDeobfuscator-NVR5VatT.mjs +1 -0
- package/dist/MCPServer.activation.ttl-C2wOCMLV.mjs +1 -0
- package/dist/MCPServer.search.helpers-DlassAew.mjs +2 -0
- package/dist/MCPServer.search.validation-DnifPCCv.mjs +1 -0
- package/dist/MemoryController-CCsGuGJS.mjs +2 -0
- package/dist/{MemoryScanSession-DG_F-PjE.mjs → MemoryScanSession-BZ2A9Ph1.mjs} +1 -1
- package/dist/MemoryScanner-DAxsq7Sx.mjs +1 -0
- package/dist/NativeMemoryManager.impl-BIJzXMqH.mjs +1 -0
- package/dist/{NativeMemoryManager.utils-BHy1P_jM.mjs → NativeMemoryManager.utils-CMoul2an.mjs} +1 -1
- package/dist/PEAnalyzer-CB_kaTis.mjs +1 -0
- package/dist/PackerDeobfuscator-BpwGjxDL.mjs +7 -0
- package/dist/PointerChainEngine-B6SYv6ZM.mjs +1 -0
- package/dist/ProcessRegistry-C5W1Tkn9.mjs +1 -0
- package/dist/{handlers-mPFiNPe8.mjs → QuickJSSandbox-CIde-jzG.mjs} +2 -5
- package/dist/{ResponseBuilder-BfWP-uaT.mjs → ResponseBuilder-BLicSCjn.mjs} +1 -1
- package/dist/ReverseEvidenceGraph-DJzk0GQz.mjs +2 -0
- package/dist/ServerRuntimeState-DGXNv8Ji.mjs +1 -0
- package/dist/Speedhack-MGoeq1ZS.mjs +1 -0
- package/dist/StructureAnalyzer-CCTWAXR3.mjs +2 -0
- package/dist/ToolHandlerMap-C40EmuLT.mjs +1 -0
- package/dist/{ToolProbe-C7ZU2x7M.mjs → ToolProbe-B02GC3ZY.mjs} +1 -1
- package/dist/ToolRegistry-CzqQxFqf.mjs +1 -0
- package/dist/ToolRouter.policy-Bgb3S8jc.mjs +4 -0
- package/dist/TraceRecorder-BfeCTQUj.mjs +407 -0
- package/dist/VMDeobfuscator-BHtkV850.mjs +1 -0
- package/dist/Win32API-G7QPyckq.mjs +1 -0
- package/dist/{Win32Debug-CYrIQBvr.mjs → Win32Debug-6yzmtv5b.mjs} +1 -1
- package/dist/allocation-track-CiI-CnaI.mjs +1 -0
- package/dist/analysis-CojUzwX-.mjs +27 -0
- package/dist/antidebug-CgU84TE1.mjs +1 -0
- package/dist/apk-DrPBsOq8.mjs +1 -0
- package/dist/artifactRetention-Bk6fW2uF.mjs +1 -0
- package/dist/artifacts-Bx9GLx4J.mjs +1 -0
- package/dist/ast-bridge-BlOrmVAv.mjs +1 -0
- package/dist/ast-utils-B9E5k_v1.mjs +1 -0
- package/dist/{betterSqlite3-Brtq-SIQ.mjs → betterSqlite3-Bdo_ifuJ.mjs} +1 -1
- package/dist/binary-instrument-DiE1BP0x.mjs +12 -0
- package/dist/boringssl-inspector-C6M3sOga.mjs +2 -0
- package/dist/browser-QDUu5ML9.mjs +29 -0
- package/dist/{handlers-yo_xYzT8.mjs → canvas-g5kmLdY-.mjs} +1098 -24
- package/dist/{capabilities-CyXuKUl1.mjs → capabilities-DwzyxL2w.mjs} +1 -1
- package/dist/cdp-session-Dy4OwMOP.mjs +1 -0
- package/dist/collector-Cld4i-E4.mjs +1 -0
- package/dist/config-5ODJ3Aj0.mjs +3 -0
- package/dist/constants-nvsLpSri.mjs +1 -0
- package/dist/coordination-C6y2gM9O.mjs +98 -0
- package/dist/coverage-and-block--cWjjEe5.mjs +1 -0
- package/dist/dart-inspector-D4IKxZ6u.mjs +0 -0
- package/dist/debugger-C2SpiXoO.mjs +1 -0
- package/dist/definitions-0mtilYzG.mjs +1 -0
- package/dist/definitions-9csunmeX.mjs +1 -0
- package/dist/definitions-B11MudW_.mjs +1 -0
- package/dist/definitions-BKpRDjcI.mjs +1 -0
- package/dist/definitions-BXE3H4re.mjs +1 -0
- package/dist/definitions-BlPHe5DX.mjs +1 -0
- package/dist/definitions-Bob4XMxI.mjs +27 -0
- package/dist/definitions-BpIQN2nm.mjs +1 -0
- package/dist/definitions-BvolWeSu.mjs +1 -0
- package/dist/definitions-C-6j3Ejl.mjs +1 -0
- package/dist/definitions-C-AdFfFu.mjs +1 -0
- package/dist/definitions-CArdw_9T.mjs +1 -0
- package/dist/definitions-CCvIcRrT.mjs +1 -0
- package/dist/definitions-CJPE5PIl.mjs +1 -0
- package/dist/definitions-CbqeW06u.mjs +1 -0
- package/dist/definitions-Cexmkypg.mjs +1 -0
- package/dist/definitions-D1dxl8qt.mjs +1 -0
- package/dist/definitions-D3uT-ZbU.mjs +1 -0
- package/dist/definitions-DtOY5iUc.mjs +1 -0
- package/dist/{definitions-DxFNRQNK2.mjs → definitions-DvrYdDCJ2.mjs} +1 -1
- package/dist/{definitions-Cenu6mxo.mjs → definitions-aeRd5DAR.mjs} +1 -1
- package/dist/definitions-ihxOqOC4.mjs +1 -0
- package/dist/deopt-trace-qnAcC931.mjs +17 -0
- package/dist/disasm-DoxSucGp.mjs +1 -0
- package/dist/dumpsys-parser-Du-5ruEe.mjs +2 -0
- package/dist/encoding-UMtwgy4M.mjs +2 -0
- package/dist/ensure-browser-core-BP70x0TB.mjs +285 -0
- package/dist/factory-BeND77hf.mjs +2 -0
- package/dist/graphql-CF7QKJME.mjs +68 -0
- package/dist/grpc-raw-Dp7ps2sv.mjs +1 -0
- package/dist/handlers--qCl9vNv.mjs +1 -0
- package/dist/handlers-BHIu1LqA.mjs +1 -0
- package/dist/{antidebug-7L3ygj_9.mjs → handlers-BQ4K8Jbr.mjs} +2 -2
- package/dist/handlers-BxQv-wtf.mjs +8 -0
- package/dist/handlers-ByYG27-5.mjs +1 -0
- package/dist/handlers-C0I9-BtX.mjs +5 -0
- package/dist/handlers-CL0Iokmw.mjs +1 -0
- package/dist/handlers-CNbhIdSK.mjs +4 -0
- package/dist/handlers-CnTTSJFs.mjs +109 -0
- package/dist/handlers-CoDx6akJ2.mjs +49 -0
- package/dist/{handlers-0yKLRIfo.mjs → handlers-DASJI0Pn.mjs} +1 -1
- package/dist/handlers-DRKMaA-_.mjs +74 -0
- package/dist/handlers-Dalu0olz.mjs +2 -0
- package/dist/handlers-KY0g31ny.mjs +9 -0
- package/dist/handlers-oGo60aVv.mjs +1 -0
- package/dist/handlers.impl-BTXLw6Qc.mjs +1 -0
- package/dist/heap-sampling-BqdiU-5j.mjs +1 -0
- package/dist/{hooks-D4XLfgtV.mjs → hooks-COK3t5rT.mjs} +52 -33
- package/dist/index.mjs +11 -11
- package/dist/logger-BGCcd-jJ.mjs +1 -0
- package/dist/macro-nUYUjKNZ.mjs +2 -0
- package/dist/maintenance-CfnE7ZKU.mjs +4 -0
- package/dist/manifest-7EOTUc0D.mjs +1 -0
- package/dist/manifest-B5ujuQmf.mjs +1 -0
- package/dist/manifest-BErXl3zn.mjs +1 -0
- package/dist/manifest-BKA-mD3J.mjs +1 -0
- package/dist/manifest-BUXj23bX.mjs +1 -0
- package/dist/manifest-BfXt9cau.mjs +1 -0
- package/dist/manifest-Bx-tpURK.mjs +1 -0
- package/dist/manifest-C0owVAdq.mjs +1 -0
- package/dist/manifest-C5XqYc9o.mjs +1 -0
- package/dist/manifest-CVKzLjsA.mjs +1 -0
- package/dist/manifest-CaeFjdhj.mjs +1 -0
- package/dist/manifest-CegBgip0.mjs +1 -0
- package/dist/manifest-CoJHqlgS.mjs +1 -0
- package/dist/manifest-D0dbtDqd.mjs +1 -0
- package/dist/manifest-D5Gr8ujd.mjs +12 -0
- package/dist/manifest-D82z-5og.mjs +1 -0
- package/dist/manifest-DA2afIwh.mjs +1 -0
- package/dist/manifest-DAbiFP5o.mjs +1 -0
- package/dist/manifest-DEY0s1O72.mjs +1 -0
- package/dist/manifest-DTOqNqiA.mjs +1 -0
- package/dist/manifest-DZ6ELNgX.mjs +1 -0
- package/dist/manifest-DjHkjddT.mjs +1 -0
- package/dist/manifest-DocA_itf2.mjs +1 -0
- package/dist/manifest-Dpnhvfq0.mjs +1 -0
- package/dist/manifest-DucPMG_a.mjs +1 -0
- package/dist/manifest-Dw5yYEac.mjs +1 -0
- package/dist/manifest-Ic_Cg66S.mjs +1 -0
- package/dist/manifest-JHaG6GMN.mjs +1 -0
- package/dist/manifest-QdkIzmYM.mjs +1 -0
- package/dist/manifest-YZqaCe25.mjs +1 -0
- package/dist/manifest-f0lUeXwq.mjs +1 -0
- package/dist/manifest-h-Ebisf8.mjs +1 -0
- package/dist/manifest-oOfTymBS.mjs +1 -0
- package/dist/manifest-qXqrO6KC.mjs +2 -0
- package/dist/mapsParser-DrJoeC0c.mjs +1 -0
- package/dist/modules-CC_ADmwi.mjs +333 -0
- package/dist/mojo-ipc-kVztXYw-.mjs +140 -0
- package/dist/native-D9ouskXO.mjs +961 -0
- package/dist/native-bridge-Dzd7hYoq.mjs +1 -0
- package/dist/network-C5Y-S87J.mjs +7 -0
- package/dist/one-gadget-CiWFE17F.mjs +1 -0
- package/dist/outputPaths-CHtELDyi.mjs +1 -0
- package/dist/parse-args-B6dwWc9k.mjs +1 -0
- package/dist/platform-BIXgJaM3.mjs +94 -0
- package/dist/process-aDIfLC0v.mjs +6 -0
- package/dist/proxy-DsHsQ1I4.mjs +2 -0
- package/dist/registry-7h8jJ9y9.mjs +1 -0
- package/dist/{registry-DH4sc1dt.mjs → registry-DJDnkQW2.mjs} +1 -1
- package/dist/response-R8ghbZSb.mjs +1 -0
- package/dist/retry-policy-DtYv0kDi.mjs +1 -0
- package/dist/reverseEngineeringConfig-BhZLOa3C.mjs +1 -0
- package/dist/safeOutput-Dt4mfjXA.mjs +1 -0
- package/dist/search-defaults-BBRJNAzC.mjs +1 -0
- package/dist/server/plugin-api.mjs +1 -1
- package/dist/server/search/EmbeddingWorker.d.mts +1 -0
- package/dist/server/search/EmbeddingWorker.mjs +1 -0
- package/dist/shared-BKtWZDGN.mjs +1 -0
- package/dist/sourcemap-2VIeVeKw.mjs +3 -0
- package/dist/streaming-DkpE3GGU.mjs +15 -0
- package/dist/syscall-DGZoYM_U.mjs +1 -0
- package/dist/transform-BJqsBC_-.mjs +105 -0
- package/dist/turbofan-graph-CbGHNVtl.mjs +1 -0
- package/dist/turbofan-inspect--NdCuYXi.mjs +23 -0
- package/dist/types-CWSvzmIh.mjs +1 -0
- package/dist/v8-inspector-CTJo08-K.mjs +297 -0
- package/dist/wasm-DX4Qm2Vs.mjs +235 -0
- package/dist/weakrefs-inspect-CnhaF-rN.mjs +57 -0
- package/dist/webgpu-D4-DxbxZ.mjs +6 -0
- package/dist/workflow-DHktRNF2.mjs +108 -0
- package/package.json +33 -27
- package/dist/AntiCheatDetector-B6d4Qe9D.mjs +0 -1
- package/dist/CodeInjector-Cll_7bLJ.mjs +0 -1
- package/dist/ConsoleMonitor-CxDJV15E.mjs +0 -306
- package/dist/DOMInspector-C19J4zeq.mjs +0 -95
- package/dist/DarwinAPI-ZfQdpLNI.mjs +0 -1
- package/dist/DetailedDataManager-DmQ1LT-W.mjs +0 -1
- package/dist/ExtensionManager-BD724zkO.mjs +0 -1
- package/dist/ExtensionManager.tools-oVMJgPcN.mjs +0 -1
- package/dist/FingerprintManager-DT0EAUEo.mjs +0 -1
- package/dist/HardwareBreakpoint-BUfPdp0f.mjs +0 -1
- package/dist/HeapAnalyzer-B_aqY8oj.mjs +0 -1
- package/dist/InstrumentationSession-D_G1ZPyd.mjs +0 -1
- package/dist/MCPServer.search.handlers.domain-BbS-6LnX.mjs +0 -1
- package/dist/MemoryController-X1XNSn1n.mjs +0 -2
- package/dist/MemoryScanner-g1_L1ub5.mjs +0 -1
- package/dist/NativeMemoryManager.impl-DniBe2wf.mjs +0 -1
- package/dist/NetworkMonitor-B_-au6aV.mjs +0 -185
- package/dist/PEAnalyzer-yWQaGrcx.mjs +0 -1
- package/dist/PageController-Dfsm1_o7.mjs +0 -1
- package/dist/PointerChainEngine-BhCUkmxY.mjs +0 -1
- package/dist/PrerequisiteError-BjCQA-gK.mjs +0 -1
- package/dist/ProcessRegistry-C-bN48oR.mjs +0 -1
- package/dist/ReverseEvidenceGraph-BhSYYdiI.mjs +0 -2
- package/dist/ScriptManager-LWGPTdvD.mjs +0 -7
- package/dist/ServerRuntimeState-D2bWHqEE.mjs +0 -1
- package/dist/Speedhack-yseDPSZ9.mjs +0 -1
- package/dist/StructureAnalyzer-C5lpuZkg.mjs +0 -2
- package/dist/ToolCatalog-CYdD9F5f.mjs +0 -1
- package/dist/ToolRegistry-C5oB8KP8.mjs +0 -1
- package/dist/ToolRouter.policy-CfhJczkt.mjs +0 -4
- package/dist/TraceRecorder-BiJWBXHX.mjs +0 -272
- package/dist/VersionDetector-CHT36Az0.mjs +0 -9
- package/dist/Win32API-eUCF57l_.mjs +0 -1
- package/dist/WorkflowEngine-D876meOO.mjs +0 -1
- package/dist/analysis-D4swdMvq.mjs +0 -6
- package/dist/apk-packer-BqXcInnX.mjs +0 -1
- package/dist/artifactRetention-BCPQASm7.mjs +0 -1
- package/dist/artifacts-CkodUM4j.mjs +0 -1
- package/dist/binary-instrument-DU7V6TUM.mjs +0 -7
- package/dist/binary-secrets-PdMVoyt0.mjs +0 -1
- package/dist/boringssl-inspector-BBaJwwkU.mjs +0 -2
- package/dist/browser-Qqco2rOT.mjs +0 -11
- package/dist/collector-Bpl6qy2L.mjs +0 -1
- package/dist/constants-BYj8Xek8.mjs +0 -1
- package/dist/coordination-CWXW1o8K.mjs +0 -1
- package/dist/dart-inspector-7AkPeZ_Q.mjs +0 -0
- package/dist/debugger-DyALjYMk.mjs +0 -1
- package/dist/definitions-BWxBke3r.mjs +0 -1
- package/dist/definitions-BYwATKc-.mjs +0 -1
- package/dist/definitions-B_83XfNQ.mjs +0 -1
- package/dist/definitions-Bf3H1EwV.mjs +0 -1
- package/dist/definitions-BftdXgXI.mjs +0 -1
- package/dist/definitions-Bio5XJYy.mjs +0 -1
- package/dist/definitions-C3qNgSn1.mjs +0 -1
- package/dist/definitions-CB6vmOer.mjs +0 -1
- package/dist/definitions-CMZRSy3k.mjs +0 -1
- package/dist/definitions-CQd7yCQH.mjs +0 -1
- package/dist/definitions-CT8ln6GQ.mjs +0 -1
- package/dist/definitions-D4g-MS10.mjs +0 -1
- package/dist/definitions-D5wl_8HN.mjs +0 -1
- package/dist/definitions-DAQm1Xar.mjs +0 -1
- package/dist/definitions-DP1vgxEY.mjs +0 -1
- package/dist/definitions-Ibci7e_L.mjs +0 -1
- package/dist/definitions-OeLvmlQy.mjs +0 -1
- package/dist/definitions-RZYGD_Ey.mjs +0 -1
- package/dist/definitions-Tls8c0A0.mjs +0 -1
- package/dist/definitions-bybDvnG0.mjs +0 -26
- package/dist/definitions-l7TjdE6V.mjs +0 -1
- package/dist/encoding-ycOaz8Vr.mjs +0 -2
- package/dist/ensure-browser-core-DxWC-NTp.mjs +0 -1
- package/dist/factory-CKr4fAE1.mjs +0 -1
- package/dist/flat-target-session-DvcQX7J5.mjs +0 -1
- package/dist/graphql-B2TiPEow.mjs +0 -62
- package/dist/handlers-8zN_vBIz.mjs +0 -1
- package/dist/handlers-B62K4FTc.mjs +0 -1
- package/dist/handlers-BpDlVVVU.mjs +0 -1
- package/dist/handlers-CMJK7m1c.mjs +0 -31
- package/dist/handlers-D2ZOul9p.mjs +0 -54
- package/dist/handlers-D5E40ssn.mjs +0 -5
- package/dist/handlers-DGbdQAgD.mjs +0 -4
- package/dist/handlers-DHO3rjsW.mjs +0 -1
- package/dist/handlers-FJ80VzUI.mjs +0 -2
- package/dist/handlers-VHWrxbM_.mjs +0 -1
- package/dist/handlers-l8QIKqBj.mjs +0 -2
- package/dist/handlers.impl-D9Hh8Bgl.mjs +0 -1
- package/dist/jadx-search-B_Yse0Zh.mjs +0 -5
- package/dist/logger-sBC6IdRT.mjs +0 -1
- package/dist/maintenance-BUpIukhg.mjs +0 -1
- package/dist/manifest-0Jpt_AQa.mjs +0 -1
- package/dist/manifest-B3fZbSWR.mjs +0 -1
- package/dist/manifest-B7NB2rh2.mjs +0 -1
- package/dist/manifest-BDi4nbH1.mjs +0 -1
- package/dist/manifest-BLDfkE7n.mjs +0 -1
- package/dist/manifest-BcXbB4gf.mjs +0 -1
- package/dist/manifest-Bdnc_vrc.mjs +0 -1
- package/dist/manifest-BuYKgCnp.mjs +0 -1
- package/dist/manifest-CBfNnGPV.mjs +0 -1
- package/dist/manifest-CPS1Xv69.mjs +0 -1
- package/dist/manifest-CQH9FhwI.mjs +0 -1
- package/dist/manifest-CRryuZF4.mjs +0 -1
- package/dist/manifest-CctIumog.mjs +0 -1
- package/dist/manifest-CvTe5ZGV2.mjs +0 -1
- package/dist/manifest-D-5GH0DV.mjs +0 -1
- package/dist/manifest-D3Ssf3IC.mjs +0 -1
- package/dist/manifest-D5ck3NvC.mjs +0 -1
- package/dist/manifest-D9jUUJAu.mjs +0 -1
- package/dist/manifest-DCx6w2XV.mjs +0 -1
- package/dist/manifest-DG19q-Ld.mjs +0 -1
- package/dist/manifest-DLMlD0Zc.mjs +0 -1
- package/dist/manifest-DYpn8w_h.mjs +0 -1
- package/dist/manifest-DYzWI8Xs.mjs +0 -1
- package/dist/manifest-D_obs5F4.mjs +0 -1
- package/dist/manifest-DujQqEQR.mjs +0 -2
- package/dist/manifest-DwL2ik8P.mjs +0 -1
- package/dist/manifest-ItF5P8A12.mjs +0 -1
- package/dist/manifest-KZphqIyX.mjs +0 -1
- package/dist/manifest-LG42zPLY2.mjs +0 -1
- package/dist/manifest-LLdI5m4T.mjs +0 -1
- package/dist/manifest-QYbQXJn0.mjs +0 -1
- package/dist/manifest-RcpX_MyZ.mjs +0 -123
- package/dist/manifest-YgVd8Sgz.mjs +0 -1
- package/dist/manifest-Zy7Odg5J.mjs +0 -1
- package/dist/manifest-ff1H7Pdp.mjs +0 -1
- package/dist/manifest-iuhF6pTL2.mjs +0 -1
- package/dist/manifest-nXHmtMSp2.mjs +0 -1
- package/dist/manifest-xWfu6iLo.mjs +0 -1
- package/dist/manifest-yC16OhL2.mjs +0 -1
- package/dist/manifest-ztWJoXy4.mjs +0 -1
- package/dist/matchesWildcardPattern-BAG6LvX5.mjs +0 -1
- package/dist/modules-BPBcSaM-.mjs +0 -333
- package/dist/mojo-ipc-BhwsdVUW.mjs +0 -9
- package/dist/native-j8l473zn.mjs +0 -961
- package/dist/network-T0VRwNPd.mjs +0 -7
- package/dist/outputPaths-B4Ic4RZh.mjs +0 -2
- package/dist/parse-args-Bw413PlW.mjs +0 -1
- package/dist/platform-CzaQtISh.mjs +0 -93
- package/dist/playwright-cdp-fallback-DqFdx9-s.mjs +0 -1
- package/dist/process-CWhsCWrf.mjs +0 -2
- package/dist/proxy-DZFlDsG3.mjs +0 -2
- package/dist/renderer-pid-9tJnZ_9N.mjs +0 -1
- package/dist/response-C7rKQst4.mjs +0 -1
- package/dist/search-defaults-lYBVn_3L.mjs +0 -1
- package/dist/shared-state-board-BSjXLUV1.mjs +0 -1
- package/dist/sourcemap-Dh3Ai_ur.mjs +0 -1
- package/dist/streaming-BcJ0B6ao.mjs +0 -1
- package/dist/transform-DOxzeWPB.mjs +0 -103
- package/dist/types-D9EiE5o9.mjs +0 -1
- package/dist/wasm-CZ_HTfKR.mjs +0 -174
- package/dist/webcrack-C1iYG_EX.mjs +0 -46
- package/dist/workflow-BdwQmARn.mjs +0 -101
- /package/dist/{CacheAdapters-CsNtQIR8.mjs → CacheAdapters-BlDrQg8f.mjs} +0 -0
- /package/dist/{EventBus-DL8iLA09.mjs → EventBus-Cm-t-B65.mjs} +0 -0
- /package/dist/{EvidenceGraphBridge-BtbwXsLC.mjs → EvidenceGraphBridge-DBDc0wUA.mjs} +0 -0
- /package/dist/{HookGeneratorBuilders.core.generators.storage-DzD6dIJd.mjs → HookGeneratorBuilders.core.generators.storage-CWaWpOHa.mjs} +0 -0
- /package/dist/{RingBuffer-Dm54ELKT.mjs → RingBuffer-B6RTHmij.mjs} +0 -0
- /package/dist/{StealthVerifier-BmcxfwSF.mjs → StealthVerifier-DMBrtkhN.mjs} +0 -0
- /package/dist/{ToolError-DWU_z7gp.mjs → ToolError-g3rjWzhx.mjs} +0 -0
- /package/dist/{authorization-schema-BOFwSXUN.mjs → authorization-schema-Jtikc5Yt.mjs} +0 -0
- /package/dist/{bind-helpers-m2U8glkF.mjs → bind-helpers-D0mGAOof.mjs} +0 -0
- /package/dist/{concurrency-DCr8WQ2M.mjs → concurrency-Dehnw4JC.mjs} +0 -0
- /package/dist/{evidence-graph-bridge-CV_UdYqj.mjs → evidence-graph-bridge-eT9icP6a.mjs} +0 -0
- /package/dist/{formatAddress-vLA_hOJt.mjs → formatAddress-DAcw4Ckg.mjs} +0 -0
- /package/dist/{chunk-C_pMuVsO.mjs → rolldown-runtime-88NL7fhV.mjs} +0 -0
- /package/dist/{ssrf-policy-CsIJGkpd.mjs → ssrf-policy-B72vdy23.mjs} +0 -0
- /package/dist/{tool-builder-qif8M9-K.mjs → tool-builder-CpLh-UQd.mjs} +0 -0
- /package/dist/{types-Fz69RzbZ.mjs → types-BzPBzmVB.mjs} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";import{t}from"./definitions-aeRd5DAR.mjs";const n=[e(`debugger_lifecycle`,e=>e.desc(`Enable or disable the CDP debugger session.`).enum(`action`,[`enable`,`disable`],`Action to perform`).required(`action`).idempotent()),e(`debugger_pause`,e=>e.desc(`Pause execution at the next statement.`)),e(`debugger_resume`,e=>e.desc(`Resume execution.`)),e(`debugger_run_to_location`,e=>e.desc(`Run execution until a source location by setting a temporary code breakpoint, resuming, waiting for pause, and removing the breakpoint.`).string(`url`,`Script URL (alternative to scriptId)`).string(`scriptId`,`Script ID (alternative to url)`).number(`lineNumber`,`Line number 0-based`,{minimum:0}).number(`columnNumber`,`Column number 0-based`,{minimum:0}).string(`condition`,`Optional conditional expression for the temporary breakpoint`).number(`timeout`,`Timeout in milliseconds (default: 30000)`,{default:3e4,minimum:1e3,maximum:12e4}).required(`lineNumber`)),e(`debugger_step`,e=>e.desc(`Step execution: into (enter next call), over (skip next call), out (exit current function).`).enum(`direction`,[`into`,`over`,`out`],`Step direction`).required(`direction`)),e(`breakpoint`,e=>e.desc(`Manage breakpoints: code (line/script), function-name, XHR (URL pattern), event listener, event category, and exception breakpoints.
|
|
2
|
+
|
|
3
|
+
Actions:
|
|
4
|
+
- set: Create a breakpoint. Type determines required params.
|
|
5
|
+
- remove: Remove a breakpoint by ID.
|
|
6
|
+
- list: List active breakpoints of the given type.
|
|
7
|
+
|
|
8
|
+
Types & params:
|
|
9
|
+
- code: lineNumber (required), scriptId?, columnNumber?, condition?, logMessage? (logpoint: logs without pausing)
|
|
10
|
+
- function: functionName (required for set) — resolves via globalThis lookup and breaks whenever that function is called
|
|
11
|
+
- xhr: urlPattern (required for set)
|
|
12
|
+
- event: eventName (required for set), targetName?
|
|
13
|
+
- event_category: category (required for set)
|
|
14
|
+
- exception: state (required for set)`).enum(`action`,[`set`,`remove`,`list`],`Breakpoint operation`).enum(`type`,[`code`,`function`,`xhr`,`event`,`event_category`,`exception`],`Breakpoint type (default: code)`,{default:`code`}).string(`url`,`Script URL (type=code, alternative to scriptId)`).string(`scriptId`,`Script ID (type=code)`).number(`lineNumber`,`Line number 0-based (type=code, action=set)`).number(`columnNumber`,`Column number 0-based (type=code)`).string(`condition`,`Conditional expression (type=code)`).string(`logMessage`,`Log message template for logpoints e.g. "x={x}" (type=code, logs without pausing)`).string(`functionName`,`Function name to break on (used with type=function). Resolved via globalThis lookup, breaks on every call to that function.`).string(`urlPattern`,`URL pattern with wildcards (type=xhr, action=set)`).string(`eventName`,`Event name e.g. "click" (type=event, action=set)`).string(`targetName`,`Target name e.g. "WebSocket" (type=event)`).enum(`category`,[`mouse`,`keyboard`,`timer`,`websocket`],`Event category (type=event_category)`).enum(`state`,[`none`,`uncaught`,`all`],`Exception pause state (type=exception)`).string(`breakpointId`,`Breakpoint ID (action=remove)`).required(`action`).idempotent()),e(`get_call_stack`,e=>e.desc(`Get the current call stack.`).query()),e(`debugger_evaluate`,e=>e.desc(`Evaluate a JavaScript expression. context="frame" evaluates in the current call frame (requires paused state); context="global" evaluates in the global context (no pause required).`).enum(`context`,[`frame`,`global`],`Evaluation context`,{default:`frame`}).string(`expression`,`JavaScript expression to evaluate`).string(`callFrameId`,`Call frame ID (for context=frame; from get_call_stack, defaults to current frame)`).requiredOpenWorld(`expression`)),e(`debugger_wait_for_paused`,e=>e.desc(`Wait for debugger pause after setting breakpoints.`).number(`timeout`,`Timeout in milliseconds (default: 30000)`,{default:3e4,minimum:1e3,maximum:12e4}).query()),e(`debugger_capture_hit`,e=>e.desc(`Wait for the next debugger pause and capture call stack plus optional top-frame scope variables.`).number(`timeout`,`Timeout in milliseconds (default: 30000)`,{default:3e4,minimum:1e3,maximum:12e4}).boolean(`includeScope`,`Include top-frame scope variables in the capture.`,{default:!0}).boolean(`includeObjectProperties`,`Expand object properties in captured scope variables.`,{default:!1}).number(`maxDepth`,`Maximum object traversal depth for captured scope variables.`,{default:1,minimum:1,maximum:10}).boolean(`skipErrors`,`Skip scope properties that throw during access.`,{default:!0}).query()),e(`debugger_get_paused_state`,e=>e.desc(`Get current paused state and reason.`).query()),e(`debugger_disassemble`,e=>e.desc(`Disassemble V8 bytecode / instructions at the current paused location (or a given scriptId). Resolves the target scriptId automatically from the current paused call frame — useful when paused inside obfuscated/VM code to decide whether to step in. Native bytecode requires V8 natives syntax; set includeSourceFallback to derive a pseudo-bytecode from source when native extraction is unavailable.`).string(`scriptId`,`Script ID (defaults to the current paused top frame)`).string(`callFrameId`,`Call frame ID (defaults to the current paused top frame)`).number(`functionOffset`,`Function offset within the script`).boolean(`includeSourceFallback`,`Derive pseudo-bytecode from source when native extraction unavailable`,{default:!1}).query()),e(`get_object_properties`,e=>e.desc(`Get properties of an object by objectId.`).string(`objectId`,`Object ID (from get_scope_variables)`).required(`objectId`).query()),e(`get_scope_variables_enhanced`,e=>e.desc(`Enhanced scope variable inspection with deep object traversal.`).string(`callFrameId`,`Call frame ID (from get_call_stack, defaults to current frame)`).boolean(`includeObjectProperties`,`Expand object properties recursively (default: false)`,{default:!1}).number(`maxDepth`,`Maximum traversal depth for nested objects (default: 1)`,{default:1,minimum:1,maximum:10}).boolean(`skipErrors`,`Skip properties that throw errors during access (default: true)`,{default:!0}).query()),e(`debugger_session`,e=>e.desc(`Manage debugger sessions. Actions: save (persist current session to file), load (restore session from file/JSON), export (export session as JSON string), list (list saved sessions in ./debugger-sessions/).`).enum(`action`,[`save`,`load`,`export`,`list`],`Session operation`).string(`filePath`,`File path for save/load actions`).string(`sessionData`,`Session JSON string for load action (alternative to filePath)`).object(`metadata`,{},`Optional metadata for save/export actions`).required(`action`))],r=[e(`watch`,e=>e.desc(`Manage watch expressions for monitoring variable values during debugging.
|
|
15
|
+
|
|
16
|
+
Actions:
|
|
17
|
+
- add: Add a watch expression (requires expression)
|
|
18
|
+
- remove: Remove by watchId
|
|
19
|
+
- list: List all watches
|
|
20
|
+
- evaluate_all: Evaluate all enabled watches (optional callFrameId)
|
|
21
|
+
- clear_all: Clear all watches`).enum(`action`,[`add`,`remove`,`list`,`evaluate_all`,`clear_all`],`Watch operation`).string(`expression`,`JavaScript expression to watch (action=add)`).string(`name`,`Friendly name for the watch (action=add)`).string(`watchId`,`Watch expression ID (action=remove)`).string(`callFrameId`,`Call frame ID (action=evaluate_all)`).required(`action`)),e(`blackbox_add`,e=>e.desc(`Blackbox scripts (skip during debugging)
|
|
22
|
+
|
|
23
|
+
Usage:
|
|
24
|
+
- Skip third-party library c...`).string(`urlPattern`,`URL pattern to blackbox (supports wildcards *)`).required(`urlPattern`).idempotent()),e(`blackbox_add_common`,e=>e.desc(`Blackbox all common libraries (one-click)
|
|
25
|
+
|
|
26
|
+
Includes:
|
|
27
|
+
- jquery, react, vue, an...`).idempotent()),e(`blackbox_list`,e=>e.desc(`List script blackbox patterns.`).query())],i=[...n,...r,...t];export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";const t=[e(`proxy_start`,e=>e.desc(`Start the local HTTP/HTTPS interception proxy with optional TLS.`).number(`port`,`Listen port.`,{default:8080}).boolean(`useHttps`,`Enable HTTPS interception.`,{default:!0})),e(`proxy_stop`,e=>e.desc(`Stop the proxy and release all active rules.`).destructive()),e(`proxy_status`,e=>e.desc(`Report proxy status, listen port, and CA certificate path.`).query()),e(`proxy_export_ca`,e=>e.desc(`Read the proxy CA certificate.`).query()),e(`proxy_add_rule`,e=>e.desc(`Add an interception rule: forward, mock_response, redirect, or block.`).string(`action`,`Rule action: forward, mock_response, redirect, or block.`).string(`method`,`HTTP method to match. Use ANY, ALL, or * to match every method.`,{default:`GET`}).string(`urlPattern`,`URL matcher string or regex literal.`).string(`targetUrl`,`Target upstream root URL for redirect (no path; the original request path is preserved). Required when action=redirect.`).number(`mockStatus`,`Response status for mock_response.`,{default:200}).string(`mockBody`,`Response body for mock_response.`).number(`delayMs`,`Inject a delay (milliseconds) before the rule action fires. 0 = no delay.`,{default:0}).object(`forwardOptions`,{transformRequest:{type:`object`,description:`Optional request rewrite applied on passthrough. Mutually exclusive with callback mode (not exposed).`,properties:{replaceMethod:{type:`string`,description:`Replacement HTTP method.`},updateHeaders:{type:`object`,description:`Headers merged into the request; a null value removes the header.`,additionalProperties:{type:[`string`,`null`]}},replaceHeaders:{type:`object`,description:`Headers that completely replace the request headers.`,additionalProperties:{type:`string`}},replaceBody:{type:`string`,description:`String that replaces the request body entirely.`},matchReplaceBody:{type:`array`,description:`Match/replace pairs applied to the request body in order. Each entry is [match, replacement]; match is a plain string or a /pattern/flags regex literal, replacement supports $1-style placeholders.`,items:{type:`array`,minItems:2,maxItems:2,items:[{type:`string`,description:`Plain string or /pattern/flags regex literal.`},{type:`string`,description:`Replacement string (supports $1, $2, ...).`}]}},updateJsonBody:{type:`object`,description:`Object recursively merged into a JSON request body; undefined values remove keys. Requests with invalid JSON fail.`,additionalProperties:!0}}},transformResponse:{type:`object`,description:`Optional response rewrite applied on passthrough.`,properties:{replaceStatus:{type:`integer`,minimum:100,maximum:599,description:`Replacement response status code (100-599).`},updateHeaders:{type:`object`,description:`Headers merged into the response; a null value removes the header.`,additionalProperties:{type:[`string`,`null`]}},replaceHeaders:{type:`object`,description:`Headers that completely replace the response headers.`,additionalProperties:{type:`string`}},replaceBody:{type:`string`,description:`String that replaces the response body entirely.`},matchReplaceBody:{type:`array`,description:`Match/replace pairs applied to the response body in order. Each entry is [match, replacement]; match is a plain string or a /pattern/flags regex literal, replacement supports $1-style placeholders.`,items:{type:`array`,minItems:2,maxItems:2,items:[{type:`string`,description:`Plain string or /pattern/flags regex literal.`},{type:`string`,description:`Replacement string (supports $1, $2, ...).`}]}},updateJsonBody:{type:`object`,description:`Object recursively merged into a JSON response body; undefined values remove keys. Responses with invalid JSON fail.`,additionalProperties:!0}}}},`Forward-only rewrite options. Only honored when action=forward; ignored otherwise. Omit for plain passthrough.`).object(`chainUpstream`,{proxyUrl:{type:`string`,description:`Upstream proxy URL to forward traffic through (e.g., http://proxy:8080, socks5://proxy:1080).`},noProxy:{type:`array`,description:`Hostnames whose traffic should bypass the upstream proxy (e.g., localhost, *.internal).`,items:{type:`string`}},trustedCAs:{type:`array`,description:`CA certificates trusted for TLS connections to the upstream proxy.`,items:{type:`object`,properties:{cert:{type:`string`,description:`PEM certificate string.`},certPath:{type:`string`,description:`Path to a PEM certificate file.`}}}}},`Optional upstream proxy to chain through. Forward/reply traffic is routed via this proxy before reaching the target.`).object(`callbackScript`,{path:{type:`string`,description:`Path to a JS module exporting beforeRequest and/or beforeResponse functions.`}},`Path to a callback script module. The script must export beforeRequest(req) and/or beforeResponse(res, req) functions. Mutually exclusive with transformRequest/transformResponse.`).required(`action`)),e(`proxy_remove_rule`,e=>e.desc(`Remove a single proxy interception rule by endpointId. Returns the removed rule record.`).string(`endpointId`,`The endpointId returned when the rule was added.`).required(`endpointId`)),e(`proxy_list_rules`,e=>e.desc(`List active proxy interception rules tracked by this handler.`).query()),e(`proxy_clear_rules`,e=>e.desc(`Clear active proxy interception rules while keeping the proxy running.`).resettable()),e(`proxy_get_requests`,e=>e.desc(`Read captured proxy request/response metadata, body previews, and timing.`).string(`urlFilter`,`Optional URL filter.`).query()),e(`proxy_clear_logs`,e=>e.desc(`Clear all captured proxy request/response logs.`).resettable()),e(`proxy_setup_adb_device`,e=>e.desc(`Configure an Android device to use the proxy.`).string(`deviceSerial`,`ADB device serial.`))];export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";const t=[e(`platform_capabilities`,e=>e.desc(`Report platform tool backend availability.`).query()),e(`miniapp_pkg_scan`,e=>e.desc(`Scan local directories for miniapp package files.`).string(`searchPath`,`可选。指定扫描根目录;不提供时使用默认路径(MiniApp/Cache 与 MiniApp/Plugin)。`)),e(`miniapp_pkg_unpack`,e=>e.desc(`Unpack a miniapp package.`).string(`inputPath`,`必填。小程序包文件路径。`).string(`outputDir`,`可选。输出目录;不提供时自动生成 artifacts 临时目录。`).required(`inputPath`)),e(`miniapp_pkg_analyze`,e=>e.desc(`Analyze an unpacked miniapp package.`).string(`unpackedDir`,`必填。已解包目录路径。`).required(`unpackedDir`)),e(`asar_extract`,e=>e.desc(`Extract and list files from an Electron ASAR package.`).string(`inputPath`,`必填。asar 文件路径。`).string(`outputDir`,`可选。提取目录;不提供时自动生成 artifacts 临时目录。`).boolean(`listOnly`,`可选。默认 false;true 时仅列出文件清单,不执行提取。`,{default:!1}).required(`inputPath`)),e(`electron_inspect_app`,e=>e.desc(`Analyze Electron app structure: main/renderer entry, preload, IPC.`).string(`appPath`,`Path to Electron app (.exe or app directory)`).required(`appPath`)),e(`electron_scan_userdata`,e=>e.desc(`Scan a directory for Electron JSON userdata files.`).string(`dirPath`,`Directory path to scan for JSON files`).number(`maxFiles`,`可选。最多读取的 JSON 文件数量。默认 20。`,{default:20,minimum:1,maximum:1e4}).number(`maxFileSizeKB`,`可选。单个文件大小上限(KB)。超限文件跳过。默认 1024。`,{default:1024,minimum:1,maximum:102400}).required(`dirPath`).query()),e(`asar_search`,e=>e.desc(`Grep text patterns inside ASAR archive contents without extraction.`).string(`inputPath`,`必填。ASAR 文件路径。`).string(`pattern`,`必填。正则表达式字符串。`).string(`fileGlob`,`可选。文件扩展名过滤。默认 *.js。`,{default:`*.js`}).number(`maxResults`,`可选。最大返回匹配数。默认 100。`,{default:100,minimum:1,maximum:1e4}).required(`inputPath`,`pattern`).query()),e(`electron_check_fuses`,e=>e.desc(`Read Electron fuse states.`).string(`exePath`,`必填。Electron .exe 文件路径。`).required(`exePath`).query()),e(`electron_patch_fuses`,e=>e.desc(`Patch Electron fuse states.`).string(`exePath`,`Electron .exe file path`).enum(`profile`,[`debug`,`custom`],`Patch profile. "debug" enables debug-related fuses. "custom" requires a fuses object.`,{default:`debug`}).object(`fuses`,{},`For profile="custom". Map of fuse names to ENABLE/DISABLE. E.g. {"RunAsNode": "ENABLE"}.`).boolean(`createBackup`,`Create a .exe.bak backup before patching.`,{default:!0}).required(`exePath`).destructive()),e(`v8_bytecode_decompile`,e=>e.desc(`Decompile or extract strings from V8 bytecode files.`).string(`filePath`,`Path to .jsc bytecode file`).required(`filePath`).query()),e(`electron_launch_debug`,e=>e.desc(`Launch Electron with main and renderer CDP ports.`).string(`exePath`,`Electron .exe file path`).number(`mainPort`,`Main process inspect port.`,{default:9229,minimum:1,maximum:65535}).number(`rendererPort`,`Renderer remote debugging port.`,{default:9222,minimum:1,maximum:65535}).array(`args`,{type:`string`},`Extra command-line arguments.`).boolean(`skipFuseCheck`,`Skip fuse status check.`,{default:!1}).boolean(`skipBinaryCheck`,`Skip Electron binary validation. Use when the target exe has been renamed (e.g. Code.exe, Discord.exe).`,{default:!1}).number(`waitMs`,`Milliseconds to wait for CDP ports.`,{default:8e3,minimum:1e3,maximum:12e4}).requiredOpenWorld(`exePath`)),e(`electron_debug_status`,e=>e.desc(`Check status of dual-CDP debug sessions launched by electron_launch_debug.`).string(`sessionId`,`Optional. Check specific session. Omit to list all.`).query()),e(`electron_ipc_sniff`,e=>e.desc(`Monitor Electron IPC messages.`).enum(`action`,[`start`,`dump`,`stop`,`list`,`guide`],`Action to perform.`,{default:`guide`}).number(`port`,`Renderer CDP port (--remote-debugging-port).`,{default:9222,minimum:1,maximum:65535}).string(`sessionId`,`Session ID for dump/stop.`).boolean(`clear`,`Clear captured messages after dump.`,{default:!0}).openWorld()),e(`electron_verify_integrity`,e=>e.desc(`Verify Electron ASAR integrity: parse the ElectronAsarIntegrity JSON embedded in the main binary, locate each referenced ASAR, and compare the on-disk SHA256/SHA512 hash against the embedded hash. A mismatch means the ASAR was tampered with after build.`).string(`exePath`,`必填。Electron 可执行文件路径(.exe / 主程序二进制)。`).string(`asarPath`,`可选。显式指定 ASAR 文件路径;不提供时按 resources/app.asar 自动探测。`).required(`exePath`).query()),e(`asar_deobfuscate`,e=>e.desc(`Scan every .js file inside an ASAR archive for obfuscation indicators (string-array arrays, webpack bundles, control-flow flattening, dynamic code, minification) and classify each file. Flagged files are optionally extracted to a directory for downstream deobfuscation.`).string(`inputPath`,`必填。ASAR 文件路径。`).string(`fileGlob`,`可选。文件扩展名过滤。默认 *.js。`,{default:`*.js`}).boolean(`extract`,`可选。默认 true;将评分超阈值的文件提取到 outputDir 以便后续深度去混淆。`,{default:!0}).string(`outputDir`,`可选。提取目录;不提供时自动生成 artifacts 临时目录。`).number(`maxFiles`,`可选。最多扫描的文件数量。默认 500。`,{default:500,minimum:1,maximum:1e4}).required(`inputPath`).query()),e(`asar_repack`,e=>e.desc(`Pack a directory tree into an Electron ASAR archive (inverse of asar_extract). Walks the input directory and writes a valid .asar (4xUInt32LE pickle prefix + JSON header + data segment) that parseAsarBuffer and Electron accept. Closes the unpack → patch → repack → retest loop without leaving jshookmcp.`).string(`inputDir`,`必填。要打包的源目录。`).string(`outputPath`,`可选。输出 .asar 文件路径;不提供时自动生成 artifacts 临时路径。`).required(`inputDir`).query()),e(`electron_verify_signature`,e=>e.desc(`Inspect a packaged Electron binary's own code signature (PE Authenticode on Windows, Mach-O embedded code signature on macOS). Pure-TS structural parse: locates the WIN_CERTIFICATE / SuperBlob, decodes the PKCS#7 SignedData, and surfaces the cert chain, signer, digest algorithm, and (macOS) the CodeDirectory ident + best-effort cdhash. No codesign/signtool dependency (runs in any CI). Cryptographic signature validity and timestamp counter-signatures are out of scope (verified:false).`).string(`exePath`,`必填。Electron 可执行文件路径(.exe / macOS app binary)。`).required(`exePath`).query())];export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";const t=[e(`process_find`,e=>e.desc(`Search for processes by name pattern. Returns a list of matching processes with PID, name, path, and window information.`).string(`pattern`,`Process name pattern to search for (supports partial matches)`).required(`pattern`)),e(`process_list`,e=>e.desc(`List all running processes. This is an alias for process_find with an empty pattern.`)),e(`process_get`,e=>e.desc(`Get detailed information about a specific process by PID, including command line, parent PID, and debug port status.`).number(`pid`,`Process ID to retrieve details for`).required(`pid`)),e(`process_kill`,e=>e.desc(`Terminate a process by PID. Requires appropriate privileges.`).number(`pid`,`Process ID to terminate`).required(`pid`)),e(`process_windows`,e=>e.desc(`Get all window handles for a process.`).number(`pid`,`Process ID to get windows for`).required(`pid`)),e(`process_check_debug_port`,e=>e.desc(`Check if a process has a debug port enabled for CDP attachment.`).number(`pid`,`Process ID to check`).required(`pid`)),e(`process_launch_debug`,e=>e.desc(`Launch an executable with remote debugging port enabled.`).string(`executablePath`,`Full path to the executable to launch`).number(`debugPort`,`Debug port to use`,{default:9222,minimum:1,maximum:65535}).array(`args`,{type:`string`},`Additional command line arguments`).required(`executablePath`)),e(`memory_read`,e=>e.desc(`Read memory from a process at a specific address. Requires elevated privileges. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`address`,`Memory address to read (hex string like "0x12345678")`).number(`size`,`Number of bytes to read`).required(`address`,`size`)),e(`memory_write`,e=>e.desc(`Write data to process memory at a given address. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`address`,`Memory address to write to (hex string like "0x12345678")`).string(`data`,`Data to write (hex string or base64)`).enum(`encoding`,[`hex`,`base64`],`Encoding of the data parameter`,{default:`hex`}).required(`address`,`data`)),e(`memory_scan`,e=>e.desc(`Scan process memory for a pattern or value. Requires elevated privileges. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`pattern`,`Pattern to search for (hex bytes like "48 8B 05" or value)`).enum(`patternType`,[`hex`,`int32`,`int64`,`float`,`double`,`string`],`Type of pattern to search`,{default:`hex`}).boolean(`suspendTarget`,`Suspend the target process during scan for a consistent memory snapshot (default: false)`,{default:!1}).required(`pattern`)),e(`memory_check_protection`,e=>e.desc(`Check memory protection flags at a specific address. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`address`,`Memory address to check (hex string like "0x12345678")`).required(`address`)),e(`memory_scan_filtered`,e=>e.desc(`Refine a previous memory scan with filtered addresses. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`pattern`,`Pattern to search for`).array(`addresses`,{type:`string`},`List of addresses to scan within (from previous scan)`).enum(`patternType`,[`hex`,`int32`,`int64`,`float`,`double`,`string`],`Type of pattern to search`,{default:`hex`}).required(`pattern`,`addresses`)),e(`memory_batch_write`,e=>e.desc(`Write multiple memory patches at once. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).array(`patches`,{type:`object`,properties:{address:{type:`string`,description:`Memory address (hex)`},data:{type:`string`,description:`Data to write`},encoding:{type:`string`,enum:[`hex`,`base64`],default:`hex`}},required:[`address`,`data`]},`Array of patches to apply`).required(`patches`)),e(`memory_dump_region`,e=>e.desc(`Dump a process memory region to a binary file for offline analysis. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`address`,`Start address (hex)`).number(`size`,`Number of bytes to dump`).string(`outputPath`,`Output file path`).required(`address`,`size`,`outputPath`)),e(`memory_list_regions`,e=>e.desc(`List all memory regions in a process with protection flags. If pid is omitted, the active browser renderer PID is auto-discovered from the current browser session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`)),e(`memory_audit_export`,e=>e.desc(`Export the in-memory audit trail for memory operations as JSON.`)),e(`inject_dll`,e=>e.desc(`Inject a DLL into a target process. Requires elevated privileges. Target process and payload are validated before injection.`).number(`pid`,`Target process ID`).string(`dllPath`,`Full path to the DLL file to inject`).boolean(`confirmed`,`Bypass confirmation prompts (use with caution)`,{default:!1}).string(`payloadHash`,`Expected SHA-256 hash of the DLL for integrity verification (optional)`).enum(`validationMode`,[`strict`,`balanced`,`permissive`,`disabled`],`Validation mode override (default: from JSHOOK_INJECTION_VALIDATION_MODE env var)`).required(`pid`,`dllPath`)),e(`inject_shellcode`,e=>e.desc(`Allocate and execute raw shellcode in a target process. Requires elevated privileges. Target process and payload are validated before injection.`).number(`pid`,`Target process ID`).string(`shellcode`,`Shellcode bytes (hex string or base64)`).enum(`encoding`,[`hex`,`base64`],`Encoding of shellcode`,{default:`hex`}).boolean(`confirmed`,`Bypass confirmation prompts (use with caution)`,{default:!1}).enum(`validationMode`,[`strict`,`balanced`,`permissive`,`disabled`],`Validation mode override (default: from JSHOOK_INJECTION_VALIDATION_MODE env var)`).required(`pid`,`shellcode`)),e(`check_debug_port`,e=>e.desc(`Check if a process is being debugged using NtQueryInformationProcess (ProcessDebugPort).`).number(`pid`,`Target process ID`).required(`pid`)),e(`enumerate_modules`,e=>e.desc(`List all loaded modules (DLLs) in a process with their base addresses.`).number(`pid`,`Target process ID`).required(`pid`)),e(`process_enum_threads`,e=>e.desc("Enumerate all threads in a process. Returns thread IDs, with optional per-thread context and diagnostics. Cross-platform: Win32 uses CreateToolhelp32Snapshot; Linux reads /proc/{pid}/task; macOS uses `ps -M`.").number(`pid`,`Process ID to enumerate threads for`).boolean(`includeDetails`,`Include per-thread objects and process diagnostics`,{default:!1}).required(`pid`)),e(`process_detect_hollowing`,e=>e.desc(`Detect process hollowing (malware technique that unmaps original process image and injects malicious code). Compares process memory sections (.text, .data, .rdata) with on-disk PE file using SHA-256 hashes. Returns detection result with confidence score and list of differing sections. WARNING: autoRestore=true is HIGH RISK, may crash the target process, and is Win32-only. Cross-platform: Win32 compares PE sections; Linux/macOS compare ELF/Mach-O executable sections via IntegrityScanner (autoRestore unavailable).`).number(`pid`,`Process ID to check for hollowing`).boolean(`autoRestore`,`Attempt to restore original code from disk (HIGH RISK, default: false)`).boolean(`includeMemoryDump`,`Include memory dump in result for forensics (default: false)`).required(`pid`)),e(`process_hollowing_scan`,e=>e.desc(`Pure-TS static hollowing indicator scan. Analyses /proc/pid/maps (RWX regions), /proc/pid/exe (deleted backing file), and PE headers (suspicious section names, RWX sections, entry point anomalies, mismatched binary path) without requiring native OS APIs. Complements process_detect_hollowing (which does live memory comparison). Provide at least one of: mapsContent, exeLink, peHex, or expectedImagePath. Honest boundary: Win32 live detection needs native API — use process_detect_hollowing for confirmed detection.`).number(`pid`,`Process ID (for reference in output)`).string(`mapsContent`,`Raw /proc/{pid}/maps content (Linux)`).string(`exeLink`,`Raw /proc/{pid}/exe readlink target (Linux)`).string(`peHex`,`Raw PE file bytes as hex string for header analysis`).string(`expectedImagePath`,`Expected process image path for binary-path mismatch detection`).readOnly()),e(`process_enum_handles`,e=>e.desc(`Enumerate open handles for a process using NtQuerySystemInformation. Resolves handle type and object name, decodes access masks, identifies security risks (high-privilege handles to sensitive processes, dangerous Token handles, inheritable sensitive handles, Section handles to executables). Skips name resolution for File/EtwRegistration types (known to hang). Requires elevated privileges (run as Administrator). Win32 only.`).number(`pid`,`Process ID to enumerate handles for`).string(`filterType`,`Filter by object type name (e.g. Process, Thread, Token, File, Key, Section, Mutant, Event, Semaphore)`).boolean(`includeNames`,`Resolve handle object names (slower; skip types known to hang like File) (default: true)`).boolean(`securityOnly`,`Only return handles with security findings (default: false)`).required(`pid`)),e(`process_detect_apc`,e=>e.desc(`Detect APC (Asynchronous Procedure Call) injection in a process. Enumerates threads, probes each thread APC queue via NtQueryInformationThread(ThreadApcState), and detects threads in alertable wait state (SleepEx/WaitForMultipleObjectsEx). Returns verdict (clean/suspicious/infected), confidence score, and risk reasons. Requires elevated privileges (run as Administrator). Win32 only.`).number(`pid`,`Process ID to check for APC injection`).required(`pid`)),e(`electron_attach`,e=>e.desc(`Attach to an Electron CDP port and optionally evaluate in a matching page.`).number(`port`,`CDP port to connect to`,{minimum:1,maximum:65535}).string(`pageUrl`,`Optional URL substring used to pick the target page`).string(`evaluate`,`Optional JavaScript expression to evaluate in the selected page`).string(`wsEndpoint`,`Optional browser WebSocket endpoint override`)),e(`process_suspend`,e=>e.desc(`Suspend a process for forensic snapshotting. Cross-platform: NtSuspendProcess (Win32), SIGSTOP (Linux), task_suspend (macOS). Pair with process_resume to restore. Use before memory_scan/dump for a consistent snapshot. Requires admin/root on most platforms.`).number(`pid`,`Process ID to suspend`).required(`pid`)),e(`process_resume`,e=>e.desc(`Resume a previously suspended process. Cross-platform: NtResumeProcess (Win32), SIGCONT (Linux), task_resume (macOS).`).number(`pid`,`Process ID to resume`).required(`pid`))];export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";const t=[e(`sourcemap_discover`,e=>e.desc(`Discover source maps on the current page.`).boolean(`includeInline`,`Include inline data: source maps.`,{default:!0})),e(`sourcemap_fetch_and_parse`,e=>e.desc(`Fetch a source map from URL and parse to original sources.`).string(`sourceMapUrl`,`Source map URL.`).string(`scriptUrl`,`Script URL for relative map resolution.`).required(`sourceMapUrl`)),e(`sourcemap_coverage`,e=>e.desc(`Summarize mapped and unmapped source coverage.`).string(`sourceMapUrl`,`Source map URL.`).string(`scriptUrl`,`Script URL for relative map resolution.`).required(`sourceMapUrl`)),e(`sourcemap_lookup`,e=>e.desc(`Resolve generated code position to original source (default), or — when originalSource is supplied — resolve original source:line:column back to the generated position. Supports indexed (sectioned) source maps transparently.`).string(`sourceMapUrl`,`Source map URL.`).string(`scriptUrl`,`Script URL for relative map resolution.`).number(`line`,`Generated line number (forward lookup).`,{minimum:1}).number(`column`,`Generated column number (forward lookup).`,{minimum:0}).string(`originalSource`,`Original source path. When set, performs reverse lookup (original -> generated) and line/column refer to the original position.`).number(`originalLine`,`Original line number (reverse lookup).`,{minimum:1}).number(`originalColumn`,`Original column number (reverse lookup).`,{minimum:0}).required(`sourceMapUrl`)),e(`sourcemap_reconstruct_tree`,e=>e.desc("Reconstruct source files from a source map. When a vendor stripped sourcesContent, set inferMissing=true to emit a best-effort name+position skeleton (from mapping segments) instead of a placeholder. Set emitScopes=true to also decode the ECMA-426 v4 scopes field and write a `.scopes.json` sidecar (per-source variables, function kind, hidden ranges) next to each reconstructed file.").string(`sourceMapUrl`,`Source map URL.`).string(`outputDir`,`Output directory under the project root.`).boolean(`inferMissing`,`For sources with null sourcesContent, infer a name+position skeleton from the decoded mapping segments instead of writing a placeholder comment.`,{default:!1}).boolean(`emitScopes`,"Decode the v4 ECMA-426 scopes field and write a `.scopes.json` sidecar next to each reconstructed source that has scope info. No-op for v3 maps.",{default:!1}).required(`sourceMapUrl`)),e(`sourcemap_parse_v4`,e=>e.desc(`Parse source map with ECMA-426 v4 scope/debug-id support; falls back to v3.`).string(`sourceMapUrl`,`Source map URL to parse.`).boolean(`extractScopes`,`Extract and decode scope information from v4 x_scopes field`,{default:!0}).boolean(`extractDebugIds`,`Extract debug-id mappings for source correlation`,{default:!0}).boolean(`compareV3`,`Compare v4 fields against v3 baseline and report differences`,{default:!1}).required(`sourceMapUrl`)),e(`sourcemap_diff`,e=>e.desc(`Compare two source map revisions: which sources were added/removed, per-source mapping segment deltas, and generated-position shifts beyond a configurable threshold (default 1 line).`).string(`sourceMapUrl`,`First source map URL.`).string(`sourceMapUrlB`,`Second source map URL.`).string(`scriptUrl`,`Script URL for relative map A resolution.`).string(`scriptUrlB`,`Script URL for relative map B resolution.`).number(`positionThreshold`,`Min generated-line delta to flag a segment as "shifted" (default 1).`,{minimum:1,default:1}).required(`sourceMapUrl`,`sourceMapUrlB`).query())];export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";const t=[e(`canvas_engine_fingerprint`,e=>e.desc(`Detect Canvas/WebGL game engines in the page.`).query()),e(`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}).boolean(`includeGPUResources`,`Include GPU resources (textures/programs/geometries) in the dump (WebGL engines only)`,{default:!1}).query()),e(`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()),e(`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`)),e(`canvas_scene_search`,e=>e.desc(`Search a previously-dumped scene tree (canvas_scene_dump output) for nodes by name regex and/or type. Pure-compute — no browser session required. Returns matching nodes with their path from root, depth, and engine-specific properties.`).prop(`sceneTree`,{type:`object`,description:`Scene tree JSON (the output of canvas_scene_dump)`,additionalProperties:!0}).string(`namePattern`,`Optional regex matched against node name (case-insensitive)`).string(`typeFilter`,`Optional exact node type to match (e.g. "Sprite", "Container")`).prop(`propertyFilter`,{type:`object`,description:`Match nodes whose property at key satisfies op vs value. op: eq (equal), contains (substring), gt (greater-than), lt (less-than). Key may be any node field including x/y/width/height.`,properties:{key:{type:`string`},op:{type:`string`,enum:[`eq`,`contains`,`gt`,`lt`]},value:{description:`Comparison value (string / number / boolean — coerced per op: eq/contains stringify, gt/lt numeric)`}},required:[`key`,`op`,`value`],additionalProperties:!1}).prop(`bounds`,{type:`object`,description:`Rectangle (x, y, width, height) in scene coordinates; matches nodes whose x/y/width/height intersect it.`,properties:{x:{type:`number`},y:{type:`number`},width:{type:`number`},height:{type:`number`}},required:[`x`,`y`,`width`,`height`],additionalProperties:!1}).number(`maxResults`,`Maximum matches to return`,{default:100,minimum:1,maximum:1e3}).required(`sceneTree`).query()),e(`canvas_inject_draw_hook`,e=>e.desc(`Intercept Canvas 2D (drawImage/fillText/strokeText) and WebGL (drawArrays/drawElements) draw calls into a ring buffer on the page. Actions: install (wrap prototypes), read (dump captured calls), uninstall (restore).`).enum(`action`,[`install`,`read`,`uninstall`],`Hook action`,{default:`install`}).boolean(`persistent`,`Re-inject on every navigation (install only)`,{default:!1}).number(`maxEntries`,`Ring-buffer capacity before older entries evict (install only)`,{default:1e3,minimum:1,maximum:1e5}).boolean(`clear`,`Clear the buffer after reading (read only)`,{default:!1}).query())],n=[{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:[]}}];export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";const t=[e(`binary_detect_format`,e=>e.desc(`Detect binary payload format and encoding signals.`).enum(`source`,[`base64`,`hex`,`file`,`raw`],`How to interpret input payload`).string(`data`,`Input payload for base64/hex/raw sources`).string(`filePath`,`File path when source=file`).string(`requestId`,`Captured requestId when a response body is available`).required(`source`).query()),e(`binary_decode`,e=>e.desc(`Decode binary payloads, transport encodings, and compressed blobs into hex, utf8, or json output.`).string(`data`,`Input encoded payload`).enum(`encoding`,[`base64`,`base32`,`base32hex`,`base32-crockford`,`base58`,`base85`,`hex`,`url`,`gzip`,`zlib`,`deflate`,`brotli`,`protobuf`,`msgpack`],`Declared input encoding`).enum(`outputFormat`,[`hex`,`utf8`,`json`],`Target output format`,{default:`hex`}).required(`data`,`encoding`).query()),e(`binary_encode`,e=>e.desc(`Encode utf8/hex/json input into transport encodings or compressed base64 blobs.`).string(`data`,`Input payload`).enum(`inputFormat`,[`utf8`,`hex`,`json`],`How to parse input`).enum(`outputEncoding`,[`base64`,`base32`,`base32hex`,`base32-crockford`,`base58`,`base85`,`hex`,`url`,`gzip`,`zlib`,`deflate`,`brotli`],`Desired output encoding`).required(`data`,`inputFormat`,`outputEncoding`).query()),e(`binary_entropy_analysis`,e=>e.desc(`Compute entropy and byte frequency for a payload.`).enum(`source`,[`base64`,`hex`,`raw`,`file`],`How to interpret input payload`).string(`data`,`Input payload for base64/hex/raw sources`).string(`filePath`,`File path when source=file`).number(`blockSize`,`Block size for per-block entropy`,{default:256,minimum:16,maximum:8192}).required(`source`).query()),e(`protobuf_decode_raw`,e=>e.desc(`Decode protobuf bytes. Raw wire-format walk by default (field numbers/wire types); with schemaText/schemaPath + messageName, typed decode via protobufjs (field numbers -> names).`).string(`data`,`Base64-encoded protobuf payload`).number(`maxDepth`,`Maximum recursive decode depth`,{default:5,minimum:1,maximum:20}).string(`schemaText`,`Optional .proto schema source. When provided with messageName, decodes typed fields instead of raw wire numbers.`).string(`schemaPath`,`Optional path to a .proto file (used only if schemaText is absent).`).string(`messageName`,`Fully-qualified message type name to decode (e.g. "Person"). Required for schema mode.`).required(`data`).query())];export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";const t=[e(`call_graph_analyze`,e=>e.desc(`Analyze runtime function call graph from in-page traces.`).number(`maxDepth`,`Maximum stack-derived edge depth`,{default:5}).string(`filterPattern`,`Regex filter for function names`).query()),e(`script_replace_persist`,e=>e.desc(`Persistently replace matching script responses.`).string(`url`,`Script URL match pattern`).string(`replacement`,`Replacement JavaScript source`).enum(`matchType`,[`exact`,`contains`,`regex`],`URL matching strategy`,{default:`contains`}).requiredOpenWorld(`url`,`replacement`)),e(`graphql_introspect`,e=>e.desc(`Run GraphQL introspection and optional Apollo Federation _service.sdl probing.`).string(`endpoint`,`GraphQL endpoint URL`).prop(`headers`,{type:`object`,description:`Custom request headers`,additionalProperties:{type:`string`}}).boolean(`useBrowser`,`Use the active browser session for fetch so cookies and CSRF/app-injected headers are preserved. Set false to force a Node-side fetch.`,{default:!0}).boolean(`includeFederation`,`Also probe Apollo Federation _service { sdl } metadata.`,{default:!0}).requiredOpenWorld(`endpoint`)),e(`graphql_extract_queries`,e=>e.desc(`Extract GraphQL queries/mutations from captured network traces.`).number(`limit`,`Maximum extracted operations`,{default:50}).query()),e(`graphql_replay`,e=>e.desc(`Replay a GraphQL operation with optional variables, batch array, or Apollo persisted-query (APQ) extensions.`).string(`endpoint`,`GraphQL endpoint URL`).string(`query`,`GraphQL query/mutation string (required unless batch is provided)`).prop(`variables`,{type:`object`,description:`GraphQL variables`,additionalProperties:!0}).string(`operationName`,`GraphQL operationName`).prop(`headers`,{type:`object`,description:`Custom request headers`,additionalProperties:{type:`string`}}).boolean(`useBrowser`,`Use the active browser session for fetch so cookies and CSRF/app-injected headers are preserved. Set false to force a Node-side fetch.`,{default:!0}).prop(`persistedQuery`,{type:`object`,description:`Apollo persisted-query (APQ) extension block. Adds extensions.persistedQuery { sha256Hash, version } to the body so traffic using APQ / Relay_preload replays faithfully.`,properties:{sha256Hash:{type:`string`,description:`The APQ query hash (sha256)`},version:{type:`integer`,description:`APQ version (defaults to 1)`}},required:[`sha256Hash`],additionalProperties:!1}).prop(`batch`,{type:`array`,description:`Batch replay: array of operations. When set, the request body is a JSON array and the server response is an array. Each item is { query, variables?, operationName? }.`,items:{type:`object`,properties:{query:{type:`string`},variables:{type:`object`,additionalProperties:!0},operationName:{type:`string`}},required:[`query`],additionalProperties:!1}}).requiredOpenWorld(`endpoint`)),e(`graphql_enum_schema`,e=>e.desc(`Enumerate GraphQL fields from server suggestion errors with introspection fallback.`).string(`endpoint`,`GraphQL endpoint URL`).string(`typeName`,`Root type name to report`,{default:`Query`}).string(`parentType`,`Type name to probe fields on`).number(`maxDepth`,`Maximum enumeration depth`,{default:1,minimum:1,maximum:6}).number(`concurrency`,`Reserved concurrency hint for future expansion`,{default:3,minimum:1,maximum:10}).prop(`headers`,{type:`object`,description:`Custom request headers`,additionalProperties:{type:`string`}}).requiredOpenWorld(`endpoint`)),e(`graphql_subscribe`,e=>e.desc(`Open a GraphQL subscription WebSocket, perform the graphql-transport-ws (or legacy graphql-ws) handshake, send a subscribe frame, and collect frames for collectMs. Runs in-page so the browser-session auth (cookies + connectionPayload) is preserved. Pairs with graphql_replay for targets that expose queries/mutations only via the authed WebSocket session.`).string(`endpoint`,`GraphQL subscription WebSocket endpoint. ws:/wss: used directly; http:/https: auto-upgraded to ws/wss.`).string(`query`,`GraphQL subscription query string`).prop(`variables`,{type:`object`,description:`GraphQL variables for the subscription`,additionalProperties:!0}).string(`operationName`,`GraphQL operationName`).prop(`connectionPayload`,{type:`object`,description:`Payload sent in the connection_init frame (e.g. { Authorization: "Bearer ..." }). Auth context that makes the subscription work.`,additionalProperties:!0}).enum(`protocol`,[`graphql-transport-ws`,`graphql-ws`],`WebSocket subprotocol. graphql-transport-ws is the modern standard; graphql-ws is the legacy subscriptions-transport-ws dialect.`,{default:`graphql-transport-ws`}).number(`collectMs`,`How long to collect frames after subscribe before sending complete.`,{default:3e3,minimum:100}).number(`connectTimeoutMs`,`Timeout waiting for connection_ack before giving up.`,{default:5e3,minimum:500}).requiredOpenWorld(`endpoint`,`query`))];export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{name:`webgpu_adapter_info`,description:`Get WebGPU adapter information (vendor, architecture, device). Used for fingerprinting GPU capabilities and detecting hardware-level vulnerabilities.`,inputSchema:{type:`object`,properties:{},additionalProperties:!1}},{name:`webgpu_shader_compile`,description:`Compile WGSL shader and extract metadata (entry points, bindings, attributes). Validates shader code and detects potential security issues.`,inputSchema:{type:`object`,properties:{shaderCode:{type:`string`,description:`WGSL shader source code`},format:{type:`string`,enum:[`wgsl`,`spirv`],description:`Shader format. "wgsl": compiled and validated on the real GPU via the browser WebGPU API. "spirv": static reflection only (browsers cannot compile SPIR-V directly; metadata is extracted by a zero-dependency binary parser). Provide SPIR-V as a hex or base64-encoded string.`}},required:[`shaderCode`],additionalProperties:!1}},{name:`webgpu_shader_disassemble`,description:`Parse WGSL or SPIR-V shader into AST and generate human-readable disassembly. Used for reverse engineering shader logic. SPIR-V input (hex/base64) is reflected into entry points, bindings, structs, and locations without compilation.`,inputSchema:{type:`object`,properties:{shaderCode:{type:`string`,description:`Shader source code (WGSL text) or SPIR-V binary (hex/base64-encoded string)`},format:{type:`string`,enum:[`wgsl`,`spirv`],description:`Shader format`}},required:[`shaderCode`],additionalProperties:!1}},{name:`webgpu_timing_analysis`,description:`GPU timing analysis for side-channel detection. Measures GPU command execution time variance to detect cache-based side-channel attacks (Graz University 2025 research).`,inputSchema:{type:`object`,properties:{iterations:{type:`number`,description:`Number of timing samples to collect`,minimum:1},detectAnomalies:{type:`boolean`,description:`Detect timing anomalies that may indicate side-channel attacks`}},required:[`iterations`],additionalProperties:!1}},{name:`webgpu_memory_layout`,description:`Analyze GPU memory allocations and buffer usage. Identifies memory layout patterns that may be vulnerable to side-channel attacks.`,inputSchema:{type:`object`,properties:{},additionalProperties:!1}},{name:`webgpu_capture_commands`,description:`Capture GPU command queue submissions (render passes, compute dispatches). Used for analyzing GPU workload and detecting malicious shader behavior.`,inputSchema:{type:`object`,properties:{captureCount:{type:`number`,description:`Number of command submissions to capture`,minimum:1}},required:[`captureCount`],additionalProperties:!1}},{name:`webgpu_shader_source_capture`,description:`Capture WGSL shader sources a running app compiles via GPUDevice.createShaderModule — the only artifact revealing what a compute/render pipeline computes (e.g. physics vs. cryptominer). Pairs with webgpu_capture_commands to reconstruct what data each draw/dispatch operated on.`,inputSchema:{type:`object`,properties:{captureCount:{type:`number`,description:`Number of shader compilations to capture before returning`,minimum:1},timeoutMs:{type:`number`,description:`Max wait in ms (returns early once captureCount shaders are captured). Default 5000.`,minimum:100}},required:[`captureCount`],additionalProperties:!1}},{name:`webgpu_error_capture`,description:`Capture WebGPU validation/out-of-memory/internal errors the target app swallows (via device uncapturederror), plus the current device.lost state. Optionally wraps createBuffer/createTexture in error scopes to attribute failures to specific calls. Surfaces the real diagnostics behind "empty buffer" / "zero draw call" symptoms.`,inputSchema:{type:`object`,properties:{captureCount:{type:`number`,description:`Maximum number of errors to capture before returning`,minimum:1},timeoutMs:{type:`number`,description:`Max wait in ms (returns early once captureCount errors are captured). Default 5000.`,minimum:100},wrapAllocations:{type:`boolean`,description:`Wrap createBuffer/createTexture in push/pop error scopes to attribute validation failures to specific calls`}},required:[`captureCount`],additionalProperties:!1}},{name:`webgpu_pipeline_dump`,description:`Enumerate active render/compute pipelines, bind-group layouts, and render-pass descriptors by hooking GPUDevice createRenderPipeline / createComputePipeline / createBindGroupLayout (plus async variants). Captures the full descriptor (vertex/fragment entry points, buffer stride/attributes, bind-group layout entries, visibility) so a captured bindGroups index can be resolved to actual resources.`,inputSchema:{type:`object`,properties:{captureCount:{type:`number`,description:`Number of pipeline/layout creations to capture before returning`,minimum:1},timeoutMs:{type:`number`,description:`Max wait in ms (returns early once captureCount pipelines are captured). Default 5000.`,minimum:100}},required:[`captureCount`],additionalProperties:!1}}];export{e as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";import{t}from"./reverseEngineeringConfig-BhZLOa3C.mjs";const n={type:`object`,additionalProperties:!1,properties:{allowPrivateNetwork:{type:`boolean`,description:`Allow access to private/reserved targets only when the request also matches allowedHosts or allowedCidrs.`},allowInsecureHttp:{type:`boolean`,description:`Allow non-loopback HTTP targets only when the request also matches allowedHosts or allowedCidrs.`},allowedHosts:{type:`array`,items:{type:`string`},description:`Exact hostname or host:port allowlist for the primary target (for example ["labs.example.com", "localhost:8080"]).`},allowedCidrs:{type:`array`,items:{type:`string`},description:`CIDR allowlist applied after DNS resolution (for example ["10.10.0.0/16", "192.168.1.10/32"]).`},allowedRedirectHosts:{type:`array`,items:{type:`string`},description:`Optional hostname or host:port allowlist for redirect hops. When omitted, redirects inherit allowedHosts/allowedCidrs.`}},description:`Request-level network authorization policy. Use this instead of process-wide bypasses when you need to reach a real lab target, private address, or plain HTTP service.`},r=t().reverseSession,i=[e(`js_bundle_search`,e=>e.desc(`Fetch a remote JS bundle and search it with named regex patterns, with caching and noise filtering.`).string(`url`,`Remote URL of the JavaScript bundle to analyze`).array(`patterns`,{type:`object`,properties:{name:{type:`string`,description:`Human-readable label for this pattern`},regex:{type:`string`,description:`JavaScript regex string`},contextBefore:{type:`number`,description:`Characters of context before match (default: 80)`},contextAfter:{type:`number`,description:`Characters of context after match (default: 80)`}},required:[`name`,`regex`]},`Named regex patterns to search for`).boolean(`cacheBundle`,`Cache the bundle for 5 minutes to avoid re-downloads`,{default:!0}).boolean(`forceRefresh`,`Bypass the warm cache and re-fetch the bundle even when a fresh cached copy exists. Useful when a signed URL rotated or the CDN churned the content. The fresh copy is still written back to the cache.`,{default:!1}).boolean(`stripNoise`,`Skip matches inside SVG path data or base64 blobs`,{default:!0}).number(`maxMatches`,`Maximum matches to return per pattern`,{default:10,minimum:1,maximum:1e3}).prop(`networkPolicy`,n).requiredOpenWorld(`url`,`patterns`)),e(`page_script_register`,e=>e.desc(`Register a named reusable JS snippet in the Script Library. Execute with page_script_run.`).string(`name`,`Unique script name (e.g. "my_extractor")`).string(`code`,'JavaScript expression/IIFE to register. Use `typeof __params__ !== "undefined" ? __params__ : {}` to safely access runtime parameters.').string(`description`,`Optional human-readable description of the script`).boolean(`protected`,`Pin this script so it is never chosen as the LRU eviction victim when the registry is full. Defaults to the existing entry value on update, or false on first register.`).required(`name`,`code`)),e(`page_script_run`,e=>e.desc(`Execute a named script from the Script Library with optional runtime params (__params__).`).string(`name`,`Script name to run (built-in or registered)`).prop(`params`,{type:`object`,additionalProperties:!0,description:`Optional parameters injected as __params__ (must be JSON-serializable)`}).requiredOpenWorld(`name`)),e(`api_probe_batch`,e=>e.desc(`Batch-probe API endpoints in browser context with auto token injection and HTML skip.`).string(`baseUrl`,`Base URL prefix (e.g. "https://chat.qwen.ai") — trailing slash will be stripped`).array(`paths`,{type:`string`},`Paths to probe (e.g. ["/api/v1/users", "/api/v1/chats"])`).enum(`method`,[`GET`,`POST`,`PUT`,`DELETE`,`PATCH`,`HEAD`,`OPTIONS`],`HTTP method for all probes`,{default:`GET`}).object(`headers`,{additionalProperties:{type:`string`}},`Additional HTTP headers to include in all requests`).string(`bodyTemplate`,`JSON body string to send for POST/PUT/PATCH requests (optional)`).array(`includeBodyStatuses`,{type:`number`},`Status codes for which to include response body snippet (default: [200, 201, 204])`).number(`maxBodySnippetLength`,`Max characters per response body snippet`,{default:500,minimum:0,maximum:1e4}).boolean(`autoInjectAuth`,`Auto-inject Bearer token from localStorage (token / active_token / access_token).`,{default:!0}).number(`concurrency`,`Max in-browser concurrent probes (1-32, default 6)`,{default:6,minimum:1,maximum:32}).number(`delayMs`,`Fixed pause in ms before each probe (0-60000, default 0). Use with jitterMs to throttle.`,{default:0,minimum:0,maximum:6e4}).number(`jitterMs`,`Random extra delay in ms (0 to jitterMs) added before each probe (0-60000, default 0).`,{default:0,minimum:0,maximum:6e4}).prop(`networkPolicy`,n).requiredOpenWorld(`baseUrl`,`paths`)),e(`list_extension_workflows`,e=>e.desc(`List runtime-loaded extension workflows from plugins/ or workflows/ directories.`).query()),e(`run_extension_workflow`,e=>e.desc(`Execute an extension workflow by workflowId with optional config and timeout overrides.`).string(`workflowId`,`Registered extension workflow id to execute`).string(`profile`,`Optional profile label exposed to the workflow execution context`).prop(`config`,{type:`object`,additionalProperties:!0,description:`Optional config overrides read through ctx.getConfig(path, fallback)`}).prop(`nodeInputOverrides`,{type:`object`,additionalProperties:{type:`object`,additionalProperties:!0},description:`Optional shallow input overrides keyed by workflow node id`}).number(`timeoutMs`,`Optional override for total workflow timeout in milliseconds`).requiredOpenWorld(`workflowId`)),e(`reverse_session`,e=>e.desc(`Create, inspect, list, preview, or run an end-to-end reverse-engineering workflow session with artifact root, cross-domain tool calls, and evidence refs.`).string(`action`,`Action: create, status, list, plan, or run. Defaults to create.`).string(`platform`,`Target platform: android, native, web, or unknown.`).string(`packageName`,`Android package/process name.`).string(`apkPath`,`Local APK path for APK/DEX intake.`).number(`pid`,`Runtime process id when known.`).string(`artifactRoot`,`Optional artifact root directory for planned outputs.`).string(`sessionId`,`Session id for action=status or action=run.`).number(`maxSteps`,`Maximum ready/planned steps to execute during action=run.`,{default:r.runMaxSteps}).boolean(`stopOnError`,`Stop action=run after the first failed tool result.`,{default:!0}).boolean(`includeResults`,`Include parsed tool results in action=run execution records.`,{default:!1}).query()),e(`workflow_run_inspect`,e=>e.desc(`Inspect the global workflow run store: list recent run_extension_workflow / run_macro runs, get a run entry by runId, or fetch the last successful full result (stepResults, spans, metrics) for a workflow or macro id.`).enum(`action`,[`list`,`get`,`lastSuccess`],`Inspection action. "list" returns recent runs (optionally filtered by workflowId); "get" returns one run entry by runId; "lastSuccess" returns the last ok result for a workflowId.`,{default:`list`}).string(`runId`,`Run id to fetch (action=get).`).string(`workflowId`,`Workflow or macro id; filters "list" results or selects the "lastSuccess" workflow.`).query()),e(`workflow_conditional_step`,e=>e.desc(`Evaluate a condition against previous workflow step results and execute one of two tool branches. Supports built-in predicates: always_true, always_false, any_step_failed, success_rate_gte_N (N=0-100), variable_equals_KEY_VALUE, variable_contains_KEY_VALUE, variable_matches_KEY_REGEX. When stepResults is omitted, reads from the last successful workflow run for the given workflowId.`).string(`predicateId`,`Predicate identifier. Built-in: always_true, always_false, any_step_failed, success_rate_gte_<0-100>, variable_equals_<KEY>_<VALUE>, variable_contains_<KEY>_<VALUE>, variable_matches_<KEY>_<REGEX>.`).object(`whenTrue`,{tool:{type:`string`,description:`Tool name to invoke when predicate is true`},args:{type:`object`,additionalProperties:!0,description:`Optional args to pass to the whenTrue tool (default: {})`}},`Tool to execute when the predicate evaluates to true.`,{required:[`tool`]}).object(`whenFalse`,{tool:{type:`string`,description:`Tool name to invoke when predicate is false`},args:{type:`object`,additionalProperties:!0,description:`Optional args to pass to the whenFalse tool (default: {})`}},`Optional tool to execute when the predicate evaluates to false. When omitted and the predicate is false, the step is skipped silently.`,{required:[`tool`]}).prop(`stepResults`,{type:`object`,additionalProperties:!0,description:`Optional map of stepId → result to evaluate the predicate against. When omitted, fetched from the last successful workflow run for workflowId.`}).string(`workflowId`,`Workflow or macro id used to look up the last successful run stepResults when stepResults is not provided.`).requiredOpenWorld(`predicateId`,`whenTrue`)),e(`workflow_retry_policy`,e=>e.desc(`Configure a global retry policy with exponential backoff for workflow steps. The stored policy is applied by run_extension_workflow / run_macro when individual nodes lack an explicit retry config. Returns the normalised policy.`).number(`maxAttempts`,`Maximum number of attempts including the initial try (1-10)`,{minimum:1,maximum:10}).number(`backoffMs`,`Initial backoff delay in milliseconds (0-60000)`,{default:0,minimum:0,maximum:6e4}).number(`multiplier`,`Exponential backoff multiplier: each retry waits backoffMs * multiplier^(attempt-1) ms (1-10)`,{default:2,minimum:1,maximum:10}).required(`maxAttempts`,`backoffMs`))];export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";const t=[e(`create_task_handoff`,e=>e.desc(`Create a persisted task handoff for cross-tool coordination.`).string(`description`,`Task description`).array(`constraints`,{type:`string`},`Constraints for the specialist`).string(`targetDomain`,`Suggested domain for the specialist`).string(`decision`,`Key design decision made in this phase`).array(`risks`,{type:`string`},`Identified risks for the specialist`).array(`nextSteps`,{type:`string`},`Concrete next actions for the specialist`).string(`parentId`,`Existing task ID this handoff forks from (builds a parent dependency edge)`).array(`dependsOn`,{type:`string`},`Task IDs that must complete before this one`).required(`description`)),e(`complete_task_handoff`,e=>e.desc(`Mark a task handoff as completed.`).string(`taskId`,`Task ID from create_task_handoff`).string(`summary`,`Concise summary of what was accomplished`).array(`keyFindings`,{type:`string`},`Key discoveries or results`).array(`artifacts`,{type:`string`},`Paths to generated artifact files`).required(`taskId`,`summary`)),e(`update_task_handoff`,e=>e.desc(`Update task handoff status or metadata without completing it.`).string(`taskId`,`Task ID from create_task_handoff`).enum(`status`,[`pending`,`in_progress`,`failed`],`New handoff status`).string(`description`,`Replacement task description`).array(`constraints`,{type:`string`},`Replacement constraints`).string(`targetDomain`,`Replacement target domain`).string(`decision`,`Replacement or updated design decision`).array(`risks`,{type:`string`},`Replacement identified risks`).array(`nextSteps`,{type:`string`},`Replacement next actions`).string(`summary`,`Failure or progress summary`).array(`keyFindings`,{type:`string`},`Current key findings`).array(`artifacts`,{type:`string`},`Current artifact file paths`).required(`taskId`)),e(`get_task_context`,e=>e.desc(`Read persisted task handoff context and session insights.`).string(`taskId`,`Optional task ID to read a single handoff`).string(`category`,`Optional session insight category filter`).string(`tag`,`Optional session insight tag filter`).enum(`severity`,[`info`,`low`,`medium`,`high`,`critical`],`Optional session insight severity filter`).string(`sourceTaskId`,`Optional source handoff id filter for session insights`).number(`minConfidence`,`Minimum confidence for returned session insights`,{minimum:0,maximum:1}).query()),e(`append_session_insight`,e=>e.desc(`Record a persisted insight for the current session.`).string(`category`,`Insight category`).string(`content`,`The insight content`).number(`confidence`,`Confidence level 0.0-1.0`,{minimum:0,maximum:1,default:1}).array(`tags`,{type:`string`},`Optional tags for retrieval and grouping`).enum(`severity`,[`info`,`low`,`medium`,`high`,`critical`],`Optional severity`).string(`toolSource`,`Optional tool or domain that produced the insight`).required(`category`,`content`)),e(`save_page_snapshot`,e=>e.desc(`Save current page state.`).string(`label`,`Human-readable label for this snapshot`).readOnly()),e(`restore_page_snapshot`,e=>e.desc(`Restore a saved page snapshot.`).string(`snapshotId`,`Snapshot ID from save_page_snapshot`).required(`snapshotId`).idempotent()),e(`list_page_snapshots`,e=>e.desc(`List saved page snapshots.`).query()),e(`coordination_restore_snapshot`,e=>e.desc(`Restore a saved page snapshot including IndexedDB data. Navigates to the captured URL, re-injects cookies, localStorage, sessionStorage, and IndexedDB records from the snapshot.`).string(`snapshotId`,`Snapshot ID from save_page_snapshot`).required(`snapshotId`).idempotent())],n=[e(`state_board`,e=>e.desc(`CRUD operations on the cross-tool shared state board.`).enum(`action`,[`set`,`get`,`delete`,`list`,`history`,`clear`],`Operation to perform`).string(`key`,`Key name (required for set/get/delete/history)`).prop(`value`,{type:`object`,description:`Value to store`}).string(`namespace`,`Namespace for key isolation`).number(`ttlSeconds`,`TTL in seconds`).boolean(`includeValues`,`Include current values in list results`,{default:!1}).number(`limit`,`Maximum history entries to return`,{default:50}).string(`keyPattern`,`Key pattern filter`).required(`action`)),e(`state_board_watch`,e=>e.desc(`Watch state board keys for changes with configurable polling.`).enum(`action`,[`start`,`poll`,`stop`],`Watch operation: start watching, poll for changes, or stop watching`).string(`key`,`Key or pattern to watch`).string(`namespace`,`Namespace`).number(`pollIntervalMs`,`Polling interval in milliseconds`).string(`watchId`,`Watch ID`).required(`action`)),e(`state_board_io`,e=>e.desc(`Serialize state board to JSON or restore from a previous export.`).enum(`action`,[`export`,`import`],`IO operation`).string(`namespace`,`Namespace filter or target namespace`).string(`keyPattern`,`Key pattern filter`).prop(`data`,{type:`object`,description:`Entries to import`}).boolean(`overwrite`,`Overwrite existing keys on import`).required(`action`))];export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";const t=[e(`wasm_capabilities`,e=>e.desc(`Report WASM tool availability.`).query()),e(`wasm_dump`,e=>e.desc(`Dump a captured WebAssembly module from the current page.`).number(`moduleIndex`,`Index of the WASM module to dump if multiple were loaded`,{default:0}).string(`outputPath`,`Custom output file path. If omitted, auto-generates in artifacts/wasm/`).boolean(`autoInject`,`If no WASM is captured, auto-inject a bytes-capturing hook (stores raw bytes to window.__wasmModuleStorage — the stock webassembly-full preset only records events), reload the page, and retry. The page must instantiate its WASM on load for the re-capture to succeed.`,{default:!1})),e(`wasm_disassemble`,e=>e.desc(`Disassemble a .wasm binary to WAT text format.`).string(`inputPath`,`Path to the .wasm file to disassemble`).string(`outputPath`,`Output .wat file path. If omitted, auto-generates in artifacts/wasm/`).boolean(`foldExprs`,`Fold expressions for more compact output`,{default:!0}).required(`inputPath`)),e(`wasm_decompile`,e=>e.desc(`Decompile .wasm bytecode to readable pseudo-code with type info.`).string(`inputPath`,`Path to the .wasm file to decompile`).string(`outputPath`,`Output file path. If omitted, auto-generates in artifacts/wasm/`).required(`inputPath`)),e(`wasm_inspect_sections`,e=>e.desc(`Parse .wasm section headers: imports, exports, memory, tables, code.`).string(`inputPath`,`Path to the .wasm file to inspect`).enum(`sections`,[`headers`,`details`,`disassemble`,`all`],`What to dump: headers (section overview), details (full metadata), disassemble (bytecode), all`,{default:`details`}).required(`inputPath`)),e(`wasm_offline_run`,e=>e.desc(`Run an exported .wasm function.`).string(`inputPath`,`Path to the .wasm file`).string(`functionName`,`Name of the exported function to invoke`).array(`args`,{type:`string`},`Arguments to pass to the function (will be parsed as integers/floats)`).enum(`runtime`,[`wasmtime`,`wasmer`,`auto`],`WASM runtime to use. "auto" tries wasmtime first, then wasmer`,{default:`auto`}).number(`timeoutMs`,`Execution timeout in ms`,{default:1e4}).required(`inputPath`,`functionName`)),e(`wasm_optimize`,e=>e.desc(`Optimize a .wasm binary for size or speed.`).string(`inputPath`,`Path to the .wasm file to optimize`).string(`outputPath`,`Output optimized .wasm file path. If omitted, auto-generates in artifacts/wasm/`).enum(`level`,[`O1`,`O2`,`O3`,`O4`,`Os`,`Oz`],`Optimization level`,{default:`O2`}).required(`inputPath`)),e(`wasm_vmp_trace`,e=>e.desc(`Read captured WASM VMP import-call traces from the current page.`).number(`maxEvents`,`Maximum import call events to capture`,{default:5e3}).string(`filterModule`,`Filter by import module name`)),e(`wasm_memory_inspect`,e=>e.desc(`Inspect exported WebAssembly.Memory from the current page. Pages often load multiple WASM modules (crypto/DRM/app) — the response always includes totalInstances + an instance inventory; pass instanceIndex to target a specific module.`).number(`instanceIndex`,`Which captured WASM instance to read (0-based). Out-of-range returns the instance list.`,{default:0}).number(`offset`,`Starting byte offset to read from`,{default:0}).number(`length`,`Number of bytes to read`,{default:256}).enum(`format`,[`hex`,`ascii`,`both`],`Output format`,{default:`both`}).string(`searchPattern`,`Search for this hex pattern or ASCII string in the memory range`)),e(`wasm_to_c`,e=>e.desc(`Transpile .wasm bytecode to C source and header files.`).string(`inputPath`,`Path to the .wasm file to convert`).string(`outputDir`,`Directory for generated .c and .h files. If omitted, uses artifacts/wasm/`).required(`inputPath`)),e(`wasm_detect_obfuscation`,e=>e.desc(`Detect WASM obfuscation: opaque predicates, control-flow flattening, bogus ops.`).string(`inputPath`,`Path to the .wasm file to analyze`).boolean(`verbose`,`Include detailed pattern evidence in output`,{default:!1}).required(`inputPath`)),e(`wasm_instrument_trace`,e=>e.desc(`Generate a JS instrumentation wrapper for a .wasm module.`).string(`inputPath`,`Path to the .wasm file to instrument`).array(`hooks`,{type:`string`,enum:[`call`,`memory`,`branch`,`loop`,`local`]},`Hook types to inject`).boolean(`allHooks`,`Inject all available hook types`,{default:!0}).string(`outputPath`,`Output JS file path. If omitted, auto-generates in artifacts/wasm/`).required(`inputPath`)),e(`wasm_string_extract`,e=>e.desc(`Extract printable strings from a .wasm binary, grouped by section, with name-section function-name recovery and classification (url/base64/hex-hash/file-path). Wasm-aware alternative to generic binary strings tools.`).string(`inputPath`,`Path to the .wasm file`).number(`minLength`,`Minimum string length to report`,{default:4}).number(`maxStrings`,`Maximum number of strings to return (rest counted only)`,{default:200}).required(`inputPath`)),e(`wasm_diff`,e=>e.desc(`Patch-diff two .wasm binaries (original vs. patched) for vulnerability research: disassembles both via wasm2wat and emits a structured function-level diff (added/removed/changed) plus a per-function WAT line-level unified diff. The full diff is written to an artifact; the response carries summaries and previews.`).string(`inputPathA`,`Path to the first .wasm file (e.g. original)`).string(`inputPathB`,`Path to the second .wasm file (e.g. patched)`).string(`outputPath`,`Custom output file path for the full JSON diff. If omitted, auto-generates in artifacts/wasm/`).boolean(`semantic`,`Normalize transient local/temp names so pure renumbering is not reported as a change`,{default:!1}).required(`inputPathA`,`inputPathB`)),e(`wasm_instrument_binary`,e=>e.desc(`Real wasm-level binary instrumentation: disassembles via wasm2wat, inserts a call to an imported trace function at every function entry, and reassembles via wat2wasm. Unlike wasm_instrument_trace (which only proxies JS-visible exports), this rewrites the code section so every function entry is observable. Honest boundary: function-ENTRY-level tracing, not basic-block — the host must supply the trace_fn import at instantiation.`).string(`inputPath`,`Path to the .wasm file to instrument`).string(`outputPath`,`Output instrumented .wasm file path. If omitted, auto-generates in artifacts/wasm/`).required(`inputPath`)),e(`wasm_instrument_block`,e=>e.desc(`Real wasm-level basic-block instrumentation: disassembles via wasm2wat, inserts a call to an imported trace function at every block/loop/if body entry (and function entry), and reassembles via wat2wasm. Unlike wasm_instrument_binary (function-entry-only) and wasm_instrument_trace (JS-proxy-only), this observes structured control-flow entries — branch targets (br/br_if/br_table) are covered because Wasm resolves them to block/loop/if labels. The host must supply the trace_block import at instantiation.`).string(`inputPath`,`Path to the .wasm file to instrument`).string(`outputPath`,`Output instrumented .wasm file path. If omitted, auto-generates in artifacts/wasm/`).required(`inputPath`)),e(`wasm_inspect`,e=>e.desc(`Pure-TS wasm binary structural inspector (no wabt dependency). Parses the module surface — types, imports, functions (with name-section recovery), tables, memories, globals, exports, start, element/data/code segment counts, and custom sections (name/producers/target_features) — directly from the binary, returning structured JSON. The wabt-independent counterpart to wasm_inspect_sections (wasm-objdump): the only structural path when wabt is unavailable (see wasm_capabilities). Honest boundary: structure only, no code-body disassembly; element/data/global-init payloads reported as counts.`).string(`inputPath`,`Path to the .wasm file to inspect`).required(`inputPath`))];export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";const t=[e(`get_token_budget_stats`,e=>e.desc(`Get token budget usage stats, warnings, and optimization suggestions.`).query()),e(`manual_token_cleanup`,e=>e.desc(`Clear stale entries and reset counters to free 10-30% of token budget.`)),e(`reset_token_budget`,e=>e.desc(`Hard-reset all token budget counters. Destructive — prefer manual_token_cleanup.`).destructive())],n=[e(`list_extensions`,e=>e.desc(`List all loaded plugins, workflows, and extension tools.`).boolean(`includeIntegrity`,`When true, enrich each extension with package version, entry-file SHA-256 digest, and registry-install provenance (pinned commit). Slower (hashes files).`).query()),e(`reload_extensions`,e=>e.desc(`Reload plugins and workflows from configured directories, and directly register extension tools visible in the current profile.`).openWorld()),e(`browse_extension_registry`,e=>e.desc(`Browse the online extension registry for installable plugins and workflows.`).enum(`kind`,[`plugin`,`workflow`,`all`],`Filter by extension kind`,{default:`all`}).query()),e(`install_extension`,e=>e.desc(`Install an extension from the remote registry.`).string(`slug`,`Extension slug from the registry`).string(`targetDir`,`Target directory override`).requiredOpenWorld(`slug`))],r=[e(`get_cache_stats`,e=>e.desc(`Get cache statistics: entries, sizes, hit rates, and cleanup recommendations.`).query()),e(`smart_cache_cleanup`,e=>e.desc(`Evict LRU and stale entries while preserving hot data.`).number(`targetSize`,`Target size in bytes`).array(`namespaces`,{type:`string`},`Restrict eviction to these cache namespaces (by name). Empty/omitted = all caches.`)),e(`clear_all_caches`,e=>e.desc(`Clear all internal caches. Destructive — prefer smart_cache_cleanup.`).destructive())],i=[e(`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}).number(`memoryLimitBytes`,`QuickJS heap memory limit in bytes; clamped to configured min/max limits.`).array(`allowedTools`,{type:`string`},`Optional MCP tool allowlist for sandbox mcp.call/listTools exposure.`).boolean(`autoCorrect`,`Retry failed scripts up to 2 times with error context`,{default:!1}).boolean(`redactOutput`,`Redact secrets from logs, result, and error before returning.`,{default:!0}).required(`code`))],a=[e(`cleanup_artifacts`,e=>e.desc(`Clean generated artifacts by age and size.`).number(`retentionDays`,`Override retention window in days`).number(`maxTotalBytes`,`Override maximum retained bytes`).boolean(`dryRun`,`Preview removals without deleting`).array(`categories`,{type:`string`,enum:[`wasm`,`traces`,`profiles`,`dumps`,`reports`,`har`,`captures`,`sessions`,`offloaded`,`tmp`]},`Only clean these artifact categories`).array(`excludeCategories`,{type:`string`,enum:[`wasm`,`traces`,`profiles`,`dumps`,`reports`,`har`,`captures`,`sessions`,`offloaded`,`tmp`]},`Do not clean these artifact categories`).destructive()),e(`doctor_environment`,e=>e.desc(`Run environment doctor: dependencies, bridges, platform limits.`).boolean(`includeBridgeHealth`,`Probe native-bridge / Burp endpoints`).readOnly()),e(`maintenance_detect_gpu`,e=>e.desc(`Detect GPU family from WebGL/WebGPU renderer strings. Classifies into NVIDIA, AMD, Intel, Apple, Mali, Adreno, PowerVR, Vivante, Broadcom, Qualcomm, Microsoft. Pure-TS classifier — no browser needed. Provide at least one of webglRenderer, webgpuDescription, or deviceName.`).string(`webglRenderer`,`WebGL RENDERER string (e.g. from gl.getParameter(gl.RENDERER)), typically ANGLE-wrapped on Windows.`).string(`webgpuDescription`,`WebGPU adapter.info.description (e.g. "NVIDIA GeForce RTX 4090").`).string(`deviceName`,`Free-form GPU device name (e.g. "Mali-G78").`).readOnly())];export{t as a,i,r as n,n as r,a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./tool-builder-
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";const t=[`constant_fold`,`string_decrypt`,`dead_code_remove`,`control_flow_flatten`,`rename_vars`],n=[e(`ast_transform_preview`,e=>e.desc(`Preview lightweight AST-like transforms (string/regex based) and return before/after diff.`).string(`code`,`Source code to transform.`).array(`transforms`,{type:`string`,enum:t},`Ordered transform list.`).boolean(`preview`,`Whether to generate line diff output.`,{default:!0}).required(`code`,`transforms`).query()),e(`ast_transform_chain`,e=>e.desc(`Create and store an in-memory transform chain.`).string(`name`,`Chain name.`).array(`transforms`,{type:`string`,enum:t},`Ordered transform list.`).string(`description`,`Optional chain description.`).required(`name`,`transforms`)),e(`ast_transform_apply`,e=>e.desc(`Apply transforms to input code or a live page scriptId.`).string(`scriptId`,`Target script ID from page debugger context.`).string(`code`,`Direct source code input.`).string(`chainName`,`Use a saved transform chain by name.`).array(`transforms`,{type:`string`,enum:t},`Direct transform list (used when chainName is not provided).`)),e(`crypto_extract_standalone`,e=>e.desc(`Extract crypto/sign/encrypt function from current page and generate standalone runnable code.`).string(`targetFunction`,`Target function name/path, e.g. "window.sign".`).boolean(`includePolyfills`,`Include minimal runtime polyfills.`,{default:!0}).required(`targetFunction`)),e(`crypto_test_harness`,e=>e.desc(`Run extracted crypto code in worker_threads + vm sandbox and return deterministic test results.`).string(`code`,`Standalone function code.`).string(`functionName`,`Exported function name to execute.`).array(`testInputs`,{type:`string`},`Input list for test execution.`).required(`code`,`functionName`,`testInputs`).query()),e(`crypto_compare`,e=>e.desc(`Compare two crypto implementations against identical test vectors.`).string(`code1`,`Implementation A code.`).string(`code2`,`Implementation B code.`).string(`functionName`,`Function name shared by both implementations.`).array(`testInputs`,{type:`string`},`Input list for comparison.`).required(`code1`,`code2`,`functionName`,`testInputs`).query()),e(`transform_workbench`,e=>e.desc(`Run a reproducible binary transform workbench over base64 inputs: base64, hex, XOR, RC4, AES-CBC/ECB decrypt, zlib/gzip inflate, entropy, previews, and magic hints.`).string(`inputBase64`,`Input bytes encoded as base64.`).array(`steps`,{type:`object`,description:`Ordered transform steps: {op:"base64_decode|base64_encode|hex_decode|hex_encode|xor|rc4|aes_cbc_decrypt|aes_ecb_decrypt|zlib_inflate|gzip_inflate|entropy", key?, keyHex?, iv?, ivHex?}. AES ops require key (16/24/32 bytes); aes_cbc_decrypt also requires iv (16 bytes).`},`Ordered transform workbench steps.`).number(`previewBytes`,`Number of output bytes to preview.`,{default:128}).boolean(`includeOutputBase64`,`Whether to include full output bytes as base64.`,{default:!1}).number(`maxInputBytes`,`Optional per-call decoded input byte cap.`).number(`maxOutputBytes`,`Optional per-call output byte cap after each step.`).number(`maxSteps`,`Optional per-call transform step cap.`).array(`customMagicHints`,{type:`object`,description:`Caller-supplied generic magic hint: {label, prefixHex? or prefixAscii?, description?}.`},`Optional caller-supplied signature hints. Built-in hints stay generic.`).required(`inputBase64`,`steps`).query())];export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./tool-builder-
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";const t=[e(`antidebug_bypass`,e=>e.desc(`Bypass one or more anti-debug protection types. Specify types to apply; omit or use ["all"] to apply all bypasses. Types: all, debugger_statement, timing, stack_trace, console_detect.`).array(`types`,{type:`string`,enum:[`all`,`debugger_statement`,`timing`,`stack_trace`,`console_detect`]},`Bypass types to apply (default: ["all"])`).boolean(`persistent`,`Inject persistently for future documents`,{default:!0}).enum(`mode`,[`remove`,`noop`],`Debugger statement mode (for debugger_statement type)`,{default:`remove`}).number(`maxDrift`,`Max timing drift per call in ms (for timing type)`,{default:50,minimum:0,maximum:1e4}).array(`filterPatterns`,{type:`string`},`Additional stack frame patterns to filter (for stack_trace type)`)),e(`antidebug_detect_protections`,e=>e.desc(`Detect anti-debug protections in current page with bypass recommendations.`))];export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./tool-builder-CpLh-UQd.mjs";const t=[e(`dart_strings_extract`,e=>e.desc(`Stream-extract ASCII/UTF-16LE strings from a Dart AOT libapp.so and classify them (urls, paths, classNames, packageRefs, cryptoKeywords, Dart identifiers, plus customRules). ReDoS-guarded.`).string(`filePath`,`Absolute path to the libapp.so (or arbitrary binary) to extract from`).number(`minLength`,`Minimum string length to emit`,{default:4,minimum:2,maximum:64}).boolean(`includeRaw`,"Include unclassified strings under the `raw` bucket",{default:!1}).boolean(`includeOffsets`,`Include byte offsets[] for each extracted string`,{default:!0}).enum(`encoding`,[`ascii`,`utf16le`,`both`],`Which encodings to scan`,{default:`both`}).number(`maxChunkBytes`,`Streaming chunk size in bytes`).number(`maxOffsetsPerString`,`Cap on offsets recorded per string (excess sets truncated)`,{default:1e3}).enum(`ruleMode`,[`append`,`prepend`,`replace`],`How customRules interact with DEFAULT_RULES`,{default:`append`}).number(`regexTimeoutMs`,`Per-rule .test() wall-clock budget for the ReDoS guard`).number(`scanStride`,`Only emit hits whose offset is divisible by stride (e.g. 4 for pointer-aligned scans)`).object(`scanWindow`,{start:{type:`number`,description:`Inclusive start byte offset`},end:{type:`number`,description:`Exclusive end byte offset`}},`Restrict scanning to a byte range (skip ELF headers, focus on a section, etc.)`).array(`customRules`,{type:`object`,properties:{category:{type:`string`,description:`Category bucket name for matched strings`},pattern:{type:`string`,description:`Regex source (anchored as needed)`},flags:{type:`string`,description:`Regex flags (must be in DART_ALLOWED_REGEX_FLAGS)`},exclude:{type:`string`,description:`Optional exclude regex applied before category match`},excludeFlags:{type:`string`,description:`Flags for the exclude regex`},confidence:{type:`number`,description:`Confidence weight in [0,1] carried onto each matching hit`},enableWhenFileNameMatches:{type:`string`,description:`Rule only fires when source basename matches this regex`},enableWhenFileNameFlags:{type:`string`,description:`Flags for enableWhenFileNameMatches`}},required:[`category`,`pattern`]},`Custom classification rules with safe regex compilation (ReDoS-guarded)`).required(`filePath`).query()),e(`dart_smi_scan`,e=>e.desc(`Recover Dart Small Integer (Smi) constants from a libapp.so by reading aligned little-endian words and stripping the heap-pointer tag bit.`).string(`filePath`,`Absolute path to the libapp.so (or arbitrary binary) to scan`).enum(`width`,[`4`,`8`],`Word width in bytes (4 for ARM32, 8 for ARM64)`,{default:`8`}).number(`stride`,"Bytes between consecutive scan positions; defaults to `width`").number(`minValue`,`Inclusive minimum decoded Smi value`,{default:1}).number(`maxValue`,`Inclusive maximum decoded Smi value`,{default:1e6}).boolean(`includeZero`,`Include decoded-to-zero hits`,{default:!1}).boolean(`includeNegative`,`Include decoded-to-negative hits`,{default:!1}).number(`maxResults`,`Cap on returned hits (truncates with truncated=true)`).number(`maxChunkBytes`,`Streaming chunk size in bytes`).object(`scanWindow`,{start:{type:`number`,description:`Inclusive start byte offset`},end:{type:`number`,description:`Exclusive end byte offset`}},`Restrict scanning to a byte range`).required(`filePath`).query()),e(`dart_symbolize`,e=>e.desc(`Resolve obfuscated Dart identifiers using a developer-supplied Flutter --save-obfuscation-map JSON (flat, pairs, or object shape).`).string(`obfuscationMapFile`,"Absolute path to the obfuscation-map.json emitted by `flutter build ... --extra-gen-snapshot-options=--save-obfuscation-map=FILE`. Optional: if omitted, auto-detected from apkPath or searchDir.").string(`apkPath`,`Absolute path to an APK to auto-scan for an obfuscation-map sidecar (obfuscation.txt/.map/.json, including under assets/flutter_assets/)`).string(`searchDir`,`Absolute path to a directory tree to auto-scan for an obfuscation-map sidecar`).array(`obfuscatedNames`,{type:`string`,description:`An obfuscated (or original, in reverse mode) identifier`},`List of identifiers to resolve against the map`).enum(`format`,[`auto`,`flat`,`pairs`,`object`],`Force a specific parser; auto sniffs the JSON shape`,{default:`auto`}).enum(`mode`,[`forward`,`reverse`],`Lookup direction (forward: obfuscated→original, reverse: original→obfuscated)`,{default:`forward`}).number(`maxMapBytes`,`Cap on map file size in bytes`,{default:16*1024*1024}).number(`maxLookups`,`Cap on number of lookups attempted (extras go to unresolved)`).required(`obfuscatedNames`).query()),e(`flutter_packages_detect`,e=>e.desc("Detect third-party Dart `package:` refs in a Flutter libapp.so, aggregated and SDK-stdlib-filtered.").string(`filePath`,`Absolute path to the libapp.so (or arbitrary binary) to scan`).boolean(`includeFlutterStdlib`,`Keep Flutter SDK packages in the result`,{default:!1}).boolean(`includeFiles`,"Emit the list of `package:foo/...` files per package",{default:!0}).boolean(`includeOffsets`,`Emit aggregated byte offsets per package`,{default:!1}).integer(`maxFilesPerPackage`,`Per-package file cap (excess marks filesTruncated)`,{minimum:1}).integer(`maxPackages`,`Global package cap (excess marks truncated:true)`,{minimum:1}).array(`extraStdlibPackages`,{type:`string`,minLength:1,maxLength:128},`Additional package names to treat as stdlib (filtered when includeFlutterStdlib=false)`).required(`filePath`).query()),e(`dart_snapshot_header_parse`,e=>e.desc(`Parse the Dart isolate snapshot header in a libapp.so: magic, kind, 32-byte hash, features, target arch. Read-only.`).string(`filePath`,`Absolute path to the libapp.so to parse`).number(`maxScanBytes`,`Upper bound on the byte-scan fallback (defaults to env)`,{minimum:0}).required(`filePath`).query()),e(`dart_version_fingerprint`,e=>e.desc(`Identify Flutter/Dart SDK release from a libapp.so by combining header parse with a built-in (and optionally user-supplied) hash table.`).string(`filePath`,`Absolute path to the libapp.so to fingerprint`).boolean(`includeFeatures`,`Include the raw features array in the response`,{default:!0}).string(`customTablePath`,`Optional path to a JSON file extending the built-in hash table (user wins on collision)`).required(`filePath`).query()),e(`dart_object_pool_dump`,e=>e.desc(`Read-only static dump of the Dart isolate ObjectPool in a libapp.so: classify each slot as smi/mint/double/string/classRef/functionRef/pool/null/unknown.`).string(`filePath`,`Absolute path to the libapp.so to dump`).number(`maxSlots`,`Upper bound on emitted slots (defaults to env)`,{minimum:1}).number(`previewBytes`,`String slot preview byte cap (defaults to env)`,{minimum:0}).string(`grammar`,`Force a cluster grammar by sdkFamily (e.g. "2.10", "2.17", "3.0+"); overrides auto-pick`).object(`fingerprint`,{flutterVersion:{type:`string`},dartSdkRev:{type:`string`},targetArch:{type:`string`}},`Optional pre-supplied snapshot fingerprint to skip internal lookup`).string(`typeFilter`,`Only return slots whose kind matches (e.g. "string", "smi", "functionRef", "classRef")`).string(`valueContains`,`Case-insensitive substring match against each slot decoded preview — collapses "is this key/URL/Smi in the pool?" to one call`).required(`filePath`).query()),e(`dart_load_snapshot`,e=>e.desc(`Load and parse a Dart AOT snapshot from libapp.so, extracting metadata and statistics (Code objects, ObjectPool entries, clusters). Pass a sessionId from dart_create_session to reuse an already-parsed snapshot (skips re-parsing libapp.so).`).string(`sessionId`,`Session id from dart_create_session (reuse cached snapshot)`).string(`apkPath`,`Absolute path to APK (extracts arm64-v8a/libapp.so)`).string(`libappPath`,`Absolute path to libapp.so directly`).query()),e(`dart_list_functions`,e=>e.desc(`List all Dart Code objects (compiled functions) from a loaded snapshot, with entry point address, size, and name (if available). Pass a sessionId to reuse a cached snapshot.`).string(`sessionId`,`Session id from dart_create_session (reuse cached snapshot)`).string(`apkPath`,`Absolute path to APK`).string(`libappPath`,`Absolute path to libapp.so`).number(`maxFunctions`,`Cap on returned functions (default: unlimited)`,{minimum:1}).query()),e(`dart_call_function`,e=>e.desc(`Execute a Dart function in the ARM64 emulator by address or name, with simplified runtime (mock built-ins, tagged pointers). Pass a sessionId to reuse the cached snapshot; the executor still initialises fresh CPU state per call (register state is never shared across calls).`).string(`sessionId`,`Session id from dart_create_session (reuse cached snapshot)`).string(`apkPath`,`Absolute path to APK`).string(`libappPath`,`Absolute path to libapp.so`).string(`functionAddress`,`Hex address of function entry point (e.g., "0x12345678")`).string(`functionName`,`Function name (if known, e.g., "main")`).array(`args`,{type:`string`,description:`Argument value as hex string (e.g., "0x0" for Smi(0))`},`Function arguments (Dart tagged pointers)`).number(`maxSteps`,`Maximum instruction steps before timeout`,{default:1e5,minimum:1}).boolean(`traceExecution`,`Emit instruction trace in response`,{default:!1}).query()),e(`dart_inspect_object_pool`,e=>e.desc(`Dump an ObjectPool at a specific address, showing all entries with types and values. Pass a sessionId to reuse a cached snapshot.`).string(`sessionId`,`Session id from dart_create_session (reuse cached snapshot)`).string(`apkPath`,`Absolute path to APK`).string(`libappPath`,`Absolute path to libapp.so`).string(`poolAddress`,`Hex address of ObjectPool (e.g., "0x12345678")`).required(`poolAddress`).query()),e(`dart_trace_execution`,e=>e.desc(`Trace Dart function execution step-by-step, emitting each instruction with register state (PC, x0-x30, PP, THR). Pass a sessionId to reuse the cached snapshot.`).string(`sessionId`,`Session id from dart_create_session (reuse cached snapshot)`).string(`apkPath`,`Absolute path to APK`).string(`libappPath`,`Absolute path to libapp.so`).string(`functionAddress`,`Hex address of function entry point`).string(`functionName`,`Function name (alternative to address)`).number(`maxSteps`,`Maximum steps to trace`,{default:1e3,minimum:1,maximum:1e5}).array(`args`,{type:`string`,description:`Argument as hex string`},`Function arguments`).query()),e(`dart_call_graph`,e=>e.desc(`Build a best-effort static call graph from a Dart AOT snapshot: nodes are Code objects, edges are ObjectPool entries whose value matches another Code entry point (caller to callee). Pass a sessionId to reuse a cached snapshot. Honest boundary: indirect/dynamic calls without a pool entry, and PcDescriptors-level mapping, require instruction decoding (deferred — cross-Dart-SDK version work).`).string(`sessionId`,`Session id from dart_create_session (reuse cached snapshot)`).string(`apkPath`,`Absolute path to APK`).string(`libappPath`,`Absolute path to libapp.so`).number(`maxEdges`,`Cap on emitted edges (excess sets truncated=true)`,{minimum:1}).query()),e(`dart_create_session`,e=>e.desc(`Parse a Dart AOT snapshot once and cache it under a sessionId, so subsequent dart_load_snapshot / dart_list_functions / dart_call_graph / dart_inspect_object_pool / dart_call_function / dart_trace_execution calls can pass sessionId and skip re-parsing libapp.so (the dominant cost on a 10-40 MB Flutter snapshot). Destroy with dart_destroy_session when done; idle sessions auto-expire (TTL + sweep, see DART_SESSION_*).`).string(`apkPath`,`Absolute path to APK (extracts arm64-v8a/libapp.so)`).string(`libappPath`,`Absolute path to libapp.so directly`).required(`apkPath|libappPath`).query()),e(`dart_pc_descriptors`,e=>e.desc(`Parse PcDescriptors for one or all Dart functions in a loaded snapshot and resolve call targets by decoding ARM64 BL instructions at each call-site PC offset. Returns structured call-site entries with pcOffset, kind (1=icCall, 2=unoptStaticCall, 3=runtimeCall), and optionally resolved target addresses when code section bytes are available. Pass a sessionId or file path to load the snapshot.`).string(`sessionId`,`Session id from dart_create_session (reuse cached snapshot)`).string(`apkPath`,`Absolute path to APK`).string(`libappPath`,`Absolute path to libapp.so`).string(`functionName`,`Only return PcDescriptors for this named function; omit for all functions`).string(`functionAddress`,`Only return PcDescriptors for the function at this hex entry point`).boolean(`resolveTargets`,`Decode ARM64 BL instructions and resolve call targets`,{default:!0}).boolean(`callSitesOnly`,`Only return entries with call-site kinds (icCall/unoptStaticCall/runtimeCall)`,{default:!0}).number(`maxResults`,`Cap on total entries returned`,{minimum:1}).query()),e(`dart_destroy_session`,e=>e.desc(`Destroy a Dart snapshot session created by dart_create_session, releasing the cached parsed snapshot. Returns destroyed=true if the session existed, false if it was unknown or already swept by the idle TTL.`).string(`sessionId`,`Session id returned by dart_create_session`).required(`sessionId`).query())];export{t};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{i as e,n as t}from"./parse-args-B6dwWc9k.mjs";import{n,r}from"./cdp-session-Dy4OwMOP.mjs";async function i(e){try{return(await e.send(`Runtime.evaluate`,{expression:`typeof %DebugTrace === "function" && typeof %TraceDeoptimizations === "function"`,returnByValue:!0,awaitPromise:!1}))?.result?.value===!0}catch{return!1}}async function a(a,o){let s=e(a,`durationMs`,5e3),c=Math.min(6e4,Math.max(100,Number.isFinite(s)?s:5e3)),l=e(a,`maxEvents`,50),u=Math.min(1e3,Math.max(1,Number.isFinite(l)?l:50)),d=t(a,`enable`,!0),{session:f,owned:p}=await r(n(o));if(!f)return{success:!1,error:`No CDP session available — browser must be connected via browser_launch or browser_attach`,mode:`unavailable`,traceEnabled:!1,durationMs:0,events:[],eventCount:0,summary:`CDP session unavailable`};if(!await i(f))return p&&await f.detach().catch(()=>{}),{success:!0,mode:`unavailable`,traceEnabled:!1,durationMs:0,events:[],eventCount:0,summary:`V8 natives syntax (%TraceDeoptimizations) not available in this target`,note:`Try launching Chrome with --js-flags="--allow-natives-syntax" or --no-sandbox for deopt tracing.`};let m=[],h=Date.now(),g=e=>{let t=e.type,n=Array.isArray(e.args)?e.args:[];if(!(t!==`log`&&t!==`verbose`&&t!==`info`))for(let e of n){if(typeof e!=`object`||!e)continue;let t=e.description;if(typeof t!=`string`||!/deoptim/i.test(t))continue;let n=t.match(/<JS Function ([^()<]+)/),r=t.match(/DEOPT (\w+)/),i=t.match(/deoptimize at [^:]+:(\d+):(\d+)/),a=n?.[1]?.trim()??`<anonymous>`,o=r?.[1]??`unknown`,s=i?.[1];if(m.push({timestamp:Date.now()-h,functionName:a,reason:o,sourcePosition:s?Number(s):void 0}),m.length>=u)return}},_=f;try{await f.send(`Runtime.enable`).catch(()=>{}),typeof _.on==`function`&&_.on(`Runtime.consoleAPICalled`,g),d&&await f.send(`Runtime.evaluate`,{expression:`
|
|
2
|
+
(() => {
|
|
3
|
+
if (typeof %TraceDeoptimizations === 'function') {
|
|
4
|
+
%TraceDeoptimizations(true);
|
|
5
|
+
return true;
|
|
6
|
+
}
|
|
7
|
+
return false;
|
|
8
|
+
})()
|
|
9
|
+
`,returnByValue:!0,awaitPromise:!1});let e=Date.now()-h,t=Math.max(0,Math.min(c,1e4)-e);t>0&&await new Promise(e=>setTimeout(e,t)),d&&await f.send(`Runtime.evaluate`,{expression:`
|
|
10
|
+
(() => {
|
|
11
|
+
if (typeof %TraceDeoptimizations === 'function') {
|
|
12
|
+
%TraceDeoptimizations(false);
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
return false;
|
|
16
|
+
})()
|
|
17
|
+
`,returnByValue:!0,awaitPromise:!1}).catch(()=>{})}catch{}finally{typeof _.off==`function`?_.off(`Runtime.consoleAPICalled`,g):typeof _.removeListener==`function`&&_.removeListener(`Runtime.consoleAPICalled`,g),p&&await f.detach().catch(()=>{})}let v=Date.now()-h,y=new Set(m.map(e=>e.functionName)),b=[];return m.length>0?(b.push(`${m.length} deopt events`),b.push(`${y.size} unique functions affected`)):b.push(`No deopt events captured during trace window`),{success:!0,mode:`natives`,traceEnabled:d,durationMs:v,events:m.slice(0,u),eventCount:m.length,summary:b.join(`; `)}}export{a as handleDeoptTrace};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-88NL7fhV.mjs";import*as t from"node:fs";import n from"@alexaltea/capstone-js";var r=e({Disassembler:()=>s});let i=null,a=null;async function o(){if(i)return i;if(a)throw a;try{return i=await n(),i}catch(e){throw a=e,e}}var s=class{async disassemble(e,t){try{let n=await o(),r,i;switch(t.arch){case`x86`:r=n.ARCH_X86,i=n.MODE_32;break;case`x64`:r=n.ARCH_X86,i=n.MODE_64;break;case`arm`:r=n.ARCH_ARM,i=n.MODE_ARM;break;case`arm64`:r=n.ARCH_ARM64,i=n.MODE_ARM;break;default:throw Error(`Unsupported architecture: ${t.arch}`)}t.mode===`big`?i|=n.MODE_BIG_ENDIAN:i|=n.MODE_LITTLE_ENDIAN;let a=new n.Capstone(r,i),s=new Uint8Array(e),c=BigInt(t.offset||0),l=a.disasm(s,c,t.count).map(e=>({address:Number(e.address),mnemonic:e.mnemonic,opStr:e.op_str,bytes:Buffer.from(e.bytes)}));return a.close(),l}catch{return t.arch===`x64`||t.arch===`x86`?this.disassembleFallback(e,t):[]}}disassembleFallback(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i===144)n.push({address:(t.offset||0)+r,mnemonic:`nop`,opStr:``,bytes:Buffer.from([i])});else if(i===195)n.push({address:(t.offset||0)+r,mnemonic:`ret`,opStr:``,bytes:Buffer.from([i])});else if(i===204)n.push({address:(t.offset||0)+r,mnemonic:`int3`,opStr:``,bytes:Buffer.from([i])});else if(i>=80&&i<=87){let e=t.arch===`x64`?[`rax`,`rcx`,`rdx`,`rbx`,`rsp`,`rbp`,`rsi`,`rdi`]:[`eax`,`ecx`,`edx`,`ebx`,`esp`,`ebp`,`esi`,`edi`];n.push({address:(t.offset||0)+r,mnemonic:`push`,opStr:e[i-80],bytes:Buffer.from([i])})}else if(i>=88&&i<=95){let e=t.arch===`x64`?[`rax`,`rcx`,`rdx`,`rbx`,`rsp`,`rbp`,`rsi`,`rdi`]:[`eax`,`ecx`,`edx`,`ebx`,`esp`,`ebp`,`esi`,`edi`];n.push({address:(t.offset||0)+r,mnemonic:`pop`,opStr:e[i-88],bytes:Buffer.from([i])})}}return n}async disassembleFile(e,n){if(!t.existsSync(e))throw Error(`Binary file not found: ${e}`);let r=t.readFileSync(e);return this.disassemble(r,n)}formatInstruction(e){return`${`0x${e.address.toString(16).padStart(8,`0`)}`}: ${e.bytes.toString(`hex`).padEnd(16,` `)} ${e.opStr?`${e.mnemonic} ${e.opStr}`:e.mnemonic}`}};export{r as n,s as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e,t){let n=e.split(`
|
|
2
|
+
`),r=[],i=null,a={},o=[],s=null,c=[];function l(){i??={name:t||`default`,entries:{},subsections:[]}}function u(){s&&c.length>0&&(a[s]=c),s=null,c=[]}function d(){i&&(u(),i.entries=a,i.subsections=o,r.push(i)),a={},o=[]}for(let e of n){let t=e.trimEnd();if(t.trim().length===0&&!s)continue;let n=t.match(/^DUMP OF SERVICE\s+(.+?)(?:\s*\(.*\))?\s*$/i);if(n){d(),i={name:n[1].trim(),entries:{},subsections:[]};continue}if(/^\s*-{3,}/.test(t)&&i)continue;let r=t.match(/^\s*([A-Za-z_][A-Za-z0-9_.\s-]{0,80})[=:]\s*(.+)$/);if(r&&!s){l();let e=r[1].trim(),t=r[2].trim();if(t.startsWith(`[`)&&t.endsWith(`]`)){let n=t.slice(1,-1);a[e]=n.split(`,`).map(e=>e.trim()).filter(Boolean)}else a[e]=t;continue}if(t.length>0&&t[0]===` `&&s){let e=t.trim();e.length>0&&c.push(e);continue}let o=t.match(/^\s*([A-Za-z_][A-Za-z0-9_.\s-]{0,60}):\s*$/);if(o){u(),s=o[1].trim(),c=[];continue}}return d(),{service:t,sections:r,sectionCount:r.length}}export{e as parseDumpsys};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as e,i as t,r as n}from"./parse-args-B6dwWc9k.mjs";import{r}from"./ResponseBuilder-BLicSCjn.mjs";import"./definitions-CCvIcRrT.mjs";import{homedir as i,tmpdir as a}from"node:os";import{isAbsolute as o,resolve as s}from"node:path";import{readFile as c,realpath as l}from"node:fs/promises";import{brotliCompressSync as u,brotliDecompressSync as d,deflateRawSync as ee,deflateSync as te,gunzipSync as f,gzipSync as p,inflateRawSync as m,inflateSync as ne}from"node:zlib";function h(e,t,n){let r=[],i=0,a=0;for(;i<e.length;){let o=g(e,i);if(o.error)return{fields:r,bytesConsumed:i,error:o.error};let s=o.value;i=o.offset;let c=Number(s>>3n),l=Number(s&7n);if(c<=0)return{fields:r,bytesConsumed:i,error:`Invalid field number ${c} at offset ${i}`};if(l===0){let t=g(e,i);if(t.error)return{fields:r,bytesConsumed:i,error:t.error};i=t.offset,r.push({index:a,fieldNumber:c,wireType:l,wireTypeName:_(l),value:v(t.value)})}else if(l===1){if(i+8>e.length)return{fields:r,bytesConsumed:i,error:`Unexpected EOF for fixed64 at offset ${i}`};let t=e.subarray(i,i+8),n=t.readBigUInt64LE(0);i+=8,r.push({index:a,fieldNumber:c,wireType:l,wireTypeName:_(l),value:{uint64:v(n),hex:t.toString(`hex`)}})}else if(l===2){let o=g(e,i);if(o.error)return{fields:r,bytesConsumed:i,error:o.error};i=o.offset;let s=o.value;if(s>BigInt(2**53-1))return{fields:r,bytesConsumed:i,error:`Length-delimited field is too large at offset ${i}`};let u=Number(s);if(u<0||i+u>e.length)return{fields:r,bytesConsumed:i,error:`Invalid length-delimited field length=${u} at offset ${i}`};let d=e.subarray(i,i+u);i+=u,r.push({index:a,fieldNumber:c,wireType:l,wireTypeName:_(l),value:re(d,t,n)})}else if(l===5){if(i+4>e.length)return{fields:r,bytesConsumed:i,error:`Unexpected EOF for fixed32 at offset ${i}`};let t=e.subarray(i,i+4),n=t.readUInt32LE(0);i+=4,r.push({index:a,fieldNumber:c,wireType:l,wireTypeName:_(l),value:{uint32:n,hex:t.toString(`hex`)}})}else return{fields:r,bytesConsumed:i,error:`Unsupported wire type ${l} at offset ${i}`};a+=1}return{fields:r,bytesConsumed:i}}function re(e,t,n){if(e.length===0)return{kind:`empty`,length:0};if(t<n){let r=h(e,t+1,n);if(!r.error&&r.bytesConsumed===e.length&&r.fields.length>0)return{kind:`message`,fields:r.fields}}let r=y(e);return r!==null&&b(r)?{kind:`string`,value:r}:{kind:`bytes`,length:e.length,hex:e.toString(`hex`),base64:e.toString(`base64`)}}function g(e,t){let n=0n,r=0n,i=t;for(let t=0;t<10;t+=1){let t=e[i];if(t===void 0)return{error:`Unexpected EOF while parsing varint at offset ${i}`};let a=BigInt(t);if(n|=(a&127n)<<r,i+=1,(a&128n)==0n)return{value:n,offset:i};r+=7n}return{error:`Varint exceeds 10 bytes at offset ${t}`}}function _(e){return e===0?`varint`:e===1?`fixed64`:e===2?`length-delimited`:e===5?`fixed32`:`unknown`}function v(e){let t=BigInt(2**53-1),n=BigInt(-(2**53-1));return e<=t&&e>=n?Number(e):e.toString()}function y(e){let t=e.toString(`utf8`);return(t.match(/\uFFFD/g)??[]).length>0?null:t}function b(e){if(e.length===0)return!0;let t=0;for(let n of e){let e=n.charCodeAt(0);(e>=32&&e<=126||e===9||e===10||e===13)&&(t+=1)}return t/e.length>=.85}function x(e){let t=S(e,0,0);if(t.offset!==e.length)throw Error(`MessagePack decode ended early: consumed ${t.offset} of ${e.length} bytes`);return t.value}function S(e,t,n){if(n>64)throw Error(`MessagePack decode depth exceeds safety limit`);let r=e[t];if(r===void 0)throw Error(`Unexpected EOF at offset ${t}`);let i=t+1;if(r<=127)return{value:r,offset:i};if(r>=224)return{value:r-256,offset:i};if(r>=160&&r<=191){let t=r&31;return T(e,i,t),{value:e.subarray(i,i+t).toString(`utf8`),offset:i+t}}if(r>=144&&r<=159){let t=r&15;return C(e,i,t,n+1)}if(r>=128&&r<=143){let t=r&15;return w(e,i,t,n+1)}if(r===192)return{value:null,offset:i};if(r===194)return{value:!1,offset:i};if(r===195)return{value:!0,offset:i};if(r===204)return T(e,i,1),{value:e.readUInt8(i),offset:i+1};if(r===205)return T(e,i,2),{value:e.readUInt16BE(i),offset:i+2};if(r===206)return T(e,i,4),{value:e.readUInt32BE(i),offset:i+4};if(r===207)return T(e,i,8),{value:v(e.readBigUInt64BE(i)),offset:i+8};if(r===208)return T(e,i,1),{value:e.readInt8(i),offset:i+1};if(r===209)return T(e,i,2),{value:e.readInt16BE(i),offset:i+2};if(r===210)return T(e,i,4),{value:e.readInt32BE(i),offset:i+4};if(r===211)return T(e,i,8),{value:v(e.readBigInt64BE(i)),offset:i+8};if(r===202)return T(e,i,4),{value:e.readFloatBE(i),offset:i+4};if(r===203)return T(e,i,8),{value:e.readDoubleBE(i),offset:i+8};if(r===217){T(e,i,1);let t=e.readUInt8(i);return i+=1,T(e,i,t),{value:e.subarray(i,i+t).toString(`utf8`),offset:i+t}}if(r===218){T(e,i,2);let t=e.readUInt16BE(i);return i+=2,T(e,i,t),{value:e.subarray(i,i+t).toString(`utf8`),offset:i+t}}if(r===219){T(e,i,4);let t=e.readUInt32BE(i);return i+=4,T(e,i,t),{value:e.subarray(i,i+t).toString(`utf8`),offset:i+t}}if(r===196){T(e,i,1);let t=e.readUInt8(i);i+=1,T(e,i,t);let n=e.subarray(i,i+t);return{value:{type:`bytes`,base64:n.toString(`base64`),hex:n.toString(`hex`)},offset:i+t}}if(r===197){T(e,i,2);let t=e.readUInt16BE(i);i+=2,T(e,i,t);let n=e.subarray(i,i+t);return{value:{type:`bytes`,base64:n.toString(`base64`),hex:n.toString(`hex`)},offset:i+t}}if(r===198){T(e,i,4);let t=e.readUInt32BE(i);i+=4,T(e,i,t);let n=e.subarray(i,i+t);return{value:{type:`bytes`,base64:n.toString(`base64`),hex:n.toString(`hex`)},offset:i+t}}if(r===220){T(e,i,2);let t=e.readUInt16BE(i);return i+=2,C(e,i,t,n+1)}if(r===221){T(e,i,4);let t=e.readUInt32BE(i);return i+=4,C(e,i,t,n+1)}if(r===222){T(e,i,2);let t=e.readUInt16BE(i);return i+=2,w(e,i,t,n+1)}if(r===223){T(e,i,4);let t=e.readUInt32BE(i);return i+=4,w(e,i,t,n+1)}if(r>=212&&r<=216){let t={212:1,213:2,214:4,215:8,216:16}[r];T(e,i,1+t);let n=e.readInt8(i),a=e.subarray(i+1,i+1+t);return{value:{type:`ext`,extType:n,base64:a.toString(`base64`),hex:a.toString(`hex`)},offset:i+1+t}}if(r===199||r===200||r===201){let t=r===199?1:r===200?2:4;T(e,i,t);let n=t===1?e.readUInt8(i):t===2?e.readUInt16BE(i):e.readUInt32BE(i);i+=t,T(e,i,1+n);let a=e.readInt8(i),o=e.subarray(i+1,i+1+n);return{value:{type:`ext`,extType:a,base64:o.toString(`base64`),hex:o.toString(`hex`)},offset:i+1+n}}throw Error(`Unsupported MessagePack prefix 0x${r.toString(16)} at offset ${t}`)}function C(e,t,n,r){let i=t,a=[];for(let t=0;t<n;t+=1){let t=S(e,i,r);a.push(t.value),i=t.offset}return{value:a,offset:i}}function w(e,t,n,r){let i=t,a={};for(let t=0;t<n;t+=1){let t=S(e,i,r);i=t.offset;let n=S(e,i,r);i=n.offset;let o=ie(t.value);a[o]=n.value}return{value:a,offset:i}}function ie(e){if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e);if(typeof e==`bigint`)return e.toString();if(e===null)return`null`;try{return JSON.stringify(e)}catch{return String(e)}}function T(e,t,n){if(t<0||n<0||t+n>e.length)throw Error(`Unexpected EOF while reading ${n} bytes at offset ${t}`)}const E=[{format:`png`,bytes:[137,80,78,71]},{format:`jpeg`,bytes:[255,216,255]},{format:`gif`,bytes:[71,73,70]},{format:`wasm`,bytes:[0,97,115,109]},{format:`zip/apk`,bytes:[80,75,3,4]},{format:`pdf`,bytes:[37,80,68,70]},{format:`gzip`,bytes:[31,139]},{format:`elf`,bytes:[127,69,76,70]},{format:`pe/dos`,bytes:[77,90]},{format:`mach-o-32be`,bytes:[254,237,250,206]},{format:`mach-o-32le`,bytes:[206,250,237,254]},{format:`mach-o-64be`,bytes:[254,237,250,207]},{format:`mach-o-64le`,bytes:[207,250,237,254]},{format:`bmp`,bytes:[66,77]},{format:`webp`,bytes:[87,69,66,80],offset:8},{format:`zstd`,bytes:[40,181,47,253]},{format:`cbor-self-described`,bytes:[217,217,247]}],D=new Set([`base64`,`hex`,`file`,`raw`]),O=new Set([`base64`,`hex`,`raw`,`file`]),ae=new Set([`base64`,`base32`,`base32hex`,`base32-crockford`,`base58`,`base85`,`hex`,`url`,`gzip`,`zlib`,`deflate`,`brotli`,`protobuf`,`msgpack`]),oe=new Set([`hex`,`utf8`,`json`]),se=new Set([`utf8`,`hex`,`json`]),ce=new Set([`base64`,`base32`,`base32hex`,`base32-crockford`,`base58`,`base85`,`hex`,`url`,`gzip`,`zlib`,`deflate`,`brotli`]);function k(e){return{content:[{type:`text`,text:JSON.stringify(e,null,2)}]}}function A(e,t){return k({success:!1,tool:e,error:t instanceof Error?t.message:String(t)})}function j(e){let t=e.trim().replace(/^0x/i,``).replace(/[\s:,-]/g,``);if(t.length===0)return Buffer.alloc(0);if(t.length%2!=0||!/^[0-9a-fA-F]+$/.test(t))throw Error(`Invalid hex string`);return Buffer.from(t,`hex`)}function M(e){let t=e.trim().replace(/\s+/g,``);if(t.length===0)return Buffer.alloc(0);if(!F(t))throw Error(`Invalid base64 string`);return Buffer.from(t,`base64`)}function N(e){let t=e.trim();return t.length===0?Buffer.alloc(0):P(t)?j(t):F(t)?M(t):Buffer.from(t,`utf8`)}function P(e){let t=e.trim().replace(/^0x/i,``).replace(/[\s:,-]/g,``);return t.length>0&&t.length%2==0&&/^[0-9a-fA-F]+$/.test(t)}function F(e){let t=e.trim().replace(/\s+/g,``);if(t.length===0||t.length%4!=0||!/^[A-Za-z0-9+/]*={0,2}$/.test(t))return!1;try{let e=Buffer.from(t,`base64`);return t.replace(/=+$/,``)===e.toString(`base64`).replace(/=+$/,``)}catch{return!1}}function I(e){return/%[0-9a-fA-F]{2}/.test(e)||/\+/.test(e)}function L(e){return decodeURIComponent(e.replace(/\+/g,`%20`))}function R(e){let t=``;for(let n of e.values())t+=n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===45||n===46||n===95||n===126?String.fromCharCode(n):`%${n.toString(16).toUpperCase().padStart(2,`0`)}`;return t}const z={base32:`ABCDEFGHIJKLMNOPQRSTUVWXYZ234567`,base32hex:`0123456789ABCDEFGHIJKLMNOPQRSTUV`,"base32-crockford":`0123456789ABCDEFGHJKMNPQRSTVWXYZ`},B=`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`;function V(e,t=`base32`){let n=z[t];if(e.length===0)return``;let r=``,i=0,a=0;for(let t of e.values())for(i=i<<8|t,a+=8;a>=5;)r+=n[i>>>a-5&31],a-=5;if(a>0&&(r+=n[i<<5-a&31]),t!==`base32-crockford`)for(;r.length%8!=0;)r+=`=`;return r}function H(e,t=`base32`){let n=z[t],r=new Map;for(let e=0;e<n.length;e+=1)r.set(n[e],e);let i=e.trim().replace(/[\s-]/g,``).replace(/=+$/g,``).toUpperCase();if(t===`base32-crockford`&&(i=i.replace(/[IL]/g,`1`).replace(/O/g,`0`)),i.length===0)return Buffer.alloc(0);let a=[],o=0,s=0;for(let e of i){let n=r.get(e);if(n===void 0)throw Error(`Invalid ${t} character: ${e}`);o=o<<5|n,s+=5,s>=8&&(a.push(o>>>s-8&255),s-=8,o&=(1<<s)-1)}if(s>0&&o!==0)throw Error(`Invalid ${t} padding bits`);return Buffer.from(a)}function U(e){if(e.length===0)return``;let t=0;for(;t<e.length&&e[t]===0;)t+=1;let n=0n;for(let t of e.values())n=n<<8n|BigInt(t);let r=``;for(;n>0n;)r=B[Number(n%58n)]+r,n/=58n;return`${`1`.repeat(t)}${r}`}function W(e){let t=e.trim();if(t.length===0)return Buffer.alloc(0);let n=0n;for(let e of t){let t=B.indexOf(e);if(t===-1)throw Error(`Invalid base58 character: ${e}`);n=n*58n+BigInt(t)}let r=[];for(;n>0n;)r.unshift(Number(n&255n)),n>>=8n;let i=0;for(;i<t.length&&t[i]===`1`;)i+=1;return Buffer.from([...Array.from({length:i},()=>0),...r])}function G(e){if(e.length===0)return``;let t=``;for(let n=0;n<e.length;n+=4){let r=e.subarray(n,n+4),i=Buffer.alloc(4);r.copy(i);let a=i.readUInt32BE(0);if(r.length===4&&a===0){t+=`z`;continue}let o=Array.from({length:5},()=>0),s=a;for(let e=4;e>=0;--e)o[e]=s%85+33,s=Math.floor(s/85);t+=String.fromCharCode(...o.slice(0,r.length+1))}return t}function le(e){let t=e.trim().replace(/^<~/,``).replace(/~>$/,``).replace(/\s+/g,``);if(t.length===0)return Buffer.alloc(0);let n=[],r=[],i=(e=!1)=>{if(r.length===0)return;if(r.length===1)throw Error(`Invalid base85 tuple length`);let t=r.length;for(;r.length<5;)r.push(84);let i=0;for(let e of r)i=i*85+e;let a=Buffer.alloc(4);a.writeUInt32BE(i>>>0,0),n.push(...a.subarray(0,e?t-1:4)),r=[]};for(let e of t){if(e===`z`){if(r.length!==0)throw Error(`Invalid base85 zero tuple position`);n.push(0,0,0,0);continue}let t=e.charCodeAt(0);if(t<33||t>117)throw Error(`Invalid base85 character: ${e}`);r.push(t-33),r.length===5&&i(!1)}return i(!0),Buffer.from(n)}function ue(e){let t=e.toString(`utf8`);return(t.match(/\uFFFD/g)??[]).length>0?null:t}function K(e){try{return JSON.parse(e)}catch{return null}}function de(e,t){return Array.from(e.subarray(0,t).values()).map(e=>e.toString(16).padStart(2,`0`)).join(` `)}function q(e,t=16){let n=[];for(let r=0;r<e.length;r+=t){let i=e.subarray(r,r+t),a=Array.from(i.values()).map(e=>e.toString(16).padStart(2,`0`)).join(` `),o=Array.from(i.values()).map(e=>e>=32&&e<=126?String.fromCharCode(e):`.`).join(``);n.push(`${r.toString(16).padStart(8,`0`)} ${a.padEnd(47)} |${o}|`)}return n.join(`
|
|
2
|
+
`)}function J(e){let{encoding:t,outputFormat:n,buffer:r,jsonValue:i}=e;if(n===`hex`)return k({success:!0,encoding:t,outputFormat:n,byteLength:r.length,result:r.toString(`hex`),hexDump:q(r)});if(n===`utf8`)return k({success:!0,encoding:t,outputFormat:n,byteLength:r.length,result:r.toString(`utf8`)});let a=ue(r),o=a===null?null:K(a);return k({success:!0,encoding:t,outputFormat:n,byteLength:r.length,result:i??{parsedJson:o,utf8:a,hex:r.toString(`hex`)}})}async function Y(e){let{source:t,data:n,filePath:r,maxBytes:u}=e;if(t===`file`){if(!r)throw Error(`filePath is required when source=file`);let e=await l(s(r));if(!(await Promise.all([a(),i(),process.cwd()].map(async e=>{let t=o(e)?e:s(e);try{return await l(t)}catch{return t}}))).some(t=>e.startsWith(t)))throw Error(`File access denied: path "${r}" is outside allowed directories`);let t=await c(e);return typeof u==`number`?t.subarray(0,u):t}if(t===`base64`){if(!n)throw Error(`data is required for base64 source`);return M(n)}if(t===`hex`){if(!n)throw Error(`data is required for hex source`);return j(n)}return Buffer.from(n??``,`utf8`)}async function fe(e,t){try{let n=await(await e.getActivePage()).evaluate(e=>{let t=t=>{if(!t||typeof t!=`object`)return null;let n=t;if(n.requestId!==e)return null;if(typeof n.responseBody==`string`)return{body:n.responseBody,base64Encoded:!!n.base64Encoded};if(typeof n.body==`string`)return{body:n.body,base64Encoded:!!n.base64Encoded};let r=n.response;if(r&&typeof r==`object`){let e=r;if(typeof e.body==`string`)return{body:e.body,base64Encoded:!!e.base64Encoded}}return null},n=e=>{if(!Array.isArray(e))return null;for(let n of e){let e=t(n);if(e)return e}return null},r=n(window.__capturedAPIs);if(r)return r;try{let e=window.localStorage.getItem(`__capturedAPIs`);return e?n(JSON.parse(e)):null}catch{return null}},t);if(!n||typeof n!=`object`)return null;let r=n;if(typeof r.body!=`string`)return null;if(r.base64Encoded)return Buffer.from(r.body,`base64`);let i=r.body.trim();return F(i)?Buffer.from(i,`base64`):Buffer.from(r.body,`utf8`)}catch{return null}}function pe(e){let t=[];for(let n of E){let r=n.offset??0;if(e.length<r+n.bytes.length)continue;let i=!0;for(let t=0;t<n.bytes.length;t+=1)if(e[r+t]!==n.bytes[t]){i=!1;break}i&&t.push(n.format)}return e.length>=2&&e[0]===120&&[1,94,156,218].includes(e[1])&&t.push(`zlib`),t}function X(e){let t=e[0];if(t===void 0)return[];let n=new Set;return[8,16,24,32].includes(t)&&n.add(`protobuf`),(t>=128&&t<=143||t>=144&&t<=159||t>=160&&t<=191)&&n.add(`messagepack`),(t>=160&&t<=191||t>=128&&t<=159)&&n.add(`cbor`),Array.from(n)}function me(e,t,n){let r=new Set;if((e===`base64`||t&&F(t.trim()))&&r.add(`base64`),(e===`hex`||t&&P(t))&&r.add(`hex`),t&&I(t)&&r.add(`url-encoded`),n.length>=3){let[e,t,i]=n;e===239&&t===187&&i===191&&r.add(`utf8-bom`)}return Array.from(r)}function Z(e){if(e.length===0)return 0;let t=Array.from({length:256},()=>0);for(let n of e.values())t[n]+=1;let n=0;for(let r of t){if(r===0)continue;let t=r/e.length;n-=t*Math.log2(t)}return Number(n.toFixed(6))}function Q(e){if(e.length===0)return[];let t=Array.from({length:256},()=>0);for(let n of e.values())t[n]+=1;let n=[];for(let r=0;r<256;r+=1){let i=t[r];i!==0&&n.push({byte:`0x${r.toString(16).padStart(2,`0`)}`,count:i,ratio:Number((i/e.length).toFixed(6))})}return n.sort((e,t)=>t.count-e.count),n}function he(e,t){if(e.length===0)return[];let n=[],r=0;for(let i=0;i<e.length;i+=t){let a=Math.min(i+t,e.length);n.push({index:r,start:i,end:a,entropy:Z(e.subarray(i,a))}),r+=1}return n}function $(e,t){let n=ve(t);return e<3.8&&n>.85?`plaintext`:e<5.8?`encoded`:e<7.2?`compressed`:e<7.8?`encrypted`:`random`}function ge(e){if(e.length===0)return 0;let t=Array.from({length:256},()=>0);for(let n of e.values())t[n]+=1;let n=e.length/256,r=0;for(let e=0;e<256;e+=1){let i=t[e]-n;r+=i*i/n}return Number(r.toFixed(6))}function _e(e){if(e.length<2)return 0;let t=e.length,n=0,r=0,i=0,a=0;for(let o=0;o<t-1;o+=1){let t=e[o],s=e[o+1];n+=t*s,r+=t*t,i+=t,a+=s}r+=e[t-1]*e[t-1];let o=t*r-i*i;if(o===0)return 0;let s=t*n-i*a;return Number((s/o).toFixed(6))}function ve(e){if(e.length===0)return 1;let t=0;for(let n of e.values())(n>=32&&n<=126||n===9||n===10||n===13)&&(t+=1);return t/e.length}function ye(e,t){switch(e){case`base64`:return M(t);case`base32`:return H(t,`base32`);case`base32hex`:return H(t,`base32hex`);case`base32-crockford`:return H(t,`base32-crockford`);case`base58`:return W(t);case`base85`:return le(t);case`hex`:return j(t);case`gzip`:return f(N(t));case`zlib`:return ne(N(t));case`deflate`:return m(N(t));case`brotli`:return d(N(t));default:return N(t)}}function be(e,t){switch(e){case`base64`:return{output:t.toString(`base64`)};case`base32`:return{output:V(t,`base32`)};case`base32hex`:return{output:V(t,`base32hex`)};case`base32-crockford`:return{output:V(t,`base32-crockford`)};case`base58`:return{output:U(t)};case`base85`:return{output:G(t)};case`hex`:return{output:t.toString(`hex`)};case`url`:return{output:R(t)};case`gzip`:{let e=p(t);return{output:e.toString(`base64`),outputTransport:`base64`,outputByteLength:e.length}}case`zlib`:{let e=te(t);return{output:e.toString(`base64`),outputTransport:`base64`,outputByteLength:e.length}}case`deflate`:{let e=ee(t);return{output:e.toString(`base64`),outputTransport:`base64`,outputByteLength:e.length}}case`brotli`:{let e=u(t);return{output:e.toString(`base64`),outputTransport:`base64`,outputByteLength:e.length}}default:return{output:R(t)}}}var xe=class{collector;responseBodyResolver;constructor(e,t){this.collector=e,this.responseBodyResolver=t}async resolveCapturedRequestBody(e){if(this.responseBodyResolver)try{let t=await this.responseBodyResolver(e);if(t&&typeof t.body==`string`){if(t.base64Encoded)return Buffer.from(t.body,`base64`);let e=t.body.trim();return F(e)?Buffer.from(e,`base64`):Buffer.from(t.body,`utf8`)}}catch{}return fe(this.collector,e)}async handleBinaryDetectFormatTool(e){return r(async()=>await this.handleBinaryDetectFormat(e))}async handleBinaryDecodeTool(e){return r(async()=>await this.handleBinaryDecode(e))}async handleBinaryEncodeTool(e){return r(async()=>await this.handleBinaryEncode(e))}async handleBinaryEntropyAnalysisTool(e){return r(async()=>await this.handleBinaryEntropyAnalysis(e))}async handleProtobufDecodeRawTool(e){return r(async()=>await this.handleProtobufDecodeRaw(e))}async handleBinaryDetectFormat(t){try{let r=n(t,`source`,D,`raw`),i=e(t,`data`),a=e(t,`filePath`),o=e(t,`requestId`),s=null,c=!1;if(r===`raw`&&o&&(s=await this.resolveCapturedRequestBody(o),c=s!==null),!s){if(r!==`file`&&!i)throw Error(`data is required for non-file source when requestId payload is unavailable`);s=await Y({source:r,data:i,filePath:a,maxBytes:r===`file`?512:void 0})}let l=Z(s);return k({success:!0,source:r,requestId:o??null,requestBodyUsed:c,byteLength:s.length,previewHex:de(s,64),magicFormats:pe(s),structuredFormats:X(s),encodingSignals:me(r,i,s),entropy:l,assessment:$(l,s),topBytes:Q(s).slice(0,8)})}catch(e){return A(`binary_detect_format`,e)}}async handleBinaryDecode(t){try{let r=e(t,`data`,``),i=n(t,`encoding`,ae),a=n(t,`outputFormat`,oe,`hex`);if(!r)throw Error(`data is required`);if(!i)throw Error(`encoding is required`);if(i===`url`){let e=L(r);if(a===`hex`){let t=Buffer.from(e,`utf8`);return k({success:!0,encoding:i,outputFormat:a,byteLength:t.length,result:t.toString(`hex`),hexDump:q(t)})}return k(a===`utf8`?{success:!0,encoding:i,outputFormat:a,result:e}:{success:!0,encoding:i,outputFormat:a,result:K(e)??{text:e}})}let o=ye(i,r);if(i===`protobuf`){let e=h(o,0,5);return J({encoding:i,outputFormat:a,buffer:o,jsonValue:{fields:e.fields,bytesConsumed:e.bytesConsumed,error:e.error??null}})}return J(i===`msgpack`?{encoding:i,outputFormat:a,buffer:o,jsonValue:x(o)}:{encoding:i,outputFormat:a,buffer:o})}catch(e){return A(`binary_decode`,e)}}async handleBinaryEncode(t){try{let r=e(t,`data`,``),i=n(t,`inputFormat`,se,`utf8`),a=n(t,`outputEncoding`,ce,`base64`);if(!r)throw Error(`data is required`);let o;if(i===`utf8`)o=Buffer.from(r,`utf8`);else if(i===`hex`)o=j(r);else{let e=JSON.parse(r);o=Buffer.from(JSON.stringify(e),`utf8`)}let s=be(a,o);return k({success:!0,inputFormat:i,outputEncoding:a,byteLength:o.length,...s})}catch(e){return A(`binary_encode`,e)}}async handleBinaryEntropyAnalysis(r){try{let i=n(r,`source`,O,`raw`),a=e(r,`data`),o=e(r,`filePath`);if(i!==`file`&&!a)throw Error(`data is required for non-file source`);let s=t(r,`blockSize`,256),c=Math.max(16,Math.min(8192,Math.trunc(s||256))),l=await Y({source:i,data:a,filePath:o}),u=Z(l);return k({success:!0,source:i,byteLength:l.length,blockSize:c,overallEntropy:u,chiSquare:ge(l),serialCorrelation:_e(l),blockEntropies:he(l,c),byteFrequency:Q(l).slice(0,20),assessment:$(u,l)})}catch(e){return A(`binary_entropy_analysis`,e)}}async handleProtobufDecodeRaw(n){try{let r=e(n,`data`,``);if(!r)throw Error(`data is required`);let i=t(n,`maxDepth`,5),a=Math.max(1,Math.min(20,Math.trunc(i||5))),o=M(r),s=e(n,`schemaText`,``),c=e(n,`schemaPath`,``),l=e(n,`messageName`,``);if((s||c)&&l){let e=(await import(`protobufjs`)).default,t=(c&&!s?await e.load(c):e.parse(s).root).lookupType(l),n=t.decode(o),r=t.toObject(n,{longs:String,bytes:String,enums:String,defaults:!0});return k({success:!0,schema:!0,messageName:l,byteLength:o.length,decoded:r,fields:null,error:null})}let u=h(o,0,a);return k({success:u.error===void 0,schema:!1,byteLength:o.length,maxDepth:a,parsedBytes:u.bytesConsumed,fields:u.fields,error:u.error??null})}catch(e){return A(`protobuf_decode_raw`,e)}}};export{xe as EncodingToolHandlers};
|