rea-agents 4.0.0 → 4.1.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.
- package/README.md +93 -30
- package/bridge/ghidra/ReaGhidraBridge.java +358 -15
- package/bridge/ghidra/ReaGhidraExtensions.java +113 -0
- package/bridge/ghidra/ReaGhidraPrepareCom.java +32 -0
- package/dist/android/AndroidTargetSnapshot.js +34 -0
- package/dist/android/JadxAnalysis.js +191 -0
- package/dist/android/JadxConfiguration.js +41 -0
- package/dist/android/JadxMcpTransport.js +145 -0
- package/dist/android/JadxProtocol.js +101 -0
- package/dist/android/JadxProvider.js +170 -0
- package/dist/android/JadxRelease.js +19 -0
- package/dist/android/JadxSession.js +97 -0
- package/dist/application/AnalysisContextQueries.js +2 -1
- package/dist/application/AnalysisProviderEvaluation.js +5 -3
- package/dist/application/AnalysisProviderRegistry.js +2 -1
- package/dist/application/AnalysisSnapshotCache.js +4 -1
- package/dist/application/AnalysisSnapshotFiles.js +1 -1
- package/dist/application/AndroidAnalysisPort.js +1 -0
- package/dist/application/AndroidAnalysisService.js +37 -0
- package/dist/application/ArtifactExtraction.js +7 -4
- package/dist/application/ArtifactGraphConstruction.js +10 -17
- package/dist/application/ArtifactInventory/scanCanonical.js +8 -7
- package/dist/application/BinarySession.js +16 -3
- package/dist/application/BinarySessionExecution.js +4 -1
- package/dist/application/BinarySessionOpen.js +3 -2
- package/dist/application/BinarySessionRecords.js +9 -3
- package/dist/application/BinaryTargetResolver.js +25 -6
- package/dist/application/BrowserObservationService.js +2 -1
- package/dist/application/BrowserScenarioCaptureService.js +2 -1
- package/dist/application/BrowserScenarioEvidence.js +2 -2
- package/dist/application/CallPathTracing.js +2 -1
- package/dist/application/CapabilityInventory.js +18 -0
- package/dist/application/ClientConfigPath.js +3 -1
- package/dist/application/ClientConfigurationDocument.js +11 -1
- package/dist/application/ClientRegistrationStatus.js +8 -1
- package/dist/application/CompositeProvider.js +1 -1
- package/dist/application/DirectAnalysis.js +23 -7
- package/dist/application/DirectAnalysisStatus.js +3 -3
- package/dist/application/Doctor.js +48 -8
- package/dist/application/DoctorDiagnostics.js +7 -5
- package/dist/application/DoctorScope.js +1 -1
- package/dist/application/ElectronActiveEvidence.js +2 -2
- package/dist/application/ElectronActiveObservationService.js +2 -1
- package/dist/application/ElectronBoundaryAnalysis.js +1 -1
- package/dist/application/ElectronObservationService.js +2 -1
- package/dist/application/EnhancedLiteralTracing.js +2 -1
- package/dist/application/EnhancedToolTypes.js +2 -1
- package/dist/application/EnhancedTools.js +3 -1
- package/dist/application/EvidenceBundleCommands.js +2 -1
- package/dist/application/EvidenceBundleFiles.js +1 -1
- package/dist/application/EvidenceInputResolver.js +30 -0
- package/dist/application/EvidenceLedger.js +2 -1
- package/dist/application/FirmwareAnalysisPort.js +1 -0
- package/dist/application/FirmwareAnalysisService.js +35 -0
- package/dist/application/FunctionAnalysisEvidence.js +32 -0
- package/dist/application/InventoryProjectionEvidence.js +2 -1
- package/dist/application/JavaScriptApplicationService.js +50 -3
- package/dist/application/JavaScriptApplicationWorkflowService.js +2 -1
- package/dist/application/JavaScriptArtifactAnalysis.js +4 -2
- package/dist/application/JavaScriptArtifactFiles.js +4 -2
- package/dist/application/JavaScriptArtifactPathResolution.js +6 -2
- package/dist/application/JavaScriptJsonModules.js +3 -2
- package/dist/application/JavaScriptModuleRelationships.js +4 -2
- package/dist/application/JavaScriptRuntimeObservationService.js +2 -1
- package/dist/application/JavaScriptRuntimeReconciliationService.js +2 -1
- package/dist/application/JavaScriptSemanticGraphProjection.js +1 -1
- package/dist/application/JavaScriptSemanticTraceService.js +2 -1
- package/dist/application/JsonFiles.js +1 -1
- package/dist/application/LazyAnalysisProvider.js +3 -1
- package/dist/application/LinuxHopper.js +12 -4
- package/dist/application/MacHopper.js +20 -7
- package/dist/application/ManagedApplicationGraphService.js +2 -1
- package/dist/application/ManagedMemberComparisonService.js +3 -1
- package/dist/application/ManagedNativeVerificationService.js +2 -1
- package/dist/application/ManagedReconstructionService.js +2 -1
- package/dist/application/NativeCallRoutes.js +1 -1
- package/dist/application/NativeDispatchMetadataInspection.js +1 -1
- package/dist/application/NativeUiActionTrace.js +2 -1
- package/dist/application/NativeValueTrace.js +1 -1
- package/dist/application/ProcessCaptureError.js +1 -1
- package/dist/application/ProcessCaptureJournal.js +3 -1
- package/dist/application/ProcessCaptureLifecycle.js +6 -3
- package/dist/application/ProcessCli.js +9 -5
- package/dist/application/ProcessEvidence.js +2 -6
- package/dist/application/ProcessHarness.js +3 -2
- package/dist/application/ProcessNormalization.js +12 -5
- package/dist/application/ProcessSampling.js +3 -1
- package/dist/application/ReconstructionCoverageService.js +2 -1
- package/dist/application/ReconstructionObligationLedgerService.js +2 -1
- package/dist/application/ReferenceSourceImportEntries.js +2 -0
- package/dist/application/ReferenceSourceImportPolicy.js +4 -2
- package/dist/application/ReferenceSourceVcsAdapter.js +35 -4
- package/dist/application/SessionProviderRouter.js +4 -1
- package/dist/application/Setup.js +1 -128
- package/dist/application/SetupClientConfiguration.js +17 -6
- package/dist/application/SetupHost.js +111 -0
- package/dist/application/SetupRegistrationEnvironment.js +1 -2
- package/dist/application/SetupSkill.js +9 -3
- package/dist/application/SetupTypes.js +17 -0
- package/dist/application/StoreFileLock.js +7 -2
- package/dist/application/SupportedClients.js +8 -0
- package/dist/application/Uninstall.js +9 -4
- package/dist/application/UpdateRuntime.js +5 -2
- package/dist/application/WindowsCapabilities.js +7 -7
- package/dist/application/runtime.js +3 -1
- package/dist/artifacts/ArtifactProvider.js +3 -1
- package/dist/artifacts/DirectoryArtifactReader.js +2 -0
- package/dist/artifacts/NativeDmgArtifactReader.js +10 -3
- package/dist/artifacts/NibArchive.js +4 -2
- package/dist/artifacts/SafeOutputTree.js +26 -10
- package/dist/artifacts/ZipArtifactReader.js +1 -0
- package/dist/browser/BrowserProcessStartup.js +3 -1
- package/dist/browser/CdpAuthorizedMainFrame.js +1 -1
- package/dist/browser/CdpBrowserProvider.js +4 -1
- package/dist/browser/CdpCaptureDocuments.js +3 -1
- package/dist/browser/CdpCaptureEventHandlers.js +6 -2
- package/dist/browser/CdpCaptureStorageFingerprints.js +1 -1
- package/dist/browser/CdpCaptureValues.js +6 -2
- package/dist/browser/CdpConnection.js +8 -6
- package/dist/browser/CdpElectronInspection.js +3 -3
- package/dist/browser/CdpElectronProvider.js +4 -1
- package/dist/browser/CdpElectronScripts.js +2 -2
- package/dist/browser/CdpEndpoint.js +22 -10
- package/dist/browser/CdpObservationSession.js +2 -1
- package/dist/browser/CdpOptionalCommand.js +1 -1
- package/dist/browser/CdpPageCapture.js +2 -1
- package/dist/browser/CdpSafeMetadata.js +53 -8
- package/dist/browser/CdpScreenshot.js +1 -1
- package/dist/browser/CdpTargetSession.js +8 -5
- package/dist/browser/CdpWebMcpDiscovery.js +1 -1
- package/dist/browser/ElectronFileScope.js +9 -3
- package/dist/browser/JavaScriptRuntimeScope.js +3 -1
- package/dist/browser/PlaywrightBrowserScenarioProvider.js +3 -1
- package/dist/browser/PlaywrightElectronActiveActions.js +1 -1
- package/dist/browser/PlaywrightElectronActiveProvider.js +6 -2
- package/dist/browser/PlaywrightExecutionBoundary.js +1 -1
- package/dist/browser/PlaywrightScenarioArtifacts.js +10 -5
- package/dist/browser/PlaywrightScenarioBrowser.js +3 -1
- package/dist/browser/PlaywrightScenarioEvents.js +6 -2
- package/dist/browser/PlaywrightScenarioSession.js +5 -2
- package/dist/browser/V8InspectorEndpoint.js +2 -1
- package/dist/browser/V8InspectorProvider.js +6 -1
- package/dist/browser/WebSourceMapFetcher.js +24 -11
- package/dist/cli/androidCommands.js +81 -0
- package/dist/{cliApplicationCommands.js → cli/applicationCommands.js} +18 -16
- package/dist/{cliBrowserAdvancedCommands.js → cli/browserAdvancedCommands.js} +13 -16
- package/dist/{cliBrowserCommands.js → cli/browserCommands.js} +9 -9
- package/dist/cli/commandCancellation.js +24 -0
- package/dist/cli/coreAnalysisCommands.js +110 -17
- package/dist/{cliElectronCommands.js → cli/electronCommands.js} +14 -13
- package/dist/cli/firmwareCommands.js +75 -0
- package/dist/{cliSetup.js → cli/interactiveSetup.js} +1 -1
- package/dist/cli/javascriptApplicationAnalysis.js +1 -1
- package/dist/cli/managedCommands.js +1 -1
- package/dist/cli/managedProjectGraphCommand.js +1 -1
- package/dist/cli/options.js +7 -1
- package/dist/{cliProcessCommands.js → cli/processCommands.js} +3 -3
- package/dist/cli/referenceSourceImportStatus.js +10 -0
- package/dist/cli/setupCommands.js +4 -2
- package/dist/cli/utilityCommands.js +3 -2
- package/dist/cli.js +10 -15
- package/dist/cliBrowserContext.js +1 -1
- package/dist/cliBrowserScenarioCommands.js +2 -1
- package/dist/cliCommandNames.js +11 -2
- package/dist/cliEvidenceCommands.js +2 -1
- package/dist/cliJavaScriptRuntimeCommands.js +2 -1
- package/dist/cliJsonInput.js +26 -11
- package/dist/cliLogging.js +2 -1
- package/dist/cliOutput.js +15 -16
- package/dist/config/environment.js +11 -1
- package/dist/config/parseConfig.js +7 -1
- package/dist/config/parsers.js +1 -1
- package/dist/contracts/androidToolContracts.js +77 -0
- package/dist/contracts/applicationToolContracts.js +32 -5
- package/dist/contracts/applicationWorkflowInputContracts.js +13 -13
- package/dist/contracts/artifactComparisonExample.js +7 -14
- package/dist/contracts/enhancedToolContracts.js +31 -0
- package/dist/contracts/errorSchemas.js +4 -2
- package/dist/contracts/evidenceInputContracts.js +13 -0
- package/dist/contracts/firmwareToolContracts.js +38 -0
- package/dist/contracts/officialToolContracts.js +66 -0
- package/dist/contracts/promptContracts.js +1 -1
- package/dist/contracts/sessionLifecycleInputs.js +4 -0
- package/dist/contracts/sessionToolContracts.js +43 -0
- package/dist/contracts/sessionToolSchemas.js +1 -1
- package/dist/contracts/toolContractExamples.js +5 -0
- package/dist/contracts/toolContractTypes.js +2 -0
- package/dist/contracts/toolContracts.js +7 -130
- package/dist/contracts/toolEffects.js +43 -0
- package/dist/contracts/toolOutputSchemaGroups.js +4 -0
- package/dist/contracts/toolOutputSchemaPrimitives.js +1 -0
- package/dist/doctorRuntime.js +5 -1
- package/dist/domain/analysisErrorBase.js +33 -0
- package/dist/domain/analysisErrorCore.js +60 -0
- package/dist/domain/analysisErrorPresentation.js +22 -2
- package/dist/domain/analysisErrorProjection.js +24 -3
- package/dist/domain/analysisSnapshot.js +1 -0
- package/dist/domain/androidAnalysis.js +141 -0
- package/dist/domain/appleAssetCatalog.js +1 -1
- package/dist/domain/artifactGraph.js +1 -0
- package/dist/domain/artifactInspection.js +19 -17
- package/dist/domain/artifactInventoryEvidence.js +20 -25
- package/dist/domain/artifactOperationError.js +16 -0
- package/dist/domain/browserObservation.js +12 -4
- package/dist/domain/browserObservationError.js +23 -0
- package/dist/domain/browserScenario.js +1 -1
- package/dist/domain/browserScenarioCapture.js +1 -1
- package/dist/domain/browserScenarioDiff.js +1 -1
- package/dist/domain/browserScenarioNormalization.js +6 -11
- package/dist/domain/browserScenarioValues.js +3 -1
- package/dist/domain/callPath.js +47 -7
- package/dist/domain/canonicalDigest.js +65 -0
- package/dist/domain/canonicalOrdering.js +11 -0
- package/dist/domain/changedBehavior.js +8 -7
- package/dist/domain/comparisonSemantics.js +2 -4
- package/dist/domain/configurationErrors.js +25 -0
- package/dist/domain/dosCom.js +8 -0
- package/dist/domain/electronActiveObservation.js +3 -1
- package/dist/domain/electronStaticAnalysisBrowser.js +13 -23
- package/dist/domain/electronStaticAnalysisNative.js +2 -1
- package/dist/domain/electronStaticAnalysisValues.js +23 -3
- package/dist/domain/evidence.js +3 -11
- package/dist/domain/evidenceErrors.js +30 -0
- package/dist/domain/firmwareAnalysis.js +121 -0
- package/dist/domain/functionComparison.js +4 -2
- package/dist/domain/functionComparisonDimensions.js +6 -4
- package/dist/domain/functionComparisonNormalization.js +8 -1
- package/dist/domain/functionComparisonResults.js +1 -4
- package/dist/domain/hopperErrors.js +78 -0
- package/dist/domain/hopperValues.js +2 -1
- package/dist/domain/interfaceBuilderGraph.js +3 -1
- package/dist/domain/javascriptApplicationChangeGraph.js +2 -2
- package/dist/domain/javascriptApplicationGraph.js +13 -22
- package/dist/domain/javascriptApplicationVersionComparison.js +3 -11
- package/dist/domain/javascriptApplicationVersionItems.js +3 -3
- package/dist/domain/javascriptApplicationVersionKeys.js +1 -1
- package/dist/domain/javascriptAstFingerprint.js +1 -1
- package/dist/domain/javascriptExportShapeComparison.js +1 -2
- package/dist/domain/javascriptExportShapeSelection.js +1 -1
- package/dist/domain/javascriptExportShapeVariants.js +7 -3
- package/dist/domain/javascriptFeatureSeed.js +29 -9
- package/dist/domain/javascriptFeatureTrace.js +9 -13
- package/dist/domain/javascriptFeatureTraversal.js +2 -1
- package/dist/domain/javascriptNativeHandoff.js +2 -1
- package/dist/domain/javascriptRuntimeLoadState.js +2 -2
- package/dist/domain/javascriptRuntimeReconciliationActive.js +3 -10
- package/dist/domain/javascriptRuntimeReconciliationGraph.js +2 -2
- package/dist/domain/javascriptRuntimeReconciliationMatching.js +4 -3
- package/dist/domain/javascriptRuntimeReconciliationParsing.js +8 -14
- package/dist/domain/javascriptRuntimeReconciliationResult.js +4 -4
- package/dist/domain/javascriptRuntimeReconciliationSchemas.js +5 -2
- package/dist/domain/javascriptRuntimeStaticCandidates.js +8 -4
- package/dist/domain/javascriptSemanticAnalysis.js +40 -3
- package/dist/domain/javascriptSemanticCallResolution.js +2 -1
- package/dist/domain/javascriptSemanticChildProcesses.js +2 -1
- package/dist/domain/javascriptSemanticDataEffects.js +2 -1
- package/dist/domain/javascriptSemanticFingerprints.js +1 -1
- package/dist/domain/javascriptSemanticGraph.js +23 -28
- package/dist/domain/javascriptSemanticPrimitives.js +9 -2
- package/dist/domain/javascriptSemanticProjection.js +2 -1
- package/dist/domain/javascriptSemanticPromises.js +2 -1
- package/dist/domain/javascriptSemanticProvenance.js +1 -1
- package/dist/domain/javascriptSemanticQuery.js +7 -8
- package/dist/domain/javascriptSemanticQueryAssessment.js +1 -2
- package/dist/domain/javascriptSemanticQueryIdentity.js +1 -2
- package/dist/domain/javascriptSemanticReturns.js +2 -1
- package/dist/domain/javascriptSemanticValues.js +50 -16
- package/dist/domain/javascriptSourceParser.js +4 -2
- package/dist/domain/javascriptStaticAnalysis.js +1 -1
- package/dist/domain/javascriptStaticAnalysisBundler.js +2 -1
- package/dist/domain/javascriptStaticAnalysisCalls.js +14 -6
- package/dist/domain/javascriptStaticAnalysisHelpers.js +31 -4
- package/dist/domain/jsonShape.js +6 -2
- package/dist/domain/managedMemberComparison.js +1 -0
- package/dist/domain/managedMemberComparisonItems.js +2 -0
- package/dist/domain/managedNativeVerificationMatch.js +5 -3
- package/dist/domain/nativeDataType.js +2 -0
- package/dist/domain/nativeFunctionAnnotations.js +43 -0
- package/dist/domain/nativeLoadImage.js +95 -0
- package/dist/domain/nativeMetadataRecovery.js +55 -0
- package/dist/domain/processCapture.js +0 -1
- package/dist/domain/processEvidenceProvider.js +11 -0
- package/dist/domain/processTraceComparison.js +1 -1
- package/dist/domain/providerAdapterError.js +17 -0
- package/dist/domain/providerCleanupError.js +1 -1
- package/dist/domain/providerSelectionError.js +44 -0
- package/dist/domain/reconstructionUnknowns.js +1 -1
- package/dist/domain/reconstructionVerification.js +22 -8
- package/dist/domain/referenceSourceClassification.js +5 -6
- package/dist/domain/referenceSourceGraph.js +9 -17
- package/dist/domain/referenceSourceImportParsing.js +38 -23
- package/dist/domain/runtimeIdentification.js +1 -1
- package/dist/domain/runtimeVersion.js +4 -7
- package/dist/domain/safeJson.js +13 -0
- package/dist/domain/sourceToBundleComparison.js +5 -7
- package/dist/domain/sourceToBundleSignals.js +6 -6
- package/dist/domain/staticRuntimeCorrelation.js +9 -7
- package/dist/domain/unknownRegistryError.js +10 -0
- package/dist/domain/webBundleAnalyzerAst.js +22 -5
- package/dist/domain/webBundleAnalyzerInspection.js +20 -14
- package/dist/dotnet/ManagedMemberRows.js +1 -1
- package/dist/dotnet/ManagedMetadataHeaps.js +3 -2
- package/dist/dotnet/ManagedMetadataInventoryRows.js +4 -2
- package/dist/dotnet/ManagedMethodBodyReader.js +8 -1
- package/dist/dotnet/ManagedStaticProvider.js +3 -1
- package/dist/firmware/FirmwareCommand.js +163 -0
- package/dist/firmware/FirmwareFiles.js +190 -0
- package/dist/firmware/FirmwareProvider.js +258 -0
- package/dist/firmware/FirmwarePublication.js +84 -0
- package/dist/firmware/FirmwareRelease.js +32 -0
- package/dist/firmware/FirmwareReports.js +223 -0
- package/dist/generatedMcpToolCatalog.js +1 -1
- package/dist/generatedPackageMetadata.js +5 -5
- package/dist/ghidra/GhidraAnalysisProfile.js +37 -8
- package/dist/ghidra/GhidraClient.js +52 -6
- package/dist/ghidra/GhidraDiagnostics.js +3 -0
- package/dist/ghidra/GhidraDoctor.js +38 -14
- package/dist/ghidra/GhidraFunctionValues.js +10 -4
- package/dist/ghidra/GhidraInstallation.js +10 -4
- package/dist/ghidra/GhidraInventoryValues.js +39 -2
- package/dist/ghidra/GhidraLauncher.js +91 -26
- package/dist/ghidra/GhidraLoadImageValues.js +199 -0
- package/dist/ghidra/GhidraProvider.js +129 -13
- package/dist/ghidra/GhidraProviderCapabilities.js +52 -15
- package/dist/ghidra/GhidraRequestQueue.js +2 -2
- package/dist/ghidra/GhidraSessionError.js +31 -4
- package/dist/ghidra/GhidraSessionValues.js +10 -7
- package/dist/ghidra/GhidraTargetSnapshot.js +16 -2
- package/dist/ghidra/GhidraTransport.js +12 -0
- package/dist/ghidra/extensions/GhidraExtensionFailures.js +20 -0
- package/dist/ghidra/extensions/GhidraExtensions.js +170 -0
- package/dist/ghidra/extensions/nativeaot/NativeAotAdapter.js +21 -0
- package/dist/ghidra/extensions/nativeaot/NativeAotReport.js +84 -0
- package/dist/hopper/BridgeLauncher.js +4 -2
- package/dist/hopper/HopperAnalysisProfile.js +7 -2
- package/dist/hopper/HopperCleanup.js +55 -9
- package/dist/hopper/HopperClient.js +14 -4
- package/dist/hopper/HopperProcessDiagnostic.js +1 -1
- package/dist/hopper/HopperProvider.js +8 -4
- package/dist/hopper/HopperRequestQueue.js +7 -3
- package/dist/hopper/HopperSessionValues.js +1 -1
- package/dist/hopper/HopperSocketConnection.js +1 -1
- package/dist/hopper/HopperTargetLease.js +23 -15
- package/dist/hopper/LinuxPrivateDisplayDiagnostic.js +7 -8
- package/dist/hopper/LinuxPrivateDisplayProbe.js +6 -2
- package/dist/hopper/protocol.js +8 -8
- package/dist/ida/IdaConfiguration.js +56 -0
- package/dist/ida/IdaDoctor.js +53 -0
- package/dist/ida/IdaInput.js +62 -0
- package/dist/ida/IdaMcpConnection.js +111 -0
- package/dist/ida/IdaOperationRunner.js +299 -0
- package/dist/ida/IdaProtocolValues.js +178 -0
- package/dist/ida/IdaProvider.js +126 -0
- package/dist/ida/IdaProviderCapabilities.js +60 -0
- package/dist/ida/IdaSessionClient.js +306 -0
- package/dist/ida/IdaWorkspace.js +54 -0
- package/dist/main/shutdown.js +21 -1
- package/dist/main/startup.js +1 -1
- package/dist/main/transport.js +8 -4
- package/dist/main.js +5 -2
- package/dist/native/AppleDispatchMetadata.js +31 -10
- package/dist/native/NativeMacOSProvider.js +87 -15
- package/dist/native/NativeMachoInspection.js +42 -12
- package/dist/native/NativeUiHelperRuntime.js +7 -1
- package/dist/native/NativeUiObservation.js +6 -2
- package/dist/native/parsers/demangle.js +1 -1
- package/dist/native/parsers/dyldInfo.js +3 -3
- package/dist/native/parsers/otool.js +4 -1
- package/dist/native/parsers/plist.js +11 -3
- package/dist/process/PrivateRuntimeRoot.js +13 -3
- package/dist/process/ProcessOwnership.js +5 -73
- package/dist/process/ProcessOwnershipObservation.js +62 -2
- package/dist/process/ProcessOwnershipProcessTree.js +13 -0
- package/dist/process/ProviderProcess.js +24 -7
- package/dist/process/ProviderRunLineage.js +1 -1
- package/dist/process/WindowsAuthority.js +20 -1
- package/dist/reference/ReferenceSourceReaderEntries.js +5 -1
- package/dist/reference/ReferenceSourceReaderFile.js +1 -0
- package/dist/server/createServer.js +25 -2
- package/dist/server/mcpProgress.js +2 -1
- package/dist/server/promptCompletion.js +3 -3
- package/dist/server/registerAndroidTools.js +30 -0
- package/dist/server/registerApplicationTools/compareExportShapes.js +5 -1
- package/dist/server/registerApplicationTools/compareSourceToBundle.js +7 -2
- package/dist/server/registerApplicationTools/compareVersions.js +5 -1
- package/dist/server/registerApplicationTools/traceFeature.js +7 -2
- package/dist/server/registerApplicationTools/traceSemantics.js +7 -2
- package/dist/server/registerEnhancedTools.js +28 -1
- package/dist/server/registerFirmwareTools.js +22 -0
- package/dist/server/registerFunctionComparisonTool.js +1 -1
- package/dist/server/registerInvestigationTools/helpers.js +2 -1
- package/dist/server/registerManagedTools.js +1 -1
- package/dist/server/registerManagedWorkflowTools/evidence.js +1 -1
- package/dist/server/registerOfficialTools.js +4 -1
- package/dist/server/registerProcessComparisonTool.js +5 -2
- package/dist/server/registerSessionTools.js +3 -1
- package/dist/server/runDerivedOperation.js +1 -1
- package/dist/server/sessionAvailabilityPolicy.js +3 -0
- package/dist/server/sessionEvidence.js +1 -1
- package/dist/server/toolResult.js +2 -1
- package/dist/windows/WindowsNativeLoader.js +108 -0
- package/dist/windows/WindowsOwnedProcess.js +168 -0
- package/dist/windows/WindowsPrivateRuntime.js +137 -0
- package/install.sh +4 -6
- package/native/windows/README.md +102 -0
- package/native/windows/build/manifest.json +9 -0
- package/native/windows/build/rea-windows-x64.node +0 -0
- package/package.json +38 -24
- package/scripts/rea.mjs +1 -1
- package/scripts/verify-windows-native-artifact.mjs +39 -0
- package/skills/reverse-engineer-anything/SKILL.md +92 -24
- package/skills/reverse-engineer-anything/references/android-applications.md +31 -0
- package/skills/reverse-engineer-anything/references/javascript-applications.md +19 -2
- package/skills/reverse-engineer-anything/references/native-and-artifacts.md +52 -4
- package/dist/browser/CdpCanonicalJsonDigest.js +0 -9
- package/dist/domain/errors.js +0 -324
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Windows native controls
|
|
2
|
+
|
|
3
|
+
REA ships one Windows x64 Node-API 8 addon. Users do not compile it or install
|
|
4
|
+
another runtime. Ghidra and a full JDK remain bring-your-own prerequisites.
|
|
5
|
+
The addon uses Windows 10+ APIs and admits fixed local NTFS volumes only.
|
|
6
|
+
|
|
7
|
+
The package owns the artifact path. The loader checks the package version,
|
|
8
|
+
ABI, Node-API compatibility, PE architecture, and SHA-256 before loading it.
|
|
9
|
+
There is no environment override for loading an arbitrary native module.
|
|
10
|
+
|
|
11
|
+
## Build
|
|
12
|
+
|
|
13
|
+
The artifact lane requires Linux, MinGW-w64 `x86_64-w64-mingw32-g++`,
|
|
14
|
+
`x86_64-w64-mingw32-dlltool`, and `tar`. It never installs these commands.
|
|
15
|
+
Node-API headers are reused from the build cache or downloaded from the
|
|
16
|
+
pinned official Node release with its published SHA-256 checked.
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npm run build:windows-native
|
|
20
|
+
npm run verify:windows-native:artifact
|
|
21
|
+
npm pack
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`build/` is ignored by Git. The npm file inventory includes only the addon and
|
|
25
|
+
its manifest. Release CI builds both, and `prepublishOnly` rejects a missing,
|
|
26
|
+
stale, mismatched, or wrong-architecture artifact. A development tarball built
|
|
27
|
+
without this lane reports Windows native controls as unavailable.
|
|
28
|
+
|
|
29
|
+
## Boundaries
|
|
30
|
+
|
|
31
|
+
- Opaque Node objects carry a native type tag, resource kind, and closed state.
|
|
32
|
+
A pathname, serialized object, or forged handle cannot grant authority.
|
|
33
|
+
- Input admission opens every component with `OPEN_REPARSE_POINT`, verifies
|
|
34
|
+
the actual NTFS object, and retains handles that deny replacement and source
|
|
35
|
+
writing. An admitted child keeps each ancestor nonempty; ancestor handles
|
|
36
|
+
permit unrelated writes while NTFS rejects in-place reparse conversion. Volume serial, 128-bit file ID, final handle path,
|
|
37
|
+
requested path, size, and digest observations are preserved separately.
|
|
38
|
+
- New runtime roots and private child objects are created relative to admitted
|
|
39
|
+
parent handles with `NtCreateFile`. A protected DACL and current-user owner
|
|
40
|
+
are installed at creation. Readback permits exactly the current user and SYSTEM. Child
|
|
41
|
+
files inherit this boundary; private files are also checked by handle.
|
|
42
|
+
- Snapshots stream through a 64 KiB buffer on a Node async worker. Cancellation
|
|
43
|
+
is checked between reads, cleanup waits for settlement, and the digest
|
|
44
|
+
commits to the bytes written. Descriptor and snapshot handles remain held
|
|
45
|
+
until runtime cleanup.
|
|
46
|
+
Snapshot ownership is single-flight per runtime: an overlapping request fails
|
|
47
|
+
with `ERROR_BUSY` before acquiring cancellation ownership. The TypeScript owner
|
|
48
|
+
records only the accepted promise and abort listener; aborting a rejected copy
|
|
49
|
+
must not cancel the active copy.
|
|
50
|
+
- `PROC_THREAD_ATTRIBUTE_JOB_LIST` assigns a suspended child atomically to an
|
|
51
|
+
unnamed, non-inherited Job Object. Membership and kill-on-close policy are
|
|
52
|
+
checked before resume. Breakaway is disabled, and cleanup waits for all
|
|
53
|
+
job members and captured output, including detached descendants.
|
|
54
|
+
- Only the suspended child's default file owner is normalized. Caller token
|
|
55
|
+
privileges and ownership remain unchanged. Caller CPU affinity and process
|
|
56
|
+
priority are preserved in the child. Environment names are sorted and
|
|
57
|
+
deduplicated using Windows ordinal comparison, preserving their native Unicode
|
|
58
|
+
semantics and caller-selected values.
|
|
59
|
+
- Cleanup walks locked directory objects, removes files by handle, and unlinks
|
|
60
|
+
reparse entries without traversing their targets. Normal close, cancellation,
|
|
61
|
+
startup failure, and timeout release provider resources. Abrupt owner death
|
|
62
|
+
kills the owned job; it can leave private runtime files for later operator
|
|
63
|
+
cleanup and does not claim transactional deletion after a crash.
|
|
64
|
+
|
|
65
|
+
Windows failures retain their constraint, requested coordinate, Win32 code,
|
|
66
|
+
and system message. Unsupported filesystems and reparse paths are distinct
|
|
67
|
+
from OS access denial and missing packaged controls.
|
|
68
|
+
|
|
69
|
+
The bearer-token descriptor remains under its immutable private lease until
|
|
70
|
+
`runtime_close` on Windows; POSIX removes the descriptor after the bridge reads
|
|
71
|
+
it. Job ownership guarantees process termination on owner death, not deletion
|
|
72
|
+
of private files after a crash. SUBST drive aliases and changing DOS-device
|
|
73
|
+
namespaces are outside the verified P0 scope and are not detected as a separate
|
|
74
|
+
alias policy. Mounted-folder paths that report a reparse tag are rejected by
|
|
75
|
+
component admission; broader namespace variants remain unverified. Preserve
|
|
76
|
+
requested and final handle coordinates rather than treating them as one identity.
|
|
77
|
+
|
|
78
|
+
## Real verification
|
|
79
|
+
|
|
80
|
+
```powershell
|
|
81
|
+
npm run verify:windows-native
|
|
82
|
+
npm run verify:ghidra:windows
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The native lane checks DACL readback independently, source write/replacement
|
|
86
|
+
rejection, unrelated sibling renames, reparse rejection, immutable snapshots,
|
|
87
|
+
asynchronous cancellation, cleanup containment,
|
|
88
|
+
descendant termination, unrelated-process preservation, normal exit, owner
|
|
89
|
+
close, and forced owner exit. An optional independently built
|
|
90
|
+
`tests/fixtures/windows/processBoundary.cc` executable adds breakaway and
|
|
91
|
+
caller/child token observations and an in-place ancestor reparse attempt:
|
|
92
|
+
|
|
93
|
+
```powershell
|
|
94
|
+
node scripts/verify-windows-native.mjs . C:\fixtures\process-boundary.exe
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
`nonAdminRunner.cc` is a test-only launcher for an elevated development shell.
|
|
98
|
+
It duplicates an existing non-elevated Explorer token belonging to the same
|
|
99
|
+
user, creates private temporary window-station objects, and launches the test
|
|
100
|
+
inside a kill-on-close fixture job. It does not create accounts, modify host
|
|
101
|
+
policy, or change the caller's token. A real-provider claim must additionally
|
|
102
|
+
verify the packaged CLI and MCP on that ordinary-user token.
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rea-agents",
|
|
3
3
|
"mcpName": "io.github.morluto/rea",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.1.0",
|
|
5
5
|
"description": "Reverse engineer anything from your terminal or agent with one CLI and MCP server.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"rea-agents": "scripts/rea.mjs"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
|
-
"node": "^22.19.0 ||
|
|
38
|
+
"node": "^22.19.0 || ^24.11.0 || >=26.0.0"
|
|
39
39
|
},
|
|
40
40
|
"packageManager": "npm@11.16.0",
|
|
41
41
|
"files": [
|
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
"bridge/hopper_bridge.py",
|
|
45
45
|
"bridge/native/ReaNativeUI.swift",
|
|
46
46
|
"bridge/ghidra/ReaGhidraBridge.java",
|
|
47
|
+
"bridge/ghidra/ReaGhidraExtensions.java",
|
|
48
|
+
"bridge/ghidra/ReaGhidraPrepareCom.java",
|
|
47
49
|
"scripts/rea.mjs",
|
|
48
50
|
"scripts/electron-active-hook.cjs",
|
|
49
51
|
"scripts/electron-active-hook-boundaries.cjs",
|
|
@@ -52,7 +54,10 @@
|
|
|
52
54
|
"scripts/prepare.mjs",
|
|
53
55
|
"skills",
|
|
54
56
|
"README.md",
|
|
55
|
-
"LICENSE"
|
|
57
|
+
"LICENSE",
|
|
58
|
+
"native/windows/build/manifest.json",
|
|
59
|
+
"native/windows/build/rea-windows-x64.node",
|
|
60
|
+
"scripts/verify-windows-native-artifact.mjs"
|
|
56
61
|
],
|
|
57
62
|
"scripts": {
|
|
58
63
|
"deps:check": "node scripts/check-dependency-install.mjs",
|
|
@@ -73,7 +78,7 @@
|
|
|
73
78
|
"precheck:test": "npm run deps:check",
|
|
74
79
|
"check:test": "turbo run typecheck lint format:check knip metadata:check test:run",
|
|
75
80
|
"precheck:pr": "npm run deps:check",
|
|
76
|
-
"check:pr": "turbo run typecheck lint format:check knip metadata:check test:run && npm run docs:check",
|
|
81
|
+
"check:pr": "turbo run typecheck lint format:check knip metadata:check test:run && npm run docs:check && npm run jscpd && npm run scan:todos",
|
|
77
82
|
"precheck:ci": "npm run deps:check",
|
|
78
83
|
"check:ci": "turbo run typecheck lint format:check knip metadata:check jscpd scan:todos",
|
|
79
84
|
"build:cached": "turbo run build",
|
|
@@ -82,7 +87,6 @@
|
|
|
82
87
|
"lint": "oxlint",
|
|
83
88
|
"lint:fix": "oxlint --fix",
|
|
84
89
|
"knip": "knip",
|
|
85
|
-
"lint:dead": "knip",
|
|
86
90
|
"jscpd": "jscpd src/ tests/",
|
|
87
91
|
"scan:todos": "node scripts/scan-todos.mjs",
|
|
88
92
|
"start": "node scripts/rea.mjs mcp",
|
|
@@ -119,8 +123,10 @@
|
|
|
119
123
|
"verify:native-ui": "npm run build:cached && node scripts/verify-native-ui.mjs",
|
|
120
124
|
"verify:keyed-archive": "npm run build:cached && node scripts/verify-keyed-archive.mjs",
|
|
121
125
|
"verify:ghidra": "npm run build:cached && node scripts/verify-real-ghidra.mjs",
|
|
126
|
+
"verify:ida": "npm run build:cached && node scripts/verify-real-ida.mjs",
|
|
122
127
|
"verify:ghidra:switch": "npm run build:cached && node scripts/verify-real-ghidra-switch.mjs",
|
|
123
128
|
"verify:ghidra:dos": "npm run build:cached && node scripts/verify-real-ghidra-dos.mjs",
|
|
129
|
+
"verify:ghidra:com": "npm run build:cached && node scripts/verify-real-ghidra-com.mjs",
|
|
124
130
|
"verify:ghidra:aarch64-jump-table": "npm run build:cached && node scripts/verify-real-ghidra.mjs --aarch64-jump-table",
|
|
125
131
|
"verify:interface-builder": "npm run build:cached && node scripts/verify-interface-builder.mjs",
|
|
126
132
|
"verify:ghidra:cross-format": "npm run build:cached && node scripts/verify-real-ghidra.mjs --cross-format",
|
|
@@ -129,8 +135,13 @@
|
|
|
129
135
|
"verify:electron": "npm run build:cached && node scripts/verify-real-electron.mjs",
|
|
130
136
|
"verify:inspector": "npm run build:cached && node scripts/verify-real-javascript-runtime-observation.mjs",
|
|
131
137
|
"verify:javascript-runtime": "npm run build:cached && node scripts/verify-local-javascript-runtime.mjs",
|
|
138
|
+
"verify:javascript:digests": "npm run build:cached && node scripts/verify-large-javascript-digests.mjs",
|
|
132
139
|
"verify:application-workflows": "npm run build:cached && node scripts/verify-local-application-workflows.mjs",
|
|
133
140
|
"verify:managed": "npm run build:cached && node scripts/verify-managed-conformance.mjs",
|
|
141
|
+
"verify:firmware": "npm run build:cached && node scripts/verify-real-firmware.mjs",
|
|
142
|
+
"fixtures:firmware": "node scripts/generate-firmware-fixtures.mjs",
|
|
143
|
+
"verify:android": "npm run build:cached && node scripts/verify-real-android.mjs",
|
|
144
|
+
"fixtures:android": "node scripts/fetch-android-fixtures.mjs",
|
|
134
145
|
"verify:agent": "npm run build:cached && node scripts/verify-agent-experience.mjs",
|
|
135
146
|
"verify:hopper:linux": "npm run verify:fixtures && npm run build:cached && node scripts/verify-real-hopper-linux.mjs",
|
|
136
147
|
"verify:setup:linux": "npm run build:cached && node scripts/verify-linux-setup-e2e.mjs",
|
|
@@ -145,8 +156,6 @@
|
|
|
145
156
|
"config:print": "node scripts/print-mcp-config.mjs",
|
|
146
157
|
"evidence:generate": "npm run build:cached && node scripts/generate-completion-ledger.mjs",
|
|
147
158
|
"evidence:check": "npm run build:cached && node scripts/generate-completion-ledger.mjs --check",
|
|
148
|
-
"docs:api": "typedoc",
|
|
149
|
-
"docs:api:cached": "turbo run docs:api",
|
|
150
159
|
"docs:generate": "node scripts/run-exclusive.mjs docs npm run docs:generate:unlocked",
|
|
151
160
|
"docs:generate:unlocked": "npm run metadata:generate && npm run build:cached && node scripts/generate-mcp-tool-catalog.mjs && node scripts/generate-skill-metadata.mjs && node scripts/generate-product-catalog.mjs && node scripts/generate-completion-ledger.mjs && node scripts/generate-error-schema.mjs",
|
|
152
161
|
"docs:check": "node scripts/run-exclusive.mjs docs turbo run docs:check:built",
|
|
@@ -156,7 +165,15 @@
|
|
|
156
165
|
"prepare": "node scripts/prepare.mjs",
|
|
157
166
|
"verify:asset-catalog": "npm run build:cached && node scripts/verify-asset-catalog.mjs",
|
|
158
167
|
"verify:native-ui:permissions": "npm run build:cached && node scripts/verify-native-ui.mjs --allow-permission-denial",
|
|
159
|
-
"test:focused": "node scripts/run-development-tests.mjs focused"
|
|
168
|
+
"test:focused": "node scripts/run-development-tests.mjs focused",
|
|
169
|
+
"build:windows-native": "node scripts/build-windows-native.mjs",
|
|
170
|
+
"verify:windows-native:artifact": "node scripts/verify-windows-native-artifact.mjs",
|
|
171
|
+
"prepublishOnly": "npm run verify:windows-native:artifact",
|
|
172
|
+
"verify:windows-native": "node scripts/verify-windows-native.mjs",
|
|
173
|
+
"verify:ghidra:windows:package": "node scripts/verify-packaged-ghidra-windows.mjs",
|
|
174
|
+
"build:ghidra:nativeaot": "node scripts/build-ghidra-nativeaot.mjs",
|
|
175
|
+
"build:fixtures:nativeaot": "node scripts/generate-nativeaot-fixtures.mjs",
|
|
176
|
+
"verify:ghidra:nativeaot": "npm run build:cached && node scripts/verify-real-ghidra-nativeaot.mjs"
|
|
160
177
|
},
|
|
161
178
|
"lint-staged": {
|
|
162
179
|
"*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}": [
|
|
@@ -172,48 +189,45 @@
|
|
|
172
189
|
"@electron/asar": "4.2.0",
|
|
173
190
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
174
191
|
"@lydell/node-pty": "1.1.0",
|
|
175
|
-
"@modelcontextprotocol/client": "2.
|
|
176
|
-
"@modelcontextprotocol/server": "2.
|
|
192
|
+
"@modelcontextprotocol/client": "2.3.1",
|
|
193
|
+
"@modelcontextprotocol/server": "2.3.1",
|
|
177
194
|
"@xterm/addon-serialize": "0.14.0",
|
|
178
195
|
"@xterm/headless": "6.0.0",
|
|
179
196
|
"@zip.js/zip.js": "2.8.26",
|
|
180
197
|
"canonicalize": "3.0.0",
|
|
181
198
|
"cross-spawn": "7.0.6",
|
|
182
199
|
"diff": "9.0.0",
|
|
183
|
-
"graphology": "0.26.0",
|
|
184
|
-
"graphology-shortest-path": "2.1.0",
|
|
185
200
|
"ignore": "7.0.6",
|
|
186
|
-
"incur": "0.
|
|
201
|
+
"incur": "0.6.1",
|
|
187
202
|
"isomorphic-git": "1.38.7",
|
|
188
203
|
"jsonc-parser": "3.3.1",
|
|
189
|
-
"pino": "
|
|
204
|
+
"pino": "10.4.0",
|
|
190
205
|
"playwright-core": "1.58.2",
|
|
191
206
|
"plist": "5.0.0",
|
|
192
207
|
"semver": "7.8.5",
|
|
193
|
-
"smol-toml": "
|
|
208
|
+
"smol-toml": "1.7.0",
|
|
194
209
|
"write-file-atomic": "7.0.0",
|
|
195
210
|
"ws": "8.21.0",
|
|
196
211
|
"zod": "4.4.3"
|
|
197
212
|
},
|
|
198
213
|
"devDependencies": {
|
|
199
|
-
"@fast-check/vitest": "0.
|
|
214
|
+
"@fast-check/vitest": "0.5.0",
|
|
200
215
|
"@types/cross-spawn": "6.0.6",
|
|
201
|
-
"@types/node": "
|
|
216
|
+
"@types/node": "26.6.4",
|
|
202
217
|
"@types/semver": "7.7.1",
|
|
203
218
|
"@types/write-file-atomic": "4.0.3",
|
|
204
219
|
"@types/ws": "8.18.1",
|
|
205
|
-
"@vitest/coverage-v8": "
|
|
220
|
+
"@vitest/coverage-v8": "5.0.3",
|
|
206
221
|
"ajv": "8.20.0",
|
|
207
222
|
"husky": "9.1.7",
|
|
208
223
|
"jscpd": "5.0.12",
|
|
209
|
-
"knip": "6.
|
|
224
|
+
"knip": "6.39.0",
|
|
210
225
|
"lint-staged": "16.4.0",
|
|
211
226
|
"oxfmt": "0.72.0",
|
|
212
|
-
"oxlint": "1.
|
|
213
|
-
"turbo": "2.
|
|
214
|
-
"
|
|
215
|
-
"
|
|
216
|
-
"vitest": "4.1.10",
|
|
227
|
+
"oxlint": "1.87.0",
|
|
228
|
+
"turbo": "2.11.7",
|
|
229
|
+
"typescript": "7.0.2",
|
|
230
|
+
"vitest": "5.0.3",
|
|
217
231
|
"yaml": "2.9.0"
|
|
218
232
|
}
|
|
219
233
|
}
|
package/scripts/rea.mjs
CHANGED
|
@@ -23,7 +23,7 @@ const runtimeFiles = isMcpMode
|
|
|
23
23
|
|
|
24
24
|
if (!(await compiledRuntimeExists(runtimeFiles))) {
|
|
25
25
|
process.stderr.write(
|
|
26
|
-
`REA's compiled runtime is missing. Run \`npm ci\` in ${packageRoot} to install dependencies and build REA, then restart it. If this is an installed package, reinstall rea-agents.\n`,
|
|
26
|
+
`REA's compiled runtime is missing. Run \`npm ci && npm run build:cached\` in ${packageRoot} to install dependencies and build REA, then restart it. If this is an installed package, reinstall rea-agents.\n`,
|
|
27
27
|
);
|
|
28
28
|
process.exitCode = 1;
|
|
29
29
|
} else if (isMcpMode) {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { createHash } from "node:crypto";
|
|
4
|
+
import { readFile } from "node:fs/promises";
|
|
5
|
+
|
|
6
|
+
const root = new URL("../", import.meta.url);
|
|
7
|
+
const packageJson = JSON.parse(
|
|
8
|
+
await readFile(new URL("package.json", root), "utf8"),
|
|
9
|
+
);
|
|
10
|
+
const manifest = JSON.parse(
|
|
11
|
+
await readFile(new URL("native/windows/build/manifest.json", root), "utf8"),
|
|
12
|
+
);
|
|
13
|
+
const bytes = await readFile(
|
|
14
|
+
new URL("native/windows/build/rea-windows-x64.node", root),
|
|
15
|
+
);
|
|
16
|
+
if (
|
|
17
|
+
manifest.packageVersion !== packageJson.version ||
|
|
18
|
+
manifest.platform !== "win32" ||
|
|
19
|
+
manifest.architecture !== "x64" ||
|
|
20
|
+
manifest.abiVersion !== 1 ||
|
|
21
|
+
manifest.nodeApiVersion !== 8 ||
|
|
22
|
+
manifest.artifact !== "rea-windows-x64.node" ||
|
|
23
|
+
createHash("sha256").update(bytes).digest("hex") !== manifest.artifactSha256
|
|
24
|
+
)
|
|
25
|
+
throw new Error(
|
|
26
|
+
"Windows native artifact metadata or SHA-256 does not match this package; run the Windows native build lane.",
|
|
27
|
+
);
|
|
28
|
+
const offset = bytes.length >= 64 ? bytes.readUInt32LE(0x3c) : bytes.length;
|
|
29
|
+
if (
|
|
30
|
+
bytes.toString("ascii", 0, 2) !== "MZ" ||
|
|
31
|
+
offset > bytes.length - 26 ||
|
|
32
|
+
bytes.toString("ascii", offset, offset + 4) !== "PE\0\0" ||
|
|
33
|
+
bytes.readUInt16LE(offset + 4) !== 0x8664 ||
|
|
34
|
+
bytes.readUInt16LE(offset + 24) !== 0x20b
|
|
35
|
+
)
|
|
36
|
+
throw new Error("Windows native artifact must be a Windows x64 PE32+ image.");
|
|
37
|
+
process.stdout.write(
|
|
38
|
+
`${JSON.stringify({ ok: true, ...manifest, artifactBytes: bytes.length })}\n`,
|
|
39
|
+
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: reverse-engineer-anything
|
|
3
|
-
description: Reverse engineer native, managed, Electron/JavaScript, packaged, and browser
|
|
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: "
|
|
6
|
-
tool_count:
|
|
7
|
-
catalog_digest: "
|
|
5
|
+
version: "26"
|
|
6
|
+
tool_count: 125
|
|
7
|
+
catalog_digest: "ed9c36900e9223561d38ba30a44921f4ff101d5eca989920f9edc9dc91df470b"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# REA
|
|
@@ -15,32 +15,110 @@ behavior not established by available source. For ordinary analysis of a
|
|
|
15
15
|
complete source repository, use normal repository tools and do not run REA
|
|
16
16
|
readiness or provider commands.
|
|
17
17
|
|
|
18
|
+
## Connect only when needed
|
|
19
|
+
|
|
20
|
+
Installing this skill supplies instructions; it does not register the REA MCP
|
|
21
|
+
server, install analysis engines, or add tools to an already-running agent.
|
|
22
|
+
|
|
23
|
+
If REA tools are available and their registration is not known to be stale,
|
|
24
|
+
proceed directly to the target. Do not run diagnostics or setup before every
|
|
25
|
+
investigation. Use the connected server's actual tool list and input schemas;
|
|
26
|
+
a skill installed from repository main may describe capabilities absent from
|
|
27
|
+
an older npm release. Keep complete inline Evidence when that server does not
|
|
28
|
+
advertise retained references.
|
|
29
|
+
|
|
30
|
+
When tools are absent or registration is stale:
|
|
31
|
+
|
|
32
|
+
1. Diagnose without changing files. For Codex, run
|
|
33
|
+
`npx -y rea-agents@latest doctor --client codex --json`. Substitute the current
|
|
34
|
+
supported client: `claude_code`, `claude_desktop`, `codex`, `cursor`,
|
|
35
|
+
`gemini_cli`, `windsurf`, `devin`, `opencode`, `antigravity`, `copilot_cli`,
|
|
36
|
+
`commandcode`, or `vscode`. If the client is unknown, use `doctor --json` and
|
|
37
|
+
inspect its registration results before choosing a setup scope.
|
|
38
|
+
2. Distinguish the reason. Missing, malformed, or stale registration needs a
|
|
39
|
+
scoped configuration repair. An aligned registration with no tools in the
|
|
40
|
+
active session needs a restart/reconnection; doctor cannot prove that the
|
|
41
|
+
current agent has connected. A missing provider affects only tasks requiring
|
|
42
|
+
that provider: static JavaScript inspection needs neither Hopper nor Ghidra,
|
|
43
|
+
and Android inspection has separate bring-your-own JADX/Java prerequisites.
|
|
44
|
+
3. For a configuration repair, prepare the read-only plan:
|
|
45
|
+
`npx -y rea-agents@latest setup --client codex --dry-run --json`.
|
|
46
|
+
Use the current client's ID, show its exact proposed paths, backups, and
|
|
47
|
+
changes, and obtain approval before setup writes configuration or installs
|
|
48
|
+
Hopper. Setup normally installs the matching bundled skill too; include that
|
|
49
|
+
replacement in the reviewed plan. After approval, apply the same scope with
|
|
50
|
+
`npx -y rea-agents@latest setup --client codex --yes`. Add `--install-hopper`
|
|
51
|
+
only if that separate installation was needed and explicitly approved.
|
|
52
|
+
4. Restart/reconnect the affected agent. Verify that REA tools actually appear
|
|
53
|
+
in the session, then resume the original investigation. If they remain
|
|
54
|
+
absent, inspect the client's MCP launch error rather than repeating setup.
|
|
55
|
+
|
|
56
|
+
REA setup never installs or upgrades Node.js, npm, Homebrew, Java, Ghidra, IDA,
|
|
57
|
+
JADX, Binwalk, or Unblob. Use existing prerequisites; do not install unrelated
|
|
58
|
+
software to repair
|
|
59
|
+
MCP registration. For an unsupported client, use manual stdio registration
|
|
60
|
+
with a version-pinned `rea-agents` package or continue through the CLI.
|
|
61
|
+
|
|
62
|
+
A concrete CLI fallback for an operator-supplied JavaScript tree or ASAR is:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx -y rea-agents@latest analyze-javascript-application /absolute/path/to/app --json
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
No MCP registration or native engine is required. Read the returned Evidence,
|
|
69
|
+
graph, limitations, and unknowns with the same care as an MCP result; the CLI
|
|
70
|
+
returns the Evidence record directly. This fallback does not establish that
|
|
71
|
+
MCP is configured. Native CLI tasks still require their selected engine.
|
|
72
|
+
|
|
18
73
|
## Route the target first
|
|
19
74
|
|
|
20
|
-
Choose the first tool from the target the user supplied.
|
|
21
|
-
|
|
75
|
+
Choose the first tool from the target the user supplied. Use `open_binary` for
|
|
76
|
+
active-target native or archive workflows; target-free tools take their own
|
|
77
|
+
explicit path or endpoint and do not need it.
|
|
22
78
|
|
|
23
79
|
- ASAR or extracted JavaScript/Electron tree:
|
|
24
80
|
`analyze_javascript_application`.
|
|
25
|
-
- Archive
|
|
81
|
+
- Archive/package member inventory (ZIP/APK/IPA/MSIX/AppX or DMG):
|
|
26
82
|
`open_binary` with the supplied local path; use `inspect_artifact` when its
|
|
27
83
|
graph and findings help answer the question.
|
|
84
|
+
- Android APK code, classes, methods, or incoming references:
|
|
85
|
+
`inspect_android_package`, then focused Android tools when advertised.
|
|
86
|
+
Archive member inventory still uses the archive route above.
|
|
28
87
|
- Managed PE/CLI assembly: `inspect_managed_artifact`.
|
|
88
|
+
- Firmware image: `inspect_firmware_regions` when advertised. Use
|
|
89
|
+
`extract_firmware` when extraction is requested, with a caller-selected new
|
|
90
|
+
absolute output directory. These tools use caller-supplied Binwalk/Unblob on
|
|
91
|
+
Linux; see the [firmware guide](https://github.com/morluto/rea/blob/main/docs/firmware-analysis.md).
|
|
92
|
+
- .NET NativeAOT PE/ELF: native Ghidra analysis. Native code can yield pseudocode;
|
|
93
|
+
consult the NativeAOT workflow in `references/native-and-artifacts.md` for
|
|
94
|
+
optional metadata recovery and its supported host/layout boundary.
|
|
29
95
|
- User-owned browser page already open: `list_browser_targets`.
|
|
30
96
|
- User-owned Electron runtime already open: `list_electron_targets`.
|
|
31
97
|
- Native executable, library, or analysis database: `open_binary`, then
|
|
32
98
|
use focused analysis tools directly; call `binary_overview` when metadata or
|
|
33
|
-
inventory context is useful.
|
|
99
|
+
inventory context is useful and available from the selected provider.
|
|
100
|
+
|
|
101
|
+
For an existing IDA MCP configuration, use `open_binary` with the original
|
|
102
|
+
input binary and `provider_id: "ida"`; do not pass an `.idb` or `.i64` database.
|
|
103
|
+
The legacy attached profile binds the already-open GUI input by SHA-256 and
|
|
104
|
+
leaves its database open. The modern headless profile creates and closes an
|
|
105
|
+
owned private database without saving. Installation and registration reuse
|
|
106
|
+
[mrexodia/ida-pro-mcp](https://github.com/mrexodia/ida-pro-mcp); see the
|
|
107
|
+
[IDA provider guide](https://github.com/morluto/rea/blob/main/docs/ida-provider.md).
|
|
108
|
+
Proceed directly to `analyze_function`, pseudocode, or function/string searches
|
|
109
|
+
after opening; IDA does not supply `binary_overview`. Consult session availability
|
|
110
|
+
when composing broader workflows. Modern direct callers and unsupported dossier
|
|
111
|
+
facets remain unknown; live IDA results are not replayed from snapshots.
|
|
34
112
|
|
|
35
113
|
If the app is missing, ask which app to inspect. Resolve a human-readable app
|
|
36
114
|
name to one clear installed artifact when possible; ask only when matches are
|
|
37
115
|
ambiguous. Never choose an example app on the user's behalf.
|
|
38
116
|
|
|
39
117
|
In a target-free session, use `open_binary` to bind any archive/package or
|
|
40
|
-
native target whose analysis tool operates on the active target. Do not call
|
|
41
|
-
tool
|
|
42
|
-
`
|
|
43
|
-
|
|
118
|
+
native target whose analysis tool operates on the active target. Do not call an
|
|
119
|
+
unadvertised tool; inspect `binary_session` with `{}` and its
|
|
120
|
+
`result.tool_availability` for availability reasons and remediation. The tool
|
|
121
|
+
list stays complete; availability depends on the operation, target, and host.
|
|
44
122
|
|
|
45
123
|
## Work summary-first
|
|
46
124
|
|
|
@@ -98,23 +176,13 @@ as complete while required questions remain open.
|
|
|
98
176
|
[references/native-and-artifacts.md](references/native-and-artifacts.md)
|
|
99
177
|
- ASARs, extracted JavaScript, feature tracing, and version comparison:
|
|
100
178
|
[references/javascript-applications.md](references/javascript-applications.md)
|
|
179
|
+
- Android APK declarations, classes, methods, and static references:
|
|
180
|
+
[references/android-applications.md](references/android-applications.md)
|
|
101
181
|
- Passive browser/Electron observation and static/runtime reconciliation:
|
|
102
182
|
[references/runtime-observation.md](references/runtime-observation.md)
|
|
103
183
|
- Evidence paging, comparisons, residual unknowns, and verification:
|
|
104
184
|
[references/evidence-workflows.md](references/evidence-workflows.md)
|
|
105
185
|
|
|
106
|
-
## Readiness and setup
|
|
107
|
-
|
|
108
|
-
The readiness rule is conditional: when REA tools are available and their
|
|
109
|
-
registration is not known to be stale, proceed directly; do not run `doctor`
|
|
110
|
-
before every task. Run `npx -y rea-agents@latest doctor` when the MCP server or
|
|
111
|
-
required provider is unavailable, registration is reported stale, or the user
|
|
112
|
-
asks for an environment diagnosis. Propose
|
|
113
|
-
`npx -y rea-agents@latest setup` only when doctor identifies an alignment or
|
|
114
|
-
provider problem. Show the exact plan and obtain approval before setup writes
|
|
115
|
-
configuration or installs Hopper. Restart the agent after MCP registration
|
|
116
|
-
changes; direct CLI commands remain available immediately.
|
|
117
|
-
|
|
118
186
|
## Finish the task
|
|
119
187
|
|
|
120
188
|
Explain findings in plain language and tie them to returned evidence. When the
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Android application artifacts
|
|
2
|
+
|
|
3
|
+
Use the connected server's advertised Android tools. Repository main includes
|
|
4
|
+
this family; npm 4.0.1 does not. A skill installation alone cannot add it to an
|
|
5
|
+
older server.
|
|
6
|
+
|
|
7
|
+
Start with `inspect_android_package` on the caller's APK path for package
|
|
8
|
+
identity, manifest declarations, coverage, and inline Evidence. Use
|
|
9
|
+
`search_android_classes` to find candidates, `inspect_android_class` for one
|
|
10
|
+
class's members, `inspect_android_method` for decompilation, and
|
|
11
|
+
`trace_android_references` for incoming static references. Each call takes its
|
|
12
|
+
own APK path and explicit selectors; do not open a native session first.
|
|
13
|
+
Choose an `overload_index` from the class inventory when methods are ambiguous
|
|
14
|
+
instead of guessing.
|
|
15
|
+
|
|
16
|
+
The provider requires a separately supplied headless JADX MCP JAR 0.7.1 and
|
|
17
|
+
Java 17 or newer. `REA_JADX_MCP_JAR` selects the absolute JAR path; `JAVA_HOME`
|
|
18
|
+
can select Java. REA setup does not install or configure that JAR, and doctor
|
|
19
|
+
provider scopes cover Hopper/Ghidra rather than JADX. Use existing tools and
|
|
20
|
+
report missing prerequisites for the Android task specifically.
|
|
21
|
+
|
|
22
|
+
Real verification covers Linux. macOS has the POSIX launch boundary but no
|
|
23
|
+
claimed real-provider verification; Windows is unsupported. Calls use one
|
|
24
|
+
worker, a bounded JVM heap, and provider deadlines. The APK is never launched,
|
|
25
|
+
and no emulator is required.
|
|
26
|
+
|
|
27
|
+
Manifest entries and decompiled text are static observations, not execution or
|
|
28
|
+
policy enforcement. Incoming references are recovered static relationships;
|
|
29
|
+
reflection, dynamic loading, and unresolved calls remain unknown. Preserve
|
|
30
|
+
artifact digests, locations, diagnostics, and incomplete coverage. For archive
|
|
31
|
+
members rather than code analysis, use `open_binary` and `inspect_artifact`.
|
|
@@ -15,7 +15,9 @@ registration, defaults, or policy enforcement from static analysis.
|
|
|
15
15
|
|
|
16
16
|
Use `trace_application_feature` on existing application Evidence for one
|
|
17
17
|
literal node ID, route, string, API, IPC channel, module, or native export.
|
|
18
|
-
Choose a direction and
|
|
18
|
+
Choose a direction and reuse the returned application Evidence ID when the
|
|
19
|
+
connected server advertises retained references, or supply complete Evidence
|
|
20
|
+
inline. Include
|
|
19
21
|
Hopper or Ghidra Evidence only when its artifact digest matches exactly.
|
|
20
22
|
|
|
21
23
|
For version comparison, analyze each version once, then call
|
|
@@ -27,10 +29,25 @@ opposite-side coverage; otherwise report unknown.
|
|
|
27
29
|
When the question asks how one exact exported callable's returned object shape
|
|
28
30
|
changed, analyze each version once and then call
|
|
29
31
|
`compare_javascript_export_shapes` with explicit module paths and export names.
|
|
30
|
-
|
|
32
|
+
Use the returned IDs on the same connection, or complete inline Evidence
|
|
33
|
+
records, from both analysis calls. Accept variant
|
|
31
34
|
pairing only through the tool's unique exact literal discriminant. Cite the
|
|
32
35
|
comparison Evidence and report JSON Pointer changes; dynamic values, ambiguous
|
|
33
36
|
variants, and incomplete parent-property coverage stay unknown. This is static
|
|
34
37
|
inference, not runtime behavior. When runtime semantics are needed, run
|
|
35
38
|
behavioral probes against the relevant application versions and capture them
|
|
36
39
|
through the available browser, Electron, or process workflows.
|
|
40
|
+
|
|
41
|
+
## Reusing application Evidence
|
|
42
|
+
|
|
43
|
+
When advertised by the connected server, application trace and compare tools
|
|
44
|
+
accept complete inline Evidence or
|
|
45
|
+
`{"kind":"retained-evidence","evidence_id":"ev_<64 lowercase hex characters>"}`
|
|
46
|
+
for their application input (`application`, or `left`/`right`). This notation is
|
|
47
|
+
a template: replace it with the actual returned ID. npm 4.0.1 accepts only full
|
|
48
|
+
inline Evidence. Use the exact ID
|
|
49
|
+
returned by the producer on the same MCP connection. Resolution does not run
|
|
50
|
+
analysis or select a provider; findings remain inline. Native observation
|
|
51
|
+
arrays still take full Evidence. `close_binary` clears retained references;
|
|
52
|
+
export a bundle before closing, or supply portable inline Evidence in another
|
|
53
|
+
connection. A missing reference includes its ID and recovery guidance.
|
|
@@ -9,10 +9,25 @@ cross-references. Addresses and recovered pseudocode are analysis observations,
|
|
|
9
9
|
not original source. Provider unavailability and unsupported metadata remain
|
|
10
10
|
unknown rather than false.
|
|
11
11
|
|
|
12
|
-
Use `binary_session` with
|
|
13
|
-
provider, alignment
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
Use `binary_session` with no arguments to check the open target, selected
|
|
13
|
+
provider, and alignment. Its default `result.tool_availability` includes the
|
|
14
|
+
complete tool inventory with availability reasons and remediation. When choosing
|
|
15
|
+
a tool, use its entry in that result; `tools/list` retains the complete catalog
|
|
16
|
+
when the target or provider state changes.
|
|
17
|
+
|
|
18
|
+
## DOS MZ with Ghidra
|
|
19
|
+
|
|
20
|
+
For an admitted DOS MZ target, use `inspect_native_load_image` to check measured
|
|
21
|
+
loaded bytes, file mappings, relocations and the entry against the immutable
|
|
22
|
+
snapshot. Keep `mismatch` and `unsupported` explicit. Verified import covers the
|
|
23
|
+
reported static image, not runtime DOS or PC-98 hardware behavior.
|
|
24
|
+
|
|
25
|
+
Use `read_bytes` for initialized analysis memory and `address_to_file_offset` to
|
|
26
|
+
anchor one observed address to original file bytes. Loader fixups can change a
|
|
27
|
+
word; a source offset does not imply byte equality. Complete function body ranges
|
|
28
|
+
use inclusive ends and can contain gaps. Do not treat the enclosing span as code.
|
|
29
|
+
For packed targets, retain the original and separately derived artifact identities;
|
|
30
|
+
decompiling an unpacking stub does not recover the unpacked program.
|
|
16
31
|
|
|
17
32
|
## Managed PE/CLI
|
|
18
33
|
|
|
@@ -22,6 +37,30 @@ assembly. Keep managed/native boundaries and unavailable reconstruction facts
|
|
|
22
37
|
explicit. A bring-your-own reconstruction oracle is separate from the canonical
|
|
23
38
|
parser and must not become an implicit setup dependency.
|
|
24
39
|
|
|
40
|
+
## .NET NativeAOT
|
|
41
|
+
|
|
42
|
+
A NativeAOT PE/ELF contains native code. Absence of PE/CLI metadata does not mean
|
|
43
|
+
analysis must stop at assembly. Use native function analysis for recovered
|
|
44
|
+
pseudocode; it is not reconstructed original C#.
|
|
45
|
+
|
|
46
|
+
With an explicitly configured NativeAOT Ghidra adapter, call
|
|
47
|
+
`inspect_native_load_image` after opening the target. Its optional
|
|
48
|
+
`observations.metadata_recovery` returns the format, positive header evidence,
|
|
49
|
+
coverage, derived-memory identity and type addresses/category paths inline.
|
|
50
|
+
Then inspect a reported type with `inspect_native_data_type`, follow its
|
|
51
|
+
`metadata_recovery.related_type`, interfaces and virtual slot addresses, and use
|
|
52
|
+
`analyze_function` plus string/xref searches for implementation evidence. Keep
|
|
53
|
+
`not_applicable`, partial recovery and unsupported layouts explicit. Generated
|
|
54
|
+
`Class_address` names and inferred System.Object/String identities are not
|
|
55
|
+
original names; custom field layouts remain unknown.
|
|
56
|
+
|
|
57
|
+
Recovery modifies an ephemeral analysis database and may replace loaded metadata
|
|
58
|
+
bytes with derived content. Original executable files remain unchanged. Distinguish
|
|
59
|
+
original file offsets from derived analysis memory. Windows x64 PE **targets**
|
|
60
|
+
can be analyzed on a supported Linux host; Windows **host** P0 does not admit
|
|
61
|
+
this database recovery. See the [NativeAOT guide](https://github.com/morluto/rea/blob/main/docs/ghidra-nativeaot.md)
|
|
62
|
+
for the tested layout and optional bring-your-own adapter build.
|
|
63
|
+
|
|
25
64
|
## Packages and extraction
|
|
26
65
|
|
|
27
66
|
Use `inspect_artifact` for application bundles, archives, ZIP/APK/IPA/MSIX/AppX,
|
|
@@ -40,3 +79,12 @@ hosts, with an owned temporary mount directory and cleanup. It needs no approval
|
|
|
40
79
|
flag. Unsupported hosts or mount failures remain explicit limitations; do not
|
|
41
80
|
claim child inventory when only root identity is available. Extraction is a
|
|
42
81
|
separate filesystem-writing operation.
|
|
82
|
+
|
|
83
|
+
For headerless DOS COM, explicitly open with `format: "dos-com"` (CLI
|
|
84
|
+
`--target-format dos-com`). Inspect the load image before trusting function
|
|
85
|
+
analysis: the entry is `0x10100`, file offset zero, with imposed real-mode segment
|
|
86
|
+
context. PSP/stack/device state remains unmodeled. See [DOS guide](https://github.com/morluto/rea/blob/main/docs/ghidra-dos.md).
|
|
87
|
+
|
|
88
|
+
### Function annotations in Ghidra
|
|
89
|
+
|
|
90
|
+
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.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
import canonicalize from "canonicalize";
|
|
3
|
-
/** Hash a value using the canonical JSON representation. */
|
|
4
|
-
export const canonicalJsonDigest = (value) => {
|
|
5
|
-
const encoded = canonicalize(value);
|
|
6
|
-
if (encoded === undefined)
|
|
7
|
-
throw new TypeError("Expected canonical JSON");
|
|
8
|
-
return createHash("sha256").update(encoded).digest("hex");
|
|
9
|
-
};
|