@jshookmcp/jshook 0.2.8 → 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.
Files changed (162) hide show
  1. package/README.md +36 -5
  2. package/README.zh.md +36 -5
  3. package/dist/{AntiCheatDetector-S8VRj-dD.mjs → AntiCheatDetector-CqGDXmfc.mjs} +160 -54
  4. package/dist/{CodeInjector-4Z3ngPoX.mjs → CodeInjector-BdjRfNx7.mjs} +5 -5
  5. package/dist/ConsoleMonitor-DykL3IAw.mjs +2269 -0
  6. package/dist/{DarwinAPI-B8hg_yhz.mjs → DarwinAPI-ETyy0xyo.mjs} +1 -1
  7. package/dist/DetailedDataManager-HT49OrvF.mjs +217 -0
  8. package/dist/EventBus-DFKvADm3.mjs +141 -0
  9. package/dist/EvidenceGraphBridge-318Oi0Lf.mjs +153 -0
  10. package/dist/{ExtensionManager-D5-bO9D8.mjs → ExtensionManager-BDMsY2Dz.mjs} +27 -13
  11. package/dist/{FingerprintManager-BVxFJL2-.mjs → FingerprintManager-BN4UQWnX.mjs} +1 -1
  12. package/dist/{HardwareBreakpoint-DK1yjWkV.mjs → HardwareBreakpoint-Cc2AFq1Y.mjs} +3 -3
  13. package/dist/{HeapAnalyzer-CEbo10xU.mjs → HeapAnalyzer-DruMgsgj.mjs} +21 -21
  14. package/dist/HookGeneratorBuilders.core.generators.storage-CTbB4Lcx.mjs +566 -0
  15. package/dist/InstrumentationSession-DLH0vd-z.mjs +244 -0
  16. package/dist/{MemoryController-DdtnBdD4.mjs → MemoryController-CMtviNW_.mjs} +3 -3
  17. package/dist/{MemoryScanSession-RMixN3bX.mjs → MemoryScanSession-ITgb_NMi.mjs} +81 -78
  18. package/dist/{MemoryScanner-QjK4ld0B.mjs → MemoryScanner-CiL7Z3ey.mjs} +50 -21
  19. package/dist/{NativeMemoryManager.impl-CB6gJ0NM.mjs → NativeMemoryManager.impl-D9Lkovvn.mjs} +20 -56
  20. package/dist/{NativeMemoryManager.utils-BML4q1ry.mjs → NativeMemoryManager.utils-BBlAixF5.mjs} +1 -1
  21. package/dist/{PEAnalyzer-CK0xe0Fs.mjs → PEAnalyzer-DMQ44gen.mjs} +16 -16
  22. package/dist/PageController-BPJNqqBN.mjs +431 -0
  23. package/dist/{PointerChainEngine-Cd73qu5b.mjs → PointerChainEngine-K7wN8Z-w.mjs} +10 -7
  24. package/dist/PrerequisiteError-TuyZIs6n.mjs +20 -0
  25. package/dist/ProcessRegistry-zGg12QbE.mjs +74 -0
  26. package/dist/ResponseBuilder-CJXWmWNw.mjs +143 -0
  27. package/dist/ReverseEvidenceGraph-C02-gXOh.mjs +269 -0
  28. package/dist/ScriptManager-ZuWD-0Jg.mjs +3003 -0
  29. package/dist/{Speedhack-CeF0XmEz.mjs → Speedhack-D-z0umeT.mjs} +2 -2
  30. package/dist/{StructureAnalyzer-D4GkMduU.mjs → StructureAnalyzer-Cav5AVSL.mjs} +9 -6
  31. package/dist/ToolCatalog-5OJdMiF0.mjs +582 -0
  32. package/dist/ToolError-jh9whhMd.mjs +15 -0
  33. package/dist/ToolProbe-DbCFGyrg.mjs +45 -0
  34. package/dist/ToolRegistry-B9krbTtI.mjs +180 -0
  35. package/dist/ToolRouter.policy-BGDAGyeH.mjs +344 -0
  36. package/dist/TraceRecorder-B41Z5XBj.mjs +1286 -0
  37. package/dist/{Win32API-Bc0QnQsN.mjs → Win32API-C2kjj0ze.mjs} +19 -13
  38. package/dist/{Win32Debug-DUHt9XUn.mjs → Win32Debug-CKrGOTpo.mjs} +3 -3
  39. package/dist/WorkflowEngine-DJ6M4opp.mjs +569 -0
  40. package/dist/analysis-BHeJW2Nb.mjs +1234 -0
  41. package/dist/antidebug-BRKeyt27.mjs +1081 -0
  42. package/dist/artifactRetention-CPXkUJXp.mjs +598 -0
  43. package/dist/artifacts-DkfosXH3.mjs +59 -0
  44. package/dist/authorization-schema-DRqyJMSk.mjs +31 -0
  45. package/dist/betterSqlite3-DLSBZodi.mjs +74 -0
  46. package/dist/binary-instrument--V3MAhJ4.mjs +971 -0
  47. package/dist/bind-helpers-ClV34xdn.mjs +42 -0
  48. package/dist/boringssl-inspector-Bo_LOLaS.mjs +180 -0
  49. package/dist/browser-Dx3_S2cG.mjs +4369 -0
  50. package/dist/capabilities-CcHlvWgK.mjs +33 -0
  51. package/dist/concurrency-Drev_Vz9.mjs +41 -0
  52. package/dist/{constants-CCvsN80K.mjs → constants-CDZLOoVv.mjs} +105 -48
  53. package/dist/coordination-DgItD9DL.mjs +259 -0
  54. package/dist/debugger-RS3RSAqs.mjs +1288 -0
  55. package/dist/definitions-BEoYofW5.mjs +47 -0
  56. package/dist/definitions-BRaefg3u.mjs +365 -0
  57. package/dist/definitions-BbkvZkiv.mjs +96 -0
  58. package/dist/definitions-BtWSHJ3o.mjs +17 -0
  59. package/dist/definitions-C1gCHO0i.mjs +43 -0
  60. package/dist/definitions-CDOg_b-l.mjs +138 -0
  61. package/dist/definitions-CVPD9hzZ.mjs +54 -0
  62. package/dist/definitions-Cea8Lgl7.mjs +94 -0
  63. package/dist/definitions-DAgIyjxM.mjs +10 -0
  64. package/dist/definitions-DJA27nsL.mjs +66 -0
  65. package/dist/definitions-DKPFU3LW.mjs +25 -0
  66. package/dist/definitions-DPRpZQ96.mjs +47 -0
  67. package/dist/definitions-DUE5gmdn.mjs +18 -0
  68. package/dist/definitions-DYVjOtxa.mjs +26 -0
  69. package/dist/definitions-DcYLVLCo.mjs +37 -0
  70. package/dist/definitions-Pp5LI2H4.mjs +27 -0
  71. package/dist/definitions-j9KdHVNR.mjs +14 -0
  72. package/dist/definitions-uzkjBwa7.mjs +258 -0
  73. package/dist/definitions-va-AnLuQ.mjs +28 -0
  74. package/dist/encoding-DJeqHmpd.mjs +1079 -0
  75. package/dist/evidence-graph-bridge-DcYizFk2.mjs +136 -0
  76. package/dist/{factory-CibqTNC8.mjs → factory-C90tBff6.mjs} +41 -56
  77. package/dist/flat-target-session-Dgax2Cy3.mjs +29 -0
  78. package/dist/graphql-CoHrhweh.mjs +1197 -0
  79. package/dist/handlers-4jmR0nMs.mjs +898 -0
  80. package/dist/handlers-BAHPxcch.mjs +789 -0
  81. package/dist/handlers-BOs9b907.mjs +2600 -0
  82. package/dist/handlers-BWXEy6ef.mjs +917 -0
  83. package/dist/handlers-Bndn6QvE.mjs +111 -0
  84. package/dist/handlers-BqC4bD4s.mjs +681 -0
  85. package/dist/handlers-BtYq60bM2.mjs +276 -0
  86. package/dist/handlers-BzgcB4iv.mjs +799 -0
  87. package/dist/handlers-CRyRWj2b.mjs +859 -0
  88. package/dist/handlers-CVv2H1uq.mjs +592 -0
  89. package/dist/handlers-Dl5a7JS4.mjs +572 -0
  90. package/dist/handlers-Dx2d7jt7.mjs +2537 -0
  91. package/dist/handlers-Dz9PYsCa.mjs +2805 -0
  92. package/dist/handlers-HujRKC3b.mjs +661 -0
  93. package/dist/handlers.impl-XWXkQfyi.mjs +807 -0
  94. package/dist/hooks-B1B8NRHL.mjs +898 -0
  95. package/dist/index.mjs +491 -259
  96. package/dist/{logger-BmWzC2lM.mjs → logger-Dh_xb7_2.mjs} +14 -6
  97. package/dist/maintenance-PRMkLVRW.mjs +835 -0
  98. package/dist/manifest-67Bok-Si.mjs +58 -0
  99. package/dist/manifest-6lNTMZAB2.mjs +87 -0
  100. package/dist/manifest-B2duEHiH.mjs +90 -0
  101. package/dist/manifest-B6EY9Vm8.mjs +57 -0
  102. package/dist/manifest-B6nKSbyY.mjs +95 -0
  103. package/dist/manifest-BL8AQNPF.mjs +106 -0
  104. package/dist/manifest-BSZvJJmV.mjs +47 -0
  105. package/dist/manifest-BU7qzUyX.mjs +418 -0
  106. package/dist/manifest-Bl62e8WK.mjs +49 -0
  107. package/dist/manifest-Bo5cXjdt.mjs +82 -0
  108. package/dist/manifest-BpS4gtUK.mjs +1347 -0
  109. package/dist/manifest-Bv65_e2W.mjs +101 -0
  110. package/dist/manifest-BytNIF4Z.mjs +117 -0
  111. package/dist/manifest-C-xtsjS3.mjs +81 -0
  112. package/dist/manifest-CDYl7OhA.mjs +66 -0
  113. package/dist/manifest-CRZ3xmkD.mjs +61 -0
  114. package/dist/manifest-CoW6u4Tp.mjs +132 -0
  115. package/dist/manifest-Cq5zN_8A.mjs +50 -0
  116. package/dist/manifest-D7YZM_2e.mjs +194 -0
  117. package/dist/manifest-DE_VrAeQ.mjs +314 -0
  118. package/dist/manifest-DGsXSCpT.mjs +39 -0
  119. package/dist/manifest-DJ2vfEuW.mjs +156 -0
  120. package/dist/manifest-DPXDYhEu.mjs +80 -0
  121. package/dist/manifest-Dd4fQb0a.mjs +322 -0
  122. package/dist/manifest-Deq6opGg.mjs +223 -0
  123. package/dist/manifest-DfJTafJK.mjs +37 -0
  124. package/dist/manifest-DgOdgN_j.mjs +50 -0
  125. package/dist/manifest-DlbMW4v4.mjs +47 -0
  126. package/dist/manifest-DmVfbH0w.mjs +374 -0
  127. package/dist/manifest-Dog6Ddjr.mjs +109 -0
  128. package/dist/manifest-DvgU5FWb.mjs +58 -0
  129. package/dist/manifest-HsfDBs7j.mjs +50 -0
  130. package/dist/manifest-I8oQHvCG.mjs +186 -0
  131. package/dist/manifest-NvH_a-av.mjs +786 -0
  132. package/dist/manifest-cEJU1v0Z.mjs +129 -0
  133. package/dist/manifest-wOl5XLB12.mjs +112 -0
  134. package/dist/modules-tZozf0LQ.mjs +10635 -0
  135. package/dist/mojo-ipc-DXNEXEqb.mjs +640 -0
  136. package/dist/network-CPVvwvFg.mjs +3852 -0
  137. package/dist/{artifacts-BbdOMET5.mjs → outputPaths-um7lCRY3.mjs} +219 -216
  138. package/dist/parse-args-B4cY5Vx5.mjs +39 -0
  139. package/dist/platform-CYeFoTWp.mjs +2161 -0
  140. package/dist/process-BTbgcVc6.mjs +1306 -0
  141. package/dist/proxy-r8YN6nP1.mjs +192 -0
  142. package/dist/registry-Bl8ZQW61.mjs +34 -0
  143. package/dist/response-CWhh2aLo.mjs +34 -0
  144. package/dist/server/plugin-api.mjs +2 -2
  145. package/dist/shared-state-board-BoZnSoj-.mjs +586 -0
  146. package/dist/sourcemap-BIDHUVXy.mjs +934 -0
  147. package/dist/ssrf-policy-Dsqd-DTX.mjs +166 -0
  148. package/dist/streaming-Dal6utPp.mjs +725 -0
  149. package/dist/tool-builder-BHJp32mV.mjs +186 -0
  150. package/dist/transform-DRVgGG90.mjs +1011 -0
  151. package/dist/types-Bx92KJfT.mjs +4 -0
  152. package/dist/wasm-BYx5UOeG.mjs +1044 -0
  153. package/dist/webcrack-Be0_FccV.mjs +747 -0
  154. package/dist/workflow-BpuKEtvn.mjs +725 -0
  155. package/package.json +82 -49
  156. package/dist/ExtensionManager-CPTJhHFg.mjs +0 -2
  157. package/dist/ToolCatalog-Bq4V2sbJ.mjs +0 -67201
  158. package/dist/{CacheAdapters-CzFNpD9a.mjs → CacheAdapters-jJFy20G-.mjs} +0 -0
  159. package/dist/{StealthVerifier-BzBCFiwx.mjs → StealthVerifier-BWmPgQsv.mjs} +0 -0
  160. package/dist/{VersionDetector-CNXcvD46.mjs → VersionDetector-K3V4vGsw.mjs} +0 -0
  161. package/dist/{formatAddress-ChCSIRWT.mjs → formatAddress-nnMvEohD.mjs} +0 -0
  162. package/dist/{types-BBjOqye-.mjs → types-DDBWs9UP.mjs} +1 -1
@@ -1,23 +1,29 @@
1
- import { t as __exportAll } from "./chunk-CjcI7cDX.mjs";
2
- import { Tn as SEARCH_VECTOR_MODEL_ID, bn as SEARCH_VECTOR_DYNAMIC_WEIGHT, xn as SEARCH_VECTOR_ENABLED, yn as SEARCH_VECTOR_COSINE_WEIGHT } from "./constants-CCvsN80K.mjs";
1
+ import { $n as SEARCH_VECTOR_DYNAMIC_WEIGHT, Qn as SEARCH_VECTOR_COSINE_WEIGHT, er as SEARCH_VECTOR_ENABLED, ir as SEARCH_VECTOR_MODEL_ID } from "./constants-CDZLOoVv.mjs";
3
2
  import { homedir } from "node:os";
4
- import { mkdir } from "node:fs/promises";
3
+ import { z } from "zod";
5
4
  import { basename, dirname, extname, isAbsolute, join, normalize, relative, resolve, sep } from "node:path";
6
5
  import { fileURLToPath } from "node:url";
6
+ import { mkdir } from "node:fs/promises";
7
7
  import { config } from "dotenv";
8
- import { z } from "zod";
9
8
  const DEFAULT_SEARCH_CONFIG = {
10
9
  queryCategoryProfiles: [
11
10
  {
12
11
  pattern: "(?:security|vuln|xss|injection|csrf|exploit|attack|prototype\\s*pollution|漏洞|安全|注入|攻击)",
13
12
  flags: "i",
14
- domainBoosts: [{
15
- domain: "security",
16
- weight: 1.6
17
- }, {
18
- domain: "analysis",
19
- weight: 1.2
20
- }]
13
+ domainBoosts: [
14
+ {
15
+ domain: "hooks",
16
+ weight: 1.35
17
+ },
18
+ {
19
+ domain: "antidebug",
20
+ weight: 1.2
21
+ },
22
+ {
23
+ domain: "core",
24
+ weight: 1.1
25
+ }
26
+ ]
21
27
  },
22
28
  {
23
29
  pattern: "(?:debug|breakpoint|pause|step\\s*over|step\\s*into|stack\\s*trace|断点|调试|单步)",
@@ -26,7 +32,7 @@ const DEFAULT_SEARCH_CONFIG = {
26
32
  domain: "debugger",
27
33
  weight: 1.6
28
34
  }, {
29
- domain: "runtime",
35
+ domain: "v8-inspector",
30
36
  weight: 1.2
31
37
  }]
32
38
  },
@@ -48,20 +54,27 @@ const DEFAULT_SEARCH_CONFIG = {
48
54
  domain: "transform",
49
55
  weight: 1.6
50
56
  }, {
51
- domain: "analysis",
57
+ domain: "core",
52
58
  weight: 1.2
53
59
  }]
54
60
  },
55
61
  {
56
62
  pattern: "(?:memory|heap|dump|scan|inject|内存|堆|扫描)",
57
63
  flags: "i",
58
- domainBoosts: [{
59
- domain: "memory",
60
- weight: 1.6
61
- }, {
62
- domain: "native",
63
- weight: 1.2
64
- }]
64
+ domainBoosts: [
65
+ {
66
+ domain: "memory",
67
+ weight: 1.6
68
+ },
69
+ {
70
+ domain: "process",
71
+ weight: 1.15
72
+ },
73
+ {
74
+ domain: "binary-instrument",
75
+ weight: 1.1
76
+ }
77
+ ]
65
78
  },
66
79
  {
67
80
  pattern: "(?:wasm|webassembly)",
@@ -83,11 +96,8 @@ const DEFAULT_SEARCH_CONFIG = {
83
96
  pattern: "(?:captcha|人机验证|验证码|图形验证)",
84
97
  flags: "i",
85
98
  domainBoosts: [{
86
- domain: "captcha",
87
- weight: 1.6
88
- }, {
89
99
  domain: "browser",
90
- weight: 1.1
100
+ weight: 1.65
91
101
  }]
92
102
  },
93
103
  {
@@ -97,7 +107,106 @@ const DEFAULT_SEARCH_CONFIG = {
97
107
  domain: "workflow",
98
108
  weight: 1.8
99
109
  }, {
100
- domain: "analysis",
110
+ domain: "core",
111
+ weight: 1.1
112
+ }]
113
+ },
114
+ {
115
+ pattern: "(?:v8|heap\\s?(?:snapshot|dump|profile)|bytecode|jit|turbofan|ignition|hidden\\s?class)",
116
+ flags: "i",
117
+ domainBoosts: [{
118
+ domain: "v8-inspector",
119
+ weight: 1.6
120
+ }, {
121
+ domain: "memory",
122
+ weight: 1.2
123
+ }]
124
+ },
125
+ {
126
+ pattern: "(?:tls|ssl|boringssl|cert(?:ificate)?|pinning|handshake|keylog|nss)",
127
+ flags: "i",
128
+ domainBoosts: [{
129
+ domain: "boringssl-inspector",
130
+ weight: 1.6
131
+ }, {
132
+ domain: "network",
133
+ weight: 1.1
134
+ }]
135
+ },
136
+ {
137
+ pattern: "(?:skia|gpu|render|scenegraph|scene\\s?tree|raster|draw\\s?call|layer)",
138
+ flags: "i",
139
+ domainBoosts: [{
140
+ domain: "skia-capture",
141
+ weight: 1.6
142
+ }, {
143
+ domain: "browser",
144
+ weight: 1.1
145
+ }]
146
+ },
147
+ {
148
+ pattern: "(?:frida|ghidra|ida|unidbg|jadx|disassemble|instrument)",
149
+ flags: "i",
150
+ domainBoosts: [{
151
+ domain: "binary-instrument",
152
+ weight: 1.6
153
+ }, {
154
+ domain: "memory",
155
+ weight: 1.2
156
+ }]
157
+ },
158
+ {
159
+ pattern: "(?:adb|android|webview|apk|dalvik|art\\s?(?:runtime)?)",
160
+ flags: "i",
161
+ domainBoosts: [{
162
+ domain: "adb-bridge",
163
+ weight: 1.6
164
+ }, {
165
+ domain: "browser",
166
+ weight: 1.1
167
+ }]
168
+ },
169
+ {
170
+ pattern: "(?:mojo|ipc|chromium.*ipc|broker|chromium.*interface)",
171
+ flags: "i",
172
+ domainBoosts: [{
173
+ domain: "mojo-ipc",
174
+ weight: 1.6
175
+ }, {
176
+ domain: "debugger",
177
+ weight: 1.1
178
+ }]
179
+ },
180
+ {
181
+ pattern: "(?:syscall|etw|strace|dtrace|kernel.*call|system\\s?call|tracefs)",
182
+ flags: "i",
183
+ domainBoosts: [{
184
+ domain: "syscall-hook",
185
+ weight: 1.6
186
+ }, {
187
+ domain: "process",
188
+ weight: 1.1
189
+ }]
190
+ },
191
+ {
192
+ pattern: "(?:protocol.*analy|state\\s?machine|packet.*decode|field.*extract)",
193
+ flags: "i",
194
+ domainBoosts: [{
195
+ domain: "protocol-analysis",
196
+ weight: 1.6
197
+ }, {
198
+ domain: "network",
199
+ weight: 1.1
200
+ }]
201
+ },
202
+ {
203
+ pattern: "(?:extension.*(?:install|registry|list)|plugin.*(?:install|manage)|addon|webhook.*(?:create|manage))",
204
+ flags: "i",
205
+ domainBoosts: [{
206
+ domain: "extension-registry",
207
+ weight: 1.6
208
+ }, {
209
+ domain: "workflow",
101
210
  weight: 1.1
102
211
  }]
103
212
  }
@@ -324,16 +433,16 @@ const DEFAULT_SEARCH_CONFIG = {
324
433
  ],
325
434
  intentToolBoostRules: [
326
435
  {
327
- pattern: "(?:端到端闭环|全链路闭环|一键闭环|api(?:[_\\s-]*)capture(?:[_\\s-]*)session|web_api_capture_session|抓取接口|抓包流程)",
436
+ pattern: "(?:端到端闭环|全链路闭环|一键闭环|api(?:[_\\s-]*)capture(?:[_\\s-]*)session|抓取接口|抓包流程)",
328
437
  flags: "i",
329
438
  boosts: [
330
439
  {
331
440
  tool: "run_extension_workflow",
332
- bonus: 40
441
+ bonus: 18
333
442
  },
334
443
  {
335
444
  tool: "list_extension_workflows",
336
- bonus: 24
445
+ bonus: 12
337
446
  },
338
447
  {
339
448
  tool: "api_probe_batch",
@@ -355,11 +464,11 @@ const DEFAULT_SEARCH_CONFIG = {
355
464
  boosts: [
356
465
  {
357
466
  tool: "run_extension_workflow",
358
- bonus: 40
467
+ bonus: 12
359
468
  },
360
469
  {
361
470
  tool: "list_extension_workflows",
362
- bonus: 24
471
+ bonus: 8
363
472
  },
364
473
  {
365
474
  tool: "tab_workflow",
@@ -394,7 +503,7 @@ const DEFAULT_SEARCH_CONFIG = {
394
503
  bonus: 20
395
504
  },
396
505
  {
397
- tool: "source_map_extract",
506
+ tool: "sourcemap_fetch_and_parse",
398
507
  bonus: 10
399
508
  },
400
509
  {
@@ -420,11 +529,11 @@ const DEFAULT_SEARCH_CONFIG = {
420
529
  boosts: [
421
530
  {
422
531
  tool: "run_extension_workflow",
423
- bonus: 28
532
+ bonus: 18
424
533
  },
425
534
  {
426
535
  tool: "list_extension_workflows",
427
- bonus: 16
536
+ bonus: 12
428
537
  },
429
538
  {
430
539
  tool: "network_extract_auth",
@@ -437,24 +546,20 @@ const DEFAULT_SEARCH_CONFIG = {
437
546
  flags: "i",
438
547
  boosts: [
439
548
  {
440
- tool: "run_extension_workflow",
441
- bonus: 40
442
- },
443
- {
444
- tool: "list_extension_workflows",
445
- bonus: 24
549
+ tool: "search_in_scripts",
550
+ bonus: 14
446
551
  },
447
552
  {
448
- tool: "search_in_scripts",
553
+ tool: "detect_crypto",
449
554
  bonus: 12
450
555
  },
451
556
  {
452
- tool: "detect_crypto",
557
+ tool: "manage_hooks",
453
558
  bonus: 10
454
559
  },
455
560
  {
456
- tool: "manage_hooks",
457
- bonus: 8
561
+ tool: "run_extension_workflow",
562
+ bonus: 6
458
563
  }
459
564
  ]
460
565
  },
@@ -463,24 +568,20 @@ const DEFAULT_SEARCH_CONFIG = {
463
568
  flags: "i",
464
569
  boosts: [
465
570
  {
466
- tool: "run_extension_workflow",
467
- bonus: 40
468
- },
469
- {
470
- tool: "list_extension_workflows",
471
- bonus: 24
571
+ tool: "ws_monitor",
572
+ bonus: 14
472
573
  },
473
574
  {
474
- tool: "ws_monitor_enable",
575
+ tool: "ws_get_frames",
475
576
  bonus: 12
476
577
  },
477
578
  {
478
- tool: "ws_get_frames",
579
+ tool: "ws_get_connections",
479
580
  bonus: 10
480
581
  },
481
582
  {
482
- tool: "ws_get_connections",
483
- bonus: 8
583
+ tool: "run_extension_workflow",
584
+ bonus: 6
484
585
  }
485
586
  ]
486
587
  },
@@ -488,25 +589,21 @@ const DEFAULT_SEARCH_CONFIG = {
488
589
  pattern: "(?:bundle|webpack|chunk|source.*map|deobfusc|源码|打包|混淆|反混淆)",
489
590
  flags: "i",
490
591
  boosts: [
491
- {
492
- tool: "run_extension_workflow",
493
- bonus: 40
494
- },
495
- {
496
- tool: "list_extension_workflows",
497
- bonus: 24
498
- },
499
592
  {
500
593
  tool: "js_bundle_search",
501
- bonus: 14
594
+ bonus: 18
502
595
  },
503
596
  {
504
597
  tool: "collect_code",
598
+ bonus: 12
599
+ },
600
+ {
601
+ tool: "sourcemap_fetch_and_parse",
505
602
  bonus: 10
506
603
  },
507
604
  {
508
- tool: "source_map_extract",
509
- bonus: 8
605
+ tool: "run_extension_workflow",
606
+ bonus: 6
510
607
  }
511
608
  ]
512
609
  },
@@ -514,51 +611,39 @@ const DEFAULT_SEARCH_CONFIG = {
514
611
  pattern: "(?:stealth|fingerprint|webdriver|antibot|bot.*detect|反爬|反检测|指纹)",
515
612
  flags: "i",
516
613
  boosts: [
517
- {
518
- tool: "run_extension_workflow",
519
- bonus: 40
520
- },
521
- {
522
- tool: "list_extension_workflows",
523
- bonus: 24
524
- },
525
614
  {
526
615
  tool: "stealth_inject",
527
- bonus: 10
616
+ bonus: 14
528
617
  },
529
618
  {
530
619
  tool: "stealth_generate_fingerprint",
531
- bonus: 10
620
+ bonus: 12
532
621
  },
533
622
  {
534
623
  tool: "stealth_verify",
535
- bonus: 8
624
+ bonus: 10
625
+ },
626
+ {
627
+ tool: "run_extension_workflow",
628
+ bonus: 6
536
629
  }
537
630
  ]
538
631
  },
539
632
  {
540
- pattern: "(?:evidence|export|har|report|snapshot|证据|导出|报告|快照|取证)",
633
+ pattern: "(?:evidence|export.*(?:har|markdown|json)|har|report|证据|导出|报告|取证)",
541
634
  flags: "i",
542
635
  boosts: [
543
636
  {
544
- tool: "run_extension_workflow",
545
- bonus: 40
546
- },
547
- {
548
- tool: "list_extension_workflows",
549
- bonus: 24
637
+ tool: "evidence_query",
638
+ bonus: 16
550
639
  },
551
640
  {
552
- tool: "evidence_query_url",
641
+ tool: "evidence_export",
553
642
  bonus: 14
554
643
  },
555
644
  {
556
- tool: "evidence_export_markdown",
557
- bonus: 12
558
- },
559
- {
560
- tool: "evidence_export_json",
561
- bonus: 10
645
+ tool: "run_extension_workflow",
646
+ bonus: 6
562
647
  }
563
648
  ]
564
649
  },
@@ -567,20 +652,16 @@ const DEFAULT_SEARCH_CONFIG = {
567
652
  flags: "i",
568
653
  boosts: [
569
654
  {
570
- tool: "run_extension_workflow",
571
- bonus: 40
572
- },
573
- {
574
- tool: "list_extension_workflows",
575
- bonus: 24
655
+ tool: "network_extract_auth",
656
+ bonus: 16
576
657
  },
577
658
  {
578
- tool: "network_extract_auth",
579
- bonus: 14
659
+ tool: "run_extension_workflow",
660
+ bonus: 6
580
661
  },
581
662
  {
582
- tool: "page_get_cookies",
583
- bonus: 8
663
+ tool: "list_extension_workflows",
664
+ bonus: 4
584
665
  }
585
666
  ]
586
667
  },
@@ -589,15 +670,11 @@ const DEFAULT_SEARCH_CONFIG = {
589
670
  flags: "i",
590
671
  boosts: [
591
672
  {
592
- tool: "run_extension_workflow",
593
- bonus: 40
594
- },
595
- {
596
- tool: "list_extension_workflows",
597
- bonus: 24
673
+ tool: "ws_monitor",
674
+ bonus: 12
598
675
  },
599
676
  {
600
- tool: "ws_monitor_enable",
677
+ tool: "network_get_requests",
601
678
  bonus: 10
602
679
  },
603
680
  {
@@ -605,8 +682,8 @@ const DEFAULT_SEARCH_CONFIG = {
605
682
  bonus: 10
606
683
  },
607
684
  {
608
- tool: "network_get_requests",
609
- bonus: 8
685
+ tool: "run_extension_workflow",
686
+ bonus: 6
610
687
  }
611
688
  ]
612
689
  },
@@ -614,21 +691,17 @@ const DEFAULT_SEARCH_CONFIG = {
614
691
  pattern: "(?:challenge|turnstile|cloudflare|hcaptcha|datadome|akamai|perimeterx|kasada|人机|挑战|风控|拦截页)",
615
692
  flags: "i",
616
693
  boosts: [
617
- {
618
- tool: "run_extension_workflow",
619
- bonus: 40
620
- },
621
- {
622
- tool: "list_extension_workflows",
623
- bonus: 24
624
- },
625
694
  {
626
695
  tool: "captcha_detect",
627
- bonus: 14
696
+ bonus: 16
628
697
  },
629
698
  {
630
699
  tool: "stealth_verify",
631
- bonus: 10
700
+ bonus: 12
701
+ },
702
+ {
703
+ tool: "run_extension_workflow",
704
+ bonus: 6
632
705
  }
633
706
  ]
634
707
  },
@@ -637,24 +710,20 @@ const DEFAULT_SEARCH_CONFIG = {
637
710
  flags: "i",
638
711
  boosts: [
639
712
  {
640
- tool: "run_extension_workflow",
641
- bonus: 40
642
- },
643
- {
644
- tool: "list_extension_workflows",
645
- bonus: 24
713
+ tool: "detect_crypto",
714
+ bonus: 14
646
715
  },
647
716
  {
648
- tool: "detect_crypto",
717
+ tool: "extract_function_tree",
649
718
  bonus: 12
650
719
  },
651
720
  {
652
- tool: "extract_function_tree",
721
+ tool: "manage_hooks",
653
722
  bonus: 10
654
723
  },
655
724
  {
656
- tool: "manage_hooks",
657
- bonus: 8
725
+ tool: "run_extension_workflow",
726
+ bonus: 6
658
727
  }
659
728
  ]
660
729
  },
@@ -662,25 +731,21 @@ const DEFAULT_SEARCH_CONFIG = {
662
731
  pattern: "(?:replay.*lab|request.*replay|复现|重发|篡改|参数篡改|request.*tamper)",
663
732
  flags: "i",
664
733
  boosts: [
665
- {
666
- tool: "run_extension_workflow",
667
- bonus: 40
668
- },
669
- {
670
- tool: "list_extension_workflows",
671
- bonus: 24
672
- },
673
734
  {
674
735
  tool: "network_replay_request",
675
- bonus: 14
736
+ bonus: 16
676
737
  },
677
738
  {
678
739
  tool: "instrumentation_network_replay",
679
- bonus: 12
740
+ bonus: 14
680
741
  },
681
742
  {
682
743
  tool: "network_export_har",
683
- bonus: 8
744
+ bonus: 10
745
+ },
746
+ {
747
+ tool: "run_extension_workflow",
748
+ bonus: 6
684
749
  }
685
750
  ]
686
751
  },
@@ -689,28 +754,24 @@ const DEFAULT_SEARCH_CONFIG = {
689
754
  flags: "i",
690
755
  boosts: [
691
756
  {
692
- tool: "run_extension_workflow",
693
- bonus: 40
694
- },
695
- {
696
- tool: "list_extension_workflows",
697
- bonus: 24
757
+ tool: "webcrack_unpack",
758
+ bonus: 16
698
759
  },
699
760
  {
700
- tool: "webcrack_unpack",
761
+ tool: "ast_transform_apply",
701
762
  bonus: 14
702
763
  },
703
764
  {
704
- tool: "ast_transform_apply",
765
+ tool: "deobfuscate",
705
766
  bonus: 12
706
767
  },
707
768
  {
708
- tool: "deobfuscate",
769
+ tool: "detect_obfuscation",
709
770
  bonus: 10
710
771
  },
711
772
  {
712
- tool: "detect_obfuscation",
713
- bonus: 8
773
+ tool: "run_extension_workflow",
774
+ bonus: 6
714
775
  }
715
776
  ]
716
777
  },
@@ -719,28 +780,24 @@ const DEFAULT_SEARCH_CONFIG = {
719
780
  flags: "i",
720
781
  boosts: [
721
782
  {
722
- tool: "run_extension_workflow",
723
- bonus: 40
724
- },
725
- {
726
- tool: "list_extension_workflows",
727
- bonus: 24
783
+ tool: "electron_inspect_app",
784
+ bonus: 16
728
785
  },
729
786
  {
730
- tool: "electron_inspect_app",
787
+ tool: "electron_ipc_sniff",
731
788
  bonus: 14
732
789
  },
733
790
  {
734
- tool: "electron_ipc_sniff",
791
+ tool: "asar_search",
735
792
  bonus: 12
736
793
  },
737
794
  {
738
- tool: "asar_search",
795
+ tool: "electron_check_fuses",
739
796
  bonus: 10
740
797
  },
741
798
  {
742
- tool: "electron_check_fuses",
743
- bonus: 8
799
+ tool: "run_extension_workflow",
800
+ bonus: 6
744
801
  }
745
802
  ]
746
803
  }
@@ -1081,58 +1138,4 @@ async function resolveScreenshotOutputPath(options) {
1081
1138
  };
1082
1139
  }
1083
1140
  //#endregion
1084
- //#region src/utils/artifacts.ts
1085
- /**
1086
- * Unified artifact output management.
1087
- * Ensures all tool outputs go to well-structured directories with consistent naming.
1088
- */
1089
- var artifacts_exports = /* @__PURE__ */ __exportAll({
1090
- getArtifactDir: () => getArtifactDir,
1091
- getArtifactsRoot: () => getArtifactsRoot,
1092
- resolveArtifactPath: () => resolveArtifactPath
1093
- });
1094
- const ARTIFACT_BASE = "artifacts";
1095
- /**
1096
- * Generate a timestamped artifact path.
1097
- *
1098
- * @param category - Artifact subdirectory (wasm, traces, etc.)
1099
- * @param toolName - Tool that produces this artifact
1100
- * @param target - Target identifier (e.g., module name, URL hash)
1101
- * @param ext - File extension (without dot)
1102
- * @returns { absolutePath, displayPath }
1103
- */
1104
- async function resolveArtifactPath(options) {
1105
- const { category, toolName, target, ext, customDir } = options;
1106
- const root = getProjectRoot();
1107
- const dir = customDir ? resolve(root, customDir) : resolve(root, ARTIFACT_BASE, category);
1108
- const relativeDir = relative(normalize(root), normalize(dir));
1109
- if (relativeDir === ".." || relativeDir.startsWith(`..${sep}`) || isAbsolute(relativeDir)) throw new Error(`Path traversal blocked: artifact directory "${customDir}" escapes project root`);
1110
- await mkdir(dir, { recursive: true });
1111
- const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").replace("T", "_").slice(0, 19);
1112
- const shortId = Math.random().toString(36).substring(2, 8);
1113
- const absolutePath = resolve(dir, `${sanitizeFilename(toolName)}${target ? `-${sanitizeFilename(target)}` : ""}-${ts}-${shortId}.${ext.replace(/^\./, "")}`);
1114
- return {
1115
- absolutePath,
1116
- displayPath: relative(root, absolutePath).replace(/\\/g, "/")
1117
- };
1118
- }
1119
- /**
1120
- * Get the artifacts root directory.
1121
- */
1122
- function getArtifactsRoot() {
1123
- return resolve(getProjectRoot(), ARTIFACT_BASE);
1124
- }
1125
- /**
1126
- * Get a specific artifact category directory.
1127
- */
1128
- function getArtifactDir(category) {
1129
- return resolve(getProjectRoot(), ARTIFACT_BASE, category);
1130
- }
1131
- /**
1132
- * Sanitize a string for use as a filename component.
1133
- */
1134
- function sanitizeFilename(name) {
1135
- return name.replace(/[^a-zA-Z0-9_-]/g, "_").replace(/_+/g, "_").replace(/^_|_$/g, "").substring(0, 60);
1136
- }
1137
- //#endregion
1138
- export { getCodeCacheDir as a, getProjectRoot as c, resolveScreenshotOutputPath as d, getConfig as f, DEFAULT_SEARCH_CONFIG as h, resolveArtifactPath as i, getTlsKeyLogDir as l, validateConfig as m, getArtifactDir as n, getDebuggerSessionsDir as o, projectRoot as p, getArtifactsRoot as r, getExtensionRegistryDir as s, artifacts_exports as t, resolveOutputDirectory as u };
1141
+ export { getTlsKeyLogDir as a, getConfig as c, DEFAULT_SEARCH_CONFIG as d, getProjectRoot as i, projectRoot as l, getDebuggerSessionsDir as n, resolveOutputDirectory as o, getExtensionRegistryDir as r, resolveScreenshotOutputPath as s, getCodeCacheDir as t, validateConfig as u };