@jshookmcp/jshook 0.2.9 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/dist/{AntiCheatDetector-BNk-EoBt.mjs → AntiCheatDetector-CqGDXmfc.mjs} +159 -53
- package/dist/{CodeInjector-Cq8q01kp.mjs → CodeInjector-BdjRfNx7.mjs} +5 -5
- package/dist/{ConsoleMonitor-CPVQW1Y-.mjs → ConsoleMonitor-DykL3IAw.mjs} +85 -17
- package/dist/{DetailedDataManager-BQQcxh64.mjs → DetailedDataManager-HT49OrvF.mjs} +1 -1
- package/dist/{ExtensionManager-CWYgw0YW.mjs → ExtensionManager-BDMsY2Dz.mjs} +15 -8
- package/dist/{HardwareBreakpoint-B9gZCdFP.mjs → HardwareBreakpoint-Cc2AFq1Y.mjs} +3 -3
- package/dist/{HeapAnalyzer-BLDH0dCv.mjs → HeapAnalyzer-DruMgsgj.mjs} +20 -20
- package/dist/{HookGeneratorBuilders.core.generators.storage-CtcdK78Q.mjs → HookGeneratorBuilders.core.generators.storage-CTbB4Lcx.mjs} +1 -74
- package/dist/{InstrumentationSession-CvPC7Jwy.mjs → InstrumentationSession-DLH0vd-z.mjs} +2 -2
- package/dist/{MemoryController-CbVdCIJF.mjs → MemoryController-CMtviNW_.mjs} +3 -3
- package/dist/{MemoryScanSession-BsDZbLYm.mjs → MemoryScanSession-ITgb_NMi.mjs} +2 -2
- package/dist/{MemoryScanner-Bcpml6II.mjs → MemoryScanner-CiL7Z3ey.mjs} +12 -9
- package/dist/{NativeMemoryManager.impl-dZtA1ZGn.mjs → NativeMemoryManager.impl-D9Lkovvn.mjs} +13 -10
- package/dist/{NativeMemoryManager.utils-B-FjA2mJ.mjs → NativeMemoryManager.utils-BBlAixF5.mjs} +1 -1
- package/dist/{PEAnalyzer-D1lzJ_VG.mjs → PEAnalyzer-DMQ44gen.mjs} +15 -15
- package/dist/{PageController-Bqm2kZ_X.mjs → PageController-BPJNqqBN.mjs} +18 -4
- package/dist/{PointerChainEngine-BOhyVsjx.mjs → PointerChainEngine-K7wN8Z-w.mjs} +10 -7
- package/dist/ProcessRegistry-zGg12QbE.mjs +74 -0
- package/dist/{ResponseBuilder-D3iFYx2N.mjs → ResponseBuilder-CJXWmWNw.mjs} +10 -10
- package/dist/{ScriptManager-aHHq0X7U.mjs → ScriptManager-ZuWD-0Jg.mjs} +195 -192
- package/dist/{Speedhack-CqdIFlQl.mjs → Speedhack-D-z0umeT.mjs} +2 -2
- package/dist/{StructureAnalyzer-DhFaPvRO.mjs → StructureAnalyzer-Cav5AVSL.mjs} +9 -6
- package/dist/{ToolCatalog-C0JGZoOm.mjs → ToolCatalog-5OJdMiF0.mjs} +81 -81
- package/dist/{ToolProbe-oC7aPrkv.mjs → ToolProbe-DbCFGyrg.mjs} +1 -1
- package/dist/{ToolRegistry-BjaF4oNz.mjs → ToolRegistry-B9krbTtI.mjs} +51 -2
- package/dist/{ToolRouter.policy-BWV67ZK-.mjs → ToolRouter.policy-BGDAGyeH.mjs} +60 -20
- package/dist/TraceRecorder-B41Z5XBj.mjs +1286 -0
- package/dist/{Win32API-CePkipZY.mjs → Win32API-C2kjj0ze.mjs} +18 -12
- package/dist/{Win32Debug-BvKs-gxc.mjs → Win32Debug-CKrGOTpo.mjs} +2 -2
- package/dist/{WorkflowEngine-CuvkZtWu.mjs → WorkflowEngine-DJ6M4opp.mjs} +226 -255
- package/dist/analysis-BHeJW2Nb.mjs +1234 -0
- package/dist/{antidebug-CqDTB_uk.mjs → antidebug-BRKeyt27.mjs} +3 -3
- package/dist/{artifactRetention-CFEprwPw.mjs → artifactRetention-CPXkUJXp.mjs} +13 -6
- package/dist/{artifacts-Bk2-_uPq.mjs → artifacts-DkfosXH3.mjs} +1 -1
- package/dist/authorization-schema-DRqyJMSk.mjs +31 -0
- package/dist/{binary-instrument-CXfpx6fT.mjs → binary-instrument--V3MAhJ4.mjs} +19 -27
- package/dist/bind-helpers-ClV34xdn.mjs +42 -0
- package/dist/{boringssl-inspector-BH2D3VKc.mjs → boringssl-inspector-Bo_LOLaS.mjs} +1 -1
- package/dist/{browser-BpOr5PEx.mjs → browser-Dx3_S2cG.mjs} +324 -37
- package/dist/capabilities-CcHlvWgK.mjs +33 -0
- package/dist/{constants-B0OANIBL.mjs → constants-CDZLOoVv.mjs} +18 -3
- package/dist/{coordination-qUbyF8KU.mjs → coordination-DgItD9DL.mjs} +2 -2
- package/dist/{debugger-gnKxRSN0.mjs → debugger-RS3RSAqs.mjs} +30 -13
- package/dist/definitions-BEoYofW5.mjs +47 -0
- package/dist/{definitions-bAhHQJq9.mjs → definitions-BRaefg3u.mjs} +11 -5
- package/dist/{definitions-DVGfrn7y.mjs → definitions-BbkvZkiv.mjs} +2 -2
- package/dist/definitions-BtWSHJ3o.mjs +17 -0
- package/dist/{definitions-BMfYXoNC.mjs → definitions-C1gCHO0i.mjs} +1 -1
- package/dist/{definitions-C1UvM5Iy.mjs → definitions-CDOg_b-l.mjs} +14 -2
- package/dist/definitions-CVPD9hzZ.mjs +54 -0
- package/dist/{definitions-Cke7zEb8.mjs → definitions-Cea8Lgl7.mjs} +1 -1
- package/dist/definitions-DAgIyjxM.mjs +10 -0
- package/dist/{definitions-B4rAvHNZ.mjs → definitions-DJA27nsL.mjs} +12 -9
- package/dist/{definitions-ClJLzsJQ.mjs → definitions-DKPFU3LW.mjs} +1 -1
- package/dist/{definitions-D3VsGcvz.mjs → definitions-DPRpZQ96.mjs} +7 -7
- package/dist/{definitions-B18eyf0B.mjs → definitions-DUE5gmdn.mjs} +1 -1
- package/dist/definitions-DYVjOtxa.mjs +26 -0
- package/dist/{definitions-BB_4jnmy.mjs → definitions-DcYLVLCo.mjs} +1 -1
- package/dist/{definitions-Beid2EB3.mjs → definitions-Pp5LI2H4.mjs} +1 -1
- package/dist/definitions-j9KdHVNR.mjs +14 -0
- package/dist/definitions-uzkjBwa7.mjs +258 -0
- package/dist/{definitions-Cq-zroAU.mjs → definitions-va-AnLuQ.mjs} +4 -4
- package/dist/{encoding-Bvz5jLRv.mjs → encoding-DJeqHmpd.mjs} +18 -4
- package/dist/{evidence-graph-bridge-C_fv9PuC.mjs → evidence-graph-bridge-DcYizFk2.mjs} +1 -0
- package/dist/{factory-DxlGh9Xf.mjs → factory-C90tBff6.mjs} +6 -6
- package/dist/flat-target-session-Dgax2Cy3.mjs +29 -0
- package/dist/{graphql-DYWzJ29s.mjs → graphql-CoHrhweh.mjs} +205 -34
- package/dist/{handlers-C67ktuRN.mjs → handlers-4jmR0nMs.mjs} +220 -32
- package/dist/{handlers-DlCJN4Td.mjs → handlers-BAHPxcch.mjs} +122 -90
- package/dist/{handlers-9sAbfIg-.mjs → handlers-BOs9b907.mjs} +849 -801
- package/dist/{handlers-DxGIq15_2.mjs → handlers-BWXEy6ef.mjs} +16 -16
- package/dist/{handlers-tB9Mp9ZK.mjs → handlers-Bndn6QvE.mjs} +31 -4
- package/dist/{handlers-CTsDAO6p.mjs → handlers-BqC4bD4s.mjs} +1 -1
- package/dist/{handlers-C87g8oCe.mjs → handlers-BtYq60bM2.mjs} +1 -1
- package/dist/{handlers-DeLOCd5m.mjs → handlers-BzgcB4iv.mjs} +17 -17
- package/dist/{handlers-Cgyg6c0U.mjs → handlers-CRyRWj2b.mjs} +237 -23
- package/dist/{handlers-U6L4xhuF.mjs → handlers-CVv2H1uq.mjs} +24 -17
- package/dist/{handlers-tiy7EIBp.mjs → handlers-Dl5a7JS4.mjs} +3 -3
- package/dist/{handlers-D6j6yka7.mjs → handlers-Dx2d7jt7.mjs} +1893 -1480
- package/dist/{handlers-Bl8zkwz1.mjs → handlers-Dz9PYsCa.mjs} +95 -6
- package/dist/handlers-HujRKC3b.mjs +661 -0
- package/dist/{handlers.impl-DS0d9fUw.mjs → handlers.impl-XWXkQfyi.mjs} +70 -24
- package/dist/{hooks-CzCWByww.mjs → hooks-B1B8NRHL.mjs} +3 -3
- package/dist/index.mjs +154 -144
- package/dist/{maintenance-P7ePRXQC.mjs → maintenance-PRMkLVRW.mjs} +35 -30
- package/dist/manifest-67Bok-Si.mjs +58 -0
- package/dist/{manifest-B3QVVeBS.mjs → manifest-6lNTMZAB2.mjs} +33 -28
- package/dist/manifest-B2duEHiH.mjs +90 -0
- package/dist/manifest-B6EY9Vm8.mjs +57 -0
- package/dist/{manifest-gZ4s_UtG.mjs → manifest-B6nKSbyY.mjs} +32 -33
- package/dist/{manifest-2ToTpjv8.mjs → manifest-BL8AQNPF.mjs} +31 -31
- package/dist/{manifest-DzwvxPJX.mjs → manifest-BSZvJJmV.mjs} +23 -14
- package/dist/{manifest-Sc_0JQ13.mjs → manifest-BU7qzUyX.mjs} +23 -23
- package/dist/{manifest-CT7zZBV1.mjs → manifest-Bl62e8WK.mjs} +24 -23
- package/dist/manifest-Bo5cXjdt.mjs +82 -0
- package/dist/manifest-BpS4gtUK.mjs +1347 -0
- package/dist/manifest-Bv65_e2W.mjs +101 -0
- package/dist/manifest-BytNIF4Z.mjs +117 -0
- package/dist/{manifest-BqrQ4Tpj.mjs → manifest-C-xtsjS3.mjs} +23 -23
- package/dist/{manifest-NXctwWQq.mjs → manifest-CDYl7OhA.mjs} +36 -38
- package/dist/manifest-CRZ3xmkD.mjs +61 -0
- package/dist/manifest-CoW6u4Tp.mjs +132 -0
- package/dist/manifest-Cq5zN_8A.mjs +50 -0
- package/dist/{manifest-CAhOuvSl.mjs → manifest-D7YZM_2e.mjs} +75 -85
- package/dist/{manifest-DCyjf4n2.mjs → manifest-DE_VrAeQ.mjs} +27 -7
- package/dist/manifest-DGsXSCpT.mjs +39 -0
- package/dist/{manifest-BB2J8IMJ.mjs → manifest-DJ2vfEuW.mjs} +48 -41
- package/dist/{manifest-3g71z6Bg.mjs → manifest-DPXDYhEu.mjs} +26 -25
- package/dist/manifest-Dd4fQb0a.mjs +322 -0
- package/dist/{manifest-CXsRWjjI.mjs → manifest-Deq6opGg.mjs} +95 -96
- package/dist/{manifest-C9RT5nk32.mjs → manifest-DfJTafJK.mjs} +14 -11
- package/dist/manifest-DgOdgN_j.mjs +50 -0
- package/dist/{manifest-BmtZzQiQ2.mjs → manifest-DlbMW4v4.mjs} +17 -15
- package/dist/{manifest-DrbmZcFl2.mjs → manifest-DmVfbH0w.mjs} +212 -91
- package/dist/manifest-Dog6Ddjr.mjs +109 -0
- package/dist/manifest-DvgU5FWb.mjs +58 -0
- package/dist/manifest-HsfDBs7j.mjs +50 -0
- package/dist/manifest-I8oQHvCG.mjs +186 -0
- package/dist/manifest-NvH_a-av.mjs +786 -0
- package/dist/{manifest-Dh8WBmEW.mjs → manifest-cEJU1v0Z.mjs} +24 -24
- package/dist/manifest-wOl5XLB12.mjs +112 -0
- package/dist/{modules-C184v-S9.mjs → modules-tZozf0LQ.mjs} +130 -860
- package/dist/{mojo-ipc-B_H61Afw.mjs → mojo-ipc-DXNEXEqb.mjs} +141 -26
- package/dist/{network-671Cw6hV.mjs → network-CPVvwvFg.mjs} +1329 -823
- package/dist/{outputPaths-B1uGmrWZ.mjs → outputPaths-um7lCRY3.mjs} +4 -8
- package/dist/{platform-WmNn8Sxb.mjs → platform-CYeFoTWp.mjs} +101 -10
- package/dist/{process-QcbIy5Zq.mjs → process-BTbgcVc6.mjs} +251 -346
- package/dist/{proxy-DqNs0bAd.mjs → proxy-r8YN6nP1.mjs} +30 -8
- package/dist/{registry-D-6e18lB.mjs → registry-Bl8ZQW61.mjs} +3 -3
- package/dist/{response-BQVP-xUn.mjs → response-CWhh2aLo.mjs} +7 -1
- package/dist/{shared-state-board-DV-dpHFJ.mjs → shared-state-board-BoZnSoj-.mjs} +2 -2
- package/dist/{sourcemap-Dq8ez8vS.mjs → sourcemap-BIDHUVXy.mjs} +350 -66
- package/dist/{streaming-BUQ0VJsg.mjs → streaming-Dal6utPp.mjs} +13 -13
- package/dist/{tool-builder-DCbIC5Eo.mjs → tool-builder-BHJp32mV.mjs} +1 -1
- package/dist/{transform-CiYJfNX0.mjs → transform-DRVgGG90.mjs} +18 -14
- package/dist/wasm-BYx5UOeG.mjs +1044 -0
- package/dist/webcrack-Be0_FccV.mjs +747 -0
- package/dist/{workflow-f3xJOcjx.mjs → workflow-BpuKEtvn.mjs} +8 -8
- package/package.json +76 -43
- package/dist/TraceRecorder-DgxyVbdQ.mjs +0 -519
- package/dist/analysis-CL9uACt9.mjs +0 -463
- package/dist/bind-helpers-xFfRF-qm.mjs +0 -22
- package/dist/definitions-6M-eejaT.mjs +0 -53
- package/dist/definitions-B3QdlrHv.mjs +0 -34
- package/dist/definitions-CXEI7QC72.mjs +0 -216
- package/dist/definitions-C_4r7Fo-2.mjs +0 -14
- package/dist/definitions-CkFDALoa.mjs +0 -26
- package/dist/definitions-Cy3Sl6gV.mjs +0 -34
- package/dist/definitions-LKpC3-nL.mjs +0 -9
- package/dist/handlers-DdFzXLvF.mjs +0 -446
- package/dist/manifest-82baTv4U.mjs +0 -45
- package/dist/manifest-BKbgbSiY.mjs +0 -60
- package/dist/manifest-Bcf-TJzH.mjs +0 -848
- package/dist/manifest-Bnd7kqEY.mjs +0 -55
- package/dist/manifest-BqQX6OQC2.mjs +0 -65
- package/dist/manifest-Br4RPFt5.mjs +0 -370
- package/dist/manifest-C5qDjysN.mjs +0 -107
- package/dist/manifest-CBYWCUBJ.mjs +0 -51
- package/dist/manifest-CFADCRa1.mjs +0 -37
- package/dist/manifest-CQVhavRF.mjs +0 -114
- package/dist/manifest-CV12bcrF.mjs +0 -121
- package/dist/manifest-CZLUCfG02.mjs +0 -95
- package/dist/manifest-D6phHKFd.mjs +0 -131
- package/dist/manifest-DHsnKgP6.mjs +0 -60
- package/dist/manifest-Df_dliIe.mjs +0 -55
- package/dist/manifest-DhKRAT8_.mjs +0 -92
- package/dist/manifest-DlpTj4ic2.mjs +0 -193
- package/dist/manifest-DuwHjUa5.mjs +0 -70
- package/dist/manifest-qSleDqdO.mjs +0 -1023
- package/dist/wasm-DQTnHDs4.mjs +0 -531
- /package/dist/{CacheAdapters-CDe5WPSV.mjs → CacheAdapters-jJFy20G-.mjs} +0 -0
- /package/dist/{DarwinAPI-BNPxu0RH.mjs → DarwinAPI-ETyy0xyo.mjs} +0 -0
- /package/dist/{EventBus-DgPmwpeu.mjs → EventBus-DFKvADm3.mjs} +0 -0
- /package/dist/{EvidenceGraphBridge-SFesNera.mjs → EvidenceGraphBridge-318Oi0Lf.mjs} +0 -0
- /package/dist/{FingerprintManager-gzWtkKuf.mjs → FingerprintManager-BN4UQWnX.mjs} +0 -0
- /package/dist/{PrerequisiteError-Dl33Svkz.mjs → PrerequisiteError-TuyZIs6n.mjs} +0 -0
- /package/dist/{ReverseEvidenceGraph-Dlsk94LC.mjs → ReverseEvidenceGraph-C02-gXOh.mjs} +0 -0
- /package/dist/{StealthVerifier-Bo4T3bz8.mjs → StealthVerifier-BWmPgQsv.mjs} +0 -0
- /package/dist/{VersionDetector-CwVLVdDM.mjs → VersionDetector-K3V4vGsw.mjs} +0 -0
- /package/dist/{betterSqlite3-0pqusHHH.mjs → betterSqlite3-DLSBZodi.mjs} +0 -0
- /package/dist/{concurrency-Bt0yv1kJ.mjs → concurrency-Drev_Vz9.mjs} +0 -0
- /package/dist/{formatAddress-DVkj9kpI.mjs → formatAddress-nnMvEohD.mjs} +0 -0
- /package/dist/{parse-args-BlRjqlkL.mjs → parse-args-B4cY5Vx5.mjs} +0 -0
- /package/dist/{ssrf-policy-ZaUfvhq7.mjs → ssrf-policy-Dsqd-DTX.mjs} +0 -0
- /package/dist/{types-CPhOReNX.mjs → types-DDBWs9UP.mjs} +0 -0
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { n as toolLookup } from "./registry-D-6e18lB.mjs";
|
|
2
|
-
import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
|
|
3
|
-
import { t as processToolDefinitions } from "./definitions-B4rAvHNZ.mjs";
|
|
4
|
-
//#region src/server/domains/process/manifest.ts
|
|
5
|
-
const DOMAIN = "process";
|
|
6
|
-
const DEP_KEY = "processHandlers";
|
|
7
|
-
const t = toolLookup(processToolDefinitions);
|
|
8
|
-
const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
9
|
-
const EFFECTIVE_PLATFORM = 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;
|
|
10
|
-
async function ensure(ctx) {
|
|
11
|
-
const { ProcessToolHandlers } = await import("./process-QcbIy5Zq.mjs");
|
|
12
|
-
if (!ctx.processHandlers) ctx.processHandlers = new ProcessToolHandlers();
|
|
13
|
-
return ctx.processHandlers;
|
|
14
|
-
}
|
|
15
|
-
const IS_WIN32 = EFFECTIVE_PLATFORM === "win32";
|
|
16
|
-
const WIN32_ONLY_TOOLS = new Set(["check_debug_port"]);
|
|
17
|
-
const allRegistrations = [
|
|
18
|
-
{
|
|
19
|
-
tool: t("electron_attach"),
|
|
20
|
-
domain: DOMAIN,
|
|
21
|
-
bind: b((h, a) => h.handleElectronAttach(a))
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
tool: t("process_windows"),
|
|
25
|
-
domain: DOMAIN,
|
|
26
|
-
bind: b((h, a) => h.handleProcessWindows(a))
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
tool: t("process_check_debug_port"),
|
|
30
|
-
domain: DOMAIN,
|
|
31
|
-
bind: b((h, a) => h.handleProcessCheckDebugPort(a))
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
tool: t("process_launch_debug"),
|
|
35
|
-
domain: DOMAIN,
|
|
36
|
-
bind: b((h, a) => h.handleProcessLaunchDebug(a))
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
tool: t("memory_read"),
|
|
40
|
-
domain: DOMAIN,
|
|
41
|
-
bind: b((h, a) => h.handleMemoryRead(a))
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
tool: t("memory_write"),
|
|
45
|
-
domain: DOMAIN,
|
|
46
|
-
bind: b((h, a) => h.handleMemoryWrite(a))
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
tool: t("memory_scan"),
|
|
50
|
-
domain: DOMAIN,
|
|
51
|
-
bind: b((h, a) => h.handleMemoryScan(a))
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
tool: t("memory_check_protection"),
|
|
55
|
-
domain: DOMAIN,
|
|
56
|
-
bind: b((h, a) => h.handleMemoryCheckProtection(a))
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
tool: t("memory_scan_filtered"),
|
|
60
|
-
domain: DOMAIN,
|
|
61
|
-
bind: b((h, a) => h.handleMemoryScanFiltered(a))
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
tool: t("memory_batch_write"),
|
|
65
|
-
domain: DOMAIN,
|
|
66
|
-
bind: b((h, a) => h.handleMemoryBatchWrite(a))
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
tool: t("memory_dump_region"),
|
|
70
|
-
domain: DOMAIN,
|
|
71
|
-
bind: b((h, a) => h.handleMemoryDumpRegion(a))
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
tool: t("memory_list_regions"),
|
|
75
|
-
domain: DOMAIN,
|
|
76
|
-
bind: b((h, a) => h.handleMemoryListRegions(a))
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
tool: t("memory_audit_export"),
|
|
80
|
-
domain: DOMAIN,
|
|
81
|
-
bind: b((h, a) => h.handleMemoryAuditExport(a))
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
tool: t("inject_dll"),
|
|
85
|
-
domain: DOMAIN,
|
|
86
|
-
bind: b((h, a) => h.handleInjectDll(a))
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
tool: t("inject_shellcode"),
|
|
90
|
-
domain: DOMAIN,
|
|
91
|
-
bind: b((h, a) => h.handleInjectShellcode(a))
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
tool: t("check_debug_port"),
|
|
95
|
-
domain: DOMAIN,
|
|
96
|
-
bind: b((h, a) => h.handleCheckDebugPort(a))
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
tool: t("enumerate_modules"),
|
|
100
|
-
domain: DOMAIN,
|
|
101
|
-
bind: b((h, a) => h.handleEnumerateModules(a))
|
|
102
|
-
}
|
|
103
|
-
];
|
|
104
|
-
const manifest = {
|
|
105
|
-
kind: "domain-manifest",
|
|
106
|
-
version: 1,
|
|
107
|
-
domain: DOMAIN,
|
|
108
|
-
depKey: DEP_KEY,
|
|
109
|
-
profiles: ["full"],
|
|
110
|
-
ensure,
|
|
111
|
-
registrations: IS_WIN32 ? allRegistrations : allRegistrations.filter((r) => !WIN32_ONLY_TOOLS.has(r.tool.name))
|
|
112
|
-
};
|
|
113
|
-
//#endregion
|
|
114
|
-
export { manifest as default };
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { n as toolLookup, t as ensureBrowserCore } from "./registry-D-6e18lB.mjs";
|
|
2
|
-
import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
|
|
3
|
-
import { t as debuggerTools } from "./definitions-DVGfrn7y.mjs";
|
|
4
|
-
//#region src/server/domains/debugger/manifest.ts
|
|
5
|
-
const DOMAIN = "debugger";
|
|
6
|
-
const DEP_KEY = "debuggerHandlers";
|
|
7
|
-
const t = toolLookup(debuggerTools);
|
|
8
|
-
const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
9
|
-
async function ensure(ctx) {
|
|
10
|
-
const { DebuggerManager, RuntimeInspector } = await import("./modules-C184v-S9.mjs").then((n) => n.t);
|
|
11
|
-
const { DebuggerToolHandlers } = await import("./debugger-gnKxRSN0.mjs");
|
|
12
|
-
await ensureBrowserCore(ctx);
|
|
13
|
-
if (!ctx.debuggerManager || !ctx.runtimeInspector || !ctx.debuggerHandlers) {
|
|
14
|
-
if (!ctx.debuggerManager) ctx.debuggerManager = new DebuggerManager(ctx.collector);
|
|
15
|
-
if (!ctx.runtimeInspector) ctx.runtimeInspector = new RuntimeInspector(ctx.collector, ctx.debuggerManager);
|
|
16
|
-
if (!ctx.debuggerHandlers) ctx.debuggerHandlers = new DebuggerToolHandlers(ctx.debuggerManager, ctx.runtimeInspector, ctx.eventBus);
|
|
17
|
-
}
|
|
18
|
-
return ctx.debuggerHandlers;
|
|
19
|
-
}
|
|
20
|
-
const manifest = {
|
|
21
|
-
kind: "domain-manifest",
|
|
22
|
-
version: 1,
|
|
23
|
-
domain: DOMAIN,
|
|
24
|
-
depKey: DEP_KEY,
|
|
25
|
-
profiles: ["workflow", "full"],
|
|
26
|
-
ensure,
|
|
27
|
-
prerequisites: {
|
|
28
|
-
debugger_lifecycle: [{
|
|
29
|
-
condition: "Browser must be launched",
|
|
30
|
-
fix: "Call browser_launch or browser_attach first"
|
|
31
|
-
}],
|
|
32
|
-
breakpoint: [{
|
|
33
|
-
condition: "Browser must be launched",
|
|
34
|
-
fix: "Call browser_launch and debugger_lifecycle(enable) first"
|
|
35
|
-
}]
|
|
36
|
-
},
|
|
37
|
-
registrations: [
|
|
38
|
-
{
|
|
39
|
-
tool: t("debugger_lifecycle"),
|
|
40
|
-
domain: DOMAIN,
|
|
41
|
-
bind: b((h, a) => h.handleDebuggerLifecycle(a))
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
tool: t("debugger_pause"),
|
|
45
|
-
domain: DOMAIN,
|
|
46
|
-
bind: b((h, a) => h.handleDebuggerPause(a))
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
tool: t("debugger_resume"),
|
|
50
|
-
domain: DOMAIN,
|
|
51
|
-
bind: b((h, a) => h.handleDebuggerResume(a))
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
tool: t("debugger_step"),
|
|
55
|
-
domain: DOMAIN,
|
|
56
|
-
bind: b((h, a) => h.handleDebuggerStep(a))
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
tool: t("breakpoint"),
|
|
60
|
-
domain: DOMAIN,
|
|
61
|
-
bind: b((h, a) => h.handleBreakpoint(a))
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
tool: t("get_call_stack"),
|
|
65
|
-
domain: DOMAIN,
|
|
66
|
-
bind: b((h, a) => h.handleGetCallStack(a))
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
tool: t("debugger_evaluate"),
|
|
70
|
-
domain: DOMAIN,
|
|
71
|
-
bind: b((h, a) => h.handleDebuggerEvaluateDispatch(a))
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
tool: t("debugger_wait_for_paused"),
|
|
75
|
-
domain: DOMAIN,
|
|
76
|
-
bind: b((h, a) => h.handleDebuggerWaitForPaused(a))
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
tool: t("debugger_get_paused_state"),
|
|
80
|
-
domain: DOMAIN,
|
|
81
|
-
bind: b((h, a) => h.handleDebuggerGetPausedState(a))
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
tool: t("get_object_properties"),
|
|
85
|
-
domain: DOMAIN,
|
|
86
|
-
bind: b((h, a) => h.handleGetObjectProperties(a))
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
tool: t("get_scope_variables_enhanced"),
|
|
90
|
-
domain: DOMAIN,
|
|
91
|
-
bind: b((h, a) => h.handleGetScopeVariablesEnhanced(a))
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
tool: t("debugger_session"),
|
|
95
|
-
domain: DOMAIN,
|
|
96
|
-
bind: b((h, a) => h.handleDebuggerSession(a))
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
tool: t("watch"),
|
|
100
|
-
domain: DOMAIN,
|
|
101
|
-
bind: b((h, a) => h.handleWatch(a))
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
tool: t("blackbox_add"),
|
|
105
|
-
domain: DOMAIN,
|
|
106
|
-
bind: b((h, a) => h.handleBlackboxAdd(a))
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
tool: t("blackbox_add_common"),
|
|
110
|
-
domain: DOMAIN,
|
|
111
|
-
bind: b((h, a) => h.handleBlackboxAddCommon(a))
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
tool: t("blackbox_list"),
|
|
115
|
-
domain: DOMAIN,
|
|
116
|
-
bind: b((h, a) => h.handleBlackboxList(a))
|
|
117
|
-
}
|
|
118
|
-
]
|
|
119
|
-
};
|
|
120
|
-
//#endregion
|
|
121
|
-
export { manifest as default };
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { n as toolLookup } from "./registry-D-6e18lB.mjs";
|
|
2
|
-
import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
|
|
3
|
-
import { t as platformTools } from "./definitions-6M-eejaT.mjs";
|
|
4
|
-
//#region src/server/domains/platform/manifest.ts
|
|
5
|
-
const DOMAIN = "platform";
|
|
6
|
-
const DEP_KEY = "platformHandlers";
|
|
7
|
-
const t = toolLookup(platformTools);
|
|
8
|
-
const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
9
|
-
async function ensure(ctx) {
|
|
10
|
-
const { CodeCollector } = await import("./modules-C184v-S9.mjs").then((n) => n.t);
|
|
11
|
-
const { PlatformToolHandlers } = await import("./platform-WmNn8Sxb.mjs");
|
|
12
|
-
if (!ctx.collector) {
|
|
13
|
-
ctx.collector = new CodeCollector(ctx.config.puppeteer);
|
|
14
|
-
ctx.registerCaches();
|
|
15
|
-
}
|
|
16
|
-
if (!ctx.platformHandlers) ctx.platformHandlers = new PlatformToolHandlers(ctx.collector);
|
|
17
|
-
return ctx.platformHandlers;
|
|
18
|
-
}
|
|
19
|
-
const manifest = {
|
|
20
|
-
kind: "domain-manifest",
|
|
21
|
-
version: 1,
|
|
22
|
-
domain: DOMAIN,
|
|
23
|
-
depKey: DEP_KEY,
|
|
24
|
-
profiles: ["full"],
|
|
25
|
-
ensure,
|
|
26
|
-
registrations: [
|
|
27
|
-
{
|
|
28
|
-
tool: t("miniapp_pkg_scan"),
|
|
29
|
-
domain: DOMAIN,
|
|
30
|
-
bind: b((h, a) => h.handleMiniappPkgScan(a))
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
tool: t("miniapp_pkg_unpack"),
|
|
34
|
-
domain: DOMAIN,
|
|
35
|
-
bind: b((h, a) => h.handleMiniappPkgUnpack(a))
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
tool: t("miniapp_pkg_analyze"),
|
|
39
|
-
domain: DOMAIN,
|
|
40
|
-
bind: b((h, a) => h.handleMiniappPkgAnalyze(a))
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
tool: t("asar_extract"),
|
|
44
|
-
domain: DOMAIN,
|
|
45
|
-
bind: b((h, a) => h.handleAsarExtract(a))
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
tool: t("electron_inspect_app"),
|
|
49
|
-
domain: DOMAIN,
|
|
50
|
-
bind: b((h, a) => h.handleElectronInspectApp(a))
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
tool: t("electron_scan_userdata"),
|
|
54
|
-
domain: DOMAIN,
|
|
55
|
-
bind: b((h, a) => h.handleElectronScanUserdata(a))
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
tool: t("asar_search"),
|
|
59
|
-
domain: DOMAIN,
|
|
60
|
-
bind: b((h, a) => h.handleAsarSearch(a))
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
tool: t("electron_check_fuses"),
|
|
64
|
-
domain: DOMAIN,
|
|
65
|
-
bind: b((h, a) => h.handleElectronCheckFuses(a))
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
tool: t("electron_patch_fuses"),
|
|
69
|
-
domain: DOMAIN,
|
|
70
|
-
bind: b((h, a) => h.handleElectronPatchFuses(a))
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
tool: t("v8_bytecode_decompile"),
|
|
74
|
-
domain: DOMAIN,
|
|
75
|
-
bind: b((h, a) => h.handleV8BytecodeDecompile(a))
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
tool: t("electron_launch_debug"),
|
|
79
|
-
domain: DOMAIN,
|
|
80
|
-
bind: b((h, a) => h.handleElectronLaunchDebug(a))
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
tool: t("electron_debug_status"),
|
|
84
|
-
domain: DOMAIN,
|
|
85
|
-
bind: b((h, a) => h.handleElectronDebugStatus(a))
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
tool: t("electron_ipc_sniff"),
|
|
89
|
-
domain: DOMAIN,
|
|
90
|
-
bind: b((h, a) => h.handleElectronIPCSniff(a))
|
|
91
|
-
}
|
|
92
|
-
]
|
|
93
|
-
};
|
|
94
|
-
//#endregion
|
|
95
|
-
export { manifest as default };
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { n as toolLookup } from "./registry-D-6e18lB.mjs";
|
|
2
|
-
import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
|
|
3
|
-
import { t as tool } from "./tool-builder-DCbIC5Eo.mjs";
|
|
4
|
-
//#region src/server/domains/instrumentation/definitions.ts
|
|
5
|
-
const queryTypes = [
|
|
6
|
-
"before-load-inject",
|
|
7
|
-
"runtime-hook",
|
|
8
|
-
"network-intercept",
|
|
9
|
-
"function-trace"
|
|
10
|
-
];
|
|
11
|
-
const instrumentationTools = [
|
|
12
|
-
tool("instrumentation_session", (t) => t.desc(`Manage instrumentation sessions that group hooks, intercepts, and traces.
|
|
13
|
-
|
|
14
|
-
Actions:
|
|
15
|
-
- create: Create a new session
|
|
16
|
-
- list: List all active sessions
|
|
17
|
-
- destroy: Destroy a session (requires sessionId)
|
|
18
|
-
- status: Get detailed session status (requires sessionId)`).enum("action", [
|
|
19
|
-
"create",
|
|
20
|
-
"list",
|
|
21
|
-
"destroy",
|
|
22
|
-
"status"
|
|
23
|
-
], "Session operation").string("sessionId", "Session ID (required for destroy/status)").required("action")),
|
|
24
|
-
tool("instrumentation_operation", (t) => t.desc(`Manage operations within an instrumentation session.
|
|
25
|
-
|
|
26
|
-
Actions:
|
|
27
|
-
- register: Register a new operation (requires sessionId, type, target)
|
|
28
|
-
- list: List operations in a session (requires sessionId)`).enum("action", ["register", "list"], "Operation").enum("type", queryTypes, "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")),
|
|
29
|
-
tool("instrumentation_artifact", (t) => t.desc(`Manage captured artifacts for instrumentation operations.
|
|
30
|
-
|
|
31
|
-
Actions:
|
|
32
|
-
- record: Record a captured artifact (requires operationId, data)
|
|
33
|
-
- query: Query captured artifacts (requires sessionId)`).enum("action", ["record", "query"], "Artifact operation").string("operationId", "Operation ID (action=record)").object("data", {}, "Captured artifact payload (action=record)").enum("type", queryTypes, "Optional artifact type filter (action=query)").number("limit", "Max artifacts to return (action=query, default: 50)", { default: 50 }).required("action", "sessionId")),
|
|
34
|
-
tool("instrumentation_hook_preset", (t) => t.desc("Apply hooks domain preset hooks within an instrumentation session and persist...").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: false }).boolean("logToConsole", "Whether injected presets should log to console", { default: true }).enum("method", ["evaluate", "evaluateOnNewDocument"], "Injection method forwarded to hook_preset", { default: "evaluate" }).prop("customTemplate", {
|
|
35
|
-
type: "object",
|
|
36
|
-
additionalProperties: true,
|
|
37
|
-
description: "Optional inline custom preset definition"
|
|
38
|
-
}).prop("customTemplates", {
|
|
39
|
-
type: "array",
|
|
40
|
-
items: {
|
|
41
|
-
type: "object",
|
|
42
|
-
additionalProperties: true
|
|
43
|
-
},
|
|
44
|
-
description: "Optional inline custom preset definitions"
|
|
45
|
-
}).requiredOpenWorld("sessionId")),
|
|
46
|
-
tool("instrumentation_network_replay", (t) => t.desc("Replay a previously captured network request inside an instrumentation sessio...").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").number("timeoutMs", "Optional replay timeout in milliseconds").boolean("dryRun", "Preview the replay without sending the request", { default: true }).requiredOpenWorld("sessionId", "requestId"))
|
|
47
|
-
];
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region src/server/domains/instrumentation/manifest.ts
|
|
50
|
-
const DOMAIN = "instrumentation";
|
|
51
|
-
const DEP_KEY = "instrumentationHandlers";
|
|
52
|
-
const t = toolLookup(instrumentationTools);
|
|
53
|
-
const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
54
|
-
async function ensure(ctx) {
|
|
55
|
-
const { ReverseEvidenceGraph } = await import("./ReverseEvidenceGraph-Dlsk94LC.mjs").then((n) => n.t);
|
|
56
|
-
const { InstrumentationSessionManager } = await import("./InstrumentationSession-CvPC7Jwy.mjs");
|
|
57
|
-
const { EvidenceGraphBridge } = await import("./EvidenceGraphBridge-SFesNera.mjs");
|
|
58
|
-
const { InstrumentationHandlers } = await import("./handlers-C87g8oCe.mjs");
|
|
59
|
-
const hookPresetHandlers = ctx.handlerDeps.hookPresetHandlers;
|
|
60
|
-
const advancedHandlers = ctx.handlerDeps.advancedHandlers;
|
|
61
|
-
let graph = ctx.getDomainInstance("evidenceGraph");
|
|
62
|
-
if (!graph) {
|
|
63
|
-
graph = new ReverseEvidenceGraph();
|
|
64
|
-
ctx.setDomainInstance("evidenceGraph", graph);
|
|
65
|
-
}
|
|
66
|
-
let sessionManager = ctx.getDomainInstance("instrumentationSessionManager");
|
|
67
|
-
if (!sessionManager) {
|
|
68
|
-
sessionManager = new InstrumentationSessionManager();
|
|
69
|
-
ctx.setDomainInstance("instrumentationSessionManager", sessionManager);
|
|
70
|
-
}
|
|
71
|
-
let bridge = ctx.getDomainInstance("evidenceGraphBridge");
|
|
72
|
-
if (!bridge) {
|
|
73
|
-
bridge = new EvidenceGraphBridge(graph);
|
|
74
|
-
ctx.setDomainInstance("evidenceGraphBridge", bridge);
|
|
75
|
-
}
|
|
76
|
-
sessionManager.setEvidenceBridge(bridge);
|
|
77
|
-
if (!ctx.instrumentationHandlers) ctx.instrumentationHandlers = new InstrumentationHandlers(sessionManager, {
|
|
78
|
-
hookPresetHandlers,
|
|
79
|
-
advancedHandlers
|
|
80
|
-
});
|
|
81
|
-
return ctx.instrumentationHandlers;
|
|
82
|
-
}
|
|
83
|
-
const manifest = {
|
|
84
|
-
kind: "domain-manifest",
|
|
85
|
-
version: 1,
|
|
86
|
-
domain: DOMAIN,
|
|
87
|
-
depKey: DEP_KEY,
|
|
88
|
-
profiles: ["full"],
|
|
89
|
-
ensure,
|
|
90
|
-
workflowRule: {
|
|
91
|
-
patterns: [/(hook|intercept|trace|instrument).*(session|unified|manage|all)/i, /(session|统一|会话).*(hook|拦截|追踪|仪器化|instrument)/i],
|
|
92
|
-
priority: 95,
|
|
93
|
-
tools: [
|
|
94
|
-
"instrumentation_session",
|
|
95
|
-
"instrumentation_operation",
|
|
96
|
-
"instrumentation_artifact",
|
|
97
|
-
"instrumentation_hook_preset",
|
|
98
|
-
"instrumentation_network_replay"
|
|
99
|
-
],
|
|
100
|
-
hint: "Instrumentation session: create session → attach hook presets / network replay → record artifacts → query artifacts → destroy when done"
|
|
101
|
-
},
|
|
102
|
-
registrations: [
|
|
103
|
-
{
|
|
104
|
-
tool: t("instrumentation_session"),
|
|
105
|
-
domain: DOMAIN,
|
|
106
|
-
bind: b((h, a) => h.handleSessionDispatch(a))
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
tool: t("instrumentation_operation"),
|
|
110
|
-
domain: DOMAIN,
|
|
111
|
-
bind: b((h, a) => h.handleOperationDispatch(a))
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
tool: t("instrumentation_artifact"),
|
|
115
|
-
domain: DOMAIN,
|
|
116
|
-
bind: b((h, a) => h.handleArtifactDispatch(a))
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
tool: t("instrumentation_hook_preset"),
|
|
120
|
-
domain: DOMAIN,
|
|
121
|
-
bind: b((h, a) => h.handleHookPreset(a))
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
tool: t("instrumentation_network_replay"),
|
|
125
|
-
domain: DOMAIN,
|
|
126
|
-
bind: b((h, a) => h.handleNetworkReplay(a))
|
|
127
|
-
}
|
|
128
|
-
]
|
|
129
|
-
};
|
|
130
|
-
//#endregion
|
|
131
|
-
export { manifest as default };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { n as toolLookup } from "./registry-D-6e18lB.mjs";
|
|
2
|
-
import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
|
|
3
|
-
import { t as transformTools } from "./definitions-Cq-zroAU.mjs";
|
|
4
|
-
//#region src/server/domains/transform/manifest.ts
|
|
5
|
-
const DOMAIN = "transform";
|
|
6
|
-
const DEP_KEY = "transformHandlers";
|
|
7
|
-
const t = toolLookup(transformTools);
|
|
8
|
-
const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
9
|
-
async function ensure(ctx) {
|
|
10
|
-
const { CodeCollector } = await import("./modules-C184v-S9.mjs").then((n) => n.t);
|
|
11
|
-
const { TransformToolHandlers } = await import("./transform-CiYJfNX0.mjs");
|
|
12
|
-
if (!ctx.collector) {
|
|
13
|
-
ctx.collector = new CodeCollector(ctx.config.puppeteer);
|
|
14
|
-
ctx.registerCaches();
|
|
15
|
-
}
|
|
16
|
-
if (!ctx.transformHandlers) ctx.transformHandlers = new TransformToolHandlers(ctx.collector);
|
|
17
|
-
return ctx.transformHandlers;
|
|
18
|
-
}
|
|
19
|
-
const manifest = {
|
|
20
|
-
kind: "domain-manifest",
|
|
21
|
-
version: 1,
|
|
22
|
-
domain: DOMAIN,
|
|
23
|
-
depKey: DEP_KEY,
|
|
24
|
-
profiles: ["full"],
|
|
25
|
-
ensure,
|
|
26
|
-
registrations: [
|
|
27
|
-
{
|
|
28
|
-
tool: t("ast_transform_preview"),
|
|
29
|
-
domain: DOMAIN,
|
|
30
|
-
bind: b((h, a) => h.handleAstTransformPreview(a))
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
tool: t("ast_transform_chain"),
|
|
34
|
-
domain: DOMAIN,
|
|
35
|
-
bind: b((h, a) => h.handleAstTransformChain(a))
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
tool: t("ast_transform_apply"),
|
|
39
|
-
domain: DOMAIN,
|
|
40
|
-
bind: b((h, a) => h.handleAstTransformApply(a))
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
tool: t("crypto_extract_standalone"),
|
|
44
|
-
domain: DOMAIN,
|
|
45
|
-
bind: b((h, a) => h.handleCryptoExtractStandalone(a))
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
tool: t("crypto_test_harness"),
|
|
49
|
-
domain: DOMAIN,
|
|
50
|
-
bind: b((h, a) => h.handleCryptoTestHarness(a))
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
tool: t("crypto_compare"),
|
|
54
|
-
domain: DOMAIN,
|
|
55
|
-
bind: b((h, a) => h.handleCryptoCompare(a))
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
};
|
|
59
|
-
//#endregion
|
|
60
|
-
export { manifest as default };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { n as toolLookup } from "./registry-D-6e18lB.mjs";
|
|
2
|
-
import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
|
|
3
|
-
import { t as encodingTools } from "./definitions-D3VsGcvz.mjs";
|
|
4
|
-
//#region src/server/domains/encoding/manifest.ts
|
|
5
|
-
const DOMAIN = "encoding";
|
|
6
|
-
const DEP_KEY = "encodingHandlers";
|
|
7
|
-
const t = toolLookup(encodingTools);
|
|
8
|
-
const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
9
|
-
async function ensure(ctx) {
|
|
10
|
-
const { CodeCollector } = await import("./modules-C184v-S9.mjs").then((n) => n.t);
|
|
11
|
-
const { EncodingToolHandlers } = await import("./encoding-Bvz5jLRv.mjs");
|
|
12
|
-
if (!ctx.collector) {
|
|
13
|
-
ctx.collector = new CodeCollector(ctx.config.puppeteer);
|
|
14
|
-
ctx.registerCaches();
|
|
15
|
-
}
|
|
16
|
-
if (!ctx.encodingHandlers) ctx.encodingHandlers = new EncodingToolHandlers(ctx.collector);
|
|
17
|
-
return ctx.encodingHandlers;
|
|
18
|
-
}
|
|
19
|
-
const manifest = {
|
|
20
|
-
kind: "domain-manifest",
|
|
21
|
-
version: 1,
|
|
22
|
-
domain: DOMAIN,
|
|
23
|
-
depKey: DEP_KEY,
|
|
24
|
-
profiles: ["workflow", "full"],
|
|
25
|
-
ensure,
|
|
26
|
-
registrations: [
|
|
27
|
-
{
|
|
28
|
-
tool: t("binary_detect_format"),
|
|
29
|
-
domain: DOMAIN,
|
|
30
|
-
bind: b((h, a) => h.handleBinaryDetectFormat(a))
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
tool: t("binary_decode"),
|
|
34
|
-
domain: DOMAIN,
|
|
35
|
-
bind: b((h, a) => h.handleBinaryDecode(a))
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
tool: t("binary_encode"),
|
|
39
|
-
domain: DOMAIN,
|
|
40
|
-
bind: b((h, a) => h.handleBinaryEncode(a))
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
tool: t("binary_entropy_analysis"),
|
|
44
|
-
domain: DOMAIN,
|
|
45
|
-
bind: b((h, a) => h.handleBinaryEntropyAnalysis(a))
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
tool: t("protobuf_decode_raw"),
|
|
49
|
-
domain: DOMAIN,
|
|
50
|
-
bind: b((h, a) => h.handleProtobufDecodeRaw(a))
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
};
|
|
54
|
-
//#endregion
|
|
55
|
-
export { manifest as default };
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { n as toolLookup } from "./registry-D-6e18lB.mjs";
|
|
2
|
-
import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
|
|
3
|
-
import { t as tool } from "./tool-builder-DCbIC5Eo.mjs";
|
|
4
|
-
//#region src/server/domains/trace/definitions.tools.ts
|
|
5
|
-
const TRACE_TOOLS = [
|
|
6
|
-
tool("trace_recording", (t) => t.desc("Start or stop time-travel trace recording into a SQLite database.\n\nRecording captures events from Debugger, Runtime, Network, Page, and EventBus.\nUse action=\"stop\" to finalize and get a session summary.").enum("action", ["start", "stop"], "Recording action").array("cdpDomains", { type: "string" }, "CDP domains to record (action=start, default: Debugger, Runtime, Network, Page)").boolean("recordMemoryDeltas", "Record memory write deltas (action=start)", { default: true }).required("action").idempotent()),
|
|
7
|
-
tool("query_trace_sql", (t) => t.desc("Execute a read-only SQL query against a trace database.\n\nAvailable tables:\n- events(id, timestamp, category, event_type, data, script_id, line_number)\n- memory_deltas(id, timestamp, address, old_value, new_value, size, value_type)\n- heap_snapshots(id, timestamp, snapshot_data, summary)\n- metadata(key, value)\n\nReturns columns, rows, and row count.\n\nExamples:\nquery_trace_sql(sql=\"SELECT * FROM events WHERE category='debugger' ORDER BY timestamp\")\nquery_trace_sql(sql=\"SELECT address, COUNT(*) as writes FROM memory_deltas GROUP BY address ORDER BY writes DESC LIMIT 10\")\nquery_trace_sql(sql=\"SELECT * FROM events WHERE timestamp BETWEEN 1000 AND 2000\", dbPath=\"artifacts/traces/my-trace.db\")").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()),
|
|
8
|
-
tool("seek_to_timestamp", (t) => t.desc("Reconstruct application state at a specific timestamp from a recorded trace.\n\nReturns a structured snapshot including:\n- Events near the timestamp\n- Debugger state (last pause, call stack)\n- Memory state (latest values per address)\n- Network state (completed requests)\n- Nearest heap snapshot\n\nExamples:\nseek_to_timestamp(timestamp=1711000000000)\nseek_to_timestamp(timestamp=1711000000000, windowMs=500)\nseek_to_timestamp(timestamp=1711000000000, dbPath=\"artifacts/traces/my-trace.db\")").number("timestamp", "Target timestamp in milliseconds since epoch").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 }).required("timestamp").query()),
|
|
9
|
-
tool("diff_heap_snapshots", (t) => t.desc("Compare two heap snapshots from a trace and return the differences.\n\nShows:\n- New object types (in snapshot 2 but not 1)\n- Deleted object types (in snapshot 1 but not 2)\n- Changed objects (count or size differs)\n- Total size delta\n\nUseful for identifying state changes in obfuscated code.\n\nExamples:\ndiff_heap_snapshots(snapshotId1=1, snapshotId2=2)\ndiff_heap_snapshots(snapshotId1=1, snapshotId2=3, dbPath=\"artifacts/traces/my-trace.db\")").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()),
|
|
10
|
-
tool("export_trace", (t) => t.desc("Export a trace database to Chrome Trace Event JSON format.\n\nThe resulting file can be loaded in:\n- chrome://tracing\n- Perfetto UI (ui.perfetto.dev)\n\nMaps events to the standard trace event format with name, category, phase, timestamp.\n\nExamples:\nexport_trace()\nexport_trace(dbPath=\"artifacts/traces/my-trace.db\")\nexport_trace(outputPath=\"my-export.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()),
|
|
11
|
-
tool("summarize_trace", (t) => t.desc("Generate a compact, LLM-friendly summary of a trace database.\n\nAvoids sending raw trace data that may exceed context windows. Three detail levels:\n- compact: category aggregation + timeline overview (~10% of raw size)\n- balanced: compact + key moments (breakpoints, exceptions, network completions) [DEFAULT]\n- full: passthrough — returns all events without compression\n\nAlso detects memory anomalies: addresses with significantly more writes than average.\n\nExamples:\nsummarize_trace()\nsummarize_trace(detail=\"compact\")\nsummarize_trace(detail=\"balanced\", dbPath=\"artifacts/traces/my-trace.db\")").enum("detail", [
|
|
12
|
-
"compact",
|
|
13
|
-
"balanced",
|
|
14
|
-
"full"
|
|
15
|
-
], "Summary detail level", { default: "balanced" }).string("dbPath", "Path to trace DB file. Uses the active recording if omitted.").query())
|
|
16
|
-
];
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/server/domains/trace/manifest.ts
|
|
19
|
-
const DOMAIN = "trace";
|
|
20
|
-
const DEP_KEY = "traceHandlers";
|
|
21
|
-
const t = toolLookup(TRACE_TOOLS);
|
|
22
|
-
const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
23
|
-
async function ensure(ctx) {
|
|
24
|
-
const { TraceRecorder } = await import("./TraceRecorder-DgxyVbdQ.mjs");
|
|
25
|
-
const { TraceToolHandlers } = await import("./handlers-DdFzXLvF.mjs");
|
|
26
|
-
if (!ctx.traceRecorder || !ctx.traceHandlers) {
|
|
27
|
-
if (!ctx.traceRecorder) ctx.traceRecorder = new TraceRecorder();
|
|
28
|
-
if (!ctx.traceHandlers) ctx.traceHandlers = new TraceToolHandlers(ctx.traceRecorder, ctx);
|
|
29
|
-
}
|
|
30
|
-
return ctx.traceHandlers;
|
|
31
|
-
}
|
|
32
|
-
const manifest = {
|
|
33
|
-
kind: "domain-manifest",
|
|
34
|
-
version: 1,
|
|
35
|
-
domain: DOMAIN,
|
|
36
|
-
depKey: DEP_KEY,
|
|
37
|
-
profiles: ["full"],
|
|
38
|
-
ensure,
|
|
39
|
-
prerequisites: {},
|
|
40
|
-
workflowRule: {
|
|
41
|
-
patterns: [
|
|
42
|
-
/trace/i,
|
|
43
|
-
/time.?travel/i,
|
|
44
|
-
/replay/i,
|
|
45
|
-
/recorded?\s+events?/i
|
|
46
|
-
],
|
|
47
|
-
priority: 70,
|
|
48
|
-
tools: [
|
|
49
|
-
"trace_recording",
|
|
50
|
-
"query_trace_sql",
|
|
51
|
-
"seek_to_timestamp",
|
|
52
|
-
"diff_heap_snapshots",
|
|
53
|
-
"export_trace",
|
|
54
|
-
"summarize_trace"
|
|
55
|
-
],
|
|
56
|
-
hint: "Start recording → perform actions → stop recording → summarize/query/seek/diff/export"
|
|
57
|
-
},
|
|
58
|
-
registrations: [
|
|
59
|
-
{
|
|
60
|
-
tool: t("trace_recording"),
|
|
61
|
-
domain: DOMAIN,
|
|
62
|
-
bind: b((h, a) => h.handleTraceRecording(a))
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
tool: t("query_trace_sql"),
|
|
66
|
-
domain: DOMAIN,
|
|
67
|
-
bind: b((h, a) => h.handleQueryTraceSql(a))
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
tool: t("seek_to_timestamp"),
|
|
71
|
-
domain: DOMAIN,
|
|
72
|
-
bind: b((h, a) => h.handleSeekToTimestamp(a))
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
tool: t("diff_heap_snapshots"),
|
|
76
|
-
domain: DOMAIN,
|
|
77
|
-
bind: b((h, a) => h.handleDiffHeapSnapshots(a))
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
tool: t("export_trace"),
|
|
81
|
-
domain: DOMAIN,
|
|
82
|
-
bind: b((h, a) => h.handleExportTrace(a))
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
tool: t("summarize_trace"),
|
|
86
|
-
domain: DOMAIN,
|
|
87
|
-
bind: b((h, a) => h.handleSummarizeTrace(a))
|
|
88
|
-
}
|
|
89
|
-
]
|
|
90
|
-
};
|
|
91
|
-
//#endregion
|
|
92
|
-
export { manifest as default };
|