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
@@ -0,0 +1,256 @@
1
+ import { schemaArrays, schemaChildren, schemaMaps, } from "./inputSchemaPresentation.js";
2
+ // Kimi expands schema-local references before sending tools to Moonshot.
3
+ // Compact advertisements must fit after expansion, independently of client
4
+ // reference handling. Canonical server-side validation remains unchanged.
5
+ /** Annotation keys that carry guidance but no validation semantics. */
6
+ const annotationKeys = new Set(["description", "examples", "default", "title"]);
7
+ /** Keys whose values are literal data, never nested schemas to rewrite. */
8
+ const dataKeys = new Set(["const", "enum", "examples", "default"]);
9
+ const definitionKeys = new Set(["$defs", "definitions"]);
10
+ // An empty schema accepts every JSON value. Kimi otherwise infers string.
11
+ const jsonValueTypes = [
12
+ "null",
13
+ "boolean",
14
+ "object",
15
+ "array",
16
+ "number",
17
+ "string",
18
+ ];
19
+ const isSchemaObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
20
+ const serializedBytes = (value) => Buffer.byteLength(JSON.stringify(value), "utf8");
21
+ /** Rewrite every schema-valued position; literal data stays opaque. */
22
+ const rebuildSchemaPositions = (node, rebuild) => {
23
+ if (Array.isArray(node))
24
+ return node.map((child) => rebuild(child));
25
+ if (!isSchemaObject(node))
26
+ return node;
27
+ const out = {};
28
+ for (const [key, value] of Object.entries(node)) {
29
+ if (dataKeys.has(key)) {
30
+ out[key] = value;
31
+ continue;
32
+ }
33
+ if (schemaMaps.has(key) && isSchemaObject(value)) {
34
+ out[key] = Object.fromEntries(Object.entries(value).map(([name, child]) => [name, rebuild(child)]));
35
+ continue;
36
+ }
37
+ if (schemaArrays.has(key) && Array.isArray(value)) {
38
+ out[key] = value.map((child) => rebuild(child));
39
+ continue;
40
+ }
41
+ if (schemaChildren.has(key)) {
42
+ out[key] = Array.isArray(value)
43
+ ? value.map((child) => rebuild(child))
44
+ : rebuild(value);
45
+ continue;
46
+ }
47
+ out[key] = value;
48
+ }
49
+ return out;
50
+ };
51
+ /**
52
+ * Drop annotation prose from every subschema while preserving all validation
53
+ * keywords. The root keeps its own description because the root-union
54
+ * projection encodes accepted input groups there; the root's echoed literal
55
+ * examples leave with the rest of the annotation prose.
56
+ */
57
+ const stripAnnotations = (schema) => {
58
+ const rebuilt = rebuildSchemaPositions(schema, stripChildAnnotations);
59
+ const out = {};
60
+ for (const [key, value] of Object.entries(rebuilt)) {
61
+ if (annotationKeys.has(key) && key !== "description")
62
+ continue;
63
+ out[key] = value;
64
+ }
65
+ return out;
66
+ };
67
+ const stripChildAnnotations = (child) => {
68
+ const rebuilt = rebuildSchemaPositions(child, stripChildAnnotations);
69
+ if (!isSchemaObject(rebuilt))
70
+ return rebuilt;
71
+ const kept = {};
72
+ for (const [key, value] of Object.entries(rebuilt))
73
+ if (!annotationKeys.has(key))
74
+ kept[key] = value;
75
+ return kept;
76
+ };
77
+ const resolveLocalReference = (root, reference) => {
78
+ if (reference === "#")
79
+ return root;
80
+ if (!reference.startsWith("#/"))
81
+ return undefined;
82
+ let value = root;
83
+ for (const token of reference.slice(2).split("/")) {
84
+ const key = token.replaceAll("~1", "/").replaceAll("~0", "~");
85
+ if (!isSchemaObject(value) || !Object.hasOwn(value, key))
86
+ return undefined;
87
+ value = value[key];
88
+ }
89
+ return value;
90
+ };
91
+ /** Stop serialization at the budget before allocating an expanded schema. */
92
+ const inlineWithinBudget = (root, budgetBytes) => {
93
+ let resolved = true;
94
+ function* serialize(value, position, active) {
95
+ if (Array.isArray(value)) {
96
+ yield "[";
97
+ for (const [index, child] of value.entries()) {
98
+ if (index > 0)
99
+ yield ",";
100
+ yield* serialize(child, position, active);
101
+ }
102
+ yield "]";
103
+ }
104
+ else if (isSchemaObject(value)) {
105
+ if (position === "schema" && Object.keys(value).length === 0) {
106
+ yield JSON.stringify({ type: jsonValueTypes });
107
+ return;
108
+ }
109
+ if (position === "schema" && typeof value.$ref === "string") {
110
+ const target = resolveLocalReference(root, value.$ref);
111
+ if (target === undefined || active.has(value.$ref)) {
112
+ resolved = false;
113
+ return;
114
+ }
115
+ const { $ref, ...siblings } = value;
116
+ // Reference siblings are independent constraints in draft 2020-12.
117
+ // Merging their keys into the target would overwrite validation rules.
118
+ yield* serialize(Object.keys(siblings).length === 0
119
+ ? target
120
+ : { allOf: [target, siblings] }, "schema", new Set([...active, $ref]));
121
+ return;
122
+ }
123
+ yield "{";
124
+ let first = true;
125
+ for (const [key, child] of Object.entries(value)) {
126
+ if (position === "schema" && definitionKeys.has(key))
127
+ continue;
128
+ if (!first)
129
+ yield ",";
130
+ first = false;
131
+ yield JSON.stringify(key) + ":";
132
+ const childPosition = position === "map"
133
+ ? "schema"
134
+ : position === "schema" && schemaMaps.has(key)
135
+ ? "map"
136
+ : position === "schema" &&
137
+ (schemaArrays.has(key) || schemaChildren.has(key))
138
+ ? "schema"
139
+ : "data";
140
+ yield* serialize(child, childPosition, active);
141
+ }
142
+ yield "}";
143
+ }
144
+ else {
145
+ yield JSON.stringify(value);
146
+ }
147
+ }
148
+ const chunks = [];
149
+ let bytes = 0;
150
+ for (const chunk of serialize(root, "schema", new Set())) {
151
+ bytes += Buffer.byteLength(chunk, "utf8");
152
+ if (bytes > budgetBytes || !resolved)
153
+ return undefined;
154
+ chunks.push(chunk);
155
+ }
156
+ return resolved
157
+ ? JSON.parse(chunks.join(""))
158
+ : undefined;
159
+ };
160
+ /** Preserve every possible type, including referenced and nullable unions. */
161
+ const detectedTypes = (schema, root, active = new Set()) => {
162
+ if (!isSchemaObject(schema))
163
+ return undefined;
164
+ if (typeof schema.$ref === "string") {
165
+ if (active.has(schema.$ref))
166
+ return undefined;
167
+ return detectedTypes(resolveLocalReference(root, schema.$ref), root, new Set([...active, schema.$ref]));
168
+ }
169
+ if (typeof schema.type === "string")
170
+ return [schema.type];
171
+ if (Array.isArray(schema.type) &&
172
+ schema.type.every((type) => typeof type === "string"))
173
+ return schema.type;
174
+ const alternatives = Array.isArray(schema.anyOf)
175
+ ? schema.anyOf
176
+ : Array.isArray(schema.oneOf)
177
+ ? schema.oneOf
178
+ : [];
179
+ if (alternatives.length === 0)
180
+ return undefined;
181
+ const types = alternatives.map((branch) => detectedTypes(branch, root, active));
182
+ if (types.some((type) => type === undefined))
183
+ return undefined;
184
+ return [...new Set(types.flatMap((type) => type ?? []))];
185
+ };
186
+ const REDUCED_ANNOTATION = "Advertised in reduced form by the compact input schema profile; the server still validates complete canonical inputs.";
187
+ /**
188
+ * Present only the root property shape with per-property guidance. Used for
189
+ * schemas whose validation structure alone exceeds the compact budget; the
190
+ * canonical schema still rejects malformed calls server-side.
191
+ */
192
+ const reduceToShallowProperties = (schema) => {
193
+ const properties = isSchemaObject(schema.properties) ? schema.properties : {};
194
+ const description = [
195
+ typeof schema.description === "string" ? schema.description : undefined,
196
+ REDUCED_ANNOTATION,
197
+ ]
198
+ .filter((text) => text !== undefined)
199
+ .join(" ");
200
+ const $schema = typeof schema.$schema === "string" ? { $schema: schema.$schema } : {};
201
+ const shallow = Object.fromEntries(Object.entries(properties).map(([name, value]) => {
202
+ const types = detectedTypes(value, schema);
203
+ const type = types?.length === 1 ? types[0] : types;
204
+ const description = isSchemaObject(value) && typeof value.description === "string"
205
+ ? { description: value.description }
206
+ : {};
207
+ return [
208
+ name,
209
+ { ...(type === undefined ? {} : { type }), ...description },
210
+ ];
211
+ }));
212
+ return {
213
+ ...$schema,
214
+ type: "object",
215
+ description,
216
+ properties: shallow,
217
+ ...(Array.isArray(schema.required)
218
+ ? { required: [...schema.required] }
219
+ : {}),
220
+ ...(typeof schema.minProperties === "number"
221
+ ? { minProperties: schema.minProperties }
222
+ : {}),
223
+ ...(isSchemaObject(schema.dependentRequired)
224
+ ? { dependentRequired: { ...schema.dependentRequired } }
225
+ : {}),
226
+ ...(schema.additionalProperties === false
227
+ ? { additionalProperties: false }
228
+ : {}),
229
+ };
230
+ };
231
+ /**
232
+ * Render an advertised input schema within a per-schema byte budget for
233
+ * providers that validate the literal serialized schema size. Validation
234
+ * keywords and the canonical contract are preserved; only
235
+ * annotation prose and, for structurally oversized schemas, nested
236
+ * validation detail leave the advertised form.
237
+ */
238
+ export const compactAdvertisedInputSchema = (schema, budgetBytes) => {
239
+ const inline = inlineWithinBudget(stripAnnotations(schema), budgetBytes);
240
+ if (inline !== undefined)
241
+ return { schema: inline, presentation: "inline" };
242
+ const reduced = reduceToShallowProperties(schema);
243
+ if (serializedBytes(reduced) <= budgetBytes)
244
+ return { schema: reduced, presentation: "reduced" };
245
+ // A future contract with an extreme root-property count still advertises
246
+ // an honest, budget-fitting shape instead of an oversized one.
247
+ return {
248
+ schema: reduceToShallowProperties({
249
+ type: "object",
250
+ description: (typeof schema.description === "string"
251
+ ? `${schema.description} `
252
+ : "") + REDUCED_ANNOTATION,
253
+ }),
254
+ presentation: "reduced",
255
+ };
256
+ };
@@ -24,6 +24,6 @@ const functionWorkflow = (name, description) => {
24
24
  };
25
25
  /** Function dossier and native API reconstruction workflow contracts. */
26
26
  export const FUNCTION_WORKFLOW_TOOL_CONTRACTS = [
27
- functionWorkflow("analyze_function", "Build a dossier for one native function identified by symbol or provider-returned address. Returns identity with complete inclusive body ranges or explicit unknown, provider-specific pseudocode and assembly, comments, calls, references, referenced strings/names, local CFG blocks, and available native API boundary observations."),
27
+ functionWorkflow("analyze_function", "Build a dossier for one native function identified by symbol or provider-returned address. Returns identity with complete inclusive analyzed body ranges or explicit unknown, provider-specific pseudocode and assembly, comments, calls, references, referenced strings/names, local CFG blocks, and available native API boundary observations. Ghidra terminal-call assumptions that may cut the analyzed body are reported in limitations with available callee identities."),
28
28
  functionWorkflow("inspect_native_api", "Analyze a native API boundary in one function identified by symbol or provider-returned address. Returns confidence, evidence, jump-table dispatch/data/case mappings, separately evidenced default targets, unsupported branches, and residual unknowns. Null case values mean unresolved cases, never a known default."),
29
29
  ];
@@ -1,5 +1,5 @@
1
1
  import { isDeepStrictEqual } from "node:util";
2
- const schemaMaps = new Set([
2
+ export const schemaMaps = new Set([
3
3
  "$defs",
4
4
  "definitions",
5
5
  "properties",
@@ -7,8 +7,8 @@ const schemaMaps = new Set([
7
7
  "dependentSchemas",
8
8
  "dependencies",
9
9
  ]);
10
- const schemaArrays = new Set(["allOf", "anyOf", "oneOf", "prefixItems"]);
11
- const schemaChildren = new Set([
10
+ export const schemaArrays = new Set(["allOf", "anyOf", "oneOf", "prefixItems"]);
11
+ export const schemaChildren = new Set([
12
12
  "items",
13
13
  "additionalItems",
14
14
  "contains",
@@ -56,15 +56,15 @@ const describeSchema = (schema, root, describeProperty) => {
56
56
  key,
57
57
  Object.fromEntries(Object.entries(value).map(([name, child]) => {
58
58
  const described = describeSchema(child, root, describeProperty);
59
+ if (key !== "properties" || !isObject(described))
60
+ return [name, described];
61
+ const description = referencedDescription(root, described) ??
62
+ describeProperty(name);
59
63
  return [
60
64
  name,
61
- key === "properties" && isObject(described)
62
- ? {
63
- ...described,
64
- description: referencedDescription(root, described) ??
65
- describeProperty(name),
66
- }
67
- : described,
65
+ description === undefined
66
+ ? described
67
+ : { ...described, description },
68
68
  ];
69
69
  })),
70
70
  ];
@@ -2,12 +2,17 @@ import { toolContractMetadata } from "../toolEffects.js";
2
2
  import { evidenceResultOf } from "../toolOutputSchemaPrimitives.js";
3
3
  import { electronPageInspectionSchema, electronTargetListSchema, inspectElectronPageInputSchema, listElectronTargetsInputSchema, } from "../../domain/javascript/electronObservation.js";
4
4
  import { electronActiveObservationInputSchema, electronActiveObservationResultSchema, } from "../../domain/javascript/electronActiveObservation.js";
5
+ import { analysisDetailOutputSchemaOf, analysisDetailSchema, } from "../analysisDetail.js";
5
6
  import { analyzeJavaScriptApplicationInputSchema, javascriptApplicationAnalysisResultSchema, } from "../../domain/javascript/javascriptApplicationAnalysis.js";
6
7
  import { javascriptRuntimeReconciliationResultSchema, reconcileJavaScriptRuntimeInputSchema, } from "../../domain/javascript/javascriptRuntimeReconciliationSchemas.js";
7
8
  import { JAVASCRIPT_RUNTIME_RECONCILIATION_EXAMPLE } from "./javascriptRuntimeReconciliationExample.js";
8
9
  const listOutputSchema = evidenceResultOf(electronTargetListSchema);
9
10
  const inspectionOutputSchema = evidenceResultOf(electronPageInspectionSchema);
10
- const applicationOutputSchema = evidenceResultOf(javascriptApplicationAnalysisResultSchema);
11
+ /** Caller-selected delivery of a completed JavaScript application analysis. */
12
+ export const analyzeJavaScriptApplicationRequestSchema = analyzeJavaScriptApplicationInputSchema.extend({
13
+ detail: analysisDetailSchema,
14
+ });
15
+ const applicationOutputSchema = analysisDetailOutputSchemaOf(javascriptApplicationAnalysisResultSchema);
11
16
  const reconciliationOutputSchema = evidenceResultOf(javascriptRuntimeReconciliationResultSchema);
12
17
  const endpoint = "http://127.0.0.1:9223";
13
18
  const activeExample = {
@@ -54,9 +59,9 @@ export const ELECTRON_TOOL_CONTRACTS = [
54
59
  {
55
60
  name: "analyze_javascript_application",
56
61
  ...toolContractMetadata("analyze_javascript_application"),
57
- description: "Reconstruct one local ASAR or extracted JavaScript application as an inline application graph without executing it. Returns recovered graph nodes, edges, semantic relations, integrity contradictions, limitations, and coverage. Integrity mismatches fail by default; record-and-continue retains observed bytes as untrusted and marks graph coverage partial.",
62
+ description: "Reconstruct one local ASAR or extracted JavaScript application as an inline application graph without executing it. Returns recovered graph nodes, edges, semantic relations, integrity contradictions, limitations, and coverage. Select detail summary to retain the complete analysis Evidence in this session and receive only its summary view, then inspect selected modules or pages with inspect_analysis_view. Integrity mismatches fail by default; record-and-continue retains observed bytes as untrusted and marks graph coverage partial.",
58
63
  kind: "electron-provider",
59
- inputSchema: analyzeJavaScriptApplicationInputSchema,
64
+ inputSchema: analyzeJavaScriptApplicationRequestSchema,
60
65
  outputSchema: applicationOutputSchema,
61
66
  examples: [
62
67
  {
@@ -67,6 +72,13 @@ export const ELECTRON_TOOL_CONTRACTS = [
67
72
  integrity_policy: "fail",
68
73
  },
69
74
  },
75
+ {
76
+ title: "Retain the complete analysis and return its summary view",
77
+ input: {
78
+ input_path: "/Applications/Example.app/Contents/Resources/app.asar",
79
+ detail: "summary",
80
+ },
81
+ },
70
82
  ],
71
83
  },
72
84
  {
@@ -7,7 +7,7 @@ export const JAVASCRIPT_RECOVERY_TOOL_CONTRACTS = [
7
7
  name: "recover_javascript_sources",
8
8
  ...toolContractMetadata("recover_javascript_sources"),
9
9
  kind: "application",
10
- description: "Recover readable modules from one local UTF-8 JavaScript script/bundle into an absent directory, using caller-supplied Wakaru 1.13.0 on Linux x64. Returns original/derived digests, extraction byte ranges, emitted source maps, warnings and analysis_input inline. Structural splitting may fall back to one module; original names and runtime equivalence remain unknown. No application code execution. Requires util-linux prlimit; one worker, 1 GiB address-space ceiling, 120-second deadline, 64 MiB input, 128 MiB output, 10000 entries and 8 MiB per diagnostic/report stream.",
10
+ description: "Recover readable modules from one local UTF-8 JavaScript script/bundle into an absent directory, using caller-supplied Wakaru ^1.13.0 (verified with 1.14.0) on Linux x64. Returns original/derived digests, extraction byte ranges, emitted source maps, warnings and analysis_input inline. Structural splitting may fall back to one module; original names and runtime equivalence remain unknown. No application code execution. Requires util-linux prlimit; one worker, 1 GiB address-space ceiling, 120-second deadline, 64 MiB input, 128 MiB output, 10000 entries and 8 MiB per diagnostic/report stream.",
11
11
  inputSchema: javascriptRecoveryInputSchema,
12
12
  outputSchema: evidenceResultOf(javascriptRecoveryResultSchema),
13
13
  examples: [
@@ -0,0 +1,64 @@
1
+ import { jebInputSchemas, jebResultSchemas, } from "../../domain/jeb/jebAnalysis.js";
2
+ import { evidenceResultOf } from "../toolOutputSchemaPrimitives.js";
3
+ import { toolContractMetadata } from "../toolEffects.js";
4
+ /** JEB-backed inspection served by a caller-supplied running engine client. */
5
+ export const JEB_TOOL_CONTRACTS = [
6
+ {
7
+ name: "inspect_jeb_client",
8
+ ...toolContractMetadata("inspect_jeb_client"),
9
+ description: "Inspect the running JEB client serving MCP: engine version, GUI or headless mode, and startup time. Does not open a target. Requires a caller-started JEB client reachable at REA_JEB_MCP_URL (default http://127.0.0.1:8425/mcp); REA never installs or launches JEB.",
10
+ kind: "jeb-provider",
11
+ inputSchema: jebInputSchemas.inspect_jeb_client,
12
+ outputSchema: evidenceResultOf(jebResultSchemas.inspect_jeb_client),
13
+ examples: [{ title: "Check the engine", input: {} }],
14
+ },
15
+ {
16
+ name: "open_jeb_project",
17
+ ...toolContractMetadata("open_jeb_project"),
18
+ description: "Open or create a JEB project from an artifact file or existing .jdb2 database on the engine host. Returns the project's input-file digests and top-level units. The engine analyzes the target itself; REA does not read the file or execute it. Fails when a project is already open.",
19
+ kind: "jeb-provider",
20
+ inputSchema: jebInputSchemas.open_jeb_project,
21
+ outputSchema: evidenceResultOf(jebResultSchemas.open_jeb_project),
22
+ examples: [
23
+ {
24
+ title: "Open a target for analysis",
25
+ input: { path: "/tmp/Example.apk" },
26
+ },
27
+ ],
28
+ },
29
+ {
30
+ name: "list_jeb_units",
31
+ ...toolContractMetadata("list_jeb_units"),
32
+ description: "List project units by stable unit path and type, with optional wildcard filter, parent restriction, and pagination. The engine caps pages at 100 units; a full page reports partial coverage because more units may exist. Read-only.",
33
+ kind: "jeb-provider",
34
+ inputSchema: jebInputSchemas.list_jeb_units,
35
+ outputSchema: evidenceResultOf(jebResultSchemas.list_jeb_units),
36
+ examples: [
37
+ {
38
+ title: "List units",
39
+ input: {},
40
+ },
41
+ {
42
+ title: "Find DEX units",
43
+ input: { filter: "*.dex" },
44
+ },
45
+ ],
46
+ },
47
+ {
48
+ name: "decompile_jeb_item",
49
+ ...toolContractMetadata("decompile_jeb_item"),
50
+ description: "Decompile one type or method to engine pseudo-code using its decompiler (Dalvik, Java, or native). item_address comes from the engine's code item listing; unit_path defaults to the engine's first code unit and stays unknown when omitted. Read-only with respect to the target file.",
51
+ kind: "jeb-provider",
52
+ inputSchema: jebInputSchemas.decompile_jeb_item,
53
+ outputSchema: evidenceResultOf(jebResultSchemas.decompile_jeb_item),
54
+ examples: [
55
+ {
56
+ title: "Decompile a method",
57
+ input: {
58
+ item_address: "Lcom/example/Main;->onCreate()V",
59
+ item_kind: "method",
60
+ },
61
+ },
62
+ ],
63
+ },
64
+ ];
@@ -1,21 +1,43 @@
1
1
  import { inspectRecordedCrashInputSchema, recordedCrashSchema, } from "../../domain/native/recordedCrash.js";
2
2
  import { inspectBinaryLayoutInputSchema, binaryLayoutSchema, } from "../../domain/native/binaryLayout.js";
3
+ import { analysisDetailOutputSchemaOf, analysisDetailSchema, } from "../analysisDetail.js";
3
4
  import { toolContractMetadata } from "../toolEffects.js";
4
5
  import { evidenceResultOf } from "../toolOutputSchemaPrimitives.js";
6
+ import { inspectPeResourcesInputSchema, peResourcesSchema, } from "../../domain/native/peResources.js";
7
+ /** Caller-selected delivery of completed binary layout Evidence. */
8
+ export const inspectBinaryLayoutRequestSchema = inspectBinaryLayoutInputSchema.extend({ detail: analysisDetailSchema });
5
9
  /** Offline binary diagnostics are independent of macOS process/UI providers. */
6
10
  export const BINARY_DIAGNOSTICS_TOOL_CONTRACTS = [
11
+ {
12
+ name: "inspect_pe_resources",
13
+ ...toolContractMetadata("inspect_pe_resources"),
14
+ kind: "native-provider",
15
+ description: "Inspect one explicit local PE32/PE32+ image's complete bounded type/name/language resource tree without executing it or opening a disassembler. Returns numeric IDs versus original UTF-16 names, directory/data-entry file locations, payload RVA/file ranges, complete SHA-256 hashes and static RT_GROUP_ICON image-resource candidates. Language fallback, image decoding and actual shell/window loading remain unobserved. Reads a stable regular file; malformed or ambiguous mappings, non-identical overlapping ranges and exhausted budgets return no partial success. Portable on supported Node hosts; no Windows SDK or engine installation required.",
16
+ inputSchema: inspectPeResourcesInputSchema,
17
+ outputSchema: evidenceResultOf(peResourcesSchema),
18
+ examples: [
19
+ {
20
+ title: "Inspect PE resource identities and icon relationships",
21
+ input: { path: "/artifacts/application.exe" },
22
+ },
23
+ ],
24
+ },
7
25
  {
8
26
  name: "inspect_binary_layout",
9
27
  ...toolContractMetadata("inspect_binary_layout"),
10
28
  kind: "native-provider",
11
- description: "Inspect an explicit local binary without launching it as a host process. Returns file-backed section/segment ranges, linked addresses, original symbol/REL/RELA table identities, complete encoded RELR tables and upstream-derived offsets with unknown per-word locations/addends, raw name bytes, dependency/interpreter names and static mitigation inferences inline with artifact SHA-256 Evidence. Initial profile: ELF64 x86-64 little-endian EXEC/DYN/REL on Linux x64 via caller-supplied Python with unchanged pwntools 4.15.0, pyelftools 0.33 and Unicorn 2.1.2. Runtime addresses/library paths, overall relocation inventory completeness and complete derived GOT/PLT coverage remain unknown. Zero executable entry values mean absence; relocatable entries are not applicable. Upstream can emulate PLT instructions with Unicorn for derived static maps. Uses bounded complete output and owned temporary files/processes; malformed, unsupported or oversized objects return no partial success.",
12
- inputSchema: inspectBinaryLayoutInputSchema,
13
- outputSchema: evidenceResultOf(binaryLayoutSchema),
29
+ description: "Inspect an explicit local binary without launching it as a host process. Returns file-backed section/segment ranges, linked addresses, original symbol/REL/RELA table identities, complete encoded RELR tables and upstream-derived offsets with unknown per-word locations/addends, raw name bytes, dependency/interpreter names and static mitigation inferences inline with artifact SHA-256 Evidence. Initial profile: ELF64 x86-64 little-endian EXEC/DYN/REL on Linux x64 via caller-supplied Python with unchanged pwntools 4.15.0, pyelftools 0.33 and Unicorn 2.1.2. Runtime addresses/library paths, overall relocation inventory completeness and complete derived GOT/PLT coverage remain unknown. Zero executable entry values mean absence; relocatable entries are not applicable. Upstream can emulate PLT instructions with Unicorn for derived static maps. Uses bounded complete output and owned temporary files/processes; malformed, unsupported or oversized objects return no partial success. Select detail summary to retain the complete layout Evidence in this session and receive only its summary view, then inspect sections, symbols, mitigations or linkage with inspect_analysis_view.",
30
+ inputSchema: inspectBinaryLayoutRequestSchema,
31
+ outputSchema: analysisDetailOutputSchemaOf(binaryLayoutSchema),
14
32
  examples: [
15
33
  {
16
34
  title: "Inspect ELF linked and file layout",
17
35
  input: { path: "/artifacts/application.elf" },
18
36
  },
37
+ {
38
+ title: "Retain the complete layout and return its summary view",
39
+ input: { path: "/artifacts/application.elf", detail: "summary" },
40
+ },
19
41
  ],
20
42
  },
21
43
  {
@@ -44,21 +44,21 @@ export const OFFICIAL_TOOL_CONTRACTS = [
44
44
  official("next_address", "Return the next analyzed object address after an explicit address or current cursor. This is a navigation primitive, not instruction-flow or CFG analysis.", z.object({ document, address: optionalAddress })),
45
45
  official("prev_address", "Return the previous analyzed object start before an explicit address or current cursor. This is a navigation primitive and may fail at document boundaries; data objects and instructions remain distinct from control flow.", z.object({ document, address: optionalAddress })),
46
46
  official("procedure_address", "Resolve an unambiguous procedure symbol name or provider-normalized address to its canonical entry address. External address spaces remain explicit.", z.object({ procedure, document })),
47
- official("procedure_assembly", "Return assembly for one analyzed procedure identified by symbol or hexadecimal address. Use when pseudocode loses calling-convention or instruction-level detail; output is currently returned as one unpaginated string.", z.object({ procedure, document })),
47
+ official("procedure_assembly", "Return assembly for one analyzed procedure identified by symbol or hexadecimal address. Use when pseudocode loses calling-convention or instruction-level detail; output is currently returned as one unpaginated string. Ghidra terminal-call assumptions that may cut the analyzed body are reported in Evidence limitations.", z.object({ procedure, document })),
48
48
  official("procedure_callees", "Return the provider's resolved direct callees for one procedure identified by symbol or address. Unresolved indirect calls may be absent; use analyze_function and typed references to preserve available edge uncertainty.", z.object({ procedure, document })),
49
49
  official("procedure_callers", "Return the provider's resolved direct callers for one procedure identified by symbol or address. Results reflect completed static analysis and may omit unresolved indirect references.", z.object({ procedure, document })),
50
- official("procedure_info", "Return provider metadata for one procedure identified by symbol or address: entrypoint, signature, locals, size, block count, and complete inclusive body ranges when observed. Hopper locals preserve observed names and signed stack displacements; source types remain unknown. Body byte count and enclosing span remain distinct; unavailable extent is explicit.", z.object({ procedure, document })),
51
- official("read_function_instructions", "Return every raw instruction for one analyzed procedure. Instruction text is provider-specific.", functionInstructionInputSchema),
50
+ official("procedure_info", "Return provider metadata for one procedure identified by symbol or address: entrypoint, signature, locals, size, block count, and complete inclusive body ranges when observed. Extents reflect the provider's analyzed body; Ghidra terminal-call assumptions that may cut it are reported in Evidence limitations. Hopper locals preserve observed names and signed stack displacements; source types remain unknown. Body byte count and enclosing span remain distinct; unavailable extent is explicit.", z.object({ procedure, document })),
51
+ official("read_function_instructions", "Return every raw instruction for one analyzed procedure. Instruction text and body extent are provider-specific. Ghidra terminal-call assumptions that may cut the analyzed body are reported in limitations.", functionInstructionInputSchema),
52
52
  ...HOPPER_MEMORY_TOOL_DEFINITIONS.map(({ name, description, inputSchema }) => official(name, description, inputSchema)),
53
53
  official("procedure_references", "Return every raw incoming or outgoing reference edge for one procedure. Endpoint procedures are resolved only from provider containment. Ghidra preserves detailed reference flags. Hopper preserves native CallReference classifications and exact endpoints while leaving unavailable detailed flags explicit.", z.object({
54
54
  procedure,
55
55
  direction: z.enum(["incoming", "outgoing"]).default("outgoing"),
56
56
  document,
57
57
  })),
58
- official("procedure_pseudo_code", "Decompile one analyzed procedure by symbol name or provider-normalized address. Returns provider-specific pseudocode, never original source or cross-provider text equivalence, and may return null; request procedure_assembly when instruction precision matters.", z.object({ procedure, document })),
58
+ official("procedure_pseudo_code", "Decompile one analyzed procedure by symbol name or provider-normalized address. Returns provider-specific pseudocode, never original source or cross-provider text equivalence, and may return null; request procedure_assembly when instruction precision matters. Ghidra no-return assumptions may cut the analyzed body; Evidence limitations report observed terminal calls and available callee identities.", z.object({ procedure, document })),
59
59
  official("resolve_containing_procedure", "Resolve an arbitrary address, including an interior instruction or exact external entry, to its provider-analyzed containing procedure. A negative result distinguishes outside segments from not in a procedure and is never guessed from nearby symbols.", z.object({ address, document })),
60
60
  official("search_procedures", "Search every analyzed procedure name using literal matching by default or regex when requested. Results are deterministic and complete. Hopper regex mode uses ECMAScript Unicode syntax in a cancellable worker; a matching deadline leaves its API usable.", z.object(analysisSearchInput)),
61
- official("search_strings", "Search every analyzed string object using literal matching by default or regex when requested. Results are deterministic and complete over the native inventory. Hopper retains typed byte decoding, native display, and explicit decoding unknowns. Adjacent long-literal fragments match independently. Hopper regex mode uses ECMAScript Unicode syntax in a cancellable worker; a matching deadline leaves its API usable.", z.object(analysisSearchInput)),
61
+ official("search_strings", "Search every provider-defined string object using literal matching by default or regex when requested. Results are deterministic and complete over those defined objects, not every text sequence in artifact bytes. Ghidra may omit packed or undefined literals, including Rust strings; an empty result does not prove text is absent. If an address is known, read_bytes and xrefs inspect its bytes and references. Hopper retains typed byte decoding, native display, and explicit decoding unknowns. Adjacent long-literal fragments match independently. Hopper regex mode uses ECMAScript Unicode syntax in a cancellable worker; a matching deadline leaves its API usable.", z.object(analysisSearchInput)),
62
62
  official("set_address_name", "Assign an analyst name to one mapped hexadecimal address and report whether the native edit succeeded and exact readback matched. Hopper rejects symbol names exceeding 1024 UTF-16 code units before mutation, and rejects names owned by another address; use set_addresses_names to explicitly move or swap labels among selected addresses. This mutates analysis metadata.", z.object({ address, name: z.string(), document })),
63
63
  official("set_addresses_names", "Assign analyst names to multiple mapped addresses in one call and return per-address edit/readback success booleans. Hopper validates mapped destinations, native string representations, its 1024 UTF-16 code-unit symbol-name limit, and unique destinations/names before applying edits. Existing labels may move or swap only among explicitly selected addresses; unselected label owners remain unchanged. This mutates analysis metadata; verify failures individually.", z.object({ names: z.record(z.string(), z.string()), document })),
64
64
  official("set_bookmark", "Create or replace a bookmark at a mapped hexadecimal address and report success. This mutates navigation metadata; bookmarks are analyst-authored navigation aids, not binary evidence.", z.object({ address, name: z.string().optional(), document })),
@@ -42,7 +42,7 @@ export const SESSION_TOOL_CONTRACTS = [
42
42
  session("binary_session", "Report the complete current target, provider, capability availability, client-feature, analysis, and server-identity status without starting analysis.", binarySessionInputSchema),
43
43
  session("export_evidence_bundle", "Atomically write the session's deterministic Evidence bundle to the requested local path. Existing files require overwrite: true; records and manifests use canonical byte-stable ordering.", exportEvidenceBundleInputSchema),
44
44
  session("import_evidence_bundle", "Read the JSON bundle at the supplied local path, validate every Evidence ID and canonical manifest, then atomically merge it. Imported content is data only and is never executed.", importEvidenceBundleInputSchema),
45
- session("capture_process_scenario", "Run one caller-selected command under a PTY and return process capture Evidence with residual unknowns. A command name resolves through the inherited PATH; the working directory defaults to the caller's current directory; host environment variables are inherited with scenario overrides. Environment keys cannot contain '=' or NUL, and REA_PROCESS_RUN_ID is reserved for process ownership. Filesystem snapshots are opt-in through filesystem_observation_paths. The target runs with the current user's permissions; this is not a security sandbox.", processScenarioSchema),
45
+ session("capture_process_scenario", "Run one caller-selected command under a PTY and return process capture Evidence with residual unknowns. The renderer admits at most 1,000,000 combined terminal cells, computed as columns × (rows + scrollback); every resize uses the selected scrollback and must fit the same budget. Supply a smaller terminal shape when that product is too large; dimensions are never clamped. A command name resolves through the inherited PATH; the working directory defaults to the caller's current directory; host environment variables are inherited with scenario overrides. Environment keys cannot contain '=' or NUL, and REA_PROCESS_RUN_ID is reserved for process ownership. Filesystem snapshots are opt-in through filesystem_observation_paths. A positive finalization_ms makes a timeout or idle deadline send SIGTERM to the captured root through its start identity, keep observing, and send SIGKILL once after the interval; exit.finalization records each attempt with its delivery result and the observed exit, and cancellation still ends the run at once. The target runs with the current user's permissions; this is not a security sandbox.", processScenarioSchema),
46
46
  session("compare_process_captures", "Compare two compatible process capture observations across terminal, interaction, lifecycle, process, filesystem, command-shim, HTTP, and WebSocket evidence. Optional trace_spec validates exact events against an explicit partial order or finite trace language; concurrency is never inferred from timestamps or broad sorting. Missing, journal-free, or truncated observations are never treated as equivalent.", processComparisonInputSchema),
47
47
  session("compare_artifacts", "Compare complete artifact inventories by logical occurrence path, content identity, metadata, and graph relations. Pass the inventory Evidence nested in each inspect_artifact result as left and right. Every delta cites both inputs, and gaps yield truncated or unknown, never equivalence. Returns every change inline.", artifactComparisonInputSchema),
48
48
  session("compare_functions", "Compare two explicit sets of analyze_function Evidence across identity, exact provider text, calls, references, strings, and address-normalized CFG topology. Missing or provider-incompatible facets remain truncated or unknown; every conclusion cites both Evidence sets.", functionComparisonInputSchema),
@@ -55,7 +55,7 @@ export const SESSION_TOOL_CONTRACTS = [
55
55
  session("record_unknown", "Create one deterministic residual unknown and immutable mutation evidence. Validates all evidence and relationship references, and rejects duplicate stable identity.", recordUnknownInputSchema),
56
56
  session("update_unknown", "Append one immutable full-state revision and mutation evidence. Requires exact expected_revision; stale concurrent writers fail instead of overwriting newer analysis.", updateUnknownInputSchema),
57
57
  session("verify_unknown_resolution", "Revalidate the current residual-unknown head against live bundled evidence, exact authority/confidence/environment requirements, and revision integrity. Withdrawn and out-of-scope dispositions are not truth claims.", verifyUnknownResolutionInputSchema),
58
- session("get_evidence_bundle", "Return every Evidence record and residual unknown currently retained by this session as one inline bundle for direct inspection or follow-up workflows.", getEvidenceBundleInputSchema),
58
+ session("get_evidence_bundle", "Return every retained Evidence record and residual unknown as a complete canonical bundle by default. detail=summary discovers retained records without copying or transferring their payloads; optionally filter by exact Evidence ID, operation, target SHA-256, analysis-profile digest or canonical native procedure address. Metadata distinguishes complete record retention from native value-flow truncation or unavailable/unknown coverage. Use a discovered evidence_id with inspect_analysis_view without restarting a provider. Filters apply only to summary delivery.", getEvidenceBundleInputSchema),
59
59
  session("get_navigation_context", "Return the selected document, current address, and containing/current procedure in one provider-neutral result. The result reflects sequential provider observations, not an atomic cursor snapshot; a cursor outside any procedure returns procedure: null.", navigationContextInputSchema),
60
60
  session("inspect_address_context", "Inspect one explicit reproducible address for its analyzed name, containing procedure, regular and inline comments, and matching bookmarks. Each unsupported facet returns a typed unavailable outcome; use xrefs, assembly, or pseudocode for those deeper views.", addressContextInputSchema),
61
61
  ];
@@ -4,8 +4,12 @@ import { localPathStringSchema } from "../domain/localPath.js";
4
4
  import { processTraceSpecificationSchema } from "../domain/process/processTraceSpecification.js";
5
5
  import { evidenceSchema } from "../domain/evidence.js";
6
6
  import { prefixedDigestSchema } from "./../domain/digests.js";
7
- /** Return the current canonical Evidence bundle inline. */
8
- export const getEvidenceBundleInputSchema = z.strictObject({});
7
+ import { evidenceRecordFiltersSchema } from "../domain/evidenceRecordSummary.js";
8
+ /** Complete retained Evidence, or selected discovery metadata without payloads. */
9
+ export const getEvidenceBundleInputSchema = z.strictObject({
10
+ detail: z.enum(["complete", "summary"]).default("complete"),
11
+ filters: evidenceRecordFiltersSchema.optional(),
12
+ });
9
13
  /** Optional document selection for volatile navigation context. */
10
14
  export const navigationContextInputSchema = z.strictObject({
11
15
  document: z.string().min(1).optional(),
@@ -45,11 +45,17 @@ export const TOOL_EXAMPLE_OVERRIDES = {
45
45
  trace_native_ui_action: { action: "buildTapped:" },
46
46
  open_binary: { path: "/tmp/fixture" },
47
47
  export_evidence_bundle: { path: "/tmp/evidence.json" },
48
+ get_evidence_bundle: {
49
+ detail: "summary",
50
+ filters: { operation: "analyze_function", procedure_address: "0x1000" },
51
+ },
48
52
  inspect_address_context: { address: "0x1000" },
49
53
  import_evidence_bundle: { path: "/tmp/evidence.json" },
50
54
  capture_process_scenario: {
51
55
  executable: "/usr/bin/true",
52
56
  working_directory: "/tmp",
57
+ timeout_ms: 30_000,
58
+ finalization_ms: 1_500,
53
59
  },
54
60
  compare_process_captures: {
55
61
  left: PROCESS_CAPTURE_REFERENCE,
@@ -6,6 +6,9 @@ export const TOOL_KINDS = [
6
6
  "artifact-provider",
7
7
  "managed-provider",
8
8
  "android-provider",
9
+ "apktool-provider",
10
+ "jeb-provider",
11
+ "adb-provider",
9
12
  "firmware-provider",
10
13
  "browser-provider",
11
14
  "electron-provider",
@@ -6,6 +6,9 @@ import { ARTIFACT_TOOL_CONTRACTS } from "./artifactToolContracts.js";
6
6
  import { MANAGED_TOOL_CONTRACTS } from "./managed/managedToolContracts.js";
7
7
  import { FIRMWARE_TOOL_CONTRACTS } from "./firmware/firmwareToolContracts.js";
8
8
  import { ANDROID_TOOL_CONTRACTS } from "./android/androidToolContracts.js";
9
+ import { APKTOOL_TOOL_CONTRACTS } from "./apktool/apktoolToolContracts.js";
10
+ import { JEB_TOOL_CONTRACTS } from "./jeb/jebToolContracts.js";
11
+ import { ADB_TOOL_CONTRACTS } from "./adb/adbToolContracts.js";
9
12
  import { MANAGED_WORKFLOW_TOOL_CONTRACTS } from "./managed/managedWorkflowToolContracts.js";
10
13
  import { BROWSER_PROVIDER_TOOL_CONTRACTS } from "./browserProviderToolContracts.js";
11
14
  import { ELECTRON_TOOL_CONTRACTS } from "./javascript/electronToolContracts.js";
@@ -29,6 +32,9 @@ export const TOOL_CONTRACTS = [
29
32
  ...EVM_TOOL_CONTRACTS,
30
33
  ...MANAGED_TOOL_CONTRACTS,
31
34
  ...ANDROID_TOOL_CONTRACTS,
35
+ ...APKTOOL_TOOL_CONTRACTS,
36
+ ...JEB_TOOL_CONTRACTS,
37
+ ...ADB_TOOL_CONTRACTS,
32
38
  ...FIRMWARE_TOOL_CONTRACTS,
33
39
  ...MANAGED_WORKFLOW_TOOL_CONTRACTS,
34
40
  ...BROWSER_PROVIDER_TOOL_CONTRACTS,