@jshookmcp/jshook 0.2.8 → 0.2.9

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 (157) hide show
  1. package/README.md +36 -5
  2. package/README.zh.md +36 -5
  3. package/dist/{AntiCheatDetector-S8VRj-dD.mjs → AntiCheatDetector-BNk-EoBt.mjs} +3 -3
  4. package/dist/{CodeInjector-4Z3ngPoX.mjs → CodeInjector-Cq8q01kp.mjs} +5 -5
  5. package/dist/ConsoleMonitor-CPVQW1Y-.mjs +2201 -0
  6. package/dist/{DarwinAPI-B8hg_yhz.mjs → DarwinAPI-BNPxu0RH.mjs} +1 -1
  7. package/dist/DetailedDataManager-BQQcxh64.mjs +217 -0
  8. package/dist/EventBus-DgPmwpeu.mjs +141 -0
  9. package/dist/EvidenceGraphBridge-SFesNera.mjs +153 -0
  10. package/dist/{ExtensionManager-D5-bO9D8.mjs → ExtensionManager-CWYgw0YW.mjs} +13 -6
  11. package/dist/{FingerprintManager-BVxFJL2-.mjs → FingerprintManager-gzWtkKuf.mjs} +1 -1
  12. package/dist/{HardwareBreakpoint-DK1yjWkV.mjs → HardwareBreakpoint-B9gZCdFP.mjs} +3 -3
  13. package/dist/{HeapAnalyzer-CEbo10xU.mjs → HeapAnalyzer-BLDH0dCv.mjs} +4 -4
  14. package/dist/HookGeneratorBuilders.core.generators.storage-CtcdK78Q.mjs +639 -0
  15. package/dist/InstrumentationSession-CvPC7Jwy.mjs +244 -0
  16. package/dist/{MemoryController-DdtnBdD4.mjs → MemoryController-CbVdCIJF.mjs} +3 -3
  17. package/dist/{MemoryScanSession-RMixN3bX.mjs → MemoryScanSession-BsDZbLYm.mjs} +81 -78
  18. package/dist/{MemoryScanner-QjK4ld0B.mjs → MemoryScanner-Bcpml6II.mjs} +44 -18
  19. package/dist/{NativeMemoryManager.impl-CB6gJ0NM.mjs → NativeMemoryManager.impl-dZtA1ZGn.mjs} +14 -53
  20. package/dist/{NativeMemoryManager.utils-BML4q1ry.mjs → NativeMemoryManager.utils-B-FjA2mJ.mjs} +1 -1
  21. package/dist/{PEAnalyzer-CK0xe0Fs.mjs → PEAnalyzer-D1lzJ_VG.mjs} +2 -2
  22. package/dist/PageController-Bqm2kZ_X.mjs +417 -0
  23. package/dist/{PointerChainEngine-Cd73qu5b.mjs → PointerChainEngine-BOhyVsjx.mjs} +4 -4
  24. package/dist/PrerequisiteError-Dl33Svkz.mjs +20 -0
  25. package/dist/ResponseBuilder-D3iFYx2N.mjs +143 -0
  26. package/dist/ReverseEvidenceGraph-Dlsk94LC.mjs +269 -0
  27. package/dist/ScriptManager-aHHq0X7U.mjs +3000 -0
  28. package/dist/{Speedhack-CeF0XmEz.mjs → Speedhack-CqdIFlQl.mjs} +2 -2
  29. package/dist/{StructureAnalyzer-D4GkMduU.mjs → StructureAnalyzer-DhFaPvRO.mjs} +3 -3
  30. package/dist/ToolCatalog-C0JGZoOm.mjs +582 -0
  31. package/dist/ToolError-jh9whhMd.mjs +15 -0
  32. package/dist/ToolProbe-oC7aPrkv.mjs +45 -0
  33. package/dist/ToolRegistry-BjaF4oNz.mjs +131 -0
  34. package/dist/ToolRouter.policy-BWV67ZK-.mjs +304 -0
  35. package/dist/TraceRecorder-DgxyVbdQ.mjs +519 -0
  36. package/dist/{Win32API-Bc0QnQsN.mjs → Win32API-CePkipZY.mjs} +1 -1
  37. package/dist/{Win32Debug-DUHt9XUn.mjs → Win32Debug-BvKs-gxc.mjs} +2 -2
  38. package/dist/WorkflowEngine-CuvkZtWu.mjs +598 -0
  39. package/dist/analysis-CL9uACt9.mjs +463 -0
  40. package/dist/antidebug-CqDTB_uk.mjs +1081 -0
  41. package/dist/artifactRetention-CFEprwPw.mjs +591 -0
  42. package/dist/artifacts-Bk2-_uPq.mjs +59 -0
  43. package/dist/betterSqlite3-0pqusHHH.mjs +74 -0
  44. package/dist/binary-instrument-CXfpx6fT.mjs +979 -0
  45. package/dist/bind-helpers-xFfRF-qm.mjs +22 -0
  46. package/dist/boringssl-inspector-BH2D3VKc.mjs +180 -0
  47. package/dist/browser-BpOr5PEx.mjs +4082 -0
  48. package/dist/concurrency-Bt0yv1kJ.mjs +41 -0
  49. package/dist/{constants-CCvsN80K.mjs → constants-B0OANIBL.mjs} +88 -46
  50. package/dist/coordination-qUbyF8KU.mjs +259 -0
  51. package/dist/debugger-gnKxRSN0.mjs +1271 -0
  52. package/dist/definitions-6M-eejaT.mjs +53 -0
  53. package/dist/definitions-B18eyf0B.mjs +18 -0
  54. package/dist/definitions-B3QdlrHv.mjs +34 -0
  55. package/dist/definitions-B4rAvHNZ.mjs +63 -0
  56. package/dist/definitions-BB_4jnmy.mjs +37 -0
  57. package/dist/definitions-BMfYXoNC.mjs +43 -0
  58. package/dist/definitions-Beid2EB3.mjs +27 -0
  59. package/dist/definitions-C1UvM5Iy.mjs +126 -0
  60. package/dist/definitions-CXEI7QC72.mjs +216 -0
  61. package/dist/definitions-C_4r7Fo-2.mjs +14 -0
  62. package/dist/definitions-CkFDALoa.mjs +26 -0
  63. package/dist/definitions-Cke7zEb8.mjs +94 -0
  64. package/dist/definitions-ClJLzsJQ.mjs +25 -0
  65. package/dist/definitions-Cq-zroAU.mjs +28 -0
  66. package/dist/definitions-Cy3Sl6gV.mjs +34 -0
  67. package/dist/definitions-D3VsGcvz.mjs +47 -0
  68. package/dist/definitions-DVGfrn7y.mjs +96 -0
  69. package/dist/definitions-LKpC3-nL.mjs +9 -0
  70. package/dist/definitions-bAhHQJq9.mjs +359 -0
  71. package/dist/encoding-Bvz5jLRv.mjs +1065 -0
  72. package/dist/evidence-graph-bridge-C_fv9PuC.mjs +135 -0
  73. package/dist/{factory-CibqTNC8.mjs → factory-DxlGh9Xf.mjs} +37 -52
  74. package/dist/graphql-DYWzJ29s.mjs +1026 -0
  75. package/dist/handlers-9sAbfIg-.mjs +2552 -0
  76. package/dist/handlers-Bl8zkwz1.mjs +2716 -0
  77. package/dist/handlers-C67ktuRN.mjs +710 -0
  78. package/dist/handlers-C87g8oCe.mjs +276 -0
  79. package/dist/handlers-CTsDAO6p.mjs +681 -0
  80. package/dist/handlers-Cgyg6c0U.mjs +645 -0
  81. package/dist/handlers-D6j6yka7.mjs +2124 -0
  82. package/dist/handlers-DdFzXLvF.mjs +446 -0
  83. package/dist/handlers-DeLOCd5m.mjs +799 -0
  84. package/dist/handlers-DlCJN4Td.mjs +757 -0
  85. package/dist/handlers-DxGIq15_2.mjs +917 -0
  86. package/dist/handlers-U6L4xhuF.mjs +585 -0
  87. package/dist/handlers-tB9Mp9ZK.mjs +84 -0
  88. package/dist/handlers-tiy7EIBp.mjs +572 -0
  89. package/dist/handlers.impl-DS0d9fUw.mjs +761 -0
  90. package/dist/hooks-CzCWByww.mjs +898 -0
  91. package/dist/index.mjs +377 -155
  92. package/dist/{logger-BmWzC2lM.mjs → logger-Dh_xb7_2.mjs} +14 -6
  93. package/dist/maintenance-P7ePRXQC.mjs +830 -0
  94. package/dist/manifest-2ToTpjv8.mjs +106 -0
  95. package/dist/manifest-3g71z6Bg.mjs +79 -0
  96. package/dist/manifest-82baTv4U.mjs +45 -0
  97. package/dist/manifest-B3QVVeBS.mjs +82 -0
  98. package/dist/manifest-BB2J8IMJ.mjs +149 -0
  99. package/dist/manifest-BKbgbSiY.mjs +60 -0
  100. package/dist/manifest-Bcf-TJzH.mjs +848 -0
  101. package/dist/manifest-BmtZzQiQ2.mjs +45 -0
  102. package/dist/manifest-Bnd7kqEY.mjs +55 -0
  103. package/dist/manifest-BqQX6OQC2.mjs +65 -0
  104. package/dist/manifest-BqrQ4Tpj.mjs +81 -0
  105. package/dist/manifest-Br4RPFt5.mjs +370 -0
  106. package/dist/manifest-C5qDjysN.mjs +107 -0
  107. package/dist/manifest-C9RT5nk32.mjs +34 -0
  108. package/dist/manifest-CAhOuvSl.mjs +204 -0
  109. package/dist/manifest-CBYWCUBJ.mjs +51 -0
  110. package/dist/manifest-CFADCRa1.mjs +37 -0
  111. package/dist/manifest-CQVhavRF.mjs +114 -0
  112. package/dist/manifest-CT7zZBV1.mjs +48 -0
  113. package/dist/manifest-CV12bcrF.mjs +121 -0
  114. package/dist/manifest-CXsRWjjI.mjs +224 -0
  115. package/dist/manifest-CZLUCfG02.mjs +95 -0
  116. package/dist/manifest-D6phHKFd.mjs +131 -0
  117. package/dist/manifest-DCyjf4n2.mjs +294 -0
  118. package/dist/manifest-DHsnKgP6.mjs +60 -0
  119. package/dist/manifest-Df_dliIe.mjs +55 -0
  120. package/dist/manifest-Dh8WBmEW.mjs +129 -0
  121. package/dist/manifest-DhKRAT8_.mjs +92 -0
  122. package/dist/manifest-DlpTj4ic2.mjs +193 -0
  123. package/dist/manifest-DrbmZcFl2.mjs +253 -0
  124. package/dist/manifest-DuwHjUa5.mjs +70 -0
  125. package/dist/manifest-DzwvxPJX.mjs +38 -0
  126. package/dist/manifest-NXctwWQq.mjs +68 -0
  127. package/dist/manifest-Sc_0JQ13.mjs +418 -0
  128. package/dist/manifest-gZ4s_UtG.mjs +96 -0
  129. package/dist/manifest-qSleDqdO.mjs +1023 -0
  130. package/dist/modules-C184v-S9.mjs +11365 -0
  131. package/dist/mojo-ipc-B_H61Afw.mjs +525 -0
  132. package/dist/network-671Cw6hV.mjs +3346 -0
  133. package/dist/{artifacts-BbdOMET5.mjs → outputPaths-B1uGmrWZ.mjs} +219 -212
  134. package/dist/parse-args-BlRjqlkL.mjs +39 -0
  135. package/dist/platform-WmNn8Sxb.mjs +2070 -0
  136. package/dist/process-QcbIy5Zq.mjs +1401 -0
  137. package/dist/proxy-DqNs0bAd.mjs +170 -0
  138. package/dist/registry-D-6e18lB.mjs +34 -0
  139. package/dist/response-BQVP-xUn.mjs +28 -0
  140. package/dist/server/plugin-api.mjs +2 -2
  141. package/dist/shared-state-board-DV-dpHFJ.mjs +586 -0
  142. package/dist/sourcemap-Dq8ez8vS.mjs +650 -0
  143. package/dist/ssrf-policy-ZaUfvhq7.mjs +166 -0
  144. package/dist/streaming-BUQ0VJsg.mjs +725 -0
  145. package/dist/tool-builder-DCbIC5Eo.mjs +186 -0
  146. package/dist/transform-CiYJfNX0.mjs +1007 -0
  147. package/dist/types-Bx92KJfT.mjs +4 -0
  148. package/dist/wasm-DQTnHDs4.mjs +531 -0
  149. package/dist/workflow-f3xJOcjx.mjs +725 -0
  150. package/package.json +16 -16
  151. package/dist/ExtensionManager-CPTJhHFg.mjs +0 -2
  152. package/dist/ToolCatalog-Bq4V2sbJ.mjs +0 -67201
  153. package/dist/{CacheAdapters-CzFNpD9a.mjs → CacheAdapters-CDe5WPSV.mjs} +0 -0
  154. package/dist/{StealthVerifier-BzBCFiwx.mjs → StealthVerifier-Bo4T3bz8.mjs} +0 -0
  155. package/dist/{VersionDetector-CNXcvD46.mjs → VersionDetector-CwVLVdDM.mjs} +0 -0
  156. package/dist/{formatAddress-ChCSIRWT.mjs → formatAddress-DVkj9kpI.mjs} +0 -0
  157. package/dist/{types-BBjOqye-.mjs → types-CPhOReNX.mjs} +1 -1
@@ -0,0 +1,45 @@
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/macro/definitions.ts
5
+ const macroTools = [tool("run_macro", (t) => t.desc("Execute a registered macro by ID with inline progress and atomic bailout").string("macroId", "Macro ID to execute").prop("inputOverrides", {
6
+ type: "object",
7
+ description: "Per-step input overrides keyed by step ID",
8
+ additionalProperties: {
9
+ type: "object",
10
+ additionalProperties: true
11
+ }
12
+ }).required("macroId")), tool("list_macros", (t) => t.desc("List all available macros (built-in + user-defined)").query())];
13
+ //#endregion
14
+ //#region src/server/domains/macro/manifest.ts
15
+ const DOMAIN = "macro";
16
+ const DEP_KEY = "macroHandlers";
17
+ const t = toolLookup(macroTools);
18
+ const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
19
+ async function ensure(ctx) {
20
+ const { MacroToolHandlers } = await import("./handlers-U6L4xhuF.mjs");
21
+ const existing = ctx.getDomainInstance(DEP_KEY);
22
+ if (existing) return existing;
23
+ const handlers = new MacroToolHandlers(ctx);
24
+ ctx.setDomainInstance(DEP_KEY, handlers);
25
+ return handlers;
26
+ }
27
+ const manifest = {
28
+ kind: "domain-manifest",
29
+ version: 1,
30
+ domain: DOMAIN,
31
+ depKey: DEP_KEY,
32
+ profiles: ["full"],
33
+ ensure,
34
+ registrations: [{
35
+ tool: t("run_macro"),
36
+ domain: DOMAIN,
37
+ bind: b((h, a) => h.handleRunMacro(a))
38
+ }, {
39
+ tool: t("list_macros"),
40
+ domain: DOMAIN,
41
+ bind: b((h) => h.handleListMacros())
42
+ }]
43
+ };
44
+ //#endregion
45
+ export { manifest as default };
@@ -0,0 +1,55 @@
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 graphqlTools } from "./definitions-Beid2EB3.mjs";
4
+ //#region src/server/domains/graphql/manifest.ts
5
+ const DOMAIN = "graphql";
6
+ const DEP_KEY = "graphqlHandlers";
7
+ const t = toolLookup(graphqlTools);
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 { GraphQLToolHandlers } = await import("./graphql-DYWzJ29s.mjs");
12
+ if (!ctx.collector) {
13
+ ctx.collector = new CodeCollector(ctx.config.puppeteer);
14
+ ctx.registerCaches();
15
+ }
16
+ if (!ctx.graphqlHandlers) ctx.graphqlHandlers = new GraphQLToolHandlers(ctx.collector);
17
+ return ctx.graphqlHandlers;
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("call_graph_analyze"),
29
+ domain: DOMAIN,
30
+ bind: b((h, a) => h.handleCallGraphAnalyze(a))
31
+ },
32
+ {
33
+ tool: t("script_replace_persist"),
34
+ domain: DOMAIN,
35
+ bind: b((h, a) => h.handleScriptReplacePersist(a))
36
+ },
37
+ {
38
+ tool: t("graphql_introspect"),
39
+ domain: DOMAIN,
40
+ bind: b((h, a) => h.handleGraphqlIntrospect(a))
41
+ },
42
+ {
43
+ tool: t("graphql_extract_queries"),
44
+ domain: DOMAIN,
45
+ bind: b((h, a) => h.handleGraphqlExtractQueries(a))
46
+ },
47
+ {
48
+ tool: t("graphql_replay"),
49
+ domain: DOMAIN,
50
+ bind: b((h, a) => h.handleGraphqlReplay(a))
51
+ }
52
+ ]
53
+ };
54
+ //#endregion
55
+ export { manifest as default };
@@ -0,0 +1,65 @@
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 PROXY_TOOLS } from "./definitions-C_4r7Fo-2.mjs";
4
+ //#region src/server/domains/proxy/manifest.ts
5
+ const DOMAIN = "proxy";
6
+ const DEP_KEY = "proxyHandlers";
7
+ const t = toolLookup(PROXY_TOOLS);
8
+ const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
9
+ async function ensure(ctx) {
10
+ const { ProxyHandlers } = await import("./proxy-DqNs0bAd.mjs");
11
+ if (!ctx.proxyHandlers) ctx.proxyHandlers = new ProxyHandlers();
12
+ return ctx.proxyHandlers;
13
+ }
14
+ const manifest = {
15
+ kind: "domain-manifest",
16
+ version: 1,
17
+ domain: DOMAIN,
18
+ depKey: DEP_KEY,
19
+ profiles: ["full"],
20
+ ensure,
21
+ registrations: [
22
+ {
23
+ tool: t("proxy_start"),
24
+ domain: DOMAIN,
25
+ bind: b((h, a) => h.handleProxyStart(a))
26
+ },
27
+ {
28
+ tool: t("proxy_stop"),
29
+ domain: DOMAIN,
30
+ bind: b((h, a) => h.handleProxyStop(a))
31
+ },
32
+ {
33
+ tool: t("proxy_status"),
34
+ domain: DOMAIN,
35
+ bind: b((h, a) => h.handleProxyStatus(a))
36
+ },
37
+ {
38
+ tool: t("proxy_export_ca"),
39
+ domain: DOMAIN,
40
+ bind: b((h, a) => h.handleProxyExportCa(a))
41
+ },
42
+ {
43
+ tool: t("proxy_add_rule"),
44
+ domain: DOMAIN,
45
+ bind: b((h, a) => h.handleProxyAddRule(a))
46
+ },
47
+ {
48
+ tool: t("proxy_get_requests"),
49
+ domain: DOMAIN,
50
+ bind: b((h, a) => h.handleProxyGetRequests(a))
51
+ },
52
+ {
53
+ tool: t("proxy_clear_logs"),
54
+ domain: DOMAIN,
55
+ bind: b((h, a) => h.handleProxyClearLogs(a))
56
+ },
57
+ {
58
+ tool: t("proxy_setup_adb_device"),
59
+ domain: DOMAIN,
60
+ bind: b((h, a) => h.handleProxySetupAdbDevice(a))
61
+ }
62
+ ]
63
+ };
64
+ //#endregion
65
+ export { manifest as default };
@@ -0,0 +1,81 @@
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/adb-bridge/definitions.ts
5
+ const adbBridgeTools = [
6
+ tool("adb_apk_analyze", (t) => t.desc("Analyze an installed APK — package name, version, permissions, activities, se...").string("serial", "Required. Android device serial or emulator id.").string("packageName", "Required. Android package name, for example com.example.app.").requiredOpenWorld("serial", "packageName")),
7
+ tool("adb_webview_list", (t) => t.desc("List debuggable WebView targets via ADB port forwarding to Chrome DevTools.").string("serial", "Required. Android device serial or emulator id.").number("hostPort", "Optional. Local port to use for forwarding.", { default: 9222 }).requiredOpenWorld("serial")),
8
+ tool("adb_webview_attach", (t) => t.desc("Attach to a WebView via ADB port forwarding; returns WebSocket debugger URL for CDP.").string("serial", "Required. Android device serial or emulator id.").string("targetId", "Required. WebView target id returned by adb_webview_list.").number("hostPort", "Optional. Local port to use for forwarding.", { default: 9222 }).requiredOpenWorld("serial", "targetId"))
9
+ ];
10
+ //#endregion
11
+ //#region src/server/domains/adb-bridge/manifest.ts
12
+ const DOMAIN = "adb-bridge";
13
+ const DEP_KEY = "adbBridgeHandlers";
14
+ const toolByName = toolLookup(adbBridgeTools);
15
+ const bind = (invoke) => bindByDepKey(DEP_KEY, invoke);
16
+ const registrations = [
17
+ {
18
+ tool: toolByName("adb_apk_analyze"),
19
+ domain: DOMAIN,
20
+ bind: bind((handlers, args) => handlers.handleAnalyzeApk(args))
21
+ },
22
+ {
23
+ tool: toolByName("adb_webview_list"),
24
+ domain: DOMAIN,
25
+ bind: bind((handlers, args) => handlers.handleWebViewList(args))
26
+ },
27
+ {
28
+ tool: toolByName("adb_webview_attach"),
29
+ domain: DOMAIN,
30
+ bind: bind((handlers, args) => handlers.handleWebViewAttach(args))
31
+ }
32
+ ];
33
+ async function ensure(ctx) {
34
+ const { ADBBridgeHandlers } = await import("./handlers-tiy7EIBp.mjs");
35
+ const existingHandlers = ctx.getDomainInstance(DEP_KEY);
36
+ if (existingHandlers) return existingHandlers;
37
+ const handlers = new ADBBridgeHandlers();
38
+ ctx.setDomainInstance(DEP_KEY, handlers);
39
+ return handlers;
40
+ }
41
+ const manifest = {
42
+ kind: "domain-manifest",
43
+ version: 1,
44
+ domain: DOMAIN,
45
+ depKey: DEP_KEY,
46
+ profiles: ["full"],
47
+ registrations,
48
+ ensure,
49
+ workflowRule: {
50
+ patterns: [/(android|adb|mobile|apk|device).*(list|shell|pull|analyze|dump)/i, /(adb|android).*(webview|chrome|debug|cdp|inspect)/i],
51
+ priority: 75,
52
+ tools: [
53
+ "adb_apk_analyze",
54
+ "adb_webview_list",
55
+ "adb_webview_attach"
56
+ ],
57
+ hint: "Android/ADB: list devices → run shell commands → pull/analyze APK → debug WebViews via CDP"
58
+ },
59
+ prerequisites: {
60
+ "*": [{
61
+ condition: "ADB server binary must be in PATH",
62
+ fix: "Install Android Platform Tools: https://developer.android.com/studio/command-line/adb"
63
+ }],
64
+ adb_webview_list: [{
65
+ condition: "App must have android:debuggable=\"true\"",
66
+ fix: "Use a debug build of the Android app"
67
+ }],
68
+ adb_webview_attach: [{
69
+ condition: "App must have android:debuggable=\"true\"",
70
+ fix: "Use a debug build of the Android app"
71
+ }]
72
+ },
73
+ toolDependencies: [{
74
+ from: "browser",
75
+ to: "adb-bridge",
76
+ relation: "uses",
77
+ weight: .7
78
+ }]
79
+ };
80
+ //#endregion
81
+ export { manifest as default };
@@ -0,0 +1,370 @@
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 { n as advancedBrowserToolDefinitions, t as browserTools } from "./definitions-bAhHQJq9.mjs";
4
+ //#region src/server/domains/browser/manifest.ts
5
+ const DOMAIN = "browser";
6
+ const DEP_KEY = "browserHandlers";
7
+ const t = toolLookup([...browserTools, ...advancedBrowserToolDefinitions]);
8
+ const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
9
+ async function ensure(ctx) {
10
+ const { BrowserToolHandlers } = await import("./browser-BpOr5PEx.mjs");
11
+ await ensureBrowserCore(ctx);
12
+ if (!ctx.browserHandlers) ctx.browserHandlers = new BrowserToolHandlers(ctx.collector, ctx.pageController, ctx.scriptManager, ctx.consoleMonitor, ctx.eventBus);
13
+ return ctx.browserHandlers;
14
+ }
15
+ const manifest = {
16
+ kind: "domain-manifest",
17
+ version: 1,
18
+ domain: DOMAIN,
19
+ depKey: DEP_KEY,
20
+ profiles: ["workflow", "full"],
21
+ ensure,
22
+ workflowRule: {
23
+ patterns: [/(browser|page|navigate|screenshot|click|type|scrape)/i, /(浏览器|页面|导航|截图|点击|输入|爬取)/i],
24
+ priority: 90,
25
+ tools: [
26
+ "page_navigate",
27
+ "page_screenshot",
28
+ "page_click",
29
+ "page_type",
30
+ "page_evaluate"
31
+ ],
32
+ hint: "Browser automation workflow: bootstrap browser/page state -> navigate -> interact -> extract data"
33
+ },
34
+ prerequisites: {
35
+ page_navigate: [{
36
+ condition: "Browser must be launched",
37
+ fix: "Call browser_launch or browser_attach first"
38
+ }],
39
+ page_click: [{
40
+ condition: "Browser must be launched",
41
+ fix: "Call browser_launch or browser_attach first"
42
+ }],
43
+ page_type: [{
44
+ condition: "Browser must be launched",
45
+ fix: "Call browser_launch or browser_attach first"
46
+ }],
47
+ page_screenshot: [{
48
+ condition: "Browser must be launched",
49
+ fix: "Call browser_launch or browser_attach first"
50
+ }],
51
+ page_evaluate: [{
52
+ condition: "Browser must be launched",
53
+ fix: "Call browser_launch or browser_attach first"
54
+ }],
55
+ page_hover: [{
56
+ condition: "Browser must be launched",
57
+ fix: "Call browser_launch or browser_attach first"
58
+ }],
59
+ page_back: [{
60
+ condition: "Browser must be launched",
61
+ fix: "Call browser_launch or browser_attach first"
62
+ }],
63
+ page_forward: [{
64
+ condition: "Browser must be launched",
65
+ fix: "Call browser_launch or browser_attach first"
66
+ }],
67
+ page_reload: [{
68
+ condition: "Browser must be launched",
69
+ fix: "Call browser_launch or browser_attach first"
70
+ }],
71
+ page_scroll: [{
72
+ condition: "Browser must be launched",
73
+ fix: "Call browser_launch or browser_attach first"
74
+ }]
75
+ },
76
+ registrations: [
77
+ {
78
+ tool: t("get_detailed_data"),
79
+ domain: DOMAIN,
80
+ bind: b((h, a) => h.handleGetDetailedData(a))
81
+ },
82
+ {
83
+ tool: t("browser_attach"),
84
+ domain: DOMAIN,
85
+ bind: b((h, a) => h.handleBrowserAttach(a))
86
+ },
87
+ {
88
+ tool: t("browser_list_tabs"),
89
+ domain: DOMAIN,
90
+ bind: b((h, a) => h.handleBrowserListTabs(a))
91
+ },
92
+ {
93
+ tool: t("browser_list_cdp_targets"),
94
+ domain: DOMAIN,
95
+ bind: b((h, a) => h.handleBrowserListCdpTargets(a))
96
+ },
97
+ {
98
+ tool: t("browser_select_tab"),
99
+ domain: DOMAIN,
100
+ bind: b((h, a) => h.handleBrowserSelectTab(a))
101
+ },
102
+ {
103
+ tool: t("browser_attach_cdp_target"),
104
+ domain: DOMAIN,
105
+ bind: b((h, a) => h.handleBrowserAttachCdpTarget(a))
106
+ },
107
+ {
108
+ tool: t("browser_detach_cdp_target"),
109
+ domain: DOMAIN,
110
+ bind: b((h, a) => h.handleBrowserDetachCdpTarget(a))
111
+ },
112
+ {
113
+ tool: t("browser_evaluate_cdp_target"),
114
+ domain: DOMAIN,
115
+ bind: b((h, a) => h.handleBrowserEvaluateCdpTarget(a))
116
+ },
117
+ {
118
+ tool: t("browser_launch"),
119
+ domain: DOMAIN,
120
+ bind: b((h, a) => h.handleBrowserLaunch(a))
121
+ },
122
+ {
123
+ tool: t("browser_close"),
124
+ domain: DOMAIN,
125
+ bind: b((h, a) => h.handleBrowserClose(a))
126
+ },
127
+ {
128
+ tool: t("browser_status"),
129
+ domain: DOMAIN,
130
+ bind: b((h, a) => h.handleBrowserStatus(a))
131
+ },
132
+ {
133
+ tool: t("page_navigate"),
134
+ domain: DOMAIN,
135
+ bind: b((h, a) => h.handlePageNavigate(a))
136
+ },
137
+ {
138
+ tool: t("page_reload"),
139
+ domain: DOMAIN,
140
+ bind: b((h, a) => h.handlePageReload(a))
141
+ },
142
+ {
143
+ tool: t("page_back"),
144
+ domain: DOMAIN,
145
+ bind: b((h, a) => h.handlePageBack(a))
146
+ },
147
+ {
148
+ tool: t("page_forward"),
149
+ domain: DOMAIN,
150
+ bind: b((h, a) => h.handlePageForward(a))
151
+ },
152
+ {
153
+ tool: t("page_click"),
154
+ domain: DOMAIN,
155
+ bind: b((h, a) => h.handlePageClick(a))
156
+ },
157
+ {
158
+ tool: t("page_type"),
159
+ domain: DOMAIN,
160
+ bind: b((h, a) => h.handlePageType(a))
161
+ },
162
+ {
163
+ tool: t("page_select"),
164
+ domain: DOMAIN,
165
+ bind: b((h, a) => h.handlePageSelect(a))
166
+ },
167
+ {
168
+ tool: t("page_hover"),
169
+ domain: DOMAIN,
170
+ bind: b((h, a) => h.handlePageHover(a))
171
+ },
172
+ {
173
+ tool: t("page_scroll"),
174
+ domain: DOMAIN,
175
+ bind: b((h, a) => h.handlePageScroll(a))
176
+ },
177
+ {
178
+ tool: t("page_wait_for_selector"),
179
+ domain: DOMAIN,
180
+ bind: b((h, a) => h.handlePageWaitForSelector(a))
181
+ },
182
+ {
183
+ tool: t("page_evaluate"),
184
+ domain: DOMAIN,
185
+ bind: b((h, a) => h.handlePageEvaluate(a))
186
+ },
187
+ {
188
+ tool: t("page_screenshot"),
189
+ domain: DOMAIN,
190
+ bind: b((h, a) => h.handlePageScreenshot(a))
191
+ },
192
+ {
193
+ tool: t("get_all_scripts"),
194
+ domain: DOMAIN,
195
+ bind: b((h, a) => h.handleGetAllScripts(a))
196
+ },
197
+ {
198
+ tool: t("get_script_source"),
199
+ domain: DOMAIN,
200
+ bind: b((h, a) => h.handleGetScriptSource(a))
201
+ },
202
+ {
203
+ tool: t("console_monitor"),
204
+ domain: DOMAIN,
205
+ bind: b((h, a) => h.handleConsoleMonitor(a))
206
+ },
207
+ {
208
+ tool: t("console_get_logs"),
209
+ domain: DOMAIN,
210
+ bind: b((h, a) => h.handleConsoleGetLogs(a))
211
+ },
212
+ {
213
+ tool: t("console_execute"),
214
+ domain: DOMAIN,
215
+ bind: b((h, a) => h.handleConsoleExecute(a))
216
+ },
217
+ {
218
+ tool: t("page_inject_script"),
219
+ domain: DOMAIN,
220
+ bind: b((h, a) => h.handlePageInjectScript(a))
221
+ },
222
+ {
223
+ tool: t("page_cookies"),
224
+ domain: DOMAIN,
225
+ bind: b((h, a) => h.handlePageCookiesDispatch(a))
226
+ },
227
+ {
228
+ tool: t("page_set_viewport"),
229
+ domain: DOMAIN,
230
+ bind: b((h, a) => h.handlePageSetViewport(a))
231
+ },
232
+ {
233
+ tool: t("page_emulate_device"),
234
+ domain: DOMAIN,
235
+ bind: b((h, a) => h.handlePageEmulateDevice(a))
236
+ },
237
+ {
238
+ tool: t("page_local_storage"),
239
+ domain: DOMAIN,
240
+ bind: b((h, a) => h.handlePageLocalStorageDispatch(a))
241
+ },
242
+ {
243
+ tool: t("page_press_key"),
244
+ domain: DOMAIN,
245
+ bind: b((h, a) => h.handlePagePressKey(a))
246
+ },
247
+ {
248
+ tool: t("captcha_detect"),
249
+ domain: DOMAIN,
250
+ bind: b((h, a) => h.handleCaptchaDetect(a))
251
+ },
252
+ {
253
+ tool: t("captcha_wait"),
254
+ domain: DOMAIN,
255
+ bind: b((h, a) => h.handleCaptchaWait(a))
256
+ },
257
+ {
258
+ tool: t("captcha_config"),
259
+ domain: DOMAIN,
260
+ bind: b((h, a) => h.handleCaptchaConfig(a))
261
+ },
262
+ {
263
+ tool: t("stealth_inject"),
264
+ domain: DOMAIN,
265
+ bind: b((h, a) => h.handleStealthInject(a))
266
+ },
267
+ {
268
+ tool: t("stealth_set_user_agent"),
269
+ domain: DOMAIN,
270
+ bind: b((h, a) => h.handleStealthSetUserAgent(a))
271
+ },
272
+ {
273
+ tool: t("stealth_configure_jitter"),
274
+ domain: DOMAIN,
275
+ bind: b((h, a) => h.handleStealthConfigureJitter(a))
276
+ },
277
+ {
278
+ tool: t("stealth_generate_fingerprint"),
279
+ domain: DOMAIN,
280
+ bind: b((h, a) => h.handleStealthGenerateFingerprint(a))
281
+ },
282
+ {
283
+ tool: t("stealth_verify"),
284
+ domain: DOMAIN,
285
+ bind: b((h, a) => h.handleStealthVerify(a))
286
+ },
287
+ {
288
+ tool: t("camoufox_geolocation"),
289
+ domain: DOMAIN,
290
+ bind: b((h, a) => h.handleCamoufoxGeolocation(a))
291
+ },
292
+ {
293
+ tool: t("camoufox_server"),
294
+ domain: DOMAIN,
295
+ bind: b((h, a) => h.handleCamoufoxServerDispatch(a))
296
+ },
297
+ {
298
+ tool: t("framework_state_extract"),
299
+ domain: DOMAIN,
300
+ bind: b((h, a) => h.handleFrameworkStateExtract(a))
301
+ },
302
+ {
303
+ tool: t("indexeddb_dump"),
304
+ domain: DOMAIN,
305
+ bind: b((h, a) => h.handleIndexedDBDump(a))
306
+ },
307
+ {
308
+ tool: t("js_heap_search"),
309
+ domain: DOMAIN,
310
+ bind: b((h, a) => h.handleJSHeapSearch(a))
311
+ },
312
+ {
313
+ tool: t("tab_workflow"),
314
+ domain: DOMAIN,
315
+ bind: b((h, a) => h.handleTabWorkflow(a))
316
+ },
317
+ {
318
+ tool: t("human_mouse"),
319
+ domain: DOMAIN,
320
+ bind: b((h, a) => h.handleHumanMouse(a))
321
+ },
322
+ {
323
+ tool: t("human_scroll"),
324
+ domain: DOMAIN,
325
+ bind: b((h, a) => h.handleHumanScroll(a))
326
+ },
327
+ {
328
+ tool: t("human_typing"),
329
+ domain: DOMAIN,
330
+ bind: b((h, a) => h.handleHumanTyping(a))
331
+ },
332
+ {
333
+ tool: t("captcha_vision_solve"),
334
+ domain: DOMAIN,
335
+ bind: b((h, a) => h.handleCaptchaVisionSolve(a))
336
+ },
337
+ {
338
+ tool: t("widget_challenge_solve"),
339
+ domain: DOMAIN,
340
+ bind: b((h, a) => h.handleWidgetChallengeSolve(a))
341
+ },
342
+ {
343
+ tool: t("browser_jsdom_parse"),
344
+ domain: DOMAIN,
345
+ bind: b((h, a) => h.handleJsdomParse(a))
346
+ },
347
+ {
348
+ tool: t("browser_jsdom_query"),
349
+ domain: DOMAIN,
350
+ bind: b((h, a) => h.handleJsdomQuery(a))
351
+ },
352
+ {
353
+ tool: t("browser_jsdom_execute"),
354
+ domain: DOMAIN,
355
+ bind: b((h, a) => h.handleJsdomExecute(a))
356
+ },
357
+ {
358
+ tool: t("browser_jsdom_serialize"),
359
+ domain: DOMAIN,
360
+ bind: b((h, a) => h.handleJsdomSerialize(a))
361
+ },
362
+ {
363
+ tool: t("browser_jsdom_cookies"),
364
+ domain: DOMAIN,
365
+ bind: b((h, a) => h.handleJsdomCookies(a))
366
+ }
367
+ ]
368
+ };
369
+ //#endregion
370
+ export { manifest as default };