@jshookmcp/jshook 0.3.1 → 0.3.3
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/LICENSE +661 -661
- package/README.md +11 -3
- package/README.zh.md +11 -3
- package/dist/{AntiCheatDetector-CGVGNfy5.mjs → AntiCheatDetector-CUpZBh5O.mjs} +1 -1
- package/dist/BrowserSessionCoordinator-QIt3tetp.mjs +1 -0
- package/dist/CodeInjector-Btj9upnf.mjs +1 -0
- package/dist/ConsoleMonitor-DIjN5Afa.mjs +306 -0
- package/dist/{DarwinAPI-DC4HGGLl.mjs → DarwinAPI-BuMPGzHm.mjs} +1 -1
- package/dist/DetailedDataManager-Z77fDl9Z.mjs +5 -0
- package/dist/ExtensionManager.tools-CIGOWViz.mjs +1 -0
- package/dist/{FingerprintManager-N7BZqjxP.mjs → FingerprintManager-BkDSsjjP.mjs} +1 -1
- package/dist/{HardwareBreakpoint-OcJqNFVc.mjs → HardwareBreakpoint-DMAMcPyB.mjs} +1 -1
- package/dist/{HeapAnalyzer-CqAxZzeS.mjs → HeapAnalyzer-Yj348FYt.mjs} +1 -1
- package/dist/MCPServer.activation.ttl-CEGNBycZ.mjs +1 -0
- package/dist/MCPServer.search.helpers-Cs1JpKbu.mjs +1 -0
- package/dist/MCPServer.search.validation-DnifPCCv.mjs +1 -0
- package/dist/MemoryController-DjtgiING.mjs +2 -0
- package/dist/{MemoryScanSession-CaxAjZJf.mjs → MemoryScanSession-zfoVZJB0.mjs} +1 -1
- package/dist/MemoryScanner-Dxd657li.mjs +1 -0
- package/dist/{NativeMemoryManager.utils-DM4NC3FE.mjs → NativeMemoryManager.utils-Bu8srMEF.mjs} +1 -1
- package/dist/{PEAnalyzer-DJyaJTQJ.mjs → PEAnalyzer-CMu9Ua9T.mjs} +1 -1
- package/dist/PointerChainEngine-CaSC1Mry.mjs +1 -0
- package/dist/ProcessRegistry-D5y1yuP2.mjs +1 -0
- package/dist/{ResponseBuilder-B2lu4KEl.mjs → ResponseBuilder-nPXl_khE.mjs} +1 -1
- package/dist/{ReverseEvidenceGraph-B931HeoW.mjs → ReverseEvidenceGraph-BksOpsPs.mjs} +1 -1
- package/dist/RingBuffer-B6RTHmij.mjs +1 -0
- package/dist/ServerRuntimeState-CgqBBwfd.mjs +1 -0
- package/dist/{Speedhack-l6s8L2Qw.mjs → Speedhack-pwXTHxOY.mjs} +1 -1
- package/dist/{StructureAnalyzer-A-WamfYE.mjs → StructureAnalyzer-BseGzsSl.mjs} +2 -2
- package/dist/ToolCatalog-DgmQXdsm.mjs +1 -0
- package/dist/ToolHandlerMap-7HWoIgQO.mjs +1 -0
- package/dist/ToolProbe-DQiREmNp.mjs +1 -0
- package/dist/ToolRegistry-eMZEBiR1.mjs +1 -0
- package/dist/ToolRouter.policy-UKBlFlbh.mjs +4 -0
- package/dist/{TraceRecorder-Dd8jLXpi.mjs → TraceRecorder-B5ktv3nP.mjs} +2 -2
- package/dist/VersionDetector-CmPJmaJg.mjs +1 -0
- package/dist/{Win32API-Bhi5xFBe.mjs → Win32API-DoP3MMHS.mjs} +1 -1
- package/dist/{Win32Debug-CQteFL4F.mjs → Win32Debug-DwF8mQGm.mjs} +1 -1
- package/dist/{WorkflowEngine-CxEp2WXH.mjs → WorkflowEngine-CldHG5b4.mjs} +1 -1
- package/dist/analysis-C-ln0Brh.mjs +6 -0
- package/dist/antidebug-CsnpOR9z.mjs +1 -0
- package/dist/{artifactRetention-NBdncOEW.mjs → artifactRetention-DkYKLOvi.mjs} +1 -1
- package/dist/{artifacts-B5xQuEa_.mjs → artifacts-D-4pSS_N.mjs} +1 -1
- package/dist/betterSqlite3-Bdo_ifuJ.mjs +1 -0
- package/dist/binary-instrument-BeZ224mZ.mjs +9 -0
- package/dist/{boringssl-inspector-BST5vtKx.mjs → boringssl-inspector-ZOCkaipa.mjs} +2 -2
- package/dist/browser-BUaB25bk.mjs +11 -0
- package/dist/{handlers-pVNpaw4A.mjs → canvas-396ieNv5.mjs} +22 -22
- package/dist/collector-CB2syQEg.mjs +1 -0
- package/dist/constants-DMv3svps.mjs +2 -0
- package/dist/coordination-Dbohmj6D.mjs +1 -0
- package/dist/dart-inspector-LhEqRITQ.mjs +0 -0
- package/dist/debugger-CLzkObIO.mjs +1 -0
- package/dist/{definitions-CCP9gphV.mjs → definitions-0hxnrDU72.mjs} +1 -1
- package/dist/definitions-B3a9QC2t.mjs +1 -0
- package/dist/{definitions-DtE0XLrT.mjs → definitions-BOvju5t2.mjs} +1 -1
- package/dist/definitions-CXj_cEVt.mjs +1 -0
- package/dist/definitions-Co6AvTjH.mjs +1 -0
- package/dist/{definitions-Dds_zrWx.mjs → definitions-Cv5r8xwq.mjs} +1 -1
- package/dist/definitions-DBYSxChX.mjs +1 -0
- package/dist/{definitions-DI9YXsJk.mjs → definitions-D_dTDX9B.mjs} +1 -1
- package/dist/{definitions-Dgrg7f3D.mjs → definitions-Db9t2ddh.mjs} +1 -1
- package/dist/{definitions-DZ8uKusP.mjs → definitions-DbN2CjI2.mjs} +1 -1
- package/dist/{definitions-jXPaVy4P.mjs → definitions-DlmmHmZc.mjs} +1 -1
- package/dist/definitions-DnYpoGig.mjs +1 -0
- package/dist/{definitions-CYFbewnd.mjs → definitions-DtZ6Ktx2.mjs} +1 -1
- package/dist/{definitions-CuJRsJ6N.mjs → definitions-DuIPS8gq.mjs} +1 -1
- package/dist/{definitions-BbxOUiP-.mjs → definitions-DywfwPMb.mjs} +1 -1
- package/dist/definitions-EGmqr85H.mjs +1 -0
- package/dist/{definitions-LaYTuwQd.mjs → definitions-Fetw_Cge.mjs} +3 -3
- package/dist/{definitions-NoVp_9Pm.mjs → definitions-LdkeuOeA.mjs} +1 -1
- package/dist/{definitions-DJklW2sS.mjs → definitions-Ym8niHDb.mjs} +1 -1
- package/dist/{definitions-BGwNSkVm.mjs → definitions-aeRd5DAR.mjs} +1 -1
- package/dist/{definitions-CIO9O-Sw.mjs → definitions-cnG6tj17.mjs} +1 -1
- package/dist/{encoding-DGcr6Aj_.mjs → encoding-B4xZWErf.mjs} +2 -2
- package/dist/ensure-browser-core-JHwDo5ql.mjs +285 -0
- package/dist/{factory-Cx_1LorX.mjs → factory-BxNdBiZa.mjs} +1 -1
- package/dist/{graphql-HLf3MS8H.mjs → graphql-GBWsZ9xC.mjs} +4 -4
- package/dist/{handlers-DW5AbYs5.mjs → handlers-5nzR8B0a.mjs} +3 -3
- package/dist/handlers-6iNsXOVT.mjs +7 -0
- package/dist/{handlers-BZoPla6E.mjs → handlers-BZ8n6Hvf.mjs} +1 -1
- package/dist/{handlers-Dv_runVv.mjs → handlers-BbLxNbbT.mjs} +1 -1
- package/dist/{handlers-BP12ZsWc.mjs → handlers-BbS4hssc.mjs} +2 -2
- package/dist/{handlers-BggKiVx9.mjs → handlers-CIKOP4aI.mjs} +2 -2
- package/dist/handlers-CWKBBjai.mjs +1 -0
- package/dist/handlers-Cmb6SoRC.mjs +1 -0
- package/dist/handlers-CrJsKnEI.mjs +1 -0
- package/dist/{antidebug-BOTZH6-0.mjs → handlers-DB6xVVWq.mjs} +4 -4
- package/dist/{handlers-DmQzIc44.mjs → handlers-DOOCWUNR.mjs} +3 -3
- package/dist/{handlers-BLMa4X7l.mjs → handlers-Z_B5aVaU.mjs} +2 -2
- package/dist/handlers-gVscChvl.mjs +1 -0
- package/dist/handlers-xFvI9P_y.mjs +1 -0
- package/dist/handlers.impl-BsFTW6SD.mjs +1 -0
- package/dist/{hooks-DDKppogd.mjs → hooks-DPouiS7I.mjs} +9 -9
- package/dist/index.mjs +11 -15
- package/dist/macro-p8kuJVcm.mjs +2 -0
- package/dist/maintenance-DAqADb6Z.mjs +302 -0
- package/dist/manifest-4lmM6MZR.mjs +1 -0
- package/dist/{manifest-D610kxZr.mjs → manifest-AxaxRSt6.mjs} +2 -2
- package/dist/{manifest-CDeUZGUZ.mjs → manifest-BIqRE1Qz.mjs} +1 -1
- package/dist/{manifest-Dm0o3i2U.mjs → manifest-Box-jWfr.mjs} +1 -1
- package/dist/manifest-Bp33di0Q.mjs +1 -0
- package/dist/{manifest-CGq4NpqH2.mjs → manifest-BvRX4nRP.mjs} +1 -1
- package/dist/{manifest-yu2xiQqe.mjs → manifest-C6KoB1XE.mjs} +1 -1
- package/dist/manifest-C7TdXCWY.mjs +1 -0
- package/dist/manifest-CM-n64K0.mjs +1 -0
- package/dist/{manifest-DWUUWBz0.mjs → manifest-CUokxCUN.mjs} +1 -1
- package/dist/manifest-CWJS45iO.mjs +1 -0
- package/dist/{manifest-D44TaRJU.mjs → manifest-Cdxdgo-D.mjs} +1 -1
- package/dist/{manifest-DKUorv5M.mjs → manifest-Cf6SmamD.mjs} +1 -1
- package/dist/manifest-Cgxu2qdv.mjs +1 -0
- package/dist/manifest-CowGSURa2.mjs +1 -0
- package/dist/manifest-CsGIrh34.mjs +1 -0
- package/dist/manifest-CvDpVToN.mjs +1 -0
- package/dist/manifest-D8TL9RLE.mjs +1 -0
- package/dist/{manifest-C7qV1z7F.mjs → manifest-DIhtCBe6.mjs} +1 -1
- package/dist/{manifest-CeQmtQOY.mjs → manifest-DJbruNOg.mjs} +1 -1
- package/dist/manifest-DLGtZH-0.mjs +1 -0
- package/dist/manifest-DXHdPt2T.mjs +1 -0
- package/dist/{manifest-DMJlcsTR.mjs → manifest-Dg5ScOyW.mjs} +1 -1
- package/dist/{manifest-C1nZkTkO.mjs → manifest-DzGoTS0R.mjs} +1 -1
- package/dist/manifest-G2H52LKz.mjs +131 -0
- package/dist/manifest-P0Futrgb.mjs +1 -0
- package/dist/{manifest-CDiCtaQT.mjs → manifest-Qw7xgvjv.mjs} +1 -1
- package/dist/{manifest-Dgh0uDW-.mjs → manifest-W3qvVrP2.mjs} +1 -1
- package/dist/manifest-dG6MuR1U.mjs +1 -0
- package/dist/manifest-nWXtgq5Y2.mjs +1 -0
- package/dist/{manifest-BPuE6oH2.mjs → manifest-vp1upSSq.mjs} +1 -1
- package/dist/modules-DO3jXCgj.mjs +333 -0
- package/dist/{mojo-ipc-VGlv3Qyp.mjs → mojo-ipc-Be-ccWrc.mjs} +1 -1
- package/dist/native/scripts/linux/enum-windows.sh +12 -12
- package/dist/native/scripts/macos/enum-windows.applescript +22 -22
- package/dist/native-g095qhpK.mjs +961 -0
- package/dist/network-Dvxm7eEI.mjs +7 -0
- package/dist/outputPaths-D2ddHrOJ.mjs +2 -0
- package/dist/{parse-args-Cuk7-xUt.mjs → parse-args-ngRrvF9e.mjs} +1 -1
- package/dist/platform-DjWbuiF8.mjs +93 -0
- package/dist/process-Dq5I-KZW.mjs +2 -0
- package/dist/proxy-DPNgM7TE.mjs +2 -0
- package/dist/{registry-DUHIPE-v.mjs → registry-xB8Wgmyj.mjs} +1 -1
- package/dist/renderer-pid-7jbTR8f5.mjs +1 -0
- package/dist/search-defaults-CJik67or.mjs +1 -0
- package/dist/server/plugin-api.d.mts +19 -36
- package/dist/server/plugin-api.mjs +1 -1
- package/dist/sourcemap-DqEW15Ao.mjs +1 -0
- package/dist/streaming-Dbk4eStJ.mjs +1 -0
- package/dist/transform-D-peM3aO.mjs +103 -0
- package/dist/wasm-CZajRaad.mjs +174 -0
- package/dist/{webcrack-CsLLJIs9.mjs → webcrack-phEfVt5y.mjs} +3 -3
- package/dist/{workflow-CYIXtrWD.mjs → workflow-wkXb3x-U.mjs} +4 -4
- package/package.json +16 -15
- package/src/native/scripts/linux/enum-windows.sh +12 -12
- package/src/native/scripts/macos/enum-windows.applescript +22 -22
- package/dist/CodeInjector-BlgyqTOk.mjs +0 -1
- package/dist/ConsoleMonitor-Dkqc0HNi.mjs +0 -490
- package/dist/DOMInspector-BYY_EJ0C.mjs +0 -95
- package/dist/DetailedDataManager-BniBJlVv.mjs +0 -1
- package/dist/ExtensionManager-erMpqcLk.mjs +0 -1
- package/dist/MCPServer.search.handlers.domain-DVbWL1bT.mjs +0 -1
- package/dist/MemoryController-BaqstM5w.mjs +0 -2
- package/dist/MemoryScanner-BLYnMJy6.mjs +0 -1
- package/dist/NativeMemoryManager.impl-CI554XbY.mjs +0 -1
- package/dist/PageController-D9jVkH0i.mjs +0 -1
- package/dist/PointerChainEngine-5nF9eNlu.mjs +0 -1
- package/dist/PrerequisiteError-Bl3dK8XA.mjs +0 -1
- package/dist/ProcessRegistry-Hf12LlR9.mjs +0 -1
- package/dist/ScriptManager-fgqiALgj.mjs +0 -7
- package/dist/ToolCatalog-D_IKl1Hu.mjs +0 -1
- package/dist/ToolProbe-xsfALmN3.mjs +0 -1
- package/dist/ToolRegistry-B0Zs-phN.mjs +0 -1
- package/dist/ToolRouter.policy-CFHoN_Lw.mjs +0 -4
- package/dist/VersionDetector-DMoUWyNm.mjs +0 -9
- package/dist/analysis-BuR-NgX8.mjs +0 -5
- package/dist/betterSqlite3-CGaxz4AX.mjs +0 -1
- package/dist/binary-instrument-Cf9qqLlM.mjs +0 -7
- package/dist/browser-C4Le3xqA.mjs +0 -11
- package/dist/collector-CKO8RPK8.mjs +0 -1
- package/dist/constants-Cp6hBrrx.mjs +0 -1
- package/dist/coordination-BbijHEHH.mjs +0 -1
- package/dist/debugger-CRJq_krh.mjs +0 -1
- package/dist/definitions-BGobEDQa.mjs +0 -1
- package/dist/definitions-CdWEuIkI.mjs +0 -1
- package/dist/definitions-CoQFbggH.mjs +0 -1
- package/dist/definitions-OvGsfxdt.mjs +0 -1
- package/dist/ensure-browser-core-Buls24LQ.mjs +0 -1
- package/dist/flat-target-session-CO5g78k3.mjs +0 -1
- package/dist/handlers-D3iev8g1.mjs +0 -1
- package/dist/handlers-D49r1-1P.mjs +0 -1
- package/dist/handlers-DCE45Ww8.mjs +0 -2
- package/dist/handlers-De5u62Ga2.mjs +0 -1
- package/dist/handlers-DnJRGp7t.mjs +0 -302
- package/dist/handlers-S9Ws0IGy.mjs +0 -2
- package/dist/handlers.impl-CD2_kOcC.mjs +0 -1
- package/dist/maintenance-CutEO84j.mjs +0 -1
- package/dist/manifest-BFGxlDRh.mjs +0 -123
- package/dist/manifest-BXry5N09.mjs +0 -1
- package/dist/manifest-BeP_zJGb2.mjs +0 -1
- package/dist/manifest-C0g67k6U.mjs +0 -1
- package/dist/manifest-CFn0359q2.mjs +0 -1
- package/dist/manifest-CJMGt7Qy.mjs +0 -1
- package/dist/manifest-CRIJq4Hs.mjs +0 -1
- package/dist/manifest-C_hEIjSx.mjs +0 -1
- package/dist/manifest-Cq0j7GZt.mjs +0 -1
- package/dist/manifest-CtPmHAdn.mjs +0 -1
- package/dist/manifest-Cx2IVMUY.mjs +0 -1
- package/dist/manifest-D16xPXro.mjs +0 -1
- package/dist/manifest-DC-SMF6b.mjs +0 -1
- package/dist/manifest-DD3rtxvV.mjs +0 -1
- package/dist/manifest-De-6Wf2R.mjs +0 -1
- package/dist/manifest-DsVh7Y4U.mjs +0 -1
- package/dist/manifest-DtEFSRaq.mjs +0 -1
- package/dist/manifest-H-EpAyZQ.mjs +0 -1
- package/dist/manifest-ais9Afrw.mjs +0 -1
- package/dist/manifest-tmb54wmA.mjs +0 -1
- package/dist/manifest-zrbrpKCC.mjs +0 -1
- package/dist/matchesWildcardPattern-BGqLSmEs.mjs +0 -1
- package/dist/modules-p-PUNv9r.mjs +0 -332
- package/dist/network-BjZ1Y-GB.mjs +0 -7
- package/dist/outputPaths-BonGThuc.mjs +0 -2
- package/dist/platform-C446Lf97.mjs +0 -93
- package/dist/playwright-cdp-fallback-BwVR-_T3.mjs +0 -1
- package/dist/process-C9f2A5zk.mjs +0 -962
- package/dist/proxy-CvRepxgV.mjs +0 -1
- package/dist/search-defaults-D2bY-rzH.mjs +0 -1
- package/dist/shared-state-board-Cyg-xh_k.mjs +0 -1
- package/dist/sourcemap-D6Q1UuAp.mjs +0 -1
- package/dist/streaming-CTX58tbb.mjs +0 -1
- package/dist/transform-Cv9P2vVD.mjs +0 -103
- package/dist/types-DtThH00r.mjs +0 -1
- package/dist/wasm-DaJa8J0V.mjs +0 -174
- /package/dist/{CacheAdapters-CdAxBmVW.mjs → CacheAdapters-BlDrQg8f.mjs} +0 -0
- /package/dist/{EventBus-DgciURGg.mjs → EventBus-Cm-t-B65.mjs} +0 -0
- /package/dist/{EvidenceGraphBridge-BIfgB7HP.mjs → EvidenceGraphBridge-DBDc0wUA.mjs} +0 -0
- /package/dist/{HookGeneratorBuilders.core.generators.storage-Bf1fbrNK.mjs → HookGeneratorBuilders.core.generators.storage-CWaWpOHa.mjs} +0 -0
- /package/dist/{InstrumentationSession-DxXs0sCp.mjs → InstrumentationSession-c5qZyp7d.mjs} +0 -0
- /package/dist/{StealthVerifier-Dhbj4B4P.mjs → StealthVerifier-DMBrtkhN.mjs} +0 -0
- /package/dist/{ToolError-DWU_z7gp.mjs → ToolError-g3rjWzhx.mjs} +0 -0
- /package/dist/{authorization-schema-B40obG1A.mjs → authorization-schema-Jtikc5Yt.mjs} +0 -0
- /package/dist/{bind-helpers-BlAOQrFQ.mjs → bind-helpers-D0mGAOof.mjs} +0 -0
- /package/dist/{capabilities-DbYCv-HF.mjs → capabilities-L1ax5EHS.mjs} +0 -0
- /package/dist/{chunk-C_pMuVsO.mjs → chunk-88NL7fhV.mjs} +0 -0
- /package/dist/{concurrency-CcK46d0h.mjs → concurrency-Dehnw4JC.mjs} +0 -0
- /package/dist/{evidence-graph-bridge-B0yhGPcs.mjs → evidence-graph-bridge-eT9icP6a.mjs} +0 -0
- /package/dist/{formatAddress-C7j2fDlM.mjs → formatAddress-DAcw4Ckg.mjs} +0 -0
- /package/dist/{logger-sBC6IdRT.mjs → logger-CCikqqvj.mjs} +0 -0
- /package/dist/{response-C7rKQst4.mjs → response-B1RuVVfD.mjs} +0 -0
- /package/dist/{ssrf-policy-T96MR3r6.mjs → ssrf-policy-B72vdy23.mjs} +0 -0
- /package/dist/{tool-builder-CI9914Tf.mjs → tool-builder-CpLh-UQd.mjs} +0 -0
- /package/dist/{types-CuyefmGT.mjs → types-BzPBzmVB.mjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./EventBus-Cm-t-B65.mjs";import{t}from"./native-g095qhpK.mjs";import{t as n}from"./tool-builder-CpLh-UQd.mjs";const r=[`byte`,`int8`,`int16`,`uint16`,`int32`,`uint32`,`int64`,`uint64`,`float`,`double`,`string`,`hex`,`pointer`],i=[`exact`,`unknown_initial`,`changed`,`unchanged`,`increased`,`decreased`,`greater_than`,`less_than`,`between`,`not_equal`],a=[n(`memory_first_scan`,e=>e.desc(`Start a new memory scan session.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`value`,`Value to search for (as string, e.g. "100", "3.14", "48 65 6C 6C 6F")`).enum(`valueType`,[...r],`Data type of the value`).number(`alignment`,`Alignment in bytes (0=unaligned, 4=4-byte aligned). Default: natural alignment for the type.`).number(`maxResults`,`Maximum results to return (default: 1,000,000)`).prop(`regionFilter`,{type:`object`,properties:{writable:{type:`boolean`,description:`Only scan writable regions`},executable:{type:`boolean`,description:`Only scan executable regions`},moduleOnly:{type:`boolean`,description:`Only scan module-backed regions`}},description:`Filter which memory regions to scan`}).requiredOpenWorld(`value`,`valueType`)),n(`memory_next_scan`,e=>e.desc(`Narrow an existing scan session.`).string(`sessionId`,`Scan session ID`).enum(`mode`,[...i],`Comparison mode`).string(`value`,`Target value for exact/greater_than/less_than/between/not_equal modes`).string(`value2`,`Upper bound value for "between" mode`).requiredOpenWorld(`sessionId`,`mode`)),n(`memory_unknown_scan`,e=>e.desc(`Start an unknown initial value scan.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).enum(`valueType`,[...r],`Data type to capture`).number(`alignment`,`Alignment in bytes (default: natural for type)`).number(`maxResults`,`Maximum addresses to capture (default: 5,000,000)`).prop(`regionFilter`,{type:`object`,properties:{writable:{type:`boolean`},executable:{type:`boolean`},moduleOnly:{type:`boolean`}}}).requiredOpenWorld(`valueType`)),n(`memory_pointer_scan`,e=>e.desc(`Find pointers to a target address.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`targetAddress`,`Target address to find pointers to (hex, e.g. "0x7FF612340000")`).number(`maxResults`,`Maximum results (default: 10,000)`).boolean(`moduleOnly`,`Only scan module-backed regions`).required(`targetAddress`).query().openWorld()),n(`memory_group_scan`,e=>e.desc(`Search for multiple values at known offsets simultaneously.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).array(`pattern`,{type:`object`,properties:{offset:{type:`number`,description:`Byte offset from base`},value:{type:`string`,description:`Expected value at offset`},type:{type:`string`,enum:[...r],description:`Value type at offset`}},required:[`offset`,`value`,`type`]},`Array of {offset, value, type} patterns`).number(`alignment`,`Alignment for base address (default: 4)`).number(`maxResults`,`Maximum results (default: 1,000,000)`).required(`pattern`).query()),n(`memory_scan_session`,e=>e.desc(`Manage scan sessions. Actions: list (all sessions), delete (by sessionId), export (as JSON).`).enum(`action`,[`list`,`delete`,`export`],`Session management action`).string(`sessionId`,`Scan session ID (required for delete/export)`).required(`action`)),n(`memory_pointer_chain`,e=>e.desc(`Pointer chain operations: scan (find chains to target), validate, resolve, or export as JSON.`).enum(`action`,[`scan`,`validate`,`resolve`,`export`],`Chain operation`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`targetAddress`,`Target address hex (action=scan)`).number(`maxDepth`,`Max chain depth 1-6 (action=scan, default: 4)`).number(`maxOffset`,`Max offset per level in bytes (action=scan, default: 4096)`).boolean(`staticOnly`,`Only module-relative chains (action=scan, default: false)`).array(`modules`,{type:`string`},`Only scan specific modules (action=scan)`).number(`maxResults`,`Max chains to return (action=scan, default: 1000)`).string(`chains`,`JSON PointerChain[] (action=validate/export)`).string(`chain`,`JSON single PointerChain (action=resolve)`).required(`action`)),n(`memory_structure_analyze`,e=>e.desc(`Analyze memory at an address to infer data structure layout.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`address`,`Base address of the structure (hex)`).number(`size`,`Size to analyze in bytes (default: 256)`).array(`otherInstances`,{type:`string`},`Additional instance addresses for cross-comparison`).boolean(`parseRtti`,`Whether to attempt RTTI parsing (default: true)`).required(`address`).query()),n(`memory_vtable_parse`,e=>e.desc(`Parse a vtable to enumerate virtual function pointers and resolve them to module+offset. Also attempts RTTI parsing for class name and inheritance hierarchy.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`vtableAddress`,`Address of the vtable (hex)`).required(`vtableAddress`).query()),n(`memory_structure_export_c`,e=>e.desc(`Export an inferred structure as a C-style struct definition with offset comments and type annotations.`).string(`structure`,`JSON string of InferredStruct to export`).string(`name`,`Struct name (defaults to RTTI class name or "UnknownStruct")`).required(`structure`).query()),n(`memory_structure_compare`,e=>e.desc(`Compare two structure instances to identify which fields differ (dynamic values like health/position) vs which are constant (vtable, type flags). Useful for finding important fields.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`address1`,`First instance address (hex)`).string(`address2`,`Second instance address (hex)`).number(`size`,`Size to compare in bytes (default: 256)`).required(`address1`,`address2`).query()),n(`memory_breakpoint`,e=>e.desc(`Hardware breakpoint via x64 debug registers (DR0-DR3). Actions: set, remove, list, trace.`).enum(`action`,[`set`,`remove`,`list`,`trace`],`Breakpoint operation`).number(`pid`,`Target process ID (optional when a browser session is attached; action=set/trace)`).string(`address`,`Address hex (action=set/trace)`).enum(`access`,[`read`,`write`,`readwrite`,`execute`],`Access type (action=set/trace)`).number(`size`,`Watch size in bytes (action=set, default: 4)`).string(`breakpointId`,`Breakpoint ID (action=remove)`).number(`maxHits`,`Max hits to collect (action=trace, default: 50)`).number(`timeoutMs`,`Timeout ms (action=trace, default: 10000)`).required(`action`).destructive()),n(`memory_patch_bytes`,e=>e.desc(`Write bytes to target process at address. Saves original bytes for undo. Use for runtime code patching.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`address`,`Address to patch (hex)`).array(`bytes`,{type:`number`},`Byte values to write (e.g. [0x90, 0x90])`).required(`address`,`bytes`).destructive().openWorld()),n(`memory_patch_nop`,e=>e.desc(`NOP out instructions at address (replace with 0x90). Useful for disabling checks or jumps.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`address`,`Address to NOP (hex)`).number(`count`,`Number of bytes to NOP`).required(`address`,`count`).destructive()),n(`memory_patch_undo`,e=>e.desc(`Undo a previous patch by restoring the original bytes.`).string(`patchId`,`Patch ID to undo`).required(`patchId`).destructive()),n(`memory_code_caves`,e=>e.desc(`Find code caves (runs of 0x00 or 0xCC) in executable sections of loaded modules. Returns largest caves first.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).number(`minSize`,`Minimum cave size in bytes (default: 16)`).required().query()),n(`memory_write_value`,e=>e.desc(`Write a typed value to a memory address. Supports undo/redo via memory_write_history(action=undo|redo).`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`address`,`Address to write to (hex)`).string(`value`,`Value to write (as string)`).enum(`valueType`,[...r],`Data type of the value`).required(`address`,`value`,`valueType`).destructive()),n(`memory_freeze`,e=>e.desc(`Freeze or unfreeze a memory address. Freeze continuously writes a value to prevent changes; unfreeze stops it.`).enum(`action`,[`freeze`,`unfreeze`],`Freeze operation`).number(`pid`,`Target process ID (optional when a browser session is attached; action=freeze)`).string(`address`,`Address to freeze hex (action=freeze)`).string(`value`,`Value to maintain (action=freeze)`).enum(`valueType`,[...r],`Data type (action=freeze)`).number(`intervalMs`,`Write interval ms (action=freeze, default: 100)`).string(`freezeId`,`Freeze ID to remove (action=unfreeze)`).required(`action`).destructive()),n(`memory_dump`,e=>e.desc(`Dump memory region as hex with ASCII column. Outputs a formatted hex dump similar to xxd.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`address`,`Start address (hex)`).number(`size`,`Size to dump in bytes (default: 256)`).required(`address`).query()),n(`memory_speedhack`,e=>e.desc(`Hook time APIs to scale process time. Actions: apply (hook + set speed), set (adjust speed).`).enum(`action`,[`apply`,`set`],`Speedhack action`).number(`pid`,`Target process ID (optional when a browser session is attached)`).number(`speed`,`Speed multiplier`).required(`action`,`speed`).destructive()),n(`memory_write_history`,e=>e.desc(`Undo or redo the last memory write operation.`).enum(`action`,[`undo`,`redo`],`History action`).required(`action`).destructive().openWorld()),n(`memory_heap_enumerate`,e=>e.desc(`Enumerate all heaps and heap blocks in a process via Toolhelp32 snapshot. Returns heap list with block counts, sizes, and overall statistics.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).number(`maxBlocks`,`Maximum blocks to enumerate per heap (default: 10000)`).required().query()),n(`memory_heap_stats`,e=>e.desc(`Get detailed heap statistics with size distribution buckets (0-64B, 64B-1KB, 1-64KB, 64KB-1MB, >1MB), fragmentation ratio, and aggregate metrics.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).required().query()),n(`memory_heap_anomalies`,e=>e.desc(`Detect heap anomalies: heap spray patterns (many same-size blocks), possible use-after-free (non-zero free blocks), and suspicious block sizes (0 or >100MB).`).number(`pid`,`Target process ID (optional when a browser session is attached)`).required().query()),n(`memory_pe_headers`,e=>e.desc(`Parse PE headers (DOS, NT, File, Optional) from a module base address in process memory. Returns machine type, entry point, image base, section count, and data directory info.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`moduleBase`,`Module base address (hex, e.g. "0x7ff612340000")`).required(`moduleBase`).query()),n(`memory_pe_imports_exports`,e=>e.desc(`Parse import and/or export tables from a PE module in process memory. Returns DLL names, function names, ordinals, hints, and forwarded exports.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`moduleBase`,`Module base address (hex)`).enum(`table`,[`imports`,`exports`,`both`],`Which table to parse`,{default:`both`}).required(`moduleBase`).query()),n(`memory_inline_hook_detect`,e=>e.desc(`Detect inline hooks by comparing the first 16 bytes of each exported function on disk vs in memory. Identifies JMP rel32, JMP abs64, PUSH+RET hooks and decodes jump targets.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).string(`moduleName`,`Module name filter (optional — scans all modules if omitted)`).required().query()),n(`memory_anticheat_detect`,e=>e.desc(`Scan process imports for anti-debug/anti-cheat mechanisms: IsDebuggerPresent, NtQueryInformationProcess, timing checks (QPC, GetTickCount), thread hiding, heap flag checks, and DR register inspection. Each detection includes a bypass suggestion.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).required().query()),n(`memory_guard_pages`,e=>e.desc(`Find all memory regions with PAGE_GUARD protection in a process. Guard pages are often used as anti-tampering mechanisms or stack overflow detection.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).required().query()),n(`memory_integrity_check`,e=>e.desc(`Check executable memory regions against their corresponding on-disk PE files (.text sections) to detect modifications like inline hooks or code patches.`).number(`pid`,`Target process ID (optional when a browser session is attached)`).required().query())],o=`memory`,s=`memoryScanHandlers`,c=(process.env.JSHOOK_REGISTRY_PLATFORM===`win32`||process.env.JSHOOK_REGISTRY_PLATFORM===`linux`||process.env.JSHOOK_REGISTRY_PLATFORM===`darwin`?process.env.JSHOOK_REGISTRY_PLATFORM:process.platform)===`win32`;let l=null,u=null;async function d(e){let{MemoryScanHandlers:n}=await import(`./handlers.impl-BsFTW6SD.mjs`);l=e;let r=e;if(r[s])return r[s];let[i,a,o,d,f,p]=await Promise.all([import(`./MemoryScanner-Dxd657li.mjs`),import(`./MemoryScanSession-zfoVZJB0.mjs`),import(`./PointerChainEngine-CaSC1Mry.mjs`),import(`./StructureAnalyzer-BseGzsSl.mjs`),import(`./CodeInjector-Btj9upnf.mjs`),import(`./MemoryController-DjtgiING.mjs`)]);if(u||=new t,c){let[t,c,l,m,h]=await Promise.all([import(`./HardwareBreakpoint-DMAMcPyB.mjs`),import(`./Speedhack-pwXTHxOY.mjs`),import(`./HeapAnalyzer-Yj348FYt.mjs`),import(`./PEAnalyzer-CMu9Ua9T.mjs`),import(`./AntiCheatDetector-CUpZBh5O.mjs`)]);r[s]=new n(i.memoryScanner,a.scanSessionManager,o.pointerChainEngine,d.structureAnalyzer,t.hardwareBreakpointEngine,f.codeInjector,p.memoryController,c.speedhack,l.heapAnalyzer,m.peAnalyzer,h.antiCheatDetector,e.eventBus,u,e)}else r[s]=new n(i.memoryScanner,a.scanSessionManager,o.pointerChainEngine,d.structureAnalyzer,null,f.codeInjector,p.memoryController,null,null,null,null,e.eventBus,u,e);return r[s]}function f(t){return n=>{let r=n[s];return n=>{let i=n._meta,a;return i?.progressToken!==void 0&&l&&(a=e(l.eventBus,i.progressToken)),t(r,{...n,onProgress:a})}}}function p(e){let t=a.find(t=>t.name===e);if(!t)throw Error(`Memory tool not found: ${e}`);return t}const m=new Set([`memory_heap_enumerate`,`memory_heap_stats`,`memory_heap_anomalies`,`memory_pe_headers`,`memory_pe_imports_exports`,`memory_inline_hook_detect`,`memory_anticheat_detect`,`memory_guard_pages`,`memory_integrity_check`,`memory_breakpoint`,`memory_speedhack`]),h=[{tool:p(`memory_first_scan`),domain:o,bind:f((e,t)=>e.handleFirstScan(t))},{tool:p(`memory_next_scan`),domain:o,bind:f((e,t)=>e.handleNextScan(t))},{tool:p(`memory_unknown_scan`),domain:o,bind:f((e,t)=>e.handleUnknownScan(t))},{tool:p(`memory_pointer_scan`),domain:o,bind:f((e,t)=>e.handlePointerScan(t))},{tool:p(`memory_group_scan`),domain:o,bind:f((e,t)=>e.handleGroupScan(t))},{tool:p(`memory_scan_session`),domain:o,bind:f((e,t)=>e.handleScanSessionDispatch(t))},{tool:p(`memory_pointer_chain`),domain:o,bind:f((e,t)=>e.handlePointerChainDispatch(t))},{tool:p(`memory_structure_analyze`),domain:o,bind:f((e,t)=>e.handleStructureAnalyze(t))},{tool:p(`memory_vtable_parse`),domain:o,bind:f((e,t)=>e.handleVtableParse(t))},{tool:p(`memory_structure_export_c`),domain:o,bind:f((e,t)=>e.handleStructureExportC(t))},{tool:p(`memory_structure_compare`),domain:o,bind:f((e,t)=>e.handleStructureCompare(t))},{tool:p(`memory_breakpoint`),domain:o,bind:f((e,t)=>e.handleBreakpointDispatch(t))},{tool:p(`memory_patch_bytes`),domain:o,bind:f((e,t)=>e.handlePatchBytes(t))},{tool:p(`memory_patch_nop`),domain:o,bind:f((e,t)=>e.handlePatchNop(t))},{tool:p(`memory_patch_undo`),domain:o,bind:f((e,t)=>e.handlePatchUndo(t))},{tool:p(`memory_code_caves`),domain:o,bind:f((e,t)=>e.handleCodeCaves(t))},{tool:p(`memory_write_value`),domain:o,bind:f((e,t)=>e.handleWriteValue(t))},{tool:p(`memory_freeze`),domain:o,bind:f((e,t)=>e.handleFreezeDispatch(t))},{tool:p(`memory_dump`),domain:o,bind:f((e,t)=>e.handleDump(t))},{tool:p(`memory_speedhack`),domain:o,bind:f((e,t)=>e.handleSpeedhackDispatch(t))},{tool:p(`memory_write_history`),domain:o,bind:f((e,t)=>e.handleWriteHistoryDispatch(t))},{tool:p(`memory_heap_enumerate`),domain:o,bind:f((e,t)=>e.handleHeapEnumerate(t))},{tool:p(`memory_heap_stats`),domain:o,bind:f((e,t)=>e.handleHeapStats(t))},{tool:p(`memory_heap_anomalies`),domain:o,bind:f((e,t)=>e.handleHeapAnomalies(t))},{tool:p(`memory_pe_headers`),domain:o,bind:f((e,t)=>e.handlePEHeaders(t))},{tool:p(`memory_pe_imports_exports`),domain:o,bind:f((e,t)=>e.handlePEImportsExports(t))},{tool:p(`memory_inline_hook_detect`),domain:o,bind:f((e,t)=>e.handleInlineHookDetect(t))},{tool:p(`memory_anticheat_detect`),domain:o,bind:f((e,t)=>e.handleAntiCheatDetect(t))},{tool:p(`memory_guard_pages`),domain:o,bind:f((e,t)=>e.handleGuardPages(t))},{tool:p(`memory_integrity_check`),domain:o,bind:f((e,t)=>e.handleIntegrityCheck(t))}],g={kind:`domain-manifest`,version:1,domain:o,depKey:s,profiles:[`full`],ensure:d,registrations:c?h:h.filter(e=>!m.has(e.tool.name)),workflowRule:{patterns:[/memory\s*scan/i,/cheat\s*engine/i,/find\s*(value|address|variable|struct)/i,/scan\s*(for|memory)/i,/pointer\s*(chain|scan)/i,/struct(ure)?\s*(analy|infer|dissect)/i,/vtable|rtti/i,/breakpoint|watchpoint|hardware\s*bp/i,/patch\s*(byte|nop|code)/i,/code\s*cave/i,/freeze|unfreeze/i,/speedhack|time\s*(hack|scale)/i,/memory\s*(dump|hex)/i,/undo|redo/i,/heap|堆\s*(分析|枚举|异常)/i,/PE\s*(header|import|export)|inline.*hook/i,/anti.?cheat|anti.?debug|反作弊|反调试/i,/guard\s*page|integrity\s*check|代码完整性/i,/内存\s*(扫描|搜索|分析|结构|断点|注入|冻结|加速|堆|模块|反作弊)/i],priority:90,tools:[`memory_first_scan`,`memory_next_scan`,`memory_unknown_scan`,`memory_pointer_chain`,`memory_structure_analyze`,`memory_vtable_parse`,`memory_scan_session`,...c?[`memory_breakpoint`,`memory_speedhack`]:[],`memory_patch_bytes`,`memory_freeze`,`memory_dump`,...c?[`memory_speedhack`,`memory_heap_enumerate`,`memory_pe_headers`,`memory_anticheat_detect`]:[],`memory_write_history`],hint:c?`Memory domain: scan → narrow → pointer chain → structure | breakpoint trace → patch/NOP → freeze speedhack | heap analysis | PE introspection | anti-cheat detection`:`Memory domain: scan → narrow → pointer chain → structure | patch/NOP → freeze | dump`}};export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./registry-xB8Wgmyj.mjs";import{n as t}from"./bind-helpers-D0mGAOof.mjs";import{t as n}from"./definitions-CXj_cEVt.mjs";const r=`process`,i=`processHandlers`,a=e(n),o=process.env.JSHOOK_REGISTRY_PLATFORM===`win32`||process.env.JSHOOK_REGISTRY_PLATFORM===`linux`||process.env.JSHOOK_REGISTRY_PLATFORM===`darwin`?process.env.JSHOOK_REGISTRY_PLATFORM:process.platform;async function s(e){let{ProcessToolHandlers:t}=await import(`./process-Dq5I-KZW.mjs`);return e.processHandlers||=new t(e),e.processHandlers}const c=o===`win32`,l=new Set([`check_debug_port`]),u=t({domain:r,depKey:i,lookup:a,entries:[{tool:`electron_attach`,method:`handleElectronAttach`},{tool:`process_windows`,method:`handleProcessWindows`},{tool:`process_check_debug_port`,method:`handleProcessCheckDebugPort`},{tool:`process_launch_debug`,method:`handleProcessLaunchDebug`},{tool:`memory_read`,method:`handleMemoryRead`},{tool:`memory_write`,method:`handleMemoryWrite`},{tool:`memory_scan`,method:`handleMemoryScan`},{tool:`memory_check_protection`,method:`handleMemoryCheckProtection`},{tool:`memory_scan_filtered`,method:`handleMemoryScanFiltered`},{tool:`memory_batch_write`,method:`handleMemoryBatchWrite`},{tool:`memory_dump_region`,method:`handleMemoryDumpRegion`},{tool:`memory_list_regions`,method:`handleMemoryListRegions`},{tool:`memory_audit_export`,method:`handleMemoryAuditExport`},{tool:`inject_dll`,method:`handleInjectDll`},{tool:`inject_shellcode`,method:`handleInjectShellcode`},{tool:`check_debug_port`,method:`handleCheckDebugPort`},{tool:`enumerate_modules`,method:`handleEnumerateModules`}]}),d={kind:`domain-manifest`,version:1,domain:r,depKey:i,profiles:[`full`],ensure:s,registrations:c?u:u.filter(e=>!l.has(e.tool.name))};export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./registry-xB8Wgmyj.mjs";import{n as t}from"./bind-helpers-D0mGAOof.mjs";import{n,t as r}from"./definitions-DlmmHmZc.mjs";import{resolve as i}from"node:path";const a=`coordination`,o=`coordinationHandlers`,s=e([...n,...r]),c=t({domain:a,depKey:o,lookup:s,entries:[{tool:`create_task_handoff`,method:`handleCreateTaskHandoff`,profiles:[`full`]},{tool:`complete_task_handoff`,method:`handleCompleteTaskHandoff`,profiles:[`full`]},{tool:`get_task_context`,method:`handleGetTaskContext`,profiles:[`full`]},{tool:`append_session_insight`,method:`handleAppendSessionInsight`,profiles:[`full`]},{tool:`save_page_snapshot`,method:`handleSavePageSnapshot`,profiles:[`full`]},{tool:`restore_page_snapshot`,method:`handleRestorePageSnapshot`,profiles:[`full`]},{tool:`list_page_snapshots`,method:`handleListPageSnapshots`,profiles:[`full`]}]}),l=t({domain:a,depKey:`sharedStateBoardHandlers`,lookup:s,entries:[{tool:`state_board`,method:`handleDispatch`},{tool:`state_board_watch`,method:`handleWatchDispatch`},{tool:`state_board_io`,method:`handleIODispatch`}]});async function u(e){let{CoordinationHandlers:t,SharedStateBoardHandlers:n}=await import(`./coordination-Dbohmj6D.mjs`);e.coordinationHandlers||=new t(e),e.sharedStateBoardHandlers||=new n;let r=e.getDomainInstance(`snapshotScheduler`),a=e.getDomainInstance(`snapshotStateDir`);return e.sharedStateBoardHandlers.setPersistNotifier(r?()=>r.notifyDirty():void 0),r&&a&&!e.getDomainInstance(`sharedStateBoardSnapshotRegistered`)&&(r.register(i(a,`state-board`,`current.json`),e.sharedStateBoardHandlers.getStore()),e.setDomainInstance(`sharedStateBoardSnapshotRegistered`,!0)),e.coordinationHandlers}const d={kind:`domain-manifest`,version:1,domain:a,depKey:o,secondaryDepKeys:[`sharedStateBoardHandlers`],profiles:[`workflow`,`full`],ensure:u,registrations:[...c,...l]};export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ensure-browser-core-JHwDo5ql.mjs";import{t}from"./registry-xB8Wgmyj.mjs";import{n}from"./bind-helpers-D0mGAOof.mjs";import{t as r}from"./tool-builder-CpLh-UQd.mjs";import{n as i,t as a}from"./definitions-0hxnrDU72.mjs";import{t as o}from"./authorization-schema-Jtikc5Yt.mjs";import{resolve as s}from"node:path";const c=[`before-load-inject`,`runtime-hook`,`network-intercept`,`function-trace`],l=[r(`instrumentation_session`,e=>e.desc(`Start, stop, or query status of an instrumentation recording session.`).enum(`action`,[`create`,`list`,`destroy`,`status`],`Session operation`).string(`name`,`Optional session name for create`).string(`sessionId`,`Session ID (required for destroy/status)`).required(`action`)),r(`instrumentation_operation`,e=>e.desc(`Manage operations inside an instrumentation session.`).enum(`action`,[`register`,`list`],`Operation`).string(`sessionId`,`Session ID`).enum(`type`,c,`Instrumentation type (action=register)`).string(`target`,`Function name, URL pattern, or script target (action=register)`).object(`config`,{},`Operation-specific config (action=register)`).required(`action`,`sessionId`)),r(`instrumentation_artifact`,e=>e.desc(`Manage artifacts captured by instrumentation operations.`).enum(`action`,[`record`,`query`],`Artifact operation`).string(`sessionId`,`Session ID`).string(`operationId`,`Operation ID (action=record)`).object(`data`,{},`Captured artifact payload (action=record)`).enum(`type`,c,`Optional artifact type filter (action=query)`).number(`limit`,`Max artifacts to return (action=query, default: 50)`,{default:50}).required(`action`,`sessionId`)),r(`instrumentation_hook_preset`,e=>e.desc(`Apply hook presets inside an instrumentation session.`).string(`sessionId`,`Session ID`).string(`preset`,`Single preset id to inject`).array(`presets`,{type:`string`},`Multiple preset ids to inject in one call`).boolean(`captureStack`,`Whether injected presets should capture stack traces`,{default:!1}).boolean(`logToConsole`,`Whether injected presets should log to console`,{default:!0}).enum(`method`,[`evaluate`,`evaluateOnNewDocument`],`Injection method forwarded to hook_preset`,{default:`evaluate`}).prop(`customTemplate`,{type:`object`,additionalProperties:!0,description:`Optional inline custom preset definition`}).prop(`customTemplates`,{type:`array`,items:{type:`object`,additionalProperties:!0},description:`Optional inline custom preset definitions`}).requiredOpenWorld(`sessionId`)),r(`instrumentation_network_replay`,e=>e.desc(`Replay a captured network request inside an instrumentation session.`).string(`sessionId`,`Session ID`).string(`requestId`,`Captured request ID returned by network_get_requests`).object(`headerPatch`,{additionalProperties:{type:`string`}},`Optional request header overrides`).string(`bodyPatch`,`Optional raw request body override`).string(`methodOverride`,`Optional HTTP method override`).string(`urlOverride`,`Optional destination URL override`).object(`authorization`,o,`Optional request-scoped authorization for private-network or insecure-HTTP replay.`).string(`authorizationCapability`,`Optional base64url-encoded request-scoped authorization capability.`).number(`timeoutMs`,`Optional replay timeout in milliseconds`).boolean(`dryRun`,`Preview the replay without sending the request`,{default:!0}).requiredOpenWorld(`sessionId`,`requestId`))];r(`ai_hook`,e=>e.desc(`Manage AI hooks. Actions: inject (inject code into page), get_data (retrieve captured hook data), list (all active hooks), clear (remove hook data by id or all), toggle (enable/disable a hook), export (export data as JSON/CSV).`).enum(`action`,[`inject`,`get_data`,`list`,`clear`,`toggle`,`export`],`Operation to perform`).string(`hookId`,`Hook identifier (required for inject/get_data/toggle; optional for clear/export)`).string(`code`,`Hook code to inject (required for action=inject)`).enum(`method`,[`evaluateOnNewDocument`,`evaluate`],`Injection method (for action=inject)`,{default:`evaluate`}).boolean(`enabled`,`Enable or disable hook (required for action=toggle)`).enum(`format`,[`json`,`csv`],`Export format (for action=export)`,{default:`json`}).required(`action`)),r(`hook_preset`,e=>e.desc(`Install a pre-built JavaScript hook from 20+ built-in presets (eval, atob/btoa, Proxy, Reflect, Object.defineProperty, etc.), or provide customTemplate/customTemplates to install your own reusable hook bodies. Use listPresets=true to see all available preset descriptions.`).string(`preset`,`Single preset name to install. Accepts built-in preset ids or ids provided by customTemplate/customTemplates.`).array(`presets`,{type:`string`},`List of preset names to install simultaneously. Accepts built-in ids and custom template ids.`).prop(`customTemplate`,{type:`object`,properties:{id:{type:`string`,description:`Stable preset id, for example deobfuscation-sinks`},description:{type:`string`,description:`Human-readable description for listPresets output.`},body:{type:`string`,description:`Hook body snippet inserted into the preset wrapper.`}},required:[`id`,`body`],description:`Inline custom template. body should contain the hook body inserted into the standard buildHookCode wrapper. Use {{STACK_CODE}} and {{LOG_FN}} placeholders when needed.`}).prop(`customTemplates`,{type:`array`,items:{type:`object`,properties:{id:{type:`string`},description:{type:`string`},body:{type:`string`}},required:[`id`,`body`]},description:`List of inline custom templates to register for this invocation.`}).boolean(`captureStack`,`Include call stack in captured data (has performance impact)`,{default:!1}).boolean(`logToConsole`,`Log hook events to browser console`,{default:!0}).enum(`method`,[`evaluate`,`evaluateOnNewDocument`],`Injection method: evaluate=current page, evaluateOnNewDocument=before page scripts`,{default:`evaluate`}).boolean(`listPresets`,`Set to true to list all available presets with descriptions instead of installing.`,{default:!1})),r(`evidence_query`,e=>e.desc(`Query reverse evidence graph by URL, function name, or script ID to find associated nodes.`).enum(`by`,[`url`,`function`,`script`],`Query dimension`).string(`value`,`Search value: URL/fragment, function name, or script ID`).required(`by`,`value`).query()),r(`evidence_export`,e=>e.desc(`Export the reverse evidence graph as JSON snapshot or Markdown report.`).enum(`format`,[`json`,`markdown`],`Export format`).required(`format`).query()),r(`evidence_chain`,e=>e.desc(`Get full provenance chain from a node ID in specified direction.`).string(`nodeId`,`Evidence node ID to start from`).enum(`direction`,[`forward`,`backward`],`Traversal direction`,{default:`forward`}).required(`nodeId`).query());const u=[r(`evidence_query`,e=>e.desc(`Query reverse evidence graph by URL, function name, or script ID to find associated nodes.`).enum(`by`,[`url`,`function`,`script`],`Query dimension`).string(`value`,`Search value: URL/fragment, function name, or script ID`).required(`by`,`value`).query()),r(`evidence_export`,e=>e.desc(`Export the reverse evidence graph as JSON snapshot or Markdown report.`).enum(`format`,[`json`,`markdown`],`Export format`).required(`format`).query()),r(`evidence_chain`,e=>e.desc(`Get full provenance chain from a node ID in specified direction.`).string(`nodeId`,`Evidence node ID to start from`).enum(`direction`,[`forward`,`backward`],`Traversal direction`,{default:`forward`}).required(`nodeId`).query())],d=`instrumentation`,f=`instrumentationHandlers`,p=t([...l,...a,...i,...u]),m=n({domain:d,depKey:f,lookup:p,entries:[{tool:`instrumentation_session`,method:`handleSessionDispatch`},{tool:`instrumentation_operation`,method:`handleOperationDispatch`},{tool:`instrumentation_artifact`,method:`handleArtifactDispatch`},{tool:`instrumentation_hook_preset`,method:`handleHookPreset`},{tool:`instrumentation_network_replay`,method:`handleNetworkReplay`}]}),h=n({domain:d,depKey:`aiHookHandlers`,lookup:p,entries:[{tool:`ai_hook`,method:`handleAIHook`}]}),g=n({domain:d,depKey:`hookPresetHandlers`,lookup:p,entries:[{tool:`hook_preset`,method:`handleHookPreset`}]}),_=n({domain:d,depKey:`evidenceHandlers`,lookup:p,entries:[{tool:`evidence_query`,method:`handleQueryDispatch`},{tool:`evidence_export`,method:`handleExportDispatch`},{tool:`evidence_chain`,method:`handleChain`}]});async function v(t){let{ReverseEvidenceGraph:n}=await import(`./ReverseEvidenceGraph-BksOpsPs.mjs`).then(e=>e.t),{InstrumentationSessionManager:r}=await import(`./InstrumentationSession-c5qZyp7d.mjs`),{EvidenceGraphBridge:i}=await import(`./EvidenceGraphBridge-DBDc0wUA.mjs`),{InstrumentationHandlers:a}=await import(`./handlers-Cmb6SoRC.mjs`);if(await e(t),!t.aiHookHandlers){let{AIHookToolHandlers:e}=await import(`./hooks-DPouiS7I.mjs`);t.aiHookHandlers=new e(t.pageController)}if(!t.hookPresetHandlers){let{HookPresetToolHandlers:e}=await import(`./hooks-DPouiS7I.mjs`);t.hookPresetHandlers=new e(t.pageController)}let o=t.getDomainInstance(`evidenceGraph`);o||(o=new n,o.setEventBus(t.eventBus),t.setDomainInstance(`evidenceGraph`,o));let c=t.getDomainInstance(`evidenceGraphBridge`);if(c||(c=new i(o),t.setDomainInstance(`evidenceGraphBridge`,c)),!t.evidenceHandlers){let{EvidenceHandlers:e}=await import(`./handlers-BbLxNbbT.mjs`);t.evidenceHandlers=new e(o)}let l=t.getDomainInstance(`snapshotScheduler`),u=t.getDomainInstance(`snapshotStateDir`);o.setPersistNotifier(l?()=>l.notifyDirty():void 0),l&&u&&!t.getDomainInstance(`evidenceGraphSnapshotRegistered`)&&(l.register(s(u,`evidence-graph`,`current.json`),o),t.setDomainInstance(`evidenceGraphSnapshotRegistered`,!0));let d=t.getDomainInstance(`instrumentationSessionManager`);d||(d=new r,t.setDomainInstance(`instrumentationSessionManager`,d)),d.setEvidenceBridge(c);let f=t.handlerDeps.hookPresetHandlers,p=t.handlerDeps.advancedHandlers;return t.instrumentationHandlers||=new a(d,{hookPresetHandlers:f,advancedHandlers:p}),t.instrumentationHandlers}const y={kind:`domain-manifest`,version:1,domain:d,depKey:f,secondaryDepKeys:[`aiHookHandlers`,`hookPresetHandlers`,`evidenceHandlers`],profiles:[`full`],ensure:v,workflowRule:{patterns:[/(hook|intercept|trace|instrument).*(session|unified|manage|all)/i,/(session|统一|会话).*(hook|拦截|追踪|仪器化|instrument)/i,/(evidence|provenance|chain).*(graph|query|export|report)/i,/(证据|溯源|链).*(图|查询|导出|报告)/i],priority:95,tools:[`instrumentation_session`,`instrumentation_operation`,`instrumentation_artifact`,`instrumentation_hook_preset`,`instrumentation_network_replay`,`ai_hook`,`hook_preset`,`evidence_query`,`evidence_export`,`evidence_chain`],hint:`Instrumentation session: create session → attach hook presets / network replay → record artifacts → query artifacts → destroy when done. Also: AI hook injection, hook presets, evidence graph query/export/chain.`},registrations:[...m,...h,...g,..._]};export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./registry-
|
|
1
|
+
import{t as e}from"./registry-xB8Wgmyj.mjs";import{n as t}from"./bind-helpers-D0mGAOof.mjs";import{t as n}from"./definitions-Db9t2ddh.mjs";const r=`network`,i=`advancedHandlers`,a=t({domain:r,depKey:i,lookup:e(n),entries:[{tool:`network_enable`,method:`handleNetworkEnable`},{tool:`network_disable`,method:`handleNetworkDisable`},{tool:`network_get_status`,method:`handleNetworkGetStatus`},{tool:`network_monitor`,method:`handleNetworkMonitor`},{tool:`network_get_requests`,method:`handleNetworkGetRequests`},{tool:`network_get_response_body`,method:`handleNetworkGetResponseBody`},{tool:`network_get_stats`,method:`handleNetworkGetStats`},{tool:`performance_get_metrics`,method:`handlePerformanceGetMetrics`},{tool:`performance_coverage`,method:`handlePerformanceCoverage`},{tool:`performance_take_heap_snapshot`,method:`handlePerformanceTakeHeapSnapshot`},{tool:`performance_trace`,method:`handlePerformanceTraceDispatch`},{tool:`profiler_cpu`,method:`handleProfilerCpuDispatch`},{tool:`profiler_heap_sampling`,method:`handleProfilerHeapSamplingDispatch`},{tool:`console_get_exceptions`,method:`handleConsoleGetExceptions`},{tool:`console_inject`,method:`handleConsoleInjectDispatch`},{tool:`console_inject_fetch_interceptor`,method:`handleConsoleInjectFetchInterceptor`},{tool:`console_inject_xhr_interceptor`,method:`handleConsoleInjectXhrInterceptor`},{tool:`console_buffers`,method:`handleConsoleBuffersDispatch`},{tool:`http_request_build`,method:`handleHttpRequestBuild`},{tool:`http_plain_request`,method:`handleHttpPlainRequest`},{tool:`http2_probe`,method:`handleHttp2Probe`},{tool:`http2_frame_build`,method:`handleHttp2FrameBuild`},{tool:`network_rtt_measure`,method:`handleNetworkRttMeasure`},{tool:`network_latency_stats`,method:`handleNetworkLatencyStats`},{tool:`network_traceroute`,method:`handleNetworkTraceroute`},{tool:`network_icmp_probe`,method:`handleNetworkIcmpProbe`},{tool:`dns_resolve`,method:`handleDnsResolve`},{tool:`dns_reverse`,method:`handleDnsReverse`},{tool:`dns_probe`,method:`handleDnsProbe`},{tool:`dns_cname_chain`,method:`handleDnsCnameChain`},{tool:`dns_bulk_resolve`,method:`handleDnsBulkResolve`},{tool:`network_extract_auth`,method:`handleNetworkExtractAuth`},{tool:`network_export_har`,method:`handleNetworkExportHar`},{tool:`network_replay_request`,method:`handleNetworkReplayRequest`},{tool:`network_intercept`,method:`handleNetworkInterceptDispatch`},{tool:`network_tls_fingerprint`,method:`handleNetworkTlsFingerprint`},{tool:`network_bot_detect_analyze`,method:`handleNetworkBotDetectAnalyze`}]}),o=new Set([`http_request_build`,`http_plain_request`,`http2_probe`,`http2_frame_build`,`network_rtt_measure`,`network_latency_stats`,`network_traceroute`,`network_icmp_probe`,`dns_resolve`,`dns_reverse`,`dns_probe`,`dns_cname_chain`,`dns_bulk_resolve`]);async function s(e){let{AdvancedToolHandlers:t}=await import(`./network-Dvxm7eEI.mjs`);if(!(e.activatedToolNames instanceof Set)||[...e.activatedToolNames].some(e=>!o.has(e))){let{ensureBrowserCore:t}=await import(`./ensure-browser-core-JHwDo5ql.mjs`).then(e=>e.n);await t(e)}return e.advancedHandlers||=new t(e.collector,e.consoleMonitor,e.eventBus,()=>e.traceRecorder??null),e.advancedHandlers}const c={kind:`domain-manifest`,version:1,domain:r,depKey:i,profiles:[`workflow`,`full`],ensure:s,workflowRule:{patterns:[/(capture|intercept|monitor|hook).*(network|request|response|api|traffic)/i,/(抓包|拦截|监控|hook).*(网络|请求|响应|api|流量)/i],priority:100,tools:[`network_monitor`,`page_navigate`,`network_get_requests`],hint:`Network capture workflow: bootstrap browser/page state -> enable capture -> navigate or act -> inspect captured requests. (Tip: list_extension_workflows can suggest higher-level recipes.)`},prerequisites:{network_get_requests:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`},{condition:`Network monitoring must be enabled`,fix:`Call network_monitor(enable) first`}],network_get_response_body:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`},{condition:`Network monitoring must be enabled`,fix:`Call network_monitor(enable) first`}],network_extract_auth:[{condition:`Network monitoring must be enabled`,fix:`Call network_monitor(enable) first`}]},registrations:a};export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./response-C7rKQst4.mjs";import{t}from"./registry-DUHIPE-v.mjs";import{n}from"./bind-helpers-BlAOQrFQ.mjs";import{t as r}from"./tool-builder-CI9914Tf.mjs";const i=[r(`payload_template_build`,e=>e.desc(`Build a deterministic payload from field definitions.`).array(`fields`,{type:`object`,properties:{name:{type:`string`,description:`Field name`},type:{type:`string`,enum:[`u8`,`u16`,`u32`,`i8`,`i16`,`i32`,`string`,`bytes`],description:`Field type`},value:{description:`Numeric or string field value`},encoding:{type:`string`,enum:[`utf8`,`ascii`,`hex`,`base64`],description:`String/bytes encoding override`},length:{type:`number`,description:`Optional fixed length`},padByte:{type:`number`,description:`Optional pad byte`}},required:[`name`,`type`,`value`]},`Field definitions in output order`).enum(`endian`,[`big`,`little`],`Integer byte order`,{default:`big`}).required(`fields`).idempotent()),r(`payload_mutate`,e=>e.desc(`Apply deterministic byte-level mutations to a hex payload.`).string(`hexPayload`,`Source payload as a hex string`).array(`mutations`,{type:`object`,properties:{strategy:{type:`string`,enum:[`set_byte`,`flip_bit`,`overwrite_bytes`,`append_bytes`,`truncate`,`increment_integer`],description:`Mutation strategy`},offset:{type:`number`,description:`Zero-based byte offset`},value:{type:`number`,description:`Byte value for set_byte`},bit:{type:`number`,description:`Bit index for flip_bit`},data:{type:`string`,description:`Mutation data for overwrite/append`},encoding:{type:`string`,enum:[`utf8`,`ascii`,`hex`,`base64`],description:`Data encoding for overwrite/append`},length:{type:`number`,description:`Target length for truncate`},width:{type:`number`,enum:[1,2,4],description:`Integer width in bytes`},delta:{type:`number`,description:`Increment/decrement delta`},endian:{type:`string`,enum:[`big`,`little`],description:`Integer byte order`},signed:{type:`boolean`,description:`Treat increment target as signed`}},required:[`strategy`]},`Byte-level mutations to apply in order`).required(`hexPayload`,`mutations`)),r(`ethernet_frame_build`,e=>e.desc(`Build a deterministic Ethernet II frame from source/destination MAC addresses, EtherType, and payload bytes.`).string(`destinationMac`,`Destination MAC address in colon, dash, dotted, or plain hex form`).string(`sourceMac`,`Source MAC address in colon, dash, dotted, or plain hex form`).string(`etherType`,`EtherType name (arp, ipv4, ipv6, vlan) or a 16-bit hex value such as 0800`).string(`payloadHex`,`Frame payload as a hex string`).required(`destinationMac`,`sourceMac`,`etherType`,`payloadHex`).idempotent()),r(`arp_build`,e=>e.desc(`Build a deterministic ARP payload for Ethernet/IPv4.`).enum(`operation`,[`request`,`reply`],`ARP operation code`,{default:`request`}).string(`senderMac`,`Sender hardware address`).string(`senderIp`,`Sender IPv4 address`).string(`targetMac`,`Target hardware address (use zeros for requests)`,{default:`00:00:00:00:00:00`}).string(`targetIp`,`Target IPv4 address`).number(`hardwareType`,`Hardware type number. Default: 1 (Ethernet)`,{default:1}).string(`protocolType`,`Protocol type name (ipv4) or 16-bit hex value. Default: ipv4`,{default:`ipv4`}).number(`hardwareSize`,`Hardware address size in bytes. Default: 6`,{default:6}).number(`protocolSize`,`Protocol address size in bytes. Default: 4`,{default:4}).required(`senderMac`,`senderIp`,`targetIp`).idempotent()),r(`raw_ip_packet_build`,e=>e.desc(`Build a deterministic IPv4 or IPv6 packet.`).enum(`version`,[`ipv4`,`ipv6`],`IP version`,{default:`ipv4`}).string(`sourceIp`,`Source IPv4/IPv6 address`).string(`destinationIp`,`Destination IPv4/IPv6 address`).string(`protocol`,`Protocol/next-header name (icmp, tcp, udp, icmpv6) or an 8-bit integer string/hex value`).string(`payloadHex`,`Inner payload as a hex string`,{default:``}).number(`ttl`,`IPv4 TTL or IPv6 hop limit fallback. Default: 64`,{default:64}).number(`hopLimit`,`Explicit IPv6 hop limit override`).number(`identification`,`IPv4 identification field. Default: 0`,{default:0}).boolean(`dontFragment`,`Set the IPv4 DF flag`,{default:!1}).boolean(`moreFragments`,`Set the IPv4 MF flag`,{default:!1}).number(`fragmentOffset`,`IPv4 fragment offset in 8-byte units. Default: 0`,{default:0}).number(`dscp`,`IPv4 DSCP or IPv6 traffic-class DSCP value (0-63). Default: 0`,{default:0}).number(`ecn`,`IPv4/IPv6 ECN bits (0-3). Default: 0`,{default:0}).number(`flowLabel`,`IPv6 flow label (0-1048575). Default: 0`,{default:0}).required(`version`,`sourceIp`,`destinationIp`,`protocol`).idempotent()),r(`icmp_echo_build`,e=>e.desc(`Build a deterministic ICMPv4 echo request or reply payload with an automatically computed checksum.`).enum(`operation`,[`request`,`reply`],`ICMP echo operation`,{default:`request`}).number(`identifier`,`ICMP echo identifier field. Default: 0`,{default:0}).number(`sequenceNumber`,`ICMP echo sequence number field. Default: 0`,{default:0}).string(`payloadHex`,`Optional ICMP payload as a hex string`,{default:``}).idempotent()),r(`checksum_apply`,e=>e.desc(`Apply a deterministic 16-bit Internet checksum across a payload slice, optionally zeroing and writing the checksum field back into the packet.`).string(`hexPayload`,`Source payload as a hex string`).number(`startOffset`,`Inclusive start offset for checksum range. Default: 0`,{default:0}).number(`endOffset`,`Exclusive end offset for checksum range. Default: payload length`).number(`zeroOffset`,`Optional checksum field offset to zero before calculation`).number(`zeroLength`,`Checksum field width in bytes when zeroOffset is set. Default: 2`,{default:2}).number(`writeOffset`,`Optional destination offset for writing the computed checksum. Defaults to zeroOffset when provided`).enum(`endian`,[`big`,`little`],`Byte order used when writing the checksum back`,{default:`big`}).required(`hexPayload`).idempotent()),r(`pcap_write`,e=>e.desc(`Write a compact classic PCAP file from deterministic packet byte records.`).string(`path`,`Destination path for the PCAP file`).array(`packets`,{type:`object`,properties:{dataHex:{type:`string`,description:`Packet bytes as a hex string`},timestampSeconds:{type:`number`,description:`Unix timestamp seconds. Defaults to 0 when omitted`},timestampFraction:{type:`number`,description:`Microsecond or nanosecond fraction depending on timestampPrecision`},originalLength:{type:`number`,description:`Original on-wire packet length. Defaults to included length`}},required:[`dataHex`]},`Packet records to serialize in order`).enum(`endianness`,[`little`,`big`],`PCAP byte order for numeric fields`,{default:`little`}).enum(`timestampPrecision`,[`micro`,`nano`],`Timestamp precision marker in the PCAP magic`,{default:`micro`}).number(`snapLength`,`Global snapshot length. Default: 65535`,{default:65535}).string(`linkType`,`Link-layer type name (ethernet, raw, loopback) or integer string`,{default:`ethernet`}).required(`path`,`packets`).idempotent()),r(`pcap_read`,e=>e.desc(`Read a classic PCAP file and return compact deterministic packet summaries. PCAPNG is intentionally not supported.`).string(`path`,`Path to the PCAP file to parse`).number(`maxPackets`,`Maximum number of packet records to decode`).number(`maxBytesPerPacket`,`Maximum payload bytes to return per packet before truncating the reported hex payload`).required(`path`).query()),r(`proto_define_pattern`,e=>e.desc(`Define a protocol pattern with delimiter, byte order, and field layout.`).string(`name`,`Pattern name`).prop(`spec`,{type:`object`,description:`Pattern specification object`,additionalProperties:!0}).required(`spec`).idempotent()),r(`proto_auto_detect`,e=>e.desc(`Auto-detect a protocol pattern from one or more hex payload samples.`).array(`hexPayloads`,{type:`string`},`Hex payload samples`).required(`hexPayloads`).query()),r(`proto_export_schema`,e=>e.desc(`Export a protocol pattern to a .proto-like schema definition.`).string(`patternId`,`Pattern ID to export`).required(`patternId`).query()),r(`proto_infer_fields`,e=>e.desc(`Infer likely protocol fields from repeated hex payload samples.`).array(`hexPayloads`,{type:`string`},`Hex payload samples`).required(`hexPayloads`).query()),r(`proto_infer_state_machine`,e=>e.desc(`Infer a protocol state machine from captured message sequences.`).array(`messages`,{type:`object`,properties:{direction:{type:`string`,enum:[`req`,`res`],description:`Message direction`},timestamp:{type:`number`,description:`Message timestamp`},fields:{type:`object`,description:`Decoded message fields`,additionalProperties:!0},raw:{type:`string`,description:`Raw message or payload summary`}},required:[`direction`,`timestamp`,`fields`,`raw`]},`Captured protocol messages`).required(`messages`).query()),r(`proto_visualize_state`,e=>e.desc(`Generate a Mermaid state diagram from a protocol state machine definition.`).prop(`stateMachine`,{type:`object`,description:`State machine definition with states and transitions`,additionalProperties:!0}).query()),r(`proto_fingerprint`,e=>e.desc(`Identify protocol type from hex payload samples.`).array(`hexPayloads`,{type:`string`},`Hex payload samples to fingerprint`).boolean(`includeKnownProtocols`,`Match against known protocol signatures`,{default:!0}).boolean(`includeFieldHints`,`Suggest likely field boundaries`,{default:!0}).required(`hexPayloads`).query())],a=`protocol-analysis`,o=`protocolAnalysisHandlers`,s=n({domain:a,depKey:o,lookup:t(i),wrapResult:e,entries:[{tool:`proto_define_pattern`,method:`handleDefinePattern`},{tool:`proto_auto_detect`,method:`handleAutoDetect`},{tool:`proto_infer_fields`,method:`handleInferFields`},{tool:`proto_infer_state_machine`,method:`handleInferStateMachine`},{tool:`proto_export_schema`,method:`handleExportSchema`},{tool:`proto_visualize_state`,method:`handleVisualizeState`},{tool:`payload_template_build`,method:`handlePayloadTemplateBuild`},{tool:`payload_mutate`,method:`handlePayloadMutate`},{tool:`ethernet_frame_build`,method:`handleEthernetFrameBuild`},{tool:`arp_build`,method:`handleArpBuild`},{tool:`raw_ip_packet_build`,method:`handleRawIpPacketBuild`},{tool:`icmp_echo_build`,method:`handleIcmpEchoBuild`},{tool:`checksum_apply`,method:`handleChecksumApply`},{tool:`pcap_write`,method:`handlePcapWrite`},{tool:`pcap_read`,method:`handlePcapRead`},{tool:`proto_fingerprint`,method:`handleProtoFingerprint`}]});async function c(e){let{ProtocolAnalysisHandlers:t}=await import(`./handlers-BP12ZsWc.mjs`),n=e.getDomainInstance(o);if(n)return n;let r=new t(void 0,void 0,e.eventBus);return e.setDomainInstance(o,r),r}const l={kind:`domain-manifest`,version:1,domain:a,depKey:o,profiles:[`full`],ensure:c,registrations:s,prerequisites:{proto_auto_detect:[{condition:`At least one hex payload sample is required`,fix:`Capture traffic using network monitoring tools first`}],proto_infer_state_machine:[{condition:`Multiple message samples are required for state machine inference`,fix:`Capture message sequences with mojo-ipc or network tools`}]},workflowRule:{patterns:[/protocol\s+(reverse|analysis|pattern|state\s*machine|schema)/i,/custom\s+protocol|binary\s+protocol|wire\s+format/i,/infer\s+(protocol|fields|state\s*machine)/i,/proto.*export|proto.*schema|proto.*diagram/i,/payload\s+(template|build|mutate)|packet\s+(template|mutate)/i,/ethernet|arp|ipv4|ipv6|pcap|internet\s+checksum|raw\s+packet/i,/(decode|payload|bytes?|hex|protobuf|msgpack).*(protocol|field|state\s*machine)/i,/(base64|hex|protobuf|msgpack).*(payload|protocol|field|decode)/i,/(crypto\s*harness|checksum|payload\s+rebuild|payload\s+template).*(protocol|payload|decode)/i,/(无状态|纯算|确定性|解码|载荷|字节|报文).*(协议|字段|状态机)/i],priority:.6,tools:[`binary_detect_format`,`binary_decode`,`proto_auto_detect`,`proto_infer_fields`,`proto_define_pattern`,`proto_infer_state_machine`,`proto_export_schema`,`proto_visualize_state`,`payload_template_build`,`payload_mutate`,`checksum_apply`,`crypto_test_harness`,`ethernet_frame_build`,`arp_build`,`raw_ip_packet_build`,`icmp_echo_build`,`pcap_write`,`pcap_read`],hint:`Capture or craft packet bytes -> build Ethernet/ARP/IP/ICMP headers -> apply deterministic checksums and payload mutations -> read/write compact PCAP files -> infer fields or state machines from resulting payloads`},toolDependencies:[{from:`network_get_requests`,to:`binary_decode`,relation:`suggests`,weight:.9},{from:`binary_decode`,to:`proto_auto_detect`,relation:`precedes`,weight:.95},{from:`proto_auto_detect`,to:`proto_infer_fields`,relation:`precedes`,weight:.95},{from:`proto_infer_fields`,to:`proto_infer_state_machine`,relation:`precedes`,weight:.9},{from:`detect_crypto`,to:`crypto_test_harness`,relation:`suggests`,weight:.8},{from:`network`,to:`protocol-analysis`,relation:`uses`,weight:.7}]};export{l as default};
|
|
1
|
+
import{i as e}from"./response-B1RuVVfD.mjs";import{t}from"./registry-xB8Wgmyj.mjs";import{n}from"./bind-helpers-D0mGAOof.mjs";import{t as r}from"./tool-builder-CpLh-UQd.mjs";const i=[r(`payload_template_build`,e=>e.desc(`Build a deterministic payload from field definitions.`).array(`fields`,{type:`object`,properties:{name:{type:`string`,description:`Field name`},type:{type:`string`,enum:[`u8`,`u16`,`u32`,`i8`,`i16`,`i32`,`string`,`bytes`],description:`Field type`},value:{description:`Numeric or string field value`},encoding:{type:`string`,enum:[`utf8`,`ascii`,`hex`,`base64`],description:`String/bytes encoding override`},length:{type:`number`,description:`Optional fixed length`},padByte:{type:`number`,description:`Optional pad byte`}},required:[`name`,`type`,`value`]},`Field definitions in output order`).enum(`endian`,[`big`,`little`],`Integer byte order`,{default:`big`}).required(`fields`).idempotent()),r(`payload_mutate`,e=>e.desc(`Apply deterministic byte-level mutations to a hex payload.`).string(`hexPayload`,`Source payload as a hex string`).array(`mutations`,{type:`object`,properties:{strategy:{type:`string`,enum:[`set_byte`,`flip_bit`,`overwrite_bytes`,`append_bytes`,`truncate`,`increment_integer`],description:`Mutation strategy`},offset:{type:`number`,description:`Zero-based byte offset`},value:{type:`number`,description:`Byte value for set_byte`},bit:{type:`number`,description:`Bit index for flip_bit`},data:{type:`string`,description:`Mutation data for overwrite/append`},encoding:{type:`string`,enum:[`utf8`,`ascii`,`hex`,`base64`],description:`Data encoding for overwrite/append`},length:{type:`number`,description:`Target length for truncate`},width:{type:`number`,enum:[1,2,4],description:`Integer width in bytes`},delta:{type:`number`,description:`Increment/decrement delta`},endian:{type:`string`,enum:[`big`,`little`],description:`Integer byte order`},signed:{type:`boolean`,description:`Treat increment target as signed`}},required:[`strategy`]},`Byte-level mutations to apply in order`).required(`hexPayload`,`mutations`)),r(`ethernet_frame_build`,e=>e.desc(`Build a deterministic Ethernet II frame from source/destination MAC addresses, EtherType, and payload bytes.`).string(`destinationMac`,`Destination MAC address in colon, dash, dotted, or plain hex form`).string(`sourceMac`,`Source MAC address in colon, dash, dotted, or plain hex form`).string(`etherType`,`EtherType name (arp, ipv4, ipv6, vlan) or a 16-bit hex value such as 0800`).string(`payloadHex`,`Frame payload as a hex string`).required(`destinationMac`,`sourceMac`,`etherType`,`payloadHex`).idempotent()),r(`arp_build`,e=>e.desc(`Build a deterministic ARP payload for Ethernet/IPv4.`).enum(`operation`,[`request`,`reply`],`ARP operation code`,{default:`request`}).string(`senderMac`,`Sender hardware address`).string(`senderIp`,`Sender IPv4 address`).string(`targetMac`,`Target hardware address (use zeros for requests)`,{default:`00:00:00:00:00:00`}).string(`targetIp`,`Target IPv4 address`).number(`hardwareType`,`Hardware type number. Default: 1 (Ethernet)`,{default:1}).string(`protocolType`,`Protocol type name (ipv4) or 16-bit hex value. Default: ipv4`,{default:`ipv4`}).number(`hardwareSize`,`Hardware address size in bytes. Default: 6`,{default:6}).number(`protocolSize`,`Protocol address size in bytes. Default: 4`,{default:4}).required(`senderMac`,`senderIp`,`targetIp`).idempotent()),r(`raw_ip_packet_build`,e=>e.desc(`Build a deterministic IPv4 or IPv6 packet.`).enum(`version`,[`ipv4`,`ipv6`],`IP version`,{default:`ipv4`}).string(`sourceIp`,`Source IPv4/IPv6 address`).string(`destinationIp`,`Destination IPv4/IPv6 address`).string(`protocol`,`Protocol/next-header name (icmp, tcp, udp, icmpv6) or an 8-bit integer string/hex value`).string(`payloadHex`,`Inner payload as a hex string`,{default:``}).number(`ttl`,`IPv4 TTL or IPv6 hop limit fallback. Default: 64`,{default:64}).number(`hopLimit`,`Explicit IPv6 hop limit override`).number(`identification`,`IPv4 identification field. Default: 0`,{default:0}).boolean(`dontFragment`,`Set the IPv4 DF flag`,{default:!1}).boolean(`moreFragments`,`Set the IPv4 MF flag`,{default:!1}).number(`fragmentOffset`,`IPv4 fragment offset in 8-byte units. Default: 0`,{default:0}).number(`dscp`,`IPv4 DSCP or IPv6 traffic-class DSCP value (0-63). Default: 0`,{default:0}).number(`ecn`,`IPv4/IPv6 ECN bits (0-3). Default: 0`,{default:0}).number(`flowLabel`,`IPv6 flow label (0-1048575). Default: 0`,{default:0}).required(`version`,`sourceIp`,`destinationIp`,`protocol`).idempotent()),r(`icmp_echo_build`,e=>e.desc(`Build a deterministic ICMPv4 echo request or reply payload with an automatically computed checksum.`).enum(`operation`,[`request`,`reply`],`ICMP echo operation`,{default:`request`}).number(`identifier`,`ICMP echo identifier field. Default: 0`,{default:0}).number(`sequenceNumber`,`ICMP echo sequence number field. Default: 0`,{default:0}).string(`payloadHex`,`Optional ICMP payload as a hex string`,{default:``}).idempotent()),r(`checksum_apply`,e=>e.desc(`Apply a deterministic 16-bit Internet checksum across a payload slice, optionally zeroing and writing the checksum field back into the packet.`).string(`hexPayload`,`Source payload as a hex string`).number(`startOffset`,`Inclusive start offset for checksum range. Default: 0`,{default:0}).number(`endOffset`,`Exclusive end offset for checksum range. Default: payload length`).number(`zeroOffset`,`Optional checksum field offset to zero before calculation`).number(`zeroLength`,`Checksum field width in bytes when zeroOffset is set. Default: 2`,{default:2}).number(`writeOffset`,`Optional destination offset for writing the computed checksum. Defaults to zeroOffset when provided`).enum(`endian`,[`big`,`little`],`Byte order used when writing the checksum back`,{default:`big`}).required(`hexPayload`).idempotent()),r(`pcap_write`,e=>e.desc(`Write a compact classic PCAP file from deterministic packet byte records.`).string(`path`,`Destination path for the PCAP file`).array(`packets`,{type:`object`,properties:{dataHex:{type:`string`,description:`Packet bytes as a hex string`},timestampSeconds:{type:`number`,description:`Unix timestamp seconds. Defaults to 0 when omitted`},timestampFraction:{type:`number`,description:`Microsecond or nanosecond fraction depending on timestampPrecision`},originalLength:{type:`number`,description:`Original on-wire packet length. Defaults to included length`}},required:[`dataHex`]},`Packet records to serialize in order`).enum(`endianness`,[`little`,`big`],`PCAP byte order for numeric fields`,{default:`little`}).enum(`timestampPrecision`,[`micro`,`nano`],`Timestamp precision marker in the PCAP magic`,{default:`micro`}).number(`snapLength`,`Global snapshot length. Default: 65535`,{default:65535}).string(`linkType`,`Link-layer type name (ethernet, raw, loopback) or integer string`,{default:`ethernet`}).required(`path`,`packets`).idempotent()),r(`pcap_read`,e=>e.desc(`Read a classic PCAP file and return compact deterministic packet summaries. PCAPNG is intentionally not supported.`).string(`path`,`Path to the PCAP file to parse`).number(`maxPackets`,`Maximum number of packet records to decode`).number(`maxBytesPerPacket`,`Maximum payload bytes to return per packet before truncating the reported hex payload`).required(`path`).query()),r(`proto_define_pattern`,e=>e.desc(`Define a protocol pattern with delimiter, byte order, and field layout.`).string(`name`,`Pattern name`).prop(`spec`,{type:`object`,description:`Pattern specification object`,additionalProperties:!0}).required(`spec`).idempotent()),r(`proto_auto_detect`,e=>e.desc(`Auto-detect a protocol pattern from one or more hex payload samples.`).array(`hexPayloads`,{type:`string`},`Hex payload samples`).required(`hexPayloads`).query()),r(`proto_export_schema`,e=>e.desc(`Export a protocol pattern to a .proto-like schema definition.`).string(`patternId`,`Pattern ID to export`).required(`patternId`).query()),r(`proto_infer_fields`,e=>e.desc(`Infer likely protocol fields from repeated hex payload samples.`).array(`hexPayloads`,{type:`string`},`Hex payload samples`).required(`hexPayloads`).query()),r(`proto_infer_state_machine`,e=>e.desc(`Infer a protocol state machine from captured message sequences.`).array(`messages`,{type:`object`,properties:{direction:{type:`string`,enum:[`req`,`res`],description:`Message direction`},timestamp:{type:`number`,description:`Message timestamp`},fields:{type:`object`,description:`Decoded message fields`,additionalProperties:!0},raw:{type:`string`,description:`Raw message or payload summary`}},required:[`direction`,`timestamp`,`fields`,`raw`]},`Captured protocol messages`).required(`messages`).query()),r(`proto_visualize_state`,e=>e.desc(`Generate a Mermaid state diagram from a protocol state machine definition.`).prop(`stateMachine`,{type:`object`,description:`State machine definition with states and transitions`,additionalProperties:!0}).query()),r(`proto_fingerprint`,e=>e.desc(`Identify protocol type from hex payload samples.`).array(`hexPayloads`,{type:`string`},`Hex payload samples to fingerprint`).boolean(`includeKnownProtocols`,`Match against known protocol signatures`,{default:!0}).boolean(`includeFieldHints`,`Suggest likely field boundaries`,{default:!0}).required(`hexPayloads`).query())],a=`protocol-analysis`,o=`protocolAnalysisHandlers`,s=n({domain:a,depKey:o,lookup:t(i),wrapResult:e,entries:[{tool:`proto_define_pattern`,method:`handleDefinePattern`},{tool:`proto_auto_detect`,method:`handleAutoDetect`},{tool:`proto_infer_fields`,method:`handleInferFields`},{tool:`proto_infer_state_machine`,method:`handleInferStateMachine`},{tool:`proto_export_schema`,method:`handleExportSchema`},{tool:`proto_visualize_state`,method:`handleVisualizeState`},{tool:`payload_template_build`,method:`handlePayloadTemplateBuild`},{tool:`payload_mutate`,method:`handlePayloadMutate`},{tool:`ethernet_frame_build`,method:`handleEthernetFrameBuild`},{tool:`arp_build`,method:`handleArpBuild`},{tool:`raw_ip_packet_build`,method:`handleRawIpPacketBuild`},{tool:`icmp_echo_build`,method:`handleIcmpEchoBuild`},{tool:`checksum_apply`,method:`handleChecksumApply`},{tool:`pcap_write`,method:`handlePcapWrite`},{tool:`pcap_read`,method:`handlePcapRead`},{tool:`proto_fingerprint`,method:`handleProtoFingerprint`}]});async function c(e){let{ProtocolAnalysisHandlers:t}=await import(`./handlers-BbS4hssc.mjs`),n=e.getDomainInstance(o);if(n)return n;let r=new t(void 0,void 0,e.eventBus);return e.setDomainInstance(o,r),r}const l={kind:`domain-manifest`,version:1,domain:a,depKey:o,profiles:[`full`],ensure:c,registrations:s,prerequisites:{proto_auto_detect:[{condition:`At least one hex payload sample is required`,fix:`Capture traffic using network monitoring tools first`}],proto_infer_state_machine:[{condition:`Multiple message samples are required for state machine inference`,fix:`Capture message sequences with mojo-ipc or network tools`}]},workflowRule:{patterns:[/protocol\s+(reverse|analysis|pattern|state\s*machine|schema)/i,/custom\s+protocol|binary\s+protocol|wire\s+format/i,/infer\s+(protocol|fields|state\s*machine)/i,/proto.*export|proto.*schema|proto.*diagram/i,/payload\s+(template|build|mutate)|packet\s+(template|mutate)/i,/ethernet|arp|ipv4|ipv6|pcap|internet\s+checksum|raw\s+packet/i,/(decode|payload|bytes?|hex|protobuf|msgpack).*(protocol|field|state\s*machine)/i,/(base64|hex|protobuf|msgpack).*(payload|protocol|field|decode)/i,/(crypto\s*harness|checksum|payload\s+rebuild|payload\s+template).*(protocol|payload|decode)/i,/(无状态|纯算|确定性|解码|载荷|字节|报文).*(协议|字段|状态机)/i],priority:.6,tools:[`binary_detect_format`,`binary_decode`,`proto_auto_detect`,`proto_infer_fields`,`proto_define_pattern`,`proto_infer_state_machine`,`proto_export_schema`,`proto_visualize_state`,`payload_template_build`,`payload_mutate`,`checksum_apply`,`crypto_test_harness`,`ethernet_frame_build`,`arp_build`,`raw_ip_packet_build`,`icmp_echo_build`,`pcap_write`,`pcap_read`],hint:`Capture or craft packet bytes -> build Ethernet/ARP/IP/ICMP headers -> apply deterministic checksums and payload mutations -> read/write compact PCAP files -> infer fields or state machines from resulting payloads`},toolDependencies:[{from:`network_get_requests`,to:`binary_decode`,relation:`suggests`,weight:.9},{from:`binary_decode`,to:`proto_auto_detect`,relation:`precedes`,weight:.95},{from:`proto_auto_detect`,to:`proto_infer_fields`,relation:`precedes`,weight:.95},{from:`proto_infer_fields`,to:`proto_infer_state_machine`,relation:`precedes`,weight:.9},{from:`detect_crypto`,to:`crypto_test_harness`,relation:`suggests`,weight:.8},{from:`network`,to:`protocol-analysis`,relation:`uses`,weight:.7}]};export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ensure-browser-core-JHwDo5ql.mjs";import{t}from"./registry-xB8Wgmyj.mjs";import{n}from"./bind-helpers-D0mGAOof.mjs";import{t as r}from"./definitions-LdkeuOeA.mjs";const i=`encoding`,a=`encodingHandlers`,o=n({domain:i,depKey:a,lookup:t(r),entries:[{tool:`binary_detect_format`,method:`handleBinaryDetectFormat`},{tool:`binary_decode`,method:`handleBinaryDecode`},{tool:`binary_encode`,method:`handleBinaryEncode`},{tool:`binary_entropy_analysis`,method:`handleBinaryEntropyAnalysis`},{tool:`protobuf_decode_raw`,method:`handleProtobufDecodeRaw`}]});async function s(t){let{EncodingToolHandlers:n}=await import(`./encoding-B4xZWErf.mjs`);return await e(t),t.encodingHandlers||=new n(t.collector,async e=>t.consoleMonitor?.getResponseBody(e)??null),t.encodingHandlers}const c={kind:`domain-manifest`,version:1,domain:i,depKey:a,profiles:[`workflow`,`full`],ensure:s,registrations:o};export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ensure-browser-core-JHwDo5ql.mjs";import{t}from"./registry-xB8Wgmyj.mjs";import{n}from"./bind-helpers-D0mGAOof.mjs";import{t as r}from"./definitions-BOvju5t2.mjs";import{t as i}from"./definitions-EGmqr85H.mjs";const a=`workflow`,o=`workflowHandlers`,s=t([...r,...i]),c=n({domain:a,depKey:o,lookup:s,entries:[{tool:`page_script_register`,method:`handlePageScriptRegister`},{tool:`page_script_run`,method:`handlePageScriptRun`},{tool:`api_probe_batch`,method:`handleApiProbeBatch`},{tool:`js_bundle_search`,method:`handleJsBundleSearch`},{tool:`list_extension_workflows`,method:`handleListExtensionWorkflows`},{tool:`run_extension_workflow`,method:`handleRunExtensionWorkflow`}]}),l=n({domain:a,depKey:`macroHandlers`,lookup:s,entries:[{tool:`run_macro`,method:`handleRunMacro`,profiles:[`full`]},{tool:`list_macros`,method:`handleListMacros`,profiles:[`full`]}]});async function u(t){let{WorkflowHandlers:n}=await import(`./workflow-wkXb3x-U.mjs`),{MacroToolHandlers:r}=await import(`./macro-p8kuJVcm.mjs`);await e(t);let i=t.handlerDeps.browserHandlers,a=t.handlerDeps.advancedHandlers;return t.workflowHandlers||=new n({browserHandlers:i,advancedHandlers:a,serverContext:t}),t.macroHandlers||=new r(t),t.workflowHandlers}const d={kind:`domain-manifest`,version:1,domain:a,depKey:o,secondaryDepKeys:[`macroHandlers`],profiles:[`workflow`,`full`],ensure:u,workflowRule:{patterns:[/(workflow|extension|run|macro)/i,/(工作流|扩展|运行|宏)/i],priority:95,tools:[`run_extension_workflow`,`list_extension_workflows`,`run_macro`,`list_macros`],hint:`Workflow & macros: list workflows → run workflow; or list macros → run macro`},prerequisites:{page_script_run:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}],api_probe_batch:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`},{condition:`Network monitoring must be enabled`,fix:`Call network_monitor(enable) first`}],js_bundle_search:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}],run_extension_workflow:[{condition:`Browser must be launched`,fix:`Call browser_launch or browser_attach first`}]},registrations:[...c,...l]};export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./response-C7rKQst4.mjs";import{t}from"./registry-DUHIPE-v.mjs";import{n}from"./bind-helpers-BlAOQrFQ.mjs";const r=[`TLSv1`,`TLSv1.1`,`TLSv1.2`,`TLSv1.3`];function i(e,t,n={},r=[]){return{name:e,description:t,inputSchema:{type:`object`,properties:n,required:r}}}const a=[i(`tls_cert_pin_bypass_frida`,`Bypass certificate pinning via Frida injection (supports BoringSSL, Chrome, OkHttp).`)],o=[i(`net_raw_tcp_send`,`Send raw TCP data to a remote host; accepts hex or text input.`,{host:{type:`string`,default:`127.0.0.1`,description:`Target host address`},port:{type:`number`,description:`Target port number (1-65535)`},dataHex:{type:`string`,description:`Hex-encoded data to send`},dataText:{type:`string`,description:`Text data to send (alternative to dataHex)`},timeout:{type:`number`,default:5e3,description:`Connection timeout in ms`}},[`port`]),i(`net_raw_tcp_listen`,`Listen on a local TCP port for one incoming connection.`,{port:{type:`number`,description:`Local port to listen on (1-65535)`},timeout:{type:`number`,default:1e4,description:`Listen timeout in ms`}},[`port`]),i(`net_raw_udp_send`,`Send a raw UDP datagram and wait for a response.`,{host:{type:`string`,default:`127.0.0.1`,description:`Target host address`},port:{type:`number`,description:`Target port number (1-65535)`},dataHex:{type:`string`,description:`Hex-encoded data to send`},dataText:{type:`string`,description:`Text data to send (alternative to dataHex)`},timeout:{type:`number`,default:5e3,description:`Response timeout in ms`}},[`port`]),i(`net_raw_udp_listen`,`Listen on a local UDP port for an incoming datagram.`,{port:{type:`number`,description:`Local port to listen on (1-65535)`},timeout:{type:`number`,default:1e4,description:`Listen timeout in ms`}},[`port`])],s=[i(`tcp_open`,`Open a TCP session.`,{host:{type:`string`,default:`127.0.0.1`,description:`Target host name or IP address`},port:{type:`number`,description:`Target TCP port`},timeoutMs:{type:`number`,default:5e3,description:`Connection timeout in milliseconds`},noDelay:{type:`boolean`,default:!0,description:`Enable TCP_NODELAY on the socket after connect`}},[`port`]),i(`tcp_write`,`Write data to an open TCP session.`,{sessionId:{type:`string`,description:`TCP session ID`},dataHex:{type:`string`,description:`Hex-encoded payload to write`},dataText:{type:`string`,description:`UTF-8 text payload to write`},timeoutMs:{type:`number`,default:5e3,description:`Write timeout in milliseconds`}},[`sessionId`]),i(`tcp_read_until`,`Read from an open TCP session until a delimiter or byte limit is reached.`,{sessionId:{type:`string`,description:`TCP session ID`},delimiterHex:{type:`string`,description:`Hex-encoded delimiter to stop at`},delimiterText:{type:`string`,description:`UTF-8 delimiter to stop at`},includeDelimiter:{type:`boolean`,default:!0,description:`Include the delimiter bytes in the returned payload`},maxBytes:{type:`number`,description:`Optional maximum number of bytes to return even if no delimiter matches`},timeoutMs:{type:`number`,default:5e3,description:`Read timeout in milliseconds`}},[`sessionId`]),i(`tcp_close`,`Close an open TCP session.`,{sessionId:{type:`string`,description:`TCP session ID`},force:{type:`boolean`,default:!1,description:`Destroy the socket immediately instead of sending FIN first`},timeoutMs:{type:`number`,default:1e3,description:`Close wait timeout in milliseconds before forcing socket destruction`}},[`sessionId`]),i(`tls_open`,`Open a TLS session.`,{host:{type:`string`,description:`Target host name or IP address`},port:{type:`number`,default:443,description:`Target TLS port`},servername:{type:`string`,description:`Optional SNI and hostname validation override`},alpnProtocols:{type:`array`,items:{type:`string`},description:`Optional ALPN protocols to offer`},timeoutMs:{type:`number`,default:5e3,description:`Connection timeout in milliseconds`},minVersion:{type:`string`,enum:[...r],description:`Optional minimum TLS version`},maxVersion:{type:`string`,enum:[...r],description:`Optional maximum TLS version`},caPem:{type:`string`,description:`Optional PEM-encoded CA bundle`},caPath:{type:`string`,description:`Optional path to a PEM-encoded CA bundle`},allowInvalidCertificates:{type:`boolean`,default:!1,description:`Allow untrusted certificate chains while still reporting the failure`},skipHostnameCheck:{type:`boolean`,default:!1,description:`Skip hostname verification while still reporting the requested target`}},[`host`]),i(`tls_write`,`Write data to an open TLS session.`,{sessionId:{type:`string`,description:`TLS session ID`},dataHex:{type:`string`,description:`Hex-encoded payload to write`},dataText:{type:`string`,description:`UTF-8 text payload to write`},timeoutMs:{type:`number`,default:5e3,description:`Write timeout in milliseconds`}},[`sessionId`]),i(`tls_read_until`,`Read from an open TLS session until a delimiter or byte limit is reached.`,{sessionId:{type:`string`,description:`TLS session ID`},delimiterHex:{type:`string`,description:`Hex-encoded delimiter to stop at`},delimiterText:{type:`string`,description:`UTF-8 delimiter to stop at`},includeDelimiter:{type:`boolean`,default:!0,description:`Include the delimiter bytes in the returned payload`},maxBytes:{type:`number`,description:`Optional maximum number of bytes to return even if no delimiter matches`},timeoutMs:{type:`number`,default:5e3,description:`Read timeout in milliseconds`}},[`sessionId`]),i(`tls_close`,`Close an open TLS session.`,{sessionId:{type:`string`,description:`TLS session ID`},force:{type:`boolean`,default:!1,description:`Destroy the TLS socket immediately instead of sending close_notify/FIN first`},timeoutMs:{type:`number`,default:1e3,description:`Close wait timeout in milliseconds before forcing socket destruction`}},[`sessionId`])],c=[i(`tls_keylog_enable`,`Enable SSLKEYLOGFILE output for BoringSSL-compatible clients.`),i(`tls_keylog_parse`,`Parse an SSLKEYLOGFILE and summarize available key material.`,{path:{type:`string`,description:`Path to SSLKEYLOGFILE`}}),i(`tls_keylog_disable`,`Disable SSLKEYLOGFILE capture and unset the environment variable.`,{path:{type:`string`,description:`Path to disable`}}),i(`tls_decrypt_payload`,`Decrypt a TLS payload using a provided key, nonce, and algorithm.`,{encryptedHex:{type:`string`,description:`Hex-encoded encrypted payload`},keyHex:{type:`string`,description:`Hex-encoded decryption key`},nonceHex:{type:`string`,description:`Hex-encoded nonce/IV`},algorithm:{type:`string`,description:`Cipher algorithm`,default:`aes-256-gcm`},authTagHex:{type:`string`,description:`Hex-encoded authentication tag`}},[`encryptedHex`,`keyHex`,`nonceHex`]),i(`tls_keylog_summarize`,`Summarize the contents of an SSLKEYLOGFILE by label distribution.`,{content:{type:`string`,description:`Inline keylog content to summarize`}}),i(`tls_keylog_lookup_secret`,`Look up a TLS secret by client random hex from the parsed keylog.`,{clientRandom:{type:`string`,description:`Hex-encoded client random`},label:{type:`string`,description:`Optional label filter`}},[`clientRandom`]),i(`tls_cert_pin_bypass`,`Return a certificate pinning bypass strategy for the selected platform.`,{target:{type:`string`,enum:[`android`,`ios`,`desktop`],description:`Target platform for bypass strategy`}},[`target`]),i(`tls_parse_handshake`,`Parse TLS handshake metadata from raw hex.`,{rawHex:{type:`string`,description:`Hex-encoded TLS handshake record`},decrypt:{type:`boolean`,description:`Attempt payload decryption using the loaded keylog`}},[`rawHex`]),i(`tls_cipher_suites`,`List TLS cipher suites.`,{filter:{type:`string`,description:`Keyword filter for cipher suite names`}}),i(`tls_parse_certificate`,`Parse a TLS Certificate message from raw hex and extract fingerprints.`,{rawHex:{type:`string`,description:`Hex-encoded certificate data`}},[`rawHex`]),i(`tls_probe_endpoint`,`Probe a TLS endpoint and report handshake and certificate details.`,{host:{type:`string`,description:`Target host name or IP address`},port:{type:`number`,default:443,description:`Target TLS port`},servername:{type:`string`,description:`Optional SNI and hostname validation override`},alpnProtocols:{type:`array`,items:{type:`string`},description:`Optional ALPN protocols to offer`},timeoutMs:{type:`number`,default:5e3,description:`Probe timeout in milliseconds`},minVersion:{type:`string`,enum:[...r],description:`Optional minimum TLS version`},maxVersion:{type:`string`,enum:[...r],description:`Optional maximum TLS version`},caPem:{type:`string`,description:`Optional PEM-encoded CA bundle`},caPath:{type:`string`,description:`Optional path to a PEM-encoded CA bundle`},allowInvalidCertificates:{type:`boolean`,default:!1,description:`Allow untrusted certificate chains while still reporting the failure`},skipHostnameCheck:{type:`boolean`,default:!1,description:`Skip hostname verification while still reporting the requested target`}},[`host`])],l=[i(`websocket_open`,`Open a WebSocket session.`,{url:{type:`string`,description:`WebSocket URL`},scheme:{type:`string`,enum:[`ws`,`wss`],default:`ws`,description:`WebSocket transport scheme`},host:{type:`string`,description:`Target host name or IP address`},port:{type:`number`,description:`Target port`},path:{type:`string`,default:`/`,description:`Request path`},subprotocols:{type:`array`,items:{type:`string`},description:`Optional subprotocols to offer`},timeoutMs:{type:`number`,default:5e3,description:`Handshake timeout in milliseconds`},servername:{type:`string`,description:`Optional SNI and hostname validation override`},alpnProtocols:{type:`array`,items:{type:`string`},description:`Optional ALPN protocols to offer`},minVersion:{type:`string`,enum:[...r],description:`Optional minimum TLS version`},maxVersion:{type:`string`,enum:[...r],description:`Optional maximum TLS version`},caPem:{type:`string`,description:`Optional PEM-encoded CA bundle`},caPath:{type:`string`,description:`Optional path to a PEM-encoded CA bundle`},allowInvalidCertificates:{type:`boolean`,default:!1,description:`Allow untrusted certificate chains`},skipHostnameCheck:{type:`boolean`,default:!1,description:`Skip hostname verification`}}),i(`websocket_send_frame`,`Send a WebSocket frame.`,{sessionId:{type:`string`,description:`WebSocket session ID`},frameType:{type:`string`,enum:[`text`,`binary`,`ping`,`pong`,`close`],description:`Outgoing frame opcode`},dataText:{type:`string`,description:`UTF-8 payload for text/ping/pong/close frames`},dataHex:{type:`string`,description:`Hex-encoded payload for binary/ping/pong/close frames`},closeCode:{type:`number`,description:`Optional close status code`},closeReason:{type:`string`,description:`Optional close reason`},timeoutMs:{type:`number`,default:5e3,description:`Write timeout in milliseconds`}},[`sessionId`,`frameType`]),i(`websocket_read_frame`,`Read the next queued WebSocket frame from an open session.`,{sessionId:{type:`string`,description:`WebSocket session ID`},timeoutMs:{type:`number`,default:5e3,description:`Read timeout in milliseconds`}},[`sessionId`]),i(`websocket_close`,`Close an open WebSocket session.`,{sessionId:{type:`string`,description:`WebSocket session ID`},force:{type:`boolean`,default:!1,description:`Destroy the underlying socket immediately without sending a close frame first`},closeCode:{type:`number`,description:`Optional close status code`},closeReason:{type:`string`,description:`Optional close reason`},timeoutMs:{type:`number`,default:1e3,description:`Close wait timeout in milliseconds before forcing socket destruction`}},[`sessionId`])],u=[...c,...s,...l,...a,...o],d=`boringssl-inspector`,f=`boringsslInspectorHandlers`,p=[`workflow`,`full`],m=n({domain:d,depKey:f,lookup:t(u),wrapResult:e,entries:[{tool:`tls_keylog_enable`,method:`handleTlsKeylogEnable`},{tool:`tls_keylog_parse`,method:`handleTlsKeylogParse`},{tool:`tls_keylog_disable`,method:`handleTlsKeylogDisable`},{tool:`tls_decrypt_payload`,method:`handleTlsDecryptPayload`},{tool:`tls_keylog_summarize`,method:`handleTlsKeylogSummarize`},{tool:`tls_keylog_lookup_secret`,method:`handleTlsKeylogLookupSecret`},{tool:`tls_cert_pin_bypass`,method:`handleTlsCertPinBypass`},{tool:`tls_parse_handshake`,method:`handleParseHandshake`},{tool:`tls_cipher_suites`,method:`handleCipherSuites`},{tool:`tls_parse_certificate`,method:`handleParseCertificate`},{tool:`tls_probe_endpoint`,method:`handleTlsProbeEndpoint`},{tool:`tcp_open`,method:`handleTcpOpen`},{tool:`tcp_write`,method:`handleTcpWrite`},{tool:`tcp_read_until`,method:`handleTcpReadUntil`},{tool:`tcp_close`,method:`handleTcpClose`},{tool:`tls_open`,method:`handleTlsOpen`},{tool:`tls_write`,method:`handleTlsWrite`},{tool:`tls_read_until`,method:`handleTlsReadUntil`},{tool:`tls_close`,method:`handleTlsClose`},{tool:`websocket_open`,method:`handleWebSocketOpen`},{tool:`websocket_send_frame`,method:`handleWebSocketSendFrame`},{tool:`websocket_read_frame`,method:`handleWebSocketReadFrame`},{tool:`websocket_close`,method:`handleWebSocketClose`},{tool:`tls_cert_pin_bypass_frida`,method:`handleBypassCertPinning`},{tool:`net_raw_tcp_send`,method:`handleRawTcpSend`},{tool:`net_raw_tcp_listen`,method:`handleRawTcpListen`},{tool:`net_raw_udp_send`,method:`handleRawUdpSend`},{tool:`net_raw_udp_listen`,method:`handleRawUdpListen`}]});async function h(e){let{BoringsslInspectorHandlers:t}=await import(`./handlers-DW5AbYs5.mjs`),{TLSKeyLogExtractor:n}=await import(`./boringssl-inspector-BST5vtKx.mjs`).then(e=>e.t),r=e.getDomainInstance(f);if(r)return r;let i=new t(new n);return i.setExtensionInvoke(async t=>{try{let n=e.getDomainInstance(`binaryInstrumentHandlers`);if(n&&typeof n.handleFridaRunScript==`function`)return n.handleFridaRunScript(t)}catch{}return null}),i.setEventBus(e.eventBus),e.setDomainInstance(f,i),i}const g={kind:`domain-manifest`,version:1,domain:d,depKey:f,profiles:p,registrations:m,ensure:h,workflowRule:{patterns:[/\b(tls|ssl|boringssl|cert(ificate)?|pinning|handshake|keylog|websocket)\b/i,/(tls|ssl|cert|pinning|websocket).*(hook|bypass|intercept|dump|log|frame|session)/i],priority:80,tools:[`tls_probe_endpoint`,`websocket_open`,`websocket_send_frame`,`websocket_read_frame`,`tls_keylog_enable`,`tls_keylog_parse`,`tls_decrypt_payload`,`tls_cert_pin_bypass`],hint:`TLS/WebSocket analysis: probe endpoint → open ws/wss session → exchange frames → inspecttrust/cipher/ALPN → enable keylog or bypass pinning when needed.`},prerequisites:{tls_probe_endpoint:[{condition:`Target scope must be explicitly authorized and routable from the MCP host`,fix:`Verify target authorization, port reachability, and provide servername/custom CA options when needed`}],tls_keylog_enable:[{condition:`Target process must allow SSLKEYLOGFILE or be attachable by Frida`,fix:`Launch the target with SSLKEYLOGFILE env set, or enable Frida-based hooking`}],tls_decrypt_payload:[{condition:`A keylog session must be active with captured secrets`,fix:`Run tls_keylog_enable and reproduce TLS traffic before decrypting`}],tls_cert_pin_bypass_frida:[{condition:`Frida must be available on PATH and attached to the target`,fix:`Install Frida and attach via binary-instrument:frida_attach before running the bypass`}]},toolDependencies:[{from:`network`,to:`boringssl-inspector`,relation:`uses`,weight:.8}]};export{g as default};
|
|
1
|
+
import{i as e}from"./response-B1RuVVfD.mjs";import{t}from"./registry-xB8Wgmyj.mjs";import{n}from"./bind-helpers-D0mGAOof.mjs";const r=[`TLSv1`,`TLSv1.1`,`TLSv1.2`,`TLSv1.3`];function i(e,t,n={},r=[]){return{name:e,description:t,inputSchema:{type:`object`,properties:n,required:r}}}const a=[i(`tls_cert_pin_bypass_frida`,`Bypass certificate pinning via Frida injection (supports BoringSSL, Chrome, OkHttp).`)],o=[i(`net_raw_tcp_send`,`Send raw TCP data to a remote host; accepts hex or text input.`,{host:{type:`string`,default:`127.0.0.1`,description:`Target host address`},port:{type:`number`,description:`Target port number (1-65535)`},dataHex:{type:`string`,description:`Hex-encoded data to send`},dataText:{type:`string`,description:`Text data to send (alternative to dataHex)`},timeout:{type:`number`,default:5e3,description:`Connection timeout in ms`}},[`port`]),i(`net_raw_tcp_listen`,`Listen on a local TCP port for one incoming connection.`,{port:{type:`number`,description:`Local port to listen on (1-65535)`},timeout:{type:`number`,default:1e4,description:`Listen timeout in ms`}},[`port`]),i(`net_raw_udp_send`,`Send a raw UDP datagram and wait for a response.`,{host:{type:`string`,default:`127.0.0.1`,description:`Target host address`},port:{type:`number`,description:`Target port number (1-65535)`},dataHex:{type:`string`,description:`Hex-encoded data to send`},dataText:{type:`string`,description:`Text data to send (alternative to dataHex)`},timeout:{type:`number`,default:5e3,description:`Response timeout in ms`}},[`port`]),i(`net_raw_udp_listen`,`Listen on a local UDP port for an incoming datagram.`,{port:{type:`number`,description:`Local port to listen on (1-65535)`},timeout:{type:`number`,default:1e4,description:`Listen timeout in ms`}},[`port`])],s=[i(`tcp_open`,`Open a TCP session.`,{host:{type:`string`,default:`127.0.0.1`,description:`Target host name or IP address`},port:{type:`number`,description:`Target TCP port`},timeoutMs:{type:`number`,default:5e3,description:`Connection timeout in milliseconds`},noDelay:{type:`boolean`,default:!0,description:`Enable TCP_NODELAY on the socket after connect`}},[`port`]),i(`tcp_write`,`Write data to an open TCP session.`,{sessionId:{type:`string`,description:`TCP session ID`},dataHex:{type:`string`,description:`Hex-encoded payload to write`},dataText:{type:`string`,description:`UTF-8 text payload to write`},timeoutMs:{type:`number`,default:5e3,description:`Write timeout in milliseconds`}},[`sessionId`]),i(`tcp_read_until`,`Read from an open TCP session until a delimiter or byte limit is reached.`,{sessionId:{type:`string`,description:`TCP session ID`},delimiterHex:{type:`string`,description:`Hex-encoded delimiter to stop at`},delimiterText:{type:`string`,description:`UTF-8 delimiter to stop at`},includeDelimiter:{type:`boolean`,default:!0,description:`Include the delimiter bytes in the returned payload`},maxBytes:{type:`number`,description:`Optional maximum number of bytes to return even if no delimiter matches`},timeoutMs:{type:`number`,default:5e3,description:`Read timeout in milliseconds`}},[`sessionId`]),i(`tcp_close`,`Close an open TCP session.`,{sessionId:{type:`string`,description:`TCP session ID`},force:{type:`boolean`,default:!1,description:`Destroy the socket immediately instead of sending FIN first`},timeoutMs:{type:`number`,default:1e3,description:`Close wait timeout in milliseconds before forcing socket destruction`}},[`sessionId`]),i(`tls_open`,`Open a TLS session.`,{host:{type:`string`,description:`Target host name or IP address`},port:{type:`number`,default:443,description:`Target TLS port`},servername:{type:`string`,description:`Optional SNI and hostname validation override`},alpnProtocols:{type:`array`,items:{type:`string`},description:`Optional ALPN protocols to offer`},timeoutMs:{type:`number`,default:5e3,description:`Connection timeout in milliseconds`},minVersion:{type:`string`,enum:[...r],description:`Optional minimum TLS version`},maxVersion:{type:`string`,enum:[...r],description:`Optional maximum TLS version`},caPem:{type:`string`,description:`Optional PEM-encoded CA bundle`},caPath:{type:`string`,description:`Optional path to a PEM-encoded CA bundle`},allowInvalidCertificates:{type:`boolean`,default:!1,description:`Allow untrusted certificate chains while still reporting the failure`},skipHostnameCheck:{type:`boolean`,default:!1,description:`Skip hostname verification while still reporting the requested target`}},[`host`]),i(`tls_write`,`Write data to an open TLS session.`,{sessionId:{type:`string`,description:`TLS session ID`},dataHex:{type:`string`,description:`Hex-encoded payload to write`},dataText:{type:`string`,description:`UTF-8 text payload to write`},timeoutMs:{type:`number`,default:5e3,description:`Write timeout in milliseconds`}},[`sessionId`]),i(`tls_read_until`,`Read from an open TLS session until a delimiter or byte limit is reached.`,{sessionId:{type:`string`,description:`TLS session ID`},delimiterHex:{type:`string`,description:`Hex-encoded delimiter to stop at`},delimiterText:{type:`string`,description:`UTF-8 delimiter to stop at`},includeDelimiter:{type:`boolean`,default:!0,description:`Include the delimiter bytes in the returned payload`},maxBytes:{type:`number`,description:`Optional maximum number of bytes to return even if no delimiter matches`},timeoutMs:{type:`number`,default:5e3,description:`Read timeout in milliseconds`}},[`sessionId`]),i(`tls_close`,`Close an open TLS session.`,{sessionId:{type:`string`,description:`TLS session ID`},force:{type:`boolean`,default:!1,description:`Destroy the TLS socket immediately instead of sending close_notify/FIN first`},timeoutMs:{type:`number`,default:1e3,description:`Close wait timeout in milliseconds before forcing socket destruction`}},[`sessionId`])],c=[i(`tls_keylog_enable`,`Enable SSLKEYLOGFILE output for BoringSSL-compatible clients.`),i(`tls_keylog_parse`,`Parse an SSLKEYLOGFILE and summarize available key material.`,{path:{type:`string`,description:`Path to SSLKEYLOGFILE`}}),i(`tls_keylog_disable`,`Disable SSLKEYLOGFILE capture and unset the environment variable.`,{path:{type:`string`,description:`Path to disable`}}),i(`tls_decrypt_payload`,`Decrypt a TLS payload using a provided key, nonce, and algorithm.`,{encryptedHex:{type:`string`,description:`Hex-encoded encrypted payload`},keyHex:{type:`string`,description:`Hex-encoded decryption key`},nonceHex:{type:`string`,description:`Hex-encoded nonce/IV`},algorithm:{type:`string`,description:`Cipher algorithm`,default:`aes-256-gcm`},authTagHex:{type:`string`,description:`Hex-encoded authentication tag`}},[`encryptedHex`,`keyHex`,`nonceHex`]),i(`tls_keylog_summarize`,`Summarize the contents of an SSLKEYLOGFILE by label distribution.`,{content:{type:`string`,description:`Inline keylog content to summarize`}}),i(`tls_keylog_lookup_secret`,`Look up a TLS secret by client random hex from the parsed keylog.`,{clientRandom:{type:`string`,description:`Hex-encoded client random`},label:{type:`string`,description:`Optional label filter`}},[`clientRandom`]),i(`tls_cert_pin_bypass`,`Return a certificate pinning bypass strategy for the selected platform.`,{target:{type:`string`,enum:[`android`,`ios`,`desktop`],description:`Target platform for bypass strategy`}},[`target`]),i(`tls_parse_handshake`,`Parse TLS handshake metadata from raw hex.`,{rawHex:{type:`string`,description:`Hex-encoded TLS handshake record`},decrypt:{type:`boolean`,description:`Attempt payload decryption using the loaded keylog`}},[`rawHex`]),i(`tls_cipher_suites`,`List TLS cipher suites.`,{filter:{type:`string`,description:`Keyword filter for cipher suite names`}}),i(`tls_parse_certificate`,`Parse a TLS Certificate message from raw hex and extract fingerprints.`,{rawHex:{type:`string`,description:`Hex-encoded certificate data`}},[`rawHex`]),i(`tls_probe_endpoint`,`Probe a TLS endpoint and report handshake and certificate details.`,{host:{type:`string`,description:`Target host name or IP address`},port:{type:`number`,default:443,description:`Target TLS port`},servername:{type:`string`,description:`Optional SNI and hostname validation override`},alpnProtocols:{type:`array`,items:{type:`string`},description:`Optional ALPN protocols to offer`},timeoutMs:{type:`number`,default:5e3,description:`Probe timeout in milliseconds`},minVersion:{type:`string`,enum:[...r],description:`Optional minimum TLS version`},maxVersion:{type:`string`,enum:[...r],description:`Optional maximum TLS version`},caPem:{type:`string`,description:`Optional PEM-encoded CA bundle`},caPath:{type:`string`,description:`Optional path to a PEM-encoded CA bundle`},allowInvalidCertificates:{type:`boolean`,default:!1,description:`Allow untrusted certificate chains while still reporting the failure`},skipHostnameCheck:{type:`boolean`,default:!1,description:`Skip hostname verification while still reporting the requested target`}},[`host`])],l=[i(`websocket_open`,`Open a WebSocket session.`,{url:{type:`string`,description:`WebSocket URL`},scheme:{type:`string`,enum:[`ws`,`wss`],default:`ws`,description:`WebSocket transport scheme`},host:{type:`string`,description:`Target host name or IP address`},port:{type:`number`,description:`Target port`},path:{type:`string`,default:`/`,description:`Request path`},subprotocols:{type:`array`,items:{type:`string`},description:`Optional subprotocols to offer`},timeoutMs:{type:`number`,default:5e3,description:`Handshake timeout in milliseconds`},servername:{type:`string`,description:`Optional SNI and hostname validation override`},alpnProtocols:{type:`array`,items:{type:`string`},description:`Optional ALPN protocols to offer`},minVersion:{type:`string`,enum:[...r],description:`Optional minimum TLS version`},maxVersion:{type:`string`,enum:[...r],description:`Optional maximum TLS version`},caPem:{type:`string`,description:`Optional PEM-encoded CA bundle`},caPath:{type:`string`,description:`Optional path to a PEM-encoded CA bundle`},allowInvalidCertificates:{type:`boolean`,default:!1,description:`Allow untrusted certificate chains`},skipHostnameCheck:{type:`boolean`,default:!1,description:`Skip hostname verification`}}),i(`websocket_send_frame`,`Send a WebSocket frame.`,{sessionId:{type:`string`,description:`WebSocket session ID`},frameType:{type:`string`,enum:[`text`,`binary`,`ping`,`pong`,`close`],description:`Outgoing frame opcode`},dataText:{type:`string`,description:`UTF-8 payload for text/ping/pong/close frames`},dataHex:{type:`string`,description:`Hex-encoded payload for binary/ping/pong/close frames`},closeCode:{type:`number`,description:`Optional close status code`},closeReason:{type:`string`,description:`Optional close reason`},timeoutMs:{type:`number`,default:5e3,description:`Write timeout in milliseconds`}},[`sessionId`,`frameType`]),i(`websocket_read_frame`,`Read the next queued WebSocket frame from an open session.`,{sessionId:{type:`string`,description:`WebSocket session ID`},timeoutMs:{type:`number`,default:5e3,description:`Read timeout in milliseconds`}},[`sessionId`]),i(`websocket_close`,`Close an open WebSocket session.`,{sessionId:{type:`string`,description:`WebSocket session ID`},force:{type:`boolean`,default:!1,description:`Destroy the underlying socket immediately without sending a close frame first`},closeCode:{type:`number`,description:`Optional close status code`},closeReason:{type:`string`,description:`Optional close reason`},timeoutMs:{type:`number`,default:1e3,description:`Close wait timeout in milliseconds before forcing socket destruction`}},[`sessionId`])],u=[...c,...s,...l,...a,...o],d=`boringssl-inspector`,f=`boringsslInspectorHandlers`,p=[`workflow`,`full`],m=n({domain:d,depKey:f,lookup:t(u),wrapResult:e,entries:[{tool:`tls_keylog_enable`,method:`handleTlsKeylogEnable`},{tool:`tls_keylog_parse`,method:`handleTlsKeylogParse`},{tool:`tls_keylog_disable`,method:`handleTlsKeylogDisable`},{tool:`tls_decrypt_payload`,method:`handleTlsDecryptPayload`},{tool:`tls_keylog_summarize`,method:`handleTlsKeylogSummarize`},{tool:`tls_keylog_lookup_secret`,method:`handleTlsKeylogLookupSecret`},{tool:`tls_cert_pin_bypass`,method:`handleTlsCertPinBypass`},{tool:`tls_parse_handshake`,method:`handleParseHandshake`},{tool:`tls_cipher_suites`,method:`handleCipherSuites`},{tool:`tls_parse_certificate`,method:`handleParseCertificate`},{tool:`tls_probe_endpoint`,method:`handleTlsProbeEndpoint`},{tool:`tcp_open`,method:`handleTcpOpen`},{tool:`tcp_write`,method:`handleTcpWrite`},{tool:`tcp_read_until`,method:`handleTcpReadUntil`},{tool:`tcp_close`,method:`handleTcpClose`},{tool:`tls_open`,method:`handleTlsOpen`},{tool:`tls_write`,method:`handleTlsWrite`},{tool:`tls_read_until`,method:`handleTlsReadUntil`},{tool:`tls_close`,method:`handleTlsClose`},{tool:`websocket_open`,method:`handleWebSocketOpen`},{tool:`websocket_send_frame`,method:`handleWebSocketSendFrame`},{tool:`websocket_read_frame`,method:`handleWebSocketReadFrame`},{tool:`websocket_close`,method:`handleWebSocketClose`},{tool:`tls_cert_pin_bypass_frida`,method:`handleBypassCertPinning`},{tool:`net_raw_tcp_send`,method:`handleRawTcpSend`},{tool:`net_raw_tcp_listen`,method:`handleRawTcpListen`},{tool:`net_raw_udp_send`,method:`handleRawUdpSend`},{tool:`net_raw_udp_listen`,method:`handleRawUdpListen`}]});async function h(e){let{BoringsslInspectorHandlers:t}=await import(`./handlers-5nzR8B0a.mjs`),{TLSKeyLogExtractor:n}=await import(`./boringssl-inspector-ZOCkaipa.mjs`).then(e=>e.t),r=e.getDomainInstance(f);if(r)return r;let i=new t(new n);return i.setExtensionInvoke(async t=>{try{let n=e.getDomainInstance(`binaryInstrumentHandlers`);if(n&&typeof n.handleFridaRunScript==`function`)return n.handleFridaRunScript(t)}catch{}return null}),i.setEventBus(e.eventBus),e.setDomainInstance(f,i),i}const g={kind:`domain-manifest`,version:1,domain:d,depKey:f,profiles:p,registrations:m,ensure:h,workflowRule:{patterns:[/\b(tls|ssl|boringssl|cert(ificate)?|pinning|handshake|keylog|websocket)\b/i,/(tls|ssl|cert|pinning|websocket).*(hook|bypass|intercept|dump|log|frame|session)/i],priority:80,tools:[`tls_probe_endpoint`,`websocket_open`,`websocket_send_frame`,`websocket_read_frame`,`tls_keylog_enable`,`tls_keylog_parse`,`tls_decrypt_payload`,`tls_cert_pin_bypass`],hint:`TLS/WebSocket analysis: probe endpoint → open ws/wss session → exchange frames → inspecttrust/cipher/ALPN → enable keylog or bypass pinning when needed.`},prerequisites:{tls_probe_endpoint:[{condition:`Target scope must be explicitly authorized and routable from the MCP host`,fix:`Verify target authorization, port reachability, and provide servername/custom CA options when needed`}],tls_keylog_enable:[{condition:`Target process must allow SSLKEYLOGFILE or be attachable by Frida`,fix:`Launch the target with SSLKEYLOGFILE env set, or enable Frida-based hooking`}],tls_decrypt_payload:[{condition:`A keylog session must be active with captured secrets`,fix:`Run tls_keylog_enable and reproduce TLS traffic before decrypting`}],tls_cert_pin_bypass_frida:[{condition:`Frida must be available on PATH and attached to the target`,fix:`Install Frida and attach via binary-instrument:frida_attach before running the bypass`}]},toolDependencies:[{from:`network`,to:`boringssl-inspector`,relation:`uses`,weight:.8}]};export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./registry-
|
|
1
|
+
import{t as e}from"./registry-xB8Wgmyj.mjs";import{n as t}from"./bind-helpers-D0mGAOof.mjs";import{t as n}from"./tool-builder-CpLh-UQd.mjs";const r=[n(`extension_list_installed`,e=>e.desc(`List installed extensions from the local registry.`).query()),n(`extension_execute_in_context`,e=>e.desc(`Load an extension and execute a named exported context function.`).string(`pluginId`,`Plugin identifier`).string(`contextName`,`Exported function or context name`).prop(`args`,{type:`object`,description:`Arguments passed to the target context`,additionalProperties:!0}).requiredOpenWorld(`pluginId`,`contextName`)),n(`extension_reload`,e=>e.desc(`Reload an installed extension by unloading and loading it again.`).string(`pluginId`,`Plugin identifier`).requiredOpenWorld(`pluginId`)),n(`extension_uninstall`,e=>e.desc(`Uninstall an extension from the local registry.`).string(`pluginId`,`Plugin identifier`).required(`pluginId`).destructive()),n(`webhook`,e=>e.desc(`Manage webhook endpoints for external callbacks. Actions: create, list, delete, commands.`).enum(`action`,[`create`,`list`,`delete`,`commands`],`Webhook operation`).string(`name`,`Human-readable webhook name (action=create)`).string(`path`,`URL path for the webhook endpoint (action=create)`).string(`secret`,`Optional HMAC secret for webhook authentication (action=create)`).string(`url`,`Optional external callback URL for webhook forwarding (action=create)`).array(`events`,{type:`string`},`List of events to subscribe to (action=create)`).string(`endpointId`,`Webhook endpoint identifier (action=delete, commands)`).string(`status`,`Filter commands by status: pending, processing, completed, failed (action=commands)`).prop(`command`,{type:`object`,description:`Command to enqueue (action=commands, if provided adds to queue instead of listing)`,additionalProperties:!0}).required(`action`))],i=`extension-registry`,a=`extensionRegistryHandlers`,o=t({domain:i,depKey:a,lookup:e(r),entries:[{tool:`extension_list_installed`,method:`handleListInstalled`},{tool:`extension_execute_in_context`,method:`handleExecuteInContext`},{tool:`extension_reload`,method:`handleReload`},{tool:`extension_uninstall`,method:`handleUninstall`},{tool:`webhook`,method:`handleWebhookDispatch`}]});async function s(e){let{ExtensionRegistryHandlers:t}=await import(`./handlers-BZ8n6Hvf.mjs`),n=e.getDomainInstance(a);if(n)return n;let r=new t;return e.setDomainInstance(a,r),r.startWebhookServer().catch(()=>void 0),r}const c={kind:`domain-manifest`,version:1,domain:i,depKey:a,profiles:[`full`],ensure:s,registrations:o,workflowRule:{patterns:[/\b(extension|plugin|addon|webhook|c2|bluetooth|ble|hid|serial|esp32|registry)\b/i,/(install|uninstall|reload).*(extension|plugin)/i],priority:70,tools:[`install_extension`,`extension_list_installed`,`webhook`],hint:`Plugin + webhook C2 + BLE HID + serial flashing pipeline.`},prerequisites:{webhook:[{condition:`Webhook listen port must be free`,fix:"Pick an unused port via the `port` argument or stop the conflicting service"}]},toolDependencies:[{from:`webhook`,to:`extension_list_installed`,relation:`suggests`,weight:.5}]};export{c as default};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import{o as e,r as t,t as n}from"./parse-args-ngRrvF9e.mjs";import{t as r}from"./bind-helpers-D0mGAOof.mjs";import{t as i}from"./tool-builder-CpLh-UQd.mjs";import{spawn as a}from"node:child_process";function o(e){return typeof e==`object`&&!!e}function s(e){return o(e)&&typeof e.createCDPSession==`function`}function c(e,t){let n=e[t];return typeof n==`string`?n:null}function l(e){if(typeof e==`boolean`)return e;if(o(e)){let t=e.value;return typeof t==`boolean`?t:!1}return!1}var u=class{getPage;constructor(e){this.getPage=e}async detectV8Version(){return await this.detectBrowserVersion()||(typeof process.versions.v8==`string`&&process.versions.v8.length>0?this.parseV8Version(process.versions.v8):null)}parseV8Version(e){let t=/(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?:\.(?<commit>[A-Za-z0-9._-]+))?/u.exec(e.trim());if(!t?.groups)return{major:0,minor:0,patch:0,commit:``};let n=Number(t.groups.major??0),r=Number(t.groups.minor??0),i=Number(t.groups.patch??0);return{major:Number.isFinite(n)?n:0,minor:Number.isFinite(r)?r:0,patch:Number.isFinite(i)?i:0,commit:t.groups.commit??``}}async supportsNativesSyntax(){if(process.execArgv.includes(`--allow-natives-syntax`))return!0;let e=await this.createSession();if(!e)return!1;try{let t=await e.send(`Runtime.evaluate`,{expression:`
|
|
2
|
+
(() => {
|
|
3
|
+
try {
|
|
4
|
+
return Boolean(new Function("return %HaveSameMap({}, {})")());
|
|
5
|
+
} catch (error) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
})()
|
|
9
|
+
`,returnByValue:!0,awaitPromise:!1});return o(t)?l(t.result):!1}catch{return!1}finally{await e.detach().catch(()=>void 0)}}async detectBrowserVersion(){let e=await this.createSession();if(!e)return null;try{let t=await e.send(`Browser.getVersion`);if(!o(t))return null;let n=c(t,`jsVersion`);if(n)return this.parseV8Version(n);let r=c(t,`product`);return r?this.parseV8Version(r):null}catch{return null}finally{await e.detach().catch(()=>void 0)}}async createSession(){if(!this.getPage)return null;try{let e=await this.getPage();return s(e)?await e.createCDPSession():null}catch{return null}}};function d(e){return typeof e==`object`&&!!e}function f(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function p(e){return d(e)?`value`in e?p(e.value):`result`in e?p(e.result):e:e}function m(e){let t=p(e),n=typeof t==`string`?(()=>{try{return JSON.parse(t)}catch{return null}})():t;if(!d(n))return null;let r=f(n.jsHeapSizeUsed)??f(n.usedSize),i=f(n.jsHeapSizeTotal)??f(n.totalSize),a=f(n.jsHeapSizeLimit)??0;if(r===null&&i===null&&a===0)return null;let o={};return r!==null&&(o.jsHeapSizeUsed=r),i!==null&&(o.jsHeapSizeTotal=i),a>0&&(o.jsHeapSizeLimit=a),o}function ee(e){return e.jsHeapSizeUsed>0||e.jsHeapSizeTotal>0||e.jsHeapSizeLimit>0}function h(e,t){if(!e&&!t)return null;let n={jsHeapSizeUsed:t?.jsHeapSizeUsed??e?.jsHeapSizeUsed??0,jsHeapSizeTotal:t?.jsHeapSizeTotal??e?.jsHeapSizeTotal??0,jsHeapSizeLimit:t?.jsHeapSizeLimit??e?.jsHeapSizeLimit??0};return ee(n)?n:null}function g(e){let t=p(e);if(!d(t)||!Array.isArray(t.metrics))return null;let n=new Map;for(let e of t.metrics){if(!d(e))continue;let t=typeof e.name==`string`?e.name:null,r=f(e.value);!t||r===null||n.set(t,r)}let r=n.get(`JSHeapUsedSize`)??0,i=n.get(`JSHeapTotalSize`)??0;return r===0&&i===0?null:{jsHeapSizeUsed:r,jsHeapSizeTotal:i}}function _(e){return d(e)&&typeof e.createCDPSession==`function`}function v(e){return d(e)&&typeof e.send==`function`&&typeof e.detach==`function`}var y=class{getPage;session=null;constructor(e){this.getPage=e}async enableHeapProfiler(){let e=await this.createSession();if(!e)throw Error(`V8InspectorClient: cannot create CDP session`);await e.send(`HeapProfiler.enable`),this.session=e}async takeHeapSnapshot(e){this.session||await this.enableHeapProfiler();let t=this.session;if(!t)throw Error(`V8InspectorClient: session not available for heap snapshot`);return new Promise((n,r)=>{let i=[],a=0,o=t=>{let n=t?.chunk;typeof n==`string`&&(i.push(n),a+=Buffer.byteLength(n,`utf8`),e?.(n))};t.on(`HeapProfiler.addHeapSnapshotChunk`,o),t.send(`HeapProfiler.takeHeapSnapshot`,{reportProgress:!1}).then(()=>{t.off(`HeapProfiler.addHeapSnapshotChunk`,o),n(a)}).catch(e=>{t.off(`HeapProfiler.addHeapSnapshotChunk`,o),r(e)})})}async getObjectByObjectId(e){let t=await this.createSession();if(!t)return null;try{let n=await t.send(`Runtime.getProperties`,{objectId:e,ownProperties:!0,accessorPropertiesOnly:!1,generatePreview:!0});if(Array.isArray(n.result))return{kind:`runtime-object`,properties:n.result,internalProperties:Array.isArray(n.internalProperties)?n.internalProperties:[],privateProperties:Array.isArray(n.privateProperties)?n.privateProperties:[],...n.exceptionDetails?{exceptionDetails:n.exceptionDetails}:{}}}catch{}try{return await t.send(`HeapProfiler.getObjectByHeapObjectId`,{objectId:e})}catch{return null}}async getHeapUsage(){this.session||await this.enableHeapProfiler();let e=this.session;if(!e)throw Error(`V8InspectorClient: session not available for heap usage`);let t=null;try{let n=await e.send(`Runtime.getHeapUsage`);t=h(t,m(n))}catch{}try{let n=await e.send(`HeapProfiler.getHeapUsage`);t=h(t,m(n))}catch{}try{let n=await e.send(`Performance.getMetrics`);t=h(t,g(n))}catch{}try{let n=await e.send(`Runtime.evaluate`,{expression:`
|
|
10
|
+
(() => {
|
|
11
|
+
const m = performance.memory;
|
|
12
|
+
return m
|
|
13
|
+
? {
|
|
14
|
+
jsHeapSizeUsed: m.usedJSHeapSize,
|
|
15
|
+
jsHeapSizeTotal: m.totalJSHeapSize,
|
|
16
|
+
jsHeapSizeLimit: m.jsHeapSizeLimit
|
|
17
|
+
}
|
|
18
|
+
: null;
|
|
19
|
+
})()
|
|
20
|
+
`,returnByValue:!0});t=h(t,m(n))}catch{}if(!t)throw Error(`V8InspectorClient: heap usage metrics unavailable`);return t}async dispose(){this.session&&=(await this.session.detach().catch(()=>void 0),null)}async createSession(){if(this.session)return this.session;if(!this.getPage)return null;try{let e=await this.getPage();if(!_(e))return null;let t=await e.createCDPSession();return v(t)?(this.session=t,t):null}catch{return null}}};const te=[i(`v8_heap_snapshot_capture`,e=>e.desc(`Capture a V8 heap snapshot for offline analysis.`).query()),i(`v8_heap_snapshot_analyze`,e=>e.desc(`Analyze a heap snapshot: retained size, constructor distribution, dominators.`).string(`snapshotId`,`Snapshot ID`).required(`snapshotId`).query()),i(`v8_heap_diff`,e=>e.desc(`Compare two heap snapshots to find allocation changes.`).string(`beforeSnapshotId`,`Baseline snapshot ID`).string(`afterSnapshotId`,`Updated snapshot ID`).required(`beforeSnapshotId`,`afterSnapshotId`).query()),i(`v8_object_inspect`,e=>e.desc(`Inspect a live JS object by objectId with property enumeration.`).string(`address`,`Runtime objectId or compatible heap object id`).required(`address`).query()),i(`v8_heap_stats`,e=>e.desc(`Report V8 heap statistics: used, total, external.`).query()),i(`v8_bytecode_extract`,e=>e.desc(`Extract V8 bytecode for a script by scriptId, with source fallback.`).string(`scriptId`,`CDP scriptId`).number(`functionOffset`,`Optional function byte offset`).boolean(`includeSourceFallback`,`Include source-derived fallback output`).required(`scriptId`).query()),i(`v8_version_detect`,e=>e.desc(`Detect V8 engine version, flags, and runtime capabilities.`).query()),i(`v8_jit_inspect`,e=>e.desc(`Report JIT compilation status and optimization tier for a script.`).string(`scriptId`,`CDP scriptId`).required(`scriptId`).query())],b=new Map;function x(){return b}function S(e){return b.set(e.id,e),e}function C(e){return b.get(e)}function w(e){return typeof e==`object`&&!!e}function T(e){return w(e)&&typeof e.createCDPSession==`function`}function E(e){return w(e)?`value`in e?E(e.value):`result`in e?E(e.result):e:e}async function ne(e,t){let n=`snapshot_${Date.now().toString(36)}`,r=new Date().toISOString(),i=[];if(t.client)try{let e=S({id:n,chunks:i,capturedAt:r,sizeBytes:await t.client.takeHeapSnapshot(e=>{i.push(e)})});return t.setSnapshot(n),{success:!0,snapshotId:e.id,capturedAt:e.capturedAt,sizeBytes:e.sizeBytes,chunks:[],simulated:!1}}catch{}try{let e=await t.getPage();if(T(e)){let i=await e.createCDPSession(),a=(e,t)=>i.send(e,t),o=()=>i.detach();await a(`HeapProfiler.enable`);let s=await a(`Runtime.evaluate`,{expression:`
|
|
21
|
+
(() => {
|
|
22
|
+
const m = performance.memory;
|
|
23
|
+
return m
|
|
24
|
+
? {
|
|
25
|
+
jsHeapSizeUsed: m.usedJSHeapSize,
|
|
26
|
+
jsHeapSizeTotal: m.totalJSHeapSize,
|
|
27
|
+
jsHeapSizeLimit: m.jsHeapSizeLimit
|
|
28
|
+
}
|
|
29
|
+
: null;
|
|
30
|
+
})()
|
|
31
|
+
`,returnByValue:!0});await o().catch(()=>void 0);let c=E(s),l=typeof c==`string`?(()=>{try{return JSON.parse(c)}catch{return null}})():c,u=0;w(l)&&typeof l.jsHeapSizeUsed==`number`&&(u=l.jsHeapSizeUsed);let d=S({id:n,chunks:[`{"simulated":true,"sizeBytes":${u}}`],capturedAt:r,sizeBytes:u});return t.setSnapshot(n),{success:!0,snapshotId:d.id,capturedAt:d.capturedAt,sizeBytes:d.sizeBytes,chunks:[],simulated:!0}}}catch{}let a=S({id:n,chunks:[`{}`],capturedAt:r,sizeBytes:0});return t.setSnapshot(n),{success:!0,snapshotId:a.id,capturedAt:a.capturedAt,sizeBytes:a.sizeBytes,chunks:[],simulated:!0}}const D=`__JSHOOK_BYTECODE_STATUS__:`,O=`__jshookBytecodeTarget__`;function re(e){return/^[A-Za-z_$][\w$]*$/u.test(e)}function ie(e){let t=e.trim();return t.length===0||t===`anonymous`?O:re(t)?t:O}function k(e){let t=e.trim();return t.startsWith(`function`)||t.startsWith(`async function`)||t.startsWith(`class `)||t.startsWith(`(`)||t.includes(`=>`)?!1:/^(?:async\s+)?(?:get\s+|set\s+)?\*?\s*[A-Za-z_$][\w$]*\s*\(/u.test(t)}function A(e){let t=e.sourceSlice.trim(),n=e.functionName.trim();return`
|
|
32
|
+
let ${O};
|
|
33
|
+
${k(t)?`
|
|
34
|
+
try {
|
|
35
|
+
const __jshookHolder = { ${t} };
|
|
36
|
+
const __jshookCandidate = __jshookHolder[${JSON.stringify(n)}];
|
|
37
|
+
if (typeof __jshookCandidate === 'function') {
|
|
38
|
+
${O} = __jshookCandidate;
|
|
39
|
+
}
|
|
40
|
+
} catch {}
|
|
41
|
+
`:`
|
|
42
|
+
try {
|
|
43
|
+
${O} = (${t});
|
|
44
|
+
} catch {}
|
|
45
|
+
`}
|
|
46
|
+
|
|
47
|
+
if (typeof ${O} !== 'function') {
|
|
48
|
+
console.log(${JSON.stringify(`${D}resolve-failed`)});
|
|
49
|
+
} else {
|
|
50
|
+
try {
|
|
51
|
+
const __jshookArity =
|
|
52
|
+
typeof ${O}.length === 'number' && ${O}.length > 0
|
|
53
|
+
? ${O}.length
|
|
54
|
+
: 0;
|
|
55
|
+
Reflect.apply(${O}, globalThis, Array.from({ length: __jshookArity }, () => undefined));
|
|
56
|
+
} catch (error) {
|
|
57
|
+
console.log(${JSON.stringify(`${D}invoke-error:`)} + String(error));
|
|
58
|
+
}
|
|
59
|
+
console.log(${JSON.stringify(`${D}done`)});
|
|
60
|
+
}
|
|
61
|
+
`}function j(e,t){let n=e.split(/\r?\n/u),r=new Set(t.filter(e=>e.length>0)),i=null,a=!1,o=[];for(let e of n){let t=/^\[generated bytecode for function: (.+?) \(/u.exec(e);if(t?.[1]){if(a&&o.length>0)break;i=r.has(t[1])?t[1]:null,a=i!==null,a&&(o.length=0,o.push(e));continue}if(a){if(e.startsWith(D))break;o.push(e)}}return o.length===0?{bytecode:null,matchedFunctionName:null}:{bytecode:o.join(`
|
|
62
|
+
`).trim(),matchedFunctionName:i}}function M(e){let t=e.split(/\r?\n/u).find(e=>e.startsWith(D)&&e.length>27);return t?t.slice(27):null}function N(e,t,n){let r=M(e);if(r===`resolve-failed`)return`Unable to reconstruct an executable function from the captured source slice`;if(typeof r==`string`&&r.startsWith(`invoke-error:`))return`Function compiled but raised during isolated invocation: ${r.slice(13)}`;let i=t.trim();return i.length>0?i:n}async function P(e,t,n){return await new Promise(r=>{let i=a(process.execPath,[`--print-bytecode`,`--print-bytecode-filter=${t}`,`-`],{stdio:[`pipe`,`pipe`,`pipe`]}),o=``,s=``,c=!1,l=e=>{c||(c=!0,clearTimeout(u),r({stdout:o,stderr:s,error:e}))},u=setTimeout(()=>{i.kill(),l(`Timed out after ${n}ms while waiting for isolated bytecode output`)},n);i.stdout.setEncoding(`utf8`),i.stderr.setEncoding(`utf8`),i.stdout.on(`data`,e=>{o+=e}),i.stderr.on(`data`,e=>{s+=e}),i.on(`error`,e=>{l(e instanceof Error?e.message:String(e))}),i.on(`close`,e=>{l(e===0?null:`Bytecode printer exited with code ${e}`)}),i.stdin.end(e)})}async function F(e,t=15e3){let n=ie(e.functionName),r=Array.from(new Set([n,O])),i=A(e);for(let e of r){let{stdout:a,stderr:o,error:s}=await P(i,e,t),c=j(a,r);if(c.bytecode){let e=c.matchedFunctionName===O?n:c.matchedFunctionName;return{available:!0,bytecode:c.bytecode,format:`ignition-bytecode`,functionName:e??n,reason:`Ignition bytecode emitted by an isolated V8 process via --print-bytecode from the extracted source slice`,rawIgnitionBytecodeAvailable:!0}}if(s&&e===r.at(-1))return{available:!1,bytecode:null,format:null,functionName:n,reason:N(a,o,s),rawIgnitionBytecodeAvailable:!1}}return{available:!1,bytecode:null,format:null,functionName:n,reason:`Isolated V8 bytecode printer did not emit a matching function block`,rawIgnitionBytecodeAvailable:!1}}function I(e){return typeof e==`object`&&!!e}function L(e){return I(e)&&typeof e.createCDPSession==`function`}function R(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function z(e){return typeof e==`string`?e:null}function B(e){return Array.isArray(e)?e.filter(I):[]}function V(e){return e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0)}function H(e){let t=e.trim();if(t.startsWith(`function `))return{opcode:`FunctionDeclaration`,operands:[]};if(t.startsWith(`return `))return{opcode:`Return`,operands:[t.slice(7)]};if(t.includes(`=>`))return{opcode:`CreateClosure`,operands:[]};if(t.includes(`(`)&&t.includes(`)`)){let e=/^([A-Za-z_$][\w$]*)\(/u.exec(t);if(e?.[1])return{opcode:`Call`,operands:[e[1]]}}if(t.includes(`=`)){let e=t.split(`=`,2),n=e[0],r=e[1];if(n&&r)return{opcode:`Store`,operands:[n.trim(),r.trim()]}}return t.startsWith(`if `)?{opcode:`JumpIfTrue`,operands:[t]}:t.startsWith(`for `)||t.startsWith(`while `)?{opcode:`Loop`,operands:[t]}:t.startsWith(`{`)||t.startsWith(`const `)||t.startsWith(`let `)?{opcode:`LoadLiteral`,operands:[t]}:{opcode:`Evaluate`,operands:[t]}}function U(e){let t=[`; pseudo-bytecode synthesized from script source`],n=0;for(let r of e.split(/\r?\n/u)){let e=r.trim();if(e.length===0)continue;let{opcode:i,operands:a}=H(e),o=a.join(`, `);t.push(`${n} ${i}${o.length>0?` ${o}`:``}`),n+=1}return t.join(`
|
|
63
|
+
`)}function W(e,t){if(typeof t==`number`&&t>=0&&t<e.length){let n=Math.max(0,t-120),r=Math.min(e.length,t+120),i=e.slice(n,r),a=/function\s+([A-Za-z_$][\w$]*)/u.exec(i);if(a?.[1])return a[1];let o=/([A-Za-z_$][\w$]*)\s*=\s*(?:async\s*)?\(/u.exec(i);if(o?.[1])return o[1]}return/function\s+([A-Za-z_$][\w$]*)/u.exec(e)?.[1]??`anonymous`}function ae(e){let t=e.matchAll(/\{([^{}]+:[^{}]+)\}/gu),n=[],r=0;for(let e of t){let t=e[1];if(!t)continue;let i=t.split(`,`).map(e=>e.trim()).map(e=>{let[t]=e.split(`:`,1);return t?.trim()??``}).filter(e=>e.length>0).filter((e,t,n)=>n.indexOf(e)===t);i.length!==0&&(n.push({address:`hidden-class-${r}`,properties:i,transitionMap:i.length>1?i.join(` -> `):void 0}),r+=1)}return n}function G(e){let t=e.result;return I(t)&&t.value!==void 0?t.value:t}function K(e){let t=z(e.reason);if(t)return t;let n=z(e.disassemblyError);if(n)return n;let r=z(e.disassemblyType);return r?`Native disassembly returned ${r} instead of text`:`Runtime disassembly output is not exposed through the current browser/CDP path`}var q=class{getPage;versionDetector;constructor(e){this.getPage=e,this.versionDetector=new u(e)}async extractBytecode(e,t){let n=await this.resolveScriptFunctionContext(e,t);return n?{functionName:n.functionName,bytecode:U(n.sourceSlice),sourcePosition:n.sourcePosition}:null}async attemptNativeBytecodeExtraction(e,t){let n=await this.resolveScriptFunctionContext(e,t);if(!n)return null;if(!await this.versionDetector.supportsNativesSyntax())return{available:!1,bytecode:null,format:null,functionName:n.functionName,rawIgnitionBytecodeAvailable:!1,reason:`V8 natives syntax is unavailable in the current browser target`,sourcePosition:n.sourcePosition,supportsNativesSyntax:!1};let r=await this.createSession();if(!r)return{available:!1,bytecode:null,format:null,functionName:n.functionName,rawIgnitionBytecodeAvailable:!1,reason:`Browser/page CDP session is unavailable for native bytecode inspection`,sourcePosition:n.sourcePosition,supportsNativesSyntax:!0};try{let e=await r.send(`Runtime.evaluate`,{expression:this.buildNativeExtractionExpression(n.functionName),returnByValue:!0,awaitPromise:!1});if(!I(e))return{available:!1,bytecode:null,format:null,functionName:n.functionName,rawIgnitionBytecodeAvailable:!1,reason:`Runtime.evaluate did not return structured data`,sourcePosition:n.sourcePosition,supportsNativesSyntax:!0};if(e.exceptionDetails)return{available:!1,bytecode:null,format:null,functionName:n.functionName,rawIgnitionBytecodeAvailable:!1,reason:`Runtime.evaluate raised an exception while probing native bytecode`,sourcePosition:n.sourcePosition,supportsNativesSyntax:!0};let t=G(e),i=I(t)?t:{},a=z(i.disassembly),o=R(i.nativeSourcePosition);if(a&&a.length>0)return{available:!0,bytecode:a,format:`v8-disassembly`,functionName:n.functionName,rawIgnitionBytecodeAvailable:!1,reason:`Native V8 disassembly text returned via %DisassembleFunction`,sourcePosition:o??n.sourcePosition,supportsNativesSyntax:!0};let s=await F(n);return s.available&&s.bytecode?{available:!0,bytecode:s.bytecode,format:s.format,functionName:s.functionName,rawIgnitionBytecodeAvailable:s.rawIgnitionBytecodeAvailable,reason:s.reason,sourcePosition:o??n.sourcePosition,supportsNativesSyntax:!0}:{available:!1,bytecode:null,format:null,functionName:n.functionName,rawIgnitionBytecodeAvailable:!1,reason:`${K(i)}; isolated printer: ${s.reason}`,sourcePosition:o??n.sourcePosition,supportsNativesSyntax:!0}}catch(e){return{available:!1,bytecode:null,format:null,functionName:n.functionName,rawIgnitionBytecodeAvailable:!1,reason:e instanceof Error?e.message:String(e),sourcePosition:n.sourcePosition,supportsNativesSyntax:!0}}finally{await r.detach().catch(()=>void 0)}}disassembleBytecode(e){let t=[];for(let n of e.split(/\r?\n/u)){let e=n.trim();if(e.length===0||e.startsWith(`;`))continue;let r=/^\d+\s+\w+>\s+[0-9A-Fa-f]+\s+@\s*(\d+)\s*:\s*(?:[0-9A-Fa-f]{2}(?:\s+[0-9A-Fa-f]{2})*\s+)?([A-Za-z_][\w.]*)\s*(.*)$/u.exec(e)??/^(\d+)\s*@\s*([A-Za-z_][\w.]*)\s*(.*)$/u.exec(e)??/^(?:0x[0-9a-fA-F]+\s+@)?\s*(\d+)\s*[: ]\s*([A-Za-z_][\w.]*)\s*(.*)$/u.exec(e)??/^(\d+)\s+([A-Za-z_][\w.]*)\s*(.*)$/u.exec(e);if(!r)continue;let i=Number(r[1]);Number.isFinite(i)&&t.push({offset:i,opcode:r[2]??`Unknown`,operands:V(r[3]??``)})}return t}async findHiddenClasses(e){let t=await this.getScriptSource(e);return t?ae(t):[]}buildNativeExtractionExpression(e){return`
|
|
64
|
+
(() => {
|
|
65
|
+
const functionName = ${JSON.stringify(e)};
|
|
66
|
+
try {
|
|
67
|
+
const candidate = globalThis[functionName];
|
|
68
|
+
if (typeof candidate !== 'function') {
|
|
69
|
+
return {
|
|
70
|
+
functionName,
|
|
71
|
+
reason: 'Resolved function is not reachable via globalThis in the current target',
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const nativeSourcePosition = (() => {
|
|
76
|
+
try {
|
|
77
|
+
return %FunctionGetScriptSourcePosition(candidate);
|
|
78
|
+
} catch (error) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
})();
|
|
82
|
+
|
|
83
|
+
try {
|
|
84
|
+
const disassembly = %DisassembleFunction(candidate);
|
|
85
|
+
return {
|
|
86
|
+
functionName,
|
|
87
|
+
disassembly: typeof disassembly === 'string' ? disassembly : null,
|
|
88
|
+
disassemblyType: typeof disassembly,
|
|
89
|
+
nativeSourcePosition:
|
|
90
|
+
typeof nativeSourcePosition === 'number' ? nativeSourcePosition : null,
|
|
91
|
+
};
|
|
92
|
+
} catch (error) {
|
|
93
|
+
return {
|
|
94
|
+
functionName,
|
|
95
|
+
disassemblyError: String(error),
|
|
96
|
+
nativeSourcePosition:
|
|
97
|
+
typeof nativeSourcePosition === 'number' ? nativeSourcePosition : null,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
} catch (error) {
|
|
101
|
+
return {
|
|
102
|
+
functionName,
|
|
103
|
+
reason: String(error),
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
})()
|
|
107
|
+
`}async resolveScriptFunctionContext(e,t){let n=await this.getScriptSource(e);if(!n)return null;let r=await this.getCoverageFunctions(e),i=(typeof t==`number`?r.find(e=>t>=e.startOffset&&t<=e.endOffset):void 0)??r.find(e=>e.functionName.length>0&&e.functionName!==`anonymous`)??r[0],a=i?.functionName&&i.functionName.length>0&&i.functionName!==`anonymous`?i.functionName:W(n,t),o=i&&i.endOffset>i.startOffset?n.slice(i.startOffset,i.endOffset):n;return{functionName:a,sourcePosition:typeof t==`number`?t:i?i.startOffset:void 0,sourceSlice:o}}async getCoverageFunctions(e){let t=await this.createSession();if(!t)return[];try{await t.send(`Profiler.enable`),await t.send(`Profiler.startPreciseCoverage`,{callCount:!0,detailed:!0});let n=await t.send(`Profiler.takePreciseCoverage`),r=(I(n)?B(n.result):[]).find(t=>typeof t.scriptId==`string`&&t.scriptId===e);if(!r)return[];let i=B(r.functions),a=[];for(let e of i){let t=B(e.ranges)[0];if(!t)continue;let n=R(t.startOffset),r=R(t.endOffset);n===null||r===null||a.push({functionName:z(e.functionName)??`anonymous`,startOffset:n,endOffset:r})}return a}catch{return[]}finally{await t.send(`Profiler.stopPreciseCoverage`).catch(()=>void 0),await t.send(`Profiler.disable`).catch(()=>void 0),await t.detach().catch(()=>void 0)}}async getScriptSource(e){let t=await this.createSession();if(!t)return null;try{await t.send(`Debugger.enable`);let n=await t.send(`Debugger.getScriptSource`,{scriptId:e});if(!I(n))return null;let r=n.scriptSource;return typeof r==`string`?r:null}catch{return null}finally{await t.send(`Debugger.disable`).catch(()=>void 0),await t.detach().catch(()=>void 0)}}async createSession(){if(!this.getPage)return null;try{let e=await this.getPage();return L(e)?await e.createCDPSession():null}catch{return null}}};function J(e){return typeof e==`object`&&!!e}function oe(e){return J(e)&&typeof e.createCDPSession==`function`}function se(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(J(e)&&typeof e.value==`number`){let t=e.value;return typeof t==`number`&&Number.isFinite(t)?t:null}return null}function ce(e){return e===null?{optimized:!1,tier:`unknown`}:e&128?{optimized:!0,tier:`maglev`}:e&64?{optimized:!0,tier:`turbofan`}:e&16||e&32?{optimized:!0,tier:`optimized`}:{optimized:!1,tier:`interpreted`}}var le=class{getPage;bytecodeExtractor;versionDetector;optimizedFunctionsCache=[];constructor(e){this.getPage=e,this.bytecodeExtractor=new q(e),this.versionDetector=new u(e)}async inspectJIT(e){let t=await this.bytecodeExtractor.findHiddenClasses(e),n=await this.bytecodeExtractor.extractBytecode(e),r=new Set;n&&r.add(n.functionName);for(let e of t){let t=e.properties[0];t&&r.add(t)}r.size===0&&r.add(`anonymous`);let i=await this.versionDetector.supportsNativesSyntax(),a=[];for(let e of r){let{optimized:t,tier:n}=ce(i?await this.getOptimizationStatus(e):null);a.push({functionName:e,optimized:t,tier:n})}return this.optimizedFunctionsCache=a,{functions:a,supportsNativesSyntax:i,inspectionMode:i?`native-status`:`heuristic`}}async forceDeoptimization(e){if(!await this.versionDetector.supportsNativesSyntax())return;let t=await this.createSession();if(t)try{await t.send(`Runtime.evaluate`,{expression:`
|
|
108
|
+
(() => {
|
|
109
|
+
try {
|
|
110
|
+
const candidate = eval(${JSON.stringify(e)});
|
|
111
|
+
if (typeof candidate === 'function') {
|
|
112
|
+
%DeoptimizeFunction(candidate);
|
|
113
|
+
}
|
|
114
|
+
} catch (error) {
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
return undefined;
|
|
118
|
+
})()
|
|
119
|
+
`,returnByValue:!0,awaitPromise:!1})}finally{await t.detach().catch(()=>void 0)}}async getOptimizedFunctions(){return[...this.optimizedFunctionsCache]}async getOptimizationStatus(e){let t=await this.createSession();if(!t)return null;try{let n=await t.send(`Runtime.evaluate`,{expression:`
|
|
120
|
+
(() => {
|
|
121
|
+
try {
|
|
122
|
+
const candidate = globalThis[${JSON.stringify(e)}];
|
|
123
|
+
if (typeof candidate !== 'function') {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
return %GetOptimizationStatus(candidate);
|
|
127
|
+
} catch (error) {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
})()
|
|
131
|
+
`,returnByValue:!0,awaitPromise:!1});return J(n)?se(n.result):null}catch{return null}finally{await t.detach().catch(()=>void 0)}}async createSession(){if(!this.getPage)return null;try{let e=await this.getPage();return oe(e)?await e.createCDPSession():null}catch{return null}}};async function ue(r,i){let a=e(r,`scriptId`,``).trim(),o=t(r,`functionOffset`),s=n(r,`includeSourceFallback`,!1);if(a.length===0)return{success:!1,error:`scriptId is required`};let c=new q(i?.getPage),l=await c.attemptNativeBytecodeExtraction(a,o??void 0);if(!l)return{success:!1,error:`Unable to inspect bytecode for scriptId "${a}"`};let u=await c.findHiddenClasses(a);if(l.available&&l.bytecode){let e={functionName:l.functionName,bytecode:l.bytecode,sourcePosition:l.sourcePosition};return{success:!0,scriptId:a,functionOffset:o??null,mode:`native`,bytecodeAvailable:!0,format:l.format,rawIgnitionBytecodeAvailable:l.rawIgnitionBytecodeAvailable,supportsNativesSyntax:l.supportsNativesSyntax,reason:l.reason,extraction:e,disassembly:c.disassembleBytecode(l.bytecode),hiddenClasses:u,sourceFallback:null}}let d=s?await c.extractBytecode(a,o??void 0):null;return{success:!0,scriptId:a,functionOffset:o??null,mode:d?`source-fallback`:`unavailable`,bytecodeAvailable:!1,format:null,rawIgnitionBytecodeAvailable:l.rawIgnitionBytecodeAvailable,supportsNativesSyntax:l.supportsNativesSyntax,reason:l.reason,extraction:null,disassembly:[],hiddenClasses:u,sourceFallback:d?{format:`pseudo-bytecode`,extraction:d,disassembly:c.disassembleBytecode(d.bytecode)}:null}}async function Y(t,n){let r=e(t,`scriptId`,``).trim();if(r.length===0)return{success:!1,error:`scriptId is required`};let i=await new le(n?.getPage).inspectJIT(r);return{success:!0,scriptId:r,inspectionMode:i.inspectionMode,supportsNativesSyntax:i.supportsNativesSyntax,functions:i.functions}}function de(e){return{kind:`runtime-object`,source:`debugger-session`,propertyCount:e.length,properties:e}}function X(e,t){let n=e[t];if(typeof n!=`string`||n.length===0)throw Error(`${t} is required`);return n}function Z(e){let t=e.pageController;if(!t)throw Error(`PageController not available`);return t}function fe(e){return{success:!1,error:`${e}: PageController not available`,capability:`page-controller`,fix:`Call browser_launch or browser_attach first, and select a tab that exposes a stable Page handle.`}}function pe(e){return new y(e.pageController?Q(e):void 0)}function Q(e){let t=Z(e);return async()=>await t.getPage()}var $=class{deps;currentSnapshotId=null;constructor(e){this.deps=e}async handle(e,t){let n={v8_heap_snapshot_capture:e=>this.v8_heap_snapshot_capture(e),v8_heap_snapshot_analyze:e=>this.v8_heap_snapshot_analyze(e),v8_heap_diff:e=>this.v8_heap_diff(e),v8_object_inspect:e=>this.v8_object_inspect(e),v8_heap_stats:e=>this.v8_heap_stats(e),v8_bytecode_extract:e=>this.v8_bytecode_extract(e),v8_version_detect:e=>this.v8_version_detect(e),v8_jit_inspect:e=>this.v8_jit_inspect(e)}[e];if(!n)throw Error(`Unknown v8-inspector tool: ${e}`);return n(t)}async v8_heap_snapshot_capture(e){Z(this.deps.ctx);let t=await ne(e,{getPage:Q(this.deps.ctx),getSnapshot:()=>this.currentSnapshotId,setSnapshot:e=>{this.currentSnapshotId=e},client:this.deps.client});return t.success&&t.snapshotId&&this.deps.ctx.eventBus.emit(`v8:heap_captured`,{snapshotId:t.snapshotId,sizeBytes:t.sizeBytes,timestamp:t.capturedAt}),t}async v8_heap_snapshot_analyze(e){let t=X(e,`snapshotId`),n=C(t);if(!n)throw Error(`Snapshot ${t} not found`);return{success:!0,snapshotId:t,summary:{chunkCount:n.chunks.length,sizeBytes:n.sizeBytes},objectAddress:`0x${n.sizeBytes.toString(16)}`}}async v8_heap_diff(e){let t=typeof e.beforeSnapshotId==`string`?e.beforeSnapshotId:void 0,n=typeof e.afterSnapshotId==`string`?e.afterSnapshotId:void 0;if(!t||!n)throw Error(`Both beforeSnapshotId and afterSnapshotId are required`);let r=C(t);if(!r)throw Error(`Snapshot ${t} not found`);let i=C(n);if(!i)throw Error(`Snapshot ${n} not found`);return{success:!0,beforeSnapshotId:t,afterSnapshotId:n,sizeDeltaBytes:i.sizeBytes-r.sizeBytes}}async v8_object_inspect(e){let t=X(e,`address`),n=await this.inspectObjectViaDebugger(t);if(!n)try{n=await this.deps.client.getObjectByObjectId(t)??void 0}catch{}return{success:!0,address:t,...n?{objectData:n}:{}}}async v8_heap_stats(e){Z(this.deps.ctx);let t;try{t=await this.deps.client.getHeapUsage()}catch{}return{success:!0,snapshotCount:x().size,...t?{heapUsage:t}:{}}}async v8_bytecode_extract(e){return ue(e,{getPage:this.deps.ctx.pageController?Q(this.deps.ctx):void 0})}async v8_version_detect(e){if(!this.deps.ctx.pageController)return fe(`v8_version_detect`);let{VersionDetector:t}=await import(`./VersionDetector-CmPJmaJg.mjs`),n=new t(Q(this.deps.ctx));return{success:!0,version:await n.detectV8Version(),features:{nativesSyntax:await n.supportsNativesSyntax()}}}async v8_jit_inspect(e){return Y(e,{getPage:this.deps.ctx.pageController?Q(this.deps.ctx):void 0})}async inspectObjectViaDebugger(e){let t=this.deps.ctx.debuggerManager;if(!(!t||typeof t.getObjectPropertiesById!=`function`))try{let n=await t.getObjectPropertiesById(e);return Array.isArray(n)?de(n):void 0}catch{return}}};const me=te.map(e=>({tool:e,domain:`v8-inspector`,bind:r(`v8InspectorHandlers`,(t,n)=>t.handle(e.name,n))}));async function he(e){let t=new $({ctx:e,client:pe(e)});return e.v8InspectorHandlers=t,t}const ge={kind:`domain-manifest`,version:1,domain:`v8-inspector`,depKey:`v8InspectorHandlers`,profiles:[`workflow`,`full`],registrations:me,ensure:he,prerequisites:{v8_heap_snapshot_capture:[{condition:`Browser must be connected`,fix:`Call browser_launch or browser_attach first`}],v8_heap_snapshot_analyze:[{condition:`A snapshotId must be provided`,fix:`Capture a heap snapshot before analysis`}],v8_heap_diff:[{condition:`Both snapshot identifiers are required`,fix:`Capture before/after snapshots before diffing`}]},toolDependencies:[{from:`v8_heap_snapshot_capture`,to:`browser_attach`,relation:`requires`,weight:.8},{from:`v8_object_inspect`,to:`v8_heap_snapshot_analyze`,relation:`precedes`,weight:.6}],workflowRule:{patterns:[/v8.*heap/i,/heap.*snapshot/i,/jit/i,/object.*address/i],priority:80,tools:[`v8_heap_snapshot_capture`,`v8_heap_snapshot_analyze`,`v8_object_inspect`,`v8_heap_stats`],hint:`Capture a heap snapshot, analyze it, then inspect interesting objects by address.`}};export{$ as V8InspectorHandlers,ge as default,u as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./registry-xB8Wgmyj.mjs";import{n as t}from"./bind-helpers-D0mGAOof.mjs";import{t as n}from"./definitions-Co6AvTjH.mjs";const r=`dart-inspector`,i=`dartInspectorHandlers`,a=t({domain:r,depKey:i,lookup:e(n),entries:[{tool:`dart_strings_extract`,method:`handleDartStringsExtract`},{tool:`dart_smi_scan`,method:`handleDartSmiScan`},{tool:`dart_symbolize`,method:`handleDartSymbolize`},{tool:`flutter_packages_detect`,method:`handleDartPackagesDetect`},{tool:`dart_snapshot_header_parse`,method:`handleDartSnapshotHeaderParse`},{tool:`dart_version_fingerprint`,method:`handleDartVersionFingerprint`},{tool:`dart_object_pool_dump`,method:`handleDartObjectPoolDump`}]});async function o(e){let{DartInspectorHandlers:t}=await import(`./dart-inspector-LhEqRITQ.mjs`);return e.dartInspectorHandlers||=new t,e.dartInspectorHandlers}const s={kind:`domain-manifest`,version:1,domain:r,depKey:i,profiles:[`full`],ensure:o,registrations:a};export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./registry-
|
|
1
|
+
import{t as e}from"./registry-xB8Wgmyj.mjs";import{n as t}from"./bind-helpers-D0mGAOof.mjs";import{t as n}from"./definitions-cnG6tj17.mjs";const r=`wasm`,i=`wasmHandlers`,a=t({domain:r,depKey:i,lookup:e(n),entries:[{tool:`wasm_capabilities`,method:`handleWasmCapabilities`},{tool:`wasm_dump`,method:`handleWasmDump`},{tool:`wasm_disassemble`,method:`handleWasmDisassemble`},{tool:`wasm_decompile`,method:`handleWasmDecompile`},{tool:`wasm_inspect_sections`,method:`handleWasmInspectSections`},{tool:`wasm_offline_run`,method:`handleWasmOfflineRun`},{tool:`wasm_optimize`,method:`handleWasmOptimize`},{tool:`wasm_vmp_trace`,method:`handleWasmVmpTrace`},{tool:`wasm_memory_inspect`,method:`handleWasmMemoryInspect`},{tool:`wasm_to_c`,method:`handleWasmToC`},{tool:`wasm_detect_obfuscation`,method:`handleWasmDetectObfuscation`},{tool:`wasm_instrument_trace`,method:`handleWasmInstrumentTrace`}]});async function o(e){let{CodeCollector:t}=await import(`./collector-CB2syQEg.mjs`),{WasmToolHandlers:n}=await import(`./wasm-CZajRaad.mjs`);return e.collector||(e.collector=new t(e.config.puppeteer),e.registerCaches()),e.wasmHandlers||=new n(e.collector),e.wasmHandlers}const s={kind:`domain-manifest`,version:1,domain:r,depKey:i,profiles:[`full`],ensure:o,registrations:a};export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./registry-
|
|
1
|
+
import{t as e}from"./registry-xB8Wgmyj.mjs";import{n as t}from"./bind-helpers-D0mGAOof.mjs";import{t as n}from"./tool-builder-CpLh-UQd.mjs";const r=[`etw`,`strace`,`dtrace`],i={type:`object`,properties:{timestamp:{type:`number`,description:`Relative elapsed time in milliseconds since bpftrace start`},pid:{type:`number`,description:`Process identifier`},syscall:{type:`string`,description:`Observed syscall name`},args:{type:`array`,description:`Stringified syscall arguments`,items:{type:`string`}},returnValue:{type:`number`,description:`Numeric syscall return value if available`},duration:{type:`number`,description:`Execution duration in milliseconds if available`}},required:[`timestamp`,`pid`,`syscall`,`args`]},a=[n(`syscall_start_monitor`,e=>e.desc(`Start syscall monitoring.`).enum(`backend`,r,`Syscall capture backend`).number(`pid`,`Optional PID to scope monitoring to a single process`).boolean(`simulate`,`Use synthetic events instead of a real system tracer`,{default:!1}).required(`backend`)),n(`syscall_stop_monitor`,e=>e.desc(`Stop syscall interception and release all captured events.`).idempotent()),n(`syscall_capture_events`,e=>e.desc(`Capture syscall events from the active or last monitoring session.`).prop(`filter`,{type:`object`,description:`Optional event filter`,properties:{name:{type:`array`,description:`Restrict events to specific syscall names`,items:{type:`string`}},pid:{type:`number`,description:`Restrict events to a specific process ID`}}}).query()),n(`syscall_correlate_js`,e=>e.desc(`Correlate captured syscalls with likely JavaScript functions.`).array(`syscallEvents`,i,`Syscall events to correlate`).required(`syscallEvents`).query()),n(`syscall_filter`,e=>e.desc(`Filter captured syscall events by name, PID, or return value.`).array(`names`,{type:`string`},`Syscall names to keep`).query()),n(`syscall_get_stats`,e=>e.desc(`Get syscall monitoring statistics.`).query()),n(`syscall_ebpf_trace`,e=>e.desc(`Trace syscalls on Linux with eBPF. Requires root or CAP_BPF.`).number(`pid`,`Process ID to trace. 0 = trace all.`,{default:0}).array(`syscalls`,{type:`string`},`Specific syscall names to trace (empty = all)`).number(`durationSec`,`Trace duration in seconds`,{default:10,minimum:1,maximum:300}).boolean(`simulate`,`Use synthetic events when bpftrace is unavailable`,{default:!1}).query())],o=`syscall-hook`,s=`syscallHookHandlers`,c=t({domain:o,depKey:s,lookup:e(a),entries:[{tool:`syscall_start_monitor`,method:`handleSyscallStartMonitor`},{tool:`syscall_stop_monitor`,method:`handleSyscallStopMonitor`},{tool:`syscall_capture_events`,method:`handleSyscallCaptureEvents`},{tool:`syscall_correlate_js`,method:`handleSyscallCorrelateJs`},{tool:`syscall_filter`,method:`handleSyscallFilter`},{tool:`syscall_get_stats`,method:`handleSyscallGetStats`},{tool:`syscall_ebpf_trace`,method:`handleSyscallEbpfTrace`}]});async function l(e){let{SyscallHookHandlers:t}=await import(`./handlers-Z_B5aVaU.mjs`),n=e.getDomainInstance(s);if(n)return n;let r=new t(void 0,void 0,e.eventBus);return e.setDomainInstance(s,r),r}const u={kind:`domain-manifest`,version:1,domain:o,depKey:s,profiles:[`full`],ensure:l,registrations:c,workflowRule:{patterns:[/\b(syscall|etw|strace|dtrace|kernel|system\s?call)\b/i,/(syscall|kernel).*(trace|monitor|capture|filter)/i],priority:78,tools:[`syscall_start_monitor`,`syscall_capture_events`,`syscall_correlate_js`],hint:`Syscall tracing: start monitor (ETW/strace/dtrace) → capture events → correlate with JS stacks.`},prerequisites:{syscall_start_monitor:[{condition:`Administrator/root privileges required for ETW and dtrace; Linux strace needs ptrace_scope=0`,fix:`Run the MCP server with elevated privileges, or relax kernel restrictions on Linux`}],syscall_correlate_js:[{condition:`A debugger or v8-inspector session must expose JS stacks`,fix:`Attach the debugger or v8-inspector domain before correlating`}]},toolDependencies:[{from:`memory`,to:`syscall-hook`,relation:`uses`,weight:.5}]};export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as e}from"./constants-DMv3svps.mjs";import{t}from"./registry-xB8Wgmyj.mjs";import{n}from"./bind-helpers-D0mGAOof.mjs";import{t as r}from"./tool-builder-CpLh-UQd.mjs";const i=[r(`adb_device_list`,e=>e.desc(`List all connected Android devices and emulators.`).query()),r(`adb_shell`,e=>e.desc(`Execute an ADB shell command on a specific device.`).string(`serial`,`Android device serial or emulator id`).string(`command`,`Shell command to run (e.g. "getprop ro.build.version.release")`).boolean(`allowNonZero`,`Return stdout/stderr/exitCode instead of raising an MCP runtime error on non-zero exit.`,{default:!0}).number(`timeoutMs`,`Optional command timeout in milliseconds.`).number(`maxBufferBytes`,`Optional stdout/stderr max buffer in bytes.`).required(`serial`,`command`)),r(`adb_apk_pull`,e=>e.desc(`Pull an APK from a device to the local filesystem.`).string(`serial`,`Android device serial or emulator id`).string(`packageName`,`Android package name (e.g. com.example.app)`).string(`outputPath`,`Local directory to save the APK (default: current directory)`).string(`outputFile`,`Optional explicit local file path for a single base APK pull`).boolean(`includeSplits`,`Pull all split APKs returned by pm path, not just base.apk`,{default:!1}).boolean(`validateZip`,`Verify pulled APK files are regular ZIP/APK files`,{default:!0}).required(`serial`,`packageName`)),r(`adb_apk_analyze`,e=>e.desc(`Analyze an installed APK: package, permissions, activities, and security info.`).string(`serial`,`Required. Android device serial or emulator id.`).string(`packageName`,`Required. Android package name, for example com.example.app.`).requiredOpenWorld(`serial`,`packageName`)),r(`adb_package_summary`,e=>e.desc(`Return structured Android package metadata: launcher, uid, versions, permissions, components, and native library dirs.`).string(`serial`,`Required. Android device serial or emulator id.`).string(`packageName`,`Required. Android package name, for example com.example.app.`).requiredOpenWorld(`serial`,`packageName`).query()),r(`adb_logcat_query`,e=>e.desc(`Capture and filter Android logcat output in-process without shell grep pipelines.`).string(`serial`,`Required. Android device serial or emulator id.`).string(`packageName`,`Optional package name. If present, PID is resolved and used as a filter.`).string(`pid`,`Optional process id filter.`).string(`pattern`,`Optional JavaScript regex applied to each logcat line.`).number(`tail`,`Number of latest logcat records to request from Android.`,{default:500}).number(`maxLines`,`Maximum matching lines returned.`,{default:100}).boolean(`clearBefore`,`Clear logcat before capture.`,{default:!1}).requiredOpenWorld(`serial`).query()),r(`adb_app_cold_start_trace`,e=>e.desc(`High-level Android startup trace: force-stop, clear logcat, start activity with -W, wait, collect PID-filtered logs, and parse launch/Looper timing.`).string(`serial`,`Required. Android device serial or emulator id.`).string(`packageName`,`Required. Android package name, for example com.example.app.`).string(`activity`,`Optional component activity. Defaults to resolved launcher activity.`).number(`waitMs`,`Milliseconds to wait after am start before reading logcat.`,{default:5e3}).number(`logcatTail`,`Number of logcat records to inspect after launch.`,{default:800}).array(`extraPatterns`,{type:`string`},`Optional additional case-insensitive regex filters for logcat lines.`).requiredOpenWorld(`serial`,`packageName`)),r(`adb_file_pull`,e=>e.desc(`Pull a file from an Android device using normal ADB permissions.`).string(`serial`,`Required. Android device serial or emulator id.`).string(`remotePath`,`Required. Path on the Android device.`).string(`localPath`,`Required. Destination path on the local filesystem.`).requiredOpenWorld(`serial`,`remotePath`,`localPath`)),r(`adb_file_push`,e=>e.desc(`Push a local file to an Android device using normal ADB permissions.`).string(`serial`,`Required. Android device serial or emulator id.`).string(`localPath`,`Required. Local file path.`).string(`remotePath`,`Required. Destination path on the Android device.`).requiredOpenWorld(`serial`,`localPath`,`remotePath`)),r(`adb_pull_native_libs`,e=>e.desc(`Pull native shared libraries (.so) for an installed app from a device.`).string(`serial`,`Required. Android device serial or emulator id.`).string(`packageName`,`Required. Android package name, for example com.example.app.`).string(`outputPath`,`Optional. Local directory to save extracted libraries into (default: current directory).`).boolean(`includeSystemLibs`,`Optional. Include system/nativeLibraryDir entries outside the app package path.`,{default:!1}).requiredOpenWorld(`serial`,`packageName`)),r(`adb_webview_list`,t=>t.desc(`List debuggable WebView targets connected via ADB.`).string(`serial`,`Required. Android device serial or emulator id.`).number(`hostPort`,`Optional. Local port to use for forwarding.`,{default:e}).requiredOpenWorld(`serial`)),r(`adb_webview_attach`,t=>t.desc(`Attach to a WebView via ADB; returns WebSocket debugger URL for CDP.`).string(`serial`,`Required. Android device serial or emulator id.`).string(`targetId`,`Required. WebView target id returned by adb_webview_list.`).number(`hostPort`,`Optional. Local port to use for forwarding.`,{default:e}).requiredOpenWorld(`serial`,`targetId`))],a=`adb-bridge`,o=`adbBridgeHandlers`,s=n({domain:a,depKey:o,lookup:t(i),entries:[{tool:`adb_device_list`,method:`handleDeviceList`},{tool:`adb_apk_pull`,method:`handleApkPull`},{tool:`adb_shell`,method:`handleShell`},{tool:`adb_apk_analyze`,method:`handleAnalyzeApk`},{tool:`adb_package_summary`,method:`handlePackageSummary`},{tool:`adb_logcat_query`,method:`handleLogcatQuery`},{tool:`adb_app_cold_start_trace`,method:`handleAppColdStartTrace`},{tool:`adb_file_pull`,method:`handleFilePull`},{tool:`adb_file_push`,method:`handleFilePush`},{tool:`adb_pull_native_libs`,method:`handlePullNativeLibs`},{tool:`adb_webview_list`,method:`handleWebViewList`},{tool:`adb_webview_attach`,method:`handleWebViewAttach`}]});async function c(e){let{ADBBridgeHandlers:t}=await import(`./handlers-xFvI9P_y.mjs`),n=e.getDomainInstance(o);if(n)return n;let r=new t;return e.setDomainInstance(o,r),r}const l={kind:`domain-manifest`,version:1,domain:a,depKey:o,profiles:[`full`],registrations:s,ensure:c,workflowRule:{patterns:[/(android|adb|mobile|apk|device).*(list|shell|pull|analyze)/i,/(android|adb).*(logcat|cold\s*start|startup|launch|activity|pid)/i,/(adb|android).*(webview|chrome|debug|cdp|inspect)/i,/(android|adb).*(native|\.so|libapp|libflutter|shared\s+library)/i],priority:75,tools:[`adb_device_list`,`adb_shell`,`adb_apk_pull`,`adb_apk_analyze`,`adb_package_summary`,`adb_logcat_query`,`adb_app_cold_start_trace`,`adb_file_pull`,`adb_file_push`,`adb_pull_native_libs`,`adb_webview_list`,`adb_webview_attach`],hint:`Android/ADB: list devices → pull/analyze APK → package summary → cold-start/logcat trace → debug WebViews via CDP`},prerequisites:{"*":[{condition:`ADB server binary must be in PATH`,fix:`Install Android Platform Tools: https://developer.android.com/studio/command-line/adb`}],adb_webview_list:[{condition:`App must have android:debuggable="true"`,fix:`Use a debug build of the Android app`}],adb_webview_attach:[{condition:`App must have android:debuggable="true"`,fix:`Use a debug build of the Android app`}]},toolDependencies:[{from:`browser`,to:`adb-bridge`,relation:`uses`,weight:.7}]};export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./registry-xB8Wgmyj.mjs";import{n as t}from"./bind-helpers-D0mGAOof.mjs";import{a as n,i as r,n as i,r as a,t as o}from"./definitions-DnYpoGig.mjs";const s=`maintenance`,c=`coreMaintenanceHandlers`,l=[...n,...i,...o],u=[...a],d=[...r],f=e([...l,...u,...d]),p=t({domain:s,depKey:c,lookup:f,entries:[{tool:`get_token_budget_stats`,method:`handleGetTokenBudgetStats`,profiles:[`workflow`,`full`]},{tool:`manual_token_cleanup`,method:`handleManualTokenCleanup`},{tool:`reset_token_budget`,method:`handleResetTokenBudget`},{tool:`get_cache_stats`,method:`handleGetCacheStats`,profiles:[`workflow`,`full`]},{tool:`smart_cache_cleanup`,method:`handleSmartCacheCleanup`,mapArgs:e=>[e.targetSize]},{tool:`clear_all_caches`,method:`handleClearAllCaches`},{tool:`cleanup_artifacts`,method:`handleCleanupArtifacts`,mapArgs:e=>[{retentionDays:e.retentionDays,maxTotalBytes:e.maxTotalBytes,dryRun:e.dryRun}]},{tool:`doctor_environment`,method:`handleEnvironmentDoctor`,mapArgs:e=>[{includeBridgeHealth:e.includeBridgeHealth}]}]}),m=t({domain:s,depKey:`extensionManagementHandlers`,lookup:f,entries:[{tool:`list_extensions`,method:`handleListExtensions`,profiles:[`workflow`,`full`]},{tool:`reload_extensions`,method:`handleReloadExtensions`},{tool:`browse_extension_registry`,method:`handleBrowseExtensionRegistry`,profiles:[`workflow`,`full`],mapArgs:e=>[e.kind??`all`]},{tool:`install_extension`,method:`handleInstallExtension`,mapArgs:e=>[e.slug,e.targetDir]}]}),h=t({domain:s,depKey:`sandboxHandlers`,lookup:f,entries:[{tool:`execute_sandbox_script`,method:`handleExecuteSandboxScript`,profiles:[`full`]}]});async function g(e){let{CoreMaintenanceHandlers:t,ExtensionManagementHandlers:n,SandboxToolHandlers:r}=await import(`./maintenance-DAqADb6Z.mjs`);return(!e.coreMaintenanceHandlers||!e.extensionManagementHandlers||!e.sandboxHandlers)&&(e.coreMaintenanceHandlers||=new t({tokenBudget:e.tokenBudget,unifiedCache:e.unifiedCache}),e.extensionManagementHandlers||=new n(e),e.sandboxHandlers||=new r(e)),e.coreMaintenanceHandlers}const _={kind:`domain-manifest`,version:1,domain:s,depKey:c,secondaryDepKeys:[`extensionManagementHandlers`,`sandboxHandlers`],profiles:[`workflow`,`full`],ensure:g,registrations:[...p,...m,...h]};export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./registry-
|
|
1
|
+
import{t as e}from"./registry-xB8Wgmyj.mjs";import{n as t}from"./bind-helpers-D0mGAOof.mjs";import{t as n}from"./tool-builder-CpLh-UQd.mjs";const r=[n(`trace_recording`,e=>e.desc(`Start or stop trace recording into a SQLite database.`).enum(`action`,[`start`,`stop`],`Recording action`).array(`cdpDomains`,{type:`string`},`CDP domains to record (default: Debugger, Runtime, Network, Page)`).boolean(`recordMemoryDeltas`,`Record memory write deltas`,{default:!0}).boolean(`recordResponseBodies`,`Persist response bodies when available.`,{default:!0}).boolean(`streamResponseChunks`,`Capture response chunks when the browser supports it.`,{default:!0}).number(`networkBodyMaxBytes`,`Maximum response body bytes to persist per request`,{default:10485760,minimum:1024,maximum:104857600}).number(`networkInlineBodyBytes`,`Bodies up to this size are stored inline in SQLite; larger ones go to artifacts`,{default:262144,minimum:1024,maximum:10485760}).required(`action`).idempotent()),n(`start_trace_recording`,e=>e.desc(`Start recording debugger traces into a SQLite database for time-travel.`).array(`cdpDomains`,{type:`string`},`CDP domains to record (default: Debugger, Runtime, Network, Page)`).boolean(`recordMemoryDeltas`,`Record memory write deltas`,{default:!0}).boolean(`recordResponseBodies`,`Persist response bodies when available.`,{default:!0}).boolean(`streamResponseChunks`,`Capture response chunks when the browser supports it.`,{default:!0}).number(`networkBodyMaxBytes`,`Maximum response body bytes to persist per request`,{default:10485760,minimum:1024,maximum:104857600}).number(`networkInlineBodyBytes`,`Bodies up to this size are stored inline in SQLite; larger ones go to artifacts`,{default:262144,minimum:1024,maximum:10485760}).idempotent()),n(`stop_trace_recording`,e=>e.desc(`Stop trace recording and return the final session summary.`).idempotent()),n(`query_trace_sql`,e=>e.desc(`Execute a read-only SQL query against a trace database.`).string(`sql`,`SQL query to execute (SELECT only — write operations are rejected)`).string(`dbPath`,`Path to trace DB file. Uses the active recording if omitted.`).required(`sql`).query()),n(`seek_to_timestamp`,e=>e.desc(`Reconstruct trace state at a specific timestamp.`).number(`timestamp`,`Target timestamp in milliseconds`).string(`dbPath`,`Path to trace DB file. Uses the active recording if omitted.`).number(`windowMs`,`Time window around timestamp to include in ms`,{default:100}).enum(`timeDomain`,[`wall`,`monotonic`],`Interpret timestamp using wall or monotonic time`,{default:`wall`}).required(`timestamp`).query()),n(`trace_get_network_flow`,e=>e.desc(`Get a recorded request-scoped network flow from a trace.`).string(`requestId`,`Network requestId to retrieve from the trace`).string(`dbPath`,`Path to trace DB file. Uses the active recording if omitted.`).boolean(`includeBody`,`Include persisted response body metadata/content when available`,{default:!0}).boolean(`includeChunks`,`Include recorded response chunk timing data`,{default:!0}).boolean(`includeEvents`,`Include related network events from the trace`,{default:!0}).number(`chunkLimit`,`Maximum number of chunks to return`,{default:200,minimum:1,maximum:5e3}).number(`maxBodyBytes`,`Maximum response body bytes to inline before summarizing`,{default:1e5,minimum:1024,maximum:52428800}).boolean(`returnSummary`,`Return body summary even when body is within maxBodyBytes`,{default:!1}).required(`requestId`).query()),n(`diff_heap_snapshots`,e=>e.desc(`Compare two heap snapshots from a trace.`).number(`snapshotId1`,`First snapshot ID (earlier)`).number(`snapshotId2`,`Second snapshot ID (later)`).string(`dbPath`,`Path to trace DB file. Uses the active recording if omitted.`).required(`snapshotId1`,`snapshotId2`).query()),n(`export_trace`,e=>e.desc(`Export a trace database to Chrome Trace Event JSON.`).string(`dbPath`,`Path to trace DB file. Uses the active recording if omitted.`).string(`outputPath`,`Output JSON file path. Auto-generated if omitted.`).idempotent()),n(`summarize_trace`,e=>e.desc(`Generate a compact summary of a trace database.`).enum(`detail`,[`compact`,`balanced`,`full`],`Summary detail level`,{default:`balanced`}).string(`dbPath`,`Path to trace DB file. Uses the active recording if omitted.`).query())],i=`trace`,a=`traceHandlers`,o=t({domain:i,depKey:a,lookup:e(r),entries:[{tool:`trace_recording`,method:`handleTraceRecording`},{tool:`start_trace_recording`,method:`handleStartTraceRecording`},{tool:`stop_trace_recording`,method:`handleStopTraceRecording`},{tool:`query_trace_sql`,method:`handleQueryTraceSql`},{tool:`seek_to_timestamp`,method:`handleSeekToTimestamp`},{tool:`trace_get_network_flow`,method:`handleGetTraceNetworkFlow`},{tool:`diff_heap_snapshots`,method:`handleDiffHeapSnapshots`},{tool:`export_trace`,method:`handleExportTrace`},{tool:`summarize_trace`,method:`handleSummarizeTrace`}]});async function s(e){let{TraceRecorder:t}=await import(`./TraceRecorder-B5ktv3nP.mjs`),{TraceToolHandlers:n}=await import(`./handlers-DOOCWUNR.mjs`);return(!e.traceRecorder||!e.traceHandlers)&&(e.traceRecorder||=new t,e.traceHandlers||=new n(e.traceRecorder,e)),e.traceHandlers}const c={kind:`domain-manifest`,version:1,domain:i,depKey:a,profiles:[`full`],ensure:s,prerequisites:{},workflowRule:{patterns:[/trace/i,/time.?travel/i,/replay/i,/recorded?\s+events?/i],priority:70,tools:[`trace_recording`,`start_trace_recording`,`stop_trace_recording`,`query_trace_sql`,`seek_to_timestamp`,`trace_get_network_flow`,`diff_heap_snapshots`,`export_trace`,`summarize_trace`],hint:`Start recording → perform actions → stop recording → summarize/query/seek/diff/export`},registrations:o};export{c as default};
|