reverseport 0.0.0-stage → 1.2.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/LICENSE +22 -0
- package/README.md +289 -2
- package/RESPONSIBLE-USE.md +22 -0
- package/THIRD_PARTY_NOTICES.md +130 -0
- package/bin/reverseport.mjs +136 -0
- package/bridge/android/ReaJadxBridge.java +270 -0
- package/bridge/ghidra/ReaGhidraAnalysisOptions.java +38 -0
- package/bridge/ghidra/ReaGhidraApplySeeds.java +151 -0
- package/bridge/ghidra/ReaGhidraBridge.java +3858 -0
- package/bridge/ghidra/ReaGhidraBundleActivator.java +14 -0
- package/bridge/ghidra/ReaGhidraExtensions.java +113 -0
- package/bridge/ghidra/ReaGhidraMipsSoftFloat.java +176 -0
- package/bridge/ghidra/ReaGhidraNoReturnFix.java +123 -0
- package/bridge/ghidra/ReaGhidraPrepareCom.java +32 -0
- package/bridge/ghidra/ReaGhidraPrepareRaw.java +36 -0
- package/bridge/hopper_bridge.py +1162 -0
- package/bridge/mitmproxy/capture.py +208 -0
- package/bridge/native/NativeUIChildren.swift +27 -0
- package/bridge/native/ReaNativeUI.swift +171 -0
- package/bridge/native/rea_lldb_tracer.py +839 -0
- package/bridge/process/ProcessRunTokenReader.swift +339 -0
- package/bridge/process/ProcessRunTokenReaderMain.swift +35 -0
- package/bridge/pwndbg/core_context.py +101 -0
- package/bridge/pwndbg/launch.py +39 -0
- package/bridge/pwndbg/launch_impl.py +34 -0
- package/bridge/pwntools/decoder_runtime.py +59 -0
- package/bridge/pwntools/layout.py +39 -0
- package/bridge/pwntools/layout_impl.py +314 -0
- package/bridge/pwntools/recorded_crash.py +39 -0
- package/bridge/pwntools/recorded_crash_impl.py +147 -0
- package/dist/adb/AdbConfiguration.js +88 -0
- package/dist/adb/AdbDeviceOutput.js +191 -0
- package/dist/adb/AdbDirectoryListing.js +80 -0
- package/dist/adb/AdbHostFileName.js +34 -0
- package/dist/adb/AdbProvider.js +1227 -0
- package/dist/adb/AdbShellOutput.js +267 -0
- package/dist/android/AndroidTargetSnapshot.js +118 -0
- package/dist/android/JadxAnalysis.js +201 -0
- package/dist/android/JadxConfiguration.js +320 -0
- package/dist/android/JadxMcpTransport.js +188 -0
- package/dist/android/JadxProtocol.js +115 -0
- package/dist/android/JadxProvider.js +337 -0
- package/dist/android/JadxRelease.js +27 -0
- package/dist/android/JadxSession.js +172 -0
- package/dist/apktool/ApktoolConfiguration.js +120 -0
- package/dist/apktool/ApktoolDecodeOutput.js +142 -0
- package/dist/apktool/ApktoolProvider.js +522 -0
- package/dist/application/AnalysisContextQueries.js +128 -0
- package/dist/application/AnalysisDocument.js +32 -0
- package/dist/application/AnalysisProvider.js +27 -0
- package/dist/application/AppBundleExecutable.js +192 -0
- package/dist/application/BinaryTargetResolver.js +356 -0
- package/dist/application/BrowserEvidence.js +127 -0
- package/dist/application/BrowserObservationPort.js +1 -0
- package/dist/application/BrowserObservationService.js +86 -0
- package/dist/application/BrowserScenarioCapturePort.js +1 -0
- package/dist/application/BrowserScenarioCaptureService.js +17 -0
- package/dist/application/BrowserScenarioEvidence.js +28 -0
- package/dist/application/CallPathTracing.js +182 -0
- package/dist/application/CapabilityClientRequirements.js +17 -0
- package/dist/application/CapabilityInventory.js +525 -0
- package/dist/application/ClientConfigPath.js +35 -0
- package/dist/application/ClientConfigurationDocument.js +1196 -0
- package/dist/application/ClientConfigurationFiles.js +91 -0
- package/dist/application/ClientRegistrationEnvironment.js +39 -0
- package/dist/application/ClientRegistrationIdentity.js +80 -0
- package/dist/application/ClientRegistrationStatus.js +233 -0
- package/dist/application/DirectAnalysis.js +371 -0
- package/dist/application/DirectAnalysisCleanup.js +71 -0
- package/dist/application/DirectAnalysisDependencies.js +1 -0
- package/dist/application/DirectAnalysisStatus.js +22 -0
- package/dist/application/Doctor.js +349 -0
- package/dist/application/DoctorDiagnostics.js +169 -0
- package/dist/application/DoctorProviderIds.js +2 -0
- package/dist/application/DoctorScope.js +113 -0
- package/dist/application/DshCordisPatch.js +342 -0
- package/dist/application/DshCordisYaml.js +155 -0
- package/dist/application/EnhancedLiteralTracing.js +88 -0
- package/dist/application/EnhancedToolTypes.js +4 -0
- package/dist/application/EnhancedTools.js +428 -0
- package/dist/application/EvidenceBundleCommands.js +70 -0
- package/dist/application/EvidenceBundleFiles.js +79 -0
- package/dist/application/EvidenceInputResolver.js +30 -0
- package/dist/application/FunctionAnalysisEvidence.js +34 -0
- package/dist/application/GeminiClientSettings.js +139 -0
- package/dist/application/HermesClientHome.js +115 -0
- package/dist/application/HopperDownload.js +39 -0
- package/dist/application/InventoryProjectionEvidence.js +44 -0
- package/dist/application/InvestigationProviders.js +130 -0
- package/dist/application/JsonFiles.js +225 -0
- package/dist/application/JsonInputFile.js +410 -0
- package/dist/application/LinuxHopper.js +232 -0
- package/dist/application/MacHopper.js +235 -0
- package/dist/application/MipsElfMetadata.js +175 -0
- package/dist/application/MipsElfSharedLoad.js +164 -0
- package/dist/application/OptionalObservationProviders.js +3 -0
- package/dist/application/ProcedureAddressResolution.js +11 -0
- package/dist/application/ProgressReporter.js +30 -0
- package/dist/application/ProviderOperationExecution.js +31 -0
- package/dist/application/RealHopperAssertions.js +135 -0
- package/dist/application/ReconstructionCoverageService.js +22 -0
- package/dist/application/ReconstructionObligationAuthority.js +72 -0
- package/dist/application/ReconstructionObligationCandidates.js +286 -0
- package/dist/application/ReconstructionObligationLedgerDiagnostics.js +47 -0
- package/dist/application/ReconstructionObligationLedgerEvaluation.js +238 -0
- package/dist/application/ReconstructionObligationLedgerProjection.js +15 -0
- package/dist/application/ReconstructionObligationLedgerService.js +54 -0
- package/dist/application/ReconstructionObligationOriginalCases.js +34 -0
- package/dist/application/ReconstructionObligationPolicies.js +132 -0
- package/dist/application/ReferenceSourceImport.js +200 -0
- package/dist/application/ReferenceSourceImportEntries.js +151 -0
- package/dist/application/ReferenceSourceImportPolicy.js +125 -0
- package/dist/application/ReferenceSourceImportTypes.js +47 -0
- package/dist/application/ReferenceSourceVcsAdapter.js +180 -0
- package/dist/application/RegularFileRead.js +120 -0
- package/dist/application/Setup.js +408 -0
- package/dist/application/SetupClientConfiguration.js +314 -0
- package/dist/application/SetupClients.js +44 -0
- package/dist/application/SetupHost.js +203 -0
- package/dist/application/SetupInstallFailure.js +77 -0
- package/dist/application/SetupPlan.js +210 -0
- package/dist/application/SetupRegistrationEnvironment.js +5 -0
- package/dist/application/SetupSkill.js +248 -0
- package/dist/application/SetupTypes.js +17 -0
- package/dist/application/SupportedClients.js +469 -0
- package/dist/application/TypeScriptEmittedSourceCandidates.js +23 -0
- package/dist/application/Uninstall.js +452 -0
- package/dist/application/UninstallFailure.js +14 -0
- package/dist/application/Update.js +137 -0
- package/dist/application/UpdateFailure.js +17 -0
- package/dist/application/UpdateMaintenance.js +111 -0
- package/dist/application/UpdateRuntime.js +264 -0
- package/dist/application/Utf8JsonInput.js +71 -0
- package/dist/application/ValidateSelectedWebScript.js +27 -0
- package/dist/application/WebModulePorts.js +1 -0
- package/dist/application/WebModuleTraceService.js +214 -0
- package/dist/application/WebNetworkCapturePort.js +1 -0
- package/dist/application/WebNetworkCaptureService.js +134 -0
- package/dist/application/WebRuntimePort.js +1 -0
- package/dist/application/WebRuntimeService.js +75 -0
- package/dist/application/WebScriptArtifactPort.js +1 -0
- package/dist/application/WebScriptExportService.js +214 -0
- package/dist/application/WebSourceLocationPorts.js +1 -0
- package/dist/application/WebSourceLocationService.js +177 -0
- package/dist/application/WindowsCapabilities.js +87 -0
- package/dist/application/WorkflowEvidence.js +105 -0
- package/dist/application/XrefsAddressResolution.js +45 -0
- package/dist/application/adb/AdbDeviceAnalysisPort.js +1 -0
- package/dist/application/adb/AdbDeviceAnalysisService.js +13 -0
- package/dist/application/analysisView/AnalysisViewService.js +133 -0
- package/dist/application/android/AndroidAnalysisPort.js +1 -0
- package/dist/application/android/AndroidAnalysisService.js +37 -0
- package/dist/application/android/AndroidApplicationService.js +17 -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/apple/AppleApplicationService.js +17 -0
- package/dist/application/artifacts/ArtifactExtractionDestination.js +5 -0
- package/dist/application/binary/AbortablePromise.js +28 -0
- package/dist/application/binary/AnalysisClientCleanup.js +15 -0
- package/dist/application/binary/AnalysisProviderEvaluation.js +77 -0
- package/dist/application/binary/AnalysisProviderRegistry.js +235 -0
- package/dist/application/binary/AnalysisSnapshotCache.js +232 -0
- package/dist/application/binary/AnalysisSnapshotFiles.js +96 -0
- package/dist/application/binary/BinarySession.js +605 -0
- package/dist/application/binary/BinarySessionComposition.js +9 -0
- package/dist/application/binary/BinarySessionExecution.js +66 -0
- package/dist/application/binary/BinarySessionOpen.js +66 -0
- package/dist/application/binary/BinarySessionPort.js +1 -0
- package/dist/application/binary/BinarySessionRecords.js +216 -0
- package/dist/application/binary/BinarySessionStatus.js +219 -0
- package/dist/application/binary/BinaryTargetSummary.js +9 -0
- package/dist/application/binary/CompositeProvider.js +103 -0
- package/dist/application/binary/LazyAnalysisProvider.js +105 -0
- package/dist/application/binary/SessionProviderRouter.js +118 -0
- package/dist/application/binaryDiagnostics/BinaryLayoutPort.js +1 -0
- package/dist/application/binaryDiagnostics/BinaryLayoutService.js +60 -0
- package/dist/application/binaryDiagnostics/PeResourcesPort.js +1 -0
- package/dist/application/binaryDiagnostics/PeResourcesService.js +111 -0
- package/dist/application/binaryDiagnostics/RecordedCrashPort.js +1 -0
- package/dist/application/binaryDiagnostics/RecordedCrashService.js +63 -0
- package/dist/application/evm/EvmInterfacePort.js +1 -0
- package/dist/application/evm/EvmInterfaceService.js +67 -0
- package/dist/application/firmware/FirmwareAnalysisPort.js +1 -0
- package/dist/application/firmware/FirmwareAnalysisService.js +38 -0
- package/dist/application/go/GoBinaryPort.js +1 -0
- package/dist/application/go/GoBinaryService.js +77 -0
- package/dist/application/harmony/HarmonyApplicationService.js +17 -0
- package/dist/application/homebrew.js +67 -0
- package/dist/application/investigation/EvidenceLedger.js +338 -0
- package/dist/application/investigation/InspectEvidenceBundle.js +18 -0
- package/dist/application/investigation/InvestigationRecordPort.js +1 -0
- package/dist/application/investigation/InvestigationRecords.js +65 -0
- package/dist/application/investigation/UnknownEvidence.js +37 -0
- package/dist/application/javascript/ElectronActiveEvidence.js +29 -0
- package/dist/application/javascript/ElectronActiveObservationPort.js +1 -0
- package/dist/application/javascript/ElectronActiveObservationService.js +51 -0
- package/dist/application/javascript/ElectronBoundaryAnalysis.js +118 -0
- package/dist/application/javascript/ElectronBoundaryGraph.js +11 -0
- package/dist/application/javascript/ElectronBoundaryGraphCallPaths.js +134 -0
- package/dist/application/javascript/ElectronBoundaryGraphContext.js +63 -0
- package/dist/application/javascript/ElectronBoundaryGraphIpc.js +261 -0
- package/dist/application/javascript/ElectronBoundaryGraphNative.js +102 -0
- package/dist/application/javascript/ElectronBoundaryGraphWindows.js +224 -0
- package/dist/application/javascript/ElectronEvidence.js +37 -0
- package/dist/application/javascript/ElectronObservationPort.js +1 -0
- package/dist/application/javascript/ElectronObservationService.js +26 -0
- package/dist/application/javascript/JavaScriptAnalysisControl.js +34 -0
- package/dist/application/javascript/JavaScriptApplicationEvidence.js +49 -0
- package/dist/application/javascript/JavaScriptApplicationEvidenceGraph.js +173 -0
- package/dist/application/javascript/JavaScriptApplicationService.js +170 -0
- package/dist/application/javascript/JavaScriptApplicationWorkflowEvidence.js +67 -0
- package/dist/application/javascript/JavaScriptApplicationWorkflowService.js +194 -0
- package/dist/application/javascript/JavaScriptArtifactAnalysis.js +431 -0
- package/dist/application/javascript/JavaScriptArtifactAnalysisTypes.js +1 -0
- package/dist/application/javascript/JavaScriptArtifactGraphAccumulator.js +89 -0
- package/dist/application/javascript/JavaScriptArtifactGraphBuilder.js +193 -0
- package/dist/application/javascript/JavaScriptArtifactGraphBundlers.js +229 -0
- package/dist/application/javascript/JavaScriptArtifactGraphContext.js +194 -0
- package/dist/application/javascript/JavaScriptArtifactGraphDocuments.js +160 -0
- package/dist/application/javascript/JavaScriptArtifactGraphEvidence.js +85 -0
- package/dist/application/javascript/JavaScriptArtifactGraphFindings.js +349 -0
- package/dist/application/javascript/JavaScriptArtifactGraphStructure.js +424 -0
- package/dist/application/javascript/JavaScriptArtifactPathResolution.js +836 -0
- package/dist/application/javascript/JavaScriptArtifactReconstruction.js +245 -0
- package/dist/application/javascript/JavaScriptArtifactReconstructionInput.js +12 -0
- package/dist/application/javascript/JavaScriptJsonModules.js +40 -0
- package/dist/application/javascript/JavaScriptModuleRelationships.js +304 -0
- package/dist/application/javascript/JavaScriptRecoveryPort.js +1 -0
- package/dist/application/javascript/JavaScriptRecoveryService.js +77 -0
- package/dist/application/javascript/JavaScriptRuntimeObservationEvidence.js +36 -0
- package/dist/application/javascript/JavaScriptRuntimeObservationPort.js +1 -0
- package/dist/application/javascript/JavaScriptRuntimeObservationService.js +28 -0
- package/dist/application/javascript/JavaScriptRuntimeReconciliationEvidence.js +24 -0
- package/dist/application/javascript/JavaScriptRuntimeReconciliationService.js +52 -0
- package/dist/application/javascript/JavaScriptSemanticGraphAsyncProjection.js +163 -0
- package/dist/application/javascript/JavaScriptSemanticGraphBuilder.js +527 -0
- package/dist/application/javascript/JavaScriptSemanticGraphChildProcessProjection.js +165 -0
- package/dist/application/javascript/JavaScriptSemanticGraphConstruction.js +156 -0
- package/dist/application/javascript/JavaScriptSemanticGraphDataProjection.js +216 -0
- package/dist/application/javascript/JavaScriptSemanticGraphElectronProjection.js +61 -0
- package/dist/application/javascript/JavaScriptSemanticGraphEvidence.js +86 -0
- package/dist/application/javascript/JavaScriptSemanticGraphFingerprintProjection.js +25 -0
- package/dist/application/javascript/JavaScriptSemanticGraphFlowProjection.js +183 -0
- package/dist/application/javascript/JavaScriptSemanticGraphObjectProjection.js +112 -0
- package/dist/application/javascript/JavaScriptSemanticGraphProjection.js +144 -0
- package/dist/application/javascript/JavaScriptSemanticGraphResourceProjection.js +58 -0
- package/dist/application/javascript/JavaScriptSemanticGraphValueProjection.js +136 -0
- package/dist/application/javascript/JavaScriptSemanticTraceService.js +41 -0
- package/dist/application/jeb/JebAnalysisPort.js +1 -0
- package/dist/application/jeb/JebAnalysisService.js +13 -0
- package/dist/application/managed/ManagedApplicationGraphService.js +55 -0
- package/dist/application/managed/ManagedMemberComparisonService.js +125 -0
- package/dist/application/managed/ManagedNativeVerificationService.js +40 -0
- package/dist/application/managed/ManagedReconstructionService.js +59 -0
- package/dist/application/native/NativeApiInspection.js +77 -0
- package/dist/application/native/NativeCallRoutes.js +73 -0
- package/dist/application/native/NativeDispatchMetadataInspection.js +33 -0
- package/dist/application/native/NativeUiActionTrace.js +427 -0
- package/dist/application/native/NativeValueTrace.js +340 -0
- package/dist/application/process/ProcessCli.js +190 -0
- package/dist/application/process/ProcessEvidence.js +30 -0
- package/dist/application/wasm/WasmArtifactPort.js +1 -0
- package/dist/application/wasm/WasmArtifactService.js +72 -0
- package/dist/application/workflowInputError.js +18 -0
- package/dist/artifacts/ArtifactHash.js +29 -0
- package/dist/artifacts/ArtifactPaths.js +167 -0
- package/dist/artifacts/ArtifactProvider.js +280 -0
- package/dist/artifacts/ArtifactProviderMetadata.js +34 -0
- package/dist/artifacts/ArtifactReader.js +77 -0
- package/dist/artifacts/ArtifactResourceScope.js +103 -0
- package/dist/artifacts/AsarArtifactReader.js +518 -0
- package/dist/artifacts/AsarEntryStream.js +76 -0
- package/dist/artifacts/AsarHeader.js +24 -0
- package/dist/artifacts/DirectoryArtifactReader.js +292 -0
- package/dist/artifacts/MachOSliceArtifactReader.js +342 -0
- package/dist/artifacts/NativeDmgArtifactReader.js +508 -0
- package/dist/artifacts/NativeDmgOwnership.js +109 -0
- package/dist/artifacts/SafeOutputTree.js +394 -0
- 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/StreamBytes.js +10 -0
- package/dist/artifacts/ZipArtifactReader.js +222 -0
- package/dist/artifacts/apple/AppleAssetCatalogAnalysis.js +190 -0
- package/dist/artifacts/apple/DylibResolutionReader.js +269 -0
- package/dist/artifacts/apple/InterfaceBuilderAnalysis.js +500 -0
- package/dist/artifacts/apple/InterfaceBuilderDecodeBudget.js +233 -0
- package/dist/artifacts/apple/KeyedArchiveReader.js +163 -0
- package/dist/artifacts/apple/MachoLoadCommandReader.js +393 -0
- package/dist/artifacts/apple/NibArchive.js +338 -0
- package/dist/artifacts/apple/NibViewHierarchy.js +157 -0
- package/dist/artifacts/apple/PlistNumberLiterals.js +164 -0
- package/dist/artifacts/extraction/ArtifactExtraction.js +253 -0
- package/dist/artifacts/hostExecutableMarking.js +16 -0
- package/dist/artifacts/inventory/ArtifactGraphConstruction.js +343 -0
- package/dist/artifacts/inventory/ArtifactInventory.js +16 -0
- package/dist/artifacts/inventory/classify.js +94 -0
- package/dist/artifacts/inventory/hashStableRootArtifact.js +70 -0
- package/dist/artifacts/inventory/reader.js +40 -0
- package/dist/artifacts/inventory/scanCanonical.js +213 -0
- package/dist/artifacts/inventory/scanReader.js +169 -0
- package/dist/artifacts/inventory/types.js +3 -0
- package/dist/artifacts/javascript/JavaScriptArtifactFiles.js +317 -0
- package/dist/artifacts/javascript/JavaScriptArtifactReader.js +6 -0
- package/dist/artifacts/javascript/JavaScriptSourceAnalysis.js +3 -0
- package/dist/artifacts/readStableArtifact.js +68 -0
- package/dist/browser/BrowserProcessStartup.js +89 -0
- package/dist/browser/BrowserScenarioPartialObservation.js +127 -0
- package/dist/browser/BrowserScenarioSecrets.js +137 -0
- package/dist/browser/BrowserScenarioSessionPort.js +1 -0
- package/dist/browser/CdpAuthorizedMainFrame.js +16 -0
- package/dist/browser/CdpAuthorizedTarget.js +22 -0
- package/dist/browser/CdpBrowserProvider.js +276 -0
- package/dist/browser/CdpCaptureCompleteness.js +92 -0
- package/dist/browser/CdpCaptureDocuments.js +375 -0
- package/dist/browser/CdpCaptureDomSvg.js +210 -0
- package/dist/browser/CdpCaptureEventBodyShapes.js +55 -0
- package/dist/browser/CdpCaptureEventHandlers.js +463 -0
- package/dist/browser/CdpCaptureEventHelpers.js +84 -0
- package/dist/browser/CdpCaptureEventState.js +1 -0
- package/dist/browser/CdpCaptureEventTypes.js +5 -0
- package/dist/browser/CdpCaptureEvents.js +199 -0
- package/dist/browser/CdpCaptureStorage.js +86 -0
- package/dist/browser/CdpCaptureStorageFingerprints.js +320 -0
- package/dist/browser/CdpCaptureValues.js +91 -0
- package/dist/browser/CdpCommandRejection.js +17 -0
- package/dist/browser/CdpConnection.js +303 -0
- package/dist/browser/CdpElectronInspection.js +253 -0
- package/dist/browser/CdpElectronProvider.js +115 -0
- package/dist/browser/CdpElectronScriptEvents.js +55 -0
- package/dist/browser/CdpElectronScripts.js +65 -0
- package/dist/browser/CdpElectronWorkers.js +57 -0
- package/dist/browser/CdpEndpoint.js +217 -0
- package/dist/browser/CdpObservationSession.js +332 -0
- package/dist/browser/CdpOptionalCommand.js +14 -0
- package/dist/browser/CdpPageCapture.js +278 -0
- package/dist/browser/CdpPageCaptureScripts.js +79 -0
- package/dist/browser/CdpPageCaptureWorkers.js +46 -0
- package/dist/browser/CdpSafeMetadata.js +284 -0
- package/dist/browser/CdpScreenshot.js +110 -0
- package/dist/browser/CdpTargetEvents.js +8 -0
- package/dist/browser/CdpTargetSession.js +65 -0
- package/dist/browser/CdpWebMcpDiscovery.js +361 -0
- package/dist/browser/ElectronFileScope.js +135 -0
- package/dist/browser/PlaywrightBrowserScenarioProvider.js +301 -0
- package/dist/browser/PlaywrightElectronActiveActions.js +257 -0
- package/dist/browser/PlaywrightElectronActiveProjection.js +141 -0
- package/dist/browser/PlaywrightElectronActiveProvider.js +293 -0
- package/dist/browser/PlaywrightExecutionBoundary.js +53 -0
- package/dist/browser/PlaywrightScenarioActions.js +58 -0
- package/dist/browser/PlaywrightScenarioArtifacts.js +162 -0
- package/dist/browser/PlaywrightScenarioBrowser.js +412 -0
- package/dist/browser/PlaywrightScenarioEvents.js +253 -0
- package/dist/browser/PlaywrightScenarioSession.js +279 -0
- package/dist/browser/PlaywrightScenarioStorage.js +507 -0
- package/dist/browser/PngVisualDiff.js +380 -0
- package/dist/browser/WebSourceMapFetcher.js +718 -0
- package/dist/browser/assets/LocalWebScriptArtifacts.js +89 -0
- package/dist/browser/assets/PageScriptCapture.js +32 -0
- package/dist/browser/assets/PublishWebScripts.js +140 -0
- package/dist/browser/assets/ScenarioScriptCapture.js +73 -0
- package/dist/browser/assets/ScriptCaptureAdapters.js +57 -0
- package/dist/browser/assets/WebArtifactReads.js +78 -0
- package/dist/browser/assets/WebSourceLocationArtifacts.js +41 -0
- package/dist/browser/execution/CdpEventListeners.js +79 -0
- package/dist/browser/execution/CdpExecutionCapture.js +135 -0
- package/dist/browser/execution/CdpExecutionCollection.js +57 -0
- package/dist/browser/execution/CdpExecutionWindow.js +100 -0
- package/dist/browser/execution/CdpListenerSelector.js +22 -0
- package/dist/browser/execution/CdpPreciseCoverage.js +45 -0
- package/dist/browser/execution/CdpRuntimeInitiator.js +18 -0
- package/dist/browser/execution/CdpRuntimeProtocol.js +106 -0
- package/dist/browser/execution/CdpRuntimeRequests.js +81 -0
- package/dist/browser/execution/CdpRuntimeSession.js +163 -0
- package/dist/browser/execution/CdpRuntimeSources.js +223 -0
- package/dist/browser/execution/CdpWebRuntimeProvider.js +51 -0
- package/dist/browser/history/CaptureFailures.js +153 -0
- package/dist/browser/history/CaptureFormatError.js +10 -0
- package/dist/browser/history/CaptureRedaction.js +68 -0
- package/dist/browser/history/CaptureRelease.js +23 -0
- package/dist/browser/history/HarCapture.js +179 -0
- package/dist/browser/history/HarCaptureAdapter.js +23 -0
- package/dist/browser/history/HarCaptureProcess.js +49 -0
- package/dist/browser/history/HarJson.js +92 -0
- package/dist/browser/history/HarSchema.js +72 -0
- package/dist/browser/history/HistoricalCaptureDecoder.js +198 -0
- package/dist/browser/history/HistoricalCaptureFormatAdapter.js +1 -0
- package/dist/browser/history/MitmproxyCaptureAdapter.js +46 -0
- package/dist/browser/modules/NativeModuleResolver.js +277 -0
- package/dist/browser/modules/WebModuleArtifacts.js +41 -0
- package/dist/browser/network/PlaywrightNetworkContent.js +71 -0
- package/dist/browser/network/PlaywrightScenarioNetwork.js +180 -0
- package/dist/browser/providerIdentities.js +24 -0
- package/dist/catalogIdentity.js +65 -0
- package/dist/cli/adbCommands.js +337 -0
- package/dist/cli/analysisSelector.js +23 -0
- package/dist/cli/analysisViewCommands.js +74 -0
- package/dist/cli/androidCommands.js +91 -0
- package/dist/cli/apktoolCommands.js +53 -0
- package/dist/cli/applicationCommands.js +173 -0
- package/dist/cli/artifactCommands.js +160 -0
- package/dist/cli/binaryDiagnosticsCommands.js +57 -0
- package/dist/cli/browserAdvancedCommands.js +189 -0
- package/dist/cli/browserCommands.js +125 -0
- package/dist/cli/commandCancellation.js +24 -0
- package/dist/cli/coreAnalysisCommands.js +7 -0
- package/dist/cli/coreBinaryCommands.js +283 -0
- package/dist/cli/coreNativeCommands.js +269 -0
- package/dist/cli/electronCommands.js +150 -0
- package/dist/cli/evmCommands.js +33 -0
- package/dist/cli/firmwareCommands.js +61 -0
- package/dist/cli/goCommands.js +21 -0
- package/dist/cli/interactiveSetup.js +236 -0
- package/dist/cli/javascriptApplicationAnalysis.js +34 -0
- package/dist/cli/javascriptRecoveryCommands.js +59 -0
- package/dist/cli/jebCommands.js +99 -0
- package/dist/cli/jsonOutput.js +46 -0
- package/dist/cli/managedCommands.js +129 -0
- package/dist/cli/managedProjectGraphCommand.js +24 -0
- package/dist/cli/nativeCallCommands.js +33 -0
- package/dist/cli/omittableDefaults.js +50 -0
- package/dist/cli/options.js +33 -0
- package/dist/cli/processCommands.js +25 -0
- package/dist/cli/referenceSourceImportStatus.js +22 -0
- package/dist/cli/setupCommands.js +189 -0
- package/dist/cli/streamedJsonOutput.js +134 -0
- package/dist/cli/types.js +1 -0
- package/dist/cli/utilityCommands.js +226 -0
- package/dist/cli/wasmCommands.js +44 -0
- package/dist/cli/webModuleCommands.js +60 -0
- package/dist/cli/webNetworkCaptureCommands.js +40 -0
- package/dist/cli/webRuntimeCommands.js +60 -0
- package/dist/cli/webScriptCommands.js +50 -0
- package/dist/cli/webSourceLocationCommands.js +54 -0
- package/dist/cli-runtime/AnalysisProvider-CeyX2u-b.js +25 -0
- package/dist/cli-runtime/AnalysisSnapshotFiles-BuK_ymw5.js +523 -0
- package/dist/cli-runtime/ArtifactReader-BXkffc1D.js +55 -0
- package/dist/cli-runtime/ArtifactResourceScope-CZqLEfbb.js +108 -0
- package/dist/cli-runtime/AsarHeader-CnzOzYEH.js +31 -0
- package/dist/cli-runtime/BinaryTargetResolver-CKRfFhLj.js +965 -0
- package/dist/cli-runtime/BoundedFileBytes-BU30odTm.js +39 -0
- package/dist/cli-runtime/ClientConfigPath-c6jr6INc.js +36 -0
- package/dist/cli-runtime/ClientConfigurationDocument-D0ZqgTCv.js +1522 -0
- package/dist/cli-runtime/ClientRegistrationStatus-DGpwJ4ry.js +422 -0
- package/dist/cli-runtime/DirectAnalysis-DW3MvxW0.js +500 -0
- package/dist/cli-runtime/Doctor-CzwYS9nB.js +862 -0
- package/dist/cli-runtime/ElectronFileScope-C1hUEp36.js +1419 -0
- package/dist/cli-runtime/ExecFileOutput-Czbj-HpV.js +106 -0
- package/dist/cli-runtime/IdaConfiguration-rEjpuRQ1.js +854 -0
- package/dist/cli-runtime/InterfaceBuilderDecodeBudget-DT74BY9z.js +225 -0
- package/dist/cli-runtime/InventoryProjectionEvidence-Dt4Og45O.js +49 -0
- package/dist/cli-runtime/InvestigationProviders-D-QCy-4c.js +117 -0
- package/dist/cli-runtime/JavaScriptApplicationEvidenceGraph-CODAjVru.js +160 -0
- package/dist/cli-runtime/JavaScriptApplicationWorkflowEvidence-CCtwSg8r.js +75 -0
- package/dist/cli-runtime/JavaScriptWorkerMemoryLimit-CJeBSMPx.js +83 -0
- package/dist/cli-runtime/JsonFiles-Ce_O5NcH.js +708 -0
- package/dist/cli-runtime/ManagedSnapshot-DthWfmy9.js +3622 -0
- package/dist/cli-runtime/OwnedCommand-CnK8-h3N.js +106 -0
- package/dist/cli-runtime/PrivateRuntimeRoot-KNg6qLwo.js +237 -0
- package/dist/cli-runtime/ProcessOwnership-AOJaszxt.js +1310 -0
- package/dist/cli-runtime/ProviderDeadline-BSbNOmuW.js +89 -0
- package/dist/cli-runtime/RegularFile-CL6meBxi.js +114 -0
- package/dist/cli-runtime/RegularFileRead-BMh5FMXd.js +115 -0
- package/dist/cli-runtime/SafeOutputTree-D8z2Zrnu.js +512 -0
- package/dist/cli-runtime/SetupHost-CzzRF89z.js +842 -0
- package/dist/cli-runtime/SupportedClients-BrZ2qZVg.js +671 -0
- package/dist/cli-runtime/UninstallFailure-1blyKXHE.js +22 -0
- package/dist/cli-runtime/Update-DF55X_N2.js +143 -0
- package/dist/cli-runtime/UpdateFailure-BcFNxEZZ.js +24 -0
- package/dist/cli-runtime/WindowsBatchCommand-5gT-d7O4.js +45 -0
- package/dist/cli-runtime/ZipArtifactReader-Db65WuM_.js +380 -0
- package/dist/cli-runtime/analysisErrorCleanup-DaUQNiQd.js +32 -0
- package/dist/cli-runtime/analysisErrorPresentation-DZrKL8kS.js +331 -0
- package/dist/cli-runtime/application__DirectAnalysisStatus-OZFIFjZr.js +93 -0
- package/dist/cli-runtime/application__EnhancedTools-C__HAdqG.js +1728 -0
- package/dist/cli-runtime/application__FunctionAnalysisEvidence-fWSgvV74.js +41 -0
- package/dist/cli-runtime/application__ReconstructionCoverageService-DlNt-4TY.js +32 -0
- package/dist/cli-runtime/application__ReconstructionObligationLedgerService-CEpbUv-7.js +813 -0
- package/dist/cli-runtime/application__Setup-BExVGpqG.js +540 -0
- package/dist/cli-runtime/application__Uninstall-BVgWDCPN.js +349 -0
- package/dist/cli-runtime/application__UpdateRuntime-Dj6UIhHQ.js +358 -0
- package/dist/cli-runtime/application__android__AndroidApplicationService-CyynwW6Z.js +31 -0
- package/dist/cli-runtime/application__apple__AppleApplicationService-BNPcWeL8.js +31 -0
- package/dist/cli-runtime/application__harmony__HarmonyApplicationService-W66PwMvx.js +31 -0
- package/dist/cli-runtime/application__javascript__ElectronActiveObservationService-D8VbeCxz.js +85 -0
- package/dist/cli-runtime/application__javascript__ElectronObservationService-FmXFG4f2.js +63 -0
- package/dist/cli-runtime/application__javascript__JavaScriptApplicationService-D-dVrmAY.js +10467 -0
- package/dist/cli-runtime/application__javascript__JavaScriptApplicationWorkflowService-Cb0jmh8J.js +2284 -0
- package/dist/cli-runtime/application__javascript__JavaScriptRuntimeReconciliationService-D55gO7Gq.js +88 -0
- package/dist/cli-runtime/application__javascript__JavaScriptSemanticTraceService-DivM-Ym-.js +298 -0
- package/dist/cli-runtime/artifactOperationError-Wd0PRLIZ.js +27 -0
- package/dist/cli-runtime/artifacts__ArtifactProvider-B_4h3RAw.js +2091 -0
- package/dist/cli-runtime/binary-9Gt3vJ1P.js +12990 -0
- package/dist/cli-runtime/browserObservationError-D73SM55P.js +40 -0
- package/dist/cli-runtime/browserScenario-CTNr5ISp.js +5543 -0
- package/dist/cli-runtime/catalogIdentity-EYVhBUYJ.js +339 -0
- package/dist/cli-runtime/cli.js +28528 -0
- package/dist/cli-runtime/cliOutput-CoDmWVu5.js +98 -0
- package/dist/cli-runtime/cliOutput.js +5 -0
- package/dist/cli-runtime/composition__browserScenario-DNr3A_BM.js +2318 -0
- package/dist/cli-runtime/composition__electronObservation-DNw1f38M.js +550 -0
- package/dist/cli-runtime/composition__electronScenario-Cu7PX270.js +586 -0
- package/dist/cli-runtime/configurationErrors-ByuF6gMR.js +49 -0
- package/dist/cli-runtime/doctorRuntime-D5y43lEp.js +162 -0
- package/dist/cli-runtime/dosMz-pwwUuxyC.js +65 -0
- package/dist/cli-runtime/dotnet__ManagedStaticProvider-BSnWggeb.js +5 -0
- package/dist/cli-runtime/enhancedInputs-K8C_o3b4.js +56 -0
- package/dist/cli-runtime/javascriptApplicationGraph-DUWeec4O.js +940 -0
- package/dist/cli-runtime/javascriptExportReturnShapeProjection-BVbnAdOd.js +78 -0
- package/dist/cli-runtime/javascriptExportShapeComparisonSchemas-BzSil7ft.js +1153 -0
- package/dist/cli-runtime/javascriptRuntimeObservation-9xTNoKY2.js +1215 -0
- package/dist/cli-runtime/javascriptRuntimeReconciliation-CneBtMvx.js +1437 -0
- package/dist/cli-runtime/javascriptRuntimeReconciliationSchemas-D1Mrb_Y0.js +245 -0
- package/dist/cli-runtime/javascriptSemanticTraceSchemas-BHItrqIA.js +126 -0
- package/dist/cli-runtime/lipo-BCA3wVyN.js +365 -0
- package/dist/cli-runtime/logger-CKq3JfbZ.js +34 -0
- package/dist/cli-runtime/machoContainer-DxxkB2b0.js +52 -0
- package/dist/cli-runtime/managedApplicationGraph-BqOr01E6.js +1116 -0
- package/dist/cli-runtime/managedToolContracts-BSy4TRaK.js +80 -0
- package/dist/cli-runtime/mcpDoctor.js +342 -0
- package/dist/cli-runtime/mcpStartupPolicy-Bb7TMLzn.js +18 -0
- package/dist/cli-runtime/native__NativeMacOSProvider-BIG9iCcj.js +4415 -0
- package/dist/cli-runtime/plistValue-KM-SqiXe.js +47 -0
- package/dist/cli-runtime/propertyListKeys-DejfMb-U.js +86 -0
- package/dist/cli-runtime/providerAdapterError-SRSE_gzN.js +27 -0
- package/dist/cli-runtime/providerCleanupError-Do66qCEp.js +27 -0
- package/dist/cli-runtime/providerIdentities-Ao1XTvwx.js +31 -0
- package/dist/cli-runtime/providerOperationHealth-DSTcYPJe.js +577 -0
- package/dist/cli-runtime/providerStartupTimeout-Be8B1Ro8.js +16 -0
- package/dist/cli-runtime/readFileHandleChunks-dp60iZ6v.js +38 -0
- package/dist/cli-runtime/reconstructionObligationLedgerSchemas-dvp6PEnZ.js +15839 -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-Bi6si9nb.js +2773 -0
- package/dist/cli-runtime/snapshotEnvironment-B5Ai0mha.js +678 -0
- package/dist/cli-runtime/streamedJsonOutput-VYlQZsM7.js +654 -0
- package/dist/cli-runtime/streamedJsonOutput.js +5 -0
- package/dist/cli-runtime/toolContracts-C7pvYKxF.js +4516 -0
- package/dist/cli-runtime/toolEffects-DW31yTSx.js +7004 -0
- package/dist/cli-runtime/workflowInputError-26EGiDpx.js +26 -0
- package/dist/cli.js +91 -0
- package/dist/cliBrowserContext.js +11 -0
- package/dist/cliBrowserScenarioCommands.js +73 -0
- package/dist/cliCommandNames.js +205 -0
- package/dist/cliEvidenceCommands.js +51 -0
- package/dist/cliJavaScriptRuntimeCommands.js +69 -0
- package/dist/cliJsonInput.js +129 -0
- package/dist/cliLogging.js +48 -0
- package/dist/cliObservationOptions.js +73 -0
- package/dist/cliOutput.js +97 -0
- package/dist/composition/adb.js +3 -0
- package/dist/composition/android.js +3 -0
- package/dist/composition/apktool.js +3 -0
- package/dist/composition/auxiliaryAnalysisProviders.js +35 -0
- package/dist/composition/binary.js +25 -0
- package/dist/composition/binaryDiagnostics.js +12 -0
- package/dist/composition/browserObservation.js +3 -0
- package/dist/composition/browserScenario.js +4 -0
- package/dist/composition/directAnalysis.js +44 -0
- package/dist/composition/electronObservation.js +3 -0
- package/dist/composition/electronScenario.js +3 -0
- package/dist/composition/evm.js +4 -0
- package/dist/composition/firmware.js +3 -0
- package/dist/composition/go.js +4 -0
- package/dist/composition/javascriptAnalysisWorkerProcess.js +48 -0
- package/dist/composition/javascriptRecovery.js +3 -0
- package/dist/composition/javascriptRuntimeObservation.js +3 -0
- package/dist/composition/jeb.js +6 -0
- package/dist/composition/optionalObservationProviders.js +54 -0
- package/dist/composition/wasm.js +4 -0
- package/dist/composition/webModules.js +5 -0
- package/dist/composition/webNetworkCaptures.js +6 -0
- package/dist/composition/webRuntime.js +4 -0
- package/dist/composition/webSourceLocations.js +5 -0
- package/dist/config/environment.js +73 -0
- package/dist/config/ghidraDisabledAnalyzers.js +25 -0
- package/dist/config/ghidraLanguageOverride.js +9 -0
- package/dist/config/homeDirectory.js +12 -0
- package/dist/config/mcpInputSchemaProfile.js +27 -0
- package/dist/config/mcpResponseBudget.js +30 -0
- package/dist/config/parseConfig.js +93 -0
- package/dist/config/parsers.js +30 -0
- package/dist/config/providerStartupTimeout.js +13 -0
- package/dist/config/types.js +1 -0
- 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/analysisSearchContract.js +14 -0
- package/dist/contracts/analysisViewApiSurfaceExample.js +68 -0
- package/dist/contracts/analysisViewToolContracts.js +76 -0
- package/dist/contracts/android/androidToolContracts.js +77 -0
- package/dist/contracts/apktool/apktoolToolContracts.js +33 -0
- package/dist/contracts/applicationToolContracts.js +261 -0
- package/dist/contracts/artifactComparisonExample.js +86 -0
- package/dist/contracts/artifactToolContracts.js +68 -0
- package/dist/contracts/browserProviderToolContracts.js +7 -0
- package/dist/contracts/browserScenarioToolContracts.js +32 -0
- package/dist/contracts/browserToolContracts.js +256 -0
- package/dist/contracts/compactInputSchema.js +256 -0
- package/dist/contracts/enhancedInputs.js +74 -0
- package/dist/contracts/enhancedToolContracts.js +32 -0
- package/dist/contracts/errorSchemas.js +87 -0
- package/dist/contracts/evidenceInputContracts.js +13 -0
- package/dist/contracts/evm/evmToolContracts.js +20 -0
- package/dist/contracts/firmware/firmwareToolContracts.js +38 -0
- package/dist/contracts/functionComparisonExample.js +51 -0
- package/dist/contracts/functionInstructionContract.js +6 -0
- package/dist/contracts/functionWorkflowToolContracts.js +29 -0
- package/dist/contracts/go/goToolContracts.js +20 -0
- package/dist/contracts/hopperMemoryContracts.js +19 -0
- package/dist/contracts/inputSchemaPresentation.js +181 -0
- package/dist/contracts/investigationExamples.js +116 -0
- package/dist/contracts/javascript/applicationWorkflowInputContracts.js +52 -0
- package/dist/contracts/javascript/electronToolContracts.js +118 -0
- package/dist/contracts/javascript/javascriptApplicationWorkflowExamples.js +85 -0
- package/dist/contracts/javascript/javascriptExportShapeComparisonExample.js +248 -0
- package/dist/contracts/javascript/javascriptRecoveryToolContracts.js +35 -0
- package/dist/contracts/javascript/javascriptRuntimeObservationToolContracts.js +40 -0
- package/dist/contracts/javascript/javascriptRuntimeReconciliationExample.js +242 -0
- package/dist/contracts/jeb/jebToolContracts.js +64 -0
- package/dist/contracts/managed/managedToolContracts.js +87 -0
- package/dist/contracts/managed/managedWorkflowExamples.js +281 -0
- package/dist/contracts/managed/managedWorkflowToolContracts.js +165 -0
- package/dist/contracts/mobileApplicationGraphExamples.js +117 -0
- package/dist/contracts/native/binaryDiagnosticsToolContracts.js +65 -0
- package/dist/contracts/native/nativeToolContracts.js +77 -0
- package/dist/contracts/officialToolContracts.js +69 -0
- package/dist/contracts/promptContracts.js +253 -0
- package/dist/contracts/providerSelection.js +29 -0
- package/dist/contracts/reconstructionReadinessExample.js +438 -0
- package/dist/contracts/sessionLifecycleInputs.js +63 -0
- package/dist/contracts/sessionStatusContract.js +17 -0
- package/dist/contracts/sessionToolContracts.js +61 -0
- package/dist/contracts/sessionToolSchemas.js +51 -0
- package/dist/contracts/toolContractExamples.js +77 -0
- package/dist/contracts/toolContractHelpers.js +22 -0
- package/dist/contracts/toolContractTypes.js +18 -0
- package/dist/contracts/toolContracts.js +60 -0
- package/dist/contracts/toolEffects.js +544 -0
- package/dist/contracts/toolOutputSchemaGroups.js +411 -0
- package/dist/contracts/toolOutputSchemaPrimitives.js +532 -0
- package/dist/contracts/toolSchemaMetadata.js +197 -0
- package/dist/contracts/unknownContractExamples.js +31 -0
- package/dist/contracts/wasm/wasmToolContracts.js +24 -0
- package/dist/contracts/webNetworkCaptureToolContracts.js +24 -0
- package/dist/contracts/webRuntimeToolContracts.js +43 -0
- package/dist/contracts/webScriptToolContracts.js +68 -0
- package/dist/doctorRuntime.js +53 -0
- package/dist/domain/adb/adbDeviceAnalysis.js +583 -0
- package/dist/domain/analysisErrorBase.js +58 -0
- package/dist/domain/analysisErrorCleanup.js +29 -0
- package/dist/domain/analysisErrorCore.js +123 -0
- package/dist/domain/analysisErrorPresentation.js +372 -0
- package/dist/domain/analysisErrorProjection.js +454 -0
- package/dist/domain/analysisProfile.js +50 -0
- package/dist/domain/analysisSnapshot.js +538 -0
- package/dist/domain/analysisView/WebNetworkApiSurfaceAccumulator.js +362 -0
- package/dist/domain/analysisView/analysisView.js +340 -0
- package/dist/domain/analysisView/analysisViewCoverage.js +19 -0
- package/dist/domain/analysisView/binaryLayoutView.js +161 -0
- package/dist/domain/analysisView/javascriptApplicationView.js +245 -0
- package/dist/domain/analysisView/nativeFunctionView.js +155 -0
- package/dist/domain/analysisView/webNetworkApiSurfaceView.js +108 -0
- package/dist/domain/android/androidAnalysis.js +143 -0
- package/dist/domain/android/androidApplication.js +144 -0
- package/dist/domain/android/androidPartialObservation.js +36 -0
- package/dist/domain/apktool/apktoolResourceAnalysis.js +75 -0
- package/dist/domain/apple/appleApplication.js +315 -0
- package/dist/domain/apple/appleAssetCatalog.js +127 -0
- package/dist/domain/apple/appleBundleAnatomy.js +303 -0
- package/dist/domain/apple/dyldEnvironment.js +73 -0
- package/dist/domain/apple/dyldPaths.js +89 -0
- package/dist/domain/apple/dylibResolution.js +485 -0
- package/dist/domain/apple/dylibResolutionFindings.js +77 -0
- package/dist/domain/apple/interfaceBuilderGraph.js +403 -0
- package/dist/domain/apple/interfaceBuilderKeyedArchive.js +430 -0
- package/dist/domain/apple/keyedArchive.js +214 -0
- package/dist/domain/apple/machoContainer.js +54 -0
- package/dist/domain/apple/plistNumbers.js +76 -0
- package/dist/domain/apple/plistValue.js +35 -0
- package/dist/domain/artifactComparison.js +348 -0
- package/dist/domain/artifactGraph.js +213 -0
- package/dist/domain/artifactIdentity.js +57 -0
- package/dist/domain/artifactInspection.js +279 -0
- package/dist/domain/artifactIntegrityPolicy.js +10 -0
- package/dist/domain/artifactInventoryEvidence.js +166 -0
- package/dist/domain/artifactInventorySnapshot.js +1 -0
- package/dist/domain/artifactOperationError.js +20 -0
- package/dist/domain/artifactPartialObservation.js +1 -0
- package/dist/domain/artifactPathSyntax.js +75 -0
- package/dist/domain/binaryTarget.js +233 -0
- package/dist/domain/binaryTargetTypes.js +10 -0
- package/dist/domain/bridgeCandidateProjection.js +71 -0
- package/dist/domain/browserCaptureComparison.js +21 -0
- package/dist/domain/browserCompleteness.js +103 -0
- package/dist/domain/browserNetworkEvidence.js +92 -0
- package/dist/domain/browserObservation.js +187 -0
- package/dist/domain/browserObservationError.js +44 -0
- package/dist/domain/browserObservationErrors.js +1 -0
- package/dist/domain/browserObservationSchemas.js +327 -0
- package/dist/domain/browserScenario.js +61 -0
- package/dist/domain/browserScenarioCapture.js +76 -0
- package/dist/domain/browserScenarioCaptureValues.js +292 -0
- package/dist/domain/browserScenarioDiff.js +266 -0
- package/dist/domain/browserScenarioDiffEvidence.js +73 -0
- package/dist/domain/browserScenarioDiffValues.js +140 -0
- package/dist/domain/browserScenarioNormalization.js +40 -0
- package/dist/domain/browserScenarioValues.js +268 -0
- package/dist/domain/browserSession.js +55 -0
- package/dist/domain/bundleComparison.js +243 -0
- package/dist/domain/callPath.js +301 -0
- package/dist/domain/callPathSchemas.js +89 -0
- package/dist/domain/canonicalDigest.js +83 -0
- package/dist/domain/canonicalJsonDigestSteps.js +155 -0
- package/dist/domain/canonicalOrdering.js +3 -0
- package/dist/domain/changedBehavior.js +282 -0
- package/dist/domain/compactStringIdentity.js +9 -0
- package/dist/domain/comparisonSemantics.js +12 -0
- package/dist/domain/comparisonSourceEvidence.js +40 -0
- package/dist/domain/comparisonStatus.js +11 -0
- package/dist/domain/completionLedgerGeneration.js +186 -0
- package/dist/domain/configurationErrors.js +37 -0
- package/dist/domain/conformancePackage.js +200 -0
- package/dist/domain/conformanceReplay.js +132 -0
- package/dist/domain/conformanceTrustGate.js +319 -0
- package/dist/domain/digests.js +27 -0
- package/dist/domain/dosCom.js +8 -0
- package/dist/domain/dosMz.js +83 -0
- package/dist/domain/emptyArraySchema.js +3 -0
- package/dist/domain/evidence.js +305 -0
- package/dist/domain/evidenceBundle.js +413 -0
- package/dist/domain/evidenceCompletionLedger.js +113 -0
- package/dist/domain/evidenceErrors.js +46 -0
- package/dist/domain/evidenceRecordSummary.js +144 -0
- package/dist/domain/evm/evmInterface.js +61 -0
- package/dist/domain/explicitSensitiveFailure.js +108 -0
- package/dist/domain/explicitSensitiveValues.js +10 -0
- package/dist/domain/firmware/firmwareAnalysis.js +128 -0
- package/dist/domain/functionComparison.js +38 -0
- package/dist/domain/functionComparisonDimensions.js +199 -0
- package/dist/domain/functionComparisonNormalization.js +150 -0
- package/dist/domain/functionComparisonResults.js +54 -0
- package/dist/domain/functionComparisonSchemas.js +88 -0
- package/dist/domain/functionDossierEvidence.js +20 -0
- package/dist/domain/go/goBinary.js +96 -0
- package/dist/domain/harmony/harmonyApplication.js +169 -0
- package/dist/domain/hopperErrors.js +98 -0
- package/dist/domain/hopperStartupFailure.js +64 -0
- package/dist/domain/hopperValues.js +368 -0
- package/dist/domain/immutableJson.js +114 -0
- package/dist/domain/inputIssueProjection.js +94 -0
- package/dist/domain/javascript/electronActiveObservation.js +237 -0
- package/dist/domain/javascript/electronObservation.js +122 -0
- package/dist/domain/javascript/electronStaticAnalysis.js +9 -0
- package/dist/domain/javascript/electronStaticAnalysisBrowser.js +187 -0
- package/dist/domain/javascript/electronStaticAnalysisIpc.js +197 -0
- package/dist/domain/javascript/electronStaticAnalysisNative.js +199 -0
- package/dist/domain/javascript/electronStaticAnalysisTypes.js +1 -0
- package/dist/domain/javascript/electronStaticAnalysisValues.js +134 -0
- package/dist/domain/javascript/electronWrappedCallPaths.js +399 -0
- package/dist/domain/javascript/htmlArtifactReferences.js +40 -0
- package/dist/domain/javascript/javascriptAnalysisResourceControls.js +65 -0
- package/dist/domain/javascript/javascriptApplicationAnalysis.js +146 -0
- package/dist/domain/javascript/javascriptApplicationChangeGraph.js +175 -0
- package/dist/domain/javascript/javascriptApplicationEvidenceSchemas.js +400 -0
- package/dist/domain/javascript/javascriptApplicationGraph.js +378 -0
- package/dist/domain/javascript/javascriptApplicationGraphSchemas.js +126 -0
- package/dist/domain/javascript/javascriptApplicationProjectionResources.js +43 -0
- package/dist/domain/javascript/javascriptApplicationVersionComparison.js +104 -0
- package/dist/domain/javascript/javascriptApplicationVersionComparisonSchemas.js +211 -0
- package/dist/domain/javascript/javascriptApplicationVersionItems.js +324 -0
- package/dist/domain/javascript/javascriptApplicationVersionKeys.js +199 -0
- package/dist/domain/javascript/javascriptArtifactFiles.js +1 -0
- package/dist/domain/javascript/javascriptAstFingerprint.js +153 -0
- package/dist/domain/javascript/javascriptAstValues.js +99 -0
- package/dist/domain/javascript/javascriptBootstrap.js +94 -0
- package/dist/domain/javascript/javascriptElectronMemberWrites.js +119 -0
- package/dist/domain/javascript/javascriptExportReturnShapeProjection.js +81 -0
- package/dist/domain/javascript/javascriptExportShapeComparison.js +161 -0
- package/dist/domain/javascript/javascriptExportShapeComparisonIdentity.js +16 -0
- package/dist/domain/javascript/javascriptExportShapeComparisonSchemas.js +302 -0
- package/dist/domain/javascript/javascriptExportShapeSelection.js +130 -0
- package/dist/domain/javascript/javascriptExportShapeVariants.js +333 -0
- package/dist/domain/javascript/javascriptFeatureSeed.js +193 -0
- package/dist/domain/javascript/javascriptFeatureTrace.js +177 -0
- package/dist/domain/javascript/javascriptFeatureTraceSchemas.js +131 -0
- package/dist/domain/javascript/javascriptFeatureTraversal.js +61 -0
- package/dist/domain/javascript/javascriptIntrinsicInvocation.js +93 -0
- package/dist/domain/javascript/javascriptModuleInterop.js +617 -0
- package/dist/domain/javascript/javascriptModuleSemanticIr.js +15 -0
- package/dist/domain/javascript/javascriptNativeHandoff.js +90 -0
- package/dist/domain/javascript/javascriptPackageImportAliases.js +58 -0
- package/dist/domain/javascript/javascriptRecovery.js +90 -0
- package/dist/domain/javascript/javascriptRpcEndpoints.js +253 -0
- package/dist/domain/javascript/javascriptRuntimeLoadState.js +98 -0
- package/dist/domain/javascript/javascriptRuntimeObservation.js +136 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliation.js +46 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationActive.js +74 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationCaptureParsing.js +212 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationGraph.js +163 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationInputValidation.js +28 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationMatching.js +270 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationParsing.js +39 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationResult.js +126 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationRuntime.js +334 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationSchemas.js +234 -0
- package/dist/domain/javascript/javascriptRuntimeStaticCandidates.js +206 -0
- package/dist/domain/javascript/javascriptSemanticAnalysis.js +910 -0
- package/dist/domain/javascript/javascriptSemanticAsyncEffects.js +246 -0
- package/dist/domain/javascript/javascriptSemanticCallResolution.js +127 -0
- package/dist/domain/javascript/javascriptSemanticCallableResults.js +42 -0
- package/dist/domain/javascript/javascriptSemanticCalls.js +272 -0
- package/dist/domain/javascript/javascriptSemanticChildProcesses.js +224 -0
- package/dist/domain/javascript/javascriptSemanticCoverage.js +32 -0
- package/dist/domain/javascript/javascriptSemanticDataEffectHelpers.js +182 -0
- package/dist/domain/javascript/javascriptSemanticDataEffects.js +299 -0
- package/dist/domain/javascript/javascriptSemanticDerivedAnalysis.js +52 -0
- package/dist/domain/javascript/javascriptSemanticFileProjection.js +1 -0
- package/dist/domain/javascript/javascriptSemanticFingerprints.js +187 -0
- package/dist/domain/javascript/javascriptSemanticGraph.js +575 -0
- package/dist/domain/javascript/javascriptSemanticGraphSchemas.js +316 -0
- package/dist/domain/javascript/javascriptSemanticGraphSerialization.js +12 -0
- package/dist/domain/javascript/javascriptSemanticIr.js +31 -0
- package/dist/domain/javascript/javascriptSemanticIterationSources.js +139 -0
- package/dist/domain/javascript/javascriptSemanticMemberMutations.js +865 -0
- package/dist/domain/javascript/javascriptSemanticMutationInitializers.js +190 -0
- package/dist/domain/javascript/javascriptSemanticMutationValues.js +104 -0
- package/dist/domain/javascript/javascriptSemanticObjectReferences.js +381 -0
- package/dist/domain/javascript/javascriptSemanticObjects.js +164 -0
- package/dist/domain/javascript/javascriptSemanticPrimitives.js +38 -0
- package/dist/domain/javascript/javascriptSemanticProjection.js +571 -0
- package/dist/domain/javascript/javascriptSemanticPromises.js +321 -0
- package/dist/domain/javascript/javascriptSemanticPropertyPaths.js +100 -0
- package/dist/domain/javascript/javascriptSemanticProvenance.js +29 -0
- package/dist/domain/javascript/javascriptSemanticQuery.js +175 -0
- package/dist/domain/javascript/javascriptSemanticQueryAssessment.js +45 -0
- package/dist/domain/javascript/javascriptSemanticQueryIdentity.js +63 -0
- package/dist/domain/javascript/javascriptSemanticQueryRelations.js +15 -0
- package/dist/domain/javascript/javascriptSemanticQuerySchemas.js +95 -0
- package/dist/domain/javascript/javascriptSemanticRequireOrigin.js +34 -0
- package/dist/domain/javascript/javascriptSemanticResourceLimits.js +77 -0
- package/dist/domain/javascript/javascriptSemanticResources.js +129 -0
- package/dist/domain/javascript/javascriptSemanticReturnedReferences.js +219 -0
- package/dist/domain/javascript/javascriptSemanticReturns.js +159 -0
- package/dist/domain/javascript/javascriptSemanticSlots.js +72 -0
- package/dist/domain/javascript/javascriptSemanticState.js +116 -0
- package/dist/domain/javascript/javascriptSemanticTraceSchemas.js +15 -0
- package/dist/domain/javascript/javascriptSemanticTraversal.js +80 -0
- package/dist/domain/javascript/javascriptSemanticValueTypes.js +1 -0
- package/dist/domain/javascript/javascriptSemanticValues.js +581 -0
- package/dist/domain/javascript/javascriptSourceAnalysis.js +1 -0
- package/dist/domain/javascript/javascriptSourceMapPaths.js +114 -0
- package/dist/domain/javascript/javascriptSourceParser.js +50 -0
- package/dist/domain/javascript/javascriptSourceSelection.js +11 -0
- package/dist/domain/javascript/javascriptStaticAnalysis.js +142 -0
- package/dist/domain/javascript/javascriptStaticAnalysisBundler.js +239 -0
- package/dist/domain/javascript/javascriptStaticAnalysisCalls.js +271 -0
- package/dist/domain/javascript/javascriptStaticAnalysisFindings.js +86 -0
- package/dist/domain/javascript/javascriptStaticAnalysisHelpers.js +561 -0
- package/dist/domain/javascript/javascriptStaticAnalysisState.js +21 -0
- package/dist/domain/javascript/javascriptStaticAnalysisTypes.js +2 -0
- package/dist/domain/javascript/javascriptSymbolicBindings.js +795 -0
- package/dist/domain/javascript/javascriptSymbolicControlFlow.js +40 -0
- package/dist/domain/javascript/javascriptSymbolicValues.js +34 -0
- package/dist/domain/javascript/sourceToBundleComparison.js +261 -0
- package/dist/domain/javascript/sourceToBundleComparisonSchemas.js +109 -0
- package/dist/domain/javascript/sourceToBundleSignals.js +231 -0
- package/dist/domain/jeb/jebAnalysis.js +114 -0
- package/dist/domain/jsonSerialization.js +163 -0
- package/dist/domain/jsonShape.js +141 -0
- package/dist/domain/jsonValue.js +96 -0
- package/dist/domain/localPath.js +24 -0
- package/dist/domain/managed/managedApplicationGraph.js +221 -0
- package/dist/domain/managed/managedApplicationGraphCoverage.js +48 -0
- package/dist/domain/managed/managedApplicationGraphNodes.js +367 -0
- package/dist/domain/managed/managedArtifact.js +465 -0
- package/dist/domain/managed/managedInspectionEvidence.js +28 -0
- package/dist/domain/managed/managedMemberComparison.js +211 -0
- package/dist/domain/managed/managedMemberComparisonCoverage.js +71 -0
- package/dist/domain/managed/managedMemberComparisonItems.js +304 -0
- package/dist/domain/managed/managedMemberComparisonMatch.js +204 -0
- package/dist/domain/managed/managedNativeVerification.js +35 -0
- package/dist/domain/managed/managedNativeVerificationMatch.js +276 -0
- package/dist/domain/managed/managedNativeVerificationSchemas.js +180 -0
- package/dist/domain/managed/managedReconstruction.js +190 -0
- package/dist/domain/mobileApplicationGraphProjection.js +61 -0
- package/dist/domain/native/binaryLayout.js +354 -0
- package/dist/domain/native/fileOffsetPartialObservation.js +1 -0
- package/dist/domain/native/nativeAotPe.js +1408 -0
- package/dist/domain/native/nativeApiBoundary.js +140 -0
- package/dist/domain/native/nativeCallObservation.js +186 -0
- package/dist/domain/native/nativeCallPartialObservation.js +33 -0
- package/dist/domain/native/nativeDataType.js +53 -0
- package/dist/domain/native/nativeFunctionAnnotations.js +43 -0
- package/dist/domain/native/nativeInspection.js +174 -0
- package/dist/domain/native/nativeInstruction.js +125 -0
- package/dist/domain/native/nativeInvestigationGraph.js +364 -0
- package/dist/domain/native/nativeLoadImage.js +112 -0
- package/dist/domain/native/nativeMetadataRecovery.js +128 -0
- package/dist/domain/native/nativeUiObservation.js +137 -0
- package/dist/domain/native/nativeValueFlow.js +72 -0
- package/dist/domain/native/nativeValueTrace.js +64 -0
- package/dist/domain/native/objcSwiftMetadata.js +419 -0
- package/dist/domain/native/peResources.js +100 -0
- package/dist/domain/native/recordedCrash.js +263 -0
- package/dist/domain/native/recordedCrashNoteCoverage.js +73 -0
- package/dist/domain/nativeConvention.js +33 -0
- package/dist/domain/offsetDateTime.js +17 -0
- package/dist/domain/peMachine.js +36 -0
- package/dist/domain/process/processCapture.js +412 -0
- package/dist/domain/process/processCaptureCoverage.js +70 -0
- package/dist/domain/process/processCaptureExample.js +132 -0
- package/dist/domain/process/processCaptureParsing.js +21 -0
- package/dist/domain/process/processCaptureValidation.js +246 -0
- package/dist/domain/process/processComparison.js +315 -0
- package/dist/domain/process/processEvidenceProvider.js +11 -0
- package/dist/domain/process/processObservation.js +140 -0
- package/dist/domain/process/processScenario.js +247 -0
- package/dist/domain/process/processTraceComparison.js +34 -0
- package/dist/domain/process/processTraceDimensionProjection.js +35 -0
- package/dist/domain/process/processTraceEvaluation.js +320 -0
- package/dist/domain/process/processTraceSpecification.js +382 -0
- package/dist/domain/propertyListKeys.js +107 -0
- package/dist/domain/propertyListXmlText.js +19 -0
- package/dist/domain/providerAdapterError.js +19 -0
- package/dist/domain/providerCleanupError.js +18 -0
- package/dist/domain/providerConfigurationRefusal.js +12 -0
- package/dist/domain/providerOperationHealth.js +54 -0
- package/dist/domain/providerSelectionError.js +46 -0
- package/dist/domain/rawBinary.js +93 -0
- package/dist/domain/reconstructionCoverage.js +325 -0
- package/dist/domain/reconstructionCoverageEvaluation.js +234 -0
- package/dist/domain/reconstructionCoverageInput.js +7 -0
- package/dist/domain/reconstructionObligationLedgerIntegrity.js +114 -0
- package/dist/domain/reconstructionObligationLedgerSchemas.js +347 -0
- package/dist/domain/reconstructionReadiness.js +116 -0
- package/dist/domain/reconstructionReadinessFindingHelpers.js +17 -0
- package/dist/domain/reconstructionReadinessIntegrityFindings.js +118 -0
- package/dist/domain/reconstructionReadinessJourneyFindings.js +193 -0
- package/dist/domain/reconstructionReadinessSchemas.js +268 -0
- package/dist/domain/reconstructionUnknowns.js +91 -0
- package/dist/domain/reconstructionVerification.js +218 -0
- package/dist/domain/reconstructionVerificationSchemas.js +141 -0
- package/dist/domain/recordedTransportUrl.js +51 -0
- package/dist/domain/referenceSourceClassification.js +385 -0
- package/dist/domain/referenceSourceGraph.js +380 -0
- package/dist/domain/referenceSourceImportParsing.js +238 -0
- package/dist/domain/referenceSourcePathIdentity.js +22 -0
- package/dist/domain/referenceSourcePolicy.js +1 -0
- package/dist/domain/referenceSourceRequireBindings.js +137 -0
- package/dist/domain/relationshipCoverage.js +20 -0
- package/dist/domain/residualUnknown.js +252 -0
- package/dist/domain/result.js +4 -0
- package/dist/domain/runtimeVersion.js +15 -0
- package/dist/domain/safeJson.js +13 -0
- package/dist/domain/sourceMapContents.js +6 -0
- package/dist/domain/sourceMapEnvelope.js +44 -0
- package/dist/domain/staticRuntimeCorrelation.js +334 -0
- package/dist/domain/stringPatterns.js +6 -0
- package/dist/domain/swiftSymbolClassification.js +66 -0
- package/dist/domain/symbolAnalysis.js +122 -0
- package/dist/domain/unicodeCodePointOrder.js +23 -0
- package/dist/domain/unknownRegistryError.js +10 -0
- package/dist/domain/wasm/wasmArtifact.js +105 -0
- package/dist/domain/webBundleAnalysis.js +192 -0
- package/dist/domain/webBundleAnalyzer.js +15 -0
- package/dist/domain/webBundleAnalyzerAst.js +49 -0
- package/dist/domain/webBundleAnalyzerInspection.js +315 -0
- package/dist/domain/webBundleAnalyzerResult.js +142 -0
- package/dist/domain/webCaptureDiff.js +423 -0
- package/dist/domain/webCaptureDiffSchemas.js +84 -0
- package/dist/domain/webContentArtifact.js +38 -0
- package/dist/domain/webEventListeners.js +29 -0
- package/dist/domain/webExecution.js +75 -0
- package/dist/domain/webInventory.js +62 -0
- package/dist/domain/webMcpDiscovery.js +53 -0
- package/dist/domain/webModuleImports.js +99 -0
- package/dist/domain/webModuleTrace.js +101 -0
- package/dist/domain/webNetworkCapture.js +142 -0
- package/dist/domain/webNetworkCaptureCoordinates.js +58 -0
- package/dist/domain/webRuntime.js +80 -0
- package/dist/domain/webScreenshot.js +132 -0
- package/dist/domain/webScriptArtifacts.js +37 -0
- package/dist/domain/webScriptExport.js +84 -0
- package/dist/domain/webScriptExportError.js +19 -0
- package/dist/domain/webScriptExportPlan.js +104 -0
- package/dist/domain/webSourceLocation.js +118 -0
- package/dist/domain/webSourcePosition.js +21 -0
- package/dist/domain/zipPackageFormat.js +52 -0
- package/dist/domain/zodCollectionSteps.js +24 -0
- package/dist/dotnet/ManagedArtifactInspector.js +308 -0
- package/dist/dotnet/ManagedDecodeBudget.js +138 -0
- package/dist/dotnet/ManagedExceptionRegionValidation.js +41 -0
- package/dist/dotnet/ManagedMemberInspector.js +173 -0
- package/dist/dotnet/ManagedMemberInspectorCore.js +446 -0
- package/dist/dotnet/ManagedMemberInstructionDecoder.js +468 -0
- package/dist/dotnet/ManagedMemberOwnership.js +71 -0
- package/dist/dotnet/ManagedMemberPointers.js +62 -0
- package/dist/dotnet/ManagedMemberRows.js +227 -0
- package/dist/dotnet/ManagedMetadataHeaps.js +179 -0
- package/dist/dotnet/ManagedMetadataInventory.js +99 -0
- package/dist/dotnet/ManagedMetadataInventoryRows.js +295 -0
- package/dist/dotnet/ManagedMetadataLayout.js +270 -0
- package/dist/dotnet/ManagedMetadataRowSizes.js +54 -0
- package/dist/dotnet/ManagedMethodBodyReader.js +155 -0
- package/dist/dotnet/ManagedNativeBoundaryHelpers.js +314 -0
- package/dist/dotnet/ManagedNativeBoundaryInspector.js +128 -0
- package/dist/dotnet/ManagedPeReader.js +233 -0
- package/dist/dotnet/ManagedReaderFailure.js +27 -0
- package/dist/dotnet/ManagedSnapshot.js +88 -0
- package/dist/dotnet/ManagedStaticProvider.js +158 -0
- package/dist/dotnet/ManagedStaticProviderMetadata.js +33 -0
- package/dist/evaluation/AgentEvaluationFixtures.js +250 -0
- package/dist/evaluation/AgentEvaluationReport.js +32 -0
- package/dist/evaluation/CodexAgentEval.js +188 -0
- package/dist/evaluation/KnownAnswerEvaluation.js +323 -0
- package/dist/evm/EvmBytecodeCarrier.js +21 -0
- package/dist/evm/EvmWorkerLimits.js +40 -0
- package/dist/evm/EvmoleFailures.js +124 -0
- package/dist/evm/EvmoleInterfaceAdapter.js +53 -0
- package/dist/evm/EvmoleInterfaceProvider.js +339 -0
- package/dist/evm/EvmoleInterfaceWorker.js +87 -0
- package/dist/evm/EvmoleRelease.js +16 -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 +73 -0
- package/dist/filesystem/StableFileHash.js +46 -0
- package/dist/filesystem/readFileHandleChunks.js +35 -0
- package/dist/firmware/FirmwareCommand.js +190 -0
- package/dist/firmware/FirmwareFiles.js +206 -0
- package/dist/firmware/FirmwareProvider.js +388 -0
- package/dist/firmware/FirmwarePublication.js +105 -0
- package/dist/firmware/FirmwareRelease.js +33 -0
- package/dist/firmware/FirmwareReports.js +287 -0
- package/dist/firmware/FirmwareVersion.js +80 -0
- package/dist/generatedPackageMetadata.js +9 -0
- package/dist/ghidra/GhidraAnalysisProfile.js +219 -0
- package/dist/ghidra/GhidraAnalysisSeeds.js +211 -0
- package/dist/ghidra/GhidraClient.js +725 -0
- package/dist/ghidra/GhidraClientStartup.js +27 -0
- package/dist/ghidra/GhidraClientTypes.js +1 -0
- package/dist/ghidra/GhidraClientWire.js +38 -0
- package/dist/ghidra/GhidraDiagnostics.js +53 -0
- package/dist/ghidra/GhidraDoctor.js +88 -0
- package/dist/ghidra/GhidraFunctionValues.js +328 -0
- package/dist/ghidra/GhidraInstallation.js +443 -0
- package/dist/ghidra/GhidraInstallationPolicy.js +140 -0
- package/dist/ghidra/GhidraInventoryValues.js +262 -0
- package/dist/ghidra/GhidraJavaLaunch.js +66 -0
- package/dist/ghidra/GhidraLanguageCatalog.js +99 -0
- package/dist/ghidra/GhidraLauncher.js +490 -0
- package/dist/ghidra/GhidraLoadImageAttest.js +103 -0
- package/dist/ghidra/GhidraLoadImageValues.js +260 -0
- package/dist/ghidra/GhidraMipsProfile.js +187 -0
- package/dist/ghidra/GhidraProvider.js +250 -0
- package/dist/ghidra/GhidraProviderCapabilities.js +208 -0
- package/dist/ghidra/GhidraProviderClient.js +613 -0
- package/dist/ghidra/GhidraPspExtension.js +144 -0
- package/dist/ghidra/GhidraPspProfile.js +50 -0
- package/dist/ghidra/GhidraRawBinaryLanguage.js +18 -0
- package/dist/ghidra/GhidraRequestQueue.js +115 -0
- package/dist/ghidra/GhidraResponseBuffer.js +31 -0
- package/dist/ghidra/GhidraResponseRouter.js +24 -0
- package/dist/ghidra/GhidraSessionError.js +180 -0
- package/dist/ghidra/GhidraSessionRoot.js +39 -0
- package/dist/ghidra/GhidraSessionValues.js +86 -0
- package/dist/ghidra/GhidraSocketConnection.js +83 -0
- package/dist/ghidra/GhidraTargetSnapshot.js +79 -0
- package/dist/ghidra/GhidraTransport.js +101 -0
- package/dist/ghidra/extensions/GhidraExtensionFailures.js +20 -0
- package/dist/ghidra/extensions/GhidraExtensions.js +177 -0
- package/dist/ghidra/extensions/nativeaot/NativeAotAdapter.js +27 -0
- package/dist/ghidra/extensions/nativeaot/NativeAotReport.js +100 -0
- package/dist/ghidra/protocol.js +46 -0
- package/dist/go/GoBinaryContainer.js +125 -0
- package/dist/go/GoBinaryImage.js +172 -0
- package/dist/go/GoBinaryProvider.js +137 -0
- package/dist/go/GoElfImage.js +149 -0
- package/dist/go/GoMachoImage.js +113 -0
- package/dist/go/GoModuleText.js +217 -0
- package/dist/go/GoPeImage.js +102 -0
- package/dist/hopper/BridgeLauncher.js +305 -0
- package/dist/hopper/HopperAnalysisProfile.js +168 -0
- package/dist/hopper/HopperCleanup.js +245 -0
- package/dist/hopper/HopperClient.js +767 -0
- package/dist/hopper/HopperDiagnostics.js +14 -0
- package/dist/hopper/HopperFileOffset.js +237 -0
- package/dist/hopper/HopperMachOImage.js +200 -0
- package/dist/hopper/HopperOperationStage.js +6 -0
- package/dist/hopper/HopperProcessDiagnostic.js +26 -0
- package/dist/hopper/HopperProvider.js +269 -0
- package/dist/hopper/HopperProviderCapabilities.js +91 -0
- package/dist/hopper/HopperRegexSearch.js +134 -0
- package/dist/hopper/HopperRegexWorker.js +27 -0
- package/dist/hopper/HopperRequestQueue.js +261 -0
- package/dist/hopper/HopperResponseStream.js +44 -0
- package/dist/hopper/HopperSessionValues.js +30 -0
- package/dist/hopper/HopperSocketConnection.js +31 -0
- package/dist/hopper/HopperTargetLease.js +233 -0
- package/dist/hopper/LinuxPrivateDisplayDiagnostic.js +64 -0
- package/dist/hopper/LinuxPrivateDisplayProbe.js +224 -0
- package/dist/hopper/protocol.js +88 -0
- package/dist/ida/IdaBusyHealth.js +44 -0
- package/dist/ida/IdaCallGraph.js +134 -0
- package/dist/ida/IdaConfiguration.js +61 -0
- package/dist/ida/IdaDoctor.js +53 -0
- package/dist/ida/IdaInput.js +56 -0
- package/dist/ida/IdaMcpConnection.js +115 -0
- package/dist/ida/IdaOperationRunner.js +376 -0
- package/dist/ida/IdaProtocolValues.js +208 -0
- package/dist/ida/IdaProvider.js +136 -0
- package/dist/ida/IdaProviderCapabilities.js +64 -0
- package/dist/ida/IdaSessionClient.js +444 -0
- package/dist/ida/IdaWorkspace.js +55 -0
- package/dist/identity.js +25 -0
- package/dist/inspector/JavaScriptRuntimeScope.js +89 -0
- package/dist/inspector/V8InspectorCaptureProjection.js +197 -0
- package/dist/inspector/V8InspectorEndpoint.js +70 -0
- package/dist/inspector/V8InspectorProvider.js +378 -0
- package/dist/inspector/providerIdentity.js +6 -0
- package/dist/javascript/analysis/JavaScriptAnalysisTransfer.js +337 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorker.js +574 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerProtocol.js +64 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerSchemas.js +558 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerServer.js +121 -0
- package/dist/javascript/recovery/RecoveryFiles.js +175 -0
- package/dist/javascript/recovery/WakaruCommand.js +137 -0
- package/dist/javascript/recovery/WakaruExecution.js +115 -0
- package/dist/javascript/recovery/WakaruProvider.js +218 -0
- package/dist/javascript/recovery/WakaruPublication.js +126 -0
- package/dist/javascript/recovery/WakaruRelease.js +36 -0
- package/dist/javascript/recovery/WakaruReport.js +140 -0
- package/dist/javascript/recovery/WakaruVersion.js +24 -0
- package/dist/javascript/sourceMaps/DecodedSourceMap.js +47 -0
- package/dist/javascript/sourceMaps/SourceMapCodecProcess.js +37 -0
- package/dist/javascript/sourceMaps/SourceMapCodecProtocol.js +20 -0
- package/dist/javascript/sourceMaps/SourceMapCommand.js +223 -0
- package/dist/javascript/sourceMaps/SourceMapDecoder.js +135 -0
- package/dist/javascript/sourceMaps/SourceMapFormat.js +238 -0
- package/dist/javascript/sourceMaps/TraceSourceMap.js +152 -0
- package/dist/jeb/JebMcpConnection.js +186 -0
- package/dist/jeb/JebMcpEndpoint.js +40 -0
- package/dist/jeb/JebProvider.js +297 -0
- package/dist/logger.js +14 -0
- package/dist/main/messages.js +4 -0
- package/dist/main/shutdown.js +102 -0
- package/dist/main/startup.js +21 -0
- package/dist/main/transport.js +72 -0
- package/dist/main/types.js +1 -0
- package/dist/main.js +92 -0
- package/dist/mcp/AnalysisSnapshotFiles-DbgHi36O.js +1225 -0
- package/dist/mcp/ArtifactProvider-BNxKlaKX.js +2090 -0
- package/dist/mcp/ArtifactProviderMetadata--hy-wyJK.js +76 -0
- package/dist/mcp/ArtifactReader-OyM03Gjn.js +55 -0
- package/dist/mcp/ArtifactResourceScope-CBR5q4aK.js +108 -0
- package/dist/mcp/AsarHeader-WsPgoooH.js +31 -0
- package/dist/mcp/BinaryTargetResolver-DbiUzRLh.js +1073 -0
- package/dist/mcp/BoundedFileBytes-CJPW_TzE.js +68 -0
- package/dist/mcp/CdpConnection-CM0tkVfW.js +557 -0
- package/dist/mcp/CdpOptionalCommand-H8_fL7Q_.js +120 -0
- package/dist/mcp/CdpTargetSession-OYD1d6XM.js +647 -0
- package/dist/mcp/DirectAnalysis-BWAu8Ro5.js +395 -0
- package/dist/mcp/DirectAnalysisStatus-DofNPhKd.js +33 -0
- package/dist/mcp/ElectronFileScope-DEayib6K.js +110 -0
- package/dist/mcp/InterfaceBuilderDecodeBudget-CUrOtfNo.js +401 -0
- package/dist/mcp/ManagedStaticProvider-CXE93Bow.js +4460 -0
- package/dist/mcp/NativeMacOSProvider-BbITFLHW.js +4408 -0
- package/dist/mcp/NativeMacOSProviderMetadata-mxDhaNJf.js +281 -0
- package/dist/mcp/ProcedureAddressResolution-Gnjf9Hya.js +19 -0
- package/dist/mcp/ProcessOwnership-nOFZsmD3.js +1411 -0
- package/dist/mcp/WorkflowEvidence-DJyEy3K0.js +94 -0
- package/dist/mcp/analysisErrorCore-BqyeMw3_.js +201 -0
- package/dist/mcp/analysisErrorProjection-B7pHef2y.js +724 -0
- package/dist/mcp/artifactOperationError-B_jxO8at.js +27 -0
- package/dist/mcp/artifactToolContracts-TXegBBr1.js +159 -0
- package/dist/mcp/browserObservation-BCgaDRyQ.js +4398 -0
- package/dist/mcp/browserObservationError-BKBEX85K.js +40 -0
- package/dist/mcp/browserObservationSchemas-yzRJ90-E.js +573 -0
- package/dist/mcp/browserScenario-z7jveI9P.js +2319 -0
- package/dist/mcp/browserScenarioCapture-BvnKTmtZ.js +460 -0
- package/dist/mcp/canonicalDigest-Bi_0_zGi.js +71 -0
- package/dist/mcp/digests-Dugt3H71.js +199 -0
- package/dist/mcp/electronActiveObservation-lDvQTMR0.js +226 -0
- package/dist/mcp/electronObservation-DjQQYGw4.js +556 -0
- package/dist/mcp/electronObservation-DuhMHCmQ.js +112 -0
- package/dist/mcp/electronScenario-9mLG6h-g.js +586 -0
- package/dist/mcp/emptyArraySchema-DEEefG2V.js +140 -0
- package/dist/mcp/enhancedInputs-CLdEXv88.js +56 -0
- package/dist/mcp/interfaceBuilderGraph-BOKqQzjK.js +2613 -0
- package/dist/mcp/javascriptRuntimeObservation-C_wglsz_.js +661 -0
- package/dist/mcp/javascriptRuntimeObservation-CxQ1UT_y.js +121 -0
- package/dist/mcp/lipo-Do-2eBrl.js +465 -0
- package/dist/mcp/localPath-AxvW9aPe.js +19 -0
- package/dist/mcp/logger-CZ4Hlc6u.js +34 -0
- package/dist/mcp/machoContainer-9En6pSkd.js +813 -0
- package/dist/mcp/main-WQSCuTNt.js +52791 -0
- package/dist/mcp/main.js +6 -0
- package/dist/mcp/managedToolContracts-o5LHFwHc.js +81 -0
- package/dist/mcp/plistValue-DsU7z4yF.js +47 -0
- package/dist/mcp/propertyListKeys-cX-BUv2y.js +197 -0
- package/dist/mcp/providerAdapterError-CdPaQ6-Z.js +27 -0
- package/dist/mcp/providerCleanupError-DvE79aUX.js +49 -0
- package/dist/mcp/providerIdentities--ptAh481.js +31 -0
- package/dist/mcp/providerIdentity-BCQ5n5tw.js +16 -0
- package/dist/mcp/providerOperationHealth-CUeCJZiP.js +212 -0
- package/dist/mcp/rolldown-runtime-BjeaiXFo.js +121 -0
- package/dist/mcp/safeJson-NeGfpkrI.js +25 -0
- package/dist/mcp/scanCanonical-2GN0h-BE.js +3647 -0
- package/dist/mcp/serverIdentity-rOY69sxc.js +633 -0
- package/dist/mcp/sourceMapEnvelope-D8Zezqyi.js +252 -0
- package/dist/mcp/toolContracts-CrfYDTUz.js +14561 -0
- package/dist/mcp/toolOutputSchemaGroups-ChxVLGoy.js +11114 -0
- package/dist/mcp/unicodeCodePointOrder-BezCbTpg.js +26 -0
- package/dist/mcp/webContentArtifact-DUBgMzVO.js +185 -0
- package/dist/mcp/webRuntime-C2Tx-fgS.js +74 -0
- package/dist/mcp/webSourceLocation-Dnkpf0R2.js +8532 -0
- package/dist/mcpDoctor.js +360 -0
- package/dist/mcpStartupPolicy.js +14 -0
- package/dist/native/AppleDispatchCoverage.js +112 -0
- package/dist/native/AppleDispatchDecodeFacts.js +6 -0
- package/dist/native/AppleDispatchMetadata.js +176 -0
- package/dist/native/AppleMachoFixups.js +372 -0
- package/dist/native/AppleMachoSelection.js +234 -0
- package/dist/native/AppleObjcCategories.js +63 -0
- package/dist/native/AppleObjcDispatchFacets.js +260 -0
- package/dist/native/AppleObjcProperties.js +79 -0
- package/dist/native/AppleObjcProtocols.js +89 -0
- package/dist/native/AppleSwiftDispatchFacets.js +156 -0
- package/dist/native/AppleSwiftVtables.js +92 -0
- package/dist/native/CommandRunner.js +240 -0
- package/dist/native/LldbCallTracer.js +713 -0
- package/dist/native/LldbRetainedObservations.js +178 -0
- package/dist/native/NativeCallObservation.js +195 -0
- package/dist/native/NativeMacOSProvider.js +701 -0
- package/dist/native/NativeMacOSProviderMetadata.js +46 -0
- package/dist/native/NativeMachoInspection.js +273 -0
- package/dist/native/NativeUiHelperRuntime.js +66 -0
- package/dist/native/NativeUiObservation.js +183 -0
- package/dist/native/NativeUiOutputBudget.js +8 -0
- package/dist/native/SignatureTargetBinding.js +155 -0
- package/dist/native/parsers/codesign.js +93 -0
- package/dist/native/parsers/demangle.js +30 -0
- package/dist/native/parsers/dyldInfo.js +60 -0
- package/dist/native/parsers/echoedPath.js +14 -0
- package/dist/native/parsers/lipo.js +177 -0
- package/dist/native/parsers/machoUuid.js +150 -0
- package/dist/native/parsers/otool.js +379 -0
- package/dist/native/parsers/plist.js +187 -0
- package/dist/native/pe/PeResourceLayout.js +120 -0
- package/dist/native/pe/PeResourceParser.js +286 -0
- package/dist/native/pe/PeResourcesProvider.js +63 -0
- package/dist/native/pwndbg/PwndbgCoreContext.js +180 -0
- package/dist/native/pwntools/PwntoolsDecoder.js +206 -0
- package/dist/native/pwntools/PwntoolsFailures.js +180 -0
- package/dist/native/pwntools/PwntoolsLayoutProvider.js +36 -0
- package/dist/native/pwntools/PwntoolsRecordedCrashProvider.js +75 -0
- package/dist/native/pwntools/PwntoolsRelease.js +19 -0
- package/dist/native/pwntools/PwntoolsResourceLimits.js +76 -0
- package/dist/native/pwntools/RecordedCrashSourceBindings.js +46 -0
- package/dist/native/pwntools/RecordedCrashStructureBindings.js +103 -0
- package/dist/process/BoundedFileBytes.js +40 -0
- package/dist/process/DarwinProcessRunTokenReader.js +376 -0
- package/dist/process/ExecFileOutput.js +124 -0
- package/dist/process/JavaScriptWorkerMemoryLimit.js +25 -0
- package/dist/process/OwnedCommand.js +131 -0
- package/dist/process/PendingOperations.js +61 -0
- package/dist/process/PrivateRuntimeRoot.js +61 -0
- package/dist/process/ProcessCommandIdentity.js +19 -0
- package/dist/process/ProcessOwnership.js +636 -0
- package/dist/process/ProcessOwnershipIdentity.js +13 -0
- package/dist/process/ProcessOwnershipObservation.js +407 -0
- package/dist/process/ProcessOwnershipProcessTree.js +35 -0
- package/dist/process/ProcessRunTokenObservations.js +48 -0
- package/dist/process/ProviderDeadline.js +91 -0
- package/dist/process/ProviderDiagnosticRedaction.js +17 -0
- package/dist/process/ProviderProcess.js +381 -0
- package/dist/process/ProviderRunLineage.js +21 -0
- package/dist/process/WindowsAuthority.js +51 -0
- package/dist/process/WindowsBatchCommand.js +46 -0
- package/dist/process/boundedUtf8Text.js +13 -0
- package/dist/process/capture/FilesystemSnapshot.js +268 -0
- package/dist/process/capture/ProcessCaptureCapability.js +65 -0
- package/dist/process/capture/ProcessCaptureEnvironment.js +9 -0
- package/dist/process/capture/ProcessCaptureError.js +74 -0
- package/dist/process/capture/ProcessCaptureJournal.js +61 -0
- package/dist/process/capture/ProcessCaptureLifecycle.js +1050 -0
- package/dist/process/capture/ProcessCaptureProgress.js +62 -0
- package/dist/process/capture/ProcessFilesystemEffects.js +81 -0
- package/dist/process/capture/ProcessHarness.js +602 -0
- package/dist/process/capture/ProcessNormalization.js +88 -0
- package/dist/process/capture/ProcessSampling.js +415 -0
- package/dist/process/capture/ProcessScenarioRuntimeValidation.js +79 -0
- package/dist/process/capture/ProcessTimer.js +39 -0
- package/dist/process/capture/TerminalRenderer.js +124 -0
- package/dist/process/snapshotEnvironment.js +14 -0
- package/dist/reference/ReferenceSourceReader.js +73 -0
- package/dist/reference/ReferenceSourceReaderEntries.js +273 -0
- package/dist/reference/ReferenceSourceReaderErrors.js +54 -0
- package/dist/reference/ReferenceSourceReaderFile.js +147 -0
- package/dist/reference/ReferenceSourceReaderPaths.js +8 -0
- package/dist/reference/ReferenceSourceReaderTypes.js +1 -0
- package/dist/reference/ReferenceSourceReaderValidate.js +81 -0
- package/dist/server/EvidenceMcpServer.js +216 -0
- package/dist/server/admittedToolOperation.js +9 -0
- package/dist/server/analysisAdmission.js +8 -0
- package/dist/server/contractToolHandler.js +21 -0
- package/dist/server/createServer.js +344 -0
- package/dist/server/lifecycleProgress.js +10 -0
- package/dist/server/mcpClientMetadata.js +42 -0
- package/dist/server/mcpProgress.js +26 -0
- package/dist/server/promptCompletion.js +141 -0
- package/dist/server/recordDerivedEvidence.js +10 -0
- package/dist/server/registerAdbTools.js +36 -0
- package/dist/server/registerAnalysisViewTool.js +10 -0
- package/dist/server/registerAndroidTools.js +31 -0
- package/dist/server/registerApktoolTools.js +14 -0
- package/dist/server/registerApplicationTools/compareExportShapes.js +29 -0
- package/dist/server/registerApplicationTools/compareSourceToBundle.js +29 -0
- package/dist/server/registerApplicationTools/compareVersions.js +34 -0
- package/dist/server/registerApplicationTools/coverage.js +13 -0
- package/dist/server/registerApplicationTools/helpers.js +37 -0
- package/dist/server/registerApplicationTools/obligationLedger.js +23 -0
- package/dist/server/registerApplicationTools/projectMobileApplicationGraph.js +50 -0
- package/dist/server/registerApplicationTools/traceFeature.js +26 -0
- package/dist/server/registerApplicationTools/traceSemantics.js +25 -0
- package/dist/server/registerApplicationTools/types.js +1 -0
- package/dist/server/registerApplicationTools.js +19 -0
- package/dist/server/registerArtifactComparisonTool.js +71 -0
- package/dist/server/registerArtifactTools.js +14 -0
- package/dist/server/registerBinaryDiagnosticsTools.js +26 -0
- package/dist/server/registerBrowserScenarioTool.js +26 -0
- package/dist/server/registerBrowserTools.js +58 -0
- package/dist/server/registerBundleComparisonTool.js +54 -0
- package/dist/server/registerCloseLifecycleTool.js +55 -0
- package/dist/server/registerElectronTools.js +70 -0
- package/dist/server/registerEnhancedTools.js +169 -0
- package/dist/server/registerEvidenceTools.js +68 -0
- package/dist/server/registerEvmTools.js +9 -0
- package/dist/server/registerFirmwareTools.js +11 -0
- package/dist/server/registerFunctionComparisonTool.js +86 -0
- package/dist/server/registerGoTools.js +9 -0
- package/dist/server/registerInvestigationTools/helpers.js +46 -0
- package/dist/server/registerInvestigationTools/types.js +1 -0
- package/dist/server/registerInvestigationTools.js +168 -0
- package/dist/server/registerJavaScriptRecoveryTool.js +9 -0
- package/dist/server/registerJavaScriptRuntimeObservationTools.js +27 -0
- package/dist/server/registerJebTools.js +16 -0
- package/dist/server/registerManagedTools.js +40 -0
- package/dist/server/registerManagedWorkflowTools/compareManagedMembers.js +53 -0
- package/dist/server/registerManagedWorkflowTools/contract.js +7 -0
- package/dist/server/registerManagedWorkflowTools/evidence.js +27 -0
- package/dist/server/registerManagedWorkflowTools/importManagedReconstruction.js +27 -0
- package/dist/server/registerManagedWorkflowTools/projectManagedApplicationGraph.js +41 -0
- package/dist/server/registerManagedWorkflowTools/types.js +1 -0
- package/dist/server/registerManagedWorkflowTools/verifyManagedNativeBoundaries.js +62 -0
- package/dist/server/registerManagedWorkflowTools.js +11 -0
- package/dist/server/registerOfficialTools.js +74 -0
- package/dist/server/registerPeResourcesTool.js +9 -0
- package/dist/server/registerProcessComparisonTool.js +156 -0
- package/dist/server/registerPrompts.js +73 -0
- package/dist/server/registerRecordedCrashTools.js +9 -0
- package/dist/server/registerSessionRecordTools.js +90 -0
- package/dist/server/registerSessionStatusTool.js +61 -0
- package/dist/server/registerSessionTools.js +217 -0
- package/dist/server/registerWasmTools.js +9 -0
- package/dist/server/registerWebModuleTool.js +9 -0
- package/dist/server/registerWebNetworkCaptureTool.js +20 -0
- package/dist/server/registerWebRuntimeTools.js +27 -0
- package/dist/server/registerWebScriptTool.js +18 -0
- package/dist/server/registerWebSourceLocationTool.js +9 -0
- package/dist/server/runDerivedOperation.js +55 -0
- package/dist/server/sessionAvailabilityPolicy.js +29 -0
- package/dist/server/sessionEvidence.js +11 -0
- package/dist/server/toolLogging.js +11 -0
- package/dist/server/toolRegistrationOptions.js +9 -0
- package/dist/server/toolResult.js +119 -0
- package/dist/server/toolResultEncoding.js +34 -0
- package/dist/serverIdentity.js +69 -0
- package/dist/wasm/WabtArtifactProvider.js +313 -0
- package/dist/wasm/WabtFailures.js +62 -0
- package/dist/wasm/WabtOutput.js +60 -0
- package/dist/wasm/WabtRelease.js +12 -0
- package/dist/wasm/WabtWat.js +184 -0
- package/dist/wasm/WasmGlueAdapter.js +51 -0
- package/dist/windows/WindowsNativeLoader.js +124 -0
- package/dist/windows/WindowsOwnedProcess.js +265 -0
- package/dist/windows/WindowsPrivateRuntime.js +143 -0
- package/hooks/hooks.json +17 -0
- package/install.sh +172 -0
- 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/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 +54 -0
- package/licenses/cfworker-MIT.txt +21 -0
- package/licenses/digfox-MIT.txt +21 -0
- package/licenses/dotnet-runtime-MIT.txt +23 -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 +2812 -0
- package/licenses/npm-runtime-notices.txt +6632 -0
- package/licenses/rea-jev-MIT.txt +21 -0
- package/licenses/rea-lab-MIT.txt +21 -0
- package/licenses/upstream-sources.json +62 -0
- package/licenses/xterm-MIT.txt +21 -0
- package/native/windows/README.md +156 -0
- package/native/windows/build/manifest.json +9 -0
- package/native/windows/build/rea-windows-x64.node +0 -0
- package/package.json +371 -4
- package/port/cli.mjs +210 -0
- package/port/hooks/guard.mjs +140 -0
- package/port/knowledge/engines.json +67 -0
- package/port/knowledge/footprints.json +189 -0
- package/port/knowledge/maps/godot-godot-csharp.json +38 -0
- package/port/knowledge/maps/godot-threejs.json +42 -0
- package/port/knowledge/maps/godot-unity.json +62 -0
- package/port/knowledge/maps/godot-unreal.json +48 -0
- package/port/knowledge/maps/unity-godot.json +52 -0
- package/port/knowledge/maps/unity-unreal.json +33 -0
- package/port/knowledge/systems.json +1554 -0
- package/port/mcp.mjs +62 -0
- package/port/plugin/mcp-launch.mjs +19 -0
- package/port/server.mjs +129 -0
- package/port/src/agent.mjs +257 -0
- package/port/src/archive.mjs +324 -0
- package/port/src/binary.mjs +606 -0
- package/port/src/blueprint.mjs +225 -0
- package/port/src/compare.mjs +165 -0
- package/port/src/connect.mjs +58 -0
- package/port/src/convert.mjs +134 -0
- package/port/src/formats.mjs +229 -0
- package/port/src/graph.mjs +275 -0
- package/port/src/knowledge.mjs +90 -0
- package/port/src/lookup.mjs +615 -0
- package/port/src/main-module.mjs +10 -0
- package/port/src/plan.mjs +606 -0
- package/port/src/porters.mjs +360 -0
- package/port/src/proofcase.mjs +343 -0
- package/port/src/relay.mjs +493 -0
- package/port/src/scan.mjs +189 -0
- package/port/src/scene.mjs +338 -0
- package/port/src/stashpad.mjs +114 -0
- package/port/src/symbols.mjs +201 -0
- package/port/src/tools.mjs +198 -0
- package/port/src/util.mjs +162 -0
- package/port/src/workspace.mjs +39 -0
- package/port/templates/unity/ReversePortSceneBuilder.cs +258 -0
- package/scripts/electron-active-hook-boundaries.cjs +392 -0
- package/scripts/electron-active-hook.cjs +673 -0
- package/scripts/hopper-demo-x11.py +787 -0
- package/scripts/prepack.mjs +60 -0
- package/scripts/prepare.mjs +28 -0
- package/scripts/rea.mjs +110 -0
- package/scripts/verify-windows-native-artifact.mjs +39 -0
- package/skills/build-inspector/SKILL.md +44 -0
- package/skills/godot-port/SKILL.md +42 -0
- package/skills/port-project/SKILL.md +59 -0
- package/skills/port-verify/SKILL.md +35 -0
- package/skills/proof-case/SKILL.md +52 -0
- package/skills/rebuild/SKILL.md +66 -0
- package/skills/reverse-engineer/SKILL.md +67 -0
- package/skills/reverse-engineer-anything/SKILL.md +204 -0
- package/skills/reverse-engineer-anything/references/android-applications.md +34 -0
- package/skills/reverse-engineer-anything/references/connection-and-recovery.md +130 -0
- package/skills/reverse-engineer-anything/references/evidence-workflows.md +54 -0
- package/skills/reverse-engineer-anything/references/godot-source.md +37 -0
- package/skills/reverse-engineer-anything/references/javascript-applications.md +175 -0
- package/skills/reverse-engineer-anything/references/native-and-artifacts.md +252 -0
- package/skills/reverse-engineer-anything/references/porting-and-rebuilds.md +92 -0
- package/skills/reverse-engineer-anything/references/runtime-observation.md +28 -0
- package/skills/reverse-engineer-anything/references/unity-source.md +32 -0
- package/skills/troubleshoot/SKILL.md +27 -0
- package/skills/unity-to-godot/SKILL.md +37 -0
- package/third_party/README.md +60 -0
- package/third_party/evmole/LICENSE +21 -0
- package/third_party/evmole/README.md +22 -0
- package/third_party/pwndbg/LICENSE.md +21 -0
- package/third_party/pwndbg/README.md +23 -0
- package/third_party/pwntools/README.md +40 -0
- package/third_party/wabt/README.md +24 -0
package/dist/cli-runtime/application__javascript__JavaScriptApplicationWorkflowService-Cb0jmh8J.js
ADDED
|
@@ -0,0 +1,2284 @@
|
|
|
1
|
+
import { __esmMin } from "./rolldown-runtime-DXoylpqc.js";
|
|
2
|
+
import { AnalysisProtocolError, init_analysisErrorCore } from "./providerOperationHealth-DSTcYPJe.js";
|
|
3
|
+
import { absenceClaimable, analysisInputErrorFromIssues, canonicalJson, compareUnicodeCodePoints, compositeKey, digestCanonicalValue, err, init_canonicalDigest, init_canonicalOrdering, init_comparisonSemantics, init_digests, init_inputIssueProjection, init_result, init_unicodeCodePointOrder, isDigest, ok, uniqueSorted } from "./reconstructionObligationLedgerSchemas-dvp6PEnZ.js";
|
|
4
|
+
import { createImmutableJavaScriptApplicationGraphSteps, createJavaScriptApplicationEdge, createJavaScriptApplicationGraph, createJavaScriptApplicationNode, init_javascriptApplicationGraph } from "./javascriptApplicationGraph-DUWeec4O.js";
|
|
5
|
+
import { SOURCE_TO_BUNDLE_SIGNAL_WEIGHTS, applicationFeatureTraceResultSchema, applicationTraceIdentitiesSchema, applicationVersionIdentitiesSchema, compareApplicationVersionsInputSchema, compareJavaScriptExportShapesInputSchema, featureSeedMatchMode, init_javascriptApplicationVersionComparisonSchemas, init_javascriptExportShapeComparisonSchemas, init_javascriptFeatureTraceSchemas, init_sourceToBundleComparisonSchemas, javaScriptExportShapeComparisonResultSchema, javaScriptExportShapeIdentitiesSchema, ownedApplicationVersionComparisonResultSchema, projectedExportReturnShapesSchema, sourceToBundleComparisonResultSchema, traceApplicationFeatureInputSchema } from "./javascriptExportShapeComparisonSchemas-BzSil7ft.js";
|
|
6
|
+
import { applicationGraphEvidenceInputError, init_JavaScriptApplicationEvidenceGraph, parseApplicationGraphEvidence, parseNativeApplicationEvidence } from "./JavaScriptApplicationEvidenceGraph-CODAjVru.js";
|
|
7
|
+
import { createApplicationFeatureTraceEvidence, createApplicationVersionComparisonEvidence, createJavaScriptExportShapeComparisonEvidence, createSourceToBundleComparisonEvidence, init_JavaScriptApplicationWorkflowEvidence } from "./JavaScriptApplicationWorkflowEvidence-CCtwSg8r.js";
|
|
8
|
+
import { posix } from "node:path";
|
|
9
|
+
import { createHash } from "node:crypto";
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
import canonicalize from "canonicalize";
|
|
12
|
+
|
|
13
|
+
//#region dist/domain/javascript/javascriptApplicationChangeGraph.js
|
|
14
|
+
var buildJavaScriptApplicationChangeGraph, nodeCandidates, changedFromEdge, comparisonEvidence, changeGraphCoverage, sourceCoverageLimits, combineOmittedCounts, mergeNodes, uniqueEdges;
|
|
15
|
+
function init_javascriptApplicationChangeGraph() {
|
|
16
|
+
return (init_javascriptApplicationChangeGraph = __esmMin((() => {
|
|
17
|
+
init_javascriptApplicationGraph();
|
|
18
|
+
init_canonicalOrdering();
|
|
19
|
+
init_unicodeCodePointOrder();
|
|
20
|
+
buildJavaScriptApplicationChangeGraph = (input) => {
|
|
21
|
+
const allNodes = nodeCandidates(input);
|
|
22
|
+
const preferredRoots = uniqueSorted([...input.right.root_node_ids, ...input.left.root_node_ids]).filter((nodeId) => allNodes.has(nodeId));
|
|
23
|
+
const orderedNodeIds = uniqueSorted([...preferredRoots, ...input.items.flatMap(({ left_node_id: left, right_node_id: right }) => [...right === null ? [] : [right], ...left === null ? [] : [left]])]);
|
|
24
|
+
const retained = new Set(orderedNodeIds);
|
|
25
|
+
const mergedNodes = mergeNodes(orderedNodeIds.flatMap((nodeId) => allNodes.get(nodeId) ?? []));
|
|
26
|
+
const sourceEdges = uniqueEdges([...input.left.edges, ...input.right.edges]).filter(({ source_node_id: source, target_node_id: target }) => retained.has(source) && retained.has(target));
|
|
27
|
+
const leftById = new Map(input.left.nodes.map((node) => [node.node_id, node]));
|
|
28
|
+
const rightById = new Map(input.right.nodes.map((node) => [node.node_id, node]));
|
|
29
|
+
const comparisonEdges = input.items.flatMap((item) => changedFromEdge(item, input, retained, leftById, rightById));
|
|
30
|
+
const candidateEdges = uniqueEdges([...sourceEdges, ...comparisonEdges]);
|
|
31
|
+
const rootNodeIds = preferredRoots.filter((nodeId) => retained.has(nodeId));
|
|
32
|
+
const fallbackRoot = mergedNodes[0]?.node_id;
|
|
33
|
+
const steps = createImmutableJavaScriptApplicationGraphSteps({
|
|
34
|
+
schema: "JavaScriptApplicationGraph",
|
|
35
|
+
root_node_ids: rootNodeIds.length > 0 ? rootNodeIds : fallbackRoot === undefined ? [] : [fallbackRoot],
|
|
36
|
+
nodes: mergedNodes,
|
|
37
|
+
edges: candidateEdges,
|
|
38
|
+
coverage: changeGraphCoverage(input),
|
|
39
|
+
limitations: uniqueSorted([
|
|
40
|
+
...input.left.limitations.map((value) => `Left: ${value}`),
|
|
41
|
+
...input.right.limitations.map((value) => `Right: ${value}`),
|
|
42
|
+
"changed_from edges are cross-version inferences and never promote structural or semantic matches to exact identity.",
|
|
43
|
+
"The change graph contains compared entities and their retained relationships; it is not an executable application."
|
|
44
|
+
])
|
|
45
|
+
});
|
|
46
|
+
let next = steps.next();
|
|
47
|
+
while (!next.done) next = steps.next();
|
|
48
|
+
return { graph: next.value };
|
|
49
|
+
};
|
|
50
|
+
nodeCandidates = (input) => {
|
|
51
|
+
const required = new Set([
|
|
52
|
+
...input.left.root_node_ids,
|
|
53
|
+
...input.right.root_node_ids,
|
|
54
|
+
...input.items.flatMap(({ left_node_id: left, right_node_id: right }) => [...left === null ? [] : [left], ...right === null ? [] : [right]])
|
|
55
|
+
]);
|
|
56
|
+
const output = new Map();
|
|
57
|
+
for (const node of [...input.left.nodes, ...input.right.nodes]) if (required.has(node.node_id)) output.set(node.node_id, [...output.get(node.node_id) ?? [], node]);
|
|
58
|
+
return output;
|
|
59
|
+
};
|
|
60
|
+
changedFromEdge = (item, input, retained, leftById, rightById) => {
|
|
61
|
+
const left = item.left_node_id;
|
|
62
|
+
const right = item.right_node_id;
|
|
63
|
+
if (item.match.status !== "matched" || item.status === "unchanged" || left === null || right === null || left === right || !retained.has(left) || !retained.has(right)) return [];
|
|
64
|
+
const evidence = comparisonEvidence(item, input, leftById.get(left), rightById.get(right));
|
|
65
|
+
return [createJavaScriptApplicationEdge({
|
|
66
|
+
source_node_id: right,
|
|
67
|
+
target_node_id: left,
|
|
68
|
+
relation: "changed_from",
|
|
69
|
+
properties: {
|
|
70
|
+
comparison_item_id: item.item_id,
|
|
71
|
+
status: item.status,
|
|
72
|
+
match_basis: item.match.basis,
|
|
73
|
+
match_confidence: item.match.confidence,
|
|
74
|
+
dimensions: item.dimensions
|
|
75
|
+
},
|
|
76
|
+
evidence
|
|
77
|
+
})];
|
|
78
|
+
};
|
|
79
|
+
comparisonEvidence = (item, input, left, right) => {
|
|
80
|
+
const source = right?.observations[0]?.evidence ?? left?.observations[0]?.evidence;
|
|
81
|
+
const complete = input.left.coverage.status === "complete" && input.right.coverage.status === "complete";
|
|
82
|
+
return {
|
|
83
|
+
authority: "cross-version-comparison",
|
|
84
|
+
state: "inferred",
|
|
85
|
+
confidence: item.match.confidence === "medium" ? "medium" : "high",
|
|
86
|
+
artifact: source?.artifact ?? {
|
|
87
|
+
available: false,
|
|
88
|
+
reason: "unresolved",
|
|
89
|
+
detail: "Compared node has no artifact-backed observation."
|
|
90
|
+
},
|
|
91
|
+
location: source?.location ?? {
|
|
92
|
+
available: false,
|
|
93
|
+
reason: "unresolved",
|
|
94
|
+
detail: "Compared node has no actionable source location."
|
|
95
|
+
},
|
|
96
|
+
extractor: {
|
|
97
|
+
name: "rea-application-version-comparison",
|
|
98
|
+
version: "1",
|
|
99
|
+
operation: "compare_application_versions",
|
|
100
|
+
executable_sha256: null
|
|
101
|
+
},
|
|
102
|
+
coverage: complete ? {
|
|
103
|
+
status: "complete",
|
|
104
|
+
truncated: false,
|
|
105
|
+
omitted_count: 0,
|
|
106
|
+
limits: []
|
|
107
|
+
} : {
|
|
108
|
+
status: "partial",
|
|
109
|
+
truncated: input.left.coverage.truncated || input.right.coverage.truncated,
|
|
110
|
+
omitted_count: combineOmittedCounts(input.left.coverage.omitted_count, input.right.coverage.omitted_count),
|
|
111
|
+
limits: sourceCoverageLimits(input)
|
|
112
|
+
},
|
|
113
|
+
limitations: ["Cross-version pairing is inferred from the stated match basis; changed_from does not prove runtime reachability.", ...item.limitations],
|
|
114
|
+
evidence_ids: [input.leftEvidenceId, input.rightEvidenceId]
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
changeGraphCoverage = (input) => {
|
|
118
|
+
if (input.left.coverage.status === "complete" && input.right.coverage.status === "complete") return {
|
|
119
|
+
status: "complete",
|
|
120
|
+
truncated: false,
|
|
121
|
+
omitted_count: 0,
|
|
122
|
+
limits: []
|
|
123
|
+
};
|
|
124
|
+
return {
|
|
125
|
+
status: "partial",
|
|
126
|
+
truncated: input.left.coverage.truncated || input.right.coverage.truncated,
|
|
127
|
+
omitted_count: combineOmittedCounts(input.left.coverage.omitted_count, input.right.coverage.omitted_count),
|
|
128
|
+
limits: sourceCoverageLimits(input)
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
sourceCoverageLimits = (input) => [...new Map([...input.left.coverage.limits, ...input.right.coverage.limits].map((limit) => [`${limit.name}\0${limit.value}\0${limit.unit}`, limit])).values()].sort((left, right) => compareUnicodeCodePoints(left.name, right.name));
|
|
132
|
+
combineOmittedCounts = (left, right) => left === null || right === null ? null : left + right;
|
|
133
|
+
mergeNodes = (nodes) => {
|
|
134
|
+
const groups = new Map();
|
|
135
|
+
for (const node of nodes) groups.set(node.node_id, [...groups.get(node.node_id) ?? [], node]);
|
|
136
|
+
const merged = [...groups.values()].map((group) => {
|
|
137
|
+
const first = group[0];
|
|
138
|
+
if (first === undefined) throw new TypeError("Empty change-graph node group");
|
|
139
|
+
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));
|
|
140
|
+
return createJavaScriptApplicationNode({
|
|
141
|
+
kind: first.kind,
|
|
142
|
+
identity: first.identity,
|
|
143
|
+
observations: observations.map(({ observation_id: _id, identifier_strategy: _strategy, ...value }) => value)
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
return merged.sort((left, right) => compareUnicodeCodePoints(left.node_id, right.node_id));
|
|
147
|
+
};
|
|
148
|
+
uniqueEdges = (edges) => [...new Map(edges.map((edge) => [edge.edge_id, edge])).values()].sort((left, right) => compareUnicodeCodePoints(left.edge_id, right.edge_id));
|
|
149
|
+
})))();
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region dist/domain/javascript/javascriptApplicationVersionItems.js
|
|
154
|
+
var classifyJavaScriptApplicationVersions, matchedItem, unmatchedItem, leftOnlyItem, rightOnlyItem, matchedMatch, unmatchedMatch, AMBIGUOUS_MATCH_LIMITATION, INCOMPLETE_GRAPH_LIMITATION, changedDimensions, contentIdentity, locations, properties, indexRelationships, relationshipSignature, edgeSignature, itemEvidenceLinks, nativeLinks, indexNativeEvidence, pairLimitations, itemWithId, stringProperty, graphsComplete;
|
|
155
|
+
function init_javascriptApplicationVersionItems() {
|
|
156
|
+
return (init_javascriptApplicationVersionItems = __esmMin((() => {
|
|
157
|
+
init_comparisonSemantics();
|
|
158
|
+
init_canonicalDigest();
|
|
159
|
+
init_unicodeCodePointOrder();
|
|
160
|
+
classifyJavaScriptApplicationVersions = (matching, context) => {
|
|
161
|
+
const pairByLeft = new Map(matching.pairs.map(({ left, right }) => [left.node_id, `pair:${left.node_id}:${right.node_id}`]));
|
|
162
|
+
const pairByRight = new Map(matching.pairs.map(({ left, right }) => [right.node_id, `pair:${left.node_id}:${right.node_id}`]));
|
|
163
|
+
const fullContext = {
|
|
164
|
+
leftGraph: context.leftGraph,
|
|
165
|
+
rightGraph: context.rightGraph,
|
|
166
|
+
leftEvidenceId: context.leftEvidenceId,
|
|
167
|
+
rightEvidenceId: context.rightEvidenceId,
|
|
168
|
+
leftNativeEvidenceByDigest: indexNativeEvidence(context.leftNativeEvidence),
|
|
169
|
+
rightNativeEvidenceByDigest: indexNativeEvidence(context.rightNativeEvidence),
|
|
170
|
+
pairByLeft,
|
|
171
|
+
pairByRight,
|
|
172
|
+
leftRelationships: indexRelationships(context.leftGraph),
|
|
173
|
+
rightRelationships: indexRelationships(context.rightGraph)
|
|
174
|
+
};
|
|
175
|
+
const leftItems = matching.unmatchedLeft.map((node) => {
|
|
176
|
+
const candidates = matching.candidatesForLeft.get(node.node_id) ?? [];
|
|
177
|
+
return unmatchedItem({
|
|
178
|
+
left: node,
|
|
179
|
+
candidateRightNodeIds: candidates
|
|
180
|
+
}, fullContext);
|
|
181
|
+
});
|
|
182
|
+
const rightItems = matching.unmatchedRight.map((node) => {
|
|
183
|
+
const candidates = matching.candidatesForRight.get(node.node_id) ?? [];
|
|
184
|
+
return unmatchedItem({
|
|
185
|
+
right: node,
|
|
186
|
+
candidateLeftNodeIds: candidates
|
|
187
|
+
}, fullContext);
|
|
188
|
+
});
|
|
189
|
+
return { items: [
|
|
190
|
+
...matching.pairs.map((pair) => matchedItem(pair, fullContext)),
|
|
191
|
+
...leftItems,
|
|
192
|
+
...rightItems
|
|
193
|
+
].sort((left, right) => compareUnicodeCodePoints(left.item_id, right.item_id)) };
|
|
194
|
+
};
|
|
195
|
+
matchedItem = (pair, context) => {
|
|
196
|
+
const dimensions = changedDimensions(pair, context);
|
|
197
|
+
const complete = graphsComplete(context);
|
|
198
|
+
const observedChange = dimensions.some((dimension) => [
|
|
199
|
+
"content",
|
|
200
|
+
"location",
|
|
201
|
+
"properties"
|
|
202
|
+
].includes(dimension));
|
|
203
|
+
const status = observedChange || complete && dimensions.length > 0 ? "changed" : complete ? "unchanged" : "unknown";
|
|
204
|
+
const finalDimensions = status === "unknown" && !dimensions.includes("coverage") ? [...dimensions, "coverage"] : dimensions;
|
|
205
|
+
const semantic = {
|
|
206
|
+
status,
|
|
207
|
+
node_kind: pair.left.kind,
|
|
208
|
+
left_node_id: pair.left.node_id,
|
|
209
|
+
right_node_id: pair.right.node_id,
|
|
210
|
+
match: matchedMatch(pair),
|
|
211
|
+
dimensions: finalDimensions,
|
|
212
|
+
evidence_links: itemEvidenceLinks(pair.left, pair.right, context),
|
|
213
|
+
limitations: pairLimitations(pair, status)
|
|
214
|
+
};
|
|
215
|
+
return itemWithId(semantic);
|
|
216
|
+
};
|
|
217
|
+
unmatchedItem = (member, context) => member.left === undefined ? rightOnlyItem(member.right, member.candidateLeftNodeIds, context) : leftOnlyItem(member.left, member.candidateRightNodeIds, context);
|
|
218
|
+
leftOnlyItem = (node, candidateNodeIds, context) => {
|
|
219
|
+
const [firstCandidate, ...remainingCandidates] = candidateNodeIds;
|
|
220
|
+
const common = {
|
|
221
|
+
node_kind: node.kind,
|
|
222
|
+
evidence_links: itemEvidenceLinks(node, undefined, context)
|
|
223
|
+
};
|
|
224
|
+
if (firstCandidate !== undefined) return itemWithId({
|
|
225
|
+
...common,
|
|
226
|
+
status: "unknown",
|
|
227
|
+
left_node_id: node.node_id,
|
|
228
|
+
right_node_id: null,
|
|
229
|
+
match: {
|
|
230
|
+
status: "ambiguous",
|
|
231
|
+
basis: "none",
|
|
232
|
+
confidence: "unknown",
|
|
233
|
+
candidate_left_node_ids: [],
|
|
234
|
+
candidate_right_node_ids: [firstCandidate, ...remainingCandidates]
|
|
235
|
+
},
|
|
236
|
+
dimensions: ["availability"],
|
|
237
|
+
limitations: [AMBIGUOUS_MATCH_LIMITATION]
|
|
238
|
+
});
|
|
239
|
+
const absenceObserved = absenceClaimable(context.rightGraph.coverage);
|
|
240
|
+
return itemWithId({
|
|
241
|
+
...common,
|
|
242
|
+
status: absenceObserved ? "removed" : "unknown",
|
|
243
|
+
left_node_id: node.node_id,
|
|
244
|
+
right_node_id: null,
|
|
245
|
+
match: unmatchedMatch(),
|
|
246
|
+
dimensions: absenceObserved ? ["availability"] : ["availability", "coverage"],
|
|
247
|
+
limitations: absenceObserved ? [] : [INCOMPLETE_GRAPH_LIMITATION]
|
|
248
|
+
});
|
|
249
|
+
};
|
|
250
|
+
rightOnlyItem = (node, candidateNodeIds, context) => {
|
|
251
|
+
const [firstCandidate, ...remainingCandidates] = candidateNodeIds;
|
|
252
|
+
const common = {
|
|
253
|
+
node_kind: node.kind,
|
|
254
|
+
evidence_links: itemEvidenceLinks(undefined, node, context)
|
|
255
|
+
};
|
|
256
|
+
if (firstCandidate !== undefined) return itemWithId({
|
|
257
|
+
...common,
|
|
258
|
+
status: "unknown",
|
|
259
|
+
left_node_id: null,
|
|
260
|
+
right_node_id: node.node_id,
|
|
261
|
+
match: {
|
|
262
|
+
status: "ambiguous",
|
|
263
|
+
basis: "none",
|
|
264
|
+
confidence: "unknown",
|
|
265
|
+
candidate_left_node_ids: [firstCandidate, ...remainingCandidates],
|
|
266
|
+
candidate_right_node_ids: []
|
|
267
|
+
},
|
|
268
|
+
dimensions: ["availability"],
|
|
269
|
+
limitations: [AMBIGUOUS_MATCH_LIMITATION]
|
|
270
|
+
});
|
|
271
|
+
const absenceObserved = absenceClaimable(context.leftGraph.coverage);
|
|
272
|
+
return itemWithId({
|
|
273
|
+
...common,
|
|
274
|
+
status: absenceObserved ? "added" : "unknown",
|
|
275
|
+
left_node_id: null,
|
|
276
|
+
right_node_id: node.node_id,
|
|
277
|
+
match: unmatchedMatch(),
|
|
278
|
+
dimensions: absenceObserved ? ["availability"] : ["availability", "coverage"],
|
|
279
|
+
limitations: absenceObserved ? [] : [INCOMPLETE_GRAPH_LIMITATION]
|
|
280
|
+
});
|
|
281
|
+
};
|
|
282
|
+
matchedMatch = (pair) => {
|
|
283
|
+
const candidates = {
|
|
284
|
+
candidate_left_node_ids: [],
|
|
285
|
+
candidate_right_node_ids: []
|
|
286
|
+
};
|
|
287
|
+
switch (pair.basis) {
|
|
288
|
+
case "exact-node-identity":
|
|
289
|
+
case "exact-content-digest":
|
|
290
|
+
case "exact-module-source-digest": return {
|
|
291
|
+
status: "matched",
|
|
292
|
+
basis: pair.basis,
|
|
293
|
+
confidence: "exact",
|
|
294
|
+
...candidates
|
|
295
|
+
};
|
|
296
|
+
case "source-map-identity": return {
|
|
297
|
+
status: "matched",
|
|
298
|
+
basis: pair.basis,
|
|
299
|
+
confidence: "high",
|
|
300
|
+
...candidates
|
|
301
|
+
};
|
|
302
|
+
case "structural-fingerprint":
|
|
303
|
+
case "semantic-key": return {
|
|
304
|
+
status: "matched",
|
|
305
|
+
basis: pair.basis,
|
|
306
|
+
confidence: "medium",
|
|
307
|
+
...candidates
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
unmatchedMatch = () => ({
|
|
312
|
+
status: "unmatched",
|
|
313
|
+
basis: "none",
|
|
314
|
+
confidence: "unknown",
|
|
315
|
+
candidate_left_node_ids: [],
|
|
316
|
+
candidate_right_node_ids: []
|
|
317
|
+
});
|
|
318
|
+
AMBIGUOUS_MATCH_LIMITATION = "Multiple nodes share the same permitted match key; no cross-version pair was selected.";
|
|
319
|
+
INCOMPLETE_GRAPH_LIMITATION = "The opposite graph is incomplete, so an unmatched node cannot be classified as added or removed.";
|
|
320
|
+
changedDimensions = (pair, context) => {
|
|
321
|
+
const dimensions = [];
|
|
322
|
+
const leftContent = contentIdentity(pair.left);
|
|
323
|
+
const rightContent = contentIdentity(pair.right);
|
|
324
|
+
if (leftContent !== null && rightContent !== null && leftContent !== rightContent) dimensions.push("content");
|
|
325
|
+
if (canonicalJson(locations(pair.left)) !== canonicalJson(locations(pair.right))) dimensions.push("location");
|
|
326
|
+
if (canonicalJson(properties(pair.left)) !== canonicalJson(properties(pair.right))) dimensions.push("properties");
|
|
327
|
+
if (relationshipSignature(pair.left, "left", context) !== relationshipSignature(pair.right, "right", context)) dimensions.push("relationships");
|
|
328
|
+
return dimensions;
|
|
329
|
+
};
|
|
330
|
+
contentIdentity = (node) => {
|
|
331
|
+
if (node.identity.strategy === "content-digest") return `content:${node.identity.sha256}`;
|
|
332
|
+
if (node.kind === "javascript-module") return stringProperty(node, "source_sha256");
|
|
333
|
+
if (node.kind === "source-module" && node.identity.strategy === "source-map-original") return node.identity.source_sha256;
|
|
334
|
+
return null;
|
|
335
|
+
};
|
|
336
|
+
locations = (node) => node.observations.map(({ evidence }) => evidence.location.available ? evidence.location.value : evidence.location).sort((left, right) => compareUnicodeCodePoints(canonicalJson(left), canonicalJson(right)));
|
|
337
|
+
properties = (node) => node.observations.map(({ label, properties: values, source_map_reference }) => ({
|
|
338
|
+
label,
|
|
339
|
+
properties: values,
|
|
340
|
+
source_map_reference
|
|
341
|
+
})).sort((left, right) => compareUnicodeCodePoints(canonicalJson(left), canonicalJson(right)));
|
|
342
|
+
indexRelationships = (graph) => {
|
|
343
|
+
const adjacency = new Map();
|
|
344
|
+
const add = (nodeId, relationship) => {
|
|
345
|
+
const existing = adjacency.get(nodeId);
|
|
346
|
+
if (existing === undefined) adjacency.set(nodeId, [relationship]);
|
|
347
|
+
else existing.push(relationship);
|
|
348
|
+
};
|
|
349
|
+
for (const edge of graph.edges) {
|
|
350
|
+
add(edge.source_node_id, {
|
|
351
|
+
direction: "out",
|
|
352
|
+
relation: edge.relation,
|
|
353
|
+
neighborId: edge.target_node_id
|
|
354
|
+
});
|
|
355
|
+
if (edge.target_node_id !== edge.source_node_id) add(edge.target_node_id, {
|
|
356
|
+
direction: "in",
|
|
357
|
+
relation: edge.relation,
|
|
358
|
+
neighborId: edge.source_node_id
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
return {
|
|
362
|
+
nodeById: new Map(graph.nodes.map((value) => [value.node_id, value])),
|
|
363
|
+
adjacency
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
relationshipSignature = (node, side, context) => {
|
|
367
|
+
const { nodeById, adjacency } = side === "left" ? context.leftRelationships : context.rightRelationships;
|
|
368
|
+
const paired = side === "left" ? context.pairByLeft : context.pairByRight;
|
|
369
|
+
const signatures = (adjacency.get(node.node_id) ?? []).map((relationship) => edgeSignature({
|
|
370
|
+
...relationship,
|
|
371
|
+
paired,
|
|
372
|
+
nodeById
|
|
373
|
+
}));
|
|
374
|
+
return canonicalJson(signatures.sort(compareUnicodeCodePoints));
|
|
375
|
+
};
|
|
376
|
+
edgeSignature = (context) => {
|
|
377
|
+
const mapped = context.paired.get(context.neighborId);
|
|
378
|
+
const neighbor = context.nodeById.get(context.neighborId);
|
|
379
|
+
return `${context.direction}\0${context.relation}\0${mapped ?? `unmatched:${neighbor?.kind ?? "unknown"}`}`;
|
|
380
|
+
};
|
|
381
|
+
itemEvidenceLinks = (left, right, context) => [...new Set([
|
|
382
|
+
context.leftEvidenceId,
|
|
383
|
+
context.rightEvidenceId,
|
|
384
|
+
...nativeLinks(left, context.leftNativeEvidenceByDigest),
|
|
385
|
+
...nativeLinks(right, context.rightNativeEvidenceByDigest)
|
|
386
|
+
])].sort(compareUnicodeCodePoints);
|
|
387
|
+
nativeLinks = (node, evidenceByDigest) => {
|
|
388
|
+
const identity = node === undefined ? null : contentIdentity(node);
|
|
389
|
+
if (identity === null) return [];
|
|
390
|
+
const digest = identity.replace(/^content:/u, "");
|
|
391
|
+
return evidenceByDigest.get(digest) ?? [];
|
|
392
|
+
};
|
|
393
|
+
indexNativeEvidence = (evidence) => {
|
|
394
|
+
const evidenceByDigest = new Map();
|
|
395
|
+
for (const { evidence_id: id, subject } of evidence) {
|
|
396
|
+
const digest = subject?.digest.sha256;
|
|
397
|
+
if (digest === undefined) continue;
|
|
398
|
+
const ids = evidenceByDigest.get(digest);
|
|
399
|
+
if (ids === undefined) evidenceByDigest.set(digest, [id]);
|
|
400
|
+
else ids.push(id);
|
|
401
|
+
}
|
|
402
|
+
return evidenceByDigest;
|
|
403
|
+
};
|
|
404
|
+
pairLimitations = (pair, status) => [
|
|
405
|
+
...pair.basis === "structural-fingerprint" ? ["Structural fingerprint equality is rename-resistant inference; it is not byte identity or proof of semantic equivalence."] : [],
|
|
406
|
+
...pair.basis === "source-map-identity" ? ["Source-map original names identify a candidate source lineage; changed or unavailable source content remains explicit."] : [],
|
|
407
|
+
...pair.basis === "semantic-key" ? ["Semantic-key pairing is a deterministic inference and is never promoted to exact identity."] : [],
|
|
408
|
+
...status === "unknown" ? ["Incomplete graph coverage prevents a complete node-level conclusion."] : []
|
|
409
|
+
];
|
|
410
|
+
itemWithId = (semantic) => ({
|
|
411
|
+
...semantic,
|
|
412
|
+
item_id: `javc_item_${digestCanonicalValue(semantic, "Application version item")}`
|
|
413
|
+
});
|
|
414
|
+
stringProperty = (node, key) => {
|
|
415
|
+
const values = [...new Set(node.observations.map(({ properties: values }) => values[key]).filter((value) => typeof value === "string"))];
|
|
416
|
+
return values.length === 1 ? values[0] ?? null : null;
|
|
417
|
+
};
|
|
418
|
+
graphsComplete = (context) => absenceClaimable(context.leftGraph.coverage) && absenceClaimable(context.rightGraph.coverage);
|
|
419
|
+
})))();
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
//#endregion
|
|
423
|
+
//#region dist/domain/javascript/javascriptApplicationVersionKeys.js
|
|
424
|
+
var matchTiers, matchJavaScriptApplicationVersions, applyTier, nodesByKey, recordCandidates, filteredCandidates, nodeIdentityKey, contentDigestKey, moduleSourceDigestKey, sourceMapKey, structuralFingerprintKey, semanticKey, semanticValue, canonicalPath, firstProperties, firstLabel, uniqueStringProperty, joined, nonEmptyString, exactString, stringList, sortedNodes;
|
|
425
|
+
function init_javascriptApplicationVersionKeys() {
|
|
426
|
+
return (init_javascriptApplicationVersionKeys = __esmMin((() => {
|
|
427
|
+
init_comparisonSemantics();
|
|
428
|
+
init_unicodeCodePointOrder();
|
|
429
|
+
matchTiers = () => [
|
|
430
|
+
{
|
|
431
|
+
match: {
|
|
432
|
+
basis: "exact-content-digest",
|
|
433
|
+
confidence: "exact"
|
|
434
|
+
},
|
|
435
|
+
key: contentDigestKey
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
match: {
|
|
439
|
+
basis: "exact-module-source-digest",
|
|
440
|
+
confidence: "exact"
|
|
441
|
+
},
|
|
442
|
+
key: moduleSourceDigestKey
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
match: {
|
|
446
|
+
basis: "exact-node-identity",
|
|
447
|
+
confidence: "exact"
|
|
448
|
+
},
|
|
449
|
+
key: nodeIdentityKey
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
match: {
|
|
453
|
+
basis: "source-map-identity",
|
|
454
|
+
confidence: "high"
|
|
455
|
+
},
|
|
456
|
+
key: sourceMapKey
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
match: {
|
|
460
|
+
basis: "structural-fingerprint",
|
|
461
|
+
confidence: "medium"
|
|
462
|
+
},
|
|
463
|
+
key: structuralFingerprintKey
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
match: {
|
|
467
|
+
basis: "semantic-key",
|
|
468
|
+
confidence: "medium"
|
|
469
|
+
},
|
|
470
|
+
key: semanticKey
|
|
471
|
+
}
|
|
472
|
+
];
|
|
473
|
+
matchJavaScriptApplicationVersions = (leftNodes, rightNodes) => {
|
|
474
|
+
const left = new Map(leftNodes.map((node) => [node.node_id, node]));
|
|
475
|
+
const right = new Map(rightNodes.map((node) => [node.node_id, node]));
|
|
476
|
+
const leftCandidates = new Map();
|
|
477
|
+
const rightCandidates = new Map();
|
|
478
|
+
const pairs = [];
|
|
479
|
+
for (const tier of matchTiers()) applyTier({
|
|
480
|
+
left,
|
|
481
|
+
right,
|
|
482
|
+
pairs,
|
|
483
|
+
leftCandidates,
|
|
484
|
+
rightCandidates,
|
|
485
|
+
tier
|
|
486
|
+
});
|
|
487
|
+
const remainingLeft = sortedNodes(left.values());
|
|
488
|
+
const remainingRight = sortedNodes(right.values());
|
|
489
|
+
const leftIds = new Set(remainingLeft.map(({ node_id: id }) => id));
|
|
490
|
+
const rightIds = new Set(remainingRight.map(({ node_id: id }) => id));
|
|
491
|
+
return {
|
|
492
|
+
pairs: pairs.sort((a, b) => compareUnicodeCodePoints(`${a.left.node_id}\0${a.right.node_id}`, `${b.left.node_id}\0${b.right.node_id}`)),
|
|
493
|
+
unmatchedLeft: remainingLeft,
|
|
494
|
+
unmatchedRight: remainingRight,
|
|
495
|
+
candidatesForLeft: filteredCandidates(leftCandidates, rightIds),
|
|
496
|
+
candidatesForRight: filteredCandidates(rightCandidates, leftIds)
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
applyTier = (context) => {
|
|
500
|
+
const leftByKey = nodesByKey(context.left.values(), context.tier.key);
|
|
501
|
+
const rightByKey = nodesByKey(context.right.values(), context.tier.key);
|
|
502
|
+
for (const key of [...leftByKey.keys()].sort(compareUnicodeCodePoints)) {
|
|
503
|
+
const leftGroup = leftByKey.get(key) ?? [];
|
|
504
|
+
const rightGroup = rightByKey.get(key) ?? [];
|
|
505
|
+
if (rightGroup.length === 0) continue;
|
|
506
|
+
recordCandidates(leftGroup, rightGroup, context.leftCandidates, context.rightCandidates);
|
|
507
|
+
if (leftGroup.length !== 1 || rightGroup.length !== 1) continue;
|
|
508
|
+
const leftNode = leftGroup[0];
|
|
509
|
+
const rightNode = rightGroup[0];
|
|
510
|
+
if (leftNode === undefined || rightNode === undefined) continue;
|
|
511
|
+
context.pairs.push({
|
|
512
|
+
left: leftNode,
|
|
513
|
+
right: rightNode,
|
|
514
|
+
...context.tier.match
|
|
515
|
+
});
|
|
516
|
+
context.left.delete(leftNode.node_id);
|
|
517
|
+
context.right.delete(rightNode.node_id);
|
|
518
|
+
}
|
|
519
|
+
};
|
|
520
|
+
nodesByKey = (nodes, keyFor) => {
|
|
521
|
+
const output = new Map();
|
|
522
|
+
for (const node of nodes) {
|
|
523
|
+
const key = keyFor(node);
|
|
524
|
+
if (key === null) continue;
|
|
525
|
+
output.set(key, [...output.get(key) ?? [], node]);
|
|
526
|
+
}
|
|
527
|
+
return output;
|
|
528
|
+
};
|
|
529
|
+
recordCandidates = (left, right, leftCandidates, rightCandidates) => {
|
|
530
|
+
for (const leftNode of left) {
|
|
531
|
+
const candidates = leftCandidates.get(leftNode.node_id) ?? new Set();
|
|
532
|
+
for (const rightNode of right) candidates.add(rightNode.node_id);
|
|
533
|
+
leftCandidates.set(leftNode.node_id, candidates);
|
|
534
|
+
}
|
|
535
|
+
for (const rightNode of right) {
|
|
536
|
+
const candidates = rightCandidates.get(rightNode.node_id) ?? new Set();
|
|
537
|
+
for (const leftNode of left) candidates.add(leftNode.node_id);
|
|
538
|
+
rightCandidates.set(rightNode.node_id, candidates);
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
filteredCandidates = (candidates, retained) => new Map([...candidates.entries()].flatMap(([nodeId, values]) => {
|
|
542
|
+
const filtered = [...values].filter((value) => retained.has(value)).sort(compareUnicodeCodePoints);
|
|
543
|
+
return filtered.length === 0 ? [] : [[nodeId, filtered]];
|
|
544
|
+
}));
|
|
545
|
+
nodeIdentityKey = (node) => `node\0${node.kind}\0${node.node_id}`;
|
|
546
|
+
contentDigestKey = (node) => node.identity.strategy === "content-digest" ? `content\0${node.kind}\0${node.identity.sha256}` : null;
|
|
547
|
+
moduleSourceDigestKey = (node) => {
|
|
548
|
+
if (node.kind !== "javascript-module") return null;
|
|
549
|
+
const value = uniqueStringProperty(node, "source_sha256");
|
|
550
|
+
return value === null ? null : `module-source\0${node.kind}\0${value}`;
|
|
551
|
+
};
|
|
552
|
+
sourceMapKey = (node) => node.kind === "source-module" && node.identity.strategy === "source-map-original" ? `source-map\0${canonicalJson([node.identity.source_root, node.identity.original_source])}` : null;
|
|
553
|
+
structuralFingerprintKey = (node) => {
|
|
554
|
+
if (node.kind !== "javascript-module") return null;
|
|
555
|
+
const digest = uniqueStringProperty(node, "structural_fingerprint_sha256");
|
|
556
|
+
const algorithm = uniqueStringProperty(node, "structural_fingerprint_algorithm");
|
|
557
|
+
return digest === null || algorithm === null ? null : `structural\0${node.kind}\0${algorithm}\0${digest}`;
|
|
558
|
+
};
|
|
559
|
+
semanticKey = (node) => {
|
|
560
|
+
if ([
|
|
561
|
+
"javascript-module",
|
|
562
|
+
"javascript-chunk",
|
|
563
|
+
"runtime-script-instance",
|
|
564
|
+
"unknown"
|
|
565
|
+
].includes(node.kind)) return null;
|
|
566
|
+
const properties = firstProperties(node);
|
|
567
|
+
const value = semanticValue(node, properties);
|
|
568
|
+
return value === null ? null : `semantic\0${node.kind}\0${value}`;
|
|
569
|
+
};
|
|
570
|
+
semanticValue = (node, properties) => {
|
|
571
|
+
if (node.kind === "endpoint") {
|
|
572
|
+
const kind = nonEmptyString(properties.endpoint_kind);
|
|
573
|
+
const value = exactString(properties.value);
|
|
574
|
+
return kind === null || value === null ? null : `${kind}\0${value}`;
|
|
575
|
+
}
|
|
576
|
+
if (node.kind === "storage") return joined(properties.storage_kind, properties.name ?? properties.mechanism);
|
|
577
|
+
if (node.kind === "ipc-channel") return properties.resolution === "dynamic" ? null : exactString(properties.channel) ?? firstLabel(node);
|
|
578
|
+
if (node.kind === "context-bridge-api") return firstLabel(node) ?? exactString(properties.api_key) ?? nonEmptyString(properties.api_name);
|
|
579
|
+
if (node.kind === "native-export") return joined(properties.specifier, compositeKey([
|
|
580
|
+
stringList(properties.requested_members),
|
|
581
|
+
typeof properties.namespace_access === "boolean" ? properties.namespace_access : null,
|
|
582
|
+
typeof properties.dynamic_member_access === "boolean" ? properties.dynamic_member_access : null
|
|
583
|
+
])) ?? firstLabel(node);
|
|
584
|
+
if ([
|
|
585
|
+
"electron-main",
|
|
586
|
+
"electron-preload",
|
|
587
|
+
"electron-renderer",
|
|
588
|
+
"electron-utility"
|
|
589
|
+
].includes(node.kind)) return joined(properties.declared_path, properties.resolved_path);
|
|
590
|
+
if (node.kind === "package") return nonEmptyString(properties.name);
|
|
591
|
+
return canonicalPath(node) ?? nonEmptyString(properties.path);
|
|
592
|
+
};
|
|
593
|
+
canonicalPath = (node) => node.identity.strategy === "canonical-path" ? node.identity.path : null;
|
|
594
|
+
firstProperties = (node) => node.observations[0]?.properties ?? {};
|
|
595
|
+
firstLabel = (node) => node.observations.find(({ label }) => label !== null)?.label ?? null;
|
|
596
|
+
uniqueStringProperty = (node, name) => {
|
|
597
|
+
const values = [...new Set(node.observations.map(({ properties }) => properties[name]).filter((value) => typeof value === "string"))];
|
|
598
|
+
return values.length === 1 ? values[0] ?? null : null;
|
|
599
|
+
};
|
|
600
|
+
joined = (...values) => {
|
|
601
|
+
const strings = values.map(nonEmptyString);
|
|
602
|
+
return strings.some((value) => value === null) ? null : compositeKey(strings);
|
|
603
|
+
};
|
|
604
|
+
nonEmptyString = (value) => typeof value === "string" && value !== "" ? value : null;
|
|
605
|
+
exactString = (value) => typeof value === "string" ? value : null;
|
|
606
|
+
stringList = (value) => Array.isArray(value) ? value.filter((item) => typeof item === "string").sort(compareUnicodeCodePoints) : [];
|
|
607
|
+
sortedNodes = (nodes) => [...nodes].sort((left, right) => compareUnicodeCodePoints(left.node_id, right.node_id));
|
|
608
|
+
})))();
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
//#endregion
|
|
612
|
+
//#region dist/domain/javascript/javascriptApplicationVersionComparison.js
|
|
613
|
+
var compareJavaScriptApplicationVersions, summary, countStatus$2, matchingSummary, countBasis, comparisonCoverage$2, comparisonLimitations$2;
|
|
614
|
+
function init_javascriptApplicationVersionComparison() {
|
|
615
|
+
return (init_javascriptApplicationVersionComparison = __esmMin((() => {
|
|
616
|
+
init_canonicalDigest();
|
|
617
|
+
init_canonicalOrdering();
|
|
618
|
+
init_javascriptApplicationChangeGraph();
|
|
619
|
+
init_javascriptApplicationVersionComparisonSchemas();
|
|
620
|
+
init_javascriptApplicationVersionItems();
|
|
621
|
+
init_javascriptApplicationVersionKeys();
|
|
622
|
+
compareJavaScriptApplicationVersions = (input) => {
|
|
623
|
+
const matching = matchJavaScriptApplicationVersions(input.left.graph.nodes, input.right.graph.nodes);
|
|
624
|
+
const projection = classifyJavaScriptApplicationVersions(matching, {
|
|
625
|
+
leftGraph: input.left.graph,
|
|
626
|
+
rightGraph: input.right.graph,
|
|
627
|
+
leftEvidenceId: input.left.evidenceId,
|
|
628
|
+
rightEvidenceId: input.right.evidenceId,
|
|
629
|
+
leftNativeEvidence: input.leftNativeEvidence,
|
|
630
|
+
rightNativeEvidence: input.rightNativeEvidence
|
|
631
|
+
});
|
|
632
|
+
const changeGraph = buildJavaScriptApplicationChangeGraph({
|
|
633
|
+
left: input.left.graph,
|
|
634
|
+
right: input.right.graph,
|
|
635
|
+
leftEvidenceId: input.left.evidenceId,
|
|
636
|
+
rightEvidenceId: input.right.evidenceId,
|
|
637
|
+
items: projection.items
|
|
638
|
+
});
|
|
639
|
+
const evidenceLinks = uniqueSorted(projection.items.flatMap(({ evidence_links: links }) => links));
|
|
640
|
+
const omissions = {
|
|
641
|
+
left_graph_omitted_count: input.left.graph.coverage.omitted_count,
|
|
642
|
+
right_graph_omitted_count: input.right.graph.coverage.omitted_count
|
|
643
|
+
};
|
|
644
|
+
const coverage = comparisonCoverage$2(input, omissions);
|
|
645
|
+
const semantic = {
|
|
646
|
+
left: {
|
|
647
|
+
evidence_id: input.left.evidenceId,
|
|
648
|
+
graph_id: input.left.graph.graph_id,
|
|
649
|
+
root_artifact_sha256: input.left.rootArtifactSha256
|
|
650
|
+
},
|
|
651
|
+
right: {
|
|
652
|
+
evidence_id: input.right.evidenceId,
|
|
653
|
+
graph_id: input.right.graph.graph_id,
|
|
654
|
+
root_artifact_sha256: input.right.rootArtifactSha256
|
|
655
|
+
},
|
|
656
|
+
summary: summary(projection.items),
|
|
657
|
+
matching: matchingSummary(projection.items),
|
|
658
|
+
items: projection.items,
|
|
659
|
+
graph: changeGraph.graph,
|
|
660
|
+
coverage,
|
|
661
|
+
evidence_links: evidenceLinks,
|
|
662
|
+
limitations: comparisonLimitations$2(input)
|
|
663
|
+
};
|
|
664
|
+
return ownedApplicationVersionComparisonResultSchema.parse({
|
|
665
|
+
...semantic,
|
|
666
|
+
comparison_id: `javc_${digestCanonicalValue(semantic, "Application version comparison")}`
|
|
667
|
+
});
|
|
668
|
+
};
|
|
669
|
+
summary = (items) => ({
|
|
670
|
+
unchanged: countStatus$2(items, "unchanged"),
|
|
671
|
+
added: countStatus$2(items, "added"),
|
|
672
|
+
removed: countStatus$2(items, "removed"),
|
|
673
|
+
changed: countStatus$2(items, "changed"),
|
|
674
|
+
unknown: countStatus$2(items, "unknown")
|
|
675
|
+
});
|
|
676
|
+
countStatus$2 = (items, status) => items.filter((item) => item.status === status).length;
|
|
677
|
+
matchingSummary = (items) => ({
|
|
678
|
+
exact_node_identity: countBasis(items, "exact-node-identity"),
|
|
679
|
+
exact_content_digest: countBasis(items, "exact-content-digest"),
|
|
680
|
+
exact_module_source_digest: countBasis(items, "exact-module-source-digest"),
|
|
681
|
+
source_map_identity: countBasis(items, "source-map-identity"),
|
|
682
|
+
structural_fingerprint: countBasis(items, "structural-fingerprint"),
|
|
683
|
+
semantic_key: countBasis(items, "semantic-key"),
|
|
684
|
+
ambiguous: items.filter(({ match }) => match.status === "ambiguous").length,
|
|
685
|
+
unmatched: items.filter(({ match }) => match.status === "unmatched").length
|
|
686
|
+
});
|
|
687
|
+
countBasis = (items, basis) => items.filter(({ match }) => match.basis === basis).length;
|
|
688
|
+
comparisonCoverage$2 = (input, omissions) => {
|
|
689
|
+
const context = {
|
|
690
|
+
left_graph_status: input.left.graph.coverage.status,
|
|
691
|
+
right_graph_status: input.right.graph.coverage.status
|
|
692
|
+
};
|
|
693
|
+
const sourceGraphsComplete = input.left.graph.coverage.status === "complete" && input.right.graph.coverage.status === "complete";
|
|
694
|
+
const sourceGraphsTruncated = input.left.graph.coverage.truncated || input.right.graph.coverage.truncated;
|
|
695
|
+
return {
|
|
696
|
+
...context,
|
|
697
|
+
...omissions,
|
|
698
|
+
status: sourceGraphsComplete ? "complete-within-inputs" : sourceGraphsTruncated ? "truncated" : "partial"
|
|
699
|
+
};
|
|
700
|
+
};
|
|
701
|
+
comparisonLimitations$2 = (input) => uniqueSorted([
|
|
702
|
+
"Application comparison never uses bundler module ordinals as persistent identity and performs no fuzzy pairing.",
|
|
703
|
+
"Exact digest equality proves byte identity only; source-map, structural-fingerprint, and semantic-key matches retain inferred confidence.",
|
|
704
|
+
"Minified names and chunk locations are not assumed stable across versions.",
|
|
705
|
+
"The comparison reads retained graphs and Evidence only; it does not execute either application.",
|
|
706
|
+
"Native Evidence is linked only by exact subject digest; provider snapshot reuse remains target/provider/profile exact.",
|
|
707
|
+
...input.left.graph.coverage.status === "complete" && input.right.graph.coverage.status === "complete" ? [] : ["At least one source graph is incomplete; unmatched entities on the opposite side remain unknown rather than added or removed."]
|
|
708
|
+
]);
|
|
709
|
+
})))();
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
//#endregion
|
|
713
|
+
//#region dist/domain/javascript/javascriptExportShapeComparisonIdentity.js
|
|
714
|
+
var canonicalExportShapeValue, digestExportShapeValue;
|
|
715
|
+
function init_javascriptExportShapeComparisonIdentity() {
|
|
716
|
+
return (init_javascriptExportShapeComparisonIdentity = __esmMin((() => {
|
|
717
|
+
canonicalExportShapeValue = (value) => {
|
|
718
|
+
const encoded = canonicalize(value);
|
|
719
|
+
if (encoded === undefined) throw new TypeError("JavaScript export shape comparison could not canonicalize data");
|
|
720
|
+
return encoded;
|
|
721
|
+
};
|
|
722
|
+
digestExportShapeValue = (value) => createHash("sha256").update(canonicalExportShapeValue(value)).digest("hex");
|
|
723
|
+
})))();
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
//#endregion
|
|
727
|
+
//#region dist/domain/javascript/javascriptExportShapeSelection.js
|
|
728
|
+
var selectJavaScriptExport, retainJavaScriptExportShapes, selectorBase, unresolvedSelection, exportCandidates, candidateKey, returnShapeFor, unavailableReturnShape;
|
|
729
|
+
function init_javascriptExportShapeSelection() {
|
|
730
|
+
return (init_javascriptExportShapeSelection = __esmMin((() => {
|
|
731
|
+
init_javascriptExportShapeComparisonSchemas();
|
|
732
|
+
init_unicodeCodePointOrder();
|
|
733
|
+
selectJavaScriptExport = (side) => {
|
|
734
|
+
const candidates = exportCandidates(side.graph);
|
|
735
|
+
const exact = candidates.filter(({ modulePath, exportName }) => modulePath === side.modulePath && exportName === side.exportName);
|
|
736
|
+
const matchingOneSelector = candidates.filter(({ modulePath, exportName }) => modulePath === side.modulePath || exportName === side.exportName);
|
|
737
|
+
const diagnosticPool = exact.length > 0 ? exact : matchingOneSelector.length > 0 ? matchingOneSelector : candidates;
|
|
738
|
+
const base = selectorBase(side, diagnosticPool);
|
|
739
|
+
if (exact.length === 0) return unresolvedSelection(base, {
|
|
740
|
+
status: "missing",
|
|
741
|
+
selected_node_id: null
|
|
742
|
+
}, [`No exact export binding matched ${side.modulePath}:${side.exportName}.`]);
|
|
743
|
+
if (exact.length > 1) return unresolvedSelection(base, {
|
|
744
|
+
status: "ambiguous",
|
|
745
|
+
selected_node_id: null
|
|
746
|
+
}, [`Multiple exact export bindings matched ${side.modulePath}:${side.exportName}; none was selected.`]);
|
|
747
|
+
const selected = exact[0];
|
|
748
|
+
if (selected === undefined || !selected.trusted) return unresolvedSelection(base, {
|
|
749
|
+
status: "unavailable",
|
|
750
|
+
selected_node_id: selected?.node.node_id ?? null
|
|
751
|
+
}, ["The exact export binding lacks the expected static-analysis authority."]);
|
|
752
|
+
const returnShape = returnShapeFor(selected.node, side);
|
|
753
|
+
if (returnShape.projection === null) return unresolvedSelection(base, {
|
|
754
|
+
status: "unavailable",
|
|
755
|
+
selected_node_id: selected.node.node_id
|
|
756
|
+
}, [returnShape.reason]);
|
|
757
|
+
return {
|
|
758
|
+
selection: {
|
|
759
|
+
...base,
|
|
760
|
+
status: "selected",
|
|
761
|
+
selected_node_id: selected.node.node_id
|
|
762
|
+
},
|
|
763
|
+
projection: returnShape.projection,
|
|
764
|
+
observationComplete: returnShape.observationComplete,
|
|
765
|
+
limitations: []
|
|
766
|
+
};
|
|
767
|
+
};
|
|
768
|
+
retainJavaScriptExportShapes = (selection) => ({
|
|
769
|
+
shapes: selection.projection?.static_return_shapes ?? [],
|
|
770
|
+
omitted: 0
|
|
771
|
+
});
|
|
772
|
+
selectorBase = (side, candidates) => ({
|
|
773
|
+
evidence_id: side.evidenceId,
|
|
774
|
+
graph_id: side.graph.graph_id,
|
|
775
|
+
requested_module_path: side.modulePath,
|
|
776
|
+
requested_export_name: side.exportName,
|
|
777
|
+
candidates: candidates.map((candidate) => ({
|
|
778
|
+
node_id: candidate.node.node_id,
|
|
779
|
+
module_path: candidate.modulePath,
|
|
780
|
+
export_name: candidate.exportName,
|
|
781
|
+
matches_requested_module: candidate.modulePath === side.modulePath,
|
|
782
|
+
matches_requested_export: candidate.exportName === side.exportName
|
|
783
|
+
})),
|
|
784
|
+
omitted_candidates: 0
|
|
785
|
+
});
|
|
786
|
+
unresolvedSelection = (base, resolution, limitations) => ({
|
|
787
|
+
selection: {
|
|
788
|
+
...base,
|
|
789
|
+
...resolution
|
|
790
|
+
},
|
|
791
|
+
projection: null,
|
|
792
|
+
observationComplete: false,
|
|
793
|
+
limitations
|
|
794
|
+
});
|
|
795
|
+
exportCandidates = (graph) => {
|
|
796
|
+
const candidates = new Map();
|
|
797
|
+
for (const node of graph.nodes) {
|
|
798
|
+
for (const observation of node.observations) {
|
|
799
|
+
const properties = observation.properties;
|
|
800
|
+
if (properties.semantic_role !== "export-binding") continue;
|
|
801
|
+
const modulePath = properties.module_path;
|
|
802
|
+
const exportName = properties.exported_name;
|
|
803
|
+
if (typeof modulePath !== "string" || typeof exportName !== "string") continue;
|
|
804
|
+
const key = `${node.node_id}\0${modulePath}\0${exportName}`;
|
|
805
|
+
const trusted = observation.evidence.authority === "ast-static-analysis" && observation.evidence.state === "observed" && observation.evidence.extractor.operation === "recover-module-export";
|
|
806
|
+
const existing = candidates.get(key);
|
|
807
|
+
candidates.set(key, {
|
|
808
|
+
node,
|
|
809
|
+
modulePath,
|
|
810
|
+
exportName,
|
|
811
|
+
trusted: trusted || existing?.trusted === true
|
|
812
|
+
});
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
return [...candidates.values()].sort((left, right) => compareUnicodeCodePoints(candidateKey(left), candidateKey(right)));
|
|
816
|
+
};
|
|
817
|
+
candidateKey = (candidate) => `${candidate.modulePath}\0${candidate.exportName}\0${candidate.node.node_id}`;
|
|
818
|
+
returnShapeFor = (node, side) => {
|
|
819
|
+
const roleObservations = node.observations.filter(({ properties }) => properties.semantic_role === "export-return-shapes");
|
|
820
|
+
const parsed = roleObservations.map((observation) => ({
|
|
821
|
+
observation,
|
|
822
|
+
result: projectedExportReturnShapesSchema.safeParse(observation.properties)
|
|
823
|
+
}));
|
|
824
|
+
if (parsed.some(({ result }) => !result.success)) return unavailableReturnShape("The export return-shape observation is malformed.");
|
|
825
|
+
const matching = parsed.filter(({ result }) => result.success && result.data.module_path === side.modulePath && result.data.exported_name === side.exportName);
|
|
826
|
+
if (matching.length !== 1) return unavailableReturnShape(matching.length === 0 ? "No exact static return-shape observation is available for the selected export." : "Multiple static return-shape observations matched the selected export.");
|
|
827
|
+
const selected = matching[0];
|
|
828
|
+
if (selected === undefined || !selected.result.success) return unavailableReturnShape("The selected return-shape observation could not be parsed.");
|
|
829
|
+
const { observation } = selected;
|
|
830
|
+
const trusted = observation.evidence.authority === "static-relationship-inference" && observation.evidence.state === "inferred" && observation.evidence.extractor.operation === "recover-export-return-shapes";
|
|
831
|
+
if (!trusted) return unavailableReturnShape("The return-shape observation lacks the expected static-inference authority.");
|
|
832
|
+
return {
|
|
833
|
+
projection: selected.result.data,
|
|
834
|
+
observationComplete: observation.evidence.coverage.status === "complete" && !observation.evidence.coverage.truncated
|
|
835
|
+
};
|
|
836
|
+
};
|
|
837
|
+
unavailableReturnShape = (reason) => ({
|
|
838
|
+
projection: null,
|
|
839
|
+
observationComplete: false,
|
|
840
|
+
reason
|
|
841
|
+
});
|
|
842
|
+
})))();
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
//#endregion
|
|
846
|
+
//#region dist/domain/javascript/javascriptExportShapeVariants.js
|
|
847
|
+
var UNKNOWN_COVERAGE_PRESENCE, pairJavaScriptExportShapeVariants, buildJavaScriptExportShapeChanges, buildJavaScriptExportShapeInventories, inventoryFor, hasPartialJavaScriptExportPropertyCoverage, discriminantOccurrences, reciprocalPairs, addTarget, indexesNotIn, compareDiscriminants, selectionUnknownChange, emptyShapeUnknownChange, diffPair, fieldAtPath, fieldChangeStatus, fieldPresence, propertyCoverageComplete, parentPointer, fieldAvailability, selectionAvailability, emptyShapeAvailability, unpairedChange, changeWithId, literalValue, primitiveArray, isPrimitive, capitalize;
|
|
848
|
+
function init_javascriptExportShapeVariants() {
|
|
849
|
+
return (init_javascriptExportShapeVariants = __esmMin((() => {
|
|
850
|
+
init_javascriptExportShapeComparisonIdentity();
|
|
851
|
+
init_canonicalOrdering();
|
|
852
|
+
init_unicodeCodePointOrder();
|
|
853
|
+
UNKNOWN_COVERAGE_PRESENCE = {
|
|
854
|
+
left: "unknown-coverage",
|
|
855
|
+
right: "unknown-coverage"
|
|
856
|
+
};
|
|
857
|
+
pairJavaScriptExportShapeVariants = (left, right) => {
|
|
858
|
+
const leftKeys = discriminantOccurrences(left);
|
|
859
|
+
const rightKeys = discriminantOccurrences(right);
|
|
860
|
+
const edges = new Map();
|
|
861
|
+
const leftTargets = new Map();
|
|
862
|
+
const rightTargets = new Map();
|
|
863
|
+
for (const [key, leftOccurrence] of leftKeys) {
|
|
864
|
+
const rightOccurrence = rightKeys.get(key);
|
|
865
|
+
if (leftOccurrence.indexes.length !== 1 || rightOccurrence?.indexes.length !== 1) continue;
|
|
866
|
+
const leftIndex = leftOccurrence.indexes[0];
|
|
867
|
+
const rightIndex = rightOccurrence.indexes[0];
|
|
868
|
+
if (leftIndex === undefined || rightIndex === undefined) continue;
|
|
869
|
+
const edgeKey = `${String(leftIndex)}:${String(rightIndex)}`;
|
|
870
|
+
edges.set(edgeKey, [...edges.get(edgeKey) ?? [], leftOccurrence.discriminant]);
|
|
871
|
+
addTarget(leftTargets, leftIndex, rightIndex);
|
|
872
|
+
addTarget(rightTargets, rightIndex, leftIndex);
|
|
873
|
+
}
|
|
874
|
+
const pairs = reciprocalPairs(leftTargets, rightTargets, edges);
|
|
875
|
+
const pairedLeft = new Set(pairs.map(({ leftIndex }) => leftIndex));
|
|
876
|
+
const pairedRight = new Set(pairs.map(({ rightIndex }) => rightIndex));
|
|
877
|
+
return {
|
|
878
|
+
pairs,
|
|
879
|
+
unpairedLeft: indexesNotIn(left, pairedLeft),
|
|
880
|
+
unpairedRight: indexesNotIn(right, pairedRight)
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
buildJavaScriptExportShapeChanges = (input) => {
|
|
884
|
+
if (input.leftSelection.selection.status !== "selected" || input.rightSelection.selection.status !== "selected") return [selectionUnknownChange(input)];
|
|
885
|
+
if (input.leftShapes.length === 0 || input.rightShapes.length === 0) return [emptyShapeUnknownChange(input)];
|
|
886
|
+
const paired = input.pairing.pairs.flatMap((pair) => {
|
|
887
|
+
const left = input.leftShapes[pair.leftIndex];
|
|
888
|
+
const right = input.rightShapes[pair.rightIndex];
|
|
889
|
+
return left === undefined || right === undefined ? [] : diffPair(left, right, pair.discriminant, input.evidenceLinks);
|
|
890
|
+
});
|
|
891
|
+
const unpairedLeft = input.pairing.unpairedLeft.flatMap((index) => {
|
|
892
|
+
const shape = input.leftShapes[index];
|
|
893
|
+
return shape === undefined ? [] : [unpairedChange("left", shape, input.evidenceLinks)];
|
|
894
|
+
});
|
|
895
|
+
const unpairedRight = input.pairing.unpairedRight.flatMap((index) => {
|
|
896
|
+
const shape = input.rightShapes[index];
|
|
897
|
+
return shape === undefined ? [] : [unpairedChange("right", shape, input.evidenceLinks)];
|
|
898
|
+
});
|
|
899
|
+
return [
|
|
900
|
+
...paired,
|
|
901
|
+
...unpairedLeft,
|
|
902
|
+
...unpairedRight
|
|
903
|
+
];
|
|
904
|
+
};
|
|
905
|
+
buildJavaScriptExportShapeInventories = (input) => {
|
|
906
|
+
const leftPairs = new Map(input.pairing.pairs.map((pair) => [pair.leftIndex, pair]));
|
|
907
|
+
const rightPairs = new Map(input.pairing.pairs.map((pair) => [pair.rightIndex, pair]));
|
|
908
|
+
return [...input.leftShapes.map((shape, index) => inventoryFor("left", index, shape, leftPairs.get(index))), ...input.rightShapes.map((shape, index) => inventoryFor("right", index, shape, rightPairs.get(index)))];
|
|
909
|
+
};
|
|
910
|
+
inventoryFor = (side, variantIndex, shape, pair) => ({
|
|
911
|
+
side,
|
|
912
|
+
variant_index: variantIndex,
|
|
913
|
+
discriminant: pair?.discriminant ?? null,
|
|
914
|
+
paired: pair !== undefined,
|
|
915
|
+
source_range: shape.source_range,
|
|
916
|
+
properties: uniqueSorted([...shape.fields.filter((field) => fieldPresence(shape, field, field.path) === "present").map(({ path }) => path), ...shape.property_coverage.map(({ path }) => path)]).filter((path) => path !== ""),
|
|
917
|
+
property_coverage: shape.property_coverage.map(({ path, status }) => ({
|
|
918
|
+
path,
|
|
919
|
+
status
|
|
920
|
+
}))
|
|
921
|
+
});
|
|
922
|
+
hasPartialJavaScriptExportPropertyCoverage = (shapes) => shapes.some((shape) => shape.property_coverage.some(({ status }) => status === "partial") || shape.fields.some((field) => fieldPresence(shape, field, field.path) === "unknown-coverage"));
|
|
923
|
+
discriminantOccurrences = (shapes) => {
|
|
924
|
+
const output = new Map();
|
|
925
|
+
shapes.forEach((shape, index) => {
|
|
926
|
+
for (const field of shape.fields) {
|
|
927
|
+
if (fieldPresence(shape, field, field.path) !== "present") continue;
|
|
928
|
+
const value = literalValue(field);
|
|
929
|
+
if (!value.found) continue;
|
|
930
|
+
const discriminant = {
|
|
931
|
+
path: field.path,
|
|
932
|
+
value: value.value
|
|
933
|
+
};
|
|
934
|
+
const key = canonicalExportShapeValue(discriminant);
|
|
935
|
+
const current = output.get(key);
|
|
936
|
+
output.set(key, {
|
|
937
|
+
discriminant,
|
|
938
|
+
indexes: [...current?.indexes ?? [], index]
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
});
|
|
942
|
+
return output;
|
|
943
|
+
};
|
|
944
|
+
reciprocalPairs = (leftTargets, rightTargets, edges) => {
|
|
945
|
+
const pairs = [];
|
|
946
|
+
for (const [leftIndex, targets] of leftTargets) {
|
|
947
|
+
if (targets.size !== 1) continue;
|
|
948
|
+
const rightIndex = [...targets][0];
|
|
949
|
+
if (rightIndex === undefined || rightTargets.get(rightIndex)?.size !== 1 || !rightTargets.get(rightIndex)?.has(leftIndex)) continue;
|
|
950
|
+
const discriminants = edges.get(`${String(leftIndex)}:${String(rightIndex)}`)?.toSorted(compareDiscriminants);
|
|
951
|
+
const discriminant = discriminants?.[0];
|
|
952
|
+
if (discriminant !== undefined) pairs.push({
|
|
953
|
+
leftIndex,
|
|
954
|
+
rightIndex,
|
|
955
|
+
discriminant
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
return pairs.sort((first, second) => compareDiscriminants(first.discriminant, second.discriminant));
|
|
959
|
+
};
|
|
960
|
+
addTarget = (map, source, target) => {
|
|
961
|
+
const values = map.get(source) ?? new Set();
|
|
962
|
+
values.add(target);
|
|
963
|
+
map.set(source, values);
|
|
964
|
+
};
|
|
965
|
+
indexesNotIn = (shapes, paired) => shapes.map((_, index) => index).filter((index) => !paired.has(index));
|
|
966
|
+
compareDiscriminants = (left, right) => compareUnicodeCodePoints(canonicalExportShapeValue(left), canonicalExportShapeValue(right));
|
|
967
|
+
selectionUnknownChange = (input) => changeWithId({
|
|
968
|
+
status: "unknown",
|
|
969
|
+
path: "",
|
|
970
|
+
discriminant: null,
|
|
971
|
+
presence: UNKNOWN_COVERAGE_PRESENCE,
|
|
972
|
+
left: selectionAvailability(input.leftSelection.selection, "left"),
|
|
973
|
+
right: selectionAvailability(input.rightSelection.selection, "right"),
|
|
974
|
+
left_source_range: null,
|
|
975
|
+
right_source_range: null,
|
|
976
|
+
evidence_links: input.evidenceLinks,
|
|
977
|
+
limitations: ["Both selectors must resolve one exact export with trusted static return shapes before comparison."]
|
|
978
|
+
});
|
|
979
|
+
emptyShapeUnknownChange = (input) => changeWithId({
|
|
980
|
+
status: "unknown",
|
|
981
|
+
path: "",
|
|
982
|
+
discriminant: null,
|
|
983
|
+
presence: UNKNOWN_COVERAGE_PRESENCE,
|
|
984
|
+
left: emptyShapeAvailability(input.leftShapes, "left"),
|
|
985
|
+
right: emptyShapeAvailability(input.rightShapes, "right"),
|
|
986
|
+
left_source_range: null,
|
|
987
|
+
right_source_range: null,
|
|
988
|
+
evidence_links: input.evidenceLinks,
|
|
989
|
+
limitations: ["At least one selected export has no retained direct return shape."]
|
|
990
|
+
});
|
|
991
|
+
diffPair = (left, right, discriminant, evidenceLinks) => {
|
|
992
|
+
const leftFields = new Map(left.fields.map((field) => [field.path, field]));
|
|
993
|
+
const rightFields = new Map(right.fields.map((field) => [field.path, field]));
|
|
994
|
+
const paths = uniqueSorted([
|
|
995
|
+
...leftFields.keys(),
|
|
996
|
+
...rightFields.keys(),
|
|
997
|
+
...left.property_coverage.map(({ path }) => path),
|
|
998
|
+
...right.property_coverage.map(({ path }) => path)
|
|
999
|
+
]);
|
|
1000
|
+
return paths.flatMap((path) => {
|
|
1001
|
+
const leftField = fieldAtPath(left, leftFields, path);
|
|
1002
|
+
const rightField = fieldAtPath(right, rightFields, path);
|
|
1003
|
+
const status = fieldChangeStatus({
|
|
1004
|
+
leftShape: left,
|
|
1005
|
+
rightShape: right,
|
|
1006
|
+
path,
|
|
1007
|
+
leftField,
|
|
1008
|
+
rightField
|
|
1009
|
+
});
|
|
1010
|
+
if (status === null) return [];
|
|
1011
|
+
return [changeWithId({
|
|
1012
|
+
status,
|
|
1013
|
+
path,
|
|
1014
|
+
discriminant,
|
|
1015
|
+
presence: {
|
|
1016
|
+
left: fieldPresence(left, leftField, path),
|
|
1017
|
+
right: fieldPresence(right, rightField, path)
|
|
1018
|
+
},
|
|
1019
|
+
left: fieldAvailability(leftField),
|
|
1020
|
+
right: fieldAvailability(rightField),
|
|
1021
|
+
left_source_range: left.source_range,
|
|
1022
|
+
right_source_range: right.source_range,
|
|
1023
|
+
evidence_links: evidenceLinks,
|
|
1024
|
+
limitations: status === "unknown" ? ["The static value or relevant parent-property coverage is incomplete."] : []
|
|
1025
|
+
})];
|
|
1026
|
+
});
|
|
1027
|
+
};
|
|
1028
|
+
fieldAtPath = (shape, fields, path) => {
|
|
1029
|
+
const field = fields.get(path);
|
|
1030
|
+
if (field !== undefined) return field;
|
|
1031
|
+
if (!shape.property_coverage.some((coverage) => coverage.path === path)) return undefined;
|
|
1032
|
+
return {
|
|
1033
|
+
path,
|
|
1034
|
+
presence: "present",
|
|
1035
|
+
state: "unknown",
|
|
1036
|
+
value: null,
|
|
1037
|
+
reason: "A static container is retained at this path, but no primitive field value is projected."
|
|
1038
|
+
};
|
|
1039
|
+
};
|
|
1040
|
+
fieldChangeStatus = ({ leftShape, rightShape, path, leftField, rightField }) => {
|
|
1041
|
+
const leftPresence = fieldPresence(leftShape, leftField, path);
|
|
1042
|
+
const rightPresence = fieldPresence(rightShape, rightField, path);
|
|
1043
|
+
if (leftField !== undefined && rightField !== undefined && canonicalExportShapeValue(leftField) === canonicalExportShapeValue(rightField)) return null;
|
|
1044
|
+
if (leftPresence === "absent" && rightPresence === "absent") return null;
|
|
1045
|
+
if (leftPresence === "unknown-coverage" || rightPresence === "unknown-coverage") return "unknown";
|
|
1046
|
+
if (leftPresence === "absent") return "added";
|
|
1047
|
+
if (rightPresence === "absent") return "removed";
|
|
1048
|
+
if (leftField !== undefined && rightField !== undefined) {
|
|
1049
|
+
return leftField.state === "unknown" || rightField.state === "unknown" ? "unknown" : "changed";
|
|
1050
|
+
}
|
|
1051
|
+
return null;
|
|
1052
|
+
};
|
|
1053
|
+
fieldPresence = (shape, field, path) => {
|
|
1054
|
+
if (field !== undefined) return field.presence;
|
|
1055
|
+
return propertyCoverageComplete(shape, parentPointer(path)) ? "absent" : "unknown-coverage";
|
|
1056
|
+
};
|
|
1057
|
+
propertyCoverageComplete = (shape, path) => path !== null && shape.property_coverage.some((coverage) => coverage.path === path && coverage.status === "complete");
|
|
1058
|
+
parentPointer = (path) => {
|
|
1059
|
+
if (path === "") return null;
|
|
1060
|
+
const separator = path.lastIndexOf("/");
|
|
1061
|
+
return separator < 0 ? null : path.slice(0, separator);
|
|
1062
|
+
};
|
|
1063
|
+
fieldAvailability = (field) => {
|
|
1064
|
+
if (field === undefined || field.presence === "absent") return { availability: "absent" };
|
|
1065
|
+
if (field.state === "unknown") return {
|
|
1066
|
+
availability: "unknown",
|
|
1067
|
+
reason: field.reason ?? "Static field value is unknown."
|
|
1068
|
+
};
|
|
1069
|
+
if (field.state === "union") return {
|
|
1070
|
+
availability: "union",
|
|
1071
|
+
values: primitiveArray(field.value)
|
|
1072
|
+
};
|
|
1073
|
+
const literal = literalValue(field);
|
|
1074
|
+
return literal.found ? {
|
|
1075
|
+
availability: "literal",
|
|
1076
|
+
value: literal.value
|
|
1077
|
+
} : {
|
|
1078
|
+
availability: "unknown",
|
|
1079
|
+
reason: "Static literal field failed its projection boundary."
|
|
1080
|
+
};
|
|
1081
|
+
};
|
|
1082
|
+
selectionAvailability = (selection, side) => ({
|
|
1083
|
+
availability: "unknown",
|
|
1084
|
+
reason: `${capitalize(side)} export selection is ${selection.status}.`
|
|
1085
|
+
});
|
|
1086
|
+
emptyShapeAvailability = (shapes, side) => ({
|
|
1087
|
+
availability: "unknown",
|
|
1088
|
+
reason: shapes.length === 0 ? `${capitalize(side)} export has no retained direct return shape.` : `${capitalize(side)} export return shape cannot be paired without an opposite variant.`
|
|
1089
|
+
});
|
|
1090
|
+
unpairedChange = (side, shape, evidenceLinks) => changeWithId({
|
|
1091
|
+
status: "unknown",
|
|
1092
|
+
path: "",
|
|
1093
|
+
discriminant: null,
|
|
1094
|
+
presence: UNKNOWN_COVERAGE_PRESENCE,
|
|
1095
|
+
left: {
|
|
1096
|
+
availability: "unknown",
|
|
1097
|
+
reason: side === "left" ? "Left return variant has no unique exact cross-version pairing." : "No left return variant was uniquely paired with this right variant."
|
|
1098
|
+
},
|
|
1099
|
+
right: {
|
|
1100
|
+
availability: "unknown",
|
|
1101
|
+
reason: side === "right" ? "Right return variant has no unique exact cross-version pairing." : "No right return variant was uniquely paired with this left variant."
|
|
1102
|
+
},
|
|
1103
|
+
left_source_range: side === "left" ? shape.source_range : null,
|
|
1104
|
+
right_source_range: side === "right" ? shape.source_range : null,
|
|
1105
|
+
evidence_links: evidenceLinks,
|
|
1106
|
+
limitations: ["The return variant was not paired because no reciprocal unique literal discriminant exists."]
|
|
1107
|
+
});
|
|
1108
|
+
changeWithId = (semantic) => ({
|
|
1109
|
+
...semantic,
|
|
1110
|
+
change_id: `jesc_change_${digestExportShapeValue(semantic)}`
|
|
1111
|
+
});
|
|
1112
|
+
literalValue = (field) => field.state === "literal" && isPrimitive(field.value) ? {
|
|
1113
|
+
found: true,
|
|
1114
|
+
value: field.value
|
|
1115
|
+
} : { found: false };
|
|
1116
|
+
primitiveArray = (value) => Array.isArray(value) ? value.filter(isPrimitive) : [];
|
|
1117
|
+
isPrimitive = (value) => value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean";
|
|
1118
|
+
capitalize = (value) => `${value.slice(0, 1).toUpperCase()}${value.slice(1)}`;
|
|
1119
|
+
})))();
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
//#endregion
|
|
1123
|
+
//#region dist/domain/javascript/javascriptExportShapeComparison.js
|
|
1124
|
+
var compareJavaScriptExportShapes, sortChanges, comparisonCoverage$1, comparisonTruncated, sourceProjectionTruncated, comparisonPartial, selectionPartial, comparisonLimitations$1, summarize, countStatus$1, evidencePair;
|
|
1125
|
+
function init_javascriptExportShapeComparison() {
|
|
1126
|
+
return (init_javascriptExportShapeComparison = __esmMin((() => {
|
|
1127
|
+
init_canonicalOrdering();
|
|
1128
|
+
init_unicodeCodePointOrder();
|
|
1129
|
+
init_javascriptExportShapeComparisonIdentity();
|
|
1130
|
+
init_javascriptExportShapeComparisonSchemas();
|
|
1131
|
+
init_javascriptExportShapeSelection();
|
|
1132
|
+
init_javascriptExportShapeVariants();
|
|
1133
|
+
compareJavaScriptExportShapes = (input) => {
|
|
1134
|
+
const left = selectJavaScriptExport(input.left);
|
|
1135
|
+
const right = selectJavaScriptExport(input.right);
|
|
1136
|
+
const leftRetained = retainJavaScriptExportShapes(left);
|
|
1137
|
+
const rightRetained = retainJavaScriptExportShapes(right);
|
|
1138
|
+
const pairing = pairJavaScriptExportShapeVariants(leftRetained.shapes, rightRetained.shapes);
|
|
1139
|
+
const evidenceLinks = evidencePair(input.left.evidenceId, input.right.evidenceId);
|
|
1140
|
+
const allChanges = sortChanges(buildJavaScriptExportShapeChanges({
|
|
1141
|
+
leftSelection: left,
|
|
1142
|
+
rightSelection: right,
|
|
1143
|
+
pairing,
|
|
1144
|
+
leftShapes: leftRetained.shapes,
|
|
1145
|
+
rightShapes: rightRetained.shapes,
|
|
1146
|
+
evidenceLinks
|
|
1147
|
+
}));
|
|
1148
|
+
const changes = allChanges;
|
|
1149
|
+
const omittedChanges = 0;
|
|
1150
|
+
const propertyInventories = buildJavaScriptExportShapeInventories({
|
|
1151
|
+
pairing,
|
|
1152
|
+
leftShapes: leftRetained.shapes,
|
|
1153
|
+
rightShapes: rightRetained.shapes
|
|
1154
|
+
});
|
|
1155
|
+
const coverage = comparisonCoverage$1({
|
|
1156
|
+
input,
|
|
1157
|
+
left,
|
|
1158
|
+
right,
|
|
1159
|
+
leftRetained,
|
|
1160
|
+
rightRetained,
|
|
1161
|
+
pairing,
|
|
1162
|
+
allChanges,
|
|
1163
|
+
omittedChanges
|
|
1164
|
+
});
|
|
1165
|
+
const limitations = comparisonLimitations$1(left, right, coverage.status);
|
|
1166
|
+
const semantic = {
|
|
1167
|
+
left: left.selection,
|
|
1168
|
+
right: right.selection,
|
|
1169
|
+
property_inventories: propertyInventories,
|
|
1170
|
+
summary: summarize(allChanges),
|
|
1171
|
+
changes,
|
|
1172
|
+
coverage,
|
|
1173
|
+
evidence_links: evidenceLinks,
|
|
1174
|
+
limitations
|
|
1175
|
+
};
|
|
1176
|
+
return javaScriptExportShapeComparisonResultSchema.parse({
|
|
1177
|
+
...semantic,
|
|
1178
|
+
comparison_id: `jesc_${digestExportShapeValue(semantic)}`
|
|
1179
|
+
});
|
|
1180
|
+
};
|
|
1181
|
+
sortChanges = (changes) => changes.map((change, index) => ({
|
|
1182
|
+
change,
|
|
1183
|
+
index,
|
|
1184
|
+
sortKey: canonicalExportShapeValue({
|
|
1185
|
+
discriminant: change.discriminant,
|
|
1186
|
+
path: change.path,
|
|
1187
|
+
status: change.status,
|
|
1188
|
+
left_source_range: change.left_source_range,
|
|
1189
|
+
right_source_range: change.right_source_range,
|
|
1190
|
+
change_id: change.change_id
|
|
1191
|
+
})
|
|
1192
|
+
})).sort((left, right) => compareUnicodeCodePoints(left.sortKey, right.sortKey) || left.index - right.index).map(({ change }) => change);
|
|
1193
|
+
comparisonCoverage$1 = (context) => {
|
|
1194
|
+
const leftSource = context.left.projection?.return_shape_coverage;
|
|
1195
|
+
const rightSource = context.right.projection?.return_shape_coverage;
|
|
1196
|
+
const omittedCandidates = context.left.selection.omitted_candidates + context.right.selection.omitted_candidates;
|
|
1197
|
+
const truncated = comparisonTruncated(context, omittedCandidates);
|
|
1198
|
+
const partial = comparisonPartial(context);
|
|
1199
|
+
return {
|
|
1200
|
+
status: truncated ? "truncated" : partial ? "partial" : "complete-within-inputs",
|
|
1201
|
+
left_graph_status: context.input.left.graph.coverage.status,
|
|
1202
|
+
right_graph_status: context.input.right.graph.coverage.status,
|
|
1203
|
+
paired_variants: context.pairing.pairs.length,
|
|
1204
|
+
unpaired_left_variants: context.pairing.unpairedLeft.length,
|
|
1205
|
+
unpaired_right_variants: context.pairing.unpairedRight.length,
|
|
1206
|
+
omitted_left_variants: context.leftRetained.omitted,
|
|
1207
|
+
omitted_right_variants: context.rightRetained.omitted,
|
|
1208
|
+
left_source_omitted_variants: leftSource?.omitted_return_sites ?? null,
|
|
1209
|
+
right_source_omitted_variants: rightSource?.omitted_return_sites ?? null,
|
|
1210
|
+
left_omitted_fields: leftSource?.omitted_fields ?? 0,
|
|
1211
|
+
right_omitted_fields: rightSource?.omitted_fields ?? 0,
|
|
1212
|
+
left_omitted_property_coverage: leftSource?.omitted_property_coverage ?? 0,
|
|
1213
|
+
right_omitted_property_coverage: rightSource?.omitted_property_coverage ?? 0,
|
|
1214
|
+
omitted_candidates: omittedCandidates,
|
|
1215
|
+
omitted_changes: context.omittedChanges
|
|
1216
|
+
};
|
|
1217
|
+
};
|
|
1218
|
+
comparisonTruncated = (context, omittedCandidates) => context.leftRetained.omitted > 0 || context.rightRetained.omitted > 0 || omittedCandidates > 0 || context.omittedChanges > 0 || sourceProjectionTruncated(context.left) || sourceProjectionTruncated(context.right);
|
|
1219
|
+
sourceProjectionTruncated = (selection) => {
|
|
1220
|
+
const coverage = selection.projection?.return_shape_coverage;
|
|
1221
|
+
if (coverage === undefined) return false;
|
|
1222
|
+
return coverage.status === "truncated" || coverage.omitted_fields > 0 || coverage.omitted_property_coverage > 0 || coverage.projection_complete === false;
|
|
1223
|
+
};
|
|
1224
|
+
comparisonPartial = (context) => selectionPartial(context.left) || selectionPartial(context.right) || context.input.left.graph.coverage.status !== "complete" || context.input.right.graph.coverage.status !== "complete" || hasPartialJavaScriptExportPropertyCoverage(context.leftRetained.shapes) || hasPartialJavaScriptExportPropertyCoverage(context.rightRetained.shapes) || context.pairing.unpairedLeft.length > 0 || context.pairing.unpairedRight.length > 0 || context.allChanges.some(({ status }) => status === "unknown");
|
|
1225
|
+
selectionPartial = (selection) => {
|
|
1226
|
+
const coverage = selection.projection?.return_shape_coverage;
|
|
1227
|
+
return selection.selection.status !== "selected" || !selection.observationComplete || coverage?.status !== "complete" || coverage.projection_complete !== true;
|
|
1228
|
+
};
|
|
1229
|
+
comparisonLimitations$1 = (left, right, status) => uniqueSorted([
|
|
1230
|
+
"Return shapes are inferred from inert syntax and do not prove runtime behavior.",
|
|
1231
|
+
"Return variants are paired only by unique exact literal discriminants, never by source order.",
|
|
1232
|
+
"Dynamic values, incomplete object coverage, and ambiguous variants remain unknown.",
|
|
1233
|
+
"This static comparison cannot establish runtime semantics; run behavioral probes directly against the relevant application versions when that evidence is required.",
|
|
1234
|
+
...left.limitations,
|
|
1235
|
+
...right.limitations,
|
|
1236
|
+
...status === "truncated" ? ["Comparison output or source return-shape recovery reached an explicit limit."] : [],
|
|
1237
|
+
...status === "partial" ? ["At least one selector, graph, return shape, or property boundary is incomplete."] : []
|
|
1238
|
+
]);
|
|
1239
|
+
summarize = (changes) => ({
|
|
1240
|
+
added: countStatus$1(changes, "added"),
|
|
1241
|
+
removed: countStatus$1(changes, "removed"),
|
|
1242
|
+
changed: countStatus$1(changes, "changed"),
|
|
1243
|
+
unknown: countStatus$1(changes, "unknown")
|
|
1244
|
+
});
|
|
1245
|
+
countStatus$1 = (changes, status) => changes.filter((change) => change.status === status).length;
|
|
1246
|
+
evidencePair = (left, right) => [left, right];
|
|
1247
|
+
})))();
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
//#endregion
|
|
1251
|
+
//#region dist/domain/javascript/javascriptFeatureSeed.js
|
|
1252
|
+
var findApplicationFeatureSeeds, seedMatch, kindMatches, candidateFields, memberFieldSuffixes, relevantFields, identityFields, propertyFields, normalized;
|
|
1253
|
+
function init_javascriptFeatureSeed() {
|
|
1254
|
+
return (init_javascriptFeatureSeed = __esmMin((() => {
|
|
1255
|
+
init_unicodeCodePointOrder();
|
|
1256
|
+
init_javascriptFeatureTraceSchemas();
|
|
1257
|
+
findApplicationFeatureSeeds = (nodes, seed) => nodes.flatMap((node) => seedMatch(node, seed)).sort((left, right) => compareUnicodeCodePoints(`${left.node_id}\0${left.basis}\0${left.field}`, `${right.node_id}\0${right.basis}\0${right.field}`));
|
|
1258
|
+
seedMatch = (node, seed) => {
|
|
1259
|
+
if (seed.kind === "node-id") return node.node_id === seed.value ? [{
|
|
1260
|
+
node_id: node.node_id,
|
|
1261
|
+
kind: node.kind,
|
|
1262
|
+
basis: "node-id",
|
|
1263
|
+
field: "node_id"
|
|
1264
|
+
}] : [];
|
|
1265
|
+
if (!kindMatches(node, seed.kind)) return [];
|
|
1266
|
+
const mode = featureSeedMatchMode(seed);
|
|
1267
|
+
const query = normalized(seed.value, seed.case_sensitive);
|
|
1268
|
+
const match = candidateFields(node, seed.kind).find((candidate) => {
|
|
1269
|
+
const value = normalized(candidate.value, seed.case_sensitive);
|
|
1270
|
+
return mode === "exact" ? value === query : value.includes(query);
|
|
1271
|
+
});
|
|
1272
|
+
return match === undefined ? [] : [{
|
|
1273
|
+
node_id: node.node_id,
|
|
1274
|
+
kind: node.kind,
|
|
1275
|
+
basis: match.basis,
|
|
1276
|
+
field: match.field
|
|
1277
|
+
}];
|
|
1278
|
+
};
|
|
1279
|
+
kindMatches = (node, kind) => {
|
|
1280
|
+
if (kind === "string") return true;
|
|
1281
|
+
if (kind === "route") return node.kind === "endpoint" && node.observations.some(({ properties }) => properties.endpoint_kind === "route");
|
|
1282
|
+
if (kind === "api") return node.kind === "context-bridge-api" || node.kind === "javascript-expression" && node.observations.some((o) => o.properties.step_kind === "exposure");
|
|
1283
|
+
if (kind === "channel") return node.kind === "ipc-channel";
|
|
1284
|
+
if (kind === "module") return [
|
|
1285
|
+
"javascript-asset",
|
|
1286
|
+
"javascript-module",
|
|
1287
|
+
"source-module"
|
|
1288
|
+
].includes(node.kind);
|
|
1289
|
+
return node.kind === "native-export";
|
|
1290
|
+
};
|
|
1291
|
+
candidateFields = (node, seedKind) => {
|
|
1292
|
+
const fields = [...identityFields(node), ...node.observations.flatMap((observation, index) => [
|
|
1293
|
+
...observation.label === null ? [] : [{
|
|
1294
|
+
basis: "label",
|
|
1295
|
+
field: `observations[${String(index)}].label`,
|
|
1296
|
+
value: observation.label
|
|
1297
|
+
}],
|
|
1298
|
+
...observation.source_map_reference !== null && observation.source_map_reference.resolution.kind !== "unresolved" ? [{
|
|
1299
|
+
basis: "property",
|
|
1300
|
+
field: `observations[${String(index)}].source_map_reference.resolution.path`,
|
|
1301
|
+
value: observation.source_map_reference.resolution.path
|
|
1302
|
+
}] : [],
|
|
1303
|
+
...propertyFields(observation.properties, `observations[${String(index)}].properties`)
|
|
1304
|
+
])];
|
|
1305
|
+
if (seedKind === "string") return fields;
|
|
1306
|
+
const names = relevantFields[seedKind];
|
|
1307
|
+
return fields.filter(({ field, selectionPath = field }) => names.some((name) => {
|
|
1308
|
+
const path = memberFieldSuffixes.has(name) ? selectionPath : field;
|
|
1309
|
+
return path === "identity" || path.endsWith(name);
|
|
1310
|
+
}));
|
|
1311
|
+
};
|
|
1312
|
+
memberFieldSuffixes = new Set([
|
|
1313
|
+
".members",
|
|
1314
|
+
".methods",
|
|
1315
|
+
".exports",
|
|
1316
|
+
".requested_members"
|
|
1317
|
+
]);
|
|
1318
|
+
relevantFields = {
|
|
1319
|
+
route: [
|
|
1320
|
+
".label",
|
|
1321
|
+
".value",
|
|
1322
|
+
".path"
|
|
1323
|
+
],
|
|
1324
|
+
api: [
|
|
1325
|
+
".label",
|
|
1326
|
+
".api_name",
|
|
1327
|
+
".api_key",
|
|
1328
|
+
".key",
|
|
1329
|
+
".methods",
|
|
1330
|
+
".members"
|
|
1331
|
+
],
|
|
1332
|
+
channel: [
|
|
1333
|
+
".label",
|
|
1334
|
+
".channel",
|
|
1335
|
+
".key"
|
|
1336
|
+
],
|
|
1337
|
+
module: [
|
|
1338
|
+
".label",
|
|
1339
|
+
".module_key",
|
|
1340
|
+
".path",
|
|
1341
|
+
".source",
|
|
1342
|
+
".original_source",
|
|
1343
|
+
".source_root",
|
|
1344
|
+
".exports"
|
|
1345
|
+
],
|
|
1346
|
+
"native-export": [
|
|
1347
|
+
".label",
|
|
1348
|
+
".key",
|
|
1349
|
+
".requested_members",
|
|
1350
|
+
".members"
|
|
1351
|
+
]
|
|
1352
|
+
};
|
|
1353
|
+
identityFields = (node) => {
|
|
1354
|
+
const identity = node.identity;
|
|
1355
|
+
if (identity.strategy === "content-digest") return [{
|
|
1356
|
+
basis: "identity",
|
|
1357
|
+
field: "identity",
|
|
1358
|
+
value: identity.sha256
|
|
1359
|
+
}];
|
|
1360
|
+
if (identity.strategy === "source-map-original") return [{
|
|
1361
|
+
basis: "identity",
|
|
1362
|
+
field: "identity.original_source",
|
|
1363
|
+
value: identity.original_source
|
|
1364
|
+
}, ...identity.source_root === null ? [] : [{
|
|
1365
|
+
basis: "identity",
|
|
1366
|
+
field: "identity.source_root",
|
|
1367
|
+
value: identity.source_root
|
|
1368
|
+
}]];
|
|
1369
|
+
if (identity.strategy === "canonical-path") return [{
|
|
1370
|
+
basis: "identity",
|
|
1371
|
+
field: "identity.path",
|
|
1372
|
+
value: identity.path
|
|
1373
|
+
}];
|
|
1374
|
+
if (identity.strategy === "artifact-local-key") return [{
|
|
1375
|
+
basis: "identity",
|
|
1376
|
+
field: "identity.key",
|
|
1377
|
+
value: identity.key
|
|
1378
|
+
}];
|
|
1379
|
+
if (identity.strategy === "runtime-instance") return [{
|
|
1380
|
+
basis: "identity",
|
|
1381
|
+
field: "identity.runtime_key",
|
|
1382
|
+
value: identity.runtime_key
|
|
1383
|
+
}];
|
|
1384
|
+
return [];
|
|
1385
|
+
};
|
|
1386
|
+
propertyFields = (value, prefix) => {
|
|
1387
|
+
const output = [];
|
|
1388
|
+
const pending = [{
|
|
1389
|
+
current: value,
|
|
1390
|
+
path: prefix,
|
|
1391
|
+
selectionPath: prefix
|
|
1392
|
+
}];
|
|
1393
|
+
while (pending.length > 0) {
|
|
1394
|
+
const next = pending.pop();
|
|
1395
|
+
if (next === undefined) continue;
|
|
1396
|
+
const { current, path, selectionPath } = next;
|
|
1397
|
+
if (typeof current === "string") {
|
|
1398
|
+
output.push({
|
|
1399
|
+
basis: "property",
|
|
1400
|
+
field: path,
|
|
1401
|
+
selectionPath,
|
|
1402
|
+
value: current
|
|
1403
|
+
});
|
|
1404
|
+
continue;
|
|
1405
|
+
}
|
|
1406
|
+
if (Array.isArray(current)) {
|
|
1407
|
+
for (let index = current.length - 1; index >= 0; index -= 1) {
|
|
1408
|
+
const item = current[index];
|
|
1409
|
+
if (item !== undefined) pending.push({
|
|
1410
|
+
current: item,
|
|
1411
|
+
path: `${path}[${String(index)}]`,
|
|
1412
|
+
selectionPath
|
|
1413
|
+
});
|
|
1414
|
+
}
|
|
1415
|
+
continue;
|
|
1416
|
+
}
|
|
1417
|
+
if (current !== null && typeof current === "object") {
|
|
1418
|
+
for (const key of Object.keys(current).sort(compareUnicodeCodePoints).reverse()) pending.push({
|
|
1419
|
+
current: current[key] ?? null,
|
|
1420
|
+
path: `${path}.${key}`,
|
|
1421
|
+
selectionPath: `${selectionPath}.${key}`
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
return output;
|
|
1426
|
+
};
|
|
1427
|
+
normalized = (value, caseSensitive) => {
|
|
1428
|
+
const normalizedValue = value.normalize("NFKC");
|
|
1429
|
+
return caseSensitive ? normalizedValue : normalizedValue.toLocaleLowerCase("en-US");
|
|
1430
|
+
};
|
|
1431
|
+
})))();
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
//#endregion
|
|
1435
|
+
//#region dist/domain/javascript/javascriptFeatureTraversal.js
|
|
1436
|
+
var traverseApplicationFeature, buildAdjacency, addAdjacency;
|
|
1437
|
+
function init_javascriptFeatureTraversal() {
|
|
1438
|
+
return (init_javascriptFeatureTraversal = __esmMin((() => {
|
|
1439
|
+
init_unicodeCodePointOrder();
|
|
1440
|
+
traverseApplicationFeature = (graph, seedNodeIds, direction) => {
|
|
1441
|
+
const nodeById = new Map(graph.nodes.map((node) => [node.node_id, node]));
|
|
1442
|
+
const adjacency = buildAdjacency(graph.edges, direction);
|
|
1443
|
+
const visited = new Set(seedNodeIds);
|
|
1444
|
+
const retainedEdges = new Map();
|
|
1445
|
+
const predecessors = new Map();
|
|
1446
|
+
const queue = [...seedNodeIds];
|
|
1447
|
+
for (let offset = 0; offset < queue.length; offset += 1) {
|
|
1448
|
+
const current = queue[offset];
|
|
1449
|
+
if (current === undefined) continue;
|
|
1450
|
+
for (const entry of adjacency.get(current) ?? []) {
|
|
1451
|
+
retainedEdges.set(entry.edge.edge_id, entry.edge);
|
|
1452
|
+
if (visited.has(entry.nextNodeId)) continue;
|
|
1453
|
+
if (!nodeById.has(entry.nextNodeId)) continue;
|
|
1454
|
+
visited.add(entry.nextNodeId);
|
|
1455
|
+
predecessors.set(entry.nextNodeId, {
|
|
1456
|
+
previousNodeId: current,
|
|
1457
|
+
edgeId: entry.edge.edge_id
|
|
1458
|
+
});
|
|
1459
|
+
queue.push(entry.nextNodeId);
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
return {
|
|
1463
|
+
nodes: [...visited].map((nodeId) => nodeById.get(nodeId)).filter((node) => node !== undefined).sort((left, right) => compareUnicodeCodePoints(left.node_id, right.node_id)),
|
|
1464
|
+
edges: [...retainedEdges.values()].sort((left, right) => compareUnicodeCodePoints(left.edge_id, right.edge_id)),
|
|
1465
|
+
predecessors
|
|
1466
|
+
};
|
|
1467
|
+
};
|
|
1468
|
+
buildAdjacency = (edges, direction) => {
|
|
1469
|
+
const adjacency = new Map();
|
|
1470
|
+
for (const edge of edges) {
|
|
1471
|
+
if (direction !== "incoming") addAdjacency(adjacency, edge.source_node_id, {
|
|
1472
|
+
edge,
|
|
1473
|
+
nextNodeId: edge.target_node_id
|
|
1474
|
+
});
|
|
1475
|
+
if (direction !== "outgoing") addAdjacency(adjacency, edge.target_node_id, {
|
|
1476
|
+
edge,
|
|
1477
|
+
nextNodeId: edge.source_node_id
|
|
1478
|
+
});
|
|
1479
|
+
}
|
|
1480
|
+
for (const entries of adjacency.values()) entries.sort((left, right) => compareUnicodeCodePoints(`${left.edge.edge_id}\0${left.nextNodeId}`, `${right.edge.edge_id}\0${right.nextNodeId}`));
|
|
1481
|
+
return adjacency;
|
|
1482
|
+
};
|
|
1483
|
+
addAdjacency = (adjacency, nodeId, entry) => {
|
|
1484
|
+
const entries = adjacency.get(nodeId);
|
|
1485
|
+
if (entries === undefined) adjacency.set(nodeId, [entry]);
|
|
1486
|
+
else entries.push(entry);
|
|
1487
|
+
};
|
|
1488
|
+
})))();
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
//#endregion
|
|
1492
|
+
//#region dist/domain/javascript/javascriptNativeHandoff.js
|
|
1493
|
+
var buildJavaScriptNativeHandoffs, artifactDigest, artifactPath, nativeExportNodes, requestedExports, stringArray, uniqueProviders;
|
|
1494
|
+
function init_javascriptNativeHandoff() {
|
|
1495
|
+
return (init_javascriptNativeHandoff = __esmMin((() => {
|
|
1496
|
+
init_unicodeCodePointOrder();
|
|
1497
|
+
buildJavaScriptNativeHandoffs = (nodes, edges, nativeEvidence) => {
|
|
1498
|
+
const nodeById = new Map(nodes.map((node) => [node.node_id, node]));
|
|
1499
|
+
return nodes.filter(({ kind }) => kind === "native-addon").flatMap((node) => {
|
|
1500
|
+
const digest = artifactDigest(node);
|
|
1501
|
+
if (digest === null) return [];
|
|
1502
|
+
const linked = nativeEvidence.filter(({ subject }) => subject?.digest.sha256 === digest);
|
|
1503
|
+
const exportNodes = nativeExportNodes(node, edges, nodeById);
|
|
1504
|
+
return [{
|
|
1505
|
+
native_node_id: node.node_id,
|
|
1506
|
+
artifact_sha256: digest,
|
|
1507
|
+
artifact_path: artifactPath(node),
|
|
1508
|
+
export_node_ids: exportNodes.map(({ node_id: id }) => id),
|
|
1509
|
+
requested_exports: requestedExports(exportNodes),
|
|
1510
|
+
status: linked.length === 0 ? "requires-provider-analysis" : "evidence-linked",
|
|
1511
|
+
providers: uniqueProviders(linked),
|
|
1512
|
+
evidence_ids: linked.map(({ evidence_id: id }) => id).sort(compareUnicodeCodePoints),
|
|
1513
|
+
recommended_tools: [
|
|
1514
|
+
"open_binary",
|
|
1515
|
+
"binary_overview",
|
|
1516
|
+
"search_procedures",
|
|
1517
|
+
"analyze_function",
|
|
1518
|
+
"xrefs"
|
|
1519
|
+
]
|
|
1520
|
+
}];
|
|
1521
|
+
}).sort((left, right) => compareUnicodeCodePoints(left.native_node_id, right.native_node_id));
|
|
1522
|
+
};
|
|
1523
|
+
artifactDigest = (node) => {
|
|
1524
|
+
if (node.identity.strategy === "content-digest") return node.identity.sha256;
|
|
1525
|
+
const observation = node.observations.find(({ evidence }) => evidence.artifact.available);
|
|
1526
|
+
return observation?.evidence.artifact.available === true ? observation.evidence.artifact.sha256 : null;
|
|
1527
|
+
};
|
|
1528
|
+
artifactPath = (node) => {
|
|
1529
|
+
for (const { evidence } of node.observations) if (evidence.location.available && evidence.location.value.kind === "artifact-path") return evidence.location.value.path;
|
|
1530
|
+
return null;
|
|
1531
|
+
};
|
|
1532
|
+
nativeExportNodes = (addon, edges, nodeById) => {
|
|
1533
|
+
const ids = edges.flatMap((edge) => {
|
|
1534
|
+
if (edge.source_node_id === addon.node_id && ["contains", "exposes"].includes(edge.relation)) return [edge.target_node_id];
|
|
1535
|
+
if (edge.target_node_id === addon.node_id && ["imports", "loads"].includes(edge.relation)) return [edge.source_node_id];
|
|
1536
|
+
return [];
|
|
1537
|
+
});
|
|
1538
|
+
return [...new Set(ids)].map((id) => nodeById.get(id)).filter((node) => node?.kind === "native-export").sort((left, right) => compareUnicodeCodePoints(left.node_id, right.node_id));
|
|
1539
|
+
};
|
|
1540
|
+
requestedExports = (nodes) => {
|
|
1541
|
+
const values = nodes.flatMap((node) => node.observations.flatMap((observation) => [
|
|
1542
|
+
...observation.label === null || Array.isArray(observation.properties.requested_members) ? [] : [observation.label],
|
|
1543
|
+
...stringArray(observation.properties.requested_members),
|
|
1544
|
+
...stringArray(observation.properties.members)
|
|
1545
|
+
]));
|
|
1546
|
+
return [...new Set(values)].sort(compareUnicodeCodePoints);
|
|
1547
|
+
};
|
|
1548
|
+
stringArray = (value) => Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
|
|
1549
|
+
uniqueProviders = (evidence) => [...new Map(evidence.map(({ provider }) => [`${provider.id}\0${provider.name}\0${provider.version ?? ""}`, provider])).values()].sort((left, right) => compareUnicodeCodePoints(`${left.id}\0${left.name}\0${left.version ?? ""}`, `${right.id}\0${right.name}\0${right.version ?? ""}`));
|
|
1550
|
+
})))();
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
//#endregion
|
|
1554
|
+
//#region dist/domain/javascript/javascriptFeatureTrace.js
|
|
1555
|
+
var traceApplicationFeature, noMatchResult, traceGraph, traceGraphCoverage, terminalPaths, pathTo, isTerminal, factSummary, traceCoverageStatus, traceLimitations, sourceCoverageLimitations;
|
|
1556
|
+
function init_javascriptFeatureTrace() {
|
|
1557
|
+
return (init_javascriptFeatureTrace = __esmMin((() => {
|
|
1558
|
+
init_canonicalDigest();
|
|
1559
|
+
init_canonicalOrdering();
|
|
1560
|
+
init_unicodeCodePointOrder();
|
|
1561
|
+
init_javascriptApplicationGraph();
|
|
1562
|
+
init_javascriptFeatureTraceSchemas();
|
|
1563
|
+
init_javascriptFeatureSeed();
|
|
1564
|
+
init_javascriptFeatureTraversal();
|
|
1565
|
+
init_javascriptNativeHandoff();
|
|
1566
|
+
traceApplicationFeature = (input) => {
|
|
1567
|
+
const allSeedMatches = findApplicationFeatureSeeds(input.graph.nodes, input.seed);
|
|
1568
|
+
const seedMatches = allSeedMatches;
|
|
1569
|
+
if (seedMatches.length === 0) return noMatchResult(input);
|
|
1570
|
+
const traversal = traverseApplicationFeature(input.graph, seedMatches.map(({ node_id: id }) => id), input.direction);
|
|
1571
|
+
const graph = traceGraph(input, seedMatches, traversal);
|
|
1572
|
+
const paths = terminalPaths(traversal, seedMatches);
|
|
1573
|
+
const nativeHandoffs = buildJavaScriptNativeHandoffs(traversal.nodes, traversal.edges, input.nativeEvidence);
|
|
1574
|
+
const evidenceLinks = uniqueSorted([input.sourceEvidenceId, ...nativeHandoffs.flatMap(({ evidence_ids: ids }) => ids)]);
|
|
1575
|
+
const semantic = {
|
|
1576
|
+
source_evidence_id: input.sourceEvidenceId,
|
|
1577
|
+
source_graph_id: input.graph.graph_id,
|
|
1578
|
+
seed: input.seed,
|
|
1579
|
+
direction: input.direction,
|
|
1580
|
+
seed_matches: seedMatches,
|
|
1581
|
+
graph,
|
|
1582
|
+
paths,
|
|
1583
|
+
native_handoffs: nativeHandoffs,
|
|
1584
|
+
summary: {
|
|
1585
|
+
matched_seeds: seedMatches.length,
|
|
1586
|
+
traced_nodes: traversal.nodes.length,
|
|
1587
|
+
traced_edges: traversal.edges.length,
|
|
1588
|
+
terminal_paths: paths.length,
|
|
1589
|
+
native_handoffs: nativeHandoffs.length,
|
|
1590
|
+
...factSummary(traversal.nodes, traversal.edges)
|
|
1591
|
+
},
|
|
1592
|
+
coverage: {
|
|
1593
|
+
status: traceCoverageStatus(input.graph),
|
|
1594
|
+
source_graph_status: input.graph.coverage.status,
|
|
1595
|
+
total_seed_matches: allSeedMatches.length
|
|
1596
|
+
},
|
|
1597
|
+
evidence_links: evidenceLinks,
|
|
1598
|
+
limitations: traceLimitations(input.graph)
|
|
1599
|
+
};
|
|
1600
|
+
return applicationFeatureTraceResultSchema.parse({
|
|
1601
|
+
...semantic,
|
|
1602
|
+
trace_id: `jatr_${digestCanonicalValue(semantic, "Feature trace")}`
|
|
1603
|
+
});
|
|
1604
|
+
};
|
|
1605
|
+
noMatchResult = (input) => {
|
|
1606
|
+
const semantic = {
|
|
1607
|
+
source_evidence_id: input.sourceEvidenceId,
|
|
1608
|
+
source_graph_id: input.graph.graph_id,
|
|
1609
|
+
seed: input.seed,
|
|
1610
|
+
direction: input.direction,
|
|
1611
|
+
seed_matches: [],
|
|
1612
|
+
graph: null,
|
|
1613
|
+
paths: [],
|
|
1614
|
+
native_handoffs: [],
|
|
1615
|
+
summary: {
|
|
1616
|
+
matched_seeds: 0,
|
|
1617
|
+
traced_nodes: 0,
|
|
1618
|
+
traced_edges: 0,
|
|
1619
|
+
terminal_paths: 0,
|
|
1620
|
+
native_handoffs: 0,
|
|
1621
|
+
observed_facts: 0,
|
|
1622
|
+
inferred_facts: 0,
|
|
1623
|
+
unknown_facts: 0,
|
|
1624
|
+
unavailable_facts: 0
|
|
1625
|
+
},
|
|
1626
|
+
coverage: {
|
|
1627
|
+
status: "no-match",
|
|
1628
|
+
source_graph_status: input.graph.coverage.status,
|
|
1629
|
+
total_seed_matches: 0
|
|
1630
|
+
},
|
|
1631
|
+
evidence_links: [input.sourceEvidenceId],
|
|
1632
|
+
limitations: uniqueSorted(["No graph entity matched the literal seed; this is not evidence that the feature is absent.", ...sourceCoverageLimitations(input.graph)])
|
|
1633
|
+
};
|
|
1634
|
+
return applicationFeatureTraceResultSchema.parse({
|
|
1635
|
+
...semantic,
|
|
1636
|
+
trace_id: `jatr_${digestCanonicalValue(semantic, "Feature trace")}`
|
|
1637
|
+
});
|
|
1638
|
+
};
|
|
1639
|
+
traceGraph = (input, seedMatches, traversal) => {
|
|
1640
|
+
return createJavaScriptApplicationGraph({
|
|
1641
|
+
schema: "JavaScriptApplicationGraph",
|
|
1642
|
+
root_node_ids: uniqueSorted(seedMatches.map(({ node_id: id }) => id)),
|
|
1643
|
+
nodes: traversal.nodes,
|
|
1644
|
+
edges: traversal.edges,
|
|
1645
|
+
coverage: traceGraphCoverage(input.graph),
|
|
1646
|
+
limitations: uniqueSorted([...input.graph.limitations, "Trace edges retain their source authority; graph connectivity does not prove runtime execution or reachability."])
|
|
1647
|
+
});
|
|
1648
|
+
};
|
|
1649
|
+
traceGraphCoverage = (source) => {
|
|
1650
|
+
return source.coverage.status === "complete" ? {
|
|
1651
|
+
status: "complete",
|
|
1652
|
+
truncated: false,
|
|
1653
|
+
omitted_count: 0,
|
|
1654
|
+
limits: []
|
|
1655
|
+
} : source.coverage;
|
|
1656
|
+
};
|
|
1657
|
+
terminalPaths = (traversal, seeds) => {
|
|
1658
|
+
const seedIds = new Set(seeds.map(({ node_id: id }) => id));
|
|
1659
|
+
const edgeById = new Map(traversal.edges.map((edge) => [edge.edge_id, edge]));
|
|
1660
|
+
return traversal.nodes.filter((node) => isTerminal(node) && (!seedIds.has(node.node_id) || traversal.nodes.length === 1)).map((node) => pathTo(node, traversal.predecessors, edgeById)).filter((path) => path !== null).sort((left, right) => compareUnicodeCodePoints(left.path_id, right.path_id));
|
|
1661
|
+
};
|
|
1662
|
+
pathTo = (node, predecessors, edgeById) => {
|
|
1663
|
+
const nodeIds = [node.node_id];
|
|
1664
|
+
const edgeIds = [];
|
|
1665
|
+
let current = node.node_id;
|
|
1666
|
+
while (predecessors.has(current)) {
|
|
1667
|
+
const predecessor = predecessors.get(current);
|
|
1668
|
+
if (predecessor === undefined) break;
|
|
1669
|
+
nodeIds.push(predecessor.previousNodeId);
|
|
1670
|
+
edgeIds.push(predecessor.edgeId);
|
|
1671
|
+
current = predecessor.previousNodeId;
|
|
1672
|
+
}
|
|
1673
|
+
nodeIds.reverse();
|
|
1674
|
+
edgeIds.reverse();
|
|
1675
|
+
const edges = edgeIds.map((edgeId) => edgeById.get(edgeId)).filter((edge) => edge !== undefined);
|
|
1676
|
+
if (edges.length !== edgeIds.length) return null;
|
|
1677
|
+
const semantic = {
|
|
1678
|
+
start_node_id: nodeIds[0] ?? node.node_id,
|
|
1679
|
+
end_node_id: node.node_id,
|
|
1680
|
+
end_kind: node.kind,
|
|
1681
|
+
node_ids: nodeIds,
|
|
1682
|
+
edge_ids: edgeIds,
|
|
1683
|
+
authorities: uniqueSorted(edges.map(({ evidence }) => evidence.authority)),
|
|
1684
|
+
contains_inference: edges.some(({ evidence }) => evidence.state === "inferred")
|
|
1685
|
+
};
|
|
1686
|
+
return {
|
|
1687
|
+
...semantic,
|
|
1688
|
+
path_id: `jatp_${digestCanonicalValue(semantic, "Feature trace")}`
|
|
1689
|
+
};
|
|
1690
|
+
};
|
|
1691
|
+
isTerminal = (node) => [
|
|
1692
|
+
"endpoint",
|
|
1693
|
+
"storage",
|
|
1694
|
+
"native-addon",
|
|
1695
|
+
"native-export",
|
|
1696
|
+
"unknown"
|
|
1697
|
+
].includes(node.kind) || node.kind === "javascript-expression" && node.observations.some((o) => o.properties.step_kind === "terminal");
|
|
1698
|
+
factSummary = (nodes, edges) => {
|
|
1699
|
+
const states = [...nodes.flatMap(({ observations }) => observations.map(({ evidence }) => evidence.state)), ...edges.map(({ evidence }) => evidence.state)];
|
|
1700
|
+
return {
|
|
1701
|
+
observed_facts: states.filter((state) => state === "observed").length,
|
|
1702
|
+
inferred_facts: states.filter((state) => state === "inferred").length,
|
|
1703
|
+
unknown_facts: states.filter((state) => state === "unknown").length,
|
|
1704
|
+
unavailable_facts: states.filter((state) => state === "unavailable").length
|
|
1705
|
+
};
|
|
1706
|
+
};
|
|
1707
|
+
traceCoverageStatus = (graph) => graph.coverage.status === "complete" ? "complete-within-source" : "partial";
|
|
1708
|
+
traceLimitations = (graph) => uniqueSorted([
|
|
1709
|
+
"A trace reports graph relationships, not proof that code executed or that a feature is reachable in every state.",
|
|
1710
|
+
"Static, native, passive-runtime, inferred, and unknown facts retain their original authority in the returned graph.",
|
|
1711
|
+
"Native handoffs never open a binary or invoke a provider automatically; snapshot reuse remains provider/profile/target exact.",
|
|
1712
|
+
...sourceCoverageLimitations(graph)
|
|
1713
|
+
]);
|
|
1714
|
+
sourceCoverageLimitations = (graph) => graph.coverage.status === "complete" ? [] : ["The source application graph is incomplete; unmatched seeds and frontiers remain unknown."];
|
|
1715
|
+
})))();
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
//#endregion
|
|
1719
|
+
//#region dist/domain/javascript/sourceToBundleSignals.js
|
|
1720
|
+
var RELEVANT_NODE_KINDS, PATH_PROPERTIES, signalWeight, sourceBearingNodes, historicalSourceFiles, buildSourceToBundleCandidateIndex, candidateIdsForSource, candidateHasDigest, scoreSourceToBundleCandidate, projectCurrentNode, candidateSignals, signal, candidateConfidence, matchingPaths, addJsonPath, addPath, SCHEME_URL, SCHEME_URL_PREFIX, normalizeCurrentPath, uniquePaths, pathSuffixes, addIndexValue;
|
|
1721
|
+
function init_sourceToBundleSignals() {
|
|
1722
|
+
return (init_sourceToBundleSignals = __esmMin((() => {
|
|
1723
|
+
init_unicodeCodePointOrder();
|
|
1724
|
+
init_sourceToBundleComparisonSchemas();
|
|
1725
|
+
init_digests();
|
|
1726
|
+
RELEVANT_NODE_KINDS = new Set([
|
|
1727
|
+
"javascript-asset",
|
|
1728
|
+
"javascript-module",
|
|
1729
|
+
"source-module"
|
|
1730
|
+
]);
|
|
1731
|
+
PATH_PROPERTIES = [
|
|
1732
|
+
"path",
|
|
1733
|
+
"source",
|
|
1734
|
+
"original_source",
|
|
1735
|
+
"module_path",
|
|
1736
|
+
"resolved_path",
|
|
1737
|
+
"declared_path"
|
|
1738
|
+
];
|
|
1739
|
+
signalWeight = (kind) => {
|
|
1740
|
+
const entry = SOURCE_TO_BUNDLE_SIGNAL_WEIGHTS.find(([signal]) => signal === kind);
|
|
1741
|
+
if (entry === undefined) throw new TypeError(`Missing source-to-bundle signal weight: ${kind}`);
|
|
1742
|
+
return entry[1];
|
|
1743
|
+
};
|
|
1744
|
+
sourceBearingNodes = (nodes) => nodes.filter(({ kind }) => RELEVANT_NODE_KINDS.has(kind)).sort((left, right) => compareUnicodeCodePoints(left.node_id, right.node_id));
|
|
1745
|
+
historicalSourceFiles = (graph) => graph.entries.filter((entry) => entry.kind === "file" && entry.classifications.includes("source")).sort((left, right) => compareUnicodeCodePoints(left.path, right.path));
|
|
1746
|
+
buildSourceToBundleCandidateIndex = (nodes) => {
|
|
1747
|
+
const projections = nodes.map(projectCurrentNode);
|
|
1748
|
+
const byDigest = new Map();
|
|
1749
|
+
const byPathSuffix = new Map();
|
|
1750
|
+
const byBasename = new Map();
|
|
1751
|
+
for (const projection of projections) {
|
|
1752
|
+
for (const digest of projection.digests) addIndexValue(byDigest, digest, projection.node.node_id);
|
|
1753
|
+
for (const path of projection.paths) {
|
|
1754
|
+
for (const suffix of path.allowSuffix ? pathSuffixes(path.value) : [path.value]) addIndexValue(byPathSuffix, suffix, projection.node.node_id);
|
|
1755
|
+
addIndexValue(byBasename, posix.basename(path.value), projection.node.node_id);
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
return {
|
|
1759
|
+
nodes: new Map(projections.map((projection) => [projection.node.node_id, projection])),
|
|
1760
|
+
byDigest,
|
|
1761
|
+
byPathSuffix,
|
|
1762
|
+
byBasename
|
|
1763
|
+
};
|
|
1764
|
+
};
|
|
1765
|
+
candidateIdsForSource = (source, index) => {
|
|
1766
|
+
const groups = [
|
|
1767
|
+
source.sha256 === null ? undefined : index.byDigest.get(source.sha256),
|
|
1768
|
+
index.byPathSuffix.get(source.path),
|
|
1769
|
+
index.byBasename.get(posix.basename(source.path))
|
|
1770
|
+
];
|
|
1771
|
+
const seen = new Set();
|
|
1772
|
+
const output = [];
|
|
1773
|
+
for (const group of groups) {
|
|
1774
|
+
if (group === undefined) continue;
|
|
1775
|
+
for (const nodeId of [...group].sort(compareUnicodeCodePoints)) {
|
|
1776
|
+
if (seen.has(nodeId)) continue;
|
|
1777
|
+
seen.add(nodeId);
|
|
1778
|
+
output.push(nodeId);
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
return output;
|
|
1782
|
+
};
|
|
1783
|
+
candidateHasDigest = (index, nodeId) => (index.nodes.get(nodeId)?.digests.size ?? 0) > 0;
|
|
1784
|
+
scoreSourceToBundleCandidate = (source, nodeId, index) => {
|
|
1785
|
+
const projection = index.nodes.get(nodeId);
|
|
1786
|
+
if (projection === undefined) return null;
|
|
1787
|
+
const signals = candidateSignals(source, projection);
|
|
1788
|
+
const score = signals.reduce((total, signal) => total + signal.weight, 0);
|
|
1789
|
+
if (score < 20) return null;
|
|
1790
|
+
return {
|
|
1791
|
+
current_node_id: projection.node.node_id,
|
|
1792
|
+
current_node_kind: projection.node.kind,
|
|
1793
|
+
score,
|
|
1794
|
+
confidence: candidateConfidence(signals),
|
|
1795
|
+
signals
|
|
1796
|
+
};
|
|
1797
|
+
};
|
|
1798
|
+
projectCurrentNode = (node) => {
|
|
1799
|
+
const digests = new Set();
|
|
1800
|
+
const paths = [];
|
|
1801
|
+
if (node.identity.strategy === "content-digest") digests.add(node.identity.sha256);
|
|
1802
|
+
if (node.identity.strategy === "source-map-original") {
|
|
1803
|
+
if (node.identity.source_sha256 !== null) digests.add(node.identity.source_sha256);
|
|
1804
|
+
}
|
|
1805
|
+
if (node.identity.strategy === "canonical-path") addPath(paths, "canonical-path", node.identity.path);
|
|
1806
|
+
for (const observation of node.observations) {
|
|
1807
|
+
if (node.identity.strategy === "source-map-original") {
|
|
1808
|
+
const resolution = observation.source_map_reference?.resolution;
|
|
1809
|
+
if (resolution !== undefined && resolution.kind !== "unresolved") paths.push({
|
|
1810
|
+
kind: "source-map-original",
|
|
1811
|
+
value: resolution.path,
|
|
1812
|
+
allowSuffix: resolution.kind === "suffix"
|
|
1813
|
+
});
|
|
1814
|
+
} else {
|
|
1815
|
+
const sourceDigest = observation.properties.source_sha256;
|
|
1816
|
+
if (typeof sourceDigest === "string" && isDigest(sourceDigest)) digests.add(sourceDigest);
|
|
1817
|
+
for (const key of PATH_PROPERTIES) addJsonPath(paths, observation.properties[key]);
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
return {
|
|
1821
|
+
node,
|
|
1822
|
+
digests,
|
|
1823
|
+
paths: uniquePaths(paths)
|
|
1824
|
+
};
|
|
1825
|
+
};
|
|
1826
|
+
candidateSignals = (source, current) => {
|
|
1827
|
+
const signals = [];
|
|
1828
|
+
if (source.sha256 !== null && current.digests.has(source.sha256)) signals.push(signal("exact-source-digest", source.sha256, [source.sha256]));
|
|
1829
|
+
const sourceMapPaths = matchingPaths(source.path, current.paths.filter(({ kind }) => kind === "source-map-original"));
|
|
1830
|
+
if (sourceMapPaths.length > 0) signals.push(signal("source-map-original-path", source.path, sourceMapPaths));
|
|
1831
|
+
const otherPaths = current.paths.filter(({ kind }) => kind !== "source-map-original");
|
|
1832
|
+
const exactPaths = otherPaths.filter(({ value }) => value === source.path).map(({ value }) => value);
|
|
1833
|
+
if (exactPaths.length > 0) signals.push(signal("current-path-exact", source.path, exactPaths));
|
|
1834
|
+
const suffixPaths = otherPaths.filter(({ value, allowSuffix }) => allowSuffix && value !== source.path && value.endsWith(`/${source.path}`)).map(({ value }) => value);
|
|
1835
|
+
if (suffixPaths.length > 0) signals.push(signal("current-path-suffix", source.path, suffixPaths));
|
|
1836
|
+
const basename = posix.basename(source.path);
|
|
1837
|
+
const basenamePaths = current.paths.filter(({ value }) => posix.basename(value) === basename).map(({ value }) => value);
|
|
1838
|
+
if (basenamePaths.length > 0) signals.push(signal("basename-match", basename, basenamePaths));
|
|
1839
|
+
const extension = posix.extname(source.path).toLowerCase();
|
|
1840
|
+
const extensionPaths = current.paths.filter(({ value }) => posix.extname(value).toLowerCase() === extension).map(({ value }) => value);
|
|
1841
|
+
if (extension !== "" && extensionPaths.length > 0) signals.push(signal("language-extension", extension, extensionPaths));
|
|
1842
|
+
return signals;
|
|
1843
|
+
};
|
|
1844
|
+
signal = (kind, sourceValue, currentValues) => ({
|
|
1845
|
+
kind,
|
|
1846
|
+
weight: signalWeight(kind),
|
|
1847
|
+
source_value: sourceValue,
|
|
1848
|
+
current_values: [...new Set(currentValues)].sort(compareUnicodeCodePoints)
|
|
1849
|
+
});
|
|
1850
|
+
candidateConfidence = (signals) => {
|
|
1851
|
+
const kinds = new Set(signals.map(({ kind }) => kind));
|
|
1852
|
+
if (kinds.has("exact-source-digest")) return "exact";
|
|
1853
|
+
if (kinds.has("source-map-original-path") || kinds.has("current-path-exact")) return "high";
|
|
1854
|
+
return kinds.has("current-path-suffix") ? "medium" : "low";
|
|
1855
|
+
};
|
|
1856
|
+
matchingPaths = (sourcePath, currentPaths) => currentPaths.filter(({ value, allowSuffix }) => value === sourcePath || allowSuffix && value.endsWith(`/${sourcePath}`)).map(({ value }) => value);
|
|
1857
|
+
addJsonPath = (paths, value) => {
|
|
1858
|
+
if (typeof value === "string") addPath(paths, "observation-path", value);
|
|
1859
|
+
};
|
|
1860
|
+
addPath = (paths, kind, raw) => {
|
|
1861
|
+
const value = normalizeCurrentPath(raw);
|
|
1862
|
+
if (value !== null) paths.push({
|
|
1863
|
+
kind,
|
|
1864
|
+
value,
|
|
1865
|
+
allowSuffix: true
|
|
1866
|
+
});
|
|
1867
|
+
};
|
|
1868
|
+
SCHEME_URL = /^[a-z][a-z0-9+.-]*:\/\//iu;
|
|
1869
|
+
SCHEME_URL_PREFIX = /^[a-z][a-z0-9+.-]*:\/\/+/iu;
|
|
1870
|
+
normalizeCurrentPath = (raw) => {
|
|
1871
|
+
const withoutQuery = SCHEME_URL.test(raw) ? raw.split(/[?#]/u, 1)[0] ?? "" : raw;
|
|
1872
|
+
const portable = withoutQuery.replace(SCHEME_URL_PREFIX, "").replaceAll("\\", "/");
|
|
1873
|
+
const parts = [];
|
|
1874
|
+
for (const part of portable.split("/")) {
|
|
1875
|
+
if (part === "" || part === ".") continue;
|
|
1876
|
+
if (part === "..") {
|
|
1877
|
+
if (parts.length === 0) return null;
|
|
1878
|
+
parts.pop();
|
|
1879
|
+
} else parts.push(part);
|
|
1880
|
+
}
|
|
1881
|
+
if (parts.length === 0) return null;
|
|
1882
|
+
return parts.join("/");
|
|
1883
|
+
};
|
|
1884
|
+
uniquePaths = (paths) => [...new Map(paths.map((path) => [compositeKey([
|
|
1885
|
+
path.kind,
|
|
1886
|
+
path.value,
|
|
1887
|
+
String(path.allowSuffix)
|
|
1888
|
+
]), path])).values()].sort((left, right) => compareUnicodeCodePoints(compositeKey([left.kind, left.value]), compositeKey([right.kind, right.value])));
|
|
1889
|
+
pathSuffixes = (path) => {
|
|
1890
|
+
const parts = path.split("/");
|
|
1891
|
+
return parts.map((_, index) => parts.slice(index).join("/"));
|
|
1892
|
+
};
|
|
1893
|
+
addIndexValue = (index, key, nodeId) => {
|
|
1894
|
+
const values = index.get(key) ?? new Set();
|
|
1895
|
+
values.add(nodeId);
|
|
1896
|
+
index.set(key, values);
|
|
1897
|
+
};
|
|
1898
|
+
})))();
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
//#endregion
|
|
1902
|
+
//#region dist/domain/javascript/sourceToBundleComparison.js
|
|
1903
|
+
var compareSourceToBundle, projectComparison, compareMappings, comparisonCoverage, scoringModel, classifyMapping, markMergedMappings, mappingId, comparisonSummary, countStatus, coverageStatus, comparisonLimitations, hasSignal, compareCandidates;
|
|
1904
|
+
function init_sourceToBundleComparison() {
|
|
1905
|
+
return (init_sourceToBundleComparison = __esmMin((() => {
|
|
1906
|
+
init_canonicalOrdering();
|
|
1907
|
+
init_unicodeCodePointOrder();
|
|
1908
|
+
init_comparisonSemantics();
|
|
1909
|
+
init_canonicalDigest();
|
|
1910
|
+
init_sourceToBundleComparisonSchemas();
|
|
1911
|
+
init_sourceToBundleSignals();
|
|
1912
|
+
compareSourceToBundle = (input) => {
|
|
1913
|
+
const projection = projectComparison(input);
|
|
1914
|
+
const mappings = compareMappings(input, projection);
|
|
1915
|
+
const factors = { ...projection.factors };
|
|
1916
|
+
const mappedCurrentIds = new Set(mappings.items.flatMap(({ current_node_ids: nodeIds }) => nodeIds));
|
|
1917
|
+
const unmappedCurrentNodeIds = projection.currentNodes.map(({ node_id: nodeId }) => nodeId).filter((nodeId) => !mappedCurrentIds.has(nodeId));
|
|
1918
|
+
const semanticResult = {
|
|
1919
|
+
reference: {
|
|
1920
|
+
root_sha256: input.reference.root_sha256,
|
|
1921
|
+
inventory_state: input.reference.inventory_state
|
|
1922
|
+
},
|
|
1923
|
+
application: {
|
|
1924
|
+
evidence_id: input.application.evidenceId,
|
|
1925
|
+
graph_id: input.application.graph.graph_id,
|
|
1926
|
+
root_artifact_sha256: input.application.rootArtifactSha256
|
|
1927
|
+
},
|
|
1928
|
+
scoring: scoringModel(),
|
|
1929
|
+
summary: comparisonSummary(mappings.items),
|
|
1930
|
+
items: mappings.items,
|
|
1931
|
+
unmapped_current_node_ids: unmappedCurrentNodeIds,
|
|
1932
|
+
coverage: comparisonCoverage(projection, mappings, factors),
|
|
1933
|
+
evidence_links: [input.application.evidenceId],
|
|
1934
|
+
limitations: comparisonLimitations(factors)
|
|
1935
|
+
};
|
|
1936
|
+
return sourceToBundleComparisonResultSchema.parse({
|
|
1937
|
+
...semanticResult,
|
|
1938
|
+
comparison_id: `stbc_${digestCanonicalValue(semanticResult, "Source-to-bundle comparison")}`
|
|
1939
|
+
});
|
|
1940
|
+
};
|
|
1941
|
+
projectComparison = (input) => {
|
|
1942
|
+
const allSources = historicalSourceFiles(input.reference);
|
|
1943
|
+
const allCurrentNodes = sourceBearingNodes(input.application.graph.nodes);
|
|
1944
|
+
const sources = allSources;
|
|
1945
|
+
const currentNodes = allCurrentNodes;
|
|
1946
|
+
const index = buildSourceToBundleCandidateIndex(currentNodes);
|
|
1947
|
+
return {
|
|
1948
|
+
sources,
|
|
1949
|
+
currentNodes,
|
|
1950
|
+
index,
|
|
1951
|
+
absenceComplete: input.reference.inventory_state === "complete" && absenceClaimable(input.application.graph.coverage),
|
|
1952
|
+
factors: { input }
|
|
1953
|
+
};
|
|
1954
|
+
};
|
|
1955
|
+
compareMappings = (input, projection) => {
|
|
1956
|
+
let candidateEvaluations = 0;
|
|
1957
|
+
const provisionalItems = [];
|
|
1958
|
+
for (const source of projection.sources) {
|
|
1959
|
+
const candidateIds = candidateIdsForSource(source, projection.index);
|
|
1960
|
+
candidateEvaluations += candidateIds.length;
|
|
1961
|
+
const scored = candidateIds.map((nodeId) => scoreSourceToBundleCandidate(source, nodeId, projection.index)).filter((candidate) => candidate !== null).sort(compareCandidates);
|
|
1962
|
+
const classification = classifyMapping(scored, projection.absenceComplete, (nodeId) => source.sha256 !== null && candidateHasDigest(projection.index, nodeId));
|
|
1963
|
+
const semantic = {
|
|
1964
|
+
source_path: source.path,
|
|
1965
|
+
source_sha256: source.sha256,
|
|
1966
|
+
source_language: source.language,
|
|
1967
|
+
status: classification.status,
|
|
1968
|
+
confidence: classification.confidence,
|
|
1969
|
+
current_node_ids: classification.currentNodeIds,
|
|
1970
|
+
candidates: scored,
|
|
1971
|
+
limitations: uniqueSorted([...source.limitations, ...classification.limitations])
|
|
1972
|
+
};
|
|
1973
|
+
provisionalItems.push({
|
|
1974
|
+
mapping_id: mappingId(input, semantic),
|
|
1975
|
+
...semantic
|
|
1976
|
+
});
|
|
1977
|
+
}
|
|
1978
|
+
return {
|
|
1979
|
+
items: markMergedMappings(input, provisionalItems),
|
|
1980
|
+
candidateEvaluations
|
|
1981
|
+
};
|
|
1982
|
+
};
|
|
1983
|
+
comparisonCoverage = (projection, mappings, factors) => ({
|
|
1984
|
+
status: coverageStatus(factors),
|
|
1985
|
+
reference_inventory_state: factors.input.reference.inventory_state,
|
|
1986
|
+
application_graph_status: factors.input.application.graph.coverage.status,
|
|
1987
|
+
retained_source_files: projection.sources.length,
|
|
1988
|
+
retained_application_nodes: projection.currentNodes.length,
|
|
1989
|
+
candidate_evaluations: mappings.candidateEvaluations
|
|
1990
|
+
});
|
|
1991
|
+
scoringModel = () => ({
|
|
1992
|
+
algorithm: "rea-source-to-bundle-signals",
|
|
1993
|
+
minimum_candidate_score: 20,
|
|
1994
|
+
weights: SOURCE_TO_BUNDLE_SIGNAL_WEIGHTS.map(([signal, weight]) => ({
|
|
1995
|
+
signal,
|
|
1996
|
+
weight
|
|
1997
|
+
}))
|
|
1998
|
+
});
|
|
1999
|
+
classifyMapping = (candidates, absenceComplete, digestComparable) => {
|
|
2000
|
+
const exact = candidates.filter((candidate) => hasSignal(candidate, "exact-source-digest"));
|
|
2001
|
+
if (exact.length === 1) return {
|
|
2002
|
+
status: "unchanged",
|
|
2003
|
+
confidence: "exact",
|
|
2004
|
+
currentNodeIds: [exact[0]?.current_node_id ?? ""].filter(Boolean),
|
|
2005
|
+
limitations: ["Exact byte identity does not establish equivalent load context or runtime behavior."]
|
|
2006
|
+
};
|
|
2007
|
+
if (exact.length > 1) return {
|
|
2008
|
+
status: "duplicated",
|
|
2009
|
+
confidence: "exact",
|
|
2010
|
+
currentNodeIds: exact.map(({ current_node_id: nodeId }) => nodeId),
|
|
2011
|
+
limitations: ["The same historical source digest occurs in multiple current graph nodes."]
|
|
2012
|
+
};
|
|
2013
|
+
const pathCandidates = candidates.filter((candidate) => candidate.signals.some(({ kind }) => [
|
|
2014
|
+
"source-map-original-path",
|
|
2015
|
+
"current-path-exact",
|
|
2016
|
+
"current-path-suffix"
|
|
2017
|
+
].includes(kind)));
|
|
2018
|
+
const topScore = pathCandidates[0]?.score;
|
|
2019
|
+
const topPathCandidates = topScore === undefined ? [] : pathCandidates.filter(({ score }) => score === topScore);
|
|
2020
|
+
if (topPathCandidates.length === 1) {
|
|
2021
|
+
const candidate = topPathCandidates[0];
|
|
2022
|
+
if (candidate !== undefined && digestComparable(candidate.current_node_id)) return {
|
|
2023
|
+
status: "modified",
|
|
2024
|
+
confidence: candidate.confidence === "high" ? "high" : "medium",
|
|
2025
|
+
currentNodeIds: [candidate.current_node_id],
|
|
2026
|
+
limitations: ["Location evidence links the source to the current node, but their source digests differ."]
|
|
2027
|
+
};
|
|
2028
|
+
return {
|
|
2029
|
+
status: "unknown",
|
|
2030
|
+
confidence: "unknown",
|
|
2031
|
+
currentNodeIds: candidate === undefined ? [] : [candidate.current_node_id],
|
|
2032
|
+
limitations: ["Location evidence links the source to the current node, but comparable source digests are unavailable."]
|
|
2033
|
+
};
|
|
2034
|
+
}
|
|
2035
|
+
if (topPathCandidates.length > 1) return {
|
|
2036
|
+
status: "split",
|
|
2037
|
+
confidence: "medium",
|
|
2038
|
+
currentNodeIds: topPathCandidates.map(({ current_node_id: nodeId }) => nodeId),
|
|
2039
|
+
limitations: ["Multiple equally scored current nodes retain the historical source path; this is a static split inference, not runtime proof."]
|
|
2040
|
+
};
|
|
2041
|
+
if (candidates.length > 0) return {
|
|
2042
|
+
status: "unknown",
|
|
2043
|
+
confidence: "unknown",
|
|
2044
|
+
currentNodeIds: [],
|
|
2045
|
+
limitations: ["Only weak basename or extension signals were available; no mapping was forced."]
|
|
2046
|
+
};
|
|
2047
|
+
return absenceComplete ? {
|
|
2048
|
+
status: "removed",
|
|
2049
|
+
confidence: "high",
|
|
2050
|
+
currentNodeIds: [],
|
|
2051
|
+
limitations: ["No retained current node matched exact digest or path signals within complete static inventories."]
|
|
2052
|
+
} : {
|
|
2053
|
+
status: "unknown",
|
|
2054
|
+
confidence: "unknown",
|
|
2055
|
+
currentNodeIds: [],
|
|
2056
|
+
limitations: ["No candidate was observed, but incomplete input or graph coverage prevents a removal claim."]
|
|
2057
|
+
};
|
|
2058
|
+
};
|
|
2059
|
+
markMergedMappings = (input, items) => {
|
|
2060
|
+
const sourcesByNode = new Map();
|
|
2061
|
+
for (const item of items) {
|
|
2062
|
+
if (item.status !== "unchanged" || item.current_node_ids.length !== 1) continue;
|
|
2063
|
+
const nodeId = item.current_node_ids[0];
|
|
2064
|
+
if (nodeId === undefined) continue;
|
|
2065
|
+
sourcesByNode.set(nodeId, [...sourcesByNode.get(nodeId) ?? [], item]);
|
|
2066
|
+
}
|
|
2067
|
+
const mergedSources = new Set([...sourcesByNode.values()].filter((group) => group.length > 1).flatMap((group) => group.map(({ source_path: path }) => path)));
|
|
2068
|
+
return items.map((item) => {
|
|
2069
|
+
if (!mergedSources.has(item.source_path)) return item;
|
|
2070
|
+
const { mapping_id: previousMappingId, ...base } = item;
|
|
2071
|
+
void previousMappingId;
|
|
2072
|
+
const semantic = {
|
|
2073
|
+
...base,
|
|
2074
|
+
status: "merged",
|
|
2075
|
+
confidence: "exact",
|
|
2076
|
+
limitations: uniqueSorted([...item.limitations, "Multiple historical source paths have exact digest identity with the same current graph node."])
|
|
2077
|
+
};
|
|
2078
|
+
return {
|
|
2079
|
+
...semantic,
|
|
2080
|
+
mapping_id: mappingId(input, semantic)
|
|
2081
|
+
};
|
|
2082
|
+
});
|
|
2083
|
+
};
|
|
2084
|
+
mappingId = (input, item) => `stbc_item_${digestCanonicalValue({
|
|
2085
|
+
reference_root_sha256: input.reference.root_sha256,
|
|
2086
|
+
application_graph_id: input.application.graph.graph_id,
|
|
2087
|
+
...item
|
|
2088
|
+
}, "Source-to-bundle comparison")}`;
|
|
2089
|
+
comparisonSummary = (items) => ({
|
|
2090
|
+
unchanged: countStatus(items, "unchanged"),
|
|
2091
|
+
modified: countStatus(items, "modified"),
|
|
2092
|
+
removed: countStatus(items, "removed"),
|
|
2093
|
+
split: countStatus(items, "split"),
|
|
2094
|
+
merged: countStatus(items, "merged"),
|
|
2095
|
+
duplicated: countStatus(items, "duplicated"),
|
|
2096
|
+
unknown: countStatus(items, "unknown")
|
|
2097
|
+
});
|
|
2098
|
+
countStatus = (items, status) => items.filter((item) => item.status === status).length;
|
|
2099
|
+
coverageStatus = (factors) => {
|
|
2100
|
+
return factors.input.reference.inventory_state === "complete" && factors.input.application.graph.coverage.status === "complete" ? "complete-within-inputs" : "partial";
|
|
2101
|
+
};
|
|
2102
|
+
comparisonLimitations = (factors) => uniqueSorted([
|
|
2103
|
+
"Static digest and location signals do not establish runtime behavior, semantic equivalence, or absence of dynamically generated modules.",
|
|
2104
|
+
...factors.input.reference.limitations,
|
|
2105
|
+
...factors.input.application.graph.limitations,
|
|
2106
|
+
...factors.input.reference.inventory_state === "complete" ? [] : [`Historical source inventory is ${factors.input.reference.inventory_state}; unmatched files remain unknown.`],
|
|
2107
|
+
...factors.input.application.graph.coverage.status === "complete" ? [] : [`Application graph coverage is ${factors.input.application.graph.coverage.status}; unmatched files remain unknown.`]
|
|
2108
|
+
]);
|
|
2109
|
+
hasSignal = (candidate, kind) => candidate.signals.some((signal) => signal.kind === kind);
|
|
2110
|
+
compareCandidates = (left, right) => right.score - left.score || compareUnicodeCodePoints(left.current_node_id, right.current_node_id);
|
|
2111
|
+
})))();
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
//#endregion
|
|
2115
|
+
//#region dist/application/javascript/JavaScriptApplicationWorkflowService.js
|
|
2116
|
+
var traceApplicationFeatureEvidence, traceApplicationFeatureEvidenceValidated, compareApplicationVersionsEvidence, compareApplicationVersionsEvidenceValidated, compareSourceToBundleEvidenceValidated, compareJavaScriptExportShapesEvidence, compareJavaScriptExportShapesEvidenceValidated, workflowFailure;
|
|
2117
|
+
function init_JavaScriptApplicationWorkflowService() {
|
|
2118
|
+
return (init_JavaScriptApplicationWorkflowService = __esmMin((() => {
|
|
2119
|
+
init_analysisErrorCore();
|
|
2120
|
+
init_inputIssueProjection();
|
|
2121
|
+
init_javascriptApplicationVersionComparison();
|
|
2122
|
+
init_javascriptApplicationVersionComparisonSchemas();
|
|
2123
|
+
init_javascriptExportShapeComparison();
|
|
2124
|
+
init_javascriptExportShapeComparisonSchemas();
|
|
2125
|
+
init_javascriptFeatureTrace();
|
|
2126
|
+
init_javascriptFeatureTraceSchemas();
|
|
2127
|
+
init_result();
|
|
2128
|
+
init_sourceToBundleComparison();
|
|
2129
|
+
init_sourceToBundleComparisonSchemas();
|
|
2130
|
+
init_JavaScriptApplicationEvidenceGraph();
|
|
2131
|
+
init_JavaScriptApplicationWorkflowEvidence();
|
|
2132
|
+
traceApplicationFeatureEvidence = (rawInput) => {
|
|
2133
|
+
const operation = "trace_application_feature";
|
|
2134
|
+
const parsed = traceApplicationFeatureInputSchema.safeParse(rawInput);
|
|
2135
|
+
if (!parsed.success) return err(analysisInputErrorFromIssues(operation, parsed.error.issues, rawInput));
|
|
2136
|
+
return traceApplicationFeatureEvidenceValidated(parsed.data);
|
|
2137
|
+
};
|
|
2138
|
+
traceApplicationFeatureEvidenceValidated = (input) => {
|
|
2139
|
+
const operation = "trace_application_feature";
|
|
2140
|
+
const identities = applicationTraceIdentitiesSchema.safeParse(input);
|
|
2141
|
+
if (!identities.success) return err(analysisInputErrorFromIssues(operation, identities.error.issues, input));
|
|
2142
|
+
const sourceResult = parseApplicationGraphEvidence(input.application, ["application"]);
|
|
2143
|
+
if (!sourceResult.ok) return err(applicationGraphEvidenceInputError(operation, sourceResult.error));
|
|
2144
|
+
const nativeResult = parseNativeApplicationEvidence(input.native_observations, ["native_observations"]);
|
|
2145
|
+
if (!nativeResult.ok) return err(applicationGraphEvidenceInputError(operation, nativeResult.error));
|
|
2146
|
+
try {
|
|
2147
|
+
const source = sourceResult.value;
|
|
2148
|
+
const nativeEvidence = nativeResult.value;
|
|
2149
|
+
const result = traceApplicationFeature({
|
|
2150
|
+
sourceEvidenceId: source.evidence.evidence_id,
|
|
2151
|
+
graph: source.graph,
|
|
2152
|
+
nativeEvidence,
|
|
2153
|
+
seed: input.seed,
|
|
2154
|
+
direction: input.direction
|
|
2155
|
+
});
|
|
2156
|
+
return ok(createApplicationFeatureTraceEvidence({
|
|
2157
|
+
application_evidence_id: source.evidence.evidence_id,
|
|
2158
|
+
native_evidence_ids: nativeEvidence.map(({ evidence_id: id }) => id),
|
|
2159
|
+
seed: input.seed,
|
|
2160
|
+
direction: input.direction
|
|
2161
|
+
}, result));
|
|
2162
|
+
} catch (cause) {
|
|
2163
|
+
return workflowFailure(operation, cause);
|
|
2164
|
+
}
|
|
2165
|
+
};
|
|
2166
|
+
compareApplicationVersionsEvidence = (rawInput) => {
|
|
2167
|
+
const operation = "compare_application_versions";
|
|
2168
|
+
const parsed = compareApplicationVersionsInputSchema.safeParse(rawInput);
|
|
2169
|
+
if (!parsed.success) return err(analysisInputErrorFromIssues(operation, parsed.error.issues, rawInput));
|
|
2170
|
+
return compareApplicationVersionsEvidenceValidated(parsed.data);
|
|
2171
|
+
};
|
|
2172
|
+
compareApplicationVersionsEvidenceValidated = (input) => {
|
|
2173
|
+
const operation = "compare_application_versions";
|
|
2174
|
+
const identities = applicationVersionIdentitiesSchema.safeParse(input);
|
|
2175
|
+
if (!identities.success) return err(analysisInputErrorFromIssues(operation, identities.error.issues, input));
|
|
2176
|
+
const leftResult = parseApplicationGraphEvidence(input.left, ["left"]);
|
|
2177
|
+
if (!leftResult.ok) return err(applicationGraphEvidenceInputError(operation, leftResult.error));
|
|
2178
|
+
const rightResult = parseApplicationGraphEvidence(input.right, ["right"]);
|
|
2179
|
+
if (!rightResult.ok) return err(applicationGraphEvidenceInputError(operation, rightResult.error));
|
|
2180
|
+
const leftNativeResult = parseNativeApplicationEvidence(input.left_native_observations, ["left_native_observations"]);
|
|
2181
|
+
if (!leftNativeResult.ok) return err(applicationGraphEvidenceInputError(operation, leftNativeResult.error));
|
|
2182
|
+
const rightNativeResult = parseNativeApplicationEvidence(input.right_native_observations, ["right_native_observations"]);
|
|
2183
|
+
if (!rightNativeResult.ok) return err(applicationGraphEvidenceInputError(operation, rightNativeResult.error));
|
|
2184
|
+
try {
|
|
2185
|
+
const left = leftResult.value;
|
|
2186
|
+
const right = rightResult.value;
|
|
2187
|
+
const leftNative = leftNativeResult.value;
|
|
2188
|
+
const rightNative = rightNativeResult.value;
|
|
2189
|
+
const result = compareJavaScriptApplicationVersions({
|
|
2190
|
+
left: {
|
|
2191
|
+
evidenceId: left.evidence.evidence_id,
|
|
2192
|
+
rootArtifactSha256: left.rootArtifactSha256,
|
|
2193
|
+
graph: left.graph
|
|
2194
|
+
},
|
|
2195
|
+
right: {
|
|
2196
|
+
evidenceId: right.evidence.evidence_id,
|
|
2197
|
+
rootArtifactSha256: right.rootArtifactSha256,
|
|
2198
|
+
graph: right.graph
|
|
2199
|
+
},
|
|
2200
|
+
leftNativeEvidence: leftNative,
|
|
2201
|
+
rightNativeEvidence: rightNative
|
|
2202
|
+
});
|
|
2203
|
+
return ok(createApplicationVersionComparisonEvidence({
|
|
2204
|
+
left_evidence_id: left.evidence.evidence_id,
|
|
2205
|
+
right_evidence_id: right.evidence.evidence_id,
|
|
2206
|
+
left_native_evidence_ids: leftNative.map(({ evidence_id: id }) => id),
|
|
2207
|
+
right_native_evidence_ids: rightNative.map(({ evidence_id: id }) => id)
|
|
2208
|
+
}, result));
|
|
2209
|
+
} catch (cause) {
|
|
2210
|
+
return workflowFailure(operation, cause);
|
|
2211
|
+
}
|
|
2212
|
+
};
|
|
2213
|
+
compareSourceToBundleEvidenceValidated = (input) => {
|
|
2214
|
+
const operation = "compare_source_to_bundle";
|
|
2215
|
+
const applicationResult = parseApplicationGraphEvidence(input.application, ["application"]);
|
|
2216
|
+
if (!applicationResult.ok) return err(applicationGraphEvidenceInputError(operation, applicationResult.error));
|
|
2217
|
+
try {
|
|
2218
|
+
const application = applicationResult.value;
|
|
2219
|
+
const result = compareSourceToBundle({
|
|
2220
|
+
reference: input.reference,
|
|
2221
|
+
application: {
|
|
2222
|
+
evidenceId: application.evidence.evidence_id,
|
|
2223
|
+
rootArtifactSha256: application.rootArtifactSha256,
|
|
2224
|
+
graph: application.graph
|
|
2225
|
+
}
|
|
2226
|
+
});
|
|
2227
|
+
return ok(createSourceToBundleComparisonEvidence({
|
|
2228
|
+
reference_root_sha256: input.reference.root_sha256,
|
|
2229
|
+
application_evidence_id: application.evidence.evidence_id
|
|
2230
|
+
}, result));
|
|
2231
|
+
} catch (cause) {
|
|
2232
|
+
return workflowFailure(operation, cause);
|
|
2233
|
+
}
|
|
2234
|
+
};
|
|
2235
|
+
compareJavaScriptExportShapesEvidence = (rawInput) => {
|
|
2236
|
+
const operation = "compare_javascript_export_shapes";
|
|
2237
|
+
const parsed = compareJavaScriptExportShapesInputSchema.safeParse(rawInput);
|
|
2238
|
+
if (!parsed.success) return err(analysisInputErrorFromIssues(operation, parsed.error.issues, rawInput));
|
|
2239
|
+
return compareJavaScriptExportShapesEvidenceValidated(parsed.data);
|
|
2240
|
+
};
|
|
2241
|
+
compareJavaScriptExportShapesEvidenceValidated = (input) => {
|
|
2242
|
+
const operation = "compare_javascript_export_shapes";
|
|
2243
|
+
const identities = javaScriptExportShapeIdentitiesSchema.safeParse(input);
|
|
2244
|
+
if (!identities.success) return err(analysisInputErrorFromIssues(operation, identities.error.issues, input));
|
|
2245
|
+
const leftResult = parseApplicationGraphEvidence(input.left, ["left"]);
|
|
2246
|
+
if (!leftResult.ok) return err(applicationGraphEvidenceInputError(operation, leftResult.error));
|
|
2247
|
+
const rightResult = parseApplicationGraphEvidence(input.right, ["right"]);
|
|
2248
|
+
if (!rightResult.ok) return err(applicationGraphEvidenceInputError(operation, rightResult.error));
|
|
2249
|
+
try {
|
|
2250
|
+
const left = leftResult.value;
|
|
2251
|
+
const right = rightResult.value;
|
|
2252
|
+
const result = compareJavaScriptExportShapes({
|
|
2253
|
+
left: {
|
|
2254
|
+
evidenceId: left.evidence.evidence_id,
|
|
2255
|
+
graph: left.graph,
|
|
2256
|
+
modulePath: input.left_module_path,
|
|
2257
|
+
exportName: input.left_export_name
|
|
2258
|
+
},
|
|
2259
|
+
right: {
|
|
2260
|
+
evidenceId: right.evidence.evidence_id,
|
|
2261
|
+
graph: right.graph,
|
|
2262
|
+
modulePath: input.right_module_path,
|
|
2263
|
+
exportName: input.right_export_name
|
|
2264
|
+
}
|
|
2265
|
+
});
|
|
2266
|
+
return ok(createJavaScriptExportShapeComparisonEvidence({
|
|
2267
|
+
left_evidence_id: left.evidence.evidence_id,
|
|
2268
|
+
right_evidence_id: right.evidence.evidence_id,
|
|
2269
|
+
left_module_path: input.left_module_path,
|
|
2270
|
+
left_export_name: input.left_export_name,
|
|
2271
|
+
right_module_path: input.right_module_path,
|
|
2272
|
+
right_export_name: input.right_export_name
|
|
2273
|
+
}, result));
|
|
2274
|
+
} catch (cause) {
|
|
2275
|
+
return workflowFailure(operation, cause);
|
|
2276
|
+
}
|
|
2277
|
+
};
|
|
2278
|
+
workflowFailure = (operation, cause) => err(new AnalysisProtocolError(`JavaScript application workflow failed while producing ${operation}`, { cause }));
|
|
2279
|
+
})))();
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
//#endregion
|
|
2283
|
+
init_JavaScriptApplicationWorkflowService();
|
|
2284
|
+
export { compareApplicationVersionsEvidenceValidated, compareJavaScriptExportShapesEvidenceValidated, compareSourceToBundleEvidenceValidated, traceApplicationFeatureEvidenceValidated };
|