rea-agents 6.3.0 → 6.4.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 (487) hide show
  1. package/README.md +7 -4
  2. package/bridge/ghidra/ReaGhidraApplySeeds.java +151 -0
  3. package/bridge/ghidra/ReaGhidraBridge.java +597 -209
  4. package/bridge/ghidra/ReaGhidraNoReturnFix.java +123 -0
  5. package/dist/adb/AdbConfiguration.js +88 -0
  6. package/dist/adb/AdbDeviceOutput.js +186 -0
  7. package/dist/adb/AdbProvider.js +1190 -0
  8. package/dist/adb/AdbShellOutput.js +309 -0
  9. package/dist/android/AndroidTargetSnapshot.js +104 -22
  10. package/dist/android/JadxConfiguration.js +44 -24
  11. package/dist/android/JadxProvider.js +51 -19
  12. package/dist/apktool/ApktoolConfiguration.js +84 -0
  13. package/dist/apktool/ApktoolDecodeOutput.js +59 -0
  14. package/dist/apktool/ApktoolProvider.js +506 -0
  15. package/dist/application/AnalysisProvider.js +8 -2
  16. package/dist/application/AppBundleExecutable.js +27 -22
  17. package/dist/application/BinaryTargetResolver.js +22 -2
  18. package/dist/application/CapabilityInventory.js +11 -1
  19. package/dist/application/ClientConfigurationDocument.js +70 -0
  20. package/dist/application/ClientConfigurationFiles.js +91 -0
  21. package/dist/application/ClientRegistrationEnvironment.js +35 -0
  22. package/dist/application/ClientRegistrationStatus.js +66 -31
  23. package/dist/application/DirectAnalysis.js +2 -2
  24. package/dist/application/DirectAnalysisCleanup.js +1 -1
  25. package/dist/application/DirectAnalysisStatus.js +1 -1
  26. package/dist/application/Doctor.js +5 -3
  27. package/dist/application/DoctorDiagnostics.js +1 -1
  28. package/dist/application/EvidenceBundleCommands.js +6 -12
  29. package/dist/application/GeminiClientSettings.js +139 -0
  30. package/dist/application/HermesClientHome.js +115 -0
  31. package/dist/application/HopperDownload.js +39 -0
  32. package/dist/application/InvestigationProviders.js +6 -0
  33. package/dist/application/JsonFiles.js +6 -5
  34. package/dist/{cliJsonFile.js → application/JsonInputFile.js} +108 -35
  35. package/dist/application/LinuxHopper.js +4 -12
  36. package/dist/application/MacHopper.js +172 -149
  37. package/dist/application/MipsElfAbiFlags.js +140 -0
  38. package/dist/application/ProviderOperationExecution.js +31 -0
  39. package/dist/application/ReconstructionObligationCandidates.js +9 -3
  40. package/dist/application/ReferenceSourceImport.js +76 -29
  41. package/dist/application/ReferenceSourceImportEntries.js +18 -9
  42. package/dist/application/ReferenceSourceImportPolicy.js +99 -23
  43. package/dist/application/ReferenceSourceImportTypes.js +30 -22
  44. package/dist/application/ReferenceSourceVcsAdapter.js +145 -30
  45. package/dist/application/RegularFileRead.js +93 -7
  46. package/dist/application/Setup.js +54 -6
  47. package/dist/application/SetupClientConfiguration.js +116 -16
  48. package/dist/application/SetupHost.js +102 -24
  49. package/dist/application/SetupPlan.js +5 -8
  50. package/dist/application/SetupSkill.js +58 -39
  51. package/dist/application/SupportedClients.js +290 -65
  52. package/dist/application/Uninstall.js +158 -10
  53. package/dist/application/UpdateMaintenance.js +17 -21
  54. package/dist/application/Utf8JsonInput.js +7 -0
  55. package/dist/application/WebScriptExportService.js +131 -65
  56. package/dist/application/WebSourceLocationService.js +3 -0
  57. package/dist/application/adb/AdbDeviceAnalysisPort.js +1 -0
  58. package/dist/application/adb/AdbDeviceAnalysisService.js +13 -0
  59. package/dist/application/analysisView/AnalysisViewService.js +40 -2
  60. package/dist/application/apktool/ApktoolResourceAnalysisPort.js +1 -0
  61. package/dist/application/apktool/ApktoolResourceAnalysisService.js +13 -0
  62. package/dist/application/binary/AnalysisClientCleanup.js +0 -24
  63. package/dist/application/binary/BinarySession.js +2 -1
  64. package/dist/application/binaryDiagnostics/BinaryLayoutService.js +2 -1
  65. package/dist/application/binaryDiagnostics/PeResourcesPort.js +1 -0
  66. package/dist/application/binaryDiagnostics/PeResourcesService.js +111 -0
  67. package/dist/application/binaryDiagnostics/RecordedCrashService.js +2 -1
  68. package/dist/application/evm/EvmInterfaceService.js +3 -0
  69. package/dist/application/firmware/FirmwareAnalysisService.js +3 -0
  70. package/dist/application/investigation/InspectEvidenceBundle.js +18 -0
  71. package/dist/application/javascript/ElectronBoundaryGraphContext.js +3 -2
  72. package/dist/application/javascript/ElectronBoundaryGraphIpc.js +2 -2
  73. package/dist/application/javascript/ElectronBoundaryGraphNative.js +19 -6
  74. package/dist/application/javascript/ElectronBoundaryGraphWindows.js +3 -3
  75. package/dist/application/javascript/JavaScriptApplicationService.js +22 -11
  76. package/dist/application/javascript/JavaScriptApplicationWorkflowEvidence.js +5 -6
  77. package/dist/application/javascript/JavaScriptArtifactAnalysis.js +171 -30
  78. package/dist/application/javascript/JavaScriptArtifactGraphAccumulator.js +14 -16
  79. package/dist/application/javascript/JavaScriptArtifactGraphBuilder.js +67 -19
  80. package/dist/application/javascript/JavaScriptArtifactGraphBundlers.js +4 -3
  81. package/dist/application/javascript/JavaScriptArtifactGraphContext.js +11 -5
  82. package/dist/application/javascript/JavaScriptArtifactGraphFindings.js +19 -16
  83. package/dist/application/javascript/JavaScriptArtifactGraphStructure.js +92 -10
  84. package/dist/application/javascript/JavaScriptArtifactPathResolution.js +258 -235
  85. package/dist/application/javascript/JavaScriptArtifactReconstruction.js +115 -26
  86. package/dist/application/javascript/JavaScriptArtifactReconstructionInput.js +4 -1
  87. package/dist/application/javascript/JavaScriptModuleRelationships.js +6 -4
  88. package/dist/application/javascript/JavaScriptRecoveryService.js +3 -0
  89. package/dist/application/javascript/JavaScriptSemanticGraphAsyncProjection.js +9 -3
  90. package/dist/application/javascript/JavaScriptSemanticGraphBuilder.js +199 -61
  91. package/dist/application/javascript/JavaScriptSemanticGraphConstruction.js +12 -19
  92. package/dist/application/javascript/JavaScriptSemanticGraphDataProjection.js +4 -1
  93. package/dist/application/javascript/JavaScriptSemanticGraphFlowProjection.js +5 -3
  94. package/dist/application/javascript/JavaScriptSemanticGraphObjectProjection.js +5 -3
  95. package/dist/application/javascript/JavaScriptSemanticGraphValueProjection.js +19 -8
  96. package/dist/application/jeb/JebAnalysisPort.js +1 -0
  97. package/dist/application/jeb/JebAnalysisService.js +13 -0
  98. package/dist/application/managed/ManagedApplicationGraphService.js +1 -1
  99. package/dist/application/native/NativeUiActionTrace.js +16 -8
  100. package/dist/application/native/NativeValueTrace.js +23 -6
  101. package/dist/application/process/ProcessCli.js +25 -20
  102. package/dist/artifacts/ArtifactPaths.js +129 -8
  103. package/dist/artifacts/ArtifactProvider.js +20 -15
  104. package/dist/artifacts/ArtifactReader.js +23 -0
  105. package/dist/artifacts/ArtifactResourceScope.js +100 -0
  106. package/dist/artifacts/AsarArtifactReader.js +176 -102
  107. package/dist/artifacts/AsarHeader.js +24 -0
  108. package/dist/artifacts/DirectoryArtifactReader.js +168 -65
  109. package/dist/artifacts/MachOSliceArtifactReader.js +116 -39
  110. package/dist/artifacts/NativeDmgArtifactReader.js +29 -22
  111. package/dist/artifacts/SafeOutputTree.js +245 -70
  112. package/dist/artifacts/SafeOutputTreeCleanup.js +45 -0
  113. package/dist/artifacts/SafeOutputTreeCreationFailure.js +20 -0
  114. package/dist/artifacts/SafeOutputTreeIdentity.js +42 -0
  115. package/dist/artifacts/SafeOutputTreeReadback.js +33 -0
  116. package/dist/artifacts/ZipArtifactReader.js +77 -27
  117. package/dist/artifacts/apple/InterfaceBuilderAnalysis.js +58 -18
  118. package/dist/artifacts/apple/InterfaceBuilderDecodeBudget.js +62 -24
  119. package/dist/artifacts/apple/KeyedArchiveReader.js +32 -13
  120. package/dist/artifacts/extraction/ArtifactExtraction.js +110 -86
  121. package/dist/artifacts/inventory/ArtifactGraphConstruction.js +110 -43
  122. package/dist/artifacts/inventory/ArtifactInventory.js +5 -4
  123. package/dist/artifacts/inventory/classify.js +75 -32
  124. package/dist/artifacts/inventory/hashStableRootArtifact.js +48 -15
  125. package/dist/artifacts/inventory/reader.js +13 -5
  126. package/dist/artifacts/inventory/scanCanonical.js +62 -25
  127. package/dist/artifacts/inventory/scanReader.js +38 -11
  128. package/dist/artifacts/javascript/JavaScriptArtifactFiles.js +15 -9
  129. package/dist/artifacts/javascript/JavaScriptSourceAnalysis.js +3 -0
  130. package/dist/browser/BrowserScenarioPartialObservation.js +8 -2
  131. package/dist/browser/BrowserScenarioSecrets.js +52 -37
  132. package/dist/browser/CdpBrowserProvider.js +5 -0
  133. package/dist/browser/CdpCaptureDocuments.js +40 -6
  134. package/dist/browser/CdpCaptureDomSvg.js +210 -0
  135. package/dist/browser/CdpCaptureEventBodyShapes.js +4 -8
  136. package/dist/browser/CdpCaptureEventHandlers.js +26 -9
  137. package/dist/browser/CdpCaptureEvents.js +4 -9
  138. package/dist/browser/CdpConnection.js +22 -5
  139. package/dist/browser/CdpPageCapture.js +1 -1
  140. package/dist/browser/CdpTargetSession.js +30 -34
  141. package/dist/browser/CdpWebMcpDiscovery.js +32 -10
  142. package/dist/browser/ElectronFileScope.js +99 -9
  143. package/dist/browser/PlaywrightBrowserScenarioProvider.js +60 -4
  144. package/dist/browser/PlaywrightElectronActiveProvider.js +11 -6
  145. package/dist/browser/PlaywrightScenarioArtifacts.js +5 -5
  146. package/dist/browser/PlaywrightScenarioBrowser.js +69 -7
  147. package/dist/browser/PlaywrightScenarioSession.js +127 -54
  148. package/dist/browser/PlaywrightScenarioStorage.js +507 -0
  149. package/dist/browser/PngVisualDiff.js +198 -29
  150. package/dist/browser/WebSourceMapFetcher.js +3 -3
  151. package/dist/browser/assets/LocalWebScriptArtifacts.js +3 -1
  152. package/dist/browser/assets/PublishWebScripts.js +75 -20
  153. package/dist/browser/assets/WebArtifactReads.js +23 -1
  154. package/dist/browser/assets/WebSourceLocationArtifacts.js +1 -0
  155. package/dist/browser/execution/CdpExecutionCapture.js +3 -3
  156. package/dist/browser/execution/CdpPreciseCoverage.js +5 -8
  157. package/dist/browser/history/HarCapture.js +14 -0
  158. package/dist/browser/history/HarCaptureProcess.js +2 -10
  159. package/dist/browser/history/MitmproxyCaptureAdapter.js +3 -1
  160. package/dist/browser/modules/WebModuleArtifacts.js +1 -0
  161. package/dist/cli/adbCommands.js +337 -0
  162. package/dist/cli/analysisViewCommands.js +39 -1
  163. package/dist/cli/apktoolCommands.js +53 -0
  164. package/dist/cli/artifactCommands.js +8 -11
  165. package/dist/cli/binaryDiagnosticsCommands.js +19 -1
  166. package/dist/cli/browserAdvancedCommands.js +65 -36
  167. package/dist/cli/coreBinaryCommands.js +0 -5
  168. package/dist/cli/coreNativeCommands.js +1 -14
  169. package/dist/cli/electronCommands.js +6 -1
  170. package/dist/cli/evmCommands.js +13 -4
  171. package/dist/cli/firmwareCommands.js +7 -2
  172. package/dist/cli/javascriptApplicationAnalysis.js +17 -1
  173. package/dist/cli/javascriptRecoveryCommands.js +22 -15
  174. package/dist/cli/jebCommands.js +99 -0
  175. package/dist/cli/jsonOutput.js +11 -4
  176. package/dist/cli/referenceSourceImportStatus.js +7 -0
  177. package/dist/cli/setupCommands.js +15 -3
  178. package/dist/cli/utilityCommands.js +66 -18
  179. package/dist/cli/webScriptCommands.js +20 -1
  180. package/dist/cli/webSourceLocationCommands.js +21 -9
  181. package/dist/cli.js +6 -0
  182. package/dist/cliBrowserScenarioCommands.js +2 -1
  183. package/dist/cliCommandNames.js +32 -0
  184. package/dist/cliJsonInput.js +2 -2
  185. package/dist/cliObservationOptions.js +3 -0
  186. package/dist/composition/adb.js +3 -0
  187. package/dist/composition/apktool.js +3 -0
  188. package/dist/composition/binaryDiagnostics.js +4 -0
  189. package/dist/composition/directAnalysis.js +12 -4
  190. package/dist/composition/javascriptAnalysisWorkerProcess.js +48 -0
  191. package/dist/composition/jeb.js +6 -0
  192. package/dist/config/environment.js +10 -0
  193. package/dist/config/ghidraLanguageOverride.js +9 -0
  194. package/dist/config/mcpInputSchemaProfile.js +27 -0
  195. package/dist/config/parseConfig.js +28 -1
  196. package/dist/contracts/adb/adbToolContracts.js +353 -0
  197. package/dist/contracts/advertisedInputExamples.js +48 -0
  198. package/dist/contracts/analysisDetail.js +10 -0
  199. package/dist/contracts/analysisViewToolContracts.js +17 -2
  200. package/dist/contracts/apktool/apktoolToolContracts.js +33 -0
  201. package/dist/contracts/artifactToolContracts.js +8 -5
  202. package/dist/contracts/browserToolContracts.js +1 -1
  203. package/dist/contracts/compactInputSchema.js +256 -0
  204. package/dist/contracts/functionWorkflowToolContracts.js +1 -1
  205. package/dist/contracts/inputSchemaPresentation.js +10 -10
  206. package/dist/contracts/javascript/electronToolContracts.js +15 -3
  207. package/dist/contracts/javascript/javascriptRecoveryToolContracts.js +1 -1
  208. package/dist/contracts/jeb/jebToolContracts.js +64 -0
  209. package/dist/contracts/native/binaryDiagnosticsToolContracts.js +25 -3
  210. package/dist/contracts/officialToolContracts.js +5 -5
  211. package/dist/contracts/sessionToolContracts.js +2 -2
  212. package/dist/contracts/sessionToolSchemas.js +6 -2
  213. package/dist/contracts/toolContractExamples.js +6 -0
  214. package/dist/contracts/toolContractTypes.js +3 -0
  215. package/dist/contracts/toolContracts.js +6 -0
  216. package/dist/contracts/toolEffects.js +167 -0
  217. package/dist/contracts/toolOutputSchemaGroups.js +5 -3
  218. package/dist/contracts/toolSchemaMetadata.js +82 -7
  219. package/dist/domain/adb/adbDeviceAnalysis.js +583 -0
  220. package/dist/domain/analysisErrorCleanup.js +29 -0
  221. package/dist/domain/analysisErrorPresentation.js +18 -6
  222. package/dist/domain/analysisErrorProjection.js +4 -1
  223. package/dist/domain/analysisSnapshot.js +2 -1
  224. package/dist/domain/analysisView/analysisView.js +52 -2
  225. package/dist/domain/analysisView/binaryLayoutView.js +2 -0
  226. package/dist/domain/analysisView/javascriptApplicationView.js +2 -0
  227. package/dist/domain/analysisView/nativeFunctionView.js +155 -0
  228. package/dist/domain/android/androidApplication.js +25 -20
  229. package/dist/domain/apktool/apktoolResourceAnalysis.js +77 -0
  230. package/dist/domain/apple/appleApplication.js +40 -23
  231. package/dist/domain/apple/appleBundleAnatomy.js +95 -28
  232. package/dist/domain/apple/dyldPaths.js +9 -1
  233. package/dist/domain/apple/dylibResolution.js +2 -2
  234. package/dist/domain/apple/interfaceBuilderGraph.js +22 -19
  235. package/dist/domain/apple/interfaceBuilderKeyedArchive.js +10 -1
  236. package/dist/domain/artifactComparison.js +35 -7
  237. package/dist/domain/artifactGraph.js +5 -3
  238. package/dist/domain/artifactIdentity.js +30 -2
  239. package/dist/domain/artifactInspection.js +3 -43
  240. package/dist/domain/artifactIntegrityPolicy.js +10 -0
  241. package/dist/domain/artifactInventoryEvidence.js +11 -12
  242. package/dist/domain/artifactPathSyntax.js +1 -1
  243. package/dist/domain/binaryTarget.js +16 -0
  244. package/dist/domain/binaryTargetTypes.js +8 -1
  245. package/dist/domain/browserObservationSchemas.js +8 -4
  246. package/dist/domain/canonicalJsonDigestSteps.js +34 -12
  247. package/dist/domain/compactStringIdentity.js +9 -0
  248. package/dist/domain/evidence.js +2 -1
  249. package/dist/domain/evidenceRecordSummary.js +144 -0
  250. package/dist/domain/inputIssueProjection.js +16 -1
  251. package/dist/domain/javascript/electronStaticAnalysisBrowser.js +12 -13
  252. package/dist/domain/javascript/electronStaticAnalysisIpc.js +11 -20
  253. package/dist/domain/javascript/electronStaticAnalysisNative.js +70 -40
  254. package/dist/domain/javascript/electronStaticAnalysisValues.js +16 -0
  255. package/dist/domain/javascript/javascriptAnalysisResourceControls.js +45 -0
  256. package/dist/domain/javascript/javascriptApplicationAnalysis.js +4 -1
  257. package/dist/domain/javascript/javascriptApplicationChangeGraph.js +6 -6
  258. package/dist/domain/javascript/javascriptApplicationGraph.js +79 -18
  259. package/dist/domain/javascript/javascriptApplicationProjectionResources.js +35 -0
  260. package/dist/domain/javascript/javascriptApplicationVersionItems.js +28 -12
  261. package/dist/domain/javascript/javascriptApplicationVersionKeys.js +9 -1
  262. package/dist/domain/javascript/javascriptAstFingerprint.js +58 -31
  263. package/dist/domain/javascript/javascriptAstValues.js +32 -0
  264. package/dist/domain/javascript/javascriptElectronMemberWrites.js +50 -0
  265. package/dist/domain/javascript/javascriptModuleSemanticIr.js +15 -0
  266. package/dist/domain/javascript/javascriptNativeHandoff.js +6 -1
  267. package/dist/domain/javascript/javascriptRpcEndpoints.js +253 -0
  268. package/dist/domain/javascript/javascriptRuntimeLoadState.js +1 -3
  269. package/dist/domain/javascript/javascriptRuntimeReconciliationGraph.js +7 -2
  270. package/dist/domain/javascript/javascriptRuntimeStaticCandidates.js +8 -11
  271. package/dist/domain/javascript/javascriptSemanticAnalysis.js +190 -33
  272. package/dist/domain/javascript/javascriptSemanticCallableResults.js +42 -0
  273. package/dist/domain/javascript/javascriptSemanticCalls.js +8 -1
  274. package/dist/domain/javascript/javascriptSemanticDerivedAnalysis.js +15 -4
  275. package/dist/domain/javascript/javascriptSemanticFileProjection.js +1 -0
  276. package/dist/domain/javascript/javascriptSemanticFingerprints.js +42 -41
  277. package/dist/domain/javascript/javascriptSemanticGraph.js +69 -23
  278. package/dist/domain/javascript/javascriptSemanticGraphSchemas.js +2 -10
  279. package/dist/domain/javascript/javascriptSemanticIterationSources.js +40 -7
  280. package/dist/domain/javascript/javascriptSemanticMemberMutations.js +341 -87
  281. package/dist/domain/javascript/javascriptSemanticMutationValues.js +78 -35
  282. package/dist/domain/javascript/javascriptSemanticObjectReferences.js +381 -0
  283. package/dist/domain/javascript/javascriptSemanticObjects.js +7 -1
  284. package/dist/domain/javascript/javascriptSemanticProjection.js +52 -14
  285. package/dist/domain/javascript/javascriptSemanticPropertyPaths.js +77 -0
  286. package/dist/domain/javascript/javascriptSemanticQuery.js +27 -29
  287. package/dist/domain/javascript/javascriptSemanticQueryIdentity.js +1 -3
  288. package/dist/domain/javascript/javascriptSemanticReturnedReferences.js +219 -0
  289. package/dist/domain/javascript/javascriptSemanticReturns.js +13 -23
  290. package/dist/domain/javascript/javascriptSemanticState.js +22 -2
  291. package/dist/domain/javascript/javascriptSemanticTraversal.js +19 -1
  292. package/dist/domain/javascript/javascriptSemanticValues.js +47 -19
  293. package/dist/domain/javascript/javascriptSourceAnalysis.js +1 -0
  294. package/dist/domain/javascript/javascriptStaticAnalysis.js +29 -17
  295. package/dist/domain/javascript/javascriptStaticAnalysisBundler.js +8 -6
  296. package/dist/domain/javascript/javascriptStaticAnalysisCalls.js +49 -5
  297. package/dist/domain/javascript/javascriptStaticAnalysisFindings.js +8 -4
  298. package/dist/domain/javascript/javascriptStaticAnalysisState.js +1 -0
  299. package/dist/domain/jeb/jebAnalysis.js +114 -0
  300. package/dist/domain/jsonShape.js +63 -52
  301. package/dist/domain/jsonValue.js +3 -0
  302. package/dist/domain/managed/managedApplicationGraph.js +37 -0
  303. package/dist/domain/managed/managedApplicationGraphCoverage.js +8 -2
  304. package/dist/domain/managed/managedApplicationGraphNodes.js +32 -22
  305. package/dist/domain/managed/managedArtifact.js +1 -0
  306. package/dist/domain/managed/managedInspectionEvidence.js +13 -0
  307. package/dist/domain/native/nativeAotPe.js +1408 -0
  308. package/dist/domain/native/nativeInstruction.js +21 -0
  309. package/dist/domain/native/nativeMetadataRecovery.js +79 -6
  310. package/dist/domain/native/peResources.js +94 -0
  311. package/dist/domain/nativeConvention.js +33 -0
  312. package/dist/domain/process/processCapture.js +91 -1
  313. package/dist/domain/process/processCaptureExample.js +24 -0
  314. package/dist/domain/process/processCaptureValidation.js +79 -0
  315. package/dist/domain/process/processScenario.js +59 -7
  316. package/dist/domain/propertyListKeys.js +3 -1
  317. package/dist/domain/referenceSourceGraph.js +25 -16
  318. package/dist/domain/referenceSourceImportParsing.js +6 -3
  319. package/dist/domain/referenceSourcePathIdentity.js +22 -0
  320. package/dist/domain/referenceSourceRequireBindings.js +137 -0
  321. package/dist/domain/webBundleAnalyzerInspection.js +14 -2
  322. package/dist/domain/webCaptureDiff.js +102 -4
  323. package/dist/domain/webScriptExportError.js +10 -4
  324. package/dist/domain/webScriptExportPlan.js +7 -13
  325. package/dist/domain/zipPackageFormat.js +4 -1
  326. package/dist/domain/zodCollectionSteps.js +24 -0
  327. package/dist/dotnet/ManagedArtifactInspector.js +55 -43
  328. package/dist/dotnet/ManagedDecodeBudget.js +80 -0
  329. package/dist/dotnet/ManagedMemberInspector.js +13 -6
  330. package/dist/dotnet/ManagedMemberInspectorCore.js +2 -2
  331. package/dist/dotnet/ManagedMemberInstructionDecoder.js +4 -2
  332. package/dist/dotnet/ManagedMemberRows.js +9 -4
  333. package/dist/dotnet/ManagedMetadataHeaps.js +15 -5
  334. package/dist/dotnet/ManagedMetadataInventoryRows.js +20 -11
  335. package/dist/dotnet/ManagedMetadataLayout.js +10 -4
  336. package/dist/dotnet/ManagedMethodBodyReader.js +8 -3
  337. package/dist/dotnet/ManagedNativeBoundaryHelpers.js +3 -2
  338. package/dist/dotnet/ManagedNativeBoundaryInspector.js +49 -34
  339. package/dist/dotnet/ManagedPeReader.js +41 -25
  340. package/dist/dotnet/ManagedReaderFailure.js +2 -1
  341. package/dist/dotnet/ManagedStaticProvider.js +55 -24
  342. package/dist/evaluation/AgentEvaluationReport.js +9 -5
  343. package/dist/evaluation/CodexAgentEval.js +43 -13
  344. package/dist/evm/EvmoleFailures.js +0 -2
  345. package/dist/evm/EvmoleInterfaceProvider.js +67 -2
  346. package/dist/filesystem/OwnedDirectoryHandle.js +29 -0
  347. package/dist/filesystem/OwnedFileHandle.js +36 -0
  348. package/dist/filesystem/RegularFile.js +33 -1
  349. package/dist/filesystem/StableFileHash.js +46 -0
  350. package/dist/filesystem/readFileHandleChunks.js +26 -0
  351. package/dist/firmware/FirmwareCommand.js +25 -3
  352. package/dist/firmware/FirmwareFiles.js +23 -8
  353. package/dist/firmware/FirmwareProvider.js +156 -32
  354. package/dist/firmware/FirmwarePublication.js +24 -3
  355. package/dist/firmware/FirmwareRelease.js +1 -0
  356. package/dist/generatedPackageMetadata.js +2 -2
  357. package/dist/ghidra/GhidraAnalysisProfile.js +55 -4
  358. package/dist/ghidra/GhidraAnalysisSeeds.js +211 -0
  359. package/dist/ghidra/GhidraClient.js +76 -4
  360. package/dist/ghidra/GhidraDiagnostics.js +11 -8
  361. package/dist/ghidra/GhidraFunctionValues.js +26 -2
  362. package/dist/ghidra/GhidraInstallation.js +1 -1
  363. package/dist/ghidra/GhidraInventoryValues.js +23 -1
  364. package/dist/ghidra/GhidraLanguageCatalog.js +99 -0
  365. package/dist/ghidra/GhidraLauncher.js +80 -39
  366. package/dist/ghidra/GhidraLoadImageAttest.js +49 -2
  367. package/dist/ghidra/GhidraMipsProfile.js +79 -0
  368. package/dist/ghidra/GhidraProvider.js +57 -9
  369. package/dist/ghidra/GhidraProviderCapabilities.js +18 -8
  370. package/dist/ghidra/GhidraProviderClient.js +282 -21
  371. package/dist/ghidra/GhidraSessionValues.js +9 -2
  372. package/dist/hopper/HopperAnalysisProfile.js +2 -0
  373. package/dist/hopper/HopperClient.js +15 -6
  374. package/dist/hopper/HopperMachOImage.js +2 -0
  375. package/dist/hopper/HopperProvider.js +13 -2
  376. package/dist/ida/IdaOperationRunner.js +8 -2
  377. package/dist/ida/IdaProvider.js +7 -0
  378. package/dist/ida/IdaSessionClient.js +3 -1
  379. package/dist/ida/IdaWorkspace.js +4 -2
  380. package/dist/javascript/analysis/JavaScriptAnalysisTransfer.js +326 -0
  381. package/dist/javascript/analysis/JavaScriptAnalysisWorker.js +520 -0
  382. package/dist/javascript/analysis/JavaScriptAnalysisWorkerProtocol.js +63 -0
  383. package/dist/javascript/analysis/JavaScriptAnalysisWorkerSchemas.js +521 -0
  384. package/dist/javascript/analysis/JavaScriptAnalysisWorkerServer.js +116 -0
  385. package/dist/javascript/recovery/RecoveryFiles.js +18 -7
  386. package/dist/javascript/recovery/WakaruCommand.js +22 -9
  387. package/dist/javascript/recovery/WakaruExecution.js +11 -7
  388. package/dist/javascript/recovery/WakaruProvider.js +139 -16
  389. package/dist/javascript/recovery/WakaruPublication.js +14 -4
  390. package/dist/javascript/recovery/WakaruRelease.js +10 -3
  391. package/dist/javascript/recovery/WakaruReport.js +12 -7
  392. package/dist/javascript/recovery/WakaruVersion.js +24 -0
  393. package/dist/javascript/sourceMaps/SourceMapCommand.js +16 -3
  394. package/dist/javascript/sourceMaps/SourceMapDecoder.js +63 -7
  395. package/dist/javascript/sourceMaps/SourceMapFormat.js +15 -4
  396. package/dist/jeb/JebMcpConnection.js +179 -0
  397. package/dist/jeb/JebMcpEndpoint.js +40 -0
  398. package/dist/jeb/JebProvider.js +299 -0
  399. package/dist/mcpDoctor.js +15 -6
  400. package/dist/native/AppleDispatchCoverage.js +25 -12
  401. package/dist/native/AppleDispatchMetadata.js +14 -7
  402. package/dist/native/AppleMachoFixups.js +71 -15
  403. package/dist/native/AppleMachoSelection.js +23 -3
  404. package/dist/native/NativeMacOSProvider.js +91 -16
  405. package/dist/native/NativeMachoInspection.js +11 -7
  406. package/dist/native/NativeUiHelperRuntime.js +6 -1
  407. package/dist/native/NativeUiObservation.js +4 -3
  408. package/dist/native/pe/PeResourceLayout.js +120 -0
  409. package/dist/native/pe/PeResourceParser.js +286 -0
  410. package/dist/native/pe/PeResourcesProvider.js +63 -0
  411. package/dist/process/BoundedFileBytes.js +30 -7
  412. package/dist/process/DarwinProcessRunTokenReader.js +8 -3
  413. package/dist/process/OwnedCommand.js +4 -3
  414. package/dist/process/ProcessOwnership.js +104 -112
  415. package/dist/process/ProcessOwnershipObservation.js +96 -39
  416. package/dist/process/ProcessOwnershipProcessTree.js +4 -4
  417. package/dist/process/ProcessRunTokenObservations.js +48 -0
  418. package/dist/process/ProviderDiagnosticRedaction.js +17 -0
  419. package/dist/process/ProviderProcess.js +4 -3
  420. package/dist/process/capture/FilesystemSnapshot.js +28 -4
  421. package/dist/process/capture/ProcessCaptureLifecycle.js +350 -59
  422. package/dist/process/capture/ProcessCaptureProgress.js +62 -0
  423. package/dist/process/capture/ProcessHarness.js +194 -26
  424. package/dist/process/capture/ProcessNormalization.js +3 -1
  425. package/dist/process/capture/ProcessScenarioRuntimeValidation.js +5 -2
  426. package/dist/process/capture/TerminalRenderer.js +24 -7
  427. package/dist/reference/ReferenceSourceReader.js +22 -5
  428. package/dist/reference/ReferenceSourceReaderEntries.js +114 -51
  429. package/dist/reference/ReferenceSourceReaderErrors.js +12 -0
  430. package/dist/reference/ReferenceSourceReaderFile.js +50 -10
  431. package/dist/reference/ReferenceSourceReaderValidate.js +4 -4
  432. package/dist/server/EvidenceMcpServer.js +36 -1
  433. package/dist/server/admittedToolOperation.js +9 -0
  434. package/dist/server/contractToolHandler.js +21 -0
  435. package/dist/server/createServer.js +97 -25
  436. package/dist/server/registerAdbTools.js +36 -0
  437. package/dist/server/registerAnalysisViewTool.js +4 -9
  438. package/dist/server/registerAndroidTools.js +3 -12
  439. package/dist/server/registerApktoolTools.js +14 -0
  440. package/dist/server/registerApplicationTools/compareExportShapes.js +4 -6
  441. package/dist/server/registerApplicationTools/compareSourceToBundle.js +4 -5
  442. package/dist/server/registerApplicationTools/compareVersions.js +3 -2
  443. package/dist/server/registerApplicationTools/coverage.js +3 -2
  444. package/dist/server/registerApplicationTools/obligationLedger.js +3 -2
  445. package/dist/server/registerApplicationTools/projectMobileApplicationGraph.js +3 -2
  446. package/dist/server/registerApplicationTools/traceFeature.js +3 -2
  447. package/dist/server/registerApplicationTools/traceSemantics.js +4 -5
  448. package/dist/server/registerArtifactComparisonTool.js +5 -2
  449. package/dist/server/registerBinaryDiagnosticsTools.js +16 -4
  450. package/dist/server/registerBrowserScenarioTool.js +10 -7
  451. package/dist/server/registerBrowserTools.js +12 -9
  452. package/dist/server/registerBundleComparisonTool.js +16 -2
  453. package/dist/server/registerCloseLifecycleTool.js +32 -3
  454. package/dist/server/registerElectronTools.js +28 -10
  455. package/dist/server/registerEvmTools.js +4 -9
  456. package/dist/server/registerFirmwareTools.js +3 -11
  457. package/dist/server/registerFunctionComparisonTool.js +5 -2
  458. package/dist/server/registerJavaScriptRecoveryTool.js +4 -9
  459. package/dist/server/registerJavaScriptRuntimeObservationTools.js +9 -6
  460. package/dist/server/registerJebTools.js +16 -0
  461. package/dist/server/registerManagedWorkflowTools/compareManagedMembers.js +4 -6
  462. package/dist/server/registerManagedWorkflowTools/importManagedReconstruction.js +3 -2
  463. package/dist/server/registerManagedWorkflowTools/projectManagedApplicationGraph.js +3 -2
  464. package/dist/server/registerManagedWorkflowTools/verifyManagedNativeBoundaries.js +3 -2
  465. package/dist/server/registerPeResourcesTool.js +9 -0
  466. package/dist/server/registerProcessComparisonTool.js +5 -2
  467. package/dist/server/registerRecordedCrashTools.js +4 -9
  468. package/dist/server/registerSessionRecordTools.js +2 -1
  469. package/dist/server/registerSessionTools.js +49 -18
  470. package/dist/server/registerWebModuleTool.js +4 -9
  471. package/dist/server/registerWebNetworkCaptureTool.js +4 -9
  472. package/dist/server/registerWebRuntimeTools.js +6 -5
  473. package/dist/server/registerWebScriptTool.js +6 -3
  474. package/dist/server/registerWebSourceLocationTool.js +4 -9
  475. package/dist/server/toolResult.js +21 -2
  476. package/dist/windows/WindowsPrivateRuntime.js +12 -5
  477. package/install.sh +7 -4
  478. package/licenses/nativeaot-parser-MIT.txt +28 -0
  479. package/native/windows/build/manifest.json +2 -2
  480. package/native/windows/build/rea-windows-x64.node +0 -0
  481. package/package.json +33 -5
  482. package/scripts/rea.mjs +16 -1
  483. package/skills/reverse-engineer-anything/SKILL.md +52 -51
  484. package/skills/reverse-engineer-anything/references/connection-and-recovery.md +127 -0
  485. package/skills/reverse-engineer-anything/references/evidence-workflows.md +8 -0
  486. package/skills/reverse-engineer-anything/references/javascript-applications.md +92 -13
  487. package/skills/reverse-engineer-anything/references/native-and-artifacts.md +22 -1
@@ -2,8 +2,8 @@
2
2
  name: reverse-engineer-anything
3
3
  description: Reverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.
4
4
  metadata:
5
- version: "34"
6
- tool_count: 139
5
+ version: "37"
6
+ tool_count: 170
7
7
  ---
8
8
 
9
9
  # REA
@@ -26,50 +26,18 @@ a skill installed from repository main may describe capabilities absent from
26
26
  an older npm release. Keep complete inline Evidence when that server does not
27
27
  advertise retained references.
28
28
 
29
- When tools are absent or registration is stale:
30
-
31
- 1. Diagnose without changing files. For Codex, run
32
- `npx -y rea-agents@6.3.0 doctor --client codex --json`. Substitute the current
33
- supported client: `claude_code`, `claude_desktop`, `codex`, `cursor`,
34
- `gemini_cli`, `windsurf`, `devin`, `opencode`, `antigravity`, `copilot_cli`,
35
- `commandcode`, `vscode`, `grok_build`, `omp`, or `grok_bot`. `grok_bot` has no local
36
- file registration: doctor reports the Grok Bot chat step, and setup does not
37
- write `mcp.json`. If the client is unknown, use `doctor --json` and
38
- inspect its registration results before choosing a setup scope.
39
- 2. Distinguish the reason. Missing, malformed, or stale registration needs a
40
- scoped configuration repair. An aligned registration with no tools in the
41
- active session needs a restart/reconnection; doctor cannot prove that the
42
- current agent has connected. A missing provider affects only tasks requiring
43
- that provider: static JavaScript inspection needs neither Hopper nor Ghidra,
44
- and Android inspection has separate bring-your-own JADX/Java prerequisites.
45
- 3. For a configuration repair, prepare the read-only plan:
46
- `npx -y rea-agents@6.3.0 setup --client codex --dry-run --json`.
47
- Use the current client's ID, show its exact proposed paths, backups, and
48
- changes, and obtain approval before setup writes configuration or installs
49
- Hopper. Setup normally installs the matching bundled skill too; include that
50
- replacement in the reviewed plan. After approval, apply the same scope with
51
- `npx -y rea-agents@6.3.0 setup --client codex --yes`. Add `--install-hopper`
52
- only if that separate installation was needed and explicitly approved.
53
- 4. Restart/reconnect the affected agent. Verify that REA tools actually appear
54
- in the session, then resume the original investigation. If they remain
55
- absent, inspect the client's MCP launch error rather than repeating setup.
56
-
57
- REA setup never installs or upgrades Node.js, npm, Homebrew, Java, Ghidra, IDA,
58
- JADX, Binwalk, or Unblob. Use existing prerequisites; do not install unrelated
59
- software to repair
60
- MCP registration. For an unsupported client, use manual stdio registration
61
- with a version-pinned `rea-agents` package or continue through the CLI.
62
-
63
- A concrete CLI fallback for an operator-supplied JavaScript tree or ASAR is:
64
-
65
- ```bash
66
- npx -y rea-agents@6.3.0 analyze-javascript-application /absolute/path/to/app --json
67
- ```
68
-
69
- No MCP registration or native engine is required. Read the returned Evidence,
70
- graph, limitations, and unknowns with the same care as an MCP result; the CLI
71
- returns the Evidence record directly. This fallback does not establish that
72
- MCP is configured. Native CLI tasks still require their selected engine.
29
+ If tools are absent, a call is blocked by the client, or a required provider is
30
+ unavailable, read [connection and recovery](references/connection-and-recovery.md).
31
+ Diagnose the observed blocker, continue useful supported work, and resume the
32
+ original task after repair. Client approval, shell PATH, registration and engine
33
+ availability have different remedies; avoid repeating setup for all of them.
34
+
35
+ Prefer an existing `rea` CLI. When none is installed and REA package acquisition
36
+ is within the authorized scope, use `npx -y rea-agents@6.4.0` in its place.
37
+ Configuration repair starts with a read-only setup plan; show paths, backups and
38
+ skill replacement before applying authorized changes. Preserve existing approval
39
+ and target-execution boundaries. REA setup never installs or upgrades unrelated
40
+ software, including Node.js, npm, Homebrew, Java, Ghidra, IDA, JADX, Binwalk or Unblob.
73
41
 
74
42
  ## Route the target first
75
43
 
@@ -115,6 +83,9 @@ explicit path or endpoint and do not need it.
115
83
  Historical PIDs do not select live processes. Request `include_debugger_context`
116
84
  only when core-only mapping candidates help; see the
117
85
  [recorded crash guide](https://github.com/morluto/rea/blob/main/docs/recorded-crashes.md).
86
+ - PE resource type/name/language trees and static icon group references:
87
+ `inspect_pe_resources` with an explicit path. This portable operation requires
88
+ no active target or engine; opaque payloads retain file ranges and SHA-256.
118
89
  - Native executable, library, or analysis database: `open_binary`, then
119
90
  use focused analysis tools directly; call `binary_overview` when metadata or
120
91
  inventory context is useful and available from the selected provider.
@@ -131,9 +102,11 @@ after opening; IDA does not supply `binary_overview`. Consult session availabili
131
102
  when composing broader workflows. Modern direct callers and unsupported dossier
132
103
  facets remain unknown; live IDA results are not replayed from snapshots.
133
104
 
134
- If the app is missing, ask which app to inspect. Resolve a human-readable app
135
- name to one clear installed artifact when possible; ask only when matches are
136
- ambiguous. Never choose an example app on the user's behalf.
105
+ If the user says only "my app" without a name, path, or target already selected
106
+ for this task, ask which app before searching for artifacts. Paths in unrelated
107
+ saved reports and nearby test fixtures do not select the user's target. Resolve
108
+ an actual human-readable app name to one clear installed artifact when possible;
109
+ ask when matches are ambiguous. Never choose an example app on the user's behalf.
137
110
 
138
111
  In a target-free session, use `open_binary` to bind any archive/package or
139
112
  native target whose analysis tool operates on the active target. Do not call an
@@ -144,7 +117,15 @@ list stays complete; availability depends on the operation, target, and host.
144
117
  ## Work summary-first
145
118
 
146
119
  Start with the default result and use its inline Evidence and graph context.
147
- Do not repeat an identical tool call. Make a focused follow-up only when the
120
+ For a JavaScript application or ELF layout whose size is unknown or large,
121
+ call `analyze_javascript_application` or `inspect_binary_layout` with
122
+ `"detail": "summary"`, then inspect the retained `parent_evidence_id` with
123
+ `inspect_analysis_view`.
124
+ Page module identities and select the returned `node_id` before requesting an
125
+ item; a single file path can represent several graph roles. Do not repeat an
126
+ identical analysis or rejected call without a changed input or resolved blocker.
127
+ Recheck session state when a lifecycle change makes that status useful.
128
+ Make a focused follow-up only when the
148
129
  returned result leaves a specific question unanswered.
149
130
 
150
131
  If MCP reports `resource_constraint` with `details.resource: "transport"`, call
@@ -155,6 +136,24 @@ session to a selected path. The analysis remains complete in the ledger; avoid
155
136
  repeating it merely to request the same oversized response. Complete CLI JSON
156
137
  output also streams without a single MCP frame.
157
138
 
139
+ When the retained parent ID is unknown, use `get_evidence_bundle` with
140
+ `detail: "summary"` and exact filters for operation, target SHA-256,
141
+ analysis-profile digest or canonical procedure address. Select its returned
142
+ Evidence ID for the next view instead of requesting the complete bundle.
143
+ `retention: "complete-record"` means the whole record is stored; native
144
+ value-flow truncation and unknown metadata remain separate. For an exported
145
+ portable bundle, use `rea inspect-evidence-bundle` with JSON containing `path`,
146
+ `detail: "summary"` and the same `filters`. Reading that file still requires
147
+ validating its full contents within the local memory budget.
148
+
149
+ A client can also truncate a successful tool result without a REA transport
150
+ error. Treat that preview as incomplete; use the retained parent ID for smaller
151
+ views or export when the full record is needed. Do not parse the preview as
152
+ canonical JSON or repeat the producer. For JavaScript, read the
153
+ [module-view and trace recipes](references/javascript-applications.md) before
154
+ drilling into a large graph; a broad bidirectional trace can expand unrelated
155
+ containment relationships even after summary analysis.
156
+
158
157
  Every conclusion must distinguish observations, inferences, and unknowns. Cite
159
158
  Evidence IDs, preserve limitations and incomplete coverage, and never imply
160
159
  that static analysis observed execution. Runtime requests execute the declared
@@ -162,7 +161,9 @@ target and lifecycle; do not broaden the target or action beyond those fields.
162
161
 
163
162
  Within the user's requested investigation, call available analysis tools
164
163
  directly. REA does not require permission grants or per-call approval flags.
165
- Follow the declared request scope and the host's actual access requirements.
164
+ The agent client can independently require approval. Follow the declared request
165
+ scope and the host's actual access requirements; use the recovery guide for an
166
+ observed client-policy rejection.
166
167
 
167
168
  ## Plan broader investigations
168
169
 
@@ -0,0 +1,127 @@
1
+ # Connection and task recovery
2
+
3
+ Read this guide only for an observed connection, command, approval or provider
4
+ blocker. Keep the user's target and question in view. Explain what prevented the
5
+ operation and the next useful step; after repair, continue the investigation.
6
+
7
+ Commands below use an installed `rea`. If none is available, use the package
8
+ invocation in `SKILL.md` when acquiring REA is authorized. Follow the connected
9
+ server's schemas and the installed CLI's help rather than assuming repository
10
+ main and an older release expose the same arguments.
11
+
12
+ ## Choose the remedy from the observed failure
13
+
14
+ | Observation | Meaning and next step |
15
+ | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
+ | No REA tools in the active session | Inspect registration with `rea doctor --client codex --json`. A skill installation alone does not register MCP. |
17
+ | Missing, malformed or stale registration | Prepare a scoped setup plan; apply only authorized changes with backups. |
18
+ | Aligned registration, but no connected tools | Restart/reconnect the client. Doctor checks registration; it cannot establish the current agent's connection. Inspect the client's launch error if reconnection fails. |
19
+ | `MCP tool call requires approval, but approval policy is never` | Codex rejected the call before REA executed it. Do not install an engine or repeat setup to solve this client-policy decision. See the approval section below. |
20
+ | REA returns `provider_unavailable` or an unavailable tool entry | Read that operation's provider diagnostics or `binary_session.result.tool_availability`. Resolve only the prerequisite needed for the task; a complete tool catalog does not imply every operation is available. |
21
+ | `rea` is missing in a child shell, or Node is incompatible | Inspect the actual shell PATH and launcher/runtime. A prefix installation may be absent from a login shell's PATH; this does not establish a broken MCP registration. |
22
+
23
+ If the client cannot launch its shell/sandbox helper or read the installed skill,
24
+ inspect its launch diagnostic. For example, Codex can refuse helper aliases when
25
+ CODEX_HOME is under `/tmp`; use an authorized profile outside the OS temporary
26
+ directory. REA setup cannot repair the client's executor. Preserve the sandbox
27
+ instead of silently disabling it to make an analysis command work.
28
+
29
+ Static JavaScript and ordinary ZIP inventory need neither Hopper nor Ghidra.
30
+ HAR inspection is offline and does not require a live browser. Native
31
+ decompilation, Android analysis and firmware extraction have their own
32
+ bring-your-own prerequisites. Use supported inventory/static evidence when it
33
+ answers part of the question, and name the unavailable evidence separately.
34
+ Do not substitute another target. Label observations from ordinary shell tools
35
+ as such; only actual REA output supplies REA Evidence.
36
+
37
+ ## Repair registration when needed
38
+
39
+ For Codex:
40
+
41
+ ```bash
42
+ rea doctor --client codex --json
43
+ rea setup --client codex --dry-run --json
44
+ ```
45
+
46
+ Use the current supported client's ID: `claude_code`, `claude_desktop`, `codex`,
47
+ `cursor`, `gemini_cli`, `windsurf`, `devin`, `opencode`, `antigravity`,
48
+ `copilot_cli`, `commandcode`, `qwen_code`, `vscode`, `grok_build`, `omp`, `pi`,
49
+ `hermes`, or `grok_bot`. If unknown, inspect `doctor --json` before choosing a
50
+ scope. `grok_bot` uses a chat registration step rather than local `mcp.json`.
51
+ For unsupported clients, use version-pinned manual stdio registration or CLI.
52
+
53
+ Show the plan's exact paths, backups, changes and bundled-skill replacement.
54
+ Obtain approval for writes when that concrete scope is not already authorized,
55
+ then apply the same scope with `rea setup --client codex --yes`. Add
56
+ `--install-hopper` only when separately needed and explicitly approved. Do not
57
+ install or upgrade unrelated prerequisites. Restart/reconnect, verify tools
58
+ actually appear, and resume the original task. If they remain absent, inspect
59
+ the launch failure rather than looping through setup.
60
+
61
+ ## Codex tool approval is separate from REA readiness
62
+
63
+ REA tools have no permission-grant handshake. Codex can still require approval
64
+ because an operation creates owned resources, launches a helper or has cleanup
65
+ effects. An advertised tool or successful doctor result does not override that
66
+ client policy. `workspace-write` alone does not resolve an MCP approval
67
+ rejection, and `approval_policy = "never"` does not mean every MCP tool is
68
+ preapproved.
69
+
70
+ When interactive approval is available, use the client's approval flow for the
71
+ requested operation. In an unattended run, continue through an authorized CLI
72
+ workflow if the execution environment permits it, or report the blocked
73
+ operation and the approval needed to proceed. Do not retry the same rejected
74
+ call, silently broaden approvals, or rewrite MCP effects as read-only.
75
+
76
+ For an operator who explicitly wants to preapprove named operations in a
77
+ disposable Codex profile, current Codex supports per-tool configuration. For
78
+ example, opening and closing an analysis session can be scoped independently:
79
+
80
+ ```toml
81
+ [mcp_servers.rea.tools.open_binary]
82
+ approval_mode = "approve"
83
+
84
+ [mcp_servers.rea.tools.close_binary]
85
+ approval_mode = "approve"
86
+ ```
87
+
88
+ Use the actual server ID and only the operations whose effects were approved;
89
+ this example does not approve inspection, extraction or runtime execution.
90
+ Show the proposed config edit and preserve unrelated entries and backups before
91
+ writing. Managed policy can constrain client settings. Consult the
92
+ [Codex configuration reference](https://learn.chatgpt.com/docs/config-file/config-reference)
93
+ for the installed client's supported settings. This is an optional recovery
94
+ choice, not a prerequisite for every REA task.
95
+
96
+ ## Continue through an installed CLI
97
+
98
+ Check the command environment only if the launcher fails:
99
+
100
+ ```bash
101
+ command -v rea
102
+ command -v node
103
+ node --version
104
+ rea --version
105
+ ```
106
+
107
+ Use the public launcher at its known installation path with a supported existing
108
+ Node on PATH when the child shell loses a prefix installation. Avoid internal
109
+ `dist/cli.js` entrypoints or global toolchain changes. MCP may have its own valid
110
+ launcher even when a shell cannot resolve `rea`.
111
+
112
+ For a user-supplied JavaScript tree or ASAR, select output files in the authorized
113
+ workspace and save complete Evidence before reading a view:
114
+
115
+ ```bash
116
+ rea analyze-javascript-application /absolute/path/to/app --json > app-evidence.json
117
+ jq -c '{source: {kind: "inline", evidence: .}, view: {kind: "summary"}}' app-evidence.json > app-view.json
118
+ rea inspect-analysis-view app-view.json
119
+ ```
120
+
121
+ These commands do not register MCP or install an analysis engine. CLI JavaScript
122
+ JSON is complete and can be very large; redirect it rather than loading it into
123
+ context. Use an existing JSON processor if `jq` is absent, without installing
124
+ one just for this recipe. Inspect a module page or item using the same inline
125
+ source and the [JavaScript recipes](javascript-applications.md). Preserve graph
126
+ coverage, limitations and unknowns. Native CLI analysis still requires its
127
+ selected engine, and all CLI operations retain the host's execution permissions.
@@ -38,3 +38,11 @@ or absence:
38
38
  Process captures are opt-in behavioral evidence, not a security sandbox. V3
39
39
  captures cannot be upgraded to V4; rerun the original scenario. Distinguish root
40
40
  exit from descendant settlement and require freshness when the task needs it.
41
+ A timed-out target that must write a final report needs `finalization_ms`: REA
42
+ sends SIGTERM to the captured root, keeps observing, and sends SIGKILL once
43
+ only if the target has not exited by the end of the interval.
44
+ `exit.finalization.signals` lists each attempt with its delivery result; the
45
+ observed exit signal stays in `exit.signal`, `exit.code` is null for every
46
+ deadline exit, and the code of a finalizer that exited on its own is in
47
+ `exit.finalization.exit_code` (null on a signal exit or when no exit was
48
+ observed).
@@ -1,20 +1,106 @@
1
1
  # JavaScript and Electron application artifacts
2
2
 
3
3
  Use `analyze_javascript_application` directly on the operator-supplied ASAR or
4
- extracted tree. The complete result, graph, and Evidence context are returned
5
- inline when they fit the MCP frame. Source-map contents are part of the static analysis. Start from its
6
- findings, coverage, unknowns, and graph context, then make a focused follow-up
7
- only when a specific question remains unanswered.
4
+ extracted tree. When size is unknown or large and the connected schema advertises
5
+ `detail`, request `detail: "summary"`. This returns an `inspect_analysis_view`
6
+ Evidence record with a distinct ID and a `normalized_result.parent_evidence_id`
7
+ for the complete retained application analysis. Source-map contents are part of
8
+ that static analysis. Read findings, coverage, limitations and unknowns, then
9
+ follow a specific unanswered question. Older servers without `detail` return
10
+ the complete application Evidence inline when it fits.
11
+
12
+ When the connected schema advertises `max_heap_mb` and `analysis_timeout_ms`,
13
+ these select the isolated source analyzer's old-space heap and per-source
14
+ deadline. Defaults are 1024 MiB and 300000 ms. They do not change the MCP
15
+ process heap. Resource-limited analyses preserve completed static facts and
16
+ report partial semantic coverage with specific unknown scopes; this does not
17
+ mean the source is malformed. Inspect those limits before retrying a source.
18
+ When expanded relationships exceed the parent's available memory, inspect the
19
+ file's modules item view for retained `static_analysis` and
20
+ `semantic_module_analysis`. Their facts remain available even when graph links
21
+ are unknown. Cumulative result exhaustion can stop analysis before every file
22
+ is examined; the inventory and remaining unknown scopes distinguish that case.
23
+ Timeout or cancellation after source analysis begins retains partial Evidence
24
+ in the same session. A returned `error.details.partial_observation` reference
25
+ can be supplied directly to `inspect_analysis_view`. If the SDK cancels locally, retrieve its recorded ID from
26
+ the Evidence bundle before inspecting the partial analysis.
27
+
28
+ ## Read a module without repeating analysis
29
+
30
+ Use the actual returned parent ID, on the same connection, as `source.evidence_id`.
31
+ The following IDs are placeholders to replace with returned values. When the
32
+ module's node ID is not already known, page identities before selecting an item.
33
+ Pages return only node IDs, paths and roles; choose a useful page size and follow
34
+ `coverage.next_offset` when another page matters:
35
+
36
+ ```json
37
+ {
38
+ "source": {
39
+ "kind": "retained-evidence",
40
+ "evidence_id": "ev_ACTUAL_PARENT_ID"
41
+ },
42
+ "view": { "kind": "page", "collection": "modules", "offset": 0, "limit": 16 }
43
+ }
44
+ ```
45
+
46
+ Select the relevant page entry by its exact `node_id` and recorded role:
47
+
48
+ ```json
49
+ {
50
+ "source": {
51
+ "kind": "retained-evidence",
52
+ "evidence_id": "ev_ACTUAL_PARENT_ID"
53
+ },
54
+ "view": {
55
+ "kind": "item",
56
+ "collection": "modules",
57
+ "selector": { "node_id": "jag_node_ACTUAL_NODE_ID" }
58
+ }
59
+ }
60
+ ```
61
+
62
+ Module pages include asset, bundled and source module roles, so one path can
63
+ identify several entries. Use `selector.path` only when uniqueness is established;
64
+ the returned node ID avoids needing a complete inventory to prove uniqueness. On ambiguity,
65
+ select the matching node ID from the page or the error's candidates. Follow
66
+ `next_offset` when another page matters. An item exposes that module node's
67
+ recorded observations, identity, hashes, exports and source ranges; it does not
68
+ include every child syntax observation, related edge or original source file.
69
+ An absent item fact is not evidence of absence from the whole application.
70
+
71
+ ## Trace only the remaining question
72
+
73
+ Use `trace_application_feature` on the parent application Evidence for one
74
+ literal node ID, route, string, API, IPC channel, module, or native export.
75
+ Select `incoming` for relationships leading to the seed, `outgoing` for those
76
+ leaving it, and `both` when the question needs both. Trace traversal includes
77
+ containment relationships, so even a narrow seed can expand many nodes; a
78
+ bidirectional trace can reach unrelated sibling modules. A module item or page
79
+ is preferable when its observations already answer the question. Do not treat
80
+ all reached nodes as participants in the feature.
81
+
82
+ Reuse retained parent Evidence when the server advertises it, or supply complete
83
+ Evidence inline. Include Hopper or Ghidra Evidence only when its artifact digest
84
+ matches exactly.
85
+
86
+ ## Recover an oversized display
8
87
 
9
88
  An oversized response reports `resource_constraint` and
10
89
  `details.resource: "transport"`. Reuse
11
90
  `details.reported_limits.evidence_reference` with `inspect_analysis_view` for a
12
- summary, one module, or a stable page of module identities. Use
13
- `trace_application_feature` once a module, route, or string seed is known.
91
+ summary, one module, or a stable page of module identities.
14
92
  `export_evidence_bundle` writes the complete canonical session to a
15
93
  caller-selected file. These workflows keep the original Evidence and coverage;
16
94
  a broad follow-up can also exceed framing.
17
95
 
96
+ A client can truncate a successful result inside its text envelope without a
97
+ REA `resource_constraint`. Treat a truncation notice or incomplete JSON as a
98
+ display limitation; do not claim the full record was examined. Reuse the known
99
+ parent ID for smaller views, or export complete Evidence to a selected file
100
+ while the session remains open. If the parent ID was lost from the preview,
101
+ use the prior analysis summary or explicit ledger entries to recover it; do
102
+ not invent an ID or rerun analysis just to reproduce the same display.
103
+
18
104
  BrowserWindow preferences, preload and contextBridge surfaces, IPC
19
105
  registrations, utility processes, and native binding requests are static syntax
20
106
  observations. Only a unique exact literal IPC channel match supports an inferred
@@ -22,13 +108,6 @@ pairing. Dynamic or ambiguous channels remain unresolved. A requested `.node`
22
108
  member is not a verified native export. Never claim runtime reachability,
23
109
  registration, defaults, or policy enforcement from static analysis.
24
110
 
25
- Use `trace_application_feature` on existing application Evidence for one
26
- literal node ID, route, string, API, IPC channel, module, or native export.
27
- Choose a direction and reuse the returned application Evidence ID when the
28
- connected server advertises retained references, or supply complete Evidence
29
- inline. Include
30
- Hopper or Ghidra Evidence only when its artifact digest matches exactly.
31
-
32
111
  For version comparison, analyze each version once, then call
33
112
  `compare_application_versions`. Accept only its digest, source-map, structural
34
113
  fingerprint, or non-module semantic matches. Module ordinals and minified names
@@ -34,6 +34,15 @@ cross-references. Addresses and recovered pseudocode are analysis observations,
34
34
  not original source. Provider unavailability and unsupported metadata remain
35
35
  unknown rather than false.
36
36
 
37
+ For a completed `analyze_function` dossier, use `inspect_analysis_view` with
38
+ `view: {kind: "native", facet: "value_flow_operations", offset: 0, limit: 32}`
39
+ and the exact retained Evidence ID to read selected facts without reanalysis.
40
+ Native facets also include procedure, pseudocode, assembly, basic blocks,
41
+ comments, callers/callees, references, unresolved calls, referenced strings and
42
+ names, the native API record, and value-flow summaries. Pseudocode offsets and limits count UTF-16
43
+ code units; use the returned `next_offset` for continuation. Provider limitations
44
+ and unavailable facts remain explicit; the complete parent Evidence is retained.
45
+
37
46
  To see which functions or Objective-C methods a Mach-O actually calls in one
38
47
  run, use `observe_native_calls` with explicit breakpoints and a bounded
39
48
  `duration_ms`/`max_events`. It launches a new process under LLDB, so the target
@@ -143,4 +152,16 @@ context. PSP/stack/device state remains unmodeled. See [DOS guide](https://githu
143
152
 
144
153
  ### Function annotations in Ghidra
145
154
 
146
- Use `annotate_native_function` for one function name and/or entry comments, with at least one explicit change. Review its annotation readback and refreshed dossier inline. Changes are atomic and session-scoped; empty comments clear them, omitted fields preserve them. Later MCP calls observe edits until close. CLI `annotate-native-function` returns the updated analysis before discarding the session. Original executable bytes are unchanged; edits invalidate immutable snapshots. Windows P0 does not admit database mutations.
155
+ Use `annotate_native_function` for one function name and/or entry comments, with at least one explicit change. Review its annotation readback and refreshed dossier inline. Changes are atomic and session-scoped; empty comments clear them, omitted fields preserve them. Later MCP calls observe edits until close. CLI `annotate-native-function` returns the updated analysis before discarding the session. Original executable bytes are unchanged; edits invalidate immutable snapshots. Windows P0 does not admit database mutations. For naming only, `set_address_name` / `set_addresses_names` also work with Ghidra: they name function entries or data addresses (primary labels) and return compact per-address success booleans instead of a dossier.
156
+
157
+ ## Offline PE resource inventory
158
+
159
+ Use `inspect_pe_resources` with an absolute `path`, or
160
+ `rea inspect-pe-resources ./selected.exe --json`, for portable PE32/PE32+
161
+ resource inspection without opening a native target. Preserve returned Evidence:
162
+ type/name/language IDs and UTF-16 names, original directory/data/payload ranges,
163
+ code pages, payload hashes and static icon-group references. Same-language icon
164
+ resolution is explicit; missing references and size mismatch remain visible.
165
+ Other payloads are opaque, and this operation does not decode images or simulate
166
+ Windows resource loading. Consult the budgets and supported tree profile in
167
+ [offline binary diagnostics](https://github.com/morluto/rea/blob/main/docs/binary-diagnostics.md).