rea-agents 6.5.0 → 6.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -3
- package/THIRD_PARTY_NOTICES.md +1 -0
- package/bridge/android/ReaJadxBridge.java +167 -23
- package/bridge/cutter/rea_bridge.py +19 -10
- package/bridge/ghidra/ReaGhidraBridge.java +98 -66
- package/bridge/hopper_bridge.py +9 -1
- package/bridge/native/rea_lldb_tracer.py +48 -4
- package/bridge/pwndbg/core_context.py +15 -2
- package/dist/adb/AdbCommand.js +148 -0
- package/dist/adb/AdbConfiguration.js +26 -4
- package/dist/adb/AdbInputSnapshot.js +126 -0
- package/dist/adb/AdbProvider.js +765 -248
- package/dist/adb/AdbShellOutput.js +92 -21
- package/dist/android/AndroidTargetSnapshot.js +7 -7
- package/dist/android/JadxAnalysis.js +27 -32
- package/dist/android/JadxConfiguration.js +173 -125
- package/dist/android/JadxDoctor.js +11 -3
- package/dist/android/JadxFailure.js +154 -0
- package/dist/android/JadxInterruption.js +13 -0
- package/dist/android/JadxJavaProbe.js +246 -0
- package/dist/android/JadxMcpTransport.js +48 -15
- package/dist/android/JadxProtocol.js +29 -2
- package/dist/android/JadxProvider.js +171 -96
- package/dist/android/JadxRelease.js +5 -1
- package/dist/android/JadxSession.js +35 -14
- package/dist/apktool/ApktoolCommandCleanup.js +134 -0
- package/dist/apktool/ApktoolCommandOutput.js +22 -0
- package/dist/apktool/ApktoolConfiguration.js +162 -44
- package/dist/apktool/ApktoolDecodeOutput.js +29 -23
- package/dist/apktool/ApktoolDecodedInventory.js +52 -0
- package/dist/apktool/ApktoolProvider.js +254 -335
- package/dist/apktool/ApktoolStringTables.js +178 -0
- package/dist/apktool/ApktoolWorkspace.js +162 -0
- package/dist/application/AnalysisDocument.js +19 -4
- package/dist/application/AnalysisProvider.js +15 -1
- package/dist/application/AppBundleExecutable.js +11 -4
- package/dist/application/BinaryTargetResolver.js +9 -2
- package/dist/application/BrowserObservationService.js +54 -20
- package/dist/application/BrowserScenarioCaptureService.js +26 -6
- package/dist/application/CapabilityInventory.js +14 -8
- package/dist/application/ClaudeDesktopConfigLocation.js +5 -5
- package/dist/application/ClientConfigurationCleanup.js +73 -0
- package/dist/application/ClientConfigurationDocument.js +170 -128
- package/dist/application/ClientConfigurationPublication.js +167 -0
- package/dist/application/ClientRegistrationEnvironment.js +31 -1
- package/dist/application/ClientRegistrationIdentity.js +54 -39
- package/dist/application/ClientRegistrationStatus.js +123 -48
- package/dist/application/DirectAnalysis.js +15 -2
- package/dist/application/DirectAnalysisCleanup.js +5 -1
- package/dist/application/DirectAnalysisStatus.js +1 -1
- package/dist/application/Doctor.js +83 -9
- package/dist/application/DoctorDiagnostics.js +25 -4
- package/dist/application/DoctorProviderIds.js +7 -1
- package/dist/application/DshCordisPatch.js +1 -1
- package/dist/application/EnhancedTools.js +9 -21
- package/dist/application/HermesClientHome.js +20 -0
- package/dist/application/HermesConfigurationYaml.js +43 -3
- package/dist/application/HopperDownload.js +11 -3
- package/dist/application/HopperReleaseFeed.js +71 -0
- package/dist/application/InvestigationProviders.js +4 -3
- package/dist/application/JsonFiles.js +1 -1
- package/dist/application/LinuxHopper.js +96 -71
- package/dist/application/LinuxHopperPublisher.js +656 -0
- package/dist/application/MacHopper.js +182 -66
- package/dist/application/MipsElfMetadata.js +1 -1
- package/dist/application/MsixPackageStorage.js +13 -6
- package/dist/application/ProviderOperationExecution.js +13 -20
- package/dist/application/ReconstructionObligationCandidates.js +17 -2
- package/dist/application/ReconstructionObligationLedgerEvaluation.js +4 -0
- package/dist/application/ReconstructionObligationLedgerService.js +5 -3
- package/dist/application/ReconstructionObligationOriginalCases.js +8 -0
- package/dist/application/ReferenceSourceImportEntries.js +160 -18
- package/dist/application/ReferenceSourceImportPolicy.js +5 -3
- package/dist/application/ReferenceSourceVcsAdapter.js +3 -1
- package/dist/application/RegularFileRead.js +107 -88
- package/dist/application/Setup.js +23 -11
- package/dist/application/SetupClientConfiguration.js +155 -89
- package/dist/application/SetupClients.js +22 -13
- package/dist/application/SetupHost.js +90 -34
- package/dist/application/SetupInstallFailure.js +18 -3
- package/dist/application/SetupPlan.js +15 -5
- package/dist/application/SetupRecoveryBackup.js +40 -13
- package/dist/application/SetupRegistrationEnvironment.js +12 -0
- package/dist/application/SetupSkill.js +10 -30
- package/dist/application/SourceLimitations.js +35 -0
- package/dist/application/SupportedClients.js +4 -4
- package/dist/application/Uninstall.js +91 -36
- package/dist/application/UpdateCommandProgress.js +66 -0
- package/dist/application/UpdateMaintenance.js +7 -2
- package/dist/application/UpdateRuntime.js +60 -30
- package/dist/application/WebModuleTraceService.js +35 -22
- package/dist/application/WebNetworkCaptureService.js +8 -5
- package/dist/application/WebRuntimeService.js +41 -8
- package/dist/application/WebScriptExportService.js +6 -4
- package/dist/application/WebSourceLocationService.js +3 -4
- package/dist/application/WorkflowEvidence.js +11 -4
- package/dist/application/analysisView/AnalysisViewService.js +9 -52
- package/dist/application/android/AndroidAnalysisService.js +5 -4
- package/dist/application/android/AndroidSearchEvidenceSummary.js +6 -8
- package/dist/application/artifacts/ArtifactComparisonEvidence.js +32 -0
- package/dist/application/binary/AnalysisProviderEvaluation.js +14 -11
- package/dist/application/binary/AnalysisProviderRegistry.js +340 -50
- package/dist/application/binary/BinarySession.js +73 -34
- package/dist/application/binary/BinarySessionRecords.js +3 -0
- package/dist/application/binary/BinarySessionStatus.js +3 -4
- package/dist/application/binary/CompositeProvider.js +75 -30
- package/dist/application/binary/LazyAnalysisProvider.js +6 -68
- package/dist/application/binary/SessionProviderRouter.js +11 -2
- package/dist/application/binaryDiagnostics/BinaryLayoutService.js +3 -4
- package/dist/application/binaryDiagnostics/PeResourcesService.js +22 -5
- package/dist/application/binaryDiagnostics/RecordedCrashService.js +3 -4
- package/dist/application/captures/PacketCaptureService.js +3 -2
- package/dist/application/closeOwnedWebResources.js +32 -2
- package/dist/application/electron/ElectronFuseService.js +8 -43
- package/dist/application/evm/EvmInterfaceEvidence.js +11 -0
- package/dist/application/evm/EvmInterfaceService.js +4 -15
- package/dist/application/firmware/FirmwareAnalysisService.js +4 -3
- package/dist/application/go/GoBinaryService.js +4 -5
- package/dist/application/investigation/EvidenceLedger.js +3 -4
- package/dist/application/javascript/ElectronBoundaryGraphWindows.js +14 -2
- package/dist/application/javascript/ElectronEvidence.js +1 -2
- package/dist/application/javascript/ElectronObservationService.js +41 -7
- package/dist/application/javascript/JavaScriptApplicationEvidence.js +6 -0
- package/dist/application/javascript/JavaScriptArtifactAnalysis.js +35 -17
- package/dist/application/javascript/JavaScriptArtifactAnalysisTypes.js +30 -1
- package/dist/application/javascript/JavaScriptArtifactGraphContext.js +3 -2
- package/dist/application/javascript/JavaScriptArtifactGraphEvidence.js +3 -3
- package/dist/application/javascript/JavaScriptArtifactGraphFindings.js +41 -11
- package/dist/application/javascript/JavaScriptArtifactGraphStructure.js +18 -8
- package/dist/application/javascript/JavaScriptArtifactPathResolution.js +84 -24
- package/dist/application/javascript/JavaScriptArtifactReconstruction.js +15 -3
- package/dist/application/javascript/JavaScriptModuleRelationships.js +1 -1
- package/dist/application/javascript/JavaScriptRuntimeObservationEvidence.js +1 -2
- package/dist/application/javascript/JavaScriptRuntimeObservationService.js +33 -10
- package/dist/application/javascript/JavaScriptSemanticGraphAsyncProjection.js +4 -5
- package/dist/application/javascript/JavaScriptSemanticGraphBuilder.js +103 -24
- package/dist/application/javascript/JavaScriptSemanticGraphChildProcessProjection.js +13 -4
- package/dist/application/javascript/JavaScriptSemanticGraphConstruction.js +23 -3
- package/dist/application/javascript/JavaScriptSemanticGraphDataProjection.js +18 -5
- package/dist/application/javascript/JavaScriptSemanticGraphFlowProjection.js +4 -6
- package/dist/application/javascript/JavaScriptSemanticGraphObjectProjection.js +2 -3
- package/dist/application/javascript/JavaScriptSemanticGraphResourceProjection.js +2 -3
- package/dist/application/javascript/JavaScriptSemanticGraphValueProjection.js +5 -8
- package/dist/application/native/NativeCallRoutes.js +40 -23
- package/dist/application/native/NativeUiActionTrace.js +8 -0
- package/dist/application/native/NativeValueTrace.js +8 -0
- package/dist/application/reverse/ReverseEngineeringService.js +2 -2
- package/dist/application/rust/RustBinaryService.js +6 -4
- package/dist/application/signals/SignalRecordingService.js +3 -2
- package/dist/application/wasm/WasmArtifactService.js +4 -5
- package/dist/artifacts/AnalysisCleanupLease.js +119 -0
- package/dist/artifacts/ArtifactFileOperation.js +150 -0
- package/dist/artifacts/ArtifactHash.js +2 -1
- package/dist/artifacts/ArtifactProvider.js +16 -5
- package/dist/artifacts/ArtifactReader.js +50 -4
- package/dist/artifacts/ArtifactResourceScope.js +80 -6
- package/dist/artifacts/AsarArtifactReader.js +12 -11
- package/dist/artifacts/AsarEntryStream.js +49 -17
- package/dist/artifacts/DirectoryArtifactReader.js +28 -7
- package/dist/artifacts/MachOSliceArtifactReader.js +70 -13
- package/dist/artifacts/NativeDmgArtifactReader.js +112 -13
- package/dist/artifacts/SafeOutputTree.js +5 -3
- package/dist/artifacts/SafeOutputTreeCreationFailure.js +1 -0
- package/dist/artifacts/SafeOutputTreeReadback.js +10 -16
- package/dist/artifacts/ZipArtifactReader.js +34 -14
- package/dist/artifacts/apple/AppleAssetCatalogAnalysis.js +3 -1
- package/dist/artifacts/apple/DylibFileAccess.js +106 -0
- package/dist/artifacts/apple/DylibResolutionReader.js +64 -155
- package/dist/artifacts/apple/InterfaceBuilderAnalysis.js +52 -9
- package/dist/artifacts/apple/InterfaceBuilderDecodeBudget.js +25 -24
- package/dist/artifacts/apple/KeyedArchiveReader.js +20 -11
- package/dist/artifacts/apple/MachoLoadCommandReader.js +17 -2
- package/dist/artifacts/apple/PlistNumberLiterals.js +104 -116
- package/dist/artifacts/extraction/ArtifactExtraction.js +15 -12
- package/dist/artifacts/inventory/ArtifactGraphConstruction.js +9 -11
- package/dist/artifacts/inventory/ArtifactInventory.js +2 -2
- package/dist/artifacts/inventory/classify.js +4 -2
- package/dist/artifacts/inventory/hashStableRootArtifact.js +14 -7
- package/dist/artifacts/inventory/scanCanonical.js +3 -4
- package/dist/artifacts/javascript/JavaScriptArtifactFiles.js +3 -1
- package/dist/artifacts/readArtifactFileChunks.js +9 -0
- package/dist/artifacts/readStableArtifact.js +12 -34
- package/dist/browser/BrowserScenarioPartialObservation.js +14 -48
- package/dist/browser/CdpBrowserProvider.js +81 -30
- package/dist/browser/CdpCaptureDocuments.js +99 -131
- package/dist/browser/CdpCaptureDomSvg.js +31 -60
- package/dist/browser/CdpCaptureValues.js +12 -0
- package/dist/browser/CdpConnection.js +133 -27
- package/dist/browser/CdpElectronInspection.js +60 -60
- package/dist/browser/CdpElectronProvider.js +56 -4
- package/dist/browser/CdpElectronScriptEvents.js +4 -1
- package/dist/browser/CdpElectronScripts.js +2 -5
- package/dist/browser/CdpElectronWorkers.js +13 -2
- package/dist/browser/CdpPageCapture.js +2 -1
- package/dist/browser/CdpPageCaptureScripts.js +14 -10
- package/dist/browser/CdpPageCaptureWorkers.js +45 -14
- package/dist/browser/CdpSafeMetadata.js +23 -19
- package/dist/browser/CdpSnapshotNodes.js +103 -0
- package/dist/browser/CdpSnapshotStrings.js +0 -6
- package/dist/browser/CdpTargetSession.js +52 -10
- package/dist/browser/CdpTargetSessionOwner.js +198 -0
- package/dist/browser/ElectronCaptureCleanup.js +82 -0
- package/dist/browser/ElectronProcessCleanup.js +91 -0
- package/dist/browser/PlaywrightBrowserScenarioProvider.js +71 -16
- package/dist/browser/PlaywrightElectronActiveActions.js +53 -5
- package/dist/browser/PlaywrightElectronActiveFuses.js +86 -0
- package/dist/browser/PlaywrightElectronActiveProjection.js +5 -0
- package/dist/browser/PlaywrightElectronActiveProvider.js +140 -151
- package/dist/browser/PlaywrightExecutionBoundary.js +4 -2
- package/dist/browser/PlaywrightScenarioBrowser.js +236 -90
- package/dist/browser/PlaywrightScenarioEvents.js +135 -48
- package/dist/browser/PlaywrightScenarioServiceWorkers.js +121 -34
- package/dist/browser/PlaywrightScenarioSession.js +95 -22
- package/dist/browser/PlaywrightScenarioStorage.js +15 -7
- package/dist/browser/StructuredFieldToken.js +53 -0
- package/dist/browser/WebArtifactCleanup.js +53 -0
- package/dist/browser/WebSourceMapFetcher.js +19 -10
- package/dist/browser/assets/WebArtifactReads.js +6 -2
- package/dist/browser/assets/WebSourceLocationArtifacts.js +12 -3
- package/dist/browser/execution/CdpRuntimeSession.js +36 -7
- package/dist/browser/execution/CdpWebRuntimeProvider.js +22 -4
- package/dist/browser/history/CaptureFailures.js +7 -2
- package/dist/browser/history/HarCapture.js +42 -11
- package/dist/browser/history/SazMetadata.js +10 -47
- package/dist/browser/modules/NativeModuleResolver.js +108 -58
- package/dist/browser/modules/WebModuleArtifacts.js +12 -3
- package/dist/browser/network/PlaywrightNetworkContent.js +40 -17
- package/dist/browser/network/PlaywrightScenarioNetwork.js +182 -73
- package/dist/captures/TsharkCaptureProvider.js +13 -6
- package/dist/catalogIdentity.js +19 -14
- package/dist/cli/adbCommands.js +18 -19
- package/dist/cli/androidCommands.js +2 -14
- package/dist/cli/apktoolCommands.js +4 -14
- package/dist/cli/binaryDiagnosticsCommands.js +5 -5
- package/dist/cli/browserAdvancedCommands.js +11 -4
- package/dist/cli/browserCommands.js +21 -12
- package/dist/cli/captureCommands.js +4 -4
- package/dist/cli/cliResultOutput.js +175 -89
- package/dist/cli/coreBinaryCommands.js +4 -3
- package/dist/cli/cutterCommands.js +51 -13
- package/dist/cli/electronCommands.js +34 -13
- package/dist/cli/evmCommands.js +6 -15
- package/dist/cli/finishAnalysisCommand.js +10 -2
- package/dist/cli/firmwareCommands.js +6 -14
- package/dist/cli/flutterCommands.js +2 -18
- package/dist/cli/fridaCommands.js +8 -0
- package/dist/cli/goCommands.js +2 -2
- package/dist/cli/javascriptRecoveryCommands.js +14 -26
- package/dist/cli/jebCommands.js +2 -14
- package/dist/cli/options.js +6 -0
- package/dist/cli/pcapCommands.js +2 -20
- package/dist/cli/rustCommands.js +6 -7
- package/dist/cli/setupCommands.js +4 -3
- package/dist/cli/signalCommands.js +4 -4
- package/dist/cli/sqliteCommands.js +17 -44
- package/dist/cli/wasmCommands.js +7 -18
- package/dist/cli/webModuleCommands.js +19 -34
- package/dist/cli/webNetworkCaptureCommands.js +3 -2
- package/dist/cli/webRuntimeCommands.js +15 -6
- package/dist/cli/webSourceLocationCommands.js +14 -33
- package/dist/cli-runtime/AnalysisCleanupLease-CWfTGYKd.js +103 -0
- package/dist/cli-runtime/{AnalysisProvider-D0Us2OTk.js → AnalysisProvider-BGrYaMVo.js} +14 -3
- package/dist/cli-runtime/{AnalysisSnapshotCache-BXS0wRd2.js → AnalysisSnapshotCache-BjRlXeUS.js} +14 -13
- package/dist/cli-runtime/ArtifactFileOperation-Dg4BcoEM.js +122 -0
- package/dist/cli-runtime/{ArtifactReader-BXkffc1D.js → ArtifactReader-DMwm42bk.js} +29 -6
- package/dist/cli-runtime/ArtifactResourceScope-CokZGcII.js +175 -0
- package/dist/cli-runtime/{AsarHeader-CnzOzYEH.js → AsarHeader-BxwU17DJ.js} +1 -1
- package/dist/cli-runtime/{BinarySessionStatus-DnMxMk-r.js → BinarySessionStatus-DRhjr7Vb.js} +4 -3
- package/dist/cli-runtime/{BinaryTargetResolver-CVIJ_s1A.js → BinaryTargetResolver-tuCTjBlQ.js} +38 -108
- package/dist/cli-runtime/{BoundedFileBytes-BU30odTm.js → BoundedFileBytes-DRtiQNAQ.js} +7 -3
- package/dist/cli-runtime/{CdpTargetSession-DGX5pV9w.js → CdpTargetSession-CQ08KHbh.js} +318 -43
- package/dist/cli-runtime/ClientConfigPath-Dn-V_GUf.js +255 -0
- package/dist/cli-runtime/{ClientConfigurationDocument-ffQ9X0Se.js → ClientConfigurationDocument-C9T8MNGc.js} +206 -142
- package/dist/cli-runtime/{ClientRegistrationStatus-DszCyPEU.js → ClientRegistrationStatus-PnD29RTX.js} +112 -36
- package/dist/cli-runtime/{CurrentEntrypointPath-D5FRNdkq.js → CurrentEntrypointPath-m7QCIVN0.js} +1 -1
- package/dist/cli-runtime/{DirectAnalysis-BgvAtpN3.js → DirectAnalysis-C5NyUryV.js} +76 -23
- package/dist/cli-runtime/DirectoryArtifactReader-CokAJ8vo.js +448 -0
- package/dist/cli-runtime/{Doctor-DIpf_I7N.js → Doctor-DrkWsav4.js} +105 -25
- package/dist/cli-runtime/{ElectronFileScope-dpHm2nrS.js → ElectronFileScope-AP7VoVr7.js} +204 -149
- package/dist/cli-runtime/ElectronFuseFailures-DsjXR7Xp.js +609 -0
- package/dist/cli-runtime/{ExecFileOutput-BEQs-lDD.js → ExecFileOutput-D6KLYTve.js} +11 -9
- package/dist/cli-runtime/{InterfaceBuilderDecodeBudget-D4omRUe4.js → InterfaceBuilderDecodeBudget-CW1IO3dG.js} +40 -21
- package/dist/cli-runtime/{InventoryProjectionEvidence-DIsI4DJ6.js → InventoryProjectionEvidence-DTH5QAqL.js} +3 -3
- package/dist/cli-runtime/{InvestigationProviders-DoQRIHii.js → InvestigationProviders-CFh4a64d.js} +3 -2
- package/dist/cli-runtime/{JavaScriptApplicationEvidenceGraph-D5aI_FSJ.js → JavaScriptApplicationEvidenceGraph-gOmPB2L6.js} +6 -6
- package/dist/cli-runtime/{JavaScriptApplicationWorkflowEvidence-Bz4-V0Ct.js → JavaScriptApplicationWorkflowEvidence-WZgtK_Ok.js} +2 -2
- package/dist/cli-runtime/JebMcpEndpoint-BEalGZh9.js +710 -0
- package/dist/cli-runtime/{JsonFiles-DQa1PRKy.js → JsonFiles-uvd6ZyQi.js} +10 -118
- package/dist/cli-runtime/KunaInstallation-P0j3x851.js +1781 -0
- package/dist/cli-runtime/MacHopperPaths-bGzqjF1Z.js +34 -0
- package/dist/cli-runtime/{MachoLoadCommandReader-C7e074Ze.js → MachoLoadCommandReader-CZm6N5vF.js} +12 -192
- package/dist/cli-runtime/{ManagedSnapshot-rqyBHcdL.js → ManagedSnapshot-CPE9C3OD.js} +406 -110
- package/dist/cli-runtime/OwnedCommandCleanup-BN_V6Erc.js +187 -0
- package/dist/cli-runtime/OwnedRegularFile-D1f5nUCx.js +256 -0
- package/dist/cli-runtime/OwnedStagedOutput-D31dOozz.js +126 -0
- package/dist/cli-runtime/{PrivateRuntimeRoot-DAy0PiBM.js → PrivateRuntimeRoot-Cd23u6jd.js} +39 -6
- package/dist/cli-runtime/ProcessOwnership-CtrNr6ee.js +545 -0
- package/dist/cli-runtime/{ProcessOwnership-DXC5-UWt.js → ProcessOwnershipObservation-C006iCtZ.js} +149 -607
- package/dist/cli-runtime/{ProviderDeadline-8m2pFRDc.js → ProviderDeadline-rSuH4Pm8.js} +27 -1
- package/dist/cli-runtime/ProviderOperationExecution-CmU-XrQr.js +38 -0
- package/dist/cli-runtime/{snapshotEnvironment-D_tWyOub.js → ProviderProcess-D87A7ctp.js} +117 -160
- package/dist/cli-runtime/RegularFileRead-mbgGYtxe.js +125 -0
- package/dist/cli-runtime/{SafeOutputTree-D6U15GXd.js → SafeOutputTree-i904hd_2.js} +21 -20
- package/dist/cli-runtime/{SetupHost-FkYWswsq.js → SetupHost-CMPmPraB.js} +365 -195
- package/dist/cli-runtime/SharedStartupAttempt-BxKyf3Uv.js +1424 -0
- package/dist/cli-runtime/StableFileHash-Ame_h3lY.js +61 -0
- package/dist/cli-runtime/{SupportedClients-DaX6Lt2d.js → SupportedClients-DMafjitv.js} +89 -72
- package/dist/cli-runtime/{Update-CbTC_eg1.js → Update-DAsASWlE.js} +1 -1
- package/dist/cli-runtime/{AbortablePromise-BVBemxbD.js → WindowsBatchCommand-Cx9kaVNf.js} +2 -28
- package/dist/cli-runtime/WindowsNativeLoader-BqyZO0ZD.js +142 -0
- package/dist/cli-runtime/{ZipArtifactReader-B8ZgNe4D.js → ZipArtifactReader-Jed69LEL.js} +20 -16
- package/dist/cli-runtime/{analysisErrorCleanup-Do6YeeoD.js → analysisErrorCleanup-COdAmDsb.js} +4 -3
- package/dist/cli-runtime/{appleArchiveFormat-tVoI2ykA.js → appleArchiveFormat-Bb3G5CCI.js} +13 -7
- package/dist/cli-runtime/{application__DirectAnalysisStatus-DpOejOf0.js → application__DirectAnalysisStatus-F74bu9oy.js} +10 -10
- package/dist/cli-runtime/{application__EnhancedTools-oFE2bOjs.js → application__EnhancedTools-Bg51b0Yp.js} +84 -51
- package/dist/cli-runtime/{application__FunctionAnalysisEvidence-B6osuhvW.js → application__FunctionAnalysisEvidence-DBWIaYCh.js} +3 -3
- package/dist/cli-runtime/{application__ReconstructionCoverageService-DN3wTFQj.js → application__ReconstructionCoverageService-AEPNpZqJ.js} +3 -3
- package/dist/cli-runtime/{application__ReconstructionObligationLedgerService-CKcTppX9.js → application__ReconstructionObligationLedgerService-Cl9cPEZf.js} +22 -9
- package/dist/cli-runtime/{application__Setup-XpMaRNjy.js → application__Setup-DwQzEewK.js} +30 -18
- package/dist/cli-runtime/{application__Uninstall-_23pU2yB.js → application__Uninstall-BOf9oyvQ.js} +78 -37
- package/dist/cli-runtime/{application__UpdateRuntime-DPvY8ohd.js → application__UpdateRuntime-CzWkRJHa.js} +119 -29
- package/dist/cli-runtime/{application__android__AndroidApplicationService-CFgIFPM4.js → application__android__AndroidApplicationService-shW_aKlj.js} +3 -3
- package/dist/cli-runtime/{application__apple__AppleApplicationService-Db6QCsun.js → application__apple__AppleApplicationService-DIv6d3wB.js} +3 -3
- package/dist/cli-runtime/{application__harmony__HarmonyApplicationService-CFjocHoK.js → application__harmony__HarmonyApplicationService-OIUFVQFV.js} +3 -3
- package/dist/cli-runtime/{application__javascript__ElectronActiveObservationService-CmVDUI_Z.js → application__javascript__ElectronActiveObservationService-wvCh72hK.js} +3 -3
- package/dist/cli-runtime/application__javascript__ElectronObservationService-SydXPCwM.js +88 -0
- package/dist/cli-runtime/{application__javascript__JavaScriptApplicationService-CCkp8KBh.js → application__javascript__JavaScriptApplicationService-o0uEsjEc.js} +1120 -316
- package/dist/cli-runtime/{application__javascript__JavaScriptApplicationWorkflowService-lPy0tzr3.js → application__javascript__JavaScriptApplicationWorkflowService-BAheG_71.js} +51 -44
- package/dist/cli-runtime/{application__javascript__JavaScriptRuntimeReconciliationService-DWleA8K9.js → application__javascript__JavaScriptRuntimeReconciliationService-Cnn4GP8q.js} +5 -5
- package/dist/cli-runtime/{application__javascript__JavaScriptSemanticTraceService-DkALH4rL.js → application__javascript__JavaScriptSemanticTraceService-CmvLfV1A.js} +6 -6
- package/dist/cli-runtime/{artifacts__ArtifactProvider-zXI0QjSL.js → artifacts__ArtifactProvider-wx2K0F2I.js} +377 -359
- package/dist/cli-runtime/{binary-BVOr2mgE.js → binary-CWVNJhAC.js} +8561 -3159
- package/dist/cli-runtime/{catalogIdentity-DLoXgfIR.js → catalogIdentity-DAEEsOdX.js} +260 -81
- package/dist/cli-runtime/cli.js +6177 -3556
- package/dist/cli-runtime/{cliOutput-BC1BdAcB.js → cliOutput-CgSuw782.js} +47 -6
- package/dist/cli-runtime/cliOutput.js +2 -2
- package/dist/cli-runtime/cliResultOutput-10sd6xGx.js +1453 -0
- package/dist/cli-runtime/cliResultOutput.js +2 -1
- package/dist/cli-runtime/{composition__browserScenario-DHXC1a8n.js → composition__browserScenario-BtPb1c1y.js} +843 -356
- package/dist/cli-runtime/{composition__electronObservation-GecK2EID.js → composition__electronObservation-Bk8R6DJo.js} +128 -69
- package/dist/cli-runtime/{composition__electronScenario-CEZnVrAL.js → composition__electronScenario-BVF0qStH.js} +398 -135
- package/dist/cli-runtime/{cutterToolContracts-TZH9EHr5.js → cutterToolContracts-BQtG_Nzo.js} +195 -62
- package/dist/cli-runtime/{doctorRuntime-BE5ZX8it.js → doctorRuntime-B__SIpm-.js} +241 -21
- package/dist/cli-runtime/{dotnet__ManagedStaticProvider-C8_yZCDc.js → dotnet__ManagedStaticProvider-DO5Yzcp4.js} +1 -1
- package/dist/cli-runtime/{errorSchemas-CTRmvMl3.js → errorSchemas-Ixz_q7qt.js} +58 -4
- package/dist/cli-runtime/homeDirectory-DC_DeJIg.js +18 -0
- package/dist/cli-runtime/{javascriptApplicationAnalysis-HgMzVMQw.js → javascriptApplicationAnalysis-Dk6yBV8g.js} +688 -668
- package/dist/cli-runtime/{javascriptExportReturnShapeProjection-Dg00g35t.js → javascriptExportReturnShapeProjection-CObOIiQ6.js} +3 -3
- package/dist/cli-runtime/{javascriptExportShapeComparisonSchemas-BYnoIqIk.js → javascriptExportShapeComparisonSchemas-DpwuBenh.js} +5 -3
- package/dist/cli-runtime/{javascriptRuntimeReconciliation-DNjDoL3S.js → javascriptRuntimeReconciliation-C6ZgWMys.js} +61 -59
- package/dist/cli-runtime/{javascriptRuntimeReconciliationSchemas-BWpGWNcI.js → javascriptRuntimeReconciliationSchemas-D6tZKUQs.js} +2 -2
- package/dist/cli-runtime/{javascriptSemanticTraceSchemas-BTCNcvbc.js → javascriptSemanticTraceSchemas-C7m0b6_w.js} +3 -3
- package/dist/cli-runtime/{lipo-DSWP6fv-.js → lipo-DPQ6qurH.js} +9 -11
- package/dist/cli-runtime/{logger-CQQCI4a2.js → logger-BuDJ9xxO.js} +2 -2
- package/dist/cli-runtime/{machoContainer-C8BIkkq3.js → machoContainer-Cy98bkFm.js} +180 -0
- package/dist/cli-runtime/{managedApplicationGraph-B08jb3jq.js → managedApplicationGraph-BazVqpJv.js} +16 -10
- package/dist/cli-runtime/{managedToolContracts-D60QmIYj.js → managedToolContracts-BuFkMBH5.js} +2 -2
- package/dist/cli-runtime/mcpDoctor.js +8 -6
- package/dist/cli-runtime/mcpStartupPolicy-imCbM3qo.js +28 -0
- package/dist/cli-runtime/{native__NativeMacOSProvider-YBTvUeJO.js → native__NativeMacOSProvider-DTcRhuGA.js} +1384 -757
- package/dist/cli-runtime/{officialToolContracts-CCFF0an9.js → officialToolContracts-CzzVLx8I.js} +74 -53
- package/dist/cli-runtime/peMachine-B9ggfSJJ.js +95 -0
- package/dist/cli-runtime/propertyListKeys-D5dSASEy.js +355 -0
- package/dist/cli-runtime/{providerCleanupError-Ceq8f0wK.js → providerCleanupError-BhsJyAhk.js} +3 -5
- package/dist/cli-runtime/readArtifactFileChunks-BbTL_PtB.js +129 -0
- package/dist/cli-runtime/{reconstructionObligationLedgerSchemas-Bao0xMr-.js → reconstructionObligationLedgerSchemas-Bi6sect1.js} +6329 -3651
- package/dist/cli-runtime/{scanCanonical-KP4T9jSl.js → scanCanonical-CcDFUr-w.js} +233 -363
- package/dist/cli-runtime/snapshotEnvironment-Yvx5qwsl.js +196 -0
- package/dist/cli-runtime/{toolContracts-D2FOG_Nb.js → toolContracts-CJzEyZ38.js} +126 -52
- package/dist/cli-runtime/{toolOutputSchemaGroups-DRiYs1je.js → toolOutputSchemaGroups-BqdSzySu.js} +768 -589
- package/dist/cli-runtime/{workflowInputError-n8Oo-bLA.js → workflowInputError-BP8z9Wxl.js} +2 -2
- package/dist/cli.js +10 -0
- package/dist/cliBrowserScenarioCommands.js +2 -3
- package/dist/cliLogging.js +22 -7
- package/dist/cliObservationOptions.js +3 -0
- package/dist/cliOutput.js +68 -3
- package/dist/composition/binary.js +15 -2
- package/dist/composition/directAnalysis.js +8 -0
- package/dist/composition/javascriptAnalysisWorkerProcess.js +4 -5
- package/dist/composition/jeb.js +32 -21
- package/dist/config/environment.js +36 -2
- package/dist/config/mcpInputSchemaProfile.js +1 -1
- package/dist/config/parseConfig.js +7 -3
- package/dist/contracts/adb/adbToolContracts.js +2 -2
- package/dist/contracts/analysisViewApiSurfaceExample.js +4 -4
- package/dist/contracts/analysisViewToolContracts.js +42 -1
- package/dist/contracts/android/androidToolContracts.js +1 -1
- package/dist/contracts/apktool/apktoolToolContracts.js +5 -1
- package/dist/contracts/artifactComparisonExample.js +18 -14
- package/dist/contracts/artifactToolContracts.js +2 -1
- package/dist/contracts/browserScenarioToolContracts.js +1 -1
- package/dist/contracts/browserToolContracts.js +12 -1
- package/dist/contracts/compactInputSchema.js +13 -6
- package/dist/contracts/fridaToolContracts.js +5 -4
- package/dist/contracts/gdbToolContracts.js +2 -3
- package/dist/contracts/inputSchemaPresentation.js +173 -79
- package/dist/contracts/javascript/javascriptExportShapeComparisonExample.js +1 -0
- package/dist/contracts/javascript/javascriptRuntimeReconciliationExample.js +1 -0
- package/dist/contracts/jsonSchemaKeywords.js +29 -0
- package/dist/contracts/managed/managedWorkflowExamples.js +3 -0
- package/dist/contracts/managed/managedWorkflowToolContracts.js +1 -1
- package/dist/contracts/mobileApplicationGraphExamples.js +15 -12
- package/dist/contracts/officialToolContracts.js +2 -2
- package/dist/contracts/rizinDebugToolContracts.js +3 -2
- package/dist/contracts/sessionToolContracts.js +3 -3
- package/dist/contracts/toolEffects.js +6 -2
- package/dist/contracts/toolOutputSchemaGroups.js +7 -4
- package/dist/contracts/toolOutputSchemaPrimitives.js +7 -0
- package/dist/contracts/toolSchemaMetadata.js +99 -27
- package/dist/cutter/CutterBridgeClient.js +206 -67
- package/dist/cutter/CutterBridgeService.js +52 -4
- package/dist/doctorRuntime.js +25 -4
- package/dist/domain/adb/adbDeviceAnalysis.js +19 -1
- package/dist/domain/analysisErrorBase.js +59 -2
- package/dist/domain/analysisErrorCleanup.js +3 -1
- package/dist/domain/analysisErrorCore.js +13 -0
- package/dist/domain/analysisErrorPresentation.js +23 -4
- package/dist/domain/analysisErrorProjection.js +44 -28
- package/dist/domain/analysisSearch.js +26 -0
- package/dist/domain/analysisSnapshot.js +11 -11
- package/dist/domain/analysisView/WebNetworkApiSurfaceAccumulator.js +4 -65
- package/dist/domain/analysisView/analysisView.js +25 -0
- package/dist/domain/analysisView/analysisViewDataAdmission.js +86 -0
- package/dist/domain/analysisView/artifactInventoryView.js +4 -18
- package/dist/domain/analysisView/javascriptApplicationCoverage.js +27 -0
- package/dist/domain/analysisView/javascriptApplicationView.js +100 -27
- package/dist/domain/analysisView/javascriptFactsView.js +92 -0
- package/dist/domain/analysisView/javascriptModuleReferences.js +37 -0
- package/dist/domain/analysisView/managedMemberView.js +6 -0
- package/dist/domain/android/androidApplication.js +8 -7
- package/dist/domain/apktool/apktoolResourceAnalysis.js +52 -2
- package/dist/domain/apple/appleApplication.js +41 -60
- package/dist/domain/apple/appleBundleAnatomy.js +56 -68
- package/dist/domain/apple/dylibResolution.js +5 -1
- package/dist/domain/apple/interfaceBuilderGraph.js +29 -8
- package/dist/domain/apple/interfaceBuilderKeyedArchive.js +11 -4
- package/dist/domain/apple/jvmClassFile.js +226 -0
- package/dist/domain/apple/keyedArchive.js +39 -17
- package/dist/domain/apple/machoContainer.js +3 -0
- package/dist/domain/apple/plistNumbers.js +67 -5
- package/dist/domain/apple/plistValue.js +89 -18
- package/dist/domain/artifactComparison.js +7 -5
- package/dist/domain/artifactGraph.js +4 -12
- package/dist/domain/artifactInspection.js +6 -17
- package/dist/domain/artifactInventoryEvidence.js +68 -60
- package/dist/domain/binaryTarget.js +11 -26
- package/dist/domain/binaryTargetTypes.js +10 -0
- package/dist/domain/browserNetworkEvidence.js +20 -3
- package/dist/domain/browserObservation.js +5 -28
- package/dist/domain/browserObservationError.js +4 -4
- package/dist/domain/browserScenarioCapture.js +11 -2
- package/dist/domain/browserScenarioCaptureLimits.js +34 -0
- package/dist/domain/browserScenarioCaptureValues.js +50 -0
- package/dist/domain/browserScenarioDiffEvidence.js +1 -3
- package/dist/domain/browserScenarioValues.js +5 -1
- package/dist/domain/captures/packetCapture.js +2 -1
- package/dist/domain/dosMz.js +14 -5
- package/dist/domain/electron/electronFuseEvidence.js +42 -0
- package/dist/domain/elfFixedHeader.js +24 -0
- package/dist/domain/evidence.js +7 -6
- package/dist/domain/evidenceBundle.js +9 -2
- package/dist/domain/explicitSensitiveFailure.js +3 -0
- package/dist/domain/fileSnapshotObservation.js +25 -0
- package/dist/domain/fixedTupleSchema.js +9 -0
- package/dist/domain/functionCallCoverage.js +6 -6
- package/dist/domain/functionComparisonDimensions.js +38 -11
- package/dist/domain/functionComparisonNormalization.js +17 -9
- package/dist/domain/functionDossierEvidence.js +4 -3
- package/dist/domain/harmony/harmonyApplication.js +8 -8
- package/dist/domain/hopperErrors.js +4 -2
- package/dist/domain/hopperValues.js +27 -4
- package/dist/domain/javascript/electronActiveObservation.js +1 -0
- package/dist/domain/javascript/electronStaticAnalysisBrowser.js +80 -20
- package/dist/domain/javascript/electronStaticAnalysisValues.js +0 -20
- package/dist/domain/javascript/electronStaticOptionObjects.js +45 -0
- package/dist/domain/javascript/electronWrappedCallPaths.js +70 -17
- package/dist/domain/javascript/javascriptAnalysisResourceControls.js +20 -4
- package/dist/domain/javascript/javascriptApplicationAnalysis.js +4 -0
- package/dist/domain/javascript/javascriptApplicationChangeGraph.js +3 -0
- package/dist/domain/javascript/javascriptApplicationVersionComparisonSchemas.js +3 -1
- package/dist/domain/javascript/javascriptApplicationVersionItems.js +49 -21
- package/dist/domain/javascript/javascriptAstFingerprint.js +41 -10
- package/dist/domain/javascript/javascriptAstValues.js +83 -5
- package/dist/domain/javascript/javascriptBundledRequireOrigin.js +23 -36
- package/dist/domain/javascript/javascriptCommonJsExportReceivers.js +231 -0
- package/dist/domain/javascript/javascriptElectronMemberWrites.js +14 -4
- package/dist/domain/javascript/javascriptFeatureSeed.js +1 -1
- package/dist/domain/javascript/javascriptGraphqlOperations.js +382 -0
- package/dist/domain/javascript/javascriptModuleDeclaration.js +20 -0
- package/dist/domain/javascript/javascriptNativeHandoff.js +7 -11
- package/dist/domain/javascript/javascriptRpcEndpoints.js +7 -171
- package/dist/domain/javascript/javascriptRuntimeLoadState.js +9 -4
- package/dist/domain/javascript/javascriptRuntimeReconciliationCaptureParsing.js +35 -12
- package/dist/domain/javascript/javascriptRuntimeReconciliationMatching.js +50 -45
- package/dist/domain/javascript/javascriptSemanticAmbientWrites.js +284 -24
- package/dist/domain/javascript/javascriptSemanticAnalysis.js +452 -182
- package/dist/domain/javascript/javascriptSemanticAsyncEffects.js +37 -20
- package/dist/domain/javascript/javascriptSemanticCallResolution.js +55 -27
- package/dist/domain/javascript/javascriptSemanticCalls.js +4 -4
- package/dist/domain/javascript/javascriptSemanticChildProcesses.js +134 -50
- package/dist/domain/javascript/javascriptSemanticCoverage.js +5 -1
- package/dist/domain/javascript/javascriptSemanticDataEffectHelpers.js +7 -13
- package/dist/domain/javascript/javascriptSemanticDataEffects.js +33 -10
- package/dist/domain/javascript/javascriptSemanticDerivedAnalysis.js +1 -1
- package/dist/domain/javascript/javascriptSemanticEvaluationOrder.js +126 -0
- package/dist/domain/javascript/javascriptSemanticExpressionShapes.js +111 -0
- package/dist/domain/javascript/javascriptSemanticGetterQueries.js +147 -0
- package/dist/domain/javascript/javascriptSemanticGetterResults.js +264 -0
- package/dist/domain/javascript/javascriptSemanticGraph.js +18 -1
- package/dist/domain/javascript/javascriptSemanticGraphSchemas.js +13 -0
- package/dist/domain/javascript/javascriptSemanticIterationSources.js +3 -2
- package/dist/domain/javascript/javascriptSemanticMapOperations.js +51 -0
- package/dist/domain/javascript/javascriptSemanticMemberMutations.js +215 -81
- package/dist/domain/javascript/javascriptSemanticMutationInitializers.js +395 -118
- package/dist/domain/javascript/javascriptSemanticObjectReferences.js +241 -328
- package/dist/domain/javascript/javascriptSemanticObjects.js +33 -27
- package/dist/domain/javascript/javascriptSemanticOpaqueEffects.js +163 -0
- package/dist/domain/javascript/javascriptSemanticPrimitives.js +11 -1
- package/dist/domain/javascript/javascriptSemanticProjection.js +44 -67
- package/dist/domain/javascript/javascriptSemanticQueryIdentity.js +2 -1
- package/dist/domain/javascript/javascriptSemanticQuerySchemas.js +1 -1
- package/dist/domain/javascript/javascriptSemanticRequireOrigin.js +45 -7
- package/dist/domain/javascript/javascriptSemanticResourceLimits.js +3 -19
- package/dist/domain/javascript/javascriptSemanticResources.js +27 -4
- package/dist/domain/javascript/javascriptSemanticReturnedReferences.js +78 -37
- package/dist/domain/javascript/javascriptSemanticReturns.js +2 -2
- package/dist/domain/javascript/javascriptSemanticState.js +191 -42
- package/dist/domain/javascript/javascriptSemanticValues.js +167 -41
- package/dist/domain/javascript/javascriptSourceParser.js +54 -9
- package/dist/domain/javascript/javascriptStaticAnalysis.js +24 -13
- package/dist/domain/javascript/javascriptStaticAnalysisCalls.js +276 -16
- package/dist/domain/javascript/javascriptStaticAnalysisHelpers.js +33 -25
- package/dist/domain/javascript/javascriptStaticAnalysisState.js +3 -0
- package/dist/domain/javascript/javascriptStaticAnalysisTypes.js +1 -1
- package/dist/domain/javascript/javascriptSymbolicBindings.js +424 -142
- package/dist/domain/javascript/javascriptSymbolicControlFlow.js +4 -0
- package/dist/domain/javascript/javascriptSymbolicValues.js +12 -1
- package/dist/domain/javascript/sourceToBundleSignals.js +3 -0
- package/dist/domain/managed/managedApplicationGraphNodes.js +14 -9
- package/dist/domain/managed/managedArtifact.js +26 -0
- package/dist/domain/managed/managedMemberComparison.js +3 -0
- package/dist/domain/managed/managedMemberComparisonCoverage.js +14 -1
- package/dist/domain/managed/managedMemberComparisonItems.js +124 -52
- package/dist/domain/managed/managedMemberComparisonMatch.js +76 -72
- package/dist/domain/managed/managedMemberSignatureIdentity.js +40 -0
- package/dist/domain/managed/managedNativeVerificationMatch.js +5 -5
- package/dist/domain/managed/managedNativeVerificationSchemas.js +2 -2
- package/dist/domain/mobileApplicationGraphProjection.js +33 -18
- package/dist/domain/native/bytePattern.js +21 -0
- package/dist/domain/native/nativeAotPe.js +29 -2
- package/dist/domain/native/nativeAotSnapshotObservation.js +18 -0
- package/dist/domain/native/nativeCallPartialObservation.js +14 -12
- package/dist/domain/native/nativeLoadImage.js +13 -0
- package/dist/domain/native/objcSwiftMetadata.js +15 -8
- package/dist/domain/native/peResources.js +6 -2
- package/dist/domain/peMachine.js +2 -0
- package/dist/domain/process/processComparison.js +3 -3
- package/dist/domain/process/processTraceDimensionProjection.js +1 -1
- package/dist/domain/process/processTraceEvaluation.js +65 -24
- package/dist/domain/propertyListKeys.js +84 -69
- package/dist/domain/propertyListXml.js +149 -0
- package/dist/domain/providerAdapterError.js +2 -0
- package/dist/domain/providerCleanupError.js +2 -4
- package/dist/domain/rawBinary.js +11 -2
- package/dist/domain/reconstructionCoverage.js +35 -23
- package/dist/domain/reconstructionCoverageEvaluation.js +36 -36
- package/dist/domain/reconstructionCoverageEvidence.js +26 -0
- package/dist/domain/reconstructionVerification.js +40 -26
- package/dist/domain/referenceSourceImportParsing.js +4 -0
- package/dist/domain/referenceSourcePathIdentity.js +2 -0
- package/dist/domain/referenceSourceRequireBindings.js +40 -101
- package/dist/domain/relationshipCoverage.js +4 -5
- package/dist/domain/sqlite/sqliteDatabase.js +2 -1
- package/dist/domain/symbolAnalysis.js +9 -8
- package/dist/domain/webBundleAnalyzerInspection.js +65 -25
- package/dist/domain/webCaptureDiff.js +124 -41
- package/dist/domain/webInventory.js +28 -14
- package/dist/domain/webModuleTrace.js +22 -0
- package/dist/domain/webScriptExportError.js +2 -3
- package/dist/domain/xmlDocument.js +41 -0
- package/dist/domain/zipPackageFormat.js +0 -4
- package/dist/dotnet/ManagedArtifactInspector.js +2 -4
- package/dist/dotnet/ManagedDecodeBudget.js +21 -1
- package/dist/dotnet/ManagedMemberInspector.js +31 -6
- package/dist/dotnet/ManagedMemberInspectorCore.js +63 -12
- package/dist/dotnet/ManagedMemberRows.js +8 -8
- package/dist/dotnet/ManagedMetadataHeaps.js +0 -1
- package/dist/dotnet/ManagedMetadataLayout.js +17 -15
- package/dist/dotnet/ManagedNativeBoundaryHelpers.js +20 -19
- package/dist/dotnet/ManagedNativeBoundaryInspector.js +7 -8
- package/dist/dotnet/ManagedPeReader.js +5 -0
- package/dist/dotnet/ManagedSnapshot.js +25 -20
- package/dist/dotnet/ManagedTypeNameDigests.js +177 -0
- package/dist/dotnet/ManagedTypeNames.js +6 -46
- package/dist/dotnet/ManagedTypeNesting.js +25 -0
- package/dist/dotnet/ManagedTypeReferences.js +94 -0
- package/dist/electron/ElectronFuseFailures.js +105 -0
- package/dist/electron/ElectronFusePath.js +4 -3
- package/dist/electron/ElectronFuseProvider.js +67 -92
- package/dist/electron/ElectronFuseReader.js +46 -30
- package/dist/evm/EvmoleFailures.js +1 -0
- package/dist/evm/EvmoleInterfaceProvider.js +13 -16
- package/dist/filesystem/OwnedRegularFile.js +116 -0
- package/dist/filesystem/OwnedStagedOutput.js +28 -11
- package/dist/filesystem/RegularFile.js +20 -8
- package/dist/filesystem/StableFileHash.js +56 -38
- package/dist/filesystem/callerPath.js +26 -0
- package/dist/filesystem/readFileHandleChunks.js +55 -5
- package/dist/filesystem/readStableFileBytes.js +85 -0
- package/dist/firmware/FirmwareCommand.js +13 -7
- package/dist/firmware/FirmwareFailures.js +56 -0
- package/dist/firmware/FirmwareFiles.js +128 -98
- package/dist/firmware/FirmwareProvider.js +120 -65
- package/dist/firmware/FirmwarePublication.js +26 -11
- package/dist/flutter/DartElf.js +27 -0
- package/dist/flutter/FlutterBuildProvider.js +44 -4
- package/dist/gdb/GdbSessionManager.js +202 -14
- package/dist/generatedPackageMetadata.js +1 -1
- package/dist/ghidra/GhidraAnalysisProfile.js +24 -10
- package/dist/ghidra/GhidraAnalysisSeeds.js +39 -55
- package/dist/ghidra/GhidraBridgeSources.js +12 -0
- package/dist/ghidra/GhidraClient.js +362 -148
- package/dist/ghidra/GhidraClientStartup.js +5 -3
- package/dist/ghidra/GhidraClientWire.js +5 -2
- package/dist/ghidra/GhidraDiagnostics.js +16 -5
- package/dist/ghidra/GhidraDoctor.js +45 -14
- package/dist/ghidra/GhidraDosSnapshot.js +83 -0
- package/dist/ghidra/GhidraExecutableHeader.js +54 -0
- package/dist/ghidra/GhidraFileArtifacts.js +93 -0
- package/dist/ghidra/GhidraFunctionValues.js +1 -0
- package/dist/ghidra/GhidraInstallation.js +143 -142
- package/dist/ghidra/GhidraInstallationPolicy.js +20 -79
- package/dist/ghidra/GhidraInstallationProperties.js +57 -0
- package/dist/ghidra/GhidraInventoryValues.js +22 -6
- package/dist/ghidra/GhidraJavaLaunch.js +11 -4
- package/dist/ghidra/GhidraJavaProbe.js +267 -0
- package/dist/ghidra/GhidraJavaProperties.js +9 -7
- package/dist/ghidra/GhidraLanguageCatalog.js +12 -7
- package/dist/ghidra/GhidraLauncher.js +128 -65
- package/dist/ghidra/GhidraLoadImageAttest.js +75 -78
- package/dist/ghidra/GhidraLoadImageValues.js +39 -29
- package/dist/ghidra/GhidraMipsProfile.js +13 -5
- package/dist/ghidra/GhidraNativeAotSnapshotOwner.js +221 -0
- package/dist/ghidra/GhidraPeProfile.js +88 -18
- package/dist/ghidra/GhidraProvider.js +219 -32
- package/dist/ghidra/GhidraProviderCapabilities.js +17 -4
- package/dist/ghidra/GhidraProviderClient.js +199 -239
- package/dist/ghidra/GhidraPspExtension.js +104 -34
- package/dist/ghidra/GhidraPspProfile.js +4 -1
- package/dist/ghidra/GhidraRawBinaryLanguage.js +13 -4
- package/dist/ghidra/GhidraReleasePolicy.js +93 -0
- package/dist/ghidra/GhidraRequestQueue.js +64 -40
- package/dist/ghidra/GhidraSessionError.js +152 -19
- package/dist/ghidra/GhidraSessionValues.js +13 -3
- package/dist/ghidra/GhidraSocketConnection.js +25 -11
- package/dist/ghidra/GhidraTargetSnapshot.js +67 -50
- package/dist/ghidra/GhidraTransport.js +86 -63
- package/dist/ghidra/extensions/GhidraExtensions.js +30 -45
- package/dist/go/GoBinaryProvider.js +89 -60
- package/dist/go/GoElfImage.js +3 -3
- package/dist/hopper/BridgeLauncher.js +43 -4
- package/dist/hopper/HopperAnalysisProfile.js +4 -2
- package/dist/hopper/HopperCleanup.js +14 -1
- package/dist/hopper/HopperClient.js +135 -63
- package/dist/hopper/HopperProvider.js +4 -7
- package/dist/hopper/HopperProviderCapabilities.js +2 -1
- package/dist/hopper/HopperRegexSearch.js +21 -60
- package/dist/ida/IdaBusyHealth.js +36 -2
- package/dist/ida/IdaMcpConnection.js +17 -11
- package/dist/ida/IdaNativeProtocol.js +1 -9
- package/dist/ida/IdaOperationRunner.js +8 -26
- package/dist/ida/IdaProtocolValues.js +2 -1
- package/dist/ida/IdaProvider.js +18 -2
- package/dist/ida/IdaSessionClient.js +54 -12
- package/dist/inspector/V8InspectorCaptureProjection.js +7 -0
- package/dist/inspector/V8InspectorProvider.js +2 -0
- package/dist/javascript/analysis/JavaScriptAnalysisTransfer.js +25 -4
- package/dist/javascript/analysis/JavaScriptAnalysisWorker.js +4 -3
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerProtocol.js +3 -2
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerSchemas.js +7 -1
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerServer.js +1 -1
- package/dist/javascript/recovery/RecoveryFiles.js +57 -8
- package/dist/jeb/JebMcpConnection.js +129 -70
- package/dist/jeb/JebMcpConnectionOwner.js +116 -0
- package/dist/jeb/JebMcpDeadline.js +46 -0
- package/dist/jeb/JebProvider.js +77 -51
- package/dist/kuna/KunaAddress.js +11 -0
- package/dist/kuna/KunaCommand.js +217 -0
- package/dist/kuna/KunaConfiguration.js +90 -0
- package/dist/kuna/KunaDoctor.js +198 -0
- package/dist/kuna/KunaInstallation.js +137 -0
- package/dist/kuna/KunaJson.js +23 -0
- package/dist/kuna/KunaJsonStream.js +433 -0
- package/dist/kuna/KunaLimits.js +5 -0
- package/dist/kuna/KunaProjectCache.js +804 -0
- package/dist/kuna/KunaProjectExport.js +202 -0
- package/dist/kuna/KunaProjectFiles.js +191 -0
- package/dist/kuna/KunaProjectReader.js +115 -0
- package/dist/kuna/KunaProvider.js +217 -0
- package/dist/kuna/KunaProviderCapabilities.js +102 -0
- package/dist/kuna/KunaQueryErrors.js +12 -0
- package/dist/kuna/KunaQueryWork.js +113 -0
- package/dist/kuna/KunaReferenceFiles.js +258 -0
- package/dist/kuna/KunaReferenceQueries.js +211 -0
- package/dist/kuna/KunaRelease.js +10 -0
- package/dist/kuna/KunaRunSlots.js +56 -0
- package/dist/kuna/KunaSessionClient.js +1162 -0
- package/dist/kuna/KunaStringInventory.js +145 -0
- package/dist/kuna/KunaStringQueries.js +133 -0
- package/dist/kuna/KunaTargetCommands.js +205 -0
- package/dist/kuna/KunaUnavailable.js +11 -0
- package/dist/main/processShutdown.js +17 -0
- package/dist/main/transport.js +21 -1
- package/dist/main.js +2 -12
- package/dist/mcp/AnalysisProvider-BABWbLoM.js +38 -0
- package/dist/mcp/{AnalysisSnapshotFiles-BAbiJQOc.js → AnalysisSnapshotFiles-BXz0c37-.js} +39 -28
- package/dist/mcp/{ProcessOwnership-Bl_3ejLe.js → ArtifactFileOperation-64cQKI7B.js} +274 -72
- package/dist/mcp/{ArtifactProvider-DViCU_rn.js → ArtifactProvider-Dx6pmil1.js} +371 -354
- package/dist/mcp/ArtifactProviderMetadata-UCJr2oZW.js +167 -0
- package/dist/mcp/{ArtifactReader-OyM03Gjn.js → ArtifactReader-BrnwNaKY.js} +29 -6
- package/dist/mcp/ArtifactResourceScope-zi3Dkqzy.js +175 -0
- package/dist/mcp/{AsarHeader-WsPgoooH.js → AsarHeader-B_IbppTz.js} +1 -1
- package/dist/mcp/{BinarySessionStatus-B4P9gf-S.js → BinarySessionStatus-CZ9nnXMt.js} +5 -4
- package/dist/mcp/{BinaryTargetResolver-BMaE_0H1.js → BinaryTargetResolver-BUncASDP.js} +146 -215
- package/dist/mcp/BoundedFileBytes-DYt5q9G2.js +43 -0
- package/dist/mcp/{CdpCaptureDocuments-HDiF2O7k.js → CdpCaptureDocuments-Y2uFcBpl.js} +194 -145
- package/dist/mcp/{CdpCaptureValues-M-j6CIh1.js → CdpCaptureValues-tNIg-gQK.js} +12 -5
- package/dist/mcp/{CdpConnection-BpDfz4MK.js → CdpEndpoint-BrhMhpSi.js} +352 -281
- package/dist/mcp/{CdpOptionalCommand-BPjRD9Kz.js → CdpOptionalCommand-PZZhlqxv.js} +2 -2
- package/dist/mcp/CdpTargetSession-BmmDC3XO.js +290 -0
- package/dist/mcp/{DirectAnalysis-DrafbXke.js → DirectAnalysis-B9KuCHTG.js} +29 -21
- package/dist/mcp/{DirectAnalysisStatus-CjjeDLzW.js → DirectAnalysisStatus-BgzopkIt.js} +7 -7
- package/dist/mcp/{ElectronFileScope-BPG_YoyU.js → ElectronFileScope-FXtK0d6I.js} +1 -1
- package/dist/mcp/ElectronFuseFailures-uZ_wOV6T.js +610 -0
- package/dist/mcp/MachoLoadCommandReader-C2VGgHA3.js +330 -0
- package/dist/mcp/{ManagedStaticProvider-BthZbKyZ.js → ManagedStaticProvider-CZuoPme2.js} +429 -131
- package/dist/mcp/{NativeMacOSProvider-Bh79k8dI.js → NativeMacOSProvider-CMguKrvN.js} +1376 -748
- package/dist/mcp/{NativeMacOSProviderMetadata-N1lPOaY_.js → NativeMacOSProviderMetadata-B_RH4KXF.js} +97 -7
- package/dist/mcp/{ProviderDeadline-DskQ94YD.js → OwnedCommand-BW1jBSt9.js} +436 -127
- package/dist/mcp/ProcedureAddressResolution-H6Qwpb_Y.js +59 -0
- package/dist/mcp/{WorkflowEvidence-umWrB_wm.js → WorkflowEvidence-CO4C7ALz.js} +16 -9
- package/dist/mcp/analysisErrorCleanup-Q344SnTO.js +34 -0
- package/dist/mcp/analysisErrorCore-BIEP7tvF.js +509 -0
- package/dist/mcp/{analysisErrorProjection-BN0EPM-3.js → analysisErrorProjection-B8teQwwD.js} +80 -30
- package/dist/mcp/{artifactToolContracts-Di4qZlEt.js → artifactToolContracts-C9dRDo-D.js} +6 -4
- package/dist/mcp/{browserObservation-C0s4i8UI.js → browserObservation-DUraZs62.js} +272 -107
- package/dist/mcp/{browserObservationError-CyLugqX4.js → browserObservationError-C5okJ5el.js} +27 -4
- package/dist/mcp/{browserObservationSchemas-tgqjH7aA.js → browserObservationSchemas-DwGGxBpu.js} +3 -3
- package/dist/mcp/{browserScenario-CAQ8Fns9.js → browserScenario-BRUz7yN0.js} +844 -358
- package/dist/mcp/{browserScenarioCapture-CTNFN-FI.js → browserScenarioCapture-CiMAsMx8.js} +127 -11
- package/dist/mcp/{InterfaceBuilderDecodeBudget-5F2AkxJT.js → callerPath-CpPnMZyN.js} +91 -65
- package/dist/mcp/{electronActiveObservation-lDvQTMR0.js → electronActiveObservation-DV0Ffy9X.js} +1 -0
- package/dist/mcp/electronFuses-D5SS7XXw.js +367 -0
- package/dist/mcp/{electronObservation-i7LcILQ-.js → electronObservation-DsN-NqY1.js} +134 -75
- package/dist/mcp/{electronObservation-DFOFEood.js → electronObservation-wOYWwqgF.js} +3 -3
- package/dist/mcp/{electronScenario-nCzE6IfJ.js → electronScenario-CYrt2zBK.js} +395 -135
- package/dist/mcp/{emptyArraySchema-tL6Qymyd.js → emptyArraySchema-C0o2Sxwp.js} +2 -2
- package/dist/mcp/{enhancedInputs-DgdEnzHy.js → enhancedInputs-6CCgB3VB.js} +1 -1
- package/dist/mcp/{javascriptRuntimeObservation-61NhCf7H.js → javascriptRuntimeObservation-BVbhkO2-.js} +12 -9
- package/dist/mcp/{javascriptRuntimeObservation-PIUoLfX6.js → javascriptRuntimeObservation-Cu0Yedqq.js} +2 -2
- package/dist/mcp/{lipo-Bnkoq_6W.js → lipo-DSTgUqL1.js} +11 -118
- package/dist/mcp/{logger-BQY5ulYv.js → logger-BGdGHadX.js} +2 -2
- package/dist/mcp/machoContainer-CMSxUBlK.js +605 -0
- package/dist/mcp/{main-kBXHZ8S5.js → main-Cx-Z7m_n.js} +16788 -5902
- package/dist/mcp/main.js +1 -1
- package/dist/mcp/{managedToolContracts-CK--I_s7.js → managedToolContracts-CSlbKJP-.js} +3 -3
- package/dist/mcp/{nativeValueTrace-DR9UE62L.js → nativeValueTrace-BEZbDieM.js} +2630 -2468
- package/dist/mcp/{officialToolContracts-B67NJ2tC.js → officialToolContracts-CauCcSsc.js} +74 -55
- package/dist/mcp/peMachine-aP1iYnHq.js +95 -0
- package/dist/mcp/propertyListKeys-BfCo0k4w.js +356 -0
- package/dist/mcp/providerCleanupError-DIRHxzWo.js +125 -0
- package/dist/mcp/{providerOperationHealth-CTYa3iLf.js → providerOperationHealth-9DRSGM8N.js} +24 -1
- package/dist/mcp/{scanCanonical-CRXSpule.js → scanCanonical-CF3ATd1V.js} +269 -463
- package/dist/mcp/{serverIdentity-Cio4iFV3.js → serverIdentity-BK0Ejd_Y.js} +262 -83
- package/dist/mcp/{sourceMapEnvelope-C0uJlrOh.js → sourceMapEnvelope-DAaRUIGj.js} +4 -4
- package/dist/mcp/{toolContracts-BW05wpcr.js → toolContracts-BPoHQdlC.js} +541 -327
- package/dist/mcp/{toolOutputSchemaGroups-ColvNZ1r.js → toolOutputSchemaGroups-MJ_f-PMK.js} +2551 -2354
- package/dist/mcp/{webContentArtifact-Dzjc1z-R.js → webContentArtifact-DfGkgDcI.js} +2 -17
- package/dist/mcp/{webRuntime-K__NYzXm.js → webRuntime-ccyhkRru.js} +2 -2
- package/dist/mcp/{webSourceLocation-DbMAT2J9.js → webSourceLocation-DKIum0vJ.js} +6451 -4414
- package/dist/mcpDoctor.js +4 -2
- package/dist/mcpStartupPolicy.js +18 -3
- package/dist/native/AppleDispatchMetadata.js +76 -27
- package/dist/native/AppleMachoFixups.js +20 -10
- package/dist/native/AppleObjcCategories.js +12 -1
- package/dist/native/AppleObjcDispatchFacets.js +21 -12
- package/dist/native/AppleObjcProperties.js +61 -17
- package/dist/native/AppleObjcProtocols.js +25 -7
- package/dist/native/AppleSwiftVtables.js +2 -0
- package/dist/native/CommandRunner.js +13 -9
- package/dist/native/LldbCallTracer.js +232 -178
- package/dist/native/LldbReadbackFiles.js +70 -0
- package/dist/native/LldbRetainedObservations.js +28 -56
- package/dist/native/NativeCallObservation.js +53 -52
- package/dist/native/NativeCallTarget.js +95 -0
- package/dist/native/NativeMacOSProvider.js +240 -171
- package/dist/native/NativeMachoInspection.js +21 -7
- package/dist/native/NativePlistSource.js +179 -0
- package/dist/native/NativeUiCleanupError.js +30 -0
- package/dist/native/NativeUiHelperRuntime.js +48 -35
- package/dist/native/NativeUiObservation.js +67 -45
- package/dist/native/SignatureTargetBinding.js +72 -53
- package/dist/native/parsers/demangle.js +16 -12
- package/dist/native/parsers/machoUuid.js +4 -4
- package/dist/native/parsers/otool.js +57 -17
- package/dist/native/parsers/plist.js +40 -25
- package/dist/native/pe/PeResourceLayout.js +22 -7
- package/dist/native/pe/PeResourceParser.js +10 -9
- package/dist/native/pe/PeResourcesProvider.js +63 -16
- package/dist/native/pwndbg/CoreFileMappingAuthority.js +51 -0
- package/dist/native/pwndbg/PwndbgCoreContext.js +26 -15
- package/dist/native/pwntools/PwntoolsDecoder.js +116 -53
- package/dist/native/pwntools/PwntoolsFailures.js +17 -3
- package/dist/native/pwntools/PwntoolsRecordedCrashProvider.js +11 -1
- package/dist/objdump/ObjdumpCommand.js +5 -2
- package/dist/pcap/PcapOutput.js +38 -2
- package/dist/pcap/PcapProvider.js +45 -15
- package/dist/pcap/PcapSnapshot.js +24 -4
- package/dist/process/ArtifactAnalysisResources.js +145 -52
- package/dist/process/BoundedFileBytes.js +8 -3
- package/dist/process/CurrentEntrypointPath.js +3 -1
- package/dist/process/DarwinProcessRunTokenReader.js +174 -63
- package/dist/process/DetachedPgpSignature.js +57 -0
- package/dist/process/ExecFileOutput.js +14 -11
- package/dist/{hopper/HopperTargetLease.js → process/HopperLease.js} +10 -0
- package/dist/process/LinuxResourceLimits.js +4 -24
- package/dist/process/OwnedCommand.js +109 -14
- package/dist/process/ProviderProcess.js +129 -10
- package/dist/process/RegexMatcher.js +96 -0
- package/dist/process/SharedStartupAttempt.js +59 -0
- package/dist/process/WindowsAuthority.js +1 -1
- package/dist/process/capture/FilesystemSnapshot.js +3 -2
- package/dist/process/capture/ProcessCaptureError.js +55 -17
- package/dist/process/capture/ProcessCaptureLifecycle.js +17 -20
- package/dist/process/capture/ProcessCaptureProgress.js +5 -3
- package/dist/process/capture/ProcessHarness.js +17 -3
- package/dist/process/snapshotEnvironment.js +8 -8
- package/dist/{application/binary → providers}/AnalysisClientCleanup.js +3 -3
- package/dist/providers/AnalysisClientCreation.js +193 -0
- package/dist/providers/AnalysisClientFailure.js +191 -0
- package/dist/providers/DeferredAnalysisClient.js +48 -0
- package/dist/providers/OwnedCommandCleanup.js +65 -0
- package/dist/providers/ProviderInspectionScope.js +10 -0
- package/dist/recordedCatalogDigests.js +2 -0
- package/dist/reference/ReferenceSourceReader.js +64 -0
- package/dist/reference/ReferenceSourceReaderEntries.js +12 -3
- package/dist/reference/ReferenceSourceReaderFile.js +2 -1
- package/dist/rizin/RizinCommand.js +2 -2
- package/dist/rizin/RizinDebugSessionManager.js +249 -210
- package/dist/rust/RustBinaryProvider.js +55 -23
- package/dist/server/EvidenceMcpServer.js +2 -2
- package/dist/server/contractToolHandler.js +17 -11
- package/dist/server/createServer.js +27 -8
- package/dist/server/promptCompletion.js +24 -22
- package/dist/server/registerArtifactComparisonTool.js +13 -2
- package/dist/server/registerBrowserScenarioTool.js +7 -5
- package/dist/server/registerBrowserTools.js +2 -4
- package/dist/server/registerCutterTools.js +2 -3
- package/dist/server/registerElectronTools.js +2 -13
- package/dist/server/registerFridaTools.js +8 -12
- package/dist/server/registerInvestigationTools.js +20 -20
- package/dist/server/registerJavaScriptRuntimeObservationTools.js +2 -4
- package/dist/server/registerManagedWorkflowTools/evidence.js +14 -7
- package/dist/server/registerProcessComparisonTool.js +3 -0
- package/dist/server/registerSessionStatusTool.js +13 -6
- package/dist/server/registerSessionTools.js +16 -29
- package/dist/server/runDerivedOperation.js +2 -0
- package/dist/signals/SigrokRecordingProvider.js +13 -6
- package/dist/sqlite/SqliteDatabaseFailures.js +25 -12
- package/dist/sqlite/SqliteDatabaseInspection.js +27 -12
- package/dist/sqlite/SqliteDatabaseSnapshot.js +58 -32
- package/dist/sqlite/SqliteDatabaseWorkerExecution.js +18 -3
- package/dist/wasm/WabtArtifactProvider.js +64 -42
- package/dist/wasm/WabtFailures.js +19 -1
- package/dist/wasm/WabtRuntime.js +58 -0
- package/dist/wasm/WasmGlueAdapter.js +20 -7
- package/dist/windows/WindowsNativeLoader.js +16 -2
- package/dist/windows/WindowsPrivateRuntime.js +44 -1
- package/licenses/npm-dependencies.txt +146 -1
- package/licenses/npm-runtime-notices.txt +175 -1
- package/native/windows/README.md +44 -7
- package/native/windows/build/manifest.json +2 -2
- package/native/windows/build/rea-windows-x64.node +0 -0
- package/package.json +11 -3
- package/scripts/electron-active-hook-boundaries.cjs +15 -2
- package/scripts/electron-active-hook.cjs +408 -46
- package/scripts/hopper-demo-x11.py +12 -10
- package/scripts/rea.mjs +62 -15
- package/skills/reverse-engineer-anything/SKILL.md +21 -7
- package/skills/reverse-engineer-anything/references/android-applications.md +3 -1
- package/skills/reverse-engineer-anything/references/javascript-applications.md +44 -1
- package/skills/reverse-engineer-anything/references/native-and-artifacts.md +30 -10
- package/dist/cli-runtime/ArtifactResourceScope-DQWTcUwE.js +0 -114
- package/dist/cli-runtime/ClientConfigPath-c6jr6INc.js +0 -36
- package/dist/cli-runtime/IdaConfiguration-CtGP7EKo.js +0 -1094
- package/dist/cli-runtime/JebMcpEndpoint-DUytrn5G.js +0 -428
- package/dist/cli-runtime/MacHopperPaths-CwL5lYPX.js +0 -434
- package/dist/cli-runtime/OwnedCommand-Cj9GhmPR.js +0 -112
- package/dist/cli-runtime/RegularFile-B_6KPCNQ.js +0 -139
- package/dist/cli-runtime/RegularFileRead-DVlC5faM.js +0 -125
- package/dist/cli-runtime/analysisErrorPresentation-DGt7TdsH.js +0 -497
- package/dist/cli-runtime/application__javascript__ElectronObservationService-DEsR8KDN.js +0 -63
- package/dist/cli-runtime/artifactOperationError-B7n03FbD.js +0 -27
- package/dist/cli-runtime/browserObservationError-Dx6xRTjb.js +0 -40
- package/dist/cli-runtime/cliResultOutput-DsRMI8CJ.js +0 -780
- package/dist/cli-runtime/mcpStartupPolicy-CVVSOmRc.js +0 -21
- package/dist/cli-runtime/propertyListKeys-G8e74YWb.js +0 -248
- package/dist/cli-runtime/providerAdapterError-DAjhICdr.js +0 -25
- package/dist/cli-runtime/readFileHandleChunks-dp60iZ6v.js +0 -38
- package/dist/hopper/HopperRegexWorker.js +0 -27
- package/dist/mcp/ArtifactProviderMetadata-b7pOK5_t.js +0 -76
- package/dist/mcp/ArtifactResourceScope-P3tq5z8Z.js +0 -162
- package/dist/mcp/BoundedFileBytes-DuczXiQZ.js +0 -68
- package/dist/mcp/CdpTargetSession-BsPoKhEU.js +0 -86
- package/dist/mcp/ProcedureAddressResolution-CQpuwm1h.js +0 -19
- package/dist/mcp/analysisErrorCore-DXRTvF_m.js +0 -235
- package/dist/mcp/artifactOperationError-CkHMMaf7.js +0 -27
- package/dist/mcp/digests-BFoWUT_-.js +0 -223
- package/dist/mcp/propertyListKeys-DD25WsjI.js +0 -553
- package/dist/mcp/providerAdapterError-sDxToNal.js +0 -25
- package/dist/mcp/unicodeCodePointOrder-BezCbTpg.js +0 -26
|
@@ -1,166 +1,11 @@
|
|
|
1
1
|
import { __esmMin } from "./rolldown-runtime-DXoylpqc.js";
|
|
2
|
-
import { canonicalJson, canonicalJsonDigestSteps, compareUnicodeCodePoints, digestCanonicalValue, digestSchema, init_artifactGraph, init_canonicalDigest, init_canonicalJsonDigestSteps, init_canonicalOrdering, init_comparisonSemantics, init_digests, init_localPath, init_unicodeCodePointOrder, integrityContradictionSchema, localPathStringSchema, prefixedDigestSchema, uniqueSorted } from "./reconstructionObligationLedgerSchemas-
|
|
3
|
-
import { freezeJsonSnapshot, freezeOwnedJsonSnapshotSteps, init_immutableJson, init_jsonValue, jsonValueSchema } from "./errorSchemas-
|
|
2
|
+
import { canonicalJson, canonicalJsonDigestSteps, compareUnicodeCodePoints, digestCanonicalValue, digestSchema, init_artifactGraph, init_canonicalDigest, init_canonicalJsonDigestSteps, init_canonicalOrdering, init_comparisonSemantics, init_digests, init_localPath, init_unicodeCodePointOrder, integrityContradictionSchema, localPathStringSchema, prefixedDigestSchema, uniqueSorted } from "./reconstructionObligationLedgerSchemas-Bi6sect1.js";
|
|
3
|
+
import { freezeJsonSnapshot, freezeOwnedJsonSnapshotSteps, init_immutableJson, init_jsonValue, jsonValueSchema } from "./errorSchemas-Ixz_q7qt.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { posix } from "node:path";
|
|
6
6
|
import { domainToASCII, fileURLToPath, pathToFileURL } from "node:url";
|
|
7
7
|
import { TraceMap } from "@jridgewell/trace-mapping";
|
|
8
8
|
|
|
9
|
-
//#region dist/domain/javascript/javascriptSourceSelection.js
|
|
10
|
-
var javaScriptSourcePathsSchema, javaScriptSourceSelectionSchema;
|
|
11
|
-
function init_javascriptSourceSelection() {
|
|
12
|
-
return (init_javascriptSourceSelection = __esmMin((() => {
|
|
13
|
-
javaScriptSourcePathsSchema = z.array(z.string().min(1)).min(1).describe("Exact relevant file paths from the artifact inventory, relative to the application root, analyzed in first-request order before unselected scopes; no globs or implicit dependencies. Omit to analyze all sources.");
|
|
14
|
-
javaScriptSourceSelectionSchema = z.strictObject({
|
|
15
|
-
requested_paths: javaScriptSourcePathsSchema,
|
|
16
|
-
unselected_files: z.number().int().min(0)
|
|
17
|
-
});
|
|
18
|
-
})))();
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region dist/domain/zodCollectionSteps.js
|
|
23
|
-
/** Elements validated between yields, in the issues and paths a whole-array parse reports. */
|
|
24
|
-
function* parseElementSteps(element, values, path, issues) {
|
|
25
|
-
const parsed = [];
|
|
26
|
-
for (const [index, value] of values.entries()) {
|
|
27
|
-
if (index % 64 === 0) yield;
|
|
28
|
-
const result = element.safeParse(value);
|
|
29
|
-
if (result.success) parsed.push(result.data);
|
|
30
|
-
else issues.push(...result.error.issues.map((issue) => ({
|
|
31
|
-
...issue,
|
|
32
|
-
path: [
|
|
33
|
-
...path,
|
|
34
|
-
index,
|
|
35
|
-
...issue.path
|
|
36
|
-
]
|
|
37
|
-
})));
|
|
38
|
-
}
|
|
39
|
-
return parsed;
|
|
40
|
-
}
|
|
41
|
-
var arrayContainerSchema;
|
|
42
|
-
function init_zodCollectionSteps() {
|
|
43
|
-
return (init_zodCollectionSteps = __esmMin((() => {
|
|
44
|
-
arrayContainerSchema = (array) => array.clone({
|
|
45
|
-
...array.def,
|
|
46
|
-
element: z.unknown()
|
|
47
|
-
});
|
|
48
|
-
})))();
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region dist/domain/javascript/javascriptSourceMapPaths.js
|
|
53
|
-
var javascriptSourceMapReferenceSchema, resolveJavaScriptSourceMapReferences, resolveJavaScriptSourceMapUrl, resolveSourceMapUrls, resolveJavaScriptSourceMapPath, unusableHost, carriesUsableHost, windowsFileUrl, decodedUrlPath;
|
|
54
|
-
function init_javascriptSourceMapPaths() {
|
|
55
|
-
return (init_javascriptSourceMapPaths = __esmMin((() => {
|
|
56
|
-
javascriptSourceMapReferenceSchema = z.strictObject({
|
|
57
|
-
source_name: z.string(),
|
|
58
|
-
source_root: z.string().nullable(),
|
|
59
|
-
map_path: z.string().min(1),
|
|
60
|
-
resolution: z.discriminatedUnion("kind", [z.strictObject({
|
|
61
|
-
kind: z.enum(["artifact-relative", "suffix"]),
|
|
62
|
-
path: z.string().min(1)
|
|
63
|
-
}), z.strictObject({
|
|
64
|
-
kind: z.literal("unresolved"),
|
|
65
|
-
reason: z.string().min(1)
|
|
66
|
-
})])
|
|
67
|
-
});
|
|
68
|
-
resolveJavaScriptSourceMapReferences = (sourceNames, sourceRoot, mapPath) => {
|
|
69
|
-
if (sourceNames.length === 0) return [];
|
|
70
|
-
const resolvedSources = resolveSourceMapUrls(sourceNames.map((sourceName) => sourceName ?? ""), sourceRoot, "");
|
|
71
|
-
return sourceNames.map((sourceName, index) => {
|
|
72
|
-
if (sourceName === null) return null;
|
|
73
|
-
const reference = resolvedSources[index];
|
|
74
|
-
if (reference === undefined) throw new TypeError(`TraceMap did not resolve source declaration ${String(index)}`);
|
|
75
|
-
return {
|
|
76
|
-
source_name: sourceName,
|
|
77
|
-
source_root: sourceRoot,
|
|
78
|
-
map_path: mapPath,
|
|
79
|
-
resolution: resolveJavaScriptSourceMapPath(reference, mapPath)
|
|
80
|
-
};
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
resolveJavaScriptSourceMapUrl = (source, sourceRoot, mapUrl) => {
|
|
84
|
-
const resolved = resolveSourceMapUrls([source ?? ""], sourceRoot, mapUrl)[0];
|
|
85
|
-
if (resolved === undefined) throw new TypeError("TraceMap did not resolve its single source declaration");
|
|
86
|
-
return resolved;
|
|
87
|
-
};
|
|
88
|
-
resolveSourceMapUrls = (sources, sourceRoot, mapUrl) => new TraceMap({
|
|
89
|
-
version: 3,
|
|
90
|
-
names: [],
|
|
91
|
-
sources,
|
|
92
|
-
...sourceRoot == null ? {} : { sourceRoot },
|
|
93
|
-
mappings: ""
|
|
94
|
-
}, mapUrl).resolvedSources;
|
|
95
|
-
resolveJavaScriptSourceMapPath = (source, mapPath) => {
|
|
96
|
-
const portable = source.replaceAll("\\", "/");
|
|
97
|
-
const windowsPath = /^[a-z]:\//iu.test(portable) || source.startsWith("\\\\");
|
|
98
|
-
const anchor = `/${"source/".repeat(portable.split("/").length + 1)}`;
|
|
99
|
-
const directory = posix.join(anchor, posix.dirname(mapPath));
|
|
100
|
-
const base = pathToFileURL(`${directory}/`, { windows: false });
|
|
101
|
-
const absolute = windowsPath ? windowsFileUrl(source) : URL.parse(source);
|
|
102
|
-
const resolved = windowsPath ? absolute : URL.parse(source, base);
|
|
103
|
-
if (resolved === null) return {
|
|
104
|
-
kind: "unresolved",
|
|
105
|
-
reason: "Source reference is not a valid URL or filesystem path."
|
|
106
|
-
};
|
|
107
|
-
if (!resolved.pathname.startsWith("/")) return {
|
|
108
|
-
kind: "unresolved",
|
|
109
|
-
reason: "Source reference uses a non-hierarchical URL without a file pathname."
|
|
110
|
-
};
|
|
111
|
-
if (resolved.pathname.endsWith("/")) return {
|
|
112
|
-
kind: "unresolved",
|
|
113
|
-
reason: "Source reference names a directory rather than a file."
|
|
114
|
-
};
|
|
115
|
-
const declaredPath = windowsPath ? absolute?.pathname ?? "" : URL.parse(source, "file:///")?.pathname ?? "";
|
|
116
|
-
if (/%(?:2f|5c)/iu.test(declaredPath)) return {
|
|
117
|
-
kind: "unresolved",
|
|
118
|
-
reason: "Source reference contains an encoded path separator."
|
|
119
|
-
};
|
|
120
|
-
const relative = absolute === null ? !portable.startsWith("/") : absolute.href !== resolved.href;
|
|
121
|
-
const path = decodedUrlPath(resolved);
|
|
122
|
-
if (path === null) return {
|
|
123
|
-
kind: "unresolved",
|
|
124
|
-
reason: "Source reference has malformed URL encoding or an invalid file URL."
|
|
125
|
-
};
|
|
126
|
-
const value = relative ? posix.relative(anchor, path) : path.replace(/^\/+/, "");
|
|
127
|
-
if (value === "" || value === ".." || value.startsWith("../")) return {
|
|
128
|
-
kind: "unresolved",
|
|
129
|
-
reason: "Source reference resolves outside the inventoried artifact."
|
|
130
|
-
};
|
|
131
|
-
return {
|
|
132
|
-
path: value,
|
|
133
|
-
kind: relative ? "artifact-relative" : "suffix"
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
unusableHost = /[\0\t\n\r #/:<>?@[\\\]^|%]/u;
|
|
137
|
-
carriesUsableHost = (host) => !unusableHost.test(host) && domainToASCII(host) !== "";
|
|
138
|
-
windowsFileUrl = (path) => {
|
|
139
|
-
if (path.startsWith("\\\\") && !carriesUsableHost(path.slice(2).split("\\")[0] ?? "")) return null;
|
|
140
|
-
try {
|
|
141
|
-
return pathToFileURL(path, { windows: true });
|
|
142
|
-
} catch (cause) {
|
|
143
|
-
if (cause instanceof TypeError) return null;
|
|
144
|
-
throw cause;
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
decodedUrlPath = (url) => {
|
|
148
|
-
try {
|
|
149
|
-
if (url.protocol === "file:") {
|
|
150
|
-
const windows = url.hostname !== "" && url.hostname !== "localhost";
|
|
151
|
-
const path = fileURLToPath(url, { windows });
|
|
152
|
-
return windows ? path.replaceAll("\\", "/") : path;
|
|
153
|
-
}
|
|
154
|
-
return `${url.host}${decodeURIComponent(url.pathname)}`;
|
|
155
|
-
} catch (cause) {
|
|
156
|
-
if (cause instanceof URIError || cause instanceof TypeError) return null;
|
|
157
|
-
throw cause;
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
})))();
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
//#endregion
|
|
164
9
|
//#region dist/domain/javascript/javascriptApplicationEvidenceSchemas.js
|
|
165
10
|
var boundedTextSchema$2, boundedKeySchema, unsafePathSegments, isSafeRelativePath, relativePathSchema$1, applicationEvidenceAuthoritySchema, applicationFactStateSchema, applicationConfidenceSchema, applicationUnavailableReasonSchema, unavailableFactSchema, availableArtifactSchema, applicationArtifactReferenceSchema, sourceRangeSchema$1, fileOffsetRangeSchema, applicationLocationSchema, applicationLocationReferenceSchema, applicationExtractorSchema, applicationLimitSchema, coverageLimitsSchema, omittedCountSchema, applicationCoverageSchema, completeApplicationCoverage, partialApplicationCoverage, truncatedApplicationCoverage, applicationGraphEvidenceBaseSchema, applicationGraphEvidenceContextSchema, applicationGraphEvidenceLocationSchema, checkAuthorityState, checkStateConfidence, checkTraceability, checkArtifactBacking, applicationGraphEvidenceSchema, applicationNodeIdentitySchema;
|
|
166
11
|
function init_javascriptApplicationEvidenceSchemas() {
|
|
@@ -512,102 +357,546 @@ function init_javascriptApplicationEvidenceSchemas() {
|
|
|
512
357
|
}
|
|
513
358
|
|
|
514
359
|
//#endregion
|
|
515
|
-
//#region dist/domain/javascript/
|
|
516
|
-
var boundedTextSchema$1,
|
|
517
|
-
function
|
|
518
|
-
return (
|
|
519
|
-
init_javascriptSourceMapPaths();
|
|
360
|
+
//#region dist/domain/javascript/javascriptSemanticGraphSchemas.js
|
|
361
|
+
var boundedTextSchema$1, semanticNodeIdSchema, semanticRelationIdSchema, semanticUnknownIdSchema, semanticEvidenceContextIdSchema, javaScriptSemanticEvidenceContextSchema, javaScriptSemanticEvidenceReferenceSchema, JAVASCRIPT_SEMANTIC_NODE_KINDS, JAVASCRIPT_SEMANTIC_RELATION_FAMILIES, JAVASCRIPT_SEMANTIC_RELATIONS, JAVASCRIPT_SEMANTIC_RELATION_FAMILY, relativePathSchema, sourcePointSchema, sourceRangeSchema, semanticPropertiesSchema, semanticNodeIdentitySchema, javaScriptSemanticNodeInputSchema, javaScriptSemanticNodeSchema, javaScriptSemanticRelationInputSchema, javaScriptSemanticRelationSchema, JAVASCRIPT_SEMANTIC_UNKNOWN_REASONS, javaScriptSemanticUnknownOmissionSchema, javaScriptSemanticUnknownOmissionsSchema, javaScriptSemanticUnknownInputSchema, javaScriptSemanticUnknownSchema, fingerprintComponentsSchema, javaScriptSemanticFingerprintInputSchema, javaScriptSemanticFingerprintSchema, familyCoverageSchema, graphCoverageSchema, javaScriptSemanticGraphInputSchema, javaScriptSemanticGraphRecordSchema;
|
|
362
|
+
function init_javascriptSemanticGraphSchemas() {
|
|
363
|
+
return (init_javascriptSemanticGraphSchemas = __esmMin((() => {
|
|
520
364
|
init_javascriptApplicationEvidenceSchemas();
|
|
521
365
|
init_jsonValue();
|
|
522
366
|
init_digests();
|
|
523
367
|
boundedTextSchema$1 = z.string().min(1);
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
"electron-utility",
|
|
533
|
-
"javascript-asset",
|
|
534
|
-
"javascript-chunk",
|
|
535
|
-
"javascript-module",
|
|
536
|
-
"javascript-expression",
|
|
537
|
-
"source-map",
|
|
538
|
-
"source-module",
|
|
539
|
-
"browser-window",
|
|
540
|
-
"frame",
|
|
541
|
-
"target",
|
|
542
|
-
"context-bridge-api",
|
|
543
|
-
"ipc-channel",
|
|
544
|
-
"ipc-handler",
|
|
545
|
-
"worker",
|
|
546
|
-
"service-worker",
|
|
547
|
-
"endpoint",
|
|
548
|
-
"storage",
|
|
549
|
-
"native-addon",
|
|
550
|
-
"native-export",
|
|
551
|
-
"managed-assembly",
|
|
552
|
-
"managed-module",
|
|
553
|
-
"managed-type",
|
|
554
|
-
"managed-method",
|
|
555
|
-
"managed-field",
|
|
556
|
-
"managed-pinvoke-import",
|
|
557
|
-
"managed-native-implementation",
|
|
558
|
-
"runtime-script-instance",
|
|
559
|
-
"unknown"
|
|
560
|
-
];
|
|
561
|
-
applicationNodeKindSchema = z.enum(JAVASCRIPT_APPLICATION_NODE_KINDS);
|
|
562
|
-
JAVASCRIPT_APPLICATION_RELATIONS = [
|
|
563
|
-
"contains",
|
|
564
|
-
"loads",
|
|
565
|
-
"imports",
|
|
566
|
-
"maps_to",
|
|
567
|
-
"exposes",
|
|
568
|
-
"sends",
|
|
569
|
-
"invokes",
|
|
570
|
-
"handles",
|
|
571
|
-
"calls",
|
|
572
|
-
"persists_to",
|
|
573
|
-
"observed_as",
|
|
574
|
-
"changed_from"
|
|
575
|
-
];
|
|
576
|
-
applicationRelationSchema = z.enum(JAVASCRIPT_APPLICATION_RELATIONS);
|
|
577
|
-
applicationPropertiesSchema = z.record(z.string().min(1), jsonValueSchema);
|
|
578
|
-
applicationNodeObservationBaseSchema = z.strictObject({
|
|
579
|
-
label: z.string().min(1).nullable(),
|
|
580
|
-
source_map_reference: javascriptSourceMapReferenceSchema.nullable(),
|
|
581
|
-
properties: applicationPropertiesSchema,
|
|
582
|
-
evidence: applicationGraphEvidenceSchema
|
|
583
|
-
});
|
|
584
|
-
applicationNodeObservationInputSchema = applicationNodeObservationBaseSchema.extend({ source_map_reference: javascriptSourceMapReferenceSchema.nullable().default(null) });
|
|
585
|
-
applicationNodeObservationSchema = applicationNodeObservationBaseSchema.extend({
|
|
586
|
-
observation_id: prefixedDigestSchema("jag_observation"),
|
|
587
|
-
identifier_strategy: z.strictObject({
|
|
588
|
-
strategy: z.literal("semantic-content-sha256"),
|
|
589
|
-
stability: z.literal("observation-exact")
|
|
590
|
-
})
|
|
591
|
-
});
|
|
592
|
-
applicationNodeInputSchema = z.strictObject({
|
|
593
|
-
kind: applicationNodeKindSchema,
|
|
594
|
-
identity: applicationNodeIdentitySchema,
|
|
595
|
-
observations: z.array(applicationNodeObservationInputSchema).min(1)
|
|
596
|
-
});
|
|
597
|
-
applicationNodeSchema = z.strictObject({
|
|
598
|
-
node_id: prefixedDigestSchema("jag_node"),
|
|
599
|
-
kind: applicationNodeKindSchema,
|
|
600
|
-
identity: applicationNodeIdentitySchema,
|
|
601
|
-
observations: z.array(applicationNodeObservationSchema).min(1)
|
|
602
|
-
});
|
|
603
|
-
applicationEdgeInputSchema = z.strictObject({
|
|
604
|
-
source_node_id: prefixedDigestSchema("jag_node"),
|
|
605
|
-
target_node_id: prefixedDigestSchema("jag_node"),
|
|
606
|
-
relation: applicationRelationSchema,
|
|
607
|
-
properties: applicationPropertiesSchema,
|
|
608
|
-
evidence: applicationGraphEvidenceSchema
|
|
368
|
+
semanticNodeIdSchema = prefixedDigestSchema("jsrg_node");
|
|
369
|
+
semanticRelationIdSchema = z.string().regex(/^jsrg_relation_[a-f0-9]{64}$/u);
|
|
370
|
+
semanticUnknownIdSchema = z.string().regex(/^jsrg_unknown_[a-f0-9]{64}$/u);
|
|
371
|
+
semanticEvidenceContextIdSchema = z.string().regex(/^jsrg_evidence_[a-f0-9]{64}$/u);
|
|
372
|
+
javaScriptSemanticEvidenceContextSchema = applicationGraphEvidenceContextSchema.extend({ context_id: semanticEvidenceContextIdSchema });
|
|
373
|
+
javaScriptSemanticEvidenceReferenceSchema = z.strictObject({
|
|
374
|
+
context_id: semanticEvidenceContextIdSchema,
|
|
375
|
+
location: applicationGraphEvidenceLocationSchema
|
|
609
376
|
});
|
|
610
|
-
|
|
377
|
+
JAVASCRIPT_SEMANTIC_NODE_KINDS = [
|
|
378
|
+
"module",
|
|
379
|
+
"function",
|
|
380
|
+
"parameter",
|
|
381
|
+
"binding",
|
|
382
|
+
"expression",
|
|
383
|
+
"literal",
|
|
384
|
+
"property-slot",
|
|
385
|
+
"call-site",
|
|
386
|
+
"return-site",
|
|
387
|
+
"closure-capture",
|
|
388
|
+
"promise",
|
|
389
|
+
"task",
|
|
390
|
+
"event",
|
|
391
|
+
"listener",
|
|
392
|
+
"timer",
|
|
393
|
+
"child-process",
|
|
394
|
+
"stdio",
|
|
395
|
+
"signal",
|
|
396
|
+
"config-source",
|
|
397
|
+
"request",
|
|
398
|
+
"response",
|
|
399
|
+
"boundary",
|
|
400
|
+
"resource",
|
|
401
|
+
"unknown-frontier"
|
|
402
|
+
];
|
|
403
|
+
JAVASCRIPT_SEMANTIC_RELATION_FAMILIES = [
|
|
404
|
+
"boundary",
|
|
405
|
+
"call-flow",
|
|
406
|
+
"child-process",
|
|
407
|
+
"closure",
|
|
408
|
+
"configuration",
|
|
409
|
+
"data-flow",
|
|
410
|
+
"event",
|
|
411
|
+
"object-flow",
|
|
412
|
+
"promise-ownership",
|
|
413
|
+
"request",
|
|
414
|
+
"resource-lifecycle",
|
|
415
|
+
"timer"
|
|
416
|
+
];
|
|
417
|
+
JAVASCRIPT_SEMANTIC_RELATIONS = [
|
|
418
|
+
"acquires",
|
|
419
|
+
"aggregates",
|
|
420
|
+
"aliases",
|
|
421
|
+
"argument-to-parameter",
|
|
422
|
+
"awaits",
|
|
423
|
+
"calls",
|
|
424
|
+
"cancels-timer",
|
|
425
|
+
"captures",
|
|
426
|
+
"chains",
|
|
427
|
+
"coerces",
|
|
428
|
+
"connects-stdio",
|
|
429
|
+
"consumed-by",
|
|
430
|
+
"constructs-request",
|
|
431
|
+
"creates-promise",
|
|
432
|
+
"defaults",
|
|
433
|
+
"defines",
|
|
434
|
+
"destructures",
|
|
435
|
+
"detaches-task",
|
|
436
|
+
"dispatches-candidate",
|
|
437
|
+
"forwards-signal",
|
|
438
|
+
"listens-error",
|
|
439
|
+
"listens-exit",
|
|
440
|
+
"owns",
|
|
441
|
+
"overrides",
|
|
442
|
+
"parses",
|
|
443
|
+
"reads",
|
|
444
|
+
"reads-argv",
|
|
445
|
+
"reads-config",
|
|
446
|
+
"reads-environment",
|
|
447
|
+
"reads-property",
|
|
448
|
+
"registers-listener",
|
|
449
|
+
"releases",
|
|
450
|
+
"removes-listener",
|
|
451
|
+
"returns-task",
|
|
452
|
+
"returns-to-call",
|
|
453
|
+
"schedules-timer",
|
|
454
|
+
"spawns",
|
|
455
|
+
"spreads",
|
|
456
|
+
"supplies-argv",
|
|
457
|
+
"supplies-env",
|
|
458
|
+
"supplies-request-field",
|
|
459
|
+
"validates",
|
|
460
|
+
"writes",
|
|
461
|
+
"writes-property"
|
|
462
|
+
];
|
|
463
|
+
JAVASCRIPT_SEMANTIC_RELATION_FAMILY = {
|
|
464
|
+
acquires: "resource-lifecycle",
|
|
465
|
+
aggregates: "promise-ownership",
|
|
466
|
+
aliases: "data-flow",
|
|
467
|
+
"argument-to-parameter": "call-flow",
|
|
468
|
+
awaits: "promise-ownership",
|
|
469
|
+
calls: "call-flow",
|
|
470
|
+
"cancels-timer": "timer",
|
|
471
|
+
captures: "closure",
|
|
472
|
+
chains: "promise-ownership",
|
|
473
|
+
coerces: "boundary",
|
|
474
|
+
"connects-stdio": "child-process",
|
|
475
|
+
"consumed-by": "request",
|
|
476
|
+
"constructs-request": "request",
|
|
477
|
+
"creates-promise": "promise-ownership",
|
|
478
|
+
defaults: "configuration",
|
|
479
|
+
defines: "data-flow",
|
|
480
|
+
destructures: "object-flow",
|
|
481
|
+
"detaches-task": "promise-ownership",
|
|
482
|
+
"dispatches-candidate": "event",
|
|
483
|
+
"forwards-signal": "child-process",
|
|
484
|
+
"listens-error": "child-process",
|
|
485
|
+
"listens-exit": "child-process",
|
|
486
|
+
owns: "promise-ownership",
|
|
487
|
+
overrides: "configuration",
|
|
488
|
+
parses: "boundary",
|
|
489
|
+
reads: "data-flow",
|
|
490
|
+
"reads-argv": "configuration",
|
|
491
|
+
"reads-config": "configuration",
|
|
492
|
+
"reads-environment": "configuration",
|
|
493
|
+
"reads-property": "object-flow",
|
|
494
|
+
"registers-listener": "event",
|
|
495
|
+
releases: "resource-lifecycle",
|
|
496
|
+
"removes-listener": "event",
|
|
497
|
+
"returns-task": "promise-ownership",
|
|
498
|
+
"returns-to-call": "call-flow",
|
|
499
|
+
"schedules-timer": "timer",
|
|
500
|
+
spawns: "child-process",
|
|
501
|
+
spreads: "object-flow",
|
|
502
|
+
"supplies-argv": "child-process",
|
|
503
|
+
"supplies-env": "child-process",
|
|
504
|
+
"supplies-request-field": "request",
|
|
505
|
+
validates: "boundary",
|
|
506
|
+
writes: "data-flow",
|
|
507
|
+
"writes-property": "object-flow"
|
|
508
|
+
};
|
|
509
|
+
relativePathSchema = z.string().min(1).refine((path) => !path.startsWith("/") && path.split("/").every((part) => ![
|
|
510
|
+
"",
|
|
511
|
+
".",
|
|
512
|
+
".."
|
|
513
|
+
].includes(part)), "Expected a normalized relative POSIX path without traversal");
|
|
514
|
+
sourcePointSchema = z.strictObject({
|
|
515
|
+
line: z.number().int().min(1),
|
|
516
|
+
column: z.number().int().min(0)
|
|
517
|
+
});
|
|
518
|
+
sourceRangeSchema = z.strictObject({
|
|
519
|
+
start: sourcePointSchema,
|
|
520
|
+
end: sourcePointSchema
|
|
521
|
+
}).superRefine((range, context) => {
|
|
522
|
+
if (range.end.line < range.start.line || range.end.line === range.start.line && range.end.column < range.start.column) context.addIssue({
|
|
523
|
+
code: "custom",
|
|
524
|
+
path: ["end"],
|
|
525
|
+
message: "Source range end must not precede its start"
|
|
526
|
+
});
|
|
527
|
+
});
|
|
528
|
+
semanticPropertiesSchema = z.record(z.string().min(1), jsonValueSchema);
|
|
529
|
+
semanticNodeIdentitySchema = z.strictObject({
|
|
530
|
+
artifact_sha256: digestSchema,
|
|
531
|
+
module_path: relativePathSchema,
|
|
532
|
+
source_range: sourceRangeSchema.nullable(),
|
|
533
|
+
role_key: z.string().min(1)
|
|
534
|
+
});
|
|
535
|
+
javaScriptSemanticNodeInputSchema = z.strictObject({
|
|
536
|
+
kind: z.enum(JAVASCRIPT_SEMANTIC_NODE_KINDS),
|
|
537
|
+
identity: semanticNodeIdentitySchema,
|
|
538
|
+
function_node_id: semanticNodeIdSchema.nullable(),
|
|
539
|
+
application_node_ids: z.array(prefixedDigestSchema("jag_node")),
|
|
540
|
+
label: z.string().min(1).nullable(),
|
|
541
|
+
properties: semanticPropertiesSchema,
|
|
542
|
+
evidence: applicationGraphEvidenceSchema
|
|
543
|
+
});
|
|
544
|
+
javaScriptSemanticNodeSchema = javaScriptSemanticNodeInputSchema.extend({
|
|
545
|
+
evidence: javaScriptSemanticEvidenceReferenceSchema,
|
|
546
|
+
node_id: semanticNodeIdSchema.describe("SHA-256 of the node kind and identity; stable for one artifact version.")
|
|
547
|
+
});
|
|
548
|
+
javaScriptSemanticRelationInputSchema = z.strictObject({
|
|
549
|
+
source_node_id: semanticNodeIdSchema,
|
|
550
|
+
target_node_id: semanticNodeIdSchema,
|
|
551
|
+
relation: z.enum(JAVASCRIPT_SEMANTIC_RELATIONS),
|
|
552
|
+
resolution: z.enum(["resolved", "candidate"]),
|
|
553
|
+
properties: semanticPropertiesSchema,
|
|
554
|
+
evidence: applicationGraphEvidenceSchema
|
|
555
|
+
});
|
|
556
|
+
javaScriptSemanticRelationSchema = javaScriptSemanticRelationInputSchema.extend({
|
|
557
|
+
evidence: javaScriptSemanticEvidenceReferenceSchema,
|
|
558
|
+
relation_id: semanticRelationIdSchema.describe("SHA-256 of the exact relation content, including its evidence reference.")
|
|
559
|
+
});
|
|
560
|
+
JAVASCRIPT_SEMANTIC_UNKNOWN_REASONS = [
|
|
561
|
+
"ambiguous-target",
|
|
562
|
+
"bound-reached",
|
|
563
|
+
"dynamic-call",
|
|
564
|
+
"dynamic-property",
|
|
565
|
+
"dynamic-scope",
|
|
566
|
+
"eval-or-generated-code",
|
|
567
|
+
"incomplete-module",
|
|
568
|
+
"missing-source",
|
|
569
|
+
"resource-limit",
|
|
570
|
+
"unknown-value",
|
|
571
|
+
"unsupported-syntax"
|
|
572
|
+
];
|
|
573
|
+
javaScriptSemanticUnknownOmissionSchema = z.strictObject({
|
|
574
|
+
family: z.enum(JAVASCRIPT_SEMANTIC_RELATION_FAMILIES),
|
|
575
|
+
reason: z.enum(JAVASCRIPT_SEMANTIC_UNKNOWN_REASONS),
|
|
576
|
+
occurrences: z.number().int().positive()
|
|
577
|
+
});
|
|
578
|
+
javaScriptSemanticUnknownOmissionsSchema = z.array(javaScriptSemanticUnknownOmissionSchema).min(1).max(JAVASCRIPT_SEMANTIC_RELATION_FAMILIES.length * JAVASCRIPT_SEMANTIC_UNKNOWN_REASONS.length);
|
|
579
|
+
javaScriptSemanticUnknownInputSchema = z.strictObject({
|
|
580
|
+
node_id: semanticNodeIdSchema.nullable(),
|
|
581
|
+
family: z.enum(JAVASCRIPT_SEMANTIC_RELATION_FAMILIES),
|
|
582
|
+
relation_kinds: z.array(z.enum(JAVASCRIPT_SEMANTIC_RELATIONS)).min(1),
|
|
583
|
+
reason: z.enum(JAVASCRIPT_SEMANTIC_UNKNOWN_REASONS),
|
|
584
|
+
detail: boundedTextSchema$1,
|
|
585
|
+
candidate_node_ids: z.array(semanticNodeIdSchema),
|
|
586
|
+
evidence: applicationGraphEvidenceSchema
|
|
587
|
+
});
|
|
588
|
+
javaScriptSemanticUnknownSchema = javaScriptSemanticUnknownInputSchema.extend({
|
|
589
|
+
evidence: javaScriptSemanticEvidenceReferenceSchema,
|
|
590
|
+
unknown_id: semanticUnknownIdSchema
|
|
591
|
+
});
|
|
592
|
+
fingerprintComponentsSchema = z.strictObject({
|
|
593
|
+
parameter_arity: z.number().int().min(0),
|
|
594
|
+
normalized_ast_sha256: digestSchema,
|
|
595
|
+
control_flow_sha256: digestSchema,
|
|
596
|
+
relation_shape_sha256: digestSchema,
|
|
597
|
+
literal_set_sha256: digestSchema,
|
|
598
|
+
effects: z.array(z.enum([
|
|
599
|
+
"async",
|
|
600
|
+
"child-process",
|
|
601
|
+
"event",
|
|
602
|
+
"network",
|
|
603
|
+
"promise",
|
|
604
|
+
"resource",
|
|
605
|
+
"timer"
|
|
606
|
+
]))
|
|
607
|
+
});
|
|
608
|
+
javaScriptSemanticFingerprintInputSchema = z.strictObject({
|
|
609
|
+
function_node_id: semanticNodeIdSchema,
|
|
610
|
+
algorithm: z.literal("rea.javascript-semantic-function"),
|
|
611
|
+
status: z.enum([
|
|
612
|
+
"complete",
|
|
613
|
+
"partial",
|
|
614
|
+
"unavailable"
|
|
615
|
+
]),
|
|
616
|
+
components: fingerprintComponentsSchema,
|
|
617
|
+
limitations: z.array(boundedTextSchema$1),
|
|
618
|
+
evidence: applicationGraphEvidenceSchema
|
|
619
|
+
});
|
|
620
|
+
javaScriptSemanticFingerprintSchema = javaScriptSemanticFingerprintInputSchema.extend({
|
|
621
|
+
evidence: javaScriptSemanticEvidenceReferenceSchema,
|
|
622
|
+
fingerprint_id: prefixedDigestSchema("jsrg_fingerprint"),
|
|
623
|
+
fingerprint_sha256: digestSchema
|
|
624
|
+
});
|
|
625
|
+
familyCoverageSchema = z.strictObject({
|
|
626
|
+
family: z.enum(JAVASCRIPT_SEMANTIC_RELATION_FAMILIES),
|
|
627
|
+
status: z.enum([
|
|
628
|
+
"complete",
|
|
629
|
+
"partial",
|
|
630
|
+
"unknown",
|
|
631
|
+
"unsupported"
|
|
632
|
+
]),
|
|
633
|
+
retained_relations: z.number().int().min(0),
|
|
634
|
+
omitted_relations: z.number().int().min(0).nullable(),
|
|
635
|
+
unknown_ids: z.array(semanticUnknownIdSchema)
|
|
636
|
+
});
|
|
637
|
+
graphCoverageSchema = z.strictObject({
|
|
638
|
+
status: z.enum([
|
|
639
|
+
"complete",
|
|
640
|
+
"partial",
|
|
641
|
+
"unknown",
|
|
642
|
+
"unavailable"
|
|
643
|
+
]),
|
|
644
|
+
truncated: z.boolean(),
|
|
645
|
+
omitted_unknown_occurrences: javaScriptSemanticUnknownOmissionsSchema.exactOptional(),
|
|
646
|
+
omitted_nodes: z.number().int().min(0).nullable(),
|
|
647
|
+
omitted_relations: z.number().int().min(0).nullable(),
|
|
648
|
+
limits: z.array(z.strictObject({
|
|
649
|
+
name: z.string().min(1),
|
|
650
|
+
value: z.number().int().min(0),
|
|
651
|
+
unit: z.enum([
|
|
652
|
+
"items",
|
|
653
|
+
"bytes",
|
|
654
|
+
"milliseconds",
|
|
655
|
+
"depth",
|
|
656
|
+
"other"
|
|
657
|
+
])
|
|
658
|
+
})),
|
|
659
|
+
families: z.array(familyCoverageSchema).length(12)
|
|
660
|
+
});
|
|
661
|
+
javaScriptSemanticGraphInputSchema = z.strictObject({
|
|
662
|
+
schema: z.literal("JavaScriptSemanticRelationGraph"),
|
|
663
|
+
root_artifact_sha256: digestSchema,
|
|
664
|
+
application_graph_id: prefixedDigestSchema("jag"),
|
|
665
|
+
root_node_ids: z.array(semanticNodeIdSchema).min(1),
|
|
666
|
+
evidence_contexts: z.array(javaScriptSemanticEvidenceContextSchema),
|
|
667
|
+
nodes: z.array(javaScriptSemanticNodeSchema).min(1),
|
|
668
|
+
relations: z.array(javaScriptSemanticRelationSchema),
|
|
669
|
+
fingerprints: z.array(javaScriptSemanticFingerprintSchema),
|
|
670
|
+
unknowns: z.array(javaScriptSemanticUnknownSchema),
|
|
671
|
+
coverage: graphCoverageSchema,
|
|
672
|
+
limitations: z.array(boundedTextSchema$1)
|
|
673
|
+
});
|
|
674
|
+
javaScriptSemanticGraphRecordSchema = javaScriptSemanticGraphInputSchema.extend({ graph_id: prefixedDigestSchema("jsrg") });
|
|
675
|
+
})))();
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
//#endregion
|
|
679
|
+
//#region dist/domain/javascript/javascriptSourceSelection.js
|
|
680
|
+
var javaScriptSourcePathsSchema, javaScriptSourceSelectionSchema;
|
|
681
|
+
function init_javascriptSourceSelection() {
|
|
682
|
+
return (init_javascriptSourceSelection = __esmMin((() => {
|
|
683
|
+
javaScriptSourcePathsSchema = z.array(z.string().min(1)).min(1).describe("Exact relevant file paths from the artifact inventory, relative to the application root, analyzed in first-request order before unselected scopes; no globs or implicit dependencies. Omit to analyze all sources.");
|
|
684
|
+
javaScriptSourceSelectionSchema = z.strictObject({
|
|
685
|
+
requested_paths: javaScriptSourcePathsSchema,
|
|
686
|
+
unselected_files: z.number().int().min(0)
|
|
687
|
+
});
|
|
688
|
+
})))();
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
//#endregion
|
|
692
|
+
//#region dist/domain/javascript/javascriptSourceMapPaths.js
|
|
693
|
+
var javascriptSourceMapReferenceSchema, resolveJavaScriptSourceMapReferences, resolveJavaScriptSourceMapUrl, resolveSourceMapUrls, resolveJavaScriptSourceMapPath, unusableHost, carriesUsableHost, windowsFileUrl, decodedUrlPath;
|
|
694
|
+
function init_javascriptSourceMapPaths() {
|
|
695
|
+
return (init_javascriptSourceMapPaths = __esmMin((() => {
|
|
696
|
+
javascriptSourceMapReferenceSchema = z.strictObject({
|
|
697
|
+
source_name: z.string(),
|
|
698
|
+
source_root: z.string().nullable(),
|
|
699
|
+
map_path: z.string().min(1),
|
|
700
|
+
resolution: z.discriminatedUnion("kind", [z.strictObject({
|
|
701
|
+
kind: z.enum(["artifact-relative", "suffix"]),
|
|
702
|
+
path: z.string().min(1)
|
|
703
|
+
}), z.strictObject({
|
|
704
|
+
kind: z.literal("unresolved"),
|
|
705
|
+
reason: z.string().min(1)
|
|
706
|
+
})])
|
|
707
|
+
});
|
|
708
|
+
resolveJavaScriptSourceMapReferences = (sourceNames, sourceRoot, mapPath) => {
|
|
709
|
+
if (sourceNames.length === 0) return [];
|
|
710
|
+
const resolvedSources = resolveSourceMapUrls(sourceNames.map((sourceName) => sourceName ?? ""), sourceRoot, "");
|
|
711
|
+
return sourceNames.map((sourceName, index) => {
|
|
712
|
+
if (sourceName === null) return null;
|
|
713
|
+
const reference = resolvedSources[index];
|
|
714
|
+
if (reference === undefined) throw new TypeError(`TraceMap did not resolve source declaration ${String(index)}`);
|
|
715
|
+
return {
|
|
716
|
+
source_name: sourceName,
|
|
717
|
+
source_root: sourceRoot,
|
|
718
|
+
map_path: mapPath,
|
|
719
|
+
resolution: resolveJavaScriptSourceMapPath(reference, mapPath)
|
|
720
|
+
};
|
|
721
|
+
});
|
|
722
|
+
};
|
|
723
|
+
resolveJavaScriptSourceMapUrl = (source, sourceRoot, mapUrl) => {
|
|
724
|
+
const resolved = resolveSourceMapUrls([source ?? ""], sourceRoot, mapUrl)[0];
|
|
725
|
+
if (resolved === undefined) throw new TypeError("TraceMap did not resolve its single source declaration");
|
|
726
|
+
return resolved;
|
|
727
|
+
};
|
|
728
|
+
resolveSourceMapUrls = (sources, sourceRoot, mapUrl) => new TraceMap({
|
|
729
|
+
version: 3,
|
|
730
|
+
names: [],
|
|
731
|
+
sources,
|
|
732
|
+
...sourceRoot == null ? {} : { sourceRoot },
|
|
733
|
+
mappings: ""
|
|
734
|
+
}, mapUrl).resolvedSources;
|
|
735
|
+
resolveJavaScriptSourceMapPath = (source, mapPath) => {
|
|
736
|
+
const portable = source.replaceAll("\\", "/");
|
|
737
|
+
const windowsPath = /^[a-z]:\//iu.test(portable) || source.startsWith("\\\\");
|
|
738
|
+
const anchor = `/${"source/".repeat(portable.split("/").length + 1)}`;
|
|
739
|
+
const directory = posix.join(anchor, posix.dirname(mapPath));
|
|
740
|
+
const base = pathToFileURL(`${directory}/`, { windows: false });
|
|
741
|
+
const absolute = windowsPath ? windowsFileUrl(source) : URL.parse(source);
|
|
742
|
+
const resolved = windowsPath ? absolute : URL.parse(source, base);
|
|
743
|
+
if (resolved === null) return {
|
|
744
|
+
kind: "unresolved",
|
|
745
|
+
reason: "Source reference is not a valid URL or filesystem path."
|
|
746
|
+
};
|
|
747
|
+
if (!resolved.pathname.startsWith("/")) return {
|
|
748
|
+
kind: "unresolved",
|
|
749
|
+
reason: "Source reference uses a non-hierarchical URL without a file pathname."
|
|
750
|
+
};
|
|
751
|
+
if (resolved.pathname.endsWith("/")) return {
|
|
752
|
+
kind: "unresolved",
|
|
753
|
+
reason: "Source reference names a directory rather than a file."
|
|
754
|
+
};
|
|
755
|
+
const declaredPath = windowsPath ? absolute?.pathname ?? "" : URL.parse(source, "file:///")?.pathname ?? "";
|
|
756
|
+
if (/%(?:2f|5c)/iu.test(declaredPath)) return {
|
|
757
|
+
kind: "unresolved",
|
|
758
|
+
reason: "Source reference contains an encoded path separator."
|
|
759
|
+
};
|
|
760
|
+
const relative = absolute === null ? !portable.startsWith("/") : absolute.href !== resolved.href;
|
|
761
|
+
const path = decodedUrlPath(resolved);
|
|
762
|
+
if (path === null) return {
|
|
763
|
+
kind: "unresolved",
|
|
764
|
+
reason: "Source reference has malformed URL encoding or an invalid file URL."
|
|
765
|
+
};
|
|
766
|
+
const value = relative ? posix.relative(anchor, path) : path.replace(/^\/+/, "");
|
|
767
|
+
if (value === "" || value === ".." || value.startsWith("../")) return {
|
|
768
|
+
kind: "unresolved",
|
|
769
|
+
reason: "Source reference resolves outside the inventoried artifact."
|
|
770
|
+
};
|
|
771
|
+
return {
|
|
772
|
+
path: value,
|
|
773
|
+
kind: relative ? "artifact-relative" : "suffix"
|
|
774
|
+
};
|
|
775
|
+
};
|
|
776
|
+
unusableHost = /[\0\t\n\r #/:<>?@[\\\]^|%]/u;
|
|
777
|
+
carriesUsableHost = (host) => !unusableHost.test(host) && domainToASCII(host) !== "";
|
|
778
|
+
windowsFileUrl = (path) => {
|
|
779
|
+
if (path.startsWith("\\\\") && !carriesUsableHost(path.slice(2).split("\\")[0] ?? "")) return null;
|
|
780
|
+
try {
|
|
781
|
+
return pathToFileURL(path, { windows: true });
|
|
782
|
+
} catch (cause) {
|
|
783
|
+
if (cause instanceof TypeError) return null;
|
|
784
|
+
throw cause;
|
|
785
|
+
}
|
|
786
|
+
};
|
|
787
|
+
decodedUrlPath = (url) => {
|
|
788
|
+
try {
|
|
789
|
+
if (url.protocol === "file:") {
|
|
790
|
+
const windows = url.hostname !== "" && url.hostname !== "localhost";
|
|
791
|
+
const path = fileURLToPath(url, { windows });
|
|
792
|
+
return windows ? path.replaceAll("\\", "/") : path;
|
|
793
|
+
}
|
|
794
|
+
return `${url.host}${decodeURIComponent(url.pathname)}`;
|
|
795
|
+
} catch (cause) {
|
|
796
|
+
if (cause instanceof URIError || cause instanceof TypeError) return null;
|
|
797
|
+
throw cause;
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
})))();
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
//#endregion
|
|
804
|
+
//#region dist/domain/javascript/javascriptApplicationGraphSchemas.js
|
|
805
|
+
var boundedTextSchema, JAVASCRIPT_APPLICATION_NODE_KINDS, applicationNodeKindSchema, JAVASCRIPT_APPLICATION_RELATIONS, applicationRelationSchema, applicationPropertiesSchema, applicationNodeObservationBaseSchema, applicationNodeObservationInputSchema, applicationNodeObservationSchema, applicationNodeInputSchema, applicationNodeSchema, applicationEdgeInputSchema, applicationEdgeSchema, javascriptApplicationGraphInputSchema, javascriptApplicationGraphRecordSchema;
|
|
806
|
+
function init_javascriptApplicationGraphSchemas() {
|
|
807
|
+
return (init_javascriptApplicationGraphSchemas = __esmMin((() => {
|
|
808
|
+
init_javascriptSourceMapPaths();
|
|
809
|
+
init_javascriptApplicationEvidenceSchemas();
|
|
810
|
+
init_jsonValue();
|
|
811
|
+
init_digests();
|
|
812
|
+
boundedTextSchema = z.string().min(1);
|
|
813
|
+
JAVASCRIPT_APPLICATION_NODE_KINDS = [
|
|
814
|
+
"package",
|
|
815
|
+
"installer",
|
|
816
|
+
"artifact",
|
|
817
|
+
"asar-entry",
|
|
818
|
+
"electron-main",
|
|
819
|
+
"electron-preload",
|
|
820
|
+
"electron-renderer",
|
|
821
|
+
"electron-utility",
|
|
822
|
+
"javascript-asset",
|
|
823
|
+
"javascript-chunk",
|
|
824
|
+
"javascript-module",
|
|
825
|
+
"javascript-expression",
|
|
826
|
+
"source-map",
|
|
827
|
+
"source-module",
|
|
828
|
+
"browser-window",
|
|
829
|
+
"frame",
|
|
830
|
+
"target",
|
|
831
|
+
"context-bridge-api",
|
|
832
|
+
"ipc-channel",
|
|
833
|
+
"ipc-handler",
|
|
834
|
+
"worker",
|
|
835
|
+
"service-worker",
|
|
836
|
+
"endpoint",
|
|
837
|
+
"storage",
|
|
838
|
+
"native-addon",
|
|
839
|
+
"native-export",
|
|
840
|
+
"managed-assembly",
|
|
841
|
+
"managed-module",
|
|
842
|
+
"managed-type",
|
|
843
|
+
"managed-method",
|
|
844
|
+
"managed-field",
|
|
845
|
+
"managed-pinvoke-import",
|
|
846
|
+
"managed-native-implementation",
|
|
847
|
+
"runtime-script-instance",
|
|
848
|
+
"unknown"
|
|
849
|
+
];
|
|
850
|
+
applicationNodeKindSchema = z.enum(JAVASCRIPT_APPLICATION_NODE_KINDS);
|
|
851
|
+
JAVASCRIPT_APPLICATION_RELATIONS = [
|
|
852
|
+
"contains",
|
|
853
|
+
"loads",
|
|
854
|
+
"imports",
|
|
855
|
+
"maps_to",
|
|
856
|
+
"exposes",
|
|
857
|
+
"sends",
|
|
858
|
+
"invokes",
|
|
859
|
+
"handles",
|
|
860
|
+
"calls",
|
|
861
|
+
"persists_to",
|
|
862
|
+
"observed_as",
|
|
863
|
+
"changed_from"
|
|
864
|
+
];
|
|
865
|
+
applicationRelationSchema = z.enum(JAVASCRIPT_APPLICATION_RELATIONS);
|
|
866
|
+
applicationPropertiesSchema = z.record(z.string().min(1), jsonValueSchema);
|
|
867
|
+
applicationNodeObservationBaseSchema = z.strictObject({
|
|
868
|
+
label: z.string().min(1).nullable(),
|
|
869
|
+
source_map_reference: javascriptSourceMapReferenceSchema.nullable(),
|
|
870
|
+
properties: applicationPropertiesSchema,
|
|
871
|
+
evidence: applicationGraphEvidenceSchema
|
|
872
|
+
});
|
|
873
|
+
applicationNodeObservationInputSchema = applicationNodeObservationBaseSchema.extend({ source_map_reference: javascriptSourceMapReferenceSchema.nullable().default(null) });
|
|
874
|
+
applicationNodeObservationSchema = applicationNodeObservationBaseSchema.extend({
|
|
875
|
+
observation_id: prefixedDigestSchema("jag_observation"),
|
|
876
|
+
identifier_strategy: z.strictObject({
|
|
877
|
+
strategy: z.literal("semantic-content-sha256"),
|
|
878
|
+
stability: z.literal("observation-exact")
|
|
879
|
+
})
|
|
880
|
+
});
|
|
881
|
+
applicationNodeInputSchema = z.strictObject({
|
|
882
|
+
kind: applicationNodeKindSchema,
|
|
883
|
+
identity: applicationNodeIdentitySchema,
|
|
884
|
+
observations: z.array(applicationNodeObservationInputSchema).min(1)
|
|
885
|
+
});
|
|
886
|
+
applicationNodeSchema = z.strictObject({
|
|
887
|
+
node_id: prefixedDigestSchema("jag_node"),
|
|
888
|
+
kind: applicationNodeKindSchema,
|
|
889
|
+
identity: applicationNodeIdentitySchema,
|
|
890
|
+
observations: z.array(applicationNodeObservationSchema).min(1)
|
|
891
|
+
});
|
|
892
|
+
applicationEdgeInputSchema = z.strictObject({
|
|
893
|
+
source_node_id: prefixedDigestSchema("jag_node"),
|
|
894
|
+
target_node_id: prefixedDigestSchema("jag_node"),
|
|
895
|
+
relation: applicationRelationSchema,
|
|
896
|
+
properties: applicationPropertiesSchema,
|
|
897
|
+
evidence: applicationGraphEvidenceSchema
|
|
898
|
+
});
|
|
899
|
+
applicationEdgeSchema = applicationEdgeInputSchema.extend({
|
|
611
900
|
edge_id: prefixedDigestSchema("jag_edge"),
|
|
612
901
|
identifier_strategy: z.strictObject({
|
|
613
902
|
strategy: z.literal("semantic-content-sha256"),
|
|
@@ -620,12 +909,42 @@ function init_javascriptApplicationGraphSchemas() {
|
|
|
620
909
|
nodes: z.array(applicationNodeSchema).min(1),
|
|
621
910
|
edges: z.array(applicationEdgeSchema),
|
|
622
911
|
coverage: applicationCoverageSchema,
|
|
623
|
-
limitations: z.array(boundedTextSchema
|
|
912
|
+
limitations: z.array(boundedTextSchema)
|
|
624
913
|
});
|
|
625
914
|
javascriptApplicationGraphRecordSchema = javascriptApplicationGraphInputSchema.extend({ graph_id: prefixedDigestSchema("jag") });
|
|
626
915
|
})))();
|
|
627
916
|
}
|
|
628
917
|
|
|
918
|
+
//#endregion
|
|
919
|
+
//#region dist/domain/zodCollectionSteps.js
|
|
920
|
+
/** Elements validated between yields, in the issues and paths a whole-array parse reports. */
|
|
921
|
+
function* parseElementSteps(element, values, path, issues) {
|
|
922
|
+
const parsed = [];
|
|
923
|
+
for (const [index, value] of values.entries()) {
|
|
924
|
+
if (index % 64 === 0) yield;
|
|
925
|
+
const result = element.safeParse(value);
|
|
926
|
+
if (result.success) parsed.push(result.data);
|
|
927
|
+
else issues.push(...result.error.issues.map((issue) => ({
|
|
928
|
+
...issue,
|
|
929
|
+
path: [
|
|
930
|
+
...path,
|
|
931
|
+
index,
|
|
932
|
+
...issue.path
|
|
933
|
+
]
|
|
934
|
+
})));
|
|
935
|
+
}
|
|
936
|
+
return parsed;
|
|
937
|
+
}
|
|
938
|
+
var arrayContainerSchema;
|
|
939
|
+
function init_zodCollectionSteps() {
|
|
940
|
+
return (init_zodCollectionSteps = __esmMin((() => {
|
|
941
|
+
arrayContainerSchema = (array) => array.clone({
|
|
942
|
+
...array.def,
|
|
943
|
+
element: z.unknown()
|
|
944
|
+
});
|
|
945
|
+
})))();
|
|
946
|
+
}
|
|
947
|
+
|
|
629
948
|
//#endregion
|
|
630
949
|
//#region dist/domain/javascript/javascriptApplicationGraph.js
|
|
631
950
|
function* checkGraphContentSteps$1(graph, context) {
|
|
@@ -865,429 +1184,124 @@ function init_javascriptApplicationGraph() {
|
|
|
865
1184
|
"observations",
|
|
866
1185
|
observationIndex,
|
|
867
1186
|
"source_map_reference"
|
|
868
|
-
]
|
|
869
|
-
});
|
|
870
|
-
checkEvidenceNormalization(observation.evidence, [
|
|
871
|
-
"nodes",
|
|
872
|
-
index,
|
|
873
|
-
"observations",
|
|
874
|
-
observationIndex,
|
|
875
|
-
"evidence"
|
|
876
|
-
], context);
|
|
877
|
-
}
|
|
878
|
-
if (!node.observations.some((observation) => observationMatchesIdentity(node, observation))) context.addIssue({
|
|
879
|
-
code: "custom",
|
|
880
|
-
message: "Node identity is not supported by a compatible observation",
|
|
881
|
-
path: [
|
|
882
|
-
"nodes",
|
|
883
|
-
index,
|
|
884
|
-
"identity"
|
|
885
|
-
]
|
|
886
|
-
});
|
|
887
|
-
};
|
|
888
|
-
checkGraphContent$1 = (graph, context) => {
|
|
889
|
-
const steps = checkGraphContentSteps$1(graph, context);
|
|
890
|
-
while (steps.next().done !== true);
|
|
891
|
-
};
|
|
892
|
-
checkGraphInvariants = (graph, context) => {
|
|
893
|
-
checkGraphContent$1(graph, context);
|
|
894
|
-
const { graph_id: identifier, ...semantic } = graph;
|
|
895
|
-
if (identifier !== `jag_${digestCanonicalValue(semantic, "JavaScript Application Graph")}`) context.addIssue({
|
|
896
|
-
code: "custom",
|
|
897
|
-
message: "Graph identifier does not match its semantic content",
|
|
898
|
-
path: ["graph_id"]
|
|
899
|
-
});
|
|
900
|
-
};
|
|
901
|
-
javascriptApplicationGraphSchema = javascriptApplicationGraphRecordSchema.superRefine(checkGraphInvariants);
|
|
902
|
-
javascriptApplicationGraphContentSchema = javascriptApplicationGraphInputSchema.superRefine(checkGraphContent$1);
|
|
903
|
-
createJavaScriptApplicationNode = (input) => {
|
|
904
|
-
const parsed = applicationNodeInputSchema.parse(input);
|
|
905
|
-
for (const observation of parsed.observations) freezeJsonSnapshot(observation.properties);
|
|
906
|
-
const identity = normalizeIdentity(parsed.identity);
|
|
907
|
-
const identifier = nodeId({
|
|
908
|
-
kind: parsed.kind,
|
|
909
|
-
identity
|
|
910
|
-
});
|
|
911
|
-
const observations = parsed.observations.map((observation) => {
|
|
912
|
-
const semantic = {
|
|
913
|
-
...observation,
|
|
914
|
-
evidence: normalizeEvidence$1(observation.evidence),
|
|
915
|
-
identifier_strategy: OBSERVATION_IDENTIFIER_STRATEGY
|
|
916
|
-
};
|
|
917
|
-
return applicationNodeObservationSchema.parse({
|
|
918
|
-
...semantic,
|
|
919
|
-
observation_id: observationId(identifier, semantic)
|
|
920
|
-
});
|
|
921
|
-
}).sort((left, right) => compareUnicodeCodePoints(left.observation_id, right.observation_id));
|
|
922
|
-
return applicationNodeSchema.parse({
|
|
923
|
-
node_id: identifier,
|
|
924
|
-
kind: parsed.kind,
|
|
925
|
-
identity,
|
|
926
|
-
observations
|
|
927
|
-
});
|
|
928
|
-
};
|
|
929
|
-
createJavaScriptApplicationEdge = (input) => {
|
|
930
|
-
const parsed = applicationEdgeInputSchema.parse(input);
|
|
931
|
-
freezeJsonSnapshot(parsed.properties);
|
|
932
|
-
const semantic = {
|
|
933
|
-
...parsed,
|
|
934
|
-
evidence: normalizeEvidence$1(parsed.evidence),
|
|
935
|
-
identifier_strategy: EDGE_IDENTIFIER_STRATEGY
|
|
936
|
-
};
|
|
937
|
-
return applicationEdgeSchema.parse({
|
|
938
|
-
...semantic,
|
|
939
|
-
edge_id: edgeId(semantic)
|
|
940
|
-
});
|
|
941
|
-
};
|
|
942
|
-
createJavaScriptApplicationGraph = (input) => {
|
|
943
|
-
const semantic = normalizeGraphInput$1(javascriptApplicationGraphInputSchema.parse(input));
|
|
944
|
-
const content = javascriptApplicationGraphContentSchema.parse(semantic);
|
|
945
|
-
return {
|
|
946
|
-
...content,
|
|
947
|
-
graph_id: `jag_${digestCanonicalValue(content, "JavaScript Application Graph")}`
|
|
948
|
-
};
|
|
949
|
-
};
|
|
950
|
-
normalizeGraphInput$1 = (parsed) => ({
|
|
951
|
-
...parsed,
|
|
952
|
-
root_node_ids: uniqueSorted(parsed.root_node_ids),
|
|
953
|
-
nodes: [...parsed.nodes].sort((left, right) => compareUnicodeCodePoints(left.node_id, right.node_id)),
|
|
954
|
-
edges: [...parsed.edges].sort((left, right) => compareUnicodeCodePoints(left.edge_id, right.edge_id)),
|
|
955
|
-
coverage: {
|
|
956
|
-
...parsed.coverage,
|
|
957
|
-
limits: normalizeLimits(parsed.coverage.limits)
|
|
958
|
-
},
|
|
959
|
-
limitations: uniqueSorted(parsed.limitations)
|
|
960
|
-
});
|
|
961
|
-
validatedImmutableApplicationGraphs = new WeakSet();
|
|
962
|
-
createImmutableJavaScriptApplicationGraphSteps = (input) => sealValidatedApplicationGraphSteps(createJavaScriptApplicationGraph(input));
|
|
963
|
-
applicationGraphShape = javascriptApplicationGraphInputSchema.shape;
|
|
964
|
-
applicationGraphContainerSchema = javascriptApplicationGraphInputSchema.extend({
|
|
965
|
-
nodes: arrayContainerSchema(applicationGraphShape.nodes),
|
|
966
|
-
edges: arrayContainerSchema(applicationGraphShape.edges)
|
|
967
|
-
});
|
|
968
|
-
sealTransferredJavaScriptApplicationGraphSteps = (input) => parseAndSealApplicationGraphSteps(applicationGraphContainerSchema.parse(input));
|
|
969
|
-
isValidatedImmutableJavaScriptApplicationGraph = (value) => typeof value === "object" && value !== null && validatedImmutableApplicationGraphs.has(value);
|
|
970
|
-
parseJavaScriptApplicationGraph = (input) => javascriptApplicationGraphSchema.parse(input);
|
|
971
|
-
computeJavaScriptApplicationGraphSha256 = (input) => digestCanonicalValue(parseJavaScriptApplicationGraph(input), "JavaScript Application Graph");
|
|
972
|
-
serializeJavaScriptApplicationGraph = (input) => canonicalJson(parseJavaScriptApplicationGraph(input), "JavaScript Application Graph");
|
|
973
|
-
})))();
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
//#endregion
|
|
977
|
-
//#region dist/domain/javascript/javascriptSemanticGraphSchemas.js
|
|
978
|
-
var boundedTextSchema, semanticNodeIdSchema, semanticRelationIdSchema, semanticUnknownIdSchema, semanticEvidenceContextIdSchema, javaScriptSemanticEvidenceContextSchema, javaScriptSemanticEvidenceReferenceSchema, JAVASCRIPT_SEMANTIC_NODE_KINDS, JAVASCRIPT_SEMANTIC_RELATION_FAMILIES, JAVASCRIPT_SEMANTIC_RELATIONS, JAVASCRIPT_SEMANTIC_RELATION_FAMILY, relativePathSchema, sourcePointSchema, sourceRangeSchema, semanticPropertiesSchema, semanticNodeIdentitySchema, javaScriptSemanticNodeInputSchema, javaScriptSemanticNodeSchema, javaScriptSemanticRelationInputSchema, javaScriptSemanticRelationSchema, JAVASCRIPT_SEMANTIC_UNKNOWN_REASONS, javaScriptSemanticUnknownInputSchema, javaScriptSemanticUnknownSchema, fingerprintComponentsSchema, javaScriptSemanticFingerprintInputSchema, javaScriptSemanticFingerprintSchema, familyCoverageSchema, graphCoverageSchema, javaScriptSemanticGraphInputSchema, javaScriptSemanticGraphRecordSchema;
|
|
979
|
-
function init_javascriptSemanticGraphSchemas() {
|
|
980
|
-
return (init_javascriptSemanticGraphSchemas = __esmMin((() => {
|
|
981
|
-
init_javascriptApplicationEvidenceSchemas();
|
|
982
|
-
init_jsonValue();
|
|
983
|
-
init_digests();
|
|
984
|
-
boundedTextSchema = z.string().min(1);
|
|
985
|
-
semanticNodeIdSchema = prefixedDigestSchema("jsrg_node");
|
|
986
|
-
semanticRelationIdSchema = z.string().regex(/^jsrg_relation_[a-f0-9]{64}$/u);
|
|
987
|
-
semanticUnknownIdSchema = z.string().regex(/^jsrg_unknown_[a-f0-9]{64}$/u);
|
|
988
|
-
semanticEvidenceContextIdSchema = z.string().regex(/^jsrg_evidence_[a-f0-9]{64}$/u);
|
|
989
|
-
javaScriptSemanticEvidenceContextSchema = applicationGraphEvidenceContextSchema.extend({ context_id: semanticEvidenceContextIdSchema });
|
|
990
|
-
javaScriptSemanticEvidenceReferenceSchema = z.strictObject({
|
|
991
|
-
context_id: semanticEvidenceContextIdSchema,
|
|
992
|
-
location: applicationGraphEvidenceLocationSchema
|
|
993
|
-
});
|
|
994
|
-
JAVASCRIPT_SEMANTIC_NODE_KINDS = [
|
|
995
|
-
"module",
|
|
996
|
-
"function",
|
|
997
|
-
"parameter",
|
|
998
|
-
"binding",
|
|
999
|
-
"expression",
|
|
1000
|
-
"literal",
|
|
1001
|
-
"property-slot",
|
|
1002
|
-
"call-site",
|
|
1003
|
-
"return-site",
|
|
1004
|
-
"closure-capture",
|
|
1005
|
-
"promise",
|
|
1006
|
-
"task",
|
|
1007
|
-
"event",
|
|
1008
|
-
"listener",
|
|
1009
|
-
"timer",
|
|
1010
|
-
"child-process",
|
|
1011
|
-
"stdio",
|
|
1012
|
-
"signal",
|
|
1013
|
-
"config-source",
|
|
1014
|
-
"request",
|
|
1015
|
-
"response",
|
|
1016
|
-
"boundary",
|
|
1017
|
-
"resource",
|
|
1018
|
-
"unknown-frontier"
|
|
1019
|
-
];
|
|
1020
|
-
JAVASCRIPT_SEMANTIC_RELATION_FAMILIES = [
|
|
1021
|
-
"boundary",
|
|
1022
|
-
"call-flow",
|
|
1023
|
-
"child-process",
|
|
1024
|
-
"closure",
|
|
1025
|
-
"configuration",
|
|
1026
|
-
"data-flow",
|
|
1027
|
-
"event",
|
|
1028
|
-
"object-flow",
|
|
1029
|
-
"promise-ownership",
|
|
1030
|
-
"request",
|
|
1031
|
-
"resource-lifecycle",
|
|
1032
|
-
"timer"
|
|
1033
|
-
];
|
|
1034
|
-
JAVASCRIPT_SEMANTIC_RELATIONS = [
|
|
1035
|
-
"acquires",
|
|
1036
|
-
"aggregates",
|
|
1037
|
-
"aliases",
|
|
1038
|
-
"argument-to-parameter",
|
|
1039
|
-
"awaits",
|
|
1040
|
-
"calls",
|
|
1041
|
-
"cancels-timer",
|
|
1042
|
-
"captures",
|
|
1043
|
-
"chains",
|
|
1044
|
-
"coerces",
|
|
1045
|
-
"connects-stdio",
|
|
1046
|
-
"consumed-by",
|
|
1047
|
-
"constructs-request",
|
|
1048
|
-
"creates-promise",
|
|
1049
|
-
"defaults",
|
|
1050
|
-
"defines",
|
|
1051
|
-
"destructures",
|
|
1052
|
-
"detaches-task",
|
|
1053
|
-
"dispatches-candidate",
|
|
1054
|
-
"forwards-signal",
|
|
1055
|
-
"listens-error",
|
|
1056
|
-
"listens-exit",
|
|
1057
|
-
"owns",
|
|
1058
|
-
"overrides",
|
|
1059
|
-
"parses",
|
|
1060
|
-
"reads",
|
|
1061
|
-
"reads-argv",
|
|
1062
|
-
"reads-config",
|
|
1063
|
-
"reads-environment",
|
|
1064
|
-
"reads-property",
|
|
1065
|
-
"registers-listener",
|
|
1066
|
-
"releases",
|
|
1067
|
-
"removes-listener",
|
|
1068
|
-
"returns-task",
|
|
1069
|
-
"returns-to-call",
|
|
1070
|
-
"schedules-timer",
|
|
1071
|
-
"spawns",
|
|
1072
|
-
"spreads",
|
|
1073
|
-
"supplies-argv",
|
|
1074
|
-
"supplies-env",
|
|
1075
|
-
"supplies-request-field",
|
|
1076
|
-
"validates",
|
|
1077
|
-
"writes",
|
|
1078
|
-
"writes-property"
|
|
1079
|
-
];
|
|
1080
|
-
JAVASCRIPT_SEMANTIC_RELATION_FAMILY = {
|
|
1081
|
-
acquires: "resource-lifecycle",
|
|
1082
|
-
aggregates: "promise-ownership",
|
|
1083
|
-
aliases: "data-flow",
|
|
1084
|
-
"argument-to-parameter": "call-flow",
|
|
1085
|
-
awaits: "promise-ownership",
|
|
1086
|
-
calls: "call-flow",
|
|
1087
|
-
"cancels-timer": "timer",
|
|
1088
|
-
captures: "closure",
|
|
1089
|
-
chains: "promise-ownership",
|
|
1090
|
-
coerces: "boundary",
|
|
1091
|
-
"connects-stdio": "child-process",
|
|
1092
|
-
"consumed-by": "request",
|
|
1093
|
-
"constructs-request": "request",
|
|
1094
|
-
"creates-promise": "promise-ownership",
|
|
1095
|
-
defaults: "configuration",
|
|
1096
|
-
defines: "data-flow",
|
|
1097
|
-
destructures: "object-flow",
|
|
1098
|
-
"detaches-task": "promise-ownership",
|
|
1099
|
-
"dispatches-candidate": "event",
|
|
1100
|
-
"forwards-signal": "child-process",
|
|
1101
|
-
"listens-error": "child-process",
|
|
1102
|
-
"listens-exit": "child-process",
|
|
1103
|
-
owns: "promise-ownership",
|
|
1104
|
-
overrides: "configuration",
|
|
1105
|
-
parses: "boundary",
|
|
1106
|
-
reads: "data-flow",
|
|
1107
|
-
"reads-argv": "configuration",
|
|
1108
|
-
"reads-config": "configuration",
|
|
1109
|
-
"reads-environment": "configuration",
|
|
1110
|
-
"reads-property": "object-flow",
|
|
1111
|
-
"registers-listener": "event",
|
|
1112
|
-
releases: "resource-lifecycle",
|
|
1113
|
-
"removes-listener": "event",
|
|
1114
|
-
"returns-task": "promise-ownership",
|
|
1115
|
-
"returns-to-call": "call-flow",
|
|
1116
|
-
"schedules-timer": "timer",
|
|
1117
|
-
spawns: "child-process",
|
|
1118
|
-
spreads: "object-flow",
|
|
1119
|
-
"supplies-argv": "child-process",
|
|
1120
|
-
"supplies-env": "child-process",
|
|
1121
|
-
"supplies-request-field": "request",
|
|
1122
|
-
validates: "boundary",
|
|
1123
|
-
writes: "data-flow",
|
|
1124
|
-
"writes-property": "object-flow"
|
|
1187
|
+
]
|
|
1188
|
+
});
|
|
1189
|
+
checkEvidenceNormalization(observation.evidence, [
|
|
1190
|
+
"nodes",
|
|
1191
|
+
index,
|
|
1192
|
+
"observations",
|
|
1193
|
+
observationIndex,
|
|
1194
|
+
"evidence"
|
|
1195
|
+
], context);
|
|
1196
|
+
}
|
|
1197
|
+
if (!node.observations.some((observation) => observationMatchesIdentity(node, observation))) context.addIssue({
|
|
1198
|
+
code: "custom",
|
|
1199
|
+
message: "Node identity is not supported by a compatible observation",
|
|
1200
|
+
path: [
|
|
1201
|
+
"nodes",
|
|
1202
|
+
index,
|
|
1203
|
+
"identity"
|
|
1204
|
+
]
|
|
1205
|
+
});
|
|
1125
1206
|
};
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
});
|
|
1135
|
-
sourceRangeSchema = z.strictObject({
|
|
1136
|
-
start: sourcePointSchema,
|
|
1137
|
-
end: sourcePointSchema
|
|
1138
|
-
}).superRefine((range, context) => {
|
|
1139
|
-
if (range.end.line < range.start.line || range.end.line === range.start.line && range.end.column < range.start.column) context.addIssue({
|
|
1207
|
+
checkGraphContent$1 = (graph, context) => {
|
|
1208
|
+
const steps = checkGraphContentSteps$1(graph, context);
|
|
1209
|
+
while (steps.next().done !== true);
|
|
1210
|
+
};
|
|
1211
|
+
checkGraphInvariants = (graph, context) => {
|
|
1212
|
+
checkGraphContent$1(graph, context);
|
|
1213
|
+
const { graph_id: identifier, ...semantic } = graph;
|
|
1214
|
+
if (identifier !== `jag_${digestCanonicalValue(semantic, "JavaScript Application Graph")}`) context.addIssue({
|
|
1140
1215
|
code: "custom",
|
|
1141
|
-
|
|
1142
|
-
|
|
1216
|
+
message: "Graph identifier does not match its semantic content",
|
|
1217
|
+
path: ["graph_id"]
|
|
1143
1218
|
});
|
|
1219
|
+
};
|
|
1220
|
+
javascriptApplicationGraphSchema = javascriptApplicationGraphRecordSchema.superRefine(checkGraphInvariants);
|
|
1221
|
+
javascriptApplicationGraphContentSchema = javascriptApplicationGraphInputSchema.superRefine(checkGraphContent$1);
|
|
1222
|
+
createJavaScriptApplicationNode = (input) => {
|
|
1223
|
+
const parsed = applicationNodeInputSchema.parse(input);
|
|
1224
|
+
for (const observation of parsed.observations) freezeJsonSnapshot(observation.properties);
|
|
1225
|
+
const identity = normalizeIdentity(parsed.identity);
|
|
1226
|
+
const identifier = nodeId({
|
|
1227
|
+
kind: parsed.kind,
|
|
1228
|
+
identity
|
|
1229
|
+
});
|
|
1230
|
+
const observations = parsed.observations.map((observation) => {
|
|
1231
|
+
const semantic = {
|
|
1232
|
+
...observation,
|
|
1233
|
+
evidence: normalizeEvidence$1(observation.evidence),
|
|
1234
|
+
identifier_strategy: OBSERVATION_IDENTIFIER_STRATEGY
|
|
1235
|
+
};
|
|
1236
|
+
return applicationNodeObservationSchema.parse({
|
|
1237
|
+
...semantic,
|
|
1238
|
+
observation_id: observationId(identifier, semantic)
|
|
1239
|
+
});
|
|
1240
|
+
}).sort((left, right) => compareUnicodeCodePoints(left.observation_id, right.observation_id));
|
|
1241
|
+
return applicationNodeSchema.parse({
|
|
1242
|
+
node_id: identifier,
|
|
1243
|
+
kind: parsed.kind,
|
|
1244
|
+
identity,
|
|
1245
|
+
observations
|
|
1246
|
+
});
|
|
1247
|
+
};
|
|
1248
|
+
createJavaScriptApplicationEdge = (input) => {
|
|
1249
|
+
const parsed = applicationEdgeInputSchema.parse(input);
|
|
1250
|
+
freezeJsonSnapshot(parsed.properties);
|
|
1251
|
+
const semantic = {
|
|
1252
|
+
...parsed,
|
|
1253
|
+
evidence: normalizeEvidence$1(parsed.evidence),
|
|
1254
|
+
identifier_strategy: EDGE_IDENTIFIER_STRATEGY
|
|
1255
|
+
};
|
|
1256
|
+
return applicationEdgeSchema.parse({
|
|
1257
|
+
...semantic,
|
|
1258
|
+
edge_id: edgeId(semantic)
|
|
1259
|
+
});
|
|
1260
|
+
};
|
|
1261
|
+
createJavaScriptApplicationGraph = (input) => {
|
|
1262
|
+
const semantic = normalizeGraphInput$1(javascriptApplicationGraphInputSchema.parse(input));
|
|
1263
|
+
const content = javascriptApplicationGraphContentSchema.parse(semantic);
|
|
1264
|
+
return {
|
|
1265
|
+
...content,
|
|
1266
|
+
graph_id: `jag_${digestCanonicalValue(content, "JavaScript Application Graph")}`
|
|
1267
|
+
};
|
|
1268
|
+
};
|
|
1269
|
+
normalizeGraphInput$1 = (parsed) => ({
|
|
1270
|
+
...parsed,
|
|
1271
|
+
root_node_ids: uniqueSorted(parsed.root_node_ids),
|
|
1272
|
+
nodes: [...parsed.nodes].sort((left, right) => compareUnicodeCodePoints(left.node_id, right.node_id)),
|
|
1273
|
+
edges: [...parsed.edges].sort((left, right) => compareUnicodeCodePoints(left.edge_id, right.edge_id)),
|
|
1274
|
+
coverage: {
|
|
1275
|
+
...parsed.coverage,
|
|
1276
|
+
limits: normalizeLimits(parsed.coverage.limits)
|
|
1277
|
+
},
|
|
1278
|
+
limitations: uniqueSorted(parsed.limitations)
|
|
1144
1279
|
});
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
});
|
|
1152
|
-
javaScriptSemanticNodeInputSchema = z.strictObject({
|
|
1153
|
-
kind: z.enum(JAVASCRIPT_SEMANTIC_NODE_KINDS),
|
|
1154
|
-
identity: semanticNodeIdentitySchema,
|
|
1155
|
-
function_node_id: semanticNodeIdSchema.nullable(),
|
|
1156
|
-
application_node_ids: z.array(prefixedDigestSchema("jag_node")),
|
|
1157
|
-
label: z.string().min(1).nullable(),
|
|
1158
|
-
properties: semanticPropertiesSchema,
|
|
1159
|
-
evidence: applicationGraphEvidenceSchema
|
|
1160
|
-
});
|
|
1161
|
-
javaScriptSemanticNodeSchema = javaScriptSemanticNodeInputSchema.extend({
|
|
1162
|
-
evidence: javaScriptSemanticEvidenceReferenceSchema,
|
|
1163
|
-
node_id: semanticNodeIdSchema.describe("SHA-256 of the node kind and identity; stable for one artifact version.")
|
|
1164
|
-
});
|
|
1165
|
-
javaScriptSemanticRelationInputSchema = z.strictObject({
|
|
1166
|
-
source_node_id: semanticNodeIdSchema,
|
|
1167
|
-
target_node_id: semanticNodeIdSchema,
|
|
1168
|
-
relation: z.enum(JAVASCRIPT_SEMANTIC_RELATIONS),
|
|
1169
|
-
resolution: z.enum(["resolved", "candidate"]),
|
|
1170
|
-
properties: semanticPropertiesSchema,
|
|
1171
|
-
evidence: applicationGraphEvidenceSchema
|
|
1172
|
-
});
|
|
1173
|
-
javaScriptSemanticRelationSchema = javaScriptSemanticRelationInputSchema.extend({
|
|
1174
|
-
evidence: javaScriptSemanticEvidenceReferenceSchema,
|
|
1175
|
-
relation_id: semanticRelationIdSchema.describe("SHA-256 of the exact relation content, including its evidence reference.")
|
|
1176
|
-
});
|
|
1177
|
-
JAVASCRIPT_SEMANTIC_UNKNOWN_REASONS = [
|
|
1178
|
-
"ambiguous-target",
|
|
1179
|
-
"bound-reached",
|
|
1180
|
-
"dynamic-call",
|
|
1181
|
-
"dynamic-property",
|
|
1182
|
-
"dynamic-scope",
|
|
1183
|
-
"eval-or-generated-code",
|
|
1184
|
-
"incomplete-module",
|
|
1185
|
-
"missing-source",
|
|
1186
|
-
"resource-limit",
|
|
1187
|
-
"unknown-value",
|
|
1188
|
-
"unsupported-syntax"
|
|
1189
|
-
];
|
|
1190
|
-
javaScriptSemanticUnknownInputSchema = z.strictObject({
|
|
1191
|
-
node_id: semanticNodeIdSchema.nullable(),
|
|
1192
|
-
family: z.enum(JAVASCRIPT_SEMANTIC_RELATION_FAMILIES),
|
|
1193
|
-
relation_kinds: z.array(z.enum(JAVASCRIPT_SEMANTIC_RELATIONS)).min(1),
|
|
1194
|
-
reason: z.enum(JAVASCRIPT_SEMANTIC_UNKNOWN_REASONS),
|
|
1195
|
-
detail: boundedTextSchema,
|
|
1196
|
-
candidate_node_ids: z.array(semanticNodeIdSchema),
|
|
1197
|
-
evidence: applicationGraphEvidenceSchema
|
|
1198
|
-
});
|
|
1199
|
-
javaScriptSemanticUnknownSchema = javaScriptSemanticUnknownInputSchema.extend({
|
|
1200
|
-
evidence: javaScriptSemanticEvidenceReferenceSchema,
|
|
1201
|
-
unknown_id: semanticUnknownIdSchema
|
|
1202
|
-
});
|
|
1203
|
-
fingerprintComponentsSchema = z.strictObject({
|
|
1204
|
-
parameter_arity: z.number().int().min(0),
|
|
1205
|
-
normalized_ast_sha256: digestSchema,
|
|
1206
|
-
control_flow_sha256: digestSchema,
|
|
1207
|
-
relation_shape_sha256: digestSchema,
|
|
1208
|
-
literal_set_sha256: digestSchema,
|
|
1209
|
-
effects: z.array(z.enum([
|
|
1210
|
-
"async",
|
|
1211
|
-
"child-process",
|
|
1212
|
-
"event",
|
|
1213
|
-
"network",
|
|
1214
|
-
"promise",
|
|
1215
|
-
"resource",
|
|
1216
|
-
"timer"
|
|
1217
|
-
]))
|
|
1218
|
-
});
|
|
1219
|
-
javaScriptSemanticFingerprintInputSchema = z.strictObject({
|
|
1220
|
-
function_node_id: semanticNodeIdSchema,
|
|
1221
|
-
algorithm: z.literal("rea.javascript-semantic-function"),
|
|
1222
|
-
status: z.enum([
|
|
1223
|
-
"complete",
|
|
1224
|
-
"partial",
|
|
1225
|
-
"unavailable"
|
|
1226
|
-
]),
|
|
1227
|
-
components: fingerprintComponentsSchema,
|
|
1228
|
-
limitations: z.array(boundedTextSchema),
|
|
1229
|
-
evidence: applicationGraphEvidenceSchema
|
|
1230
|
-
});
|
|
1231
|
-
javaScriptSemanticFingerprintSchema = javaScriptSemanticFingerprintInputSchema.extend({
|
|
1232
|
-
evidence: javaScriptSemanticEvidenceReferenceSchema,
|
|
1233
|
-
fingerprint_id: prefixedDigestSchema("jsrg_fingerprint"),
|
|
1234
|
-
fingerprint_sha256: digestSchema
|
|
1235
|
-
});
|
|
1236
|
-
familyCoverageSchema = z.strictObject({
|
|
1237
|
-
family: z.enum(JAVASCRIPT_SEMANTIC_RELATION_FAMILIES),
|
|
1238
|
-
status: z.enum([
|
|
1239
|
-
"complete",
|
|
1240
|
-
"partial",
|
|
1241
|
-
"unknown",
|
|
1242
|
-
"unsupported"
|
|
1243
|
-
]),
|
|
1244
|
-
retained_relations: z.number().int().min(0),
|
|
1245
|
-
omitted_relations: z.number().int().min(0).nullable(),
|
|
1246
|
-
unknown_ids: z.array(semanticUnknownIdSchema)
|
|
1247
|
-
});
|
|
1248
|
-
graphCoverageSchema = z.strictObject({
|
|
1249
|
-
status: z.enum([
|
|
1250
|
-
"complete",
|
|
1251
|
-
"partial",
|
|
1252
|
-
"unknown",
|
|
1253
|
-
"unavailable"
|
|
1254
|
-
]),
|
|
1255
|
-
truncated: z.boolean(),
|
|
1256
|
-
omitted_nodes: z.number().int().min(0).nullable(),
|
|
1257
|
-
omitted_relations: z.number().int().min(0).nullable(),
|
|
1258
|
-
limits: z.array(z.strictObject({
|
|
1259
|
-
name: z.string().min(1),
|
|
1260
|
-
value: z.number().int().min(0),
|
|
1261
|
-
unit: z.enum([
|
|
1262
|
-
"items",
|
|
1263
|
-
"bytes",
|
|
1264
|
-
"milliseconds",
|
|
1265
|
-
"depth",
|
|
1266
|
-
"other"
|
|
1267
|
-
])
|
|
1268
|
-
})),
|
|
1269
|
-
families: z.array(familyCoverageSchema).length(12)
|
|
1270
|
-
});
|
|
1271
|
-
javaScriptSemanticGraphInputSchema = z.strictObject({
|
|
1272
|
-
schema: z.literal("JavaScriptSemanticRelationGraph"),
|
|
1273
|
-
root_artifact_sha256: digestSchema,
|
|
1274
|
-
application_graph_id: prefixedDigestSchema("jag"),
|
|
1275
|
-
root_node_ids: z.array(semanticNodeIdSchema).min(1),
|
|
1276
|
-
evidence_contexts: z.array(javaScriptSemanticEvidenceContextSchema),
|
|
1277
|
-
nodes: z.array(javaScriptSemanticNodeSchema).min(1),
|
|
1278
|
-
relations: z.array(javaScriptSemanticRelationSchema),
|
|
1279
|
-
fingerprints: z.array(javaScriptSemanticFingerprintSchema),
|
|
1280
|
-
unknowns: z.array(javaScriptSemanticUnknownSchema),
|
|
1281
|
-
coverage: graphCoverageSchema,
|
|
1282
|
-
limitations: z.array(boundedTextSchema)
|
|
1280
|
+
validatedImmutableApplicationGraphs = new WeakSet();
|
|
1281
|
+
createImmutableJavaScriptApplicationGraphSteps = (input) => sealValidatedApplicationGraphSteps(createJavaScriptApplicationGraph(input));
|
|
1282
|
+
applicationGraphShape = javascriptApplicationGraphInputSchema.shape;
|
|
1283
|
+
applicationGraphContainerSchema = javascriptApplicationGraphInputSchema.extend({
|
|
1284
|
+
nodes: arrayContainerSchema(applicationGraphShape.nodes),
|
|
1285
|
+
edges: arrayContainerSchema(applicationGraphShape.edges)
|
|
1283
1286
|
});
|
|
1284
|
-
|
|
1287
|
+
sealTransferredJavaScriptApplicationGraphSteps = (input) => parseAndSealApplicationGraphSteps(applicationGraphContainerSchema.parse(input));
|
|
1288
|
+
isValidatedImmutableJavaScriptApplicationGraph = (value) => typeof value === "object" && value !== null && validatedImmutableApplicationGraphs.has(value);
|
|
1289
|
+
parseJavaScriptApplicationGraph = (input) => javascriptApplicationGraphSchema.parse(input);
|
|
1290
|
+
computeJavaScriptApplicationGraphSha256 = (input) => digestCanonicalValue(parseJavaScriptApplicationGraph(input), "JavaScript Application Graph");
|
|
1291
|
+
serializeJavaScriptApplicationGraph = (input) => canonicalJson(parseJavaScriptApplicationGraph(input), "JavaScript Application Graph");
|
|
1285
1292
|
})))();
|
|
1286
1293
|
}
|
|
1287
1294
|
|
|
1288
1295
|
//#endregion
|
|
1289
1296
|
//#region dist/domain/javascript/javascriptSemanticGraph.js
|
|
1290
1297
|
function* checkCoverageSteps(graph, context) {
|
|
1298
|
+
const omittedUnknowns = graph.coverage.omitted_unknown_occurrences ?? [];
|
|
1299
|
+
sortedUniqueIssue(omittedUnknowns.map(({ family, reason }) => `${family}:${reason}`), ["coverage", "omitted_unknown_occurrences"], "Unknown omission coverage", context);
|
|
1300
|
+
if (omittedUnknowns.length > 0 && (!graph.coverage.truncated || graph.coverage.status !== "partial")) context.addIssue({
|
|
1301
|
+
code: "custom",
|
|
1302
|
+
path: ["coverage"],
|
|
1303
|
+
message: "Omitted unknown occurrences require truncated partial coverage"
|
|
1304
|
+
});
|
|
1291
1305
|
const families = graph.coverage.families.map(({ family }) => family);
|
|
1292
1306
|
if (canonicalJson(families, "JavaScript semantic graph") !== canonicalJson(JAVASCRIPT_SEMANTIC_RELATION_FAMILIES, "JavaScript semantic graph")) context.addIssue({
|
|
1293
1307
|
code: "custom",
|
|
@@ -1338,7 +1352,7 @@ function* checkCoverageSteps(graph, context) {
|
|
|
1338
1352
|
],
|
|
1339
1353
|
message: "Family coverage references an unknown from another family"
|
|
1340
1354
|
});
|
|
1341
|
-
if (family.status === "complete" && (family.omitted_relations !== 0 || family.unknown_ids.length > 0 || unknownFamilies.has(family.family))) context.addIssue({
|
|
1355
|
+
if (family.status === "complete" && (family.omitted_relations !== 0 || family.unknown_ids.length > 0 || unknownFamilies.has(family.family) || omittedUnknowns.some((omitted) => omitted.family === family.family))) context.addIssue({
|
|
1342
1356
|
code: "custom",
|
|
1343
1357
|
path: [
|
|
1344
1358
|
"coverage",
|
|
@@ -1834,6 +1848,7 @@ function init_javascriptSemanticGraph() {
|
|
|
1834
1848
|
coverage: {
|
|
1835
1849
|
...parsed.coverage,
|
|
1836
1850
|
limits: [...parsed.coverage.limits].sort((left, right) => compareUnicodeCodePoints(canonicalJson(left, "JavaScript semantic graph"), canonicalJson(right, "JavaScript semantic graph"))),
|
|
1851
|
+
...parsed.coverage.omitted_unknown_occurrences === undefined ? {} : { omitted_unknown_occurrences: [...parsed.coverage.omitted_unknown_occurrences].sort((left, right) => compareUnicodeCodePoints(`${left.family}:${left.reason}`, `${right.family}:${right.reason}`)) },
|
|
1837
1852
|
families: [...parsed.coverage.families].map((family) => ({
|
|
1838
1853
|
...family,
|
|
1839
1854
|
unknown_ids: uniqueSorted(family.unknown_ids)
|
|
@@ -1880,16 +1895,18 @@ function init_artifactIntegrityPolicy() {
|
|
|
1880
1895
|
|
|
1881
1896
|
//#endregion
|
|
1882
1897
|
//#region dist/domain/javascript/javascriptAnalysisResourceControls.js
|
|
1883
|
-
var JAVASCRIPT_ANALYSIS_RESOURCE_DEFAULTS,
|
|
1898
|
+
var JAVASCRIPT_ANALYSIS_RESOURCE_DEFAULTS, JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM, javaScriptAnalysisCoverageLimits, javaScriptAnalysisResourceControlsSchema;
|
|
1884
1899
|
function init_javascriptAnalysisResourceControls() {
|
|
1885
1900
|
return (init_javascriptAnalysisResourceControls = __esmMin((() => {
|
|
1886
1901
|
JAVASCRIPT_ANALYSIS_RESOURCE_DEFAULTS = {
|
|
1887
1902
|
heapMb: 1024,
|
|
1888
1903
|
timeoutMs: 3e5,
|
|
1889
1904
|
semanticNodes: 1e5,
|
|
1890
|
-
semanticNodesPerFile: 2e4
|
|
1905
|
+
semanticNodesPerFile: 2e4,
|
|
1906
|
+
semanticUnknowns: 1e5,
|
|
1907
|
+
semanticUnknownsPerFile: 2e4
|
|
1891
1908
|
};
|
|
1892
|
-
|
|
1909
|
+
JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM = 1e6;
|
|
1893
1910
|
javaScriptAnalysisCoverageLimits = (limits) => {
|
|
1894
1911
|
const result = [];
|
|
1895
1912
|
for (const key of [
|
|
@@ -1913,8 +1930,10 @@ function init_javascriptAnalysisResourceControls() {
|
|
|
1913
1930
|
return result;
|
|
1914
1931
|
};
|
|
1915
1932
|
javaScriptAnalysisResourceControlsSchema = z.strictObject({
|
|
1916
|
-
max_semantic_nodes: z.number().int().min(1).max(
|
|
1917
|
-
max_semantic_nodes_per_file: z.number().int().min(1).max(
|
|
1933
|
+
max_semantic_nodes: z.number().int().min(1).max(JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM).optional().describe("Maximum retained semantic nodes across the application; defaults to 100000. Worker heap and parent result admission remain enforced."),
|
|
1934
|
+
max_semantic_nodes_per_file: z.number().int().min(1).max(JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM).optional().describe("Maximum retained semantic nodes per source file; defaults to 20000, additionally bounded by max_semantic_nodes and memory/transfer limits."),
|
|
1935
|
+
max_semantic_unknowns: z.number().int().min(1).max(JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM).optional().describe("Maximum retained semantic unknown records across the application; defaults to 100000. Omitted emission occurrences are counted by family and reason."),
|
|
1936
|
+
max_semantic_unknowns_per_file: z.number().int().min(1).max(JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM).optional().describe("Maximum retained semantic unknown records per source file; defaults to 20000, additionally bounded by max_semantic_unknowns and memory/transfer limits."),
|
|
1918
1937
|
max_heap_mb: z.number().int().min(128).max(16384).optional().describe("Maximum V8 old-space heap in MiB for the isolated JavaScript source analyzer; defaults to 1024. This does not change the CLI/MCP process heap. When REA runs on Bun, which ignores V8 heap flags, Windows instead limits the analyzer's committed memory to this budget plus a 512 MiB runtime reserve; other Bun hosts enforce no limit."),
|
|
1919
1938
|
analysis_timeout_ms: z.number().int().min(1).max(2147483647).optional().describe("Maximum startup, analysis and transfer time per JavaScript source, in milliseconds; defaults to 300000. On timeout, return collected partial Evidence and stop the analysis.")
|
|
1920
1939
|
});
|
|
@@ -2034,6 +2053,7 @@ function init_javascriptApplicationAnalysis() {
|
|
|
2034
2053
|
text_bytes_read: countSchema,
|
|
2035
2054
|
invalid_utf8_files: countSchema,
|
|
2036
2055
|
parsed_javascript_files: countSchema,
|
|
2056
|
+
skipped_javascript_files: countSchema.exactOptional(),
|
|
2037
2057
|
visited_ast_nodes: countSchema,
|
|
2038
2058
|
findings: countSchema,
|
|
2039
2059
|
modules: countSchema,
|
|
@@ -2065,4 +2085,4 @@ function init_javascriptApplicationAnalysis() {
|
|
|
2065
2085
|
}
|
|
2066
2086
|
|
|
2067
2087
|
//#endregion
|
|
2068
|
-
export { JAVASCRIPT_ANALYSIS_RESOURCE_DEFAULTS, JAVASCRIPT_APPLICATION_NODE_KINDS,
|
|
2088
|
+
export { JAVASCRIPT_ANALYSIS_RESOURCE_DEFAULTS, JAVASCRIPT_APPLICATION_NODE_KINDS, JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM, JAVASCRIPT_SEMANTIC_NODE_KINDS, JAVASCRIPT_SEMANTIC_RELATIONS, JAVASCRIPT_SEMANTIC_RELATION_FAMILIES, JAVASCRIPT_SEMANTIC_RELATION_FAMILY, JavaScriptSemanticEvidenceContextRegistry, analyzeJavaScriptApplicationInputSchema, applicationCoverageSchema, applicationGraphEvidenceSchema, applicationNodeIdentitySchema, applicationNodeObservationSchema, applicationNodeSchema, artifactIntegrityPolicySchema, completeApplicationCoverage, createImmutableJavaScriptApplicationGraphSteps, createJavaScriptApplicationEdge, createJavaScriptApplicationGraph, createJavaScriptApplicationNode, createJavaScriptSemanticFingerprint, createJavaScriptSemanticGraph, createJavaScriptSemanticGraphNode, createJavaScriptSemanticGraphRelation, createJavaScriptSemanticGraphUnknown, init_artifactIntegrityPolicy, init_javascriptAnalysisResourceControls, init_javascriptApplicationAnalysis, init_javascriptApplicationEvidenceSchemas, init_javascriptApplicationGraph, init_javascriptApplicationGraphSchemas, init_javascriptSemanticGraph, init_javascriptSemanticGraphSchemas, init_javascriptSourceMapPaths, init_javascriptSourceSelection, isValidatedImmutableJavaScriptApplicationGraph, javaScriptAnalysisCoverageLimits, javaScriptAnalysisResourceControlsSchema, javaScriptSemanticEvidenceContextSchema, javaScriptSemanticFingerprintSchema, javaScriptSemanticGraphInputSchema, javaScriptSemanticNodeId, javaScriptSemanticNodeSchema, javaScriptSemanticRelationSchema, javaScriptSemanticUnknownOmissionsSchema, javaScriptSemanticUnknownSchema, javaScriptSourcePathsSchema, javaScriptSourceSelectionSchema, javascriptApplicationAnalysisResultSchema, javascriptApplicationGraphSchema, parseOwnedJavaScriptApplicationAnalysisSteps, partialApplicationCoverage, resolveJavaScriptSourceMapReferences, resolveJavaScriptSourceMapUrl, sealTransferredJavaScriptApplicationGraphSteps, sealTransferredJavaScriptSemanticGraphSteps, truncatedApplicationCoverage };
|