@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.
Files changed (187) hide show
  1. package/README.md +2 -2
  2. package/README.zh.md +2 -2
  3. package/dist/{AntiCheatDetector-BNk-EoBt.mjs → AntiCheatDetector-CqGDXmfc.mjs} +159 -53
  4. package/dist/{CodeInjector-Cq8q01kp.mjs → CodeInjector-BdjRfNx7.mjs} +5 -5
  5. package/dist/{ConsoleMonitor-CPVQW1Y-.mjs → ConsoleMonitor-DykL3IAw.mjs} +85 -17
  6. package/dist/{DetailedDataManager-BQQcxh64.mjs → DetailedDataManager-HT49OrvF.mjs} +1 -1
  7. package/dist/{ExtensionManager-CWYgw0YW.mjs → ExtensionManager-BDMsY2Dz.mjs} +15 -8
  8. package/dist/{HardwareBreakpoint-B9gZCdFP.mjs → HardwareBreakpoint-Cc2AFq1Y.mjs} +3 -3
  9. package/dist/{HeapAnalyzer-BLDH0dCv.mjs → HeapAnalyzer-DruMgsgj.mjs} +20 -20
  10. package/dist/{HookGeneratorBuilders.core.generators.storage-CtcdK78Q.mjs → HookGeneratorBuilders.core.generators.storage-CTbB4Lcx.mjs} +1 -74
  11. package/dist/{InstrumentationSession-CvPC7Jwy.mjs → InstrumentationSession-DLH0vd-z.mjs} +2 -2
  12. package/dist/{MemoryController-CbVdCIJF.mjs → MemoryController-CMtviNW_.mjs} +3 -3
  13. package/dist/{MemoryScanSession-BsDZbLYm.mjs → MemoryScanSession-ITgb_NMi.mjs} +2 -2
  14. package/dist/{MemoryScanner-Bcpml6II.mjs → MemoryScanner-CiL7Z3ey.mjs} +12 -9
  15. package/dist/{NativeMemoryManager.impl-dZtA1ZGn.mjs → NativeMemoryManager.impl-D9Lkovvn.mjs} +13 -10
  16. package/dist/{NativeMemoryManager.utils-B-FjA2mJ.mjs → NativeMemoryManager.utils-BBlAixF5.mjs} +1 -1
  17. package/dist/{PEAnalyzer-D1lzJ_VG.mjs → PEAnalyzer-DMQ44gen.mjs} +15 -15
  18. package/dist/{PageController-Bqm2kZ_X.mjs → PageController-BPJNqqBN.mjs} +18 -4
  19. package/dist/{PointerChainEngine-BOhyVsjx.mjs → PointerChainEngine-K7wN8Z-w.mjs} +10 -7
  20. package/dist/ProcessRegistry-zGg12QbE.mjs +74 -0
  21. package/dist/{ResponseBuilder-D3iFYx2N.mjs → ResponseBuilder-CJXWmWNw.mjs} +10 -10
  22. package/dist/{ScriptManager-aHHq0X7U.mjs → ScriptManager-ZuWD-0Jg.mjs} +195 -192
  23. package/dist/{Speedhack-CqdIFlQl.mjs → Speedhack-D-z0umeT.mjs} +2 -2
  24. package/dist/{StructureAnalyzer-DhFaPvRO.mjs → StructureAnalyzer-Cav5AVSL.mjs} +9 -6
  25. package/dist/{ToolCatalog-C0JGZoOm.mjs → ToolCatalog-5OJdMiF0.mjs} +81 -81
  26. package/dist/{ToolProbe-oC7aPrkv.mjs → ToolProbe-DbCFGyrg.mjs} +1 -1
  27. package/dist/{ToolRegistry-BjaF4oNz.mjs → ToolRegistry-B9krbTtI.mjs} +51 -2
  28. package/dist/{ToolRouter.policy-BWV67ZK-.mjs → ToolRouter.policy-BGDAGyeH.mjs} +60 -20
  29. package/dist/TraceRecorder-B41Z5XBj.mjs +1286 -0
  30. package/dist/{Win32API-CePkipZY.mjs → Win32API-C2kjj0ze.mjs} +18 -12
  31. package/dist/{Win32Debug-BvKs-gxc.mjs → Win32Debug-CKrGOTpo.mjs} +2 -2
  32. package/dist/{WorkflowEngine-CuvkZtWu.mjs → WorkflowEngine-DJ6M4opp.mjs} +226 -255
  33. package/dist/analysis-BHeJW2Nb.mjs +1234 -0
  34. package/dist/{antidebug-CqDTB_uk.mjs → antidebug-BRKeyt27.mjs} +3 -3
  35. package/dist/{artifactRetention-CFEprwPw.mjs → artifactRetention-CPXkUJXp.mjs} +13 -6
  36. package/dist/{artifacts-Bk2-_uPq.mjs → artifacts-DkfosXH3.mjs} +1 -1
  37. package/dist/authorization-schema-DRqyJMSk.mjs +31 -0
  38. package/dist/{binary-instrument-CXfpx6fT.mjs → binary-instrument--V3MAhJ4.mjs} +19 -27
  39. package/dist/bind-helpers-ClV34xdn.mjs +42 -0
  40. package/dist/{boringssl-inspector-BH2D3VKc.mjs → boringssl-inspector-Bo_LOLaS.mjs} +1 -1
  41. package/dist/{browser-BpOr5PEx.mjs → browser-Dx3_S2cG.mjs} +324 -37
  42. package/dist/capabilities-CcHlvWgK.mjs +33 -0
  43. package/dist/{constants-B0OANIBL.mjs → constants-CDZLOoVv.mjs} +18 -3
  44. package/dist/{coordination-qUbyF8KU.mjs → coordination-DgItD9DL.mjs} +2 -2
  45. package/dist/{debugger-gnKxRSN0.mjs → debugger-RS3RSAqs.mjs} +30 -13
  46. package/dist/definitions-BEoYofW5.mjs +47 -0
  47. package/dist/{definitions-bAhHQJq9.mjs → definitions-BRaefg3u.mjs} +11 -5
  48. package/dist/{definitions-DVGfrn7y.mjs → definitions-BbkvZkiv.mjs} +2 -2
  49. package/dist/definitions-BtWSHJ3o.mjs +17 -0
  50. package/dist/{definitions-BMfYXoNC.mjs → definitions-C1gCHO0i.mjs} +1 -1
  51. package/dist/{definitions-C1UvM5Iy.mjs → definitions-CDOg_b-l.mjs} +14 -2
  52. package/dist/definitions-CVPD9hzZ.mjs +54 -0
  53. package/dist/{definitions-Cke7zEb8.mjs → definitions-Cea8Lgl7.mjs} +1 -1
  54. package/dist/definitions-DAgIyjxM.mjs +10 -0
  55. package/dist/{definitions-B4rAvHNZ.mjs → definitions-DJA27nsL.mjs} +12 -9
  56. package/dist/{definitions-ClJLzsJQ.mjs → definitions-DKPFU3LW.mjs} +1 -1
  57. package/dist/{definitions-D3VsGcvz.mjs → definitions-DPRpZQ96.mjs} +7 -7
  58. package/dist/{definitions-B18eyf0B.mjs → definitions-DUE5gmdn.mjs} +1 -1
  59. package/dist/definitions-DYVjOtxa.mjs +26 -0
  60. package/dist/{definitions-BB_4jnmy.mjs → definitions-DcYLVLCo.mjs} +1 -1
  61. package/dist/{definitions-Beid2EB3.mjs → definitions-Pp5LI2H4.mjs} +1 -1
  62. package/dist/definitions-j9KdHVNR.mjs +14 -0
  63. package/dist/definitions-uzkjBwa7.mjs +258 -0
  64. package/dist/{definitions-Cq-zroAU.mjs → definitions-va-AnLuQ.mjs} +4 -4
  65. package/dist/{encoding-Bvz5jLRv.mjs → encoding-DJeqHmpd.mjs} +18 -4
  66. package/dist/{evidence-graph-bridge-C_fv9PuC.mjs → evidence-graph-bridge-DcYizFk2.mjs} +1 -0
  67. package/dist/{factory-DxlGh9Xf.mjs → factory-C90tBff6.mjs} +6 -6
  68. package/dist/flat-target-session-Dgax2Cy3.mjs +29 -0
  69. package/dist/{graphql-DYWzJ29s.mjs → graphql-CoHrhweh.mjs} +205 -34
  70. package/dist/{handlers-C67ktuRN.mjs → handlers-4jmR0nMs.mjs} +220 -32
  71. package/dist/{handlers-DlCJN4Td.mjs → handlers-BAHPxcch.mjs} +122 -90
  72. package/dist/{handlers-9sAbfIg-.mjs → handlers-BOs9b907.mjs} +849 -801
  73. package/dist/{handlers-DxGIq15_2.mjs → handlers-BWXEy6ef.mjs} +16 -16
  74. package/dist/{handlers-tB9Mp9ZK.mjs → handlers-Bndn6QvE.mjs} +31 -4
  75. package/dist/{handlers-CTsDAO6p.mjs → handlers-BqC4bD4s.mjs} +1 -1
  76. package/dist/{handlers-C87g8oCe.mjs → handlers-BtYq60bM2.mjs} +1 -1
  77. package/dist/{handlers-DeLOCd5m.mjs → handlers-BzgcB4iv.mjs} +17 -17
  78. package/dist/{handlers-Cgyg6c0U.mjs → handlers-CRyRWj2b.mjs} +237 -23
  79. package/dist/{handlers-U6L4xhuF.mjs → handlers-CVv2H1uq.mjs} +24 -17
  80. package/dist/{handlers-tiy7EIBp.mjs → handlers-Dl5a7JS4.mjs} +3 -3
  81. package/dist/{handlers-D6j6yka7.mjs → handlers-Dx2d7jt7.mjs} +1893 -1480
  82. package/dist/{handlers-Bl8zkwz1.mjs → handlers-Dz9PYsCa.mjs} +95 -6
  83. package/dist/handlers-HujRKC3b.mjs +661 -0
  84. package/dist/{handlers.impl-DS0d9fUw.mjs → handlers.impl-XWXkQfyi.mjs} +70 -24
  85. package/dist/{hooks-CzCWByww.mjs → hooks-B1B8NRHL.mjs} +3 -3
  86. package/dist/index.mjs +154 -144
  87. package/dist/{maintenance-P7ePRXQC.mjs → maintenance-PRMkLVRW.mjs} +35 -30
  88. package/dist/manifest-67Bok-Si.mjs +58 -0
  89. package/dist/{manifest-B3QVVeBS.mjs → manifest-6lNTMZAB2.mjs} +33 -28
  90. package/dist/manifest-B2duEHiH.mjs +90 -0
  91. package/dist/manifest-B6EY9Vm8.mjs +57 -0
  92. package/dist/{manifest-gZ4s_UtG.mjs → manifest-B6nKSbyY.mjs} +32 -33
  93. package/dist/{manifest-2ToTpjv8.mjs → manifest-BL8AQNPF.mjs} +31 -31
  94. package/dist/{manifest-DzwvxPJX.mjs → manifest-BSZvJJmV.mjs} +23 -14
  95. package/dist/{manifest-Sc_0JQ13.mjs → manifest-BU7qzUyX.mjs} +23 -23
  96. package/dist/{manifest-CT7zZBV1.mjs → manifest-Bl62e8WK.mjs} +24 -23
  97. package/dist/manifest-Bo5cXjdt.mjs +82 -0
  98. package/dist/manifest-BpS4gtUK.mjs +1347 -0
  99. package/dist/manifest-Bv65_e2W.mjs +101 -0
  100. package/dist/manifest-BytNIF4Z.mjs +117 -0
  101. package/dist/{manifest-BqrQ4Tpj.mjs → manifest-C-xtsjS3.mjs} +23 -23
  102. package/dist/{manifest-NXctwWQq.mjs → manifest-CDYl7OhA.mjs} +36 -38
  103. package/dist/manifest-CRZ3xmkD.mjs +61 -0
  104. package/dist/manifest-CoW6u4Tp.mjs +132 -0
  105. package/dist/manifest-Cq5zN_8A.mjs +50 -0
  106. package/dist/{manifest-CAhOuvSl.mjs → manifest-D7YZM_2e.mjs} +75 -85
  107. package/dist/{manifest-DCyjf4n2.mjs → manifest-DE_VrAeQ.mjs} +27 -7
  108. package/dist/manifest-DGsXSCpT.mjs +39 -0
  109. package/dist/{manifest-BB2J8IMJ.mjs → manifest-DJ2vfEuW.mjs} +48 -41
  110. package/dist/{manifest-3g71z6Bg.mjs → manifest-DPXDYhEu.mjs} +26 -25
  111. package/dist/manifest-Dd4fQb0a.mjs +322 -0
  112. package/dist/{manifest-CXsRWjjI.mjs → manifest-Deq6opGg.mjs} +95 -96
  113. package/dist/{manifest-C9RT5nk32.mjs → manifest-DfJTafJK.mjs} +14 -11
  114. package/dist/manifest-DgOdgN_j.mjs +50 -0
  115. package/dist/{manifest-BmtZzQiQ2.mjs → manifest-DlbMW4v4.mjs} +17 -15
  116. package/dist/{manifest-DrbmZcFl2.mjs → manifest-DmVfbH0w.mjs} +212 -91
  117. package/dist/manifest-Dog6Ddjr.mjs +109 -0
  118. package/dist/manifest-DvgU5FWb.mjs +58 -0
  119. package/dist/manifest-HsfDBs7j.mjs +50 -0
  120. package/dist/manifest-I8oQHvCG.mjs +186 -0
  121. package/dist/manifest-NvH_a-av.mjs +786 -0
  122. package/dist/{manifest-Dh8WBmEW.mjs → manifest-cEJU1v0Z.mjs} +24 -24
  123. package/dist/manifest-wOl5XLB12.mjs +112 -0
  124. package/dist/{modules-C184v-S9.mjs → modules-tZozf0LQ.mjs} +130 -860
  125. package/dist/{mojo-ipc-B_H61Afw.mjs → mojo-ipc-DXNEXEqb.mjs} +141 -26
  126. package/dist/{network-671Cw6hV.mjs → network-CPVvwvFg.mjs} +1329 -823
  127. package/dist/{outputPaths-B1uGmrWZ.mjs → outputPaths-um7lCRY3.mjs} +4 -8
  128. package/dist/{platform-WmNn8Sxb.mjs → platform-CYeFoTWp.mjs} +101 -10
  129. package/dist/{process-QcbIy5Zq.mjs → process-BTbgcVc6.mjs} +251 -346
  130. package/dist/{proxy-DqNs0bAd.mjs → proxy-r8YN6nP1.mjs} +30 -8
  131. package/dist/{registry-D-6e18lB.mjs → registry-Bl8ZQW61.mjs} +3 -3
  132. package/dist/{response-BQVP-xUn.mjs → response-CWhh2aLo.mjs} +7 -1
  133. package/dist/{shared-state-board-DV-dpHFJ.mjs → shared-state-board-BoZnSoj-.mjs} +2 -2
  134. package/dist/{sourcemap-Dq8ez8vS.mjs → sourcemap-BIDHUVXy.mjs} +350 -66
  135. package/dist/{streaming-BUQ0VJsg.mjs → streaming-Dal6utPp.mjs} +13 -13
  136. package/dist/{tool-builder-DCbIC5Eo.mjs → tool-builder-BHJp32mV.mjs} +1 -1
  137. package/dist/{transform-CiYJfNX0.mjs → transform-DRVgGG90.mjs} +18 -14
  138. package/dist/wasm-BYx5UOeG.mjs +1044 -0
  139. package/dist/webcrack-Be0_FccV.mjs +747 -0
  140. package/dist/{workflow-f3xJOcjx.mjs → workflow-BpuKEtvn.mjs} +8 -8
  141. package/package.json +76 -43
  142. package/dist/TraceRecorder-DgxyVbdQ.mjs +0 -519
  143. package/dist/analysis-CL9uACt9.mjs +0 -463
  144. package/dist/bind-helpers-xFfRF-qm.mjs +0 -22
  145. package/dist/definitions-6M-eejaT.mjs +0 -53
  146. package/dist/definitions-B3QdlrHv.mjs +0 -34
  147. package/dist/definitions-CXEI7QC72.mjs +0 -216
  148. package/dist/definitions-C_4r7Fo-2.mjs +0 -14
  149. package/dist/definitions-CkFDALoa.mjs +0 -26
  150. package/dist/definitions-Cy3Sl6gV.mjs +0 -34
  151. package/dist/definitions-LKpC3-nL.mjs +0 -9
  152. package/dist/handlers-DdFzXLvF.mjs +0 -446
  153. package/dist/manifest-82baTv4U.mjs +0 -45
  154. package/dist/manifest-BKbgbSiY.mjs +0 -60
  155. package/dist/manifest-Bcf-TJzH.mjs +0 -848
  156. package/dist/manifest-Bnd7kqEY.mjs +0 -55
  157. package/dist/manifest-BqQX6OQC2.mjs +0 -65
  158. package/dist/manifest-Br4RPFt5.mjs +0 -370
  159. package/dist/manifest-C5qDjysN.mjs +0 -107
  160. package/dist/manifest-CBYWCUBJ.mjs +0 -51
  161. package/dist/manifest-CFADCRa1.mjs +0 -37
  162. package/dist/manifest-CQVhavRF.mjs +0 -114
  163. package/dist/manifest-CV12bcrF.mjs +0 -121
  164. package/dist/manifest-CZLUCfG02.mjs +0 -95
  165. package/dist/manifest-D6phHKFd.mjs +0 -131
  166. package/dist/manifest-DHsnKgP6.mjs +0 -60
  167. package/dist/manifest-Df_dliIe.mjs +0 -55
  168. package/dist/manifest-DhKRAT8_.mjs +0 -92
  169. package/dist/manifest-DlpTj4ic2.mjs +0 -193
  170. package/dist/manifest-DuwHjUa5.mjs +0 -70
  171. package/dist/manifest-qSleDqdO.mjs +0 -1023
  172. package/dist/wasm-DQTnHDs4.mjs +0 -531
  173. /package/dist/{CacheAdapters-CDe5WPSV.mjs → CacheAdapters-jJFy20G-.mjs} +0 -0
  174. /package/dist/{DarwinAPI-BNPxu0RH.mjs → DarwinAPI-ETyy0xyo.mjs} +0 -0
  175. /package/dist/{EventBus-DgPmwpeu.mjs → EventBus-DFKvADm3.mjs} +0 -0
  176. /package/dist/{EvidenceGraphBridge-SFesNera.mjs → EvidenceGraphBridge-318Oi0Lf.mjs} +0 -0
  177. /package/dist/{FingerprintManager-gzWtkKuf.mjs → FingerprintManager-BN4UQWnX.mjs} +0 -0
  178. /package/dist/{PrerequisiteError-Dl33Svkz.mjs → PrerequisiteError-TuyZIs6n.mjs} +0 -0
  179. /package/dist/{ReverseEvidenceGraph-Dlsk94LC.mjs → ReverseEvidenceGraph-C02-gXOh.mjs} +0 -0
  180. /package/dist/{StealthVerifier-Bo4T3bz8.mjs → StealthVerifier-BWmPgQsv.mjs} +0 -0
  181. /package/dist/{VersionDetector-CwVLVdDM.mjs → VersionDetector-K3V4vGsw.mjs} +0 -0
  182. /package/dist/{betterSqlite3-0pqusHHH.mjs → betterSqlite3-DLSBZodi.mjs} +0 -0
  183. /package/dist/{concurrency-Bt0yv1kJ.mjs → concurrency-Drev_Vz9.mjs} +0 -0
  184. /package/dist/{formatAddress-DVkj9kpI.mjs → formatAddress-nnMvEohD.mjs} +0 -0
  185. /package/dist/{parse-args-BlRjqlkL.mjs → parse-args-B4cY5Vx5.mjs} +0 -0
  186. /package/dist/{ssrf-policy-ZaUfvhq7.mjs → ssrf-policy-Dsqd-DTX.mjs} +0 -0
  187. /package/dist/{types-CPhOReNX.mjs → types-DDBWs9UP.mjs} +0 -0
@@ -1,7 +1,8 @@
1
1
  import { n as __require } from "./chunk-CjcI7cDX.mjs";
2
- import { Ht as MOJO_MONITOR_TIMEOUT_MS } from "./constants-B0OANIBL.mjs";
3
- import { a as argString, r as argNumber } from "./parse-args-BlRjqlkL.mjs";
4
- import "./manifest-B3QVVeBS.mjs";
2
+ import { Ut as MOJO_MONITOR_TIMEOUT_MS } from "./constants-CDZLOoVv.mjs";
3
+ import { a as argString, r as argNumber } from "./parse-args-B4cY5Vx5.mjs";
4
+ import { n as capabilityReport, t as capabilityFailure } from "./capabilities-CcHlvWgK.mjs";
5
+ import "./manifest-6lNTMZAB2.mjs";
5
6
  import { execFile, spawn } from "node:child_process";
6
7
  //#region src/modules/mojo-ipc/MojoMonitor.ts
7
8
  function getDefaultInterfaces() {
@@ -91,9 +92,11 @@ rpc.exports = {
91
92
  var MojoMonitor = class {
92
93
  active = false;
93
94
  simulationMode = false;
95
+ fridaProbeSucceeded = false;
94
96
  deviceId;
95
97
  messages = [];
96
98
  interfaces = /* @__PURE__ */ new Map();
99
+ observedInterfaceNames = /* @__PURE__ */ new Set();
97
100
  availability = {
98
101
  available: false,
99
102
  fridaAvailable: false,
@@ -101,7 +104,7 @@ var MojoMonitor = class {
101
104
  reason: "Not yet initialized. Call start() to probe availability."
102
105
  };
103
106
  constructor() {
104
- for (const item of getDefaultInterfaces()) this.interfaces.set(item.name, { ...item });
107
+ this.resetInterfaces();
105
108
  }
106
109
  isAvailable() {
107
110
  return this.availability.available;
@@ -109,9 +112,19 @@ var MojoMonitor = class {
109
112
  getUnavailableReason() {
110
113
  return this.availability.reason;
111
114
  }
115
+ getAvailabilitySnapshot() {
116
+ return { ...this.availability };
117
+ }
118
+ async probeAvailability() {
119
+ this.availability = await detectAvailability();
120
+ return this.getAvailabilitySnapshot();
121
+ }
112
122
  isSimulationMode() {
113
123
  return this.simulationMode;
114
124
  }
125
+ didFridaProbeSucceed() {
126
+ return this.fridaProbeSucceeded;
127
+ }
115
128
  setSimulationMode(enabled) {
116
129
  this.simulationMode = enabled;
117
130
  }
@@ -124,20 +137,22 @@ var MojoMonitor = class {
124
137
  async start(deviceId) {
125
138
  this.deviceId = deviceId;
126
139
  this.availability = await detectAvailability();
140
+ this.resetInterfaces();
141
+ this.simulationMode = false;
142
+ this.fridaProbeSucceeded = false;
127
143
  if (!this.availability.available) {
128
144
  this.active = false;
129
145
  return;
130
146
  }
131
147
  this.active = true;
132
- this.resetPendingCounts();
133
148
  if (this.availability.fridaCliAvailable) await this.captureWithFrida(deviceId);
134
149
  else this.simulationMode = true;
135
150
  }
136
151
  async stop() {
137
152
  this.active = false;
138
153
  this.deviceId = void 0;
139
- this.messages.length = 0;
140
- this.resetPendingCounts();
154
+ this.fridaProbeSucceeded = false;
155
+ this.resetInterfaces();
141
156
  }
142
157
  async captureMessages(filter = {}) {
143
158
  if (!this.active) return [];
@@ -157,12 +172,23 @@ var MojoMonitor = class {
157
172
  pendingMessages: item.pendingMessages
158
173
  })).toSorted((left, right) => left.name.localeCompare(right.name));
159
174
  }
175
+ hasObservedInterfaces() {
176
+ return this.observedInterfaceNames.size > 0;
177
+ }
178
+ getObservedInterfaceCount() {
179
+ return this.observedInterfaceNames.size;
180
+ }
181
+ getInterfaceCatalogSource() {
182
+ if (this.observedInterfaceNames.size === 0) return "seeded-defaults";
183
+ if (this.observedInterfaceNames.size >= this.interfaces.size) return "observed";
184
+ return "mixed";
185
+ }
160
186
  async getMessages(options) {
161
187
  if (!this.active) return {
162
188
  messages: [],
163
189
  totalAvailable: 0,
164
190
  filtered: false,
165
- _simulation: this.simulationMode
191
+ simulation: this.simulationMode
166
192
  };
167
193
  const filter = {};
168
194
  if (options?.interfaceName) filter.interfaceName = options.interfaceName;
@@ -172,12 +198,13 @@ var MojoMonitor = class {
172
198
  messages: allMessages.slice(0, limit),
173
199
  totalAvailable: allMessages.length,
174
200
  filtered: !!options?.interfaceName,
175
- _simulation: this.simulationMode
201
+ simulation: this.simulationMode
176
202
  };
177
203
  }
178
204
  recordMessage(message, version = 1) {
179
205
  if (!this.active) return;
180
206
  this.messages.push({ ...message });
207
+ this.observedInterfaceNames.add(message.interfaceName);
181
208
  const existing = this.interfaces.get(message.interfaceName);
182
209
  if (existing) {
183
210
  existing.pendingMessages += 1;
@@ -205,20 +232,22 @@ var MojoMonitor = class {
205
232
  windowsHide: true
206
233
  }, (error) => {
207
234
  if (error) {
208
- this.simulationMode = true;
209
235
  reject(error);
210
236
  return;
211
237
  }
212
- this.simulationMode = false;
213
238
  resolve();
214
239
  }).stdin?.end(script);
240
+ }).then(() => {
241
+ this.fridaProbeSucceeded = true;
215
242
  }).catch(() => {
216
- this.simulationMode = true;
243
+ this.fridaProbeSucceeded = false;
217
244
  });
245
+ this.simulationMode = true;
218
246
  }
219
247
  recomputePendingCounts() {
220
248
  this.resetPendingCounts();
221
249
  for (const message of this.messages) {
250
+ this.observedInterfaceNames.add(message.interfaceName);
222
251
  const item = this.interfaces.get(message.interfaceName);
223
252
  if (item) item.pendingMessages += 1;
224
253
  else this.interfaces.set(message.interfaceName, {
@@ -231,6 +260,12 @@ var MojoMonitor = class {
231
260
  resetPendingCounts() {
232
261
  for (const item of this.interfaces.values()) item.pendingMessages = 0;
233
262
  }
263
+ resetInterfaces() {
264
+ this.messages.length = 0;
265
+ this.interfaces.clear();
266
+ this.observedInterfaceNames.clear();
267
+ for (const item of getDefaultInterfaces()) this.interfaces.set(item.name, { ...item });
268
+ }
234
269
  };
235
270
  //#endregion
236
271
  //#region src/modules/mojo-ipc/MojoDecoder.ts
@@ -417,14 +452,21 @@ var MojoDecoder = class {
417
452
  };
418
453
  //#endregion
419
454
  //#region src/server/domains/mojo-ipc/handlers.impl.ts
420
- function unavailablePayload(reason, action) {
455
+ function getMojoFix(reason) {
456
+ return reason.includes("JSHOOK_ENABLE_MOJO_IPC") ? "Unset JSHOOK_ENABLE_MOJO_IPC or set it to 1, then retry." : "Install Frida and ensure the Chromium target is running.";
457
+ }
458
+ function unavailablePayload(reason, tool) {
421
459
  return {
422
- success: false,
423
- available: false,
424
- action,
460
+ ...capabilityFailure(tool, "mojo_ipc_monitoring", reason, getMojoFix(reason)),
425
461
  error: reason
426
462
  };
427
463
  }
464
+ const LIVE_CAPTURE_REASON = "Current Mojo IPC backend only exposes a seeded interface catalog and simulated capture. Live Chromium Mojo hooks are not implemented in this build.";
465
+ const LIVE_CAPTURE_FIX = "No user-side fix is available in this build. Treat mojo_monitor/mojo_list_interfaces/mojo_messages_get as simulation-only until real Frida hooks are implemented.";
466
+ function getFridaProbeSucceeded(monitor) {
467
+ const maybeMonitor = monitor;
468
+ return typeof maybeMonitor.didFridaProbeSucceed === "function" ? maybeMonitor.didFridaProbeSucceed() : false;
469
+ }
428
470
  var MojoIPCHandlers = class {
429
471
  constructor(monitor, decoder, eventBus) {
430
472
  this.monitor = monitor;
@@ -434,17 +476,82 @@ var MojoIPCHandlers = class {
434
476
  async handleMojoMonitorDispatch(args) {
435
477
  return String(args["action"] ?? "") === "stop" ? this.handleMojoMonitorStop() : this.handleMojoMonitorStart(args);
436
478
  }
479
+ async handleMojoIpcCapabilities() {
480
+ const monitor = this.getMonitor();
481
+ const fridaProbeSucceeded = getFridaProbeSucceeded(monitor);
482
+ const availability = typeof monitor.probeAvailability === "function" ? await monitor.probeAvailability() : {
483
+ available: monitor.isAvailable(),
484
+ reason: monitor.getUnavailableReason(),
485
+ fridaAvailable: monitor.isAvailable(),
486
+ fridaCliAvailable: false
487
+ };
488
+ return capabilityReport("mojo_ipc_capabilities", [
489
+ {
490
+ capability: "mojo_ipc_monitoring",
491
+ status: availability.available ? "available" : "unavailable",
492
+ reason: availability.reason,
493
+ fix: availability.available ? void 0 : getMojoFix(availability.reason ?? ""),
494
+ details: {
495
+ tools: [
496
+ "mojo_monitor",
497
+ "mojo_list_interfaces",
498
+ "mojo_messages_get"
499
+ ],
500
+ fridaAvailable: availability.fridaAvailable,
501
+ fridaCliAvailable: availability.fridaCliAvailable,
502
+ fridaProbeSucceeded,
503
+ active: monitor.isActive(),
504
+ simulationMode: monitor.isSimulationMode(),
505
+ interfaceCatalogSource: monitor.getInterfaceCatalogSource(),
506
+ observedInterfaceCount: monitor.getObservedInterfaceCount(),
507
+ liveCaptureImplemented: false
508
+ }
509
+ },
510
+ {
511
+ capability: "mojo_live_capture",
512
+ status: "unavailable",
513
+ reason: LIVE_CAPTURE_REASON,
514
+ fix: LIVE_CAPTURE_FIX,
515
+ details: {
516
+ tools: [
517
+ "mojo_monitor",
518
+ "mojo_list_interfaces",
519
+ "mojo_messages_get"
520
+ ],
521
+ fridaAvailable: availability.fridaAvailable,
522
+ fridaCliAvailable: availability.fridaCliAvailable,
523
+ fridaProbeSucceeded,
524
+ active: monitor.isActive(),
525
+ simulationMode: monitor.isSimulationMode(),
526
+ interfaceCatalogSource: monitor.getInterfaceCatalogSource(),
527
+ observedInterfaceCount: monitor.getObservedInterfaceCount(),
528
+ fallbackMode: availability.available ? "simulation" : "none",
529
+ liveCaptureImplemented: false
530
+ }
531
+ },
532
+ {
533
+ capability: "mojo_payload_decode",
534
+ status: "available",
535
+ details: { tools: ["mojo_decode_message"] }
536
+ }
537
+ ]);
538
+ }
437
539
  async handleMojoMonitorStart(args) {
438
540
  const monitor = this.getMonitor();
439
- if (!monitor.isAvailable()) return unavailablePayload(monitor.getUnavailableReason() ?? "Mojo IPC monitoring is not available", "mojo_monitor");
440
541
  const deviceId = argString(args, "deviceId");
441
542
  await monitor.start(deviceId);
442
- return {
543
+ if (!monitor.isAvailable()) return unavailablePayload(monitor.getUnavailableReason() ?? "Mojo IPC monitoring is not available", "mojo_monitor");
544
+ const response = {
443
545
  success: true,
444
546
  available: true,
445
547
  started: monitor.isActive(),
446
- deviceId: monitor.getDeviceId() ?? null
548
+ deviceId: monitor.getDeviceId() ?? null,
549
+ simulation: monitor.isSimulationMode(),
550
+ interfaceCatalogSource: monitor.getInterfaceCatalogSource(),
551
+ observedInterfaceCount: monitor.getObservedInterfaceCount()
447
552
  };
553
+ if (monitor.isSimulationMode()) response.warningMessage = "Mojo IPC monitor is running in simulation mode. Real Frida-backed message capture is not active.";
554
+ return response;
448
555
  }
449
556
  async handleMojoMonitorStop() {
450
557
  const monitor = this.getMonitor();
@@ -453,7 +560,8 @@ var MojoIPCHandlers = class {
453
560
  return {
454
561
  success: true,
455
562
  available: true,
456
- started: false
563
+ started: false,
564
+ simulation: monitor.isSimulationMode()
457
565
  };
458
566
  }
459
567
  async handleMojoDecodeMessage(args) {
@@ -473,13 +581,18 @@ var MojoIPCHandlers = class {
473
581
  ...unavailablePayload(monitor.getUnavailableReason() ?? "Mojo IPC monitoring is not available", "mojo_list_interfaces"),
474
582
  interfaces: []
475
583
  };
476
- const interfaces = await monitor.listInterfaces();
477
- return {
584
+ const response = {
478
585
  success: true,
479
586
  available: true,
480
587
  active: monitor.isActive(),
481
- interfaces
588
+ interfaces: await monitor.listInterfaces(),
589
+ simulation: monitor.isSimulationMode(),
590
+ interfaceCatalogSource: monitor.getInterfaceCatalogSource(),
591
+ observedInterfaceCount: monitor.getObservedInterfaceCount()
482
592
  };
593
+ if (monitor.getInterfaceCatalogSource() === "seeded-defaults") response.warningMessage = "Interface list currently comes from the seeded default catalog; no live observed Mojo interfaces have been captured yet.";
594
+ else if (monitor.isSimulationMode()) response.warningMessage = "Mojo IPC monitor is running in simulation mode. Interface counts may not reflect live traffic.";
595
+ return response;
483
596
  }
484
597
  async handleMojoMessagesGet(args) {
485
598
  const monitor = this.getMonitor();
@@ -488,7 +601,7 @@ var MojoIPCHandlers = class {
488
601
  messages: [],
489
602
  totalAvailable: 0,
490
603
  filtered: false,
491
- _simulation: true
604
+ simulation: true
492
605
  };
493
606
  const limit = argNumber(args, "limit");
494
607
  const interfaceName = argString(args, "interface");
@@ -503,13 +616,15 @@ var MojoIPCHandlers = class {
503
616
  messages: result.messages,
504
617
  totalAvailable: result.totalAvailable,
505
618
  filtered: result.filtered,
506
- _simulation: result._simulation
619
+ simulation: result.simulation,
620
+ interfaceCatalogSource: monitor.getInterfaceCatalogSource(),
621
+ observedInterfaceCount: monitor.getObservedInterfaceCount()
507
622
  };
508
623
  if (result.messages && Array.isArray(result.messages) && result.messages.length > 0) this.eventBus?.emit("mojo:message_captured", {
509
624
  messageCount: result.messages.length,
510
625
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
511
626
  });
512
- if (monitor.isSimulationMode()) response._warning = "Mojo IPC is operating in simulation mode. Messages are not captured from real Frida hooks. Install Frida for live IPC monitoring.";
627
+ if (monitor.isSimulationMode()) response.warningMessage = "Mojo IPC is operating in simulation mode. Messages are not captured from real Frida hooks. Install Frida for live IPC monitoring.";
513
628
  return response;
514
629
  }
515
630
  getMonitor() {