@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,7 +1,7 @@
|
|
|
1
1
|
import { t as logger } from "./logger-Dh_xb7_2.mjs";
|
|
2
2
|
import { t as ToolError } from "./ToolError-jh9whhMd.mjs";
|
|
3
|
-
import { a as argString, i as argObject, r as argNumber, t as argBool } from "./parse-args-
|
|
4
|
-
import "./definitions-
|
|
3
|
+
import { a as argString, i as argObject, r as argNumber, t as argBool } from "./parse-args-B4cY5Vx5.mjs";
|
|
4
|
+
import "./definitions-BbkvZkiv.mjs";
|
|
5
5
|
//#region src/server/domains/debugger/handlers/debugger-control.ts
|
|
6
6
|
var DebuggerControlHandlers = class {
|
|
7
7
|
constructor(deps) {
|
|
@@ -34,21 +34,38 @@ var DebuggerControlHandlers = class {
|
|
|
34
34
|
}
|
|
35
35
|
async handleDebuggerPause(_args) {
|
|
36
36
|
await this.deps.debuggerManager.pause();
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
try {
|
|
38
|
+
const pausedState = await this.deps.debuggerManager.waitForPaused(500);
|
|
39
|
+
return { content: [{
|
|
40
|
+
type: "text",
|
|
41
|
+
text: JSON.stringify({
|
|
42
|
+
success: true,
|
|
43
|
+
paused: true,
|
|
44
|
+
message: "Execution paused",
|
|
45
|
+
reason: pausedState.reason,
|
|
46
|
+
location: pausedState.callFrames[0]?.location
|
|
47
|
+
}, null, 2)
|
|
48
|
+
}] };
|
|
49
|
+
} catch {
|
|
50
|
+
return { content: [{
|
|
51
|
+
type: "text",
|
|
52
|
+
text: JSON.stringify({
|
|
53
|
+
success: true,
|
|
54
|
+
paused: false,
|
|
55
|
+
message: "Pause requested; no paused event observed yet"
|
|
56
|
+
}, null, 2)
|
|
57
|
+
}] };
|
|
58
|
+
}
|
|
44
59
|
}
|
|
45
60
|
async handleDebuggerResume(_args) {
|
|
61
|
+
const wasPaused = this.deps.debuggerManager.getPausedState() !== null;
|
|
46
62
|
await this.deps.debuggerManager.resume();
|
|
47
63
|
return { content: [{
|
|
48
64
|
type: "text",
|
|
49
65
|
text: JSON.stringify({
|
|
50
66
|
success: true,
|
|
51
|
-
|
|
67
|
+
resumed: wasPaused,
|
|
68
|
+
message: wasPaused ? "Execution resumed" : "Resume requested; debugger was not paused"
|
|
52
69
|
}, null, 2)
|
|
53
70
|
}] };
|
|
54
71
|
}
|
|
@@ -74,7 +91,7 @@ var DebuggerSteppingHandlers = class {
|
|
|
74
91
|
text: JSON.stringify({
|
|
75
92
|
success: false,
|
|
76
93
|
error: "Cannot step while not paused",
|
|
77
|
-
hint: "The debugger must be paused at a breakpoint to perform step operations. Set
|
|
94
|
+
hint: "The debugger must be paused at a breakpoint to perform step operations. Set one with breakpoint({ action: 'set', type: 'code', ... }) or pause with debugger_pause().",
|
|
78
95
|
currentState: "running"
|
|
79
96
|
}, null, 2)
|
|
80
97
|
}] };
|
|
@@ -114,7 +131,7 @@ var DebuggerSteppingHandlers = class {
|
|
|
114
131
|
text: JSON.stringify({
|
|
115
132
|
success: false,
|
|
116
133
|
error: "Cannot step while not paused",
|
|
117
|
-
hint: "The debugger must be paused at a breakpoint to perform step operations. Set
|
|
134
|
+
hint: "The debugger must be paused at a breakpoint to perform step operations. Set one with breakpoint({ action: 'set', type: 'code', ... }) or pause with debugger_pause().",
|
|
118
135
|
currentState: "running"
|
|
119
136
|
}, null, 2)
|
|
120
137
|
}] };
|
|
@@ -154,7 +171,7 @@ var DebuggerSteppingHandlers = class {
|
|
|
154
171
|
text: JSON.stringify({
|
|
155
172
|
success: false,
|
|
156
173
|
error: "Cannot step out while not paused",
|
|
157
|
-
hint: "The debugger must be paused at a breakpoint to perform step out. Set
|
|
174
|
+
hint: "The debugger must be paused at a breakpoint to perform step out. Set one with breakpoint({ action: 'set', type: 'code', ... }) or pause with debugger_pause().",
|
|
158
175
|
currentState: "running"
|
|
159
176
|
}, null, 2)
|
|
160
177
|
}] };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
|
+
//#region src/server/domains/wasm/definitions.ts
|
|
3
|
+
const wasmTools = [
|
|
4
|
+
tool("wasm_capabilities", (t) => t.desc("Report WASM tool availability.").query()),
|
|
5
|
+
tool("wasm_dump", (t) => t.desc("Dump a captured WebAssembly module from the current page.").number("moduleIndex", "Index of the WASM module to dump if multiple were loaded", { default: 0 }).string("outputPath", "Custom output file path. If omitted, auto-generates in artifacts/wasm/")),
|
|
6
|
+
tool("wasm_disassemble", (t) => t.desc("Disassemble a .wasm file to WAT.").string("inputPath", "Path to the .wasm file to disassemble").string("outputPath", "Output .wat file path. If omitted, auto-generates in artifacts/wasm/").boolean("foldExprs", "Fold expressions for more compact output", { default: true }).required("inputPath")),
|
|
7
|
+
tool("wasm_decompile", (t) => t.desc("Decompile a .wasm file to pseudo-code.").string("inputPath", "Path to the .wasm file to decompile").string("outputPath", "Output file path. If omitted, auto-generates in artifacts/wasm/").required("inputPath")),
|
|
8
|
+
tool("wasm_inspect_sections", (t) => t.desc("Inspect sections and metadata of a .wasm file.").string("inputPath", "Path to the .wasm file to inspect").enum("sections", [
|
|
9
|
+
"headers",
|
|
10
|
+
"details",
|
|
11
|
+
"disassemble",
|
|
12
|
+
"all"
|
|
13
|
+
], "What to dump: headers (section overview), details (full metadata), disassemble (bytecode), all", { default: "details" }).required("inputPath")),
|
|
14
|
+
tool("wasm_offline_run", (t) => t.desc("Run an exported .wasm function.").string("inputPath", "Path to the .wasm file").string("functionName", "Name of the exported function to invoke").array("args", { type: "string" }, "Arguments to pass to the function (will be parsed as integers/floats)").enum("runtime", [
|
|
15
|
+
"wasmtime",
|
|
16
|
+
"wasmer",
|
|
17
|
+
"auto"
|
|
18
|
+
], "WASM runtime to use. \"auto\" tries wasmtime first, then wasmer", { default: "auto" }).number("timeoutMs", "Execution timeout in ms", { default: 1e4 }).required("inputPath", "functionName")),
|
|
19
|
+
tool("wasm_optimize", (t) => t.desc("Optimize a .wasm file.").string("inputPath", "Path to the .wasm file to optimize").string("outputPath", "Output optimized .wasm file path. If omitted, auto-generates in artifacts/wasm/").enum("level", [
|
|
20
|
+
"O1",
|
|
21
|
+
"O2",
|
|
22
|
+
"O3",
|
|
23
|
+
"O4",
|
|
24
|
+
"Os",
|
|
25
|
+
"Oz"
|
|
26
|
+
], "Optimization level", { default: "O2" }).required("inputPath")),
|
|
27
|
+
tool("wasm_vmp_trace", (t) => t.desc("Read captured WASM VMP import-call traces from the current page.").number("maxEvents", "Maximum import call events to capture", { default: 5e3 }).string("filterModule", "Filter by import module name")),
|
|
28
|
+
tool("wasm_memory_inspect", (t) => t.desc("Inspect exported WebAssembly.Memory from the current page.").number("offset", "Starting byte offset to read from", { default: 0 }).number("length", "Number of bytes to read", { default: 256 }).enum("format", [
|
|
29
|
+
"hex",
|
|
30
|
+
"ascii",
|
|
31
|
+
"both"
|
|
32
|
+
], "Output format", { default: "both" }).string("searchPattern", "Search for this hex pattern or ASCII string in the memory range")),
|
|
33
|
+
tool("wasm_to_c", (t) => t.desc("Convert a .wasm file to C source and header.").string("inputPath", "Path to the .wasm file to convert").string("outputDir", "Directory for generated .c and .h files. If omitted, uses artifacts/wasm/").required("inputPath")),
|
|
34
|
+
tool("wasm_detect_obfuscation", (t) => t.desc("Detect obfuscation patterns in a .wasm file.").string("inputPath", "Path to the .wasm file to analyze").boolean("verbose", "Include detailed pattern evidence in output", { default: false }).required("inputPath")),
|
|
35
|
+
tool("wasm_instrument_trace", (t) => t.desc("Generate a JS instrumentation wrapper for a .wasm module.").string("inputPath", "Path to the .wasm file to instrument").array("hooks", {
|
|
36
|
+
type: "string",
|
|
37
|
+
enum: [
|
|
38
|
+
"call",
|
|
39
|
+
"memory",
|
|
40
|
+
"branch",
|
|
41
|
+
"loop",
|
|
42
|
+
"local"
|
|
43
|
+
]
|
|
44
|
+
}, "Hook types to inject").boolean("allHooks", "Inject all available hook types", { default: true }).string("outputPath", "Output JS file path. If omitted, auto-generates in artifacts/wasm/").required("inputPath"))
|
|
45
|
+
];
|
|
46
|
+
//#endregion
|
|
47
|
+
export { wasmTools as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as tool } from "./tool-builder-
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
2
|
//#region src/server/domains/browser/definitions.tools.advanced.ts
|
|
3
3
|
const advancedBrowserToolDefinitions = [tool("js_heap_search", (t) => t.desc("Search JS heap for strings matching a pattern.").string("pattern", "Pattern to search").number("maxResults", "Max matches", { default: 50 }).boolean("caseSensitive", "Case sensitive", { default: false }).required("pattern").query()), tool("tab_workflow", (t) => t.desc("Cross-tab coordination.").enum("action", [
|
|
4
4
|
"list",
|
|
@@ -8,7 +8,8 @@ const advancedBrowserToolDefinitions = [tool("js_heap_search", (t) => t.desc("Se
|
|
|
8
8
|
"wait_for",
|
|
9
9
|
"context_set",
|
|
10
10
|
"context_get",
|
|
11
|
-
"transfer"
|
|
11
|
+
"transfer",
|
|
12
|
+
"clear"
|
|
12
13
|
], "Action").string("alias", "Tab alias").string("fromAlias", "Source tab alias").number("index", "Tab index (0-based)").string("url", "URL").string("selector", "CSS selector to wait for").string("waitForText", "Text to wait for").string("key", "Context key").string("value", "Context value").string("expression", "JS expression for transfer").number("timeoutMs", "Timeout ms", { default: 1e4 }).requiredOpenWorld("action"))];
|
|
13
14
|
//#endregion
|
|
14
15
|
//#region src/server/domains/browser/definitions.tools.page-core.ts
|
|
@@ -37,6 +38,10 @@ const browserPageCoreTools = [
|
|
|
37
38
|
}).number("delay", "Delay between mousedown and mouseup in ms", {
|
|
38
39
|
minimum: 0,
|
|
39
40
|
maximum: 1e4
|
|
41
|
+
}).number("timeout", "Click timeout in ms", {
|
|
42
|
+
default: 1e4,
|
|
43
|
+
minimum: 1e3,
|
|
44
|
+
maximum: 12e4
|
|
40
45
|
}).string("frameUrl", "iframe URL substring").string("frameSelector", "iframe CSS selector").requiredOpenWorld("selector")),
|
|
41
46
|
tool("page_type", (t) => t.desc("Type text into an element.").string("selector", "CSS selector").string("text", "Text to type").number("delay", "Delay between key presses in ms", {
|
|
42
47
|
minimum: 0,
|
|
@@ -154,7 +159,7 @@ const browserRuntimeTools = [
|
|
|
154
159
|
"beta",
|
|
155
160
|
"dev",
|
|
156
161
|
"canary"
|
|
157
|
-
], "Chrome channel", { default: "stable" }).string("userDataDir", "Chrome profile directory").boolean("geoip", "Auto-resolve GeoIP (camoufox)", { default: false }).boolean("humanize", "Humanize cursor (camoufox)", { default: false }).string("proxy", "Proxy URL (camoufox)").boolean("blockImages", "Block images (camoufox)", { default: false }).boolean("blockWebrtc", "Block WebRTC (camoufox)", { default: false }).boolean("blockWebgl", "Block WebGL (camoufox)", { default: false }).string("locale", "Firefox locale (camoufox)").array("addons", { type: "string" }, "Firefox addons (camoufox)").array("fonts", { type: "string" }, "Custom fonts (camoufox)").array("excludeAddons", { type: "string" }, "Addons to exclude (camoufox)").boolean("customFontsOnly", "Only use custom fonts (camoufox)", { default: false }).object("screen", {
|
|
162
|
+
], "Chrome channel", { default: "stable" }).string("userDataDir", "Chrome profile directory").array("args", { type: "string" }, "Extra Chrome launch args").boolean("enableV8NativesSyntax", "Enable V8 native syntax for launched Chrome", { default: true }).boolean("geoip", "Auto-resolve GeoIP (camoufox)", { default: false }).boolean("humanize", "Humanize cursor (camoufox)", { default: false }).string("proxy", "Proxy URL (camoufox)").boolean("blockImages", "Block images (camoufox)", { default: false }).boolean("blockWebrtc", "Block WebRTC (camoufox)", { default: false }).boolean("blockWebgl", "Block WebGL (camoufox)", { default: false }).string("locale", "Firefox locale (camoufox)").array("addons", { type: "string" }, "Firefox addons (camoufox)").array("fonts", { type: "string" }, "Custom fonts (camoufox)").array("excludeAddons", { type: "string" }, "Addons to exclude (camoufox)").boolean("customFontsOnly", "Only use custom fonts (camoufox)", { default: false }).object("screen", {
|
|
158
163
|
width: { type: "number" },
|
|
159
164
|
height: { type: "number" }
|
|
160
165
|
}, "Screen resolution (camoufox)").object("window", {
|
|
@@ -259,6 +264,7 @@ const browserSecurityStateTools = [
|
|
|
259
264
|
//#endregion
|
|
260
265
|
//#region src/server/domains/browser/definitions.tools.behavior.ts
|
|
261
266
|
const behaviorTools = [
|
|
267
|
+
tool("captcha_solver_capabilities", (t) => t.desc("Report CAPTCHA solving mode availability.").query()),
|
|
262
268
|
tool("human_mouse", (t) => t.desc("Move mouse along a Bezier curve with jitter.").number("fromX", "Start X").number("fromY", "Start Y").number("toX", "Target X").number("toY", "Target Y").string("selector", "CSS selector (alternative to toX/toY)").number("durationMs", "Duration ms", { default: 600 }).number("steps", "Intermediate points", { default: 24 }).number("jitterPx", "Max jitter px", { default: 1.5 }).enum("curve", [
|
|
263
269
|
"ease",
|
|
264
270
|
"linear",
|
|
@@ -272,13 +278,13 @@ const behaviorTools = [
|
|
|
272
278
|
"right"
|
|
273
279
|
], "Direction", { default: "down" }).number("durationMs", "Duration ms", { default: 1500 }).number("segments", "Segments", { default: 8 }).number("pauseMs", "Pause between segments ms", { default: 80 }).number("jitter", "Variation factor 0-1", { default: .3 }).string("selector", "Scrollable container selector").openWorld()),
|
|
274
280
|
tool("human_typing", (t) => t.desc("Type text with human-like speed and occasional typos.").string("selector", "CSS selector").string("text", "Text to type").number("wpm", "Words per minute", { default: 90 }).number("errorRate", "Typo probability per char", { default: .02 }).number("correctDelayMs", "Delay before correcting typo ms", { default: 200 }).boolean("clearFirst", "Clear existing value first", { default: false }).requiredOpenWorld("selector", "text")),
|
|
275
|
-
tool("captcha_vision_solve", (t) => t.desc("Solve CAPTCHA
|
|
281
|
+
tool("captcha_vision_solve", (t) => t.desc("Solve a CAPTCHA with manual flow or a configured external service.").enum("mode", ["external_service", "manual"], "Solver mode").string("provider", "External solver provider").string("apiKey", "API key").enum("challengeType", [
|
|
276
282
|
"image",
|
|
277
283
|
"widget",
|
|
278
284
|
"browser_check",
|
|
279
285
|
"auto"
|
|
280
286
|
], "Challenge type", { default: "auto" }).string("typeHint", "Legacy alias for challengeType").string("siteKey", "Widget site key").string("pageUrl", "Page URL").number("timeoutMs", "Timeout ms", { default: 18e4 }).number("maxRetries", "Max retries", { default: 2 }).openWorld()),
|
|
281
|
-
tool("widget_challenge_solve", (t) => t.desc("Solve
|
|
287
|
+
tool("widget_challenge_solve", (t) => t.desc("Solve a widget challenge with hook, manual, or configured external service.").string("siteKey", "Widget site key").string("pageUrl", "Page URL").enum("mode", [
|
|
282
288
|
"external_service",
|
|
283
289
|
"hook",
|
|
284
290
|
"manual"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as tool } from "./tool-builder-
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
2
|
//#region src/server/domains/debugger/definitions.tools.core.ts
|
|
3
3
|
const DEBUGGER_CORE_TOOLS = [
|
|
4
4
|
tool("debugger_lifecycle", (t) => t.desc("Manage the debugger lifecycle (enable or disable)").enum("action", ["enable", "disable"], "Action to perform").required("action").idempotent()),
|
|
@@ -31,7 +31,7 @@ Types & params:
|
|
|
31
31
|
"event",
|
|
32
32
|
"event_category",
|
|
33
33
|
"exception"
|
|
34
|
-
], "Breakpoint type (default: code)", { default: "code" }).string("scriptId", "Script ID (type=code)").number("lineNumber", "Line number 0-based (type=code, action=set)").number("columnNumber", "Column number 0-based (type=code)").string("condition", "Conditional expression (type=code)").string("urlPattern", "URL pattern with wildcards (type=xhr, action=set)").string("eventName", "Event name e.g. \"click\" (type=event, action=set)").string("targetName", "Target name e.g. \"WebSocket\" (type=event)").enum("category", [
|
|
34
|
+
], "Breakpoint type (default: code)", { default: "code" }).string("url", "Script URL (type=code, alternative to scriptId)").string("scriptId", "Script ID (type=code)").number("lineNumber", "Line number 0-based (type=code, action=set)").number("columnNumber", "Column number 0-based (type=code)").string("condition", "Conditional expression (type=code)").string("urlPattern", "URL pattern with wildcards (type=xhr, action=set)").string("eventName", "Event name e.g. \"click\" (type=event, action=set)").string("targetName", "Target name e.g. \"WebSocket\" (type=event)").enum("category", [
|
|
35
35
|
"mouse",
|
|
36
36
|
"keyboard",
|
|
37
37
|
"timer",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
|
+
//#region src/server/domains/coordination/definitions.ts
|
|
3
|
+
const coordinationTools = [
|
|
4
|
+
tool("create_task_handoff", (t) => t.desc("Create an in-session task handoff.").string("description", "Task description").array("constraints", { type: "string" }, "Constraints for the specialist").string("targetDomain", "Suggested domain for the specialist").required("description")),
|
|
5
|
+
tool("complete_task_handoff", (t) => t.desc("Complete a task handoff.").string("taskId", "Task ID from create_task_handoff").string("summary", "Concise summary of what was accomplished").array("keyFindings", { type: "string" }, "Key discoveries or results").array("artifacts", { type: "string" }, "Paths to generated artifact files").required("taskId", "summary")),
|
|
6
|
+
tool("get_task_context", (t) => t.desc("Read task handoff context.").string("taskId", "Optional task ID to read a single handoff").query()),
|
|
7
|
+
tool("append_session_insight", (t) => t.desc("Append a session insight.").string("category", "Insight category").string("content", "The insight content").number("confidence", "Confidence level 0.0-1.0", {
|
|
8
|
+
minimum: 0,
|
|
9
|
+
maximum: 1,
|
|
10
|
+
default: 1
|
|
11
|
+
}).required("category", "content")),
|
|
12
|
+
tool("save_page_snapshot", (t) => t.desc("Save current page state.").string("label", "Human-readable label for this snapshot").readOnly()),
|
|
13
|
+
tool("restore_page_snapshot", (t) => t.desc("Restore a saved page snapshot.").string("snapshotId", "Snapshot ID from save_page_snapshot").required("snapshotId").idempotent()),
|
|
14
|
+
tool("list_page_snapshots", (t) => t.desc("List saved page snapshots.").query())
|
|
15
|
+
];
|
|
16
|
+
//#endregion
|
|
17
|
+
export { coordinationTools as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as tool } from "./tool-builder-
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
2
|
//#region src/server/domains/hooks/definitions.ts
|
|
3
3
|
const aiHookTools = [tool("ai_hook", (t) => t.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", [
|
|
4
4
|
"inject",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as tool } from "./tool-builder-
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
2
|
//#region src/server/domains/analysis/definitions.ts
|
|
3
3
|
const webcrackMappingsSchema = {
|
|
4
4
|
type: "array",
|
|
@@ -120,7 +120,19 @@ const coreTools = [
|
|
|
120
120
|
minimum: 1,
|
|
121
121
|
maximum: 1e4
|
|
122
122
|
}).openWorld()),
|
|
123
|
-
tool("llm_suggest_names", (t) => t.desc("Use client LLM (via MCP sampling) to suggest meaningful names for obfuscated ...").array("identifiers", { type: "string" }, "Array of obfuscated identifier names to rename").required("code", "identifiers").readOnly())
|
|
123
|
+
tool("llm_suggest_names", (t) => t.desc("Use client LLM (via MCP sampling) to suggest meaningful names for obfuscated ...").array("identifiers", { type: "string" }, "Array of obfuscated identifier names to rename").required("code", "identifiers").readOnly()),
|
|
124
|
+
tool("js_deobfuscate_jsvmp", (t) => t.desc("Deobfuscate JSVMP/VM-protected JavaScript: extract VM bytecode and restore original logic.").string("code", "Obfuscated JavaScript source containing VM/JSVMP patterns").boolean("aggressive", "Use aggressive deobfuscation strategy", { default: false }).boolean("extractInstructions", "Extract and list VM instructions", { default: true }).number("timeout", "Deobfuscation timeout in ms", {
|
|
125
|
+
default: 3e4,
|
|
126
|
+
minimum: 5e3,
|
|
127
|
+
maximum: 12e4
|
|
128
|
+
}).boolean("detectOnly", "Only detect JSVMP without deobfuscating", { default: false }).required("code")),
|
|
129
|
+
tool("js_deobfuscate_pipeline", (t) => t.desc("Three-stage deobfuscation pipeline: preprocess → deobfuscate → humanize.").string("code", "Obfuscated JavaScript source").boolean("useWebcrack", "Apply webcrack after preprocessor stage", { default: true }).boolean("aggressive", "Enable aggressive transforms in deobfuscator stage", { default: false }).boolean("humanize", "Run humanizer stage (variable renaming)", { default: true }).boolean("returnStageDetails", "Include per-stage results in output", { default: false }).required("code")),
|
|
130
|
+
tool("js_analyze_vm", (t) => t.desc("Analyze JSVMP/VM interpreter structure: dispatch type, handler table, opcode map.").string("code", "JavaScript source containing VM interpreter").boolean("extractBytecode", "Attempt to extract VM bytecode", { default: true }).boolean("mapOpcodes", "Map opcodes to inferred operations", { default: true }).required("code")),
|
|
131
|
+
tool("js_solve_constraints", (t) => t.desc("Solve opaque predicates and constant expressions in obfuscated code.").string("code", "JavaScript source with opaque predicates or constant conditions").boolean("replaceInPlace", "Replace solved conditions with their constant values", { default: true }).number("maxIterations", "Maximum solving iterations", {
|
|
132
|
+
default: 100,
|
|
133
|
+
minimum: 1,
|
|
134
|
+
maximum: 1e4
|
|
135
|
+
}).required("code"))
|
|
124
136
|
];
|
|
125
137
|
//#endregion
|
|
126
138
|
export { coreTools as t };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
|
+
//#region src/server/domains/platform/definitions.ts
|
|
3
|
+
const platformTools = [
|
|
4
|
+
tool("platform_capabilities", (t) => t.desc("Report platform tool backend availability.").query()),
|
|
5
|
+
tool("miniapp_pkg_scan", (t) => t.desc("Scan local directories for miniapp package files.").string("searchPath", "可选。指定扫描根目录;不提供时使用默认路径(MiniApp/Cache 与 MiniApp/Plugin)。")),
|
|
6
|
+
tool("miniapp_pkg_unpack", (t) => t.desc("Unpack a miniapp package.").string("inputPath", "必填。小程序包文件路径。").string("outputDir", "可选。输出目录;不提供时自动生成 artifacts 临时目录。").required("inputPath")),
|
|
7
|
+
tool("miniapp_pkg_analyze", (t) => t.desc("Analyze an unpacked miniapp package.").string("unpackedDir", "必填。已解包目录路径。").required("unpackedDir")),
|
|
8
|
+
tool("asar_extract", (t) => t.desc("Extract files from an Electron ASAR archive.").string("inputPath", "必填。asar 文件路径。").string("outputDir", "可选。提取目录;不提供时自动生成 artifacts 临时目录。").boolean("listOnly", "可选。默认 false;true 时仅列出文件清单,不执行提取。", { default: false }).required("inputPath")),
|
|
9
|
+
tool("electron_inspect_app", (t) => t.desc("Inspect an Electron app structure.").string("appPath", "Path to Electron app (.exe or app directory)").required("appPath")),
|
|
10
|
+
tool("electron_scan_userdata", (t) => t.desc("Scan a directory for Electron JSON userdata files.").string("dirPath", "Directory path to scan for JSON files").number("maxFiles", "可选。最多读取的 JSON 文件数量。默认 20。", {
|
|
11
|
+
default: 20,
|
|
12
|
+
minimum: 1,
|
|
13
|
+
maximum: 1e4
|
|
14
|
+
}).number("maxFileSizeKB", "可选。单个文件大小上限(KB)。超限文件跳过。默认 1024。", {
|
|
15
|
+
default: 1024,
|
|
16
|
+
minimum: 1,
|
|
17
|
+
maximum: 102400
|
|
18
|
+
}).required("dirPath").query()),
|
|
19
|
+
tool("asar_search", (t) => t.desc("Search text inside an ASAR archive.").string("inputPath", "必填。ASAR 文件路径。").string("pattern", "必填。正则表达式字符串。").string("fileGlob", "可选。文件扩展名过滤。默认 *.js。", { default: "*.js" }).number("maxResults", "可选。最大返回匹配数。默认 100。", {
|
|
20
|
+
default: 100,
|
|
21
|
+
minimum: 1,
|
|
22
|
+
maximum: 1e4
|
|
23
|
+
}).required("inputPath", "pattern").query()),
|
|
24
|
+
tool("electron_check_fuses", (t) => t.desc("Read Electron fuse states.").string("exePath", "必填。Electron .exe 文件路径。").required("exePath").query()),
|
|
25
|
+
tool("electron_patch_fuses", (t) => t.desc("Patch Electron fuse states.").string("exePath", "Electron .exe file path").enum("profile", ["debug", "custom"], "Patch profile. \"debug\" enables debug-related fuses. \"custom\" requires a fuses object.", { default: "debug" }).object("fuses", {}, "For profile=\"custom\". Map of fuse names to ENABLE/DISABLE. E.g. {\"RunAsNode\": \"ENABLE\"}.").boolean("createBackup", "Create a .exe.bak backup before patching.", { default: true }).required("exePath").destructive()),
|
|
26
|
+
tool("v8_bytecode_decompile", (t) => t.desc("Decompile or extract strings from V8 bytecode files.").string("filePath", "Path to .jsc bytecode file").required("filePath").query()),
|
|
27
|
+
tool("electron_launch_debug", (t) => t.desc("Launch Electron with main and renderer CDP ports.").string("exePath", "Electron .exe file path").number("mainPort", "Main process inspect port.", {
|
|
28
|
+
default: 9229,
|
|
29
|
+
minimum: 1,
|
|
30
|
+
maximum: 65535
|
|
31
|
+
}).number("rendererPort", "Renderer remote debugging port.", {
|
|
32
|
+
default: 9222,
|
|
33
|
+
minimum: 1,
|
|
34
|
+
maximum: 65535
|
|
35
|
+
}).array("args", { type: "string" }, "Extra command-line arguments.").boolean("skipFuseCheck", "Skip fuse status check.", { default: false }).number("waitMs", "Milliseconds to wait for CDP ports.", {
|
|
36
|
+
default: 8e3,
|
|
37
|
+
minimum: 1e3,
|
|
38
|
+
maximum: 12e4
|
|
39
|
+
}).requiredOpenWorld("exePath")),
|
|
40
|
+
tool("electron_debug_status", (t) => t.desc("Check status of dual-CDP debug sessions launched by electron_launch_debug.").string("sessionId", "Optional. Check specific session. Omit to list all.").query()),
|
|
41
|
+
tool("electron_ipc_sniff", (t) => t.desc("Monitor Electron IPC via renderer-side hooks.").enum("action", [
|
|
42
|
+
"start",
|
|
43
|
+
"dump",
|
|
44
|
+
"stop",
|
|
45
|
+
"list",
|
|
46
|
+
"guide"
|
|
47
|
+
], "Action to perform.", { default: "guide" }).number("port", "Renderer CDP port (--remote-debugging-port).", {
|
|
48
|
+
default: 9222,
|
|
49
|
+
minimum: 1,
|
|
50
|
+
maximum: 65535
|
|
51
|
+
}).string("sessionId", "Session ID for dump/stop.").boolean("clear", "Clear captured messages after dump.", { default: true }).openWorld())
|
|
52
|
+
];
|
|
53
|
+
//#endregion
|
|
54
|
+
export { platformTools as t };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
|
+
//#region src/server/domains/sourcemap/definitions.ts
|
|
3
|
+
const sourcemapTools = [
|
|
4
|
+
tool("sourcemap_discover", (t) => t.desc("Discover source maps on the current page.").boolean("includeInline", "Include inline data: source maps.", { default: true })),
|
|
5
|
+
tool("sourcemap_fetch_and_parse", (t) => t.desc("Parse a source map.").string("sourceMapUrl", "Source map URL.").string("scriptUrl", "Script URL for relative map resolution.").required("sourceMapUrl")),
|
|
6
|
+
tool("sourcemap_reconstruct_tree", (t) => t.desc("Reconstruct source files from a source map.").string("sourceMapUrl", "Source map URL.").string("outputDir", "Output directory under the project root.").required("sourceMapUrl")),
|
|
7
|
+
tool("sourcemap_parse_v4", (t) => t.desc("Parse source map with ECMA-426 v4 scope/debug-id support; falls back to v3.").string("sourceMapUrl", "Source map URL to parse.").boolean("extractScopes", "Extract and decode scope information from v4 x_scopes field", { default: true }).boolean("extractDebugIds", "Extract debug-id mappings for source correlation", { default: true }).boolean("compareV3", "Compare v4 fields against v3 baseline and report differences", { default: false }).required("sourceMapUrl"))
|
|
8
|
+
];
|
|
9
|
+
//#endregion
|
|
10
|
+
export { sourcemapTools as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as tool } from "./tool-builder-
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
2
|
//#region src/server/domains/process/definitions.ts
|
|
3
3
|
/**
|
|
4
4
|
* Process Manager Tool Definitions
|
|
@@ -12,9 +12,9 @@ const processToolDefinitions = [
|
|
|
12
12
|
minimum: 1,
|
|
13
13
|
maximum: 65535
|
|
14
14
|
}).array("args", { type: "string" }, "Additional command line arguments").required("executablePath")),
|
|
15
|
-
tool("memory_read", (t) => t.desc("Read memory from a process at a specific address. Requires elevated privileges.").string("address", "Memory address to read (hex string like \"0x12345678\")").number("size", "Number of bytes to read").required("pid", "address", "size")),
|
|
16
|
-
tool("memory_write", (t) => t.desc("Write data to process memory at a specific address. Requires elevated privileges.").string("address", "Memory address to write to (hex string like \"0x12345678\")").string("data", "Data to write (hex string or base64)").enum("encoding", ["hex", "base64"], "Encoding of the data parameter", { default: "hex" }).required("pid", "address", "data")),
|
|
17
|
-
tool("memory_scan", (t) => t.desc("Scan process memory for a pattern or value. Requires elevated privileges.").string("pattern", "Pattern to search for (hex bytes like \"48 8B 05\" or value)").enum("patternType", [
|
|
15
|
+
tool("memory_read", (t) => t.desc("Read memory from a process at a specific address. Requires elevated privileges.").number("pid", "Target process ID").string("address", "Memory address to read (hex string like \"0x12345678\")").number("size", "Number of bytes to read").required("pid", "address", "size")),
|
|
16
|
+
tool("memory_write", (t) => t.desc("Write data to process memory at a specific address. Requires elevated privileges.").number("pid", "Target process ID").string("address", "Memory address to write to (hex string like \"0x12345678\")").string("data", "Data to write (hex string or base64)").enum("encoding", ["hex", "base64"], "Encoding of the data parameter", { default: "hex" }).required("pid", "address", "data")),
|
|
17
|
+
tool("memory_scan", (t) => t.desc("Scan process memory for a pattern or value. Requires elevated privileges.").number("pid", "Target process ID").string("pattern", "Pattern to search for (hex bytes like \"48 8B 05\" or value)").enum("patternType", [
|
|
18
18
|
"hex",
|
|
19
19
|
"int32",
|
|
20
20
|
"int64",
|
|
@@ -22,8 +22,8 @@ const processToolDefinitions = [
|
|
|
22
22
|
"double",
|
|
23
23
|
"string"
|
|
24
24
|
], "Type of pattern to search", { default: "hex" }).boolean("suspendTarget", "Suspend the target process during scan for a consistent memory snapshot (default: false)", { default: false }).required("pid", "pattern")),
|
|
25
|
-
tool("memory_check_protection", (t) => t.desc("Check memory protection flags at a specific address.").string("address", "Memory address to check (hex string like \"0x12345678\")").required("pid", "address")),
|
|
26
|
-
tool("memory_scan_filtered", (t) => t.desc("Scan memory within a filtered set of addresses (secondary scan).").string("pattern", "Pattern to search for").array("addresses", { type: "string" }, "List of addresses to scan within (from previous scan)").enum("patternType", [
|
|
25
|
+
tool("memory_check_protection", (t) => t.desc("Check memory protection flags at a specific address.").number("pid", "Target process ID").string("address", "Memory address to check (hex string like \"0x12345678\")").required("pid", "address")),
|
|
26
|
+
tool("memory_scan_filtered", (t) => t.desc("Scan memory within a filtered set of addresses (secondary scan).").number("pid", "Target process ID").string("pattern", "Pattern to search for").array("addresses", { type: "string" }, "List of addresses to scan within (from previous scan)").enum("patternType", [
|
|
27
27
|
"hex",
|
|
28
28
|
"int32",
|
|
29
29
|
"int64",
|
|
@@ -53,11 +53,14 @@ const processToolDefinitions = [
|
|
|
53
53
|
tool("memory_dump_region", (t) => t.desc("Dump a memory region to a file for analysis.").number("pid", "Target process ID").string("address", "Start address (hex)").number("size", "Number of bytes to dump").string("outputPath", "Output file path").required("pid", "address", "size", "outputPath")),
|
|
54
54
|
tool("memory_list_regions", (t) => t.desc("List all memory regions in a process with protection flags.").number("pid", "Target process ID").required("pid")),
|
|
55
55
|
tool("memory_audit_export", (t) => t.desc("Export the in-memory audit trail for memory operations as JSON.")),
|
|
56
|
-
tool("inject_dll", (t) => t.desc("Inject a DLL into a target process using CreateRemoteThread + LoadLibraryA (W...").string("dllPath", "Full path to the DLL file to inject").required("pid", "dllPath")),
|
|
57
|
-
tool("inject_shellcode", (t) => t.desc("Inject and execute shellcode in a target process.").string("shellcode", "Shellcode bytes (hex string or base64)").enum("encoding", ["hex", "base64"], "Encoding of shellcode", { default: "hex" }).required("pid", "shellcode")),
|
|
56
|
+
tool("inject_dll", (t) => t.desc("Inject a DLL into a target process using CreateRemoteThread + LoadLibraryA (W...").number("pid", "Target process ID").string("dllPath", "Full path to the DLL file to inject").required("pid", "dllPath")),
|
|
57
|
+
tool("inject_shellcode", (t) => t.desc("Inject and execute shellcode in a target process.").number("pid", "Target process ID").string("shellcode", "Shellcode bytes (hex string or base64)").enum("encoding", ["hex", "base64"], "Encoding of shellcode", { default: "hex" }).required("pid", "shellcode")),
|
|
58
58
|
tool("check_debug_port", (t) => t.desc("Check if a process is being debugged using NtQueryInformationProcess (ProcessDebugPort).").number("pid", "Target process ID").required("pid")),
|
|
59
59
|
tool("enumerate_modules", (t) => t.desc("List all loaded modules (DLLs) in a process with their base addresses.").number("pid", "Target process ID").required("pid")),
|
|
60
|
-
tool("electron_attach", (t) => t.desc("
|
|
60
|
+
tool("electron_attach", (t) => t.desc("Attach to an Electron CDP port and optionally evaluate in a matching page.").number("port", "CDP port to connect to", {
|
|
61
|
+
minimum: 1,
|
|
62
|
+
maximum: 65535
|
|
63
|
+
}).string("pageUrl", "Optional URL substring used to pick the target page").string("evaluate", "Optional JavaScript expression to evaluate in the selected page").string("wsEndpoint", "Optional browser WebSocket endpoint override"))
|
|
61
64
|
];
|
|
62
65
|
//#endregion
|
|
63
66
|
export { processToolDefinitions as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as tool } from "./tool-builder-
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
2
|
//#region src/server/domains/maintenance/definitions.ts
|
|
3
3
|
const tokenBudgetTools = [
|
|
4
4
|
tool("get_token_budget_stats", (t) => t.desc("Get token budget usage stats, warnings, and optimization suggestions").query()),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as tool } from "./tool-builder-
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
2
|
//#region src/server/domains/encoding/definitions.ts
|
|
3
3
|
const encodingTools = [
|
|
4
|
-
tool("binary_detect_format", (t) => t.desc("Detect binary payload format
|
|
4
|
+
tool("binary_detect_format", (t) => t.desc("Detect binary payload format and encoding signals.").enum("source", [
|
|
5
5
|
"base64",
|
|
6
6
|
"hex",
|
|
7
7
|
"file",
|
|
8
8
|
"raw"
|
|
9
|
-
], "How to interpret input payload").string("filePath", "File path when source=file").string("requestId", "Captured
|
|
9
|
+
], "How to interpret input payload").string("data", "Input payload for base64/hex/raw sources").string("filePath", "File path when source=file").string("requestId", "Captured requestId when a response body is available").required("source").query()),
|
|
10
10
|
tool("binary_decode", (t) => t.desc("Decode binary payloads into hex, utf8, or json output").string("data", "Input encoded payload").enum("encoding", [
|
|
11
11
|
"base64",
|
|
12
12
|
"hex",
|
|
@@ -17,7 +17,7 @@ const encodingTools = [
|
|
|
17
17
|
"hex",
|
|
18
18
|
"utf8",
|
|
19
19
|
"json"
|
|
20
|
-
], "Target output format", { default: "hex" }).required("data", "encoding")),
|
|
20
|
+
], "Target output format", { default: "hex" }).required("data", "encoding").query()),
|
|
21
21
|
tool("binary_encode", (t) => t.desc("Encode utf8/hex/json input into base64/hex/url output").string("data", "Input payload").enum("inputFormat", [
|
|
22
22
|
"utf8",
|
|
23
23
|
"hex",
|
|
@@ -26,13 +26,13 @@ const encodingTools = [
|
|
|
26
26
|
"base64",
|
|
27
27
|
"hex",
|
|
28
28
|
"url"
|
|
29
|
-
], "Desired output encoding").required("data", "inputFormat", "outputEncoding")),
|
|
30
|
-
tool("binary_entropy_analysis", (t) => t.desc("Compute
|
|
29
|
+
], "Desired output encoding").required("data", "inputFormat", "outputEncoding").query()),
|
|
30
|
+
tool("binary_entropy_analysis", (t) => t.desc("Compute entropy and byte frequency for a payload.").enum("source", [
|
|
31
31
|
"base64",
|
|
32
32
|
"hex",
|
|
33
33
|
"raw",
|
|
34
34
|
"file"
|
|
35
|
-
], "How to interpret input payload").string("filePath", "File path when source=file").number("blockSize", "Block size for per-block entropy", {
|
|
35
|
+
], "How to interpret input payload").string("data", "Input payload for base64/hex/raw sources").string("filePath", "File path when source=file").number("blockSize", "Block size for per-block entropy", {
|
|
36
36
|
default: 256,
|
|
37
37
|
minimum: 16,
|
|
38
38
|
maximum: 8192
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as tool } from "./tool-builder-
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
2
|
//#region src/server/domains/antidebug/definitions.ts
|
|
3
3
|
const antidebugTools = [tool("antidebug_bypass", (t) => t.desc("Bypass one or more anti-debug protection types. Specify types to apply; omit or use [\"all\"] to apply all bypasses. Types: all, debugger_statement, timing, stack_trace, console_detect.").array("types", {
|
|
4
4
|
type: "string",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
|
+
//#region src/server/domains/shared-state-board/definitions.ts
|
|
3
|
+
const sharedStateBoardTools = [
|
|
4
|
+
tool("state_board", (t) => t.desc("Manage shared state board entries.").enum("action", [
|
|
5
|
+
"set",
|
|
6
|
+
"get",
|
|
7
|
+
"delete",
|
|
8
|
+
"list",
|
|
9
|
+
"history",
|
|
10
|
+
"clear"
|
|
11
|
+
], "Operation to perform").string("key", "Key name (required for set/get/delete/history)").prop("value", {
|
|
12
|
+
type: "object",
|
|
13
|
+
description: "Value to store"
|
|
14
|
+
}).string("namespace", "Namespace for key isolation").number("ttlSeconds", "TTL in seconds").boolean("includeValues", "Include current values in list results", { default: false }).number("limit", "Maximum history entries to return", { default: 50 }).string("keyPattern", "Key pattern filter").required("action")),
|
|
15
|
+
tool("state_board_watch", (t) => t.desc("Start, poll, or stop shared state board watches.").enum("action", [
|
|
16
|
+
"start",
|
|
17
|
+
"poll",
|
|
18
|
+
"stop"
|
|
19
|
+
], "Watch operation: start watching, poll for changes, or stop watching").string("key", "Key or pattern to watch").string("namespace", "Namespace").number("pollIntervalMs", "Polling interval in milliseconds").string("watchId", "Watch ID").required("action")),
|
|
20
|
+
tool("state_board_io", (t) => t.desc("Export or import state board entries.").enum("action", ["export", "import"], "IO operation").string("namespace", "Namespace filter or target namespace").string("keyPattern", "Key pattern filter").prop("data", {
|
|
21
|
+
type: "object",
|
|
22
|
+
description: "Entries to import"
|
|
23
|
+
}).boolean("overwrite", "Overwrite existing keys on import").required("action"))
|
|
24
|
+
];
|
|
25
|
+
//#endregion
|
|
26
|
+
export { sharedStateBoardTools as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as tool } from "./tool-builder-
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
2
|
//#region src/server/domains/streaming/definitions.ts
|
|
3
3
|
const streamingTools = [
|
|
4
4
|
tool("ws_monitor", (t) => t.desc("Enable or disable WebSocket frame capture via CDP Network events.").enum("action", ["enable", "disable"], "Monitor action").string("urlFilter", "Regex filter for WebSocket URL (action=enable)").number("maxFrames", "Maximum frames in memory (action=enable, default: 1000)", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as tool } from "./tool-builder-
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
2
|
//#region src/server/domains/graphql/definitions.ts
|
|
3
3
|
const graphqlTools = [
|
|
4
4
|
tool("call_graph_analyze", (t) => t.desc("Analyze runtime function call graph from in-page traces").number("maxDepth", "Maximum stack-derived edge depth", { default: 5 }).string("filterPattern", "Regex filter for function names").query()),
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { t as tool } from "./tool-builder-BHJp32mV.mjs";
|
|
2
|
+
//#region src/server/domains/proxy/definitions.ts
|
|
3
|
+
const PROXY_TOOLS = [
|
|
4
|
+
tool("proxy_start", (t) => t.desc("Start the local HTTP/HTTPS proxy.").number("port", "Listen port.", { default: 8080 }).boolean("useHttps", "Enable HTTPS interception.", { default: true })),
|
|
5
|
+
tool("proxy_stop", (t) => t.desc("Stop the proxy.").destructive()),
|
|
6
|
+
tool("proxy_status", (t) => t.desc("Read proxy status and CA path.").query()),
|
|
7
|
+
tool("proxy_export_ca", (t) => t.desc("Read the proxy CA certificate.").query()),
|
|
8
|
+
tool("proxy_add_rule", (t) => t.desc("Add a proxy rule.").string("action", "Rule action: forward, mock_response, or block.").string("method", "HTTP method to match.", { default: "GET" }).string("urlPattern", "URL matcher string or regex literal.").number("mockStatus", "Response status for mock_response.", { default: 200 }).string("mockBody", "Response body for mock_response.").required("action")),
|
|
9
|
+
tool("proxy_get_requests", (t) => t.desc("Read captured proxy requests.").string("urlFilter", "Optional URL filter.").query()),
|
|
10
|
+
tool("proxy_clear_logs", (t) => t.desc("Clear captured proxy logs.").resettable()),
|
|
11
|
+
tool("proxy_setup_adb_device", (t) => t.desc("Configure an Android device to use the proxy.").string("deviceSerial", "ADB device serial."))
|
|
12
|
+
];
|
|
13
|
+
//#endregion
|
|
14
|
+
export { PROXY_TOOLS as t };
|