rea-agents 6.3.0 → 6.5.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/DISCLAIMER.md +136 -0
- package/README.md +72 -18
- package/THIRD_PARTY_NOTICES.md +134 -0
- package/bridge/android/ReaJadxBridge.java +123 -11
- package/bridge/cutter/rea_bridge.py +816 -0
- package/bridge/ghidra/ReaGhidraAnalysisOptions.java +38 -0
- package/bridge/ghidra/ReaGhidraApplySeeds.java +151 -0
- package/bridge/ghidra/ReaGhidraBridge.java +1729 -283
- package/bridge/ghidra/ReaGhidraBundleActivator.java +14 -0
- package/bridge/ghidra/ReaGhidraMipsSoftFloat.java +176 -0
- package/bridge/ghidra/ReaGhidraNoReturnFix.java +123 -0
- package/bridge/ghidra/ReaGhidraPrepareRaw.java +49 -0
- package/bridge/hopper_bridge.py +103 -69
- package/bridge/mitmproxy/capture.py +189 -13
- package/bridge/native/rea_lldb_tracer.py +40 -6
- package/bridge/process/ProcessRunTokenReader.swift +76 -34
- package/bridge/pwntools/layout_impl.py +5 -0
- package/bridge/pwntools/recorded_crash_impl.py +31 -10
- package/dist/adb/AdbConfiguration.js +100 -0
- package/dist/adb/AdbDeviceOutput.js +208 -0
- package/dist/adb/AdbDirectoryListing.js +80 -0
- package/dist/adb/AdbHostFileName.js +34 -0
- package/dist/adb/AdbProvider.js +1433 -0
- package/dist/adb/AdbShellOutput.js +307 -0
- package/dist/android/AndroidTargetSnapshot.js +104 -22
- package/dist/android/JadxAnalysis.js +32 -7
- package/dist/android/JadxConfiguration.js +163 -53
- package/dist/android/JadxDoctor.js +115 -0
- package/dist/android/JadxMcpTransport.js +5 -3
- package/dist/android/JadxProtocol.js +14 -0
- package/dist/android/JadxProvider.js +63 -25
- package/dist/android/JadxRelease.js +12 -1
- package/dist/android/JadxWorkspaceRoot.js +157 -0
- package/dist/apktool/ApktoolConfiguration.js +227 -0
- package/dist/apktool/ApktoolDecodeOutput.js +142 -0
- package/dist/apktool/ApktoolProvider.js +543 -0
- package/dist/application/AnalysisContextQueries.js +5 -8
- package/dist/application/AnalysisProvider.js +24 -14
- package/dist/application/AppBundleExecutable.js +30 -25
- package/dist/application/BinaryTargetResolver.js +210 -33
- package/dist/application/BrowserEvidence.js +1 -1
- package/dist/application/BrowserObservationService.js +13 -2
- package/dist/application/BrowserScenarioCaptureService.js +0 -1
- package/dist/application/CallPathTracing.js +52 -13
- package/dist/application/CapabilityInventory.js +179 -29
- package/dist/application/ClaudeDesktopConfigLocation.js +152 -0
- package/dist/application/ClientConfigurationDocument.js +154 -7
- package/dist/application/ClientConfigurationFiles.js +128 -0
- package/dist/application/ClientRegistrationEnvironment.js +41 -0
- package/dist/application/ClientRegistrationIdentity.js +94 -29
- package/dist/application/ClientRegistrationStatus.js +223 -67
- package/dist/application/DirectAnalysis.js +86 -31
- package/dist/application/DirectAnalysisCleanup.js +1 -1
- package/dist/application/DirectAnalysisStatus.js +14 -2
- package/dist/application/Doctor.js +117 -34
- package/dist/application/DoctorDiagnostics.js +34 -12
- package/dist/application/DoctorProviderIds.js +2 -0
- package/dist/application/DoctorScope.js +11 -2
- package/dist/application/DshCordisPatch.js +355 -0
- package/dist/application/DshCordisYaml.js +155 -0
- package/dist/application/EnhancedLiteralTracing.js +30 -16
- package/dist/application/EnhancedToolTypes.js +0 -1
- package/dist/application/EnhancedTools.js +164 -54
- package/dist/application/EvidenceBundleCommands.js +36 -19
- package/dist/application/EvidenceBundleFiles.js +29 -7
- package/dist/application/FunctionAnalysisEvidence.js +3 -0
- package/dist/application/GeminiClientSettings.js +151 -0
- package/dist/application/HermesClientHome.js +115 -0
- package/dist/application/HermesConfigurationYaml.js +272 -0
- package/dist/application/HopperDownload.js +39 -0
- package/dist/application/InventoryProjectionEvidence.js +0 -1
- package/dist/application/InvestigationProviders.js +19 -3
- package/dist/application/JsonFiles.js +114 -23
- package/dist/application/JsonInputFile.js +410 -0
- package/dist/application/LinuxHopper.js +130 -60
- package/dist/application/MacHopper.js +177 -150
- package/dist/application/MacHopperPaths.js +40 -0
- package/dist/application/MipsElfMetadata.js +201 -0
- package/dist/application/MipsElfSharedLoad.js +164 -0
- package/dist/application/MipsGnuAttributes.js +90 -0
- package/dist/application/MsixPackageStorage.js +133 -0
- package/dist/application/ProgressReporter.js +1 -1
- package/dist/application/ProviderOperationExecution.js +39 -0
- package/dist/application/ReconstructionCoverageService.js +0 -1
- package/dist/application/ReconstructionObligationCandidates.js +12 -5
- package/dist/application/ReconstructionObligationLedgerDiagnostics.js +2 -2
- package/dist/application/ReconstructionObligationLedgerEvaluation.js +15 -33
- package/dist/application/ReconstructionObligationLedgerProjection.js +3 -72
- package/dist/application/ReconstructionObligationLedgerService.js +3 -1
- package/dist/application/ReconstructionObligationOriginalCases.js +2 -1
- package/dist/application/ReferenceSourceImport.js +94 -31
- package/dist/application/ReferenceSourceImportEntries.js +40 -30
- package/dist/application/ReferenceSourceImportPolicy.js +99 -23
- package/dist/application/ReferenceSourceImportTypes.js +30 -23
- package/dist/application/ReferenceSourceVcsAdapter.js +163 -31
- package/dist/application/RegularFileRead.js +121 -7
- package/dist/application/Setup.js +88 -14
- package/dist/application/SetupClientConfiguration.js +307 -38
- package/dist/application/SetupClients.js +12 -6
- package/dist/application/SetupHost.js +158 -38
- package/dist/application/SetupInstallFailure.js +42 -2
- package/dist/application/SetupPlan.js +83 -57
- package/dist/application/SetupRecoveryBackup.js +66 -0
- package/dist/application/SetupRegistrationEnvironment.js +2 -1
- package/dist/application/SetupSkill.js +354 -88
- package/dist/application/SupportedClients.js +429 -70
- package/dist/application/TypeScriptEmittedSourceCandidates.js +26 -0
- package/dist/application/Uninstall.js +412 -73
- package/dist/application/UninstallFailure.js +14 -0
- package/dist/application/Update.js +54 -25
- package/dist/application/UpdateFailure.js +17 -0
- package/dist/application/UpdateMaintenance.js +25 -47
- package/dist/application/UpdateRuntime.js +141 -27
- package/dist/application/Utf8JsonInput.js +7 -0
- package/dist/application/WebModuleTraceService.js +7 -0
- package/dist/application/WebNetworkCaptureService.js +16 -7
- package/dist/application/WebScriptExportService.js +131 -65
- package/dist/application/WebSourceLocationService.js +22 -3
- package/dist/application/WindowsCapabilities.js +18 -15
- package/dist/application/WorkflowEvidence.js +24 -1
- package/dist/application/adb/AdbDeviceAnalysisPort.js +1 -0
- package/dist/application/adb/AdbDeviceAnalysisService.js +13 -0
- package/dist/application/analysisView/AnalysisViewService.js +122 -6
- package/dist/application/android/AndroidPackageInspection.js +25 -0
- package/dist/application/android/AndroidSearchEvidenceSummary.js +100 -0
- package/dist/application/apktool/ApktoolResourceAnalysisPort.js +1 -0
- package/dist/application/apktool/ApktoolResourceAnalysisService.js +13 -0
- package/dist/application/binary/AnalysisClientCleanup.js +0 -24
- package/dist/application/binary/AnalysisProviderEvaluation.js +1 -1
- package/dist/application/binary/AnalysisProviderRegistry.js +36 -21
- package/dist/application/binary/AnalysisSnapshotCache.js +41 -20
- package/dist/application/binary/AnalysisSnapshotFiles.js +75 -9
- package/dist/application/binary/BinarySession.js +250 -97
- package/dist/application/binary/BinarySessionExecution.js +5 -4
- package/dist/application/binary/BinarySessionOpen.js +13 -6
- package/dist/application/binary/BinarySessionRecords.js +33 -7
- package/dist/application/binary/BinarySessionStatus.js +93 -23
- package/dist/application/binary/BinaryTargetSummary.js +9 -0
- package/dist/application/binary/CompositeProvider.js +71 -28
- package/dist/application/binary/LazyAnalysisProvider.js +3 -1
- package/dist/application/binary/SessionProviderRouter.js +5 -2
- package/dist/application/binaryDiagnostics/BinaryLayoutService.js +13 -2
- package/dist/application/binaryDiagnostics/PeResourcesPort.js +1 -0
- package/dist/application/binaryDiagnostics/PeResourcesService.js +114 -0
- package/dist/application/binaryDiagnostics/RecordedCrashService.js +16 -4
- package/dist/application/captures/PacketCaptureService.js +83 -0
- package/dist/application/closeOwnedWebResources.js +7 -0
- package/dist/application/electron/ElectronFusePort.js +1 -0
- package/dist/application/electron/ElectronFuseService.js +80 -0
- package/dist/application/evm/EvmInterfaceService.js +4 -0
- package/dist/application/firmware/FirmwareAnalysisService.js +3 -0
- package/dist/application/flutter/DartAotInspection.js +26 -0
- package/dist/application/flutter/FlutterBuildAnalysisPort.js +1 -0
- package/dist/application/flutter/FlutterBuildAnalysisService.js +13 -0
- package/dist/application/frida/FridaInstrumentationPort.js +8 -0
- package/dist/application/frida/FridaInstrumentationService.js +310 -0
- package/dist/application/frida/fridaInputErrors.js +17 -0
- package/dist/application/go/GoBinaryPort.js +1 -0
- package/dist/application/go/GoBinaryService.js +80 -0
- package/dist/application/harmony/HarmonyApplicationService.js +17 -0
- package/dist/application/investigation/EvidenceLedger.js +40 -14
- package/dist/application/investigation/InspectEvidenceBundle.js +18 -0
- package/dist/application/investigation/InvestigationRecords.js +12 -21
- package/dist/application/investigation/UnknownEvidence.js +22 -18
- package/dist/application/javascript/ElectronActiveObservationService.js +55 -25
- package/dist/application/javascript/ElectronBoundaryAnalysis.js +17 -3
- package/dist/application/javascript/ElectronBoundaryGraph.js +2 -0
- package/dist/application/javascript/ElectronBoundaryGraphCallPaths.js +144 -0
- package/dist/application/javascript/ElectronBoundaryGraphContext.js +3 -2
- package/dist/application/javascript/ElectronBoundaryGraphIpc.js +28 -9
- package/dist/application/javascript/ElectronBoundaryGraphNative.js +20 -7
- package/dist/application/javascript/ElectronBoundaryGraphWindows.js +50 -12
- package/dist/application/javascript/ElectronObservationService.js +0 -1
- package/dist/application/javascript/JavaScriptApplicationEvidence.js +15 -0
- package/dist/application/javascript/JavaScriptApplicationService.js +44 -18
- package/dist/application/javascript/JavaScriptApplicationWorkflowEvidence.js +5 -6
- package/dist/application/javascript/JavaScriptApplicationWorkflowService.js +0 -1
- package/dist/application/javascript/JavaScriptArtifactAnalysis.js +253 -60
- package/dist/application/javascript/JavaScriptArtifactGraphAccumulator.js +51 -23
- package/dist/application/javascript/JavaScriptArtifactGraphBuilder.js +93 -21
- package/dist/application/javascript/JavaScriptArtifactGraphBundlers.js +4 -3
- package/dist/application/javascript/JavaScriptArtifactGraphContext.js +35 -8
- package/dist/application/javascript/JavaScriptArtifactGraphDocuments.js +25 -14
- package/dist/application/javascript/JavaScriptArtifactGraphFindings.js +163 -54
- package/dist/application/javascript/JavaScriptArtifactGraphStructure.js +246 -15
- package/dist/application/javascript/JavaScriptArtifactPathResolution.js +1057 -323
- package/dist/application/javascript/JavaScriptArtifactReconstruction.js +134 -32
- package/dist/application/javascript/JavaScriptArtifactReconstructionInput.js +6 -1
- package/dist/application/javascript/JavaScriptModuleRelationships.js +39 -15
- package/dist/application/javascript/JavaScriptRecoveryService.js +32 -9
- package/dist/application/javascript/JavaScriptRuntimeObservationService.js +2 -1
- package/dist/application/javascript/JavaScriptRuntimeReconciliationService.js +0 -1
- package/dist/application/javascript/JavaScriptSemanticGraphAsyncProjection.js +9 -3
- package/dist/application/javascript/JavaScriptSemanticGraphBuilder.js +228 -74
- package/dist/application/javascript/JavaScriptSemanticGraphConstruction.js +12 -19
- package/dist/application/javascript/JavaScriptSemanticGraphDataProjection.js +4 -1
- package/dist/application/javascript/JavaScriptSemanticGraphElectronProjection.js +67 -0
- package/dist/application/javascript/JavaScriptSemanticGraphFlowProjection.js +5 -3
- package/dist/application/javascript/JavaScriptSemanticGraphObjectProjection.js +5 -3
- package/dist/application/javascript/JavaScriptSemanticGraphValueProjection.js +19 -8
- package/dist/application/javascript/JavaScriptSemanticTraceService.js +0 -1
- package/dist/application/jeb/JebAnalysisPort.js +1 -0
- package/dist/application/jeb/JebAnalysisService.js +13 -0
- package/dist/application/managed/ManagedApplicationGraphService.js +1 -2
- package/dist/application/managed/ManagedMemberComparisonService.js +72 -54
- package/dist/application/managed/ManagedNativeVerificationService.js +0 -1
- package/dist/application/managed/ManagedReconstructionService.js +0 -1
- package/dist/application/native/NativeCallRoutes.js +54 -34
- package/dist/application/native/NativeDispatchMetadataInspection.js +6 -2
- package/dist/application/native/NativeUiActionTrace.js +51 -30
- package/dist/application/native/NativeValueTrace.js +75 -24
- package/dist/application/pcap/PcapAnalysisPort.js +1 -0
- package/dist/application/pcap/PcapAnalysisService.js +24 -0
- package/dist/application/process/ProcessCli.js +57 -32
- package/dist/application/reverse/ReverseEngineeringCommandPort.js +1 -0
- package/dist/application/reverse/ReverseEngineeringService.js +688 -0
- package/dist/application/rust/RustBinaryPort.js +1 -0
- package/dist/application/rust/RustBinaryService.js +80 -0
- package/dist/application/signals/SignalRecordingService.js +83 -0
- package/dist/application/sqlite/SqliteDatabaseCapability.js +30 -0
- package/dist/application/sqlite/SqliteDatabasePort.js +1 -0
- package/dist/application/sqlite/SqliteDatabaseService.js +76 -0
- package/dist/application/wasm/WasmArtifactPort.js +1 -0
- package/dist/application/wasm/WasmArtifactService.js +77 -0
- package/dist/application/wasm/WasmInterfaceComparisonService.js +188 -0
- package/dist/artifacts/ArtifactHash.js +13 -2
- package/dist/artifacts/ArtifactPaths.js +133 -15
- package/dist/artifacts/ArtifactProvider.js +28 -19
- package/dist/artifacts/ArtifactReader.js +35 -0
- package/dist/artifacts/ArtifactResourceScope.js +109 -0
- package/dist/artifacts/AsarArtifactReader.js +295 -156
- package/dist/artifacts/AsarHeader.js +24 -0
- package/dist/artifacts/AsarListing.js +78 -0
- package/dist/artifacts/DirectoryArtifactReader.js +247 -74
- package/dist/artifacts/MachOSliceArtifactReader.js +198 -48
- package/dist/artifacts/NativeDmgArtifactReader.js +188 -78
- package/dist/artifacts/OrderedReads.js +57 -0
- package/dist/artifacts/SafeOutputTree.js +261 -71
- package/dist/artifacts/SafeOutputTreeCleanup.js +45 -0
- package/dist/artifacts/SafeOutputTreeCreationFailure.js +20 -0
- package/dist/artifacts/SafeOutputTreeIdentity.js +42 -0
- package/dist/artifacts/SafeOutputTreeReadback.js +33 -0
- package/dist/artifacts/ZipArtifactReader.js +186 -31
- package/dist/artifacts/apple/AppleAssetCatalogAnalysis.js +77 -68
- package/dist/artifacts/apple/DylibResolutionReader.js +11 -5
- package/dist/artifacts/apple/InterfaceBuilderAnalysis.js +114 -38
- package/dist/artifacts/apple/InterfaceBuilderDecodeBudget.js +125 -35
- package/dist/artifacts/apple/KeyedArchiveReader.js +35 -15
- package/dist/artifacts/apple/MachoLoadCommandReader.js +62 -61
- package/dist/artifacts/apple/NibArchive.js +11 -4
- package/dist/artifacts/apple/PlistNumberLiterals.js +2 -2
- package/dist/artifacts/extraction/ArtifactExtraction.js +115 -92
- package/dist/artifacts/hostExecutableMarking.js +16 -0
- package/dist/artifacts/inventory/ArtifactGraphConstruction.js +236 -69
- package/dist/artifacts/inventory/ArtifactInventory.js +7 -6
- package/dist/artifacts/inventory/classify.js +95 -35
- package/dist/artifacts/inventory/hashStableRootArtifact.js +48 -15
- package/dist/artifacts/inventory/reader.js +40 -17
- package/dist/artifacts/inventory/scanCanonical.js +84 -40
- package/dist/artifacts/inventory/scanReader.js +72 -19
- package/dist/artifacts/javascript/JavaScriptArtifactFiles.js +177 -15
- package/dist/artifacts/javascript/JavaScriptSourceAnalysis.js +3 -0
- package/dist/artifacts/readStableArtifact.js +28 -4
- package/dist/browser/BrowserProcessStartup.js +20 -9
- package/dist/browser/BrowserScenarioPartialObservation.js +60 -38
- package/dist/browser/BrowserScenarioSecrets.js +193 -48
- package/dist/browser/CdpBrowserProvider.js +74 -98
- package/dist/browser/CdpCaptureDocuments.js +261 -65
- package/dist/browser/CdpCaptureDomSvg.js +243 -0
- package/dist/browser/CdpCaptureEventBodyShapes.js +12 -12
- package/dist/browser/CdpCaptureEventHandlers.js +49 -21
- package/dist/browser/CdpCaptureEvents.js +53 -19
- package/dist/browser/CdpCaptureStorage.js +22 -5
- package/dist/browser/CdpCaptureStorageFingerprints.js +54 -11
- package/dist/browser/CdpCaptureValues.js +0 -1
- package/dist/browser/CdpConnection.js +25 -9
- package/dist/browser/CdpElectronInspection.js +14 -4
- package/dist/browser/CdpElectronProvider.js +7 -2
- package/dist/browser/CdpElectronScripts.js +2 -1
- package/dist/browser/CdpElectronWorkers.js +7 -2
- package/dist/browser/CdpEndpoint.js +143 -17
- package/dist/browser/CdpObservationSession.js +24 -8
- package/dist/browser/CdpPageCapture.js +67 -17
- package/dist/browser/CdpPageCaptureScripts.js +4 -3
- package/dist/browser/CdpPageCaptureWorkers.js +5 -1
- package/dist/browser/CdpSafeMetadata.js +9 -5
- package/dist/browser/CdpScreenshot.js +5 -14
- package/dist/browser/CdpSnapshotStrings.js +21 -0
- package/dist/browser/CdpTargetSession.js +59 -36
- package/dist/browser/CdpWebMcpDiscovery.js +55 -16
- package/dist/browser/ElectronFileScope.js +99 -9
- package/dist/browser/PlaywrightBrowserScenarioProvider.js +64 -8
- package/dist/browser/PlaywrightElectronActiveActions.js +4 -4
- package/dist/browser/PlaywrightElectronActiveProjection.js +16 -4
- package/dist/browser/PlaywrightElectronActiveProvider.js +114 -36
- package/dist/browser/PlaywrightExecutionBoundary.js +2 -2
- package/dist/browser/PlaywrightScenarioArtifacts.js +5 -5
- package/dist/browser/PlaywrightScenarioBrowser.js +78 -13
- package/dist/browser/PlaywrightScenarioEvents.js +198 -36
- package/dist/browser/PlaywrightScenarioServiceWorkers.js +249 -0
- package/dist/browser/PlaywrightScenarioSession.js +180 -75
- package/dist/browser/PlaywrightScenarioStorage.js +507 -0
- package/dist/browser/PngVisualDiff.js +198 -29
- package/dist/browser/WebSourceMapFetcher.js +164 -81
- package/dist/browser/assets/LocalWebScriptArtifacts.js +27 -4
- package/dist/browser/assets/PublishWebScripts.js +88 -22
- package/dist/browser/assets/ScenarioScriptCapture.js +2 -1
- package/dist/browser/assets/WebArtifactReads.js +34 -4
- package/dist/browser/assets/WebSourceLocationArtifacts.js +39 -3
- package/dist/browser/execution/CdpExecutionCapture.js +3 -3
- package/dist/browser/execution/CdpPreciseCoverage.js +5 -8
- package/dist/browser/history/CaptureFailures.js +22 -8
- package/dist/browser/history/CaptureFormatError.js +2 -2
- package/dist/browser/history/{HarJson.js → CaptureJson.js} +14 -4
- package/dist/browser/history/CaptureRedaction.js +16 -3
- package/dist/browser/history/CaptureRelease.js +20 -2
- package/dist/browser/history/HarCapture.js +16 -9
- package/dist/browser/history/HarSchema.js +36 -36
- package/dist/browser/history/HistoricalCaptureDecoder.js +93 -25
- package/dist/browser/history/MitmproxyCaptureAdapter.js +3 -1
- package/dist/browser/history/NodeCaptureAdapter.js +48 -0
- package/dist/browser/history/{HarCaptureProcess.js → NodeCaptureProcess.js} +16 -15
- package/dist/browser/history/QlogCapture.js +385 -0
- package/dist/browser/history/SazCapture.js +130 -0
- package/dist/browser/history/SazHttp.js +61 -0
- package/dist/browser/history/SazMetadata.js +92 -0
- package/dist/browser/history/SazProjection.js +90 -0
- package/dist/browser/modules/NativeModuleResolver.js +177 -110
- package/dist/browser/modules/WebModuleArtifacts.js +41 -3
- package/dist/browser/network/PlaywrightNetworkContent.js +40 -5
- package/dist/browser/network/PlaywrightScenarioNetwork.js +125 -11
- package/dist/captures/TsharkCaptureProvider.js +370 -0
- package/dist/captures/parseFieldDiscovery.js +66 -0
- package/dist/captures/parsePacketOutput.js +21 -0
- package/dist/catalogIdentity.js +46 -35
- package/dist/cli/adbCommands.js +337 -0
- package/dist/cli/analysisViewCommands.js +39 -1
- package/dist/cli/androidCommands.js +11 -2
- package/dist/cli/apktoolCommands.js +52 -0
- package/dist/cli/applicationCommands.js +44 -17
- package/dist/cli/artifactCommands.js +9 -12
- package/dist/cli/binaryDiagnosticsCommands.js +27 -5
- package/dist/cli/browserAdvancedCommands.js +97 -55
- package/dist/cli/browserCommands.js +46 -29
- package/dist/cli/captureCommands.js +72 -0
- package/dist/cli/cliResultOutput.js +188 -0
- package/dist/cli/coreBinaryCommands.js +73 -32
- package/dist/cli/coreNativeCommands.js +54 -45
- package/dist/cli/cutterCommands.js +50 -0
- package/dist/cli/electronCommands.js +51 -4
- package/dist/cli/evmCommands.js +16 -8
- package/dist/cli/finishAnalysisCommand.js +44 -0
- package/dist/cli/firmwareCommands.js +21 -38
- package/dist/cli/flutterCommands.js +69 -0
- package/dist/cli/fridaCommands.js +211 -0
- package/dist/cli/goCommands.js +20 -0
- package/dist/cli/interactiveSetup.js +11 -1
- package/dist/cli/javascriptApplicationAnalysis.js +18 -2
- package/dist/cli/javascriptRecoveryCommands.js +29 -15
- package/dist/cli/jebCommands.js +99 -0
- package/dist/cli/jsonOutput.js +13 -6
- package/dist/cli/managedCommands.js +31 -3
- package/dist/cli/options.js +20 -2
- package/dist/cli/pcapCommands.js +47 -0
- package/dist/cli/processCommands.js +1 -1
- package/dist/cli/referenceSourceImportStatus.js +7 -0
- package/dist/cli/reverseEngineeringCommands.js +268 -0
- package/dist/cli/rustCommands.js +21 -0
- package/dist/cli/setupCommands.js +55 -15
- package/dist/cli/signalCommands.js +72 -0
- package/dist/cli/sqliteCommands.js +79 -0
- package/dist/cli/utilityCommands.js +179 -89
- package/dist/cli/wasmCommands.js +61 -0
- package/dist/cli/webModuleCommands.js +36 -32
- package/dist/cli/webNetworkCaptureCommands.js +8 -8
- package/dist/cli/webScriptCommands.js +20 -1
- package/dist/cli/webSourceLocationCommands.js +21 -9
- package/dist/cli-runtime/AbortablePromise-BVBemxbD.js +123 -0
- package/dist/cli-runtime/AnalysisProvider-D0Us2OTk.js +27 -0
- package/dist/cli-runtime/AnalysisSnapshotCache-BXS0wRd2.js +710 -0
- package/dist/cli-runtime/ArtifactReader-BXkffc1D.js +55 -0
- package/dist/cli-runtime/ArtifactResourceScope-DQWTcUwE.js +114 -0
- package/dist/cli-runtime/AsarHeader-CnzOzYEH.js +31 -0
- package/dist/cli-runtime/BinarySessionStatus-DnMxMk-r.js +211 -0
- package/dist/cli-runtime/BinaryTargetResolver-CVIJ_s1A.js +1308 -0
- package/dist/cli-runtime/BoundedFileBytes-BU30odTm.js +39 -0
- package/dist/cli-runtime/CdpTargetSession-DGX5pV9w.js +650 -0
- package/dist/cli-runtime/ClientConfigPath-c6jr6INc.js +36 -0
- package/dist/cli-runtime/ClientConfigurationDocument-ffQ9X0Se.js +1957 -0
- package/dist/cli-runtime/ClientRegistrationStatus-DszCyPEU.js +509 -0
- package/dist/cli-runtime/CurrentEntrypointPath-D5FRNdkq.js +14 -0
- package/dist/cli-runtime/DirectAnalysis-BgvAtpN3.js +528 -0
- package/dist/cli-runtime/Doctor-DIpf_I7N.js +588 -0
- package/dist/cli-runtime/ElectronFileScope-dpHm2nrS.js +1054 -0
- package/dist/cli-runtime/ExecFileOutput-BEQs-lDD.js +117 -0
- package/dist/cli-runtime/IdaConfiguration-CtGP7EKo.js +1094 -0
- package/dist/cli-runtime/InterfaceBuilderDecodeBudget-D4omRUe4.js +279 -0
- package/dist/cli-runtime/InventoryProjectionEvidence-DIsI4DJ6.js +49 -0
- package/dist/cli-runtime/InvestigationProviders-DoQRIHii.js +117 -0
- package/dist/cli-runtime/JavaScriptApplicationEvidenceGraph-D5aI_FSJ.js +160 -0
- package/dist/cli-runtime/JavaScriptApplicationWorkflowEvidence-Bz4-V0Ct.js +75 -0
- package/dist/cli-runtime/JavaScriptWorkerMemoryLimit-B1bwMM1a.js +86 -0
- package/dist/cli-runtime/JebMcpEndpoint-DUytrn5G.js +428 -0
- package/dist/cli-runtime/JsonFiles-DQa1PRKy.js +708 -0
- package/dist/cli-runtime/MacCodeSignature-MgYbRK_H.js +24 -0
- package/dist/cli-runtime/MacHopperPaths-CwL5lYPX.js +434 -0
- package/dist/cli-runtime/MachoLoadCommandReader-C7e074Ze.js +510 -0
- package/dist/cli-runtime/ManagedSnapshot-rqyBHcdL.js +4185 -0
- package/dist/cli-runtime/OwnedCommand-Cj9GhmPR.js +112 -0
- package/dist/cli-runtime/PrivateRuntimeRoot-DAy0PiBM.js +263 -0
- package/dist/cli-runtime/ProcessOwnership-DXC5-UWt.js +1378 -0
- package/dist/cli-runtime/ProviderDeadline-8m2pFRDc.js +122 -0
- package/dist/cli-runtime/RegularFile-B_6KPCNQ.js +139 -0
- package/dist/cli-runtime/RegularFileRead-DVlC5faM.js +125 -0
- package/dist/cli-runtime/SafeOutputTree-D6U15GXd.js +524 -0
- package/dist/cli-runtime/SetupHost-FkYWswsq.js +1098 -0
- package/dist/cli-runtime/SupportedClients-DaX6Lt2d.js +1049 -0
- package/dist/cli-runtime/UninstallFailure-1blyKXHE.js +22 -0
- package/dist/cli-runtime/Update-CbTC_eg1.js +143 -0
- package/dist/cli-runtime/UpdateFailure-BcFNxEZZ.js +24 -0
- package/dist/cli-runtime/ZipArtifactReader-B8ZgNe4D.js +248 -0
- package/dist/cli-runtime/analysisErrorCleanup-Do6YeeoD.js +32 -0
- package/dist/cli-runtime/analysisErrorPresentation-DGt7TdsH.js +497 -0
- package/dist/cli-runtime/appleArchiveFormat-tVoI2ykA.js +263 -0
- package/dist/cli-runtime/application__DirectAnalysisStatus-DpOejOf0.js +150 -0
- package/dist/cli-runtime/application__EnhancedTools-oFE2bOjs.js +1787 -0
- package/dist/cli-runtime/application__FunctionAnalysisEvidence-B6osuhvW.js +41 -0
- package/dist/cli-runtime/application__ReconstructionCoverageService-DN3wTFQj.js +32 -0
- package/dist/cli-runtime/application__ReconstructionObligationLedgerService-CKcTppX9.js +815 -0
- package/dist/cli-runtime/application__Setup-XpMaRNjy.js +514 -0
- package/dist/cli-runtime/application__Uninstall-_23pU2yB.js +427 -0
- package/dist/cli-runtime/application__UpdateRuntime-DPvY8ohd.js +345 -0
- package/dist/cli-runtime/application__android__AndroidApplicationService-CFgIFPM4.js +31 -0
- package/dist/cli-runtime/application__apple__AppleApplicationService-Db6QCsun.js +31 -0
- package/dist/cli-runtime/application__harmony__HarmonyApplicationService-CFjocHoK.js +31 -0
- package/dist/cli-runtime/application__javascript__ElectronActiveObservationService-CmVDUI_Z.js +118 -0
- package/dist/cli-runtime/application__javascript__ElectronObservationService-DEsR8KDN.js +63 -0
- package/dist/cli-runtime/application__javascript__JavaScriptApplicationService-CCkp8KBh.js +11450 -0
- package/dist/cli-runtime/application__javascript__JavaScriptApplicationWorkflowService-lPy0tzr3.js +2329 -0
- package/dist/cli-runtime/application__javascript__JavaScriptRuntimeReconciliationService-DWleA8K9.js +88 -0
- package/dist/cli-runtime/application__javascript__JavaScriptSemanticTraceService-DkALH4rL.js +299 -0
- package/dist/cli-runtime/artifactOperationError-B7n03FbD.js +27 -0
- package/dist/cli-runtime/artifacts__ArtifactProvider-zXI0QjSL.js +2187 -0
- package/dist/cli-runtime/binary-BVOr2mgE.js +14206 -0
- package/dist/cli-runtime/browserObservationError-Dx6xRTjb.js +40 -0
- package/dist/cli-runtime/catalogIdentity-DLoXgfIR.js +933 -0
- package/dist/cli-runtime/cli.js +41848 -0
- package/dist/cli-runtime/cliOutput-BC1BdAcB.js +122 -0
- package/dist/cli-runtime/cliOutput.js +5 -0
- package/dist/cli-runtime/cliResultOutput-DsRMI8CJ.js +780 -0
- package/dist/cli-runtime/cliResultOutput.js +5 -0
- package/dist/cli-runtime/composition__browserScenario-DHXC1a8n.js +2927 -0
- package/dist/cli-runtime/composition__electronObservation-GecK2EID.js +555 -0
- package/dist/cli-runtime/composition__electronScenario-CEZnVrAL.js +653 -0
- package/dist/cli-runtime/cutterToolContracts-TZH9EHr5.js +5134 -0
- package/dist/cli-runtime/doctorRuntime-BE5ZX8it.js +258 -0
- package/dist/cli-runtime/dotnet__ManagedStaticProvider-C8_yZCDc.js +5 -0
- package/dist/cli-runtime/errorSchemas-CTRmvMl3.js +601 -0
- package/dist/cli-runtime/javascriptApplicationAnalysis-HgMzVMQw.js +2068 -0
- package/dist/cli-runtime/javascriptExportReturnShapeProjection-Dg00g35t.js +78 -0
- package/dist/cli-runtime/javascriptExportShapeComparisonSchemas-BYnoIqIk.js +1242 -0
- package/dist/cli-runtime/javascriptRuntimeReconciliation-DNjDoL3S.js +1507 -0
- package/dist/cli-runtime/javascriptRuntimeReconciliationSchemas-BWpGWNcI.js +247 -0
- package/dist/cli-runtime/javascriptSemanticTraceSchemas-BTCNcvbc.js +126 -0
- package/dist/cli-runtime/lipo-DSWP6fv-.js +396 -0
- package/dist/cli-runtime/logger-CQQCI4a2.js +48 -0
- package/dist/cli-runtime/machoContainer-C8BIkkq3.js +172 -0
- package/dist/cli-runtime/managedApplicationGraph-B08jb3jq.js +1130 -0
- package/dist/cli-runtime/managedToolContracts-D60QmIYj.js +99 -0
- package/dist/cli-runtime/mcpDoctor.js +359 -0
- package/dist/cli-runtime/mcpStartupPolicy-CVVSOmRc.js +21 -0
- package/dist/cli-runtime/native__NativeMacOSProvider-YBTvUeJO.js +4875 -0
- package/dist/cli-runtime/officialToolContracts-CCFF0an9.js +1501 -0
- package/dist/cli-runtime/propertyListKeys-G8e74YWb.js +248 -0
- package/dist/cli-runtime/providerAdapterError-DAjhICdr.js +25 -0
- package/dist/cli-runtime/providerCleanupError-Ceq8f0wK.js +27 -0
- package/dist/cli-runtime/providerIdentities-Ao1XTvwx.js +31 -0
- package/dist/cli-runtime/providerStartupTimeout-B2tF2LtZ.js +17 -0
- package/dist/cli-runtime/readFileHandleChunks-dp60iZ6v.js +38 -0
- package/dist/cli-runtime/reconstructionObligationLedgerSchemas-Bao0xMr-.js +19478 -0
- package/dist/cli-runtime/rolldown-runtime-DXoylpqc.js +121 -0
- package/dist/cli-runtime/runtimeVersion-CMGd0bDu.js +23 -0
- package/dist/cli-runtime/safeJson-DKKACtdy.js +25 -0
- package/dist/cli-runtime/scanCanonical-KP4T9jSl.js +2724 -0
- package/dist/cli-runtime/snapshotEnvironment-D_tWyOub.js +813 -0
- package/dist/cli-runtime/toolContracts-D2FOG_Nb.js +3721 -0
- package/dist/cli-runtime/toolOutputSchemaGroups-DRiYs1je.js +12070 -0
- package/dist/cli-runtime/workflowInputError-n8Oo-bLA.js +26 -0
- package/dist/cli.js +44 -5
- package/dist/cliBrowserScenarioCommands.js +41 -5
- package/dist/cliCommandNames.js +80 -0
- package/dist/cliEvidenceCommands.js +0 -1
- package/dist/cliJavaScriptRuntimeCommands.js +16 -14
- package/dist/cliJsonInput.js +14 -6
- package/dist/cliLogging.js +50 -14
- package/dist/cliObservationOptions.js +9 -0
- package/dist/cliOutput.js +38 -5
- package/dist/composition/adb.js +3 -0
- package/dist/composition/apktool.js +3 -0
- package/dist/composition/binary.js +4 -0
- package/dist/composition/binaryDiagnostics.js +4 -0
- package/dist/composition/captures.js +3 -0
- package/dist/composition/directAnalysis.js +36 -11
- package/dist/composition/electronFuses.js +4 -0
- package/dist/composition/evm.js +12 -0
- package/dist/composition/flutter.js +3 -0
- package/dist/composition/go.js +4 -0
- package/dist/composition/javascriptAnalysisWorkerProcess.js +49 -0
- package/dist/composition/jeb.js +35 -0
- package/dist/composition/pcap.js +3 -0
- package/dist/composition/resolveWindowsProviderExecutable.js +61 -0
- package/dist/composition/reverseEngineering.js +29 -0
- package/dist/composition/rust.js +4 -0
- package/dist/composition/signals.js +3 -0
- package/dist/composition/sqlite.js +4 -0
- package/dist/composition/wasm.js +22 -0
- package/dist/composition/webNetworkCaptures.js +7 -2
- package/dist/config/environment.js +55 -4
- package/dist/config/ghidraDisabledAnalyzers.js +25 -0
- package/dist/config/ghidraLanguageOverride.js +9 -0
- package/dist/config/homeDirectory.js +9 -6
- package/dist/config/mcpInputSchemaProfile.js +31 -0
- package/dist/config/mcpOutputSchemaProfile.js +22 -0
- package/dist/config/parseConfig.js +36 -19
- package/dist/config/parsers.js +4 -3
- package/dist/config/{ghidraStartupTimeout.js → providerStartupTimeout.js} +7 -3
- package/dist/contracts/adb/adbToolContracts.js +353 -0
- package/dist/contracts/advertisedInputExamples.js +48 -0
- package/dist/contracts/analysisDetail.js +13 -0
- package/dist/contracts/analysisViewApiSurfaceExample.js +68 -0
- package/dist/contracts/analysisViewToolContracts.js +39 -3
- package/dist/contracts/android/androidToolContracts.js +17 -8
- package/dist/contracts/apktool/apktoolToolContracts.js +33 -0
- package/dist/contracts/applicationToolContracts.js +17 -2
- package/dist/contracts/artifactToolContracts.js +21 -6
- package/dist/contracts/browserToolContracts.js +2 -1
- package/dist/contracts/captures/captureToolContracts.js +42 -0
- package/dist/contracts/compactInputSchema.js +276 -0
- package/dist/contracts/cutterToolContracts.js +84 -0
- package/dist/contracts/enhancedToolContracts.js +2 -2
- package/dist/contracts/evm/evmToolContracts.js +30 -15
- package/dist/contracts/firmware/firmwareToolContracts.js +1 -1
- package/dist/contracts/flutter/flutterToolContracts.js +47 -0
- package/dist/contracts/fridaRemoteAddress.js +23 -0
- package/dist/contracts/fridaToolContracts.js +273 -0
- package/dist/contracts/functionComparisonExample.js +12 -1
- package/dist/contracts/functionWorkflowToolContracts.js +1 -1
- package/dist/contracts/gdbToolContracts.js +103 -0
- package/dist/contracts/go/goToolContracts.js +20 -0
- package/dist/contracts/hopperMemoryContracts.js +15 -0
- package/dist/contracts/inputSchemaPresentation.js +91 -24
- package/dist/contracts/investigationExamples.js +1 -0
- package/dist/contracts/javascript/electronToolContracts.js +40 -3
- package/dist/contracts/javascript/javascriptRecoveryToolContracts.js +13 -1
- package/dist/contracts/jeb/jebToolContracts.js +64 -0
- package/dist/contracts/managed/managedToolContracts.js +43 -4
- package/dist/contracts/managed/managedWorkflowExamples.js +7 -1
- package/dist/contracts/managed/managedWorkflowToolContracts.js +4 -30
- package/dist/contracts/mobileApplicationGraphExamples.js +12 -0
- package/dist/contracts/native/binaryDiagnosticsToolContracts.js +27 -4
- package/dist/contracts/native/nativeToolContracts.js +10 -6
- package/dist/contracts/officialToolContracts.js +9 -9
- package/dist/contracts/pcap/pcapToolContracts.js +33 -0
- package/dist/contracts/providerSelection.js +1 -0
- package/dist/contracts/reconstructionReadinessExample.js +126 -119
- package/dist/contracts/reverseEngineeringToolContracts.js +52 -0
- package/dist/contracts/rizinDebugToolContracts.js +96 -0
- package/dist/contracts/rust/rustToolContracts.js +20 -0
- package/dist/contracts/sessionLifecycleInputs.js +34 -2
- package/dist/contracts/sessionToolContracts.js +4 -4
- package/dist/contracts/sessionToolSchemas.js +20 -2
- package/dist/contracts/signals/signalToolContracts.js +40 -0
- package/dist/contracts/sqlite/sqliteToolContracts.js +36 -0
- package/dist/contracts/toolContractExamples.js +35 -0
- package/dist/contracts/toolContractTypes.js +5 -0
- package/dist/contracts/toolContracts.js +32 -0
- package/dist/contracts/toolEffects.js +414 -8
- package/dist/contracts/toolOutputSchemaGroups.js +78 -33
- package/dist/contracts/toolOutputSchemaPrimitives.js +111 -10
- package/dist/contracts/toolSchemaMetadata.js +98 -9
- package/dist/contracts/unknownContractExamples.js +1 -1
- package/dist/contracts/wasm/wasmComparisonContracts.js +52 -0
- package/dist/contracts/wasm/wasmToolContracts.js +33 -0
- package/dist/contracts/webNetworkCaptureToolContracts.js +15 -4
- package/dist/cutter/CutterBridgeClient.js +621 -0
- package/dist/cutter/CutterBridgeService.js +139 -0
- package/dist/doctorRuntime.js +20 -8
- package/dist/domain/adb/adbDeviceAnalysis.js +605 -0
- package/dist/domain/analysisErrorBase.js +20 -0
- package/dist/domain/analysisErrorCleanup.js +29 -0
- package/dist/domain/analysisErrorCore.js +19 -0
- package/dist/domain/analysisErrorPresentation.js +75 -22
- package/dist/domain/analysisErrorProjection.js +35 -13
- package/dist/domain/analysisProfile.js +7 -3
- package/dist/domain/analysisSnapshot.js +313 -185
- package/dist/domain/analysisView/WebNetworkApiSurfaceAccumulator.js +414 -0
- package/dist/domain/analysisView/analysisView.js +417 -45
- package/dist/domain/analysisView/analysisViewCoverage.js +32 -0
- package/dist/domain/analysisView/analysisViewErrors.js +4 -0
- package/dist/domain/analysisView/analysisViewParent.js +12 -0
- package/dist/domain/analysisView/analysisViewText.js +29 -0
- package/dist/domain/analysisView/androidPackageView.js +102 -0
- package/dist/domain/analysisView/artifactInventoryView.js +140 -0
- package/dist/domain/analysisView/binaryLayoutView.js +13 -4
- package/dist/domain/analysisView/dartAotView.js +93 -0
- package/dist/domain/analysisView/evmInterfaceView.js +105 -0
- package/dist/domain/analysisView/interfaceBuilderView.js +182 -0
- package/dist/domain/analysisView/javascriptApplicationView.js +29 -26
- package/dist/domain/analysisView/machoView.js +186 -0
- package/dist/domain/analysisView/managedArtifactView.js +108 -0
- package/dist/domain/analysisView/managedMemberView.js +209 -0
- package/dist/domain/analysisView/nativeFunctionView.js +150 -0
- package/dist/domain/analysisView/pcapCaptureView.js +264 -0
- package/dist/domain/analysisView/qlogCaptureView.js +198 -0
- package/dist/domain/analysisView/wasmArtifactView.js +162 -0
- package/dist/domain/analysisView/webNetworkApiSurfaceView.js +123 -0
- package/dist/domain/analysisView/webNetworkCaptureView.js +388 -0
- package/dist/domain/android/androidAnalysis.js +36 -2
- package/dist/domain/android/androidApplication.js +57 -80
- package/dist/domain/apktool/apktoolResourceAnalysis.js +89 -0
- package/dist/domain/apple/appleApplication.js +71 -52
- package/dist/domain/apple/appleArchiveFormat.js +184 -0
- package/dist/domain/apple/appleAssetCatalog.js +15 -0
- package/dist/domain/apple/appleBundleAnatomy.js +96 -29
- package/dist/domain/apple/dyldPaths.js +18 -3
- package/dist/domain/apple/dylibResolution.js +21 -11
- package/dist/domain/apple/dylibResolutionFindings.js +8 -9
- package/dist/domain/apple/interfaceBuilderGraph.js +72 -45
- package/dist/domain/apple/interfaceBuilderKeyedArchive.js +38 -9
- package/dist/domain/apple/machoContainer.js +120 -8
- package/dist/domain/apple/machoCpuIdentity.js +4 -0
- package/dist/domain/apple/plistValue.js +6 -1
- package/dist/domain/artifactComparison.js +130 -25
- package/dist/domain/artifactDecompressionBudget.js +26 -0
- package/dist/domain/artifactGraph.js +28 -9
- package/dist/domain/artifactIdentity.js +33 -2
- package/dist/domain/artifactInspection.js +47 -45
- package/dist/domain/artifactIntegrityPolicy.js +10 -0
- package/dist/domain/artifactInventoryEvidence.js +148 -51
- package/dist/domain/artifactPathSyntax.js +1 -1
- package/dist/domain/binaryTarget.js +253 -80
- package/dist/domain/binaryTargetTypes.js +21 -1
- package/dist/domain/browserNetworkEvidence.js +4 -0
- package/dist/domain/browserObservation.js +88 -29
- package/dist/domain/browserObservationSchemas.js +12 -5
- package/dist/domain/browserScenarioCapture.js +2 -1
- package/dist/domain/browserScenarioCaptureValues.js +26 -2
- package/dist/domain/browserScenarioDiff.js +120 -11
- package/dist/domain/browserScenarioDiffEvidence.js +46 -13
- package/dist/domain/browserScenarioDiffValues.js +10 -3
- package/dist/domain/browserScenarioNetworkComparison.js +158 -0
- package/dist/domain/browserScenarioNormalization.js +10 -13
- package/dist/domain/browserScenarioValues.js +2 -12
- package/dist/domain/browserSession.js +2 -2
- package/dist/domain/bundleComparison.js +1 -5
- package/dist/domain/callPath.js +40 -3
- package/dist/domain/canonicalJsonDigestSteps.js +34 -12
- package/dist/domain/captures/packetCapture.js +138 -0
- package/dist/domain/captures/packetFields.js +81 -0
- package/dist/domain/changedBehavior.js +43 -41
- package/dist/domain/compactStringIdentity.js +9 -0
- package/dist/domain/comparisonSourceEvidence.js +6 -0
- package/dist/domain/dosCom.js +2 -2
- package/dist/domain/dosMz.js +52 -14
- package/dist/domain/electron/electronFuses.js +360 -0
- package/dist/domain/elfFixedHeader.js +42 -0
- package/dist/domain/evidence.js +104 -38
- package/dist/domain/evidenceBundle.js +58 -20
- package/dist/domain/evidenceErrors.js +5 -0
- package/dist/domain/evidenceRecordSummary.js +144 -0
- package/dist/domain/evm/evmInterface.js +18 -4
- package/dist/domain/evm/solidityMetadata.js +70 -0
- package/dist/domain/explicitSensitiveFailure.js +42 -24
- package/dist/domain/firmware/firmwareAnalysis.js +29 -0
- package/dist/domain/flutter/flutterBuildAnalysis.js +141 -0
- package/dist/domain/functionCallCoverage.js +60 -0
- package/dist/domain/functionComparisonDimensions.js +101 -10
- package/dist/domain/functionComparisonNormalization.js +66 -10
- package/dist/domain/functionComparisonResults.js +7 -6
- package/dist/domain/functionComparisonSchemas.js +14 -3
- package/dist/domain/functionDossierEvidence.js +3 -0
- package/dist/domain/go/goBinary.js +96 -0
- package/dist/domain/harmony/harmonyApplication.js +156 -0
- package/dist/domain/hopperErrors.js +15 -16
- package/dist/domain/hopperPublisher.js +12 -0
- package/dist/domain/hopperValues.js +112 -34
- package/dist/domain/inputIssueProjection.js +16 -1
- package/dist/domain/javascript/electronObservation.js +4 -1
- package/dist/domain/javascript/electronStaticAnalysisBrowser.js +24 -24
- package/dist/domain/javascript/electronStaticAnalysisIpc.js +13 -20
- package/dist/domain/javascript/electronStaticAnalysisNative.js +85 -41
- package/dist/domain/javascript/electronStaticAnalysisValues.js +30 -8
- package/dist/domain/javascript/electronWrappedCallPaths.js +498 -0
- package/dist/domain/javascript/htmlArtifactReferences.js +94 -4
- package/dist/domain/javascript/javascriptAnalysisResourceControls.js +65 -0
- package/dist/domain/javascript/javascriptApplicationAnalysis.js +7 -1
- package/dist/domain/javascript/javascriptApplicationChangeGraph.js +13 -8
- package/dist/domain/javascript/javascriptApplicationEvidenceSchemas.js +1 -1
- package/dist/domain/javascript/javascriptApplicationGraph.js +96 -19
- package/dist/domain/javascript/javascriptApplicationGraphSchemas.js +1 -0
- package/dist/domain/javascript/javascriptApplicationProjectionResources.js +43 -0
- package/dist/domain/javascript/javascriptApplicationVersionItems.js +28 -12
- package/dist/domain/javascript/javascriptApplicationVersionKeys.js +40 -19
- package/dist/domain/javascript/javascriptArtifactFiles.js +2 -1
- package/dist/domain/javascript/javascriptAstFingerprint.js +100 -39
- package/dist/domain/javascript/javascriptAstValues.js +81 -0
- package/dist/domain/javascript/javascriptBootstrap.js +94 -0
- package/dist/domain/javascript/javascriptBootstrapIntegrity.js +372 -0
- package/dist/domain/javascript/javascriptBuiltinResourceMethods.js +8 -0
- package/dist/domain/javascript/javascriptBundledRequireOrigin.js +291 -0
- package/dist/domain/javascript/javascriptContextBridgeExposure.js +23 -0
- package/dist/domain/javascript/javascriptElectronMemberWrites.js +114 -0
- package/dist/domain/javascript/javascriptExportShapeComparisonSchemas.js +6 -5
- package/dist/domain/javascript/javascriptExportShapeVariants.js +1 -1
- package/dist/domain/javascript/javascriptFeatureSeed.js +33 -16
- package/dist/domain/javascript/javascriptFeatureTrace.js +9 -3
- package/dist/domain/javascript/javascriptFeatureTraceSchemas.js +42 -11
- package/dist/domain/javascript/javascriptIntrinsicInvocation.js +132 -0
- package/dist/domain/javascript/javascriptModuleDeclaration.js +28 -0
- package/dist/domain/javascript/javascriptModuleInterop.js +618 -0
- package/dist/domain/javascript/javascriptModuleResolutionMode.js +18 -0
- package/dist/domain/javascript/javascriptModuleSemanticIr.js +15 -0
- package/dist/domain/javascript/javascriptModuleSpecifier.js +5 -0
- package/dist/domain/javascript/javascriptNativeHandoff.js +6 -2
- package/dist/domain/javascript/javascriptPackageImportAliases.js +58 -0
- package/dist/domain/javascript/javascriptRecovery.js +12 -5
- package/dist/domain/javascript/javascriptRpcEndpoints.js +331 -0
- package/dist/domain/javascript/javascriptRuntimeLoadState.js +12 -3
- package/dist/domain/javascript/javascriptRuntimeObservation.js +4 -1
- package/dist/domain/javascript/javascriptRuntimeReconciliationCaptureParsing.js +10 -4
- package/dist/domain/javascript/javascriptRuntimeReconciliationGraph.js +7 -2
- package/dist/domain/javascript/javascriptRuntimeReconciliationMatching.js +15 -2
- package/dist/domain/javascript/javascriptRuntimeReconciliationResult.js +0 -1
- package/dist/domain/javascript/javascriptRuntimeReconciliationSchemas.js +5 -4
- package/dist/domain/javascript/javascriptRuntimeStaticCandidates.js +121 -22
- package/dist/domain/javascript/javascriptSemanticAmbientWrites.js +251 -0
- package/dist/domain/javascript/javascriptSemanticAnalysis.js +493 -104
- package/dist/domain/javascript/javascriptSemanticAsyncEffects.js +17 -34
- package/dist/domain/javascript/javascriptSemanticCallResolution.js +4 -3
- package/dist/domain/javascript/javascriptSemanticCallableResults.js +42 -0
- package/dist/domain/javascript/javascriptSemanticCallableStack.js +52 -0
- package/dist/domain/javascript/javascriptSemanticCalls.js +14 -12
- package/dist/domain/javascript/javascriptSemanticChildProcesses.js +42 -55
- package/dist/domain/javascript/javascriptSemanticDataEffectHelpers.js +428 -32
- package/dist/domain/javascript/javascriptSemanticDataEffects.js +14 -20
- package/dist/domain/javascript/javascriptSemanticDependencies.js +69 -0
- package/dist/domain/javascript/javascriptSemanticDerivedAnalysis.js +15 -4
- package/dist/domain/javascript/javascriptSemanticFileProjection.js +1 -0
- package/dist/domain/javascript/javascriptSemanticFingerprints.js +51 -53
- package/dist/domain/javascript/javascriptSemanticGraph.js +74 -24
- package/dist/domain/javascript/javascriptSemanticGraphSchemas.js +2 -11
- package/dist/domain/javascript/javascriptSemanticIterationSources.js +41 -8
- package/dist/domain/javascript/javascriptSemanticMemberMutations.js +538 -151
- package/dist/domain/javascript/javascriptSemanticMutationInitializers.js +199 -3
- package/dist/domain/javascript/javascriptSemanticMutationValues.js +78 -35
- package/dist/domain/javascript/javascriptSemanticObjectReferences.js +671 -0
- package/dist/domain/javascript/javascriptSemanticObjects.js +27 -17
- package/dist/domain/javascript/javascriptSemanticProjection.js +202 -56
- package/dist/domain/javascript/javascriptSemanticPromises.js +6 -9
- package/dist/domain/javascript/javascriptSemanticPropertyPaths.js +77 -0
- package/dist/domain/javascript/javascriptSemanticProvenance.js +5 -1
- package/dist/domain/javascript/javascriptSemanticQuery.js +34 -31
- package/dist/domain/javascript/javascriptSemanticQueryIdentity.js +1 -3
- package/dist/domain/javascript/javascriptSemanticReferenceSources.js +25 -0
- package/dist/domain/javascript/javascriptSemanticRequireOrigin.js +331 -8
- package/dist/domain/javascript/javascriptSemanticResources.js +6 -40
- package/dist/domain/javascript/javascriptSemanticReturnedReferences.js +233 -0
- package/dist/domain/javascript/javascriptSemanticReturns.js +49 -52
- package/dist/domain/javascript/javascriptSemanticState.js +61 -4
- package/dist/domain/javascript/javascriptSemanticTraversal.js +25 -5
- package/dist/domain/javascript/javascriptSemanticValues.js +260 -35
- package/dist/domain/javascript/javascriptSourceAnalysis.js +1 -0
- package/dist/domain/javascript/javascriptSourceMapPaths.js +44 -17
- package/dist/domain/javascript/javascriptSourceParser.js +72 -3
- package/dist/domain/javascript/javascriptSourceSelection.js +11 -0
- package/dist/domain/javascript/javascriptStaticAnalysis.js +72 -26
- package/dist/domain/javascript/javascriptStaticAnalysisBundler.js +100 -24
- package/dist/domain/javascript/javascriptStaticAnalysisCalls.js +271 -47
- package/dist/domain/javascript/javascriptStaticAnalysisFindings.js +8 -4
- package/dist/domain/javascript/javascriptStaticAnalysisHelpers.js +166 -56
- package/dist/domain/javascript/javascriptStaticAnalysisState.js +2 -0
- package/dist/domain/javascript/javascriptStaticAnalysisTypes.js +2 -1
- package/dist/domain/javascript/javascriptSymbolicBindings.js +836 -0
- package/dist/domain/javascript/javascriptSymbolicControlFlow.js +40 -0
- package/dist/domain/javascript/javascriptSymbolicValues.js +34 -0
- package/dist/domain/javascript/sourceToBundleComparison.js +3 -1
- package/dist/domain/javascript/sourceToBundleComparisonSchemas.js +2 -0
- package/dist/domain/javascript/sourceToBundleSignals.js +47 -13
- package/dist/domain/jeb/jebAnalysis.js +114 -0
- package/dist/domain/jsonShape.js +63 -52
- package/dist/domain/jsonValue.js +40 -12
- package/dist/domain/localPath.js +6 -3
- package/dist/domain/managed/managedApplicationGraph.js +42 -0
- package/dist/domain/managed/managedApplicationGraphCoverage.js +12 -2
- package/dist/domain/managed/managedApplicationGraphNodes.js +32 -23
- package/dist/domain/managed/managedArtifact.js +52 -1
- package/dist/domain/managed/managedInspectionEvidence.js +12 -0
- package/dist/domain/managed/managedMemberComparison.js +3 -0
- package/dist/domain/managed/managedMemberComparisonCoverage.js +23 -3
- package/dist/domain/managed/managedMemberComparisonItems.js +23 -19
- package/dist/domain/managed/managedMemberComparisonMatch.js +209 -18
- package/dist/domain/managed/managedNativeVerificationMatch.js +49 -26
- package/dist/domain/managed/managedNativeVerificationSchemas.js +13 -2
- package/dist/domain/managed/managedReconstruction.js +5 -8
- package/dist/domain/mobileApplicationGraphProjection.js +80 -0
- package/dist/domain/native/addressCoordinate.js +11 -0
- package/dist/domain/native/binaryLayout.js +2 -4
- package/dist/domain/native/bytePattern.js +100 -0
- package/dist/domain/native/nativeAotPe.js +1408 -0
- package/dist/domain/native/nativeInspection.js +38 -4
- package/dist/domain/native/nativeInstruction.js +38 -2
- package/dist/domain/native/nativeInvestigationGraph.js +9 -5
- package/dist/domain/native/nativeLoadImage.js +19 -1
- package/dist/domain/native/nativeMetadataRecovery.js +79 -6
- package/dist/domain/native/nativeUiObservation.js +5 -6
- package/dist/domain/native/objcSwiftMetadata.js +4 -1
- package/dist/domain/native/peResources.js +100 -0
- package/dist/domain/native/recordedCrash.js +79 -10
- package/dist/domain/nativeConvention.js +33 -0
- package/dist/domain/offsetDateTime.js +60 -0
- package/dist/domain/pcap/pcapAnalysis.js +91 -0
- package/dist/domain/pcap/pcapEvidence.js +15 -0
- package/dist/domain/peMachine.js +36 -0
- package/dist/domain/pngHeader.js +18 -0
- package/dist/domain/process/processCapture.js +91 -1
- package/dist/domain/process/processCaptureCoverage.js +26 -3
- package/dist/domain/process/processCaptureExample.js +26 -0
- package/dist/domain/process/processCaptureValidation.js +112 -8
- package/dist/domain/process/processComparison.js +41 -13
- package/dist/domain/process/processScenario.js +66 -7
- package/dist/domain/process/processTraceEvaluation.js +54 -50
- package/dist/domain/process/processTraceSpecification.js +243 -89
- package/dist/domain/propertyListKeys.js +214 -12
- package/dist/domain/propertyListXmlText.js +20 -4
- package/dist/domain/providerAdapterError.js +0 -5
- package/dist/domain/providerConfigurationRefusal.js +12 -0
- package/dist/domain/providerSelectionError.js +2 -1
- package/dist/domain/qlogCapture.js +62 -0
- package/dist/domain/rawBinary.js +96 -0
- package/dist/domain/reconstructionCoverage.js +5 -1
- package/dist/domain/reconstructionCoverageEvaluation.js +18 -15
- package/dist/domain/reconstructionCoverageVerifierResults.js +35 -0
- package/dist/domain/reconstructionObligationLedgerIntegrity.js +114 -0
- package/dist/domain/reconstructionObligationLedgerSchemas.js +104 -1
- package/dist/domain/reconstructionReadiness.js +4 -8
- package/dist/domain/reconstructionReadinessJourneyFindings.js +4 -1
- package/dist/domain/reconstructionUnknowns.js +9 -1
- package/dist/domain/reconstructionVerification.js +54 -25
- package/dist/domain/recordedTransportUrl.js +59 -0
- package/dist/domain/referenceSourceClassification.js +27 -23
- package/dist/domain/referenceSourceGraph.js +70 -23
- package/dist/domain/referenceSourceImportParsing.js +29 -16
- package/dist/domain/referenceSourcePathIdentity.js +32 -0
- package/dist/domain/referenceSourceRequireBindings.js +130 -0
- package/dist/domain/referenceSourceSummary.js +92 -0
- package/dist/domain/relationshipCoverage.js +44 -0
- package/dist/domain/residualUnknown.js +93 -26
- package/dist/domain/reverseEngineering.js +31 -0
- package/dist/domain/runtimeVersion.js +8 -0
- package/dist/domain/rust/rustBinary.js +200 -0
- package/dist/domain/signals/annotationTextWindow.js +31 -0
- package/dist/domain/signals/signalDecoders.js +69 -0
- package/dist/domain/signals/signalRecording.js +115 -0
- package/dist/domain/sourceMapContents.js +10 -3
- package/dist/domain/sourceMapEnvelope.js +17 -11
- package/dist/domain/sqlite/sqliteDatabase.js +188 -0
- package/dist/domain/staticRuntimeCorrelation.js +7 -9
- package/dist/domain/swiftSymbolClassification.js +17 -0
- package/dist/domain/symbolAnalysis.js +16 -4
- package/dist/domain/urlComponents.js +6 -0
- package/dist/domain/wasm/wasmArtifact.js +119 -0
- package/dist/domain/wasm/wasmInterface.js +89 -0
- package/dist/domain/webBundleAnalysis.js +14 -3
- package/dist/domain/webBundleAnalyzerAst.js +7 -2
- package/dist/domain/webBundleAnalyzerInspection.js +68 -40
- package/dist/domain/webBundleAnalyzerResult.js +18 -6
- package/dist/domain/webCaptureDiff.js +233 -34
- package/dist/domain/webCaptureFrameComparison.js +49 -0
- package/dist/domain/webMcpDiscovery.js +5 -2
- package/dist/domain/webModuleImports.js +22 -27
- package/dist/domain/webModuleTrace.js +3 -8
- package/dist/domain/webNetworkCapture.js +101 -39
- package/dist/domain/webNetworkCaptureCoordinates.js +21 -0
- package/dist/domain/webRuntime.js +0 -1
- package/dist/domain/webScreenshot.js +2 -2
- package/dist/domain/webScriptArtifacts.js +2 -4
- package/dist/domain/webScriptExport.js +6 -8
- package/dist/domain/webScriptExportError.js +10 -4
- package/dist/domain/webScriptExportPlan.js +9 -15
- package/dist/domain/webSourceLocation.js +20 -9
- package/dist/domain/zipPackageFormat.js +31 -2
- package/dist/domain/zodCollectionSteps.js +24 -0
- package/dist/dotnet/ManagedArtifactInspector.js +81 -54
- package/dist/dotnet/ManagedDecodeBudget.js +138 -0
- package/dist/dotnet/ManagedMemberInspector.js +113 -26
- package/dist/dotnet/ManagedMemberInspectorCore.js +356 -140
- package/dist/dotnet/ManagedMemberInstructionDecoder.js +112 -38
- package/dist/dotnet/ManagedMemberOwnership.js +65 -0
- package/dist/dotnet/ManagedMemberPointers.js +69 -0
- package/dist/dotnet/ManagedMemberRows.js +182 -44
- package/dist/dotnet/ManagedMetadataHeaps.js +123 -27
- package/dist/dotnet/ManagedMetadataInventory.js +5 -5
- package/dist/dotnet/ManagedMetadataInventoryRows.js +56 -63
- package/dist/dotnet/ManagedMetadataLayout.js +19 -5
- package/dist/dotnet/ManagedMetadataRowSizes.js +1 -1
- package/dist/dotnet/ManagedMethodBodyReader.js +34 -11
- package/dist/dotnet/ManagedMethodSpecs.js +78 -0
- package/dist/dotnet/ManagedNativeBoundaryHelpers.js +5 -4
- package/dist/dotnet/ManagedNativeBoundaryInspector.js +52 -44
- package/dist/dotnet/ManagedPeReader.js +96 -52
- package/dist/dotnet/ManagedReaderFailure.js +11 -1
- package/dist/dotnet/ManagedSnapshot.js +88 -0
- package/dist/dotnet/ManagedStaticProvider.js +57 -35
- package/dist/dotnet/ManagedTypeMemberLists.js +105 -0
- package/dist/dotnet/ManagedTypeNames.js +98 -0
- package/dist/dotnet/ManagedUserStrings.js +75 -0
- package/dist/electron/ElectronFusePath.js +247 -0
- package/dist/electron/ElectronFuseProvider.js +113 -0
- package/dist/electron/ElectronFuseReader.js +317 -0
- package/dist/evaluation/AgentEvaluationFixtures.js +194 -11
- package/dist/evaluation/AgentEvaluationReport.js +9 -5
- package/dist/evaluation/CodexAgentEval.js +58 -49
- package/dist/evaluation/KnownAnswerEvaluation.js +126 -57
- package/dist/evm/EvmoleFailures.js +19 -16
- package/dist/evm/EvmoleInterfaceAdapter.js +5 -1
- package/dist/evm/EvmoleInterfaceProvider.js +198 -23
- package/dist/evm/EvmoleInterfaceWorker.js +2 -0
- package/dist/evm/SolidityMetadata.js +139 -0
- package/dist/filesystem/OwnedDirectoryHandle.js +29 -0
- package/dist/filesystem/OwnedFileHandle.js +36 -0
- package/dist/filesystem/OwnedStagedOutput.js +138 -0
- package/dist/filesystem/RegularFile.js +81 -5
- package/dist/filesystem/StableFileHash.js +46 -0
- package/dist/filesystem/readFileHandleChunks.js +35 -0
- package/dist/firmware/FirmwareCommand.js +27 -5
- package/dist/firmware/FirmwareFiles.js +18 -7
- package/dist/firmware/FirmwareProvider.js +158 -32
- package/dist/firmware/FirmwarePublication.js +242 -4
- package/dist/firmware/FirmwareRelease.js +1 -0
- package/dist/firmware/FirmwareReports.js +202 -12
- package/dist/flutter/DartElf.js +418 -0
- package/dist/flutter/ElfBuildId.js +137 -0
- package/dist/flutter/ElfLoadMap.js +91 -0
- package/dist/flutter/FlutterBuildProvider.js +826 -0
- package/dist/flutter/FlutterPayloadScan.js +180 -0
- package/dist/frida/FridaInstrumentationManager.js +1104 -0
- package/dist/gdb/GdbSessionManager.js +1451 -0
- package/dist/generatedPackageMetadata.js +2 -2
- package/dist/ghidra/GhidraAnalysisProfile.js +175 -6
- package/dist/ghidra/GhidraAnalysisSeeds.js +211 -0
- package/dist/ghidra/GhidraClient.js +208 -29
- package/dist/ghidra/GhidraDiagnostics.js +18 -8
- package/dist/ghidra/GhidraDoctor.js +15 -12
- package/dist/ghidra/GhidraFunctionValues.js +73 -2
- package/dist/ghidra/GhidraInstallation.js +216 -20
- package/dist/ghidra/GhidraInstallationPolicy.js +79 -29
- package/dist/ghidra/GhidraInventoryValues.js +53 -1
- package/dist/ghidra/GhidraJavaLaunch.js +91 -10
- package/dist/ghidra/GhidraJavaProperties.js +117 -0
- package/dist/ghidra/GhidraLanguageCatalog.js +169 -0
- package/dist/ghidra/GhidraLauncher.js +306 -88
- package/dist/ghidra/GhidraLoadImageAttest.js +74 -7
- package/dist/ghidra/GhidraLoadImageValues.js +72 -0
- package/dist/ghidra/GhidraMipsProfile.js +315 -0
- package/dist/ghidra/GhidraPeProfile.js +21 -0
- package/dist/ghidra/GhidraPowerPcProfile.js +51 -0
- package/dist/ghidra/GhidraProvider.js +106 -20
- package/dist/ghidra/GhidraProviderCapabilities.js +30 -19
- package/dist/ghidra/GhidraProviderClient.js +520 -56
- package/dist/ghidra/GhidraPspExtension.js +140 -0
- package/dist/ghidra/GhidraPspProfile.js +59 -0
- package/dist/ghidra/GhidraRawBinaryLanguage.js +40 -0
- package/dist/ghidra/GhidraRiscvProfile.js +100 -0
- package/dist/ghidra/GhidraSessionError.js +155 -11
- package/dist/ghidra/GhidraSessionValues.js +75 -2
- package/dist/ghidra/GhidraTransport.js +2 -1
- package/dist/go/GoBinaryContainer.js +140 -0
- package/dist/go/GoBinaryImage.js +210 -0
- package/dist/go/GoBinaryProvider.js +151 -0
- package/dist/go/GoElfImage.js +211 -0
- package/dist/go/GoMachoImage.js +164 -0
- package/dist/go/GoModuleText.js +217 -0
- package/dist/go/GoPeImage.js +124 -0
- package/dist/hopper/BridgeLauncher.js +35 -2
- package/dist/hopper/HopperAnalysisProfile.js +21 -9
- package/dist/hopper/HopperCleanup.js +15 -3
- package/dist/hopper/HopperClient.js +203 -42
- package/dist/hopper/HopperMacPublisher.js +29 -0
- package/dist/hopper/HopperMachOImage.js +61 -27
- package/dist/hopper/HopperProcessDiagnostic.js +27 -0
- package/dist/hopper/HopperProvider.js +68 -26
- package/dist/hopper/HopperProviderCapabilities.js +7 -3
- package/dist/hopper/HopperRequestQueue.js +17 -5
- package/dist/hopper/HopperSessionValues.js +10 -1
- package/dist/hopper/HopperTargetLease.js +66 -19
- package/dist/ida/IdaBusyHealth.js +44 -0
- package/dist/ida/IdaCallGraph.js +134 -0
- package/dist/ida/IdaConfiguration.js +7 -2
- package/dist/ida/IdaDiagnosticRedactor.js +199 -0
- package/dist/ida/IdaDiagnosticWriter.js +62 -0
- package/dist/ida/IdaDoctor.js +7 -5
- package/dist/ida/IdaJsonDiagnostic.js +138 -0
- package/dist/ida/IdaMcpConnection.js +297 -27
- package/dist/ida/IdaNativeProtocol.js +93 -0
- package/dist/ida/IdaOperationRunner.js +249 -40
- package/dist/ida/IdaProtocolValues.js +86 -4
- package/dist/ida/IdaProvider.js +34 -8
- package/dist/ida/IdaProviderCapabilities.js +37 -8
- package/dist/ida/IdaSessionClient.js +332 -53
- package/dist/ida/IdaWorkspace.js +57 -7
- package/dist/inspector/V8InspectorCaptureProjection.js +7 -2
- package/dist/inspector/V8InspectorEndpoint.js +15 -13
- package/dist/inspector/V8InspectorProvider.js +41 -7
- package/dist/javascript/analysis/JavaScriptAnalysisTransfer.js +337 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorker.js +594 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerProtocol.js +65 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerSchemas.js +590 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerServer.js +126 -0
- package/dist/javascript/recovery/RecoveryFiles.js +68 -12
- package/dist/javascript/recovery/WakaruCommand.js +22 -9
- package/dist/javascript/recovery/WakaruExecution.js +30 -18
- package/dist/javascript/recovery/WakaruProvider.js +150 -24
- package/dist/javascript/recovery/WakaruPublication.js +38 -14
- package/dist/javascript/recovery/WakaruRelease.js +11 -4
- package/dist/javascript/recovery/WakaruReport.js +15 -9
- package/dist/javascript/recovery/WakaruVersion.js +24 -0
- package/dist/javascript/sourceMaps/DecodedSourceMap.js +2 -16
- package/dist/javascript/sourceMaps/SourceMapCommand.js +38 -7
- package/dist/javascript/sourceMaps/SourceMapDecoder.js +84 -10
- package/dist/javascript/sourceMaps/SourceMapFormat.js +26 -28
- package/dist/javascript/sourceMaps/TraceSourceMap.js +34 -6
- package/dist/jeb/JebMcpConnection.js +186 -0
- package/dist/jeb/JebMcpEndpoint.js +45 -0
- package/dist/jeb/JebProvider.js +297 -0
- package/dist/logger.js +14 -1
- package/dist/main/shutdown.js +3 -0
- package/dist/main/transport.js +48 -4
- package/dist/main.js +14 -3
- package/dist/mcp/AnalysisSnapshotFiles-BAbiJQOc.js +1412 -0
- package/dist/mcp/ArtifactProvider-DViCU_rn.js +2183 -0
- package/dist/mcp/ArtifactProviderMetadata-b7pOK5_t.js +76 -0
- package/dist/mcp/ArtifactReader-OyM03Gjn.js +55 -0
- package/dist/mcp/ArtifactResourceScope-P3tq5z8Z.js +162 -0
- package/dist/mcp/AsarHeader-WsPgoooH.js +31 -0
- package/dist/mcp/BinarySessionStatus-B4P9gf-S.js +212 -0
- package/dist/mcp/BinaryTargetResolver-BMaE_0H1.js +1427 -0
- package/dist/mcp/BoundedFileBytes-DuczXiQZ.js +68 -0
- package/dist/mcp/CdpCaptureDocuments-HDiF2O7k.js +746 -0
- package/dist/mcp/CdpCaptureValues-M-j6CIh1.js +90 -0
- package/dist/mcp/CdpConnection-BpDfz4MK.js +570 -0
- package/dist/mcp/CdpOptionalCommand-BPjRD9Kz.js +120 -0
- package/dist/mcp/CdpTargetSession-BsPoKhEU.js +86 -0
- package/dist/mcp/DirectAnalysis-DrafbXke.js +409 -0
- package/dist/mcp/DirectAnalysisStatus-CjjeDLzW.js +44 -0
- package/dist/mcp/ElectronFileScope-BPG_YoyU.js +110 -0
- package/dist/mcp/InterfaceBuilderDecodeBudget-5F2AkxJT.js +652 -0
- package/dist/mcp/ManagedStaticProvider-BthZbKyZ.js +5028 -0
- package/dist/mcp/NativeMacOSProvider-Bh79k8dI.js +4867 -0
- package/dist/mcp/NativeMacOSProviderMetadata-N1lPOaY_.js +307 -0
- package/dist/mcp/ProcedureAddressResolution-CQpuwm1h.js +19 -0
- package/dist/mcp/ProcessOwnership-Bl_3ejLe.js +1502 -0
- package/dist/mcp/ProviderDeadline-DskQ94YD.js +932 -0
- package/dist/mcp/WorkflowEvidence-umWrB_wm.js +111 -0
- package/dist/mcp/analysisErrorCore-DXRTvF_m.js +235 -0
- package/dist/mcp/analysisErrorProjection-BN0EPM-3.js +892 -0
- package/dist/mcp/artifactOperationError-CkHMMaf7.js +27 -0
- package/dist/mcp/artifactToolContracts-Di4qZlEt.js +72 -0
- package/dist/mcp/browserObservation-C0s4i8UI.js +4468 -0
- package/dist/mcp/browserObservationError-CyLugqX4.js +40 -0
- package/dist/mcp/browserObservationSchemas-tgqjH7aA.js +573 -0
- package/dist/mcp/browserScenario-CAQ8Fns9.js +2929 -0
- package/dist/mcp/browserScenarioCapture-CTNFN-FI.js +479 -0
- package/dist/mcp/canonicalDigest-Bi_0_zGi.js +71 -0
- package/dist/mcp/digests-BFoWUT_-.js +223 -0
- package/dist/mcp/electronActiveObservation-lDvQTMR0.js +226 -0
- package/dist/mcp/electronObservation-DFOFEood.js +112 -0
- package/dist/mcp/electronObservation-i7LcILQ-.js +562 -0
- package/dist/mcp/electronScenario-nCzE6IfJ.js +653 -0
- package/dist/mcp/emptyArraySchema-tL6Qymyd.js +140 -0
- package/dist/mcp/enhancedInputs-DgdEnzHy.js +56 -0
- package/dist/mcp/javascriptRuntimeObservation-61NhCf7H.js +690 -0
- package/dist/mcp/javascriptRuntimeObservation-PIUoLfX6.js +121 -0
- package/dist/mcp/jsonSerialization-V-wWiFRE.js +152 -0
- package/dist/mcp/lipo-Bnkoq_6W.js +502 -0
- package/dist/mcp/localPath-AxvW9aPe.js +19 -0
- package/dist/mcp/logger-BQY5ulYv.js +48 -0
- package/dist/mcp/main-kBXHZ8S5.js +69390 -0
- package/dist/mcp/main.js +6 -0
- package/dist/mcp/managedToolContracts-CK--I_s7.js +101 -0
- package/dist/mcp/nativeValueTrace-DR9UE62L.js +3439 -0
- package/dist/mcp/officialToolContracts-B67NJ2tC.js +1413 -0
- package/dist/mcp/pngHeader-DQ-ObyY2.js +147 -0
- package/dist/mcp/propertyListKeys-DD25WsjI.js +553 -0
- package/dist/mcp/providerAdapterError-sDxToNal.js +25 -0
- package/dist/mcp/providerIdentities--ptAh481.js +31 -0
- package/dist/mcp/providerIdentity-BCQ5n5tw.js +16 -0
- package/dist/mcp/providerOperationHealth-CTYa3iLf.js +48 -0
- package/dist/mcp/rolldown-runtime-BjeaiXFo.js +121 -0
- package/dist/mcp/safeJson-NeGfpkrI.js +25 -0
- package/dist/mcp/scanCanonical-CRXSpule.js +3982 -0
- package/dist/mcp/serverIdentity-Cio4iFV3.js +1328 -0
- package/dist/mcp/sourceMapEnvelope-C0uJlrOh.js +94 -0
- package/dist/mcp/toolContracts-BW05wpcr.js +12200 -0
- package/dist/mcp/toolOutputSchemaGroups-ColvNZ1r.js +17533 -0
- package/dist/mcp/unicodeCodePointOrder-BezCbTpg.js +26 -0
- package/dist/mcp/webContentArtifact-Dzjc1z-R.js +284 -0
- package/dist/mcp/webRuntime-K__NYzXm.js +74 -0
- package/dist/mcp/webSourceLocation-DbMAT2J9.js +11130 -0
- package/dist/mcpDoctor.js +108 -76
- package/dist/mcpStartupPolicy.js +3 -0
- package/dist/native/AppleDispatchCoverage.js +81 -28
- package/dist/native/AppleDispatchMetadata.js +20 -9
- package/dist/native/AppleMachoFixups.js +253 -34
- package/dist/native/AppleMachoSelection.js +44 -17
- package/dist/native/AppleObjcCategories.js +1 -2
- package/dist/native/AppleObjcDispatchFacets.js +76 -7
- package/dist/native/CommandRunner.js +142 -32
- package/dist/native/LldbCallTracer.js +5 -3
- package/dist/native/MachoArchitectureSelection.js +50 -0
- package/dist/native/NativeCallObservation.js +2 -1
- package/dist/native/NativeMacOSProvider.js +173 -37
- package/dist/native/NativeMachoInspection.js +142 -78
- package/dist/native/NativeUiHelperRuntime.js +6 -1
- package/dist/native/NativeUiObservation.js +6 -5
- package/dist/native/SignatureTargetBinding.js +118 -55
- package/dist/native/parsers/codesign.js +27 -10
- package/dist/native/parsers/demangle.js +7 -1
- package/dist/native/parsers/dyldInfo.js +73 -4
- package/dist/native/parsers/lipo.js +53 -19
- package/dist/native/parsers/machoUuid.js +150 -0
- package/dist/native/parsers/otool.js +232 -29
- package/dist/native/pe/PeResourceLayout.js +120 -0
- package/dist/native/pe/PeResourceParser.js +286 -0
- package/dist/native/pe/PeResourcesProvider.js +77 -0
- package/dist/native/pwndbg/PwndbgCoreContext.js +20 -20
- package/dist/native/pwntools/PwntoolsDecoder.js +264 -40
- package/dist/native/pwntools/PwntoolsFailures.js +2 -1
- package/dist/native/pwntools/PwntoolsInputLimit.js +27 -0
- package/dist/native/pwntools/PwntoolsRecordedCrashProvider.js +27 -15
- package/dist/native/pwntools/PwntoolsResourceLimits.js +3 -3
- package/dist/native/pwntools/RecordedCrashSourceBindings.js +12 -8
- package/dist/native/pwntools/RecordedCrashStructureBindings.js +3 -1
- package/dist/objdump/ObjdumpCommand.js +21 -0
- package/dist/pcap/PcapCommand.js +146 -0
- package/dist/pcap/PcapConfiguration.js +93 -0
- package/dist/pcap/PcapNativeBound.js +58 -0
- package/dist/pcap/PcapOutput.js +240 -0
- package/dist/pcap/PcapProvider.js +424 -0
- package/dist/pcap/PcapSnapshot.js +171 -0
- package/dist/process/ArtifactAnalysisResources.js +213 -0
- package/dist/process/BoundedFileBytes.js +30 -7
- package/dist/process/CurrentEntrypointPath.js +6 -0
- package/dist/process/DarwinProcessRunTokenReader.js +125 -16
- package/dist/process/ExecFileBoundedOutput.js +44 -0
- package/dist/process/ExecFileOutput.js +30 -6
- package/dist/process/JavaScriptWorkerMemoryLimit.js +25 -0
- package/dist/process/LinuxResourceLimits.js +80 -0
- package/dist/process/MacCodeSignature.js +3 -0
- package/dist/process/OwnedCommand.js +40 -15
- package/dist/process/PrivateRuntimeRoot.js +9 -19
- package/dist/process/PrivateRuntimeRootUnavailableError.js +10 -0
- package/dist/process/ProcessOwnership.js +173 -128
- package/dist/process/ProcessOwnershipObservation.js +131 -43
- package/dist/process/ProcessOwnershipProcessTree.js +4 -4
- package/dist/process/ProcessRunTokenObservations.js +48 -0
- package/dist/process/ProviderDeadline.js +58 -12
- package/dist/process/ProviderDiagnosticRedaction.js +17 -0
- package/dist/process/ProviderProcess.js +112 -14
- package/dist/process/WindowsAuthority.js +48 -39
- package/dist/process/WindowsBatchCommand.js +46 -0
- package/dist/process/boundedUtf8Text.js +13 -0
- package/dist/process/capture/FilesystemSnapshot.js +87 -12
- package/dist/process/capture/ProcessCaptureClock.js +2 -0
- package/dist/process/capture/ProcessCaptureError.js +22 -3
- package/dist/process/capture/ProcessCaptureJournal.js +2 -1
- package/dist/process/capture/ProcessCaptureLifecycle.js +433 -91
- package/dist/process/capture/ProcessCaptureProgress.js +63 -0
- package/dist/process/capture/ProcessHarness.js +209 -38
- package/dist/process/capture/ProcessNormalization.js +278 -34
- package/dist/process/capture/ProcessSampling.js +3 -2
- package/dist/process/capture/ProcessScenarioRuntimeValidation.js +18 -15
- package/dist/process/capture/TerminalRenderer.js +52 -14
- package/dist/process/ownedDebuggerSession.js +203 -0
- package/dist/reference/ReferenceSourceReader.js +22 -6
- package/dist/reference/ReferenceSourceReaderEntries.js +182 -105
- package/dist/reference/ReferenceSourceReaderErrors.js +17 -1
- package/dist/reference/ReferenceSourceReaderFile.js +50 -11
- package/dist/reference/ReferenceSourceReaderTypes.js +1 -2
- package/dist/reference/ReferenceSourceReaderValidate.js +4 -5
- package/dist/rizin/RizinCommand.js +14 -0
- package/dist/rizin/RizinDebugSessionManager.js +1072 -0
- package/dist/rust/RustAuditableReader.js +309 -0
- package/dist/rust/RustBinaryImage.js +116 -0
- package/dist/rust/RustBinaryProvider.js +162 -0
- package/dist/server/EvidenceMcpServer.js +185 -27
- package/dist/server/admittedToolOperation.js +14 -0
- package/dist/server/contractToolHandler.js +28 -0
- package/dist/server/createServer.js +238 -36
- package/dist/server/externalMutationAdmission.js +50 -0
- package/dist/server/mcpProgress.js +4 -2
- package/dist/server/promptCompletion.js +19 -6
- package/dist/server/providerEnvironment.js +3 -0
- package/dist/server/registerAdbTools.js +36 -0
- package/dist/server/registerAnalysisViewTool.js +9 -10
- package/dist/server/registerAndroidTools.js +22 -13
- package/dist/server/registerApktoolTools.js +14 -0
- package/dist/server/registerApplicationTools/compareExportShapes.js +4 -6
- package/dist/server/registerApplicationTools/compareSourceToBundle.js +4 -5
- package/dist/server/registerApplicationTools/compareVersions.js +3 -2
- package/dist/server/registerApplicationTools/coverage.js +3 -2
- package/dist/server/registerApplicationTools/obligationLedger.js +3 -2
- package/dist/server/registerApplicationTools/projectMobileApplicationGraph.js +11 -3
- package/dist/server/registerApplicationTools/traceFeature.js +3 -2
- package/dist/server/registerApplicationTools/traceSemantics.js +4 -5
- package/dist/server/registerArtifactComparisonTool.js +5 -2
- package/dist/server/registerArtifactTools.js +21 -1
- package/dist/server/registerBinaryDiagnosticsTools.js +16 -4
- package/dist/server/registerBrowserScenarioTool.js +10 -7
- package/dist/server/registerBrowserTools.js +14 -13
- package/dist/server/registerBundleComparisonTool.js +20 -6
- package/dist/server/registerCaptureTools.js +12 -0
- package/dist/server/registerCloseLifecycleTool.js +32 -3
- package/dist/server/registerCutterTools.js +33 -0
- package/dist/server/registerElectronTools.js +38 -17
- package/dist/server/registerEnhancedTools.js +7 -6
- package/dist/server/registerEvidenceTools.js +14 -10
- package/dist/server/registerEvmTools.js +24 -11
- package/dist/server/registerFirmwareTools.js +3 -11
- package/dist/server/registerFlutterTools.js +17 -0
- package/dist/server/registerFridaTools.js +205 -0
- package/dist/server/registerFunctionComparisonTool.js +34 -11
- package/dist/server/registerGdbTools.js +64 -0
- package/dist/server/registerGoTools.js +9 -0
- package/dist/server/registerInvestigationTools/helpers.js +2 -2
- package/dist/server/registerInvestigationTools.js +12 -8
- package/dist/server/registerJavaScriptRecoveryTool.js +4 -9
- package/dist/server/registerJavaScriptRuntimeObservationTools.js +10 -11
- package/dist/server/registerJebTools.js +16 -0
- package/dist/server/registerManagedTools.js +11 -1
- package/dist/server/registerManagedWorkflowTools/compareManagedMembers.js +4 -6
- package/dist/server/registerManagedWorkflowTools/importManagedReconstruction.js +3 -2
- package/dist/server/registerManagedWorkflowTools/projectManagedApplicationGraph.js +3 -2
- package/dist/server/registerManagedWorkflowTools/verifyManagedNativeBoundaries.js +3 -2
- package/dist/server/registerNativeTools.js +14 -0
- package/dist/server/registerOfficialTools.js +5 -0
- package/dist/server/registerPcapTools.js +35 -0
- package/dist/server/registerPeResourcesTool.js +9 -0
- package/dist/server/registerProcessComparisonTool.js +14 -4
- package/dist/server/registerRecordedCrashTools.js +4 -9
- package/dist/server/registerReverseEngineeringTools.js +86 -0
- package/dist/server/registerRizinDebugTools.js +53 -0
- package/dist/server/registerRustTools.js +9 -0
- package/dist/server/registerSessionRecordTools.js +21 -14
- package/dist/server/registerSessionStatusTool.js +22 -4
- package/dist/server/registerSessionTools.js +78 -34
- package/dist/server/registerSignalTools.js +12 -0
- package/dist/server/registerSqliteTools.js +9 -0
- package/dist/server/registerWasmTools.js +46 -0
- package/dist/server/registerWebModuleTool.js +4 -9
- package/dist/server/registerWebNetworkCaptureTool.js +26 -17
- package/dist/server/registerWebRuntimeTools.js +6 -5
- package/dist/server/registerWebScriptTool.js +6 -3
- package/dist/server/registerWebSourceLocationTool.js +4 -9
- package/dist/server/retainedSummaryDelivery.js +28 -0
- package/dist/server/sessionAvailabilityPolicy.js +3 -0
- package/dist/server/toolRegistrationOptions.js +8 -0
- package/dist/server/toolResult.js +68 -16
- package/dist/server/toolResultEncoding.js +36 -3
- package/dist/serverIdentity.js +17 -8
- package/dist/signals/SigrokRecordingProvider.js +339 -0
- package/dist/signals/parseDecoderDiscovery.js +65 -0
- package/dist/sqlite/SqliteDatabaseFailures.js +134 -0
- package/dist/sqlite/SqliteDatabaseInspection.js +421 -0
- package/dist/sqlite/SqliteDatabaseLimits.js +16 -0
- package/dist/sqlite/SqliteDatabaseProvider.js +295 -0
- package/dist/sqlite/SqliteDatabaseSnapshot.js +156 -0
- package/dist/sqlite/SqliteDatabaseWorker.js +46 -0
- package/dist/sqlite/SqliteDatabaseWorkerExecution.js +112 -0
- package/dist/wasm/WabtArtifactProvider.js +336 -0
- package/dist/wasm/WabtFailures.js +101 -0
- package/dist/wasm/WabtInterface.js +309 -0
- package/dist/wasm/WabtOutput.js +60 -0
- package/dist/wasm/WabtRelease.js +12 -0
- package/dist/wasm/WabtString.js +48 -0
- package/dist/wasm/WabtWat.js +147 -0
- package/dist/wasm/WasmGlueAdapter.js +53 -0
- package/dist/wasm/WasmInterfaceBudget.js +11 -0
- package/dist/windows/WindowsNativeLoader.js +37 -7
- package/dist/windows/WindowsOwnedProcess.js +150 -17
- package/dist/windows/WindowsPrivateRuntime.js +34 -6
- package/install.sh +157 -95
- package/licenses/Apache-2.0.txt +202 -0
- package/licenses/GCC-Runtime-Library-Exception-3.1.txt +73 -0
- package/licenses/GPL-3.0.txt +674 -0
- package/licenses/LGPL-2.0.txt +480 -0
- package/licenses/MIT-template.txt +18 -0
- package/licenses/MinGW-w64-runtime.txt +240 -0
- package/licenses/Node-22.19.0-LICENSE.txt +2666 -0
- package/licenses/README.md +68 -0
- package/licenses/cfworker-MIT.txt +21 -0
- package/licenses/dotnet-runtime-MIT.txt +23 -0
- package/licenses/frida-17.23.2-COPYING.txt +50 -0
- package/licenses/ghidra-12.1.4-DISCLAIMER.txt +13 -0
- package/licenses/ghidra-12.1.4-LICENSE.txt +201 -0
- package/licenses/ghidra-12.1.4-NOTICE.txt +49 -0
- package/licenses/nativeaot-parser-MIT.txt +28 -0
- package/licenses/npm-dependencies.txt +3612 -0
- package/licenses/npm-runtime-notices.txt +8548 -0
- package/licenses/upstream-sources.json +72 -0
- package/licenses/xterm-MIT.txt +21 -0
- package/native/windows/README.md +92 -11
- package/native/windows/build/manifest.json +2 -2
- package/native/windows/build/rea-windows-x64.node +0 -0
- package/package.json +117 -22
- package/scripts/electron-active-hook.cjs +4 -1
- package/scripts/hopper-demo-x11.py +53 -3
- package/scripts/prepack.mjs +5 -0
- package/scripts/rea-android-workspace-guardian.mjs +46 -0
- package/scripts/rea.mjs +44 -13
- package/scripts/verify-windows-native-artifact.mjs +2 -2
- package/skills/reverse-engineer-anything/SKILL.md +142 -20
- package/skills/reverse-engineer-anything/references/connection-and-recovery.md +127 -0
- package/skills/reverse-engineer-anything/references/evidence-workflows.md +31 -0
- package/skills/reverse-engineer-anything/references/javascript-applications.md +118 -13
- package/skills/reverse-engineer-anything/references/native-and-artifacts.md +147 -16
- package/skills/reverse-engineer-anything/references/runtime-observation.md +57 -7
- package/third_party/README.md +1 -1
- package/third_party/wabt/README.md +24 -0
- package/dist/browser/history/HarCaptureAdapter.js +0 -20
- package/dist/cli/streamedJsonOutput.js +0 -135
- package/dist/cliJsonFile.js +0 -179
- /package/dist/{application/binary → process}/AbortablePromise.js +0 -0
|
@@ -0,0 +1,1507 @@
|
|
|
1
|
+
import { __esmMin } from "./rolldown-runtime-DXoylpqc.js";
|
|
2
|
+
import { browserAllowedOriginsSchema, browserEndpointSchema, classifyBrowserCompleteness, compareUnicodeCodePoints, digestCanonicalValue, electronActiveObservationResultSchema, electronPageInspectionSchema, init_artifactIdentity, init_browserCompleteness, init_browserObservation, init_browserObservationSchemas, init_canonicalDigest, init_canonicalOrdering, init_electronActiveObservation, init_electronObservation, init_evidence, init_javascriptRuntimeObservation, init_localPath, init_unicodeCodePointOrder, isPathWithinRoot, javascriptRuntimeKindSchema, javascriptRuntimeObservationSchema, logicalPathEscapesRoot, normalizeJoinedLogicalPath, parseEvidence, recordedBrowserObservationEndpointSchema, uniqueSorted, webPageInspectionSchema } from "./reconstructionObligationLedgerSchemas-Bao0xMr-.js";
|
|
3
|
+
import { createJavaScriptApplicationEdge, createJavaScriptApplicationGraph, createJavaScriptApplicationNode, init_javascriptApplicationAnalysis, init_javascriptApplicationGraph, javascriptApplicationAnalysisResultSchema } from "./javascriptApplicationAnalysis-HgMzVMQw.js";
|
|
4
|
+
import { init_javascriptRuntimeReconciliationSchemas, javascriptRuntimeReconciliationResultSchema } from "./javascriptRuntimeReconciliationSchemas-BWpGWNcI.js";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { isAbsolute, posix, win32 } from "node:path";
|
|
7
|
+
|
|
8
|
+
//#region dist/domain/javascript/javascriptRuntimeStaticCandidates.js
|
|
9
|
+
var collectStaticRuntimeCandidates, mappedRuntimePaths, createStaticRuntimeScope, staticNodeWithinRuntimeScope, candidatesForLayer, candidateCategory, isStaticSourceModule, indexStaticPaths, nodePaths, hasOwnedArtifactPath, isRawApplicationFileObservation, usesApplicationFileDeclaration, nativeDeclarationPaths, nativeDeclarationSource, candidateDigests, pathBelowRoot, absoluteFilePathStyle, pathBelowUrlPrefix, activeArtifactPrefixes, normalizeArtifactPrefix, pathWithinPrefix, safeArtifactPath, relativeLogicalPath, uniqueMappedPaths;
|
|
10
|
+
function init_javascriptRuntimeStaticCandidates() {
|
|
11
|
+
return (init_javascriptRuntimeStaticCandidates = __esmMin((() => {
|
|
12
|
+
init_artifactIdentity();
|
|
13
|
+
init_canonicalOrdering();
|
|
14
|
+
init_unicodeCodePointOrder();
|
|
15
|
+
collectStaticRuntimeCandidates = (layers) => layers.flatMap((layer) => candidatesForLayer(layer)).sort((left, right) => compareUnicodeCodePoints(left.layer.layerId, right.layer.layerId) || compareUnicodeCodePoints(left.node.node_id, right.node.node_id));
|
|
16
|
+
mappedRuntimePaths = (layer, entity) => {
|
|
17
|
+
const paths = [];
|
|
18
|
+
const fileStyle = entity.location.kind === "file" ? absoluteFilePathStyle(entity.location.value) : null;
|
|
19
|
+
if (entity.location.kind === "file" && layer.result.format === "directory") {
|
|
20
|
+
const path = pathBelowRoot(layer.result.input_path, entity.location.value);
|
|
21
|
+
if (path !== null) paths.push({
|
|
22
|
+
path,
|
|
23
|
+
fileStyle,
|
|
24
|
+
nativeRelativePath: path,
|
|
25
|
+
artifactPrefix: "",
|
|
26
|
+
basis: "artifact-path"
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
for (const mapping of layer.runtimeMappings) {
|
|
30
|
+
const suffix = mapping.kind === "file-root" && entity.location.kind === "file" ? pathBelowRoot(mapping.root, entity.location.value) : mapping.kind === "url-prefix" && entity.location.kind === "url" ? pathBelowUrlPrefix(mapping.prefix, entity.location.value) : null;
|
|
31
|
+
if (suffix === null) continue;
|
|
32
|
+
const path = safeArtifactPath(mapping.artifact_prefix, suffix);
|
|
33
|
+
if (path === null) continue;
|
|
34
|
+
paths.push({
|
|
35
|
+
path,
|
|
36
|
+
fileStyle,
|
|
37
|
+
nativeRelativePath: mapping.kind === "file-root" ? suffix : null,
|
|
38
|
+
artifactPrefix: normalizeArtifactPrefix(mapping.artifact_prefix),
|
|
39
|
+
basis: mapping.kind === "file-root" ? "operator-file-mapping" : "operator-url-mapping"
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return uniqueMappedPaths(paths);
|
|
43
|
+
};
|
|
44
|
+
createStaticRuntimeScope = (layer, entities) => ({
|
|
45
|
+
artifactPrefixes: activeArtifactPrefixes(layer, entities),
|
|
46
|
+
pathsByNodeId: indexStaticPaths(layer.graph)
|
|
47
|
+
});
|
|
48
|
+
staticNodeWithinRuntimeScope = (node, scope) => (scope.pathsByNodeId.get(node.node_id) ?? []).some((path) => scope.artifactPrefixes.some((prefix) => pathWithinPrefix(path, prefix)));
|
|
49
|
+
candidatesForLayer = (layer) => {
|
|
50
|
+
const graph = layer.graph;
|
|
51
|
+
const pathsByNodeId = indexStaticPaths(graph);
|
|
52
|
+
return graph.nodes.flatMap((node) => {
|
|
53
|
+
const category = candidateCategory(node);
|
|
54
|
+
if (category === null) return [];
|
|
55
|
+
return [{
|
|
56
|
+
layer,
|
|
57
|
+
node,
|
|
58
|
+
category,
|
|
59
|
+
paths: pathsByNodeId.get(node.node_id) ?? [],
|
|
60
|
+
nativeDeclarationPaths: nativeDeclarationPaths(node),
|
|
61
|
+
digests: candidateDigests(node)
|
|
62
|
+
}];
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
candidateCategory = (node) => {
|
|
66
|
+
if (node.kind === "electron-renderer") return "renderer";
|
|
67
|
+
if (node.kind === "javascript-asset" || node.kind === "javascript-module" && !isStaticSourceModule(node)) return "javascript";
|
|
68
|
+
if (node.kind === "worker") return "worker";
|
|
69
|
+
if (node.kind === "service-worker") return "service-worker";
|
|
70
|
+
return null;
|
|
71
|
+
};
|
|
72
|
+
isStaticSourceModule = (node) => node.observations.some(({ properties }) => properties.semantic_role === "source-module");
|
|
73
|
+
indexStaticPaths = (graph) => {
|
|
74
|
+
const nodes = new Map(graph.nodes.map((candidate) => [candidate.node_id, candidate]));
|
|
75
|
+
const relatedBySource = new Map();
|
|
76
|
+
for (const edge of graph.edges) {
|
|
77
|
+
if (edge.relation !== "maps_to") continue;
|
|
78
|
+
const target = nodes.get(edge.target_node_id);
|
|
79
|
+
if (target === undefined) continue;
|
|
80
|
+
const related = relatedBySource.get(edge.source_node_id);
|
|
81
|
+
if (related === undefined) relatedBySource.set(edge.source_node_id, [target]);
|
|
82
|
+
else related.push(target);
|
|
83
|
+
}
|
|
84
|
+
return new Map(graph.nodes.map((node) => [node.node_id, uniqueSorted([...nodePaths(node), ...usesApplicationFileDeclaration(node) ? [] : (relatedBySource.get(node.node_id) ?? []).flatMap(nodePaths)])]));
|
|
85
|
+
};
|
|
86
|
+
nodePaths = (node) => {
|
|
87
|
+
const paths = [];
|
|
88
|
+
if (node.identity.strategy === "canonical-path") paths.push(node.identity.path);
|
|
89
|
+
for (const observation of node.observations) {
|
|
90
|
+
const rawApplicationFile = node.kind === "electron-renderer" && isRawApplicationFileObservation(observation);
|
|
91
|
+
if (typeof observation.properties.path === "string") paths.push(observation.properties.path);
|
|
92
|
+
if (rawApplicationFile) continue;
|
|
93
|
+
if (typeof observation.properties.resolved_path === "string") paths.push(observation.properties.resolved_path);
|
|
94
|
+
const declaration = observation.properties.declared_path;
|
|
95
|
+
if (!hasOwnedArtifactPath(node) && typeof declaration === "string" && !declaration.includes("\\")) paths.push(declaration);
|
|
96
|
+
if (observation.evidence.location.available && observation.evidence.location.value.kind === "artifact-path") paths.push(observation.evidence.location.value.path);
|
|
97
|
+
}
|
|
98
|
+
return paths.map(relativeLogicalPath).filter((path) => path !== null && path !== "artifact-root");
|
|
99
|
+
};
|
|
100
|
+
hasOwnedArtifactPath = (node) => node.identity.strategy === "canonical-path" || node.observations.some(({ properties }) => typeof properties.path === "string") || node.observations.some((observation) => !isRawApplicationFileObservation(observation) && typeof observation.properties.resolved_path === "string");
|
|
101
|
+
isRawApplicationFileObservation = (observation) => observation.properties.resolution_context === "filesystem-expression" && typeof observation.properties.mechanism === "string" && observation.properties.mechanism.startsWith("call:") && observation.properties.mechanism.endsWith("loadFile");
|
|
102
|
+
usesApplicationFileDeclaration = (node) => node.kind === "electron-renderer" && !hasOwnedArtifactPath(node) && node.observations.some(isRawApplicationFileObservation);
|
|
103
|
+
nativeDeclarationPaths = (node) => {
|
|
104
|
+
if (hasOwnedArtifactPath(node)) return {
|
|
105
|
+
posix: [],
|
|
106
|
+
windows: []
|
|
107
|
+
};
|
|
108
|
+
const declarations = node.observations.flatMap((observation) => {
|
|
109
|
+
const { properties } = observation;
|
|
110
|
+
return properties.resolution_context === "filesystem-expression" && typeof properties.declared_path === "string" && (isRawApplicationFileObservation(observation) || properties.declared_path.includes("\\")) ? [{
|
|
111
|
+
path: properties.declared_path,
|
|
112
|
+
sourcePath: nativeDeclarationSource(observation)
|
|
113
|
+
}] : [];
|
|
114
|
+
});
|
|
115
|
+
const normalized = (windows) => {
|
|
116
|
+
const values = declarations.flatMap(({ path, sourcePath }) => {
|
|
117
|
+
if (windows && (win32.isAbsolute(path) || /^[a-z]:/iu.test(path))) return [];
|
|
118
|
+
const normalizedPath = relativeLogicalPath(windows ? path.replaceAll("\\", "/") : path);
|
|
119
|
+
return normalizedPath === null ? [] : [{
|
|
120
|
+
path: normalizedPath,
|
|
121
|
+
sourcePath
|
|
122
|
+
}];
|
|
123
|
+
});
|
|
124
|
+
return [...new Map(values.map((value) => [JSON.stringify(value), value])).values()].sort((left, right) => compareUnicodeCodePoints(left.path, right.path) || compareUnicodeCodePoints(left.sourcePath ?? "", right.sourcePath ?? ""));
|
|
125
|
+
};
|
|
126
|
+
return {
|
|
127
|
+
posix: normalized(false),
|
|
128
|
+
windows: normalized(true)
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
nativeDeclarationSource = (observation) => {
|
|
132
|
+
const location = observation.evidence.location;
|
|
133
|
+
if (!location.available) return null;
|
|
134
|
+
const source = location.value.kind === "source-range" ? location.value.source : location.value.kind === "artifact-path" ? location.value.path : null;
|
|
135
|
+
return source === null || source === "artifact-root" ? null : relativeLogicalPath(source);
|
|
136
|
+
};
|
|
137
|
+
candidateDigests = (node) => {
|
|
138
|
+
const values = [];
|
|
139
|
+
if (node.kind === "javascript-asset" && node.identity.strategy === "content-digest") values.push({
|
|
140
|
+
sha256: node.identity.sha256,
|
|
141
|
+
basis: "content-sha256"
|
|
142
|
+
});
|
|
143
|
+
if (node.kind === "javascript-module") for (const observation of node.observations) {
|
|
144
|
+
const digest = observation.properties.source_sha256;
|
|
145
|
+
if (typeof digest === "string" && /^[a-f0-9]{64}$/u.test(digest)) values.push({
|
|
146
|
+
sha256: digest,
|
|
147
|
+
basis: "module-source-sha256"
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
return [...new Map(values.map((value) => [`${value.basis}:${value.sha256}`, value])).values()];
|
|
151
|
+
};
|
|
152
|
+
pathBelowRoot = (root, value) => {
|
|
153
|
+
const rootStyle = absoluteFilePathStyle(root);
|
|
154
|
+
if (rootStyle === null || rootStyle !== absoluteFilePathStyle(value)) return null;
|
|
155
|
+
const remainder = rootStyle === "windows" ? win32.relative(root, value) : posix.relative(root, value);
|
|
156
|
+
const portableRemainder = rootStyle === "windows" ? remainder.replaceAll("\\", "/") : remainder;
|
|
157
|
+
if (remainder === "" || rootStyle === "windows" && win32.isAbsolute(remainder) || portableRemainder === ".." || portableRemainder.startsWith("../")) return null;
|
|
158
|
+
return relativeLogicalPath(portableRemainder);
|
|
159
|
+
};
|
|
160
|
+
absoluteFilePathStyle = (path) => {
|
|
161
|
+
if (/^[a-z]:[\\/]/iu.test(path) || /^(?:\\\\|\/\/)[^\\/]+[\\/][^\\/]+(?:[\\/]|$)/u.test(path)) return "windows";
|
|
162
|
+
return path.startsWith("/") ? "posix" : null;
|
|
163
|
+
};
|
|
164
|
+
pathBelowUrlPrefix = (prefix, value) => {
|
|
165
|
+
let base;
|
|
166
|
+
let candidate;
|
|
167
|
+
try {
|
|
168
|
+
base = new URL(prefix);
|
|
169
|
+
candidate = new URL(value);
|
|
170
|
+
} catch (cause) {
|
|
171
|
+
void cause;
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
if (base.origin !== candidate.origin || !candidate.pathname.startsWith(base.pathname)) return null;
|
|
175
|
+
try {
|
|
176
|
+
return relativeLogicalPath(decodeURIComponent(candidate.pathname.slice(base.pathname.length)));
|
|
177
|
+
} catch (cause) {
|
|
178
|
+
void cause;
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
activeArtifactPrefixes = (layer, entities) => {
|
|
183
|
+
const prefixes = new Set();
|
|
184
|
+
if (layer.result.format === "directory" && entities.some(({ location }) => location.kind === "file" && pathBelowRoot(layer.result.input_path, location.value) !== null)) prefixes.add("");
|
|
185
|
+
for (const mapping of layer.runtimeMappings) if (entities.some(({ location }) => mapping.kind === "file-root" && location.kind === "file" ? pathBelowRoot(mapping.root, location.value) !== null : mapping.kind === "url-prefix" && location.kind === "url" ? pathBelowUrlPrefix(mapping.prefix, location.value) !== null : false)) prefixes.add(normalizeArtifactPrefix(mapping.artifact_prefix));
|
|
186
|
+
return [...prefixes].sort(compareUnicodeCodePoints);
|
|
187
|
+
};
|
|
188
|
+
normalizeArtifactPrefix = (prefix) => prefix === "" ? "" : normalizeJoinedLogicalPath(prefix);
|
|
189
|
+
pathWithinPrefix = (path, prefix) => prefix === "" || path === prefix || path.startsWith(`${prefix}/`);
|
|
190
|
+
safeArtifactPath = (prefix, suffix) => relativeLogicalPath(prefix === "" ? suffix : posix.join(prefix, suffix));
|
|
191
|
+
relativeLogicalPath = (value) => {
|
|
192
|
+
const normalized = normalizeJoinedLogicalPath(value);
|
|
193
|
+
return normalized !== "" && normalized !== "." && !logicalPathEscapesRoot(normalized) ? normalized : null;
|
|
194
|
+
};
|
|
195
|
+
uniqueMappedPaths = (values) => [...new Map(values.map((value) => [JSON.stringify([
|
|
196
|
+
value.basis,
|
|
197
|
+
value.path,
|
|
198
|
+
value.fileStyle,
|
|
199
|
+
value.nativeRelativePath,
|
|
200
|
+
value.artifactPrefix
|
|
201
|
+
]), value])).values()].sort((left, right) => compareUnicodeCodePoints(left.path, right.path) || compareUnicodeCodePoints(left.basis, right.basis) || compareUnicodeCodePoints(left.nativeRelativePath ?? "", right.nativeRelativePath ?? "") || compareUnicodeCodePoints(left.artifactPrefix, right.artifactPrefix));
|
|
202
|
+
})))();
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
//#endregion
|
|
206
|
+
//#region dist/domain/javascript/javascriptRuntimeLoadState.js
|
|
207
|
+
var classifyStaticLoadStates, classifyLayer, residentNodes, append, isLoadStateNode, state;
|
|
208
|
+
function init_javascriptRuntimeLoadState() {
|
|
209
|
+
return (init_javascriptRuntimeLoadState = __esmMin((() => {
|
|
210
|
+
init_canonicalOrdering();
|
|
211
|
+
init_javascriptRuntimeStaticCandidates();
|
|
212
|
+
classifyStaticLoadStates = (layers, runtimeEntities, matches, options) => {
|
|
213
|
+
const states = [];
|
|
214
|
+
for (const layer of layers) {
|
|
215
|
+
const projection = classifyLayer(layer, runtimeEntities, matches, { reconciliationComplete: options.reconciliationComplete });
|
|
216
|
+
states.push(...projection.states);
|
|
217
|
+
}
|
|
218
|
+
return {
|
|
219
|
+
states,
|
|
220
|
+
omittedStates: 0
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
classifyLayer = (layer, runtimeEntities, matches, options) => {
|
|
224
|
+
const nodes = layer.graph.nodes.filter(isLoadStateNode);
|
|
225
|
+
const direct = new Map();
|
|
226
|
+
const ambiguous = new Set();
|
|
227
|
+
for (const match of matches) if (match.status === "matched" && match.static_layer_id === layer.layerId && match.static_node_id !== null) append(direct, match.static_node_id, match.runtime_node_id);
|
|
228
|
+
else if (match.status === "ambiguous") {
|
|
229
|
+
for (const candidate of match.candidate_static_nodes) if (candidate.static_layer_id === layer.layerId) ambiguous.add(candidate.static_node_id);
|
|
230
|
+
}
|
|
231
|
+
const resident = residentNodes(layer, new Set(direct.keys()));
|
|
232
|
+
const runtimeScope = createStaticRuntimeScope(layer, runtimeEntities);
|
|
233
|
+
const scopedEntities = runtimeEntities.filter((entity) => mappedRuntimePaths(layer, entity).length > 0);
|
|
234
|
+
const layerComplete = options.reconciliationComplete && layer.graph.coverage.status === "complete" && scopedEntities.length > 0 && scopedEntities.every(({ capture }) => capture.scriptsCompleteWithinScope);
|
|
235
|
+
const states = nodes.map((node) => {
|
|
236
|
+
const runtimeNodeIds = uniqueSorted(direct.get(node.node_id) ?? []);
|
|
237
|
+
if (runtimeNodeIds.length > 0) return state(layer, node, {
|
|
238
|
+
status: "loaded",
|
|
239
|
+
runtimeNodeIds,
|
|
240
|
+
reason: "runtime-script-correspondence"
|
|
241
|
+
});
|
|
242
|
+
if (resident.has(node.node_id)) return state(layer, node, {
|
|
243
|
+
status: "resident-in-loaded-asset",
|
|
244
|
+
runtimeNodeIds: [],
|
|
245
|
+
reason: "containing-asset-was-loaded"
|
|
246
|
+
});
|
|
247
|
+
if (ambiguous.has(node.node_id)) return state(layer, node, {
|
|
248
|
+
status: "unknown",
|
|
249
|
+
runtimeNodeIds: [],
|
|
250
|
+
reason: "ambiguous-runtime-candidate"
|
|
251
|
+
});
|
|
252
|
+
const nodeWithinScope = staticNodeWithinRuntimeScope(node, runtimeScope);
|
|
253
|
+
if (layerComplete && nodeWithinScope) return state(layer, node, {
|
|
254
|
+
status: "not-observed-in-capture",
|
|
255
|
+
runtimeNodeIds: [],
|
|
256
|
+
reason: "not-observed-in-bounded-capture"
|
|
257
|
+
});
|
|
258
|
+
return state(layer, node, {
|
|
259
|
+
status: "unknown",
|
|
260
|
+
runtimeNodeIds: [],
|
|
261
|
+
reason: !nodeWithinScope ? "layer-outside-runtime-scope" : "static-or-runtime-coverage-incomplete"
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
return { states };
|
|
265
|
+
};
|
|
266
|
+
residentNodes = (layer, directlyLoaded) => {
|
|
267
|
+
const nodeKinds = new Map(layer.graph.nodes.map(({ node_id: id, kind }) => [id, kind]));
|
|
268
|
+
const children = new Map();
|
|
269
|
+
for (const edge of layer.graph.edges) if (edge.relation === "contains") append(children, edge.source_node_id, edge.target_node_id);
|
|
270
|
+
const pending = [...directlyLoaded].filter((nodeId) => nodeKinds.get(nodeId) === "javascript-asset");
|
|
271
|
+
const resident = new Set();
|
|
272
|
+
for (let index = 0; index < pending.length; index += 1) {
|
|
273
|
+
const current = pending[index];
|
|
274
|
+
if (current === undefined) break;
|
|
275
|
+
for (const child of children.get(current) ?? []) {
|
|
276
|
+
if (resident.has(child)) continue;
|
|
277
|
+
resident.add(child);
|
|
278
|
+
pending.push(child);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
return resident;
|
|
282
|
+
};
|
|
283
|
+
append = (values, key, value) => {
|
|
284
|
+
const current = values.get(key);
|
|
285
|
+
if (current === undefined) values.set(key, [value]);
|
|
286
|
+
else current.push(value);
|
|
287
|
+
};
|
|
288
|
+
isLoadStateNode = (node) => node.kind === "javascript-asset" || node.kind === "javascript-chunk" || node.kind === "javascript-module";
|
|
289
|
+
state = (layer, node, input) => ({
|
|
290
|
+
static_layer_id: layer.layerId,
|
|
291
|
+
static_node_id: node.node_id,
|
|
292
|
+
kind: node.kind,
|
|
293
|
+
status: input.status,
|
|
294
|
+
runtime_node_ids: [...input.runtimeNodeIds],
|
|
295
|
+
reason: input.reason
|
|
296
|
+
});
|
|
297
|
+
})))();
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
//#endregion
|
|
301
|
+
//#region dist/domain/javascript/javascriptRuntimeReconciliationGraph.js
|
|
302
|
+
var buildReconciledApplicationGraph, boundGraphContent, preferredRootIds, graphCoverageFacts, graphCoverage, mergeNodes, uniqueEdges;
|
|
303
|
+
function init_javascriptRuntimeReconciliationGraph() {
|
|
304
|
+
return (init_javascriptRuntimeReconciliationGraph = __esmMin((() => {
|
|
305
|
+
init_javascriptApplicationGraph();
|
|
306
|
+
init_canonicalOrdering();
|
|
307
|
+
init_unicodeCodePointOrder();
|
|
308
|
+
buildReconciledApplicationGraph = (input) => {
|
|
309
|
+
const merged = mergeNodes([...input.layers.flatMap(({ graph }) => graph.nodes), ...input.runtime.nodes]);
|
|
310
|
+
const allEdges = uniqueEdges([
|
|
311
|
+
...input.layers.flatMap(({ graph }) => graph.edges),
|
|
312
|
+
...input.runtime.edges,
|
|
313
|
+
...input.reconciliationEdges
|
|
314
|
+
]);
|
|
315
|
+
const bounded = boundGraphContent(input, merged, allEdges);
|
|
316
|
+
const facts = graphCoverageFacts(input, bounded.omittedItems);
|
|
317
|
+
const graph = createJavaScriptApplicationGraph({
|
|
318
|
+
schema: "JavaScriptApplicationGraph",
|
|
319
|
+
root_node_ids: bounded.rootNodeIds,
|
|
320
|
+
nodes: bounded.nodes,
|
|
321
|
+
edges: bounded.edges,
|
|
322
|
+
coverage: graphCoverage(input, facts, bounded.nodes.length),
|
|
323
|
+
limitations: uniqueSorted([
|
|
324
|
+
...input.layers.flatMap(({ graph }) => graph.limitations),
|
|
325
|
+
"Runtime presence is bounded to passive capture windows and does not prove feature execution.",
|
|
326
|
+
"Cross-layer observed_as edges are inferences; digest equality proves byte identity only.",
|
|
327
|
+
"Source-map relationships retain their original static authority and are not promoted into runtime matches.",
|
|
328
|
+
...facts.inputStatus === "truncated" ? ["One or more source graphs or passive captures were incomplete or truncated."] : [],
|
|
329
|
+
...facts.outputTruncated ? ["The reconciled graph omitted entities or classifications during projection."] : []
|
|
330
|
+
])
|
|
331
|
+
});
|
|
332
|
+
return {
|
|
333
|
+
graph,
|
|
334
|
+
omittedGraphItems: bounded.omittedItems
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
boundGraphContent = (input, nodes, edges) => {
|
|
338
|
+
const allRoots = preferredRootIds(input);
|
|
339
|
+
const rootNodeIds = allRoots;
|
|
340
|
+
const sortedNodes = [...nodes].sort((left, right) => compareUnicodeCodePoints(left.node_id, right.node_id));
|
|
341
|
+
const retainedNodes = sortedNodes;
|
|
342
|
+
const retainedIds = new Set(retainedNodes.map(({ node_id: id }) => id));
|
|
343
|
+
const retainedEdges = [...edges].sort((left, right) => compareUnicodeCodePoints(left.edge_id, right.edge_id)).filter(({ source_node_id: source, target_node_id: target }) => retainedIds.has(source) && retainedIds.has(target));
|
|
344
|
+
return {
|
|
345
|
+
rootNodeIds,
|
|
346
|
+
nodes: retainedNodes,
|
|
347
|
+
edges: retainedEdges,
|
|
348
|
+
omittedItems: 0
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
preferredRootIds = (input) => {
|
|
352
|
+
const runtime = [...input.runtime.targetNodeByEvidenceId.values()].map(({ node_id: id }) => id);
|
|
353
|
+
const application = input.layers.filter(({ role }) => role === "application").flatMap(({ graph }) => graph.root_node_ids);
|
|
354
|
+
const supplemental = input.layers.filter(({ role }) => role !== "application").flatMap(({ graph }) => graph.root_node_ids);
|
|
355
|
+
return [...new Set([
|
|
356
|
+
...runtime,
|
|
357
|
+
...application,
|
|
358
|
+
...supplemental
|
|
359
|
+
])];
|
|
360
|
+
};
|
|
361
|
+
graphCoverageFacts = (input, omittedNodeObservations) => {
|
|
362
|
+
const projectionOmissions = input.runtime.omittedEntities + input.omittedReconciliationItems + omittedNodeObservations;
|
|
363
|
+
const captureTruncated = input.captures.some(({ inspection }) => inspection.completeness.conditions.includes("truncated"));
|
|
364
|
+
const captureHasUnknownOmissions = input.captures.some(({ inspection }) => inspection.completeness.unavailable_sections.length > 0);
|
|
365
|
+
const inputTruncated = input.layers.some(({ graph }) => graph.coverage.truncated) || captureTruncated;
|
|
366
|
+
const inputComplete = input.layers.every(({ graph }) => graph.coverage.status === "complete") && input.captures.every(({ inspection }) => inspection.completeness.status === "complete_within_window");
|
|
367
|
+
const outputTruncated = projectionOmissions > 0;
|
|
368
|
+
const sourceOmissions = input.layers.reduce((total, { graph }) => total + (graph.coverage.omitted_count ?? 0), 0);
|
|
369
|
+
const omissionsKnown = !captureTruncated && !captureHasUnknownOmissions && input.layers.every(({ graph }) => graph.coverage.omitted_count !== null);
|
|
370
|
+
return {
|
|
371
|
+
projectionOmissions,
|
|
372
|
+
knownOmissions: projectionOmissions + sourceOmissions,
|
|
373
|
+
omissionsKnown,
|
|
374
|
+
inputStatus: inputTruncated ? "truncated" : inputComplete ? "complete" : "partial",
|
|
375
|
+
outputTruncated
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
graphCoverage = (input, facts, nodeCount) => facts.inputStatus === "complete" && !facts.outputTruncated ? {
|
|
379
|
+
status: "complete",
|
|
380
|
+
truncated: false,
|
|
381
|
+
omitted_count: 0,
|
|
382
|
+
limits: []
|
|
383
|
+
} : facts.inputStatus === "truncated" || facts.outputTruncated ? {
|
|
384
|
+
status: "partial",
|
|
385
|
+
truncated: true,
|
|
386
|
+
omitted_count: facts.omissionsKnown ? facts.knownOmissions : null,
|
|
387
|
+
limits: [...facts.inputStatus === "truncated" ? [{
|
|
388
|
+
name: "runtime-reconciliation-input-coverage",
|
|
389
|
+
value: input.layers.length + input.captures.length,
|
|
390
|
+
unit: "items"
|
|
391
|
+
}] : [], ...facts.outputTruncated ? [{
|
|
392
|
+
name: "runtime-reconciliation-output-limits",
|
|
393
|
+
value: nodeCount,
|
|
394
|
+
unit: "items"
|
|
395
|
+
}] : []]
|
|
396
|
+
} : {
|
|
397
|
+
status: "partial",
|
|
398
|
+
truncated: false,
|
|
399
|
+
omitted_count: facts.omissionsKnown ? facts.knownOmissions : null,
|
|
400
|
+
limits: []
|
|
401
|
+
};
|
|
402
|
+
mergeNodes = (nodes) => {
|
|
403
|
+
const grouped = new Map();
|
|
404
|
+
for (const node of nodes) {
|
|
405
|
+
const group = grouped.get(node.node_id);
|
|
406
|
+
if (group === undefined) grouped.set(node.node_id, [node]);
|
|
407
|
+
else group.push(node);
|
|
408
|
+
}
|
|
409
|
+
const merged = [...grouped.values()].map((group) => {
|
|
410
|
+
const first = group[0];
|
|
411
|
+
if (first === undefined) throw new TypeError("Empty JAG node group");
|
|
412
|
+
if (group.some(({ kind, identity }) => kind !== first.kind || JSON.stringify(identity) !== JSON.stringify(first.identity))) throw new TypeError("Colliding JAG node identifiers disagree");
|
|
413
|
+
const observations = [...new Map(group.flatMap(({ observations: values }) => values).map((observation) => [observation.observation_id, observation])).values()].sort((left, right) => compareUnicodeCodePoints(left.observation_id, right.observation_id));
|
|
414
|
+
return createJavaScriptApplicationNode({
|
|
415
|
+
kind: first.kind,
|
|
416
|
+
identity: first.identity,
|
|
417
|
+
observations: observations.map(({ observation_id: _id, identifier_strategy: _strategy, ...value }) => value)
|
|
418
|
+
});
|
|
419
|
+
});
|
|
420
|
+
return merged;
|
|
421
|
+
};
|
|
422
|
+
uniqueEdges = (edges) => [...new Map(edges.map((edge) => [edge.edge_id, edge])).values()];
|
|
423
|
+
})))();
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region dist/domain/javascript/javascriptRuntimeReconciliationMatching.js
|
|
428
|
+
var reconcileRuntimeEntities, reconcileEntity, candidatesWithLocation, indexCandidates, appendIndex, categoryDigestKey, layerCategoryPathKey, matched, unresolved, createItem, reconciliationEvidence, strongestLocationBasis, candidateKey, uniqueCandidateReferences;
|
|
429
|
+
function init_javascriptRuntimeReconciliationMatching() {
|
|
430
|
+
return (init_javascriptRuntimeReconciliationMatching = __esmMin((() => {
|
|
431
|
+
init_javascriptApplicationGraph();
|
|
432
|
+
init_canonicalDigest();
|
|
433
|
+
init_unicodeCodePointOrder();
|
|
434
|
+
init_javascriptRuntimeStaticCandidates();
|
|
435
|
+
reconcileRuntimeEntities = (input) => {
|
|
436
|
+
const index = indexCandidates(input.candidates);
|
|
437
|
+
const evaluated = input.entities.map((entity) => reconcileEntity(entity, index, input.layers));
|
|
438
|
+
const retained = evaluated.sort((left, right) => compareUnicodeCodePoints(left.item.reconciliation_id, right.item.reconciliation_id));
|
|
439
|
+
return {
|
|
440
|
+
items: retained.map(({ item }) => item),
|
|
441
|
+
edges: retained.flatMap(({ edge }) => edge === null ? [] : [edge]),
|
|
442
|
+
omittedItems: 0
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
reconcileEntity = (entity, index, layers) => {
|
|
446
|
+
if (entity.location.kind === "unresolved") return unresolved(entity, {
|
|
447
|
+
status: "unknown",
|
|
448
|
+
basis: "none",
|
|
449
|
+
confidence: "unknown",
|
|
450
|
+
reason: "runtime-location-unresolved",
|
|
451
|
+
candidates: []
|
|
452
|
+
});
|
|
453
|
+
const locations = candidatesWithLocation(entity, index, layers);
|
|
454
|
+
if (entity.sourceSha256 !== null) {
|
|
455
|
+
const content = index.byCategoryDigest.get(categoryDigestKey(entity.staticKind, entity.sourceSha256)) ?? [];
|
|
456
|
+
const locatedKeys = new Set(locations.map(({ candidate }) => candidateKey(candidate)));
|
|
457
|
+
const combined = content.filter((candidate) => locatedKeys.has(candidateKey(candidate)));
|
|
458
|
+
const combinedCandidate = combined.at(0);
|
|
459
|
+
if (combined.length === 1 && combinedCandidate !== undefined) return matched(entity, combinedCandidate, {
|
|
460
|
+
basis: "content-and-location",
|
|
461
|
+
confidence: "high",
|
|
462
|
+
reason: "content-and-location-match"
|
|
463
|
+
});
|
|
464
|
+
const contentCandidate = content.at(0);
|
|
465
|
+
if (content.length === 1 && contentCandidate !== undefined) {
|
|
466
|
+
const candidate = contentCandidate;
|
|
467
|
+
const digestBasis = candidate.digests.find(({ sha256 }) => sha256 === entity.sourceSha256)?.basis;
|
|
468
|
+
return matched(entity, candidate, {
|
|
469
|
+
basis: digestBasis ?? "content-sha256",
|
|
470
|
+
confidence: "high",
|
|
471
|
+
reason: "unique-content-match"
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
if (content.length > 1) return unresolved(entity, {
|
|
475
|
+
status: "ambiguous",
|
|
476
|
+
basis: "none",
|
|
477
|
+
confidence: "unknown",
|
|
478
|
+
reason: "ambiguous-static-candidates",
|
|
479
|
+
candidates: content
|
|
480
|
+
});
|
|
481
|
+
if (locations.length > 0) return unresolved(entity, {
|
|
482
|
+
status: "unmatched",
|
|
483
|
+
basis: strongestLocationBasis(locations),
|
|
484
|
+
confidence: "high",
|
|
485
|
+
reason: "captured-content-disagrees-with-static-location",
|
|
486
|
+
candidates: locations.map(({ candidate }) => candidate)
|
|
487
|
+
});
|
|
488
|
+
return unresolved(entity, {
|
|
489
|
+
status: "unmatched",
|
|
490
|
+
basis: "none",
|
|
491
|
+
confidence: "high",
|
|
492
|
+
reason: "no-static-content-match",
|
|
493
|
+
candidates: []
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
const location = locations.at(0);
|
|
497
|
+
if (locations.length === 1 && location !== undefined) {
|
|
498
|
+
const located = location;
|
|
499
|
+
return matched(entity, located.candidate, {
|
|
500
|
+
basis: located.mapping.basis,
|
|
501
|
+
confidence: "medium",
|
|
502
|
+
reason: "unique-location-match"
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
if (locations.length > 1) return unresolved(entity, {
|
|
506
|
+
status: "ambiguous",
|
|
507
|
+
basis: strongestLocationBasis(locations),
|
|
508
|
+
confidence: "unknown",
|
|
509
|
+
reason: "ambiguous-static-candidates",
|
|
510
|
+
candidates: locations.map(({ candidate }) => candidate)
|
|
511
|
+
});
|
|
512
|
+
const mapped = layers.some((layer) => mappedRuntimePaths(layer, entity).length > 0);
|
|
513
|
+
return unresolved(entity, {
|
|
514
|
+
status: mapped ? "unmatched" : "unknown",
|
|
515
|
+
basis: "none",
|
|
516
|
+
confidence: "unknown",
|
|
517
|
+
reason: mapped ? "no-static-content-match" : "no-authorized-location-mapping",
|
|
518
|
+
candidates: []
|
|
519
|
+
});
|
|
520
|
+
};
|
|
521
|
+
candidatesWithLocation = (entity, index, layers) => {
|
|
522
|
+
const located = new Map();
|
|
523
|
+
for (const layer of layers) for (const mapping of mappedRuntimePaths(layer, entity)) for (const candidate of [...index.byLayerCategoryPath.get(layerCategoryPathKey(layer.layerId, entity.staticKind, mapping.path)) ?? [], ...mapping.fileStyle === null || mapping.nativeRelativePath === null ? [] : (index.byNativeDeclarationPath.get(`${mapping.fileStyle}\0${layerCategoryPathKey(layer.layerId, entity.staticKind, mapping.nativeRelativePath)}`) ?? []).filter(({ sourcePath }) => mapping.artifactPrefix === "" || sourcePath !== null && sourcePath.startsWith(`${mapping.artifactPrefix}/`)).map(({ candidate }) => candidate)]) {
|
|
524
|
+
const key = candidateKey(candidate);
|
|
525
|
+
if (!located.has(key)) located.set(key, {
|
|
526
|
+
candidate,
|
|
527
|
+
mapping
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
return [...located.values()].sort((left, right) => compareUnicodeCodePoints(candidateKey(left.candidate), candidateKey(right.candidate)));
|
|
531
|
+
};
|
|
532
|
+
indexCandidates = (candidates) => {
|
|
533
|
+
const byCategoryDigest = new Map();
|
|
534
|
+
const byLayerCategoryPath = new Map();
|
|
535
|
+
const byNativeDeclarationPath = new Map();
|
|
536
|
+
for (const candidate of candidates) {
|
|
537
|
+
for (const { sha256 } of candidate.digests) appendIndex(byCategoryDigest, categoryDigestKey(candidate.category, sha256), candidate);
|
|
538
|
+
for (const path of candidate.paths) appendIndex(byLayerCategoryPath, layerCategoryPathKey(candidate.layer.layerId, candidate.category, path), candidate);
|
|
539
|
+
for (const style of ["posix", "windows"]) for (const { path, sourcePath } of candidate.nativeDeclarationPaths[style]) appendIndex(byNativeDeclarationPath, `${style}\0${layerCategoryPathKey(candidate.layer.layerId, candidate.category, path)}`, {
|
|
540
|
+
candidate,
|
|
541
|
+
sourcePath
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
return {
|
|
545
|
+
byCategoryDigest,
|
|
546
|
+
byLayerCategoryPath,
|
|
547
|
+
byNativeDeclarationPath
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
appendIndex = (index, key, candidate) => {
|
|
551
|
+
const values = index.get(key);
|
|
552
|
+
if (values === undefined) index.set(key, [candidate]);
|
|
553
|
+
else values.push(candidate);
|
|
554
|
+
};
|
|
555
|
+
categoryDigestKey = (category, digest) => `${category}\0${digest}`;
|
|
556
|
+
layerCategoryPathKey = (layerId, category, path) => `${layerId}\0${category}\0${path}`;
|
|
557
|
+
matched = (entity, candidate, input) => {
|
|
558
|
+
const item = createItem(entity, {
|
|
559
|
+
layer: candidate.layer,
|
|
560
|
+
staticNodeId: candidate.node.node_id,
|
|
561
|
+
status: "matched",
|
|
562
|
+
basis: input.basis,
|
|
563
|
+
confidence: input.confidence,
|
|
564
|
+
reason: input.reason,
|
|
565
|
+
candidates: [candidate]
|
|
566
|
+
});
|
|
567
|
+
return {
|
|
568
|
+
item,
|
|
569
|
+
edge: createJavaScriptApplicationEdge({
|
|
570
|
+
source_node_id: candidate.node.node_id,
|
|
571
|
+
target_node_id: entity.node.node_id,
|
|
572
|
+
relation: "observed_as",
|
|
573
|
+
properties: {
|
|
574
|
+
reconciliation_id: item.reconciliation_id,
|
|
575
|
+
basis: input.basis,
|
|
576
|
+
static_layer_id: candidate.layer.layerId
|
|
577
|
+
},
|
|
578
|
+
evidence: reconciliationEvidence(entity, candidate.layer, input.basis, input.confidence)
|
|
579
|
+
})
|
|
580
|
+
};
|
|
581
|
+
};
|
|
582
|
+
unresolved = (entity, input) => ({
|
|
583
|
+
item: createItem(entity, {
|
|
584
|
+
layer: null,
|
|
585
|
+
staticNodeId: null,
|
|
586
|
+
status: input.status,
|
|
587
|
+
basis: input.basis,
|
|
588
|
+
confidence: input.confidence,
|
|
589
|
+
reason: input.reason,
|
|
590
|
+
candidates: input.candidates
|
|
591
|
+
}),
|
|
592
|
+
edge: null
|
|
593
|
+
});
|
|
594
|
+
createItem = (entity, input) => {
|
|
595
|
+
const candidateReferences = uniqueCandidateReferences(input.candidates);
|
|
596
|
+
const staticMatch = input.status === "matched" ? {
|
|
597
|
+
static_layer_id: input.layer.layerId,
|
|
598
|
+
static_node_id: input.staticNodeId,
|
|
599
|
+
status: input.status
|
|
600
|
+
} : {
|
|
601
|
+
static_layer_id: null,
|
|
602
|
+
static_node_id: null,
|
|
603
|
+
status: input.status
|
|
604
|
+
};
|
|
605
|
+
const semantic = {
|
|
606
|
+
entity_kind: entity.kind,
|
|
607
|
+
runtime_evidence_id: entity.capture.evidence.evidence_id,
|
|
608
|
+
runtime_node_id: entity.node.node_id,
|
|
609
|
+
...staticMatch,
|
|
610
|
+
basis: input.basis,
|
|
611
|
+
confidence: input.confidence,
|
|
612
|
+
reason: input.reason,
|
|
613
|
+
candidate_static_count: candidateReferences.count,
|
|
614
|
+
candidate_static_nodes: candidateReferences.items
|
|
615
|
+
};
|
|
616
|
+
return {
|
|
617
|
+
reconciliation_id: `jrr_item_${digestCanonicalValue(semantic, "Runtime reconciliation")}`,
|
|
618
|
+
...semantic
|
|
619
|
+
};
|
|
620
|
+
};
|
|
621
|
+
reconciliationEvidence = (entity, layer, basis, confidence) => {
|
|
622
|
+
const observation = entity.node.observations.at(0);
|
|
623
|
+
if (observation === undefined) throw new TypeError("Runtime reconciliation entity has no observation");
|
|
624
|
+
return {
|
|
625
|
+
authority: "cross-layer-reconciliation",
|
|
626
|
+
state: "inferred",
|
|
627
|
+
confidence: confidence === "medium" ? "medium" : "high",
|
|
628
|
+
artifact: entity.sourceSha256 === null ? {
|
|
629
|
+
available: false,
|
|
630
|
+
reason: "not-observed",
|
|
631
|
+
detail: "Runtime source bytes were not captured for this mapping."
|
|
632
|
+
} : {
|
|
633
|
+
available: true,
|
|
634
|
+
artifact_id: `art_${entity.sourceSha256}`,
|
|
635
|
+
sha256: entity.sourceSha256
|
|
636
|
+
},
|
|
637
|
+
location: observation.evidence.location,
|
|
638
|
+
extractor: {
|
|
639
|
+
name: "rea-javascript-runtime-reconciliation",
|
|
640
|
+
version: "1",
|
|
641
|
+
operation: "reconcile_javascript_runtime",
|
|
642
|
+
executable_sha256: null
|
|
643
|
+
},
|
|
644
|
+
coverage: layer.graph.coverage.status === "complete" && entity.capture.scriptsCompleteWithinScope ? {
|
|
645
|
+
status: "complete",
|
|
646
|
+
truncated: false,
|
|
647
|
+
omitted_count: 0,
|
|
648
|
+
limits: []
|
|
649
|
+
} : {
|
|
650
|
+
status: "partial",
|
|
651
|
+
truncated: false,
|
|
652
|
+
omitted_count: null,
|
|
653
|
+
limits: []
|
|
654
|
+
},
|
|
655
|
+
limitations: [basis === "content-sha256" || basis === "module-source-sha256" || basis === "content-and-location" ? "Equal content digests establish byte identity, not execution causality." : "Location correspondence is inferred from an artifact root or caller-declared mapping.", "Passive script parsing or target presence does not prove feature execution."],
|
|
656
|
+
evidence_ids: [layer.evidence.evidence_id, entity.capture.evidence.evidence_id].sort()
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
strongestLocationBasis = (values) => {
|
|
660
|
+
const bases = new Set(values.map(({ mapping }) => mapping.basis));
|
|
661
|
+
if (bases.has("artifact-path")) return "artifact-path";
|
|
662
|
+
if (bases.has("operator-file-mapping")) return "operator-file-mapping";
|
|
663
|
+
return "operator-url-mapping";
|
|
664
|
+
};
|
|
665
|
+
candidateKey = (candidate) => `${candidate.layer.layerId}:${candidate.node.node_id}`;
|
|
666
|
+
uniqueCandidateReferences = (candidates) => {
|
|
667
|
+
const seen = new Set();
|
|
668
|
+
let count = 0;
|
|
669
|
+
const items = [];
|
|
670
|
+
for (const { layer, node } of candidates) {
|
|
671
|
+
const key = `${layer.layerId}:${node.node_id}`;
|
|
672
|
+
if (seen.has(key)) continue;
|
|
673
|
+
seen.add(key);
|
|
674
|
+
count += 1;
|
|
675
|
+
items.push({
|
|
676
|
+
static_layer_id: layer.layerId,
|
|
677
|
+
static_node_id: node.node_id
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
return {
|
|
681
|
+
count,
|
|
682
|
+
items
|
|
683
|
+
};
|
|
684
|
+
};
|
|
685
|
+
})))();
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
//#endregion
|
|
689
|
+
//#region dist/domain/javascript/javascriptRuntimeReconciliationInputValidation.js
|
|
690
|
+
var parseAtPath, invalidInput, assertEvidenceIdentity;
|
|
691
|
+
function init_javascriptRuntimeReconciliationInputValidation() {
|
|
692
|
+
return (init_javascriptRuntimeReconciliationInputValidation = __esmMin((() => {
|
|
693
|
+
parseAtPath = (parse, input, path) => {
|
|
694
|
+
try {
|
|
695
|
+
return parse(input);
|
|
696
|
+
} catch (cause) {
|
|
697
|
+
if (cause instanceof z.ZodError) throw new z.ZodError(cause.issues.map((issue) => ({
|
|
698
|
+
...issue,
|
|
699
|
+
path: [...path, ...issue.path]
|
|
700
|
+
})));
|
|
701
|
+
throw cause;
|
|
702
|
+
}
|
|
703
|
+
};
|
|
704
|
+
invalidInput = (path, message) => new z.ZodError([{
|
|
705
|
+
code: "custom",
|
|
706
|
+
path: [...path],
|
|
707
|
+
message
|
|
708
|
+
}]);
|
|
709
|
+
assertEvidenceIdentity = (evidence, expected, path) => {
|
|
710
|
+
if (evidence.operation !== expected.operation || evidence.predicate_type !== expected.predicate || evidence.provider.id !== expected.providerId || evidence.provider.name !== expected.providerName || evidence.provider.version !== expected.providerVersion || evidence.authority !== expected.authority || evidence.confidence !== expected.confidence) throw invalidInput(path, `Evidence does not match the supported ${expected.operation} contract`);
|
|
711
|
+
};
|
|
712
|
+
})))();
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
//#endregion
|
|
716
|
+
//#region dist/domain/javascript/javascriptRuntimeReconciliationParsing.js
|
|
717
|
+
var parseStaticLayers, parseStaticLayer;
|
|
718
|
+
function init_javascriptRuntimeReconciliationParsing() {
|
|
719
|
+
return (init_javascriptRuntimeReconciliationParsing = __esmMin((() => {
|
|
720
|
+
init_canonicalDigest();
|
|
721
|
+
init_unicodeCodePointOrder();
|
|
722
|
+
init_evidence();
|
|
723
|
+
init_javascriptApplicationAnalysis();
|
|
724
|
+
init_javascriptRuntimeReconciliationInputValidation();
|
|
725
|
+
parseStaticLayers = (layers, path = ["static_layers"]) => layers.map((layer, index) => parseStaticLayer(layer, [
|
|
726
|
+
...path,
|
|
727
|
+
index,
|
|
728
|
+
"analysis"
|
|
729
|
+
])).sort((left, right) => compareUnicodeCodePoints(left.layerId, right.layerId));
|
|
730
|
+
parseStaticLayer = (layer, evidencePath) => {
|
|
731
|
+
const evidence = parseAtPath(parseEvidence, layer.analysis, evidencePath);
|
|
732
|
+
const result = parseAtPath((value) => javascriptApplicationAnalysisResultSchema.parse(value), evidence.normalized_result, [...evidencePath, "normalized_result"]);
|
|
733
|
+
assertEvidenceIdentity(evidence, {
|
|
734
|
+
operation: "analyze_javascript_application",
|
|
735
|
+
predicate: "rea.javascript-application-analysis",
|
|
736
|
+
providerId: "rea-javascript-application",
|
|
737
|
+
providerName: "REA JavaScript application analyzer",
|
|
738
|
+
providerVersion: "1",
|
|
739
|
+
authority: "shipped-artifact",
|
|
740
|
+
confidence: "derived"
|
|
741
|
+
}, evidencePath);
|
|
742
|
+
if (evidence.subject === null || evidence.subject.digest.sha256 !== result.root_artifact_sha256 || evidence.subject.format !== result.format || evidence.subject.local_path !== result.input_path) throw invalidInput([...evidencePath, "subject"], "JavaScript application Evidence subject disagrees with its result");
|
|
743
|
+
return {
|
|
744
|
+
layerId: `jrl_${digestCanonicalValue({
|
|
745
|
+
role: layer.role,
|
|
746
|
+
evidence_id: evidence.evidence_id,
|
|
747
|
+
runtime_mappings: layer.runtime_mappings
|
|
748
|
+
}, "Runtime reconciliation")}`,
|
|
749
|
+
role: layer.role,
|
|
750
|
+
evidence,
|
|
751
|
+
result,
|
|
752
|
+
graph: result.graph,
|
|
753
|
+
runtimeMappings: layer.runtime_mappings
|
|
754
|
+
};
|
|
755
|
+
};
|
|
756
|
+
})))();
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
//#endregion
|
|
760
|
+
//#region dist/domain/javascript/javascriptRuntimeReconciliationActive.js
|
|
761
|
+
var parseActiveElectronCapture, absolutePathSchema, assertIdentity, normalizeInspection;
|
|
762
|
+
function init_javascriptRuntimeReconciliationActive() {
|
|
763
|
+
return (init_javascriptRuntimeReconciliationActive = __esmMin((() => {
|
|
764
|
+
init_canonicalDigest();
|
|
765
|
+
init_localPath();
|
|
766
|
+
init_javascriptRuntimeReconciliationInputValidation();
|
|
767
|
+
init_browserCompleteness();
|
|
768
|
+
init_electronActiveObservation();
|
|
769
|
+
parseActiveElectronCapture = (evidence) => {
|
|
770
|
+
assertIdentity(evidence);
|
|
771
|
+
const result = parseAtPath((value) => electronActiveObservationResultSchema.parse(value), evidence.normalized_result, ["normalized_result"]);
|
|
772
|
+
const parameters = parseAtPath((value) => z.object({
|
|
773
|
+
application_path: absolutePathSchema,
|
|
774
|
+
application_root: absolutePathSchema
|
|
775
|
+
}).passthrough().parse(value), evidence.parameters, ["parameters"]);
|
|
776
|
+
if (result.application.application_path !== parameters.application_path || !isPathWithinRoot(parameters.application_root, result.application.application_path)) throw invalidInput([
|
|
777
|
+
"normalized_result",
|
|
778
|
+
"application",
|
|
779
|
+
"application_path"
|
|
780
|
+
], "Active Electron Evidence application path disagrees with its configured root");
|
|
781
|
+
return {
|
|
782
|
+
kind: "electron-active",
|
|
783
|
+
evidence,
|
|
784
|
+
inspection: normalizeInspection(result),
|
|
785
|
+
captureSha256: digestCanonicalValue(result, "Runtime reconciliation"),
|
|
786
|
+
scriptsCompleteWithinScope: false
|
|
787
|
+
};
|
|
788
|
+
};
|
|
789
|
+
absolutePathSchema = z.string().min(1).refine(isAbsolute);
|
|
790
|
+
assertIdentity = (evidence) => {
|
|
791
|
+
if (evidence.operation !== "capture_electron_scenario" || evidence.predicate_type !== "rea.electron-active-scenario" || evidence.provider.id !== "rea-playwright-electron-active" || evidence.provider.name !== "REA Playwright active Electron observation provider" || evidence.provider.version !== "1" || evidence.authority !== "controlled-replay" || evidence.confidence !== "observed") throw invalidInput([], "Evidence does not match the supported capture_electron_scenario contract");
|
|
792
|
+
};
|
|
793
|
+
normalizeInspection = (result) => ({
|
|
794
|
+
target: {
|
|
795
|
+
target_id: `electron-active:${digestCanonicalValue(result.application.application_path, "Runtime reconciliation").slice(0, 32)}`,
|
|
796
|
+
type: "electron-application",
|
|
797
|
+
title: result.application.application_path,
|
|
798
|
+
attached: true,
|
|
799
|
+
file_path: result.application.application_path
|
|
800
|
+
},
|
|
801
|
+
frames: [],
|
|
802
|
+
scripts: { items: [] },
|
|
803
|
+
workers: [],
|
|
804
|
+
completeness: classifyBrowserCompleteness({
|
|
805
|
+
policyFilteredSections: new Set(),
|
|
806
|
+
attachLimitedSections: new Set(),
|
|
807
|
+
truncatedSections: new Set(),
|
|
808
|
+
unavailableSections: new Set([
|
|
809
|
+
"frames",
|
|
810
|
+
"scripts",
|
|
811
|
+
"script_sources",
|
|
812
|
+
"workers"
|
|
813
|
+
]),
|
|
814
|
+
excluded: [],
|
|
815
|
+
droppedEvents: {
|
|
816
|
+
scripts: 0,
|
|
817
|
+
network_requests: 0,
|
|
818
|
+
console_events: 0,
|
|
819
|
+
websocket_connections: 0,
|
|
820
|
+
websocket_frames: 0,
|
|
821
|
+
webmcp_tools: 0,
|
|
822
|
+
timeline_events: 0
|
|
823
|
+
}
|
|
824
|
+
})
|
|
825
|
+
});
|
|
826
|
+
})))();
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
//#endregion
|
|
830
|
+
//#region dist/domain/javascript/javascriptRuntimeReconciliationCaptureParsing.js
|
|
831
|
+
var parseRuntimeCaptures, parseRuntimeCapture, parseBrowserCapture, parseElectronCapture, parseV8Capture, assertV8RuntimeParameters, normalizeV8Inspection, runtimeLocation, excludedV8Scripts, assertRuntimeParameters, scriptsComplete;
|
|
832
|
+
function init_javascriptRuntimeReconciliationCaptureParsing() {
|
|
833
|
+
return (init_javascriptRuntimeReconciliationCaptureParsing = __esmMin((() => {
|
|
834
|
+
init_browserObservation();
|
|
835
|
+
init_browserObservationSchemas();
|
|
836
|
+
init_browserCompleteness();
|
|
837
|
+
init_electronObservation();
|
|
838
|
+
init_javascriptRuntimeObservation();
|
|
839
|
+
init_canonicalDigest();
|
|
840
|
+
init_unicodeCodePointOrder();
|
|
841
|
+
init_evidence();
|
|
842
|
+
init_javascriptRuntimeReconciliationActive();
|
|
843
|
+
init_javascriptRuntimeReconciliationInputValidation();
|
|
844
|
+
parseRuntimeCaptures = (observations, path = ["runtime_observations"]) => observations.map((observation, index) => parseRuntimeCapture(observation, [...path, index])).sort((left, right) => compareUnicodeCodePoints(left.evidence.evidence_id, right.evidence.evidence_id));
|
|
845
|
+
parseRuntimeCapture = (input, evidencePath) => {
|
|
846
|
+
const evidence = parseAtPath(parseEvidence, input, evidencePath);
|
|
847
|
+
if (evidence.operation === "inspect_web_page") return parseBrowserCapture(evidence, evidencePath);
|
|
848
|
+
if (evidence.operation === "inspect_electron_page") return parseElectronCapture(evidence, evidencePath);
|
|
849
|
+
if (evidence.operation === "observe_javascript_runtime") return parseV8Capture(evidence, evidencePath);
|
|
850
|
+
if (evidence.operation === "capture_electron_scenario") {
|
|
851
|
+
return parseAtPath(() => parseActiveElectronCapture(evidence), evidence, evidencePath);
|
|
852
|
+
}
|
|
853
|
+
throw invalidInput(evidencePath, "Runtime reconciliation requires inspect_web_page, inspect_electron_page, observe_javascript_runtime, or capture_electron_scenario Evidence");
|
|
854
|
+
};
|
|
855
|
+
parseBrowserCapture = (evidence, path) => {
|
|
856
|
+
assertEvidenceIdentity(evidence, {
|
|
857
|
+
operation: "inspect_web_page",
|
|
858
|
+
predicate: "rea.web-page-inspection",
|
|
859
|
+
providerId: "rea-cdp-browser",
|
|
860
|
+
providerName: "REA Chrome DevTools Protocol observation provider",
|
|
861
|
+
providerVersion: "2",
|
|
862
|
+
authority: "external-service",
|
|
863
|
+
confidence: "observed"
|
|
864
|
+
}, path);
|
|
865
|
+
const inspection = parseAtPath((value) => webPageInspectionSchema.parse(value), evidence.normalized_result, [...path, "normalized_result"]);
|
|
866
|
+
assertRuntimeParameters(evidence, {
|
|
867
|
+
kind: "browser",
|
|
868
|
+
targetId: inspection.target.target_id,
|
|
869
|
+
targetOrigin: inspection.target.origin,
|
|
870
|
+
sourceIncluded: inspection.scripts.items.some(({ source }) => source.included)
|
|
871
|
+
}, path);
|
|
872
|
+
return {
|
|
873
|
+
kind: "browser",
|
|
874
|
+
evidence,
|
|
875
|
+
inspection,
|
|
876
|
+
captureSha256: digestCanonicalValue(inspection, "Runtime reconciliation"),
|
|
877
|
+
scriptsCompleteWithinScope: scriptsComplete(inspection.completeness)
|
|
878
|
+
};
|
|
879
|
+
};
|
|
880
|
+
parseElectronCapture = (evidence, path) => {
|
|
881
|
+
assertEvidenceIdentity(evidence, {
|
|
882
|
+
operation: "inspect_electron_page",
|
|
883
|
+
predicate: "rea.electron-page-inspection",
|
|
884
|
+
providerId: "rea-cdp-electron",
|
|
885
|
+
providerName: "REA Electron file-page CDP observation provider",
|
|
886
|
+
providerVersion: "1",
|
|
887
|
+
authority: "external-service",
|
|
888
|
+
confidence: "observed"
|
|
889
|
+
}, path);
|
|
890
|
+
const inspection = parseAtPath((value) => electronPageInspectionSchema.parse(value), evidence.normalized_result, [...path, "normalized_result"]);
|
|
891
|
+
assertRuntimeParameters(evidence, {
|
|
892
|
+
kind: "electron",
|
|
893
|
+
targetId: inspection.target.target_id,
|
|
894
|
+
sourceIncluded: inspection.scripts.items.some(({ source }) => source.included)
|
|
895
|
+
}, path);
|
|
896
|
+
return {
|
|
897
|
+
kind: "electron",
|
|
898
|
+
evidence,
|
|
899
|
+
inspection,
|
|
900
|
+
captureSha256: digestCanonicalValue(inspection, "Runtime reconciliation"),
|
|
901
|
+
scriptsCompleteWithinScope: scriptsComplete(inspection.completeness)
|
|
902
|
+
};
|
|
903
|
+
};
|
|
904
|
+
parseV8Capture = (evidence, path) => {
|
|
905
|
+
assertEvidenceIdentity(evidence, {
|
|
906
|
+
operation: "observe_javascript_runtime",
|
|
907
|
+
predicate: "rea.javascript-runtime-observation",
|
|
908
|
+
providerId: "rea-v8-inspector",
|
|
909
|
+
providerName: "REA passive Node/Electron V8 Inspector provider",
|
|
910
|
+
providerVersion: "1",
|
|
911
|
+
authority: "external-service",
|
|
912
|
+
confidence: "observed"
|
|
913
|
+
}, path);
|
|
914
|
+
const result = parseAtPath((value) => javascriptRuntimeObservationSchema.parse(value), evidence.normalized_result, [...path, "normalized_result"]);
|
|
915
|
+
assertV8RuntimeParameters(evidence, result, path);
|
|
916
|
+
return {
|
|
917
|
+
kind: "v8-inspector",
|
|
918
|
+
evidence,
|
|
919
|
+
inspection: normalizeV8Inspection(result),
|
|
920
|
+
captureSha256: digestCanonicalValue(result, "Runtime reconciliation"),
|
|
921
|
+
scriptsCompleteWithinScope: false
|
|
922
|
+
};
|
|
923
|
+
};
|
|
924
|
+
assertV8RuntimeParameters = (evidence, result, path) => {
|
|
925
|
+
const parameters = parseAtPath((value) => z.object({
|
|
926
|
+
inspector_endpoint: browserEndpointSchema,
|
|
927
|
+
target_id: z.string().trim().min(1),
|
|
928
|
+
runtime_kind: javascriptRuntimeKindSchema.optional()
|
|
929
|
+
}).passthrough().parse(value), evidence.parameters, [...path, "parameters"]);
|
|
930
|
+
if (parameters.target_id !== result.target.target_id || parameters.runtime_kind !== undefined && parameters.runtime_kind !== result.target.runtime_kind) throw invalidInput([
|
|
931
|
+
...path,
|
|
932
|
+
"parameters",
|
|
933
|
+
"target_id"
|
|
934
|
+
], "Runtime Evidence target or declared role disagrees with its result");
|
|
935
|
+
if (result.target.location.kind === "builtin" && !result.target.location.specifier.startsWith("node:")) throw invalidInput([
|
|
936
|
+
...path,
|
|
937
|
+
"normalized_result",
|
|
938
|
+
"target",
|
|
939
|
+
"location"
|
|
940
|
+
], "Runtime Evidence contains an invalid builtin location");
|
|
941
|
+
for (const [index, { location }] of result.scripts.items.entries()) if (location.kind === "builtin" && !location.specifier.startsWith("node:")) throw invalidInput([
|
|
942
|
+
...path,
|
|
943
|
+
"normalized_result",
|
|
944
|
+
"scripts",
|
|
945
|
+
"items",
|
|
946
|
+
index,
|
|
947
|
+
"location"
|
|
948
|
+
], "Runtime Evidence contains an invalid builtin location");
|
|
949
|
+
};
|
|
950
|
+
normalizeV8Inspection = (result) => ({
|
|
951
|
+
target: {
|
|
952
|
+
target_id: result.target.target_id,
|
|
953
|
+
type: result.target.protocol_type,
|
|
954
|
+
title: result.target.runtime_kind,
|
|
955
|
+
attached: result.target.attached,
|
|
956
|
+
...result.target.location.kind === "unresolved" ? { unresolved_location: result.target.location } : runtimeLocation(result.target.location)
|
|
957
|
+
},
|
|
958
|
+
frames: [],
|
|
959
|
+
scripts: { items: result.scripts.items.map((script) => ({
|
|
960
|
+
script_key: script.script_key,
|
|
961
|
+
frame_id: script.execution_context_key,
|
|
962
|
+
...runtimeLocation(script.location),
|
|
963
|
+
cdp_hash: script.cdp_hash,
|
|
964
|
+
length: script.length,
|
|
965
|
+
is_module: script.is_module,
|
|
966
|
+
language: null,
|
|
967
|
+
source: {
|
|
968
|
+
included: false,
|
|
969
|
+
reason: "V8 Inspector source capture is outside passive authority."
|
|
970
|
+
}
|
|
971
|
+
})) },
|
|
972
|
+
workers: [],
|
|
973
|
+
completeness: classifyBrowserCompleteness({
|
|
974
|
+
policyFilteredSections: new Set(excludedV8Scripts(result) > 0 ? ["scripts"] : []),
|
|
975
|
+
attachLimitedSections: new Set([
|
|
976
|
+
"frames",
|
|
977
|
+
"scripts",
|
|
978
|
+
"script_sources",
|
|
979
|
+
"workers"
|
|
980
|
+
]),
|
|
981
|
+
truncatedSections: new Set(result.capture.truncated ? ["scripts"] : []),
|
|
982
|
+
unavailableSections: new Set([
|
|
983
|
+
"frames",
|
|
984
|
+
"script_sources",
|
|
985
|
+
"workers"
|
|
986
|
+
]),
|
|
987
|
+
excluded: excludedV8Scripts(result) === 0 ? [] : [{
|
|
988
|
+
section: "scripts",
|
|
989
|
+
reason: "out_of_target_scope",
|
|
990
|
+
count: excludedV8Scripts(result)
|
|
991
|
+
}],
|
|
992
|
+
droppedEvents: {
|
|
993
|
+
scripts: result.capture.events_dropped,
|
|
994
|
+
network_requests: 0,
|
|
995
|
+
console_events: 0,
|
|
996
|
+
websocket_connections: 0,
|
|
997
|
+
websocket_frames: 0,
|
|
998
|
+
webmcp_tools: 0,
|
|
999
|
+
timeline_events: 0
|
|
1000
|
+
}
|
|
1001
|
+
})
|
|
1002
|
+
});
|
|
1003
|
+
runtimeLocation = (location) => {
|
|
1004
|
+
if (location.kind === "unresolved") return { unresolved_location: location };
|
|
1005
|
+
if (location.kind === "file") return { file_path: location.file_path };
|
|
1006
|
+
if (location.kind === "url") return { url: location.sanitized_url };
|
|
1007
|
+
return { url: location.specifier };
|
|
1008
|
+
};
|
|
1009
|
+
excludedV8Scripts = (result) => Object.values(result.scripts.excluded).reduce((total, count) => total + count, 0);
|
|
1010
|
+
assertRuntimeParameters = (evidence, expected, path) => {
|
|
1011
|
+
const common = {
|
|
1012
|
+
target_id: z.string().trim().min(1),
|
|
1013
|
+
include_script_sources: z.boolean()
|
|
1014
|
+
};
|
|
1015
|
+
if (expected.kind === "browser") {
|
|
1016
|
+
const parameters = parseAtPath((value) => z.object({
|
|
1017
|
+
...common,
|
|
1018
|
+
cdp_endpoint: recordedBrowserObservationEndpointSchema,
|
|
1019
|
+
allowed_origins: browserAllowedOriginsSchema
|
|
1020
|
+
}).passthrough().parse(value), evidence.parameters, [...path, "parameters"]);
|
|
1021
|
+
if (parameters.target_id !== expected.targetId) throw invalidInput([
|
|
1022
|
+
...path,
|
|
1023
|
+
"parameters",
|
|
1024
|
+
"target_id"
|
|
1025
|
+
], "Runtime Evidence target disagrees with its captured result");
|
|
1026
|
+
if (!parameters.allowed_origins.includes(expected.targetOrigin)) throw invalidInput([
|
|
1027
|
+
...path,
|
|
1028
|
+
"parameters",
|
|
1029
|
+
"allowed_origins"
|
|
1030
|
+
], "Browser Evidence target is outside its recorded origin scope");
|
|
1031
|
+
if (expected.sourceIncluded && !parameters.include_script_sources) throw invalidInput([
|
|
1032
|
+
...path,
|
|
1033
|
+
"parameters",
|
|
1034
|
+
"include_script_sources"
|
|
1035
|
+
], "Runtime Evidence contains source without source-capture selection");
|
|
1036
|
+
return;
|
|
1037
|
+
}
|
|
1038
|
+
const parameters = parseAtPath((value) => z.object({
|
|
1039
|
+
...common,
|
|
1040
|
+
cdp_endpoint: browserEndpointSchema
|
|
1041
|
+
}).passthrough().parse(value), evidence.parameters, [...path, "parameters"]);
|
|
1042
|
+
if (parameters.target_id !== expected.targetId) throw invalidInput([
|
|
1043
|
+
...path,
|
|
1044
|
+
"parameters",
|
|
1045
|
+
"target_id"
|
|
1046
|
+
], "Runtime Evidence target disagrees with its captured result");
|
|
1047
|
+
if (expected.sourceIncluded && !parameters.include_script_sources) throw invalidInput([
|
|
1048
|
+
...path,
|
|
1049
|
+
"parameters",
|
|
1050
|
+
"include_script_sources"
|
|
1051
|
+
], "Runtime Evidence contains source without source-capture selection");
|
|
1052
|
+
};
|
|
1053
|
+
scriptsComplete = (completeness) => !completeness.truncated_sections.includes("scripts") && !completeness.unavailable_sections.includes("scripts") && completeness.dropped_events.scripts === 0;
|
|
1054
|
+
})))();
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
//#endregion
|
|
1058
|
+
//#region dist/domain/javascript/javascriptRuntimeReconciliationResult.js
|
|
1059
|
+
var createJavaScriptRuntimeReconciliationResult, staticLayerSummaries, captureSummaries, reconciliationSummary, sourceMapAuthority, reconciliationCoverage, completionFlags, reconciliationLimitations, countBy;
|
|
1060
|
+
function init_javascriptRuntimeReconciliationResult() {
|
|
1061
|
+
return (init_javascriptRuntimeReconciliationResult = __esmMin((() => {
|
|
1062
|
+
init_canonicalDigest();
|
|
1063
|
+
init_canonicalOrdering();
|
|
1064
|
+
init_javascriptRuntimeReconciliationSchemas();
|
|
1065
|
+
createJavaScriptRuntimeReconciliationResult = (input) => {
|
|
1066
|
+
const completion = completionFlags(input);
|
|
1067
|
+
const semantic = {
|
|
1068
|
+
static_layers: staticLayerSummaries(input.layers),
|
|
1069
|
+
runtime_captures: captureSummaries(input.captures, input.runtime),
|
|
1070
|
+
graph: input.graph,
|
|
1071
|
+
summary: reconciliationSummary(input),
|
|
1072
|
+
reconciliations: input.matching.items,
|
|
1073
|
+
static_load_states: input.loadStates.states,
|
|
1074
|
+
source_map_authority: sourceMapAuthority(input),
|
|
1075
|
+
coverage: reconciliationCoverage(input, completion),
|
|
1076
|
+
evidence_links: uniqueSorted([...input.layers.map(({ evidence }) => evidence.evidence_id), ...input.captures.map(({ evidence }) => evidence.evidence_id)]),
|
|
1077
|
+
limitations: reconciliationLimitations(completion)
|
|
1078
|
+
};
|
|
1079
|
+
return javascriptRuntimeReconciliationResultSchema.parse({
|
|
1080
|
+
reconciliation_id: `jrr_${digestCanonicalValue(semantic, "Runtime reconciliation")}`,
|
|
1081
|
+
...semantic
|
|
1082
|
+
});
|
|
1083
|
+
};
|
|
1084
|
+
staticLayerSummaries = (layers) => layers.map((layer) => ({
|
|
1085
|
+
layer_id: layer.layerId,
|
|
1086
|
+
role: layer.role,
|
|
1087
|
+
evidence_id: layer.evidence.evidence_id,
|
|
1088
|
+
graph_id: layer.graph.graph_id,
|
|
1089
|
+
root_artifact_sha256: layer.result.root_artifact_sha256,
|
|
1090
|
+
input_path: layer.result.input_path,
|
|
1091
|
+
format: layer.result.format,
|
|
1092
|
+
runtime_mappings: [...layer.runtimeMappings]
|
|
1093
|
+
}));
|
|
1094
|
+
captureSummaries = (captures, runtime) => captures.map((capture) => {
|
|
1095
|
+
const targetNode = runtime.targetNodeByEvidenceId.get(capture.evidence.evidence_id);
|
|
1096
|
+
if (targetNode === undefined) throw new TypeError("Runtime projection omitted a required target node");
|
|
1097
|
+
return {
|
|
1098
|
+
evidence_id: capture.evidence.evidence_id,
|
|
1099
|
+
capture_sha256: capture.captureSha256,
|
|
1100
|
+
kind: capture.kind,
|
|
1101
|
+
target_node_id: targetNode.node_id,
|
|
1102
|
+
target_key: capture.inspection.target.target_id,
|
|
1103
|
+
target_location: "unresolved_location" in capture.inspection.target ? capture.inspection.target.unresolved_location : "url" in capture.inspection.target ? capture.inspection.target.url : capture.inspection.target.file_path,
|
|
1104
|
+
frames: capture.inspection.frames.length,
|
|
1105
|
+
scripts: capture.inspection.scripts.items.length,
|
|
1106
|
+
workers: capture.inspection.workers.length,
|
|
1107
|
+
scripts_complete_within_scope: capture.scriptsCompleteWithinScope
|
|
1108
|
+
};
|
|
1109
|
+
});
|
|
1110
|
+
reconciliationSummary = (input) => ({
|
|
1111
|
+
runtime_targets: countBy(input.runtime.entities, "kind", "target"),
|
|
1112
|
+
runtime_frames: countBy(input.runtime.entities, "kind", "frame"),
|
|
1113
|
+
runtime_scripts: countBy(input.runtime.entities, "kind", "script"),
|
|
1114
|
+
runtime_workers: countBy(input.runtime.entities, "kind", "worker"),
|
|
1115
|
+
matched: countBy(input.matching.items, "status", "matched"),
|
|
1116
|
+
ambiguous: countBy(input.matching.items, "status", "ambiguous"),
|
|
1117
|
+
unmatched: countBy(input.matching.items, "status", "unmatched"),
|
|
1118
|
+
unknown: countBy(input.matching.items, "status", "unknown"),
|
|
1119
|
+
static_loaded: countBy(input.loadStates.states, "status", "loaded"),
|
|
1120
|
+
static_resident: countBy(input.loadStates.states, "status", "resident-in-loaded-asset"),
|
|
1121
|
+
static_not_observed: countBy(input.loadStates.states, "status", "not-observed-in-capture"),
|
|
1122
|
+
static_unknown: countBy(input.loadStates.states, "status", "unknown")
|
|
1123
|
+
});
|
|
1124
|
+
sourceMapAuthority = (input) => ({
|
|
1125
|
+
used_for_primary_matching: false,
|
|
1126
|
+
static_layer_count: input.layers.length,
|
|
1127
|
+
runtime_script_declarations: input.captures.reduce((total, capture) => total + (capture.kind === "browser" ? capture.inspection.scripts.items.filter(({ source_map_url: url }) => url !== null).length : 0), 0),
|
|
1128
|
+
limitation: "Source-map declarations and original-source content retain separate static authority and are not used as primary runtime byte matches."
|
|
1129
|
+
});
|
|
1130
|
+
reconciliationCoverage = (input, completion) => ({
|
|
1131
|
+
status: completion.outputTruncated || completion.inputStatus === "truncated" ? "truncated" : completion.inputStatus === "partial" ? "partial" : "complete-within-inputs",
|
|
1132
|
+
truncated: completion.outputTruncated || completion.inputStatus === "truncated",
|
|
1133
|
+
omitted_runtime_entities: input.runtime.omittedEntities,
|
|
1134
|
+
omitted_reconciliation_items: input.matching.omittedItems,
|
|
1135
|
+
omitted_static_load_states: input.loadStates.omittedStates,
|
|
1136
|
+
omitted_graph_items: input.omittedGraphItems
|
|
1137
|
+
});
|
|
1138
|
+
completionFlags = (input) => {
|
|
1139
|
+
const inputTruncated = input.layers.some(({ graph }) => graph.coverage.truncated) || input.captures.some(({ inspection }) => inspection.completeness.conditions.includes("truncated"));
|
|
1140
|
+
const inputPartial = input.layers.some(({ graph }) => graph.coverage.status !== "complete") || input.captures.some(({ inspection }) => inspection.completeness.status !== "complete_within_window");
|
|
1141
|
+
return {
|
|
1142
|
+
outputTruncated: input.runtime.omittedEntities > 0 || input.matching.omittedItems > 0 || input.loadStates.omittedStates > 0 || input.omittedGraphItems > 0,
|
|
1143
|
+
inputStatus: inputTruncated ? "truncated" : inputPartial ? "partial" : "complete"
|
|
1144
|
+
};
|
|
1145
|
+
};
|
|
1146
|
+
reconciliationLimitations = (completion) => uniqueSorted([
|
|
1147
|
+
"Only caller-supplied, semantically verified Evidence records were reconciled.",
|
|
1148
|
+
"Digest equality establishes byte identity but not code reachability, module initialization, or feature execution.",
|
|
1149
|
+
"A static module resident in an observed bundle is not reported as executed.",
|
|
1150
|
+
"Not-observed means absent from the bounded captures in scope, never globally unloaded.",
|
|
1151
|
+
"Caller-declared file and URL mappings are inference inputs and do not expand CDP origin or filesystem-root authority.",
|
|
1152
|
+
"Source-map authority remains separate from passive runtime authority.",
|
|
1153
|
+
...completion.inputStatus !== "complete" ? ["One or more static graphs or passive captures were incomplete."] : [],
|
|
1154
|
+
...completion.outputTruncated ? ["Runtime reconciliation omitted entities or classifications during projection."] : []
|
|
1155
|
+
]);
|
|
1156
|
+
countBy = (items, key, value) => items.filter((item) => item[key] === value).length;
|
|
1157
|
+
})))();
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
//#endregion
|
|
1161
|
+
//#region dist/domain/javascript/javascriptRuntimeReconciliationRuntime.js
|
|
1162
|
+
var projectRuntimeCaptures, projectCapture, targetEntity, frameEntities, scriptEntities, workerEntities, runtimeEntity, runtimeEvidence, runtimeEdges, runtimeRelationshipEvidence, runtimeSectionComplete, runtimeSectionCoverage, runtimeSectionCount;
|
|
1163
|
+
function init_javascriptRuntimeReconciliationRuntime() {
|
|
1164
|
+
return (init_javascriptRuntimeReconciliationRuntime = __esmMin((() => {
|
|
1165
|
+
init_javascriptApplicationGraph();
|
|
1166
|
+
projectRuntimeCaptures = (captures) => {
|
|
1167
|
+
const all = captures.flatMap(projectCapture);
|
|
1168
|
+
const retained = all;
|
|
1169
|
+
const retainedIds = new Set(retained.map(({ node }) => node.node_id));
|
|
1170
|
+
const nodes = retained.map(({ node }) => node);
|
|
1171
|
+
const edges = captures.flatMap((capture) => runtimeEdges(capture, all)).filter(({ source_node_id: source, target_node_id: target }) => retainedIds.has(source) && retainedIds.has(target));
|
|
1172
|
+
const targetNodeByEvidenceId = new Map(retained.filter(({ kind }) => kind === "target").map(({ capture, node }) => [capture.evidence.evidence_id, node]));
|
|
1173
|
+
return {
|
|
1174
|
+
entities: retained,
|
|
1175
|
+
nodes,
|
|
1176
|
+
edges,
|
|
1177
|
+
targetNodeByEvidenceId,
|
|
1178
|
+
omittedEntities: 0
|
|
1179
|
+
};
|
|
1180
|
+
};
|
|
1181
|
+
projectCapture = (capture) => {
|
|
1182
|
+
const target = targetEntity(capture);
|
|
1183
|
+
return [
|
|
1184
|
+
target,
|
|
1185
|
+
...frameEntities(capture),
|
|
1186
|
+
...scriptEntities(capture),
|
|
1187
|
+
...workerEntities(capture)
|
|
1188
|
+
];
|
|
1189
|
+
};
|
|
1190
|
+
targetEntity = (capture) => {
|
|
1191
|
+
const target = capture.inspection.target;
|
|
1192
|
+
const location = "unresolved_location" in target ? {
|
|
1193
|
+
kind: "unresolved",
|
|
1194
|
+
value: target.unresolved_location.reported_url
|
|
1195
|
+
} : "url" in target ? {
|
|
1196
|
+
kind: "url",
|
|
1197
|
+
value: target.url
|
|
1198
|
+
} : {
|
|
1199
|
+
kind: "file",
|
|
1200
|
+
value: target.file_path
|
|
1201
|
+
};
|
|
1202
|
+
return runtimeEntity(capture, {
|
|
1203
|
+
kind: "target",
|
|
1204
|
+
nodeKind: "target",
|
|
1205
|
+
runtimeKey: target.target_id,
|
|
1206
|
+
targetKey: target.target_id,
|
|
1207
|
+
frameKey: null,
|
|
1208
|
+
scriptKey: null,
|
|
1209
|
+
location,
|
|
1210
|
+
staticKind: "renderer",
|
|
1211
|
+
sourceSha256: null,
|
|
1212
|
+
label: target.title,
|
|
1213
|
+
properties: {
|
|
1214
|
+
runtime_type: target.type,
|
|
1215
|
+
...location.kind === "unresolved" ? {
|
|
1216
|
+
reported_url: location.value,
|
|
1217
|
+
location_kind: "unresolved",
|
|
1218
|
+
location_reason: "unverifiable-file-location"
|
|
1219
|
+
} : { location: location.value },
|
|
1220
|
+
attached: target.attached
|
|
1221
|
+
},
|
|
1222
|
+
section: "target"
|
|
1223
|
+
});
|
|
1224
|
+
};
|
|
1225
|
+
frameEntities = (capture) => capture.inspection.frames.map((frame) => {
|
|
1226
|
+
const location = "url" in frame ? {
|
|
1227
|
+
kind: "url",
|
|
1228
|
+
value: frame.url
|
|
1229
|
+
} : {
|
|
1230
|
+
kind: "file",
|
|
1231
|
+
value: frame.file_path
|
|
1232
|
+
};
|
|
1233
|
+
return runtimeEntity(capture, {
|
|
1234
|
+
kind: "frame",
|
|
1235
|
+
nodeKind: "frame",
|
|
1236
|
+
runtimeKey: frame.frame_id,
|
|
1237
|
+
targetKey: capture.inspection.target.target_id,
|
|
1238
|
+
frameKey: frame.frame_id,
|
|
1239
|
+
scriptKey: null,
|
|
1240
|
+
location,
|
|
1241
|
+
staticKind: "renderer",
|
|
1242
|
+
sourceSha256: null,
|
|
1243
|
+
label: location.value,
|
|
1244
|
+
properties: {
|
|
1245
|
+
parent_frame_id: frame.parent_frame_id,
|
|
1246
|
+
location: location.value
|
|
1247
|
+
},
|
|
1248
|
+
section: "frames"
|
|
1249
|
+
});
|
|
1250
|
+
});
|
|
1251
|
+
scriptEntities = (capture) => capture.inspection.scripts.items.map((script) => {
|
|
1252
|
+
const location = "unresolved_location" in script ? {
|
|
1253
|
+
kind: "unresolved",
|
|
1254
|
+
value: script.unresolved_location.reported_url
|
|
1255
|
+
} : "url" in script ? {
|
|
1256
|
+
kind: "url",
|
|
1257
|
+
value: script.url
|
|
1258
|
+
} : {
|
|
1259
|
+
kind: "file",
|
|
1260
|
+
value: script.file_path
|
|
1261
|
+
};
|
|
1262
|
+
return runtimeEntity(capture, {
|
|
1263
|
+
kind: "script",
|
|
1264
|
+
nodeKind: "runtime-script-instance",
|
|
1265
|
+
runtimeKey: script.script_key,
|
|
1266
|
+
targetKey: capture.inspection.target.target_id,
|
|
1267
|
+
frameKey: script.frame_id,
|
|
1268
|
+
scriptKey: script.script_key,
|
|
1269
|
+
location,
|
|
1270
|
+
staticKind: "javascript",
|
|
1271
|
+
sourceSha256: script.source.included ? script.source.artifact.sha256 : null,
|
|
1272
|
+
label: location.value,
|
|
1273
|
+
properties: {
|
|
1274
|
+
..."unresolved_location" in script ? {
|
|
1275
|
+
location_kind: "unresolved",
|
|
1276
|
+
reported_url: script.unresolved_location.reported_url,
|
|
1277
|
+
location_reason: script.unresolved_location.reason
|
|
1278
|
+
} : { location: location.value },
|
|
1279
|
+
cdp_hash: script.cdp_hash,
|
|
1280
|
+
length: script.length,
|
|
1281
|
+
is_module: script.is_module,
|
|
1282
|
+
language: script.language,
|
|
1283
|
+
source_sha256: script.source.included ? script.source.artifact.sha256 : null,
|
|
1284
|
+
..."source_map_url" in script ? { source_map_url: script.source_map_url } : {}
|
|
1285
|
+
},
|
|
1286
|
+
section: "scripts",
|
|
1287
|
+
...script.source.included ? { artifactSha256: script.source.artifact.sha256 } : {}
|
|
1288
|
+
});
|
|
1289
|
+
});
|
|
1290
|
+
workerEntities = (capture) => capture.inspection.workers.map((worker) => {
|
|
1291
|
+
const location = "url" in worker ? {
|
|
1292
|
+
kind: "url",
|
|
1293
|
+
value: worker.url
|
|
1294
|
+
} : {
|
|
1295
|
+
kind: "file",
|
|
1296
|
+
value: worker.file_path
|
|
1297
|
+
};
|
|
1298
|
+
const serviceWorker = worker.type.includes("service");
|
|
1299
|
+
return runtimeEntity(capture, {
|
|
1300
|
+
kind: "worker",
|
|
1301
|
+
nodeKind: serviceWorker ? "service-worker" : "worker",
|
|
1302
|
+
runtimeKey: worker.target_id,
|
|
1303
|
+
targetKey: worker.target_id,
|
|
1304
|
+
frameKey: worker.parent_frame_id,
|
|
1305
|
+
scriptKey: null,
|
|
1306
|
+
location,
|
|
1307
|
+
staticKind: serviceWorker ? "service-worker" : "worker",
|
|
1308
|
+
sourceSha256: null,
|
|
1309
|
+
label: location.value,
|
|
1310
|
+
properties: {
|
|
1311
|
+
runtime_type: worker.type,
|
|
1312
|
+
location: location.value,
|
|
1313
|
+
attached: worker.attached,
|
|
1314
|
+
opener_target_id: worker.opener_target_id,
|
|
1315
|
+
parent_frame_id: worker.parent_frame_id
|
|
1316
|
+
},
|
|
1317
|
+
section: "workers"
|
|
1318
|
+
});
|
|
1319
|
+
});
|
|
1320
|
+
runtimeEntity = (capture, input) => ({
|
|
1321
|
+
kind: input.kind,
|
|
1322
|
+
section: input.section,
|
|
1323
|
+
capture,
|
|
1324
|
+
runtimeKey: input.runtimeKey,
|
|
1325
|
+
location: input.location,
|
|
1326
|
+
frameKey: input.frameKey,
|
|
1327
|
+
sourceSha256: input.sourceSha256,
|
|
1328
|
+
staticKind: input.staticKind,
|
|
1329
|
+
node: createJavaScriptApplicationNode({
|
|
1330
|
+
kind: input.nodeKind,
|
|
1331
|
+
identity: {
|
|
1332
|
+
strategy: "runtime-instance",
|
|
1333
|
+
stability: "capture-only",
|
|
1334
|
+
capture_sha256: capture.captureSha256,
|
|
1335
|
+
runtime_key: input.runtimeKey
|
|
1336
|
+
},
|
|
1337
|
+
observations: [{
|
|
1338
|
+
label: input.label || null,
|
|
1339
|
+
properties: input.properties,
|
|
1340
|
+
evidence: runtimeEvidence(capture, input)
|
|
1341
|
+
}]
|
|
1342
|
+
})
|
|
1343
|
+
});
|
|
1344
|
+
runtimeEvidence = (capture, input) => ({
|
|
1345
|
+
authority: "passive-cdp-runtime",
|
|
1346
|
+
state: "observed",
|
|
1347
|
+
confidence: "exact",
|
|
1348
|
+
artifact: input.artifactSha256 === undefined ? {
|
|
1349
|
+
available: false,
|
|
1350
|
+
reason: input.section === "scripts" ? "not-observed" : "not-applicable",
|
|
1351
|
+
detail: input.section === "scripts" ? "Script source bytes were not included in this passive capture." : "This runtime entity has no standalone artifact bytes."
|
|
1352
|
+
} : {
|
|
1353
|
+
available: true,
|
|
1354
|
+
artifact_id: `art_${input.artifactSha256}`,
|
|
1355
|
+
sha256: input.artifactSha256
|
|
1356
|
+
},
|
|
1357
|
+
location: {
|
|
1358
|
+
available: true,
|
|
1359
|
+
value: {
|
|
1360
|
+
kind: "runtime",
|
|
1361
|
+
capture_sha256: capture.captureSha256,
|
|
1362
|
+
target_key: input.targetKey,
|
|
1363
|
+
frame_key: input.frameKey,
|
|
1364
|
+
script_key: input.scriptKey
|
|
1365
|
+
}
|
|
1366
|
+
},
|
|
1367
|
+
extractor: {
|
|
1368
|
+
name: capture.evidence.provider.id,
|
|
1369
|
+
version: capture.evidence.provider.version ?? (capture.kind === "browser" ? "2" : "1"),
|
|
1370
|
+
operation: capture.evidence.operation,
|
|
1371
|
+
executable_sha256: null
|
|
1372
|
+
},
|
|
1373
|
+
coverage: runtimeSectionCoverage(capture, input.section),
|
|
1374
|
+
limitations: ["The entity was observed only within one bounded passive CDP capture.", ...runtimeSectionComplete(capture, input.section) ? [] : [`The runtime ${input.section} inventory was incomplete within this capture.`]],
|
|
1375
|
+
evidence_ids: [capture.evidence.evidence_id]
|
|
1376
|
+
});
|
|
1377
|
+
runtimeEdges = (capture, entities) => {
|
|
1378
|
+
const local = entities.filter(({ capture: candidate }) => candidate.evidence.evidence_id === capture.evidence.evidence_id);
|
|
1379
|
+
const target = local.find(({ kind }) => kind === "target");
|
|
1380
|
+
if (target === undefined) return [];
|
|
1381
|
+
const frames = new Map(local.filter(({ kind }) => kind === "frame").map((entity) => [entity.runtimeKey, entity]));
|
|
1382
|
+
return local.flatMap((entity) => {
|
|
1383
|
+
if (entity === target) return [];
|
|
1384
|
+
const parent = (entity.kind === "script" || entity.kind === "worker") && entity.frameKey !== null ? frames.get(entity.frameKey) ?? target : target;
|
|
1385
|
+
return [createJavaScriptApplicationEdge({
|
|
1386
|
+
source_node_id: parent.node.node_id,
|
|
1387
|
+
target_node_id: entity.node.node_id,
|
|
1388
|
+
relation: entity.kind === "script" ? "loads" : "contains",
|
|
1389
|
+
properties: { basis: "passive-cdp-observation" },
|
|
1390
|
+
evidence: runtimeRelationshipEvidence(capture, entity)
|
|
1391
|
+
})];
|
|
1392
|
+
});
|
|
1393
|
+
};
|
|
1394
|
+
runtimeRelationshipEvidence = (capture, entity) => ({
|
|
1395
|
+
authority: "passive-cdp-runtime",
|
|
1396
|
+
state: "observed",
|
|
1397
|
+
confidence: "exact",
|
|
1398
|
+
artifact: {
|
|
1399
|
+
available: false,
|
|
1400
|
+
reason: "not-applicable",
|
|
1401
|
+
detail: "The relationship is runtime metadata, not standalone bytes."
|
|
1402
|
+
},
|
|
1403
|
+
location: {
|
|
1404
|
+
available: true,
|
|
1405
|
+
value: {
|
|
1406
|
+
kind: "runtime",
|
|
1407
|
+
capture_sha256: capture.captureSha256,
|
|
1408
|
+
target_key: capture.inspection.target.target_id,
|
|
1409
|
+
frame_key: entity.frameKey,
|
|
1410
|
+
script_key: entity.kind === "script" ? entity.runtimeKey : null
|
|
1411
|
+
}
|
|
1412
|
+
},
|
|
1413
|
+
extractor: {
|
|
1414
|
+
name: capture.evidence.provider.id,
|
|
1415
|
+
version: capture.evidence.provider.version ?? (capture.kind === "browser" ? "2" : "1"),
|
|
1416
|
+
operation: capture.evidence.operation,
|
|
1417
|
+
executable_sha256: null
|
|
1418
|
+
},
|
|
1419
|
+
coverage: runtimeSectionCoverage(capture, entity.section),
|
|
1420
|
+
limitations: ["The relationship was observed only within one bounded passive CDP capture."],
|
|
1421
|
+
evidence_ids: [capture.evidence.evidence_id]
|
|
1422
|
+
});
|
|
1423
|
+
runtimeSectionComplete = (capture, section) => {
|
|
1424
|
+
if (section === "target") return true;
|
|
1425
|
+
if (section === "scripts") return capture.scriptsCompleteWithinScope;
|
|
1426
|
+
return !capture.inspection.completeness.truncated_sections.includes(section) && !capture.inspection.completeness.unavailable_sections.includes(section);
|
|
1427
|
+
};
|
|
1428
|
+
runtimeSectionCoverage = (capture, section) => {
|
|
1429
|
+
if (runtimeSectionComplete(capture, section)) return {
|
|
1430
|
+
status: "complete",
|
|
1431
|
+
truncated: false,
|
|
1432
|
+
omitted_count: 0,
|
|
1433
|
+
limits: []
|
|
1434
|
+
};
|
|
1435
|
+
const truncated = section !== "target" && capture.inspection.completeness.truncated_sections.includes(section);
|
|
1436
|
+
return {
|
|
1437
|
+
status: "partial",
|
|
1438
|
+
truncated,
|
|
1439
|
+
omitted_count: null,
|
|
1440
|
+
limits: truncated ? [{
|
|
1441
|
+
name: `passive-cdp-${section}-limit`,
|
|
1442
|
+
value: runtimeSectionCount(capture, section),
|
|
1443
|
+
unit: "items"
|
|
1444
|
+
}] : []
|
|
1445
|
+
};
|
|
1446
|
+
};
|
|
1447
|
+
runtimeSectionCount = (capture, section) => {
|
|
1448
|
+
switch (section) {
|
|
1449
|
+
case "target": return 1;
|
|
1450
|
+
case "frames": return capture.inspection.frames.length;
|
|
1451
|
+
case "scripts": return capture.inspection.scripts.items.length;
|
|
1452
|
+
case "workers": return capture.inspection.workers.length;
|
|
1453
|
+
}
|
|
1454
|
+
};
|
|
1455
|
+
})))();
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
//#endregion
|
|
1459
|
+
//#region dist/domain/javascript/javascriptRuntimeReconciliation.js
|
|
1460
|
+
var parseRuntimeReconciliationInput, reconcileJavaScriptRuntime;
|
|
1461
|
+
function init_javascriptRuntimeReconciliation() {
|
|
1462
|
+
return (init_javascriptRuntimeReconciliation = __esmMin((() => {
|
|
1463
|
+
init_javascriptRuntimeLoadState();
|
|
1464
|
+
init_javascriptRuntimeReconciliationGraph();
|
|
1465
|
+
init_javascriptRuntimeReconciliationMatching();
|
|
1466
|
+
init_javascriptRuntimeReconciliationParsing();
|
|
1467
|
+
init_javascriptRuntimeReconciliationCaptureParsing();
|
|
1468
|
+
init_javascriptRuntimeReconciliationResult();
|
|
1469
|
+
init_javascriptRuntimeReconciliationRuntime();
|
|
1470
|
+
init_javascriptRuntimeStaticCandidates();
|
|
1471
|
+
parseRuntimeReconciliationInput = (input) => ({
|
|
1472
|
+
input,
|
|
1473
|
+
layers: parseStaticLayers(input.static_layers, ["static_layers"]),
|
|
1474
|
+
captures: parseRuntimeCaptures(input.runtime_observations, ["runtime_observations"])
|
|
1475
|
+
});
|
|
1476
|
+
reconcileJavaScriptRuntime = (parsed) => {
|
|
1477
|
+
const { layers, captures } = parsed;
|
|
1478
|
+
const runtime = projectRuntimeCaptures(captures);
|
|
1479
|
+
const candidates = collectStaticRuntimeCandidates(layers);
|
|
1480
|
+
const matching = reconcileRuntimeEntities({
|
|
1481
|
+
entities: runtime.entities,
|
|
1482
|
+
candidates,
|
|
1483
|
+
layers
|
|
1484
|
+
});
|
|
1485
|
+
const loadStates = classifyStaticLoadStates(layers, runtime.entities, matching.items, { reconciliationComplete: runtime.omittedEntities === 0 && matching.omittedItems === 0 });
|
|
1486
|
+
const graph = buildReconciledApplicationGraph({
|
|
1487
|
+
layers,
|
|
1488
|
+
captures,
|
|
1489
|
+
runtime,
|
|
1490
|
+
reconciliationEdges: matching.edges,
|
|
1491
|
+
omittedReconciliationItems: matching.omittedItems
|
|
1492
|
+
});
|
|
1493
|
+
return createJavaScriptRuntimeReconciliationResult({
|
|
1494
|
+
layers,
|
|
1495
|
+
captures,
|
|
1496
|
+
runtime,
|
|
1497
|
+
matching,
|
|
1498
|
+
loadStates,
|
|
1499
|
+
graph: graph.graph,
|
|
1500
|
+
omittedGraphItems: graph.omittedGraphItems
|
|
1501
|
+
});
|
|
1502
|
+
};
|
|
1503
|
+
})))();
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
//#endregion
|
|
1507
|
+
export { init_javascriptRuntimeReconciliation, parseRuntimeReconciliationInput, reconcileJavaScriptRuntime };
|