rea-agents 4.1.0 → 6.0.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 +173 -568
- package/bridge/android/ReaJadxBridge.java +247 -0
- package/bridge/mitmproxy/capture.py +210 -0
- package/bridge/native/NativeUIChildren.swift +27 -0
- package/bridge/native/ReaNativeUI.swift +30 -16
- package/bridge/native/rea_lldb_tracer.py +303 -0
- package/bridge/process/ProcessRunTokenReader.swift +263 -0
- package/bridge/process/ProcessRunTokenReaderMain.swift +35 -0
- package/bridge/pwndbg/core_context.py +101 -0
- package/bridge/pwndbg/launch.py +39 -0
- package/bridge/pwndbg/launch_impl.py +34 -0
- package/bridge/pwntools/decoder_runtime.py +59 -0
- package/bridge/pwntools/layout.py +39 -0
- package/bridge/pwntools/layout_impl.py +309 -0
- package/bridge/pwntools/recorded_crash.py +39 -0
- package/bridge/pwntools/recorded_crash_impl.py +143 -0
- package/dist/android/AndroidTargetSnapshot.js +5 -3
- package/dist/android/JadxAnalysis.js +8 -6
- package/dist/android/JadxConfiguration.js +19 -3
- package/dist/android/JadxMcpTransport.js +43 -16
- package/dist/android/JadxProtocol.js +8 -0
- package/dist/android/JadxProvider.js +118 -28
- package/dist/android/JadxRelease.js +8 -0
- package/dist/android/JadxSession.js +32 -18
- package/dist/application/AppBundleExecutable.js +141 -0
- package/dist/application/BinaryTargetResolver.js +9 -64
- package/dist/application/CapabilityInventory.js +82 -3
- package/dist/application/ClientConfigurationDocument.js +72 -12
- package/dist/application/ClientRegistrationStatus.js +7 -8
- package/dist/application/DirectAnalysis.js +109 -37
- package/dist/application/DirectAnalysisStatus.js +4 -5
- package/dist/application/DoctorDiagnostics.js +3 -3
- package/dist/application/EnhancedTools.js +4 -4
- package/dist/application/EvidenceBundleCommands.js +1 -1
- package/dist/application/EvidenceBundleFiles.js +1 -1
- package/dist/application/InvestigationProviders.js +6 -0
- package/dist/application/LinuxHopper.js +8 -2
- package/dist/application/OptionalObservationProviders.js +3 -0
- package/dist/application/ReconstructionCoverageService.js +2 -6
- package/dist/application/ReconstructionObligationCandidates.js +10 -3
- package/dist/application/ReferenceSourceImport.js +2 -0
- package/dist/application/ReferenceSourceImportEntries.js +20 -3
- package/dist/application/ReferenceSourceImportTypes.js +5 -0
- package/dist/application/Setup.js +10 -2
- package/dist/application/SetupClientConfiguration.js +19 -16
- package/dist/application/SetupHost.js +18 -3
- package/dist/application/SetupPlan.js +1 -1
- package/dist/application/Uninstall.js +23 -17
- package/dist/application/UpdateMaintenance.js +3 -3
- package/dist/application/ValidateSelectedWebScript.js +27 -0
- package/dist/application/WebModuleTraceService.js +209 -0
- package/dist/application/WebNetworkCaptureService.js +132 -0
- package/dist/application/WebRuntimeService.js +73 -0
- package/dist/application/WebScriptExportService.js +115 -0
- package/dist/application/WebSourceLocationService.js +160 -0
- package/dist/application/WindowsCapabilities.js +1 -1
- package/dist/application/{AndroidAnalysisService.js → android/AndroidAnalysisService.js} +6 -6
- package/dist/application/{AndroidApplicationService.js → android/AndroidApplicationService.js} +3 -3
- package/dist/application/{AppleApplicationService.js → apple/AppleApplicationService.js} +5 -5
- package/dist/application/{AnalysisClientCleanup.js → binary/AnalysisClientCleanup.js} +2 -2
- package/dist/application/{AnalysisProviderEvaluation.js → binary/AnalysisProviderEvaluation.js} +4 -4
- package/dist/application/{AnalysisProviderRegistry.js → binary/AnalysisProviderRegistry.js} +5 -5
- package/dist/application/{AnalysisSnapshotCache.js → binary/AnalysisSnapshotCache.js} +55 -14
- package/dist/application/{AnalysisSnapshotFiles.js → binary/AnalysisSnapshotFiles.js} +4 -4
- package/dist/application/{BinarySession.js → binary/BinarySession.js} +50 -20
- package/dist/application/{BinarySessionComposition.js → binary/BinarySessionComposition.js} +2 -1
- package/dist/application/{BinarySessionExecution.js → binary/BinarySessionExecution.js} +9 -7
- package/dist/application/{BinarySessionOpen.js → binary/BinarySessionOpen.js} +22 -9
- package/dist/application/{BinarySessionRecords.js → binary/BinarySessionRecords.js} +48 -40
- package/dist/application/{CompositeProvider.js → binary/CompositeProvider.js} +2 -2
- package/dist/application/{LazyAnalysisProvider.js → binary/LazyAnalysisProvider.js} +6 -6
- package/dist/application/{SessionProviderRouter.js → binary/SessionProviderRouter.js} +7 -7
- package/dist/application/binaryDiagnostics/BinaryLayoutService.js +57 -0
- package/dist/application/binaryDiagnostics/RecordedCrashPort.js +1 -0
- package/dist/application/binaryDiagnostics/RecordedCrashService.js +60 -0
- package/dist/application/evm/EvmInterfacePort.js +1 -0
- package/dist/application/evm/EvmInterfaceService.js +62 -0
- package/dist/application/firmware/FirmwareAnalysisPort.js +1 -0
- package/dist/application/{FirmwareAnalysisService.js → firmware/FirmwareAnalysisService.js} +5 -5
- package/dist/application/{EvidenceLedger.js → investigation/EvidenceLedger.js} +44 -7
- package/dist/application/investigation/InvestigationRecordPort.js +1 -0
- package/dist/application/investigation/InvestigationRecords.js +69 -0
- package/dist/application/{UnknownEvidence.js → investigation/UnknownEvidence.js} +1 -1
- package/dist/application/{ElectronActiveEvidence.js → javascript/ElectronActiveEvidence.js} +3 -3
- package/dist/application/javascript/ElectronActiveObservationPort.js +1 -0
- package/dist/application/{ElectronActiveObservationService.js → javascript/ElectronActiveObservationService.js} +3 -3
- package/dist/application/{ElectronBoundaryAnalysis.js → javascript/ElectronBoundaryAnalysis.js} +1 -1
- package/dist/application/{ElectronBoundaryGraphContext.js → javascript/ElectronBoundaryGraphContext.js} +1 -1
- package/dist/application/{ElectronEvidence.js → javascript/ElectronEvidence.js} +2 -2
- package/dist/application/javascript/ElectronObservationPort.js +1 -0
- package/dist/application/{ElectronObservationService.js → javascript/ElectronObservationService.js} +3 -3
- package/dist/application/{JavaScriptApplicationEvidence.js → javascript/JavaScriptApplicationEvidence.js} +3 -4
- package/dist/application/{JavaScriptApplicationEvidenceGraph.js → javascript/JavaScriptApplicationEvidenceGraph.js} +5 -5
- package/dist/application/{JavaScriptApplicationService.js → javascript/JavaScriptApplicationService.js} +25 -12
- package/dist/application/{JavaScriptApplicationWorkflowEvidence.js → javascript/JavaScriptApplicationWorkflowEvidence.js} +3 -3
- package/dist/application/{JavaScriptApplicationWorkflowService.js → javascript/JavaScriptApplicationWorkflowService.js} +12 -12
- package/dist/application/{JavaScriptArtifactAnalysis.js → javascript/JavaScriptArtifactAnalysis.js} +50 -47
- package/dist/application/javascript/JavaScriptArtifactAnalysisTypes.js +1 -0
- package/dist/application/{JavaScriptArtifactGraphAccumulator.js → javascript/JavaScriptArtifactGraphAccumulator.js} +16 -2
- package/dist/application/{JavaScriptArtifactGraphBuilder.js → javascript/JavaScriptArtifactGraphBuilder.js} +2 -2
- package/dist/application/{JavaScriptArtifactGraphContext.js → javascript/JavaScriptArtifactGraphContext.js} +1 -1
- package/dist/application/{JavaScriptArtifactGraphDocuments.js → javascript/JavaScriptArtifactGraphDocuments.js} +27 -3
- package/dist/application/{JavaScriptArtifactGraphFindings.js → javascript/JavaScriptArtifactGraphFindings.js} +20 -7
- package/dist/application/{JavaScriptArtifactGraphStructure.js → javascript/JavaScriptArtifactGraphStructure.js} +1 -1
- package/dist/application/{JavaScriptArtifactPathResolution.js → javascript/JavaScriptArtifactPathResolution.js} +80 -36
- package/dist/application/{JavaScriptArtifactReconstruction.js → javascript/JavaScriptArtifactReconstruction.js} +26 -17
- package/dist/application/{JavaScriptJsonModules.js → javascript/JavaScriptJsonModules.js} +1 -1
- package/dist/application/{JavaScriptModuleRelationships.js → javascript/JavaScriptModuleRelationships.js} +2 -2
- package/dist/application/javascript/JavaScriptRecoveryPort.js +1 -0
- package/dist/application/javascript/JavaScriptRecoveryService.js +52 -0
- package/dist/application/{JavaScriptReturnShapeProjection.js → javascript/JavaScriptReturnShapeProjection.js} +3 -3
- package/dist/application/{JavaScriptRuntimeObservationEvidence.js → javascript/JavaScriptRuntimeObservationEvidence.js} +2 -2
- package/dist/application/javascript/JavaScriptRuntimeObservationPort.js +1 -0
- package/dist/application/{JavaScriptRuntimeObservationService.js → javascript/JavaScriptRuntimeObservationService.js} +3 -3
- package/dist/application/{JavaScriptRuntimeReconciliationEvidence.js → javascript/JavaScriptRuntimeReconciliationEvidence.js} +3 -3
- package/dist/application/{JavaScriptRuntimeReconciliationService.js → javascript/JavaScriptRuntimeReconciliationService.js} +6 -6
- package/dist/application/{JavaScriptSemanticGraphAsyncProjection.js → javascript/JavaScriptSemanticGraphAsyncProjection.js} +8 -8
- package/dist/application/{JavaScriptSemanticGraphBuilder.js → javascript/JavaScriptSemanticGraphBuilder.js} +150 -73
- package/dist/application/{JavaScriptSemanticGraphChildProcessProjection.js → javascript/JavaScriptSemanticGraphChildProcessProjection.js} +15 -16
- package/dist/application/{JavaScriptSemanticGraphConstruction.js → javascript/JavaScriptSemanticGraphConstruction.js} +43 -2
- package/dist/application/{JavaScriptSemanticGraphDataProjection.js → javascript/JavaScriptSemanticGraphDataProjection.js} +8 -8
- package/dist/application/{JavaScriptSemanticGraphFingerprintProjection.js → javascript/JavaScriptSemanticGraphFingerprintProjection.js} +1 -1
- package/dist/application/{JavaScriptSemanticGraphFlowProjection.js → javascript/JavaScriptSemanticGraphFlowProjection.js} +7 -11
- package/dist/application/{JavaScriptSemanticGraphObjectProjection.js → javascript/JavaScriptSemanticGraphObjectProjection.js} +4 -4
- package/dist/application/javascript/JavaScriptSemanticGraphProjection.js +144 -0
- package/dist/application/{JavaScriptSemanticGraphResourceProjection.js → javascript/JavaScriptSemanticGraphResourceProjection.js} +4 -4
- package/dist/application/{JavaScriptSemanticGraphValueProjection.js → javascript/JavaScriptSemanticGraphValueProjection.js} +5 -5
- package/dist/application/{JavaScriptSemanticTraceService.js → javascript/JavaScriptSemanticTraceService.js} +6 -6
- package/dist/application/{ManagedApplicationGraphService.js → managed/ManagedApplicationGraphService.js} +7 -7
- package/dist/application/{ManagedMemberComparisonService.js → managed/ManagedMemberComparisonService.js} +10 -10
- package/dist/application/{ManagedNativeVerificationService.js → managed/ManagedNativeVerificationService.js} +7 -7
- package/dist/application/{ManagedReconstructionService.js → managed/ManagedReconstructionService.js} +7 -7
- package/dist/application/{NativeApiInspection.js → native/NativeApiInspection.js} +1 -1
- package/dist/application/{NativeCallRoutes.js → native/NativeCallRoutes.js} +3 -3
- package/dist/application/{NativeDispatchMetadataInspection.js → native/NativeDispatchMetadataInspection.js} +4 -4
- package/dist/application/{NativeUiActionTrace.js → native/NativeUiActionTrace.js} +7 -7
- package/dist/application/{NativeValueTrace.js → native/NativeValueTrace.js} +6 -6
- package/dist/application/{ProcessCli.js → process/ProcessCli.js} +15 -11
- package/dist/application/{ProcessEvidence.js → process/ProcessEvidence.js} +4 -4
- package/dist/{application/ArtifactInventory/hash.js → artifacts/ArtifactHash.js} +4 -2
- package/dist/artifacts/ArtifactPaths.js +3 -3
- package/dist/artifacts/ArtifactProvider.js +37 -40
- package/dist/artifacts/ArtifactProviderMetadata.js +37 -0
- package/dist/artifacts/AsarArtifactReader.js +195 -23
- package/dist/artifacts/AsarEntryStream.js +76 -0
- package/dist/artifacts/DirectoryArtifactReader.js +41 -7
- package/dist/artifacts/NativeDmgArtifactReader.js +161 -9
- package/dist/artifacts/ZipArtifactReader.js +3 -0
- package/dist/{application → artifacts/apple}/AppleAssetCatalogAnalysis.js +4 -4
- package/dist/artifacts/apple/DylibResolutionReader.js +259 -0
- package/dist/{application → artifacts/apple}/InterfaceBuilderAnalysis.js +125 -51
- package/dist/artifacts/{KeyedArchiveReader.js → apple/KeyedArchiveReader.js} +21 -27
- package/dist/artifacts/apple/MachoLoadCommandReader.js +294 -0
- package/dist/artifacts/apple/NibViewHierarchy.js +150 -0
- package/dist/{application → artifacts/extraction}/ArtifactExtraction.js +10 -10
- package/dist/{application → artifacts/inventory}/ArtifactGraphConstruction.js +3 -3
- package/dist/{application → artifacts/inventory}/ArtifactInventory.js +4 -4
- package/dist/{application/ArtifactInventory → artifacts/inventory}/classify.js +2 -2
- package/dist/{application/ArtifactInventory → artifacts/inventory}/reader.js +5 -5
- package/dist/{application/ArtifactInventory → artifacts/inventory}/scanCanonical.js +3 -3
- package/dist/{application/ArtifactInventory → artifacts/inventory}/scanReader.js +5 -5
- package/dist/{application → artifacts/javascript}/JavaScriptArtifactFiles.js +27 -6
- package/dist/artifacts/javascript/JavaScriptArtifactReader.js +6 -0
- package/dist/artifacts/readStableArtifact.js +68 -0
- package/dist/browser/BrowserScenarioSecrets.js +50 -8
- package/dist/browser/CdpAuthorizedMainFrame.js +4 -4
- package/dist/browser/CdpAuthorizedTarget.js +22 -0
- package/dist/browser/CdpBrowserProvider.js +4 -15
- package/dist/browser/CdpCaptureDocuments.js +33 -21
- package/dist/browser/CdpCaptureEventBodyShapes.js +3 -3
- package/dist/browser/CdpCaptureEventHandlers.js +116 -28
- package/dist/browser/CdpCaptureEventHelpers.js +6 -6
- package/dist/browser/CdpCaptureEvents.js +9 -0
- package/dist/browser/CdpCaptureStorage.js +10 -8
- package/dist/browser/CdpCaptureStorageFingerprints.js +24 -22
- package/dist/browser/CdpCaptureValues.js +2 -2
- package/dist/browser/CdpCommandRejection.js +17 -0
- package/dist/browser/CdpConnection.js +51 -11
- package/dist/browser/CdpElectronInspection.js +10 -10
- package/dist/browser/CdpElectronProvider.js +3 -6
- package/dist/browser/CdpElectronScriptEvents.js +6 -6
- package/dist/browser/CdpElectronScripts.js +2 -2
- package/dist/browser/CdpElectronWorkers.js +4 -4
- package/dist/browser/CdpObservationSession.js +18 -23
- package/dist/browser/CdpPageCapture.js +4 -4
- package/dist/browser/CdpPageCaptureScripts.js +2 -2
- package/dist/browser/CdpPageCaptureWorkers.js +9 -9
- package/dist/browser/CdpSafeMetadata.js +48 -10
- package/dist/browser/CdpScreenshot.js +5 -5
- package/dist/browser/CdpTargetEvents.js +8 -0
- package/dist/browser/CdpTargetSession.js +2 -2
- package/dist/browser/CdpWebMcpDiscovery.js +22 -16
- package/dist/browser/PlaywrightBrowserScenarioProvider.js +7 -6
- package/dist/browser/PlaywrightElectronActiveProvider.js +15 -9
- package/dist/browser/PlaywrightScenarioEvents.js +59 -51
- package/dist/browser/PlaywrightScenarioSession.js +8 -1
- package/dist/browser/WebSourceMapFetcher.js +37 -53
- package/dist/browser/assets/LocalWebScriptArtifacts.js +87 -0
- package/dist/browser/assets/PageScriptCapture.js +32 -0
- package/dist/browser/assets/PublishWebScripts.js +74 -0
- package/dist/browser/assets/ScenarioScriptCapture.js +76 -0
- package/dist/browser/assets/ScriptCaptureAdapters.js +57 -0
- package/dist/browser/assets/WebArtifactReads.js +56 -0
- package/dist/browser/assets/WebSourceLocationArtifacts.js +40 -0
- package/dist/browser/execution/CdpEventListeners.js +79 -0
- package/dist/browser/execution/CdpExecutionCapture.js +135 -0
- package/dist/browser/execution/CdpExecutionCollection.js +57 -0
- package/dist/browser/execution/CdpExecutionWindow.js +100 -0
- package/dist/browser/execution/CdpListenerSelector.js +22 -0
- package/dist/browser/execution/CdpPreciseCoverage.js +48 -0
- package/dist/browser/execution/CdpRuntimeInitiator.js +18 -0
- package/dist/browser/execution/CdpRuntimeProtocol.js +106 -0
- package/dist/browser/execution/CdpRuntimeRequests.js +81 -0
- package/dist/browser/execution/CdpRuntimeSession.js +163 -0
- package/dist/browser/execution/CdpRuntimeSources.js +223 -0
- package/dist/browser/execution/CdpWebRuntimeProvider.js +51 -0
- package/dist/browser/history/CaptureFailures.js +101 -0
- package/dist/browser/history/CaptureFormatError.js +10 -0
- package/dist/browser/history/CaptureRedaction.js +65 -0
- package/dist/browser/history/CaptureRelease.js +12 -0
- package/dist/browser/history/HarCapture.js +165 -0
- package/dist/browser/history/HarCaptureAdapter.js +20 -0
- package/dist/browser/history/HarCaptureProcess.js +57 -0
- package/dist/browser/history/HarJson.js +91 -0
- package/dist/browser/history/HarSchema.js +72 -0
- package/dist/browser/history/HistoricalCaptureDecoder.js +186 -0
- package/dist/browser/history/HistoricalCaptureFormatAdapter.js +1 -0
- package/dist/browser/history/MitmproxyCaptureAdapter.js +42 -0
- package/dist/browser/modules/NativeModuleResolver.js +210 -0
- package/dist/browser/modules/WebModuleArtifacts.js +40 -0
- package/dist/browser/network/PlaywrightNetworkContent.js +71 -0
- package/dist/browser/network/PlaywrightScenarioNetwork.js +180 -0
- package/dist/browser/providerIdentities.js +24 -0
- package/dist/catalogIdentity.js +23 -15
- package/dist/cli/androidCommands.js +13 -3
- package/dist/cli/applicationCommands.js +39 -8
- package/dist/cli/artifactCommands.js +27 -2
- package/dist/cli/binaryDiagnosticsCommands.js +39 -0
- package/dist/cli/browserAdvancedCommands.js +27 -9
- package/dist/cli/coreAnalysisCommands.js +6 -494
- package/dist/cli/coreBinaryCommands.js +211 -0
- package/dist/cli/coreNativeCommands.js +293 -0
- package/dist/cli/electronCommands.js +29 -27
- package/dist/cli/evmCommands.js +24 -0
- package/dist/cli/firmwareCommands.js +9 -6
- package/dist/cli/javascriptApplicationAnalysis.js +17 -4
- package/dist/cli/javascriptRecoveryCommands.js +45 -0
- package/dist/cli/jsonOutput.js +133 -0
- package/dist/cli/managedCommands.js +4 -4
- package/dist/cli/managedProjectGraphCommand.js +1 -1
- package/dist/cli/nativeCallCommands.js +35 -0
- package/dist/cli/processCommands.js +1 -1
- package/dist/cli/referenceSourceImportStatus.js +6 -1
- package/dist/cli/streamedJsonOutput.js +56 -0
- package/dist/cli/utilityCommands.js +49 -23
- package/dist/cli/webModuleCommands.js +56 -0
- package/dist/cli/webNetworkCaptureCommands.js +40 -0
- package/dist/cli/webRuntimeCommands.js +60 -0
- package/dist/cli/webScriptCommands.js +31 -0
- package/dist/cli/webSourceLocationCommands.js +42 -0
- package/dist/cli.js +19 -3
- package/dist/cliBrowserContext.js +4 -2
- package/dist/cliBrowserScenarioCommands.js +6 -5
- package/dist/cliCommandNames.js +14 -0
- package/dist/cliJavaScriptRuntimeCommands.js +6 -4
- package/dist/cliJsonInput.js +38 -2
- package/dist/cliOutput.js +52 -11
- package/dist/composition/android.js +3 -0
- package/dist/composition/auxiliaryAnalysisProviders.js +30 -0
- package/dist/composition/binary.js +25 -0
- package/dist/composition/binaryDiagnostics.js +8 -0
- package/dist/composition/browserObservation.js +3 -0
- package/dist/composition/browserScenario.js +3 -0
- package/dist/composition/directAnalysis.js +17 -0
- package/dist/composition/electronObservation.js +3 -0
- package/dist/composition/electronScenario.js +3 -0
- package/dist/composition/evm.js +4 -0
- package/dist/composition/firmware.js +3 -0
- package/dist/composition/javascriptRecovery.js +3 -0
- package/dist/composition/javascriptRuntimeObservation.js +3 -0
- package/dist/composition/optionalObservationProviders.js +49 -0
- package/dist/composition/webModules.js +5 -0
- package/dist/composition/webNetworkCaptures.js +6 -0
- package/dist/composition/webRuntime.js +4 -0
- package/dist/composition/webSourceLocations.js +5 -0
- package/dist/config/parseConfig.js +22 -3
- package/dist/contracts/{androidToolContracts.js → android/androidToolContracts.js} +5 -5
- package/dist/contracts/applicationToolContracts.js +43 -8
- package/dist/contracts/artifactToolContracts.js +8 -2
- package/dist/contracts/browserCaptureToolInputSchema.js +43 -0
- package/dist/contracts/browserScenarioToolContracts.js +1 -1
- package/dist/contracts/browserToolContracts.js +4 -3
- package/dist/contracts/enhancedInputs.js +1 -1
- package/dist/contracts/errorSchemas.js +8 -1
- package/dist/contracts/evm/evmToolContracts.js +20 -0
- package/dist/contracts/{firmwareToolContracts.js → firmware/firmwareToolContracts.js} +5 -5
- package/dist/contracts/investigationExamples.js +2 -2
- package/dist/contracts/{applicationWorkflowInputContracts.js → javascript/applicationWorkflowInputContracts.js} +6 -6
- package/dist/contracts/{electronToolContracts.js → javascript/electronToolContracts.js} +6 -6
- package/dist/contracts/{javascriptApplicationWorkflowExamples.js → javascript/javascriptApplicationWorkflowExamples.js} +3 -3
- package/dist/contracts/javascript/javascriptRecoveryToolContracts.js +23 -0
- package/dist/contracts/{javascriptRuntimeObservationToolContracts.js → javascript/javascriptRuntimeObservationToolContracts.js} +3 -3
- package/dist/contracts/{javascriptRuntimeReconciliationExample.js → javascript/javascriptRuntimeReconciliationExample.js} +5 -5
- package/dist/contracts/{managedToolContracts.js → managed/managedToolContracts.js} +10 -6
- package/dist/contracts/{managedWorkflowExamples.js → managed/managedWorkflowExamples.js} +1 -1
- package/dist/contracts/{managedWorkflowToolContracts.js → managed/managedWorkflowToolContracts.js} +6 -6
- package/dist/contracts/mobileApplicationGraphExamples.js +105 -0
- package/dist/contracts/native/binaryDiagnosticsToolContracts.js +42 -0
- package/dist/contracts/{nativeToolContracts.js → native/nativeToolContracts.js} +31 -8
- package/dist/contracts/officialToolContracts.js +15 -12
- package/dist/contracts/process/processCaptureExample.js +2 -0
- package/dist/contracts/sessionLifecycleInputs.js +22 -5
- package/dist/contracts/sessionStatusContract.js +10 -2
- package/dist/contracts/sessionToolContracts.js +9 -2
- package/dist/contracts/sessionToolSchemas.js +10 -3
- package/dist/contracts/toolContractExamples.js +1 -1
- package/dist/contracts/toolContracts.js +19 -7
- package/dist/contracts/toolEffects.js +62 -0
- package/dist/contracts/toolOutputSchemaGroups.js +23 -19
- package/dist/contracts/toolOutputSchemaPrimitives.js +1 -1
- package/dist/contracts/webNetworkCaptureToolContracts.js +24 -0
- package/dist/contracts/webRuntimeToolContracts.js +43 -0
- package/dist/contracts/webScriptToolContracts.js +68 -0
- package/dist/domain/analysisErrorBase.js +15 -0
- package/dist/domain/analysisErrorCore.js +63 -7
- package/dist/domain/analysisErrorPresentation.js +29 -1
- package/dist/domain/analysisErrorProjection.js +53 -2
- package/dist/domain/analysisSnapshot.js +166 -2
- package/dist/domain/{androidApplication.js → android/androidApplication.js} +7 -6
- package/dist/domain/apple/appleApplication.js +277 -0
- package/dist/domain/{appleAssetCatalog.js → apple/appleAssetCatalog.js} +2 -2
- package/dist/domain/apple/appleBundleAnatomy.js +236 -0
- package/dist/domain/apple/dyldPaths.js +81 -0
- package/dist/domain/apple/dylibResolution.js +367 -0
- package/dist/domain/apple/dylibResolutionFindings.js +75 -0
- package/dist/domain/{interfaceBuilderGraph.js → apple/interfaceBuilderGraph.js} +47 -314
- package/dist/domain/apple/interfaceBuilderKeyedArchive.js +411 -0
- package/dist/domain/{keyedArchive.js → apple/keyedArchive.js} +10 -9
- package/dist/domain/apple/plistValue.js +35 -0
- package/dist/domain/artifactInventoryEvidence.js +12 -2
- package/dist/domain/artifactInventorySnapshot.js +1 -0
- package/dist/domain/artifactOperationError.js +5 -1
- package/dist/domain/artifactPathSyntax.js +26 -0
- package/dist/domain/browserNetworkEvidence.js +82 -0
- package/dist/domain/browserObservation.js +1 -1
- package/dist/domain/browserObservationError.js +2 -0
- package/dist/domain/browserObservationSchemas.js +15 -1
- package/dist/domain/browserScenarioCapture.js +22 -0
- package/dist/domain/browserScenarioCaptureValues.js +25 -0
- package/dist/domain/browserScenarioDiff.js +6 -3
- package/dist/domain/browserScenarioDiffEvidence.js +35 -1
- package/dist/domain/browserScenarioValues.js +21 -3
- package/dist/domain/browserSession.js +2 -7
- package/dist/domain/bundleComparison.js +2 -1
- package/dist/domain/callPath.js +52 -44
- package/dist/domain/callPathSchemas.js +1 -1
- package/dist/domain/canonicalDigest.js +13 -1
- package/dist/domain/changedBehavior.js +3 -3
- package/dist/domain/comparisonStatus.js +11 -0
- package/dist/domain/conformanceTrustGate.js +0 -16
- package/dist/domain/evidence.js +17 -5
- package/dist/domain/evidenceBundle.js +98 -35
- package/dist/domain/evm/evmInterface.js +63 -0
- package/dist/domain/explicitSensitiveFailure.js +92 -0
- package/dist/domain/explicitSensitiveValues.js +10 -0
- package/dist/domain/{firmwareAnalysis.js → firmware/firmwareAnalysis.js} +10 -3
- package/dist/domain/functionComparisonNormalization.js +11 -13
- package/dist/domain/hopperValues.js +2 -2
- package/dist/domain/inputIssueProjection.js +17 -2
- package/dist/domain/{electronActiveObservation.js → javascript/electronActiveObservation.js} +9 -4
- package/dist/domain/{electronObservation.js → javascript/electronObservation.js} +5 -11
- package/dist/domain/{electronStaticAnalysisBrowser.js → javascript/electronStaticAnalysisBrowser.js} +4 -3
- package/dist/domain/{electronStaticAnalysisIpc.js → javascript/electronStaticAnalysisIpc.js} +2 -2
- package/dist/domain/{electronStaticAnalysisNative.js → javascript/electronStaticAnalysisNative.js} +12 -13
- package/dist/domain/javascript/electronStaticAnalysisTypes.js +1 -0
- package/dist/domain/{electronStaticAnalysisValues.js → javascript/electronStaticAnalysisValues.js} +3 -3
- package/dist/domain/javascript/htmlArtifactReferences.js +40 -0
- package/dist/domain/{javascriptApplicationAnalysis.js → javascript/javascriptApplicationAnalysis.js} +2 -2
- package/dist/domain/{javascriptApplicationChangeGraph.js → javascript/javascriptApplicationChangeGraph.js} +1 -1
- package/dist/domain/{javascriptApplicationEvidenceSchemas.js → javascript/javascriptApplicationEvidenceSchemas.js} +6 -4
- package/dist/domain/{javascriptApplicationGraph.js → javascript/javascriptApplicationGraph.js} +2 -2
- package/dist/domain/{javascriptApplicationGraphSchemas.js → javascript/javascriptApplicationGraphSchemas.js} +2 -2
- package/dist/domain/{javascriptApplicationVersionComparison.js → javascript/javascriptApplicationVersionComparison.js} +2 -2
- package/dist/domain/{javascriptApplicationVersionComparisonSchemas.js → javascript/javascriptApplicationVersionComparisonSchemas.js} +3 -3
- package/dist/domain/{javascriptApplicationVersionItems.js → javascript/javascriptApplicationVersionItems.js} +2 -2
- package/dist/domain/{javascriptApplicationVersionKeys.js → javascript/javascriptApplicationVersionKeys.js} +16 -9
- package/dist/domain/javascript/javascriptArtifactFiles.js +1 -0
- package/dist/domain/{javascriptAstFingerprint.js → javascript/javascriptAstFingerprint.js} +38 -22
- package/dist/domain/javascript/javascriptAstValues.js +23 -0
- package/dist/domain/{javascriptExportShapeComparison.js → javascript/javascriptExportShapeComparison.js} +21 -5
- package/dist/domain/{javascriptExportShapeComparisonSchemas.js → javascript/javascriptExportShapeComparisonSchemas.js} +2 -2
- package/dist/domain/{javascriptExportShapeSelection.js → javascript/javascriptExportShapeSelection.js} +1 -1
- package/dist/domain/{javascriptExportShapeVariants.js → javascript/javascriptExportShapeVariants.js} +1 -11
- package/dist/domain/{javascriptFeatureSeed.js → javascript/javascriptFeatureSeed.js} +4 -3
- package/dist/domain/{javascriptFeatureTrace.js → javascript/javascriptFeatureTrace.js} +2 -2
- package/dist/domain/{javascriptFeatureTraceSchemas.js → javascript/javascriptFeatureTraceSchemas.js} +32 -18
- package/dist/domain/{javascriptFeatureTraversal.js → javascript/javascriptFeatureTraversal.js} +6 -2
- package/dist/domain/{javascriptNativeHandoff.js → javascript/javascriptNativeHandoff.js} +1 -1
- package/dist/domain/javascript/javascriptRecovery.js +88 -0
- package/dist/domain/{javascriptRuntimeLoadState.js → javascript/javascriptRuntimeLoadState.js} +1 -1
- package/dist/domain/{javascriptRuntimeObservation.js → javascript/javascriptRuntimeObservation.js} +2 -2
- package/dist/domain/{javascriptRuntimeReconciliationActive.js → javascript/javascriptRuntimeReconciliationActive.js} +3 -3
- package/dist/domain/{javascriptRuntimeReconciliationGraph.js → javascript/javascriptRuntimeReconciliationGraph.js} +1 -1
- package/dist/domain/{javascriptRuntimeReconciliationMatching.js → javascript/javascriptRuntimeReconciliationMatching.js} +2 -2
- package/dist/domain/{javascriptRuntimeReconciliationParsing.js → javascript/javascriptRuntimeReconciliationParsing.js} +5 -5
- package/dist/domain/{javascriptRuntimeReconciliationResult.js → javascript/javascriptRuntimeReconciliationResult.js} +2 -2
- package/dist/domain/{javascriptRuntimeReconciliationSchemas.js → javascript/javascriptRuntimeReconciliationSchemas.js} +4 -4
- package/dist/domain/{javascriptRuntimeStaticCandidates.js → javascript/javascriptRuntimeStaticCandidates.js} +1 -1
- package/dist/domain/{javascriptSemanticAnalysis.js → javascript/javascriptSemanticAnalysis.js} +40 -14
- package/dist/domain/{javascriptSemanticAsyncEffects.js → javascript/javascriptSemanticAsyncEffects.js} +2 -1
- package/dist/domain/{javascriptSemanticCallResolution.js → javascript/javascriptSemanticCallResolution.js} +10 -5
- package/dist/domain/{javascriptSemanticCalls.js → javascript/javascriptSemanticCalls.js} +7 -4
- package/dist/domain/{javascriptSemanticChildProcesses.js → javascript/javascriptSemanticChildProcesses.js} +4 -2
- package/dist/domain/{javascriptSemanticDataEffectHelpers.js → javascript/javascriptSemanticDataEffectHelpers.js} +7 -6
- package/dist/domain/{javascriptSemanticDataEffects.js → javascript/javascriptSemanticDataEffects.js} +8 -6
- package/dist/domain/{javascriptSemanticFingerprints.js → javascript/javascriptSemanticFingerprints.js} +40 -16
- package/dist/domain/{javascriptSemanticGraph.js → javascript/javascriptSemanticGraph.js} +23 -7
- package/dist/domain/{javascriptSemanticGraphSchemas.js → javascript/javascriptSemanticGraphSchemas.js} +3 -3
- package/dist/domain/javascript/javascriptSemanticMemberMutations.js +116 -0
- package/dist/domain/javascript/javascriptSemanticMutationValues.js +53 -0
- package/dist/domain/{javascriptSemanticObjects.js → javascript/javascriptSemanticObjects.js} +5 -5
- package/dist/domain/{javascriptSemanticPrimitives.js → javascript/javascriptSemanticPrimitives.js} +1 -1
- package/dist/domain/{javascriptSemanticProjection.js → javascript/javascriptSemanticProjection.js} +31 -44
- package/dist/domain/{javascriptSemanticPromises.js → javascript/javascriptSemanticPromises.js} +77 -22
- package/dist/domain/{javascriptSemanticProvenance.js → javascript/javascriptSemanticProvenance.js} +4 -1
- package/dist/domain/{javascriptSemanticQuery.js → javascript/javascriptSemanticQuery.js} +1 -1
- package/dist/domain/{javascriptSemanticQueryAssessment.js → javascript/javascriptSemanticQueryAssessment.js} +1 -1
- package/dist/domain/{javascriptSemanticQueryIdentity.js → javascript/javascriptSemanticQueryIdentity.js} +1 -1
- package/dist/domain/{javascriptSemanticQuerySchemas.js → javascript/javascriptSemanticQuerySchemas.js} +3 -3
- package/dist/domain/javascript/javascriptSemanticRequireOrigin.js +25 -0
- package/dist/domain/{javascriptSemanticResources.js → javascript/javascriptSemanticResources.js} +2 -1
- package/dist/domain/{javascriptSemanticReturns.js → javascript/javascriptSemanticReturns.js} +1 -1
- package/dist/domain/{javascriptSemanticTraceSchemas.js → javascript/javascriptSemanticTraceSchemas.js} +2 -2
- package/dist/domain/javascript/javascriptSemanticTraversal.js +55 -0
- package/dist/domain/javascript/javascriptSemanticValueTypes.js +1 -0
- package/dist/domain/{javascriptSemanticValues.js → javascript/javascriptSemanticValues.js} +72 -48
- package/dist/domain/{javascriptStaticAnalysis.js → javascript/javascriptStaticAnalysis.js} +7 -4
- package/dist/domain/{javascriptStaticAnalysisBundler.js → javascript/javascriptStaticAnalysisBundler.js} +14 -11
- package/dist/domain/{javascriptStaticAnalysisCalls.js → javascript/javascriptStaticAnalysisCalls.js} +2 -2
- package/dist/domain/{javascriptStaticAnalysisHelpers.js → javascript/javascriptStaticAnalysisHelpers.js} +231 -40
- package/dist/domain/{sourceToBundleComparison.js → javascript/sourceToBundleComparison.js} +2 -2
- package/dist/domain/{sourceToBundleComparisonSchemas.js → javascript/sourceToBundleComparisonSchemas.js} +4 -4
- package/dist/domain/{sourceToBundleSignals.js → javascript/sourceToBundleSignals.js} +2 -2
- package/dist/domain/jsonValue.js +4 -0
- package/dist/domain/localPath.js +2 -0
- package/dist/domain/{managedApplicationGraph.js → managed/managedApplicationGraph.js} +4 -4
- package/dist/domain/{managedApplicationGraphNodes.js → managed/managedApplicationGraphNodes.js} +1 -1
- package/dist/domain/{managedArtifact.js → managed/managedArtifact.js} +1 -1
- package/dist/domain/{managedMemberComparison.js → managed/managedMemberComparison.js} +4 -4
- package/dist/domain/{managedMemberComparisonCoverage.js → managed/managedMemberComparisonCoverage.js} +2 -1
- package/dist/domain/{managedMemberComparisonItems.js → managed/managedMemberComparisonItems.js} +97 -40
- package/dist/domain/{managedMemberComparisonMatch.js → managed/managedMemberComparisonMatch.js} +22 -11
- package/dist/domain/{managedNativeVerification.js → managed/managedNativeVerification.js} +1 -1
- package/dist/domain/{managedNativeVerificationMatch.js → managed/managedNativeVerificationMatch.js} +3 -3
- package/dist/domain/{managedNativeVerificationSchemas.js → managed/managedNativeVerificationSchemas.js} +6 -5
- package/dist/domain/{managedReconstruction.js → managed/managedReconstruction.js} +3 -3
- package/dist/domain/native/binaryLayout.js +357 -0
- package/dist/domain/native/nativeCallObservation.js +164 -0
- package/dist/domain/{nativeFunctionAnnotations.js → native/nativeFunctionAnnotations.js} +1 -1
- package/dist/domain/{nativeInspection.js → native/nativeInspection.js} +1 -1
- package/dist/domain/{nativeInvestigationGraph.js → native/nativeInvestigationGraph.js} +13 -4
- package/dist/domain/{nativeLoadImage.js → native/nativeLoadImage.js} +1 -1
- package/dist/domain/{nativeUiObservation.js → native/nativeUiObservation.js} +20 -6
- package/dist/domain/{objcSwiftMetadata.js → native/objcSwiftMetadata.js} +17 -39
- package/dist/domain/native/recordedCrash.js +266 -0
- package/dist/domain/native/recordedCrashNoteCoverage.js +73 -0
- package/dist/domain/process/processCapture.js +316 -0
- package/dist/domain/{processCaptureExample.js → process/processCaptureExample.js} +5 -0
- package/dist/domain/process/processCaptureParsing.js +54 -0
- package/dist/domain/{processCaptureValidation.js → process/processCaptureValidation.js} +18 -2
- package/dist/domain/{processComparison.js → process/processComparison.js} +1 -1
- package/dist/domain/{processObservation.js → process/processObservation.js} +1 -1
- package/dist/domain/{processScenario.js → process/processScenario.js} +17 -17
- package/dist/domain/{processTraceSpecification.js → process/processTraceSpecification.js} +1 -1
- package/dist/domain/propertyListKeys.js +69 -0
- package/dist/domain/providerCleanupError.js +5 -2
- package/dist/domain/providerSelectionError.js +4 -2
- package/dist/domain/reconstructionCoverageEvaluation.js +46 -24
- package/dist/domain/reconstructionCoverageInput.js +7 -0
- package/dist/domain/reconstructionVerification.js +3 -3
- package/dist/domain/reconstructionVerificationSchemas.js +1 -1
- package/dist/domain/residualUnknown.js +3 -2
- package/dist/domain/runtimeVersion.js +2 -0
- package/dist/domain/sourceMapEnvelope.js +38 -0
- package/dist/domain/staticRuntimeCorrelation.js +3 -3
- package/dist/domain/unicodeCodePointOrder.js +11 -6
- package/dist/domain/webBundleAnalyzerAst.js +2 -34
- package/dist/domain/webBundleAnalyzerInspection.js +12 -9
- package/dist/domain/webCaptureDiff.js +1 -0
- package/dist/domain/webEventListeners.js +28 -0
- package/dist/domain/webExecution.js +74 -0
- package/dist/domain/webMcpDiscovery.js +1 -7
- package/dist/domain/webModuleImports.js +104 -0
- package/dist/domain/webModuleTrace.js +106 -0
- package/dist/domain/webNetworkCapture.js +118 -0
- package/dist/domain/webNetworkCaptureCoordinates.js +58 -0
- package/dist/domain/webRuntime.js +69 -0
- package/dist/domain/webScreenshot.js +1 -7
- package/dist/domain/webScriptArtifacts.js +39 -0
- package/dist/domain/webScriptExport.js +86 -0
- package/dist/domain/webScriptExportError.js +13 -0
- package/dist/domain/webScriptExportPlan.js +108 -0
- package/dist/domain/webSourceLocation.js +106 -0
- package/dist/domain/webSourcePosition.js +21 -0
- package/dist/dotnet/ManagedArtifactInspector.js +1 -1
- package/dist/dotnet/ManagedExceptionRegionValidation.js +41 -0
- package/dist/dotnet/ManagedMemberInspector.js +5 -3
- package/dist/dotnet/ManagedMemberInspectorCore.js +72 -32
- package/dist/dotnet/ManagedMemberInstructionDecoder.js +23 -7
- package/dist/dotnet/ManagedMemberRows.js +19 -6
- package/dist/dotnet/ManagedMetadataHeaps.js +20 -2
- package/dist/dotnet/ManagedMetadataInventory.js +38 -28
- package/dist/dotnet/ManagedMetadataInventoryRows.js +24 -10
- package/dist/dotnet/ManagedMethodBodyReader.js +7 -1
- package/dist/dotnet/ManagedNativeBoundaryHelpers.js +37 -19
- package/dist/dotnet/ManagedNativeBoundaryInspector.js +59 -51
- package/dist/dotnet/ManagedPeReader.js +11 -0
- package/dist/dotnet/ManagedStaticProvider.js +3 -33
- package/dist/dotnet/ManagedStaticProviderMetadata.js +36 -0
- package/dist/evaluation/CodexAgentEval.js +2 -1
- package/dist/evm/EvmBytecodeCarrier.js +21 -0
- package/dist/evm/EvmWorkerLimits.js +40 -0
- package/dist/evm/EvmoleFailures.js +126 -0
- package/dist/evm/EvmoleInterfaceAdapter.js +53 -0
- package/dist/evm/EvmoleInterfaceProvider.js +273 -0
- package/dist/evm/EvmoleInterfaceWorker.js +87 -0
- package/dist/evm/EvmoleRelease.js +16 -0
- package/dist/firmware/FirmwareCommand.js +1 -0
- package/dist/firmware/FirmwareProvider.js +18 -12
- package/dist/firmware/FirmwarePublication.js +1 -1
- package/dist/firmware/FirmwareRelease.js +1 -1
- package/dist/firmware/FirmwareReports.js +12 -0
- package/dist/firmware/FirmwareVersion.js +80 -0
- package/dist/generatedPackageMetadata.js +2 -2
- package/dist/ghidra/GhidraFunctionValues.js +5 -5
- package/dist/ghidra/GhidraInstallation.js +38 -34
- package/dist/ghidra/GhidraInstallationPolicy.js +140 -0
- package/dist/ghidra/GhidraInventoryValues.js +1 -1
- package/dist/ghidra/GhidraLauncher.js +13 -4
- package/dist/ghidra/GhidraLoadImageAttest.js +36 -0
- package/dist/ghidra/GhidraLoadImageValues.js +1 -1
- package/dist/ghidra/GhidraProvider.js +17 -235
- package/dist/ghidra/GhidraProviderCapabilities.js +8 -15
- package/dist/ghidra/GhidraProviderClient.js +209 -0
- package/dist/ghidra/GhidraResponseBuffer.js +7 -1
- package/dist/ghidra/extensions/nativeaot/NativeAotReport.js +17 -1
- package/dist/hopper/BridgeLauncher.js +2 -0
- package/dist/hopper/HopperProvider.js +2 -48
- package/dist/hopper/HopperProviderCapabilities.js +73 -0
- package/dist/hopper/HopperResponseStream.js +7 -1
- package/dist/hopper/LinuxPrivateDisplayProbe.js +8 -6
- package/dist/ida/IdaProviderCapabilities.js +3 -11
- package/dist/ida/IdaSessionClient.js +12 -0
- package/dist/{browser → inspector}/JavaScriptRuntimeScope.js +16 -5
- package/dist/{browser → inspector}/V8InspectorCaptureProjection.js +46 -8
- package/dist/{browser → inspector}/V8InspectorEndpoint.js +1 -1
- package/dist/{browser → inspector}/V8InspectorProvider.js +10 -13
- package/dist/inspector/providerIdentity.js +6 -0
- package/dist/javascript/recovery/RecoveryFiles.js +122 -0
- package/dist/javascript/recovery/WakaruCommand.js +119 -0
- package/dist/javascript/recovery/WakaruExecution.js +100 -0
- package/dist/javascript/recovery/WakaruProvider.js +96 -0
- package/dist/javascript/recovery/WakaruPublication.js +102 -0
- package/dist/javascript/recovery/WakaruRelease.js +29 -0
- package/dist/javascript/recovery/WakaruReport.js +134 -0
- package/dist/javascript/sourceMaps/SourceMapCodecProcess.js +37 -0
- package/dist/javascript/sourceMaps/SourceMapCodecProtocol.js +20 -0
- package/dist/javascript/sourceMaps/SourceMapCommand.js +177 -0
- package/dist/javascript/sourceMaps/SourceMapDecoder.js +61 -0
- package/dist/javascript/sourceMaps/SourceMapFormat.js +185 -0
- package/dist/javascript/sourceMaps/TraceSourceMap.js +138 -0
- package/dist/main/shutdown.js +8 -2
- package/dist/main/transport.js +24 -7
- package/dist/main.js +4 -18
- package/dist/native/AppleDispatchCoverage.js +58 -0
- package/dist/native/AppleDispatchMetadata.js +71 -509
- package/dist/native/AppleMachoFixups.js +292 -0
- package/dist/native/AppleMachoSelection.js +188 -0
- package/dist/native/AppleObjcCategories.js +59 -0
- package/dist/native/AppleObjcDispatchFacets.js +257 -0
- package/dist/native/AppleObjcProperties.js +68 -0
- package/dist/native/AppleObjcProtocols.js +2 -1
- package/dist/native/AppleSwiftDispatchFacets.js +150 -0
- package/dist/native/CommandRunner.js +2 -1
- package/dist/native/LldbCallTracer.js +278 -0
- package/dist/native/NativeCallObservation.js +135 -0
- package/dist/native/NativeMacOSProvider.js +151 -75
- package/dist/native/NativeMacOSProviderMetadata.js +47 -0
- package/dist/native/NativeMachoInspection.js +45 -14
- package/dist/native/NativeUiHelperRuntime.js +7 -3
- package/dist/native/NativeUiObservation.js +8 -4
- package/dist/native/NativeUiOutputBudget.js +8 -0
- package/dist/native/parsers/codesign.js +40 -5
- package/dist/native/parsers/demangle.js +6 -2
- package/dist/native/parsers/dyldInfo.js +13 -4
- package/dist/native/parsers/echoedPath.js +14 -0
- package/dist/native/parsers/lipo.js +14 -0
- package/dist/native/parsers/otool.js +1 -1
- package/dist/native/parsers/plist.js +174 -19
- package/dist/native/pwndbg/PwndbgCoreContext.js +160 -0
- package/dist/native/pwntools/PwntoolsDecoder.js +203 -0
- package/dist/native/pwntools/PwntoolsFailures.js +180 -0
- package/dist/native/pwntools/PwntoolsLayoutProvider.js +36 -0
- package/dist/native/pwntools/PwntoolsRecordedCrashProvider.js +75 -0
- package/dist/native/pwntools/PwntoolsRelease.js +19 -0
- package/dist/native/pwntools/PwntoolsResourceLimits.js +76 -0
- package/dist/native/pwntools/RecordedCrashSourceBindings.js +46 -0
- package/dist/native/pwntools/RecordedCrashStructureBindings.js +101 -0
- package/dist/process/DarwinProcessRunTokenReader.js +294 -0
- package/dist/process/ExecFileOutput.js +2 -0
- package/dist/process/OwnedCommand.js +113 -0
- package/dist/process/ProcessOwnership.js +263 -33
- package/dist/process/ProcessOwnershipObservation.js +161 -24
- package/dist/process/ProviderProcess.js +68 -20
- package/dist/{application → process/capture}/FilesystemSnapshot.js +20 -5
- package/dist/{application → process/capture}/ProcessCaptureCapability.js +16 -1
- package/dist/{application → process/capture}/ProcessCaptureError.js +17 -1
- package/dist/process/capture/ProcessCaptureLifecycle.js +615 -0
- package/dist/process/capture/ProcessHarness.js +452 -0
- package/dist/{application → process/capture}/ProcessSampling.js +2 -2
- package/dist/reference/ReferenceSourceReaderEntries.js +6 -1
- package/dist/server/createServer.js +70 -6
- package/dist/server/mcpClientMetadata.js +6 -3
- package/dist/server/promptCompletion.js +10 -3
- package/dist/server/registerAndroidTools.js +1 -1
- package/dist/server/registerApplicationTools/compareExportShapes.js +2 -2
- package/dist/server/registerApplicationTools/compareSourceToBundle.js +2 -2
- package/dist/server/registerApplicationTools/compareVersions.js +2 -2
- package/dist/server/registerApplicationTools/projectMobileApplicationGraph.js +43 -0
- package/dist/server/registerApplicationTools/traceFeature.js +1 -1
- package/dist/server/registerApplicationTools/traceSemantics.js +1 -1
- package/dist/server/registerApplicationTools.js +2 -0
- package/dist/server/registerBinaryDiagnosticsTools.js +17 -0
- package/dist/server/registerBrowserScenarioTool.js +6 -2
- package/dist/server/registerBrowserTools.js +13 -2
- package/dist/server/registerCloseLifecycleTool.js +1 -1
- package/dist/server/registerElectronTools.js +21 -7
- package/dist/server/registerEvidenceTools.js +1 -1
- package/dist/server/registerEvmTools.js +17 -0
- package/dist/server/registerJavaScriptRecoveryTool.js +17 -0
- package/dist/server/registerJavaScriptRuntimeObservationTools.js +9 -4
- package/dist/server/registerManagedTools.js +3 -3
- package/dist/server/registerManagedWorkflowTools/compareManagedMembers.js +2 -2
- package/dist/server/registerManagedWorkflowTools/contract.js +1 -1
- package/dist/server/registerManagedWorkflowTools/importManagedReconstruction.js +1 -1
- package/dist/server/registerManagedWorkflowTools/projectManagedApplicationGraph.js +1 -1
- package/dist/server/registerManagedWorkflowTools/verifyManagedNativeBoundaries.js +2 -2
- package/dist/server/registerNativeTools.js +1 -1
- package/dist/server/registerProcessComparisonTool.js +1 -1
- package/dist/server/registerPrompts.js +5 -1
- package/dist/server/registerRecordedCrashTools.js +17 -0
- package/dist/server/registerSessionTools.js +3 -3
- package/dist/server/registerWebModuleTool.js +17 -0
- package/dist/server/registerWebNetworkCaptureTool.js +28 -0
- package/dist/server/registerWebRuntimeTools.js +31 -0
- package/dist/server/registerWebScriptTool.js +18 -0
- package/dist/server/registerWebSourceLocationTool.js +17 -0
- package/dist/server/sessionAvailabilityPolicy.js +27 -12
- package/dist/server/sessionToolPolicies.js +1 -1
- package/dist/server/toolResult.js +1 -1
- package/dist/windows/WindowsOwnedProcess.js +3 -1
- package/install.sh +12 -2
- package/native/windows/README.md +5 -0
- package/native/windows/build/manifest.json +2 -2
- package/native/windows/build/rea-windows-x64.node +0 -0
- package/package.json +75 -26
- package/scripts/hopper-demo-x11.py +67 -8
- package/scripts/rea.mjs +19 -3
- package/skills/reverse-engineer-anything/SKILL.md +23 -3
- package/skills/reverse-engineer-anything/references/android-applications.md +2 -2
- package/skills/reverse-engineer-anything/references/javascript-applications.md +1 -1
- package/skills/reverse-engineer-anything/references/native-and-artifacts.md +61 -23
- package/third_party/README.md +60 -0
- package/third_party/evmole/LICENSE +21 -0
- package/third_party/evmole/README.md +22 -0
- package/third_party/pwndbg/LICENSE.md +21 -0
- package/third_party/pwndbg/README.md +23 -0
- package/third_party/pwntools/README.md +40 -0
- package/dist/application/AuthorizedArtifactInventory.js +0 -7
- package/dist/application/JavaScriptSemanticGraphProjection.js +0 -38
- package/dist/application/ProcessCaptureLifecycle.js +0 -299
- package/dist/application/ProcessHarness.js +0 -275
- package/dist/application/StoreFileLock.js +0 -124
- package/dist/application/runtime.js +0 -53
- package/dist/contracts/processCaptureExample.js +0 -2
- package/dist/domain/appleApplication.js +0 -181
- package/dist/domain/bytecodeProvider.js +0 -178
- package/dist/domain/customProtocolCapture.js +0 -137
- package/dist/domain/eventProcessTree.js +0 -225
- package/dist/domain/javascriptAstValues.js +0 -13
- package/dist/domain/javascriptSemanticTraversal.js +0 -30
- package/dist/domain/mobileApplicationInvestigation.js +0 -159
- package/dist/domain/packageAnalysis.js +0 -123
- package/dist/domain/peInspection.js +0 -197
- package/dist/domain/processCapture.js +0 -177
- package/dist/domain/processCaptureParsing.js +0 -21
- package/dist/domain/protocolCapture.js +0 -217
- package/dist/domain/runtimeIdentification.js +0 -212
- package/dist/generatedMcpToolCatalog.js +0 -37
- package/dist/native/NativeHostCapabilities.js +0 -23
- /package/dist/application/{AndroidAnalysisPort.js → DirectAnalysisDependencies.js} +0 -0
- /package/dist/application/{BinarySessionPort.js → WebModulePorts.js} +0 -0
- /package/dist/application/{ElectronActiveObservationPort.js → WebNetworkCapturePort.js} +0 -0
- /package/dist/application/{ElectronObservationPort.js → WebRuntimePort.js} +0 -0
- /package/dist/application/{FirmwareAnalysisPort.js → WebScriptArtifactPort.js} +0 -0
- /package/dist/application/{JavaScriptArtifactAnalysisTypes.js → WebSourceLocationPorts.js} +0 -0
- /package/dist/application/{JavaScriptRuntimeObservationPort.js → android/AndroidAnalysisPort.js} +0 -0
- /package/dist/application/{ArtifactExtractionDestination.js → artifacts/ArtifactExtractionDestination.js} +0 -0
- /package/dist/application/{AbortablePromise.js → binary/AbortablePromise.js} +0 -0
- /package/dist/{domain/electronStaticAnalysisTypes.js → application/binary/BinarySessionPort.js} +0 -0
- /package/dist/application/{BinarySessionStatus.js → binary/BinarySessionStatus.js} +0 -0
- /package/dist/{domain/javascriptSemanticValueTypes.js → application/binaryDiagnostics/BinaryLayoutPort.js} +0 -0
- /package/dist/application/{ElectronBoundaryGraph.js → javascript/ElectronBoundaryGraph.js} +0 -0
- /package/dist/application/{ElectronBoundaryGraphIpc.js → javascript/ElectronBoundaryGraphIpc.js} +0 -0
- /package/dist/application/{ElectronBoundaryGraphNative.js → javascript/ElectronBoundaryGraphNative.js} +0 -0
- /package/dist/application/{ElectronBoundaryGraphWindows.js → javascript/ElectronBoundaryGraphWindows.js} +0 -0
- /package/dist/application/{JavaScriptArtifactGraphBundlers.js → javascript/JavaScriptArtifactGraphBundlers.js} +0 -0
- /package/dist/application/{JavaScriptArtifactGraphEvidence.js → javascript/JavaScriptArtifactGraphEvidence.js} +0 -0
- /package/dist/application/{JavaScriptArtifactReconstructionInput.js → javascript/JavaScriptArtifactReconstructionInput.js} +0 -0
- /package/dist/application/{JavaScriptSemanticGraphEvidence.js → javascript/JavaScriptSemanticGraphEvidence.js} +0 -0
- /package/dist/artifacts/{NibArchive.js → apple/NibArchive.js} +0 -0
- /package/dist/{application/ArtifactInventory → artifacts/inventory}/policy.js +0 -0
- /package/dist/{application/ArtifactInventory → artifacts/inventory}/types.js +0 -0
- /package/dist/domain/{androidAnalysis.js → android/androidAnalysis.js} +0 -0
- /package/dist/domain/{electronStaticAnalysis.js → javascript/electronStaticAnalysis.js} +0 -0
- /package/dist/domain/{javascriptExportShapeComparisonIdentity.js → javascript/javascriptExportShapeComparisonIdentity.js} +0 -0
- /package/dist/domain/{javascriptRuntimeReconciliation.js → javascript/javascriptRuntimeReconciliation.js} +0 -0
- /package/dist/domain/{javascriptRuntimeReconciliationRuntime.js → javascript/javascriptRuntimeReconciliationRuntime.js} +0 -0
- /package/dist/domain/{javascriptSemanticCoverage.js → javascript/javascriptSemanticCoverage.js} +0 -0
- /package/dist/domain/{javascriptSemanticDerivedAnalysis.js → javascript/javascriptSemanticDerivedAnalysis.js} +0 -0
- /package/dist/domain/{javascriptSemanticGraphSerialization.js → javascript/javascriptSemanticGraphSerialization.js} +0 -0
- /package/dist/domain/{javascriptSemanticIr.js → javascript/javascriptSemanticIr.js} +0 -0
- /package/dist/domain/{javascriptSemanticQueryRelations.js → javascript/javascriptSemanticQueryRelations.js} +0 -0
- /package/dist/domain/{javascriptSemanticState.js → javascript/javascriptSemanticState.js} +0 -0
- /package/dist/domain/{javascriptSourceParser.js → javascript/javascriptSourceParser.js} +0 -0
- /package/dist/domain/{javascriptStaticAnalysisFindings.js → javascript/javascriptStaticAnalysisFindings.js} +0 -0
- /package/dist/domain/{javascriptStaticAnalysisState.js → javascript/javascriptStaticAnalysisState.js} +0 -0
- /package/dist/domain/{javascriptStaticAnalysisTypes.js → javascript/javascriptStaticAnalysisTypes.js} +0 -0
- /package/dist/domain/{managedApplicationGraphCoverage.js → managed/managedApplicationGraphCoverage.js} +0 -0
- /package/dist/domain/{managedApplicationGraphNodeCoverage.js → managed/managedApplicationGraphNodeCoverage.js} +0 -0
- /package/dist/domain/{nativeApiBoundary.js → native/nativeApiBoundary.js} +0 -0
- /package/dist/domain/{nativeDataType.js → native/nativeDataType.js} +0 -0
- /package/dist/domain/{nativeInstruction.js → native/nativeInstruction.js} +0 -0
- /package/dist/domain/{nativeMetadataRecovery.js → native/nativeMetadataRecovery.js} +0 -0
- /package/dist/domain/{nativeValueFlow.js → native/nativeValueFlow.js} +0 -0
- /package/dist/domain/{nativeValueTrace.js → native/nativeValueTrace.js} +0 -0
- /package/dist/domain/{processEvidenceProvider.js → process/processEvidenceProvider.js} +0 -0
- /package/dist/domain/{processTraceComparison.js → process/processTraceComparison.js} +0 -0
- /package/dist/domain/{processTraceDimensionProjection.js → process/processTraceDimensionProjection.js} +0 -0
- /package/dist/domain/{processTraceEvaluation.js → process/processTraceEvaluation.js} +0 -0
- /package/dist/{application → process/capture}/ProcessCaptureEnvironment.js +0 -0
- /package/dist/{application → process/capture}/ProcessCaptureJournal.js +0 -0
- /package/dist/{application → process/capture}/ProcessFilesystemEffects.js +0 -0
- /package/dist/{application → process/capture}/ProcessNormalization.js +0 -0
- /package/dist/{application → process/capture}/ProcessScenarioRuntimeValidation.js +0 -0
- /package/dist/{application → process/capture}/ProcessTimer.js +0 -0
- /package/dist/{application → process/capture}/TerminalRenderer.js +0 -0
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Native, managed, and packaged artifacts
|
|
2
2
|
|
|
3
|
+
## Recorded Linux crashes
|
|
4
|
+
|
|
5
|
+
Use `inspect_recorded_crash` with an explicit Linux x86-64 ELF core path to
|
|
6
|
+
inspect historical thread registers, signals, raw notes and original file
|
|
7
|
+
ranges. It is independent of the active disassembler target. Source-bound
|
|
8
|
+
register values and note bytes are observations; missing notes, signal-thread
|
|
9
|
+
association and current executable/library identity remain unknown. PIDs are
|
|
10
|
+
historical metadata and never authorize live attach or control.
|
|
11
|
+
|
|
12
|
+
The optional `include_debugger_context` facet adds mapping candidates through
|
|
13
|
+
caller-supplied GDB/pwndbg in an owned core-only session. Display names do not
|
|
14
|
+
establish current file identity; zero reported flags leave permissions unknown.
|
|
15
|
+
Requested unavailable context fails with setup guidance. See
|
|
16
|
+
[recorded crashes](https://github.com/morluto/rea/blob/main/docs/recorded-crashes.md)
|
|
17
|
+
for exact upstream profiles, bounds and verification coverage.
|
|
18
|
+
|
|
3
19
|
## Native targets
|
|
4
20
|
|
|
5
21
|
After `open_binary`, use focused search, procedure, or function tools directly.
|
|
@@ -9,6 +25,12 @@ cross-references. Addresses and recovered pseudocode are analysis observations,
|
|
|
9
25
|
not original source. Provider unavailability and unsupported metadata remain
|
|
10
26
|
unknown rather than false.
|
|
11
27
|
|
|
28
|
+
To see which functions or Objective-C methods a Mach-O actually calls in one
|
|
29
|
+
run, use `observe_native_calls` with explicit breakpoints and a bounded
|
|
30
|
+
`duration_ms`/`max_events`. It launches a new process under LLDB, so the target
|
|
31
|
+
runs and may change files or use the network. Hardened-runtime targets need the
|
|
32
|
+
`get-task-allow` entitlement.
|
|
33
|
+
|
|
12
34
|
Use `binary_session` with no arguments to check the open target, selected
|
|
13
35
|
provider, and alignment. Its default `result.tool_availability` includes the
|
|
14
36
|
complete tool inventory with availability reasons and remediation. When choosing
|
|
@@ -37,29 +59,30 @@ assembly. Keep managed/native boundaries and unavailable reconstruction facts
|
|
|
37
59
|
explicit. A bring-your-own reconstruction oracle is separate from the canonical
|
|
38
60
|
parser and must not become an implicit setup dependency.
|
|
39
61
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
### .NET NativeAOT
|
|
63
|
+
|
|
64
|
+
NativeAOT binaries contain native machine code, so ordinary CIL decompilers
|
|
65
|
+
cannot recover the original method bodies. When managed metadata/CIL is absent,
|
|
66
|
+
classify that as a native-analysis route rather than claiming source recovery.
|
|
67
|
+
Open the native image with the selected deep provider and inspect functions,
|
|
68
|
+
strings, calls, and references; describe decompiler output as pseudocode and
|
|
69
|
+
inference.
|
|
70
|
+
|
|
71
|
+
NativeAOT images can be PE/COFF, ELF, or Mach-O executables and shared
|
|
72
|
+
libraries. Use file bytes and loader metadata rather than suffixes to identify
|
|
73
|
+
them. For packaged apps, inventory/extract with REA's artifact tools and retain
|
|
74
|
+
the exact contained image identity. PDB, ELF debug, or dSYM sidecars are
|
|
75
|
+
additional evidence only when the provider accepts and matches them.
|
|
76
|
+
|
|
77
|
+
For deeper type recovery, the optional third-party
|
|
78
|
+
[Ghidra NativeAOT analyzer](https://github.com/Washi1337/ghidra-nativeaot)
|
|
79
|
+
rehydrates ReadyToRun metadata and can recover method tables, type relationships,
|
|
80
|
+
frozen objects, and strings. This is a Ghidra extension with its own install and
|
|
81
|
+
interactive workflow; it is not currently part of REA's managed parser or
|
|
82
|
+
headless Ghidra bridge. Treat its annotations as analysis evidence, retain the
|
|
83
|
+
binary identity, and do not present recovered types as original source. Header
|
|
84
|
+
discovery may require a symbol or analyst identification of the ReadyToRun
|
|
85
|
+
header, depending on the binary and analyzer version.
|
|
63
86
|
|
|
64
87
|
## Packages and extraction
|
|
65
88
|
|
|
@@ -68,6 +91,21 @@ ASAR, or DMG inputs when the artifact graph and findings help answer the
|
|
|
68
91
|
question. It returns the complete artifact graph inline. Cite graph manifest
|
|
69
92
|
IDs when using them.
|
|
70
93
|
|
|
94
|
+
For an IPA or a macOS `.app`, ZIP, or DMG, pass the inventory Evidence to
|
|
95
|
+
`project_apple_application_graph`. It reports application roots and nested
|
|
96
|
+
bundles by path convention: app extensions, XPC services, frameworks, login
|
|
97
|
+
items, system and driver extensions, and plug-ins. It also lists privileged
|
|
98
|
+
helpers, launchd plists, symlinks, and each bundle's `info_plist_path` and
|
|
99
|
+
executable candidates. Roles are path conventions, not parsed plists; read the
|
|
100
|
+
listed plists with `inspect_plist`.
|
|
101
|
+
|
|
102
|
+
After `open_binary` on a `.app` or Mach-O, use `trace_dylib_resolution` to see
|
|
103
|
+
which file each `@rpath`, `@loader_path` and `@executable_path` load reaches for
|
|
104
|
+
every executable in the bundle. It also lists missing or weak loads and earlier
|
|
105
|
+
`@rpath` candidates that are absent. Narrow large bundles with `roots` or
|
|
106
|
+
`architecture`. System paths stay undetermined because the dyld shared cache
|
|
107
|
+
provides them.
|
|
108
|
+
|
|
71
109
|
Use `extract_artifact` when materialized files are needed. It takes no arguments
|
|
72
110
|
and materializes all regular files into a fresh temporary directory chosen by
|
|
73
111
|
REA. Symlinks and encrypted entries are inventory facts, not extractable files.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Upstream analysis engines
|
|
2
|
+
|
|
3
|
+
REA integrates existing tools through provider adapters. Upstream source remains
|
|
4
|
+
unmodified and retains its own license; it is not copied into REA's domain or
|
|
5
|
+
application code.
|
|
6
|
+
|
|
7
|
+
## jadx-headless-mcp
|
|
8
|
+
|
|
9
|
+
- Source: <https://github.com/1013503897/jadx-headless-mcp>
|
|
10
|
+
- Submodule: `third_party/jadx-headless-mcp`
|
|
11
|
+
- Release: `v0.7.1`
|
|
12
|
+
- Commit: `5844800a486d2248fa949b74c9896285f5b54de2`
|
|
13
|
+
- License: Apache-2.0; see the submodule's `LICENSE`.
|
|
14
|
+
- Release identity: `src/android/JadxRelease.ts`.
|
|
15
|
+
- REA integration: `src/android/`; no upstream patches in this version.
|
|
16
|
+
|
|
17
|
+
Fetch source for inspection with:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
git submodule update --init third_party/jadx-headless-mcp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Normal REA builds and installed npm packages do not require this submodule or a
|
|
24
|
+
Gradle build. Supply a separately obtained JAR with `REA_JADX_MCP_JAR`; REA never
|
|
25
|
+
downloads engines during an analysis operation. The audited release JAR is
|
|
26
|
+
identified by SHA-256. A caller-supplied build reporting the supported protocol
|
|
27
|
+
version retains its actual digest and an unknown source revision unless its
|
|
28
|
+
bytes match the audited release.
|
|
29
|
+
|
|
30
|
+
When updating: review upstream protocol and license changes, update the gitlink
|
|
31
|
+
and release identity together, exercise the adapter's producer regressions, and
|
|
32
|
+
run the real APK CLI/MCP lane. Never attribute modified engine bytes to the
|
|
33
|
+
audited source revision.
|
|
34
|
+
|
|
35
|
+
## Public APK fixture
|
|
36
|
+
|
|
37
|
+
`scripts/fetch-android-fixtures.mjs` explicitly downloads the audited engine and
|
|
38
|
+
Appium ApiDemos v6.0.18 into ignored `_reference/apk-integration/`. Both downloads
|
|
39
|
+
are checked against fixed SHA-256 values. Fixture provenance is recorded in
|
|
40
|
+
`scripts/fixtures/android-apidemos.json`; the source uses Apache-2.0. This is a
|
|
41
|
+
static analysis fixture: no emulator, device, SDK installation or app execution
|
|
42
|
+
is needed. APKs and JARs are neither tracked nor included in npm packages.
|
|
43
|
+
|
|
44
|
+
## Firmware engines
|
|
45
|
+
|
|
46
|
+
| Engine | Source | Release | Pinned commit | License |
|
|
47
|
+
| --- | --- | --- | --- | --- |
|
|
48
|
+
| Binwalk | <https://github.com/ReFirmLabs/binwalk> | v3.1.0 | `4fdab3d464d97b68e0af9088df3f9e2e1545b21c` | MIT, upstream `LICENSE` |
|
|
49
|
+
| Unblob | <https://github.com/onekey-sec/unblob> | 26.6.4 | `1fcc7a0a584a70a96c31f5a276c20944d199a089` | MIT, upstream `LICENSE` |
|
|
50
|
+
|
|
51
|
+
Source remains unmodified in `third_party/binwalk` and `third_party/unblob`.
|
|
52
|
+
Release records live in `src/firmware/FirmwareRelease.ts`; REA adapters own the
|
|
53
|
+
CLI/report interpretation and lifecycle in `src/firmware/`. Caller-supplied
|
|
54
|
+
executables retain their actual launcher digest and unknown source revision;
|
|
55
|
+
version output alone does not establish source identity. REA does not bundle
|
|
56
|
+
extractors or download/install firmware engines during analysis.
|
|
57
|
+
|
|
58
|
+
On updates: inspect actual pinned CLI and report producers, preserve licenses,
|
|
59
|
+
update gitlinks/release records, run report regressions and the real firmware
|
|
60
|
+
lane. See [firmware setup and coverage](../docs/firmware-analysis.md).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Maxim Andreev
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# EVM interface upstream profile
|
|
2
|
+
|
|
3
|
+
REA integrates unchanged [EVMole](https://github.com/cdump/evmole) as the exact
|
|
4
|
+
npm dependency `evmole@0.9.3`, with lockfile integrity verification. Tag `0.9.3`
|
|
5
|
+
resolves to commit `0409707c2efef11a9043f9b4505cad5719054a7e`.
|
|
6
|
+
|
|
7
|
+
The JavaScript binding and WASM engine remain in the original upstream package;
|
|
8
|
+
REA contains only carrier validation, a worker adapter and portable contracts.
|
|
9
|
+
No submodule or vendored engine fork is required. No signature database,
|
|
10
|
+
LLM decompiler, blockchain node or RPC dependency is acquired.
|
|
11
|
+
|
|
12
|
+
Upstream is MIT, copyright (c) 2023 Maxim Andreev. Its npm tarball omits the
|
|
13
|
+
license file, so REA packages the unchanged tag's [LICENSE](LICENSE) here.
|
|
14
|
+
The engine is initialized through the upstream `no_tla`/`initSync` interface
|
|
15
|
+
only inside an owned worker; importing REA services performs no WASM/file I/O.
|
|
16
|
+
|
|
17
|
+
Initial interface analysis uses `contractInfo` with selectors, arguments and
|
|
18
|
+
stateMutability enabled. Selector recovery also extracts/reports terminal metadata;
|
|
19
|
+
its reported representation is retained with explicit unknown precision/coverage.
|
|
20
|
+
Other upstream outputs are separate future contracts;
|
|
21
|
+
in particular, CFG destination IDs are not byte addresses and terminal CBOR
|
|
22
|
+
metadata cannot establish a lossless integer claim through the current binding.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Dominik 'Disconnect3d' Czarnota
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# pwndbg core context adapter
|
|
2
|
+
|
|
3
|
+
REA uses caller-supplied unchanged [pwndbg](https://github.com/pwndbg/pwndbg)
|
|
4
|
+
2026.09.15, commit `55596aa676a2756efb8d67034f31675170eabe48`, and GDB.
|
|
5
|
+
The original MIT license is retained in `LICENSE.md`. Engine source and its
|
|
6
|
+
dependencies are not vendored or acquired by REA.
|
|
7
|
+
|
|
8
|
+
The adapter executes the selected upstream `gdbinit.py` with its original
|
|
9
|
+
`__file__`, an explicitly selected existing virtual environment, and
|
|
10
|
+
`PWNDBG_NO_AUTOUPDATE=1`. The upstream entrypoint and dependencies are trusted
|
|
11
|
+
caller-supplied executable code. Reported versions establish observed behavior,
|
|
12
|
+
not source authenticity. The real verification lane checks out the exact commit
|
|
13
|
+
and uses its frozen `uv.lock` in isolated runner storage.
|
|
14
|
+
|
|
15
|
+
Only `pwndbg.aglib.vmmap.get()` is queried, after establishing a core-only GDB
|
|
16
|
+
connection without an executable. All original core notes and recorded register
|
|
17
|
+
values come from the independent pwntools/pyelftools decoder. Mapping candidates
|
|
18
|
+
are derived; original pathnames do not identify current host files, and reported
|
|
19
|
+
flags zero leave permissions unknown. REA does not expose upstream command
|
|
20
|
+
execution, live attach, target launch, implicit executable pairing or updates.
|
|
21
|
+
|
|
22
|
+
Local actual verification uses Linux x64, GDB 13.1 and the exact upstream tag/build.
|
|
23
|
+
Other GDB versions require their corresponding real workflow before being claimed.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Offline ELF upstream profile
|
|
2
|
+
|
|
3
|
+
REA uses caller-supplied, unchanged Python packages. It vendors no pwntools,
|
|
4
|
+
pyelftools or Unicorn implementation and never installs these dependencies.
|
|
5
|
+
|
|
6
|
+
| Upstream | Exact verified profile | License | Role |
|
|
7
|
+
| --- | --- | --- | --- |
|
|
8
|
+
| [pwntools](https://github.com/Gallopsled/pwntools) | 4.15.0; tag commit `3ad86ec5adab1abf9781ca7552a6f5d7cff7a33c` | MIT | ELF analysis and static mitigation/GOT/PLT heuristics |
|
|
9
|
+
| [pyelftools](https://github.com/eliben/pyelftools) | 0.33 | Public domain | Original ELF sections, segments, symbols and relocations |
|
|
10
|
+
| [Unicorn](https://github.com/unicorn-engine/unicorn) | 2.1.2 | GPL-2.0 | Upstream PLT emulation; distinct from executing the target as a host process |
|
|
11
|
+
|
|
12
|
+
The adapter checks all three runtime versions before importing the ELF engine.
|
|
13
|
+
Original upstream code/licenses remain in the caller-selected environment.
|
|
14
|
+
No target or core binaries are committed. Fixtures are compiled in owned
|
|
15
|
+
temporary storage from repository source and are never executed.
|
|
16
|
+
|
|
17
|
+
`bridge/pwntools/layout.py` is an owned allocation-failure bootstrap;
|
|
18
|
+
`layout_impl.py` is the adapter. It reads original tables through
|
|
19
|
+
unchanged upstream APIs, preserves raw name bytes/ranges, and serializes uint64
|
|
20
|
+
values as strings. It never accesses `ELF.libs`, `ELF.maps`, `ELF.libc` or
|
|
21
|
+
`process.corefile`, which have materially different execution authority.
|
|
22
|
+
|
|
23
|
+
The real verification lane traces host exec syscalls, checks original artifact
|
|
24
|
+
hashes and observes released owned processes. No negative claim relies only on
|
|
25
|
+
an unmodified target's sentinel: upstream can execute a patched copy when its
|
|
26
|
+
runtime-library accessors are used.
|
|
27
|
+
|
|
28
|
+
The instance-local adapter subclass forwards the documented pyelftools 0.33
|
|
29
|
+
`iter_segments(type=...)` / `iter_sections(type=...)` filters missing from
|
|
30
|
+
pwntools 4.15.0 cached overrides. No upstream file or global method is changed.
|
|
31
|
+
Sectionless dynamic string tables use unique DT_STRTAB/DT_STRSZ mappings to
|
|
32
|
+
file-backed PT_LOAD bytes; ambiguous or non-file-backed mappings are explicitly
|
|
33
|
+
unsupported. Section-name table escapes follow the [ELF ABI](https://gabi.xinuos.com/elf/02-eheader.html):
|
|
34
|
+
SHN_XINDEX represents actual indices at least 0xff00; ordinary absence uses index
|
|
35
|
+
zero. Raw name offsets remain reported when the name table is absent.
|
|
36
|
+
|
|
37
|
+
PLT convenience inference uses the unchanged upstream Unicorn instruction
|
|
38
|
+
emulator. REA labels those maps as derived static evidence. The no-execution
|
|
39
|
+
verification claim concerns launching the selected object as a host process,
|
|
40
|
+
not the absence of static instruction emulation inside an analysis engine.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { realpath } from "node:fs/promises";
|
|
2
|
-
import { scanCanonicalArtifactInventory, } from "./ArtifactInventory.js";
|
|
3
|
-
/** Resolve, authorize, and scan one artifact without a second path resolution. */
|
|
4
|
-
export const scanAuthorizedArtifactInventory = async (inputPath, options = {}) => {
|
|
5
|
-
const path = await realpath(inputPath);
|
|
6
|
-
return scanCanonicalArtifactInventory(path, options);
|
|
7
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { compareCodePoints } from "../domain/canonicalOrdering.js";
|
|
2
|
-
import { JAVASCRIPT_SEMANTIC_RELATION_FAMILIES } from "../domain/javascriptSemanticGraphSchemas.js";
|
|
3
|
-
/** Find the innermost callable that contains one exact source range. */
|
|
4
|
-
export const owningSemanticCallableNode = (location, ir, nodes) => {
|
|
5
|
-
if (location === null)
|
|
6
|
-
return undefined;
|
|
7
|
-
return ir.callables
|
|
8
|
-
.filter((callable) => contains(callable.location, location))
|
|
9
|
-
.sort((left, right) => compareCodePoints(positionKey(right.location), positionKey(left.location)))
|
|
10
|
-
.map(({ callableId }) => nodes.get(callableId))
|
|
11
|
-
.find((node) => node !== undefined);
|
|
12
|
-
};
|
|
13
|
-
/** Find retained semantic nodes whose exact ranges are within one expression. */
|
|
14
|
-
export const semanticNodesWithinRange = (nodes, range) => nodes.filter((node) => node.identity.source_range !== null &&
|
|
15
|
-
contains(range, node.identity.source_range));
|
|
16
|
-
/** Report extractor support without treating missing families as absence. */
|
|
17
|
-
export const semanticFamilyStatus = (family, analysis) => {
|
|
18
|
-
if (![
|
|
19
|
-
"call-flow",
|
|
20
|
-
"boundary",
|
|
21
|
-
"child-process",
|
|
22
|
-
"closure",
|
|
23
|
-
"configuration",
|
|
24
|
-
"data-flow",
|
|
25
|
-
"event",
|
|
26
|
-
"object-flow",
|
|
27
|
-
"promise-ownership",
|
|
28
|
-
"request",
|
|
29
|
-
"resource-lifecycle",
|
|
30
|
-
"timer",
|
|
31
|
-
].includes(family))
|
|
32
|
-
return "unsupported";
|
|
33
|
-
return analysis.truncated_scopes === 0 ? "partial" : "unknown";
|
|
34
|
-
};
|
|
35
|
-
const contains = (outer, inner) => pointCompare(outer.start, inner.start) <= 0 &&
|
|
36
|
-
pointCompare(outer.end, inner.end) >= 0;
|
|
37
|
-
const pointCompare = (left, right) => left.line - right.line || left.column - right.column;
|
|
38
|
-
const positionKey = (range) => `${String(range.start.line).padStart(12, "0")}:${String(range.start.column).padStart(12, "0")}`;
|
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
import { createHash, randomUUID } from "node:crypto";
|
|
2
|
-
import { createReadStream } from "node:fs";
|
|
3
|
-
import { mkdtemp, rm } from "node:fs/promises";
|
|
4
|
-
import { tmpdir } from "node:os";
|
|
5
|
-
import { join } from "node:path";
|
|
6
|
-
import { digestProcessCommitment, processComparisonContract, processScenarioCommitment, } from "../domain/processCapture.js";
|
|
7
|
-
import { PRODUCT_IDENTITY } from "../identity.js";
|
|
8
|
-
import { snapshotRoots } from "./FilesystemSnapshot.js";
|
|
9
|
-
import { classifyFilesystemEffects } from "./ProcessFilesystemEffects.js";
|
|
10
|
-
import { cleanupOwnedProcessGroup } from "../process/ProcessOwnership.js";
|
|
11
|
-
import { observeOwnedProcessGroup } from "../process/ProcessOwnershipObservation.js";
|
|
12
|
-
import { ProcessCaptureError } from "./ProcessCaptureError.js";
|
|
13
|
-
import { assertNotCancelled } from "./ProcessScenarioRuntimeValidation.js";
|
|
14
|
-
import { normalizeProcessElapsedTime, normalizeProcessSamples, normalizeProcessText, } from "./ProcessNormalization.js";
|
|
15
|
-
import { PROCESS_PROVIDER } from "./ProcessEvidence.js";
|
|
16
|
-
import { TerminalRenderer } from "./TerminalRenderer.js";
|
|
17
|
-
import { scheduleProcessInterval } from "./ProcessTimer.js";
|
|
18
|
-
/** Wait for trailing PTY callbacks before the capture becomes immutable. */
|
|
19
|
-
export const settleProcessCaptureJournal = async (journal, quietMs = 25, maxWaitMs = 500) => {
|
|
20
|
-
const deadline = Date.now() + maxWaitMs;
|
|
21
|
-
let observed = journal.length;
|
|
22
|
-
let lastChangeAt = Date.now();
|
|
23
|
-
while (Date.now() < deadline) {
|
|
24
|
-
await new Promise((resolve) => setTimeout(resolve, 4));
|
|
25
|
-
if (journal.length !== observed) {
|
|
26
|
-
observed = journal.length;
|
|
27
|
-
lastChangeAt = Date.now();
|
|
28
|
-
}
|
|
29
|
-
else if (Date.now() - lastChangeAt >= quietMs)
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
export const buildCaptureResult = (options) => {
|
|
34
|
-
const hasSensitiveScriptedInput = options.scenario.events.some((event) => event.type === "input" && event.sensitive);
|
|
35
|
-
const sensitiveInputUnknown = "Sensitive scripted input values are redacted from process capture Evidence.";
|
|
36
|
-
const filesystemObservationUnknown = "No filesystem observation paths were selected; filesystem effects remain unknown.";
|
|
37
|
-
const hasFilesystemObservations = options.scenario.filesystem_observation_paths.length > 0;
|
|
38
|
-
return {
|
|
39
|
-
manifest: options.manifest,
|
|
40
|
-
normalization: options.scenario.normalization,
|
|
41
|
-
frames: options.frames,
|
|
42
|
-
rendered_frames: options.renderedFrames,
|
|
43
|
-
interaction_events: options.interactions,
|
|
44
|
-
exit: {
|
|
45
|
-
code: options.exit.reason === "exited" && options.exit.exitCode >= 0
|
|
46
|
-
? options.exit.exitCode
|
|
47
|
-
: null,
|
|
48
|
-
signal: options.exit.signal ?? null,
|
|
49
|
-
reason: options.exit.reason,
|
|
50
|
-
},
|
|
51
|
-
settlement: options.settlement,
|
|
52
|
-
process_samples: normalizeProcessSamples(options.samples, options.scenario, options.rootPid),
|
|
53
|
-
filesystem_checkpoints: options.checkpoints,
|
|
54
|
-
event_journal: options.eventJournal,
|
|
55
|
-
files_before: options.before.files,
|
|
56
|
-
files_after: options.after.files,
|
|
57
|
-
filesystem_effects: classifyFilesystemEffects(options.before.files, options.after.files),
|
|
58
|
-
truncated: options.truncated,
|
|
59
|
-
limitations: [
|
|
60
|
-
"Process trees are sampled and may omit short-lived descendants.",
|
|
61
|
-
...(options.samplingPartial
|
|
62
|
-
? ["Process-tree sampling ended with an incomplete observation."]
|
|
63
|
-
: []),
|
|
64
|
-
"Filesystem observations are before/after snapshots, not syscall traces.",
|
|
65
|
-
"Inherited host environment variables are not recorded and may affect results.",
|
|
66
|
-
...(!hasFilesystemObservations ? [filesystemObservationUnknown] : []),
|
|
67
|
-
...(hasSensitiveScriptedInput ? [sensitiveInputUnknown] : []),
|
|
68
|
-
],
|
|
69
|
-
residual_unknowns: [
|
|
70
|
-
{
|
|
71
|
-
scope: "process",
|
|
72
|
-
reason: "Process trees are sampled and may omit short-lived descendants.",
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
scope: "environment",
|
|
76
|
-
reason: "Inherited host environment variables are not recorded.",
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
scope: "network",
|
|
80
|
-
reason: "Network activity is not observed by this capture.",
|
|
81
|
-
},
|
|
82
|
-
...(!hasFilesystemObservations
|
|
83
|
-
? [
|
|
84
|
-
{
|
|
85
|
-
scope: "filesystem",
|
|
86
|
-
reason: filesystemObservationUnknown,
|
|
87
|
-
},
|
|
88
|
-
]
|
|
89
|
-
: []),
|
|
90
|
-
...(hasSensitiveScriptedInput
|
|
91
|
-
? [{ scope: "interaction", reason: sensitiveInputUnknown }]
|
|
92
|
-
: []),
|
|
93
|
-
],
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
const hashFile = async (path) => {
|
|
97
|
-
const hash = createHash("sha256");
|
|
98
|
-
for await (const chunk of createReadStream(path))
|
|
99
|
-
hash.update(chunk);
|
|
100
|
-
return hash.digest("hex");
|
|
101
|
-
};
|
|
102
|
-
export const createRunManifest = async (scenario, startedAt, completedAt, host = {
|
|
103
|
-
platform: process.platform,
|
|
104
|
-
architecture: process.arch,
|
|
105
|
-
}) => {
|
|
106
|
-
const executableSha256 = await hashFile(scenario.executable);
|
|
107
|
-
const scenarioCommitment = processScenarioCommitment(scenario, executableSha256);
|
|
108
|
-
const comparisonContract = processComparisonContract(scenario);
|
|
109
|
-
return {
|
|
110
|
-
rea_version: PRODUCT_IDENTITY.packageVersion,
|
|
111
|
-
provider_version: PROCESS_PROVIDER.version,
|
|
112
|
-
platform: host.platform,
|
|
113
|
-
architecture: host.architecture,
|
|
114
|
-
pty_backend: "node-pty",
|
|
115
|
-
started_at: startedAt.toISOString(),
|
|
116
|
-
completed_at: completedAt.toISOString(),
|
|
117
|
-
scenario: scenarioCommitment,
|
|
118
|
-
comparison_contract: comparisonContract,
|
|
119
|
-
full_scenario_sha256: digestProcessCommitment(scenarioCommitment),
|
|
120
|
-
comparison_contract_sha256: digestProcessCommitment(comparisonContract),
|
|
121
|
-
executable_sha256: executableSha256,
|
|
122
|
-
normalization_sha256: digestProcessCommitment(scenario.normalization),
|
|
123
|
-
};
|
|
124
|
-
};
|
|
125
|
-
export const observeSettlement = async (runId, processGroupIds, settleMs, recordEvent = () => undefined, platform = process.platform) => {
|
|
126
|
-
if (platform === "win32") {
|
|
127
|
-
recordEvent("lifecycle", 1);
|
|
128
|
-
return { state: "unverifiable", elapsed_ms: 0 };
|
|
129
|
-
}
|
|
130
|
-
const started = Date.now();
|
|
131
|
-
let consecutiveEmpty = 0;
|
|
132
|
-
let deadlineReached = false;
|
|
133
|
-
while (!deadlineReached) {
|
|
134
|
-
const observations = await Promise.all([...new Set(processGroupIds)].map((processGroupId) => observeOwnedProcessGroup({
|
|
135
|
-
runId,
|
|
136
|
-
leaderPid: processGroupId,
|
|
137
|
-
processGroupId,
|
|
138
|
-
})));
|
|
139
|
-
if (observations.some(({ state }) => state === "unverifiable")) {
|
|
140
|
-
recordEvent("lifecycle", 1);
|
|
141
|
-
return { state: "unverifiable", elapsed_ms: Date.now() - started };
|
|
142
|
-
}
|
|
143
|
-
if (observations.every(({ state }) => state === "empty")) {
|
|
144
|
-
consecutiveEmpty += 1;
|
|
145
|
-
if (consecutiveEmpty >= 2) {
|
|
146
|
-
recordEvent("lifecycle", 1);
|
|
147
|
-
return { state: "quiesced", elapsed_ms: Date.now() - started };
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
else
|
|
151
|
-
consecutiveEmpty = 0;
|
|
152
|
-
deadlineReached = Date.now() - started >= settleMs;
|
|
153
|
-
if (deadlineReached)
|
|
154
|
-
break;
|
|
155
|
-
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
156
|
-
}
|
|
157
|
-
recordEvent("lifecycle", 1);
|
|
158
|
-
return { state: "alive_at_deadline", elapsed_ms: Date.now() - started };
|
|
159
|
-
};
|
|
160
|
-
export const awaitTerminalExit = async ({ terminal, scenario, started, lastOutput, signal, timers, interactions, dispatchedEventIndexes, recordEvent, }) => new Promise((resolveExit) => {
|
|
161
|
-
// The kill caused by a deadline is observed later as an ordinary PTY exit.
|
|
162
|
-
// Keep the initiating lifecycle reason so comparisons distinguish a target
|
|
163
|
-
// exit from harness-owned timeout, idle-timeout, and cancellation cleanup.
|
|
164
|
-
let reason = "exited";
|
|
165
|
-
terminal.onExit((exit) => {
|
|
166
|
-
recordEvent("lifecycle", 0);
|
|
167
|
-
for (const [eventIndex, event] of scenario.events.entries()) {
|
|
168
|
-
if (dispatchedEventIndexes.has(eventIndex))
|
|
169
|
-
continue;
|
|
170
|
-
const sequence = interactions.length;
|
|
171
|
-
interactions.push({
|
|
172
|
-
sequence,
|
|
173
|
-
scheduled_at_ms: event.at_ms,
|
|
174
|
-
dispatched_at_ms: Math.max(0, Date.now() - started),
|
|
175
|
-
type: event.type,
|
|
176
|
-
data: event.type === "input"
|
|
177
|
-
? "<not-dispatched>"
|
|
178
|
-
: event.type === "resize"
|
|
179
|
-
? `${String(event.columns)}x${String(event.rows)}`
|
|
180
|
-
: event.signal,
|
|
181
|
-
outcome: "target_exited",
|
|
182
|
-
});
|
|
183
|
-
recordEvent("interaction_events", sequence);
|
|
184
|
-
}
|
|
185
|
-
for (const timer of timers) {
|
|
186
|
-
timer.cancel();
|
|
187
|
-
}
|
|
188
|
-
timers.clear();
|
|
189
|
-
resolveExit({ ...exit, reason });
|
|
190
|
-
});
|
|
191
|
-
const timeout = scheduleProcessInterval(() => {
|
|
192
|
-
if (signal?.aborted === true) {
|
|
193
|
-
reason = "cancelled";
|
|
194
|
-
terminal.kill("SIGKILL");
|
|
195
|
-
}
|
|
196
|
-
else if (Date.now() - started >= scenario.timeout_ms) {
|
|
197
|
-
reason = "timeout";
|
|
198
|
-
terminal.kill("SIGKILL");
|
|
199
|
-
}
|
|
200
|
-
else if (Date.now() - lastOutput() >= scenario.idle_timeout_ms) {
|
|
201
|
-
reason = "idle_timeout";
|
|
202
|
-
terminal.kill("SIGKILL");
|
|
203
|
-
}
|
|
204
|
-
}, 20);
|
|
205
|
-
timers.add(timeout);
|
|
206
|
-
});
|
|
207
|
-
const processCaptureCleanupHost = {
|
|
208
|
-
platform: process.platform,
|
|
209
|
-
cleanupProcessGroup: cleanupOwnedProcessGroup,
|
|
210
|
-
removeTemporaryRoot: (path) => rm(path, { recursive: true, force: true }),
|
|
211
|
-
};
|
|
212
|
-
export const releaseProcessResources = async (options) => {
|
|
213
|
-
const host = options.host ?? processCaptureCleanupHost;
|
|
214
|
-
for (const timer of options.timers)
|
|
215
|
-
timer.cancel();
|
|
216
|
-
let failure;
|
|
217
|
-
try {
|
|
218
|
-
await options.renderer?.dispose();
|
|
219
|
-
}
|
|
220
|
-
catch (cause) {
|
|
221
|
-
void cause;
|
|
222
|
-
failure ??= "terminal renderer cleanup failed";
|
|
223
|
-
}
|
|
224
|
-
if (options.terminal !== undefined && host.platform !== "win32") {
|
|
225
|
-
for (const processGroupId of new Set(options.capturedProcessGroupIds)) {
|
|
226
|
-
const cleaned = await host.cleanupProcessGroup({
|
|
227
|
-
runId: options.runId,
|
|
228
|
-
leaderPid: processGroupId,
|
|
229
|
-
processGroupId,
|
|
230
|
-
});
|
|
231
|
-
if (!cleaned.cleaned)
|
|
232
|
-
failure ??= cleaned.reason;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
try {
|
|
236
|
-
await host.removeTemporaryRoot(options.temporaryRoot);
|
|
237
|
-
}
|
|
238
|
-
catch (cause) {
|
|
239
|
-
void cause;
|
|
240
|
-
failure ??= "temporary process root cleanup failed";
|
|
241
|
-
}
|
|
242
|
-
return failure;
|
|
243
|
-
};
|
|
244
|
-
export const captureTerminalFrames = (options) => {
|
|
245
|
-
let outputBytes = 0;
|
|
246
|
-
let truncated = false;
|
|
247
|
-
options.terminal.onData((data) => {
|
|
248
|
-
options.onOutput();
|
|
249
|
-
const bytes = Buffer.byteLength(data);
|
|
250
|
-
if (outputBytes + bytes > options.scenario.limits.output_bytes) {
|
|
251
|
-
truncated = true;
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
outputBytes += bytes;
|
|
255
|
-
const atMs = normalizeProcessElapsedTime(Date.now() - options.started, options.scenario.normalization.time_bucket_ms);
|
|
256
|
-
const normalized = normalizeProcessText(data, options.scenario, options.temporaryRoot, options.terminal.pid);
|
|
257
|
-
const sequence = options.frames.length;
|
|
258
|
-
options.frames.push({
|
|
259
|
-
sequence,
|
|
260
|
-
at_ms: atMs,
|
|
261
|
-
data: normalized,
|
|
262
|
-
});
|
|
263
|
-
options.renderer.write(data, atMs);
|
|
264
|
-
options.recordEvent("frames", sequence);
|
|
265
|
-
});
|
|
266
|
-
return () => truncated;
|
|
267
|
-
};
|
|
268
|
-
export const resolveProcessResult = (capture, executionFailure, cleanupFailure) => {
|
|
269
|
-
if (executionFailure instanceof ProcessCaptureError)
|
|
270
|
-
throw executionFailure;
|
|
271
|
-
if (executionFailure !== undefined)
|
|
272
|
-
throw new ProcessCaptureError("process capture failed", {
|
|
273
|
-
cause: executionFailure,
|
|
274
|
-
});
|
|
275
|
-
if (cleanupFailure !== undefined)
|
|
276
|
-
throw new ProcessCaptureError(cleanupFailure, {
|
|
277
|
-
reason: "cleanup_incomplete",
|
|
278
|
-
});
|
|
279
|
-
if (capture === undefined)
|
|
280
|
-
throw new ProcessCaptureError("process capture produced no result");
|
|
281
|
-
return capture;
|
|
282
|
-
};
|
|
283
|
-
export const prepareProcessCapture = async (scenario, signal, host = systemProcessPreparationHost) => {
|
|
284
|
-
assertNotCancelled(signal);
|
|
285
|
-
const before = await snapshotRoots(scenario, signal);
|
|
286
|
-
const temporaryRoot = await host.createTemporaryRoot();
|
|
287
|
-
try {
|
|
288
|
-
const runId = randomUUID();
|
|
289
|
-
return { temporaryRoot, runId, before };
|
|
290
|
-
}
|
|
291
|
-
catch (cause) {
|
|
292
|
-
await host.cleanup(temporaryRoot);
|
|
293
|
-
throw cause;
|
|
294
|
-
}
|
|
295
|
-
};
|
|
296
|
-
const systemProcessPreparationHost = {
|
|
297
|
-
createTemporaryRoot: () => mkdtemp(join(tmpdir(), "rea-process-")),
|
|
298
|
-
cleanup: (path) => rm(path, { recursive: true, force: true }),
|
|
299
|
-
};
|