@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,121 @@
1
+ import { n as toolLookup, t as ensureBrowserCore } from "./registry-D-6e18lB.mjs";
2
+ import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
3
+ import { t as debuggerTools } from "./definitions-DVGfrn7y.mjs";
4
+ //#region src/server/domains/debugger/manifest.ts
5
+ const DOMAIN = "debugger";
6
+ const DEP_KEY = "debuggerHandlers";
7
+ const t = toolLookup(debuggerTools);
8
+ const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
9
+ async function ensure(ctx) {
10
+ const { DebuggerManager, RuntimeInspector } = await import("./modules-C184v-S9.mjs").then((n) => n.t);
11
+ const { DebuggerToolHandlers } = await import("./debugger-gnKxRSN0.mjs");
12
+ await ensureBrowserCore(ctx);
13
+ if (!ctx.debuggerManager || !ctx.runtimeInspector || !ctx.debuggerHandlers) {
14
+ if (!ctx.debuggerManager) ctx.debuggerManager = new DebuggerManager(ctx.collector);
15
+ if (!ctx.runtimeInspector) ctx.runtimeInspector = new RuntimeInspector(ctx.collector, ctx.debuggerManager);
16
+ if (!ctx.debuggerHandlers) ctx.debuggerHandlers = new DebuggerToolHandlers(ctx.debuggerManager, ctx.runtimeInspector, ctx.eventBus);
17
+ }
18
+ return ctx.debuggerHandlers;
19
+ }
20
+ const manifest = {
21
+ kind: "domain-manifest",
22
+ version: 1,
23
+ domain: DOMAIN,
24
+ depKey: DEP_KEY,
25
+ profiles: ["workflow", "full"],
26
+ ensure,
27
+ prerequisites: {
28
+ debugger_lifecycle: [{
29
+ condition: "Browser must be launched",
30
+ fix: "Call browser_launch or browser_attach first"
31
+ }],
32
+ breakpoint: [{
33
+ condition: "Browser must be launched",
34
+ fix: "Call browser_launch and debugger_lifecycle(enable) first"
35
+ }]
36
+ },
37
+ registrations: [
38
+ {
39
+ tool: t("debugger_lifecycle"),
40
+ domain: DOMAIN,
41
+ bind: b((h, a) => h.handleDebuggerLifecycle(a))
42
+ },
43
+ {
44
+ tool: t("debugger_pause"),
45
+ domain: DOMAIN,
46
+ bind: b((h, a) => h.handleDebuggerPause(a))
47
+ },
48
+ {
49
+ tool: t("debugger_resume"),
50
+ domain: DOMAIN,
51
+ bind: b((h, a) => h.handleDebuggerResume(a))
52
+ },
53
+ {
54
+ tool: t("debugger_step"),
55
+ domain: DOMAIN,
56
+ bind: b((h, a) => h.handleDebuggerStep(a))
57
+ },
58
+ {
59
+ tool: t("breakpoint"),
60
+ domain: DOMAIN,
61
+ bind: b((h, a) => h.handleBreakpoint(a))
62
+ },
63
+ {
64
+ tool: t("get_call_stack"),
65
+ domain: DOMAIN,
66
+ bind: b((h, a) => h.handleGetCallStack(a))
67
+ },
68
+ {
69
+ tool: t("debugger_evaluate"),
70
+ domain: DOMAIN,
71
+ bind: b((h, a) => h.handleDebuggerEvaluateDispatch(a))
72
+ },
73
+ {
74
+ tool: t("debugger_wait_for_paused"),
75
+ domain: DOMAIN,
76
+ bind: b((h, a) => h.handleDebuggerWaitForPaused(a))
77
+ },
78
+ {
79
+ tool: t("debugger_get_paused_state"),
80
+ domain: DOMAIN,
81
+ bind: b((h, a) => h.handleDebuggerGetPausedState(a))
82
+ },
83
+ {
84
+ tool: t("get_object_properties"),
85
+ domain: DOMAIN,
86
+ bind: b((h, a) => h.handleGetObjectProperties(a))
87
+ },
88
+ {
89
+ tool: t("get_scope_variables_enhanced"),
90
+ domain: DOMAIN,
91
+ bind: b((h, a) => h.handleGetScopeVariablesEnhanced(a))
92
+ },
93
+ {
94
+ tool: t("debugger_session"),
95
+ domain: DOMAIN,
96
+ bind: b((h, a) => h.handleDebuggerSession(a))
97
+ },
98
+ {
99
+ tool: t("watch"),
100
+ domain: DOMAIN,
101
+ bind: b((h, a) => h.handleWatch(a))
102
+ },
103
+ {
104
+ tool: t("blackbox_add"),
105
+ domain: DOMAIN,
106
+ bind: b((h, a) => h.handleBlackboxAdd(a))
107
+ },
108
+ {
109
+ tool: t("blackbox_add_common"),
110
+ domain: DOMAIN,
111
+ bind: b((h, a) => h.handleBlackboxAddCommon(a))
112
+ },
113
+ {
114
+ tool: t("blackbox_list"),
115
+ domain: DOMAIN,
116
+ bind: b((h, a) => h.handleBlackboxList(a))
117
+ }
118
+ ]
119
+ };
120
+ //#endregion
121
+ export { manifest as default };
@@ -0,0 +1,224 @@
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/cross-domain/definitions.ts
5
+ const crossDomainToolDefinitions = [
6
+ tool("cross_domain_capabilities", (t) => t.desc("List cross-domain capabilities, supported v5.0 domains, and available mission workflows.").query()),
7
+ tool("cross_domain_suggest_workflow", (t) => t.desc("Suggest the best cross-domain workflow for a reverse-engineering goal.").string("goal", "High-level task goal or problem statement to classify").boolean("preferAvailableOnly", "Prefer workflows whose dependent domains are currently enabled", { default: true }).required("goal").query()),
8
+ tool("cross_domain_health", (t) => t.desc("Report cross-domain health, enabled v5.0 domains, and evidence-graph availability.").query()),
9
+ tool("cross_domain_correlate_all", (t) => t.desc("Ingest artifacts from V8, network, canvas, syscall, mojo, and binary domains into one shared evidence graph with optional cross-links.").array("v8Objects", {
10
+ type: "object",
11
+ properties: {
12
+ address: { type: "string" },
13
+ size: { type: "number" },
14
+ type: { type: "string" },
15
+ name: { type: "string" }
16
+ },
17
+ required: [
18
+ "address",
19
+ "size",
20
+ "type",
21
+ "name"
22
+ ]
23
+ }, "Optional V8 heap objects to import first").array("networkRequests", {
24
+ type: "object",
25
+ properties: {
26
+ url: { type: "string" },
27
+ method: { type: "string" },
28
+ headers: {
29
+ type: "object",
30
+ additionalProperties: { type: "string" }
31
+ },
32
+ initiatorHeapIndex: { type: "number" }
33
+ },
34
+ required: ["url", "method"]
35
+ }, "Optional network requests. Use initiatorHeapIndex to link a request to v8Objects[index].").array("canvasNodes", {
36
+ type: "object",
37
+ properties: {
38
+ nodeId: { type: "string" },
39
+ type: { type: "string" },
40
+ label: { type: "string" },
41
+ creatorHeapIndex: { type: "number" }
42
+ },
43
+ required: [
44
+ "nodeId",
45
+ "type",
46
+ "label"
47
+ ]
48
+ }, "Optional canvas nodes. Use creatorHeapIndex to link to v8Objects[index].").array("binarySymbols", {
49
+ type: "object",
50
+ properties: {
51
+ name: { type: "string" },
52
+ address: { type: "string" },
53
+ module: { type: "string" }
54
+ },
55
+ required: [
56
+ "name",
57
+ "address",
58
+ "module"
59
+ ]
60
+ }, "Optional binary symbols to import before syscall correlation.").array("syscallEvents", {
61
+ type: "object",
62
+ properties: {
63
+ syscall: { type: "string" },
64
+ pid: { type: "number" },
65
+ timestamp: { type: "number" },
66
+ jsFunctionSymbolIndex: { type: "number" }
67
+ },
68
+ required: [
69
+ "syscall",
70
+ "pid",
71
+ "timestamp"
72
+ ]
73
+ }, "Optional syscall events. Use jsFunctionSymbolIndex to link to binarySymbols[index].").array("mojoMessages", {
74
+ type: "object",
75
+ properties: {
76
+ interfaceName: { type: "string" },
77
+ messageType: { type: "string" },
78
+ payload: { description: "Any JSON-serializable payload object" },
79
+ sourceRequestIndex: { type: "number" }
80
+ },
81
+ required: [
82
+ "interfaceName",
83
+ "messageType",
84
+ "payload"
85
+ ]
86
+ }, "Optional Mojo IPC messages. Use sourceRequestIndex to link to networkRequests[index].")),
87
+ tool("cross_domain_evidence_export", (t) => t.desc("Export the shared cross-domain evidence graph as JSON.").query()),
88
+ tool("cross_domain_evidence_stats", (t) => t.desc("Get node and edge statistics for the shared cross-domain evidence graph.").query())
89
+ ];
90
+ //#endregion
91
+ //#region src/server/domains/cross-domain/manifest.ts
92
+ const DOMAIN = "cross-domain";
93
+ const DEP_KEY = "crossDomainHandlers";
94
+ const lookupTool = toolLookup(crossDomainToolDefinitions);
95
+ const bindTool = (invoke) => bindByDepKey(DEP_KEY, invoke);
96
+ async function ensure(ctx) {
97
+ const { ReverseEvidenceGraph } = await import("./ReverseEvidenceGraph-Dlsk94LC.mjs").then((n) => n.t);
98
+ const { CrossDomainEvidenceBridge } = await import("./evidence-graph-bridge-C_fv9PuC.mjs");
99
+ const { CrossDomainWorkflowClassifier, CrossDomainHandlers } = await import("./handlers-DlCJN4Td.mjs");
100
+ const existing = ctx.getDomainInstance(DEP_KEY);
101
+ if (existing) return existing;
102
+ let graph = ctx.getDomainInstance("evidenceGraph");
103
+ if (!graph) {
104
+ graph = new ReverseEvidenceGraph();
105
+ graph.setEventBus(ctx.eventBus);
106
+ ctx.setDomainInstance("evidenceGraph", graph);
107
+ }
108
+ let bridge = ctx.getDomainInstance("crossDomainEvidenceBridge");
109
+ if (!bridge) {
110
+ bridge = new CrossDomainEvidenceBridge(graph);
111
+ ctx.setDomainInstance("crossDomainEvidenceBridge", bridge);
112
+ }
113
+ let workflowClassifier = ctx.getDomainInstance("crossDomainWorkflowClassifier");
114
+ if (!workflowClassifier) {
115
+ workflowClassifier = new CrossDomainWorkflowClassifier(ctx, true);
116
+ ctx.setDomainInstance("crossDomainWorkflowClassifier", workflowClassifier);
117
+ }
118
+ const handlers = new CrossDomainHandlers(bridge, workflowClassifier);
119
+ ctx.setDomainInstance(DEP_KEY, handlers);
120
+ return handlers;
121
+ }
122
+ const manifest = {
123
+ kind: "domain-manifest",
124
+ version: 1,
125
+ domain: DOMAIN,
126
+ depKey: DEP_KEY,
127
+ profiles: ["full"],
128
+ ensure,
129
+ workflowRule: {
130
+ patterns: [/(cross[- ]domain|multi[- ]domain|evidence graph|correlate).*(v8|network|canvas|syscall|mojo|binary)/i, /(跨域|多域|证据图|关联).*(v8|网络|canvas|syscall|mojo|binary)/i],
131
+ priority: 98,
132
+ tools: [
133
+ "cross_domain_capabilities",
134
+ "cross_domain_suggest_workflow",
135
+ "cross_domain_correlate_all",
136
+ "cross_domain_evidence_stats"
137
+ ],
138
+ hint: "Cross-domain reverse workflow: inspect capabilities → suggest mission workflow → correlate evidence from all v5.0 domains → export evidence graph"
139
+ },
140
+ toolDependencies: [
141
+ {
142
+ from: "cross_domain_suggest_workflow",
143
+ to: "deobfuscate",
144
+ relation: "suggests",
145
+ weight: .6
146
+ },
147
+ {
148
+ from: "cross_domain_suggest_workflow",
149
+ to: "js_heap_search",
150
+ relation: "suggests",
151
+ weight: .6
152
+ },
153
+ {
154
+ from: "cross_domain_suggest_workflow",
155
+ to: "network_enable",
156
+ relation: "suggests",
157
+ weight: .5
158
+ },
159
+ {
160
+ from: "cross_domain_suggest_workflow",
161
+ to: "canvas_scene_dump",
162
+ relation: "suggests",
163
+ weight: .5
164
+ },
165
+ {
166
+ from: "cross_domain_suggest_workflow",
167
+ to: "skia_correlate_objects",
168
+ relation: "suggests",
169
+ weight: .5
170
+ },
171
+ {
172
+ from: "cross_domain_suggest_workflow",
173
+ to: "syscall_correlate_js",
174
+ relation: "suggests",
175
+ weight: .5
176
+ },
177
+ {
178
+ from: "cross_domain_suggest_workflow",
179
+ to: "ghidra_analyze",
180
+ relation: "suggests",
181
+ weight: .5
182
+ },
183
+ {
184
+ from: "cross_domain_correlate_all",
185
+ to: "evidence_export_json",
186
+ relation: "precedes",
187
+ weight: .7
188
+ }
189
+ ],
190
+ registrations: [
191
+ {
192
+ tool: lookupTool("cross_domain_capabilities"),
193
+ domain: DOMAIN,
194
+ bind: bindTool((handlers, args) => handlers.handleCapabilities(args))
195
+ },
196
+ {
197
+ tool: lookupTool("cross_domain_suggest_workflow"),
198
+ domain: DOMAIN,
199
+ bind: bindTool((handlers, args) => handlers.handleSuggestWorkflow(args))
200
+ },
201
+ {
202
+ tool: lookupTool("cross_domain_health"),
203
+ domain: DOMAIN,
204
+ bind: bindTool((handlers) => handlers.handleHealth())
205
+ },
206
+ {
207
+ tool: lookupTool("cross_domain_correlate_all"),
208
+ domain: DOMAIN,
209
+ bind: bindTool((handlers, args) => handlers.handleCorrelateAll(args))
210
+ },
211
+ {
212
+ tool: lookupTool("cross_domain_evidence_export"),
213
+ domain: DOMAIN,
214
+ bind: bindTool((handlers) => handlers.handleEvidenceExport())
215
+ },
216
+ {
217
+ tool: lookupTool("cross_domain_evidence_stats"),
218
+ domain: DOMAIN,
219
+ bind: bindTool((handlers) => handlers.handleEvidenceStats())
220
+ }
221
+ ]
222
+ };
223
+ //#endregion
224
+ export { manifest as default };
@@ -0,0 +1,95 @@
1
+ import { n as toolLookup } from "./registry-D-6e18lB.mjs";
2
+ import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
3
+ import { t as platformTools } from "./definitions-6M-eejaT.mjs";
4
+ //#region src/server/domains/platform/manifest.ts
5
+ const DOMAIN = "platform";
6
+ const DEP_KEY = "platformHandlers";
7
+ const t = toolLookup(platformTools);
8
+ const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
9
+ async function ensure(ctx) {
10
+ const { CodeCollector } = await import("./modules-C184v-S9.mjs").then((n) => n.t);
11
+ const { PlatformToolHandlers } = await import("./platform-WmNn8Sxb.mjs");
12
+ if (!ctx.collector) {
13
+ ctx.collector = new CodeCollector(ctx.config.puppeteer);
14
+ ctx.registerCaches();
15
+ }
16
+ if (!ctx.platformHandlers) ctx.platformHandlers = new PlatformToolHandlers(ctx.collector);
17
+ return ctx.platformHandlers;
18
+ }
19
+ const manifest = {
20
+ kind: "domain-manifest",
21
+ version: 1,
22
+ domain: DOMAIN,
23
+ depKey: DEP_KEY,
24
+ profiles: ["full"],
25
+ ensure,
26
+ registrations: [
27
+ {
28
+ tool: t("miniapp_pkg_scan"),
29
+ domain: DOMAIN,
30
+ bind: b((h, a) => h.handleMiniappPkgScan(a))
31
+ },
32
+ {
33
+ tool: t("miniapp_pkg_unpack"),
34
+ domain: DOMAIN,
35
+ bind: b((h, a) => h.handleMiniappPkgUnpack(a))
36
+ },
37
+ {
38
+ tool: t("miniapp_pkg_analyze"),
39
+ domain: DOMAIN,
40
+ bind: b((h, a) => h.handleMiniappPkgAnalyze(a))
41
+ },
42
+ {
43
+ tool: t("asar_extract"),
44
+ domain: DOMAIN,
45
+ bind: b((h, a) => h.handleAsarExtract(a))
46
+ },
47
+ {
48
+ tool: t("electron_inspect_app"),
49
+ domain: DOMAIN,
50
+ bind: b((h, a) => h.handleElectronInspectApp(a))
51
+ },
52
+ {
53
+ tool: t("electron_scan_userdata"),
54
+ domain: DOMAIN,
55
+ bind: b((h, a) => h.handleElectronScanUserdata(a))
56
+ },
57
+ {
58
+ tool: t("asar_search"),
59
+ domain: DOMAIN,
60
+ bind: b((h, a) => h.handleAsarSearch(a))
61
+ },
62
+ {
63
+ tool: t("electron_check_fuses"),
64
+ domain: DOMAIN,
65
+ bind: b((h, a) => h.handleElectronCheckFuses(a))
66
+ },
67
+ {
68
+ tool: t("electron_patch_fuses"),
69
+ domain: DOMAIN,
70
+ bind: b((h, a) => h.handleElectronPatchFuses(a))
71
+ },
72
+ {
73
+ tool: t("v8_bytecode_decompile"),
74
+ domain: DOMAIN,
75
+ bind: b((h, a) => h.handleV8BytecodeDecompile(a))
76
+ },
77
+ {
78
+ tool: t("electron_launch_debug"),
79
+ domain: DOMAIN,
80
+ bind: b((h, a) => h.handleElectronLaunchDebug(a))
81
+ },
82
+ {
83
+ tool: t("electron_debug_status"),
84
+ domain: DOMAIN,
85
+ bind: b((h, a) => h.handleElectronDebugStatus(a))
86
+ },
87
+ {
88
+ tool: t("electron_ipc_sniff"),
89
+ domain: DOMAIN,
90
+ bind: b((h, a) => h.handleElectronIPCSniff(a))
91
+ }
92
+ ]
93
+ };
94
+ //#endregion
95
+ export { manifest as default };
@@ -0,0 +1,131 @@
1
+ import { n as toolLookup } from "./registry-D-6e18lB.mjs";
2
+ import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
3
+ import { t as tool } from "./tool-builder-DCbIC5Eo.mjs";
4
+ //#region src/server/domains/instrumentation/definitions.ts
5
+ const queryTypes = [
6
+ "before-load-inject",
7
+ "runtime-hook",
8
+ "network-intercept",
9
+ "function-trace"
10
+ ];
11
+ const instrumentationTools = [
12
+ tool("instrumentation_session", (t) => t.desc(`Manage instrumentation sessions that group hooks, intercepts, and traces.
13
+
14
+ Actions:
15
+ - create: Create a new session
16
+ - list: List all active sessions
17
+ - destroy: Destroy a session (requires sessionId)
18
+ - status: Get detailed session status (requires sessionId)`).enum("action", [
19
+ "create",
20
+ "list",
21
+ "destroy",
22
+ "status"
23
+ ], "Session operation").string("sessionId", "Session ID (required for destroy/status)").required("action")),
24
+ tool("instrumentation_operation", (t) => t.desc(`Manage operations within an instrumentation session.
25
+
26
+ Actions:
27
+ - register: Register a new operation (requires sessionId, type, target)
28
+ - list: List operations in a session (requires sessionId)`).enum("action", ["register", "list"], "Operation").enum("type", queryTypes, "Instrumentation type (action=register)").string("target", "Function name, URL pattern, or script target (action=register)").object("config", {}, "Operation-specific config (action=register)").required("action", "sessionId")),
29
+ tool("instrumentation_artifact", (t) => t.desc(`Manage captured artifacts for instrumentation operations.
30
+
31
+ Actions:
32
+ - record: Record a captured artifact (requires operationId, data)
33
+ - query: Query captured artifacts (requires sessionId)`).enum("action", ["record", "query"], "Artifact operation").string("operationId", "Operation ID (action=record)").object("data", {}, "Captured artifact payload (action=record)").enum("type", queryTypes, "Optional artifact type filter (action=query)").number("limit", "Max artifacts to return (action=query, default: 50)", { default: 50 }).required("action", "sessionId")),
34
+ tool("instrumentation_hook_preset", (t) => t.desc("Apply hooks domain preset hooks within an instrumentation session and persist...").string("preset", "Single preset id to inject").array("presets", { type: "string" }, "Multiple preset ids to inject in one call").boolean("captureStack", "Whether injected presets should capture stack traces", { default: false }).boolean("logToConsole", "Whether injected presets should log to console", { default: true }).enum("method", ["evaluate", "evaluateOnNewDocument"], "Injection method forwarded to hook_preset", { default: "evaluate" }).prop("customTemplate", {
35
+ type: "object",
36
+ additionalProperties: true,
37
+ description: "Optional inline custom preset definition"
38
+ }).prop("customTemplates", {
39
+ type: "array",
40
+ items: {
41
+ type: "object",
42
+ additionalProperties: true
43
+ },
44
+ description: "Optional inline custom preset definitions"
45
+ }).requiredOpenWorld("sessionId")),
46
+ tool("instrumentation_network_replay", (t) => t.desc("Replay a previously captured network request inside an instrumentation sessio...").string("requestId", "Captured request ID returned by network_get_requests").object("headerPatch", { additionalProperties: { type: "string" } }, "Optional request header overrides").string("bodyPatch", "Optional raw request body override").string("methodOverride", "Optional HTTP method override").string("urlOverride", "Optional destination URL override").number("timeoutMs", "Optional replay timeout in milliseconds").boolean("dryRun", "Preview the replay without sending the request", { default: true }).requiredOpenWorld("sessionId", "requestId"))
47
+ ];
48
+ //#endregion
49
+ //#region src/server/domains/instrumentation/manifest.ts
50
+ const DOMAIN = "instrumentation";
51
+ const DEP_KEY = "instrumentationHandlers";
52
+ const t = toolLookup(instrumentationTools);
53
+ const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
54
+ async function ensure(ctx) {
55
+ const { ReverseEvidenceGraph } = await import("./ReverseEvidenceGraph-Dlsk94LC.mjs").then((n) => n.t);
56
+ const { InstrumentationSessionManager } = await import("./InstrumentationSession-CvPC7Jwy.mjs");
57
+ const { EvidenceGraphBridge } = await import("./EvidenceGraphBridge-SFesNera.mjs");
58
+ const { InstrumentationHandlers } = await import("./handlers-C87g8oCe.mjs");
59
+ const hookPresetHandlers = ctx.handlerDeps.hookPresetHandlers;
60
+ const advancedHandlers = ctx.handlerDeps.advancedHandlers;
61
+ let graph = ctx.getDomainInstance("evidenceGraph");
62
+ if (!graph) {
63
+ graph = new ReverseEvidenceGraph();
64
+ ctx.setDomainInstance("evidenceGraph", graph);
65
+ }
66
+ let sessionManager = ctx.getDomainInstance("instrumentationSessionManager");
67
+ if (!sessionManager) {
68
+ sessionManager = new InstrumentationSessionManager();
69
+ ctx.setDomainInstance("instrumentationSessionManager", sessionManager);
70
+ }
71
+ let bridge = ctx.getDomainInstance("evidenceGraphBridge");
72
+ if (!bridge) {
73
+ bridge = new EvidenceGraphBridge(graph);
74
+ ctx.setDomainInstance("evidenceGraphBridge", bridge);
75
+ }
76
+ sessionManager.setEvidenceBridge(bridge);
77
+ if (!ctx.instrumentationHandlers) ctx.instrumentationHandlers = new InstrumentationHandlers(sessionManager, {
78
+ hookPresetHandlers,
79
+ advancedHandlers
80
+ });
81
+ return ctx.instrumentationHandlers;
82
+ }
83
+ const manifest = {
84
+ kind: "domain-manifest",
85
+ version: 1,
86
+ domain: DOMAIN,
87
+ depKey: DEP_KEY,
88
+ profiles: ["full"],
89
+ ensure,
90
+ workflowRule: {
91
+ patterns: [/(hook|intercept|trace|instrument).*(session|unified|manage|all)/i, /(session|统一|会话).*(hook|拦截|追踪|仪器化|instrument)/i],
92
+ priority: 95,
93
+ tools: [
94
+ "instrumentation_session",
95
+ "instrumentation_operation",
96
+ "instrumentation_artifact",
97
+ "instrumentation_hook_preset",
98
+ "instrumentation_network_replay"
99
+ ],
100
+ hint: "Instrumentation session: create session → attach hook presets / network replay → record artifacts → query artifacts → destroy when done"
101
+ },
102
+ registrations: [
103
+ {
104
+ tool: t("instrumentation_session"),
105
+ domain: DOMAIN,
106
+ bind: b((h, a) => h.handleSessionDispatch(a))
107
+ },
108
+ {
109
+ tool: t("instrumentation_operation"),
110
+ domain: DOMAIN,
111
+ bind: b((h, a) => h.handleOperationDispatch(a))
112
+ },
113
+ {
114
+ tool: t("instrumentation_artifact"),
115
+ domain: DOMAIN,
116
+ bind: b((h, a) => h.handleArtifactDispatch(a))
117
+ },
118
+ {
119
+ tool: t("instrumentation_hook_preset"),
120
+ domain: DOMAIN,
121
+ bind: b((h, a) => h.handleHookPreset(a))
122
+ },
123
+ {
124
+ tool: t("instrumentation_network_replay"),
125
+ domain: DOMAIN,
126
+ bind: b((h, a) => h.handleNetworkReplay(a))
127
+ }
128
+ ]
129
+ };
130
+ //#endregion
131
+ export { manifest as default };